summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Geiselbrecht <travisg@google.com>2012-06-25 23:25:16 -0700
committerTravis Geiselbrecht <travisg@google.com>2012-06-25 23:30:43 -0700
commite0f114ab1d645caeac2c30273d0b693d72063f54 (patch)
treea2cdc62545c5f65439a06500fa17c8a67371653b
parent297247f0e8f7011740031a0e2c7420fa99a3315e (diff)
downloadadk2012-e0f114ab1d645caeac2c30273d0b693d72063f54.tar.gz
Make file based build
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/build/gcc/Makefile109
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/build/gcc/Makefile44
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board.h300
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_adc.h18
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_buttons.h37
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_can.h55
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_ebi.h44
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_emac.h91
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_lcd.h55
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_leds.h36
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_mci.h25
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_nandflash.h71
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_norflash.h17
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_pck.h20
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_pwm.h56
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_qtouch.h44
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_sdcard.h19
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_sdram.h61
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_smartcard.h24
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_spi.h47
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_ssc.h35
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_touchscreen.h39
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_twi.h36
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_uart.h20
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_usart0.h35
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_usart1.h29
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_usart3.h29
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_usb.h56
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/build/gcc/Makefile56
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/build/gcc/debug.mk18
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/build/gcc/gcc.mk37
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/build/gcc/iar.mk15
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/build/gcc/linux.mk4
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/build/gcc/readme.txt6
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/build/gcc/release.mk18
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/build/gcc/sam3x_ek.mk188
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/build/gcc/win.mk4
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/ads7843.h56
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/at45_spi.h216
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/at45d.h63
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/bitbanding.h109
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/bmp.h104
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/board_lowlevel.h46
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/board_memories.h50
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/dma_hardware_interface.h71
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/dmad.h155
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/emacd.h202
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/hamming.h69
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/hx8347.h195
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/iso7816_4.h38
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/lcd_color.h85
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/lcd_font.h93
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/lcd_font10x14.h45
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/lcd_gimp_image.h20
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/lcdd.h52
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/led.h72
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/macb.h129
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/math.h47
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/mii.h200
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/rand.h48
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/sn65hvd234.h72
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/spid_dma.h147
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/syscalls.h65
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/timetick.h80
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/tsd.h69
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/tsd_ads7843.h54
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/tsd_com.h53
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/twid.h150
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/uart_console.h54
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/usart_spi.h137
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/wav.h83
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/wm8731.h194
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/xmodem.h41
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x2/flash.ld143
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x2/sram.ld143
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x2/sram_samba.lds90
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x4/flash.ld143
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x4/sram.ld143
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x4/sram_samba.lds90
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x8/flash.ld143
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x8/sram.ld143
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x8/sram_samba.lds90
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x_ek_flash.gdb61
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x_ek_sram.gdb56
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/ads7843.c200
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/at45_spi.c356
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/at45d.c302
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/bmp.c314
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/board_cstartup_gnu.c190
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/board_lowlevel.c122
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/board_memories.c198
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/dlib_lowlevel.c85
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/dma_hardware_interface.c141
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/dmad.c582
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/emacd.c710
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/hamming.c346
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/hx8347.c794
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/iso7816_4.c598
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/lcd_font.c118
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/lcd_font10x14.c233
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/lcdd.c140
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/led.c168
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/macb.c635
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/math.c101
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/rand.c67
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/retarget.c88
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/sn65hvd234.c155
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/spid_dma.c404
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/syscalls.c141
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/timetick.c136
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/trace.c65
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/tsd_ads7843.c313
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/tsd_com.c390
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/twid.c613
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/uart_console.c399
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/usart_spi.c177
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/wav.c96
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/wm8731.c139
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/xmodem.c251
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/build/gcc/Makefile86
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/build/gcc/debug.mk18
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/build/gcc/gcc.mk35
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/build/gcc/iar.mk15
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/build/gcc/linux.mk4
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/build/gcc/readme.txt7
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/build/gcc/release.mk18
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/build/gcc/sam3x.mk174
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/build/gcc/win.mk4
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/chip.h113
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/cmsis/CMSIS_Core.htm1337
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/cmsis/core_cm3.c807
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/cmsis/core_cm3.h1818
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/SAM3XA.h10504
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/adc.h169
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/async.h80
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/can.h85
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/chipid.h0
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/dacc.h146
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/dmac.h238
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/eefc.h115
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/emac.h305
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/exceptions.h112
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/flashd.h79
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/hsmci.h152
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/matrix.h0
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/pio.h155
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/pio_it.h89
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/pio_pin.h170
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/pio_pin_it.h62
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/pmc.h105
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/pwm.h127
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/rstc.h60
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/rtc.h97
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/rtt.h82
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/sdramc.h68
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/smc.h113
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/spi.h110
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/ssc.h75
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/tc.h76
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/trace.h230
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/trng.h0
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/twi.h120
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/usart.h133
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/wdt.h74
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/lib/libchip_sam3x2_gcc_dbg.a.txt722
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/lib/libchip_sam3x2_gcc_rel.a.txt624
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/lib/libchip_sam3x4_gcc_dbg.a.txt722
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/lib/libchip_sam3x4_gcc_rel.a.txt624
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/lib/libchip_sam3x8_gcc_dbg.a.txt722
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/lib/libchip_sam3x8_gcc_rel.a.txt624
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/adc.c557
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/async.c53
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/can.c639
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/chipid.c0
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/dacc.c186
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/dmac.c502
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/eefc.c306
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/emac.c567
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/exceptions.c489
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/flashd.c677
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/hsmci.c599
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/matrix.c33
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/pio.c197
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/pio_it.c175
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/pio_pin.c254
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/pio_pin_it.c221
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/pmc.c613
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/pwm.c614
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/rstc.c179
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/rtc.c464
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/rtt.c133
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/sdramc.c187
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/smc.c947
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/spi.c282
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/ssc.c197
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/tc.c175
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/trng.c0
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/twi.c479
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/usart.c409
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/wdt.c132
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/build/gcc/Makefile56
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/build/gcc/debug.mk18
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/build/gcc/gcc.mk37
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/build/gcc/iar.mk15
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/build/gcc/libfatfs.mk189
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/build/gcc/linux.mk4
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/build/gcc/readme.txt6
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/build/gcc/release.mk18
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/build/gcc/win.mk4
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/00index_e.html111
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/00index_j.html111
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/css_e.css58
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/css_j.css61
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/appnote.html258
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/chdir.html88
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/chdrive.html62
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/chmod.html98
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/close.html69
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/dinit.html46
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/dioctl.html69
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/dread.html59
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/dstat.html48
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/dwrite.html67
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/eof.html61
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/error.html61
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/fattime.html51
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/filename.html74
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/forward.html145
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/getcwd.html76
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/getfree.html102
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/gets.html65
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/lseek.html134
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/mkdir.html90
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/mkfs.html80
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/mount.html66
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/open.html152
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/opendir.html80
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/printf.html90
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/putc.html62
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/puts.html62
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/read.html80
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/readdir.html120
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/rename.html96
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/sdir.html37
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/sfatfs.html54
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/sfile.html49
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/sfileinfo.html70
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/size.html61
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/stat.html76
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/sync.html69
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/tell.html61
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/truncate.html72
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/unlink.html81
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/utime.html108
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/write.html80
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/img/f1.pngbin0 -> 1145 bytes
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/img/f2.pngbin0 -> 1458 bytes
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/img/f3.pngbin0 -> 1039 bytes
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/img/f4.pngbin0 -> 2335 bytes
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/img/f5.pngbin0 -> 2479 bytes
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/img/f6.pngbin0 -> 1436 bytes
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/img/layers.pngbin0 -> 2401 bytes
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/img/rwtest.pngbin0 -> 19068 bytes
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/img/rwtest2.pngbin0 -> 8153 bytes
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/appnote.html263
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/chdir.html92
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/chdrive.html63
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/chmod.html98
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/close.html69
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/dinit.html46
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/dioctl.html68
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/dread.html59
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/dstat.html48
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/dwrite.html67
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/eof.html61
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/error.html61
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/fattime.html51
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/filename.html72
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/forward.html145
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/getcwd.html76
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/getfree.html102
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/gets.html65
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/lseek.html135
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/mkdir.html90
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/mkfs.html80
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/mount.html66
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/open.html153
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/opendir.html80
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/printf.html90
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/putc.html62
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/puts.html62
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/read.html80
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/readdir.html125
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/rename.html96
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/sdir.html37
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/sfatfs.html55
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/sfile.html48
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/sfileinfo.html70
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/size.html61
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/stat.html81
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/sync.html69
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/tell.html61
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/truncate.html72
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/unlink.html79
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/utime.html108
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/write.html80
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/updates.txt110
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/00readme.txt127
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/diskio.c213
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/diskio.h78
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/diskio_rt.c371
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/diskio_sam3x.c353
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/ff.c3982
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/ff.h529
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/ffconf.h191
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/integer.h37
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/option/cc932.c3798
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/option/cc936.c10973
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/option/cc949.c8603
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/option/cc950.c6829
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/option/ccsbcs.c540
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/option/syscall.c151
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs_config.h241
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/build/gcc/Makefile56
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/build/gcc/debug.mk18
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/build/gcc/gcc.mk37
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/build/gcc/iar.mk15
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/build/gcc/liblwip.mk204
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/build/gcc/linux.mk4
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/build/gcc/readme.txt6
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/build/gcc/release.mk18
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/build/gcc/win.mk4
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/liblwip.c0
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/liblwip.h0
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/sam3-specific/arch/cc.h81
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/sam3-specific/arch/perf.h39
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/sam3-specific/arch/sys_arch.c100
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/sam3-specific/arch/sys_arch.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/sam3-specific/emacif.c448
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/sam3-specific/emacif.h63
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/sam3-specific/lwipopts.h419
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libqtouch/License.txt30
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libqtouch/include/touch_api.h1057
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libqtouch/include/touch_qt_config.h124
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libqtouch/libqtouch.h46
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libuip/sam3-specific/clock-arch.c99
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libuip/sam3-specific/clock-arch.h36
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libuip/sam3-specific/tapdev.c208
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libuip/sam3-specific/tapdev.h38
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/MEDDdram.c290
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/MEDFlash.c276
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/MEDNandFlash.c495
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/MEDRamDisk.c285
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/MEDSdcard.c447
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/MEDSdram.c273
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/Media.c191
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/build/gcc/Makefile56
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/build/gcc/debug.mk18
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/build/gcc/gcc.mk37
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/build/gcc/iar.mk15
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/build/gcc/libmemories.mk207
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/build/gcc/linux.mk4
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/build/gcc/readme.txt6
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/build/gcc/release.mk18
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/build/gcc/win.mk4
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/EccNandFlash.h83
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/MEDDdram.h52
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/MEDFlash.h56
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/MEDNandFlash.h59
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/MEDRamDisk.h53
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/MEDSdcard.h55
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/MEDSdram.h52
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/ManagedNandFlash.h152
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/MappedNandFlash.h112
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/Media.h163
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/NandCommon.h133
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/NandFlashDma.h55
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/NandFlashModel.h158
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/NandFlashModelList.h62
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/NandSpareScheme.h105
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/NorFlashAmd.h92
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/NorFlashApi.h95
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/NorFlashCFI.h239
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/NorFlashCommon.h103
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/NorFlashIntel.h91
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/RawNandFlash.h115
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/SkipBlockNandFlash.h132
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/TranslatedNandFlash.h99
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/at26.h252
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/at26d.h79
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/mcid.h170
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/sdio.h312
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/sdmmc.h608
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/sdmmc_cmd.h555
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/sdmmc_dbg.h78
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/sdmmc_hal.h99
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/sdmmc_trace.h208
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/memories.h76
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/EccNandFlash.c298
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/ManagedNandFlash.c887
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/MappedNandFlash.c668
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/NandFlashDma.c190
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/NandFlashModel.c418
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/NandFlashModelList.c124
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/NandSpareScheme.c249
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/NfcRawNandFlash.c876
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/RawNandFlash.c804
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/SkipBlockNandFlash.c495
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/TranslatedNandFlash.c598
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/norflash/NorFlashAmd.c475
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/norflash/NorFlashApi.c160
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/norflash/NorFlashCFI.c415
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/norflash/NorFlashCommon.c148
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/norflash/NorFlashIntel.c477
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/sdmmc/mcid_dma.c1057
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/sdmmc/sdmmc.c3219
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/spi-flash/at26.c226
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/spi-flash/at26d.c353
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/spi-flash/at45.c257
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/spi-flash/at45d.c223
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/spi-flash/spid.c215
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/spi-flash/spid_dma.c384
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/atxmega128a1u_xplain_a1_mkii/conf_board.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/atxmega128a1u_xplain_a1_mkii/conf_clock.h73
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/atxmega128a1u_xplain_a1_mkii/conf_example.h52
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/atxmega128a1u_xplain_a1_mkii/conf_sleepmgr.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/atxmega128a1u_xplain_a1_mkii/sample_processor.c96
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/atxmega128a1u_xplain_a1_mkii/ui.c84
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/conf_usb.h129
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/main.c183
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/main.h86
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/sample_processor.h56
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/udi_audio_conf.h90
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/ui.h59
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/module_config/conf_usb.h127
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/udi_audio.c507
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/udi_audio.h422
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/udi_audio_conf.h90
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/udi_audio_desc.c185
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/usb_protocol_audio.h280
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/at32uc3a0512_evk1100/conf_board.h44
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/at32uc3a0512_evk1100/conf_clock.h75
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/at32uc3a0512_evk1100/conf_sleepmgr.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/at32uc3a0512_evk1100/uart.c162
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/at32uc3a0512_evk1100/uart.h50
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/at32uc3a0512_evk1100/ui.c138
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128a1u_xplain_a1_mkii/conf_board.h44
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128a1u_xplain_a1_mkii/conf_clock.h74
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128a1u_xplain_a1_mkii/conf_sleepmgr.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128a1u_xplain_a1_mkii/uart.c153
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128a1u_xplain_a1_mkii/uart.h50
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128a1u_xplain_a1_mkii/ui.c141
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128b1_xmega_b1_xplained/conf_board.h44
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128b1_xmega_b1_xplained/conf_clock.h56
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128b1_xmega_b1_xplained/conf_sleepmgr.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128b1_xmega_b1_xplained/uart.c153
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128b1_xmega_b1_xplained/uart.h50
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128b1_xmega_b1_xplained/ui.c134
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega256a3bu_stk600-rc064x/conf_board.h44
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega256a3bu_stk600-rc064x/conf_clock.h56
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega256a3bu_stk600-rc064x/conf_sleepmgr.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega256a3bu_stk600-rc064x/uart.c153
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega256a3bu_stk600-rc064x/uart.h50
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega256a3bu_stk600-rc064x/ui.c136
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/avr_cdc.inf97
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/conf_usb.h132
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/main.c314
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/main.h97
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/ui.h91
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/module_config/conf_usb.h133
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/udi_cdc.c581
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/udi_cdc.h291
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/udi_cdc_conf.h81
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/udi_cdc_desc.c175
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/usb_protocol_cdc.h308
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/at32uc3a0512_evk1100/conf_access.h186
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/at32uc3a0512_evk1100/conf_at45dbx.h73
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/at32uc3a0512_evk1100/conf_board.h44
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/at32uc3a0512_evk1100/conf_clock.h75
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/at32uc3a0512_evk1100/conf_sd_mmc_spi.h71
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/at32uc3a0512_evk1100/conf_sleepmgr.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/at32uc3a0512_evk1100/conf_spi_master.h58
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/at32uc3a0512_evk1100/conf_virtual_mem.h54
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/at32uc3a0512_evk1100/ui.c227
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/atxmega128a1u_xplain_a1_mkii/conf_access.h186
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/atxmega128a1u_xplain_a1_mkii/conf_at45dbx.h78
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/atxmega128a1u_xplain_a1_mkii/conf_board.h44
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/atxmega128a1u_xplain_a1_mkii/conf_clock.h74
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/atxmega128a1u_xplain_a1_mkii/conf_sd_mmc_spi.h71
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/atxmega128a1u_xplain_a1_mkii/conf_sleepmgr.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/atxmega128a1u_xplain_a1_mkii/conf_spi_master.h41
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/atxmega128a1u_xplain_a1_mkii/conf_usart_spi.h41
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/atxmega128a1u_xplain_a1_mkii/conf_virtual_mem.h54
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/atxmega128a1u_xplain_a1_mkii/ui.c197
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/conf_usb.h213
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/main.c291
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/main.h98
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/ui.h61
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/conf_access.h186
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/conf_at45dbx.h78
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/conf_board.h44
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/conf_clock.h74
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/conf_sd_mmc_spi.h71
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/conf_sleepmgr.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/conf_spi_master.h41
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/conf_usart_spi.h41
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/conf_virtual_mem.h54
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/uart.c153
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/uart.h50
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/ui.c371
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/avr_cdc_composite.inf97
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/conf_usb.h308
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/driver/avr_cdc_iad.inf98
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/main.c516
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/main.h143
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/ui.h103
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/module_config/conf_usb.h387
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/udi_composite_conf.h42
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/udi_composite_desc.c176
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp.h166
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3a0_a1/iar/at32uc3a-isp.hex478
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3a0_a1/iar/lnkat32uc3a-isp.xcl150
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3a0_a1/iar/usb_device_dfu_isp.ewp934
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3a0_a1/sysclk.c187
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/iar/at32uc3c-isp.hex504
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/iar/lnkat32uc3c-isp.xcl150
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/iar/usb_device_dfu_isp.ewp940
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.0/at32uc3c-isp-1.1.0.binbin0 -> 8188 bytes
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.0/at32uc3c-isp-1.1.0.hex515
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.0/at32uc3c-isp_cfg-1.1.0.dat1
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.0/program_at32uc3c-isp-1.1.0.cmd56
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.0/program_at32uc3c-isp-1.1.0.sh59
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.0/readme.txt4
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.1/at32uc3c-isp-1.1.1.hex504
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.1/at32uc3c-isp_cfg-1.1.1.dat1
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.1/program_at32uc3c-isp-1.1.1.cmd82
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.1/program_at32uc3c-isp-1.1.1.sh59
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.1/report_111.txt1037
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.2/at32uc3c-isp-1.1.2.hex504
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.2/at32uc3c-isp_cfg-1.1.2.dat1
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.2/program_at32uc3c-isp-1.1.2.cmd82
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.2/program_at32uc3c-isp-1.1.2.sh59
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/sysclk_uc3c.c233
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/iar/at32uc3d-isp.hex503
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/iar/lnkat32uc3d-isp.xcl150
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/iar/usb_device_dfu_isp.ewp942
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.0/at32uc3d-isp-1.1.0.hex508
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.0/at32uc3d-isp_cfg-1.1.0.dat1
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.0/flip/ATUC128D3.xml38
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.0/flip/atmel_usb_dfu.inf192
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.0/program_at32uc3d-isp-1.1.0.cmd56
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.0/program_at32uc3d-isp-1.1.0.sh59
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.1/Readme.txt595
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.1/at32uc3d-isp-1.1.1.binbin0 -> 8140 bytes
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.1/at32uc3d-isp-1.1.1.hex512
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.1/at32uc3d-isp_cfg-1.1.1.dat1
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.1/avr32.7zbin0 -> 546933 bytes
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.1/program_at32uc3d-isp-1.1.1.cmd82
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.1/program_at32uc3d-isp-1.1.1.sh59
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.2/Readme.txt595
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.2/at32uc3d-isp-1.1.2.binbin0 -> 8000 bytes
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.2/at32uc3d-isp-1.1.2.hex503
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.2/at32uc3d-isp_cfg-1.1.2.dat1
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.2/avr32.7zbin0 -> 562489 bytes
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.2/program_at32uc3d-isp-1.1.2.cmd82
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.2/program_at32uc3d-isp-1.1.2.sh59
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/sysclk_uc3d.c196
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/boot.S322
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/boot.h65
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/boot.s82304
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/conf_board.h41
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/conf_clock.h45
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/conf_freq_detect.h62
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/conf_isp.h138
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/conf_usb.h143
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/flash_api.h1996
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/intc.c69
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/intc.h94
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/isp.c331
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/main.c101
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/main.h46
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128a1u/conf_board.h41
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128a1u/conf_clock.h57
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128a1u/conf_isp.h67
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128a1u/iar/atxmega128a1u_boot.xcl71
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128a1u/iar/cstartup.s90195
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128a1u/iar/macros.m90180
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128a1u/releases/atxmega128a1u-bootloader-usb-dfu-1.0.1/atxmega128a1u_bootloader_usb_dfu_101.hex358
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128b1/conf_board.h41
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128b1/conf_clock.h57
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128b1/conf_isp.h67
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128b1/iar/atxmega128b1_boot.xcl72
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128b1/iar/cstartup.s90195
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128b1/iar/macros.m90181
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128b1/releases/atxmega128b1-bootloader-usb-dfu-1.0.1/atxmega128b1_bootloader_usb_dfu_101.hex340
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega256a3bu/conf_board.h41
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega256a3bu/conf_clock.h57
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega256a3bu/conf_isp.h67
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega256a3bu/iar/atxmega256a3bu_boot.xcl72
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega256a3bu/iar/cstartup.s90211
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega256a3bu/iar/macros.m90180
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega64a1u/conf_board.h41
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega64a1u/conf_clock.h56
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega64a1u/conf_isp.h69
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega64a1u/iar/atxmega64a1_boot.xcl73
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega64a1u/iar/common_services_usb_class_dfu_device_atmel_isp_atxmega64a1u.ewp2089
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega64a1u/iar/cstartup.s90199
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega64a1u/iar/macros.m90180
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega64a1u/iar/test_on_atxmega128a1_boot.xcl73
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega64a1u/sysclk_opt.c91
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega64a1u/udc_opt.c463
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/conf_usb.h151
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/isp.c203
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/main.c71
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/main.h42
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/module_config/conf_usb.h127
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/udi_dfu_atmel.c815
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/udi_dfu_atmel.h104
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/udi_dfu_atmel_conf.h75
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/udi_dfu_atmel_desc.c142
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/standard/udi_dfu.c173
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/standard/udi_dfu.h109
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/standard/udi_dfu_conf.h70
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/standard/udi_dfu_desc.c142
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/usb_atmel_dfu.h244
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/usb_protocol_dfu.h186
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega128a1u_xplain_a1_mkii/conf_board.h41
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega128a1u_xplain_a1_mkii/conf_clock.h74
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega128a1u_xplain_a1_mkii/conf_sleepmgr.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega128a1u_xplain_a1_mkii/ui.c165
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega128b1_xmega_b1_xplained/conf_board.h41
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega128b1_xmega_b1_xplained/conf_clock.h74
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega128b1_xmega_b1_xplained/conf_sleepmgr.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega128b1_xmega_b1_xplained/ui.c143
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega256a3bu_stk600-rc064x/conf_board.h41
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega256a3bu_stk600-rc064x/conf_clock.h68
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega256a3bu_stk600-rc064x/conf_sleepmgr.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega256a3bu_stk600-rc064x/ui.c165
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/conf_usb.h134
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/main.c198
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/main.h95
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/ui.h61
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/module_config/conf_usb.h134
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/udi_hid_generic.c293
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/udi_hid_generic.h144
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/udi_hid_generic_conf.h86
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/udi_hid_generic_desc.c158
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/at32uc3b0256_evk1101/conf_board.h41
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/at32uc3b0256_evk1101/conf_clock.h75
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/at32uc3b0256_evk1101/conf_sleepmgr.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/at32uc3b0256_evk1101/ui.c213
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/atxmega128a1u_xplain_a1_mkii/conf_board.h41
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/atxmega128a1u_xplain_a1_mkii/conf_clock.h74
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/atxmega128a1u_xplain_a1_mkii/conf_sleepmgr.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/atxmega128a1u_xplain_a1_mkii/ui.c254
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/atxmega128b1_xmega_b1_xplained/conf_board.h41
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/atxmega128b1_xmega_b1_xplained/conf_clock.h74
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/atxmega128b1_xmega_b1_xplained/conf_sleepmgr.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/atxmega128b1_xmega_b1_xplained/ui.c243
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/conf_usb.h125
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/main.c185
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/main.h86
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/ui.h58
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/module_config/conf_usb.h125
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/udi_hid_kbd.c368
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/udi_hid_kbd.h176
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/udi_hid_kbd_conf.h72
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/udi_hid_kbd_desc.c158
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a0512_evk1100/conf_board.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a0512_evk1100/conf_clock.h75
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a0512_evk1100/conf_sleepmgr.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a0512_evk1100/ui.c202
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a0512_evk1105/conf_board.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a0512_evk1105/conf_clock.h75
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a0512_evk1105/conf_sleepmgr.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a0512_evk1105/ui.c117
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a3256_evk1104/conf_board.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a3256_evk1104/conf_clock.h75
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a3256_evk1104/conf_sleepmgr.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a3256_evk1104/ui.c181
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3b0256_evk1101/conf_board.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3b0256_evk1101/conf_clock.h75
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3b0256_evk1101/conf_sleepmgr.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3b0256_evk1101/ui.c249
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3c0512_uc3c_ek/conf_board.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3c0512_uc3c_ek/conf_clock.h83
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3c0512_uc3c_ek/conf_sleepmgr.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3c0512_uc3c_ek/ui.c188
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3c2512c_uc3_c2_xplained/conf_board.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3c2512c_uc3_c2_xplained/conf_clock.h82
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3c2512c_uc3_c2_xplained/conf_sleepmgr.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3c2512c_uc3_c2_xplained/ui.c188
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atuc128d3_evk1101/conf_board.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atuc128d3_evk1101/conf_clock.h75
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atuc128d3_evk1101/conf_sleepmgr.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atuc128d3_evk1101/gcc/Makefile598
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atuc128d3_evk1101/gcc/config.mk173
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atuc128d3_evk1101/ui.c204
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atuc256l3_stk600_rcuc3l3_l4/conf_board.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atuc256l3_stk600_rcuc3l3_l4/conf_clock.h81
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atuc256l3_stk600_rcuc3l3_l4/conf_sleepmgr.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atuc256l3_stk600_rcuc3l3_l4/ui.c176
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega128a1u_xplain_a1_mkii/conf_board.h41
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega128a1u_xplain_a1_mkii/conf_clock.h74
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega128a1u_xplain_a1_mkii/conf_sleepmgr.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega128a1u_xplain_a1_mkii/ui.c172
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega128b1_xmega_b1_xplained/conf_board.h41
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega128b1_xmega_b1_xplained/conf_clock.h74
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega128b1_xmega_b1_xplained/conf_sleepmgr.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega128b1_xmega_b1_xplained/ui.c145
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega256a3bu_stk600-rc064x/conf_board.h41
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega256a3bu_stk600-rc064x/conf_clock.h68
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega256a3bu_stk600-rc064x/conf_sleepmgr.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega256a3bu_stk600-rc064x/ui.c171
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/conf_usb.h123
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/main.c186
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/main.h86
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/mxt768e_stk600-rcmxt768e/conf_board.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/mxt768e_stk600-rcmxt768e/conf_clock.h78
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/mxt768e_stk600-rcmxt768e/conf_sleepmgr.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/mxt768e_stk600-rcmxt768e/ui.c176
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/ui.h56
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/conf_board.h44
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/conf_clock.h50
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/conf_sleepmgr.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/conf_usart_serial.h46
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/conf_usb.h77
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/iar/usb_device_hid_mouse.ewd296
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/iar/usb_device_hid_mouse.ewp951
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/init.c137
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/joystick.h127
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/main.c234
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/main.h86
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/ui.c135
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/user_board.h104
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/module_config/conf_usb.h124
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/udi_hid_mouse.c332
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/udi_hid_mouse.h205
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/udi_hid_mouse_conf.h78
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/udi_hid_mouse_desc.c157
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/udi_hid.c162
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/udi_hid.h82
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/usb_protocol_hid.h333
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1100/conf_access.h186
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1100/conf_at45dbx.h73
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1100/conf_board.h44
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1100/conf_clock.h75
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1100/conf_sd_mmc_spi.h71
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1100/conf_sleepmgr.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1100/conf_spi_master.h58
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1100/conf_virtual_mem.h54
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1100/ui.c103
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1105/conf_access.h186
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1105/conf_at45dbx.h73
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1105/conf_board.h44
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1105/conf_clock.h75
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1105/conf_sd_mmc_spi.h71
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1105/conf_sleepmgr.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1105/conf_spi_master.h58
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1105/conf_virtual_mem.h54
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1105/ui.c103
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a3256_evk1104/conf_access.h186
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a3256_evk1104/conf_at45dbx.h73
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a3256_evk1104/conf_board.h44
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a3256_evk1104/conf_clock.h75
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a3256_evk1104/conf_sd_mmc_mci.h62
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a3256_evk1104/conf_sleepmgr.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a3256_evk1104/conf_spi_master.h58
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a3256_evk1104/conf_virtual_mem.h54
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a3256_evk1104/ui.c103
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3b0256_evk1101/conf_access.h186
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3b0256_evk1101/conf_at45dbx.h73
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3b0256_evk1101/conf_board.h44
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3b0256_evk1101/conf_clock.h75
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3b0256_evk1101/conf_sd_mmc_spi.h71
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3b0256_evk1101/conf_sleepmgr.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3b0256_evk1101/conf_spi_master.h58
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3b0256_evk1101/conf_virtual_mem.h54
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3b0256_evk1101/ui.c103
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3c0512_uc3c_ek/conf_access.h186
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3c0512_uc3c_ek/conf_at45dbx.h73
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3c0512_uc3c_ek/conf_board.h44
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3c0512_uc3c_ek/conf_clock.h82
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3c0512_uc3c_ek/conf_sd_mmc_spi.h71
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3c0512_uc3c_ek/conf_sleepmgr.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3c0512_uc3c_ek/conf_spi_master.h58
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3c0512_uc3c_ek/conf_virtual_mem.h54
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3c0512_uc3c_ek/ui.c104
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1_stk600-rc100x/conf_access.h186
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1_stk600-rc100x/conf_at45dbx.h78
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1_stk600-rc100x/conf_board.h44
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1_stk600-rc100x/conf_clock.h74
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1_stk600-rc100x/conf_sleepmgr.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1_stk600-rc100x/conf_spi_master.h41
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1_stk600-rc100x/conf_virtual_mem.h54
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1_stk600-rc100x/ui.c104
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1u_xplain_a1_mkii/conf_access.h186
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1u_xplain_a1_mkii/conf_at45dbx.h78
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1u_xplain_a1_mkii/conf_board.h44
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1u_xplain_a1_mkii/conf_clock.h74
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1u_xplain_a1_mkii/conf_sd_mmc_spi.h71
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1u_xplain_a1_mkii/conf_sleepmgr.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1u_xplain_a1_mkii/conf_spi_master.h41
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1u_xplain_a1_mkii/conf_usart_spi.h41
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1u_xplain_a1_mkii/conf_virtual_mem.h54
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1u_xplain_a1_mkii/ui.c105
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega256a3bu_stk600-rc064x/conf_access.h186
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega256a3bu_stk600-rc064x/conf_at45dbx.h78
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega256a3bu_stk600-rc064x/conf_board.h44
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega256a3bu_stk600-rc064x/conf_clock.h68
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega256a3bu_stk600-rc064x/conf_sleepmgr.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega256a3bu_stk600-rc064x/conf_spi_master.h41
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega256a3bu_stk600-rc064x/conf_virtual_mem.h54
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega256a3bu_stk600-rc064x/ui.c104
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/conf_usb.h132
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/main.c254
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/main.h78
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/ui.h58
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/module_config/conf_usb.h132
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/udi_msc.c1074
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/udi_msc.h163
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/udi_msc_conf.h73
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/udi_msc_desc.c182
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/sbc_protocol.h165
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/spc_protocol.h299
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/usb_protocol_msc.h138
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/atxmega128a1u_xplain_a1_mkii/conf_board.h41
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/atxmega128a1u_xplain_a1_mkii/conf_clock.h74
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/atxmega128a1u_xplain_a1_mkii/conf_sleepmgr.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/atxmega128a1u_xplain_a1_mkii/ui.c119
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/atxmega256a3bu_stk600-rc064x/conf_board.h41
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/atxmega256a3bu_stk600-rc064x/conf_clock.h68
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/atxmega256a3bu_stk600-rc064x/conf_sleepmgr.h43
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/atxmega256a3bu_stk600-rc064x/ui.c116
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/conf_usb.h143
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/main.c143
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/main.h74
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/ui.h61
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/module_config/conf_usb.h144
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/udi_phdc.c590
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/udi_phdc.h335
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/udi_phdc_conf.h82
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/udi_phdc_desc.c153
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/ieee11073-personal_health_devices/communication_model.c384
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/ieee11073-personal_health_devices/communication_model.h48
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/ieee11073-personal_health_devices/readme.txt15
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/usb_protocol_phdc.h201
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/drivers/usbb/asf.xml48
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/drivers/usbb/usbb_device.c1695
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/drivers/usbb/usbb_device.h575
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/drivers/usbb/usbb_otg.c99
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/drivers/usbb/usbb_otg.h245
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/drivers/usbc/asf.xml51
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/drivers/usbc/usbc_device.c1467
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/drivers/usbc/usbc_device.h577
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/drivers/usbc/usbc_otg.c96
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/drivers/usbc/usbc_otg.h228
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/media_mem/media_mem.c1165
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/media_mem/media_mem.h142
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/nandflash/nandflash_mem.c248
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/nandflash/nandflash_mem.h95
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/sdmmc/sdmmc_mci/sd_mmc_cmd.h160
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/sdmmc/sdmmc_mci/sd_mmc_mci.c1700
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/sdmmc/sdmmc_mci/sd_mmc_mci.h809
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/sdmmc/sdmmc_mci/sd_mmc_mci_mem.c593
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/sdmmc/sdmmc_mci/sd_mmc_mci_mem.h252
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/virtual_mem/virtual_mem.c259
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/virtual_mem/virtual_mem.h95
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/udc/udc.c1012
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/udc/udc.h248
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/udc/udc_desc.h126
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/udc/udd.h377
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/udc/udi.h117
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/usb_atmel.h150
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/usb_protocol.h403
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/utils/compiler.h1418
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/utils/fifo/enhc_fifo/fifo.c76
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/utils/fifo/enhc_fifo/fifo.h289
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/utils/interrupt.h120
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/utils/storage/ctrl_access/ctrl_access.c570
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/utils/storage/ctrl_access/ctrl_access.h367
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/FreeRTOSTask.h80
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/class/hid/hid.h551
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/class/hid/host_hid/host_hid.c314
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/class/hid/host_hid/host_hid.h213
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/class/mass_storage/scsi_decoder/scsi_decoder.c713
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/class/mass_storage/scsi_decoder/scsi_decoder.h619
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/compiler.h1263
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/enum/device/usb_device_task.c202
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/enum/device/usb_device_task.h112
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/enum/device/usb_standard_request.c755
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/enum/device/usb_standard_request.h126
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/enum/host/usb_host_enum.c616
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/enum/host/usb_host_enum.h384
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/enum/host/usb_host_task.c1171
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/enum/host/usb_host_task.h273
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/enum/usb_task.c723
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/enum/usb_task.h243
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/device_template_task.c232
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/device_template_task.h77
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/enum/conf_usb.h258
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/enum/device/usb_descriptors.c234
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/enum/device/usb_descriptors.h458
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/enum/device/usb_specific_request.c199
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/enum/device/usb_specific_request.h101
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/host_template_task.c307
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/host_template_task.h84
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/main.c289
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/readme.html36
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/usb_drv.c983
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/usb_drv.h1682
-rw-r--r--MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/usb_ids.h277
-rw-r--r--MakefileBasedBuild/app/.gitignore10
-rw-r--r--MakefileBasedBuild/app/ADK.c662
-rw-r--r--MakefileBasedBuild/app/ADK.h217
-rw-r--r--MakefileBasedBuild/app/Audio.c114
-rw-r--r--MakefileBasedBuild/app/Audio.h41
-rw-r--r--MakefileBasedBuild/app/BT.c1742
-rw-r--r--MakefileBasedBuild/app/BT.h84
-rw-r--r--MakefileBasedBuild/app/HCI.h359
-rw-r--r--MakefileBasedBuild/app/I2C.c602
-rw-r--r--MakefileBasedBuild/app/I2C.h40
-rw-r--r--MakefileBasedBuild/app/LEDgamma.h262
-rw-r--r--MakefileBasedBuild/app/LEDs.c176
-rw-r--r--MakefileBasedBuild/app/LEDs.h52
-rw-r--r--MakefileBasedBuild/app/Makefile198
-rw-r--r--MakefileBasedBuild/app/RTC.c99
-rw-r--r--MakefileBasedBuild/app/RTC.h27
-rw-r--r--MakefileBasedBuild/app/SD.c598
-rw-r--r--MakefileBasedBuild/app/SD.h29
-rw-r--r--MakefileBasedBuild/app/accel.c45
-rw-r--r--MakefileBasedBuild/app/accel.h28
-rw-r--r--MakefileBasedBuild/app/accessory.c397
-rw-r--r--MakefileBasedBuild/app/als.c45
-rw-r--r--MakefileBasedBuild/app/als.h27
-rw-r--r--MakefileBasedBuild/app/baro.c113
-rw-r--r--MakefileBasedBuild/app/baro.h33
-rw-r--r--MakefileBasedBuild/app/btA2DP.c1502
-rw-r--r--MakefileBasedBuild/app/btA2DP.h28
-rw-r--r--MakefileBasedBuild/app/btL2CAP.c692
-rw-r--r--MakefileBasedBuild/app/btL2CAP.h65
-rw-r--r--MakefileBasedBuild/app/btRFCOMM.c507
-rw-r--r--MakefileBasedBuild/app/btRFCOMM.h50
-rw-r--r--MakefileBasedBuild/app/btSDP.c747
-rw-r--r--MakefileBasedBuild/app/btSDP.h69
-rw-r--r--MakefileBasedBuild/app/capsense.c231
-rw-r--r--MakefileBasedBuild/app/capsense.h28
-rw-r--r--MakefileBasedBuild/app/compiler.h1250
-rw-r--r--MakefileBasedBuild/app/conf_usb.h49
-rw-r--r--MakefileBasedBuild/app/coop.c137
-rw-r--r--MakefileBasedBuild/app/coop.h31
-rw-r--r--MakefileBasedBuild/app/dbg.c47
-rw-r--r--MakefileBasedBuild/app/dbg.h27
-rw-r--r--MakefileBasedBuild/app/eliza.c412
-rw-r--r--MakefileBasedBuild/app/f_diskio.h80
-rw-r--r--MakefileBasedBuild/app/f_ff.c3988
-rw-r--r--MakefileBasedBuild/app/f_ff.h532
-rw-r--r--MakefileBasedBuild/app/f_ffconf.h193
-rw-r--r--MakefileBasedBuild/app/f_integer.h40
-rw-r--r--MakefileBasedBuild/app/f_sdDisk.c125
-rw-r--r--MakefileBasedBuild/app/fwk.c289
-rw-r--r--MakefileBasedBuild/app/fwk.h84
-rw-r--r--MakefileBasedBuild/app/gamma.py15
-rw-r--r--MakefileBasedBuild/app/hygro.c82
-rw-r--r--MakefileBasedBuild/app/hygro.h27
-rw-r--r--MakefileBasedBuild/app/mag.c44
-rw-r--r--MakefileBasedBuild/app/mag.h25
-rw-r--r--MakefileBasedBuild/app/main.c1614
-rw-r--r--MakefileBasedBuild/app/printf.c465
-rw-r--r--MakefileBasedBuild/app/printf.h36
-rw-r--r--MakefileBasedBuild/app/sgBuf.c183
-rw-r--r--MakefileBasedBuild/app/sgBuf.h67
-rw-r--r--MakefileBasedBuild/app/simpleOgg.c171
-rw-r--r--MakefileBasedBuild/app/simpleOgg.h32
-rw-r--r--MakefileBasedBuild/app/usb_drv.c593
-rw-r--r--MakefileBasedBuild/app/usb_drv.h1600
-rw-r--r--MakefileBasedBuild/app/usb_ids.h457
-rw-r--r--MakefileBasedBuild/app/usbh.c1217
-rw-r--r--MakefileBasedBuild/app/usbh.h98
-rw-r--r--MakefileBasedBuild/app/v_asm_arm.h260
-rw-r--r--MakefileBasedBuild/app/v_bitwise.c676
-rw-r--r--MakefileBasedBuild/app/v_codebook.c792
-rw-r--r--MakefileBasedBuild/app/v_codebook.h68
-rw-r--r--MakefileBasedBuild/app/v_codec_internal.h216
-rw-r--r--MakefileBasedBuild/app/v_config.h89
-rw-r--r--MakefileBasedBuild/app/v_config_types.h29
-rw-r--r--MakefileBasedBuild/app/v_dsp.c299
-rw-r--r--MakefileBasedBuild/app/v_floor0.c429
-rw-r--r--MakefileBasedBuild/app/v_floor1.c353
-rw-r--r--MakefileBasedBuild/app/v_floor_lookup.c93
-rw-r--r--MakefileBasedBuild/app/v_framing.c1118
-rw-r--r--MakefileBasedBuild/app/v_info.c349
-rw-r--r--MakefileBasedBuild/app/v_ivorbiscodec.h107
-rw-r--r--MakefileBasedBuild/app/v_ivorbisfile.h125
-rw-r--r--MakefileBasedBuild/app/v_lsp_lookup.h111
-rw-r--r--MakefileBasedBuild/app/v_mapping0.c242
-rw-r--r--MakefileBasedBuild/app/v_mdct.c487
-rw-r--r--MakefileBasedBuild/app/v_mdct.h62
-rw-r--r--MakefileBasedBuild/app/v_mdct_lookup.h543
-rw-r--r--MakefileBasedBuild/app/v_misc.c209
-rw-r--r--MakefileBasedBuild/app/v_misc.h196
-rw-r--r--MakefileBasedBuild/app/v_ogg.h209
-rw-r--r--MakefileBasedBuild/app/v_os.h65
-rw-r--r--MakefileBasedBuild/app/v_os_types.h140
-rw-r--r--MakefileBasedBuild/app/v_res012.c226
-rw-r--r--MakefileBasedBuild/app/v_vorbisfile.c1590
-rw-r--r--MakefileBasedBuild/app/v_window_lookup.h2090
1007 files changed, 243381 insertions, 0 deletions
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/build/gcc/Makefile b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/build/gcc/Makefile
new file mode 100644
index 0000000..38a2d3d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/build/gcc/Makefile
@@ -0,0 +1,109 @@
+# ----------------------------------------------------------------------------
+# ATMEL Microcontroller Software Support
+# ----------------------------------------------------------------------------
+# Copyright (c) 2011, Atmel Corporation
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# - Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the disclaimer below.
+#
+# Atmel's name may not be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+# DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# ----------------------------------------------------------------------------
+
+EXAMPLES = adc12 \
+ adc12_temp_sensor \
+ adc12_threshold_wakeup \
+ cm3_bit_banding \
+ cm3_nvic \
+ dac12_pdc_sinewave \
+ eefc_pgm \
+ eefc_uniqueid \
+ getting-started \
+ low_power \
+ periph_protect \
+ pio_alternate_function \
+ pmc_clock_switching \
+ pwm_pdc \
+ rtc \
+ rtt \
+ sdramc \
+ smc_psram \
+ spi_dma_dataflash \
+ spi_dma_slave \
+ ssc_dma_audio \
+ tc_capture_waveform \
+ twi_dma_eeprom \
+ twi_pdc_eeprom \
+ twi_slave \
+ twi_temp_sensor \
+ usart_hard_handshaking \
+ usart_irda \
+ usart_iso7816 \
+ usart_pdc_spi \
+ usart_rs485 \
+ usart_serial \
+ usart_synchronous \
+ wdg_irq
+
+EXAMPLES_FILESYSTEM = smc_nandflash_fatfs \
+ hsmci_multimedia_card_fatfs \
+ hsmci_sdcard_fatfs
+
+EXAMPLES_CAN = can
+
+EXAMPLES_ETH = emac \
+ emac_lwip \
+ emac_uip_helloworld \
+ emac_uip_telnetd \
+ emac_uip_webserver
+
+EXAMPLES_GRAPHICS = smc_lcd
+
+EXAMPLES_QTOUCH = qtouch
+
+EXAMPLES_STORAGE = hsmci_multimedia_card \
+ hsmci_sdcard \
+ smc_nandflash \
+ smc_norflash \
+
+EXAMPLES_USB_HOST = usb_host_hid
+
+all: libraries $(EXAMPLES) $(EXAMPLES_CAN) $(EXAMPLES_ETH) $(EXAMPLES_FILESYSTEM) $(EXAMPLES_GRAPHICS) $(EXAMPLES_QTOUCH) $(EXAMPLES_STORAGE)
+
+libraries:
+ (cd ../../libraries/build/gcc && "$(MAKE)" -f Makefile)
+
+define COMPILS
+$(1):
+ (cd ../../$(2)/$(1)/build/gcc && "$(MAKE)" -f Makefile clean all)
+endef
+
+
+$(foreach EXAMPLE, $(EXAMPLES), $(eval $(call COMPILS,$(EXAMPLE),examples)))
+$(foreach EXAMPLE, $(EXAMPLES_CAN), $(eval $(call COMPILS,$(EXAMPLE),examples_can)))
+$(foreach EXAMPLE, $(EXAMPLES_ETH), $(eval $(call COMPILS,$(EXAMPLE),examples_eth)))
+$(foreach EXAMPLE, $(EXAMPLES_FILESYSTEM), $(eval $(call COMPILS,$(EXAMPLE),examples_filesystem)))
+$(foreach EXAMPLE, $(EXAMPLES_GRAPHICS), $(eval $(call COMPILS,$(EXAMPLE),examples_graphics)))
+$(foreach EXAMPLE, $(EXAMPLES_QTOUCH), $(eval $(call COMPILS,$(EXAMPLE),examples_qtouch)))
+$(foreach EXAMPLE, $(EXAMPLES_STORAGE), $(eval $(call COMPILS,$(EXAMPLE),examples_storage)))
+#$(foreach EXAMPLE, $(EXAMPLES_USB_HOST), $(eval $(call COMPILS,$(EXAMPLE),examples_usb_host)))
+
+
+
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/build/gcc/Makefile b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/build/gcc/Makefile
new file mode 100644
index 0000000..a3d2d15
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/build/gcc/Makefile
@@ -0,0 +1,44 @@
+# ----------------------------------------------------------------------------
+# ATMEL Microcontroller Software Support
+# ----------------------------------------------------------------------------
+# Copyright (c) 2010, Atmel Corporation
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# - Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the disclaimer below.
+#
+# Atmel's name may not be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+# DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# ----------------------------------------------------------------------------
+
+all: libchip libboard liblwip libmemories libfatfs
+
+libchip:
+ (cd ../../libchip_sam3x/build/gcc && "$(MAKE)" -f Makefile all)
+
+libboard:
+ (cd ../../libboard_sam3x-ek/build/gcc && "$(MAKE)" -f Makefile all)
+
+libmemories:
+ (cd ../../memories/build/gcc && "$(MAKE)" -f Makefile all)
+
+liblwip:
+ (cd ../../liblwip/build/gcc && "$(MAKE)" -f Makefile all)
+
+libfatfs:
+ (cd ../../libfatfs/build/gcc && "$(MAKE)" -f Makefile all) \ No newline at end of file
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board.h
new file mode 100644
index 0000000..9f8629a
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board.h
@@ -0,0 +1,300 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \page sam3x_ek_board/board_desc SAM3X-EK - Board Description
+ *
+ * \section Purpose
+ *
+ * This file is dedicated to description of the SAM3X-EK board.
+ *
+ * \section Contents
+ *
+ * - For SAM3X-EK information, see \subpage sam3x_ek_board/board_info.
+ * - For operating frequency information, see \subpage sam3x_ek_opfreq.
+ * - For using portable PIO definitions, see \subpage sam3x_ek_piodef.
+ * - For on-board memories, see \subpage sam3x_ek_mem.
+ * - Several USB definitions are included here, see \subpage sam3x_ek_usb.
+ * - For External components, see \subpage sam3x_ek_extcomp.
+ * - For Individual chip definition, see \subpage sam3x_ek_chipdef.
+ *
+ * To get more software details and the full list of parameters related to the
+ * SAM3X-EK board configuration, please have a look at the source file:
+ * \ref board.h\n
+ *
+ * \section Usage
+ *
+ * - The code for booting the board is provided by board/board_cstartup_xxx.c and
+ * board/board_lowlevel.c.
+ * - For using board PIOs, board characteristics (clock, etc.) and external
+ * components, see board.h.
+ * - For manipulating memories, see board/board_memories.h.
+ *
+ * This file can be used as a template and modified to fit a custom board, with
+ * specific PIOs usage or memory connections.
+ */
+
+/**
+ * \file board.h
+ *
+ * Definition of SAM3X-EK characteristics, sam3x-dependant PIOs and
+ * external components interfacing.
+ */
+
+#ifndef _BOARD_
+#define _BOARD_
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "chip.h"
+
+#include "include/ads7843.h"
+#include "include/bitbanding.h"
+#include "include/bmp.h"
+#include "include/board_lowlevel.h"
+#include "include/board_memories.h"
+#include "include/dmad.h"
+#include "include/dma_hardware_interface.h"
+#include "include/spid_dma.h"
+#include "include/usart_spi.h"
+#include "include/at45d.h"
+#include "include/at45_spi.h"
+#include "include/hamming.h"
+#include "include/hx8347.h"
+#include "include/iso7816_4.h"
+#include "include/lcdd.h"
+#include "include/lcd_color.h"
+#include "include/lcd_font.h"
+#include "include/lcd_font10x14.h"
+#include "include/lcd_gimp_image.h"
+#include "include/led.h"
+#include "include/emacd.h"
+#include "include/macb.h"
+#include "include/math.h"
+#include "include/mii.h"
+#include "include/sn65hvd234.h" // CAN Transceiver
+#include "include/timetick.h"
+#include "include/tsd.h"
+#include "include/tsd_ads7843.h"
+#include "include/tsd_com.h"
+#include "include/uart_console.h"
+#include "include/wav.h"
+#include "include/xmodem.h"
+#include "include/twid.h"
+#include "include/wm8731.h"
+
+/**
+ * Libc porting layers
+ */
+#if defined ( __CC_ARM ) /* Keil µVision 4 */
+# include "include/rand.h"
+#elif defined ( __ICCARM__ ) /* IAR Ewarm 5.41+ */
+# include "include/rand.h"
+#elif defined ( __GNUC__ ) /* GCC CS3 2009q3-68/2010q1-188 */
+# include "include/syscalls.h" /** RedHat Newlib minimal stub */
+#endif
+
+/*----------------------------------------------------------------------------
+ * Definitions
+ *----------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------*/
+/**
+ * \page sam3x_ek_board/board_info "SAM3X-EK - Board informations"
+ * This page lists several definition related to the board description.
+ *
+ * \section Definitions
+ * - \ref BOARD_NAME
+ */
+
+/** Name of the board */
+#define BOARD_NAME "SAM3X-EK"
+/** Board definition */
+#define sam3xek
+/** Family definition (already defined) */
+#define sam3x
+/** Core definition */
+#define cortexm3
+
+//#define BOARD_REV_A
+#define BOARD_REV_B
+
+/*----------------------------------------------------------------------------*/
+/**
+ * \page sam3x_ek_opfreq "SAM3X-EK - Operating frequencies"
+ * This page lists several definition related to the board operating frequency
+ * (when using the initialization done by board/board_lowlevel.c).
+ *
+ * \section Definitions
+ * - \ref BOARD_MAINOSC
+ * - \ref BOARD_MCK
+ */
+
+/** Frequency of the board main oscillator */
+#define BOARD_MAINOSC 12000000
+
+/** Master clock frequency (when using board/board_lowlevel.c) */
+#define BOARD_MCK 84000000
+
+/*----------------------------------------------------------------------------*/
+/**
+ * \page sam3x_ek_piodef "SAM3X-EK - PIO definitions"
+ * This pages lists all the pio definitions contained in board.h. The constants
+ * are named using the following convention: PIN_* for a constant which defines
+ * a single Pin instance (but may include several PIOs sharing the same
+ * controller), and PINS_* for a list of Pin instances.
+ *
+ */
+
+#include "board/board_adc.h"
+
+#include "board/board_ebi.h"
+
+#include "board/board_leds.h"
+
+#include "board/board_buttons.h"
+
+#include "board/board_pwm.h"
+
+#include "board/board_spi.h"
+
+#include "board/board_ssc.h"
+
+#include "board/board_pck.h"
+
+#include "board/board_mci.h"
+
+#include "board/board_uart.h"
+
+#include "board/board_usart0.h"
+
+#include "board/board_usart1.h"
+
+#include "board/board_usart3.h"
+
+#include "board/board_usb.h"
+
+#include "board/board_can.h"
+
+#include "board/board_qtouch.h"
+
+#include "board/board_twi.h"
+/*----------------------------------------------------------------------------*/
+/**
+ * \page sam3x_ek_extcomp "SAM3X-EK - External components"
+ * This page lists the definitions related to external on-board components
+ * located in the board.h file for the SAM3X-EK.
+ *
+ */
+
+#include "board/board_lcd.h"
+
+#include "board/board_touchscreen.h"
+
+#include "board/board_emac.h"
+
+#include "board/board_sdcard.h"
+
+#include "board/board_smartcard.h"
+
+
+/*----------------------------------------------------------------------------*/
+/**
+ * \page sam3x_ek_mem "SAM3X-EK - Memories"
+ * This page lists definitions related to internal & external on-board memories.
+ *
+ *
+ */
+
+#include "board/board_nandflash.h"
+
+#include "board/board_sdram.h"
+
+#include "board/board_norflash.h"
+
+
+/*----------------------------------------------------------------------------*/
+/**
+ * \page sam3x_ek_chipdef "SAM3X-EK - Individual chip definition"
+ * This page lists the definitions related to different chip's definition
+ * located in the board.h file for the SAM3X-EK.
+ *
+ * \section USART
+ * - \ref BOARD_PIN_USART_RXD
+ * - \ref BOARD_PIN_USART_TXD
+ * - \ref BOARD_PIN_USART_CTS
+ * - \ref BOARD_PIN_USART_RTS
+ * - \ref BOARD_PIN_USART_EN
+ * - \ref BOARD_USART_BASE
+ * - \ref BOARD_ID_USART
+ */
+
+/** Rtc */
+#define BOARD_RTC_ID ID_RTC
+
+/** TWI ID for EEPROM application to use */
+#define BOARD_ID_TWI_EEPROM ID_TWI0
+/** TWI ID for SLAVE application to use */
+#define BOARD_ID_TWI_SLAVE ID_TWI0
+/** TWI Base for TWI EEPROM application to use */
+#define BOARD_BASE_TWI_EEPROM TWI0
+/** TWI Base for TWI SLAVE application to use */
+#define BOARD_BASE_TWI_SLAVE TWI0
+/** TWI pins for EEPROM application to use */
+#define BOARD_PINS_TWI_EEPROM PINS_TWI0
+/** TWI pins for TWI SLAVE application to use */
+#define BOARD_PINS_TWI_SLAVE PINS_TWI0
+
+/** USART RX pin for application */
+#define BOARD_PIN_USART_RXD PIN_USART0_RXD
+/** USART TX pin for application */
+#define BOARD_PIN_USART_TXD PIN_USART0_TXD
+/** USART CTS pin for application */
+#define BOARD_PIN_USART_CTS PIN_USART0_CTS
+/** USART RTS pin for application */
+#define BOARD_PIN_USART_RTS PIN_USART0_RTS
+/** USART ENABLE pin for application */
+#define BOARD_PIN_USART_EN PIN_USART0_EN
+/** USART Base for application */
+#define BOARD_USART_BASE USART0
+/** USART ID for application */
+#define BOARD_ID_USART ID_USART0
+/** USART1 Base for application */
+#define BOARD_USART1_BASE USART1
+/** USART1 ID for application */
+#define BOARD_ID_USART1 ID_USART1
+/** USART3 Base for application */
+#define BOARD_USART3_BASE USART3
+/** USART3 ID for application */
+#define BOARD_ID_USART3 ID_USART3
+
+#endif /* #ifndef _BOARD_ */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_adc.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_adc.h
new file mode 100644
index 0000000..9036bd3
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_adc.h
@@ -0,0 +1,18 @@
+#ifndef _BOARD_ADC_
+#define _BOARD_ADC_
+
+/**
+ * \file
+ * ADC
+ * - \ref PIN_ADC0_AD1
+ * - \ref PINS_ADC
+ *
+ */
+
+/** ADC_AD1 pin definition. */
+#define PIN_ADC0_AD1 {PIO_PA3X1_AD1_WKUP1, PIOA, ID_PIOA, PIO_INPUT, PIO_DEFAULT}
+
+/** Pins ADC */
+#define PINS_ADC PIN_ADC0_AD1
+
+#endif /* _BOARD_ADC_ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_buttons.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_buttons.h
new file mode 100644
index 0000000..45fddfb
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_buttons.h
@@ -0,0 +1,37 @@
+#ifndef _BOARD_BUTTONS_
+#define _BOARD_BUTTONS_
+
+/**
+ * \file
+ * Push buttons
+ * - \ref PIN_PB_LEFT_CLICK
+ * - \ref PIN_PB_RIGHT_CLICK
+ * - \ref PINS_PUSHBUTTONS
+ * - \ref PUSHBUTTON_BP1
+ * - \ref PUSHBUTTON_BP2
+ *
+ */
+
+// ----------------------------------------------------------------------------------------------------------
+// PUSHBUTTONS
+// checked - tvd
+// ----------------------------------------------------------------------------------------------------------
+/** Push button LEFT CLICK definition. Attributes = pull-up + debounce + interrupt on falling edge. */
+#define PIN_PB_LEFT_CLICK {PIO_PE7, PIOE, ID_PIOE, PIO_INPUT, PIO_PULLUP | PIO_DEBOUNCE | PIO_IT_FALL_EDGE}
+/** Push button RIGHT CLICK definition. Attributes = pull-up + debounce + interrupt on falling edge. */
+#define PIN_PB_RIGHT_CLICK {PIO_PB23, PIOB, ID_PIOB, PIO_INPUT, PIO_PULLUP | PIO_DEBOUNCE | PIO_IT_FALL_EDGE}
+
+/** List of all push button definitions. */
+#define PINS_PUSHBUTTONS PIN_PB_LEFT_CLICK, PIN_PB_RIGHT_CLICK
+
+/** Push button #1 index. */
+#define PUSHBUTTON_BP1 0
+/** Push button #2 index. */
+#define PUSHBUTTON_BP2 1
+
+/** Push button LEFT CLICK index. */
+#define PUSHBUTTON_LEFT 0
+/** Push button RIGHT CLICK index. */
+#define PUSHBUTTON_RIGHT 1
+
+#endif /* _BOARD_BUTTONS_ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_can.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_can.h
new file mode 100644
index 0000000..6192ee6
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_can.h
@@ -0,0 +1,55 @@
+#ifndef _BOARD_CAN_
+#define _BOARD_CAN_
+
+/**
+ * \file
+ * CAN
+ * \ref PIN_CAN0_TRANSCEIVER_RXEN
+ * \ref PIN_CAN0_TRANSCEIVER_RS
+ * \ref PIN_CAN0_TXD
+ * \ref PIN_CAN0_RXD
+ * \ref PINS_CAN0
+ *
+ * \ref PIN_CAN1_TRANSCEIVER_RXEN
+ * \ref PIN_CAN1_TRANSCEIVER_RS
+ * \ref PIN_CAN1_TXD
+ * \ref PIN_CAN1_RXD
+ * \ref PINS_CAN1
+ */
+
+// ----------------------------------------------------------------------------------------------------------
+// CAN
+// checked - tvd
+// ----------------------------------------------------------------------------------------------------------
+
+/** CAN0 RXEN: Select input for high speed mode or ultra low current sleep mode */
+#define PIN_CAN0_TRANSCEIVER_RXEN { PIO_PB21, PIOB, ID_PIOB, PIO_OUTPUT_1, PIO_DEFAULT }
+
+/** CAN0 RS: Select input for high speed mode or low-current standby mode */
+#define PIN_CAN0_TRANSCEIVER_RS { PIO_PB20, PIOB, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT }
+
+/** CAN0 TXD: Transmit data input */
+#define PIN_CAN0_TXD { PIO_PA0A_CANTX0, PIOA, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT }
+
+/** CAN0 RXD: Receive data output */
+#define PIN_CAN0_RXD { PIO_PA1A_CANRX0, PIOA, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT }
+
+/** List of all CAN0 definitions. */
+#define PINS_CAN0 PIN_CAN0_TXD, PIN_CAN0_RXD
+
+/** CAN1 RXEN: Select input for high speed mode or ultra low current sleep mode */
+#define PIN_CAN1_TRANSCEIVER_RXEN { PIO_PE16, PIOE, ID_PIOE, PIO_OUTPUT_1, PIO_DEFAULT }
+
+/** CAN1 RS: Select input for high speed mode or low-current standby mode */
+#define PIN_CAN1_TRANSCEIVER_RS { PIO_PE15, PIOE, ID_PIOE, PIO_OUTPUT_0, PIO_DEFAULT }
+
+/** CAN1 TXD: Transmit data input */
+#define PIN_CAN1_TXD { PIO_PB14A_CANTX1, PIOB, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT }
+
+/** CAN1 RXD: Receive data output */
+#define PIN_CAN1_RXD { PIO_PB15A_CANRX1, PIOB, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT }
+
+/** List of all CAN1 definitions. */
+#define PINS_CAN1 PIN_CAN1_TXD, PIN_CAN1_RXD
+
+#endif /* _BOARD_CAN_ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_ebi.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_ebi.h
new file mode 100644
index 0000000..9e5deff
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_ebi.h
@@ -0,0 +1,44 @@
+#ifndef _BOARD_EBI_
+#define _BOARD_EBI_
+
+/**
+ * \file
+ * EBI
+ * - \ref PIN_EBI_DATA_BUS
+ * - \ref PIN_EBI_NRD
+ * - \ref PIN_EBI_NWE
+ * - \ref PIN_EBI_NCS0
+ * - \ref PIN_EBI_PSRAM_ADDR_BUS
+ * - \ref PIN_EBI_PSRAM_NBS
+ * - \ref PIN_EBI_A1
+ * - \ref PIN_EBI_NCS1
+ * - \ref PIN_EBI_LCD_RS
+ *
+ */
+
+// ----------------------------------------------------------------------------------------------------------
+// EBI
+// ----------------------------------------------------------------------------------------------------------
+/** EBI Data Bus pins */
+#define PIN_EBI_DATA_BUS {0xFFFF << 2, PIOC, ID_PIOC, PIO_PERIPH_A, PIO_PULLUP}
+/** EBI NRD pin */
+#define PIN_EBI_NRD {PIO_PA29B_NRD, PIOA, ID_PIOA, PIO_PERIPH_B, PIO_PULLUP}
+/** EBI NWE pin */
+#define PIN_EBI_NWE {PIO_PC18A_NWR0_NWE, PIOC, ID_PIOC, PIO_PERIPH_A, PIO_PULLUP}
+/** EBI NCS0 pin */
+#define PIN_EBI_NCS0 {PIO_PA6B_NCS0, PIOA, ID_PIOA, PIO_PERIPH_B, PIO_PULLUP}
+/** EBI NCS1 pin */
+#define PIN_EBI_NCS1 {PIO_PA7B_NCS1, PIOA, ID_PIOA, PIO_PERIPH_B, PIO_PULLUP}
+/** EBI NCS2 pin */
+#define PIN_EBI_NCS2 {PIO_PB24B_NCS2, PIOB, ID_PIOB, PIO_PERIPH_B, PIO_PULLUP}
+/** EBI pins for PSRAM address bus */
+#define PIN_EBI_PSRAM_ADDR_BUS {0x3f00fff, PIOC, ID_PIOC, PIO_PERIPH_A, PIO_PULLUP}
+/** EBI pins for PSRAM NBS pins */
+#define PIN_EBI_PSRAM_NBS {1 << 7, PIOB, ID_PIOB, PIO_PERIPH_B, PIO_PULLUP}, \
+ {1 << 15, PIOC, ID_PIOC, PIO_PERIPH_A, PIO_PULLUP}
+/** EBI pin for LCD RS */
+#define PIN_EBI_LCD_RS {PIO_PC22, PIOC, ID_PIOC, PIO_PERIPH_A, PIO_PULLUP} /* LCD RS pin */
+
+
+
+#endif /* _BOARD_EBI_ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_emac.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_emac.h
new file mode 100644
index 0000000..af03b65
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_emac.h
@@ -0,0 +1,91 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+#ifndef _BOARD_EMAC_
+#define _BOARD_EMAC_
+
+/**
+ * \file
+ * EMAC
+ *
+ * - BOARD_EMAC_EREFCK
+ * - BOARD_EMAC_ETXEN
+ * - BOARD_EMAC_ETX0
+ * - BOARD_EMAC_ETX1
+ * - BOARD_EMAC_ECRSDV
+ * - BOARD_EMAC_ERX0
+ * - BOARD_EMAC_ERX1
+ * - BOARD_EMAC_ERXER
+ * - BOARD_EMAC_EMDC
+ * - BOARD_EMAC_EMDIO
+ *
+ * - BOARD_EMAC_PINS: One single define for all MACB pins
+ * - BOARD_EMAC_PHY_ADDR: Phy MAC address
+ * - BOARD_EMAC_MODE_RMII: Enable RMII connection with the PHY
+ */
+
+/** EMAC pin EREFCK */
+#define BOARD_EMAC_EREFCK {PIO_PB0, PIOB, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT}
+/** EMAC pin ETXEN */
+#define BOARD_EMAC_ETXEN {PIO_PB1A_ETXEN, PIOB, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT}
+/** EMAC pin ETX0 */
+#define BOARD_EMAC_ETX0 {PIO_PB2A_ETX0, PIOB, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT}
+/** EMAC pin ETX1 */
+#define BOARD_EMAC_ETX1 {PIO_PB3A_ETX1, PIOB, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT}
+/** EMAC pin ECRSDV */
+#define BOARD_EMAC_ECRSDV {PIO_PB4A_ECRSDV_ERXDV, PIOB, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT}
+/** EMAC pin ERX0 */
+#define BOARD_EMAC_ERX0 {PIO_PB5A_ERX0, PIOB, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT}
+/** EMAC pin ERX1 */
+#define BOARD_EMAC_ERX1 {PIO_PB6A_ERX1, PIOB, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT}
+/** EMAC pin ERXER */
+#define BOARD_EMAC_ERXER {PIO_PB7A_ERXER, PIOB, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT}
+/** EMAC pin EMDC */
+#define BOARD_EMAC_EMDC {PIO_PB8A_EMDC, PIOB, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT}
+/** EMAC pin EMDIO */
+#define BOARD_EMAC_EMDIO {PIO_PB9A_EMDIO, PIOB, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT}
+
+/** EMAC pins */
+#define BOARD_EMAC_PINS \
+ BOARD_EMAC_EREFCK, \
+ BOARD_EMAC_ETX0, \
+ BOARD_EMAC_ETX1, \
+ BOARD_EMAC_ETXEN, \
+ BOARD_EMAC_ECRSDV, \
+ BOARD_EMAC_ERX0, \
+ BOARD_EMAC_ERX1, \
+ BOARD_EMAC_ERXER, \
+ BOARD_EMAC_EMDC, \
+ BOARD_EMAC_EMDIO
+
+/** EMAC PHY address */
+#define BOARD_EMAC_PHY_ADDR 0
+/** EMAC RMII mode */
+#define BOARD_EMAC_MODE_RMII 1
+
+#endif /* _BOARD_EMAC_ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_lcd.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_lcd.h
new file mode 100644
index 0000000..a3e5ba1
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_lcd.h
@@ -0,0 +1,55 @@
+#ifndef _BOARD_LCD_
+#define _BOARD_LCD_
+
+/**
+ * \file
+ * LCD
+ *
+ * - \ref BOARD_LCD_PINS
+ * - \ref BOARD_BACKLIGHT_PIN
+ * - \ref BOARD_LCD_BASE
+ * - \ref BOARD_LCD_RS
+ * - \ref BOARD_LCD_WIDTH
+ * - \ref BOARD_LCD_HEIGHT
+ *
+ */
+
+/** LCD Base Address */
+#define BOARD_LCD_BASE 0x62000000
+/** LCD pins definition. */
+#define BOARD_LCD_PINS PIN_EBI_DATA_BUS, PIN_EBI_NRD, PIN_EBI_NWE, PIN_EBI_NCS2, PIN_EBI_LCD_RS
+/** Board chip select */
+#define BOARD_LCD_NCS 2
+/** Board LCD SMC setup timings */
+#define BOARD_TIMING_NS(ns) \
+ (((uint32_t) ((ns*(BOARD_MCK/1000000))/1000)) + 1)
+
+#define BOARD_LCD_SETUP \
+ SMC_SETUP_NWE_SETUP(BOARD_TIMING_NS(10)) | \
+ SMC_SETUP_NCS_WR_SETUP(BOARD_TIMING_NS(10)) | \
+ SMC_SETUP_NRD_SETUP(BOARD_TIMING_NS(90)) | \
+ SMC_SETUP_NCS_RD_SETUP(BOARD_TIMING_NS(90))
+/** Board LCD SMC pulse timings */
+#define BOARD_LCD_PULSE \
+ SMC_PULSE_NWE_PULSE(BOARD_TIMING_NS(35)) | \
+ SMC_PULSE_NCS_WR_PULSE(BOARD_TIMING_NS(35)) | \
+ SMC_PULSE_NRD_PULSE(BOARD_TIMING_NS(355)) | \
+ SMC_PULSE_NCS_RD_PULSE(BOARD_TIMING_NS(355))
+/** Board LCD SMC cycle timings */
+#define BOARD_LCD_CYCLE \
+ SMC_CYCLE_NWE_CYCLE(BOARD_TIMING_NS(100)) | \
+ SMC_CYCLE_NRD_CYCLE(BOARD_TIMING_NS(460))
+/** Board LCD SMC mode */
+#define BOARD_LCD_MODE \
+ SMC_MODE_WRITE_MODE | \
+ SMC_MODE_READ_MODE | \
+ SMC_MODE_DBW
+/** Display width in pixels. */
+#define BOARD_LCD_WIDTH 320
+/** Display height in pixels. */
+#define BOARD_LCD_HEIGHT 240
+
+/** Backlight pin definition. */
+#define BOARD_BACKLIGHT_PIN {PIO_PB27, PIOB, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT}
+
+#endif /* _BOARD_LCD_ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_leds.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_leds.h
new file mode 100644
index 0000000..b982b58
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_leds.h
@@ -0,0 +1,36 @@
+#ifndef _BOARD_LEDS_
+#define _BOARD_LEDS_
+
+/**
+ * \file
+ * LEDs
+ * - \ref PIN_USER_LED1
+ * - \ref PIN_USER_LED2
+ * - \ref PIN_USER_LED3
+ * - \ref PIN_POWER_LED
+ * - \ref PINS_LEDS
+ *
+ */
+
+// ----------------------------------------------------------------------------------------------------------
+// LEDS
+// checked - tvd jcb
+// ----------------------------------------------------------------------------------------------------------
+/** LED #0 pin definition (GREEN). D4 */
+#define PIN_USER_LED1 {PIO_PB13, PIOB, ID_PIOB, PIO_OUTPUT_1, PIO_DEFAULT}
+/** LED #1 pin definition (AMBER). D3 */
+#define PIN_USER_LED2 {PIO_PB12, PIOB, ID_PIOB, PIO_OUTPUT_1, PIO_DEFAULT}
+/** LED #1 pin definition (BLUE). D2 */
+#define PIN_USER_LED3 {PIO_PA12, PIOA, ID_PIOA, PIO_OUTPUT_1, PIO_DEFAULT}
+/** LED #2 pin definition (RED). D5 */
+#define PIN_POWER_LED {PIO_PA13, PIOA, ID_PIOA, PIO_OUTPUT_1, PIO_DEFAULT}
+
+#define LED_GREEN 0
+#define LED_AMBER 1
+#define LED_BLUE 2
+#define LED_RED 3
+
+/** List of all LEDs definitions. */
+#define PINS_LEDS PIN_USER_LED1, PIN_USER_LED2, PIN_USER_LED3, PIN_POWER_LED
+
+#endif /* _BOARD_LEDS_ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_mci.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_mci.h
new file mode 100644
index 0000000..fb7e869
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_mci.h
@@ -0,0 +1,25 @@
+#ifndef _BOARD_MCI_
+#define _BOARD_MCI_
+
+/**
+ * \file
+ * MCI
+ * - \ref PINS_MCI
+ *
+ */
+
+// ----------------------------------------------------------------------------------------------------------
+// MCI
+// ----------------------------------------------------------------------------------------------------------
+/** MCI pins definition. */
+#define PINS_MCI { PIO_PA20A_MCCDA | PIO_PA19A_MCCK | PIO_PA21A_MCDA0\
+ | PIO_PA22A_MCDA1 | PIO_PA23A_MCDA2 | PIO_PA24A_MCDA3, PIOA, ID_PIOA, PIO_PERIPH_A, PIO_PULLUP },\
+ { PIO_PD0B_MCDA4 | PIO_PD1B_MCDA5 | PIO_PD2B_MCDA6 | PIO_PD3B_MCDA7,\
+ PIOD, ID_PIOD, PIO_PERIPH_B, PIO_PULLUP},\
+ { PIO_PE20B_MCCDB | PIO_PE22B_MCDB0 | PIO_PE24B_MCDB1 | PIO_PE26B_MCDB2 | PIO_PE27B_MCDB3,\
+ PIOE, ID_PIOE, PIO_PERIPH_B, PIO_PULLUP }
+///** MCI pin Card Detect. */
+#define PIN_MCI_CD {PIO_PE6, PIOE, ID_PIOE, PIO_INPUT, PIO_PULLUP}
+
+
+#endif /* _BOARD_MCI_ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_nandflash.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_nandflash.h
new file mode 100644
index 0000000..cb7515c
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_nandflash.h
@@ -0,0 +1,71 @@
+#ifndef _BOARD_NANDFLASH_
+#define _BOARD_NANDFLASH_
+
+/**
+ * \file
+ * NandFlash
+ * - \ref PIN_EBI_NANDOE
+ * - \ref PIN_EBI_NANDWE
+ * - \ref PIN_EBI_NANDCLE
+ * - \ref PIN_EBI_NANDALE
+ * - \ref PIN_EBI_NANDIO
+ * - \ref BOARD_NF_CE_PIN
+ * - \ref BOARD_NF_RB_PIN
+ * - \ref PINS_NANDFLASH
+ *
+ */
+
+// ----------------------------------------------------------------------------------------------------------
+// NAND FLASH
+// checked - tvd
+// ----------------------------------------------------------------------------------------------------------
+/** NandFlash pins definition: OE. */
+#define PIN_EBI_NANDOE {PIO_PC19A_NANDOE, PIOC, ID_PIOC, PIO_PERIPH_A, PIO_PULLUP}
+/** NandFlash pins definition: WE. */
+#define PIN_EBI_NANDWE {PIO_PC20A_NANDWE, PIOC, ID_PIOC, PIO_PERIPH_A, PIO_PULLUP}
+/** NandFlash pins definition: CLE. */
+#define PIN_EBI_NANDCLE {PIO_PD9A_A22_NANDCLE, PIOD, ID_PIOD, PIO_PERIPH_A, PIO_PULLUP}
+/** NandFlash pins definition: ALE. */
+#define PIN_EBI_NANDALE {PIO_PD8A_A21_NANDALE, PIOD, ID_PIOD, PIO_PERIPH_A, PIO_PULLUP}
+/** NandFlash pins definition: DATA. */
+#define PIN_EBI_NANDIO {0x0000FFFF, PIOC, ID_PIOC, PIO_PERIPH_A, PIO_PULLUP}
+
+#if defined(CHIP_NAND_CTRL)
+/** NFC chip select ID definition */
+#define BOARD_NF_CSID NFCADDR_CMD_CSID_0
+/** Nandflash chip enable pin definition. */
+#define BOARD_NF_CE_PIN {PIO_PA6B_NCS0, PIOA, ID_PIOA, PIO_PERIPH_B, PIO_PULLUP}
+/** Nandflash ready/busy pin definition. */
+#define BOARD_NF_RB_PIN {PIO_PA2B_NANDRDY, PIOA, ID_PIOA, PIO_PERIPH_B, PIO_PULLUP}
+#else
+/** Nandflash chip enable pin definition. */
+#define BOARD_NF_CE_PIN {PIO_PA6B_NCS0, PIOA, ID_PIOA, PIO_OUTPUT_1, PIO_DEFAULT}
+/** Nandflash ready/busy pin definition. */
+#define BOARD_NF_RB_PIN {PIO_PA2B_NANDRDY, PIOA, ID_PIOA, PIO_INPUT, PIO_PULLUP}
+#endif
+
+/** Nandflash controller peripheral pins definition. */
+#define PINS_NANDFLASH PIN_EBI_NANDIO, BOARD_NF_CE_PIN, BOARD_NF_RB_PIN, PIN_EBI_NANDOE, \
+ PIN_EBI_NANDWE, PIN_EBI_NANDCLE, PIN_EBI_NANDALE
+
+/*
+ * \addtopage sam3x_ek_mem
+ * \section NandFlash
+ * - \ref BOARD_NF_COMMAND_ADDR
+ * - \ref BOARD_NF_ADDRESS_ADDR
+ * - \ref BOARD_NF_DATA_ADDR
+ *
+ */
+
+// ----------------------------------------------------------------------------------------------------------
+// NAND FLASH
+// ----------------------------------------------------------------------------------------------------------
+/** Address for transferring command bytes to the nandflash. */
+#define BOARD_NF_COMMAND_ADDR 0x60400000
+/** Address for transferring address bytes to the nandflash. */
+#define BOARD_NF_ADDRESS_ADDR 0x60200000
+/** Address for transferring data bytes to the nandflash. */
+#define BOARD_NF_DATA_ADDR 0x60000000
+
+
+#endif /* _BOARD_NANDFLASH_ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_norflash.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_norflash.h
new file mode 100644
index 0000000..2308fd2
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_norflash.h
@@ -0,0 +1,17 @@
+#ifndef _BOARD_NORFLASH_
+#define _BOARD_NORFLASH_
+
+/**
+ * \file
+ * \section NorFlash
+ * - \ref BOARD_NORFLASH_ADDR
+ *
+ */
+
+// ----------------------------------------------------------------------------------------------------------
+// NOR FLASH
+// ----------------------------------------------------------------------------------------------------------
+/** Address for transfering command bytes to the norflash. */
+#define BOARD_NORFLASH_ADDR 0x60000000
+
+#endif /* _BOARD_NORFLASH_ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_pck.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_pck.h
new file mode 100644
index 0000000..8f89adb
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_pck.h
@@ -0,0 +1,20 @@
+#ifndef _BOARD_PCK_
+#define _BOARD_PCK_
+
+/**
+ * \file
+ * PCK0
+ * - \ref PIN_PCK0
+ *
+ */
+
+// ----------------------------------------------------------------------------------------------------------
+// PCK
+// checked - tvd
+// ----------------------------------------------------------------------------------------------------------
+/** PCK0 */
+#define PIN_PCK0 {PIO_PB22B_PCK0, PIOB, ID_PIOB, PIO_PERIPH_B, PIO_DEFAULT}
+
+
+
+#endif /* _BOARD_PCK_ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_pwm.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_pwm.h
new file mode 100644
index 0000000..984e71f
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_pwm.h
@@ -0,0 +1,56 @@
+#ifndef _BOARD_PWM_
+#define _BOARD_PWM_
+
+/**
+ * \file
+ * PWMC
+ * - \ref PIN_PWMC_PWMH0
+ * - \ref PIN_PWMC_PWML0
+ * - \ref PIN_PWMC_PWMH1
+ * - \ref PIN_PWMC_PWML1
+ * - \ref PIN_PWMC_PWMH2
+ * - \ref PIN_PWMC_PWML2
+ * - \ref PIN_PWMC_PWMH3
+ * - \ref PIN_PWMC_PWML3
+ * - \ref PIN_PWM_LED0
+ * - \ref PIN_PWM_LED1
+ * - \ref PIN_PWM_LED2
+ * - \ref CHANNEL_PWM_LED0
+ * - \ref CHANNEL_PWM_LED1
+ * - \ref CHANNEL_PWM_LED2
+ *
+ */
+
+// ----------------------------------------------------------------------------------------------------------
+// PWM
+// ----------------------------------------------------------------------------------------------------------
+/** PWMC PWM0 pin definition: Output High. */
+#define PIN_PWMC_PWMH0 {PIO_PB12B_PWMH0, PIOB, ID_PIOB, PIO_PERIPH_B, PIO_DEFAULT}
+/** PWMC PWM0 pin definition: Output Low. */
+#define PIN_PWMC_PWML0 {PIO_PA21B_PWML0, PIOA, ID_PIOA, PIO_PERIPH_B, PIO_DEFAULT}
+/** PWMC PWM1 pin definition: Output High. */
+#define PIN_PWMC_PWMH1 {PIO_PB13B_PWMH1, PIOB, ID_PIOB, PIO_PERIPH_B, PIO_DEFAULT}
+/** PWMC PWM1 pin definition: Output Low. */
+#define PIN_PWMC_PWML1 {PIO_PB17B_PWML1, PIOB, ID_PIOB, PIO_PERIPH_B, PIO_DEFAULT}
+/** PWMC PWM2 pin definition: Output High. */
+#define PIN_PWMC_PWMH2 {PIO_PA13B_PWMH2, PIOA, ID_PIOA, PIO_PERIPH_B, PIO_DEFAULT}
+/** PWMC PWM2 pin definition: Output Low. */
+#define PIN_PWMC_PWML2 {PIO_PA20B_PWML2, PIOA, ID_PIOA, PIO_PERIPH_B, PIO_DEFAULT}
+/** PWMC PWM3 pin definition: Output High. */
+#define PIN_PWMC_PWMH3 {PIO_PA9B_PWMH3, PIOA, ID_PIOA, PIO_PERIPH_B, PIO_DEFAULT}
+/** PWMC PWM3 pin definition: Output Low. */
+#define PIN_PWMC_PWML3 {PIO_PC8B_PWML3, PIOC, ID_PIOC, PIO_PERIPH_B, PIO_DEFAULT}
+/** PWM pins definition for LED0 */
+#define PIN_PWM_LED0 PIN_PWMC_PWMH0, PIN_PWMC_PWML0
+/** PWM pins definition for LED1 */
+#define PIN_PWM_LED1 PIN_PWMC_PWMH1, PIN_PWMC_PWML1
+/** PWM pins definition for LED2 */
+#define PIN_PWM_LED2 PIN_PWMC_PWMH2, PIN_PWMC_PWML2
+/** PWM channel for LED0 */
+#define CHANNEL_PWM_LED0 0
+/** PWM channel for LED1 */
+#define CHANNEL_PWM_LED1 1
+/** PWM channel for LED2 */
+#define CHANNEL_PWM_LED2 2
+
+#endif /* _BOARD_PWM_ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_qtouch.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_qtouch.h
new file mode 100644
index 0000000..291ef8f
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_qtouch.h
@@ -0,0 +1,44 @@
+#ifndef _BOARD_QTOUCH_
+#define _BOARD_QTOUCH_
+
+/**
+ * \file
+ * QTouch
+ * PIO definitions for Slider
+ * \ref SLIDER_IOMASK_SNS
+ * \ref SLIDER_IOMASK_SNSK
+ * \ref PINS_SLIDER_SNS
+ * \ref PINS_SLIDER_SNSK
+ *
+ * PIO definitions for keys
+ * \ref KEY_IOMASK_SNS
+ * \ref KEY_IOMASK_SNSK
+ * \ref PINS_KEY_SNS
+ * \ref PINS_KEY_SNSK
+ *
+ * PIOS for QTouch
+ * \ref PINS_QTOUCH
+ *
+ */
+
+// ----------------------------------------------------------------------------------------------------------
+// QTOUCH
+// checked - odi
+// ----------------------------------------------------------------------------------------------------------
+/** PIO definitions for Slider */
+#define SLIDER_IOMASK_SNS (uint32_t)(PIO_PF0 | PIO_PF2 | PIO_PF4)
+#define SLIDER_IOMASK_SNSK (uint32_t)(PIO_PF1 | PIO_PF3 | PIO_PF5)
+#define PINS_SLIDER_SNS {SLIDER_IOMASK_SNS, PIOF, ID_PIOF, PIO_INPUT, PIO_DEFAULT}
+#define PINS_SLIDER_SNSK {SLIDER_IOMASK_SNSK, PIOF, ID_PIOF, PIO_INPUT, PIO_DEFAULT}
+
+/** PIO definitions for keys */
+#define KEY_IOMASK_SNS (uint32_t)(PIO_PE21 | PIO_PE27 | PIO_PE25 | PIO_PE19 | PIO_PE23)
+#define KEY_IOMASK_SNSK (uint32_t)(PIO_PE20 | PIO_PE26 | PIO_PE24 | PIO_PE18 | PIO_PE22)
+#define PINS_KEY_SNS {KEY_IOMASK_SNS, PIOE, ID_PIOE, PIO_INPUT, PIO_DEFAULT}
+#define PINS_KEY_SNSK {KEY_IOMASK_SNSK, PIOE, ID_PIOE, PIO_INPUT, PIO_DEFAULT}
+
+/** PIOS for QTouch */
+#define PINS_QTOUCH PINS_SLIDER_SNS, PINS_SLIDER_SNSK, PINS_KEY_SNS, PINS_KEY_SNSK
+
+
+#endif /* _BOARD_QTOUCH_ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_sdcard.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_sdcard.h
new file mode 100644
index 0000000..6829440
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_sdcard.h
@@ -0,0 +1,19 @@
+#ifndef _BOARD_SDCARD_
+#define _BOARD_SDCARD_
+
+/**
+ * \file
+ * SD Card
+ * - \ref BOARD_SD_PINS
+ * - \ref BOARD_SD_PIN_CD
+ *
+ */
+
+/** MCI pins that shall be configured to access the SD card. */
+#define BOARD_SD_PINS PINS_MCI
+/** MCI Card Detect pin. */
+#define BOARD_SD_PIN_CD PIN_MCI_CD
+/** Total number of MCI interface */
+#define BOARD_NUM_MCI 1
+
+#endif /* _BOARD_SDCARD_ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_sdram.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_sdram.h
new file mode 100644
index 0000000..8c9375f
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_sdram.h
@@ -0,0 +1,61 @@
+#ifndef _BOARD_SDRAM_
+#define _BOARD_SDRAM_
+
+/**
+ * \file
+ * \section SDRAM
+ * - \ref BOARD_SDRAM_SIZE
+ * - \ref PIN_SDRAM
+ * - \ref BOARD_SDRAM_BUSWIDTH
+ *
+ */
+
+// ----------------------------------------------------------------------------------------------------------
+// SDRAM
+// ----------------------------------------------------------------------------------------------------------
+/** Board SDRAM size for MT48LC16M16A2 */
+#define BOARD_SDRAM_SIZE (32*1024*1024) // 32 MB
+
+/** List of all SDRAM pins definitions */
+#define PIO_SDRAM_SDCKE PIO_PD13
+#define PIO_SDRAM_SDCS PIO_PD12
+#define PIO_SDRAM_RAS PIO_PD15
+#define PIO_SDRAM_CAS PIO_PD16
+#define PIO_SDRAM_BA0 PIO_PD6
+#define PIO_SDRAM_BA1 PIO_PD7
+#define PIO_SDRAM_SDWE PIO_PD14
+#define PIO_SDRAM_NBS0 PIO_PC21
+#define PIO_SDRAM_NBS1 PIO_PD10
+#define PIO_SDRAM_DATA (0xffff << 2) //PIO_PC2--PIO_PC17
+#define PIO_SDRAM_SDA0_A7 (0xff << 23) //PIO_PC23--PIO_PC30
+#define PIO_SDRAM_SDA8 PIO_PD22
+#define PIO_SDRAM_SDA9 PIO_PD23
+#define PIO_SDRAM_SDA11 PIO_PD25
+#define PIO_SDRAM_SDA12 PIO_PD4
+#define PIO_SDRAM_SDA10 PIO_PD11
+
+/** List of all SDRAM pins definitions */
+#define PINS_SDRAM_PIOC { PIO_SDRAM_DATA | PIO_SDRAM_NBS0 | PIO_SDRAM_SDA0_A7, \
+ PIOC, ID_PIOC, PIO_PERIPH_A, PIO_PULLUP }
+
+#define PINS_SDRAM_PIOD { PIO_SDRAM_SDCKE | PIO_SDRAM_SDCS | \
+ PIO_SDRAM_RAS | PIO_SDRAM_CAS | \
+ PIO_SDRAM_BA0 | PIO_SDRAM_BA1 | \
+ PIO_SDRAM_SDWE | PIO_SDRAM_NBS1 | \
+ PIO_SDRAM_SDA10 | \
+ PIO_SDRAM_SDA8 | PIO_SDRAM_SDA9 | \
+ PIO_SDRAM_SDA11 | PIO_SDRAM_SDA12, \
+ PIOD, ID_PIOD, PIO_PERIPH_A, PIO_PULLUP }
+
+/* PIO18 is used as SDRAM Enable on EK-REVB board */
+#define PINS_SDRAM_EN { (1<<18), PIOD, ID_PIOD, PIO_OUTPUT_1, PIO_DEFAULT }
+
+#define PINS_SDRAM PINS_SDRAM_PIOC,PINS_SDRAM_PIOD,PINS_SDRAM_EN
+
+/** SDRAM bus width */
+#define BOARD_SDRAM_BUSWIDTH 16
+
+/* SDRAMC clock speed */
+#define SDRAMC_CLK (BOARD_MCK)
+
+#endif /* _BOARD_SDRAM_ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_smartcard.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_smartcard.h
new file mode 100644
index 0000000..4b32bcb
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_smartcard.h
@@ -0,0 +1,24 @@
+#ifndef _BOARD_SMARTCARD_
+#define _BOARD_SMARTCARD_
+
+/**
+ * \file
+ * SmartCard
+ * - \ref SMARTCARD_CONNECT_PIN
+ * - \ref PIN_ISO7816_RSTMC
+ * - \ref PINS_ISO7816
+ *
+ */
+
+// ----------------------------------------------------------------------------------------------------------
+// SMARTCARD
+// ----------------------------------------------------------------------------------------------------------
+/// Smartcard detection pin
+//#define SMARTCARD_CONNECT_PIN {1 << 13, PIOA, ID_PIOA, PIO_INPUT, PIO_DEFAULT}
+
+/// PIN used for reset the smartcard
+#define PIN_ISO7816_RSTMC {1 << 11, PIOA, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT}
+/// Pins used for connect the smartcard
+#define PINS_ISO7816 PIN_USART1_TXD, PIN_USART1_SCK, PIN_ISO7816_RSTMC
+
+#endif /* _BOARD_SMARTCARD_ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_spi.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_spi.h
new file mode 100644
index 0000000..c3bfcf0
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_spi.h
@@ -0,0 +1,47 @@
+#ifndef _BOARD_SPI_
+#define _BOARD_SPI_
+
+/**
+ * \file
+ * SPI
+ * - \ref PIN_SPI_MISO
+ * - \ref PIN_SPI_MOSI
+ * - \ref PIN_SPI_SPCK
+ * - \ref PINS_SPI
+ * - \ref PIN_SPI_NPCS0
+ * - \ref PIN_SPI1_MISO
+ * - \ref PIN_SPI1_MOSI
+ * - \ref PIN_SPI1_SPCK
+ * - \ref PINS_SPI1
+ * - \ref PIN_SPI1_NPCS0
+ *
+ */
+
+// ----------------------------------------------------------------------------------------------------------
+// SPI
+// checked - tvd
+// ----------------------------------------------------------------------------------------------------------
+/** SPI MISO pin definition. */
+#define PIN_SPI0_MISO {PIO_PA25A_SPI0_MISO, PIOA, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
+/** SPI MOSI pin definition. */
+#define PIN_SPI0_MOSI {PIO_PA26A_SPI0_MOSI, PIOA, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
+/** SPI SPCK pin definition. */
+#define PIN_SPI0_SPCK {PIO_PA27A_SPI0_SPCK, PIOA, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
+/** SPI chip select pin definition. */
+#define PIN_SPI0_NPCS0 {PIO_PA28A_SPI0_NPCS0, PIOA, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
+/** List of SPI pin definitions (MISO, MOSI & SPCK). */
+#define PINS_SPI0 PIN_SPI0_MISO, PIN_SPI0_MOSI, PIN_SPI0_SPCK
+
+/** SPI1 MISO pin definition. */
+#define PIN_SPI1_MISO {PIO_PE28A_SPI1_MISO, PIOE, ID_PIOE, PIO_PERIPH_A, PIO_DEFAULT}
+/** SPI1 MOSI pin definition. */
+#define PIN_SPI1_MOSI {PIO_PE29A_SPI1_MOSI, PIOE, ID_PIOE, PIO_PERIPH_A, PIO_DEFAULT}
+/** SPI1 SPCK pin definition. */
+#define PIN_SPI1_SPCK {PIO_PE30A_SPI1_SPCK, PIOE, ID_PIOE, PIO_PERIPH_A, PIO_DEFAULT}
+/** SPI1 chip select pin definition. */
+#define PIN_SPI1_NPCS0 {PIO_PE31A_SPI1_NPCS0, PIOE, ID_PIOE, PIO_PERIPH_A, PIO_DEFAULT}
+/** List of SPI1 pin definitions (MISO, MOSI & SPCK). */
+#define PINS_SPI1 PIN_SPI1_MISO, PIN_SPI1_MOSI, PIN_SPI1_SPCK
+
+
+#endif /* _BOARD_SPI_ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_ssc.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_ssc.h
new file mode 100644
index 0000000..a953bef
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_ssc.h
@@ -0,0 +1,35 @@
+#ifndef _BOARD_SSC_
+#define _BOARD_SSC_
+
+/**
+ * \file
+ * SSC
+ * - \ref PIN_SSC_TD
+ * - \ref PIN_SSC_TK
+ * - \ref PIN_SSC_TF
+ * - \ref PINS_SSC_CODEC
+ *
+ */
+
+// ----------------------------------------------------------------------------------------------------------
+// SSC
+// checked - tvd
+// ----------------------------------------------------------------------------------------------------------
+/** SSC pin Transmitter Data (TD) */
+#define PIN_SSC_TD {PIO_PA16B_TD, PIOA, ID_PIOA, PIO_PERIPH_B, PIO_DEFAULT}
+/** SSC pin Transmitter Clock (TK) */
+#define PIN_SSC_TK {PIO_PA14B_TK, PIOA, ID_PIOA, PIO_PERIPH_B, PIO_DEFAULT}
+/** SSC pin Transmitter FrameSync (TF) */
+#define PIN_SSC_TF {PIO_PA15B_TF, PIOA, ID_PIOA, PIO_PERIPH_B, PIO_DEFAULT}
+
+/** SSC pin Receiver Data (RD) */
+#define PIN_SSC_RD {PIO_PB18A_RD, PIOB, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT}
+/** SSC pin Receiver Clock (RK) */
+#define PIN_SSC_RK {PIO_PB19A_RK, PIOB, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT}
+/** SSC pin Receiver FrameSync (RF) */
+#define PIN_SSC_RF {PIO_PB17A_RF, PIOB, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT}
+
+/** SSC pins definition for codec. */
+#define PINS_SSC_CODEC PIN_SSC_TD, PIN_SSC_TK, PIN_SSC_TF, PIN_SSC_RD, PIN_SSC_RK, PIN_SSC_RF
+
+#endif /* _BOARD_SSC_ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_touchscreen.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_touchscreen.h
new file mode 100644
index 0000000..65fee13
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_touchscreen.h
@@ -0,0 +1,39 @@
+#ifndef _BOARD_TOUCHSCREEN_
+#define _BOARD_TOUCHSCREEN_
+
+/**
+ * \file
+ * TouchScreen
+ *
+ * - \ref PIN_TSC_IRQ
+ * - \ref PIN_TSC_BUSY
+ * - \ref BOARD_TSC_SPI_BASE
+ * - \ref BOARD_TSC_SPI_ID
+ * - \ref BOARD_TSC_SPI_PINS
+ * - \ref BOARD_TSC_NPCS
+ * - \ref BOARD_TSC_NPCS_PIN
+ *
+ */
+
+// ----------------------------------------------------------------------------------------------------------
+// Touchscreen
+// checked - tvd
+// ----------------------------------------------------------------------------------------------------------
+/** Touchscreen controller IRQ pin definition. */
+#define PIN_TSC_IRQ {PIO_PA31, PIOA, ID_PIOA, PIO_INPUT, PIO_PULLUP}
+/** Touchscreen controller Busy pin definition. */
+#define PIN_TSC_BUSY {PIO_PA30, PIOA, ID_PIOA, PIO_INPUT, PIO_PULLUP}
+
+/** Base address of SPI peripheral connected to the touchscreen controller. */
+#define BOARD_TSC_SPI_BASE SPI0
+/** Identifier of SPI peripheral connected to the touchscreen controller. */
+#define BOARD_TSC_SPI_ID ID_SPI0
+/** Pins of the SPI peripheral connected to the touchscreen controller. */
+#define BOARD_TSC_SPI_PINS PINS_SPI0
+/** Chip select connected to the touchscreen controller. */
+#define BOARD_TSC_NPCS 0
+/** Chip select pin connected to the touchscreen controller. */
+/* We use PIO mode for chip select to meet ADS7843's timing specification */
+#define BOARD_TSC_NPCS_PIN {PIO_PA28A_SPI0_NPCS0, PIOA, ID_PIOA, PIO_OUTPUT_1, PIO_PULLUP}
+
+#endif /* _BOARD_TOUCHSCREEN_ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_twi.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_twi.h
new file mode 100644
index 0000000..ef7c503
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_twi.h
@@ -0,0 +1,36 @@
+#ifndef _BOARD_TWI_
+#define _BOARD_TWI_
+
+/**
+ * \file
+ * TWI
+ * - \ref PIN_TWI_TWD0
+ * - \ref PIN_TWI_TWCK0
+ * - \ref PINS_TWI0
+ * - \ref PIN_TWI_TWD1
+ * - \ref PIN_TWI_TWCK1
+ * - \ref PINS_TWI1
+ *
+ */
+
+// ----------------------------------------------------------------------------------------------------------
+// TWI
+// checked - tvd
+// ----------------------------------------------------------------------------------------------------------
+/** TWI0 data pin */
+#define PIN_TWI_TWD0 {PIO_PA17A_TWD0, PIOA, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
+/** TWI0 clock pin */
+#define PIN_TWI_TWCK0 {PIO_PA18A_TWCK0, PIOA, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
+/** TWI0 pins */
+#define PINS_TWI0 PIN_TWI_TWD0, PIN_TWI_TWCK0
+
+/** TWI1 data pin */
+#define PIN_TWI_TWD1 {PIO_PB12A_TWD1, PIOB, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT}
+/** TWI1 clock pin */
+#define PIN_TWI_TWCK1 {PIO_PB13A_TWCK1, PIOB, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT}
+/** TWI1 pins */
+#define PINS_TWI1 PIN_TWI_TWD1, PIN_TWI_TWCK1
+
+
+
+#endif /* _BOARD_TWI_ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_uart.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_uart.h
new file mode 100644
index 0000000..809abd9
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_uart.h
@@ -0,0 +1,20 @@
+#ifndef _BOARD_UART_
+#define _BOARD_UART_
+
+/**
+ * \file
+ * UART
+ * - \ref PINS_UART
+ *
+ */
+
+// ----------------------------------------------------------------------------------------------------------
+// UART
+// checked - tvd
+// ----------------------------------------------------------------------------------------------------------
+/** UART pins (UTXD0 and URXD0) definitions, PA8,9. */
+#define PINS_UART { PIO_PA8A_URXD|PIO_PA9A_UTXD, PIOA, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
+
+
+
+#endif /* _BOARD_UART_ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_usart0.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_usart0.h
new file mode 100644
index 0000000..805526d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_usart0.h
@@ -0,0 +1,35 @@
+#ifndef _BOARD_USART0_
+#define _BOARD_USART0_
+
+/**
+ * \file
+ * USART0
+ * - \ref PIN_USART0_RXD
+ * - \ref PIN_USART0_TXD
+ * - \ref PIN_USART0_CTS
+ * - \ref PIN_USART0_RTS
+ * - \ref PIN_USART0_SCK
+ *
+ * - \ref PIN_USART0_EN
+ */
+
+// ----------------------------------------------------------------------------------------------------------
+// USART0
+// Checked Tvd
+// ----------------------------------------------------------------------------------------------------------
+/** USART0 pin RX */
+#define PIN_USART0_RXD {PIO_PA10A_RXD0, PIOA, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
+/** USART0 pin TX */
+#define PIN_USART0_TXD {PIO_PA11A_TXD0, PIOA, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
+/** USART0 pin CTS */
+#define PIN_USART0_CTS {PIO_PB26A_CTS0, PIOB, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT}
+/** USART0 pin RTS */
+#define PIN_USART0_RTS {PIO_PB25A_RTS0, PIOB, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT}
+/** USART0 pin SCK */
+#define PIN_USART0_SCK {PIO_PA17B_SCK0, PIOA, ID_PIOA, PIO_PERIPH_B, PIO_DEFAULT}
+
+/** USART0 pin ENABLE */
+#define PIN_USART0_EN {PIO_PE14, PIOE, ID_PIOE, PIO_OUTPUT_0, PIO_DEFAULT}
+
+
+#endif /* _BOARD_USART0_ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_usart1.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_usart1.h
new file mode 100644
index 0000000..bae31cf
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_usart1.h
@@ -0,0 +1,29 @@
+#ifndef _BOARD_USART1_
+#define _BOARD_USART1_
+
+/**
+ * \file
+ * USART1
+ * - \ref PIN_USART1_RXD
+ * - \ref PIN_USART1_TXD
+ * - \ref PIN_USART1_CTS
+ * - \ref PIN_USART1_RTS
+ * - \ref PIN_USART1_SCK
+ *
+ */
+
+// ----------------------------------------------------------------------------------------------------------
+// USART1
+// ----------------------------------------------------------------------------------------------------------
+/** USART1 pin RX */
+#define PIN_USART1_RXD {PIO_PA12A_RXD1, PIOA, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
+/** USART1 pin TX */
+#define PIN_USART1_TXD {PIO_PA13A_TXD1, PIOA, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
+/** USART1 pin CTS */
+#define PIN_USART1_CTS {PIO_PA15A_CTS1, PIOA, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
+/** USART1 pin RTS */
+#define PIN_USART1_RTS {PIO_PA14A_RTS1, PIOA, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
+/** USART1 pin SCK */
+#define PIN_USART1_SCK {PIO_PA16A_SCK1, PIOA, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
+
+#endif /* _BOARD_USART1_ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_usart3.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_usart3.h
new file mode 100644
index 0000000..6f9c200
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_usart3.h
@@ -0,0 +1,29 @@
+#ifndef _BOARD_USART3_
+#define _BOARD_USART3_
+
+/**
+ * \file
+ * USART3
+ * - \ref PIN_USART3_RXD
+ * - \ref PIN_USART3_TXD
+ * - \ref PIN_USART3_CTS
+ * - \ref PIN_USART3_RTS
+ * - \ref PIN_USART3_SCK
+ *
+ */
+
+// ----------------------------------------------------------------------------------------------------------
+// USART3
+// ----------------------------------------------------------------------------------------------------------
+/** USART1 pin RX */
+#define PIN_USART3_RXD {PIO_PD5B_RXD3, PIOD, ID_PIOD, PIO_PERIPH_B, PIO_DEFAULT}
+/** USART1 pin TX */
+#define PIN_USART3_TXD {PIO_PD4B_TXD3, PIOD, ID_PIOD, PIO_PERIPH_B, PIO_DEFAULT}
+/** USART1 pin CTS */
+#define PIN_USART3_CTS {PIO_PF4A_CTS3, PIOF, ID_PIOF, PIO_PERIPH_A, PIO_DEFAULT}
+/** USART1 pin RTS */
+#define PIN_USART3_RTS {PIO_PF5A_RTS3, PIOF, ID_PIOF, PIO_PERIPH_A, PIO_DEFAULT}
+/** USART1 pin SCK */
+#define PIN_USART3_SCK {PIO_PE16B_SCK3, PIOE, ID_PIOE, PIO_PERIPH_B, PIO_DEFAULT}
+
+#endif /* _BOARD_USART3_ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_usb.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_usb.h
new file mode 100644
index 0000000..b2f5b59
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/board/board_usb.h
@@ -0,0 +1,56 @@
+#ifndef _BOARD_USB_
+#define _BOARD_USB_
+
+/**
+ * \file
+ * USB
+ * - \ref PIN_USBOTG_VBOF
+ * - \ref PIN_USB_FAULT
+ *
+ */
+
+// ----------------------------------------------------------------------------------------------------------
+// USB
+// checked - tvd jcb
+// ----------------------------------------------------------------------------------------------------------
+/** USB OTG VBus On/Off: Bus Power Control Port. */
+#define PIN_UOTGHS_VBOF { PIO_PB10, PIOB, ID_PIOB, PIO_PERIPH_A, PIO_PULLUP }
+/** USB OTG Identification: Mini Connector Identification Port. */
+#define PIN_UOTGHS_ID { PIO_PB11, PIOB, ID_PIOB, PIO_PERIPH_A, PIO_PULLUP }
+/** USB Fault monitoring pin definition. */
+#define PIN_UOTGHS_FAULT { PIO_PE5, PIOE, ID_PIOE, PIO_INPUT, PIO_PULLUP }
+
+/*----------------------------------------------------------------------------*/
+/**
+ * \page sam3x_ek_usb "SAM3X-EK - USB device"
+ *
+ * \section Definitions
+ * - \ref BOARD_USB_BMATTRIBUTES
+ * - \ref CHIP_USB_UDP
+ * - \ref CHIP_USB_PULLUP_INTERNAL
+ * - \ref CHIP_USB_NUMENDPOINTS
+ * - \ref CHIP_USB_ENDPOINTS_MAXPACKETSIZE
+ * - \ref CHIP_USB_ENDPOINTS_BANKS
+ */
+
+/** USB attributes configuration descriptor (bus or self powered, remote wakeup) */
+#define BOARD_USB_BMATTRIBUTES USBConfigurationDescriptor_SELFPOWERED_RWAKEUP
+
+/** Indicates chip has an internal pull-up. */
+#define CHIP_USB_PULLUP_INTERNAL
+
+/** Number of USB endpoints */
+#define CHIP_USB_NUMENDPOINTS 10
+
+/** Endpoints max paxcket size */
+#define CHIP_USB_ENDPOINTS_MAXPACKETSIZE(i) \
+ ((i == 0) ? 64 : 1024)
+
+/** Endpoints Number of Bank */
+#define CHIP_USB_ENDPOINTS_BANKS(i) \
+ ((i == 0) ? 1 : \
+ ((i == 1) ? 3 : \
+ ((i == 2) ? 3 : 2)))
+
+
+#endif /* _BOARD_USB_ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/build/gcc/Makefile b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/build/gcc/Makefile
new file mode 100644
index 0000000..bdddc50
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/build/gcc/Makefile
@@ -0,0 +1,56 @@
+# ----------------------------------------------------------------------------
+# ATMEL Microcontroller Software Support
+# ----------------------------------------------------------------------------
+# Copyright (c) 2010, Atmel Corporation
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# - Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the disclaimer below.
+#
+# Atmel's name may not be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+# DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# ----------------------------------------------------------------------------
+
+# Makefile for compiling libboard
+SERIE = sam3x
+BOARD = $(SERIE)_ek
+
+SUBMAKE_FILES=debug.mk gcc.mk iar.mk mdk.mk release.mk win.mk linux.mk sam3x_ek.mk
+SUBMAKE_OPTIONS=--no-builtin-rules --no-builtin-variables
+SUBMAKE_VARS=
+
+#-------------------------------------------------------------------------------
+# Rules
+#-------------------------------------------------------------------------------
+
+all: $(BOARD)
+
+.PHONY: $(BOARD)
+$(BOARD):
+ @echo --- Making $(BOARD) libboard debug
+ @$(MAKE) DEBUG=1 $(SUBMAKE_OPTIONS) -f $(BOARD).mk
+ @echo --- Making $(BOARD) libboard release
+ @$(MAKE) $(SUBMAKE_OPTIONS) -f $(BOARD).mk
+
+.PHONY: clean
+clean:
+ @echo --- Cleaning $(BOARD) libboard debug
+ @$(MAKE) DEBUG=1 $(SUBMAKE_OPTIONS) -f $(BOARD).mk $@
+ @echo --- Cleaning $(BOARD) libboard release
+ @$(MAKE) $(SUBMAKE_OPTIONS) -f $(BOARD).mk $@
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/build/gcc/debug.mk b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/build/gcc/debug.mk
new file mode 100644
index 0000000..c7f57b5
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/build/gcc/debug.mk
@@ -0,0 +1,18 @@
+
+# Trace level used for compilation
+# (can be overriden by adding TRACE_LEVEL=#number to the command-line)
+# TRACE_LEVEL_DEBUG 5
+# TRACE_LEVEL_INFO 4
+# TRACE_LEVEL_WARNING 3
+# TRACE_LEVEL_ERROR 2
+# TRACE_LEVEL_FATAL 1
+# TRACE_LEVEL_NO_TRACE 0
+TRACE_LEVEL = 3
+
+# Optimization level
+# -O1 Optimize
+# -O2 Optimize even more
+# -O3 Optimize yet more
+# -O0 Reduce compilation time and make debugging produce the expected results
+# -Os Optimize for size
+OPTIMIZATION = -g -O0 -D DEBUG
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/build/gcc/gcc.mk b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/build/gcc/gcc.mk
new file mode 100644
index 0000000..b77b741
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/build/gcc/gcc.mk
@@ -0,0 +1,37 @@
+
+# Tool suffix when cross-compiling
+CROSS_COMPILE = arm-none-eabi-
+
+# Compilation tools
+AR = $(CROSS_COMPILE)ar
+CC = $(CROSS_COMPILE)gcc
+AS = $(CROSS_COMPILE)as
+#LD = $(CROSS_COMPILE)ld
+#SIZE = $(CROSS_COMPILE)size
+NM = $(CROSS_COMPILE)nm
+#OBJCOPY = $(CROSS_COMPILE)objcopy
+
+# Flags
+
+CFLAGS += -Wall -Wchar-subscripts -Wcomment -Wformat=2 -Wimplicit-int
+CFLAGS += -Werror-implicit-function-declaration -Wmain -Wparentheses
+CFLAGS += -Wsequence-point -Wreturn-type -Wswitch -Wtrigraphs -Wunused
+CFLAGS += -Wuninitialized -Wunknown-pragmas -Wfloat-equal -Wundef
+CFLAGS += -Wshadow -Wpointer-arith -Wbad-function-cast -Wwrite-strings
+CFLAGS += -Wsign-compare -Waggregate-return -Wstrict-prototypes
+CFLAGS += -Wmissing-prototypes -Wmissing-declarations
+CFLAGS += -Wformat -Wmissing-format-attribute -Wno-deprecated-declarations
+CFLAGS += -Wpacked -Wredundant-decls -Wnested-externs -Winline -Wlong-long
+CFLAGS += -Wunreachable-code
+CFLAGS += -Wcast-align
+#CFLAGS += -Wmissing-noreturn
+#CFLAGS += -Wconversion
+
+CFLAGS += --param max-inline-insns-single=500 -mcpu=cortex-m3 -mthumb -mlong-calls -ffunction-sections
+CFLAGS += $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -DTRACE_LEVEL=$(TRACE_LEVEL)
+
+# To reduce application size use only integer printf function.
+CFLAGS += -Dprintf=iprintf
+
+ASFLAGS = -mcpu=cortex-m3 -mthumb -Wall -g $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -D__ASSEMBLY__
+LDFLAGS = -g $(OPTIMIZATION) -nostartfiles -mcpu=cortex-m3 -mthumb -Wl,-Map=$(OUTPUT).map,--cref,--gc-sections
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/build/gcc/iar.mk b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/build/gcc/iar.mk
new file mode 100644
index 0000000..cc78e08
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/build/gcc/iar.mk
@@ -0,0 +1,15 @@
+
+# Compilation tools
+AR = iarchive.exe
+CC = iccarm.exe
+LD = ilinkarm.exe
+SIZE =
+OBJCOPY =
+
+# Flags
+
+CFLAGS += $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -DTRACE_LEVEL=$(TRACE_LEVEL)
+
+ASFLAGS = $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -D__ASSEMBLY__
+
+LDFLAGS =
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/build/gcc/linux.mk b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/build/gcc/linux.mk
new file mode 100644
index 0000000..08d2f9f
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/build/gcc/linux.mk
@@ -0,0 +1,4 @@
+
+RM=rm -f
+RMDIR=rm -fr
+SEP=/ \ No newline at end of file
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/build/gcc/readme.txt b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/build/gcc/readme.txt
new file mode 100644
index 0000000..303ddad
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/build/gcc/readme.txt
@@ -0,0 +1,6 @@
+This makefile allows build of libboard_sam3x_ek_???.a
+
+where
+??? could be dbg and rel (debug, release)
+
+It checks for source files (C and assembler) from folder ../../source then compiles them to build given library
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/build/gcc/release.mk b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/build/gcc/release.mk
new file mode 100644
index 0000000..74b2686
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/build/gcc/release.mk
@@ -0,0 +1,18 @@
+
+# Trace level used for compilation
+# (can be overriden by adding TRACE_LEVEL=#number to the command-line)
+# TRACE_LEVEL_DEBUG 5
+# TRACE_LEVEL_INFO 4
+# TRACE_LEVEL_WARNING 3
+# TRACE_LEVEL_ERROR 2
+# TRACE_LEVEL_FATAL 1
+# TRACE_LEVEL_NO_TRACE 0
+TRACE_LEVEL = 1
+
+# Optimization level
+# -O1 Optimize
+# -O2 Optimize even more
+# -O3 Optimize yet more
+# -O0 Reduce compilation time and make debugging produce the expected results
+# -Os Optimize for size
+OPTIMIZATION = -Os
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/build/gcc/sam3x_ek.mk b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/build/gcc/sam3x_ek.mk
new file mode 100644
index 0000000..a129155
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/build/gcc/sam3x_ek.mk
@@ -0,0 +1,188 @@
+# ----------------------------------------------------------------------------
+# ATMEL Microcontroller Software Support
+# ----------------------------------------------------------------------------
+# Copyright (c) 2010, Atmel Corporation
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# - Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the disclaimer below.
+#
+# Atmel's name may not be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+# DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# ----------------------------------------------------------------------------
+
+# Makefile for compiling libchip
+.SUFFIXES: .o .a .c .s
+SUB_MAKEFILES=debug.mk gcc.mk iar.mk mdk.mk release.mk win.mk linux.mk sam3x-ek.mk
+
+SERIE=sam3x
+CHIP=$(SERIE)8
+BOARD=$(SERIE)_ek
+LIBNAME=libboard
+TOOLCHAIN=gcc
+
+#-------------------------------------------------------------------------------
+# we detect OS (Linux/Windows/Cygwin)
+# not defined for Cygwin
+#ifdef $(OS)
+ifeq ($(OS), Windows_NT)
+include win.mk
+else
+include linux.mk
+endif
+#else
+# Cygwin case
+#include linux.mk
+#endif
+
+#-------------------------------------------------------------------------------
+# Path
+#-------------------------------------------------------------------------------
+
+# Output directories
+OUTPUT_BIN = ../../lib
+
+# Libraries
+PROJECT_BASE_PATH = ../..
+
+#-------------------------------------------------------------------------------
+# Files
+#-------------------------------------------------------------------------------
+
+vpath %.h $(PROJECT_BASE_PATH)/include $(PROJECT_BASE_PATH)/../usb/include
+vpath %.c $(PROJECT_BASE_PATH)/source
+vpath %.s $(PROJECT_BASE_PATH)/source
+
+VPATH+=$(PROJECT_BASE_PATH)/source
+
+
+INCLUDES = -I$(PROJECT_BASE_PATH)
+INCLUDES += -I$(PROJECT_BASE_PATH)/include
+INCLUDES += -I$(PROJECT_BASE_PATH)/../libchip_$(SERIE)
+INCLUDES += -I$(PROJECT_BASE_PATH)/../usb/include
+INCLUDES += -I$(PROJECT_BASE_PATH)/../libsdmmc
+
+#-------------------------------------------------------------------------------
+ifdef DEBUG
+include debug.mk
+else
+include release.mk
+endif
+
+#-------------------------------------------------------------------------------
+# Tools
+#-------------------------------------------------------------------------------
+
+include $(TOOLCHAIN).mk
+
+#-------------------------------------------------------------------------------
+ifdef DEBUG
+OUTPUT_OBJ=debug
+OUTPUT_LIB=$(LIBNAME)_$(BOARD)_$(TOOLCHAIN)_dbg.a
+else
+OUTPUT_OBJ=release
+OUTPUT_LIB=$(LIBNAME)_$(BOARD)_$(TOOLCHAIN)_rel.a
+endif
+
+OUTPUT_PATH=$(OUTPUT_OBJ)_$(BOARD)
+
+#-------------------------------------------------------------------------------
+# C source files and objects
+#-------------------------------------------------------------------------------
+C_SRC=$(wildcard $(PROJECT_BASE_PATH)/source/*.c)
+
+C_OBJ_TEMP = $(patsubst %.c, %.o, $(notdir $(C_SRC)))
+
+# during development, remove some files
+C_OBJ_FILTER=
+
+ifneq '$(TOOLCHAIN)' 'gcc'
+C_OBJ_FILTER += board_cstartup_gnu.o syscalls.o
+endif
+
+ifeq '$(TOOLCHAIN)' 'gcc'
+C_OBJ_FILTER += rand.o
+endif
+
+ifneq '$(TOOLCHAIN)' 'ewarm'
+C_OBJ_FILTER += board_cstartup_iar.o
+endif
+
+ifneq '$(TOOLCHAIN)' 'mdk'
+C_OBJ_FILTER += board_cstartup_keil.o retarget.o
+endif
+
+C_OBJ=$(filter-out $(C_OBJ_FILTER), $(C_OBJ_TEMP))
+
+#-------------------------------------------------------------------------------
+# Assembler source files and objects
+#-------------------------------------------------------------------------------
+A_SRC=$(wildcard $(PROJECT_BASE_PATH)/source/*.s)
+
+A_OBJ_TEMP=$(patsubst %.s, %.o, $(notdir $(A_SRC)))
+
+# during development, remove some files
+A_OBJ_FILTER=
+
+A_OBJ=$(filter-out $(A_OBJ_FILTER), $(A_OBJ_TEMP))
+
+#-------------------------------------------------------------------------------
+# Rules
+#-------------------------------------------------------------------------------
+
+all: $(BOARD)
+
+$(BOARD): create_output $(OUTPUT_LIB)
+
+debug: create_output $(OUTPUT_LIB)
+
+release: create_output $(OUTPUT_LIB)
+
+.PHONY: create_output
+create_output: $(OUTPUT_PATH) $(subst /,$(SEP),$(OUTPUT_BIN))
+# @echo --- Preparing $(BOARD) files $(OUTPUT_PATH) $(OUTPUT_BIN) $(OS) $(TOOLCHAIN)
+# @echo -------------------------
+# @echo *$(C_SRC)
+# @echo -------------------------
+# @echo *$(C_OBJ)
+# @echo -------------------------
+# @echo *$(addprefix $(OUTPUT_PATH)/, $(C_OBJ))
+# @echo -------------------------
+# @echo *$(A_SRC)
+# @echo -------------------------
+
+$(OUTPUT_PATH) $(subst /,$(SEP),$(OUTPUT_BIN)):
+ mkdir $@
+
+$(addprefix $(OUTPUT_PATH)/,$(C_OBJ)): $(OUTPUT_PATH)/%.o: %.c
+ @$(CC) -c $(CFLAGS) $< -o $@
+
+$(addprefix $(OUTPUT_PATH)/,$(A_OBJ)): $(OUTPUT_PATH)/%.o: %.s
+ @$(AS) -c $(ASFLAGS) $< -o $@
+
+$(OUTPUT_LIB): $(addprefix $(OUTPUT_PATH)/, $(C_OBJ)) $(addprefix $(OUTPUT_PATH)/, $(A_OBJ))
+ @$(AR) -r $(OUTPUT_BIN)/$@ $^
+# @$(NM) $(OUTPUT_BIN)/$@ > $(OUTPUT_BIN)/$@.txt
+
+.PHONY: clean
+clean:
+ @echo - Cleaning files [$(OUTPUT_PATH)$(SEP)*.o] [$(subst /,$(SEP),$(OUTPUT_BIN)/$(OUTPUT_LIB))]
+ -@cs-rm -fR $(OUTPUT_PATH) 1>NUL 2>&1
+ -@cs-rm -fR $(subst /,$(SEP),$(OUTPUT_BIN)/$(OUTPUT_LIB)) 1>NUL 2>&1
+
+$(addprefix $(OUTPUT_PATH)/,$(C_OBJ)): $(OUTPUT_PATH)/%.o: $(PROJECT_BASE_PATH)/board.h $(wildcard $(PROJECT_BASE_PATH)/include/*.h)
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/build/gcc/win.mk b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/build/gcc/win.mk
new file mode 100644
index 0000000..67b3fa7
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/build/gcc/win.mk
@@ -0,0 +1,4 @@
+
+RM=del
+RMDIR=rmdir /s /q
+SEP=\ \ No newline at end of file
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/ads7843.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/ads7843.h
new file mode 100644
index 0000000..db51959
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/ads7843.h
@@ -0,0 +1,56 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2011, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * Interface for ADS7843 driver.
+ */
+
+#ifndef _ADS7843_
+#define _ADS7843_
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include <stdint.h>
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+extern void ADS7843_Initialize( void ) ;
+
+extern void ADS7843_Reset( void ) ;
+
+extern void ADS7843_GetPosition( uint32_t *px_pos, uint32_t *py_pos ) ;
+
+#endif /* #ifndef _ADS7843_H */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/at45_spi.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/at45_spi.h
new file mode 100644
index 0000000..670f99a
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/at45_spi.h
@@ -0,0 +1,216 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2011, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * Implementation of SPI At45 driver.
+ *
+ */
+
+#ifndef _SPI_AT45_
+#define _SPI_AT45_
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+#include "board.h"
+
+/*----------------------------------------------------------------------------
+ * Macros
+ *----------------------------------------------------------------------------*/
+/** Returns 1 if the device is ready; otherwise 0.*/
+#define AT45_STATUS_READY(status) (status & 0x80)
+/** Returns the device ID code.*/
+#define AT45_STATUS_ID(status) (status & 0x3c)
+/** Returns 1 if the device is configured in binary page mode; otherwise 0.*/
+#define AT45_STATUS_BINARY(status) (status & 0x01)
+
+/** Dataflash page offset.*/
+#define AT45_PageOffset(pAt45) ((pAt45)->pDesc->dwPageOffset)
+/** Dataflash page number.*/
+#define AT45_PageNumber(pAt45) ((pAt45)->pDesc->dwPageNumber)
+
+/*----------------------------------------------------------------------------
+ * Definitions
+ *----------------------------------------------------------------------------*/
+
+/** The dataflash driver is currently in use.*/
+#define AT45_ERROR_LOCK 1
+/** There was an error with the SPI driver.*/
+#define AT45_ERROR_SPI 2
+
+/** AT45 dataflash SPI CSR settings given MCK and SPCK.*/
+#define AT45_CSR(mck, spck) (SPI_CSR_NCPHA | SPID_CSR_DLYBCT(mck, 250) | SPID_CSR_DLYBS(mck, 250) | SPID_CSR_SCBR(mck, spck))
+
+/** Main memory page read command code. */
+#define AT45_PAGE_READ 0xD2
+/** Continous array read (legacy) command code.*/
+#define AT45_CONTINUOUS_READ_LEG 0xE8
+/** Continous array read (low frequency) command code.*/
+#define AT45_CONTINUOUS_READ_LF 0x03
+/** Continous array read command code.*/
+#define AT45_CONTINUOUS_READ 0x0B
+/** Buffer 1 read (low frequency) command code.*/
+#define AT45_BUF1_READ_LF 0xD1
+/** Buffer 2 read (low frequency) command code.*/
+#define AT45_BUF2_READ_LF 0xD3
+/** Buffer 1 read (serial) command code.*/
+#define AT45_BUF1_READ_SER 0xD4
+/** Buffer 2 read (serial) command code.*/
+#define AT45_BUF2_READ_SER 0xD6
+/** Buffer 1 read (8-bit) command code.*/
+#define AT45_BUF1_READ_8B 0x54
+/** Buffer 2 read (8-bit) command code.*/
+#define AT45_BUF2_READ_8B 0x56
+
+/** Buffer 1 write command code.*/
+#define AT45_BUF1_WRITE 0x84
+/** Buffer 2 write command code.*/
+#define AT45_BUF2_WRITE 0x87
+/** Buffer 1 to main memory page program with erase command code.*/
+#define AT45_BUF1_MEM_ERASE 0x83
+/** Buffer 2 to main memory page program with erase command code.*/
+#define AT45_BUF2_MEM_ERASE 0x86
+/** Buffer 1 to main memory page program without erase command code.*/
+#define AT45_BUF1_MEM_NOERASE 0x88
+/** Buffer 2 to main memory page program without erase command code.*/
+#define AT45_BUF2_MEM_NOERASE 0x89
+/** Page erase command code.*/
+#define AT45_PAGE_ERASE 0x81
+/** Block erase command code.*/
+#define AT45_BLOCK_ERASE 0x50
+/** Sector erase command code.*/
+#define AT45_SECTOR_ERASE 0x7C
+/** Chip erase command code.*/
+#define AT45_CHIP_ERASE 0xC7, 0x94, 0x80, 0x9A
+/** Main memory page program through buffer 1 command code.*/
+#define AT45_PAGE_WRITE_BUF1 0x82
+/** Main memory page program through buffer 2 command code.*/
+#define AT45_PAGE_WRITE_BUF2 0x85
+
+/** Main memory page to buffer 1 transfer command code.*/
+#define AT45_PAGE_BUF1_TX 0x53
+/** Main memory page to buffer 2 transfer command code.*/
+#define AT45_PAGE_BUF2_TX 0x55
+/** Main memory page to buffer 1 compare command code.*/
+#define AT45_PAGE_BUF1_CMP 0x60
+/** Main memory page to buffer 2 compare command code.*/
+#define AT45_PAGE_BUF2_CMP 0x61
+/** Auto page rewrite through buffer 1 command code.*/
+#define AT45_AUTO_REWRITE_BUF1 0x58
+/** Auto page rewrite through buffer 2 command code.*/
+#define AT45_AUTO_REWRITE_BUF2 0x59
+/** Deep power-down command code.*/
+#define AT45_DEEP_PDOWN 0xB9
+/** Resume from deep power-down command code.*/
+#define AT45_RES_DEEP_PDOWN 0xAB
+/** Status register read command code.*/
+#define AT45_STATUS_READ 0xD7
+/** Manufacturer and device ID read command code.*/
+#define AT45_ID_READ 0x9F
+
+/** Power-of-2 binary page size configuration command code.*/
+#define AT45_BINARY_PAGE_FIRST_OPCODE 0x3D
+#define AT45_BINARY_PAGE 0x2A, 0x80, 0xA6
+
+/** AT45 interface type SPI */
+#define AT45_INTERFACE_TYPE_SPI 0
+
+/** AT45 interface type USART SPI mode */
+#define AT45_INTERFACE_TYPE_USART_SPI 1
+/*----------------------------------------------------------------------------
+ * Types
+ *----------------------------------------------------------------------------*/
+
+/** \brief Dataflash description.
+ *
+ * A constant array of DataflashDesc instance is defined in at45.c.
+ * The DF_Scan() function returns the corresponding descriptor according
+ * to the dataflash ID detected. This description (page_size, page_offset)
+ * is used to compute the internal dataflash address by the DF_Command()
+ * function.
+ *
+ */
+typedef struct {
+ /** dataflash page number. */
+ uint32_t dwPageNumber;
+ // indicate if power-of-2 binary page supported.*/
+ uint32_t dwHasBinaryPage;
+ /** dataflash page size.*/
+ uint32_t dwPageSize;
+ /** page offset in command.*/
+ uint32_t dwPageOffset;
+ /** Dataflash ID.*/
+ uint8_t ucID;
+ /** Identifier.*/
+ const char *pName;
+} At45Desc;
+
+/** \brief Dataflash driver structure.
+ *
+ * It holds the current command being processed.This structure is initialized
+ * by the DF_Init() command.pDfDesc field can be initialized by the DF_Scan()
+ * function. cmdBuffer is a private driver area used to compute the dataflash
+ * address to be sent to the dataflash. Beware the PDC master must have access
+ * to this area.
+ */
+typedef struct _Dataflash {
+ /** Pointer to Spi Structure (SPI low level driver).*/
+ Spid *pSpid;
+ /** Pointer to Usart Structure (Usart low level driver).*/
+ Usartd *pUsartd;
+ /** Current SPI command sent to the SPI low level driver.*/
+ SpidCmd command;
+ /** Pointer to the dataflash description.*/
+ const At45Desc *pDesc;
+ /** Buffer to store the current command (opcode + dataflash address.*/
+ uint8_t pCmdBuffer[8];
+ /** Polling mode */
+ uint32_t dwPollingMode;
+ /** Interface type, usart spi mode or spi */
+ uint32_t dwInterfaceType;
+} At45 ;
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+extern uint32_t AT45_Configure( At45* pAt45, void *pSpid, uint8_t ucSpiCs ,uint8_t ucPolling) ;
+
+extern uint32_t AT45_IsBusy( At45* pAt45 ) ;
+
+extern uint32_t AT45_SendCommand( At45* pAt45, uint8_t ucCmd, uint8_t ucCmdSize, uint8_t *pucData, uint32_t dwDataSize,
+ uint32_t dwAddress, SpidCallback callback, void *pArgument ) ;
+
+extern const At45Desc* AT45_FindDevice( At45* pAt45, uint8_t ucStatus ) ;
+
+extern uint32_t AT45_PageSize( At45* pAt45 ) ;
+
+#endif /* #ifndef _SPI_AT45_ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/at45d.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/at45d.h
new file mode 100644
index 0000000..125a06e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/at45d.h
@@ -0,0 +1,63 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * Implementation of At45 driver.
+ *
+ */
+
+#ifndef _AT45D_
+#define _AT45D_
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "at45_spi.h"
+
+/*----------------------------------------------------------------------------
+ * Global functions
+ *----------------------------------------------------------------------------*/
+
+extern void AT45D_WaitReady( At45* pAt45 ) ;
+
+extern uint32_t AT45D_GetStatus( At45* pAt45 ) ;
+
+extern uint32_t AT45D_Read( At45* pAt45, uint8_t* pucBuffer, uint32_t dwSize, uint32_t dwAddress ) ;
+
+extern uint32_t AT45D_Write( At45* pAt45, uint8_t *pucBuffer, uint32_t dwSize, uint32_t dwAddress ) ;
+
+extern uint32_t AT45D_Erase( At45* pAt45, uint32_t dwAddress ) ;
+
+extern uint32_t AT45D_BinaryPage( At45* pAt45 ) ;
+
+#endif /* #ifndef _AT45D_ */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/bitbanding.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/bitbanding.h
new file mode 100644
index 0000000..c7992cd
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/bitbanding.h
@@ -0,0 +1,109 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+#ifndef _BITBANDING_
+#define _BITBANDING_
+
+/**
+ * \file bitbanding.h
+ *
+ * Include Defines & macros for bit-banding.
+ */
+
+/*----------------------------------------------------------------------------
+ * Header files
+ *----------------------------------------------------------------------------*/
+
+#include <stdint.h>
+
+/*----------------------------------------------------------------------------
+ * Global Macros
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Check if the address is in bit banding sram region.
+ *
+ * \note The address should be in area of 0x2000000 ~ 0x200FFFFF
+ *
+ * \param x The address to check.
+ */
+#define IS_BITBAND_SRAM_ADDR(x) \
+ ( ((uint32_t)(x)) >= 0x20000000 && \
+ ((uint32_t)(x)) < (0x20000000+0x100000) )
+
+/**
+ * \brief Check if the address is in bit banding peripheral region
+ *
+ * \note The address should be in area of 0x4000000 ~ 0x400FFFFF
+ * \param x The address to check
+ */
+#define IS_BITBAND_PERIPH_ADDR(x) \
+ ( ((uint32_t)(x)) >= 0x40000000 && \
+ ((uint32_t)(x)) < (0x40000000+0x100000) )
+
+/**
+ * \brief Calculate bit band alias address.
+ *
+ * Calculate the bit band alias address and return a pointer address to word.
+ *
+ * \param addr The byte address of bitbanding bit.
+ * \param bit The bit position of bitbanding bit.
+ * \callergraph
+ */
+#define BITBAND_ALIAS_ADDRESS(addr, bit) \
+ ((volatile uint32_t*)((((uint32_t)(addr) & 0xF0000000) + 0x02000000) \
+ +((((uint32_t)(addr)&0xFFFFF)*32)\
+ +( (uint32_t)(bit)*4))))
+
+/**
+ * \brief Bit write through bit banding.
+ *
+ * \param addr32 32-bit aligned byte address where the bit exists.
+ * \param bit Bit position.
+ * \param val The value that the bit is set to.
+ * \callergraph
+ */
+#define WRITE_BITBANDING(addr32, bit, val) do {\
+ *BITBAND_ALIAS_ADDRESS(addr32,bit) = (val); \
+ } while (0);
+
+/**
+ * \brief Toggle bit through bit banding
+ *
+ * \param addr32 32-bit aligned byte address where the bit exists.
+ * \param bit Bit position.
+ */
+#define TOGGLE_BITBANDING(addr32, bit) do {\
+ volatile uint32_t * p = \
+ BITBAND_ALIAS_ADDRESS(addr32,bit); \
+ if (*p) *p = 0; \
+ else *p = 1; \
+ }while(0);
+
+#endif /* #ifndef _BITBANDING_ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/bmp.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/bmp.h
new file mode 100644
index 0000000..b021715
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/bmp.h
@@ -0,0 +1,104 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ * \section Purpose
+ *
+ * Utility for BMP
+ *
+ */
+
+#ifndef BMP_H
+#define BMP_H
+
+/** BMP magic number ('BM'). */
+#define BMP_TYPE 0x4D42
+
+/** headerSize must be set to 40 */
+#define BITMAPINFOHEADER 40
+
+/*------------------------------------------------------------------------------
+ * Exported types
+ *------------------------------------------------------------------------------*/
+
+#pragma pack( 1 )
+
+/** BMP (Windows) Header Format */
+typedef struct _BMPHeader
+{
+ /* signature, must be 4D42 hex */
+ uint16_t type;
+ /* size of BMP file in bytes (unreliable) */
+ uint32_t fileSize;
+ /* reserved, must be zero */
+ uint16_t reserved1;
+ /* reserved, must be zero */
+ uint16_t reserved2;
+ /* offset to start of image data in bytes */
+ uint32_t offset;
+ /* size of BITMAPINFOHEADER structure, must be 40 */
+ uint32_t headerSize;
+ /* image width in pixels */
+ uint32_t width;
+ /* image height in pixels */
+ uint32_t height;
+ /* number of planes in the image, must be 1 */
+ uint16_t planes;
+ /* number of bits per pixel (1, 4, 8, 16, 24, 32) */
+ uint16_t bits;
+ /* compression type (0=none, 1=RLE-8, 2=RLE-4) */
+ uint32_t compression;
+ /* size of image data in bytes (including padding) */
+ uint32_t imageSize;
+ /* horizontal resolution in pixels per meter (unreliable) */
+ uint32_t xresolution;
+ /* vertical resolution in pixels per meter (unreliable) */
+ uint32_t yresolution;
+ /* number of colors in image, or zero */
+ uint32_t ncolours;
+ /* number of important colors, or zero */
+ uint32_t importantcolours;
+
+} BMPHeader;
+
+#pragma pack()
+
+/*------------------------------------------------------------------------------
+ * Exported functions
+ *------------------------------------------------------------------------------*/
+extern uint8_t BMP_IsValid(void *file);
+extern uint32_t BMP_GetFileSize(void *file);
+extern uint8_t BMP_Decode( void *file, uint8_t *buffer, uint32_t width, uint32_t height, uint8_t bpp );
+extern void WriteBMPheader( uint32_t* pAddressHeader, uint32_t bmpHSize, uint32_t bmpVSize, uint8_t nbByte_Pixels );
+extern void BMP_displayHeader(uint32_t* pAddressHeader);
+extern void RGB565toBGR555( uint8_t *fileSource, uint8_t *fileDestination, uint32_t width, uint32_t height, uint8_t bpp );
+
+#endif //#ifndef BMP_H
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/board_lowlevel.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/board_lowlevel.h
new file mode 100644
index 0000000..b554edf
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/board_lowlevel.h
@@ -0,0 +1,46 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * Interface for the low-level initialization function.
+ *
+ */
+
+#ifndef BOARD_LOWLEVEL_H
+#define BOARD_LOWLEVEL_H
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+extern void LowLevelInit( void ) ;
+
+#endif /* BOARD_LOWLEVEL_H */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/board_memories.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/board_memories.h
new file mode 100644
index 0000000..a4f6d01
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/board_memories.h
@@ -0,0 +1,50 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * Interface for memories configuration on board.
+ *
+ */
+
+#ifndef BOARD_MEMORIES_H
+#define BOARD_MEMORIES_H
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+extern void BOARD_ConfigureNandFlash( Smc* pSmc ) ;
+extern void BOARD_ConfigureNorFlash( Smc* pSmc ) ;
+extern void BOARD_ConfigurePSRAM( Smc* pSmc ) ;
+extern void BOARD_ConfigureSdram( void );
+
+#endif /* #ifndef BOARD_MEMORIES_H */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/dma_hardware_interface.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/dma_hardware_interface.h
new file mode 100644
index 0000000..baee485
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/dma_hardware_interface.h
@@ -0,0 +1,71 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2011, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file dma_hardware_interface.h
+ *
+ * Include Defines & macros for DMA hardware interface.
+ */
+
+#ifndef _DMAD_IF_H
+#define _DMAD_IF_H
+
+/*----------------------------------------------------------------------------
+ * Includes
+ *----------------------------------------------------------------------------*/
+
+#include "board.h"
+
+/*----------------------------------------------------------------------------
+ * Consts
+ *----------------------------------------------------------------------------*/
+
+#define PERI_DBGU 32
+
+/*----------------------------------------------------------------------------
+ * Types
+ *----------------------------------------------------------------------------*/
+
+/** DMA hardware interface */
+typedef struct _DmaHardwareInterface {
+ uint8_t ucDmac; /**< DMA Controller number */
+ uint8_t ucPeriphID; /**< Peripheral ID */
+ uint8_t ucTransfer; /**< Transfer type 0: Tx, 1 :Rx*/
+ uint8_t ucIfID; /**< DMA Interface ID */
+} DmaHardwareInterface;
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+extern uint8_t DMAIF_IsValidatedPeripherOnDma( uint8_t ucDmac, uint8_t ucPeriphID);
+extern uint8_t DMAIF_GetChannelNumber (uint8_t ucDmac, uint8_t ucPeriphID, uint8_t ucTransfer);
+
+#endif //#ifndef _DMAD_IF_H
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/dmad.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/dmad.h
new file mode 100644
index 0000000..688e28c
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/dmad.h
@@ -0,0 +1,155 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2011, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+ * \file
+ *
+ * Include Defines & macros for DMA logical device.
+ */
+
+
+#ifndef _DMAD_H
+#define _DMAD_H
+/** \addtogroup dmad_module
+ *@{
+ */
+
+/*----------------------------------------------------------------------------
+ * Includes
+ *----------------------------------------------------------------------------*/
+
+
+/** \addtogroup dmad_defines DMA Driver Defines
+ @{*/
+/*----------------------------------------------------------------------------
+ * Consts
+ *----------------------------------------------------------------------------*/
+#define DMA_TRANSFER_MEMORY 0xFF /**< DMA transfer from or to memory */
+#define DMA_ALLOC_FAILED 0xFFFF /**< Channel allocate failed */
+#define DMA_TRANSFER_RX 1 /**< DMA transfer type is receive */
+#define DMA_TRANSFER_TX 0 /**< DMA transfer type is transmit */
+
+/*----------------------------------------------------------------------------
+ * MACRO
+ *----------------------------------------------------------------------------*/
+
+/** @}*/
+
+/*----------------------------------------------------------------------------
+ * Types
+ *----------------------------------------------------------------------------*/
+/** \addtogroup dmad_structs DMA Driver Structs
+ @{*/
+
+/** DMA status or return code */
+typedef enum _DmadStatus {
+ DMAD_OK = 0, /**< Operation is sucessful */
+ DMAD_BUSY, /**< Channel occupied or transfer not finished */
+ DMAD_PARTIAL_DONE, /**< Partial of LLI finished (on each buffer done) */
+ DMAD_ERROR, /**< Operation failed */
+ DMAD_CANCELED /**< Operation canceled */
+} eDmadStatus, eDmadRC;
+
+/** DMA state for channel */
+typedef enum _DmadState {
+ DMAD_FREE = 0, /**< Free channel */
+ DMAD_IN_USE, /**< Allocated to some peripheral */
+ DMAD_IN_XFR, /**< Transferring something */
+ DMAD_STALL /**< Error stall */
+} eDmadState;
+
+/** DMA transfer callback */
+typedef void (*DmadTransferCallback)(uint32_t status, void* pArg);
+
+/** DMA driver channel */
+typedef struct _DmadChannel {
+ DmadTransferCallback fCallback; /**< Callback */
+ void* pArg; /**< Callback argument */
+
+ uint8_t ucIrqOwner; /**< Uses DMA handler or external one */
+ uint8_t ucSrcPeriphID; /**< HW ID for source */
+ uint8_t ucDstPeriphID; /**< HW ID for destination */
+ uint8_t ucSrcTxIfID; /**< DMA Tx Interface ID for source */
+ uint8_t ucSrcRxIfID; /**< DMA Rx Interface ID for source */
+ uint8_t ucDstTxIfID; /**< DMA Tx Interface ID for destination */
+ uint8_t ucDstRxIfID; /**< DMA Rx Interface ID for destination */
+
+ volatile uint8_t ucState; /**< DMA channel state */
+} sDmadChannel;
+
+/** DMA driver instance */
+typedef struct _Dmad {
+ Dmac *pDmacs[DMAC_CONTROLLER_NUM];
+ sDmadChannel dmaChannels[DMAC_CONTROLLER_NUM][DMAC_CHANNEL_NUM];
+ uint8_t ucNumControllers;
+ uint8_t ucNumChannels;
+ uint8_t ucPollingModes;
+ uint8_t ucPollingTimeout;
+} sDmad;
+
+/** DMA driver channel ID */
+typedef struct _DmadChannelID {
+ uint8_t ucDmac; /**< DMA Controller number */
+ uint8_t ucChannel; /**< Channel number */
+} sDmadChannelID;
+
+/** @}*/
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+/** \addtogroup dmad_functions DMA Driver Functionos
+ @{*/
+extern void DMAD_Initialize( sDmad *pDmad,
+ uint8_t bPollingMode );
+
+extern void DMAD_Handler( sDmad *pDmad );
+
+extern uint32_t DMAD_AllocateChannel( sDmad *pDmad,
+ uint8_t ucSrcID, uint8_t ucDstID);
+extern eDmadRC DMAD_FreeChannel( sDmad *pDmad, uint32_t dwChannel );
+
+extern eDmadRC DMAD_SetCallback( sDmad *pDmad, uint32_t dwChannel,
+ DmadTransferCallback fCallback, void* pArg );
+
+extern eDmadRC DMAD_PrepareChannel( sDmad *pDmad, uint32_t dwChannel,
+ uint32_t dwCfg );
+
+extern eDmadRC DMAD_IsTransferDone( sDmad *pDmad, uint32_t dwChannel );
+
+extern eDmadRC DMAD_StartTransfer( sDmad *pDmad, uint32_t dwChannel );
+extern eDmadRC DMAD_StartTransfers( sDmad *pDmad,
+ uint8_t bDmac, uint32_t bmChannels );
+
+extern eDmadRC DMAD_StopTransfer( sDmad *pDmad, uint32_t dwChannel );
+extern eDmadRC DMAD_PrepareSingleTransfer( sDmad *pDmad, uint32_t dwChannel,
+ sDmaTransferDescriptor *pXfrDesc );
+
+extern eDmadRC DMAD_PrepareMultiTransfer( sDmad *pDmad, uint32_t dwChannel,
+ sDmaTransferDescriptor *pXfrDesc );
+#endif //#ifndef _DMAD_H
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/emacd.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/emacd.h
new file mode 100644
index 0000000..50bdb6d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/emacd.h
@@ -0,0 +1,202 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/** \file */
+
+/** \addtogroup emacd_module
+ * @{
+ * Implement EMAC data transfer and PHY management functions.
+ *
+ * \section Usage
+ * -# Implement EMAC interrupt handler, which must invoke EMACD_Handler()
+ * to handle EMAC interrupt events.
+ * -# Implement sEmacd instance in application.
+ * -# Initialize the instance with EMACD_Init() and EMACD_InitTransfer(),
+ * so that EMAC data can be transmitted/received.
+ * -# Some management callbacks can be set by EMACD_SetRxCallback()
+ * and EMACD_SetTxWakeupCallback().
+ * -# Send ethernet packets using EMACD_Send(), EMACD_TxLoad() is used
+ * to check the free space in TX queue.
+ * -# Check and obtain received ethernet packets via EMACD_Poll().
+ *
+ * \sa \ref macb_module, \ref emac_module
+ *
+ * Related files:\n
+ * \ref emacd.c\n
+ * \ref emacd.h.\n
+ *
+ * \defgroup emacd_defines EMAC Driver Defines
+ * \defgroup emacd_types EMAC Driver Types
+ * \defgroup emacd_functions EMAC Driver Functions
+ */
+/**@}*/
+
+#ifndef _EMACD_H_
+#define _EMACD_H_
+
+/*---------------------------------------------------------------------------
+ * Headers
+ *---------------------------------------------------------------------------*/
+
+#include <board.h>
+
+/*---------------------------------------------------------------------------
+ * Definitions
+ *---------------------------------------------------------------------------*/
+/** \addtogroup emacd_defines
+ @{*/
+
+/** \addtogroup emacd_buf_size EMACD Default Buffer Size
+ @{*/
+#define EMAC_RX_UNITSIZE 128 /**< Fixed size for RX buffer */
+#define EMAC_TX_UNITSIZE 1518 /**< Size for ETH frame length */
+/** @}*/
+
+/** \addtogroup emacd_rc EMACD Return Codes
+ @{*/
+#define EMACD_OK 0 /**< Operation OK */
+#define EMACD_TX_BUSY 1 /**< TX in progress */
+#define EMACD_RX_NULL 1 /**< No data received */
+/** Buffer size not enough */
+#define EMACD_SIZE_TOO_SMALL 2
+/** Parameter error, TX packet invalid or RX size too small */
+#define EMACD_PARAM 3
+/** Transter is not initialized */
+#define EMACD_NOT_INITIALIZED 4
+/** @}*/
+
+/** @}*/
+/*---------------------------------------------------------------------------
+ * Types
+ *---------------------------------------------------------------------------*/
+/** \addtogroup emacd_types
+ @{*/
+
+/** RX callback */
+typedef void (*fEmacdTransferCallback)(uint32_t status);
+/** Wakeup callback */
+typedef void (*fEmacdWakeupCallback)(void);
+
+/**
+ * EMAC driver struct.
+ */
+typedef struct _EmacDriver {
+
+ /** Pointer to HW register base */
+ Emac *pHw;
+
+ /** Pointer to allocated TX buffer
+ Section 3.6 of AMBA 2.0 spec states that burst should not cross
+ 1K Boundaries.
+ Receive buffer manager writes are burst of 2 words => 3 lsb bits
+ of the address shall be set to 0
+ */
+ uint8_t *pTxBuffer;
+ /** Pointer to allocated RX buffer */
+ uint8_t *pRxBuffer;
+
+ /** Pointer to Rx TDs (must be 8-byte aligned) */
+ sEmacRxDescriptor *pRxD;
+ /** Pointer to Tx TDs (must be 8-byte aligned) */
+ sEmacTxDescriptor *pTxD;
+
+ /** Optional callback to be invoked once a frame has been received */
+ fEmacdTransferCallback fRxCb;
+ /** Optional callback to be invoked once several TD have been released */
+ fEmacdWakeupCallback fWakupCb;
+ /** Optional callback list to be invoked once TD has been processed */
+ fEmacdTransferCallback *fTxCbList;
+
+ /** RX TD list size */
+ uint16_t wRxListSize;
+ /** RX index for current processing TD */
+ uint16_t wRxI;
+
+ /** TX TD list size */
+ uint16_t wTxListSize;
+ /** Circular buffer head pointer by upper layer (buffer to be sent) */
+ uint16_t wTxHead;
+ /** Circular buffer tail pointer incremented by handlers (buffer sent) */
+ uint16_t wTxTail;
+
+ /** Number of free TD before wakeup callback is invoked */
+ uint8_t bWakeupThreshold;
+ /** HW ID */
+ uint8_t bId;
+} sEmacd;
+
+/** @}*/
+
+/** \addtogroup emacd_functions
+ @{*/
+
+/*---------------------------------------------------------------------------
+ * PHY Exported functions
+ *---------------------------------------------------------------------------*/
+
+/*---------------------------------------------------------------------------
+ * EMAC Exported functions
+ *---------------------------------------------------------------------------*/
+
+extern void EMACD_Init( sEmacd *pEmacd,
+ Emac *pHw, uint8_t bID,
+ uint8_t bCAF, uint8_t bNBC);
+
+extern uint8_t EMACD_InitTransfer( sEmacd *pEmacd,
+ uint8_t *pRxBuffer, sEmacRxDescriptor *pRxD,
+ uint16_t wRxSize,
+ uint8_t *pTxBuffer, sEmacTxDescriptor *pTxD, fEmacdTransferCallback *pTxCb,
+ uint16_t wTxSize);
+
+extern void EMACD_SetRxCallback( sEmacd *pEmacd, fEmacdTransferCallback fRxCb);
+
+extern uint8_t EMACD_SetTxWakeupCallback( sEmacd *pEmacd,
+ fEmacdWakeupCallback fWakeup,
+ uint8_t bThreshold );
+
+extern void EMACD_Handler( sEmacd *pEmacd );
+
+extern void EMACD_Reset( sEmacd * pEmacd );
+
+extern uint8_t EMACD_Send(sEmacd * pEmacd,
+ void *pBuffer,
+ uint32_t size,
+ fEmacdTransferCallback fTxCallback);
+
+extern uint32_t EMACD_TxLoad( sEmacd *pEmacd );
+
+extern uint8_t EMACD_Poll(sEmacd * pEmacd,
+ uint8_t *pFrame,
+ uint32_t frameSize,
+ uint32_t *pRcvSize);
+
+/** @}*/
+
+#endif // #ifndef _EMACD_H_
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/hamming.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/hamming.h
new file mode 100644
index 0000000..e597b74
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/hamming.h
@@ -0,0 +1,69 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+ * \file hamming.h
+ *
+ * Include Defines & macros for hamming code.
+ */
+
+#ifndef _HAMMING_
+#define _HAMMING_
+
+/*------------------------------------------------------------------------------
+ * Defines
+ *------------------------------------------------------------------------------*/
+
+/**
+ * These are the possible errors when trying to verify a block of data encoded
+ * using a Hamming code:
+ *
+ * \section Errors
+ * - Hamming_ERROR_SINGLEBIT
+ * - Hamming_ERROR_ECC
+ * - Hamming_ERROR_MULTIPLEBITS
+ */
+
+/** A single bit was incorrect but has been recovered. */
+#define Hamming_ERROR_SINGLEBIT 1
+
+/** The original code has been corrupted. */
+#define Hamming_ERROR_ECC 2
+
+/** Multiple bits are incorrect in the data and they cannot be corrected. */
+#define Hamming_ERROR_MULTIPLEBITS 3
+
+/*------------------------------------------------------------------------------
+ * Exported functions
+ *------------------------------------------------------------------------------*/
+
+extern void Hamming_Compute256x( const uint8_t* pucData, uint32_t dwSize, uint8_t* pucCode ) ;
+
+extern uint8_t Hamming_Verify256x( uint8_t* pucData, uint32_t dwSize, const uint8_t* pucCode ) ;
+
+#endif /* _HAMMING_ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/hx8347.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/hx8347.h
new file mode 100644
index 0000000..b45873a
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/hx8347.h
@@ -0,0 +1,195 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+* \page
+*
+* \Purpose
+*
+* Definition of methods for HX8347 driver.
+*
+* \Usage
+*
+* -# LCD_WriteReg
+* -# LCD_ReadReg
+* -# LCD_ReadStatus
+* -# LCD_DumpReg
+* -# LCD_WriteRAM_Prepare
+* -# LCD_WriteRAM
+* -# LCD_ReadRAM_Prepare
+* -# LCD_ReadRAM
+* -# LCD_Initialize
+* -# LCD_SetCursor
+* -# LCD_On
+* -# LCD_Off
+*/
+
+/**
+ * \file hx8347.h
+ *
+ * Include Defines & macros for the lcdc of HX8347.
+ */
+
+#ifndef HX8347_H
+#define HX8347_H
+
+/*------------------------------------------------------------------------------
+ * Headers
+ *------------------------------------------------------------------------------*/
+
+#include <board.h>
+
+/*------------------------------------------------------------------------------
+ * Definitions
+ *------------------------------------------------------------------------------*/
+/** HX8347 LCD Registers */
+#define HX8347_R00H 0x00
+#define HX8347_R01H 0x01
+#define HX8347_R02H 0x02
+#define HX8347_R03H 0x03
+#define HX8347_R04H 0x04
+#define HX8347_R05H 0x05
+#define HX8347_R06H 0x06
+#define HX8347_R07H 0x07
+#define HX8347_R08H 0x08
+#define HX8347_R09H 0x09
+#define HX8347_R0AH 0x0A
+#define HX8347_R0CH 0x0C
+#define HX8347_R0DH 0x0D
+#define HX8347_R0EH 0x0E
+#define HX8347_R0FH 0x0F
+#define HX8347_R10H 0x10
+#define HX8347_R11H 0x11
+#define HX8347_R12H 0x12
+#define HX8347_R13H 0x13
+#define HX8347_R14H 0x14
+#define HX8347_R15H 0x15
+#define HX8347_R16H 0x16
+#define HX8347_R18H 0x18
+#define HX8347_R19H 0x19
+#define HX8347_R1AH 0x1A
+#define HX8347_R1BH 0x1B
+#define HX8347_R1CH 0x1C
+#define HX8347_R1DH 0x1D
+#define HX8347_R1EH 0x1E
+#define HX8347_R1FH 0x1F
+#define HX8347_R20H 0x20
+#define HX8347_R21H 0x21
+#define HX8347_R22H 0x22
+#define HX8347_R23H 0x23
+#define HX8347_R24H 0x24
+#define HX8347_R25H 0x25
+#define HX8347_R26H 0x26
+#define HX8347_R27H 0x27
+#define HX8347_R28H 0x28
+#define HX8347_R29H 0x29
+#define HX8347_R2AH 0x2A
+#define HX8347_R2BH 0x2B
+#define HX8347_R2CH 0x2C
+#define HX8347_R2DH 0x2D
+#define HX8347_R35H 0x35
+#define HX8347_R36H 0x36
+#define HX8347_R37H 0x37
+#define HX8347_R38H 0x38
+#define HX8347_R39H 0x39
+#define HX8347_R3AH 0x3A
+#define HX8347_R3BH 0x3B
+#define HX8347_R3CH 0x3C
+#define HX8347_R3DH 0x3D
+#define HX8347_R3EH 0x3E
+#define HX8347_R40H 0x40
+#define HX8347_R41H 0x41
+#define HX8347_R42H 0x42
+#define HX8347_R43H 0x43
+#define HX8347_R44H 0x44
+#define HX8347_R45H 0x45
+#define HX8347_R46H 0x46
+#define HX8347_R47H 0x47
+#define HX8347_R48H 0x48
+#define HX8347_R49H 0x49
+#define HX8347_R4AH 0x4A
+#define HX8347_R4BH 0x4B
+#define HX8347_R4CH 0x4C
+#define HX8347_R4DH 0x4D
+#define HX8347_R4EH 0x4E
+#define HX8347_R4FH 0x4F
+#define HX8347_R50H 0x50
+#define HX8347_R51H 0x51
+#define HX8347_R64H 0x64
+#define HX8347_R65H 0x65
+#define HX8347_R66H 0x66
+#define HX8347_R67H 0x67
+#define HX8347_R70H 0x70
+#define HX8347_R72H 0x72
+#define HX8347_R90H 0x90
+#define HX8347_R91H 0x91
+#define HX8347_R93H 0x93
+#define HX8347_R94H 0x94
+#define HX8347_R95H 0x95
+
+/** LCD index register address */
+#define LCD_IR (*((uint16_t *)(BOARD_LCD_BASE)))
+/** LCD status register address */
+#define LCD_SR (*((uint16_t *)(BOARD_LCD_BASE)))
+/** LCD data address (A1 is driving RS signal) */
+#define LCD_D (*((uint16_t *)((uint32_t)(BOARD_LCD_BASE) + (1 << 1))))
+
+/** Convert 24-bits color to 16-bits color */
+#define RGB24ToRGB16(color) (((color >> 8) & 0xF800) | \
+ ((color >> 5) & 0x7E0) | \
+ ((color >> 3) & 0x1F))
+
+typedef uint16_t LcdColor_t;
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+extern uint32_t LCD_Initialize( void ) ;
+extern void LCD_On( void ) ;
+extern void LCD_Off( void ) ;
+extern uint32_t LCD_SetColor( uint32_t color ) ;
+extern uint32_t LCD_DrawPixel( uint32_t x, uint32_t y ) ;
+extern uint32_t LCD_DrawLine ( uint32_t dwX1, uint32_t dwY1, uint32_t dwX2, uint32_t dwY2 ) ;
+extern uint32_t LCD_DrawCircle( uint32_t x, uint32_t y, uint32_t r );
+extern uint32_t LCD_DrawFilledCircle( uint32_t dwX, uint32_t dwY, uint32_t dwRadius ) ;
+extern uint32_t LCD_DrawRectangle( uint32_t dwX1, uint32_t dwY1, uint32_t dwX2, uint32_t dwY2 ) ;
+extern uint32_t LCD_DrawFilledRectangle( uint32_t dwX1, uint32_t dwY1, uint32_t dwX2, uint32_t dwY2 );
+extern uint32_t LCD_DrawPicture( uint32_t dwX1, uint32_t dwY1, uint32_t dwX2, uint32_t dwY2, const LcdColor_t *pBuffer );
+extern void LCD_SetBacklight( uint32_t level ) ;
+
+extern void LCD_SetWindow( uint32_t dwX, uint32_t dwY, uint32_t dwWidth, uint32_t dwHeight ) ;
+extern void LCD_SetCursor( uint32_t dwX, uint32_t dwY ) ;
+extern void LCD_SetDisplayLandscape( uint32_t dwRGB ) ;
+extern void LCD_SetDisplayPortrait( uint32_t dwRGB ) ;
+
+#define LCD_WriteRAM_Prepare() (WriteCmd( HX8347_R22H ))
+
+
+#endif //#ifndef HX8347_H
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/iso7816_4.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/iso7816_4.h
new file mode 100644
index 0000000..7e2d509
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/iso7816_4.h
@@ -0,0 +1,38 @@
+/**
+ * \file iso7816_4.h
+ *
+ * Include Defines & function prototype for the iso7816 functions.
+ */
+
+#ifndef _ISO7816_4_
+#define _ISO7816_4_
+
+/*------------------------------------------------------------------------------
+ * Constants Definition
+ *----------------------------------------------------------------------------*/
+
+/** Size max of Answer To Reset */
+#define ATR_SIZE_MAX 55
+
+/** NULL byte to restart byte procedure */
+#define ISO_NULL_VAL 0x60
+
+/*------------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+extern void ISO7816_Init( const Pin pPinIso7816RstMC ) ;
+extern void ISO7816_IccPowerOff( void ) ;
+extern uint16_t ISO7816_XfrBlockTPDU_T0( const uint8_t *pAPDU, uint8_t *pMessage, uint16_t wLength ) ;
+extern void ISO7816_Escape( void ) ;
+extern void ISO7816_RestartClock( void ) ;
+extern void ISO7816_StopClock( void ) ;
+extern void ISO7816_toAPDU( void ) ;
+extern void ISO7816_Datablock_ATR( uint8_t* pAtr, uint8_t* pLength ) ;
+extern void ISO7816_SetDataRateandClockFrequency( uint32_t dwClockFrequency, uint32_t dwDataRate ) ;
+extern uint8_t ISO7816_StatusReset( void ) ;
+extern void ISO7816_cold_reset( void ) ;
+extern void ISO7816_warm_reset( void ) ;
+extern void ISO7816_Decode_ATR( uint8_t* pAtr ) ;
+
+#endif /* _ISO7816_4_ */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/lcd_color.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/lcd_color.h
new file mode 100644
index 0000000..8bae812
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/lcd_color.h
@@ -0,0 +1,85 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+#ifndef COLOR_H
+#define COLOR_H
+
+/**
+ * \file
+ *
+ * RGB 24-bits color table definition.
+ *
+ */
+
+/*
+ * RGB 24 Bpp
+ * RGB 888
+ * R7R6R5R4 R3R2R1R0 G7G6G5G4 G3G2G1G0 B7B6B5B4 B3B2B1B0
+ */
+#define COLOR_BLACK 0x000000
+#define COLOR_WHITE 0xFFFFFF
+
+#define COLOR_BLUE 0x0000FF
+#define COLOR_GREEN 0x00FF00
+#define COLOR_RED 0xFF0000
+
+#define COLOR_NAVY 0x000080
+#define COLOR_DARKBLUE 0x00008B
+#define COLOR_DARKGREEN 0x006400
+#define COLOR_DARKCYAN 0x008B8B
+#define COLOR_CYAN 0x00FFFF
+#define COLOR_TURQUOISE 0x40E0D0
+#define COLOR_INDIGO 0x4B0082
+#define COLOR_DARKRED 0x800000
+#define COLOR_OLIVE 0x808000
+#define COLOR_GRAY 0x808080
+#define COLOR_SKYBLUE 0x87CEEB
+#define COLOR_BLUEVIOLET 0x8A2BE2
+#define COLOR_LIGHTGREEN 0x90EE90
+#define COLOR_DARKVIOLET 0x9400D3
+#define COLOR_YELLOWGREEN 0x9ACD32
+#define COLOR_BROWN 0xA52A2A
+#define COLOR_DARKGRAY 0xA9A9A9
+#define COLOR_SIENNA 0xA0522D
+#define COLOR_LIGHTBLUE 0xADD8E6
+#define COLOR_GREENYELLOW 0xADFF2F
+#define COLOR_SILVER 0xC0C0C0
+#define COLOR_LIGHTGREY 0xD3D3D3
+#define COLOR_LIGHTCYAN 0xE0FFFF
+#define COLOR_VIOLET 0xEE82EE
+#define COLOR_AZUR 0xF0FFFF
+#define COLOR_BEIGE 0xF5F5DC
+#define COLOR_MAGENTA 0xFF00FF
+#define COLOR_TOMATO 0xFF6347
+#define COLOR_GOLD 0xFFD700
+#define COLOR_ORANGE 0xFFA500
+#define COLOR_SNOW 0xFFFAFA
+#define COLOR_YELLOW 0xFFFF00
+
+#endif /* #define COLOR_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/lcd_font.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/lcd_font.h
new file mode 100644
index 0000000..d925257
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/lcd_font.h
@@ -0,0 +1,93 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2011, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * Interface for draw font and string on LCD.
+ *
+ */
+
+/**
+ * \section Purpose
+ *
+ * The lcd_font.h file declares a font structure and a LCD_DrawChar function
+ * that must be implemented by a font definition file to be used with the
+ * LCD_DrawString method.
+ *
+ * The lcd_font10x14.c implements the necessary variable and function for a 10x14
+ * font.
+ *
+ * \section Usage
+ *
+ * -# Declare a gFont global variable with the necessary Font information.
+ * -# Implement an LCD_DrawChar function which displays the specified
+ * character on the LCD.
+ * -# Use the LCD_DrawString method to display a complete string.
+ */
+
+#ifndef _LCD_FONT_
+#define _LCD_FONT_
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include <stdint.h>
+
+/*----------------------------------------------------------------------------
+ * Types
+ *----------------------------------------------------------------------------*/
+
+
+/** \brief Describes the font (width, height, supported characters, etc.) used by
+ * the LCD driver draw API.
+ */
+typedef struct _Font {
+ /* Font width in pixels. */
+ uint8_t ucWidth;
+ /* Font height in pixels. */
+ uint8_t ucHeight;
+} Font;
+
+/*----------------------------------------------------------------------------
+ * Variables
+ *----------------------------------------------------------------------------*/
+
+/** Global variable describing the font being instancied. */
+extern const Font gFont;
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+extern void LCD_DrawChar( uint32_t dwX, uint32_t dwY, uint8_t ucChar ) ;
+extern void LCD_DrawString( uint32_t dwX, uint32_t dwY, const uint8_t *pString ) ;
+
+#endif /* #ifndef LCD_FONT_ */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/lcd_font10x14.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/lcd_font10x14.h
new file mode 100644
index 0000000..ec98aca
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/lcd_font10x14.h
@@ -0,0 +1,45 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+ /**
+ * \file
+ *
+ * Font 10x14 table definition.
+ *
+ */
+
+#ifndef _LCD_FONT_10x14_
+#define _LCD_FONT_10x14_
+
+#include <stdint.h>
+
+/** Char set of font 10x14 */
+extern const uint8_t pCharset10x14[] ;
+
+#endif /* #ifdef _LCD_FONT_10x14_ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/lcd_gimp_image.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/lcd_gimp_image.h
new file mode 100644
index 0000000..7594d0d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/lcd_gimp_image.h
@@ -0,0 +1,20 @@
+/**
+ * \file lcd_gimp_image.h
+ *
+ * Include Defines for the the lcd images.
+ */
+
+#ifndef _GIMP_IMAGE_
+#define _GIMP_IMAGE_
+
+#include <stdint.h>
+
+typedef struct _SGIMPImage
+{
+ uint32_t dwWidth;
+ uint32_t dwHeight;
+ uint32_t dwBytes_per_pixel; /* 3:RGB, 4:RGBA */
+ uint8_t* pucPixel_data ;
+} SGIMPImage ;
+
+#endif // _GIMP_IMAGE_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/lcdd.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/lcdd.h
new file mode 100644
index 0000000..af29f58
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/lcdd.h
@@ -0,0 +1,52 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * Interface for LCD driver.
+ *
+ */
+
+#ifndef LCDD_H
+#define LCDD_H
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+extern void LCDD_Initialize(void);
+
+extern void LCDD_On(void);
+
+extern void LCDD_Off(void);
+
+extern void LCDD_SetBacklight (uint32_t step);
+
+#endif /* #ifndef LCDD_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/led.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/led.h
new file mode 100644
index 0000000..aeacc5b
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/led.h
@@ -0,0 +1,72 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * \section Purpose
+ *
+ * Small set of functions for simple and portable LED usage.
+ *
+ * \section Usage
+ *
+ * -# Configure one or more LEDs using LED_Configure and
+ * LED_ConfigureAll.
+ * -# Set, clear and toggle LEDs using LED_Set, LED_Clear and
+ * LED_Toggle.
+ *
+ * LEDs are numbered starting from 0; the number of LEDs depend on the
+ * board being used. All the functions defined here will compile properly
+ * regardless of whether the LED is defined or not; they will simply
+ * return 0 when a LED which does not exist is given as an argument.
+ * Also, these functions take into account how each LED is connected on to
+ * board; thus, \ref LED_Set might change the level on the corresponding pin
+ * to 0 or 1, but it will always light the LED on; same thing for the other
+ * methods.
+ */
+
+#ifndef _LED_
+#define _LED_
+
+#include <stdint.h>
+
+//------------------------------------------------------------------------------
+// Global Functions
+//------------------------------------------------------------------------------
+
+extern uint32_t LED_Configure( uint32_t dwLed ) ;
+
+extern uint32_t LED_Set( uint32_t dwLed ) ;
+
+extern uint32_t LED_Clear( uint32_t dwLed ) ;
+
+extern uint32_t LED_Toggle( uint32_t dwLed ) ;
+
+#endif /* #ifndef LED_H */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/macb.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/macb.h
new file mode 100644
index 0000000..82ebd86
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/macb.h
@@ -0,0 +1,129 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/** \file */
+
+/** \addtogroup macb_module Ethernet MACB Driver
+ *@{
+ * Implement EMAC PHY driver, that initialize the PHY to prepare for
+ * ethernet transfer.
+ *
+ * \section Usage
+ * -# EMAC related pins and Driver should be initialized at first.
+ * -# MAC address is set via EMAC_SetAddress().
+ * -# Initialize MACB Driver instance by invoking MACB_Init().
+ * -# Initialize PHY connected via MACB_InitPhy(), PHY address is
+ * automatically adjusted by attempt to read.
+ * -# Perform PHY auto negotiate through MACB_AutoNegotiate(), so
+ * connection established.
+ * -# Setup link speed by MACB_GetLinkSpeed() so link speed and
+ * duplex mode is desided.
+ * -# Now its time to send/receive ethernet packets via EMAC Driver
+ * - EMACD_Poll(): Polling received packets.
+ * - EMACD_Send(): Send a packet.
+ *
+ * \sa \ref emacd_module
+ *
+ * Related files:\n
+ * \ref macb.h\n
+ * \ref macb.c\n
+ * \ref mii.h.\n
+ *
+ * \defgroup eth_phy_mii MII/RMII Mode for PHY connection
+ * \defgroup macb_defines MACB Defines
+ * \defgroup macb_structs MACB Structs
+ * \defgroup macb_functions MACB Functions
+ */
+/**@}*/
+
+#ifndef _MACB_H
+#define _MACB_H
+
+/*---------------------------------------------------------------------------
+ * Headers
+ *---------------------------------------------------------------------------*/
+
+#include <board.h>
+
+/*---------------------------------------------------------------------------
+ * Definitions
+ *---------------------------------------------------------------------------*/
+/** \addtogroup macb_defines
+ @{*/
+
+/** The reset length setting for external reset configuration */
+#define MACB_RESET_LENGTH 0xD
+
+/** @}*/
+/*---------------------------------------------------------------------------
+ * Types
+ *---------------------------------------------------------------------------*/
+/** \addtogroup macb_structs
+ @{*/
+
+/** The DM9161 instance */
+typedef struct _Macb {
+ sEmacd *pEmacd; /**< Driver */
+ uint32_t retryMax; /**< The retry & timeout settings */
+ uint8_t phyAddress; /**< PHY address ( pre-defined by pins on reset ) */
+ uint8_t speed; /**< 100M/10M speed */
+ uint8_t fullDuplex; /**< Full duplex mode */
+ uint8_t RMII; /**< RMII/MII mode */
+} Macb;
+
+/** @}*/
+/*---------------------------------------------------------------------------
+ * Exported functions
+ *---------------------------------------------------------------------------*/
+/** \addtogroup macb_functions
+ @{*/
+
+extern void MACB_SetupTimeout(Macb *pMacb, uint32_t toMax);
+
+extern void MACB_Init(Macb *pMacb, sEmacd *pEmacd, uint8_t phyAddress);
+
+extern uint8_t MACB_InitPhy(Macb *pMacb,
+ uint32_t mck,
+ const Pin *pEmacPins,
+ uint32_t nbEmacPins);
+
+extern uint8_t MACB_FindValidPhy(Macb * pMacb,uint8_t addrStart);
+
+extern uint8_t MACB_ResetPhy(Macb * pMacb);
+
+extern uint8_t MACB_AutoNegotiate(Macb *pMacb, uint8_t rmiiMode);
+
+extern uint8_t MACB_GetLinkSpeed(Macb *pMacb,
+ uint8_t applySettings);
+
+extern void MACB_DumpRegisters(Macb * pMacb);
+
+/** @}*/
+#endif // #ifndef _MACB_H
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/math.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/math.h
new file mode 100644
index 0000000..e42343a
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/math.h
@@ -0,0 +1,47 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+ /**
+ * \file math.h
+ *
+ * Include function prototype for the math.
+ */
+
+#ifndef _MATH_
+#define _MATH_
+
+/*------------------------------------------------------------------------------
+ * Exported functions
+ *------------------------------------------------------------------------------*/
+
+extern uint32_t min( uint32_t dwA, uint32_t dwB ) ;
+extern uint32_t absv( int32_t lValue ) ;
+extern uint32_t power( uint32_t dwX, uint32_t dwY ) ;
+
+#endif /* #ifndef _MATH_ */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/mii.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/mii.h
new file mode 100644
index 0000000..bf62ea7
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/mii.h
@@ -0,0 +1,200 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+ /**
+ * \file mii.h
+ *
+ * Include Defines for the MII.
+ */
+
+#ifndef _MII_
+#define _MII_
+
+/** \addtogroup eth_phy_mii
+ @{*/
+
+/*---------------------------------------------------------------------------
+ * Definitions
+ *---------------------------------------------------------------------------*/
+
+/** \addtogroup mii_registers PHY registers Addresses
+ @{*/
+#define MII_BMCR 0 /**< Basic Mode Control Register */
+#define MII_BMSR 1 /**< Basic Mode Status Register */
+#define MII_PHYID1 2 /**< PHY Idendifier Register 1 */
+#define MII_PHYID2 3 /**< PHY Idendifier Register 2 */
+#define MII_ANAR 4 /**< Auto_Negotiation Advertisement Register */
+#define MII_ANLPAR 5 /**< Auto_negotiation Link Partner Ability Register */
+#define MII_ANER 6 /**< Auto-negotiation Expansion Register */
+#define MII_DSCR 16 /**< Specified Configuration Register */
+#define MII_DSCSR 17 /**< Specified Configuration and Status Register */
+#define MII_10BTCSR 18 /**< 10BASE-T Configuration and Satus Register */
+#define MII_PWDOR 19 /**< Power Down Control Register */
+#define MII_CONFIGR 20 /**< Specified config Register */
+#define MII_MDINTR 21 /**< Specified Interrupt Register */
+#define MII_RECR 22 /**< Specified Receive Error Counter Register */
+#define MII_DISCR 23 /**< Specified Disconnect Counter Register */
+#define MII_RLSR 24 /**< Hardware Reset Latch State Register */
+/** @}*/
+
+/** \addtogroup phy_bmcr Basic Mode Control Register (BMCR, 0)
+ List Bit definitions: \ref MII_BMCR
+ @{*/
+#define MII_RESET (1u << 15) /**< 1= Software Reset; 0=Normal Operation */
+#define MII_LOOPBACK (1u << 14) /**< 1=loopback Enabled; 0=Normal Operation */
+#define MII_SPEED_SELECT (1u << 13) /**< 1=100Mbps; 0=10Mbps */
+#define MII_AUTONEG (1u << 12) /**< Auto-negotiation Enable */
+#define MII_POWER_DOWN (1u << 11) /**< 1=Power down 0=Normal operation */
+#define MII_ISOLATE (1u << 10) /**< 1 = Isolates 0 = Normal operation */
+#define MII_RESTART_AUTONEG (1u << 9) /**< 1 = Restart auto-negotiation 0 = Normal operation */
+#define MII_DUPLEX_MODE (1u << 8) /**< 1 = Full duplex operation 0 = Normal operation */
+#define MII_COLLISION_TEST (1u << 7) /**< 1 = Collision test enabled 0 = Normal operation */
+/** Reserved bits: 6 to 0, Read as 0, ignore on write */
+/** @}*/
+
+/** \addtogroup phy_bmsr Basic Mode Status Register (BMSR, 1)
+ List Bit definitions: \ref MII_BMSR
+ @{*/
+#define MII_100BASE_T4 (1u << 15) /**< 100BASE-T4 Capable */
+#define MII_100BASE_TX_FD (1u << 14) /**< 100BASE-TX Full Duplex Capable */
+#define MII_100BASE_T4_HD (1u << 13) /**< 100BASE-TX Half Duplex Capable */
+#define MII_10BASE_T_FD (1u << 12) /**< 10BASE-T Full Duplex Capable */
+#define MII_10BASE_T_HD (1u << 11) /**< 10BASE-T Half Duplex Capable */
+/** Reserved bits: 10 to 7, Read as 0, ignore on write */
+#define MII_MF_PREAMB_SUPPR (1u << 6) /**< MII Frame Preamble Suppression */
+#define MII_AUTONEG_COMP (1u << 5) /**< Auto-negotiation Complete */
+#define MII_REMOTE_FAULT (1u << 4) /**< Remote Fault */
+#define MII_AUTONEG_ABILITY (1u << 3) /**< Auto Configuration Ability */
+#define MII_LINK_STATUS (1u << 2) /**< Link Status */
+#define MII_JABBER_DETECT (1u << 1) /**< Jabber Detect */
+#define MII_EXTEND_CAPAB (1u << 0) /**< Extended Capability */
+/** @}*/
+
+/** \addtogroup phy_id PHY ID Identifier Register (PHYID, 2,3)
+ List definitions: \ref MII_PHYID1, \ref MII_PHYID2
+ @{*/
+#define MII_LSB_MASK 0x3F /**< Mask for PHY ID LSB */
+
+
+#define MII_OUI_MSB 0x0181 /** Davicom PHY OUI MSB */
+#define MII_OUI_LSB 0x2E /** Davicom PHY OUI LSB */
+/** @}*/
+
+/** \addtogroup phy_neg Auto-negotiation (ANAR, 4; ANLPAR, 5)
+ - Auto-negotiation Advertisement Register (ANAR)
+ - Auto-negotiation Link Partner Ability Register (ANLPAR)
+ Lists Bit definitions: \ref MII_ANAR, \ref MII_ANLPAR
+ @{*/
+#define MII_NP (1u << 15) /**< Next page Indication */
+#define MII_ACK (1u << 14) /**< Acknowledge */
+#define MII_RF (1u << 13) /**< Remote Fault */
+/** Reserved: 12 to 11, Write as 0, ignore on read */
+#define MII_FCS (1u << 10) /**< Flow Control Support */
+#define MII_T4 (1u << 9) /**< 100BASE-T4 Support */
+#define MII_TX_FDX (1u << 8) /**< 100BASE-TX Full Duplex Support */
+#define MII_TX_HDX (1u << 7) /**< 100BASE-TX Support */
+#define MII_10_FDX (1u << 6) /**< 10BASE-T Full Duplex Support */
+#define MII_10_HDX (1u << 5) /**< 10BASE-T Support */
+/** Selector: 4 to 0, Protocol Selection Bits */
+#define MII_AN_IEEE_802_3 0x0001
+/** @}*/
+
+/** \addtogroup phy_neg_exp Auto-negotiation Expansion Register (ANER, 6)
+ List Bit definitions: \ref MII_ANER
+ @{*/
+/** Reserved: 15 to 5, Read as 0, ignore on write */
+#define MII_PDF (1u << 4) /**< Local Device Parallel Detection Fault */
+#define MII_LP_NP_ABLE (1u << 3) /**< Link Partner Next Page Able */
+#define MII_NP_ABLE (1u << 2) /**< Local Device Next Page Able */
+#define MII_PAGE_RX (1u << 1) /**< New Page Received */
+#define MII_LP_AN_ABLE (1u << 0) /**< Link Partner Auto-negotiation Able */
+/** @}*/
+
+/** \addtogroup phy_dscr Specified Configuration Register (DSCR, 16)
+ List Bit definitions: \ref MII_DSCR
+ @{*/
+#define MII_BP4B5B (1u << 15) /**< Bypass 4B5B Encoding and 5B4B Decoding */
+#define MII_BP_SCR (1u << 14) /**< Bypass Scrambler/Descrambler Function */
+#define MII_BP_ALIGN (1u << 13) /**< Bypass Symbol Alignment Function */
+#define MII_BP_ADPOK (1u << 12) /**< BYPASS ADPOK */
+#define MII_REPEATER (1u << 11) /**< Repeater/Node Mode */
+#define MII_TX (1u << 10) /**< 100BASE-TX Mode Control */
+#define MII_FEF (1u << 9) /**< Far end Fault enable */
+#define MII_RMII_ENABLE (1u << 8) /**< Reduced MII Enable */
+#define MII_F_LINK_100 (1u << 7) /**< Force Good Link in 100Mbps */
+#define MII_SPLED_CTL (1u << 6) /**< Speed LED Disable */
+#define MII_COLLED_CTL (1u << 5) /**< Collision LED Enable */
+#define MII_RPDCTR_EN (1u << 4) /**< Reduced Power Down Control Enable */
+#define MII_SM_RST (1u << 3) /**< Reset State Machine */
+#define MII_MFP_SC (1u << 2) /**< MF Preamble Suppression Control */
+#define MII_SLEEP (1u << 1) /**< Sleep Mode */
+#define MII_RLOUT (1u << 0) /**< Remote Loopout Control */
+/** @}*/
+
+/** \addtogroup phy_dscsr Specified Configuration and Status Register (DSCSR, 17)
+ List Bit definitions: \ref MII_DSCSR
+ @{*/
+#define MII_100FDX (1u << 15) /**< 100M Full Duplex Operation Mode */
+#define MII_100HDX (1u << 14) /**< 100M Half Duplex Operation Mode */
+#define MII_10FDX (1u << 13) /**< 10M Full Duplex Operation Mode */
+#define MII_10HDX (1u << 12) /**< 10M Half Duplex Operation Mode */
+/** @}*/
+
+/** \addtogroup phy_10btcsr 10BASE-T Configuration/Status (10BTCSR, 18)
+ List Bit definitions: \ref MII_10BTCSR
+ @{*/
+/** Reserved: 18 to 15, Read as 0, ignore on write */
+#define MII_LP_EN (1u << 14) /**< Link Pulse Enable */
+#define MII_HBE (1u << 13) /**< Heartbeat Enable */
+#define MII_SQUELCH (1u << 12) /**< Squelch Enable */
+#define MII_JABEN (1u << 11) /**< Jabber Enable */
+#define MII_10BT_SER (1u << 10) /**< 10BASE-T GPSI Mode */
+/** Reserved: 9 to 1, Read as 0, ignore on write */
+#define MII_POLR (1u << 0) /**< Polarity Reversed */
+/** @}*/
+
+/** \addtogroup phy_mdintr Specified Interrupt Register (MDINTR, 21)
+ List Bit definitions: \ref MII_MDINTR
+ @{*/
+#define MII_INTR_PEND (1u << 15) /**< Interrupt Pending */
+/** Reserved: 14 to 12, Reserved */
+#define MII_FDX_MASK (1u << 11) /**< Full-duplex Interrupt Mask */
+#define MII_SPD_MASK (1u << 10) /**< Speed Interrupt Mask */
+#define MII_LINK_MASK (1u << 9) /**< Link Interrupt Mask */
+#define MII_INTR_MASK (1u << 8) /**< Master Interrupt Mask */
+/** Reserved: 7 to 5, Reserved */
+#define MII_FDX_CHANGE (1u << 4) /**< Duplex Status Change Interrupt */
+#define MII_SPD_CHANGE (1u << 3) /**< Speed Status Change Interrupt */
+#define MII_LINK_CHANGE (1u << 2) /**< Link Status Change Interrupt */
+/** Reserved: 1, Reserved */
+#define MII_INTR_STATUS (1u << 0) /**< Interrupt Status */
+/** @}*/
+
+/**@}*/
+#endif // #ifndef _MII_
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/rand.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/rand.h
new file mode 100644
index 0000000..01ee7b7
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/rand.h
@@ -0,0 +1,48 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * \section Purpose
+ * Small function for gererating random number.
+ *
+ */
+
+#ifndef _RAND_
+#define _RAND_
+
+/*------------------------------------------------------------------------------
+ * Global Functions
+ *------------------------------------------------------------------------------*/
+
+extern void srand( uint32_t dwSeed ) ;
+extern int rand( void ) ;
+
+#endif /* #ifndef _RAND_ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/sn65hvd234.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/sn65hvd234.h
new file mode 100644
index 0000000..b3e3d65
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/sn65hvd234.h
@@ -0,0 +1,72 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+ /**
+ * \file
+ *
+ * Include Defines & macros for the SN65HVD234.
+ */
+
+#ifndef _CAN_SN65HVD234_
+#define _CAN_SN65HVD234_
+
+#include "board.h"
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+
+typedef struct _SSN65HVD234_Data
+{
+ /** PIO dedicated to Rs pin */
+ Pio* pPIO_Rs ;
+ /** Rs Pin on PIO */
+ uint32_t dwPin_Rs ;
+
+ /** PIO dedicated to EN pin */
+ Pio* pPIO_EN ;
+ /** EN Pin on PIO */
+ uint32_t dwPin_EN ;
+} SSN65HVD234_Data ;
+
+extern uint32_t SN65HVD234_Init( SSN65HVD234_Data* pComponent ) ;
+extern uint32_t SN65HVD234_SetRs( SSN65HVD234_Data* pComponent, Pio* pPIO_Rs, uint32_t dwPin_Rs ) ;
+extern uint32_t SN65HVD234_SetEN( SSN65HVD234_Data* pComponent, Pio* pPIO_EN, uint32_t dwPin_EN ) ;
+
+extern uint32_t SN65HVD234_Enable( SSN65HVD234_Data* pComponent ) ;
+extern uint32_t SN65HVD234_Disable( SSN65HVD234_Data* pComponent ) ;
+
+extern uint32_t SN65HVD234_EnableLowPower( SSN65HVD234_Data* pComponent ) ;
+extern uint32_t SN65HVD234_DisableLowPower( SSN65HVD234_Data* pComponent ) ;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _CAN_SN65HVD234_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/spid_dma.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/spid_dma.h
new file mode 100644
index 0000000..334c742
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/spid_dma.h
@@ -0,0 +1,147 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2011, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * Implementation of SPI driver, transfer data through DMA.
+ *
+ */
+
+#ifndef _SPI_DMA_
+#define _SPI_DMA_
+
+/*----------------------------------------------------------------------------
+ * Headers
+
+*----------------------------------------------------------------------------*/
+
+#include "board.h"
+
+/*----------------------------------------------------------------------------
+ * Definitions
+
+*----------------------------------------------------------------------------*/
+
+/** An unspecified error has occured.*/
+#define SPID_ERROR 1
+
+/** SPI driver is currently in use.*/
+#define SPID_ERROR_LOCK 2
+
+/*----------------------------------------------------------------------------
+ * Macros
+
+*----------------------------------------------------------------------------*/
+
+/** Calculates the value of the SCBR field of the Chip Select Register given MCK and SPCK.*/
+#define SPID_CSR_SCBR(mck, spck) SPI_CSR_SCBR((mck) / (spck))
+
+/** Calculates the value of the DLYBS field of the Chip Select Register given delay in ns and MCK.*/
+#define SPID_CSR_DLYBS(mck, delay) SPI_CSR_DLYBS((((delay) * ((mck) / 1000000)) / 1000) + 1)
+
+/** Calculates the value of the DLYBCT field of the Chip Select Register given delay in ns and MCK.*/
+#define SPID_CSR_DLYBCT(mck, delay) SPI_CSR_DLYBCT((((delay) / 32 * ((mck) / 1000000)) / 1000) + 1)
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/*----------------------------------------------------------------------------
+ * Types
+ *----------------------------------------------------------------------------*/
+
+/** SPI transfer complete callback. */
+typedef void (*SpidCallback)( uint8_t, void* ) ;
+
+/** \brief Spi Transfer Request prepared by the application upper layer.
+ *
+ * This structure is sent to the SPI_SendCommand function to start the transfer.
+ * At the end of the transfer, the callback is invoked by the interrupt handler.
+ */
+typedef struct _SpidCmd
+{
+ /** Pointer to the command data. */
+ uint8_t *pCmd;
+ /** Command size in bytes. */
+ uint8_t cmdSize;
+ /** Pointer to the data to be sent. */
+ uint8_t *pData;
+ /** Data size in bytes. */
+ unsigned short dataSize;
+ /** SPI chip select. */
+ uint8_t spiCs;
+ /** Callback function invoked at the end of transfer. */
+ SpidCallback callback;
+ /** Callback arguments. */
+ void *pArgument;
+} SpidCmd ;
+
+/** Constant structure associated with SPI port. This structure prevents
+ client applications to have access in the same time. */
+typedef struct _Spid
+{
+ /** Pointer to SPI Hardware registers */
+ Spi* pSpiHw ;
+ /** SPI Id as defined in the product datasheet */
+ char spiId ;
+ /** Pointer to DMA driver */
+ sDmad* pDmad;
+ /** Current SpiCommand being processed */
+ SpidCmd *pCurrentCommand ;
+ /** Mutual exclusion semaphore. */
+ volatile char semaphore ;
+} Spid ;
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+
+*----------------------------------------------------------------------------*/
+
+extern uint32_t SPID_Configure( Spid* pSpid,
+ Spi* pSpiHw,
+ uint8_t spiId,
+ sDmad* pDmad ) ;
+
+extern void SPID_ConfigureCS( Spid* pSpid, uint32_t dwCS, uint32_t dwCsr ) ;
+
+extern uint32_t SPID_SendCommand( Spid* pSpid, SpidCmd* pCommand ) ;
+
+extern void SPID_Handler( Spid* pSpid ) ;
+
+extern void SPID_DmaHandler( Spid *pSpid );
+
+extern uint32_t SPID_IsBusy( const Spid* pSpid ) ;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* #ifndef _SPI_DMA_ */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/syscalls.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/syscalls.h
new file mode 100644
index 0000000..e9e9325
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/syscalls.h
@@ -0,0 +1,65 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file syscalls.h
+ *
+ * Implementation of newlib syscall.
+ *
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+
+#include <stdio.h>
+#include <stdarg.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+extern caddr_t _sbrk ( int incr ) ;
+
+extern int link( char *old, char *new ) ;
+
+extern int _close( int file ) ;
+
+extern int _fstat( int file, struct stat *st ) ;
+
+extern int _isatty( int file ) ;
+
+extern int _lseek( int file, int ptr, int dir ) ;
+
+extern int _read(int file, char *ptr, int len) ;
+
+extern int _write( int file, char *ptr, int len ) ;
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/timetick.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/timetick.h
new file mode 100644
index 0000000..ec48a6d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/timetick.h
@@ -0,0 +1,80 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * \par Purpose
+ *
+ * Methods and definitions for Global time tick and wait functions.
+ *
+ * Defines a common and simpliest use of Time Tick, to increase tickCount
+ * every 1ms, the application can get this value through GetTickCount().
+ *
+ * \par Usage
+ *
+ * -# Configure the System Tick with TimeTick_Configure() when MCK changed
+ * \note
+ * Must be done before any invoke of GetTickCount(), Wait() or Sleep().
+ * -# Uses GetTickCount to get current tick value.
+ * -# Uses Wait to wait several ms.
+ * -# Uses Sleep to enter wait for interrupt mode to wait several ms.
+ *
+ */
+
+#ifndef _TIMETICK_
+#define _TIMETICK_
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include <stdint.h>
+
+/*----------------------------------------------------------------------------
+ * Definitions
+ *----------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------
+ * Global functions
+ *----------------------------------------------------------------------------*/
+
+extern uint32_t TimeTick_Configure( uint32_t dwNew_MCK ) ;
+
+extern void TimeTick_Increment( void ) ;
+
+extern uint32_t GetTickCount( void ) ;
+
+extern uint32_t GetSecondCount( void ) ;
+
+extern void Wait( volatile uint32_t dwMs ) ;
+
+extern void Sleep( volatile uint32_t dwMs ) ;
+
+#endif /* _TIMETICK_ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/tsd.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/tsd.h
new file mode 100644
index 0000000..7639349
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/tsd.h
@@ -0,0 +1,69 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * Interface for touchscreen driver which includes touchscreen calibration,
+ * retrieving measurements etc.
+ *
+ * \par Usage
+ *
+ * -# Call TSD_Initialize() whenever the touchscreen should start the
+ * calibration process (as it is done in the function).
+ * -# Declare a global TSD_PenPressed function anywhere in your code. This
+ * function will get called every time the pen is pressed on the screen.
+ * -# Declare a global TSD_PenMoved function, which will get called whenever
+ * the pen stays in contact with the screen but changes position.
+ * -# Declare a global TSD_PenReleased function, which will be invoked as the
+ * pen is lifted from the screen.
+ */
+
+#ifndef _TSD_
+#define _TSD_
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "tsd_com.h"
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+extern void TSD_Initialize( int8_t calEn ) ;
+
+extern uint8_t TSD_Calibrate( void ) ;
+
+extern void TSD_Reset( void ) ;
+
+extern void TSD_TimerHandler( void ) ;
+
+#endif /* #ifndef _TSD_ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/tsd_ads7843.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/tsd_ads7843.h
new file mode 100644
index 0000000..4ba25fa
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/tsd_ads7843.h
@@ -0,0 +1,54 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * Interface for touchscreen driver device
+ */
+
+#ifndef _TSD_ADS7843_
+#define _TSD_ADS7843_
+
+/*----------------------------------------------------------------------------
+ * External functions
+ *----------------------------------------------------------------------------*/
+extern void TSD_PenPressed( uint32_t x, uint32_t y ) ;
+extern void TSD_PenMoved( uint32_t x, uint32_t y ) ;
+extern void TSD_PenReleased( uint32_t x, uint32_t y ) ;
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+extern void TSD_GetRawMeasurement( uint32_t *pdwData ) ;
+extern void TSD_WaitPenPressed( void ) ;
+extern void TSD_WaitPenReleased( void ) ;
+
+#endif /* #ifndef _TSD_ADS7843_ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/tsd_com.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/tsd_com.h
new file mode 100644
index 0000000..3b93227
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/tsd_com.h
@@ -0,0 +1,53 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2011, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * Interface for touchscreen driver device irrelevance code.
+ */
+
+#ifndef _TSD_COM_
+#define _TSD_COM_
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+extern void TSDCom_InterpolateMeasurement( const uint32_t *pData, uint32_t *pPoint ) ;
+
+uint8_t TSDCom_Calibrate( void ) ;
+
+uint8_t TSDCom_IsCalibrationOk( void ) ;
+
+void TSDCom_ReadCalibrateData( void *pBuffer, uint32_t dwSize ) ;
+void TSDCom_RestoreCalibrateData( void *pBuffer, uint32_t dwSize ) ;
+
+#endif /* #ifndef _TSD_COM_ */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/twid.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/twid.h
new file mode 100644
index 0000000..0992bd2
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/twid.h
@@ -0,0 +1,150 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+ /**
+ * \file
+ *
+ * Include Defines & macros for the twi device driver.
+ */
+
+#ifndef _TWID_
+#define _TWID_
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "chip.h"
+
+#include <stdint.h>
+
+/*----------------------------------------------------------------------------
+ * Definition
+ *----------------------------------------------------------------------------*/
+/** TWI DMA transfer is supported */
+#define USE_TWI_DMA
+
+/** TWI driver is currently busy. */
+#define TWID_ERROR_BUSY 1
+
+/** Twi normal transfer type */
+#define TWID_TRANSFER_TYPE_NORMAL 0
+
+/** Twi PDC transfer type */
+#define TWID_TRANSFER_TYPE_PDC 1
+
+#ifdef USE_TWI_DMA
+/** Twi DMA transfer type */
+#define TWID_TRANSFER_TYPE_DMA 2
+#endif //#ifdef USE_TWI_DMA
+
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/*----------------------------------------------------------------------------
+ * Types
+ *----------------------------------------------------------------------------*/
+/** \brief TWI driver structure. Holds the internal state of the driver.*/
+typedef struct _Twid
+{
+ /** Pointer to the underlying TWI peripheral.*/
+ Twi *pTwi ;
+ /** Current asynchronous transfer being processed.*/
+ Async *pTransfer ;
+ /** Transfer type */
+ uint8_t transferType;
+ /** TWI slave address. */
+ uint8_t address;
+ /** Optional slave internal address. */
+ uint32_t iaddress;
+ /** Number of internal address bytes. */
+ uint8_t isize;
+ /** Pointer to the dmad */
+ sDmad* pDmad;
+ /** DMA Rx channel */
+ uint32_t dwTwidDmaRxChannel;
+ /** DMA Tx channel */
+ uint32_t dwTwidDmaTxChannel;
+ /** DMA rx done*/
+ uint8_t ucRxDone;
+ /** DMA tx done*/
+ uint8_t ucTxDone;
+} Twid;
+
+/*----------------------------------------------------------------------------
+ * Export functions
+ *----------------------------------------------------------------------------*/
+extern void TWID_Initialize (
+ Twid *pTwid,
+ Twi *pTwi,
+ uint8_t address,
+ uint32_t iaddress,
+ uint8_t isize,
+ uint8_t transferType) ;
+
+extern void TWID_Handler(
+ Twid *pTwid ) ;
+
+extern uint8_t TWID_Read(
+ Twid *pTwid,
+ uint8_t *pData,
+ uint32_t num,
+ Async *pAsync);
+
+extern uint8_t TWID_Write(
+ Twid *pTwid,
+ uint8_t *pData,
+ uint32_t num,
+ Async *pAsync);
+
+#ifdef USE_TWI_DMA
+extern int32_t TWID_DMAConfigure(
+ Twid* pTwid,
+ DmadTransferCallback RxTb,
+ DmadTransferCallback TxCb );
+
+extern void TWID_DMARead(
+ Twid *pTwid,
+ void* pBuffer,
+ uint16_t wSize);
+
+extern void TWID_DMAWrite(
+ Twid *pTwid,
+ void* pBuffer,
+ uint16_t wSize);
+
+#endif //#ifdef USE_TWI_DMA
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //#ifndef TWID_H
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/uart_console.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/uart_console.h
new file mode 100644
index 0000000..e88c08d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/uart_console.h
@@ -0,0 +1,54 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * Include function prototype for the uart console.
+ */
+
+#ifndef _UART_CONSOLE_
+#define _UART_CONSOLE_
+
+#include <stdint.h>
+
+extern void UART_Configure( uint32_t dwBaudrate, uint32_t dwMasterClock ) ;
+extern void UART_PutChar( uint8_t uc ) ;
+extern uint32_t UART_GetChar( void ) ;
+extern uint32_t UART_IsRxReady( void ) ;
+
+
+extern void UART_DumpFrame( uint8_t* pucFrame, uint32_t dwSize ) ;
+extern void UART_DumpMemory( uint8_t* pucBuffer, uint32_t dwSize, uint32_t dwAddress ) ;
+extern uint32_t UART_GetInteger( int32_t* pdwValue ) ;
+extern uint32_t UART_GetIntegerMinMax( int32_t* pdwValue, int32_t dwMin, int32_t dwMax ) ;
+extern uint32_t UART_GetHexa32( uint32_t* pdwValue ) ;
+
+#endif /* _UART_CONSOLE_ */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/usart_spi.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/usart_spi.h
new file mode 100644
index 0000000..7cd1cf2
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/usart_spi.h
@@ -0,0 +1,137 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * \par Purpose
+ *
+ * This module provides several definitions and methods for using an USART
+ * peripheral.
+ *
+ * \par Usage
+ *
+ * -# Enable the USART peripheral clock in the PMC.
+ * -# Enable the required USART PIOs (see pio.h).
+ * -# Configure the UART by calling USART_Configure.
+ * -# Enable the transmitter and/or the receiver of the USART using
+ * USART_SetTransmitterEnabled and USART_SetReceiverEnabled.
+ * -# Send data through the USART using the USART_Write and
+ * USART_WriteBuffer methods.
+ * -# Receive data from the USART using the USART_Read and
+ * USART_ReadBuffer functions; the availability of data can be polled
+ * with USART_IsDataAvailable.
+ * -# Disable the transmitter and/or the receiver of the USART with
+ * USART_SetTransmitterEnabled and USART_SetReceiverEnabled.
+ */
+
+#ifndef _USART_SPI_
+#define _USART_SPI_
+
+/*------------------------------------------------------------------------------
+ * Headers
+ *------------------------------------------------------------------------------*/
+
+#include "chip.h"
+
+#include <stdint.h>
+
+/*------------------------------------------------------------------------------
+ * Definitions
+ *------------------------------------------------------------------------------*/
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+
+/** USART transfer complete callback. */
+typedef void (*UsartdCallback)( uint8_t, void* ) ;
+
+/** Usart transfer type */
+typedef enum
+{
+ USART_PDC_TRANS_TYPE = 0, /* default transfer with PDC */
+ USART_FIFO_TRANS_TYPE, /* transfer without PDC */
+ USART_MAX_TRANS_TYPE = 0xff
+}usart_trans_type;
+
+/** \brief usart Transfer Request prepared by the application upper layer.
+ *
+ * This structure is sent to the Usart_SPISendCommand function to start the transfer.
+ * At the end of the transfer, the callback is invoked by the interrupt handler.
+ */
+typedef struct _UsartdCmd
+{
+ /** Pointer to the command data. */
+ uint8_t *pCmd;
+ /** Command size in bytes. */
+ uint8_t cmdSize;
+ /** Pointer to the data to be sent. */
+ uint8_t *pData;
+ /** Data size in bytes. */
+ uint16_t dataSize;
+ /** Callback function invoked at the end of transfer. */
+ UsartdCallback callback;
+ /** Callback arguments. */
+ void *pArgument;
+} UsartdCmd ;
+
+/** Constant structure associated with usart port. This structure prevents
+ client applications to have access in the same time. */
+typedef struct _Usartd
+{
+ /** Pointer to Usart Hardware registers */
+ Usart* pUsartHw ;
+ /* Usart ID*/
+ uint32_t dwUsartID;
+ /* Usart IRQ num*/
+ IRQn_Type eUsartIRQn;
+ /** Current usartCommand being processed */
+ SpidCmd *pCurrentCommand ;
+ /** Mutual exclusion semaphore. */
+ volatile uint8_t ucSemaphore ;
+ /** Usart transfer type */
+ usart_trans_type eTransferType;
+ /** Usart transfer end signal */
+ uint8_t ucUsartTransEndSig;
+} Usartd ;
+
+/*------------------------------------------------------------------------------*/
+/* Exported functions */
+/*------------------------------------------------------------------------------*/
+extern uint8_t USART_SPIDSendCommand(Usartd *pUsartd, SpidCmd *pCommand);
+extern void USART_SPIDHandler(Usartd *pUsartd);
+extern uint8_t USART_SPIDIsBusy(const Usartd *pUsartd);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* #ifndef _USART_ */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/wav.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/wav.h
new file mode 100644
index 0000000..94bf1d0
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/wav.h
@@ -0,0 +1,83 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+ * \file
+ *
+ * Include Defines & macros for the wav parser.
+ */
+
+#ifndef WAV_H
+#define WAV_H
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+/* Standard WAV file header information. */
+typedef struct _WavHeader
+{
+ /* Contains the letters "RIFF" in ASCII form. */
+ unsigned int chunkID;
+ /* Size of the rest of the chunk following this number.*/
+ unsigned int chunkSize;
+ /* Contains the letters "WAVE".*/
+ unsigned int format;
+ /* Contains the letters "fmt ".*/
+ unsigned int subchunk1ID;
+ /* 16 for PCM. This is the size of the rest of the Subchunk which follows this number.*/
+ unsigned int subchunk1Size;
+ /* PCM = 1 (i.e. Linear quantization). Values other than 1 indicate some form of compression.*/
+ unsigned short audioFormat;
+ /* Mono = 1, Stereo = 2, etc.*/
+ unsigned short numChannels;
+ /* 8000, 44100, etc.*/
+ unsigned int sampleRate;
+ /* SampleRate * NumChannels * BitsPerSample/8*/
+ unsigned int byteRate;
+ /* NumChannels * BitsPerSample/8*/
+ unsigned short blockAlign;
+ /* 8 bits = 8, 16 bits = 16, etc.*/
+ unsigned short bitsPerSample;
+ /* Contains the letters "data".*/
+ unsigned int subchunk2ID;
+ /* Number of bytes in the data.*/
+ unsigned int subchunk2Size;
+
+} WavHeader;
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+extern unsigned char WAV_IsValid(const WavHeader *header);
+
+extern void WAV_DisplayInfo(const WavHeader *header);
+
+#endif //#ifndef WAV_H
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/wm8731.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/wm8731.h
new file mode 100644
index 0000000..475def6
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/wm8731.h
@@ -0,0 +1,194 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+
+/**
+ * \file
+ *
+ * Implementation WM8731 driver.
+ *
+ */
+
+#ifndef WM8731_H
+#define WM8731_H
+
+#include "board.h"
+
+/*----------------------------------------------------------------------------
+ * Definitions
+ *----------------------------------------------------------------------------*/
+#define WM8731_CSB_STATE (0x0 << 0)
+
+/** Slave address */
+//#define WM8731_SLAVE_ADDRESS 0x1a | WM8731_CSB_STATE*/
+#define WM8731_SLAVE_ADDRESS 0x1b
+
+
+/** Reset register*/
+#define WM8731_REG_RESET 0x0F
+
+/** Left Line in register*/
+#define WM8731_REG_LEFT_lINEIN 0x0
+/** Left line input volume control*/
+#define WM8731_LINVOL_BITS (0x1f << 0)
+/** Left line input mute to ADC*/
+#define WM8731_LINMUTE_BIT (0x1 << 7)
+/** Left to right channel line input volume and mute data load control*/
+#define WM8731_LRINBOTH_BIT (0x0 << 8)
+
+/** Right Line in register*/
+#define WM8731_REG_RIGHT_lINEIN 0x1
+/** Right line input volume control*/
+#define WM8731_RINVOL_BITS (0x1f << 0)
+/** Right line input mute to ADC*/
+#define WM8731_RINMUTE_BIT (0x1 << 7)
+/** Right to right channel line input volume and mute data load control*/
+#define WM8731_RLINBOTH_BIT (0x0 << 8)
+
+/** Left Headphone out register*/
+#define WM8731_REG_LEFT_HPOUT 0x2
+/** Left chnnel headphone output volume control*/
+#define WM8731_LHPVOL_BITS (0x7f << 0)
+/** Left channel zero cross detect enable*/
+#define WM8731_LZCEN_BIT (0x1 << 7)
+/** Left to right channel headphone volume, mute and zero cross data load control*/
+#define WM8731_LRHPBOTH_BIT (0x1 << 8)
+
+/** Right Headphone out register*/
+#define WM8731_REG_RIGHT_HPOUT 0x3
+/** Right chnnel headphone output volume control*/
+#define WM8731_RHPVOL_BITS (0x7f << 0)
+/** Right channel zero cross detect enable*/
+#define WM8731_RZCEN_BIT (0x1 << 7)
+/** Right to right channel headphone volume, mute and zero cross data load control*/
+#define WM8731_RLHPBOTH_BIT (0x1 << 8)
+
+/** Analogue audio path control register*/
+#define WM8731_REG_ANALOGUE_PATH_CTRL 0x4
+
+/** Digital audio path control register*/
+#define WM8731_REG_DIGITAL_PATH_CTRL 0x5
+
+/** Power down control register*/
+#define WM8731_REG_PWDOWN_CTRL 0x6
+/** LineIn power down*/
+#define WM8731_LINEINPD_BIT (0x1 << 0)
+#define WM8731_ENABLE_LINEINPD (0x1 << 0)
+#define WM8731_DISABLE_LINEINPD (0x0 << 0)
+/** Mic power down*/
+#define WM8731_MICPD_BIT (0x1 << 1)
+#define WM8731_ENABLE_MICPD (0x1 << 1)
+#define WM8731_DISABLE_MICPD (0x0 << 1)
+/** ADC power down*/
+#define WM8731_ADCPD_BIT (0x1 << 2)
+#define WM8731_ENABLE_ADCPD (0x1 << 2)
+#define WM8731_DISABLE_ADCPD (0x0 << 2)
+/** DAC power down*/
+#define WM8731_DACPD_BIT (0x1 << 3)
+#define WM8731_ENABLE_DACPD (0x1 << 3)
+#define WM8731_DISABLE_DACPD (0x0 << 3)
+/** OUT power down*/
+#define WM8731_OUTPD_BIT (0x1 << 4)
+#define WM8731_ENABLE_OUTPD (0x1 << 4)
+#define WM8731_DISABLE_OUTPD (0x0 << 4)
+/** OSC power down*/
+#define WM8731_OSCBIT (0x1 << 5)
+#define WM8731_ENABLE_OSCPD (0x1 << 5)
+#define WM8731_DISABLE_OSCPD (0x0 << 5)
+/** CLKOUT powerdown*/
+#define WM8731_CLKOUTPD_BIT (0x1 << 6)
+#define WM8731_ENABLE_CLKOUTPD (0x1 << 6)
+#define WM8731_DISABLE_CLKOUTPD (0x0 << 6)
+/** Power off device*/
+#define WM8731_POWEROFF_BIT (0x1 << 7)
+#define WM8731_DEV_POWER_OFF (0x1 << 7)
+#define WM8731_DEV_POWER_ON (0x0 << 7)
+
+/** Interface format register*/
+#define WM8731_REG_DA_INTERFACE_FORMAT 0x7
+/** Format*/
+#define WM8731_FORMAT_BITS (0x3 << 0)
+#define WM8731_FORMAT_MSB_LEFT_JUSTIFIED (0x0 << 0)
+#define WM8731_FORMAT_MSB_RIGHT_JUSTIFIED (0x1 << 0)
+#define WM8731_FORMAT_I2S (0x2 << 0)
+#define WM8731_FORMAT_DSP (0x3 << 0)
+/** Input audio data bit length select*/
+#define WM8731_IWL_BITS (0x3 << 2)
+#define WM8731_IWL_16_BIT (0x0 << 2)
+#define WM8731_IWL_20_BIT (0x1 << 2)
+#define WM8731_IWL_24_BIT (0x2 << 2)
+#define WM8731_IWL_32_BIT (0x3 << 2)
+/** DACLRC phase control*/
+#define WM8731_IRP_BITS (0x1 << 4)
+/** DAC Left right clock swap*/
+#define WM8731_IRSWAP_BIT (0x1 << 5)
+/** Master slave mode control*/
+#define WM8731_MS_BIT (0x1 << 6)
+#define WM8731_ENABLE_MASTER_MODE (0x1 << 6)
+#define WM8731_ENABLE_SLAVE_MODE (0x0 << 6)
+/** Bit clock invert*/
+#define WM8731_BCLKINV_BIT (0x1 << 7)
+
+/** Sampling control*/
+#define WM8731_REG_SAMPLECTRL 0x8
+/** Mode select, usb mode, normal mode*/
+#define WM8731_USBNORMAL_BIT (0x1 << 0)
+#define WM8731_NORMAL_MODE (0x1 << 0)
+#define WM8731_USB_MODE (0x1 << 1)
+/** Base over-sampling rate*/
+#define WM8731_BOSR_BIT (0x1 << 1)
+#define WM8731_USB_250FS (0x0 << 1)
+#define WM8731_USB_272FS (0x1 << 1)
+#define WM8731_NORMAL_256FS (0x0 << 1)
+#define WM8731_NORMAL_128_192_384_FS (0x1 << 1)
+/** Sample rate control*/
+#define WM8731_SR_BITS (0xf << 2)
+#define WM8731_CLKIDIV2_BIT (0x1 << 6)
+#define WM8731_CLKODIV2_BIT (0x1 << 7)
+
+/** Active control register*/
+#define WM8731_REG_ACTIVE_CTRL 0x9
+/** Activate interface*/
+#define WM8731_ACTIVE_BIT (0x1 << 0)
+#define WM8731_ACTIVE_INTERFACE_ACTIVE (0x1 << 1)
+#define WM8731_ACTIVE_INTERFACE_INACTIVE (0x0 << 1)
+
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+extern uint16_t WM8731_Read(Twid *pTwid, uint32_t dwDevice, uint32_t dwRegAddr);
+extern void WM8731_Write(Twid *pTwid, uint32_t dwDevice, uint32_t dwRegAddr, uint16_t uwData);
+extern uint8_t WM8731_DAC_Init(Twid *pTwid, uint32_t dwDevice);
+extern uint8_t WM8731_VolumeSet(Twid *pTwid, uint32_t dwDevice, uint16_t uwValue);
+
+#endif // WM8731_H
+
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/xmodem.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/xmodem.h
new file mode 100644
index 0000000..2704fe1
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/include/xmodem.h
@@ -0,0 +1,41 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2011, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+ /**
+ * \file
+ *
+ * Include function prototypes for the xmodem protocol.
+ */
+
+#ifndef _XMODEM_H
+#define _XMODEM_H
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+extern uint32_t XMODEM_ReceiveFile(int8_t *pBuffer);
+#endif
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x2/flash.ld b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x2/flash.ld
new file mode 100644
index 0000000..e1747a7
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x2/flash.ld
@@ -0,0 +1,143 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/*------------------------------------------------------------------------------
+ * Linker script for running in internal FLASH on the SAM3X2
+ *----------------------------------------------------------------------------*/
+
+OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
+OUTPUT_ARCH(arm)
+SEARCH_DIR(.)
+
+/* Memory Spaces Definitions */
+MEMORY
+{
+ rom (rx) : ORIGIN = 0x00080000, LENGTH = 0x00020000 /* Flash, 128K */
+ sram0 (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00004000 /* sram0, 16K */
+ sram1 (rwx) : ORIGIN = 0x20080000, LENGTH = 0x00004000 /* sram1, 16K */
+# ram (rwx) : ORIGIN = 0x2007C000, LENGTH = 0x00008000 /* sram, 32K */
+ ram (rwx) : ORIGIN = ORIGIN( sram1 )-LENGTH( sram0 ), LENGTH = LENGTH( sram0 )+LENGTH( sram1 ) /* sram, 32K */
+}
+
+/* Section Definitions */
+SECTIONS
+{
+ .text :
+ {
+ . = ALIGN(4);
+ _sfixed = .;
+ KEEP(*(.vectors .vectors.*))
+ *(.text .text.* .gnu.linkonce.t.*)
+ *(.glue_7t) *(.glue_7)
+ *(.rodata .rodata* .gnu.linkonce.r.*)
+ *(.ARM.extab* .gnu.linkonce.armextab.*)
+
+ /* Support C constructors, and C destructors in both user code
+ and the C library. This also provides support for C++ code. */
+ . = ALIGN(4);
+ KEEP(*(.init))
+ . = ALIGN(4);
+ __preinit_array_start = .;
+ KEEP (*(.preinit_array))
+ __preinit_array_end = .;
+
+ . = ALIGN(4);
+ __init_array_start = .;
+ KEEP (*(SORT(.init_array.*)))
+ KEEP (*(.init_array))
+ __init_array_end = .;
+
+ . = ALIGN(0x4);
+ KEEP (*crtbegin.o(.ctors))
+ KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
+ KEEP (*(SORT(.ctors.*)))
+ KEEP (*crtend.o(.ctors))
+
+ . = ALIGN(4);
+ KEEP(*(.fini))
+
+ . = ALIGN(4);
+ __fini_array_start = .;
+ KEEP (*(.fini_array))
+ KEEP (*(SORT(.fini_array.*)))
+ __fini_array_end = .;
+
+ KEEP (*crtbegin.o(.dtors))
+ KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
+ KEEP (*(SORT(.dtors.*)))
+ KEEP (*crtend.o(.dtors))
+
+ . = ALIGN(4);
+ _efixed = .; /* End of text section */
+ } > rom
+
+ /* .ARM.exidx is sorted, so has to go in its own output section. */
+ PROVIDE_HIDDEN (__exidx_start = .);
+ .ARM.exidx :
+ {
+ *(.ARM.exidx* .gnu.linkonce.armexidx.*)
+ } > rom
+ PROVIDE_HIDDEN (__exidx_end = .);
+
+ . = ALIGN(4);
+ _etext = .;
+
+ .relocate : AT (_etext)
+ {
+ . = ALIGN(4);
+ _srelocate = .;
+ *(.ramfunc .ramfunc.*);
+ *(.data .data.*);
+ . = ALIGN(4);
+ _erelocate = .;
+ } > ram
+
+ /* .bss section which is used for uninitialized data */
+ .bss (NOLOAD) :
+ {
+ . = ALIGN(4);
+ _sbss = . ;
+ _szero = .;
+ *(.bss .bss.*)
+ *(COMMON)
+ . = ALIGN(4);
+ _ebss = . ;
+ _ezero = .;
+ } > ram
+
+ /* stack section */
+ .stack (NOLOAD):
+ {
+ . = ALIGN(8);
+ *(.stack .stack.*)
+ } > ram
+
+ . = ALIGN(4);
+ _end = . ;
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x2/sram.ld b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x2/sram.ld
new file mode 100644
index 0000000..2645dec
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x2/sram.ld
@@ -0,0 +1,143 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/*------------------------------------------------------------------------------
+ * Linker script for running in internal SRAM on the SAM3X2
+ *----------------------------------------------------------------------------*/
+
+OUTPUT_FORMAT ("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
+OUTPUT_ARCH(arm)
+SEARCH_DIR(.)
+
+/* Memory Spaces Definitions */
+MEMORY
+{
+ rom (rx) : ORIGIN = 0x00080000, LENGTH = 0x00020000 /* Flash, 128K */
+ sram0 (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00004000 /* sram0, 16K */
+ sram1 (rwx) : ORIGIN = 0x20080000, LENGTH = 0x00004000 /* sram1, 16K */
+# ram (rwx) : ORIGIN = 0x2007C000, LENGTH = 0x00008000 /* sram, 32K */
+ ram (rwx) : ORIGIN = ORIGIN( sram1 )-LENGTH( sram0 ), LENGTH = LENGTH( sram0 )+LENGTH( sram1 ) /* sram, 32K */
+}
+
+/* Section Definitions */
+SECTIONS
+{
+ .text :
+ {
+ . = ALIGN(4);
+ _sfixed = .;
+ KEEP(*(.vectors .vectors.*))
+ *(.text .text.* .gnu.linkonce.t.*)
+ *(.glue_7t) *(.glue_7)
+ *(.rodata .rodata* .gnu.linkonce.r.*)
+ *(.ARM.extab* .gnu.linkonce.armextab.*)
+
+ /* Support C constructors, and C destructors in both user code
+ and the C library. This also provides support for C++ code. */
+ . = ALIGN(4);
+ KEEP(*(.init))
+ . = ALIGN(4);
+ __preinit_array_start = .;
+ KEEP (*(.preinit_array))
+ __preinit_array_end = .;
+
+ . = ALIGN(4);
+ __init_array_start = .;
+ KEEP (*(SORT(.init_array.*)))
+ KEEP (*(.init_array))
+ __init_array_end = .;
+
+ . = ALIGN(0x4);
+ KEEP (*crtbegin.o(.ctors))
+ KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
+ KEEP (*(SORT(.ctors.*)))
+ KEEP (*crtend.o(.ctors))
+
+ . = ALIGN(4);
+ KEEP(*(.fini))
+
+ . = ALIGN(4);
+ __fini_array_start = .;
+ KEEP (*(.fini_array))
+ KEEP (*(SORT(.fini_array.*)))
+ __fini_array_end = .;
+
+ KEEP (*crtbegin.o(.dtors))
+ KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
+ KEEP (*(SORT(.dtors.*)))
+ KEEP (*crtend.o(.dtors))
+
+ . = ALIGN(4);
+ _efixed = .; /* End of text section */
+ } > ram
+
+ . = ALIGN(4);
+ _etext = .;
+
+ .relocate : AT (_etext)
+ {
+ . = ALIGN(4);
+ _srelocate = .;
+ *(.ramfunc .ramfunc.*);
+ *(.data .data.*);
+ . = ALIGN(4);
+ _erelocate = .;
+ } > ram
+
+ /* .bss section which is used for uninitialized data */
+ .bss (NOLOAD) :
+ {
+ . = ALIGN(4);
+ _sbss = . ;
+ _szero = .;
+ *(.bss .bss.*)
+ *(COMMON)
+ . = ALIGN(4);
+ _ebss = . ;
+ _ezero = .;
+ } > ram
+
+ /* stack section */
+ .stack (NOLOAD):
+ {
+ . = ALIGN(8);
+ *(.stack .stack.*)
+ } > ram
+
+ /* .ARM.exidx is sorted, so has to go in its own output section. */
+ PROVIDE_HIDDEN (__exidx_start = .);
+ .ARM.exidx :
+ {
+ *(.ARM.exidx* .gnu.linkonce.armexidx.*)
+ } > ram
+ PROVIDE_HIDDEN (__exidx_end = .);
+
+ . = ALIGN(4);
+ _end = . ;
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x2/sram_samba.lds b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x2/sram_samba.lds
new file mode 100644
index 0000000..9ae64b6
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x2/sram_samba.lds
@@ -0,0 +1,90 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/*------------------------------------------------------------------------------
+ * Linker script for running in internal SRAM on the SAM3X2
+ *----------------------------------------------------------------------------*/
+
+OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
+OUTPUT_ARCH(arm)
+ENTRY(entry)
+
+/* Memory Spaces Definitions */
+MEMORY
+{
+ romcodesram (W!RX) : ORIGIN = 0x20000000, LENGTH = 0x1000
+ sram (W!RX) : ORIGIN = 0x20001000, LENGTH = 0x00003000 /* sram, 16K - sizeof(romcodesram) */
+}
+
+SECTIONS
+{
+ /* startup code in the .isr_vector */
+ .text :
+ {
+ . = ALIGN(4);
+ _stext = .;
+ KEEP(*(.isr_vector .isr_vector.*))
+ *(.mailbox)
+ *(.text .text.*)
+ *(.rodata .rodata.*)
+ *(.ramfunc .ramfunc.*)
+ *(.glue_7)
+ *(.glue_7t)
+ *(.gcc_except_table)
+ *(.rodata .rodata*)
+ *(.gnu.linkonce.r.*)
+ . = ALIGN(4);
+ _etext = .;
+ } > sram
+
+ /* data */
+ .data :
+ {
+ . = ALIGN(4);
+ _sidata = .;
+ _sdata = .;
+
+ *(.data)
+ *(.data.*)
+ . = ALIGN(4);
+ _edata = .;
+ } > sram
+
+ .bss (NOLOAD) : {
+ _szero = .;
+ *(.bss)
+ . = ALIGN(4);
+ _ezero = .;
+ } >sram
+
+ /* Stack in SRAM */
+ _sstack = 0x20003FFC;
+}
+. = ALIGN(4);
+end = .;
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x4/flash.ld b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x4/flash.ld
new file mode 100644
index 0000000..dc2307f
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x4/flash.ld
@@ -0,0 +1,143 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/*------------------------------------------------------------------------------
+ * Linker script for running in internal FLASH on the SAM3X4
+ *----------------------------------------------------------------------------*/
+
+OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
+OUTPUT_ARCH(arm)
+SEARCH_DIR(.)
+
+/* Memory Spaces Definitions */
+MEMORY
+{
+ rom (rx) : ORIGIN = 0x00080000, LENGTH = 0x00040000 /* Flash, 256K */
+ sram0 (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000 /* sram0, 32K */
+ sram1 (rwx) : ORIGIN = 0x20080000, LENGTH = 0x00008000 /* sram1, 32K */
+# ram (rwx) : ORIGIN = 0x20078000, LENGTH = 0x00010000 /* sram, 64K */
+ ram (rwx) : ORIGIN = ORIGIN( sram1 )-LENGTH( sram0 ), LENGTH = LENGTH( sram0 )+LENGTH( sram1 ) /* sram, 64K */
+}
+
+/* Section Definitions */
+SECTIONS
+{
+ .text :
+ {
+ . = ALIGN(4);
+ _sfixed = .;
+ KEEP(*(.vectors .vectors.*))
+ *(.text .text.* .gnu.linkonce.t.*)
+ *(.glue_7t) *(.glue_7)
+ *(.rodata .rodata* .gnu.linkonce.r.*)
+ *(.ARM.extab* .gnu.linkonce.armextab.*)
+
+ /* Support C constructors, and C destructors in both user code
+ and the C library. This also provides support for C++ code. */
+ . = ALIGN(4);
+ KEEP(*(.init))
+ . = ALIGN(4);
+ __preinit_array_start = .;
+ KEEP (*(.preinit_array))
+ __preinit_array_end = .;
+
+ . = ALIGN(4);
+ __init_array_start = .;
+ KEEP (*(SORT(.init_array.*)))
+ KEEP (*(.init_array))
+ __init_array_end = .;
+
+ . = ALIGN(0x4);
+ KEEP (*crtbegin.o(.ctors))
+ KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
+ KEEP (*(SORT(.ctors.*)))
+ KEEP (*crtend.o(.ctors))
+
+ . = ALIGN(4);
+ KEEP(*(.fini))
+
+ . = ALIGN(4);
+ __fini_array_start = .;
+ KEEP (*(.fini_array))
+ KEEP (*(SORT(.fini_array.*)))
+ __fini_array_end = .;
+
+ KEEP (*crtbegin.o(.dtors))
+ KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
+ KEEP (*(SORT(.dtors.*)))
+ KEEP (*crtend.o(.dtors))
+
+ . = ALIGN(4);
+ _efixed = .; /* End of text section */
+ } > rom
+
+ /* .ARM.exidx is sorted, so has to go in its own output section. */
+ PROVIDE_HIDDEN (__exidx_start = .);
+ .ARM.exidx :
+ {
+ *(.ARM.exidx* .gnu.linkonce.armexidx.*)
+ } > rom
+ PROVIDE_HIDDEN (__exidx_end = .);
+
+ . = ALIGN(4);
+ _etext = .;
+
+ .relocate : AT (_etext)
+ {
+ . = ALIGN(4);
+ _srelocate = .;
+ *(.ramfunc .ramfunc.*);
+ *(.data .data.*);
+ . = ALIGN(4);
+ _erelocate = .;
+ } > ram
+
+ /* .bss section which is used for uninitialized data */
+ .bss (NOLOAD) :
+ {
+ . = ALIGN(4);
+ _sbss = . ;
+ _szero = .;
+ *(.bss .bss.*)
+ *(COMMON)
+ . = ALIGN(4);
+ _ebss = . ;
+ _ezero = .;
+ } > ram
+
+ /* stack section */
+ .stack (NOLOAD):
+ {
+ . = ALIGN(8);
+ *(.stack .stack.*)
+ } > ram
+
+ . = ALIGN(4);
+ _end = . ;
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x4/sram.ld b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x4/sram.ld
new file mode 100644
index 0000000..ac6cad3
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x4/sram.ld
@@ -0,0 +1,143 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/*------------------------------------------------------------------------------
+ * Linker script for running in internal SRAM on the SAM3X4
+ *----------------------------------------------------------------------------*/
+
+OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
+OUTPUT_ARCH(arm)
+SEARCH_DIR(.)
+
+/* Memory Spaces Definitions */
+MEMORY
+{
+ rom (rx) : ORIGIN = 0x00080000, LENGTH = 0x00040000 /* Flash, 256K */
+ sram0 (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000 /* sram0, 32K */
+ sram1 (rwx) : ORIGIN = 0x20080000, LENGTH = 0x00008000 /* sram1, 32K */
+# ram (rwx) : ORIGIN = 0x20078000, LENGTH = 0x00010000 /* sram, 64K */
+ ram (rwx) : ORIGIN = ORIGIN( sram1 )-LENGTH( sram0 ), LENGTH = LENGTH( sram0 )+LENGTH( sram1 ) /* sram, 64K */
+}
+
+/* Section Definitions */
+SECTIONS
+{
+ .text :
+ {
+ . = ALIGN(4);
+ _sfixed = .;
+ KEEP(*(.vectors .vectors.*))
+ *(.text .text.* .gnu.linkonce.t.*)
+ *(.glue_7t) *(.glue_7)
+ *(.rodata .rodata* .gnu.linkonce.r.*)
+ *(.ARM.extab* .gnu.linkonce.armextab.*)
+
+ /* Support C constructors, and C destructors in both user code
+ and the C library. This also provides support for C++ code. */
+ . = ALIGN(4);
+ KEEP(*(.init))
+ . = ALIGN(4);
+ __preinit_array_start = .;
+ KEEP (*(.preinit_array))
+ __preinit_array_end = .;
+
+ . = ALIGN(4);
+ __init_array_start = .;
+ KEEP (*(SORT(.init_array.*)))
+ KEEP (*(.init_array))
+ __init_array_end = .;
+
+ . = ALIGN(0x4);
+ KEEP (*crtbegin.o(.ctors))
+ KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
+ KEEP (*(SORT(.ctors.*)))
+ KEEP (*crtend.o(.ctors))
+
+ . = ALIGN(4);
+ KEEP(*(.fini))
+
+ . = ALIGN(4);
+ __fini_array_start = .;
+ KEEP (*(.fini_array))
+ KEEP (*(SORT(.fini_array.*)))
+ __fini_array_end = .;
+
+ KEEP (*crtbegin.o(.dtors))
+ KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
+ KEEP (*(SORT(.dtors.*)))
+ KEEP (*crtend.o(.dtors))
+
+ . = ALIGN(4);
+ _efixed = .; /* End of text section */
+ } > ram
+
+ . = ALIGN(4);
+ _etext = .;
+
+ .relocate : AT (_etext)
+ {
+ . = ALIGN(4);
+ _srelocate = .;
+ *(.ramfunc .ramfunc.*);
+ *(.data .data.*);
+ . = ALIGN(4);
+ _erelocate = .;
+ } > ram
+
+ /* .bss section which is used for uninitialized data */
+ .bss (NOLOAD) :
+ {
+ . = ALIGN(4);
+ _sbss = . ;
+ _szero = .;
+ *(.bss .bss.*)
+ *(COMMON)
+ . = ALIGN(4);
+ _ebss = . ;
+ _ezero = .;
+ } > ram
+
+ /* stack section */
+ .stack (NOLOAD):
+ {
+ . = ALIGN(8);
+ *(.stack .stack.*)
+ } > ram
+
+ /* .ARM.exidx is sorted, so has to go in its own output section. */
+ PROVIDE_HIDDEN (__exidx_start = .);
+ .ARM.exidx :
+ {
+ *(.ARM.exidx* .gnu.linkonce.armexidx.*)
+ } > ram
+ PROVIDE_HIDDEN (__exidx_end = .);
+
+ . = ALIGN(4);
+ _end = . ;
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x4/sram_samba.lds b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x4/sram_samba.lds
new file mode 100644
index 0000000..2b12bca
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x4/sram_samba.lds
@@ -0,0 +1,90 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/*------------------------------------------------------------------------------
+ * Linker script for running in internal SRAM on the SAM3X4
+ *----------------------------------------------------------------------------*/
+
+OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
+OUTPUT_ARCH(arm)
+ENTRY(entry)
+
+/* Memory Spaces Definitions */
+MEMORY
+{
+ romcodesram (W!RX) : ORIGIN = 0x20000000, LENGTH = 0x1000
+ sram (W!RX) : ORIGIN = 0x20001000, LENGTH = 0x00007000 /* sram, 32K - sizeof(romcodesram) */
+}
+
+SECTIONS
+{
+ /* startup code in the .isr_vector */
+ .text :
+ {
+ . = ALIGN(4);
+ _stext = .;
+ KEEP(*(.isr_vector .isr_vector.*))
+ *(.mailbox)
+ *(.text .text.*)
+ *(.rodata .rodata.*)
+ *(.ramfunc .ramfunc.*)
+ *(.glue_7)
+ *(.glue_7t)
+ *(.gcc_except_table)
+ *(.rodata .rodata*)
+ *(.gnu.linkonce.r.*)
+ . = ALIGN(4);
+ _etext = .;
+ } > sram
+
+ /* data */
+ .data :
+ {
+ . = ALIGN(4);
+ _sidata = .;
+ _sdata = .;
+
+ *(.data)
+ *(.data.*)
+ . = ALIGN(4);
+ _edata = .;
+ } > sram
+
+ .bss (NOLOAD) : {
+ _szero = .;
+ *(.bss)
+ . = ALIGN(4);
+ _ezero = .;
+ } >sram
+
+ /* Stack in SRAM */
+ _sstack = 0x20007FFC;
+}
+. = ALIGN(4);
+end = .;
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x8/flash.ld b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x8/flash.ld
new file mode 100644
index 0000000..2052b71
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x8/flash.ld
@@ -0,0 +1,143 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/*------------------------------------------------------------------------------
+ * Linker script for running in internal FLASH on the SAM3X8
+ *----------------------------------------------------------------------------*/
+
+OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
+OUTPUT_ARCH(arm)
+SEARCH_DIR(.)
+
+/* Memory Spaces Definitions */
+MEMORY
+{
+ rom (rx) : ORIGIN = 0x00080000, LENGTH = 0x00080000 /* Flash, 512K */
+ sram0 (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00010000 /* sram0, 64K */
+ sram1 (rwx) : ORIGIN = 0x20080000, LENGTH = 0x00008000 /* sram1, 32K */
+# ram (rwx) : ORIGIN = 0x20070000, LENGTH = 0x00018000 /* sram, 96K */
+ ram (rwx) : ORIGIN = ORIGIN( sram1 )-LENGTH( sram0 ), LENGTH = LENGTH( sram0 )+LENGTH( sram1 ) /* sram, 96K */
+}
+
+/* Section Definitions */
+SECTIONS
+{
+ .text :
+ {
+ . = ALIGN(4);
+ _sfixed = .;
+ KEEP(*(.vectors .vectors.*))
+ *(.text .text.* .gnu.linkonce.t.*)
+ *(.glue_7t) *(.glue_7)
+ *(.rodata .rodata* .gnu.linkonce.r.*)
+ *(.ARM.extab* .gnu.linkonce.armextab.*)
+
+ /* Support C constructors, and C destructors in both user code
+ and the C library. This also provides support for C++ code. */
+ . = ALIGN(4);
+ KEEP(*(.init))
+ . = ALIGN(4);
+ __preinit_array_start = .;
+ KEEP (*(.preinit_array))
+ __preinit_array_end = .;
+
+ . = ALIGN(4);
+ __init_array_start = .;
+ KEEP (*(SORT(.init_array.*)))
+ KEEP (*(.init_array))
+ __init_array_end = .;
+
+ . = ALIGN(0x4);
+ KEEP (*crtbegin.o(.ctors))
+ KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
+ KEEP (*(SORT(.ctors.*)))
+ KEEP (*crtend.o(.ctors))
+
+ . = ALIGN(4);
+ KEEP(*(.fini))
+
+ . = ALIGN(4);
+ __fini_array_start = .;
+ KEEP (*(.fini_array))
+ KEEP (*(SORT(.fini_array.*)))
+ __fini_array_end = .;
+
+ KEEP (*crtbegin.o(.dtors))
+ KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
+ KEEP (*(SORT(.dtors.*)))
+ KEEP (*crtend.o(.dtors))
+
+ . = ALIGN(4);
+ _efixed = .; /* End of text section */
+ } > rom
+
+ /* .ARM.exidx is sorted, so has to go in its own output section. */
+ PROVIDE_HIDDEN (__exidx_start = .);
+ .ARM.exidx :
+ {
+ *(.ARM.exidx* .gnu.linkonce.armexidx.*)
+ } > rom
+ PROVIDE_HIDDEN (__exidx_end = .);
+
+ . = ALIGN(4);
+ _etext = .;
+
+ .relocate : AT (_etext)
+ {
+ . = ALIGN(4);
+ _srelocate = .;
+ *(.ramfunc .ramfunc.*);
+ *(.data .data.*);
+ . = ALIGN(4);
+ _erelocate = .;
+ } > ram
+
+ /* .bss section which is used for uninitialized data */
+ .bss (NOLOAD) :
+ {
+ . = ALIGN(4);
+ _sbss = . ;
+ _szero = .;
+ *(.bss .bss.*)
+ *(COMMON)
+ . = ALIGN(4);
+ _ebss = . ;
+ _ezero = .;
+ } > ram
+
+ /* stack section */
+ .stack (NOLOAD):
+ {
+ . = ALIGN(8);
+ *(.stack .stack.*)
+ } > ram
+
+ . = ALIGN(4);
+ _end = . ;
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x8/sram.ld b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x8/sram.ld
new file mode 100644
index 0000000..c67c006
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x8/sram.ld
@@ -0,0 +1,143 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/*------------------------------------------------------------------------------
+ * Linker script for running in internal SRAM on the SAM3X8
+ *----------------------------------------------------------------------------*/
+
+OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
+OUTPUT_ARCH(arm)
+SEARCH_DIR(.)
+
+/* Memory Spaces Definitions */
+MEMORY
+{
+ rom (rx) : ORIGIN = 0x00080000, LENGTH = 0x00080000 /* Flash, 512K */
+ sram0 (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00010000 /* sram0, 64K */
+ sram1 (rwx) : ORIGIN = 0x20080000, LENGTH = 0x00008000 /* sram1, 32K */
+# ram (rwx) : ORIGIN = 0x20070000, LENGTH = 0x00018000 /* sram, 96K */
+ ram (rwx) : ORIGIN = ORIGIN( sram1 )-LENGTH( sram0 ), LENGTH = LENGTH( sram0 )+LENGTH( sram1 ) /* sram, 96K */
+}
+
+/* Section Definitions */
+SECTIONS
+{
+ .text :
+ {
+ . = ALIGN(4);
+ _sfixed = .;
+ KEEP(*(.vectors .vectors.*))
+ *(.text .text.* .gnu.linkonce.t.*)
+ *(.glue_7t) *(.glue_7)
+ *(.rodata .rodata* .gnu.linkonce.r.*)
+ *(.ARM.extab* .gnu.linkonce.armextab.*)
+
+ /* Support C constructors, and C destructors in both user code
+ and the C library. This also provides support for C++ code. */
+ . = ALIGN(4);
+ KEEP(*(.init))
+ . = ALIGN(4);
+ __preinit_array_start = .;
+ KEEP (*(.preinit_array))
+ __preinit_array_end = .;
+
+ . = ALIGN(4);
+ __init_array_start = .;
+ KEEP (*(SORT(.init_array.*)))
+ KEEP (*(.init_array))
+ __init_array_end = .;
+
+ . = ALIGN(0x4);
+ KEEP (*crtbegin.o(.ctors))
+ KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
+ KEEP (*(SORT(.ctors.*)))
+ KEEP (*crtend.o(.ctors))
+
+ . = ALIGN(4);
+ KEEP(*(.fini))
+
+ . = ALIGN(4);
+ __fini_array_start = .;
+ KEEP (*(.fini_array))
+ KEEP (*(SORT(.fini_array.*)))
+ __fini_array_end = .;
+
+ KEEP (*crtbegin.o(.dtors))
+ KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
+ KEEP (*(SORT(.dtors.*)))
+ KEEP (*crtend.o(.dtors))
+
+ . = ALIGN(4);
+ _efixed = .; /* End of text section */
+ } > ram
+
+ . = ALIGN(4);
+ _etext = .;
+
+ .relocate : AT (_etext)
+ {
+ . = ALIGN(4);
+ _srelocate = .;
+ *(.ramfunc .ramfunc.*);
+ *(.data .data.*);
+ . = ALIGN(4);
+ _erelocate = .;
+ } > ram
+
+ /* .bss section which is used for uninitialized data */
+ .bss (NOLOAD) :
+ {
+ . = ALIGN(4);
+ _sbss = . ;
+ _szero = .;
+ *(.bss .bss.*)
+ *(COMMON)
+ . = ALIGN(4);
+ _ebss = . ;
+ _ezero = .;
+ } > ram
+
+ /* stack section */
+ .stack (NOLOAD):
+ {
+ . = ALIGN(8);
+ *(.stack .stack.*)
+ } > ram
+
+ /* .ARM.exidx is sorted, so has to go in its own output section. */
+ PROVIDE_HIDDEN (__exidx_start = .);
+ .ARM.exidx :
+ {
+ *(.ARM.exidx* .gnu.linkonce.armexidx.*)
+ } > ram
+ PROVIDE_HIDDEN (__exidx_end = .);
+
+ . = ALIGN(4);
+ _end = . ;
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x8/sram_samba.lds b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x8/sram_samba.lds
new file mode 100644
index 0000000..1d81046
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x8/sram_samba.lds
@@ -0,0 +1,90 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/*------------------------------------------------------------------------------
+ * Linker script for running in internal SRAM on the SAM3X8
+ *----------------------------------------------------------------------------*/
+
+OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
+OUTPUT_ARCH(arm)
+ENTRY(entry)
+
+/* Memory Spaces Definitions */
+MEMORY
+{
+ romcodesram (W!RX) : ORIGIN = 0x20000000, LENGTH = 0x1000
+ sram (W!RX) : ORIGIN = 0x20001000, LENGTH = 0x0000F000 /* sram, 64K - sizeof(romcodesram) */
+}
+
+SECTIONS
+{
+ /* startup code in the .isr_vector */
+ .text :
+ {
+ . = ALIGN(4);
+ _stext = .;
+ KEEP(*(.isr_vector .isr_vector.*))
+ *(.mailbox)
+ *(.text .text.*)
+ *(.rodata .rodata.*)
+ *(.ramfunc .ramfunc.*)
+ *(.glue_7)
+ *(.glue_7t)
+ *(.gcc_except_table)
+ *(.rodata .rodata*)
+ *(.gnu.linkonce.r.*)
+ . = ALIGN(4);
+ _etext = .;
+ } > sram
+
+ /* data */
+ .data :
+ {
+ . = ALIGN(4);
+ _sidata = .;
+ _sdata = .;
+
+ *(.data)
+ *(.data.*)
+ . = ALIGN(4);
+ _edata = .;
+ } > sram
+
+ .bss (NOLOAD) : {
+ _szero = .;
+ *(.bss)
+ . = ALIGN(4);
+ _ezero = .;
+ } >sram
+
+ /* Stack in SRAM */
+ _sstack = 0x2000FFFC;
+}
+. = ALIGN(4);
+end = .;
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x_ek_flash.gdb b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x_ek_flash.gdb
new file mode 100644
index 0000000..4b77c58
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x_ek_flash.gdb
@@ -0,0 +1,61 @@
+# ----------------------------------------------------------------------------
+# ATMEL Microcontroller Software Support
+# ----------------------------------------------------------------------------
+# Copyright (c) 2008, Atmel Corporation
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# - Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the disclaimer below.
+#
+# Atmel's name may not be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+# DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# ----------------------------------------------------------------------------
+
+
+#*******************************************************
+#
+# Connect to J-Link and debug application in flash.
+#
+
+# define 'reset' command
+define reset
+
+# Connect to the J-Link gdb server
+target remote localhost:2331
+# Reset the chip to get to a known state
+monitor reset
+
+# Select flash device
+monitor flash device = AT91SAM3X8H
+# Enable flash download and flash breakpoints
+monitor flash download = 1
+# Load the program
+load
+
+# Reset peripheral (RSTC_CR)
+set *0x400e1a00 = 0xA5000004
+
+# Initializing PC and stack pointer
+# Modify pc value to even before writing pc register
+mon reg sp=(0x80000)
+set *0x80004 = *0x80004 & 0xFFFFFFFE
+mon reg pc=(0x80004)
+info reg
+
+# end of 'reset' command
+end
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x_ek_sram.gdb b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x_ek_sram.gdb
new file mode 100644
index 0000000..e65eda0
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/resources/gcc/sam3x_ek_sram.gdb
@@ -0,0 +1,56 @@
+# ----------------------------------------------------------------------------
+# ATMEL Microcontroller Software Support
+# ----------------------------------------------------------------------------
+# Copyright (c) 2008, Atmel Corporation
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# - Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the disclaimer below.
+#
+# Atmel's name may not be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+# DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# ----------------------------------------------------------------------------
+
+
+#*************************************************
+#
+# Connect to J-Link and debug application in sram on SAM3S
+#
+# Note:
+# First, users should modify Step1 and Step2 according to their project,
+# then do Step3.
+
+# Step1: Connect to the J-Link gdb server
+define reset
+target remote localhost:2331
+monitor reset
+
+# Step2: Load file(eg. getting-started project)
+load
+
+# Step3: Reset peripheral (RSTC_CR)
+set *0x400e1a00 = 0xA5000004
+
+# Step4: Initializing PC and stack pointer
+# Modify pc value to even before writing pc register
+mon reg sp=(0x20000000)
+set *0x20000004 = *0x20000004 & 0xFFFFFFFE
+mon reg pc=(0x20000004)
+info reg
+
+end
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/ads7843.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/ads7843.c
new file mode 100644
index 0000000..adfe42f
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/ads7843.c
@@ -0,0 +1,200 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2011, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * Implementation of ADS7843 driver.
+ *
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "board.h"
+
+/*----------------------------------------------------------------------------
+ * Definitions
+ *----------------------------------------------------------------------------*/
+
+#define ADS_CTRL_PD0 (1 << 0) /* PD0 */
+#define ADS_CTRL_PD1 (1 << 1) /* PD1 */
+#define ADS_CTRL_DFR (1 << 2) /* SER/DFR */
+#define ADS_CTRL_EIGHT_BITS_MOD (1 << 3) /* Mode */
+#define ADS_CTRL_START (1 << 7) /* Start Bit */
+#define ADS_CTRL_SWITCH_SHIFT 4 /* Address setting */
+
+/* Get X position command */
+#define CMD_X_POSITION ((1 << ADS_CTRL_SWITCH_SHIFT) | ADS_CTRL_START | ADS_CTRL_PD0 | ADS_CTRL_PD1)
+/* Get Y position command */
+#define CMD_Y_POSITION ((5 << ADS_CTRL_SWITCH_SHIFT) | ADS_CTRL_START | ADS_CTRL_PD0 | ADS_CTRL_PD1)
+
+/* Enable penIRQ */
+#define CMD_ENABLE_PENIRQ ((1 << ADS_CTRL_SWITCH_SHIFT) | ADS_CTRL_START)
+
+#define ADS7843_TIMEOUT 5000000
+
+#define DELAY_BEFORE_SPCK 200 /* 2us min (tCSS) <=> 200/100 000 000 = 2us */
+#define DELAY_BETWEEN_CONS_COM 0xf /* 5us min (tCSH) <=> (32 * 15) / (100 000 000) = 5us */
+
+/*----------------------------------------------------------------------------
+ * Local variables
+ *----------------------------------------------------------------------------*/
+
+/** Pins used by SPI */
+static const Pin pinsSPI[] = { BOARD_TSC_SPI_PINS, BOARD_TSC_NPCS_PIN } ;
+
+/** Touch screen BUSY pin */
+static const Pin pinBusy[] = {PIN_TSC_BUSY};
+
+/** Touch screen NPCS pin */
+static const Pin pinCs[] = {BOARD_TSC_NPCS_PIN};
+
+/*----------------------------------------------------------------------------
+ * Local functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Generic function to send a command to the touchscreen controller.
+ *
+ * \param bCmd command to send
+ *
+ * \return command result
+ */
+static uint32_t SendCommand( uint8_t ucCmd )
+{
+ uint32_t dwResult = 0 ;
+ uint32_t dw ;
+ Spi* pSpi ;
+
+ /* (volatile declaration needed for code optimisation by compiler) */
+ volatile uint8_t bufferRX[3] ;
+ volatile uint8_t bufferTX[3] ;
+
+ pSpi = BOARD_TSC_SPI_BASE ;
+ bufferRX[0] = 0 ;
+ bufferRX[1] = 0 ;
+ bufferRX[2] = 0 ;
+
+ bufferTX[0] = ucCmd ;
+ bufferTX[1] = 0 ;
+ bufferTX[2] = 0 ;
+
+ /* Send Command and data through the SPI */
+ PIO_PinClear( pinCs ) ;
+ // Send command
+ dw = 0 ;
+ while ( (pSpi->SPI_SR & SPI_SR_TXEMPTY) == 0 ) ;
+ pSpi->SPI_TDR = bufferTX[dw] | SPI_PCS( BOARD_TSC_NPCS ) ;
+ while ( (pSpi->SPI_SR & SPI_SR_TDRE) == 0 ) ;
+
+ while ( PIO_PinGet( pinBusy ) == 1 ) ;
+ while ( (pSpi->SPI_SR & SPI_SR_RDRF) == 0 ) ;
+ bufferRX[dw] = pSpi->SPI_RDR & 0xFFFF ;
+
+ // Read data
+ for ( dw = 1 ; dw < 3 ; dw++ )
+ {
+ while ( (pSpi->SPI_SR & SPI_SR_TXEMPTY) == 0 ) ;
+ pSpi->SPI_TDR = bufferTX[dw] | SPI_PCS( BOARD_TSC_NPCS ) ;
+ while ( (pSpi->SPI_SR & SPI_SR_TDRE) == 0);
+
+ while ( (pSpi->SPI_SR & SPI_SR_RDRF) == 0 ) ;
+ bufferRX[dw] = pSpi->SPI_RDR & 0xFFFF ;
+ }
+ PIO_PinSet( pinCs ) ;
+
+ dwResult = (uint32_t)bufferRX[1] << 8 ;
+ dwResult |= (uint32_t)bufferRX[2] ;
+ dwResult = dwResult >> 4 ;
+
+ return dwResult ;
+}
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Get position of the pen by ask the ADS controller (SPI).
+ *
+ * \param px_pos pointer to the horizontal position
+ * \param py_pos pointer to the vertical position
+ *
+ */
+extern void ADS7843_GetPosition( uint32_t *px_pos, uint32_t *py_pos )
+{
+ /* Get X position */
+ *px_pos = SendCommand( CMD_X_POSITION ) ;
+ /* Get Y position */
+ *py_pos = SendCommand( CMD_Y_POSITION ) ;
+ /* Switch to full power mode */
+ SendCommand( CMD_ENABLE_PENIRQ ) ;
+}
+
+/**
+ * \brief Initialization of the SPI for communication with ADS7843 component.
+ */
+extern void ADS7843_Initialize( void )
+{
+ volatile uint32_t dwDummy ;
+
+ /* Configure pins */
+ PIO_PinConfigure( pinsSPI, PIO_LISTSIZE( pinsSPI ) ) ;
+
+ PIO_PinConfigure( pinBusy, PIO_LISTSIZE( pinBusy ) ) ;
+
+ SPI_Configure( BOARD_TSC_SPI_BASE, BOARD_TSC_SPI_ID,
+ SPI_MR_MSTR | SPI_MR_MODFDIS | SPI_PCS(BOARD_TSC_NPCS) /* Value of the SPI configuration register. */
+ ) ;
+
+ SPI_ConfigureNPCS( BOARD_TSC_SPI_BASE, BOARD_TSC_NPCS,
+ SPI_CSR_NCPHA | SPI_CSR_DLYBS(DELAY_BEFORE_SPCK) |
+ SPI_CSR_DLYBCT(DELAY_BETWEEN_CONS_COM) | SPI_CSR_SCBR(0xC8) );
+
+ SPI_Enable( BOARD_TSC_SPI_BASE ) ;
+
+ for ( dwDummy=0 ; dwDummy < 100000 ; dwDummy++ ) ;
+
+ dwDummy = BOARD_TSC_SPI_BASE->SPI_SR ;
+ dwDummy = BOARD_TSC_SPI_BASE->SPI_RDR ;
+
+ SendCommand( CMD_ENABLE_PENIRQ ) ;
+}
+
+/**
+ * \brief Reset the ADS7843
+ */
+void ADS7843_Reset( void )
+{
+ /* Disable SPI */
+ SPI_Disable( BOARD_TSC_SPI_BASE ) ;
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/at45_spi.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/at45_spi.c
new file mode 100644
index 0000000..6d08bfe
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/at45_spi.c
@@ -0,0 +1,356 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/** \addtogroup spi_at45_module SPI AT45 driver
+ * \ingroup at45d_module
+ * The Dataflash driver is based on top of the corresponding Spi driver.
+ * A Dataflash structure instance has to be initialized using the DF_Init
+ * function. Then basic dataflash operations can be launched using macros such
+ * as DF_continuous_read. These macros invoke the DF_Command() function which
+ * invokes the DPI low driver using the SPI_SendCommand() function.
+ * Beware to compute the dataflash internal address, the dataflash sector
+ * description must be known (DataflashDesc). Dataflash can be automatically
+ * detected using the DF_Scan() function.
+ *
+ * \section Usage
+ * <ul>
+ * <li> Initializes an AT45 instance and configures SPI chip select pin
+ * using AT45_Configure(). </li>
+ * <li> Detect DF and returns DF description corresponding to the device
+ * connected using AT45_FindDevice().This function shall be called by
+ * the application before AT45_SendCommand.</li>
+ * <li>Sends a command to the DF through the SPI using AT45_SendCommand().
+ * The command is identified by its command code and the number of
+ * bytes to transfer.</li>
+ * <li>Example code for sending command to write a page to DF. </li>
+ * \code
+ * // Issue a page write through buffer 1 command
+ * error = AT45_SendCommand(pAt45, AT45_PAGE_WRITE_BUF1, 4,
+ * pBuffer, size, address, 0, 0);
+ * \endcode
+ * <li>Example code for sending command to read a page from DF.
+ * If data needs to be received, then a data buffer must be
+ * provided.</li>
+ * \code
+ * // Issue a continuous read array command
+ * error = AT45_SendCommand(pAt45, AT45_CONTINUOUS_READ_LEG, 8,
+ * pBuffer, size, address, 0, 0);
+ * \endcode
+ * <li> This function does not block; its optional callback will
+ * be invoked when the transfer completes.</li>
+ * <li> Check the AT45 driver is ready or not by polling AT45_IsBusy().
+ * </ul>
+ * Related files :\n
+ * \ref spi_at45.c\n
+ * \ref spi_at45.h.\n
+*/
+/*@{*/
+/*@}*/
+
+
+/**
+ * \file
+ *
+ * Implementation of SPI At45 driver.
+ *
+ */
+
+
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "board.h"
+
+#include <assert.h>
+#include <string.h>
+
+/*----------------------------------------------------------------------------
+ * Internal definitions
+ *----------------------------------------------------------------------------*/
+ /** SPI clock frequency, in Hz.*/
+#define SPCK 1000000
+
+/** Number of dataflash which can be recognized.*/
+#define NUMDATAFLASH (sizeof(at45Devices) / sizeof(At45Desc))
+
+/** SPI chip select configuration value. */
+#define CSR (SPI_CSR_NCPHA | \
+ SPID_CSR_DLYBCT(BOARD_MCK, 250) | \
+ SPID_CSR_DLYBS(BOARD_MCK, 250) | \
+ SPID_CSR_SCBR(BOARD_MCK, SPCK))
+
+/*----------------------------------------------------------------------------
+ * Local variables
+ *----------------------------------------------------------------------------*/
+
+/** indicate if the device is configured as binary page or not.*/
+static uint8_t configuredBinaryPage;
+
+/** At45 device descriptor structure. */
+static const At45Desc at45Devices[] = {
+ { 512, 1, 264, 9, 0x0C, "AT45DB011D"},
+ { 1024, 1, 264, 9, 0x14, "AT45DB021D"},
+ { 2048, 1, 264, 9, 0x1C, "AT45DB041D"},
+ { 4096, 1, 264, 9, 0x24, "AT45DB081D"},
+ { 4096, 1, 528, 10, 0x2C, "AT45DB161D"},
+ { 8192, 1, 528, 10, 0x34, "AT45DB321D"},
+ { 8192, 1, 1056, 11, 0x3C, "AT45DB642D"},
+ {16384, 1, 1056, 11, 0x10, "AT45DB1282"},
+ {16384, 1, 2112, 12, 0x18, "AT45DB2562"},
+ {32768, 1, 2112, 12, 0x20, "AT45DB5122"}
+};
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Initializes an AT45 instance and configures SPI chip select register.
+ *
+ * \param pAt45 Pointer to the At45 instance to initialize.
+ * \param pSpid Pointer to the underlying SPI driver.
+ * \param ucSpiCs Chip select value to connect to the At45.
+ * \param ucPolling Operation mode for the AT45 device.
+ * \return 0.
+ */
+extern uint32_t AT45_Configure( At45* pAt45, void* pSpid, uint8_t ucSpiCs,uint8_t ucPolling )
+{
+ SpidCmd *pCommand;
+
+ /* Sanity checks */
+ assert( pSpid != NULL ) ;
+ assert( pAt45 != NULL ) ;
+
+ if (pAt45->dwInterfaceType == AT45_INTERFACE_TYPE_USART_SPI)
+ {
+ pAt45->pUsartd = (Usartd *)pSpid ;
+ }
+ else
+ {
+ /* Configure the SPI chip select for the serial flash */
+ SPID_ConfigureCS(pSpid, ucSpiCs, CSR);
+
+ /* Initialize the AT45 fields */
+ pAt45->pSpid = (Spid *)pSpid;
+ }
+
+ pAt45->pDesc = 0;
+ pAt45->dwPollingMode = ucPolling;
+ memset( pAt45->pCmdBuffer, 0, 8 ) ;
+
+ /* Initialize the command structure */
+ pCommand = &(pAt45->command);
+ pCommand->pCmd = pAt45->pCmdBuffer ;
+ pCommand->callback = 0;
+ pCommand->pArgument = 0;
+ pCommand->spiCs = ucSpiCs;
+ return 0 ;
+}
+
+
+/**
+ * \brief Check if the At45 driver is in busy.
+ *
+ * \param pAt45 Pointer to the At45 instance to initialize.
+ * \return 1 if the At45 driver is not executing any command,otherwise it returns 0.
+ */
+extern uint32_t AT45_IsBusy( At45* pAt45 )
+{
+ if (pAt45->dwInterfaceType == AT45_INTERFACE_TYPE_USART_SPI)
+ {
+ return USART_SPIDIsBusy(pAt45->pUsartd);
+ }
+ else
+ {
+ return SPID_IsBusy( pAt45->pSpid ) ;
+ }
+}
+
+/**
+ * \brief Sends a command to the dataflash through the SPI.
+ * The command is identified by its command code and the number of bytes to transfer
+ * (1 + number of address bytes + number of dummy bytes).If data needs to be received,
+ * then a data buffer must be provided.
+ * \note This function does not block; its optional callback will be invoked when
+ * the transfer completes.
+ * \param pAt45 Pointer to the At45 instance to initialize.
+ * \param ucCmd Command code.
+ * \param ucCmdSize Size of command code + address bytes + dummy bytes.
+ * \param pucData Data buffer.
+ * \param dwDataSize Number of data bytes to send/receive.
+ * \param dwAddress Address at which the command is performed if meaningful.
+ * \param pCallback Optional callback to invoke at end of transfer.
+ * \param pArgument Optional parameter to the callback function.
+ * \return 0.
+ */
+extern uint32_t AT45_SendCommand( At45* pAt45,
+ uint8_t ucCmd,
+ uint8_t ucCmdSize,
+ uint8_t *pucData,
+ uint32_t dwDataSize,
+ uint32_t dwAddress,
+ SpidCallback pCallback,
+ void *pArgument )
+{
+ SpidCmd *pCommand ;
+ const At45Desc *pDesc = pAt45->pDesc ;
+ uint32_t dfAddress = 0 ;
+
+ /* Sanity checks */
+ assert( pDesc || (ucCmd == AT45_STATUS_READ) ) ;
+
+ /* Check if the SPI driver is available*/
+ if ( AT45_IsBusy( pAt45 ) )
+ {
+ return AT45_ERROR_LOCK ;
+ }
+
+ /* Compute command pattern*/
+ pAt45->pCmdBuffer[0] = ucCmd ;
+
+ /* Add address bytes if necessary*/
+ if ( ucCmdSize > 1 )
+ {
+ assert( pDesc != NULL ) ;
+ if ( !configuredBinaryPage )
+ {
+ dfAddress = ((dwAddress / (pDesc->dwPageSize)) << pDesc->dwPageOffset)
+ + (dwAddress % (pDesc->dwPageSize));
+ }
+ else
+ {
+ dfAddress = dwAddress ;
+ }
+
+ /* Write address bytes */
+ if ( pDesc->dwPageNumber >= 16384 )
+ {
+ pAt45->pCmdBuffer[1] = ((dfAddress & 0x0F000000) >> 24);
+ pAt45->pCmdBuffer[2] = ((dfAddress & 0x00FF0000) >> 16);
+ pAt45->pCmdBuffer[3] = ((dfAddress & 0x0000FF00) >> 8);
+ pAt45->pCmdBuffer[4] = ((dfAddress & 0x000000FF) >> 0);
+
+ if ( (ucCmd != AT45_CONTINUOUS_READ) && (ucCmd != AT45_PAGE_READ) )
+ {
+ ucCmdSize++ ;
+ }
+ }
+ else
+ {
+ pAt45->pCmdBuffer[1] = ((dfAddress & 0x00FF0000) >> 16);
+ pAt45->pCmdBuffer[2] = ((dfAddress & 0x0000FF00) >> 8);
+ pAt45->pCmdBuffer[3] = ((dfAddress & 0x000000FF) >> 0);
+ }
+ }
+
+ /* Update the SPI Transfer descriptors */
+ pCommand = &(pAt45->command) ;
+ pCommand->cmdSize = ucCmdSize ;
+ pCommand->pData = pucData ;
+ pCommand->dataSize = dwDataSize ;
+ pCommand->callback = pCallback ;
+ pCommand->pArgument = pArgument ;
+
+ /* Send Command and data through the SPI */
+ if (pAt45->dwInterfaceType == AT45_INTERFACE_TYPE_USART_SPI)
+ {
+ if ( USART_SPIDSendCommand( pAt45->pUsartd, pCommand ) )
+ {
+ return AT45_ERROR_SPI ;
+ }
+ }
+ else
+ {
+ if ( SPID_SendCommand( pAt45->pSpid, pCommand ) )
+ {
+ return AT45_ERROR_SPI ;
+ }
+ }
+
+ return 0 ;
+}
+
+/**
+ * \brief returns the At45Desc structure corresponding to the device connected.
+ * It automatically initializes pAt45->pDesc field structure.
+ *
+ * \note This function shall be called by the application before AT45_SendCommand.
+ *
+ * \param pAt45 Pointer to the At45 instance to initialize.
+ * \param ucStatus Device status register value.
+ *
+ * \return 0 if successful; Otherwise, returns AT45_ERROR_LOCK if the At45
+ * driver is in use or AT45_ERROR_SPI if there was an error with the SPI driver.
+ */
+extern const At45Desc * AT45_FindDevice( At45 *pAt45, uint8_t ucStatus )
+{
+ uint32_t i;
+ uint8_t id = AT45_STATUS_ID(ucStatus);
+
+ /* Check if status is all one; in which case, it is assumed that no device is connected*/
+ if ( ucStatus == 0xFF )
+ {
+ return 0 ;
+ }
+
+ /* Look in device array */
+ i = 0 ;
+ pAt45->pDesc = 0 ;
+ while ( (i < NUMDATAFLASH) && !(pAt45->pDesc) )
+ {
+ if ( at45Devices[i].ucID == id )
+ {
+ pAt45->pDesc = &(at45Devices[i]) ;
+ }
+ i++ ;
+ }
+
+ configuredBinaryPage = AT45_STATUS_BINARY(ucStatus);
+
+ return pAt45->pDesc ;
+}
+
+/**
+ * \brief returns the pagesize corresponding to the device connected.
+ * \param pAt45 Pointer to the At45 instance to initialize.
+ * \return page size.
+ */
+extern uint32_t AT45_PageSize( At45 *pAt45 )
+{
+ uint32_t dwPageSize = pAt45->pDesc->dwPageSize ;
+
+ if ( ((pAt45->pDesc->dwHasBinaryPage) == 0) || !configuredBinaryPage )
+ {
+ return dwPageSize ;
+ }
+
+ return ((dwPageSize >> 8) << 8) ;
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/at45d.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/at45d.c
new file mode 100644
index 0000000..100d517
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/at45d.c
@@ -0,0 +1,302 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2011, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \addtogroup external_component External Component
+ *
+ * \addtogroup at45d_module AT45 driver
+ * \ingroup external_component
+ * The AT45 Dataflash driver is based on the corresponding AT45 driver.
+ * A AT45 instance has to be initialized using the Dataflash levle function
+ * AT45_Configure(). AT45 Dataflash can be automatically detected using
+ * the AT45_FindDevice() function. Then AT45 dataflash operations such as
+ * read, write and erase DF can be launched using AT45_SendCommand function
+ * with corresponding AT45 command set.
+ *
+ * \section Usage
+ * <ul>
+ * <li> Reads data from the At45 at the specified address using AT45D_Read().</li>
+ * <li> Writes data on the At45 at the specified address using AT45D_Write().</li>
+ * <li> Erases a page of data at the given address using AT45D_Erase().</li>
+ * <li> Poll until the At45 has completed of corresponding operations using
+ * AT45D_WaitReady().</li>
+ * <li> Retrieves and returns the At45 current using AT45D_GetStatus().</li>
+ * </ul>
+ * Related files :\n
+ * \ref at45d.c\n
+ * \ref at45d.h.\n
+ */
+ /*@{*/
+ /*@}*/
+
+
+/**
+ * \file
+ *
+ * Implementation of At45 driver.
+ *
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "board.h"
+
+#include <assert.h>
+#include <string.h>
+
+/*----------------------------------------------------------------------------
+ * Local functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Wait for transfer to finish calling the SPI driver ISR (interrupts are
+ * disabled).
+ *
+ * \param pAt45 Pointer to an AT45 driver instance.
+ */
+static void AT45D_Wait( At45* pAt45 )
+{
+ /* Wait for transfer to finish */
+ while ( AT45_IsBusy( pAt45 ) )
+ {
+ if (pAt45->dwInterfaceType == AT45_INTERFACE_TYPE_USART_SPI)
+ {
+ USART_SPIDHandler(pAt45->pUsartd);
+ }
+ else
+ {
+ SPID_Handler( pAt45->pSpid ) ;
+ }
+ }
+}
+
+/*----------------------------------------------------------------------------
+ * Global functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Waits for the At45 to be ready to accept new commands.
+ *
+ * \param pAt45 Pointer to an AT45 driver instance.
+ */
+void AT45D_WaitReady( At45* pAt45 )
+{
+ uint8_t ready = 0;
+
+ assert( pAt45 != NULL ) ;
+
+ /* Poll device until it is ready. */
+ while (!ready)
+ {
+ ready = AT45_STATUS_READY(AT45D_GetStatus(pAt45));
+ }
+}
+
+/**
+ * \brief Retrieves and returns the At45 current status, or 0 if an error happened.
+ *
+ * \param pAt45 Pointer to an AT45 driver instance.
+ * \return Return ucStatus for success or 0 for error;
+ */
+uint32_t AT45D_GetStatus( At45* pAt45 )
+{
+ uint32_t dwError ;
+ uint8_t ucStatus ;
+
+ assert( pAt45 != NULL ) ;
+
+ /* Issue a status register read command */
+ dwError = AT45_SendCommand( pAt45, AT45_STATUS_READ, 1, &ucStatus, 1, 0, 0, 0 ) ;
+
+ if (dwError)
+ {
+ TRACE_ERROR("AT45D_GetStatus error %u\n\r", dwError);
+
+ return 0;
+ }
+
+ /* Wait for command to terminate */
+ while ( AT45_IsBusy( pAt45 ) )
+ {
+ AT45D_Wait( pAt45 ) ;
+ }
+
+ return ucStatus ;
+}
+
+/**
+ * \brief Reads data from the At45 inside the provided buffer. Since a continuous
+ * read command is used, there is no restriction on the buffer size and read address.
+ *
+ * \param pAt45 Pointer to an AT45 driver instance.
+ * \param pBuffer Data buffer.
+ * \param size Number of bytes to read.
+ * \param address Address at which data shall be read.
+ * \return Return 1 for success or 0 for error;
+ */
+uint32_t AT45D_Read( At45* pAt45, uint8_t* pucBuffer, uint32_t dwSize, uint32_t dwAddress )
+{
+ uint32_t dwError ;
+
+ assert( pAt45 != NULL ) ;
+ assert( pucBuffer != NULL ) ;
+
+ /* Issue a continuous read array command. */
+ dwError = AT45_SendCommand( pAt45, AT45_CONTINUOUS_READ_LEG, 8, pucBuffer, dwSize, dwAddress, 0, 0 ) ;
+
+ if (dwError)
+ {
+ TRACE_ERROR("AT45D_GetStatus error %u\n\r", dwError);
+
+ return 0;
+ }
+
+ /* Wait for the read command to execute. */
+ while ( AT45_IsBusy( pAt45 ) )
+ {
+ AT45D_Wait( pAt45 ) ;
+ }
+
+ return 1;
+}
+
+/**
+ * \brief Writes data on the At45 at the specified address. Only one page of
+ * data is written that way; if the address is not at the beginning of the
+ * page, the data is written starting from this address and wraps around to
+ * the beginning of the page.
+ *
+ * \param pAt45 Pointer to an AT45 driver instance.
+ * \param pucBuffer Data buffer.
+ * \param dwSize Number of bytes to write.
+ * \param dwAddress Destination address on the At45.
+ * \return Return 1 for success or 0 for error;
+ */
+uint32_t AT45D_Write( At45* pAt45, uint8_t *pucBuffer, uint32_t dwSize, uint32_t dwAddress )
+{
+ uint8_t dwError ;
+
+ assert( pAt45 != NULL ) ;
+ assert( pucBuffer != NULL ) ;
+ assert( dwSize <= pAt45->pDesc->dwPageSize ) ;
+
+ /* Issue a page write through buffer 1 command. */
+ dwError = AT45_SendCommand( pAt45, AT45_PAGE_WRITE_BUF1, 4, pucBuffer, dwSize, dwAddress, 0, 0 ) ;
+
+ if (dwError)
+ {
+ TRACE_ERROR("AT45D_GetStatus error %d\n\r", dwError);
+
+ return 0;
+ }
+
+
+ /* Wait until the command is sent. */
+ while ( AT45_IsBusy( pAt45 ) )
+ {
+ AT45D_Wait( pAt45 ) ;
+ }
+
+ /* Wait until the At45 becomes ready again.*/
+ AT45D_WaitReady( pAt45 ) ;
+
+ return 1;
+}
+
+/**
+ * \brief Erases a page of data at the given address in the At45.
+ *
+ * \param pAt45 Pointer to an AT45 driver instance.
+ * \param dwAddress Address of page to erase.
+ * \return Return 1 for success or 0 for error;
+ */
+uint32_t AT45D_Erase( At45* pAt45, uint32_t dwAddress )
+{
+ uint32_t dwError ;
+
+ assert( pAt45 != NULL ) ;
+
+ /* Issue a page erase command. */
+ dwError = AT45_SendCommand( pAt45, AT45_PAGE_ERASE, 4, 0, 0, dwAddress, 0, 0 ) ;
+
+ if (dwError)
+ {
+ TRACE_ERROR("AT45D_GetStatus error %u\n\r", dwError);
+
+ return 0;
+ }
+
+ /* Wait for end of transfer. */
+ while ( AT45_IsBusy(pAt45 ) )
+ {
+ AT45D_Wait( pAt45 ) ;
+ }
+
+ /* Poll until the At45 has completed the erase operation. */
+ AT45D_WaitReady( pAt45 ) ;
+
+ return 1;
+}
+
+/**
+ * \brief Configure power-of-2 binary page size in the At45.
+ *
+ * \param pAt45 Pointer to an AT45 driver instance.
+ * \return Return 1 for success or 0 for error;
+ */
+uint32_t AT45D_BinaryPage( At45* pAt45 )
+{
+ uint8_t dwError ;
+ uint8_t opcode[3]= {AT45_BINARY_PAGE};
+ assert( pAt45 != NULL ) ;
+
+ /* Issue a binary page command. */
+
+ dwError = AT45_SendCommand( pAt45, AT45_BINARY_PAGE_FIRST_OPCODE, 1, opcode, 3, 0, 0, 0 ) ;
+
+ if (dwError)
+ {
+ TRACE_ERROR("AT45D_GetStatus error %d\n\r", dwError);
+
+ return 0;
+ }
+
+ /* Wait for end of transfer.*/
+ while ( AT45_IsBusy( pAt45 ) )
+ {
+ AT45D_Wait( pAt45 ) ;
+ }
+
+ /* Wait until the At45 becomes ready again.*/
+ AT45D_WaitReady( pAt45 ) ;
+
+ return 1;
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/bmp.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/bmp.c
new file mode 100644
index 0000000..4ac146c
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/bmp.c
@@ -0,0 +1,314 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+* \file
+*
+* Implementation of BMP decoder.
+*
+*/
+
+/*------------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "board.h"
+
+#include <string.h>
+
+/*-----------------------------------------------------------------------------
+ * Local Definitions
+ *-----------------------------------------------------------------------------*/
+/** BMP offset for header */
+#define IMAGE_OFFSET 0x100
+
+ /** Describe the BMP palette */
+typedef struct _BMPPaletteEntry
+{
+ /* Blue value */
+ uint8_t b;
+ /* Green value */
+ uint8_t g;
+ /* Red value */
+ uint8_t r;
+ /* Filler character value */
+ uint8_t filler;
+} BMPPaletteEntry ;
+
+/*------------------------------------------------------------------------------
+ * External functions
+ *------------------------------------------------------------------------------*/
+/**
+ * Test if BMP is valid
+ * \param file Buffer holding the file to examinate.
+ * \return 1 if the header of a BMP file is valid; otherwise returns 0.
+ */
+uint8_t BMP_IsValid( void *file )
+{
+ return ((BMPHeader*) file)->type == BMP_TYPE ;
+}
+
+/**
+ * \brief Returns the size of a BMP image given at least its header (the file does
+ * not have to be complete).
+ * \param file Pointer to the buffer which holds the BMP file.
+ * \return size of BMP image
+ */
+uint32_t BMP_GetFileSize( void *file )
+{
+ return ((BMPHeader *) file)->fileSize ;
+}
+
+/**
+ * \brief Write a BMP header
+ * \param pAddressHeader Begin address of the BMP
+ * \param bmpHSize BMP heigth size
+ * \param bmpVSize BMP width size
+ * \param nbByte_Pixels Number of byte per pixels
+ */
+void WriteBMPheader( uint32_t* pAddressHeader, uint32_t bmpHSize, uint32_t bmpVSize, uint8_t nbByte_Pixels )
+{
+ uint32_t i;
+ uint32_t* fill;
+ BMPHeader *Header;
+
+ fill = pAddressHeader;
+ for ( i=0 ; i < IMAGE_OFFSET ; i+=4 )
+ {
+ *fill++ = 0;
+ }
+
+ Header = (BMPHeader*) pAddressHeader;
+
+ Header->type = BMP_TYPE;
+ Header->fileSize = (bmpHSize * bmpVSize * nbByte_Pixels) + IMAGE_OFFSET;
+ Header->reserved1 = 0;
+ Header->reserved2 = 0;
+ Header->offset = IMAGE_OFFSET;
+ Header->headerSize = BITMAPINFOHEADER;
+ Header->width = bmpHSize;
+ Header->height = bmpVSize;
+ Header->planes = 1;
+ Header->bits = nbByte_Pixels * 8;
+ Header->compression = 0;
+ Header->imageSize = bmpHSize * bmpVSize * nbByte_Pixels;
+ Header->xresolution = 0;
+ Header->yresolution = 0;
+ Header->ncolours = 0;
+ Header->importantcolours = 0;
+}
+
+
+/**
+ * \brief debug function, dislay BMP header
+ * \param pAddressHeader Address of the BMP
+ */
+#if (TRACE_LEVEL >= TRACE_LEVEL_INFO)
+void BMP_displayHeader( uint32_t* pAddressHeader )
+{
+ BMPHeader *header;
+
+ header = (BMPHeader*) pAddressHeader;
+
+ TRACE_INFO("BMP\n\r");
+ TRACE_INFO("type 0x%X \n\r", header->type);
+ TRACE_INFO("fileSize %u \n\r", header->fileSize);
+ TRACE_INFO("reserved1 %d \n\r", header->reserved1);
+ TRACE_INFO("reserved2 %d \n\r", header->reserved2);
+ TRACE_INFO("offset %u \n\r", header->offset);
+ TRACE_INFO("headerSize %u \n\r", header->headerSize);
+ TRACE_INFO("width %u \n\r", header->width);
+ TRACE_INFO("height %u \n\r", header->height);
+ TRACE_INFO("planes %d \n\r", header->planes);
+ TRACE_INFO("bits %d \n\r", header->bits);
+ TRACE_INFO("compression %u \n\r", header->compression);
+ TRACE_INFO("imageSize %u \n\r", header->imageSize);
+ TRACE_INFO("xresolution %u \n\r", header->xresolution);
+ TRACE_INFO("yresolution %u \n\r", header->yresolution);
+ TRACE_INFO("ncolours %u \n\r", header->ncolours);
+ TRACE_INFO("importantcolours %u\n\r", header->importantcolours);
+}
+#endif
+
+/**
+* /brief Loads a BMP image located at the given address, decodes it and stores the
+* resulting image inside the provided buffer. Image must have the specified
+* width & height.
+* If no buffer is provided, this function simply checks if it is able to
+* decode the image.
+* \param file Buffer which holds the BMP file.
+* \param buffer Buffer in which to store the decoded image.
+* \param width Buffer width in pixels.
+* \param height Buffer height in pixels.
+* \param bpp Number of bits per pixels that the buffer stores.
+* \return 0 if the image has been loaded; otherwise returns an error code.
+*/
+uint8_t BMP_Decode( void *file, uint8_t *buffer, uint32_t width, uint32_t height, uint8_t bpp )
+{
+ BMPHeader *header;
+ uint32_t i, j;
+ uint8_t r, g, b;
+ uint8_t *image;
+
+ // Read header information
+ header = (BMPHeader*) file;
+
+ // Verify that the file is valid
+ if ( !BMP_IsValid( file ) )
+ {
+ TRACE_ERROR("BMP_Decode: File type is not 'BM' (0x%04X).\n\r",header->type);
+
+ return 1;
+ }
+
+ // Check that parameters match
+ if ( (header->compression != 0) || (header->width != width) || (header->height != height))
+ {
+ TRACE_ERROR("BMP_Decode: File format not supported\n\r");
+ TRACE_ERROR(" -> .compression = %u\n\r", (unsigned int)header->compression);
+ TRACE_ERROR(" -> .width = %u\n\r", (unsigned int)header->width);
+ TRACE_ERROR(" -> .height = %u\n\r", (unsigned int)header->height);
+ TRACE_ERROR(" -> .bits = %d\n\r", (int)header->bits);
+
+ return 2;
+ }
+
+ // Get image data
+ image = (uint8_t *) ((uint32_t) file + header->offset);
+
+ // Check that the bpp resolution is supported
+ // Only a 24-bit output & 24- or 8-bit input are supported
+ if ( bpp != 24 )
+ {
+ TRACE_ERROR("BMP_Decode: Output resolution not supported\n\r");
+
+ return 3;
+ }
+ else
+ {
+ if (header->bits == 24)
+ {
+ // Decoding is ok
+ if (!buffer) return 0;
+
+ // Get image data (swapping red & blue)
+ for ( i=0 ; i < height ; i++ )
+ {
+ for ( j=0 ; j < width; j++ )
+ {
+ r = image[((height - i - 1) * width + j) * 3 + 2];
+ g = image[((height - i - 1) * width + j) * 3 + 1];
+ b = image[((height - i - 1) * width + j) * 3];
+
+ #if defined(BOARD_LCD_RGB565)
+ // Interlacing
+ r = ((r << 1) & 0xF0) | ((g & 0x80) >> 4) | ((r & 0x80) >> 5);
+ g = (g << 1) & 0xF8;
+ b = b & 0xF8;
+
+ buffer[(i * width + j) * 3] = b;
+ buffer[(i * width + j) * 3 + 1] = g;
+ buffer[(i * width + j) * 3 + 2] = r;
+
+ #else
+ buffer[(i * width + j) * 3] = r;
+ buffer[(i * width + j) * 3 + 1] = g;
+ buffer[(i * width + j) * 3 + 2] = b;
+ #endif //#if defined(BOARD_LCD_RGB565)
+ }
+ }
+ }
+ else
+ {
+ if ( header->bits == 8 )
+ {
+ BMPPaletteEntry palette[256];
+
+ // Decoding is ok
+ if (!buffer) return 0;
+
+ // Retrieve palette
+ memcpy( palette, (uint8_t *) ((uint32_t) file + sizeof( BMPHeader )), header->offset - sizeof( BMPHeader ) ) ;
+
+ // Decode image (reversing row order)
+ for ( i=0 ; i < height ; i++ )
+ {
+ for (j=0; j < width; j++)
+ {
+ r = palette[image[(height - i - 1) * width + j]].r;
+ g = palette[image[(height - i - 1) * width + j]].g;
+ b = palette[image[(height - i - 1) * width + j]].b;
+
+ buffer[(i * width + j) * 3] = r;
+ buffer[(i * width + j) * 3 + 1] = g;
+ buffer[(i * width + j) * 3 + 2] = b;
+ }
+ }
+ }
+ else
+ {
+
+ TRACE_ERROR("BMP_Decode: Input resolution not supported\n\r");
+ TRACE_INFO("header->bits 0x%X \n\r", header->bits);
+ return 4 ;
+ }
+ }
+ }
+
+ return 0 ;
+}
+
+/**
+* \brief Convert RGB 565 to RGB 555 (RGB 555 is adapted to LCD)
+*
+* \param fileSource Buffer which holds the RGB file
+* \param fileDestination Buffer in which to store the decoded image
+* \param width Buffer width in pixels.
+* \param height Buffer height in pixels.
+* \param bpp Number of bits per pixels that the buffer stores.
+*/
+void RGB565toBGR555( uint8_t *fileSource, uint8_t *fileDestination, uint32_t width, uint32_t height, uint8_t bpp )
+{
+ uint32_t i;
+ uint32_t j;
+ uint32_t row;
+
+ for (i=0; i < height*(bpp/8); i++)
+ {
+ row = (i*width*(bpp/8));
+
+ for (j=0; j <= width*(bpp/8); j+=2)
+ {
+ fileDestination[row+j] = ((fileSource[row+j+1]>>3)&0x1F)
+ | (fileSource[row+j]&0xE0);
+ fileDestination[row+j+1] = (fileSource[row+j+1]&0x03)
+ | ((fileSource[row+j]&0x1F)<<2);
+ }
+ }
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/board_cstartup_gnu.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/board_cstartup_gnu.c
new file mode 100644
index 0000000..eaf39d7
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/board_cstartup_gnu.c
@@ -0,0 +1,190 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+ /**
+ * \file
+ *
+ * Implementation of start up code for GNU.
+ *
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "board.h"
+
+/*----------------------------------------------------------------------------
+ * Exported variables
+ *----------------------------------------------------------------------------*/
+
+/* Stack Configuration */
+#define STACK_SIZE 0x900 /** Stack size (in DWords) */
+__attribute__ ((aligned(8),section(".stack")))
+uint32_t pdwStack[STACK_SIZE] ;
+
+/* Initialize segments */
+extern uint32_t _sfixed;
+extern uint32_t _efixed;
+extern uint32_t _etext;
+extern uint32_t _srelocate;
+extern uint32_t _erelocate;
+extern uint32_t _szero;
+extern uint32_t _ezero;
+
+
+/*----------------------------------------------------------------------------
+ * ProtoTypes
+ *----------------------------------------------------------------------------*/
+
+/** \cond DOXYGEN_SHOULD_SKIP_THIS */
+extern int main( void ) ;
+/** \endcond */
+void ResetException( void ) ;
+extern void __libc_init_array( void ) ;
+
+/*------------------------------------------------------------------------------
+ * Exception Table
+ *------------------------------------------------------------------------------*/
+
+__attribute__((section(".vectors")))
+IntFunc exception_table[] = {
+
+ /* Configure Initial Stack Pointer, using linker-generated symbols */
+ (IntFunc)(&pdwStack[STACK_SIZE-1]),
+ ResetException,
+
+ NMI_Handler,
+ HardFault_Handler,
+ MemManage_Handler,
+ BusFault_Handler,
+ UsageFault_Handler,
+ 0, 0, 0, 0, /* Reserved */
+ SVC_Handler,
+ DebugMon_Handler,
+ 0, /* Reserved */
+ PendSV_Handler,
+ SysTick_Handler,
+
+ /* Configurable interrupts */
+ SUPC_IrqHandler, /* 0 Supply Controller */
+ RSTC_IrqHandler, /* 1 Reset Controller */
+ RTC_IrqHandler, /* 2 Real Time Clock */
+ RTT_IrqHandler, /* 3 Real Time Timer */
+ WDT_IrqHandler, /* 4 Watchdog Timer */
+ PMC_IrqHandler, /* 5 PMC */
+ EFC0_IrqHandler, /* 6 EFC 0 */
+ EFC1_IrqHandler, /* 7 EFC 1 */
+ UART_IrqHandler, /* 8 UART */
+ SMC_IrqHandler, /* 9 SMC */
+ SDRAMC_IrqHandler, /* 10 SDRAMC */
+ PIOA_IrqHandler, /* 11 Parallel IO Controller A */
+ PIOB_IrqHandler, /* 12 Parallel IO Controller B */
+ PIOC_IrqHandler, /* 13 Parallel IO Controller C */
+ PIOD_IrqHandler, /* 14 Parallel IO Controller D */
+ PIOE_IrqHandler, /* 15 Parallel IO Controller E */
+ PIOF_IrqHandler, /* 16 Parallel IO Controller F */
+ USART0_IrqHandler, /* 17 USART 0 */
+ USART1_IrqHandler, /* 18 USART 1 */
+ USART2_IrqHandler, /* 19 USART 2 */
+ USART3_IrqHandler, /* 20 USART 3 */
+ HSMCI_IrqHandler, /* 21 MCI */
+ TWI0_IrqHandler, /* 22 TWI 0 */
+ TWI1_IrqHandler, /* 23 TWI 1 */
+ SPI0_IrqHandler, /* 24 SPI 0 */
+ SPI1_IrqHandler, /* 25 SPI 1 */
+ SSC_IrqHandler, /* 26 SSC */
+ TC0_IrqHandler, /* 27 Timer Counter 0 */
+ TC1_IrqHandler, /* 28 Timer Counter 1 */
+ TC2_IrqHandler, /* 29 Timer Counter 2 */
+ TC3_IrqHandler, /* 30 Timer Counter 3 */
+ TC4_IrqHandler, /* 31 Timer Counter 4 */
+ TC5_IrqHandler, /* 32 Timer Counter 5 */
+ TC6_IrqHandler, /* 33 Timer Counter 6 */
+ TC7_IrqHandler, /* 34 Timer Counter 7 */
+ TC8_IrqHandler, /* 35 Timer Counter 8 */
+ PWM_IrqHandler, /* 36 PWM */
+ ADC_IrqHandler, /* 37 ADC controller */
+ DACC_IrqHandler, /* 38 DAC controller */
+ DMAC_IrqHandler, /* 39 DMA Controller */
+ UOTGHS_IrqHandler, /* 40 USB OTG High Speed */
+ TRNG_IrqHandler, /* 41 True Random Number Generator */
+ EMAC_IrqHandler, /* 42 Ethernet MAC */
+ CAN0_IrqHandler, /* 43 CAN Controller 0 */
+ CAN1_IrqHandler, /* 44 CAN Controller 1 */
+} ;
+
+/**
+ * \brief This is the code that gets called on processor reset.
+ * To initialize the device, and call the main() routine.
+ */
+void ResetException( void )
+{
+ uint32_t *pSrc, *pDest ;
+
+ /* Low level Initialize */
+ LowLevelInit() ;
+
+ /* Initialize the relocate segment */
+ pSrc = &_etext ;
+ pDest = &_srelocate ;
+
+ if ( pSrc != pDest )
+ {
+ for ( ; pDest < &_erelocate ; )
+ {
+ *pDest++ = *pSrc++ ;
+ }
+ }
+
+ /* Clear the zero segment */
+ for ( pDest = &_szero ; pDest < &_ezero ; )
+ {
+ *pDest++ = 0;
+ }
+
+ /* Set the vector table base address */
+ pSrc = (uint32_t *)&_sfixed;
+ SCB->VTOR = ( (uint32_t)pSrc & SCB_VTOR_TBLOFF_Msk ) ;
+
+ if ( ((uint32_t)pSrc >= IRAM0_ADDR) && ((uint32_t)pSrc < NFC_RAM_ADDR) )
+ {
+ SCB->VTOR |= 1 << SCB_VTOR_TBLBASE_Pos ;
+ }
+
+ /* Initialize the C library */
+ __libc_init_array() ;
+
+ /* Branch to main function */
+ main() ;
+
+ /* Infinite loop */
+ while ( 1 ) ;
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/board_lowlevel.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/board_lowlevel.c
new file mode 100644
index 0000000..ed9592f
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/board_lowlevel.c
@@ -0,0 +1,122 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * Provides the low-level initialization function that called on chip startup.
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "board.h"
+
+/*----------------------------------------------------------------------------
+ * Local definitions
+ *----------------------------------------------------------------------------*/
+//#define OSC_12MHZ 12000000
+//
+///// MCFR Min and Max values with 32kHz RC
+//#define MCFR_32RC_MIN(freq) ((freq * 16)/44000)
+//#define MCFR_32RC_MAX(freq) ((freq * 16)/20000)
+
+/* Define clock dwTimeout */
+#define CLOCK_TIMEOUT 0xFFFFFFFF
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Performs the low-level initialization of the chip.
+ * This includes EFC and master clock configuration.
+ * It also enable a low level on the pin NRST triggers a user reset.
+ */
+extern WEAK void LowLevelInit( void )
+{
+ uint32_t dwTimeout;
+
+ /* Set 3 WS for Embedded Flash Access for 84 MHz */
+ EFC0->EEFC_FMR = EEFC_FMR_FWS( 3 );
+ EFC1->EEFC_FMR = EEFC_FMR_FWS( 3 );
+
+ /* Initialize main oscillator */
+ if ( !(PMC->CKGR_MOR & CKGR_MOR_MOSCSEL) ) /* Main Oscillator Selection */
+ {
+ /* The Main Crystal Oscillator is enabled */
+ PMC->CKGR_MOR = CKGR_MOR_KEY(0x37)
+ | CKGR_MOR_MOSCXTST(0x8) /* Main Crystal Oscillator Start-up Time: 1.4ms(datasheet) */
+ /* Specifies the number of Slow Clock cycles multiplied by 8 for the Main Crystal Oscillator start-up time */
+ | CKGR_MOR_MOSCRCEN /* Main On-Chip RC Oscillator Enable */
+ | CKGR_MOR_MOSCXTEN; /* Main Crystal Oscillator Enable */
+ /* MOSCSEL: The Main On-Chip RC Oscillator is selected */
+ /* MOSCRCF: The Fast RC Oscillator Frequency is at 4 MHz (default) */
+ /* CFDEN: The Clock Failure Detector is disabled. */
+ dwTimeout = 0;
+ while ( !(PMC->PMC_SR & PMC_SR_MOSCXTS) && (dwTimeout++ < CLOCK_TIMEOUT) );
+ }
+
+ /* Switch to 3-20MHz Xtal oscillator */
+ /* The Main Crystal Oscillator is enabled */
+ PMC->CKGR_MOR = CKGR_MOR_KEY(0x37)
+ | CKGR_MOR_MOSCXTST(0x8) /* Main Crystal Oscillator Start-up Time: 1.4ms(datasheet) */
+ /* Specifies the number of Slow Clock cycles multiplied by 8 for the Main Crystal Oscillator start-up time */
+ | CKGR_MOR_MOSCRCEN /* Main On-Chip RC Oscillator Enable */
+ | CKGR_MOR_MOSCXTEN /* Main Crystal Oscillator Enable */
+ | CKGR_MOR_MOSCSEL; /* The Main Crystal Oscillator is selected */
+ /* MOSCRCF: The Fast RC Oscillator Frequency is at 4 MHz (default) */
+ /* CFDEN: The Clock Failure Detector is disabled. */
+ dwTimeout = 0;
+ /* Wait Main XTAL Oscillator Status */
+ while (!(PMC->PMC_SR & PMC_SR_MOSCXTS) && (dwTimeout++ < CLOCK_TIMEOUT));
+
+ /* configure PLLA to 168 MHz */
+ PMC->CKGR_PLLAR = CKGR_PLLAR_STUCKTO1
+ | CKGR_PLLAR_MULA(13) /* PLLA Multiplier 12 MHz x (13+1) = 168 MHz */
+ | CKGR_PLLAR_PLLACOUNT(2) /* PLLA Counter 200µs(datasheet) */
+ | CKGR_PLLAR_DIVA(1); /* Divider bypassed */
+ dwTimeout = 0;
+ /* Wait PLL A Lock Status */
+ while (!(PMC->PMC_SR & PMC_SR_LOCKA) && (dwTimeout++ < CLOCK_TIMEOUT));
+
+ PMC->PMC_MCKR = PMC_MCKR_PRES_CLK_2 /* Selected clock divided by 2 => 168/2 = 84 MHz */
+ | PMC_MCKR_CSS_MAIN_CLK; /* Main Clock is selected */
+ dwTimeout = 0;
+ /* Wait Master Clock Status */
+ while (!(PMC->PMC_SR & PMC_SR_MCKRDY) && (dwTimeout++ < CLOCK_TIMEOUT));
+
+ PMC->PMC_MCKR = PMC_MCKR_PRES_CLK_2 /* Selected clock divided by 2 => 168/2 = 84 MHz */
+ | PMC_MCKR_CSS_PLLA_CLK; /* PLLA Clock is selected */
+ dwTimeout = 0;
+ /* Wait Master Clock Status */
+ while (!(PMC->PMC_SR & PMC_SR_MCKRDY) && (dwTimeout++ < CLOCK_TIMEOUT));
+
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/board_memories.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/board_memories.c
new file mode 100644
index 0000000..0efc912
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/board_memories.c
@@ -0,0 +1,198 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * Implementation of memories configuration on board.
+ *
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+#include "board.h"
+
+
+/*----------------------------------------------------------------------------
+ * Local variables
+ *----------------------------------------------------------------------------*/
+/* Definition for the used SDRAM device */
+static SSdramc_Memory sdram_dev;
+
+/* SDRAM MT48LC16M16A2 configuration */
+static const SSdramc_Memory SDRAM_MICRON_MT48LC16M16A2 =
+{
+ {
+ SDRAMC_CR_NC_COL9, // 9 column bits (512 bytes)
+ SDRAMC_CR_NR_ROW13, // 13 row bits (8K)
+ SDRAMC_CR_NB_BANK4, // SDRAM 4 bank
+ SDRAMC_CR_CAS_LATENCY2, // CAS Latency 3
+ SDRAMC_CR_DBW, // Data bus width 16 bits
+ 2, // Write Recovery Delay
+ 9, // Row Cycle Delay and Row Refresh Cycle
+ 3, // Row Precharge Delay
+ 3, // Row to Column Delay
+ 6, // Active to Precharge Delay
+ 10, // Exit Self Refresh to Active Delay
+ 24, //bk1 is at the bit 24, 1+9+13+1
+ }
+};
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Configures the EBI for NandFlash access.
+ */
+extern void BOARD_ConfigureNandFlash( Smc* pSmc )
+{
+ /* Enable peripheral clock */
+ PMC_EnablePeripheral( ID_SMC ) ;
+
+ pSmc->SMC_CS_NUMBER[0].SMC_SETUP = SMC_SETUP_NWE_SETUP(0)
+ | SMC_SETUP_NCS_WR_SETUP(0)
+ | SMC_SETUP_NRD_SETUP(0)
+ | SMC_SETUP_NCS_RD_SETUP(0);
+
+ pSmc->SMC_CS_NUMBER[0].SMC_PULSE = SMC_PULSE_NWE_PULSE(2)
+ | SMC_PULSE_NCS_WR_PULSE(3)
+ | SMC_PULSE_NRD_PULSE(2)
+ | SMC_PULSE_NCS_RD_PULSE(3);
+
+ pSmc->SMC_CS_NUMBER[0].SMC_CYCLE = SMC_CYCLE_NWE_CYCLE(3)
+ | SMC_CYCLE_NRD_CYCLE(3);
+
+ pSmc->SMC_CS_NUMBER[0].SMC_TIMINGS = SMC_TIMINGS_TCLR(1)
+ | SMC_TIMINGS_TADL(6)
+ | SMC_TIMINGS_TAR(4)
+ | SMC_TIMINGS_TRR(2)
+ | SMC_TIMINGS_TWB(9)
+ | SMC_TIMINGS_RBNSEL(7)
+ |(SMC_TIMINGS_NFSEL);
+
+ pSmc->SMC_CS_NUMBER[0].SMC_MODE = SMC_MODE_READ_MODE
+ | SMC_MODE_WRITE_MODE
+ | SMC_MODE_DBW_BIT_8;
+}
+
+#if 1
+/**
+ * \brief Configures the EBI for %NorFlash access.
+ */
+extern void BOARD_ConfigureNorFlash( Smc* pSmc )
+{
+ /* Enable peripheral clock */
+ PMC_EnablePeripheral( ID_SMC ) ;
+
+ /* Configure SMC, NCS0 is assigned to a norflash */
+ pSmc->SMC_CS_NUMBER[0].SMC_SETUP = SMC_SETUP_NWE_SETUP(2)
+ | SMC_SETUP_NCS_WR_SETUP(0)
+ | SMC_SETUP_NRD_SETUP(0)
+ | SMC_SETUP_NCS_RD_SETUP(0);
+
+ pSmc->SMC_CS_NUMBER[0].SMC_PULSE = SMC_PULSE_NWE_PULSE(6)
+ | SMC_PULSE_NCS_WR_PULSE(0xA)
+ | SMC_PULSE_NRD_PULSE(0xA)
+ | SMC_PULSE_NCS_RD_PULSE(0xA);
+
+ pSmc->SMC_CS_NUMBER[0].SMC_CYCLE = SMC_CYCLE_NWE_CYCLE(0xA)
+ | SMC_CYCLE_NRD_CYCLE(0xA);
+
+ pSmc->SMC_CS_NUMBER[0].SMC_MODE = SMC_MODE_READ_MODE
+ | SMC_MODE_WRITE_MODE
+ | SMC_MODE_DBW_BIT_16
+ | SMC_MODE_EXNW_MODE_DISABLED
+ | SMC_MODE_TDF_CYCLES(0x1);
+}
+#endif
+/**
+ * \brief An accurate one-to-one comparison is necessary between PSRAM and SMC waveforms for
+ * a complete SMC configuration.
+ * \note The system is running at 48 MHz for the EBI Bus.
+ * Please refer to the "AC Characteristics" section of the customer product datasheet.
+ */
+extern void BOARD_ConfigurePSRAM( Smc* pSmc )
+{
+ /* Enable peripheral clock */
+ PMC_EnablePeripheral( ID_SMC ) ;
+
+ /* Configure SMC, NCS1 is assigned to a external PSRAM */
+ /**
+ * PSRAM IS66WV51216BLL
+ * 55 ns Access time
+ * tdoe = 25 ns max
+ * SMC1 (timing SAM3X read mode SMC) = 21 ns of setup
+ * 21 + 55 = 76 ns => at least 5 cycles at 64 MHz
+ * Write pulse width minimum = 45 ns (PSRAM)
+ */
+ pSmc->SMC_CS_NUMBER[1].SMC_SETUP = SMC_SETUP_NWE_SETUP( 1 )
+ | SMC_SETUP_NCS_WR_SETUP( 0 )
+ | SMC_SETUP_NRD_SETUP( 2 )
+ | SMC_SETUP_NCS_RD_SETUP( 0 ) ;
+
+ pSmc->SMC_CS_NUMBER[1].SMC_PULSE = SMC_PULSE_NWE_PULSE( 3 )
+ | SMC_PULSE_NCS_WR_PULSE( 4 )
+ | SMC_PULSE_NRD_PULSE( 3 )
+ | SMC_PULSE_NCS_RD_PULSE( 5 ) ;
+
+ /* NWE_CYCLE: The total duration of the write cycle.
+ NWE_CYCLE = NWE_SETUP + NWE_PULSE + NWE_HOLD
+ = NCS_WR_SETUP + NCS_WR_PULSE + NCS_WR_HOLD
+ (tWC) Write Cycle Time min. 70ns
+ NRD_CYCLE: The total duration of the read cycle.
+ NRD_CYCLE = NRD_SETUP + NRD_PULSE + NRD_HOLD
+ = NCS_RD_SETUP + NCS_RD_PULSE + NCS_RD_HOLD
+ (tRC) Read Cycle Time min. 70ns. */
+ pSmc->SMC_CS_NUMBER[1].SMC_CYCLE = SMC_CYCLE_NWE_CYCLE( 4 )
+ | SMC_CYCLE_NRD_CYCLE( 5 ) ;
+
+ pSmc->SMC_CS_NUMBER[1].SMC_MODE = SMC_MODE_READ_MODE
+ | SMC_MODE_WRITE_MODE
+ | SMC_MODE_DBW_BIT_16 ;
+}
+
+/**
+ * \brief Initialize and configure the SDRAM.
+ */
+extern void BOARD_ConfigureSdram( void )
+{
+ static const Pin pinsSdram[] = { PINS_SDRAM } ;
+
+ /* The SAM3X-EK-REVA board uses the SDRAM of MT48LC16M16A2 */
+ sdram_dev = SDRAM_MICRON_MT48LC16M16A2 ;
+
+ /* Enable corresponding PIOs */
+ PIO_PinConfigure( pinsSdram, PIO_LISTSIZE(pinsSdram) ) ;
+
+ /* Configure the SDRAMC used */
+ SDRAMC_Configure( &sdram_dev, SDRAMC_CLK ) ;
+}
+
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/dlib_lowlevel.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/dlib_lowlevel.c
new file mode 100644
index 0000000..a4cedcb
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/dlib_lowlevel.c
@@ -0,0 +1,85 @@
+
+/**
+* \file
+*
+* Implementation of low level library.
+*
+*/
+
+#if defined __ICCARM__ /* IAR Ewarm 5.41+ */
+
+#include "board.h"
+
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <yfuns.h>
+
+extern __weak size_t __write( int handle, const unsigned char *buf, size_t bufSize )
+{
+ size_t nChars = 0 ;
+
+ /* Check for the command to flush all handles */
+ if ( handle == -1 )
+ {
+ return 0 ;
+ }
+
+ /* Check for stdout and stderr (only necessary if FILE descriptors are enabled.) */
+ if ( handle != 1 && handle != 2 )
+ {
+ /* remove warnings */
+ return 0xfffffff ;
+ }
+
+ for ( /* Empty */ ; bufSize > 0 ; --bufSize )
+ {
+ UART_PutChar( *buf ) ;
+ ++buf ;
+ ++nChars ;
+ }
+
+ return nChars ;
+}
+
+
+extern __weak size_t __read( int handle, unsigned char *buf, size_t bufSize )
+{
+ size_t nChars = 0 ;
+
+ /* Check for stdin (only necessary if FILE descriptors are enabled) */
+ if ( handle != 0 )
+ {
+ /* remove warnings */
+ return 0xfffffff ;
+ }
+
+ for ( /*Empty*/; bufSize > 0 ; --bufSize )
+ {
+ unsigned char c = UART_GetChar() ;
+
+ if ( c == 0 )
+ {
+ break ;
+ }
+ *buf++ = c ;
+ ++nChars ;
+ }
+
+ return nChars ;
+}
+
+/**
+ * \brief Outputs a character on the UART.
+ *
+ * \param c Character to output.
+ *
+ * \return The character that was output.
+ */
+extern __weak signed int putchar( signed int c )
+{
+ UART_PutChar( c ) ;
+
+ return c ;
+}
+#endif // defined __ICCARM__
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/dma_hardware_interface.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/dma_hardware_interface.c
new file mode 100644
index 0000000..11d0738
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/dma_hardware_interface.c
@@ -0,0 +1,141 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2011, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/** \addtogroup dmad_module
+ *
+ * \section DmaHw Dma Hardware Interface Usage
+ * <ul>
+ * <li> The DMA controller can handle the transfer between peripherals and memory
+ * and so receives the triggers from the peripherals. The hardware interface number
+ * are getting from DMAIF_Get_ChannelNumber().</li>
+
+ * <li> DMAIF_IsValidatedPeripherOnDma() helps to check if the given DMAC has associated
+ * peripheral identifier coded by the given peripheral.</li>
+ *
+ * </ul>
+*/
+/*@{*/
+/*@}*/
+
+ /**
+ * \file
+ *
+ * Implementation of the hardware interface of the dma device module.
+ *
+ */
+
+
+ /*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+#include <board.h>
+
+/*----------------------------------------------------------------------------
+ * Local variables
+ *----------------------------------------------------------------------------*/
+/** Array of DMA Channel definition for SAM3x chip*/
+static const DmaHardwareInterface dmaHwIf[] = {
+ /* dmac, peripheral, T/R, Channel Number*/
+ {0, ID_HSMCI, 0, 0},
+ {0, ID_HSMCI, 1, 0},
+ {0, ID_SPI0, 0, 1},
+ {0, ID_SPI0, 1, 2},
+ {0, ID_SSC, 0, 3},
+ {0, ID_SSC, 1, 4},
+ {0, ID_SPI1, 0, 5},
+ {0, ID_SPI1, 1, 6},
+ {0, ID_TWI0, 0, 7},
+ {0, ID_TWI0, 1, 8},
+ {0, ID_USART0, 0, 11},
+ {0, ID_USART0, 1, 12},
+ {0, ID_USART1, 0, 13},
+ {0, ID_USART1, 1, 14},
+ {0, ID_PWM, 0, 15}
+};
+
+/*----------------------------------------------------------------------------
+ * Consts
+ *----------------------------------------------------------------------------*/
+ /** Number of recognized peripheral identifier code for DMA. */
+#define NUMPERIPHERAL (sizeof(dmaHwIf) / sizeof (DmaHardwareInterface))
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Get peripheral identifier coded for hardware handshaking interface
+ *
+ * \param ucDmac DMA Controller number.
+ * \param ucPeriphID Peripheral ID.
+ * \param ucTransfer Transfer type 0: Tx, 1 :Rx.
+ * \return 0-15 peripheral identifier coded.
+ * 0xff : no associated peripheral identifier coded.
+ */
+uint8_t DMAIF_GetChannelNumber (uint8_t ucDmac,
+ uint8_t ucPeriphID,
+ uint8_t ucTransfer)
+{
+ uint8_t i;
+ for (i = 0; i < NUMPERIPHERAL; i++)
+ {
+ if ((dmaHwIf[i].ucDmac == ucDmac) && (dmaHwIf[i].ucPeriphID == ucPeriphID) && (dmaHwIf[i].ucTransfer == ucTransfer))
+ {
+ return dmaHwIf[i].ucIfID;
+ }
+ }
+ return 0xff;
+}
+
+/**
+ * \brief Check if the given DMAC has associated peripheral identifier coded by
+ * the given peripheral.
+ *
+ * \param ucDmac DMA Controller number.
+ * \param ucPeriphID Peripheral ID (0xff : memory only).
+ * \return 1: Is a validated peripher. 0: no associated peripheral identifier coded.
+ */
+uint8_t DMAIF_IsValidatedPeripherOnDma( uint8_t ucDmac, uint8_t ucPeriphID)
+{
+ uint8_t i;
+ /* It is always validated when transfer to memory */
+ if (ucPeriphID == 0xFF) {
+ return 1;
+ }
+ for (i = 0; i < NUMPERIPHERAL; i++)
+ {
+ if ((dmaHwIf[i].ucDmac == ucDmac) && (dmaHwIf[i].ucPeriphID == ucPeriphID))
+ {
+ return 1;
+ }
+ }
+ return 0;
+}
+
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/dmad.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/dmad.c
new file mode 100644
index 0000000..14fd731
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/dmad.c
@@ -0,0 +1,582 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2011, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/** \addtogroup dmad_module
+ *
+ * \section DmaConfig Dma Configuration Usage
+ *
+ * To configure a DMA channel, the user has to follow these few steps :
+ * <ul>
+ * <li> Initialize a DMA driver instance by DMAD_Initialize().</li>
+ * <li> choose an available (disabled) channel using DMAD_AllocateChannel().</li>
+ * <li> After the DMAC selected channel has been programmed, DMAD_PrepareChannel() is to enable
+ * clock and dma peripheral of the DMA, and set Configuration register to set up the transfer type
+ * (memory or non-memory peripheral for source and destination) and flow control device.</li>
+ * <li> Configure DMA multi-buffer transfers using DMAD_PrepareMultiTransfer() to set up the chain of Linked List Items,
+ * single-buffer transfers using DMAD_PrepareSingleTransfer().</li>
+ * <li> Invoke DMAD_StartTransfer() to start DMA transfer, or DMAD_StopTransfer() to force stop DMA transfer.</li>
+ * <li> If picture-in-picture mode is enabled, DMAD_ConfigurePIP() helps to configure PIP mode.</li>
+ * <li> Once the buffer of data is transferred, DMAD_IsTransferDone() checks if DMA transfer is finished.</li>
+ * <li> DMAD_Handler() handles DMA interrupt, and invoking DMAD_SetCallback() if provided.</li>
+ * </ul>
+ *
+ * Related files:\n
+ * \ref dmad.h\n
+ * \ref dmad.c.\n
+ */
+
+/** \file */
+
+/** \addtogroup dmad_functions
+ @{*/
+
+/*----------------------------------------------------------------------------
+ * Includes
+ *----------------------------------------------------------------------------*/
+
+#include "board.h"
+#include <assert.h>
+
+/*----------------------------------------------------------------------------
+ * Local functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Try to allocate a DMA channel for on given controller.
+ * \param pDmad Pointer to DMA driver instance.
+ * \param ucDmac DMA controller ID.
+ * \param ucSrcID Source peripheral ID, 0xFF for memory.
+ * \param ucDstID Destination peripheral ID, 0xFF for memory.
+ * \return Channel number if allocation sucessful, return
+ * DMA_ALLOC_FAILED if allocation failed.
+ */
+static uint32_t DMAD_AllocateDmacChannel( sDmad *pDmad,
+ uint8_t ucDmac,
+ uint8_t ucSrcID,
+ uint8_t ucDstID)
+{
+ uint32_t i;
+
+ /* Can't support peripheral to peripheral */
+ if ((( ucSrcID != DMA_TRANSFER_MEMORY ) && ( ucDstID != DMA_TRANSFER_MEMORY )))
+ {
+ return DMA_ALLOC_FAILED;
+ }
+ /* dma transfer from peripheral to memory */
+ if ( ucDstID == DMA_TRANSFER_MEMORY)
+ {
+ if( (!DMAIF_IsValidatedPeripherOnDma(ucDmac, ucSrcID)) )
+ {
+ return DMA_ALLOC_FAILED;
+ }
+ }
+ /* dma transfer from memory to peripheral */
+ if ( ucSrcID == DMA_TRANSFER_MEMORY )
+ {
+ if( (!DMAIF_IsValidatedPeripherOnDma(ucDmac, ucDstID)) )
+ {
+ return DMA_ALLOC_FAILED;
+ }
+ }
+ for (i = 0; i < pDmad->ucNumChannels; i ++)
+ {
+ if ( pDmad->dmaChannels[ucDmac][i].ucState == DMAD_FREE )
+ {
+ /* Allocate the channel */
+ pDmad->dmaChannels[ucDmac][i].ucState = DMAD_IN_USE;
+ /* Get general informations */
+ pDmad->dmaChannels[ucDmac][i].ucSrcPeriphID = ucSrcID;
+ pDmad->dmaChannels[ucDmac][i].ucDstPeriphID = ucDstID;
+ pDmad->dmaChannels[ucDmac][i].ucSrcTxIfID =
+ DMAIF_GetChannelNumber(ucDmac, ucSrcID, 0);
+ pDmad->dmaChannels[ucDmac][i].ucSrcRxIfID =
+ DMAIF_GetChannelNumber(ucDmac, ucSrcID, 1);
+ pDmad->dmaChannels[ucDmac][i].ucDstTxIfID =
+ DMAIF_GetChannelNumber(ucDmac, ucDstID, 0);
+ pDmad->dmaChannels[ucDmac][i].ucDstRxIfID =
+ DMAIF_GetChannelNumber(ucDmac, ucDstID, 1);
+
+ return ((ucDmac << DMAC_CHANNEL_NUM)) | ((i) & 0xFF);
+ }
+ }
+ return DMA_ALLOC_FAILED;
+}
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Initialize DMA driver instance.
+ * \param pDmad Pointer to DMA driver instance.
+ * \param ucPollingMode Polling DMA transfer:
+ * 1. Via DMAD_IsTransferDone(); or
+ * 2. Via DMAD_Handler().
+ */
+void DMAD_Initialize( sDmad *pDmad,
+ uint8_t ucPollingMode )
+{
+ uint32_t i, j;
+
+ assert( pDmad != NULL ) ;
+
+ pDmad->pDmacs[0] = DMAC;
+ pDmad->ucPollingModes = ucPollingMode;
+ pDmad->ucNumControllers = DMAC_CONTROLLER_NUM;
+ pDmad->ucNumChannels = DMAC_CHANNEL_NUM;
+
+ for (i = 0; i < pDmad->ucNumControllers; i ++)
+ {
+ for (j = 0; j < pDmad->ucNumChannels; j ++)
+ {
+ pDmad->dmaChannels[i][j].fCallback = 0;
+ pDmad->dmaChannels[i][j].pArg = 0;
+
+ pDmad->dmaChannels[i][j].ucIrqOwner = 0;
+ pDmad->dmaChannels[i][j].ucSrcPeriphID = 0;
+ pDmad->dmaChannels[i][j].ucDstPeriphID = 0;
+ pDmad->dmaChannels[i][j].ucSrcTxIfID = 0;
+ pDmad->dmaChannels[i][j].ucSrcRxIfID = 0;
+ pDmad->dmaChannels[i][j].ucDstTxIfID = 0;
+ pDmad->dmaChannels[i][j].ucDstRxIfID = 0;
+
+ pDmad->dmaChannels[i][j].ucState = DMAD_FREE;
+ }
+ }
+}
+
+/**
+ * \brief DMA interrupt handler
+ * \param pDmad Pointer to DMA driver instance.
+ */
+void DMAD_Handler( sDmad *pDmad )
+{
+ Dmac *pDmac;
+ sDmadChannel *pCh;
+ uint8_t ucController, ucChannel;
+ uint32_t dmaSr, chSr;
+ uint32_t dmaRc = DMAD_OK;
+
+ assert( pDmad != NULL ) ;
+
+ for (ucController = 0; ucController < pDmad->ucNumControllers; ucController ++)
+ {
+ pDmac = pDmad->pDmacs[ucController];
+
+ /* Check raw status but not masked one for polling mode support */
+ dmaSr = DMAC_GetStatus( pDmac );
+ if ((dmaSr & 0x00FFFFFF) == 0) continue;
+
+ chSr = DMAC_GetChannelStatus( pDmac );
+// printf("iDma(%x,%x)\n\r", dmaSr, chSr);
+
+ for (ucChannel = 0; ucChannel < pDmad->ucNumChannels; ucChannel ++)
+ {
+ uint8_t bExec = 1;
+
+ pCh = &pDmad->dmaChannels[ucController][ucChannel];
+ /* Error */
+ if (dmaSr & (DMAC_EBCIDR_ERR0 << ucChannel))
+ {
+ DMAC_DisableChannel( pDmac, ucChannel );
+ if (pCh->ucState > DMAD_IN_USE) pCh->ucState = DMAD_STALL;
+ dmaRc = DMAD_ERROR;
+ }
+ /* Chained buffer complete */
+ else if (dmaSr & (DMAC_EBCIDR_CBTC0 << ucChannel))
+ {
+ DMAC_DisableChannel( pDmac, ucChannel );
+ if (pCh->ucState > DMAD_IN_USE) pCh->ucState = DMAD_IN_USE;
+ dmaRc = DMAD_OK;
+
+ }
+ /* Buffer complete */
+ else if (dmaSr & (DMAC_EBCIDR_BTC0 << ucChannel))
+ {
+ dmaRc = DMAD_PARTIAL_DONE;
+ /* Re-enable */
+ if ((chSr & (DMAC_CHSR_ENA0 << ucChannel)) == 0)
+ {
+ DMAC_EnableChannel( pDmac, ucChannel );
+ }
+ }
+ else
+ {
+ bExec = 0;
+ }
+ /* Execute callback */
+ if (bExec && pCh->fCallback)
+ {
+ pCh->fCallback(dmaRc, pCh->pArg);
+ }
+ }
+ }
+}
+
+/**
+ * \brief Allocate a DMA channel for upper layer.
+ * \param pDmad Pointer to DMA driver instance.
+ * \param ucSrcID Source peripheral ID, 0xFF for memory.
+ * \param ucDstID Destination peripheral ID, 0xFF for memory.
+ * \return Channel number if allocation sucessful, return
+ * DMA_ALLOC_FAILED if allocation failed.
+ */
+uint32_t DMAD_AllocateChannel( sDmad *pDmad,
+ uint8_t ucSrcID,
+ uint8_t ucDstID)
+{
+ uint8_t ucController;
+ uint32_t dwChannel = DMA_ALLOC_FAILED;
+
+ for ( ucController = 0; ucController < pDmad->ucNumControllers; ucController ++)
+ {
+ dwChannel = DMAD_AllocateDmacChannel( pDmad, ucController,
+ ucSrcID, ucDstID );
+ if (dwChannel != DMA_ALLOC_FAILED)
+ break;
+ }
+ return dwChannel;
+}
+
+/**
+ * \brief Free the specified DMA channel.
+ * \param pDmad Pointer to DMA driver instance.
+ * \param dwChannel ControllerNumber << 8 | ChannelNumber.
+ */
+eDmadRC DMAD_FreeChannel( sDmad *pDmad, uint32_t dwChannel )
+{
+ uint8_t ucController = (dwChannel >> DMAC_CHANNEL_NUM);
+ uint8_t ucChannel = (dwChannel) & 0xFF;
+
+ assert( pDmad != NULL ) ;
+ switch ( pDmad->dmaChannels[ucController][ucChannel].ucState )
+ {
+
+ case DMAD_IN_XFR:
+ return DMAD_BUSY;
+
+ case DMAD_IN_USE:
+ pDmad->dmaChannels[ucController][ucChannel].ucState = DMAD_FREE;
+ break;
+ }
+ return DMAD_OK;
+}
+
+/**
+ * \brief Set the callback function for DMA channel transfer.
+ * \param pDmad Pointer to DMA driver instance.
+ * \param dwChannel ControllerNumber << DMAC_CHANNEL_NUM | ChannelNumber.
+ * \param fCallback Pointer to callback function.
+ * \param pArg Pointer to optional argument for callback.
+ */
+eDmadRC DMAD_SetCallback( sDmad *pDmad, uint32_t dwChannel,
+ DmadTransferCallback fCallback, void* pArg )
+{
+ uint8_t ucController = (dwChannel >> DMAC_CHANNEL_NUM);
+ uint8_t ucChannel = (dwChannel) & 0xFF;
+
+ assert( pDmad != NULL ) ;
+ if ( pDmad->dmaChannels[ucController][ucChannel].ucState == DMAD_FREE )
+ {printf("DMAD set call back error \n\r");
+ return DMAD_ERROR;}
+
+ else if ( pDmad->dmaChannels[ucController][ucChannel].ucState == DMAD_IN_XFR )
+ return DMAD_BUSY;
+
+ pDmad->dmaChannels[ucController][ucChannel].fCallback = fCallback;
+ pDmad->dmaChannels[ucController][ucChannel].pArg = pArg;
+
+ return DMAD_OK;
+}
+
+/**
+ * \brief Enable clock of the DMA peripheral, Enable the dma peripheral,
+ * configure configuration register for DMA transfer.
+ * \param pDmad Pointer to DMA driver instance.
+ * \param dwChannel ControllerNumber << DMAC_CHANNEL_NUM | ChannelNumber.
+ * \param dwCfg Configuration value.
+ */
+eDmadRC DMAD_PrepareChannel( sDmad *pDmad,
+ uint32_t dwChannel,
+ uint32_t dwCfg )
+{
+ uint8_t ucController = (dwChannel >> DMAC_CHANNEL_NUM);
+ uint8_t ucChannel = (dwChannel) & 0xFF;
+
+ assert( pDmad != NULL ) ;
+ Dmac *pDmac = pDmad->pDmacs[ucController];
+
+ if ( pDmad->dmaChannels[ucController][ucChannel].ucState == DMAD_FREE )
+ return DMAD_ERROR;
+ else if ( pDmad->dmaChannels[ucController][ucChannel].ucState == DMAD_IN_XFR )
+ return DMAD_BUSY;
+ DMAC_SetCFG( pDmac, ucChannel, dwCfg );
+
+ /* Enable clock of the DMA peripheral */
+ if (!PMC_IsPeriphEnabled( ID_DMAC ))
+ {
+ PMC_EnablePeripheral( ID_DMAC );
+ }
+ /* Enables the DMAC peripheral. */
+ DMAC_Enable( pDmac );
+ /* Disables DMAC interrupt for the given channel. */
+ DMAC_DisableIt (pDmac,
+ (DMAC_EBCIDR_BTC0 << ucChannel)
+ |(DMAC_EBCIDR_CBTC0 << ucChannel)
+ |(DMAC_EBCIDR_ERR0 << ucChannel) );
+ /* Disable the given dma channel. */
+ DMAC_DisableChannel( pDmac, ucChannel );
+
+ return DMAD_OK;
+}
+
+/**
+ * \brief Check if DMA transfer is finished.
+ * In polling mode DMAD_Handler() is polled.
+ * \param pDmad Pointer to DMA driver instance.
+ * \param dwChannel ControllerNumber << DMAC_CHANNEL_NUM | ChannelNumber.
+ */
+eDmadRC DMAD_IsTransferDone( sDmad *pDmad, uint32_t dwChannel )
+{
+ uint8_t ucController = (dwChannel >> DMAC_CHANNEL_NUM);
+ uint8_t ucChannel = (dwChannel) & 0xFF;
+
+ assert( pDmad != NULL ) ;
+ if ( pDmad->dmaChannels[ucController][ucChannel].ucState == DMAD_FREE )
+ return DMAD_ERROR;
+ else if ( pDmad->dmaChannels[ucController][ucChannel].ucState == DMAD_IN_XFR )
+ {
+ if ( pDmad->ucPollingModes ) DMAD_Handler( pDmad );
+ return DMAD_BUSY;
+ }
+ return DMAD_OK;
+}
+
+/**
+ * \brief Start DMA transfer.
+ * \param pDmad Pointer to DMA driver instance.
+ * \param dwChannel ControllerNumber << DMAC_CHANNEL_NUM | ChannelNumber.
+ */
+eDmadRC DMAD_StartTransfer( sDmad *pDmad, uint32_t dwChannel )
+{
+ uint8_t ucController = (dwChannel >> DMAC_CHANNEL_NUM);
+ uint8_t ucChannel = (dwChannel) & 0xFF;
+
+ assert( pDmad != NULL ) ;
+ Dmac *pDmac = pDmad->pDmacs[ucController];
+
+ if ( pDmad->dmaChannels[ucController][ucChannel].ucState == DMAD_FREE )
+ {
+ printf("DMAD_START TRANSFER ERROR\n\r");
+ return DMAD_ERROR;
+ }
+ else if ( pDmad->dmaChannels[ucController][ucChannel].ucState == DMAD_IN_XFR )
+ {
+ printf("DMAD_START TRANSFER BUSY\n\r");
+ return DMAD_BUSY;
+ }
+ /* Change ucState to transferring */
+ pDmad->dmaChannels[ucController][ucChannel].ucState = DMAD_IN_XFR;
+ DMAC_EnableChannel(pDmac, ucChannel);
+ if ( pDmad->ucPollingModes == 0 )
+ {
+ /* Monitor status in interrupt handler */
+ DMAC_EnableIt(pDmac, (DMAC_EBCIDR_BTC0 << ucChannel)
+ |(DMAC_EBCIDR_CBTC0 << ucChannel)
+ |(DMAC_EBCIDR_ERR0 << ucChannel) );
+ }
+
+ return DMAD_OK;
+}
+
+/**
+ * \brief Start DMA transfers on the same controller.
+ * \param pDmad Pointer to DMA driver instance.
+ * \param bDmac DMA Controller number.
+ * \param bmChannels Channels bitmap.
+ */
+eDmadRC DMAD_StartTransfers( sDmad *pDmad, uint8_t bDmac, uint32_t bmChannels )
+{
+ uint32_t ucChannel;
+ uint32_t dwChs = 0, dwIts = 0;
+
+ assert( pDmad != NULL ) ;
+ Dmac *pDmac = pDmad->pDmacs[bDmac];
+
+ for (ucChannel = 0; ucChannel < pDmad->ucNumChannels; ucChannel ++)
+ {
+ uint32_t dwChBit = 1 << ucChannel;
+
+ /* Skipped channels */
+ if ( pDmad->dmaChannels[bDmac][ucChannel].ucState == DMAD_FREE )
+ continue;
+ else if ( pDmad->dmaChannels[bDmac][ucChannel].ucState == DMAD_IN_XFR )
+ continue;
+ /* Log to start bit map */
+ if (bmChannels & dwChBit)
+ {
+ dwChs |= dwChBit;
+ dwIts |= ( (DMAC_EBCIDR_BTC0 << ucChannel)
+ |(DMAC_EBCIDR_CBTC0 << ucChannel)
+ |(DMAC_EBCIDR_ERR0 << ucChannel) );
+ /* Change ucState */
+ pDmad->dmaChannels[bDmac][ucChannel].ucState = DMAD_IN_XFR;
+ }
+ }
+
+ DMAC_EnableChannels(pDmac, dwChs);
+ if ( pDmad->ucPollingModes == 0 )
+ {
+ /* Monitor status in interrupt handler */
+ DMAC_EnableIt( pDmac, dwIts );
+ }
+
+ return DMAD_OK;
+}
+
+/**
+ * \brief Stop DMA transfer.
+ * \param pDmad Pointer to DMA driver instance.
+ * \param dwChannel ControllerNumber << DMAC_CHANNEL_NUM | ChannelNumber.
+ */
+eDmadRC DMAD_StopTransfer( sDmad *pDmad, uint32_t dwChannel )
+{
+ uint8_t ucController = (dwChannel >> DMAC_CHANNEL_NUM);
+ uint8_t ucChannel = (dwChannel) & 0xFF;
+
+ assert( pDmad != NULL ) ;
+ Dmac *pDmac = pDmad->pDmacs[ucController];
+ sDmadChannel *pCh = &pDmad->dmaChannels[ucController][ucChannel];
+
+ uint32_t to = 0x1000;
+
+ if ( pDmad->dmaChannels[ucController][ucChannel].ucState == DMAD_FREE )
+ return DMAD_ERROR;
+ if ( pDmad->dmaChannels[ucController][ucChannel].ucState != DMAD_IN_XFR )
+ {
+ /* Disable channel */
+ DMAC_DisableChannel(pDmac, ucChannel);
+ /* Disable interrupts */
+ DMAC_DisableIt(pDmac, (DMAC_EBCIDR_BTC0 << ucChannel)
+ |(DMAC_EBCIDR_CBTC0 << ucChannel)
+ |(DMAC_EBCIDR_ERR0 << ucChannel) );
+ /* Clear pending status */
+ DMAC_GetChannelStatus(pDmac);
+ DMAC_GetStatus(pDmac);
+
+ return DMAD_OK;
+ }
+ /* Suspend */
+ DMAC_SuspendChannel(pDmac, ucChannel);
+
+ /* Poll empty */
+ for (;to; to --)
+ {
+ if (DMAC_GetChannelStatus(pDmac) & (DMAC_CHSR_EMPT0 << ucChannel))
+ {
+ break;
+ }
+ }
+
+ /* Disable channel */
+ DMAC_DisableChannel(pDmac, ucChannel);
+ /* Disable interrupts */
+ DMAC_DisableIt(pDmac, (DMAC_EBCIDR_BTC0 << ucChannel)
+ |(DMAC_EBCIDR_CBTC0 << ucChannel)
+ |(DMAC_EBCIDR_ERR0 << ucChannel) );
+ /* Clear pending status */
+ DMAC_GetChannelStatus(pDmac);
+ DMAC_GetStatus(pDmac);
+ /* Resume */
+ DMAC_RestoreChannel(pDmac, ucChannel);
+ /* Change ucState */
+ pDmad->dmaChannels[ucController][ucChannel].ucState = DMAD_IN_USE;
+ /* Invoke callback */
+ if (pCh->fCallback) pCh->fCallback(DMAD_CANCELED, pCh->pArg);
+ return DMAD_OK;
+}
+
+/**
+ * \brief Configure DMA for a single transfefr.
+ * \param pDmad Pointer to DMA driver instance.
+ * \param dwChannel ControllerNumber << DMAC_CHANNEL_NUM | ChannelNumber.
+ * \param pXfrDesc Pointer to DMA Linked List.
+ */
+eDmadRC DMAD_PrepareSingleTransfer( sDmad *pDmad,
+ uint32_t dwChannel,
+ sDmaTransferDescriptor *pXfrDesc )
+{
+ uint8_t ucController = (dwChannel >> DMAC_CHANNEL_NUM);
+ uint8_t ucChannel = (dwChannel) & 0xFF;
+ Dmac *pDmac = pDmad->pDmacs[ucController];
+
+ if ( pDmad->dmaChannels[ucController][ucChannel].ucState == DMAD_FREE )
+ return DMAD_ERROR;
+
+ if ( pDmad->dmaChannels[ucController][ucChannel].ucState == DMAD_IN_XFR )
+ return DMAD_BUSY;
+
+ DMAC_SetSourceAddr(pDmac, ucChannel, pXfrDesc->dwSrcAddr);
+ DMAC_SetDestinationAddr(pDmac, ucChannel, pXfrDesc->dwDstAddr);
+ DMAC_SetDescriptorAddr(pDmac, ucChannel, 0, 0);
+ DMAC_SetControlA(pDmac, ucChannel, pXfrDesc->dwCtrlA);
+ DMAC_SetControlB(pDmac, ucChannel, pXfrDesc->dwCtrlB);
+
+ return DMAD_OK;
+}
+
+/**
+ * \brief Configure DMA multi-buffer transfers using linked lists
+ * \param pDmad Pointer to DMA driver instance.
+ * \param _dwChannel ControllerNumber << DMAC_CHANNEL_NUM | ChannelNumber.
+ * \param pXfrDesc Pointer to DMA Linked List.
+ */
+eDmadRC DMAD_PrepareMultiTransfer( sDmad *pDmad,
+ uint32_t dwChannel,
+ sDmaTransferDescriptor *pXfrDesc )
+{
+ uint8_t ucController = (dwChannel >> DMAC_CHANNEL_NUM);
+ uint8_t ucChannel = (dwChannel) & 0xFF;
+
+ assert( pDmad != NULL ) ;
+ Dmac *pDmac = pDmad->pDmacs[ucController];
+
+ if ( pDmad->dmaChannels[ucController][ucChannel].ucState == DMAD_FREE )
+ return DMAD_ERROR;
+ if ( pDmad->dmaChannels[ucController][ucChannel].ucState == DMAD_IN_XFR )
+ return DMAD_BUSY;
+
+ DMAC_SetDescriptorAddr( pDmac, ucChannel, (uint32_t)pXfrDesc, 0 );
+ DMAC_SetControlB( pDmac, ucChannel, 0);
+
+ return DMAD_OK;
+}
+
+/**@}*/
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/emacd.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/emacd.c
new file mode 100644
index 0000000..39b68a6
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/emacd.c
@@ -0,0 +1,710 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/** \file */
+
+/*---------------------------------------------------------------------------
+ * Headers
+ *---------------------------------------------------------------------------*/
+
+#include <board.h>
+#include <string.h>
+
+/** \addtogroup emacd_defines
+ @{*/
+
+/*----------------------------------------------------------------------------
+ * Definitions
+ *----------------------------------------------------------------------------*/
+
+/** Error bits for TX */
+#define EMAC_TX_ERR_BITS \
+ (EMAC_TXD_bmERROR | EMAC_TXD_bmUNDERRUN | EMAC_TXD_bmEXHAUSTED)
+
+/*---------------------------------------------------------------------------
+ * Circular buffer management
+ *---------------------------------------------------------------------------*/
+
+/** Return count in buffer */
+#define CIRC_CNT(head,tail,size) (((head) - (tail)) % (size))
+
+/** Return space available, 0..size-1.
+ We always leave one free char as a completely full buffer
+ has head == tail, which is the same as empty */
+#define CIRC_SPACE(head,tail,size) CIRC_CNT((tail),((head)+1),(size))
+
+/** Return count up to the end of the buffer.
+ Carefully avoid accessing head and tail more than once,
+ so they can change underneath us without returning inconsistent results */
+#define CIRC_CNT_TO_END(head,tail,size) \
+ ({int end = (size) - (tail); \
+ int n = ((head) + end) % (size); \
+ n < end ? n : end;})
+
+/** Return space available up to the end of the buffer */
+#define CIRC_SPACE_TO_END(head,tail,size) \
+ ({int end = (size) - 1 - (head); \
+ int n = (end + (tail)) % (size); \
+ n <= end ? n : end+1;})
+
+/** Increment head or tail */
+#define CIRC_INC(headortail,size) \
+ headortail++; \
+ if(headortail >= size) { \
+ headortail = 0; \
+ }
+/** Circular buffer is empty ? */
+#define CIRC_EMPTY(head, tail) (head == tail)
+/** Clear circular buffer */
+#define CIRC_CLEAR(head, tail) (head = tail = 0)
+
+/** @}*/
+
+/*----------------------------------------------------------------------------
+ * Internal variables
+ *----------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------
+ * Internal functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * Disable TX & reset registers and descriptor list
+ * \param pDrv Pointer to EMAC Driver instance.
+ */
+static void EMACD_ResetTx(sEmacd *pDrv)
+{
+ Emac *pHw = pDrv->pHw;
+ uint8_t *pTxBuffer = pDrv->pTxBuffer;
+ sEmacTxDescriptor *pTd = pDrv->pTxD;
+
+ uint32_t Index;
+ uint32_t Address;
+
+ /* Disable TX */
+ EMAC_TransmitEnable(pHw, 0);
+
+ /* Setup the TX descriptors. */
+ CIRC_CLEAR(pDrv->wTxHead, pDrv->wTxTail);
+ for(Index = 0; Index < pDrv->wTxListSize; Index++)
+ {
+ Address = (uint32_t)(&(pTxBuffer[Index * EMAC_TX_UNITSIZE]));
+ pTd[Index].addr = Address;
+ pTd[Index].status.val = EMAC_TXD_bmUSED;
+ }
+ pTd[pDrv->wTxListSize - 1].status.val = EMAC_TXD_bmUSED | EMAC_TXD_bmWRAP;
+
+ /* Transmit Buffer Queue Pointer Register */
+ EMAC_SetTxQueue(pHw, (uint32_t)pTd);
+}
+
+/**
+ * Disable RX & reset registers and descriptor list
+ * \param pDrv Pointer to EMAC Driver instance.
+ */
+static void EMACD_ResetRx(sEmacd *pDrv)
+{
+ Emac *pHw = pDrv->pHw;
+ uint8_t *pRxBuffer = pDrv->pRxBuffer;
+ sEmacRxDescriptor *pRd = pDrv->pRxD;
+
+ uint32_t Index;
+ uint32_t Address;
+
+ /* Disable RX */
+ EMAC_ReceiveEnable(pHw, 0);
+
+ /* Setup the RX descriptors. */
+ pDrv->wRxI = 0;
+ for(Index = 0; Index < pDrv->wRxListSize; Index++)
+ {
+ Address = (uint32_t)(&(pRxBuffer[Index * EMAC_RX_UNITSIZE]));
+ /* Remove EMAC_RXD_bmOWNERSHIP and EMAC_RXD_bmWRAP */
+ pRd[Index].addr.val = Address & EMAC_RXD_ADDR_MASK;
+ pRd[Index].status.val = 0;
+ }
+ pRd[pDrv->wRxListSize - 1].addr.val |= EMAC_RXD_bmWRAP;
+
+ /* Receive Buffer Queue Pointer Register */
+ EMAC_SetRxQueue(pHw, (uint32_t) pRd);
+}
+
+/*---------------------------------------------------------------------------
+ * Exported functions
+ *---------------------------------------------------------------------------*/
+
+/**
+ * EMAC Interrupt handler
+ */
+void EMACD_Handler( sEmacd *pEmacd )
+{
+ Emac *pHw = pEmacd->pHw;
+
+ sEmacTxDescriptor *pTxTd;
+ fEmacdTransferCallback *pTxCb;
+ volatile uint32_t isr;
+ volatile uint32_t rsr;
+ volatile uint32_t tsr;
+ uint32_t rxStatusFlag;
+ uint32_t txStatusFlag;
+
+ isr = EMAC_GetItStatus(pHw);
+ rsr = EMAC_GetRxStatus(pHw);
+ tsr = EMAC_GetTxStatus(pHw);
+
+ isr &= ~(EMAC_GetItMask(pHw) | 0xFFC300);
+
+ /* RX packet */
+ if ((isr & EMAC_ISR_RCOMP) || (rsr & EMAC_RSR_REC))
+ {
+ rxStatusFlag = EMAC_RSR_REC;
+
+ /* Check OVR */
+ if (rsr & EMAC_RSR_OVR)
+ {
+ rxStatusFlag |= EMAC_RSR_OVR;
+ }
+ /* Check BNA */
+ if (rsr & EMAC_RSR_BNA)
+ {
+ rxStatusFlag |= EMAC_RSR_BNA;
+ }
+ /* Clear status */
+ EMAC_ClearRxStatus(pHw, rxStatusFlag);
+
+ /* Invoke callbacks */
+ if (pEmacd->fRxCb)
+ {
+ pEmacd->fRxCb(rxStatusFlag);
+ }
+ }
+
+ /* TX packet */
+ if ((isr & EMAC_ISR_TCOMP) || (tsr & EMAC_TSR_COMP)) {
+
+ txStatusFlag = EMAC_TSR_COMP;
+
+ /* A frame transmitted */
+
+ /* Check RLE */
+ if (tsr & EMAC_TSR_RLES)
+ {
+ /* Status RLE & Number of discarded buffers */
+ txStatusFlag = EMAC_TSR_RLES
+ | CIRC_CNT(pEmacd->wTxHead,
+ pEmacd->wTxTail,
+ pEmacd->wTxListSize)
+ ;
+ pTxCb = &pEmacd->fTxCbList[pEmacd->wTxTail];
+ EMACD_ResetTx(pEmacd);
+ TRACE_INFO("Tx RLE!!\n\r");
+ EMAC_TransmitEnable(pHw, 1);
+ }
+ /* Check COL */
+ if (tsr & EMAC_TSR_COL)
+ {
+ txStatusFlag |= EMAC_TSR_COL;
+ }
+ /* Check BEX */
+ if (tsr & EMAC_TSR_BEX)
+ {
+ txStatusFlag |= EMAC_TSR_BEX;
+ }
+ /* Check UND */
+ if (tsr & EMAC_TSR_UND)
+ {
+ txStatusFlag |= EMAC_TSR_UND;
+ }
+ /* Clear status */
+ EMAC_ClearTxStatus(pHw, txStatusFlag);
+
+ if (!CIRC_EMPTY(pEmacd->wTxHead, pEmacd->wTxTail))
+ {
+ /* Check the buffers */
+ do {
+ pTxTd = &pEmacd->pTxD[pEmacd->wTxTail];
+ pTxCb = &pEmacd->fTxCbList[pEmacd->wTxTail];
+ /* Any error? Exit if buffer has not been sent yet */
+ if ((pTxTd->status.val & EMAC_TXD_bmUSED) == 0)
+ {
+ break;
+ }
+
+ /* Notify upper layer that a packet has been sent */
+ if (*pTxCb)
+ {
+ (*pTxCb)(txStatusFlag);
+ }
+
+ CIRC_INC( pEmacd->wTxTail, pEmacd->wTxListSize );
+ } while (CIRC_CNT(pEmacd->wTxHead, pEmacd->wTxTail, pEmacd->wTxListSize));
+ }
+
+ if (tsr & EMAC_TSR_RLES)
+ {
+ /* Notify upper layer RLE */
+ if (*pTxCb)
+ {
+ (*pTxCb)(txStatusFlag);
+ }
+ }
+
+ /* If a wakeup has been scheduled, notify upper layer that it can
+ send other packets, send will be successfull. */
+ if( (CIRC_SPACE(pEmacd->wTxHead,
+ pEmacd->wTxTail,
+ pEmacd->wTxListSize) >= pEmacd->bWakeupThreshold)
+ && pEmacd->fWakupCb)
+ {
+ pEmacd->fWakupCb();
+ }
+ }
+
+ /* PAUSE Frame */
+ if (isr & EMAC_ISR_PFRE)
+ {
+ TRACE_INFO("Pause!\n\r");
+ }
+ if (isr & EMAC_ISR_PTZ)
+ {
+ TRACE_INFO("Pause TO!\n\r");
+ }
+}
+
+/**
+ * Initialize the EMAC Driver with HW settings.
+ * \param pEmacd Pointer to EMAC Driver instance.
+ * \param pHw Pointer to HW address for registers.
+ * \param bID HW ID for power management.
+ * \param bCAF Enable/Disable CopyAllFrame.
+ * \param bNBC Enable/Disable NoBroadCast.
+ */
+void EMACD_Init(sEmacd *pEmacd,
+ Emac *pHw, uint8_t bID,
+ uint8_t bCAF, uint8_t bNBC )
+{
+
+ TRACE_DEBUG("EMACD_Init\n\r");
+
+ /* Initialize struct */
+ pEmacd->pHw = pHw;
+ pEmacd->bId = bID;
+
+ /* Power ON */
+ PMC_EnablePeripheral(bID);
+
+ /* Disable TX & RX and more */
+ EMAC_NetworkControl(pHw, 0);
+ EMAC_DisableIt(pHw, ~0u);
+
+ EMAC_ClearStatistics(pHw);
+
+ /* Clear all status bits in the receive status register. */
+ EMAC_ClearRxStatus(pHw, EMAC_RSR_OVR | EMAC_RSR_REC | EMAC_RSR_BNA);
+
+ /* Clear all status bits in the transmit status register */
+ EMAC_ClearTxStatus(pHw, EMAC_TSR_UBR | EMAC_TSR_COL | EMAC_TSR_RLES
+ | EMAC_TSR_BEX | EMAC_TSR_COMP | EMAC_TSR_UND);
+
+ /* Clear interrupts */
+ EMAC_GetItStatus(pHw);
+
+ /* Enable the copy of data into the buffers
+ ignore broadcasts, and don't copy FCS. */
+ EMAC_Configure(pHw, EMAC_GetConfigure(pHw) | EMAC_NCFGR_DRFCS | EMAC_NCFGR_PAE);
+
+ EMAC_CpyAllEnable(pHw, bCAF);
+ EMAC_BroadcastDisable(pHw, bNBC);
+
+}
+
+/**
+ * Initialize necessary allocated buffer lists for EMAC Driver to transfer data.
+ * Must be invoked after EMACD_Init() but before RX/TX start.
+ * \param pEmacd Pointer to EMAC Driver instance.
+ * \param pRxBuffer Pointer to allocated buffer for RX. The address should
+ * be 8-byte aligned and the size should be
+ * EMAC_RX_UNITSIZE * wRxSize.
+ * \param pRxD Pointer to allocated RX descriptor list.
+ * \param wRxSize RX size, in number of registered units (RX descriptors).
+ * \param pTxBuffer Pointer to allocated buffer for TX. The address should
+ * be 8-byte aligned and the size should be
+ * EMAC_TX_UNITSIZE * wTxSize.
+ * \param pTxD Pointer to allocated TX descriptor list.
+ * \param pTxCb Pointer to allocated TX callback list.
+ * \param wTxSize TX size, in number of registered units (TX descriptors).
+ * \return EMACD_OK or EMACD_PARAM.
+ * \note If input address is not 8-byte aligned the address is automatically
+ * adjusted and the list size is reduced by one.
+ */
+extern uint8_t EMACD_InitTransfer( sEmacd *pEmacd,
+ uint8_t *pRxBuffer, sEmacRxDescriptor *pRxD,
+ uint16_t wRxSize,
+ uint8_t *pTxBuffer, sEmacTxDescriptor *pTxD, fEmacdTransferCallback *pTxCb,
+ uint16_t wTxSize)
+{
+ Emac *pHw = pEmacd->pHw;
+
+ if (wRxSize <= 1 || wTxSize <= 1 || pTxCb == NULL) return EMACD_PARAM;
+
+ /* Assign RX buffers */
+ if ( ((uint32_t)pRxBuffer & 0x7)
+ || ((uint32_t)pRxD & 0x7) )
+ {
+ wRxSize --;
+ TRACE_DEBUG("RX list address adjusted\n\r");
+ }
+ pEmacd->pRxBuffer = (uint8_t*)((uint32_t)pRxBuffer & 0xFFFFFFF8);
+ pEmacd->pRxD = (sEmacRxDescriptor*)((uint32_t)pRxD & 0xFFFFFFF8);
+ pEmacd->wRxListSize = wRxSize;
+
+ /* Assign TX buffers */
+ if ( ((uint32_t)pTxBuffer & 0x7)
+ || ((uint32_t)pTxD & 0x7) )
+ {
+ wTxSize --;
+ TRACE_DEBUG("TX list address adjusted\n\r");
+ }
+ pEmacd->pTxBuffer = (uint8_t*)((uint32_t)pTxBuffer & 0xFFFFFFF8);
+ pEmacd->pTxD = (sEmacTxDescriptor*)((uint32_t)pTxD & 0xFFFFFFF8);
+ pEmacd->wTxListSize = wTxSize;
+ pEmacd->fTxCbList = pTxCb;
+
+ /* Reset TX & RX */
+ EMACD_ResetRx(pEmacd);
+ EMACD_ResetTx(pEmacd);
+
+ /* Enable Rx and Tx, plus the stats register. */
+ EMAC_TransmitEnable(pHw, 1);
+ EMAC_ReceiveEnable(pHw, 1);
+ EMAC_StatisticsWriteEnable(pHw, 1);
+
+ /* Setup the interrupts for TX (and errors) */
+ EMAC_EnableIt(pHw, EMAC_IER_RXUBR
+ | EMAC_IER_TUND
+ | EMAC_IER_RLE
+ | EMAC_IER_TXERR
+ | EMAC_IER_TCOMP
+ | EMAC_IER_ROVR
+ | EMAC_IER_HRESP
+ | EMAC_IER_PFR
+ | EMAC_IER_PTZ);
+ return EMACD_OK;
+}
+
+/**
+ * Reset TX & RX queue & statistics
+ * \param pEmacd Pointer to EMAC Driver instance.
+ */
+void EMACD_Reset(sEmacd *pEmacd)
+{
+ Emac *pHw = pEmacd->pHw;
+
+ EMACD_ResetRx(pEmacd);
+ EMACD_ResetTx(pEmacd);
+ EMAC_NetworkControl(pHw, EMAC_NCR_TE | EMAC_NCR_RE
+ | EMAC_NCR_WESTAT | EMAC_NCR_CLRSTAT);
+}
+
+/**
+ * Send a packet with EMAC.
+ * If the packet size is larger than transfer buffer size error returned.
+ * If packet transfer status is monitored, specify callback for each packet.
+ * \param pEmacd Pointer to EMAC Driver instance.
+ * \param buffer The buffer to be send
+ * \param size The size of buffer to be send
+ * \param fTxCb TX callback.
+ * \return EMACD_OK, EMACD_PARAM or EMACD_TX_BUSY.
+ */
+uint8_t EMACD_Send( sEmacd *pEmacd,
+ void *pBuffer,
+ uint32_t size,
+ fEmacdTransferCallback fTxCb )
+{
+ Emac *pHw = pEmacd->pHw;
+
+ volatile sEmacTxDescriptor *pTxTd;
+ volatile fEmacdTransferCallback *pfTxCb;
+
+ TRACE_DEBUG("EMAC_Send\n\r");
+
+ /* Check parameter */
+ if (size > EMAC_TX_UNITSIZE) {
+
+ TRACE_ERROR("EMAC driver does not split send packets.");
+ TRACE_ERROR("%d bytes max in one packet (%d bytes requested)\n\r",
+ (int)EMAC_TX_UNITSIZE, (int)size);
+ return EMACD_PARAM;
+ }
+
+ /* Pointers to the current TxTd */
+ pTxTd = &pEmacd->pTxD[pEmacd->wTxHead];
+
+ /* If no free TxTd, buffer can't be sent, schedule the wakeup callback */
+ if( CIRC_SPACE(pEmacd->wTxHead, pEmacd->wTxTail, pEmacd->wTxListSize) == 0)
+ {
+ return EMACD_TX_BUSY;
+ }
+
+ /* Pointers to the current Tx Callback */
+ pfTxCb = &pEmacd->fTxCbList[pEmacd->wTxHead];
+
+ /* Setup/Copy data to transmition buffer */
+ if (pBuffer && size)
+ {
+ /* Driver manage the ring buffer */
+ memcpy((void *)pTxTd->addr, pBuffer, size);
+ }
+
+ /* Tx Callback */
+ *pfTxCb = fTxCb;
+
+ /* Update TD status */
+
+ /* The buffer size defined is length of ethernet frame
+ so it's always the last buffer of the frame. */
+ if (pEmacd->wTxHead == pEmacd->wTxListSize-1)
+ {
+ pTxTd->status.val =
+ (size & EMAC_TXD_LEN_MASK) | EMAC_TXD_bmLAST | EMAC_TXD_bmWRAP;
+ }
+ else
+ {
+ pTxTd->status.val = (size & EMAC_TXD_LEN_MASK) | EMAC_TXD_bmLAST;
+ }
+
+ CIRC_INC(pEmacd->wTxHead, pEmacd->wTxListSize);
+
+ /* Now start to transmit if it is not already done */
+ EMAC_TransmissionStart(pHw);
+
+ return EMACD_OK;
+}
+
+/**
+ * Return current load of TX.
+ * \param pEmacd Pointer to EMAC Driver instance.
+ */
+uint32_t EMACD_TxLoad(sEmacd *pEmacd)
+{
+ uint16_t head = pEmacd->wTxHead;
+ uint16_t tail = pEmacd->wTxTail;
+ return CIRC_CNT(head, tail, pEmacd->wTxListSize);
+}
+
+/**
+ * Receive a packet with EMAC
+ * If not enough buffer for the packet, the remaining data is lost but right
+ * frame length is returned.
+ * \param pEmacd Pointer to EMAC Driver instance.
+ * \param pFrame Buffer to store the frame
+ * \param frameSize Size of the frame
+ * \param pRcvSize Received size
+ * \return OK, no data, or frame too small
+ */
+uint8_t EMACD_Poll( sEmacd * pEmacd,
+ uint8_t *pFrame,
+ uint32_t frameSize,
+ uint32_t *pRcvSize)
+{
+ uint16_t bufferLength;
+ uint32_t tmpFrameSize=0;
+ uint8_t *pTmpFrame=0;
+ uint32_t tmpIdx = pEmacd->wRxI;
+ volatile sEmacRxDescriptor *pRxTd = &pEmacd->pRxD[pEmacd->wRxI];
+ char isFrame = 0;
+
+ if (pFrame == NULL) return EMACD_PARAM;
+
+ /* Set the default return value */
+ *pRcvSize = 0;
+
+ /* Process received RxTd */
+ while ((pRxTd->addr.val & EMAC_RXD_bmOWNERSHIP) == EMAC_RXD_bmOWNERSHIP)
+ {
+ /* A start of frame has been received, discard previous fragments */
+ if ((pRxTd->status.val & EMAC_RXD_bmSOF) == EMAC_RXD_bmSOF)
+ {
+ /* Skip previous fragment */
+ while (tmpIdx != pEmacd->wRxI)
+ {
+ pRxTd = &pEmacd->pRxD[pEmacd->wRxI];
+ pRxTd->addr.val &= ~(EMAC_RXD_bmOWNERSHIP);
+ CIRC_INC(pEmacd->wRxI, pEmacd->wRxListSize);
+ }
+ /* Reset the temporary frame pointer */
+ pTmpFrame = pFrame;
+ tmpFrameSize = 0;
+ /* Start to gather buffers in a frame */
+ isFrame = 1;
+ }
+
+ /* Increment the pointer */
+ CIRC_INC(tmpIdx, pEmacd->wRxListSize);
+
+ /* Copy data in the frame buffer */
+ if (isFrame)
+ {
+ if (tmpIdx == pEmacd->wRxI)
+ {
+ TRACE_INFO("no EOF (Invalid of buffers too small)\n\r");
+ do
+ {
+
+ pRxTd = &pEmacd->pRxD[pEmacd->wRxI];
+ pRxTd->addr.val &= ~(EMAC_RXD_bmOWNERSHIP);
+ CIRC_INC(pEmacd->wRxI, pEmacd->wRxListSize);
+ } while(tmpIdx != pEmacd->wRxI);
+ return EMACD_RX_NULL;
+ }
+ /* Copy the buffer into the application frame */
+ bufferLength = EMAC_RX_UNITSIZE;
+ if ((tmpFrameSize + bufferLength) > frameSize)
+ {
+ bufferLength = frameSize - tmpFrameSize;
+ }
+
+ memcpy(pTmpFrame, (void*)(pRxTd->addr.val & EMAC_RXD_ADDR_MASK), bufferLength);
+ pTmpFrame += bufferLength;
+ tmpFrameSize += bufferLength;
+
+ /* An end of frame has been received, return the data */
+ if ((pRxTd->status.val & EMAC_RXD_bmEOF) == EMAC_RXD_bmEOF)
+ {
+ /* Frame size from the EMAC */
+ *pRcvSize = (pRxTd->status.val & EMAC_RXD_LEN_MASK);
+
+ TRACE_DEBUG("packet %d-%d (%d)\n\r", (int)pEmacd->wRxI, (int)tmpIdx, (int)*pRcvSize);
+ /* All data have been copied in the application frame buffer => release TD */
+ while (pEmacd->wRxI != tmpIdx)
+ {
+ pRxTd = &pEmacd->pRxD[pEmacd->wRxI];
+ pRxTd->addr.val &= ~(EMAC_RXD_bmOWNERSHIP);
+ CIRC_INC(pEmacd->wRxI, pEmacd->wRxListSize);
+ }
+
+ /* Application frame buffer is too small all data have not been copied */
+ if (tmpFrameSize < *pRcvSize)
+ {
+ TRACE_WARNING("size req %d size allocated %d\n\r", (int)*pRcvSize, (int)frameSize);
+
+ return EMACD_SIZE_TOO_SMALL;
+ }
+
+ return EMACD_OK;
+ }
+ }
+ /* SOF has not been detected, skip the fragment */
+ else
+ {
+ pRxTd->addr.val &= ~(EMAC_RXD_bmOWNERSHIP);
+ pEmacd->wRxI = tmpIdx;
+ }
+
+ /* Process the next buffer */
+ pRxTd = &pEmacd->pRxD[tmpIdx];
+ }
+
+ return EMACD_RX_NULL;
+}
+
+/**
+ * Register/Clear RX callback. Callback will be invoked after the next received
+ * frame.
+ *
+ * When EMACD_Poll() returns EMACD_RX_NULL the application task call
+ * EMACD_SetRxCallback() to register fRxCb() callback and enters suspend state.
+ * The callback is in charge to resume the task once a new frame has been
+ * received. The next time EMACD_Poll() is called, it will be successfull.
+ *
+ * This function is usually invoked from the RX callback itself with NULL
+ * callback, to unregister. Once the callback has resumed the application task,
+ * there is no need to invoke the callback again.
+ *
+ * \param pEmacd Pointer to EMAC Driver instance.
+ * \param fRxCb RX callback.
+ */
+void EMACD_SetRxCallback(sEmacd * pEmacd, fEmacdTransferCallback fRxCb)
+{
+ Emac *pHw = pEmacd->pHw;
+
+ if (fRxCb == NULL)
+ {
+ EMAC_DisableIt(pHw, EMAC_IDR_RCOMP);
+ pEmacd->fRxCb = NULL;
+ }
+ else
+ {
+ pEmacd->fRxCb = fRxCb;
+ EMAC_EnableIt(pHw, EMAC_IER_RCOMP);
+ }
+}
+
+/**
+ * Register/Clear TX wakeup callback.
+ *
+ * When EMACD_Send() returns EMACD_TX_BUSY (all TD busy) the application
+ * task calls EMACD_SetTxWakeupCallback() to register fWakeup() callback and
+ * enters suspend state. The callback is in charge to resume the task once
+ * several TD have been released. The next time EMACD_Send() will be called,
+ * it shall be successfull.
+ *
+ * This function is usually invoked with NULL callback from the TX wakeup
+ * callback itself, to unregister. Once the callback has resumed the
+ * application task, there is no need to invoke the callback again.
+ *
+ * \param pEmacd Pointer to EMAC Driver instance.
+ * \param fWakeup Wakeup callback.
+ * \param bThreshould Number of free TD before wakeup callback invoked.
+ * \return EMACD_OK, EMACD_PARAM on parameter error.
+ */
+uint8_t EMACD_SetTxWakeupCallback(sEmacd * pEmacd,
+ fEmacdWakeupCallback fWakeup,
+ uint8_t bThreshold)
+{
+ if (fWakeup == NULL)
+ {
+ pEmacd->fWakupCb = NULL;
+ }
+ else
+ {
+ if (bThreshold <= pEmacd->wTxListSize)
+ {
+ pEmacd->fWakupCb = fWakeup;
+ pEmacd->bWakeupThreshold = bThreshold;
+ }
+ else
+ {
+ return EMACD_PARAM;
+ }
+ }
+
+ return EMACD_OK;
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/hamming.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/hamming.c
new file mode 100644
index 0000000..b8febdc
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/hamming.c
@@ -0,0 +1,346 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+ * \file
+ *
+ * Implementation of the hamming code functions.
+ *
+ */
+
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "board.h"
+
+/*----------------------------------------------------------------------------
+ * Internal function
+ *----------------------------------------------------------------------------*/
+
+/**
+ * Counts and return the number of bits set to '1' in the given byte.
+ * \param byte Byte to count.
+ */
+static uint8_t CountBitsInByte(uint8_t byte)
+{
+ uint8_t count = 0;
+
+ while (byte > 0)
+ {
+ if (byte & 1)
+ {
+ count++;
+ }
+ byte >>= 1;
+ }
+
+ return count;
+}
+
+/**
+ * Counts and return the number of bits set to '1' in the given hamming code.
+ * \param code Hamming code.
+ */
+static uint8_t CountBitsInCode256(uint8_t *code)
+{
+ return CountBitsInByte(code[0]) + CountBitsInByte(code[1]) + CountBitsInByte(code[2]);
+}
+
+/**
+ * Calculates the 22-bit hamming code for a 256-bytes block of data.
+ * \param data Data buffer to calculate code for.
+ * \param code Pointer to a buffer where the code should be stored.
+ */
+static void Compute256(const uint8_t *data, uint8_t *code)
+{
+ uint32_t i;
+ uint8_t columnSum = 0;
+ uint8_t evenLineCode = 0;
+ uint8_t oddLineCode = 0;
+ uint8_t evenColumnCode = 0;
+ uint8_t oddColumnCode = 0;
+
+ // Xor all bytes together to get the column sum;
+ // At the same time, calculate the even and odd line codes
+ for (i=0; i < 256; i++)
+ {
+ columnSum ^= data[i];
+
+ // If the xor sum of the byte is 0, then this byte has no incidence on
+ // the computed code; so check if the sum is 1.
+ if ((CountBitsInByte(data[i]) & 1) == 1)
+ {
+ // Parity groups are formed by forcing a particular index bit to 0
+ // (even) or 1 (odd).
+ // Example on one byte:
+ //
+ // bits (dec) 7 6 5 4 3 2 1 0
+ // (bin) 111 110 101 100 011 010 001 000
+ // '---'---'---'----------.
+ // |
+ // groups P4' ooooooooooooooo eeeeeeeeeeeeeee P4 |
+ // P2' ooooooo eeeeeee ooooooo eeeeeee P2 |
+ // P1' ooo eee ooo eee ooo eee ooo eee P1 |
+ // |
+ // We can see that: |
+ // - P4 -> bit 2 of index is 0 --------------------'
+ // - P4' -> bit 2 of index is 1.
+ // - P2 -> bit 1 of index if 0.
+ // - etc...
+ // We deduce that a bit position has an impact on all even Px if
+ // the log2(x)nth bit of its index is 0
+ // ex: log2(4) = 2, bit2 of the index must be 0 (-> 0 1 2 3)
+ // and on all odd Px' if the log2(x)nth bit of its index is 1
+ // ex: log2(2) = 1, bit1 of the index must be 1 (-> 0 1 4 5)
+ //
+ // As such, we calculate all the possible Px and Px' values at the
+ // same time in two variables, evenLineCode and oddLineCode, such as
+ // evenLineCode bits: P128 P64 P32 P16 P8 P4 P2 P1
+ // oddLineCode bits: P128' P64' P32' P16' P8' P4' P2' P1'
+ //
+ evenLineCode ^= (255 - i);
+ oddLineCode ^= i;
+ }
+ }
+
+ // At this point, we have the line parities, and the column sum. First, We
+ // must caculate the parity group values on the column sum.
+ for (i=0; i < 8; i++)
+ {
+ if (columnSum & 1)
+ {
+ evenColumnCode ^= (7 - i);
+ oddColumnCode ^= i;
+ }
+ columnSum >>= 1;
+ }
+
+ // Now, we must interleave the parity values, to obtain the following layout:
+ // Code[0] = Line1
+ // Code[1] = Line2
+ // Code[2] = Column
+ // Line = Px' Px P(x-1)- P(x-1) ...
+ // Column = P4' P4 P2' P2 P1' P1 PadBit PadBit
+ code[0] = 0;
+ code[1] = 0;
+ code[2] = 0;
+
+ for (i=0; i < 4; i++)
+ {
+ code[0] <<= 2;
+ code[1] <<= 2;
+ code[2] <<= 2;
+
+ // Line 1
+ if ((oddLineCode & 0x80) != 0)
+ {
+ code[0] |= 2;
+ }
+
+ if ((evenLineCode & 0x80) != 0)
+ {
+ code[0] |= 1;
+ }
+
+ // Line 2
+ if ((oddLineCode & 0x08) != 0)
+ {
+ code[1] |= 2;
+ }
+
+ if ((evenLineCode & 0x08) != 0)
+ {
+ code[1] |= 1;
+ }
+
+ // Column
+ if ((oddColumnCode & 0x04) != 0)
+ {
+ code[2] |= 2;
+ }
+
+ if ((evenColumnCode & 0x04) != 0)
+ {
+ code[2] |= 1;
+ }
+
+ oddLineCode <<= 1;
+ evenLineCode <<= 1;
+ oddColumnCode <<= 1;
+ evenColumnCode <<= 1;
+ }
+
+ // Invert codes (linux compatibility)
+ code[0] = (~(uint32_t)code[0]);
+ code[1] = (~(uint32_t)code[1]);
+ code[2] = (~(uint32_t)code[2]);
+
+ TRACE_DEBUG("Computed code = %02X %02X %02X\n\r",
+ code[0], code[1], code[2]);
+}
+
+/**
+ * Verifies and corrects a 256-bytes block of data using the given 22-bits
+ * hamming code.
+ *
+ * \param data Data buffer to check.
+ * \param originalCode Hamming code to use for verifying the data.
+ *
+ * \return 0 if there is no error, otherwise returns a HAMMING_ERROR code.
+ */
+static uint8_t Verify256( uint8_t* pucData, const uint8_t* pucOriginalCode )
+{
+ /* Calculate new code */
+ uint8_t computedCode[3] ;
+ uint8_t correctionCode[3] ;
+
+ Compute256( pucData, computedCode ) ;
+
+ /* Xor both codes together */
+ correctionCode[0] = computedCode[0] ^ pucOriginalCode[0] ;
+ correctionCode[1] = computedCode[1] ^ pucOriginalCode[1] ;
+ correctionCode[2] = computedCode[2] ^ pucOriginalCode[2] ;
+
+ TRACE_DEBUG( "Correction code = %02X %02X %02X\n\r", correctionCode[0], correctionCode[1], correctionCode[2] ) ;
+
+ // If all bytes are 0, there is no error
+ if ( (correctionCode[0] == 0) && (correctionCode[1] == 0) && (correctionCode[2] == 0) )
+ {
+ return 0 ;
+ }
+
+ /* If there is a single bit error, there are 11 bits set to 1 */
+ if ( CountBitsInCode256( correctionCode ) == 11 )
+ {
+ // Get byte and bit indexes
+ uint8_t byte ;
+ uint8_t bit ;
+
+ byte = correctionCode[0] & 0x80;
+ byte |= (correctionCode[0] << 1) & 0x40;
+ byte |= (correctionCode[0] << 2) & 0x20;
+ byte |= (correctionCode[0] << 3) & 0x10;
+
+ byte |= (correctionCode[1] >> 4) & 0x08;
+ byte |= (correctionCode[1] >> 3) & 0x04;
+ byte |= (correctionCode[1] >> 2) & 0x02;
+ byte |= (correctionCode[1] >> 1) & 0x01;
+
+ bit = (correctionCode[2] >> 5) & 0x04;
+ bit |= (correctionCode[2] >> 4) & 0x02;
+ bit |= (correctionCode[2] >> 3) & 0x01;
+
+ /* Correct bit */
+ TRACE_DEBUG("Correcting byte #%d at bit %d\n\r", byte, bit ) ;
+ pucData[byte] ^= (1 << bit) ;
+
+ return Hamming_ERROR_SINGLEBIT ;
+ }
+
+ /* Check if ECC has been corrupted */
+ if ( CountBitsInCode256( correctionCode ) == 1 )
+ {
+ return Hamming_ERROR_ECC ;
+ }
+ /* Otherwise, this is a multi-bit error */
+ else
+ {
+ return Hamming_ERROR_MULTIPLEBITS ;
+ }
+}
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * Computes 3-bytes hamming codes for a data block whose size is multiple of
+ * 256 bytes. Each 256 bytes block gets its own code.
+ * \param data Data to compute code for.
+ * \param size Data size in bytes.
+ * \param code Codes buffer.
+ */
+void Hamming_Compute256x( const uint8_t *pucData, uint32_t dwSize, uint8_t* puCode )
+{
+ TRACE_DEBUG("Hamming_Compute256x()\n\r");
+
+ while ( dwSize > 0 )
+ {
+ Compute256( pucData, puCode ) ;
+
+ pucData += 256;
+ puCode += 3;
+ dwSize -= 256;
+ }
+}
+
+/**
+ * Verifies 3-bytes hamming codes for a data block whose size is multiple of
+ * 256 bytes. Each 256-bytes block is verified with its own code.
+ *
+ * \return 0 if the data is correct, Hamming_ERROR_SINGLEBIT if one or more
+ * block(s) have had a single bit corrected, or either Hamming_ERROR_ECC
+ * or Hamming_ERROR_MULTIPLEBITS.
+ *
+ * \param data Data buffer to verify.
+ * \param size Size of the data in bytes.
+ * \param code Original codes.
+ */
+uint8_t Hamming_Verify256x( uint8_t* pucData, uint32_t dwSize, const uint8_t* pucCode )
+{
+ uint8_t error ;
+ uint8_t result = 0 ;
+
+ TRACE_DEBUG( "Hamming_Verify256x()\n\r" ) ;
+
+ while ( dwSize > 0 )
+ {
+ error = Verify256( pucData, pucCode ) ;
+
+ if ( error == Hamming_ERROR_SINGLEBIT )
+ {
+ result = Hamming_ERROR_SINGLEBIT ;
+ }
+ else
+ {
+ if ( error )
+ {
+ return error ;
+ }
+ }
+
+ pucData += 256;
+ pucCode += 3;
+ dwSize -= 256;
+ }
+
+ return result ;
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/hx8347.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/hx8347.c
new file mode 100644
index 0000000..2d2d602
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/hx8347.c
@@ -0,0 +1,794 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * Implementation of HX8347 driver.
+ *
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+#include "board.h"
+
+#include <stdint.h>
+#include <string.h>
+#include <stdio.h>
+
+/*----------------------------------------------------------------------------
+ * Local definitions
+ *----------------------------------------------------------------------------*/
+/** Pixel cache size */
+#define LCD_DATA_CACHE_SIZE BOARD_LCD_WIDTH
+
+/// HX8347 ID code
+#define HX8347_HIMAXID_CODE 0x47
+
+/*----------------------------------------------------------------------------
+ * Local variables
+ *----------------------------------------------------------------------------*/
+
+
+/* Pixel cache used to speed up SPI communication */
+static LcdColor_t gLcdPixelCache[LCD_DATA_CACHE_SIZE];
+
+/*----------------------------------------------------------------------------
+ * Local functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * ----------------------------------------------------------------------------
+ * \brief Send command to LCD controller.
+ *
+ * \param cmd command.
+ * ----------------------------------------------------------------------------
+ */
+static inline void WriteCmd(uint8_t cmd)
+{
+ LCD_IR = cmd;
+}
+
+/**
+ * ----------------------------------------------------------------------------
+ * \brief Send one data to LCD controller.
+ *
+ * \param data data.
+ * ----------------------------------------------------------------------------
+ */
+static inline void WriteData(uint16_t data)
+{
+ LCD_D = data;
+}
+
+/**
+ * ----------------------------------------------------------------------------
+ * \brief Read one data from LCD controller.
+ * ----------------------------------------------------------------------------
+ */
+static inline uint16_t ReadData( void )
+{
+ return LCD_D ;
+}
+
+/**
+ * \brief Write mutiple data in buffer to LCD controller.
+ *
+ * \param pBuf data buffer.
+ * \param size size in pixels.
+ */
+static void WriteBuffer( const LcdColor_t *pBuf, uint32_t size )
+{
+ uint32_t i ;
+
+ for ( i = 0 ; i < size ; ++i )
+ {
+ WriteData( pBuf[i] ) ;
+ }
+}
+
+/**
+ * ----------------------------------------------------------------------------
+ * \brief Write data to LCD Register.
+ *
+ * \param reg Register address.
+ * \param data Data to be written.
+ * ----------------------------------------------------------------------------
+ */
+static void WriteReg( uint8_t reg, uint16_t data )
+{
+ WriteCmd( reg ) ;
+ WriteData( data ) ;
+}
+
+/**
+ * \brief Write data to LCD Register.
+ *
+ * \param reg Register address.
+ * \return Data read.
+ */
+static uint16_t ReadReg( uint8_t reg )
+{
+ WriteCmd( reg ) ;
+ return ReadData() ;
+}
+
+/**
+ * ----------------------------------------------------------------------------
+ * \brief Simple delay, implemented as a loop.
+ * Shall be used only during the initialization phase.
+ *
+ * \param ms Delay specified in ms.
+ * ----------------------------------------------------------------------------
+ */
+static void Delay( uint32_t ms )
+{
+ volatile uint32_t i ;
+
+ i = ms * (BOARD_MCK / (1000 * 6)) ;
+ while(i--) ;
+}
+
+/*----------------------------------------------------------------------------
+ * Basic HX8347 primitives
+ *----------------------------------------------------------------------------*/
+
+/**
+ * ----------------------------------------------------------------------------
+ * \brief Check Box coordinates. Return upper left and bottom right coordinates.
+ *
+ * \param pX1 X-coordinate of upper-left corner on LCD.
+ * \param pY1 Y-coordinate of upper-left corner on LCD.
+ * \param pX2 X-coordinate of lower-right corner on LCD.
+ * \param pY2 Y-coordinate of lower-right corner on LCD.
+ * ----------------------------------------------------------------------------
+ */
+static void CheckBoundaries( uint32_t *pX1, uint32_t *pY1, uint32_t *pX2, uint32_t *pY2 )
+{
+ uint32_t dw;
+
+ if ( *pX1 >= BOARD_LCD_WIDTH )
+ {
+ *pX1=BOARD_LCD_WIDTH-1 ;
+ }
+
+ if ( *pX2 >= BOARD_LCD_WIDTH )
+ {
+ *pX2=BOARD_LCD_WIDTH-1 ;
+ }
+
+ if ( *pY1 >= BOARD_LCD_HEIGHT )
+ {
+ *pY1=BOARD_LCD_HEIGHT-1 ;
+ }
+
+ if ( *pY2 >= BOARD_LCD_HEIGHT )
+ {
+ *pY2=BOARD_LCD_HEIGHT-1 ;
+ }
+
+ if ( *pX1 > *pX2 )
+ {
+ dw = *pX1;
+ *pX1 = *pX2;
+ *pX2 = dw;
+ }
+
+ if ( *pY1 > *pY2 )
+ {
+ dw = *pY1;
+ *pY1 = *pY2;
+ *pY2 = dw;
+ }
+}
+
+/**
+ * ----------------------------------------------------------------------------
+ * \brief Set the window size user can access.
+ * \param x_start X-coordinate of upper-left corner on LCD.
+ * \param y_start Y-coordinate of upper-left corner on LCD.
+ * \param x_end X-coordinate of bottom-right corner on LCD.
+ * \param y_end Y-coordinate of bottom-right corner on LCD.
+ * ----------------------------------------------------------------------------
+ */
+extern void LCD_SetWindow( uint32_t dwX, uint32_t dwY, uint32_t dwWidth, uint32_t dwHeight )
+{
+ WriteReg( 0x02, (dwX & 0xff00) >> 8 ) ; // column high
+ WriteReg( 0x03, dwX & 0xff ) ; // column low
+ WriteReg( 0x06, (dwY & 0xff00) >>8 ) ; // row high
+ WriteReg( 0x07, dwY & 0xff ) ; // row low
+
+ WriteReg( 0x04, (dwWidth & 0xff00) >>8 ) ; // column high
+ WriteReg( 0x05, dwWidth & 0xff ) ; // column low
+ WriteReg( 0x08, (dwHeight & 0xff00) >>8 ) ; // row high
+ WriteReg( 0x09, dwHeight & 0xff ) ; // row low
+}
+
+/**
+ * ----------------------------------------------------------------------------
+ * \brief Set cursor of LCD srceen.
+ * \param x X-coordinate of upper-left corner on LCD.
+ * \param y Y-coordinate of upper-left corner on LCD.
+ * ----------------------------------------------------------------------------
+ */
+extern void LCD_SetCursor( uint32_t dwX, uint32_t dwY )
+{
+ WriteReg( HX8347_R02H, (dwX & 0xff00) >>8); // column high
+ WriteReg( HX8347_R03H, dwX & 0xff); // column low
+ WriteReg( HX8347_R06H, (dwY & 0xff00) >>8); // row high
+ WriteReg( HX8347_R07H, dwY & 0xff); // row low
+}
+
+/**
+ * ----------------------------------------------------------------------------
+ * \brief Initialize the LCD controller.
+ * ----------------------------------------------------------------------------
+ */
+extern uint32_t LCD_Initialize( void )
+{
+ uint16_t chipid ;
+
+ const Pin pPins[] = {BOARD_LCD_PINS};
+ SmcCs_number *pSmcCs = &(SMC->SMC_CS_NUMBER[BOARD_LCD_NCS]);
+
+ // Enable pins
+ PIO_PinConfigure( pPins, PIO_LISTSIZE( pPins ) ) ;
+
+ // Enable peripheral clock
+ PMC_EnablePeripheral( ID_SMC ) ;
+
+ // EBI SMC Configuration
+ pSmcCs->SMC_SETUP = BOARD_LCD_SETUP ;
+ pSmcCs->SMC_PULSE = BOARD_LCD_PULSE ;
+ pSmcCs->SMC_CYCLE = BOARD_LCD_CYCLE ;
+ pSmcCs->SMC_MODE = BOARD_LCD_MODE ;
+
+ /* Turn off LCD */
+ LCD_Off() ;
+
+ /*======== LCD module initial code ========*/
+
+ // Check HX8347 chipid
+ chipid = ReadReg( HX8347_R67H ) ;
+ if ( chipid != HX8347_HIMAXID_CODE )
+ {
+ printf( "Read HX8347 chip ID error, skip initialization.\r\n" ) ;
+
+ return 1 ;
+ }
+
+ // Start internal OSC
+ WriteReg(HX8347_R19H, 0x49); // OSCADJ=10 0000, OSD_EN=1 //60Hz
+ WriteReg(HX8347_R93H, 0x0C); // RADJ=1100
+
+ // Power on flow
+ WriteReg(HX8347_R44H, 0x4D); // VCM=100 1101
+ WriteReg(HX8347_R45H, 0x11); // VDV=1 0001
+ WriteReg(HX8347_R20H, 0x40); // BT=0100
+ WriteReg(HX8347_R1DH, 0x07); // VC1=111
+ WriteReg(HX8347_R1EH, 0x00); // VC3=000
+ WriteReg(HX8347_R1FH, 0x04); // VRH=0100
+
+ WriteReg(HX8347_R1CH, 0x04); // AP=100
+ WriteReg(HX8347_R1BH, 0x10); // GASENB=0, PON=1, DK=0, XDK=0, DDVDH_TRI=0, STB=0
+ Delay(50);
+
+ WriteReg(HX8347_R43H, 0x80); // Set VCOMG=1
+ Delay(50);
+/*
+ // Gamma for CMO 2.8
+ WriteReg(HX8347_R46H, 0x95);
+ WriteReg(HX8347_R47H, 0x51);
+ WriteReg(HX8347_R48H, 0x00);
+ WriteReg(HX8347_R49H, 0x36);
+ WriteReg(HX8347_R4AH, 0x11);
+ WriteReg(HX8347_R4BH, 0x66);
+ WriteReg(HX8347_R4CH, 0x14);
+ WriteReg(HX8347_R4DH, 0x77);
+ WriteReg(HX8347_R4EH, 0x13);
+ WriteReg(HX8347_R4FH, 0x4C);
+ WriteReg(HX8347_R50H, 0x46);
+ WriteReg(HX8347_R51H, 0x46);
+*/
+ //240x320 window setting
+ WriteReg(HX8347_R02H, 0x00); // Column address start2
+ WriteReg(HX8347_R03H, 0x00); // Column address start1
+ WriteReg(HX8347_R04H, 0x00); // Column address end2
+ WriteReg(HX8347_R05H, 0xEF); // Column address end1
+ WriteReg(HX8347_R06H, 0x00); // Row address start2
+ WriteReg(HX8347_R07H, 0x00); // Row address start1
+ WriteReg(HX8347_R08H, 0x01); // Row address end2
+ WriteReg(HX8347_R09H, 0x3F); // Row address end1
+
+ // Display Setting
+ WriteReg(HX8347_R01H, 0x06); // IDMON=0, INVON=1, NORON=1, PTLON=0
+ //WriteReg(HX8347_R16H, 0xC8); // MY=1, MX=1, MV=0, BGR=1
+ WriteReg(HX8347_R16H, 0x68); // MY=0, MX=1, MV=1, RGB XY exchange X mirror
+ WriteReg(HX8347_R23H, 0x95); // N_DC=1001 0101
+ WriteReg(HX8347_R24H, 0x95); // P_DC=1001 0101
+ WriteReg(HX8347_R25H, 0xFF); // I_DC=1111 1111
+ WriteReg(HX8347_R27H, 0x06); // N_BP=0000 0110
+ WriteReg(HX8347_R28H, 0x06); // N_FP=0000 0110
+ WriteReg(HX8347_R29H, 0x06); // P_BP=0000 0110
+ WriteReg(HX8347_R2AH, 0x06); // P_FP=0000 0110
+ WriteReg(HX8347_R2CH, 0x06); // I_BP=0000 0110
+ WriteReg(HX8347_R2DH, 0x06); // I_FP=0000 0110
+ WriteReg(HX8347_R3AH, 0x01); // N_RTN=0000, N_NW=001
+ WriteReg(HX8347_R3BH, 0x01); // P_RTN=0000, P_NW=001
+ WriteReg(HX8347_R3CH, 0xF0); // I_RTN=1111, I_NW=000
+ WriteReg(HX8347_R3DH, 0x00); // DIV=00
+ WriteReg(HX8347_R3EH, 0x38); // SON=38h
+ WriteReg(HX8347_R40H, 0x0F); // GDON=0Fh
+ WriteReg(HX8347_R41H, 0xF0); // GDOF=F0h
+
+ return 0;
+}
+
+/**
+ * ----------------------------------------------------------------------------
+ * \brief Turn on the LCD.
+ * ----------------------------------------------------------------------------
+ */
+extern void LCD_On( void )
+{
+ // Display ON Setting
+ WriteReg( HX8347_R90H, 0x7F ) ; // SAP=0111 1111
+ WriteReg( HX8347_R26H, 0x04 ) ; // GON=0, DTE=0, D=01
+ Delay( 100 ) ;
+ WriteReg( HX8347_R26H, 0x24 ) ; // GON=1, DTE=0, D=01
+ WriteReg( HX8347_R26H, 0x2C ) ; // GON=1, DTE=0, D=11
+ Delay( 100 ) ;
+ WriteReg( HX8347_R26H, 0x3C ) ; // GON=1, DTE=1, D=11
+}
+
+/**
+ * ----------------------------------------------------------------------------
+ * \brief Turn off the LCD.
+ * ----------------------------------------------------------------------------
+ */
+extern void LCD_Off( void )
+{
+ WriteReg( HX8347_R90H, 0x00 ) ; // SAP=0000 0000
+ WriteReg( HX8347_R26H, 0x00 ) ; // GON=0, DTE=0, D=00
+}
+
+/**
+ * ----------------------------------------------------------------------------
+ * \brief Convert 24 bit RGB color into 5-6-5 rgb color space.
+ *
+ * Initialize the LcdColor_t cache with the color pattern.
+ * \param x 24-bits RGB color.
+ * \return 0 for successfull operation.
+ * ----------------------------------------------------------------------------
+ */
+extern uint32_t LCD_SetColor( uint32_t dwRgb24Bits )
+{
+ uint16_t i ;
+ LcdColor_t wColor ;
+
+ wColor = (dwRgb24Bits & 0xF80000) >> 8 |
+ (dwRgb24Bits & 0x00FC00) >> 5 |
+ (dwRgb24Bits & 0x0000F8) >> 3;
+
+ /* Fill the cache with selected color */
+ for ( i = 0 ; i < LCD_DATA_CACHE_SIZE ; ++i )
+ {
+ gLcdPixelCache[i] = wColor ;
+ }
+
+ return 0 ;
+}
+
+/**
+ * ----------------------------------------------------------------------------
+ * \brief Draw a LcdColor_t on LCD of given color.
+ *
+ * \param x X-coordinate of pixel.
+ * \param y Y-coordinate of pixel.
+ * ----------------------------------------------------------------------------
+ */
+extern uint32_t LCD_DrawPixel( uint32_t x, uint32_t y )
+{
+ if ( (x >= BOARD_LCD_WIDTH) || (y >= BOARD_LCD_HEIGHT) )
+ {
+ return 1 ;
+ }
+
+ /* Set cursor */
+ LCD_SetCursor( x, y ) ;
+
+ /* Prepare to write in GRAM */
+ WriteCmd( HX8347_R22H ) ;
+
+ WriteData( *gLcdPixelCache ) ;
+
+ return 0 ;
+}
+
+/**
+ * ----------------------------------------------------------------------------
+ * \brief Write several pixels with the same color to LCD GRAM.
+ *
+ * LcdColor_t color is set by the LCD_SetColor() function.
+ * This function is optimized using an sram buffer to transfer block instead of
+ * individual pixels in order to limit the number of SPI interrupts.
+ * \param dwX1 X-coordinate of upper-left corner on LCD.
+ * \param dwY1 Y-coordinate of upper-left corner on LCD.
+ * \param dwX2 X-coordinate of lower-right corner on LCD.
+ * \param dwY2 Y-coordinate of lower-right corner on LCD.
+ * ----------------------------------------------------------------------------
+ */
+extern uint32_t LCD_DrawFilledRectangle( uint32_t dwX1, uint32_t dwY1, uint32_t dwX2, uint32_t dwY2 )
+{
+ uint32_t size, blocks ;
+
+ /* Swap coordinates if necessary */
+ CheckBoundaries( &dwX1, &dwY1, &dwX2, &dwY2 ) ;
+
+ /* Determine the refresh window area */
+ LCD_SetWindow( dwX1, dwY1, dwX2, dwY2 ) ;
+
+ /* Set cursor */
+ LCD_SetCursor( dwX1, dwY1 ) ;
+
+ /* Prepare to write in GRAM */
+ WriteCmd( HX8347_R22H ) ;
+
+ size = (dwX2 - dwX1 + 1) * (dwY2 - dwY1 + 1) ;
+ /* Send pixels blocks => one SPI IT / block */
+ blocks = size / LCD_DATA_CACHE_SIZE ;
+ while ( blocks-- )
+ {
+ WriteBuffer( gLcdPixelCache, LCD_DATA_CACHE_SIZE ) ;
+ }
+ /* Send remaining pixels */
+ WriteBuffer( gLcdPixelCache, size % LCD_DATA_CACHE_SIZE ) ;
+
+ /* Reset the refresh window area */
+ LCD_SetWindow( 0, 0, BOARD_LCD_WIDTH - 1, BOARD_LCD_HEIGHT - 1 ) ;
+
+ return 0 ;
+}
+
+/**
+ * \brief Write several pixels pre-formatted in a bufer to LCD GRAM.
+ *
+ * \param dwX1 X-coordinate of upper-left corner on LCD.
+ * \param dwY1 Y-coordinate of upper-left corner on LCD.
+ * \param dwX2 X-coordinate of lower-right corner on LCD.
+ * \param dwY2 Y-coordinate of lower-right corner on LCD.
+ * \param pBuffer LcdColor_t buffer area.
+ */
+extern uint32_t LCD_DrawPicture( uint32_t dwX1, uint32_t dwY1, uint32_t dwX2, uint32_t dwY2, const LcdColor_t *pBuffer )
+{
+ uint32_t size, blocks ;
+ LcdColor_t currentColor ;
+
+ /* Swap coordinates if necessary */
+ CheckBoundaries( &dwX1, &dwY1, &dwX2, &dwY2 ) ;
+
+ /* Determine the refresh window area */
+ LCD_SetWindow( dwX1, dwY1, dwX2, dwY2 ) ;
+
+ /* Set cursor */
+ LCD_SetCursor( dwX1, dwY1 ) ;
+
+ /* Prepare to write in GRAM */
+ WriteCmd( HX8347_R22H ) ;
+
+ size = (dwX2 - dwX1 + 1) * (dwY2 - dwY1 + 1) ;
+ /* Check if the buffer is within the SRAM */
+ if ( (IRAM0_ADDR <= (uint32_t)pBuffer) && ((uint32_t)pBuffer < NFC_RAM_ADDR) )
+ {
+ WriteBuffer( pBuffer, size ) ;
+ }
+ /* If the buffer is not in SRAM, transfer it in SRAM first before transfer */
+ else
+ {
+ /* Use color buffer as a cache */
+ currentColor = gLcdPixelCache[0];
+ /* Send pixels blocks => one SPI IT / block */
+ blocks = size / LCD_DATA_CACHE_SIZE;
+ while ( blocks-- )
+ {
+ memcpy( gLcdPixelCache, pBuffer, LCD_DATA_CACHE_SIZE * sizeof( LcdColor_t ) ) ;
+ WriteBuffer( gLcdPixelCache, LCD_DATA_CACHE_SIZE ) ;
+ pBuffer += LCD_DATA_CACHE_SIZE ;
+ }
+
+ /* Send remaining pixels */
+ memcpy( gLcdPixelCache, pBuffer, (size % LCD_DATA_CACHE_SIZE) * sizeof( LcdColor_t ) ) ;
+ WriteBuffer( gLcdPixelCache, size % LCD_DATA_CACHE_SIZE ) ;
+
+ /* Restore the color cache */
+ LCD_SetColor( currentColor ) ;
+ }
+
+ /* Reset the refresh window area */
+ LCD_SetWindow( 0, 0, BOARD_LCD_WIDTH - 1, BOARD_LCD_HEIGHT - 1 ) ;
+
+ return 0 ;
+}
+
+/*
+ * \brief Draw a line on LCD, which is not horizontal or vertical.
+ *
+ * \param x X-coordinate of line start.
+ * \param y Y-coordinate of line start.
+ * \param length line length.
+ * \param direction line direction: 0 - horizontal, 1 - vertical.
+ * \param color LcdColor_t color.
+ */
+static uint32_t DrawLineBresenham( uint32_t dwX1, uint32_t dwY1, uint32_t dwX2, uint32_t dwY2 )
+{
+ int dx, dy ;
+ int i ;
+ int xinc, yinc, cumul ;
+ int x, y ;
+
+ x = dwX1 ;
+ y = dwY1 ;
+ dx = dwX2 - dwX1 ;
+ dy = dwY2 - dwY1 ;
+
+ xinc = ( dx > 0 ) ? 1 : -1 ;
+ yinc = ( dy > 0 ) ? 1 : -1 ;
+ dx = ( dx > 0 ) ? dx : -dx ;
+ dy = ( dy > 0 ) ? dy : -dy ;
+
+ LCD_DrawPixel( x, y ) ;
+
+ if ( dx > dy )
+ {
+ cumul = dx / 2 ;
+ for ( i = 1 ; i <= dx ; i++ )
+ {
+ x += xinc ;
+ cumul += dy ;
+
+ if ( cumul >= dx )
+ {
+ cumul -= dx ;
+ y += yinc ;
+ }
+ LCD_DrawPixel( x, y ) ;
+ }
+ }
+ else
+ {
+ cumul = dy / 2 ;
+ for ( i = 1 ; i <= dy ; i++ )
+ {
+ y += yinc ;
+ cumul += dx ;
+
+ if ( cumul >= dy )
+ {
+ cumul -= dy ;
+ x += xinc ;
+ }
+
+ LCD_DrawPixel( x, y ) ;
+ }
+ }
+
+ return 0 ;
+}
+
+
+/*
+ * \brief Draw a line on LCD, horizontal and vertical line are supported.
+ *
+ * \param dwX1 X-coordinate of line start.
+ * \param dwY1 Y-coordinate of line start.
+ * \param dwX2 X-coordinate of line end.
+ * \param dwY2 Y-coordinate of line end.
+ */
+extern uint32_t LCD_DrawLine ( uint32_t dwX1, uint32_t dwY1, uint32_t dwX2, uint32_t dwY2 )
+{
+ /* Optimize horizontal or vertical line drawing */
+ if ( ( dwY1 == dwY2 ) || (dwX1 == dwX2) )
+ {
+ LCD_DrawFilledRectangle( dwX1, dwY1, dwX2, dwY2 ) ;
+ }
+ else
+ {
+ DrawLineBresenham( dwX1, dwY1, dwX2, dwY2 ) ;
+ }
+
+ return 0 ;
+}
+
+/**
+ * \brief Draws a circle on LCD, at the given coordinates.
+ *
+ * \param dwX X-coordinate of circle center.
+ * \param dwY Y-coordinate of circle center.
+ * \param dwR circle radius.
+*/
+extern uint32_t LCD_DrawCircle( uint32_t dwX, uint32_t dwY, uint32_t dwR )
+{
+ int32_t d ; /* Decision Variable */
+ uint32_t curX ; /* Current X Value */
+ uint32_t curY ; /* Current Y Value */
+
+ if ( dwR == 0 )
+ {
+ return 0 ;
+ }
+
+ d = 3 - (dwR << 1) ;
+ curX = 0 ;
+ curY = dwR ;
+
+ while ( curX <= curY )
+ {
+ LCD_DrawPixel(dwX + curX, dwY + curY);
+ LCD_DrawPixel(dwX + curX, dwY - curY);
+ LCD_DrawPixel(dwX - curX, dwY + curY);
+ LCD_DrawPixel(dwX - curX, dwY - curY);
+ LCD_DrawPixel(dwX + curY, dwY + curX);
+ LCD_DrawPixel(dwX + curY, dwY - curX);
+ LCD_DrawPixel(dwX - curY, dwY + curX);
+ LCD_DrawPixel(dwX - curY, dwY - curX);
+
+ if (d < 0) {
+ d += (curX << 2) + 6;
+ }
+ else {
+ d += ((curX - curY) << 2) + 10;
+ curY--;
+ }
+ curX++;
+ }
+ return 0;
+}
+/**
+ * \brief Draws a filled circle on LCD, at the given coordinates.
+ *
+ * \param dwX X-coordinate of circle center.
+ * \param dwY Y-coordinate of circle center.
+ * \param dwRadius circle radius.
+*/
+extern uint32_t LCD_DrawFilledCircle( uint32_t dwX, uint32_t dwY, uint32_t dwRadius )
+{
+ signed int d ; // Decision Variable
+ uint32_t dwCurX ; // Current X Value
+ uint32_t dwCurY ; // Current Y Value
+ uint32_t dwXmin, dwYmin;
+
+ if ( dwRadius == 0 )
+ {
+ return 0 ;
+ }
+ d = 3 - (dwRadius << 1) ;
+ dwCurX = 0 ;
+ dwCurY = dwRadius ;
+
+ while ( dwCurX <= dwCurY )
+ {
+ dwXmin = (dwCurX > dwX) ? 0 : dwX-dwCurX;
+ dwYmin = (dwCurY > dwY) ? 0 : dwY-dwCurY;
+ LCD_DrawFilledRectangle( dwXmin, dwYmin, dwX+dwCurX, dwYmin ) ;
+ LCD_DrawFilledRectangle( dwXmin, dwY+dwCurY, dwX+dwCurX, dwY+dwCurY ) ;
+ dwXmin = (dwCurY > dwX) ? 0 : dwX-dwCurY;
+ dwYmin = (dwCurX > dwY) ? 0 : dwY-dwCurX;
+ LCD_DrawFilledRectangle( dwXmin, dwYmin, dwX+dwCurY, dwYmin ) ;
+ LCD_DrawFilledRectangle( dwXmin, dwY+dwCurX, dwX+dwCurY, dwY+dwCurX ) ;
+
+ if ( d < 0 )
+ {
+ d += (dwCurX << 2) + 6 ;
+ }
+ else
+ {
+ d += ((dwCurX - dwCurY) << 2) + 10;
+ dwCurY-- ;
+ }
+
+ dwCurX++ ;
+ }
+
+ return 0 ;
+}
+/**
+ * \brief Draws a rectangle on LCD, at the given coordinates.
+ *
+ * \param dwX 1 X-coordinate of one angle.
+ * \param dwY1 Y-coordinate of one angle.
+ * \param dwX2 X-coordinate of another angle.
+ * \param dwY2 Y-coordinate of another angle.
+*/
+extern uint32_t LCD_DrawRectangle( uint32_t dwX1, uint32_t dwY1, uint32_t dwX2, uint32_t dwY2 )
+{
+ CheckBoundaries( &dwX1, &dwY1, &dwX2, &dwY2 ) ;
+
+ LCD_DrawFilledRectangle( dwX1, dwY1, dwX2, dwY1 ) ;
+ LCD_DrawFilledRectangle( dwX1, dwY2, dwX2, dwY2 ) ;
+
+ LCD_DrawFilledRectangle( dwX1, dwY1, dwX1, dwY2 ) ;
+ LCD_DrawFilledRectangle( dwX2, dwY1, dwX2, dwY2 ) ;
+
+ return 0 ;
+}
+
+
+/**
+ * \brief Set the backlight of the LCD (AAT3193).
+ *
+ * \param level Backlight brightness level [1..16], 1 means maximum brightness.
+ */
+extern void LCD_SetBacklight( uint32_t level )
+{
+ uint32_t i ;
+ const Pin pPins[] = { BOARD_BACKLIGHT_PIN } ;
+
+ /* Ensure valid level */
+ level = (level < 1) ? 1 : level ;
+ level = (level > 32) ? 32 : level ;
+
+ /* Enable pins */
+ PIO_PinConfigure( pPins, PIO_LISTSIZE( pPins ) ) ;
+
+ /* Switch off backlight */
+ PIO_PinClear( pPins ) ;
+ i = 600 * (BOARD_MCK / 1000000) ; /* wait for at least 500us */
+ while ( i-- ) ;
+
+ /* Set new backlight level */
+ for ( i = 0 ; i < level ; i++ )
+ {
+ PIO_PinClear( pPins ) ;
+ PIO_PinClear( pPins ) ;
+ PIO_PinClear( pPins ) ;
+
+ PIO_PinSet( pPins ) ;
+ PIO_PinSet( pPins ) ;
+ PIO_PinSet( pPins ) ;
+ }
+}
+/**
+ * \brief Set the display fomat of the LCD to landscape(AAT3193).
+ *
+ * \param dwRGB The color value .
+ */
+extern void LCD_SetDisplayLandscape( uint32_t dwRGB )
+{
+ dwRGB = dwRGB;
+}
+/**
+ * \brief Set the display fomat of the LCD to portrait(AAT3193).
+ *
+ * \param level The color value.
+ */
+extern void LCD_SetDisplayPortrait( uint32_t dwRGB )
+{
+ dwRGB = dwRGB;
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/iso7816_4.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/iso7816_4.c
new file mode 100644
index 0000000..a482317
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/iso7816_4.c
@@ -0,0 +1,598 @@
+/**
+ * \section Purpose
+ *
+ * ISO 7816 driver
+ *
+ * \section Usage
+ *
+ * -# ISO7816_Init
+ * -# ISO7816_IccPowerOff
+ * -# ISO7816_XfrBlockTPDU_T0
+ * -# ISO7816_Escape
+ * -# ISO7816_RestartClock
+ * -# ISO7816_StopClock
+ * -# ISO7816_toAPDU
+ * -# ISO7816_Datablock_ATR
+ * -# ISO7816_SetDataRateandClockFrequency
+ * -# ISO7816_StatusReset
+ * -# ISO7816_cold_reset
+ * -# ISO7816_warm_reset
+ * -# ISO7816_Decode_ATR
+ */
+/**
+ * \file
+ *
+ * Implementation of ISO 7816 functions.
+ *
+ */
+
+/*------------------------------------------------------------------------------
+ * Headers
+ *------------------------------------------------------------------------------*/
+
+#include "board.h"
+
+/*------------------------------------------------------------------------------
+ * Definitions
+ *------------------------------------------------------------------------------*/
+/** Case for APDU commands*/
+#define CASE1 1
+#define CASE2 2
+#define CASE3 3
+
+/** Flip flop for send and receive char */
+#define USART_SEND 0
+#define USART_RCV 1
+
+#if !defined(BOARD_ISO7816_BASE_USART)
+ #define BOARD_ISO7816_BASE_USART USART1
+ #define BOARD_ISO7816_ID_USART ID_USART1
+#endif
+
+/*-----------------------------------------------------------------------------
+ * Internal variables
+ *-----------------------------------------------------------------------------*/
+/** Variable for state of send and receive froom USART */
+static uint8_t StateUsartGlobal = USART_RCV;
+/** Pin reset master card */
+static Pin st_pinIso7816RstMC;
+
+/*----------------------------------------------------------------------------
+ * Internal functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * Get a character from ISO7816
+ * \param pCharToReceive Pointer for store the received char
+ * \return 0: if timeout else status of US_CSR
+ */
+static uint32_t ISO7816_GetChar( uint8_t *pCharToReceive )
+{
+ uint32_t status;
+ uint32_t timeout=0;
+
+ if( StateUsartGlobal == USART_SEND ) {
+ while((BOARD_ISO7816_BASE_USART->US_CSR & US_CSR_TXEMPTY) == 0) {}
+ BOARD_ISO7816_BASE_USART->US_CR = US_CR_RSTSTA | US_CR_RSTIT | US_CR_RSTNACK;
+ StateUsartGlobal = USART_RCV;
+ }
+
+ /* Wait USART ready for reception */
+ while( ((BOARD_ISO7816_BASE_USART->US_CSR & US_CSR_RXRDY) == 0) ) {
+ if(timeout++ > 12000 * (BOARD_MCK/1000000)) {
+ TRACE_DEBUG("TimeOut\n\r");
+ return( 0 );
+ }
+ }
+
+ TRACE_DEBUG("T: %u\n\r", timeout);
+
+
+ /* At least one complete character has been received and US_RHR has not yet been read. */
+
+ /* Get a char */
+ *pCharToReceive = ((BOARD_ISO7816_BASE_USART->US_RHR) & 0xFF);
+
+ status = (BOARD_ISO7816_BASE_USART->US_CSR&(US_CSR_OVRE|US_CSR_FRAME|
+ US_CSR_PARE|US_CSR_TIMEOUT|US_CSR_NACK|
+ (1<<10)));
+
+ if (status != 0 ) {
+ /* TRACE_DEBUG("R:0x%X\n\r", status); */
+ TRACE_DEBUG("R:0x%X\n\r", BOARD_ISO7816_BASE_USART->US_CSR);
+ TRACE_DEBUG("Nb:0x%X\n\r", BOARD_ISO7816_BASE_USART->US_NER );
+ BOARD_ISO7816_BASE_USART->US_CR = US_CR_RSTSTA;
+ }
+
+ /* Return status */
+ return( status );
+}
+
+
+/**
+ * Send a char to ISO7816
+ * \param CharToSend char to be send
+ * \return status of US_CSR
+ */
+static uint32_t ISO7816_SendChar( uint8_t CharToSend )
+{
+ uint32_t status;
+
+ if( StateUsartGlobal == USART_RCV ) {
+ BOARD_ISO7816_BASE_USART->US_CR = US_CR_RSTSTA | US_CR_RSTIT | US_CR_RSTNACK;
+ StateUsartGlobal = USART_SEND;
+ }
+
+ /* Wait USART ready for transmit */
+ while((BOARD_ISO7816_BASE_USART->US_CSR & US_CSR_TXRDY) == 0) {}
+ /* There is no character in the US_THR */
+
+ /* Transmit a char */
+ BOARD_ISO7816_BASE_USART->US_THR = CharToSend;
+
+ status = (BOARD_ISO7816_BASE_USART->US_CSR&(US_CSR_OVRE|US_CSR_FRAME|
+ US_CSR_PARE|US_CSR_TIMEOUT|US_CSR_NACK|
+ (1<<10)));
+
+ if (status != 0 ) {
+ TRACE_DEBUG("E:0x%X\n\r", BOARD_ISO7816_BASE_USART->US_CSR);
+ TRACE_DEBUG("Nb:0x%X\n\r", BOARD_ISO7816_BASE_USART->US_NER );
+ BOARD_ISO7816_BASE_USART->US_CR = US_CR_RSTSTA;
+ }
+
+ /* Return status */
+ return( status );
+}
+
+
+/**
+ * Iso 7816 ICC power on
+ */
+static void ISO7816_IccPowerOn( void )
+{
+ /* Set RESET Master Card */
+ PIO_PinSet(&st_pinIso7816RstMC);
+}
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * Iso 7816 ICC power off
+ */
+void ISO7816_IccPowerOff( void )
+{
+ /* Clear RESET Master Card */
+ PIO_PinClear(&st_pinIso7816RstMC);
+}
+
+/**
+ * Transfert Block TPDU T=0
+ * \param pAPDU APDU buffer
+ * \param pMessage Message buffer
+ * \param wLength Block length
+ * \return Message index
+ */
+uint16_t ISO7816_XfrBlockTPDU_T0(const uint8_t *pAPDU,
+ uint8_t *pMessage,
+ uint16_t wLength )
+{
+ uint16_t NeNc;
+ uint16_t indexApdu = 4;
+ uint16_t indexMessage = 0;
+ uint8_t SW1 = 0;
+ uint8_t procByte;
+ uint8_t cmdCase;
+
+ TRACE_DEBUG("pAPDU[0]=0x%X\n\r",pAPDU[0]);
+ TRACE_DEBUG("pAPDU[1]=0x%X\n\r",pAPDU[1]);
+ TRACE_DEBUG("pAPDU[2]=0x%X\n\r",pAPDU[2]);
+ TRACE_DEBUG("pAPDU[3]=0x%X\n\r",pAPDU[3]);
+ TRACE_DEBUG("pAPDU[4]=0x%X\n\r",pAPDU[4]);
+ TRACE_DEBUG("pAPDU[5]=0x%X\n\r",pAPDU[5]);
+ TRACE_DEBUG("wlength=%d\n\r",wLength);
+
+ ISO7816_SendChar( pAPDU[0] ); /* CLA */
+ ISO7816_SendChar( pAPDU[1] ); /* INS */
+ ISO7816_SendChar( pAPDU[2] ); /* P1 */
+ ISO7816_SendChar( pAPDU[3] ); /* P2 */
+ ISO7816_SendChar( pAPDU[4] ); /* P3 */
+
+ /* Handle the four structures of command APDU */
+ indexApdu = 4;
+
+ if( wLength == 4 ) {
+ cmdCase = CASE1;
+ NeNc = 0;
+ }
+ else if( wLength == 5) {
+ cmdCase = CASE2;
+ NeNc = pAPDU[4]; /* C5 */
+ if (NeNc == 0) {
+ NeNc = 256;
+ }
+ }
+ else if( wLength == 6) {
+ NeNc = pAPDU[4]; /* C5 */
+ cmdCase = CASE3;
+ }
+ else if( wLength == 7) {
+ NeNc = pAPDU[4]; /* C5 */
+ if( NeNc == 0 ) {
+ cmdCase = CASE2;
+ NeNc = (pAPDU[5]<<8)+pAPDU[6];
+ }
+ else {
+ cmdCase = CASE3;
+ }
+ }
+ else {
+ NeNc = pAPDU[4]; /* C5 */
+ if( NeNc == 0 ) {
+ cmdCase = CASE3;
+ NeNc = (pAPDU[5]<<8)+pAPDU[6];
+ }
+ else {
+ cmdCase = CASE3;
+ }
+ }
+
+ TRACE_DEBUG("CASE=0x%X NeNc=0x%X\n\r", cmdCase, NeNc);
+
+ /* Handle Procedure Bytes */
+ do {
+ ISO7816_GetChar(&procByte);
+ /* Handle NULL */
+ if ( procByte == ISO_NULL_VAL ) {
+ TRACE_DEBUG("INS\n\r");
+ continue;
+ }
+ /* Handle SW1 */
+ else if ( ((procByte & 0xF0) ==0x60) || ((procByte & 0xF0) ==0x90) ) {
+ TRACE_DEBUG("SW1\n\r");
+ SW1 = 1;
+ }
+ /* Handle INS */
+ else if ( pAPDU[1] == procByte) {
+ TRACE_DEBUG("HdlINS\n\r");
+ if (cmdCase == CASE2) {
+ /* receive data from card */
+ do {
+ ISO7816_GetChar(&pMessage[indexMessage++]);
+ } while( 0 != --NeNc );
+ }
+ else {
+ /* Send data */
+ do {
+ ISO7816_SendChar(pAPDU[indexApdu++]);
+ } while( 0 != --NeNc );
+ }
+ }
+ /* Handle INS ^ 0xff */
+ else if ( pAPDU[1] == (procByte ^ 0xff)) {
+ TRACE_DEBUG("HdlINS+\n\r");
+ if (cmdCase == CASE2) {
+ /* receive data from card */
+ ISO7816_GetChar(&pMessage[indexMessage++]);
+ }
+ else {
+ ISO7816_SendChar(pAPDU[indexApdu++]);
+ }
+ NeNc--;
+ }
+ else {
+ /* ?? */
+ TRACE_DEBUG("procByte=0x%X\n\r", procByte);
+ break;
+ }
+ } while (NeNc != 0);
+
+ /* Status Bytes */
+ if (SW1 == 0) {
+ ISO7816_GetChar(&pMessage[indexMessage++]); /* SW1 */
+ }
+ else {
+ pMessage[indexMessage++] = procByte;
+ }
+ ISO7816_GetChar(&pMessage[indexMessage++]); /* SW2 */
+
+ return( indexMessage );
+
+}
+
+/**
+ * Escape ISO7816
+ */
+void ISO7816_Escape( void )
+{
+ TRACE_DEBUG("For user, if needed\n\r");
+}
+
+/**
+ * Restart clock ISO7816
+ */
+void ISO7816_RestartClock( void )
+{
+ TRACE_DEBUG("ISO7816_RestartClock\n\r");
+ BOARD_ISO7816_BASE_USART->US_BRGR = 13;
+}
+
+/**
+ * Stop clock ISO7816
+ */
+void ISO7816_StopClock( void )
+{
+ TRACE_DEBUG("ISO7816_StopClock\n\r");
+ BOARD_ISO7816_BASE_USART->US_BRGR = 0;
+}
+
+/**
+ * T0 APDU
+ */
+void ISO7816_toAPDU( void )
+{
+ TRACE_DEBUG("ISO7816_toAPDU\n\r");
+ TRACE_DEBUG("Not supported at this time\n\r");
+}
+
+/**
+ * Answer To Reset (ATR)
+ * \param pAtr ATR buffer
+ * \param pLength Pointer for store the ATR length
+ */
+void ISO7816_Datablock_ATR( uint8_t* pAtr, uint8_t* pLength )
+{
+ uint32_t i;
+ uint32_t j;
+ uint32_t y;
+
+ *pLength = 0;
+
+ /* Read ATR TS */
+ ISO7816_GetChar(&pAtr[0]);
+ /* Read ATR T0 */
+ ISO7816_GetChar(&pAtr[1]);
+ y = pAtr[1] & 0xF0;
+ i = 2;
+
+ /* Read ATR Ti */
+ while (y) {
+
+ if (y & 0x10) { /* TA[i] */
+ ISO7816_GetChar(&pAtr[i++]);
+ }
+ if (y & 0x20) { /* TB[i] */
+ ISO7816_GetChar(&pAtr[i++]);
+ }
+ if (y & 0x40) { /* TC[i] */
+ ISO7816_GetChar(&pAtr[i++]);
+ }
+ if (y & 0x80) { /* TD[i] */
+ ISO7816_GetChar(&pAtr[i]);
+ y = pAtr[i++] & 0xF0;
+ }
+ else {
+ y = 0;
+ }
+ }
+
+ /* Historical Bytes */
+ y = pAtr[1] & 0x0F;
+ for( j=0; j < y; j++ ) {
+ ISO7816_GetChar(&pAtr[i++]);
+ }
+
+ *pLength = i;
+
+}
+
+/**
+ * Set data rate and clock frequency
+ * \param dwClockFrequency ICC clock frequency in KHz.
+ * \param dwDataRate ICC data rate in bpd
+ */
+void ISO7816_SetDataRateandClockFrequency( uint32_t dwClockFrequency, uint32_t dwDataRate )
+{
+ uint8_t ClockFrequency;
+
+ /* Define the baud rate divisor register */
+ /* CD = MCK / SCK */
+ /* SCK = FIDI x BAUD = 372 x 9600 */
+ /* BOARD_MCK */
+ /* CD = MCK/(FIDI x BAUD) = 48000000 / (372x9600) = 13 */
+ BOARD_ISO7816_BASE_USART->US_BRGR = BOARD_MCK / (dwClockFrequency*1000);
+
+ ClockFrequency = BOARD_MCK / BOARD_ISO7816_BASE_USART->US_BRGR;
+
+ BOARD_ISO7816_BASE_USART->US_FIDI = (ClockFrequency)/dwDataRate;
+
+}
+
+/**
+ * Pin status for ISO7816 RESET
+ * \return 1 if the Pin RstMC is high; otherwise 0.
+ */
+uint8_t ISO7816_StatusReset( void )
+{
+ return PIO_PinGet(&st_pinIso7816RstMC);
+}
+
+/**
+ * cold reset
+ */
+void ISO7816_cold_reset( void )
+{
+ volatile uint32_t i;
+
+ /* tb: wait 400 cycles*/
+ for( i=0; i<(120*(BOARD_MCK/1000000)); i++ ) {
+ }
+
+ BOARD_ISO7816_BASE_USART->US_RHR;
+ BOARD_ISO7816_BASE_USART->US_CR = US_CR_RSTSTA | US_CR_RSTIT | US_CR_RSTNACK;
+
+ ISO7816_IccPowerOn();
+}
+
+/**
+ * Warm reset
+ */
+void ISO7816_warm_reset( void )
+{
+ volatile uint32_t i;
+
+ ISO7816_IccPowerOff();
+
+ /* tb: wait 400 cycles */
+ for( i=0; i<(120*(BOARD_MCK/1000000)); i++ ) {
+ }
+
+ BOARD_ISO7816_BASE_USART->US_RHR;
+ BOARD_ISO7816_BASE_USART->US_CR = US_CR_RSTSTA | US_CR_RSTIT | US_CR_RSTNACK;
+
+ ISO7816_IccPowerOn();
+}
+
+/**
+ * Decode ATR trace
+ * \param pAtr pointer on ATR buffer
+ */
+void ISO7816_Decode_ATR( uint8_t* pAtr )
+{
+ uint32_t i;
+ uint32_t j;
+ uint32_t y;
+ uint8_t offset;
+
+ printf("\n\r");
+ printf("ATR: Answer To Reset:\n\r");
+ printf("TS = 0x%X Initial character ",pAtr[0]);
+ if( pAtr[0] == 0x3B ) {
+
+ printf("Direct Convention\n\r");
+ }
+ else {
+ if( pAtr[0] == 0x3F ) {
+
+ printf("Inverse Convention\n\r");
+ }
+ else {
+ printf("BAD Convention\n\r");
+ }
+ }
+
+ printf("T0 = 0x%X Format caracter\n\r",pAtr[1]);
+ printf(" Number of historical bytes: K = %d\n\r", pAtr[1]&0x0F);
+ printf(" Presence further interface byte:\n\r");
+ if( pAtr[1]&0x80 ) {
+ printf("TA ");
+ }
+ if( pAtr[1]&0x40 ) {
+ printf("TB ");
+ }
+ if( pAtr[1]&0x20 ) {
+ printf("TC ");
+ }
+ if( pAtr[1]&0x10 ) {
+ printf("TD ");
+ }
+ if( pAtr[1] != 0 ) {
+ printf(" present\n\r");
+ }
+
+ i = 2;
+ y = pAtr[1] & 0xF0;
+
+ /* Read ATR Ti */
+ offset = 1;
+ while (y) {
+
+ if (y & 0x10) { /* TA[i] */
+ printf("TA[%d] = 0x%X ", offset, pAtr[i]);
+ if( offset == 1 ) {
+ printf("FI = %d ", (pAtr[i]>>8));
+ printf("DI = %d", (pAtr[i]&0x0F));
+ }
+ printf("\n\r");
+ i++;
+ }
+ if (y & 0x20) { /* TB[i] */
+ printf("TB[%d] = 0x%X\n\r", offset, pAtr[i]);
+ i++;
+ }
+ if (y & 0x40) { /* TC[i] */
+ printf("TC[%d] = 0x%X ", offset, pAtr[i]);
+ if( offset == 1 ) {
+ printf("Extra Guard Time: N = %d", pAtr[i]);
+ }
+ printf("\n\r");
+ i++;
+ }
+ if (y & 0x80) { /* TD[i] */
+ printf("TD[%d] = 0x%X\n\r", offset, pAtr[i]);
+ y = pAtr[i++] & 0xF0;
+ }
+ else {
+ y = 0;
+ }
+ offset++;
+ }
+
+ /* Historical Bytes */
+ printf("Historical bytes:\n\r");
+ y = pAtr[1] & 0x0F;
+ for( j=0; j < y; j++ ) {
+
+ printf(" 0x%X", pAtr[i]);
+ if( (pAtr[i] > 0x21) && (pAtr[i] < 0x7D) ) { /* ASCII */
+ printf("(%c) ", pAtr[i]);
+ }
+ i++;
+ }
+ printf("\n\r\n\r");
+
+}
+
+/** Initializes a ISO driver
+ * \param pPinIso7816RstMC Pin ISO 7816 Rst MC
+ */
+void ISO7816_Init( const Pin pPinIso7816RstMC )
+{
+ TRACE_DEBUG("ISO_Init\n\r");
+
+ /* Pin ISO7816 initialize */
+ st_pinIso7816RstMC = pPinIso7816RstMC;
+
+ USART_Configure( BOARD_ISO7816_BASE_USART,
+ US_MR_USART_MODE_IS07816_T_0
+ | US_MR_USCLKS_MCK
+ | US_MR_NBSTOP_1_BIT
+ | US_MR_PAR_EVEN
+ | US_MR_CHRL_8_BIT
+ | US_MR_CLKO
+ | (3<<24), /* MAX_ITERATION */
+ 1,
+ 0);
+
+ /* Configure USART */
+ PMC_EnablePeripheral(BOARD_ISO7816_ID_USART);
+ /* Disable interrupts */
+ BOARD_ISO7816_BASE_USART->US_IDR = (uint32_t) -1;
+
+ BOARD_ISO7816_BASE_USART->US_FIDI = 372; /* by default */
+ /* Define the baud rate divisor register */
+ /* CD = MCK / SCK */
+ /* SCK = FIDI x BAUD = 372 x 9600 */
+ /* BOARD_MCK */
+ /* CD = MCK/(FIDI x BAUD) = 48000000 / (372x9600) = 13 */
+ BOARD_ISO7816_BASE_USART->US_BRGR = BOARD_MCK / (372*9600);
+
+ /* Write the Timeguard Register */
+ BOARD_ISO7816_BASE_USART->US_TTGR = 5;
+
+ USART_SetTransmitterEnabled(BOARD_ISO7816_BASE_USART, 1);
+ USART_SetReceiverEnabled(BOARD_ISO7816_BASE_USART, 1);
+
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/lcd_font.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/lcd_font.c
new file mode 100644
index 0000000..b35edbe
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/lcd_font.c
@@ -0,0 +1,118 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2011, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * Implementation of draw font and string on LCD.
+ *
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "board.h"
+
+#include <stdint.h>
+#include <assert.h>
+
+/*----------------------------------------------------------------------------
+ * Local variables
+ *----------------------------------------------------------------------------*/
+
+/** Global variable describing the font being instancied. */
+const Font gFont = {10, 14};
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Draws an ASCII character on LCD.
+ *
+ * \param dwX X-coordinate of character upper-left corner.
+ * \param dwY Y-coordinate of character upper-left corner.
+ * \param ucChar Character to output.
+ */
+extern void LCD_DrawChar( uint32_t dwX, uint32_t dwY, uint8_t ucChar )
+{
+ uint32_t dwRow, dwCol ;
+
+ assert( (ucChar >= 0x20) && (ucChar <= 0x7F) ) ;
+
+ for ( dwCol = 0 ; dwCol < 10 ; dwCol++ )
+ {
+ for ( dwRow = 0 ; dwRow < 8 ; dwRow++ )
+ {
+ if ( (pCharset10x14[((ucChar - 0x20) * 20) + dwCol * 2] >> (7 - dwRow)) & 0x1 )
+ {
+ LCD_DrawPixel( dwX+dwCol, dwY+dwRow ) ;
+ }
+ }
+
+ for (dwRow = 0; dwRow < 6; dwRow++ )
+ {
+ if ((pCharset10x14[((ucChar - 0x20) * 20) + dwCol * 2 + 1] >> (7 - dwRow)) & 0x1)
+ {
+ LCD_DrawPixel( dwX+dwCol, dwY+dwRow+8 ) ;
+ }
+ }
+ }
+}
+
+/**
+ * \brief Draws a string inside a LCD buffer, at the given coordinates.
+ * Line breaks will be honored.
+ *
+ * \param dwX X-coordinate of string top-left corner.
+ * \param dwY Y-coordinate of string top-left corner.
+ * \param pString String to display.
+ */
+extern void LCD_DrawString( uint32_t dwX, uint32_t dwY, const uint8_t *pString )
+{
+ uint32_t dwXorg = dwX ;
+
+ while ( *pString != 0 )
+ {
+ if ( *pString == '\n' )
+ {
+ dwY += gFont.ucHeight + 2 ;
+ dwX = dwXorg ;
+ }
+ else
+ {
+ LCD_DrawChar( dwX, dwY, *pString ) ;
+ dwX += gFont.ucWidth + 2 ;
+ }
+
+ pString++ ;
+ }
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/lcd_font10x14.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/lcd_font10x14.c
new file mode 100644
index 0000000..a627355
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/lcd_font10x14.c
@@ -0,0 +1,233 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+ /**
+ * \file
+ *
+ * Font 10x14 table definition.
+ *
+ */
+
+#include "board.h"
+
+/** Char set of font 10x14 */
+const uint8_t pCharset10x14[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xCC,
+ 0xFF, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xF0, 0x00, 0xF0, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xF0, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0C, 0xC0, 0x0C, 0xC0, 0xFF, 0xFC, 0xFF, 0xFC, 0x0C, 0xC0,
+ 0x0C, 0xC0, 0xFF, 0xFC, 0xFF, 0xFC, 0x0C, 0xC0, 0x0C, 0xC0,
+ 0x0C, 0x60, 0x1E, 0x70, 0x3F, 0x30, 0x33, 0x30, 0xFF, 0xFC,
+ 0xFF, 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, 0xF0, 0x7C, 0xF8,
+ 0xE0, 0x1C, 0xC0, 0x0C, 0xC0, 0x0C, 0xC0, 0x0C, 0x00, 0x00,
+ 0x03, 0x0C, 0x03, 0x0C, 0x3F, 0xFC, 0x7F, 0xFC, 0xE3, 0x0C,
+ 0xC3, 0x0C, 0xC0, 0x0C, 0xE0, 0x0C, 0x70, 0x0C, 0x30, 0x0C,
+ 0x00, 0x00, 0xC0, 0x0C, 0xC0, 0x0C, 0xC0, 0x0C, 0xE0, 0x1C,
+ 0x7C, 0xF8, 0x3F, 0xF0, 0x07, 0x80, 0x03, 0x00, 0x00, 0x00,
+ 0xC0, 0x00, 0xC0, 0x00, 0xC0, 0x00, 0xC0, 0x00, 0xC0, 0x00,
+ 0xC0, 0x00, 0xC0, 0x00, 0xC0, 0x00, 0xC0, 0x00, 0xC0, 0x00,
+ 0xFF, 0xFC, 0xFF, 0xFC, 0xFF, 0xFC, 0xFF, 0xFC, 0xFF, 0xFC,
+ 0xFF, 0xFC, 0xFF, 0xFC, 0xFF, 0xFC, 0xFF, 0xFC, 0xFF, 0xFC
+} ;
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/lcdd.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/lcdd.c
new file mode 100644
index 0000000..ca41a71
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/lcdd.c
@@ -0,0 +1,140 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * Implementation of LCD driver, Include LCD initialization,
+ * LCD on/off and LCD backlight control.
+ *
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+#include "board.h"
+
+#include <stdint.h>
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Initializes the LCD controller.
+ * Configure SMC to access LCD controller at 64MHz MCK.
+ */
+extern void LCDD_Initialize( void )
+{
+ const Pin pPins[] = {BOARD_LCD_PINS};
+ Smc *pSmc = SMC;
+
+ /* Enable pins */
+ PIO_PinConfigure(pPins, PIO_LISTSIZE(pPins));
+
+ /* Enable peripheral clock */
+ PMC_EnablePeripheral( ID_SMC ) ;
+
+ /* EBI SMC Configuration */
+ pSmc->SMC_CS_NUMBER[1].SMC_SETUP = SMC_SETUP_NWE_SETUP(2)
+ | SMC_SETUP_NCS_WR_SETUP(2)
+ | SMC_SETUP_NRD_SETUP(2)
+ | SMC_SETUP_NCS_RD_SETUP(2);
+
+ pSmc->SMC_CS_NUMBER[1].SMC_PULSE = SMC_PULSE_NWE_PULSE(4)
+ | SMC_PULSE_NCS_WR_PULSE(4)
+ | SMC_PULSE_NRD_PULSE(10)
+ | SMC_PULSE_NCS_RD_PULSE(10);
+
+ pSmc->SMC_CS_NUMBER[1].SMC_CYCLE = SMC_CYCLE_NWE_CYCLE(10)
+ | SMC_CYCLE_NRD_CYCLE(22);
+
+ pSmc->SMC_CS_NUMBER[1].SMC_MODE = SMC_MODE_READ_MODE
+ | SMC_MODE_WRITE_MODE
+ | SMC_MODE_DBW_BIT_8;
+
+ /* Initialize LCD controller */
+ LCD_Initialize() ;
+
+ /* Initialize LCD controller */
+ LCD_SetDisplayPortrait( 0 ) ;
+
+ /* Set LCD backlight */
+ LCDD_SetBacklight( 2 ) ;
+}
+
+/**
+ * \brief Turn on the LCD.
+ */
+void LCDD_On(void)
+{
+ LCD_On();
+}
+
+/**
+ * \brief Turn off the LCD.
+ */
+void LCDD_Off(void)
+{
+ LCD_Off();
+}
+
+/**
+ * \brief Set the backlight of the LCD.
+ *
+ * \param level Backlight brightness level [1..16], 1 means maximum brightness.
+ */
+void LCDD_SetBacklight (uint32_t level)
+{
+ uint32_t i;
+ const Pin pPins[] = {BOARD_BACKLIGHT_PIN};
+
+ /* Ensure valid level */
+ level = (level < 1) ? 1 : level;
+ level = (level > 16) ? 16 : level;
+
+ /* Enable pins */
+ PIO_PinConfigure(pPins, PIO_LISTSIZE(pPins));
+
+ /* Switch off backlight */
+ PIO_PinClear(pPins);
+ i = 600 * (BOARD_MCK / 1000000); /* wait for at least 500us */
+ while(i--);
+
+ /* Set new backlight level */
+ for (i = 0; i < level; i++) {
+ PIO_PinClear(pPins);
+ PIO_PinClear(pPins);
+ PIO_PinClear(pPins);
+
+ PIO_PinSet(pPins);
+ PIO_PinSet(pPins);
+ PIO_PinSet(pPins);
+ }
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/led.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/led.c
new file mode 100644
index 0000000..6c3ebab
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/led.c
@@ -0,0 +1,168 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ */
+
+/*------------------------------------------------------------------------------
+ * Headers
+ *------------------------------------------------------------------------------*/
+
+#include "board.h"
+
+/*------------------------------------------------------------------------------
+ * Local Variables
+ *------------------------------------------------------------------------------*/
+
+#ifdef PINS_LEDS
+static const Pin pinsLeds[] = { PINS_LEDS } ;
+static const uint32_t numLeds = PIO_LISTSIZE( pinsLeds ) ;
+#endif
+
+/*------------------------------------------------------------------------------
+ * Global Functions
+ *------------------------------------------------------------------------------*/
+
+/**
+ * Configures the pin associated with the given LED number. If the LED does
+ * not exist on the board, the function does nothing.
+ * \param led Number of the LED to configure.
+ * \return 1 if the LED exists and has been configured; otherwise 0.
+ */
+extern uint32_t LED_Configure( uint32_t dwLed )
+{
+#ifdef PINS_LEDS
+ // Check that LED exists
+ if ( dwLed >= numLeds)
+ {
+
+ return 0;
+ }
+
+ // Configure LED
+ return ( PIO_PinConfigure( &pinsLeds[dwLed], 1 ) ) ;
+#else
+ return 0 ;
+#endif
+}
+
+/**
+ * Turns the given LED on if it exists; otherwise does nothing.
+ * \param led Number of the LED to turn on.
+ * \return 1 if the LED has been turned on; 0 otherwise.
+ */
+extern uint32_t LED_Set( uint32_t dwLed )
+{
+#ifdef PINS_LEDS
+ /* Check if LED exists */
+ if ( dwLed >= numLeds )
+ {
+ return 0 ;
+ }
+
+ /* Turn LED on */
+ if ( pinsLeds[dwLed].type == PIO_OUTPUT_0 )
+ {
+
+ PIO_PinSet( &pinsLeds[dwLed] ) ;
+ }
+ else
+ {
+ PIO_PinClear( &pinsLeds[dwLed] ) ;
+ }
+
+ return 1 ;
+#else
+ return 0 ;
+#endif
+}
+
+/**
+ * Turns a LED off.
+ *
+ * \param led Number of the LED to turn off.
+ * \return 1 if the LED has been turned off; 0 otherwise.
+ */
+extern uint32_t LED_Clear( uint32_t dwLed )
+{
+#ifdef PINS_LEDS
+ /* Check if LED exists */
+ if ( dwLed >= numLeds )
+ {
+ return 0 ;
+ }
+
+ /* Turn LED off */
+ if ( pinsLeds[dwLed].type == PIO_OUTPUT_0 )
+ {
+ PIO_PinClear( &pinsLeds[dwLed] ) ;
+ }
+ else
+ {
+ PIO_PinSet( &pinsLeds[dwLed] ) ;
+ }
+
+ return 1 ;
+#else
+ return 0 ;
+#endif
+}
+
+/**
+ * Toggles the current state of a LED.
+ *
+ * \param led Number of the LED to toggle.
+ * \return 1 if the LED has been toggled; otherwise 0.
+ */
+extern uint32_t LED_Toggle( uint32_t dwLed )
+{
+#ifdef PINS_LEDS
+ /* Check if LED exists */
+ if ( dwLed >= numLeds )
+ {
+ return 0 ;
+ }
+
+ /* Toggle LED */
+ if ( PIO_PinGetOutputDataStatus( &pinsLeds[dwLed] ) )
+ {
+ PIO_PinClear( &pinsLeds[dwLed] ) ;
+ }
+ else
+ {
+ PIO_PinSet( &pinsLeds[dwLed] ) ;
+ }
+
+ return 1 ;
+#else
+ return 0 ;
+#endif
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/macb.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/macb.c
new file mode 100644
index 0000000..2d501cc
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/macb.c
@@ -0,0 +1,635 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/** \file */
+
+/*---------------------------------------------------------------------------
+ * Headers
+ *---------------------------------------------------------------------------*/
+
+#include <board.h>
+
+/*---------------------------------------------------------------------------
+ * Definitions
+ *---------------------------------------------------------------------------*/
+
+/** Default max retry count */
+#define MACB_RETRY_MAX 1000000
+
+/*---------------------------------------------------------------------------
+ * Local functions
+ *---------------------------------------------------------------------------*/
+
+/**
+ * Wait PHY operation complete.
+ * Return 1 if the operation completed successfully.
+ * May be need to re-implemented to reduce CPU load.
+ * \param retry: the retry times, 0 to wait forever until complete.
+ */
+static uint8_t _MACB_WaitPhy( Emac *pHw, uint32_t retry )
+{
+ volatile uint32_t retry_count = 0;
+
+ while (!EMAC_IsIdle(pHw))
+ {
+ if(retry == 0) continue;
+ retry_count ++;
+ if (retry_count >= retry)
+ {
+ return 0;
+ }
+ }
+ return 1;
+}
+
+/**
+ * Read PHY register.
+ * Return 1 if successfully, 0 if timeout.
+ * \param pHw HW controller address
+ * \param PhyAddress PHY Address
+ * \param Address Register Address
+ * \param pValue Pointer to a 32 bit location to store read data
+ * \param retry The retry times, 0 to wait forever until complete.
+ */
+static uint8_t _MACB_ReadPhy(Emac *pHw,
+ uint8_t PhyAddress,
+ uint8_t Address,
+ uint32_t *pValue,
+ uint32_t retry)
+{
+ EMAC_PHYMaintain(pHw, PhyAddress, Address, 1, 0);
+ if ( _MACB_WaitPhy(pHw, retry) == 0 )
+ {
+ TRACE_ERROR("TimeOut _MACB_ReadPhy\n\r");
+ return 0;
+ }
+ *pValue = EMAC_PHYData(pHw);
+ return 1;
+}
+
+/**
+ * Write PHY register
+ * Return 1 if successfully, 0 if timeout.
+ * \param pHw HW controller address
+ * \param PhyAddress PHY Address
+ * \param Address Register Address
+ * \param Value Data to write ( Actually 16 bit data )
+ * \param retry The retry times, 0 to wait forever until complete.
+ */
+static uint8_t _MACB_WritePhy(Emac *pHw,
+ uint8_t PhyAddress,
+ uint8_t Address,
+ uint32_t Value,
+ uint32_t retry)
+{
+ EMAC_PHYMaintain(pHw, PhyAddress, Address, 0, Value);
+ if ( _MACB_WaitPhy(pHw, retry) == 0 )
+ {
+ TRACE_ERROR("TimeOut _MACB_WritePhy\n\r");
+ return 0;
+ }
+ return 1;
+}
+
+/*---------------------------------------------------------------------------
+ * Exported functions
+ *---------------------------------------------------------------------------*/
+
+/**
+ * Find a valid PHY Address ( from addrStart to 31 ).
+ * Check BMSR register ( not 0 nor 0xFFFF )
+ * Return 0xFF when no valid PHY Address found.
+ * \param pMacb Pointer to the MACB instance
+ */
+uint8_t MACB_FindValidPhy(Macb *pMacb, uint8_t addrStart)
+{
+ sEmacd *pDrv = pMacb->pEmacd;
+ Emac *pHw = pDrv->pHw;
+
+ uint32_t retryMax;
+ uint32_t value=0;
+ uint8_t rc;
+ uint8_t phyAddress;
+ uint8_t cnt;
+
+ TRACE_DEBUG("MACB_FindValidPhy\n\r");
+
+ EMAC_ManagementEnable(pHw, 1);
+
+ phyAddress = pMacb->phyAddress;
+ retryMax = pMacb->retryMax;
+
+ /* Check current phyAddress */
+ rc = phyAddress;
+ if( _MACB_ReadPhy(pHw, phyAddress, MII_PHYID1, &value, retryMax) == 0 )
+ {
+ TRACE_ERROR("MACB PROBLEM\n\r");
+ }
+ TRACE_DEBUG("_PHYID1 : 0x%X, addr: %d\n\r", value, phyAddress);
+
+ /* Find another one */
+ if (value != MII_OUI_MSB)
+ {
+ rc = 0xFF;
+ for(cnt = addrStart; cnt < 32; cnt ++)
+ {
+ phyAddress = (phyAddress + 1) & 0x1F;
+ if( _MACB_ReadPhy(pHw, phyAddress, MII_PHYID1, &value, retryMax) == 0 )
+ {
+ TRACE_ERROR("MACB PROBLEM\n\r");
+ }
+ TRACE_DEBUG("_PHYID1 : 0x%X, addr: %d\n\r", value, phyAddress);
+ if (value == MII_OUI_MSB)
+ {
+ rc = phyAddress;
+ break;
+ }
+ }
+ }
+
+ EMAC_ManagementEnable(pHw, 0);
+
+ if (rc != 0xFF)
+ {
+
+ TRACE_INFO("** Valid PHY Found: %d\n\r", rc);
+ _MACB_ReadPhy(pHw, phyAddress, MII_DSCSR, &value, retryMax);
+ TRACE_DEBUG("_DSCSR : 0x%X, addr: %d\n\r", value, phyAddress);
+
+ }
+ return rc;
+}
+
+/**
+ * Dump all the useful registers
+ * \param pMacb Pointer to the MACB instance
+ */
+void MACB_DumpRegisters(Macb *pMacb)
+{
+ sEmacd *pDrv = pMacb->pEmacd;
+ Emac *pHw = pDrv->pHw;
+
+ uint8_t phyAddress;
+ uint32_t retryMax;
+ uint32_t value;
+
+ TRACE_INFO("MACB_DumpRegisters\n\r");
+
+ EMAC_ManagementEnable(pHw, 1);
+
+ phyAddress = pMacb->phyAddress;
+ retryMax = pMacb->retryMax;
+
+ TRACE_INFO("%cMII MACB (@%d) Registers:\n\r",
+ pMacb->RMII ? 'R' : ' ',
+ phyAddress);
+
+ _MACB_ReadPhy(pHw, phyAddress, MII_BMCR, &value, retryMax);
+ TRACE_INFO(" _BMCR : 0x%X\n\r", value);
+ _MACB_ReadPhy(pHw, phyAddress, MII_BMSR, &value, retryMax);
+ TRACE_INFO(" _BMSR : 0x%X\n\r", value);
+ _MACB_ReadPhy(pHw, phyAddress, MII_ANAR, &value, retryMax);
+ TRACE_INFO(" _ANAR : 0x%X\n\r", value);
+ _MACB_ReadPhy(pHw, phyAddress, MII_ANLPAR, &value, retryMax);
+ TRACE_INFO(" _ANLPAR : 0x%X\n\r", value);
+ _MACB_ReadPhy(pHw, phyAddress, MII_ANER, &value, retryMax);
+ TRACE_INFO(" _ANER : 0x%X\n\r", value);
+ _MACB_ReadPhy(pHw, phyAddress, MII_DSCR, &value, retryMax);
+ TRACE_INFO(" _DSCR : 0x%X\n\r", value);
+ _MACB_ReadPhy(pHw, phyAddress, MII_DSCSR, &value, retryMax);
+ TRACE_INFO(" _DSCSR : 0x%X\n\r", value);
+ _MACB_ReadPhy(pHw, phyAddress, MII_10BTCSR, &value, retryMax);
+ TRACE_INFO(" _10BTCSR: 0x%X\n\r", value);
+ _MACB_ReadPhy(pHw, phyAddress, MII_PWDOR, &value, retryMax);
+ TRACE_INFO(" _PWDOR : 0x%X\n\r", value);
+ _MACB_ReadPhy(pHw, phyAddress, MII_CONFIGR, &value, retryMax);
+ TRACE_INFO(" _CONFIGR: 0x%X\n\r", value);
+ _MACB_ReadPhy(pHw, phyAddress, MII_MDINTR, &value, retryMax);
+ TRACE_INFO(" _MDINTR : 0x%X\n\r", value);
+ _MACB_ReadPhy(pHw, phyAddress, MII_RECR, &value, retryMax);
+ TRACE_INFO(" _RECR : 0x%X\n\r", value);
+ _MACB_ReadPhy(pHw, phyAddress, MII_DISCR, &value, retryMax);
+ TRACE_INFO(" _DISCR : 0x%X\n\r", value);
+ _MACB_ReadPhy(pHw, phyAddress, MII_RLSR, &value, retryMax);
+ TRACE_INFO(" _RLSR : 0x%X\n\r", value);
+
+ EMAC_ManagementEnable(pHw, 0);
+}
+
+/**
+ * Setup the maximum timeout count of the driver.
+ * \param pMacb Pointer to the MACB instance
+ * \param toMax Timeout maxmum count.
+ */
+void MACB_SetupTimeout(Macb *pMacb, uint32_t toMax)
+{
+ pMacb->retryMax = toMax;
+}
+
+/**
+ * Initialize the MACB instance
+ * \param pMacb Pointer to the MACB instance
+ * \param pEmac Pointer to the Emac instance for the MACB
+ * \param phyAddress The PHY address used to access the PHY
+ * ( pre-defined by pin status on PHY reset )
+ */
+void MACB_Init(Macb *pMacb, sEmacd *pEmacd, uint8_t phyAddress)
+{
+ pMacb->pEmacd = pEmacd;
+ pMacb->phyAddress = phyAddress;
+ /* Initialize timeout by default */
+ pMacb->retryMax = MACB_RETRY_MAX;
+}
+
+/**
+ * Issue a SW reset to reset all registers of the PHY
+ * Return 1 if successfully, 0 if timeout.
+ * \param pMacb Pointer to the MACB instance
+ */
+uint8_t MACB_ResetPhy(Macb *pMacb)
+{
+ sEmacd *pDrv = pMacb->pEmacd;
+ Emac *pHw = pDrv->pHw;
+
+ uint32_t retryMax;
+ uint32_t bmcr = MII_RESET;
+ uint8_t phyAddress;
+ uint32_t timeout = 10;
+ uint8_t ret = 1;
+
+ TRACE_INFO(" MACB_ResetPhy\n\r");
+
+ phyAddress = pMacb->phyAddress;
+ retryMax = pMacb->retryMax;
+
+ EMAC_ManagementEnable(pHw, 1);
+
+ bmcr = MII_RESET;
+ _MACB_WritePhy(pHw, phyAddress, MII_BMCR, bmcr, retryMax);
+
+ do
+ {
+ _MACB_ReadPhy(pHw, phyAddress, MII_BMCR, &bmcr, retryMax);
+ timeout--;
+ } while ((bmcr & MII_RESET) && timeout);
+
+ EMAC_ManagementEnable(pHw, 0);
+
+ if (!timeout)
+ {
+ ret = 0;
+ }
+
+ return( ret );
+}
+
+/**
+ * Do a HW initialize to the PHY ( via RSTC ) and setup clocks & PIOs
+ * This should be called only once to initialize the PHY pre-settings.
+ * The PHY address is reset status of CRS,RXD[3:0] (the emacPins' pullups).
+ * The COL pin is used to select MII mode on reset (pulled up for Reduced MII)
+ * The RXDV pin is used to select test mode on reset (pulled up for test mode)
+ * The above pins should be predefined for corresponding settings in resetPins
+ * The EMAC peripheral pins are configured after the reset done.
+ * Return 1 if RESET OK, 0 if timeout.
+ * \param pMacb Pointer to the MACB instance
+ * \param mck Main clock setting to initialize clock
+ * \param resetPins Pointer to list of PIOs to configure before HW RESET
+ * (for PHY power on reset configuration latch)
+ * \param nbResetPins Number of PIO items that should be configured
+ * \param emacPins Pointer to list of PIOs for the EMAC interface
+ * \param nbEmacPins Number of PIO items that should be configured
+ */
+
+uint8_t MACB_InitPhy(Macb *pMacb,
+ uint32_t mck,
+ const Pin *pEmacPins,
+ uint32_t nbEmacPins)
+{
+ sEmacd *pDrv = pMacb->pEmacd;
+ Emac *pHw = pDrv->pHw;
+
+ uint8_t rc = 1;
+ uint8_t phy;
+
+ /* Perform RESET */
+ TRACE_DEBUG("RESET PHY\n\r");
+
+ /* Configure EMAC runtime pins */
+ if (rc)
+ {
+ PIO_PinConfigure(pEmacPins, nbEmacPins);
+ rc = EMAC_SetClock( pHw, mck );
+ if (!rc)
+ {
+ TRACE_ERROR("No Valid MDC clock\n\r");
+ return 0;
+ }
+
+ /* Check PHY Address */
+ phy = MACB_FindValidPhy(pMacb, 0);
+ if (phy == 0xFF)
+ {
+ TRACE_ERROR("PHY Access fail\n\r");
+ return 0;
+ }
+ if(phy != pMacb->phyAddress)
+ {
+ pMacb->phyAddress = phy;
+ MACB_ResetPhy(pMacb);
+ }
+
+ }
+ else
+ {
+ TRACE_ERROR("PHY Reset Timeout\n\r");
+ }
+
+ return rc;
+}
+
+/**
+ * Issue a Auto Negotiation of the PHY
+ * Return 1 if successfully, 0 if timeout.
+ * \param pMacb Pointer to the MACB instance
+ */
+uint8_t MACB_AutoNegotiate(Macb *pMacb, uint8_t rmiiMode)
+{
+ sEmacd *pDrv = pMacb->pEmacd;
+ Emac *pHw = pDrv->pHw;
+
+ uint32_t retryMax;
+ uint32_t value;
+ uint32_t phyAnar;
+ uint32_t phyAnalpar;
+ uint32_t retryCount= 0;
+ uint8_t phyAddress;
+ uint8_t bFD = 0;
+ uint8_t bSP = 0;
+ uint8_t rc = 1;
+
+ pMacb->RMII = rmiiMode;
+
+ phyAddress = pMacb->phyAddress;
+ retryMax = pMacb->retryMax;
+
+ EMAC_ManagementEnable(pHw, 1);
+
+ if (!_MACB_ReadPhy(pHw, phyAddress, MII_PHYID1, &value, retryMax))
+ {
+ TRACE_ERROR("Pb _MACB_ReadPhy Id1\n\r");
+ rc = 0;
+ goto AutoNegotiateExit;
+ }
+ TRACE_DEBUG("ReadPhy Id1 0x%X, addresse: %d\n\r", value, phyAddress);
+ if (!_MACB_ReadPhy(pHw, phyAddress, MII_PHYID2, &phyAnar, retryMax))
+ {
+ TRACE_ERROR("Pb _MACB_ReadPhy Id2\n\r");
+ rc = 0;
+ goto AutoNegotiateExit;
+ }
+ TRACE_DEBUG("ReadPhy Id2 0x%X\n\r", phyAnar);
+
+ if( ( value == MII_OUI_MSB )
+ && ( ((phyAnar>>10)&MII_LSB_MASK) == MII_OUI_LSB ) )
+ {
+ TRACE_DEBUG("Vendor Number Model = 0x%X\n\r", ((phyAnar>>4)&0x3F));
+ TRACE_DEBUG("Model Revision Number = 0x%X\n\r", (phyAnar&0x7));
+ }
+ else
+ {
+ TRACE_ERROR("Problem OUI value\n\r");
+ }
+
+ /* Setup control register */
+ rc = _MACB_ReadPhy(pHw, phyAddress, MII_BMCR, &value, retryMax);
+ if (rc == 0)
+ {
+ goto AutoNegotiateExit;
+ }
+
+ value &= ~MII_AUTONEG; /* Remove autonegotiation enable */
+ value &= ~(MII_LOOPBACK|MII_POWER_DOWN);
+ value |= MII_ISOLATE; /* Electrically isolate PHY */
+ rc = _MACB_WritePhy(pHw, phyAddress, MII_BMCR, value, retryMax);
+ if (rc == 0)
+ {
+ goto AutoNegotiateExit;
+ }
+
+ /* Set the Auto_negotiation Advertisement Register
+ MII advertising for Next page
+ 100BaseTxFD and HD, 10BaseTFD and HD, IEEE 802.3 */
+ phyAnar = MII_TX_FDX | MII_TX_HDX |
+ MII_10_FDX | MII_10_HDX | MII_AN_IEEE_802_3;
+ rc = _MACB_WritePhy(pHw, phyAddress, MII_ANAR, phyAnar, retryMax);
+ if (rc == 0)
+ {
+ goto AutoNegotiateExit;
+ }
+
+ /* Read & modify control register */
+ rc = _MACB_ReadPhy(pHw, phyAddress, MII_BMCR, &value, retryMax);
+ if (rc == 0)
+ {
+ goto AutoNegotiateExit;
+ }
+
+ value |= MII_SPEED_SELECT | MII_AUTONEG | MII_DUPLEX_MODE;
+ rc = _MACB_WritePhy(pHw, phyAddress, MII_BMCR, value, retryMax);
+ if (rc == 0)
+ {
+ goto AutoNegotiateExit;
+ }
+
+ /* Restart Auto_negotiation */
+ value |= MII_RESTART_AUTONEG;
+ value &= ~MII_ISOLATE;
+ rc = _MACB_WritePhy(pHw, phyAddress, MII_BMCR, value, retryMax);
+ if (rc == 0)
+ {
+ goto AutoNegotiateExit;
+ }
+ TRACE_DEBUG(" _BMCR: 0x%X\n\r", value);
+
+ /* Check AutoNegotiate complete */
+ while (1)
+ {
+ rc = _MACB_ReadPhy(pHw, phyAddress, MII_BMSR, &value, retryMax);
+ if (rc == 0)
+ {
+ TRACE_ERROR("_BMSR Rd err\n\r");
+ goto AutoNegotiateExit;
+ }
+ /* Done successfully */
+ if (value & MII_AUTONEG_COMP)
+ {
+ TRACE_INFO("AutoNegotiate complete\n\r");
+ break;
+ }
+
+ /* Timeout check */
+ if (retryMax)
+ {
+ if (++ retryCount >= retryMax)
+ {
+ MACB_DumpRegisters(pMacb);
+ TRACE_ERROR("TimeOut\n\r");
+ rc = 0;
+ goto AutoNegotiateExit;
+ }
+ }
+ }
+
+ /* Get the AutoNeg Link partner base page */
+ rc = _MACB_ReadPhy(pHw, phyAddress, MII_ANLPAR, &phyAnalpar, retryMax);
+ if (rc == 0)
+ {
+ goto AutoNegotiateExit;
+ }
+
+ /* Setup the EMAC link speed */
+ if ((phyAnar & phyAnalpar) & MII_TX_FDX)
+ {
+ /* set MII for 100BaseTX and Full Duplex */
+ bSP = 1; bFD = 1;
+ }
+ else if ((phyAnar & phyAnalpar) & MII_10_FDX)
+ {
+ /* set MII for 10BaseT and Full Duplex */
+ bSP = 0; bFD = 1;
+ }
+ else if ((phyAnar & phyAnalpar) & MII_TX_HDX)
+ {
+ /* set MII for 100BaseTX and half Duplex */
+ bSP = 1; bFD = 0;
+ }
+ else if ((phyAnar & phyAnalpar) & MII_10_HDX)
+ {
+ /* set MII for 10BaseT and half Duplex */
+ bSP = 0; bFD = 0;
+ }
+ EMAC_SetSpeed(pHw, bSP);
+ EMAC_FullDuplexEnable(pHw, bFD);
+
+ EMAC_RMIIEnable(pHw, rmiiMode);
+ EMAC_TransceiverClockEnable(pHw, 1);
+
+AutoNegotiateExit:
+ EMAC_ManagementEnable(pHw, 0);
+ return rc;
+}
+
+/**
+ * Get the Link & speed settings, and automatically setup the EMAC with the
+ * settings.
+ * Return 1 if link found, 0 if no ethernet link.
+ * \param pMacb Pointer to the MACB instance
+ * \param applySetting Apply the settings to EMAC interface
+ */
+uint8_t MACB_GetLinkSpeed(Macb *pMacb, uint8_t applySetting)
+{
+ sEmacd *pDrv = pMacb->pEmacd;
+ Emac *pHw = pDrv->pHw;
+
+ uint32_t retryMax;
+ uint32_t stat1;
+ uint32_t stat2;
+ uint8_t phyAddress, bSP, bFD;
+ uint8_t rc = 1;
+
+ TRACE_DEBUG("MACB_GetLinkSpeed\n\r");
+
+ EMAC_ManagementEnable(pHw, 1);
+
+ phyAddress = pMacb->phyAddress;
+ retryMax = pMacb->retryMax;
+
+ rc = _MACB_ReadPhy(pHw, phyAddress, MII_BMSR, &stat1, retryMax);
+ if (rc == 0)
+ {
+ goto GetLinkSpeedExit;
+ }
+
+ if ((stat1 & MII_LINK_STATUS) == 0)
+ {
+ TRACE_ERROR("Pb: LinkStat: 0x%x\n\r", stat1);
+
+ rc = 0;
+ goto GetLinkSpeedExit;
+ }
+
+ if (applySetting == 0)
+ {
+ TRACE_WARNING("Speed #%d not applied\n\r", applySetting);
+ goto GetLinkSpeedExit;
+ }
+
+ /* Re-configure Link speed */
+ rc = _MACB_ReadPhy(pHw, phyAddress, MII_DSCSR, &stat2, retryMax);
+ if (rc == 0)
+ {
+ TRACE_ERROR("Pb _DSCSR: rc 0x%x\n\r", rc);
+ goto GetLinkSpeedExit;
+ }
+
+ if ((stat1 & MII_100BASE_TX_FD) && (stat2 & MII_100FDX))
+ {
+ /* set Emac for 100BaseTX and Full Duplex */
+ bSP = 1; bFD = 1;
+ }
+
+ if ((stat1 & MII_10BASE_T_FD) && (stat2 & MII_10FDX))
+ {
+ /* set MII for 10BaseT and Full Duplex */
+ bSP= 0; bFD = 1;
+ }
+
+ if ((stat1 & MII_100BASE_T4_HD) && (stat2 & MII_100HDX))
+ {
+ /* set MII for 100BaseTX and Half Duplex */
+ bSP = 1; bFD = 0;
+ }
+
+ if ((stat1 & MII_10BASE_T_HD) && (stat2 & MII_10HDX))
+ {
+ /* set MII for 10BaseT and Half Duplex */
+ bSP = 0; bFD = 0;
+ }
+ EMAC_SetSpeed(pHw, bSP);
+ EMAC_FullDuplexEnable(pHw, bFD);
+
+ /* Start the EMAC transfers */
+ TRACE_DEBUG("MACB_GetLinkSpeed passed\n\r");
+
+GetLinkSpeedExit:
+ EMAC_ManagementEnable(pHw, 0);
+ return rc;
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/math.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/math.c
new file mode 100644
index 0000000..7b83872
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/math.c
@@ -0,0 +1,101 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+ * \file
+ *
+ * Implementation of the general math functions.
+ *
+ */
+
+/*------------------------------------------------------------------------------
+ * Headers
+ *------------------------------------------------------------------------------*/
+
+#include "board.h"
+
+/*------------------------------------------------------------------------------
+ * Exported functions
+ *------------------------------------------------------------------------------*/
+
+/**
+ * Returns the minimum value between two integers.
+ *
+ * \param a First integer to compare.
+ * \param b Second integer to compare.
+ */
+extern uint32_t min( uint32_t dwA, uint32_t dwB )
+{
+ if ( dwA < dwB )
+ {
+ return dwA ;
+ }
+ else
+ {
+ return dwB ;
+ }
+}
+
+/*------------------------------------------------------------------------------
+ * Returns the absolute value of an integer.
+ *
+ * \param value Integer value.
+ *
+ * \note Do not call this function "abs", problem with gcc !
+ */
+extern uint32_t absv( int32_t lValue )
+{
+ if ( lValue < 0 )
+ {
+ return -lValue ;
+ }
+ else
+ {
+ return lValue ;
+ }
+}
+
+/*------------------------------------------------------------------------------
+ * Computes and returns x power of y.
+ *
+ * \param x Value.
+ * \param y Power.
+ */
+extern uint32_t power( uint32_t dwX, uint32_t dwY )
+{
+ uint32_t dwResult = 1 ;
+
+ while ( dwY > 0 )
+ {
+ dwResult *= dwX ;
+ dwY-- ;
+ }
+
+ return dwResult ;
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/rand.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/rand.c
new file mode 100644
index 0000000..620ec7f
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/rand.c
@@ -0,0 +1,67 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+ * \file
+ *
+ * Implementation of the rand generator.
+ *
+ */
+
+#include "board.h"
+
+/*------------------------------------------------------------------------------
+ * Global Variables
+ *------------------------------------------------------------------------------*/
+
+static uint32_t _dwRandNext=1 ;
+
+/*------------------------------------------------------------------------------
+ * Exported Functions
+ *------------------------------------------------------------------------------*/
+
+/**
+ * Initialize the seed for rand generator.
+ *
+ * \param seed rand initiation seed
+ */
+extern void srand( uint32_t dwSeed )
+{
+ _dwRandNext = dwSeed ;
+}
+
+/**
+ * Return a random number, maxinum assumed to be 65536
+ */
+extern int rand( void )
+{
+ _dwRandNext = _dwRandNext * 1103515245 + 12345 ;
+
+ return (uint32_t)(_dwRandNext/131072) % 65536 ;
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/retarget.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/retarget.c
new file mode 100644
index 0000000..311ce0d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/retarget.c
@@ -0,0 +1,88 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ *\file
+ *
+ * This file Configures the target-dependent low level functions for character I/O.
+ */
+
+#include "board.h"
+#include <stdio.h>
+
+/* Disable semihosting */
+#pragma import(__use_no_semihosting_swi)
+
+struct __FILE { int handle;} ;
+FILE __stdout;
+FILE __stderr;
+
+/*------------------------------------------------------------------------------
+ * Outputs a character.
+ *------------------------------------------------------------------------------*/
+int fputc(int ch, FILE *f)
+{
+ if ((f == stdout) || (f == stderr))
+ {
+ UART_PutChar( ch ) ;
+ return ch ;
+ }
+ else
+ {
+ return EOF ;
+ }
+}
+
+/*------------------------------------------------------------------------------
+ * Returns the error status accumulated during file I/O.
+ *------------------------------------------------------------------------------*/
+int ferror( FILE *f )
+{
+ return EOF ;
+}
+
+
+void _ttywrch( int ch )
+{
+ UART_PutChar( (uint8_t)ch ) ;
+}
+
+void _sys_exit(int return_code)
+{
+ while ( 1 ) ; /* endless loop */
+}
+
+/*------------------------------------------------------------------------------
+ * Low level functions I/O for assert().
+ *------------------------------------------------------------------------------*/
+void __assert_puts(const char *str)
+{
+ printf("%s", str);
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/sn65hvd234.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/sn65hvd234.c
new file mode 100644
index 0000000..f5eb3b4
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/sn65hvd234.c
@@ -0,0 +1,155 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+ * \file
+ *
+ * Implementation of the SN65HVD234 drivers.
+ *
+ */
+
+#include "board.h"
+
+/**
+ * \brief Initialize SN65HVD234 component data
+ *
+ * \param pComponent pointer on SSN65HVD234_Data
+ *
+ * \return 0 if OK
+ */
+extern uint32_t SN65HVD234_Init( SSN65HVD234_Data* pComponent )
+{
+ pComponent->pPIO_Rs=NULL ;
+ pComponent->dwPin_Rs=0u ;
+
+ pComponent->pPIO_EN=NULL ;
+ pComponent->dwPin_EN=0u ;
+
+ return 0u ;
+}
+
+/**
+ * \brief Initialize Rs pin of transceiver
+ *
+ * \param pComponent pointer on SSN65HVD234_Data
+ * \param pPIO_Rs pointer on PIOx base for transceiver Rs pin
+ * \param dwPin_Rs PIO pin index for transceiver Rs pin
+ *
+ * \return 0 if OK
+ */
+extern uint32_t SN65HVD234_SetRs( SSN65HVD234_Data* pComponent, Pio* pPIO_Rs, uint32_t dwPin_Rs )
+{
+ pComponent->pPIO_Rs=pPIO_Rs ;
+ pComponent->dwPin_Rs=dwPin_Rs ;
+
+ PIO_SetOutput( pPIO_Rs, dwPin_Rs, PIO_PULLUP|PIO_OUTPUT_LOW ) ;
+
+ return 0u ;
+}
+
+/**
+ * \brief Initialize EN pin of transceiver
+ *
+ * \param pComponent pointer on SSN65HVD234_Data
+ * \param pPIO_EN pointer on PIOx base for transceiver EN pin
+ * \param dwPin_EN PIO pin index for transceiver EN pin
+ *
+ * \return 0 if OK
+ */
+extern uint32_t SN65HVD234_SetEN( SSN65HVD234_Data* pComponent, Pio* pPIO_EN, uint32_t dwPin_EN )
+{
+ pComponent->pPIO_EN=pPIO_EN ;
+ pComponent->dwPin_EN=dwPin_EN ;
+
+ PIO_SetOutput( pPIO_EN, dwPin_EN, PIO_PULLUP|PIO_OUTPUT_LOW ) ;
+
+ return 0u ;
+}
+
+/**
+ * \brief Enable transceiver
+ *
+ * \param pComponent pointer on SSN65HVD234_Data
+ *
+ * \return 0 if OK
+ */
+extern uint32_t SN65HVD234_Enable( SSN65HVD234_Data* pComponent )
+{
+ // Raise EN of SN65HVD234 to High Level (Vcc)
+ pComponent->pPIO_EN->PIO_SODR=pComponent->dwPin_EN ;
+
+ return 0u ;
+}
+
+/**
+ * \brief Disable transceiver
+ *
+ * \param pComponent pointer on SSN65HVD234_Data
+ *
+ * \return 0 if OK
+ */
+extern uint32_t SN65HVD234_Disable( SSN65HVD234_Data* pComponent )
+{
+ // Lower EN of SN65HVD234 to Low Level (0.0v)
+ pComponent->pPIO_EN->PIO_CODR=pComponent->dwPin_EN ;
+
+ return 0u ;
+}
+
+/**
+ * \brief Turn component into lowpower mode
+ *
+ * \param pComponent pointer on SSN65HVD234_Data
+ *
+ * \return 0 if OK
+ */
+extern uint32_t SN65HVD234_EnableLowPower( SSN65HVD234_Data* pComponent )
+{
+ // Raise Rs of SN65HVD234 to more than 0.75v
+ pComponent->pPIO_Rs->PIO_SODR=pComponent->dwPin_Rs ;
+
+ // Now, SN65HVD234 is only listening
+
+ return 0u ;
+}
+
+/**
+ * \brief Restore Normal mode by leaving lowpower mode
+ *
+ * \param pComponent pointer on SSN65HVD234_Data
+ *
+ * \return 0 if OK
+ */
+extern uint32_t SN65HVD234_DisableLowPower( SSN65HVD234_Data* pComponent )
+{
+ // Lower Rs of SN65HVD234 to 0.0v < 0.33v
+ pComponent->pPIO_Rs->PIO_CODR=pComponent->dwPin_Rs ;
+
+ return 0u ;
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/spid_dma.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/spid_dma.c
new file mode 100644
index 0000000..4dbf47a
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/spid_dma.c
@@ -0,0 +1,404 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+ /**
+ * \addtogroup spi_dma_module SPI DMA driver
+ * \ingroup lib_spiflash
+ * \section Usage
+ *
+ * <ul>
+ * <li> SPID_Configure() initializes and configures the SPI peripheral and DMA for data transfer.</li>
+ * <li> Configures the parameters for the device corresponding to the cs value by SPID_ConfigureCS(). </li>
+ * <li> Starts a SPI master transfer. This is a non blocking function SPID_SendCommand(). It will
+ * return as soon as the transfer is started..</li>
+ * </ul>
+ *
+ */
+
+/**
+ * \file
+ *
+ * Implementation for the SPI Flash with DMA driver.
+ *
+ */
+
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+#include "board.h"
+
+/*----------------------------------------------------------------------------
+ * Definitions
+ *----------------------------------------------------------------------------*/
+/** DMA support */
+#define USE_SPI_DMA
+
+/** DMA Link List size for spi transation*/
+#define DMA_SPI_LLI 2
+
+ /*----------------------------------------------------------------------------
+ * Local Variables
+ *----------------------------------------------------------------------------*/
+
+#if defined(USE_SPI_DMA)
+/* DMA driver instance */
+static uint32_t spiDmaTxChannel;
+static uint32_t spiDmaRxChannel;
+
+/* Linked lists for multi transfer buffer chaining structure instance. */
+static sDmaTransferDescriptor dmaTxLinkList[DMA_SPI_LLI];
+static sDmaTransferDescriptor dmaRxLinkList[DMA_SPI_LLI];
+#endif
+
+/*----------------------------------------------------------------------------
+ * Local functions
+ *----------------------------------------------------------------------------*/
+#if defined(USE_SPI_DMA)
+/**
+ * \brief SPI DMA Rx callback
+ * Invoked on SPi DMA reception done.
+ * \param dmaStatus DMA status.
+ * \param pArg Pointer to callback argument - Pointer to Spid instance.
+ */
+static void SPID_Rx_Cb(uint32_t dmaStatus, Spid* pArg)
+{
+ SpidCmd *pSpidCmd = pArg->pCurrentCommand;
+ Spi *pSpiHw = pArg->pSpiHw;
+
+ if (dmaStatus == DMAD_PARTIAL_DONE)
+ return;
+
+ /* Disable the SPI TX & RX */
+ SPI_Disable ( pSpiHw );
+
+ /* Disable the SPI Peripheral */
+ PMC_DisablePeripheral ( pArg->spiId );
+
+ /* Release CS */
+ SPI_ReleaseCS(pSpiHw);
+
+ /* Release the DMA channels */
+ DMAD_FreeChannel(pArg->pDmad, spiDmaRxChannel);
+ DMAD_FreeChannel(pArg->pDmad, spiDmaTxChannel);
+
+ /* Release the dataflash semaphore */
+ pArg->semaphore++;
+
+ /* Invoke the callback associated with the current command */
+ if (pSpidCmd && pSpidCmd->callback) {
+
+ pSpidCmd->callback(0, pSpidCmd->pArgument);
+ }
+}
+
+/**
+ * \brief Configure the DMA Channels: 0 RX, 1 TX.
+ * Channels are disabled after configure.
+ * \returns 0 if the dma channel configuration successfully; otherwise returns
+ * SPID_ERROR_XXX.
+ */
+static uint8_t SPID_configureDmaChannels( Spid* pSpid )
+{
+ uint32_t dwCfg;
+ uint8_t iController;
+
+ /* Allocate a DMA channel for SPI0 RX. */
+ spiDmaRxChannel = DMAD_AllocateChannel( pSpid->pDmad,
+ pSpid->spiId, DMA_TRANSFER_MEMORY);
+ {
+ if ( spiDmaRxChannel == DMA_ALLOC_FAILED )
+ {
+ return SPID_ERROR;
+ }
+ }
+ /* Allocate a DMA channel for SPI0 TX. */
+ spiDmaTxChannel = DMAD_AllocateChannel( pSpid->pDmad,
+ DMA_TRANSFER_MEMORY, pSpid->spiId);
+ {
+ if ( spiDmaTxChannel == DMA_ALLOC_FAILED )
+ {
+ return SPID_ERROR;
+ }
+ }
+ iController = (spiDmaRxChannel >> 8);
+ /* Setup callbacks for SPI0 RX */
+ DMAD_SetCallback(pSpid->pDmad, spiDmaRxChannel,
+ (DmadTransferCallback)SPID_Rx_Cb, pSpid);
+
+ /* Configure the allocated DMA channel for SPI0 RX. */
+ dwCfg = 0
+ | DMAC_CFG_SRC_PER(
+ DMAIF_GetChannelNumber( iController, pSpid->spiId, DMA_TRANSFER_RX ))
+ | DMAC_CFG_DST_PER(
+ DMAIF_GetChannelNumber( iController, pSpid->spiId, DMA_TRANSFER_RX ))
+ | DMAC_CFG_SRC_H2SEL
+ | DMAC_CFG_SOD
+ | DMAC_CFG_FIFOCFG_ALAP_CFG;
+
+ if (DMAD_PrepareChannel( pSpid->pDmad, spiDmaRxChannel, dwCfg ))
+ return SPID_ERROR;
+
+ iController = (spiDmaTxChannel >> 8);
+ /* Setup callbacks for SPI0 TX (ignored) */
+ DMAD_SetCallback(pSpid->pDmad, spiDmaTxChannel, NULL, NULL);
+
+ /* Configure the allocated DMA channel for SPI0 TX. */
+ dwCfg = 0
+ | DMAC_CFG_SRC_PER(
+ DMAIF_GetChannelNumber( iController, pSpid->spiId, DMA_TRANSFER_TX ))
+ | DMAC_CFG_DST_PER(
+ DMAIF_GetChannelNumber( iController, pSpid->spiId, DMA_TRANSFER_TX ))
+ | DMAC_CFG_DST_H2SEL
+ | DMAC_CFG_SOD
+ | DMAC_CFG_FIFOCFG_ALAP_CFG;
+
+ if ( DMAD_PrepareChannel( pSpid->pDmad, spiDmaTxChannel, dwCfg ))
+ return SPID_ERROR;
+ return 0;
+}
+
+/**
+ * \brief Configure the DMA source and destination with Linker List mode.
+ *
+ * \param pCommand Pointer to command
+ * \returns 0 if the dma multibuffer configuration successfully; otherwise returns
+ * SPID_ERROR_XXX.
+ */
+static uint8_t SPID_configureLinkList(Spi *pSpiHw, void *pDmad, SpidCmd *pCommand)
+{
+ /* Setup RX Link List */
+ dmaRxLinkList[0].dwSrcAddr = (uint32_t)&pSpiHw->SPI_RDR;
+ dmaRxLinkList[0].dwDstAddr = (uint32_t)pCommand->pCmd;
+ dmaRxLinkList[0].dwCtrlA = pCommand->cmdSize | DMAC_CTRLA_SRC_WIDTH_BYTE | DMAC_CTRLA_DST_WIDTH_BYTE;
+ dmaRxLinkList[0].dwCtrlB = DMAC_CTRLB_FC_PER2MEM_DMA_FC | DMAC_CTRLB_SRC_INCR_FIXED | DMAC_CTRLB_DST_INCR_INCREMENTING;
+
+ /* Setup TX Link List */
+ dmaTxLinkList[0].dwSrcAddr = (uint32_t)pCommand->pCmd;
+ dmaTxLinkList[0].dwDstAddr = (uint32_t)&pSpiHw->SPI_TDR;
+ dmaTxLinkList[0].dwCtrlA = pCommand->cmdSize | DMAC_CTRLA_SRC_WIDTH_BYTE | DMAC_CTRLA_DST_WIDTH_BYTE;
+ dmaTxLinkList[0].dwCtrlB = DMAC_CTRLB_FC_MEM2PER_DMA_FC | DMAC_CTRLB_SRC_INCR_INCREMENTING | DMAC_CTRLB_DST_INCR_FIXED;
+
+ /* In case command only */
+ if (pCommand->pData == 0) {
+
+ dmaRxLinkList[0].dwDscAddr = 0;
+ dmaTxLinkList[0].dwDscAddr = 0;
+ }
+ /* In case Command & data */
+ else {
+ dmaRxLinkList[0].dwDscAddr = (uint32_t)&dmaRxLinkList[1];
+ dmaRxLinkList[1].dwSrcAddr = (uint32_t)&pSpiHw->SPI_RDR;
+ dmaRxLinkList[1].dwDstAddr = (uint32_t)pCommand->pData;
+ dmaRxLinkList[1].dwCtrlA = pCommand->dataSize | DMAC_CTRLA_SRC_WIDTH_BYTE | DMAC_CTRLA_DST_WIDTH_BYTE;
+ dmaRxLinkList[1].dwCtrlB = DMAC_CTRLB_SRC_DSCR | DMAC_CTRLB_DST_DSCR | DMAC_CTRLB_FC_PER2MEM_DMA_FC
+ | DMAC_CTRLB_SRC_INCR_FIXED | DMAC_CTRLB_DST_INCR_INCREMENTING;
+ dmaRxLinkList[1].dwDscAddr = 0;
+ dmaTxLinkList[0].dwDscAddr = (uint32_t)&dmaTxLinkList[1];
+ dmaTxLinkList[1].dwSrcAddr = (uint32_t)pCommand->pData;
+ dmaTxLinkList[1].dwDstAddr = (uint32_t)&pSpiHw->SPI_TDR;
+ dmaTxLinkList[1].dwCtrlA = pCommand->dataSize | DMAC_CTRLA_SRC_WIDTH_BYTE | DMAC_CTRLA_DST_WIDTH_BYTE;
+ dmaTxLinkList[1].dwCtrlB = DMAC_CTRLB_SRC_DSCR | DMAC_CTRLB_DST_DSCR | DMAC_CTRLB_FC_MEM2PER_DMA_FC
+ | DMAC_CTRLB_SRC_INCR_INCREMENTING | DMAC_CTRLB_DST_INCR_FIXED;
+ dmaTxLinkList[1].dwDscAddr = 0;
+ }
+ if ( DMAD_PrepareMultiTransfer( pDmad, spiDmaRxChannel, &dmaRxLinkList[0]))
+ return SPID_ERROR;
+ if ( DMAD_PrepareMultiTransfer( pDmad, spiDmaTxChannel, &dmaTxLinkList[0]))
+ return SPID_ERROR;
+ return 0;
+}
+#endif
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+/**
+ * \brief Initializes the Spid structure and the corresponding SPI & DMA hardware.
+ * select value.
+ * The driver will uses DMA channel 0 for RX and DMA channel 1 for TX.
+ * The DMA channels are freed automatically when no SPI command processing.
+ *
+ * \param pSpid Pointer to a Spid instance.
+ * \param pSpiHw Associated SPI peripheral.
+ * \param spiId SPI peripheral identifier.
+ * \param pDmad Pointer to a Dmad instance.
+ */
+uint32_t SPID_Configure( Spid *pSpid ,
+ Spi *pSpiHw ,
+ uint8_t spiId,
+ sDmad *pDmad )
+{
+ /* Initialize the SPI structure */
+ pSpid->pSpiHw = pSpiHw;
+ pSpid->spiId = spiId;
+ pSpid->semaphore = 1;
+ pSpid->pCurrentCommand = 0;
+ pSpid->pDmad = pDmad;
+
+ /* Enable the SPI Peripheral ,Execute a software reset of the SPI, Configure SPI in Master Mode*/
+ SPI_Configure ( pSpiHw, pSpid->spiId, SPI_MR_MSTR | SPI_MR_MODFDIS | SPI_MR_PCS_Msk );
+ /* Disable the SPI Peripheral */
+ PMC_DisablePeripheral (pSpid->spiId );
+ return 0;
+}
+
+/**
+ * \brief Configures the parameters for the device corresponding to the cs value.
+ *
+ * \param pSpid Pointer to a Spid instance.
+ * \param cs number corresponding to the SPI chip select.
+ * \param csr SPI_CSR value to setup.
+ */
+void SPID_ConfigureCS( Spid *pSpid,
+ uint32_t dwCS,
+ uint32_t dwCsr)
+{
+ Spi *pSpiHw = pSpid->pSpiHw;
+
+ /* Enable the SPI Peripheral */
+ PMC_EnablePeripheral (pSpid->spiId );
+ /* Configure SPI Chip Select Register */
+ SPI_ConfigureNPCS( pSpiHw, dwCS, dwCsr );
+ /* Disable the SPI Peripheral */
+ PMC_DisablePeripheral (pSpid->spiId );
+}
+
+/**
+ * \brief Starts a SPI master transfer. This is a non blocking function. It will
+ * return as soon as the transfer is started.
+ *
+ * \param pSpid Pointer to a Spid instance.
+ * \param pCommand Pointer to the SPI command to execute.
+ * \returns 0 if the transfer has been started successfully; otherwise returns
+ * SPID_ERROR_LOCK is the driver is in use, or SPID_ERROR if the command is not
+ * valid.
+ */
+uint32_t SPID_SendCommand( Spid *pSpid, SpidCmd *pCommand)
+{
+ Spi *pSpiHw = pSpid->pSpiHw;
+
+ /* Try to get the dataflash semaphore */
+ if (pSpid->semaphore == 0) {
+
+ return SPID_ERROR_LOCK;
+ }
+ pSpid->semaphore--;
+
+ /* Enable the SPI Peripheral */
+ PMC_EnablePeripheral (pSpid->spiId );
+
+ /* SPI chip select */
+ SPI_ChipSelect (pSpiHw, 1 << pCommand->spiCs);
+
+#if !defined(USE_SPI_DMA)
+ /* Initialize the callback */
+ pSpid->pCurrentCommand = pCommand;
+ /* Enables the SPI to transfer and receive data. */
+ SPI_Enable (pSpiHw );
+ {
+ uint32_t i;
+ /* Transfer command */
+ for (i = 0; i < pCommand->cmdSize; i ++)
+ {
+ SPI_Write(pSpiHw, pCommand->spiCs, pCommand->pCmd[i]);
+ SPI_Read(pSpiHw);
+ }
+ /* Transfer data */
+ for (i = 0; i < pCommand->dataSize; i ++)
+ {
+ SPI_Write(pSpiHw, pCommand->spiCs, pCommand->pData[i]);
+ pCommand->pData[i] = SPI_Read(pSpiHw);
+ }
+ SPI_ReleaseCS(pSpiHw);
+
+ /* Unlock */
+ pSpid->semaphore ++;
+
+ /* Callback */
+ if (pCommand->callback)
+ {
+ pCommand->callback(0, pCommand->pArgument);
+ }
+ }
+#else
+ /* Initialize DMA controller using channel 0 for RX, 1 for TX. */
+ if (SPID_configureDmaChannels( pSpid ))
+ return SPID_ERROR_LOCK;
+ if (SPID_configureLinkList(pSpiHw, pSpid->pDmad, pCommand))
+ return SPID_ERROR_LOCK;
+
+ // Initialize the callback
+ pSpid->pCurrentCommand = pCommand;
+ /* Enables the SPI to transfer and receive data. */
+ SPI_Enable (pSpiHw );
+
+ /* Start DMA 0(RX) && 1(TX) */
+ if (DMAD_StartTransfer( pSpid->pDmad, spiDmaRxChannel ))
+ return SPID_ERROR_LOCK;
+ if (DMAD_StartTransfer( pSpid->pDmad, spiDmaTxChannel ))
+ return SPID_ERROR_LOCK;
+#endif
+ return 0;
+}
+
+/**
+ * \brief SPI transfer ISR.
+ */
+void SPID_Handler( Spid *pSpid )
+{
+ /* Remove warnings */
+ pSpid->semaphore;
+}
+
+/**
+ * \brief DMA transfer ISR for SPI driver.
+ */
+void SPID_DmaHandler( Spid *pSpid )
+{
+ DMAD_Handler( pSpid->pDmad );
+}
+
+/**
+ * \brief Check if the SPI driver is busy.
+ *
+ * \param pSpid Pointer to a Spid instance.
+ * \returns 1 if the SPI driver is currently busy executing a command; otherwise
+ */
+uint32_t SPID_IsBusy(const Spid *pSpid)
+{
+ if (pSpid->semaphore == 0) {
+
+ return 1;
+ }
+ else {
+
+ return 0;
+ }
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/syscalls.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/syscalls.c
new file mode 100644
index 0000000..1d508ab
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/syscalls.c
@@ -0,0 +1,141 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file syscalls.c
+ *
+ * Implementation of newlib syscall.
+ *
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+
+#include "board.h"
+
+#include <stdio.h>
+#include <stdarg.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+/*----------------------------------------------------------------------------
+ * Exported variables
+ *----------------------------------------------------------------------------*/
+
+#undef errno
+extern int errno ;
+extern int _end ;
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+extern void _exit( int status ) ;
+extern void _kill( int pid, int sig ) ;
+extern int _getpid ( void ) ;
+
+extern caddr_t _sbrk ( int incr )
+{
+ static unsigned char *heap = NULL ;
+ unsigned char *prev_heap ;
+
+ if ( heap == NULL )
+ {
+ heap = (unsigned char *)&_end ;
+ }
+ prev_heap = heap;
+
+ heap += incr ;
+
+ return (caddr_t) prev_heap ;
+}
+
+extern int link( char *old, char *new )
+{
+ return -1 ;
+}
+
+extern int _close( int file )
+{
+ return -1 ;
+}
+
+extern int _fstat( int file, struct stat *st )
+{
+ st->st_mode = S_IFCHR ;
+
+ return 0 ;
+}
+
+extern int _isatty( int file )
+{
+ return 1 ;
+}
+
+extern int _lseek( int file, int ptr, int dir )
+{
+ return 0 ;
+}
+
+extern int _read(int file, char *ptr, int len)
+{
+ return 0 ;
+}
+
+extern int _write( int file, char *ptr, int len )
+{
+ int iIndex ;
+
+
+// for ( ; *ptr != 0 ; ptr++ )
+ for ( iIndex=0 ; iIndex < len ; iIndex++, ptr++ )
+ {
+ UART_PutChar( *ptr ) ;
+ }
+
+ return iIndex ;
+}
+
+extern void _exit( int status )
+{
+ printf( "Exiting with status %d.\n", status ) ;
+
+ for ( ; ; ) ;
+}
+
+extern void _kill( int pid, int sig )
+{
+ return ;
+}
+
+extern int _getpid ( void )
+{
+ return -1 ;
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/timetick.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/timetick.c
new file mode 100644
index 0000000..23e95ca
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/timetick.c
@@ -0,0 +1,136 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ * Implement simple system tick usage.
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "board.h"
+
+#define CLOCKPERSECOND (1000u)
+
+/*----------------------------------------------------------------------------
+ * Local variables
+ *----------------------------------------------------------------------------*/
+
+/** Tick Counter united by ms */
+static volatile uint32_t _dwTickCount=0 ;
+static volatile uint32_t _dwCurrentSeconds = 0;
+static uint32_t _dwSecondCountdown = CLOCKPERSECOND;
+
+/*----------------------------------------------------------------------------
+ * Exported Functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Handler for Sytem Tick interrupt.
+ */
+extern void TimeTick_Increment( void )
+{
+ _dwTickCount++ ;
+
+ if (--_dwSecondCountdown == 0)
+ {
+ _dwCurrentSeconds++;
+ _dwSecondCountdown = CLOCKPERSECOND;
+ }
+}
+
+/**
+ * \brief Configures the SAM3 SysTick & reset tickCount.
+ * Systick interrupt handler will generates 1ms interrupt and increase a
+ * tickCount.
+ * \param new_mck Current master clock.
+ */
+extern uint32_t TimeTick_Configure( uint32_t new_mck )
+{
+ _dwTickCount = 0 ;
+ return SysTick_Config( new_mck/1000 ) ;
+}
+
+/**
+ * \brief Get current Tick Count, in ms.
+ */
+extern uint32_t GetTickCount( void )
+{
+ return _dwTickCount ;
+}
+
+/**
+ * \brief Get current Second Count, in s.
+ */
+extern uint32_t GetSecondCount( void )
+{
+ return _dwCurrentSeconds ;
+}
+
+
+/**
+ * \brief Sync Wait for several ms
+ */
+extern void Wait( volatile uint32_t dwMs )
+{
+ uint32_t dwStart ;
+ uint32_t dwCurrent ;
+
+ dwStart = _dwTickCount ;
+ do
+ {
+ dwCurrent = _dwTickCount ;
+ } while ( dwCurrent - dwStart < dwMs ) ;
+}
+
+/**
+ * \brief Sync Sleep for several ms
+ */
+extern void Sleep( volatile uint32_t dwMs )
+{
+ uint32_t dwStart ;
+ uint32_t dwCurrent ;
+
+ dwStart = _dwTickCount ;
+
+ do
+ {
+ dwCurrent = _dwTickCount ;
+
+ if ( dwCurrent - dwStart > dwMs )
+ {
+ break ;
+ }
+
+ __WFI() ;
+ } while( 1 ) ;
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/trace.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/trace.c
new file mode 100644
index 0000000..10f6bca
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/trace.c
@@ -0,0 +1,65 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * Implementation of the hardware configuration for the trace.
+ *
+ */
+
+/*------------------------------------------------------------------------------
+ * Headers
+ *------------------------------------------------------------------------------*/
+
+#include "board.h"
+
+/*------------------------------------------------------------------------------
+ * Internal variables
+ *------------------------------------------------------------------------------*/
+
+/** Trace level can be set at applet initialization */
+#if !defined(NOTRACE) && (DYN_TRACES == 1)
+ uint32_t dwTraceLevel = TRACE_LEVEL ;
+#endif
+
+/**
+ * Initializes the U(S)ART Console
+ *
+ * \param dwBaudRate U(S)ART baudrate.
+ * \param dwMCk Master clock frequency.
+ */
+extern void TRACE_CONFIGURE( uint32_t dwBaudRate, uint32_t dwMCk )
+{
+ const Pin pinsUART0[] = { PINS_UART } ;
+
+ PIO_PinConfigure( pinsUART0, PIO_LISTSIZE( pinsUART0 ) ) ;
+
+ UART_Configure( dwBaudRate, dwMCk ) ;
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/tsd_ads7843.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/tsd_ads7843.c
new file mode 100644
index 0000000..5c7a71b
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/tsd_ads7843.c
@@ -0,0 +1,313 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * Implementation of ADS7843 driver.
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "board.h"
+
+#include <stdint.h>
+#include <string.h>
+
+/*----------------------------------------------------------------------------
+ * Definitions
+ *----------------------------------------------------------------------------*/
+
+/** Delay for pushbutton debouncing (the time-base is 10 ms). */
+#define DEBOUNCE_TIME 6 /* 10 * 6 = 60 ms */
+
+/** Color of calibration points. */
+#define POINTS_COLOR 0x0000FF
+
+/** Size in pixels of calibration points. */
+#define POINTS_SIZE 4
+
+/** Maximum difference in pixels between the test point and the measured point. */
+#define POINTS_MAX_ERROR 5
+
+/*----------------------------------------------------------------------------
+ * Types
+ *----------------------------------------------------------------------------*/
+
+/** pen state */
+typedef enum {
+ STATE_PEN_RELEASED = 0,
+ STATE_PEN_PRESSED = 1,
+ STATE_PEN_DEBOUNCE = 2
+} e_pen_state;
+
+/*----------------------------------------------------------------------------
+ * Local variables
+ *----------------------------------------------------------------------------*/
+
+/** Pins used by Interrupt Signal for Touch Screen Controller */
+static const Pin pinPenIRQ = PIN_TSC_IRQ;
+
+/** Global timestamp in milliseconds since start of application. */
+static volatile uint32_t timestamp = 0;
+
+/** last time when the pen is pressed on the touchscreen */
+static volatile uint32_t timePress = 0;
+
+/** last time when the pen is released */
+static volatile uint32_t timeRelease = 0;
+
+/** pen state */
+static volatile e_pen_state penState = STATE_PEN_RELEASED;
+
+/** Touch screen initiallized flag */
+static uint32_t tsInitFlag = 0;
+
+/*----------------------------------------------------------------------------
+ * Local functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Timer handler for touch screen. Increments the timestamp counter.
+ * Determine the state "Pen Pressed" or "Pen Released". To change state,
+ * the penIRQ has to keep the same value during DEBOUNCE_TIME.
+ *
+ * \note External timer interrupt should call it per 10ms.
+ */
+void TSD_TimerHandler( void )
+{
+ uint32_t data[2];
+ uint32_t timeKeep;
+ static uint32_t point[2];
+
+ if (!tsInitFlag) return;
+
+ timestamp++;
+ /* Get the current position of the pen if penIRQ has low value (pen pressed) */
+ if ( PIO_PinGet(&pinPenIRQ) == 0 )
+ {
+ /* Get the current position of the pressed pen */
+ if ( TSDCom_IsCalibrationOk() )
+ {
+ TSD_GetRawMeasurement(data);
+ TSDCom_InterpolateMeasurement(data, point);
+ }
+
+ /* call the callback function */
+ if ( penState == STATE_PEN_PRESSED )
+ {
+ if(TSDCom_IsCalibrationOk())
+ {
+ TSD_PenMoved(point[0], point[1]);
+ }
+ }
+ }
+
+ /* Determine the pen state */
+ if ( PIO_PinGet( &pinPenIRQ ) == 0 )
+ {
+ /* reinit the last time when release */
+ timeRelease = timestamp;
+
+ if ( penState == STATE_PEN_DEBOUNCE )
+ {
+ timeKeep = timestamp;
+ timeKeep -= timePress;
+ if(timeKeep > DEBOUNCE_TIME)
+ {
+ /* pen is pressed during an enough time : the state change */
+ penState = STATE_PEN_PRESSED;
+ /* call the callback function */
+ if ( TSDCom_IsCalibrationOk() )
+ {
+ TSD_PenPressed(point[0], point[1]);
+ }
+ }
+ }
+ }
+ else
+ {
+ /* reinit the last time when release */
+ timePress = timestamp;
+
+ if ( penState == STATE_PEN_DEBOUNCE )
+ {
+ timeKeep = timestamp;
+ timeKeep -= timeRelease;
+ if ( timeKeep > DEBOUNCE_TIME )
+ {
+ /* pen is released during an enough time : the state change */
+ penState = STATE_PEN_RELEASED;
+ /* call the callback function */
+ if ( TSDCom_IsCalibrationOk() )
+ {
+ TSD_PenReleased(point[0], point[1]);
+ }
+ }
+ }
+ }
+}
+
+/**
+ * \breif Interrupt handler for Touchscreen.
+ */
+static void ISR_PenIRQ( void )
+{
+ /* Check if the pen has been pressed */
+ if ( !PIO_PinGet( &pinPenIRQ ) )
+ {
+ if ( penState == STATE_PEN_RELEASED )
+ {
+ timePress = timestamp;
+ penState = STATE_PEN_DEBOUNCE;
+ }
+ }
+ else
+ {
+ if ( penState == STATE_PEN_PRESSED )
+ {
+ timeRelease = timestamp;
+ penState = STATE_PEN_DEBOUNCE;
+ }
+ }
+}
+
+/**
+ * \brief Configure PENIRQ for interrupt.
+ *
+ * \note Be sure the PIO interrupt management has been initialized by
+ * PIO_InitializeInterrupts() before call this function.
+ */
+static void ConfigurePenIRQ( void )
+{
+ /* Configure pios */
+ PIO_PinConfigure(&pinPenIRQ, PIO_LISTSIZE(pinPenIRQ));
+
+ /* Initialize interrupts */
+ PIO_PinConfigureIt(&pinPenIRQ, (void (*)(const Pin *)) ISR_PenIRQ);
+
+ /* Enable the interrupt */
+ PIO_PinEnableIt(&pinPenIRQ);
+}
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Reads and store a touchscreen measurement in the provided array.
+ *
+ * \param pData Array where the measurements will be stored
+ */
+extern void TSD_GetRawMeasurement( uint32_t* pdwData )
+{
+ /* Get the current position of the pressed pen */
+ PIO_PinDisableIt( &pinPenIRQ ) ;
+ ADS7843_GetPosition( &pdwData[0], &pdwData[1] ) ;
+ PIO_PinEnableIt( &pinPenIRQ ) ;
+}
+
+/**
+ * \brief Wait pen pressed.
+ */
+extern void TSD_WaitPenPressed( void )
+{
+ /* Wait for touch & end of conversion */
+ while ( penState != STATE_PEN_RELEASED ) ;
+
+ /* while (penState != STATE_PEN_PRESSED); */
+ while ( penState != STATE_PEN_PRESSED )
+ {
+ }
+}
+
+/**
+ * \brief Wait pen released.
+ */
+extern void TSD_WaitPenReleased( void )
+{
+ /* Wait for contact loss */
+ while (penState != STATE_PEN_PRESSED);
+ while (penState != STATE_PEN_RELEASED);
+}
+
+/**
+ * \brief Do calibration.
+ *
+ * \return 1 if calibration is Ok, 0 else.
+ */
+extern uint8_t TSD_Calibrate( void )
+{
+ uint8_t ret = 0 ;
+
+ /* Calibration is done only once */
+ if ( TSDCom_IsCalibrationOk() )
+ {
+ return 1;
+ }
+
+ /* Do calibration */
+ ret = TSDCom_Calibrate();
+
+ return ret;
+}
+
+/**
+ * \brief Initializes the touchscreen driver and starts the calibration process. When
+ * finished, the touchscreen is operational.
+ *
+ * \note Important: the LCD driver must have been initialized prior to calling this
+ * function.
+ */
+extern void TSD_Initialize( int8_t calEn )
+{
+ ADS7843_Initialize();
+ ConfigurePenIRQ();
+
+ tsInitFlag = 1;
+
+ /* Calibration */
+ if(calEn) {
+ while (!TSD_Calibrate());
+ }
+}
+
+/**
+ * \brief Stop the Touchscreen, disable interrupt.
+ */
+extern void TSD_Reset( void )
+{
+ /* Disable SPI 0 */
+ ADS7843_Reset() ;
+
+ /* Disable the interrupt */
+ PIO_PinDisableIt( &pinPenIRQ ) ;
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/tsd_com.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/tsd_com.c
new file mode 100644
index 0000000..951b99a
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/tsd_com.c
@@ -0,0 +1,390 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2011, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * Implementation of touchscreen driver device irrelevance code.
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "board.h"
+
+#include <assert.h>
+#include <stdint.h>
+#include <string.h>
+
+/*----------------------------------------------------------------------------
+ * Definitions
+ *----------------------------------------------------------------------------*/
+
+/** Size in pixels of calibration points. */
+#define POINTS_SIZE 4
+/** Maximum difference in pixels between the test point and the measured point. */
+#define POINTS_MAX_ERROR 8
+
+/** Delay at the end of calibartion for result display */
+#define DELAY_RESULT_DISPLAY 8000000
+
+/*----------------------------------------------------------------------------
+ * Types
+ *----------------------------------------------------------------------------*/
+
+/** \brief Point used during the touchscreen calibration process. */
+typedef struct _CalibrationPoint
+{
+ /** Coordinate of point along the X-axis of the screen. */
+ uint32_t x;
+ /** Coordinate of point along the Y-axis of the screen. */
+ uint32_t y;
+ /** Calibration data of point. */
+ uint32_t data[2];
+} CalibrationPoint;
+
+/*----------------------------------------------------------------------------
+ * Variables
+ *----------------------------------------------------------------------------*/
+
+/** indicates if the touch screen has been calibrated. */
+/** If not, Callback functions are not called. */
+static volatile uint8_t bCalibrationOk = 0;
+/** Slope for interpoling touchscreen measurements along the X-axis. */
+static int32_t xSlope;
+/** Slope for interpoling touchscreen measurements along the Y-axis. */
+static int32_t ySlope;
+
+/** Calibration points. */
+static CalibrationPoint calibrationPoints[] =
+{
+ /* Top-left corner calibration point */
+ {
+ BOARD_LCD_WIDTH / 10,
+ BOARD_LCD_HEIGHT / 10,
+ {0, 0}
+ },
+ /* Top-right corner calibration point */
+ {
+ BOARD_LCD_WIDTH - BOARD_LCD_WIDTH / 10,
+ BOARD_LCD_HEIGHT / 10,
+ {0, 0}
+ },
+ /* Bottom-right corner calibration point */
+ {
+ BOARD_LCD_WIDTH - BOARD_LCD_WIDTH / 10,
+ BOARD_LCD_HEIGHT - BOARD_LCD_HEIGHT / 10,
+ {0, 0}
+ },
+ /* Bottom-left corner calibration point */
+ {
+ BOARD_LCD_WIDTH / 10,
+ BOARD_LCD_HEIGHT - BOARD_LCD_HEIGHT / 10,
+ {0, 0}
+ }
+};
+
+/** Test point */
+static const CalibrationPoint testPoint =
+{
+ BOARD_LCD_WIDTH / 2,
+ BOARD_LCD_HEIGHT / 2,
+ {0, 0}
+};
+
+/*----------------------------------------------------------------------------
+ * Local functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Display a calibration point on the given buffer.
+ *
+ * \param pPoint Calibration point to display.
+ */
+static void DrawCalibrationPoint(const CalibrationPoint *pPoint)
+{
+ LCD_SetColor( COLOR_RED ) ;
+ LCD_DrawFilledRectangle( pPoint->x - POINTS_SIZE / 2,
+ pPoint->y - POINTS_SIZE / 2,
+ pPoint->x + POINTS_SIZE / 2,
+ pPoint->y + POINTS_SIZE / 2 ) ;
+}
+
+/**
+ * \brief Clears a calibration point from the given buffer.
+ *
+ * \param pPoint Calibration point to clear.
+ */
+static void ClearCalibrationPoint(const CalibrationPoint *pPoint)
+{
+ LCD_SetColor( COLOR_WHITE ) ;
+ LCD_DrawFilledRectangle( pPoint->x - POINTS_SIZE / 2,
+ pPoint->y - POINTS_SIZE / 2,
+ pPoint->x + POINTS_SIZE / 2,
+ pPoint->y + POINTS_SIZE / 2 ) ;
+}
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Indicates if the calibration of the touch screen is Ok.
+ *
+ * \return 1 calibration Ok, 0 if not.
+ */
+uint8_t TSDCom_IsCalibrationOk(void)
+{
+ if (bCalibrationOk == 1)
+ {
+ return 1;
+ } else
+ {
+ return 0;
+ }
+}
+
+/**
+ * \brief Interpolates the provided raw measurements using the previously calculated
+ * slope. The resulting x and y coordinates are stored in an array.
+ *
+ * \param pData Raw measurement data, as returned by TSD_GetRawMeasurement().
+ * \param pPoint Array in which x and y will be stored.
+ */
+void TSDCom_InterpolateMeasurement(const uint32_t *pData, uint32_t *pPoint)
+{
+ pPoint[0] = calibrationPoints[0].x
+ - (((int32_t) calibrationPoints[0].data[0] - (int32_t) pData[0]) * 1024)
+ / xSlope;
+
+ pPoint[1] = calibrationPoints[0].y
+ - (((int32_t) calibrationPoints[0].data[1] - (int32_t) pData[1]) * 1024)
+ / ySlope;
+
+ if(pPoint[0] & 0x80000000) /* Is pPoint[0] negative ? */
+ {
+ pPoint[0] = 0;
+ }
+
+ if(pPoint[0] > BOARD_LCD_WIDTH) /* Is pPoint[0] bigger than the LCD width ? */
+ {
+ pPoint[0] = BOARD_LCD_WIDTH;
+ }
+
+ if(pPoint[1] & 0x80000000) /* Is pPoint[1] negative ? */
+ {
+ pPoint[1] = 0;
+ }
+
+ if(pPoint[1] > BOARD_LCD_HEIGHT) /* Is pPoint[1] bigger than the LCD width ? */
+ {
+ pPoint[1] = BOARD_LCD_HEIGHT;
+ }
+}
+
+/**
+ * \brief Performs the calibration process using the provided buffer to display
+ * information.
+ *
+ * \return True if calibration was successful; otherwise false.
+ */
+uint8_t TSDCom_Calibrate(void)
+{
+ volatile uint32_t i; /* to keep the tempo with gcc code optimisation */
+ int32_t slope1, slope2;
+ CalibrationPoint measuredPoint;
+ uint8_t xOk, yOk;
+ int32_t xDiff, yDiff;
+
+ /* Calibration setup */
+ LCD_SetColor(COLOR_WHITE);
+ LCD_DrawFilledRectangle(0, 0, BOARD_LCD_WIDTH-1, BOARD_LCD_HEIGHT-1);
+ LCD_SetColor(COLOR_BLACK);
+ LCD_DrawString(70, 80, (uint8_t *)"LCD calibration");
+ LCD_DrawString(40, 160, (uint8_t *)"Touch the dots to\ncalibrate the screen");
+
+ /* Calibration points */
+ for (i=0; i < 4; i++)
+ {
+ DrawCalibrationPoint(&calibrationPoints[i]);
+
+ /* Wait for touch & end of conversion */
+ TSD_WaitPenPressed();
+ TSD_GetRawMeasurement(calibrationPoints[i].data);
+ ClearCalibrationPoint(&calibrationPoints[i]);
+
+ /* Wait for contact loss */
+ TSD_WaitPenReleased();
+ }
+
+ /**
+ * Calculate slopes using the calibration data
+ * Theory behind those calculations:
+ * - We suppose the touchscreen measurements are linear, so the following equations are true (simple
+ * linear regression) for any two 'a' and 'b' points of the screen:
+ * dx = (a.data[0] - b.data[0]) / (a.x - b.x)
+ * dy = (a.data[1] - b.data[1]) / (a.y - b.y)
+ *
+ * - We calculate dx and dy (called xslope and yslope here) using the calibration points.
+ *
+ * - We can then use dx and dy to infer the position of a point 'p' given the measurements performed
+ * by the touchscreen ('c' is any of the calibration points):
+ * dx = (p.data[0] - c.data[0]) / (p.x - c.x)
+ * dy = (p.data[1] - c.data[1]) / (p.y - c.y)
+ * Thus:
+ * p.x = c.x - (p.data[0] - c.data[0]) / dx
+ * p.y = c.y - (p.data[1] - c.data[1]) / dy
+ *
+ * - Since there are four calibration points, dx and dy can be calculated twice, so we average
+ * the two values.
+ */
+ slope1 = ((int32_t) calibrationPoints[0].data[0]) - ((int32_t) calibrationPoints[1].data[0]);
+ slope1 *= 1024;
+ slope1 /= ((int32_t) calibrationPoints[0].x) - ((int32_t) calibrationPoints[1].x);
+ slope2 = ((int32_t) calibrationPoints[2].data[0]) - ((int32_t) calibrationPoints[3].data[0]);
+ slope2 *= 1024;
+ slope2 /= ((int32_t) calibrationPoints[2].x) - ((int32_t) calibrationPoints[3].x);
+ xSlope = (slope1 + slope2) / 2;
+
+ slope1 = ((int32_t) calibrationPoints[0].data[1]) - ((int32_t) calibrationPoints[2].data[1]);
+ slope1 *= 1024;
+ slope1 /= ((int32_t) calibrationPoints[0].y) - ((int32_t) calibrationPoints[2].y);
+ slope2 = ((int32_t) calibrationPoints[1].data[1]) - ((int32_t) calibrationPoints[3].data[1]);
+ slope2 *= 1024;
+ slope2 /= ((int32_t) calibrationPoints[1].y) - ((int32_t) calibrationPoints[3].y);
+ ySlope = (slope1 + slope2) / 2;
+
+ /* Test point */
+ LCD_SetColor(COLOR_WHITE);
+ LCD_DrawFilledRectangle(0, 0, BOARD_LCD_WIDTH-1, BOARD_LCD_HEIGHT-1);
+ LCD_SetColor(COLOR_BLACK);
+ LCD_DrawString(70, 80, (uint8_t *)"LCD calibration");
+ LCD_DrawString(40, 160, (uint8_t *)" Touch the point to\nvalidate calibration");
+ DrawCalibrationPoint(&testPoint);
+
+ /* Wait for touch & end of conversion */
+ TSD_WaitPenPressed();
+
+ TSD_GetRawMeasurement(measuredPoint.data);
+ TSDCom_InterpolateMeasurement(measuredPoint.data, (uint32_t *) &measuredPoint);
+ DrawCalibrationPoint(&measuredPoint);
+
+ /* Check resulting x and y */
+ xDiff = (int32_t) measuredPoint.x - (int32_t) testPoint.x;
+ yDiff = (int32_t) measuredPoint.y - (int32_t) testPoint.y;
+ xOk = (xDiff >= -POINTS_MAX_ERROR) && (xDiff <= POINTS_MAX_ERROR);
+ yOk = (yDiff >= -POINTS_MAX_ERROR) && (yDiff <= POINTS_MAX_ERROR);
+
+ /* Wait for contact loss */
+ TSD_WaitPenReleased();
+
+ /* Check calibration result */
+ if (xOk && yOk)
+ {
+
+ bCalibrationOk = 1;
+ LCD_SetColor(COLOR_WHITE);
+ LCD_DrawFilledRectangle(0, 0, BOARD_LCD_WIDTH-1, BOARD_LCD_HEIGHT-1);
+ LCD_SetColor(COLOR_BLACK);
+ LCD_DrawString(70, 80, (uint8_t *)"LCD calibration");
+ LCD_SetColor(COLOR_GREEN);
+ LCD_DrawString(100, 160, (uint8_t *)"Success !");
+ }
+ else
+ {
+ bCalibrationOk = 0;
+ LCD_SetColor(COLOR_WHITE);
+ LCD_DrawFilledRectangle(0, 0, BOARD_LCD_WIDTH-1, BOARD_LCD_HEIGHT-1);
+ LCD_SetColor(COLOR_BLACK);
+ LCD_DrawString(70, 80, (uint8_t *)"LCD calibration");
+ LCD_SetColor(COLOR_RED);
+ LCD_DrawString(80, 160, (uint8_t *)"Error too big");
+ }
+
+ /* Slight delay */
+ for (i = 0; i < DELAY_RESULT_DISPLAY; i++);
+
+ return (xOk && yOk);
+}
+
+/**
+ * \brief Read calibrate data to buffer.
+ *
+ * \param pBuffer Data buffer.
+ * \param dwSize Size of data buffer in bytes.
+ */
+void TSDCom_ReadCalibrateData(void *pBuffer, uint32_t dwSize)
+{
+ uint8_t *pDest = (uint8_t *)pBuffer;
+
+ if ((sizeof(bCalibrationOk) + sizeof(xSlope) + sizeof(ySlope) + \
+ sizeof(calibrationPoints[0].data)) > dwSize)
+ {
+ TRACE_ERROR ("Size is too large !");
+ return;
+ }
+
+ memcpy(pDest, (void const *)&bCalibrationOk, sizeof(bCalibrationOk));
+ pDest += sizeof(bCalibrationOk);
+ memcpy(pDest, &xSlope, sizeof(xSlope));
+ pDest += sizeof(xSlope);
+ memcpy(pDest, &ySlope, sizeof(ySlope));
+ pDest += sizeof(ySlope);
+ memcpy(pDest, &calibrationPoints[0].data, sizeof(calibrationPoints[0].data));
+ pDest += sizeof(calibrationPoints[0].data);
+}
+
+/**
+ * \brief Restore calibrate data with buffer data.
+ *
+ * \param pBuffer Data buffer.
+ * \param dwSize Size of data buffer in bytes.
+ */
+void TSDCom_RestoreCalibrateData(void *pBuffer, uint32_t dwSize)
+{
+ uint8_t *pSrc = (uint8_t *)pBuffer;
+
+ if ((sizeof(bCalibrationOk) + sizeof(xSlope) + sizeof(ySlope) + \
+ sizeof(calibrationPoints[0].data)) > dwSize)
+ {
+ TRACE_ERROR ("Size is too large !");
+ return;
+ }
+
+ memcpy((void *)&bCalibrationOk, pSrc, sizeof(bCalibrationOk));
+ pSrc += sizeof(bCalibrationOk);
+ memcpy(&xSlope, pSrc, sizeof(xSlope));
+ pSrc += sizeof(xSlope);
+ memcpy(&ySlope, pSrc, sizeof(ySlope));
+ pSrc += sizeof(ySlope);
+ memcpy(&calibrationPoints[0].data, pSrc, sizeof(calibrationPoints[0].data));
+ pSrc += sizeof(calibrationPoints[0].data);
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/twid.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/twid.c
new file mode 100644
index 0000000..9a43631
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/twid.c
@@ -0,0 +1,613 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2011, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * Implementation of TWI device driver.
+ *
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+#include "board.h"
+
+#include <assert.h>
+
+/*----------------------------------------------------------------------------
+ * Definition
+ *----------------------------------------------------------------------------*/
+#define TWITIMEOUTMAX 50000
+
+/*----------------------------------------------------------------------------
+ * Types
+ *----------------------------------------------------------------------------*/
+
+/** TWI driver callback function.*/
+typedef void (*TwiCallback)(Async *);
+
+/** \brief TWI asynchronous transfer descriptor.*/
+typedef struct _AsyncTwi {
+
+ /** Asynchronous transfer status. */
+ volatile uint8_t status;
+ // Callback function to invoke when transfer completes or fails.*/
+ TwiCallback callback;
+ /** Pointer to the data buffer.*/
+ uint8_t *pData;
+ /** Total number of bytes to transfer.*/
+ uint32_t num;
+ /** Number of already transferred bytes.*/
+ uint32_t transferred;
+} AsyncTwi;
+/*------------------------------------------------------------------------------
+ * Exported functions
+ *------------------------------------------------------------------------------*/
+#ifdef USE_TWI_DMA
+/**
+ * \brief Start DMA reading data.
+ * \param pTwid Pointer to the Twid instance to initialize.
+ * \param pBuffer Pointer to the data buffer.
+ * \param wSize Receive byte size.
+ */
+void TWID_DMARead(
+ Twid *pTwid,
+ void* pBuffer,
+ uint16_t wSize)
+{
+ sDmad *pDmad = pTwid->pDmad;
+ sDmaTransferDescriptor td;
+
+ pTwid->ucRxDone = 0;
+
+ td.dwSrcAddr = (uint32_t) &(pTwid->pTwi)->TWI_RHR;
+ td.dwDstAddr = (uint32_t) pBuffer;
+ td.dwCtrlA = DMAC_CTRLA_BTSIZE(wSize)
+ | DMAC_CTRLA_SRC_WIDTH_BYTE
+ | DMAC_CTRLA_DST_WIDTH_BYTE;
+ td.dwCtrlB = DMAC_CTRLB_SRC_DSCR | DMAC_CTRLB_DST_DSCR
+ | DMAC_CTRLB_FC_PER2MEM_DMA_FC
+ | DMAC_CTRLB_SRC_INCR_FIXED
+ | DMAC_CTRLB_DST_INCR_INCREMENTING;
+
+ td.dwDscAddr = 0;
+
+ DMAD_PrepareSingleTransfer(pDmad, pTwid->dwTwidDmaRxChannel, &td);
+
+ DMAD_StartTransfer(pDmad, pTwid->dwTwidDmaRxChannel);
+
+ TWI_StartRead(pTwid->pTwi, pTwid->address, pTwid->iaddress, pTwid->isize);
+
+}
+
+/**
+ * \brief Start DMA sending data.
+ * \param pTwid Pointer to the Twid instance to initialize.
+ * \param pBuffer Pointer to the data buffer.
+ * \param wSize Transmit byte size.
+ */
+void TWID_DMAWrite(
+ Twid *pTwid,
+ void* pBuffer,
+ uint16_t wSize)
+{
+ sDmad *pDmad = pTwid->pDmad;
+ sDmaTransferDescriptor td;
+
+ pTwid->ucTxDone=0;
+
+ td.dwSrcAddr = (uint32_t) pBuffer;
+ td.dwDstAddr = (uint32_t) &(pTwid->pTwi)->TWI_THR;
+ td.dwCtrlA = DMAC_CTRLA_BTSIZE(wSize)
+ | DMAC_CTRLA_SRC_WIDTH_BYTE
+ | DMAC_CTRLA_DST_WIDTH_BYTE;
+ td.dwCtrlB = DMAC_CTRLB_SRC_DSCR | DMAC_CTRLB_DST_DSCR
+ | DMAC_CTRLB_FC_MEM2PER_DMA_FC
+ | DMAC_CTRLB_SRC_INCR_INCREMENTING
+ | DMAC_CTRLB_DST_INCR_FIXED;
+
+ td.dwDscAddr = 0;
+
+ DMAD_PrepareSingleTransfer(pDmad, pTwid->dwTwidDmaTxChannel, &td);
+
+ DMAD_StartTransfer(pDmad, pTwid->dwTwidDmaTxChannel);
+}
+
+
+/**
+ * \brief DMA driver configuration
+ * \param pTwid Pointer to the Twid instance to initialize.
+ * \param RxCb DMA receive callback function.
+ * \param TxCb DMA transfer callback function.
+ */
+ int32_t TWID_DMAConfigure(
+ Twid* pTwid,
+ DmadTransferCallback RxCb,
+ DmadTransferCallback TxCb )
+{
+ sDmad *pDmad = pTwid->pDmad;
+ uint32_t dwCfg;
+ uint8_t iController;
+ uint8_t ucTWIID;
+
+ /* Get the TWI ID*/
+ ucTWIID = ((pTwid->pTwi) == TWI0) ? ID_TWI0 : ID_TWI1;
+
+ /* Allocate channels */
+ pTwid->dwTwidDmaRxChannel = DMAD_AllocateChannel( pDmad,
+ ucTWIID, DMA_TRANSFER_MEMORY);
+
+ pTwid->dwTwidDmaTxChannel = DMAD_AllocateChannel( pDmad,
+ DMA_TRANSFER_MEMORY, ucTWIID);
+
+ if ( pTwid->dwTwidDmaRxChannel == DMA_ALLOC_FAILED
+ || pTwid->dwTwidDmaTxChannel == DMA_ALLOC_FAILED )
+ {
+ return DMAD_ERROR;
+ }
+ /* Set RX callback */
+ DMAD_SetCallback(pDmad, pTwid->dwTwidDmaRxChannel, RxCb, (void *)pTwid);
+ /* Set TX callback */
+ DMAD_SetCallback(pDmad, pTwid->dwTwidDmaTxChannel, TxCb, (void *)pTwid);
+ /* Configure DMA RX channel */
+ iController = (pTwid->dwTwidDmaRxChannel >> DMAC_CHANNEL_NUM);
+ dwCfg = 0
+ | DMAC_CFG_SRC_PER(
+ DMAIF_GetChannelNumber( iController, ucTWIID, DMA_TRANSFER_RX ))
+ | DMAC_CFG_DST_PER(
+ DMAIF_GetChannelNumber( iController, ucTWIID, DMA_TRANSFER_RX ))
+ | DMAC_CFG_SRC_H2SEL
+ | DMAC_CFG_SOD
+ | DMAC_CFG_FIFOCFG_ALAP_CFG;
+ if (DMAD_PrepareChannel( pDmad, pTwid->dwTwidDmaRxChannel, dwCfg ))
+ return DMAD_ERROR;
+ /* Configure DMA TX channel */
+ iController = (pTwid->dwTwidDmaTxChannel >> DMAC_CHANNEL_NUM);
+ dwCfg = 0
+ | DMAC_CFG_DST_PER(
+ DMAIF_GetChannelNumber( iController, ucTWIID, DMA_TRANSFER_TX ))
+ | DMAC_CFG_SRC_PER(
+ DMAIF_GetChannelNumber( iController, ucTWIID, DMA_TRANSFER_TX ))
+ | DMAC_CFG_DST_H2SEL
+ | DMAC_CFG_SOD
+ | DMAC_CFG_FIFOCFG_ALAP_CFG;
+ if (DMAD_PrepareChannel( pDmad, pTwid->dwTwidDmaTxChannel, dwCfg ))
+ return DMAD_ERROR;
+
+ return 0;
+}
+#endif
+
+
+/*----------------------------------------------------------------------------
+ * Global functions
+ *----------------------------------------------------------------------------*/
+/**
+ * \brief Initializes a TWI driver instance, using the given TWI peripheral.
+ * \note The peripheral must have been initialized properly before calling this function.
+ * \param pTwid Pointer to the Twid instance to initialize.
+ * \param pTwi Pointer to the TWI peripheral to use.
+ * \param address TWI slave address.
+ * \param iaddress Optional slave internal address.
+ * \param isize Internal address size in bytes.
+ */
+void TWID_Initialize(
+ Twid *pTwid,
+ Twi *pTwi,
+ uint8_t address,
+ uint32_t iaddress,
+ uint8_t isize,
+ uint8_t transferType)
+{
+ TRACE_DEBUG( "TWID_Initialize()\n\r" ) ;
+ assert( pTwid != NULL ) ;
+ assert( pTwi != NULL ) ;
+
+ /* Initialize driver. */
+ pTwid->pTwi = pTwi;
+ pTwid->pTransfer = 0;
+ pTwid->address = address;
+ pTwid->iaddress = iaddress;
+ pTwid->isize = isize;
+ pTwid->transferType = transferType;
+}
+
+
+/**
+ * \brief Interrupt handler for a TWI peripheral. Manages asynchronous transfer
+ * occuring on the bus. This function MUST be called by the interrupt service
+ * routine of the TWI peripheral if asynchronous read/write are needed.
+ * \param pTwid Pointer to a Twid instance.
+ */
+void TWID_Handler( Twid *pTwid )
+{
+ uint8_t status;
+ AsyncTwi *pTransfer ;
+ Twi *pTwi ;
+
+ assert( pTwid != NULL ) ;
+
+ pTransfer = (AsyncTwi*)pTwid->pTransfer ;
+ assert( pTransfer != NULL ) ;
+ pTwi = pTwid->pTwi ;
+ assert( pTwi != NULL ) ;
+
+ /* Retrieve interrupt status */
+ status = TWI_GetMaskedStatus(pTwi);
+
+ /* Byte received */
+ if (TWI_STATUS_RXRDY(status)) {
+
+ pTransfer->pData[pTransfer->transferred] = TWI_ReadByte(pTwi);
+ pTransfer->transferred++;
+
+ /* check for transfer finish */
+ if (pTransfer->transferred == pTransfer->num) {
+
+ TWI_DisableIt(pTwi, TWI_IDR_RXRDY);
+ TWI_EnableIt(pTwi, TWI_IER_TXCOMP);
+ }
+ /* Last byte? */
+ else if (pTransfer->transferred == (pTransfer->num - 1)) {
+
+ TWI_Stop(pTwi);
+ }
+ }
+ /* Byte sent*/
+ else if (TWI_STATUS_TXRDY(status)) {
+
+ /* Transfer finished ? */
+ if (pTransfer->transferred == pTransfer->num) {
+
+ TWI_DisableIt(pTwi, TWI_IDR_TXRDY);
+ TWI_EnableIt(pTwi, TWI_IER_TXCOMP);
+ TWI_SendSTOPCondition(pTwi);
+ }
+ /* Bytes remaining */
+ else {
+
+ TWI_WriteByte(pTwi, pTransfer->pData[pTransfer->transferred]);
+ pTransfer->transferred++;
+ }
+ }
+ /* Transfer complete*/
+ else if (TWI_STATUS_TXCOMP(status)) {
+
+ TWI_DisableIt(pTwi, TWI_IDR_TXCOMP);
+ pTransfer->status = 0;
+ if (pTransfer->callback) {
+
+ pTransfer->callback((Async *) pTransfer);
+ }
+ pTwid->pTransfer = 0;
+ }
+}
+
+/**
+ * \brief Asynchronously reads data from a slave on the TWI bus. An optional
+ * callback function is triggered when the transfer is complete.
+ * \param pTwid Pointer to a Twid instance.
+ * \param pData Data buffer for storing received bytes.
+ * \param num Number of bytes to read.
+ * \param pAsync Asynchronous transfer descriptor.
+ * \return 0 if the transfer has been started; otherwise returns a TWI error code.
+ */
+uint8_t TWID_Read(
+ Twid *pTwid,
+ uint8_t *pData,
+ uint32_t num,
+ Async *pAsync)
+{
+ Twi *pTwi;
+ AsyncTwi *pTransfer;
+ uint32_t timeout;
+ volatile uint32_t dw=0;
+
+ assert( pTwid != NULL ) ;
+ pTwi = pTwid->pTwi;
+ pTransfer = (AsyncTwi *) pTwid->pTransfer;
+
+ assert( (pTwid->address & 0x80) == 0 ) ;
+ assert( (pTwid->iaddress & 0xFF000000) == 0 ) ;
+ assert( pTwid->isize < 4 ) ;
+
+ /* Check that no transfer is already pending*/
+ if (pTransfer)
+ {
+ TRACE_ERROR("TWID_Read: A transfer is already pending\n\r");
+ return TWID_ERROR_BUSY;
+ }
+
+ /* Set STOP signal if only one byte is sent*/
+ if (num == 1)
+ {
+ TWI_Stop(pTwi);
+ }
+
+ /* Asynchronous transfer*/
+ if (pAsync) {
+
+ /* Update the transfer descriptor */
+ pTwid->pTransfer = pAsync;
+ pTransfer = (AsyncTwi *) pAsync;
+ pTransfer->status = ASYNC_STATUS_PENDING;
+ pTransfer->pData = pData;
+ pTransfer->num = num;
+ pTransfer->transferred = 0;
+
+ /* Enable read interrupt and start the transfer */
+ TWI_EnableIt(pTwi, TWI_IER_RXRDY);
+ TWI_StartRead(pTwi, pTwid->address, pTwid->iaddress, pTwid->isize); }
+ /* Synchronous transfer*/
+ else
+ {
+ switch (pTwid->transferType)
+ {
+ case TWID_TRANSFER_TYPE_NORMAL :
+ TWI_StartRead(pTwi, pTwid->address, pTwid->iaddress, pTwid->isize);
+
+ /* Read all bytes, setting STOP before the last byte*/
+ while (num > 0)
+ {
+ /* Last byte ?*/
+ if (num == 1)
+ {
+ TWI_Stop(pTwi);
+ }
+
+ /* Wait for byte then read and store it*/
+ timeout = 0;
+ while( !TWI_ByteReceived(pTwi) && (++timeout<TWITIMEOUTMAX) );
+
+ if (timeout == TWITIMEOUTMAX)
+ {
+ TRACE_ERROR("TWID Timeout BR\n\r");
+ }
+
+ *pData++ = TWI_ReadByte(pTwi);
+
+ num--;
+ }
+ break;
+
+ case TWID_TRANSFER_TYPE_DMA :
+ if (num > 2)
+ {
+ /* Read num-1 bytes to hanlde the last byte signal */
+ TWID_DMARead(pTwid, (void*)pData, num-1);
+
+ /* Wait for read all the bytes */
+ while (!pTwid->ucRxDone);
+ }
+ /* setting STOP before the last byte */
+ TWI_Stop(pTwi);
+
+ /* Wait till last byte ready */
+ while (!TWI_ByteReceived(pTwi)) ;
+
+ /* Read last byte */
+ pData[num-1] = TWI_ReadByte(pTwi);
+ break;
+
+ case TWID_TRANSFER_TYPE_PDC :
+ TWI_StartRead(pTwi, pTwid->address, pTwid->iaddress, pTwid->isize);
+
+ /* receive data from TWI pdc channel.*/
+ TWI_PDC_read(pTwi, pData, num-1);
+
+ /* Wait for the pdc transfer is completed */
+ while ( !( TWI_PDCReceiveComplete( pTwi ) ) );
+
+ /* Disable the pdc */
+ TWI_PDC_Disable( pTwi );
+
+ /* Send a stop condition before last byte is received*/
+ TWI_Stop(pTwi);
+
+ /* Receive last byte */
+ TWI_PDC_read(pTwi, &pData[num-1], 1);
+
+ /* Wait for the pdc transfer is completed */
+ while ( !( TWI_PDCReceiveComplete( pTwi ) ) );
+
+ /* Disable the pdc */
+ TWI_PDC_Disable( pTwi );
+ break;
+
+ default :
+ TWI_StartRead(pTwi, pTwid->address, pTwid->iaddress, pTwid->isize);
+
+ /* Read all bytes, setting STOP before the last byte*/
+ while (num > 0)
+ {
+ /* Last byte ?*/
+ if (num == 1)
+ {
+ TWI_Stop(pTwi);
+ }
+
+ /* Wait for byte then read and store it*/
+ timeout = 0;
+ while( !TWI_ByteReceived(pTwi) && (++timeout<TWITIMEOUTMAX) );
+
+ if (timeout == TWITIMEOUTMAX)
+ {
+ TRACE_ERROR("TWID Timeout BR\n\r");
+ }
+
+ *pData++ = TWI_ReadByte(pTwi);
+
+ num--;
+ }
+ break;
+ }
+
+ /* Wait for transfer to be complete */
+ timeout = 0;
+ while( !TWI_TransferComplete(pTwi) && (++timeout<TWITIMEOUTMAX) );
+ if (timeout == TWITIMEOUTMAX) {
+ TRACE_ERROR("TWID Timeout TC\n\r");
+ }
+ }
+
+ return 0;
+}
+
+/**
+ * \brief Asynchronously sends data to a slave on the TWI bus. An optional callback
+ * function is invoked whenever the transfer is complete.
+ * \param pTwid Pointer to a Twid instance.
+ * \param pData Data buffer for storing received bytes.
+ * \param num Data buffer to send.
+ * \param pAsync Asynchronous transfer descriptor.
+ * \return 0 if the transfer has been started; otherwise returns a TWI error code.
+ */
+uint8_t TWID_Write(
+ Twid *pTwid,
+ uint8_t *pData,
+ uint32_t num,
+ Async *pAsync)
+{
+ Twi *pTwi = pTwid->pTwi;
+ AsyncTwi *pTransfer = (AsyncTwi *) pTwid->pTransfer;
+ uint32_t timeout;
+
+ assert( pTwi != NULL ) ;
+ assert( (pTwid->address & 0x80) == 0 ) ;
+ assert( (pTwid->iaddress & 0xFF000000) == 0 ) ;
+ assert( pTwid->isize < 4 ) ;
+
+ /* Check that no transfer is already pending */
+ if (pTransfer) {
+
+ TRACE_ERROR("TWI_Write: A transfer is already pending\n\r");
+ return TWID_ERROR_BUSY;
+ }
+
+ /* Asynchronous transfer */
+ if (pAsync) {
+
+ /* Update the transfer descriptor */
+ pTwid->pTransfer = pAsync;
+ pTransfer = (AsyncTwi *) pAsync;
+ pTransfer->status = ASYNC_STATUS_PENDING;
+ pTransfer->pData = pData;
+ pTransfer->num = num;
+ pTransfer->transferred = 0;
+
+ /* Enable write interrupt and start the transfer */
+ TWI_StartWrite(pTwi, pTwid->address, pTwid->iaddress, pTwid->isize);
+
+ TWI_EnableIt(pTwi, TWI_IER_TXRDY);
+ }
+ /* Synchronous transfer*/
+ else
+ {
+ switch (pTwid->transferType)
+ {
+ case TWID_TRANSFER_TYPE_NORMAL :
+ TWI_StartWrite(pTwi, pTwid->address, pTwid->iaddress, pTwid->isize);
+
+ /* Send all bytes */
+ while (num > 0)
+ {
+ /* Wait before sending the next byte */
+ timeout = 0;
+ while( !TWI_ByteSent(pTwi) && (++timeout<TWITIMEOUTMAX) );
+ if (timeout == TWITIMEOUTMAX)
+ {
+ TRACE_ERROR("TWID Timeout BS\n\r");
+ }
+
+ TWI_WriteByte(pTwi, *pData++);
+ num--;
+ };
+ break;
+
+ case TWID_TRANSFER_TYPE_DMA :
+ {
+ TWI_StartWrite(pTwi, pTwid->address, pTwid->iaddress, pTwid->isize);
+
+ /* Send data to TWI dma channel.*/
+ TWID_DMAWrite(pTwid, (void*)pData, num);
+
+ while (!pTwid->ucTxDone);
+ }
+ break;
+
+ case TWID_TRANSFER_TYPE_PDC :
+ TWI_StartWrite(pTwi, pTwid->address, pTwid->iaddress, pTwid->isize);
+
+ /* Send data to TWI pdc channel.*/
+ TWI_PDC_write(pTwi, pData, num);
+
+ /* Wait for the pdc transfer is completed */
+ while ( !TWI_PDCTransferComplete(pTwi) );
+
+ /* Disable the pdc */
+ TWI_PDC_Disable( pTwi ) ;
+ break;
+
+ default :
+ TWI_StartWrite(pTwi, pTwid->address, pTwid->iaddress, pTwid->isize);
+
+ /* Send all bytes */
+ while (num > 0)
+ {
+ /* Wait before sending the next byte */
+ timeout = 0;
+ while( !TWI_ByteSent(pTwi) && (++timeout<TWITIMEOUTMAX) );
+ if (timeout == TWITIMEOUTMAX)
+ {
+ TRACE_ERROR("TWID Timeout BS\n\r");
+ }
+
+ TWI_WriteByte(pTwi, *pData++);
+ num--;
+ };
+ break;
+
+ }
+
+ /* Wait for actual end of transfer */
+ timeout = 0;
+
+ /* Send a STOP condition */
+ TWI_SendSTOPCondition(pTwi);
+
+ while( !TWI_TransferComplete(pTwi) && (++timeout<TWITIMEOUTMAX) );
+ if (timeout == TWITIMEOUTMAX)
+ {
+ TRACE_ERROR("TWID Timeout TC2\n\r");
+ }
+ }
+
+ return 0;
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/uart_console.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/uart_console.c
new file mode 100644
index 0000000..583e908
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/uart_console.c
@@ -0,0 +1,399 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * Implements UART console.
+ *
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "board.h"
+
+#include <stdio.h>
+#include <stdint.h>
+
+/*----------------------------------------------------------------------------
+ * Definitions
+ *----------------------------------------------------------------------------*/
+
+/** Console baudrate always using 115200. */
+#define CONSOLE_BAUDRATE 115200
+/** Usart Hw interface used by the console (UART). */
+#define CONSOLE_USART UART
+/** Usart Hw ID used by the console (UART). */
+#define CONSOLE_ID ID_UART
+/** Pins description corresponding to Rxd,Txd, (UART pins) */
+#define CONSOLE_PINS {PINS_UART}
+
+/*----------------------------------------------------------------------------
+ * Variables
+ *----------------------------------------------------------------------------*/
+
+/** Is Console Initialized. */
+static volatile uint8_t _ucIsConsoleInitialized=0 ;
+
+/**
+ * \brief Configures an USART peripheral with the specified parameters.
+ *
+ * \param baudrate Baudrate at which the USART should operate (in Hz).
+ * \param masterClock Frequency of the system master clock (in Hz).
+ */
+extern void UART_Configure( uint32_t dwBaudRate, uint32_t dwMasterClock )
+{
+ const Pin pPins[] = CONSOLE_PINS ;
+ Uart *pUart = CONSOLE_USART ;
+
+ /* Configure PIO */
+ PIO_PinConfigure( pPins, PIO_LISTSIZE( pPins ) ) ;
+
+ /* Enable clock for UART */
+ /* In SAM3X, the clock for UART is always enabled. */
+ /* PMC->PMC_PCER0 = 1 << CONSOLE_ID ; */
+
+ /* Reset and disable receiver & transmitter */
+ pUart->UART_CR = UART_CR_RSTRX | UART_CR_RSTTX | UART_CR_RXDIS | UART_CR_TXDIS ;
+
+ /* Configure mode */
+ pUart->UART_MR = UART_MR_PAR_NO ;
+
+ /* Configure baudrate */
+ /* Asynchronous, no oversampling */
+ pUart->UART_BRGR = (dwMasterClock / dwBaudRate) / 16 ;
+
+ /* Disable PDC channel */
+ pUart->UART_PTCR = UART_PTCR_RXTDIS | UART_PTCR_TXTDIS ;
+
+ /* Enable receiver and transmitter */
+ pUart->UART_CR = UART_CR_RXEN | UART_CR_TXEN ;
+
+ _ucIsConsoleInitialized=1 ;
+
+ /* Disable buffering for printf(). */
+#if ( defined (__GNUC__) && !defined (__SAMBA__) )
+ setvbuf(stdout, (char *)NULL, _IONBF, 0);
+#endif
+}
+
+/**
+ * \brief Outputs a character on the UART line.
+ *
+ * \note This function is synchronous (i.e. uses polling).
+ * \param c Character to send.
+ */
+extern void UART_PutChar( uint8_t c )
+{
+ Uart *pUart=CONSOLE_USART ;
+
+ if ( !_ucIsConsoleInitialized )
+ {
+ UART_Configure( CONSOLE_BAUDRATE, BOARD_MCK ) ;
+ }
+
+ /* Wait for the transmitter to be ready */
+ while ( (pUart->UART_SR & UART_SR_TXEMPTY) == 0 ) ;
+
+ /* Send character */
+ pUart->UART_THR=c ;
+
+}
+
+/**
+ * \brief Input a character from the UART line.
+ *
+ * \note This function is synchronous
+ * \return character received.
+ */
+extern uint32_t UART_GetChar( void )
+{
+ Uart *pUart=CONSOLE_USART ;
+
+ if ( !_ucIsConsoleInitialized )
+ {
+ UART_Configure(CONSOLE_BAUDRATE, BOARD_MCK);
+ }
+
+ while ( (pUart->UART_SR & UART_SR_RXRDY) == 0 ) ;
+
+ return pUart->UART_RHR ;
+}
+
+/**
+ * \brief Check if there is Input from UART line.
+ *
+ * \return true if there is Input.
+ */
+extern uint32_t UART_IsRxReady( void )
+{
+ Uart *pUart=CONSOLE_USART ;
+
+ if ( !_ucIsConsoleInitialized )
+ {
+ UART_Configure( CONSOLE_BAUDRATE, BOARD_MCK ) ;
+ }
+
+ return (pUart->UART_SR & UART_SR_RXRDY) > 0 ;
+}
+
+/**
+ * Displays the content of the given frame on the UART0.
+ *
+ * \param pucFrame Pointer to the frame to dump.
+ * \param dwSize Buffer size in bytes.
+ */
+extern void UART_DumpFrame( uint8_t* pucFrame, uint32_t dwSize )
+{
+ uint32_t dw ;
+
+ for ( dw=0 ; dw < dwSize ; dw++ )
+ {
+ printf( "%02X ", pucFrame[dw] ) ;
+ }
+
+ printf( "\n\r" ) ;
+}
+
+/**
+ * Displays the content of the given buffer on the UART0.
+ *
+ * \param pucBuffer Pointer to the buffer to dump.
+ * \param dwSize Buffer size in bytes.
+ * \param dwAddress Start address to display
+ */
+extern void UART_DumpMemory( uint8_t* pucBuffer, uint32_t dwSize, uint32_t dwAddress )
+{
+ uint32_t i ;
+ uint32_t j ;
+ uint32_t dwLastLineStart ;
+ uint8_t* pucTmp ;
+
+ for ( i=0 ; i < (dwSize / 16) ; i++ )
+ {
+ printf( "0x%08X: ", (unsigned int)(dwAddress + (i*16)) ) ;
+ pucTmp = (uint8_t*)&pucBuffer[i*16] ;
+
+ for ( j=0 ; j < 4 ; j++ )
+ {
+ printf( "%02X%02X%02X%02X ", pucTmp[0], pucTmp[1], pucTmp[2], pucTmp[3] ) ;
+ pucTmp += 4 ;
+ }
+
+ pucTmp=(uint8_t*)&pucBuffer[i*16] ;
+
+ for ( j=0 ; j < 16 ; j++ )
+ {
+ UART_PutChar( *pucTmp++ ) ;
+ }
+
+ printf( "\n\r" ) ;
+ }
+
+ if ( (dwSize%16) != 0 )
+ {
+ dwLastLineStart=dwSize - (dwSize%16) ;
+
+ printf( "0x%08X: ", (unsigned int)(dwAddress + dwLastLineStart) ) ;
+ for ( j=dwLastLineStart ; j < dwLastLineStart+16 ; j++ )
+ {
+ if ( (j!=dwLastLineStart) && (j%4 == 0) )
+ {
+ printf( " " ) ;
+ }
+
+ if ( j < dwSize )
+ {
+ printf( "%02X", pucBuffer[j] ) ;
+ }
+ else
+ {
+ printf(" ") ;
+ }
+ }
+
+ printf( " " ) ;
+ for ( j=dwLastLineStart ; j < dwSize ; j++ )
+ {
+ UART_PutChar( pucBuffer[j] ) ;
+ }
+
+ printf( "\n\r" ) ;
+ }
+}
+
+/**
+ * Reads an integer
+ *
+ * \param pdwValue Pointer to a integer variable to contain the input value.
+ *
+ * \return success(1) or failure(0)
+ */
+extern uint32_t UART_GetInteger( int32_t* pdwValue )
+{
+ uint8_t ucKey ;
+ uint8_t ucNum = 0 ;
+ int32_t dwValue = 0 ;
+ int32_t sign = 1 ;
+
+ while ( 1 )
+ {
+ ucKey=UART_GetChar() ;
+ UART_PutChar( ucKey ) ;
+
+ if ( ((ucKey == '-') || (ucKey == '+')) && (ucNum == 0) )
+ {
+ if (ucKey == '-')
+ {
+ sign = -1;
+ }
+ else
+ {
+ sign = 1;
+ }
+ ucNum++;
+ }
+ else
+ {
+ if ( ucKey >= '0' && ucKey <= '9' )
+ {
+ dwValue = (dwValue * 10) + (ucKey - '0');
+ ucNum++;
+ }
+ else
+ {
+ if ( ucKey == 0x0D || ucKey == ' ' )
+ {
+ if ( ucNum == 0 )
+ {
+ printf( "\n\rWrite a number and press ENTER or SPACE!\n\r" ) ;
+ return 0 ;
+ }
+ else
+ {
+ printf( "\n\r" ) ;
+ *pdwValue = dwValue * sign;
+
+ return 1 ;
+ }
+ }
+ else
+ {
+ printf( "\n\r'%c' not a number or sign(+/-)!\n\r", ucKey ) ;
+
+ return 0 ;
+ }
+ }
+ }
+ }
+}
+
+/**
+ * Reads an integer and check the value
+ *
+ * \param pdwValue Pointer to a integer variable to contain the input value.
+ * \param dwMin Minimum value
+ * \param dwMax Maximum value
+ *
+ * \return success(1) or failure(0)
+ */
+extern uint32_t UART_GetIntegerMinMax( int32_t* pdwValue, int32_t dwMin, int32_t dwMax )
+{
+ int32_t dwValue = 0 ;
+
+ if ( UART_GetInteger( &dwValue ) == 0 )
+ {
+ return 0 ;
+ }
+
+ if ( dwValue < dwMin || dwValue > dwMax )
+ {
+ printf( "\n\rThe number have to be between %d and %d\n\r", (int)dwMin, (int)dwMax ) ;
+
+ return 0 ;
+ }
+
+ printf( "\n\r" ) ;
+
+ *pdwValue = dwValue ;
+
+ return 1 ;
+}
+
+/**
+ * Reads an hexadecimal number
+ *
+ * \param pdwValue Pointer to the uint32_t variable to contain the input value.
+ */
+extern uint32_t UART_GetHexa32( uint32_t* pdwValue )
+{
+ uint8_t ucKey ;
+ uint32_t dw = 0 ;
+ uint32_t dwValue = 0 ;
+
+ for ( dw=0 ; dw < 8 ; dw++ )
+ {
+ ucKey = UART_GetChar() ;
+
+ UART_PutChar( ucKey ) ;
+
+ if ( ucKey >= '0' && ucKey <= '9' )
+ {
+ dwValue = (dwValue * 16) + (ucKey - '0') ;
+ }
+ else
+ {
+ if ( ucKey >= 'A' && ucKey <= 'F' )
+ {
+ dwValue = (dwValue * 16) + (ucKey - 'A' + 10) ;
+ }
+ else
+ {
+ if ( ucKey >= 'a' && ucKey <= 'f' )
+ {
+ dwValue = (dwValue * 16) + (ucKey - 'a' + 10) ;
+ }
+ else
+ {
+ printf( "\n\rIt is not a hexa character!\n\r" ) ;
+
+ return 0 ;
+ }
+ }
+ }
+ }
+
+ printf("\n\r" ) ;
+ *pdwValue = dwValue ;
+
+ return 1 ;
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/usart_spi.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/usart_spi.c
new file mode 100644
index 0000000..4791ae1
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/usart_spi.c
@@ -0,0 +1,177 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2011, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/** \addtogroup usart_module Working with USART
+ * The USART SPI driver provides the interface to configure and use the USART
+ * in SPI mode.\n
+*/
+
+/**
+ * \file
+ *
+ * Implementation of USART (Universal Synchronous Asynchronous Receiver Transmitter)
+ * controller.
+ *
+ */
+/*------------------------------------------------------------------------------
+ * Headers
+ *------------------------------------------------------------------------------*/
+#include "board.h"
+#include <assert.h>
+#include <string.h>
+
+/*------------------------------------------------------------------------------
+ * Local definitions
+ *------------------------------------------------------------------------------*/
+#define DELAY_TIME 500
+
+/*------------------------------------------------------------------------------
+ * Exported functions
+ *------------------------------------------------------------------------------*/
+/**
+ * Starts a Usart master transfer. This is a non blocking function. It will
+ * return as soon as the transfer is started.
+ * Returns 0 if the transfer has been started successfully; otherwise returns
+ * 1 is the driver is in use
+ * \param pUsartd Pointer to a usart instance.
+ * \param pCommand Pointer to the uSART command to execute.
+ */
+uint8_t USART_SPIDSendCommand(Usartd *pUsartd, SpidCmd *pCommand)
+{
+ Usart *pUsart = pUsartd->pUsartHw;
+
+ // Try to get the dataflash semaphore
+ if (pUsartd->ucSemaphore == 0)
+ {
+ return 1;
+ }
+
+ pUsartd->ucSemaphore--;
+
+ // Setup Force CS signal as dataflash required
+ pUsart->US_CR |= US_CR_FCS;
+
+ if (pUsartd->eTransferType == USART_PDC_TRANS_TYPE)
+ {
+ pUsartd->ucUsartTransEndSig = 0;
+
+ pUsart->US_TPR = (uint32_t) pCommand->pCmd;
+ pUsart->US_TCR = pCommand->cmdSize;
+
+ pUsart->US_RPR = (uint32_t) pCommand->pCmd;
+ pUsart->US_RCR = pCommand->cmdSize;
+
+ pUsart->US_TNPR = (uint32_t) pCommand->pData;
+ pUsart->US_TNCR = pCommand->dataSize;
+
+ pUsart->US_RNPR = (uint32_t) pCommand->pData;
+ pUsart->US_RNCR = pCommand->dataSize;
+
+ // Enable PDC transfer
+ pUsart->US_PTCR = US_PTCR_RXTEN | US_PTCR_TXTEN;
+
+ // Enable buffer complete interrupt
+ USART_EnableIt(pUsart, US_IER_RXBUFF);
+
+ // Wait till command done
+ while (!pUsartd->ucUsartTransEndSig);
+ }
+ else
+ {
+ uint32_t dw;
+ /* Send dataflash command */
+ for (dw=0; dw < pCommand->cmdSize; dw++ )
+ {
+ USART_Write(pUsart, pCommand->pCmd[dw], DELAY_TIME);
+ USART_Read(pUsart, DELAY_TIME);
+ }
+
+ /* Send/receive the data */
+ for (dw=0; dw < pCommand->dataSize; dw++ )
+ {
+ USART_Write(pUsart, (uint16_t)pCommand->pData[dw], DELAY_TIME);
+ pCommand->pData[dw] = (uint8_t)USART_Read(pUsart, DELAY_TIME);
+ }
+ }
+
+ return 0;
+}
+
+/**
+ * The USART_SPIDHandler must be called by the Usart Interrupt Service Routine with the
+ * corresponding Spi instance.
+ * The USART_SPIDHandler will unlock the Spi semaphore and invoke the upper application
+ * callback.
+ * \param pUsartd Pointer to a pUsartd instance.
+ */
+void USART_SPIDHandler(Usartd *pUsartd)
+{
+ SpidCmd *pUsartCmd = pUsartd->pCurrentCommand;
+ Usart *pUsart = pUsartd->pUsartHw;
+ volatile uint32_t dwStatus;
+
+ dwStatus = USART_GetStatus(pUsart);
+
+ // Check the status register
+ if ((dwStatus & US_CSR_RXBUFF) || (pUsartd->eTransferType == USART_FIFO_TRANS_TYPE))
+ {
+ // Disable buffer complete interrupt
+ USART_DisableIt(pUsart, US_IDR_RXBUFF);
+
+ // Release the chip select signal
+ pUsart->US_CR |= US_CR_RCS;
+
+ // Release the dataflash semaphore
+ pUsartd->ucSemaphore++;
+
+ // Invoke the callback associated with the current command
+ if (pUsartCmd && pUsartCmd->callback) {
+
+ pUsartCmd->callback(0, pUsartCmd->pArgument);
+ }
+ }
+}
+
+/**
+ * Returns 1 if the Usart driver is currently busy executing a command; otherwise
+ * returns 0.
+ * \param pUsartd Pointer to a Usart driver instance.
+ */
+uint8_t USART_SPIDIsBusy(const Usartd *pUsartd)
+{
+ if (pUsartd->ucSemaphore == 0) {
+
+ return 1;
+ }
+ else {
+
+ return 0;
+ }
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/wav.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/wav.c
new file mode 100644
index 0000000..106af7c
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/wav.c
@@ -0,0 +1,96 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+ * \file
+ *
+ * Implementation of the WAV parser functions.
+ *
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "board.h"
+
+#include <stdio.h>
+
+/*----------------------------------------------------------------------------
+ * Definiation
+ *----------------------------------------------------------------------------*/
+
+/* WAV letters "RIFF" */
+#define WAV_CHUNKID 0x46464952
+/* WAV letters "WAVE"*/
+#define WAV_FORMAT 0x45564157
+/* WAV letters "fmt "*/
+#define WAV_SUBCHUNKID 0x20746D66
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Check if the header of a Wav file is valid ot not.
+ *
+ * \param file Buffer holding the file to examinate.
+ * \return 1 if the header of a Wav file is valid; otherwise returns 0.
+ */
+unsigned char WAV_IsValid(const WavHeader *header)
+{
+ return ((header->chunkID == WAV_CHUNKID)
+ && (header->format == WAV_FORMAT)
+ && (header->subchunk1Size == 0x10));
+}
+
+/**
+ * \brief Display the information of the WAV file (sample rate, stereo/mono
+ * and frame size).
+ *
+ * \param header Wav head information.
+ */
+
+void WAV_DisplayInfo(const WavHeader *header)
+{
+ printf( "Wave file header information\n\r");
+ printf( "--------------------------------\n\r");
+ printf( " - Chunk ID = 0x%08X\n\r", header->chunkID);
+ printf( " - Chunk Size = %u\n\r", header->chunkSize);
+ printf( " - Format = 0x%08X\n\r", header->format);
+ printf( " - SubChunk ID = 0x%08X\n\r", header->subchunk1ID);
+ printf( " - Subchunk1 Size = %u\n\r", header->subchunk1Size);
+ printf( " - Audio Format = 0x%04X\n\r", header->audioFormat);
+ printf( " - Num. Channels = %d\n\r", header->numChannels);
+ printf( " - Sample Rate = %u\n\r", header->sampleRate);
+ printf( " - Byte Rate = %u\n\r", header->byteRate);
+ printf( " - Block Align = %d\n\r", header->blockAlign);
+ printf( " - Bits Per Sample = %d\n\r", header->bitsPerSample);
+ printf( " - Subchunk2 ID = 0x%08X\n\r", header->subchunk2ID);
+ printf( " - Subchunk2 Size = %u\n\r", header->subchunk2Size);
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/wm8731.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/wm8731.c
new file mode 100644
index 0000000..0bea307
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/wm8731.c
@@ -0,0 +1,139 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2011, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+
+/**
+ * \file
+ *
+ * Implementation WM8731 driver.
+ *
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "board.h"
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Read data from WM8731 Register.
+ *
+ * \param pTwid Pointer to twi driver structure
+ * \param dwDevice Twi slave address.
+ * \param dwRegAddr Register address to read.
+ * \return value in the given register.
+ */
+uint16_t WM8731_Read( Twid *pTwid, uint32_t dwDevice, uint32_t dwRegAddr )
+{
+ uint16_t uwBitsDataRegister;
+ uint8_t pTdata[2]={0,0};
+
+ pTwid->address = dwDevice;
+ pTwid->iaddress = dwRegAddr;
+ pTwid->isize = 0;
+
+ TWID_Read(pTwid, pTdata, 2, 0);
+ uwBitsDataRegister = (pTdata[0] << 8) | pTdata[1];
+ return uwBitsDataRegister;
+}
+
+/**
+ * \brief Write data to WM8731 Register.
+ *
+ * \param pTwid Pointer to twi driver structure
+ * \param dwDevice Twi slave address.
+ * \param dwRegAddr Register address to read.
+ * \param uwData Data to write
+ */
+void WM8731_Write( Twid *pTwid, uint32_t dwDevice, uint32_t dwRegAddr, uint16_t uwData )
+{
+ uint8_t pTmpData[2];
+ uint16_t uwTmp;
+ uwTmp = ((dwRegAddr & 0x7f) << 9) | (uwData & 0x1ff);
+
+ pTwid->address = dwDevice;
+ pTwid->iaddress = dwRegAddr;
+ pTwid->isize = 0;
+
+ pTmpData[0] = (uwTmp & 0xff00) >> 8;
+ pTmpData[1] = uwTmp & 0xff;
+ TWID_Write(pTwid, pTmpData, 2, 0);
+}
+
+/**
+ * \brief Init WM8731 to DAC mode.
+ *
+ * \param pTwid Pointer to twi driver structure
+ * \param dwDevice Twi slave address.
+ * \return 0.
+ */
+uint8_t WM8731_DAC_Init( Twid *pTwid, uint32_t dwDevice )
+{
+ /* reset */
+ WM8731_Write(pTwid, dwDevice, WM8731_REG_RESET, 0);
+
+ /* analogue audio path control */
+ WM8731_Write(pTwid, dwDevice, WM8731_REG_ANALOGUE_PATH_CTRL, 0x14);
+
+ /* digital audio path control*/
+ WM8731_Write(pTwid, dwDevice, WM8731_REG_DIGITAL_PATH_CTRL, 0x00);
+
+ /* power down control */
+ WM8731_Write(pTwid, dwDevice, WM8731_REG_PWDOWN_CTRL, 0x60);
+
+ /* Active control*/
+ WM8731_Write(pTwid, dwDevice, WM8731_REG_ACTIVE_CTRL, 0x01);
+
+ return 0;
+}
+
+/**
+ * \brief Set WM8731 volume
+ *
+ * \param pTwid Pointer to twi driver structure
+ * \param dwDevice Twi slave address.
+ * \param uwValue Register value, valid value is between 0x30 to 0x7f
+ * \return 0.
+ */
+uint8_t WM8731_VolumeSet( Twid *pTwid, uint32_t dwDevice, uint16_t uwValue )
+{
+ uint16_t uwRegValue;
+
+ uwValue &= WM8731_LHPVOL_BITS;
+ uwRegValue = WM8731_LRHPBOTH_BIT | WM8731_LZCEN_BIT | uwValue;
+ WM8731_Write(pTwid, dwDevice, WM8731_REG_LEFT_HPOUT, uwRegValue);
+ uwRegValue = WM8731_RZCEN_BIT | WM8731_RLHPBOTH_BIT | uwValue;
+ WM8731_Write(pTwid, dwDevice, WM8731_REG_RIGHT_HPOUT, uwValue);
+ return 0;
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/xmodem.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/xmodem.c
new file mode 100644
index 0000000..e931767
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libboard_sam3x-ek/source/xmodem.c
@@ -0,0 +1,251 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaiimer below.
+ *
+ * - Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the disclaimer below in the documentation and/or
+ * other materials provided with the distribution.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * Implementation of XMODEM transfer protocols
+ *
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+#include <board.h>
+
+/*----------------------------------------------------------------------------
+ * Local definitions
+ *----------------------------------------------------------------------------*/
+/** The definitions are followed by the X/Ymodem protocol */
+#define XMDM_SOH 0x01 /**< Start of heading */
+#define XMDM_EOT 0x04 /**< End of text */
+#define XMDM_ACK 0x06 /**< Acknowledge */
+#define XMDM_NAK 0x15 /**< negative acknowledge */
+#define XMDM_CAN 0x18 /**< Cancel */
+#define XMDM_ESC 0x1b /**< Escape */
+
+#define CRC16POLY 0x1021 /**< CRC 16 polynom */
+#define PKTLEN_128 128 /**< Packet length */
+
+/*----------------------------------------------------------------------------
+ * Local variables
+ *----------------------------------------------------------------------------*/
+/** Xmodem transfer error indicator */
+int8_t cRrror;
+
+/*----------------------------------------------------------------------------
+ * Local functions
+ *----------------------------------------------------------------------------*/
+ /**
+ * \brief Transmit the character through xmodem protocol.
+ *
+ * \param ucChar Character to be transmitted.
+ */
+static void XMODEM_PutChar(uint8_t ucChar)
+{
+ UART_PutChar(ucChar);
+}
+
+/**
+ * \brief Get the character through xmodem protocol.
+ *
+ * \return The character received
+ */
+static uint8_t XMODEM_GetChar(void)
+{
+
+ return (uint8_t)UART_GetChar();
+}
+
+/**
+ * \brief Get calculated crc value for xmodem transfer
+ *
+ * \param ucChar The CRC original character.
+ * \param uwCrc Calculated CRC value.
+ * \return Calculated CRC value.
+ */
+static uint16_t XMODEM_GetCrc(int8_t ucChar, uint16_t uwCrc)
+{
+
+ uint16_t uwCmpt;
+
+ uwCrc = uwCrc ^ (int32_t) ucChar << 8;
+
+ for (uwCmpt= 0; uwCmpt < 8; uwCmpt++)
+ {
+ if (uwCrc & 0x8000)
+ uwCrc = uwCrc << 1 ^ CRC16POLY;
+ else
+ uwCrc = uwCrc << 1;
+ }
+
+ return (uwCrc & 0xFFFF);
+}
+
+/**
+ * \brief Get bytes through xmodem protocol.
+ *
+ * \param pData Pointer to the data buffer.
+ * \param dwLength Length of data expected.
+ * \return Bytes received
+ */
+static uint16_t XMODEM_Getbytes(int8_t *pData, uint32_t dwLength)
+{
+ uint16_t uwCrc = 0;
+ uint32_t dwCpt;
+ int8_t cChar;
+
+ for (dwCpt = 0; dwCpt < dwLength; ++dwCpt)
+ {
+ cChar = XMODEM_GetChar();
+
+ if (cRrror)
+ return 1;
+
+ uwCrc = XMODEM_GetCrc(cChar,uwCrc);
+
+ *pData++ = cChar;
+ }
+
+ return uwCrc;
+}
+
+/**
+ * \brief Get a packet through xmodem protocol
+ *
+ * \param pData Pointer to the data buffer.
+ * \param ucSno Sequnce number.
+ * \return 0 for sucess and other value for xmodem error
+ */
+static int32_t XMODEM_GetPacket(int8_t *pData, uint8_t ucSno)
+{
+ uint8_t cpSeq[2];
+ uint16_t uwCrc, uwXcrc;
+
+ XMODEM_Getbytes((int8_t *)cpSeq, 2);
+
+ uwXcrc = XMODEM_Getbytes(pData,PKTLEN_128);
+
+ if(cRrror)
+ return (-1);
+
+ /* An "endian independent way to combine the CRC bytes. */
+ uwCrc = (unsigned short)XMODEM_GetChar() << 8;
+ uwCrc += (unsigned short)XMODEM_GetChar();
+
+ if(cRrror == 1)
+ return (-1);
+
+ if ((uwCrc != uwXcrc) || (cpSeq[0] != ucSno) || (cpSeq[1] != (uint8_t) ((~(uint32_t)ucSno)&0xff)))
+ {
+ XMODEM_PutChar(XMDM_CAN);
+ return(-1);
+ }
+
+ return(0);
+}
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+ /**
+ * \brief Receive the files through xmodem protocol
+ *
+ * \param pBuffer Pointer to received buffers
+ * \return 0 for sucess and other value for xmodem error
+ */
+extern uint32_t XMODEM_ReceiveFile(int8_t *pBuffer)
+{
+ int32_t wTimeout;
+ int8_t cChar;
+ int32_t wDone;
+ uint8_t ucSno = 0x01;
+ uint32_t dwWavSize = 0;
+
+ /* Wait and put 'C' till start xmodem transfer */
+ while(1)
+ {
+ XMODEM_PutChar('C');
+
+ wTimeout = (BOARD_MCK/10);
+
+ while(!(UART_IsRxReady())&&wTimeout)
+ wTimeout--;
+
+ if (UART_IsRxReady())
+ break;
+ }
+
+ /* Begin to receive the data */
+ cRrror = 0;
+ wDone = 0;
+ while(wDone == 0)
+ {
+ cChar = (int8_t)XMODEM_GetChar();
+
+ if(cRrror)
+ return 0;
+
+ switch(cChar)
+ {
+ /* Start of transfer */
+ case XMDM_SOH:
+ wDone = XMODEM_GetPacket(pBuffer+dwWavSize, ucSno);
+ if(cRrror)
+ return 0;
+
+ if (wDone == 0)
+ {
+ ucSno++;
+ dwWavSize += PKTLEN_128;
+ }
+
+ XMODEM_PutChar(XMDM_ACK);
+
+ break;
+
+ /* End of transfer */
+ case XMDM_EOT:
+ XMODEM_PutChar(XMDM_ACK);
+ wDone = dwWavSize;
+ break;
+
+ case XMDM_CAN:
+ case XMDM_ESC:
+ default:
+ wDone = -1;
+ break;
+ }
+ }
+ return dwWavSize;
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/build/gcc/Makefile b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/build/gcc/Makefile
new file mode 100644
index 0000000..123fa0f
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/build/gcc/Makefile
@@ -0,0 +1,86 @@
+# ----------------------------------------------------------------------------
+# ATMEL Microcontroller Software Support
+# ----------------------------------------------------------------------------
+# Copyright (c) 2010, Atmel Corporation
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# - Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the disclaimer below.
+#
+# Atmel's name may not be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+# DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# ----------------------------------------------------------------------------
+
+# Makefile for compiling libchip
+SERIE = sam3x
+
+SUBMAKE_FILES=debug.mk gcc.mk iar.mk mdk.mk release.mk win.mk linux.mk sam3x.mk
+SUBMAKE_OPTIONS=--no-builtin-rules --no-builtin-variables
+SUBMAKE_VARS=
+
+#-------------------------------------------------------------------------------
+# Rules
+#-------------------------------------------------------------------------------
+
+all: $(SERIE)2 $(SERIE)4 $(SERIE)8
+
+$(SERIE)2: libchip_$(SERIE)2_gcc_dbg.a libchip_$(SERIE)2_gcc_rel.a
+
+libchip_$(SERIE)2_gcc_dbg.a:
+ @echo --- Making $@
+ @$(MAKE) CHIP=$(SERIE)2 DEBUG=1 $(SUBMAKE_OPTIONS) -f $(SERIE).mk
+
+libchip_$(SERIE)2_gcc_rel.a:
+ @echo --- Making $@
+ @$(MAKE) CHIP=$(SERIE)2 $(SUBMAKE_OPTIONS) -f $(SERIE).mk
+
+$(SERIE)4: libchip_$(SERIE)4_gcc_dbg.a libchip_$(SERIE)4_gcc_rel.a
+
+libchip_$(SERIE)4_gcc_dbg.a:
+ @echo --- Making $@
+ @$(MAKE) CHIP=$(SERIE)4 DEBUG=1 $(SUBMAKE_OPTIONS) -f $(SERIE).mk
+
+libchip_$(SERIE)4_gcc_rel.a:
+ @echo --- Making $@
+ @$(MAKE) CHIP=$(SERIE)4 $(SUBMAKE_OPTIONS) -f $(SERIE).mk
+
+$(SERIE)8: libchip_$(SERIE)8_gcc_dbg.a libchip_$(SERIE)8_gcc_rel.a
+
+libchip_$(SERIE)8_gcc_dbg.a:
+ @echo --- Making $@
+ @$(MAKE) CHIP=$(SERIE)8 DEBUG=1 $(SUBMAKE_OPTIONS) -f $(SERIE).mk
+
+libchip_$(SERIE)8_gcc_rel.a:
+ @echo --- Making $@
+ @$(MAKE) CHIP=$(SERIE)8 $(SUBMAKE_OPTIONS) -f $(SERIE).mk
+
+.PHONY: clean
+clean:
+ @echo --- Cleaning $(SERIE)2
+ @$(MAKE) CHIP=$(SERIE)2 $(SUBMAKE_OPTIONS) -f $(SERIE).mk $@
+ @$(MAKE) CHIP=$(SERIE)2 DEBUG=1 $(SUBMAKE_OPTIONS) -f $(SERIE).mk $@
+
+ @echo --- Cleaning $(SERIE)4
+ @$(MAKE) CHIP=$(SERIE)4 $(SUBMAKE_OPTIONS) -f $(SERIE).mk $@
+ @$(MAKE) CHIP=$(SERIE)4 DEBUG=1 $(SUBMAKE_OPTIONS) -f $(SERIE).mk $@
+
+ @echo --- Cleaning $(SERIE)8
+ @$(MAKE) CHIP=$(SERIE)8 $(SUBMAKE_OPTIONS) -f $(SERIE).mk $@
+ @$(MAKE) CHIP=$(SERIE)8 DEBUG=1 $(SUBMAKE_OPTIONS) -f $(SERIE).mk $@
+
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/build/gcc/debug.mk b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/build/gcc/debug.mk
new file mode 100644
index 0000000..c7f57b5
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/build/gcc/debug.mk
@@ -0,0 +1,18 @@
+
+# Trace level used for compilation
+# (can be overriden by adding TRACE_LEVEL=#number to the command-line)
+# TRACE_LEVEL_DEBUG 5
+# TRACE_LEVEL_INFO 4
+# TRACE_LEVEL_WARNING 3
+# TRACE_LEVEL_ERROR 2
+# TRACE_LEVEL_FATAL 1
+# TRACE_LEVEL_NO_TRACE 0
+TRACE_LEVEL = 3
+
+# Optimization level
+# -O1 Optimize
+# -O2 Optimize even more
+# -O3 Optimize yet more
+# -O0 Reduce compilation time and make debugging produce the expected results
+# -Os Optimize for size
+OPTIMIZATION = -g -O0 -D DEBUG
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/build/gcc/gcc.mk b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/build/gcc/gcc.mk
new file mode 100644
index 0000000..6ea095f
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/build/gcc/gcc.mk
@@ -0,0 +1,35 @@
+
+# Tool suffix when cross-compiling
+CROSS_COMPILE = arm-none-eabi-
+
+# Compilation tools
+AR = $(CROSS_COMPILE)ar
+CC = $(CROSS_COMPILE)gcc
+AS = $(CROSS_COMPILE)as
+#LD = $(CROSS_COMPILE)ld
+#SIZE = $(CROSS_COMPILE)size
+NM = $(CROSS_COMPILE)nm
+#OBJCOPY = $(CROSS_COMPILE)objcopy
+
+# Flags
+
+CFLAGS += -Wall -Wchar-subscripts -Wcomment -Wformat=2 -Wimplicit-int
+CFLAGS += -Werror-implicit-function-declaration -Wmain -Wparentheses
+CFLAGS += -Wsequence-point -Wreturn-type -Wswitch -Wtrigraphs -Wunused
+CFLAGS += -Wuninitialized -Wunknown-pragmas -Wfloat-equal -Wundef
+CFLAGS += -Wshadow -Wpointer-arith -Wbad-function-cast -Wwrite-strings
+CFLAGS += -Wsign-compare -Waggregate-return -Wstrict-prototypes
+CFLAGS += -Wmissing-prototypes -Wmissing-declarations
+CFLAGS += -Wformat -Wmissing-format-attribute -Wno-deprecated-declarations
+CFLAGS += -Wpacked -Wredundant-decls -Wnested-externs -Winline -Wlong-long
+CFLAGS += -Wunreachable-code
+CFLAGS += -Wcast-align
+#CFLAGS += -Wmissing-noreturn
+#CFLAGS += -Wconversion
+
+# To reduce application size use only integer printf function.
+CFLAGS += -Dprintf=iprintf
+
+CFLAGS += --param max-inline-insns-single=500 -mcpu=cortex-m3 -mthumb -mlong-calls -ffunction-sections
+CFLAGS += $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -DTRACE_LEVEL=$(TRACE_LEVEL)
+ASFLAGS = -mcpu=cortex-m3 -mthumb -Wall -g $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -D__ASSEMBLY__
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/build/gcc/iar.mk b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/build/gcc/iar.mk
new file mode 100644
index 0000000..cc78e08
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/build/gcc/iar.mk
@@ -0,0 +1,15 @@
+
+# Compilation tools
+AR = iarchive.exe
+CC = iccarm.exe
+LD = ilinkarm.exe
+SIZE =
+OBJCOPY =
+
+# Flags
+
+CFLAGS += $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -DTRACE_LEVEL=$(TRACE_LEVEL)
+
+ASFLAGS = $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -D__ASSEMBLY__
+
+LDFLAGS =
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/build/gcc/linux.mk b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/build/gcc/linux.mk
new file mode 100644
index 0000000..08d2f9f
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/build/gcc/linux.mk
@@ -0,0 +1,4 @@
+
+RM=rm -f
+RMDIR=rm -fr
+SEP=/ \ No newline at end of file
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/build/gcc/readme.txt b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/build/gcc/readme.txt
new file mode 100644
index 0000000..5b3e450
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/build/gcc/readme.txt
@@ -0,0 +1,7 @@
+This makefile allows build of libchip_*_???.a
+
+where
+* could be sam3x2, sam3x4, sam3x8
+??? could be dbg and rel (debug, release)
+
+It checks for source files (C and assembler) from folders ../../source and ../../cmsis then compiles them to build given library
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/build/gcc/release.mk b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/build/gcc/release.mk
new file mode 100644
index 0000000..74b2686
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/build/gcc/release.mk
@@ -0,0 +1,18 @@
+
+# Trace level used for compilation
+# (can be overriden by adding TRACE_LEVEL=#number to the command-line)
+# TRACE_LEVEL_DEBUG 5
+# TRACE_LEVEL_INFO 4
+# TRACE_LEVEL_WARNING 3
+# TRACE_LEVEL_ERROR 2
+# TRACE_LEVEL_FATAL 1
+# TRACE_LEVEL_NO_TRACE 0
+TRACE_LEVEL = 1
+
+# Optimization level
+# -O1 Optimize
+# -O2 Optimize even more
+# -O3 Optimize yet more
+# -O0 Reduce compilation time and make debugging produce the expected results
+# -Os Optimize for size
+OPTIMIZATION = -Os
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/build/gcc/sam3x.mk b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/build/gcc/sam3x.mk
new file mode 100644
index 0000000..0e391d7
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/build/gcc/sam3x.mk
@@ -0,0 +1,174 @@
+# ----------------------------------------------------------------------------
+# ATMEL Microcontroller Software Support
+# ----------------------------------------------------------------------------
+# Copyright (c) 2010, Atmel Corporation
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# - Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the disclaimer below.
+#
+# Atmel's name may not be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+# DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# ----------------------------------------------------------------------------
+
+# Makefile for compiling libchip
+.SUFFIXES: .o .a .c .s
+SUB_MAKEFILES=debug.mk gcc.mk iar.mk mdk.mk release.mk win.mk linux.mk sam3x.mk
+
+LIBNAME=libchip
+TOOLCHAIN=gcc
+
+ifeq ($(CHIP),)
+$(error CHIP not defined)
+endif
+
+#-------------------------------------------------------------------------------
+# we detect OS (Linux/Windows/Cygwin)
+# not defined for Cygwin
+#ifdef $(OS)
+ifeq ($(OS), Windows_NT)
+include win.mk
+else
+include linux.mk
+endif
+#else
+## Cygwin case
+#include linux.mk
+#endif
+
+#-------------------------------------------------------------------------------
+# Path
+#-------------------------------------------------------------------------------
+
+# Output directories
+OUTPUT_BIN = ../../lib
+
+# Libraries
+PROJECT_BASE_PATH = ../..
+
+#-------------------------------------------------------------------------------
+# Files
+#-------------------------------------------------------------------------------
+
+vpath %.h $(PROJECT_BASE_PATH)/include $(PROJECT_BASE_PATH)/cmsis $(PROJECT_BASE_PATH)/../usb/include
+vpath %.c $(PROJECT_BASE_PATH)/source $(PROJECT_BASE_PATH)/cmsis
+vpath %.s $(PROJECT_BASE_PATH)/source $(PROJECT_BASE_PATH)/cmsis
+
+VPATH+=$(PROJECT_BASE_PATH)/source
+VPATH+=$(PROJECT_BASE_PATH)/cmsis
+
+INCLUDES = -I$(PROJECT_BASE_PATH)
+INCLUDES += -I$(PROJECT_BASE_PATH)/include
+INCLUDES += -I$(PROJECT_BASE_PATH)/cmsis
+INCLUDES += -I$(PROJECT_BASE_PATH)/../usb/include
+
+#-------------------------------------------------------------------------------
+ifdef DEBUG
+include debug.mk
+else
+include release.mk
+endif
+
+#-------------------------------------------------------------------------------
+# Tools
+#-------------------------------------------------------------------------------
+
+include $(TOOLCHAIN).mk
+
+
+#-------------------------------------------------------------------------------
+ifdef DEBUG
+OUTPUT_OBJ=debug
+OUTPUT_LIB=$(LIBNAME)_$(CHIP)_$(TOOLCHAIN)_dbg.a
+else
+OUTPUT_OBJ=release
+OUTPUT_LIB=$(LIBNAME)_$(CHIP)_$(TOOLCHAIN)_rel.a
+endif
+
+OUTPUT_PATH=$(OUTPUT_OBJ)_$(CHIP)
+
+#-------------------------------------------------------------------------------
+# C source files and objects
+#-------------------------------------------------------------------------------
+C_SRC=$(wildcard $(PROJECT_BASE_PATH)/source/*.c)
+C_SRC+=$(wildcard $(PROJECT_BASE_PATH)/cmsis/*.c)
+
+C_OBJ_TEMP=$(patsubst %.c, %.o, $(notdir $(C_SRC)))
+
+# during development, remove some files
+C_OBJ_FILTER=hsmci_pdc.o mci_cmd.o supc.o
+# TODO: remove temporarily, should be included when those files are ok
+C_OBJ_FILTER+=can.o dmacd.o mci_hs.o
+C_OBJ_FILTER+=adc.o eefc.o flashd.o
+
+C_OBJ=$(filter-out $(C_OBJ_FILTER), $(C_OBJ_TEMP))
+
+#-------------------------------------------------------------------------------
+# Assembler source files and objects
+#-------------------------------------------------------------------------------
+A_SRC=$(wildcard $(PROJECT_BASE_PATH)/source/*.s)
+A_SRC+=$(wildcard $(PROJECT_BASE_PATH)/cmsis/*.s)
+
+A_OBJ_TEMP=$(patsubst %.s, %.o, $(notdir $(A_SRC)))
+
+# during development, remove some files
+A_OBJ_FILTER=
+
+A_OBJ=$(filter-out $(A_OBJ_FILTER), $(A_OBJ_TEMP))
+
+#-------------------------------------------------------------------------------
+# Rules
+#-------------------------------------------------------------------------------
+all: $(CHIP)
+
+$(CHIP): create_output $(OUTPUT_LIB)
+
+.PHONY: create_output
+create_output: $(subst /,$(SEP),$(OUTPUT_BIN)) $(OUTPUT_PATH)
+# @echo --- Preparing $(CHIP) files $(OUTPUT_PATH) $(OUTPUT_BIN)
+# @echo -------------------------
+# @echo *$(C_SRC)
+# @echo -------------------------
+# @echo *$(C_OBJ)
+# @echo -------------------------
+# @echo *$(addprefix $(OUTPUT_PATH)/, $(C_OBJ))
+# @echo -------------------------
+# @echo *$(A_SRC)
+# @echo -------------------------
+
+$(subst /,$(SEP),$(OUTPUT_BIN)) $(OUTPUT_PATH):
+ mkdir $@
+
+$(addprefix $(OUTPUT_PATH)/,$(C_OBJ)): $(OUTPUT_PATH)/%.o: %.c
+ @$(CC) -c $(CFLAGS) $< -o $@
+
+$(addprefix $(OUTPUT_PATH)/,$(A_OBJ)): $(OUTPUT_PATH)/%.o: %.s
+ @$(AS) -c $(ASFLAGS) $< -o $@
+
+$(OUTPUT_LIB): $(addprefix $(OUTPUT_PATH)/, $(C_OBJ)) $(addprefix $(OUTPUT_PATH)/, $(A_OBJ))
+ @$(AR) -r $(OUTPUT_BIN)/$@ $^
+ @$(NM) $(OUTPUT_BIN)/$@ > $(OUTPUT_BIN)/$@.txt
+
+.PHONY: clean
+clean:
+ @echo - Cleaning $(CHIP) files [$(OUTPUT_OBJ)]
+ -@cs-rm -Rf $(OUTPUT_PATH) 1>NUL 2>&1
+ -@cs-rm -Rf $(subst /,$(SEP),$(OUTPUT_BIN)/$(OUTPUT_LIB)) 1>NUL 2>&1
+ -@cs-rm -Rf $(subst /,$(SEP),$(OUTPUT_BIN)/$(OUTPUT_LIB).txt) 1>NUL 2>&1
+
+$(addprefix $(OUTPUT_PATH)/,$(C_OBJ)): $(OUTPUT_PATH)/%.o: $(PROJECT_BASE_PATH)/chip.h $(wildcard $(PROJECT_BASE_PATH)/include/*.h) $(wildcard $(PROJECT_BASE_PATH)/cmsis/*.h)
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/build/gcc/win.mk b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/build/gcc/win.mk
new file mode 100644
index 0000000..67b3fa7
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/build/gcc/win.mk
@@ -0,0 +1,4 @@
+
+RM=del
+RMDIR=rmdir /s /q
+SEP=\ \ No newline at end of file
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/chip.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/chip.h
new file mode 100644
index 0000000..a3f51a1
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/chip.h
@@ -0,0 +1,113 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+#ifndef _LIB_SAM3X_
+#define _LIB_SAM3X_
+
+/*
+ * Peripherals registers definitions
+ */
+#if !(defined sam3x8) && !(defined sam3x4) && !(defined sam3x2)
+# error SoC not defined
+#endif
+
+#include "include/SAM3XA.h"
+
+
+/* Define attribute */
+#if defined ( __CC_ARM ) /* Keil µVision 4 */
+ #define WEAK __attribute__ ((weak))
+#elif defined ( __ICCARM__ ) /* IAR Ewarm 5.41+ */
+ #define WEAK __weak
+#elif defined ( __GNUC__ ) /* GCC CS3 2009q3-68 */
+ #define WEAK __attribute__ ((weak))
+#endif
+
+/* Define NO_INIT attribute */
+#if defined ( __CC_ARM )
+ #define NO_INIT
+#elif defined ( __ICCARM__ )
+ #define NO_INIT __no_init
+#elif defined ( __GNUC__ )
+ #define NO_INIT
+#endif
+
+/*
+ * SAM3X Embedded IP features.
+ * Define the feature to use it. Comment it out to not use it.
+ */
+/* Indicate chip has a nandflash controller (NFC). */
+#define CHIP_NAND_CTRL
+
+/* Indicate chip has a hardware ECC. Note: NFC must be used if using hardware ECC. */
+#if defined(CHIP_NAND_CTRL)
+#define HARDWARE_ECC
+#endif
+
+/*
+ * Core
+ */
+#include "include/exceptions.h"
+
+/*
+ * Peripherals
+ */
+#include "include/adc.h"
+#include "include/async.h"
+#include "include/can.h"
+#include "include/chipid.h"
+#include "include/dacc.h"
+#include "include/dmac.h"
+#include "include/eefc.h"
+#include "include/emac.h"
+#include "include/flashd.h"
+#include "include/hsmci.h"
+#include "include/matrix.h"
+#include "include/pio.h"
+#include "include/pio_pin.h"
+#include "include/pio_it.h"
+#include "include/pio_pin_it.h"
+#include "include/pmc.h"
+#include "include/pwm.h"
+#include "include/rstc.h"
+#include "include/rtc.h"
+#include "include/rtt.h"
+#include "include/sdramc.h"
+#include "include/smc.h"
+#include "include/spi.h"
+#include "include/ssc.h"
+#include "include/tc.h"
+#include "include/trng.h"
+#include "include/twi.h"
+#include "include/usart.h"
+#include "include/wdt.h"
+
+#include "include/trace.h"
+
+#endif /* _LIB_SAM3X_ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/cmsis/CMSIS_Core.htm b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/cmsis/CMSIS_Core.htm
new file mode 100644
index 0000000..6fd131e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/cmsis/CMSIS_Core.htm
@@ -0,0 +1,1337 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html xmlns:p="urn:schemas-microsoft-com:office:powerpoint" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
+
+ <title>CMSIS: Cortex Microcontroller Software Interface Standard</title><meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+ <meta name="ProgId" content="FrontPage.Editor.Document">
+ <style>
+<!--
+/*-----------------------------------------------------------Keil Software CHM Style Sheet
+-----------------------------------------------------------*/
+body { color: #000000; background-color: #FFFFFF; font-size: 75%; font-family: Verdana, Arial, 'Sans Serif' }
+a:link { color: #0000FF; text-decoration: underline }
+a:visited { color: #0000FF; text-decoration: underline }
+a:active { color: #FF0000; text-decoration: underline }
+a:hover { color: #FF0000; text-decoration: underline }
+h1 { font-family: Verdana; font-size: 18pt; color: #000080; font-weight: bold; text-align: Center; margin-right: 3 }
+h2 { font-family: Verdana; font-size: 14pt; color: #000080; font-weight: bold; background-color: #CCCCCC; margin-top: 24; margin-bottom: 3; padding: 6 }
+h3 { font-family: Verdana; font-size: 10pt; font-weight: bold; background-color: #CCCCCC; margin-top: 24; margin-bottom: 3; padding: 6 }
+pre { font-family: Courier New; font-size: 10pt; background-color: #CCFFCC; margin-left: 24; margin-right: 24 }
+ul { list-style-type: square; margin-top: 6pt; margin-bottom: 0 }
+ol { margin-top: 6pt; margin-bottom: 0 }
+li { clear: both; margin-bottom: 6pt }
+table { font-size: 100%; border-width: 0; padding: 0 }
+th { color: #FFFFFF; background-color: #000080; text-align: left; vertical-align: bottom; padding-right: 6pt }
+tr { text-align: left; vertical-align: top }
+td { text-align: left; vertical-align: top; padding-right: 6pt }
+.ToolT { font-size: 8pt; color: #808080 }
+.TinyT { font-size: 8pt; text-align: Center }
+code { color: #000000; background-color: #E0E0E0; font-family: 'Courier New', Courier; line-height: 120%; font-style: normal }
+/*-----------------------------------------------------------Notes
+-----------------------------------------------------------*/
+p.note { font-weight: bold; clear: both; margin-bottom: 3pt; padding-top: 6pt }
+/*-----------------------------------------------------------Expanding/Contracting Divisions
+-----------------------------------------------------------*/
+#expand { text-decoration: none; margin-bottom: 3pt }
+img.expand { border-style: none; border-width: medium }
+div.expand { display: none; margin-left: 9pt; margin-top: 0 }
+/*-----------------------------------------------------------Where List Tags
+-----------------------------------------------------------*/
+p.wh { font-weight: bold; clear: both; margin-top: 6pt; margin-bottom: 3pt }
+table.wh { width: 100% }
+td.whItem { white-space: nowrap; font-style: italic; padding-right: 6pt; padding-bottom: 6pt }
+td.whDesc { padding-bottom: 6pt }
+/*-----------------------------------------------------------Keil Table Tags
+-----------------------------------------------------------*/
+table.kt { width: 100%; border: 1pt solid #000000 }
+th.kt { white-space: nowrap; border-bottom: 1pt solid #000000; padding-left: 6pt; padding-right: 6pt; padding-top: 4pt; padding-bottom: 4pt }
+tr.kt { }
+td.kt { color: #000000; background-color: #E0E0E0; border-top: 1pt solid #A0A0A0; padding-left: 6pt; padding-right: 6pt; padding-top: 2pt; padding-bottom: 2pt }
+/*----------------------------------------------------------------------------------------------------------------------*/
+ .style1 {
+ background-color: #E0E0E0;
+}
+.O
+ {color:#1D315B;
+ font-size:149%;}
+ -->
+ </style></head>
+<body>
+<h1>Cortex Microcontroller Software Interface Standard</h1>
+
+<p align="center">This file describes the Cortex Microcontroller Software Interface Standard (CMSIS).</p>
+<p align="center">Version: 1.30 - 30. October 2009</p>
+
+<p class="TinyT">Information in this file, the accompany manuals, and software is<br>
+ Copyright © ARM Ltd.<br>All rights reserved.
+</p>
+
+<hr>
+
+<p><span style="FONT-WEIGHT: bold">Revision History</span></p>
+<ul>
+ <li>Version 1.00: initial release. </li>
+ <li>Version 1.01: added __LDREX<em>x</em>, __STREX<em>x</em>, and __CLREX.</li>
+ <li>Version 1.02: added Cortex-M0. </li>
+ <li>Version 1.10: second review. </li>
+ <li>Version 1.20: third review. </li>
+ <li>Version 1.30 PRE-RELEASE: reworked Startup Concept, additional Debug Functionality.</li>
+ <li>Version 1.30 2nd PRE-RELEASE: changed folder structure, added doxyGen comments, added Bit definitions.</li>
+ <li>Version 1.30: updated Device Support Packages.</li>
+</ul>
+
+<hr>
+
+<h2>Contents</h2>
+
+<ol>
+ <li class="LI2"><a href="#1">About</a></li>
+ <li class="LI2"><a href="#2">Coding Rules and Conventions</a></li>
+ <li class="LI2"><a href="#3">CMSIS Files</a></li>
+ <li class="LI2"><a href="#4">Core Peripheral Access Layer</a></li>
+ <li class="LI2"><a href="#5">CMSIS Example</a></li>
+</ol>
+
+<h2><a name="1"></a>About</h2>
+
+<p>
+ The <strong>Cortex Microcontroller Software Interface Standard (CMSIS)</strong> answers the challenges
+ that are faced when software components are deployed to physical microcontroller devices based on a
+ Cortex-M0 or Cortex-M3 processor. The CMSIS will be also expanded to future Cortex-M
+ processor cores (the term Cortex-M is used to indicate that). The CMSIS is defined in close co-operation
+ with various silicon and software vendors and provides a common approach to interface to peripherals,
+ real-time operating systems, and middleware components.
+</p>
+
+<p>ARM provides as part of the CMSIS the following software layers that are
+available for various compiler implementations:</p>
+<ul>
+ <li><strong>Core Peripheral Access Layer</strong>: contains name definitions,
+ address definitions and helper functions to
+ access core registers and peripherals. It defines also a device
+ independent interface for RTOS Kernels that includes debug channel
+ definitions.</li>
+</ul>
+
+<p>These software layers are expanded by Silicon partners with:</p>
+<ul>
+ <li><strong>Device Peripheral Access Layer</strong>: provides definitions
+ for all device peripherals</li>
+ <li><strong>Access Functions for Peripherals (optional)</strong>: provides
+ additional helper functions for peripherals</li>
+</ul>
+
+<p>CMSIS defines for a Cortex-M Microcontroller System:</p>
+<ul>
+ <li style="text-align: left;">A common way to access peripheral registers
+ and a common way to define exception vectors.</li>
+ <li style="text-align: left;">The register names of the <strong>Core
+ Peripherals</strong> and<strong> </strong>the names of the <strong>Core
+ Exception Vectors</strong>.</li>
+ <li>An device independent interface for RTOS Kernels including a debug
+ channel.</li>
+</ul>
+
+<p>
+ By using CMSIS compliant software components, the user can easier re-use template code.
+ CMSIS is intended to enable the combination of software components from multiple middleware vendors.
+</p>
+
+<h2><a name="2"></a>Coding Rules and Conventions</h2>
+
+<p>
+ The following section describes the coding rules and conventions used in the CMSIS
+ implementation. It contains also information about data types and version number information.
+</p>
+
+<h3>Essentials</h3>
+<ul>
+ <li>The CMSIS C code conforms to MISRA 2004 rules. In case of MISRA violations,
+ there are disable and enable sequences for PC-LINT inserted.</li>
+ <li>ANSI standard data types defined in the ANSI C header file
+ <strong>&lt;stdint.h&gt;</strong> are used.</li>
+ <li>#define constants that include expressions must be enclosed by
+ parenthesis.</li>
+ <li>Variables and parameters have a complete data type.</li>
+ <li>All functions in the <strong>Core Peripheral Access Layer</strong> are
+ re-entrant.</li>
+ <li>The <strong>Core Peripheral Access Layer</strong> has no blocking code
+ (which means that wait/query loops are done at other software layers).</li>
+ <li>For each exception/interrupt there is definition for:
+ <ul>
+ <li>an exception/interrupt handler with the postfix <strong>_Handler </strong>
+ (for exceptions) or <strong>_IRQHandler</strong> (for interrupts).</li>
+ <li>a default exception/interrupt handler (weak definition) that contains an endless loop.</li>
+ <li>a #define of the interrupt number with the postfix <strong>_IRQn</strong>.</li>
+ </ul></li>
+</ul>
+
+<h3>Recommendations</h3>
+
+<p>The CMSIS recommends the following conventions for identifiers.</p>
+<ul>
+ <li><strong>CAPITAL</strong> names to identify Core Registers, Peripheral Registers, and CPU Instructions.</li>
+ <li><strong>CamelCase</strong> names to identify peripherals access functions and interrupts.</li>
+ <li><strong>PERIPHERAL_</strong> prefix to identify functions that belong to specify peripherals.</li>
+ <li><strong>Doxygen</strong> comments for all functions are included as described under <strong>Function Comments</strong> below.</li>
+</ul>
+
+<b>Comments</b>
+
+<ul>
+ <li>Comments use the ANSI C90 style (<em>/* comment */</em>) or C++ style
+ (<em>// comment</em>). It is assumed that the programming tools support today
+ consistently the C++ comment style.</li>
+ <li><strong>Function Comments</strong> provide for each function the following information:
+ <ul>
+ <li>one-line brief function overview.</li>
+ <li>detailed parameter explanation.</li>
+ <li>detailed information about return values.</li>
+ <li>detailed description of the actual function.</li>
+ </ul>
+ <p><b>Doxygen Example:</b></p>
+ <pre>
+/**
+ * @brief Enable Interrupt in NVIC Interrupt Controller
+ * @param IRQn interrupt number that specifies the interrupt
+ * @return none.
+ * Enable the specified interrupt in the NVIC Interrupt Controller.
+ * Other settings of the interrupt such as priority are not affected.
+ */</pre>
+ </li>
+</ul>
+
+<h3>Data Types and IO Type Qualifiers</h3>
+
+<p>
+ The <strong>Cortex-M HAL</strong> uses the standard types from the standard ANSI C header file
+ <strong>&lt;stdint.h&gt;</strong>. <strong>IO Type Qualifiers</strong> are used to specify the access
+ to peripheral variables. IO Type Qualifiers are indented to be used for automatic generation of
+ debug information of peripheral registers.
+</p>
+
+<table class="kt" border="0" cellpadding="0" cellspacing="0">
+ <tbody>
+ <tr>
+ <th class="kt" nowrap="nowrap">IO Type Qualifier</th>
+ <th class="kt">#define</th>
+ <th class="kt">Description</th>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">__I</td>
+ <td class="kt">volatile const</td>
+ <td class="kt">Read access only</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">__O</td>
+ <td class="kt">volatile</td>
+ <td class="kt">Write access only</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">__IO</td>
+ <td class="kt">volatile</td>
+ <td class="kt">Read and write access</td>
+ </tr>
+ </tbody>
+</table>
+
+<h3>CMSIS Version Number</h3>
+<p>
+ File <strong>core_cm3.h</strong> contains the version number of the CMSIS with the following define:
+</p>
+
+<pre>
+#define __CM3_CMSIS_VERSION_MAIN (0x01) /* [31:16] main version */
+#define __CM3_CMSIS_VERSION_SUB (0x30) /* [15:0] sub version */
+#define __CM3_CMSIS_VERSION ((__CM3_CMSIS_VERSION_MAIN &lt;&lt; 16) | __CM3_CMSIS_VERSION_SUB)</pre>
+
+<p>
+ File <strong>core_cm0.h</strong> contains the version number of the CMSIS with the following define:
+</p>
+
+<pre>
+#define __CM0_CMSIS_VERSION_MAIN (0x01) /* [31:16] main version */
+#define __CM0_CMSIS_VERSION_SUB (0x30) /* [15:0] sub version */
+#define __CM0_CMSIS_VERSION ((__CM0_CMSIS_VERSION_MAIN &lt;&lt; 16) | __CM0_CMSIS_VERSION_SUB)</pre>
+
+
+<h3>CMSIS Cortex Core</h3>
+<p>
+ File <strong>core_cm3.h</strong> contains the type of the CMSIS Cortex-M with the following define:
+</p>
+
+<pre>
+#define __CORTEX_M (0x03)</pre>
+
+<p>
+ File <strong>core_cm0.h</strong> contains the type of the CMSIS Cortex-M with the following define:
+</p>
+
+<pre>
+#define __CORTEX_M (0x00)</pre>
+
+
+<h2><a name="3"></a>CMSIS Files</h2>
+<p>
+ This section describes the Files provided in context with the CMSIS to access the Cortex-M
+ hardware and peripherals.
+</p>
+
+<table class="kt" border="0" cellpadding="0" cellspacing="0">
+ <tbody>
+ <tr>
+ <th class="kt" nowrap="nowrap">File</th>
+ <th class="kt">Provider</th>
+ <th class="kt">Description</th>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap"><i>device.h</i></td>
+ <td class="kt">Device specific (provided by silicon partner)</td>
+ <td class="kt">Defines the peripherals for the actual device. The file may use
+ several other include files to define the peripherals of the actual device.</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">core_cm0.h</td>
+ <td class="kt">ARM (for RealView ARMCC, IAR, and GNU GCC)</td>
+ <td class="kt">Defines the core peripherals for the Cortex-M0 CPU and core peripherals.</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">core_cm3.h</td>
+ <td class="kt">ARM (for RealView ARMCC, IAR, and GNU GCC)</td>
+ <td class="kt">Defines the core peripherals for the Cortex-M3 CPU and core peripherals.</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">core_cm0.c</td>
+ <td class="kt">ARM (for RealView ARMCC, IAR, and GNU GCC)</td>
+ <td class="kt">Provides helper functions that access core registers.</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">core_cm3.c</td>
+ <td class="kt">ARM (for RealView ARMCC, IAR, and GNU GCC)</td>
+ <td class="kt">Provides helper functions that access core registers.</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">startup<i>_device</i></td>
+ <td class="kt">ARM (adapted by compiler partner / silicon partner)</td>
+ <td class="kt">Provides the Cortex-M startup code and the complete (device specific) Interrupt Vector Table</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">system<i>_device</i></td>
+ <td class="kt">ARM (adapted by silicon partner)</td>
+ <td class="kt">Provides a device specific configuration file for the device. It configures the device initializes
+ typically the oscillator (PLL) that is part of the microcontroller device</td>
+ </tr>
+ </tbody>
+</table>
+
+<h3><em>device.h</em></h3>
+
+<p>
+ The file <em><strong>device.h</strong></em> is provided by the silicon vendor and is the
+ <u><strong>central include file</strong></u> that the application programmer is using in
+ the C source code. This file contains:
+</p>
+<ul>
+ <li>
+ <p><strong>Interrupt Number Definition</strong>: provides interrupt numbers
+ (IRQn) for all core and device specific exceptions and interrupts.</p>
+ </li>
+ <li>
+ <p><strong>Configuration for core_cm0.h / core_cm3.h</strong>: reflects the
+ actual configuration of the Cortex-M processor that is part of the actual
+ device. As such the file <strong>core_cm0.h / core_cm3.h</strong> is included that
+ implements access to processor registers and core peripherals. </p>
+ </li>
+ <li>
+ <p><strong>Device Peripheral Access Layer</strong>: provides definitions
+ for all device peripherals. It contains all data structures and the address
+ mapping for the device specific peripherals. </p>
+ </li>
+ <li><strong>Access Functions for Peripherals (optional)</strong>: provides
+ additional helper functions for peripherals that are useful for programming
+ of these peripherals. Access Functions may be provided as inline functions
+ or can be extern references to a device specific library provided by the
+ silicon vendor.</li>
+</ul>
+
+
+<h4><strong>Interrupt Number Definition</strong></h4>
+
+<p>To access the device specific interrupts the device.h file defines IRQn
+numbers for the complete device using a enum typedef as shown below:</p>
+<pre>
+typedef enum IRQn
+{
+/****** Cortex-M3 Processor Exceptions/Interrupt Numbers ************************************************/
+ NonMaskableInt_IRQn = -14, /*!&lt; 2 Non Maskable Interrupt */
+ HardFault_IRQn = -13, /*!&lt; 3 Cortex-M3 Hard Fault Interrupt */
+ MemoryManagement_IRQn = -12, /*!&lt; 4 Cortex-M3 Memory Management Interrupt */
+ BusFault_IRQn = -11, /*!&lt; 5 Cortex-M3 Bus Fault Interrupt */
+ UsageFault_IRQn = -10, /*!&lt; 6 Cortex-M3 Usage Fault Interrupt */
+ SVCall_IRQn = -5, /*!&lt; 11 Cortex-M3 SV Call Interrupt */
+ DebugMonitor_IRQn = -4, /*!&lt; 12 Cortex-M3 Debug Monitor Interrupt */
+ PendSV_IRQn = -2, /*!&lt; 14 Cortex-M3 Pend SV Interrupt */
+ SysTick_IRQn = -1, /*!&lt; 15 Cortex-M3 System Tick Interrupt */
+/****** STM32 specific Interrupt Numbers ****************************************************************/
+ WWDG_STM_IRQn = 0, /*!&lt; Window WatchDog Interrupt */
+ PVD_STM_IRQn = 1, /*!&lt; PVD through EXTI Line detection Interrupt */
+ :
+ :
+ } IRQn_Type;</pre>
+
+
+<h4>Configuration for core_cm0.h / core_cm3.h</h4>
+<p>
+ The Cortex-M core configuration options which are defined for each device implementation. Some
+ configuration options are reflected in the CMSIS layer using the #define settings described below.
+</p>
+<p>
+ To access core peripherals file <em><strong>device.h</strong></em> includes file <b>core_cm0.h / core_cm3.h</b>.
+ Several features in <strong>core_cm0.h / core_cm3.h</strong> are configured by the following defines that must be
+ defined before <strong>#include &lt;core_cm0.h&gt;</strong> / <strong>#include &lt;core_cm3.h&gt;</strong>
+ preprocessor command.
+</p>
+
+<table class="kt" border="0" cellpadding="0" cellspacing="0">
+ <tbody>
+ <tr>
+ <th class="kt" nowrap="nowrap">#define</th>
+ <th class="kt" nowrap="nowrap">File</th>
+ <th class="kt" nowrap="nowrap">Value</th>
+ <th class="kt">Description</th>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">__NVIC_PRIO_BITS</td>
+ <td class="kt">core_cm0.h</td>
+ <td class="kt" nowrap="nowrap">(2)</td>
+ <td class="kt">Number of priority bits implemented in the NVIC (device specific)</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">__NVIC_PRIO_BITS</td>
+ <td class="kt">core_cm3.h</td>
+ <td class="kt" nowrap="nowrap">(2 ... 8)</td>
+ <td class="kt">Number of priority bits implemented in the NVIC (device specific)</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">__MPU_PRESENT</td>
+ <td class="kt">core_cm0.h, core_cm3.h</td>
+ <td class="kt" nowrap="nowrap">(0, 1)</td>
+ <td class="kt">Defines if an MPU is present or not</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">__Vendor_SysTickConfig</td>
+ <td class="kt">core_cm0.h, core_cm3.h</td>
+ <td class="kt" nowrap="nowrap">(1)</td>
+ <td class="kt">When this define is setup to 1, the <strong>SysTickConfig</strong> function
+ in <strong>core_cm3.h</strong> is excluded. In this case the <em><strong>device.h</strong></em>
+ file must contain a vendor specific implementation of this function.</td>
+ </tr>
+ </tbody>
+</table>
+
+
+<h4>Device Peripheral Access Layer</h4>
+<p>
+ Each peripheral uses a prefix which consists of <strong>&lt;device abbreviation&gt;_</strong>
+ and <strong>&lt;peripheral name&gt;_</strong> to identify peripheral registers that access this
+ specific peripheral. The intention of this is to avoid name collisions caused
+ due to short names. If more than one peripheral of the same type exists,
+ identifiers have a postfix (digit or letter). For example:
+</p>
+<ul>
+ <li>&lt;device abbreviation&gt;_UART_Type: defines the generic register layout for all UART channels in a device.
+ <pre>
+typedef struct
+{
+ union {
+ __I uint8_t RBR; /*!< Offset: 0x000 Receiver Buffer Register */
+ __O uint8_t THR; /*!< Offset: 0x000 Transmit Holding Register */
+ __IO uint8_t DLL; /*!< Offset: 0x000 Divisor Latch LSB */
+ uint32_t RESERVED0;
+ };
+ union {
+ __IO uint8_t DLM; /*!< Offset: 0x004 Divisor Latch MSB */
+ __IO uint32_t IER; /*!< Offset: 0x004 Interrupt Enable Register */
+ };
+ union {
+ __I uint32_t IIR; /*!< Offset: 0x008 Interrupt ID Register */
+ __O uint8_t FCR; /*!< Offset: 0x008 FIFO Control Register */
+ };
+ __IO uint8_t LCR; /*!< Offset: 0x00C Line Control Register */
+ uint8_t RESERVED1[7];
+ __I uint8_t LSR; /*!< Offset: 0x014 Line Status Register */
+ uint8_t RESERVED2[7];
+ __IO uint8_t SCR; /*!< Offset: 0x01C Scratch Pad Register */
+ uint8_t RESERVED3[3];
+ __IO uint32_t ACR; /*!< Offset: 0x020 Autobaud Control Register */
+ __IO uint8_t ICR; /*!< Offset: 0x024 IrDA Control Register */
+ uint8_t RESERVED4[3];
+ __IO uint8_t FDR; /*!< Offset: 0x028 Fractional Divider Register */
+ uint8_t RESERVED5[7];
+ __IO uint8_t TER; /*!< Offset: 0x030 Transmit Enable Register */
+ uint8_t RESERVED6[39];
+ __I uint8_t FIFOLVL; /*!< Offset: 0x058 FIFO Level Register */
+} LPC_UART_TypeDef;</pre>
+ </li>
+ <li>&lt;device abbreviation&gt;_UART1: is a pointer to a register structure that refers to a specific UART.
+ For example UART1-&gt;DR is the data register of UART1.
+ <pre>
+#define LPC_UART2 ((LPC_UART_TypeDef *) LPC_UART2_BASE )
+#define LPC_UART3 ((LPC_UART_TypeDef *) LPC_UART3_BASE )</pre>
+ </li>
+</ul>
+
+<h5>Minimal Requiements</h5>
+<p>
+ To access the peripheral registers and related function in a device the files <strong><em>device.h</em></strong>
+ and <strong>core_cm0.h</strong> / <strong>core_cm3.h</strong> defines as a minimum:
+</p>
+<ul>
+ <li>The <strong>Register Layout Typedef</strong> for each peripheral that defines all register names.
+ Names that start with RESERVE are used to introduce space into the structure to adjust the addresses of
+ the peripheral registers. For example:
+ <pre>
+typedef struct {
+ __IO uint32_t CTRL; /* SysTick Control and Status Register */
+ __IO uint32_t LOAD; /* SysTick Reload Value Register */
+ __IO uint32_t VAL; /* SysTick Current Value Register */
+ __I uint32_t CALIB; /* SysTick Calibration Register */
+ } SysTick_Type;</pre>
+ </li>
+
+ <li>
+ <strong>Base Address</strong> for each peripheral (in case of multiple peripherals
+ that use the same <strong>register layout typedef</strong> multiple base addresses are defined). For example:
+ <pre>
+#define SysTick_BASE (SCS_BASE + 0x0010) /* SysTick Base Address */</pre>
+ </li>
+
+ <li>
+ <strong>Access Definition</strong> for each peripheral (in case of multiple peripherals that use
+ the same <strong>register layout typedef</strong> multiple access definitions exist, i.e. LPC_UART0,
+ LPC_UART2). For Example:
+ <pre>
+#define SysTick ((SysTick_Type *) SysTick_BASE) /* SysTick access definition */</pre>
+ </li>
+</ul>
+
+<p>
+ These definitions allow to access the peripheral registers from user code with simple assignments like:
+</p>
+<pre>SysTick-&gt;CTRL = 0;</pre>
+
+<h5>Optional Features</h5>
+<p>In addition the <em> <strong>device.h </strong></em>file may define:</p>
+<ul>
+ <li>
+ #define constants that simplify access to the peripheral registers.
+ These constant define bit-positions or other specific patterns are that required for the
+ programming of the peripheral registers. The identifiers used start with
+ <strong>&lt;device abbreviation&gt;_</strong> and <strong>&lt;peripheral name&gt;_</strong>.
+ It is recommended to use CAPITAL letters for such #define constants.
+ </li>
+ <li>
+ Functions that perform more complex functions with the peripheral (i.e. status query before
+ a sending register is accessed). Again these function start with
+ <strong>&lt;device abbreviation&gt;_</strong> and <strong>&lt;peripheral name&gt;_</strong>.
+ </li>
+</ul>
+
+<h3>core_cm0.h and core_cm0.c</h3>
+<p>
+ File <b>core_cm0.h</b> describes the data structures for the Cortex-M0 core peripherals and does
+ the address mapping of this structures. It also provides basic access to the Cortex-M0 core registers
+ and core peripherals with efficient functions (defined as <strong>static inline</strong>).
+</p>
+<p>
+ File <b>core_cm0.c</b> defines several helper functions that access processor registers.
+</p>
+<p>Together these files implement the <a href="#4">Core Peripheral Access Layer</a> for a Cortex-M0.</p>
+
+<h3>core_cm3.h and core_cm3.c</h3>
+<p>
+ File <b>core_cm3.h</b> describes the data structures for the Cortex-M3 core peripherals and does
+ the address mapping of this structures. It also provides basic access to the Cortex-M3 core registers
+ and core peripherals with efficient functions (defined as <strong>static inline</strong>).
+</p>
+<p>
+ File <b>core_cm3.c</b> defines several helper functions that access processor registers.
+</p>
+<p>Together these files implement the <a href="#4">Core Peripheral Access Layer</a> for a Cortex-M3.</p>
+
+<h3>startup_<em>device</em></h3>
+<p>
+ A template file for <strong>startup_<em>device</em></strong> is provided by ARM for each supported
+ compiler. It is adapted by the silicon vendor to include interrupt vectors for all device specific
+ interrupt handlers. Each interrupt handler is defined as <strong><em>weak</em></strong> function
+ to an dummy handler. Therefore the interrupt handler can be directly used in application software
+ without any requirements to adapt the <strong>startup_<em>device</em></strong> file.
+</p>
+<p>
+ The following exception names are fixed and define the start of the vector table for a Cortex-M0:
+</p>
+<pre>
+__Vectors DCD __initial_sp ; Top of Stack
+ DCD Reset_Handler ; Reset Handler
+ DCD NMI_Handler ; NMI Handler
+ DCD HardFault_Handler ; Hard Fault Handler
+ DCD 0 ; Reserved
+ DCD 0 ; Reserved
+ DCD 0 ; Reserved
+ DCD 0 ; Reserved
+ DCD 0 ; Reserved
+ DCD 0 ; Reserved
+ DCD 0 ; Reserved
+ DCD SVC_Handler ; SVCall Handler
+ DCD 0 ; Reserved
+ DCD 0 ; Reserved
+ DCD PendSV_Handler ; PendSV Handler
+ DCD SysTick_Handler ; SysTick Handler</pre>
+
+<p>
+ The following exception names are fixed and define the start of the vector table for a Cortex-M3:
+</p>
+<pre>
+__Vectors DCD __initial_sp ; Top of Stack
+ DCD Reset_Handler ; Reset Handler
+ DCD NMI_Handler ; NMI Handler
+ DCD HardFault_Handler ; Hard Fault Handler
+ DCD MemManage_Handler ; MPU Fault Handler
+ DCD BusFault_Handler ; Bus Fault Handler
+ DCD UsageFault_Handler ; Usage Fault Handler
+ DCD 0 ; Reserved
+ DCD 0 ; Reserved
+ DCD 0 ; Reserved
+ DCD 0 ; Reserved
+ DCD SVC_Handler ; SVCall Handler
+ DCD DebugMon_Handler ; Debug Monitor Handler
+ DCD 0 ; Reserved
+ DCD PendSV_Handler ; PendSV Handler
+ DCD SysTick_Handler ; SysTick Handler</pre>
+
+<p>
+ In the following examples for device specific interrupts are shown:
+</p>
+<pre>
+; External Interrupts
+ DCD WWDG_IRQHandler ; Window Watchdog
+ DCD PVD_IRQHandler ; PVD through EXTI Line detect
+ DCD TAMPER_IRQHandler ; Tamper</pre>
+
+<p>
+ Device specific interrupts must have a dummy function that can be overwritten in user code.
+ Below is an example for this dummy function.
+</p>
+<pre>
+Default_Handler PROC
+ EXPORT WWDG_IRQHandler [WEAK]
+ EXPORT PVD_IRQHandler [WEAK]
+ EXPORT TAMPER_IRQHandler [WEAK]
+ :
+ :
+ WWDG_IRQHandler
+ PVD_IRQHandler
+ TAMPER_IRQHandler
+ :
+ :
+ B .
+ ENDP</pre>
+
+<p>
+ The user application may simply define an interrupt handler function by using the handler name
+ as shown below.
+</p>
+<pre>
+void WWDG_IRQHandler(void)
+{
+ :
+ :
+}</pre>
+
+
+<h3><a name="4"></a>system_<em>device</em>.c</h3>
+<p>
+ A template file for <strong>system_<em>device</em>.c</strong> is provided by ARM but adapted by
+ the silicon vendor to match their actual device. As a <strong>minimum requirement</strong>
+ this file must provide a device specific system configuration function and a global variable
+ that contains the system frequency. It configures the device and initializes typically the
+ oscillator (PLL) that is part of the microcontroller device.
+</p>
+<p>
+ The file <strong>system_</strong><em><strong>device</strong></em><strong>.c</strong> must provide
+ as a minimum requirement the SystemInit function as shown below.
+</p>
+
+<table class="kt" border="0" cellpadding="0" cellspacing="0">
+ <tbody>
+ <tr>
+ <th class="kt">Function Definition</th>
+ <th class="kt">Description</th>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">void SystemInit (void)</td>
+ <td class="kt">Setup the microcontroller system. Typically this function configures the
+ oscillator (PLL) that is part of the microcontroller device. For systems
+ with variable clock speed it also updates the variable SystemCoreClock.<br>
+ SystemInit is called from startup<i>_device</i> file.</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">void SystemCoreClockUpdate (void)</td>
+ <td class="kt">Updates the variable SystemCoreClock and must be called whenever the
+ core clock is changed during program execution. SystemCoreClockUpdate()
+ evaluates the clock register settings and calculates the current core clock.
+</td>
+ </tr>
+ </tbody>
+</table>
+
+<p>
+ Also part of the file <strong>system_</strong><em><strong>device</strong></em><strong>.c</strong>
+ is the variable <strong>SystemCoreClock</strong> which contains the current CPU clock speed shown below.
+</p>
+
+<table class="kt" border="0" cellpadding="0" cellspacing="0">
+ <tbody>
+ <tr>
+ <th class="kt">Variable Definition</th>
+ <th class="kt">Description</th>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">uint32_t SystemCoreClock</td>
+ <td class="kt">Contains the system core clock (which is the system clock frequency supplied
+ to the SysTick timer and the processor core clock). This variable can be
+ used by the user application to setup the SysTick timer or configure other
+ parameters. It may also be used by debugger to query the frequency of the
+ debug timer or configure the trace clock speed.<br>
+ SystemCoreClock is initialized with a correct predefined value.<br><br>
+ The compiler must be configured to avoid the removal of this variable in
+ case that the application program is not using it. It is important for
+ debug systems that the variable is physically present in memory so that
+ it can be examined to configure the debugger.</td>
+ </tr>
+ </tbody>
+</table>
+
+<p class="Note">Note</p>
+<ul>
+ <li><p>The above definitions are the minimum requirements for the file <strong>
+ system_</strong><em><strong>device</strong></em><strong>.c</strong>. This
+ file may export more functions or variables that provide a more flexible
+ configuration of the microcontroller system.</p>
+ </li>
+</ul>
+
+
+<h2>Core Peripheral Access Layer</h2>
+
+<h3>Cortex-M Core Register Access</h3>
+<p>
+ The following functions are defined in <strong>core_cm0.h</strong> / <strong>core_cm3.h</strong>
+ and provide access to Cortex-M core registers.
+</p>
+
+<table class="kt" border="0" cellpadding="0" cellspacing="0">
+ <tbody>
+ <tr>
+ <th class="kt">Function Definition</th>
+ <th class="kt">Core</th>
+ <th class="kt">Core Register</th>
+ <th class="kt">Description</th>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">void __enable_irq (void)</td>
+ <td class="kt">M0, M3</td>
+ <td class="kt">PRIMASK = 0</td>
+ <td class="kt">Global Interrupt enable (using the instruction <strong>CPSIE
+ i</strong>)</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">void __disable_irq (void)</td>
+ <td class="kt">M0, M3</td>
+ <td class="kt">PRIMASK = 1</td>
+ <td class="kt">Global Interrupt disable (using the instruction <strong>
+ CPSID i</strong>)</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">void __set_PRIMASK (uint32_t value)</td>
+ <td class="kt">M0, M3</td>
+ <td class="kt">PRIMASK = value</td>
+ <td class="kt">Assign value to Priority Mask Register (using the instruction
+ <strong>MSR</strong>)</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">uint32_t __get_PRIMASK (void)</td>
+ <td class="kt">M0, M3</td>
+ <td class="kt">return PRIMASK</td>
+ <td class="kt">Return Priority Mask Register (using the instruction
+ <strong>MRS</strong>)</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">void __enable_fault_irq (void)</td>
+ <td class="kt">M3</td>
+ <td class="kt">FAULTMASK = 0</td>
+ <td class="kt">Global Fault exception and Interrupt enable (using the
+ instruction <strong>CPSIE
+ f</strong>)</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">void __disable_fault_irq (void)</td>
+ <td class="kt">M3</td>
+ <td class="kt">FAULTMASK = 1</td>
+ <td class="kt">Global Fault exception and Interrupt disable (using the
+ instruction <strong>CPSID f</strong>)</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">void __set_FAULTMASK (uint32_t value)</td>
+ <td class="kt">M3</td>
+ <td class="kt">FAULTMASK = value</td>
+ <td class="kt">Assign value to Fault Mask Register (using the instruction
+ <strong>MSR</strong>)</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">uint32_t __get_FAULTMASK (void)</td>
+ <td class="kt">M3</td>
+ <td class="kt">return FAULTMASK</td>
+ <td class="kt">Return Fault Mask Register (using the instruction <strong>MRS</strong>)</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">void __set_BASEPRI (uint32_t value)</td>
+ <td class="kt">M3</td>
+ <td class="kt">BASEPRI = value</td>
+ <td class="kt">Set Base Priority (using the instruction <strong>MSR</strong>)</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">uiuint32_t __get_BASEPRI (void)</td>
+ <td class="kt">M3</td>
+ <td class="kt">return BASEPRI</td>
+ <td class="kt">Return Base Priority (using the instruction <strong>MRS</strong>)</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">void __set_CONTROL (uint32_t value)</td>
+ <td class="kt">M0, M3</td>
+ <td class="kt">CONTROL = value</td>
+ <td class="kt">Set CONTROL register value (using the instruction <strong>MSR</strong>)</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">uint32_t __get_CONTROL (void)</td>
+ <td class="kt">M0, M3</td>
+ <td class="kt">return CONTROL</td>
+ <td class="kt">Return Control Register Value (using the instruction
+ <strong>MRS</strong>)</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">void __set_PSP (uint32_t TopOfProcStack)</td>
+ <td class="kt">M0, M3</td>
+ <td class="kt">PSP = TopOfProcStack</td>
+ <td class="kt">Set Process Stack Pointer value (using the instruction
+ <strong>MSR</strong>)</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">uint32_t __get_PSP (void)</td>
+ <td class="kt">M0, M3</td>
+ <td class="kt">return PSP</td>
+ <td class="kt">Return Process Stack Pointer (using the instruction <strong>MRS</strong>)</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">void __set_MSP (uint32_t TopOfMainStack)</td>
+ <td class="kt">M0, M3</td>
+ <td class="kt">MSP = TopOfMainStack</td>
+ <td class="kt">Set Main Stack Pointer (using the instruction <strong>MSR</strong>)</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">uint32_t __get_MSP (void)</td>
+ <td class="kt">M0, M3</td>
+ <td class="kt">return MSP</td>
+ <td class="kt">Return Main Stack Pointer (using the instruction <strong>MRS</strong>)</td>
+ </tr>
+ </tbody>
+</table>
+
+<h3>Cortex-M Instruction Access</h3>
+<p>
+ The following functions are defined in <strong>core_cm0.h</strong> / <strong>core_cm3.h</strong>and
+ generate specific Cortex-M instructions. The functions are implemented in the file
+ <strong>core_cm0.c</strong> / <strong>core_cm3.c</strong>.
+</p>
+
+<table class="kt" border="0" cellpadding="0" cellspacing="0">
+ <tbody>
+ <tr>
+ <th class="kt">Name</th>
+ <th class="kt">Core</th>
+ <th class="kt">Generated CPU Instruction</th>
+ <th class="kt">Description</th>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">void __NOP (void)</td>
+ <td class="kt">M0, M3</td>
+ <td class="kt">NOP</td>
+ <td class="kt">No Operation</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">void __WFI (void)</td>
+ <td class="kt">M0, M3</td>
+ <td class="kt">WFI</td>
+ <td class="kt">Wait for Interrupt</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">void __WFE (void)</td>
+ <td class="kt">M0, M3</td>
+ <td class="kt">WFE</td>
+ <td class="kt">Wait for Event</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">void __SEV (void)</td>
+ <td class="kt">M0, M3</td>
+ <td class="kt">SEV</td>
+ <td class="kt">Set Event</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">void __ISB (void)</td>
+ <td class="kt">M0, M3</td>
+ <td class="kt">ISB</td>
+ <td class="kt">Instruction Synchronization Barrier</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">void __DSB (void)</td>
+ <td class="kt">M0, M3</td>
+ <td class="kt">DSB</td>
+ <td class="kt">Data Synchronization Barrier</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">void __DMB (void)</td>
+ <td class="kt">M0, M3</td>
+ <td class="kt">DMB</td>
+ <td class="kt">Data Memory Barrier</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">uint32_t __REV (uint32_t value)</td>
+ <td class="kt">M0, M3</td>
+ <td class="kt">REV</td>
+ <td class="kt">Reverse byte order in integer value.</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">uint32_t __REV16 (uint16_t value)</td>
+ <td class="kt">M0, M3</td>
+ <td class="kt">REV16</td>
+ <td class="kt">Reverse byte order in unsigned short value. </td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">sint32_t __REVSH (sint16_t value)</td>
+ <td class="kt">M0, M3</td>
+ <td class="kt">REVSH</td>
+ <td class="kt">Reverse byte order in signed short value with sign extension to integer.</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">uint32_t __RBIT (uint32_t value)</td>
+ <td class="kt">M3</td>
+ <td class="kt">RBIT</td>
+ <td class="kt">Reverse bit order of value</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">uint8_t __LDREXB (uint8_t *addr)</td>
+ <td class="kt">M3</td>
+ <td class="kt">LDREXB</td>
+ <td class="kt">Load exclusive byte</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">uint16_t __LDREXH (uint16_t *addr)</td>
+ <td class="kt">M3</td>
+ <td class="kt">LDREXH</td>
+ <td class="kt">Load exclusive half-word</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">uint32_t __LDREXW (uint32_t *addr)</td>
+ <td class="kt">M3</td>
+ <td class="kt">LDREXW</td>
+ <td class="kt">Load exclusive word</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">uint32_t __STREXB (uint8_t value, uint8_t *addr)</td>
+ <td class="kt">M3</td>
+ <td class="kt">STREXB</td>
+ <td class="kt">Store exclusive byte</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">uint32_t __STREXB (uint16_t value, uint16_t *addr)</td>
+ <td class="kt">M3</td>
+ <td class="kt">STREXH</td>
+ <td class="kt">Store exclusive half-word</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">uint32_t __STREXB (uint32_t value, uint32_t *addr)</td>
+ <td class="kt">M3</td>
+ <td class="kt">STREXW</td>
+ <td class="kt">Store exclusive word</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">void __CLREX (void)</td>
+ <td class="kt">M3</td>
+ <td class="kt">CLREX</td>
+ <td class="kt">Remove the exclusive lock created by __LDREXB, __LDREXH, or __LDREXW</td>
+ </tr>
+ </tbody>
+</table>
+
+
+<h3>NVIC Access Functions</h3>
+<p>
+ The CMSIS provides access to the NVIC via the register interface structure and several helper
+ functions that simplify the setup of the NVIC. The CMSIS HAL uses IRQ numbers (IRQn) to
+ identify the interrupts. The first device interrupt has the IRQn value 0. Therefore negative
+ IRQn values are used for processor core exceptions.
+</p>
+<p>
+ For the IRQn values of core exceptions the file <strong><em>device.h</em></strong> provides
+ the following enum names.
+</p>
+
+<table class="kt" border="0" cellpadding="0" cellspacing="0">
+ <tbody>
+ <tr>
+ <th class="kt" nowrap="nowrap">Core Exception enum Value</th>
+ <th class="kt">Core</th>
+ <th class="kt">IRQn</th>
+ <th class="kt">Description</th>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">NonMaskableInt_IRQn</td>
+ <td class="kt">M0, M3</td>
+ <td class="kt">-14</td>
+ <td class="kt">Cortex-M Non Maskable Interrupt</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">HardFault_IRQn</td>
+ <td class="kt">M0, M3</td>
+ <td class="kt">-13</td>
+ <td class="kt">Cortex-M Hard Fault Interrupt</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">MemoryManagement_IRQn</td>
+ <td class="kt">M3</td>
+ <td class="kt">-12</td>
+ <td class="kt">Cortex-M Memory Management Interrupt</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">BusFault_IRQn</td>
+ <td class="kt">M3</td>
+ <td class="kt">-11</td>
+ <td class="kt">Cortex-M Bus Fault Interrupt</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">UsageFault_IRQn</td>
+ <td class="kt">M3</td>
+ <td class="kt">-10</td>
+ <td class="kt">Cortex-M Usage Fault Interrupt</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">SVCall_IRQn</td>
+ <td class="kt">M0, M3</td>
+ <td class="kt">-5</td>
+ <td class="kt">Cortex-M SV Call Interrupt </td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">DebugMonitor_IRQn</td>
+ <td class="kt">M3</td>
+ <td class="kt">-4</td>
+ <td class="kt">Cortex-M Debug Monitor Interrupt</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">PendSV_IRQn</td>
+ <td class="kt">M0, M3</td>
+ <td class="kt">-2</td>
+ <td class="kt">Cortex-M Pend SV Interrupt</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">SysTick_IRQn</td>
+ <td class="kt">M0, M3</td>
+ <td class="kt">-1</td>
+ <td class="kt">Cortex-M System Tick Interrupt</td>
+ </tr>
+ </tbody>
+</table>
+
+<p>The following functions simplify the setup of the NVIC.
+The functions are defined as <strong>static inline</strong>.</p>
+
+<table class="kt" border="0" cellpadding="0" cellspacing="0">
+ <tbody>
+ <tr>
+ <th class="kt" nowrap="nowrap">Name</th>
+ <th class="kt">Core</th>
+ <th class="kt">Parameter</th>
+ <th class="kt">Description</th>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">void NVIC_SetPriorityGrouping (uint32_t PriorityGroup)</td>
+ <td class="kt">M3</td>
+ <td class="kt">Priority Grouping Value</td>
+ <td class="kt">Set the Priority Grouping (Groups . Subgroups)</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">uint32_t NVIC_GetPriorityGrouping (void)</td>
+ <td class="kt">M3</td>
+ <td class="kt">(void)</td>
+ <td class="kt">Get the Priority Grouping (Groups . Subgroups)</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">void NVIC_EnableIRQ (IRQn_Type IRQn)</td>
+ <td class="kt">M0, M3</td>
+ <td class="kt">IRQ Number</td>
+ <td class="kt">Enable IRQn</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">void NVIC_DisableIRQ (IRQn_Type IRQn)</td>
+ <td class="kt">M0, M3</td>
+ <td class="kt">IRQ Number</td>
+ <td class="kt">Disable IRQn</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">uint32_t NVIC_GetPendingIRQ (IRQn_Type IRQn)</td>
+ <td class="kt">M0, M3</td>
+ <td class="kt">IRQ Number</td>
+ <td class="kt">Return 1 if IRQn is pending else 0</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">void NVIC_SetPendingIRQ (IRQn_Type IRQn)</td>
+ <td class="kt">M0, M3</td>
+ <td class="kt">IRQ Number</td>
+ <td class="kt">Set IRQn Pending</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">void NVIC_ClearPendingIRQ (IRQn_Type IRQn)</td>
+ <td class="kt">M0, M3</td>
+ <td class="kt">IRQ Number</td>
+ <td class="kt">Clear IRQn Pending Status</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">uint32_t NVIC_GetActive (IRQn_Type IRQn)</td>
+ <td class="kt">M3</td>
+ <td class="kt">IRQ Number</td>
+ <td class="kt">Return 1 if IRQn is active else 0</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">void NVIC_SetPriority (IRQn_Type IRQn, uint32_t priority)</td>
+ <td class="kt">M0, M3</td>
+ <td class="kt">IRQ Number, Priority</td>
+ <td class="kt">Set Priority for IRQn<br>
+ (not threadsafe for Cortex-M0)</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">uint32_t NVIC_GetPriority (IRQn_Type IRQn)</td>
+ <td class="kt">M0, M3</td>
+ <td class="kt">IRQ Number</td>
+ <td class="kt">Get Priority for IRQn</td>
+ </tr>
+ <tr>
+<!-- <td class="kt" nowrap="nowrap">uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority)</td> -->
+ <td class="kt">uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority)</td>
+ <td class="kt">M3</td>
+ <td class="kt">IRQ Number, Priority Group, Preemptive Priority, Sub Priority</td>
+ <td class="kt">Encode priority for given group, preemptive and sub priority</td>
+ </tr>
+<!-- <td class="kt" nowrap="nowrap">NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* pPreemptPriority, uint32_t* pSubPriority)</td> -->
+ <td class="kt">NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* pPreemptPriority, uint32_t* pSubPriority)</td>
+ <td class="kt">M3</td>
+ <td class="kt">IRQ Number, Priority, pointer to Priority Group, pointer to Preemptive Priority, pointer to Sub Priority</td>
+ <td class="kt">Deccode given priority to group, preemptive and sub priority</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">void NVIC_SystemReset (void)</td>
+ <td class="kt">M0, M3</td>
+ <td class="kt">(void)</td>
+ <td class="kt">Resets the System</td>
+ </tr>
+ </tbody>
+</table>
+<p class="Note">Note</p>
+<ul>
+ <li><p>The processor exceptions have negative enum values. Device specific interrupts
+ have positive enum values and start with 0. The values are defined in
+ <b><em>device.h</em></b> file.
+ </p>
+ </li>
+ <li><p>The values for <b>PreemptPriority</b> and <b>SubPriority</b>
+ used in functions <b>NVIC_EncodePriority</b> and <b>NVIC_DecodePriority</b>
+ depend on the available __NVIC_PRIO_BITS implemented in the NVIC.
+ </p>
+ </li>
+</ul>
+
+
+<h3>SysTick Configuration Function</h3>
+
+<p>The following function is used to configure the SysTick timer and start the
+SysTick interrupt.</p>
+
+<table class="kt" border="0" cellpadding="0" cellspacing="0">
+ <tbody>
+ <tr>
+ <th class="kt" nowrap="nowrap">Name</th>
+ <th class="kt">Parameter</th>
+ <th class="kt">Description</th>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">uint32_t Sys<span class="style1">TickConfig
+ (uint32_t ticks)</span></td>
+ <td class="kt">ticks is SysTick counter reload value</td>
+ <td class="kt">Setup the SysTick timer and enable the SysTick interrupt. After this
+ call the SysTick timer creates interrupts with the specified time
+ interval. <br>
+ <br>
+ Return: 0 when successful, 1 on failure.<br>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+
+<h3>Cortex-M3 ITM Debug Access</h3>
+
+<p>The Cortex-M3 incorporates the Instrumented Trace Macrocell (ITM) that
+provides together with the Serial Viewer Output trace capabilities for the
+microcontroller system. The ITM has 32 communication channels; two ITM
+communication channels are used by CMSIS to output the following information:</p>
+<ul>
+ <li>ITM Channel 0: implements the <strong>ITM_SendChar</strong> function
+ which can be used for printf-style output via the debug interface.</li>
+ <li>ITM Channel 31: is reserved for the RTOS kernel and can be used for
+ kernel awareness debugging.</li>
+</ul>
+<p class="Note">Note</p>
+<ul>
+ <li><p>The ITM channel 31 is selected for the RTOS kernel since some kernels
+ may use the Privileged level for program execution. ITM
+ channels have 4 groups with 8 channels each, whereby each group can be
+ configured for access rights in the Unprivileged level. The ITM channel 0
+ may be therefore enabled for the user task whereas ITM channel 31 may be
+ accessible only in Privileged level from the RTOS kernel itself.</p>
+ </li>
+</ul>
+
+<p>The prototype of the <strong>ITM_SendChar</strong> routine is shown in the
+table below.</p>
+
+<table class="kt" border="0" cellpadding="0" cellspacing="0">
+ <tbody>
+ <tr>
+ <th class="kt" nowrap="nowrap">Name</th>
+ <th class="kt">Parameter</th>
+ <th class="kt">Description</th>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">void uint32_t ITM_SendChar(uint32_t chr)</td>
+ <td class="kt">character to output</td>
+ <td class="kt">The function outputs a character via the ITM channel 0. The
+ function returns when no debugger is connected that has booked the
+ output. It is blocking when a debugger is connected, but the
+ previous character send is not transmitted. <br><br>
+ Return: the input character 'chr'.</td>
+ </tr>
+ </tbody>
+</table>
+
+<p>
+ Example for the usage of the ITM Channel 31 for RTOS Kernels:
+</p>
+<pre>
+ // check if debugger connected and ITM channel enabled for tracing
+ if ((CoreDebug-&gt;DEMCR &amp; CoreDebug_DEMCR_TRCENA) &amp;&amp;
+ (ITM-&gt;TCR &amp; ITM_TCR_ITMENA) &amp;&amp;
+ (ITM-&gt;TER &amp; (1UL &lt;&lt; 31))) {
+ // transmit trace data
+ while (ITM-&gt;PORT31_U32 == 0);
+ ITM-&gt;PORT[31].u8 = task_id; // id of next task
+ while (ITM-&gt;PORT[31].u32 == 0);
+ ITM-&gt;PORT[31].u32 = task_status; // status information
+ }</pre>
+
+
+<h3>Cortex-M3 additional Debug Access</h3>
+
+<p>CMSIS provides additional debug functions to enlarge the Cortex-M3 Debug Access.
+Data can be transmitted via a certain global buffer variable towards the target system.</p>
+
+<p>The buffer variable and the prototypes of the additional functions are shown in the
+table below.</p>
+
+<table class="kt" border="0" cellpadding="0" cellspacing="0">
+ <tbody>
+ <tr>
+ <th class="kt" nowrap="nowrap">Name</th>
+ <th class="kt">Parameter</th>
+ <th class="kt">Description</th>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">extern volatile int ITM_RxBuffer</td>
+ <td class="kt"> </td>
+ <td class="kt">Buffer to transmit data towards debug system. <br><br>
+ Value 0x5AA55AA5 indicates that buffer is empty.</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">int ITM_ReceiveChar (void)</td>
+ <td class="kt">none</td>
+ <td class="kt">The nonblocking functions returns the character stored in
+ ITM_RxBuffer. <br><br>
+ Return: -1 indicates that no character was received.</td>
+ </tr>
+ <tr>
+ <td class="kt" nowrap="nowrap">int ITM_CheckChar (void)</td>
+ <td class="kt">none</td>
+ <td class="kt">The function checks if a character is available in ITM_RxBuffer. <br><br>
+ Return: 1 indicates that a character is available, 0 indicates that
+ no character is available.</td>
+ </tr>
+ </tbody>
+</table>
+
+
+<h2><a name="5"></a>CMSIS Example</h2>
+<p>
+ The following section shows a typical example for using the CMSIS layer in user applications.
+ The example is based on a STM32F10x Device.
+</p>
+<pre>
+#include "stm32f10x.h"
+
+volatile uint32_t msTicks; /* timeTicks counter */
+
+void SysTick_Handler(void) {
+ msTicks++; /* increment timeTicks counter */
+}
+
+__INLINE static void Delay (uint32_t dlyTicks) {
+ uint32_t curTicks = msTicks;
+
+ while ((msTicks - curTicks) &lt; dlyTicks);
+}
+
+__INLINE static void LED_Config(void) {
+ ; /* Configure the LEDs */
+}
+
+__INLINE static void LED_On (uint32_t led) {
+ ; /* Turn On LED */
+}
+
+__INLINE static void LED_Off (uint32_t led) {
+ ; /* Turn Off LED */
+}
+
+int main (void) {
+ if (SysTick_Config (SystemCoreClock / 1000)) { /* Setup SysTick for 1 msec interrupts */
+ ; /* Handle Error */
+ while (1);
+ }
+
+ LED_Config(); /* configure the LEDs */
+
+ while(1) {
+ LED_On (0x100); /* Turn on the LED */
+ Delay (100); /* delay 100 Msec */
+ LED_Off (0x100); /* Turn off the LED */
+ Delay (100); /* delay 100 Msec */
+ }
+}</pre>
+
+
+</body></html> \ No newline at end of file
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/cmsis/core_cm3.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/cmsis/core_cm3.c
new file mode 100644
index 0000000..1a68b9e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/cmsis/core_cm3.c
@@ -0,0 +1,807 @@
+/**************************************************************************//**
+ * @file core_cm3.c
+ * @brief CMSIS Cortex-M3 Core Peripheral Access Layer Source File
+ * @version V1.30
+ * @date 30. October 2009
+ *
+ * @note
+ * Copyright (C) 2009 ARM Limited. All rights reserved.
+ *
+ * @par
+ * ARM Limited (ARM) is supplying this software for use with Cortex-M
+ * processor based microcontrollers. This file can be freely distributed
+ * within development tools that are supporting such ARM based processors.
+ *
+ * @par
+ * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
+ * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
+ * ARM SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
+ * CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
+ *
+ ******************************************************************************/
+
+#include <stdint.h>
+
+/* define compiler specific symbols */
+#if defined ( __CC_ARM )
+ #define __ASM __asm /*!< asm keyword for ARM Compiler */
+ #define __INLINE __inline /*!< inline keyword for ARM Compiler */
+
+#elif defined ( __ICCARM__ )
+ #define __ASM __asm /*!< asm keyword for IAR Compiler */
+ #define __INLINE inline /*!< inline keyword for IAR Compiler. Only avaiable in High optimization mode! */
+
+#elif defined ( __GNUC__ )
+ #define __ASM __asm /*!< asm keyword for GNU Compiler */
+ #define __INLINE inline /*!< inline keyword for GNU Compiler */
+
+#elif defined ( __TASKING__ )
+ #define __ASM __asm /*!< asm keyword for TASKING Compiler */
+ #define __INLINE inline /*!< inline keyword for TASKING Compiler */
+
+#endif
+
+uint32_t __get_PSP(void) ;
+void __set_PSP(uint32_t topOfProcStack) ;
+uint32_t __get_MSP(void) ;
+void __set_MSP(uint32_t mainStackPointer) ;
+uint32_t __REV16(uint16_t value) ;
+int32_t __REVSH(int16_t value) ;
+uint32_t __RBIT(uint32_t value) ;
+uint8_t __LDREXB(uint8_t *addr) ;
+uint16_t __LDREXH(uint16_t *addr) ;
+uint32_t __LDREXW(uint32_t *addr) ;
+uint32_t __STREXB(uint8_t value, uint8_t *addr) ;
+uint32_t __STREXH(uint16_t value, uint16_t *addr) ;
+uint32_t __STREXW(uint32_t value, uint32_t *addr) ;
+
+uint32_t __get_BASEPRI(void) ;
+void __set_BASEPRI(uint32_t basePri) ;
+uint32_t __get_PRIMASK(void) ;
+void __set_PRIMASK(uint32_t priMask) ;
+uint32_t __get_FAULTMASK(void) ;
+void __set_FAULTMASK(uint32_t faultMask) ;
+uint32_t __get_CONTROL(void) ;
+void __set_CONTROL(uint32_t control) ;
+uint32_t __REV(uint32_t value) ;
+
+/* ################### Compiler specific Intrinsics ########################### */
+
+#if defined ( __CC_ARM ) /*------------------RealView Compiler -----------------*/
+/* ARM armcc specific functions */
+
+/**
+ * @brief Return the Process Stack Pointer
+ *
+ * @return ProcessStackPointer
+ *
+ * Return the actual process stack pointer
+ */
+__ASM uint32_t __get_PSP(void)
+{
+ mrs r0, psp
+ bx lr
+}
+
+/**
+ * @brief Set the Process Stack Pointer
+ *
+ * @param topOfProcStack Process Stack Pointer
+ *
+ * Assign the value ProcessStackPointer to the MSP
+ * (process stack pointer) Cortex processor register
+ */
+__ASM void __set_PSP(uint32_t topOfProcStack)
+{
+ msr psp, r0
+ bx lr
+}
+
+/**
+ * @brief Return the Main Stack Pointer
+ *
+ * @return Main Stack Pointer
+ *
+ * Return the current value of the MSP (main stack pointer)
+ * Cortex processor register
+ */
+__ASM uint32_t __get_MSP(void)
+{
+ mrs r0, msp
+ bx lr
+}
+
+/**
+ * @brief Set the Main Stack Pointer
+ *
+ * @param topOfMainStack Main Stack Pointer
+ *
+ * Assign the value mainStackPointer to the MSP
+ * (main stack pointer) Cortex processor register
+ */
+__ASM void __set_MSP(uint32_t mainStackPointer)
+{
+ msr msp, r0
+ bx lr
+}
+
+/**
+ * @brief Reverse byte order in unsigned short value
+ *
+ * @param value value to reverse
+ * @return reversed value
+ *
+ * Reverse byte order in unsigned short value
+ */
+__ASM uint32_t __REV16(uint16_t value)
+{
+ rev16 r0, r0
+ bx lr
+}
+
+/**
+ * @brief Reverse byte order in signed short value with sign extension to integer
+ *
+ * @param value value to reverse
+ * @return reversed value
+ *
+ * Reverse byte order in signed short value with sign extension to integer
+ */
+__ASM int32_t __REVSH(int16_t value)
+{
+ revsh r0, r0
+ bx lr
+}
+
+
+#if (__ARMCC_VERSION < 400000)
+
+/**
+ * @brief Remove the exclusive lock created by ldrex
+ *
+ * Removes the exclusive lock which is created by ldrex.
+ */
+__ASM void __CLREX(void)
+{
+ clrex
+}
+
+/**
+ * @brief Return the Base Priority value
+ *
+ * @return BasePriority
+ *
+ * Return the content of the base priority register
+ */
+__ASM uint32_t __get_BASEPRI(void)
+{
+ mrs r0, basepri
+ bx lr
+}
+
+/**
+ * @brief Set the Base Priority value
+ *
+ * @param basePri BasePriority
+ *
+ * Set the base priority register
+ */
+__ASM void __set_BASEPRI(uint32_t basePri)
+{
+ msr basepri, r0
+ bx lr
+}
+
+/**
+ * @brief Return the Priority Mask value
+ *
+ * @return PriMask
+ *
+ * Return state of the priority mask bit from the priority mask register
+ */
+__ASM uint32_t __get_PRIMASK(void)
+{
+ mrs r0, primask
+ bx lr
+}
+
+/**
+ * @brief Set the Priority Mask value
+ *
+ * @param priMask PriMask
+ *
+ * Set the priority mask bit in the priority mask register
+ */
+__ASM void __set_PRIMASK(uint32_t priMask)
+{
+ msr primask, r0
+ bx lr
+}
+
+/**
+ * @brief Return the Fault Mask value
+ *
+ * @return FaultMask
+ *
+ * Return the content of the fault mask register
+ */
+__ASM uint32_t __get_FAULTMASK(void)
+{
+ mrs r0, faultmask
+ bx lr
+}
+
+/**
+ * @brief Set the Fault Mask value
+ *
+ * @param faultMask faultMask value
+ *
+ * Set the fault mask register
+ */
+__ASM void __set_FAULTMASK(uint32_t faultMask)
+{
+ msr faultmask, r0
+ bx lr
+}
+
+/**
+ * @brief Return the Control Register value
+ *
+ * @return Control value
+ *
+ * Return the content of the control register
+ */
+__ASM uint32_t __get_CONTROL(void)
+{
+ mrs r0, control
+ bx lr
+}
+
+/**
+ * @brief Set the Control Register value
+ *
+ * @param control Control value
+ *
+ * Set the control register
+ */
+__ASM void __set_CONTROL(uint32_t control)
+{
+ msr control, r0
+ bx lr
+}
+
+#endif /* __ARMCC_VERSION */
+
+
+
+#elif (defined (__ICCARM__)) /*------------------ ICC Compiler -------------------*/
+/* IAR iccarm specific functions */
+#pragma diag_suppress=Pe940
+
+/**
+ * @brief Return the Process Stack Pointer
+ *
+ * @return ProcessStackPointer
+ *
+ * Return the actual process stack pointer
+ */
+uint32_t __get_PSP(void)
+{
+ __ASM("mrs r0, psp");
+ __ASM("bx lr");
+}
+
+/**
+ * @brief Set the Process Stack Pointer
+ *
+ * @param topOfProcStack Process Stack Pointer
+ *
+ * Assign the value ProcessStackPointer to the MSP
+ * (process stack pointer) Cortex processor register
+ */
+void __set_PSP(uint32_t topOfProcStack)
+{
+ __ASM("msr psp, r0");
+ __ASM("bx lr");
+}
+
+/**
+ * @brief Return the Main Stack Pointer
+ *
+ * @return Main Stack Pointer
+ *
+ * Return the current value of the MSP (main stack pointer)
+ * Cortex processor register
+ */
+uint32_t __get_MSP(void)
+{
+ __ASM("mrs r0, msp");
+ __ASM("bx lr");
+}
+
+/**
+ * @brief Set the Main Stack Pointer
+ *
+ * @param topOfMainStack Main Stack Pointer
+ *
+ * Assign the value mainStackPointer to the MSP
+ * (main stack pointer) Cortex processor register
+ */
+void __set_MSP(uint32_t topOfMainStack)
+{
+ __ASM("msr msp, r0");
+ __ASM("bx lr");
+}
+
+/**
+ * @brief Reverse byte order in unsigned short value
+ *
+ * @param value value to reverse
+ * @return reversed value
+ *
+ * Reverse byte order in unsigned short value
+ */
+uint32_t __REV16(uint16_t value)
+{
+ __ASM("rev16 r0, r0");
+ __ASM("bx lr");
+}
+
+/**
+ * @brief Reverse bit order of value
+ *
+ * @param value value to reverse
+ * @return reversed value
+ *
+ * Reverse bit order of value
+ */
+uint32_t __RBIT(uint32_t value)
+{
+ __ASM("rbit r0, r0");
+ __ASM("bx lr");
+}
+
+/**
+ * @brief LDR Exclusive (8 bit)
+ *
+ * @param *addr address pointer
+ * @return value of (*address)
+ *
+ * Exclusive LDR command for 8 bit values)
+ */
+uint8_t __LDREXB(uint8_t *addr)
+{
+ __ASM("ldrexb r0, [r0]");
+ __ASM("bx lr");
+}
+
+/**
+ * @brief LDR Exclusive (16 bit)
+ *
+ * @param *addr address pointer
+ * @return value of (*address)
+ *
+ * Exclusive LDR command for 16 bit values
+ */
+uint16_t __LDREXH(uint16_t *addr)
+{
+ __ASM("ldrexh r0, [r0]");
+ __ASM("bx lr");
+}
+
+/**
+ * @brief LDR Exclusive (32 bit)
+ *
+ * @param *addr address pointer
+ * @return value of (*address)
+ *
+ * Exclusive LDR command for 32 bit values
+ */
+uint32_t __LDREXW(uint32_t *addr)
+{
+ __ASM("ldrex r0, [r0]");
+ __ASM("bx lr");
+}
+
+/**
+ * @brief STR Exclusive (8 bit)
+ *
+ * @param value value to store
+ * @param *addr address pointer
+ * @return successful / failed
+ *
+ * Exclusive STR command for 8 bit values
+ */
+uint32_t __STREXB(uint8_t value, uint8_t *addr)
+{
+ __ASM("strexb r0, r0, [r1]");
+ __ASM("bx lr");
+}
+
+/**
+ * @brief STR Exclusive (16 bit)
+ *
+ * @param value value to store
+ * @param *addr address pointer
+ * @return successful / failed
+ *
+ * Exclusive STR command for 16 bit values
+ */
+uint32_t __STREXH(uint16_t value, uint16_t *addr)
+{
+ __ASM("strexh r0, r0, [r1]");
+ __ASM("bx lr");
+}
+
+/**
+ * @brief STR Exclusive (32 bit)
+ *
+ * @param value value to store
+ * @param *addr address pointer
+ * @return successful / failed
+ *
+ * Exclusive STR command for 32 bit values
+ */
+uint32_t __STREXW(uint32_t value, uint32_t *addr)
+{
+ __ASM("strex r0, r0, [r1]");
+ __ASM("bx lr");
+}
+
+#pragma diag_default=Pe940
+
+
+#elif (defined (__GNUC__)) /*------------------ GNU Compiler ---------------------*/
+/* GNU gcc specific functions */
+
+/**
+ * @brief Return the Process Stack Pointer
+ *
+ * @return ProcessStackPointer
+ *
+ * Return the actual process stack pointer
+ */
+/*extern uint32_t __get_PSP(void) __attribute__( ( naked ) ); */
+uint32_t __get_PSP(void)
+{
+ uint32_t result=0;
+
+ __ASM volatile ("MRS %0, psp\n\t"
+ "MOV r0, %0 \n\t"
+ "BX lr \n\t" : "=r" (result) );
+ return(result);
+}
+
+/**
+ * @brief Set the Process Stack Pointer
+ *
+ * @param topOfProcStack Process Stack Pointer
+ *
+ * Assign the value ProcessStackPointer to the MSP
+ * (process stack pointer) Cortex processor register
+ */
+/*void __set_PSP(uint32_t topOfProcStack) __attribute__( ( naked ) ); */
+void __set_PSP(uint32_t topOfProcStack)
+{
+ __ASM volatile ("MSR psp, %0\n\t"
+ "BX lr \n\t" : : "r" (topOfProcStack) );
+}
+
+/**
+ * @brief Return the Main Stack Pointer
+ *
+ * @return Main Stack Pointer
+ *
+ * Return the current value of the MSP (main stack pointer)
+ * Cortex processor register
+ */
+/*uint32_t __get_MSP(void) __attribute__( ( naked ) ); */
+uint32_t __get_MSP(void)
+{
+ uint32_t result=0;
+
+ __ASM volatile ("MRS %0, msp\n\t"
+ "MOV r0, %0 \n\t"
+ "BX lr \n\t" : "=r" (result) );
+ return(result);
+}
+
+/**
+ * @brief Set the Main Stack Pointer
+ *
+ * @param topOfMainStack Main Stack Pointer
+ *
+ * Assign the value mainStackPointer to the MSP
+ * (main stack pointer) Cortex processor register
+ */
+/*void __set_MSP(uint32_t topOfMainStack) __attribute__( ( naked ) ); */
+void __set_MSP(uint32_t topOfMainStack)
+{
+ __ASM volatile ("MSR msp, %0\n\t"
+ "BX lr \n\t" : : "r" (topOfMainStack) );
+}
+
+/**
+ * @brief Return the Base Priority value
+ *
+ * @return BasePriority
+ *
+ * Return the content of the base priority register
+ */
+uint32_t __get_BASEPRI(void)
+{
+ uint32_t result=0;
+
+ __ASM volatile ("MRS %0, basepri_max" : "=r" (result) );
+ return(result);
+}
+
+/**
+ * @brief Set the Base Priority value
+ *
+ * @param basePri BasePriority
+ *
+ * Set the base priority register
+ */
+void __set_BASEPRI(uint32_t value)
+{
+ __ASM volatile ("MSR basepri, %0" : : "r" (value) );
+}
+
+/**
+ * @brief Return the Priority Mask value
+ *
+ * @return PriMask
+ *
+ * Return state of the priority mask bit from the priority mask register
+ */
+uint32_t __get_PRIMASK(void)
+{
+ uint32_t result=0;
+
+ __ASM volatile ("MRS %0, primask" : "=r" (result) );
+ return(result);
+}
+
+/**
+ * @brief Set the Priority Mask value
+ *
+ * @param priMask PriMask
+ *
+ * Set the priority mask bit in the priority mask register
+ */
+void __set_PRIMASK(uint32_t priMask)
+{
+ __ASM volatile ("MSR primask, %0" : : "r" (priMask) );
+}
+
+/**
+ * @brief Return the Fault Mask value
+ *
+ * @return FaultMask
+ *
+ * Return the content of the fault mask register
+ */
+uint32_t __get_FAULTMASK(void)
+{
+ uint32_t result=0;
+
+ __ASM volatile ("MRS %0, faultmask" : "=r" (result) );
+ return(result);
+}
+
+/**
+ * @brief Set the Fault Mask value
+ *
+ * @param faultMask faultMask value
+ *
+ * Set the fault mask register
+ */
+void __set_FAULTMASK(uint32_t faultMask)
+{
+ __ASM volatile ("MSR faultmask, %0" : : "r" (faultMask) );
+}
+
+/**
+ * @brief Return the Control Register value
+*
+* @return Control value
+ *
+ * Return the content of the control register
+ */
+uint32_t __get_CONTROL(void)
+{
+ uint32_t result=0;
+
+ __ASM volatile ("MRS %0, control" : "=r" (result) );
+ return(result);
+}
+
+/**
+ * @brief Set the Control Register value
+ *
+ * @param control Control value
+ *
+ * Set the control register
+ */
+void __set_CONTROL(uint32_t control)
+{
+ __ASM volatile ("MSR control, %0" : : "r" (control) );
+}
+
+
+/**
+ * @brief Reverse byte order in integer value
+ *
+ * @param value value to reverse
+ * @return reversed value
+ *
+ * Reverse byte order in integer value
+ */
+uint32_t __REV(uint32_t value)
+{
+ uint32_t result=0;
+
+ __ASM volatile ("rev %0, %1" : "=r" (result) : "r" (value) );
+ return(result);
+}
+
+/**
+ * @brief Reverse byte order in unsigned short value
+ *
+ * @param value value to reverse
+ * @return reversed value
+ *
+ * Reverse byte order in unsigned short value
+ */
+uint32_t __REV16(uint16_t value)
+{
+ uint32_t result=0;
+
+ __ASM volatile ("rev16 %0, %1" : "=r" (result) : "r" (value) );
+ return(result);
+}
+
+/**
+ * @brief Reverse byte order in signed short value with sign extension to integer
+ *
+ * @param value value to reverse
+ * @return reversed value
+ *
+ * Reverse byte order in signed short value with sign extension to integer
+ */
+int32_t __REVSH(int16_t value)
+{
+ uint32_t result=0;
+
+ __ASM volatile ("revsh %0, %1" : "=r" (result) : "r" (value) );
+ return(result);
+}
+
+/**
+ * @brief Reverse bit order of value
+ *
+ * @param value value to reverse
+ * @return reversed value
+ *
+ * Reverse bit order of value
+ */
+uint32_t __RBIT(uint32_t value)
+{
+ uint32_t result=0;
+
+ __ASM volatile ("rbit %0, %1" : "=r" (result) : "r" (value) );
+ return(result);
+}
+
+/**
+ * @brief LDR Exclusive (8 bit)
+ *
+ * @param *addr address pointer
+ * @return value of (*address)
+ *
+ * Exclusive LDR command for 8 bit value
+ */
+uint8_t __LDREXB(uint8_t *addr)
+{
+ uint8_t result=0;
+
+ __ASM volatile ("ldrexb %0, [%1]" : "=r" (result) : "r" (addr) );
+ return(result);
+}
+
+/**
+ * @brief LDR Exclusive (16 bit)
+ *
+ * @param *addr address pointer
+ * @return value of (*address)
+ *
+ * Exclusive LDR command for 16 bit values
+ */
+uint16_t __LDREXH(uint16_t *addr)
+{
+ uint16_t result=0;
+
+ __ASM volatile ("ldrexh %0, [%1]" : "=r" (result) : "r" (addr) );
+ return(result);
+}
+
+/**
+ * @brief LDR Exclusive (32 bit)
+ *
+ * @param *addr address pointer
+ * @return value of (*address)
+ *
+ * Exclusive LDR command for 32 bit values
+ */
+uint32_t __LDREXW(uint32_t *addr)
+{
+ uint32_t result=0;
+
+ __ASM volatile ("ldrex %0, [%1]" : "=r" (result) : "r" (addr) );
+ return(result);
+}
+
+/**
+ * @brief STR Exclusive (8 bit)
+ *
+ * @param value value to store
+ * @param *addr address pointer
+ * @return successful / failed
+ *
+ * Exclusive STR command for 8 bit values
+ */
+uint32_t __STREXB(uint8_t value, uint8_t *addr)
+{
+ uint32_t result=0;
+
+ __ASM volatile ("strexb %0, %2, [%1]" : "=r" (result) : "r" (addr), "r" (value) );
+ return(result);
+}
+
+/**
+ * @brief STR Exclusive (16 bit)
+ *
+ * @param value value to store
+ * @param *addr address pointer
+ * @return successful / failed
+ *
+ * Exclusive STR command for 16 bit values
+ */
+uint32_t __STREXH(uint16_t value, uint16_t *addr)
+{
+ uint32_t result=0;
+
+ __ASM volatile ("strexh %0, %2, [%1]" : "=r" (result) : "r" (addr), "r" (value) );
+ return(result);
+}
+
+/**
+ * @brief STR Exclusive (32 bit)
+ *
+ * @param value value to store
+ * @param *addr address pointer
+ * @return successful / failed
+ *
+ * Exclusive STR command for 32 bit values
+ */
+uint32_t __STREXW(uint32_t value, uint32_t *addr)
+{
+ uint32_t result=0;
+
+ __ASM volatile ("strex %0, %2, [%1]" : "=r" (result) : "r" (addr), "r" (value) );
+ return(result);
+}
+
+
+#elif (defined (__TASKING__)) /*------------------ TASKING Compiler ---------------------*/
+/* TASKING carm specific functions */
+
+/*
+ * The CMSIS functions have been implemented as intrinsics in the compiler.
+ * Please use "carm -?i" to get an up to date list of all instrinsics,
+ * Including the CMSIS ones.
+ */
+
+#endif
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/cmsis/core_cm3.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/cmsis/core_cm3.h
new file mode 100644
index 0000000..1c07eff
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/cmsis/core_cm3.h
@@ -0,0 +1,1818 @@
+/**************************************************************************//**
+ * @file core_cm3.h
+ * @brief CMSIS Cortex-M3 Core Peripheral Access Layer Header File
+ * @version V1.30
+ * @date 30. October 2009
+ *
+ * @note
+ * Copyright (C) 2009 ARM Limited. All rights reserved.
+ *
+ * @par
+ * ARM Limited (ARM) is supplying this software for use with Cortex-M
+ * processor based microcontrollers. This file can be freely distributed
+ * within development tools that are supporting such ARM based processors.
+ *
+ * @par
+ * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
+ * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
+ * ARM SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
+ * CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
+ *
+ ******************************************************************************/
+
+#ifndef __CM3_CORE_H__
+#define __CM3_CORE_H__
+
+/** @addtogroup CMSIS_CM3_core_LintCinfiguration CMSIS CM3 Core Lint Configuration
+ *
+ * List of Lint messages which will be suppressed and not shown:
+ * - Error 10: \n
+ * register uint32_t __regBasePri __asm("basepri"); \n
+ * Error 10: Expecting ';'
+ * .
+ * - Error 530: \n
+ * return(__regBasePri); \n
+ * Warning 530: Symbol '__regBasePri' (line 264) not initialized
+ * .
+ * - Error 550: \n
+ * __regBasePri = (basePri & 0x1ff); \n
+ * Warning 550: Symbol '__regBasePri' (line 271) not accessed
+ * .
+ * - Error 754: \n
+ * uint32_t RESERVED0[24]; \n
+ * Info 754: local structure member '<some, not used in the HAL>' (line 109, file ./cm3_core.h) not referenced
+ * .
+ * - Error 750: \n
+ * #define __CM3_CORE_H__ \n
+ * Info 750: local macro '__CM3_CORE_H__' (line 43, file./cm3_core.h) not referenced
+ * .
+ * - Error 528: \n
+ * static __INLINE void NVIC_DisableIRQ(uint32_t IRQn) \n
+ * Warning 528: Symbol 'NVIC_DisableIRQ(unsigned int)' (line 419, file ./cm3_core.h) not referenced
+ * .
+ * - Error 751: \n
+ * } InterruptType_Type; \n
+ * Info 751: local typedef 'InterruptType_Type' (line 170, file ./cm3_core.h) not referenced
+ * .
+ * Note: To re-enable a Message, insert a space before 'lint' *
+ *
+ */
+
+/*lint -save */
+/*lint -e10 */
+/*lint -e530 */
+/*lint -e550 */
+/*lint -e754 */
+/*lint -e750 */
+/*lint -e528 */
+/*lint -e751 */
+
+
+/** @addtogroup CMSIS_CM3_core_definitions CM3 Core Definitions
+ This file defines all structures and symbols for CMSIS core:
+ - CMSIS version number
+ - Cortex-M core registers and bitfields
+ - Cortex-M core peripheral base address
+ @{
+ */
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+#define __CM3_CMSIS_VERSION_MAIN (0x01) /*!< [31:16] CMSIS HAL main version */
+#define __CM3_CMSIS_VERSION_SUB (0x30) /*!< [15:0] CMSIS HAL sub version */
+#define __CM3_CMSIS_VERSION ((__CM3_CMSIS_VERSION_MAIN << 16) | __CM3_CMSIS_VERSION_SUB) /*!< CMSIS HAL version number */
+
+#define __CORTEX_M (0x03) /*!< Cortex core */
+
+#include <stdint.h> /* Include standard types */
+
+#if defined (__ICCARM__)
+ #include <intrinsics.h> /* IAR Intrinsics */
+#endif
+
+
+#ifndef __NVIC_PRIO_BITS
+ #define __NVIC_PRIO_BITS 4 /*!< standard definition for NVIC Priority Bits */
+#endif
+
+
+
+
+/**
+ * IO definitions
+ *
+ * define access restrictions to peripheral registers
+ */
+
+#ifdef __cplusplus
+ #define __I volatile /*!< defines 'read only' permissions */
+#else
+ #define __I volatile const /*!< defines 'read only' permissions */
+#endif
+#define __O volatile /*!< defines 'write only' permissions */
+#define __IO volatile /*!< defines 'read / write' permissions */
+
+
+
+/*******************************************************************************
+ * Register Abstraction
+ ******************************************************************************/
+/** @addtogroup CMSIS_CM3_core_register CMSIS CM3 Core Register
+ @{
+*/
+
+
+/** @addtogroup CMSIS_CM3_NVIC CMSIS CM3 NVIC
+ memory mapped structure for Nested Vectored Interrupt Controller (NVIC)
+ @{
+ */
+typedef struct
+{
+ __IO uint32_t ISER[8]; /*!< Offset: 0x000 Interrupt Set Enable Register */
+ uint32_t RESERVED0[24];
+ __IO uint32_t ICER[8]; /*!< Offset: 0x080 Interrupt Clear Enable Register */
+ uint32_t RSERVED1[24];
+ __IO uint32_t ISPR[8]; /*!< Offset: 0x100 Interrupt Set Pending Register */
+ uint32_t RESERVED2[24];
+ __IO uint32_t ICPR[8]; /*!< Offset: 0x180 Interrupt Clear Pending Register */
+ uint32_t RESERVED3[24];
+ __IO uint32_t IABR[8]; /*!< Offset: 0x200 Interrupt Active bit Register */
+ uint32_t RESERVED4[56];
+ __IO uint8_t IP[240]; /*!< Offset: 0x300 Interrupt Priority Register (8Bit wide) */
+ uint32_t RESERVED5[644];
+ __O uint32_t STIR; /*!< Offset: 0xE00 Software Trigger Interrupt Register */
+} NVIC_Type;
+/*@}*/ /* end of group CMSIS_CM3_NVIC */
+
+
+/** @addtogroup CMSIS_CM3_SCB CMSIS CM3 SCB
+ memory mapped structure for System Control Block (SCB)
+ @{
+ */
+typedef struct
+{
+ __I uint32_t CPUID; /*!< Offset: 0x00 CPU ID Base Register */
+ __IO uint32_t ICSR; /*!< Offset: 0x04 Interrupt Control State Register */
+ __IO uint32_t VTOR; /*!< Offset: 0x08 Vector Table Offset Register */
+ __IO uint32_t AIRCR; /*!< Offset: 0x0C Application Interrupt / Reset Control Register */
+ __IO uint32_t SCR; /*!< Offset: 0x10 System Control Register */
+ __IO uint32_t CCR; /*!< Offset: 0x14 Configuration Control Register */
+ __IO uint8_t SHP[12]; /*!< Offset: 0x18 System Handlers Priority Registers (4-7, 8-11, 12-15) */
+ __IO uint32_t SHCSR; /*!< Offset: 0x24 System Handler Control and State Register */
+ __IO uint32_t CFSR; /*!< Offset: 0x28 Configurable Fault Status Register */
+ __IO uint32_t HFSR; /*!< Offset: 0x2C Hard Fault Status Register */
+ __IO uint32_t DFSR; /*!< Offset: 0x30 Debug Fault Status Register */
+ __IO uint32_t MMFAR; /*!< Offset: 0x34 Mem Manage Address Register */
+ __IO uint32_t BFAR; /*!< Offset: 0x38 Bus Fault Address Register */
+ __IO uint32_t AFSR; /*!< Offset: 0x3C Auxiliary Fault Status Register */
+ __I uint32_t PFR[2]; /*!< Offset: 0x40 Processor Feature Register */
+ __I uint32_t DFR; /*!< Offset: 0x48 Debug Feature Register */
+ __I uint32_t ADR; /*!< Offset: 0x4C Auxiliary Feature Register */
+ __I uint32_t MMFR[4]; /*!< Offset: 0x50 Memory Model Feature Register */
+ __I uint32_t ISAR[5]; /*!< Offset: 0x60 ISA Feature Register */
+} SCB_Type;
+
+/* SCB CPUID Register Definitions */
+#define SCB_CPUID_IMPLEMENTER_Pos 24 /*!< SCB CPUID: IMPLEMENTER Position */
+#define SCB_CPUID_IMPLEMENTER_Msk (0xFFul << SCB_CPUID_IMPLEMENTER_Pos) /*!< SCB CPUID: IMPLEMENTER Mask */
+
+#define SCB_CPUID_VARIANT_Pos 20 /*!< SCB CPUID: VARIANT Position */
+#define SCB_CPUID_VARIANT_Msk (0xFul << SCB_CPUID_VARIANT_Pos) /*!< SCB CPUID: VARIANT Mask */
+
+#define SCB_CPUID_PARTNO_Pos 4 /*!< SCB CPUID: PARTNO Position */
+#define SCB_CPUID_PARTNO_Msk (0xFFFul << SCB_CPUID_PARTNO_Pos) /*!< SCB CPUID: PARTNO Mask */
+
+#define SCB_CPUID_REVISION_Pos 0 /*!< SCB CPUID: REVISION Position */
+#define SCB_CPUID_REVISION_Msk (0xFul << SCB_CPUID_REVISION_Pos) /*!< SCB CPUID: REVISION Mask */
+
+/* SCB Interrupt Control State Register Definitions */
+#define SCB_ICSR_NMIPENDSET_Pos 31 /*!< SCB ICSR: NMIPENDSET Position */
+#define SCB_ICSR_NMIPENDSET_Msk (1ul << SCB_ICSR_NMIPENDSET_Pos) /*!< SCB ICSR: NMIPENDSET Mask */
+
+#define SCB_ICSR_PENDSVSET_Pos 28 /*!< SCB ICSR: PENDSVSET Position */
+#define SCB_ICSR_PENDSVSET_Msk (1ul << SCB_ICSR_PENDSVSET_Pos) /*!< SCB ICSR: PENDSVSET Mask */
+
+#define SCB_ICSR_PENDSVCLR_Pos 27 /*!< SCB ICSR: PENDSVCLR Position */
+#define SCB_ICSR_PENDSVCLR_Msk (1ul << SCB_ICSR_PENDSVCLR_Pos) /*!< SCB ICSR: PENDSVCLR Mask */
+
+#define SCB_ICSR_PENDSTSET_Pos 26 /*!< SCB ICSR: PENDSTSET Position */
+#define SCB_ICSR_PENDSTSET_Msk (1ul << SCB_ICSR_PENDSTSET_Pos) /*!< SCB ICSR: PENDSTSET Mask */
+
+#define SCB_ICSR_PENDSTCLR_Pos 25 /*!< SCB ICSR: PENDSTCLR Position */
+#define SCB_ICSR_PENDSTCLR_Msk (1ul << SCB_ICSR_PENDSTCLR_Pos) /*!< SCB ICSR: PENDSTCLR Mask */
+
+#define SCB_ICSR_ISRPREEMPT_Pos 23 /*!< SCB ICSR: ISRPREEMPT Position */
+#define SCB_ICSR_ISRPREEMPT_Msk (1ul << SCB_ICSR_ISRPREEMPT_Pos) /*!< SCB ICSR: ISRPREEMPT Mask */
+
+#define SCB_ICSR_ISRPENDING_Pos 22 /*!< SCB ICSR: ISRPENDING Position */
+#define SCB_ICSR_ISRPENDING_Msk (1ul << SCB_ICSR_ISRPENDING_Pos) /*!< SCB ICSR: ISRPENDING Mask */
+
+#define SCB_ICSR_VECTPENDING_Pos 12 /*!< SCB ICSR: VECTPENDING Position */
+#define SCB_ICSR_VECTPENDING_Msk (0x1FFul << SCB_ICSR_VECTPENDING_Pos) /*!< SCB ICSR: VECTPENDING Mask */
+
+#define SCB_ICSR_RETTOBASE_Pos 11 /*!< SCB ICSR: RETTOBASE Position */
+#define SCB_ICSR_RETTOBASE_Msk (1ul << SCB_ICSR_RETTOBASE_Pos) /*!< SCB ICSR: RETTOBASE Mask */
+
+#define SCB_ICSR_VECTACTIVE_Pos 0 /*!< SCB ICSR: VECTACTIVE Position */
+#define SCB_ICSR_VECTACTIVE_Msk (0x1FFul << SCB_ICSR_VECTACTIVE_Pos) /*!< SCB ICSR: VECTACTIVE Mask */
+
+/* SCB Interrupt Control State Register Definitions */
+#define SCB_VTOR_TBLBASE_Pos 29 /*!< SCB VTOR: TBLBASE Position */
+#define SCB_VTOR_TBLBASE_Msk (0x1ul << SCB_VTOR_TBLBASE_Pos) /*!< SCB VTOR: TBLBASE Mask */
+
+#define SCB_VTOR_TBLOFF_Pos 7 /*!< SCB VTOR: TBLOFF Position */
+#define SCB_VTOR_TBLOFF_Msk (0x3FFFFFul << SCB_VTOR_TBLOFF_Pos) /*!< SCB VTOR: TBLOFF Mask */
+
+/* SCB Application Interrupt and Reset Control Register Definitions */
+#define SCB_AIRCR_VECTKEY_Pos 16 /*!< SCB AIRCR: VECTKEY Position */
+#define SCB_AIRCR_VECTKEY_Msk (0xFFFFul << SCB_AIRCR_VECTKEY_Pos) /*!< SCB AIRCR: VECTKEY Mask */
+
+#define SCB_AIRCR_VECTKEYSTAT_Pos 16 /*!< SCB AIRCR: VECTKEYSTAT Position */
+#define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFul << SCB_AIRCR_VECTKEYSTAT_Pos) /*!< SCB AIRCR: VECTKEYSTAT Mask */
+
+#define SCB_AIRCR_ENDIANESS_Pos 15 /*!< SCB AIRCR: ENDIANESS Position */
+#define SCB_AIRCR_ENDIANESS_Msk (1ul << SCB_AIRCR_ENDIANESS_Pos) /*!< SCB AIRCR: ENDIANESS Mask */
+
+#define SCB_AIRCR_PRIGROUP_Pos 8 /*!< SCB AIRCR: PRIGROUP Position */
+#define SCB_AIRCR_PRIGROUP_Msk (7ul << SCB_AIRCR_PRIGROUP_Pos) /*!< SCB AIRCR: PRIGROUP Mask */
+
+#define SCB_AIRCR_SYSRESETREQ_Pos 2 /*!< SCB AIRCR: SYSRESETREQ Position */
+#define SCB_AIRCR_SYSRESETREQ_Msk (1ul << SCB_AIRCR_SYSRESETREQ_Pos) /*!< SCB AIRCR: SYSRESETREQ Mask */
+
+#define SCB_AIRCR_VECTCLRACTIVE_Pos 1 /*!< SCB AIRCR: VECTCLRACTIVE Position */
+#define SCB_AIRCR_VECTCLRACTIVE_Msk (1ul << SCB_AIRCR_VECTCLRACTIVE_Pos) /*!< SCB AIRCR: VECTCLRACTIVE Mask */
+
+#define SCB_AIRCR_VECTRESET_Pos 0 /*!< SCB AIRCR: VECTRESET Position */
+#define SCB_AIRCR_VECTRESET_Msk (1ul << SCB_AIRCR_VECTRESET_Pos) /*!< SCB AIRCR: VECTRESET Mask */
+
+/* SCB System Control Register Definitions */
+#define SCB_SCR_SEVONPEND_Pos 4 /*!< SCB SCR: SEVONPEND Position */
+#define SCB_SCR_SEVONPEND_Msk (1ul << SCB_SCR_SEVONPEND_Pos) /*!< SCB SCR: SEVONPEND Mask */
+
+#define SCB_SCR_SLEEPDEEP_Pos 2 /*!< SCB SCR: SLEEPDEEP Position */
+#define SCB_SCR_SLEEPDEEP_Msk (1ul << SCB_SCR_SLEEPDEEP_Pos) /*!< SCB SCR: SLEEPDEEP Mask */
+
+#define SCB_SCR_SLEEPONEXIT_Pos 1 /*!< SCB SCR: SLEEPONEXIT Position */
+#define SCB_SCR_SLEEPONEXIT_Msk (1ul << SCB_SCR_SLEEPONEXIT_Pos) /*!< SCB SCR: SLEEPONEXIT Mask */
+
+/* SCB Configuration Control Register Definitions */
+#define SCB_CCR_STKALIGN_Pos 9 /*!< SCB CCR: STKALIGN Position */
+#define SCB_CCR_STKALIGN_Msk (1ul << SCB_CCR_STKALIGN_Pos) /*!< SCB CCR: STKALIGN Mask */
+
+#define SCB_CCR_BFHFNMIGN_Pos 8 /*!< SCB CCR: BFHFNMIGN Position */
+#define SCB_CCR_BFHFNMIGN_Msk (1ul << SCB_CCR_BFHFNMIGN_Pos) /*!< SCB CCR: BFHFNMIGN Mask */
+
+#define SCB_CCR_DIV_0_TRP_Pos 4 /*!< SCB CCR: DIV_0_TRP Position */
+#define SCB_CCR_DIV_0_TRP_Msk (1ul << SCB_CCR_DIV_0_TRP_Pos) /*!< SCB CCR: DIV_0_TRP Mask */
+
+#define SCB_CCR_UNALIGN_TRP_Pos 3 /*!< SCB CCR: UNALIGN_TRP Position */
+#define SCB_CCR_UNALIGN_TRP_Msk (1ul << SCB_CCR_UNALIGN_TRP_Pos) /*!< SCB CCR: UNALIGN_TRP Mask */
+
+#define SCB_CCR_USERSETMPEND_Pos 1 /*!< SCB CCR: USERSETMPEND Position */
+#define SCB_CCR_USERSETMPEND_Msk (1ul << SCB_CCR_USERSETMPEND_Pos) /*!< SCB CCR: USERSETMPEND Mask */
+
+#define SCB_CCR_NONBASETHRDENA_Pos 0 /*!< SCB CCR: NONBASETHRDENA Position */
+#define SCB_CCR_NONBASETHRDENA_Msk (1ul << SCB_CCR_NONBASETHRDENA_Pos) /*!< SCB CCR: NONBASETHRDENA Mask */
+
+/* SCB System Handler Control and State Register Definitions */
+#define SCB_SHCSR_USGFAULTENA_Pos 18 /*!< SCB SHCSR: USGFAULTENA Position */
+#define SCB_SHCSR_USGFAULTENA_Msk (1ul << SCB_SHCSR_USGFAULTENA_Pos) /*!< SCB SHCSR: USGFAULTENA Mask */
+
+#define SCB_SHCSR_BUSFAULTENA_Pos 17 /*!< SCB SHCSR: BUSFAULTENA Position */
+#define SCB_SHCSR_BUSFAULTENA_Msk (1ul << SCB_SHCSR_BUSFAULTENA_Pos) /*!< SCB SHCSR: BUSFAULTENA Mask */
+
+#define SCB_SHCSR_MEMFAULTENA_Pos 16 /*!< SCB SHCSR: MEMFAULTENA Position */
+#define SCB_SHCSR_MEMFAULTENA_Msk (1ul << SCB_SHCSR_MEMFAULTENA_Pos) /*!< SCB SHCSR: MEMFAULTENA Mask */
+
+#define SCB_SHCSR_SVCALLPENDED_Pos 15 /*!< SCB SHCSR: SVCALLPENDED Position */
+#define SCB_SHCSR_SVCALLPENDED_Msk (1ul << SCB_SHCSR_SVCALLPENDED_Pos) /*!< SCB SHCSR: SVCALLPENDED Mask */
+
+#define SCB_SHCSR_BUSFAULTPENDED_Pos 14 /*!< SCB SHCSR: BUSFAULTPENDED Position */
+#define SCB_SHCSR_BUSFAULTPENDED_Msk (1ul << SCB_SHCSR_BUSFAULTPENDED_Pos) /*!< SCB SHCSR: BUSFAULTPENDED Mask */
+
+#define SCB_SHCSR_MEMFAULTPENDED_Pos 13 /*!< SCB SHCSR: MEMFAULTPENDED Position */
+#define SCB_SHCSR_MEMFAULTPENDED_Msk (1ul << SCB_SHCSR_MEMFAULTPENDED_Pos) /*!< SCB SHCSR: MEMFAULTPENDED Mask */
+
+#define SCB_SHCSR_USGFAULTPENDED_Pos 12 /*!< SCB SHCSR: USGFAULTPENDED Position */
+#define SCB_SHCSR_USGFAULTPENDED_Msk (1ul << SCB_SHCSR_USGFAULTPENDED_Pos) /*!< SCB SHCSR: USGFAULTPENDED Mask */
+
+#define SCB_SHCSR_SYSTICKACT_Pos 11 /*!< SCB SHCSR: SYSTICKACT Position */
+#define SCB_SHCSR_SYSTICKACT_Msk (1ul << SCB_SHCSR_SYSTICKACT_Pos) /*!< SCB SHCSR: SYSTICKACT Mask */
+
+#define SCB_SHCSR_PENDSVACT_Pos 10 /*!< SCB SHCSR: PENDSVACT Position */
+#define SCB_SHCSR_PENDSVACT_Msk (1ul << SCB_SHCSR_PENDSVACT_Pos) /*!< SCB SHCSR: PENDSVACT Mask */
+
+#define SCB_SHCSR_MONITORACT_Pos 8 /*!< SCB SHCSR: MONITORACT Position */
+#define SCB_SHCSR_MONITORACT_Msk (1ul << SCB_SHCSR_MONITORACT_Pos) /*!< SCB SHCSR: MONITORACT Mask */
+
+#define SCB_SHCSR_SVCALLACT_Pos 7 /*!< SCB SHCSR: SVCALLACT Position */
+#define SCB_SHCSR_SVCALLACT_Msk (1ul << SCB_SHCSR_SVCALLACT_Pos) /*!< SCB SHCSR: SVCALLACT Mask */
+
+#define SCB_SHCSR_USGFAULTACT_Pos 3 /*!< SCB SHCSR: USGFAULTACT Position */
+#define SCB_SHCSR_USGFAULTACT_Msk (1ul << SCB_SHCSR_USGFAULTACT_Pos) /*!< SCB SHCSR: USGFAULTACT Mask */
+
+#define SCB_SHCSR_BUSFAULTACT_Pos 1 /*!< SCB SHCSR: BUSFAULTACT Position */
+#define SCB_SHCSR_BUSFAULTACT_Msk (1ul << SCB_SHCSR_BUSFAULTACT_Pos) /*!< SCB SHCSR: BUSFAULTACT Mask */
+
+#define SCB_SHCSR_MEMFAULTACT_Pos 0 /*!< SCB SHCSR: MEMFAULTACT Position */
+#define SCB_SHCSR_MEMFAULTACT_Msk (1ul << SCB_SHCSR_MEMFAULTACT_Pos) /*!< SCB SHCSR: MEMFAULTACT Mask */
+
+/* SCB Configurable Fault Status Registers Definitions */
+#define SCB_CFSR_USGFAULTSR_Pos 16 /*!< SCB CFSR: Usage Fault Status Register Position */
+#define SCB_CFSR_USGFAULTSR_Msk (0xFFFFul << SCB_CFSR_USGFAULTSR_Pos) /*!< SCB CFSR: Usage Fault Status Register Mask */
+
+#define SCB_CFSR_BUSFAULTSR_Pos 8 /*!< SCB CFSR: Bus Fault Status Register Position */
+#define SCB_CFSR_BUSFAULTSR_Msk (0xFFul << SCB_CFSR_BUSFAULTSR_Pos) /*!< SCB CFSR: Bus Fault Status Register Mask */
+
+#define SCB_CFSR_MEMFAULTSR_Pos 0 /*!< SCB CFSR: Memory Manage Fault Status Register Position */
+#define SCB_CFSR_MEMFAULTSR_Msk (0xFFul << SCB_CFSR_MEMFAULTSR_Pos) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */
+
+/* SCB Hard Fault Status Registers Definitions */
+#define SCB_HFSR_DEBUGEVT_Pos 31 /*!< SCB HFSR: DEBUGEVT Position */
+#define SCB_HFSR_DEBUGEVT_Msk (1ul << SCB_HFSR_DEBUGEVT_Pos) /*!< SCB HFSR: DEBUGEVT Mask */
+
+#define SCB_HFSR_FORCED_Pos 30 /*!< SCB HFSR: FORCED Position */
+#define SCB_HFSR_FORCED_Msk (1ul << SCB_HFSR_FORCED_Pos) /*!< SCB HFSR: FORCED Mask */
+
+#define SCB_HFSR_VECTTBL_Pos 1 /*!< SCB HFSR: VECTTBL Position */
+#define SCB_HFSR_VECTTBL_Msk (1ul << SCB_HFSR_VECTTBL_Pos) /*!< SCB HFSR: VECTTBL Mask */
+
+/* SCB Debug Fault Status Register Definitions */
+#define SCB_DFSR_EXTERNAL_Pos 4 /*!< SCB DFSR: EXTERNAL Position */
+#define SCB_DFSR_EXTERNAL_Msk (1ul << SCB_DFSR_EXTERNAL_Pos) /*!< SCB DFSR: EXTERNAL Mask */
+
+#define SCB_DFSR_VCATCH_Pos 3 /*!< SCB DFSR: VCATCH Position */
+#define SCB_DFSR_VCATCH_Msk (1ul << SCB_DFSR_VCATCH_Pos) /*!< SCB DFSR: VCATCH Mask */
+
+#define SCB_DFSR_DWTTRAP_Pos 2 /*!< SCB DFSR: DWTTRAP Position */
+#define SCB_DFSR_DWTTRAP_Msk (1ul << SCB_DFSR_DWTTRAP_Pos) /*!< SCB DFSR: DWTTRAP Mask */
+
+#define SCB_DFSR_BKPT_Pos 1 /*!< SCB DFSR: BKPT Position */
+#define SCB_DFSR_BKPT_Msk (1ul << SCB_DFSR_BKPT_Pos) /*!< SCB DFSR: BKPT Mask */
+
+#define SCB_DFSR_HALTED_Pos 0 /*!< SCB DFSR: HALTED Position */
+#define SCB_DFSR_HALTED_Msk (1ul << SCB_DFSR_HALTED_Pos) /*!< SCB DFSR: HALTED Mask */
+/*@}*/ /* end of group CMSIS_CM3_SCB */
+
+
+/** @addtogroup CMSIS_CM3_SysTick CMSIS CM3 SysTick
+ memory mapped structure for SysTick
+ @{
+ */
+typedef struct
+{
+ __IO uint32_t CTRL; /*!< Offset: 0x00 SysTick Control and Status Register */
+ __IO uint32_t LOAD; /*!< Offset: 0x04 SysTick Reload Value Register */
+ __IO uint32_t VAL; /*!< Offset: 0x08 SysTick Current Value Register */
+ __I uint32_t CALIB; /*!< Offset: 0x0C SysTick Calibration Register */
+} SysTick_Type;
+
+/* SysTick Control / Status Register Definitions */
+#define SysTick_CTRL_COUNTFLAG_Pos 16 /*!< SysTick CTRL: COUNTFLAG Position */
+#define SysTick_CTRL_COUNTFLAG_Msk (1ul << SysTick_CTRL_COUNTFLAG_Pos) /*!< SysTick CTRL: COUNTFLAG Mask */
+
+#define SysTick_CTRL_CLKSOURCE_Pos 2 /*!< SysTick CTRL: CLKSOURCE Position */
+#define SysTick_CTRL_CLKSOURCE_Msk (1ul << SysTick_CTRL_CLKSOURCE_Pos) /*!< SysTick CTRL: CLKSOURCE Mask */
+
+#define SysTick_CTRL_TICKINT_Pos 1 /*!< SysTick CTRL: TICKINT Position */
+#define SysTick_CTRL_TICKINT_Msk (1ul << SysTick_CTRL_TICKINT_Pos) /*!< SysTick CTRL: TICKINT Mask */
+
+#define SysTick_CTRL_ENABLE_Pos 0 /*!< SysTick CTRL: ENABLE Position */
+#define SysTick_CTRL_ENABLE_Msk (1ul << SysTick_CTRL_ENABLE_Pos) /*!< SysTick CTRL: ENABLE Mask */
+
+/* SysTick Reload Register Definitions */
+#define SysTick_LOAD_RELOAD_Pos 0 /*!< SysTick LOAD: RELOAD Position */
+#define SysTick_LOAD_RELOAD_Msk (0xFFFFFFul << SysTick_LOAD_RELOAD_Pos) /*!< SysTick LOAD: RELOAD Mask */
+
+/* SysTick Current Register Definitions */
+#define SysTick_VAL_CURRENT_Pos 0 /*!< SysTick VAL: CURRENT Position */
+#define SysTick_VAL_CURRENT_Msk (0xFFFFFFul << SysTick_VAL_CURRENT_Pos) /*!< SysTick VAL: CURRENT Mask */
+
+/* SysTick Calibration Register Definitions */
+#define SysTick_CALIB_NOREF_Pos 31 /*!< SysTick CALIB: NOREF Position */
+#define SysTick_CALIB_NOREF_Msk (1ul << SysTick_CALIB_NOREF_Pos) /*!< SysTick CALIB: NOREF Mask */
+
+#define SysTick_CALIB_SKEW_Pos 30 /*!< SysTick CALIB: SKEW Position */
+#define SysTick_CALIB_SKEW_Msk (1ul << SysTick_CALIB_SKEW_Pos) /*!< SysTick CALIB: SKEW Mask */
+
+#define SysTick_CALIB_TENMS_Pos 0 /*!< SysTick CALIB: TENMS Position */
+#define SysTick_CALIB_TENMS_Msk (0xFFFFFFul << SysTick_VAL_CURRENT_Pos) /*!< SysTick CALIB: TENMS Mask */
+/*@}*/ /* end of group CMSIS_CM3_SysTick */
+
+
+/** @addtogroup CMSIS_CM3_ITM CMSIS CM3 ITM
+ memory mapped structure for Instrumentation Trace Macrocell (ITM)
+ @{
+ */
+typedef struct
+{
+ __O union
+ {
+ __O uint8_t u8; /*!< Offset: ITM Stimulus Port 8-bit */
+ __O uint16_t u16; /*!< Offset: ITM Stimulus Port 16-bit */
+ __O uint32_t u32; /*!< Offset: ITM Stimulus Port 32-bit */
+ } PORT [32]; /*!< Offset: 0x00 ITM Stimulus Port Registers */
+ uint32_t RESERVED0[864];
+ __IO uint32_t TER; /*!< Offset: ITM Trace Enable Register */
+ uint32_t RESERVED1[15];
+ __IO uint32_t TPR; /*!< Offset: ITM Trace Privilege Register */
+ uint32_t RESERVED2[15];
+ __IO uint32_t TCR; /*!< Offset: ITM Trace Control Register */
+ uint32_t RESERVED3[29];
+ __IO uint32_t IWR; /*!< Offset: ITM Integration Write Register */
+ __IO uint32_t IRR; /*!< Offset: ITM Integration Read Register */
+ __IO uint32_t IMCR; /*!< Offset: ITM Integration Mode Control Register */
+ uint32_t RESERVED4[43];
+ __IO uint32_t LAR; /*!< Offset: ITM Lock Access Register */
+ __IO uint32_t LSR; /*!< Offset: ITM Lock Status Register */
+ uint32_t RESERVED5[6];
+ __I uint32_t PID4; /*!< Offset: ITM Peripheral Identification Register #4 */
+ __I uint32_t PID5; /*!< Offset: ITM Peripheral Identification Register #5 */
+ __I uint32_t PID6; /*!< Offset: ITM Peripheral Identification Register #6 */
+ __I uint32_t PID7; /*!< Offset: ITM Peripheral Identification Register #7 */
+ __I uint32_t PID0; /*!< Offset: ITM Peripheral Identification Register #0 */
+ __I uint32_t PID1; /*!< Offset: ITM Peripheral Identification Register #1 */
+ __I uint32_t PID2; /*!< Offset: ITM Peripheral Identification Register #2 */
+ __I uint32_t PID3; /*!< Offset: ITM Peripheral Identification Register #3 */
+ __I uint32_t CID0; /*!< Offset: ITM Component Identification Register #0 */
+ __I uint32_t CID1; /*!< Offset: ITM Component Identification Register #1 */
+ __I uint32_t CID2; /*!< Offset: ITM Component Identification Register #2 */
+ __I uint32_t CID3; /*!< Offset: ITM Component Identification Register #3 */
+} ITM_Type;
+
+/* ITM Trace Privilege Register Definitions */
+#define ITM_TPR_PRIVMASK_Pos 0 /*!< ITM TPR: PRIVMASK Position */
+#define ITM_TPR_PRIVMASK_Msk (0xFul << ITM_TPR_PRIVMASK_Pos) /*!< ITM TPR: PRIVMASK Mask */
+
+/* ITM Trace Control Register Definitions */
+#define ITM_TCR_BUSY_Pos 23 /*!< ITM TCR: BUSY Position */
+#define ITM_TCR_BUSY_Msk (1ul << ITM_TCR_BUSY_Pos) /*!< ITM TCR: BUSY Mask */
+
+#define ITM_TCR_ATBID_Pos 16 /*!< ITM TCR: ATBID Position */
+#define ITM_TCR_ATBID_Msk (0x7Ful << ITM_TCR_ATBID_Pos) /*!< ITM TCR: ATBID Mask */
+
+#define ITM_TCR_TSPrescale_Pos 8 /*!< ITM TCR: TSPrescale Position */
+#define ITM_TCR_TSPrescale_Msk (3ul << ITM_TCR_TSPrescale_Pos) /*!< ITM TCR: TSPrescale Mask */
+
+#define ITM_TCR_SWOENA_Pos 4 /*!< ITM TCR: SWOENA Position */
+#define ITM_TCR_SWOENA_Msk (1ul << ITM_TCR_SWOENA_Pos) /*!< ITM TCR: SWOENA Mask */
+
+#define ITM_TCR_DWTENA_Pos 3 /*!< ITM TCR: DWTENA Position */
+#define ITM_TCR_DWTENA_Msk (1ul << ITM_TCR_DWTENA_Pos) /*!< ITM TCR: DWTENA Mask */
+
+#define ITM_TCR_SYNCENA_Pos 2 /*!< ITM TCR: SYNCENA Position */
+#define ITM_TCR_SYNCENA_Msk (1ul << ITM_TCR_SYNCENA_Pos) /*!< ITM TCR: SYNCENA Mask */
+
+#define ITM_TCR_TSENA_Pos 1 /*!< ITM TCR: TSENA Position */
+#define ITM_TCR_TSENA_Msk (1ul << ITM_TCR_TSENA_Pos) /*!< ITM TCR: TSENA Mask */
+
+#define ITM_TCR_ITMENA_Pos 0 /*!< ITM TCR: ITM Enable bit Position */
+#define ITM_TCR_ITMENA_Msk (1ul << ITM_TCR_ITMENA_Pos) /*!< ITM TCR: ITM Enable bit Mask */
+
+/* ITM Integration Write Register Definitions */
+#define ITM_IWR_ATVALIDM_Pos 0 /*!< ITM IWR: ATVALIDM Position */
+#define ITM_IWR_ATVALIDM_Msk (1ul << ITM_IWR_ATVALIDM_Pos) /*!< ITM IWR: ATVALIDM Mask */
+
+/* ITM Integration Read Register Definitions */
+#define ITM_IRR_ATREADYM_Pos 0 /*!< ITM IRR: ATREADYM Position */
+#define ITM_IRR_ATREADYM_Msk (1ul << ITM_IRR_ATREADYM_Pos) /*!< ITM IRR: ATREADYM Mask */
+
+/* ITM Integration Mode Control Register Definitions */
+#define ITM_IMCR_INTEGRATION_Pos 0 /*!< ITM IMCR: INTEGRATION Position */
+#define ITM_IMCR_INTEGRATION_Msk (1ul << ITM_IMCR_INTEGRATION_Pos) /*!< ITM IMCR: INTEGRATION Mask */
+
+/* ITM Lock Status Register Definitions */
+#define ITM_LSR_ByteAcc_Pos 2 /*!< ITM LSR: ByteAcc Position */
+#define ITM_LSR_ByteAcc_Msk (1ul << ITM_LSR_ByteAcc_Pos) /*!< ITM LSR: ByteAcc Mask */
+
+#define ITM_LSR_Access_Pos 1 /*!< ITM LSR: Access Position */
+#define ITM_LSR_Access_Msk (1ul << ITM_LSR_Access_Pos) /*!< ITM LSR: Access Mask */
+
+#define ITM_LSR_Present_Pos 0 /*!< ITM LSR: Present Position */
+#define ITM_LSR_Present_Msk (1ul << ITM_LSR_Present_Pos) /*!< ITM LSR: Present Mask */
+/*@}*/ /* end of group CMSIS_CM3_ITM */
+
+
+/** @addtogroup CMSIS_CM3_InterruptType CMSIS CM3 Interrupt Type
+ memory mapped structure for Interrupt Type
+ @{
+ */
+typedef struct
+{
+ uint32_t RESERVED0;
+ __I uint32_t ICTR; /*!< Offset: 0x04 Interrupt Control Type Register */
+#if ((defined __CM3_REV) && (__CM3_REV >= 0x200))
+ __IO uint32_t ACTLR; /*!< Offset: 0x08 Auxiliary Control Register */
+#else
+ uint32_t RESERVED1;
+#endif
+} InterruptType_Type;
+
+/* Interrupt Controller Type Register Definitions */
+#define InterruptType_ICTR_INTLINESNUM_Pos 0 /*!< InterruptType ICTR: INTLINESNUM Position */
+#define InterruptType_ICTR_INTLINESNUM_Msk (0x1Ful << InterruptType_ICTR_INTLINESNUM_Pos) /*!< InterruptType ICTR: INTLINESNUM Mask */
+
+/* Auxiliary Control Register Definitions */
+#define InterruptType_ACTLR_DISFOLD_Pos 2 /*!< InterruptType ACTLR: DISFOLD Position */
+#define InterruptType_ACTLR_DISFOLD_Msk (1ul << InterruptType_ACTLR_DISFOLD_Pos) /*!< InterruptType ACTLR: DISFOLD Mask */
+
+#define InterruptType_ACTLR_DISDEFWBUF_Pos 1 /*!< InterruptType ACTLR: DISDEFWBUF Position */
+#define InterruptType_ACTLR_DISDEFWBUF_Msk (1ul << InterruptType_ACTLR_DISDEFWBUF_Pos) /*!< InterruptType ACTLR: DISDEFWBUF Mask */
+
+#define InterruptType_ACTLR_DISMCYCINT_Pos 0 /*!< InterruptType ACTLR: DISMCYCINT Position */
+#define InterruptType_ACTLR_DISMCYCINT_Msk (1ul << InterruptType_ACTLR_DISMCYCINT_Pos) /*!< InterruptType ACTLR: DISMCYCINT Mask */
+/*@}*/ /* end of group CMSIS_CM3_InterruptType */
+
+
+#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1)
+/** @addtogroup CMSIS_CM3_MPU CMSIS CM3 MPU
+ memory mapped structure for Memory Protection Unit (MPU)
+ @{
+ */
+typedef struct
+{
+ __I uint32_t TYPE; /*!< Offset: 0x00 MPU Type Register */
+ __IO uint32_t CTRL; /*!< Offset: 0x04 MPU Control Register */
+ __IO uint32_t RNR; /*!< Offset: 0x08 MPU Region RNRber Register */
+ __IO uint32_t RBAR; /*!< Offset: 0x0C MPU Region Base Address Register */
+ __IO uint32_t RASR; /*!< Offset: 0x10 MPU Region Attribute and Size Register */
+ __IO uint32_t RBAR_A1; /*!< Offset: 0x14 MPU Alias 1 Region Base Address Register */
+ __IO uint32_t RASR_A1; /*!< Offset: 0x18 MPU Alias 1 Region Attribute and Size Register */
+ __IO uint32_t RBAR_A2; /*!< Offset: 0x1C MPU Alias 2 Region Base Address Register */
+ __IO uint32_t RASR_A2; /*!< Offset: 0x20 MPU Alias 2 Region Attribute and Size Register */
+ __IO uint32_t RBAR_A3; /*!< Offset: 0x24 MPU Alias 3 Region Base Address Register */
+ __IO uint32_t RASR_A3; /*!< Offset: 0x28 MPU Alias 3 Region Attribute and Size Register */
+} MPU_Type;
+
+/* MPU Type Register */
+#define MPU_TYPE_IREGION_Pos 16 /*!< MPU TYPE: IREGION Position */
+#define MPU_TYPE_IREGION_Msk (0xFFul << MPU_TYPE_IREGION_Pos) /*!< MPU TYPE: IREGION Mask */
+
+#define MPU_TYPE_DREGION_Pos 8 /*!< MPU TYPE: DREGION Position */
+#define MPU_TYPE_DREGION_Msk (0xFFul << MPU_TYPE_DREGION_Pos) /*!< MPU TYPE: DREGION Mask */
+
+#define MPU_TYPE_SEPARATE_Pos 0 /*!< MPU TYPE: SEPARATE Position */
+#define MPU_TYPE_SEPARATE_Msk (1ul << MPU_TYPE_SEPARATE_Pos) /*!< MPU TYPE: SEPARATE Mask */
+
+/* MPU Control Register */
+#define MPU_CTRL_PRIVDEFENA_Pos 2 /*!< MPU CTRL: PRIVDEFENA Position */
+#define MPU_CTRL_PRIVDEFENA_Msk (1ul << MPU_CTRL_PRIVDEFENA_Pos) /*!< MPU CTRL: PRIVDEFENA Mask */
+
+#define MPU_CTRL_HFNMIENA_Pos 1 /*!< MPU CTRL: HFNMIENA Position */
+#define MPU_CTRL_HFNMIENA_Msk (1ul << MPU_CTRL_HFNMIENA_Pos) /*!< MPU CTRL: HFNMIENA Mask */
+
+#define MPU_CTRL_ENABLE_Pos 0 /*!< MPU CTRL: ENABLE Position */
+#define MPU_CTRL_ENABLE_Msk (1ul << MPU_CTRL_ENABLE_Pos) /*!< MPU CTRL: ENABLE Mask */
+
+/* MPU Region Number Register */
+#define MPU_RNR_REGION_Pos 0 /*!< MPU RNR: REGION Position */
+#define MPU_RNR_REGION_Msk (0xFFul << MPU_RNR_REGION_Pos) /*!< MPU RNR: REGION Mask */
+
+/* MPU Region Base Address Register */
+#define MPU_RBAR_ADDR_Pos 5 /*!< MPU RBAR: ADDR Position */
+#define MPU_RBAR_ADDR_Msk (0x7FFFFFFul << MPU_RBAR_ADDR_Pos) /*!< MPU RBAR: ADDR Mask */
+
+#define MPU_RBAR_VALID_Pos 4 /*!< MPU RBAR: VALID Position */
+#define MPU_RBAR_VALID_Msk (1ul << MPU_RBAR_VALID_Pos) /*!< MPU RBAR: VALID Mask */
+
+#define MPU_RBAR_REGION_Pos 0 /*!< MPU RBAR: REGION Position */
+#define MPU_RBAR_REGION_Msk (0xFul << MPU_RBAR_REGION_Pos) /*!< MPU RBAR: REGION Mask */
+
+/* MPU Region Attribute and Size Register */
+#define MPU_RASR_XN_Pos 28 /*!< MPU RASR: XN Position */
+#define MPU_RASR_XN_Msk (1ul << MPU_RASR_XN_Pos) /*!< MPU RASR: XN Mask */
+
+#define MPU_RASR_AP_Pos 24 /*!< MPU RASR: AP Position */
+#define MPU_RASR_AP_Msk (7ul << MPU_RASR_AP_Pos) /*!< MPU RASR: AP Mask */
+
+#define MPU_RASR_TEX_Pos 19 /*!< MPU RASR: TEX Position */
+#define MPU_RASR_TEX_Msk (7ul << MPU_RASR_TEX_Pos) /*!< MPU RASR: TEX Mask */
+
+#define MPU_RASR_S_Pos 18 /*!< MPU RASR: Shareable bit Position */
+#define MPU_RASR_S_Msk (1ul << MPU_RASR_S_Pos) /*!< MPU RASR: Shareable bit Mask */
+
+#define MPU_RASR_C_Pos 17 /*!< MPU RASR: Cacheable bit Position */
+#define MPU_RASR_C_Msk (1ul << MPU_RASR_C_Pos) /*!< MPU RASR: Cacheable bit Mask */
+
+#define MPU_RASR_B_Pos 16 /*!< MPU RASR: Bufferable bit Position */
+#define MPU_RASR_B_Msk (1ul << MPU_RASR_B_Pos) /*!< MPU RASR: Bufferable bit Mask */
+
+#define MPU_RASR_SRD_Pos 8 /*!< MPU RASR: Sub-Region Disable Position */
+#define MPU_RASR_SRD_Msk (0xFFul << MPU_RASR_SRD_Pos) /*!< MPU RASR: Sub-Region Disable Mask */
+
+#define MPU_RASR_SIZE_Pos 1 /*!< MPU RASR: Region Size Field Position */
+#define MPU_RASR_SIZE_Msk (0x1Ful << MPU_RASR_SIZE_Pos) /*!< MPU RASR: Region Size Field Mask */
+
+#define MPU_RASR_ENA_Pos 0 /*!< MPU RASR: Region enable bit Position */
+#define MPU_RASR_ENA_Msk (0x1Ful << MPU_RASR_ENA_Pos) /*!< MPU RASR: Region enable bit Disable Mask */
+
+/*@}*/ /* end of group CMSIS_CM3_MPU */
+#endif
+
+
+/** @addtogroup CMSIS_CM3_CoreDebug CMSIS CM3 Core Debug
+ memory mapped structure for Core Debug Register
+ @{
+ */
+typedef struct
+{
+ __IO uint32_t DHCSR; /*!< Offset: 0x00 Debug Halting Control and Status Register */
+ __O uint32_t DCRSR; /*!< Offset: 0x04 Debug Core Register Selector Register */
+ __IO uint32_t DCRDR; /*!< Offset: 0x08 Debug Core Register Data Register */
+ __IO uint32_t DEMCR; /*!< Offset: 0x0C Debug Exception and Monitor Control Register */
+} CoreDebug_Type;
+
+/* Debug Halting Control and Status Register */
+#define CoreDebug_DHCSR_DBGKEY_Pos 16 /*!< CoreDebug DHCSR: DBGKEY Position */
+#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFul << CoreDebug_DHCSR_DBGKEY_Pos) /*!< CoreDebug DHCSR: DBGKEY Mask */
+
+#define CoreDebug_DHCSR_S_RESET_ST_Pos 25 /*!< CoreDebug DHCSR: S_RESET_ST Position */
+#define CoreDebug_DHCSR_S_RESET_ST_Msk (1ul << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< CoreDebug DHCSR: S_RESET_ST Mask */
+
+#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24 /*!< CoreDebug DHCSR: S_RETIRE_ST Position */
+#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1ul << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< CoreDebug DHCSR: S_RETIRE_ST Mask */
+
+#define CoreDebug_DHCSR_S_LOCKUP_Pos 19 /*!< CoreDebug DHCSR: S_LOCKUP Position */
+#define CoreDebug_DHCSR_S_LOCKUP_Msk (1ul << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< CoreDebug DHCSR: S_LOCKUP Mask */
+
+#define CoreDebug_DHCSR_S_SLEEP_Pos 18 /*!< CoreDebug DHCSR: S_SLEEP Position */
+#define CoreDebug_DHCSR_S_SLEEP_Msk (1ul << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< CoreDebug DHCSR: S_SLEEP Mask */
+
+#define CoreDebug_DHCSR_S_HALT_Pos 17 /*!< CoreDebug DHCSR: S_HALT Position */
+#define CoreDebug_DHCSR_S_HALT_Msk (1ul << CoreDebug_DHCSR_S_HALT_Pos) /*!< CoreDebug DHCSR: S_HALT Mask */
+
+#define CoreDebug_DHCSR_S_REGRDY_Pos 16 /*!< CoreDebug DHCSR: S_REGRDY Position */
+#define CoreDebug_DHCSR_S_REGRDY_Msk (1ul << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< CoreDebug DHCSR: S_REGRDY Mask */
+
+#define CoreDebug_DHCSR_C_SNAPSTALL_Pos 5 /*!< CoreDebug DHCSR: C_SNAPSTALL Position */
+#define CoreDebug_DHCSR_C_SNAPSTALL_Msk (1ul << CoreDebug_DHCSR_C_SNAPSTALL_Pos) /*!< CoreDebug DHCSR: C_SNAPSTALL Mask */
+
+#define CoreDebug_DHCSR_C_MASKINTS_Pos 3 /*!< CoreDebug DHCSR: C_MASKINTS Position */
+#define CoreDebug_DHCSR_C_MASKINTS_Msk (1ul << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< CoreDebug DHCSR: C_MASKINTS Mask */
+
+#define CoreDebug_DHCSR_C_STEP_Pos 2 /*!< CoreDebug DHCSR: C_STEP Position */
+#define CoreDebug_DHCSR_C_STEP_Msk (1ul << CoreDebug_DHCSR_C_STEP_Pos) /*!< CoreDebug DHCSR: C_STEP Mask */
+
+#define CoreDebug_DHCSR_C_HALT_Pos 1 /*!< CoreDebug DHCSR: C_HALT Position */
+#define CoreDebug_DHCSR_C_HALT_Msk (1ul << CoreDebug_DHCSR_C_HALT_Pos) /*!< CoreDebug DHCSR: C_HALT Mask */
+
+#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0 /*!< CoreDebug DHCSR: C_DEBUGEN Position */
+#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1ul << CoreDebug_DHCSR_C_DEBUGEN_Pos) /*!< CoreDebug DHCSR: C_DEBUGEN Mask */
+
+/* Debug Core Register Selector Register */
+#define CoreDebug_DCRSR_REGWnR_Pos 16 /*!< CoreDebug DCRSR: REGWnR Position */
+#define CoreDebug_DCRSR_REGWnR_Msk (1ul << CoreDebug_DCRSR_REGWnR_Pos) /*!< CoreDebug DCRSR: REGWnR Mask */
+
+#define CoreDebug_DCRSR_REGSEL_Pos 0 /*!< CoreDebug DCRSR: REGSEL Position */
+#define CoreDebug_DCRSR_REGSEL_Msk (0x1Ful << CoreDebug_DCRSR_REGSEL_Pos) /*!< CoreDebug DCRSR: REGSEL Mask */
+
+/* Debug Exception and Monitor Control Register */
+#define CoreDebug_DEMCR_TRCENA_Pos 24 /*!< CoreDebug DEMCR: TRCENA Position */
+#define CoreDebug_DEMCR_TRCENA_Msk (1ul << CoreDebug_DEMCR_TRCENA_Pos) /*!< CoreDebug DEMCR: TRCENA Mask */
+
+#define CoreDebug_DEMCR_MON_REQ_Pos 19 /*!< CoreDebug DEMCR: MON_REQ Position */
+#define CoreDebug_DEMCR_MON_REQ_Msk (1ul << CoreDebug_DEMCR_MON_REQ_Pos) /*!< CoreDebug DEMCR: MON_REQ Mask */
+
+#define CoreDebug_DEMCR_MON_STEP_Pos 18 /*!< CoreDebug DEMCR: MON_STEP Position */
+#define CoreDebug_DEMCR_MON_STEP_Msk (1ul << CoreDebug_DEMCR_MON_STEP_Pos) /*!< CoreDebug DEMCR: MON_STEP Mask */
+
+#define CoreDebug_DEMCR_MON_PEND_Pos 17 /*!< CoreDebug DEMCR: MON_PEND Position */
+#define CoreDebug_DEMCR_MON_PEND_Msk (1ul << CoreDebug_DEMCR_MON_PEND_Pos) /*!< CoreDebug DEMCR: MON_PEND Mask */
+
+#define CoreDebug_DEMCR_MON_EN_Pos 16 /*!< CoreDebug DEMCR: MON_EN Position */
+#define CoreDebug_DEMCR_MON_EN_Msk (1ul << CoreDebug_DEMCR_MON_EN_Pos) /*!< CoreDebug DEMCR: MON_EN Mask */
+
+#define CoreDebug_DEMCR_VC_HARDERR_Pos 10 /*!< CoreDebug DEMCR: VC_HARDERR Position */
+#define CoreDebug_DEMCR_VC_HARDERR_Msk (1ul << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< CoreDebug DEMCR: VC_HARDERR Mask */
+
+#define CoreDebug_DEMCR_VC_INTERR_Pos 9 /*!< CoreDebug DEMCR: VC_INTERR Position */
+#define CoreDebug_DEMCR_VC_INTERR_Msk (1ul << CoreDebug_DEMCR_VC_INTERR_Pos) /*!< CoreDebug DEMCR: VC_INTERR Mask */
+
+#define CoreDebug_DEMCR_VC_BUSERR_Pos 8 /*!< CoreDebug DEMCR: VC_BUSERR Position */
+#define CoreDebug_DEMCR_VC_BUSERR_Msk (1ul << CoreDebug_DEMCR_VC_BUSERR_Pos) /*!< CoreDebug DEMCR: VC_BUSERR Mask */
+
+#define CoreDebug_DEMCR_VC_STATERR_Pos 7 /*!< CoreDebug DEMCR: VC_STATERR Position */
+#define CoreDebug_DEMCR_VC_STATERR_Msk (1ul << CoreDebug_DEMCR_VC_STATERR_Pos) /*!< CoreDebug DEMCR: VC_STATERR Mask */
+
+#define CoreDebug_DEMCR_VC_CHKERR_Pos 6 /*!< CoreDebug DEMCR: VC_CHKERR Position */
+#define CoreDebug_DEMCR_VC_CHKERR_Msk (1ul << CoreDebug_DEMCR_VC_CHKERR_Pos) /*!< CoreDebug DEMCR: VC_CHKERR Mask */
+
+#define CoreDebug_DEMCR_VC_NOCPERR_Pos 5 /*!< CoreDebug DEMCR: VC_NOCPERR Position */
+#define CoreDebug_DEMCR_VC_NOCPERR_Msk (1ul << CoreDebug_DEMCR_VC_NOCPERR_Pos) /*!< CoreDebug DEMCR: VC_NOCPERR Mask */
+
+#define CoreDebug_DEMCR_VC_MMERR_Pos 4 /*!< CoreDebug DEMCR: VC_MMERR Position */
+#define CoreDebug_DEMCR_VC_MMERR_Msk (1ul << CoreDebug_DEMCR_VC_MMERR_Pos) /*!< CoreDebug DEMCR: VC_MMERR Mask */
+
+#define CoreDebug_DEMCR_VC_CORERESET_Pos 0 /*!< CoreDebug DEMCR: VC_CORERESET Position */
+#define CoreDebug_DEMCR_VC_CORERESET_Msk (1ul << CoreDebug_DEMCR_VC_CORERESET_Pos) /*!< CoreDebug DEMCR: VC_CORERESET Mask */
+/*@}*/ /* end of group CMSIS_CM3_CoreDebug */
+
+
+/* Memory mapping of Cortex-M3 Hardware */
+#define SCS_BASE (0xE000E000) /*!< System Control Space Base Address */
+#define ITM_BASE (0xE0000000) /*!< ITM Base Address */
+#define CoreDebug_BASE (0xE000EDF0) /*!< Core Debug Base Address */
+#define SysTick_BASE (SCS_BASE + 0x0010) /*!< SysTick Base Address */
+#define NVIC_BASE (SCS_BASE + 0x0100) /*!< NVIC Base Address */
+#define SCB_BASE (SCS_BASE + 0x0D00) /*!< System Control Block Base Address */
+
+#define InterruptType ((InterruptType_Type *) SCS_BASE) /*!< Interrupt Type Register */
+#define SCB ((SCB_Type *) SCB_BASE) /*!< SCB configuration struct */
+#define SysTick ((SysTick_Type *) SysTick_BASE) /*!< SysTick configuration struct */
+#define NVIC ((NVIC_Type *) NVIC_BASE) /*!< NVIC configuration struct */
+#define ITM ((ITM_Type *) ITM_BASE) /*!< ITM configuration struct */
+#define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE) /*!< Core Debug configuration struct */
+
+#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1)
+ #define MPU_BASE (SCS_BASE + 0x0D90) /*!< Memory Protection Unit */
+ #define MPU ((MPU_Type*) MPU_BASE) /*!< Memory Protection Unit */
+#endif
+
+/*@}*/ /* end of group CMSIS_CM3_core_register */
+
+
+/*******************************************************************************
+ * Hardware Abstraction Layer
+ ******************************************************************************/
+
+#if defined ( __CC_ARM )
+ #define __ASM __asm /*!< asm keyword for ARM Compiler */
+ #define __INLINE __inline /*!< inline keyword for ARM Compiler */
+
+#elif defined ( __ICCARM__ )
+ #define __ASM __asm /*!< asm keyword for IAR Compiler */
+ #define __INLINE inline /*!< inline keyword for IAR Compiler. Only avaiable in High optimization mode! */
+
+#elif defined ( __GNUC__ )
+ #define __ASM __asm /*!< asm keyword for GNU Compiler */
+ #define __INLINE inline /*!< inline keyword for GNU Compiler */
+
+#elif defined ( __TASKING__ )
+ #define __ASM __asm /*!< asm keyword for TASKING Compiler */
+ #define __INLINE inline /*!< inline keyword for TASKING Compiler */
+
+#endif
+
+
+/* ################### Compiler specific Intrinsics ########################### */
+
+#if defined ( __CC_ARM ) /*------------------RealView Compiler -----------------*/
+/* ARM armcc specific functions */
+
+#define __enable_fault_irq __enable_fiq
+#define __disable_fault_irq __disable_fiq
+
+#define __NOP __nop
+#define __WFI __wfi
+#define __WFE __wfe
+#define __SEV __sev
+#define __ISB() __isb(0)
+#define __DSB() __dsb(0)
+#define __DMB() __dmb(0)
+#define __REV __rev
+#define __RBIT __rbit
+#define __LDREXB(ptr) ((unsigned char ) __ldrex(ptr))
+#define __LDREXH(ptr) ((unsigned short) __ldrex(ptr))
+#define __LDREXW(ptr) ((unsigned int ) __ldrex(ptr))
+#define __STREXB(value, ptr) __strex(value, ptr)
+#define __STREXH(value, ptr) __strex(value, ptr)
+#define __STREXW(value, ptr) __strex(value, ptr)
+
+
+/* intrinsic unsigned long long __ldrexd(volatile void *ptr) */
+/* intrinsic int __strexd(unsigned long long val, volatile void *ptr) */
+/* intrinsic void __enable_irq(); */
+/* intrinsic void __disable_irq(); */
+
+
+/**
+ * @brief Return the Process Stack Pointer
+ *
+ * @return ProcessStackPointer
+ *
+ * Return the actual process stack pointer
+ */
+extern uint32_t __get_PSP(void);
+
+/**
+ * @brief Set the Process Stack Pointer
+ *
+ * @param topOfProcStack Process Stack Pointer
+ *
+ * Assign the value ProcessStackPointer to the MSP
+ * (process stack pointer) Cortex processor register
+ */
+extern void __set_PSP(uint32_t topOfProcStack);
+
+/**
+ * @brief Return the Main Stack Pointer
+ *
+ * @return Main Stack Pointer
+ *
+ * Return the current value of the MSP (main stack pointer)
+ * Cortex processor register
+ */
+extern uint32_t __get_MSP(void);
+
+/**
+ * @brief Set the Main Stack Pointer
+ *
+ * @param topOfMainStack Main Stack Pointer
+ *
+ * Assign the value mainStackPointer to the MSP
+ * (main stack pointer) Cortex processor register
+ */
+extern void __set_MSP(uint32_t topOfMainStack);
+
+/**
+ * @brief Reverse byte order in unsigned short value
+ *
+ * @param value value to reverse
+ * @return reversed value
+ *
+ * Reverse byte order in unsigned short value
+ */
+extern uint32_t __REV16(uint16_t value);
+
+/**
+ * @brief Reverse byte order in signed short value with sign extension to integer
+ *
+ * @param value value to reverse
+ * @return reversed value
+ *
+ * Reverse byte order in signed short value with sign extension to integer
+ */
+extern int32_t __REVSH(int16_t value);
+
+
+#if (__ARMCC_VERSION < 400000)
+
+/**
+ * @brief Remove the exclusive lock created by ldrex
+ *
+ * Removes the exclusive lock which is created by ldrex.
+ */
+extern void __CLREX(void);
+
+/**
+ * @brief Return the Base Priority value
+ *
+ * @return BasePriority
+ *
+ * Return the content of the base priority register
+ */
+extern uint32_t __get_BASEPRI(void);
+
+/**
+ * @brief Set the Base Priority value
+ *
+ * @param basePri BasePriority
+ *
+ * Set the base priority register
+ */
+extern void __set_BASEPRI(uint32_t basePri);
+
+/**
+ * @brief Return the Priority Mask value
+ *
+ * @return PriMask
+ *
+ * Return state of the priority mask bit from the priority mask register
+ */
+extern uint32_t __get_PRIMASK(void);
+
+/**
+ * @brief Set the Priority Mask value
+ *
+ * @param priMask PriMask
+ *
+ * Set the priority mask bit in the priority mask register
+ */
+extern void __set_PRIMASK(uint32_t priMask);
+
+/**
+ * @brief Return the Fault Mask value
+ *
+ * @return FaultMask
+ *
+ * Return the content of the fault mask register
+ */
+extern uint32_t __get_FAULTMASK(void);
+
+/**
+ * @brief Set the Fault Mask value
+ *
+ * @param faultMask faultMask value
+ *
+ * Set the fault mask register
+ */
+extern void __set_FAULTMASK(uint32_t faultMask);
+
+/**
+ * @brief Return the Control Register value
+ *
+ * @return Control value
+ *
+ * Return the content of the control register
+ */
+extern uint32_t __get_CONTROL(void);
+
+/**
+ * @brief Set the Control Register value
+ *
+ * @param control Control value
+ *
+ * Set the control register
+ */
+extern void __set_CONTROL(uint32_t control);
+
+#else /* (__ARMCC_VERSION >= 400000) */
+
+/**
+ * @brief Remove the exclusive lock created by ldrex
+ *
+ * Removes the exclusive lock which is created by ldrex.
+ */
+#define __CLREX __clrex
+
+/**
+ * @brief Return the Base Priority value
+ *
+ * @return BasePriority
+ *
+ * Return the content of the base priority register
+ */
+static __INLINE uint32_t __get_BASEPRI(void)
+{
+ register uint32_t __regBasePri __ASM("basepri");
+ return(__regBasePri);
+}
+
+/**
+ * @brief Set the Base Priority value
+ *
+ * @param basePri BasePriority
+ *
+ * Set the base priority register
+ */
+static __INLINE void __set_BASEPRI(uint32_t basePri)
+{
+ register uint32_t __regBasePri __ASM("basepri");
+ __regBasePri = (basePri & 0xff);
+}
+
+/**
+ * @brief Return the Priority Mask value
+ *
+ * @return PriMask
+ *
+ * Return state of the priority mask bit from the priority mask register
+ */
+static __INLINE uint32_t __get_PRIMASK(void)
+{
+ register uint32_t __regPriMask __ASM("primask");
+ return(__regPriMask);
+}
+
+/**
+ * @brief Set the Priority Mask value
+ *
+ * @param priMask PriMask
+ *
+ * Set the priority mask bit in the priority mask register
+ */
+static __INLINE void __set_PRIMASK(uint32_t priMask)
+{
+ register uint32_t __regPriMask __ASM("primask");
+ __regPriMask = (priMask);
+}
+
+/**
+ * @brief Return the Fault Mask value
+ *
+ * @return FaultMask
+ *
+ * Return the content of the fault mask register
+ */
+static __INLINE uint32_t __get_FAULTMASK(void)
+{
+ register uint32_t __regFaultMask __ASM("faultmask");
+ return(__regFaultMask);
+}
+
+/**
+ * @brief Set the Fault Mask value
+ *
+ * @param faultMask faultMask value
+ *
+ * Set the fault mask register
+ */
+static __INLINE void __set_FAULTMASK(uint32_t faultMask)
+{
+ register uint32_t __regFaultMask __ASM("faultmask");
+ __regFaultMask = (faultMask & 1);
+}
+
+/**
+ * @brief Return the Control Register value
+ *
+ * @return Control value
+ *
+ * Return the content of the control register
+ */
+static __INLINE uint32_t __get_CONTROL(void)
+{
+ register uint32_t __regControl __ASM("control");
+ return(__regControl);
+}
+
+/**
+ * @brief Set the Control Register value
+ *
+ * @param control Control value
+ *
+ * Set the control register
+ */
+static __INLINE void __set_CONTROL(uint32_t control)
+{
+ register uint32_t __regControl __ASM("control");
+ __regControl = control;
+}
+
+#endif /* __ARMCC_VERSION */
+
+
+
+#elif (defined (__ICCARM__)) /*------------------ ICC Compiler -------------------*/
+/* IAR iccarm specific functions */
+
+#define __enable_irq __enable_interrupt /*!< global Interrupt enable */
+#define __disable_irq __disable_interrupt /*!< global Interrupt disable */
+
+static __INLINE void __enable_fault_irq( void ) { __ASM ("cpsie f"); }
+static __INLINE void __disable_fault_irq( void ) { __ASM ("cpsid f"); }
+
+#define __NOP __no_operation /*!< no operation intrinsic in IAR Compiler */
+static __INLINE void __WFI( void ) { __ASM ("wfi"); }
+static __INLINE void __WFE( void ) { __ASM ("wfe"); }
+static __INLINE void __SEV( void ) { __ASM ("sev"); }
+static __INLINE void __CLREX( void ) { __ASM ("clrex"); }
+
+/* intrinsic void __ISB(void) */
+/* intrinsic void __DSB(void) */
+/* intrinsic void __DMB(void) */
+/* intrinsic void __set_PRIMASK(); */
+/* intrinsic void __get_PRIMASK(); */
+/* intrinsic void __set_FAULTMASK(); */
+/* intrinsic void __get_FAULTMASK(); */
+/* intrinsic uint32_t __REV(uint32_t value); */
+/* intrinsic uint32_t __REVSH(uint32_t value); */
+/* intrinsic unsigned long __STREX(unsigned long, unsigned long); */
+/* intrinsic unsigned long __LDREX(unsigned long *); */
+
+
+/**
+ * @brief Return the Process Stack Pointer
+ *
+ * @return ProcessStackPointer
+ *
+ * Return the actual process stack pointer
+ */
+extern uint32_t __get_PSP(void);
+
+/**
+ * @brief Set the Process Stack Pointer
+ *
+ * @param topOfProcStack Process Stack Pointer
+ *
+ * Assign the value ProcessStackPointer to the MSP
+ * (process stack pointer) Cortex processor register
+ */
+extern void __set_PSP(uint32_t topOfProcStack);
+
+/**
+ * @brief Return the Main Stack Pointer
+ *
+ * @return Main Stack Pointer
+ *
+ * Return the current value of the MSP (main stack pointer)
+ * Cortex processor register
+ */
+extern uint32_t __get_MSP(void);
+
+/**
+ * @brief Set the Main Stack Pointer
+ *
+ * @param topOfMainStack Main Stack Pointer
+ *
+ * Assign the value mainStackPointer to the MSP
+ * (main stack pointer) Cortex processor register
+ */
+extern void __set_MSP(uint32_t topOfMainStack);
+
+/**
+ * @brief Reverse byte order in unsigned short value
+ *
+ * @param value value to reverse
+ * @return reversed value
+ *
+ * Reverse byte order in unsigned short value
+ */
+extern uint32_t __REV16(uint16_t value);
+
+/**
+ * @brief Reverse bit order of value
+ *
+ * @param value value to reverse
+ * @return reversed value
+ *
+ * Reverse bit order of value
+ */
+extern uint32_t __RBIT(uint32_t value);
+
+/**
+ * @brief LDR Exclusive (8 bit)
+ *
+ * @param *addr address pointer
+ * @return value of (*address)
+ *
+ * Exclusive LDR command for 8 bit values)
+ */
+extern uint8_t __LDREXB(uint8_t *addr);
+
+/**
+ * @brief LDR Exclusive (16 bit)
+ *
+ * @param *addr address pointer
+ * @return value of (*address)
+ *
+ * Exclusive LDR command for 16 bit values
+ */
+extern uint16_t __LDREXH(uint16_t *addr);
+
+/**
+ * @brief LDR Exclusive (32 bit)
+ *
+ * @param *addr address pointer
+ * @return value of (*address)
+ *
+ * Exclusive LDR command for 32 bit values
+ */
+extern uint32_t __LDREXW(uint32_t *addr);
+
+/**
+ * @brief STR Exclusive (8 bit)
+ *
+ * @param value value to store
+ * @param *addr address pointer
+ * @return successful / failed
+ *
+ * Exclusive STR command for 8 bit values
+ */
+extern uint32_t __STREXB(uint8_t value, uint8_t *addr);
+
+/**
+ * @brief STR Exclusive (16 bit)
+ *
+ * @param value value to store
+ * @param *addr address pointer
+ * @return successful / failed
+ *
+ * Exclusive STR command for 16 bit values
+ */
+extern uint32_t __STREXH(uint16_t value, uint16_t *addr);
+
+/**
+ * @brief STR Exclusive (32 bit)
+ *
+ * @param value value to store
+ * @param *addr address pointer
+ * @return successful / failed
+ *
+ * Exclusive STR command for 32 bit values
+ */
+extern uint32_t __STREXW(uint32_t value, uint32_t *addr);
+
+
+
+#elif (defined (__GNUC__)) /*------------------ GNU Compiler ---------------------*/
+/* GNU gcc specific functions */
+
+static __INLINE void __enable_irq(void) { __ASM volatile ("cpsie i"); }
+static __INLINE void __disable_irq(void) { __ASM volatile ("cpsid i"); }
+
+static __INLINE void __enable_fault_irq(void) { __ASM volatile ("cpsie f"); }
+static __INLINE void __disable_fault_irq(void) { __ASM volatile ("cpsid f"); }
+
+static __INLINE void __NOP(void) { __ASM volatile ("nop"); }
+static __INLINE void __WFI(void) { __ASM volatile ("wfi"); }
+static __INLINE void __WFE(void) { __ASM volatile ("wfe"); }
+static __INLINE void __SEV(void) { __ASM volatile ("sev"); }
+static __INLINE void __ISB(void) { __ASM volatile ("isb"); }
+static __INLINE void __DSB(void) { __ASM volatile ("dsb"); }
+static __INLINE void __DMB(void) { __ASM volatile ("dmb"); }
+static __INLINE void __CLREX(void) { __ASM volatile ("clrex"); }
+
+
+/**
+ * @brief Return the Process Stack Pointer
+ *
+ * @return ProcessStackPointer
+ *
+ * Return the actual process stack pointer
+ */
+extern uint32_t __get_PSP(void);
+
+/**
+ * @brief Set the Process Stack Pointer
+ *
+ * @param topOfProcStack Process Stack Pointer
+ *
+ * Assign the value ProcessStackPointer to the MSP
+ * (process stack pointer) Cortex processor register
+ */
+extern void __set_PSP(uint32_t topOfProcStack);
+
+/**
+ * @brief Return the Main Stack Pointer
+ *
+ * @return Main Stack Pointer
+ *
+ * Return the current value of the MSP (main stack pointer)
+ * Cortex processor register
+ */
+extern uint32_t __get_MSP(void);
+
+/**
+ * @brief Set the Main Stack Pointer
+ *
+ * @param topOfMainStack Main Stack Pointer
+ *
+ * Assign the value mainStackPointer to the MSP
+ * (main stack pointer) Cortex processor register
+ */
+extern void __set_MSP(uint32_t topOfMainStack);
+
+/**
+ * @brief Return the Base Priority value
+ *
+ * @return BasePriority
+ *
+ * Return the content of the base priority register
+ */
+extern uint32_t __get_BASEPRI(void);
+
+/**
+ * @brief Set the Base Priority value
+ *
+ * @param basePri BasePriority
+ *
+ * Set the base priority register
+ */
+extern void __set_BASEPRI(uint32_t basePri);
+
+/**
+ * @brief Return the Priority Mask value
+ *
+ * @return PriMask
+ *
+ * Return state of the priority mask bit from the priority mask register
+ */
+extern uint32_t __get_PRIMASK(void);
+
+/**
+ * @brief Set the Priority Mask value
+ *
+ * @param priMask PriMask
+ *
+ * Set the priority mask bit in the priority mask register
+ */
+extern void __set_PRIMASK(uint32_t priMask);
+
+/**
+ * @brief Return the Fault Mask value
+ *
+ * @return FaultMask
+ *
+ * Return the content of the fault mask register
+ */
+extern uint32_t __get_FAULTMASK(void);
+
+/**
+ * @brief Set the Fault Mask value
+ *
+ * @param faultMask faultMask value
+ *
+ * Set the fault mask register
+ */
+extern void __set_FAULTMASK(uint32_t faultMask);
+
+/**
+ * @brief Return the Control Register value
+*
+* @return Control value
+ *
+ * Return the content of the control register
+ */
+extern uint32_t __get_CONTROL(void);
+
+/**
+ * @brief Set the Control Register value
+ *
+ * @param control Control value
+ *
+ * Set the control register
+ */
+extern void __set_CONTROL(uint32_t control);
+
+/**
+ * @brief Reverse byte order in integer value
+ *
+ * @param value value to reverse
+ * @return reversed value
+ *
+ * Reverse byte order in integer value
+ */
+extern uint32_t __REV(uint32_t value);
+
+/**
+ * @brief Reverse byte order in unsigned short value
+ *
+ * @param value value to reverse
+ * @return reversed value
+ *
+ * Reverse byte order in unsigned short value
+ */
+extern uint32_t __REV16(uint16_t value);
+
+/**
+ * @brief Reverse byte order in signed short value with sign extension to integer
+ *
+ * @param value value to reverse
+ * @return reversed value
+ *
+ * Reverse byte order in signed short value with sign extension to integer
+ */
+extern int32_t __REVSH(int16_t value);
+
+/**
+ * @brief Reverse bit order of value
+ *
+ * @param value value to reverse
+ * @return reversed value
+ *
+ * Reverse bit order of value
+ */
+extern uint32_t __RBIT(uint32_t value);
+
+/**
+ * @brief LDR Exclusive (8 bit)
+ *
+ * @param *addr address pointer
+ * @return value of (*address)
+ *
+ * Exclusive LDR command for 8 bit value
+ */
+extern uint8_t __LDREXB(uint8_t *addr);
+
+/**
+ * @brief LDR Exclusive (16 bit)
+ *
+ * @param *addr address pointer
+ * @return value of (*address)
+ *
+ * Exclusive LDR command for 16 bit values
+ */
+extern uint16_t __LDREXH(uint16_t *addr);
+
+/**
+ * @brief LDR Exclusive (32 bit)
+ *
+ * @param *addr address pointer
+ * @return value of (*address)
+ *
+ * Exclusive LDR command for 32 bit values
+ */
+extern uint32_t __LDREXW(uint32_t *addr);
+
+/**
+ * @brief STR Exclusive (8 bit)
+ *
+ * @param value value to store
+ * @param *addr address pointer
+ * @return successful / failed
+ *
+ * Exclusive STR command for 8 bit values
+ */
+extern uint32_t __STREXB(uint8_t value, uint8_t *addr);
+
+/**
+ * @brief STR Exclusive (16 bit)
+ *
+ * @param value value to store
+ * @param *addr address pointer
+ * @return successful / failed
+ *
+ * Exclusive STR command for 16 bit values
+ */
+extern uint32_t __STREXH(uint16_t value, uint16_t *addr);
+
+/**
+ * @brief STR Exclusive (32 bit)
+ *
+ * @param value value to store
+ * @param *addr address pointer
+ * @return successful / failed
+ *
+ * Exclusive STR command for 32 bit values
+ */
+extern uint32_t __STREXW(uint32_t value, uint32_t *addr);
+
+
+#elif (defined (__TASKING__)) /*------------------ TASKING Compiler ---------------------*/
+/* TASKING carm specific functions */
+
+/*
+ * The CMSIS functions have been implemented as intrinsics in the compiler.
+ * Please use "carm -?i" to get an up to date list of all instrinsics,
+ * Including the CMSIS ones.
+ */
+
+#endif
+
+
+/** @addtogroup CMSIS_CM3_Core_FunctionInterface CMSIS CM3 Core Function Interface
+ Core Function Interface containing:
+ - Core NVIC Functions
+ - Core SysTick Functions
+ - Core Reset Functions
+*/
+/*@{*/
+
+/* ########################## NVIC functions #################################### */
+
+/**
+ * @brief Set the Priority Grouping in NVIC Interrupt Controller
+ *
+ * @param PriorityGroup is priority grouping field
+ *
+ * Set the priority grouping field using the required unlock sequence.
+ * The parameter priority_grouping is assigned to the field
+ * SCB->AIRCR [10:8] PRIGROUP field. Only values from 0..7 are used.
+ * In case of a conflict between priority grouping and available
+ * priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set.
+ */
+static __INLINE void NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
+{
+ uint32_t reg_value;
+ uint32_t PriorityGroupTmp = (PriorityGroup & 0x07); /* only values 0..7 are used */
+
+ reg_value = SCB->AIRCR; /* read old register configuration */
+ reg_value &= ~(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk); /* clear bits to change */
+ reg_value = (reg_value |
+ (0x5FA << SCB_AIRCR_VECTKEY_Pos) |
+ (PriorityGroupTmp << 8)); /* Insert write key and priorty group */
+ SCB->AIRCR = reg_value;
+}
+
+/**
+ * @brief Get the Priority Grouping from NVIC Interrupt Controller
+ *
+ * @return priority grouping field
+ *
+ * Get the priority grouping from NVIC Interrupt Controller.
+ * priority grouping is SCB->AIRCR [10:8] PRIGROUP field.
+ */
+static __INLINE uint32_t NVIC_GetPriorityGrouping(void)
+{
+ return ((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos); /* read priority grouping field */
+}
+
+/**
+ * @brief Enable Interrupt in NVIC Interrupt Controller
+ *
+ * @param IRQn The positive number of the external interrupt to enable
+ *
+ * Enable a device specific interupt in the NVIC interrupt controller.
+ * The interrupt number cannot be a negative value.
+ */
+static __INLINE void NVIC_EnableIRQ(IRQn_Type IRQn)
+{
+ NVIC->ISER[((uint32_t)(IRQn) >> 5)] = (1 << ((uint32_t)(IRQn) & 0x1F)); /* enable interrupt */
+}
+
+/**
+ * @brief Disable the interrupt line for external interrupt specified
+ *
+ * @param IRQn The positive number of the external interrupt to disable
+ *
+ * Disable a device specific interupt in the NVIC interrupt controller.
+ * The interrupt number cannot be a negative value.
+ */
+static __INLINE void NVIC_DisableIRQ(IRQn_Type IRQn)
+{
+ NVIC->ICER[((uint32_t)(IRQn) >> 5)] = (1 << ((uint32_t)(IRQn) & 0x1F)); /* disable interrupt */
+}
+
+/**
+ * @brief Read the interrupt pending bit for a device specific interrupt source
+ *
+ * @param IRQn The number of the device specifc interrupt
+ * @return 1 = interrupt pending, 0 = interrupt not pending
+ *
+ * Read the pending register in NVIC and return 1 if its status is pending,
+ * otherwise it returns 0
+ */
+static __INLINE uint32_t NVIC_GetPendingIRQ(IRQn_Type IRQn)
+{
+ return((uint32_t) ((NVIC->ISPR[(uint32_t)(IRQn) >> 5] & (1 << ((uint32_t)(IRQn) & 0x1F)))?1:0)); /* Return 1 if pending else 0 */
+}
+
+/**
+ * @brief Set the pending bit for an external interrupt
+ *
+ * @param IRQn The number of the interrupt for set pending
+ *
+ * Set the pending bit for the specified interrupt.
+ * The interrupt number cannot be a negative value.
+ */
+static __INLINE void NVIC_SetPendingIRQ(IRQn_Type IRQn)
+{
+ NVIC->ISPR[((uint32_t)(IRQn) >> 5)] = (1 << ((uint32_t)(IRQn) & 0x1F)); /* set interrupt pending */
+}
+
+/**
+ * @brief Clear the pending bit for an external interrupt
+ *
+ * @param IRQn The number of the interrupt for clear pending
+ *
+ * Clear the pending bit for the specified interrupt.
+ * The interrupt number cannot be a negative value.
+ */
+static __INLINE void NVIC_ClearPendingIRQ(IRQn_Type IRQn)
+{
+ NVIC->ICPR[((uint32_t)(IRQn) >> 5)] = (1 << ((uint32_t)(IRQn) & 0x1F)); /* Clear pending interrupt */
+}
+
+/**
+ * @brief Read the active bit for an external interrupt
+ *
+ * @param IRQn The number of the interrupt for read active bit
+ * @return 1 = interrupt active, 0 = interrupt not active
+ *
+ * Read the active register in NVIC and returns 1 if its status is active,
+ * otherwise it returns 0.
+ */
+static __INLINE uint32_t NVIC_GetActive(IRQn_Type IRQn)
+{
+ return((uint32_t)((NVIC->IABR[(uint32_t)(IRQn) >> 5] & (1 << ((uint32_t)(IRQn) & 0x1F)))?1:0)); /* Return 1 if active else 0 */
+}
+
+/**
+ * @brief Set the priority for an interrupt
+ *
+ * @param IRQn The number of the interrupt for set priority
+ * @param priority The priority to set
+ *
+ * Set the priority for the specified interrupt. The interrupt
+ * number can be positive to specify an external (device specific)
+ * interrupt, or negative to specify an internal (core) interrupt.
+ *
+ * Note: The priority cannot be set for every core interrupt.
+ */
+static __INLINE void NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority)
+{
+ if(IRQn < 0) {
+ SCB->SHP[((uint32_t)(IRQn) & 0xF)-4] = ((priority << (8 - __NVIC_PRIO_BITS)) & 0xff); } /* set Priority for Cortex-M3 System Interrupts */
+ else {
+ NVIC->IP[(uint32_t)(IRQn)] = ((priority << (8 - __NVIC_PRIO_BITS)) & 0xff); } /* set Priority for device specific Interrupts */
+}
+
+/**
+ * @brief Read the priority for an interrupt
+ *
+ * @param IRQn The number of the interrupt for get priority
+ * @return The priority for the interrupt
+ *
+ * Read the priority for the specified interrupt. The interrupt
+ * number can be positive to specify an external (device specific)
+ * interrupt, or negative to specify an internal (core) interrupt.
+ *
+ * The returned priority value is automatically aligned to the implemented
+ * priority bits of the microcontroller.
+ *
+ * Note: The priority cannot be set for every core interrupt.
+ */
+static __INLINE uint32_t NVIC_GetPriority(IRQn_Type IRQn)
+{
+
+ if(IRQn < 0) {
+ return((uint32_t)(SCB->SHP[((uint32_t)(IRQn) & 0xF)-4] >> (8 - __NVIC_PRIO_BITS))); } /* get priority for Cortex-M3 system interrupts */
+ else {
+ return((uint32_t)(NVIC->IP[(uint32_t)(IRQn)] >> (8 - __NVIC_PRIO_BITS))); } /* get priority for device specific interrupts */
+}
+
+
+/**
+ * @brief Encode the priority for an interrupt
+ *
+ * @param PriorityGroup The used priority group
+ * @param PreemptPriority The preemptive priority value (starting from 0)
+ * @param SubPriority The sub priority value (starting from 0)
+ * @return The encoded priority for the interrupt
+ *
+ * Encode the priority for an interrupt with the given priority group,
+ * preemptive priority value and sub priority value.
+ * In case of a conflict between priority grouping and available
+ * priority bits (__NVIC_PRIO_BITS) the samllest possible priority group is set.
+ *
+ * The returned priority value can be used for NVIC_SetPriority(...) function
+ */
+static __INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority)
+{
+ uint32_t PriorityGroupTmp = (PriorityGroup & 0x07); /* only values 0..7 are used */
+ uint32_t PreemptPriorityBits;
+ uint32_t SubPriorityBits;
+
+ PreemptPriorityBits = ((7 - PriorityGroupTmp) > __NVIC_PRIO_BITS) ? __NVIC_PRIO_BITS : 7 - PriorityGroupTmp;
+ SubPriorityBits = ((PriorityGroupTmp + __NVIC_PRIO_BITS) < 7) ? 0 : PriorityGroupTmp - 7 + __NVIC_PRIO_BITS;
+
+ return (
+ ((PreemptPriority & ((1 << (PreemptPriorityBits)) - 1)) << SubPriorityBits) |
+ ((SubPriority & ((1 << (SubPriorityBits )) - 1)))
+ );
+}
+
+
+/**
+ * @brief Decode the priority of an interrupt
+ *
+ * @param Priority The priority for the interrupt
+ * @param PriorityGroup The used priority group
+ * @param pPreemptPriority The preemptive priority value (starting from 0)
+ * @param pSubPriority The sub priority value (starting from 0)
+ *
+ * Decode an interrupt priority value with the given priority group to
+ * preemptive priority value and sub priority value.
+ * In case of a conflict between priority grouping and available
+ * priority bits (__NVIC_PRIO_BITS) the samllest possible priority group is set.
+ *
+ * The priority value can be retrieved with NVIC_GetPriority(...) function
+ */
+static __INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* pPreemptPriority, uint32_t* pSubPriority)
+{
+ uint32_t PriorityGroupTmp = (PriorityGroup & 0x07); /* only values 0..7 are used */
+ uint32_t PreemptPriorityBits;
+ uint32_t SubPriorityBits;
+
+ PreemptPriorityBits = ((7 - PriorityGroupTmp) > __NVIC_PRIO_BITS) ? __NVIC_PRIO_BITS : 7 - PriorityGroupTmp;
+ SubPriorityBits = ((PriorityGroupTmp + __NVIC_PRIO_BITS) < 7) ? 0 : PriorityGroupTmp - 7 + __NVIC_PRIO_BITS;
+
+ *pPreemptPriority = (Priority >> SubPriorityBits) & ((1 << (PreemptPriorityBits)) - 1);
+ *pSubPriority = (Priority ) & ((1 << (SubPriorityBits )) - 1);
+}
+
+
+
+/* ################################## SysTick function ############################################ */
+
+#if (!defined (__Vendor_SysTickConfig)) || (__Vendor_SysTickConfig == 0)
+
+/**
+ * @brief Initialize and start the SysTick counter and its interrupt.
+ *
+ * @param ticks number of ticks between two interrupts
+ * @return 1 = failed, 0 = successful
+ *
+ * Initialise the system tick timer and its interrupt and start the
+ * system tick timer / counter in free running mode to generate
+ * periodical interrupts.
+ */
+static __INLINE uint32_t SysTick_Config(uint32_t ticks)
+{
+ if (ticks > SysTick_LOAD_RELOAD_Msk) return (1); /* Reload value impossible */
+
+ SysTick->LOAD = (ticks & SysTick_LOAD_RELOAD_Msk) - 1; /* set reload register */
+ NVIC_SetPriority (SysTick_IRQn, (1<<__NVIC_PRIO_BITS) - 1); /* set Priority for Cortex-M0 System Interrupts */
+ SysTick->VAL = 0; /* Load the SysTick Counter Value */
+ SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk |
+ SysTick_CTRL_TICKINT_Msk |
+ SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */
+ return (0); /* Function successful */
+}
+
+#endif
+
+
+
+
+/* ################################## Reset function ############################################ */
+
+/**
+ * @brief Initiate a system reset request.
+ *
+ * Initiate a system reset request to reset the MCU
+ */
+static __INLINE void NVIC_SystemReset(void)
+{
+ SCB->AIRCR = ((0x5FA << SCB_AIRCR_VECTKEY_Pos) |
+ (SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) |
+ SCB_AIRCR_SYSRESETREQ_Msk); /* Keep priority group unchanged */
+ __DSB(); /* Ensure completion of memory access */
+ while(1); /* wait until reset */
+}
+
+/*@}*/ /* end of group CMSIS_CM3_Core_FunctionInterface */
+
+
+
+/* ##################################### Debug In/Output function ########################################### */
+
+/** @addtogroup CMSIS_CM3_CoreDebugInterface CMSIS CM3 Core Debug Interface
+ Core Debug Interface containing:
+ - Core Debug Receive / Transmit Functions
+ - Core Debug Defines
+ - Core Debug Variables
+*/
+/*@{*/
+
+extern volatile int ITM_RxBuffer; /*!< variable to receive characters */
+#define ITM_RXBUFFER_EMPTY 0x5AA55AA5 /*!< value identifying ITM_RxBuffer is ready for next character */
+
+
+/**
+ * @brief Outputs a character via the ITM channel 0
+ *
+ * @param ch character to output
+ * @return character to output
+ *
+ * The function outputs a character via the ITM channel 0.
+ * The function returns when no debugger is connected that has booked the output.
+ * It is blocking when a debugger is connected, but the previous character send is not transmitted.
+ */
+static __INLINE uint32_t ITM_SendChar (uint32_t ch)
+{
+ if ((CoreDebug->DEMCR & CoreDebug_DEMCR_TRCENA_Msk) && /* Trace enabled */
+ (ITM->TCR & ITM_TCR_ITMENA_Msk) && /* ITM enabled */
+ (ITM->TER & (1ul << 0) ) ) /* ITM Port #0 enabled */
+ {
+ while (ITM->PORT[0].u32 == 0);
+ ITM->PORT[0].u8 = (uint8_t) ch;
+ }
+ return (ch);
+}
+
+
+/**
+ * @brief Inputs a character via variable ITM_RxBuffer
+ *
+ * @return received character, -1 = no character received
+ *
+ * The function inputs a character via variable ITM_RxBuffer.
+ * The function returns when no debugger is connected that has booked the output.
+ * It is blocking when a debugger is connected, but the previous character send is not transmitted.
+ */
+static __INLINE int ITM_ReceiveChar (void) {
+ int ch = -1; /* no character available */
+
+ if (ITM_RxBuffer != ITM_RXBUFFER_EMPTY) {
+ ch = ITM_RxBuffer;
+ ITM_RxBuffer = ITM_RXBUFFER_EMPTY; /* ready for next character */
+ }
+
+ return (ch);
+}
+
+
+/**
+ * @brief Check if a character via variable ITM_RxBuffer is available
+ *
+ * @return 1 = character available, 0 = no character available
+ *
+ * The function checks variable ITM_RxBuffer whether a character is available or not.
+ * The function returns '1' if a character is available and '0' if no character is available.
+ */
+static __INLINE int ITM_CheckChar (void) {
+
+ if (ITM_RxBuffer == ITM_RXBUFFER_EMPTY) {
+ return (0); /* no character available */
+ } else {
+ return (1); /* character available */
+ }
+}
+
+/*@}*/ /* end of group CMSIS_CM3_core_DebugInterface */
+
+
+#ifdef __cplusplus
+}
+#endif
+
+/*@}*/ /* end of group CMSIS_CM3_core_definitions */
+
+#endif /* __CM3_CORE_H__ */
+
+/*lint -restore */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/SAM3XA.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/SAM3XA.h
new file mode 100644
index 0000000..1790492
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/SAM3XA.h
@@ -0,0 +1,10504 @@
+/* ---------------------------------------------------------------------------- */
+/* Atmel Microcontroller Software Support */
+/* ---------------------------------------------------------------------------- */
+/* Copyright (c) 2011, Atmel Corporation */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following condition is met: */
+/* */
+/* - Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the disclaimer below. */
+/* */
+/* Atmel's name may not be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR */
+/* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE */
+/* DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, */
+/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */
+/* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */
+/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */
+/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, */
+/* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/* ---------------------------------------------------------------------------- */
+/* */
+/* File Name : SAM3XA.h */
+/* Object : SAM3XA definitions */
+/* Generated by : AT91 SW Application Group */
+/* Generated on : 2011-03-29 */
+
+#ifndef SAM3XA_H
+#define SAM3XA_H
+
+/** \addtogroup SAM3XA_definitions SAM3XA definitions
+ This file defines all structures and symbols for SAM3XA:
+ - registers and bitfields
+ - peripheral base address
+ - peripheral ID
+ - PIO definitions
+*/
+/*@{*/
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+#ifndef __ASSEMBLY__
+#include <stdint.h>
+#ifndef __cplusplus
+typedef volatile const uint32_t RoReg; /**< Read only 32-bit register (volatile const unsigned int) */
+#else
+typedef volatile uint32_t RoReg; /**< Read only 32-bit register (volatile const unsigned int) */
+#endif
+typedef volatile uint32_t WoReg; /**< Write only 32-bit register (volatile unsigned int) */
+typedef volatile uint32_t RwReg; /**< Read-Write 32-bit register (volatile unsigned int) */
+#define CAST(type, value) ((type*) (value))
+#define REG_ACCESS(type, address) (*(type*)(address)) /**< C code: Register value */
+#else
+#define CAST(type, value) (value)
+#define REG_ACCESS(type, address) (address) /**< Assembly code: Register address */
+#endif
+
+/* ************************************************************************** */
+/* CMSIS DEFINITIONS FOR SAM3XA */
+/* ************************************************************************** */
+/** \addtogroup SAM3XA_cmsis CMSIS Definitions */
+/*@{*/
+
+/**< Interrupt Number Definition */
+typedef enum IRQn
+{
+/****** Cortex-M3 Processor Exceptions Numbers ******************************/
+ NonMaskableInt_IRQn = -14, /**< 2 Non Maskable Interrupt */
+ MemoryManagement_IRQn = -12, /**< 4 Cortex-M3 Memory Management Interrupt */
+ BusFault_IRQn = -11, /**< 5 Cortex-M3 Bus Fault Interrupt */
+ UsageFault_IRQn = -10, /**< 6 Cortex-M3 Usage Fault Interrupt */
+ SVCall_IRQn = -5, /**< 11 Cortex-M3 SV Call Interrupt */
+ DebugMonitor_IRQn = -4, /**< 12 Cortex-M3 Debug Monitor Interrupt */
+ PendSV_IRQn = -2, /**< 14 Cortex-M3 Pend SV Interrupt */
+ SysTick_IRQn = -1, /**< 15 Cortex-M3 System Tick Interrupt */
+/****** SAM3XA specific Interrupt Numbers *********************************/
+
+ SUPC_IRQn = 0, /**< 0 SAM3XA Supply Controller (SUPC) */
+ RSTC_IRQn = 1, /**< 1 SAM3XA Reset Controller (RSTC) */
+ RTC_IRQn = 2, /**< 2 SAM3XA Real Time Clock (RTC) */
+ RTT_IRQn = 3, /**< 3 SAM3XA Real Time Timer (RTT) */
+ WDT_IRQn = 4, /**< 4 SAM3XA Watchdog Timer (WDT) */
+ PMC_IRQn = 5, /**< 5 SAM3XA Power Management Controller (PMC) */
+ EFC0_IRQn = 6, /**< 6 SAM3XA Enhanced Flash Controller 0 (EFC0) */
+ EFC1_IRQn = 7, /**< 7 SAM3XA Enhanced Flash Controller 1 (EFC1) */
+ UART_IRQn = 8, /**< 8 SAM3XA Universal Asynchronous Receiver Transceiver (UART) */
+ SMC_IRQn = 9, /**< 9 SAM3XA Static Memory Controller (SMC) */
+ SDRAMC_IRQn = 10, /**< 10 SAM3XA Synchronous Dynamic RAM Controller (SDRAMC) */
+ PIOA_IRQn = 11, /**< 11 SAM3XA Parallel I/O Controller A, (PIOA) */
+ PIOB_IRQn = 12, /**< 12 SAM3XA Parallel I/O Controller B (PIOB) */
+ PIOC_IRQn = 13, /**< 13 SAM3XA Parallel I/O Controller C (PIOC) */
+ PIOD_IRQn = 14, /**< 14 SAM3XA Parallel I/O Controller D (PIOD) */
+ PIOE_IRQn = 15, /**< 15 SAM3XA Parallel I/O Controller E (PIOE) */
+ PIOF_IRQn = 16, /**< 16 SAM3XA Parallel I/O Controller F (PIOF) */
+ USART0_IRQn = 17, /**< 17 SAM3XA USART 0 (USART0) */
+ USART1_IRQn = 18, /**< 18 SAM3XA USART 1 (USART1) */
+ USART2_IRQn = 19, /**< 19 SAM3XA USART 2 (USART2) */
+ USART3_IRQn = 20, /**< 20 SAM3XA USART 3 (USART3) */
+ HSMCI_IRQn = 21, /**< 21 SAM3XA Multimedia Card Interface (HSMCI) */
+ TWI0_IRQn = 22, /**< 22 SAM3XA Two-Wire Interface 0 (TWI0) */
+ TWI1_IRQn = 23, /**< 23 SAM3XA Two-Wire Interface 1 (TWI1) */
+ SPI0_IRQn = 24, /**< 24 SAM3XA Serial Peripheral Interface (SPI0) */
+ SPI1_IRQn = 25, /**< 25 SAM3XA Serial Peripheral Interface (SPI1) */
+ SSC_IRQn = 26, /**< 26 SAM3XA Synchronous Serial Controller (SSC) */
+ TC0_IRQn = 27, /**< 27 SAM3XA Timer Counter 0 (TC0) */
+ TC1_IRQn = 28, /**< 28 SAM3XA Timer Counter 1 (TC1) */
+ TC2_IRQn = 29, /**< 29 SAM3XA Timer Counter 2 (TC2) */
+ TC3_IRQn = 30, /**< 30 SAM3XA Timer Counter 3 (TC3) */
+ TC4_IRQn = 31, /**< 31 SAM3XA Timer Counter 4 (TC4) */
+ TC5_IRQn = 32, /**< 32 SAM3XA Timer Counter 5 (TC5) */
+ TC6_IRQn = 33, /**< 33 SAM3XA Timer Counter 6 (TC6) */
+ TC7_IRQn = 34, /**< 34 SAM3XA Timer Counter 7 (TC7) */
+ TC8_IRQn = 35, /**< 35 SAM3XA Timer Counter 8 (TC8) */
+ PWM_IRQn = 36, /**< 36 SAM3XA Pulse Width Modulation Controller (PWM) */
+ ADC_IRQn = 37, /**< 37 SAM3XA ADC Controller (ADC) */
+ DACC_IRQn = 38, /**< 38 SAM3XA DAC Controller (DACC) */
+ DMAC_IRQn = 39, /**< 39 SAM3XA DMA Controller (DMAC) */
+ UOTGHS_IRQn = 40, /**< 40 SAM3XA USB OTG High Speed (UOTGHS) */
+ TRNG_IRQn = 41, /**< 41 SAM3XA True Random Number Generator (TRNG) */
+ EMAC_IRQn = 42, /**< 42 SAM3XA Ethernet MAC (EMAC) */
+ CAN0_IRQn = 43, /**< 43 SAM3XA CAN Controller 0 (CAN0) */
+ CAN1_IRQn = 44 /**< 44 SAM3XA CAN Controller 1 (CAN1) */
+} IRQn_Type;
+
+/**
+ * \brief Configuration of the Cortex-M3 Processor and Core Peripherals
+ */
+
+#define __MPU_PRESENT 1 /**< SAM3XA does provide a MPU */
+#define __NVIC_PRIO_BITS 4 /**< SAM3XA uses 4 Bits for the Priority Levels */
+#define __Vendor_SysTickConfig 0 /**< Set to 1 if different SysTick Config is used */
+
+/*
+ * \brief CMSIS includes
+ */
+
+#include "cmsis/core_cm3.h"
+
+/*@}*/
+
+/* ************************************************************************** */
+/** SOFTWARE PERIPHERAL API DEFINITION FOR SAM3XA */
+/* ************************************************************************** */
+/** \addtogroup SAM3XA_api Peripheral Software API */
+/*@{*/
+/* ============================================================================= */
+/** SOFTWARE API DEFINITION FOR Analog-to-digital Converter */
+/* ============================================================================= */
+/** \addtogroup SAM3XA_ADC Analog-to-digital Converter */
+/*@{*/
+
+#ifndef __ASSEMBLY__
+/** \brief Adc hardware registers */
+typedef struct {
+ WoReg ADC_CR; /**< \brief (Adc Offset: 0x00) Control Register */
+ RwReg ADC_MR; /**< \brief (Adc Offset: 0x04) Mode Register */
+ RwReg ADC_SEQR1; /**< \brief (Adc Offset: 0x08) Channel Sequence Register 1 */
+ RwReg ADC_SEQR2; /**< \brief (Adc Offset: 0x0C) Channel Sequence Register 2 */
+ WoReg ADC_CHER; /**< \brief (Adc Offset: 0x10) Channel Enable Register */
+ WoReg ADC_CHDR; /**< \brief (Adc Offset: 0x14) Channel Disable Register */
+ RoReg ADC_CHSR; /**< \brief (Adc Offset: 0x18) Channel Status Register */
+ RoReg Reserved1[1];
+ RoReg ADC_LCDR; /**< \brief (Adc Offset: 0x20) Last Converted Data Register */
+ WoReg ADC_IER; /**< \brief (Adc Offset: 0x24) Interrupt Enable Register */
+ WoReg ADC_IDR; /**< \brief (Adc Offset: 0x28) Interrupt Disable Register */
+ RoReg ADC_IMR; /**< \brief (Adc Offset: 0x2C) Interrupt Mask Register */
+ RoReg ADC_ISR; /**< \brief (Adc Offset: 0x30) Interrupt Status Register */
+ RoReg Reserved2[2];
+ RoReg ADC_OVER; /**< \brief (Adc Offset: 0x3C) Overrun Status Register */
+ RwReg ADC_EMR; /**< \brief (Adc Offset: 0x40) Extended Mode Register */
+ RwReg ADC_CWR; /**< \brief (Adc Offset: 0x44) Compare Window Register */
+ RwReg ADC_CGR; /**< \brief (Adc Offset: 0x48) Channel Gain Register */
+ RwReg ADC_COR; /**< \brief (Adc Offset: 0x4C) Channel Offset Register */
+ RoReg ADC_CDR[16]; /**< \brief (Adc Offset: 0x50) Channel Data Register */
+ RoReg Reserved3[1];
+ RwReg ADC_ACR; /**< \brief (Adc Offset: 0x94) Analog Control Register */
+ RoReg Reserved4[19];
+ RwReg ADC_WPMR; /**< \brief (Adc Offset: 0xE4) Write Protect Mode Register */
+ RoReg ADC_WPSR; /**< \brief (Adc Offset: 0xE8) Write Protect Status Register */
+ RoReg Reserved5[5];
+ RwReg ADC_RPR; /**< \brief (Adc Offset: 0x100) Receive Pointer Register */
+ RwReg ADC_RCR; /**< \brief (Adc Offset: 0x104) Receive Counter Register */
+ RwReg ADC_TPR; /**< \brief (Adc Offset: 0x108) Transmit Pointer Register */
+ RwReg ADC_TCR; /**< \brief (Adc Offset: 0x10C) Transmit Counter Register */
+ RwReg ADC_RNPR; /**< \brief (Adc Offset: 0x110) Receive Next Pointer Register */
+ RwReg ADC_RNCR; /**< \brief (Adc Offset: 0x114) Receive Next Counter Register */
+ RwReg ADC_TNPR; /**< \brief (Adc Offset: 0x118) Transmit Next Pointer Register */
+ RwReg ADC_TNCR; /**< \brief (Adc Offset: 0x11C) Transmit Next Counter Register */
+ WoReg ADC_PTCR; /**< \brief (Adc Offset: 0x120) Transfer Control Register */
+ RoReg ADC_PTSR; /**< \brief (Adc Offset: 0x124) Transfer Status Register */
+} Adc;
+#endif /* __ASSEMBLY__ */
+/* -------- ADC_CR : (ADC Offset: 0x00) Control Register -------- */
+#define ADC_CR_SWRST (0x1u << 0) /**< \brief (ADC_CR) Software Reset */
+#define ADC_CR_START (0x1u << 1) /**< \brief (ADC_CR) Start Conversion */
+/* -------- ADC_MR : (ADC Offset: 0x04) Mode Register -------- */
+#define ADC_MR_TRGEN (0x1u << 0) /**< \brief (ADC_MR) Trigger Enable */
+#define ADC_MR_TRGEN_DIS (0x0u << 0) /**< \brief (ADC_MR) Hardware triggers are disabled. Starting a conversion is only possible by software. */
+#define ADC_MR_TRGEN_EN (0x1u << 0) /**< \brief (ADC_MR) Hardware trigger selected by TRGSEL field is enabled. */
+#define ADC_MR_TRGSEL_Pos 1
+#define ADC_MR_TRGSEL_Msk (0x7u << ADC_MR_TRGSEL_Pos) /**< \brief (ADC_MR) Trigger Selection */
+#define ADC_MR_TRGSEL_ADC_TRIG0 (0x0u << 1) /**< \brief (ADC_MR) External : ADCTRG */
+#define ADC_MR_TRGSEL_ADC_TRIG1 (0x1u << 1) /**< \brief (ADC_MR) TIOA Output of the Timer Counter Channel 0 */
+#define ADC_MR_TRGSEL_ADC_TRIG2 (0x2u << 1) /**< \brief (ADC_MR) TIOA Output of the Timer Counter Channel 1 */
+#define ADC_MR_TRGSEL_ADC_TRIG3 (0x3u << 1) /**< \brief (ADC_MR) TIOA Output of the Timer Counter Channel 2 */
+#define ADC_MR_TRGSEL_ADC_TRIG4 (0x4u << 1) /**< \brief (ADC_MR) PWM Event Line 0 */
+#define ADC_MR_TRGSEL_ADC_TRIG5 (0x5u << 1) /**< \brief (ADC_MR) PWM Event Line 0 */
+#define ADC_MR_LOWRES (0x1u << 4) /**< \brief (ADC_MR) Resolution */
+#define ADC_MR_LOWRES_BITS_12 (0x0u << 4) /**< \brief (ADC_MR) 12-bit resolution */
+#define ADC_MR_LOWRES_BITS_10 (0x1u << 4) /**< \brief (ADC_MR) 10-bit resolution */
+#define ADC_MR_SLEEP (0x1u << 5) /**< \brief (ADC_MR) Sleep Mode */
+#define ADC_MR_SLEEP_NORMAL (0x0u << 5) /**< \brief (ADC_MR) Normal Mode: The ADC Core and reference voltage circuitry are kept ON between conversions */
+#define ADC_MR_SLEEP_SLEEP (0x1u << 5) /**< \brief (ADC_MR) Sleep Mode: The ADC Core and reference voltage circuitry are OFF between conversions */
+#define ADC_MR_FWUP (0x1u << 6) /**< \brief (ADC_MR) Fast Wake Up */
+#define ADC_MR_FWUP_OFF (0x0u << 6) /**< \brief (ADC_MR) Normal Sleep Mode: The sleep mode is defined by the SLEEP bit */
+#define ADC_MR_FWUP_ON (0x1u << 6) /**< \brief (ADC_MR) Fast Wake Up Sleep Mode: The Voltage reference is ON between conversions and ADC Core is OFF */
+#define ADC_MR_FREERUN (0x1u << 7) /**< \brief (ADC_MR) Free Run Mode */
+#define ADC_MR_FREERUN_OFF (0x0u << 7) /**< \brief (ADC_MR) Normal Mode */
+#define ADC_MR_FREERUN_ON (0x1u << 7) /**< \brief (ADC_MR) Free Run Mode: Never wait for any trigger. */
+#define ADC_MR_PRESCAL_Pos 8
+#define ADC_MR_PRESCAL_Msk (0xffu << ADC_MR_PRESCAL_Pos) /**< \brief (ADC_MR) Prescaler Rate Selection */
+#define ADC_MR_PRESCAL(value) ((ADC_MR_PRESCAL_Msk & ((value) << ADC_MR_PRESCAL_Pos)))
+#define ADC_MR_STARTUP_Pos 16
+#define ADC_MR_STARTUP_Msk (0xfu << ADC_MR_STARTUP_Pos) /**< \brief (ADC_MR) Start Up Time */
+#define ADC_MR_STARTUP_SUT0 (0x0u << 16) /**< \brief (ADC_MR) 0 periods of ADCClock */
+#define ADC_MR_STARTUP_SUT8 (0x1u << 16) /**< \brief (ADC_MR) 8 periods of ADCClock */
+#define ADC_MR_STARTUP_SUT16 (0x2u << 16) /**< \brief (ADC_MR) 16 periods of ADCClock */
+#define ADC_MR_STARTUP_SUT24 (0x3u << 16) /**< \brief (ADC_MR) 24 periods of ADCClock */
+#define ADC_MR_STARTUP_SUT64 (0x4u << 16) /**< \brief (ADC_MR) 64 periods of ADCClock */
+#define ADC_MR_STARTUP_SUT80 (0x5u << 16) /**< \brief (ADC_MR) 80 periods of ADCClock */
+#define ADC_MR_STARTUP_SUT96 (0x6u << 16) /**< \brief (ADC_MR) 96 periods of ADCClock */
+#define ADC_MR_STARTUP_SUT112 (0x7u << 16) /**< \brief (ADC_MR) 112 periods of ADCClock */
+#define ADC_MR_STARTUP_SUT512 (0x8u << 16) /**< \brief (ADC_MR) 512 periods of ADCClock */
+#define ADC_MR_STARTUP_SUT576 (0x9u << 16) /**< \brief (ADC_MR) 576 periods of ADCClock */
+#define ADC_MR_STARTUP_SUT640 (0xAu << 16) /**< \brief (ADC_MR) 640 periods of ADCClock */
+#define ADC_MR_STARTUP_SUT704 (0xBu << 16) /**< \brief (ADC_MR) 704 periods of ADCClock */
+#define ADC_MR_STARTUP_SUT768 (0xCu << 16) /**< \brief (ADC_MR) 768 periods of ADCClock */
+#define ADC_MR_STARTUP_SUT832 (0xDu << 16) /**< \brief (ADC_MR) 832 periods of ADCClock */
+#define ADC_MR_STARTUP_SUT896 (0xEu << 16) /**< \brief (ADC_MR) 896 periods of ADCClock */
+#define ADC_MR_STARTUP_SUT960 (0xFu << 16) /**< \brief (ADC_MR) 960 periods of ADCClock */
+#define ADC_MR_SETTLING_Pos 20
+#define ADC_MR_SETTLING_Msk (0x3u << ADC_MR_SETTLING_Pos) /**< \brief (ADC_MR) Analog Settling Time */
+#define ADC_MR_SETTLING_AST3 (0x0u << 20) /**< \brief (ADC_MR) 3 periods of ADCClock */
+#define ADC_MR_SETTLING_AST5 (0x1u << 20) /**< \brief (ADC_MR) 5 periods of ADCClock */
+#define ADC_MR_SETTLING_AST9 (0x2u << 20) /**< \brief (ADC_MR) 9 periods of ADCClock */
+#define ADC_MR_SETTLING_AST17 (0x3u << 20) /**< \brief (ADC_MR) 17 periods of ADCClock */
+#define ADC_MR_ANACH (0x1u << 23) /**< \brief (ADC_MR) Analog Change */
+#define ADC_MR_ANACH_NONE (0x0u << 23) /**< \brief (ADC_MR) No analog change on channel switching: DIFF0, GAIN0 and OFF0 are used for all channels */
+#define ADC_MR_ANACH_ALLOWED (0x1u << 23) /**< \brief (ADC_MR) Allows different analog settings for each channel. See ADC_CGR and ADC_COR Registers */
+#define ADC_MR_TRACKTIM_Pos 24
+#define ADC_MR_TRACKTIM_Msk (0xfu << ADC_MR_TRACKTIM_Pos) /**< \brief (ADC_MR) Tracking Time */
+#define ADC_MR_TRACKTIM(value) ((ADC_MR_TRACKTIM_Msk & ((value) << ADC_MR_TRACKTIM_Pos)))
+#define ADC_MR_TRANSFER_Pos 28
+#define ADC_MR_TRANSFER_Msk (0x3u << ADC_MR_TRANSFER_Pos) /**< \brief (ADC_MR) Transfer Period */
+#define ADC_MR_TRANSFER(value) ((ADC_MR_TRANSFER_Msk & ((value) << ADC_MR_TRANSFER_Pos)))
+#define ADC_MR_USEQ (0x1u << 31) /**< \brief (ADC_MR) Use Sequence Enable */
+#define ADC_MR_USEQ_NUM_ORDER (0x0u << 31) /**< \brief (ADC_MR) Normal Mode: The controller converts channels in a simple numeric order. */
+#define ADC_MR_USEQ_REG_ORDER (0x1u << 31) /**< \brief (ADC_MR) User Sequence Mode: The sequence respects what is defined in ADC_SEQR1 and ADC_SEQR2 registers. */
+/* -------- ADC_SEQR1 : (ADC Offset: 0x08) Channel Sequence Register 1 -------- */
+#define ADC_SEQR1_USCH1_Pos 0
+#define ADC_SEQR1_USCH1_Msk (0xfu << ADC_SEQR1_USCH1_Pos) /**< \brief (ADC_SEQR1) User Sequence Number 1 */
+#define ADC_SEQR1_USCH1(value) ((ADC_SEQR1_USCH1_Msk & ((value) << ADC_SEQR1_USCH1_Pos)))
+#define ADC_SEQR1_USCH2_Pos 4
+#define ADC_SEQR1_USCH2_Msk (0xfu << ADC_SEQR1_USCH2_Pos) /**< \brief (ADC_SEQR1) User Sequence Number 2 */
+#define ADC_SEQR1_USCH2(value) ((ADC_SEQR1_USCH2_Msk & ((value) << ADC_SEQR1_USCH2_Pos)))
+#define ADC_SEQR1_USCH3_Pos 8
+#define ADC_SEQR1_USCH3_Msk (0xfu << ADC_SEQR1_USCH3_Pos) /**< \brief (ADC_SEQR1) User Sequence Number 3 */
+#define ADC_SEQR1_USCH3(value) ((ADC_SEQR1_USCH3_Msk & ((value) << ADC_SEQR1_USCH3_Pos)))
+#define ADC_SEQR1_USCH4_Pos 12
+#define ADC_SEQR1_USCH4_Msk (0xfu << ADC_SEQR1_USCH4_Pos) /**< \brief (ADC_SEQR1) User Sequence Number 4 */
+#define ADC_SEQR1_USCH4(value) ((ADC_SEQR1_USCH4_Msk & ((value) << ADC_SEQR1_USCH4_Pos)))
+#define ADC_SEQR1_USCH5_Pos 16
+#define ADC_SEQR1_USCH5_Msk (0xfu << ADC_SEQR1_USCH5_Pos) /**< \brief (ADC_SEQR1) User Sequence Number 5 */
+#define ADC_SEQR1_USCH5(value) ((ADC_SEQR1_USCH5_Msk & ((value) << ADC_SEQR1_USCH5_Pos)))
+#define ADC_SEQR1_USCH6_Pos 20
+#define ADC_SEQR1_USCH6_Msk (0xfu << ADC_SEQR1_USCH6_Pos) /**< \brief (ADC_SEQR1) User Sequence Number 6 */
+#define ADC_SEQR1_USCH6(value) ((ADC_SEQR1_USCH6_Msk & ((value) << ADC_SEQR1_USCH6_Pos)))
+#define ADC_SEQR1_USCH7_Pos 24
+#define ADC_SEQR1_USCH7_Msk (0xfu << ADC_SEQR1_USCH7_Pos) /**< \brief (ADC_SEQR1) User Sequence Number 7 */
+#define ADC_SEQR1_USCH7(value) ((ADC_SEQR1_USCH7_Msk & ((value) << ADC_SEQR1_USCH7_Pos)))
+#define ADC_SEQR1_USCH8_Pos 28
+#define ADC_SEQR1_USCH8_Msk (0xfu << ADC_SEQR1_USCH8_Pos) /**< \brief (ADC_SEQR1) User Sequence Number 8 */
+#define ADC_SEQR1_USCH8(value) ((ADC_SEQR1_USCH8_Msk & ((value) << ADC_SEQR1_USCH8_Pos)))
+/* -------- ADC_SEQR2 : (ADC Offset: 0x0C) Channel Sequence Register 2 -------- */
+#define ADC_SEQR2_USCH9_Pos 0
+#define ADC_SEQR2_USCH9_Msk (0xfu << ADC_SEQR2_USCH9_Pos) /**< \brief (ADC_SEQR2) User Sequence Number 9 */
+#define ADC_SEQR2_USCH9(value) ((ADC_SEQR2_USCH9_Msk & ((value) << ADC_SEQR2_USCH9_Pos)))
+#define ADC_SEQR2_USCH10_Pos 4
+#define ADC_SEQR2_USCH10_Msk (0xfu << ADC_SEQR2_USCH10_Pos) /**< \brief (ADC_SEQR2) User Sequence Number 10 */
+#define ADC_SEQR2_USCH10(value) ((ADC_SEQR2_USCH10_Msk & ((value) << ADC_SEQR2_USCH10_Pos)))
+#define ADC_SEQR2_USCH11_Pos 8
+#define ADC_SEQR2_USCH11_Msk (0xfu << ADC_SEQR2_USCH11_Pos) /**< \brief (ADC_SEQR2) User Sequence Number 11 */
+#define ADC_SEQR2_USCH11(value) ((ADC_SEQR2_USCH11_Msk & ((value) << ADC_SEQR2_USCH11_Pos)))
+#define ADC_SEQR2_USCH12_Pos 12
+#define ADC_SEQR2_USCH12_Msk (0xfu << ADC_SEQR2_USCH12_Pos) /**< \brief (ADC_SEQR2) User Sequence Number 12 */
+#define ADC_SEQR2_USCH12(value) ((ADC_SEQR2_USCH12_Msk & ((value) << ADC_SEQR2_USCH12_Pos)))
+#define ADC_SEQR2_USCH13_Pos 16
+#define ADC_SEQR2_USCH13_Msk (0xfu << ADC_SEQR2_USCH13_Pos) /**< \brief (ADC_SEQR2) User Sequence Number 13 */
+#define ADC_SEQR2_USCH13(value) ((ADC_SEQR2_USCH13_Msk & ((value) << ADC_SEQR2_USCH13_Pos)))
+#define ADC_SEQR2_USCH14_Pos 20
+#define ADC_SEQR2_USCH14_Msk (0xfu << ADC_SEQR2_USCH14_Pos) /**< \brief (ADC_SEQR2) User Sequence Number 14 */
+#define ADC_SEQR2_USCH14(value) ((ADC_SEQR2_USCH14_Msk & ((value) << ADC_SEQR2_USCH14_Pos)))
+#define ADC_SEQR2_USCH15_Pos 24
+#define ADC_SEQR2_USCH15_Msk (0xfu << ADC_SEQR2_USCH15_Pos) /**< \brief (ADC_SEQR2) User Sequence Number 15 */
+#define ADC_SEQR2_USCH15(value) ((ADC_SEQR2_USCH15_Msk & ((value) << ADC_SEQR2_USCH15_Pos)))
+#define ADC_SEQR2_USCH16_Pos 28
+#define ADC_SEQR2_USCH16_Msk (0xfu << ADC_SEQR2_USCH16_Pos) /**< \brief (ADC_SEQR2) User Sequence Number 16 */
+#define ADC_SEQR2_USCH16(value) ((ADC_SEQR2_USCH16_Msk & ((value) << ADC_SEQR2_USCH16_Pos)))
+/* -------- ADC_CHER : (ADC Offset: 0x10) Channel Enable Register -------- */
+#define ADC_CHER_CH0 (0x1u << 0) /**< \brief (ADC_CHER) Channel 0 Enable */
+#define ADC_CHER_CH1 (0x1u << 1) /**< \brief (ADC_CHER) Channel 1 Enable */
+#define ADC_CHER_CH2 (0x1u << 2) /**< \brief (ADC_CHER) Channel 2 Enable */
+#define ADC_CHER_CH3 (0x1u << 3) /**< \brief (ADC_CHER) Channel 3 Enable */
+#define ADC_CHER_CH4 (0x1u << 4) /**< \brief (ADC_CHER) Channel 4 Enable */
+#define ADC_CHER_CH5 (0x1u << 5) /**< \brief (ADC_CHER) Channel 5 Enable */
+#define ADC_CHER_CH6 (0x1u << 6) /**< \brief (ADC_CHER) Channel 6 Enable */
+#define ADC_CHER_CH7 (0x1u << 7) /**< \brief (ADC_CHER) Channel 7 Enable */
+#define ADC_CHER_CH8 (0x1u << 8) /**< \brief (ADC_CHER) Channel 8 Enable */
+#define ADC_CHER_CH9 (0x1u << 9) /**< \brief (ADC_CHER) Channel 9 Enable */
+#define ADC_CHER_CH10 (0x1u << 10) /**< \brief (ADC_CHER) Channel 10 Enable */
+#define ADC_CHER_CH11 (0x1u << 11) /**< \brief (ADC_CHER) Channel 11 Enable */
+#define ADC_CHER_CH12 (0x1u << 12) /**< \brief (ADC_CHER) Channel 12 Enable */
+#define ADC_CHER_CH13 (0x1u << 13) /**< \brief (ADC_CHER) Channel 13 Enable */
+#define ADC_CHER_CH14 (0x1u << 14) /**< \brief (ADC_CHER) Channel 14 Enable */
+#define ADC_CHER_CH15 (0x1u << 15) /**< \brief (ADC_CHER) Channel 15 Enable */
+/* -------- ADC_CHDR : (ADC Offset: 0x14) Channel Disable Register -------- */
+#define ADC_CHDR_CH0 (0x1u << 0) /**< \brief (ADC_CHDR) Channel 0 Disable */
+#define ADC_CHDR_CH1 (0x1u << 1) /**< \brief (ADC_CHDR) Channel 1 Disable */
+#define ADC_CHDR_CH2 (0x1u << 2) /**< \brief (ADC_CHDR) Channel 2 Disable */
+#define ADC_CHDR_CH3 (0x1u << 3) /**< \brief (ADC_CHDR) Channel 3 Disable */
+#define ADC_CHDR_CH4 (0x1u << 4) /**< \brief (ADC_CHDR) Channel 4 Disable */
+#define ADC_CHDR_CH5 (0x1u << 5) /**< \brief (ADC_CHDR) Channel 5 Disable */
+#define ADC_CHDR_CH6 (0x1u << 6) /**< \brief (ADC_CHDR) Channel 6 Disable */
+#define ADC_CHDR_CH7 (0x1u << 7) /**< \brief (ADC_CHDR) Channel 7 Disable */
+#define ADC_CHDR_CH8 (0x1u << 8) /**< \brief (ADC_CHDR) Channel 8 Disable */
+#define ADC_CHDR_CH9 (0x1u << 9) /**< \brief (ADC_CHDR) Channel 9 Disable */
+#define ADC_CHDR_CH10 (0x1u << 10) /**< \brief (ADC_CHDR) Channel 10 Disable */
+#define ADC_CHDR_CH11 (0x1u << 11) /**< \brief (ADC_CHDR) Channel 11 Disable */
+#define ADC_CHDR_CH12 (0x1u << 12) /**< \brief (ADC_CHDR) Channel 12 Disable */
+#define ADC_CHDR_CH13 (0x1u << 13) /**< \brief (ADC_CHDR) Channel 13 Disable */
+#define ADC_CHDR_CH14 (0x1u << 14) /**< \brief (ADC_CHDR) Channel 14 Disable */
+#define ADC_CHDR_CH15 (0x1u << 15) /**< \brief (ADC_CHDR) Channel 15 Disable */
+/* -------- ADC_CHSR : (ADC Offset: 0x18) Channel Status Register -------- */
+#define ADC_CHSR_CH0 (0x1u << 0) /**< \brief (ADC_CHSR) Channel 0 Status */
+#define ADC_CHSR_CH1 (0x1u << 1) /**< \brief (ADC_CHSR) Channel 1 Status */
+#define ADC_CHSR_CH2 (0x1u << 2) /**< \brief (ADC_CHSR) Channel 2 Status */
+#define ADC_CHSR_CH3 (0x1u << 3) /**< \brief (ADC_CHSR) Channel 3 Status */
+#define ADC_CHSR_CH4 (0x1u << 4) /**< \brief (ADC_CHSR) Channel 4 Status */
+#define ADC_CHSR_CH5 (0x1u << 5) /**< \brief (ADC_CHSR) Channel 5 Status */
+#define ADC_CHSR_CH6 (0x1u << 6) /**< \brief (ADC_CHSR) Channel 6 Status */
+#define ADC_CHSR_CH7 (0x1u << 7) /**< \brief (ADC_CHSR) Channel 7 Status */
+#define ADC_CHSR_CH8 (0x1u << 8) /**< \brief (ADC_CHSR) Channel 8 Status */
+#define ADC_CHSR_CH9 (0x1u << 9) /**< \brief (ADC_CHSR) Channel 9 Status */
+#define ADC_CHSR_CH10 (0x1u << 10) /**< \brief (ADC_CHSR) Channel 10 Status */
+#define ADC_CHSR_CH11 (0x1u << 11) /**< \brief (ADC_CHSR) Channel 11 Status */
+#define ADC_CHSR_CH12 (0x1u << 12) /**< \brief (ADC_CHSR) Channel 12 Status */
+#define ADC_CHSR_CH13 (0x1u << 13) /**< \brief (ADC_CHSR) Channel 13 Status */
+#define ADC_CHSR_CH14 (0x1u << 14) /**< \brief (ADC_CHSR) Channel 14 Status */
+#define ADC_CHSR_CH15 (0x1u << 15) /**< \brief (ADC_CHSR) Channel 15 Status */
+/* -------- ADC_LCDR : (ADC Offset: 0x20) Last Converted Data Register -------- */
+#define ADC_LCDR_LDATA_Pos 0
+#define ADC_LCDR_LDATA_Msk (0xfffu << ADC_LCDR_LDATA_Pos) /**< \brief (ADC_LCDR) Last Data Converted */
+#define ADC_LCDR_CHNB_Pos 12
+#define ADC_LCDR_CHNB_Msk (0xfu << ADC_LCDR_CHNB_Pos) /**< \brief (ADC_LCDR) Channel Number */
+/* -------- ADC_IER : (ADC Offset: 0x24) Interrupt Enable Register -------- */
+#define ADC_IER_EOC0 (0x1u << 0) /**< \brief (ADC_IER) End of Conversion Interrupt Enable 0 */
+#define ADC_IER_EOC1 (0x1u << 1) /**< \brief (ADC_IER) End of Conversion Interrupt Enable 1 */
+#define ADC_IER_EOC2 (0x1u << 2) /**< \brief (ADC_IER) End of Conversion Interrupt Enable 2 */
+#define ADC_IER_EOC3 (0x1u << 3) /**< \brief (ADC_IER) End of Conversion Interrupt Enable 3 */
+#define ADC_IER_EOC4 (0x1u << 4) /**< \brief (ADC_IER) End of Conversion Interrupt Enable 4 */
+#define ADC_IER_EOC5 (0x1u << 5) /**< \brief (ADC_IER) End of Conversion Interrupt Enable 5 */
+#define ADC_IER_EOC6 (0x1u << 6) /**< \brief (ADC_IER) End of Conversion Interrupt Enable 6 */
+#define ADC_IER_EOC7 (0x1u << 7) /**< \brief (ADC_IER) End of Conversion Interrupt Enable 7 */
+#define ADC_IER_EOC8 (0x1u << 8) /**< \brief (ADC_IER) End of Conversion Interrupt Enable 8 */
+#define ADC_IER_EOC9 (0x1u << 9) /**< \brief (ADC_IER) End of Conversion Interrupt Enable 9 */
+#define ADC_IER_EOC10 (0x1u << 10) /**< \brief (ADC_IER) End of Conversion Interrupt Enable 10 */
+#define ADC_IER_EOC11 (0x1u << 11) /**< \brief (ADC_IER) End of Conversion Interrupt Enable 11 */
+#define ADC_IER_EOC12 (0x1u << 12) /**< \brief (ADC_IER) End of Conversion Interrupt Enable 12 */
+#define ADC_IER_EOC13 (0x1u << 13) /**< \brief (ADC_IER) End of Conversion Interrupt Enable 13 */
+#define ADC_IER_EOC14 (0x1u << 14) /**< \brief (ADC_IER) End of Conversion Interrupt Enable 14 */
+#define ADC_IER_EOC15 (0x1u << 15) /**< \brief (ADC_IER) End of Conversion Interrupt Enable 15 */
+#define ADC_IER_DRDY (0x1u << 24) /**< \brief (ADC_IER) Data Ready Interrupt Enable */
+#define ADC_IER_GOVRE (0x1u << 25) /**< \brief (ADC_IER) General Overrun Error Interrupt Enable */
+#define ADC_IER_COMPE (0x1u << 26) /**< \brief (ADC_IER) Comparison Event Interrupt Enable */
+#define ADC_IER_ENDRX (0x1u << 27) /**< \brief (ADC_IER) End of Receive Buffer Interrupt Enable */
+#define ADC_IER_RXBUFF (0x1u << 28) /**< \brief (ADC_IER) Receive Buffer Full Interrupt Enable */
+/* -------- ADC_IDR : (ADC Offset: 0x28) Interrupt Disable Register -------- */
+#define ADC_IDR_EOC0 (0x1u << 0) /**< \brief (ADC_IDR) End of Conversion Interrupt Disable 0 */
+#define ADC_IDR_EOC1 (0x1u << 1) /**< \brief (ADC_IDR) End of Conversion Interrupt Disable 1 */
+#define ADC_IDR_EOC2 (0x1u << 2) /**< \brief (ADC_IDR) End of Conversion Interrupt Disable 2 */
+#define ADC_IDR_EOC3 (0x1u << 3) /**< \brief (ADC_IDR) End of Conversion Interrupt Disable 3 */
+#define ADC_IDR_EOC4 (0x1u << 4) /**< \brief (ADC_IDR) End of Conversion Interrupt Disable 4 */
+#define ADC_IDR_EOC5 (0x1u << 5) /**< \brief (ADC_IDR) End of Conversion Interrupt Disable 5 */
+#define ADC_IDR_EOC6 (0x1u << 6) /**< \brief (ADC_IDR) End of Conversion Interrupt Disable 6 */
+#define ADC_IDR_EOC7 (0x1u << 7) /**< \brief (ADC_IDR) End of Conversion Interrupt Disable 7 */
+#define ADC_IDR_EOC8 (0x1u << 8) /**< \brief (ADC_IDR) End of Conversion Interrupt Disable 8 */
+#define ADC_IDR_EOC9 (0x1u << 9) /**< \brief (ADC_IDR) End of Conversion Interrupt Disable 9 */
+#define ADC_IDR_EOC10 (0x1u << 10) /**< \brief (ADC_IDR) End of Conversion Interrupt Disable 10 */
+#define ADC_IDR_EOC11 (0x1u << 11) /**< \brief (ADC_IDR) End of Conversion Interrupt Disable 11 */
+#define ADC_IDR_EOC12 (0x1u << 12) /**< \brief (ADC_IDR) End of Conversion Interrupt Disable 12 */
+#define ADC_IDR_EOC13 (0x1u << 13) /**< \brief (ADC_IDR) End of Conversion Interrupt Disable 13 */
+#define ADC_IDR_EOC14 (0x1u << 14) /**< \brief (ADC_IDR) End of Conversion Interrupt Disable 14 */
+#define ADC_IDR_EOC15 (0x1u << 15) /**< \brief (ADC_IDR) End of Conversion Interrupt Disable 15 */
+#define ADC_IDR_DRDY (0x1u << 24) /**< \brief (ADC_IDR) Data Ready Interrupt Disable */
+#define ADC_IDR_GOVRE (0x1u << 25) /**< \brief (ADC_IDR) General Overrun Error Interrupt Disable */
+#define ADC_IDR_COMPE (0x1u << 26) /**< \brief (ADC_IDR) Comparison Event Interrupt Disable */
+#define ADC_IDR_ENDRX (0x1u << 27) /**< \brief (ADC_IDR) End of Receive Buffer Interrupt Disable */
+#define ADC_IDR_RXBUFF (0x1u << 28) /**< \brief (ADC_IDR) Receive Buffer Full Interrupt Disable */
+/* -------- ADC_IMR : (ADC Offset: 0x2C) Interrupt Mask Register -------- */
+#define ADC_IMR_EOC0 (0x1u << 0) /**< \brief (ADC_IMR) End of Conversion Interrupt Mask 0 */
+#define ADC_IMR_EOC1 (0x1u << 1) /**< \brief (ADC_IMR) End of Conversion Interrupt Mask 1 */
+#define ADC_IMR_EOC2 (0x1u << 2) /**< \brief (ADC_IMR) End of Conversion Interrupt Mask 2 */
+#define ADC_IMR_EOC3 (0x1u << 3) /**< \brief (ADC_IMR) End of Conversion Interrupt Mask 3 */
+#define ADC_IMR_EOC4 (0x1u << 4) /**< \brief (ADC_IMR) End of Conversion Interrupt Mask 4 */
+#define ADC_IMR_EOC5 (0x1u << 5) /**< \brief (ADC_IMR) End of Conversion Interrupt Mask 5 */
+#define ADC_IMR_EOC6 (0x1u << 6) /**< \brief (ADC_IMR) End of Conversion Interrupt Mask 6 */
+#define ADC_IMR_EOC7 (0x1u << 7) /**< \brief (ADC_IMR) End of Conversion Interrupt Mask 7 */
+#define ADC_IMR_EOC8 (0x1u << 8) /**< \brief (ADC_IMR) End of Conversion Interrupt Mask 8 */
+#define ADC_IMR_EOC9 (0x1u << 9) /**< \brief (ADC_IMR) End of Conversion Interrupt Mask 9 */
+#define ADC_IMR_EOC10 (0x1u << 10) /**< \brief (ADC_IMR) End of Conversion Interrupt Mask 10 */
+#define ADC_IMR_EOC11 (0x1u << 11) /**< \brief (ADC_IMR) End of Conversion Interrupt Mask 11 */
+#define ADC_IMR_EOC12 (0x1u << 12) /**< \brief (ADC_IMR) End of Conversion Interrupt Mask 12 */
+#define ADC_IMR_EOC13 (0x1u << 13) /**< \brief (ADC_IMR) End of Conversion Interrupt Mask 13 */
+#define ADC_IMR_EOC14 (0x1u << 14) /**< \brief (ADC_IMR) End of Conversion Interrupt Mask 14 */
+#define ADC_IMR_EOC15 (0x1u << 15) /**< \brief (ADC_IMR) End of Conversion Interrupt Mask 15 */
+#define ADC_IMR_DRDY (0x1u << 24) /**< \brief (ADC_IMR) Data Ready Interrupt Mask */
+#define ADC_IMR_GOVRE (0x1u << 25) /**< \brief (ADC_IMR) General Overrun Error Interrupt Mask */
+#define ADC_IMR_COMPE (0x1u << 26) /**< \brief (ADC_IMR) Comparison Event Interrupt Mask */
+#define ADC_IMR_ENDRX (0x1u << 27) /**< \brief (ADC_IMR) End of Receive Buffer Interrupt Mask */
+#define ADC_IMR_RXBUFF (0x1u << 28) /**< \brief (ADC_IMR) Receive Buffer Full Interrupt Mask */
+/* -------- ADC_ISR : (ADC Offset: 0x30) Interrupt Status Register -------- */
+#define ADC_ISR_EOC0 (0x1u << 0) /**< \brief (ADC_ISR) End of Conversion 0 */
+#define ADC_ISR_EOC1 (0x1u << 1) /**< \brief (ADC_ISR) End of Conversion 1 */
+#define ADC_ISR_EOC2 (0x1u << 2) /**< \brief (ADC_ISR) End of Conversion 2 */
+#define ADC_ISR_EOC3 (0x1u << 3) /**< \brief (ADC_ISR) End of Conversion 3 */
+#define ADC_ISR_EOC4 (0x1u << 4) /**< \brief (ADC_ISR) End of Conversion 4 */
+#define ADC_ISR_EOC5 (0x1u << 5) /**< \brief (ADC_ISR) End of Conversion 5 */
+#define ADC_ISR_EOC6 (0x1u << 6) /**< \brief (ADC_ISR) End of Conversion 6 */
+#define ADC_ISR_EOC7 (0x1u << 7) /**< \brief (ADC_ISR) End of Conversion 7 */
+#define ADC_ISR_EOC8 (0x1u << 8) /**< \brief (ADC_ISR) End of Conversion 8 */
+#define ADC_ISR_EOC9 (0x1u << 9) /**< \brief (ADC_ISR) End of Conversion 9 */
+#define ADC_ISR_EOC10 (0x1u << 10) /**< \brief (ADC_ISR) End of Conversion 10 */
+#define ADC_ISR_EOC11 (0x1u << 11) /**< \brief (ADC_ISR) End of Conversion 11 */
+#define ADC_ISR_EOC12 (0x1u << 12) /**< \brief (ADC_ISR) End of Conversion 12 */
+#define ADC_ISR_EOC13 (0x1u << 13) /**< \brief (ADC_ISR) End of Conversion 13 */
+#define ADC_ISR_EOC14 (0x1u << 14) /**< \brief (ADC_ISR) End of Conversion 14 */
+#define ADC_ISR_EOC15 (0x1u << 15) /**< \brief (ADC_ISR) End of Conversion 15 */
+#define ADC_ISR_DRDY (0x1u << 24) /**< \brief (ADC_ISR) Data Ready */
+#define ADC_ISR_GOVRE (0x1u << 25) /**< \brief (ADC_ISR) General Overrun Error */
+#define ADC_ISR_COMPE (0x1u << 26) /**< \brief (ADC_ISR) Comparison Error */
+#define ADC_ISR_ENDRX (0x1u << 27) /**< \brief (ADC_ISR) End of RX Buffer */
+#define ADC_ISR_RXBUFF (0x1u << 28) /**< \brief (ADC_ISR) RX Buffer Full */
+/* -------- ADC_OVER : (ADC Offset: 0x3C) Overrun Status Register -------- */
+#define ADC_OVER_OVRE0 (0x1u << 0) /**< \brief (ADC_OVER) Overrun Error 0 */
+#define ADC_OVER_OVRE1 (0x1u << 1) /**< \brief (ADC_OVER) Overrun Error 1 */
+#define ADC_OVER_OVRE2 (0x1u << 2) /**< \brief (ADC_OVER) Overrun Error 2 */
+#define ADC_OVER_OVRE3 (0x1u << 3) /**< \brief (ADC_OVER) Overrun Error 3 */
+#define ADC_OVER_OVRE4 (0x1u << 4) /**< \brief (ADC_OVER) Overrun Error 4 */
+#define ADC_OVER_OVRE5 (0x1u << 5) /**< \brief (ADC_OVER) Overrun Error 5 */
+#define ADC_OVER_OVRE6 (0x1u << 6) /**< \brief (ADC_OVER) Overrun Error 6 */
+#define ADC_OVER_OVRE7 (0x1u << 7) /**< \brief (ADC_OVER) Overrun Error 7 */
+#define ADC_OVER_OVRE8 (0x1u << 8) /**< \brief (ADC_OVER) Overrun Error 8 */
+#define ADC_OVER_OVRE9 (0x1u << 9) /**< \brief (ADC_OVER) Overrun Error 9 */
+#define ADC_OVER_OVRE10 (0x1u << 10) /**< \brief (ADC_OVER) Overrun Error 10 */
+#define ADC_OVER_OVRE11 (0x1u << 11) /**< \brief (ADC_OVER) Overrun Error 11 */
+#define ADC_OVER_OVRE12 (0x1u << 12) /**< \brief (ADC_OVER) Overrun Error 12 */
+#define ADC_OVER_OVRE13 (0x1u << 13) /**< \brief (ADC_OVER) Overrun Error 13 */
+#define ADC_OVER_OVRE14 (0x1u << 14) /**< \brief (ADC_OVER) Overrun Error 14 */
+#define ADC_OVER_OVRE15 (0x1u << 15) /**< \brief (ADC_OVER) Overrun Error 15 */
+/* -------- ADC_EMR : (ADC Offset: 0x40) Extended Mode Register -------- */
+#define ADC_EMR_CMPMODE_Pos 0
+#define ADC_EMR_CMPMODE_Msk (0x3u << ADC_EMR_CMPMODE_Pos) /**< \brief (ADC_EMR) Comparison Mode */
+#define ADC_EMR_CMPMODE_LOW (0x0u << 0) /**< \brief (ADC_EMR) Generates an event when the converted data is lower than the low threshold of the window. */
+#define ADC_EMR_CMPMODE_HIGH (0x1u << 0) /**< \brief (ADC_EMR) Generates an event when the converted data is higher than the high threshold of the window. */
+#define ADC_EMR_CMPMODE_IN (0x2u << 0) /**< \brief (ADC_EMR) Generates an event when the converted data is in the comparison window. */
+#define ADC_EMR_CMPMODE_OUT (0x3u << 0) /**< \brief (ADC_EMR) Generates an event when the converted data is out of the comparison window. */
+#define ADC_EMR_CMPSEL_Pos 4
+#define ADC_EMR_CMPSEL_Msk (0xfu << ADC_EMR_CMPSEL_Pos) /**< \brief (ADC_EMR) Comparison Selected Channel */
+#define ADC_EMR_CMPSEL(value) ((ADC_EMR_CMPSEL_Msk & ((value) << ADC_EMR_CMPSEL_Pos)))
+#define ADC_EMR_CMPALL (0x1u << 9) /**< \brief (ADC_EMR) Compare All Channels */
+#define ADC_EMR_CMPFILTER_Pos 12
+#define ADC_EMR_CMPFILTER_Msk (0x3u << ADC_EMR_CMPFILTER_Pos) /**< \brief (ADC_EMR) Compare Event Filtering */
+#define ADC_EMR_CMPFILTER(value) ((ADC_EMR_CMPFILTER_Msk & ((value) << ADC_EMR_CMPFILTER_Pos)))
+#define ADC_EMR_TAG (0x1u << 24) /**< \brief (ADC_EMR) TAG of ADC_LDCR register */
+/* -------- ADC_CWR : (ADC Offset: 0x44) Compare Window Register -------- */
+#define ADC_CWR_LOWTHRES_Pos 0
+#define ADC_CWR_LOWTHRES_Msk (0xfffu << ADC_CWR_LOWTHRES_Pos) /**< \brief (ADC_CWR) Low Threshold */
+#define ADC_CWR_LOWTHRES(value) ((ADC_CWR_LOWTHRES_Msk & ((value) << ADC_CWR_LOWTHRES_Pos)))
+#define ADC_CWR_HIGHTHRES_Pos 16
+#define ADC_CWR_HIGHTHRES_Msk (0xfffu << ADC_CWR_HIGHTHRES_Pos) /**< \brief (ADC_CWR) High Threshold */
+#define ADC_CWR_HIGHTHRES(value) ((ADC_CWR_HIGHTHRES_Msk & ((value) << ADC_CWR_HIGHTHRES_Pos)))
+/* -------- ADC_CGR : (ADC Offset: 0x48) Channel Gain Register -------- */
+#define ADC_CGR_GAIN0_Pos 0
+#define ADC_CGR_GAIN0_Msk (0x3u << ADC_CGR_GAIN0_Pos) /**< \brief (ADC_CGR) Gain for channel 0 */
+#define ADC_CGR_GAIN0(value) ((ADC_CGR_GAIN0_Msk & ((value) << ADC_CGR_GAIN0_Pos)))
+#define ADC_CGR_GAIN1_Pos 2
+#define ADC_CGR_GAIN1_Msk (0x3u << ADC_CGR_GAIN1_Pos) /**< \brief (ADC_CGR) Gain for channel 1 */
+#define ADC_CGR_GAIN1(value) ((ADC_CGR_GAIN1_Msk & ((value) << ADC_CGR_GAIN1_Pos)))
+#define ADC_CGR_GAIN2_Pos 4
+#define ADC_CGR_GAIN2_Msk (0x3u << ADC_CGR_GAIN2_Pos) /**< \brief (ADC_CGR) Gain for channel 2 */
+#define ADC_CGR_GAIN2(value) ((ADC_CGR_GAIN2_Msk & ((value) << ADC_CGR_GAIN2_Pos)))
+#define ADC_CGR_GAIN3_Pos 6
+#define ADC_CGR_GAIN3_Msk (0x3u << ADC_CGR_GAIN3_Pos) /**< \brief (ADC_CGR) Gain for channel 3 */
+#define ADC_CGR_GAIN3(value) ((ADC_CGR_GAIN3_Msk & ((value) << ADC_CGR_GAIN3_Pos)))
+#define ADC_CGR_GAIN4_Pos 8
+#define ADC_CGR_GAIN4_Msk (0x3u << ADC_CGR_GAIN4_Pos) /**< \brief (ADC_CGR) Gain for channel 4 */
+#define ADC_CGR_GAIN4(value) ((ADC_CGR_GAIN4_Msk & ((value) << ADC_CGR_GAIN4_Pos)))
+#define ADC_CGR_GAIN5_Pos 10
+#define ADC_CGR_GAIN5_Msk (0x3u << ADC_CGR_GAIN5_Pos) /**< \brief (ADC_CGR) Gain for channel 5 */
+#define ADC_CGR_GAIN5(value) ((ADC_CGR_GAIN5_Msk & ((value) << ADC_CGR_GAIN5_Pos)))
+#define ADC_CGR_GAIN6_Pos 12
+#define ADC_CGR_GAIN6_Msk (0x3u << ADC_CGR_GAIN6_Pos) /**< \brief (ADC_CGR) Gain for channel 6 */
+#define ADC_CGR_GAIN6(value) ((ADC_CGR_GAIN6_Msk & ((value) << ADC_CGR_GAIN6_Pos)))
+#define ADC_CGR_GAIN7_Pos 14
+#define ADC_CGR_GAIN7_Msk (0x3u << ADC_CGR_GAIN7_Pos) /**< \brief (ADC_CGR) Gain for channel 7 */
+#define ADC_CGR_GAIN7(value) ((ADC_CGR_GAIN7_Msk & ((value) << ADC_CGR_GAIN7_Pos)))
+#define ADC_CGR_GAIN8_Pos 16
+#define ADC_CGR_GAIN8_Msk (0x3u << ADC_CGR_GAIN8_Pos) /**< \brief (ADC_CGR) Gain for channel 8 */
+#define ADC_CGR_GAIN8(value) ((ADC_CGR_GAIN8_Msk & ((value) << ADC_CGR_GAIN8_Pos)))
+#define ADC_CGR_GAIN9_Pos 18
+#define ADC_CGR_GAIN9_Msk (0x3u << ADC_CGR_GAIN9_Pos) /**< \brief (ADC_CGR) Gain for channel 9 */
+#define ADC_CGR_GAIN9(value) ((ADC_CGR_GAIN9_Msk & ((value) << ADC_CGR_GAIN9_Pos)))
+#define ADC_CGR_GAIN10_Pos 20
+#define ADC_CGR_GAIN10_Msk (0x3u << ADC_CGR_GAIN10_Pos) /**< \brief (ADC_CGR) Gain for channel 10 */
+#define ADC_CGR_GAIN10(value) ((ADC_CGR_GAIN10_Msk & ((value) << ADC_CGR_GAIN10_Pos)))
+#define ADC_CGR_GAIN11_Pos 22
+#define ADC_CGR_GAIN11_Msk (0x3u << ADC_CGR_GAIN11_Pos) /**< \brief (ADC_CGR) Gain for channel 11 */
+#define ADC_CGR_GAIN11(value) ((ADC_CGR_GAIN11_Msk & ((value) << ADC_CGR_GAIN11_Pos)))
+#define ADC_CGR_GAIN12_Pos 24
+#define ADC_CGR_GAIN12_Msk (0x3u << ADC_CGR_GAIN12_Pos) /**< \brief (ADC_CGR) Gain for channel 12 */
+#define ADC_CGR_GAIN12(value) ((ADC_CGR_GAIN12_Msk & ((value) << ADC_CGR_GAIN12_Pos)))
+#define ADC_CGR_GAIN13_Pos 26
+#define ADC_CGR_GAIN13_Msk (0x3u << ADC_CGR_GAIN13_Pos) /**< \brief (ADC_CGR) Gain for channel 13 */
+#define ADC_CGR_GAIN13(value) ((ADC_CGR_GAIN13_Msk & ((value) << ADC_CGR_GAIN13_Pos)))
+#define ADC_CGR_GAIN14_Pos 28
+#define ADC_CGR_GAIN14_Msk (0x3u << ADC_CGR_GAIN14_Pos) /**< \brief (ADC_CGR) Gain for channel 14 */
+#define ADC_CGR_GAIN14(value) ((ADC_CGR_GAIN14_Msk & ((value) << ADC_CGR_GAIN14_Pos)))
+#define ADC_CGR_GAIN15_Pos 30
+#define ADC_CGR_GAIN15_Msk (0x3u << ADC_CGR_GAIN15_Pos) /**< \brief (ADC_CGR) Gain for channel 15 */
+#define ADC_CGR_GAIN15(value) ((ADC_CGR_GAIN15_Msk & ((value) << ADC_CGR_GAIN15_Pos)))
+/* -------- ADC_COR : (ADC Offset: 0x4C) Channel Offset Register -------- */
+#define ADC_COR_OFF0 (0x1u << 0) /**< \brief (ADC_COR) Offset for channel 0 */
+#define ADC_COR_OFF1 (0x1u << 1) /**< \brief (ADC_COR) Offset for channel 1 */
+#define ADC_COR_OFF2 (0x1u << 2) /**< \brief (ADC_COR) Offset for channel 2 */
+#define ADC_COR_OFF3 (0x1u << 3) /**< \brief (ADC_COR) Offset for channel 3 */
+#define ADC_COR_OFF4 (0x1u << 4) /**< \brief (ADC_COR) Offset for channel 4 */
+#define ADC_COR_OFF5 (0x1u << 5) /**< \brief (ADC_COR) Offset for channel 5 */
+#define ADC_COR_OFF6 (0x1u << 6) /**< \brief (ADC_COR) Offset for channel 6 */
+#define ADC_COR_OFF7 (0x1u << 7) /**< \brief (ADC_COR) Offset for channel 7 */
+#define ADC_COR_OFF8 (0x1u << 8) /**< \brief (ADC_COR) Offset for channel 8 */
+#define ADC_COR_OFF9 (0x1u << 9) /**< \brief (ADC_COR) Offset for channel 9 */
+#define ADC_COR_OFF10 (0x1u << 10) /**< \brief (ADC_COR) Offset for channel 10 */
+#define ADC_COR_OFF11 (0x1u << 11) /**< \brief (ADC_COR) Offset for channel 11 */
+#define ADC_COR_OFF12 (0x1u << 12) /**< \brief (ADC_COR) Offset for channel 12 */
+#define ADC_COR_OFF13 (0x1u << 13) /**< \brief (ADC_COR) Offset for channel 13 */
+#define ADC_COR_OFF14 (0x1u << 14) /**< \brief (ADC_COR) Offset for channel 14 */
+#define ADC_COR_OFF15 (0x1u << 15) /**< \brief (ADC_COR) Offset for channel 15 */
+#define ADC_COR_DIFF0 (0x1u << 16) /**< \brief (ADC_COR) Differential inputs for channel 0 */
+#define ADC_COR_DIFF1 (0x1u << 17) /**< \brief (ADC_COR) Differential inputs for channel 1 */
+#define ADC_COR_DIFF2 (0x1u << 18) /**< \brief (ADC_COR) Differential inputs for channel 2 */
+#define ADC_COR_DIFF3 (0x1u << 19) /**< \brief (ADC_COR) Differential inputs for channel 3 */
+#define ADC_COR_DIFF4 (0x1u << 20) /**< \brief (ADC_COR) Differential inputs for channel 4 */
+#define ADC_COR_DIFF5 (0x1u << 21) /**< \brief (ADC_COR) Differential inputs for channel 5 */
+#define ADC_COR_DIFF6 (0x1u << 22) /**< \brief (ADC_COR) Differential inputs for channel 6 */
+#define ADC_COR_DIFF7 (0x1u << 23) /**< \brief (ADC_COR) Differential inputs for channel 7 */
+#define ADC_COR_DIFF8 (0x1u << 24) /**< \brief (ADC_COR) Differential inputs for channel 8 */
+#define ADC_COR_DIFF9 (0x1u << 25) /**< \brief (ADC_COR) Differential inputs for channel 9 */
+#define ADC_COR_DIFF10 (0x1u << 26) /**< \brief (ADC_COR) Differential inputs for channel 10 */
+#define ADC_COR_DIFF11 (0x1u << 27) /**< \brief (ADC_COR) Differential inputs for channel 11 */
+#define ADC_COR_DIFF12 (0x1u << 28) /**< \brief (ADC_COR) Differential inputs for channel 12 */
+#define ADC_COR_DIFF13 (0x1u << 29) /**< \brief (ADC_COR) Differential inputs for channel 13 */
+#define ADC_COR_DIFF14 (0x1u << 30) /**< \brief (ADC_COR) Differential inputs for channel 14 */
+#define ADC_COR_DIFF15 (0x1u << 31) /**< \brief (ADC_COR) Differential inputs for channel 15 */
+/* -------- ADC_CDR[16] : (ADC Offset: 0x50) Channel Data Register -------- */
+#define ADC_CDR_DATA_Pos 0
+#define ADC_CDR_DATA_Msk (0xfffu << ADC_CDR_DATA_Pos) /**< \brief (ADC_CDR[16]) Converted Data */
+/* -------- ADC_ACR : (ADC Offset: 0x94) Analog Control Register -------- */
+#define ADC_ACR_TSON (0x1u << 4) /**< \brief (ADC_ACR) Temperature Sensor On */
+#define ADC_ACR_IBCTL_Pos 8
+#define ADC_ACR_IBCTL_Msk (0x3u << ADC_ACR_IBCTL_Pos) /**< \brief (ADC_ACR) ADC Bias Current Control */
+#define ADC_ACR_IBCTL(value) ((ADC_ACR_IBCTL_Msk & ((value) << ADC_ACR_IBCTL_Pos)))
+/* -------- ADC_WPMR : (ADC Offset: 0xE4) Write Protect Mode Register -------- */
+#define ADC_WPMR_WPEN (0x1u << 0) /**< \brief (ADC_WPMR) Write Protect Enable */
+#define ADC_WPMR_WPKEY_Pos 8
+#define ADC_WPMR_WPKEY_Msk (0xffffffu << ADC_WPMR_WPKEY_Pos) /**< \brief (ADC_WPMR) Write Protect KEY */
+#define ADC_WPMR_WPKEY(value) ((ADC_WPMR_WPKEY_Msk & ((value) << ADC_WPMR_WPKEY_Pos)))
+/* -------- ADC_WPSR : (ADC Offset: 0xE8) Write Protect Status Register -------- */
+#define ADC_WPSR_WPVS (0x1u << 0) /**< \brief (ADC_WPSR) Write Protect Violation Status */
+#define ADC_WPSR_WPVSRC_Pos 8
+#define ADC_WPSR_WPVSRC_Msk (0xffffu << ADC_WPSR_WPVSRC_Pos) /**< \brief (ADC_WPSR) Write Protect Violation Source */
+/* -------- ADC_RPR : (ADC Offset: 0x100) Receive Pointer Register -------- */
+#define ADC_RPR_RXPTR_Pos 0
+#define ADC_RPR_RXPTR_Msk (0xffffffffu << ADC_RPR_RXPTR_Pos) /**< \brief (ADC_RPR) Receive Pointer Register */
+#define ADC_RPR_RXPTR(value) ((ADC_RPR_RXPTR_Msk & ((value) << ADC_RPR_RXPTR_Pos)))
+/* -------- ADC_RCR : (ADC Offset: 0x104) Receive Counter Register -------- */
+#define ADC_RCR_RXCTR_Pos 0
+#define ADC_RCR_RXCTR_Msk (0xffffu << ADC_RCR_RXCTR_Pos) /**< \brief (ADC_RCR) Receive Counter Register */
+#define ADC_RCR_RXCTR(value) ((ADC_RCR_RXCTR_Msk & ((value) << ADC_RCR_RXCTR_Pos)))
+/* -------- ADC_TPR : (ADC Offset: 0x108) Transmit Pointer Register -------- */
+#define ADC_TPR_TXPTR_Pos 0
+#define ADC_TPR_TXPTR_Msk (0xffffffffu << ADC_TPR_TXPTR_Pos) /**< \brief (ADC_TPR) Transmit Counter Register */
+#define ADC_TPR_TXPTR(value) ((ADC_TPR_TXPTR_Msk & ((value) << ADC_TPR_TXPTR_Pos)))
+/* -------- ADC_TCR : (ADC Offset: 0x10C) Transmit Counter Register -------- */
+#define ADC_TCR_TXCTR_Pos 0
+#define ADC_TCR_TXCTR_Msk (0xffffu << ADC_TCR_TXCTR_Pos) /**< \brief (ADC_TCR) Transmit Counter Register */
+#define ADC_TCR_TXCTR(value) ((ADC_TCR_TXCTR_Msk & ((value) << ADC_TCR_TXCTR_Pos)))
+/* -------- ADC_RNPR : (ADC Offset: 0x110) Receive Next Pointer Register -------- */
+#define ADC_RNPR_RXNPTR_Pos 0
+#define ADC_RNPR_RXNPTR_Msk (0xffffffffu << ADC_RNPR_RXNPTR_Pos) /**< \brief (ADC_RNPR) Receive Next Pointer */
+#define ADC_RNPR_RXNPTR(value) ((ADC_RNPR_RXNPTR_Msk & ((value) << ADC_RNPR_RXNPTR_Pos)))
+/* -------- ADC_RNCR : (ADC Offset: 0x114) Receive Next Counter Register -------- */
+#define ADC_RNCR_RXNCTR_Pos 0
+#define ADC_RNCR_RXNCTR_Msk (0xffffu << ADC_RNCR_RXNCTR_Pos) /**< \brief (ADC_RNCR) Receive Next Counter */
+#define ADC_RNCR_RXNCTR(value) ((ADC_RNCR_RXNCTR_Msk & ((value) << ADC_RNCR_RXNCTR_Pos)))
+/* -------- ADC_TNPR : (ADC Offset: 0x118) Transmit Next Pointer Register -------- */
+#define ADC_TNPR_TXNPTR_Pos 0
+#define ADC_TNPR_TXNPTR_Msk (0xffffffffu << ADC_TNPR_TXNPTR_Pos) /**< \brief (ADC_TNPR) Transmit Next Pointer */
+#define ADC_TNPR_TXNPTR(value) ((ADC_TNPR_TXNPTR_Msk & ((value) << ADC_TNPR_TXNPTR_Pos)))
+/* -------- ADC_TNCR : (ADC Offset: 0x11C) Transmit Next Counter Register -------- */
+#define ADC_TNCR_TXNCTR_Pos 0
+#define ADC_TNCR_TXNCTR_Msk (0xffffu << ADC_TNCR_TXNCTR_Pos) /**< \brief (ADC_TNCR) Transmit Counter Next */
+#define ADC_TNCR_TXNCTR(value) ((ADC_TNCR_TXNCTR_Msk & ((value) << ADC_TNCR_TXNCTR_Pos)))
+/* -------- ADC_PTCR : (ADC Offset: 0x120) Transfer Control Register -------- */
+#define ADC_PTCR_RXTEN (0x1u << 0) /**< \brief (ADC_PTCR) Receiver Transfer Enable */
+#define ADC_PTCR_RXTDIS (0x1u << 1) /**< \brief (ADC_PTCR) Receiver Transfer Disable */
+#define ADC_PTCR_TXTEN (0x1u << 8) /**< \brief (ADC_PTCR) Transmitter Transfer Enable */
+#define ADC_PTCR_TXTDIS (0x1u << 9) /**< \brief (ADC_PTCR) Transmitter Transfer Disable */
+/* -------- ADC_PTSR : (ADC Offset: 0x124) Transfer Status Register -------- */
+#define ADC_PTSR_RXTEN (0x1u << 0) /**< \brief (ADC_PTSR) Receiver Transfer Enable */
+#define ADC_PTSR_TXTEN (0x1u << 8) /**< \brief (ADC_PTSR) Transmitter Transfer Enable */
+
+/*@}*/
+
+/* ============================================================================= */
+/** SOFTWARE API DEFINITION FOR Controller Area Network */
+/* ============================================================================= */
+/** \addtogroup SAM3XA_CAN Controller Area Network */
+/*@{*/
+
+#ifndef __ASSEMBLY__
+#define CAN_MB_NUMBER 8
+/** \brief CanMb hardware registers */
+typedef struct {
+ RwReg CAN_MMR; /**< \brief (CanMb Offset: 0x0) Mailbox Mode Register */
+ RwReg CAN_MAM; /**< \brief (CanMb Offset: 0x4) Mailbox Acceptance Mask Register */
+ RwReg CAN_MID; /**< \brief (CanMb Offset: 0x8) Mailbox ID Register */
+ RwReg CAN_MFID; /**< \brief (CanMb Offset: 0xC) Mailbox Family ID Register */
+ RwReg CAN_MSR; /**< \brief (CanMb Offset: 0x10) Mailbox Status Register */
+ RwReg CAN_MDL; /**< \brief (CanMb Offset: 0x14) Mailbox Data Low Register */
+ RwReg CAN_MDH; /**< \brief (CanMb Offset: 0x18) Mailbox Data High Register */
+ RwReg CAN_MCR; /**< \brief (CanMb Offset: 0x1C) Mailbox Control Register */
+} CanMb;
+/** \brief Can hardware registers */
+typedef struct {
+ RwReg CAN_MR; /**< \brief (Can Offset: 0x0000) Mode Register */
+ WoReg CAN_IER; /**< \brief (Can Offset: 0x0004) Interrupt Enable Register */
+ WoReg CAN_IDR; /**< \brief (Can Offset: 0x0008) Interrupt Disable Register */
+ RoReg CAN_IMR; /**< \brief (Can Offset: 0x000C) Interrupt Mask Register */
+ RoReg CAN_SR; /**< \brief (Can Offset: 0x0010) Status Register */
+ RwReg CAN_BR; /**< \brief (Can Offset: 0x0014) Baudrate Register */
+ RoReg CAN_TIM; /**< \brief (Can Offset: 0x0018) Timer Register */
+ RoReg CAN_TIMESTP; /**< \brief (Can Offset: 0x001C) Timestamp Register */
+ RoReg CAN_ECR; /**< \brief (Can Offset: 0x0020) Error Counter Register */
+ WoReg CAN_TCR; /**< \brief (Can Offset: 0x0024) Transfer Command Register */
+ WoReg CAN_ACR; /**< \brief (Can Offset: 0x0028) Abort Command Register */
+ RoReg Reserved1[117];
+ CanMb CAN_MB[CAN_MB_NUMBER]; /**< \brief (Can Offset: 0x200) MB = 0 .. 7 */
+} Can;
+#endif /* __ASSEMBLY__ */
+/* -------- CAN_MR : (CAN Offset: 0x0000) Mode Register -------- */
+#define CAN_MR_CANEN (0x1u << 0) /**< \brief (CAN_MR) CAN Controller Enable */
+#define CAN_MR_LPM (0x1u << 1) /**< \brief (CAN_MR) Disable/Enable Low Power Mode */
+#define CAN_MR_ABM (0x1u << 2) /**< \brief (CAN_MR) Disable/Enable Autobaud/Listen mode */
+#define CAN_MR_OVL (0x1u << 3) /**< \brief (CAN_MR) Disable/Enable Overload Frame */
+#define CAN_MR_TEOF (0x1u << 4) /**< \brief (CAN_MR) Timestamp messages at each end of Frame */
+#define CAN_MR_TTM (0x1u << 5) /**< \brief (CAN_MR) Disable/Enable Time Triggered Mode */
+#define CAN_MR_TIMFRZ (0x1u << 6) /**< \brief (CAN_MR) Enable Timer Freeze */
+#define CAN_MR_DRPT (0x1u << 7) /**< \brief (CAN_MR) Disable Repeat */
+#define CAN_MR_RXSYNC_Pos 24
+#define CAN_MR_RXSYNC_Msk (0x7u << CAN_MR_RXSYNC_Pos) /**< \brief (CAN_MR) Reception Synchronization Stage (not readable) */
+#define CAN_MR_RXSYNC_DOUBLE_PP (0x0u << 24) /**< \brief (CAN_MR) Rx Signal with Double Synchro Stages (2 Positive Edges) */
+#define CAN_MR_RXSYNC_DOUBLE_PN (0x1u << 24) /**< \brief (CAN_MR) Rx Signal with Double Synchro Stages (One Positive Edge and One Negative Edge) */
+#define CAN_MR_RXSYNC_SINGLE_P (0x2u << 24) /**< \brief (CAN_MR) Rx Signal with Single Synchro Stage (Positive Edge) */
+#define CAN_MR_RXSYNC_NONE (0x3u << 24) /**< \brief (CAN_MR) Rx Signal with No Synchro Stage */
+/* -------- CAN_IER : (CAN Offset: 0x0004) Interrupt Enable Register -------- */
+#define CAN_IER_MB0 (0x1u << 0) /**< \brief (CAN_IER) Mailbox 0 Interrupt Enable */
+#define CAN_IER_MB1 (0x1u << 1) /**< \brief (CAN_IER) Mailbox 1 Interrupt Enable */
+#define CAN_IER_MB2 (0x1u << 2) /**< \brief (CAN_IER) Mailbox 2 Interrupt Enable */
+#define CAN_IER_MB3 (0x1u << 3) /**< \brief (CAN_IER) Mailbox 3 Interrupt Enable */
+#define CAN_IER_MB4 (0x1u << 4) /**< \brief (CAN_IER) Mailbox 4 Interrupt Enable */
+#define CAN_IER_MB5 (0x1u << 5) /**< \brief (CAN_IER) Mailbox 5 Interrupt Enable */
+#define CAN_IER_MB6 (0x1u << 6) /**< \brief (CAN_IER) Mailbox 6 Interrupt Enable */
+#define CAN_IER_MB7 (0x1u << 7) /**< \brief (CAN_IER) Mailbox 7 Interrupt Enable */
+#define CAN_IER_ERRA (0x1u << 16) /**< \brief (CAN_IER) Error Active Mode Interrupt Enable */
+#define CAN_IER_WARN (0x1u << 17) /**< \brief (CAN_IER) Warning Limit Interrupt Enable */
+#define CAN_IER_ERRP (0x1u << 18) /**< \brief (CAN_IER) Error Passive Mode Interrupt Enable */
+#define CAN_IER_BOFF (0x1u << 19) /**< \brief (CAN_IER) Bus Off Mode Interrupt Enable */
+#define CAN_IER_SLEEP (0x1u << 20) /**< \brief (CAN_IER) Sleep Interrupt Enable */
+#define CAN_IER_WAKEUP (0x1u << 21) /**< \brief (CAN_IER) Wakeup Interrupt Enable */
+#define CAN_IER_TOVF (0x1u << 22) /**< \brief (CAN_IER) Timer Overflow Interrupt Enable */
+#define CAN_IER_TSTP (0x1u << 23) /**< \brief (CAN_IER) TimeStamp Interrupt Enable */
+#define CAN_IER_CERR (0x1u << 24) /**< \brief (CAN_IER) CRC Error Interrupt Enable */
+#define CAN_IER_SERR (0x1u << 25) /**< \brief (CAN_IER) Stuffing Error Interrupt Enable */
+#define CAN_IER_AERR (0x1u << 26) /**< \brief (CAN_IER) Acknowledgment Error Interrupt Enable */
+#define CAN_IER_FERR (0x1u << 27) /**< \brief (CAN_IER) Form Error Interrupt Enable */
+#define CAN_IER_BERR (0x1u << 28) /**< \brief (CAN_IER) Bit Error Interrupt Enable */
+/* -------- CAN_IDR : (CAN Offset: 0x0008) Interrupt Disable Register -------- */
+#define CAN_IDR_MB0 (0x1u << 0) /**< \brief (CAN_IDR) Mailbox 0 Interrupt Disable */
+#define CAN_IDR_MB1 (0x1u << 1) /**< \brief (CAN_IDR) Mailbox 1 Interrupt Disable */
+#define CAN_IDR_MB2 (0x1u << 2) /**< \brief (CAN_IDR) Mailbox 2 Interrupt Disable */
+#define CAN_IDR_MB3 (0x1u << 3) /**< \brief (CAN_IDR) Mailbox 3 Interrupt Disable */
+#define CAN_IDR_MB4 (0x1u << 4) /**< \brief (CAN_IDR) Mailbox 4 Interrupt Disable */
+#define CAN_IDR_MB5 (0x1u << 5) /**< \brief (CAN_IDR) Mailbox 5 Interrupt Disable */
+#define CAN_IDR_MB6 (0x1u << 6) /**< \brief (CAN_IDR) Mailbox 6 Interrupt Disable */
+#define CAN_IDR_MB7 (0x1u << 7) /**< \brief (CAN_IDR) Mailbox 7 Interrupt Disable */
+#define CAN_IDR_ERRA (0x1u << 16) /**< \brief (CAN_IDR) Error Active Mode Interrupt Disable */
+#define CAN_IDR_WARN (0x1u << 17) /**< \brief (CAN_IDR) Warning Limit Interrupt Disable */
+#define CAN_IDR_ERRP (0x1u << 18) /**< \brief (CAN_IDR) Error Passive Mode Interrupt Disable */
+#define CAN_IDR_BOFF (0x1u << 19) /**< \brief (CAN_IDR) Bus Off Mode Interrupt Disable */
+#define CAN_IDR_SLEEP (0x1u << 20) /**< \brief (CAN_IDR) Sleep Interrupt Disable */
+#define CAN_IDR_WAKEUP (0x1u << 21) /**< \brief (CAN_IDR) Wakeup Interrupt Disable */
+#define CAN_IDR_TOVF (0x1u << 22) /**< \brief (CAN_IDR) Timer Overflow Interrupt */
+#define CAN_IDR_TSTP (0x1u << 23) /**< \brief (CAN_IDR) TimeStamp Interrupt Disable */
+#define CAN_IDR_CERR (0x1u << 24) /**< \brief (CAN_IDR) CRC Error Interrupt Disable */
+#define CAN_IDR_SERR (0x1u << 25) /**< \brief (CAN_IDR) Stuffing Error Interrupt Disable */
+#define CAN_IDR_AERR (0x1u << 26) /**< \brief (CAN_IDR) Acknowledgment Error Interrupt Disable */
+#define CAN_IDR_FERR (0x1u << 27) /**< \brief (CAN_IDR) Form Error Interrupt Disable */
+#define CAN_IDR_BERR (0x1u << 28) /**< \brief (CAN_IDR) Bit Error Interrupt Disable */
+/* -------- CAN_IMR : (CAN Offset: 0x000C) Interrupt Mask Register -------- */
+#define CAN_IMR_MB0 (0x1u << 0) /**< \brief (CAN_IMR) Mailbox 0 Interrupt Mask */
+#define CAN_IMR_MB1 (0x1u << 1) /**< \brief (CAN_IMR) Mailbox 1 Interrupt Mask */
+#define CAN_IMR_MB2 (0x1u << 2) /**< \brief (CAN_IMR) Mailbox 2 Interrupt Mask */
+#define CAN_IMR_MB3 (0x1u << 3) /**< \brief (CAN_IMR) Mailbox 3 Interrupt Mask */
+#define CAN_IMR_MB4 (0x1u << 4) /**< \brief (CAN_IMR) Mailbox 4 Interrupt Mask */
+#define CAN_IMR_MB5 (0x1u << 5) /**< \brief (CAN_IMR) Mailbox 5 Interrupt Mask */
+#define CAN_IMR_MB6 (0x1u << 6) /**< \brief (CAN_IMR) Mailbox 6 Interrupt Mask */
+#define CAN_IMR_MB7 (0x1u << 7) /**< \brief (CAN_IMR) Mailbox 7 Interrupt Mask */
+#define CAN_IMR_ERRA (0x1u << 16) /**< \brief (CAN_IMR) Error Active Mode Interrupt Mask */
+#define CAN_IMR_WARN (0x1u << 17) /**< \brief (CAN_IMR) Warning Limit Interrupt Mask */
+#define CAN_IMR_ERRP (0x1u << 18) /**< \brief (CAN_IMR) Error Passive Mode Interrupt Mask */
+#define CAN_IMR_BOFF (0x1u << 19) /**< \brief (CAN_IMR) Bus Off Mode Interrupt Mask */
+#define CAN_IMR_SLEEP (0x1u << 20) /**< \brief (CAN_IMR) Sleep Interrupt Mask */
+#define CAN_IMR_WAKEUP (0x1u << 21) /**< \brief (CAN_IMR) Wakeup Interrupt Mask */
+#define CAN_IMR_TOVF (0x1u << 22) /**< \brief (CAN_IMR) Timer Overflow Interrupt Mask */
+#define CAN_IMR_TSTP (0x1u << 23) /**< \brief (CAN_IMR) Timestamp Interrupt Mask */
+#define CAN_IMR_CERR (0x1u << 24) /**< \brief (CAN_IMR) CRC Error Interrupt Mask */
+#define CAN_IMR_SERR (0x1u << 25) /**< \brief (CAN_IMR) Stuffing Error Interrupt Mask */
+#define CAN_IMR_AERR (0x1u << 26) /**< \brief (CAN_IMR) Acknowledgment Error Interrupt Mask */
+#define CAN_IMR_FERR (0x1u << 27) /**< \brief (CAN_IMR) Form Error Interrupt Mask */
+#define CAN_IMR_BERR (0x1u << 28) /**< \brief (CAN_IMR) Bit Error Interrupt Mask */
+/* -------- CAN_SR : (CAN Offset: 0x0010) Status Register -------- */
+#define CAN_SR_MB0 (0x1u << 0) /**< \brief (CAN_SR) Mailbox 0 Event */
+#define CAN_SR_MB1 (0x1u << 1) /**< \brief (CAN_SR) Mailbox 1 Event */
+#define CAN_SR_MB2 (0x1u << 2) /**< \brief (CAN_SR) Mailbox 2 Event */
+#define CAN_SR_MB3 (0x1u << 3) /**< \brief (CAN_SR) Mailbox 3 Event */
+#define CAN_SR_MB4 (0x1u << 4) /**< \brief (CAN_SR) Mailbox 4 Event */
+#define CAN_SR_MB5 (0x1u << 5) /**< \brief (CAN_SR) Mailbox 5 Event */
+#define CAN_SR_MB6 (0x1u << 6) /**< \brief (CAN_SR) Mailbox 6 Event */
+#define CAN_SR_MB7 (0x1u << 7) /**< \brief (CAN_SR) Mailbox 7 Event */
+#define CAN_SR_ERRA (0x1u << 16) /**< \brief (CAN_SR) Error Active Mode */
+#define CAN_SR_WARN (0x1u << 17) /**< \brief (CAN_SR) Warning Limit */
+#define CAN_SR_ERRP (0x1u << 18) /**< \brief (CAN_SR) Error Passive Mode */
+#define CAN_SR_BOFF (0x1u << 19) /**< \brief (CAN_SR) Bus Off Mode */
+#define CAN_SR_SLEEP (0x1u << 20) /**< \brief (CAN_SR) CAN controller in Low power Mode */
+#define CAN_SR_WAKEUP (0x1u << 21) /**< \brief (CAN_SR) CAN controller is not in Low power Mode */
+#define CAN_SR_TOVF (0x1u << 22) /**< \brief (CAN_SR) Timer Overflow */
+#define CAN_SR_TSTP (0x1u << 23) /**< \brief (CAN_SR) */
+#define CAN_SR_CERR (0x1u << 24) /**< \brief (CAN_SR) Mailbox CRC Error */
+#define CAN_SR_SERR (0x1u << 25) /**< \brief (CAN_SR) Mailbox Stuffing Error */
+#define CAN_SR_AERR (0x1u << 26) /**< \brief (CAN_SR) Acknowledgment Error */
+#define CAN_SR_FERR (0x1u << 27) /**< \brief (CAN_SR) Form Error */
+#define CAN_SR_BERR (0x1u << 28) /**< \brief (CAN_SR) Bit Error */
+#define CAN_SR_RBSY (0x1u << 29) /**< \brief (CAN_SR) Receiver busy */
+#define CAN_SR_TBSY (0x1u << 30) /**< \brief (CAN_SR) Transmitter busy */
+#define CAN_SR_OVLSY (0x1u << 31) /**< \brief (CAN_SR) Overload busy */
+/* -------- CAN_BR : (CAN Offset: 0x0014) Baudrate Register -------- */
+#define CAN_BR_PHASE2_Pos 0
+#define CAN_BR_PHASE2_Msk (0x7u << CAN_BR_PHASE2_Pos) /**< \brief (CAN_BR) Phase 2 segment */
+#define CAN_BR_PHASE2(value) ((CAN_BR_PHASE2_Msk & ((value) << CAN_BR_PHASE2_Pos)))
+#define CAN_BR_PHASE1_Pos 4
+#define CAN_BR_PHASE1_Msk (0x7u << CAN_BR_PHASE1_Pos) /**< \brief (CAN_BR) Phase 1 segment */
+#define CAN_BR_PHASE1(value) ((CAN_BR_PHASE1_Msk & ((value) << CAN_BR_PHASE1_Pos)))
+#define CAN_BR_PROPAG_Pos 8
+#define CAN_BR_PROPAG_Msk (0x7u << CAN_BR_PROPAG_Pos) /**< \brief (CAN_BR) Programming time segment */
+#define CAN_BR_PROPAG(value) ((CAN_BR_PROPAG_Msk & ((value) << CAN_BR_PROPAG_Pos)))
+#define CAN_BR_SJW_Pos 12
+#define CAN_BR_SJW_Msk (0x3u << CAN_BR_SJW_Pos) /**< \brief (CAN_BR) Re-synchronization jump width */
+#define CAN_BR_SJW(value) ((CAN_BR_SJW_Msk & ((value) << CAN_BR_SJW_Pos)))
+#define CAN_BR_BRP_Pos 16
+#define CAN_BR_BRP_Msk (0x7fu << CAN_BR_BRP_Pos) /**< \brief (CAN_BR) Baudrate Prescaler. */
+#define CAN_BR_BRP(value) ((CAN_BR_BRP_Msk & ((value) << CAN_BR_BRP_Pos)))
+#define CAN_BR_SMP (0x1u << 24) /**< \brief (CAN_BR) Sampling Mode */
+#define CAN_BR_SMP_ONCE (0x0u << 24) /**< \brief (CAN_BR) The incoming bit stream is sampled once at sample point. */
+#define CAN_BR_SMP_THREE (0x1u << 24) /**< \brief (CAN_BR) The incoming bit stream is sampled three times with a period of a MCK clock period, centered on sample point. */
+/* -------- CAN_TIM : (CAN Offset: 0x0018) Timer Register -------- */
+#define CAN_TIM_TIMER0 (0x1u << 0) /**< \brief (CAN_TIM) Timer */
+#define CAN_TIM_TIMER1 (0x1u << 1) /**< \brief (CAN_TIM) Timer */
+#define CAN_TIM_TIMER2 (0x1u << 2) /**< \brief (CAN_TIM) Timer */
+#define CAN_TIM_TIMER3 (0x1u << 3) /**< \brief (CAN_TIM) Timer */
+#define CAN_TIM_TIMER4 (0x1u << 4) /**< \brief (CAN_TIM) Timer */
+#define CAN_TIM_TIMER5 (0x1u << 5) /**< \brief (CAN_TIM) Timer */
+#define CAN_TIM_TIMER6 (0x1u << 6) /**< \brief (CAN_TIM) Timer */
+#define CAN_TIM_TIMER7 (0x1u << 7) /**< \brief (CAN_TIM) Timer */
+/* -------- CAN_TIMESTP : (CAN Offset: 0x001C) Timestamp Register -------- */
+#define CAN_TIMESTP_MTIMESTAMP0 (0x1u << 0) /**< \brief (CAN_TIMESTP) Timestamp */
+#define CAN_TIMESTP_MTIMESTAMP1 (0x1u << 1) /**< \brief (CAN_TIMESTP) Timestamp */
+#define CAN_TIMESTP_MTIMESTAMP2 (0x1u << 2) /**< \brief (CAN_TIMESTP) Timestamp */
+#define CAN_TIMESTP_MTIMESTAMP3 (0x1u << 3) /**< \brief (CAN_TIMESTP) Timestamp */
+#define CAN_TIMESTP_MTIMESTAMP4 (0x1u << 4) /**< \brief (CAN_TIMESTP) Timestamp */
+#define CAN_TIMESTP_MTIMESTAMP5 (0x1u << 5) /**< \brief (CAN_TIMESTP) Timestamp */
+#define CAN_TIMESTP_MTIMESTAMP6 (0x1u << 6) /**< \brief (CAN_TIMESTP) Timestamp */
+#define CAN_TIMESTP_MTIMESTAMP7 (0x1u << 7) /**< \brief (CAN_TIMESTP) Timestamp */
+/* -------- CAN_ECR : (CAN Offset: 0x0020) Error Counter Register -------- */
+#define CAN_ECR_REC_Pos 0
+#define CAN_ECR_REC_Msk (0xffu << CAN_ECR_REC_Pos) /**< \brief (CAN_ECR) Receive Error Counter */
+#define CAN_ECR_TEC_Pos 16
+#define CAN_ECR_TEC_Msk (0xffu << CAN_ECR_TEC_Pos) /**< \brief (CAN_ECR) Transmit Error Counter */
+/* -------- CAN_TCR : (CAN Offset: 0x0024) Transfer Command Register -------- */
+#define CAN_TCR_MB0 (0x1u << 0) /**< \brief (CAN_TCR) Transfer Request for Mailbox 0 */
+#define CAN_TCR_MB1 (0x1u << 1) /**< \brief (CAN_TCR) Transfer Request for Mailbox 1 */
+#define CAN_TCR_MB2 (0x1u << 2) /**< \brief (CAN_TCR) Transfer Request for Mailbox 2 */
+#define CAN_TCR_MB3 (0x1u << 3) /**< \brief (CAN_TCR) Transfer Request for Mailbox 3 */
+#define CAN_TCR_MB4 (0x1u << 4) /**< \brief (CAN_TCR) Transfer Request for Mailbox 4 */
+#define CAN_TCR_MB5 (0x1u << 5) /**< \brief (CAN_TCR) Transfer Request for Mailbox 5 */
+#define CAN_TCR_MB6 (0x1u << 6) /**< \brief (CAN_TCR) Transfer Request for Mailbox 6 */
+#define CAN_TCR_MB7 (0x1u << 7) /**< \brief (CAN_TCR) Transfer Request for Mailbox 7 */
+#define CAN_TCR_TIMRST (0x1u << 31) /**< \brief (CAN_TCR) Timer Reset */
+/* -------- CAN_ACR : (CAN Offset: 0x0028) Abort Command Register -------- */
+#define CAN_ACR_MB0 (0x1u << 0) /**< \brief (CAN_ACR) Abort Request for Mailbox 0 */
+#define CAN_ACR_MB1 (0x1u << 1) /**< \brief (CAN_ACR) Abort Request for Mailbox 1 */
+#define CAN_ACR_MB2 (0x1u << 2) /**< \brief (CAN_ACR) Abort Request for Mailbox 2 */
+#define CAN_ACR_MB3 (0x1u << 3) /**< \brief (CAN_ACR) Abort Request for Mailbox 3 */
+#define CAN_ACR_MB4 (0x1u << 4) /**< \brief (CAN_ACR) Abort Request for Mailbox 4 */
+#define CAN_ACR_MB5 (0x1u << 5) /**< \brief (CAN_ACR) Abort Request for Mailbox 5 */
+#define CAN_ACR_MB6 (0x1u << 6) /**< \brief (CAN_ACR) Abort Request for Mailbox 6 */
+#define CAN_ACR_MB7 (0x1u << 7) /**< \brief (CAN_ACR) Abort Request for Mailbox 7 */
+/* -------- CAN_MMR : (CAN Offset: N/A) Mailbox Mode Register -------- */
+#define CAN_MMR_MTIMEMARK0 (0x1u << 0) /**< \brief (CAN_MMR) Mailbox Timemark */
+#define CAN_MMR_MTIMEMARK1 (0x1u << 1) /**< \brief (CAN_MMR) Mailbox Timemark */
+#define CAN_MMR_MTIMEMARK2 (0x1u << 2) /**< \brief (CAN_MMR) Mailbox Timemark */
+#define CAN_MMR_MTIMEMARK3 (0x1u << 3) /**< \brief (CAN_MMR) Mailbox Timemark */
+#define CAN_MMR_MTIMEMARK4 (0x1u << 4) /**< \brief (CAN_MMR) Mailbox Timemark */
+#define CAN_MMR_MTIMEMARK5 (0x1u << 5) /**< \brief (CAN_MMR) Mailbox Timemark */
+#define CAN_MMR_MTIMEMARK6 (0x1u << 6) /**< \brief (CAN_MMR) Mailbox Timemark */
+#define CAN_MMR_MTIMEMARK7 (0x1u << 7) /**< \brief (CAN_MMR) Mailbox Timemark */
+#define CAN_MMR_PRIOR_Pos 16
+#define CAN_MMR_PRIOR_Msk (0xfu << CAN_MMR_PRIOR_Pos) /**< \brief (CAN_MMR) Mailbox Priority */
+#define CAN_MMR_PRIOR(value) ((CAN_MMR_PRIOR_Msk & ((value) << CAN_MMR_PRIOR_Pos)))
+#define CAN_MMR_MOT_Pos 24
+#define CAN_MMR_MOT_Msk (0x7u << CAN_MMR_MOT_Pos) /**< \brief (CAN_MMR) Mailbox Object Type */
+#define CAN_MMR_MOT_MB_DISABLED (0x0u << 24) /**< \brief (CAN_MMR) Mailbox is disabled. This prevents receiving or transmitting any messages with this mailbox. */
+#define CAN_MMR_MOT_MB_RX (0x1u << 24) /**< \brief (CAN_MMR) Reception Mailbox. Mailbox is configured for reception. If a message is received while the mailbox data register is full, it is discarded. */
+#define CAN_MMR_MOT_MB_RX_OVERWRITE (0x2u << 24) /**< \brief (CAN_MMR) Reception mailbox with overwrite. Mailbox is configured for reception. If a message is received while the mailbox is full, it overwrites the previous message. */
+#define CAN_MMR_MOT_MB_TX (0x3u << 24) /**< \brief (CAN_MMR) Transmit mailbox. Mailbox is configured for transmission. */
+#define CAN_MMR_MOT_MB_CONSUMER (0x4u << 24) /**< \brief (CAN_MMR) Consumer Mailbox. Mailbox is configured in reception but behaves as a Transmit Mailbox, i.e., it sends a remote frame and waits for an answer. */
+#define CAN_MMR_MOT_MB_PRODUCER (0x5u << 24) /**< \brief (CAN_MMR) Producer Mailbox. Mailbox is configured in transmission but also behaves like a reception mailbox, i.e., it waits to receive a Remote Frame before sending its contents. */
+/* -------- CAN_MAM : (CAN Offset: N/A) Mailbox Acceptance Mask Register -------- */
+#define CAN_MAM_MIDvB_Pos 0
+#define CAN_MAM_MIDvB_Msk (0x3ffffu << CAN_MAM_MIDvB_Pos) /**< \brief (CAN_MAM) Complementary bits for identifier in extended frame mode */
+#define CAN_MAM_MIDvB(value) ((CAN_MAM_MIDvB_Msk & ((value) << CAN_MAM_MIDvB_Pos)))
+#define CAN_MAM_MIDvA_Pos 18
+#define CAN_MAM_MIDvA_Msk (0x7ffu << CAN_MAM_MIDvA_Pos) /**< \brief (CAN_MAM) Identifier for standard frame mode */
+#define CAN_MAM_MIDvA(value) ((CAN_MAM_MIDvA_Msk & ((value) << CAN_MAM_MIDvA_Pos)))
+#define CAN_MAM_MIDE (0x1u << 29) /**< \brief (CAN_MAM) Identifier Version */
+/* -------- CAN_MID : (CAN Offset: N/A) Mailbox ID Register -------- */
+#define CAN_MID_MIDvB_Pos 0
+#define CAN_MID_MIDvB_Msk (0x3ffffu << CAN_MID_MIDvB_Pos) /**< \brief (CAN_MID) Complementary bits for identifier in extended frame mode */
+#define CAN_MID_MIDvB(value) ((CAN_MID_MIDvB_Msk & ((value) << CAN_MID_MIDvB_Pos)))
+#define CAN_MID_MIDvA_Pos 18
+#define CAN_MID_MIDvA_Msk (0x7ffu << CAN_MID_MIDvA_Pos) /**< \brief (CAN_MID) Identifier for standard frame mode */
+#define CAN_MID_MIDvA(value) ((CAN_MID_MIDvA_Msk & ((value) << CAN_MID_MIDvA_Pos)))
+#define CAN_MID_MIDE (0x1u << 29) /**< \brief (CAN_MID) Identifier Version */
+/* -------- CAN_MFID : (CAN Offset: N/A) Mailbox Family ID Register -------- */
+#define CAN_MFID_MFID_Pos 0
+#define CAN_MFID_MFID_Msk (0x1fffffffu << CAN_MFID_MFID_Pos) /**< \brief (CAN_MFID) Family ID */
+/* -------- CAN_MSR : (CAN Offset: N/A) Mailbox Status Register -------- */
+#define CAN_MSR_MTIMESTAMP0 (0x1u << 0) /**< \brief (CAN_MSR) Timer value */
+#define CAN_MSR_MTIMESTAMP1 (0x1u << 1) /**< \brief (CAN_MSR) Timer value */
+#define CAN_MSR_MTIMESTAMP2 (0x1u << 2) /**< \brief (CAN_MSR) Timer value */
+#define CAN_MSR_MTIMESTAMP3 (0x1u << 3) /**< \brief (CAN_MSR) Timer value */
+#define CAN_MSR_MTIMESTAMP4 (0x1u << 4) /**< \brief (CAN_MSR) Timer value */
+#define CAN_MSR_MTIMESTAMP5 (0x1u << 5) /**< \brief (CAN_MSR) Timer value */
+#define CAN_MSR_MTIMESTAMP6 (0x1u << 6) /**< \brief (CAN_MSR) Timer value */
+#define CAN_MSR_MTIMESTAMP7 (0x1u << 7) /**< \brief (CAN_MSR) Timer value */
+#define CAN_MSR_MDLC_Pos 16
+#define CAN_MSR_MDLC_Msk (0xfu << CAN_MSR_MDLC_Pos) /**< \brief (CAN_MSR) Mailbox Data Length Code */
+#define CAN_MSR_MRTR (0x1u << 20) /**< \brief (CAN_MSR) Mailbox Remote Transmission Request */
+#define CAN_MSR_MABT (0x1u << 22) /**< \brief (CAN_MSR) Mailbox Message Abort */
+#define CAN_MSR_MRDY (0x1u << 23) /**< \brief (CAN_MSR) Mailbox Ready */
+#define CAN_MSR_MMI (0x1u << 24) /**< \brief (CAN_MSR) Mailbox Message Ignored */
+/* -------- CAN_MDL : (CAN Offset: N/A) Mailbox Data Low Register -------- */
+#define CAN_MDL_MDL_Pos 0
+#define CAN_MDL_MDL_Msk (0xffffffffu << CAN_MDL_MDL_Pos) /**< \brief (CAN_MDL) Message Data Low Value */
+#define CAN_MDL_MDL(value) ((CAN_MDL_MDL_Msk & ((value) << CAN_MDL_MDL_Pos)))
+/* -------- CAN_MDH : (CAN Offset: N/A) Mailbox Data High Register -------- */
+#define CAN_MDH_MDH_Pos 0
+#define CAN_MDH_MDH_Msk (0xffffffffu << CAN_MDH_MDH_Pos) /**< \brief (CAN_MDH) Message Data High Value */
+#define CAN_MDH_MDH(value) ((CAN_MDH_MDH_Msk & ((value) << CAN_MDH_MDH_Pos)))
+/* -------- CAN_MCR : (CAN Offset: N/A) Mailbox Control Register -------- */
+#define CAN_MCR_MDLC_Pos 16
+#define CAN_MCR_MDLC_Msk (0xfu << CAN_MCR_MDLC_Pos) /**< \brief (CAN_MCR) Mailbox Data Length Code */
+#define CAN_MCR_MDLC(value) ((CAN_MCR_MDLC_Msk & ((value) << CAN_MCR_MDLC_Pos)))
+#define CAN_MCR_MRTR (0x1u << 20) /**< \brief (CAN_MCR) Mailbox Remote Transmission Request */
+#define CAN_MCR_MACR (0x1u << 22) /**< \brief (CAN_MCR) Abort Request for Mailbox x */
+#define CAN_MCR_MTCR (0x1u << 23) /**< \brief (CAN_MCR) Mailbox Transfer Command */
+
+/*@}*/
+
+/* ============================================================================= */
+/** SOFTWARE API DEFINITION FOR Chip Identifier */
+/* ============================================================================= */
+/** \addtogroup SAM3XA_CHIPID Chip Identifier */
+/*@{*/
+
+#ifndef __ASSEMBLY__
+/** \brief Chipid hardware registers */
+typedef struct {
+ RoReg CHIPID_CIDR; /**< \brief (Chipid Offset: 0x0) Chip ID Register */
+ RoReg CHIPID_EXID; /**< \brief (Chipid Offset: 0x4) Chip ID Extension Register */
+} Chipid;
+#endif /* __ASSEMBLY__ */
+/* -------- CHIPID_CIDR : (CHIPID Offset: 0x0) Chip ID Register -------- */
+#define CHIPID_CIDR_VERSION_Pos 0
+#define CHIPID_CIDR_VERSION_Msk (0x1fu << CHIPID_CIDR_VERSION_Pos) /**< \brief (CHIPID_CIDR) Version of the Device */
+#define CHIPID_CIDR_EPROC_Pos 5
+#define CHIPID_CIDR_EPROC_Msk (0x7u << CHIPID_CIDR_EPROC_Pos) /**< \brief (CHIPID_CIDR) Embedded Processor */
+#define CHIPID_CIDR_EPROC_ARM946ES (0x1u << 5) /**< \brief (CHIPID_CIDR) ARM946ES */
+#define CHIPID_CIDR_EPROC_ARM7TDMI (0x2u << 5) /**< \brief (CHIPID_CIDR) ARM7TDMI */
+#define CHIPID_CIDR_EPROC_CM3 (0x3u << 5) /**< \brief (CHIPID_CIDR) Cortex-M3 */
+#define CHIPID_CIDR_EPROC_ARM920T (0x4u << 5) /**< \brief (CHIPID_CIDR) ARM920T */
+#define CHIPID_CIDR_EPROC_ARM926EJS (0x5u << 5) /**< \brief (CHIPID_CIDR) ARM926EJS */
+#define CHIPID_CIDR_EPROC_CA5 (0x6u << 5) /**< \brief (CHIPID_CIDR) Cortex-A5 */
+#define CHIPID_CIDR_EPROC_CM4 (0x7u << 5) /**< \brief (CHIPID_CIDR) Cortex-M4 */
+#define CHIPID_CIDR_NVPSIZ_Pos 8
+#define CHIPID_CIDR_NVPSIZ_Msk (0xfu << CHIPID_CIDR_NVPSIZ_Pos) /**< \brief (CHIPID_CIDR) Nonvolatile Program Memory Size */
+#define CHIPID_CIDR_NVPSIZ_NONE (0x0u << 8) /**< \brief (CHIPID_CIDR) None */
+#define CHIPID_CIDR_NVPSIZ_8K (0x1u << 8) /**< \brief (CHIPID_CIDR) 8K bytes */
+#define CHIPID_CIDR_NVPSIZ_16K (0x2u << 8) /**< \brief (CHIPID_CIDR) 16K bytes */
+#define CHIPID_CIDR_NVPSIZ_32K (0x3u << 8) /**< \brief (CHIPID_CIDR) 32K bytes */
+#define CHIPID_CIDR_NVPSIZ_64K (0x5u << 8) /**< \brief (CHIPID_CIDR) 64K bytes */
+#define CHIPID_CIDR_NVPSIZ_128K (0x7u << 8) /**< \brief (CHIPID_CIDR) 128K bytes */
+#define CHIPID_CIDR_NVPSIZ_256K (0x9u << 8) /**< \brief (CHIPID_CIDR) 256K bytes */
+#define CHIPID_CIDR_NVPSIZ_512K (0xAu << 8) /**< \brief (CHIPID_CIDR) 512K bytes */
+#define CHIPID_CIDR_NVPSIZ_1024K (0xCu << 8) /**< \brief (CHIPID_CIDR) 1024K bytes */
+#define CHIPID_CIDR_NVPSIZ_2048K (0xEu << 8) /**< \brief (CHIPID_CIDR) 2048K bytes */
+#define CHIPID_CIDR_NVPSIZ2_Pos 12
+#define CHIPID_CIDR_NVPSIZ2_Msk (0xfu << CHIPID_CIDR_NVPSIZ2_Pos) /**< \brief (CHIPID_CIDR) */
+#define CHIPID_CIDR_NVPSIZ2_NONE (0x0u << 12) /**< \brief (CHIPID_CIDR) None */
+#define CHIPID_CIDR_NVPSIZ2_8K (0x1u << 12) /**< \brief (CHIPID_CIDR) 8K bytes */
+#define CHIPID_CIDR_NVPSIZ2_16K (0x2u << 12) /**< \brief (CHIPID_CIDR) 16K bytes */
+#define CHIPID_CIDR_NVPSIZ2_32K (0x3u << 12) /**< \brief (CHIPID_CIDR) 32K bytes */
+#define CHIPID_CIDR_NVPSIZ2_64K (0x5u << 12) /**< \brief (CHIPID_CIDR) 64K bytes */
+#define CHIPID_CIDR_NVPSIZ2_128K (0x7u << 12) /**< \brief (CHIPID_CIDR) 128K bytes */
+#define CHIPID_CIDR_NVPSIZ2_256K (0x9u << 12) /**< \brief (CHIPID_CIDR) 256K bytes */
+#define CHIPID_CIDR_NVPSIZ2_512K (0xAu << 12) /**< \brief (CHIPID_CIDR) 512K bytes */
+#define CHIPID_CIDR_NVPSIZ2_1024K (0xCu << 12) /**< \brief (CHIPID_CIDR) 1024K bytes */
+#define CHIPID_CIDR_NVPSIZ2_2048K (0xEu << 12) /**< \brief (CHIPID_CIDR) 2048K bytes */
+#define CHIPID_CIDR_SRAMSIZ_Pos 16
+#define CHIPID_CIDR_SRAMSIZ_Msk (0xfu << CHIPID_CIDR_SRAMSIZ_Pos) /**< \brief (CHIPID_CIDR) Internal SRAM Size */
+#define CHIPID_CIDR_SRAMSIZ_48K (0x0u << 16) /**< \brief (CHIPID_CIDR) 48K bytes */
+#define CHIPID_CIDR_SRAMSIZ_1K (0x1u << 16) /**< \brief (CHIPID_CIDR) 1K bytes */
+#define CHIPID_CIDR_SRAMSIZ_2K (0x2u << 16) /**< \brief (CHIPID_CIDR) 2K bytes */
+#define CHIPID_CIDR_SRAMSIZ_6K (0x3u << 16) /**< \brief (CHIPID_CIDR) 6K bytes */
+#define CHIPID_CIDR_SRAMSIZ_24K (0x4u << 16) /**< \brief (CHIPID_CIDR) 24K bytes */
+#define CHIPID_CIDR_SRAMSIZ_4K (0x5u << 16) /**< \brief (CHIPID_CIDR) 4K bytes */
+#define CHIPID_CIDR_SRAMSIZ_80K (0x6u << 16) /**< \brief (CHIPID_CIDR) 80K bytes */
+#define CHIPID_CIDR_SRAMSIZ_160K (0x7u << 16) /**< \brief (CHIPID_CIDR) 160K bytes */
+#define CHIPID_CIDR_SRAMSIZ_8K (0x8u << 16) /**< \brief (CHIPID_CIDR) 8K bytes */
+#define CHIPID_CIDR_SRAMSIZ_16K (0x9u << 16) /**< \brief (CHIPID_CIDR) 16K bytes */
+#define CHIPID_CIDR_SRAMSIZ_32K (0xAu << 16) /**< \brief (CHIPID_CIDR) 32K bytes */
+#define CHIPID_CIDR_SRAMSIZ_64K (0xBu << 16) /**< \brief (CHIPID_CIDR) 64K bytes */
+#define CHIPID_CIDR_SRAMSIZ_128K (0xCu << 16) /**< \brief (CHIPID_CIDR) 128K bytes */
+#define CHIPID_CIDR_SRAMSIZ_256K (0xDu << 16) /**< \brief (CHIPID_CIDR) 256K bytes */
+#define CHIPID_CIDR_SRAMSIZ_96K (0xEu << 16) /**< \brief (CHIPID_CIDR) 96K bytes */
+#define CHIPID_CIDR_SRAMSIZ_512K (0xFu << 16) /**< \brief (CHIPID_CIDR) 512K bytes */
+#define CHIPID_CIDR_ARCH_Pos 20
+#define CHIPID_CIDR_ARCH_Msk (0xffu << CHIPID_CIDR_ARCH_Pos) /**< \brief (CHIPID_CIDR) Architecture Identifier */
+#define CHIPID_CIDR_ARCH_AT91SAM9xx (0x19u << 20) /**< \brief (CHIPID_CIDR) AT91SAM9xx Series */
+#define CHIPID_CIDR_ARCH_AT91SAM9XExx (0x29u << 20) /**< \brief (CHIPID_CIDR) AT91SAM9XExx Series */
+#define CHIPID_CIDR_ARCH_AT91x34 (0x34u << 20) /**< \brief (CHIPID_CIDR) AT91x34 Series */
+#define CHIPID_CIDR_ARCH_CAP7 (0x37u << 20) /**< \brief (CHIPID_CIDR) CAP7 Series */
+#define CHIPID_CIDR_ARCH_CAP9 (0x39u << 20) /**< \brief (CHIPID_CIDR) CAP9 Series */
+#define CHIPID_CIDR_ARCH_CAP11 (0x3Bu << 20) /**< \brief (CHIPID_CIDR) CAP11 Series */
+#define CHIPID_CIDR_ARCH_AT91x40 (0x40u << 20) /**< \brief (CHIPID_CIDR) AT91x40 Series */
+#define CHIPID_CIDR_ARCH_AT91x42 (0x42u << 20) /**< \brief (CHIPID_CIDR) AT91x42 Series */
+#define CHIPID_CIDR_ARCH_AT91x55 (0x55u << 20) /**< \brief (CHIPID_CIDR) AT91x55 Series */
+#define CHIPID_CIDR_ARCH_AT91SAM7Axx (0x60u << 20) /**< \brief (CHIPID_CIDR) AT91SAM7Axx Series */
+#define CHIPID_CIDR_ARCH_AT91SAM7AQxx (0x61u << 20) /**< \brief (CHIPID_CIDR) AT91SAM7AQxx Series */
+#define CHIPID_CIDR_ARCH_AT91x63 (0x63u << 20) /**< \brief (CHIPID_CIDR) AT91x63 Series */
+#define CHIPID_CIDR_ARCH_AT91SAM7Sxx (0x70u << 20) /**< \brief (CHIPID_CIDR) AT91SAM7Sxx Series */
+#define CHIPID_CIDR_ARCH_AT91SAM7XCxx (0x71u << 20) /**< \brief (CHIPID_CIDR) AT91SAM7XCxx Series */
+#define CHIPID_CIDR_ARCH_AT91SAM7SExx (0x72u << 20) /**< \brief (CHIPID_CIDR) AT91SAM7SExx Series */
+#define CHIPID_CIDR_ARCH_AT91SAM7Lxx (0x73u << 20) /**< \brief (CHIPID_CIDR) AT91SAM7Lxx Series */
+#define CHIPID_CIDR_ARCH_AT91SAM7Xxx (0x75u << 20) /**< \brief (CHIPID_CIDR) AT91SAM7Xxx Series */
+#define CHIPID_CIDR_ARCH_AT91SAM7SLxx (0x76u << 20) /**< \brief (CHIPID_CIDR) AT91SAM7SLxx Series */
+#define CHIPID_CIDR_ARCH_SAM3UxC (0x80u << 20) /**< \brief (CHIPID_CIDR) SAM3UxC Series (100-pin version) */
+#define CHIPID_CIDR_ARCH_SAM3UxE (0x81u << 20) /**< \brief (CHIPID_CIDR) SAM3UxE Series (144-pin version) */
+#define CHIPID_CIDR_ARCH_SAM3AxC (0x83u << 20) /**< \brief (CHIPID_CIDR) SAM3AxC Series (100-pin version) */
+#define CHIPID_CIDR_ARCH_SAM3XxC (0x84u << 20) /**< \brief (CHIPID_CIDR) SAM3XxC Series (100-pin version) */
+#define CHIPID_CIDR_ARCH_SAM3XxE (0x85u << 20) /**< \brief (CHIPID_CIDR) SAM3XxE Series (144-pin version) */
+#define CHIPID_CIDR_ARCH_SAM3XxG (0x86u << 20) /**< \brief (CHIPID_CIDR) SAM3XxG Series (208/217-pin version) */
+#define CHIPID_CIDR_ARCH_SAM3SxA (0x88u << 20) /**< \brief (CHIPID_CIDR) SAM3SxA Series (48-pin version) */
+#define CHIPID_CIDR_ARCH_SAM3SxB (0x89u << 20) /**< \brief (CHIPID_CIDR) SAM3SxB Series (64-pin version) */
+#define CHIPID_CIDR_ARCH_SAM3SxC (0x8Au << 20) /**< \brief (CHIPID_CIDR) SAM3SxC Series (100-pin version) */
+#define CHIPID_CIDR_ARCH_AT91x92 (0x92u << 20) /**< \brief (CHIPID_CIDR) AT91x92 Series */
+#define CHIPID_CIDR_ARCH_SAM3NxA (0x93u << 20) /**< \brief (CHIPID_CIDR) SAM3NxA Series (48-pin version) */
+#define CHIPID_CIDR_ARCH_SAM3NxB (0x94u << 20) /**< \brief (CHIPID_CIDR) SAM3NxB Series (64-pin version) */
+#define CHIPID_CIDR_ARCH_SAM3NxC (0x95u << 20) /**< \brief (CHIPID_CIDR) SAM3NxC Series (100-pin version) */
+#define CHIPID_CIDR_ARCH_SAM3SDxA (0x98u << 20) /**< \brief (CHIPID_CIDR) SAM3SDxA Series (48-pin version) */
+#define CHIPID_CIDR_ARCH_SAM3SDxB (0x99u << 20) /**< \brief (CHIPID_CIDR) SAM3SDxB Series (64-pin version) */
+#define CHIPID_CIDR_ARCH_SAM3SDxC (0x9Au << 20) /**< \brief (CHIPID_CIDR) SAM3SDxC Series (100-pin version) */
+#define CHIPID_CIDR_ARCH_SAM5A (0xA5u << 20) /**< \brief (CHIPID_CIDR) SAM5A */
+#define CHIPID_CIDR_ARCH_AT75Cxx (0xF0u << 20) /**< \brief (CHIPID_CIDR) AT75Cxx Series */
+#define CHIPID_CIDR_NVPTYP_Pos 28
+#define CHIPID_CIDR_NVPTYP_Msk (0x7u << CHIPID_CIDR_NVPTYP_Pos) /**< \brief (CHIPID_CIDR) Nonvolatile Program Memory Type */
+#define CHIPID_CIDR_NVPTYP_ROM (0x0u << 28) /**< \brief (CHIPID_CIDR) ROM */
+#define CHIPID_CIDR_NVPTYP_ROMLESS (0x1u << 28) /**< \brief (CHIPID_CIDR) ROMless or on-chip Flash */
+#define CHIPID_CIDR_NVPTYP_FLASH (0x2u << 28) /**< \brief (CHIPID_CIDR) Embedded Flash Memory */
+#define CHIPID_CIDR_NVPTYP_ROM_FLASH (0x3u << 28) /**< \brief (CHIPID_CIDR) ROM and Embedded Flash MemoryNVPSIZ is ROM size NVPSIZ2 is Flash size */
+#define CHIPID_CIDR_NVPTYP_SRAM (0x4u << 28) /**< \brief (CHIPID_CIDR) SRAM emulating ROM */
+#define CHIPID_CIDR_EXT (0x1u << 31) /**< \brief (CHIPID_CIDR) Extension Flag */
+/* -------- CHIPID_EXID : (CHIPID Offset: 0x4) Chip ID Extension Register -------- */
+#define CHIPID_EXID_EXID_Pos 0
+#define CHIPID_EXID_EXID_Msk (0xffffffffu << CHIPID_EXID_EXID_Pos) /**< \brief (CHIPID_EXID) Chip ID Extension */
+
+/*@}*/
+
+/* ============================================================================= */
+/** SOFTWARE API DEFINITION FOR Digital-to-Analog Converter Controller */
+/* ============================================================================= */
+/** \addtogroup SAM3XA_DACC Digital-to-Analog Converter Controller */
+/*@{*/
+
+#ifndef __ASSEMBLY__
+/** \brief Dacc hardware registers */
+typedef struct {
+ WoReg DACC_CR; /**< \brief (Dacc Offset: 0x00) Control Register */
+ RwReg DACC_MR; /**< \brief (Dacc Offset: 0x04) Mode Register */
+ RoReg Reserved1[2];
+ WoReg DACC_CHER; /**< \brief (Dacc Offset: 0x10) Channel Enable Register */
+ WoReg DACC_CHDR; /**< \brief (Dacc Offset: 0x14) Channel Disable Register */
+ RoReg DACC_CHSR; /**< \brief (Dacc Offset: 0x18) Channel Status Register */
+ RoReg Reserved2[1];
+ WoReg DACC_CDR; /**< \brief (Dacc Offset: 0x20) Conversion Data Register */
+ WoReg DACC_IER; /**< \brief (Dacc Offset: 0x24) Interrupt Enable Register */
+ WoReg DACC_IDR; /**< \brief (Dacc Offset: 0x28) Interrupt Disable Register */
+ RoReg DACC_IMR; /**< \brief (Dacc Offset: 0x2C) Interrupt Mask Register */
+ RoReg DACC_ISR; /**< \brief (Dacc Offset: 0x30) Interrupt Status Register */
+ RoReg Reserved3[24];
+ RwReg DACC_ACR; /**< \brief (Dacc Offset: 0x94) Analog Current Register */
+ RoReg Reserved4[19];
+ RwReg DACC_WPMR; /**< \brief (Dacc Offset: 0xE4) Write Protect Mode register */
+ RoReg DACC_WPSR; /**< \brief (Dacc Offset: 0xE8) Write Protect Status register */
+ RoReg Reserved5[5];
+ RwReg DACC_RPR; /**< \brief (Dacc Offset: 0x100) Receive Pointer Register */
+ RwReg DACC_RCR; /**< \brief (Dacc Offset: 0x104) Receive Counter Register */
+ RwReg DACC_TPR; /**< \brief (Dacc Offset: 0x108) Transmit Pointer Register */
+ RwReg DACC_TCR; /**< \brief (Dacc Offset: 0x10C) Transmit Counter Register */
+ RwReg DACC_RNPR; /**< \brief (Dacc Offset: 0x110) Receive Next Pointer Register */
+ RwReg DACC_RNCR; /**< \brief (Dacc Offset: 0x114) Receive Next Counter Register */
+ RwReg DACC_TNPR; /**< \brief (Dacc Offset: 0x118) Transmit Next Pointer Register */
+ RwReg DACC_TNCR; /**< \brief (Dacc Offset: 0x11C) Transmit Next Counter Register */
+ WoReg DACC_PTCR; /**< \brief (Dacc Offset: 0x120) Transfer Control Register */
+ RoReg DACC_PTSR; /**< \brief (Dacc Offset: 0x124) Transfer Status Register */
+} Dacc;
+#endif /* __ASSEMBLY__ */
+/* -------- DACC_CR : (DACC Offset: 0x00) Control Register -------- */
+#define DACC_CR_SWRST (0x1u << 0) /**< \brief (DACC_CR) Software Reset */
+/* -------- DACC_MR : (DACC Offset: 0x04) Mode Register -------- */
+#define DACC_MR_TRGEN (0x1u << 0) /**< \brief (DACC_MR) Trigger Enable */
+#define DACC_MR_TRGEN_DIS (0x0u << 0) /**< \brief (DACC_MR) External trigger mode disabled. DACC in free running mode. */
+#define DACC_MR_TRGEN_EN (0x1u << 0) /**< \brief (DACC_MR) External trigger mode enabled. */
+#define DACC_MR_TRGSEL_Pos 1
+#define DACC_MR_TRGSEL_Msk (0x7u << DACC_MR_TRGSEL_Pos) /**< \brief (DACC_MR) Trigger Selection */
+#define DACC_MR_TRGSEL(value) ((DACC_MR_TRGSEL_Msk & ((value) << DACC_MR_TRGSEL_Pos)))
+#define DACC_MR_WORD (0x1u << 4) /**< \brief (DACC_MR) Word Transfer */
+#define DACC_MR_WORD_HALF (0x0u << 4) /**< \brief (DACC_MR) Half-Word transfer */
+#define DACC_MR_WORD_WORD (0x1u << 4) /**< \brief (DACC_MR) Word Transfer */
+#define DACC_MR_SLEEP (0x1u << 5) /**< \brief (DACC_MR) Sleep Mode */
+#define DACC_MR_FASTWKUP (0x1u << 6) /**< \brief (DACC_MR) Fast Wake up Mode */
+#define DACC_MR_REFRESH_Pos 8
+#define DACC_MR_REFRESH_Msk (0xffu << DACC_MR_REFRESH_Pos) /**< \brief (DACC_MR) Refresh Period */
+#define DACC_MR_REFRESH(value) ((DACC_MR_REFRESH_Msk & ((value) << DACC_MR_REFRESH_Pos)))
+#define DACC_MR_USER_SEL_Pos 16
+#define DACC_MR_USER_SEL_Msk (0x3u << DACC_MR_USER_SEL_Pos) /**< \brief (DACC_MR) User Channel Selection */
+#define DACC_MR_USER_SEL_CHANNEL0 (0x0u << 16) /**< \brief (DACC_MR) Channel 0 */
+#define DACC_MR_USER_SEL_CHANNEL1 (0x1u << 16) /**< \brief (DACC_MR) Channel 1 */
+#define DACC_MR_TAG (0x1u << 20) /**< \brief (DACC_MR) Tag Selection Mode */
+#define DACC_MR_TAG_DIS (0x0u << 20) /**< \brief (DACC_MR) Tag selection mode disabled. Using USER_SEL to select the channel for the conversion. */
+#define DACC_MR_TAG_EN (0x1u << 20) /**< \brief (DACC_MR) Tag selection mode enabled */
+#define DACC_MR_MAXS (0x1u << 21) /**< \brief (DACC_MR) Max Speed Mode */
+#define DACC_MR_STARTUP_Pos 24
+#define DACC_MR_STARTUP_Msk (0x3fu << DACC_MR_STARTUP_Pos) /**< \brief (DACC_MR) Startup Time Selection */
+#define DACC_MR_STARTUP_0 (0x0u << 24) /**< \brief (DACC_MR) 0 periods of DACClock */
+#define DACC_MR_STARTUP_8 (0x1u << 24) /**< \brief (DACC_MR) 8 periods of DACClock */
+#define DACC_MR_STARTUP_16 (0x2u << 24) /**< \brief (DACC_MR) 16 periods of DACClock */
+#define DACC_MR_STARTUP_24 (0x3u << 24) /**< \brief (DACC_MR) 24 periods of DACClock */
+#define DACC_MR_STARTUP_64 (0x4u << 24) /**< \brief (DACC_MR) 64 periods of DACClock */
+#define DACC_MR_STARTUP_80 (0x5u << 24) /**< \brief (DACC_MR) 80 periods of DACClock */
+#define DACC_MR_STARTUP_96 (0x6u << 24) /**< \brief (DACC_MR) 96 periods of DACClock */
+#define DACC_MR_STARTUP_112 (0x7u << 24) /**< \brief (DACC_MR) 112 periods of DACClock */
+#define DACC_MR_STARTUP_512 (0x8u << 24) /**< \brief (DACC_MR) 512 periods of DACClock */
+#define DACC_MR_STARTUP_576 (0x9u << 24) /**< \brief (DACC_MR) 576 periods of DACClock */
+#define DACC_MR_STARTUP_640 (0xAu << 24) /**< \brief (DACC_MR) 640 periods of DACClock */
+#define DACC_MR_STARTUP_704 (0xBu << 24) /**< \brief (DACC_MR) 704 periods of DACClock */
+#define DACC_MR_STARTUP_768 (0xCu << 24) /**< \brief (DACC_MR) 768 periods of DACClock */
+#define DACC_MR_STARTUP_832 (0xDu << 24) /**< \brief (DACC_MR) 832 periods of DACClock */
+#define DACC_MR_STARTUP_896 (0xEu << 24) /**< \brief (DACC_MR) 896 periods of DACClock */
+#define DACC_MR_STARTUP_960 (0xFu << 24) /**< \brief (DACC_MR) 960 periods of DACClock */
+#define DACC_MR_STARTUP_1024 (0x10u << 24) /**< \brief (DACC_MR) 1024 periods of DACClock */
+#define DACC_MR_STARTUP_1088 (0x11u << 24) /**< \brief (DACC_MR) 1088 periods of DACClock */
+#define DACC_MR_STARTUP_1152 (0x12u << 24) /**< \brief (DACC_MR) 1152 periods of DACClock */
+#define DACC_MR_STARTUP_1216 (0x13u << 24) /**< \brief (DACC_MR) 1216 periods of DACClock */
+#define DACC_MR_STARTUP_1280 (0x14u << 24) /**< \brief (DACC_MR) 1280 periods of DACClock */
+#define DACC_MR_STARTUP_1344 (0x15u << 24) /**< \brief (DACC_MR) 1344 periods of DACClock */
+#define DACC_MR_STARTUP_1408 (0x16u << 24) /**< \brief (DACC_MR) 1408 periods of DACClock */
+#define DACC_MR_STARTUP_1472 (0x17u << 24) /**< \brief (DACC_MR) 1472 periods of DACClock */
+#define DACC_MR_STARTUP_1536 (0x18u << 24) /**< \brief (DACC_MR) 1536 periods of DACClock */
+#define DACC_MR_STARTUP_1600 (0x19u << 24) /**< \brief (DACC_MR) 1600 periods of DACClock */
+#define DACC_MR_STARTUP_1664 (0x1Au << 24) /**< \brief (DACC_MR) 1664 periods of DACClock */
+#define DACC_MR_STARTUP_1728 (0x1Bu << 24) /**< \brief (DACC_MR) 1728 periods of DACClock */
+#define DACC_MR_STARTUP_1792 (0x1Cu << 24) /**< \brief (DACC_MR) 1792 periods of DACClock */
+#define DACC_MR_STARTUP_1856 (0x1Du << 24) /**< \brief (DACC_MR) 1856 periods of DACClock */
+#define DACC_MR_STARTUP_1920 (0x1Eu << 24) /**< \brief (DACC_MR) 1920 periods of DACClock */
+#define DACC_MR_STARTUP_1984 (0x1Fu << 24) /**< \brief (DACC_MR) 1984 periods of DACClock */
+/* -------- DACC_CHER : (DACC Offset: 0x10) Channel Enable Register -------- */
+#define DACC_CHER_CH0 (0x1u << 0) /**< \brief (DACC_CHER) Channel 0 Enable */
+#define DACC_CHER_CH1 (0x1u << 1) /**< \brief (DACC_CHER) Channel 1 Enable */
+/* -------- DACC_CHDR : (DACC Offset: 0x14) Channel Disable Register -------- */
+#define DACC_CHDR_CH0 (0x1u << 0) /**< \brief (DACC_CHDR) Channel 0 Disable */
+#define DACC_CHDR_CH1 (0x1u << 1) /**< \brief (DACC_CHDR) Channel 1 Disable */
+/* -------- DACC_CHSR : (DACC Offset: 0x18) Channel Status Register -------- */
+#define DACC_CHSR_CH0 (0x1u << 0) /**< \brief (DACC_CHSR) Channel 0 Status */
+#define DACC_CHSR_CH1 (0x1u << 1) /**< \brief (DACC_CHSR) Channel 1 Status */
+/* -------- DACC_CDR : (DACC Offset: 0x20) Conversion Data Register -------- */
+#define DACC_CDR_DATA_Pos 0
+#define DACC_CDR_DATA_Msk (0xffffffffu << DACC_CDR_DATA_Pos) /**< \brief (DACC_CDR) Data to Convert */
+#define DACC_CDR_DATA(value) ((DACC_CDR_DATA_Msk & ((value) << DACC_CDR_DATA_Pos)))
+/* -------- DACC_IER : (DACC Offset: 0x24) Interrupt Enable Register -------- */
+#define DACC_IER_TXRDY (0x1u << 0) /**< \brief (DACC_IER) Transmit Ready Interrupt Enable */
+#define DACC_IER_EOC (0x1u << 1) /**< \brief (DACC_IER) End of Conversion Interrupt Enable */
+#define DACC_IER_ENDTX (0x1u << 2) /**< \brief (DACC_IER) End of Transmit Buffer Interrupt Enable */
+#define DACC_IER_TXBUFE (0x1u << 3) /**< \brief (DACC_IER) Transmit Buffer Empty Interrupt Enable */
+/* -------- DACC_IDR : (DACC Offset: 0x28) Interrupt Disable Register -------- */
+#define DACC_IDR_TXRDY (0x1u << 0) /**< \brief (DACC_IDR) Transmit Ready Interrupt Disable. */
+#define DACC_IDR_EOC (0x1u << 1) /**< \brief (DACC_IDR) End of Conversion Interrupt Disable */
+#define DACC_IDR_ENDTX (0x1u << 2) /**< \brief (DACC_IDR) End of Transmit Buffer Interrupt Disable */
+#define DACC_IDR_TXBUFE (0x1u << 3) /**< \brief (DACC_IDR) Transmit Buffer Empty Interrupt Disable */
+/* -------- DACC_IMR : (DACC Offset: 0x2C) Interrupt Mask Register -------- */
+#define DACC_IMR_TXRDY (0x1u << 0) /**< \brief (DACC_IMR) Transmit Ready Interrupt Mask */
+#define DACC_IMR_EOC (0x1u << 1) /**< \brief (DACC_IMR) End of Conversion Interrupt Mask */
+#define DACC_IMR_ENDTX (0x1u << 2) /**< \brief (DACC_IMR) End of Transmit Buffer Interrupt Mask */
+#define DACC_IMR_TXBUFE (0x1u << 3) /**< \brief (DACC_IMR) Transmit Buffer Empty Interrupt Mask */
+/* -------- DACC_ISR : (DACC Offset: 0x30) Interrupt Status Register -------- */
+#define DACC_ISR_TXRDY (0x1u << 0) /**< \brief (DACC_ISR) Transmit Ready Interrupt Flag */
+#define DACC_ISR_EOC (0x1u << 1) /**< \brief (DACC_ISR) End of Conversion Interrupt Flag */
+#define DACC_ISR_ENDTX (0x1u << 2) /**< \brief (DACC_ISR) End of DMA Interrupt Flag */
+#define DACC_ISR_TXBUFE (0x1u << 3) /**< \brief (DACC_ISR) Transmit Buffer Empty */
+/* -------- DACC_ACR : (DACC Offset: 0x94) Analog Current Register -------- */
+#define DACC_ACR_IBCTLCH0_Pos 0
+#define DACC_ACR_IBCTLCH0_Msk (0x3u << DACC_ACR_IBCTLCH0_Pos) /**< \brief (DACC_ACR) Analog Output Current Control */
+#define DACC_ACR_IBCTLCH0(value) ((DACC_ACR_IBCTLCH0_Msk & ((value) << DACC_ACR_IBCTLCH0_Pos)))
+#define DACC_ACR_IBCTLCH1_Pos 2
+#define DACC_ACR_IBCTLCH1_Msk (0x3u << DACC_ACR_IBCTLCH1_Pos) /**< \brief (DACC_ACR) Analog Output Current Control */
+#define DACC_ACR_IBCTLCH1(value) ((DACC_ACR_IBCTLCH1_Msk & ((value) << DACC_ACR_IBCTLCH1_Pos)))
+#define DACC_ACR_IBCTLDACCORE_Pos 8
+#define DACC_ACR_IBCTLDACCORE_Msk (0x3u << DACC_ACR_IBCTLDACCORE_Pos) /**< \brief (DACC_ACR) Bias Current Control for DAC Core */
+#define DACC_ACR_IBCTLDACCORE(value) ((DACC_ACR_IBCTLDACCORE_Msk & ((value) << DACC_ACR_IBCTLDACCORE_Pos)))
+/* -------- DACC_WPMR : (DACC Offset: 0xE4) Write Protect Mode register -------- */
+#define DACC_WPMR_WPEN (0x1u << 0) /**< \brief (DACC_WPMR) Write Protect Enable */
+#define DACC_WPMR_WPKEY_Pos 8
+#define DACC_WPMR_WPKEY_Msk (0xffffffu << DACC_WPMR_WPKEY_Pos) /**< \brief (DACC_WPMR) Write Protect KEY */
+#define DACC_WPMR_WPKEY(value) ((DACC_WPMR_WPKEY_Msk & ((value) << DACC_WPMR_WPKEY_Pos)))
+/* -------- DACC_WPSR : (DACC Offset: 0xE8) Write Protect Status register -------- */
+#define DACC_WPSR_WPROTERR (0x1u << 0) /**< \brief (DACC_WPSR) Write protection error */
+#define DACC_WPSR_WPROTADDR_Pos 8
+#define DACC_WPSR_WPROTADDR_Msk (0xffu << DACC_WPSR_WPROTADDR_Pos) /**< \brief (DACC_WPSR) Write protection error address */
+/* -------- DACC_RPR : (DACC Offset: 0x100) Receive Pointer Register -------- */
+#define DACC_RPR_RXPTR_Pos 0
+#define DACC_RPR_RXPTR_Msk (0xffffffffu << DACC_RPR_RXPTR_Pos) /**< \brief (DACC_RPR) Receive Pointer Register */
+#define DACC_RPR_RXPTR(value) ((DACC_RPR_RXPTR_Msk & ((value) << DACC_RPR_RXPTR_Pos)))
+/* -------- DACC_RCR : (DACC Offset: 0x104) Receive Counter Register -------- */
+#define DACC_RCR_RXCTR_Pos 0
+#define DACC_RCR_RXCTR_Msk (0xffffu << DACC_RCR_RXCTR_Pos) /**< \brief (DACC_RCR) Receive Counter Register */
+#define DACC_RCR_RXCTR(value) ((DACC_RCR_RXCTR_Msk & ((value) << DACC_RCR_RXCTR_Pos)))
+/* -------- DACC_TPR : (DACC Offset: 0x108) Transmit Pointer Register -------- */
+#define DACC_TPR_TXPTR_Pos 0
+#define DACC_TPR_TXPTR_Msk (0xffffffffu << DACC_TPR_TXPTR_Pos) /**< \brief (DACC_TPR) Transmit Counter Register */
+#define DACC_TPR_TXPTR(value) ((DACC_TPR_TXPTR_Msk & ((value) << DACC_TPR_TXPTR_Pos)))
+/* -------- DACC_TCR : (DACC Offset: 0x10C) Transmit Counter Register -------- */
+#define DACC_TCR_TXCTR_Pos 0
+#define DACC_TCR_TXCTR_Msk (0xffffu << DACC_TCR_TXCTR_Pos) /**< \brief (DACC_TCR) Transmit Counter Register */
+#define DACC_TCR_TXCTR(value) ((DACC_TCR_TXCTR_Msk & ((value) << DACC_TCR_TXCTR_Pos)))
+/* -------- DACC_RNPR : (DACC Offset: 0x110) Receive Next Pointer Register -------- */
+#define DACC_RNPR_RXNPTR_Pos 0
+#define DACC_RNPR_RXNPTR_Msk (0xffffffffu << DACC_RNPR_RXNPTR_Pos) /**< \brief (DACC_RNPR) Receive Next Pointer */
+#define DACC_RNPR_RXNPTR(value) ((DACC_RNPR_RXNPTR_Msk & ((value) << DACC_RNPR_RXNPTR_Pos)))
+/* -------- DACC_RNCR : (DACC Offset: 0x114) Receive Next Counter Register -------- */
+#define DACC_RNCR_RXNCTR_Pos 0
+#define DACC_RNCR_RXNCTR_Msk (0xffffu << DACC_RNCR_RXNCTR_Pos) /**< \brief (DACC_RNCR) Receive Next Counter */
+#define DACC_RNCR_RXNCTR(value) ((DACC_RNCR_RXNCTR_Msk & ((value) << DACC_RNCR_RXNCTR_Pos)))
+/* -------- DACC_TNPR : (DACC Offset: 0x118) Transmit Next Pointer Register -------- */
+#define DACC_TNPR_TXNPTR_Pos 0
+#define DACC_TNPR_TXNPTR_Msk (0xffffffffu << DACC_TNPR_TXNPTR_Pos) /**< \brief (DACC_TNPR) Transmit Next Pointer */
+#define DACC_TNPR_TXNPTR(value) ((DACC_TNPR_TXNPTR_Msk & ((value) << DACC_TNPR_TXNPTR_Pos)))
+/* -------- DACC_TNCR : (DACC Offset: 0x11C) Transmit Next Counter Register -------- */
+#define DACC_TNCR_TXNCTR_Pos 0
+#define DACC_TNCR_TXNCTR_Msk (0xffffu << DACC_TNCR_TXNCTR_Pos) /**< \brief (DACC_TNCR) Transmit Counter Next */
+#define DACC_TNCR_TXNCTR(value) ((DACC_TNCR_TXNCTR_Msk & ((value) << DACC_TNCR_TXNCTR_Pos)))
+/* -------- DACC_PTCR : (DACC Offset: 0x120) Transfer Control Register -------- */
+#define DACC_PTCR_RXTEN (0x1u << 0) /**< \brief (DACC_PTCR) Receiver Transfer Enable */
+#define DACC_PTCR_RXTDIS (0x1u << 1) /**< \brief (DACC_PTCR) Receiver Transfer Disable */
+#define DACC_PTCR_TXTEN (0x1u << 8) /**< \brief (DACC_PTCR) Transmitter Transfer Enable */
+#define DACC_PTCR_TXTDIS (0x1u << 9) /**< \brief (DACC_PTCR) Transmitter Transfer Disable */
+/* -------- DACC_PTSR : (DACC Offset: 0x124) Transfer Status Register -------- */
+#define DACC_PTSR_RXTEN (0x1u << 0) /**< \brief (DACC_PTSR) Receiver Transfer Enable */
+#define DACC_PTSR_TXTEN (0x1u << 8) /**< \brief (DACC_PTSR) Transmitter Transfer Enable */
+
+/*@}*/
+
+/* ============================================================================= */
+/** SOFTWARE API DEFINITION FOR DMA Controller */
+/* ============================================================================= */
+/** \addtogroup SAM3XA_DMAC DMA Controller */
+/*@{*/
+
+#ifndef __ASSEMBLY__
+/** \brief DmacCh_num hardware registers */
+typedef struct {
+ RwReg DMAC_SADDR; /**< \brief (DmacCh_num Offset: 0x0) DMAC Channel Source Address Register */
+ RwReg DMAC_DADDR; /**< \brief (DmacCh_num Offset: 0x4) DMAC Channel Destination Address Register */
+ RwReg DMAC_DSCR; /**< \brief (DmacCh_num Offset: 0x8) DMAC Channel Descriptor Address Register */
+ RwReg DMAC_CTRLA; /**< \brief (DmacCh_num Offset: 0xC) DMAC Channel Control A Register */
+ RwReg DMAC_CTRLB; /**< \brief (DmacCh_num Offset: 0x10) DMAC Channel Control B Register */
+ RwReg DMAC_CFG; /**< \brief (DmacCh_num Offset: 0x14) DMAC Channel Configuration Register */
+ RoReg Reserved1[4];
+} DmacCh_num;
+/** \brief Dmac hardware registers */
+#define DMACCH_NUM_NUMBER 6
+typedef struct {
+ RwReg DMAC_GCFG; /**< \brief (Dmac Offset: 0x000) DMAC Global Configuration Register */
+ RwReg DMAC_EN; /**< \brief (Dmac Offset: 0x004) DMAC Enable Register */
+ RwReg DMAC_SREQ; /**< \brief (Dmac Offset: 0x008) DMAC Software Single Request Register */
+ RwReg DMAC_CREQ; /**< \brief (Dmac Offset: 0x00C) DMAC Software Chunk Transfer Request Register */
+ RwReg DMAC_LAST; /**< \brief (Dmac Offset: 0x010) DMAC Software Last Transfer Flag Register */
+ RoReg Reserved1[1];
+ WoReg DMAC_EBCIER; /**< \brief (Dmac Offset: 0x018) DMAC Error, Chained Buffer Transfer Completed Interrupt and Buffer Transfer Completed Interrupt Enable register. */
+ WoReg DMAC_EBCIDR; /**< \brief (Dmac Offset: 0x01C) DMAC Error, Chained Buffer Transfer Completed Interrupt and Buffer Transfer Completed Interrupt Disable register. */
+ RoReg DMAC_EBCIMR; /**< \brief (Dmac Offset: 0x020) DMAC Error, Chained Buffer Transfer Completed Interrupt and Buffer transfer completed Mask Register. */
+ RoReg DMAC_EBCISR; /**< \brief (Dmac Offset: 0x024) DMAC Error, Chained Buffer Transfer Completed Interrupt and Buffer transfer completed Status Register. */
+ WoReg DMAC_CHER; /**< \brief (Dmac Offset: 0x028) DMAC Channel Handler Enable Register */
+ WoReg DMAC_CHDR; /**< \brief (Dmac Offset: 0x02C) DMAC Channel Handler Disable Register */
+ RoReg DMAC_CHSR; /**< \brief (Dmac Offset: 0x030) DMAC Channel Handler Status Register */
+ RoReg Reserved2[2];
+ DmacCh_num DMAC_CH_NUM[DMACCH_NUM_NUMBER]; /**< \brief (Dmac Offset: 0x3C) ch_num = 0 .. 5 */
+ RoReg Reserved3[46];
+ RwReg DMAC_WPMR; /**< \brief (Dmac Offset: 0x1E4) DMAC Write Protect Mode Register */
+ RoReg DMAC_WPSR; /**< \brief (Dmac Offset: 0x1E8) DMAC Write Protect Status Register */
+} Dmac;
+#endif /* __ASSEMBLY__ */
+/* -------- DMAC_GCFG : (DMAC Offset: 0x000) DMAC Global Configuration Register -------- */
+#define DMAC_GCFG_ARB_CFG (0x1u << 4) /**< \brief (DMAC_GCFG) Arbiter Configuration */
+#define DMAC_GCFG_ARB_CFG_FIXED (0x0u << 4) /**< \brief (DMAC_GCFG) Fixed priority arbiter. */
+#define DMAC_GCFG_ARB_CFG_ROUND_ROBIN (0x1u << 4) /**< \brief (DMAC_GCFG) Modified round robin arbiter. */
+/* -------- DMAC_EN : (DMAC Offset: 0x004) DMAC Enable Register -------- */
+#define DMAC_EN_ENABLE (0x1u << 0) /**< \brief (DMAC_EN) */
+/* -------- DMAC_SREQ : (DMAC Offset: 0x008) DMAC Software Single Request Register -------- */
+#define DMAC_SREQ_SSREQ0 (0x1u << 0) /**< \brief (DMAC_SREQ) Source Request */
+#define DMAC_SREQ_DSREQ0 (0x1u << 1) /**< \brief (DMAC_SREQ) Destination Request */
+#define DMAC_SREQ_SSREQ1 (0x1u << 2) /**< \brief (DMAC_SREQ) Source Request */
+#define DMAC_SREQ_DSREQ1 (0x1u << 3) /**< \brief (DMAC_SREQ) Destination Request */
+#define DMAC_SREQ_SSREQ2 (0x1u << 4) /**< \brief (DMAC_SREQ) Source Request */
+#define DMAC_SREQ_DSREQ2 (0x1u << 5) /**< \brief (DMAC_SREQ) Destination Request */
+#define DMAC_SREQ_SSREQ3 (0x1u << 6) /**< \brief (DMAC_SREQ) Source Request */
+#define DMAC_SREQ_DSREQ3 (0x1u << 7) /**< \brief (DMAC_SREQ) Destination Request */
+#define DMAC_SREQ_SSREQ4 (0x1u << 8) /**< \brief (DMAC_SREQ) Source Request */
+#define DMAC_SREQ_DSREQ4 (0x1u << 9) /**< \brief (DMAC_SREQ) Destination Request */
+#define DMAC_SREQ_SSREQ5 (0x1u << 10) /**< \brief (DMAC_SREQ) Source Request */
+#define DMAC_SREQ_DSREQ5 (0x1u << 11) /**< \brief (DMAC_SREQ) Destination Request */
+/* -------- DMAC_CREQ : (DMAC Offset: 0x00C) DMAC Software Chunk Transfer Request Register -------- */
+#define DMAC_CREQ_SCREQ0 (0x1u << 0) /**< \brief (DMAC_CREQ) Source Chunk Request */
+#define DMAC_CREQ_DCREQ0 (0x1u << 1) /**< \brief (DMAC_CREQ) Destination Chunk Request */
+#define DMAC_CREQ_SCREQ1 (0x1u << 2) /**< \brief (DMAC_CREQ) Source Chunk Request */
+#define DMAC_CREQ_DCREQ1 (0x1u << 3) /**< \brief (DMAC_CREQ) Destination Chunk Request */
+#define DMAC_CREQ_SCREQ2 (0x1u << 4) /**< \brief (DMAC_CREQ) Source Chunk Request */
+#define DMAC_CREQ_DCREQ2 (0x1u << 5) /**< \brief (DMAC_CREQ) Destination Chunk Request */
+#define DMAC_CREQ_SCREQ3 (0x1u << 6) /**< \brief (DMAC_CREQ) Source Chunk Request */
+#define DMAC_CREQ_DCREQ3 (0x1u << 7) /**< \brief (DMAC_CREQ) Destination Chunk Request */
+#define DMAC_CREQ_SCREQ4 (0x1u << 8) /**< \brief (DMAC_CREQ) Source Chunk Request */
+#define DMAC_CREQ_DCREQ4 (0x1u << 9) /**< \brief (DMAC_CREQ) Destination Chunk Request */
+#define DMAC_CREQ_SCREQ5 (0x1u << 10) /**< \brief (DMAC_CREQ) Source Chunk Request */
+#define DMAC_CREQ_DCREQ5 (0x1u << 11) /**< \brief (DMAC_CREQ) Destination Chunk Request */
+/* -------- DMAC_LAST : (DMAC Offset: 0x010) DMAC Software Last Transfer Flag Register -------- */
+#define DMAC_LAST_SLAST0 (0x1u << 0) /**< \brief (DMAC_LAST) Source Last */
+#define DMAC_LAST_DLAST0 (0x1u << 1) /**< \brief (DMAC_LAST) Destination Last */
+#define DMAC_LAST_SLAST1 (0x1u << 2) /**< \brief (DMAC_LAST) Source Last */
+#define DMAC_LAST_DLAST1 (0x1u << 3) /**< \brief (DMAC_LAST) Destination Last */
+#define DMAC_LAST_SLAST2 (0x1u << 4) /**< \brief (DMAC_LAST) Source Last */
+#define DMAC_LAST_DLAST2 (0x1u << 5) /**< \brief (DMAC_LAST) Destination Last */
+#define DMAC_LAST_SLAST3 (0x1u << 6) /**< \brief (DMAC_LAST) Source Last */
+#define DMAC_LAST_DLAST3 (0x1u << 7) /**< \brief (DMAC_LAST) Destination Last */
+#define DMAC_LAST_SLAST4 (0x1u << 8) /**< \brief (DMAC_LAST) Source Last */
+#define DMAC_LAST_DLAST4 (0x1u << 9) /**< \brief (DMAC_LAST) Destination Last */
+#define DMAC_LAST_SLAST5 (0x1u << 10) /**< \brief (DMAC_LAST) Source Last */
+#define DMAC_LAST_DLAST5 (0x1u << 11) /**< \brief (DMAC_LAST) Destination Last */
+/* -------- DMAC_EBCIER : (DMAC Offset: 0x018) DMAC Error, Chained Buffer Transfer Completed Interrupt and Buffer Transfer Completed Interrupt Enable register. -------- */
+#define DMAC_EBCIER_BTC0 (0x1u << 0) /**< \brief (DMAC_EBCIER) Buffer Transfer Completed [5:0] */
+#define DMAC_EBCIER_BTC1 (0x1u << 1) /**< \brief (DMAC_EBCIER) Buffer Transfer Completed [5:0] */
+#define DMAC_EBCIER_BTC2 (0x1u << 2) /**< \brief (DMAC_EBCIER) Buffer Transfer Completed [5:0] */
+#define DMAC_EBCIER_BTC3 (0x1u << 3) /**< \brief (DMAC_EBCIER) Buffer Transfer Completed [5:0] */
+#define DMAC_EBCIER_BTC4 (0x1u << 4) /**< \brief (DMAC_EBCIER) Buffer Transfer Completed [5:0] */
+#define DMAC_EBCIER_BTC5 (0x1u << 5) /**< \brief (DMAC_EBCIER) Buffer Transfer Completed [5:0] */
+#define DMAC_EBCIER_CBTC0 (0x1u << 8) /**< \brief (DMAC_EBCIER) Chained Buffer Transfer Completed [5:0] */
+#define DMAC_EBCIER_CBTC1 (0x1u << 9) /**< \brief (DMAC_EBCIER) Chained Buffer Transfer Completed [5:0] */
+#define DMAC_EBCIER_CBTC2 (0x1u << 10) /**< \brief (DMAC_EBCIER) Chained Buffer Transfer Completed [5:0] */
+#define DMAC_EBCIER_CBTC3 (0x1u << 11) /**< \brief (DMAC_EBCIER) Chained Buffer Transfer Completed [5:0] */
+#define DMAC_EBCIER_CBTC4 (0x1u << 12) /**< \brief (DMAC_EBCIER) Chained Buffer Transfer Completed [5:0] */
+#define DMAC_EBCIER_CBTC5 (0x1u << 13) /**< \brief (DMAC_EBCIER) Chained Buffer Transfer Completed [5:0] */
+#define DMAC_EBCIER_ERR0 (0x1u << 16) /**< \brief (DMAC_EBCIER) Access Error [5:0] */
+#define DMAC_EBCIER_ERR1 (0x1u << 17) /**< \brief (DMAC_EBCIER) Access Error [5:0] */
+#define DMAC_EBCIER_ERR2 (0x1u << 18) /**< \brief (DMAC_EBCIER) Access Error [5:0] */
+#define DMAC_EBCIER_ERR3 (0x1u << 19) /**< \brief (DMAC_EBCIER) Access Error [5:0] */
+#define DMAC_EBCIER_ERR4 (0x1u << 20) /**< \brief (DMAC_EBCIER) Access Error [5:0] */
+#define DMAC_EBCIER_ERR5 (0x1u << 21) /**< \brief (DMAC_EBCIER) Access Error [5:0] */
+/* -------- DMAC_EBCIDR : (DMAC Offset: 0x01C) DMAC Error, Chained Buffer Transfer Completed Interrupt and Buffer Transfer Completed Interrupt Disable register. -------- */
+#define DMAC_EBCIDR_BTC0 (0x1u << 0) /**< \brief (DMAC_EBCIDR) Buffer Transfer Completed [5:0] */
+#define DMAC_EBCIDR_BTC1 (0x1u << 1) /**< \brief (DMAC_EBCIDR) Buffer Transfer Completed [5:0] */
+#define DMAC_EBCIDR_BTC2 (0x1u << 2) /**< \brief (DMAC_EBCIDR) Buffer Transfer Completed [5:0] */
+#define DMAC_EBCIDR_BTC3 (0x1u << 3) /**< \brief (DMAC_EBCIDR) Buffer Transfer Completed [5:0] */
+#define DMAC_EBCIDR_BTC4 (0x1u << 4) /**< \brief (DMAC_EBCIDR) Buffer Transfer Completed [5:0] */
+#define DMAC_EBCIDR_BTC5 (0x1u << 5) /**< \brief (DMAC_EBCIDR) Buffer Transfer Completed [5:0] */
+#define DMAC_EBCIDR_CBTC0 (0x1u << 8) /**< \brief (DMAC_EBCIDR) Chained Buffer Transfer Completed [5:0] */
+#define DMAC_EBCIDR_CBTC1 (0x1u << 9) /**< \brief (DMAC_EBCIDR) Chained Buffer Transfer Completed [5:0] */
+#define DMAC_EBCIDR_CBTC2 (0x1u << 10) /**< \brief (DMAC_EBCIDR) Chained Buffer Transfer Completed [5:0] */
+#define DMAC_EBCIDR_CBTC3 (0x1u << 11) /**< \brief (DMAC_EBCIDR) Chained Buffer Transfer Completed [5:0] */
+#define DMAC_EBCIDR_CBTC4 (0x1u << 12) /**< \brief (DMAC_EBCIDR) Chained Buffer Transfer Completed [5:0] */
+#define DMAC_EBCIDR_CBTC5 (0x1u << 13) /**< \brief (DMAC_EBCIDR) Chained Buffer Transfer Completed [5:0] */
+#define DMAC_EBCIDR_ERR0 (0x1u << 16) /**< \brief (DMAC_EBCIDR) Access Error [5:0] */
+#define DMAC_EBCIDR_ERR1 (0x1u << 17) /**< \brief (DMAC_EBCIDR) Access Error [5:0] */
+#define DMAC_EBCIDR_ERR2 (0x1u << 18) /**< \brief (DMAC_EBCIDR) Access Error [5:0] */
+#define DMAC_EBCIDR_ERR3 (0x1u << 19) /**< \brief (DMAC_EBCIDR) Access Error [5:0] */
+#define DMAC_EBCIDR_ERR4 (0x1u << 20) /**< \brief (DMAC_EBCIDR) Access Error [5:0] */
+#define DMAC_EBCIDR_ERR5 (0x1u << 21) /**< \brief (DMAC_EBCIDR) Access Error [5:0] */
+/* -------- DMAC_EBCIMR : (DMAC Offset: 0x020) DMAC Error, Chained Buffer Transfer Completed Interrupt and Buffer transfer completed Mask Register. -------- */
+#define DMAC_EBCIMR_BTC0 (0x1u << 0) /**< \brief (DMAC_EBCIMR) Buffer Transfer Completed [5:0] */
+#define DMAC_EBCIMR_BTC1 (0x1u << 1) /**< \brief (DMAC_EBCIMR) Buffer Transfer Completed [5:0] */
+#define DMAC_EBCIMR_BTC2 (0x1u << 2) /**< \brief (DMAC_EBCIMR) Buffer Transfer Completed [5:0] */
+#define DMAC_EBCIMR_BTC3 (0x1u << 3) /**< \brief (DMAC_EBCIMR) Buffer Transfer Completed [5:0] */
+#define DMAC_EBCIMR_BTC4 (0x1u << 4) /**< \brief (DMAC_EBCIMR) Buffer Transfer Completed [5:0] */
+#define DMAC_EBCIMR_BTC5 (0x1u << 5) /**< \brief (DMAC_EBCIMR) Buffer Transfer Completed [5:0] */
+#define DMAC_EBCIMR_CBTC0 (0x1u << 8) /**< \brief (DMAC_EBCIMR) Chained Buffer Transfer Completed [5:0] */
+#define DMAC_EBCIMR_CBTC1 (0x1u << 9) /**< \brief (DMAC_EBCIMR) Chained Buffer Transfer Completed [5:0] */
+#define DMAC_EBCIMR_CBTC2 (0x1u << 10) /**< \brief (DMAC_EBCIMR) Chained Buffer Transfer Completed [5:0] */
+#define DMAC_EBCIMR_CBTC3 (0x1u << 11) /**< \brief (DMAC_EBCIMR) Chained Buffer Transfer Completed [5:0] */
+#define DMAC_EBCIMR_CBTC4 (0x1u << 12) /**< \brief (DMAC_EBCIMR) Chained Buffer Transfer Completed [5:0] */
+#define DMAC_EBCIMR_CBTC5 (0x1u << 13) /**< \brief (DMAC_EBCIMR) Chained Buffer Transfer Completed [5:0] */
+#define DMAC_EBCIMR_ERR0 (0x1u << 16) /**< \brief (DMAC_EBCIMR) Access Error [5:0] */
+#define DMAC_EBCIMR_ERR1 (0x1u << 17) /**< \brief (DMAC_EBCIMR) Access Error [5:0] */
+#define DMAC_EBCIMR_ERR2 (0x1u << 18) /**< \brief (DMAC_EBCIMR) Access Error [5:0] */
+#define DMAC_EBCIMR_ERR3 (0x1u << 19) /**< \brief (DMAC_EBCIMR) Access Error [5:0] */
+#define DMAC_EBCIMR_ERR4 (0x1u << 20) /**< \brief (DMAC_EBCIMR) Access Error [5:0] */
+#define DMAC_EBCIMR_ERR5 (0x1u << 21) /**< \brief (DMAC_EBCIMR) Access Error [5:0] */
+/* -------- DMAC_EBCISR : (DMAC Offset: 0x024) DMAC Error, Chained Buffer Transfer Completed Interrupt and Buffer transfer completed Status Register. -------- */
+#define DMAC_EBCISR_BTC0 (0x1u << 0) /**< \brief (DMAC_EBCISR) Buffer Transfer Completed [5:0] */
+#define DMAC_EBCISR_BTC1 (0x1u << 1) /**< \brief (DMAC_EBCISR) Buffer Transfer Completed [5:0] */
+#define DMAC_EBCISR_BTC2 (0x1u << 2) /**< \brief (DMAC_EBCISR) Buffer Transfer Completed [5:0] */
+#define DMAC_EBCISR_BTC3 (0x1u << 3) /**< \brief (DMAC_EBCISR) Buffer Transfer Completed [5:0] */
+#define DMAC_EBCISR_BTC4 (0x1u << 4) /**< \brief (DMAC_EBCISR) Buffer Transfer Completed [5:0] */
+#define DMAC_EBCISR_BTC5 (0x1u << 5) /**< \brief (DMAC_EBCISR) Buffer Transfer Completed [5:0] */
+#define DMAC_EBCISR_CBTC0 (0x1u << 8) /**< \brief (DMAC_EBCISR) Chained Buffer Transfer Completed [5:0] */
+#define DMAC_EBCISR_CBTC1 (0x1u << 9) /**< \brief (DMAC_EBCISR) Chained Buffer Transfer Completed [5:0] */
+#define DMAC_EBCISR_CBTC2 (0x1u << 10) /**< \brief (DMAC_EBCISR) Chained Buffer Transfer Completed [5:0] */
+#define DMAC_EBCISR_CBTC3 (0x1u << 11) /**< \brief (DMAC_EBCISR) Chained Buffer Transfer Completed [5:0] */
+#define DMAC_EBCISR_CBTC4 (0x1u << 12) /**< \brief (DMAC_EBCISR) Chained Buffer Transfer Completed [5:0] */
+#define DMAC_EBCISR_CBTC5 (0x1u << 13) /**< \brief (DMAC_EBCISR) Chained Buffer Transfer Completed [5:0] */
+#define DMAC_EBCISR_ERR0 (0x1u << 16) /**< \brief (DMAC_EBCISR) Access Error [5:0] */
+#define DMAC_EBCISR_ERR1 (0x1u << 17) /**< \brief (DMAC_EBCISR) Access Error [5:0] */
+#define DMAC_EBCISR_ERR2 (0x1u << 18) /**< \brief (DMAC_EBCISR) Access Error [5:0] */
+#define DMAC_EBCISR_ERR3 (0x1u << 19) /**< \brief (DMAC_EBCISR) Access Error [5:0] */
+#define DMAC_EBCISR_ERR4 (0x1u << 20) /**< \brief (DMAC_EBCISR) Access Error [5:0] */
+#define DMAC_EBCISR_ERR5 (0x1u << 21) /**< \brief (DMAC_EBCISR) Access Error [5:0] */
+/* -------- DMAC_CHER : (DMAC Offset: 0x028) DMAC Channel Handler Enable Register -------- */
+#define DMAC_CHER_ENA0 (0x1u << 0) /**< \brief (DMAC_CHER) Enable [5:0] */
+#define DMAC_CHER_ENA1 (0x1u << 1) /**< \brief (DMAC_CHER) Enable [5:0] */
+#define DMAC_CHER_ENA2 (0x1u << 2) /**< \brief (DMAC_CHER) Enable [5:0] */
+#define DMAC_CHER_ENA3 (0x1u << 3) /**< \brief (DMAC_CHER) Enable [5:0] */
+#define DMAC_CHER_ENA4 (0x1u << 4) /**< \brief (DMAC_CHER) Enable [5:0] */
+#define DMAC_CHER_ENA5 (0x1u << 5) /**< \brief (DMAC_CHER) Enable [5:0] */
+#define DMAC_CHER_SUSP0 (0x1u << 8) /**< \brief (DMAC_CHER) Suspend [5:0] */
+#define DMAC_CHER_SUSP1 (0x1u << 9) /**< \brief (DMAC_CHER) Suspend [5:0] */
+#define DMAC_CHER_SUSP2 (0x1u << 10) /**< \brief (DMAC_CHER) Suspend [5:0] */
+#define DMAC_CHER_SUSP3 (0x1u << 11) /**< \brief (DMAC_CHER) Suspend [5:0] */
+#define DMAC_CHER_SUSP4 (0x1u << 12) /**< \brief (DMAC_CHER) Suspend [5:0] */
+#define DMAC_CHER_SUSP5 (0x1u << 13) /**< \brief (DMAC_CHER) Suspend [5:0] */
+#define DMAC_CHER_KEEP0 (0x1u << 24) /**< \brief (DMAC_CHER) Keep on [5:0] */
+#define DMAC_CHER_KEEP1 (0x1u << 25) /**< \brief (DMAC_CHER) Keep on [5:0] */
+#define DMAC_CHER_KEEP2 (0x1u << 26) /**< \brief (DMAC_CHER) Keep on [5:0] */
+#define DMAC_CHER_KEEP3 (0x1u << 27) /**< \brief (DMAC_CHER) Keep on [5:0] */
+#define DMAC_CHER_KEEP4 (0x1u << 28) /**< \brief (DMAC_CHER) Keep on [5:0] */
+#define DMAC_CHER_KEEP5 (0x1u << 29) /**< \brief (DMAC_CHER) Keep on [5:0] */
+/* -------- DMAC_CHDR : (DMAC Offset: 0x02C) DMAC Channel Handler Disable Register -------- */
+#define DMAC_CHDR_DIS0 (0x1u << 0) /**< \brief (DMAC_CHDR) Disable [5:0] */
+#define DMAC_CHDR_DIS1 (0x1u << 1) /**< \brief (DMAC_CHDR) Disable [5:0] */
+#define DMAC_CHDR_DIS2 (0x1u << 2) /**< \brief (DMAC_CHDR) Disable [5:0] */
+#define DMAC_CHDR_DIS3 (0x1u << 3) /**< \brief (DMAC_CHDR) Disable [5:0] */
+#define DMAC_CHDR_DIS4 (0x1u << 4) /**< \brief (DMAC_CHDR) Disable [5:0] */
+#define DMAC_CHDR_DIS5 (0x1u << 5) /**< \brief (DMAC_CHDR) Disable [5:0] */
+#define DMAC_CHDR_RES0 (0x1u << 8) /**< \brief (DMAC_CHDR) Resume [5:0] */
+#define DMAC_CHDR_RES1 (0x1u << 9) /**< \brief (DMAC_CHDR) Resume [5:0] */
+#define DMAC_CHDR_RES2 (0x1u << 10) /**< \brief (DMAC_CHDR) Resume [5:0] */
+#define DMAC_CHDR_RES3 (0x1u << 11) /**< \brief (DMAC_CHDR) Resume [5:0] */
+#define DMAC_CHDR_RES4 (0x1u << 12) /**< \brief (DMAC_CHDR) Resume [5:0] */
+#define DMAC_CHDR_RES5 (0x1u << 13) /**< \brief (DMAC_CHDR) Resume [5:0] */
+/* -------- DMAC_CHSR : (DMAC Offset: 0x030) DMAC Channel Handler Status Register -------- */
+#define DMAC_CHSR_ENA0 (0x1u << 0) /**< \brief (DMAC_CHSR) Enable [5:0] */
+#define DMAC_CHSR_ENA1 (0x1u << 1) /**< \brief (DMAC_CHSR) Enable [5:0] */
+#define DMAC_CHSR_ENA2 (0x1u << 2) /**< \brief (DMAC_CHSR) Enable [5:0] */
+#define DMAC_CHSR_ENA3 (0x1u << 3) /**< \brief (DMAC_CHSR) Enable [5:0] */
+#define DMAC_CHSR_ENA4 (0x1u << 4) /**< \brief (DMAC_CHSR) Enable [5:0] */
+#define DMAC_CHSR_ENA5 (0x1u << 5) /**< \brief (DMAC_CHSR) Enable [5:0] */
+#define DMAC_CHSR_SUSP0 (0x1u << 8) /**< \brief (DMAC_CHSR) Suspend [5:0] */
+#define DMAC_CHSR_SUSP1 (0x1u << 9) /**< \brief (DMAC_CHSR) Suspend [5:0] */
+#define DMAC_CHSR_SUSP2 (0x1u << 10) /**< \brief (DMAC_CHSR) Suspend [5:0] */
+#define DMAC_CHSR_SUSP3 (0x1u << 11) /**< \brief (DMAC_CHSR) Suspend [5:0] */
+#define DMAC_CHSR_SUSP4 (0x1u << 12) /**< \brief (DMAC_CHSR) Suspend [5:0] */
+#define DMAC_CHSR_SUSP5 (0x1u << 13) /**< \brief (DMAC_CHSR) Suspend [5:0] */
+#define DMAC_CHSR_EMPT0 (0x1u << 16) /**< \brief (DMAC_CHSR) Empty [5:0] */
+#define DMAC_CHSR_EMPT1 (0x1u << 17) /**< \brief (DMAC_CHSR) Empty [5:0] */
+#define DMAC_CHSR_EMPT2 (0x1u << 18) /**< \brief (DMAC_CHSR) Empty [5:0] */
+#define DMAC_CHSR_EMPT3 (0x1u << 19) /**< \brief (DMAC_CHSR) Empty [5:0] */
+#define DMAC_CHSR_EMPT4 (0x1u << 20) /**< \brief (DMAC_CHSR) Empty [5:0] */
+#define DMAC_CHSR_EMPT5 (0x1u << 21) /**< \brief (DMAC_CHSR) Empty [5:0] */
+#define DMAC_CHSR_STAL0 (0x1u << 24) /**< \brief (DMAC_CHSR) Stalled [5:0] */
+#define DMAC_CHSR_STAL1 (0x1u << 25) /**< \brief (DMAC_CHSR) Stalled [5:0] */
+#define DMAC_CHSR_STAL2 (0x1u << 26) /**< \brief (DMAC_CHSR) Stalled [5:0] */
+#define DMAC_CHSR_STAL3 (0x1u << 27) /**< \brief (DMAC_CHSR) Stalled [5:0] */
+#define DMAC_CHSR_STAL4 (0x1u << 28) /**< \brief (DMAC_CHSR) Stalled [5:0] */
+#define DMAC_CHSR_STAL5 (0x1u << 29) /**< \brief (DMAC_CHSR) Stalled [5:0] */
+/* -------- DMAC_SADDR : (DMAC Offset: N/A) DMAC Channel Source Address Register -------- */
+#define DMAC_SADDR_SADDR_Pos 0
+#define DMAC_SADDR_SADDR_Msk (0xffffffffu << DMAC_SADDR_SADDR_Pos) /**< \brief (DMAC_SADDR) Channel x Source Address */
+#define DMAC_SADDR_SADDR(value) ((DMAC_SADDR_SADDR_Msk & ((value) << DMAC_SADDR_SADDR_Pos)))
+/* -------- DMAC_DADDR : (DMAC Offset: N/A) DMAC Channel Destination Address Register -------- */
+#define DMAC_DADDR_DADDR_Pos 0
+#define DMAC_DADDR_DADDR_Msk (0xffffffffu << DMAC_DADDR_DADDR_Pos) /**< \brief (DMAC_DADDR) Channel x Destination Address */
+#define DMAC_DADDR_DADDR(value) ((DMAC_DADDR_DADDR_Msk & ((value) << DMAC_DADDR_DADDR_Pos)))
+/* -------- DMAC_DSCR : (DMAC Offset: N/A) DMAC Channel Descriptor Address Register -------- */
+#define DMAC_DSCR_DSCR_Pos 2
+#define DMAC_DSCR_DSCR_Msk (0x3fffffffu << DMAC_DSCR_DSCR_Pos) /**< \brief (DMAC_DSCR) Buffer Transfer Descriptor Address */
+#define DMAC_DSCR_DSCR(value) ((DMAC_DSCR_DSCR_Msk & ((value) << DMAC_DSCR_DSCR_Pos)))
+/* -------- DMAC_CTRLA : (DMAC Offset: N/A) DMAC Channel Control A Register -------- */
+#define DMAC_CTRLA_BTSIZE_Pos 0
+#define DMAC_CTRLA_BTSIZE_Msk (0xffffu << DMAC_CTRLA_BTSIZE_Pos) /**< \brief (DMAC_CTRLA) Buffer Transfer Size */
+#define DMAC_CTRLA_BTSIZE(value) ((DMAC_CTRLA_BTSIZE_Msk & ((value) << DMAC_CTRLA_BTSIZE_Pos)))
+#define DMAC_CTRLA_SCSIZE_Pos 16
+#define DMAC_CTRLA_SCSIZE_Msk (0x7u << DMAC_CTRLA_SCSIZE_Pos) /**< \brief (DMAC_CTRLA) Source Chunk Transfer Size. */
+#define DMAC_CTRLA_SCSIZE_CHK_1 (0x0u << 16) /**< \brief (DMAC_CTRLA) 1 data transferred */
+#define DMAC_CTRLA_SCSIZE_CHK_4 (0x1u << 16) /**< \brief (DMAC_CTRLA) 4 data transferred */
+#define DMAC_CTRLA_SCSIZE_CHK_8 (0x2u << 16) /**< \brief (DMAC_CTRLA) 8 data transferred */
+#define DMAC_CTRLA_SCSIZE_CHK_16 (0x3u << 16) /**< \brief (DMAC_CTRLA) 16 data transferred */
+#define DMAC_CTRLA_SCSIZE_CHK_32 (0x4u << 16) /**< \brief (DMAC_CTRLA) 32 data transferred */
+#define DMAC_CTRLA_SCSIZE_CHK_64 (0x5u << 16) /**< \brief (DMAC_CTRLA) 64 data transferred */
+#define DMAC_CTRLA_SCSIZE_CHK_128 (0x6u << 16) /**< \brief (DMAC_CTRLA) 128 data transferred */
+#define DMAC_CTRLA_SCSIZE_CHK_256 (0x7u << 16) /**< \brief (DMAC_CTRLA) 256 data transferred */
+#define DMAC_CTRLA_DCSIZE_Pos 20
+#define DMAC_CTRLA_DCSIZE_Msk (0x7u << DMAC_CTRLA_DCSIZE_Pos) /**< \brief (DMAC_CTRLA) Destination Chunk Transfer Size */
+#define DMAC_CTRLA_DCSIZE_CHK_1 (0x0u << 20) /**< \brief (DMAC_CTRLA) 1 data transferred */
+#define DMAC_CTRLA_DCSIZE_CHK_4 (0x1u << 20) /**< \brief (DMAC_CTRLA) 4 data transferred */
+#define DMAC_CTRLA_DCSIZE_CHK_8 (0x2u << 20) /**< \brief (DMAC_CTRLA) 8 data transferred */
+#define DMAC_CTRLA_DCSIZE_CHK_16 (0x3u << 20) /**< \brief (DMAC_CTRLA) 16 data transferred */
+#define DMAC_CTRLA_DCSIZE_CHK_32 (0x4u << 20) /**< \brief (DMAC_CTRLA) 32 data transferred */
+#define DMAC_CTRLA_DCSIZE_CHK_64 (0x5u << 20) /**< \brief (DMAC_CTRLA) 64 data transferred */
+#define DMAC_CTRLA_DCSIZE_CHK_128 (0x6u << 20) /**< \brief (DMAC_CTRLA) 128 data transferred */
+#define DMAC_CTRLA_DCSIZE_CHK_256 (0x7u << 20) /**< \brief (DMAC_CTRLA) 256 data transferred */
+#define DMAC_CTRLA_SRC_WIDTH_Pos 24
+#define DMAC_CTRLA_SRC_WIDTH_Msk (0x3u << DMAC_CTRLA_SRC_WIDTH_Pos) /**< \brief (DMAC_CTRLA) Transfer Width for the Source */
+#define DMAC_CTRLA_SRC_WIDTH_BYTE (0x0u << 24) /**< \brief (DMAC_CTRLA) the transfer size is set to 8-bit width */
+#define DMAC_CTRLA_SRC_WIDTH_HALF_WORD (0x1u << 24) /**< \brief (DMAC_CTRLA) the transfer size is set to 16-bit width */
+#define DMAC_CTRLA_SRC_WIDTH_WORD (0x2u << 24) /**< \brief (DMAC_CTRLA) the transfer size is set to 32-bit width */
+#define DMAC_CTRLA_DST_WIDTH_Pos 28
+#define DMAC_CTRLA_DST_WIDTH_Msk (0x3u << DMAC_CTRLA_DST_WIDTH_Pos) /**< \brief (DMAC_CTRLA) Transfer Width for the Destination */
+#define DMAC_CTRLA_DST_WIDTH_BYTE (0x0u << 28) /**< \brief (DMAC_CTRLA) the transfer size is set to 8-bit width */
+#define DMAC_CTRLA_DST_WIDTH_HALF_WORD (0x1u << 28) /**< \brief (DMAC_CTRLA) the transfer size is set to 16-bit width */
+#define DMAC_CTRLA_DST_WIDTH_WORD (0x2u << 28) /**< \brief (DMAC_CTRLA) the transfer size is set to 32-bit width */
+#define DMAC_CTRLA_DONE (0x1u << 31) /**< \brief (DMAC_CTRLA) */
+/* -------- DMAC_CTRLB : (DMAC Offset: N/A) DMAC Channel Control B Register -------- */
+#define DMAC_CTRLB_SRC_DSCR (0x1u << 16) /**< \brief (DMAC_CTRLB) Source Address Descriptor */
+#define DMAC_CTRLB_SRC_DSCR_FETCH_FROM_MEM (0x0u << 16) /**< \brief (DMAC_CTRLB) Source address is updated when the descriptor is fetched from the memory. */
+#define DMAC_CTRLB_SRC_DSCR_FETCH_DISABLE (0x1u << 16) /**< \brief (DMAC_CTRLB) Buffer Descriptor Fetch operation is disabled for the source. */
+#define DMAC_CTRLB_DST_DSCR (0x1u << 20) /**< \brief (DMAC_CTRLB) Destination Address Descriptor */
+#define DMAC_CTRLB_DST_DSCR_FETCH_FROM_MEM (0x0u << 20) /**< \brief (DMAC_CTRLB) Destination address is updated when the descriptor is fetched from the memory. */
+#define DMAC_CTRLB_DST_DSCR_FETCH_DISABLE (0x1u << 20) /**< \brief (DMAC_CTRLB) Buffer Descriptor Fetch operation is disabled for the destination. */
+#define DMAC_CTRLB_FC_Pos 21
+#define DMAC_CTRLB_FC_Msk (0x7u << DMAC_CTRLB_FC_Pos) /**< \brief (DMAC_CTRLB) Flow Control */
+#define DMAC_CTRLB_FC_MEM2MEM_DMA_FC (0x0u << 21) /**< \brief (DMAC_CTRLB) Memory-to-Memory Transfer DMAC is flow controller */
+#define DMAC_CTRLB_FC_MEM2PER_DMA_FC (0x1u << 21) /**< \brief (DMAC_CTRLB) Memory-to-Peripheral Transfer DMAC is flow controller */
+#define DMAC_CTRLB_FC_PER2MEM_DMA_FC (0x2u << 21) /**< \brief (DMAC_CTRLB) Peripheral-to-Memory Transfer DMAC is flow controller */
+#define DMAC_CTRLB_FC_PER2PER_DMA_FC (0x3u << 21) /**< \brief (DMAC_CTRLB) Peripheral-to-Peripheral Transfer DMAC is flow controller */
+#define DMAC_CTRLB_SRC_INCR_Pos 24
+#define DMAC_CTRLB_SRC_INCR_Msk (0x3u << DMAC_CTRLB_SRC_INCR_Pos) /**< \brief (DMAC_CTRLB) Incrementing, Decrementing or Fixed Address for the Source */
+#define DMAC_CTRLB_SRC_INCR_INCREMENTING (0x0u << 24) /**< \brief (DMAC_CTRLB) The source address is incremented */
+#define DMAC_CTRLB_SRC_INCR_DECREMENTING (0x1u << 24) /**< \brief (DMAC_CTRLB) The source address is decremented */
+#define DMAC_CTRLB_SRC_INCR_FIXED (0x2u << 24) /**< \brief (DMAC_CTRLB) The source address remains unchanged */
+#define DMAC_CTRLB_DST_INCR_Pos 28
+#define DMAC_CTRLB_DST_INCR_Msk (0x3u << DMAC_CTRLB_DST_INCR_Pos) /**< \brief (DMAC_CTRLB) Incrementing, Decrementing or Fixed Address for the Destination */
+#define DMAC_CTRLB_DST_INCR_INCREMENTING (0x0u << 28) /**< \brief (DMAC_CTRLB) The destination address is incremented */
+#define DMAC_CTRLB_DST_INCR_DECREMENTING (0x1u << 28) /**< \brief (DMAC_CTRLB) The destination address is decremented */
+#define DMAC_CTRLB_DST_INCR_FIXED (0x2u << 28) /**< \brief (DMAC_CTRLB) The destination address remains unchanged */
+#define DMAC_CTRLB_IEN (0x1u << 30) /**< \brief (DMAC_CTRLB) */
+/* -------- DMAC_CFG : (DMAC Offset: N/A) DMAC Channel Configuration Register -------- */
+#define DMAC_CFG_SRC_PER_Pos 0
+#define DMAC_CFG_SRC_PER_Msk (0xfu << DMAC_CFG_SRC_PER_Pos) /**< \brief (DMAC_CFG) Source with Peripheral identifier */
+#define DMAC_CFG_SRC_PER(value) ((DMAC_CFG_SRC_PER_Msk & ((value) << DMAC_CFG_SRC_PER_Pos)))
+#define DMAC_CFG_DST_PER_Pos 4
+#define DMAC_CFG_DST_PER_Msk (0xfu << DMAC_CFG_DST_PER_Pos) /**< \brief (DMAC_CFG) Destination with Peripheral identifier */
+#define DMAC_CFG_DST_PER(value) ((DMAC_CFG_DST_PER_Msk & ((value) << DMAC_CFG_DST_PER_Pos)))
+#define DMAC_CFG_SRC_H2SEL (0x1u << 9) /**< \brief (DMAC_CFG) Software or Hardware Selection for the Source */
+#define DMAC_CFG_SRC_H2SEL_SW (0x0u << 9) /**< \brief (DMAC_CFG) Software handshaking interface is used to trigger a transfer request. */
+#define DMAC_CFG_SRC_H2SEL_HW (0x1u << 9) /**< \brief (DMAC_CFG) Hardware handshaking interface is used to trigger a transfer request. */
+#define DMAC_CFG_DST_H2SEL (0x1u << 13) /**< \brief (DMAC_CFG) Software or Hardware Selection for the Destination */
+#define DMAC_CFG_DST_H2SEL_SW (0x0u << 13) /**< \brief (DMAC_CFG) Software handshaking interface is used to trigger a transfer request. */
+#define DMAC_CFG_DST_H2SEL_HW (0x1u << 13) /**< \brief (DMAC_CFG) Hardware handshaking interface is used to trigger a transfer request. */
+#define DMAC_CFG_SOD (0x1u << 16) /**< \brief (DMAC_CFG) Stop On Done */
+#define DMAC_CFG_SOD_DISABLE (0x0u << 16) /**< \brief (DMAC_CFG) STOP ON DONE disabled, the descriptor fetch operation ignores DONE Field of CTRLA register. */
+#define DMAC_CFG_SOD_ENABLE (0x1u << 16) /**< \brief (DMAC_CFG) STOP ON DONE activated, the DMAC module is automatically disabled if DONE FIELD is set to 1. */
+#define DMAC_CFG_LOCK_IF (0x1u << 20) /**< \brief (DMAC_CFG) Interface Lock */
+#define DMAC_CFG_LOCK_IF_DISABLE (0x0u << 20) /**< \brief (DMAC_CFG) Interface Lock capability is disabled */
+#define DMAC_CFG_LOCK_IF_ENABLE (0x1u << 20) /**< \brief (DMAC_CFG) Interface Lock capability is enabled */
+#define DMAC_CFG_LOCK_B (0x1u << 21) /**< \brief (DMAC_CFG) Bus Lock */
+#define DMAC_CFG_LOCK_B_DISABLE (0x0u << 21) /**< \brief (DMAC_CFG) AHB Bus Locking capability is disabled. */
+#define DMAC_CFG_LOCK_IF_L (0x1u << 22) /**< \brief (DMAC_CFG) Master Interface Arbiter Lock */
+#define DMAC_CFG_LOCK_IF_L_CHUNK (0x0u << 22) /**< \brief (DMAC_CFG) The Master Interface Arbiter is locked by the channel x for a chunk transfer. */
+#define DMAC_CFG_LOCK_IF_L_BUFFER (0x1u << 22) /**< \brief (DMAC_CFG) The Master Interface Arbiter is locked by the channel x for a buffer transfer. */
+#define DMAC_CFG_AHB_PROT_Pos 24
+#define DMAC_CFG_AHB_PROT_Msk (0x7u << DMAC_CFG_AHB_PROT_Pos) /**< \brief (DMAC_CFG) AHB Protection */
+#define DMAC_CFG_AHB_PROT(value) ((DMAC_CFG_AHB_PROT_Msk & ((value) << DMAC_CFG_AHB_PROT_Pos)))
+#define DMAC_CFG_FIFOCFG_Pos 28
+#define DMAC_CFG_FIFOCFG_Msk (0x3u << DMAC_CFG_FIFOCFG_Pos) /**< \brief (DMAC_CFG) FIFO Configuration */
+#define DMAC_CFG_FIFOCFG_ALAP_CFG (0x0u << 28) /**< \brief (DMAC_CFG) The largest defined length AHB burst is performed on the destination AHB interface. */
+#define DMAC_CFG_FIFOCFG_HALF_CFG (0x1u << 28) /**< \brief (DMAC_CFG) When half FIFO size is available/filled, a source/destination request is serviced. */
+#define DMAC_CFG_FIFOCFG_ASAP_CFG (0x2u << 28) /**< \brief (DMAC_CFG) When there is enough space/data available to perform a single AHB access, then the request is serviced. */
+/* -------- DMAC_WPMR : (DMAC Offset: 0x1E4) DMAC Write Protect Mode Register -------- */
+#define DMAC_WPMR_WPEN (0x1u << 0) /**< \brief (DMAC_WPMR) Write Protect Enable */
+#define DMAC_WPMR_WPKEY_Pos 8
+#define DMAC_WPMR_WPKEY_Msk (0xffffffu << DMAC_WPMR_WPKEY_Pos) /**< \brief (DMAC_WPMR) Write Protect KEY */
+#define DMAC_WPMR_WPKEY(value) ((DMAC_WPMR_WPKEY_Msk & ((value) << DMAC_WPMR_WPKEY_Pos)))
+/* -------- DMAC_WPSR : (DMAC Offset: 0x1E8) DMAC Write Protect Status Register -------- */
+#define DMAC_WPSR_WPVS (0x1u << 0) /**< \brief (DMAC_WPSR) Write Protect Violation Status */
+#define DMAC_WPSR_WPVSRC_Pos 8
+#define DMAC_WPSR_WPVSRC_Msk (0xffffu << DMAC_WPSR_WPVSRC_Pos) /**< \brief (DMAC_WPSR) Write Protect Violation Source */
+
+/*@}*/
+
+/* ============================================================================= */
+/** SOFTWARE API DEFINITION FOR Embedded Flash Controller */
+/* ============================================================================= */
+/** \addtogroup SAM3XA_EFC Embedded Flash Controller */
+/*@{*/
+
+#ifndef __ASSEMBLY__
+/** \brief Efc hardware registers */
+typedef struct {
+ RwReg EEFC_FMR; /**< \brief (Efc Offset: 0x00) EEFC Flash Mode Register */
+ WoReg EEFC_FCR; /**< \brief (Efc Offset: 0x04) EEFC Flash Command Register */
+ RoReg EEFC_FSR; /**< \brief (Efc Offset: 0x08) EEFC Flash Status Register */
+ RoReg EEFC_FRR; /**< \brief (Efc Offset: 0x0C) EEFC Flash Result Register */
+} Efc;
+#endif /* __ASSEMBLY__ */
+/* -------- EEFC_FMR : (EFC Offset: 0x00) EEFC Flash Mode Register -------- */
+#define EEFC_FMR_FRDY (0x1u << 0) /**< \brief (EEFC_FMR) Ready Interrupt Enable */
+#define EEFC_FMR_FWS_Pos 8
+#define EEFC_FMR_FWS_Msk (0xfu << EEFC_FMR_FWS_Pos) /**< \brief (EEFC_FMR) Flash Wait State */
+#define EEFC_FMR_FWS(value) ((EEFC_FMR_FWS_Msk & ((value) << EEFC_FMR_FWS_Pos)))
+#define EEFC_FMR_SCOD (0x1u << 16) /**< \brief (EEFC_FMR) Sequential Code Optimization Disable */
+#define EEFC_FMR_FAM (0x1u << 24) /**< \brief (EEFC_FMR) Flash Access Mode */
+/* -------- EEFC_FCR : (EFC Offset: 0x04) EEFC Flash Command Register -------- */
+#define EEFC_FCR_FCMD_Pos 0
+#define EEFC_FCR_FCMD_Msk (0xffu << EEFC_FCR_FCMD_Pos) /**< \brief (EEFC_FCR) Flash Command */
+#define EEFC_FCR_FCMD(value) ((EEFC_FCR_FCMD_Msk & ((value) << EEFC_FCR_FCMD_Pos)))
+#define EEFC_FCR_FARG_Pos 8
+#define EEFC_FCR_FARG_Msk (0xffffu << EEFC_FCR_FARG_Pos) /**< \brief (EEFC_FCR) Flash Command Argument */
+#define EEFC_FCR_FARG(value) ((EEFC_FCR_FARG_Msk & ((value) << EEFC_FCR_FARG_Pos)))
+#define EEFC_FCR_FKEY_Pos 24
+#define EEFC_FCR_FKEY_Msk (0xffu << EEFC_FCR_FKEY_Pos) /**< \brief (EEFC_FCR) Flash Writing Protection Key */
+#define EEFC_FCR_FKEY(value) ((EEFC_FCR_FKEY_Msk & ((value) << EEFC_FCR_FKEY_Pos)))
+/* -------- EEFC_FSR : (EFC Offset: 0x08) EEFC Flash Status Register -------- */
+#define EEFC_FSR_FRDY (0x1u << 0) /**< \brief (EEFC_FSR) Flash Ready Status */
+#define EEFC_FSR_FCMDE (0x1u << 1) /**< \brief (EEFC_FSR) Flash Command Error Status */
+#define EEFC_FSR_FLOCKE (0x1u << 2) /**< \brief (EEFC_FSR) Flash Lock Error Status */
+/* -------- EEFC_FRR : (EFC Offset: 0x0C) EEFC Flash Result Register -------- */
+#define EEFC_FRR_FVALUE_Pos 0
+#define EEFC_FRR_FVALUE_Msk (0xffffffffu << EEFC_FRR_FVALUE_Pos) /**< \brief (EEFC_FRR) Flash Result Value */
+
+/*@}*/
+
+/* ============================================================================= */
+/** SOFTWARE API DEFINITION FOR Ethernet MAC 10/100 */
+/* ============================================================================= */
+/** \addtogroup SAM3XA_EMAC Ethernet MAC 10/100 */
+/*@{*/
+
+#ifndef __ASSEMBLY__
+/** \brief EmacSa hardware registers */
+typedef struct {
+ RwReg EMAC_SAxB; /**< \brief (EmacSa Offset: 0x0) Specific Address 1 Bottom Register */
+ RwReg EMAC_SAxT; /**< \brief (EmacSa Offset: 0x4) Specific Address 1 Top Register */
+} EmacSa;
+/** \brief Emac hardware registers */
+#define EMACSA_NUMBER 4
+typedef struct {
+ RwReg EMAC_NCR; /**< \brief (Emac Offset: 0x00) Network Control Register */
+ RwReg EMAC_NCFGR; /**< \brief (Emac Offset: 0x04) Network Configuration Register */
+ RoReg EMAC_NSR; /**< \brief (Emac Offset: 0x08) Network Status Register */
+ RoReg Reserved1[2];
+ RwReg EMAC_TSR; /**< \brief (Emac Offset: 0x14) Transmit Status Register */
+ RwReg EMAC_RBQP; /**< \brief (Emac Offset: 0x18) Receive Buffer Queue Pointer Register */
+ RwReg EMAC_TBQP; /**< \brief (Emac Offset: 0x1C) Transmit Buffer Queue Pointer Register */
+ RwReg EMAC_RSR; /**< \brief (Emac Offset: 0x20) Receive Status Register */
+ RwReg EMAC_ISR; /**< \brief (Emac Offset: 0x24) Interrupt Status Register */
+ WoReg EMAC_IER; /**< \brief (Emac Offset: 0x28) Interrupt Enable Register */
+ WoReg EMAC_IDR; /**< \brief (Emac Offset: 0x2C) Interrupt Disable Register */
+ RoReg EMAC_IMR; /**< \brief (Emac Offset: 0x30) Interrupt Mask Register */
+ RwReg EMAC_MAN; /**< \brief (Emac Offset: 0x34) Phy Maintenance Register */
+ RwReg EMAC_PTR; /**< \brief (Emac Offset: 0x38) Pause Time Register */
+ RwReg EMAC_PFR; /**< \brief (Emac Offset: 0x3C) Pause Frames Received Register */
+ RwReg EMAC_FTO; /**< \brief (Emac Offset: 0x40) Frames Transmitted Ok Register */
+ RwReg EMAC_SCF; /**< \brief (Emac Offset: 0x44) Single Collision Frames Register */
+ RwReg EMAC_MCF; /**< \brief (Emac Offset: 0x48) Multiple Collision Frames Register */
+ RwReg EMAC_FRO; /**< \brief (Emac Offset: 0x4C) Frames Received Ok Register */
+ RwReg EMAC_FCSE; /**< \brief (Emac Offset: 0x50) Frame Check Sequence Errors Register */
+ RwReg EMAC_ALE; /**< \brief (Emac Offset: 0x54) Alignment Errors Register */
+ RwReg EMAC_DTF; /**< \brief (Emac Offset: 0x58) Deferred Transmission Frames Register */
+ RwReg EMAC_LCOL; /**< \brief (Emac Offset: 0x5C) Late Collisions Register */
+ RwReg EMAC_ECOL; /**< \brief (Emac Offset: 0x60) Excessive Collisions Register */
+ RwReg EMAC_TUND; /**< \brief (Emac Offset: 0x64) Transmit Underrun Errors Register */
+ RwReg EMAC_CSE; /**< \brief (Emac Offset: 0x68) Carrier Sense Errors Register */
+ RwReg EMAC_RRE; /**< \brief (Emac Offset: 0x6C) Receive Resource Errors Register */
+ RwReg EMAC_ROV; /**< \brief (Emac Offset: 0x70) Receive Overrun Errors Register */
+ RwReg EMAC_RSE; /**< \brief (Emac Offset: 0x74) Receive Symbol Errors Register */
+ RwReg EMAC_ELE; /**< \brief (Emac Offset: 0x78) Excessive Length Errors Register */
+ RwReg EMAC_RJA; /**< \brief (Emac Offset: 0x7C) Receive Jabbers Register */
+ RwReg EMAC_USF; /**< \brief (Emac Offset: 0x80) Undersize Frames Register */
+ RwReg EMAC_STE; /**< \brief (Emac Offset: 0x84) SQE Test Errors Register */
+ RwReg EMAC_RLE; /**< \brief (Emac Offset: 0x88) Received Length Field Mismatch Register */
+ RoReg Reserved2[1];
+ RwReg EMAC_HRB; /**< \brief (Emac Offset: 0x90) Hash Register Bottom [31:0] Register */
+ RwReg EMAC_HRT; /**< \brief (Emac Offset: 0x94) Hash Register Top [63:32] Register */
+ EmacSa EMAC_SA[EMACSA_NUMBER]; /**< \brief (Emac Offset: 0x98) sa = 1 .. 4 */
+ RwReg EMAC_TID; /**< \brief (Emac Offset: 0xB8) Type ID Checking Register */
+ RoReg Reserved3[1];
+ RwReg EMAC_USRIO; /**< \brief (Emac Offset: 0xC0) User Input/Output Register */
+} Emac;
+#endif /* __ASSEMBLY__ */
+/* -------- EMAC_NCR : (EMAC Offset: 0x00) Network Control Register -------- */
+#define EMAC_NCR_LB (0x1u << 0) /**< \brief (EMAC_NCR) LoopBack */
+#define EMAC_NCR_LLB (0x1u << 1) /**< \brief (EMAC_NCR) Loopback local */
+#define EMAC_NCR_RE (0x1u << 2) /**< \brief (EMAC_NCR) Receive enable */
+#define EMAC_NCR_TE (0x1u << 3) /**< \brief (EMAC_NCR) Transmit enable */
+#define EMAC_NCR_MPE (0x1u << 4) /**< \brief (EMAC_NCR) Management port enable */
+#define EMAC_NCR_CLRSTAT (0x1u << 5) /**< \brief (EMAC_NCR) Clear statistics registers */
+#define EMAC_NCR_INCSTAT (0x1u << 6) /**< \brief (EMAC_NCR) Increment statistics registers */
+#define EMAC_NCR_WESTAT (0x1u << 7) /**< \brief (EMAC_NCR) Write enable for statistics registers */
+#define EMAC_NCR_BP (0x1u << 8) /**< \brief (EMAC_NCR) Back pressure */
+#define EMAC_NCR_TSTART (0x1u << 9) /**< \brief (EMAC_NCR) Start transmission */
+#define EMAC_NCR_THALT (0x1u << 10) /**< \brief (EMAC_NCR) Transmit halt */
+/* -------- EMAC_NCFGR : (EMAC Offset: 0x04) Network Configuration Register -------- */
+#define EMAC_NCFGR_SPD (0x1u << 0) /**< \brief (EMAC_NCFGR) Speed */
+#define EMAC_NCFGR_FD (0x1u << 1) /**< \brief (EMAC_NCFGR) Full Duplex */
+#define EMAC_NCFGR_JFRAME (0x1u << 3) /**< \brief (EMAC_NCFGR) Jumbo Frames */
+#define EMAC_NCFGR_CAF (0x1u << 4) /**< \brief (EMAC_NCFGR) Copy All Frames */
+#define EMAC_NCFGR_NBC (0x1u << 5) /**< \brief (EMAC_NCFGR) No Broadcast */
+#define EMAC_NCFGR_MTI (0x1u << 6) /**< \brief (EMAC_NCFGR) Multicast Hash Enable */
+#define EMAC_NCFGR_UNI (0x1u << 7) /**< \brief (EMAC_NCFGR) Unicast Hash Enable */
+#define EMAC_NCFGR_BIG (0x1u << 8) /**< \brief (EMAC_NCFGR) Receive 1536 bytes frames */
+#define EMAC_NCFGR_CLK_Pos 10
+#define EMAC_NCFGR_CLK_Msk (0x3u << EMAC_NCFGR_CLK_Pos) /**< \brief (EMAC_NCFGR) MDC clock divider */
+#define EMAC_NCFGR_CLK_MCK_8 (0x0u << 10) /**< \brief (EMAC_NCFGR) MCK divided by 8 (MCK up to 20 MHz). */
+#define EMAC_NCFGR_CLK_MCK_16 (0x1u << 10) /**< \brief (EMAC_NCFGR) MCK divided by 16 (MCK up to 40 MHz). */
+#define EMAC_NCFGR_CLK_MCK_32 (0x2u << 10) /**< \brief (EMAC_NCFGR) MCK divided by 32 (MCK up to 80 MHz). */
+#define EMAC_NCFGR_CLK_MCK_64 (0x3u << 10) /**< \brief (EMAC_NCFGR) MCK divided by 64 (MCK up to 160 MHz). */
+#define EMAC_NCFGR_RTY (0x1u << 12) /**< \brief (EMAC_NCFGR) Retry test */
+#define EMAC_NCFGR_PAE (0x1u << 13) /**< \brief (EMAC_NCFGR) Pause Enable */
+#define EMAC_NCFGR_RBOF_Pos 14
+#define EMAC_NCFGR_RBOF_Msk (0x3u << EMAC_NCFGR_RBOF_Pos) /**< \brief (EMAC_NCFGR) Receive Buffer Offset */
+#define EMAC_NCFGR_RBOF_OFFSET_0 (0x0u << 14) /**< \brief (EMAC_NCFGR) No offset from start of receive buffer. */
+#define EMAC_NCFGR_RBOF_OFFSET_1 (0x1u << 14) /**< \brief (EMAC_NCFGR) One-byte offset from start of receive buffer. */
+#define EMAC_NCFGR_RBOF_OFFSET_2 (0x2u << 14) /**< \brief (EMAC_NCFGR) Two-byte offset from start of receive buffer. */
+#define EMAC_NCFGR_RBOF_OFFSET_3 (0x3u << 14) /**< \brief (EMAC_NCFGR) Three-byte offset from start of receive buffer. */
+#define EMAC_NCFGR_RLCE (0x1u << 16) /**< \brief (EMAC_NCFGR) Receive Length field Checking Enable */
+#define EMAC_NCFGR_DRFCS (0x1u << 17) /**< \brief (EMAC_NCFGR) Discard Receive FCS */
+#define EMAC_NCFGR_EFRHD (0x1u << 18) /**< \brief (EMAC_NCFGR) */
+#define EMAC_NCFGR_IRXFCS (0x1u << 19) /**< \brief (EMAC_NCFGR) Ignore RX FCS */
+/* -------- EMAC_NSR : (EMAC Offset: 0x08) Network Status Register -------- */
+#define EMAC_NSR_MDIO (0x1u << 1) /**< \brief (EMAC_NSR) */
+#define EMAC_NSR_IDLE (0x1u << 2) /**< \brief (EMAC_NSR) */
+/* -------- EMAC_TSR : (EMAC Offset: 0x14) Transmit Status Register -------- */
+#define EMAC_TSR_UBR (0x1u << 0) /**< \brief (EMAC_TSR) Used Bit Read */
+#define EMAC_TSR_COL (0x1u << 1) /**< \brief (EMAC_TSR) Collision Occurred */
+#define EMAC_TSR_RLES (0x1u << 2) /**< \brief (EMAC_TSR) Retry Limit exceeded */
+#define EMAC_TSR_TGO (0x1u << 3) /**< \brief (EMAC_TSR) Transmit Go */
+#define EMAC_TSR_BEX (0x1u << 4) /**< \brief (EMAC_TSR) Buffers exhausted mid frame */
+#define EMAC_TSR_COMP (0x1u << 5) /**< \brief (EMAC_TSR) Transmit Complete */
+#define EMAC_TSR_UND (0x1u << 6) /**< \brief (EMAC_TSR) Transmit Underrun */
+/* -------- EMAC_RBQP : (EMAC Offset: 0x18) Receive Buffer Queue Pointer Register -------- */
+#define EMAC_RBQP_ADDR_Pos 2
+#define EMAC_RBQP_ADDR_Msk (0x3fffffffu << EMAC_RBQP_ADDR_Pos) /**< \brief (EMAC_RBQP) Receive buffer queue pointer address */
+#define EMAC_RBQP_ADDR(value) ((EMAC_RBQP_ADDR_Msk & ((value) << EMAC_RBQP_ADDR_Pos)))
+/* -------- EMAC_TBQP : (EMAC Offset: 0x1C) Transmit Buffer Queue Pointer Register -------- */
+#define EMAC_TBQP_ADDR_Pos 2
+#define EMAC_TBQP_ADDR_Msk (0x3fffffffu << EMAC_TBQP_ADDR_Pos) /**< \brief (EMAC_TBQP) Transmit buffer queue pointer address */
+#define EMAC_TBQP_ADDR(value) ((EMAC_TBQP_ADDR_Msk & ((value) << EMAC_TBQP_ADDR_Pos)))
+/* -------- EMAC_RSR : (EMAC Offset: 0x20) Receive Status Register -------- */
+#define EMAC_RSR_BNA (0x1u << 0) /**< \brief (EMAC_RSR) Buffer Not Available */
+#define EMAC_RSR_REC (0x1u << 1) /**< \brief (EMAC_RSR) Frame Received */
+#define EMAC_RSR_OVR (0x1u << 2) /**< \brief (EMAC_RSR) Receive Overrun */
+/* -------- EMAC_ISR : (EMAC Offset: 0x24) Interrupt Status Register -------- */
+#define EMAC_ISR_MFD (0x1u << 0) /**< \brief (EMAC_ISR) Management Frame Done */
+#define EMAC_ISR_RCOMP (0x1u << 1) /**< \brief (EMAC_ISR) Receive Complete */
+#define EMAC_ISR_RXUBR (0x1u << 2) /**< \brief (EMAC_ISR) Receive Used Bit Read */
+#define EMAC_ISR_TXUBR (0x1u << 3) /**< \brief (EMAC_ISR) Transmit Used Bit Read */
+#define EMAC_ISR_TUND (0x1u << 4) /**< \brief (EMAC_ISR) Ethernet Transmit Buffer Underrun */
+#define EMAC_ISR_RLEX (0x1u << 5) /**< \brief (EMAC_ISR) Retry Limit Exceeded */
+#define EMAC_ISR_TXERR (0x1u << 6) /**< \brief (EMAC_ISR) Transmit Error */
+#define EMAC_ISR_TCOMP (0x1u << 7) /**< \brief (EMAC_ISR) Transmit Complete */
+#define EMAC_ISR_ROVR (0x1u << 10) /**< \brief (EMAC_ISR) Receive Overrun */
+#define EMAC_ISR_HRESP (0x1u << 11) /**< \brief (EMAC_ISR) Hresp not OK */
+#define EMAC_ISR_PFRE (0x1u << 12) /**< \brief (EMAC_ISR) Pause Frame Received */
+#define EMAC_ISR_PTZ (0x1u << 13) /**< \brief (EMAC_ISR) Pause Time Zero */
+/* -------- EMAC_IER : (EMAC Offset: 0x28) Interrupt Enable Register -------- */
+#define EMAC_IER_MFD (0x1u << 0) /**< \brief (EMAC_IER) Management Frame sent */
+#define EMAC_IER_RCOMP (0x1u << 1) /**< \brief (EMAC_IER) Receive Complete */
+#define EMAC_IER_RXUBR (0x1u << 2) /**< \brief (EMAC_IER) Receive Used Bit Read */
+#define EMAC_IER_TXUBR (0x1u << 3) /**< \brief (EMAC_IER) Transmit Used Bit Read */
+#define EMAC_IER_TUND (0x1u << 4) /**< \brief (EMAC_IER) Ethernet Transmit Buffer Underrun */
+#define EMAC_IER_RLE (0x1u << 5) /**< \brief (EMAC_IER) Retry Limit Exceeded */
+#define EMAC_IER_TXERR (0x1u << 6) /**< \brief (EMAC_IER) */
+#define EMAC_IER_TCOMP (0x1u << 7) /**< \brief (EMAC_IER) Transmit Complete */
+#define EMAC_IER_ROVR (0x1u << 10) /**< \brief (EMAC_IER) Receive Overrun */
+#define EMAC_IER_HRESP (0x1u << 11) /**< \brief (EMAC_IER) Hresp not OK */
+#define EMAC_IER_PFR (0x1u << 12) /**< \brief (EMAC_IER) Pause Frame Received */
+#define EMAC_IER_PTZ (0x1u << 13) /**< \brief (EMAC_IER) Pause Time Zero */
+/* -------- EMAC_IDR : (EMAC Offset: 0x2C) Interrupt Disable Register -------- */
+#define EMAC_IDR_MFD (0x1u << 0) /**< \brief (EMAC_IDR) Management Frame sent */
+#define EMAC_IDR_RCOMP (0x1u << 1) /**< \brief (EMAC_IDR) Receive Complete */
+#define EMAC_IDR_RXUBR (0x1u << 2) /**< \brief (EMAC_IDR) Receive Used Bit Read */
+#define EMAC_IDR_TXUBR (0x1u << 3) /**< \brief (EMAC_IDR) Transmit Used Bit Read */
+#define EMAC_IDR_TUND (0x1u << 4) /**< \brief (EMAC_IDR) Ethernet Transmit Buffer Underrun */
+#define EMAC_IDR_RLE (0x1u << 5) /**< \brief (EMAC_IDR) Retry Limit Exceeded */
+#define EMAC_IDR_TXERR (0x1u << 6) /**< \brief (EMAC_IDR) */
+#define EMAC_IDR_TCOMP (0x1u << 7) /**< \brief (EMAC_IDR) Transmit Complete */
+#define EMAC_IDR_ROVR (0x1u << 10) /**< \brief (EMAC_IDR) Receive Overrun */
+#define EMAC_IDR_HRESP (0x1u << 11) /**< \brief (EMAC_IDR) Hresp not OK */
+#define EMAC_IDR_PFR (0x1u << 12) /**< \brief (EMAC_IDR) Pause Frame Received */
+#define EMAC_IDR_PTZ (0x1u << 13) /**< \brief (EMAC_IDR) Pause Time Zero */
+/* -------- EMAC_IMR : (EMAC Offset: 0x30) Interrupt Mask Register -------- */
+#define EMAC_IMR_MFD (0x1u << 0) /**< \brief (EMAC_IMR) Management Frame sent */
+#define EMAC_IMR_RCOMP (0x1u << 1) /**< \brief (EMAC_IMR) Receive Complete */
+#define EMAC_IMR_RXUBR (0x1u << 2) /**< \brief (EMAC_IMR) Receive Used Bit Read */
+#define EMAC_IMR_TXUBR (0x1u << 3) /**< \brief (EMAC_IMR) Transmit Used Bit Read */
+#define EMAC_IMR_TUND (0x1u << 4) /**< \brief (EMAC_IMR) Ethernet Transmit Buffer Underrun */
+#define EMAC_IMR_RLE (0x1u << 5) /**< \brief (EMAC_IMR) Retry Limit Exceeded */
+#define EMAC_IMR_TXERR (0x1u << 6) /**< \brief (EMAC_IMR) */
+#define EMAC_IMR_TCOMP (0x1u << 7) /**< \brief (EMAC_IMR) Transmit Complete */
+#define EMAC_IMR_ROVR (0x1u << 10) /**< \brief (EMAC_IMR) Receive Overrun */
+#define EMAC_IMR_HRESP (0x1u << 11) /**< \brief (EMAC_IMR) Hresp not OK */
+#define EMAC_IMR_PFR (0x1u << 12) /**< \brief (EMAC_IMR) Pause Frame Received */
+#define EMAC_IMR_PTZ (0x1u << 13) /**< \brief (EMAC_IMR) Pause Time Zero */
+/* -------- EMAC_MAN : (EMAC Offset: 0x34) Phy Maintenance Register -------- */
+#define EMAC_MAN_DATA_Pos 0
+#define EMAC_MAN_DATA_Msk (0xffffu << EMAC_MAN_DATA_Pos) /**< \brief (EMAC_MAN) */
+#define EMAC_MAN_DATA(value) ((EMAC_MAN_DATA_Msk & ((value) << EMAC_MAN_DATA_Pos)))
+#define EMAC_MAN_CODE_Pos 16
+#define EMAC_MAN_CODE_Msk (0x3u << EMAC_MAN_CODE_Pos) /**< \brief (EMAC_MAN) */
+#define EMAC_MAN_CODE(value) ((EMAC_MAN_CODE_Msk & ((value) << EMAC_MAN_CODE_Pos)))
+#define EMAC_MAN_REGA_Pos 18
+#define EMAC_MAN_REGA_Msk (0x1fu << EMAC_MAN_REGA_Pos) /**< \brief (EMAC_MAN) Register Address */
+#define EMAC_MAN_REGA(value) ((EMAC_MAN_REGA_Msk & ((value) << EMAC_MAN_REGA_Pos)))
+#define EMAC_MAN_PHYA_Pos 23
+#define EMAC_MAN_PHYA_Msk (0x1fu << EMAC_MAN_PHYA_Pos) /**< \brief (EMAC_MAN) PHY Address */
+#define EMAC_MAN_PHYA(value) ((EMAC_MAN_PHYA_Msk & ((value) << EMAC_MAN_PHYA_Pos)))
+#define EMAC_MAN_RW_Pos 28
+#define EMAC_MAN_RW_Msk (0x3u << EMAC_MAN_RW_Pos) /**< \brief (EMAC_MAN) Read-write */
+#define EMAC_MAN_RW(value) ((EMAC_MAN_RW_Msk & ((value) << EMAC_MAN_RW_Pos)))
+#define EMAC_MAN_SOF_Pos 30
+#define EMAC_MAN_SOF_Msk (0x3u << EMAC_MAN_SOF_Pos) /**< \brief (EMAC_MAN) Start of frame */
+#define EMAC_MAN_SOF(value) ((EMAC_MAN_SOF_Msk & ((value) << EMAC_MAN_SOF_Pos)))
+/* -------- EMAC_PTR : (EMAC Offset: 0x38) Pause Time Register -------- */
+#define EMAC_PTR_PTIME_Pos 0
+#define EMAC_PTR_PTIME_Msk (0xffffu << EMAC_PTR_PTIME_Pos) /**< \brief (EMAC_PTR) Pause Time */
+#define EMAC_PTR_PTIME(value) ((EMAC_PTR_PTIME_Msk & ((value) << EMAC_PTR_PTIME_Pos)))
+/* -------- EMAC_PFR : (EMAC Offset: 0x3C) Pause Frames Received Register -------- */
+#define EMAC_PFR_FROK_Pos 0
+#define EMAC_PFR_FROK_Msk (0xffffu << EMAC_PFR_FROK_Pos) /**< \brief (EMAC_PFR) Pause Frames received OK */
+#define EMAC_PFR_FROK(value) ((EMAC_PFR_FROK_Msk & ((value) << EMAC_PFR_FROK_Pos)))
+/* -------- EMAC_FTO : (EMAC Offset: 0x40) Frames Transmitted Ok Register -------- */
+#define EMAC_FTO_FTOK_Pos 0
+#define EMAC_FTO_FTOK_Msk (0xffffffu << EMAC_FTO_FTOK_Pos) /**< \brief (EMAC_FTO) Frames Transmitted OK */
+#define EMAC_FTO_FTOK(value) ((EMAC_FTO_FTOK_Msk & ((value) << EMAC_FTO_FTOK_Pos)))
+/* -------- EMAC_SCF : (EMAC Offset: 0x44) Single Collision Frames Register -------- */
+#define EMAC_SCF_SCF_Pos 0
+#define EMAC_SCF_SCF_Msk (0xffffu << EMAC_SCF_SCF_Pos) /**< \brief (EMAC_SCF) Single Collision Frames */
+#define EMAC_SCF_SCF(value) ((EMAC_SCF_SCF_Msk & ((value) << EMAC_SCF_SCF_Pos)))
+/* -------- EMAC_MCF : (EMAC Offset: 0x48) Multiple Collision Frames Register -------- */
+#define EMAC_MCF_MCF_Pos 0
+#define EMAC_MCF_MCF_Msk (0xffffu << EMAC_MCF_MCF_Pos) /**< \brief (EMAC_MCF) Multicollision Frames */
+#define EMAC_MCF_MCF(value) ((EMAC_MCF_MCF_Msk & ((value) << EMAC_MCF_MCF_Pos)))
+/* -------- EMAC_FRO : (EMAC Offset: 0x4C) Frames Received Ok Register -------- */
+#define EMAC_FRO_FROK_Pos 0
+#define EMAC_FRO_FROK_Msk (0xffffffu << EMAC_FRO_FROK_Pos) /**< \brief (EMAC_FRO) Frames Received OK */
+#define EMAC_FRO_FROK(value) ((EMAC_FRO_FROK_Msk & ((value) << EMAC_FRO_FROK_Pos)))
+/* -------- EMAC_FCSE : (EMAC Offset: 0x50) Frame Check Sequence Errors Register -------- */
+#define EMAC_FCSE_FCSE_Pos 0
+#define EMAC_FCSE_FCSE_Msk (0xffu << EMAC_FCSE_FCSE_Pos) /**< \brief (EMAC_FCSE) Frame Check Sequence Errors */
+#define EMAC_FCSE_FCSE(value) ((EMAC_FCSE_FCSE_Msk & ((value) << EMAC_FCSE_FCSE_Pos)))
+/* -------- EMAC_ALE : (EMAC Offset: 0x54) Alignment Errors Register -------- */
+#define EMAC_ALE_ALE_Pos 0
+#define EMAC_ALE_ALE_Msk (0xffu << EMAC_ALE_ALE_Pos) /**< \brief (EMAC_ALE) Alignment Errors */
+#define EMAC_ALE_ALE(value) ((EMAC_ALE_ALE_Msk & ((value) << EMAC_ALE_ALE_Pos)))
+/* -------- EMAC_DTF : (EMAC Offset: 0x58) Deferred Transmission Frames Register -------- */
+#define EMAC_DTF_DTF_Pos 0
+#define EMAC_DTF_DTF_Msk (0xffffu << EMAC_DTF_DTF_Pos) /**< \brief (EMAC_DTF) Deferred Transmission Frames */
+#define EMAC_DTF_DTF(value) ((EMAC_DTF_DTF_Msk & ((value) << EMAC_DTF_DTF_Pos)))
+/* -------- EMAC_LCOL : (EMAC Offset: 0x5C) Late Collisions Register -------- */
+#define EMAC_LCOL_LCOL_Pos 0
+#define EMAC_LCOL_LCOL_Msk (0xffu << EMAC_LCOL_LCOL_Pos) /**< \brief (EMAC_LCOL) Late Collisions */
+#define EMAC_LCOL_LCOL(value) ((EMAC_LCOL_LCOL_Msk & ((value) << EMAC_LCOL_LCOL_Pos)))
+/* -------- EMAC_ECOL : (EMAC Offset: 0x60) Excessive Collisions Register -------- */
+#define EMAC_ECOL_EXCOL_Pos 0
+#define EMAC_ECOL_EXCOL_Msk (0xffu << EMAC_ECOL_EXCOL_Pos) /**< \brief (EMAC_ECOL) Excessive Collisions */
+#define EMAC_ECOL_EXCOL(value) ((EMAC_ECOL_EXCOL_Msk & ((value) << EMAC_ECOL_EXCOL_Pos)))
+/* -------- EMAC_TUND : (EMAC Offset: 0x64) Transmit Underrun Errors Register -------- */
+#define EMAC_TUND_TUND_Pos 0
+#define EMAC_TUND_TUND_Msk (0xffu << EMAC_TUND_TUND_Pos) /**< \brief (EMAC_TUND) Transmit Underruns */
+#define EMAC_TUND_TUND(value) ((EMAC_TUND_TUND_Msk & ((value) << EMAC_TUND_TUND_Pos)))
+/* -------- EMAC_CSE : (EMAC Offset: 0x68) Carrier Sense Errors Register -------- */
+#define EMAC_CSE_CSE_Pos 0
+#define EMAC_CSE_CSE_Msk (0xffu << EMAC_CSE_CSE_Pos) /**< \brief (EMAC_CSE) Carrier Sense Errors */
+#define EMAC_CSE_CSE(value) ((EMAC_CSE_CSE_Msk & ((value) << EMAC_CSE_CSE_Pos)))
+/* -------- EMAC_RRE : (EMAC Offset: 0x6C) Receive Resource Errors Register -------- */
+#define EMAC_RRE_RRE_Pos 0
+#define EMAC_RRE_RRE_Msk (0xffffu << EMAC_RRE_RRE_Pos) /**< \brief (EMAC_RRE) Receive Resource Errors */
+#define EMAC_RRE_RRE(value) ((EMAC_RRE_RRE_Msk & ((value) << EMAC_RRE_RRE_Pos)))
+/* -------- EMAC_ROV : (EMAC Offset: 0x70) Receive Overrun Errors Register -------- */
+#define EMAC_ROV_ROVR_Pos 0
+#define EMAC_ROV_ROVR_Msk (0xffu << EMAC_ROV_ROVR_Pos) /**< \brief (EMAC_ROV) Receive Overrun */
+#define EMAC_ROV_ROVR(value) ((EMAC_ROV_ROVR_Msk & ((value) << EMAC_ROV_ROVR_Pos)))
+/* -------- EMAC_RSE : (EMAC Offset: 0x74) Receive Symbol Errors Register -------- */
+#define EMAC_RSE_RSE_Pos 0
+#define EMAC_RSE_RSE_Msk (0xffu << EMAC_RSE_RSE_Pos) /**< \brief (EMAC_RSE) Receive Symbol Errors */
+#define EMAC_RSE_RSE(value) ((EMAC_RSE_RSE_Msk & ((value) << EMAC_RSE_RSE_Pos)))
+/* -------- EMAC_ELE : (EMAC Offset: 0x78) Excessive Length Errors Register -------- */
+#define EMAC_ELE_EXL_Pos 0
+#define EMAC_ELE_EXL_Msk (0xffu << EMAC_ELE_EXL_Pos) /**< \brief (EMAC_ELE) Excessive Length Errors */
+#define EMAC_ELE_EXL(value) ((EMAC_ELE_EXL_Msk & ((value) << EMAC_ELE_EXL_Pos)))
+/* -------- EMAC_RJA : (EMAC Offset: 0x7C) Receive Jabbers Register -------- */
+#define EMAC_RJA_RJB_Pos 0
+#define EMAC_RJA_RJB_Msk (0xffu << EMAC_RJA_RJB_Pos) /**< \brief (EMAC_RJA) Receive Jabbers */
+#define EMAC_RJA_RJB(value) ((EMAC_RJA_RJB_Msk & ((value) << EMAC_RJA_RJB_Pos)))
+/* -------- EMAC_USF : (EMAC Offset: 0x80) Undersize Frames Register -------- */
+#define EMAC_USF_USF_Pos 0
+#define EMAC_USF_USF_Msk (0xffu << EMAC_USF_USF_Pos) /**< \brief (EMAC_USF) Undersize frames */
+#define EMAC_USF_USF(value) ((EMAC_USF_USF_Msk & ((value) << EMAC_USF_USF_Pos)))
+/* -------- EMAC_STE : (EMAC Offset: 0x84) SQE Test Errors Register -------- */
+#define EMAC_STE_SQER_Pos 0
+#define EMAC_STE_SQER_Msk (0xffu << EMAC_STE_SQER_Pos) /**< \brief (EMAC_STE) SQE test errors */
+#define EMAC_STE_SQER(value) ((EMAC_STE_SQER_Msk & ((value) << EMAC_STE_SQER_Pos)))
+/* -------- EMAC_RLE : (EMAC Offset: 0x88) Received Length Field Mismatch Register -------- */
+#define EMAC_RLE_RLFM_Pos 0
+#define EMAC_RLE_RLFM_Msk (0xffu << EMAC_RLE_RLFM_Pos) /**< \brief (EMAC_RLE) Receive Length Field Mismatch */
+#define EMAC_RLE_RLFM(value) ((EMAC_RLE_RLFM_Msk & ((value) << EMAC_RLE_RLFM_Pos)))
+/* -------- EMAC_HRB : (EMAC Offset: 0x90) Hash Register Bottom [31:0] Register -------- */
+#define EMAC_HRB_ADDR_Pos 0
+#define EMAC_HRB_ADDR_Msk (0xffffffffu << EMAC_HRB_ADDR_Pos) /**< \brief (EMAC_HRB) */
+#define EMAC_HRB_ADDR(value) ((EMAC_HRB_ADDR_Msk & ((value) << EMAC_HRB_ADDR_Pos)))
+/* -------- EMAC_HRT : (EMAC Offset: 0x94) Hash Register Top [63:32] Register -------- */
+#define EMAC_HRT_ADDR_Pos 0
+#define EMAC_HRT_ADDR_Msk (0xffffffffu << EMAC_HRT_ADDR_Pos) /**< \brief (EMAC_HRT) */
+#define EMAC_HRT_ADDR(value) ((EMAC_HRT_ADDR_Msk & ((value) << EMAC_HRT_ADDR_Pos)))
+/* -------- EMAC_SAxB : (EMAC Offset: N/A) Specific Address 1 Bottom Register -------- */
+#define EMAC_SAxB_ADDR_Pos 0
+#define EMAC_SAxB_ADDR_Msk (0xffffffffu << EMAC_SAxB_ADDR_Pos) /**< \brief (EMAC_SAxB) */
+#define EMAC_SAxB_ADDR(value) ((EMAC_SAxB_ADDR_Msk & ((value) << EMAC_SAxB_ADDR_Pos)))
+/* -------- EMAC_SAxT : (EMAC Offset: N/A) Specific Address 1 Top Register -------- */
+#define EMAC_SAxT_ADDR_Pos 0
+#define EMAC_SAxT_ADDR_Msk (0xffffu << EMAC_SAxT_ADDR_Pos) /**< \brief (EMAC_SAxT) */
+#define EMAC_SAxT_ADDR(value) ((EMAC_SAxT_ADDR_Msk & ((value) << EMAC_SAxT_ADDR_Pos)))
+/* -------- EMAC_TID : (EMAC Offset: 0xB8) Type ID Checking Register -------- */
+#define EMAC_TID_TID_Pos 0
+#define EMAC_TID_TID_Msk (0xffffu << EMAC_TID_TID_Pos) /**< \brief (EMAC_TID) Type ID checking */
+#define EMAC_TID_TID(value) ((EMAC_TID_TID_Msk & ((value) << EMAC_TID_TID_Pos)))
+/* -------- EMAC_USRIO : (EMAC Offset: 0xC0) User Input/Output Register -------- */
+#define EMAC_USRIO_RMII (0x1u << 0) /**< \brief (EMAC_USRIO) Reduce MII */
+#define EMAC_USRIO_CLKEN (0x1u << 1) /**< \brief (EMAC_USRIO) Clock Enable */
+
+/*@}*/
+
+/* ============================================================================= */
+/** SOFTWARE API DEFINITION FOR General Purpose Backup Register */
+/* ============================================================================= */
+/** \addtogroup SAM3XA_GPBR General Purpose Backup Register */
+/*@{*/
+
+#ifndef __ASSEMBLY__
+/** \brief Gpbr hardware registers */
+typedef struct {
+ RwReg SYS_GPBR0; /**< \brief (Gpbr Offset: 0x0) General Purpose Backup Register 0 */
+ RwReg SYS_GPBR1; /**< \brief (Gpbr Offset: 0x4) General Purpose Backup Register 1 */
+ RwReg SYS_GPBR2; /**< \brief (Gpbr Offset: 0x8) General Purpose Backup Register 2 */
+ RwReg SYS_GPBR3; /**< \brief (Gpbr Offset: 0xC) General Purpose Backup Register 3 */
+ RwReg SYS_GPBR4; /**< \brief (Gpbr Offset: 0x10) General Purpose Backup Register 4 */
+ RwReg SYS_GPBR5; /**< \brief (Gpbr Offset: 0x14) General Purpose Backup Register 5 */
+ RwReg SYS_GPBR6; /**< \brief (Gpbr Offset: 0x18) General Purpose Backup Register 6 */
+ RwReg SYS_GPBR7; /**< \brief (Gpbr Offset: 0x1C) General Purpose Backup Register 7 */
+} Gpbr;
+#endif /* __ASSEMBLY__ */
+/* -------- SYS_GPBR0 : (GPBR Offset: 0x0) General Purpose Backup Register 0 -------- */
+#define SYS_GPBR0_GPBR_VALUE0_Pos 0
+#define SYS_GPBR0_GPBR_VALUE0_Msk (0xffffffffu << SYS_GPBR0_GPBR_VALUE0_Pos) /**< \brief (SYS_GPBR0) Value of GPBR x */
+#define SYS_GPBR0_GPBR_VALUE0(value) ((SYS_GPBR0_GPBR_VALUE0_Msk & ((value) << SYS_GPBR0_GPBR_VALUE0_Pos)))
+/* -------- SYS_GPBR1 : (GPBR Offset: 0x4) General Purpose Backup Register 1 -------- */
+#define SYS_GPBR1_GPBR_VALUE1_Pos 0
+#define SYS_GPBR1_GPBR_VALUE1_Msk (0xffffffffu << SYS_GPBR1_GPBR_VALUE1_Pos) /**< \brief (SYS_GPBR1) Value of GPBR x */
+#define SYS_GPBR1_GPBR_VALUE1(value) ((SYS_GPBR1_GPBR_VALUE1_Msk & ((value) << SYS_GPBR1_GPBR_VALUE1_Pos)))
+/* -------- SYS_GPBR2 : (GPBR Offset: 0x8) General Purpose Backup Register 2 -------- */
+#define SYS_GPBR2_GPBR_VALUE2_Pos 0
+#define SYS_GPBR2_GPBR_VALUE2_Msk (0xffffffffu << SYS_GPBR2_GPBR_VALUE2_Pos) /**< \brief (SYS_GPBR2) Value of GPBR x */
+#define SYS_GPBR2_GPBR_VALUE2(value) ((SYS_GPBR2_GPBR_VALUE2_Msk & ((value) << SYS_GPBR2_GPBR_VALUE2_Pos)))
+/* -------- SYS_GPBR3 : (GPBR Offset: 0xC) General Purpose Backup Register 3 -------- */
+#define SYS_GPBR3_GPBR_VALUE3_Pos 0
+#define SYS_GPBR3_GPBR_VALUE3_Msk (0xffffffffu << SYS_GPBR3_GPBR_VALUE3_Pos) /**< \brief (SYS_GPBR3) Value of GPBR x */
+#define SYS_GPBR3_GPBR_VALUE3(value) ((SYS_GPBR3_GPBR_VALUE3_Msk & ((value) << SYS_GPBR3_GPBR_VALUE3_Pos)))
+/* -------- SYS_GPBR4 : (GPBR Offset: 0x10) General Purpose Backup Register 4 -------- */
+#define SYS_GPBR4_GPBR_VALUE4_Pos 0
+#define SYS_GPBR4_GPBR_VALUE4_Msk (0xffffffffu << SYS_GPBR4_GPBR_VALUE4_Pos) /**< \brief (SYS_GPBR4) Value of GPBR x */
+#define SYS_GPBR4_GPBR_VALUE4(value) ((SYS_GPBR4_GPBR_VALUE4_Msk & ((value) << SYS_GPBR4_GPBR_VALUE4_Pos)))
+/* -------- SYS_GPBR5 : (GPBR Offset: 0x14) General Purpose Backup Register 5 -------- */
+#define SYS_GPBR5_GPBR_VALUE5_Pos 0
+#define SYS_GPBR5_GPBR_VALUE5_Msk (0xffffffffu << SYS_GPBR5_GPBR_VALUE5_Pos) /**< \brief (SYS_GPBR5) Value of GPBR x */
+#define SYS_GPBR5_GPBR_VALUE5(value) ((SYS_GPBR5_GPBR_VALUE5_Msk & ((value) << SYS_GPBR5_GPBR_VALUE5_Pos)))
+/* -------- SYS_GPBR6 : (GPBR Offset: 0x18) General Purpose Backup Register 6 -------- */
+#define SYS_GPBR6_GPBR_VALUE6_Pos 0
+#define SYS_GPBR6_GPBR_VALUE6_Msk (0xffffffffu << SYS_GPBR6_GPBR_VALUE6_Pos) /**< \brief (SYS_GPBR6) Value of GPBR x */
+#define SYS_GPBR6_GPBR_VALUE6(value) ((SYS_GPBR6_GPBR_VALUE6_Msk & ((value) << SYS_GPBR6_GPBR_VALUE6_Pos)))
+/* -------- SYS_GPBR7 : (GPBR Offset: 0x1C) General Purpose Backup Register 7 -------- */
+#define SYS_GPBR7_GPBR_VALUE7_Pos 0
+#define SYS_GPBR7_GPBR_VALUE7_Msk (0xffffffffu << SYS_GPBR7_GPBR_VALUE7_Pos) /**< \brief (SYS_GPBR7) Value of GPBR x */
+#define SYS_GPBR7_GPBR_VALUE7(value) ((SYS_GPBR7_GPBR_VALUE7_Msk & ((value) << SYS_GPBR7_GPBR_VALUE7_Pos)))
+
+/*@}*/
+
+/* ============================================================================= */
+/** SOFTWARE API DEFINITION FOR High Speed MultiMedia Card Interface */
+/* ============================================================================= */
+/** \addtogroup SAM3XA_HSMCI High Speed MultiMedia Card Interface */
+/*@{*/
+
+#ifndef __ASSEMBLY__
+/** \brief Hsmci hardware registers */
+typedef struct {
+ WoReg HSMCI_CR; /**< \brief (Hsmci Offset: 0x00) Control Register */
+ RwReg HSMCI_MR; /**< \brief (Hsmci Offset: 0x04) Mode Register */
+ RwReg HSMCI_DTOR; /**< \brief (Hsmci Offset: 0x08) Data Timeout Register */
+ RwReg HSMCI_SDCR; /**< \brief (Hsmci Offset: 0x0C) SD/SDIO Card Register */
+ RwReg HSMCI_ARGR; /**< \brief (Hsmci Offset: 0x10) Argument Register */
+ WoReg HSMCI_CMDR; /**< \brief (Hsmci Offset: 0x14) Command Register */
+ RwReg HSMCI_BLKR; /**< \brief (Hsmci Offset: 0x18) Block Register */
+ RwReg HSMCI_CSTOR; /**< \brief (Hsmci Offset: 0x1C) Completion Signal Timeout Register */
+ RoReg HSMCI_RSPR[4]; /**< \brief (Hsmci Offset: 0x20) Response Register */
+ RoReg HSMCI_RDR; /**< \brief (Hsmci Offset: 0x30) Receive Data Register */
+ WoReg HSMCI_TDR; /**< \brief (Hsmci Offset: 0x34) Transmit Data Register */
+ RoReg Reserved1[2];
+ RoReg HSMCI_SR; /**< \brief (Hsmci Offset: 0x40) Status Register */
+ WoReg HSMCI_IER; /**< \brief (Hsmci Offset: 0x44) Interrupt Enable Register */
+ WoReg HSMCI_IDR; /**< \brief (Hsmci Offset: 0x48) Interrupt Disable Register */
+ RoReg HSMCI_IMR; /**< \brief (Hsmci Offset: 0x4C) Interrupt Mask Register */
+ RwReg HSMCI_DMA; /**< \brief (Hsmci Offset: 0x50) DMA Configuration Register */
+ RwReg HSMCI_CFG; /**< \brief (Hsmci Offset: 0x54) Configuration Register */
+ RoReg Reserved2[35];
+ RwReg HSMCI_WPMR; /**< \brief (Hsmci Offset: 0xE4) Write Protection Mode Register */
+ RoReg HSMCI_WPSR; /**< \brief (Hsmci Offset: 0xE8) Write Protection Status Register */
+ RoReg Reserved3[69];
+ RwReg HSMCI_FIFO[256]; /**< \brief (Hsmci Offset: 0x200) FIFO Memory Aperture0 */
+} Hsmci;
+#endif /* __ASSEMBLY__ */
+/* -------- HSMCI_CR : (HSMCI Offset: 0x00) Control Register -------- */
+#define HSMCI_CR_MCIEN (0x1u << 0) /**< \brief (HSMCI_CR) Multi-Media Interface Enable */
+#define HSMCI_CR_MCIDIS (0x1u << 1) /**< \brief (HSMCI_CR) Multi-Media Interface Disable */
+#define HSMCI_CR_PWSEN (0x1u << 2) /**< \brief (HSMCI_CR) Power Save Mode Enable */
+#define HSMCI_CR_PWSDIS (0x1u << 3) /**< \brief (HSMCI_CR) Power Save Mode Disable */
+#define HSMCI_CR_SWRST (0x1u << 7) /**< \brief (HSMCI_CR) Software Reset */
+/* -------- HSMCI_MR : (HSMCI Offset: 0x04) Mode Register -------- */
+#define HSMCI_MR_CLKDIV_Pos 0
+#define HSMCI_MR_CLKDIV_Msk (0xffu << HSMCI_MR_CLKDIV_Pos) /**< \brief (HSMCI_MR) Clock Divider */
+#define HSMCI_MR_CLKDIV(value) ((HSMCI_MR_CLKDIV_Msk & ((value) << HSMCI_MR_CLKDIV_Pos)))
+#define HSMCI_MR_PWSDIV_Pos 8
+#define HSMCI_MR_PWSDIV_Msk (0x7u << HSMCI_MR_PWSDIV_Pos) /**< \brief (HSMCI_MR) Power Saving Divider */
+#define HSMCI_MR_PWSDIV(value) ((HSMCI_MR_PWSDIV_Msk & ((value) << HSMCI_MR_PWSDIV_Pos)))
+#define HSMCI_MR_RDPROOF (0x1u << 11) /**< \brief (HSMCI_MR) */
+#define HSMCI_MR_WRPROOF (0x1u << 12) /**< \brief (HSMCI_MR) */
+#define HSMCI_MR_FBYTE (0x1u << 13) /**< \brief (HSMCI_MR) Force Byte Transfer */
+#define HSMCI_MR_PADV (0x1u << 14) /**< \brief (HSMCI_MR) Padding Value */
+#define HSMCI_MR_BLKLEN_Pos 16
+#define HSMCI_MR_BLKLEN_Msk (0xffffu << HSMCI_MR_BLKLEN_Pos) /**< \brief (HSMCI_MR) Data Block Length */
+#define HSMCI_MR_BLKLEN(value) ((HSMCI_MR_BLKLEN_Msk & ((value) << HSMCI_MR_BLKLEN_Pos)))
+/* -------- HSMCI_DTOR : (HSMCI Offset: 0x08) Data Timeout Register -------- */
+#define HSMCI_DTOR_DTOCYC_Pos 0
+#define HSMCI_DTOR_DTOCYC_Msk (0xfu << HSMCI_DTOR_DTOCYC_Pos) /**< \brief (HSMCI_DTOR) Data Timeout Cycle Number */
+#define HSMCI_DTOR_DTOCYC(value) ((HSMCI_DTOR_DTOCYC_Msk & ((value) << HSMCI_DTOR_DTOCYC_Pos)))
+#define HSMCI_DTOR_DTOMUL_Pos 4
+#define HSMCI_DTOR_DTOMUL_Msk (0x7u << HSMCI_DTOR_DTOMUL_Pos) /**< \brief (HSMCI_DTOR) Data Timeout Multiplier */
+#define HSMCI_DTOR_DTOMUL_1 (0x0u << 4) /**< \brief (HSMCI_DTOR) DTOCYC */
+#define HSMCI_DTOR_DTOMUL_16 (0x1u << 4) /**< \brief (HSMCI_DTOR) DTOCYC x 16 */
+#define HSMCI_DTOR_DTOMUL_128 (0x2u << 4) /**< \brief (HSMCI_DTOR) DTOCYC x 128 */
+#define HSMCI_DTOR_DTOMUL_256 (0x3u << 4) /**< \brief (HSMCI_DTOR) DTOCYC x 256 */
+#define HSMCI_DTOR_DTOMUL_1024 (0x4u << 4) /**< \brief (HSMCI_DTOR) DTOCYC x 1024 */
+#define HSMCI_DTOR_DTOMUL_4096 (0x5u << 4) /**< \brief (HSMCI_DTOR) DTOCYC x 4096 */
+#define HSMCI_DTOR_DTOMUL_65536 (0x6u << 4) /**< \brief (HSMCI_DTOR) DTOCYC x 65536 */
+#define HSMCI_DTOR_DTOMUL_1048576 (0x7u << 4) /**< \brief (HSMCI_DTOR) DTOCYC x 1048576 */
+/* -------- HSMCI_SDCR : (HSMCI Offset: 0x0C) SD/SDIO Card Register -------- */
+#define HSMCI_SDCR_SDCSEL_Pos 0
+#define HSMCI_SDCR_SDCSEL_Msk (0x3u << HSMCI_SDCR_SDCSEL_Pos) /**< \brief (HSMCI_SDCR) SDCard/SDIO Slot */
+#define HSMCI_SDCR_SDCSEL_SLOTA (0x0u << 0) /**< \brief (HSMCI_SDCR) Slot A is selected. */
+#define HSMCI_SDCR_SDCSEL_SLOTB (0x1u << 0) /**< \brief (HSMCI_SDCR) SDCARD/SDIO Slot B selected */
+#define HSMCI_SDCR_SDCSEL_SLOTC (0x2u << 0) /**< \brief (HSMCI_SDCR) - */
+#define HSMCI_SDCR_SDCSEL_SLOTD (0x3u << 0) /**< \brief (HSMCI_SDCR) - */
+#define HSMCI_SDCR_SDCBUS_Pos 6
+#define HSMCI_SDCR_SDCBUS_Msk (0x3u << HSMCI_SDCR_SDCBUS_Pos) /**< \brief (HSMCI_SDCR) SDCard/SDIO Bus Width */
+#define HSMCI_SDCR_SDCBUS_1 (0x0u << 6) /**< \brief (HSMCI_SDCR) 1 bit */
+#define HSMCI_SDCR_SDCBUS_4 (0x2u << 6) /**< \brief (HSMCI_SDCR) 4 bit */
+#define HSMCI_SDCR_SDCBUS_8 (0x3u << 6) /**< \brief (HSMCI_SDCR) 8 bit */
+/* -------- HSMCI_ARGR : (HSMCI Offset: 0x10) Argument Register -------- */
+#define HSMCI_ARGR_ARG_Pos 0
+#define HSMCI_ARGR_ARG_Msk (0xffffffffu << HSMCI_ARGR_ARG_Pos) /**< \brief (HSMCI_ARGR) Command Argument */
+#define HSMCI_ARGR_ARG(value) ((HSMCI_ARGR_ARG_Msk & ((value) << HSMCI_ARGR_ARG_Pos)))
+/* -------- HSMCI_CMDR : (HSMCI Offset: 0x14) Command Register -------- */
+#define HSMCI_CMDR_CMDNB_Pos 0
+#define HSMCI_CMDR_CMDNB_Msk (0x3fu << HSMCI_CMDR_CMDNB_Pos) /**< \brief (HSMCI_CMDR) Command Number */
+#define HSMCI_CMDR_CMDNB(value) ((HSMCI_CMDR_CMDNB_Msk & ((value) << HSMCI_CMDR_CMDNB_Pos)))
+#define HSMCI_CMDR_RSPTYP_Pos 6
+#define HSMCI_CMDR_RSPTYP_Msk (0x3u << HSMCI_CMDR_RSPTYP_Pos) /**< \brief (HSMCI_CMDR) Response Type */
+#define HSMCI_CMDR_RSPTYP_NORESP (0x0u << 6) /**< \brief (HSMCI_CMDR) No response. */
+#define HSMCI_CMDR_RSPTYP_48_BIT (0x1u << 6) /**< \brief (HSMCI_CMDR) 48-bit response. */
+#define HSMCI_CMDR_RSPTYP_136_BIT (0x2u << 6) /**< \brief (HSMCI_CMDR) 136-bit response. */
+#define HSMCI_CMDR_RSPTYP_R1B (0x3u << 6) /**< \brief (HSMCI_CMDR) R1b response type */
+#define HSMCI_CMDR_SPCMD_Pos 8
+#define HSMCI_CMDR_SPCMD_Msk (0x7u << HSMCI_CMDR_SPCMD_Pos) /**< \brief (HSMCI_CMDR) Special Command */
+#define HSMCI_CMDR_SPCMD_STD (0x0u << 8) /**< \brief (HSMCI_CMDR) Not a special CMD. */
+#define HSMCI_CMDR_SPCMD_INIT (0x1u << 8) /**< \brief (HSMCI_CMDR) Initialization CMD: 74 clock cycles for initialization sequence. */
+#define HSMCI_CMDR_SPCMD_SYNC (0x2u << 8) /**< \brief (HSMCI_CMDR) Synchronized CMD: Wait for the end of the current data block transfer before sending the pending command. */
+#define HSMCI_CMDR_SPCMD_CE_ATA (0x3u << 8) /**< \brief (HSMCI_CMDR) CE-ATA Completion Signal disable Command. The host cancels the ability for the device to return a command completion signal on the command line. */
+#define HSMCI_CMDR_SPCMD_IT_CMD (0x4u << 8) /**< \brief (HSMCI_CMDR) Interrupt command: Corresponds to the Interrupt Mode (CMD40). */
+#define HSMCI_CMDR_SPCMD_IT_RESP (0x5u << 8) /**< \brief (HSMCI_CMDR) Interrupt response: Corresponds to the Interrupt Mode (CMD40). */
+#define HSMCI_CMDR_SPCMD_BOR (0x6u << 8) /**< \brief (HSMCI_CMDR) Boot Operation Request. Start a boot operation mode, the host processor can read boot data from the MMC device directly. */
+#define HSMCI_CMDR_SPCMD_EBO (0x7u << 8) /**< \brief (HSMCI_CMDR) End Boot Operation. This command allows the host processor to terminate the boot operation mode. */
+#define HSMCI_CMDR_OPDCMD (0x1u << 11) /**< \brief (HSMCI_CMDR) Open Drain Command */
+#define HSMCI_CMDR_OPDCMD_PUSHPULL (0x0u << 11) /**< \brief (HSMCI_CMDR) Push pull command. */
+#define HSMCI_CMDR_OPDCMD_OPENDRAIN (0x1u << 11) /**< \brief (HSMCI_CMDR) Open drain command. */
+#define HSMCI_CMDR_MAXLAT (0x1u << 12) /**< \brief (HSMCI_CMDR) Max Latency for Command to Response */
+#define HSMCI_CMDR_MAXLAT_5 (0x0u << 12) /**< \brief (HSMCI_CMDR) 5-cycle max latency. */
+#define HSMCI_CMDR_MAXLAT_64 (0x1u << 12) /**< \brief (HSMCI_CMDR) 64-cycle max latency. */
+#define HSMCI_CMDR_TRCMD_Pos 16
+#define HSMCI_CMDR_TRCMD_Msk (0x3u << HSMCI_CMDR_TRCMD_Pos) /**< \brief (HSMCI_CMDR) Transfer Command */
+#define HSMCI_CMDR_TRCMD_NO_DATA (0x0u << 16) /**< \brief (HSMCI_CMDR) No data transfer */
+#define HSMCI_CMDR_TRCMD_START_DATA (0x1u << 16) /**< \brief (HSMCI_CMDR) Start data transfer */
+#define HSMCI_CMDR_TRCMD_STOP_DATA (0x2u << 16) /**< \brief (HSMCI_CMDR) Stop data transfer */
+#define HSMCI_CMDR_TRDIR (0x1u << 18) /**< \brief (HSMCI_CMDR) Transfer Direction */
+#define HSMCI_CMDR_TRDIR_WRITE (0x0u << 18) /**< \brief (HSMCI_CMDR) Write. */
+#define HSMCI_CMDR_TRDIR_READ (0x1u << 18) /**< \brief (HSMCI_CMDR) Read. */
+#define HSMCI_CMDR_TRTYP_Pos 19
+#define HSMCI_CMDR_TRTYP_Msk (0x7u << HSMCI_CMDR_TRTYP_Pos) /**< \brief (HSMCI_CMDR) Transfer Type */
+#define HSMCI_CMDR_TRTYP_SINGLE (0x0u << 19) /**< \brief (HSMCI_CMDR) MMC/SDCard Single Block */
+#define HSMCI_CMDR_TRTYP_MULTIPLE (0x1u << 19) /**< \brief (HSMCI_CMDR) MMC/SDCard Multiple Block */
+#define HSMCI_CMDR_TRTYP_STREAM (0x2u << 19) /**< \brief (HSMCI_CMDR) MMC Stream */
+#define HSMCI_CMDR_TRTYP_BYTE (0x4u << 19) /**< \brief (HSMCI_CMDR) SDIO Byte */
+#define HSMCI_CMDR_TRTYP_BLOCK (0x5u << 19) /**< \brief (HSMCI_CMDR) SDIO Block */
+#define HSMCI_CMDR_IOSPCMD_Pos 24
+#define HSMCI_CMDR_IOSPCMD_Msk (0x3u << HSMCI_CMDR_IOSPCMD_Pos) /**< \brief (HSMCI_CMDR) SDIO Special Command */
+#define HSMCI_CMDR_IOSPCMD_STD (0x0u << 24) /**< \brief (HSMCI_CMDR) Not an SDIO Special Command */
+#define HSMCI_CMDR_IOSPCMD_SUSPEND (0x1u << 24) /**< \brief (HSMCI_CMDR) SDIO Suspend Command */
+#define HSMCI_CMDR_IOSPCMD_RESUME (0x2u << 24) /**< \brief (HSMCI_CMDR) SDIO Resume Command */
+#define HSMCI_CMDR_ATACS (0x1u << 26) /**< \brief (HSMCI_CMDR) ATA with Command Completion Signal */
+#define HSMCI_CMDR_ATACS_NORMAL (0x0u << 26) /**< \brief (HSMCI_CMDR) Normal operation mode. */
+#define HSMCI_CMDR_ATACS_COMPLETION (0x1u << 26) /**< \brief (HSMCI_CMDR) This bit indicates that a completion signal is expected within a programmed amount of time (HSMCI_CSTOR). */
+#define HSMCI_CMDR_BOOT_ACK (0x1u << 27) /**< \brief (HSMCI_CMDR) Boot Operation Acknowledge. */
+/* -------- HSMCI_BLKR : (HSMCI Offset: 0x18) Block Register -------- */
+#define HSMCI_BLKR_BCNT_Pos 0
+#define HSMCI_BLKR_BCNT_Msk (0xffffu << HSMCI_BLKR_BCNT_Pos) /**< \brief (HSMCI_BLKR) MMC/SDIO Block Count - SDIO Byte Count */
+#define HSMCI_BLKR_BCNT_MULTIPLE (0x0u << 0) /**< \brief (HSMCI_BLKR) MMC/SDCARD Multiple BlockFrom 1 to 65635: Value 0 corresponds to an infinite block transfer. */
+#define HSMCI_BLKR_BCNT_BYTE (0x4u << 0) /**< \brief (HSMCI_BLKR) SDIO ByteFrom 1 to 512 bytes: Value 0 corresponds to a 512-byte transfer.Values from 0x200 to 0xFFFF are forbidden. */
+#define HSMCI_BLKR_BCNT_BLOCK (0x5u << 0) /**< \brief (HSMCI_BLKR) SDIO BlockFrom 1 to 511 blocks: Value 0 corresponds to an infinite block transfer.Values from 0x200 to 0xFFFF are forbidden. */
+#define HSMCI_BLKR_BLKLEN_Pos 16
+#define HSMCI_BLKR_BLKLEN_Msk (0xffffu << HSMCI_BLKR_BLKLEN_Pos) /**< \brief (HSMCI_BLKR) Data Block Length */
+#define HSMCI_BLKR_BLKLEN(value) ((HSMCI_BLKR_BLKLEN_Msk & ((value) << HSMCI_BLKR_BLKLEN_Pos)))
+/* -------- HSMCI_CSTOR : (HSMCI Offset: 0x1C) Completion Signal Timeout Register -------- */
+#define HSMCI_CSTOR_CSTOCYC_Pos 0
+#define HSMCI_CSTOR_CSTOCYC_Msk (0xfu << HSMCI_CSTOR_CSTOCYC_Pos) /**< \brief (HSMCI_CSTOR) Completion Signal Timeout Cycle Number */
+#define HSMCI_CSTOR_CSTOCYC(value) ((HSMCI_CSTOR_CSTOCYC_Msk & ((value) << HSMCI_CSTOR_CSTOCYC_Pos)))
+#define HSMCI_CSTOR_CSTOMUL_Pos 4
+#define HSMCI_CSTOR_CSTOMUL_Msk (0x7u << HSMCI_CSTOR_CSTOMUL_Pos) /**< \brief (HSMCI_CSTOR) Completion Signal Timeout Multiplier */
+#define HSMCI_CSTOR_CSTOMUL_1 (0x0u << 4) /**< \brief (HSMCI_CSTOR) CSTOCYC x 1 */
+#define HSMCI_CSTOR_CSTOMUL_16 (0x1u << 4) /**< \brief (HSMCI_CSTOR) CSTOCYC x 16 */
+#define HSMCI_CSTOR_CSTOMUL_128 (0x2u << 4) /**< \brief (HSMCI_CSTOR) CSTOCYC x 128 */
+#define HSMCI_CSTOR_CSTOMUL_256 (0x3u << 4) /**< \brief (HSMCI_CSTOR) CSTOCYC x 256 */
+#define HSMCI_CSTOR_CSTOMUL_1024 (0x4u << 4) /**< \brief (HSMCI_CSTOR) CSTOCYC x 1024 */
+#define HSMCI_CSTOR_CSTOMUL_4096 (0x5u << 4) /**< \brief (HSMCI_CSTOR) CSTOCYC x 4096 */
+#define HSMCI_CSTOR_CSTOMUL_65536 (0x6u << 4) /**< \brief (HSMCI_CSTOR) CSTOCYC x 65536 */
+#define HSMCI_CSTOR_CSTOMUL_1048576 (0x7u << 4) /**< \brief (HSMCI_CSTOR) CSTOCYC x 1048576 */
+/* -------- HSMCI_RSPR[4] : (HSMCI Offset: 0x20) Response Register -------- */
+#define HSMCI_RSPR_RSP_Pos 0
+#define HSMCI_RSPR_RSP_Msk (0xffffffffu << HSMCI_RSPR_RSP_Pos) /**< \brief (HSMCI_RSPR[4]) Response */
+/* -------- HSMCI_RDR : (HSMCI Offset: 0x30) Receive Data Register -------- */
+#define HSMCI_RDR_DATA_Pos 0
+#define HSMCI_RDR_DATA_Msk (0xffffffffu << HSMCI_RDR_DATA_Pos) /**< \brief (HSMCI_RDR) Data to Read */
+/* -------- HSMCI_TDR : (HSMCI Offset: 0x34) Transmit Data Register -------- */
+#define HSMCI_TDR_DATA_Pos 0
+#define HSMCI_TDR_DATA_Msk (0xffffffffu << HSMCI_TDR_DATA_Pos) /**< \brief (HSMCI_TDR) Data to Write */
+#define HSMCI_TDR_DATA(value) ((HSMCI_TDR_DATA_Msk & ((value) << HSMCI_TDR_DATA_Pos)))
+/* -------- HSMCI_SR : (HSMCI Offset: 0x40) Status Register -------- */
+#define HSMCI_SR_CMDRDY (0x1u << 0) /**< \brief (HSMCI_SR) Command Ready */
+#define HSMCI_SR_RXRDY (0x1u << 1) /**< \brief (HSMCI_SR) Receiver Ready */
+#define HSMCI_SR_TXRDY (0x1u << 2) /**< \brief (HSMCI_SR) Transmit Ready */
+#define HSMCI_SR_BLKE (0x1u << 3) /**< \brief (HSMCI_SR) Data Block Ended */
+#define HSMCI_SR_DTIP (0x1u << 4) /**< \brief (HSMCI_SR) Data Transfer in Progress */
+#define HSMCI_SR_NOTBUSY (0x1u << 5) /**< \brief (HSMCI_SR) HSMCI Not Busy */
+#define HSMCI_SR_SDIOIRQforSlotA (0x1u << 8) /**< \brief (HSMCI_SR) */
+#define HSMCI_SR_SDIOIRQforSlotB (0x1u << 9) /**< \brief (HSMCI_SR) */
+#define HSMCI_SR_SDIOWAIT (0x1u << 12) /**< \brief (HSMCI_SR) SDIO Read Wait Operation Status */
+#define HSMCI_SR_CSRCV (0x1u << 13) /**< \brief (HSMCI_SR) CE-ATA Completion Signal Received */
+#define HSMCI_SR_RINDE (0x1u << 16) /**< \brief (HSMCI_SR) Response Index Error */
+#define HSMCI_SR_RDIRE (0x1u << 17) /**< \brief (HSMCI_SR) Response Direction Error */
+#define HSMCI_SR_RCRCE (0x1u << 18) /**< \brief (HSMCI_SR) Response CRC Error */
+#define HSMCI_SR_RENDE (0x1u << 19) /**< \brief (HSMCI_SR) Response End Bit Error */
+#define HSMCI_SR_RTOE (0x1u << 20) /**< \brief (HSMCI_SR) Response Time-out Error */
+#define HSMCI_SR_DCRCE (0x1u << 21) /**< \brief (HSMCI_SR) Data CRC Error */
+#define HSMCI_SR_DTOE (0x1u << 22) /**< \brief (HSMCI_SR) Data Time-out Error */
+#define HSMCI_SR_CSTOE (0x1u << 23) /**< \brief (HSMCI_SR) Completion Signal Time-out Error */
+#define HSMCI_SR_BLKOVRE (0x1u << 24) /**< \brief (HSMCI_SR) DMA Block Overrun Error */
+#define HSMCI_SR_DMADONE (0x1u << 25) /**< \brief (HSMCI_SR) DMA Transfer done */
+#define HSMCI_SR_FIFOEMPTY (0x1u << 26) /**< \brief (HSMCI_SR) FIFO empty flag */
+#define HSMCI_SR_XFRDONE (0x1u << 27) /**< \brief (HSMCI_SR) Transfer Done flag */
+#define HSMCI_SR_ACKRCV (0x1u << 28) /**< \brief (HSMCI_SR) Boot Operation Acknowledge Received */
+#define HSMCI_SR_ACKRCVE (0x1u << 29) /**< \brief (HSMCI_SR) Boot Operation Acknowledge Error */
+#define HSMCI_SR_OVRE (0x1u << 30) /**< \brief (HSMCI_SR) Overrun */
+#define HSMCI_SR_UNRE (0x1u << 31) /**< \brief (HSMCI_SR) Underrun */
+/* -------- HSMCI_IER : (HSMCI Offset: 0x44) Interrupt Enable Register -------- */
+#define HSMCI_IER_CMDRDY (0x1u << 0) /**< \brief (HSMCI_IER) Command Ready Interrupt Enable */
+#define HSMCI_IER_RXRDY (0x1u << 1) /**< \brief (HSMCI_IER) Receiver Ready Interrupt Enable */
+#define HSMCI_IER_TXRDY (0x1u << 2) /**< \brief (HSMCI_IER) Transmit Ready Interrupt Enable */
+#define HSMCI_IER_BLKE (0x1u << 3) /**< \brief (HSMCI_IER) Data Block Ended Interrupt Enable */
+#define HSMCI_IER_DTIP (0x1u << 4) /**< \brief (HSMCI_IER) Data Transfer in Progress Interrupt Enable */
+#define HSMCI_IER_NOTBUSY (0x1u << 5) /**< \brief (HSMCI_IER) Data Not Busy Interrupt Enable */
+#define HSMCI_IER_SDIOIRQforSlotA (0x1u << 8) /**< \brief (HSMCI_IER) */
+#define HSMCI_IER_SDIOIRQforSlotB (0x1u << 9) /**< \brief (HSMCI_IER) */
+#define HSMCI_IER_SDIOWAIT (0x1u << 12) /**< \brief (HSMCI_IER) SDIO Read Wait Operation Status Interrupt Enable */
+#define HSMCI_IER_CSRCV (0x1u << 13) /**< \brief (HSMCI_IER) Completion Signal Received Interrupt Enable */
+#define HSMCI_IER_RINDE (0x1u << 16) /**< \brief (HSMCI_IER) Response Index Error Interrupt Enable */
+#define HSMCI_IER_RDIRE (0x1u << 17) /**< \brief (HSMCI_IER) Response Direction Error Interrupt Enable */
+#define HSMCI_IER_RCRCE (0x1u << 18) /**< \brief (HSMCI_IER) Response CRC Error Interrupt Enable */
+#define HSMCI_IER_RENDE (0x1u << 19) /**< \brief (HSMCI_IER) Response End Bit Error Interrupt Enable */
+#define HSMCI_IER_RTOE (0x1u << 20) /**< \brief (HSMCI_IER) Response Time-out Error Interrupt Enable */
+#define HSMCI_IER_DCRCE (0x1u << 21) /**< \brief (HSMCI_IER) Data CRC Error Interrupt Enable */
+#define HSMCI_IER_DTOE (0x1u << 22) /**< \brief (HSMCI_IER) Data Time-out Error Interrupt Enable */
+#define HSMCI_IER_CSTOE (0x1u << 23) /**< \brief (HSMCI_IER) Completion Signal Timeout Error Interrupt Enable */
+#define HSMCI_IER_BLKOVRE (0x1u << 24) /**< \brief (HSMCI_IER) DMA Block Overrun Error Interrupt Enable */
+#define HSMCI_IER_DMADONE (0x1u << 25) /**< \brief (HSMCI_IER) DMA Transfer completed Interrupt Enable */
+#define HSMCI_IER_FIFOEMPTY (0x1u << 26) /**< \brief (HSMCI_IER) FIFO empty Interrupt enable */
+#define HSMCI_IER_XFRDONE (0x1u << 27) /**< \brief (HSMCI_IER) Transfer Done Interrupt enable */
+#define HSMCI_IER_ACKRCV (0x1u << 28) /**< \brief (HSMCI_IER) Boot Acknowledge Interrupt Enable */
+#define HSMCI_IER_ACKRCVE (0x1u << 29) /**< \brief (HSMCI_IER) Boot Acknowledge Error Interrupt Enable */
+#define HSMCI_IER_OVRE (0x1u << 30) /**< \brief (HSMCI_IER) Overrun Interrupt Enable */
+#define HSMCI_IER_UNRE (0x1u << 31) /**< \brief (HSMCI_IER) Underrun Interrupt Enable */
+/* -------- HSMCI_IDR : (HSMCI Offset: 0x48) Interrupt Disable Register -------- */
+#define HSMCI_IDR_CMDRDY (0x1u << 0) /**< \brief (HSMCI_IDR) Command Ready Interrupt Disable */
+#define HSMCI_IDR_RXRDY (0x1u << 1) /**< \brief (HSMCI_IDR) Receiver Ready Interrupt Disable */
+#define HSMCI_IDR_TXRDY (0x1u << 2) /**< \brief (HSMCI_IDR) Transmit Ready Interrupt Disable */
+#define HSMCI_IDR_BLKE (0x1u << 3) /**< \brief (HSMCI_IDR) Data Block Ended Interrupt Disable */
+#define HSMCI_IDR_DTIP (0x1u << 4) /**< \brief (HSMCI_IDR) Data Transfer in Progress Interrupt Disable */
+#define HSMCI_IDR_NOTBUSY (0x1u << 5) /**< \brief (HSMCI_IDR) Data Not Busy Interrupt Disable */
+#define HSMCI_IDR_SDIOIRQforSlotA (0x1u << 8) /**< \brief (HSMCI_IDR) */
+#define HSMCI_IDR_SDIOIRQforSlotB (0x1u << 9) /**< \brief (HSMCI_IDR) */
+#define HSMCI_IDR_SDIOWAIT (0x1u << 12) /**< \brief (HSMCI_IDR) SDIO Read Wait Operation Status Interrupt Disable */
+#define HSMCI_IDR_CSRCV (0x1u << 13) /**< \brief (HSMCI_IDR) Completion Signal received interrupt Disable */
+#define HSMCI_IDR_RINDE (0x1u << 16) /**< \brief (HSMCI_IDR) Response Index Error Interrupt Disable */
+#define HSMCI_IDR_RDIRE (0x1u << 17) /**< \brief (HSMCI_IDR) Response Direction Error Interrupt Disable */
+#define HSMCI_IDR_RCRCE (0x1u << 18) /**< \brief (HSMCI_IDR) Response CRC Error Interrupt Disable */
+#define HSMCI_IDR_RENDE (0x1u << 19) /**< \brief (HSMCI_IDR) Response End Bit Error Interrupt Disable */
+#define HSMCI_IDR_RTOE (0x1u << 20) /**< \brief (HSMCI_IDR) Response Time-out Error Interrupt Disable */
+#define HSMCI_IDR_DCRCE (0x1u << 21) /**< \brief (HSMCI_IDR) Data CRC Error Interrupt Disable */
+#define HSMCI_IDR_DTOE (0x1u << 22) /**< \brief (HSMCI_IDR) Data Time-out Error Interrupt Disable */
+#define HSMCI_IDR_CSTOE (0x1u << 23) /**< \brief (HSMCI_IDR) Completion Signal Time out Error Interrupt Disable */
+#define HSMCI_IDR_BLKOVRE (0x1u << 24) /**< \brief (HSMCI_IDR) DMA Block Overrun Error Interrupt Disable */
+#define HSMCI_IDR_DMADONE (0x1u << 25) /**< \brief (HSMCI_IDR) DMA Transfer completed Interrupt Disable */
+#define HSMCI_IDR_FIFOEMPTY (0x1u << 26) /**< \brief (HSMCI_IDR) FIFO empty Interrupt Disable */
+#define HSMCI_IDR_XFRDONE (0x1u << 27) /**< \brief (HSMCI_IDR) Transfer Done Interrupt Disable */
+#define HSMCI_IDR_ACKRCV (0x1u << 28) /**< \brief (HSMCI_IDR) Boot Acknowledge Interrupt Disable */
+#define HSMCI_IDR_ACKRCVE (0x1u << 29) /**< \brief (HSMCI_IDR) Boot Acknowledge Error Interrupt Disable */
+#define HSMCI_IDR_OVRE (0x1u << 30) /**< \brief (HSMCI_IDR) Overrun Interrupt Disable */
+#define HSMCI_IDR_UNRE (0x1u << 31) /**< \brief (HSMCI_IDR) Underrun Interrupt Disable */
+/* -------- HSMCI_IMR : (HSMCI Offset: 0x4C) Interrupt Mask Register -------- */
+#define HSMCI_IMR_CMDRDY (0x1u << 0) /**< \brief (HSMCI_IMR) Command Ready Interrupt Mask */
+#define HSMCI_IMR_RXRDY (0x1u << 1) /**< \brief (HSMCI_IMR) Receiver Ready Interrupt Mask */
+#define HSMCI_IMR_TXRDY (0x1u << 2) /**< \brief (HSMCI_IMR) Transmit Ready Interrupt Mask */
+#define HSMCI_IMR_BLKE (0x1u << 3) /**< \brief (HSMCI_IMR) Data Block Ended Interrupt Mask */
+#define HSMCI_IMR_DTIP (0x1u << 4) /**< \brief (HSMCI_IMR) Data Transfer in Progress Interrupt Mask */
+#define HSMCI_IMR_NOTBUSY (0x1u << 5) /**< \brief (HSMCI_IMR) Data Not Busy Interrupt Mask */
+#define HSMCI_IMR_SDIOIRQforSlotA (0x1u << 8) /**< \brief (HSMCI_IMR) */
+#define HSMCI_IMR_SDIOIRQforSlotB (0x1u << 9) /**< \brief (HSMCI_IMR) */
+#define HSMCI_IMR_SDIOWAIT (0x1u << 12) /**< \brief (HSMCI_IMR) SDIO Read Wait Operation Status Interrupt Mask */
+#define HSMCI_IMR_CSRCV (0x1u << 13) /**< \brief (HSMCI_IMR) Completion Signal Received Interrupt Mask */
+#define HSMCI_IMR_RINDE (0x1u << 16) /**< \brief (HSMCI_IMR) Response Index Error Interrupt Mask */
+#define HSMCI_IMR_RDIRE (0x1u << 17) /**< \brief (HSMCI_IMR) Response Direction Error Interrupt Mask */
+#define HSMCI_IMR_RCRCE (0x1u << 18) /**< \brief (HSMCI_IMR) Response CRC Error Interrupt Mask */
+#define HSMCI_IMR_RENDE (0x1u << 19) /**< \brief (HSMCI_IMR) Response End Bit Error Interrupt Mask */
+#define HSMCI_IMR_RTOE (0x1u << 20) /**< \brief (HSMCI_IMR) Response Time-out Error Interrupt Mask */
+#define HSMCI_IMR_DCRCE (0x1u << 21) /**< \brief (HSMCI_IMR) Data CRC Error Interrupt Mask */
+#define HSMCI_IMR_DTOE (0x1u << 22) /**< \brief (HSMCI_IMR) Data Time-out Error Interrupt Mask */
+#define HSMCI_IMR_CSTOE (0x1u << 23) /**< \brief (HSMCI_IMR) Completion Signal Time-out Error Interrupt Mask */
+#define HSMCI_IMR_BLKOVRE (0x1u << 24) /**< \brief (HSMCI_IMR) DMA Block Overrun Error Interrupt Mask */
+#define HSMCI_IMR_DMADONE (0x1u << 25) /**< \brief (HSMCI_IMR) DMA Transfer Completed Interrupt Mask */
+#define HSMCI_IMR_FIFOEMPTY (0x1u << 26) /**< \brief (HSMCI_IMR) FIFO Empty Interrupt Mask */
+#define HSMCI_IMR_XFRDONE (0x1u << 27) /**< \brief (HSMCI_IMR) Transfer Done Interrupt Mask */
+#define HSMCI_IMR_ACKRCV (0x1u << 28) /**< \brief (HSMCI_IMR) Boot Operation Acknowledge Received Interrupt Mask */
+#define HSMCI_IMR_ACKRCVE (0x1u << 29) /**< \brief (HSMCI_IMR) Boot Operation Acknowledge Error Interrupt Mask */
+#define HSMCI_IMR_OVRE (0x1u << 30) /**< \brief (HSMCI_IMR) Overrun Interrupt Mask */
+#define HSMCI_IMR_UNRE (0x1u << 31) /**< \brief (HSMCI_IMR) Underrun Interrupt Mask */
+/* -------- HSMCI_DMA : (HSMCI Offset: 0x50) DMA Configuration Register -------- */
+#define HSMCI_DMA_OFFSET_Pos 0
+#define HSMCI_DMA_OFFSET_Msk (0x3u << HSMCI_DMA_OFFSET_Pos) /**< \brief (HSMCI_DMA) DMA Write Buffer Offset */
+#define HSMCI_DMA_OFFSET(value) ((HSMCI_DMA_OFFSET_Msk & ((value) << HSMCI_DMA_OFFSET_Pos)))
+#define HSMCI_DMA_CHKSIZE (0x1u << 4) /**< \brief (HSMCI_DMA) DMA Channel Read and Write Chunk Size */
+#define HSMCI_DMA_CHKSIZE_1 (0x0u << 4) /**< \brief (HSMCI_DMA) 1 data available */
+#define HSMCI_DMA_CHKSIZE_4 (0x1u << 4) /**< \brief (HSMCI_DMA) 4 data available */
+#define HSMCI_DMA_DMAEN (0x1u << 8) /**< \brief (HSMCI_DMA) DMA Hardware Handshaking Enable */
+#define HSMCI_DMA_ROPT (0x1u << 12) /**< \brief (HSMCI_DMA) Read Optimization with padding */
+/* -------- HSMCI_CFG : (HSMCI Offset: 0x54) Configuration Register -------- */
+#define HSMCI_CFG_FIFOMODE (0x1u << 0) /**< \brief (HSMCI_CFG) HSMCI Internal FIFO control mode */
+#define HSMCI_CFG_FERRCTRL (0x1u << 4) /**< \brief (HSMCI_CFG) Flow Error flag reset control mode */
+#define HSMCI_CFG_HSMODE (0x1u << 8) /**< \brief (HSMCI_CFG) High Speed Mode */
+#define HSMCI_CFG_LSYNC (0x1u << 12) /**< \brief (HSMCI_CFG) Synchronize on the last block */
+/* -------- HSMCI_WPMR : (HSMCI Offset: 0xE4) Write Protection Mode Register -------- */
+#define HSMCI_WPMR_WP_EN (0x1u << 0) /**< \brief (HSMCI_WPMR) Write Protection Enable */
+#define HSMCI_WPMR_WP_KEY_Pos 8
+#define HSMCI_WPMR_WP_KEY_Msk (0xffffffu << HSMCI_WPMR_WP_KEY_Pos) /**< \brief (HSMCI_WPMR) Write Protection Key password */
+#define HSMCI_WPMR_WP_KEY(value) ((HSMCI_WPMR_WP_KEY_Msk & ((value) << HSMCI_WPMR_WP_KEY_Pos)))
+/* -------- HSMCI_WPSR : (HSMCI Offset: 0xE8) Write Protection Status Register -------- */
+#define HSMCI_WPSR_WP_VS_Pos 0
+#define HSMCI_WPSR_WP_VS_Msk (0xfu << HSMCI_WPSR_WP_VS_Pos) /**< \brief (HSMCI_WPSR) Write Protection Violation Status */
+#define HSMCI_WPSR_WP_VS_NONE (0x0u << 0) /**< \brief (HSMCI_WPSR) No Write Protection Violation occurred since the last read of this register (WP_SR) */
+#define HSMCI_WPSR_WP_VS_WRITE (0x1u << 0) /**< \brief (HSMCI_WPSR) Write Protection detected unauthorized attempt to write a control register had occurred (since the last read.) */
+#define HSMCI_WPSR_WP_VS_RESET (0x2u << 0) /**< \brief (HSMCI_WPSR) Software reset had been performed while Write Protection was enabled (since the last read). */
+#define HSMCI_WPSR_WP_VS_BOTH (0x3u << 0) /**< \brief (HSMCI_WPSR) Both Write Protection violation and software reset with Write Protection enabled have occurred since the last read. */
+#define HSMCI_WPSR_WP_VSRC_Pos 8
+#define HSMCI_WPSR_WP_VSRC_Msk (0xffffu << HSMCI_WPSR_WP_VSRC_Pos) /**< \brief (HSMCI_WPSR) Write Protection Violation SouRCe */
+/* -------- HSMCI_FIFO[256] : (HSMCI Offset: 0x200) FIFO Memory Aperture0 -------- */
+#define HSMCI_FIFO_DATA_Pos 0
+#define HSMCI_FIFO_DATA_Msk (0xffffffffu << HSMCI_FIFO_DATA_Pos) /**< \brief (HSMCI_FIFO[256]) Data to Read or Data to Write */
+#define HSMCI_FIFO_DATA(value) ((HSMCI_FIFO_DATA_Msk & ((value) << HSMCI_FIFO_DATA_Pos)))
+
+/*@}*/
+
+/* ============================================================================= */
+/** SOFTWARE API DEFINITION FOR AHB Bus Matrix */
+/* ============================================================================= */
+/** \addtogroup SAM3XA_MATRIX AHB Bus Matrix */
+/*@{*/
+
+#ifndef __ASSEMBLY__
+/** \brief Matrix hardware registers */
+typedef struct {
+ RwReg MATRIX_MCFG[6]; /**< \brief (Matrix Offset: 0x0000) Master Configuration Register */
+ RoReg Reserved1[10];
+ RwReg MATRIX_SCFG[9]; /**< \brief (Matrix Offset: 0x0040) Slave Configuration Register */
+ RoReg Reserved2[7];
+ RwReg MATRIX_PRAS0; /**< \brief (Matrix Offset: 0x0080) Priority Register A for Slave 0 */
+ RoReg Reserved3[1];
+ RwReg MATRIX_PRAS1; /**< \brief (Matrix Offset: 0x0088) Priority Register A for Slave 1 */
+ RoReg Reserved4[1];
+ RwReg MATRIX_PRAS2; /**< \brief (Matrix Offset: 0x0090) Priority Register A for Slave 2 */
+ RoReg Reserved5[1];
+ RwReg MATRIX_PRAS3; /**< \brief (Matrix Offset: 0x0098) Priority Register A for Slave 3 */
+ RoReg Reserved6[1];
+ RwReg MATRIX_PRAS4; /**< \brief (Matrix Offset: 0x00A0) Priority Register A for Slave 4 */
+ RoReg Reserved7[1];
+ RwReg MATRIX_PRAS5; /**< \brief (Matrix Offset: 0x00A8) Priority Register A for Slave 5 */
+ RoReg Reserved8[1];
+ RwReg MATRIX_PRAS6; /**< \brief (Matrix Offset: 0x00B0) Priority Register A for Slave 6 */
+ RoReg Reserved9[1];
+ RwReg MATRIX_PRAS7; /**< \brief (Matrix Offset: 0x00B8) Priority Register A for Slave 7 */
+ RoReg Reserved10[1];
+ RwReg MATRIX_PRAS8; /**< \brief (Matrix Offset: 0x00C0) Priority Register A for Slave 8 */
+ RoReg Reserved11[1];
+ RoReg Reserved12[14];
+ RwReg MATRIX_MRCR; /**< \brief (Matrix Offset: 0x0100) Master Remap Control Register */
+ RoReg Reserved13[4];
+ RwReg CCFG_SYSIO; /**< \brief (Matrix Offset: 0x0114) System I/O Configuration register */
+ RoReg Reserved14[51];
+ RwReg MATRIX_WPMR; /**< \brief (Matrix Offset: 0x1E4) Write Protect Mode Register */
+ RoReg MATRIX_WPSR; /**< \brief (Matrix Offset: 0x1E8) Write Protect Status Register */
+} Matrix;
+#endif /* __ASSEMBLY__ */
+/* -------- MATRIX_MCFG[6] : (MATRIX Offset: 0x0000) Master Configuration Register -------- */
+#define MATRIX_MCFG_ULBT_Pos 0
+#define MATRIX_MCFG_ULBT_Msk (0x7u << MATRIX_MCFG_ULBT_Pos) /**< \brief (MATRIX_MCFG[6]) Undefined Length Burst Type */
+#define MATRIX_MCFG_ULBT(value) ((MATRIX_MCFG_ULBT_Msk & ((value) << MATRIX_MCFG_ULBT_Pos)))
+/* -------- MATRIX_SCFG[9] : (MATRIX Offset: 0x0040) Slave Configuration Register -------- */
+#define MATRIX_SCFG_SLOT_CYCLE_Pos 0
+#define MATRIX_SCFG_SLOT_CYCLE_Msk (0xffu << MATRIX_SCFG_SLOT_CYCLE_Pos) /**< \brief (MATRIX_SCFG[9]) Maximum Number of Allowed Cycles for a Burst */
+#define MATRIX_SCFG_SLOT_CYCLE(value) ((MATRIX_SCFG_SLOT_CYCLE_Msk & ((value) << MATRIX_SCFG_SLOT_CYCLE_Pos)))
+#define MATRIX_SCFG_DEFMSTR_TYPE_Pos 16
+#define MATRIX_SCFG_DEFMSTR_TYPE_Msk (0x3u << MATRIX_SCFG_DEFMSTR_TYPE_Pos) /**< \brief (MATRIX_SCFG[9]) Default Master Type */
+#define MATRIX_SCFG_DEFMSTR_TYPE(value) ((MATRIX_SCFG_DEFMSTR_TYPE_Msk & ((value) << MATRIX_SCFG_DEFMSTR_TYPE_Pos)))
+#define MATRIX_SCFG_FIXED_DEFMSTR_Pos 18
+#define MATRIX_SCFG_FIXED_DEFMSTR_Msk (0x7u << MATRIX_SCFG_FIXED_DEFMSTR_Pos) /**< \brief (MATRIX_SCFG[9]) Fixed Default Master */
+#define MATRIX_SCFG_FIXED_DEFMSTR(value) ((MATRIX_SCFG_FIXED_DEFMSTR_Msk & ((value) << MATRIX_SCFG_FIXED_DEFMSTR_Pos)))
+#define MATRIX_SCFG_ARBT_Pos 24
+#define MATRIX_SCFG_ARBT_Msk (0x3u << MATRIX_SCFG_ARBT_Pos) /**< \brief (MATRIX_SCFG[9]) Arbitration Type */
+#define MATRIX_SCFG_ARBT(value) ((MATRIX_SCFG_ARBT_Msk & ((value) << MATRIX_SCFG_ARBT_Pos)))
+/* -------- MATRIX_PRAS0 : (MATRIX Offset: 0x0080) Priority Register A for Slave 0 -------- */
+#define MATRIX_PRAS0_M0PR_Pos 0
+#define MATRIX_PRAS0_M0PR_Msk (0x3u << MATRIX_PRAS0_M0PR_Pos) /**< \brief (MATRIX_PRAS0) Master 0 Priority */
+#define MATRIX_PRAS0_M0PR(value) ((MATRIX_PRAS0_M0PR_Msk & ((value) << MATRIX_PRAS0_M0PR_Pos)))
+#define MATRIX_PRAS0_M1PR_Pos 4
+#define MATRIX_PRAS0_M1PR_Msk (0x3u << MATRIX_PRAS0_M1PR_Pos) /**< \brief (MATRIX_PRAS0) Master 1 Priority */
+#define MATRIX_PRAS0_M1PR(value) ((MATRIX_PRAS0_M1PR_Msk & ((value) << MATRIX_PRAS0_M1PR_Pos)))
+#define MATRIX_PRAS0_M2PR_Pos 8
+#define MATRIX_PRAS0_M2PR_Msk (0x3u << MATRIX_PRAS0_M2PR_Pos) /**< \brief (MATRIX_PRAS0) Master 2 Priority */
+#define MATRIX_PRAS0_M2PR(value) ((MATRIX_PRAS0_M2PR_Msk & ((value) << MATRIX_PRAS0_M2PR_Pos)))
+#define MATRIX_PRAS0_M3PR_Pos 12
+#define MATRIX_PRAS0_M3PR_Msk (0x3u << MATRIX_PRAS0_M3PR_Pos) /**< \brief (MATRIX_PRAS0) Master 3 Priority */
+#define MATRIX_PRAS0_M3PR(value) ((MATRIX_PRAS0_M3PR_Msk & ((value) << MATRIX_PRAS0_M3PR_Pos)))
+#define MATRIX_PRAS0_M4PR_Pos 16
+#define MATRIX_PRAS0_M4PR_Msk (0x3u << MATRIX_PRAS0_M4PR_Pos) /**< \brief (MATRIX_PRAS0) Master 4 Priority */
+#define MATRIX_PRAS0_M4PR(value) ((MATRIX_PRAS0_M4PR_Msk & ((value) << MATRIX_PRAS0_M4PR_Pos)))
+#define MATRIX_PRAS0_M5PR_Pos 20
+#define MATRIX_PRAS0_M5PR_Msk (0x3u << MATRIX_PRAS0_M5PR_Pos) /**< \brief (MATRIX_PRAS0) Master 5 Priority */
+#define MATRIX_PRAS0_M5PR(value) ((MATRIX_PRAS0_M5PR_Msk & ((value) << MATRIX_PRAS0_M5PR_Pos)))
+/* -------- MATRIX_PRAS1 : (MATRIX Offset: 0x0088) Priority Register A for Slave 1 -------- */
+#define MATRIX_PRAS1_M0PR_Pos 0
+#define MATRIX_PRAS1_M0PR_Msk (0x3u << MATRIX_PRAS1_M0PR_Pos) /**< \brief (MATRIX_PRAS1) Master 0 Priority */
+#define MATRIX_PRAS1_M0PR(value) ((MATRIX_PRAS1_M0PR_Msk & ((value) << MATRIX_PRAS1_M0PR_Pos)))
+#define MATRIX_PRAS1_M1PR_Pos 4
+#define MATRIX_PRAS1_M1PR_Msk (0x3u << MATRIX_PRAS1_M1PR_Pos) /**< \brief (MATRIX_PRAS1) Master 1 Priority */
+#define MATRIX_PRAS1_M1PR(value) ((MATRIX_PRAS1_M1PR_Msk & ((value) << MATRIX_PRAS1_M1PR_Pos)))
+#define MATRIX_PRAS1_M2PR_Pos 8
+#define MATRIX_PRAS1_M2PR_Msk (0x3u << MATRIX_PRAS1_M2PR_Pos) /**< \brief (MATRIX_PRAS1) Master 2 Priority */
+#define MATRIX_PRAS1_M2PR(value) ((MATRIX_PRAS1_M2PR_Msk & ((value) << MATRIX_PRAS1_M2PR_Pos)))
+#define MATRIX_PRAS1_M3PR_Pos 12
+#define MATRIX_PRAS1_M3PR_Msk (0x3u << MATRIX_PRAS1_M3PR_Pos) /**< \brief (MATRIX_PRAS1) Master 3 Priority */
+#define MATRIX_PRAS1_M3PR(value) ((MATRIX_PRAS1_M3PR_Msk & ((value) << MATRIX_PRAS1_M3PR_Pos)))
+#define MATRIX_PRAS1_M4PR_Pos 16
+#define MATRIX_PRAS1_M4PR_Msk (0x3u << MATRIX_PRAS1_M4PR_Pos) /**< \brief (MATRIX_PRAS1) Master 4 Priority */
+#define MATRIX_PRAS1_M4PR(value) ((MATRIX_PRAS1_M4PR_Msk & ((value) << MATRIX_PRAS1_M4PR_Pos)))
+#define MATRIX_PRAS1_M5PR_Pos 20
+#define MATRIX_PRAS1_M5PR_Msk (0x3u << MATRIX_PRAS1_M5PR_Pos) /**< \brief (MATRIX_PRAS1) Master 5 Priority */
+#define MATRIX_PRAS1_M5PR(value) ((MATRIX_PRAS1_M5PR_Msk & ((value) << MATRIX_PRAS1_M5PR_Pos)))
+/* -------- MATRIX_PRAS2 : (MATRIX Offset: 0x0090) Priority Register A for Slave 2 -------- */
+#define MATRIX_PRAS2_M0PR_Pos 0
+#define MATRIX_PRAS2_M0PR_Msk (0x3u << MATRIX_PRAS2_M0PR_Pos) /**< \brief (MATRIX_PRAS2) Master 0 Priority */
+#define MATRIX_PRAS2_M0PR(value) ((MATRIX_PRAS2_M0PR_Msk & ((value) << MATRIX_PRAS2_M0PR_Pos)))
+#define MATRIX_PRAS2_M1PR_Pos 4
+#define MATRIX_PRAS2_M1PR_Msk (0x3u << MATRIX_PRAS2_M1PR_Pos) /**< \brief (MATRIX_PRAS2) Master 1 Priority */
+#define MATRIX_PRAS2_M1PR(value) ((MATRIX_PRAS2_M1PR_Msk & ((value) << MATRIX_PRAS2_M1PR_Pos)))
+#define MATRIX_PRAS2_M2PR_Pos 8
+#define MATRIX_PRAS2_M2PR_Msk (0x3u << MATRIX_PRAS2_M2PR_Pos) /**< \brief (MATRIX_PRAS2) Master 2 Priority */
+#define MATRIX_PRAS2_M2PR(value) ((MATRIX_PRAS2_M2PR_Msk & ((value) << MATRIX_PRAS2_M2PR_Pos)))
+#define MATRIX_PRAS2_M3PR_Pos 12
+#define MATRIX_PRAS2_M3PR_Msk (0x3u << MATRIX_PRAS2_M3PR_Pos) /**< \brief (MATRIX_PRAS2) Master 3 Priority */
+#define MATRIX_PRAS2_M3PR(value) ((MATRIX_PRAS2_M3PR_Msk & ((value) << MATRIX_PRAS2_M3PR_Pos)))
+#define MATRIX_PRAS2_M4PR_Pos 16
+#define MATRIX_PRAS2_M4PR_Msk (0x3u << MATRIX_PRAS2_M4PR_Pos) /**< \brief (MATRIX_PRAS2) Master 4 Priority */
+#define MATRIX_PRAS2_M4PR(value) ((MATRIX_PRAS2_M4PR_Msk & ((value) << MATRIX_PRAS2_M4PR_Pos)))
+#define MATRIX_PRAS2_M5PR_Pos 20
+#define MATRIX_PRAS2_M5PR_Msk (0x3u << MATRIX_PRAS2_M5PR_Pos) /**< \brief (MATRIX_PRAS2) Master 5 Priority */
+#define MATRIX_PRAS2_M5PR(value) ((MATRIX_PRAS2_M5PR_Msk & ((value) << MATRIX_PRAS2_M5PR_Pos)))
+/* -------- MATRIX_PRAS3 : (MATRIX Offset: 0x0098) Priority Register A for Slave 3 -------- */
+#define MATRIX_PRAS3_M0PR_Pos 0
+#define MATRIX_PRAS3_M0PR_Msk (0x3u << MATRIX_PRAS3_M0PR_Pos) /**< \brief (MATRIX_PRAS3) Master 0 Priority */
+#define MATRIX_PRAS3_M0PR(value) ((MATRIX_PRAS3_M0PR_Msk & ((value) << MATRIX_PRAS3_M0PR_Pos)))
+#define MATRIX_PRAS3_M1PR_Pos 4
+#define MATRIX_PRAS3_M1PR_Msk (0x3u << MATRIX_PRAS3_M1PR_Pos) /**< \brief (MATRIX_PRAS3) Master 1 Priority */
+#define MATRIX_PRAS3_M1PR(value) ((MATRIX_PRAS3_M1PR_Msk & ((value) << MATRIX_PRAS3_M1PR_Pos)))
+#define MATRIX_PRAS3_M2PR_Pos 8
+#define MATRIX_PRAS3_M2PR_Msk (0x3u << MATRIX_PRAS3_M2PR_Pos) /**< \brief (MATRIX_PRAS3) Master 2 Priority */
+#define MATRIX_PRAS3_M2PR(value) ((MATRIX_PRAS3_M2PR_Msk & ((value) << MATRIX_PRAS3_M2PR_Pos)))
+#define MATRIX_PRAS3_M3PR_Pos 12
+#define MATRIX_PRAS3_M3PR_Msk (0x3u << MATRIX_PRAS3_M3PR_Pos) /**< \brief (MATRIX_PRAS3) Master 3 Priority */
+#define MATRIX_PRAS3_M3PR(value) ((MATRIX_PRAS3_M3PR_Msk & ((value) << MATRIX_PRAS3_M3PR_Pos)))
+#define MATRIX_PRAS3_M4PR_Pos 16
+#define MATRIX_PRAS3_M4PR_Msk (0x3u << MATRIX_PRAS3_M4PR_Pos) /**< \brief (MATRIX_PRAS3) Master 4 Priority */
+#define MATRIX_PRAS3_M4PR(value) ((MATRIX_PRAS3_M4PR_Msk & ((value) << MATRIX_PRAS3_M4PR_Pos)))
+#define MATRIX_PRAS3_M5PR_Pos 20
+#define MATRIX_PRAS3_M5PR_Msk (0x3u << MATRIX_PRAS3_M5PR_Pos) /**< \brief (MATRIX_PRAS3) Master 5 Priority */
+#define MATRIX_PRAS3_M5PR(value) ((MATRIX_PRAS3_M5PR_Msk & ((value) << MATRIX_PRAS3_M5PR_Pos)))
+/* -------- MATRIX_PRAS4 : (MATRIX Offset: 0x00A0) Priority Register A for Slave 4 -------- */
+#define MATRIX_PRAS4_M0PR_Pos 0
+#define MATRIX_PRAS4_M0PR_Msk (0x3u << MATRIX_PRAS4_M0PR_Pos) /**< \brief (MATRIX_PRAS4) Master 0 Priority */
+#define MATRIX_PRAS4_M0PR(value) ((MATRIX_PRAS4_M0PR_Msk & ((value) << MATRIX_PRAS4_M0PR_Pos)))
+#define MATRIX_PRAS4_M1PR_Pos 4
+#define MATRIX_PRAS4_M1PR_Msk (0x3u << MATRIX_PRAS4_M1PR_Pos) /**< \brief (MATRIX_PRAS4) Master 1 Priority */
+#define MATRIX_PRAS4_M1PR(value) ((MATRIX_PRAS4_M1PR_Msk & ((value) << MATRIX_PRAS4_M1PR_Pos)))
+#define MATRIX_PRAS4_M2PR_Pos 8
+#define MATRIX_PRAS4_M2PR_Msk (0x3u << MATRIX_PRAS4_M2PR_Pos) /**< \brief (MATRIX_PRAS4) Master 2 Priority */
+#define MATRIX_PRAS4_M2PR(value) ((MATRIX_PRAS4_M2PR_Msk & ((value) << MATRIX_PRAS4_M2PR_Pos)))
+#define MATRIX_PRAS4_M3PR_Pos 12
+#define MATRIX_PRAS4_M3PR_Msk (0x3u << MATRIX_PRAS4_M3PR_Pos) /**< \brief (MATRIX_PRAS4) Master 3 Priority */
+#define MATRIX_PRAS4_M3PR(value) ((MATRIX_PRAS4_M3PR_Msk & ((value) << MATRIX_PRAS4_M3PR_Pos)))
+#define MATRIX_PRAS4_M4PR_Pos 16
+#define MATRIX_PRAS4_M4PR_Msk (0x3u << MATRIX_PRAS4_M4PR_Pos) /**< \brief (MATRIX_PRAS4) Master 4 Priority */
+#define MATRIX_PRAS4_M4PR(value) ((MATRIX_PRAS4_M4PR_Msk & ((value) << MATRIX_PRAS4_M4PR_Pos)))
+#define MATRIX_PRAS4_M5PR_Pos 20
+#define MATRIX_PRAS4_M5PR_Msk (0x3u << MATRIX_PRAS4_M5PR_Pos) /**< \brief (MATRIX_PRAS4) Master 5 Priority */
+#define MATRIX_PRAS4_M5PR(value) ((MATRIX_PRAS4_M5PR_Msk & ((value) << MATRIX_PRAS4_M5PR_Pos)))
+/* -------- MATRIX_PRAS5 : (MATRIX Offset: 0x00A8) Priority Register A for Slave 5 -------- */
+#define MATRIX_PRAS5_M0PR_Pos 0
+#define MATRIX_PRAS5_M0PR_Msk (0x3u << MATRIX_PRAS5_M0PR_Pos) /**< \brief (MATRIX_PRAS5) Master 0 Priority */
+#define MATRIX_PRAS5_M0PR(value) ((MATRIX_PRAS5_M0PR_Msk & ((value) << MATRIX_PRAS5_M0PR_Pos)))
+#define MATRIX_PRAS5_M1PR_Pos 4
+#define MATRIX_PRAS5_M1PR_Msk (0x3u << MATRIX_PRAS5_M1PR_Pos) /**< \brief (MATRIX_PRAS5) Master 1 Priority */
+#define MATRIX_PRAS5_M1PR(value) ((MATRIX_PRAS5_M1PR_Msk & ((value) << MATRIX_PRAS5_M1PR_Pos)))
+#define MATRIX_PRAS5_M2PR_Pos 8
+#define MATRIX_PRAS5_M2PR_Msk (0x3u << MATRIX_PRAS5_M2PR_Pos) /**< \brief (MATRIX_PRAS5) Master 2 Priority */
+#define MATRIX_PRAS5_M2PR(value) ((MATRIX_PRAS5_M2PR_Msk & ((value) << MATRIX_PRAS5_M2PR_Pos)))
+#define MATRIX_PRAS5_M3PR_Pos 12
+#define MATRIX_PRAS5_M3PR_Msk (0x3u << MATRIX_PRAS5_M3PR_Pos) /**< \brief (MATRIX_PRAS5) Master 3 Priority */
+#define MATRIX_PRAS5_M3PR(value) ((MATRIX_PRAS5_M3PR_Msk & ((value) << MATRIX_PRAS5_M3PR_Pos)))
+#define MATRIX_PRAS5_M4PR_Pos 16
+#define MATRIX_PRAS5_M4PR_Msk (0x3u << MATRIX_PRAS5_M4PR_Pos) /**< \brief (MATRIX_PRAS5) Master 4 Priority */
+#define MATRIX_PRAS5_M4PR(value) ((MATRIX_PRAS5_M4PR_Msk & ((value) << MATRIX_PRAS5_M4PR_Pos)))
+#define MATRIX_PRAS5_M5PR_Pos 20
+#define MATRIX_PRAS5_M5PR_Msk (0x3u << MATRIX_PRAS5_M5PR_Pos) /**< \brief (MATRIX_PRAS5) Master 5 Priority */
+#define MATRIX_PRAS5_M5PR(value) ((MATRIX_PRAS5_M5PR_Msk & ((value) << MATRIX_PRAS5_M5PR_Pos)))
+/* -------- MATRIX_PRAS6 : (MATRIX Offset: 0x00B0) Priority Register A for Slave 6 -------- */
+#define MATRIX_PRAS6_M0PR_Pos 0
+#define MATRIX_PRAS6_M0PR_Msk (0x3u << MATRIX_PRAS6_M0PR_Pos) /**< \brief (MATRIX_PRAS6) Master 0 Priority */
+#define MATRIX_PRAS6_M0PR(value) ((MATRIX_PRAS6_M0PR_Msk & ((value) << MATRIX_PRAS6_M0PR_Pos)))
+#define MATRIX_PRAS6_M1PR_Pos 4
+#define MATRIX_PRAS6_M1PR_Msk (0x3u << MATRIX_PRAS6_M1PR_Pos) /**< \brief (MATRIX_PRAS6) Master 1 Priority */
+#define MATRIX_PRAS6_M1PR(value) ((MATRIX_PRAS6_M1PR_Msk & ((value) << MATRIX_PRAS6_M1PR_Pos)))
+#define MATRIX_PRAS6_M2PR_Pos 8
+#define MATRIX_PRAS6_M2PR_Msk (0x3u << MATRIX_PRAS6_M2PR_Pos) /**< \brief (MATRIX_PRAS6) Master 2 Priority */
+#define MATRIX_PRAS6_M2PR(value) ((MATRIX_PRAS6_M2PR_Msk & ((value) << MATRIX_PRAS6_M2PR_Pos)))
+#define MATRIX_PRAS6_M3PR_Pos 12
+#define MATRIX_PRAS6_M3PR_Msk (0x3u << MATRIX_PRAS6_M3PR_Pos) /**< \brief (MATRIX_PRAS6) Master 3 Priority */
+#define MATRIX_PRAS6_M3PR(value) ((MATRIX_PRAS6_M3PR_Msk & ((value) << MATRIX_PRAS6_M3PR_Pos)))
+#define MATRIX_PRAS6_M4PR_Pos 16
+#define MATRIX_PRAS6_M4PR_Msk (0x3u << MATRIX_PRAS6_M4PR_Pos) /**< \brief (MATRIX_PRAS6) Master 4 Priority */
+#define MATRIX_PRAS6_M4PR(value) ((MATRIX_PRAS6_M4PR_Msk & ((value) << MATRIX_PRAS6_M4PR_Pos)))
+#define MATRIX_PRAS6_M5PR_Pos 20
+#define MATRIX_PRAS6_M5PR_Msk (0x3u << MATRIX_PRAS6_M5PR_Pos) /**< \brief (MATRIX_PRAS6) Master 5 Priority */
+#define MATRIX_PRAS6_M5PR(value) ((MATRIX_PRAS6_M5PR_Msk & ((value) << MATRIX_PRAS6_M5PR_Pos)))
+/* -------- MATRIX_PRAS7 : (MATRIX Offset: 0x00B8) Priority Register A for Slave 7 -------- */
+#define MATRIX_PRAS7_M0PR_Pos 0
+#define MATRIX_PRAS7_M0PR_Msk (0x3u << MATRIX_PRAS7_M0PR_Pos) /**< \brief (MATRIX_PRAS7) Master 0 Priority */
+#define MATRIX_PRAS7_M0PR(value) ((MATRIX_PRAS7_M0PR_Msk & ((value) << MATRIX_PRAS7_M0PR_Pos)))
+#define MATRIX_PRAS7_M1PR_Pos 4
+#define MATRIX_PRAS7_M1PR_Msk (0x3u << MATRIX_PRAS7_M1PR_Pos) /**< \brief (MATRIX_PRAS7) Master 1 Priority */
+#define MATRIX_PRAS7_M1PR(value) ((MATRIX_PRAS7_M1PR_Msk & ((value) << MATRIX_PRAS7_M1PR_Pos)))
+#define MATRIX_PRAS7_M2PR_Pos 8
+#define MATRIX_PRAS7_M2PR_Msk (0x3u << MATRIX_PRAS7_M2PR_Pos) /**< \brief (MATRIX_PRAS7) Master 2 Priority */
+#define MATRIX_PRAS7_M2PR(value) ((MATRIX_PRAS7_M2PR_Msk & ((value) << MATRIX_PRAS7_M2PR_Pos)))
+#define MATRIX_PRAS7_M3PR_Pos 12
+#define MATRIX_PRAS7_M3PR_Msk (0x3u << MATRIX_PRAS7_M3PR_Pos) /**< \brief (MATRIX_PRAS7) Master 3 Priority */
+#define MATRIX_PRAS7_M3PR(value) ((MATRIX_PRAS7_M3PR_Msk & ((value) << MATRIX_PRAS7_M3PR_Pos)))
+#define MATRIX_PRAS7_M4PR_Pos 16
+#define MATRIX_PRAS7_M4PR_Msk (0x3u << MATRIX_PRAS7_M4PR_Pos) /**< \brief (MATRIX_PRAS7) Master 4 Priority */
+#define MATRIX_PRAS7_M4PR(value) ((MATRIX_PRAS7_M4PR_Msk & ((value) << MATRIX_PRAS7_M4PR_Pos)))
+#define MATRIX_PRAS7_M5PR_Pos 20
+#define MATRIX_PRAS7_M5PR_Msk (0x3u << MATRIX_PRAS7_M5PR_Pos) /**< \brief (MATRIX_PRAS7) Master 5 Priority */
+#define MATRIX_PRAS7_M5PR(value) ((MATRIX_PRAS7_M5PR_Msk & ((value) << MATRIX_PRAS7_M5PR_Pos)))
+/* -------- MATRIX_PRAS8 : (MATRIX Offset: 0x00C0) Priority Register A for Slave 8 -------- */
+#define MATRIX_PRAS8_M0PR_Pos 0
+#define MATRIX_PRAS8_M0PR_Msk (0x3u << MATRIX_PRAS8_M0PR_Pos) /**< \brief (MATRIX_PRAS8) Master 0 Priority */
+#define MATRIX_PRAS8_M0PR(value) ((MATRIX_PRAS8_M0PR_Msk & ((value) << MATRIX_PRAS8_M0PR_Pos)))
+#define MATRIX_PRAS8_M1PR_Pos 4
+#define MATRIX_PRAS8_M1PR_Msk (0x3u << MATRIX_PRAS8_M1PR_Pos) /**< \brief (MATRIX_PRAS8) Master 1 Priority */
+#define MATRIX_PRAS8_M1PR(value) ((MATRIX_PRAS8_M1PR_Msk & ((value) << MATRIX_PRAS8_M1PR_Pos)))
+#define MATRIX_PRAS8_M2PR_Pos 8
+#define MATRIX_PRAS8_M2PR_Msk (0x3u << MATRIX_PRAS8_M2PR_Pos) /**< \brief (MATRIX_PRAS8) Master 2 Priority */
+#define MATRIX_PRAS8_M2PR(value) ((MATRIX_PRAS8_M2PR_Msk & ((value) << MATRIX_PRAS8_M2PR_Pos)))
+#define MATRIX_PRAS8_M3PR_Pos 12
+#define MATRIX_PRAS8_M3PR_Msk (0x3u << MATRIX_PRAS8_M3PR_Pos) /**< \brief (MATRIX_PRAS8) Master 3 Priority */
+#define MATRIX_PRAS8_M3PR(value) ((MATRIX_PRAS8_M3PR_Msk & ((value) << MATRIX_PRAS8_M3PR_Pos)))
+#define MATRIX_PRAS8_M4PR_Pos 16
+#define MATRIX_PRAS8_M4PR_Msk (0x3u << MATRIX_PRAS8_M4PR_Pos) /**< \brief (MATRIX_PRAS8) Master 4 Priority */
+#define MATRIX_PRAS8_M4PR(value) ((MATRIX_PRAS8_M4PR_Msk & ((value) << MATRIX_PRAS8_M4PR_Pos)))
+#define MATRIX_PRAS8_M5PR_Pos 20
+#define MATRIX_PRAS8_M5PR_Msk (0x3u << MATRIX_PRAS8_M5PR_Pos) /**< \brief (MATRIX_PRAS8) Master 5 Priority */
+#define MATRIX_PRAS8_M5PR(value) ((MATRIX_PRAS8_M5PR_Msk & ((value) << MATRIX_PRAS8_M5PR_Pos)))
+/* -------- MATRIX_MRCR : (MATRIX Offset: 0x0100) Master Remap Control Register -------- */
+#define MATRIX_MRCR_RCB0 (0x1u << 0) /**< \brief (MATRIX_MRCR) Remap Command Bit for AHB Master 0 */
+#define MATRIX_MRCR_RCB1 (0x1u << 1) /**< \brief (MATRIX_MRCR) Remap Command Bit for AHB Master 1 */
+#define MATRIX_MRCR_RCB2 (0x1u << 2) /**< \brief (MATRIX_MRCR) Remap Command Bit for AHB Master 2 */
+#define MATRIX_MRCR_RCB3 (0x1u << 3) /**< \brief (MATRIX_MRCR) Remap Command Bit for AHB Master 3 */
+#define MATRIX_MRCR_RCB4_Pos 4
+#define MATRIX_MRCR_RCB4_Msk (0x3u << MATRIX_MRCR_RCB4_Pos) /**< \brief (MATRIX_MRCR) Remap Command Bit for AHB Master 4 */
+#define MATRIX_MRCR_RCB4(value) ((MATRIX_MRCR_RCB4_Msk & ((value) << MATRIX_MRCR_RCB4_Pos)))
+#define MATRIX_MRCR_RCB5 (0x1u << 6) /**< \brief (MATRIX_MRCR) Remap Command Bit for AHB Master 5 */
+/* -------- CCFG_SYSIO : (MATRIX Offset: 0x0114) System I/O Configuration register -------- */
+#define CCFG_SYSIO_SYSIO12 (0x1u << 12) /**< \brief (CCFG_SYSIO) PC0 or ERASE Assignment */
+/* -------- MATRIX_WPMR : (MATRIX Offset: 0x1E4) Write Protect Mode Register -------- */
+#define MATRIX_WPMR_WPEN (0x1u << 0) /**< \brief (MATRIX_WPMR) Write Protect ENable */
+#define MATRIX_WPMR_WPKEY_Pos 8
+#define MATRIX_WPMR_WPKEY_Msk (0xffffffu << MATRIX_WPMR_WPKEY_Pos) /**< \brief (MATRIX_WPMR) Write Protect KEY (Write-only) */
+#define MATRIX_WPMR_WPKEY(value) ((MATRIX_WPMR_WPKEY_Msk & ((value) << MATRIX_WPMR_WPKEY_Pos)))
+/* -------- MATRIX_WPSR : (MATRIX Offset: 0x1E8) Write Protect Status Register -------- */
+#define MATRIX_WPSR_WPVS (0x1u << 0) /**< \brief (MATRIX_WPSR) Write Protect Violation Status */
+#define MATRIX_WPSR_WPVSRC_Pos 8
+#define MATRIX_WPSR_WPVSRC_Msk (0xffffu << MATRIX_WPSR_WPVSRC_Pos) /**< \brief (MATRIX_WPSR) Write Protect Violation Source */
+
+/*@}*/
+
+/* ============================================================================= */
+/** SOFTWARE API DEFINITION FOR Peripheral DMA Controller */
+/* ============================================================================= */
+/** \addtogroup SAM3XA_PDC Peripheral DMA Controller */
+/*@{*/
+
+#ifndef __ASSEMBLY__
+/** \brief Pdc hardware registers */
+typedef struct {
+ RoReg Reserved1[64];
+ RwReg PERIPH_RPR; /**< \brief (Pdc Offset: 0x100) Receive Pointer Register */
+ RwReg PERIPH_RCR; /**< \brief (Pdc Offset: 0x104) Receive Counter Register */
+ RwReg PERIPH_TPR; /**< \brief (Pdc Offset: 0x108) Transmit Pointer Register */
+ RwReg PERIPH_TCR; /**< \brief (Pdc Offset: 0x10C) Transmit Counter Register */
+ RwReg PERIPH_RNPR; /**< \brief (Pdc Offset: 0x110) Receive Next Pointer Register */
+ RwReg PERIPH_RNCR; /**< \brief (Pdc Offset: 0x114) Receive Next Counter Register */
+ RwReg PERIPH_TNPR; /**< \brief (Pdc Offset: 0x118) Transmit Next Pointer Register */
+ RwReg PERIPH_TNCR; /**< \brief (Pdc Offset: 0x11C) Transmit Next Counter Register */
+ WoReg PERIPH_PTCR; /**< \brief (Pdc Offset: 0x120) Transfer Control Register */
+ RoReg PERIPH_PTSR; /**< \brief (Pdc Offset: 0x124) Transfer Status Register */
+} Pdc;
+#endif /* __ASSEMBLY__ */
+/* -------- PERIPH_RPR : (PDC Offset: 0x100) Receive Pointer Register -------- */
+#define PERIPH_RPR_RXPTR_Pos 0
+#define PERIPH_RPR_RXPTR_Msk (0xffffffffu << PERIPH_RPR_RXPTR_Pos) /**< \brief (PERIPH_RPR) Receive Pointer Register */
+#define PERIPH_RPR_RXPTR(value) ((PERIPH_RPR_RXPTR_Msk & ((value) << PERIPH_RPR_RXPTR_Pos)))
+/* -------- PERIPH_RCR : (PDC Offset: 0x104) Receive Counter Register -------- */
+#define PERIPH_RCR_RXCTR_Pos 0
+#define PERIPH_RCR_RXCTR_Msk (0xffffu << PERIPH_RCR_RXCTR_Pos) /**< \brief (PERIPH_RCR) Receive Counter Register */
+#define PERIPH_RCR_RXCTR(value) ((PERIPH_RCR_RXCTR_Msk & ((value) << PERIPH_RCR_RXCTR_Pos)))
+/* -------- PERIPH_TPR : (PDC Offset: 0x108) Transmit Pointer Register -------- */
+#define PERIPH_TPR_TXPTR_Pos 0
+#define PERIPH_TPR_TXPTR_Msk (0xffffffffu << PERIPH_TPR_TXPTR_Pos) /**< \brief (PERIPH_TPR) Transmit Counter Register */
+#define PERIPH_TPR_TXPTR(value) ((PERIPH_TPR_TXPTR_Msk & ((value) << PERIPH_TPR_TXPTR_Pos)))
+/* -------- PERIPH_TCR : (PDC Offset: 0x10C) Transmit Counter Register -------- */
+#define PERIPH_TCR_TXCTR_Pos 0
+#define PERIPH_TCR_TXCTR_Msk (0xffffu << PERIPH_TCR_TXCTR_Pos) /**< \brief (PERIPH_TCR) Transmit Counter Register */
+#define PERIPH_TCR_TXCTR(value) ((PERIPH_TCR_TXCTR_Msk & ((value) << PERIPH_TCR_TXCTR_Pos)))
+/* -------- PERIPH_RNPR : (PDC Offset: 0x110) Receive Next Pointer Register -------- */
+#define PERIPH_RNPR_RXNPTR_Pos 0
+#define PERIPH_RNPR_RXNPTR_Msk (0xffffffffu << PERIPH_RNPR_RXNPTR_Pos) /**< \brief (PERIPH_RNPR) Receive Next Pointer */
+#define PERIPH_RNPR_RXNPTR(value) ((PERIPH_RNPR_RXNPTR_Msk & ((value) << PERIPH_RNPR_RXNPTR_Pos)))
+/* -------- PERIPH_RNCR : (PDC Offset: 0x114) Receive Next Counter Register -------- */
+#define PERIPH_RNCR_RXNCTR_Pos 0
+#define PERIPH_RNCR_RXNCTR_Msk (0xffffu << PERIPH_RNCR_RXNCTR_Pos) /**< \brief (PERIPH_RNCR) Receive Next Counter */
+#define PERIPH_RNCR_RXNCTR(value) ((PERIPH_RNCR_RXNCTR_Msk & ((value) << PERIPH_RNCR_RXNCTR_Pos)))
+/* -------- PERIPH_TNPR : (PDC Offset: 0x118) Transmit Next Pointer Register -------- */
+#define PERIPH_TNPR_TXNPTR_Pos 0
+#define PERIPH_TNPR_TXNPTR_Msk (0xffffffffu << PERIPH_TNPR_TXNPTR_Pos) /**< \brief (PERIPH_TNPR) Transmit Next Pointer */
+#define PERIPH_TNPR_TXNPTR(value) ((PERIPH_TNPR_TXNPTR_Msk & ((value) << PERIPH_TNPR_TXNPTR_Pos)))
+/* -------- PERIPH_TNCR : (PDC Offset: 0x11C) Transmit Next Counter Register -------- */
+#define PERIPH_TNCR_TXNCTR_Pos 0
+#define PERIPH_TNCR_TXNCTR_Msk (0xffffu << PERIPH_TNCR_TXNCTR_Pos) /**< \brief (PERIPH_TNCR) Transmit Counter Next */
+#define PERIPH_TNCR_TXNCTR(value) ((PERIPH_TNCR_TXNCTR_Msk & ((value) << PERIPH_TNCR_TXNCTR_Pos)))
+/* -------- PERIPH_PTCR : (PDC Offset: 0x120) Transfer Control Register -------- */
+#define PERIPH_PTCR_RXTEN (0x1u << 0) /**< \brief (PERIPH_PTCR) Receiver Transfer Enable */
+#define PERIPH_PTCR_RXTDIS (0x1u << 1) /**< \brief (PERIPH_PTCR) Receiver Transfer Disable */
+#define PERIPH_PTCR_TXTEN (0x1u << 8) /**< \brief (PERIPH_PTCR) Transmitter Transfer Enable */
+#define PERIPH_PTCR_TXTDIS (0x1u << 9) /**< \brief (PERIPH_PTCR) Transmitter Transfer Disable */
+/* -------- PERIPH_PTSR : (PDC Offset: 0x124) Transfer Status Register -------- */
+#define PERIPH_PTSR_RXTEN (0x1u << 0) /**< \brief (PERIPH_PTSR) Receiver Transfer Enable */
+#define PERIPH_PTSR_TXTEN (0x1u << 8) /**< \brief (PERIPH_PTSR) Transmitter Transfer Enable */
+
+/*@}*/
+
+/* ============================================================================= */
+/** SOFTWARE API DEFINITION FOR Parallel Input/Output Controller */
+/* ============================================================================= */
+/** \addtogroup SAM3XA_PIO Parallel Input/Output Controller */
+/*@{*/
+
+#ifndef __ASSEMBLY__
+/** \brief Pio hardware registers */
+typedef struct {
+ WoReg PIO_PER; /**< \brief (Pio Offset: 0x0000) PIO Enable Register */
+ WoReg PIO_PDR; /**< \brief (Pio Offset: 0x0004) PIO Disable Register */
+ RoReg PIO_PSR; /**< \brief (Pio Offset: 0x0008) PIO Status Register */
+ RoReg Reserved1[1];
+ WoReg PIO_OER; /**< \brief (Pio Offset: 0x0010) Output Enable Register */
+ WoReg PIO_ODR; /**< \brief (Pio Offset: 0x0014) Output Disable Register */
+ RoReg PIO_OSR; /**< \brief (Pio Offset: 0x0018) Output Status Register */
+ RoReg Reserved2[1];
+ WoReg PIO_IFER; /**< \brief (Pio Offset: 0x0020) Glitch Input Filter Enable Register */
+ WoReg PIO_IFDR; /**< \brief (Pio Offset: 0x0024) Glitch Input Filter Disable Register */
+ RoReg PIO_IFSR; /**< \brief (Pio Offset: 0x0028) Glitch Input Filter Status Register */
+ RoReg Reserved3[1];
+ WoReg PIO_SODR; /**< \brief (Pio Offset: 0x0030) Set Output Data Register */
+ WoReg PIO_CODR; /**< \brief (Pio Offset: 0x0034) Clear Output Data Register */
+ RwReg PIO_ODSR; /**< \brief (Pio Offset: 0x0038) Output Data Status Register */
+ RoReg PIO_PDSR; /**< \brief (Pio Offset: 0x003C) Pin Data Status Register */
+ WoReg PIO_IER; /**< \brief (Pio Offset: 0x0040) Interrupt Enable Register */
+ WoReg PIO_IDR; /**< \brief (Pio Offset: 0x0044) Interrupt Disable Register */
+ RoReg PIO_IMR; /**< \brief (Pio Offset: 0x0048) Interrupt Mask Register */
+ RoReg PIO_ISR; /**< \brief (Pio Offset: 0x004C) Interrupt Status Register */
+ WoReg PIO_MDER; /**< \brief (Pio Offset: 0x0050) Multi-driver Enable Register */
+ WoReg PIO_MDDR; /**< \brief (Pio Offset: 0x0054) Multi-driver Disable Register */
+ RoReg PIO_MDSR; /**< \brief (Pio Offset: 0x0058) Multi-driver Status Register */
+ RoReg Reserved4[1];
+ WoReg PIO_PUDR; /**< \brief (Pio Offset: 0x0060) Pull-up Disable Register */
+ WoReg PIO_PUER; /**< \brief (Pio Offset: 0x0064) Pull-up Enable Register */
+ RoReg PIO_PUSR; /**< \brief (Pio Offset: 0x0068) Pad Pull-up Status Register */
+ RoReg Reserved5[1];
+ RwReg PIO_ABSR; /**< \brief (Pio Offset: 0x0070) Peripheral AB Select Register */
+ RoReg Reserved6[3];
+ WoReg PIO_SCIFSR; /**< \brief (Pio Offset: 0x0080) System Clock Glitch Input Filter Select Register */
+ WoReg PIO_DIFSR; /**< \brief (Pio Offset: 0x0084) Debouncing Input Filter Select Register */
+ RoReg PIO_IFDGSR; /**< \brief (Pio Offset: 0x0088) Glitch or Debouncing Input Filter Clock Selection Status Register */
+ RwReg PIO_SCDR; /**< \brief (Pio Offset: 0x008C) Slow Clock Divider Debouncing Register */
+ RoReg Reserved7[4];
+ WoReg PIO_OWER; /**< \brief (Pio Offset: 0x00A0) Output Write Enable */
+ WoReg PIO_OWDR; /**< \brief (Pio Offset: 0x00A4) Output Write Disable */
+ RoReg PIO_OWSR; /**< \brief (Pio Offset: 0x00A8) Output Write Status Register */
+ RoReg Reserved8[1];
+ WoReg PIO_AIMER; /**< \brief (Pio Offset: 0x00B0) Additional Interrupt Modes Enable Register */
+ WoReg PIO_AIMDR; /**< \brief (Pio Offset: 0x00B4) Additional Interrupt Modes Disables Register */
+ RoReg PIO_AIMMR; /**< \brief (Pio Offset: 0x00B8) Additional Interrupt Modes Mask Register */
+ RoReg Reserved9[1];
+ WoReg PIO_ESR; /**< \brief (Pio Offset: 0x00C0) Edge Select Register */
+ WoReg PIO_LSR; /**< \brief (Pio Offset: 0x00C4) Level Select Register */
+ RoReg PIO_ELSR; /**< \brief (Pio Offset: 0x00C8) Edge/Level Status Register */
+ RoReg Reserved10[1];
+ WoReg PIO_FELLSR; /**< \brief (Pio Offset: 0x00D0) Falling Edge/Low Level Select Register */
+ WoReg PIO_REHLSR; /**< \brief (Pio Offset: 0x00D4) Rising Edge/ High Level Select Register */
+ RoReg PIO_FRLHSR; /**< \brief (Pio Offset: 0x00D8) Fall/Rise - Low/High Status Register */
+ RoReg Reserved11[1];
+ RoReg PIO_LOCKSR; /**< \brief (Pio Offset: 0x00E0) Lock Status */
+ RwReg PIO_WPMR; /**< \brief (Pio Offset: 0x00E4) Write Protect Mode Register */
+ RoReg PIO_WPSR; /**< \brief (Pio Offset: 0x00E8) Write Protect Status Register */
+} Pio;
+#endif /* __ASSEMBLY__ */
+/* -------- PIO_PER : (PIO Offset: 0x0000) PIO Enable Register -------- */
+#define PIO_PER_P0 (0x1u << 0) /**< \brief (PIO_PER) PIO Enable */
+#define PIO_PER_P1 (0x1u << 1) /**< \brief (PIO_PER) PIO Enable */
+#define PIO_PER_P2 (0x1u << 2) /**< \brief (PIO_PER) PIO Enable */
+#define PIO_PER_P3 (0x1u << 3) /**< \brief (PIO_PER) PIO Enable */
+#define PIO_PER_P4 (0x1u << 4) /**< \brief (PIO_PER) PIO Enable */
+#define PIO_PER_P5 (0x1u << 5) /**< \brief (PIO_PER) PIO Enable */
+#define PIO_PER_P6 (0x1u << 6) /**< \brief (PIO_PER) PIO Enable */
+#define PIO_PER_P7 (0x1u << 7) /**< \brief (PIO_PER) PIO Enable */
+#define PIO_PER_P8 (0x1u << 8) /**< \brief (PIO_PER) PIO Enable */
+#define PIO_PER_P9 (0x1u << 9) /**< \brief (PIO_PER) PIO Enable */
+#define PIO_PER_P10 (0x1u << 10) /**< \brief (PIO_PER) PIO Enable */
+#define PIO_PER_P11 (0x1u << 11) /**< \brief (PIO_PER) PIO Enable */
+#define PIO_PER_P12 (0x1u << 12) /**< \brief (PIO_PER) PIO Enable */
+#define PIO_PER_P13 (0x1u << 13) /**< \brief (PIO_PER) PIO Enable */
+#define PIO_PER_P14 (0x1u << 14) /**< \brief (PIO_PER) PIO Enable */
+#define PIO_PER_P15 (0x1u << 15) /**< \brief (PIO_PER) PIO Enable */
+#define PIO_PER_P16 (0x1u << 16) /**< \brief (PIO_PER) PIO Enable */
+#define PIO_PER_P17 (0x1u << 17) /**< \brief (PIO_PER) PIO Enable */
+#define PIO_PER_P18 (0x1u << 18) /**< \brief (PIO_PER) PIO Enable */
+#define PIO_PER_P19 (0x1u << 19) /**< \brief (PIO_PER) PIO Enable */
+#define PIO_PER_P20 (0x1u << 20) /**< \brief (PIO_PER) PIO Enable */
+#define PIO_PER_P21 (0x1u << 21) /**< \brief (PIO_PER) PIO Enable */
+#define PIO_PER_P22 (0x1u << 22) /**< \brief (PIO_PER) PIO Enable */
+#define PIO_PER_P23 (0x1u << 23) /**< \brief (PIO_PER) PIO Enable */
+#define PIO_PER_P24 (0x1u << 24) /**< \brief (PIO_PER) PIO Enable */
+#define PIO_PER_P25 (0x1u << 25) /**< \brief (PIO_PER) PIO Enable */
+#define PIO_PER_P26 (0x1u << 26) /**< \brief (PIO_PER) PIO Enable */
+#define PIO_PER_P27 (0x1u << 27) /**< \brief (PIO_PER) PIO Enable */
+#define PIO_PER_P28 (0x1u << 28) /**< \brief (PIO_PER) PIO Enable */
+#define PIO_PER_P29 (0x1u << 29) /**< \brief (PIO_PER) PIO Enable */
+#define PIO_PER_P30 (0x1u << 30) /**< \brief (PIO_PER) PIO Enable */
+#define PIO_PER_P31 (0x1u << 31) /**< \brief (PIO_PER) PIO Enable */
+/* -------- PIO_PDR : (PIO Offset: 0x0004) PIO Disable Register -------- */
+#define PIO_PDR_P0 (0x1u << 0) /**< \brief (PIO_PDR) PIO Disable */
+#define PIO_PDR_P1 (0x1u << 1) /**< \brief (PIO_PDR) PIO Disable */
+#define PIO_PDR_P2 (0x1u << 2) /**< \brief (PIO_PDR) PIO Disable */
+#define PIO_PDR_P3 (0x1u << 3) /**< \brief (PIO_PDR) PIO Disable */
+#define PIO_PDR_P4 (0x1u << 4) /**< \brief (PIO_PDR) PIO Disable */
+#define PIO_PDR_P5 (0x1u << 5) /**< \brief (PIO_PDR) PIO Disable */
+#define PIO_PDR_P6 (0x1u << 6) /**< \brief (PIO_PDR) PIO Disable */
+#define PIO_PDR_P7 (0x1u << 7) /**< \brief (PIO_PDR) PIO Disable */
+#define PIO_PDR_P8 (0x1u << 8) /**< \brief (PIO_PDR) PIO Disable */
+#define PIO_PDR_P9 (0x1u << 9) /**< \brief (PIO_PDR) PIO Disable */
+#define PIO_PDR_P10 (0x1u << 10) /**< \brief (PIO_PDR) PIO Disable */
+#define PIO_PDR_P11 (0x1u << 11) /**< \brief (PIO_PDR) PIO Disable */
+#define PIO_PDR_P12 (0x1u << 12) /**< \brief (PIO_PDR) PIO Disable */
+#define PIO_PDR_P13 (0x1u << 13) /**< \brief (PIO_PDR) PIO Disable */
+#define PIO_PDR_P14 (0x1u << 14) /**< \brief (PIO_PDR) PIO Disable */
+#define PIO_PDR_P15 (0x1u << 15) /**< \brief (PIO_PDR) PIO Disable */
+#define PIO_PDR_P16 (0x1u << 16) /**< \brief (PIO_PDR) PIO Disable */
+#define PIO_PDR_P17 (0x1u << 17) /**< \brief (PIO_PDR) PIO Disable */
+#define PIO_PDR_P18 (0x1u << 18) /**< \brief (PIO_PDR) PIO Disable */
+#define PIO_PDR_P19 (0x1u << 19) /**< \brief (PIO_PDR) PIO Disable */
+#define PIO_PDR_P20 (0x1u << 20) /**< \brief (PIO_PDR) PIO Disable */
+#define PIO_PDR_P21 (0x1u << 21) /**< \brief (PIO_PDR) PIO Disable */
+#define PIO_PDR_P22 (0x1u << 22) /**< \brief (PIO_PDR) PIO Disable */
+#define PIO_PDR_P23 (0x1u << 23) /**< \brief (PIO_PDR) PIO Disable */
+#define PIO_PDR_P24 (0x1u << 24) /**< \brief (PIO_PDR) PIO Disable */
+#define PIO_PDR_P25 (0x1u << 25) /**< \brief (PIO_PDR) PIO Disable */
+#define PIO_PDR_P26 (0x1u << 26) /**< \brief (PIO_PDR) PIO Disable */
+#define PIO_PDR_P27 (0x1u << 27) /**< \brief (PIO_PDR) PIO Disable */
+#define PIO_PDR_P28 (0x1u << 28) /**< \brief (PIO_PDR) PIO Disable */
+#define PIO_PDR_P29 (0x1u << 29) /**< \brief (PIO_PDR) PIO Disable */
+#define PIO_PDR_P30 (0x1u << 30) /**< \brief (PIO_PDR) PIO Disable */
+#define PIO_PDR_P31 (0x1u << 31) /**< \brief (PIO_PDR) PIO Disable */
+/* -------- PIO_PSR : (PIO Offset: 0x0008) PIO Status Register -------- */
+#define PIO_PSR_P0 (0x1u << 0) /**< \brief (PIO_PSR) PIO Status */
+#define PIO_PSR_P1 (0x1u << 1) /**< \brief (PIO_PSR) PIO Status */
+#define PIO_PSR_P2 (0x1u << 2) /**< \brief (PIO_PSR) PIO Status */
+#define PIO_PSR_P3 (0x1u << 3) /**< \brief (PIO_PSR) PIO Status */
+#define PIO_PSR_P4 (0x1u << 4) /**< \brief (PIO_PSR) PIO Status */
+#define PIO_PSR_P5 (0x1u << 5) /**< \brief (PIO_PSR) PIO Status */
+#define PIO_PSR_P6 (0x1u << 6) /**< \brief (PIO_PSR) PIO Status */
+#define PIO_PSR_P7 (0x1u << 7) /**< \brief (PIO_PSR) PIO Status */
+#define PIO_PSR_P8 (0x1u << 8) /**< \brief (PIO_PSR) PIO Status */
+#define PIO_PSR_P9 (0x1u << 9) /**< \brief (PIO_PSR) PIO Status */
+#define PIO_PSR_P10 (0x1u << 10) /**< \brief (PIO_PSR) PIO Status */
+#define PIO_PSR_P11 (0x1u << 11) /**< \brief (PIO_PSR) PIO Status */
+#define PIO_PSR_P12 (0x1u << 12) /**< \brief (PIO_PSR) PIO Status */
+#define PIO_PSR_P13 (0x1u << 13) /**< \brief (PIO_PSR) PIO Status */
+#define PIO_PSR_P14 (0x1u << 14) /**< \brief (PIO_PSR) PIO Status */
+#define PIO_PSR_P15 (0x1u << 15) /**< \brief (PIO_PSR) PIO Status */
+#define PIO_PSR_P16 (0x1u << 16) /**< \brief (PIO_PSR) PIO Status */
+#define PIO_PSR_P17 (0x1u << 17) /**< \brief (PIO_PSR) PIO Status */
+#define PIO_PSR_P18 (0x1u << 18) /**< \brief (PIO_PSR) PIO Status */
+#define PIO_PSR_P19 (0x1u << 19) /**< \brief (PIO_PSR) PIO Status */
+#define PIO_PSR_P20 (0x1u << 20) /**< \brief (PIO_PSR) PIO Status */
+#define PIO_PSR_P21 (0x1u << 21) /**< \brief (PIO_PSR) PIO Status */
+#define PIO_PSR_P22 (0x1u << 22) /**< \brief (PIO_PSR) PIO Status */
+#define PIO_PSR_P23 (0x1u << 23) /**< \brief (PIO_PSR) PIO Status */
+#define PIO_PSR_P24 (0x1u << 24) /**< \brief (PIO_PSR) PIO Status */
+#define PIO_PSR_P25 (0x1u << 25) /**< \brief (PIO_PSR) PIO Status */
+#define PIO_PSR_P26 (0x1u << 26) /**< \brief (PIO_PSR) PIO Status */
+#define PIO_PSR_P27 (0x1u << 27) /**< \brief (PIO_PSR) PIO Status */
+#define PIO_PSR_P28 (0x1u << 28) /**< \brief (PIO_PSR) PIO Status */
+#define PIO_PSR_P29 (0x1u << 29) /**< \brief (PIO_PSR) PIO Status */
+#define PIO_PSR_P30 (0x1u << 30) /**< \brief (PIO_PSR) PIO Status */
+#define PIO_PSR_P31 (0x1u << 31) /**< \brief (PIO_PSR) PIO Status */
+/* -------- PIO_OER : (PIO Offset: 0x0010) Output Enable Register -------- */
+#define PIO_OER_P0 (0x1u << 0) /**< \brief (PIO_OER) Output Enable */
+#define PIO_OER_P1 (0x1u << 1) /**< \brief (PIO_OER) Output Enable */
+#define PIO_OER_P2 (0x1u << 2) /**< \brief (PIO_OER) Output Enable */
+#define PIO_OER_P3 (0x1u << 3) /**< \brief (PIO_OER) Output Enable */
+#define PIO_OER_P4 (0x1u << 4) /**< \brief (PIO_OER) Output Enable */
+#define PIO_OER_P5 (0x1u << 5) /**< \brief (PIO_OER) Output Enable */
+#define PIO_OER_P6 (0x1u << 6) /**< \brief (PIO_OER) Output Enable */
+#define PIO_OER_P7 (0x1u << 7) /**< \brief (PIO_OER) Output Enable */
+#define PIO_OER_P8 (0x1u << 8) /**< \brief (PIO_OER) Output Enable */
+#define PIO_OER_P9 (0x1u << 9) /**< \brief (PIO_OER) Output Enable */
+#define PIO_OER_P10 (0x1u << 10) /**< \brief (PIO_OER) Output Enable */
+#define PIO_OER_P11 (0x1u << 11) /**< \brief (PIO_OER) Output Enable */
+#define PIO_OER_P12 (0x1u << 12) /**< \brief (PIO_OER) Output Enable */
+#define PIO_OER_P13 (0x1u << 13) /**< \brief (PIO_OER) Output Enable */
+#define PIO_OER_P14 (0x1u << 14) /**< \brief (PIO_OER) Output Enable */
+#define PIO_OER_P15 (0x1u << 15) /**< \brief (PIO_OER) Output Enable */
+#define PIO_OER_P16 (0x1u << 16) /**< \brief (PIO_OER) Output Enable */
+#define PIO_OER_P17 (0x1u << 17) /**< \brief (PIO_OER) Output Enable */
+#define PIO_OER_P18 (0x1u << 18) /**< \brief (PIO_OER) Output Enable */
+#define PIO_OER_P19 (0x1u << 19) /**< \brief (PIO_OER) Output Enable */
+#define PIO_OER_P20 (0x1u << 20) /**< \brief (PIO_OER) Output Enable */
+#define PIO_OER_P21 (0x1u << 21) /**< \brief (PIO_OER) Output Enable */
+#define PIO_OER_P22 (0x1u << 22) /**< \brief (PIO_OER) Output Enable */
+#define PIO_OER_P23 (0x1u << 23) /**< \brief (PIO_OER) Output Enable */
+#define PIO_OER_P24 (0x1u << 24) /**< \brief (PIO_OER) Output Enable */
+#define PIO_OER_P25 (0x1u << 25) /**< \brief (PIO_OER) Output Enable */
+#define PIO_OER_P26 (0x1u << 26) /**< \brief (PIO_OER) Output Enable */
+#define PIO_OER_P27 (0x1u << 27) /**< \brief (PIO_OER) Output Enable */
+#define PIO_OER_P28 (0x1u << 28) /**< \brief (PIO_OER) Output Enable */
+#define PIO_OER_P29 (0x1u << 29) /**< \brief (PIO_OER) Output Enable */
+#define PIO_OER_P30 (0x1u << 30) /**< \brief (PIO_OER) Output Enable */
+#define PIO_OER_P31 (0x1u << 31) /**< \brief (PIO_OER) Output Enable */
+/* -------- PIO_ODR : (PIO Offset: 0x0014) Output Disable Register -------- */
+#define PIO_ODR_P0 (0x1u << 0) /**< \brief (PIO_ODR) Output Disable */
+#define PIO_ODR_P1 (0x1u << 1) /**< \brief (PIO_ODR) Output Disable */
+#define PIO_ODR_P2 (0x1u << 2) /**< \brief (PIO_ODR) Output Disable */
+#define PIO_ODR_P3 (0x1u << 3) /**< \brief (PIO_ODR) Output Disable */
+#define PIO_ODR_P4 (0x1u << 4) /**< \brief (PIO_ODR) Output Disable */
+#define PIO_ODR_P5 (0x1u << 5) /**< \brief (PIO_ODR) Output Disable */
+#define PIO_ODR_P6 (0x1u << 6) /**< \brief (PIO_ODR) Output Disable */
+#define PIO_ODR_P7 (0x1u << 7) /**< \brief (PIO_ODR) Output Disable */
+#define PIO_ODR_P8 (0x1u << 8) /**< \brief (PIO_ODR) Output Disable */
+#define PIO_ODR_P9 (0x1u << 9) /**< \brief (PIO_ODR) Output Disable */
+#define PIO_ODR_P10 (0x1u << 10) /**< \brief (PIO_ODR) Output Disable */
+#define PIO_ODR_P11 (0x1u << 11) /**< \brief (PIO_ODR) Output Disable */
+#define PIO_ODR_P12 (0x1u << 12) /**< \brief (PIO_ODR) Output Disable */
+#define PIO_ODR_P13 (0x1u << 13) /**< \brief (PIO_ODR) Output Disable */
+#define PIO_ODR_P14 (0x1u << 14) /**< \brief (PIO_ODR) Output Disable */
+#define PIO_ODR_P15 (0x1u << 15) /**< \brief (PIO_ODR) Output Disable */
+#define PIO_ODR_P16 (0x1u << 16) /**< \brief (PIO_ODR) Output Disable */
+#define PIO_ODR_P17 (0x1u << 17) /**< \brief (PIO_ODR) Output Disable */
+#define PIO_ODR_P18 (0x1u << 18) /**< \brief (PIO_ODR) Output Disable */
+#define PIO_ODR_P19 (0x1u << 19) /**< \brief (PIO_ODR) Output Disable */
+#define PIO_ODR_P20 (0x1u << 20) /**< \brief (PIO_ODR) Output Disable */
+#define PIO_ODR_P21 (0x1u << 21) /**< \brief (PIO_ODR) Output Disable */
+#define PIO_ODR_P22 (0x1u << 22) /**< \brief (PIO_ODR) Output Disable */
+#define PIO_ODR_P23 (0x1u << 23) /**< \brief (PIO_ODR) Output Disable */
+#define PIO_ODR_P24 (0x1u << 24) /**< \brief (PIO_ODR) Output Disable */
+#define PIO_ODR_P25 (0x1u << 25) /**< \brief (PIO_ODR) Output Disable */
+#define PIO_ODR_P26 (0x1u << 26) /**< \brief (PIO_ODR) Output Disable */
+#define PIO_ODR_P27 (0x1u << 27) /**< \brief (PIO_ODR) Output Disable */
+#define PIO_ODR_P28 (0x1u << 28) /**< \brief (PIO_ODR) Output Disable */
+#define PIO_ODR_P29 (0x1u << 29) /**< \brief (PIO_ODR) Output Disable */
+#define PIO_ODR_P30 (0x1u << 30) /**< \brief (PIO_ODR) Output Disable */
+#define PIO_ODR_P31 (0x1u << 31) /**< \brief (PIO_ODR) Output Disable */
+/* -------- PIO_OSR : (PIO Offset: 0x0018) Output Status Register -------- */
+#define PIO_OSR_P0 (0x1u << 0) /**< \brief (PIO_OSR) Output Status */
+#define PIO_OSR_P1 (0x1u << 1) /**< \brief (PIO_OSR) Output Status */
+#define PIO_OSR_P2 (0x1u << 2) /**< \brief (PIO_OSR) Output Status */
+#define PIO_OSR_P3 (0x1u << 3) /**< \brief (PIO_OSR) Output Status */
+#define PIO_OSR_P4 (0x1u << 4) /**< \brief (PIO_OSR) Output Status */
+#define PIO_OSR_P5 (0x1u << 5) /**< \brief (PIO_OSR) Output Status */
+#define PIO_OSR_P6 (0x1u << 6) /**< \brief (PIO_OSR) Output Status */
+#define PIO_OSR_P7 (0x1u << 7) /**< \brief (PIO_OSR) Output Status */
+#define PIO_OSR_P8 (0x1u << 8) /**< \brief (PIO_OSR) Output Status */
+#define PIO_OSR_P9 (0x1u << 9) /**< \brief (PIO_OSR) Output Status */
+#define PIO_OSR_P10 (0x1u << 10) /**< \brief (PIO_OSR) Output Status */
+#define PIO_OSR_P11 (0x1u << 11) /**< \brief (PIO_OSR) Output Status */
+#define PIO_OSR_P12 (0x1u << 12) /**< \brief (PIO_OSR) Output Status */
+#define PIO_OSR_P13 (0x1u << 13) /**< \brief (PIO_OSR) Output Status */
+#define PIO_OSR_P14 (0x1u << 14) /**< \brief (PIO_OSR) Output Status */
+#define PIO_OSR_P15 (0x1u << 15) /**< \brief (PIO_OSR) Output Status */
+#define PIO_OSR_P16 (0x1u << 16) /**< \brief (PIO_OSR) Output Status */
+#define PIO_OSR_P17 (0x1u << 17) /**< \brief (PIO_OSR) Output Status */
+#define PIO_OSR_P18 (0x1u << 18) /**< \brief (PIO_OSR) Output Status */
+#define PIO_OSR_P19 (0x1u << 19) /**< \brief (PIO_OSR) Output Status */
+#define PIO_OSR_P20 (0x1u << 20) /**< \brief (PIO_OSR) Output Status */
+#define PIO_OSR_P21 (0x1u << 21) /**< \brief (PIO_OSR) Output Status */
+#define PIO_OSR_P22 (0x1u << 22) /**< \brief (PIO_OSR) Output Status */
+#define PIO_OSR_P23 (0x1u << 23) /**< \brief (PIO_OSR) Output Status */
+#define PIO_OSR_P24 (0x1u << 24) /**< \brief (PIO_OSR) Output Status */
+#define PIO_OSR_P25 (0x1u << 25) /**< \brief (PIO_OSR) Output Status */
+#define PIO_OSR_P26 (0x1u << 26) /**< \brief (PIO_OSR) Output Status */
+#define PIO_OSR_P27 (0x1u << 27) /**< \brief (PIO_OSR) Output Status */
+#define PIO_OSR_P28 (0x1u << 28) /**< \brief (PIO_OSR) Output Status */
+#define PIO_OSR_P29 (0x1u << 29) /**< \brief (PIO_OSR) Output Status */
+#define PIO_OSR_P30 (0x1u << 30) /**< \brief (PIO_OSR) Output Status */
+#define PIO_OSR_P31 (0x1u << 31) /**< \brief (PIO_OSR) Output Status */
+/* -------- PIO_IFER : (PIO Offset: 0x0020) Glitch Input Filter Enable Register -------- */
+#define PIO_IFER_P0 (0x1u << 0) /**< \brief (PIO_IFER) Input Filter Enable */
+#define PIO_IFER_P1 (0x1u << 1) /**< \brief (PIO_IFER) Input Filter Enable */
+#define PIO_IFER_P2 (0x1u << 2) /**< \brief (PIO_IFER) Input Filter Enable */
+#define PIO_IFER_P3 (0x1u << 3) /**< \brief (PIO_IFER) Input Filter Enable */
+#define PIO_IFER_P4 (0x1u << 4) /**< \brief (PIO_IFER) Input Filter Enable */
+#define PIO_IFER_P5 (0x1u << 5) /**< \brief (PIO_IFER) Input Filter Enable */
+#define PIO_IFER_P6 (0x1u << 6) /**< \brief (PIO_IFER) Input Filter Enable */
+#define PIO_IFER_P7 (0x1u << 7) /**< \brief (PIO_IFER) Input Filter Enable */
+#define PIO_IFER_P8 (0x1u << 8) /**< \brief (PIO_IFER) Input Filter Enable */
+#define PIO_IFER_P9 (0x1u << 9) /**< \brief (PIO_IFER) Input Filter Enable */
+#define PIO_IFER_P10 (0x1u << 10) /**< \brief (PIO_IFER) Input Filter Enable */
+#define PIO_IFER_P11 (0x1u << 11) /**< \brief (PIO_IFER) Input Filter Enable */
+#define PIO_IFER_P12 (0x1u << 12) /**< \brief (PIO_IFER) Input Filter Enable */
+#define PIO_IFER_P13 (0x1u << 13) /**< \brief (PIO_IFER) Input Filter Enable */
+#define PIO_IFER_P14 (0x1u << 14) /**< \brief (PIO_IFER) Input Filter Enable */
+#define PIO_IFER_P15 (0x1u << 15) /**< \brief (PIO_IFER) Input Filter Enable */
+#define PIO_IFER_P16 (0x1u << 16) /**< \brief (PIO_IFER) Input Filter Enable */
+#define PIO_IFER_P17 (0x1u << 17) /**< \brief (PIO_IFER) Input Filter Enable */
+#define PIO_IFER_P18 (0x1u << 18) /**< \brief (PIO_IFER) Input Filter Enable */
+#define PIO_IFER_P19 (0x1u << 19) /**< \brief (PIO_IFER) Input Filter Enable */
+#define PIO_IFER_P20 (0x1u << 20) /**< \brief (PIO_IFER) Input Filter Enable */
+#define PIO_IFER_P21 (0x1u << 21) /**< \brief (PIO_IFER) Input Filter Enable */
+#define PIO_IFER_P22 (0x1u << 22) /**< \brief (PIO_IFER) Input Filter Enable */
+#define PIO_IFER_P23 (0x1u << 23) /**< \brief (PIO_IFER) Input Filter Enable */
+#define PIO_IFER_P24 (0x1u << 24) /**< \brief (PIO_IFER) Input Filter Enable */
+#define PIO_IFER_P25 (0x1u << 25) /**< \brief (PIO_IFER) Input Filter Enable */
+#define PIO_IFER_P26 (0x1u << 26) /**< \brief (PIO_IFER) Input Filter Enable */
+#define PIO_IFER_P27 (0x1u << 27) /**< \brief (PIO_IFER) Input Filter Enable */
+#define PIO_IFER_P28 (0x1u << 28) /**< \brief (PIO_IFER) Input Filter Enable */
+#define PIO_IFER_P29 (0x1u << 29) /**< \brief (PIO_IFER) Input Filter Enable */
+#define PIO_IFER_P30 (0x1u << 30) /**< \brief (PIO_IFER) Input Filter Enable */
+#define PIO_IFER_P31 (0x1u << 31) /**< \brief (PIO_IFER) Input Filter Enable */
+/* -------- PIO_IFDR : (PIO Offset: 0x0024) Glitch Input Filter Disable Register -------- */
+#define PIO_IFDR_P0 (0x1u << 0) /**< \brief (PIO_IFDR) Input Filter Disable */
+#define PIO_IFDR_P1 (0x1u << 1) /**< \brief (PIO_IFDR) Input Filter Disable */
+#define PIO_IFDR_P2 (0x1u << 2) /**< \brief (PIO_IFDR) Input Filter Disable */
+#define PIO_IFDR_P3 (0x1u << 3) /**< \brief (PIO_IFDR) Input Filter Disable */
+#define PIO_IFDR_P4 (0x1u << 4) /**< \brief (PIO_IFDR) Input Filter Disable */
+#define PIO_IFDR_P5 (0x1u << 5) /**< \brief (PIO_IFDR) Input Filter Disable */
+#define PIO_IFDR_P6 (0x1u << 6) /**< \brief (PIO_IFDR) Input Filter Disable */
+#define PIO_IFDR_P7 (0x1u << 7) /**< \brief (PIO_IFDR) Input Filter Disable */
+#define PIO_IFDR_P8 (0x1u << 8) /**< \brief (PIO_IFDR) Input Filter Disable */
+#define PIO_IFDR_P9 (0x1u << 9) /**< \brief (PIO_IFDR) Input Filter Disable */
+#define PIO_IFDR_P10 (0x1u << 10) /**< \brief (PIO_IFDR) Input Filter Disable */
+#define PIO_IFDR_P11 (0x1u << 11) /**< \brief (PIO_IFDR) Input Filter Disable */
+#define PIO_IFDR_P12 (0x1u << 12) /**< \brief (PIO_IFDR) Input Filter Disable */
+#define PIO_IFDR_P13 (0x1u << 13) /**< \brief (PIO_IFDR) Input Filter Disable */
+#define PIO_IFDR_P14 (0x1u << 14) /**< \brief (PIO_IFDR) Input Filter Disable */
+#define PIO_IFDR_P15 (0x1u << 15) /**< \brief (PIO_IFDR) Input Filter Disable */
+#define PIO_IFDR_P16 (0x1u << 16) /**< \brief (PIO_IFDR) Input Filter Disable */
+#define PIO_IFDR_P17 (0x1u << 17) /**< \brief (PIO_IFDR) Input Filter Disable */
+#define PIO_IFDR_P18 (0x1u << 18) /**< \brief (PIO_IFDR) Input Filter Disable */
+#define PIO_IFDR_P19 (0x1u << 19) /**< \brief (PIO_IFDR) Input Filter Disable */
+#define PIO_IFDR_P20 (0x1u << 20) /**< \brief (PIO_IFDR) Input Filter Disable */
+#define PIO_IFDR_P21 (0x1u << 21) /**< \brief (PIO_IFDR) Input Filter Disable */
+#define PIO_IFDR_P22 (0x1u << 22) /**< \brief (PIO_IFDR) Input Filter Disable */
+#define PIO_IFDR_P23 (0x1u << 23) /**< \brief (PIO_IFDR) Input Filter Disable */
+#define PIO_IFDR_P24 (0x1u << 24) /**< \brief (PIO_IFDR) Input Filter Disable */
+#define PIO_IFDR_P25 (0x1u << 25) /**< \brief (PIO_IFDR) Input Filter Disable */
+#define PIO_IFDR_P26 (0x1u << 26) /**< \brief (PIO_IFDR) Input Filter Disable */
+#define PIO_IFDR_P27 (0x1u << 27) /**< \brief (PIO_IFDR) Input Filter Disable */
+#define PIO_IFDR_P28 (0x1u << 28) /**< \brief (PIO_IFDR) Input Filter Disable */
+#define PIO_IFDR_P29 (0x1u << 29) /**< \brief (PIO_IFDR) Input Filter Disable */
+#define PIO_IFDR_P30 (0x1u << 30) /**< \brief (PIO_IFDR) Input Filter Disable */
+#define PIO_IFDR_P31 (0x1u << 31) /**< \brief (PIO_IFDR) Input Filter Disable */
+/* -------- PIO_IFSR : (PIO Offset: 0x0028) Glitch Input Filter Status Register -------- */
+#define PIO_IFSR_P0 (0x1u << 0) /**< \brief (PIO_IFSR) Input Filer Status */
+#define PIO_IFSR_P1 (0x1u << 1) /**< \brief (PIO_IFSR) Input Filer Status */
+#define PIO_IFSR_P2 (0x1u << 2) /**< \brief (PIO_IFSR) Input Filer Status */
+#define PIO_IFSR_P3 (0x1u << 3) /**< \brief (PIO_IFSR) Input Filer Status */
+#define PIO_IFSR_P4 (0x1u << 4) /**< \brief (PIO_IFSR) Input Filer Status */
+#define PIO_IFSR_P5 (0x1u << 5) /**< \brief (PIO_IFSR) Input Filer Status */
+#define PIO_IFSR_P6 (0x1u << 6) /**< \brief (PIO_IFSR) Input Filer Status */
+#define PIO_IFSR_P7 (0x1u << 7) /**< \brief (PIO_IFSR) Input Filer Status */
+#define PIO_IFSR_P8 (0x1u << 8) /**< \brief (PIO_IFSR) Input Filer Status */
+#define PIO_IFSR_P9 (0x1u << 9) /**< \brief (PIO_IFSR) Input Filer Status */
+#define PIO_IFSR_P10 (0x1u << 10) /**< \brief (PIO_IFSR) Input Filer Status */
+#define PIO_IFSR_P11 (0x1u << 11) /**< \brief (PIO_IFSR) Input Filer Status */
+#define PIO_IFSR_P12 (0x1u << 12) /**< \brief (PIO_IFSR) Input Filer Status */
+#define PIO_IFSR_P13 (0x1u << 13) /**< \brief (PIO_IFSR) Input Filer Status */
+#define PIO_IFSR_P14 (0x1u << 14) /**< \brief (PIO_IFSR) Input Filer Status */
+#define PIO_IFSR_P15 (0x1u << 15) /**< \brief (PIO_IFSR) Input Filer Status */
+#define PIO_IFSR_P16 (0x1u << 16) /**< \brief (PIO_IFSR) Input Filer Status */
+#define PIO_IFSR_P17 (0x1u << 17) /**< \brief (PIO_IFSR) Input Filer Status */
+#define PIO_IFSR_P18 (0x1u << 18) /**< \brief (PIO_IFSR) Input Filer Status */
+#define PIO_IFSR_P19 (0x1u << 19) /**< \brief (PIO_IFSR) Input Filer Status */
+#define PIO_IFSR_P20 (0x1u << 20) /**< \brief (PIO_IFSR) Input Filer Status */
+#define PIO_IFSR_P21 (0x1u << 21) /**< \brief (PIO_IFSR) Input Filer Status */
+#define PIO_IFSR_P22 (0x1u << 22) /**< \brief (PIO_IFSR) Input Filer Status */
+#define PIO_IFSR_P23 (0x1u << 23) /**< \brief (PIO_IFSR) Input Filer Status */
+#define PIO_IFSR_P24 (0x1u << 24) /**< \brief (PIO_IFSR) Input Filer Status */
+#define PIO_IFSR_P25 (0x1u << 25) /**< \brief (PIO_IFSR) Input Filer Status */
+#define PIO_IFSR_P26 (0x1u << 26) /**< \brief (PIO_IFSR) Input Filer Status */
+#define PIO_IFSR_P27 (0x1u << 27) /**< \brief (PIO_IFSR) Input Filer Status */
+#define PIO_IFSR_P28 (0x1u << 28) /**< \brief (PIO_IFSR) Input Filer Status */
+#define PIO_IFSR_P29 (0x1u << 29) /**< \brief (PIO_IFSR) Input Filer Status */
+#define PIO_IFSR_P30 (0x1u << 30) /**< \brief (PIO_IFSR) Input Filer Status */
+#define PIO_IFSR_P31 (0x1u << 31) /**< \brief (PIO_IFSR) Input Filer Status */
+/* -------- PIO_SODR : (PIO Offset: 0x0030) Set Output Data Register -------- */
+#define PIO_SODR_P0 (0x1u << 0) /**< \brief (PIO_SODR) Set Output Data */
+#define PIO_SODR_P1 (0x1u << 1) /**< \brief (PIO_SODR) Set Output Data */
+#define PIO_SODR_P2 (0x1u << 2) /**< \brief (PIO_SODR) Set Output Data */
+#define PIO_SODR_P3 (0x1u << 3) /**< \brief (PIO_SODR) Set Output Data */
+#define PIO_SODR_P4 (0x1u << 4) /**< \brief (PIO_SODR) Set Output Data */
+#define PIO_SODR_P5 (0x1u << 5) /**< \brief (PIO_SODR) Set Output Data */
+#define PIO_SODR_P6 (0x1u << 6) /**< \brief (PIO_SODR) Set Output Data */
+#define PIO_SODR_P7 (0x1u << 7) /**< \brief (PIO_SODR) Set Output Data */
+#define PIO_SODR_P8 (0x1u << 8) /**< \brief (PIO_SODR) Set Output Data */
+#define PIO_SODR_P9 (0x1u << 9) /**< \brief (PIO_SODR) Set Output Data */
+#define PIO_SODR_P10 (0x1u << 10) /**< \brief (PIO_SODR) Set Output Data */
+#define PIO_SODR_P11 (0x1u << 11) /**< \brief (PIO_SODR) Set Output Data */
+#define PIO_SODR_P12 (0x1u << 12) /**< \brief (PIO_SODR) Set Output Data */
+#define PIO_SODR_P13 (0x1u << 13) /**< \brief (PIO_SODR) Set Output Data */
+#define PIO_SODR_P14 (0x1u << 14) /**< \brief (PIO_SODR) Set Output Data */
+#define PIO_SODR_P15 (0x1u << 15) /**< \brief (PIO_SODR) Set Output Data */
+#define PIO_SODR_P16 (0x1u << 16) /**< \brief (PIO_SODR) Set Output Data */
+#define PIO_SODR_P17 (0x1u << 17) /**< \brief (PIO_SODR) Set Output Data */
+#define PIO_SODR_P18 (0x1u << 18) /**< \brief (PIO_SODR) Set Output Data */
+#define PIO_SODR_P19 (0x1u << 19) /**< \brief (PIO_SODR) Set Output Data */
+#define PIO_SODR_P20 (0x1u << 20) /**< \brief (PIO_SODR) Set Output Data */
+#define PIO_SODR_P21 (0x1u << 21) /**< \brief (PIO_SODR) Set Output Data */
+#define PIO_SODR_P22 (0x1u << 22) /**< \brief (PIO_SODR) Set Output Data */
+#define PIO_SODR_P23 (0x1u << 23) /**< \brief (PIO_SODR) Set Output Data */
+#define PIO_SODR_P24 (0x1u << 24) /**< \brief (PIO_SODR) Set Output Data */
+#define PIO_SODR_P25 (0x1u << 25) /**< \brief (PIO_SODR) Set Output Data */
+#define PIO_SODR_P26 (0x1u << 26) /**< \brief (PIO_SODR) Set Output Data */
+#define PIO_SODR_P27 (0x1u << 27) /**< \brief (PIO_SODR) Set Output Data */
+#define PIO_SODR_P28 (0x1u << 28) /**< \brief (PIO_SODR) Set Output Data */
+#define PIO_SODR_P29 (0x1u << 29) /**< \brief (PIO_SODR) Set Output Data */
+#define PIO_SODR_P30 (0x1u << 30) /**< \brief (PIO_SODR) Set Output Data */
+#define PIO_SODR_P31 (0x1u << 31) /**< \brief (PIO_SODR) Set Output Data */
+/* -------- PIO_CODR : (PIO Offset: 0x0034) Clear Output Data Register -------- */
+#define PIO_CODR_P0 (0x1u << 0) /**< \brief (PIO_CODR) Clear Output Data */
+#define PIO_CODR_P1 (0x1u << 1) /**< \brief (PIO_CODR) Clear Output Data */
+#define PIO_CODR_P2 (0x1u << 2) /**< \brief (PIO_CODR) Clear Output Data */
+#define PIO_CODR_P3 (0x1u << 3) /**< \brief (PIO_CODR) Clear Output Data */
+#define PIO_CODR_P4 (0x1u << 4) /**< \brief (PIO_CODR) Clear Output Data */
+#define PIO_CODR_P5 (0x1u << 5) /**< \brief (PIO_CODR) Clear Output Data */
+#define PIO_CODR_P6 (0x1u << 6) /**< \brief (PIO_CODR) Clear Output Data */
+#define PIO_CODR_P7 (0x1u << 7) /**< \brief (PIO_CODR) Clear Output Data */
+#define PIO_CODR_P8 (0x1u << 8) /**< \brief (PIO_CODR) Clear Output Data */
+#define PIO_CODR_P9 (0x1u << 9) /**< \brief (PIO_CODR) Clear Output Data */
+#define PIO_CODR_P10 (0x1u << 10) /**< \brief (PIO_CODR) Clear Output Data */
+#define PIO_CODR_P11 (0x1u << 11) /**< \brief (PIO_CODR) Clear Output Data */
+#define PIO_CODR_P12 (0x1u << 12) /**< \brief (PIO_CODR) Clear Output Data */
+#define PIO_CODR_P13 (0x1u << 13) /**< \brief (PIO_CODR) Clear Output Data */
+#define PIO_CODR_P14 (0x1u << 14) /**< \brief (PIO_CODR) Clear Output Data */
+#define PIO_CODR_P15 (0x1u << 15) /**< \brief (PIO_CODR) Clear Output Data */
+#define PIO_CODR_P16 (0x1u << 16) /**< \brief (PIO_CODR) Clear Output Data */
+#define PIO_CODR_P17 (0x1u << 17) /**< \brief (PIO_CODR) Clear Output Data */
+#define PIO_CODR_P18 (0x1u << 18) /**< \brief (PIO_CODR) Clear Output Data */
+#define PIO_CODR_P19 (0x1u << 19) /**< \brief (PIO_CODR) Clear Output Data */
+#define PIO_CODR_P20 (0x1u << 20) /**< \brief (PIO_CODR) Clear Output Data */
+#define PIO_CODR_P21 (0x1u << 21) /**< \brief (PIO_CODR) Clear Output Data */
+#define PIO_CODR_P22 (0x1u << 22) /**< \brief (PIO_CODR) Clear Output Data */
+#define PIO_CODR_P23 (0x1u << 23) /**< \brief (PIO_CODR) Clear Output Data */
+#define PIO_CODR_P24 (0x1u << 24) /**< \brief (PIO_CODR) Clear Output Data */
+#define PIO_CODR_P25 (0x1u << 25) /**< \brief (PIO_CODR) Clear Output Data */
+#define PIO_CODR_P26 (0x1u << 26) /**< \brief (PIO_CODR) Clear Output Data */
+#define PIO_CODR_P27 (0x1u << 27) /**< \brief (PIO_CODR) Clear Output Data */
+#define PIO_CODR_P28 (0x1u << 28) /**< \brief (PIO_CODR) Clear Output Data */
+#define PIO_CODR_P29 (0x1u << 29) /**< \brief (PIO_CODR) Clear Output Data */
+#define PIO_CODR_P30 (0x1u << 30) /**< \brief (PIO_CODR) Clear Output Data */
+#define PIO_CODR_P31 (0x1u << 31) /**< \brief (PIO_CODR) Clear Output Data */
+/* -------- PIO_ODSR : (PIO Offset: 0x0038) Output Data Status Register -------- */
+#define PIO_ODSR_P0 (0x1u << 0) /**< \brief (PIO_ODSR) Output Data Status */
+#define PIO_ODSR_P1 (0x1u << 1) /**< \brief (PIO_ODSR) Output Data Status */
+#define PIO_ODSR_P2 (0x1u << 2) /**< \brief (PIO_ODSR) Output Data Status */
+#define PIO_ODSR_P3 (0x1u << 3) /**< \brief (PIO_ODSR) Output Data Status */
+#define PIO_ODSR_P4 (0x1u << 4) /**< \brief (PIO_ODSR) Output Data Status */
+#define PIO_ODSR_P5 (0x1u << 5) /**< \brief (PIO_ODSR) Output Data Status */
+#define PIO_ODSR_P6 (0x1u << 6) /**< \brief (PIO_ODSR) Output Data Status */
+#define PIO_ODSR_P7 (0x1u << 7) /**< \brief (PIO_ODSR) Output Data Status */
+#define PIO_ODSR_P8 (0x1u << 8) /**< \brief (PIO_ODSR) Output Data Status */
+#define PIO_ODSR_P9 (0x1u << 9) /**< \brief (PIO_ODSR) Output Data Status */
+#define PIO_ODSR_P10 (0x1u << 10) /**< \brief (PIO_ODSR) Output Data Status */
+#define PIO_ODSR_P11 (0x1u << 11) /**< \brief (PIO_ODSR) Output Data Status */
+#define PIO_ODSR_P12 (0x1u << 12) /**< \brief (PIO_ODSR) Output Data Status */
+#define PIO_ODSR_P13 (0x1u << 13) /**< \brief (PIO_ODSR) Output Data Status */
+#define PIO_ODSR_P14 (0x1u << 14) /**< \brief (PIO_ODSR) Output Data Status */
+#define PIO_ODSR_P15 (0x1u << 15) /**< \brief (PIO_ODSR) Output Data Status */
+#define PIO_ODSR_P16 (0x1u << 16) /**< \brief (PIO_ODSR) Output Data Status */
+#define PIO_ODSR_P17 (0x1u << 17) /**< \brief (PIO_ODSR) Output Data Status */
+#define PIO_ODSR_P18 (0x1u << 18) /**< \brief (PIO_ODSR) Output Data Status */
+#define PIO_ODSR_P19 (0x1u << 19) /**< \brief (PIO_ODSR) Output Data Status */
+#define PIO_ODSR_P20 (0x1u << 20) /**< \brief (PIO_ODSR) Output Data Status */
+#define PIO_ODSR_P21 (0x1u << 21) /**< \brief (PIO_ODSR) Output Data Status */
+#define PIO_ODSR_P22 (0x1u << 22) /**< \brief (PIO_ODSR) Output Data Status */
+#define PIO_ODSR_P23 (0x1u << 23) /**< \brief (PIO_ODSR) Output Data Status */
+#define PIO_ODSR_P24 (0x1u << 24) /**< \brief (PIO_ODSR) Output Data Status */
+#define PIO_ODSR_P25 (0x1u << 25) /**< \brief (PIO_ODSR) Output Data Status */
+#define PIO_ODSR_P26 (0x1u << 26) /**< \brief (PIO_ODSR) Output Data Status */
+#define PIO_ODSR_P27 (0x1u << 27) /**< \brief (PIO_ODSR) Output Data Status */
+#define PIO_ODSR_P28 (0x1u << 28) /**< \brief (PIO_ODSR) Output Data Status */
+#define PIO_ODSR_P29 (0x1u << 29) /**< \brief (PIO_ODSR) Output Data Status */
+#define PIO_ODSR_P30 (0x1u << 30) /**< \brief (PIO_ODSR) Output Data Status */
+#define PIO_ODSR_P31 (0x1u << 31) /**< \brief (PIO_ODSR) Output Data Status */
+/* -------- PIO_PDSR : (PIO Offset: 0x003C) Pin Data Status Register -------- */
+#define PIO_PDSR_P0 (0x1u << 0) /**< \brief (PIO_PDSR) Output Data Status */
+#define PIO_PDSR_P1 (0x1u << 1) /**< \brief (PIO_PDSR) Output Data Status */
+#define PIO_PDSR_P2 (0x1u << 2) /**< \brief (PIO_PDSR) Output Data Status */
+#define PIO_PDSR_P3 (0x1u << 3) /**< \brief (PIO_PDSR) Output Data Status */
+#define PIO_PDSR_P4 (0x1u << 4) /**< \brief (PIO_PDSR) Output Data Status */
+#define PIO_PDSR_P5 (0x1u << 5) /**< \brief (PIO_PDSR) Output Data Status */
+#define PIO_PDSR_P6 (0x1u << 6) /**< \brief (PIO_PDSR) Output Data Status */
+#define PIO_PDSR_P7 (0x1u << 7) /**< \brief (PIO_PDSR) Output Data Status */
+#define PIO_PDSR_P8 (0x1u << 8) /**< \brief (PIO_PDSR) Output Data Status */
+#define PIO_PDSR_P9 (0x1u << 9) /**< \brief (PIO_PDSR) Output Data Status */
+#define PIO_PDSR_P10 (0x1u << 10) /**< \brief (PIO_PDSR) Output Data Status */
+#define PIO_PDSR_P11 (0x1u << 11) /**< \brief (PIO_PDSR) Output Data Status */
+#define PIO_PDSR_P12 (0x1u << 12) /**< \brief (PIO_PDSR) Output Data Status */
+#define PIO_PDSR_P13 (0x1u << 13) /**< \brief (PIO_PDSR) Output Data Status */
+#define PIO_PDSR_P14 (0x1u << 14) /**< \brief (PIO_PDSR) Output Data Status */
+#define PIO_PDSR_P15 (0x1u << 15) /**< \brief (PIO_PDSR) Output Data Status */
+#define PIO_PDSR_P16 (0x1u << 16) /**< \brief (PIO_PDSR) Output Data Status */
+#define PIO_PDSR_P17 (0x1u << 17) /**< \brief (PIO_PDSR) Output Data Status */
+#define PIO_PDSR_P18 (0x1u << 18) /**< \brief (PIO_PDSR) Output Data Status */
+#define PIO_PDSR_P19 (0x1u << 19) /**< \brief (PIO_PDSR) Output Data Status */
+#define PIO_PDSR_P20 (0x1u << 20) /**< \brief (PIO_PDSR) Output Data Status */
+#define PIO_PDSR_P21 (0x1u << 21) /**< \brief (PIO_PDSR) Output Data Status */
+#define PIO_PDSR_P22 (0x1u << 22) /**< \brief (PIO_PDSR) Output Data Status */
+#define PIO_PDSR_P23 (0x1u << 23) /**< \brief (PIO_PDSR) Output Data Status */
+#define PIO_PDSR_P24 (0x1u << 24) /**< \brief (PIO_PDSR) Output Data Status */
+#define PIO_PDSR_P25 (0x1u << 25) /**< \brief (PIO_PDSR) Output Data Status */
+#define PIO_PDSR_P26 (0x1u << 26) /**< \brief (PIO_PDSR) Output Data Status */
+#define PIO_PDSR_P27 (0x1u << 27) /**< \brief (PIO_PDSR) Output Data Status */
+#define PIO_PDSR_P28 (0x1u << 28) /**< \brief (PIO_PDSR) Output Data Status */
+#define PIO_PDSR_P29 (0x1u << 29) /**< \brief (PIO_PDSR) Output Data Status */
+#define PIO_PDSR_P30 (0x1u << 30) /**< \brief (PIO_PDSR) Output Data Status */
+#define PIO_PDSR_P31 (0x1u << 31) /**< \brief (PIO_PDSR) Output Data Status */
+/* -------- PIO_IER : (PIO Offset: 0x0040) Interrupt Enable Register -------- */
+#define PIO_IER_P0 (0x1u << 0) /**< \brief (PIO_IER) Input Change Interrupt Enable */
+#define PIO_IER_P1 (0x1u << 1) /**< \brief (PIO_IER) Input Change Interrupt Enable */
+#define PIO_IER_P2 (0x1u << 2) /**< \brief (PIO_IER) Input Change Interrupt Enable */
+#define PIO_IER_P3 (0x1u << 3) /**< \brief (PIO_IER) Input Change Interrupt Enable */
+#define PIO_IER_P4 (0x1u << 4) /**< \brief (PIO_IER) Input Change Interrupt Enable */
+#define PIO_IER_P5 (0x1u << 5) /**< \brief (PIO_IER) Input Change Interrupt Enable */
+#define PIO_IER_P6 (0x1u << 6) /**< \brief (PIO_IER) Input Change Interrupt Enable */
+#define PIO_IER_P7 (0x1u << 7) /**< \brief (PIO_IER) Input Change Interrupt Enable */
+#define PIO_IER_P8 (0x1u << 8) /**< \brief (PIO_IER) Input Change Interrupt Enable */
+#define PIO_IER_P9 (0x1u << 9) /**< \brief (PIO_IER) Input Change Interrupt Enable */
+#define PIO_IER_P10 (0x1u << 10) /**< \brief (PIO_IER) Input Change Interrupt Enable */
+#define PIO_IER_P11 (0x1u << 11) /**< \brief (PIO_IER) Input Change Interrupt Enable */
+#define PIO_IER_P12 (0x1u << 12) /**< \brief (PIO_IER) Input Change Interrupt Enable */
+#define PIO_IER_P13 (0x1u << 13) /**< \brief (PIO_IER) Input Change Interrupt Enable */
+#define PIO_IER_P14 (0x1u << 14) /**< \brief (PIO_IER) Input Change Interrupt Enable */
+#define PIO_IER_P15 (0x1u << 15) /**< \brief (PIO_IER) Input Change Interrupt Enable */
+#define PIO_IER_P16 (0x1u << 16) /**< \brief (PIO_IER) Input Change Interrupt Enable */
+#define PIO_IER_P17 (0x1u << 17) /**< \brief (PIO_IER) Input Change Interrupt Enable */
+#define PIO_IER_P18 (0x1u << 18) /**< \brief (PIO_IER) Input Change Interrupt Enable */
+#define PIO_IER_P19 (0x1u << 19) /**< \brief (PIO_IER) Input Change Interrupt Enable */
+#define PIO_IER_P20 (0x1u << 20) /**< \brief (PIO_IER) Input Change Interrupt Enable */
+#define PIO_IER_P21 (0x1u << 21) /**< \brief (PIO_IER) Input Change Interrupt Enable */
+#define PIO_IER_P22 (0x1u << 22) /**< \brief (PIO_IER) Input Change Interrupt Enable */
+#define PIO_IER_P23 (0x1u << 23) /**< \brief (PIO_IER) Input Change Interrupt Enable */
+#define PIO_IER_P24 (0x1u << 24) /**< \brief (PIO_IER) Input Change Interrupt Enable */
+#define PIO_IER_P25 (0x1u << 25) /**< \brief (PIO_IER) Input Change Interrupt Enable */
+#define PIO_IER_P26 (0x1u << 26) /**< \brief (PIO_IER) Input Change Interrupt Enable */
+#define PIO_IER_P27 (0x1u << 27) /**< \brief (PIO_IER) Input Change Interrupt Enable */
+#define PIO_IER_P28 (0x1u << 28) /**< \brief (PIO_IER) Input Change Interrupt Enable */
+#define PIO_IER_P29 (0x1u << 29) /**< \brief (PIO_IER) Input Change Interrupt Enable */
+#define PIO_IER_P30 (0x1u << 30) /**< \brief (PIO_IER) Input Change Interrupt Enable */
+#define PIO_IER_P31 (0x1u << 31) /**< \brief (PIO_IER) Input Change Interrupt Enable */
+/* -------- PIO_IDR : (PIO Offset: 0x0044) Interrupt Disable Register -------- */
+#define PIO_IDR_P0 (0x1u << 0) /**< \brief (PIO_IDR) Input Change Interrupt Disable */
+#define PIO_IDR_P1 (0x1u << 1) /**< \brief (PIO_IDR) Input Change Interrupt Disable */
+#define PIO_IDR_P2 (0x1u << 2) /**< \brief (PIO_IDR) Input Change Interrupt Disable */
+#define PIO_IDR_P3 (0x1u << 3) /**< \brief (PIO_IDR) Input Change Interrupt Disable */
+#define PIO_IDR_P4 (0x1u << 4) /**< \brief (PIO_IDR) Input Change Interrupt Disable */
+#define PIO_IDR_P5 (0x1u << 5) /**< \brief (PIO_IDR) Input Change Interrupt Disable */
+#define PIO_IDR_P6 (0x1u << 6) /**< \brief (PIO_IDR) Input Change Interrupt Disable */
+#define PIO_IDR_P7 (0x1u << 7) /**< \brief (PIO_IDR) Input Change Interrupt Disable */
+#define PIO_IDR_P8 (0x1u << 8) /**< \brief (PIO_IDR) Input Change Interrupt Disable */
+#define PIO_IDR_P9 (0x1u << 9) /**< \brief (PIO_IDR) Input Change Interrupt Disable */
+#define PIO_IDR_P10 (0x1u << 10) /**< \brief (PIO_IDR) Input Change Interrupt Disable */
+#define PIO_IDR_P11 (0x1u << 11) /**< \brief (PIO_IDR) Input Change Interrupt Disable */
+#define PIO_IDR_P12 (0x1u << 12) /**< \brief (PIO_IDR) Input Change Interrupt Disable */
+#define PIO_IDR_P13 (0x1u << 13) /**< \brief (PIO_IDR) Input Change Interrupt Disable */
+#define PIO_IDR_P14 (0x1u << 14) /**< \brief (PIO_IDR) Input Change Interrupt Disable */
+#define PIO_IDR_P15 (0x1u << 15) /**< \brief (PIO_IDR) Input Change Interrupt Disable */
+#define PIO_IDR_P16 (0x1u << 16) /**< \brief (PIO_IDR) Input Change Interrupt Disable */
+#define PIO_IDR_P17 (0x1u << 17) /**< \brief (PIO_IDR) Input Change Interrupt Disable */
+#define PIO_IDR_P18 (0x1u << 18) /**< \brief (PIO_IDR) Input Change Interrupt Disable */
+#define PIO_IDR_P19 (0x1u << 19) /**< \brief (PIO_IDR) Input Change Interrupt Disable */
+#define PIO_IDR_P20 (0x1u << 20) /**< \brief (PIO_IDR) Input Change Interrupt Disable */
+#define PIO_IDR_P21 (0x1u << 21) /**< \brief (PIO_IDR) Input Change Interrupt Disable */
+#define PIO_IDR_P22 (0x1u << 22) /**< \brief (PIO_IDR) Input Change Interrupt Disable */
+#define PIO_IDR_P23 (0x1u << 23) /**< \brief (PIO_IDR) Input Change Interrupt Disable */
+#define PIO_IDR_P24 (0x1u << 24) /**< \brief (PIO_IDR) Input Change Interrupt Disable */
+#define PIO_IDR_P25 (0x1u << 25) /**< \brief (PIO_IDR) Input Change Interrupt Disable */
+#define PIO_IDR_P26 (0x1u << 26) /**< \brief (PIO_IDR) Input Change Interrupt Disable */
+#define PIO_IDR_P27 (0x1u << 27) /**< \brief (PIO_IDR) Input Change Interrupt Disable */
+#define PIO_IDR_P28 (0x1u << 28) /**< \brief (PIO_IDR) Input Change Interrupt Disable */
+#define PIO_IDR_P29 (0x1u << 29) /**< \brief (PIO_IDR) Input Change Interrupt Disable */
+#define PIO_IDR_P30 (0x1u << 30) /**< \brief (PIO_IDR) Input Change Interrupt Disable */
+#define PIO_IDR_P31 (0x1u << 31) /**< \brief (PIO_IDR) Input Change Interrupt Disable */
+/* -------- PIO_IMR : (PIO Offset: 0x0048) Interrupt Mask Register -------- */
+#define PIO_IMR_P0 (0x1u << 0) /**< \brief (PIO_IMR) Input Change Interrupt Mask */
+#define PIO_IMR_P1 (0x1u << 1) /**< \brief (PIO_IMR) Input Change Interrupt Mask */
+#define PIO_IMR_P2 (0x1u << 2) /**< \brief (PIO_IMR) Input Change Interrupt Mask */
+#define PIO_IMR_P3 (0x1u << 3) /**< \brief (PIO_IMR) Input Change Interrupt Mask */
+#define PIO_IMR_P4 (0x1u << 4) /**< \brief (PIO_IMR) Input Change Interrupt Mask */
+#define PIO_IMR_P5 (0x1u << 5) /**< \brief (PIO_IMR) Input Change Interrupt Mask */
+#define PIO_IMR_P6 (0x1u << 6) /**< \brief (PIO_IMR) Input Change Interrupt Mask */
+#define PIO_IMR_P7 (0x1u << 7) /**< \brief (PIO_IMR) Input Change Interrupt Mask */
+#define PIO_IMR_P8 (0x1u << 8) /**< \brief (PIO_IMR) Input Change Interrupt Mask */
+#define PIO_IMR_P9 (0x1u << 9) /**< \brief (PIO_IMR) Input Change Interrupt Mask */
+#define PIO_IMR_P10 (0x1u << 10) /**< \brief (PIO_IMR) Input Change Interrupt Mask */
+#define PIO_IMR_P11 (0x1u << 11) /**< \brief (PIO_IMR) Input Change Interrupt Mask */
+#define PIO_IMR_P12 (0x1u << 12) /**< \brief (PIO_IMR) Input Change Interrupt Mask */
+#define PIO_IMR_P13 (0x1u << 13) /**< \brief (PIO_IMR) Input Change Interrupt Mask */
+#define PIO_IMR_P14 (0x1u << 14) /**< \brief (PIO_IMR) Input Change Interrupt Mask */
+#define PIO_IMR_P15 (0x1u << 15) /**< \brief (PIO_IMR) Input Change Interrupt Mask */
+#define PIO_IMR_P16 (0x1u << 16) /**< \brief (PIO_IMR) Input Change Interrupt Mask */
+#define PIO_IMR_P17 (0x1u << 17) /**< \brief (PIO_IMR) Input Change Interrupt Mask */
+#define PIO_IMR_P18 (0x1u << 18) /**< \brief (PIO_IMR) Input Change Interrupt Mask */
+#define PIO_IMR_P19 (0x1u << 19) /**< \brief (PIO_IMR) Input Change Interrupt Mask */
+#define PIO_IMR_P20 (0x1u << 20) /**< \brief (PIO_IMR) Input Change Interrupt Mask */
+#define PIO_IMR_P21 (0x1u << 21) /**< \brief (PIO_IMR) Input Change Interrupt Mask */
+#define PIO_IMR_P22 (0x1u << 22) /**< \brief (PIO_IMR) Input Change Interrupt Mask */
+#define PIO_IMR_P23 (0x1u << 23) /**< \brief (PIO_IMR) Input Change Interrupt Mask */
+#define PIO_IMR_P24 (0x1u << 24) /**< \brief (PIO_IMR) Input Change Interrupt Mask */
+#define PIO_IMR_P25 (0x1u << 25) /**< \brief (PIO_IMR) Input Change Interrupt Mask */
+#define PIO_IMR_P26 (0x1u << 26) /**< \brief (PIO_IMR) Input Change Interrupt Mask */
+#define PIO_IMR_P27 (0x1u << 27) /**< \brief (PIO_IMR) Input Change Interrupt Mask */
+#define PIO_IMR_P28 (0x1u << 28) /**< \brief (PIO_IMR) Input Change Interrupt Mask */
+#define PIO_IMR_P29 (0x1u << 29) /**< \brief (PIO_IMR) Input Change Interrupt Mask */
+#define PIO_IMR_P30 (0x1u << 30) /**< \brief (PIO_IMR) Input Change Interrupt Mask */
+#define PIO_IMR_P31 (0x1u << 31) /**< \brief (PIO_IMR) Input Change Interrupt Mask */
+/* -------- PIO_ISR : (PIO Offset: 0x004C) Interrupt Status Register -------- */
+#define PIO_ISR_P0 (0x1u << 0) /**< \brief (PIO_ISR) Input Change Interrupt Status */
+#define PIO_ISR_P1 (0x1u << 1) /**< \brief (PIO_ISR) Input Change Interrupt Status */
+#define PIO_ISR_P2 (0x1u << 2) /**< \brief (PIO_ISR) Input Change Interrupt Status */
+#define PIO_ISR_P3 (0x1u << 3) /**< \brief (PIO_ISR) Input Change Interrupt Status */
+#define PIO_ISR_P4 (0x1u << 4) /**< \brief (PIO_ISR) Input Change Interrupt Status */
+#define PIO_ISR_P5 (0x1u << 5) /**< \brief (PIO_ISR) Input Change Interrupt Status */
+#define PIO_ISR_P6 (0x1u << 6) /**< \brief (PIO_ISR) Input Change Interrupt Status */
+#define PIO_ISR_P7 (0x1u << 7) /**< \brief (PIO_ISR) Input Change Interrupt Status */
+#define PIO_ISR_P8 (0x1u << 8) /**< \brief (PIO_ISR) Input Change Interrupt Status */
+#define PIO_ISR_P9 (0x1u << 9) /**< \brief (PIO_ISR) Input Change Interrupt Status */
+#define PIO_ISR_P10 (0x1u << 10) /**< \brief (PIO_ISR) Input Change Interrupt Status */
+#define PIO_ISR_P11 (0x1u << 11) /**< \brief (PIO_ISR) Input Change Interrupt Status */
+#define PIO_ISR_P12 (0x1u << 12) /**< \brief (PIO_ISR) Input Change Interrupt Status */
+#define PIO_ISR_P13 (0x1u << 13) /**< \brief (PIO_ISR) Input Change Interrupt Status */
+#define PIO_ISR_P14 (0x1u << 14) /**< \brief (PIO_ISR) Input Change Interrupt Status */
+#define PIO_ISR_P15 (0x1u << 15) /**< \brief (PIO_ISR) Input Change Interrupt Status */
+#define PIO_ISR_P16 (0x1u << 16) /**< \brief (PIO_ISR) Input Change Interrupt Status */
+#define PIO_ISR_P17 (0x1u << 17) /**< \brief (PIO_ISR) Input Change Interrupt Status */
+#define PIO_ISR_P18 (0x1u << 18) /**< \brief (PIO_ISR) Input Change Interrupt Status */
+#define PIO_ISR_P19 (0x1u << 19) /**< \brief (PIO_ISR) Input Change Interrupt Status */
+#define PIO_ISR_P20 (0x1u << 20) /**< \brief (PIO_ISR) Input Change Interrupt Status */
+#define PIO_ISR_P21 (0x1u << 21) /**< \brief (PIO_ISR) Input Change Interrupt Status */
+#define PIO_ISR_P22 (0x1u << 22) /**< \brief (PIO_ISR) Input Change Interrupt Status */
+#define PIO_ISR_P23 (0x1u << 23) /**< \brief (PIO_ISR) Input Change Interrupt Status */
+#define PIO_ISR_P24 (0x1u << 24) /**< \brief (PIO_ISR) Input Change Interrupt Status */
+#define PIO_ISR_P25 (0x1u << 25) /**< \brief (PIO_ISR) Input Change Interrupt Status */
+#define PIO_ISR_P26 (0x1u << 26) /**< \brief (PIO_ISR) Input Change Interrupt Status */
+#define PIO_ISR_P27 (0x1u << 27) /**< \brief (PIO_ISR) Input Change Interrupt Status */
+#define PIO_ISR_P28 (0x1u << 28) /**< \brief (PIO_ISR) Input Change Interrupt Status */
+#define PIO_ISR_P29 (0x1u << 29) /**< \brief (PIO_ISR) Input Change Interrupt Status */
+#define PIO_ISR_P30 (0x1u << 30) /**< \brief (PIO_ISR) Input Change Interrupt Status */
+#define PIO_ISR_P31 (0x1u << 31) /**< \brief (PIO_ISR) Input Change Interrupt Status */
+/* -------- PIO_MDER : (PIO Offset: 0x0050) Multi-driver Enable Register -------- */
+#define PIO_MDER_P0 (0x1u << 0) /**< \brief (PIO_MDER) Multi Drive Enable. */
+#define PIO_MDER_P1 (0x1u << 1) /**< \brief (PIO_MDER) Multi Drive Enable. */
+#define PIO_MDER_P2 (0x1u << 2) /**< \brief (PIO_MDER) Multi Drive Enable. */
+#define PIO_MDER_P3 (0x1u << 3) /**< \brief (PIO_MDER) Multi Drive Enable. */
+#define PIO_MDER_P4 (0x1u << 4) /**< \brief (PIO_MDER) Multi Drive Enable. */
+#define PIO_MDER_P5 (0x1u << 5) /**< \brief (PIO_MDER) Multi Drive Enable. */
+#define PIO_MDER_P6 (0x1u << 6) /**< \brief (PIO_MDER) Multi Drive Enable. */
+#define PIO_MDER_P7 (0x1u << 7) /**< \brief (PIO_MDER) Multi Drive Enable. */
+#define PIO_MDER_P8 (0x1u << 8) /**< \brief (PIO_MDER) Multi Drive Enable. */
+#define PIO_MDER_P9 (0x1u << 9) /**< \brief (PIO_MDER) Multi Drive Enable. */
+#define PIO_MDER_P10 (0x1u << 10) /**< \brief (PIO_MDER) Multi Drive Enable. */
+#define PIO_MDER_P11 (0x1u << 11) /**< \brief (PIO_MDER) Multi Drive Enable. */
+#define PIO_MDER_P12 (0x1u << 12) /**< \brief (PIO_MDER) Multi Drive Enable. */
+#define PIO_MDER_P13 (0x1u << 13) /**< \brief (PIO_MDER) Multi Drive Enable. */
+#define PIO_MDER_P14 (0x1u << 14) /**< \brief (PIO_MDER) Multi Drive Enable. */
+#define PIO_MDER_P15 (0x1u << 15) /**< \brief (PIO_MDER) Multi Drive Enable. */
+#define PIO_MDER_P16 (0x1u << 16) /**< \brief (PIO_MDER) Multi Drive Enable. */
+#define PIO_MDER_P17 (0x1u << 17) /**< \brief (PIO_MDER) Multi Drive Enable. */
+#define PIO_MDER_P18 (0x1u << 18) /**< \brief (PIO_MDER) Multi Drive Enable. */
+#define PIO_MDER_P19 (0x1u << 19) /**< \brief (PIO_MDER) Multi Drive Enable. */
+#define PIO_MDER_P20 (0x1u << 20) /**< \brief (PIO_MDER) Multi Drive Enable. */
+#define PIO_MDER_P21 (0x1u << 21) /**< \brief (PIO_MDER) Multi Drive Enable. */
+#define PIO_MDER_P22 (0x1u << 22) /**< \brief (PIO_MDER) Multi Drive Enable. */
+#define PIO_MDER_P23 (0x1u << 23) /**< \brief (PIO_MDER) Multi Drive Enable. */
+#define PIO_MDER_P24 (0x1u << 24) /**< \brief (PIO_MDER) Multi Drive Enable. */
+#define PIO_MDER_P25 (0x1u << 25) /**< \brief (PIO_MDER) Multi Drive Enable. */
+#define PIO_MDER_P26 (0x1u << 26) /**< \brief (PIO_MDER) Multi Drive Enable. */
+#define PIO_MDER_P27 (0x1u << 27) /**< \brief (PIO_MDER) Multi Drive Enable. */
+#define PIO_MDER_P28 (0x1u << 28) /**< \brief (PIO_MDER) Multi Drive Enable. */
+#define PIO_MDER_P29 (0x1u << 29) /**< \brief (PIO_MDER) Multi Drive Enable. */
+#define PIO_MDER_P30 (0x1u << 30) /**< \brief (PIO_MDER) Multi Drive Enable. */
+#define PIO_MDER_P31 (0x1u << 31) /**< \brief (PIO_MDER) Multi Drive Enable. */
+/* -------- PIO_MDDR : (PIO Offset: 0x0054) Multi-driver Disable Register -------- */
+#define PIO_MDDR_P0 (0x1u << 0) /**< \brief (PIO_MDDR) Multi Drive Disable. */
+#define PIO_MDDR_P1 (0x1u << 1) /**< \brief (PIO_MDDR) Multi Drive Disable. */
+#define PIO_MDDR_P2 (0x1u << 2) /**< \brief (PIO_MDDR) Multi Drive Disable. */
+#define PIO_MDDR_P3 (0x1u << 3) /**< \brief (PIO_MDDR) Multi Drive Disable. */
+#define PIO_MDDR_P4 (0x1u << 4) /**< \brief (PIO_MDDR) Multi Drive Disable. */
+#define PIO_MDDR_P5 (0x1u << 5) /**< \brief (PIO_MDDR) Multi Drive Disable. */
+#define PIO_MDDR_P6 (0x1u << 6) /**< \brief (PIO_MDDR) Multi Drive Disable. */
+#define PIO_MDDR_P7 (0x1u << 7) /**< \brief (PIO_MDDR) Multi Drive Disable. */
+#define PIO_MDDR_P8 (0x1u << 8) /**< \brief (PIO_MDDR) Multi Drive Disable. */
+#define PIO_MDDR_P9 (0x1u << 9) /**< \brief (PIO_MDDR) Multi Drive Disable. */
+#define PIO_MDDR_P10 (0x1u << 10) /**< \brief (PIO_MDDR) Multi Drive Disable. */
+#define PIO_MDDR_P11 (0x1u << 11) /**< \brief (PIO_MDDR) Multi Drive Disable. */
+#define PIO_MDDR_P12 (0x1u << 12) /**< \brief (PIO_MDDR) Multi Drive Disable. */
+#define PIO_MDDR_P13 (0x1u << 13) /**< \brief (PIO_MDDR) Multi Drive Disable. */
+#define PIO_MDDR_P14 (0x1u << 14) /**< \brief (PIO_MDDR) Multi Drive Disable. */
+#define PIO_MDDR_P15 (0x1u << 15) /**< \brief (PIO_MDDR) Multi Drive Disable. */
+#define PIO_MDDR_P16 (0x1u << 16) /**< \brief (PIO_MDDR) Multi Drive Disable. */
+#define PIO_MDDR_P17 (0x1u << 17) /**< \brief (PIO_MDDR) Multi Drive Disable. */
+#define PIO_MDDR_P18 (0x1u << 18) /**< \brief (PIO_MDDR) Multi Drive Disable. */
+#define PIO_MDDR_P19 (0x1u << 19) /**< \brief (PIO_MDDR) Multi Drive Disable. */
+#define PIO_MDDR_P20 (0x1u << 20) /**< \brief (PIO_MDDR) Multi Drive Disable. */
+#define PIO_MDDR_P21 (0x1u << 21) /**< \brief (PIO_MDDR) Multi Drive Disable. */
+#define PIO_MDDR_P22 (0x1u << 22) /**< \brief (PIO_MDDR) Multi Drive Disable. */
+#define PIO_MDDR_P23 (0x1u << 23) /**< \brief (PIO_MDDR) Multi Drive Disable. */
+#define PIO_MDDR_P24 (0x1u << 24) /**< \brief (PIO_MDDR) Multi Drive Disable. */
+#define PIO_MDDR_P25 (0x1u << 25) /**< \brief (PIO_MDDR) Multi Drive Disable. */
+#define PIO_MDDR_P26 (0x1u << 26) /**< \brief (PIO_MDDR) Multi Drive Disable. */
+#define PIO_MDDR_P27 (0x1u << 27) /**< \brief (PIO_MDDR) Multi Drive Disable. */
+#define PIO_MDDR_P28 (0x1u << 28) /**< \brief (PIO_MDDR) Multi Drive Disable. */
+#define PIO_MDDR_P29 (0x1u << 29) /**< \brief (PIO_MDDR) Multi Drive Disable. */
+#define PIO_MDDR_P30 (0x1u << 30) /**< \brief (PIO_MDDR) Multi Drive Disable. */
+#define PIO_MDDR_P31 (0x1u << 31) /**< \brief (PIO_MDDR) Multi Drive Disable. */
+/* -------- PIO_MDSR : (PIO Offset: 0x0058) Multi-driver Status Register -------- */
+#define PIO_MDSR_P0 (0x1u << 0) /**< \brief (PIO_MDSR) Multi Drive Status. */
+#define PIO_MDSR_P1 (0x1u << 1) /**< \brief (PIO_MDSR) Multi Drive Status. */
+#define PIO_MDSR_P2 (0x1u << 2) /**< \brief (PIO_MDSR) Multi Drive Status. */
+#define PIO_MDSR_P3 (0x1u << 3) /**< \brief (PIO_MDSR) Multi Drive Status. */
+#define PIO_MDSR_P4 (0x1u << 4) /**< \brief (PIO_MDSR) Multi Drive Status. */
+#define PIO_MDSR_P5 (0x1u << 5) /**< \brief (PIO_MDSR) Multi Drive Status. */
+#define PIO_MDSR_P6 (0x1u << 6) /**< \brief (PIO_MDSR) Multi Drive Status. */
+#define PIO_MDSR_P7 (0x1u << 7) /**< \brief (PIO_MDSR) Multi Drive Status. */
+#define PIO_MDSR_P8 (0x1u << 8) /**< \brief (PIO_MDSR) Multi Drive Status. */
+#define PIO_MDSR_P9 (0x1u << 9) /**< \brief (PIO_MDSR) Multi Drive Status. */
+#define PIO_MDSR_P10 (0x1u << 10) /**< \brief (PIO_MDSR) Multi Drive Status. */
+#define PIO_MDSR_P11 (0x1u << 11) /**< \brief (PIO_MDSR) Multi Drive Status. */
+#define PIO_MDSR_P12 (0x1u << 12) /**< \brief (PIO_MDSR) Multi Drive Status. */
+#define PIO_MDSR_P13 (0x1u << 13) /**< \brief (PIO_MDSR) Multi Drive Status. */
+#define PIO_MDSR_P14 (0x1u << 14) /**< \brief (PIO_MDSR) Multi Drive Status. */
+#define PIO_MDSR_P15 (0x1u << 15) /**< \brief (PIO_MDSR) Multi Drive Status. */
+#define PIO_MDSR_P16 (0x1u << 16) /**< \brief (PIO_MDSR) Multi Drive Status. */
+#define PIO_MDSR_P17 (0x1u << 17) /**< \brief (PIO_MDSR) Multi Drive Status. */
+#define PIO_MDSR_P18 (0x1u << 18) /**< \brief (PIO_MDSR) Multi Drive Status. */
+#define PIO_MDSR_P19 (0x1u << 19) /**< \brief (PIO_MDSR) Multi Drive Status. */
+#define PIO_MDSR_P20 (0x1u << 20) /**< \brief (PIO_MDSR) Multi Drive Status. */
+#define PIO_MDSR_P21 (0x1u << 21) /**< \brief (PIO_MDSR) Multi Drive Status. */
+#define PIO_MDSR_P22 (0x1u << 22) /**< \brief (PIO_MDSR) Multi Drive Status. */
+#define PIO_MDSR_P23 (0x1u << 23) /**< \brief (PIO_MDSR) Multi Drive Status. */
+#define PIO_MDSR_P24 (0x1u << 24) /**< \brief (PIO_MDSR) Multi Drive Status. */
+#define PIO_MDSR_P25 (0x1u << 25) /**< \brief (PIO_MDSR) Multi Drive Status. */
+#define PIO_MDSR_P26 (0x1u << 26) /**< \brief (PIO_MDSR) Multi Drive Status. */
+#define PIO_MDSR_P27 (0x1u << 27) /**< \brief (PIO_MDSR) Multi Drive Status. */
+#define PIO_MDSR_P28 (0x1u << 28) /**< \brief (PIO_MDSR) Multi Drive Status. */
+#define PIO_MDSR_P29 (0x1u << 29) /**< \brief (PIO_MDSR) Multi Drive Status. */
+#define PIO_MDSR_P30 (0x1u << 30) /**< \brief (PIO_MDSR) Multi Drive Status. */
+#define PIO_MDSR_P31 (0x1u << 31) /**< \brief (PIO_MDSR) Multi Drive Status. */
+/* -------- PIO_PUDR : (PIO Offset: 0x0060) Pull-up Disable Register -------- */
+#define PIO_PUDR_P0 (0x1u << 0) /**< \brief (PIO_PUDR) Pull Up Disable. */
+#define PIO_PUDR_P1 (0x1u << 1) /**< \brief (PIO_PUDR) Pull Up Disable. */
+#define PIO_PUDR_P2 (0x1u << 2) /**< \brief (PIO_PUDR) Pull Up Disable. */
+#define PIO_PUDR_P3 (0x1u << 3) /**< \brief (PIO_PUDR) Pull Up Disable. */
+#define PIO_PUDR_P4 (0x1u << 4) /**< \brief (PIO_PUDR) Pull Up Disable. */
+#define PIO_PUDR_P5 (0x1u << 5) /**< \brief (PIO_PUDR) Pull Up Disable. */
+#define PIO_PUDR_P6 (0x1u << 6) /**< \brief (PIO_PUDR) Pull Up Disable. */
+#define PIO_PUDR_P7 (0x1u << 7) /**< \brief (PIO_PUDR) Pull Up Disable. */
+#define PIO_PUDR_P8 (0x1u << 8) /**< \brief (PIO_PUDR) Pull Up Disable. */
+#define PIO_PUDR_P9 (0x1u << 9) /**< \brief (PIO_PUDR) Pull Up Disable. */
+#define PIO_PUDR_P10 (0x1u << 10) /**< \brief (PIO_PUDR) Pull Up Disable. */
+#define PIO_PUDR_P11 (0x1u << 11) /**< \brief (PIO_PUDR) Pull Up Disable. */
+#define PIO_PUDR_P12 (0x1u << 12) /**< \brief (PIO_PUDR) Pull Up Disable. */
+#define PIO_PUDR_P13 (0x1u << 13) /**< \brief (PIO_PUDR) Pull Up Disable. */
+#define PIO_PUDR_P14 (0x1u << 14) /**< \brief (PIO_PUDR) Pull Up Disable. */
+#define PIO_PUDR_P15 (0x1u << 15) /**< \brief (PIO_PUDR) Pull Up Disable. */
+#define PIO_PUDR_P16 (0x1u << 16) /**< \brief (PIO_PUDR) Pull Up Disable. */
+#define PIO_PUDR_P17 (0x1u << 17) /**< \brief (PIO_PUDR) Pull Up Disable. */
+#define PIO_PUDR_P18 (0x1u << 18) /**< \brief (PIO_PUDR) Pull Up Disable. */
+#define PIO_PUDR_P19 (0x1u << 19) /**< \brief (PIO_PUDR) Pull Up Disable. */
+#define PIO_PUDR_P20 (0x1u << 20) /**< \brief (PIO_PUDR) Pull Up Disable. */
+#define PIO_PUDR_P21 (0x1u << 21) /**< \brief (PIO_PUDR) Pull Up Disable. */
+#define PIO_PUDR_P22 (0x1u << 22) /**< \brief (PIO_PUDR) Pull Up Disable. */
+#define PIO_PUDR_P23 (0x1u << 23) /**< \brief (PIO_PUDR) Pull Up Disable. */
+#define PIO_PUDR_P24 (0x1u << 24) /**< \brief (PIO_PUDR) Pull Up Disable. */
+#define PIO_PUDR_P25 (0x1u << 25) /**< \brief (PIO_PUDR) Pull Up Disable. */
+#define PIO_PUDR_P26 (0x1u << 26) /**< \brief (PIO_PUDR) Pull Up Disable. */
+#define PIO_PUDR_P27 (0x1u << 27) /**< \brief (PIO_PUDR) Pull Up Disable. */
+#define PIO_PUDR_P28 (0x1u << 28) /**< \brief (PIO_PUDR) Pull Up Disable. */
+#define PIO_PUDR_P29 (0x1u << 29) /**< \brief (PIO_PUDR) Pull Up Disable. */
+#define PIO_PUDR_P30 (0x1u << 30) /**< \brief (PIO_PUDR) Pull Up Disable. */
+#define PIO_PUDR_P31 (0x1u << 31) /**< \brief (PIO_PUDR) Pull Up Disable. */
+/* -------- PIO_PUER : (PIO Offset: 0x0064) Pull-up Enable Register -------- */
+#define PIO_PUER_P0 (0x1u << 0) /**< \brief (PIO_PUER) Pull Up Enable. */
+#define PIO_PUER_P1 (0x1u << 1) /**< \brief (PIO_PUER) Pull Up Enable. */
+#define PIO_PUER_P2 (0x1u << 2) /**< \brief (PIO_PUER) Pull Up Enable. */
+#define PIO_PUER_P3 (0x1u << 3) /**< \brief (PIO_PUER) Pull Up Enable. */
+#define PIO_PUER_P4 (0x1u << 4) /**< \brief (PIO_PUER) Pull Up Enable. */
+#define PIO_PUER_P5 (0x1u << 5) /**< \brief (PIO_PUER) Pull Up Enable. */
+#define PIO_PUER_P6 (0x1u << 6) /**< \brief (PIO_PUER) Pull Up Enable. */
+#define PIO_PUER_P7 (0x1u << 7) /**< \brief (PIO_PUER) Pull Up Enable. */
+#define PIO_PUER_P8 (0x1u << 8) /**< \brief (PIO_PUER) Pull Up Enable. */
+#define PIO_PUER_P9 (0x1u << 9) /**< \brief (PIO_PUER) Pull Up Enable. */
+#define PIO_PUER_P10 (0x1u << 10) /**< \brief (PIO_PUER) Pull Up Enable. */
+#define PIO_PUER_P11 (0x1u << 11) /**< \brief (PIO_PUER) Pull Up Enable. */
+#define PIO_PUER_P12 (0x1u << 12) /**< \brief (PIO_PUER) Pull Up Enable. */
+#define PIO_PUER_P13 (0x1u << 13) /**< \brief (PIO_PUER) Pull Up Enable. */
+#define PIO_PUER_P14 (0x1u << 14) /**< \brief (PIO_PUER) Pull Up Enable. */
+#define PIO_PUER_P15 (0x1u << 15) /**< \brief (PIO_PUER) Pull Up Enable. */
+#define PIO_PUER_P16 (0x1u << 16) /**< \brief (PIO_PUER) Pull Up Enable. */
+#define PIO_PUER_P17 (0x1u << 17) /**< \brief (PIO_PUER) Pull Up Enable. */
+#define PIO_PUER_P18 (0x1u << 18) /**< \brief (PIO_PUER) Pull Up Enable. */
+#define PIO_PUER_P19 (0x1u << 19) /**< \brief (PIO_PUER) Pull Up Enable. */
+#define PIO_PUER_P20 (0x1u << 20) /**< \brief (PIO_PUER) Pull Up Enable. */
+#define PIO_PUER_P21 (0x1u << 21) /**< \brief (PIO_PUER) Pull Up Enable. */
+#define PIO_PUER_P22 (0x1u << 22) /**< \brief (PIO_PUER) Pull Up Enable. */
+#define PIO_PUER_P23 (0x1u << 23) /**< \brief (PIO_PUER) Pull Up Enable. */
+#define PIO_PUER_P24 (0x1u << 24) /**< \brief (PIO_PUER) Pull Up Enable. */
+#define PIO_PUER_P25 (0x1u << 25) /**< \brief (PIO_PUER) Pull Up Enable. */
+#define PIO_PUER_P26 (0x1u << 26) /**< \brief (PIO_PUER) Pull Up Enable. */
+#define PIO_PUER_P27 (0x1u << 27) /**< \brief (PIO_PUER) Pull Up Enable. */
+#define PIO_PUER_P28 (0x1u << 28) /**< \brief (PIO_PUER) Pull Up Enable. */
+#define PIO_PUER_P29 (0x1u << 29) /**< \brief (PIO_PUER) Pull Up Enable. */
+#define PIO_PUER_P30 (0x1u << 30) /**< \brief (PIO_PUER) Pull Up Enable. */
+#define PIO_PUER_P31 (0x1u << 31) /**< \brief (PIO_PUER) Pull Up Enable. */
+/* -------- PIO_PUSR : (PIO Offset: 0x0068) Pad Pull-up Status Register -------- */
+#define PIO_PUSR_P0 (0x1u << 0) /**< \brief (PIO_PUSR) Pull Up Status. */
+#define PIO_PUSR_P1 (0x1u << 1) /**< \brief (PIO_PUSR) Pull Up Status. */
+#define PIO_PUSR_P2 (0x1u << 2) /**< \brief (PIO_PUSR) Pull Up Status. */
+#define PIO_PUSR_P3 (0x1u << 3) /**< \brief (PIO_PUSR) Pull Up Status. */
+#define PIO_PUSR_P4 (0x1u << 4) /**< \brief (PIO_PUSR) Pull Up Status. */
+#define PIO_PUSR_P5 (0x1u << 5) /**< \brief (PIO_PUSR) Pull Up Status. */
+#define PIO_PUSR_P6 (0x1u << 6) /**< \brief (PIO_PUSR) Pull Up Status. */
+#define PIO_PUSR_P7 (0x1u << 7) /**< \brief (PIO_PUSR) Pull Up Status. */
+#define PIO_PUSR_P8 (0x1u << 8) /**< \brief (PIO_PUSR) Pull Up Status. */
+#define PIO_PUSR_P9 (0x1u << 9) /**< \brief (PIO_PUSR) Pull Up Status. */
+#define PIO_PUSR_P10 (0x1u << 10) /**< \brief (PIO_PUSR) Pull Up Status. */
+#define PIO_PUSR_P11 (0x1u << 11) /**< \brief (PIO_PUSR) Pull Up Status. */
+#define PIO_PUSR_P12 (0x1u << 12) /**< \brief (PIO_PUSR) Pull Up Status. */
+#define PIO_PUSR_P13 (0x1u << 13) /**< \brief (PIO_PUSR) Pull Up Status. */
+#define PIO_PUSR_P14 (0x1u << 14) /**< \brief (PIO_PUSR) Pull Up Status. */
+#define PIO_PUSR_P15 (0x1u << 15) /**< \brief (PIO_PUSR) Pull Up Status. */
+#define PIO_PUSR_P16 (0x1u << 16) /**< \brief (PIO_PUSR) Pull Up Status. */
+#define PIO_PUSR_P17 (0x1u << 17) /**< \brief (PIO_PUSR) Pull Up Status. */
+#define PIO_PUSR_P18 (0x1u << 18) /**< \brief (PIO_PUSR) Pull Up Status. */
+#define PIO_PUSR_P19 (0x1u << 19) /**< \brief (PIO_PUSR) Pull Up Status. */
+#define PIO_PUSR_P20 (0x1u << 20) /**< \brief (PIO_PUSR) Pull Up Status. */
+#define PIO_PUSR_P21 (0x1u << 21) /**< \brief (PIO_PUSR) Pull Up Status. */
+#define PIO_PUSR_P22 (0x1u << 22) /**< \brief (PIO_PUSR) Pull Up Status. */
+#define PIO_PUSR_P23 (0x1u << 23) /**< \brief (PIO_PUSR) Pull Up Status. */
+#define PIO_PUSR_P24 (0x1u << 24) /**< \brief (PIO_PUSR) Pull Up Status. */
+#define PIO_PUSR_P25 (0x1u << 25) /**< \brief (PIO_PUSR) Pull Up Status. */
+#define PIO_PUSR_P26 (0x1u << 26) /**< \brief (PIO_PUSR) Pull Up Status. */
+#define PIO_PUSR_P27 (0x1u << 27) /**< \brief (PIO_PUSR) Pull Up Status. */
+#define PIO_PUSR_P28 (0x1u << 28) /**< \brief (PIO_PUSR) Pull Up Status. */
+#define PIO_PUSR_P29 (0x1u << 29) /**< \brief (PIO_PUSR) Pull Up Status. */
+#define PIO_PUSR_P30 (0x1u << 30) /**< \brief (PIO_PUSR) Pull Up Status. */
+#define PIO_PUSR_P31 (0x1u << 31) /**< \brief (PIO_PUSR) Pull Up Status. */
+/* -------- PIO_ABSR : (PIO Offset: 0x0070) Peripheral AB Select Register -------- */
+#define PIO_ABSR_P0 (0x1u << 0) /**< \brief (PIO_ABSR) Peripheral A Select. */
+#define PIO_ABSR_P1 (0x1u << 1) /**< \brief (PIO_ABSR) Peripheral A Select. */
+#define PIO_ABSR_P2 (0x1u << 2) /**< \brief (PIO_ABSR) Peripheral A Select. */
+#define PIO_ABSR_P3 (0x1u << 3) /**< \brief (PIO_ABSR) Peripheral A Select. */
+#define PIO_ABSR_P4 (0x1u << 4) /**< \brief (PIO_ABSR) Peripheral A Select. */
+#define PIO_ABSR_P5 (0x1u << 5) /**< \brief (PIO_ABSR) Peripheral A Select. */
+#define PIO_ABSR_P6 (0x1u << 6) /**< \brief (PIO_ABSR) Peripheral A Select. */
+#define PIO_ABSR_P7 (0x1u << 7) /**< \brief (PIO_ABSR) Peripheral A Select. */
+#define PIO_ABSR_P8 (0x1u << 8) /**< \brief (PIO_ABSR) Peripheral A Select. */
+#define PIO_ABSR_P9 (0x1u << 9) /**< \brief (PIO_ABSR) Peripheral A Select. */
+#define PIO_ABSR_P10 (0x1u << 10) /**< \brief (PIO_ABSR) Peripheral A Select. */
+#define PIO_ABSR_P11 (0x1u << 11) /**< \brief (PIO_ABSR) Peripheral A Select. */
+#define PIO_ABSR_P12 (0x1u << 12) /**< \brief (PIO_ABSR) Peripheral A Select. */
+#define PIO_ABSR_P13 (0x1u << 13) /**< \brief (PIO_ABSR) Peripheral A Select. */
+#define PIO_ABSR_P14 (0x1u << 14) /**< \brief (PIO_ABSR) Peripheral A Select. */
+#define PIO_ABSR_P15 (0x1u << 15) /**< \brief (PIO_ABSR) Peripheral A Select. */
+#define PIO_ABSR_P16 (0x1u << 16) /**< \brief (PIO_ABSR) Peripheral A Select. */
+#define PIO_ABSR_P17 (0x1u << 17) /**< \brief (PIO_ABSR) Peripheral A Select. */
+#define PIO_ABSR_P18 (0x1u << 18) /**< \brief (PIO_ABSR) Peripheral A Select. */
+#define PIO_ABSR_P19 (0x1u << 19) /**< \brief (PIO_ABSR) Peripheral A Select. */
+#define PIO_ABSR_P20 (0x1u << 20) /**< \brief (PIO_ABSR) Peripheral A Select. */
+#define PIO_ABSR_P21 (0x1u << 21) /**< \brief (PIO_ABSR) Peripheral A Select. */
+#define PIO_ABSR_P22 (0x1u << 22) /**< \brief (PIO_ABSR) Peripheral A Select. */
+#define PIO_ABSR_P23 (0x1u << 23) /**< \brief (PIO_ABSR) Peripheral A Select. */
+#define PIO_ABSR_P24 (0x1u << 24) /**< \brief (PIO_ABSR) Peripheral A Select. */
+#define PIO_ABSR_P25 (0x1u << 25) /**< \brief (PIO_ABSR) Peripheral A Select. */
+#define PIO_ABSR_P26 (0x1u << 26) /**< \brief (PIO_ABSR) Peripheral A Select. */
+#define PIO_ABSR_P27 (0x1u << 27) /**< \brief (PIO_ABSR) Peripheral A Select. */
+#define PIO_ABSR_P28 (0x1u << 28) /**< \brief (PIO_ABSR) Peripheral A Select. */
+#define PIO_ABSR_P29 (0x1u << 29) /**< \brief (PIO_ABSR) Peripheral A Select. */
+#define PIO_ABSR_P30 (0x1u << 30) /**< \brief (PIO_ABSR) Peripheral A Select. */
+#define PIO_ABSR_P31 (0x1u << 31) /**< \brief (PIO_ABSR) Peripheral A Select. */
+/* -------- PIO_SCIFSR : (PIO Offset: 0x0080) System Clock Glitch Input Filter Select Register -------- */
+#define PIO_SCIFSR_P0 (0x1u << 0) /**< \brief (PIO_SCIFSR) System Clock Glitch Filtering Select. */
+#define PIO_SCIFSR_P1 (0x1u << 1) /**< \brief (PIO_SCIFSR) System Clock Glitch Filtering Select. */
+#define PIO_SCIFSR_P2 (0x1u << 2) /**< \brief (PIO_SCIFSR) System Clock Glitch Filtering Select. */
+#define PIO_SCIFSR_P3 (0x1u << 3) /**< \brief (PIO_SCIFSR) System Clock Glitch Filtering Select. */
+#define PIO_SCIFSR_P4 (0x1u << 4) /**< \brief (PIO_SCIFSR) System Clock Glitch Filtering Select. */
+#define PIO_SCIFSR_P5 (0x1u << 5) /**< \brief (PIO_SCIFSR) System Clock Glitch Filtering Select. */
+#define PIO_SCIFSR_P6 (0x1u << 6) /**< \brief (PIO_SCIFSR) System Clock Glitch Filtering Select. */
+#define PIO_SCIFSR_P7 (0x1u << 7) /**< \brief (PIO_SCIFSR) System Clock Glitch Filtering Select. */
+#define PIO_SCIFSR_P8 (0x1u << 8) /**< \brief (PIO_SCIFSR) System Clock Glitch Filtering Select. */
+#define PIO_SCIFSR_P9 (0x1u << 9) /**< \brief (PIO_SCIFSR) System Clock Glitch Filtering Select. */
+#define PIO_SCIFSR_P10 (0x1u << 10) /**< \brief (PIO_SCIFSR) System Clock Glitch Filtering Select. */
+#define PIO_SCIFSR_P11 (0x1u << 11) /**< \brief (PIO_SCIFSR) System Clock Glitch Filtering Select. */
+#define PIO_SCIFSR_P12 (0x1u << 12) /**< \brief (PIO_SCIFSR) System Clock Glitch Filtering Select. */
+#define PIO_SCIFSR_P13 (0x1u << 13) /**< \brief (PIO_SCIFSR) System Clock Glitch Filtering Select. */
+#define PIO_SCIFSR_P14 (0x1u << 14) /**< \brief (PIO_SCIFSR) System Clock Glitch Filtering Select. */
+#define PIO_SCIFSR_P15 (0x1u << 15) /**< \brief (PIO_SCIFSR) System Clock Glitch Filtering Select. */
+#define PIO_SCIFSR_P16 (0x1u << 16) /**< \brief (PIO_SCIFSR) System Clock Glitch Filtering Select. */
+#define PIO_SCIFSR_P17 (0x1u << 17) /**< \brief (PIO_SCIFSR) System Clock Glitch Filtering Select. */
+#define PIO_SCIFSR_P18 (0x1u << 18) /**< \brief (PIO_SCIFSR) System Clock Glitch Filtering Select. */
+#define PIO_SCIFSR_P19 (0x1u << 19) /**< \brief (PIO_SCIFSR) System Clock Glitch Filtering Select. */
+#define PIO_SCIFSR_P20 (0x1u << 20) /**< \brief (PIO_SCIFSR) System Clock Glitch Filtering Select. */
+#define PIO_SCIFSR_P21 (0x1u << 21) /**< \brief (PIO_SCIFSR) System Clock Glitch Filtering Select. */
+#define PIO_SCIFSR_P22 (0x1u << 22) /**< \brief (PIO_SCIFSR) System Clock Glitch Filtering Select. */
+#define PIO_SCIFSR_P23 (0x1u << 23) /**< \brief (PIO_SCIFSR) System Clock Glitch Filtering Select. */
+#define PIO_SCIFSR_P24 (0x1u << 24) /**< \brief (PIO_SCIFSR) System Clock Glitch Filtering Select. */
+#define PIO_SCIFSR_P25 (0x1u << 25) /**< \brief (PIO_SCIFSR) System Clock Glitch Filtering Select. */
+#define PIO_SCIFSR_P26 (0x1u << 26) /**< \brief (PIO_SCIFSR) System Clock Glitch Filtering Select. */
+#define PIO_SCIFSR_P27 (0x1u << 27) /**< \brief (PIO_SCIFSR) System Clock Glitch Filtering Select. */
+#define PIO_SCIFSR_P28 (0x1u << 28) /**< \brief (PIO_SCIFSR) System Clock Glitch Filtering Select. */
+#define PIO_SCIFSR_P29 (0x1u << 29) /**< \brief (PIO_SCIFSR) System Clock Glitch Filtering Select. */
+#define PIO_SCIFSR_P30 (0x1u << 30) /**< \brief (PIO_SCIFSR) System Clock Glitch Filtering Select. */
+#define PIO_SCIFSR_P31 (0x1u << 31) /**< \brief (PIO_SCIFSR) System Clock Glitch Filtering Select. */
+/* -------- PIO_DIFSR : (PIO Offset: 0x0084) Debouncing Input Filter Select Register -------- */
+#define PIO_DIFSR_P0 (0x1u << 0) /**< \brief (PIO_DIFSR) Debouncing Filtering Select. */
+#define PIO_DIFSR_P1 (0x1u << 1) /**< \brief (PIO_DIFSR) Debouncing Filtering Select. */
+#define PIO_DIFSR_P2 (0x1u << 2) /**< \brief (PIO_DIFSR) Debouncing Filtering Select. */
+#define PIO_DIFSR_P3 (0x1u << 3) /**< \brief (PIO_DIFSR) Debouncing Filtering Select. */
+#define PIO_DIFSR_P4 (0x1u << 4) /**< \brief (PIO_DIFSR) Debouncing Filtering Select. */
+#define PIO_DIFSR_P5 (0x1u << 5) /**< \brief (PIO_DIFSR) Debouncing Filtering Select. */
+#define PIO_DIFSR_P6 (0x1u << 6) /**< \brief (PIO_DIFSR) Debouncing Filtering Select. */
+#define PIO_DIFSR_P7 (0x1u << 7) /**< \brief (PIO_DIFSR) Debouncing Filtering Select. */
+#define PIO_DIFSR_P8 (0x1u << 8) /**< \brief (PIO_DIFSR) Debouncing Filtering Select. */
+#define PIO_DIFSR_P9 (0x1u << 9) /**< \brief (PIO_DIFSR) Debouncing Filtering Select. */
+#define PIO_DIFSR_P10 (0x1u << 10) /**< \brief (PIO_DIFSR) Debouncing Filtering Select. */
+#define PIO_DIFSR_P11 (0x1u << 11) /**< \brief (PIO_DIFSR) Debouncing Filtering Select. */
+#define PIO_DIFSR_P12 (0x1u << 12) /**< \brief (PIO_DIFSR) Debouncing Filtering Select. */
+#define PIO_DIFSR_P13 (0x1u << 13) /**< \brief (PIO_DIFSR) Debouncing Filtering Select. */
+#define PIO_DIFSR_P14 (0x1u << 14) /**< \brief (PIO_DIFSR) Debouncing Filtering Select. */
+#define PIO_DIFSR_P15 (0x1u << 15) /**< \brief (PIO_DIFSR) Debouncing Filtering Select. */
+#define PIO_DIFSR_P16 (0x1u << 16) /**< \brief (PIO_DIFSR) Debouncing Filtering Select. */
+#define PIO_DIFSR_P17 (0x1u << 17) /**< \brief (PIO_DIFSR) Debouncing Filtering Select. */
+#define PIO_DIFSR_P18 (0x1u << 18) /**< \brief (PIO_DIFSR) Debouncing Filtering Select. */
+#define PIO_DIFSR_P19 (0x1u << 19) /**< \brief (PIO_DIFSR) Debouncing Filtering Select. */
+#define PIO_DIFSR_P20 (0x1u << 20) /**< \brief (PIO_DIFSR) Debouncing Filtering Select. */
+#define PIO_DIFSR_P21 (0x1u << 21) /**< \brief (PIO_DIFSR) Debouncing Filtering Select. */
+#define PIO_DIFSR_P22 (0x1u << 22) /**< \brief (PIO_DIFSR) Debouncing Filtering Select. */
+#define PIO_DIFSR_P23 (0x1u << 23) /**< \brief (PIO_DIFSR) Debouncing Filtering Select. */
+#define PIO_DIFSR_P24 (0x1u << 24) /**< \brief (PIO_DIFSR) Debouncing Filtering Select. */
+#define PIO_DIFSR_P25 (0x1u << 25) /**< \brief (PIO_DIFSR) Debouncing Filtering Select. */
+#define PIO_DIFSR_P26 (0x1u << 26) /**< \brief (PIO_DIFSR) Debouncing Filtering Select. */
+#define PIO_DIFSR_P27 (0x1u << 27) /**< \brief (PIO_DIFSR) Debouncing Filtering Select. */
+#define PIO_DIFSR_P28 (0x1u << 28) /**< \brief (PIO_DIFSR) Debouncing Filtering Select. */
+#define PIO_DIFSR_P29 (0x1u << 29) /**< \brief (PIO_DIFSR) Debouncing Filtering Select. */
+#define PIO_DIFSR_P30 (0x1u << 30) /**< \brief (PIO_DIFSR) Debouncing Filtering Select. */
+#define PIO_DIFSR_P31 (0x1u << 31) /**< \brief (PIO_DIFSR) Debouncing Filtering Select. */
+/* -------- PIO_IFDGSR : (PIO Offset: 0x0088) Glitch or Debouncing Input Filter Clock Selection Status Register -------- */
+#define PIO_IFDGSR_P0 (0x1u << 0) /**< \brief (PIO_IFDGSR) Glitch or Debouncing Filter Selection Status */
+#define PIO_IFDGSR_P1 (0x1u << 1) /**< \brief (PIO_IFDGSR) Glitch or Debouncing Filter Selection Status */
+#define PIO_IFDGSR_P2 (0x1u << 2) /**< \brief (PIO_IFDGSR) Glitch or Debouncing Filter Selection Status */
+#define PIO_IFDGSR_P3 (0x1u << 3) /**< \brief (PIO_IFDGSR) Glitch or Debouncing Filter Selection Status */
+#define PIO_IFDGSR_P4 (0x1u << 4) /**< \brief (PIO_IFDGSR) Glitch or Debouncing Filter Selection Status */
+#define PIO_IFDGSR_P5 (0x1u << 5) /**< \brief (PIO_IFDGSR) Glitch or Debouncing Filter Selection Status */
+#define PIO_IFDGSR_P6 (0x1u << 6) /**< \brief (PIO_IFDGSR) Glitch or Debouncing Filter Selection Status */
+#define PIO_IFDGSR_P7 (0x1u << 7) /**< \brief (PIO_IFDGSR) Glitch or Debouncing Filter Selection Status */
+#define PIO_IFDGSR_P8 (0x1u << 8) /**< \brief (PIO_IFDGSR) Glitch or Debouncing Filter Selection Status */
+#define PIO_IFDGSR_P9 (0x1u << 9) /**< \brief (PIO_IFDGSR) Glitch or Debouncing Filter Selection Status */
+#define PIO_IFDGSR_P10 (0x1u << 10) /**< \brief (PIO_IFDGSR) Glitch or Debouncing Filter Selection Status */
+#define PIO_IFDGSR_P11 (0x1u << 11) /**< \brief (PIO_IFDGSR) Glitch or Debouncing Filter Selection Status */
+#define PIO_IFDGSR_P12 (0x1u << 12) /**< \brief (PIO_IFDGSR) Glitch or Debouncing Filter Selection Status */
+#define PIO_IFDGSR_P13 (0x1u << 13) /**< \brief (PIO_IFDGSR) Glitch or Debouncing Filter Selection Status */
+#define PIO_IFDGSR_P14 (0x1u << 14) /**< \brief (PIO_IFDGSR) Glitch or Debouncing Filter Selection Status */
+#define PIO_IFDGSR_P15 (0x1u << 15) /**< \brief (PIO_IFDGSR) Glitch or Debouncing Filter Selection Status */
+#define PIO_IFDGSR_P16 (0x1u << 16) /**< \brief (PIO_IFDGSR) Glitch or Debouncing Filter Selection Status */
+#define PIO_IFDGSR_P17 (0x1u << 17) /**< \brief (PIO_IFDGSR) Glitch or Debouncing Filter Selection Status */
+#define PIO_IFDGSR_P18 (0x1u << 18) /**< \brief (PIO_IFDGSR) Glitch or Debouncing Filter Selection Status */
+#define PIO_IFDGSR_P19 (0x1u << 19) /**< \brief (PIO_IFDGSR) Glitch or Debouncing Filter Selection Status */
+#define PIO_IFDGSR_P20 (0x1u << 20) /**< \brief (PIO_IFDGSR) Glitch or Debouncing Filter Selection Status */
+#define PIO_IFDGSR_P21 (0x1u << 21) /**< \brief (PIO_IFDGSR) Glitch or Debouncing Filter Selection Status */
+#define PIO_IFDGSR_P22 (0x1u << 22) /**< \brief (PIO_IFDGSR) Glitch or Debouncing Filter Selection Status */
+#define PIO_IFDGSR_P23 (0x1u << 23) /**< \brief (PIO_IFDGSR) Glitch or Debouncing Filter Selection Status */
+#define PIO_IFDGSR_P24 (0x1u << 24) /**< \brief (PIO_IFDGSR) Glitch or Debouncing Filter Selection Status */
+#define PIO_IFDGSR_P25 (0x1u << 25) /**< \brief (PIO_IFDGSR) Glitch or Debouncing Filter Selection Status */
+#define PIO_IFDGSR_P26 (0x1u << 26) /**< \brief (PIO_IFDGSR) Glitch or Debouncing Filter Selection Status */
+#define PIO_IFDGSR_P27 (0x1u << 27) /**< \brief (PIO_IFDGSR) Glitch or Debouncing Filter Selection Status */
+#define PIO_IFDGSR_P28 (0x1u << 28) /**< \brief (PIO_IFDGSR) Glitch or Debouncing Filter Selection Status */
+#define PIO_IFDGSR_P29 (0x1u << 29) /**< \brief (PIO_IFDGSR) Glitch or Debouncing Filter Selection Status */
+#define PIO_IFDGSR_P30 (0x1u << 30) /**< \brief (PIO_IFDGSR) Glitch or Debouncing Filter Selection Status */
+#define PIO_IFDGSR_P31 (0x1u << 31) /**< \brief (PIO_IFDGSR) Glitch or Debouncing Filter Selection Status */
+/* -------- PIO_SCDR : (PIO Offset: 0x008C) Slow Clock Divider Debouncing Register -------- */
+#define PIO_SCDR_DIV_Pos 0
+#define PIO_SCDR_DIV_Msk (0x3fffu << PIO_SCDR_DIV_Pos) /**< \brief (PIO_SCDR) Slow Clock Divider Selection for Debouncing */
+#define PIO_SCDR_DIV(value) ((PIO_SCDR_DIV_Msk & ((value) << PIO_SCDR_DIV_Pos)))
+/* -------- PIO_OWER : (PIO Offset: 0x00A0) Output Write Enable -------- */
+#define PIO_OWER_P0 (0x1u << 0) /**< \brief (PIO_OWER) Output Write Enable. */
+#define PIO_OWER_P1 (0x1u << 1) /**< \brief (PIO_OWER) Output Write Enable. */
+#define PIO_OWER_P2 (0x1u << 2) /**< \brief (PIO_OWER) Output Write Enable. */
+#define PIO_OWER_P3 (0x1u << 3) /**< \brief (PIO_OWER) Output Write Enable. */
+#define PIO_OWER_P4 (0x1u << 4) /**< \brief (PIO_OWER) Output Write Enable. */
+#define PIO_OWER_P5 (0x1u << 5) /**< \brief (PIO_OWER) Output Write Enable. */
+#define PIO_OWER_P6 (0x1u << 6) /**< \brief (PIO_OWER) Output Write Enable. */
+#define PIO_OWER_P7 (0x1u << 7) /**< \brief (PIO_OWER) Output Write Enable. */
+#define PIO_OWER_P8 (0x1u << 8) /**< \brief (PIO_OWER) Output Write Enable. */
+#define PIO_OWER_P9 (0x1u << 9) /**< \brief (PIO_OWER) Output Write Enable. */
+#define PIO_OWER_P10 (0x1u << 10) /**< \brief (PIO_OWER) Output Write Enable. */
+#define PIO_OWER_P11 (0x1u << 11) /**< \brief (PIO_OWER) Output Write Enable. */
+#define PIO_OWER_P12 (0x1u << 12) /**< \brief (PIO_OWER) Output Write Enable. */
+#define PIO_OWER_P13 (0x1u << 13) /**< \brief (PIO_OWER) Output Write Enable. */
+#define PIO_OWER_P14 (0x1u << 14) /**< \brief (PIO_OWER) Output Write Enable. */
+#define PIO_OWER_P15 (0x1u << 15) /**< \brief (PIO_OWER) Output Write Enable. */
+#define PIO_OWER_P16 (0x1u << 16) /**< \brief (PIO_OWER) Output Write Enable. */
+#define PIO_OWER_P17 (0x1u << 17) /**< \brief (PIO_OWER) Output Write Enable. */
+#define PIO_OWER_P18 (0x1u << 18) /**< \brief (PIO_OWER) Output Write Enable. */
+#define PIO_OWER_P19 (0x1u << 19) /**< \brief (PIO_OWER) Output Write Enable. */
+#define PIO_OWER_P20 (0x1u << 20) /**< \brief (PIO_OWER) Output Write Enable. */
+#define PIO_OWER_P21 (0x1u << 21) /**< \brief (PIO_OWER) Output Write Enable. */
+#define PIO_OWER_P22 (0x1u << 22) /**< \brief (PIO_OWER) Output Write Enable. */
+#define PIO_OWER_P23 (0x1u << 23) /**< \brief (PIO_OWER) Output Write Enable. */
+#define PIO_OWER_P24 (0x1u << 24) /**< \brief (PIO_OWER) Output Write Enable. */
+#define PIO_OWER_P25 (0x1u << 25) /**< \brief (PIO_OWER) Output Write Enable. */
+#define PIO_OWER_P26 (0x1u << 26) /**< \brief (PIO_OWER) Output Write Enable. */
+#define PIO_OWER_P27 (0x1u << 27) /**< \brief (PIO_OWER) Output Write Enable. */
+#define PIO_OWER_P28 (0x1u << 28) /**< \brief (PIO_OWER) Output Write Enable. */
+#define PIO_OWER_P29 (0x1u << 29) /**< \brief (PIO_OWER) Output Write Enable. */
+#define PIO_OWER_P30 (0x1u << 30) /**< \brief (PIO_OWER) Output Write Enable. */
+#define PIO_OWER_P31 (0x1u << 31) /**< \brief (PIO_OWER) Output Write Enable. */
+/* -------- PIO_OWDR : (PIO Offset: 0x00A4) Output Write Disable -------- */
+#define PIO_OWDR_P0 (0x1u << 0) /**< \brief (PIO_OWDR) Output Write Disable. */
+#define PIO_OWDR_P1 (0x1u << 1) /**< \brief (PIO_OWDR) Output Write Disable. */
+#define PIO_OWDR_P2 (0x1u << 2) /**< \brief (PIO_OWDR) Output Write Disable. */
+#define PIO_OWDR_P3 (0x1u << 3) /**< \brief (PIO_OWDR) Output Write Disable. */
+#define PIO_OWDR_P4 (0x1u << 4) /**< \brief (PIO_OWDR) Output Write Disable. */
+#define PIO_OWDR_P5 (0x1u << 5) /**< \brief (PIO_OWDR) Output Write Disable. */
+#define PIO_OWDR_P6 (0x1u << 6) /**< \brief (PIO_OWDR) Output Write Disable. */
+#define PIO_OWDR_P7 (0x1u << 7) /**< \brief (PIO_OWDR) Output Write Disable. */
+#define PIO_OWDR_P8 (0x1u << 8) /**< \brief (PIO_OWDR) Output Write Disable. */
+#define PIO_OWDR_P9 (0x1u << 9) /**< \brief (PIO_OWDR) Output Write Disable. */
+#define PIO_OWDR_P10 (0x1u << 10) /**< \brief (PIO_OWDR) Output Write Disable. */
+#define PIO_OWDR_P11 (0x1u << 11) /**< \brief (PIO_OWDR) Output Write Disable. */
+#define PIO_OWDR_P12 (0x1u << 12) /**< \brief (PIO_OWDR) Output Write Disable. */
+#define PIO_OWDR_P13 (0x1u << 13) /**< \brief (PIO_OWDR) Output Write Disable. */
+#define PIO_OWDR_P14 (0x1u << 14) /**< \brief (PIO_OWDR) Output Write Disable. */
+#define PIO_OWDR_P15 (0x1u << 15) /**< \brief (PIO_OWDR) Output Write Disable. */
+#define PIO_OWDR_P16 (0x1u << 16) /**< \brief (PIO_OWDR) Output Write Disable. */
+#define PIO_OWDR_P17 (0x1u << 17) /**< \brief (PIO_OWDR) Output Write Disable. */
+#define PIO_OWDR_P18 (0x1u << 18) /**< \brief (PIO_OWDR) Output Write Disable. */
+#define PIO_OWDR_P19 (0x1u << 19) /**< \brief (PIO_OWDR) Output Write Disable. */
+#define PIO_OWDR_P20 (0x1u << 20) /**< \brief (PIO_OWDR) Output Write Disable. */
+#define PIO_OWDR_P21 (0x1u << 21) /**< \brief (PIO_OWDR) Output Write Disable. */
+#define PIO_OWDR_P22 (0x1u << 22) /**< \brief (PIO_OWDR) Output Write Disable. */
+#define PIO_OWDR_P23 (0x1u << 23) /**< \brief (PIO_OWDR) Output Write Disable. */
+#define PIO_OWDR_P24 (0x1u << 24) /**< \brief (PIO_OWDR) Output Write Disable. */
+#define PIO_OWDR_P25 (0x1u << 25) /**< \brief (PIO_OWDR) Output Write Disable. */
+#define PIO_OWDR_P26 (0x1u << 26) /**< \brief (PIO_OWDR) Output Write Disable. */
+#define PIO_OWDR_P27 (0x1u << 27) /**< \brief (PIO_OWDR) Output Write Disable. */
+#define PIO_OWDR_P28 (0x1u << 28) /**< \brief (PIO_OWDR) Output Write Disable. */
+#define PIO_OWDR_P29 (0x1u << 29) /**< \brief (PIO_OWDR) Output Write Disable. */
+#define PIO_OWDR_P30 (0x1u << 30) /**< \brief (PIO_OWDR) Output Write Disable. */
+#define PIO_OWDR_P31 (0x1u << 31) /**< \brief (PIO_OWDR) Output Write Disable. */
+/* -------- PIO_OWSR : (PIO Offset: 0x00A8) Output Write Status Register -------- */
+#define PIO_OWSR_P0 (0x1u << 0) /**< \brief (PIO_OWSR) Output Write Status. */
+#define PIO_OWSR_P1 (0x1u << 1) /**< \brief (PIO_OWSR) Output Write Status. */
+#define PIO_OWSR_P2 (0x1u << 2) /**< \brief (PIO_OWSR) Output Write Status. */
+#define PIO_OWSR_P3 (0x1u << 3) /**< \brief (PIO_OWSR) Output Write Status. */
+#define PIO_OWSR_P4 (0x1u << 4) /**< \brief (PIO_OWSR) Output Write Status. */
+#define PIO_OWSR_P5 (0x1u << 5) /**< \brief (PIO_OWSR) Output Write Status. */
+#define PIO_OWSR_P6 (0x1u << 6) /**< \brief (PIO_OWSR) Output Write Status. */
+#define PIO_OWSR_P7 (0x1u << 7) /**< \brief (PIO_OWSR) Output Write Status. */
+#define PIO_OWSR_P8 (0x1u << 8) /**< \brief (PIO_OWSR) Output Write Status. */
+#define PIO_OWSR_P9 (0x1u << 9) /**< \brief (PIO_OWSR) Output Write Status. */
+#define PIO_OWSR_P10 (0x1u << 10) /**< \brief (PIO_OWSR) Output Write Status. */
+#define PIO_OWSR_P11 (0x1u << 11) /**< \brief (PIO_OWSR) Output Write Status. */
+#define PIO_OWSR_P12 (0x1u << 12) /**< \brief (PIO_OWSR) Output Write Status. */
+#define PIO_OWSR_P13 (0x1u << 13) /**< \brief (PIO_OWSR) Output Write Status. */
+#define PIO_OWSR_P14 (0x1u << 14) /**< \brief (PIO_OWSR) Output Write Status. */
+#define PIO_OWSR_P15 (0x1u << 15) /**< \brief (PIO_OWSR) Output Write Status. */
+#define PIO_OWSR_P16 (0x1u << 16) /**< \brief (PIO_OWSR) Output Write Status. */
+#define PIO_OWSR_P17 (0x1u << 17) /**< \brief (PIO_OWSR) Output Write Status. */
+#define PIO_OWSR_P18 (0x1u << 18) /**< \brief (PIO_OWSR) Output Write Status. */
+#define PIO_OWSR_P19 (0x1u << 19) /**< \brief (PIO_OWSR) Output Write Status. */
+#define PIO_OWSR_P20 (0x1u << 20) /**< \brief (PIO_OWSR) Output Write Status. */
+#define PIO_OWSR_P21 (0x1u << 21) /**< \brief (PIO_OWSR) Output Write Status. */
+#define PIO_OWSR_P22 (0x1u << 22) /**< \brief (PIO_OWSR) Output Write Status. */
+#define PIO_OWSR_P23 (0x1u << 23) /**< \brief (PIO_OWSR) Output Write Status. */
+#define PIO_OWSR_P24 (0x1u << 24) /**< \brief (PIO_OWSR) Output Write Status. */
+#define PIO_OWSR_P25 (0x1u << 25) /**< \brief (PIO_OWSR) Output Write Status. */
+#define PIO_OWSR_P26 (0x1u << 26) /**< \brief (PIO_OWSR) Output Write Status. */
+#define PIO_OWSR_P27 (0x1u << 27) /**< \brief (PIO_OWSR) Output Write Status. */
+#define PIO_OWSR_P28 (0x1u << 28) /**< \brief (PIO_OWSR) Output Write Status. */
+#define PIO_OWSR_P29 (0x1u << 29) /**< \brief (PIO_OWSR) Output Write Status. */
+#define PIO_OWSR_P30 (0x1u << 30) /**< \brief (PIO_OWSR) Output Write Status. */
+#define PIO_OWSR_P31 (0x1u << 31) /**< \brief (PIO_OWSR) Output Write Status. */
+/* -------- PIO_AIMER : (PIO Offset: 0x00B0) Additional Interrupt Modes Enable Register -------- */
+#define PIO_AIMER_P0 (0x1u << 0) /**< \brief (PIO_AIMER) Additional Interrupt Modes Enable. */
+#define PIO_AIMER_P1 (0x1u << 1) /**< \brief (PIO_AIMER) Additional Interrupt Modes Enable. */
+#define PIO_AIMER_P2 (0x1u << 2) /**< \brief (PIO_AIMER) Additional Interrupt Modes Enable. */
+#define PIO_AIMER_P3 (0x1u << 3) /**< \brief (PIO_AIMER) Additional Interrupt Modes Enable. */
+#define PIO_AIMER_P4 (0x1u << 4) /**< \brief (PIO_AIMER) Additional Interrupt Modes Enable. */
+#define PIO_AIMER_P5 (0x1u << 5) /**< \brief (PIO_AIMER) Additional Interrupt Modes Enable. */
+#define PIO_AIMER_P6 (0x1u << 6) /**< \brief (PIO_AIMER) Additional Interrupt Modes Enable. */
+#define PIO_AIMER_P7 (0x1u << 7) /**< \brief (PIO_AIMER) Additional Interrupt Modes Enable. */
+#define PIO_AIMER_P8 (0x1u << 8) /**< \brief (PIO_AIMER) Additional Interrupt Modes Enable. */
+#define PIO_AIMER_P9 (0x1u << 9) /**< \brief (PIO_AIMER) Additional Interrupt Modes Enable. */
+#define PIO_AIMER_P10 (0x1u << 10) /**< \brief (PIO_AIMER) Additional Interrupt Modes Enable. */
+#define PIO_AIMER_P11 (0x1u << 11) /**< \brief (PIO_AIMER) Additional Interrupt Modes Enable. */
+#define PIO_AIMER_P12 (0x1u << 12) /**< \brief (PIO_AIMER) Additional Interrupt Modes Enable. */
+#define PIO_AIMER_P13 (0x1u << 13) /**< \brief (PIO_AIMER) Additional Interrupt Modes Enable. */
+#define PIO_AIMER_P14 (0x1u << 14) /**< \brief (PIO_AIMER) Additional Interrupt Modes Enable. */
+#define PIO_AIMER_P15 (0x1u << 15) /**< \brief (PIO_AIMER) Additional Interrupt Modes Enable. */
+#define PIO_AIMER_P16 (0x1u << 16) /**< \brief (PIO_AIMER) Additional Interrupt Modes Enable. */
+#define PIO_AIMER_P17 (0x1u << 17) /**< \brief (PIO_AIMER) Additional Interrupt Modes Enable. */
+#define PIO_AIMER_P18 (0x1u << 18) /**< \brief (PIO_AIMER) Additional Interrupt Modes Enable. */
+#define PIO_AIMER_P19 (0x1u << 19) /**< \brief (PIO_AIMER) Additional Interrupt Modes Enable. */
+#define PIO_AIMER_P20 (0x1u << 20) /**< \brief (PIO_AIMER) Additional Interrupt Modes Enable. */
+#define PIO_AIMER_P21 (0x1u << 21) /**< \brief (PIO_AIMER) Additional Interrupt Modes Enable. */
+#define PIO_AIMER_P22 (0x1u << 22) /**< \brief (PIO_AIMER) Additional Interrupt Modes Enable. */
+#define PIO_AIMER_P23 (0x1u << 23) /**< \brief (PIO_AIMER) Additional Interrupt Modes Enable. */
+#define PIO_AIMER_P24 (0x1u << 24) /**< \brief (PIO_AIMER) Additional Interrupt Modes Enable. */
+#define PIO_AIMER_P25 (0x1u << 25) /**< \brief (PIO_AIMER) Additional Interrupt Modes Enable. */
+#define PIO_AIMER_P26 (0x1u << 26) /**< \brief (PIO_AIMER) Additional Interrupt Modes Enable. */
+#define PIO_AIMER_P27 (0x1u << 27) /**< \brief (PIO_AIMER) Additional Interrupt Modes Enable. */
+#define PIO_AIMER_P28 (0x1u << 28) /**< \brief (PIO_AIMER) Additional Interrupt Modes Enable. */
+#define PIO_AIMER_P29 (0x1u << 29) /**< \brief (PIO_AIMER) Additional Interrupt Modes Enable. */
+#define PIO_AIMER_P30 (0x1u << 30) /**< \brief (PIO_AIMER) Additional Interrupt Modes Enable. */
+#define PIO_AIMER_P31 (0x1u << 31) /**< \brief (PIO_AIMER) Additional Interrupt Modes Enable. */
+/* -------- PIO_AIMDR : (PIO Offset: 0x00B4) Additional Interrupt Modes Disables Register -------- */
+#define PIO_AIMDR_P0 (0x1u << 0) /**< \brief (PIO_AIMDR) Additional Interrupt Modes Disable. */
+#define PIO_AIMDR_P1 (0x1u << 1) /**< \brief (PIO_AIMDR) Additional Interrupt Modes Disable. */
+#define PIO_AIMDR_P2 (0x1u << 2) /**< \brief (PIO_AIMDR) Additional Interrupt Modes Disable. */
+#define PIO_AIMDR_P3 (0x1u << 3) /**< \brief (PIO_AIMDR) Additional Interrupt Modes Disable. */
+#define PIO_AIMDR_P4 (0x1u << 4) /**< \brief (PIO_AIMDR) Additional Interrupt Modes Disable. */
+#define PIO_AIMDR_P5 (0x1u << 5) /**< \brief (PIO_AIMDR) Additional Interrupt Modes Disable. */
+#define PIO_AIMDR_P6 (0x1u << 6) /**< \brief (PIO_AIMDR) Additional Interrupt Modes Disable. */
+#define PIO_AIMDR_P7 (0x1u << 7) /**< \brief (PIO_AIMDR) Additional Interrupt Modes Disable. */
+#define PIO_AIMDR_P8 (0x1u << 8) /**< \brief (PIO_AIMDR) Additional Interrupt Modes Disable. */
+#define PIO_AIMDR_P9 (0x1u << 9) /**< \brief (PIO_AIMDR) Additional Interrupt Modes Disable. */
+#define PIO_AIMDR_P10 (0x1u << 10) /**< \brief (PIO_AIMDR) Additional Interrupt Modes Disable. */
+#define PIO_AIMDR_P11 (0x1u << 11) /**< \brief (PIO_AIMDR) Additional Interrupt Modes Disable. */
+#define PIO_AIMDR_P12 (0x1u << 12) /**< \brief (PIO_AIMDR) Additional Interrupt Modes Disable. */
+#define PIO_AIMDR_P13 (0x1u << 13) /**< \brief (PIO_AIMDR) Additional Interrupt Modes Disable. */
+#define PIO_AIMDR_P14 (0x1u << 14) /**< \brief (PIO_AIMDR) Additional Interrupt Modes Disable. */
+#define PIO_AIMDR_P15 (0x1u << 15) /**< \brief (PIO_AIMDR) Additional Interrupt Modes Disable. */
+#define PIO_AIMDR_P16 (0x1u << 16) /**< \brief (PIO_AIMDR) Additional Interrupt Modes Disable. */
+#define PIO_AIMDR_P17 (0x1u << 17) /**< \brief (PIO_AIMDR) Additional Interrupt Modes Disable. */
+#define PIO_AIMDR_P18 (0x1u << 18) /**< \brief (PIO_AIMDR) Additional Interrupt Modes Disable. */
+#define PIO_AIMDR_P19 (0x1u << 19) /**< \brief (PIO_AIMDR) Additional Interrupt Modes Disable. */
+#define PIO_AIMDR_P20 (0x1u << 20) /**< \brief (PIO_AIMDR) Additional Interrupt Modes Disable. */
+#define PIO_AIMDR_P21 (0x1u << 21) /**< \brief (PIO_AIMDR) Additional Interrupt Modes Disable. */
+#define PIO_AIMDR_P22 (0x1u << 22) /**< \brief (PIO_AIMDR) Additional Interrupt Modes Disable. */
+#define PIO_AIMDR_P23 (0x1u << 23) /**< \brief (PIO_AIMDR) Additional Interrupt Modes Disable. */
+#define PIO_AIMDR_P24 (0x1u << 24) /**< \brief (PIO_AIMDR) Additional Interrupt Modes Disable. */
+#define PIO_AIMDR_P25 (0x1u << 25) /**< \brief (PIO_AIMDR) Additional Interrupt Modes Disable. */
+#define PIO_AIMDR_P26 (0x1u << 26) /**< \brief (PIO_AIMDR) Additional Interrupt Modes Disable. */
+#define PIO_AIMDR_P27 (0x1u << 27) /**< \brief (PIO_AIMDR) Additional Interrupt Modes Disable. */
+#define PIO_AIMDR_P28 (0x1u << 28) /**< \brief (PIO_AIMDR) Additional Interrupt Modes Disable. */
+#define PIO_AIMDR_P29 (0x1u << 29) /**< \brief (PIO_AIMDR) Additional Interrupt Modes Disable. */
+#define PIO_AIMDR_P30 (0x1u << 30) /**< \brief (PIO_AIMDR) Additional Interrupt Modes Disable. */
+#define PIO_AIMDR_P31 (0x1u << 31) /**< \brief (PIO_AIMDR) Additional Interrupt Modes Disable. */
+/* -------- PIO_AIMMR : (PIO Offset: 0x00B8) Additional Interrupt Modes Mask Register -------- */
+#define PIO_AIMMR_P0 (0x1u << 0) /**< \brief (PIO_AIMMR) Peripheral CD Status. */
+#define PIO_AIMMR_P1 (0x1u << 1) /**< \brief (PIO_AIMMR) Peripheral CD Status. */
+#define PIO_AIMMR_P2 (0x1u << 2) /**< \brief (PIO_AIMMR) Peripheral CD Status. */
+#define PIO_AIMMR_P3 (0x1u << 3) /**< \brief (PIO_AIMMR) Peripheral CD Status. */
+#define PIO_AIMMR_P4 (0x1u << 4) /**< \brief (PIO_AIMMR) Peripheral CD Status. */
+#define PIO_AIMMR_P5 (0x1u << 5) /**< \brief (PIO_AIMMR) Peripheral CD Status. */
+#define PIO_AIMMR_P6 (0x1u << 6) /**< \brief (PIO_AIMMR) Peripheral CD Status. */
+#define PIO_AIMMR_P7 (0x1u << 7) /**< \brief (PIO_AIMMR) Peripheral CD Status. */
+#define PIO_AIMMR_P8 (0x1u << 8) /**< \brief (PIO_AIMMR) Peripheral CD Status. */
+#define PIO_AIMMR_P9 (0x1u << 9) /**< \brief (PIO_AIMMR) Peripheral CD Status. */
+#define PIO_AIMMR_P10 (0x1u << 10) /**< \brief (PIO_AIMMR) Peripheral CD Status. */
+#define PIO_AIMMR_P11 (0x1u << 11) /**< \brief (PIO_AIMMR) Peripheral CD Status. */
+#define PIO_AIMMR_P12 (0x1u << 12) /**< \brief (PIO_AIMMR) Peripheral CD Status. */
+#define PIO_AIMMR_P13 (0x1u << 13) /**< \brief (PIO_AIMMR) Peripheral CD Status. */
+#define PIO_AIMMR_P14 (0x1u << 14) /**< \brief (PIO_AIMMR) Peripheral CD Status. */
+#define PIO_AIMMR_P15 (0x1u << 15) /**< \brief (PIO_AIMMR) Peripheral CD Status. */
+#define PIO_AIMMR_P16 (0x1u << 16) /**< \brief (PIO_AIMMR) Peripheral CD Status. */
+#define PIO_AIMMR_P17 (0x1u << 17) /**< \brief (PIO_AIMMR) Peripheral CD Status. */
+#define PIO_AIMMR_P18 (0x1u << 18) /**< \brief (PIO_AIMMR) Peripheral CD Status. */
+#define PIO_AIMMR_P19 (0x1u << 19) /**< \brief (PIO_AIMMR) Peripheral CD Status. */
+#define PIO_AIMMR_P20 (0x1u << 20) /**< \brief (PIO_AIMMR) Peripheral CD Status. */
+#define PIO_AIMMR_P21 (0x1u << 21) /**< \brief (PIO_AIMMR) Peripheral CD Status. */
+#define PIO_AIMMR_P22 (0x1u << 22) /**< \brief (PIO_AIMMR) Peripheral CD Status. */
+#define PIO_AIMMR_P23 (0x1u << 23) /**< \brief (PIO_AIMMR) Peripheral CD Status. */
+#define PIO_AIMMR_P24 (0x1u << 24) /**< \brief (PIO_AIMMR) Peripheral CD Status. */
+#define PIO_AIMMR_P25 (0x1u << 25) /**< \brief (PIO_AIMMR) Peripheral CD Status. */
+#define PIO_AIMMR_P26 (0x1u << 26) /**< \brief (PIO_AIMMR) Peripheral CD Status. */
+#define PIO_AIMMR_P27 (0x1u << 27) /**< \brief (PIO_AIMMR) Peripheral CD Status. */
+#define PIO_AIMMR_P28 (0x1u << 28) /**< \brief (PIO_AIMMR) Peripheral CD Status. */
+#define PIO_AIMMR_P29 (0x1u << 29) /**< \brief (PIO_AIMMR) Peripheral CD Status. */
+#define PIO_AIMMR_P30 (0x1u << 30) /**< \brief (PIO_AIMMR) Peripheral CD Status. */
+#define PIO_AIMMR_P31 (0x1u << 31) /**< \brief (PIO_AIMMR) Peripheral CD Status. */
+/* -------- PIO_ESR : (PIO Offset: 0x00C0) Edge Select Register -------- */
+#define PIO_ESR_P0 (0x1u << 0) /**< \brief (PIO_ESR) Edge Interrupt Selection. */
+#define PIO_ESR_P1 (0x1u << 1) /**< \brief (PIO_ESR) Edge Interrupt Selection. */
+#define PIO_ESR_P2 (0x1u << 2) /**< \brief (PIO_ESR) Edge Interrupt Selection. */
+#define PIO_ESR_P3 (0x1u << 3) /**< \brief (PIO_ESR) Edge Interrupt Selection. */
+#define PIO_ESR_P4 (0x1u << 4) /**< \brief (PIO_ESR) Edge Interrupt Selection. */
+#define PIO_ESR_P5 (0x1u << 5) /**< \brief (PIO_ESR) Edge Interrupt Selection. */
+#define PIO_ESR_P6 (0x1u << 6) /**< \brief (PIO_ESR) Edge Interrupt Selection. */
+#define PIO_ESR_P7 (0x1u << 7) /**< \brief (PIO_ESR) Edge Interrupt Selection. */
+#define PIO_ESR_P8 (0x1u << 8) /**< \brief (PIO_ESR) Edge Interrupt Selection. */
+#define PIO_ESR_P9 (0x1u << 9) /**< \brief (PIO_ESR) Edge Interrupt Selection. */
+#define PIO_ESR_P10 (0x1u << 10) /**< \brief (PIO_ESR) Edge Interrupt Selection. */
+#define PIO_ESR_P11 (0x1u << 11) /**< \brief (PIO_ESR) Edge Interrupt Selection. */
+#define PIO_ESR_P12 (0x1u << 12) /**< \brief (PIO_ESR) Edge Interrupt Selection. */
+#define PIO_ESR_P13 (0x1u << 13) /**< \brief (PIO_ESR) Edge Interrupt Selection. */
+#define PIO_ESR_P14 (0x1u << 14) /**< \brief (PIO_ESR) Edge Interrupt Selection. */
+#define PIO_ESR_P15 (0x1u << 15) /**< \brief (PIO_ESR) Edge Interrupt Selection. */
+#define PIO_ESR_P16 (0x1u << 16) /**< \brief (PIO_ESR) Edge Interrupt Selection. */
+#define PIO_ESR_P17 (0x1u << 17) /**< \brief (PIO_ESR) Edge Interrupt Selection. */
+#define PIO_ESR_P18 (0x1u << 18) /**< \brief (PIO_ESR) Edge Interrupt Selection. */
+#define PIO_ESR_P19 (0x1u << 19) /**< \brief (PIO_ESR) Edge Interrupt Selection. */
+#define PIO_ESR_P20 (0x1u << 20) /**< \brief (PIO_ESR) Edge Interrupt Selection. */
+#define PIO_ESR_P21 (0x1u << 21) /**< \brief (PIO_ESR) Edge Interrupt Selection. */
+#define PIO_ESR_P22 (0x1u << 22) /**< \brief (PIO_ESR) Edge Interrupt Selection. */
+#define PIO_ESR_P23 (0x1u << 23) /**< \brief (PIO_ESR) Edge Interrupt Selection. */
+#define PIO_ESR_P24 (0x1u << 24) /**< \brief (PIO_ESR) Edge Interrupt Selection. */
+#define PIO_ESR_P25 (0x1u << 25) /**< \brief (PIO_ESR) Edge Interrupt Selection. */
+#define PIO_ESR_P26 (0x1u << 26) /**< \brief (PIO_ESR) Edge Interrupt Selection. */
+#define PIO_ESR_P27 (0x1u << 27) /**< \brief (PIO_ESR) Edge Interrupt Selection. */
+#define PIO_ESR_P28 (0x1u << 28) /**< \brief (PIO_ESR) Edge Interrupt Selection. */
+#define PIO_ESR_P29 (0x1u << 29) /**< \brief (PIO_ESR) Edge Interrupt Selection. */
+#define PIO_ESR_P30 (0x1u << 30) /**< \brief (PIO_ESR) Edge Interrupt Selection. */
+#define PIO_ESR_P31 (0x1u << 31) /**< \brief (PIO_ESR) Edge Interrupt Selection. */
+/* -------- PIO_LSR : (PIO Offset: 0x00C4) Level Select Register -------- */
+#define PIO_LSR_P0 (0x1u << 0) /**< \brief (PIO_LSR) Level Interrupt Selection. */
+#define PIO_LSR_P1 (0x1u << 1) /**< \brief (PIO_LSR) Level Interrupt Selection. */
+#define PIO_LSR_P2 (0x1u << 2) /**< \brief (PIO_LSR) Level Interrupt Selection. */
+#define PIO_LSR_P3 (0x1u << 3) /**< \brief (PIO_LSR) Level Interrupt Selection. */
+#define PIO_LSR_P4 (0x1u << 4) /**< \brief (PIO_LSR) Level Interrupt Selection. */
+#define PIO_LSR_P5 (0x1u << 5) /**< \brief (PIO_LSR) Level Interrupt Selection. */
+#define PIO_LSR_P6 (0x1u << 6) /**< \brief (PIO_LSR) Level Interrupt Selection. */
+#define PIO_LSR_P7 (0x1u << 7) /**< \brief (PIO_LSR) Level Interrupt Selection. */
+#define PIO_LSR_P8 (0x1u << 8) /**< \brief (PIO_LSR) Level Interrupt Selection. */
+#define PIO_LSR_P9 (0x1u << 9) /**< \brief (PIO_LSR) Level Interrupt Selection. */
+#define PIO_LSR_P10 (0x1u << 10) /**< \brief (PIO_LSR) Level Interrupt Selection. */
+#define PIO_LSR_P11 (0x1u << 11) /**< \brief (PIO_LSR) Level Interrupt Selection. */
+#define PIO_LSR_P12 (0x1u << 12) /**< \brief (PIO_LSR) Level Interrupt Selection. */
+#define PIO_LSR_P13 (0x1u << 13) /**< \brief (PIO_LSR) Level Interrupt Selection. */
+#define PIO_LSR_P14 (0x1u << 14) /**< \brief (PIO_LSR) Level Interrupt Selection. */
+#define PIO_LSR_P15 (0x1u << 15) /**< \brief (PIO_LSR) Level Interrupt Selection. */
+#define PIO_LSR_P16 (0x1u << 16) /**< \brief (PIO_LSR) Level Interrupt Selection. */
+#define PIO_LSR_P17 (0x1u << 17) /**< \brief (PIO_LSR) Level Interrupt Selection. */
+#define PIO_LSR_P18 (0x1u << 18) /**< \brief (PIO_LSR) Level Interrupt Selection. */
+#define PIO_LSR_P19 (0x1u << 19) /**< \brief (PIO_LSR) Level Interrupt Selection. */
+#define PIO_LSR_P20 (0x1u << 20) /**< \brief (PIO_LSR) Level Interrupt Selection. */
+#define PIO_LSR_P21 (0x1u << 21) /**< \brief (PIO_LSR) Level Interrupt Selection. */
+#define PIO_LSR_P22 (0x1u << 22) /**< \brief (PIO_LSR) Level Interrupt Selection. */
+#define PIO_LSR_P23 (0x1u << 23) /**< \brief (PIO_LSR) Level Interrupt Selection. */
+#define PIO_LSR_P24 (0x1u << 24) /**< \brief (PIO_LSR) Level Interrupt Selection. */
+#define PIO_LSR_P25 (0x1u << 25) /**< \brief (PIO_LSR) Level Interrupt Selection. */
+#define PIO_LSR_P26 (0x1u << 26) /**< \brief (PIO_LSR) Level Interrupt Selection. */
+#define PIO_LSR_P27 (0x1u << 27) /**< \brief (PIO_LSR) Level Interrupt Selection. */
+#define PIO_LSR_P28 (0x1u << 28) /**< \brief (PIO_LSR) Level Interrupt Selection. */
+#define PIO_LSR_P29 (0x1u << 29) /**< \brief (PIO_LSR) Level Interrupt Selection. */
+#define PIO_LSR_P30 (0x1u << 30) /**< \brief (PIO_LSR) Level Interrupt Selection. */
+#define PIO_LSR_P31 (0x1u << 31) /**< \brief (PIO_LSR) Level Interrupt Selection. */
+/* -------- PIO_ELSR : (PIO Offset: 0x00C8) Edge/Level Status Register -------- */
+#define PIO_ELSR_P0 (0x1u << 0) /**< \brief (PIO_ELSR) Edge/Level Interrupt source selection. */
+#define PIO_ELSR_P1 (0x1u << 1) /**< \brief (PIO_ELSR) Edge/Level Interrupt source selection. */
+#define PIO_ELSR_P2 (0x1u << 2) /**< \brief (PIO_ELSR) Edge/Level Interrupt source selection. */
+#define PIO_ELSR_P3 (0x1u << 3) /**< \brief (PIO_ELSR) Edge/Level Interrupt source selection. */
+#define PIO_ELSR_P4 (0x1u << 4) /**< \brief (PIO_ELSR) Edge/Level Interrupt source selection. */
+#define PIO_ELSR_P5 (0x1u << 5) /**< \brief (PIO_ELSR) Edge/Level Interrupt source selection. */
+#define PIO_ELSR_P6 (0x1u << 6) /**< \brief (PIO_ELSR) Edge/Level Interrupt source selection. */
+#define PIO_ELSR_P7 (0x1u << 7) /**< \brief (PIO_ELSR) Edge/Level Interrupt source selection. */
+#define PIO_ELSR_P8 (0x1u << 8) /**< \brief (PIO_ELSR) Edge/Level Interrupt source selection. */
+#define PIO_ELSR_P9 (0x1u << 9) /**< \brief (PIO_ELSR) Edge/Level Interrupt source selection. */
+#define PIO_ELSR_P10 (0x1u << 10) /**< \brief (PIO_ELSR) Edge/Level Interrupt source selection. */
+#define PIO_ELSR_P11 (0x1u << 11) /**< \brief (PIO_ELSR) Edge/Level Interrupt source selection. */
+#define PIO_ELSR_P12 (0x1u << 12) /**< \brief (PIO_ELSR) Edge/Level Interrupt source selection. */
+#define PIO_ELSR_P13 (0x1u << 13) /**< \brief (PIO_ELSR) Edge/Level Interrupt source selection. */
+#define PIO_ELSR_P14 (0x1u << 14) /**< \brief (PIO_ELSR) Edge/Level Interrupt source selection. */
+#define PIO_ELSR_P15 (0x1u << 15) /**< \brief (PIO_ELSR) Edge/Level Interrupt source selection. */
+#define PIO_ELSR_P16 (0x1u << 16) /**< \brief (PIO_ELSR) Edge/Level Interrupt source selection. */
+#define PIO_ELSR_P17 (0x1u << 17) /**< \brief (PIO_ELSR) Edge/Level Interrupt source selection. */
+#define PIO_ELSR_P18 (0x1u << 18) /**< \brief (PIO_ELSR) Edge/Level Interrupt source selection. */
+#define PIO_ELSR_P19 (0x1u << 19) /**< \brief (PIO_ELSR) Edge/Level Interrupt source selection. */
+#define PIO_ELSR_P20 (0x1u << 20) /**< \brief (PIO_ELSR) Edge/Level Interrupt source selection. */
+#define PIO_ELSR_P21 (0x1u << 21) /**< \brief (PIO_ELSR) Edge/Level Interrupt source selection. */
+#define PIO_ELSR_P22 (0x1u << 22) /**< \brief (PIO_ELSR) Edge/Level Interrupt source selection. */
+#define PIO_ELSR_P23 (0x1u << 23) /**< \brief (PIO_ELSR) Edge/Level Interrupt source selection. */
+#define PIO_ELSR_P24 (0x1u << 24) /**< \brief (PIO_ELSR) Edge/Level Interrupt source selection. */
+#define PIO_ELSR_P25 (0x1u << 25) /**< \brief (PIO_ELSR) Edge/Level Interrupt source selection. */
+#define PIO_ELSR_P26 (0x1u << 26) /**< \brief (PIO_ELSR) Edge/Level Interrupt source selection. */
+#define PIO_ELSR_P27 (0x1u << 27) /**< \brief (PIO_ELSR) Edge/Level Interrupt source selection. */
+#define PIO_ELSR_P28 (0x1u << 28) /**< \brief (PIO_ELSR) Edge/Level Interrupt source selection. */
+#define PIO_ELSR_P29 (0x1u << 29) /**< \brief (PIO_ELSR) Edge/Level Interrupt source selection. */
+#define PIO_ELSR_P30 (0x1u << 30) /**< \brief (PIO_ELSR) Edge/Level Interrupt source selection. */
+#define PIO_ELSR_P31 (0x1u << 31) /**< \brief (PIO_ELSR) Edge/Level Interrupt source selection. */
+/* -------- PIO_FELLSR : (PIO Offset: 0x00D0) Falling Edge/Low Level Select Register -------- */
+#define PIO_FELLSR_P0 (0x1u << 0) /**< \brief (PIO_FELLSR) Falling Edge/Low Level Interrupt Selection. */
+#define PIO_FELLSR_P1 (0x1u << 1) /**< \brief (PIO_FELLSR) Falling Edge/Low Level Interrupt Selection. */
+#define PIO_FELLSR_P2 (0x1u << 2) /**< \brief (PIO_FELLSR) Falling Edge/Low Level Interrupt Selection. */
+#define PIO_FELLSR_P3 (0x1u << 3) /**< \brief (PIO_FELLSR) Falling Edge/Low Level Interrupt Selection. */
+#define PIO_FELLSR_P4 (0x1u << 4) /**< \brief (PIO_FELLSR) Falling Edge/Low Level Interrupt Selection. */
+#define PIO_FELLSR_P5 (0x1u << 5) /**< \brief (PIO_FELLSR) Falling Edge/Low Level Interrupt Selection. */
+#define PIO_FELLSR_P6 (0x1u << 6) /**< \brief (PIO_FELLSR) Falling Edge/Low Level Interrupt Selection. */
+#define PIO_FELLSR_P7 (0x1u << 7) /**< \brief (PIO_FELLSR) Falling Edge/Low Level Interrupt Selection. */
+#define PIO_FELLSR_P8 (0x1u << 8) /**< \brief (PIO_FELLSR) Falling Edge/Low Level Interrupt Selection. */
+#define PIO_FELLSR_P9 (0x1u << 9) /**< \brief (PIO_FELLSR) Falling Edge/Low Level Interrupt Selection. */
+#define PIO_FELLSR_P10 (0x1u << 10) /**< \brief (PIO_FELLSR) Falling Edge/Low Level Interrupt Selection. */
+#define PIO_FELLSR_P11 (0x1u << 11) /**< \brief (PIO_FELLSR) Falling Edge/Low Level Interrupt Selection. */
+#define PIO_FELLSR_P12 (0x1u << 12) /**< \brief (PIO_FELLSR) Falling Edge/Low Level Interrupt Selection. */
+#define PIO_FELLSR_P13 (0x1u << 13) /**< \brief (PIO_FELLSR) Falling Edge/Low Level Interrupt Selection. */
+#define PIO_FELLSR_P14 (0x1u << 14) /**< \brief (PIO_FELLSR) Falling Edge/Low Level Interrupt Selection. */
+#define PIO_FELLSR_P15 (0x1u << 15) /**< \brief (PIO_FELLSR) Falling Edge/Low Level Interrupt Selection. */
+#define PIO_FELLSR_P16 (0x1u << 16) /**< \brief (PIO_FELLSR) Falling Edge/Low Level Interrupt Selection. */
+#define PIO_FELLSR_P17 (0x1u << 17) /**< \brief (PIO_FELLSR) Falling Edge/Low Level Interrupt Selection. */
+#define PIO_FELLSR_P18 (0x1u << 18) /**< \brief (PIO_FELLSR) Falling Edge/Low Level Interrupt Selection. */
+#define PIO_FELLSR_P19 (0x1u << 19) /**< \brief (PIO_FELLSR) Falling Edge/Low Level Interrupt Selection. */
+#define PIO_FELLSR_P20 (0x1u << 20) /**< \brief (PIO_FELLSR) Falling Edge/Low Level Interrupt Selection. */
+#define PIO_FELLSR_P21 (0x1u << 21) /**< \brief (PIO_FELLSR) Falling Edge/Low Level Interrupt Selection. */
+#define PIO_FELLSR_P22 (0x1u << 22) /**< \brief (PIO_FELLSR) Falling Edge/Low Level Interrupt Selection. */
+#define PIO_FELLSR_P23 (0x1u << 23) /**< \brief (PIO_FELLSR) Falling Edge/Low Level Interrupt Selection. */
+#define PIO_FELLSR_P24 (0x1u << 24) /**< \brief (PIO_FELLSR) Falling Edge/Low Level Interrupt Selection. */
+#define PIO_FELLSR_P25 (0x1u << 25) /**< \brief (PIO_FELLSR) Falling Edge/Low Level Interrupt Selection. */
+#define PIO_FELLSR_P26 (0x1u << 26) /**< \brief (PIO_FELLSR) Falling Edge/Low Level Interrupt Selection. */
+#define PIO_FELLSR_P27 (0x1u << 27) /**< \brief (PIO_FELLSR) Falling Edge/Low Level Interrupt Selection. */
+#define PIO_FELLSR_P28 (0x1u << 28) /**< \brief (PIO_FELLSR) Falling Edge/Low Level Interrupt Selection. */
+#define PIO_FELLSR_P29 (0x1u << 29) /**< \brief (PIO_FELLSR) Falling Edge/Low Level Interrupt Selection. */
+#define PIO_FELLSR_P30 (0x1u << 30) /**< \brief (PIO_FELLSR) Falling Edge/Low Level Interrupt Selection. */
+#define PIO_FELLSR_P31 (0x1u << 31) /**< \brief (PIO_FELLSR) Falling Edge/Low Level Interrupt Selection. */
+/* -------- PIO_REHLSR : (PIO Offset: 0x00D4) Rising Edge/ High Level Select Register -------- */
+#define PIO_REHLSR_P0 (0x1u << 0) /**< \brief (PIO_REHLSR) Rising Edge /High Level Interrupt Selection. */
+#define PIO_REHLSR_P1 (0x1u << 1) /**< \brief (PIO_REHLSR) Rising Edge /High Level Interrupt Selection. */
+#define PIO_REHLSR_P2 (0x1u << 2) /**< \brief (PIO_REHLSR) Rising Edge /High Level Interrupt Selection. */
+#define PIO_REHLSR_P3 (0x1u << 3) /**< \brief (PIO_REHLSR) Rising Edge /High Level Interrupt Selection. */
+#define PIO_REHLSR_P4 (0x1u << 4) /**< \brief (PIO_REHLSR) Rising Edge /High Level Interrupt Selection. */
+#define PIO_REHLSR_P5 (0x1u << 5) /**< \brief (PIO_REHLSR) Rising Edge /High Level Interrupt Selection. */
+#define PIO_REHLSR_P6 (0x1u << 6) /**< \brief (PIO_REHLSR) Rising Edge /High Level Interrupt Selection. */
+#define PIO_REHLSR_P7 (0x1u << 7) /**< \brief (PIO_REHLSR) Rising Edge /High Level Interrupt Selection. */
+#define PIO_REHLSR_P8 (0x1u << 8) /**< \brief (PIO_REHLSR) Rising Edge /High Level Interrupt Selection. */
+#define PIO_REHLSR_P9 (0x1u << 9) /**< \brief (PIO_REHLSR) Rising Edge /High Level Interrupt Selection. */
+#define PIO_REHLSR_P10 (0x1u << 10) /**< \brief (PIO_REHLSR) Rising Edge /High Level Interrupt Selection. */
+#define PIO_REHLSR_P11 (0x1u << 11) /**< \brief (PIO_REHLSR) Rising Edge /High Level Interrupt Selection. */
+#define PIO_REHLSR_P12 (0x1u << 12) /**< \brief (PIO_REHLSR) Rising Edge /High Level Interrupt Selection. */
+#define PIO_REHLSR_P13 (0x1u << 13) /**< \brief (PIO_REHLSR) Rising Edge /High Level Interrupt Selection. */
+#define PIO_REHLSR_P14 (0x1u << 14) /**< \brief (PIO_REHLSR) Rising Edge /High Level Interrupt Selection. */
+#define PIO_REHLSR_P15 (0x1u << 15) /**< \brief (PIO_REHLSR) Rising Edge /High Level Interrupt Selection. */
+#define PIO_REHLSR_P16 (0x1u << 16) /**< \brief (PIO_REHLSR) Rising Edge /High Level Interrupt Selection. */
+#define PIO_REHLSR_P17 (0x1u << 17) /**< \brief (PIO_REHLSR) Rising Edge /High Level Interrupt Selection. */
+#define PIO_REHLSR_P18 (0x1u << 18) /**< \brief (PIO_REHLSR) Rising Edge /High Level Interrupt Selection. */
+#define PIO_REHLSR_P19 (0x1u << 19) /**< \brief (PIO_REHLSR) Rising Edge /High Level Interrupt Selection. */
+#define PIO_REHLSR_P20 (0x1u << 20) /**< \brief (PIO_REHLSR) Rising Edge /High Level Interrupt Selection. */
+#define PIO_REHLSR_P21 (0x1u << 21) /**< \brief (PIO_REHLSR) Rising Edge /High Level Interrupt Selection. */
+#define PIO_REHLSR_P22 (0x1u << 22) /**< \brief (PIO_REHLSR) Rising Edge /High Level Interrupt Selection. */
+#define PIO_REHLSR_P23 (0x1u << 23) /**< \brief (PIO_REHLSR) Rising Edge /High Level Interrupt Selection. */
+#define PIO_REHLSR_P24 (0x1u << 24) /**< \brief (PIO_REHLSR) Rising Edge /High Level Interrupt Selection. */
+#define PIO_REHLSR_P25 (0x1u << 25) /**< \brief (PIO_REHLSR) Rising Edge /High Level Interrupt Selection. */
+#define PIO_REHLSR_P26 (0x1u << 26) /**< \brief (PIO_REHLSR) Rising Edge /High Level Interrupt Selection. */
+#define PIO_REHLSR_P27 (0x1u << 27) /**< \brief (PIO_REHLSR) Rising Edge /High Level Interrupt Selection. */
+#define PIO_REHLSR_P28 (0x1u << 28) /**< \brief (PIO_REHLSR) Rising Edge /High Level Interrupt Selection. */
+#define PIO_REHLSR_P29 (0x1u << 29) /**< \brief (PIO_REHLSR) Rising Edge /High Level Interrupt Selection. */
+#define PIO_REHLSR_P30 (0x1u << 30) /**< \brief (PIO_REHLSR) Rising Edge /High Level Interrupt Selection. */
+#define PIO_REHLSR_P31 (0x1u << 31) /**< \brief (PIO_REHLSR) Rising Edge /High Level Interrupt Selection. */
+/* -------- PIO_FRLHSR : (PIO Offset: 0x00D8) Fall/Rise - Low/High Status Register -------- */
+#define PIO_FRLHSR_P0 (0x1u << 0) /**< \brief (PIO_FRLHSR) Edge /Level Interrupt Source Selection. */
+#define PIO_FRLHSR_P1 (0x1u << 1) /**< \brief (PIO_FRLHSR) Edge /Level Interrupt Source Selection. */
+#define PIO_FRLHSR_P2 (0x1u << 2) /**< \brief (PIO_FRLHSR) Edge /Level Interrupt Source Selection. */
+#define PIO_FRLHSR_P3 (0x1u << 3) /**< \brief (PIO_FRLHSR) Edge /Level Interrupt Source Selection. */
+#define PIO_FRLHSR_P4 (0x1u << 4) /**< \brief (PIO_FRLHSR) Edge /Level Interrupt Source Selection. */
+#define PIO_FRLHSR_P5 (0x1u << 5) /**< \brief (PIO_FRLHSR) Edge /Level Interrupt Source Selection. */
+#define PIO_FRLHSR_P6 (0x1u << 6) /**< \brief (PIO_FRLHSR) Edge /Level Interrupt Source Selection. */
+#define PIO_FRLHSR_P7 (0x1u << 7) /**< \brief (PIO_FRLHSR) Edge /Level Interrupt Source Selection. */
+#define PIO_FRLHSR_P8 (0x1u << 8) /**< \brief (PIO_FRLHSR) Edge /Level Interrupt Source Selection. */
+#define PIO_FRLHSR_P9 (0x1u << 9) /**< \brief (PIO_FRLHSR) Edge /Level Interrupt Source Selection. */
+#define PIO_FRLHSR_P10 (0x1u << 10) /**< \brief (PIO_FRLHSR) Edge /Level Interrupt Source Selection. */
+#define PIO_FRLHSR_P11 (0x1u << 11) /**< \brief (PIO_FRLHSR) Edge /Level Interrupt Source Selection. */
+#define PIO_FRLHSR_P12 (0x1u << 12) /**< \brief (PIO_FRLHSR) Edge /Level Interrupt Source Selection. */
+#define PIO_FRLHSR_P13 (0x1u << 13) /**< \brief (PIO_FRLHSR) Edge /Level Interrupt Source Selection. */
+#define PIO_FRLHSR_P14 (0x1u << 14) /**< \brief (PIO_FRLHSR) Edge /Level Interrupt Source Selection. */
+#define PIO_FRLHSR_P15 (0x1u << 15) /**< \brief (PIO_FRLHSR) Edge /Level Interrupt Source Selection. */
+#define PIO_FRLHSR_P16 (0x1u << 16) /**< \brief (PIO_FRLHSR) Edge /Level Interrupt Source Selection. */
+#define PIO_FRLHSR_P17 (0x1u << 17) /**< \brief (PIO_FRLHSR) Edge /Level Interrupt Source Selection. */
+#define PIO_FRLHSR_P18 (0x1u << 18) /**< \brief (PIO_FRLHSR) Edge /Level Interrupt Source Selection. */
+#define PIO_FRLHSR_P19 (0x1u << 19) /**< \brief (PIO_FRLHSR) Edge /Level Interrupt Source Selection. */
+#define PIO_FRLHSR_P20 (0x1u << 20) /**< \brief (PIO_FRLHSR) Edge /Level Interrupt Source Selection. */
+#define PIO_FRLHSR_P21 (0x1u << 21) /**< \brief (PIO_FRLHSR) Edge /Level Interrupt Source Selection. */
+#define PIO_FRLHSR_P22 (0x1u << 22) /**< \brief (PIO_FRLHSR) Edge /Level Interrupt Source Selection. */
+#define PIO_FRLHSR_P23 (0x1u << 23) /**< \brief (PIO_FRLHSR) Edge /Level Interrupt Source Selection. */
+#define PIO_FRLHSR_P24 (0x1u << 24) /**< \brief (PIO_FRLHSR) Edge /Level Interrupt Source Selection. */
+#define PIO_FRLHSR_P25 (0x1u << 25) /**< \brief (PIO_FRLHSR) Edge /Level Interrupt Source Selection. */
+#define PIO_FRLHSR_P26 (0x1u << 26) /**< \brief (PIO_FRLHSR) Edge /Level Interrupt Source Selection. */
+#define PIO_FRLHSR_P27 (0x1u << 27) /**< \brief (PIO_FRLHSR) Edge /Level Interrupt Source Selection. */
+#define PIO_FRLHSR_P28 (0x1u << 28) /**< \brief (PIO_FRLHSR) Edge /Level Interrupt Source Selection. */
+#define PIO_FRLHSR_P29 (0x1u << 29) /**< \brief (PIO_FRLHSR) Edge /Level Interrupt Source Selection. */
+#define PIO_FRLHSR_P30 (0x1u << 30) /**< \brief (PIO_FRLHSR) Edge /Level Interrupt Source Selection. */
+#define PIO_FRLHSR_P31 (0x1u << 31) /**< \brief (PIO_FRLHSR) Edge /Level Interrupt Source Selection. */
+/* -------- PIO_LOCKSR : (PIO Offset: 0x00E0) Lock Status -------- */
+#define PIO_LOCKSR_P0 (0x1u << 0) /**< \brief (PIO_LOCKSR) Lock Status. */
+#define PIO_LOCKSR_P1 (0x1u << 1) /**< \brief (PIO_LOCKSR) Lock Status. */
+#define PIO_LOCKSR_P2 (0x1u << 2) /**< \brief (PIO_LOCKSR) Lock Status. */
+#define PIO_LOCKSR_P3 (0x1u << 3) /**< \brief (PIO_LOCKSR) Lock Status. */
+#define PIO_LOCKSR_P4 (0x1u << 4) /**< \brief (PIO_LOCKSR) Lock Status. */
+#define PIO_LOCKSR_P5 (0x1u << 5) /**< \brief (PIO_LOCKSR) Lock Status. */
+#define PIO_LOCKSR_P6 (0x1u << 6) /**< \brief (PIO_LOCKSR) Lock Status. */
+#define PIO_LOCKSR_P7 (0x1u << 7) /**< \brief (PIO_LOCKSR) Lock Status. */
+#define PIO_LOCKSR_P8 (0x1u << 8) /**< \brief (PIO_LOCKSR) Lock Status. */
+#define PIO_LOCKSR_P9 (0x1u << 9) /**< \brief (PIO_LOCKSR) Lock Status. */
+#define PIO_LOCKSR_P10 (0x1u << 10) /**< \brief (PIO_LOCKSR) Lock Status. */
+#define PIO_LOCKSR_P11 (0x1u << 11) /**< \brief (PIO_LOCKSR) Lock Status. */
+#define PIO_LOCKSR_P12 (0x1u << 12) /**< \brief (PIO_LOCKSR) Lock Status. */
+#define PIO_LOCKSR_P13 (0x1u << 13) /**< \brief (PIO_LOCKSR) Lock Status. */
+#define PIO_LOCKSR_P14 (0x1u << 14) /**< \brief (PIO_LOCKSR) Lock Status. */
+#define PIO_LOCKSR_P15 (0x1u << 15) /**< \brief (PIO_LOCKSR) Lock Status. */
+#define PIO_LOCKSR_P16 (0x1u << 16) /**< \brief (PIO_LOCKSR) Lock Status. */
+#define PIO_LOCKSR_P17 (0x1u << 17) /**< \brief (PIO_LOCKSR) Lock Status. */
+#define PIO_LOCKSR_P18 (0x1u << 18) /**< \brief (PIO_LOCKSR) Lock Status. */
+#define PIO_LOCKSR_P19 (0x1u << 19) /**< \brief (PIO_LOCKSR) Lock Status. */
+#define PIO_LOCKSR_P20 (0x1u << 20) /**< \brief (PIO_LOCKSR) Lock Status. */
+#define PIO_LOCKSR_P21 (0x1u << 21) /**< \brief (PIO_LOCKSR) Lock Status. */
+#define PIO_LOCKSR_P22 (0x1u << 22) /**< \brief (PIO_LOCKSR) Lock Status. */
+#define PIO_LOCKSR_P23 (0x1u << 23) /**< \brief (PIO_LOCKSR) Lock Status. */
+#define PIO_LOCKSR_P24 (0x1u << 24) /**< \brief (PIO_LOCKSR) Lock Status. */
+#define PIO_LOCKSR_P25 (0x1u << 25) /**< \brief (PIO_LOCKSR) Lock Status. */
+#define PIO_LOCKSR_P26 (0x1u << 26) /**< \brief (PIO_LOCKSR) Lock Status. */
+#define PIO_LOCKSR_P27 (0x1u << 27) /**< \brief (PIO_LOCKSR) Lock Status. */
+#define PIO_LOCKSR_P28 (0x1u << 28) /**< \brief (PIO_LOCKSR) Lock Status. */
+#define PIO_LOCKSR_P29 (0x1u << 29) /**< \brief (PIO_LOCKSR) Lock Status. */
+#define PIO_LOCKSR_P30 (0x1u << 30) /**< \brief (PIO_LOCKSR) Lock Status. */
+#define PIO_LOCKSR_P31 (0x1u << 31) /**< \brief (PIO_LOCKSR) Lock Status. */
+/* -------- PIO_WPMR : (PIO Offset: 0x00E4) Write Protect Mode Register -------- */
+#define PIO_WPMR_WPEN (0x1u << 0) /**< \brief (PIO_WPMR) Write Protect Enable */
+#define PIO_WPMR_WPKEY_Pos 8
+#define PIO_WPMR_WPKEY_Msk (0xffffffu << PIO_WPMR_WPKEY_Pos) /**< \brief (PIO_WPMR) Write Protect KEY */
+#define PIO_WPMR_WPKEY(value) ((PIO_WPMR_WPKEY_Msk & ((value) << PIO_WPMR_WPKEY_Pos)))
+/* -------- PIO_WPSR : (PIO Offset: 0x00E8) Write Protect Status Register -------- */
+#define PIO_WPSR_WPVS (0x1u << 0) /**< \brief (PIO_WPSR) Write Protect Violation Status */
+#define PIO_WPSR_WPVSRC_Pos 8
+#define PIO_WPSR_WPVSRC_Msk (0xffffu << PIO_WPSR_WPVSRC_Pos) /**< \brief (PIO_WPSR) Write Protect Violation Source */
+
+/*@}*/
+
+/* ============================================================================= */
+/** SOFTWARE API DEFINITION FOR Power Management Controller */
+/* ============================================================================= */
+/** \addtogroup SAM3XA_PMC Power Management Controller */
+/*@{*/
+
+#ifndef __ASSEMBLY__
+/** \brief Pmc hardware registers */
+typedef struct {
+ WoReg PMC_SCER; /**< \brief (Pmc Offset: 0x0000) System Clock Enable Register */
+ WoReg PMC_SCDR; /**< \brief (Pmc Offset: 0x0004) System Clock Disable Register */
+ RoReg PMC_SCSR; /**< \brief (Pmc Offset: 0x0008) System Clock Status Register */
+ RoReg Reserved1[1];
+ WoReg PMC_PCER0; /**< \brief (Pmc Offset: 0x0010) Peripheral Clock Enable Register 0 */
+ WoReg PMC_PCDR0; /**< \brief (Pmc Offset: 0x0014) Peripheral Clock Disable Register 0 */
+ RoReg PMC_PCSR0; /**< \brief (Pmc Offset: 0x0018) Peripheral Clock Status Register 0 */
+ RwReg CKGR_UCKR; /**< \brief (Pmc Offset: 0x001C) UTMI Clock Register */
+ RwReg CKGR_MOR; /**< \brief (Pmc Offset: 0x0020) Main Oscillator Register */
+ RoReg CKGR_MCFR; /**< \brief (Pmc Offset: 0x0024) Main Clock Frequency Register */
+ RwReg CKGR_PLLAR; /**< \brief (Pmc Offset: 0x0028) PLLA Register */
+ RoReg Reserved2[1];
+ RwReg PMC_MCKR; /**< \brief (Pmc Offset: 0x0030) Master Clock Register */
+ RoReg Reserved3[1];
+ RwReg PMC_USB; /**< \brief (Pmc Offset: 0x0038) USB Clock Register */
+ RoReg Reserved4[1];
+ RwReg PMC_PCK[3]; /**< \brief (Pmc Offset: 0x0040) Programmable Clock 0 Register */
+ RoReg Reserved5[5];
+ WoReg PMC_IER; /**< \brief (Pmc Offset: 0x0060) Interrupt Enable Register */
+ WoReg PMC_IDR; /**< \brief (Pmc Offset: 0x0064) Interrupt Disable Register */
+ RoReg PMC_SR; /**< \brief (Pmc Offset: 0x0068) Status Register */
+ RoReg PMC_IMR; /**< \brief (Pmc Offset: 0x006C) Interrupt Mask Register */
+ RwReg PMC_FSMR; /**< \brief (Pmc Offset: 0x0070) Fast Startup Mode Register */
+ RwReg PMC_FSPR; /**< \brief (Pmc Offset: 0x0074) Fast Startup Polarity Register */
+ WoReg PMC_FOCR; /**< \brief (Pmc Offset: 0x0078) Fault Output Clear Register */
+ RoReg Reserved6[26];
+ RwReg PMC_WPMR; /**< \brief (Pmc Offset: 0x00E4) Write Protect Mode Register */
+ RoReg PMC_WPSR; /**< \brief (Pmc Offset: 0x00E8) Write Protect Status Register */
+ RoReg Reserved7[5];
+ WoReg PMC_PCER1; /**< \brief (Pmc Offset: 0x0100) Peripheral Clock Enable Register 1 */
+ WoReg PMC_PCDR1; /**< \brief (Pmc Offset: 0x0104) Peripheral Clock Disable Register 1 */
+ RoReg PMC_PCSR1; /**< \brief (Pmc Offset: 0x0108) Peripheral Clock Status Register 1 */
+ RwReg PMC_PCR; /**< \brief (Pmc Offset: 0x010C) Peripheral Control Register */
+} Pmc;
+#endif /* __ASSEMBLY__ */
+/* -------- PMC_SCER : (PMC Offset: 0x0000) System Clock Enable Register -------- */
+#define PMC_SCER_UOTGCK (0x1u << 5) /**< \brief (PMC_SCER) Enable USB OTG Clock (48 MHz, USB_48M) for UTMI */
+#define PMC_SCER_PCK0 (0x1u << 8) /**< \brief (PMC_SCER) Programmable Clock 0 Output Enable */
+#define PMC_SCER_PCK1 (0x1u << 9) /**< \brief (PMC_SCER) Programmable Clock 1 Output Enable */
+#define PMC_SCER_PCK2 (0x1u << 10) /**< \brief (PMC_SCER) Programmable Clock 2 Output Enable */
+/* -------- PMC_SCDR : (PMC Offset: 0x0004) System Clock Disable Register -------- */
+#define PMC_SCDR_UOTGCK (0x1u << 5) /**< \brief (PMC_SCDR) Disable USB OTG Clock (48 MHz, USB_48M) for UTMI */
+#define PMC_SCDR_PCK0 (0x1u << 8) /**< \brief (PMC_SCDR) Programmable Clock 0 Output Disable */
+#define PMC_SCDR_PCK1 (0x1u << 9) /**< \brief (PMC_SCDR) Programmable Clock 1 Output Disable */
+#define PMC_SCDR_PCK2 (0x1u << 10) /**< \brief (PMC_SCDR) Programmable Clock 2 Output Disable */
+/* -------- PMC_SCSR : (PMC Offset: 0x0008) System Clock Status Register -------- */
+#define PMC_SCSR_UOTGCK (0x1u << 5) /**< \brief (PMC_SCSR) USB OTG Clock (48 MHz, USB_48M) for UTMI */
+#define PMC_SCSR_UOTGCK_DISABLE (0x0u << 5) /**< \brief (PMC_SCSR) USB_48M is disabled in normal operation mode. */
+#define PMC_SCSR_UOTGCK_ENABLE (0x1u << 5) /**< \brief (PMC_SCSR) Enable USB_48M (to use if SPDCONF =1). */
+#define PMC_SCSR_PCK0 (0x1u << 8) /**< \brief (PMC_SCSR) Programmable Clock 0 Output Status */
+#define PMC_SCSR_PCK1 (0x1u << 9) /**< \brief (PMC_SCSR) Programmable Clock 1 Output Status */
+#define PMC_SCSR_PCK2 (0x1u << 10) /**< \brief (PMC_SCSR) Programmable Clock 2 Output Status */
+/* -------- PMC_PCER0 : (PMC Offset: 0x0010) Peripheral Clock Enable Register 0 -------- */
+#define PMC_PCER0_PID8 (0x1u << 8) /**< \brief (PMC_PCER0) Peripheral Clock 8 Enable */
+#define PMC_PCER0_PID9 (0x1u << 9) /**< \brief (PMC_PCER0) Peripheral Clock 9 Enable */
+#define PMC_PCER0_PID10 (0x1u << 10) /**< \brief (PMC_PCER0) Peripheral Clock 10 Enable */
+#define PMC_PCER0_PID11 (0x1u << 11) /**< \brief (PMC_PCER0) Peripheral Clock 11 Enable */
+#define PMC_PCER0_PID12 (0x1u << 12) /**< \brief (PMC_PCER0) Peripheral Clock 12 Enable */
+#define PMC_PCER0_PID13 (0x1u << 13) /**< \brief (PMC_PCER0) Peripheral Clock 13 Enable */
+#define PMC_PCER0_PID14 (0x1u << 14) /**< \brief (PMC_PCER0) Peripheral Clock 14 Enable */
+#define PMC_PCER0_PID15 (0x1u << 15) /**< \brief (PMC_PCER0) Peripheral Clock 15 Enable */
+#define PMC_PCER0_PID16 (0x1u << 16) /**< \brief (PMC_PCER0) Peripheral Clock 16 Enable */
+#define PMC_PCER0_PID17 (0x1u << 17) /**< \brief (PMC_PCER0) Peripheral Clock 17 Enable */
+#define PMC_PCER0_PID18 (0x1u << 18) /**< \brief (PMC_PCER0) Peripheral Clock 18 Enable */
+#define PMC_PCER0_PID19 (0x1u << 19) /**< \brief (PMC_PCER0) Peripheral Clock 19 Enable */
+#define PMC_PCER0_PID20 (0x1u << 20) /**< \brief (PMC_PCER0) Peripheral Clock 20 Enable */
+#define PMC_PCER0_PID21 (0x1u << 21) /**< \brief (PMC_PCER0) Peripheral Clock 21 Enable */
+#define PMC_PCER0_PID22 (0x1u << 22) /**< \brief (PMC_PCER0) Peripheral Clock 22 Enable */
+#define PMC_PCER0_PID23 (0x1u << 23) /**< \brief (PMC_PCER0) Peripheral Clock 23 Enable */
+#define PMC_PCER0_PID24 (0x1u << 24) /**< \brief (PMC_PCER0) Peripheral Clock 24 Enable */
+#define PMC_PCER0_PID25 (0x1u << 25) /**< \brief (PMC_PCER0) Peripheral Clock 25 Enable */
+#define PMC_PCER0_PID26 (0x1u << 26) /**< \brief (PMC_PCER0) Peripheral Clock 26 Enable */
+#define PMC_PCER0_PID27 (0x1u << 27) /**< \brief (PMC_PCER0) Peripheral Clock 27 Enable */
+#define PMC_PCER0_PID28 (0x1u << 28) /**< \brief (PMC_PCER0) Peripheral Clock 28 Enable */
+#define PMC_PCER0_PID29 (0x1u << 29) /**< \brief (PMC_PCER0) Peripheral Clock 29 Enable */
+#define PMC_PCER0_PID30 (0x1u << 30) /**< \brief (PMC_PCER0) Peripheral Clock 30 Enable */
+#define PMC_PCER0_PID31 (0x1u << 31) /**< \brief (PMC_PCER0) Peripheral Clock 31 Enable */
+/* -------- PMC_PCDR0 : (PMC Offset: 0x0014) Peripheral Clock Disable Register 0 -------- */
+#define PMC_PCDR0_PID8 (0x1u << 8) /**< \brief (PMC_PCDR0) Peripheral Clock 8 Disable */
+#define PMC_PCDR0_PID9 (0x1u << 9) /**< \brief (PMC_PCDR0) Peripheral Clock 9 Disable */
+#define PMC_PCDR0_PID10 (0x1u << 10) /**< \brief (PMC_PCDR0) Peripheral Clock 10 Disable */
+#define PMC_PCDR0_PID11 (0x1u << 11) /**< \brief (PMC_PCDR0) Peripheral Clock 11 Disable */
+#define PMC_PCDR0_PID12 (0x1u << 12) /**< \brief (PMC_PCDR0) Peripheral Clock 12 Disable */
+#define PMC_PCDR0_PID13 (0x1u << 13) /**< \brief (PMC_PCDR0) Peripheral Clock 13 Disable */
+#define PMC_PCDR0_PID14 (0x1u << 14) /**< \brief (PMC_PCDR0) Peripheral Clock 14 Disable */
+#define PMC_PCDR0_PID15 (0x1u << 15) /**< \brief (PMC_PCDR0) Peripheral Clock 15 Disable */
+#define PMC_PCDR0_PID16 (0x1u << 16) /**< \brief (PMC_PCDR0) Peripheral Clock 16 Disable */
+#define PMC_PCDR0_PID17 (0x1u << 17) /**< \brief (PMC_PCDR0) Peripheral Clock 17 Disable */
+#define PMC_PCDR0_PID18 (0x1u << 18) /**< \brief (PMC_PCDR0) Peripheral Clock 18 Disable */
+#define PMC_PCDR0_PID19 (0x1u << 19) /**< \brief (PMC_PCDR0) Peripheral Clock 19 Disable */
+#define PMC_PCDR0_PID20 (0x1u << 20) /**< \brief (PMC_PCDR0) Peripheral Clock 20 Disable */
+#define PMC_PCDR0_PID21 (0x1u << 21) /**< \brief (PMC_PCDR0) Peripheral Clock 21 Disable */
+#define PMC_PCDR0_PID22 (0x1u << 22) /**< \brief (PMC_PCDR0) Peripheral Clock 22 Disable */
+#define PMC_PCDR0_PID23 (0x1u << 23) /**< \brief (PMC_PCDR0) Peripheral Clock 23 Disable */
+#define PMC_PCDR0_PID24 (0x1u << 24) /**< \brief (PMC_PCDR0) Peripheral Clock 24 Disable */
+#define PMC_PCDR0_PID25 (0x1u << 25) /**< \brief (PMC_PCDR0) Peripheral Clock 25 Disable */
+#define PMC_PCDR0_PID26 (0x1u << 26) /**< \brief (PMC_PCDR0) Peripheral Clock 26 Disable */
+#define PMC_PCDR0_PID27 (0x1u << 27) /**< \brief (PMC_PCDR0) Peripheral Clock 27 Disable */
+#define PMC_PCDR0_PID28 (0x1u << 28) /**< \brief (PMC_PCDR0) Peripheral Clock 28 Disable */
+#define PMC_PCDR0_PID29 (0x1u << 29) /**< \brief (PMC_PCDR0) Peripheral Clock 29 Disable */
+#define PMC_PCDR0_PID30 (0x1u << 30) /**< \brief (PMC_PCDR0) Peripheral Clock 30 Disable */
+#define PMC_PCDR0_PID31 (0x1u << 31) /**< \brief (PMC_PCDR0) Peripheral Clock 31 Disable */
+/* -------- PMC_PCSR0 : (PMC Offset: 0x0018) Peripheral Clock Status Register 0 -------- */
+#define PMC_PCSR0_PID8 (0x1u << 8) /**< \brief (PMC_PCSR0) Peripheral Clock 8 Status */
+#define PMC_PCSR0_PID9 (0x1u << 9) /**< \brief (PMC_PCSR0) Peripheral Clock 9 Status */
+#define PMC_PCSR0_PID10 (0x1u << 10) /**< \brief (PMC_PCSR0) Peripheral Clock 10 Status */
+#define PMC_PCSR0_PID11 (0x1u << 11) /**< \brief (PMC_PCSR0) Peripheral Clock 11 Status */
+#define PMC_PCSR0_PID12 (0x1u << 12) /**< \brief (PMC_PCSR0) Peripheral Clock 12 Status */
+#define PMC_PCSR0_PID13 (0x1u << 13) /**< \brief (PMC_PCSR0) Peripheral Clock 13 Status */
+#define PMC_PCSR0_PID14 (0x1u << 14) /**< \brief (PMC_PCSR0) Peripheral Clock 14 Status */
+#define PMC_PCSR0_PID15 (0x1u << 15) /**< \brief (PMC_PCSR0) Peripheral Clock 15 Status */
+#define PMC_PCSR0_PID16 (0x1u << 16) /**< \brief (PMC_PCSR0) Peripheral Clock 16 Status */
+#define PMC_PCSR0_PID17 (0x1u << 17) /**< \brief (PMC_PCSR0) Peripheral Clock 17 Status */
+#define PMC_PCSR0_PID18 (0x1u << 18) /**< \brief (PMC_PCSR0) Peripheral Clock 18 Status */
+#define PMC_PCSR0_PID19 (0x1u << 19) /**< \brief (PMC_PCSR0) Peripheral Clock 19 Status */
+#define PMC_PCSR0_PID20 (0x1u << 20) /**< \brief (PMC_PCSR0) Peripheral Clock 20 Status */
+#define PMC_PCSR0_PID21 (0x1u << 21) /**< \brief (PMC_PCSR0) Peripheral Clock 21 Status */
+#define PMC_PCSR0_PID22 (0x1u << 22) /**< \brief (PMC_PCSR0) Peripheral Clock 22 Status */
+#define PMC_PCSR0_PID23 (0x1u << 23) /**< \brief (PMC_PCSR0) Peripheral Clock 23 Status */
+#define PMC_PCSR0_PID24 (0x1u << 24) /**< \brief (PMC_PCSR0) Peripheral Clock 24 Status */
+#define PMC_PCSR0_PID25 (0x1u << 25) /**< \brief (PMC_PCSR0) Peripheral Clock 25 Status */
+#define PMC_PCSR0_PID26 (0x1u << 26) /**< \brief (PMC_PCSR0) Peripheral Clock 26 Status */
+#define PMC_PCSR0_PID27 (0x1u << 27) /**< \brief (PMC_PCSR0) Peripheral Clock 27 Status */
+#define PMC_PCSR0_PID28 (0x1u << 28) /**< \brief (PMC_PCSR0) Peripheral Clock 28 Status */
+#define PMC_PCSR0_PID29 (0x1u << 29) /**< \brief (PMC_PCSR0) Peripheral Clock 29 Status */
+#define PMC_PCSR0_PID30 (0x1u << 30) /**< \brief (PMC_PCSR0) Peripheral Clock 30 Status */
+#define PMC_PCSR0_PID31 (0x1u << 31) /**< \brief (PMC_PCSR0) Peripheral Clock 31 Status */
+/* -------- CKGR_UCKR : (PMC Offset: 0x001C) UTMI Clock Register -------- */
+#define CKGR_UCKR_UPLLEN (0x1u << 16) /**< \brief (CKGR_UCKR) UTMI PLL Enable */
+#define CKGR_UCKR_UPLLCOUNT_Pos 20
+#define CKGR_UCKR_UPLLCOUNT_Msk (0xfu << CKGR_UCKR_UPLLCOUNT_Pos) /**< \brief (CKGR_UCKR) UTMI PLL Start-up Time */
+#define CKGR_UCKR_UPLLCOUNT(value) ((CKGR_UCKR_UPLLCOUNT_Msk & ((value) << CKGR_UCKR_UPLLCOUNT_Pos)))
+/* -------- CKGR_MOR : (PMC Offset: 0x0020) Main Oscillator Register -------- */
+#define CKGR_MOR_MOSCXTEN (0x1u << 0) /**< \brief (CKGR_MOR) Main Crystal Oscillator Enable */
+#define CKGR_MOR_MOSCXTBY (0x1u << 1) /**< \brief (CKGR_MOR) Main Crystal Oscillator Bypass */
+#define CKGR_MOR_WAITMODE (0x1u << 2) /**< \brief (CKGR_MOR) Wait Mode Command */
+#define CKGR_MOR_MOSCRCEN (0x1u << 3) /**< \brief (CKGR_MOR) Main On-Chip RC Oscillator Enable */
+#define CKGR_MOR_MOSCRCF_Pos 4
+#define CKGR_MOR_MOSCRCF_Msk (0x7u << CKGR_MOR_MOSCRCF_Pos) /**< \brief (CKGR_MOR) Main On-Chip RC Oscillator Frequency Selection */
+#define CKGR_MOR_MOSCRCF_4MHz (0x0u << 4) /**< \brief (CKGR_MOR) The Fast RC Oscillator Frequency is at 4 MHz (default) */
+#define CKGR_MOR_MOSCRCF_8MHz (0x1u << 4) /**< \brief (CKGR_MOR) The Fast RC Oscillator Frequency is at 8 MHz */
+#define CKGR_MOR_MOSCRCF_12MHz (0x2u << 4) /**< \brief (CKGR_MOR) The Fast RC Oscillator Frequency is at 12 MHz */
+#define CKGR_MOR_MOSCXTST_Pos 8
+#define CKGR_MOR_MOSCXTST_Msk (0xffu << CKGR_MOR_MOSCXTST_Pos) /**< \brief (CKGR_MOR) Main Crystal Oscillator Start-up Time */
+#define CKGR_MOR_MOSCXTST(value) ((CKGR_MOR_MOSCXTST_Msk & ((value) << CKGR_MOR_MOSCXTST_Pos)))
+#define CKGR_MOR_KEY_Pos 16
+#define CKGR_MOR_KEY_Msk (0xffu << CKGR_MOR_KEY_Pos) /**< \brief (CKGR_MOR) Password */
+#define CKGR_MOR_KEY(value) ((CKGR_MOR_KEY_Msk & ((value) << CKGR_MOR_KEY_Pos)))
+#define CKGR_MOR_MOSCSEL (0x1u << 24) /**< \brief (CKGR_MOR) Main Oscillator Selection */
+#define CKGR_MOR_CFDEN (0x1u << 25) /**< \brief (CKGR_MOR) Clock Failure Detector Enable */
+/* -------- CKGR_MCFR : (PMC Offset: 0x0024) Main Clock Frequency Register -------- */
+#define CKGR_MCFR_MAINF_Pos 0
+#define CKGR_MCFR_MAINF_Msk (0xffffu << CKGR_MCFR_MAINF_Pos) /**< \brief (CKGR_MCFR) Main Clock Frequency */
+#define CKGR_MCFR_MAINFRDY (0x1u << 16) /**< \brief (CKGR_MCFR) Main Clock Ready */
+/* -------- CKGR_PLLAR : (PMC Offset: 0x0028) PLLA Register -------- */
+#define CKGR_PLLAR_DIVA_Pos 0
+#define CKGR_PLLAR_DIVA_Msk (0xffu << CKGR_PLLAR_DIVA_Pos) /**< \brief (CKGR_PLLAR) Divider */
+#define CKGR_PLLAR_DIVA(value) ((CKGR_PLLAR_DIVA_Msk & ((value) << CKGR_PLLAR_DIVA_Pos)))
+#define CKGR_PLLAR_PLLACOUNT_Pos 8
+#define CKGR_PLLAR_PLLACOUNT_Msk (0x3fu << CKGR_PLLAR_PLLACOUNT_Pos) /**< \brief (CKGR_PLLAR) PLLA Counter */
+#define CKGR_PLLAR_PLLACOUNT(value) ((CKGR_PLLAR_PLLACOUNT_Msk & ((value) << CKGR_PLLAR_PLLACOUNT_Pos)))
+#define CKGR_PLLAR_MULA_Pos 16
+#define CKGR_PLLAR_MULA_Msk (0x7ffu << CKGR_PLLAR_MULA_Pos) /**< \brief (CKGR_PLLAR) PLLA Multiplier */
+#define CKGR_PLLAR_MULA(value) ((CKGR_PLLAR_MULA_Msk & ((value) << CKGR_PLLAR_MULA_Pos)))
+#define CKGR_PLLAR_STUCKTO1 (0x1u << 29) /**< \brief (CKGR_PLLAR) */
+/* -------- PMC_MCKR : (PMC Offset: 0x0030) Master Clock Register -------- */
+#define PMC_MCKR_CSS_Pos 0
+#define PMC_MCKR_CSS_Msk (0x3u << PMC_MCKR_CSS_Pos) /**< \brief (PMC_MCKR) Master Clock Source Selection */
+#define PMC_MCKR_CSS_SLOW_CLK (0x0u << 0) /**< \brief (PMC_MCKR) Slow Clock is selected */
+#define PMC_MCKR_CSS_MAIN_CLK (0x1u << 0) /**< \brief (PMC_MCKR) Main Clock is selected */
+#define PMC_MCKR_CSS_PLLA_CLK (0x2u << 0) /**< \brief (PMC_MCKR) PLLA Clock is selected */
+#define PMC_MCKR_CSS_UPLL_CLK (0x3u << 0) /**< \brief (PMC_MCKR) UPLL/2 Clock is selected */
+#define PMC_MCKR_PRES_Pos 4
+#define PMC_MCKR_PRES_Msk (0x7u << PMC_MCKR_PRES_Pos) /**< \brief (PMC_MCKR) Processor Clock Prescaler */
+#define PMC_MCKR_PRES_CLK_1 (0x0u << 4) /**< \brief (PMC_MCKR) Selected clock */
+#define PMC_MCKR_PRES_CLK_2 (0x1u << 4) /**< \brief (PMC_MCKR) Selected clock divided by 2 */
+#define PMC_MCKR_PRES_CLK_4 (0x2u << 4) /**< \brief (PMC_MCKR) Selected clock divided by 4 */
+#define PMC_MCKR_PRES_CLK_8 (0x3u << 4) /**< \brief (PMC_MCKR) Selected clock divided by 8 */
+#define PMC_MCKR_PRES_CLK_16 (0x4u << 4) /**< \brief (PMC_MCKR) Selected clock divided by 16 */
+#define PMC_MCKR_PRES_CLK_32 (0x5u << 4) /**< \brief (PMC_MCKR) Selected clock divided by 32 */
+#define PMC_MCKR_PRES_CLK_64 (0x6u << 4) /**< \brief (PMC_MCKR) Selected clock divided by 64 */
+#define PMC_MCKR_PRES_CLK_3 (0x7u << 4) /**< \brief (PMC_MCKR) Selected clock divided by 3 */
+#define PMC_MCKR_UPLLDIV (0x1u << 13) /**< \brief (PMC_MCKR) UPLL Divider */
+/* -------- PMC_USB : (PMC Offset: 0x0038) USB Clock Register -------- */
+#define PMC_USB_USBS (0x1u << 0) /**< \brief (PMC_USB) USB Input Clock Selection */
+#define PMC_USB_USBDIV_Pos 8
+#define PMC_USB_USBDIV_Msk (0xfu << PMC_USB_USBDIV_Pos) /**< \brief (PMC_USB) Divider for USB Clock. */
+#define PMC_USB_USBDIV(value) ((PMC_USB_USBDIV_Msk & ((value) << PMC_USB_USBDIV_Pos)))
+/* -------- PMC_PCK[3] : (PMC Offset: 0x0040) Programmable Clock 0 Register -------- */
+#define PMC_PCK_CSS_Pos 0
+#define PMC_PCK_CSS_Msk (0x7u << PMC_PCK_CSS_Pos) /**< \brief (PMC_PCK[3]) Master Clock Source Selection */
+#define PMC_PCK_CSS_SLOW_CLK (0x0u << 0) /**< \brief (PMC_PCK[3]) Slow Clock is selected */
+#define PMC_PCK_CSS_MAIN_CLK (0x1u << 0) /**< \brief (PMC_PCK[3]) Main Clock is selected */
+#define PMC_PCK_CSS_PLLA_CLK (0x2u << 0) /**< \brief (PMC_PCK[3]) PLLA Clock is selected */
+#define PMC_PCK_CSS_UPLL_CLK (0x3u << 0) /**< \brief (PMC_PCK[3]) UPLL/2 Clock is selected */
+#define PMC_PCK_CSS_MCK (0x4u << 0) /**< \brief (PMC_PCK[3]) Master Clock is selected */
+#define PMC_PCK_PRES_Pos 4
+#define PMC_PCK_PRES_Msk (0x7u << PMC_PCK_PRES_Pos) /**< \brief (PMC_PCK[3]) Programmable Clock Prescaler */
+#define PMC_PCK_PRES_CLK_1 (0x0u << 4) /**< \brief (PMC_PCK[3]) Selected clock */
+#define PMC_PCK_PRES_CLK_2 (0x1u << 4) /**< \brief (PMC_PCK[3]) Selected clock divided by 2 */
+#define PMC_PCK_PRES_CLK_4 (0x2u << 4) /**< \brief (PMC_PCK[3]) Selected clock divided by 4 */
+#define PMC_PCK_PRES_CLK_8 (0x3u << 4) /**< \brief (PMC_PCK[3]) Selected clock divided by 8 */
+#define PMC_PCK_PRES_CLK_16 (0x4u << 4) /**< \brief (PMC_PCK[3]) Selected clock divided by 16 */
+#define PMC_PCK_PRES_CLK_32 (0x5u << 4) /**< \brief (PMC_PCK[3]) Selected clock divided by 32 */
+#define PMC_PCK_PRES_CLK_64 (0x6u << 4) /**< \brief (PMC_PCK[3]) Selected clock divided by 64 */
+/* -------- PMC_IER : (PMC Offset: 0x0060) Interrupt Enable Register -------- */
+#define PMC_IER_MOSCXTS (0x1u << 0) /**< \brief (PMC_IER) Main Crystal Oscillator Status Interrupt Enable */
+#define PMC_IER_LOCKA (0x1u << 1) /**< \brief (PMC_IER) PLL A Lock Interrupt Enable */
+#define PMC_IER_MCKRDY (0x1u << 3) /**< \brief (PMC_IER) Master Clock Ready Interrupt Enable */
+#define PMC_IER_LOCKU (0x1u << 6) /**< \brief (PMC_IER) UTMI PLL Lock Interrupt Enable */
+#define PMC_IER_PCKRDY0 (0x1u << 8) /**< \brief (PMC_IER) Programmable Clock Ready 0 Interrupt Enable */
+#define PMC_IER_PCKRDY1 (0x1u << 9) /**< \brief (PMC_IER) Programmable Clock Ready 1 Interrupt Enable */
+#define PMC_IER_PCKRDY2 (0x1u << 10) /**< \brief (PMC_IER) Programmable Clock Ready 2 Interrupt Enable */
+#define PMC_IER_MOSCSELS (0x1u << 16) /**< \brief (PMC_IER) Main Oscillator Selection Status Interrupt Enable */
+#define PMC_IER_MOSCRCS (0x1u << 17) /**< \brief (PMC_IER) Main On-Chip RC Status Interrupt Enable */
+#define PMC_IER_CFDEV (0x1u << 18) /**< \brief (PMC_IER) Clock Failure Detector Event Interrupt Enable */
+/* -------- PMC_IDR : (PMC Offset: 0x0064) Interrupt Disable Register -------- */
+#define PMC_IDR_MOSCXTS (0x1u << 0) /**< \brief (PMC_IDR) Main Crystal Oscillator Status Interrupt Disable */
+#define PMC_IDR_LOCKA (0x1u << 1) /**< \brief (PMC_IDR) PLL A Lock Interrupt Disable */
+#define PMC_IDR_MCKRDY (0x1u << 3) /**< \brief (PMC_IDR) Master Clock Ready Interrupt Disable */
+#define PMC_IDR_LOCKU (0x1u << 6) /**< \brief (PMC_IDR) UTMI PLL Lock Interrupt Disable */
+#define PMC_IDR_PCKRDY0 (0x1u << 8) /**< \brief (PMC_IDR) Programmable Clock Ready 0 Interrupt Disable */
+#define PMC_IDR_PCKRDY1 (0x1u << 9) /**< \brief (PMC_IDR) Programmable Clock Ready 1 Interrupt Disable */
+#define PMC_IDR_PCKRDY2 (0x1u << 10) /**< \brief (PMC_IDR) Programmable Clock Ready 2 Interrupt Disable */
+#define PMC_IDR_MOSCSELS (0x1u << 16) /**< \brief (PMC_IDR) Main Oscillator Selection Status Interrupt Disable */
+#define PMC_IDR_MOSCRCS (0x1u << 17) /**< \brief (PMC_IDR) Main On-Chip RC Status Interrupt Disable */
+#define PMC_IDR_CFDEV (0x1u << 18) /**< \brief (PMC_IDR) Clock Failure Detector Event Interrupt Disable */
+/* -------- PMC_SR : (PMC Offset: 0x0068) Status Register -------- */
+#define PMC_SR_MOSCXTS (0x1u << 0) /**< \brief (PMC_SR) Main XTAL Oscillator Status */
+#define PMC_SR_LOCKA (0x1u << 1) /**< \brief (PMC_SR) PLL A Lock Status */
+#define PMC_SR_MCKRDY (0x1u << 3) /**< \brief (PMC_SR) Master Clock Status */
+#define PMC_SR_LOCKU (0x1u << 6) /**< \brief (PMC_SR) UTMI PLL Lock Status */
+#define PMC_SR_OSCSELS (0x1u << 7) /**< \brief (PMC_SR) Slow Clock Oscillator Selection */
+#define PMC_SR_PCKRDY0 (0x1u << 8) /**< \brief (PMC_SR) Programmable Clock Ready Status */
+#define PMC_SR_PCKRDY1 (0x1u << 9) /**< \brief (PMC_SR) Programmable Clock Ready Status */
+#define PMC_SR_PCKRDY2 (0x1u << 10) /**< \brief (PMC_SR) Programmable Clock Ready Status */
+#define PMC_SR_MOSCSELS (0x1u << 16) /**< \brief (PMC_SR) Main Oscillator Selection Status */
+#define PMC_SR_MOSCRCS (0x1u << 17) /**< \brief (PMC_SR) Main On-Chip RC Oscillator Status */
+#define PMC_SR_CFDEV (0x1u << 18) /**< \brief (PMC_SR) Clock Failure Detector Event */
+#define PMC_SR_CFDS (0x1u << 19) /**< \brief (PMC_SR) Clock Failure Detector Status */
+#define PMC_SR_FOS (0x1u << 20) /**< \brief (PMC_SR) Clock Failure Detector Fault Output Status */
+/* -------- PMC_IMR : (PMC Offset: 0x006C) Interrupt Mask Register -------- */
+#define PMC_IMR_MOSCXTS (0x1u << 0) /**< \brief (PMC_IMR) Main Crystal Oscillator Status Interrupt Mask */
+#define PMC_IMR_LOCKA (0x1u << 1) /**< \brief (PMC_IMR) PLL A Lock Interrupt Mask */
+#define PMC_IMR_MCKRDY (0x1u << 3) /**< \brief (PMC_IMR) Master Clock Ready Interrupt Mask */
+#define PMC_IMR_LOCKU (0x1u << 6) /**< \brief (PMC_IMR) UTMI PLL Lock Interrupt Mask */
+#define PMC_IMR_PCKRDY0 (0x1u << 8) /**< \brief (PMC_IMR) Programmable Clock Ready 0 Interrupt Mask */
+#define PMC_IMR_PCKRDY1 (0x1u << 9) /**< \brief (PMC_IMR) Programmable Clock Ready 1 Interrupt Mask */
+#define PMC_IMR_PCKRDY2 (0x1u << 10) /**< \brief (PMC_IMR) Programmable Clock Ready 2 Interrupt Mask */
+#define PMC_IMR_MOSCSELS (0x1u << 16) /**< \brief (PMC_IMR) Main Oscillator Selection Status Interrupt Mask */
+#define PMC_IMR_MOSCRCS (0x1u << 17) /**< \brief (PMC_IMR) Main On-Chip RC Status Interrupt Mask */
+#define PMC_IMR_CFDEV (0x1u << 18) /**< \brief (PMC_IMR) Clock Failure Detector Event Interrupt Mask */
+/* -------- PMC_FSMR : (PMC Offset: 0x0070) Fast Startup Mode Register -------- */
+#define PMC_FSMR_FSTT0 (0x1u << 0) /**< \brief (PMC_FSMR) Fast Startup Input Enable 0 */
+#define PMC_FSMR_FSTT1 (0x1u << 1) /**< \brief (PMC_FSMR) Fast Startup Input Enable 1 */
+#define PMC_FSMR_FSTT2 (0x1u << 2) /**< \brief (PMC_FSMR) Fast Startup Input Enable 2 */
+#define PMC_FSMR_FSTT3 (0x1u << 3) /**< \brief (PMC_FSMR) Fast Startup Input Enable 3 */
+#define PMC_FSMR_FSTT4 (0x1u << 4) /**< \brief (PMC_FSMR) Fast Startup Input Enable 4 */
+#define PMC_FSMR_FSTT5 (0x1u << 5) /**< \brief (PMC_FSMR) Fast Startup Input Enable 5 */
+#define PMC_FSMR_FSTT6 (0x1u << 6) /**< \brief (PMC_FSMR) Fast Startup Input Enable 6 */
+#define PMC_FSMR_FSTT7 (0x1u << 7) /**< \brief (PMC_FSMR) Fast Startup Input Enable 7 */
+#define PMC_FSMR_FSTT8 (0x1u << 8) /**< \brief (PMC_FSMR) Fast Startup Input Enable 8 */
+#define PMC_FSMR_FSTT9 (0x1u << 9) /**< \brief (PMC_FSMR) Fast Startup Input Enable 9 */
+#define PMC_FSMR_FSTT10 (0x1u << 10) /**< \brief (PMC_FSMR) Fast Startup Input Enable 10 */
+#define PMC_FSMR_FSTT11 (0x1u << 11) /**< \brief (PMC_FSMR) Fast Startup Input Enable 11 */
+#define PMC_FSMR_FSTT12 (0x1u << 12) /**< \brief (PMC_FSMR) Fast Startup Input Enable 12 */
+#define PMC_FSMR_FSTT13 (0x1u << 13) /**< \brief (PMC_FSMR) Fast Startup Input Enable 13 */
+#define PMC_FSMR_FSTT14 (0x1u << 14) /**< \brief (PMC_FSMR) Fast Startup Input Enable 14 */
+#define PMC_FSMR_FSTT15 (0x1u << 15) /**< \brief (PMC_FSMR) Fast Startup Input Enable 15 */
+#define PMC_FSMR_RTTAL (0x1u << 16) /**< \brief (PMC_FSMR) RTT Alarm Enable */
+#define PMC_FSMR_RTCAL (0x1u << 17) /**< \brief (PMC_FSMR) RTC Alarm Enable */
+#define PMC_FSMR_USBAL (0x1u << 18) /**< \brief (PMC_FSMR) USB Alarm Enable */
+#define PMC_FSMR_LPM (0x1u << 20) /**< \brief (PMC_FSMR) Low Power Mode */
+/* -------- PMC_FSPR : (PMC Offset: 0x0074) Fast Startup Polarity Register -------- */
+#define PMC_FSPR_FSTP0 (0x1u << 0) /**< \brief (PMC_FSPR) */
+#define PMC_FSPR_FSTP1 (0x1u << 1) /**< \brief (PMC_FSPR) */
+#define PMC_FSPR_FSTP2 (0x1u << 2) /**< \brief (PMC_FSPR) */
+#define PMC_FSPR_FSTP3 (0x1u << 3) /**< \brief (PMC_FSPR) */
+#define PMC_FSPR_FSTP4 (0x1u << 4) /**< \brief (PMC_FSPR) */
+#define PMC_FSPR_FSTP5 (0x1u << 5) /**< \brief (PMC_FSPR) */
+#define PMC_FSPR_FSTP6 (0x1u << 6) /**< \brief (PMC_FSPR) */
+#define PMC_FSPR_FSTP7 (0x1u << 7) /**< \brief (PMC_FSPR) */
+#define PMC_FSPR_FSTP8 (0x1u << 8) /**< \brief (PMC_FSPR) */
+#define PMC_FSPR_FSTP9 (0x1u << 9) /**< \brief (PMC_FSPR) */
+#define PMC_FSPR_FSTP10 (0x1u << 10) /**< \brief (PMC_FSPR) */
+#define PMC_FSPR_FSTP11 (0x1u << 11) /**< \brief (PMC_FSPR) */
+#define PMC_FSPR_FSTP12 (0x1u << 12) /**< \brief (PMC_FSPR) */
+#define PMC_FSPR_FSTP13 (0x1u << 13) /**< \brief (PMC_FSPR) */
+#define PMC_FSPR_FSTP14 (0x1u << 14) /**< \brief (PMC_FSPR) */
+#define PMC_FSPR_FSTP15 (0x1u << 15) /**< \brief (PMC_FSPR) */
+/* -------- PMC_FOCR : (PMC Offset: 0x0078) Fault Output Clear Register -------- */
+#define PMC_FOCR_FOCLR (0x1u << 0) /**< \brief (PMC_FOCR) Fault Output Clear */
+/* -------- PMC_WPMR : (PMC Offset: 0x00E4) Write Protect Mode Register -------- */
+#define PMC_WPMR_WPEN (0x1u << 0) /**< \brief (PMC_WPMR) Write Protect Enable */
+#define PMC_WPMR_WPKEY_Pos 8
+#define PMC_WPMR_WPKEY_Msk (0xffffffu << PMC_WPMR_WPKEY_Pos) /**< \brief (PMC_WPMR) Write Protect KEY */
+#define PMC_WPMR_WPKEY(value) ((PMC_WPMR_WPKEY_Msk & ((value) << PMC_WPMR_WPKEY_Pos)))
+/* -------- PMC_WPSR : (PMC Offset: 0x00E8) Write Protect Status Register -------- */
+#define PMC_WPSR_WPVS (0x1u << 0) /**< \brief (PMC_WPSR) Write Protect Violation Status */
+#define PMC_WPSR_WPVSRC_Pos 8
+#define PMC_WPSR_WPVSRC_Msk (0xffffu << PMC_WPSR_WPVSRC_Pos) /**< \brief (PMC_WPSR) Write Protect Violation Source */
+/* -------- PMC_PCER1 : (PMC Offset: 0x0100) Peripheral Clock Enable Register 1 -------- */
+#define PMC_PCER1_PID32 (0x1u << 0) /**< \brief (PMC_PCER1) Peripheral Clock 32 Enable */
+#define PMC_PCER1_PID33 (0x1u << 1) /**< \brief (PMC_PCER1) Peripheral Clock 33 Enable */
+#define PMC_PCER1_PID34 (0x1u << 2) /**< \brief (PMC_PCER1) Peripheral Clock 34 Enable */
+#define PMC_PCER1_PID35 (0x1u << 3) /**< \brief (PMC_PCER1) Peripheral Clock 35 Enable */
+#define PMC_PCER1_PID36 (0x1u << 4) /**< \brief (PMC_PCER1) Peripheral Clock 36 Enable */
+#define PMC_PCER1_PID37 (0x1u << 5) /**< \brief (PMC_PCER1) Peripheral Clock 37 Enable */
+#define PMC_PCER1_PID38 (0x1u << 6) /**< \brief (PMC_PCER1) Peripheral Clock 38 Enable */
+#define PMC_PCER1_PID39 (0x1u << 7) /**< \brief (PMC_PCER1) Peripheral Clock 39 Enable */
+#define PMC_PCER1_PID40 (0x1u << 8) /**< \brief (PMC_PCER1) Peripheral Clock 40 Enable */
+#define PMC_PCER1_PID41 (0x1u << 9) /**< \brief (PMC_PCER1) Peripheral Clock 41 Enable */
+#define PMC_PCER1_PID42 (0x1u << 10) /**< \brief (PMC_PCER1) Peripheral Clock 42 Enable */
+#define PMC_PCER1_PID43 (0x1u << 11) /**< \brief (PMC_PCER1) Peripheral Clock 43 Enable */
+#define PMC_PCER1_PID44 (0x1u << 12) /**< \brief (PMC_PCER1) Peripheral Clock 44 Enable */
+/* -------- PMC_PCDR1 : (PMC Offset: 0x0104) Peripheral Clock Disable Register 1 -------- */
+#define PMC_PCDR1_PID32 (0x1u << 0) /**< \brief (PMC_PCDR1) Peripheral Clock 32 Disable */
+#define PMC_PCDR1_PID33 (0x1u << 1) /**< \brief (PMC_PCDR1) Peripheral Clock 33 Disable */
+#define PMC_PCDR1_PID34 (0x1u << 2) /**< \brief (PMC_PCDR1) Peripheral Clock 34 Disable */
+#define PMC_PCDR1_PID35 (0x1u << 3) /**< \brief (PMC_PCDR1) Peripheral Clock 35 Disable */
+#define PMC_PCDR1_PID36 (0x1u << 4) /**< \brief (PMC_PCDR1) Peripheral Clock 36 Disable */
+#define PMC_PCDR1_PID37 (0x1u << 5) /**< \brief (PMC_PCDR1) Peripheral Clock 37 Disable */
+#define PMC_PCDR1_PID38 (0x1u << 6) /**< \brief (PMC_PCDR1) Peripheral Clock 38 Disable */
+#define PMC_PCDR1_PID39 (0x1u << 7) /**< \brief (PMC_PCDR1) Peripheral Clock 39 Disable */
+#define PMC_PCDR1_PID40 (0x1u << 8) /**< \brief (PMC_PCDR1) Peripheral Clock 40 Disable */
+#define PMC_PCDR1_PID41 (0x1u << 9) /**< \brief (PMC_PCDR1) Peripheral Clock 41 Disable */
+#define PMC_PCDR1_PID42 (0x1u << 10) /**< \brief (PMC_PCDR1) Peripheral Clock 42 Disable */
+#define PMC_PCDR1_PID43 (0x1u << 11) /**< \brief (PMC_PCDR1) Peripheral Clock 43 Disable */
+#define PMC_PCDR1_PID44 (0x1u << 12) /**< \brief (PMC_PCDR1) Peripheral Clock 44 Disable */
+/* -------- PMC_PCSR1 : (PMC Offset: 0x0108) Peripheral Clock Status Register 1 -------- */
+#define PMC_PCSR1_PID32 (0x1u << 0) /**< \brief (PMC_PCSR1) Peripheral Clock 32 Status */
+#define PMC_PCSR1_PID33 (0x1u << 1) /**< \brief (PMC_PCSR1) Peripheral Clock 33 Status */
+#define PMC_PCSR1_PID34 (0x1u << 2) /**< \brief (PMC_PCSR1) Peripheral Clock 34 Status */
+#define PMC_PCSR1_PID35 (0x1u << 3) /**< \brief (PMC_PCSR1) Peripheral Clock 35 Status */
+#define PMC_PCSR1_PID36 (0x1u << 4) /**< \brief (PMC_PCSR1) Peripheral Clock 36 Status */
+#define PMC_PCSR1_PID37 (0x1u << 5) /**< \brief (PMC_PCSR1) Peripheral Clock 37 Status */
+#define PMC_PCSR1_PID38 (0x1u << 6) /**< \brief (PMC_PCSR1) Peripheral Clock 38 Status */
+#define PMC_PCSR1_PID39 (0x1u << 7) /**< \brief (PMC_PCSR1) Peripheral Clock 39 Status */
+#define PMC_PCSR1_PID40 (0x1u << 8) /**< \brief (PMC_PCSR1) Peripheral Clock 40 Status */
+#define PMC_PCSR1_PID41 (0x1u << 9) /**< \brief (PMC_PCSR1) Peripheral Clock 41 Status */
+#define PMC_PCSR1_PID42 (0x1u << 10) /**< \brief (PMC_PCSR1) Peripheral Clock 42 Status */
+#define PMC_PCSR1_PID43 (0x1u << 11) /**< \brief (PMC_PCSR1) Peripheral Clock 43 Status */
+#define PMC_PCSR1_PID44 (0x1u << 12) /**< \brief (PMC_PCSR1) Peripheral Clock 44 Status */
+/* -------- PMC_PCR : (PMC Offset: 0x010C) Peripheral Control Register -------- */
+#define PMC_PCR_PID_Pos 0
+#define PMC_PCR_PID_Msk (0x3fu << PMC_PCR_PID_Pos) /**< \brief (PMC_PCR) Peripheral ID */
+#define PMC_PCR_PID(value) ((PMC_PCR_PID_Msk & ((value) << PMC_PCR_PID_Pos)))
+#define PMC_PCR_CMD (0x1u << 12) /**< \brief (PMC_PCR) Command */
+#define PMC_PCR_DIV_Pos 16
+#define PMC_PCR_DIV_Msk (0x3u << PMC_PCR_DIV_Pos) /**< \brief (PMC_PCR) Divisor Value */
+#define PMC_PCR_DIV_PERIPH_DIV_MCK (0x0u << 16) /**< \brief (PMC_PCR) Peripheral clock is MCK */
+#define PMC_PCR_DIV_PERIPH_DIV2_MCK (0x1u << 16) /**< \brief (PMC_PCR) Peripheral clock is MCK/2 */
+#define PMC_PCR_DIV_PERIPH_DIV4_MCK (0x2u << 16) /**< \brief (PMC_PCR) Peripheral clock is MCK/4 */
+#define PMC_PCR_EN (0x1u << 28) /**< \brief (PMC_PCR) Enable */
+
+/*@}*/
+
+/* ============================================================================= */
+/** SOFTWARE API DEFINITION FOR Pulse Width Modulation Controller */
+/* ============================================================================= */
+/** \addtogroup SAM3XA_PWM Pulse Width Modulation Controller */
+/*@{*/
+
+#ifndef __ASSEMBLY__
+/** \brief PwmCh_num hardware registers */
+typedef struct {
+ RwReg PWM_CMR; /**< \brief (PwmCh_num Offset: 0x0) PWM Channel Mode Register */
+ RwReg PWM_CDTY; /**< \brief (PwmCh_num Offset: 0x4) PWM Channel Duty Cycle Register */
+ RwReg PWM_CDTYUPD; /**< \brief (PwmCh_num Offset: 0x8) PWM Channel Duty Cycle Update Register */
+ RwReg PWM_CPRD; /**< \brief (PwmCh_num Offset: 0xC) PWM Channel Period Register */
+ RwReg PWM_CPRDUPD; /**< \brief (PwmCh_num Offset: 0x10) PWM Channel Period Update Register */
+ RwReg PWM_CCNT; /**< \brief (PwmCh_num Offset: 0x14) PWM Channel Counter Register */
+ RwReg PWM_DT; /**< \brief (PwmCh_num Offset: 0x18) PWM Channel Dead Time Register */
+ RwReg PWM_DTUPD; /**< \brief (PwmCh_num Offset: 0x1C) PWM Channel Dead Time Update Register */
+} PwmCh_num;
+/** \brief PwmCmp hardware registers */
+typedef struct {
+ RwReg PWM_CMPV; /**< \brief (PwmCmp Offset: 0x0) PWM Comparison 0 Value Register */
+ RwReg PWM_CMPVUPD; /**< \brief (PwmCmp Offset: 0x4) PWM Comparison 0 Value Update Register */
+ RwReg PWM_CMPM; /**< \brief (PwmCmp Offset: 0x8) PWM Comparison 0 Mode Register */
+ RwReg PWM_CMPMUPD; /**< \brief (PwmCmp Offset: 0xC) PWM Comparison 0 Mode Update Register */
+} PwmCmp;
+/** \brief Pwm hardware registers */
+#define PWMCMP_NUMBER 8
+#define PWMCH_NUM_NUMBER 8
+typedef struct {
+ RwReg PWM_CLK; /**< \brief (Pwm Offset: 0x00) PWM Clock Register */
+ WoReg PWM_ENA; /**< \brief (Pwm Offset: 0x04) PWM Enable Register */
+ WoReg PWM_DIS; /**< \brief (Pwm Offset: 0x08) PWM Disable Register */
+ RoReg PWM_SR; /**< \brief (Pwm Offset: 0x0C) PWM Status Register */
+ WoReg PWM_IER1; /**< \brief (Pwm Offset: 0x10) PWM Interrupt Enable Register 1 */
+ WoReg PWM_IDR1; /**< \brief (Pwm Offset: 0x14) PWM Interrupt Disable Register 1 */
+ RoReg PWM_IMR1; /**< \brief (Pwm Offset: 0x18) PWM Interrupt Mask Register 1 */
+ RoReg PWM_ISR1; /**< \brief (Pwm Offset: 0x1C) PWM Interrupt Status Register 1 */
+ RwReg PWM_SCM; /**< \brief (Pwm Offset: 0x20) PWM Sync Channels Mode Register */
+ RoReg Reserved1[1];
+ RwReg PWM_SCUC; /**< \brief (Pwm Offset: 0x28) PWM Sync Channels Update Control Register */
+ RwReg PWM_SCUP; /**< \brief (Pwm Offset: 0x2C) PWM Sync Channels Update Period Register */
+ WoReg PWM_SCUPUPD; /**< \brief (Pwm Offset: 0x30) PWM Sync Channels Update Period Update Register */
+ WoReg PWM_IER2; /**< \brief (Pwm Offset: 0x34) PWM Interrupt Enable Register 2 */
+ WoReg PWM_IDR2; /**< \brief (Pwm Offset: 0x38) PWM Interrupt Disable Register 2 */
+ RoReg PWM_IMR2; /**< \brief (Pwm Offset: 0x3C) PWM Interrupt Mask Register 2 */
+ RoReg PWM_ISR2; /**< \brief (Pwm Offset: 0x40) PWM Interrupt Status Register 2 */
+ RwReg PWM_OOV; /**< \brief (Pwm Offset: 0x44) PWM Output Override Value Register */
+ RwReg PWM_OS; /**< \brief (Pwm Offset: 0x48) PWM Output Selection Register */
+ WoReg PWM_OSS; /**< \brief (Pwm Offset: 0x4C) PWM Output Selection Set Register */
+ WoReg PWM_OSC; /**< \brief (Pwm Offset: 0x50) PWM Output Selection Clear Register */
+ WoReg PWM_OSSUPD; /**< \brief (Pwm Offset: 0x54) PWM Output Selection Set Update Register */
+ WoReg PWM_OSCUPD; /**< \brief (Pwm Offset: 0x58) PWM Output Selection Clear Update Register */
+ RwReg PWM_FMR; /**< \brief (Pwm Offset: 0x5C) PWM Fault Mode Register */
+ RoReg PWM_FSR; /**< \brief (Pwm Offset: 0x60) PWM Fault Status Register */
+ WoReg PWM_FCR; /**< \brief (Pwm Offset: 0x64) PWM Fault Clear Register */
+ RwReg PWM_FPV; /**< \brief (Pwm Offset: 0x68) PWM Fault Protection Value Register */
+ RwReg PWM_FPE1; /**< \brief (Pwm Offset: 0x6C) PWM Fault Protection Enable Register 1 */
+ RwReg PWM_FPE2; /**< \brief (Pwm Offset: 0x70) PWM Fault Protection Enable Register 2 */
+ RoReg Reserved2[2];
+ RwReg PWM_ELMR[2]; /**< \brief (Pwm Offset: 0x7C) PWM Event Line 0 Mode Register */
+ RoReg Reserved3[11];
+ RwReg PWM_SMMR; /**< \brief (Pwm Offset: 0xB0) PWM Stepper Motor Mode Register */
+ RoReg Reserved4[12];
+ WoReg PWM_WPCR; /**< \brief (Pwm Offset: 0xE4) PWM Write Protect Control Register */
+ RoReg PWM_WPSR; /**< \brief (Pwm Offset: 0xE8) PWM Write Protect Status Register */
+ RoReg Reserved5[5];
+ RwReg PWM_RPR; /**< \brief (Pwm Offset: 0x100) Receive Pointer Register */
+ RwReg PWM_RCR; /**< \brief (Pwm Offset: 0x104) Receive Counter Register */
+ RwReg PWM_TPR; /**< \brief (Pwm Offset: 0x108) Transmit Pointer Register */
+ RwReg PWM_TCR; /**< \brief (Pwm Offset: 0x10C) Transmit Counter Register */
+ RwReg PWM_RNPR; /**< \brief (Pwm Offset: 0x110) Receive Next Pointer Register */
+ RwReg PWM_RNCR; /**< \brief (Pwm Offset: 0x114) Receive Next Counter Register */
+ RwReg PWM_TNPR; /**< \brief (Pwm Offset: 0x118) Transmit Next Pointer Register */
+ RwReg PWM_TNCR; /**< \brief (Pwm Offset: 0x11C) Transmit Next Counter Register */
+ WoReg PWM_PTCR; /**< \brief (Pwm Offset: 0x120) Transfer Control Register */
+ RoReg PWM_PTSR; /**< \brief (Pwm Offset: 0x124) Transfer Status Register */
+ RoReg Reserved6[2];
+ PwmCmp PWM_CMP[PWMCMP_NUMBER]; /**< \brief (Pwm Offset: 0x130) 0 .. 7 */
+ RoReg Reserved7[20];
+ PwmCh_num PWM_CH_NUM[PWMCH_NUM_NUMBER]; /**< \brief (Pwm Offset: 0x200) ch_num = 0 .. 7 */
+} Pwm;
+#endif /* __ASSEMBLY__ */
+/* -------- PWM_CLK : (PWM Offset: 0x00) PWM Clock Register -------- */
+#define PWM_CLK_DIVA_Pos 0
+#define PWM_CLK_DIVA_Msk (0xffu << PWM_CLK_DIVA_Pos) /**< \brief (PWM_CLK) CLKA, CLKB Divide Factor */
+#define PWM_CLK_DIVA(value) ((PWM_CLK_DIVA_Msk & ((value) << PWM_CLK_DIVA_Pos)))
+#define PWM_CLK_PREA_Pos 8
+#define PWM_CLK_PREA_Msk (0xfu << PWM_CLK_PREA_Pos) /**< \brief (PWM_CLK) CLKA, CLKB Source Clock Selection */
+#define PWM_CLK_PREA(value) ((PWM_CLK_PREA_Msk & ((value) << PWM_CLK_PREA_Pos)))
+#define PWM_CLK_DIVB_Pos 16
+#define PWM_CLK_DIVB_Msk (0xffu << PWM_CLK_DIVB_Pos) /**< \brief (PWM_CLK) CLKA, CLKB Divide Factor */
+#define PWM_CLK_DIVB(value) ((PWM_CLK_DIVB_Msk & ((value) << PWM_CLK_DIVB_Pos)))
+#define PWM_CLK_PREB_Pos 24
+#define PWM_CLK_PREB_Msk (0xfu << PWM_CLK_PREB_Pos) /**< \brief (PWM_CLK) CLKA, CLKB Source Clock Selection */
+#define PWM_CLK_PREB(value) ((PWM_CLK_PREB_Msk & ((value) << PWM_CLK_PREB_Pos)))
+/* -------- PWM_ENA : (PWM Offset: 0x04) PWM Enable Register -------- */
+#define PWM_ENA_CHID0 (0x1u << 0) /**< \brief (PWM_ENA) Channel ID */
+#define PWM_ENA_CHID1 (0x1u << 1) /**< \brief (PWM_ENA) Channel ID */
+#define PWM_ENA_CHID2 (0x1u << 2) /**< \brief (PWM_ENA) Channel ID */
+#define PWM_ENA_CHID3 (0x1u << 3) /**< \brief (PWM_ENA) Channel ID */
+#define PWM_ENA_CHID4 (0x1u << 4) /**< \brief (PWM_ENA) Channel ID */
+#define PWM_ENA_CHID5 (0x1u << 5) /**< \brief (PWM_ENA) Channel ID */
+#define PWM_ENA_CHID6 (0x1u << 6) /**< \brief (PWM_ENA) Channel ID */
+#define PWM_ENA_CHID7 (0x1u << 7) /**< \brief (PWM_ENA) Channel ID */
+/* -------- PWM_DIS : (PWM Offset: 0x08) PWM Disable Register -------- */
+#define PWM_DIS_CHID0 (0x1u << 0) /**< \brief (PWM_DIS) Channel ID */
+#define PWM_DIS_CHID1 (0x1u << 1) /**< \brief (PWM_DIS) Channel ID */
+#define PWM_DIS_CHID2 (0x1u << 2) /**< \brief (PWM_DIS) Channel ID */
+#define PWM_DIS_CHID3 (0x1u << 3) /**< \brief (PWM_DIS) Channel ID */
+#define PWM_DIS_CHID4 (0x1u << 4) /**< \brief (PWM_DIS) Channel ID */
+#define PWM_DIS_CHID5 (0x1u << 5) /**< \brief (PWM_DIS) Channel ID */
+#define PWM_DIS_CHID6 (0x1u << 6) /**< \brief (PWM_DIS) Channel ID */
+#define PWM_DIS_CHID7 (0x1u << 7) /**< \brief (PWM_DIS) Channel ID */
+/* -------- PWM_SR : (PWM Offset: 0x0C) PWM Status Register -------- */
+#define PWM_SR_CHID0 (0x1u << 0) /**< \brief (PWM_SR) Channel ID */
+#define PWM_SR_CHID1 (0x1u << 1) /**< \brief (PWM_SR) Channel ID */
+#define PWM_SR_CHID2 (0x1u << 2) /**< \brief (PWM_SR) Channel ID */
+#define PWM_SR_CHID3 (0x1u << 3) /**< \brief (PWM_SR) Channel ID */
+#define PWM_SR_CHID4 (0x1u << 4) /**< \brief (PWM_SR) Channel ID */
+#define PWM_SR_CHID5 (0x1u << 5) /**< \brief (PWM_SR) Channel ID */
+#define PWM_SR_CHID6 (0x1u << 6) /**< \brief (PWM_SR) Channel ID */
+#define PWM_SR_CHID7 (0x1u << 7) /**< \brief (PWM_SR) Channel ID */
+/* -------- PWM_IER1 : (PWM Offset: 0x10) PWM Interrupt Enable Register 1 -------- */
+#define PWM_IER1_CHID0 (0x1u << 0) /**< \brief (PWM_IER1) Counter Event on Channel 0 Interrupt Enable */
+#define PWM_IER1_CHID1 (0x1u << 1) /**< \brief (PWM_IER1) Counter Event on Channel 1 Interrupt Enable */
+#define PWM_IER1_CHID2 (0x1u << 2) /**< \brief (PWM_IER1) Counter Event on Channel 2 Interrupt Enable */
+#define PWM_IER1_CHID3 (0x1u << 3) /**< \brief (PWM_IER1) Counter Event on Channel 3 Interrupt Enable */
+#define PWM_IER1_CHID4 (0x1u << 4) /**< \brief (PWM_IER1) Counter Event on Channel 4 Interrupt Enable */
+#define PWM_IER1_CHID5 (0x1u << 5) /**< \brief (PWM_IER1) Counter Event on Channel 5 Interrupt Enable */
+#define PWM_IER1_CHID6 (0x1u << 6) /**< \brief (PWM_IER1) Counter Event on Channel 6 Interrupt Enable */
+#define PWM_IER1_CHID7 (0x1u << 7) /**< \brief (PWM_IER1) Counter Event on Channel 7 Interrupt Enable */
+#define PWM_IER1_FCHID0 (0x1u << 16) /**< \brief (PWM_IER1) Fault Protection Trigger on Channel 0 Interrupt Enable */
+#define PWM_IER1_FCHID1 (0x1u << 17) /**< \brief (PWM_IER1) Fault Protection Trigger on Channel 1 Interrupt Enable */
+#define PWM_IER1_FCHID2 (0x1u << 18) /**< \brief (PWM_IER1) Fault Protection Trigger on Channel 2 Interrupt Enable */
+#define PWM_IER1_FCHID3 (0x1u << 19) /**< \brief (PWM_IER1) Fault Protection Trigger on Channel 3 Interrupt Enable */
+#define PWM_IER1_FCHID4 (0x1u << 20) /**< \brief (PWM_IER1) Fault Protection Trigger on Channel 4 Interrupt Enable */
+#define PWM_IER1_FCHID5 (0x1u << 21) /**< \brief (PWM_IER1) Fault Protection Trigger on Channel 5 Interrupt Enable */
+#define PWM_IER1_FCHID6 (0x1u << 22) /**< \brief (PWM_IER1) Fault Protection Trigger on Channel 6 Interrupt Enable */
+#define PWM_IER1_FCHID7 (0x1u << 23) /**< \brief (PWM_IER1) Fault Protection Trigger on Channel 7 Interrupt Enable */
+/* -------- PWM_IDR1 : (PWM Offset: 0x14) PWM Interrupt Disable Register 1 -------- */
+#define PWM_IDR1_CHID0 (0x1u << 0) /**< \brief (PWM_IDR1) Counter Event on Channel 0 Interrupt Disable */
+#define PWM_IDR1_CHID1 (0x1u << 1) /**< \brief (PWM_IDR1) Counter Event on Channel 1 Interrupt Disable */
+#define PWM_IDR1_CHID2 (0x1u << 2) /**< \brief (PWM_IDR1) Counter Event on Channel 2 Interrupt Disable */
+#define PWM_IDR1_CHID3 (0x1u << 3) /**< \brief (PWM_IDR1) Counter Event on Channel 3 Interrupt Disable */
+#define PWM_IDR1_CHID4 (0x1u << 4) /**< \brief (PWM_IDR1) Counter Event on Channel 4 Interrupt Disable */
+#define PWM_IDR1_CHID5 (0x1u << 5) /**< \brief (PWM_IDR1) Counter Event on Channel 5 Interrupt Disable */
+#define PWM_IDR1_CHID6 (0x1u << 6) /**< \brief (PWM_IDR1) Counter Event on Channel 6 Interrupt Disable */
+#define PWM_IDR1_CHID7 (0x1u << 7) /**< \brief (PWM_IDR1) Counter Event on Channel 7 Interrupt Disable */
+#define PWM_IDR1_FCHID0 (0x1u << 16) /**< \brief (PWM_IDR1) Fault Protection Trigger on Channel 0 Interrupt Disable */
+#define PWM_IDR1_FCHID1 (0x1u << 17) /**< \brief (PWM_IDR1) Fault Protection Trigger on Channel 1 Interrupt Disable */
+#define PWM_IDR1_FCHID2 (0x1u << 18) /**< \brief (PWM_IDR1) Fault Protection Trigger on Channel 2 Interrupt Disable */
+#define PWM_IDR1_FCHID3 (0x1u << 19) /**< \brief (PWM_IDR1) Fault Protection Trigger on Channel 3 Interrupt Disable */
+#define PWM_IDR1_FCHID4 (0x1u << 20) /**< \brief (PWM_IDR1) Fault Protection Trigger on Channel 4 Interrupt Disable */
+#define PWM_IDR1_FCHID5 (0x1u << 21) /**< \brief (PWM_IDR1) Fault Protection Trigger on Channel 5 Interrupt Disable */
+#define PWM_IDR1_FCHID6 (0x1u << 22) /**< \brief (PWM_IDR1) Fault Protection Trigger on Channel 6 Interrupt Disable */
+#define PWM_IDR1_FCHID7 (0x1u << 23) /**< \brief (PWM_IDR1) Fault Protection Trigger on Channel 7 Interrupt Disable */
+/* -------- PWM_IMR1 : (PWM Offset: 0x18) PWM Interrupt Mask Register 1 -------- */
+#define PWM_IMR1_CHID0 (0x1u << 0) /**< \brief (PWM_IMR1) Counter Event on Channel 0 Interrupt Mask */
+#define PWM_IMR1_CHID1 (0x1u << 1) /**< \brief (PWM_IMR1) Counter Event on Channel 1 Interrupt Mask */
+#define PWM_IMR1_CHID2 (0x1u << 2) /**< \brief (PWM_IMR1) Counter Event on Channel 2 Interrupt Mask */
+#define PWM_IMR1_CHID3 (0x1u << 3) /**< \brief (PWM_IMR1) Counter Event on Channel 3 Interrupt Mask */
+#define PWM_IMR1_CHID4 (0x1u << 4) /**< \brief (PWM_IMR1) Counter Event on Channel 4 Interrupt Mask */
+#define PWM_IMR1_CHID5 (0x1u << 5) /**< \brief (PWM_IMR1) Counter Event on Channel 5 Interrupt Mask */
+#define PWM_IMR1_CHID6 (0x1u << 6) /**< \brief (PWM_IMR1) Counter Event on Channel 6 Interrupt Mask */
+#define PWM_IMR1_CHID7 (0x1u << 7) /**< \brief (PWM_IMR1) Counter Event on Channel 7 Interrupt Mask */
+#define PWM_IMR1_FCHID0 (0x1u << 16) /**< \brief (PWM_IMR1) Fault Protection Trigger on Channel 0 Interrupt Mask */
+#define PWM_IMR1_FCHID1 (0x1u << 17) /**< \brief (PWM_IMR1) Fault Protection Trigger on Channel 1 Interrupt Mask */
+#define PWM_IMR1_FCHID2 (0x1u << 18) /**< \brief (PWM_IMR1) Fault Protection Trigger on Channel 2 Interrupt Mask */
+#define PWM_IMR1_FCHID3 (0x1u << 19) /**< \brief (PWM_IMR1) Fault Protection Trigger on Channel 3 Interrupt Mask */
+#define PWM_IMR1_FCHID4 (0x1u << 20) /**< \brief (PWM_IMR1) Fault Protection Trigger on Channel 4 Interrupt Mask */
+#define PWM_IMR1_FCHID5 (0x1u << 21) /**< \brief (PWM_IMR1) Fault Protection Trigger on Channel 5 Interrupt Mask */
+#define PWM_IMR1_FCHID6 (0x1u << 22) /**< \brief (PWM_IMR1) Fault Protection Trigger on Channel 6 Interrupt Mask */
+#define PWM_IMR1_FCHID7 (0x1u << 23) /**< \brief (PWM_IMR1) Fault Protection Trigger on Channel 7 Interrupt Mask */
+/* -------- PWM_ISR1 : (PWM Offset: 0x1C) PWM Interrupt Status Register 1 -------- */
+#define PWM_ISR1_CHID0 (0x1u << 0) /**< \brief (PWM_ISR1) Counter Event on Channel 0 */
+#define PWM_ISR1_CHID1 (0x1u << 1) /**< \brief (PWM_ISR1) Counter Event on Channel 1 */
+#define PWM_ISR1_CHID2 (0x1u << 2) /**< \brief (PWM_ISR1) Counter Event on Channel 2 */
+#define PWM_ISR1_CHID3 (0x1u << 3) /**< \brief (PWM_ISR1) Counter Event on Channel 3 */
+#define PWM_ISR1_CHID4 (0x1u << 4) /**< \brief (PWM_ISR1) Counter Event on Channel 4 */
+#define PWM_ISR1_CHID5 (0x1u << 5) /**< \brief (PWM_ISR1) Counter Event on Channel 5 */
+#define PWM_ISR1_CHID6 (0x1u << 6) /**< \brief (PWM_ISR1) Counter Event on Channel 6 */
+#define PWM_ISR1_CHID7 (0x1u << 7) /**< \brief (PWM_ISR1) Counter Event on Channel 7 */
+#define PWM_ISR1_FCHID0 (0x1u << 16) /**< \brief (PWM_ISR1) Fault Protection Trigger on Channel 0 */
+#define PWM_ISR1_FCHID1 (0x1u << 17) /**< \brief (PWM_ISR1) Fault Protection Trigger on Channel 1 */
+#define PWM_ISR1_FCHID2 (0x1u << 18) /**< \brief (PWM_ISR1) Fault Protection Trigger on Channel 2 */
+#define PWM_ISR1_FCHID3 (0x1u << 19) /**< \brief (PWM_ISR1) Fault Protection Trigger on Channel 3 */
+#define PWM_ISR1_FCHID4 (0x1u << 20) /**< \brief (PWM_ISR1) Fault Protection Trigger on Channel 4 */
+#define PWM_ISR1_FCHID5 (0x1u << 21) /**< \brief (PWM_ISR1) Fault Protection Trigger on Channel 5 */
+#define PWM_ISR1_FCHID6 (0x1u << 22) /**< \brief (PWM_ISR1) Fault Protection Trigger on Channel 6 */
+#define PWM_ISR1_FCHID7 (0x1u << 23) /**< \brief (PWM_ISR1) Fault Protection Trigger on Channel 7 */
+/* -------- PWM_SCM : (PWM Offset: 0x20) PWM Sync Channels Mode Register -------- */
+#define PWM_SCM_SYNC0 (0x1u << 0) /**< \brief (PWM_SCM) Synchronous Channel 0 */
+#define PWM_SCM_SYNC1 (0x1u << 1) /**< \brief (PWM_SCM) Synchronous Channel 1 */
+#define PWM_SCM_SYNC2 (0x1u << 2) /**< \brief (PWM_SCM) Synchronous Channel 2 */
+#define PWM_SCM_SYNC3 (0x1u << 3) /**< \brief (PWM_SCM) Synchronous Channel 3 */
+#define PWM_SCM_SYNC4 (0x1u << 4) /**< \brief (PWM_SCM) Synchronous Channel 4 */
+#define PWM_SCM_SYNC5 (0x1u << 5) /**< \brief (PWM_SCM) Synchronous Channel 5 */
+#define PWM_SCM_SYNC6 (0x1u << 6) /**< \brief (PWM_SCM) Synchronous Channel 6 */
+#define PWM_SCM_SYNC7 (0x1u << 7) /**< \brief (PWM_SCM) Synchronous Channel 7 */
+#define PWM_SCM_UPDM_Pos 16
+#define PWM_SCM_UPDM_Msk (0x3u << PWM_SCM_UPDM_Pos) /**< \brief (PWM_SCM) Synchronous Channels Update Mode */
+#define PWM_SCM_UPDM_MODE0 (0x0u << 16) /**< \brief (PWM_SCM) Manual write of double buffer registers and manual update of synchronous channels */
+#define PWM_SCM_UPDM_MODE1 (0x1u << 16) /**< \brief (PWM_SCM) Manual write of double buffer registers and automatic update of synchronous channels */
+#define PWM_SCM_UPDM_MODE2 (0x2u << 16) /**< \brief (PWM_SCM) Automatic write of duty-cycle update registers by the PDC and automatic update of synchronous channels */
+#define PWM_SCM_PTRM (0x1u << 20) /**< \brief (PWM_SCM) PDC Transfer Request Mode */
+#define PWM_SCM_PTRCS_Pos 21
+#define PWM_SCM_PTRCS_Msk (0x7u << PWM_SCM_PTRCS_Pos) /**< \brief (PWM_SCM) PDC Transfer Request Comparison Selection */
+#define PWM_SCM_PTRCS(value) ((PWM_SCM_PTRCS_Msk & ((value) << PWM_SCM_PTRCS_Pos)))
+/* -------- PWM_SCUC : (PWM Offset: 0x28) PWM Sync Channels Update Control Register -------- */
+#define PWM_SCUC_UPDULOCK (0x1u << 0) /**< \brief (PWM_SCUC) Synchronous Channels Update Unlock */
+/* -------- PWM_SCUP : (PWM Offset: 0x2C) PWM Sync Channels Update Period Register -------- */
+#define PWM_SCUP_UPR_Pos 0
+#define PWM_SCUP_UPR_Msk (0xfu << PWM_SCUP_UPR_Pos) /**< \brief (PWM_SCUP) Update Period */
+#define PWM_SCUP_UPR(value) ((PWM_SCUP_UPR_Msk & ((value) << PWM_SCUP_UPR_Pos)))
+#define PWM_SCUP_UPRCNT_Pos 4
+#define PWM_SCUP_UPRCNT_Msk (0xfu << PWM_SCUP_UPRCNT_Pos) /**< \brief (PWM_SCUP) Update Period Counter */
+#define PWM_SCUP_UPRCNT(value) ((PWM_SCUP_UPRCNT_Msk & ((value) << PWM_SCUP_UPRCNT_Pos)))
+/* -------- PWM_SCUPUPD : (PWM Offset: 0x30) PWM Sync Channels Update Period Update Register -------- */
+#define PWM_SCUPUPD_UPRUPD_Pos 0
+#define PWM_SCUPUPD_UPRUPD_Msk (0xfu << PWM_SCUPUPD_UPRUPD_Pos) /**< \brief (PWM_SCUPUPD) Update Period Update */
+#define PWM_SCUPUPD_UPRUPD(value) ((PWM_SCUPUPD_UPRUPD_Msk & ((value) << PWM_SCUPUPD_UPRUPD_Pos)))
+/* -------- PWM_IER2 : (PWM Offset: 0x34) PWM Interrupt Enable Register 2 -------- */
+#define PWM_IER2_WRDY (0x1u << 0) /**< \brief (PWM_IER2) Write Ready for Synchronous Channels Update Interrupt Enable */
+#define PWM_IER2_ENDTX (0x1u << 1) /**< \brief (PWM_IER2) PDC End of TX Buffer Interrupt Enable */
+#define PWM_IER2_TXBUFE (0x1u << 2) /**< \brief (PWM_IER2) PDC TX Buffer Empty Interrupt Enable */
+#define PWM_IER2_UNRE (0x1u << 3) /**< \brief (PWM_IER2) Synchronous Channels Update Underrun Error Interrupt Enable */
+#define PWM_IER2_CMPM0 (0x1u << 8) /**< \brief (PWM_IER2) Comparison 0 Match Interrupt Enable */
+#define PWM_IER2_CMPM1 (0x1u << 9) /**< \brief (PWM_IER2) Comparison 1 Match Interrupt Enable */
+#define PWM_IER2_CMPM2 (0x1u << 10) /**< \brief (PWM_IER2) Comparison 2 Match Interrupt Enable */
+#define PWM_IER2_CMPM3 (0x1u << 11) /**< \brief (PWM_IER2) Comparison 3 Match Interrupt Enable */
+#define PWM_IER2_CMPM4 (0x1u << 12) /**< \brief (PWM_IER2) Comparison 4 Match Interrupt Enable */
+#define PWM_IER2_CMPM5 (0x1u << 13) /**< \brief (PWM_IER2) Comparison 5 Match Interrupt Enable */
+#define PWM_IER2_CMPM6 (0x1u << 14) /**< \brief (PWM_IER2) Comparison 6 Match Interrupt Enable */
+#define PWM_IER2_CMPM7 (0x1u << 15) /**< \brief (PWM_IER2) Comparison 7 Match Interrupt Enable */
+#define PWM_IER2_CMPU0 (0x1u << 16) /**< \brief (PWM_IER2) Comparison 0 Update Interrupt Enable */
+#define PWM_IER2_CMPU1 (0x1u << 17) /**< \brief (PWM_IER2) Comparison 1 Update Interrupt Enable */
+#define PWM_IER2_CMPU2 (0x1u << 18) /**< \brief (PWM_IER2) Comparison 2 Update Interrupt Enable */
+#define PWM_IER2_CMPU3 (0x1u << 19) /**< \brief (PWM_IER2) Comparison 3 Update Interrupt Enable */
+#define PWM_IER2_CMPU4 (0x1u << 20) /**< \brief (PWM_IER2) Comparison 4 Update Interrupt Enable */
+#define PWM_IER2_CMPU5 (0x1u << 21) /**< \brief (PWM_IER2) Comparison 5 Update Interrupt Enable */
+#define PWM_IER2_CMPU6 (0x1u << 22) /**< \brief (PWM_IER2) Comparison 6 Update Interrupt Enable */
+#define PWM_IER2_CMPU7 (0x1u << 23) /**< \brief (PWM_IER2) Comparison 7 Update Interrupt Enable */
+/* -------- PWM_IDR2 : (PWM Offset: 0x38) PWM Interrupt Disable Register 2 -------- */
+#define PWM_IDR2_WRDY (0x1u << 0) /**< \brief (PWM_IDR2) Write Ready for Synchronous Channels Update Interrupt Disable */
+#define PWM_IDR2_ENDTX (0x1u << 1) /**< \brief (PWM_IDR2) PDC End of TX Buffer Interrupt Disable */
+#define PWM_IDR2_TXBUFE (0x1u << 2) /**< \brief (PWM_IDR2) PDC TX Buffer Empty Interrupt Disable */
+#define PWM_IDR2_UNRE (0x1u << 3) /**< \brief (PWM_IDR2) Synchronous Channels Update Underrun Error Interrupt Disable */
+#define PWM_IDR2_CMPM0 (0x1u << 8) /**< \brief (PWM_IDR2) Comparison 0 Match Interrupt Disable */
+#define PWM_IDR2_CMPM1 (0x1u << 9) /**< \brief (PWM_IDR2) Comparison 1 Match Interrupt Disable */
+#define PWM_IDR2_CMPM2 (0x1u << 10) /**< \brief (PWM_IDR2) Comparison 2 Match Interrupt Disable */
+#define PWM_IDR2_CMPM3 (0x1u << 11) /**< \brief (PWM_IDR2) Comparison 3 Match Interrupt Disable */
+#define PWM_IDR2_CMPM4 (0x1u << 12) /**< \brief (PWM_IDR2) Comparison 4 Match Interrupt Disable */
+#define PWM_IDR2_CMPM5 (0x1u << 13) /**< \brief (PWM_IDR2) Comparison 5 Match Interrupt Disable */
+#define PWM_IDR2_CMPM6 (0x1u << 14) /**< \brief (PWM_IDR2) Comparison 6 Match Interrupt Disable */
+#define PWM_IDR2_CMPM7 (0x1u << 15) /**< \brief (PWM_IDR2) Comparison 7 Match Interrupt Disable */
+#define PWM_IDR2_CMPU0 (0x1u << 16) /**< \brief (PWM_IDR2) Comparison 0 Update Interrupt Disable */
+#define PWM_IDR2_CMPU1 (0x1u << 17) /**< \brief (PWM_IDR2) Comparison 1 Update Interrupt Disable */
+#define PWM_IDR2_CMPU2 (0x1u << 18) /**< \brief (PWM_IDR2) Comparison 2 Update Interrupt Disable */
+#define PWM_IDR2_CMPU3 (0x1u << 19) /**< \brief (PWM_IDR2) Comparison 3 Update Interrupt Disable */
+#define PWM_IDR2_CMPU4 (0x1u << 20) /**< \brief (PWM_IDR2) Comparison 4 Update Interrupt Disable */
+#define PWM_IDR2_CMPU5 (0x1u << 21) /**< \brief (PWM_IDR2) Comparison 5 Update Interrupt Disable */
+#define PWM_IDR2_CMPU6 (0x1u << 22) /**< \brief (PWM_IDR2) Comparison 6 Update Interrupt Disable */
+#define PWM_IDR2_CMPU7 (0x1u << 23) /**< \brief (PWM_IDR2) Comparison 7 Update Interrupt Disable */
+/* -------- PWM_IMR2 : (PWM Offset: 0x3C) PWM Interrupt Mask Register 2 -------- */
+#define PWM_IMR2_WRDY (0x1u << 0) /**< \brief (PWM_IMR2) Write Ready for Synchronous Channels Update Interrupt Mask */
+#define PWM_IMR2_ENDTX (0x1u << 1) /**< \brief (PWM_IMR2) PDC End of TX Buffer Interrupt Mask */
+#define PWM_IMR2_TXBUFE (0x1u << 2) /**< \brief (PWM_IMR2) PDC TX Buffer Empty Interrupt Mask */
+#define PWM_IMR2_UNRE (0x1u << 3) /**< \brief (PWM_IMR2) Synchronous Channels Update Underrun Error Interrupt Mask */
+#define PWM_IMR2_CMPM0 (0x1u << 8) /**< \brief (PWM_IMR2) Comparison 0 Match Interrupt Mask */
+#define PWM_IMR2_CMPM1 (0x1u << 9) /**< \brief (PWM_IMR2) Comparison 1 Match Interrupt Mask */
+#define PWM_IMR2_CMPM2 (0x1u << 10) /**< \brief (PWM_IMR2) Comparison 2 Match Interrupt Mask */
+#define PWM_IMR2_CMPM3 (0x1u << 11) /**< \brief (PWM_IMR2) Comparison 3 Match Interrupt Mask */
+#define PWM_IMR2_CMPM4 (0x1u << 12) /**< \brief (PWM_IMR2) Comparison 4 Match Interrupt Mask */
+#define PWM_IMR2_CMPM5 (0x1u << 13) /**< \brief (PWM_IMR2) Comparison 5 Match Interrupt Mask */
+#define PWM_IMR2_CMPM6 (0x1u << 14) /**< \brief (PWM_IMR2) Comparison 6 Match Interrupt Mask */
+#define PWM_IMR2_CMPM7 (0x1u << 15) /**< \brief (PWM_IMR2) Comparison 7 Match Interrupt Mask */
+#define PWM_IMR2_CMPU0 (0x1u << 16) /**< \brief (PWM_IMR2) Comparison 0 Update Interrupt Mask */
+#define PWM_IMR2_CMPU1 (0x1u << 17) /**< \brief (PWM_IMR2) Comparison 1 Update Interrupt Mask */
+#define PWM_IMR2_CMPU2 (0x1u << 18) /**< \brief (PWM_IMR2) Comparison 2 Update Interrupt Mask */
+#define PWM_IMR2_CMPU3 (0x1u << 19) /**< \brief (PWM_IMR2) Comparison 3 Update Interrupt Mask */
+#define PWM_IMR2_CMPU4 (0x1u << 20) /**< \brief (PWM_IMR2) Comparison 4 Update Interrupt Mask */
+#define PWM_IMR2_CMPU5 (0x1u << 21) /**< \brief (PWM_IMR2) Comparison 5 Update Interrupt Mask */
+#define PWM_IMR2_CMPU6 (0x1u << 22) /**< \brief (PWM_IMR2) Comparison 6 Update Interrupt Mask */
+#define PWM_IMR2_CMPU7 (0x1u << 23) /**< \brief (PWM_IMR2) Comparison 7 Update Interrupt Mask */
+/* -------- PWM_ISR2 : (PWM Offset: 0x40) PWM Interrupt Status Register 2 -------- */
+#define PWM_ISR2_WRDY (0x1u << 0) /**< \brief (PWM_ISR2) Write Ready for Synchronous Channels Update */
+#define PWM_ISR2_ENDTX (0x1u << 1) /**< \brief (PWM_ISR2) PDC End of TX Buffer */
+#define PWM_ISR2_TXBUFE (0x1u << 2) /**< \brief (PWM_ISR2) PDC TX Buffer Empty */
+#define PWM_ISR2_UNRE (0x1u << 3) /**< \brief (PWM_ISR2) Synchronous Channels Update Underrun Error */
+#define PWM_ISR2_CMPM0 (0x1u << 8) /**< \brief (PWM_ISR2) Comparison 0 Match */
+#define PWM_ISR2_CMPM1 (0x1u << 9) /**< \brief (PWM_ISR2) Comparison 1 Match */
+#define PWM_ISR2_CMPM2 (0x1u << 10) /**< \brief (PWM_ISR2) Comparison 2 Match */
+#define PWM_ISR2_CMPM3 (0x1u << 11) /**< \brief (PWM_ISR2) Comparison 3 Match */
+#define PWM_ISR2_CMPM4 (0x1u << 12) /**< \brief (PWM_ISR2) Comparison 4 Match */
+#define PWM_ISR2_CMPM5 (0x1u << 13) /**< \brief (PWM_ISR2) Comparison 5 Match */
+#define PWM_ISR2_CMPM6 (0x1u << 14) /**< \brief (PWM_ISR2) Comparison 6 Match */
+#define PWM_ISR2_CMPM7 (0x1u << 15) /**< \brief (PWM_ISR2) Comparison 7 Match */
+#define PWM_ISR2_CMPU0 (0x1u << 16) /**< \brief (PWM_ISR2) Comparison 0 Update */
+#define PWM_ISR2_CMPU1 (0x1u << 17) /**< \brief (PWM_ISR2) Comparison 1 Update */
+#define PWM_ISR2_CMPU2 (0x1u << 18) /**< \brief (PWM_ISR2) Comparison 2 Update */
+#define PWM_ISR2_CMPU3 (0x1u << 19) /**< \brief (PWM_ISR2) Comparison 3 Update */
+#define PWM_ISR2_CMPU4 (0x1u << 20) /**< \brief (PWM_ISR2) Comparison 4 Update */
+#define PWM_ISR2_CMPU5 (0x1u << 21) /**< \brief (PWM_ISR2) Comparison 5 Update */
+#define PWM_ISR2_CMPU6 (0x1u << 22) /**< \brief (PWM_ISR2) Comparison 6 Update */
+#define PWM_ISR2_CMPU7 (0x1u << 23) /**< \brief (PWM_ISR2) Comparison 7 Update */
+/* -------- PWM_OOV : (PWM Offset: 0x44) PWM Output Override Value Register -------- */
+#define PWM_OOV_OOVH0 (0x1u << 0) /**< \brief (PWM_OOV) Output Override Value for PWMH output of the channel 0 */
+#define PWM_OOV_OOVH1 (0x1u << 1) /**< \brief (PWM_OOV) Output Override Value for PWMH output of the channel 1 */
+#define PWM_OOV_OOVH2 (0x1u << 2) /**< \brief (PWM_OOV) Output Override Value for PWMH output of the channel 2 */
+#define PWM_OOV_OOVH3 (0x1u << 3) /**< \brief (PWM_OOV) Output Override Value for PWMH output of the channel 3 */
+#define PWM_OOV_OOVH4 (0x1u << 4) /**< \brief (PWM_OOV) Output Override Value for PWMH output of the channel 4 */
+#define PWM_OOV_OOVH5 (0x1u << 5) /**< \brief (PWM_OOV) Output Override Value for PWMH output of the channel 5 */
+#define PWM_OOV_OOVH6 (0x1u << 6) /**< \brief (PWM_OOV) Output Override Value for PWMH output of the channel 6 */
+#define PWM_OOV_OOVH7 (0x1u << 7) /**< \brief (PWM_OOV) Output Override Value for PWMH output of the channel 7 */
+#define PWM_OOV_OOVL0 (0x1u << 16) /**< \brief (PWM_OOV) Output Override Value for PWML output of the channel 0 */
+#define PWM_OOV_OOVL1 (0x1u << 17) /**< \brief (PWM_OOV) Output Override Value for PWML output of the channel 1 */
+#define PWM_OOV_OOVL2 (0x1u << 18) /**< \brief (PWM_OOV) Output Override Value for PWML output of the channel 2 */
+#define PWM_OOV_OOVL3 (0x1u << 19) /**< \brief (PWM_OOV) Output Override Value for PWML output of the channel 3 */
+#define PWM_OOV_OOVL4 (0x1u << 20) /**< \brief (PWM_OOV) Output Override Value for PWML output of the channel 4 */
+#define PWM_OOV_OOVL5 (0x1u << 21) /**< \brief (PWM_OOV) Output Override Value for PWML output of the channel 5 */
+#define PWM_OOV_OOVL6 (0x1u << 22) /**< \brief (PWM_OOV) Output Override Value for PWML output of the channel 6 */
+#define PWM_OOV_OOVL7 (0x1u << 23) /**< \brief (PWM_OOV) Output Override Value for PWML output of the channel 7 */
+/* -------- PWM_OS : (PWM Offset: 0x48) PWM Output Selection Register -------- */
+#define PWM_OS_OSH0 (0x1u << 0) /**< \brief (PWM_OS) Output Selection for PWMH output of the channel 0 */
+#define PWM_OS_OSH1 (0x1u << 1) /**< \brief (PWM_OS) Output Selection for PWMH output of the channel 1 */
+#define PWM_OS_OSH2 (0x1u << 2) /**< \brief (PWM_OS) Output Selection for PWMH output of the channel 2 */
+#define PWM_OS_OSH3 (0x1u << 3) /**< \brief (PWM_OS) Output Selection for PWMH output of the channel 3 */
+#define PWM_OS_OSH4 (0x1u << 4) /**< \brief (PWM_OS) Output Selection for PWMH output of the channel 4 */
+#define PWM_OS_OSH5 (0x1u << 5) /**< \brief (PWM_OS) Output Selection for PWMH output of the channel 5 */
+#define PWM_OS_OSH6 (0x1u << 6) /**< \brief (PWM_OS) Output Selection for PWMH output of the channel 6 */
+#define PWM_OS_OSH7 (0x1u << 7) /**< \brief (PWM_OS) Output Selection for PWMH output of the channel 7 */
+#define PWM_OS_OSL0 (0x1u << 16) /**< \brief (PWM_OS) Output Selection for PWML output of the channel 0 */
+#define PWM_OS_OSL1 (0x1u << 17) /**< \brief (PWM_OS) Output Selection for PWML output of the channel 1 */
+#define PWM_OS_OSL2 (0x1u << 18) /**< \brief (PWM_OS) Output Selection for PWML output of the channel 2 */
+#define PWM_OS_OSL3 (0x1u << 19) /**< \brief (PWM_OS) Output Selection for PWML output of the channel 3 */
+#define PWM_OS_OSL4 (0x1u << 20) /**< \brief (PWM_OS) Output Selection for PWML output of the channel 4 */
+#define PWM_OS_OSL5 (0x1u << 21) /**< \brief (PWM_OS) Output Selection for PWML output of the channel 5 */
+#define PWM_OS_OSL6 (0x1u << 22) /**< \brief (PWM_OS) Output Selection for PWML output of the channel 6 */
+#define PWM_OS_OSL7 (0x1u << 23) /**< \brief (PWM_OS) Output Selection for PWML output of the channel 7 */
+/* -------- PWM_OSS : (PWM Offset: 0x4C) PWM Output Selection Set Register -------- */
+#define PWM_OSS_OSSH0 (0x1u << 0) /**< \brief (PWM_OSS) Output Selection Set for PWMH output of the channel 0 */
+#define PWM_OSS_OSSH1 (0x1u << 1) /**< \brief (PWM_OSS) Output Selection Set for PWMH output of the channel 1 */
+#define PWM_OSS_OSSH2 (0x1u << 2) /**< \brief (PWM_OSS) Output Selection Set for PWMH output of the channel 2 */
+#define PWM_OSS_OSSH3 (0x1u << 3) /**< \brief (PWM_OSS) Output Selection Set for PWMH output of the channel 3 */
+#define PWM_OSS_OSSH4 (0x1u << 4) /**< \brief (PWM_OSS) Output Selection Set for PWMH output of the channel 4 */
+#define PWM_OSS_OSSH5 (0x1u << 5) /**< \brief (PWM_OSS) Output Selection Set for PWMH output of the channel 5 */
+#define PWM_OSS_OSSH6 (0x1u << 6) /**< \brief (PWM_OSS) Output Selection Set for PWMH output of the channel 6 */
+#define PWM_OSS_OSSH7 (0x1u << 7) /**< \brief (PWM_OSS) Output Selection Set for PWMH output of the channel 7 */
+#define PWM_OSS_OSSL0 (0x1u << 16) /**< \brief (PWM_OSS) Output Selection Set for PWML output of the channel 0 */
+#define PWM_OSS_OSSL1 (0x1u << 17) /**< \brief (PWM_OSS) Output Selection Set for PWML output of the channel 1 */
+#define PWM_OSS_OSSL2 (0x1u << 18) /**< \brief (PWM_OSS) Output Selection Set for PWML output of the channel 2 */
+#define PWM_OSS_OSSL3 (0x1u << 19) /**< \brief (PWM_OSS) Output Selection Set for PWML output of the channel 3 */
+#define PWM_OSS_OSSL4 (0x1u << 20) /**< \brief (PWM_OSS) Output Selection Set for PWML output of the channel 4 */
+#define PWM_OSS_OSSL5 (0x1u << 21) /**< \brief (PWM_OSS) Output Selection Set for PWML output of the channel 5 */
+#define PWM_OSS_OSSL6 (0x1u << 22) /**< \brief (PWM_OSS) Output Selection Set for PWML output of the channel 6 */
+#define PWM_OSS_OSSL7 (0x1u << 23) /**< \brief (PWM_OSS) Output Selection Set for PWML output of the channel 7 */
+/* -------- PWM_OSC : (PWM Offset: 0x50) PWM Output Selection Clear Register -------- */
+#define PWM_OSC_OSCH0 (0x1u << 0) /**< \brief (PWM_OSC) Output Selection Clear for PWMH output of the channel 0 */
+#define PWM_OSC_OSCH1 (0x1u << 1) /**< \brief (PWM_OSC) Output Selection Clear for PWMH output of the channel 1 */
+#define PWM_OSC_OSCH2 (0x1u << 2) /**< \brief (PWM_OSC) Output Selection Clear for PWMH output of the channel 2 */
+#define PWM_OSC_OSCH3 (0x1u << 3) /**< \brief (PWM_OSC) Output Selection Clear for PWMH output of the channel 3 */
+#define PWM_OSC_OSCH4 (0x1u << 4) /**< \brief (PWM_OSC) Output Selection Clear for PWMH output of the channel 4 */
+#define PWM_OSC_OSCH5 (0x1u << 5) /**< \brief (PWM_OSC) Output Selection Clear for PWMH output of the channel 5 */
+#define PWM_OSC_OSCH6 (0x1u << 6) /**< \brief (PWM_OSC) Output Selection Clear for PWMH output of the channel 6 */
+#define PWM_OSC_OSCH7 (0x1u << 7) /**< \brief (PWM_OSC) Output Selection Clear for PWMH output of the channel 7 */
+#define PWM_OSC_OSCL0 (0x1u << 16) /**< \brief (PWM_OSC) Output Selection Clear for PWML output of the channel 0 */
+#define PWM_OSC_OSCL1 (0x1u << 17) /**< \brief (PWM_OSC) Output Selection Clear for PWML output of the channel 1 */
+#define PWM_OSC_OSCL2 (0x1u << 18) /**< \brief (PWM_OSC) Output Selection Clear for PWML output of the channel 2 */
+#define PWM_OSC_OSCL3 (0x1u << 19) /**< \brief (PWM_OSC) Output Selection Clear for PWML output of the channel 3 */
+#define PWM_OSC_OSCL4 (0x1u << 20) /**< \brief (PWM_OSC) Output Selection Clear for PWML output of the channel 4 */
+#define PWM_OSC_OSCL5 (0x1u << 21) /**< \brief (PWM_OSC) Output Selection Clear for PWML output of the channel 5 */
+#define PWM_OSC_OSCL6 (0x1u << 22) /**< \brief (PWM_OSC) Output Selection Clear for PWML output of the channel 6 */
+#define PWM_OSC_OSCL7 (0x1u << 23) /**< \brief (PWM_OSC) Output Selection Clear for PWML output of the channel 7 */
+/* -------- PWM_OSSUPD : (PWM Offset: 0x54) PWM Output Selection Set Update Register -------- */
+#define PWM_OSSUPD_OSSUPH0 (0x1u << 0) /**< \brief (PWM_OSSUPD) Output Selection Set for PWMH output of the channel 0 */
+#define PWM_OSSUPD_OSSUPH1 (0x1u << 1) /**< \brief (PWM_OSSUPD) Output Selection Set for PWMH output of the channel 1 */
+#define PWM_OSSUPD_OSSUPH2 (0x1u << 2) /**< \brief (PWM_OSSUPD) Output Selection Set for PWMH output of the channel 2 */
+#define PWM_OSSUPD_OSSUPH3 (0x1u << 3) /**< \brief (PWM_OSSUPD) Output Selection Set for PWMH output of the channel 3 */
+#define PWM_OSSUPD_OSSUPH4 (0x1u << 4) /**< \brief (PWM_OSSUPD) Output Selection Set for PWMH output of the channel 4 */
+#define PWM_OSSUPD_OSSUPH5 (0x1u << 5) /**< \brief (PWM_OSSUPD) Output Selection Set for PWMH output of the channel 5 */
+#define PWM_OSSUPD_OSSUPH6 (0x1u << 6) /**< \brief (PWM_OSSUPD) Output Selection Set for PWMH output of the channel 6 */
+#define PWM_OSSUPD_OSSUPH7 (0x1u << 7) /**< \brief (PWM_OSSUPD) Output Selection Set for PWMH output of the channel 7 */
+#define PWM_OSSUPD_OSSUPL0 (0x1u << 16) /**< \brief (PWM_OSSUPD) Output Selection Set for PWML output of the channel 0 */
+#define PWM_OSSUPD_OSSUPL1 (0x1u << 17) /**< \brief (PWM_OSSUPD) Output Selection Set for PWML output of the channel 1 */
+#define PWM_OSSUPD_OSSUPL2 (0x1u << 18) /**< \brief (PWM_OSSUPD) Output Selection Set for PWML output of the channel 2 */
+#define PWM_OSSUPD_OSSUPL3 (0x1u << 19) /**< \brief (PWM_OSSUPD) Output Selection Set for PWML output of the channel 3 */
+#define PWM_OSSUPD_OSSUPL4 (0x1u << 20) /**< \brief (PWM_OSSUPD) Output Selection Set for PWML output of the channel 4 */
+#define PWM_OSSUPD_OSSUPL5 (0x1u << 21) /**< \brief (PWM_OSSUPD) Output Selection Set for PWML output of the channel 5 */
+#define PWM_OSSUPD_OSSUPL6 (0x1u << 22) /**< \brief (PWM_OSSUPD) Output Selection Set for PWML output of the channel 6 */
+#define PWM_OSSUPD_OSSUPL7 (0x1u << 23) /**< \brief (PWM_OSSUPD) Output Selection Set for PWML output of the channel 7 */
+/* -------- PWM_OSCUPD : (PWM Offset: 0x58) PWM Output Selection Clear Update Register -------- */
+#define PWM_OSCUPD_OSCUPH0 (0x1u << 0) /**< \brief (PWM_OSCUPD) Output Selection Clear for PWMH output of the channel 0 */
+#define PWM_OSCUPD_OSCUPH1 (0x1u << 1) /**< \brief (PWM_OSCUPD) Output Selection Clear for PWMH output of the channel 1 */
+#define PWM_OSCUPD_OSCUPH2 (0x1u << 2) /**< \brief (PWM_OSCUPD) Output Selection Clear for PWMH output of the channel 2 */
+#define PWM_OSCUPD_OSCUPH3 (0x1u << 3) /**< \brief (PWM_OSCUPD) Output Selection Clear for PWMH output of the channel 3 */
+#define PWM_OSCUPD_OSCUPH4 (0x1u << 4) /**< \brief (PWM_OSCUPD) Output Selection Clear for PWMH output of the channel 4 */
+#define PWM_OSCUPD_OSCUPH5 (0x1u << 5) /**< \brief (PWM_OSCUPD) Output Selection Clear for PWMH output of the channel 5 */
+#define PWM_OSCUPD_OSCUPH6 (0x1u << 6) /**< \brief (PWM_OSCUPD) Output Selection Clear for PWMH output of the channel 6 */
+#define PWM_OSCUPD_OSCUPH7 (0x1u << 7) /**< \brief (PWM_OSCUPD) Output Selection Clear for PWMH output of the channel 7 */
+#define PWM_OSCUPD_OSCUPL0 (0x1u << 16) /**< \brief (PWM_OSCUPD) Output Selection Clear for PWML output of the channel 0 */
+#define PWM_OSCUPD_OSCUPL1 (0x1u << 17) /**< \brief (PWM_OSCUPD) Output Selection Clear for PWML output of the channel 1 */
+#define PWM_OSCUPD_OSCUPL2 (0x1u << 18) /**< \brief (PWM_OSCUPD) Output Selection Clear for PWML output of the channel 2 */
+#define PWM_OSCUPD_OSCUPL3 (0x1u << 19) /**< \brief (PWM_OSCUPD) Output Selection Clear for PWML output of the channel 3 */
+#define PWM_OSCUPD_OSCUPL4 (0x1u << 20) /**< \brief (PWM_OSCUPD) Output Selection Clear for PWML output of the channel 4 */
+#define PWM_OSCUPD_OSCUPL5 (0x1u << 21) /**< \brief (PWM_OSCUPD) Output Selection Clear for PWML output of the channel 5 */
+#define PWM_OSCUPD_OSCUPDL6 (0x1u << 22) /**< \brief (PWM_OSCUPD) */
+#define PWM_OSCUPD_OSCUPL7 (0x1u << 23) /**< \brief (PWM_OSCUPD) Output Selection Clear for PWML output of the channel 7 */
+/* -------- PWM_FMR : (PWM Offset: 0x5C) PWM Fault Mode Register -------- */
+#define PWM_FMR_FPOL_Pos 0
+#define PWM_FMR_FPOL_Msk (0xffu << PWM_FMR_FPOL_Pos) /**< \brief (PWM_FMR) Fault Polarity (fault input bit varies from 0 to 5) */
+#define PWM_FMR_FPOL(value) ((PWM_FMR_FPOL_Msk & ((value) << PWM_FMR_FPOL_Pos)))
+#define PWM_FMR_FMOD_Pos 8
+#define PWM_FMR_FMOD_Msk (0xffu << PWM_FMR_FMOD_Pos) /**< \brief (PWM_FMR) Fault Activation Mode (fault input bit varies from 0 to 5) */
+#define PWM_FMR_FMOD(value) ((PWM_FMR_FMOD_Msk & ((value) << PWM_FMR_FMOD_Pos)))
+#define PWM_FMR_FFIL_Pos 16
+#define PWM_FMR_FFIL_Msk (0xffu << PWM_FMR_FFIL_Pos) /**< \brief (PWM_FMR) Fault Filtering (fault input bit varies from 0 to 5) */
+#define PWM_FMR_FFIL(value) ((PWM_FMR_FFIL_Msk & ((value) << PWM_FMR_FFIL_Pos)))
+/* -------- PWM_FSR : (PWM Offset: 0x60) PWM Fault Status Register -------- */
+#define PWM_FSR_FIV_Pos 0
+#define PWM_FSR_FIV_Msk (0xffu << PWM_FSR_FIV_Pos) /**< \brief (PWM_FSR) Fault Input Value (fault input bit varies from 0 to 5) */
+#define PWM_FSR_FS_Pos 8
+#define PWM_FSR_FS_Msk (0xffu << PWM_FSR_FS_Pos) /**< \brief (PWM_FSR) Fault Status (fault input bit varies from 0 to 5) */
+/* -------- PWM_FCR : (PWM Offset: 0x64) PWM Fault Clear Register -------- */
+#define PWM_FCR_FCLR_Pos 0
+#define PWM_FCR_FCLR_Msk (0xffu << PWM_FCR_FCLR_Pos) /**< \brief (PWM_FCR) Fault Clear (fault input bit varies from 0 to 5) */
+#define PWM_FCR_FCLR(value) ((PWM_FCR_FCLR_Msk & ((value) << PWM_FCR_FCLR_Pos)))
+/* -------- PWM_FPV : (PWM Offset: 0x68) PWM Fault Protection Value Register -------- */
+#define PWM_FPV_FPVH0 (0x1u << 0) /**< \brief (PWM_FPV) Fault Protection Value for PWMH output on channel 0 */
+#define PWM_FPV_FPVH1 (0x1u << 1) /**< \brief (PWM_FPV) Fault Protection Value for PWMH output on channel 1 */
+#define PWM_FPV_FPVH2 (0x1u << 2) /**< \brief (PWM_FPV) Fault Protection Value for PWMH output on channel 2 */
+#define PWM_FPV_FPVH3 (0x1u << 3) /**< \brief (PWM_FPV) Fault Protection Value for PWMH output on channel 3 */
+#define PWM_FPV_FPVH4 (0x1u << 4) /**< \brief (PWM_FPV) Fault Protection Value for PWMH output on channel 4 */
+#define PWM_FPV_FPVH5 (0x1u << 5) /**< \brief (PWM_FPV) Fault Protection Value for PWMH output on channel 5 */
+#define PWM_FPV_FPVH6 (0x1u << 6) /**< \brief (PWM_FPV) Fault Protection Value for PWMH output on channel 6 */
+#define PWM_FPV_FPVH7 (0x1u << 7) /**< \brief (PWM_FPV) Fault Protection Value for PWMH output on channel 7 */
+#define PWM_FPV_FPVL0 (0x1u << 16) /**< \brief (PWM_FPV) Fault Protection Value for PWML output on channel 0 */
+#define PWM_FPV_FPVL1 (0x1u << 17) /**< \brief (PWM_FPV) Fault Protection Value for PWML output on channel 1 */
+#define PWM_FPV_FPVL2 (0x1u << 18) /**< \brief (PWM_FPV) Fault Protection Value for PWML output on channel 2 */
+#define PWM_FPV_FPVL3 (0x1u << 19) /**< \brief (PWM_FPV) Fault Protection Value for PWML output on channel 3 */
+#define PWM_FPV_FPVL4 (0x1u << 20) /**< \brief (PWM_FPV) Fault Protection Value for PWML output on channel 4 */
+#define PWM_FPV_FPVL5 (0x1u << 21) /**< \brief (PWM_FPV) Fault Protection Value for PWML output on channel 5 */
+#define PWM_FPV_FPVL6 (0x1u << 22) /**< \brief (PWM_FPV) Fault Protection Value for PWML output on channel 6 */
+#define PWM_FPV_FPVL7 (0x1u << 23) /**< \brief (PWM_FPV) Fault Protection Value for PWML output on channel 7 */
+/* -------- PWM_FPE1 : (PWM Offset: 0x6C) PWM Fault Protection Enable Register 1 -------- */
+#define PWM_FPE1_FPE0_Pos 0
+#define PWM_FPE1_FPE0_Msk (0xffu << PWM_FPE1_FPE0_Pos) /**< \brief (PWM_FPE1) Fault Protection Enable for channel 0 (fault input bit varies from 0 to 5) */
+#define PWM_FPE1_FPE0(value) ((PWM_FPE1_FPE0_Msk & ((value) << PWM_FPE1_FPE0_Pos)))
+#define PWM_FPE1_FPE1_Pos 8
+#define PWM_FPE1_FPE1_Msk (0xffu << PWM_FPE1_FPE1_Pos) /**< \brief (PWM_FPE1) Fault Protection Enable for channel 1 (fault input bit varies from 0 to 5) */
+#define PWM_FPE1_FPE1(value) ((PWM_FPE1_FPE1_Msk & ((value) << PWM_FPE1_FPE1_Pos)))
+#define PWM_FPE1_FPE2_Pos 16
+#define PWM_FPE1_FPE2_Msk (0xffu << PWM_FPE1_FPE2_Pos) /**< \brief (PWM_FPE1) Fault Protection Enable for channel 2 (fault input bit varies from 0 to 5) */
+#define PWM_FPE1_FPE2(value) ((PWM_FPE1_FPE2_Msk & ((value) << PWM_FPE1_FPE2_Pos)))
+#define PWM_FPE1_FPE3_Pos 24
+#define PWM_FPE1_FPE3_Msk (0xffu << PWM_FPE1_FPE3_Pos) /**< \brief (PWM_FPE1) Fault Protection Enable for channel 3 (fault input bit varies from 0 to 5) */
+#define PWM_FPE1_FPE3(value) ((PWM_FPE1_FPE3_Msk & ((value) << PWM_FPE1_FPE3_Pos)))
+/* -------- PWM_FPE2 : (PWM Offset: 0x70) PWM Fault Protection Enable Register 2 -------- */
+#define PWM_FPE2_FPE4_Pos 0
+#define PWM_FPE2_FPE4_Msk (0xffu << PWM_FPE2_FPE4_Pos) /**< \brief (PWM_FPE2) Fault Protection Enable for channel 4 (fault input bit varies from 0 to 5) */
+#define PWM_FPE2_FPE4(value) ((PWM_FPE2_FPE4_Msk & ((value) << PWM_FPE2_FPE4_Pos)))
+#define PWM_FPE2_FPE5_Pos 8
+#define PWM_FPE2_FPE5_Msk (0xffu << PWM_FPE2_FPE5_Pos) /**< \brief (PWM_FPE2) Fault Protection Enable for channel 5 (fault input bit varies from 0 to 5) */
+#define PWM_FPE2_FPE5(value) ((PWM_FPE2_FPE5_Msk & ((value) << PWM_FPE2_FPE5_Pos)))
+#define PWM_FPE2_FPE6_Pos 16
+#define PWM_FPE2_FPE6_Msk (0xffu << PWM_FPE2_FPE6_Pos) /**< \brief (PWM_FPE2) Fault Protection Enable for channel 6 (fault input bit varies from 0 to 5) */
+#define PWM_FPE2_FPE6(value) ((PWM_FPE2_FPE6_Msk & ((value) << PWM_FPE2_FPE6_Pos)))
+#define PWM_FPE2_FPE7_Pos 24
+#define PWM_FPE2_FPE7_Msk (0xffu << PWM_FPE2_FPE7_Pos) /**< \brief (PWM_FPE2) Fault Protection Enable for channel 7 (fault input bit varies from 0 to 5) */
+#define PWM_FPE2_FPE7(value) ((PWM_FPE2_FPE7_Msk & ((value) << PWM_FPE2_FPE7_Pos)))
+/* -------- PWM_ELMR[2] : (PWM Offset: 0x7C) PWM Event Line 0 Mode Register -------- */
+#define PWM_ELMR_CSEL0 (0x1u << 0) /**< \brief (PWM_ELMR[2]) Comparison 0 Selection */
+#define PWM_ELMR_CSEL1 (0x1u << 1) /**< \brief (PWM_ELMR[2]) Comparison 1 Selection */
+#define PWM_ELMR_CSEL2 (0x1u << 2) /**< \brief (PWM_ELMR[2]) Comparison 2 Selection */
+#define PWM_ELMR_CSEL3 (0x1u << 3) /**< \brief (PWM_ELMR[2]) Comparison 3 Selection */
+#define PWM_ELMR_CSEL4 (0x1u << 4) /**< \brief (PWM_ELMR[2]) Comparison 4 Selection */
+#define PWM_ELMR_CSEL5 (0x1u << 5) /**< \brief (PWM_ELMR[2]) Comparison 5 Selection */
+#define PWM_ELMR_CSEL6 (0x1u << 6) /**< \brief (PWM_ELMR[2]) Comparison 6 Selection */
+#define PWM_ELMR_CSEL7 (0x1u << 7) /**< \brief (PWM_ELMR[2]) Comparison 7 Selection */
+/* -------- PWM_SMMR : (PWM Offset: 0xB0) PWM Stepper Motor Mode Register -------- */
+#define PWM_SMMR_GCEN0 (0x1u << 0) /**< \brief (PWM_SMMR) Gray Count ENable */
+#define PWM_SMMR_GCEN1 (0x1u << 1) /**< \brief (PWM_SMMR) Gray Count ENable */
+#define PWM_SMMR_GCEN2 (0x1u << 2) /**< \brief (PWM_SMMR) Gray Count ENable */
+#define PWM_SMMR_GCEN3 (0x1u << 3) /**< \brief (PWM_SMMR) Gray Count ENable */
+#define PWM_SMMR_DOWN0 (0x1u << 16) /**< \brief (PWM_SMMR) DOWN Count */
+#define PWM_SMMR_DOWN1 (0x1u << 17) /**< \brief (PWM_SMMR) DOWN Count */
+#define PWM_SMMR_DOWN2 (0x1u << 18) /**< \brief (PWM_SMMR) DOWN Count */
+#define PWM_SMMR_DOWN3 (0x1u << 19) /**< \brief (PWM_SMMR) DOWN Count */
+/* -------- PWM_WPCR : (PWM Offset: 0xE4) PWM Write Protect Control Register -------- */
+#define PWM_WPCR_WPCMD_Pos 0
+#define PWM_WPCR_WPCMD_Msk (0x3u << PWM_WPCR_WPCMD_Pos) /**< \brief (PWM_WPCR) Write Protect Command */
+#define PWM_WPCR_WPCMD(value) ((PWM_WPCR_WPCMD_Msk & ((value) << PWM_WPCR_WPCMD_Pos)))
+#define PWM_WPCR_WPRG0 (0x1u << 2) /**< \brief (PWM_WPCR) Write Protect Register Group 0 */
+#define PWM_WPCR_WPRG1 (0x1u << 3) /**< \brief (PWM_WPCR) Write Protect Register Group 1 */
+#define PWM_WPCR_WPRG2 (0x1u << 4) /**< \brief (PWM_WPCR) Write Protect Register Group 2 */
+#define PWM_WPCR_WPRG3 (0x1u << 5) /**< \brief (PWM_WPCR) Write Protect Register Group 3 */
+#define PWM_WPCR_WPRG4 (0x1u << 6) /**< \brief (PWM_WPCR) Write Protect Register Group 4 */
+#define PWM_WPCR_WPRG5 (0x1u << 7) /**< \brief (PWM_WPCR) Write Protect Register Group 5 */
+#define PWM_WPCR_WPKEY_Pos 8
+#define PWM_WPCR_WPKEY_Msk (0xffffffu << PWM_WPCR_WPKEY_Pos) /**< \brief (PWM_WPCR) Write Protect Key */
+#define PWM_WPCR_WPKEY(value) ((PWM_WPCR_WPKEY_Msk & ((value) << PWM_WPCR_WPKEY_Pos)))
+/* -------- PWM_WPSR : (PWM Offset: 0xE8) PWM Write Protect Status Register -------- */
+#define PWM_WPSR_WPSWS0 (0x1u << 0) /**< \brief (PWM_WPSR) Write Protect SW Status */
+#define PWM_WPSR_WPSWS1 (0x1u << 1) /**< \brief (PWM_WPSR) Write Protect SW Status */
+#define PWM_WPSR_WPSWS2 (0x1u << 2) /**< \brief (PWM_WPSR) Write Protect SW Status */
+#define PWM_WPSR_WPSWS3 (0x1u << 3) /**< \brief (PWM_WPSR) Write Protect SW Status */
+#define PWM_WPSR_WPSWS4 (0x1u << 4) /**< \brief (PWM_WPSR) Write Protect SW Status */
+#define PWM_WPSR_WPSWS5 (0x1u << 5) /**< \brief (PWM_WPSR) Write Protect SW Status */
+#define PWM_WPSR_WPVS (0x1u << 7) /**< \brief (PWM_WPSR) Write Protect Violation Status */
+#define PWM_WPSR_WPHWS0 (0x1u << 8) /**< \brief (PWM_WPSR) Write Protect HW Status */
+#define PWM_WPSR_WPHWS1 (0x1u << 9) /**< \brief (PWM_WPSR) Write Protect HW Status */
+#define PWM_WPSR_WPHWS2 (0x1u << 10) /**< \brief (PWM_WPSR) Write Protect HW Status */
+#define PWM_WPSR_WPHWS3 (0x1u << 11) /**< \brief (PWM_WPSR) Write Protect HW Status */
+#define PWM_WPSR_WPHWS4 (0x1u << 12) /**< \brief (PWM_WPSR) Write Protect HW Status */
+#define PWM_WPSR_WPHWS5 (0x1u << 13) /**< \brief (PWM_WPSR) Write Protect HW Status */
+#define PWM_WPSR_WPVSRC_Pos 16
+#define PWM_WPSR_WPVSRC_Msk (0xffffu << PWM_WPSR_WPVSRC_Pos) /**< \brief (PWM_WPSR) Write Protect Violation Source */
+/* -------- PWM_RPR : (PWM Offset: 0x100) Receive Pointer Register -------- */
+#define PWM_RPR_RXPTR_Pos 0
+#define PWM_RPR_RXPTR_Msk (0xffffffffu << PWM_RPR_RXPTR_Pos) /**< \brief (PWM_RPR) Receive Pointer Register */
+#define PWM_RPR_RXPTR(value) ((PWM_RPR_RXPTR_Msk & ((value) << PWM_RPR_RXPTR_Pos)))
+/* -------- PWM_RCR : (PWM Offset: 0x104) Receive Counter Register -------- */
+#define PWM_RCR_RXCTR_Pos 0
+#define PWM_RCR_RXCTR_Msk (0xffffu << PWM_RCR_RXCTR_Pos) /**< \brief (PWM_RCR) Receive Counter Register */
+#define PWM_RCR_RXCTR(value) ((PWM_RCR_RXCTR_Msk & ((value) << PWM_RCR_RXCTR_Pos)))
+/* -------- PWM_TPR : (PWM Offset: 0x108) Transmit Pointer Register -------- */
+#define PWM_TPR_TXPTR_Pos 0
+#define PWM_TPR_TXPTR_Msk (0xffffffffu << PWM_TPR_TXPTR_Pos) /**< \brief (PWM_TPR) Transmit Counter Register */
+#define PWM_TPR_TXPTR(value) ((PWM_TPR_TXPTR_Msk & ((value) << PWM_TPR_TXPTR_Pos)))
+/* -------- PWM_TCR : (PWM Offset: 0x10C) Transmit Counter Register -------- */
+#define PWM_TCR_TXCTR_Pos 0
+#define PWM_TCR_TXCTR_Msk (0xffffu << PWM_TCR_TXCTR_Pos) /**< \brief (PWM_TCR) Transmit Counter Register */
+#define PWM_TCR_TXCTR(value) ((PWM_TCR_TXCTR_Msk & ((value) << PWM_TCR_TXCTR_Pos)))
+/* -------- PWM_RNPR : (PWM Offset: 0x110) Receive Next Pointer Register -------- */
+#define PWM_RNPR_RXNPTR_Pos 0
+#define PWM_RNPR_RXNPTR_Msk (0xffffffffu << PWM_RNPR_RXNPTR_Pos) /**< \brief (PWM_RNPR) Receive Next Pointer */
+#define PWM_RNPR_RXNPTR(value) ((PWM_RNPR_RXNPTR_Msk & ((value) << PWM_RNPR_RXNPTR_Pos)))
+/* -------- PWM_RNCR : (PWM Offset: 0x114) Receive Next Counter Register -------- */
+#define PWM_RNCR_RXNCTR_Pos 0
+#define PWM_RNCR_RXNCTR_Msk (0xffffu << PWM_RNCR_RXNCTR_Pos) /**< \brief (PWM_RNCR) Receive Next Counter */
+#define PWM_RNCR_RXNCTR(value) ((PWM_RNCR_RXNCTR_Msk & ((value) << PWM_RNCR_RXNCTR_Pos)))
+/* -------- PWM_TNPR : (PWM Offset: 0x118) Transmit Next Pointer Register -------- */
+#define PWM_TNPR_TXNPTR_Pos 0
+#define PWM_TNPR_TXNPTR_Msk (0xffffffffu << PWM_TNPR_TXNPTR_Pos) /**< \brief (PWM_TNPR) Transmit Next Pointer */
+#define PWM_TNPR_TXNPTR(value) ((PWM_TNPR_TXNPTR_Msk & ((value) << PWM_TNPR_TXNPTR_Pos)))
+/* -------- PWM_TNCR : (PWM Offset: 0x11C) Transmit Next Counter Register -------- */
+#define PWM_TNCR_TXNCTR_Pos 0
+#define PWM_TNCR_TXNCTR_Msk (0xffffu << PWM_TNCR_TXNCTR_Pos) /**< \brief (PWM_TNCR) Transmit Counter Next */
+#define PWM_TNCR_TXNCTR(value) ((PWM_TNCR_TXNCTR_Msk & ((value) << PWM_TNCR_TXNCTR_Pos)))
+/* -------- PWM_PTCR : (PWM Offset: 0x120) Transfer Control Register -------- */
+#define PWM_PTCR_RXTEN (0x1u << 0) /**< \brief (PWM_PTCR) Receiver Transfer Enable */
+#define PWM_PTCR_RXTDIS (0x1u << 1) /**< \brief (PWM_PTCR) Receiver Transfer Disable */
+#define PWM_PTCR_TXTEN (0x1u << 8) /**< \brief (PWM_PTCR) Transmitter Transfer Enable */
+#define PWM_PTCR_TXTDIS (0x1u << 9) /**< \brief (PWM_PTCR) Transmitter Transfer Disable */
+/* -------- PWM_PTSR : (PWM Offset: 0x124) Transfer Status Register -------- */
+#define PWM_PTSR_RXTEN (0x1u << 0) /**< \brief (PWM_PTSR) Receiver Transfer Enable */
+#define PWM_PTSR_TXTEN (0x1u << 8) /**< \brief (PWM_PTSR) Transmitter Transfer Enable */
+/* -------- PWM_CMPV : (PWM Offset: N/A) PWM Comparison 0 Value Register -------- */
+#define PWM_CMPV_CV_Pos 0
+#define PWM_CMPV_CV_Msk (0xffffffu << PWM_CMPV_CV_Pos) /**< \brief (PWM_CMPV) Comparison x Value */
+#define PWM_CMPV_CV(value) ((PWM_CMPV_CV_Msk & ((value) << PWM_CMPV_CV_Pos)))
+#define PWM_CMPV_CVM (0x1u << 24) /**< \brief (PWM_CMPV) Comparison x Value Mode */
+/* -------- PWM_CMPVUPD : (PWM Offset: N/A) PWM Comparison 0 Value Update Register -------- */
+#define PWM_CMPVUPD_CVUPD_Pos 0
+#define PWM_CMPVUPD_CVUPD_Msk (0xffffffu << PWM_CMPVUPD_CVUPD_Pos) /**< \brief (PWM_CMPVUPD) Comparison x Value Update */
+#define PWM_CMPVUPD_CVUPD(value) ((PWM_CMPVUPD_CVUPD_Msk & ((value) << PWM_CMPVUPD_CVUPD_Pos)))
+#define PWM_CMPVUPD_CVMUPD (0x1u << 24) /**< \brief (PWM_CMPVUPD) Comparison x Value Mode Update */
+/* -------- PWM_CMPM : (PWM Offset: N/A) PWM Comparison 0 Mode Register -------- */
+#define PWM_CMPM_CEN (0x1u << 0) /**< \brief (PWM_CMPM) Comparison x Enable */
+#define PWM_CMPM_CTR_Pos 4
+#define PWM_CMPM_CTR_Msk (0xfu << PWM_CMPM_CTR_Pos) /**< \brief (PWM_CMPM) Comparison x Trigger */
+#define PWM_CMPM_CTR(value) ((PWM_CMPM_CTR_Msk & ((value) << PWM_CMPM_CTR_Pos)))
+#define PWM_CMPM_CPR_Pos 8
+#define PWM_CMPM_CPR_Msk (0xfu << PWM_CMPM_CPR_Pos) /**< \brief (PWM_CMPM) Comparison x Period */
+#define PWM_CMPM_CPR(value) ((PWM_CMPM_CPR_Msk & ((value) << PWM_CMPM_CPR_Pos)))
+#define PWM_CMPM_CPRCNT_Pos 12
+#define PWM_CMPM_CPRCNT_Msk (0xfu << PWM_CMPM_CPRCNT_Pos) /**< \brief (PWM_CMPM) Comparison x Period Counter */
+#define PWM_CMPM_CPRCNT(value) ((PWM_CMPM_CPRCNT_Msk & ((value) << PWM_CMPM_CPRCNT_Pos)))
+#define PWM_CMPM_CUPR_Pos 16
+#define PWM_CMPM_CUPR_Msk (0xfu << PWM_CMPM_CUPR_Pos) /**< \brief (PWM_CMPM) Comparison x Update Period */
+#define PWM_CMPM_CUPR(value) ((PWM_CMPM_CUPR_Msk & ((value) << PWM_CMPM_CUPR_Pos)))
+#define PWM_CMPM_CUPRCNT_Pos 20
+#define PWM_CMPM_CUPRCNT_Msk (0xfu << PWM_CMPM_CUPRCNT_Pos) /**< \brief (PWM_CMPM) Comparison x Update Period Counter */
+#define PWM_CMPM_CUPRCNT(value) ((PWM_CMPM_CUPRCNT_Msk & ((value) << PWM_CMPM_CUPRCNT_Pos)))
+/* -------- PWM_CMPMUPD : (PWM Offset: N/A) PWM Comparison 0 Mode Update Register -------- */
+#define PWM_CMPMUPD_CENUPD (0x1u << 0) /**< \brief (PWM_CMPMUPD) Comparison x Enable Update */
+#define PWM_CMPMUPD_CTRUPD_Pos 4
+#define PWM_CMPMUPD_CTRUPD_Msk (0xfu << PWM_CMPMUPD_CTRUPD_Pos) /**< \brief (PWM_CMPMUPD) Comparison x Trigger Update */
+#define PWM_CMPMUPD_CTRUPD(value) ((PWM_CMPMUPD_CTRUPD_Msk & ((value) << PWM_CMPMUPD_CTRUPD_Pos)))
+#define PWM_CMPMUPD_CPRUPD_Pos 8
+#define PWM_CMPMUPD_CPRUPD_Msk (0xfu << PWM_CMPMUPD_CPRUPD_Pos) /**< \brief (PWM_CMPMUPD) Comparison x Period Update */
+#define PWM_CMPMUPD_CPRUPD(value) ((PWM_CMPMUPD_CPRUPD_Msk & ((value) << PWM_CMPMUPD_CPRUPD_Pos)))
+#define PWM_CMPMUPD_CUPRUPD_Pos 16
+#define PWM_CMPMUPD_CUPRUPD_Msk (0xfu << PWM_CMPMUPD_CUPRUPD_Pos) /**< \brief (PWM_CMPMUPD) Comparison x Update Period Update */
+#define PWM_CMPMUPD_CUPRUPD(value) ((PWM_CMPMUPD_CUPRUPD_Msk & ((value) << PWM_CMPMUPD_CUPRUPD_Pos)))
+/* -------- PWM_CMR : (PWM Offset: N/A) PWM Channel Mode Register -------- */
+#define PWM_CMR_CPRE_Pos 0
+#define PWM_CMR_CPRE_Msk (0xfu << PWM_CMR_CPRE_Pos) /**< \brief (PWM_CMR) Channel Pre-scaler */
+#define PWM_CMR_CPRE_MCK (0x0u << 0) /**< \brief (PWM_CMR) Master clock */
+#define PWM_CMR_CPRE_MCK_DIV_2 (0x1u << 0) /**< \brief (PWM_CMR) Master clock/2 */
+#define PWM_CMR_CPRE_MCK_DIV_4 (0x2u << 0) /**< \brief (PWM_CMR) Master clock/4 */
+#define PWM_CMR_CPRE_MCK_DIV_8 (0x3u << 0) /**< \brief (PWM_CMR) Master clock/8 */
+#define PWM_CMR_CPRE_MCK_DIV_16 (0x4u << 0) /**< \brief (PWM_CMR) Master clock/16 */
+#define PWM_CMR_CPRE_MCK_DIV_32 (0x5u << 0) /**< \brief (PWM_CMR) Master clock/32 */
+#define PWM_CMR_CPRE_MCK_DIV_64 (0x6u << 0) /**< \brief (PWM_CMR) Master clock/64 */
+#define PWM_CMR_CPRE_MCK_DIV_128 (0x7u << 0) /**< \brief (PWM_CMR) Master clock/128 */
+#define PWM_CMR_CPRE_MCK_DIV_256 (0x8u << 0) /**< \brief (PWM_CMR) Master clock/256 */
+#define PWM_CMR_CPRE_MCK_DIV_512 (0x9u << 0) /**< \brief (PWM_CMR) Master clock/512 */
+#define PWM_CMR_CPRE_MCK_DIV_1024 (0xAu << 0) /**< \brief (PWM_CMR) Master clock/1024 */
+#define PWM_CMR_CPRE_CLKA (0xBu << 0) /**< \brief (PWM_CMR) Clock A */
+#define PWM_CMR_CPRE_CLKB (0xCu << 0) /**< \brief (PWM_CMR) Clock B */
+#define PWM_CMR_CALG (0x1u << 8) /**< \brief (PWM_CMR) Channel Alignment */
+#define PWM_CMR_CPOL (0x1u << 9) /**< \brief (PWM_CMR) Channel Polarity */
+#define PWM_CMR_CES (0x1u << 10) /**< \brief (PWM_CMR) Counter Event Selection */
+#define PWM_CMR_DTE (0x1u << 16) /**< \brief (PWM_CMR) Dead-Time Generator Enable */
+#define PWM_CMR_DTHI (0x1u << 17) /**< \brief (PWM_CMR) Dead-Time PWMHx Output Inverted */
+#define PWM_CMR_DTLI (0x1u << 18) /**< \brief (PWM_CMR) Dead-Time PWMLx Output Inverted */
+/* -------- PWM_CDTY : (PWM Offset: N/A) PWM Channel Duty Cycle Register -------- */
+#define PWM_CDTY_CDTY_Pos 0
+#define PWM_CDTY_CDTY_Msk (0xffffffu << PWM_CDTY_CDTY_Pos) /**< \brief (PWM_CDTY) Channel Duty-Cycle */
+#define PWM_CDTY_CDTY(value) ((PWM_CDTY_CDTY_Msk & ((value) << PWM_CDTY_CDTY_Pos)))
+/* -------- PWM_CDTYUPD : (PWM Offset: N/A) PWM Channel Duty Cycle Update Register -------- */
+#define PWM_CDTYUPD_CDTYUPD_Pos 0
+#define PWM_CDTYUPD_CDTYUPD_Msk (0xffffffu << PWM_CDTYUPD_CDTYUPD_Pos) /**< \brief (PWM_CDTYUPD) Channel Duty-Cycle Update */
+#define PWM_CDTYUPD_CDTYUPD(value) ((PWM_CDTYUPD_CDTYUPD_Msk & ((value) << PWM_CDTYUPD_CDTYUPD_Pos)))
+/* -------- PWM_CPRD : (PWM Offset: N/A) PWM Channel Period Register -------- */
+#define PWM_CPRD_CPRD_Pos 0
+#define PWM_CPRD_CPRD_Msk (0xffffffu << PWM_CPRD_CPRD_Pos) /**< \brief (PWM_CPRD) Channel Period */
+#define PWM_CPRD_CPRD(value) ((PWM_CPRD_CPRD_Msk & ((value) << PWM_CPRD_CPRD_Pos)))
+/* -------- PWM_CPRDUPD : (PWM Offset: N/A) PWM Channel Period Update Register -------- */
+#define PWM_CPRDUPD_CPRDUPD_Pos 0
+#define PWM_CPRDUPD_CPRDUPD_Msk (0xffffffu << PWM_CPRDUPD_CPRDUPD_Pos) /**< \brief (PWM_CPRDUPD) Channel Period Update */
+#define PWM_CPRDUPD_CPRDUPD(value) ((PWM_CPRDUPD_CPRDUPD_Msk & ((value) << PWM_CPRDUPD_CPRDUPD_Pos)))
+/* -------- PWM_CCNT : (PWM Offset: N/A) PWM Channel Counter Register -------- */
+#define PWM_CCNT_CNT_Pos 0
+#define PWM_CCNT_CNT_Msk (0xffffffu << PWM_CCNT_CNT_Pos) /**< \brief (PWM_CCNT) Channel Counter Register */
+/* -------- PWM_DT : (PWM Offset: N/A) PWM Channel Dead Time Register -------- */
+#define PWM_DT_DTH_Pos 0
+#define PWM_DT_DTH_Msk (0xffffu << PWM_DT_DTH_Pos) /**< \brief (PWM_DT) Dead-Time Value for PWMHx Output */
+#define PWM_DT_DTH(value) ((PWM_DT_DTH_Msk & ((value) << PWM_DT_DTH_Pos)))
+#define PWM_DT_DTL_Pos 16
+#define PWM_DT_DTL_Msk (0xffffu << PWM_DT_DTL_Pos) /**< \brief (PWM_DT) Dead-Time Value for PWMLx Output */
+#define PWM_DT_DTL(value) ((PWM_DT_DTL_Msk & ((value) << PWM_DT_DTL_Pos)))
+/* -------- PWM_DTUPD : (PWM Offset: N/A) PWM Channel Dead Time Update Register -------- */
+#define PWM_DTUPD_DTHUPD_Pos 0
+#define PWM_DTUPD_DTHUPD_Msk (0xffffu << PWM_DTUPD_DTHUPD_Pos) /**< \brief (PWM_DTUPD) Dead-Time Value Update for PWMHx Output */
+#define PWM_DTUPD_DTHUPD(value) ((PWM_DTUPD_DTHUPD_Msk & ((value) << PWM_DTUPD_DTHUPD_Pos)))
+#define PWM_DTUPD_DTLUPD_Pos 16
+#define PWM_DTUPD_DTLUPD_Msk (0xffffu << PWM_DTUPD_DTLUPD_Pos) /**< \brief (PWM_DTUPD) Dead-Time Value Update for PWMLx Output */
+#define PWM_DTUPD_DTLUPD(value) ((PWM_DTUPD_DTLUPD_Msk & ((value) << PWM_DTUPD_DTLUPD_Pos)))
+
+/*@}*/
+
+/* ============================================================================= */
+/** SOFTWARE API DEFINITION FOR Reset Controller */
+/* ============================================================================= */
+/** \addtogroup SAM3XA_RSTC Reset Controller */
+/*@{*/
+
+#ifndef __ASSEMBLY__
+/** \brief Rstc hardware registers */
+typedef struct {
+ WoReg RSTC_CR; /**< \brief (Rstc Offset: 0x00) Control Register */
+ RoReg RSTC_SR; /**< \brief (Rstc Offset: 0x04) Status Register */
+ RwReg RSTC_MR; /**< \brief (Rstc Offset: 0x08) Mode Register */
+} Rstc;
+#endif /* __ASSEMBLY__ */
+/* -------- RSTC_CR : (RSTC Offset: 0x00) Control Register -------- */
+#define RSTC_CR_PROCRST (0x1u << 0) /**< \brief (RSTC_CR) Processor Reset */
+#define RSTC_CR_PERRST (0x1u << 2) /**< \brief (RSTC_CR) Peripheral Reset */
+#define RSTC_CR_EXTRST (0x1u << 3) /**< \brief (RSTC_CR) External Reset */
+#define RSTC_CR_KEY_Pos 24
+#define RSTC_CR_KEY_Msk (0xffu << RSTC_CR_KEY_Pos) /**< \brief (RSTC_CR) Password */
+#define RSTC_CR_KEY(value) ((RSTC_CR_KEY_Msk & ((value) << RSTC_CR_KEY_Pos)))
+/* -------- RSTC_SR : (RSTC Offset: 0x04) Status Register -------- */
+#define RSTC_SR_URSTS (0x1u << 0) /**< \brief (RSTC_SR) User Reset Status */
+#define RSTC_SR_RSTTYP_Pos 8
+#define RSTC_SR_RSTTYP_Msk (0x7u << RSTC_SR_RSTTYP_Pos) /**< \brief (RSTC_SR) Reset Type */
+#define RSTC_SR_NRSTL (0x1u << 16) /**< \brief (RSTC_SR) NRST Pin Level */
+#define RSTC_SR_SRCMP (0x1u << 17) /**< \brief (RSTC_SR) Software Reset Command in Progress */
+/* -------- RSTC_MR : (RSTC Offset: 0x08) Mode Register -------- */
+#define RSTC_MR_URSTEN (0x1u << 0) /**< \brief (RSTC_MR) User Reset Enable */
+#define RSTC_MR_URSTIEN (0x1u << 4) /**< \brief (RSTC_MR) User Reset Interrupt Enable */
+#define RSTC_MR_ERSTL_Pos 8
+#define RSTC_MR_ERSTL_Msk (0xfu << RSTC_MR_ERSTL_Pos) /**< \brief (RSTC_MR) External Reset Length */
+#define RSTC_MR_ERSTL(value) ((RSTC_MR_ERSTL_Msk & ((value) << RSTC_MR_ERSTL_Pos)))
+#define RSTC_MR_KEY_Pos 24
+#define RSTC_MR_KEY_Msk (0xffu << RSTC_MR_KEY_Pos) /**< \brief (RSTC_MR) Password */
+#define RSTC_MR_KEY(value) ((RSTC_MR_KEY_Msk & ((value) << RSTC_MR_KEY_Pos)))
+
+/*@}*/
+
+/* ============================================================================= */
+/** SOFTWARE API DEFINITION FOR Real-time Clock */
+/* ============================================================================= */
+/** \addtogroup SAM3XA_RTC Real-time Clock */
+/*@{*/
+
+#ifndef __ASSEMBLY__
+/** \brief Rtc hardware registers */
+typedef struct {
+ RwReg RTC_CR; /**< \brief (Rtc Offset: 0x00) Control Register */
+ RwReg RTC_MR; /**< \brief (Rtc Offset: 0x04) Mode Register */
+ RwReg RTC_TIMR; /**< \brief (Rtc Offset: 0x08) Time Register */
+ RwReg RTC_CALR; /**< \brief (Rtc Offset: 0x0C) Calendar Register */
+ RwReg RTC_TIMALR; /**< \brief (Rtc Offset: 0x10) Time Alarm Register */
+ RwReg RTC_CALALR; /**< \brief (Rtc Offset: 0x14) Calendar Alarm Register */
+ RoReg RTC_SR; /**< \brief (Rtc Offset: 0x18) Status Register */
+ WoReg RTC_SCCR; /**< \brief (Rtc Offset: 0x1C) Status Clear Command Register */
+ WoReg RTC_IER; /**< \brief (Rtc Offset: 0x20) Interrupt Enable Register */
+ WoReg RTC_IDR; /**< \brief (Rtc Offset: 0x24) Interrupt Disable Register */
+ RoReg RTC_IMR; /**< \brief (Rtc Offset: 0x28) Interrupt Mask Register */
+ RoReg RTC_VER; /**< \brief (Rtc Offset: 0x2C) Valid Entry Register */
+ RoReg Reserved1[45];
+ RwReg RTC_WPMR; /**< \brief (Rtc Offset: 0xE4) Write Protect Mode Register */
+} Rtc;
+#endif /* __ASSEMBLY__ */
+/* -------- RTC_CR : (RTC Offset: 0x00) Control Register -------- */
+#define RTC_CR_UPDTIM (0x1u << 0) /**< \brief (RTC_CR) Update Request Time Register */
+#define RTC_CR_UPDCAL (0x1u << 1) /**< \brief (RTC_CR) Update Request Calendar Register */
+#define RTC_CR_TIMEVSEL_Pos 8
+#define RTC_CR_TIMEVSEL_Msk (0x3u << RTC_CR_TIMEVSEL_Pos) /**< \brief (RTC_CR) Time Event Selection */
+#define RTC_CR_TIMEVSEL_MINUTE (0x0u << 8) /**< \brief (RTC_CR) Minute change */
+#define RTC_CR_TIMEVSEL_HOUR (0x1u << 8) /**< \brief (RTC_CR) Hour change */
+#define RTC_CR_TIMEVSEL_MIDNIGHT (0x2u << 8) /**< \brief (RTC_CR) Every day at midnight */
+#define RTC_CR_TIMEVSEL_NOON (0x3u << 8) /**< \brief (RTC_CR) Every day at noon */
+#define RTC_CR_CALEVSEL_Pos 16
+#define RTC_CR_CALEVSEL_Msk (0x3u << RTC_CR_CALEVSEL_Pos) /**< \brief (RTC_CR) Calendar Event Selection */
+#define RTC_CR_CALEVSEL_WEEK (0x0u << 16) /**< \brief (RTC_CR) Week change (every Monday at time 00:00:00) */
+#define RTC_CR_CALEVSEL_MONTH (0x1u << 16) /**< \brief (RTC_CR) Month change (every 01 of each month at time 00:00:00) */
+#define RTC_CR_CALEVSEL_YEAR (0x2u << 16) /**< \brief (RTC_CR) Year change (every January 1 at time 00:00:00) */
+/* -------- RTC_MR : (RTC Offset: 0x04) Mode Register -------- */
+#define RTC_MR_HRMOD (0x1u << 0) /**< \brief (RTC_MR) 12-/24-hour Mode */
+/* -------- RTC_TIMR : (RTC Offset: 0x08) Time Register -------- */
+#define RTC_TIMR_SEC_Pos 0
+#define RTC_TIMR_SEC_Msk (0x7fu << RTC_TIMR_SEC_Pos) /**< \brief (RTC_TIMR) Current Second */
+#define RTC_TIMR_SEC(value) ((RTC_TIMR_SEC_Msk & ((value) << RTC_TIMR_SEC_Pos)))
+#define RTC_TIMR_MIN_Pos 8
+#define RTC_TIMR_MIN_Msk (0x7fu << RTC_TIMR_MIN_Pos) /**< \brief (RTC_TIMR) Current Minute */
+#define RTC_TIMR_MIN(value) ((RTC_TIMR_MIN_Msk & ((value) << RTC_TIMR_MIN_Pos)))
+#define RTC_TIMR_HOUR_Pos 16
+#define RTC_TIMR_HOUR_Msk (0x3fu << RTC_TIMR_HOUR_Pos) /**< \brief (RTC_TIMR) Current Hour */
+#define RTC_TIMR_HOUR(value) ((RTC_TIMR_HOUR_Msk & ((value) << RTC_TIMR_HOUR_Pos)))
+#define RTC_TIMR_AMPM (0x1u << 22) /**< \brief (RTC_TIMR) Ante Meridiem Post Meridiem Indicator */
+/* -------- RTC_CALR : (RTC Offset: 0x0C) Calendar Register -------- */
+#define RTC_CALR_CENT_Pos 0
+#define RTC_CALR_CENT_Msk (0x7fu << RTC_CALR_CENT_Pos) /**< \brief (RTC_CALR) Current Century */
+#define RTC_CALR_CENT(value) ((RTC_CALR_CENT_Msk & ((value) << RTC_CALR_CENT_Pos)))
+#define RTC_CALR_YEAR_Pos 8
+#define RTC_CALR_YEAR_Msk (0xffu << RTC_CALR_YEAR_Pos) /**< \brief (RTC_CALR) Current Year */
+#define RTC_CALR_YEAR(value) ((RTC_CALR_YEAR_Msk & ((value) << RTC_CALR_YEAR_Pos)))
+#define RTC_CALR_MONTH_Pos 16
+#define RTC_CALR_MONTH_Msk (0x1fu << RTC_CALR_MONTH_Pos) /**< \brief (RTC_CALR) Current Month */
+#define RTC_CALR_MONTH(value) ((RTC_CALR_MONTH_Msk & ((value) << RTC_CALR_MONTH_Pos)))
+#define RTC_CALR_DAY_Pos 21
+#define RTC_CALR_DAY_Msk (0x7u << RTC_CALR_DAY_Pos) /**< \brief (RTC_CALR) Current Day in Current Week */
+#define RTC_CALR_DAY(value) ((RTC_CALR_DAY_Msk & ((value) << RTC_CALR_DAY_Pos)))
+#define RTC_CALR_DATE_Pos 24
+#define RTC_CALR_DATE_Msk (0x3fu << RTC_CALR_DATE_Pos) /**< \brief (RTC_CALR) Current Day in Current Month */
+#define RTC_CALR_DATE(value) ((RTC_CALR_DATE_Msk & ((value) << RTC_CALR_DATE_Pos)))
+/* -------- RTC_TIMALR : (RTC Offset: 0x10) Time Alarm Register -------- */
+#define RTC_TIMALR_SEC_Pos 0
+#define RTC_TIMALR_SEC_Msk (0x7fu << RTC_TIMALR_SEC_Pos) /**< \brief (RTC_TIMALR) Second Alarm */
+#define RTC_TIMALR_SEC(value) ((RTC_TIMALR_SEC_Msk & ((value) << RTC_TIMALR_SEC_Pos)))
+#define RTC_TIMALR_SECEN (0x1u << 7) /**< \brief (RTC_TIMALR) Second Alarm Enable */
+#define RTC_TIMALR_MIN_Pos 8
+#define RTC_TIMALR_MIN_Msk (0x7fu << RTC_TIMALR_MIN_Pos) /**< \brief (RTC_TIMALR) Minute Alarm */
+#define RTC_TIMALR_MIN(value) ((RTC_TIMALR_MIN_Msk & ((value) << RTC_TIMALR_MIN_Pos)))
+#define RTC_TIMALR_MINEN (0x1u << 15) /**< \brief (RTC_TIMALR) Minute Alarm Enable */
+#define RTC_TIMALR_HOUR_Pos 16
+#define RTC_TIMALR_HOUR_Msk (0x3fu << RTC_TIMALR_HOUR_Pos) /**< \brief (RTC_TIMALR) Hour Alarm */
+#define RTC_TIMALR_HOUR(value) ((RTC_TIMALR_HOUR_Msk & ((value) << RTC_TIMALR_HOUR_Pos)))
+#define RTC_TIMALR_AMPM (0x1u << 22) /**< \brief (RTC_TIMALR) AM/PM Indicator */
+#define RTC_TIMALR_HOUREN (0x1u << 23) /**< \brief (RTC_TIMALR) Hour Alarm Enable */
+/* -------- RTC_CALALR : (RTC Offset: 0x14) Calendar Alarm Register -------- */
+#define RTC_CALALR_MONTH_Pos 16
+#define RTC_CALALR_MONTH_Msk (0x1fu << RTC_CALALR_MONTH_Pos) /**< \brief (RTC_CALALR) Month Alarm */
+#define RTC_CALALR_MONTH(value) ((RTC_CALALR_MONTH_Msk & ((value) << RTC_CALALR_MONTH_Pos)))
+#define RTC_CALALR_MTHEN (0x1u << 23) /**< \brief (RTC_CALALR) Month Alarm Enable */
+#define RTC_CALALR_DATE_Pos 24
+#define RTC_CALALR_DATE_Msk (0x3fu << RTC_CALALR_DATE_Pos) /**< \brief (RTC_CALALR) Date Alarm */
+#define RTC_CALALR_DATE(value) ((RTC_CALALR_DATE_Msk & ((value) << RTC_CALALR_DATE_Pos)))
+#define RTC_CALALR_DATEEN (0x1u << 31) /**< \brief (RTC_CALALR) Date Alarm Enable */
+/* -------- RTC_SR : (RTC Offset: 0x18) Status Register -------- */
+#define RTC_SR_ACKUPD (0x1u << 0) /**< \brief (RTC_SR) Acknowledge for Update */
+#define RTC_SR_ALARM (0x1u << 1) /**< \brief (RTC_SR) Alarm Flag */
+#define RTC_SR_SEC (0x1u << 2) /**< \brief (RTC_SR) Second Event */
+#define RTC_SR_TIMEV (0x1u << 3) /**< \brief (RTC_SR) Time Event */
+#define RTC_SR_CALEV (0x1u << 4) /**< \brief (RTC_SR) Calendar Event */
+/* -------- RTC_SCCR : (RTC Offset: 0x1C) Status Clear Command Register -------- */
+#define RTC_SCCR_ACKCLR (0x1u << 0) /**< \brief (RTC_SCCR) Acknowledge Clear */
+#define RTC_SCCR_ALRCLR (0x1u << 1) /**< \brief (RTC_SCCR) Alarm Clear */
+#define RTC_SCCR_SECCLR (0x1u << 2) /**< \brief (RTC_SCCR) Second Clear */
+#define RTC_SCCR_TIMCLR (0x1u << 3) /**< \brief (RTC_SCCR) Time Clear */
+#define RTC_SCCR_CALCLR (0x1u << 4) /**< \brief (RTC_SCCR) Calendar Clear */
+/* -------- RTC_IER : (RTC Offset: 0x20) Interrupt Enable Register -------- */
+#define RTC_IER_ACKEN (0x1u << 0) /**< \brief (RTC_IER) Acknowledge Update Interrupt Enable */
+#define RTC_IER_ALREN (0x1u << 1) /**< \brief (RTC_IER) Alarm Interrupt Enable */
+#define RTC_IER_SECEN (0x1u << 2) /**< \brief (RTC_IER) Second Event Interrupt Enable */
+#define RTC_IER_TIMEN (0x1u << 3) /**< \brief (RTC_IER) Time Event Interrupt Enable */
+#define RTC_IER_CALEN (0x1u << 4) /**< \brief (RTC_IER) Calendar Event Interrupt Enable */
+/* -------- RTC_IDR : (RTC Offset: 0x24) Interrupt Disable Register -------- */
+#define RTC_IDR_ACKDIS (0x1u << 0) /**< \brief (RTC_IDR) Acknowledge Update Interrupt Disable */
+#define RTC_IDR_ALRDIS (0x1u << 1) /**< \brief (RTC_IDR) Alarm Interrupt Disable */
+#define RTC_IDR_SECDIS (0x1u << 2) /**< \brief (RTC_IDR) Second Event Interrupt Disable */
+#define RTC_IDR_TIMDIS (0x1u << 3) /**< \brief (RTC_IDR) Time Event Interrupt Disable */
+#define RTC_IDR_CALDIS (0x1u << 4) /**< \brief (RTC_IDR) Calendar Event Interrupt Disable */
+/* -------- RTC_IMR : (RTC Offset: 0x28) Interrupt Mask Register -------- */
+#define RTC_IMR_ACK (0x1u << 0) /**< \brief (RTC_IMR) Acknowledge Update Interrupt Mask */
+#define RTC_IMR_ALR (0x1u << 1) /**< \brief (RTC_IMR) Alarm Interrupt Mask */
+#define RTC_IMR_SEC (0x1u << 2) /**< \brief (RTC_IMR) Second Event Interrupt Mask */
+#define RTC_IMR_TIM (0x1u << 3) /**< \brief (RTC_IMR) Time Event Interrupt Mask */
+#define RTC_IMR_CAL (0x1u << 4) /**< \brief (RTC_IMR) Calendar Event Interrupt Mask */
+/* -------- RTC_VER : (RTC Offset: 0x2C) Valid Entry Register -------- */
+#define RTC_VER_NVTIM (0x1u << 0) /**< \brief (RTC_VER) Non-valid Time */
+#define RTC_VER_NVCAL (0x1u << 1) /**< \brief (RTC_VER) Non-valid Calendar */
+#define RTC_VER_NVTIMALR (0x1u << 2) /**< \brief (RTC_VER) Non-valid Time Alarm */
+#define RTC_VER_NVCALALR (0x1u << 3) /**< \brief (RTC_VER) Non-valid Calendar Alarm */
+/* -------- RTC_WPMR : (RTC Offset: 0xE4) Write Protect Mode Register -------- */
+#define RTC_WPMR_WPEN (0x1u << 0) /**< \brief (RTC_WPMR) Write Protect Enable */
+#define RTC_WPMR_WPKEY_Pos 8
+#define RTC_WPMR_WPKEY_Msk (0xffffffu << RTC_WPMR_WPKEY_Pos) /**< \brief (RTC_WPMR) */
+#define RTC_WPMR_WPKEY(value) ((RTC_WPMR_WPKEY_Msk & ((value) << RTC_WPMR_WPKEY_Pos)))
+
+/*@}*/
+
+/* ============================================================================= */
+/** SOFTWARE API DEFINITION FOR Real-time Timer */
+/* ============================================================================= */
+/** \addtogroup SAM3XA_RTT Real-time Timer */
+/*@{*/
+
+#ifndef __ASSEMBLY__
+/** \brief Rtt hardware registers */
+typedef struct {
+ RwReg RTT_MR; /**< \brief (Rtt Offset: 0x00) Mode Register */
+ RwReg RTT_AR; /**< \brief (Rtt Offset: 0x04) Alarm Register */
+ RoReg RTT_VR; /**< \brief (Rtt Offset: 0x08) Value Register */
+ RoReg RTT_SR; /**< \brief (Rtt Offset: 0x0C) Status Register */
+} Rtt;
+#endif /* __ASSEMBLY__ */
+/* -------- RTT_MR : (RTT Offset: 0x00) Mode Register -------- */
+#define RTT_MR_RTPRES_Pos 0
+#define RTT_MR_RTPRES_Msk (0xffffu << RTT_MR_RTPRES_Pos) /**< \brief (RTT_MR) Real-time Timer Prescaler Value */
+#define RTT_MR_RTPRES(value) ((RTT_MR_RTPRES_Msk & ((value) << RTT_MR_RTPRES_Pos)))
+#define RTT_MR_ALMIEN (0x1u << 16) /**< \brief (RTT_MR) Alarm Interrupt Enable */
+#define RTT_MR_RTTINCIEN (0x1u << 17) /**< \brief (RTT_MR) Real-time Timer Increment Interrupt Enable */
+#define RTT_MR_RTTRST (0x1u << 18) /**< \brief (RTT_MR) Real-time Timer Restart */
+/* -------- RTT_AR : (RTT Offset: 0x04) Alarm Register -------- */
+#define RTT_AR_ALMV_Pos 0
+#define RTT_AR_ALMV_Msk (0xffffffffu << RTT_AR_ALMV_Pos) /**< \brief (RTT_AR) Alarm Value */
+#define RTT_AR_ALMV(value) ((RTT_AR_ALMV_Msk & ((value) << RTT_AR_ALMV_Pos)))
+/* -------- RTT_VR : (RTT Offset: 0x08) Value Register -------- */
+#define RTT_VR_CRTV_Pos 0
+#define RTT_VR_CRTV_Msk (0xffffffffu << RTT_VR_CRTV_Pos) /**< \brief (RTT_VR) Current Real-time Value */
+/* -------- RTT_SR : (RTT Offset: 0x0C) Status Register -------- */
+#define RTT_SR_ALMS (0x1u << 0) /**< \brief (RTT_SR) Real-time Alarm Status */
+#define RTT_SR_RTTINC (0x1u << 1) /**< \brief (RTT_SR) Real-time Timer Increment */
+
+/*@}*/
+
+/* ============================================================================= */
+/** SOFTWARE API DEFINITION FOR SDRAM Controller */
+/* ============================================================================= */
+/** \addtogroup SAM3XA_SDRAMC SDRAM Controller */
+/*@{*/
+
+#ifndef __ASSEMBLY__
+/** \brief Sdramc hardware registers */
+typedef struct {
+ RwReg SDRAMC_MR; /**< \brief (Sdramc Offset: 0x00) SDRAMC Mode Register */
+ RwReg SDRAMC_TR; /**< \brief (Sdramc Offset: 0x04) SDRAMC Refresh Timer Register */
+ RwReg SDRAMC_CR; /**< \brief (Sdramc Offset: 0x08) SDRAMC Configuration Register */
+ RoReg Reserved1[1];
+ RwReg SDRAMC_LPR; /**< \brief (Sdramc Offset: 0x10) SDRAMC Low Power Register */
+ WoReg SDRAMC_IER; /**< \brief (Sdramc Offset: 0x14) SDRAMC Interrupt Enable Register */
+ WoReg SDRAMC_IDR; /**< \brief (Sdramc Offset: 0x18) SDRAMC Interrupt Disable Register */
+ RoReg SDRAMC_IMR; /**< \brief (Sdramc Offset: 0x1C) SDRAMC Interrupt Mask Register */
+ RoReg SDRAMC_ISR; /**< \brief (Sdramc Offset: 0x20) SDRAMC Interrupt Status Register */
+ RwReg SDRAMC_MDR; /**< \brief (Sdramc Offset: 0x24) SDRAMC Memory Device Register */
+ RwReg SDRAMC_CR1; /**< \brief (Sdramc Offset: 0x28) SDRAMC Configuration Register 1 */
+ RwReg SDRAMC_OCMS; /**< \brief (Sdramc Offset: 0x2C) SDRAMC OCMS Register 1 */
+} Sdramc;
+#endif /* __ASSEMBLY__ */
+/* -------- SDRAMC_MR : (SDRAMC Offset: 0x00) SDRAMC Mode Register -------- */
+#define SDRAMC_MR_MODE_Pos 0
+#define SDRAMC_MR_MODE_Msk (0x7u << SDRAMC_MR_MODE_Pos) /**< \brief (SDRAMC_MR) SDRAMC Command Mode */
+#define SDRAMC_MR_MODE_NORMAL (0x0u << 0) /**< \brief (SDRAMC_MR) Normal mode. Any access to the SDRAM is decoded normally. To activate this mode, command must be followed by a write to the SDRAM. */
+#define SDRAMC_MR_MODE_NOP (0x1u << 0) /**< \brief (SDRAMC_MR) The SDRAM Controller issues a NOP command when the SDRAM device is accessed regardless of the cycle. To activate this mode, command must be followed by a write to the SDRAM. */
+#define SDRAMC_MR_MODE_ALLBANKS_PRECHARGE (0x2u << 0) /**< \brief (SDRAMC_MR) The SDRAM Controller issues an "All Banks Precharge" command when the SDRAM device is accessed regardless of the cycle. To activate this mode, command must be followed by a write to the SDRAM. */
+#define SDRAMC_MR_MODE_LOAD_MODEREG (0x3u << 0) /**< \brief (SDRAMC_MR) The SDRAM Controller issues a "Load Mode Register" command when the SDRAM device is accessed regardless of the cycle. To activate this mode, command must be followed by a write to the SDRAM. */
+#define SDRAMC_MR_MODE_AUTO_REFRESH (0x4u << 0) /**< \brief (SDRAMC_MR) The SDRAM Controller issues an "Auto-Refresh" Command when the SDRAM device is accessed regardless of the cycle. Previously, an "All Banks Precharge" command must be issued. To activate this mode, command must be followed by a write to the SDRAM. */
+#define SDRAMC_MR_MODE_EXT_LOAD_MODEREG (0x5u << 0) /**< \brief (SDRAMC_MR) The SDRAM Controller issues an "Extended Load Mode Register" command when the SDRAM device is accessed regardless of the cycle. To activate this mode, the "Extended Load Mode Register" command must be followed by a write to the SDRAM. The write in the SDRAM must be done in the appropriate bank; most low-power SDRAM devices use the bank 1. */
+#define SDRAMC_MR_MODE_DEEP_POWERDOWN (0x6u << 0) /**< \brief (SDRAMC_MR) Deep power-down mode. Enters deep power-down mode. */
+/* -------- SDRAMC_TR : (SDRAMC Offset: 0x04) SDRAMC Refresh Timer Register -------- */
+#define SDRAMC_TR_COUNT_Pos 0
+#define SDRAMC_TR_COUNT_Msk (0xfffu << SDRAMC_TR_COUNT_Pos) /**< \brief (SDRAMC_TR) SDRAMC Refresh Timer Count */
+#define SDRAMC_TR_COUNT(value) ((SDRAMC_TR_COUNT_Msk & ((value) << SDRAMC_TR_COUNT_Pos)))
+/* -------- SDRAMC_CR : (SDRAMC Offset: 0x08) SDRAMC Configuration Register -------- */
+#define SDRAMC_CR_NC_Pos 0
+#define SDRAMC_CR_NC_Msk (0x3u << SDRAMC_CR_NC_Pos) /**< \brief (SDRAMC_CR) Number of Column Bits */
+#define SDRAMC_CR_NC_COL8 (0x0u << 0) /**< \brief (SDRAMC_CR) 8 column bits */
+#define SDRAMC_CR_NC_COL9 (0x1u << 0) /**< \brief (SDRAMC_CR) 9 column bits */
+#define SDRAMC_CR_NC_COL10 (0x2u << 0) /**< \brief (SDRAMC_CR) 10 column bits */
+#define SDRAMC_CR_NC_COL11 (0x3u << 0) /**< \brief (SDRAMC_CR) 11 column bits */
+#define SDRAMC_CR_NR_Pos 2
+#define SDRAMC_CR_NR_Msk (0x3u << SDRAMC_CR_NR_Pos) /**< \brief (SDRAMC_CR) Number of Row Bits */
+#define SDRAMC_CR_NR_ROW11 (0x0u << 2) /**< \brief (SDRAMC_CR) 11 row bits */
+#define SDRAMC_CR_NR_ROW12 (0x1u << 2) /**< \brief (SDRAMC_CR) 12 row bits */
+#define SDRAMC_CR_NR_ROW13 (0x2u << 2) /**< \brief (SDRAMC_CR) 13 row bits */
+#define SDRAMC_CR_NB (0x1u << 4) /**< \brief (SDRAMC_CR) Number of Banks */
+#define SDRAMC_CR_NB_BANK2 (0x0u << 4) /**< \brief (SDRAMC_CR) 2 banks */
+#define SDRAMC_CR_NB_BANK4 (0x1u << 4) /**< \brief (SDRAMC_CR) 4 banks */
+#define SDRAMC_CR_CAS_Pos 5
+#define SDRAMC_CR_CAS_Msk (0x3u << SDRAMC_CR_CAS_Pos) /**< \brief (SDRAMC_CR) CAS Latency */
+#define SDRAMC_CR_CAS_LATENCY1 (0x1u << 5) /**< \brief (SDRAMC_CR) 1 cycle CAS latency */
+#define SDRAMC_CR_CAS_LATENCY2 (0x2u << 5) /**< \brief (SDRAMC_CR) 2 cycle CAS latency */
+#define SDRAMC_CR_CAS_LATENCY3 (0x3u << 5) /**< \brief (SDRAMC_CR) 3 cycle CAS latency */
+#define SDRAMC_CR_DBW (0x1u << 7) /**< \brief (SDRAMC_CR) Data Bus Width */
+#define SDRAMC_CR_TWR_Pos 8
+#define SDRAMC_CR_TWR_Msk (0xfu << SDRAMC_CR_TWR_Pos) /**< \brief (SDRAMC_CR) Write Recovery Delay */
+#define SDRAMC_CR_TWR(value) ((SDRAMC_CR_TWR_Msk & ((value) << SDRAMC_CR_TWR_Pos)))
+#define SDRAMC_CR_TRC_TRFC_Pos 12
+#define SDRAMC_CR_TRC_TRFC_Msk (0xfu << SDRAMC_CR_TRC_TRFC_Pos) /**< \brief (SDRAMC_CR) Row Cycle Delay and Row Refresh Cycle */
+#define SDRAMC_CR_TRC_TRFC(value) ((SDRAMC_CR_TRC_TRFC_Msk & ((value) << SDRAMC_CR_TRC_TRFC_Pos)))
+#define SDRAMC_CR_TRP_Pos 16
+#define SDRAMC_CR_TRP_Msk (0xfu << SDRAMC_CR_TRP_Pos) /**< \brief (SDRAMC_CR) Row Precharge Delay */
+#define SDRAMC_CR_TRP(value) ((SDRAMC_CR_TRP_Msk & ((value) << SDRAMC_CR_TRP_Pos)))
+#define SDRAMC_CR_TRCD_Pos 20
+#define SDRAMC_CR_TRCD_Msk (0xfu << SDRAMC_CR_TRCD_Pos) /**< \brief (SDRAMC_CR) Row to Column Delay */
+#define SDRAMC_CR_TRCD(value) ((SDRAMC_CR_TRCD_Msk & ((value) << SDRAMC_CR_TRCD_Pos)))
+#define SDRAMC_CR_TRAS_Pos 24
+#define SDRAMC_CR_TRAS_Msk (0xfu << SDRAMC_CR_TRAS_Pos) /**< \brief (SDRAMC_CR) Active to Precharge Delay */
+#define SDRAMC_CR_TRAS(value) ((SDRAMC_CR_TRAS_Msk & ((value) << SDRAMC_CR_TRAS_Pos)))
+#define SDRAMC_CR_TXSR_Pos 28
+#define SDRAMC_CR_TXSR_Msk (0xfu << SDRAMC_CR_TXSR_Pos) /**< \brief (SDRAMC_CR) Exit Self Refresh to Active Delay */
+#define SDRAMC_CR_TXSR(value) ((SDRAMC_CR_TXSR_Msk & ((value) << SDRAMC_CR_TXSR_Pos)))
+/* -------- SDRAMC_LPR : (SDRAMC Offset: 0x10) SDRAMC Low Power Register -------- */
+#define SDRAMC_LPR_LPCB_Pos 0
+#define SDRAMC_LPR_LPCB_Msk (0x3u << SDRAMC_LPR_LPCB_Pos) /**< \brief (SDRAMC_LPR) Low-power Configuration Bits */
+#define SDRAMC_LPR_LPCB_DISABLED (0x0u << 0) /**< \brief (SDRAMC_LPR) Low Power Feature is inhibited: no Power-down, Self-refresh or Deep Power-down command is issued to the SDRAM device. */
+#define SDRAMC_LPR_LPCB_SELF_REFRESH (0x1u << 0) /**< \brief (SDRAMC_LPR) The SDRAM Controller issues a Self-refresh command to the SDRAM device, the SDCK clock is deactivated and the SDCKE signal is set low. The SDRAM device leaves the Self Refresh Mode when accessed and enters it after the access. */
+#define SDRAMC_LPR_LPCB_POWER_DOWN (0x2u << 0) /**< \brief (SDRAMC_LPR) The SDRAM Controller issues a Power-down Command to the SDRAM device after each access, the SDCKE signal is set to low. The SDRAM device leaves the Power-down Mode when accessed and enters it after the access. */
+#define SDRAMC_LPR_LPCB_DEEP_POWER_DOWN (0x3u << 0) /**< \brief (SDRAMC_LPR) The SDRAM Controller issues a Deep Power-down command to the SDRAM device. This mode is unique to low-power SDRAM. */
+#define SDRAMC_LPR_PASR_Pos 4
+#define SDRAMC_LPR_PASR_Msk (0x7u << SDRAMC_LPR_PASR_Pos) /**< \brief (SDRAMC_LPR) Partial Array Self-refresh (only for low-power SDRAM) */
+#define SDRAMC_LPR_PASR(value) ((SDRAMC_LPR_PASR_Msk & ((value) << SDRAMC_LPR_PASR_Pos)))
+#define SDRAMC_LPR_TCSR_Pos 8
+#define SDRAMC_LPR_TCSR_Msk (0x3u << SDRAMC_LPR_TCSR_Pos) /**< \brief (SDRAMC_LPR) Temperature Compensated Self-Refresh (only for low-power SDRAM) */
+#define SDRAMC_LPR_TCSR(value) ((SDRAMC_LPR_TCSR_Msk & ((value) << SDRAMC_LPR_TCSR_Pos)))
+#define SDRAMC_LPR_DS_Pos 10
+#define SDRAMC_LPR_DS_Msk (0x3u << SDRAMC_LPR_DS_Pos) /**< \brief (SDRAMC_LPR) Drive Strength (only for low-power SDRAM) */
+#define SDRAMC_LPR_DS(value) ((SDRAMC_LPR_DS_Msk & ((value) << SDRAMC_LPR_DS_Pos)))
+#define SDRAMC_LPR_TIMEOUT_Pos 12
+#define SDRAMC_LPR_TIMEOUT_Msk (0x3u << SDRAMC_LPR_TIMEOUT_Pos) /**< \brief (SDRAMC_LPR) Time to define when low-power mode is enable */
+#define SDRAMC_LPR_TIMEOUT_LP_LAST_XFER (0x0u << 12) /**< \brief (SDRAMC_LPR) The SDRAM controller activates the SDRAM low-power mode immediately after the end of the last transfer. */
+#define SDRAMC_LPR_TIMEOUT_LP_LAST_XFER_64 (0x1u << 12) /**< \brief (SDRAMC_LPR) The SDRAM controller activates the SDRAM low-power mode 64 clock cycles after the end of the last transfer. */
+#define SDRAMC_LPR_TIMEOUT_LP_LAST_XFER_128 (0x2u << 12) /**< \brief (SDRAMC_LPR) The SDRAM controller activates the SDRAM low-power mode 128 clock cycles after the end of the last transfer. */
+/* -------- SDRAMC_IER : (SDRAMC Offset: 0x14) SDRAMC Interrupt Enable Register -------- */
+#define SDRAMC_IER_RES (0x1u << 0) /**< \brief (SDRAMC_IER) Refresh Error Status */
+/* -------- SDRAMC_IDR : (SDRAMC Offset: 0x18) SDRAMC Interrupt Disable Register -------- */
+#define SDRAMC_IDR_RES (0x1u << 0) /**< \brief (SDRAMC_IDR) Refresh Error Status */
+/* -------- SDRAMC_IMR : (SDRAMC Offset: 0x1C) SDRAMC Interrupt Mask Register -------- */
+#define SDRAMC_IMR_RES (0x1u << 0) /**< \brief (SDRAMC_IMR) Refresh Error Status */
+/* -------- SDRAMC_ISR : (SDRAMC Offset: 0x20) SDRAMC Interrupt Status Register -------- */
+#define SDRAMC_ISR_RES (0x1u << 0) /**< \brief (SDRAMC_ISR) Refresh Error Status */
+/* -------- SDRAMC_MDR : (SDRAMC Offset: 0x24) SDRAMC Memory Device Register -------- */
+#define SDRAMC_MDR_MD_Pos 0
+#define SDRAMC_MDR_MD_Msk (0x3u << SDRAMC_MDR_MD_Pos) /**< \brief (SDRAMC_MDR) Memory Device Type */
+#define SDRAMC_MDR_MD_SDRAM (0x0u << 0) /**< \brief (SDRAMC_MDR) SDRAM */
+#define SDRAMC_MDR_MD_LPSDRAM (0x1u << 0) /**< \brief (SDRAMC_MDR) Low-power SDRAM */
+/* -------- SDRAMC_CR1 : (SDRAMC Offset: 0x28) SDRAMC Configuration Register 1 -------- */
+#define SDRAMC_CR1_NC_Pos 0
+#define SDRAMC_CR1_NC_Msk (0x3u << SDRAMC_CR1_NC_Pos) /**< \brief (SDRAMC_CR1) Number of Column Bits */
+#define SDRAMC_CR1_NC_COL8 (0x0u << 0) /**< \brief (SDRAMC_CR1) 8 column bits */
+#define SDRAMC_CR1_NC_COL9 (0x1u << 0) /**< \brief (SDRAMC_CR1) 9 column bits */
+#define SDRAMC_CR1_NC_COL10 (0x2u << 0) /**< \brief (SDRAMC_CR1) 10 column bits */
+#define SDRAMC_CR1_NC_COL11 (0x3u << 0) /**< \brief (SDRAMC_CR1) 11 column bits */
+#define SDRAMC_CR1_NR_Pos 2
+#define SDRAMC_CR1_NR_Msk (0x3u << SDRAMC_CR1_NR_Pos) /**< \brief (SDRAMC_CR1) Number of Row Bits */
+#define SDRAMC_CR1_NR_ROW11 (0x0u << 2) /**< \brief (SDRAMC_CR1) 11 row bits */
+#define SDRAMC_CR1_NR_ROW12 (0x1u << 2) /**< \brief (SDRAMC_CR1) 12 row bits */
+#define SDRAMC_CR1_NR_ROW13 (0x2u << 2) /**< \brief (SDRAMC_CR1) 13 row bits */
+#define SDRAMC_CR1_NB (0x1u << 4) /**< \brief (SDRAMC_CR1) Number of Banks */
+#define SDRAMC_CR1_NB_BANK2 (0x0u << 4) /**< \brief (SDRAMC_CR1) 2 banks */
+#define SDRAMC_CR1_NB_BANK4 (0x1u << 4) /**< \brief (SDRAMC_CR1) 4 banks */
+#define SDRAMC_CR1_CAS_Pos 5
+#define SDRAMC_CR1_CAS_Msk (0x3u << SDRAMC_CR1_CAS_Pos) /**< \brief (SDRAMC_CR1) CAS Latency */
+#define SDRAMC_CR1_CAS_LATENCY1 (0x1u << 5) /**< \brief (SDRAMC_CR1) 1 cycle CAS latency */
+#define SDRAMC_CR1_CAS_LATENCY2 (0x2u << 5) /**< \brief (SDRAMC_CR1) 2 cycle CAS latency */
+#define SDRAMC_CR1_CAS_LATENCY3 (0x3u << 5) /**< \brief (SDRAMC_CR1) 3 cycle CAS latency */
+#define SDRAMC_CR1_DBW (0x1u << 7) /**< \brief (SDRAMC_CR1) Data Bus Width */
+#define SDRAMC_CR1_TWR_Pos 8
+#define SDRAMC_CR1_TWR_Msk (0xfu << SDRAMC_CR1_TWR_Pos) /**< \brief (SDRAMC_CR1) Write Recovery Delay */
+#define SDRAMC_CR1_TWR(value) ((SDRAMC_CR1_TWR_Msk & ((value) << SDRAMC_CR1_TWR_Pos)))
+#define SDRAMC_CR1_TRC_TRFC_Pos 12
+#define SDRAMC_CR1_TRC_TRFC_Msk (0xfu << SDRAMC_CR1_TRC_TRFC_Pos) /**< \brief (SDRAMC_CR1) Row Cycle Delay and Row Refresh Cycle */
+#define SDRAMC_CR1_TRC_TRFC(value) ((SDRAMC_CR1_TRC_TRFC_Msk & ((value) << SDRAMC_CR1_TRC_TRFC_Pos)))
+#define SDRAMC_CR1_TRP_Pos 16
+#define SDRAMC_CR1_TRP_Msk (0xfu << SDRAMC_CR1_TRP_Pos) /**< \brief (SDRAMC_CR1) Row Precharge Delay */
+#define SDRAMC_CR1_TRP(value) ((SDRAMC_CR1_TRP_Msk & ((value) << SDRAMC_CR1_TRP_Pos)))
+#define SDRAMC_CR1_TRCD_Pos 20
+#define SDRAMC_CR1_TRCD_Msk (0xfu << SDRAMC_CR1_TRCD_Pos) /**< \brief (SDRAMC_CR1) Row to Column Delay */
+#define SDRAMC_CR1_TRCD(value) ((SDRAMC_CR1_TRCD_Msk & ((value) << SDRAMC_CR1_TRCD_Pos)))
+#define SDRAMC_CR1_TRAS_Pos 24
+#define SDRAMC_CR1_TRAS_Msk (0xfu << SDRAMC_CR1_TRAS_Pos) /**< \brief (SDRAMC_CR1) Active to Precharge Delay */
+#define SDRAMC_CR1_TRAS(value) ((SDRAMC_CR1_TRAS_Msk & ((value) << SDRAMC_CR1_TRAS_Pos)))
+#define SDRAMC_CR1_TXSR_Pos 28
+#define SDRAMC_CR1_TXSR_Msk (0xfu << SDRAMC_CR1_TXSR_Pos) /**< \brief (SDRAMC_CR1) Exit Self Refresh to Active Delay */
+#define SDRAMC_CR1_TXSR(value) ((SDRAMC_CR1_TXSR_Msk & ((value) << SDRAMC_CR1_TXSR_Pos)))
+/* -------- SDRAMC_OCMS : (SDRAMC Offset: 0x2C) SDRAMC OCMS Register 1 -------- */
+#define SDRAMC_OCMS_SDR_SE (0x1u << 0) /**< \brief (SDRAMC_OCMS) SDRAM Memory Controller Scrambling Enable */
+
+/*@}*/
+
+/* ============================================================================= */
+/** SOFTWARE API DEFINITION FOR Static Memory Controller */
+/* ============================================================================= */
+/** \addtogroup SAM3XA_SMC Static Memory Controller */
+/*@{*/
+
+#ifndef __ASSEMBLY__
+/** \brief SmcCs_number hardware registers */
+typedef struct {
+ RwReg SMC_SETUP; /**< \brief (SmcCs_number Offset: 0x0) SMC Setup Register */
+ RwReg SMC_PULSE; /**< \brief (SmcCs_number Offset: 0x4) SMC Pulse Register */
+ RwReg SMC_CYCLE; /**< \brief (SmcCs_number Offset: 0x8) SMC Cycle Register */
+ RwReg SMC_TIMINGS; /**< \brief (SmcCs_number Offset: 0xC) SMC Timings Register */
+ RwReg SMC_MODE; /**< \brief (SmcCs_number Offset: 0x10) SMC Mode Register */
+} SmcCs_number;
+/** \brief Smc hardware registers */
+#define SMCCS_NUMBER_NUMBER 8
+typedef struct {
+ RwReg SMC_CFG; /**< \brief (Smc Offset: 0x000) SMC NFC Configuration Register */
+ WoReg SMC_CTRL; /**< \brief (Smc Offset: 0x004) SMC NFC Control Register */
+ RoReg SMC_SR; /**< \brief (Smc Offset: 0x008) SMC NFC Status Register */
+ WoReg SMC_IER; /**< \brief (Smc Offset: 0x00C) SMC NFC Interrupt Enable Register */
+ WoReg SMC_IDR; /**< \brief (Smc Offset: 0x010) SMC NFC Interrupt Disable Register */
+ RoReg SMC_IMR; /**< \brief (Smc Offset: 0x014) SMC NFC Interrupt Mask Register */
+ RwReg SMC_ADDR; /**< \brief (Smc Offset: 0x018) SMC NFC Address Cycle Zero Register */
+ RwReg SMC_BANK; /**< \brief (Smc Offset: 0x01C) SMC Bank Address Register */
+ WoReg SMC_ECC_CTRL; /**< \brief (Smc Offset: 0x020) SMC ECC Control Register */
+ RwReg SMC_ECC_MD; /**< \brief (Smc Offset: 0x024) SMC ECC Mode Register */
+ RoReg SMC_ECC_SR1; /**< \brief (Smc Offset: 0x028) SMC ECC Status 1 Register */
+ RoReg SMC_ECC_PR0; /**< \brief (Smc Offset: 0x02C) SMC ECC Parity 0 Register */
+ RoReg SMC_ECC_PR1; /**< \brief (Smc Offset: 0x030) SMC ECC parity 1 Register */
+ RoReg SMC_ECC_SR2; /**< \brief (Smc Offset: 0x034) SMC ECC status 2 Register */
+ RoReg SMC_ECC_PR2; /**< \brief (Smc Offset: 0x038) SMC ECC parity 2 Register */
+ RoReg SMC_ECC_PR3; /**< \brief (Smc Offset: 0x03C) SMC ECC parity 3 Register */
+ RoReg SMC_ECC_PR4; /**< \brief (Smc Offset: 0x040) SMC ECC parity 4 Register */
+ RoReg SMC_ECC_PR5; /**< \brief (Smc Offset: 0x044) SMC ECC parity 5 Register */
+ RoReg SMC_ECC_PR6; /**< \brief (Smc Offset: 0x048) SMC ECC parity 6 Register */
+ RoReg SMC_ECC_PR7; /**< \brief (Smc Offset: 0x04C) SMC ECC parity 7 Register */
+ RoReg SMC_ECC_PR8; /**< \brief (Smc Offset: 0x050) SMC ECC parity 8 Register */
+ RoReg SMC_ECC_PR9; /**< \brief (Smc Offset: 0x054) SMC ECC parity 9 Register */
+ RoReg SMC_ECC_PR10; /**< \brief (Smc Offset: 0x058) SMC ECC parity 10 Register */
+ RoReg SMC_ECC_PR11; /**< \brief (Smc Offset: 0x05C) SMC ECC parity 11 Register */
+ RoReg SMC_ECC_PR12; /**< \brief (Smc Offset: 0x060) SMC ECC parity 12 Register */
+ RoReg SMC_ECC_PR13; /**< \brief (Smc Offset: 0x064) SMC ECC parity 13 Register */
+ RoReg SMC_ECC_PR14; /**< \brief (Smc Offset: 0x068) SMC ECC parity 14 Register */
+ RoReg SMC_ECC_PR15; /**< \brief (Smc Offset: 0x06C) SMC ECC parity 15 Register */
+ SmcCs_number SMC_CS_NUMBER[SMCCS_NUMBER_NUMBER]; /**< \brief (Smc Offset: 0x70) CS_number = 0 .. 7 */
+ RwReg SMC_OCMS; /**< \brief (Smc Offset: 0x110) SMC OCMS Register */
+ WoReg SMC_KEY1; /**< \brief (Smc Offset: 0x114) SMC OCMS KEY1 Register */
+ WoReg SMC_KEY2; /**< \brief (Smc Offset: 0x118) SMC OCMS KEY2 Register */
+ RoReg Reserved1[50];
+ WoReg SMC_WPCR; /**< \brief (Smc Offset: 0x1E4) Write Protection Control Register */
+ RoReg SMC_WPSR; /**< \brief (Smc Offset: 0x1E8) Write Protection Status Register */
+} Smc;
+#endif /* __ASSEMBLY__ */
+/* -------- SMC_CFG : (SMC Offset: 0x000) SMC NFC Configuration Register -------- */
+#define SMC_CFG_PAGESIZE_Pos 0
+#define SMC_CFG_PAGESIZE_Msk (0x3u << SMC_CFG_PAGESIZE_Pos) /**< \brief (SMC_CFG) */
+#define SMC_CFG_PAGESIZE_PS512_16 (0x0u << 0) /**< \brief (SMC_CFG) Main area 512 Bytes + Spare area 16 Bytes = 528 Bytes */
+#define SMC_CFG_PAGESIZE_PS1024_32 (0x1u << 0) /**< \brief (SMC_CFG) Main area 1024 Bytes + Spare area 32 Bytes = 1056 Bytes */
+#define SMC_CFG_PAGESIZE_PS2048_64 (0x2u << 0) /**< \brief (SMC_CFG) Main area 2048 Bytes + Spare area 64 Bytes = 2112 Bytes */
+#define SMC_CFG_PAGESIZE_PS4096_128 (0x3u << 0) /**< \brief (SMC_CFG) Main area 4096 Bytes + Spare area 128 Bytes = 4224 Bytes */
+#define SMC_CFG_WSPARE (0x1u << 8) /**< \brief (SMC_CFG) Write Spare Area */
+#define SMC_CFG_RSPARE (0x1u << 9) /**< \brief (SMC_CFG) Read Spare Area */
+#define SMC_CFG_EDGECTRL (0x1u << 12) /**< \brief (SMC_CFG) Rising/Falling Edge Detection Control */
+#define SMC_CFG_RBEDGE (0x1u << 13) /**< \brief (SMC_CFG) Ready/Busy Signal Edge Detection */
+#define SMC_CFG_DTOCYC_Pos 16
+#define SMC_CFG_DTOCYC_Msk (0xfu << SMC_CFG_DTOCYC_Pos) /**< \brief (SMC_CFG) Data Timeout Cycle Number */
+#define SMC_CFG_DTOCYC(value) ((SMC_CFG_DTOCYC_Msk & ((value) << SMC_CFG_DTOCYC_Pos)))
+#define SMC_CFG_DTOMUL_Pos 20
+#define SMC_CFG_DTOMUL_Msk (0x7u << SMC_CFG_DTOMUL_Pos) /**< \brief (SMC_CFG) Data Timeout Multiplier */
+#define SMC_CFG_DTOMUL_X1 (0x0u << 20) /**< \brief (SMC_CFG) DTOCYC */
+#define SMC_CFG_DTOMUL_X16 (0x1u << 20) /**< \brief (SMC_CFG) DTOCYC x 16 */
+#define SMC_CFG_DTOMUL_X128 (0x2u << 20) /**< \brief (SMC_CFG) DTOCYC x 128 */
+#define SMC_CFG_DTOMUL_X256 (0x3u << 20) /**< \brief (SMC_CFG) DTOCYC x 256 */
+#define SMC_CFG_DTOMUL_X1024 (0x4u << 20) /**< \brief (SMC_CFG) DTOCYC x 1024 */
+
+
+#define SMC_CFG_DTOMUL_X4096 (0x5u << 20) /**< \brief (SMC_CFG) DTOCYC x 4096 */
+#define SMC_CFG_DTOMUL_X65536 (0x6u << 20) /**< \brief (SMC_CFG) DTOCYC x 65536 */
+#define SMC_CFG_DTOMUL_X1048576 (0x7u << 20) /**< \brief (SMC_CFG) DTOCYC x 1048576 */
+/* -------- SMC_CTRL : (SMC Offset: 0x004) SMC NFC Control Register -------- */
+#define SMC_CTRL_NFCEN (0x1u << 0) /**< \brief (SMC_CTRL) NAND Flash Controller Enable */
+#define SMC_CTRL_NFCDIS (0x1u << 1) /**< \brief (SMC_CTRL) NAND Flash Controller Disable */
+/* -------- SMC_SR : (SMC Offset: 0x008) SMC NFC Status Register -------- */
+#define SMC_SR_SMCSTS (0x1u << 0) /**< \brief (SMC_SR) NAND Flash Controller status (this field cannot be reset) */
+#define SMC_SR_RB_RISE (0x1u << 4) /**< \brief (SMC_SR) Selected Ready Busy Rising Edge Detected */
+#define SMC_SR_RB_FALL (0x1u << 5) /**< \brief (SMC_SR) Selected Ready Busy Falling Edge Detected */
+#define SMC_SR_NFCBUSY (0x1u << 8) /**< \brief (SMC_SR) NFC Busy (this field cannot be reset) */
+#define SMC_SR_NFCWR (0x1u << 11) /**< \brief (SMC_SR) NFC Write/Read Operation (this field cannot be reset) */
+#define SMC_SR_NFCSID_Pos 12
+#define SMC_SR_NFCSID_Msk (0x7u << SMC_SR_NFCSID_Pos) /**< \brief (SMC_SR) NFC Chip Select ID (this field cannot be reset) */
+#define SMC_SR_XFRDONE (0x1u << 16) /**< \brief (SMC_SR) NFC Data Transfer Terminated */
+#define SMC_SR_CMDDONE (0x1u << 17) /**< \brief (SMC_SR) Command Done */
+#define SMC_SR_DTOE (0x1u << 20) /**< \brief (SMC_SR) Data Timeout Error */
+#define SMC_SR_UNDEF (0x1u << 21) /**< \brief (SMC_SR) Undefined Area Error */
+#define SMC_SR_AWB (0x1u << 22) /**< \brief (SMC_SR) Accessing While Busy */
+#define SMC_SR_NFCASE (0x1u << 23) /**< \brief (SMC_SR) NFC Access Size Error */
+#define SMC_SR_RB_EDGE0 (0x1u << 24) /**< \brief (SMC_SR) Ready/Busy Line 0 Edge Detected */
+/* -------- SMC_IER : (SMC Offset: 0x00C) SMC NFC Interrupt Enable Register -------- */
+#define SMC_IER_RB_RISE (0x1u << 4) /**< \brief (SMC_IER) Ready Busy Rising Edge Detection Interrupt Enable */
+#define SMC_IER_RB_FALL (0x1u << 5) /**< \brief (SMC_IER) Ready Busy Falling Edge Detection Interrupt Enable */
+#define SMC_IER_XFRDONE (0x1u << 16) /**< \brief (SMC_IER) Transfer Done Interrupt Enable */
+#define SMC_IER_CMDDONE (0x1u << 17) /**< \brief (SMC_IER) Command Done Interrupt Enable */
+#define SMC_IER_DTOE (0x1u << 20) /**< \brief (SMC_IER) Data Timeout Error Interrupt Enable */
+#define SMC_IER_UNDEF (0x1u << 21) /**< \brief (SMC_IER) Undefined Area Access Interrupt Enable */
+#define SMC_IER_AWB (0x1u << 22) /**< \brief (SMC_IER) Accessing While Busy Interrupt Enable */
+#define SMC_IER_NFCASE (0x1u << 23) /**< \brief (SMC_IER) NFC Access Size Error Interrupt Enable */
+#define SMC_IER_RB_EDGE0 (0x1u << 24) /**< \brief (SMC_IER) Ready/Busy Line 0 Interrupt Enable */
+/* -------- SMC_IDR : (SMC Offset: 0x010) SMC NFC Interrupt Disable Register -------- */
+#define SMC_IDR_RB_RISE (0x1u << 4) /**< \brief (SMC_IDR) Ready Busy Rising Edge Detection Interrupt Disable */
+#define SMC_IDR_RB_FALL (0x1u << 5) /**< \brief (SMC_IDR) Ready Busy Falling Edge Detection Interrupt Disable */
+#define SMC_IDR_XFRDONE (0x1u << 16) /**< \brief (SMC_IDR) Transfer Done Interrupt Disable */
+#define SMC_IDR_CMDDONE (0x1u << 17) /**< \brief (SMC_IDR) Command Done Interrupt Disable */
+#define SMC_IDR_DTOE (0x1u << 20) /**< \brief (SMC_IDR) Data Timeout Error Interrupt Disable */
+#define SMC_IDR_UNDEF (0x1u << 21) /**< \brief (SMC_IDR) Undefined Area Access Interrupt Disable */
+#define SMC_IDR_AWB (0x1u << 22) /**< \brief (SMC_IDR) Accessing While Busy Interrupt Disable */
+#define SMC_IDR_NFCASE (0x1u << 23) /**< \brief (SMC_IDR) NFC Access Size Error Interrupt Disable */
+#define SMC_IDR_RB_EDGE0 (0x1u << 24) /**< \brief (SMC_IDR) Ready/Busy Line 0 Interrupt Disable */
+/* -------- SMC_IMR : (SMC Offset: 0x014) SMC NFC Interrupt Mask Register -------- */
+#define SMC_IMR_RB_RISE (0x1u << 4) /**< \brief (SMC_IMR) Ready Busy Rising Edge Detection Interrupt Mask */
+#define SMC_IMR_RB_FALL (0x1u << 5) /**< \brief (SMC_IMR) Ready Busy Falling Edge Detection Interrupt Mask */
+#define SMC_IMR_XFRDONE (0x1u << 16) /**< \brief (SMC_IMR) Transfer Done Interrupt Mask */
+#define SMC_IMR_CMDDONE (0x1u << 17) /**< \brief (SMC_IMR) Command Done Interrupt Mask */
+#define SMC_IMR_DTOE (0x1u << 20) /**< \brief (SMC_IMR) Data Timeout Error Interrupt Mask */
+#define SMC_IMR_UNDEF (0x1u << 21) /**< \brief (SMC_IMR) Undefined Area Access Interrupt Mask5 */
+#define SMC_IMR_AWB (0x1u << 22) /**< \brief (SMC_IMR) Accessing While Busy Interrupt Mask */
+#define SMC_IMR_NFCASE (0x1u << 23) /**< \brief (SMC_IMR) NFC Access Size Error Interrupt Mask */
+#define SMC_IMR_RB_EDGE0 (0x1u << 24) /**< \brief (SMC_IMR) Ready/Busy Line 0 Interrupt Mask */
+/* -------- SMC_ADDR : (SMC Offset: 0x018) SMC NFC Address Cycle Zero Register -------- */
+#define SMC_ADDR_ADDR_CYCLE0_Pos 0
+#define SMC_ADDR_ADDR_CYCLE0_Msk (0xffu << SMC_ADDR_ADDR_CYCLE0_Pos) /**< \brief (SMC_ADDR) NAND Flash Array Address cycle 0 */
+#define SMC_ADDR_ADDR_CYCLE0(value) ((SMC_ADDR_ADDR_CYCLE0_Msk & ((value) << SMC_ADDR_ADDR_CYCLE0_Pos)))
+/* -------- SMC_BANK : (SMC Offset: 0x01C) SMC Bank Address Register -------- */
+#define SMC_BANK_BANK_Pos 0
+#define SMC_BANK_BANK_Msk (0x7u << SMC_BANK_BANK_Pos) /**< \brief (SMC_BANK) Bank Identifier */
+#define SMC_BANK_BANK(value) ((SMC_BANK_BANK_Msk & ((value) << SMC_BANK_BANK_Pos)))
+/* -------- SMC_ECC_CTRL : (SMC Offset: 0x020) SMC ECC Control Register -------- */
+#define SMC_ECC_CTRL_RST (0x1u << 0) /**< \brief (SMC_ECC_CTRL) Reset ECC */
+#define SMC_ECC_CTRL_SWRST (0x1u << 1) /**< \brief (SMC_ECC_CTRL) Software Reset */
+/* -------- SMC_ECC_MD : (SMC Offset: 0x024) SMC ECC Mode Register -------- */
+#define SMC_ECC_MD_ECC_PAGESIZE_Pos 0
+#define SMC_ECC_MD_ECC_PAGESIZE_Msk (0x3u << SMC_ECC_MD_ECC_PAGESIZE_Pos) /**< \brief (SMC_ECC_MD) ECC Page Size */
+#define SMC_ECC_MD_ECC_PAGESIZE_PS512_16 (0x0u << 0) /**< \brief (SMC_ECC_MD) Main area 512 Bytes + Spare area 16 Bytes = 528 Bytes */
+#define SMC_ECC_MD_ECC_PAGESIZE_PS1024_32 (0x1u << 0) /**< \brief (SMC_ECC_MD) Main area 1024 Bytes + Spare area 32 Bytes = 1056 Bytes */
+#define SMC_ECC_MD_ECC_PAGESIZE_PS2048_64 (0x2u << 0) /**< \brief (SMC_ECC_MD) Main area 2048 Bytes + Spare area 64 Bytes = 2112 Bytes */
+#define SMC_ECC_MD_ECC_PAGESIZE_PS4096_128 (0x3u << 0) /**< \brief (SMC_ECC_MD) Main area 4096 Bytes + Spare area 128 Bytes = 4224 Bytes */
+#define SMC_ECC_MD_TYPCORREC_Pos 4
+#define SMC_ECC_MD_TYPCORREC_Msk (0x3u << SMC_ECC_MD_TYPCORREC_Pos) /**< \brief (SMC_ECC_MD) Type of Correction */
+#define SMC_ECC_MD_TYPCORREC_CPAGE (0x0u << 4) /**< \brief (SMC_ECC_MD) 1 bit correction for a page of 512/1024/2048/4096 Bytes (for 8 or 16-bit NAND Flash) */
+#define SMC_ECC_MD_TYPCORREC_C256B (0x1u << 4) /**< \brief (SMC_ECC_MD) 1 bit correction for 256 Bytes of data for a page of 512/2048/4096 bytes (for 8-bit NAND Flash only) */
+#define SMC_ECC_MD_TYPCORREC_C512B (0x2u << 4) /**< \brief (SMC_ECC_MD) 1 bit correction for 512 Bytes of data for a page of 512/2048/4096 bytes (for 8-bit NAND Flash only) */
+/* -------- SMC_ECC_SR1 : (SMC Offset: 0x028) SMC ECC Status 1 Register -------- */
+#define SMC_ECC_SR1_RECERR0 (0x1u << 0) /**< \brief (SMC_ECC_SR1) Recoverable Error */
+#define SMC_ECC_SR1_ECCERR0_Pos 1
+#define SMC_ECC_SR1_ECCERR0_Msk (0x3u << SMC_ECC_SR1_ECCERR0_Pos) /**< \brief (SMC_ECC_SR1) ECC Error */
+#define SMC_ECC_SR1_RECERR1 (0x1u << 4) /**< \brief (SMC_ECC_SR1) Recoverable Error in the page between the 256th and the 511th bytes or the 512nd and the 1023rd bytes */
+#define SMC_ECC_SR1_ECCERR1 (0x1u << 5) /**< \brief (SMC_ECC_SR1) ECC Error in the page between the 256th and the 511th bytes or between the 512nd and the 1023rd bytes */
+#define SMC_ECC_SR1_MULERR1 (0x1u << 6) /**< \brief (SMC_ECC_SR1) Multiple Error in the page between the 256th and the 511th bytes or between the 512nd and the 1023rd bytes */
+#define SMC_ECC_SR1_RECERR2 (0x1u << 8) /**< \brief (SMC_ECC_SR1) Recoverable Error in the page between the 512nd and the 767th bytes or between the 1024th and the 1535th bytes */
+#define SMC_ECC_SR1_ECCERR2 (0x1u << 9) /**< \brief (SMC_ECC_SR1) ECC Error in the page between the 512nd and the 767th bytes or between the 1024th and the 1535th bytes */
+#define SMC_ECC_SR1_MULERR2 (0x1u << 10) /**< \brief (SMC_ECC_SR1) Multiple Error in the page between the 512nd and the 767th bytes or between the 1024th and the 1535th bytes */
+#define SMC_ECC_SR1_RECERR3 (0x1u << 12) /**< \brief (SMC_ECC_SR1) Recoverable Error in the page between the 768th and the 1023rd bytes or between the 1536th and the 2047th bytes */
+#define SMC_ECC_SR1_ECCERR3 (0x1u << 13) /**< \brief (SMC_ECC_SR1) ECC Error in the page between the 768th and the 1023rd bytes or between the 1536th and the 2047th bytes */
+#define SMC_ECC_SR1_MULERR3 (0x1u << 14) /**< \brief (SMC_ECC_SR1) Multiple Error in the page between the 768th and the 1023rd bytes or between the 1536th and the 2047th bytes */
+#define SMC_ECC_SR1_RECERR4 (0x1u << 16) /**< \brief (SMC_ECC_SR1) Recoverable Error in the page between the 1024th and the 1279th bytes or between the 2048th and the 2559th bytes */
+#define SMC_ECC_SR1_ECCERR4_Pos 17
+#define SMC_ECC_SR1_ECCERR4_Msk (0x3u << SMC_ECC_SR1_ECCERR4_Pos) /**< \brief (SMC_ECC_SR1) ECC Error in the page between the 1024th and the 1279th bytes or between the 2048th and the 2559th bytes */
+#define SMC_ECC_SR1_RECERR5 (0x1u << 20) /**< \brief (SMC_ECC_SR1) Recoverable Error in the page between the 1280th and the 1535th bytes or between the 2560th and the 3071st bytes */
+#define SMC_ECC_SR1_ECCERR5_Pos 21
+#define SMC_ECC_SR1_ECCERR5_Msk (0x3u << SMC_ECC_SR1_ECCERR5_Pos) /**< \brief (SMC_ECC_SR1) ECC Error in the page between the 1280th and the 1535th bytes or between the 2560th and the 3071st bytes */
+#define SMC_ECC_SR1_RECERR6 (0x1u << 24) /**< \brief (SMC_ECC_SR1) Recoverable Error in the page between the 1536th and the 1791st bytes or between the 3072nd and the 3583rd bytes */
+#define SMC_ECC_SR1_ECCERR6_Pos 25
+#define SMC_ECC_SR1_ECCERR6_Msk (0x3u << SMC_ECC_SR1_ECCERR6_Pos) /**< \brief (SMC_ECC_SR1) ECC Error in the page between the 1536th and the 1791st bytes or between the 3072nd and the 3583rd bytes */
+#define SMC_ECC_SR1_RECERR7 (0x1u << 28) /**< \brief (SMC_ECC_SR1) Recoverable Error in the page between the 1792nd and the 2047th bytes or between the 3584th and the 4095th bytes */
+#define SMC_ECC_SR1_ECCERR7_Pos 29
+#define SMC_ECC_SR1_ECCERR7_Msk (0x3u << SMC_ECC_SR1_ECCERR7_Pos) /**< \brief (SMC_ECC_SR1) ECC Error in the page between the 1792nd and the 2047th bytes or between the 3584th and the 4095th bytes */
+/* -------- SMC_ECC_PR0 : (SMC Offset: 0x02C) SMC ECC Parity 0 Register -------- */
+#define SMC_ECC_PR0_BITADDR_Pos 0
+#define SMC_ECC_PR0_BITADDR_Msk (0xfu << SMC_ECC_PR0_BITADDR_Pos) /**< \brief (SMC_ECC_PR0) Bit Address */
+#define SMC_ECC_PR0_WORDADDR_Pos 4
+#define SMC_ECC_PR0_WORDADDR_Msk (0xfffu << SMC_ECC_PR0_WORDADDR_Pos) /**< \brief (SMC_ECC_PR0) Word Address */
+#define SMC_ECC_PR0_BITADDR_W9BIT_Pos 0
+#define SMC_ECC_PR0_BITADDR_W9BIT_Msk (0x7u << SMC_ECC_PR0_BITADDR_W9BIT_Pos) /**< \brief (SMC_ECC_PR0) Corrupted Bit Address in the Page between (i x 512) and ((i + 1) x 512) - 1) Bytes */
+#define SMC_ECC_PR0_WORDADDR_W9BIT_Pos 3
+#define SMC_ECC_PR0_WORDADDR_W9BIT_Msk (0x1ffu << SMC_ECC_PR0_WORDADDR_W9BIT_Pos) /**< \brief (SMC_ECC_PR0) Corrupted Word Address in the Page between (i x 512) and ((i + 1) x 512) - 1) Bytes */
+#define SMC_ECC_PR0_NPARITY_Pos 12
+#define SMC_ECC_PR0_NPARITY_Msk (0xfffu << SMC_ECC_PR0_NPARITY_Pos) /**< \brief (SMC_ECC_PR0) Parity N */
+#define SMC_ECC_PR0_BITADDR_W8BIT_Pos 0
+#define SMC_ECC_PR0_BITADDR_W8BIT_Msk (0x7u << SMC_ECC_PR0_BITADDR_W8BIT_Pos) /**< \brief (SMC_ECC_PR0) Corrupted Bit Address in the Page between (i x 256) and ((i + 1) x 512) - 1) Bytes */
+#define SMC_ECC_PR0_WORDADDR_W8BIT_Pos 3
+#define SMC_ECC_PR0_WORDADDR_W8BIT_Msk (0xffu << SMC_ECC_PR0_WORDADDR_W8BIT_Pos) /**< \brief (SMC_ECC_PR0) Corrupted Word Address in the Page between (i x 256) and ((i + 1) x 512) - 1) Bytes */
+#define SMC_ECC_PR0_NPARITY_W8BIT_Pos 12
+#define SMC_ECC_PR0_NPARITY_W8BIT_Msk (0x7ffu << SMC_ECC_PR0_NPARITY_W8BIT_Pos) /**< \brief (SMC_ECC_PR0) Parity N */
+/* -------- SMC_ECC_PR1 : (SMC Offset: 0x030) SMC ECC parity 1 Register -------- */
+#define SMC_ECC_PR1_NPARITY_Pos 0
+#define SMC_ECC_PR1_NPARITY_Msk (0xffffu << SMC_ECC_PR1_NPARITY_Pos) /**< \brief (SMC_ECC_PR1) Parity N */
+#define SMC_ECC_PR1_BITADDR_Pos 0
+#define SMC_ECC_PR1_BITADDR_Msk (0x7u << SMC_ECC_PR1_BITADDR_Pos) /**< \brief (SMC_ECC_PR1) Corrupted Bit Address in the Page between (i x 512) and ((i + 1) x 512) - 1) Bytes */
+#define SMC_ECC_PR1_WORDADDR_Pos 3
+#define SMC_ECC_PR1_WORDADDR_Msk (0x1ffu << SMC_ECC_PR1_WORDADDR_Pos) /**< \brief (SMC_ECC_PR1) Corrupted Word Address in the Page between (i x 512) and ((i + 1) x 512) - 1) Bytes */
+#define SMC_ECC_PR1_NPARITY_W9BIT_Pos 12
+#define SMC_ECC_PR1_NPARITY_W9BIT_Msk (0xfffu << SMC_ECC_PR1_NPARITY_W9BIT_Pos) /**< \brief (SMC_ECC_PR1) Parity N */
+#define SMC_ECC_PR1_WORDADDR_W8BIT_Pos 3
+#define SMC_ECC_PR1_WORDADDR_W8BIT_Msk (0xffu << SMC_ECC_PR1_WORDADDR_W8BIT_Pos) /**< \brief (SMC_ECC_PR1) Corrupted Word Address in the Page between (i x 256) and ((i + 1) x 512) - 1) Bytes */
+#define SMC_ECC_PR1_NPARITY_W8BIT_Pos 12
+#define SMC_ECC_PR1_NPARITY_W8BIT_Msk (0x7ffu << SMC_ECC_PR1_NPARITY_W8BIT_Pos) /**< \brief (SMC_ECC_PR1) Parity N */
+/* -------- SMC_ECC_SR2 : (SMC Offset: 0x034) SMC ECC status 2 Register -------- */
+#define SMC_ECC_SR2_RECERR8 (0x1u << 0) /**< \brief (SMC_ECC_SR2) Recoverable Error in the page between the 2048th and the 2303rd bytes */
+#define SMC_ECC_SR2_ECCERR8_Pos 1
+#define SMC_ECC_SR2_ECCERR8_Msk (0x3u << SMC_ECC_SR2_ECCERR8_Pos) /**< \brief (SMC_ECC_SR2) ECC Error in the page between the 2048th and the 2303rd bytes */
+#define SMC_ECC_SR2_RECERR9 (0x1u << 4) /**< \brief (SMC_ECC_SR2) Recoverable Error in the page between the 2304th and the 2559th bytes */
+#define SMC_ECC_SR2_ECCERR9 (0x1u << 5) /**< \brief (SMC_ECC_SR2) ECC Error in the page between the 2304th and the 2559th bytes */
+#define SMC_ECC_SR2_MULERR9 (0x1u << 6) /**< \brief (SMC_ECC_SR2) Multiple Error in the page between the 2304th and the 2559th bytes */
+#define SMC_ECC_SR2_RECERR10 (0x1u << 8) /**< \brief (SMC_ECC_SR2) Recoverable Error in the page between the 2560th and the 2815th bytes */
+#define SMC_ECC_SR2_ECCERR10 (0x1u << 9) /**< \brief (SMC_ECC_SR2) ECC Error in the page between the 2560th and the 2815th bytes */
+#define SMC_ECC_SR2_MULERR10 (0x1u << 10) /**< \brief (SMC_ECC_SR2) Multiple Error in the page between the 2560th and the 2815th bytes */
+#define SMC_ECC_SR2_RECERR11 (0x1u << 12) /**< \brief (SMC_ECC_SR2) Recoverable Error in the page between the 2816th and the 3071st bytes */
+#define SMC_ECC_SR2_ECCERR11 (0x1u << 13) /**< \brief (SMC_ECC_SR2) ECC Error in the page between the 2816th and the 3071st bytes */
+#define SMC_ECC_SR2_MULERR11 (0x1u << 14) /**< \brief (SMC_ECC_SR2) Multiple Error in the page between the 2816th and the 3071st bytes */
+#define SMC_ECC_SR2_RECERR12 (0x1u << 16) /**< \brief (SMC_ECC_SR2) Recoverable Error in the page between the 3072nd and the 3327th bytes */
+#define SMC_ECC_SR2_ECCERR12_Pos 17
+#define SMC_ECC_SR2_ECCERR12_Msk (0x3u << SMC_ECC_SR2_ECCERR12_Pos) /**< \brief (SMC_ECC_SR2) ECC Error in the page between the 3072nd and the 3327th bytes */
+#define SMC_ECC_SR2_RECERR13 (0x1u << 20) /**< \brief (SMC_ECC_SR2) Recoverable Error in the page between the 3328th and the 3583rd bytes */
+#define SMC_ECC_SR2_ECCERR13_Pos 21
+#define SMC_ECC_SR2_ECCERR13_Msk (0x3u << SMC_ECC_SR2_ECCERR13_Pos) /**< \brief (SMC_ECC_SR2) ECC Error in the page between the 3328th and the 3583rd bytes */
+#define SMC_ECC_SR2_RECERR14 (0x1u << 24) /**< \brief (SMC_ECC_SR2) Recoverable Error in the page between the 3584th and the 3839th bytes */
+#define SMC_ECC_SR2_ECCERR14_Pos 25
+#define SMC_ECC_SR2_ECCERR14_Msk (0x3u << SMC_ECC_SR2_ECCERR14_Pos) /**< \brief (SMC_ECC_SR2) ECC Error in the page between the 3584th and the 3839th bytes */
+#define SMC_ECC_SR2_RECERR15 (0x1u << 28) /**< \brief (SMC_ECC_SR2) Recoverable Error in the page between the 3840th and the 4095th bytes */
+#define SMC_ECC_SR2_ECCERR15_Pos 29
+#define SMC_ECC_SR2_ECCERR15_Msk (0x3u << SMC_ECC_SR2_ECCERR15_Pos) /**< \brief (SMC_ECC_SR2) ECC Error in the page between the 3840th and the 4095th bytes */
+/* -------- SMC_ECC_PR2 : (SMC Offset: 0x038) SMC ECC parity 2 Register -------- */
+#define SMC_ECC_PR2_BITADDR_Pos 0
+#define SMC_ECC_PR2_BITADDR_Msk (0x7u << SMC_ECC_PR2_BITADDR_Pos) /**< \brief (SMC_ECC_PR2) Corrupted Bit Address in the Page between (i x 512) and ((i + 1) x 512) - 1) Bytes */
+#define SMC_ECC_PR2_WORDADDR_Pos 3
+#define SMC_ECC_PR2_WORDADDR_Msk (0x1ffu << SMC_ECC_PR2_WORDADDR_Pos) /**< \brief (SMC_ECC_PR2) Corrupted Word Address in the Page between (i x 512) and ((i + 1) x 512) - 1) Bytes */
+#define SMC_ECC_PR2_NPARITY_Pos 12
+#define SMC_ECC_PR2_NPARITY_Msk (0xfffu << SMC_ECC_PR2_NPARITY_Pos) /**< \brief (SMC_ECC_PR2) Parity N */
+#define SMC_ECC_PR2_WORDADDR_W8BIT_Pos 3
+#define SMC_ECC_PR2_WORDADDR_W8BIT_Msk (0xffu << SMC_ECC_PR2_WORDADDR_W8BIT_Pos) /**< \brief (SMC_ECC_PR2) Corrupted Word Address in the Page between (i x 256) and ((i + 1) x 512) - 1) Bytes */
+#define SMC_ECC_PR2_NPARITY_W8BIT_Pos 12
+#define SMC_ECC_PR2_NPARITY_W8BIT_Msk (0x7ffu << SMC_ECC_PR2_NPARITY_W8BIT_Pos) /**< \brief (SMC_ECC_PR2) Parity N */
+/* -------- SMC_ECC_PR3 : (SMC Offset: 0x03C) SMC ECC parity 3 Register -------- */
+#define SMC_ECC_PR3_BITADDR_Pos 0
+#define SMC_ECC_PR3_BITADDR_Msk (0x7u << SMC_ECC_PR3_BITADDR_Pos) /**< \brief (SMC_ECC_PR3) Corrupted Bit Address in the Page between (i x 512) and ((i + 1) x 512) - 1) Bytes */
+#define SMC_ECC_PR3_WORDADDR_Pos 3
+#define SMC_ECC_PR3_WORDADDR_Msk (0x1ffu << SMC_ECC_PR3_WORDADDR_Pos) /**< \brief (SMC_ECC_PR3) Corrupted Word Address in the Page between (i x 512) and ((i + 1) x 512) - 1) Bytes */
+#define SMC_ECC_PR3_NPARITY_Pos 12
+#define SMC_ECC_PR3_NPARITY_Msk (0xfffu << SMC_ECC_PR3_NPARITY_Pos) /**< \brief (SMC_ECC_PR3) Parity N */
+#define SMC_ECC_PR3_WORDADDR_W8BIT_Pos 3
+#define SMC_ECC_PR3_WORDADDR_W8BIT_Msk (0xffu << SMC_ECC_PR3_WORDADDR_W8BIT_Pos) /**< \brief (SMC_ECC_PR3) Corrupted Word Address in the Page between (i x 256) and ((i + 1) x 512) - 1) Bytes */
+#define SMC_ECC_PR3_NPARITY_W8BIT_Pos 12
+#define SMC_ECC_PR3_NPARITY_W8BIT_Msk (0x7ffu << SMC_ECC_PR3_NPARITY_W8BIT_Pos) /**< \brief (SMC_ECC_PR3) Parity N */
+/* -------- SMC_ECC_PR4 : (SMC Offset: 0x040) SMC ECC parity 4 Register -------- */
+#define SMC_ECC_PR4_BITADDR_Pos 0
+#define SMC_ECC_PR4_BITADDR_Msk (0x7u << SMC_ECC_PR4_BITADDR_Pos) /**< \brief (SMC_ECC_PR4) Corrupted Bit Address in the Page between (i x 512) and ((i + 1) x 512) - 1) Bytes */
+#define SMC_ECC_PR4_WORDADDR_Pos 3
+#define SMC_ECC_PR4_WORDADDR_Msk (0x1ffu << SMC_ECC_PR4_WORDADDR_Pos) /**< \brief (SMC_ECC_PR4) Corrupted Word Address in the Page between (i x 512) and ((i + 1) x 512) - 1) Bytes */
+#define SMC_ECC_PR4_NPARITY_Pos 12
+#define SMC_ECC_PR4_NPARITY_Msk (0xfffu << SMC_ECC_PR4_NPARITY_Pos) /**< \brief (SMC_ECC_PR4) Parity N */
+#define SMC_ECC_PR4_WORDADDR_W8BIT_Pos 3
+#define SMC_ECC_PR4_WORDADDR_W8BIT_Msk (0xffu << SMC_ECC_PR4_WORDADDR_W8BIT_Pos) /**< \brief (SMC_ECC_PR4) Corrupted Word Address in the Page between (i x 256) and ((i + 1) x 512) - 1) Bytes */
+#define SMC_ECC_PR4_NPARITY_W8BIT_Pos 12
+#define SMC_ECC_PR4_NPARITY_W8BIT_Msk (0x7ffu << SMC_ECC_PR4_NPARITY_W8BIT_Pos) /**< \brief (SMC_ECC_PR4) Parity N */
+/* -------- SMC_ECC_PR5 : (SMC Offset: 0x044) SMC ECC parity 5 Register -------- */
+#define SMC_ECC_PR5_BITADDR_Pos 0
+#define SMC_ECC_PR5_BITADDR_Msk (0x7u << SMC_ECC_PR5_BITADDR_Pos) /**< \brief (SMC_ECC_PR5) Corrupted Bit Address in the Page between (i x 512) and ((i + 1) x 512) - 1) Bytes */
+#define SMC_ECC_PR5_WORDADDR_Pos 3
+#define SMC_ECC_PR5_WORDADDR_Msk (0x1ffu << SMC_ECC_PR5_WORDADDR_Pos) /**< \brief (SMC_ECC_PR5) Corrupted Word Address in the Page between (i x 512) and ((i + 1) x 512) - 1) Bytes */
+#define SMC_ECC_PR5_NPARITY_Pos 12
+#define SMC_ECC_PR5_NPARITY_Msk (0xfffu << SMC_ECC_PR5_NPARITY_Pos) /**< \brief (SMC_ECC_PR5) Parity N */
+#define SMC_ECC_PR5_WORDADDR_W8BIT_Pos 3
+#define SMC_ECC_PR5_WORDADDR_W8BIT_Msk (0xffu << SMC_ECC_PR5_WORDADDR_W8BIT_Pos) /**< \brief (SMC_ECC_PR5) Corrupted Word Address in the Page between (i x 256) and ((i + 1) x 512) - 1) Bytes */
+#define SMC_ECC_PR5_NPARITY_W8BIT_Pos 12
+#define SMC_ECC_PR5_NPARITY_W8BIT_Msk (0x7ffu << SMC_ECC_PR5_NPARITY_W8BIT_Pos) /**< \brief (SMC_ECC_PR5) Parity N */
+/* -------- SMC_ECC_PR6 : (SMC Offset: 0x048) SMC ECC parity 6 Register -------- */
+#define SMC_ECC_PR6_BITADDR_Pos 0
+#define SMC_ECC_PR6_BITADDR_Msk (0x7u << SMC_ECC_PR6_BITADDR_Pos) /**< \brief (SMC_ECC_PR6) Corrupted Bit Address in the Page between (i x 512) and ((i + 1) x 512) - 1) Bytes */
+#define SMC_ECC_PR6_WORDADDR_Pos 3
+#define SMC_ECC_PR6_WORDADDR_Msk (0x1ffu << SMC_ECC_PR6_WORDADDR_Pos) /**< \brief (SMC_ECC_PR6) Corrupted Word Address in the Page between (i x 512) and ((i + 1) x 512) - 1) Bytes */
+#define SMC_ECC_PR6_NPARITY_Pos 12
+#define SMC_ECC_PR6_NPARITY_Msk (0xfffu << SMC_ECC_PR6_NPARITY_Pos) /**< \brief (SMC_ECC_PR6) Parity N */
+#define SMC_ECC_PR6_WORDADDR_W8BIT_Pos 3
+#define SMC_ECC_PR6_WORDADDR_W8BIT_Msk (0xffu << SMC_ECC_PR6_WORDADDR_W8BIT_Pos) /**< \brief (SMC_ECC_PR6) Corrupted Word Address in the Page between (i x 256) and ((i + 1) x 512) - 1) Bytes */
+#define SMC_ECC_PR6_NPARITY_W8BIT_Pos 12
+#define SMC_ECC_PR6_NPARITY_W8BIT_Msk (0x7ffu << SMC_ECC_PR6_NPARITY_W8BIT_Pos) /**< \brief (SMC_ECC_PR6) Parity N */
+/* -------- SMC_ECC_PR7 : (SMC Offset: 0x04C) SMC ECC parity 7 Register -------- */
+#define SMC_ECC_PR7_BITADDR_Pos 0
+#define SMC_ECC_PR7_BITADDR_Msk (0x7u << SMC_ECC_PR7_BITADDR_Pos) /**< \brief (SMC_ECC_PR7) Corrupted Bit Address in the Page between (i x 512) and ((i + 1) x 512) - 1) Bytes */
+#define SMC_ECC_PR7_WORDADDR_Pos 3
+#define SMC_ECC_PR7_WORDADDR_Msk (0x1ffu << SMC_ECC_PR7_WORDADDR_Pos) /**< \brief (SMC_ECC_PR7) Corrupted Word Address in the Page between (i x 512) and ((i + 1) x 512) - 1) Bytes */
+#define SMC_ECC_PR7_NPARITY_Pos 12
+#define SMC_ECC_PR7_NPARITY_Msk (0xfffu << SMC_ECC_PR7_NPARITY_Pos) /**< \brief (SMC_ECC_PR7) Parity N */
+#define SMC_ECC_PR7_WORDADDR_W8BIT_Pos 3
+#define SMC_ECC_PR7_WORDADDR_W8BIT_Msk (0xffu << SMC_ECC_PR7_WORDADDR_W8BIT_Pos) /**< \brief (SMC_ECC_PR7) Corrupted Word Address in the Page between (i x 256) and ((i + 1) x 512) - 1) Bytes */
+#define SMC_ECC_PR7_NPARITY_W8BIT_Pos 12
+#define SMC_ECC_PR7_NPARITY_W8BIT_Msk (0x7ffu << SMC_ECC_PR7_NPARITY_W8BIT_Pos) /**< \brief (SMC_ECC_PR7) Parity N */
+/* -------- SMC_ECC_PR8 : (SMC Offset: 0x050) SMC ECC parity 8 Register -------- */
+#define SMC_ECC_PR8_BITADDR_Pos 0
+#define SMC_ECC_PR8_BITADDR_Msk (0x7u << SMC_ECC_PR8_BITADDR_Pos) /**< \brief (SMC_ECC_PR8) Corrupted Bit Address in the Page between (i x 256) and ((i + 1) x 512) - 1) Bytes */
+#define SMC_ECC_PR8_WORDADDR_Pos 3
+#define SMC_ECC_PR8_WORDADDR_Msk (0xffu << SMC_ECC_PR8_WORDADDR_Pos) /**< \brief (SMC_ECC_PR8) Corrupted Word Address in the Page between (i x 256) and ((i + 1) x 512) - 1) Bytes */
+#define SMC_ECC_PR8_NPARITY_Pos 12
+#define SMC_ECC_PR8_NPARITY_Msk (0x7ffu << SMC_ECC_PR8_NPARITY_Pos) /**< \brief (SMC_ECC_PR8) Parity N */
+/* -------- SMC_ECC_PR9 : (SMC Offset: 0x054) SMC ECC parity 9 Register -------- */
+#define SMC_ECC_PR9_BITADDR_Pos 0
+#define SMC_ECC_PR9_BITADDR_Msk (0x7u << SMC_ECC_PR9_BITADDR_Pos) /**< \brief (SMC_ECC_PR9) Corrupted Bit Address in the Page between (i x 256) and ((i + 1) x 512) - 1) Bytes */
+#define SMC_ECC_PR9_WORDADDR_Pos 3
+#define SMC_ECC_PR9_WORDADDR_Msk (0xffu << SMC_ECC_PR9_WORDADDR_Pos) /**< \brief (SMC_ECC_PR9) Corrupted Word Address in the Page between (i x 256) and ((i + 1) x 512) - 1) Bytes */
+#define SMC_ECC_PR9_NPARITY_Pos 12
+#define SMC_ECC_PR9_NPARITY_Msk (0x7ffu << SMC_ECC_PR9_NPARITY_Pos) /**< \brief (SMC_ECC_PR9) Parity N */
+/* -------- SMC_ECC_PR10 : (SMC Offset: 0x058) SMC ECC parity 10 Register -------- */
+#define SMC_ECC_PR10_BITADDR_Pos 0
+#define SMC_ECC_PR10_BITADDR_Msk (0x7u << SMC_ECC_PR10_BITADDR_Pos) /**< \brief (SMC_ECC_PR10) Corrupted Bit Address in the Page between (i x 256) and ((i + 1) x 512) - 1) Bytes */
+#define SMC_ECC_PR10_WORDADDR_Pos 3
+#define SMC_ECC_PR10_WORDADDR_Msk (0xffu << SMC_ECC_PR10_WORDADDR_Pos) /**< \brief (SMC_ECC_PR10) Corrupted Word Address in the Page between (i x 256) and ((i + 1) x 512) - 1) Bytes */
+#define SMC_ECC_PR10_NPARITY_Pos 12
+#define SMC_ECC_PR10_NPARITY_Msk (0x7ffu << SMC_ECC_PR10_NPARITY_Pos) /**< \brief (SMC_ECC_PR10) Parity N */
+/* -------- SMC_ECC_PR11 : (SMC Offset: 0x05C) SMC ECC parity 11 Register -------- */
+#define SMC_ECC_PR11_BITADDR_Pos 0
+#define SMC_ECC_PR11_BITADDR_Msk (0x7u << SMC_ECC_PR11_BITADDR_Pos) /**< \brief (SMC_ECC_PR11) Corrupted Bit Address in the Page between (i x 256) and ((i + 1) x 512) - 1) Bytes */
+#define SMC_ECC_PR11_WORDADDR_Pos 3
+#define SMC_ECC_PR11_WORDADDR_Msk (0xffu << SMC_ECC_PR11_WORDADDR_Pos) /**< \brief (SMC_ECC_PR11) Corrupted Word Address in the Page between (i x 256) and ((i + 1) x 512) - 1) Bytes */
+#define SMC_ECC_PR11_NPARITY_Pos 12
+#define SMC_ECC_PR11_NPARITY_Msk (0x7ffu << SMC_ECC_PR11_NPARITY_Pos) /**< \brief (SMC_ECC_PR11) Parity N */
+/* -------- SMC_ECC_PR12 : (SMC Offset: 0x060) SMC ECC parity 12 Register -------- */
+#define SMC_ECC_PR12_BITADDR_Pos 0
+#define SMC_ECC_PR12_BITADDR_Msk (0x7u << SMC_ECC_PR12_BITADDR_Pos) /**< \brief (SMC_ECC_PR12) Corrupted Bit Address in the Page between (i x 256) and ((i + 1) x 512) - 1) Bytes */
+#define SMC_ECC_PR12_WORDADDR_Pos 3
+#define SMC_ECC_PR12_WORDADDR_Msk (0xffu << SMC_ECC_PR12_WORDADDR_Pos) /**< \brief (SMC_ECC_PR12) Corrupted Word Address in the Page between (i x 256) and ((i + 1) x 512) - 1) Bytes */
+#define SMC_ECC_PR12_NPARITY_Pos 12
+#define SMC_ECC_PR12_NPARITY_Msk (0x7ffu << SMC_ECC_PR12_NPARITY_Pos) /**< \brief (SMC_ECC_PR12) Parity N */
+/* -------- SMC_ECC_PR13 : (SMC Offset: 0x064) SMC ECC parity 13 Register -------- */
+#define SMC_ECC_PR13_BITADDR_Pos 0
+#define SMC_ECC_PR13_BITADDR_Msk (0x7u << SMC_ECC_PR13_BITADDR_Pos) /**< \brief (SMC_ECC_PR13) Corrupted Bit Address in the Page between (i x 256) and ((i + 1) x 512) - 1) Bytes */
+#define SMC_ECC_PR13_WORDADDR_Pos 3
+#define SMC_ECC_PR13_WORDADDR_Msk (0xffu << SMC_ECC_PR13_WORDADDR_Pos) /**< \brief (SMC_ECC_PR13) Corrupted Word Address in the Page between (i x 256) and ((i + 1) x 512) - 1) Bytes */
+#define SMC_ECC_PR13_NPARITY_Pos 12
+#define SMC_ECC_PR13_NPARITY_Msk (0x7ffu << SMC_ECC_PR13_NPARITY_Pos) /**< \brief (SMC_ECC_PR13) Parity N */
+/* -------- SMC_ECC_PR14 : (SMC Offset: 0x068) SMC ECC parity 14 Register -------- */
+#define SMC_ECC_PR14_BITADDR_Pos 0
+#define SMC_ECC_PR14_BITADDR_Msk (0x7u << SMC_ECC_PR14_BITADDR_Pos) /**< \brief (SMC_ECC_PR14) Corrupted Bit Address in the Page between (i x 256) and ((i + 1) x 512) - 1) Bytes */
+#define SMC_ECC_PR14_WORDADDR_Pos 3
+#define SMC_ECC_PR14_WORDADDR_Msk (0xffu << SMC_ECC_PR14_WORDADDR_Pos) /**< \brief (SMC_ECC_PR14) Corrupted Word Address in the Page between (i x 256) and ((i + 1) x 512) - 1) Bytes */
+#define SMC_ECC_PR14_NPARITY_Pos 12
+#define SMC_ECC_PR14_NPARITY_Msk (0x7ffu << SMC_ECC_PR14_NPARITY_Pos) /**< \brief (SMC_ECC_PR14) Parity N */
+/* -------- SMC_ECC_PR15 : (SMC Offset: 0x06C) SMC ECC parity 15 Register -------- */
+#define SMC_ECC_PR15_BITADDR_Pos 0
+#define SMC_ECC_PR15_BITADDR_Msk (0x7u << SMC_ECC_PR15_BITADDR_Pos) /**< \brief (SMC_ECC_PR15) Corrupted Bit Address in the Page between (i x 256) and ((i + 1) x 512) - 1) Bytes */
+#define SMC_ECC_PR15_WORDADDR_Pos 3
+#define SMC_ECC_PR15_WORDADDR_Msk (0xffu << SMC_ECC_PR15_WORDADDR_Pos) /**< \brief (SMC_ECC_PR15) Corrupted Word Address in the Page between (i x 256) and ((i + 1) x 512) - 1) Bytes */
+#define SMC_ECC_PR15_NPARITY_Pos 12
+#define SMC_ECC_PR15_NPARITY_Msk (0x7ffu << SMC_ECC_PR15_NPARITY_Pos) /**< \brief (SMC_ECC_PR15) Parity N */
+/* -------- SMC_SETUP : (SMC Offset: N/A) SMC Setup Register -------- */
+#define SMC_SETUP_NWE_SETUP_Pos 0
+#define SMC_SETUP_NWE_SETUP_Msk (0x3fu << SMC_SETUP_NWE_SETUP_Pos) /**< \brief (SMC_SETUP) NWE Setup Length */
+#define SMC_SETUP_NWE_SETUP(value) ((SMC_SETUP_NWE_SETUP_Msk & ((value) << SMC_SETUP_NWE_SETUP_Pos)))
+#define SMC_SETUP_NCS_WR_SETUP_Pos 8
+#define SMC_SETUP_NCS_WR_SETUP_Msk (0x3fu << SMC_SETUP_NCS_WR_SETUP_Pos) /**< \brief (SMC_SETUP) NCS Setup Length in Write Access */
+#define SMC_SETUP_NCS_WR_SETUP(value) ((SMC_SETUP_NCS_WR_SETUP_Msk & ((value) << SMC_SETUP_NCS_WR_SETUP_Pos)))
+#define SMC_SETUP_NRD_SETUP_Pos 16
+#define SMC_SETUP_NRD_SETUP_Msk (0x3fu << SMC_SETUP_NRD_SETUP_Pos) /**< \brief (SMC_SETUP) NRD Setup Length */
+#define SMC_SETUP_NRD_SETUP(value) ((SMC_SETUP_NRD_SETUP_Msk & ((value) << SMC_SETUP_NRD_SETUP_Pos)))
+#define SMC_SETUP_NCS_RD_SETUP_Pos 24
+#define SMC_SETUP_NCS_RD_SETUP_Msk (0x3fu << SMC_SETUP_NCS_RD_SETUP_Pos) /**< \brief (SMC_SETUP) NCS Setup Length in Read Access */
+#define SMC_SETUP_NCS_RD_SETUP(value) ((SMC_SETUP_NCS_RD_SETUP_Msk & ((value) << SMC_SETUP_NCS_RD_SETUP_Pos)))
+/* -------- SMC_PULSE : (SMC Offset: N/A) SMC Pulse Register -------- */
+#define SMC_PULSE_NWE_PULSE_Pos 0
+#define SMC_PULSE_NWE_PULSE_Msk (0x3fu << SMC_PULSE_NWE_PULSE_Pos) /**< \brief (SMC_PULSE) NWE Pulse Length */
+#define SMC_PULSE_NWE_PULSE(value) ((SMC_PULSE_NWE_PULSE_Msk & ((value) << SMC_PULSE_NWE_PULSE_Pos)))
+#define SMC_PULSE_NCS_WR_PULSE_Pos 8
+#define SMC_PULSE_NCS_WR_PULSE_Msk (0x3fu << SMC_PULSE_NCS_WR_PULSE_Pos) /**< \brief (SMC_PULSE) NCS Pulse Length in WRITE Access */
+#define SMC_PULSE_NCS_WR_PULSE(value) ((SMC_PULSE_NCS_WR_PULSE_Msk & ((value) << SMC_PULSE_NCS_WR_PULSE_Pos)))
+#define SMC_PULSE_NRD_PULSE_Pos 16
+#define SMC_PULSE_NRD_PULSE_Msk (0x3fu << SMC_PULSE_NRD_PULSE_Pos) /**< \brief (SMC_PULSE) NRD Pulse Length */
+#define SMC_PULSE_NRD_PULSE(value) ((SMC_PULSE_NRD_PULSE_Msk & ((value) << SMC_PULSE_NRD_PULSE_Pos)))
+#define SMC_PULSE_NCS_RD_PULSE_Pos 24
+#define SMC_PULSE_NCS_RD_PULSE_Msk (0x3fu << SMC_PULSE_NCS_RD_PULSE_Pos) /**< \brief (SMC_PULSE) NCS Pulse Length in READ Access */
+#define SMC_PULSE_NCS_RD_PULSE(value) ((SMC_PULSE_NCS_RD_PULSE_Msk & ((value) << SMC_PULSE_NCS_RD_PULSE_Pos)))
+/* -------- SMC_CYCLE : (SMC Offset: N/A) SMC Cycle Register -------- */
+#define SMC_CYCLE_NWE_CYCLE_Pos 0
+#define SMC_CYCLE_NWE_CYCLE_Msk (0x1ffu << SMC_CYCLE_NWE_CYCLE_Pos) /**< \brief (SMC_CYCLE) Total Write Cycle Length */
+#define SMC_CYCLE_NWE_CYCLE(value) ((SMC_CYCLE_NWE_CYCLE_Msk & ((value) << SMC_CYCLE_NWE_CYCLE_Pos)))
+#define SMC_CYCLE_NRD_CYCLE_Pos 16
+#define SMC_CYCLE_NRD_CYCLE_Msk (0x1ffu << SMC_CYCLE_NRD_CYCLE_Pos) /**< \brief (SMC_CYCLE) Total Read Cycle Length */
+#define SMC_CYCLE_NRD_CYCLE(value) ((SMC_CYCLE_NRD_CYCLE_Msk & ((value) << SMC_CYCLE_NRD_CYCLE_Pos)))
+/* -------- SMC_TIMINGS : (SMC Offset: N/A) SMC Timings Register -------- */
+#define SMC_TIMINGS_TCLR_Pos 0
+#define SMC_TIMINGS_TCLR_Msk (0xfu << SMC_TIMINGS_TCLR_Pos) /**< \brief (SMC_TIMINGS) CLE to REN Low Delay */
+#define SMC_TIMINGS_TCLR(value) ((SMC_TIMINGS_TCLR_Msk & ((value) << SMC_TIMINGS_TCLR_Pos)))
+#define SMC_TIMINGS_TADL_Pos 4
+#define SMC_TIMINGS_TADL_Msk (0xfu << SMC_TIMINGS_TADL_Pos) /**< \brief (SMC_TIMINGS) ALE to Data Start */
+#define SMC_TIMINGS_TADL(value) ((SMC_TIMINGS_TADL_Msk & ((value) << SMC_TIMINGS_TADL_Pos)))
+#define SMC_TIMINGS_TAR_Pos 8
+#define SMC_TIMINGS_TAR_Msk (0xfu << SMC_TIMINGS_TAR_Pos) /**< \brief (SMC_TIMINGS) ALE to REN Low Delay */
+#define SMC_TIMINGS_TAR(value) ((SMC_TIMINGS_TAR_Msk & ((value) << SMC_TIMINGS_TAR_Pos)))
+#define SMC_TIMINGS_OCMS (0x1u << 12) /**< \brief (SMC_TIMINGS) Off Chip Memory Scrambling Enable */
+#define SMC_TIMINGS_TRR_Pos 16
+#define SMC_TIMINGS_TRR_Msk (0xfu << SMC_TIMINGS_TRR_Pos) /**< \brief (SMC_TIMINGS) Ready to REN Low Delay */
+#define SMC_TIMINGS_TRR(value) ((SMC_TIMINGS_TRR_Msk & ((value) << SMC_TIMINGS_TRR_Pos)))
+#define SMC_TIMINGS_TWB_Pos 24
+#define SMC_TIMINGS_TWB_Msk (0xfu << SMC_TIMINGS_TWB_Pos) /**< \brief (SMC_TIMINGS) WEN High to REN to Busy */
+#define SMC_TIMINGS_TWB(value) ((SMC_TIMINGS_TWB_Msk & ((value) << SMC_TIMINGS_TWB_Pos)))
+#define SMC_TIMINGS_RBNSEL_Pos 28
+#define SMC_TIMINGS_RBNSEL_Msk (0x7u << SMC_TIMINGS_RBNSEL_Pos) /**< \brief (SMC_TIMINGS) Ready/Busy Line Selection */
+#define SMC_TIMINGS_RBNSEL(value) ((SMC_TIMINGS_RBNSEL_Msk & ((value) << SMC_TIMINGS_RBNSEL_Pos)))
+#define SMC_TIMINGS_NFSEL (0x1u << 31) /**< \brief (SMC_TIMINGS) NAND Flash Selection */
+/* -------- SMC_MODE : (SMC Offset: N/A) SMC Mode Register -------- */
+#define SMC_MODE_READ_MODE (0x1u << 0) /**< \brief (SMC_MODE) */
+#define SMC_MODE_READ_MODE_NCS_CTRL (0x0u << 0) /**< \brief (SMC_MODE) The Read operation is controlled by the NCS signal. */
+#define SMC_MODE_READ_MODE_NRD_CTRL (0x1u << 0) /**< \brief (SMC_MODE) The Read operation is controlled by the NRD signal. */
+#define SMC_MODE_WRITE_MODE (0x1u << 1) /**< \brief (SMC_MODE) */
+#define SMC_MODE_WRITE_MODE_NCS_CTRL (0x0u << 1) /**< \brief (SMC_MODE) The Write operation is controller by the NCS signal. */
+#define SMC_MODE_WRITE_MODE_NWE_CTRL (0x1u << 1) /**< \brief (SMC_MODE) The Write operation is controlled by the NWE signal. */
+#define SMC_MODE_EXNW_MODE_Pos 4
+#define SMC_MODE_EXNW_MODE_Msk (0x3u << SMC_MODE_EXNW_MODE_Pos) /**< \brief (SMC_MODE) NWAIT Mode */
+#define SMC_MODE_EXNW_MODE_DISABLED (0x0u << 4) /**< \brief (SMC_MODE) Disabled */
+#define SMC_MODE_EXNW_MODE_FROZEN (0x2u << 4) /**< \brief (SMC_MODE) Frozen Mode */
+#define SMC_MODE_EXNW_MODE_READY (0x3u << 4) /**< \brief (SMC_MODE) Ready Mode */
+#define SMC_MODE_BAT (0x1u << 8) /**< \brief (SMC_MODE) Byte Access Type */
+#define SMC_MODE_DBW (0x1u << 12) /**< \brief (SMC_MODE) Data Bus Width */
+#define SMC_MODE_DBW_BIT_8 (0x0u << 12) /**< \brief (SMC_MODE) 8-bit bus */
+#define SMC_MODE_DBW_BIT_16 (0x1u << 12) /**< \brief (SMC_MODE) 16-bit bus */
+#define SMC_MODE_TDF_CYCLES_Pos 16
+#define SMC_MODE_TDF_CYCLES_Msk (0xfu << SMC_MODE_TDF_CYCLES_Pos) /**< \brief (SMC_MODE) Data Float Time */
+#define SMC_MODE_TDF_CYCLES(value) ((SMC_MODE_TDF_CYCLES_Msk & ((value) << SMC_MODE_TDF_CYCLES_Pos)))
+#define SMC_MODE_TDF_MODE (0x1u << 20) /**< \brief (SMC_MODE) TDF Optimization */
+/* -------- SMC_OCMS : (SMC Offset: 0x110) SMC OCMS Register -------- */
+#define SMC_OCMS_SMSE (0x1u << 0) /**< \brief (SMC_OCMS) Static Memory Controller Scrambling Enable */
+#define SMC_OCMS_SRSE (0x1u << 1) /**< \brief (SMC_OCMS) SRAM Scrambling Enable */
+/* -------- SMC_KEY1 : (SMC Offset: 0x114) SMC OCMS KEY1 Register -------- */
+#define SMC_KEY1_KEY1_Pos 0
+#define SMC_KEY1_KEY1_Msk (0xffffffffu << SMC_KEY1_KEY1_Pos) /**< \brief (SMC_KEY1) Off Chip Memory Scrambling (OCMS) Key Part 1 */
+#define SMC_KEY1_KEY1(value) ((SMC_KEY1_KEY1_Msk & ((value) << SMC_KEY1_KEY1_Pos)))
+/* -------- SMC_KEY2 : (SMC Offset: 0x118) SMC OCMS KEY2 Register -------- */
+#define SMC_KEY2_KEY2_Pos 0
+#define SMC_KEY2_KEY2_Msk (0xffffffffu << SMC_KEY2_KEY2_Pos) /**< \brief (SMC_KEY2) Off Chip Memory Scrambling (OCMS) Key Part 2 */
+#define SMC_KEY2_KEY2(value) ((SMC_KEY2_KEY2_Msk & ((value) << SMC_KEY2_KEY2_Pos)))
+/* -------- SMC_WPCR : (SMC Offset: 0x1E4) Write Protection Control Register -------- */
+#define SMC_WPCR_WP_EN (0x1u << 0) /**< \brief (SMC_WPCR) Write Protection Enable */
+#define SMC_WPCR_WP_KEY_Pos 8
+#define SMC_WPCR_WP_KEY_Msk (0xffffffu << SMC_WPCR_WP_KEY_Pos) /**< \brief (SMC_WPCR) Write Protection KEY password */
+#define SMC_WPCR_WP_KEY(value) ((SMC_WPCR_WP_KEY_Msk & ((value) << SMC_WPCR_WP_KEY_Pos)))
+/* -------- SMC_WPSR : (SMC Offset: 0x1E8) Write Protection Status Register -------- */
+#define SMC_WPSR_WP_VS_Pos 0
+#define SMC_WPSR_WP_VS_Msk (0xfu << SMC_WPSR_WP_VS_Pos) /**< \brief (SMC_WPSR) Write Protection Violation Status */
+#define SMC_WPSR_WP_VSRC_Pos 8
+#define SMC_WPSR_WP_VSRC_Msk (0xffffu << SMC_WPSR_WP_VSRC_Pos) /**< \brief (SMC_WPSR) Write Protection Violation Source */
+/* -------- NFCADDR_CMD : NFC Address Command -------- */
+#define NFCADDR_CMD_CMD1 (0xFFu << 2) /* Command Register Value for Cycle 1 */
+#define NFCADDR_CMD_CMD2 (0xFFu << 10) /* Command Register Value for Cycle 2 */
+#define NFCADDR_CMD_VCMD2 (0x1u << 18) /* Valid Cycle 2 Command */
+#define NFCADDR_CMD_ACYCLE (0x7u << 19) /* Number of Address required for the current command */
+#define NFCADDR_CMD_ACYCLE_NONE (0x0u << 19) /* No address cycle */
+#define NFCADDR_CMD_ACYCLE_ONE (0x1u << 19) /* One address cycle */
+#define NFCADDR_CMD_ACYCLE_TWO (0x2u << 19) /* Two address cycles */
+#define NFCADDR_CMD_ACYCLE_THREE (0x3u << 19) /* Three address cycles */
+#define NFCADDR_CMD_ACYCLE_FOUR (0x4u << 19) /* Four address cycles */
+#define NFCADDR_CMD_ACYCLE_FIVE (0x5u << 19) /* Five address cycles */
+#define NFCADDR_CMD_CSID (0x7u << 22) /* Chip Select Identifier */
+#define NFCADDR_CMD_CSID_0 (0x0u << 22) /* CS0 */
+#define NFCADDR_CMD_CSID_1 (0x1u << 22) /* CS1 */
+#define NFCADDR_CMD_CSID_2 (0x2u << 22) /* CS2 */
+#define NFCADDR_CMD_CSID_3 (0x3u << 22) /* CS3 */
+#define NFCADDR_CMD_CSID_4 (0x4u << 22) /* CS4 */
+#define NFCADDR_CMD_CSID_5 (0x5u << 22) /* CS5 */
+#define NFCADDR_CMD_CSID_6 (0x6u << 22) /* CS6 */
+#define NFCADDR_CMD_CSID_7 (0x7u << 22) /* CS7 */
+#define NFCADDR_CMD_NFCEN (0x1u << 25) /* NFC Enable */
+#define NFCADDR_CMD_NFCWR (0x1u << 26) /* NFC Write Enable */
+#define NFCADDR_CMD_NFCCMD (0x1u << 27) /* NFC Command Enable */
+
+/*@}*/
+
+/* ============================================================================= */
+/** SOFTWARE API DEFINITION FOR Serial Peripheral Interface */
+/* ============================================================================= */
+/** \addtogroup SAM3XA_SPI Serial Peripheral Interface */
+/*@{*/
+
+#ifndef __ASSEMBLY__
+/** \brief Spi hardware registers */
+typedef struct {
+ WoReg SPI_CR; /**< \brief (Spi Offset: 0x00) Control Register */
+ RwReg SPI_MR; /**< \brief (Spi Offset: 0x04) Mode Register */
+ RoReg SPI_RDR; /**< \brief (Spi Offset: 0x08) Receive Data Register */
+ WoReg SPI_TDR; /**< \brief (Spi Offset: 0x0C) Transmit Data Register */
+ RoReg SPI_SR; /**< \brief (Spi Offset: 0x10) Status Register */
+ WoReg SPI_IER; /**< \brief (Spi Offset: 0x14) Interrupt Enable Register */
+ WoReg SPI_IDR; /**< \brief (Spi Offset: 0x18) Interrupt Disable Register */
+ RoReg SPI_IMR; /**< \brief (Spi Offset: 0x1C) Interrupt Mask Register */
+ RoReg Reserved1[4];
+ RwReg SPI_CSR[4]; /**< \brief (Spi Offset: 0x30) Chip Select Register */
+ RoReg Reserved2[41];
+ RwReg SPI_WPMR; /**< \brief (Spi Offset: 0xE4) Write Protection Control Register */
+ RoReg SPI_WPSR; /**< \brief (Spi Offset: 0xE8) Write Protection Status Register */
+} Spi;
+#endif /* __ASSEMBLY__ */
+/* -------- SPI_CR : (SPI Offset: 0x00) Control Register -------- */
+#define SPI_CR_SPIEN (0x1u << 0) /**< \brief (SPI_CR) SPI Enable */
+#define SPI_CR_SPIDIS (0x1u << 1) /**< \brief (SPI_CR) SPI Disable */
+#define SPI_CR_SWRST (0x1u << 7) /**< \brief (SPI_CR) SPI Software Reset */
+#define SPI_CR_LASTXFER (0x1u << 24) /**< \brief (SPI_CR) Last Transfer */
+/* -------- SPI_MR : (SPI Offset: 0x04) Mode Register -------- */
+#define SPI_MR_MSTR (0x1u << 0) /**< \brief (SPI_MR) Master/Slave Mode */
+#define SPI_MR_PS (0x1u << 1) /**< \brief (SPI_MR) Peripheral Select */
+#define SPI_MR_PCSDEC (0x1u << 2) /**< \brief (SPI_MR) Chip Select Decode */
+#define SPI_MR_MODFDIS (0x1u << 4) /**< \brief (SPI_MR) Mode Fault Detection */
+#define SPI_MR_WDRBT (0x1u << 5) /**< \brief (SPI_MR) Wait Data Read Before Transfer */
+#define SPI_MR_LLB (0x1u << 7) /**< \brief (SPI_MR) Local Loopback Enable */
+#define SPI_MR_PCS_Pos 16
+#define SPI_MR_PCS_Msk (0xfu << SPI_MR_PCS_Pos) /**< \brief (SPI_MR) Peripheral Chip Select */
+#define SPI_MR_PCS(value) ((SPI_MR_PCS_Msk & ((value) << SPI_MR_PCS_Pos)))
+#define SPI_MR_DLYBCS_Pos 24
+#define SPI_MR_DLYBCS_Msk (0xffu << SPI_MR_DLYBCS_Pos) /**< \brief (SPI_MR) Delay Between Chip Selects */
+#define SPI_MR_DLYBCS(value) ((SPI_MR_DLYBCS_Msk & ((value) << SPI_MR_DLYBCS_Pos)))
+/* -------- SPI_RDR : (SPI Offset: 0x08) Receive Data Register -------- */
+#define SPI_RDR_RD_Pos 0
+#define SPI_RDR_RD_Msk (0xffffu << SPI_RDR_RD_Pos) /**< \brief (SPI_RDR) Receive Data */
+#define SPI_RDR_PCS_Pos 16
+#define SPI_RDR_PCS_Msk (0xfu << SPI_RDR_PCS_Pos) /**< \brief (SPI_RDR) Peripheral Chip Select */
+/* -------- SPI_TDR : (SPI Offset: 0x0C) Transmit Data Register -------- */
+#define SPI_TDR_TD_Pos 0
+#define SPI_TDR_TD_Msk (0xffffu << SPI_TDR_TD_Pos) /**< \brief (SPI_TDR) Transmit Data */
+#define SPI_TDR_TD(value) ((SPI_TDR_TD_Msk & ((value) << SPI_TDR_TD_Pos)))
+#define SPI_TDR_PCS_Pos 16
+#define SPI_TDR_PCS_Msk (0xfu << SPI_TDR_PCS_Pos) /**< \brief (SPI_TDR) Peripheral Chip Select */
+#define SPI_TDR_PCS(value) ((SPI_TDR_PCS_Msk & ((value) << SPI_TDR_PCS_Pos)))
+#define SPI_TDR_LASTXFER (0x1u << 24) /**< \brief (SPI_TDR) Last Transfer */
+/* -------- SPI_SR : (SPI Offset: 0x10) Status Register -------- */
+#define SPI_SR_RDRF (0x1u << 0) /**< \brief (SPI_SR) Receive Data Register Full */
+#define SPI_SR_TDRE (0x1u << 1) /**< \brief (SPI_SR) Transmit Data Register Empty */
+#define SPI_SR_MODF (0x1u << 2) /**< \brief (SPI_SR) Mode Fault Error */
+#define SPI_SR_OVRES (0x1u << 3) /**< \brief (SPI_SR) Overrun Error Status */
+#define SPI_SR_NSSR (0x1u << 8) /**< \brief (SPI_SR) NSS Rising */
+#define SPI_SR_TXEMPTY (0x1u << 9) /**< \brief (SPI_SR) Transmission Registers Empty */
+#define SPI_SR_UNDES (0x1u << 10) /**< \brief (SPI_SR) Underrun Error Status (Slave Mode Only) */
+#define SPI_SR_SPIENS (0x1u << 16) /**< \brief (SPI_SR) SPI Enable Status */
+/* -------- SPI_IER : (SPI Offset: 0x14) Interrupt Enable Register -------- */
+#define SPI_IER_RDRF (0x1u << 0) /**< \brief (SPI_IER) Receive Data Register Full Interrupt Enable */
+#define SPI_IER_TDRE (0x1u << 1) /**< \brief (SPI_IER) SPI Transmit Data Register Empty Interrupt Enable */
+#define SPI_IER_MODF (0x1u << 2) /**< \brief (SPI_IER) Mode Fault Error Interrupt Enable */
+#define SPI_IER_OVRES (0x1u << 3) /**< \brief (SPI_IER) Overrun Error Interrupt Enable */
+#define SPI_IER_NSSR (0x1u << 8) /**< \brief (SPI_IER) NSS Rising Interrupt Enable */
+#define SPI_IER_TXEMPTY (0x1u << 9) /**< \brief (SPI_IER) Transmission Registers Empty Enable */
+#define SPI_IER_UNDES (0x1u << 10) /**< \brief (SPI_IER) Underrun Error Interrupt Enable */
+/* -------- SPI_IDR : (SPI Offset: 0x18) Interrupt Disable Register -------- */
+#define SPI_IDR_RDRF (0x1u << 0) /**< \brief (SPI_IDR) Receive Data Register Full Interrupt Disable */
+#define SPI_IDR_TDRE (0x1u << 1) /**< \brief (SPI_IDR) SPI Transmit Data Register Empty Interrupt Disable */
+#define SPI_IDR_MODF (0x1u << 2) /**< \brief (SPI_IDR) Mode Fault Error Interrupt Disable */
+#define SPI_IDR_OVRES (0x1u << 3) /**< \brief (SPI_IDR) Overrun Error Interrupt Disable */
+#define SPI_IDR_NSSR (0x1u << 8) /**< \brief (SPI_IDR) NSS Rising Interrupt Disable */
+#define SPI_IDR_TXEMPTY (0x1u << 9) /**< \brief (SPI_IDR) Transmission Registers Empty Disable */
+#define SPI_IDR_UNDES (0x1u << 10) /**< \brief (SPI_IDR) Underrun Error Interrupt Disable */
+/* -------- SPI_IMR : (SPI Offset: 0x1C) Interrupt Mask Register -------- */
+#define SPI_IMR_RDRF (0x1u << 0) /**< \brief (SPI_IMR) Receive Data Register Full Interrupt Mask */
+#define SPI_IMR_TDRE (0x1u << 1) /**< \brief (SPI_IMR) SPI Transmit Data Register Empty Interrupt Mask */
+#define SPI_IMR_MODF (0x1u << 2) /**< \brief (SPI_IMR) Mode Fault Error Interrupt Mask */
+#define SPI_IMR_OVRES (0x1u << 3) /**< \brief (SPI_IMR) Overrun Error Interrupt Mask */
+#define SPI_IMR_NSSR (0x1u << 8) /**< \brief (SPI_IMR) NSS Rising Interrupt Mask */
+#define SPI_IMR_TXEMPTY (0x1u << 9) /**< \brief (SPI_IMR) Transmission Registers Empty Mask */
+#define SPI_IMR_UNDES (0x1u << 10) /**< \brief (SPI_IMR) Underrun Error Interrupt Mask */
+/* -------- SPI_CSR[4] : (SPI Offset: 0x30) Chip Select Register -------- */
+#define SPI_CSR_CPOL (0x1u << 0) /**< \brief (SPI_CSR[4]) Clock Polarity */
+#define SPI_CSR_NCPHA (0x1u << 1) /**< \brief (SPI_CSR[4]) Clock Phase */
+#define SPI_CSR_CSNAAT (0x1u << 2) /**< \brief (SPI_CSR[4]) Chip Select Not Active After Transfer (Ignored if CSAAT = 1) */
+#define SPI_CSR_CSAAT (0x1u << 3) /**< \brief (SPI_CSR[4]) Chip Select Not Active After Transfer (Ignored if CSAAT = 1) */
+#define SPI_CSR_BITS_Pos 4
+#define SPI_CSR_BITS_Msk (0xfu << SPI_CSR_BITS_Pos) /**< \brief (SPI_CSR[4]) Bits Per Transfer */
+#define SPI_CSR_BITS_8_BIT (0x0u << 4) /**< \brief (SPI_CSR[4]) 8 bits for transfer */
+#define SPI_CSR_BITS_9_BIT (0x1u << 4) /**< \brief (SPI_CSR[4]) 9 bits for transfer */
+#define SPI_CSR_BITS_10_BIT (0x2u << 4) /**< \brief (SPI_CSR[4]) 10 bits for transfer */
+#define SPI_CSR_BITS_11_BIT (0x3u << 4) /**< \brief (SPI_CSR[4]) 11 bits for transfer */
+#define SPI_CSR_BITS_12_BIT (0x4u << 4) /**< \brief (SPI_CSR[4]) 12 bits for transfer */
+#define SPI_CSR_BITS_13_BIT (0x5u << 4) /**< \brief (SPI_CSR[4]) 13 bits for transfer */
+#define SPI_CSR_BITS_14_BIT (0x6u << 4) /**< \brief (SPI_CSR[4]) 14 bits for transfer */
+#define SPI_CSR_BITS_15_BIT (0x7u << 4) /**< \brief (SPI_CSR[4]) 15 bits for transfer */
+#define SPI_CSR_BITS_16_BIT (0x8u << 4) /**< \brief (SPI_CSR[4]) 16 bits for transfer */
+#define SPI_CSR_SCBR_Pos 8
+#define SPI_CSR_SCBR_Msk (0xffu << SPI_CSR_SCBR_Pos) /**< \brief (SPI_CSR[4]) Serial Clock Baud Rate */
+#define SPI_CSR_SCBR(value) ((SPI_CSR_SCBR_Msk & ((value) << SPI_CSR_SCBR_Pos)))
+#define SPI_CSR_DLYBS_Pos 16
+#define SPI_CSR_DLYBS_Msk (0xffu << SPI_CSR_DLYBS_Pos) /**< \brief (SPI_CSR[4]) Delay Before SPCK */
+#define SPI_CSR_DLYBS(value) ((SPI_CSR_DLYBS_Msk & ((value) << SPI_CSR_DLYBS_Pos)))
+#define SPI_CSR_DLYBCT_Pos 24
+#define SPI_CSR_DLYBCT_Msk (0xffu << SPI_CSR_DLYBCT_Pos) /**< \brief (SPI_CSR[4]) Delay Between Consecutive Transfers */
+#define SPI_CSR_DLYBCT(value) ((SPI_CSR_DLYBCT_Msk & ((value) << SPI_CSR_DLYBCT_Pos)))
+/* -------- SPI_WPMR : (SPI Offset: 0xE4) Write Protection Control Register -------- */
+#define SPI_WPMR_SPIWPEN (0x1u << 0) /**< \brief (SPI_WPMR) SPI Write Protection Enable */
+#define SPI_WPMR_SPIWPKEY_Pos 8
+#define SPI_WPMR_SPIWPKEY_Msk (0xffffffu << SPI_WPMR_SPIWPKEY_Pos) /**< \brief (SPI_WPMR) SPI Write Protection Key Password */
+#define SPI_WPMR_SPIWPKEY(value) ((SPI_WPMR_SPIWPKEY_Msk & ((value) << SPI_WPMR_SPIWPKEY_Pos)))
+/* -------- SPI_WPSR : (SPI Offset: 0xE8) Write Protection Status Register -------- */
+#define SPI_WPSR_SPIWPVS_Pos 0
+#define SPI_WPSR_SPIWPVS_Msk (0x7u << SPI_WPSR_SPIWPVS_Pos) /**< \brief (SPI_WPSR) SPI Write Protection Violation Status */
+#define SPI_WPSR_SPIWPVSRC_Pos 8
+#define SPI_WPSR_SPIWPVSRC_Msk (0xffu << SPI_WPSR_SPIWPVSRC_Pos) /**< \brief (SPI_WPSR) SPI Write Protection Violation Source */
+
+/*@}*/
+
+/* ============================================================================= */
+/** SOFTWARE API DEFINITION FOR Synchronous Serial Controller */
+/* ============================================================================= */
+/** \addtogroup SAM3XA_SSC Synchronous Serial Controller */
+/*@{*/
+
+#ifndef __ASSEMBLY__
+/** \brief Ssc hardware registers */
+typedef struct {
+ WoReg SSC_CR; /**< \brief (Ssc Offset: 0x0) Control Register */
+ RwReg SSC_CMR; /**< \brief (Ssc Offset: 0x4) Clock Mode Register */
+ RoReg Reserved1[2];
+ RwReg SSC_RCMR; /**< \brief (Ssc Offset: 0x10) Receive Clock Mode Register */
+ RwReg SSC_RFMR; /**< \brief (Ssc Offset: 0x14) Receive Frame Mode Register */
+ RwReg SSC_TCMR; /**< \brief (Ssc Offset: 0x18) Transmit Clock Mode Register */
+ RwReg SSC_TFMR; /**< \brief (Ssc Offset: 0x1C) Transmit Frame Mode Register */
+ RoReg SSC_RHR; /**< \brief (Ssc Offset: 0x20) Receive Holding Register */
+ WoReg SSC_THR; /**< \brief (Ssc Offset: 0x24) Transmit Holding Register */
+ RoReg Reserved2[2];
+ RoReg SSC_RSHR; /**< \brief (Ssc Offset: 0x30) Receive Sync. Holding Register */
+ RwReg SSC_TSHR; /**< \brief (Ssc Offset: 0x34) Transmit Sync. Holding Register */
+ RwReg SSC_RC0R; /**< \brief (Ssc Offset: 0x38) Receive Compare 0 Register */
+ RwReg SSC_RC1R; /**< \brief (Ssc Offset: 0x3C) Receive Compare 1 Register */
+ RoReg SSC_SR; /**< \brief (Ssc Offset: 0x40) Status Register */
+ WoReg SSC_IER; /**< \brief (Ssc Offset: 0x44) Interrupt Enable Register */
+ WoReg SSC_IDR; /**< \brief (Ssc Offset: 0x48) Interrupt Disable Register */
+ RoReg SSC_IMR; /**< \brief (Ssc Offset: 0x4C) Interrupt Mask Register */
+ RoReg Reserved3[37];
+ RwReg SSC_WPMR; /**< \brief (Ssc Offset: 0xE4) Write Protect Mode Register */
+ RoReg SSC_WPSR; /**< \brief (Ssc Offset: 0xE8) Write Protect Status Register */
+} Ssc;
+#endif /* __ASSEMBLY__ */
+/* -------- SSC_CR : (SSC Offset: 0x0) Control Register -------- */
+#define SSC_CR_RXEN (0x1u << 0) /**< \brief (SSC_CR) Receive Enable */
+#define SSC_CR_RXDIS (0x1u << 1) /**< \brief (SSC_CR) Receive Disable */
+#define SSC_CR_TXEN (0x1u << 8) /**< \brief (SSC_CR) Transmit Enable */
+#define SSC_CR_TXDIS (0x1u << 9) /**< \brief (SSC_CR) Transmit Disable */
+#define SSC_CR_SWRST (0x1u << 15) /**< \brief (SSC_CR) Software Reset */
+/* -------- SSC_CMR : (SSC Offset: 0x4) Clock Mode Register -------- */
+#define SSC_CMR_DIV_Pos 0
+#define SSC_CMR_DIV_Msk (0xfffu << SSC_CMR_DIV_Pos) /**< \brief (SSC_CMR) Clock Divider */
+#define SSC_CMR_DIV(value) ((SSC_CMR_DIV_Msk & ((value) << SSC_CMR_DIV_Pos)))
+/* -------- SSC_RCMR : (SSC Offset: 0x10) Receive Clock Mode Register -------- */
+#define SSC_RCMR_CKS_Pos 0
+#define SSC_RCMR_CKS_Msk (0x3u << SSC_RCMR_CKS_Pos) /**< \brief (SSC_RCMR) Receive Clock Selection */
+#define SSC_RCMR_CKS_MCK (0x0u << 0) /**< \brief (SSC_RCMR) Divided Clock */
+#define SSC_RCMR_CKS_TK (0x1u << 0) /**< \brief (SSC_RCMR) TK Clock signal */
+#define SSC_RCMR_CKS_RK (0x2u << 0) /**< \brief (SSC_RCMR) RK pin */
+#define SSC_RCMR_CKO_Pos 2
+#define SSC_RCMR_CKO_Msk (0x7u << SSC_RCMR_CKO_Pos) /**< \brief (SSC_RCMR) Receive Clock Output Mode Selection */
+#define SSC_RCMR_CKO_NONE (0x0u << 2) /**< \brief (SSC_RCMR) None */
+#define SSC_RCMR_CKO_CONTINUOUS (0x1u << 2) /**< \brief (SSC_RCMR) Continuous Receive Clock */
+#define SSC_RCMR_CKO_TRANSFER (0x2u << 2) /**< \brief (SSC_RCMR) Receive Clock only during data transfers */
+#define SSC_RCMR_CKI (0x1u << 5) /**< \brief (SSC_RCMR) Receive Clock Inversion */
+#define SSC_RCMR_CKG_Pos 6
+#define SSC_RCMR_CKG_Msk (0x3u << SSC_RCMR_CKG_Pos) /**< \brief (SSC_RCMR) Receive Clock Gating Selection */
+#define SSC_RCMR_CKG_NONE (0x0u << 6) /**< \brief (SSC_RCMR) None */
+#define SSC_RCMR_CKG_CONTINUOUS (0x1u << 6) /**< \brief (SSC_RCMR) Continuous Receive Clock */
+#define SSC_RCMR_CKG_TRANSFER (0x2u << 6) /**< \brief (SSC_RCMR) Receive Clock only during data transfers */
+#define SSC_RCMR_START_Pos 8
+#define SSC_RCMR_START_Msk (0xfu << SSC_RCMR_START_Pos) /**< \brief (SSC_RCMR) Receive Start Selection */
+#define SSC_RCMR_START_CONTINUOUS (0x0u << 8) /**< \brief (SSC_RCMR) Continuous, as soon as the receiver is enabled, and immediately after the end of transfer of the previous data. */
+#define SSC_RCMR_START_TRANSMIT (0x1u << 8) /**< \brief (SSC_RCMR) Transmit start */
+#define SSC_RCMR_START_RF_LOW (0x2u << 8) /**< \brief (SSC_RCMR) Detection of a low level on RF signal */
+#define SSC_RCMR_START_RF_HIGH (0x3u << 8) /**< \brief (SSC_RCMR) Detection of a high level on RF signal */
+#define SSC_RCMR_START_RF_FALLING (0x4u << 8) /**< \brief (SSC_RCMR) Detection of a falling edge on RF signal */
+#define SSC_RCMR_START_RF_RISING (0x5u << 8) /**< \brief (SSC_RCMR) Detection of a rising edge on RF signal */
+#define SSC_RCMR_START_RF_LEVEL (0x6u << 8) /**< \brief (SSC_RCMR) Detection of any level change on RF signal */
+#define SSC_RCMR_START_RF_EDGE (0x7u << 8) /**< \brief (SSC_RCMR) Detection of any edge on RF signal */
+#define SSC_RCMR_START_CMP_0 (0x8u << 8) /**< \brief (SSC_RCMR) Compare 0 */
+#define SSC_RCMR_STOP (0x1u << 12) /**< \brief (SSC_RCMR) Receive Stop Selection */
+#define SSC_RCMR_STTDLY_Pos 16
+#define SSC_RCMR_STTDLY_Msk (0xffu << SSC_RCMR_STTDLY_Pos) /**< \brief (SSC_RCMR) Receive Start Delay */
+#define SSC_RCMR_STTDLY(value) ((SSC_RCMR_STTDLY_Msk & ((value) << SSC_RCMR_STTDLY_Pos)))
+#define SSC_RCMR_PERIOD_Pos 24
+#define SSC_RCMR_PERIOD_Msk (0xffu << SSC_RCMR_PERIOD_Pos) /**< \brief (SSC_RCMR) Receive Period Divider Selection */
+#define SSC_RCMR_PERIOD(value) ((SSC_RCMR_PERIOD_Msk & ((value) << SSC_RCMR_PERIOD_Pos)))
+/* -------- SSC_RFMR : (SSC Offset: 0x14) Receive Frame Mode Register -------- */
+#define SSC_RFMR_DATLEN_Pos 0
+#define SSC_RFMR_DATLEN_Msk (0x1fu << SSC_RFMR_DATLEN_Pos) /**< \brief (SSC_RFMR) Data Length */
+#define SSC_RFMR_DATLEN(value) ((SSC_RFMR_DATLEN_Msk & ((value) << SSC_RFMR_DATLEN_Pos)))
+#define SSC_RFMR_LOOP (0x1u << 5) /**< \brief (SSC_RFMR) Loop Mode */
+#define SSC_RFMR_MSBF (0x1u << 7) /**< \brief (SSC_RFMR) Most Significant Bit First */
+#define SSC_RFMR_DATNB_Pos 8
+#define SSC_RFMR_DATNB_Msk (0xfu << SSC_RFMR_DATNB_Pos) /**< \brief (SSC_RFMR) Data Number per Frame */
+#define SSC_RFMR_DATNB(value) ((SSC_RFMR_DATNB_Msk & ((value) << SSC_RFMR_DATNB_Pos)))
+#define SSC_RFMR_FSLEN_Pos 16
+#define SSC_RFMR_FSLEN_Msk (0xfu << SSC_RFMR_FSLEN_Pos) /**< \brief (SSC_RFMR) Receive Frame Sync Length */
+#define SSC_RFMR_FSLEN(value) ((SSC_RFMR_FSLEN_Msk & ((value) << SSC_RFMR_FSLEN_Pos)))
+#define SSC_RFMR_FSOS_Pos 20
+#define SSC_RFMR_FSOS_Msk (0x7u << SSC_RFMR_FSOS_Pos) /**< \brief (SSC_RFMR) Receive Frame Sync Output Selection */
+#define SSC_RFMR_FSOS_NONE (0x0u << 20) /**< \brief (SSC_RFMR) None */
+#define SSC_RFMR_FSOS_NEGATIVE (0x1u << 20) /**< \brief (SSC_RFMR) Negative Pulse */
+#define SSC_RFMR_FSOS_POSITIVE (0x2u << 20) /**< \brief (SSC_RFMR) Positive Pulse */
+#define SSC_RFMR_FSOS_LOW (0x3u << 20) /**< \brief (SSC_RFMR) Driven Low during data transfer */
+#define SSC_RFMR_FSOS_HIGH (0x4u << 20) /**< \brief (SSC_RFMR) Driven High during data transfer */
+#define SSC_RFMR_FSOS_TOGGLING (0x5u << 20) /**< \brief (SSC_RFMR) Toggling at each start of data transfer */
+#define SSC_RFMR_FSEDGE (0x1u << 24) /**< \brief (SSC_RFMR) Frame Sync Edge Detection */
+#define SSC_RFMR_FSEDGE_POSITIVE (0x0u << 24) /**< \brief (SSC_RFMR) Positive Edge Detection */
+#define SSC_RFMR_FSEDGE_NEGATIVE (0x1u << 24) /**< \brief (SSC_RFMR) Negative Edge Detection */
+#define SSC_RFMR_FSLEN_EXT_Pos 28
+#define SSC_RFMR_FSLEN_EXT_Msk (0xfu << SSC_RFMR_FSLEN_EXT_Pos) /**< \brief (SSC_RFMR) FSLEN Field Extension */
+#define SSC_RFMR_FSLEN_EXT(value) ((SSC_RFMR_FSLEN_EXT_Msk & ((value) << SSC_RFMR_FSLEN_EXT_Pos)))
+/* -------- SSC_TCMR : (SSC Offset: 0x18) Transmit Clock Mode Register -------- */
+#define SSC_TCMR_CKS_Pos 0
+#define SSC_TCMR_CKS_Msk (0x3u << SSC_TCMR_CKS_Pos) /**< \brief (SSC_TCMR) Transmit Clock Selection */
+#define SSC_TCMR_CKS_MCK (0x0u << 0) /**< \brief (SSC_TCMR) Divided Clock */
+#define SSC_TCMR_CKS_TK (0x1u << 0) /**< \brief (SSC_TCMR) TK Clock signal */
+#define SSC_TCMR_CKS_RK (0x2u << 0) /**< \brief (SSC_TCMR) RK pin */
+#define SSC_TCMR_CKO_Pos 2
+#define SSC_TCMR_CKO_Msk (0x7u << SSC_TCMR_CKO_Pos) /**< \brief (SSC_TCMR) Transmit Clock Output Mode Selection */
+#define SSC_TCMR_CKO_NONE (0x0u << 2) /**< \brief (SSC_TCMR) None */
+#define SSC_TCMR_CKO_CONTINUOUS (0x1u << 2) /**< \brief (SSC_TCMR) Continuous Receive Clock */
+#define SSC_TCMR_CKO_TRANSFER (0x2u << 2) /**< \brief (SSC_TCMR) Transmit Clock only during data transfers */
+#define SSC_TCMR_CKI (0x1u << 5) /**< \brief (SSC_TCMR) Transmit Clock Inversion */
+#define SSC_TCMR_CKG_Pos 6
+#define SSC_TCMR_CKG_Msk (0x3u << SSC_TCMR_CKG_Pos) /**< \brief (SSC_TCMR) Transmit Clock Gating Selection */
+#define SSC_TCMR_CKG_NONE (0x0u << 6) /**< \brief (SSC_TCMR) None */
+#define SSC_TCMR_CKG_CONTINUOUS (0x1u << 6) /**< \brief (SSC_TCMR) Transmit Clock enabled only if TF Low */
+#define SSC_TCMR_CKG_TRANSFER (0x2u << 6) /**< \brief (SSC_TCMR) Transmit Clock enabled only if TF High */
+#define SSC_TCMR_START_Pos 8
+#define SSC_TCMR_START_Msk (0xfu << SSC_TCMR_START_Pos) /**< \brief (SSC_TCMR) Transmit Start Selection */
+#define SSC_TCMR_START_CONTINUOUS (0x0u << 8) /**< \brief (SSC_TCMR) Continuous, as soon as a word is written in the SSC_THR Register (if Transmit is enabled), and immediately after the end of transfer of the previous data. */
+#define SSC_TCMR_START_RECEIVE (0x1u << 8) /**< \brief (SSC_TCMR) Receive start */
+#define SSC_TCMR_START_RF_LOW (0x2u << 8) /**< \brief (SSC_TCMR) Detection of a low level on TF signal */
+#define SSC_TCMR_START_RF_HIGH (0x3u << 8) /**< \brief (SSC_TCMR) Detection of a high level on TF signal */
+#define SSC_TCMR_START_RF_FALLING (0x4u << 8) /**< \brief (SSC_TCMR) Detection of a falling edge on TF signal */
+#define SSC_TCMR_START_RF_RISING (0x5u << 8) /**< \brief (SSC_TCMR) Detection of a rising edge on TF signal */
+#define SSC_TCMR_START_RF_LEVEL (0x6u << 8) /**< \brief (SSC_TCMR) Detection of any level change on TF signal */
+#define SSC_TCMR_START_RF_EDGE (0x7u << 8) /**< \brief (SSC_TCMR) Detection of any edge on TF signal */
+#define SSC_TCMR_START_CMP_0 (0x8u << 8) /**< \brief (SSC_TCMR) Compare 0 */
+#define SSC_TCMR_STTDLY_Pos 16
+#define SSC_TCMR_STTDLY_Msk (0xffu << SSC_TCMR_STTDLY_Pos) /**< \brief (SSC_TCMR) Transmit Start Delay */
+#define SSC_TCMR_STTDLY(value) ((SSC_TCMR_STTDLY_Msk & ((value) << SSC_TCMR_STTDLY_Pos)))
+#define SSC_TCMR_PERIOD_Pos 24
+#define SSC_TCMR_PERIOD_Msk (0xffu << SSC_TCMR_PERIOD_Pos) /**< \brief (SSC_TCMR) Transmit Period Divider Selection */
+#define SSC_TCMR_PERIOD(value) ((SSC_TCMR_PERIOD_Msk & ((value) << SSC_TCMR_PERIOD_Pos)))
+/* -------- SSC_TFMR : (SSC Offset: 0x1C) Transmit Frame Mode Register -------- */
+#define SSC_TFMR_DATLEN_Pos 0
+#define SSC_TFMR_DATLEN_Msk (0x1fu << SSC_TFMR_DATLEN_Pos) /**< \brief (SSC_TFMR) Data Length */
+#define SSC_TFMR_DATLEN(value) ((SSC_TFMR_DATLEN_Msk & ((value) << SSC_TFMR_DATLEN_Pos)))
+#define SSC_TFMR_DATDEF (0x1u << 5) /**< \brief (SSC_TFMR) Data Default Value */
+#define SSC_TFMR_MSBF (0x1u << 7) /**< \brief (SSC_TFMR) Most Significant Bit First */
+#define SSC_TFMR_DATNB_Pos 8
+#define SSC_TFMR_DATNB_Msk (0xfu << SSC_TFMR_DATNB_Pos) /**< \brief (SSC_TFMR) Data Number per frame */
+#define SSC_TFMR_DATNB(value) ((SSC_TFMR_DATNB_Msk & ((value) << SSC_TFMR_DATNB_Pos)))
+#define SSC_TFMR_FSLEN_Pos 16
+#define SSC_TFMR_FSLEN_Msk (0xfu << SSC_TFMR_FSLEN_Pos) /**< \brief (SSC_TFMR) Transmit Frame Sync Length */
+#define SSC_TFMR_FSLEN(value) ((SSC_TFMR_FSLEN_Msk & ((value) << SSC_TFMR_FSLEN_Pos)))
+#define SSC_TFMR_FSOS_Pos 20
+#define SSC_TFMR_FSOS_Msk (0x7u << SSC_TFMR_FSOS_Pos) /**< \brief (SSC_TFMR) Transmit Frame Sync Output Selection */
+#define SSC_TFMR_FSOS_NONE (0x0u << 20) /**< \brief (SSC_TFMR) None */
+#define SSC_TFMR_FSOS_NEGATIVE (0x1u << 20) /**< \brief (SSC_TFMR) Negative Pulse */
+#define SSC_TFMR_FSOS_POSITIVE (0x2u << 20) /**< \brief (SSC_TFMR) Positive Pulse */
+#define SSC_TFMR_FSOS_LOW (0x3u << 20) /**< \brief (SSC_TFMR) Driven Low during data transfer */
+#define SSC_TFMR_FSOS_HIGH (0x4u << 20) /**< \brief (SSC_TFMR) Driven High during data transfer */
+#define SSC_TFMR_FSOS_TOGGLING (0x5u << 20) /**< \brief (SSC_TFMR) Toggling at each start of data transfer */
+#define SSC_TFMR_FSDEN (0x1u << 23) /**< \brief (SSC_TFMR) Frame Sync Data Enable */
+#define SSC_TFMR_FSEDGE (0x1u << 24) /**< \brief (SSC_TFMR) Frame Sync Edge Detection */
+#define SSC_TFMR_FSEDGE_POSITIVE (0x0u << 24) /**< \brief (SSC_TFMR) Positive Edge Detection */
+#define SSC_TFMR_FSEDGE_NEGATIVE (0x1u << 24) /**< \brief (SSC_TFMR) Negative Edge Detection */
+#define SSC_TFMR_FSLEN_EXT_Pos 28
+#define SSC_TFMR_FSLEN_EXT_Msk (0xfu << SSC_TFMR_FSLEN_EXT_Pos) /**< \brief (SSC_TFMR) FSLEN Field Extension */
+#define SSC_TFMR_FSLEN_EXT(value) ((SSC_TFMR_FSLEN_EXT_Msk & ((value) << SSC_TFMR_FSLEN_EXT_Pos)))
+/* -------- SSC_RHR : (SSC Offset: 0x20) Receive Holding Register -------- */
+#define SSC_RHR_RDAT_Pos 0
+#define SSC_RHR_RDAT_Msk (0xffffffffu << SSC_RHR_RDAT_Pos) /**< \brief (SSC_RHR) Receive Data */
+/* -------- SSC_THR : (SSC Offset: 0x24) Transmit Holding Register -------- */
+#define SSC_THR_TDAT_Pos 0
+#define SSC_THR_TDAT_Msk (0xffffffffu << SSC_THR_TDAT_Pos) /**< \brief (SSC_THR) Transmit Data */
+#define SSC_THR_TDAT(value) ((SSC_THR_TDAT_Msk & ((value) << SSC_THR_TDAT_Pos)))
+/* -------- SSC_RSHR : (SSC Offset: 0x30) Receive Sync. Holding Register -------- */
+#define SSC_RSHR_RSDAT_Pos 0
+#define SSC_RSHR_RSDAT_Msk (0xffffu << SSC_RSHR_RSDAT_Pos) /**< \brief (SSC_RSHR) Receive Synchronization Data */
+/* -------- SSC_TSHR : (SSC Offset: 0x34) Transmit Sync. Holding Register -------- */
+#define SSC_TSHR_TSDAT_Pos 0
+#define SSC_TSHR_TSDAT_Msk (0xffffu << SSC_TSHR_TSDAT_Pos) /**< \brief (SSC_TSHR) Transmit Synchronization Data */
+#define SSC_TSHR_TSDAT(value) ((SSC_TSHR_TSDAT_Msk & ((value) << SSC_TSHR_TSDAT_Pos)))
+/* -------- SSC_RC0R : (SSC Offset: 0x38) Receive Compare 0 Register -------- */
+#define SSC_RC0R_CP0_Pos 0
+#define SSC_RC0R_CP0_Msk (0xffffu << SSC_RC0R_CP0_Pos) /**< \brief (SSC_RC0R) Receive Compare Data 0 */
+#define SSC_RC0R_CP0(value) ((SSC_RC0R_CP0_Msk & ((value) << SSC_RC0R_CP0_Pos)))
+/* -------- SSC_RC1R : (SSC Offset: 0x3C) Receive Compare 1 Register -------- */
+#define SSC_RC1R_CP1_Pos 0
+#define SSC_RC1R_CP1_Msk (0xffffu << SSC_RC1R_CP1_Pos) /**< \brief (SSC_RC1R) Receive Compare Data 1 */
+#define SSC_RC1R_CP1(value) ((SSC_RC1R_CP1_Msk & ((value) << SSC_RC1R_CP1_Pos)))
+/* -------- SSC_SR : (SSC Offset: 0x40) Status Register -------- */
+#define SSC_SR_TXRDY (0x1u << 0) /**< \brief (SSC_SR) Transmit Ready */
+#define SSC_SR_TXEMPTY (0x1u << 1) /**< \brief (SSC_SR) Transmit Empty */
+#define SSC_SR_RXRDY (0x1u << 4) /**< \brief (SSC_SR) Receive Ready */
+#define SSC_SR_OVRUN (0x1u << 5) /**< \brief (SSC_SR) Receive Overrun */
+#define SSC_SR_CP0 (0x1u << 8) /**< \brief (SSC_SR) Compare 0 */
+#define SSC_SR_CP1 (0x1u << 9) /**< \brief (SSC_SR) Compare 1 */
+#define SSC_SR_TXSYN (0x1u << 10) /**< \brief (SSC_SR) Transmit Sync */
+#define SSC_SR_RXSYN (0x1u << 11) /**< \brief (SSC_SR) Receive Sync */
+#define SSC_SR_TXEN (0x1u << 16) /**< \brief (SSC_SR) Transmit Enable */
+#define SSC_SR_RXEN (0x1u << 17) /**< \brief (SSC_SR) Receive Enable */
+/* -------- SSC_IER : (SSC Offset: 0x44) Interrupt Enable Register -------- */
+#define SSC_IER_TXRDY (0x1u << 0) /**< \brief (SSC_IER) Transmit Ready Interrupt Enable */
+#define SSC_IER_TXEMPTY (0x1u << 1) /**< \brief (SSC_IER) Transmit Empty Interrupt Enable */
+#define SSC_IER_RXRDY (0x1u << 4) /**< \brief (SSC_IER) Receive Ready Interrupt Enable */
+#define SSC_IER_OVRUN (0x1u << 5) /**< \brief (SSC_IER) Receive Overrun Interrupt Enable */
+#define SSC_IER_CP0 (0x1u << 8) /**< \brief (SSC_IER) Compare 0 Interrupt Enable */
+#define SSC_IER_CP1 (0x1u << 9) /**< \brief (SSC_IER) Compare 1 Interrupt Enable */
+#define SSC_IER_TXSYN (0x1u << 10) /**< \brief (SSC_IER) Tx Sync Interrupt Enable */
+#define SSC_IER_RXSYN (0x1u << 11) /**< \brief (SSC_IER) Rx Sync Interrupt Enable */
+/* -------- SSC_IDR : (SSC Offset: 0x48) Interrupt Disable Register -------- */
+#define SSC_IDR_TXRDY (0x1u << 0) /**< \brief (SSC_IDR) Transmit Ready Interrupt Disable */
+#define SSC_IDR_TXEMPTY (0x1u << 1) /**< \brief (SSC_IDR) Transmit Empty Interrupt Disable */
+#define SSC_IDR_RXRDY (0x1u << 4) /**< \brief (SSC_IDR) Receive Ready Interrupt Disable */
+#define SSC_IDR_OVRUN (0x1u << 5) /**< \brief (SSC_IDR) Receive Overrun Interrupt Disable */
+#define SSC_IDR_CP0 (0x1u << 8) /**< \brief (SSC_IDR) Compare 0 Interrupt Disable */
+#define SSC_IDR_CP1 (0x1u << 9) /**< \brief (SSC_IDR) Compare 1 Interrupt Disable */
+#define SSC_IDR_TXSYN (0x1u << 10) /**< \brief (SSC_IDR) Tx Sync Interrupt Enable */
+#define SSC_IDR_RXSYN (0x1u << 11) /**< \brief (SSC_IDR) Rx Sync Interrupt Enable */
+/* -------- SSC_IMR : (SSC Offset: 0x4C) Interrupt Mask Register -------- */
+#define SSC_IMR_TXRDY (0x1u << 0) /**< \brief (SSC_IMR) Transmit Ready Interrupt Mask */
+#define SSC_IMR_TXEMPTY (0x1u << 1) /**< \brief (SSC_IMR) Transmit Empty Interrupt Mask */
+#define SSC_IMR_RXRDY (0x1u << 4) /**< \brief (SSC_IMR) Receive Ready Interrupt Mask */
+#define SSC_IMR_OVRUN (0x1u << 5) /**< \brief (SSC_IMR) Receive Overrun Interrupt Mask */
+#define SSC_IMR_CP0 (0x1u << 8) /**< \brief (SSC_IMR) Compare 0 Interrupt Mask */
+#define SSC_IMR_CP1 (0x1u << 9) /**< \brief (SSC_IMR) Compare 1 Interrupt Mask */
+#define SSC_IMR_TXSYN (0x1u << 10) /**< \brief (SSC_IMR) Tx Sync Interrupt Mask */
+#define SSC_IMR_RXSYN (0x1u << 11) /**< \brief (SSC_IMR) Rx Sync Interrupt Mask */
+/* -------- SSC_WPMR : (SSC Offset: 0xE4) Write Protect Mode Register -------- */
+#define SSC_WPMR_WPEN (0x1u << 0) /**< \brief (SSC_WPMR) Write Protect Enable */
+#define SSC_WPMR_WPKEY_Pos 8
+#define SSC_WPMR_WPKEY_Msk (0xffffffu << SSC_WPMR_WPKEY_Pos) /**< \brief (SSC_WPMR) Write Protect KEY */
+#define SSC_WPMR_WPKEY(value) ((SSC_WPMR_WPKEY_Msk & ((value) << SSC_WPMR_WPKEY_Pos)))
+/* -------- SSC_WPSR : (SSC Offset: 0xE8) Write Protect Status Register -------- */
+#define SSC_WPSR_WPVS (0x1u << 0) /**< \brief (SSC_WPSR) Write Protect Violation Status */
+#define SSC_WPSR_WPVSRC_Pos 8
+#define SSC_WPSR_WPVSRC_Msk (0xffffu << SSC_WPSR_WPVSRC_Pos) /**< \brief (SSC_WPSR) Write Protect Violation Source */
+
+/*@}*/
+
+/* ============================================================================= */
+/** SOFTWARE API DEFINITION FOR Supply Controller */
+/* ============================================================================= */
+/** \addtogroup SAM3XA_SUPC Supply Controller */
+/*@{*/
+
+#ifndef __ASSEMBLY__
+/** \brief Supc hardware registers */
+typedef struct {
+ WoReg SUPC_CR; /**< \brief (Supc Offset: 0x00) Supply Controller Control Register */
+ RwReg SUPC_SMMR; /**< \brief (Supc Offset: 0x04) Supply Controller Supply Monitor Mode Register */
+ RwReg SUPC_MR; /**< \brief (Supc Offset: 0x08) Supply Controller Mode Register */
+ RwReg SUPC_WUMR; /**< \brief (Supc Offset: 0x0C) Supply Controller Wake Up Mode Register */
+ RwReg SUPC_WUIR; /**< \brief (Supc Offset: 0x10) Supply Controller Wake Up Inputs Register */
+ RoReg SUPC_SR; /**< \brief (Supc Offset: 0x14) Supply Controller Status Register */
+} Supc;
+#endif /* __ASSEMBLY__ */
+/* -------- SUPC_CR : (SUPC Offset: 0x00) Supply Controller Control Register -------- */
+#define SUPC_CR_VROFF (0x1u << 2) /**< \brief (SUPC_CR) Voltage Regulator Off */
+#define SUPC_CR_VROFF_NO_EFFECT (0x0u << 2) /**< \brief (SUPC_CR) no effect. */
+#define SUPC_CR_VROFF_STOP_VREG (0x1u << 2) /**< \brief (SUPC_CR) if KEY is correct, asserts vddcore_nreset and stops the voltage regulator. */
+#define SUPC_CR_XTALSEL (0x1u << 3) /**< \brief (SUPC_CR) Crystal Oscillator Select */
+#define SUPC_CR_XTALSEL_NO_EFFECT (0x0u << 3) /**< \brief (SUPC_CR) no effect. */
+#define SUPC_CR_XTALSEL_CRYSTAL_SEL (0x1u << 3) /**< \brief (SUPC_CR) if KEY is correct, switches the slow clock on the crystal oscillator output. */
+#define SUPC_CR_KEY_Pos 24
+#define SUPC_CR_KEY_Msk (0xffu << SUPC_CR_KEY_Pos) /**< \brief (SUPC_CR) Password */
+#define SUPC_CR_KEY(value) ((SUPC_CR_KEY_Msk & ((value) << SUPC_CR_KEY_Pos)))
+/* -------- SUPC_SMMR : (SUPC Offset: 0x04) Supply Controller Supply Monitor Mode Register -------- */
+#define SUPC_SMMR_SMTH_Pos 0
+#define SUPC_SMMR_SMTH_Msk (0xfu << SUPC_SMMR_SMTH_Pos) /**< \brief (SUPC_SMMR) Supply Monitor Threshold */
+#define SUPC_SMMR_SMTH_1_9V (0x0u << 0) /**< \brief (SUPC_SMMR) 1.9 V */
+#define SUPC_SMMR_SMTH_2_0V (0x1u << 0) /**< \brief (SUPC_SMMR) 2.0 V */
+#define SUPC_SMMR_SMTH_2_1V (0x2u << 0) /**< \brief (SUPC_SMMR) 2.1 V */
+#define SUPC_SMMR_SMTH_2_2V (0x3u << 0) /**< \brief (SUPC_SMMR) 2.2 V */
+#define SUPC_SMMR_SMTH_2_3V (0x4u << 0) /**< \brief (SUPC_SMMR) 2.3 V */
+#define SUPC_SMMR_SMTH_2_4V (0x5u << 0) /**< \brief (SUPC_SMMR) 2.4 V */
+#define SUPC_SMMR_SMTH_2_5V (0x6u << 0) /**< \brief (SUPC_SMMR) 2.5 V */
+#define SUPC_SMMR_SMTH_2_6V (0x7u << 0) /**< \brief (SUPC_SMMR) 2.6 V */
+#define SUPC_SMMR_SMTH_2_7V (0x8u << 0) /**< \brief (SUPC_SMMR) 2.7 V */
+#define SUPC_SMMR_SMTH_2_8V (0x9u << 0) /**< \brief (SUPC_SMMR) 2.8 V */
+#define SUPC_SMMR_SMTH_2_9V (0xAu << 0) /**< \brief (SUPC_SMMR) 2.9 V */
+#define SUPC_SMMR_SMTH_3_0V (0xBu << 0) /**< \brief (SUPC_SMMR) 3.0 V */
+#define SUPC_SMMR_SMTH_3_1V (0xCu << 0) /**< \brief (SUPC_SMMR) 3.1 V */
+#define SUPC_SMMR_SMTH_3_2V (0xDu << 0) /**< \brief (SUPC_SMMR) 3.2 V */
+#define SUPC_SMMR_SMTH_3_3V (0xEu << 0) /**< \brief (SUPC_SMMR) 3.3 V */
+#define SUPC_SMMR_SMTH_3_4V (0xFu << 0) /**< \brief (SUPC_SMMR) 3.4 V */
+#define SUPC_SMMR_SMSMPL_Pos 8
+#define SUPC_SMMR_SMSMPL_Msk (0x7u << SUPC_SMMR_SMSMPL_Pos) /**< \brief (SUPC_SMMR) Supply Monitor Sampling Period */
+#define SUPC_SMMR_SMSMPL_SMD (0x0u << 8) /**< \brief (SUPC_SMMR) Supply Monitor disabled */
+#define SUPC_SMMR_SMSMPL_CSM (0x1u << 8) /**< \brief (SUPC_SMMR) Continuous Supply Monitor */
+#define SUPC_SMMR_SMSMPL_32SLCK (0x2u << 8) /**< \brief (SUPC_SMMR) Supply Monitor enabled one SLCK period every 32 SLCK periods */
+#define SUPC_SMMR_SMSMPL_256SLCK (0x3u << 8) /**< \brief (SUPC_SMMR) Supply Monitor enabled one SLCK period every 256 SLCK periods */
+#define SUPC_SMMR_SMSMPL_2048SLCK (0x4u << 8) /**< \brief (SUPC_SMMR) Supply Monitor enabled one SLCK period every 2,048 SLCK periods */
+#define SUPC_SMMR_SMRSTEN (0x1u << 12) /**< \brief (SUPC_SMMR) Supply Monitor Reset Enable */
+#define SUPC_SMMR_SMRSTEN_NOT_ENABLE (0x0u << 12) /**< \brief (SUPC_SMMR) the core reset signal "vddcore_nreset" is not affected when a supply monitor detection occurs. */
+#define SUPC_SMMR_SMRSTEN_ENABLE (0x1u << 12) /**< \brief (SUPC_SMMR) the core reset signal, vddcore_nreset is asserted when a supply monitor detection occurs. */
+#define SUPC_SMMR_SMIEN (0x1u << 13) /**< \brief (SUPC_SMMR) Supply Monitor Interrupt Enable */
+#define SUPC_SMMR_SMIEN_NOT_ENABLE (0x0u << 13) /**< \brief (SUPC_SMMR) the SUPC interrupt signal is not affected when a supply monitor detection occurs. */
+#define SUPC_SMMR_SMIEN_ENABLE (0x1u << 13) /**< \brief (SUPC_SMMR) the SUPC interrupt signal is asserted when a supply monitor detection occurs. */
+/* -------- SUPC_MR : (SUPC Offset: 0x08) Supply Controller Mode Register -------- */
+#define SUPC_MR_BODRSTEN (0x1u << 12) /**< \brief (SUPC_MR) Brownout Detector Reset Enable */
+#define SUPC_MR_BODRSTEN_NOT_ENABLE (0x0u << 12) /**< \brief (SUPC_MR) the core reset signal "vddcore_nreset" is not affected when a brownout detection occurs. */
+#define SUPC_MR_BODRSTEN_ENABLE (0x1u << 12) /**< \brief (SUPC_MR) the core reset signal, vddcore_nreset is asserted when a brownout detection occurs. */
+#define SUPC_MR_BODDIS (0x1u << 13) /**< \brief (SUPC_MR) Brownout Detector Disable */
+#define SUPC_MR_BODDIS_ENABLE (0x0u << 13) /**< \brief (SUPC_MR) the core brownout detector is enabled. */
+#define SUPC_MR_BODDIS_DISABLE (0x1u << 13) /**< \brief (SUPC_MR) the core brownout detector is disabled. */
+#define SUPC_MR_VDDIORDYONREG (0x1u << 14) /**< \brief (SUPC_MR) */
+#define SUPC_MR_OSCBYPASS (0x1u << 20) /**< \brief (SUPC_MR) Oscillator Bypass */
+#define SUPC_MR_OSCBYPASS_NO_EFFECT (0x0u << 20) /**< \brief (SUPC_MR) no effect. Clock selection depends on XTALSEL value. */
+#define SUPC_MR_OSCBYPASS_BYPASS (0x1u << 20) /**< \brief (SUPC_MR) the 32-KHz XTAL oscillator is selected and is put in bypass mode. */
+#define SUPC_MR_KEY_Pos 24
+#define SUPC_MR_KEY_Msk (0xffu << SUPC_MR_KEY_Pos) /**< \brief (SUPC_MR) Password Key */
+#define SUPC_MR_KEY(value) ((SUPC_MR_KEY_Msk & ((value) << SUPC_MR_KEY_Pos)))
+/* -------- SUPC_WUMR : (SUPC Offset: 0x0C) Supply Controller Wake Up Mode Register -------- */
+#define SUPC_WUMR_FWUPEN (0x1u << 0) /**< \brief (SUPC_WUMR) Force Wake Up Enable */
+#define SUPC_WUMR_FWUPEN_NOT_ENABLE (0x0u << 0) /**< \brief (SUPC_WUMR) the Force Wake Up pin has no wake up effect. */
+#define SUPC_WUMR_FWUPEN_ENABLE (0x1u << 0) /**< \brief (SUPC_WUMR) the Force Wake Up pin low forces the wake up of the core power supply. */
+#define SUPC_WUMR_SMEN (0x1u << 1) /**< \brief (SUPC_WUMR) Supply Monitor Wake Up Enable */
+#define SUPC_WUMR_SMEN_NOT_ENABLE (0x0u << 1) /**< \brief (SUPC_WUMR) the supply monitor detection has no wake up effect. */
+#define SUPC_WUMR_SMEN_ENABLE (0x1u << 1) /**< \brief (SUPC_WUMR) the supply monitor detection forces the wake up of the core power supply. */
+#define SUPC_WUMR_RTTEN (0x1u << 2) /**< \brief (SUPC_WUMR) Real Time Timer Wake Up Enable */
+#define SUPC_WUMR_RTTEN_NOT_ENABLE (0x0u << 2) /**< \brief (SUPC_WUMR) the RTT alarm signal has no wake up effect. */
+#define SUPC_WUMR_RTTEN_ENABLE (0x1u << 2) /**< \brief (SUPC_WUMR) the RTT alarm signal forces the wake up of the core power supply. */
+#define SUPC_WUMR_RTCEN (0x1u << 3) /**< \brief (SUPC_WUMR) Real Time Clock Wake Up Enable */
+#define SUPC_WUMR_RTCEN_NOT_ENABLE (0x0u << 3) /**< \brief (SUPC_WUMR) the RTC alarm signal has no wake up effect. */
+#define SUPC_WUMR_RTCEN_ENABLE (0x1u << 3) /**< \brief (SUPC_WUMR) the RTC alarm signal forces the wake up of the core power supply. */
+#define SUPC_WUMR_FWUPDBC_Pos 8
+#define SUPC_WUMR_FWUPDBC_Msk (0x7u << SUPC_WUMR_FWUPDBC_Pos) /**< \brief (SUPC_WUMR) Force Wake Up Debouncer Period */
+#define SUPC_WUMR_FWUPDBC_IMMEDIATE (0x0u << 8) /**< \brief (SUPC_WUMR) Immediate, no debouncing, detected active at least on one Slow Clock edge. */
+#define SUPC_WUMR_FWUPDBC_3_SCLK (0x1u << 8) /**< \brief (SUPC_WUMR) FWUP shall be low for at least 3 SLCK periods */
+#define SUPC_WUMR_FWUPDBC_32_SCLK (0x2u << 8) /**< \brief (SUPC_WUMR) FWUP shall be low for at least 32 SLCK periods */
+#define SUPC_WUMR_FWUPDBC_512_SCLK (0x3u << 8) /**< \brief (SUPC_WUMR) FWUP shall be low for at least 512 SLCK periods */
+#define SUPC_WUMR_FWUPDBC_4096_SCLK (0x4u << 8) /**< \brief (SUPC_WUMR) FWUP shall be low for at least 4,096 SLCK periods */
+#define SUPC_WUMR_FWUPDBC_32768_SCLK (0x5u << 8) /**< \brief (SUPC_WUMR) FWUP shall be low for at least 32,768 SLCK periods */
+#define SUPC_WUMR_WKUPDBC_Pos 12
+#define SUPC_WUMR_WKUPDBC_Msk (0x7u << SUPC_WUMR_WKUPDBC_Pos) /**< \brief (SUPC_WUMR) Wake Up Inputs Debouncer Period */
+#define SUPC_WUMR_WKUPDBC_IMMEDIATE (0x0u << 12) /**< \brief (SUPC_WUMR) Immediate, no debouncing, detected active at least on one Slow Clock edge. */
+#define SUPC_WUMR_WKUPDBC_3_SCLK (0x1u << 12) /**< \brief (SUPC_WUMR) WKUPx shall be in its active state for at least 3 SLCK periods */
+#define SUPC_WUMR_WKUPDBC_32_SCLK (0x2u << 12) /**< \brief (SUPC_WUMR) WKUPx shall be in its active state for at least 32 SLCK periods */
+#define SUPC_WUMR_WKUPDBC_512_SCLK (0x3u << 12) /**< \brief (SUPC_WUMR) WKUPx shall be in its active state for at least 512 SLCK periods */
+#define SUPC_WUMR_WKUPDBC_4096_SCLK (0x4u << 12) /**< \brief (SUPC_WUMR) WKUPx shall be in its active state for at least 4,096 SLCK periods */
+#define SUPC_WUMR_WKUPDBC_32768_SCLK (0x5u << 12) /**< \brief (SUPC_WUMR) WKUPx shall be in its active state for at least 32,768 SLCK periods */
+/* -------- SUPC_WUIR : (SUPC Offset: 0x10) Supply Controller Wake Up Inputs Register -------- */
+#define SUPC_WUIR_WKUPEN0 (0x1u << 0) /**< \brief (SUPC_WUIR) Wake Up Input Enable 0 */
+#define SUPC_WUIR_WKUPEN0_NOT_ENABLE (0x0u << 0) /**< \brief (SUPC_WUIR) the corresponding wake-up input has no wake up effect. */
+#define SUPC_WUIR_WKUPEN0_ENABLE (0x1u << 0) /**< \brief (SUPC_WUIR) the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPEN1 (0x1u << 1) /**< \brief (SUPC_WUIR) Wake Up Input Enable 1 */
+#define SUPC_WUIR_WKUPEN1_NOT_ENABLE (0x0u << 1) /**< \brief (SUPC_WUIR) the corresponding wake-up input has no wake up effect. */
+#define SUPC_WUIR_WKUPEN1_ENABLE (0x1u << 1) /**< \brief (SUPC_WUIR) the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPEN2 (0x1u << 2) /**< \brief (SUPC_WUIR) Wake Up Input Enable 2 */
+#define SUPC_WUIR_WKUPEN2_NOT_ENABLE (0x0u << 2) /**< \brief (SUPC_WUIR) the corresponding wake-up input has no wake up effect. */
+#define SUPC_WUIR_WKUPEN2_ENABLE (0x1u << 2) /**< \brief (SUPC_WUIR) the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPEN3 (0x1u << 3) /**< \brief (SUPC_WUIR) Wake Up Input Enable 3 */
+#define SUPC_WUIR_WKUPEN3_NOT_ENABLE (0x0u << 3) /**< \brief (SUPC_WUIR) the corresponding wake-up input has no wake up effect. */
+#define SUPC_WUIR_WKUPEN3_ENABLE (0x1u << 3) /**< \brief (SUPC_WUIR) the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPEN4 (0x1u << 4) /**< \brief (SUPC_WUIR) Wake Up Input Enable 4 */
+#define SUPC_WUIR_WKUPEN4_NOT_ENABLE (0x0u << 4) /**< \brief (SUPC_WUIR) the corresponding wake-up input has no wake up effect. */
+#define SUPC_WUIR_WKUPEN4_ENABLE (0x1u << 4) /**< \brief (SUPC_WUIR) the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPEN5 (0x1u << 5) /**< \brief (SUPC_WUIR) Wake Up Input Enable 5 */
+#define SUPC_WUIR_WKUPEN5_NOT_ENABLE (0x0u << 5) /**< \brief (SUPC_WUIR) the corresponding wake-up input has no wake up effect. */
+#define SUPC_WUIR_WKUPEN5_ENABLE (0x1u << 5) /**< \brief (SUPC_WUIR) the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPEN6 (0x1u << 6) /**< \brief (SUPC_WUIR) Wake Up Input Enable 6 */
+#define SUPC_WUIR_WKUPEN6_NOT_ENABLE (0x0u << 6) /**< \brief (SUPC_WUIR) the corresponding wake-up input has no wake up effect. */
+#define SUPC_WUIR_WKUPEN6_ENABLE (0x1u << 6) /**< \brief (SUPC_WUIR) the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPEN7 (0x1u << 7) /**< \brief (SUPC_WUIR) Wake Up Input Enable 7 */
+#define SUPC_WUIR_WKUPEN7_NOT_ENABLE (0x0u << 7) /**< \brief (SUPC_WUIR) the corresponding wake-up input has no wake up effect. */
+#define SUPC_WUIR_WKUPEN7_ENABLE (0x1u << 7) /**< \brief (SUPC_WUIR) the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPEN8 (0x1u << 8) /**< \brief (SUPC_WUIR) Wake Up Input Enable 8 */
+#define SUPC_WUIR_WKUPEN8_NOT_ENABLE (0x0u << 8) /**< \brief (SUPC_WUIR) the corresponding wake-up input has no wake up effect. */
+#define SUPC_WUIR_WKUPEN8_ENABLE (0x1u << 8) /**< \brief (SUPC_WUIR) the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPEN9 (0x1u << 9) /**< \brief (SUPC_WUIR) Wake Up Input Enable 9 */
+#define SUPC_WUIR_WKUPEN9_NOT_ENABLE (0x0u << 9) /**< \brief (SUPC_WUIR) the corresponding wake-up input has no wake up effect. */
+#define SUPC_WUIR_WKUPEN9_ENABLE (0x1u << 9) /**< \brief (SUPC_WUIR) the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPEN10 (0x1u << 10) /**< \brief (SUPC_WUIR) Wake Up Input Enable 10 */
+#define SUPC_WUIR_WKUPEN10_NOT_ENABLE (0x0u << 10) /**< \brief (SUPC_WUIR) the corresponding wake-up input has no wake up effect. */
+#define SUPC_WUIR_WKUPEN10_ENABLE (0x1u << 10) /**< \brief (SUPC_WUIR) the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPEN11 (0x1u << 11) /**< \brief (SUPC_WUIR) Wake Up Input Enable 11 */
+#define SUPC_WUIR_WKUPEN11_NOT_ENABLE (0x0u << 11) /**< \brief (SUPC_WUIR) the corresponding wake-up input has no wake up effect. */
+#define SUPC_WUIR_WKUPEN11_ENABLE (0x1u << 11) /**< \brief (SUPC_WUIR) the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPEN12 (0x1u << 12) /**< \brief (SUPC_WUIR) Wake Up Input Enable 12 */
+#define SUPC_WUIR_WKUPEN12_NOT_ENABLE (0x0u << 12) /**< \brief (SUPC_WUIR) the corresponding wake-up input has no wake up effect. */
+#define SUPC_WUIR_WKUPEN12_ENABLE (0x1u << 12) /**< \brief (SUPC_WUIR) the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPEN13 (0x1u << 13) /**< \brief (SUPC_WUIR) Wake Up Input Enable 13 */
+#define SUPC_WUIR_WKUPEN13_NOT_ENABLE (0x0u << 13) /**< \brief (SUPC_WUIR) the corresponding wake-up input has no wake up effect. */
+#define SUPC_WUIR_WKUPEN13_ENABLE (0x1u << 13) /**< \brief (SUPC_WUIR) the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPEN14 (0x1u << 14) /**< \brief (SUPC_WUIR) Wake Up Input Enable 14 */
+#define SUPC_WUIR_WKUPEN14_NOT_ENABLE (0x0u << 14) /**< \brief (SUPC_WUIR) the corresponding wake-up input has no wake up effect. */
+#define SUPC_WUIR_WKUPEN14_ENABLE (0x1u << 14) /**< \brief (SUPC_WUIR) the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPEN15 (0x1u << 15) /**< \brief (SUPC_WUIR) Wake Up Input Enable 15 */
+#define SUPC_WUIR_WKUPEN15_NOT_ENABLE (0x0u << 15) /**< \brief (SUPC_WUIR) the corresponding wake-up input has no wake up effect. */
+#define SUPC_WUIR_WKUPEN15_ENABLE (0x1u << 15) /**< \brief (SUPC_WUIR) the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPT0 (0x1u << 16) /**< \brief (SUPC_WUIR) Wake Up Input Transition 0 */
+#define SUPC_WUIR_WKUPT0_HIGH_TO_LOW (0x0u << 16) /**< \brief (SUPC_WUIR) a high to low level transition on the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPT0_LOW_TO_HIGH (0x1u << 16) /**< \brief (SUPC_WUIR) a low to high level transition on the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPT1 (0x1u << 17) /**< \brief (SUPC_WUIR) Wake Up Input Transition 1 */
+#define SUPC_WUIR_WKUPT1_HIGH_TO_LOW (0x0u << 17) /**< \brief (SUPC_WUIR) a high to low level transition on the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPT1_LOW_TO_HIGH (0x1u << 17) /**< \brief (SUPC_WUIR) a low to high level transition on the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPT2 (0x1u << 18) /**< \brief (SUPC_WUIR) Wake Up Input Transition 2 */
+#define SUPC_WUIR_WKUPT2_HIGH_TO_LOW (0x0u << 18) /**< \brief (SUPC_WUIR) a high to low level transition on the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPT2_LOW_TO_HIGH (0x1u << 18) /**< \brief (SUPC_WUIR) a low to high level transition on the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPT3 (0x1u << 19) /**< \brief (SUPC_WUIR) Wake Up Input Transition 3 */
+#define SUPC_WUIR_WKUPT3_HIGH_TO_LOW (0x0u << 19) /**< \brief (SUPC_WUIR) a high to low level transition on the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPT3_LOW_TO_HIGH (0x1u << 19) /**< \brief (SUPC_WUIR) a low to high level transition on the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPT4 (0x1u << 20) /**< \brief (SUPC_WUIR) Wake Up Input Transition 4 */
+#define SUPC_WUIR_WKUPT4_HIGH_TO_LOW (0x0u << 20) /**< \brief (SUPC_WUIR) a high to low level transition on the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPT4_LOW_TO_HIGH (0x1u << 20) /**< \brief (SUPC_WUIR) a low to high level transition on the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPT5 (0x1u << 21) /**< \brief (SUPC_WUIR) Wake Up Input Transition 5 */
+#define SUPC_WUIR_WKUPT5_HIGH_TO_LOW (0x0u << 21) /**< \brief (SUPC_WUIR) a high to low level transition on the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPT5_LOW_TO_HIGH (0x1u << 21) /**< \brief (SUPC_WUIR) a low to high level transition on the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPT6 (0x1u << 22) /**< \brief (SUPC_WUIR) Wake Up Input Transition 6 */
+#define SUPC_WUIR_WKUPT6_HIGH_TO_LOW (0x0u << 22) /**< \brief (SUPC_WUIR) a high to low level transition on the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPT6_LOW_TO_HIGH (0x1u << 22) /**< \brief (SUPC_WUIR) a low to high level transition on the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPT7 (0x1u << 23) /**< \brief (SUPC_WUIR) Wake Up Input Transition 7 */
+#define SUPC_WUIR_WKUPT7_HIGH_TO_LOW (0x0u << 23) /**< \brief (SUPC_WUIR) a high to low level transition on the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPT7_LOW_TO_HIGH (0x1u << 23) /**< \brief (SUPC_WUIR) a low to high level transition on the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPT8 (0x1u << 24) /**< \brief (SUPC_WUIR) Wake Up Input Transition 8 */
+#define SUPC_WUIR_WKUPT8_HIGH_TO_LOW (0x0u << 24) /**< \brief (SUPC_WUIR) a high to low level transition on the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPT8_LOW_TO_HIGH (0x1u << 24) /**< \brief (SUPC_WUIR) a low to high level transition on the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPT9 (0x1u << 25) /**< \brief (SUPC_WUIR) Wake Up Input Transition 9 */
+#define SUPC_WUIR_WKUPT9_HIGH_TO_LOW (0x0u << 25) /**< \brief (SUPC_WUIR) a high to low level transition on the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPT9_LOW_TO_HIGH (0x1u << 25) /**< \brief (SUPC_WUIR) a low to high level transition on the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPT10 (0x1u << 26) /**< \brief (SUPC_WUIR) Wake Up Input Transition 10 */
+#define SUPC_WUIR_WKUPT10_HIGH_TO_LOW (0x0u << 26) /**< \brief (SUPC_WUIR) a high to low level transition on the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPT10_LOW_TO_HIGH (0x1u << 26) /**< \brief (SUPC_WUIR) a low to high level transition on the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPT11 (0x1u << 27) /**< \brief (SUPC_WUIR) Wake Up Input Transition 11 */
+#define SUPC_WUIR_WKUPT11_HIGH_TO_LOW (0x0u << 27) /**< \brief (SUPC_WUIR) a high to low level transition on the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPT11_LOW_TO_HIGH (0x1u << 27) /**< \brief (SUPC_WUIR) a low to high level transition on the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPT12 (0x1u << 28) /**< \brief (SUPC_WUIR) Wake Up Input Transition 12 */
+#define SUPC_WUIR_WKUPT12_HIGH_TO_LOW (0x0u << 28) /**< \brief (SUPC_WUIR) a high to low level transition on the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPT12_LOW_TO_HIGH (0x1u << 28) /**< \brief (SUPC_WUIR) a low to high level transition on the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPT13 (0x1u << 29) /**< \brief (SUPC_WUIR) Wake Up Input Transition 13 */
+#define SUPC_WUIR_WKUPT13_HIGH_TO_LOW (0x0u << 29) /**< \brief (SUPC_WUIR) a high to low level transition on the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPT13_LOW_TO_HIGH (0x1u << 29) /**< \brief (SUPC_WUIR) a low to high level transition on the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPT14 (0x1u << 30) /**< \brief (SUPC_WUIR) Wake Up Input Transition 14 */
+#define SUPC_WUIR_WKUPT14_HIGH_TO_LOW (0x0u << 30) /**< \brief (SUPC_WUIR) a high to low level transition on the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPT14_LOW_TO_HIGH (0x1u << 30) /**< \brief (SUPC_WUIR) a low to high level transition on the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPT15 (0x1u << 31) /**< \brief (SUPC_WUIR) Wake Up Input Transition 15 */
+#define SUPC_WUIR_WKUPT15_HIGH_TO_LOW (0x0u << 31) /**< \brief (SUPC_WUIR) a high to low level transition on the corresponding wake-up input forces the wake up of the core power supply. */
+#define SUPC_WUIR_WKUPT15_LOW_TO_HIGH (0x1u << 31) /**< \brief (SUPC_WUIR) a low to high level transition on the corresponding wake-up input forces the wake up of the core power supply. */
+/* -------- SUPC_SR : (SUPC Offset: 0x14) Supply Controller Status Register -------- */
+#define SUPC_SR_FWUPS (0x1u << 0) /**< \brief (SUPC_SR) FWUP Wake Up Status */
+#define SUPC_SR_FWUPS_NO (0x0u << 0) /**< \brief (SUPC_SR) no wake up due to the assertion of the FWUP pin has occurred since the last read of SUPC_SR. */
+#define SUPC_SR_FWUPS_PRESENT (0x1u << 0) /**< \brief (SUPC_SR) at least one wake up due to the assertion of the FWUP pin has occurred since the last read of SUPC_SR. */
+#define SUPC_SR_WKUPS (0x1u << 1) /**< \brief (SUPC_SR) WKUP Wake Up Status */
+#define SUPC_SR_WKUPS_NO (0x0u << 1) /**< \brief (SUPC_SR) no wake up due to the assertion of the WKUP pins has occurred since the last read of SUPC_SR. */
+#define SUPC_SR_WKUPS_PRESENT (0x1u << 1) /**< \brief (SUPC_SR) at least one wake up due to the assertion of the WKUP pins has occurred since the last read of SUPC_SR. */
+#define SUPC_SR_SMWS (0x1u << 2) /**< \brief (SUPC_SR) Supply Monitor Detection Wake Up Status */
+#define SUPC_SR_SMWS_NO (0x0u << 2) /**< \brief (SUPC_SR) no wake up due to a supply monitor detection has occurred since the last read of SUPC_SR. */
+#define SUPC_SR_SMWS_PRESENT (0x1u << 2) /**< \brief (SUPC_SR) at least one wake up due to a supply monitor detection has occurred since the last read of SUPC_SR. */
+#define SUPC_SR_BODRSTS (0x1u << 3) /**< \brief (SUPC_SR) Brownout Detector Reset Status */
+#define SUPC_SR_BODRSTS_NO (0x0u << 3) /**< \brief (SUPC_SR) no core brownout rising edge event has been detected since the last read of the SUPC_SR. */
+#define SUPC_SR_BODRSTS_PRESENT (0x1u << 3) /**< \brief (SUPC_SR) at least one brownout output rising edge event has been detected since the last read of the SUPC_SR. */
+#define SUPC_SR_SMRSTS (0x1u << 4) /**< \brief (SUPC_SR) Supply Monitor Reset Status */
+#define SUPC_SR_SMRSTS_NO (0x0u << 4) /**< \brief (SUPC_SR) no supply monitor detection has generated a core reset since the last read of the SUPC_SR. */
+#define SUPC_SR_SMRSTS_PRESENT (0x1u << 4) /**< \brief (SUPC_SR) at least one supply monitor detection has generated a core reset since the last read of the SUPC_SR. */
+#define SUPC_SR_SMS (0x1u << 5) /**< \brief (SUPC_SR) Supply Monitor Status */
+#define SUPC_SR_SMS_NO (0x0u << 5) /**< \brief (SUPC_SR) no supply monitor detection since the last read of SUPC_SR. */
+#define SUPC_SR_SMS_PRESENT (0x1u << 5) /**< \brief (SUPC_SR) at least one supply monitor detection since the last read of SUPC_SR. */
+#define SUPC_SR_SMOS (0x1u << 6) /**< \brief (SUPC_SR) Supply Monitor Output Status */
+#define SUPC_SR_SMOS_HIGH (0x0u << 6) /**< \brief (SUPC_SR) the supply monitor detected VDDUTMI higher than its threshold at its last measurement. */
+#define SUPC_SR_SMOS_LOW (0x1u << 6) /**< \brief (SUPC_SR) the supply monitor detected VDDUTMI lower than its threshold at its last measurement. */
+#define SUPC_SR_OSCSEL (0x1u << 7) /**< \brief (SUPC_SR) 32-kHz Oscillator Selection Status */
+#define SUPC_SR_OSCSEL_RC (0x0u << 7) /**< \brief (SUPC_SR) the slow clock, SLCK is generated by the embedded 32-kHz RC oscillator. */
+#define SUPC_SR_OSCSEL_CRYST (0x1u << 7) /**< \brief (SUPC_SR) the slow clock, SLCK is generated by the 32-kHz crystal oscillator. */
+#define SUPC_SR_FWUPIS (0x1u << 12) /**< \brief (SUPC_SR) FWUP Input Status */
+#define SUPC_SR_FWUPIS_LOW (0x0u << 12) /**< \brief (SUPC_SR) FWUP input is tied low. */
+#define SUPC_SR_FWUPIS_HIGH (0x1u << 12) /**< \brief (SUPC_SR) FWUP input is tied high. */
+#define SUPC_SR_WKUPIS0 (0x1u << 16) /**< \brief (SUPC_SR) WKUP Input Status 0 */
+#define SUPC_SR_WKUPIS0_DIS (0x0u << 16) /**< \brief (SUPC_SR) the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event. */
+#define SUPC_SR_WKUPIS0_EN (0x1u << 16) /**< \brief (SUPC_SR) the corresponding wake-up input was active at the time the debouncer triggered a wake up event. */
+#define SUPC_SR_WKUPIS1 (0x1u << 17) /**< \brief (SUPC_SR) WKUP Input Status 1 */
+#define SUPC_SR_WKUPIS1_DIS (0x0u << 17) /**< \brief (SUPC_SR) the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event. */
+#define SUPC_SR_WKUPIS1_EN (0x1u << 17) /**< \brief (SUPC_SR) the corresponding wake-up input was active at the time the debouncer triggered a wake up event. */
+#define SUPC_SR_WKUPIS2 (0x1u << 18) /**< \brief (SUPC_SR) WKUP Input Status 2 */
+#define SUPC_SR_WKUPIS2_DIS (0x0u << 18) /**< \brief (SUPC_SR) the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event. */
+#define SUPC_SR_WKUPIS2_EN (0x1u << 18) /**< \brief (SUPC_SR) the corresponding wake-up input was active at the time the debouncer triggered a wake up event. */
+#define SUPC_SR_WKUPIS3 (0x1u << 19) /**< \brief (SUPC_SR) WKUP Input Status 3 */
+#define SUPC_SR_WKUPIS3_DIS (0x0u << 19) /**< \brief (SUPC_SR) the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event. */
+#define SUPC_SR_WKUPIS3_EN (0x1u << 19) /**< \brief (SUPC_SR) the corresponding wake-up input was active at the time the debouncer triggered a wake up event. */
+#define SUPC_SR_WKUPIS4 (0x1u << 20) /**< \brief (SUPC_SR) WKUP Input Status 4 */
+#define SUPC_SR_WKUPIS4_DIS (0x0u << 20) /**< \brief (SUPC_SR) the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event. */
+#define SUPC_SR_WKUPIS4_EN (0x1u << 20) /**< \brief (SUPC_SR) the corresponding wake-up input was active at the time the debouncer triggered a wake up event. */
+#define SUPC_SR_WKUPIS5 (0x1u << 21) /**< \brief (SUPC_SR) WKUP Input Status 5 */
+#define SUPC_SR_WKUPIS5_DIS (0x0u << 21) /**< \brief (SUPC_SR) the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event. */
+#define SUPC_SR_WKUPIS5_EN (0x1u << 21) /**< \brief (SUPC_SR) the corresponding wake-up input was active at the time the debouncer triggered a wake up event. */
+#define SUPC_SR_WKUPIS6 (0x1u << 22) /**< \brief (SUPC_SR) WKUP Input Status 6 */
+#define SUPC_SR_WKUPIS6_DIS (0x0u << 22) /**< \brief (SUPC_SR) the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event. */
+#define SUPC_SR_WKUPIS6_EN (0x1u << 22) /**< \brief (SUPC_SR) the corresponding wake-up input was active at the time the debouncer triggered a wake up event. */
+#define SUPC_SR_WKUPIS7 (0x1u << 23) /**< \brief (SUPC_SR) WKUP Input Status 7 */
+#define SUPC_SR_WKUPIS7_DIS (0x0u << 23) /**< \brief (SUPC_SR) the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event. */
+#define SUPC_SR_WKUPIS7_EN (0x1u << 23) /**< \brief (SUPC_SR) the corresponding wake-up input was active at the time the debouncer triggered a wake up event. */
+#define SUPC_SR_WKUPIS8 (0x1u << 24) /**< \brief (SUPC_SR) WKUP Input Status 8 */
+#define SUPC_SR_WKUPIS8_DIS (0x0u << 24) /**< \brief (SUPC_SR) the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event. */
+#define SUPC_SR_WKUPIS8_EN (0x1u << 24) /**< \brief (SUPC_SR) the corresponding wake-up input was active at the time the debouncer triggered a wake up event. */
+#define SUPC_SR_WKUPIS9 (0x1u << 25) /**< \brief (SUPC_SR) WKUP Input Status 9 */
+#define SUPC_SR_WKUPIS9_DIS (0x0u << 25) /**< \brief (SUPC_SR) the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event. */
+#define SUPC_SR_WKUPIS9_EN (0x1u << 25) /**< \brief (SUPC_SR) the corresponding wake-up input was active at the time the debouncer triggered a wake up event. */
+#define SUPC_SR_WKUPIS10 (0x1u << 26) /**< \brief (SUPC_SR) WKUP Input Status 10 */
+#define SUPC_SR_WKUPIS10_DIS (0x0u << 26) /**< \brief (SUPC_SR) the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event. */
+#define SUPC_SR_WKUPIS10_EN (0x1u << 26) /**< \brief (SUPC_SR) the corresponding wake-up input was active at the time the debouncer triggered a wake up event. */
+#define SUPC_SR_WKUPIS11 (0x1u << 27) /**< \brief (SUPC_SR) WKUP Input Status 11 */
+#define SUPC_SR_WKUPIS11_DIS (0x0u << 27) /**< \brief (SUPC_SR) the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event. */
+#define SUPC_SR_WKUPIS11_EN (0x1u << 27) /**< \brief (SUPC_SR) the corresponding wake-up input was active at the time the debouncer triggered a wake up event. */
+#define SUPC_SR_WKUPIS12 (0x1u << 28) /**< \brief (SUPC_SR) WKUP Input Status 12 */
+#define SUPC_SR_WKUPIS12_DIS (0x0u << 28) /**< \brief (SUPC_SR) the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event. */
+#define SUPC_SR_WKUPIS12_EN (0x1u << 28) /**< \brief (SUPC_SR) the corresponding wake-up input was active at the time the debouncer triggered a wake up event. */
+#define SUPC_SR_WKUPIS13 (0x1u << 29) /**< \brief (SUPC_SR) WKUP Input Status 13 */
+#define SUPC_SR_WKUPIS13_DIS (0x0u << 29) /**< \brief (SUPC_SR) the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event. */
+#define SUPC_SR_WKUPIS13_EN (0x1u << 29) /**< \brief (SUPC_SR) the corresponding wake-up input was active at the time the debouncer triggered a wake up event. */
+#define SUPC_SR_WKUPIS14 (0x1u << 30) /**< \brief (SUPC_SR) WKUP Input Status 14 */
+#define SUPC_SR_WKUPIS14_DIS (0x0u << 30) /**< \brief (SUPC_SR) the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event. */
+#define SUPC_SR_WKUPIS14_EN (0x1u << 30) /**< \brief (SUPC_SR) the corresponding wake-up input was active at the time the debouncer triggered a wake up event. */
+#define SUPC_SR_WKUPIS15 (0x1u << 31) /**< \brief (SUPC_SR) WKUP Input Status 15 */
+#define SUPC_SR_WKUPIS15_DIS (0x0u << 31) /**< \brief (SUPC_SR) the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event. */
+#define SUPC_SR_WKUPIS15_EN (0x1u << 31) /**< \brief (SUPC_SR) the corresponding wake-up input was active at the time the debouncer triggered a wake up event. */
+
+/*@}*/
+
+/* ============================================================================= */
+/** SOFTWARE API DEFINITION FOR Timer Counter */
+/* ============================================================================= */
+/** \addtogroup SAM3XA_TC Timer Counter */
+/*@{*/
+
+#ifndef __ASSEMBLY__
+/** \brief TcChannel hardware registers */
+typedef struct {
+ RwReg TC_CCR; /**< \brief (TcChannel Offset: 0x0) Channel Control Register */
+ RwReg TC_CMR; /**< \brief (TcChannel Offset: 0x4) Channel Mode Register */
+ RwReg TC_SMMR; /**< \brief (TcChannel Offset: 0x8) Stepper Motor Mode Register */
+ RoReg Reserved1[1];
+ RwReg TC_CV; /**< \brief (TcChannel Offset: 0x10) Counter Value */
+ RwReg TC_RA; /**< \brief (TcChannel Offset: 0x14) Register A */
+ RwReg TC_RB; /**< \brief (TcChannel Offset: 0x18) Register B */
+ RwReg TC_RC; /**< \brief (TcChannel Offset: 0x1C) Register C */
+ RwReg TC_SR; /**< \brief (TcChannel Offset: 0x20) Status Register */
+ RwReg TC_IER; /**< \brief (TcChannel Offset: 0x24) Interrupt Enable Register */
+ RwReg TC_IDR; /**< \brief (TcChannel Offset: 0x28) Interrupt Disable Register */
+ RwReg TC_IMR; /**< \brief (TcChannel Offset: 0x2C) Interrupt Mask Register */
+ RoReg Reserved2[4];
+} TcChannel;
+/** \brief Tc hardware registers */
+#define TCCHANNEL_NUMBER 3
+typedef struct {
+ TcChannel TC_CHANNEL[TCCHANNEL_NUMBER]; /**< \brief (Tc Offset: 0x0) channel = 0 .. 2 */
+ WoReg TC_BCR; /**< \brief (Tc Offset: 0xC0) Block Control Register */
+ RwReg TC_BMR; /**< \brief (Tc Offset: 0xC4) Block Mode Register */
+ WoReg TC_QIER; /**< \brief (Tc Offset: 0xC8) QDEC Interrupt Enable Register */
+ WoReg TC_QIDR; /**< \brief (Tc Offset: 0xCC) QDEC Interrupt Disable Register */
+ RoReg TC_QIMR; /**< \brief (Tc Offset: 0xD0) QDEC Interrupt Mask Register */
+ RoReg TC_QISR; /**< \brief (Tc Offset: 0xD4) QDEC Interrupt Status Register */
+ RwReg TC_FMR; /**< \brief (Tc Offset: 0xD8) Fault Mode Register */
+ RoReg Reserved1[2];
+ RwReg TC_WPMR; /**< \brief (Tc Offset: 0xE4) Write Protect Mode Register */
+} Tc;
+#endif /* __ASSEMBLY__ */
+/* -------- TC_CCR : (TC Offset: N/A) Channel Control Register -------- */
+#define TC_CCR_CLKEN (0x1u << 0) /**< \brief (TC_CCR) Counter Clock Enable Command */
+#define TC_CCR_CLKDIS (0x1u << 1) /**< \brief (TC_CCR) Counter Clock Disable Command */
+#define TC_CCR_SWTRG (0x1u << 2) /**< \brief (TC_CCR) Software Trigger Command */
+/* -------- TC_CMR : (TC Offset: N/A) Channel Mode Register -------- */
+#define TC_CMR_TCCLKS_Pos 0
+#define TC_CMR_TCCLKS_Msk (0x7u << TC_CMR_TCCLKS_Pos) /**< \brief (TC_CMR) Clock Selection */
+#define TC_CMR_TCCLKS_TIMER_CLOCK1 (0x0u << 0) /**< \brief (TC_CMR) Clock selected: TCLK1 */
+#define TC_CMR_TCCLKS_TIMER_CLOCK2 (0x1u << 0) /**< \brief (TC_CMR) Clock selected: TCLK2 */
+#define TC_CMR_TCCLKS_TIMER_CLOCK3 (0x2u << 0) /**< \brief (TC_CMR) Clock selected: TCLK3 */
+#define TC_CMR_TCCLKS_TIMER_CLOCK4 (0x3u << 0) /**< \brief (TC_CMR) Clock selected: TCLK4 */
+#define TC_CMR_TCCLKS_TIMER_CLOCK5 (0x4u << 0) /**< \brief (TC_CMR) Clock selected: TCLK5 */
+#define TC_CMR_TCCLKS_XC0 (0x5u << 0) /**< \brief (TC_CMR) Clock selected: XC0 */
+#define TC_CMR_TCCLKS_XC1 (0x6u << 0) /**< \brief (TC_CMR) Clock selected: XC1 */
+#define TC_CMR_TCCLKS_XC2 (0x7u << 0) /**< \brief (TC_CMR) Clock selected: XC2 */
+#define TC_CMR_CLKI (0x1u << 3) /**< \brief (TC_CMR) Clock Invert */
+#define TC_CMR_BURST_Pos 4
+#define TC_CMR_BURST_Msk (0x3u << TC_CMR_BURST_Pos) /**< \brief (TC_CMR) Burst Signal Selection */
+#define TC_CMR_BURST_NONE (0x0u << 4) /**< \brief (TC_CMR) The clock is not gated by an external signal. */
+#define TC_CMR_BURST_XC0 (0x1u << 4) /**< \brief (TC_CMR) XC0 is ANDed with the selected clock. */
+#define TC_CMR_BURST_XC1 (0x2u << 4) /**< \brief (TC_CMR) XC1 is ANDed with the selected clock. */
+#define TC_CMR_BURST_XC2 (0x3u << 4) /**< \brief (TC_CMR) XC2 is ANDed with the selected clock. */
+#define TC_CMR_LDBSTOP (0x1u << 6) /**< \brief (TC_CMR) Counter Clock Stopped with RB Loading */
+#define TC_CMR_LDBDIS (0x1u << 7) /**< \brief (TC_CMR) Counter Clock Disable with RB Loading */
+#define TC_CMR_ETRGEDG_Pos 8
+#define TC_CMR_ETRGEDG_Msk (0x3u << TC_CMR_ETRGEDG_Pos) /**< \brief (TC_CMR) External Trigger Edge Selection */
+#define TC_CMR_ETRGEDG_NONE (0x0u << 8) /**< \brief (TC_CMR) The clock is not gated by an external signal. */
+#define TC_CMR_ETRGEDG_RISING (0x1u << 8) /**< \brief (TC_CMR) Rising edge */
+#define TC_CMR_ETRGEDG_FALLING (0x2u << 8) /**< \brief (TC_CMR) Falling edge */
+#define TC_CMR_ETRGEDG_EDGE (0x3u << 8) /**< \brief (TC_CMR) Each edge */
+#define TC_CMR_ABETRG (0x1u << 10) /**< \brief (TC_CMR) TIOA or TIOB External Trigger Selection */
+#define TC_CMR_CPCTRG (0x1u << 14) /**< \brief (TC_CMR) RC Compare Trigger Enable */
+#define TC_CMR_WAVE (0x1u << 15) /**< \brief (TC_CMR) */
+#define TC_CMR_LDRA_Pos 16
+#define TC_CMR_LDRA_Msk (0x3u << TC_CMR_LDRA_Pos) /**< \brief (TC_CMR) RA Loading Selection */
+#define TC_CMR_LDRA_NONE (0x0u << 16) /**< \brief (TC_CMR) None */
+#define TC_CMR_LDRA_RISING (0x1u << 16) /**< \brief (TC_CMR) Rising edge of TIOA */
+#define TC_CMR_LDRA_FALLING (0x2u << 16) /**< \brief (TC_CMR) Falling edge of TIOA */
+#define TC_CMR_LDRA_EDGE (0x3u << 16) /**< \brief (TC_CMR) Each edge of TIOA */
+#define TC_CMR_LDRB_Pos 18
+#define TC_CMR_LDRB_Msk (0x3u << TC_CMR_LDRB_Pos) /**< \brief (TC_CMR) RB Loading Selection */
+#define TC_CMR_LDRB_NONE (0x0u << 18) /**< \brief (TC_CMR) None */
+#define TC_CMR_LDRB_RISING (0x1u << 18) /**< \brief (TC_CMR) Rising edge of TIOA */
+#define TC_CMR_LDRB_FALLING (0x2u << 18) /**< \brief (TC_CMR) Falling edge of TIOA */
+#define TC_CMR_LDRB_EDGE (0x3u << 18) /**< \brief (TC_CMR) Each edge of TIOA */
+#define TC_CMR_CPCSTOP (0x1u << 6) /**< \brief (TC_CMR) Counter Clock Stopped with RC Compare */
+#define TC_CMR_CPCDIS (0x1u << 7) /**< \brief (TC_CMR) Counter Clock Disable with RC Compare */
+#define TC_CMR_EEVTEDG_Pos 8
+#define TC_CMR_EEVTEDG_Msk (0x3u << TC_CMR_EEVTEDG_Pos) /**< \brief (TC_CMR) External Event Edge Selection */
+#define TC_CMR_EEVTEDG_NONE (0x0u << 8) /**< \brief (TC_CMR) None */
+#define TC_CMR_EEVTEDG_RISING (0x1u << 8) /**< \brief (TC_CMR) Rising edge */
+#define TC_CMR_EEVTEDG_FALLING (0x2u << 8) /**< \brief (TC_CMR) Falling edge */
+#define TC_CMR_EEVTEDG_EDGE (0x3u << 8) /**< \brief (TC_CMR) Each edge */
+#define TC_CMR_EEVT_Pos 10
+#define TC_CMR_EEVT_Msk (0x3u << TC_CMR_EEVT_Pos) /**< \brief (TC_CMR) External Event Selection */
+#define TC_CMR_EEVT_TIOB (0x0u << 10) /**< \brief (TC_CMR) TIOB */
+#define TC_CMR_EEVT_XC0 (0x1u << 10) /**< \brief (TC_CMR) XC0 */
+#define TC_CMR_EEVT_XC1 (0x2u << 10) /**< \brief (TC_CMR) XC1 */
+#define TC_CMR_EEVT_XC2 (0x3u << 10) /**< \brief (TC_CMR) XC2 */
+#define TC_CMR_ENETRG (0x1u << 12) /**< \brief (TC_CMR) External Event Trigger Enable */
+#define TC_CMR_WAVSEL_Pos 13
+#define TC_CMR_WAVSEL_Msk (0x3u << TC_CMR_WAVSEL_Pos) /**< \brief (TC_CMR) Waveform Selection */
+#define TC_CMR_WAVSEL_UP (0x0u << 13) /**< \brief (TC_CMR) UP mode without automatic trigger on RC Compare */
+#define TC_CMR_WAVSEL_UPDOWN (0x1u << 13) /**< \brief (TC_CMR) UPDOWN mode without automatic trigger on RC Compare */
+#define TC_CMR_WAVSEL_UP_RC (0x2u << 13) /**< \brief (TC_CMR) UP mode with automatic trigger on RC Compare */
+#define TC_CMR_WAVSEL_UPDOWN_RC (0x3u << 13) /**< \brief (TC_CMR) UPDOWN mode with automatic trigger on RC Compare */
+#define TC_CMR_ACPA_Pos 16
+#define TC_CMR_ACPA_Msk (0x3u << TC_CMR_ACPA_Pos) /**< \brief (TC_CMR) RA Compare Effect on TIOA */
+#define TC_CMR_ACPA_NONE (0x0u << 16) /**< \brief (TC_CMR) None */
+#define TC_CMR_ACPA_SET (0x1u << 16) /**< \brief (TC_CMR) Set */
+#define TC_CMR_ACPA_CLEAR (0x2u << 16) /**< \brief (TC_CMR) Clear */
+#define TC_CMR_ACPA_TOGGLE (0x3u << 16) /**< \brief (TC_CMR) Toggle */
+#define TC_CMR_ACPC_Pos 18
+#define TC_CMR_ACPC_Msk (0x3u << TC_CMR_ACPC_Pos) /**< \brief (TC_CMR) RC Compare Effect on TIOA */
+#define TC_CMR_ACPC_NONE (0x0u << 18) /**< \brief (TC_CMR) None */
+#define TC_CMR_ACPC_SET (0x1u << 18) /**< \brief (TC_CMR) Set */
+#define TC_CMR_ACPC_CLEAR (0x2u << 18) /**< \brief (TC_CMR) Clear */
+#define TC_CMR_ACPC_TOGGLE (0x3u << 18) /**< \brief (TC_CMR) Toggle */
+#define TC_CMR_AEEVT_Pos 20
+#define TC_CMR_AEEVT_Msk (0x3u << TC_CMR_AEEVT_Pos) /**< \brief (TC_CMR) External Event Effect on TIOA */
+#define TC_CMR_AEEVT_NONE (0x0u << 20) /**< \brief (TC_CMR) None */
+#define TC_CMR_AEEVT_SET (0x1u << 20) /**< \brief (TC_CMR) Set */
+#define TC_CMR_AEEVT_CLEAR (0x2u << 20) /**< \brief (TC_CMR) Clear */
+#define TC_CMR_AEEVT_TOGGLE (0x3u << 20) /**< \brief (TC_CMR) Toggle */
+#define TC_CMR_ASWTRG_Pos 22
+#define TC_CMR_ASWTRG_Msk (0x3u << TC_CMR_ASWTRG_Pos) /**< \brief (TC_CMR) Software Trigger Effect on TIOA */
+#define TC_CMR_ASWTRG_NONE (0x0u << 22) /**< \brief (TC_CMR) None */
+#define TC_CMR_ASWTRG_SET (0x1u << 22) /**< \brief (TC_CMR) Set */
+#define TC_CMR_ASWTRG_CLEAR (0x2u << 22) /**< \brief (TC_CMR) Clear */
+#define TC_CMR_ASWTRG_TOGGLE (0x3u << 22) /**< \brief (TC_CMR) Toggle */
+#define TC_CMR_BCPB_Pos 24
+#define TC_CMR_BCPB_Msk (0x3u << TC_CMR_BCPB_Pos) /**< \brief (TC_CMR) RB Compare Effect on TIOB */
+#define TC_CMR_BCPB_NONE (0x0u << 24) /**< \brief (TC_CMR) None */
+#define TC_CMR_BCPB_SET (0x1u << 24) /**< \brief (TC_CMR) Set */
+#define TC_CMR_BCPB_CLEAR (0x2u << 24) /**< \brief (TC_CMR) Clear */
+#define TC_CMR_BCPB_TOGGLE (0x3u << 24) /**< \brief (TC_CMR) Toggle */
+#define TC_CMR_BCPC_Pos 26
+#define TC_CMR_BCPC_Msk (0x3u << TC_CMR_BCPC_Pos) /**< \brief (TC_CMR) RC Compare Effect on TIOB */
+#define TC_CMR_BCPC_NONE (0x0u << 26) /**< \brief (TC_CMR) None */
+#define TC_CMR_BCPC_SET (0x1u << 26) /**< \brief (TC_CMR) Set */
+#define TC_CMR_BCPC_CLEAR (0x2u << 26) /**< \brief (TC_CMR) Clear */
+#define TC_CMR_BCPC_TOGGLE (0x3u << 26) /**< \brief (TC_CMR) Toggle */
+#define TC_CMR_BEEVT_Pos 28
+#define TC_CMR_BEEVT_Msk (0x3u << TC_CMR_BEEVT_Pos) /**< \brief (TC_CMR) External Event Effect on TIOB */
+#define TC_CMR_BEEVT_NONE (0x0u << 28) /**< \brief (TC_CMR) None */
+#define TC_CMR_BEEVT_SET (0x1u << 28) /**< \brief (TC_CMR) Set */
+#define TC_CMR_BEEVT_CLEAR (0x2u << 28) /**< \brief (TC_CMR) Clear */
+#define TC_CMR_BEEVT_TOGGLE (0x3u << 28) /**< \brief (TC_CMR) Toggle */
+#define TC_CMR_BSWTRG_Pos 30
+#define TC_CMR_BSWTRG_Msk (0x3u << TC_CMR_BSWTRG_Pos) /**< \brief (TC_CMR) Software Trigger Effect on TIOB */
+#define TC_CMR_BSWTRG_NONE (0x0u << 30) /**< \brief (TC_CMR) None */
+#define TC_CMR_BSWTRG_SET (0x1u << 30) /**< \brief (TC_CMR) Set */
+#define TC_CMR_BSWTRG_CLEAR (0x2u << 30) /**< \brief (TC_CMR) Clear */
+#define TC_CMR_BSWTRG_TOGGLE (0x3u << 30) /**< \brief (TC_CMR) Toggle */
+/* -------- TC_SMMR : (TC Offset: N/A) Stepper Motor Mode Register -------- */
+#define TC_SMMR_GCEN (0x1u << 0) /**< \brief (TC_SMMR) Gray Count Enable */
+#define TC_SMMR_DOWN (0x1u << 1) /**< \brief (TC_SMMR) DOWN Count */
+/* -------- TC_CV : (TC Offset: N/A) Counter Value -------- */
+#define TC_CV_CV_Pos 0
+#define TC_CV_CV_Msk (0xffffffffu << TC_CV_CV_Pos) /**< \brief (TC_CV) Counter Value */
+/* -------- TC_RA : (TC Offset: N/A) Register A -------- */
+#define TC_RA_RA_Pos 0
+#define TC_RA_RA_Msk (0xffffffffu << TC_RA_RA_Pos) /**< \brief (TC_RA) Register A */
+#define TC_RA_RA(value) ((TC_RA_RA_Msk & ((value) << TC_RA_RA_Pos)))
+/* -------- TC_RB : (TC Offset: N/A) Register B -------- */
+#define TC_RB_RB_Pos 0
+#define TC_RB_RB_Msk (0xffffffffu << TC_RB_RB_Pos) /**< \brief (TC_RB) Register B */
+#define TC_RB_RB(value) ((TC_RB_RB_Msk & ((value) << TC_RB_RB_Pos)))
+/* -------- TC_RC : (TC Offset: N/A) Register C -------- */
+#define TC_RC_RC_Pos 0
+#define TC_RC_RC_Msk (0xffffffffu << TC_RC_RC_Pos) /**< \brief (TC_RC) Register C */
+#define TC_RC_RC(value) ((TC_RC_RC_Msk & ((value) << TC_RC_RC_Pos)))
+/* -------- TC_SR : (TC Offset: N/A) Status Register -------- */
+#define TC_SR_COVFS (0x1u << 0) /**< \brief (TC_SR) Counter Overflow Status */
+#define TC_SR_LOVRS (0x1u << 1) /**< \brief (TC_SR) Load Overrun Status */
+#define TC_SR_CPAS (0x1u << 2) /**< \brief (TC_SR) RA Compare Status */
+#define TC_SR_CPBS (0x1u << 3) /**< \brief (TC_SR) RB Compare Status */
+#define TC_SR_CPCS (0x1u << 4) /**< \brief (TC_SR) RC Compare Status */
+#define TC_SR_LDRAS (0x1u << 5) /**< \brief (TC_SR) RA Loading Status */
+#define TC_SR_LDRBS (0x1u << 6) /**< \brief (TC_SR) RB Loading Status */
+#define TC_SR_ETRGS (0x1u << 7) /**< \brief (TC_SR) External Trigger Status */
+#define TC_SR_CLKSTA (0x1u << 16) /**< \brief (TC_SR) Clock Enabling Status */
+#define TC_SR_MTIOA (0x1u << 17) /**< \brief (TC_SR) TIOA Mirror */
+#define TC_SR_MTIOB (0x1u << 18) /**< \brief (TC_SR) TIOB Mirror */
+/* -------- TC_IER : (TC Offset: N/A) Interrupt Enable Register -------- */
+#define TC_IER_COVFS (0x1u << 0) /**< \brief (TC_IER) Counter Overflow */
+#define TC_IER_LOVRS (0x1u << 1) /**< \brief (TC_IER) Load Overrun */
+#define TC_IER_CPAS (0x1u << 2) /**< \brief (TC_IER) RA Compare */
+#define TC_IER_CPBS (0x1u << 3) /**< \brief (TC_IER) RB Compare */
+#define TC_IER_CPCS (0x1u << 4) /**< \brief (TC_IER) RC Compare */
+#define TC_IER_LDRAS (0x1u << 5) /**< \brief (TC_IER) RA Loading */
+#define TC_IER_LDRBS (0x1u << 6) /**< \brief (TC_IER) RB Loading */
+#define TC_IER_ETRGS (0x1u << 7) /**< \brief (TC_IER) External Trigger */
+/* -------- TC_IDR : (TC Offset: N/A) Interrupt Disable Register -------- */
+#define TC_IDR_COVFS (0x1u << 0) /**< \brief (TC_IDR) Counter Overflow */
+#define TC_IDR_LOVRS (0x1u << 1) /**< \brief (TC_IDR) Load Overrun */
+#define TC_IDR_CPAS (0x1u << 2) /**< \brief (TC_IDR) RA Compare */
+#define TC_IDR_CPBS (0x1u << 3) /**< \brief (TC_IDR) RB Compare */
+#define TC_IDR_CPCS (0x1u << 4) /**< \brief (TC_IDR) RC Compare */
+#define TC_IDR_LDRAS (0x1u << 5) /**< \brief (TC_IDR) RA Loading */
+#define TC_IDR_LDRBS (0x1u << 6) /**< \brief (TC_IDR) RB Loading */
+#define TC_IDR_ETRGS (0x1u << 7) /**< \brief (TC_IDR) External Trigger */
+/* -------- TC_IMR : (TC Offset: N/A) Interrupt Mask Register -------- */
+#define TC_IMR_COVFS (0x1u << 0) /**< \brief (TC_IMR) Counter Overflow */
+#define TC_IMR_LOVRS (0x1u << 1) /**< \brief (TC_IMR) Load Overrun */
+#define TC_IMR_CPAS (0x1u << 2) /**< \brief (TC_IMR) RA Compare */
+#define TC_IMR_CPBS (0x1u << 3) /**< \brief (TC_IMR) RB Compare */
+#define TC_IMR_CPCS (0x1u << 4) /**< \brief (TC_IMR) RC Compare */
+#define TC_IMR_LDRAS (0x1u << 5) /**< \brief (TC_IMR) RA Loading */
+#define TC_IMR_LDRBS (0x1u << 6) /**< \brief (TC_IMR) RB Loading */
+#define TC_IMR_ETRGS (0x1u << 7) /**< \brief (TC_IMR) External Trigger */
+/* -------- TC_BCR : (TC Offset: 0xC0) Block Control Register -------- */
+#define TC_BCR_SYNC (0x1u << 0) /**< \brief (TC_BCR) Synchro Command */
+/* -------- TC_BMR : (TC Offset: 0xC4) Block Mode Register -------- */
+#define TC_BMR_TC0XC0S_Pos 0
+#define TC_BMR_TC0XC0S_Msk (0x3u << TC_BMR_TC0XC0S_Pos) /**< \brief (TC_BMR) External Clock Signal 0 Selection */
+#define TC_BMR_TC0XC0S_TCLK0 (0x0u << 0) /**< \brief (TC_BMR) Signal connected to XC0: TCLK0 */
+#define TC_BMR_TC0XC0S_TIOA1 (0x2u << 0) /**< \brief (TC_BMR) Signal connected to XC0: TIOA1 */
+#define TC_BMR_TC0XC0S_TIOA2 (0x3u << 0) /**< \brief (TC_BMR) Signal connected to XC0: TIOA2 */
+#define TC_BMR_TC1XC1S_Pos 2
+#define TC_BMR_TC1XC1S_Msk (0x3u << TC_BMR_TC1XC1S_Pos) /**< \brief (TC_BMR) External Clock Signal 1 Selection */
+#define TC_BMR_TC1XC1S_TCLK1 (0x0u << 2) /**< \brief (TC_BMR) Signal connected to XC1: TCLK1 */
+#define TC_BMR_TC1XC1S_TIOA0 (0x2u << 2) /**< \brief (TC_BMR) Signal connected to XC1: TIOA0 */
+#define TC_BMR_TC1XC1S_TIOA2 (0x3u << 2) /**< \brief (TC_BMR) Signal connected to XC1: TIOA2 */
+#define TC_BMR_TC2XC2S_Pos 4
+#define TC_BMR_TC2XC2S_Msk (0x3u << TC_BMR_TC2XC2S_Pos) /**< \brief (TC_BMR) External Clock Signal 2 Selection */
+#define TC_BMR_TC2XC2S_TCLK2 (0x0u << 4) /**< \brief (TC_BMR) Signal connected to XC2: TCLK2 */
+#define TC_BMR_TC2XC2S_TIOA1 (0x2u << 4) /**< \brief (TC_BMR) Signal connected to XC2: TIOA1 */
+#define TC_BMR_TC2XC2S_TIOA2 (0x3u << 4) /**< \brief (TC_BMR) Signal connected to XC2: TIOA2 */
+#define TC_BMR_QDEN (0x1u << 8) /**< \brief (TC_BMR) Quadrature Decoder ENabled */
+#define TC_BMR_POSEN (0x1u << 9) /**< \brief (TC_BMR) POSition ENabled */
+#define TC_BMR_SPEEDEN (0x1u << 10) /**< \brief (TC_BMR) SPEED ENabled */
+#define TC_BMR_QDTRANS (0x1u << 11) /**< \brief (TC_BMR) Quadrature Decoding TRANSparent */
+#define TC_BMR_EDGPHA (0x1u << 12) /**< \brief (TC_BMR) EDGe on PHA count mode */
+#define TC_BMR_INVA (0x1u << 13) /**< \brief (TC_BMR) INVerted phA */
+#define TC_BMR_INVB (0x1u << 14) /**< \brief (TC_BMR) INVerted phB */
+#define TC_BMR_INVIDX (0x1u << 15) /**< \brief (TC_BMR) INVerted InDeX */
+#define TC_BMR_SWAP (0x1u << 16) /**< \brief (TC_BMR) SWAP PHA and PHB */
+#define TC_BMR_IDXPHB (0x1u << 17) /**< \brief (TC_BMR) InDeX pin is PHB pin */
+#define TC_BMR_FILTER (0x1u << 19) /**< \brief (TC_BMR) */
+#define TC_BMR_MAXFILT_Pos 20
+#define TC_BMR_MAXFILT_Msk (0x3fu << TC_BMR_MAXFILT_Pos) /**< \brief (TC_BMR) MAXimum FILTer */
+#define TC_BMR_MAXFILT(value) ((TC_BMR_MAXFILT_Msk & ((value) << TC_BMR_MAXFILT_Pos)))
+/* -------- TC_QIER : (TC Offset: 0xC8) QDEC Interrupt Enable Register -------- */
+#define TC_QIER_IDX (0x1u << 0) /**< \brief (TC_QIER) InDeX */
+#define TC_QIER_DIRCHG (0x1u << 1) /**< \brief (TC_QIER) DIRection CHanGe */
+#define TC_QIER_QERR (0x1u << 2) /**< \brief (TC_QIER) Quadrature ERRor */
+/* -------- TC_QIDR : (TC Offset: 0xCC) QDEC Interrupt Disable Register -------- */
+#define TC_QIDR_IDX (0x1u << 0) /**< \brief (TC_QIDR) InDeX */
+#define TC_QIDR_DIRCHG (0x1u << 1) /**< \brief (TC_QIDR) DIRection CHanGe */
+#define TC_QIDR_QERR (0x1u << 2) /**< \brief (TC_QIDR) Quadrature ERRor */
+/* -------- TC_QIMR : (TC Offset: 0xD0) QDEC Interrupt Mask Register -------- */
+#define TC_QIMR_IDX (0x1u << 0) /**< \brief (TC_QIMR) InDeX */
+#define TC_QIMR_DIRCHG (0x1u << 1) /**< \brief (TC_QIMR) DIRection CHanGe */
+#define TC_QIMR_QERR (0x1u << 2) /**< \brief (TC_QIMR) Quadrature ERRor */
+/* -------- TC_QISR : (TC Offset: 0xD4) QDEC Interrupt Status Register -------- */
+#define TC_QISR_IDX (0x1u << 0) /**< \brief (TC_QISR) InDeX */
+#define TC_QISR_DIRCHG (0x1u << 1) /**< \brief (TC_QISR) DIRection CHanGe */
+#define TC_QISR_QERR (0x1u << 2) /**< \brief (TC_QISR) Quadrature ERRor */
+#define TC_QISR_DIR (0x1u << 8) /**< \brief (TC_QISR) Direction */
+/* -------- TC_FMR : (TC Offset: 0xD8) Fault Mode Register -------- */
+#define TC_FMR_ENCF0 (0x1u << 0) /**< \brief (TC_FMR) ENable Compare Fault Channel 0 */
+#define TC_FMR_ENCF1 (0x1u << 1) /**< \brief (TC_FMR) ENable Compare Fault Channel 1 */
+/* -------- TC_WPMR : (TC Offset: 0xE4) Write Protect Mode Register -------- */
+#define TC_WPMR_WPEN (0x1u << 0) /**< \brief (TC_WPMR) Write Protect Enable */
+#define TC_WPMR_WPKEY_Pos 8
+#define TC_WPMR_WPKEY_Msk (0xffffffu << TC_WPMR_WPKEY_Pos) /**< \brief (TC_WPMR) Write Protect KEY */
+#define TC_WPMR_WPKEY(value) ((TC_WPMR_WPKEY_Msk & ((value) << TC_WPMR_WPKEY_Pos)))
+
+/*@}*/
+
+/* ============================================================================= */
+/** SOFTWARE API DEFINITION FOR True Random Number Generator */
+/* ============================================================================= */
+/** \addtogroup SAM3XA_TRNG True Random Number Generator */
+/*@{*/
+
+#ifndef __ASSEMBLY__
+/** \brief Trng hardware registers */
+typedef struct {
+ WoReg TRNG_CR; /**< \brief (Trng Offset: 0x00) Control Register */
+ RoReg Reserved1[3];
+ WoReg TRNG_IER; /**< \brief (Trng Offset: 0x10) Interrupt Enable Register */
+ WoReg TRNG_IDR; /**< \brief (Trng Offset: 0x14) Interrupt Disable Register */
+ RoReg TRNG_IMR; /**< \brief (Trng Offset: 0x18) Interrupt Mask Register */
+ RoReg TRNG_ISR; /**< \brief (Trng Offset: 0x1C) Interrupt Status Register */
+ RoReg Reserved2[12];
+ RoReg TRNG_ODATA; /**< \brief (Trng Offset: 0x50) Output Data Register */
+} Trng;
+#endif /* __ASSEMBLY__ */
+/* -------- TRNG_CR : (TRNG Offset: 0x00) Control Register -------- */
+#define TRNG_CR_ENABLE (0x1u << 0) /**< \brief (TRNG_CR) Enables the TRNG to provide random values */
+#define TRNG_CR_KEY_Pos 8
+#define TRNG_CR_KEY_Msk (0xffffffu << TRNG_CR_KEY_Pos) /**< \brief (TRNG_CR) Security Key */
+#define TRNG_CR_KEY(value) ((TRNG_CR_KEY_Msk & ((value) << TRNG_CR_KEY_Pos)))
+/* -------- TRNG_IER : (TRNG Offset: 0x10) Interrupt Enable Register -------- */
+#define TRNG_IER_DATRDY (0x1u << 0) /**< \brief (TRNG_IER) Data Ready Interrupt Enable */
+/* -------- TRNG_IDR : (TRNG Offset: 0x14) Interrupt Disable Register -------- */
+#define TRNG_IDR_DATRDY (0x1u << 0) /**< \brief (TRNG_IDR) Data Ready Interrupt Disable */
+/* -------- TRNG_IMR : (TRNG Offset: 0x18) Interrupt Mask Register -------- */
+#define TRNG_IMR_DATRDY (0x1u << 0) /**< \brief (TRNG_IMR) Data Ready Interrupt Mask */
+/* -------- TRNG_ISR : (TRNG Offset: 0x1C) Interrupt Status Register -------- */
+#define TRNG_ISR_DATRDY (0x1u << 0) /**< \brief (TRNG_ISR) Data Ready */
+/* -------- TRNG_ODATA : (TRNG Offset: 0x50) Output Data Register -------- */
+#define TRNG_ODATA_ODATA_Pos 0
+#define TRNG_ODATA_ODATA_Msk (0xffffffffu << TRNG_ODATA_ODATA_Pos) /**< \brief (TRNG_ODATA) Output Data */
+
+/*@}*/
+
+/* ============================================================================= */
+/** SOFTWARE API DEFINITION FOR Two-wire Interface */
+/* ============================================================================= */
+/** \addtogroup SAM3XA_TWI Two-wire Interface */
+/*@{*/
+
+#ifndef __ASSEMBLY__
+/** \brief Twi hardware registers */
+typedef struct {
+ WoReg TWI_CR; /**< \brief (Twi Offset: 0x00) Control Register */
+ RwReg TWI_MMR; /**< \brief (Twi Offset: 0x04) Master Mode Register */
+ RwReg TWI_SMR; /**< \brief (Twi Offset: 0x08) Slave Mode Register */
+ RwReg TWI_IADR; /**< \brief (Twi Offset: 0x0C) Internal Address Register */
+ RwReg TWI_CWGR; /**< \brief (Twi Offset: 0x10) Clock Waveform Generator Register */
+ RoReg Reserved1[3];
+ RoReg TWI_SR; /**< \brief (Twi Offset: 0x20) Status Register */
+ WoReg TWI_IER; /**< \brief (Twi Offset: 0x24) Interrupt Enable Register */
+ WoReg TWI_IDR; /**< \brief (Twi Offset: 0x28) Interrupt Disable Register */
+ RoReg TWI_IMR; /**< \brief (Twi Offset: 0x2C) Interrupt Mask Register */
+ RoReg TWI_RHR; /**< \brief (Twi Offset: 0x30) Receive Holding Register */
+ WoReg TWI_THR; /**< \brief (Twi Offset: 0x34) Transmit Holding Register */
+ RoReg Reserved2[50];
+ RwReg TWI_RPR; /**< \brief (Twi Offset: 0x100) Receive Pointer Register */
+ RwReg TWI_RCR; /**< \brief (Twi Offset: 0x104) Receive Counter Register */
+ RwReg TWI_TPR; /**< \brief (Twi Offset: 0x108) Transmit Pointer Register */
+ RwReg TWI_TCR; /**< \brief (Twi Offset: 0x10C) Transmit Counter Register */
+ RwReg TWI_RNPR; /**< \brief (Twi Offset: 0x110) Receive Next Pointer Register */
+ RwReg TWI_RNCR; /**< \brief (Twi Offset: 0x114) Receive Next Counter Register */
+ RwReg TWI_TNPR; /**< \brief (Twi Offset: 0x118) Transmit Next Pointer Register */
+ RwReg TWI_TNCR; /**< \brief (Twi Offset: 0x11C) Transmit Next Counter Register */
+ WoReg TWI_PTCR; /**< \brief (Twi Offset: 0x120) Transfer Control Register */
+ RoReg TWI_PTSR; /**< \brief (Twi Offset: 0x124) Transfer Status Register */
+} Twi;
+#endif /* __ASSEMBLY__ */
+/* -------- TWI_CR : (TWI Offset: 0x00) Control Register -------- */
+#define TWI_CR_START (0x1u << 0) /**< \brief (TWI_CR) Send a START Condition */
+#define TWI_CR_STOP (0x1u << 1) /**< \brief (TWI_CR) Send a STOP Condition */
+#define TWI_CR_MSEN (0x1u << 2) /**< \brief (TWI_CR) TWI Master Mode Enabled */
+#define TWI_CR_MSDIS (0x1u << 3) /**< \brief (TWI_CR) TWI Master Mode Disabled */
+#define TWI_CR_SVEN (0x1u << 4) /**< \brief (TWI_CR) TWI Slave Mode Enabled */
+#define TWI_CR_SVDIS (0x1u << 5) /**< \brief (TWI_CR) TWI Slave Mode Disabled */
+#define TWI_CR_QUICK (0x1u << 6) /**< \brief (TWI_CR) SMBUS Quick Command */
+#define TWI_CR_SWRST (0x1u << 7) /**< \brief (TWI_CR) Software Reset */
+/* -------- TWI_MMR : (TWI Offset: 0x04) Master Mode Register -------- */
+#define TWI_MMR_IADRSZ_Pos 8
+#define TWI_MMR_IADRSZ_Msk (0x3u << TWI_MMR_IADRSZ_Pos) /**< \brief (TWI_MMR) Internal Device Address Size */
+#define TWI_MMR_IADRSZ_NONE (0x0u << 8) /**< \brief (TWI_MMR) No internal device address */
+#define TWI_MMR_IADRSZ_1_BYTE (0x1u << 8) /**< \brief (TWI_MMR) One-byte internal device address */
+#define TWI_MMR_IADRSZ_2_BYTE (0x2u << 8) /**< \brief (TWI_MMR) Two-byte internal device address */
+#define TWI_MMR_IADRSZ_3_BYTE (0x3u << 8) /**< \brief (TWI_MMR) Three-byte internal device address */
+#define TWI_MMR_MREAD (0x1u << 12) /**< \brief (TWI_MMR) Master Read Direction */
+#define TWI_MMR_DADR_Pos 16
+#define TWI_MMR_DADR_Msk (0x7fu << TWI_MMR_DADR_Pos) /**< \brief (TWI_MMR) Device Address */
+#define TWI_MMR_DADR(value) ((TWI_MMR_DADR_Msk & ((value) << TWI_MMR_DADR_Pos)))
+/* -------- TWI_SMR : (TWI Offset: 0x08) Slave Mode Register -------- */
+#define TWI_SMR_SADR_Pos 16
+#define TWI_SMR_SADR_Msk (0x7fu << TWI_SMR_SADR_Pos) /**< \brief (TWI_SMR) Slave Address */
+#define TWI_SMR_SADR(value) ((TWI_SMR_SADR_Msk & ((value) << TWI_SMR_SADR_Pos)))
+/* -------- TWI_IADR : (TWI Offset: 0x0C) Internal Address Register -------- */
+#define TWI_IADR_IADR_Pos 0
+#define TWI_IADR_IADR_Msk (0xffffffu << TWI_IADR_IADR_Pos) /**< \brief (TWI_IADR) Internal Address */
+#define TWI_IADR_IADR(value) ((TWI_IADR_IADR_Msk & ((value) << TWI_IADR_IADR_Pos)))
+/* -------- TWI_CWGR : (TWI Offset: 0x10) Clock Waveform Generator Register -------- */
+#define TWI_CWGR_CLDIV_Pos 0
+#define TWI_CWGR_CLDIV_Msk (0xffu << TWI_CWGR_CLDIV_Pos) /**< \brief (TWI_CWGR) Clock Low Divider */
+#define TWI_CWGR_CLDIV(value) ((TWI_CWGR_CLDIV_Msk & ((value) << TWI_CWGR_CLDIV_Pos)))
+#define TWI_CWGR_CHDIV_Pos 8
+#define TWI_CWGR_CHDIV_Msk (0xffu << TWI_CWGR_CHDIV_Pos) /**< \brief (TWI_CWGR) Clock High Divider */
+#define TWI_CWGR_CHDIV(value) ((TWI_CWGR_CHDIV_Msk & ((value) << TWI_CWGR_CHDIV_Pos)))
+#define TWI_CWGR_CKDIV_Pos 16
+#define TWI_CWGR_CKDIV_Msk (0x7u << TWI_CWGR_CKDIV_Pos) /**< \brief (TWI_CWGR) Clock Divider */
+#define TWI_CWGR_CKDIV(value) ((TWI_CWGR_CKDIV_Msk & ((value) << TWI_CWGR_CKDIV_Pos)))
+/* -------- TWI_SR : (TWI Offset: 0x20) Status Register -------- */
+#define TWI_SR_TXCOMP (0x1u << 0) /**< \brief (TWI_SR) Transmission Completed (automatically set / reset) */
+#define TWI_SR_RXRDY (0x1u << 1) /**< \brief (TWI_SR) Receive Holding Register Ready (automatically set / reset) */
+#define TWI_SR_TXRDY (0x1u << 2) /**< \brief (TWI_SR) Transmit Holding Register Ready (automatically set / reset) */
+#define TWI_SR_SVREAD (0x1u << 3) /**< \brief (TWI_SR) Slave Read (automatically set / reset) */
+#define TWI_SR_SVACC (0x1u << 4) /**< \brief (TWI_SR) Slave Access (automatically set / reset) */
+#define TWI_SR_GACC (0x1u << 5) /**< \brief (TWI_SR) General Call Access (clear on read) */
+#define TWI_SR_OVRE (0x1u << 6) /**< \brief (TWI_SR) Overrun Error (clear on read) */
+#define TWI_SR_NACK (0x1u << 8) /**< \brief (TWI_SR) Not Acknowledged (clear on read) */
+#define TWI_SR_ARBLST (0x1u << 9) /**< \brief (TWI_SR) Arbitration Lost (clear on read) */
+#define TWI_SR_SCLWS (0x1u << 10) /**< \brief (TWI_SR) Clock Wait State (automatically set / reset) */
+#define TWI_SR_EOSACC (0x1u << 11) /**< \brief (TWI_SR) End Of Slave Access (clear on read) */
+#define TWI_SR_ENDRX (0x1u << 12) /**< \brief (TWI_SR) End of RX buffer */
+#define TWI_SR_ENDTX (0x1u << 13) /**< \brief (TWI_SR) End of TX buffer */
+#define TWI_SR_RXBUFF (0x1u << 14) /**< \brief (TWI_SR) RX Buffer Full */
+#define TWI_SR_TXBUFE (0x1u << 15) /**< \brief (TWI_SR) TX Buffer Empty */
+/* -------- TWI_IER : (TWI Offset: 0x24) Interrupt Enable Register -------- */
+#define TWI_IER_TXCOMP (0x1u << 0) /**< \brief (TWI_IER) Transmission Completed Interrupt Enable */
+#define TWI_IER_RXRDY (0x1u << 1) /**< \brief (TWI_IER) Receive Holding Register Ready Interrupt Enable */
+#define TWI_IER_TXRDY (0x1u << 2) /**< \brief (TWI_IER) Transmit Holding Register Ready Interrupt Enable */
+#define TWI_IER_SVACC (0x1u << 4) /**< \brief (TWI_IER) Slave Access Interrupt Enable */
+#define TWI_IER_GACC (0x1u << 5) /**< \brief (TWI_IER) General Call Access Interrupt Enable */
+#define TWI_IER_OVRE (0x1u << 6) /**< \brief (TWI_IER) Overrun Error Interrupt Enable */
+#define TWI_IER_NACK (0x1u << 8) /**< \brief (TWI_IER) Not Acknowledge Interrupt Enable */
+#define TWI_IER_ARBLST (0x1u << 9) /**< \brief (TWI_IER) Arbitration Lost Interrupt Enable */
+#define TWI_IER_SCL_WS (0x1u << 10) /**< \brief (TWI_IER) Clock Wait State Interrupt Enable */
+#define TWI_IER_EOSACC (0x1u << 11) /**< \brief (TWI_IER) End Of Slave Access Interrupt Enable */
+#define TWI_IER_ENDRX (0x1u << 12) /**< \brief (TWI_IER) End of Receive Buffer Interrupt Enable */
+#define TWI_IER_ENDTX (0x1u << 13) /**< \brief (TWI_IER) End of Transmit Buffer Interrupt Enable */
+#define TWI_IER_RXBUFF (0x1u << 14) /**< \brief (TWI_IER) Receive Buffer Full Interrupt Enable */
+#define TWI_IER_TXBUFE (0x1u << 15) /**< \brief (TWI_IER) Transmit Buffer Empty Interrupt Enable */
+/* -------- TWI_IDR : (TWI Offset: 0x28) Interrupt Disable Register -------- */
+#define TWI_IDR_TXCOMP (0x1u << 0) /**< \brief (TWI_IDR) Transmission Completed Interrupt Disable */
+#define TWI_IDR_RXRDY (0x1u << 1) /**< \brief (TWI_IDR) Receive Holding Register Ready Interrupt Disable */
+#define TWI_IDR_TXRDY (0x1u << 2) /**< \brief (TWI_IDR) Transmit Holding Register Ready Interrupt Disable */
+#define TWI_IDR_SVACC (0x1u << 4) /**< \brief (TWI_IDR) Slave Access Interrupt Disable */
+#define TWI_IDR_GACC (0x1u << 5) /**< \brief (TWI_IDR) General Call Access Interrupt Disable */
+#define TWI_IDR_OVRE (0x1u << 6) /**< \brief (TWI_IDR) Overrun Error Interrupt Disable */
+#define TWI_IDR_NACK (0x1u << 8) /**< \brief (TWI_IDR) Not Acknowledge Interrupt Disable */
+#define TWI_IDR_ARBLST (0x1u << 9) /**< \brief (TWI_IDR) Arbitration Lost Interrupt Disable */
+#define TWI_IDR_SCL_WS (0x1u << 10) /**< \brief (TWI_IDR) Clock Wait State Interrupt Disable */
+#define TWI_IDR_EOSACC (0x1u << 11) /**< \brief (TWI_IDR) End Of Slave Access Interrupt Disable */
+#define TWI_IDR_ENDRX (0x1u << 12) /**< \brief (TWI_IDR) End of Receive Buffer Interrupt Disable */
+#define TWI_IDR_ENDTX (0x1u << 13) /**< \brief (TWI_IDR) End of Transmit Buffer Interrupt Disable */
+#define TWI_IDR_RXBUFF (0x1u << 14) /**< \brief (TWI_IDR) Receive Buffer Full Interrupt Disable */
+#define TWI_IDR_TXBUFE (0x1u << 15) /**< \brief (TWI_IDR) Transmit Buffer Empty Interrupt Disable */
+/* -------- TWI_IMR : (TWI Offset: 0x2C) Interrupt Mask Register -------- */
+#define TWI_IMR_TXCOMP (0x1u << 0) /**< \brief (TWI_IMR) Transmission Completed Interrupt Mask */
+#define TWI_IMR_RXRDY (0x1u << 1) /**< \brief (TWI_IMR) Receive Holding Register Ready Interrupt Mask */
+#define TWI_IMR_TXRDY (0x1u << 2) /**< \brief (TWI_IMR) Transmit Holding Register Ready Interrupt Mask */
+#define TWI_IMR_SVACC (0x1u << 4) /**< \brief (TWI_IMR) Slave Access Interrupt Mask */
+#define TWI_IMR_GACC (0x1u << 5) /**< \brief (TWI_IMR) General Call Access Interrupt Mask */
+#define TWI_IMR_OVRE (0x1u << 6) /**< \brief (TWI_IMR) Overrun Error Interrupt Mask */
+#define TWI_IMR_NACK (0x1u << 8) /**< \brief (TWI_IMR) Not Acknowledge Interrupt Mask */
+#define TWI_IMR_ARBLST (0x1u << 9) /**< \brief (TWI_IMR) Arbitration Lost Interrupt Mask */
+#define TWI_IMR_SCL_WS (0x1u << 10) /**< \brief (TWI_IMR) Clock Wait State Interrupt Mask */
+#define TWI_IMR_EOSACC (0x1u << 11) /**< \brief (TWI_IMR) End Of Slave Access Interrupt Mask */
+#define TWI_IMR_ENDRX (0x1u << 12) /**< \brief (TWI_IMR) End of Receive Buffer Interrupt Mask */
+#define TWI_IMR_ENDTX (0x1u << 13) /**< \brief (TWI_IMR) End of Transmit Buffer Interrupt Mask */
+#define TWI_IMR_RXBUFF (0x1u << 14) /**< \brief (TWI_IMR) Receive Buffer Full Interrupt Mask */
+#define TWI_IMR_TXBUFE (0x1u << 15) /**< \brief (TWI_IMR) Transmit Buffer Empty Interrupt Mask */
+/* -------- TWI_RHR : (TWI Offset: 0x30) Receive Holding Register -------- */
+#define TWI_RHR_RXDATA_Pos 0
+#define TWI_RHR_RXDATA_Msk (0xffu << TWI_RHR_RXDATA_Pos) /**< \brief (TWI_RHR) Master or Slave Receive Holding Data */
+/* -------- TWI_THR : (TWI Offset: 0x34) Transmit Holding Register -------- */
+#define TWI_THR_TXDATA_Pos 0
+#define TWI_THR_TXDATA_Msk (0xffu << TWI_THR_TXDATA_Pos) /**< \brief (TWI_THR) Master or Slave Transmit Holding Data */
+#define TWI_THR_TXDATA(value) ((TWI_THR_TXDATA_Msk & ((value) << TWI_THR_TXDATA_Pos)))
+/* -------- TWI_RPR : (TWI Offset: 0x100) Receive Pointer Register -------- */
+#define TWI_RPR_RXPTR_Pos 0
+#define TWI_RPR_RXPTR_Msk (0xffffffffu << TWI_RPR_RXPTR_Pos) /**< \brief (TWI_RPR) Receive Pointer Register */
+#define TWI_RPR_RXPTR(value) ((TWI_RPR_RXPTR_Msk & ((value) << TWI_RPR_RXPTR_Pos)))
+/* -------- TWI_RCR : (TWI Offset: 0x104) Receive Counter Register -------- */
+#define TWI_RCR_RXCTR_Pos 0
+#define TWI_RCR_RXCTR_Msk (0xffffu << TWI_RCR_RXCTR_Pos) /**< \brief (TWI_RCR) Receive Counter Register */
+#define TWI_RCR_RXCTR(value) ((TWI_RCR_RXCTR_Msk & ((value) << TWI_RCR_RXCTR_Pos)))
+/* -------- TWI_TPR : (TWI Offset: 0x108) Transmit Pointer Register -------- */
+#define TWI_TPR_TXPTR_Pos 0
+#define TWI_TPR_TXPTR_Msk (0xffffffffu << TWI_TPR_TXPTR_Pos) /**< \brief (TWI_TPR) Transmit Counter Register */
+#define TWI_TPR_TXPTR(value) ((TWI_TPR_TXPTR_Msk & ((value) << TWI_TPR_TXPTR_Pos)))
+/* -------- TWI_TCR : (TWI Offset: 0x10C) Transmit Counter Register -------- */
+#define TWI_TCR_TXCTR_Pos 0
+#define TWI_TCR_TXCTR_Msk (0xffffu << TWI_TCR_TXCTR_Pos) /**< \brief (TWI_TCR) Transmit Counter Register */
+#define TWI_TCR_TXCTR(value) ((TWI_TCR_TXCTR_Msk & ((value) << TWI_TCR_TXCTR_Pos)))
+/* -------- TWI_RNPR : (TWI Offset: 0x110) Receive Next Pointer Register -------- */
+#define TWI_RNPR_RXNPTR_Pos 0
+#define TWI_RNPR_RXNPTR_Msk (0xffffffffu << TWI_RNPR_RXNPTR_Pos) /**< \brief (TWI_RNPR) Receive Next Pointer */
+#define TWI_RNPR_RXNPTR(value) ((TWI_RNPR_RXNPTR_Msk & ((value) << TWI_RNPR_RXNPTR_Pos)))
+/* -------- TWI_RNCR : (TWI Offset: 0x114) Receive Next Counter Register -------- */
+#define TWI_RNCR_RXNCTR_Pos 0
+#define TWI_RNCR_RXNCTR_Msk (0xffffu << TWI_RNCR_RXNCTR_Pos) /**< \brief (TWI_RNCR) Receive Next Counter */
+#define TWI_RNCR_RXNCTR(value) ((TWI_RNCR_RXNCTR_Msk & ((value) << TWI_RNCR_RXNCTR_Pos)))
+/* -------- TWI_TNPR : (TWI Offset: 0x118) Transmit Next Pointer Register -------- */
+#define TWI_TNPR_TXNPTR_Pos 0
+#define TWI_TNPR_TXNPTR_Msk (0xffffffffu << TWI_TNPR_TXNPTR_Pos) /**< \brief (TWI_TNPR) Transmit Next Pointer */
+#define TWI_TNPR_TXNPTR(value) ((TWI_TNPR_TXNPTR_Msk & ((value) << TWI_TNPR_TXNPTR_Pos)))
+/* -------- TWI_TNCR : (TWI Offset: 0x11C) Transmit Next Counter Register -------- */
+#define TWI_TNCR_TXNCTR_Pos 0
+#define TWI_TNCR_TXNCTR_Msk (0xffffu << TWI_TNCR_TXNCTR_Pos) /**< \brief (TWI_TNCR) Transmit Counter Next */
+#define TWI_TNCR_TXNCTR(value) ((TWI_TNCR_TXNCTR_Msk & ((value) << TWI_TNCR_TXNCTR_Pos)))
+/* -------- TWI_PTCR : (TWI Offset: 0x120) Transfer Control Register -------- */
+#define TWI_PTCR_RXTEN (0x1u << 0) /**< \brief (TWI_PTCR) Receiver Transfer Enable */
+#define TWI_PTCR_RXTDIS (0x1u << 1) /**< \brief (TWI_PTCR) Receiver Transfer Disable */
+#define TWI_PTCR_TXTEN (0x1u << 8) /**< \brief (TWI_PTCR) Transmitter Transfer Enable */
+#define TWI_PTCR_TXTDIS (0x1u << 9) /**< \brief (TWI_PTCR) Transmitter Transfer Disable */
+/* -------- TWI_PTSR : (TWI Offset: 0x124) Transfer Status Register -------- */
+#define TWI_PTSR_RXTEN (0x1u << 0) /**< \brief (TWI_PTSR) Receiver Transfer Enable */
+#define TWI_PTSR_TXTEN (0x1u << 8) /**< \brief (TWI_PTSR) Transmitter Transfer Enable */
+
+/*@}*/
+
+/* ============================================================================= */
+/** SOFTWARE API DEFINITION FOR Universal Asynchronous Receiver Transmitter */
+/* ============================================================================= */
+/** \addtogroup SAM3XA_UART Universal Asynchronous Receiver Transmitter */
+/*@{*/
+
+#ifndef __ASSEMBLY__
+/** \brief Uart hardware registers */
+typedef struct {
+ WoReg UART_CR; /**< \brief (Uart Offset: 0x0000) Control Register */
+ RwReg UART_MR; /**< \brief (Uart Offset: 0x0004) Mode Register */
+ WoReg UART_IER; /**< \brief (Uart Offset: 0x0008) Interrupt Enable Register */
+ WoReg UART_IDR; /**< \brief (Uart Offset: 0x000C) Interrupt Disable Register */
+ RoReg UART_IMR; /**< \brief (Uart Offset: 0x0010) Interrupt Mask Register */
+ RoReg UART_SR; /**< \brief (Uart Offset: 0x0014) Status Register */
+ RoReg UART_RHR; /**< \brief (Uart Offset: 0x0018) Receive Holding Register */
+ WoReg UART_THR; /**< \brief (Uart Offset: 0x001C) Transmit Holding Register */
+ RwReg UART_BRGR; /**< \brief (Uart Offset: 0x0020) Baud Rate Generator Register */
+ RoReg Reserved1[55];
+ RwReg UART_RPR; /**< \brief (Uart Offset: 0x100) Receive Pointer Register */
+ RwReg UART_RCR; /**< \brief (Uart Offset: 0x104) Receive Counter Register */
+ RwReg UART_TPR; /**< \brief (Uart Offset: 0x108) Transmit Pointer Register */
+ RwReg UART_TCR; /**< \brief (Uart Offset: 0x10C) Transmit Counter Register */
+ RwReg UART_RNPR; /**< \brief (Uart Offset: 0x110) Receive Next Pointer Register */
+ RwReg UART_RNCR; /**< \brief (Uart Offset: 0x114) Receive Next Counter Register */
+ RwReg UART_TNPR; /**< \brief (Uart Offset: 0x118) Transmit Next Pointer Register */
+ RwReg UART_TNCR; /**< \brief (Uart Offset: 0x11C) Transmit Next Counter Register */
+ WoReg UART_PTCR; /**< \brief (Uart Offset: 0x120) Transfer Control Register */
+ RoReg UART_PTSR; /**< \brief (Uart Offset: 0x124) Transfer Status Register */
+} Uart;
+#endif /* __ASSEMBLY__ */
+/* -------- UART_CR : (UART Offset: 0x0000) Control Register -------- */
+#define UART_CR_RSTRX (0x1u << 2) /**< \brief (UART_CR) Reset Receiver */
+#define UART_CR_RSTTX (0x1u << 3) /**< \brief (UART_CR) Reset Transmitter */
+#define UART_CR_RXEN (0x1u << 4) /**< \brief (UART_CR) Receiver Enable */
+#define UART_CR_RXDIS (0x1u << 5) /**< \brief (UART_CR) Receiver Disable */
+#define UART_CR_TXEN (0x1u << 6) /**< \brief (UART_CR) Transmitter Enable */
+#define UART_CR_TXDIS (0x1u << 7) /**< \brief (UART_CR) Transmitter Disable */
+#define UART_CR_RSTSTA (0x1u << 8) /**< \brief (UART_CR) Reset Status Bits */
+/* -------- UART_MR : (UART Offset: 0x0004) Mode Register -------- */
+#define UART_MR_PAR_Pos 9
+#define UART_MR_PAR_Msk (0x7u << UART_MR_PAR_Pos) /**< \brief (UART_MR) Parity Type */
+#define UART_MR_PAR_EVEN (0x0u << 9) /**< \brief (UART_MR) Even parity */
+#define UART_MR_PAR_ODD (0x1u << 9) /**< \brief (UART_MR) Odd parity */
+#define UART_MR_PAR_SPACE (0x2u << 9) /**< \brief (UART_MR) Space: parity forced to 0 */
+#define UART_MR_PAR_MARK (0x3u << 9) /**< \brief (UART_MR) Mark: parity forced to 1 */
+#define UART_MR_PAR_NO (0x4u << 9) /**< \brief (UART_MR) No parity */
+#define UART_MR_CHMODE_Pos 14
+#define UART_MR_CHMODE_Msk (0x3u << UART_MR_CHMODE_Pos) /**< \brief (UART_MR) Channel Mode */
+#define UART_MR_CHMODE_NORMAL (0x0u << 14) /**< \brief (UART_MR) Normal Mode */
+#define UART_MR_CHMODE_AUTOMATIC (0x1u << 14) /**< \brief (UART_MR) Automatic Echo */
+#define UART_MR_CHMODE_LOCAL_LOOPBACK (0x2u << 14) /**< \brief (UART_MR) Local Loopback */
+#define UART_MR_CHMODE_REMOTE_LOOPBACK (0x3u << 14) /**< \brief (UART_MR) Remote Loopback */
+/* -------- UART_IER : (UART Offset: 0x0008) Interrupt Enable Register -------- */
+#define UART_IER_RXRDY (0x1u << 0) /**< \brief (UART_IER) Enable RXRDY Interrupt */
+#define UART_IER_TXRDY (0x1u << 1) /**< \brief (UART_IER) Enable TXRDY Interrupt */
+#define UART_IER_ENDRX (0x1u << 3) /**< \brief (UART_IER) Enable End of Receive Transfer Interrupt */
+#define UART_IER_ENDTX (0x1u << 4) /**< \brief (UART_IER) Enable End of Transmit Interrupt */
+#define UART_IER_OVRE (0x1u << 5) /**< \brief (UART_IER) Enable Overrun Error Interrupt */
+#define UART_IER_FRAME (0x1u << 6) /**< \brief (UART_IER) Enable Framing Error Interrupt */
+#define UART_IER_PARE (0x1u << 7) /**< \brief (UART_IER) Enable Parity Error Interrupt */
+#define UART_IER_TXEMPTY (0x1u << 9) /**< \brief (UART_IER) Enable TXEMPTY Interrupt */
+#define UART_IER_TXBUFE (0x1u << 11) /**< \brief (UART_IER) Enable Buffer Empty Interrupt */
+#define UART_IER_RXBUFF (0x1u << 12) /**< \brief (UART_IER) Enable Buffer Full Interrupt */
+/* -------- UART_IDR : (UART Offset: 0x000C) Interrupt Disable Register -------- */
+#define UART_IDR_RXRDY (0x1u << 0) /**< \brief (UART_IDR) Disable RXRDY Interrupt */
+#define UART_IDR_TXRDY (0x1u << 1) /**< \brief (UART_IDR) Disable TXRDY Interrupt */
+#define UART_IDR_ENDRX (0x1u << 3) /**< \brief (UART_IDR) Disable End of Receive Transfer Interrupt */
+#define UART_IDR_ENDTX (0x1u << 4) /**< \brief (UART_IDR) Disable End of Transmit Interrupt */
+#define UART_IDR_OVRE (0x1u << 5) /**< \brief (UART_IDR) Disable Overrun Error Interrupt */
+#define UART_IDR_FRAME (0x1u << 6) /**< \brief (UART_IDR) Disable Framing Error Interrupt */
+#define UART_IDR_PARE (0x1u << 7) /**< \brief (UART_IDR) Disable Parity Error Interrupt */
+#define UART_IDR_TXEMPTY (0x1u << 9) /**< \brief (UART_IDR) Disable TXEMPTY Interrupt */
+#define UART_IDR_TXBUFE (0x1u << 11) /**< \brief (UART_IDR) Disable Buffer Empty Interrupt */
+#define UART_IDR_RXBUFF (0x1u << 12) /**< \brief (UART_IDR) Disable Buffer Full Interrupt */
+/* -------- UART_IMR : (UART Offset: 0x0010) Interrupt Mask Register -------- */
+#define UART_IMR_RXRDY (0x1u << 0) /**< \brief (UART_IMR) Mask RXRDY Interrupt */
+#define UART_IMR_TXRDY (0x1u << 1) /**< \brief (UART_IMR) Disable TXRDY Interrupt */
+#define UART_IMR_ENDRX (0x1u << 3) /**< \brief (UART_IMR) Mask End of Receive Transfer Interrupt */
+#define UART_IMR_ENDTX (0x1u << 4) /**< \brief (UART_IMR) Mask End of Transmit Interrupt */
+#define UART_IMR_OVRE (0x1u << 5) /**< \brief (UART_IMR) Mask Overrun Error Interrupt */
+#define UART_IMR_FRAME (0x1u << 6) /**< \brief (UART_IMR) Mask Framing Error Interrupt */
+#define UART_IMR_PARE (0x1u << 7) /**< \brief (UART_IMR) Mask Parity Error Interrupt */
+#define UART_IMR_TXEMPTY (0x1u << 9) /**< \brief (UART_IMR) Mask TXEMPTY Interrupt */
+#define UART_IMR_TXBUFE (0x1u << 11) /**< \brief (UART_IMR) Mask TXBUFE Interrupt */
+#define UART_IMR_RXBUFF (0x1u << 12) /**< \brief (UART_IMR) Mask RXBUFF Interrupt */
+/* -------- UART_SR : (UART Offset: 0x0014) Status Register -------- */
+#define UART_SR_RXRDY (0x1u << 0) /**< \brief (UART_SR) Receiver Ready */
+#define UART_SR_TXRDY (0x1u << 1) /**< \brief (UART_SR) Transmitter Ready */
+#define UART_SR_ENDRX (0x1u << 3) /**< \brief (UART_SR) End of Receiver Transfer */
+#define UART_SR_ENDTX (0x1u << 4) /**< \brief (UART_SR) End of Transmitter Transfer */
+#define UART_SR_OVRE (0x1u << 5) /**< \brief (UART_SR) Overrun Error */
+#define UART_SR_FRAME (0x1u << 6) /**< \brief (UART_SR) Framing Error */
+#define UART_SR_PARE (0x1u << 7) /**< \brief (UART_SR) Parity Error */
+#define UART_SR_TXEMPTY (0x1u << 9) /**< \brief (UART_SR) Transmitter Empty */
+#define UART_SR_TXBUFE (0x1u << 11) /**< \brief (UART_SR) Transmission Buffer Empty */
+#define UART_SR_RXBUFF (0x1u << 12) /**< \brief (UART_SR) Receive Buffer Full */
+/* -------- UART_RHR : (UART Offset: 0x0018) Receive Holding Register -------- */
+#define UART_RHR_RXCHR_Pos 0
+#define UART_RHR_RXCHR_Msk (0xffu << UART_RHR_RXCHR_Pos) /**< \brief (UART_RHR) Received Character */
+/* -------- UART_THR : (UART Offset: 0x001C) Transmit Holding Register -------- */
+#define UART_THR_TXCHR_Pos 0
+#define UART_THR_TXCHR_Msk (0xffu << UART_THR_TXCHR_Pos) /**< \brief (UART_THR) Character to be Transmitted */
+#define UART_THR_TXCHR(value) ((UART_THR_TXCHR_Msk & ((value) << UART_THR_TXCHR_Pos)))
+/* -------- UART_BRGR : (UART Offset: 0x0020) Baud Rate Generator Register -------- */
+#define UART_BRGR_CD_Pos 0
+#define UART_BRGR_CD_Msk (0xffffu << UART_BRGR_CD_Pos) /**< \brief (UART_BRGR) Clock Divisor */
+#define UART_BRGR_CD(value) ((UART_BRGR_CD_Msk & ((value) << UART_BRGR_CD_Pos)))
+/* -------- UART_RPR : (UART Offset: 0x100) Receive Pointer Register -------- */
+#define UART_RPR_RXPTR_Pos 0
+#define UART_RPR_RXPTR_Msk (0xffffffffu << UART_RPR_RXPTR_Pos) /**< \brief (UART_RPR) Receive Pointer Register */
+#define UART_RPR_RXPTR(value) ((UART_RPR_RXPTR_Msk & ((value) << UART_RPR_RXPTR_Pos)))
+/* -------- UART_RCR : (UART Offset: 0x104) Receive Counter Register -------- */
+#define UART_RCR_RXCTR_Pos 0
+#define UART_RCR_RXCTR_Msk (0xffffu << UART_RCR_RXCTR_Pos) /**< \brief (UART_RCR) Receive Counter Register */
+#define UART_RCR_RXCTR(value) ((UART_RCR_RXCTR_Msk & ((value) << UART_RCR_RXCTR_Pos)))
+/* -------- UART_TPR : (UART Offset: 0x108) Transmit Pointer Register -------- */
+#define UART_TPR_TXPTR_Pos 0
+#define UART_TPR_TXPTR_Msk (0xffffffffu << UART_TPR_TXPTR_Pos) /**< \brief (UART_TPR) Transmit Counter Register */
+#define UART_TPR_TXPTR(value) ((UART_TPR_TXPTR_Msk & ((value) << UART_TPR_TXPTR_Pos)))
+/* -------- UART_TCR : (UART Offset: 0x10C) Transmit Counter Register -------- */
+#define UART_TCR_TXCTR_Pos 0
+#define UART_TCR_TXCTR_Msk (0xffffu << UART_TCR_TXCTR_Pos) /**< \brief (UART_TCR) Transmit Counter Register */
+#define UART_TCR_TXCTR(value) ((UART_TCR_TXCTR_Msk & ((value) << UART_TCR_TXCTR_Pos)))
+/* -------- UART_RNPR : (UART Offset: 0x110) Receive Next Pointer Register -------- */
+#define UART_RNPR_RXNPTR_Pos 0
+#define UART_RNPR_RXNPTR_Msk (0xffffffffu << UART_RNPR_RXNPTR_Pos) /**< \brief (UART_RNPR) Receive Next Pointer */
+#define UART_RNPR_RXNPTR(value) ((UART_RNPR_RXNPTR_Msk & ((value) << UART_RNPR_RXNPTR_Pos)))
+/* -------- UART_RNCR : (UART Offset: 0x114) Receive Next Counter Register -------- */
+#define UART_RNCR_RXNCTR_Pos 0
+#define UART_RNCR_RXNCTR_Msk (0xffffu << UART_RNCR_RXNCTR_Pos) /**< \brief (UART_RNCR) Receive Next Counter */
+#define UART_RNCR_RXNCTR(value) ((UART_RNCR_RXNCTR_Msk & ((value) << UART_RNCR_RXNCTR_Pos)))
+/* -------- UART_TNPR : (UART Offset: 0x118) Transmit Next Pointer Register -------- */
+#define UART_TNPR_TXNPTR_Pos 0
+#define UART_TNPR_TXNPTR_Msk (0xffffffffu << UART_TNPR_TXNPTR_Pos) /**< \brief (UART_TNPR) Transmit Next Pointer */
+#define UART_TNPR_TXNPTR(value) ((UART_TNPR_TXNPTR_Msk & ((value) << UART_TNPR_TXNPTR_Pos)))
+/* -------- UART_TNCR : (UART Offset: 0x11C) Transmit Next Counter Register -------- */
+#define UART_TNCR_TXNCTR_Pos 0
+#define UART_TNCR_TXNCTR_Msk (0xffffu << UART_TNCR_TXNCTR_Pos) /**< \brief (UART_TNCR) Transmit Counter Next */
+#define UART_TNCR_TXNCTR(value) ((UART_TNCR_TXNCTR_Msk & ((value) << UART_TNCR_TXNCTR_Pos)))
+/* -------- UART_PTCR : (UART Offset: 0x120) Transfer Control Register -------- */
+#define UART_PTCR_RXTEN (0x1u << 0) /**< \brief (UART_PTCR) Receiver Transfer Enable */
+#define UART_PTCR_RXTDIS (0x1u << 1) /**< \brief (UART_PTCR) Receiver Transfer Disable */
+#define UART_PTCR_TXTEN (0x1u << 8) /**< \brief (UART_PTCR) Transmitter Transfer Enable */
+#define UART_PTCR_TXTDIS (0x1u << 9) /**< \brief (UART_PTCR) Transmitter Transfer Disable */
+/* -------- UART_PTSR : (UART Offset: 0x124) Transfer Status Register -------- */
+#define UART_PTSR_RXTEN (0x1u << 0) /**< \brief (UART_PTSR) Receiver Transfer Enable */
+#define UART_PTSR_TXTEN (0x1u << 8) /**< \brief (UART_PTSR) Transmitter Transfer Enable */
+
+/*@}*/
+
+/* ============================================================================= */
+/** SOFTWARE API DEFINITION FOR USB On-The-Go Interface */
+/* ============================================================================= */
+/** \addtogroup SAM3XA_UOTGHS USB On-The-Go Interface */
+/*@{*/
+
+#ifndef __ASSEMBLY__
+/** \brief UotghsDevdma hardware registers */
+typedef struct {
+ RwReg UOTGHS_DEVDMANXTDSC; /**< \brief (UotghsDevdma Offset: 0x0) Device DMA Channel Next Descriptor Address Register */
+ RwReg UOTGHS_DEVDMAADDRESS; /**< \brief (UotghsDevdma Offset: 0x4) Device DMA Channel Address Register */
+ RwReg UOTGHS_DEVDMACONTROL; /**< \brief (UotghsDevdma Offset: 0x8) Device DMA Channel Control Register */
+ RwReg UOTGHS_DEVDMASTATUS; /**< \brief (UotghsDevdma Offset: 0xC) Device DMA Channel Status Register */
+} UotghsDevdma;
+/** \brief UotghsHstdma hardware registers */
+typedef struct {
+ RwReg UOTGHS_HSTDMANXTDSC; /**< \brief (UotghsHstdma Offset: 0x0) Host DMA Channel Next Descriptor Address Register */
+ RwReg UOTGHS_HSTDMAADDRESS; /**< \brief (UotghsHstdma Offset: 0x4) Host DMA Channel Address Register */
+ RwReg UOTGHS_HSTDMACONTROL; /**< \brief (UotghsHstdma Offset: 0x8) Host DMA Channel Control Register */
+ RwReg UOTGHS_HSTDMASTATUS; /**< \brief (UotghsHstdma Offset: 0xC) Host DMA Channel Status Register */
+} UotghsHstdma;
+/** \brief Uotghs hardware registers */
+#define UOTGHSDEVDMA_NUMBER 7
+#define UOTGHSHSTDMA_NUMBER 7
+typedef struct {
+ RwReg UOTGHS_DEVCTRL; /**< \brief (Uotghs Offset: 0x0000) Device General Control Register */
+ RoReg UOTGHS_DEVISR; /**< \brief (Uotghs Offset: 0x0004) Device Global Interrupt Status Register */
+ WoReg UOTGHS_DEVICR; /**< \brief (Uotghs Offset: 0x0008) Device Global Interrupt Clear Register */
+ WoReg UOTGHS_DEVIFR; /**< \brief (Uotghs Offset: 0x000C) Device Global Interrupt Set Register */
+ RoReg UOTGHS_DEVIMR; /**< \brief (Uotghs Offset: 0x0010) Device Global Interrupt Mask Register */
+ WoReg UOTGHS_DEVIDR; /**< \brief (Uotghs Offset: 0x0014) Device Global Interrupt Disable Register */
+ WoReg UOTGHS_DEVIER; /**< \brief (Uotghs Offset: 0x0018) Device Global Interrupt Enable Register */
+ RwReg UOTGHS_DEVEPT; /**< \brief (Uotghs Offset: 0x001C) Device Endpoint Register */
+ RoReg UOTGHS_DEVFNUM; /**< \brief (Uotghs Offset: 0x0020) Device Frame Number Register */
+ RoReg Reserved1[55];
+ RwReg UOTGHS_DEVEPTCFG[10]; /**< \brief (Uotghs Offset: 0x100) Device Endpoint Configuration Register (n = 0) */
+ RoReg Reserved2[2];
+ RoReg UOTGHS_DEVEPTISR[10]; /**< \brief (Uotghs Offset: 0x130) Device Endpoint Status Register (n = 0) */
+ RoReg Reserved3[2];
+ WoReg UOTGHS_DEVEPTICR[10]; /**< \brief (Uotghs Offset: 0x160) Device Endpoint Clear Register (n = 0) */
+ RoReg Reserved4[2];
+ WoReg UOTGHS_DEVEPTIFR[10]; /**< \brief (Uotghs Offset: 0x190) Device Endpoint Set Register (n = 0) */
+ RoReg Reserved5[2];
+ RoReg UOTGHS_DEVEPTIMR[10]; /**< \brief (Uotghs Offset: 0x1C0) Device Endpoint Mask Register (n = 0) */
+ RoReg Reserved6[2];
+ WoReg UOTGHS_DEVEPTIER[10]; /**< \brief (Uotghs Offset: 0x1F0) Device Endpoint Enable Register (n = 0) */
+ RoReg Reserved7[2];
+ WoReg UOTGHS_DEVEPTIDR[10]; /**< \brief (Uotghs Offset: 0x220) Device Endpoint Disable Register (n = 0) */
+ RoReg Reserved8[50];
+ UotghsDevdma UOTGHS_DEVDMA[UOTGHSDEVDMA_NUMBER]; /**< \brief (Uotghs Offset: 0x310) n = 1 .. 7 */
+ RoReg Reserved9[32];
+ RwReg UOTGHS_HSTCTRL; /**< \brief (Uotghs Offset: 0x0400) Host General Control Register */
+ RoReg UOTGHS_HSTISR; /**< \brief (Uotghs Offset: 0x0404) Host Global Interrupt Status Register */
+ WoReg UOTGHS_HSTICR; /**< \brief (Uotghs Offset: 0x0408) Host Global Interrupt Clear Register */
+ WoReg UOTGHS_HSTIFR; /**< \brief (Uotghs Offset: 0x040C) Host Global Interrupt Set Register */
+ RoReg UOTGHS_HSTIMR; /**< \brief (Uotghs Offset: 0x0410) Host Global Interrupt Mask Register */
+ WoReg UOTGHS_HSTIDR; /**< \brief (Uotghs Offset: 0x0414) Host Global Interrupt Disable Register */
+ WoReg UOTGHS_HSTIER; /**< \brief (Uotghs Offset: 0x0418) Host Global Interrupt Enable Register */
+ RwReg UOTGHS_HSTPIP; /**< \brief (Uotghs Offset: 0x0041C) Host Pipe Register */
+ RwReg UOTGHS_HSTFNUM; /**< \brief (Uotghs Offset: 0x0420) Host Frame Number Register */
+ RwReg UOTGHS_HSTADDR1; /**< \brief (Uotghs Offset: 0x0424) Host Address 1 Register */
+ RwReg UOTGHS_HSTADDR2; /**< \brief (Uotghs Offset: 0x0428) Host Address 2 Register */
+ RwReg UOTGHS_HSTADDR3; /**< \brief (Uotghs Offset: 0x042C) Host Address 3 Register */
+ RoReg Reserved10[52];
+ RwReg UOTGHS_HSTPIPCFG[10]; /**< \brief (Uotghs Offset: 0x500) Host Pipe Configuration Register (n = 0) */
+ RoReg Reserved11[2];
+ RoReg UOTGHS_HSTPIPISR[10]; /**< \brief (Uotghs Offset: 0x530) Host Pipe Status Register (n = 0) */
+ RoReg Reserved12[2];
+ WoReg UOTGHS_HSTPIPICR[10]; /**< \brief (Uotghs Offset: 0x560) Host Pipe Clear Register (n = 0) */
+ RoReg Reserved13[2];
+ WoReg UOTGHS_HSTPIPIFR[10]; /**< \brief (Uotghs Offset: 0x590) Host Pipe Set Register (n = 0) */
+ RoReg Reserved14[2];
+ RoReg UOTGHS_HSTPIPIMR[10]; /**< \brief (Uotghs Offset: 0x5C0) Host Pipe Mask Register (n = 0) */
+ RoReg Reserved15[2];
+ WoReg UOTGHS_HSTPIPIER[10]; /**< \brief (Uotghs Offset: 0x5F0) Host Pipe Enable Register (n = 0) */
+ RoReg Reserved16[2];
+ WoReg UOTGHS_HSTPIPIDR[10]; /**< \brief (Uotghs Offset: 0x620) Host Pipe Disable Register (n = 0) */
+ RoReg Reserved17[2];
+ RwReg UOTGHS_HSTPIPINRQ[10]; /**< \brief (Uotghs Offset: 0x650) Host Pipe IN Request Register (n = 0) */
+ RoReg Reserved18[2];
+ RwReg UOTGHS_HSTPIPERR[10]; /**< \brief (Uotghs Offset: 0x680) Host Pipe Error Register (n = 0) */
+ RoReg Reserved19[26];
+ UotghsHstdma UOTGHS_HSTDMA[UOTGHSHSTDMA_NUMBER]; /**< \brief (Uotghs Offset: 0x710) n = 1 .. 7 */
+ RoReg Reserved20[32];
+ RwReg UOTGHS_CTRL; /**< \brief (Uotghs Offset: 0x0800) General Control Register */
+ RoReg UOTGHS_SR; /**< \brief (Uotghs Offset: 0x0804) General Status Register */
+ WoReg UOTGHS_SCR; /**< \brief (Uotghs Offset: 0x0808) General Status Clear Register */
+ WoReg UOTGHS_SFR; /**< \brief (Uotghs Offset: 0x080C) General Status Set Register */
+ RoReg Reserved21[7];
+ RoReg UOTGHS_FSM; /**< \brief (Uotghs Offset: 0x082C) General Finite State Machine Register */
+} Uotghs;
+#endif /* __ASSEMBLY__ */
+/* -------- UOTGHS_DEVCTRL : (UOTGHS Offset: 0x0000) Device General Control Register -------- */
+#define UOTGHS_DEVCTRL_UADD_Pos 0
+#define UOTGHS_DEVCTRL_UADD_Msk (0x7fu << UOTGHS_DEVCTRL_UADD_Pos) /**< \brief (UOTGHS_DEVCTRL) USB Address */
+#define UOTGHS_DEVCTRL_UADD(value) ((UOTGHS_DEVCTRL_UADD_Msk & ((value) << UOTGHS_DEVCTRL_UADD_Pos)))
+#define UOTGHS_DEVCTRL_ADDEN (0x1u << 7) /**< \brief (UOTGHS_DEVCTRL) Address Enable */
+#define UOTGHS_DEVCTRL_DETACH (0x1u << 8) /**< \brief (UOTGHS_DEVCTRL) Detach */
+#define UOTGHS_DEVCTRL_RMWKUP (0x1u << 9) /**< \brief (UOTGHS_DEVCTRL) Remote Wake-Up */
+#define UOTGHS_DEVCTRL_SPDCONF_Pos 10
+#define UOTGHS_DEVCTRL_SPDCONF_Msk (0x3u << UOTGHS_DEVCTRL_SPDCONF_Pos) /**< \brief (UOTGHS_DEVCTRL) Mode Configuration */
+#define UOTGHS_DEVCTRL_SPDCONF_NORMAL (0x0u << 10) /**< \brief (UOTGHS_DEVCTRL) The peripheral starts in full-speed mode and performs a high-speed reset to switch to the high-speed mode if the host is high-speed capable. */
+#define UOTGHS_DEVCTRL_SPDCONF_LOW_POWER (0x1u << 10) /**< \brief (UOTGHS_DEVCTRL) For a better consumption, if high-speed is not needed. */
+#define UOTGHS_DEVCTRL_SPDCONF_HIGH_SPEED (0x2u << 10) /**< \brief (UOTGHS_DEVCTRL) Forced high speed. */
+#define UOTGHS_DEVCTRL_SPDCONF_FORCED_FS (0x3u << 10) /**< \brief (UOTGHS_DEVCTRL) The peripheral remains in full-speed mode whatever the host speed capability. */
+#define UOTGHS_DEVCTRL_LS (0x1u << 12) /**< \brief (UOTGHS_DEVCTRL) Low-Speed Mode Force */
+#define UOTGHS_DEVCTRL_TSTJ (0x1u << 13) /**< \brief (UOTGHS_DEVCTRL) Test mode J */
+#define UOTGHS_DEVCTRL_TSTK (0x1u << 14) /**< \brief (UOTGHS_DEVCTRL) Test mode K */
+#define UOTGHS_DEVCTRL_TSTPCKT (0x1u << 15) /**< \brief (UOTGHS_DEVCTRL) Test packet mode */
+#define UOTGHS_DEVCTRL_OPMODE2 (0x1u << 16) /**< \brief (UOTGHS_DEVCTRL) Specific Operational mode */
+/* -------- UOTGHS_DEVISR : (UOTGHS Offset: 0x0004) Device Global Interrupt Status Register -------- */
+#define UOTGHS_DEVISR_SUSP (0x1u << 0) /**< \brief (UOTGHS_DEVISR) Suspend Interrupt */
+#define UOTGHS_DEVISR_MSOF (0x1u << 1) /**< \brief (UOTGHS_DEVISR) Micro Start of Frame Interrupt */
+#define UOTGHS_DEVISR_SOF (0x1u << 2) /**< \brief (UOTGHS_DEVISR) Start of Frame Interrupt */
+#define UOTGHS_DEVISR_EORST (0x1u << 3) /**< \brief (UOTGHS_DEVISR) End of Reset Interrupt */
+#define UOTGHS_DEVISR_WAKEUP (0x1u << 4) /**< \brief (UOTGHS_DEVISR) Wake-Up Interrupt */
+#define UOTGHS_DEVISR_EORSM (0x1u << 5) /**< \brief (UOTGHS_DEVISR) End of Resume Interrupt */
+#define UOTGHS_DEVISR_UPRSM (0x1u << 6) /**< \brief (UOTGHS_DEVISR) Upstream Resume Interrupt */
+#define UOTGHS_DEVISR_PEP_0 (0x1u << 12) /**< \brief (UOTGHS_DEVISR) Endpoint 0 Interrupt */
+#define UOTGHS_DEVISR_PEP_1 (0x1u << 13) /**< \brief (UOTGHS_DEVISR) Endpoint 1 Interrupt */
+#define UOTGHS_DEVISR_PEP_2 (0x1u << 14) /**< \brief (UOTGHS_DEVISR) Endpoint 2 Interrupt */
+#define UOTGHS_DEVISR_PEP_3 (0x1u << 15) /**< \brief (UOTGHS_DEVISR) Endpoint 3 Interrupt */
+#define UOTGHS_DEVISR_PEP_4 (0x1u << 16) /**< \brief (UOTGHS_DEVISR) Endpoint 4 Interrupt */
+#define UOTGHS_DEVISR_PEP_5 (0x1u << 17) /**< \brief (UOTGHS_DEVISR) Endpoint 5 Interrupt */
+#define UOTGHS_DEVISR_PEP_6 (0x1u << 18) /**< \brief (UOTGHS_DEVISR) Endpoint 6 Interrupt */
+#define UOTGHS_DEVISR_PEP_7 (0x1u << 19) /**< \brief (UOTGHS_DEVISR) Endpoint 7 Interrupt */
+#define UOTGHS_DEVISR_PEP_8 (0x1u << 20) /**< \brief (UOTGHS_DEVISR) Endpoint 8 Interrupt */
+#define UOTGHS_DEVISR_PEP_9 (0x1u << 21) /**< \brief (UOTGHS_DEVISR) Endpoint 9 Interrupt */
+#define UOTGHS_DEVISR_DMA_1 (0x1u << 25) /**< \brief (UOTGHS_DEVISR) DMA Channel 1 Interrupt */
+#define UOTGHS_DEVISR_DMA_2 (0x1u << 26) /**< \brief (UOTGHS_DEVISR) DMA Channel 2 Interrupt */
+#define UOTGHS_DEVISR_DMA_3 (0x1u << 27) /**< \brief (UOTGHS_DEVISR) DMA Channel 3 Interrupt */
+#define UOTGHS_DEVISR_DMA_4 (0x1u << 28) /**< \brief (UOTGHS_DEVISR) DMA Channel 4 Interrupt */
+#define UOTGHS_DEVISR_DMA_5 (0x1u << 29) /**< \brief (UOTGHS_DEVISR) DMA Channel 5 Interrupt */
+#define UOTGHS_DEVISR_DMA_6 (0x1u << 30) /**< \brief (UOTGHS_DEVISR) DMA Channel 6 Interrupt */
+/* -------- UOTGHS_DEVICR : (UOTGHS Offset: 0x0008) Device Global Interrupt Clear Register -------- */
+#define UOTGHS_DEVICR_SUSPC (0x1u << 0) /**< \brief (UOTGHS_DEVICR) Suspend Interrupt Clear */
+#define UOTGHS_DEVICR_MSOFC (0x1u << 1) /**< \brief (UOTGHS_DEVICR) Micro Start of Frame Interrupt Clear */
+#define UOTGHS_DEVICR_SOFC (0x1u << 2) /**< \brief (UOTGHS_DEVICR) Start of Frame Interrupt Clear */
+#define UOTGHS_DEVICR_EORSTC (0x1u << 3) /**< \brief (UOTGHS_DEVICR) End of Reset Interrupt Clear */
+#define UOTGHS_DEVICR_WAKEUPC (0x1u << 4) /**< \brief (UOTGHS_DEVICR) Wake-Up Interrupt Clear */
+#define UOTGHS_DEVICR_EORSMC (0x1u << 5) /**< \brief (UOTGHS_DEVICR) End of Resume Interrupt Clear */
+#define UOTGHS_DEVICR_UPRSMC (0x1u << 6) /**< \brief (UOTGHS_DEVICR) Upstream Resume Interrupt Clear */
+/* -------- UOTGHS_DEVIFR : (UOTGHS Offset: 0x000C) Device Global Interrupt Set Register -------- */
+#define UOTGHS_DEVIFR_SUSPS (0x1u << 0) /**< \brief (UOTGHS_DEVIFR) Suspend Interrupt Set */
+#define UOTGHS_DEVIFR_MSOFS (0x1u << 1) /**< \brief (UOTGHS_DEVIFR) Micro Start of Frame Interrupt Set */
+#define UOTGHS_DEVIFR_SOFS (0x1u << 2) /**< \brief (UOTGHS_DEVIFR) Start of Frame Interrupt Set */
+#define UOTGHS_DEVIFR_EORSTS (0x1u << 3) /**< \brief (UOTGHS_DEVIFR) End of Reset Interrupt Set */
+#define UOTGHS_DEVIFR_WAKEUPS (0x1u << 4) /**< \brief (UOTGHS_DEVIFR) Wake-Up Interrupt Set */
+#define UOTGHS_DEVIFR_EORSMS (0x1u << 5) /**< \brief (UOTGHS_DEVIFR) End of Resume Interrupt Set */
+#define UOTGHS_DEVIFR_UPRSMS (0x1u << 6) /**< \brief (UOTGHS_DEVIFR) Upstream Resume Interrupt Set */
+#define UOTGHS_DEVIFR_DMA_1 (0x1u << 25) /**< \brief (UOTGHS_DEVIFR) DMA Channel 1 Interrupt Set */
+#define UOTGHS_DEVIFR_DMA_2 (0x1u << 26) /**< \brief (UOTGHS_DEVIFR) DMA Channel 2 Interrupt Set */
+#define UOTGHS_DEVIFR_DMA_3 (0x1u << 27) /**< \brief (UOTGHS_DEVIFR) DMA Channel 3 Interrupt Set */
+#define UOTGHS_DEVIFR_DMA_4 (0x1u << 28) /**< \brief (UOTGHS_DEVIFR) DMA Channel 4 Interrupt Set */
+#define UOTGHS_DEVIFR_DMA_5 (0x1u << 29) /**< \brief (UOTGHS_DEVIFR) DMA Channel 5 Interrupt Set */
+#define UOTGHS_DEVIFR_DMA_6 (0x1u << 30) /**< \brief (UOTGHS_DEVIFR) DMA Channel 6 Interrupt Set */
+/* -------- UOTGHS_DEVIMR : (UOTGHS Offset: 0x0010) Device Global Interrupt Mask Register -------- */
+#define UOTGHS_DEVIMR_SUSPE (0x1u << 0) /**< \brief (UOTGHS_DEVIMR) Suspend Interrupt Mask */
+#define UOTGHS_DEVIMR_MSOFE (0x1u << 1) /**< \brief (UOTGHS_DEVIMR) Micro Start of Frame Interrupt Mask */
+#define UOTGHS_DEVIMR_SOFE (0x1u << 2) /**< \brief (UOTGHS_DEVIMR) Start of Frame Interrupt Mask */
+#define UOTGHS_DEVIMR_EORSTE (0x1u << 3) /**< \brief (UOTGHS_DEVIMR) End of Reset Interrupt Mask */
+#define UOTGHS_DEVIMR_WAKEUPE (0x1u << 4) /**< \brief (UOTGHS_DEVIMR) Wake-Up Interrupt Mask */
+#define UOTGHS_DEVIMR_EORSME (0x1u << 5) /**< \brief (UOTGHS_DEVIMR) End of Resume Interrupt Mask */
+#define UOTGHS_DEVIMR_UPRSME (0x1u << 6) /**< \brief (UOTGHS_DEVIMR) Upstream Resume Interrupt Mask */
+#define UOTGHS_DEVIMR_PEP_0 (0x1u << 12) /**< \brief (UOTGHS_DEVIMR) Endpoint 0 Interrupt Mask */
+#define UOTGHS_DEVIMR_PEP_1 (0x1u << 13) /**< \brief (UOTGHS_DEVIMR) Endpoint 1 Interrupt Mask */
+#define UOTGHS_DEVIMR_PEP_2 (0x1u << 14) /**< \brief (UOTGHS_DEVIMR) Endpoint 2 Interrupt Mask */
+#define UOTGHS_DEVIMR_PEP_3 (0x1u << 15) /**< \brief (UOTGHS_DEVIMR) Endpoint 3 Interrupt Mask */
+#define UOTGHS_DEVIMR_PEP_4 (0x1u << 16) /**< \brief (UOTGHS_DEVIMR) Endpoint 4 Interrupt Mask */
+#define UOTGHS_DEVIMR_PEP_5 (0x1u << 17) /**< \brief (UOTGHS_DEVIMR) Endpoint 5 Interrupt Mask */
+#define UOTGHS_DEVIMR_PEP_6 (0x1u << 18) /**< \brief (UOTGHS_DEVIMR) Endpoint 6 Interrupt Mask */
+#define UOTGHS_DEVIMR_PEP_7 (0x1u << 19) /**< \brief (UOTGHS_DEVIMR) Endpoint 7 Interrupt Mask */
+#define UOTGHS_DEVIMR_PEP_8 (0x1u << 20) /**< \brief (UOTGHS_DEVIMR) Endpoint 8 Interrupt Mask */
+#define UOTGHS_DEVIMR_PEP_9 (0x1u << 21) /**< \brief (UOTGHS_DEVIMR) Endpoint 9 Interrupt Mask */
+#define UOTGHS_DEVIMR_DMA_1 (0x1u << 25) /**< \brief (UOTGHS_DEVIMR) DMA Channel 1 Interrupt Mask */
+#define UOTGHS_DEVIMR_DMA_2 (0x1u << 26) /**< \brief (UOTGHS_DEVIMR) DMA Channel 2 Interrupt Mask */
+#define UOTGHS_DEVIMR_DMA_3 (0x1u << 27) /**< \brief (UOTGHS_DEVIMR) DMA Channel 3 Interrupt Mask */
+#define UOTGHS_DEVIMR_DMA_4 (0x1u << 28) /**< \brief (UOTGHS_DEVIMR) DMA Channel 4 Interrupt Mask */
+#define UOTGHS_DEVIMR_DMA_5 (0x1u << 29) /**< \brief (UOTGHS_DEVIMR) DMA Channel 5 Interrupt Mask */
+#define UOTGHS_DEVIMR_DMA_6 (0x1u << 30) /**< \brief (UOTGHS_DEVIMR) DMA Channel 6 Interrupt Mask */
+/* -------- UOTGHS_DEVIDR : (UOTGHS Offset: 0x0014) Device Global Interrupt Disable Register -------- */
+#define UOTGHS_DEVIDR_SUSPEC (0x1u << 0) /**< \brief (UOTGHS_DEVIDR) Suspend Interrupt Disable */
+#define UOTGHS_DEVIDR_MSOFEC (0x1u << 1) /**< \brief (UOTGHS_DEVIDR) Micro Start of Frame Interrupt Disable */
+#define UOTGHS_DEVIDR_SOFEC (0x1u << 2) /**< \brief (UOTGHS_DEVIDR) Start of Frame Interrupt Disable */
+#define UOTGHS_DEVIDR_EORSTEC (0x1u << 3) /**< \brief (UOTGHS_DEVIDR) End of Reset Interrupt Disable */
+#define UOTGHS_DEVIDR_WAKEUPEC (0x1u << 4) /**< \brief (UOTGHS_DEVIDR) Wake-Up Interrupt Disable */
+#define UOTGHS_DEVIDR_EORSMEC (0x1u << 5) /**< \brief (UOTGHS_DEVIDR) End of Resume Interrupt Disable */
+#define UOTGHS_DEVIDR_UPRSMEC (0x1u << 6) /**< \brief (UOTGHS_DEVIDR) Upstream Resume Interrupt Disable */
+#define UOTGHS_DEVIDR_PEP_0 (0x1u << 12) /**< \brief (UOTGHS_DEVIDR) Endpoint 0 Interrupt Disable */
+#define UOTGHS_DEVIDR_PEP_1 (0x1u << 13) /**< \brief (UOTGHS_DEVIDR) Endpoint 1 Interrupt Disable */
+#define UOTGHS_DEVIDR_PEP_2 (0x1u << 14) /**< \brief (UOTGHS_DEVIDR) Endpoint 2 Interrupt Disable */
+#define UOTGHS_DEVIDR_PEP_3 (0x1u << 15) /**< \brief (UOTGHS_DEVIDR) Endpoint 3 Interrupt Disable */
+#define UOTGHS_DEVIDR_PEP_4 (0x1u << 16) /**< \brief (UOTGHS_DEVIDR) Endpoint 4 Interrupt Disable */
+#define UOTGHS_DEVIDR_PEP_5 (0x1u << 17) /**< \brief (UOTGHS_DEVIDR) Endpoint 5 Interrupt Disable */
+#define UOTGHS_DEVIDR_PEP_6 (0x1u << 18) /**< \brief (UOTGHS_DEVIDR) Endpoint 6 Interrupt Disable */
+#define UOTGHS_DEVIDR_PEP_7 (0x1u << 19) /**< \brief (UOTGHS_DEVIDR) Endpoint 7 Interrupt Disable */
+#define UOTGHS_DEVIDR_PEP_8 (0x1u << 20) /**< \brief (UOTGHS_DEVIDR) Endpoint 8 Interrupt Disable */
+#define UOTGHS_DEVIDR_PEP_9 (0x1u << 21) /**< \brief (UOTGHS_DEVIDR) Endpoint 9 Interrupt Disable */
+#define UOTGHS_DEVIDR_DMA_1 (0x1u << 25) /**< \brief (UOTGHS_DEVIDR) DMA Channel 1 Interrupt Disable */
+#define UOTGHS_DEVIDR_DMA_2 (0x1u << 26) /**< \brief (UOTGHS_DEVIDR) DMA Channel 2 Interrupt Disable */
+#define UOTGHS_DEVIDR_DMA_3 (0x1u << 27) /**< \brief (UOTGHS_DEVIDR) DMA Channel 3 Interrupt Disable */
+#define UOTGHS_DEVIDR_DMA_4 (0x1u << 28) /**< \brief (UOTGHS_DEVIDR) DMA Channel 4 Interrupt Disable */
+#define UOTGHS_DEVIDR_DMA_5 (0x1u << 29) /**< \brief (UOTGHS_DEVIDR) DMA Channel 5 Interrupt Disable */
+#define UOTGHS_DEVIDR_DMA_6 (0x1u << 30) /**< \brief (UOTGHS_DEVIDR) DMA Channel 6 Interrupt Disable */
+/* -------- UOTGHS_DEVIER : (UOTGHS Offset: 0x0018) Device Global Interrupt Enable Register -------- */
+#define UOTGHS_DEVIER_SUSPES (0x1u << 0) /**< \brief (UOTGHS_DEVIER) Suspend Interrupt Enable */
+#define UOTGHS_DEVIER_MSOFES (0x1u << 1) /**< \brief (UOTGHS_DEVIER) Micro Start of Frame Interrupt Enable */
+#define UOTGHS_DEVIER_SOFES (0x1u << 2) /**< \brief (UOTGHS_DEVIER) Start of Frame Interrupt Enable */
+#define UOTGHS_DEVIER_EORSTES (0x1u << 3) /**< \brief (UOTGHS_DEVIER) End of Reset Interrupt Enable */
+#define UOTGHS_DEVIER_WAKEUPES (0x1u << 4) /**< \brief (UOTGHS_DEVIER) Wake-Up Interrupt Enable */
+#define UOTGHS_DEVIER_EORSMES (0x1u << 5) /**< \brief (UOTGHS_DEVIER) End of Resume Interrupt Enable */
+#define UOTGHS_DEVIER_UPRSMES (0x1u << 6) /**< \brief (UOTGHS_DEVIER) Upstream Resume Interrupt Enable */
+#define UOTGHS_DEVIER_PEP_0 (0x1u << 12) /**< \brief (UOTGHS_DEVIER) Endpoint 0 Interrupt Enable */
+#define UOTGHS_DEVIER_PEP_1 (0x1u << 13) /**< \brief (UOTGHS_DEVIER) Endpoint 1 Interrupt Enable */
+#define UOTGHS_DEVIER_PEP_2 (0x1u << 14) /**< \brief (UOTGHS_DEVIER) Endpoint 2 Interrupt Enable */
+#define UOTGHS_DEVIER_PEP_3 (0x1u << 15) /**< \brief (UOTGHS_DEVIER) Endpoint 3 Interrupt Enable */
+#define UOTGHS_DEVIER_PEP_4 (0x1u << 16) /**< \brief (UOTGHS_DEVIER) Endpoint 4 Interrupt Enable */
+#define UOTGHS_DEVIER_PEP_5 (0x1u << 17) /**< \brief (UOTGHS_DEVIER) Endpoint 5 Interrupt Enable */
+#define UOTGHS_DEVIER_PEP_6 (0x1u << 18) /**< \brief (UOTGHS_DEVIER) Endpoint 6 Interrupt Enable */
+#define UOTGHS_DEVIER_PEP_7 (0x1u << 19) /**< \brief (UOTGHS_DEVIER) Endpoint 7 Interrupt Enable */
+#define UOTGHS_DEVIER_PEP_8 (0x1u << 20) /**< \brief (UOTGHS_DEVIER) Endpoint 8 Interrupt Enable */
+#define UOTGHS_DEVIER_PEP_9 (0x1u << 21) /**< \brief (UOTGHS_DEVIER) Endpoint 9 Interrupt Enable */
+#define UOTGHS_DEVIER_DMA_1 (0x1u << 25) /**< \brief (UOTGHS_DEVIER) DMA Channel 1 Interrupt Enable */
+#define UOTGHS_DEVIER_DMA_2 (0x1u << 26) /**< \brief (UOTGHS_DEVIER) DMA Channel 2 Interrupt Enable */
+#define UOTGHS_DEVIER_DMA_3 (0x1u << 27) /**< \brief (UOTGHS_DEVIER) DMA Channel 3 Interrupt Enable */
+#define UOTGHS_DEVIER_DMA_4 (0x1u << 28) /**< \brief (UOTGHS_DEVIER) DMA Channel 4 Interrupt Enable */
+#define UOTGHS_DEVIER_DMA_5 (0x1u << 29) /**< \brief (UOTGHS_DEVIER) DMA Channel 5 Interrupt Enable */
+#define UOTGHS_DEVIER_DMA_6 (0x1u << 30) /**< \brief (UOTGHS_DEVIER) DMA Channel 6 Interrupt Enable */
+/* -------- UOTGHS_DEVEPT : (UOTGHS Offset: 0x001C) Device Endpoint Register -------- */
+#define UOTGHS_DEVEPT_EPEN0 (0x1u << 0) /**< \brief (UOTGHS_DEVEPT) Endpoint 0 Enable */
+#define UOTGHS_DEVEPT_EPEN1 (0x1u << 1) /**< \brief (UOTGHS_DEVEPT) Endpoint 1 Enable */
+#define UOTGHS_DEVEPT_EPEN2 (0x1u << 2) /**< \brief (UOTGHS_DEVEPT) Endpoint 2 Enable */
+#define UOTGHS_DEVEPT_EPEN3 (0x1u << 3) /**< \brief (UOTGHS_DEVEPT) Endpoint 3 Enable */
+#define UOTGHS_DEVEPT_EPEN4 (0x1u << 4) /**< \brief (UOTGHS_DEVEPT) Endpoint 4 Enable */
+#define UOTGHS_DEVEPT_EPEN5 (0x1u << 5) /**< \brief (UOTGHS_DEVEPT) Endpoint 5 Enable */
+#define UOTGHS_DEVEPT_EPEN6 (0x1u << 6) /**< \brief (UOTGHS_DEVEPT) Endpoint 6 Enable */
+#define UOTGHS_DEVEPT_EPEN7 (0x1u << 7) /**< \brief (UOTGHS_DEVEPT) Endpoint 7 Enable */
+#define UOTGHS_DEVEPT_EPEN8 (0x1u << 8) /**< \brief (UOTGHS_DEVEPT) Endpoint 8 Enable */
+#define UOTGHS_DEVEPT_EPRST0 (0x1u << 16) /**< \brief (UOTGHS_DEVEPT) Endpoint 0 Reset */
+#define UOTGHS_DEVEPT_EPRST1 (0x1u << 17) /**< \brief (UOTGHS_DEVEPT) Endpoint 1 Reset */
+#define UOTGHS_DEVEPT_EPRST2 (0x1u << 18) /**< \brief (UOTGHS_DEVEPT) Endpoint 2 Reset */
+#define UOTGHS_DEVEPT_EPRST3 (0x1u << 19) /**< \brief (UOTGHS_DEVEPT) Endpoint 3 Reset */
+#define UOTGHS_DEVEPT_EPRST4 (0x1u << 20) /**< \brief (UOTGHS_DEVEPT) Endpoint 4 Reset */
+#define UOTGHS_DEVEPT_EPRST5 (0x1u << 21) /**< \brief (UOTGHS_DEVEPT) Endpoint 5 Reset */
+#define UOTGHS_DEVEPT_EPRST6 (0x1u << 22) /**< \brief (UOTGHS_DEVEPT) Endpoint 6 Reset */
+#define UOTGHS_DEVEPT_EPRST7 (0x1u << 23) /**< \brief (UOTGHS_DEVEPT) Endpoint 7 Reset */
+#define UOTGHS_DEVEPT_EPRST8 (0x1u << 24) /**< \brief (UOTGHS_DEVEPT) Endpoint 8 Reset */
+/* -------- UOTGHS_DEVFNUM : (UOTGHS Offset: 0x0020) Device Frame Number Register -------- */
+#define UOTGHS_DEVFNUM_MFNUM_Pos 0
+#define UOTGHS_DEVFNUM_MFNUM_Msk (0x7u << UOTGHS_DEVFNUM_MFNUM_Pos) /**< \brief (UOTGHS_DEVFNUM) Micro Frame Number */
+#define UOTGHS_DEVFNUM_FNUM_Pos 3
+#define UOTGHS_DEVFNUM_FNUM_Msk (0x7ffu << UOTGHS_DEVFNUM_FNUM_Pos) /**< \brief (UOTGHS_DEVFNUM) Frame Number */
+#define UOTGHS_DEVFNUM_FNCERR (0x1u << 15) /**< \brief (UOTGHS_DEVFNUM) Frame Number CRC Error */
+/* -------- UOTGHS_DEVEPTCFG[10] : (UOTGHS Offset: 0x100) Device Endpoint Configuration Register (n = 0) -------- */
+#define UOTGHS_DEVEPTCFG_ALLOC (0x1u << 1) /**< \brief (UOTGHS_DEVEPTCFG[10]) Endpoint Memory Allocate */
+#define UOTGHS_DEVEPTCFG_EPBK_Pos 2
+#define UOTGHS_DEVEPTCFG_EPBK_Msk (0x3u << UOTGHS_DEVEPTCFG_EPBK_Pos) /**< \brief (UOTGHS_DEVEPTCFG[10]) Endpoint Banks */
+#define UOTGHS_DEVEPTCFG_EPBK_1_BANK (0x0u << 2) /**< \brief (UOTGHS_DEVEPTCFG[10]) Single-bank endpoint */
+#define UOTGHS_DEVEPTCFG_EPBK_2_BANK (0x1u << 2) /**< \brief (UOTGHS_DEVEPTCFG[10]) Double-bank endpoint */
+#define UOTGHS_DEVEPTCFG_EPBK_3_BANK (0x2u << 2) /**< \brief (UOTGHS_DEVEPTCFG[10]) Triple-bank endpoint */
+#define UOTGHS_DEVEPTCFG_EPSIZE_Pos 4
+#define UOTGHS_DEVEPTCFG_EPSIZE_Msk (0x7u << UOTGHS_DEVEPTCFG_EPSIZE_Pos) /**< \brief (UOTGHS_DEVEPTCFG[10]) Endpoint Size */
+#define UOTGHS_DEVEPTCFG_EPSIZE_8_BYTE (0x0u << 4) /**< \brief (UOTGHS_DEVEPTCFG[10]) 8 bytes */
+#define UOTGHS_DEVEPTCFG_EPSIZE_16_BYTE (0x1u << 4) /**< \brief (UOTGHS_DEVEPTCFG[10]) 16 bytes */
+#define UOTGHS_DEVEPTCFG_EPSIZE_32_BYTE (0x2u << 4) /**< \brief (UOTGHS_DEVEPTCFG[10]) 32 bytes */
+#define UOTGHS_DEVEPTCFG_EPSIZE_64_BYTE (0x3u << 4) /**< \brief (UOTGHS_DEVEPTCFG[10]) 64 bytes */
+#define UOTGHS_DEVEPTCFG_EPSIZE_128_BYTE (0x4u << 4) /**< \brief (UOTGHS_DEVEPTCFG[10]) 128 bytes */
+#define UOTGHS_DEVEPTCFG_EPSIZE_256_BYTE (0x5u << 4) /**< \brief (UOTGHS_DEVEPTCFG[10]) 256 bytes */
+#define UOTGHS_DEVEPTCFG_EPSIZE_512_BYTE (0x6u << 4) /**< \brief (UOTGHS_DEVEPTCFG[10]) 512 bytes */
+#define UOTGHS_DEVEPTCFG_EPSIZE_1024_BYTE (0x7u << 4) /**< \brief (UOTGHS_DEVEPTCFG[10]) 1024 bytes */
+#define UOTGHS_DEVEPTCFG_EPDIR (0x1u << 8) /**< \brief (UOTGHS_DEVEPTCFG[10]) Endpoint Direction */
+#define UOTGHS_DEVEPTCFG_EPDIR_OUT (0x0u << 8) /**< \brief (UOTGHS_DEVEPTCFG[10]) The endpoint direction is OUT. */
+#define UOTGHS_DEVEPTCFG_EPDIR_IN (0x1u << 8) /**< \brief (UOTGHS_DEVEPTCFG[10]) The endpoint direction is IN (nor for control endpoints). */
+#define UOTGHS_DEVEPTCFG_AUTOSW (0x1u << 9) /**< \brief (UOTGHS_DEVEPTCFG[10]) Automatic Switch */
+#define UOTGHS_DEVEPTCFG_EPTYPE_Pos 11
+#define UOTGHS_DEVEPTCFG_EPTYPE_Msk (0x3u << UOTGHS_DEVEPTCFG_EPTYPE_Pos) /**< \brief (UOTGHS_DEVEPTCFG[10]) Endpoint Type */
+#define UOTGHS_DEVEPTCFG_EPTYPE_CTRL (0x0u << 11) /**< \brief (UOTGHS_DEVEPTCFG[10]) Control */
+#define UOTGHS_DEVEPTCFG_EPTYPE_ISO (0x1u << 11) /**< \brief (UOTGHS_DEVEPTCFG[10]) Isochronous */
+#define UOTGHS_DEVEPTCFG_EPTYPE_BLK (0x2u << 11) /**< \brief (UOTGHS_DEVEPTCFG[10]) Bulk */
+#define UOTGHS_DEVEPTCFG_EPTYPE_INTRPT (0x3u << 11) /**< \brief (UOTGHS_DEVEPTCFG[10]) Interrupt */
+#define UOTGHS_DEVEPTCFG_NBTRANS_Pos 13
+#define UOTGHS_DEVEPTCFG_NBTRANS_Msk (0x3u << UOTGHS_DEVEPTCFG_NBTRANS_Pos) /**< \brief (UOTGHS_DEVEPTCFG[10]) Number of transaction per microframe for isochronous endpoint */
+#define UOTGHS_DEVEPTCFG_NBTRANS_0_TRANS (0x0u << 13) /**< \brief (UOTGHS_DEVEPTCFG[10]) reserved to endpoint that does not have the high-bandwidth isochronous capability. */
+#define UOTGHS_DEVEPTCFG_NBTRANS_1_TRANS (0x1u << 13) /**< \brief (UOTGHS_DEVEPTCFG[10]) default value: one transaction per micro-frame. */
+#define UOTGHS_DEVEPTCFG_NBTRANS_2_TRANS (0x2u << 13) /**< \brief (UOTGHS_DEVEPTCFG[10]) 2 transactions per micro-frame. This endpoint should be configured as double-bank. */
+#define UOTGHS_DEVEPTCFG_NBTRANS_3_TRANS (0x3u << 13) /**< \brief (UOTGHS_DEVEPTCFG[10]) 3 transactions per micro-frame. This endpoint should be configured as triple-bank. */
+/* -------- UOTGHS_DEVEPTISR[10] : (UOTGHS Offset: 0x130) Device Endpoint Status Register (n = 0) -------- */
+#define UOTGHS_DEVEPTISR_TXINI (0x1u << 0) /**< \brief (UOTGHS_DEVEPTISR[10]) Transmitted IN Data Interrupt */
+#define UOTGHS_DEVEPTISR_RXOUTI (0x1u << 1) /**< \brief (UOTGHS_DEVEPTISR[10]) Received OUT Data Interrupt */
+#define UOTGHS_DEVEPTISR_RXSTPI (0x1u << 2) /**< \brief (UOTGHS_DEVEPTISR[10]) Received SETUP Interrupt */
+#define UOTGHS_DEVEPTISR_UNDERFI (0x1u << 2) /**< \brief (UOTGHS_DEVEPTISR[10]) Underflow Interrupt */
+#define UOTGHS_DEVEPTISR_NAKOUTI (0x1u << 3) /**< \brief (UOTGHS_DEVEPTISR[10]) NAKed OUT Interrupt */
+#define UOTGHS_DEVEPTISR_HBISOINERRI (0x1u << 3) /**< \brief (UOTGHS_DEVEPTISR[10]) High bandwidth isochronous IN Underflow Error Interrupt */
+#define UOTGHS_DEVEPTISR_NAKINI (0x1u << 4) /**< \brief (UOTGHS_DEVEPTISR[10]) NAKed IN Interrupt */
+#define UOTGHS_DEVEPTISR_HBISOFLUSHI (0x1u << 4) /**< \brief (UOTGHS_DEVEPTISR[10]) High Bandwidth Isochronous IN Flush Interrupt */
+#define UOTGHS_DEVEPTISR_OVERFI (0x1u << 5) /**< \brief (UOTGHS_DEVEPTISR[10]) Overflow Interrupt */
+#define UOTGHS_DEVEPTISR_STALLEDI (0x1u << 6) /**< \brief (UOTGHS_DEVEPTISR[10]) STALLed Interrupt */
+#define UOTGHS_DEVEPTISR_CRCERRI (0x1u << 6) /**< \brief (UOTGHS_DEVEPTISR[10]) CRC Error Interrupt */
+#define UOTGHS_DEVEPTISR_SHORTPACKET (0x1u << 7) /**< \brief (UOTGHS_DEVEPTISR[10]) Short Packet Interrupt */
+#define UOTGHS_DEVEPTISR_DTSEQ_Pos 8
+#define UOTGHS_DEVEPTISR_DTSEQ_Msk (0x3u << UOTGHS_DEVEPTISR_DTSEQ_Pos) /**< \brief (UOTGHS_DEVEPTISR[10]) Data Toggle Sequence */
+#define UOTGHS_DEVEPTISR_DTSEQ_DATA0 (0x0u << 8) /**< \brief (UOTGHS_DEVEPTISR[10]) Data0 toggle sequence */
+#define UOTGHS_DEVEPTISR_DTSEQ_DATA1 (0x1u << 8) /**< \brief (UOTGHS_DEVEPTISR[10]) Data1 toggle sequence */
+#define UOTGHS_DEVEPTISR_DTSEQ_DATA2 (0x2u << 8) /**< \brief (UOTGHS_DEVEPTISR[10]) Data2 toggle sequence (for high-bandwidth isochronous endpoint) */
+#define UOTGHS_DEVEPTISR_DTSEQ_MDATA (0x3u << 8) /**< \brief (UOTGHS_DEVEPTISR[10]) MData toggle sequence (for high-bandwidth isochronous endpoint) */
+#define UOTGHS_DEVEPTISR_ERRORTRANS (0x1u << 10) /**< \brief (UOTGHS_DEVEPTISR[10]) High-bandwidth isochronous OUT endpoint transaction error Interrupt */
+#define UOTGHS_DEVEPTISR_NBUSYBK_Pos 12
+#define UOTGHS_DEVEPTISR_NBUSYBK_Msk (0x3u << UOTGHS_DEVEPTISR_NBUSYBK_Pos) /**< \brief (UOTGHS_DEVEPTISR[10]) Number of Busy Banks */
+#define UOTGHS_DEVEPTISR_NBUSYBK_0_BUSY (0x0u << 12) /**< \brief (UOTGHS_DEVEPTISR[10]) 0 busy bank (all banks free) */
+#define UOTGHS_DEVEPTISR_NBUSYBK_1_BUSY (0x1u << 12) /**< \brief (UOTGHS_DEVEPTISR[10]) 1 busy bank */
+#define UOTGHS_DEVEPTISR_NBUSYBK_2_BUSY (0x2u << 12) /**< \brief (UOTGHS_DEVEPTISR[10]) 2 busy banks */
+#define UOTGHS_DEVEPTISR_NBUSYBK_3_BUSY (0x3u << 12) /**< \brief (UOTGHS_DEVEPTISR[10]) 3 busy banks */
+#define UOTGHS_DEVEPTISR_CURRBK_Pos 14
+#define UOTGHS_DEVEPTISR_CURRBK_Msk (0x3u << UOTGHS_DEVEPTISR_CURRBK_Pos) /**< \brief (UOTGHS_DEVEPTISR[10]) Current Bank */
+#define UOTGHS_DEVEPTISR_CURRBK_BANK0 (0x0u << 14) /**< \brief (UOTGHS_DEVEPTISR[10]) Current bank is bank0 */
+#define UOTGHS_DEVEPTISR_CURRBK_BANK1 (0x1u << 14) /**< \brief (UOTGHS_DEVEPTISR[10]) Current bank is bank1 */
+#define UOTGHS_DEVEPTISR_CURRBK_BANK2 (0x2u << 14) /**< \brief (UOTGHS_DEVEPTISR[10]) Current bank is bank2 */
+#define UOTGHS_DEVEPTISR_RWALL (0x1u << 16) /**< \brief (UOTGHS_DEVEPTISR[10]) Read-write Allowed */
+#define UOTGHS_DEVEPTISR_CTRLDIR (0x1u << 17) /**< \brief (UOTGHS_DEVEPTISR[10]) Control Direction */
+#define UOTGHS_DEVEPTISR_CFGOK (0x1u << 18) /**< \brief (UOTGHS_DEVEPTISR[10]) Configuration OK Status */
+#define UOTGHS_DEVEPTISR_BYCT_Pos 20
+#define UOTGHS_DEVEPTISR_BYCT_Msk (0x7ffu << UOTGHS_DEVEPTISR_BYCT_Pos) /**< \brief (UOTGHS_DEVEPTISR[10]) Byte Count */
+/* -------- UOTGHS_DEVEPTICR[10] : (UOTGHS Offset: 0x160) Device Endpoint Clear Register (n = 0) -------- */
+#define UOTGHS_DEVEPTICR_TXINIC (0x1u << 0) /**< \brief (UOTGHS_DEVEPTICR[10]) Transmitted IN Data Interrupt Clear */
+#define UOTGHS_DEVEPTICR_RXOUTIC (0x1u << 1) /**< \brief (UOTGHS_DEVEPTICR[10]) Received OUT Data Interrupt Clear */
+#define UOTGHS_DEVEPTICR_RXSTPIC (0x1u << 2) /**< \brief (UOTGHS_DEVEPTICR[10]) Received SETUP Interrupt Clear */
+#define UOTGHS_DEVEPTICR_UNDERFIC (0x1u << 2) /**< \brief (UOTGHS_DEVEPTICR[10]) Underflow Interrupt Clear */
+#define UOTGHS_DEVEPTICR_NAKOUTIC (0x1u << 3) /**< \brief (UOTGHS_DEVEPTICR[10]) NAKed OUT Interrupt Clear */
+#define UOTGHS_DEVEPTICR_HBISOINERRIC (0x1u << 3) /**< \brief (UOTGHS_DEVEPTICR[10]) High bandwidth isochronous IN Underflow Error Interrupt Clear */
+#define UOTGHS_DEVEPTICR_NAKINIC (0x1u << 4) /**< \brief (UOTGHS_DEVEPTICR[10]) NAKed IN Interrupt Clear */
+#define UOTGHS_DEVEPTICR_HBISOFLUSHIC (0x1u << 4) /**< \brief (UOTGHS_DEVEPTICR[10]) High Bandwidth Isochronous IN Flush Interrupt Clear */
+#define UOTGHS_DEVEPTICR_OVERFIC (0x1u << 5) /**< \brief (UOTGHS_DEVEPTICR[10]) Overflow Interrupt Clear */
+#define UOTGHS_DEVEPTICR_STALLEDIC (0x1u << 6) /**< \brief (UOTGHS_DEVEPTICR[10]) STALLed Interrupt Clear */
+#define UOTGHS_DEVEPTICR_CRCERRIC (0x1u << 6) /**< \brief (UOTGHS_DEVEPTICR[10]) CRC Error Interrupt Clear */
+#define UOTGHS_DEVEPTICR_SHORTPACKETC (0x1u << 7) /**< \brief (UOTGHS_DEVEPTICR[10]) Short Packet Interrupt Clear */
+/* -------- UOTGHS_DEVEPTIFR[10] : (UOTGHS Offset: 0x190) Device Endpoint Set Register (n = 0) -------- */
+#define UOTGHS_DEVEPTIFR_TXINIS (0x1u << 0) /**< \brief (UOTGHS_DEVEPTIFR[10]) Transmitted IN Data Interrupt Set */
+#define UOTGHS_DEVEPTIFR_RXOUTIS (0x1u << 1) /**< \brief (UOTGHS_DEVEPTIFR[10]) Received OUT Data Interrupt Set */
+#define UOTGHS_DEVEPTIFR_RXSTPIS (0x1u << 2) /**< \brief (UOTGHS_DEVEPTIFR[10]) Received SETUP Interrupt Set */
+#define UOTGHS_DEVEPTIFR_UNDERFIS (0x1u << 2) /**< \brief (UOTGHS_DEVEPTIFR[10]) Underflow Interrupt Set */
+#define UOTGHS_DEVEPTIFR_NAKOUTIS (0x1u << 3) /**< \brief (UOTGHS_DEVEPTIFR[10]) NAKed OUT Interrupt Set */
+#define UOTGHS_DEVEPTIFR_HBISOINERRIS (0x1u << 3) /**< \brief (UOTGHS_DEVEPTIFR[10]) High bandwidth isochronous IN Underflow Error Interrupt Set */
+#define UOTGHS_DEVEPTIFR_NAKINIS (0x1u << 4) /**< \brief (UOTGHS_DEVEPTIFR[10]) NAKed IN Interrupt Set */
+#define UOTGHS_DEVEPTIFR_HBISOFLUSHIS (0x1u << 4) /**< \brief (UOTGHS_DEVEPTIFR[10]) High Bandwidth Isochronous IN Flush Interrupt Set */
+#define UOTGHS_DEVEPTIFR_OVERFIS (0x1u << 5) /**< \brief (UOTGHS_DEVEPTIFR[10]) Overflow Interrupt Set */
+#define UOTGHS_DEVEPTIFR_STALLEDIS (0x1u << 6) /**< \brief (UOTGHS_DEVEPTIFR[10]) STALLed Interrupt Set */
+#define UOTGHS_DEVEPTIFR_CRCERRIS (0x1u << 6) /**< \brief (UOTGHS_DEVEPTIFR[10]) CRC Error Interrupt Set */
+#define UOTGHS_DEVEPTIFR_SHORTPACKETS (0x1u << 7) /**< \brief (UOTGHS_DEVEPTIFR[10]) Short Packet Interrupt Set */
+#define UOTGHS_DEVEPTIFR_NBUSYBKS (0x1u << 12) /**< \brief (UOTGHS_DEVEPTIFR[10]) Number of Busy Banks Interrupt Set */
+/* -------- UOTGHS_DEVEPTIMR[10] : (UOTGHS Offset: 0x1C0) Device Endpoint Mask Register (n = 0) -------- */
+#define UOTGHS_DEVEPTIMR_TXINE (0x1u << 0) /**< \brief (UOTGHS_DEVEPTIMR[10]) Transmitted IN Data Interrupt */
+#define UOTGHS_DEVEPTIMR_RXOUTE (0x1u << 1) /**< \brief (UOTGHS_DEVEPTIMR[10]) Received OUT Data Interrupt */
+#define UOTGHS_DEVEPTIMR_RXSTPE (0x1u << 2) /**< \brief (UOTGHS_DEVEPTIMR[10]) Received SETUP Interrupt */
+#define UOTGHS_DEVEPTIMR_UNDERFE (0x1u << 2) /**< \brief (UOTGHS_DEVEPTIMR[10]) Underflow Interrupt */
+#define UOTGHS_DEVEPTIMR_NAKOUTE (0x1u << 3) /**< \brief (UOTGHS_DEVEPTIMR[10]) NAKed OUT Interrupt */
+#define UOTGHS_DEVEPTIMR_HBISOINERRE (0x1u << 3) /**< \brief (UOTGHS_DEVEPTIMR[10]) High Bandwidth Isochronous IN Error Interrupt */
+#define UOTGHS_DEVEPTIMR_NAKINE (0x1u << 4) /**< \brief (UOTGHS_DEVEPTIMR[10]) NAKed IN Interrupt */
+#define UOTGHS_DEVEPTIMR_HBISOFLUSHE (0x1u << 4) /**< \brief (UOTGHS_DEVEPTIMR[10]) High Bandwidth Isochronous IN Flush Interrupt */
+#define UOTGHS_DEVEPTIMR_OVERFE (0x1u << 5) /**< \brief (UOTGHS_DEVEPTIMR[10]) Overflow Interrupt */
+#define UOTGHS_DEVEPTIMR_STALLEDE (0x1u << 6) /**< \brief (UOTGHS_DEVEPTIMR[10]) STALLed Interrupt */
+#define UOTGHS_DEVEPTIMR_CRCERRE (0x1u << 6) /**< \brief (UOTGHS_DEVEPTIMR[10]) CRC Error Interrupt */
+#define UOTGHS_DEVEPTIMR_SHORTPACKETE (0x1u << 7) /**< \brief (UOTGHS_DEVEPTIMR[10]) Short Packet Interrupt */
+#define UOTGHS_DEVEPTIMR_MDATAE (0x1u << 8) /**< \brief (UOTGHS_DEVEPTIMR[10]) MData Interrupt */
+#define UOTGHS_DEVEPTIMR_DATAXE (0x1u << 9) /**< \brief (UOTGHS_DEVEPTIMR[10]) DataX Interrupt */
+#define UOTGHS_DEVEPTIMR_ERRORTRANSE (0x1u << 10) /**< \brief (UOTGHS_DEVEPTIMR[10]) Transaction Error Interrupt */
+#define UOTGHS_DEVEPTIMR_NBUSYBKE (0x1u << 12) /**< \brief (UOTGHS_DEVEPTIMR[10]) Number of Busy Banks Interrupt */
+#define UOTGHS_DEVEPTIMR_KILLBK (0x1u << 13) /**< \brief (UOTGHS_DEVEPTIMR[10]) Kill IN Bank */
+#define UOTGHS_DEVEPTIMR_FIFOCON (0x1u << 14) /**< \brief (UOTGHS_DEVEPTIMR[10]) FIFO Control */
+#define UOTGHS_DEVEPTIMR_EPDISHDMA (0x1u << 16) /**< \brief (UOTGHS_DEVEPTIMR[10]) Endpoint Interrupts Disable HDMA Request */
+#define UOTGHS_DEVEPTIMR_NYETDIS (0x1u << 17) /**< \brief (UOTGHS_DEVEPTIMR[10]) NYET Token Disable */
+#define UOTGHS_DEVEPTIMR_RSTDT (0x1u << 18) /**< \brief (UOTGHS_DEVEPTIMR[10]) Reset Data Toggle */
+#define UOTGHS_DEVEPTIMR_STALLRQ (0x1u << 19) /**< \brief (UOTGHS_DEVEPTIMR[10]) STALL Request */
+/* -------- UOTGHS_DEVEPTIER[10] : (UOTGHS Offset: 0x1F0) Device Endpoint Enable Register (n = 0) -------- */
+#define UOTGHS_DEVEPTIER_TXINES (0x1u << 0) /**< \brief (UOTGHS_DEVEPTIER[10]) Transmitted IN Data Interrupt Enable */
+#define UOTGHS_DEVEPTIER_RXOUTES (0x1u << 1) /**< \brief (UOTGHS_DEVEPTIER[10]) Received OUT Data Interrupt Enable */
+#define UOTGHS_DEVEPTIER_RXSTPES (0x1u << 2) /**< \brief (UOTGHS_DEVEPTIER[10]) Received SETUP Interrupt Enable */
+#define UOTGHS_DEVEPTIER_UNDERFES (0x1u << 2) /**< \brief (UOTGHS_DEVEPTIER[10]) Underflow Interrupt Enable */
+#define UOTGHS_DEVEPTIER_NAKOUTES (0x1u << 3) /**< \brief (UOTGHS_DEVEPTIER[10]) NAKed OUT Interrupt Enable */
+#define UOTGHS_DEVEPTIER_HBISOINERRES (0x1u << 3) /**< \brief (UOTGHS_DEVEPTIER[10]) High Bandwidth Isochronous IN Error Interrupt Enable */
+#define UOTGHS_DEVEPTIER_NAKINES (0x1u << 4) /**< \brief (UOTGHS_DEVEPTIER[10]) NAKed IN Interrupt Enable */
+#define UOTGHS_DEVEPTIER_HBISOFLUSHES (0x1u << 4) /**< \brief (UOTGHS_DEVEPTIER[10]) High Bandwidth Isochronous IN Flush Interrupt Enable */
+#define UOTGHS_DEVEPTIER_OVERFES (0x1u << 5) /**< \brief (UOTGHS_DEVEPTIER[10]) Overflow Interrupt Enable */
+#define UOTGHS_DEVEPTIER_STALLEDES (0x1u << 6) /**< \brief (UOTGHS_DEVEPTIER[10]) STALLed Interrupt Enable */
+#define UOTGHS_DEVEPTIER_CRCERRES (0x1u << 6) /**< \brief (UOTGHS_DEVEPTIER[10]) CRC Error Interrupt Enable */
+#define UOTGHS_DEVEPTIER_SHORTPACKETES (0x1u << 7) /**< \brief (UOTGHS_DEVEPTIER[10]) Short Packet Interrupt Enable */
+#define UOTGHS_DEVEPTIER_MDATAES (0x1u << 8) /**< \brief (UOTGHS_DEVEPTIER[10]) MData Interrupt Enable */
+#define UOTGHS_DEVEPTIER_DATAXES (0x1u << 9) /**< \brief (UOTGHS_DEVEPTIER[10]) DataX Interrupt Enable */
+#define UOTGHS_DEVEPTIER_ERRORTRANSES (0x1u << 10) /**< \brief (UOTGHS_DEVEPTIER[10]) Transaction Error Interrupt Enable */
+#define UOTGHS_DEVEPTIER_NBUSYBKES (0x1u << 12) /**< \brief (UOTGHS_DEVEPTIER[10]) Number of Busy Banks Interrupt Enable */
+#define UOTGHS_DEVEPTIER_KILLBKS (0x1u << 13) /**< \brief (UOTGHS_DEVEPTIER[10]) Kill IN Bank */
+#define UOTGHS_DEVEPTIER_EPDISHDMAS (0x1u << 16) /**< \brief (UOTGHS_DEVEPTIER[10]) Endpoint Interrupts Disable HDMA Request Enable */
+#define UOTGHS_DEVEPTIER_NYETDISS (0x1u << 17) /**< \brief (UOTGHS_DEVEPTIER[10]) NYET Token Disable Enable */
+#define UOTGHS_DEVEPTIER_RSTDTS (0x1u << 18) /**< \brief (UOTGHS_DEVEPTIER[10]) Reset Data Toggle Enable */
+#define UOTGHS_DEVEPTIER_STALLRQS (0x1u << 19) /**< \brief (UOTGHS_DEVEPTIER[10]) STALL Request Enable */
+/* -------- UOTGHS_DEVEPTIDR[10] : (UOTGHS Offset: 0x220) Device Endpoint Disable Register (n = 0) -------- */
+#define UOTGHS_DEVEPTIDR_TXINEC (0x1u << 0) /**< \brief (UOTGHS_DEVEPTIDR[10]) Transmitted IN Interrupt Clear */
+#define UOTGHS_DEVEPTIDR_RXOUTEC (0x1u << 1) /**< \brief (UOTGHS_DEVEPTIDR[10]) Received OUT Data Interrupt Clear */
+#define UOTGHS_DEVEPTIDR_RXSTPEC (0x1u << 2) /**< \brief (UOTGHS_DEVEPTIDR[10]) Received SETUP Interrupt Clear */
+#define UOTGHS_DEVEPTIDR_UNDERFEC (0x1u << 2) /**< \brief (UOTGHS_DEVEPTIDR[10]) Underflow Interrupt Clear */
+#define UOTGHS_DEVEPTIDR_NAKOUTEC (0x1u << 3) /**< \brief (UOTGHS_DEVEPTIDR[10]) NAKed OUT Interrupt Clear */
+#define UOTGHS_DEVEPTIDR_HBISOINERREC (0x1u << 3) /**< \brief (UOTGHS_DEVEPTIDR[10]) High Bandwidth Isochronous IN Error Interrupt Clear */
+#define UOTGHS_DEVEPTIDR_NAKINEC (0x1u << 4) /**< \brief (UOTGHS_DEVEPTIDR[10]) NAKed IN Interrupt Clear */
+#define UOTGHS_DEVEPTIDR_HBISOFLUSHEC (0x1u << 4) /**< \brief (UOTGHS_DEVEPTIDR[10]) High Bandwidth Isochronous IN Flush Interrupt Clear */
+#define UOTGHS_DEVEPTIDR_OVERFEC (0x1u << 5) /**< \brief (UOTGHS_DEVEPTIDR[10]) Overflow Interrupt Clear */
+#define UOTGHS_DEVEPTIDR_STALLEDEC (0x1u << 6) /**< \brief (UOTGHS_DEVEPTIDR[10]) STALLed Interrupt Clear */
+#define UOTGHS_DEVEPTIDR_CRCERREC (0x1u << 6) /**< \brief (UOTGHS_DEVEPTIDR[10]) CRC Error Interrupt Clear */
+#define UOTGHS_DEVEPTIDR_SHORTPACKETEC (0x1u << 7) /**< \brief (UOTGHS_DEVEPTIDR[10]) Shortpacket Interrupt Clear */
+#define UOTGHS_DEVEPTIDR_MDATEC (0x1u << 8) /**< \brief (UOTGHS_DEVEPTIDR[10]) MData Interrupt Clear */
+#define UOTGHS_DEVEPTIDR_DATAXEC (0x1u << 9) /**< \brief (UOTGHS_DEVEPTIDR[10]) DataX Interrupt Clear */
+#define UOTGHS_DEVEPTIDR_ERRORTRANSEC (0x1u << 10) /**< \brief (UOTGHS_DEVEPTIDR[10]) Transaction Error Interrupt Clear */
+#define UOTGHS_DEVEPTIDR_NBUSYBKEC (0x1u << 12) /**< \brief (UOTGHS_DEVEPTIDR[10]) Number of Busy Banks Interrupt Clear */
+#define UOTGHS_DEVEPTIDR_FIFOCONC (0x1u << 14) /**< \brief (UOTGHS_DEVEPTIDR[10]) FIFO Control Clear */
+#define UOTGHS_DEVEPTIDR_EPDISHDMAC (0x1u << 16) /**< \brief (UOTGHS_DEVEPTIDR[10]) Endpoint Interrupts Disable HDMA Request Clear */
+#define UOTGHS_DEVEPTIDR_NYETDISC (0x1u << 17) /**< \brief (UOTGHS_DEVEPTIDR[10]) NYET Token Disable Clear */
+#define UOTGHS_DEVEPTIDR_STALLRQC (0x1u << 19) /**< \brief (UOTGHS_DEVEPTIDR[10]) STALL Request Clear */
+/* -------- UOTGHS_DEVDMANXTDSC : (UOTGHS Offset: N/A) Device DMA Channel Next Descriptor Address Register -------- */
+#define UOTGHS_DEVDMANXTDSC_NXT_DSC_ADD_Pos 0
+#define UOTGHS_DEVDMANXTDSC_NXT_DSC_ADD_Msk (0xffffffffu << UOTGHS_DEVDMANXTDSC_NXT_DSC_ADD_Pos) /**< \brief (UOTGHS_DEVDMANXTDSC) Next Descriptor Address */
+#define UOTGHS_DEVDMANXTDSC_NXT_DSC_ADD(value) ((UOTGHS_DEVDMANXTDSC_NXT_DSC_ADD_Msk & ((value) << UOTGHS_DEVDMANXTDSC_NXT_DSC_ADD_Pos)))
+/* -------- UOTGHS_DEVDMAADDRESS : (UOTGHS Offset: N/A) Device DMA Channel Address Register -------- */
+#define UOTGHS_DEVDMAADDRESS_BUFF_ADD_Pos 0
+#define UOTGHS_DEVDMAADDRESS_BUFF_ADD_Msk (0xffffffffu << UOTGHS_DEVDMAADDRESS_BUFF_ADD_Pos) /**< \brief (UOTGHS_DEVDMAADDRESS) Buffer Address */
+#define UOTGHS_DEVDMAADDRESS_BUFF_ADD(value) ((UOTGHS_DEVDMAADDRESS_BUFF_ADD_Msk & ((value) << UOTGHS_DEVDMAADDRESS_BUFF_ADD_Pos)))
+/* -------- UOTGHS_DEVDMACONTROL : (UOTGHS Offset: N/A) Device DMA Channel Control Register -------- */
+#define UOTGHS_DEVDMACONTROL_CHANN_ENB (0x1u << 0) /**< \brief (UOTGHS_DEVDMACONTROL) Channel Enable Command */
+#define UOTGHS_DEVDMACONTROL_LDNXT_DSC (0x1u << 1) /**< \brief (UOTGHS_DEVDMACONTROL) Load Next Channel Transfer Descriptor Enable Command */
+#define UOTGHS_DEVDMACONTROL_END_TR_EN (0x1u << 2) /**< \brief (UOTGHS_DEVDMACONTROL) End of Transfer Enable Control */
+#define UOTGHS_DEVDMACONTROL_END_B_EN (0x1u << 3) /**< \brief (UOTGHS_DEVDMACONTROL) End of Buffer Enable Control */
+#define UOTGHS_DEVDMACONTROL_END_TR_IT (0x1u << 4) /**< \brief (UOTGHS_DEVDMACONTROL) End of Transfer Interrupt Enable */
+#define UOTGHS_DEVDMACONTROL_END_BUFFIT (0x1u << 5) /**< \brief (UOTGHS_DEVDMACONTROL) End of Buffer Interrupt Enable */
+#define UOTGHS_DEVDMACONTROL_DESC_LD_IT (0x1u << 6) /**< \brief (UOTGHS_DEVDMACONTROL) Descriptor Loaded Interrupt Enable */
+#define UOTGHS_DEVDMACONTROL_BURST_LCK (0x1u << 7) /**< \brief (UOTGHS_DEVDMACONTROL) Burst Lock Enable */
+#define UOTGHS_DEVDMACONTROL_BUFF_LENGTH_Pos 16
+#define UOTGHS_DEVDMACONTROL_BUFF_LENGTH_Msk (0xffffu << UOTGHS_DEVDMACONTROL_BUFF_LENGTH_Pos) /**< \brief (UOTGHS_DEVDMACONTROL) Buffer Byte Length (Write-only) */
+#define UOTGHS_DEVDMACONTROL_BUFF_LENGTH(value) ((UOTGHS_DEVDMACONTROL_BUFF_LENGTH_Msk & ((value) << UOTGHS_DEVDMACONTROL_BUFF_LENGTH_Pos)))
+/* -------- UOTGHS_DEVDMASTATUS : (UOTGHS Offset: N/A) Device DMA Channel Status Register -------- */
+#define UOTGHS_DEVDMASTATUS_CHANN_ENB (0x1u << 0) /**< \brief (UOTGHS_DEVDMASTATUS) Channel Enable Status */
+#define UOTGHS_DEVDMASTATUS_CHANN_ACT (0x1u << 1) /**< \brief (UOTGHS_DEVDMASTATUS) Channel Active Status */
+#define UOTGHS_DEVDMASTATUS_END_TR_ST (0x1u << 4) /**< \brief (UOTGHS_DEVDMASTATUS) End of Channel Transfer Status */
+#define UOTGHS_DEVDMASTATUS_END_BF_ST (0x1u << 5) /**< \brief (UOTGHS_DEVDMASTATUS) End of Channel Buffer Status */
+#define UOTGHS_DEVDMASTATUS_DESC_LDST (0x1u << 6) /**< \brief (UOTGHS_DEVDMASTATUS) Descriptor Loaded Status */
+#define UOTGHS_DEVDMASTATUS_BUFF_COUNT_Pos 16
+#define UOTGHS_DEVDMASTATUS_BUFF_COUNT_Msk (0xffffu << UOTGHS_DEVDMASTATUS_BUFF_COUNT_Pos) /**< \brief (UOTGHS_DEVDMASTATUS) Buffer Byte Count */
+#define UOTGHS_DEVDMASTATUS_BUFF_COUNT(value) ((UOTGHS_DEVDMASTATUS_BUFF_COUNT_Msk & ((value) << UOTGHS_DEVDMASTATUS_BUFF_COUNT_Pos)))
+/* -------- UOTGHS_HSTCTRL : (UOTGHS Offset: 0x0400) Host General Control Register -------- */
+#define UOTGHS_HSTCTRL_SOFE (0x1u << 8) /**< \brief (UOTGHS_HSTCTRL) Start of Frame Generation Enable */
+#define UOTGHS_HSTCTRL_RESET (0x1u << 9) /**< \brief (UOTGHS_HSTCTRL) Send USB Reset */
+#define UOTGHS_HSTCTRL_RESUME (0x1u << 10) /**< \brief (UOTGHS_HSTCTRL) Send USB Resume */
+#define UOTGHS_HSTCTRL_SPDCONF_Pos 12
+#define UOTGHS_HSTCTRL_SPDCONF_Msk (0x3u << UOTGHS_HSTCTRL_SPDCONF_Pos) /**< \brief (UOTGHS_HSTCTRL) Mode Configuration */
+#define UOTGHS_HSTCTRL_SPDCONF_NORMAL (0x0u << 12) /**< \brief (UOTGHS_HSTCTRL) The host starts in full-speed mode and performs a high-speed reset to switch to the high-speed mode if the downstream peripheral is high-speed capable. */
+#define UOTGHS_HSTCTRL_SPDCONF_LOW_POWER (0x1u << 12) /**< \brief (UOTGHS_HSTCTRL) For a better consumption, if high-speed is not needed. */
+#define UOTGHS_HSTCTRL_SPDCONF_HIGH_SPEED (0x2u << 12) /**< \brief (UOTGHS_HSTCTRL) Forced high speed. */
+#define UOTGHS_HSTCTRL_SPDCONF_FORCED_FS (0x3u << 12) /**< \brief (UOTGHS_HSTCTRL) The host remains to full-speed mode whatever the peripheral speed capability. */
+/* -------- UOTGHS_HSTISR : (UOTGHS Offset: 0x0404) Host Global Interrupt Status Register -------- */
+#define UOTGHS_HSTISR_DCONNI (0x1u << 0) /**< \brief (UOTGHS_HSTISR) Device Connection Interrupt */
+#define UOTGHS_HSTISR_DDISCI (0x1u << 1) /**< \brief (UOTGHS_HSTISR) Device Disconnection Interrupt */
+#define UOTGHS_HSTISR_RSTI (0x1u << 2) /**< \brief (UOTGHS_HSTISR) USB Reset Sent Interrupt */
+#define UOTGHS_HSTISR_RSMEDI (0x1u << 3) /**< \brief (UOTGHS_HSTISR) Downstream Resume Sent Interrupt */
+#define UOTGHS_HSTISR_RXRSMI (0x1u << 4) /**< \brief (UOTGHS_HSTISR) Upstream Resume Received Interrupt */
+#define UOTGHS_HSTISR_HSOFI (0x1u << 5) /**< \brief (UOTGHS_HSTISR) Host Start of Frame Interrupt */
+#define UOTGHS_HSTISR_HWUPI (0x1u << 6) /**< \brief (UOTGHS_HSTISR) Host Wake-Up Interrupt */
+#define UOTGHS_HSTISR_PEP_0 (0x1u << 8) /**< \brief (UOTGHS_HSTISR) Pipe 0 Interrupt */
+#define UOTGHS_HSTISR_PEP_1 (0x1u << 9) /**< \brief (UOTGHS_HSTISR) Pipe 1 Interrupt */
+#define UOTGHS_HSTISR_PEP_2 (0x1u << 10) /**< \brief (UOTGHS_HSTISR) Pipe 2 Interrupt */
+#define UOTGHS_HSTISR_PEP_3 (0x1u << 11) /**< \brief (UOTGHS_HSTISR) Pipe 3 Interrupt */
+#define UOTGHS_HSTISR_PEP_4 (0x1u << 12) /**< \brief (UOTGHS_HSTISR) Pipe 4 Interrupt */
+#define UOTGHS_HSTISR_PEP_5 (0x1u << 13) /**< \brief (UOTGHS_HSTISR) Pipe 5 Interrupt */
+#define UOTGHS_HSTISR_PEP_6 (0x1u << 14) /**< \brief (UOTGHS_HSTISR) Pipe 6 Interrupt */
+#define UOTGHS_HSTISR_PEP_7 (0x1u << 15) /**< \brief (UOTGHS_HSTISR) Pipe 7 Interrupt */
+#define UOTGHS_HSTISR_PEP_8 (0x1u << 16) /**< \brief (UOTGHS_HSTISR) Pipe 8 Interrupt */
+#define UOTGHS_HSTISR_PEP_9 (0x1u << 17) /**< \brief (UOTGHS_HSTISR) Pipe 9 Interrupt */
+#define UOTGHS_HSTISR_DMA_1 (0x1u << 25) /**< \brief (UOTGHS_HSTISR) DMA Channel 1 Interrupt */
+#define UOTGHS_HSTISR_DMA_2 (0x1u << 26) /**< \brief (UOTGHS_HSTISR) DMA Channel 2 Interrupt */
+#define UOTGHS_HSTISR_DMA_3 (0x1u << 27) /**< \brief (UOTGHS_HSTISR) DMA Channel 3 Interrupt */
+#define UOTGHS_HSTISR_DMA_4 (0x1u << 28) /**< \brief (UOTGHS_HSTISR) DMA Channel 4 Interrupt */
+#define UOTGHS_HSTISR_DMA_5 (0x1u << 29) /**< \brief (UOTGHS_HSTISR) DMA Channel 5 Interrupt */
+#define UOTGHS_HSTISR_DMA_6 (0x1u << 30) /**< \brief (UOTGHS_HSTISR) DMA Channel 6 Interrupt */
+/* -------- UOTGHS_HSTICR : (UOTGHS Offset: 0x0408) Host Global Interrupt Clear Register -------- */
+#define UOTGHS_HSTICR_DCONNIC (0x1u << 0) /**< \brief (UOTGHS_HSTICR) Device Connection Interrupt Clear */
+#define UOTGHS_HSTICR_DDISCIC (0x1u << 1) /**< \brief (UOTGHS_HSTICR) Device Disconnection Interrupt Clear */
+#define UOTGHS_HSTICR_RSTIC (0x1u << 2) /**< \brief (UOTGHS_HSTICR) USB Reset Sent Interrupt Clear */
+#define UOTGHS_HSTICR_RSMEDIC (0x1u << 3) /**< \brief (UOTGHS_HSTICR) Downstream Resume Sent Interrupt Clear */
+#define UOTGHS_HSTICR_RXRSMIC (0x1u << 4) /**< \brief (UOTGHS_HSTICR) Upstream Resume Received Interrupt Clear */
+#define UOTGHS_HSTICR_HSOFIC (0x1u << 5) /**< \brief (UOTGHS_HSTICR) Host Start of Frame Interrupt Clear */
+#define UOTGHS_HSTICR_HWUPIC (0x1u << 6) /**< \brief (UOTGHS_HSTICR) Host Wake-Up Interrupt Clear */
+/* -------- UOTGHS_HSTIFR : (UOTGHS Offset: 0x040C) Host Global Interrupt Set Register -------- */
+#define UOTGHS_HSTIFR_DCONNIS (0x1u << 0) /**< \brief (UOTGHS_HSTIFR) Device Connection Interrupt Set */
+#define UOTGHS_HSTIFR_DDISCIS (0x1u << 1) /**< \brief (UOTGHS_HSTIFR) Device Disconnection Interrupt Set */
+#define UOTGHS_HSTIFR_RSTIS (0x1u << 2) /**< \brief (UOTGHS_HSTIFR) USB Reset Sent Interrupt Set */
+#define UOTGHS_HSTIFR_RSMEDIS (0x1u << 3) /**< \brief (UOTGHS_HSTIFR) Downstream Resume Sent Interrupt Set */
+#define UOTGHS_HSTIFR_RXRSMIS (0x1u << 4) /**< \brief (UOTGHS_HSTIFR) Upstream Resume Received Interrupt Set */
+#define UOTGHS_HSTIFR_HSOFIS (0x1u << 5) /**< \brief (UOTGHS_HSTIFR) Host Start of Frame Interrupt Set */
+#define UOTGHS_HSTIFR_HWUPIS (0x1u << 6) /**< \brief (UOTGHS_HSTIFR) Host Wake-Up Interrupt Set */
+#define UOTGHS_HSTIFR_DMA_1 (0x1u << 25) /**< \brief (UOTGHS_HSTIFR) DMA Channel 1 Interrupt Set */
+#define UOTGHS_HSTIFR_DMA_2 (0x1u << 26) /**< \brief (UOTGHS_HSTIFR) DMA Channel 2 Interrupt Set */
+#define UOTGHS_HSTIFR_DMA_3 (0x1u << 27) /**< \brief (UOTGHS_HSTIFR) DMA Channel 3 Interrupt Set */
+#define UOTGHS_HSTIFR_DMA_4 (0x1u << 28) /**< \brief (UOTGHS_HSTIFR) DMA Channel 4 Interrupt Set */
+#define UOTGHS_HSTIFR_DMA_5 (0x1u << 29) /**< \brief (UOTGHS_HSTIFR) DMA Channel 5 Interrupt Set */
+#define UOTGHS_HSTIFR_DMA_6 (0x1u << 30) /**< \brief (UOTGHS_HSTIFR) DMA Channel 6 Interrupt Set */
+/* -------- UOTGHS_HSTIMR : (UOTGHS Offset: 0x0410) Host Global Interrupt Mask Register -------- */
+#define UOTGHS_HSTIMR_DCONNIE (0x1u << 0) /**< \brief (UOTGHS_HSTIMR) Device Connection Interrupt Enable */
+#define UOTGHS_HSTIMR_DDISCIE (0x1u << 1) /**< \brief (UOTGHS_HSTIMR) Device Disconnection Interrupt Enable */
+#define UOTGHS_HSTIMR_RSTIE (0x1u << 2) /**< \brief (UOTGHS_HSTIMR) USB Reset Sent Interrupt Enable */
+#define UOTGHS_HSTIMR_RSMEDIE (0x1u << 3) /**< \brief (UOTGHS_HSTIMR) Downstream Resume Sent Interrupt Enable */
+#define UOTGHS_HSTIMR_RXRSMIE (0x1u << 4) /**< \brief (UOTGHS_HSTIMR) Upstream Resume Received Interrupt Enable */
+#define UOTGHS_HSTIMR_HSOFIE (0x1u << 5) /**< \brief (UOTGHS_HSTIMR) Host Start of Frame Interrupt Enable */
+#define UOTGHS_HSTIMR_HWUPIE (0x1u << 6) /**< \brief (UOTGHS_HSTIMR) Host Wake-Up Interrupt Enable */
+#define UOTGHS_HSTIMR_PEP_0 (0x1u << 8) /**< \brief (UOTGHS_HSTIMR) Pipe 0 Interrupt Enable */
+#define UOTGHS_HSTIMR_PEP_1 (0x1u << 9) /**< \brief (UOTGHS_HSTIMR) Pipe 1 Interrupt Enable */
+#define UOTGHS_HSTIMR_PEP_2 (0x1u << 10) /**< \brief (UOTGHS_HSTIMR) Pipe 2 Interrupt Enable */
+#define UOTGHS_HSTIMR_PEP_3 (0x1u << 11) /**< \brief (UOTGHS_HSTIMR) Pipe 3 Interrupt Enable */
+#define UOTGHS_HSTIMR_PEP_4 (0x1u << 12) /**< \brief (UOTGHS_HSTIMR) Pipe 4 Interrupt Enable */
+#define UOTGHS_HSTIMR_PEP_5 (0x1u << 13) /**< \brief (UOTGHS_HSTIMR) Pipe 5 Interrupt Enable */
+#define UOTGHS_HSTIMR_PEP_6 (0x1u << 14) /**< \brief (UOTGHS_HSTIMR) Pipe 6 Interrupt Enable */
+#define UOTGHS_HSTIMR_PEP_7 (0x1u << 15) /**< \brief (UOTGHS_HSTIMR) Pipe 7 Interrupt Enable */
+#define UOTGHS_HSTIMR_PEP_8 (0x1u << 16) /**< \brief (UOTGHS_HSTIMR) Pipe 8 Interrupt Enable */
+#define UOTGHS_HSTIMR_PEP_9 (0x1u << 17) /**< \brief (UOTGHS_HSTIMR) Pipe 9 Interrupt Enable */
+#define UOTGHS_HSTIMR_DMA_1 (0x1u << 25) /**< \brief (UOTGHS_HSTIMR) DMA Channel 1 Interrupt Enable */
+#define UOTGHS_HSTIMR_DMA_2 (0x1u << 26) /**< \brief (UOTGHS_HSTIMR) DMA Channel 2 Interrupt Enable */
+#define UOTGHS_HSTIMR_DMA_3 (0x1u << 27) /**< \brief (UOTGHS_HSTIMR) DMA Channel 3 Interrupt Enable */
+#define UOTGHS_HSTIMR_DMA_4 (0x1u << 28) /**< \brief (UOTGHS_HSTIMR) DMA Channel 4 Interrupt Enable */
+#define UOTGHS_HSTIMR_DMA_5 (0x1u << 29) /**< \brief (UOTGHS_HSTIMR) DMA Channel 5 Interrupt Enable */
+#define UOTGHS_HSTIMR_DMA_6 (0x1u << 30) /**< \brief (UOTGHS_HSTIMR) DMA Channel 6 Interrupt Enable */
+/* -------- UOTGHS_HSTIDR : (UOTGHS Offset: 0x0414) Host Global Interrupt Disable Register -------- */
+#define UOTGHS_HSTIDR_DCONNIEC (0x1u << 0) /**< \brief (UOTGHS_HSTIDR) Device Connection Interrupt Disable */
+#define UOTGHS_HSTIDR_DDISCIEC (0x1u << 1) /**< \brief (UOTGHS_HSTIDR) Device Disconnection Interrupt Disable */
+#define UOTGHS_HSTIDR_RSTIEC (0x1u << 2) /**< \brief (UOTGHS_HSTIDR) USB Reset Sent Interrupt Disable */
+#define UOTGHS_HSTIDR_RSMEDIEC (0x1u << 3) /**< \brief (UOTGHS_HSTIDR) Downstream Resume Sent Interrupt Disable */
+#define UOTGHS_HSTIDR_RXRSMIEC (0x1u << 4) /**< \brief (UOTGHS_HSTIDR) Upstream Resume Received Interrupt Disable */
+#define UOTGHS_HSTIDR_HSOFIEC (0x1u << 5) /**< \brief (UOTGHS_HSTIDR) Host Start of Frame Interrupt Disable */
+#define UOTGHS_HSTIDR_HWUPIEC (0x1u << 6) /**< \brief (UOTGHS_HSTIDR) Host Wake-Up Interrupt Disable */
+#define UOTGHS_HSTIDR_PEP_0 (0x1u << 8) /**< \brief (UOTGHS_HSTIDR) Pipe 0 Interrupt Disable */
+#define UOTGHS_HSTIDR_PEP_1 (0x1u << 9) /**< \brief (UOTGHS_HSTIDR) Pipe 1 Interrupt Disable */
+#define UOTGHS_HSTIDR_PEP_2 (0x1u << 10) /**< \brief (UOTGHS_HSTIDR) Pipe 2 Interrupt Disable */
+#define UOTGHS_HSTIDR_PEP_3 (0x1u << 11) /**< \brief (UOTGHS_HSTIDR) Pipe 3 Interrupt Disable */
+#define UOTGHS_HSTIDR_PEP_4 (0x1u << 12) /**< \brief (UOTGHS_HSTIDR) Pipe 4 Interrupt Disable */
+#define UOTGHS_HSTIDR_PEP_5 (0x1u << 13) /**< \brief (UOTGHS_HSTIDR) Pipe 5 Interrupt Disable */
+#define UOTGHS_HSTIDR_PEP_6 (0x1u << 14) /**< \brief (UOTGHS_HSTIDR) Pipe 6 Interrupt Disable */
+#define UOTGHS_HSTIDR_PEP_7 (0x1u << 15) /**< \brief (UOTGHS_HSTIDR) Pipe 7 Interrupt Disable */
+#define UOTGHS_HSTIDR_PEP_8 (0x1u << 16) /**< \brief (UOTGHS_HSTIDR) Pipe 8 Interrupt Disable */
+#define UOTGHS_HSTIDR_PEP_9 (0x1u << 17) /**< \brief (UOTGHS_HSTIDR) Pipe 9 Interrupt Disable */
+#define UOTGHS_HSTIDR_DMA_1 (0x1u << 25) /**< \brief (UOTGHS_HSTIDR) DMA Channel 1 Interrupt Disable */
+#define UOTGHS_HSTIDR_DMA_2 (0x1u << 26) /**< \brief (UOTGHS_HSTIDR) DMA Channel 2 Interrupt Disable */
+#define UOTGHS_HSTIDR_DMA_3 (0x1u << 27) /**< \brief (UOTGHS_HSTIDR) DMA Channel 3 Interrupt Disable */
+#define UOTGHS_HSTIDR_DMA_4 (0x1u << 28) /**< \brief (UOTGHS_HSTIDR) DMA Channel 4 Interrupt Disable */
+#define UOTGHS_HSTIDR_DMA_5 (0x1u << 29) /**< \brief (UOTGHS_HSTIDR) DMA Channel 5 Interrupt Disable */
+#define UOTGHS_HSTIDR_DMA_6 (0x1u << 30) /**< \brief (UOTGHS_HSTIDR) DMA Channel 6 Interrupt Disable */
+/* -------- UOTGHS_HSTIER : (UOTGHS Offset: 0x0418) Host Global Interrupt Enable Register -------- */
+#define UOTGHS_HSTIER_DCONNIES (0x1u << 0) /**< \brief (UOTGHS_HSTIER) Device Connection Interrupt Enable */
+#define UOTGHS_HSTIER_DDISCIES (0x1u << 1) /**< \brief (UOTGHS_HSTIER) Device Disconnection Interrupt Enable */
+#define UOTGHS_HSTIER_RSTIES (0x1u << 2) /**< \brief (UOTGHS_HSTIER) USB Reset Sent Interrupt Enable */
+#define UOTGHS_HSTIER_RSMEDIES (0x1u << 3) /**< \brief (UOTGHS_HSTIER) Downstream Resume Sent Interrupt Enable */
+#define UOTGHS_HSTIER_RXRSMIES (0x1u << 4) /**< \brief (UOTGHS_HSTIER) Upstream Resume Received Interrupt Enable */
+#define UOTGHS_HSTIER_HSOFIES (0x1u << 5) /**< \brief (UOTGHS_HSTIER) Host Start of Frame Interrupt Enable */
+#define UOTGHS_HSTIER_HWUPIES (0x1u << 6) /**< \brief (UOTGHS_HSTIER) Host Wake-Up Interrupt Enable */
+#define UOTGHS_HSTIER_PEP_0 (0x1u << 8) /**< \brief (UOTGHS_HSTIER) Pipe 0 Interrupt Enable */
+#define UOTGHS_HSTIER_PEP_1 (0x1u << 9) /**< \brief (UOTGHS_HSTIER) Pipe 1 Interrupt Enable */
+#define UOTGHS_HSTIER_PEP_2 (0x1u << 10) /**< \brief (UOTGHS_HSTIER) Pipe 2 Interrupt Enable */
+#define UOTGHS_HSTIER_PEP_3 (0x1u << 11) /**< \brief (UOTGHS_HSTIER) Pipe 3 Interrupt Enable */
+#define UOTGHS_HSTIER_PEP_4 (0x1u << 12) /**< \brief (UOTGHS_HSTIER) Pipe 4 Interrupt Enable */
+#define UOTGHS_HSTIER_PEP_5 (0x1u << 13) /**< \brief (UOTGHS_HSTIER) Pipe 5 Interrupt Enable */
+#define UOTGHS_HSTIER_PEP_6 (0x1u << 14) /**< \brief (UOTGHS_HSTIER) Pipe 6 Interrupt Enable */
+#define UOTGHS_HSTIER_PEP_7 (0x1u << 15) /**< \brief (UOTGHS_HSTIER) Pipe 7 Interrupt Enable */
+#define UOTGHS_HSTIER_PEP_8 (0x1u << 16) /**< \brief (UOTGHS_HSTIER) Pipe 8 Interrupt Enable */
+#define UOTGHS_HSTIER_PEP_9 (0x1u << 17) /**< \brief (UOTGHS_HSTIER) Pipe 9 Interrupt Enable */
+#define UOTGHS_HSTIER_DMA_1 (0x1u << 25) /**< \brief (UOTGHS_HSTIER) DMA Channel 1 Interrupt Enable */
+#define UOTGHS_HSTIER_DMA_2 (0x1u << 26) /**< \brief (UOTGHS_HSTIER) DMA Channel 2 Interrupt Enable */
+#define UOTGHS_HSTIER_DMA_3 (0x1u << 27) /**< \brief (UOTGHS_HSTIER) DMA Channel 3 Interrupt Enable */
+#define UOTGHS_HSTIER_DMA_4 (0x1u << 28) /**< \brief (UOTGHS_HSTIER) DMA Channel 4 Interrupt Enable */
+#define UOTGHS_HSTIER_DMA_5 (0x1u << 29) /**< \brief (UOTGHS_HSTIER) DMA Channel 5 Interrupt Enable */
+#define UOTGHS_HSTIER_DMA_6 (0x1u << 30) /**< \brief (UOTGHS_HSTIER) DMA Channel 6 Interrupt Enable */
+/* -------- UOTGHS_HSTPIP : (UOTGHS Offset: 0x0041C) Host Pipe Register -------- */
+#define UOTGHS_HSTPIP_PEN0 (0x1u << 0) /**< \brief (UOTGHS_HSTPIP) Pipe 0 Enable */
+#define UOTGHS_HSTPIP_PEN1 (0x1u << 1) /**< \brief (UOTGHS_HSTPIP) Pipe 1 Enable */
+#define UOTGHS_HSTPIP_PEN2 (0x1u << 2) /**< \brief (UOTGHS_HSTPIP) Pipe 2 Enable */
+#define UOTGHS_HSTPIP_PEN3 (0x1u << 3) /**< \brief (UOTGHS_HSTPIP) Pipe 3 Enable */
+#define UOTGHS_HSTPIP_PEN4 (0x1u << 4) /**< \brief (UOTGHS_HSTPIP) Pipe 4 Enable */
+#define UOTGHS_HSTPIP_PEN5 (0x1u << 5) /**< \brief (UOTGHS_HSTPIP) Pipe 5 Enable */
+#define UOTGHS_HSTPIP_PEN6 (0x1u << 6) /**< \brief (UOTGHS_HSTPIP) Pipe 6 Enable */
+#define UOTGHS_HSTPIP_PEN7 (0x1u << 7) /**< \brief (UOTGHS_HSTPIP) Pipe 7 Enable */
+#define UOTGHS_HSTPIP_PEN8 (0x1u << 8) /**< \brief (UOTGHS_HSTPIP) Pipe 8 Enable */
+#define UOTGHS_HSTPIP_PRST0 (0x1u << 16) /**< \brief (UOTGHS_HSTPIP) Pipe 0 Reset */
+#define UOTGHS_HSTPIP_PRST1 (0x1u << 17) /**< \brief (UOTGHS_HSTPIP) Pipe 1 Reset */
+#define UOTGHS_HSTPIP_PRST2 (0x1u << 18) /**< \brief (UOTGHS_HSTPIP) Pipe 2 Reset */
+#define UOTGHS_HSTPIP_PRST3 (0x1u << 19) /**< \brief (UOTGHS_HSTPIP) Pipe 3 Reset */
+#define UOTGHS_HSTPIP_PRST4 (0x1u << 20) /**< \brief (UOTGHS_HSTPIP) Pipe 4 Reset */
+#define UOTGHS_HSTPIP_PRST5 (0x1u << 21) /**< \brief (UOTGHS_HSTPIP) Pipe 5 Reset */
+#define UOTGHS_HSTPIP_PRST6 (0x1u << 22) /**< \brief (UOTGHS_HSTPIP) Pipe 6 Reset */
+#define UOTGHS_HSTPIP_PRST7 (0x1u << 23) /**< \brief (UOTGHS_HSTPIP) Pipe 7 Reset */
+#define UOTGHS_HSTPIP_PRST8 (0x1u << 24) /**< \brief (UOTGHS_HSTPIP) Pipe 8 Reset */
+/* -------- UOTGHS_HSTFNUM : (UOTGHS Offset: 0x0420) Host Frame Number Register -------- */
+#define UOTGHS_HSTFNUM_MFNUM_Pos 0
+#define UOTGHS_HSTFNUM_MFNUM_Msk (0x7u << UOTGHS_HSTFNUM_MFNUM_Pos) /**< \brief (UOTGHS_HSTFNUM) Micro Frame Number */
+#define UOTGHS_HSTFNUM_MFNUM(value) ((UOTGHS_HSTFNUM_MFNUM_Msk & ((value) << UOTGHS_HSTFNUM_MFNUM_Pos)))
+#define UOTGHS_HSTFNUM_FNUM_Pos 3
+#define UOTGHS_HSTFNUM_FNUM_Msk (0x7ffu << UOTGHS_HSTFNUM_FNUM_Pos) /**< \brief (UOTGHS_HSTFNUM) Frame Number */
+#define UOTGHS_HSTFNUM_FNUM(value) ((UOTGHS_HSTFNUM_FNUM_Msk & ((value) << UOTGHS_HSTFNUM_FNUM_Pos)))
+#define UOTGHS_HSTFNUM_FLENHIGH_Pos 16
+#define UOTGHS_HSTFNUM_FLENHIGH_Msk (0xffu << UOTGHS_HSTFNUM_FLENHIGH_Pos) /**< \brief (UOTGHS_HSTFNUM) Frame Length */
+#define UOTGHS_HSTFNUM_FLENHIGH(value) ((UOTGHS_HSTFNUM_FLENHIGH_Msk & ((value) << UOTGHS_HSTFNUM_FLENHIGH_Pos)))
+/* -------- UOTGHS_HSTADDR1 : (UOTGHS Offset: 0x0424) Host Address 1 Register -------- */
+#define UOTGHS_HSTADDR1_HSTADDRP0_Pos 0
+#define UOTGHS_HSTADDR1_HSTADDRP0_Msk (0x7fu << UOTGHS_HSTADDR1_HSTADDRP0_Pos) /**< \brief (UOTGHS_HSTADDR1) USB Host Address */
+#define UOTGHS_HSTADDR1_HSTADDRP0(value) ((UOTGHS_HSTADDR1_HSTADDRP0_Msk & ((value) << UOTGHS_HSTADDR1_HSTADDRP0_Pos)))
+#define UOTGHS_HSTADDR1_HSTADDRP1_Pos 8
+#define UOTGHS_HSTADDR1_HSTADDRP1_Msk (0x7fu << UOTGHS_HSTADDR1_HSTADDRP1_Pos) /**< \brief (UOTGHS_HSTADDR1) USB Host Address */
+#define UOTGHS_HSTADDR1_HSTADDRP1(value) ((UOTGHS_HSTADDR1_HSTADDRP1_Msk & ((value) << UOTGHS_HSTADDR1_HSTADDRP1_Pos)))
+#define UOTGHS_HSTADDR1_HSTADDRP2_Pos 16
+#define UOTGHS_HSTADDR1_HSTADDRP2_Msk (0x7fu << UOTGHS_HSTADDR1_HSTADDRP2_Pos) /**< \brief (UOTGHS_HSTADDR1) USB Host Address */
+#define UOTGHS_HSTADDR1_HSTADDRP2(value) ((UOTGHS_HSTADDR1_HSTADDRP2_Msk & ((value) << UOTGHS_HSTADDR1_HSTADDRP2_Pos)))
+#define UOTGHS_HSTADDR1_HSTADDRP3_Pos 24
+#define UOTGHS_HSTADDR1_HSTADDRP3_Msk (0x7fu << UOTGHS_HSTADDR1_HSTADDRP3_Pos) /**< \brief (UOTGHS_HSTADDR1) USB Host Address */
+#define UOTGHS_HSTADDR1_HSTADDRP3(value) ((UOTGHS_HSTADDR1_HSTADDRP3_Msk & ((value) << UOTGHS_HSTADDR1_HSTADDRP3_Pos)))
+/* -------- UOTGHS_HSTADDR2 : (UOTGHS Offset: 0x0428) Host Address 2 Register -------- */
+#define UOTGHS_HSTADDR2_HSTADDRP4_Pos 0
+#define UOTGHS_HSTADDR2_HSTADDRP4_Msk (0x7fu << UOTGHS_HSTADDR2_HSTADDRP4_Pos) /**< \brief (UOTGHS_HSTADDR2) USB Host Address */
+#define UOTGHS_HSTADDR2_HSTADDRP4(value) ((UOTGHS_HSTADDR2_HSTADDRP4_Msk & ((value) << UOTGHS_HSTADDR2_HSTADDRP4_Pos)))
+#define UOTGHS_HSTADDR2_HSTADDRP5_Pos 8
+#define UOTGHS_HSTADDR2_HSTADDRP5_Msk (0x7fu << UOTGHS_HSTADDR2_HSTADDRP5_Pos) /**< \brief (UOTGHS_HSTADDR2) USB Host Address */
+#define UOTGHS_HSTADDR2_HSTADDRP5(value) ((UOTGHS_HSTADDR2_HSTADDRP5_Msk & ((value) << UOTGHS_HSTADDR2_HSTADDRP5_Pos)))
+#define UOTGHS_HSTADDR2_HSTADDRP6_Pos 16
+#define UOTGHS_HSTADDR2_HSTADDRP6_Msk (0x7fu << UOTGHS_HSTADDR2_HSTADDRP6_Pos) /**< \brief (UOTGHS_HSTADDR2) USB Host Address */
+#define UOTGHS_HSTADDR2_HSTADDRP6(value) ((UOTGHS_HSTADDR2_HSTADDRP6_Msk & ((value) << UOTGHS_HSTADDR2_HSTADDRP6_Pos)))
+#define UOTGHS_HSTADDR2_HSTADDRP7_Pos 24
+#define UOTGHS_HSTADDR2_HSTADDRP7_Msk (0x7fu << UOTGHS_HSTADDR2_HSTADDRP7_Pos) /**< \brief (UOTGHS_HSTADDR2) USB Host Address */
+#define UOTGHS_HSTADDR2_HSTADDRP7(value) ((UOTGHS_HSTADDR2_HSTADDRP7_Msk & ((value) << UOTGHS_HSTADDR2_HSTADDRP7_Pos)))
+/* -------- UOTGHS_HSTADDR3 : (UOTGHS Offset: 0x042C) Host Address 3 Register -------- */
+#define UOTGHS_HSTADDR3_HSTADDRP8_Pos 0
+#define UOTGHS_HSTADDR3_HSTADDRP8_Msk (0x7fu << UOTGHS_HSTADDR3_HSTADDRP8_Pos) /**< \brief (UOTGHS_HSTADDR3) USB Host Address */
+#define UOTGHS_HSTADDR3_HSTADDRP8(value) ((UOTGHS_HSTADDR3_HSTADDRP8_Msk & ((value) << UOTGHS_HSTADDR3_HSTADDRP8_Pos)))
+#define UOTGHS_HSTADDR3_HSTADDRP9_Pos 8
+#define UOTGHS_HSTADDR3_HSTADDRP9_Msk (0x7fu << UOTGHS_HSTADDR3_HSTADDRP9_Pos) /**< \brief (UOTGHS_HSTADDR3) USB Host Address */
+#define UOTGHS_HSTADDR3_HSTADDRP9(value) ((UOTGHS_HSTADDR3_HSTADDRP9_Msk & ((value) << UOTGHS_HSTADDR3_HSTADDRP9_Pos)))
+/* -------- UOTGHS_HSTPIPCFG[10] : (UOTGHS Offset: 0x500) Host Pipe Configuration Register (n = 0) -------- */
+#define UOTGHS_HSTPIPCFG_ALLOC (0x1u << 1) /**< \brief (UOTGHS_HSTPIPCFG[10]) Pipe Memory Allocate */
+#define UOTGHS_HSTPIPCFG_PBK_Pos 2
+#define UOTGHS_HSTPIPCFG_PBK_Msk (0x3u << UOTGHS_HSTPIPCFG_PBK_Pos) /**< \brief (UOTGHS_HSTPIPCFG[10]) Pipe Banks */
+#define UOTGHS_HSTPIPCFG_PBK_1_BANK (0x0u << 2) /**< \brief (UOTGHS_HSTPIPCFG[10]) Single-bank pipe */
+#define UOTGHS_HSTPIPCFG_PBK_2_BANK (0x1u << 2) /**< \brief (UOTGHS_HSTPIPCFG[10]) Double-bank pipe */
+#define UOTGHS_HSTPIPCFG_PBK_3_BANK (0x2u << 2) /**< \brief (UOTGHS_HSTPIPCFG[10]) Triple-bank pipe */
+#define UOTGHS_HSTPIPCFG_PSIZE_Pos 4
+#define UOTGHS_HSTPIPCFG_PSIZE_Msk (0x7u << UOTGHS_HSTPIPCFG_PSIZE_Pos) /**< \brief (UOTGHS_HSTPIPCFG[10]) Pipe Size */
+#define UOTGHS_HSTPIPCFG_PSIZE_8_BYTE (0x0u << 4) /**< \brief (UOTGHS_HSTPIPCFG[10]) 8 bytes */
+#define UOTGHS_HSTPIPCFG_PSIZE_16_BYTE (0x1u << 4) /**< \brief (UOTGHS_HSTPIPCFG[10]) 16 bytes */
+#define UOTGHS_HSTPIPCFG_PSIZE_32_BYTE (0x2u << 4) /**< \brief (UOTGHS_HSTPIPCFG[10]) 32 bytes */
+#define UOTGHS_HSTPIPCFG_PSIZE_64_BYTE (0x3u << 4) /**< \brief (UOTGHS_HSTPIPCFG[10]) 64 bytes */
+#define UOTGHS_HSTPIPCFG_PSIZE_128_BYTE (0x4u << 4) /**< \brief (UOTGHS_HSTPIPCFG[10]) 128 bytes */
+#define UOTGHS_HSTPIPCFG_PSIZE_256_BYTE (0x5u << 4) /**< \brief (UOTGHS_HSTPIPCFG[10]) 256 bytes */
+#define UOTGHS_HSTPIPCFG_PSIZE_512_BYTE (0x6u << 4) /**< \brief (UOTGHS_HSTPIPCFG[10]) 512 bytes */
+#define UOTGHS_HSTPIPCFG_PSIZE_1024_BYTE (0x7u << 4) /**< \brief (UOTGHS_HSTPIPCFG[10]) 1024 bytes */
+#define UOTGHS_HSTPIPCFG_PTOKEN_Pos 8
+#define UOTGHS_HSTPIPCFG_PTOKEN_Msk (0x3u << UOTGHS_HSTPIPCFG_PTOKEN_Pos) /**< \brief (UOTGHS_HSTPIPCFG[10]) Pipe Token */
+#define UOTGHS_HSTPIPCFG_PTOKEN_SETUP (0x0u << 8) /**< \brief (UOTGHS_HSTPIPCFG[10]) SETUP */
+#define UOTGHS_HSTPIPCFG_PTOKEN_IN (0x1u << 8) /**< \brief (UOTGHS_HSTPIPCFG[10]) IN */
+#define UOTGHS_HSTPIPCFG_PTOKEN_OUT (0x2u << 8) /**< \brief (UOTGHS_HSTPIPCFG[10]) OUT */
+#define UOTGHS_HSTPIPCFG_AUTOSW (0x1u << 10) /**< \brief (UOTGHS_HSTPIPCFG[10]) Automatic Switch */
+#define UOTGHS_HSTPIPCFG_PTYPE_Pos 12
+#define UOTGHS_HSTPIPCFG_PTYPE_Msk (0x3u << UOTGHS_HSTPIPCFG_PTYPE_Pos) /**< \brief (UOTGHS_HSTPIPCFG[10]) Pipe Type */
+#define UOTGHS_HSTPIPCFG_PTYPE_CTRL (0x0u << 12) /**< \brief (UOTGHS_HSTPIPCFG[10]) Control */
+#define UOTGHS_HSTPIPCFG_PTYPE_ISO (0x1u << 12) /**< \brief (UOTGHS_HSTPIPCFG[10]) Isochronous */
+#define UOTGHS_HSTPIPCFG_PTYPE_BLK (0x2u << 12) /**< \brief (UOTGHS_HSTPIPCFG[10]) Bulk */
+#define UOTGHS_HSTPIPCFG_PTYPE_INTRPT (0x3u << 12) /**< \brief (UOTGHS_HSTPIPCFG[10]) Interrupt */
+#define UOTGHS_HSTPIPCFG_PEPNUM_Pos 16
+#define UOTGHS_HSTPIPCFG_PEPNUM_Msk (0xfu << UOTGHS_HSTPIPCFG_PEPNUM_Pos) /**< \brief (UOTGHS_HSTPIPCFG[10]) Pipe Endpoint Number */
+#define UOTGHS_HSTPIPCFG_PEPNUM(value) ((UOTGHS_HSTPIPCFG_PEPNUM_Msk & ((value) << UOTGHS_HSTPIPCFG_PEPNUM_Pos)))
+#define UOTGHS_HSTPIPCFG_PINGEN (0x1u << 20) /**< \brief (UOTGHS_HSTPIPCFG[10]) Ping Enable */
+#define UOTGHS_HSTPIPCFG_INTFRQ_Pos 24
+#define UOTGHS_HSTPIPCFG_INTFRQ_Msk (0xffu << UOTGHS_HSTPIPCFG_INTFRQ_Pos) /**< \brief (UOTGHS_HSTPIPCFG[10]) Pipe Interrupt Request Frequency */
+#define UOTGHS_HSTPIPCFG_INTFRQ(value) ((UOTGHS_HSTPIPCFG_INTFRQ_Msk & ((value) << UOTGHS_HSTPIPCFG_INTFRQ_Pos)))
+#define UOTGHS_HSTPIPCFG_BINTERVAL_Pos 24
+#define UOTGHS_HSTPIPCFG_BINTERVAL_Msk (0xffu << UOTGHS_HSTPIPCFG_BINTERVAL_Pos) /**< \brief (UOTGHS_HSTPIPCFG[10]) bInterval parameter for the Bulk-Out/Ping transaction */
+#define UOTGHS_HSTPIPCFG_BINTERVAL(value) ((UOTGHS_HSTPIPCFG_BINTERVAL_Msk & ((value) << UOTGHS_HSTPIPCFG_BINTERVAL_Pos)))
+/* -------- UOTGHS_HSTPIPISR[10] : (UOTGHS Offset: 0x530) Host Pipe Status Register (n = 0) -------- */
+#define UOTGHS_HSTPIPISR_RXINI (0x1u << 0) /**< \brief (UOTGHS_HSTPIPISR[10]) Received IN Data Interrupt */
+#define UOTGHS_HSTPIPISR_TXOUTI (0x1u << 1) /**< \brief (UOTGHS_HSTPIPISR[10]) Transmitted OUT Data Interrupt */
+#define UOTGHS_HSTPIPISR_TXSTPI (0x1u << 2) /**< \brief (UOTGHS_HSTPIPISR[10]) Transmitted SETUP Interrupt */
+#define UOTGHS_HSTPIPISR_UNDERFI (0x1u << 2) /**< \brief (UOTGHS_HSTPIPISR[10]) Underflow Interrupt */
+#define UOTGHS_HSTPIPISR_PERRI (0x1u << 3) /**< \brief (UOTGHS_HSTPIPISR[10]) Pipe Error Interrupt */
+#define UOTGHS_HSTPIPISR_NAKEDI (0x1u << 4) /**< \brief (UOTGHS_HSTPIPISR[10]) NAKed Interrupt */
+#define UOTGHS_HSTPIPISR_OVERFI (0x1u << 5) /**< \brief (UOTGHS_HSTPIPISR[10]) Overflow Interrupt */
+#define UOTGHS_HSTPIPISR_RXSTALLDI (0x1u << 6) /**< \brief (UOTGHS_HSTPIPISR[10]) Received STALLed Interrupt */
+#define UOTGHS_HSTPIPISR_CRCERRI (0x1u << 6) /**< \brief (UOTGHS_HSTPIPISR[10]) CRC Error Interrupt */
+#define UOTGHS_HSTPIPISR_SHORTPACKETI (0x1u << 7) /**< \brief (UOTGHS_HSTPIPISR[10]) Short Packet Interrupt */
+#define UOTGHS_HSTPIPISR_DTSEQ_Pos 8
+#define UOTGHS_HSTPIPISR_DTSEQ_Msk (0x3u << UOTGHS_HSTPIPISR_DTSEQ_Pos) /**< \brief (UOTGHS_HSTPIPISR[10]) Data Toggle Sequence */
+#define UOTGHS_HSTPIPISR_DTSEQ_DATA0 (0x0u << 8) /**< \brief (UOTGHS_HSTPIPISR[10]) Data0 toggle sequence */
+#define UOTGHS_HSTPIPISR_DTSEQ_DATA1 (0x1u << 8) /**< \brief (UOTGHS_HSTPIPISR[10]) Data1 toggle sequence */
+#define UOTGHS_HSTPIPISR_NBUSYBK_Pos 12
+#define UOTGHS_HSTPIPISR_NBUSYBK_Msk (0x3u << UOTGHS_HSTPIPISR_NBUSYBK_Pos) /**< \brief (UOTGHS_HSTPIPISR[10]) Number of Busy Banks */
+#define UOTGHS_HSTPIPISR_NBUSYBK_0_BUSY (0x0u << 12) /**< \brief (UOTGHS_HSTPIPISR[10]) 0 busy bank (all banks free) */
+#define UOTGHS_HSTPIPISR_NBUSYBK_1_BUSY (0x1u << 12) /**< \brief (UOTGHS_HSTPIPISR[10]) 1 busy bank */
+#define UOTGHS_HSTPIPISR_NBUSYBK_2_BUSY (0x2u << 12) /**< \brief (UOTGHS_HSTPIPISR[10]) 2 busy banks */
+#define UOTGHS_HSTPIPISR_NBUSYBK_3_BUSY (0x3u << 12) /**< \brief (UOTGHS_HSTPIPISR[10]) 3 busy banks */
+#define UOTGHS_HSTPIPISR_CURRBK_Pos 14
+#define UOTGHS_HSTPIPISR_CURRBK_Msk (0x3u << UOTGHS_HSTPIPISR_CURRBK_Pos) /**< \brief (UOTGHS_HSTPIPISR[10]) Current Bank */
+#define UOTGHS_HSTPIPISR_CURRBK_BANK0 (0x0u << 14) /**< \brief (UOTGHS_HSTPIPISR[10]) Current bank is bank0 */
+#define UOTGHS_HSTPIPISR_CURRBK_BANK1 (0x1u << 14) /**< \brief (UOTGHS_HSTPIPISR[10]) Current bank is bank1 */
+#define UOTGHS_HSTPIPISR_CURRBK_BANK2 (0x2u << 14) /**< \brief (UOTGHS_HSTPIPISR[10]) Current bank is bank2 */
+#define UOTGHS_HSTPIPISR_RWALL (0x1u << 16) /**< \brief (UOTGHS_HSTPIPISR[10]) Read-write Allowed */
+#define UOTGHS_HSTPIPISR_CFGOK (0x1u << 18) /**< \brief (UOTGHS_HSTPIPISR[10]) Configuration OK Status */
+#define UOTGHS_HSTPIPISR_PBYCT_Pos 20
+#define UOTGHS_HSTPIPISR_PBYCT_Msk (0x7ffu << UOTGHS_HSTPIPISR_PBYCT_Pos) /**< \brief (UOTGHS_HSTPIPISR[10]) Pipe Byte Count */
+/* -------- UOTGHS_HSTPIPICR[10] : (UOTGHS Offset: 0x560) Host Pipe Clear Register (n = 0) -------- */
+#define UOTGHS_HSTPIPICR_RXINIC (0x1u << 0) /**< \brief (UOTGHS_HSTPIPICR[10]) Received IN Data Interrupt Clear */
+#define UOTGHS_HSTPIPICR_TXOUTIC (0x1u << 1) /**< \brief (UOTGHS_HSTPIPICR[10]) Transmitted OUT Data Interrupt Clear */
+#define UOTGHS_HSTPIPICR_TXSTPIC (0x1u << 2) /**< \brief (UOTGHS_HSTPIPICR[10]) Transmitted SETUP Interrupt Clear */
+#define UOTGHS_HSTPIPICR_UNDERFIC (0x1u << 2) /**< \brief (UOTGHS_HSTPIPICR[10]) Underflow Interrupt Clear */
+#define UOTGHS_HSTPIPICR_NAKEDIC (0x1u << 4) /**< \brief (UOTGHS_HSTPIPICR[10]) NAKed Interrupt Clear */
+#define UOTGHS_HSTPIPICR_OVERFIC (0x1u << 5) /**< \brief (UOTGHS_HSTPIPICR[10]) Overflow Interrupt Clear */
+#define UOTGHS_HSTPIPICR_RXSTALLDIC (0x1u << 6) /**< \brief (UOTGHS_HSTPIPICR[10]) Received STALLed Interrupt Clear */
+#define UOTGHS_HSTPIPICR_CRCERRIC (0x1u << 6) /**< \brief (UOTGHS_HSTPIPICR[10]) CRC Error Interrupt Clear */
+#define UOTGHS_HSTPIPICR_SHORTPACKETIC (0x1u << 7) /**< \brief (UOTGHS_HSTPIPICR[10]) Short Packet Interrupt Clear */
+/* -------- UOTGHS_HSTPIPIFR[10] : (UOTGHS Offset: 0x590) Host Pipe Set Register (n = 0) -------- */
+#define UOTGHS_HSTPIPIFR_RXINIS (0x1u << 0) /**< \brief (UOTGHS_HSTPIPIFR[10]) Received IN Data Interrupt Set */
+#define UOTGHS_HSTPIPIFR_TXOUTIS (0x1u << 1) /**< \brief (UOTGHS_HSTPIPIFR[10]) Transmitted OUT Data Interrupt Set */
+#define UOTGHS_HSTPIPIFR_TXSTPIS (0x1u << 2) /**< \brief (UOTGHS_HSTPIPIFR[10]) Transmitted SETUP Interrupt Set */
+#define UOTGHS_HSTPIPIFR_UNDERFIS (0x1u << 2) /**< \brief (UOTGHS_HSTPIPIFR[10]) Underflow Interrupt Set */
+#define UOTGHS_HSTPIPIFR_PERRIS (0x1u << 3) /**< \brief (UOTGHS_HSTPIPIFR[10]) Pipe Error Interrupt Set */
+#define UOTGHS_HSTPIPIFR_NAKEDIS (0x1u << 4) /**< \brief (UOTGHS_HSTPIPIFR[10]) NAKed Interrupt Set */
+#define UOTGHS_HSTPIPIFR_OVERFIS (0x1u << 5) /**< \brief (UOTGHS_HSTPIPIFR[10]) Overflow Interrupt Set */
+#define UOTGHS_HSTPIPIFR_RXSTALLDIS (0x1u << 6) /**< \brief (UOTGHS_HSTPIPIFR[10]) Received STALLed Interrupt Set */
+#define UOTGHS_HSTPIPIFR_CRCERRIS (0x1u << 6) /**< \brief (UOTGHS_HSTPIPIFR[10]) CRC Error Interrupt Set */
+#define UOTGHS_HSTPIPIFR_SHORTPACKETIS (0x1u << 7) /**< \brief (UOTGHS_HSTPIPIFR[10]) Short Packet Interrupt Set */
+#define UOTGHS_HSTPIPIFR_NBUSYBKS (0x1u << 12) /**< \brief (UOTGHS_HSTPIPIFR[10]) Number of Busy Banks Set */
+/* -------- UOTGHS_HSTPIPIMR[10] : (UOTGHS Offset: 0x5C0) Host Pipe Mask Register (n = 0) -------- */
+#define UOTGHS_HSTPIPIMR_RXINE (0x1u << 0) /**< \brief (UOTGHS_HSTPIPIMR[10]) Received IN Data Interrupt Enable */
+#define UOTGHS_HSTPIPIMR_TXOUTE (0x1u << 1) /**< \brief (UOTGHS_HSTPIPIMR[10]) Transmitted OUT Data Interrupt Enable */
+#define UOTGHS_HSTPIPIMR_TXSTPE (0x1u << 2) /**< \brief (UOTGHS_HSTPIPIMR[10]) Transmitted SETUP Interrupt Enable */
+#define UOTGHS_HSTPIPIMR_UNDERFIE (0x1u << 2) /**< \brief (UOTGHS_HSTPIPIMR[10]) Underflow Interrupt Enable */
+#define UOTGHS_HSTPIPIMR_PERRE (0x1u << 3) /**< \brief (UOTGHS_HSTPIPIMR[10]) Pipe Error Interrupt Enable */
+#define UOTGHS_HSTPIPIMR_NAKEDE (0x1u << 4) /**< \brief (UOTGHS_HSTPIPIMR[10]) NAKed Interrupt Enable */
+#define UOTGHS_HSTPIPIMR_OVERFIE (0x1u << 5) /**< \brief (UOTGHS_HSTPIPIMR[10]) Overflow Interrupt Enable */
+#define UOTGHS_HSTPIPIMR_RXSTALLDE (0x1u << 6) /**< \brief (UOTGHS_HSTPIPIMR[10]) Received STALLed Interrupt Enable */
+#define UOTGHS_HSTPIPIMR_CRCERRE (0x1u << 6) /**< \brief (UOTGHS_HSTPIPIMR[10]) CRC Error Interrupt Enable */
+#define UOTGHS_HSTPIPIMR_SHORTPACKETIE (0x1u << 7) /**< \brief (UOTGHS_HSTPIPIMR[10]) Short Packet Interrupt Enable */
+#define UOTGHS_HSTPIPIMR_NBUSYBKE (0x1u << 12) /**< \brief (UOTGHS_HSTPIPIMR[10]) Number of Busy Banks Interrupt Enable */
+#define UOTGHS_HSTPIPIMR_FIFOCON (0x1u << 14) /**< \brief (UOTGHS_HSTPIPIMR[10]) FIFO Control */
+#define UOTGHS_HSTPIPIMR_PDISHDMA (0x1u << 16) /**< \brief (UOTGHS_HSTPIPIMR[10]) Pipe Interrupts Disable HDMA Request Enable */
+#define UOTGHS_HSTPIPIMR_PFREEZE (0x1u << 17) /**< \brief (UOTGHS_HSTPIPIMR[10]) Pipe Freeze */
+#define UOTGHS_HSTPIPIMR_RSTDT (0x1u << 18) /**< \brief (UOTGHS_HSTPIPIMR[10]) Reset Data Toggle */
+/* -------- UOTGHS_HSTPIPIER[10] : (UOTGHS Offset: 0x5F0) Host Pipe Enable Register (n = 0) -------- */
+#define UOTGHS_HSTPIPIER_RXINES (0x1u << 0) /**< \brief (UOTGHS_HSTPIPIER[10]) Received IN Data Interrupt Enable */
+#define UOTGHS_HSTPIPIER_TXOUTES (0x1u << 1) /**< \brief (UOTGHS_HSTPIPIER[10]) Transmitted OUT Data Interrupt Enable */
+#define UOTGHS_HSTPIPIER_TXSTPES (0x1u << 2) /**< \brief (UOTGHS_HSTPIPIER[10]) Transmitted SETUP Interrupt Enable */
+#define UOTGHS_HSTPIPIER_UNDERFIES (0x1u << 2) /**< \brief (UOTGHS_HSTPIPIER[10]) Underflow Interrupt Enable */
+#define UOTGHS_HSTPIPIER_PERRES (0x1u << 3) /**< \brief (UOTGHS_HSTPIPIER[10]) Pipe Error Interrupt Enable */
+#define UOTGHS_HSTPIPIER_NAKEDES (0x1u << 4) /**< \brief (UOTGHS_HSTPIPIER[10]) NAKed Interrupt Enable */
+#define UOTGHS_HSTPIPIER_OVERFIES (0x1u << 5) /**< \brief (UOTGHS_HSTPIPIER[10]) Overflow Interrupt Enable */
+#define UOTGHS_HSTPIPIER_RXSTALLDES (0x1u << 6) /**< \brief (UOTGHS_HSTPIPIER[10]) Received STALLed Interrupt Enable */
+#define UOTGHS_HSTPIPIER_CRCERRES (0x1u << 6) /**< \brief (UOTGHS_HSTPIPIER[10]) CRC Error Interrupt Enable */
+#define UOTGHS_HSTPIPIER_SHORTPACKETIES (0x1u << 7) /**< \brief (UOTGHS_HSTPIPIER[10]) Short Packet Interrupt Enable */
+#define UOTGHS_HSTPIPIER_NBUSYBKES (0x1u << 12) /**< \brief (UOTGHS_HSTPIPIER[10]) Number of Busy Banks Enable */
+#define UOTGHS_HSTPIPIER_PDISHDMAS (0x1u << 16) /**< \brief (UOTGHS_HSTPIPIER[10]) Pipe Interrupts Disable HDMA Request Enable */
+#define UOTGHS_HSTPIPIER_PFREEZES (0x1u << 17) /**< \brief (UOTGHS_HSTPIPIER[10]) Pipe Freeze Enable */
+#define UOTGHS_HSTPIPIER_RSTDTS (0x1u << 18) /**< \brief (UOTGHS_HSTPIPIER[10]) Reset Data Toggle Enable */
+/* -------- UOTGHS_HSTPIPIDR[10] : (UOTGHS Offset: 0x620) Host Pipe Disable Register (n = 0) -------- */
+#define UOTGHS_HSTPIPIDR_RXINEC (0x1u << 0) /**< \brief (UOTGHS_HSTPIPIDR[10]) Received IN Data Interrupt Disable */
+#define UOTGHS_HSTPIPIDR_TXOUTEC (0x1u << 1) /**< \brief (UOTGHS_HSTPIPIDR[10]) Transmitted OUT Data Interrupt Disable */
+#define UOTGHS_HSTPIPIDR_TXSTPEC (0x1u << 2) /**< \brief (UOTGHS_HSTPIPIDR[10]) Transmitted SETUP Interrupt Disable */
+#define UOTGHS_HSTPIPIDR_UNDERFIEC (0x1u << 2) /**< \brief (UOTGHS_HSTPIPIDR[10]) Underflow Interrupt Disable */
+#define UOTGHS_HSTPIPIDR_PERREC (0x1u << 3) /**< \brief (UOTGHS_HSTPIPIDR[10]) Pipe Error Interrupt Disable */
+#define UOTGHS_HSTPIPIDR_NAKEDEC (0x1u << 4) /**< \brief (UOTGHS_HSTPIPIDR[10]) NAKed Interrupt Disable */
+#define UOTGHS_HSTPIPIDR_OVERFIEC (0x1u << 5) /**< \brief (UOTGHS_HSTPIPIDR[10]) Overflow Interrupt Disable */
+#define UOTGHS_HSTPIPIDR_RXSTALLDEC (0x1u << 6) /**< \brief (UOTGHS_HSTPIPIDR[10]) Received STALLed Interrupt Disable */
+#define UOTGHS_HSTPIPIDR_CRCERREC (0x1u << 6) /**< \brief (UOTGHS_HSTPIPIDR[10]) CRC Error Interrupt Disable */
+#define UOTGHS_HSTPIPIDR_SHORTPACKETIEC (0x1u << 7) /**< \brief (UOTGHS_HSTPIPIDR[10]) Short Packet Interrupt Disable */
+#define UOTGHS_HSTPIPIDR_NBUSYBKEC (0x1u << 12) /**< \brief (UOTGHS_HSTPIPIDR[10]) Number of Busy Banks Disable */
+#define UOTGHS_HSTPIPIDR_FIFOCONC (0x1u << 14) /**< \brief (UOTGHS_HSTPIPIDR[10]) FIFO Control Disable */
+#define UOTGHS_HSTPIPIDR_PDISHDMAC (0x1u << 16) /**< \brief (UOTGHS_HSTPIPIDR[10]) Pipe Interrupts Disable HDMA Request Disable */
+#define UOTGHS_HSTPIPIDR_PFREEZEC (0x1u << 17) /**< \brief (UOTGHS_HSTPIPIDR[10]) Pipe Freeze Disable */
+/* -------- UOTGHS_HSTPIPINRQ[10] : (UOTGHS Offset: 0x650) Host Pipe IN Request Register (n = 0) -------- */
+#define UOTGHS_HSTPIPINRQ_INRQ_Pos 0
+#define UOTGHS_HSTPIPINRQ_INRQ_Msk (0xffu << UOTGHS_HSTPIPINRQ_INRQ_Pos) /**< \brief (UOTGHS_HSTPIPINRQ[10]) IN Request Number before Freeze */
+#define UOTGHS_HSTPIPINRQ_INRQ(value) ((UOTGHS_HSTPIPINRQ_INRQ_Msk & ((value) << UOTGHS_HSTPIPINRQ_INRQ_Pos)))
+#define UOTGHS_HSTPIPINRQ_INMODE (0x1u << 8) /**< \brief (UOTGHS_HSTPIPINRQ[10]) IN Request Mode */
+/* -------- UOTGHS_HSTPIPERR[10] : (UOTGHS Offset: 0x680) Host Pipe Error Register (n = 0) -------- */
+#define UOTGHS_HSTPIPERR_DATATGL (0x1u << 0) /**< \brief (UOTGHS_HSTPIPERR[10]) Data Toggle Error */
+#define UOTGHS_HSTPIPERR_DATAPID (0x1u << 1) /**< \brief (UOTGHS_HSTPIPERR[10]) Data PID Error */
+#define UOTGHS_HSTPIPERR_PID (0x1u << 2) /**< \brief (UOTGHS_HSTPIPERR[10]) PID Error */
+#define UOTGHS_HSTPIPERR_TIMEOUT (0x1u << 3) /**< \brief (UOTGHS_HSTPIPERR[10]) Time-Out Error */
+#define UOTGHS_HSTPIPERR_CRC16 (0x1u << 4) /**< \brief (UOTGHS_HSTPIPERR[10]) CRC16 Error */
+#define UOTGHS_HSTPIPERR_COUNTER_Pos 5
+#define UOTGHS_HSTPIPERR_COUNTER_Msk (0x3u << UOTGHS_HSTPIPERR_COUNTER_Pos) /**< \brief (UOTGHS_HSTPIPERR[10]) Error Counter */
+#define UOTGHS_HSTPIPERR_COUNTER(value) ((UOTGHS_HSTPIPERR_COUNTER_Msk & ((value) << UOTGHS_HSTPIPERR_COUNTER_Pos)))
+/* -------- UOTGHS_HSTDMANXTDSC : (UOTGHS Offset: N/A) Host DMA Channel Next Descriptor Address Register -------- */
+#define UOTGHS_HSTDMANXTDSC_NXT_DSC_ADD_Pos 0
+#define UOTGHS_HSTDMANXTDSC_NXT_DSC_ADD_Msk (0xffffffffu << UOTGHS_HSTDMANXTDSC_NXT_DSC_ADD_Pos) /**< \brief (UOTGHS_HSTDMANXTDSC) Next Descriptor Address */
+#define UOTGHS_HSTDMANXTDSC_NXT_DSC_ADD(value) ((UOTGHS_HSTDMANXTDSC_NXT_DSC_ADD_Msk & ((value) << UOTGHS_HSTDMANXTDSC_NXT_DSC_ADD_Pos)))
+/* -------- UOTGHS_HSTDMAADDRESS : (UOTGHS Offset: N/A) Host DMA Channel Address Register -------- */
+#define UOTGHS_HSTDMAADDRESS_BUFF_ADD_Pos 0
+#define UOTGHS_HSTDMAADDRESS_BUFF_ADD_Msk (0xffffffffu << UOTGHS_HSTDMAADDRESS_BUFF_ADD_Pos) /**< \brief (UOTGHS_HSTDMAADDRESS) Buffer Address */
+#define UOTGHS_HSTDMAADDRESS_BUFF_ADD(value) ((UOTGHS_HSTDMAADDRESS_BUFF_ADD_Msk & ((value) << UOTGHS_HSTDMAADDRESS_BUFF_ADD_Pos)))
+/* -------- UOTGHS_HSTDMACONTROL : (UOTGHS Offset: N/A) Host DMA Channel Control Register -------- */
+#define UOTGHS_HSTDMACONTROL_CHANN_ENB (0x1u << 0) /**< \brief (UOTGHS_HSTDMACONTROL) Channel Enable Command */
+#define UOTGHS_HSTDMACONTROL_LDNXT_DSC (0x1u << 1) /**< \brief (UOTGHS_HSTDMACONTROL) Load Next Channel Transfer Descriptor Enable Command */
+#define UOTGHS_HSTDMACONTROL_END_TR_EN (0x1u << 2) /**< \brief (UOTGHS_HSTDMACONTROL) End of Transfer Enable (Control) */
+#define UOTGHS_HSTDMACONTROL_END_B_EN (0x1u << 3) /**< \brief (UOTGHS_HSTDMACONTROL) End of Buffer Enable Control */
+#define UOTGHS_HSTDMACONTROL_END_TR_IT (0x1u << 4) /**< \brief (UOTGHS_HSTDMACONTROL) End of Transfer Interrupt Enable */
+#define UOTGHS_HSTDMACONTROL_END_BUFFIT (0x1u << 5) /**< \brief (UOTGHS_HSTDMACONTROL) End of Buffer Interrupt Enable */
+#define UOTGHS_HSTDMACONTROL_DESC_LD_IT (0x1u << 6) /**< \brief (UOTGHS_HSTDMACONTROL) Descriptor Loaded Interrupt Enable */
+#define UOTGHS_HSTDMACONTROL_BURST_LCK (0x1u << 7) /**< \brief (UOTGHS_HSTDMACONTROL) Burst Lock Enable */
+#define UOTGHS_HSTDMACONTROL_BUFF_LENGTH_Pos 16
+#define UOTGHS_HSTDMACONTROL_BUFF_LENGTH_Msk (0xffffu << UOTGHS_HSTDMACONTROL_BUFF_LENGTH_Pos) /**< \brief (UOTGHS_HSTDMACONTROL) Buffer Byte Length (Write-only) */
+#define UOTGHS_HSTDMACONTROL_BUFF_LENGTH(value) ((UOTGHS_HSTDMACONTROL_BUFF_LENGTH_Msk & ((value) << UOTGHS_HSTDMACONTROL_BUFF_LENGTH_Pos)))
+/* -------- UOTGHS_HSTDMASTATUS : (UOTGHS Offset: N/A) Host DMA Channel Status Register -------- */
+#define UOTGHS_HSTDMASTATUS_CHANN_ENB (0x1u << 0) /**< \brief (UOTGHS_HSTDMASTATUS) Channel Enable Status */
+#define UOTGHS_HSTDMASTATUS_CHANN_ACT (0x1u << 1) /**< \brief (UOTGHS_HSTDMASTATUS) Channel Active Status */
+#define UOTGHS_HSTDMASTATUS_END_TR_ST (0x1u << 4) /**< \brief (UOTGHS_HSTDMASTATUS) End of Channel Transfer Status */
+#define UOTGHS_HSTDMASTATUS_END_BF_ST (0x1u << 5) /**< \brief (UOTGHS_HSTDMASTATUS) End of Channel Buffer Status */
+#define UOTGHS_HSTDMASTATUS_DESC_LDST (0x1u << 6) /**< \brief (UOTGHS_HSTDMASTATUS) Descriptor Loaded Status */
+#define UOTGHS_HSTDMASTATUS_BUFF_COUNT_Pos 16
+#define UOTGHS_HSTDMASTATUS_BUFF_COUNT_Msk (0xffffu << UOTGHS_HSTDMASTATUS_BUFF_COUNT_Pos) /**< \brief (UOTGHS_HSTDMASTATUS) Buffer Byte Count */
+#define UOTGHS_HSTDMASTATUS_BUFF_COUNT(value) ((UOTGHS_HSTDMASTATUS_BUFF_COUNT_Msk & ((value) << UOTGHS_HSTDMASTATUS_BUFF_COUNT_Pos)))
+/* -------- UOTGHS_CTRL : (UOTGHS Offset: 0x0800) General Control Register -------- */
+#define UOTGHS_CTRL_IDTE (0x1u << 0) /**< \brief (UOTGHS_CTRL) ID Transition Interrupt Enable */
+#define UOTGHS_CTRL_VBUSTE (0x1u << 1) /**< \brief (UOTGHS_CTRL) VBus Transition Interrupt Enable */
+#define UOTGHS_CTRL_SRPE (0x1u << 2) /**< \brief (UOTGHS_CTRL) SRP Interrupt Enable */
+#define UOTGHS_CTRL_VBERRE (0x1u << 3) /**< \brief (UOTGHS_CTRL) VBus Error Interrupt Enable */
+#define UOTGHS_CTRL_BCERRE (0x1u << 4) /**< \brief (UOTGHS_CTRL) B-Connection Error Interrupt Enable */
+#define UOTGHS_CTRL_ROLEEXE (0x1u << 5) /**< \brief (UOTGHS_CTRL) Role Exchange Interrupt Enable */
+#define UOTGHS_CTRL_HNPERRE (0x1u << 6) /**< \brief (UOTGHS_CTRL) HNP Error Interrupt Enable */
+#define UOTGHS_CTRL_STOE (0x1u << 7) /**< \brief (UOTGHS_CTRL) Suspend Time-Out Interrupt Enable */
+#define UOTGHS_CTRL_VBUSHWC (0x1u << 8) /**< \brief (UOTGHS_CTRL) VBus Hardware Control */
+#define UOTGHS_CTRL_SRPSEL (0x1u << 9) /**< \brief (UOTGHS_CTRL) SRP Selection */
+#define UOTGHS_CTRL_SRPREQ (0x1u << 10) /**< \brief (UOTGHS_CTRL) SRP Request */
+#define UOTGHS_CTRL_HNPREQ (0x1u << 11) /**< \brief (UOTGHS_CTRL) HNP Request */
+#define UOTGHS_CTRL_OTGPADE (0x1u << 12) /**< \brief (UOTGHS_CTRL) OTG Pad Enable */
+#define UOTGHS_CTRL_VBUSPO (0x1u << 13) /**< \brief (UOTGHS_CTRL) VBus Polarity Off */
+#define UOTGHS_CTRL_FRZCLK (0x1u << 14) /**< \brief (UOTGHS_CTRL) Freeze USB Clock */
+#define UOTGHS_CTRL_USBE (0x1u << 15) /**< \brief (UOTGHS_CTRL) UOTGHS Enable */
+#define UOTGHS_CTRL_TIMVALUE_Pos 16
+#define UOTGHS_CTRL_TIMVALUE_Msk (0x3u << UOTGHS_CTRL_TIMVALUE_Pos) /**< \brief (UOTGHS_CTRL) Timer Value */
+#define UOTGHS_CTRL_TIMVALUE(value) ((UOTGHS_CTRL_TIMVALUE_Msk & ((value) << UOTGHS_CTRL_TIMVALUE_Pos)))
+#define UOTGHS_CTRL_TIMPAGE_Pos 20
+#define UOTGHS_CTRL_TIMPAGE_Msk (0x3u << UOTGHS_CTRL_TIMPAGE_Pos) /**< \brief (UOTGHS_CTRL) Timer Page */
+#define UOTGHS_CTRL_TIMPAGE(value) ((UOTGHS_CTRL_TIMPAGE_Msk & ((value) << UOTGHS_CTRL_TIMPAGE_Pos)))
+#define UOTGHS_CTRL_UNLOCK (0x1u << 22) /**< \brief (UOTGHS_CTRL) Timer Access Unlock */
+#define UOTGHS_CTRL_UIDE (0x1u << 24) /**< \brief (UOTGHS_CTRL) UOTGID Pin Enable */
+#define UOTGHS_CTRL_UIDE_UIMOD (0x0u << 24) /**< \brief (UOTGHS_CTRL) The USB mode (device/host) is selected from the UIMOD bit. */
+#define UOTGHS_CTRL_UIDE_UOTGID (0x1u << 24) /**< \brief (UOTGHS_CTRL) The USB mode (device/host) is selected from the UOTGID input pin. */
+#define UOTGHS_CTRL_UIMOD (0x1u << 25) /**< \brief (UOTGHS_CTRL) UOTGHS Mode */
+#define UOTGHS_CTRL_UIMOD_Host (0x0u << 25) /**< \brief (UOTGHS_CTRL) The module is in USB host mode. */
+#define UOTGHS_CTRL_UIMOD_Device (0x1u << 25) /**< \brief (UOTGHS_CTRL) The module is in USB device mode. */
+/* -------- UOTGHS_SR : (UOTGHS Offset: 0x0804) General Status Register -------- */
+#define UOTGHS_SR_IDTI (0x1u << 0) /**< \brief (UOTGHS_SR) ID Transition Interrupt */
+#define UOTGHS_SR_VBUSTI (0x1u << 1) /**< \brief (UOTGHS_SR) VBus Transition Interrupt */
+#define UOTGHS_SR_SRPI (0x1u << 2) /**< \brief (UOTGHS_SR) SRP Interrupt */
+#define UOTGHS_SR_VBERRI (0x1u << 3) /**< \brief (UOTGHS_SR) VBus Error Interrupt */
+#define UOTGHS_SR_BCERRI (0x1u << 4) /**< \brief (UOTGHS_SR) B-Connection Error Interrupt */
+#define UOTGHS_SR_ROLEEXI (0x1u << 5) /**< \brief (UOTGHS_SR) Role Exchange Interrupt */
+#define UOTGHS_SR_HNPERRI (0x1u << 6) /**< \brief (UOTGHS_SR) HNP Error Interrupt */
+#define UOTGHS_SR_STOI (0x1u << 7) /**< \brief (UOTGHS_SR) Suspend Time-Out Interrupt */
+#define UOTGHS_SR_VBUSRQ (0x1u << 9) /**< \brief (UOTGHS_SR) VBus Request */
+#define UOTGHS_SR_ID (0x1u << 10) /**< \brief (UOTGHS_SR) UOTGID Pin State */
+#define UOTGHS_SR_VBUS (0x1u << 11) /**< \brief (UOTGHS_SR) VBus Level */
+#define UOTGHS_SR_SPEED_Pos 12
+#define UOTGHS_SR_SPEED_Msk (0x3u << UOTGHS_SR_SPEED_Pos) /**< \brief (UOTGHS_SR) Speed Status */
+#define UOTGHS_SR_SPEED_FULL_SPEED (0x0u << 12) /**< \brief (UOTGHS_SR) Full-Speed mode */
+#define UOTGHS_SR_SPEED_HIGH_SPEED (0x1u << 12) /**< \brief (UOTGHS_SR) High-Speed mode */
+#define UOTGHS_SR_SPEED_LOW_SPEED (0x2u << 12) /**< \brief (UOTGHS_SR) Low-Speed mode */
+#define UOTGHS_SR_CLKUSABLE (0x1u << 14) /**< \brief (UOTGHS_SR) UTMI Clock Usable */
+/* -------- UOTGHS_SCR : (UOTGHS Offset: 0x0808) General Status Clear Register -------- */
+#define UOTGHS_SCR_IDTIC (0x1u << 0) /**< \brief (UOTGHS_SCR) ID Transition Interrupt Clear */
+#define UOTGHS_SCR_VBUSTIC (0x1u << 1) /**< \brief (UOTGHS_SCR) VBus Transition Interrupt Clear */
+#define UOTGHS_SCR_SRPIC (0x1u << 2) /**< \brief (UOTGHS_SCR) SRP Interrupt Clear */
+#define UOTGHS_SCR_VBERRIC (0x1u << 3) /**< \brief (UOTGHS_SCR) VBus Error Interrupt Clear */
+#define UOTGHS_SCR_BCERRIC (0x1u << 4) /**< \brief (UOTGHS_SCR) B-Connection Error Interrupt Clear */
+#define UOTGHS_SCR_ROLEEXIC (0x1u << 5) /**< \brief (UOTGHS_SCR) Role Exchange Interrupt Clear */
+#define UOTGHS_SCR_HNPERRIC (0x1u << 6) /**< \brief (UOTGHS_SCR) HNP Error Interrupt Clear */
+#define UOTGHS_SCR_STOIC (0x1u << 7) /**< \brief (UOTGHS_SCR) Suspend Time-Out Interrupt Clear */
+#define UOTGHS_SCR_VBUSRQC (0x1u << 9) /**< \brief (UOTGHS_SCR) VBus Request Clear */
+/* -------- UOTGHS_SFR : (UOTGHS Offset: 0x080C) General Status Set Register -------- */
+#define UOTGHS_SFR_IDTIS (0x1u << 0) /**< \brief (UOTGHS_SFR) ID Transition Interrupt Set */
+#define UOTGHS_SFR_VBUSTIS (0x1u << 1) /**< \brief (UOTGHS_SFR) VBus Transition Interrupt Set */
+#define UOTGHS_SFR_SRPIS (0x1u << 2) /**< \brief (UOTGHS_SFR) SRP Interrupt Set */
+#define UOTGHS_SFR_VBERRIS (0x1u << 3) /**< \brief (UOTGHS_SFR) VBus Error Interrupt Set */
+#define UOTGHS_SFR_BCERRIS (0x1u << 4) /**< \brief (UOTGHS_SFR) B-Connection Error Interrupt Set */
+#define UOTGHS_SFR_ROLEEXIS (0x1u << 5) /**< \brief (UOTGHS_SFR) Role Exchange Interrupt Set */
+#define UOTGHS_SFR_HNPERRIS (0x1u << 6) /**< \brief (UOTGHS_SFR) HNP Error Interrupt Set */
+#define UOTGHS_SFR_STOIS (0x1u << 7) /**< \brief (UOTGHS_SFR) Suspend Time-Out Interrupt Set */
+#define UOTGHS_SFR_VBUSRQS (0x1u << 9) /**< \brief (UOTGHS_SFR) VBus Request Set */
+/* -------- UOTGHS_FSM : (UOTGHS Offset: 0x082C) General Finite State Machine Register -------- */
+#define UOTGHS_FSM_DRDSTATE_Pos 0
+#define UOTGHS_FSM_DRDSTATE_Msk (0xfu << UOTGHS_FSM_DRDSTATE_Pos) /**< \brief (UOTGHS_FSM) */
+#define UOTGHS_FSM_DRDSTATE_A_IDLESTATE (0x0u << 0) /**< \brief (UOTGHS_FSM) This is the start state for A-devices (when the ID pin is 0) */
+#define UOTGHS_FSM_DRDSTATE_A_WAIT_VRISE (0x1u << 0) /**< \brief (UOTGHS_FSM) In this state, the A-device waits for the voltage on VBus to rise above the A-device VBus Valid threshold (4.4 V). */
+#define UOTGHS_FSM_DRDSTATE_A_WAIT_BCON (0x2u << 0) /**< \brief (UOTGHS_FSM) In this state, the A-device waits for the B-device to signal a connection. */
+#define UOTGHS_FSM_DRDSTATE_A_HOST (0x3u << 0) /**< \brief (UOTGHS_FSM) In this state, the A-device that operates in Host mode is operational. */
+#define UOTGHS_FSM_DRDSTATE_A_SUSPEND (0x4u << 0) /**< \brief (UOTGHS_FSM) The A-device operating as a host is in the suspend mode. */
+#define UOTGHS_FSM_DRDSTATE_A_PERIPHERAL (0x5u << 0) /**< \brief (UOTGHS_FSM) The A-device operates as a peripheral. */
+#define UOTGHS_FSM_DRDSTATE_A_WAIT_VFALL (0x6u << 0) /**< \brief (UOTGHS_FSM) In this state, the A-device waits for the voltage on VBus to drop below the A-device Session Valid threshold (1.4 V). */
+#define UOTGHS_FSM_DRDSTATE_A_VBUS_ERR (0x7u << 0) /**< \brief (UOTGHS_FSM) In this state, the A-device waits for recovery of the over-current condition that caused it to enter this state. */
+#define UOTGHS_FSM_DRDSTATE_A_WAIT_DISCHARGE (0x8u << 0) /**< \brief (UOTGHS_FSM) In this state, the A-device waits for the data USB line to discharge (100 us). */
+#define UOTGHS_FSM_DRDSTATE_B_IDLE (0x9u << 0) /**< \brief (UOTGHS_FSM) This is the start state for B-device (when the ID pin is 1). */
+#define UOTGHS_FSM_DRDSTATE_B_PERIPHERAL (0xAu << 0) /**< \brief (UOTGHS_FSM) In this state, the B-device acts as the peripheral. */
+#define UOTGHS_FSM_DRDSTATE_B_WAIT_BEGIN_HNP (0xBu << 0) /**< \brief (UOTGHS_FSM) In this state, the B-device is in suspend mode and waits until 3 ms before initiating the HNP protocol if requested. */
+#define UOTGHS_FSM_DRDSTATE_B_WAIT_DISCHARGE (0xCu << 0) /**< \brief (UOTGHS_FSM) In this state, the B-device waits for the data USB line to discharge (100 us) before becoming Host. */
+#define UOTGHS_FSM_DRDSTATE_B_WAIT_ACON (0xDu << 0) /**< \brief (UOTGHS_FSM) In this state, the B-device waits for the A-device to signal a connect before becoming B-Host. */
+#define UOTGHS_FSM_DRDSTATE_B_HOST (0xEu << 0) /**< \brief (UOTGHS_FSM) In this state, the B-device acts as the Host. */
+#define UOTGHS_FSM_DRDSTATE_B_SRP_INIT (0xFu << 0) /**< \brief (UOTGHS_FSM) In this state, the B-device attempts to start a session using the SRP protocol. */
+
+/*@}*/
+
+/* ============================================================================= */
+/** SOFTWARE API DEFINITION FOR Universal Synchronous Asynchronous Receiver Transmitter */
+/* ============================================================================= */
+/** \addtogroup SAM3XA_USART Universal Synchronous Asynchronous Receiver Transmitter */
+/*@{*/
+
+#ifndef __ASSEMBLY__
+/** \brief Usart hardware registers */
+typedef struct {
+ WoReg US_CR; /**< \brief (Usart Offset: 0x0000) Control Register */
+ RwReg US_MR; /**< \brief (Usart Offset: 0x0004) Mode Register */
+ WoReg US_IER; /**< \brief (Usart Offset: 0x0008) Interrupt Enable Register */
+ WoReg US_IDR; /**< \brief (Usart Offset: 0x000C) Interrupt Disable Register */
+ RoReg US_IMR; /**< \brief (Usart Offset: 0x0010) Interrupt Mask Register */
+ RoReg US_CSR; /**< \brief (Usart Offset: 0x0014) Channel Status Register */
+ RoReg US_RHR; /**< \brief (Usart Offset: 0x0018) Receiver Holding Register */
+ WoReg US_THR; /**< \brief (Usart Offset: 0x001C) Transmitter Holding Register */
+ RwReg US_BRGR; /**< \brief (Usart Offset: 0x0020) Baud Rate Generator Register */
+ RwReg US_RTOR; /**< \brief (Usart Offset: 0x0024) Receiver Time-out Register */
+ RwReg US_TTGR; /**< \brief (Usart Offset: 0x0028) Transmitter Timeguard Register */
+ RoReg Reserved1[5];
+ RwReg US_FIDI; /**< \brief (Usart Offset: 0x0040) FI DI Ratio Register */
+ RoReg US_NER; /**< \brief (Usart Offset: 0x0044) Number of Errors Register */
+ RoReg Reserved2[1];
+ RwReg US_IF; /**< \brief (Usart Offset: 0x004C) IrDA Filter Register */
+ RwReg US_MAN; /**< \brief (Usart Offset: 0x0050) Manchester Encoder Decoder Register */
+ RwReg US_LINMR; /**< \brief (Usart Offset: 0x0054) LIN Mode Register */
+ RwReg US_LINIR; /**< \brief (Usart Offset: 0x0058) LIN Identifier Register */
+ RoReg Reserved3[34];
+ RwReg US_WPMR; /**< \brief (Usart Offset: 0xE4) Write Protect Mode Register */
+ RoReg US_WPSR; /**< \brief (Usart Offset: 0xE8) Write Protect Status Register */
+ RoReg Reserved4[5];
+ RwReg US_RPR; /**< \brief (Usart Offset: 0x100) Receive Pointer Register */
+ RwReg US_RCR; /**< \brief (Usart Offset: 0x104) Receive Counter Register */
+ RwReg US_TPR; /**< \brief (Usart Offset: 0x108) Transmit Pointer Register */
+ RwReg US_TCR; /**< \brief (Usart Offset: 0x10C) Transmit Counter Register */
+ RwReg US_RNPR; /**< \brief (Usart Offset: 0x110) Receive Next Pointer Register */
+ RwReg US_RNCR; /**< \brief (Usart Offset: 0x114) Receive Next Counter Register */
+ RwReg US_TNPR; /**< \brief (Usart Offset: 0x118) Transmit Next Pointer Register */
+ RwReg US_TNCR; /**< \brief (Usart Offset: 0x11C) Transmit Next Counter Register */
+ WoReg US_PTCR; /**< \brief (Usart Offset: 0x120) Transfer Control Register */
+ RoReg US_PTSR; /**< \brief (Usart Offset: 0x124) Transfer Status Register */
+} Usart;
+#endif /* __ASSEMBLY__ */
+/* -------- US_CR : (USART Offset: 0x0000) Control Register -------- */
+#define US_CR_RSTRX (0x1u << 2) /**< \brief (US_CR) Reset Receiver */
+#define US_CR_RSTTX (0x1u << 3) /**< \brief (US_CR) Reset Transmitter */
+#define US_CR_RXEN (0x1u << 4) /**< \brief (US_CR) Receiver Enable */
+#define US_CR_RXDIS (0x1u << 5) /**< \brief (US_CR) Receiver Disable */
+#define US_CR_TXEN (0x1u << 6) /**< \brief (US_CR) Transmitter Enable */
+#define US_CR_TXDIS (0x1u << 7) /**< \brief (US_CR) Transmitter Disable */
+#define US_CR_RSTSTA (0x1u << 8) /**< \brief (US_CR) Reset Status Bits */
+#define US_CR_STTBRK (0x1u << 9) /**< \brief (US_CR) Start Break */
+#define US_CR_STPBRK (0x1u << 10) /**< \brief (US_CR) Stop Break */
+#define US_CR_STTTO (0x1u << 11) /**< \brief (US_CR) Start Time-out */
+#define US_CR_SENDA (0x1u << 12) /**< \brief (US_CR) Send Address */
+#define US_CR_RSTIT (0x1u << 13) /**< \brief (US_CR) Reset Iterations */
+#define US_CR_RSTNACK (0x1u << 14) /**< \brief (US_CR) Reset Non Acknowledge */
+#define US_CR_RETTO (0x1u << 15) /**< \brief (US_CR) Rearm Time-out */
+#define US_CR_RTSEN (0x1u << 18) /**< \brief (US_CR) Request to Send Enable */
+#define US_CR_FCS (0x1u << 18) /**< \brief (US_CR) Force SPI Chip Select */
+#define US_CR_RTSDIS (0x1u << 19) /**< \brief (US_CR) Request to Send Disable */
+#define US_CR_RCS (0x1u << 19) /**< \brief (US_CR) Release SPI Chip Select */
+#define US_CR_LINABT (0x1u << 20) /**< \brief (US_CR) Abort LIN Transmission */
+#define US_CR_LINWKUP (0x1u << 21) /**< \brief (US_CR) Send LIN Wakeup Signal */
+/* -------- US_MR : (USART Offset: 0x0004) Mode Register -------- */
+#define US_MR_USART_MODE_Pos 0
+#define US_MR_USART_MODE_Msk (0xfu << US_MR_USART_MODE_Pos) /**< \brief (US_MR) */
+#define US_MR_USART_MODE_NORMAL (0x0u << 0) /**< \brief (US_MR) Normal mode */
+#define US_MR_USART_MODE_RS485 (0x1u << 0) /**< \brief (US_MR) RS485 */
+#define US_MR_USART_MODE_HW_HANDSHAKING (0x2u << 0) /**< \brief (US_MR) Hardware Handshaking */
+#define US_MR_USART_MODE_IS07816_T_0 (0x4u << 0) /**< \brief (US_MR) IS07816 Protocol: T = 0 */
+#define US_MR_USART_MODE_IS07816_T_1 (0x6u << 0) /**< \brief (US_MR) IS07816 Protocol: T = 1 */
+#define US_MR_USART_MODE_IRDA (0x8u << 0) /**< \brief (US_MR) IrDA */
+#define US_MR_USART_MODE_LIN_MASTER (0xAu << 0) /**< \brief (US_MR) LIN Master */
+#define US_MR_USART_MODE_LIN_SLAVE (0xBu << 0) /**< \brief (US_MR) LIN Slave */
+#define US_MR_USART_MODE_SPI_MASTER (0xEu << 0) /**< \brief (US_MR) SPI Master */
+#define US_MR_USART_MODE_SPI_SLAVE (0xFu << 0) /**< \brief (US_MR) SPI Slave */
+#define US_MR_USCLKS_Pos 4
+#define US_MR_USCLKS_Msk (0x3u << US_MR_USCLKS_Pos) /**< \brief (US_MR) Clock Selection */
+#define US_MR_USCLKS_MCK (0x0u << 4) /**< \brief (US_MR) Master Clock MCK is selected */
+#define US_MR_USCLKS_DIV (0x1u << 4) /**< \brief (US_MR) Internal Clock Divided MCK/DIV (DIV=8) is selected */
+#define US_MR_USCLKS_SCK (0x3u << 4) /**< \brief (US_MR) Serial Clock SLK is selected */
+#define US_MR_CHRL_Pos 6
+#define US_MR_CHRL_Msk (0x3u << US_MR_CHRL_Pos) /**< \brief (US_MR) Character Length. */
+#define US_MR_CHRL_5_BIT (0x0u << 6) /**< \brief (US_MR) Character length is 5 bits */
+#define US_MR_CHRL_6_BIT (0x1u << 6) /**< \brief (US_MR) Character length is 6 bits */
+#define US_MR_CHRL_7_BIT (0x2u << 6) /**< \brief (US_MR) Character length is 7 bits */
+#define US_MR_CHRL_8_BIT (0x3u << 6) /**< \brief (US_MR) Character length is 8 bits */
+#define US_MR_SYNC (0x1u << 8) /**< \brief (US_MR) Synchronous Mode Select */
+#define US_MR_CPHA (0x1u << 8) /**< \brief (US_MR) SPI Clock Phase */
+#define US_MR_PAR_Pos 9
+#define US_MR_PAR_Msk (0x7u << US_MR_PAR_Pos) /**< \brief (US_MR) Parity Type */
+#define US_MR_PAR_EVEN (0x0u << 9) /**< \brief (US_MR) Even parity */
+#define US_MR_PAR_ODD (0x1u << 9) /**< \brief (US_MR) Odd parity */
+#define US_MR_PAR_SPACE (0x2u << 9) /**< \brief (US_MR) Parity forced to 0 (Space) */
+#define US_MR_PAR_MARK (0x3u << 9) /**< \brief (US_MR) Parity forced to 1 (Mark) */
+#define US_MR_PAR_NO (0x4u << 9) /**< \brief (US_MR) No parity */
+#define US_MR_PAR_MULTIDROP (0x6u << 9) /**< \brief (US_MR) Multidrop mode */
+#define US_MR_NBSTOP_Pos 12
+#define US_MR_NBSTOP_Msk (0x3u << US_MR_NBSTOP_Pos) /**< \brief (US_MR) Number of Stop Bits */
+#define US_MR_NBSTOP_1_BIT (0x0u << 12) /**< \brief (US_MR) 1 stop bit */
+#define US_MR_NBSTOP_1_5_BIT (0x1u << 12) /**< \brief (US_MR) 1.5 stop bit (SYNC = 0) or reserved (SYNC = 1) */
+#define US_MR_NBSTOP_2_BIT (0x2u << 12) /**< \brief (US_MR) 2 stop bits */
+#define US_MR_CHMODE_Pos 14
+#define US_MR_CHMODE_Msk (0x3u << US_MR_CHMODE_Pos) /**< \brief (US_MR) Channel Mode */
+#define US_MR_CHMODE_NORMAL (0x0u << 14) /**< \brief (US_MR) Normal Mode */
+#define US_MR_CHMODE_AUTOMATIC (0x1u << 14) /**< \brief (US_MR) Automatic Echo. Receiver input is connected to the TXD pin. */
+#define US_MR_CHMODE_LOCAL_LOOPBACK (0x2u << 14) /**< \brief (US_MR) Local Loopback. Transmitter output is connected to the Receiver Input. */
+#define US_MR_CHMODE_REMOTE_LOOPBACK (0x3u << 14) /**< \brief (US_MR) Remote Loopback. RXD pin is internally connected to the TXD pin. */
+#define US_MR_MSBF (0x1u << 16) /**< \brief (US_MR) Bit Order */
+#define US_MR_CPOL (0x1u << 16) /**< \brief (US_MR) SPI Clock Polarity */
+#define US_MR_MODE9 (0x1u << 17) /**< \brief (US_MR) 9-bit Character Length */
+#define US_MR_CLKO (0x1u << 18) /**< \brief (US_MR) Clock Output Select */
+#define US_MR_OVER (0x1u << 19) /**< \brief (US_MR) Oversampling Mode */
+#define US_MR_INACK (0x1u << 20) /**< \brief (US_MR) Inhibit Non Acknowledge */
+#define US_MR_DSNACK (0x1u << 21) /**< \brief (US_MR) Disable Successive NACK */
+#define US_MR_VAR_SYNC (0x1u << 22) /**< \brief (US_MR) Variable Synchronization of Command/Data Sync Start Frame Delimiter */
+#define US_MR_INVDATA (0x1u << 23) /**< \brief (US_MR) INverted Data */
+#define US_MR_MAX_ITERATION_Pos 24
+#define US_MR_MAX_ITERATION_Msk (0x7u << US_MR_MAX_ITERATION_Pos) /**< \brief (US_MR) */
+#define US_MR_MAX_ITERATION(value) ((US_MR_MAX_ITERATION_Msk & ((value) << US_MR_MAX_ITERATION_Pos)))
+#define US_MR_FILTER (0x1u << 28) /**< \brief (US_MR) Infrared Receive Line Filter */
+#define US_MR_MAN (0x1u << 29) /**< \brief (US_MR) Manchester Encoder/Decoder Enable */
+#define US_MR_MODSYNC (0x1u << 30) /**< \brief (US_MR) Manchester Synchronization Mode */
+#define US_MR_ONEBIT (0x1u << 31) /**< \brief (US_MR) Start Frame Delimiter Selector */
+/* -------- US_IER : (USART Offset: 0x0008) Interrupt Enable Register -------- */
+#define US_IER_RXRDY (0x1u << 0) /**< \brief (US_IER) RXRDY Interrupt Enable */
+#define US_IER_TXRDY (0x1u << 1) /**< \brief (US_IER) TXRDY Interrupt Enable */
+#define US_IER_RXBRK (0x1u << 2) /**< \brief (US_IER) Receiver Break Interrupt Enable */
+#define US_IER_ENDRX (0x1u << 3) /**< \brief (US_IER) End of Receive Transfer Interrupt Enable */
+#define US_IER_ENDTX (0x1u << 4) /**< \brief (US_IER) End of Transmit Interrupt Enable */
+#define US_IER_OVRE (0x1u << 5) /**< \brief (US_IER) Overrun Error Interrupt Enable */
+#define US_IER_FRAME (0x1u << 6) /**< \brief (US_IER) Framing Error Interrupt Enable */
+#define US_IER_PARE (0x1u << 7) /**< \brief (US_IER) Parity Error Interrupt Enable */
+#define US_IER_TIMEOUT (0x1u << 8) /**< \brief (US_IER) Time-out Interrupt Enable */
+#define US_IER_TXEMPTY (0x1u << 9) /**< \brief (US_IER) TXEMPTY Interrupt Enable */
+#define US_IER_ITER (0x1u << 10) /**< \brief (US_IER) Max number of Repetitions Reached */
+#define US_IER_UNRE (0x1u << 10) /**< \brief (US_IER) SPI Underrun Error */
+#define US_IER_TXBUFE (0x1u << 11) /**< \brief (US_IER) Buffer Empty Interrupt Enable */
+#define US_IER_RXBUFF (0x1u << 12) /**< \brief (US_IER) Buffer Full Interrupt Enable */
+#define US_IER_NACK (0x1u << 13) /**< \brief (US_IER) Non Acknowledge Interrupt Enable */
+#define US_IER_LINBK (0x1u << 13) /**< \brief (US_IER) LIN Break Sent or LIN Break Received Interrupt Enable */
+#define US_IER_LINID (0x1u << 14) /**< \brief (US_IER) LIN Identifier Sent or LIN Identifier Received Interrupt Enable */
+#define US_IER_LINTC (0x1u << 15) /**< \brief (US_IER) LIN Transfer Completed Interrupt Enable */
+#define US_IER_CTSIC (0x1u << 19) /**< \brief (US_IER) Clear to Send Input Change Interrupt Enable */
+#define US_IER_MANE (0x1u << 24) /**< \brief (US_IER) Manchester Error Interrupt Enable */
+#define US_IER_LINBE (0x1u << 25) /**< \brief (US_IER) LIN Bus Error Interrupt Enable */
+#define US_IER_LINISFE (0x1u << 26) /**< \brief (US_IER) LIN Inconsistent Synch Field Error Interrupt Enable */
+#define US_IER_LINIPE (0x1u << 27) /**< \brief (US_IER) LIN Identifier Parity Interrupt Enable */
+#define US_IER_LINCE (0x1u << 28) /**< \brief (US_IER) LIN Checksum Error Interrupt Enable */
+#define US_IER_LINSNRE (0x1u << 29) /**< \brief (US_IER) LIN Slave Not Responding Error Interrupt Enable */
+/* -------- US_IDR : (USART Offset: 0x000C) Interrupt Disable Register -------- */
+#define US_IDR_RXRDY (0x1u << 0) /**< \brief (US_IDR) RXRDY Interrupt Disable */
+#define US_IDR_TXRDY (0x1u << 1) /**< \brief (US_IDR) TXRDY Interrupt Disable */
+#define US_IDR_RXBRK (0x1u << 2) /**< \brief (US_IDR) Receiver Break Interrupt Disable */
+#define US_IDR_ENDRX (0x1u << 3) /**< \brief (US_IDR) End of Receive Transfer Interrupt Disable */
+#define US_IDR_ENDTX (0x1u << 4) /**< \brief (US_IDR) End of Transmit Interrupt Disable */
+#define US_IDR_OVRE (0x1u << 5) /**< \brief (US_IDR) Overrun Error Interrupt Disable */
+#define US_IDR_FRAME (0x1u << 6) /**< \brief (US_IDR) Framing Error Interrupt Disable */
+#define US_IDR_PARE (0x1u << 7) /**< \brief (US_IDR) Parity Error Interrupt Disable */
+#define US_IDR_TIMEOUT (0x1u << 8) /**< \brief (US_IDR) Time-out Interrupt Disable */
+#define US_IDR_TXEMPTY (0x1u << 9) /**< \brief (US_IDR) TXEMPTY Interrupt Disable */
+#define US_IDR_ITER (0x1u << 10) /**< \brief (US_IDR) Max number of Repetitions Reached Disable */
+#define US_IDR_UNRE (0x1u << 10) /**< \brief (US_IDR) SPI Underrun Error Disable */
+#define US_IDR_TXBUFE (0x1u << 11) /**< \brief (US_IDR) Buffer Empty Interrupt Disable */
+#define US_IDR_RXBUFF (0x1u << 12) /**< \brief (US_IDR) Buffer Full Interrupt Disable */
+#define US_IDR_NACK (0x1u << 13) /**< \brief (US_IDR) Non Acknowledge Interrupt Disable */
+#define US_IDR_LINBK (0x1u << 13) /**< \brief (US_IDR) LIN Break Sent or LIN Break Received Interrupt Disable */
+#define US_IDR_LINID (0x1u << 14) /**< \brief (US_IDR) LIN Identifier Sent or LIN Identifier Received Interrupt Disable */
+#define US_IDR_LINTC (0x1u << 15) /**< \brief (US_IDR) LIN Transfer Completed Interrupt Disable */
+#define US_IDR_CTSIC (0x1u << 19) /**< \brief (US_IDR) Clear to Send Input Change Interrupt Disable */
+#define US_IDR_MANE (0x1u << 24) /**< \brief (US_IDR) Manchester Error Interrupt Disable */
+#define US_IDR_LINBE (0x1u << 25) /**< \brief (US_IDR) LIN Bus Error Interrupt Disable */
+#define US_IDR_LINISFE (0x1u << 26) /**< \brief (US_IDR) LIN Inconsistent Synch Field Error Interrupt Disable */
+#define US_IDR_LINIPE (0x1u << 27) /**< \brief (US_IDR) LIN Identifier Parity Interrupt Disable */
+#define US_IDR_LINCE (0x1u << 28) /**< \brief (US_IDR) LIN Checksum Error Interrupt Disable */
+#define US_IDR_LINSNRE (0x1u << 29) /**< \brief (US_IDR) LIN Slave Not Responding Error Interrupt Disable */
+/* -------- US_IMR : (USART Offset: 0x0010) Interrupt Mask Register -------- */
+#define US_IMR_RXRDY (0x1u << 0) /**< \brief (US_IMR) RXRDY Interrupt Mask */
+#define US_IMR_TXRDY (0x1u << 1) /**< \brief (US_IMR) TXRDY Interrupt Mask */
+#define US_IMR_RXBRK (0x1u << 2) /**< \brief (US_IMR) Receiver Break Interrupt Mask */
+#define US_IMR_ENDRX (0x1u << 3) /**< \brief (US_IMR) End of Receive Transfer Interrupt Mask */
+#define US_IMR_ENDTX (0x1u << 4) /**< \brief (US_IMR) End of Transmit Interrupt Mask */
+#define US_IMR_OVRE (0x1u << 5) /**< \brief (US_IMR) Overrun Error Interrupt Mask */
+#define US_IMR_FRAME (0x1u << 6) /**< \brief (US_IMR) Framing Error Interrupt Mask */
+#define US_IMR_PARE (0x1u << 7) /**< \brief (US_IMR) Parity Error Interrupt Mask */
+#define US_IMR_TIMEOUT (0x1u << 8) /**< \brief (US_IMR) Time-out Interrupt Mask */
+#define US_IMR_TXEMPTY (0x1u << 9) /**< \brief (US_IMR) TXEMPTY Interrupt Mask */
+#define US_IMR_ITER (0x1u << 10) /**< \brief (US_IMR) Max number of Repetitions Reached Mask */
+#define US_IMR_UNRE (0x1u << 10) /**< \brief (US_IMR) SPI Underrun Error Mask */
+#define US_IMR_TXBUFE (0x1u << 11) /**< \brief (US_IMR) Buffer Empty Interrupt Mask */
+#define US_IMR_RXBUFF (0x1u << 12) /**< \brief (US_IMR) Buffer Full Interrupt Mask */
+#define US_IMR_NACK (0x1u << 13) /**< \brief (US_IMR) Non Acknowledge Interrupt Mask */
+#define US_IMR_LINBK (0x1u << 13) /**< \brief (US_IMR) LIN Break Sent or LIN Break Received Interrupt Mask */
+#define US_IMR_LINID (0x1u << 14) /**< \brief (US_IMR) LIN Identifier Sent or LIN Identifier Received Interrupt Mask */
+#define US_IMR_LINTC (0x1u << 15) /**< \brief (US_IMR) LIN Transfer Completed Interrupt Mask */
+#define US_IMR_CTSIC (0x1u << 19) /**< \brief (US_IMR) Clear to Send Input Change Interrupt Mask */
+#define US_IMR_MANE (0x1u << 24) /**< \brief (US_IMR) Manchester Error Interrupt Mask */
+#define US_IMR_LINBE (0x1u << 25) /**< \brief (US_IMR) LIN Bus Error Interrupt Mask */
+#define US_IMR_LINISFE (0x1u << 26) /**< \brief (US_IMR) LIN Inconsistent Synch Field Error Interrupt Mask */
+#define US_IMR_LINIPE (0x1u << 27) /**< \brief (US_IMR) LIN Identifier Parity Interrupt Mask */
+#define US_IMR_LINCE (0x1u << 28) /**< \brief (US_IMR) LIN Checksum Error Interrupt Mask */
+#define US_IMR_LINSNRE (0x1u << 29) /**< \brief (US_IMR) LIN Slave Not Responding Error Interrupt Mask */
+/* -------- US_CSR : (USART Offset: 0x0014) Channel Status Register -------- */
+#define US_CSR_RXRDY (0x1u << 0) /**< \brief (US_CSR) Receiver Ready */
+#define US_CSR_TXRDY (0x1u << 1) /**< \brief (US_CSR) Transmitter Ready */
+#define US_CSR_RXBRK (0x1u << 2) /**< \brief (US_CSR) Break Received/End of Break */
+#define US_CSR_ENDRX (0x1u << 3) /**< \brief (US_CSR) End of Receiver Transfer */
+#define US_CSR_ENDTX (0x1u << 4) /**< \brief (US_CSR) End of Transmitter Transfer */
+#define US_CSR_OVRE (0x1u << 5) /**< \brief (US_CSR) Overrun Error */
+#define US_CSR_FRAME (0x1u << 6) /**< \brief (US_CSR) Framing Error */
+#define US_CSR_PARE (0x1u << 7) /**< \brief (US_CSR) Parity Error */
+#define US_CSR_TIMEOUT (0x1u << 8) /**< \brief (US_CSR) Receiver Time-out */
+#define US_CSR_TXEMPTY (0x1u << 9) /**< \brief (US_CSR) Transmitter Empty */
+#define US_CSR_ITER (0x1u << 10) /**< \brief (US_CSR) Max number of Repetitions Reached */
+#define US_CSR_UNRE (0x1u << 10) /**< \brief (US_CSR) SPI Underrun Error */
+#define US_CSR_TXBUFE (0x1u << 11) /**< \brief (US_CSR) Transmission Buffer Empty */
+#define US_CSR_RXBUFF (0x1u << 12) /**< \brief (US_CSR) Reception Buffer Full */
+#define US_CSR_NACK (0x1u << 13) /**< \brief (US_CSR) Non Acknowledge Interrupt */
+#define US_CSR_LINBK (0x1u << 13) /**< \brief (US_CSR) LIN Break Sent or LIN Break Received */
+#define US_CSR_LINID (0x1u << 14) /**< \brief (US_CSR) LIN Identifier Sent or LIN Identifier Received */
+#define US_CSR_LINTC (0x1u << 15) /**< \brief (US_CSR) LIN Transfer Completed */
+#define US_CSR_CTSIC (0x1u << 19) /**< \brief (US_CSR) Clear to Send Input Change Flag */
+#define US_CSR_CTS (0x1u << 23) /**< \brief (US_CSR) Image of CTS Input */
+#define US_CSR_LINBLS (0x1u << 23) /**< \brief (US_CSR) LIN Bus Line Status */
+#define US_CSR_MANERR (0x1u << 24) /**< \brief (US_CSR) Manchester Error */
+#define US_CSR_LINBE (0x1u << 25) /**< \brief (US_CSR) LIN Bit Error */
+#define US_CSR_LINISFE (0x1u << 26) /**< \brief (US_CSR) LIN Inconsistent Synch Field Error */
+#define US_CSR_LINIPE (0x1u << 27) /**< \brief (US_CSR) LIN Identifier Parity Error */
+#define US_CSR_LINCE (0x1u << 28) /**< \brief (US_CSR) LIN Checksum Error */
+#define US_CSR_LINSNRE (0x1u << 29) /**< \brief (US_CSR) LIN Slave Not Responding Error */
+/* -------- US_RHR : (USART Offset: 0x0018) Receiver Holding Register -------- */
+#define US_RHR_RXCHR_Pos 0
+#define US_RHR_RXCHR_Msk (0x1ffu << US_RHR_RXCHR_Pos) /**< \brief (US_RHR) Received Character */
+#define US_RHR_RXSYNH (0x1u << 15) /**< \brief (US_RHR) Received Sync */
+/* -------- US_THR : (USART Offset: 0x001C) Transmitter Holding Register -------- */
+#define US_THR_TXCHR_Pos 0
+#define US_THR_TXCHR_Msk (0x1ffu << US_THR_TXCHR_Pos) /**< \brief (US_THR) Character to be Transmitted */
+#define US_THR_TXCHR(value) ((US_THR_TXCHR_Msk & ((value) << US_THR_TXCHR_Pos)))
+#define US_THR_TXSYNH (0x1u << 15) /**< \brief (US_THR) Sync Field to be transmitted */
+/* -------- US_BRGR : (USART Offset: 0x0020) Baud Rate Generator Register -------- */
+#define US_BRGR_CD_Pos 0
+#define US_BRGR_CD_Msk (0xffffu << US_BRGR_CD_Pos) /**< \brief (US_BRGR) Clock Divider */
+#define US_BRGR_CD(value) ((US_BRGR_CD_Msk & ((value) << US_BRGR_CD_Pos)))
+#define US_BRGR_FP_Pos 16
+#define US_BRGR_FP_Msk (0x7u << US_BRGR_FP_Pos) /**< \brief (US_BRGR) Fractional Part */
+#define US_BRGR_FP(value) ((US_BRGR_FP_Msk & ((value) << US_BRGR_FP_Pos)))
+/* -------- US_RTOR : (USART Offset: 0x0024) Receiver Time-out Register -------- */
+#define US_RTOR_TO_Pos 0
+#define US_RTOR_TO_Msk (0x1ffffu << US_RTOR_TO_Pos) /**< \brief (US_RTOR) Time-out Value */
+#define US_RTOR_TO(value) ((US_RTOR_TO_Msk & ((value) << US_RTOR_TO_Pos)))
+/* -------- US_TTGR : (USART Offset: 0x0028) Transmitter Timeguard Register -------- */
+#define US_TTGR_TG_Pos 0
+#define US_TTGR_TG_Msk (0xffu << US_TTGR_TG_Pos) /**< \brief (US_TTGR) Timeguard Value */
+#define US_TTGR_TG(value) ((US_TTGR_TG_Msk & ((value) << US_TTGR_TG_Pos)))
+/* -------- US_FIDI : (USART Offset: 0x0040) FI DI Ratio Register -------- */
+#define US_FIDI_FI_DI_RATIO_Pos 0
+#define US_FIDI_FI_DI_RATIO_Msk (0x7ffu << US_FIDI_FI_DI_RATIO_Pos) /**< \brief (US_FIDI) FI Over DI Ratio Value */
+#define US_FIDI_FI_DI_RATIO(value) ((US_FIDI_FI_DI_RATIO_Msk & ((value) << US_FIDI_FI_DI_RATIO_Pos)))
+/* -------- US_NER : (USART Offset: 0x0044) Number of Errors Register -------- */
+#define US_NER_NB_ERRORS_Pos 0
+#define US_NER_NB_ERRORS_Msk (0xffu << US_NER_NB_ERRORS_Pos) /**< \brief (US_NER) Number of Errors */
+/* -------- US_IF : (USART Offset: 0x004C) IrDA Filter Register -------- */
+#define US_IF_IRDA_FILTER_Pos 0
+#define US_IF_IRDA_FILTER_Msk (0xffu << US_IF_IRDA_FILTER_Pos) /**< \brief (US_IF) IrDA Filter */
+#define US_IF_IRDA_FILTER(value) ((US_IF_IRDA_FILTER_Msk & ((value) << US_IF_IRDA_FILTER_Pos)))
+/* -------- US_MAN : (USART Offset: 0x0050) Manchester Encoder Decoder Register -------- */
+#define US_MAN_TX_PL_Pos 0
+#define US_MAN_TX_PL_Msk (0xfu << US_MAN_TX_PL_Pos) /**< \brief (US_MAN) Transmitter Preamble Length */
+#define US_MAN_TX_PL(value) ((US_MAN_TX_PL_Msk & ((value) << US_MAN_TX_PL_Pos)))
+#define US_MAN_TX_PP_Pos 8
+#define US_MAN_TX_PP_Msk (0x3u << US_MAN_TX_PP_Pos) /**< \brief (US_MAN) Transmitter Preamble Pattern */
+#define US_MAN_TX_PP_ALL_ONE (0x0u << 8) /**< \brief (US_MAN) The preamble is composed of '1's */
+#define US_MAN_TX_PP_ALL_ZERO (0x1u << 8) /**< \brief (US_MAN) The preamble is composed of '0's */
+#define US_MAN_TX_PP_ZERO_ONE (0x2u << 8) /**< \brief (US_MAN) The preamble is composed of '01's */
+#define US_MAN_TX_PP_ONE_ZERO (0x3u << 8) /**< \brief (US_MAN) The preamble is composed of '10's */
+#define US_MAN_TX_MPOL (0x1u << 12) /**< \brief (US_MAN) Transmitter Manchester Polarity */
+#define US_MAN_RX_PL_Pos 16
+#define US_MAN_RX_PL_Msk (0xfu << US_MAN_RX_PL_Pos) /**< \brief (US_MAN) Receiver Preamble Length */
+#define US_MAN_RX_PL(value) ((US_MAN_RX_PL_Msk & ((value) << US_MAN_RX_PL_Pos)))
+#define US_MAN_RX_PP_Pos 24
+#define US_MAN_RX_PP_Msk (0x3u << US_MAN_RX_PP_Pos) /**< \brief (US_MAN) Receiver Preamble Pattern detected */
+#define US_MAN_RX_PP_ALL_ONE (0x0u << 24) /**< \brief (US_MAN) The preamble is composed of '1's */
+#define US_MAN_RX_PP_ALL_ZERO (0x1u << 24) /**< \brief (US_MAN) The preamble is composed of '0's */
+#define US_MAN_RX_PP_ZERO_ONE (0x2u << 24) /**< \brief (US_MAN) The preamble is composed of '01's */
+#define US_MAN_RX_PP_ONE_ZERO (0x3u << 24) /**< \brief (US_MAN) The preamble is composed of '10's */
+#define US_MAN_RX_MPOL (0x1u << 28) /**< \brief (US_MAN) Receiver Manchester Polarity */
+#define US_MAN_STUCKTO1 (0x1u << 29) /**< \brief (US_MAN) */
+#define US_MAN_DRIFT (0x1u << 30) /**< \brief (US_MAN) Drift compensation */
+/* -------- US_LINMR : (USART Offset: 0x0054) LIN Mode Register -------- */
+#define US_LINMR_NACT_Pos 0
+#define US_LINMR_NACT_Msk (0x3u << US_LINMR_NACT_Pos) /**< \brief (US_LINMR) LIN Node Action */
+#define US_LINMR_NACT_PUBLISH (0x0u << 0) /**< \brief (US_LINMR) The USART transmits the response. */
+#define US_LINMR_NACT_SUBSCRIBE (0x1u << 0) /**< \brief (US_LINMR) The USART receives the response. */
+#define US_LINMR_NACT_IGNORE (0x2u << 0) /**< \brief (US_LINMR) The USART does not transmit and does not receive the response. */
+#define US_LINMR_PARDIS (0x1u << 2) /**< \brief (US_LINMR) Parity Disable */
+#define US_LINMR_CHKDIS (0x1u << 3) /**< \brief (US_LINMR) Checksum Disable */
+#define US_LINMR_CHKTYP (0x1u << 4) /**< \brief (US_LINMR) Checksum Type */
+#define US_LINMR_DLM (0x1u << 5) /**< \brief (US_LINMR) Data Length Mode */
+#define US_LINMR_FSDIS (0x1u << 6) /**< \brief (US_LINMR) Frame Slot Mode Disable */
+#define US_LINMR_WKUPTYP (0x1u << 7) /**< \brief (US_LINMR) Wakeup Signal Type */
+#define US_LINMR_DLC_Pos 8
+#define US_LINMR_DLC_Msk (0xffu << US_LINMR_DLC_Pos) /**< \brief (US_LINMR) Data Length Control */
+#define US_LINMR_DLC(value) ((US_LINMR_DLC_Msk & ((value) << US_LINMR_DLC_Pos)))
+#define US_LINMR_PDCM (0x1u << 16) /**< \brief (US_LINMR) PDC Mode */
+/* -------- US_LINIR : (USART Offset: 0x0058) LIN Identifier Register -------- */
+#define US_LINIR_IDCHR_Pos 0
+#define US_LINIR_IDCHR_Msk (0xffu << US_LINIR_IDCHR_Pos) /**< \brief (US_LINIR) Identifier Character */
+#define US_LINIR_IDCHR(value) ((US_LINIR_IDCHR_Msk & ((value) << US_LINIR_IDCHR_Pos)))
+/* -------- US_WPMR : (USART Offset: 0xE4) Write Protect Mode Register -------- */
+#define US_WPMR_WPEN (0x1u << 0) /**< \brief (US_WPMR) Write Protect Enable */
+#define US_WPMR_WPKEY_Pos 8
+#define US_WPMR_WPKEY_Msk (0xffffffu << US_WPMR_WPKEY_Pos) /**< \brief (US_WPMR) Write Protect KEY */
+#define US_WPMR_WPKEY(value) ((US_WPMR_WPKEY_Msk & ((value) << US_WPMR_WPKEY_Pos)))
+/* -------- US_WPSR : (USART Offset: 0xE8) Write Protect Status Register -------- */
+#define US_WPSR_WPVS (0x1u << 0) /**< \brief (US_WPSR) Write Protect Violation Status */
+#define US_WPSR_WPVSRC_Pos 8
+#define US_WPSR_WPVSRC_Msk (0xffffu << US_WPSR_WPVSRC_Pos) /**< \brief (US_WPSR) Write Protect Violation Source */
+/* -------- US_RPR : (USART Offset: 0x100) Receive Pointer Register -------- */
+#define US_RPR_RXPTR_Pos 0
+#define US_RPR_RXPTR_Msk (0xffffffffu << US_RPR_RXPTR_Pos) /**< \brief (US_RPR) Receive Pointer Register */
+#define US_RPR_RXPTR(value) ((US_RPR_RXPTR_Msk & ((value) << US_RPR_RXPTR_Pos)))
+/* -------- US_RCR : (USART Offset: 0x104) Receive Counter Register -------- */
+#define US_RCR_RXCTR_Pos 0
+#define US_RCR_RXCTR_Msk (0xffffu << US_RCR_RXCTR_Pos) /**< \brief (US_RCR) Receive Counter Register */
+#define US_RCR_RXCTR(value) ((US_RCR_RXCTR_Msk & ((value) << US_RCR_RXCTR_Pos)))
+/* -------- US_TPR : (USART Offset: 0x108) Transmit Pointer Register -------- */
+#define US_TPR_TXPTR_Pos 0
+#define US_TPR_TXPTR_Msk (0xffffffffu << US_TPR_TXPTR_Pos) /**< \brief (US_TPR) Transmit Counter Register */
+#define US_TPR_TXPTR(value) ((US_TPR_TXPTR_Msk & ((value) << US_TPR_TXPTR_Pos)))
+/* -------- US_TCR : (USART Offset: 0x10C) Transmit Counter Register -------- */
+#define US_TCR_TXCTR_Pos 0
+#define US_TCR_TXCTR_Msk (0xffffu << US_TCR_TXCTR_Pos) /**< \brief (US_TCR) Transmit Counter Register */
+#define US_TCR_TXCTR(value) ((US_TCR_TXCTR_Msk & ((value) << US_TCR_TXCTR_Pos)))
+/* -------- US_RNPR : (USART Offset: 0x110) Receive Next Pointer Register -------- */
+#define US_RNPR_RXNPTR_Pos 0
+#define US_RNPR_RXNPTR_Msk (0xffffffffu << US_RNPR_RXNPTR_Pos) /**< \brief (US_RNPR) Receive Next Pointer */
+#define US_RNPR_RXNPTR(value) ((US_RNPR_RXNPTR_Msk & ((value) << US_RNPR_RXNPTR_Pos)))
+/* -------- US_RNCR : (USART Offset: 0x114) Receive Next Counter Register -------- */
+#define US_RNCR_RXNCTR_Pos 0
+#define US_RNCR_RXNCTR_Msk (0xffffu << US_RNCR_RXNCTR_Pos) /**< \brief (US_RNCR) Receive Next Counter */
+#define US_RNCR_RXNCTR(value) ((US_RNCR_RXNCTR_Msk & ((value) << US_RNCR_RXNCTR_Pos)))
+/* -------- US_TNPR : (USART Offset: 0x118) Transmit Next Pointer Register -------- */
+#define US_TNPR_TXNPTR_Pos 0
+#define US_TNPR_TXNPTR_Msk (0xffffffffu << US_TNPR_TXNPTR_Pos) /**< \brief (US_TNPR) Transmit Next Pointer */
+#define US_TNPR_TXNPTR(value) ((US_TNPR_TXNPTR_Msk & ((value) << US_TNPR_TXNPTR_Pos)))
+/* -------- US_TNCR : (USART Offset: 0x11C) Transmit Next Counter Register -------- */
+#define US_TNCR_TXNCTR_Pos 0
+#define US_TNCR_TXNCTR_Msk (0xffffu << US_TNCR_TXNCTR_Pos) /**< \brief (US_TNCR) Transmit Counter Next */
+#define US_TNCR_TXNCTR(value) ((US_TNCR_TXNCTR_Msk & ((value) << US_TNCR_TXNCTR_Pos)))
+/* -------- US_PTCR : (USART Offset: 0x120) Transfer Control Register -------- */
+#define US_PTCR_RXTEN (0x1u << 0) /**< \brief (US_PTCR) Receiver Transfer Enable */
+#define US_PTCR_RXTDIS (0x1u << 1) /**< \brief (US_PTCR) Receiver Transfer Disable */
+#define US_PTCR_TXTEN (0x1u << 8) /**< \brief (US_PTCR) Transmitter Transfer Enable */
+#define US_PTCR_TXTDIS (0x1u << 9) /**< \brief (US_PTCR) Transmitter Transfer Disable */
+/* -------- US_PTSR : (USART Offset: 0x124) Transfer Status Register -------- */
+#define US_PTSR_RXTEN (0x1u << 0) /**< \brief (US_PTSR) Receiver Transfer Enable */
+#define US_PTSR_TXTEN (0x1u << 8) /**< \brief (US_PTSR) Transmitter Transfer Enable */
+
+/*@}*/
+
+/* ============================================================================= */
+/** SOFTWARE API DEFINITION FOR Watchdog Timer */
+/* ============================================================================= */
+/** \addtogroup SAM3XA_WDT Watchdog Timer */
+/*@{*/
+
+#ifndef __ASSEMBLY__
+/** \brief Wdt hardware registers */
+typedef struct {
+ WoReg WDT_CR; /**< \brief (Wdt Offset: 0x00) Control Register */
+ RwReg WDT_MR; /**< \brief (Wdt Offset: 0x04) Mode Register */
+ RoReg WDT_SR; /**< \brief (Wdt Offset: 0x08) Status Register */
+} Wdt;
+#endif /* __ASSEMBLY__ */
+/* -------- WDT_CR : (WDT Offset: 0x00) Control Register -------- */
+#define WDT_CR_WDRSTT (0x1u << 0) /**< \brief (WDT_CR) Watchdog Restart */
+#define WDT_CR_KEY_Pos 24
+#define WDT_CR_KEY_Msk (0xffu << WDT_CR_KEY_Pos) /**< \brief (WDT_CR) Password */
+#define WDT_CR_KEY(value) ((WDT_CR_KEY_Msk & ((value) << WDT_CR_KEY_Pos)))
+/* -------- WDT_MR : (WDT Offset: 0x04) Mode Register -------- */
+#define WDT_MR_WDV_Pos 0
+#define WDT_MR_WDV_Msk (0xfffu << WDT_MR_WDV_Pos) /**< \brief (WDT_MR) Watchdog Counter Value */
+#define WDT_MR_WDV(value) ((WDT_MR_WDV_Msk & ((value) << WDT_MR_WDV_Pos)))
+#define WDT_MR_WDFIEN (0x1u << 12) /**< \brief (WDT_MR) Watchdog Fault Interrupt Enable */
+#define WDT_MR_WDRSTEN (0x1u << 13) /**< \brief (WDT_MR) Watchdog Reset Enable */
+#define WDT_MR_WDRPROC (0x1u << 14) /**< \brief (WDT_MR) Watchdog Reset Processor */
+#define WDT_MR_WDDIS (0x1u << 15) /**< \brief (WDT_MR) Watchdog Disable */
+#define WDT_MR_WDD_Pos 16
+#define WDT_MR_WDD_Msk (0xfffu << WDT_MR_WDD_Pos) /**< \brief (WDT_MR) Watchdog Delta Value */
+#define WDT_MR_WDD(value) ((WDT_MR_WDD_Msk & ((value) << WDT_MR_WDD_Pos)))
+#define WDT_MR_WDDBGHLT (0x1u << 28) /**< \brief (WDT_MR) Watchdog Debug Halt */
+#define WDT_MR_WDIDLEHLT (0x1u << 29) /**< \brief (WDT_MR) Watchdog Idle Halt */
+/* -------- WDT_SR : (WDT Offset: 0x08) Status Register -------- */
+#define WDT_SR_WDUNF (0x1u << 0) /**< \brief (WDT_SR) Watchdog Underflow */
+#define WDT_SR_WDERR (0x1u << 1) /**< \brief (WDT_SR) Watchdog Error */
+
+/*@}*/
+
+/*@}*/
+
+/* ************************************************************************** */
+/* REGISTER ACCESS DEFINITIONS FOR SAM3XA */
+/* ************************************************************************** */
+/** \addtogroup SAM3XA_reg Registers Access Definitions */
+/*@{*/
+
+/* ========== Register definition for HSMCI peripheral ========== */
+#define REG_HSMCI_CR REG_ACCESS(WoReg, 0x40000000U) /**< \brief (HSMCI) Control Register */
+#define REG_HSMCI_MR REG_ACCESS(RwReg, 0x40000004U) /**< \brief (HSMCI) Mode Register */
+#define REG_HSMCI_DTOR REG_ACCESS(RwReg, 0x40000008U) /**< \brief (HSMCI) Data Timeout Register */
+#define REG_HSMCI_SDCR REG_ACCESS(RwReg, 0x4000000CU) /**< \brief (HSMCI) SD/SDIO Card Register */
+#define REG_HSMCI_ARGR REG_ACCESS(RwReg, 0x40000010U) /**< \brief (HSMCI) Argument Register */
+#define REG_HSMCI_CMDR REG_ACCESS(WoReg, 0x40000014U) /**< \brief (HSMCI) Command Register */
+#define REG_HSMCI_BLKR REG_ACCESS(RwReg, 0x40000018U) /**< \brief (HSMCI) Block Register */
+#define REG_HSMCI_CSTOR REG_ACCESS(RwReg, 0x4000001CU) /**< \brief (HSMCI) Completion Signal Timeout Register */
+#define REG_HSMCI_RSPR REG_ACCESS(RoReg, 0x40000020U) /**< \brief (HSMCI) Response Register */
+#define REG_HSMCI_RDR REG_ACCESS(RoReg, 0x40000030U) /**< \brief (HSMCI) Receive Data Register */
+#define REG_HSMCI_TDR REG_ACCESS(WoReg, 0x40000034U) /**< \brief (HSMCI) Transmit Data Register */
+#define REG_HSMCI_SR REG_ACCESS(RoReg, 0x40000040U) /**< \brief (HSMCI) Status Register */
+#define REG_HSMCI_IER REG_ACCESS(WoReg, 0x40000044U) /**< \brief (HSMCI) Interrupt Enable Register */
+#define REG_HSMCI_IDR REG_ACCESS(WoReg, 0x40000048U) /**< \brief (HSMCI) Interrupt Disable Register */
+#define REG_HSMCI_IMR REG_ACCESS(RoReg, 0x4000004CU) /**< \brief (HSMCI) Interrupt Mask Register */
+#define REG_HSMCI_DMA REG_ACCESS(RwReg, 0x40000050U) /**< \brief (HSMCI) DMA Configuration Register */
+#define REG_HSMCI_CFG REG_ACCESS(RwReg, 0x40000054U) /**< \brief (HSMCI) Configuration Register */
+#define REG_HSMCI_WPMR REG_ACCESS(RwReg, 0x400000E4U) /**< \brief (HSMCI) Write Protection Mode Register */
+#define REG_HSMCI_WPSR REG_ACCESS(RoReg, 0x400000E8U) /**< \brief (HSMCI) Write Protection Status Register */
+#define REG_HSMCI_FIFO REG_ACCESS(RwReg, 0x40000200U) /**< \brief (HSMCI) FIFO Memory Aperture0 */
+/* ========== Register definition for SSC peripheral ========== */
+#define REG_SSC_CR REG_ACCESS(WoReg, 0x40004000U) /**< \brief (SSC) Control Register */
+#define REG_SSC_CMR REG_ACCESS(RwReg, 0x40004004U) /**< \brief (SSC) Clock Mode Register */
+#define REG_SSC_RCMR REG_ACCESS(RwReg, 0x40004010U) /**< \brief (SSC) Receive Clock Mode Register */
+#define REG_SSC_RFMR REG_ACCESS(RwReg, 0x40004014U) /**< \brief (SSC) Receive Frame Mode Register */
+#define REG_SSC_TCMR REG_ACCESS(RwReg, 0x40004018U) /**< \brief (SSC) Transmit Clock Mode Register */
+#define REG_SSC_TFMR REG_ACCESS(RwReg, 0x4000401CU) /**< \brief (SSC) Transmit Frame Mode Register */
+#define REG_SSC_RHR REG_ACCESS(RoReg, 0x40004020U) /**< \brief (SSC) Receive Holding Register */
+#define REG_SSC_THR REG_ACCESS(WoReg, 0x40004024U) /**< \brief (SSC) Transmit Holding Register */
+#define REG_SSC_RSHR REG_ACCESS(RoReg, 0x40004030U) /**< \brief (SSC) Receive Sync. Holding Register */
+#define REG_SSC_TSHR REG_ACCESS(RwReg, 0x40004034U) /**< \brief (SSC) Transmit Sync. Holding Register */
+#define REG_SSC_RC0R REG_ACCESS(RwReg, 0x40004038U) /**< \brief (SSC) Receive Compare 0 Register */
+#define REG_SSC_RC1R REG_ACCESS(RwReg, 0x4000403CU) /**< \brief (SSC) Receive Compare 1 Register */
+#define REG_SSC_SR REG_ACCESS(RoReg, 0x40004040U) /**< \brief (SSC) Status Register */
+#define REG_SSC_IER REG_ACCESS(WoReg, 0x40004044U) /**< \brief (SSC) Interrupt Enable Register */
+#define REG_SSC_IDR REG_ACCESS(WoReg, 0x40004048U) /**< \brief (SSC) Interrupt Disable Register */
+#define REG_SSC_IMR REG_ACCESS(RoReg, 0x4000404CU) /**< \brief (SSC) Interrupt Mask Register */
+#define REG_SSC_WPMR REG_ACCESS(RwReg, 0x400040E4U) /**< \brief (SSC) Write Protect Mode Register */
+#define REG_SSC_WPSR REG_ACCESS(RoReg, 0x400040E8U) /**< \brief (SSC) Write Protect Status Register */
+/* ========== Register definition for SPI0 peripheral ========== */
+#define REG_SPI0_CR REG_ACCESS(WoReg, 0x40008000U) /**< \brief (SPI0) Control Register */
+#define REG_SPI0_MR REG_ACCESS(RwReg, 0x40008004U) /**< \brief (SPI0) Mode Register */
+#define REG_SPI0_RDR REG_ACCESS(RoReg, 0x40008008U) /**< \brief (SPI0) Receive Data Register */
+#define REG_SPI0_TDR REG_ACCESS(WoReg, 0x4000800CU) /**< \brief (SPI0) Transmit Data Register */
+#define REG_SPI0_SR REG_ACCESS(RoReg, 0x40008010U) /**< \brief (SPI0) Status Register */
+#define REG_SPI0_IER REG_ACCESS(WoReg, 0x40008014U) /**< \brief (SPI0) Interrupt Enable Register */
+#define REG_SPI0_IDR REG_ACCESS(WoReg, 0x40008018U) /**< \brief (SPI0) Interrupt Disable Register */
+#define REG_SPI0_IMR REG_ACCESS(RoReg, 0x4000801CU) /**< \brief (SPI0) Interrupt Mask Register */
+#define REG_SPI0_CSR REG_ACCESS(RwReg, 0x40008030U) /**< \brief (SPI0) Chip Select Register */
+#define REG_SPI0_WPMR REG_ACCESS(RwReg, 0x400080E4U) /**< \brief (SPI0) Write Protection Control Register */
+#define REG_SPI0_WPSR REG_ACCESS(RoReg, 0x400080E8U) /**< \brief (SPI0) Write Protection Status Register */
+/* ========== Register definition for SPI1 peripheral ========== */
+#define REG_SPI1_CR REG_ACCESS(WoReg, 0x4000C000U) /**< \brief (SPI1) Control Register */
+#define REG_SPI1_MR REG_ACCESS(RwReg, 0x4000C004U) /**< \brief (SPI1) Mode Register */
+#define REG_SPI1_RDR REG_ACCESS(RoReg, 0x4000C008U) /**< \brief (SPI1) Receive Data Register */
+#define REG_SPI1_TDR REG_ACCESS(WoReg, 0x4000C00CU) /**< \brief (SPI1) Transmit Data Register */
+#define REG_SPI1_SR REG_ACCESS(RoReg, 0x4000C010U) /**< \brief (SPI1) Status Register */
+#define REG_SPI1_IER REG_ACCESS(WoReg, 0x4000C014U) /**< \brief (SPI1) Interrupt Enable Register */
+#define REG_SPI1_IDR REG_ACCESS(WoReg, 0x4000C018U) /**< \brief (SPI1) Interrupt Disable Register */
+#define REG_SPI1_IMR REG_ACCESS(RoReg, 0x4000C01CU) /**< \brief (SPI1) Interrupt Mask Register */
+#define REG_SPI1_CSR REG_ACCESS(RwReg, 0x4000C030U) /**< \brief (SPI1) Chip Select Register */
+#define REG_SPI1_WPMR REG_ACCESS(RwReg, 0x4000C0E4U) /**< \brief (SPI1) Write Protection Control Register */
+#define REG_SPI1_WPSR REG_ACCESS(RoReg, 0x4000C0E8U) /**< \brief (SPI1) Write Protection Status Register */
+/* ========== Register definition for TC0 peripheral ========== */
+#define REG_TC0_CCR0 REG_ACCESS(WoReg, 0x40080000U) /**< \brief (TC0) Channel Control Register (channel = 0) */
+#define REG_TC0_CMR0 REG_ACCESS(RwReg, 0x40080004U) /**< \brief (TC0) Channel Mode Register (channel = 0) */
+#define REG_TC0_SMMR0 REG_ACCESS(RwReg, 0x40080008U) /**< \brief (TC0) Stepper Motor Mode Register (channel = 0) */
+#define REG_TC0_CV0 REG_ACCESS(RoReg, 0x40080010U) /**< \brief (TC0) Counter Value (channel = 0) */
+#define REG_TC0_RA0 REG_ACCESS(RwReg, 0x40080014U) /**< \brief (TC0) Register A (channel = 0) */
+#define REG_TC0_RB0 REG_ACCESS(RwReg, 0x40080018U) /**< \brief (TC0) Register B (channel = 0) */
+#define REG_TC0_RC0 REG_ACCESS(RwReg, 0x4008001CU) /**< \brief (TC0) Register C (channel = 0) */
+#define REG_TC0_SR0 REG_ACCESS(RoReg, 0x40080020U) /**< \brief (TC0) Status Register (channel = 0) */
+#define REG_TC0_IER0 REG_ACCESS(WoReg, 0x40080024U) /**< \brief (TC0) Interrupt Enable Register (channel = 0) */
+#define REG_TC0_IDR0 REG_ACCESS(WoReg, 0x40080028U) /**< \brief (TC0) Interrupt Disable Register (channel = 0) */
+#define REG_TC0_IMR0 REG_ACCESS(RoReg, 0x4008002CU) /**< \brief (TC0) Interrupt Mask Register (channel = 0) */
+#define REG_TC0_CCR1 REG_ACCESS(WoReg, 0x40080040U) /**< \brief (TC0) Channel Control Register (channel = 1) */
+#define REG_TC0_CMR1 REG_ACCESS(RwReg, 0x40080044U) /**< \brief (TC0) Channel Mode Register (channel = 1) */
+#define REG_TC0_SMMR1 REG_ACCESS(RwReg, 0x40080048U) /**< \brief (TC0) Stepper Motor Mode Register (channel = 1) */
+#define REG_TC0_CV1 REG_ACCESS(RoReg, 0x40080050U) /**< \brief (TC0) Counter Value (channel = 1) */
+#define REG_TC0_RA1 REG_ACCESS(RwReg, 0x40080054U) /**< \brief (TC0) Register A (channel = 1) */
+#define REG_TC0_RB1 REG_ACCESS(RwReg, 0x40080058U) /**< \brief (TC0) Register B (channel = 1) */
+#define REG_TC0_RC1 REG_ACCESS(RwReg, 0x4008005CU) /**< \brief (TC0) Register C (channel = 1) */
+#define REG_TC0_SR1 REG_ACCESS(RoReg, 0x40080060U) /**< \brief (TC0) Status Register (channel = 1) */
+#define REG_TC0_IER1 REG_ACCESS(WoReg, 0x40080064U) /**< \brief (TC0) Interrupt Enable Register (channel = 1) */
+#define REG_TC0_IDR1 REG_ACCESS(WoReg, 0x40080068U) /**< \brief (TC0) Interrupt Disable Register (channel = 1) */
+#define REG_TC0_IMR1 REG_ACCESS(RoReg, 0x4008006CU) /**< \brief (TC0) Interrupt Mask Register (channel = 1) */
+#define REG_TC0_CCR2 REG_ACCESS(WoReg, 0x40080080U) /**< \brief (TC0) Channel Control Register (channel = 2) */
+#define REG_TC0_CMR2 REG_ACCESS(RwReg, 0x40080084U) /**< \brief (TC0) Channel Mode Register (channel = 2) */
+#define REG_TC0_SMMR2 REG_ACCESS(RwReg, 0x40080088U) /**< \brief (TC0) Stepper Motor Mode Register (channel = 2) */
+#define REG_TC0_CV2 REG_ACCESS(RoReg, 0x40080090U) /**< \brief (TC0) Counter Value (channel = 2) */
+#define REG_TC0_RA2 REG_ACCESS(RwReg, 0x40080094U) /**< \brief (TC0) Register A (channel = 2) */
+#define REG_TC0_RB2 REG_ACCESS(RwReg, 0x40080098U) /**< \brief (TC0) Register B (channel = 2) */
+#define REG_TC0_RC2 REG_ACCESS(RwReg, 0x4008009CU) /**< \brief (TC0) Register C (channel = 2) */
+#define REG_TC0_SR2 REG_ACCESS(RoReg, 0x400800A0U) /**< \brief (TC0) Status Register (channel = 2) */
+#define REG_TC0_IER2 REG_ACCESS(WoReg, 0x400800A4U) /**< \brief (TC0) Interrupt Enable Register (channel = 2) */
+#define REG_TC0_IDR2 REG_ACCESS(WoReg, 0x400800A8U) /**< \brief (TC0) Interrupt Disable Register (channel = 2) */
+#define REG_TC0_IMR2 REG_ACCESS(RoReg, 0x400800ACU) /**< \brief (TC0) Interrupt Mask Register (channel = 2) */
+#define REG_TC0_BCR REG_ACCESS(WoReg, 0x400800C0U) /**< \brief (TC0) Block Control Register */
+#define REG_TC0_BMR REG_ACCESS(RwReg, 0x400800C4U) /**< \brief (TC0) Block Mode Register */
+#define REG_TC0_QIER REG_ACCESS(WoReg, 0x400800C8U) /**< \brief (TC0) QDEC Interrupt Enable Register */
+#define REG_TC0_QIDR REG_ACCESS(WoReg, 0x400800CCU) /**< \brief (TC0) QDEC Interrupt Disable Register */
+#define REG_TC0_QIMR REG_ACCESS(RoReg, 0x400800D0U) /**< \brief (TC0) QDEC Interrupt Mask Register */
+#define REG_TC0_QISR REG_ACCESS(RoReg, 0x400800D4U) /**< \brief (TC0) QDEC Interrupt Status Register */
+#define REG_TC0_FMR REG_ACCESS(RwReg, 0x400800D8U) /**< \brief (TC0) Fault Mode Register */
+#define REG_TC0_WPMR REG_ACCESS(RwReg, 0x400800E4U) /**< \brief (TC0) Write Protect Mode Register */
+/* ========== Register definition for TC1 peripheral ========== */
+#define REG_TC1_CCR0 REG_ACCESS(WoReg, 0x40084000U) /**< \brief (TC1) Channel Control Register (channel = 0) */
+#define REG_TC1_CMR0 REG_ACCESS(RwReg, 0x40084004U) /**< \brief (TC1) Channel Mode Register (channel = 0) */
+#define REG_TC1_SMMR0 REG_ACCESS(RwReg, 0x40084008U) /**< \brief (TC1) Stepper Motor Mode Register (channel = 0) */
+#define REG_TC1_CV0 REG_ACCESS(RoReg, 0x40084010U) /**< \brief (TC1) Counter Value (channel = 0) */
+#define REG_TC1_RA0 REG_ACCESS(RwReg, 0x40084014U) /**< \brief (TC1) Register A (channel = 0) */
+#define REG_TC1_RB0 REG_ACCESS(RwReg, 0x40084018U) /**< \brief (TC1) Register B (channel = 0) */
+#define REG_TC1_RC0 REG_ACCESS(RwReg, 0x4008401CU) /**< \brief (TC1) Register C (channel = 0) */
+#define REG_TC1_SR0 REG_ACCESS(RoReg, 0x40084020U) /**< \brief (TC1) Status Register (channel = 0) */
+#define REG_TC1_IER0 REG_ACCESS(WoReg, 0x40084024U) /**< \brief (TC1) Interrupt Enable Register (channel = 0) */
+#define REG_TC1_IDR0 REG_ACCESS(WoReg, 0x40084028U) /**< \brief (TC1) Interrupt Disable Register (channel = 0) */
+#define REG_TC1_IMR0 REG_ACCESS(RoReg, 0x4008402CU) /**< \brief (TC1) Interrupt Mask Register (channel = 0) */
+#define REG_TC1_CCR1 REG_ACCESS(WoReg, 0x40084040U) /**< \brief (TC1) Channel Control Register (channel = 1) */
+#define REG_TC1_CMR1 REG_ACCESS(RwReg, 0x40084044U) /**< \brief (TC1) Channel Mode Register (channel = 1) */
+#define REG_TC1_SMMR1 REG_ACCESS(RwReg, 0x40084048U) /**< \brief (TC1) Stepper Motor Mode Register (channel = 1) */
+#define REG_TC1_CV1 REG_ACCESS(RoReg, 0x40084050U) /**< \brief (TC1) Counter Value (channel = 1) */
+#define REG_TC1_RA1 REG_ACCESS(RwReg, 0x40084054U) /**< \brief (TC1) Register A (channel = 1) */
+#define REG_TC1_RB1 REG_ACCESS(RwReg, 0x40084058U) /**< \brief (TC1) Register B (channel = 1) */
+#define REG_TC1_RC1 REG_ACCESS(RwReg, 0x4008405CU) /**< \brief (TC1) Register C (channel = 1) */
+#define REG_TC1_SR1 REG_ACCESS(RoReg, 0x40084060U) /**< \brief (TC1) Status Register (channel = 1) */
+#define REG_TC1_IER1 REG_ACCESS(WoReg, 0x40084064U) /**< \brief (TC1) Interrupt Enable Register (channel = 1) */
+#define REG_TC1_IDR1 REG_ACCESS(WoReg, 0x40084068U) /**< \brief (TC1) Interrupt Disable Register (channel = 1) */
+#define REG_TC1_IMR1 REG_ACCESS(RoReg, 0x4008406CU) /**< \brief (TC1) Interrupt Mask Register (channel = 1) */
+#define REG_TC1_CCR2 REG_ACCESS(WoReg, 0x40084080U) /**< \brief (TC1) Channel Control Register (channel = 2) */
+#define REG_TC1_CMR2 REG_ACCESS(RwReg, 0x40084084U) /**< \brief (TC1) Channel Mode Register (channel = 2) */
+#define REG_TC1_SMMR2 REG_ACCESS(RwReg, 0x40084088U) /**< \brief (TC1) Stepper Motor Mode Register (channel = 2) */
+#define REG_TC1_CV2 REG_ACCESS(RoReg, 0x40084090U) /**< \brief (TC1) Counter Value (channel = 2) */
+#define REG_TC1_RA2 REG_ACCESS(RwReg, 0x40084094U) /**< \brief (TC1) Register A (channel = 2) */
+#define REG_TC1_RB2 REG_ACCESS(RwReg, 0x40084098U) /**< \brief (TC1) Register B (channel = 2) */
+#define REG_TC1_RC2 REG_ACCESS(RwReg, 0x4008409CU) /**< \brief (TC1) Register C (channel = 2) */
+#define REG_TC1_SR2 REG_ACCESS(RoReg, 0x400840A0U) /**< \brief (TC1) Status Register (channel = 2) */
+#define REG_TC1_IER2 REG_ACCESS(WoReg, 0x400840A4U) /**< \brief (TC1) Interrupt Enable Register (channel = 2) */
+#define REG_TC1_IDR2 REG_ACCESS(WoReg, 0x400840A8U) /**< \brief (TC1) Interrupt Disable Register (channel = 2) */
+#define REG_TC1_IMR2 REG_ACCESS(RoReg, 0x400840ACU) /**< \brief (TC1) Interrupt Mask Register (channel = 2) */
+#define REG_TC1_BCR REG_ACCESS(WoReg, 0x400840C0U) /**< \brief (TC1) Block Control Register */
+#define REG_TC1_BMR REG_ACCESS(RwReg, 0x400840C4U) /**< \brief (TC1) Block Mode Register */
+#define REG_TC1_QIER REG_ACCESS(WoReg, 0x400840C8U) /**< \brief (TC1) QDEC Interrupt Enable Register */
+#define REG_TC1_QIDR REG_ACCESS(WoReg, 0x400840CCU) /**< \brief (TC1) QDEC Interrupt Disable Register */
+#define REG_TC1_QIMR REG_ACCESS(RoReg, 0x400840D0U) /**< \brief (TC1) QDEC Interrupt Mask Register */
+#define REG_TC1_QISR REG_ACCESS(RoReg, 0x400840D4U) /**< \brief (TC1) QDEC Interrupt Status Register */
+#define REG_TC1_FMR REG_ACCESS(RwReg, 0x400840D8U) /**< \brief (TC1) Fault Mode Register */
+#define REG_TC1_WPMR REG_ACCESS(RwReg, 0x400840E4U) /**< \brief (TC1) Write Protect Mode Register */
+/* ========== Register definition for TC2 peripheral ========== */
+#define REG_TC2_CCR0 REG_ACCESS(WoReg, 0x40088000U) /**< \brief (TC2) Channel Control Register (channel = 0) */
+#define REG_TC2_CMR0 REG_ACCESS(RwReg, 0x40088004U) /**< \brief (TC2) Channel Mode Register (channel = 0) */
+#define REG_TC2_SMMR0 REG_ACCESS(RwReg, 0x40088008U) /**< \brief (TC2) Stepper Motor Mode Register (channel = 0) */
+#define REG_TC2_CV0 REG_ACCESS(RoReg, 0x40088010U) /**< \brief (TC2) Counter Value (channel = 0) */
+#define REG_TC2_RA0 REG_ACCESS(RwReg, 0x40088014U) /**< \brief (TC2) Register A (channel = 0) */
+#define REG_TC2_RB0 REG_ACCESS(RwReg, 0x40088018U) /**< \brief (TC2) Register B (channel = 0) */
+#define REG_TC2_RC0 REG_ACCESS(RwReg, 0x4008801CU) /**< \brief (TC2) Register C (channel = 0) */
+#define REG_TC2_SR0 REG_ACCESS(RoReg, 0x40088020U) /**< \brief (TC2) Status Register (channel = 0) */
+#define REG_TC2_IER0 REG_ACCESS(WoReg, 0x40088024U) /**< \brief (TC2) Interrupt Enable Register (channel = 0) */
+#define REG_TC2_IDR0 REG_ACCESS(WoReg, 0x40088028U) /**< \brief (TC2) Interrupt Disable Register (channel = 0) */
+#define REG_TC2_IMR0 REG_ACCESS(RoReg, 0x4008802CU) /**< \brief (TC2) Interrupt Mask Register (channel = 0) */
+#define REG_TC2_CCR1 REG_ACCESS(WoReg, 0x40088040U) /**< \brief (TC2) Channel Control Register (channel = 1) */
+#define REG_TC2_CMR1 REG_ACCESS(RwReg, 0x40088044U) /**< \brief (TC2) Channel Mode Register (channel = 1) */
+#define REG_TC2_SMMR1 REG_ACCESS(RwReg, 0x40088048U) /**< \brief (TC2) Stepper Motor Mode Register (channel = 1) */
+#define REG_TC2_CV1 REG_ACCESS(RoReg, 0x40088050U) /**< \brief (TC2) Counter Value (channel = 1) */
+#define REG_TC2_RA1 REG_ACCESS(RwReg, 0x40088054U) /**< \brief (TC2) Register A (channel = 1) */
+#define REG_TC2_RB1 REG_ACCESS(RwReg, 0x40088058U) /**< \brief (TC2) Register B (channel = 1) */
+#define REG_TC2_RC1 REG_ACCESS(RwReg, 0x4008805CU) /**< \brief (TC2) Register C (channel = 1) */
+#define REG_TC2_SR1 REG_ACCESS(RoReg, 0x40088060U) /**< \brief (TC2) Status Register (channel = 1) */
+#define REG_TC2_IER1 REG_ACCESS(WoReg, 0x40088064U) /**< \brief (TC2) Interrupt Enable Register (channel = 1) */
+#define REG_TC2_IDR1 REG_ACCESS(WoReg, 0x40088068U) /**< \brief (TC2) Interrupt Disable Register (channel = 1) */
+#define REG_TC2_IMR1 REG_ACCESS(RoReg, 0x4008806CU) /**< \brief (TC2) Interrupt Mask Register (channel = 1) */
+#define REG_TC2_CCR2 REG_ACCESS(WoReg, 0x40088080U) /**< \brief (TC2) Channel Control Register (channel = 2) */
+#define REG_TC2_CMR2 REG_ACCESS(RwReg, 0x40088084U) /**< \brief (TC2) Channel Mode Register (channel = 2) */
+#define REG_TC2_SMMR2 REG_ACCESS(RwReg, 0x40088088U) /**< \brief (TC2) Stepper Motor Mode Register (channel = 2) */
+#define REG_TC2_CV2 REG_ACCESS(RoReg, 0x40088090U) /**< \brief (TC2) Counter Value (channel = 2) */
+#define REG_TC2_RA2 REG_ACCESS(RwReg, 0x40088094U) /**< \brief (TC2) Register A (channel = 2) */
+#define REG_TC2_RB2 REG_ACCESS(RwReg, 0x40088098U) /**< \brief (TC2) Register B (channel = 2) */
+#define REG_TC2_RC2 REG_ACCESS(RwReg, 0x4008809CU) /**< \brief (TC2) Register C (channel = 2) */
+#define REG_TC2_SR2 REG_ACCESS(RoReg, 0x400880A0U) /**< \brief (TC2) Status Register (channel = 2) */
+#define REG_TC2_IER2 REG_ACCESS(WoReg, 0x400880A4U) /**< \brief (TC2) Interrupt Enable Register (channel = 2) */
+#define REG_TC2_IDR2 REG_ACCESS(WoReg, 0x400880A8U) /**< \brief (TC2) Interrupt Disable Register (channel = 2) */
+#define REG_TC2_IMR2 REG_ACCESS(RoReg, 0x400880ACU) /**< \brief (TC2) Interrupt Mask Register (channel = 2) */
+#define REG_TC2_BCR REG_ACCESS(WoReg, 0x400880C0U) /**< \brief (TC2) Block Control Register */
+#define REG_TC2_BMR REG_ACCESS(RwReg, 0x400880C4U) /**< \brief (TC2) Block Mode Register */
+#define REG_TC2_QIER REG_ACCESS(WoReg, 0x400880C8U) /**< \brief (TC2) QDEC Interrupt Enable Register */
+#define REG_TC2_QIDR REG_ACCESS(WoReg, 0x400880CCU) /**< \brief (TC2) QDEC Interrupt Disable Register */
+#define REG_TC2_QIMR REG_ACCESS(RoReg, 0x400880D0U) /**< \brief (TC2) QDEC Interrupt Mask Register */
+#define REG_TC2_QISR REG_ACCESS(RoReg, 0x400880D4U) /**< \brief (TC2) QDEC Interrupt Status Register */
+#define REG_TC2_FMR REG_ACCESS(RwReg, 0x400880D8U) /**< \brief (TC2) Fault Mode Register */
+#define REG_TC2_WPMR REG_ACCESS(RwReg, 0x400880E4U) /**< \brief (TC2) Write Protect Mode Register */
+/* ========== Register definition for TWI0 peripheral ========== */
+#define REG_TWI0_CR REG_ACCESS(WoReg, 0x4008C000U) /**< \brief (TWI0) Control Register */
+#define REG_TWI0_MMR REG_ACCESS(RwReg, 0x4008C004U) /**< \brief (TWI0) Master Mode Register */
+#define REG_TWI0_SMR REG_ACCESS(RwReg, 0x4008C008U) /**< \brief (TWI0) Slave Mode Register */
+#define REG_TWI0_IADR REG_ACCESS(RwReg, 0x4008C00CU) /**< \brief (TWI0) Internal Address Register */
+#define REG_TWI0_CWGR REG_ACCESS(RwReg, 0x4008C010U) /**< \brief (TWI0) Clock Waveform Generator Register */
+#define REG_TWI0_SR REG_ACCESS(RoReg, 0x4008C020U) /**< \brief (TWI0) Status Register */
+#define REG_TWI0_IER REG_ACCESS(WoReg, 0x4008C024U) /**< \brief (TWI0) Interrupt Enable Register */
+#define REG_TWI0_IDR REG_ACCESS(WoReg, 0x4008C028U) /**< \brief (TWI0) Interrupt Disable Register */
+#define REG_TWI0_IMR REG_ACCESS(RoReg, 0x4008C02CU) /**< \brief (TWI0) Interrupt Mask Register */
+#define REG_TWI0_RHR REG_ACCESS(RoReg, 0x4008C030U) /**< \brief (TWI0) Receive Holding Register */
+#define REG_TWI0_THR REG_ACCESS(WoReg, 0x4008C034U) /**< \brief (TWI0) Transmit Holding Register */
+#define REG_TWI0_RPR REG_ACCESS(RwReg, 0x4008C100U) /**< \brief (TWI0) Receive Pointer Register */
+#define REG_TWI0_RCR REG_ACCESS(RwReg, 0x4008C104U) /**< \brief (TWI0) Receive Counter Register */
+#define REG_TWI0_TPR REG_ACCESS(RwReg, 0x4008C108U) /**< \brief (TWI0) Transmit Pointer Register */
+#define REG_TWI0_TCR REG_ACCESS(RwReg, 0x4008C10CU) /**< \brief (TWI0) Transmit Counter Register */
+#define REG_TWI0_RNPR REG_ACCESS(RwReg, 0x4008C110U) /**< \brief (TWI0) Receive Next Pointer Register */
+#define REG_TWI0_RNCR REG_ACCESS(RwReg, 0x4008C114U) /**< \brief (TWI0) Receive Next Counter Register */
+#define REG_TWI0_TNPR REG_ACCESS(RwReg, 0x4008C118U) /**< \brief (TWI0) Transmit Next Pointer Register */
+#define REG_TWI0_TNCR REG_ACCESS(RwReg, 0x4008C11CU) /**< \brief (TWI0) Transmit Next Counter Register */
+#define REG_TWI0_PTCR REG_ACCESS(WoReg, 0x4008C120U) /**< \brief (TWI0) Transfer Control Register */
+#define REG_TWI0_PTSR REG_ACCESS(RoReg, 0x4008C124U) /**< \brief (TWI0) Transfer Status Register */
+/* ========== Register definition for TWI1 peripheral ========== */
+#define REG_TWI1_CR REG_ACCESS(WoReg, 0x40090000U) /**< \brief (TWI1) Control Register */
+#define REG_TWI1_MMR REG_ACCESS(RwReg, 0x40090004U) /**< \brief (TWI1) Master Mode Register */
+#define REG_TWI1_SMR REG_ACCESS(RwReg, 0x40090008U) /**< \brief (TWI1) Slave Mode Register */
+#define REG_TWI1_IADR REG_ACCESS(RwReg, 0x4009000CU) /**< \brief (TWI1) Internal Address Register */
+#define REG_TWI1_CWGR REG_ACCESS(RwReg, 0x40090010U) /**< \brief (TWI1) Clock Waveform Generator Register */
+#define REG_TWI1_SR REG_ACCESS(RoReg, 0x40090020U) /**< \brief (TWI1) Status Register */
+#define REG_TWI1_IER REG_ACCESS(WoReg, 0x40090024U) /**< \brief (TWI1) Interrupt Enable Register */
+#define REG_TWI1_IDR REG_ACCESS(WoReg, 0x40090028U) /**< \brief (TWI1) Interrupt Disable Register */
+#define REG_TWI1_IMR REG_ACCESS(RoReg, 0x4009002CU) /**< \brief (TWI1) Interrupt Mask Register */
+#define REG_TWI1_RHR REG_ACCESS(RoReg, 0x40090030U) /**< \brief (TWI1) Receive Holding Register */
+#define REG_TWI1_THR REG_ACCESS(WoReg, 0x40090034U) /**< \brief (TWI1) Transmit Holding Register */
+#define REG_TWI1_RPR REG_ACCESS(RwReg, 0x40090100U) /**< \brief (TWI1) Receive Pointer Register */
+#define REG_TWI1_RCR REG_ACCESS(RwReg, 0x40090104U) /**< \brief (TWI1) Receive Counter Register */
+#define REG_TWI1_TPR REG_ACCESS(RwReg, 0x40090108U) /**< \brief (TWI1) Transmit Pointer Register */
+#define REG_TWI1_TCR REG_ACCESS(RwReg, 0x4009010CU) /**< \brief (TWI1) Transmit Counter Register */
+#define REG_TWI1_RNPR REG_ACCESS(RwReg, 0x40090110U) /**< \brief (TWI1) Receive Next Pointer Register */
+#define REG_TWI1_RNCR REG_ACCESS(RwReg, 0x40090114U) /**< \brief (TWI1) Receive Next Counter Register */
+#define REG_TWI1_TNPR REG_ACCESS(RwReg, 0x40090118U) /**< \brief (TWI1) Transmit Next Pointer Register */
+#define REG_TWI1_TNCR REG_ACCESS(RwReg, 0x4009011CU) /**< \brief (TWI1) Transmit Next Counter Register */
+#define REG_TWI1_PTCR REG_ACCESS(WoReg, 0x40090120U) /**< \brief (TWI1) Transfer Control Register */
+#define REG_TWI1_PTSR REG_ACCESS(RoReg, 0x40090124U) /**< \brief (TWI1) Transfer Status Register */
+/* ========== Register definition for PWM peripheral ========== */
+#define REG_PWM_CLK REG_ACCESS(RwReg, 0x40094000U) /**< \brief (PWM) PWM Clock Register */
+#define REG_PWM_ENA REG_ACCESS(WoReg, 0x40094004U) /**< \brief (PWM) PWM Enable Register */
+#define REG_PWM_DIS REG_ACCESS(WoReg, 0x40094008U) /**< \brief (PWM) PWM Disable Register */
+#define REG_PWM_SR REG_ACCESS(RoReg, 0x4009400CU) /**< \brief (PWM) PWM Status Register */
+#define REG_PWM_IER1 REG_ACCESS(WoReg, 0x40094010U) /**< \brief (PWM) PWM Interrupt Enable Register 1 */
+#define REG_PWM_IDR1 REG_ACCESS(WoReg, 0x40094014U) /**< \brief (PWM) PWM Interrupt Disable Register 1 */
+#define REG_PWM_IMR1 REG_ACCESS(RoReg, 0x40094018U) /**< \brief (PWM) PWM Interrupt Mask Register 1 */
+#define REG_PWM_ISR1 REG_ACCESS(RoReg, 0x4009401CU) /**< \brief (PWM) PWM Interrupt Status Register 1 */
+#define REG_PWM_SCM REG_ACCESS(RwReg, 0x40094020U) /**< \brief (PWM) PWM Sync Channels Mode Register */
+#define REG_PWM_SCUC REG_ACCESS(RwReg, 0x40094028U) /**< \brief (PWM) PWM Sync Channels Update Control Register */
+#define REG_PWM_SCUP REG_ACCESS(RwReg, 0x4009402CU) /**< \brief (PWM) PWM Sync Channels Update Period Register */
+#define REG_PWM_SCUPUPD REG_ACCESS(WoReg, 0x40094030U) /**< \brief (PWM) PWM Sync Channels Update Period Update Register */
+#define REG_PWM_IER2 REG_ACCESS(WoReg, 0x40094034U) /**< \brief (PWM) PWM Interrupt Enable Register 2 */
+#define REG_PWM_IDR2 REG_ACCESS(WoReg, 0x40094038U) /**< \brief (PWM) PWM Interrupt Disable Register 2 */
+#define REG_PWM_IMR2 REG_ACCESS(RoReg, 0x4009403CU) /**< \brief (PWM) PWM Interrupt Mask Register 2 */
+#define REG_PWM_ISR2 REG_ACCESS(RoReg, 0x40094040U) /**< \brief (PWM) PWM Interrupt Status Register 2 */
+#define REG_PWM_OOV REG_ACCESS(RwReg, 0x40094044U) /**< \brief (PWM) PWM Output Override Value Register */
+#define REG_PWM_OS REG_ACCESS(RwReg, 0x40094048U) /**< \brief (PWM) PWM Output Selection Register */
+#define REG_PWM_OSS REG_ACCESS(WoReg, 0x4009404CU) /**< \brief (PWM) PWM Output Selection Set Register */
+#define REG_PWM_OSC REG_ACCESS(WoReg, 0x40094050U) /**< \brief (PWM) PWM Output Selection Clear Register */
+#define REG_PWM_OSSUPD REG_ACCESS(WoReg, 0x40094054U) /**< \brief (PWM) PWM Output Selection Set Update Register */
+#define REG_PWM_OSCUPD REG_ACCESS(WoReg, 0x40094058U) /**< \brief (PWM) PWM Output Selection Clear Update Register */
+#define REG_PWM_FMR REG_ACCESS(RwReg, 0x4009405CU) /**< \brief (PWM) PWM Fault Mode Register */
+#define REG_PWM_FSR REG_ACCESS(RoReg, 0x40094060U) /**< \brief (PWM) PWM Fault Status Register */
+#define REG_PWM_FCR REG_ACCESS(WoReg, 0x40094064U) /**< \brief (PWM) PWM Fault Clear Register */
+#define REG_PWM_FPV REG_ACCESS(RwReg, 0x40094068U) /**< \brief (PWM) PWM Fault Protection Value Register */
+#define REG_PWM_FPE1 REG_ACCESS(RwReg, 0x4009406CU) /**< \brief (PWM) PWM Fault Protection Enable Register 1 */
+#define REG_PWM_FPE2 REG_ACCESS(RwReg, 0x40094070U) /**< \brief (PWM) PWM Fault Protection Enable Register 2 */
+#define REG_PWM_ELMR REG_ACCESS(RwReg, 0x4009407CU) /**< \brief (PWM) PWM Event Line 0 Mode Register */
+#define REG_PWM_SMMR REG_ACCESS(RwReg, 0x400940B0U) /**< \brief (PWM) PWM Stepper Motor Mode Register */
+#define REG_PWM_WPCR REG_ACCESS(WoReg, 0x400940E4U) /**< \brief (PWM) PWM Write Protect Control Register */
+#define REG_PWM_WPSR REG_ACCESS(RoReg, 0x400940E8U) /**< \brief (PWM) PWM Write Protect Status Register */
+#define REG_PWM_RPR REG_ACCESS(RwReg, 0x40094100U) /**< \brief (PWM) Receive Pointer Register */
+#define REG_PWM_RCR REG_ACCESS(RwReg, 0x40094104U) /**< \brief (PWM) Receive Counter Register */
+#define REG_PWM_TPR REG_ACCESS(RwReg, 0x40094108U) /**< \brief (PWM) Transmit Pointer Register */
+#define REG_PWM_TCR REG_ACCESS(RwReg, 0x4009410CU) /**< \brief (PWM) Transmit Counter Register */
+#define REG_PWM_RNPR REG_ACCESS(RwReg, 0x40094110U) /**< \brief (PWM) Receive Next Pointer Register */
+#define REG_PWM_RNCR REG_ACCESS(RwReg, 0x40094114U) /**< \brief (PWM) Receive Next Counter Register */
+#define REG_PWM_TNPR REG_ACCESS(RwReg, 0x40094118U) /**< \brief (PWM) Transmit Next Pointer Register */
+#define REG_PWM_TNCR REG_ACCESS(RwReg, 0x4009411CU) /**< \brief (PWM) Transmit Next Counter Register */
+#define REG_PWM_PTCR REG_ACCESS(WoReg, 0x40094120U) /**< \brief (PWM) Transfer Control Register */
+#define REG_PWM_PTSR REG_ACCESS(RoReg, 0x40094124U) /**< \brief (PWM) Transfer Status Register */
+#define REG_PWM_CMPV0 REG_ACCESS(RwReg, 0x40094130U) /**< \brief (PWM) PWM Comparison 0 Value Register */
+#define REG_PWM_CMPVUPD0 REG_ACCESS(WoReg, 0x40094134U) /**< \brief (PWM) PWM Comparison 0 Value Update Register */
+#define REG_PWM_CMPM0 REG_ACCESS(RwReg, 0x40094138U) /**< \brief (PWM) PWM Comparison 0 Mode Register */
+#define REG_PWM_CMPMUPD0 REG_ACCESS(WoReg, 0x4009413CU) /**< \brief (PWM) PWM Comparison 0 Mode Update Register */
+#define REG_PWM_CMPV1 REG_ACCESS(RwReg, 0x40094140U) /**< \brief (PWM) PWM Comparison 1 Value Register */
+#define REG_PWM_CMPVUPD1 REG_ACCESS(WoReg, 0x40094144U) /**< \brief (PWM) PWM Comparison 1 Value Update Register */
+#define REG_PWM_CMPM1 REG_ACCESS(RwReg, 0x40094148U) /**< \brief (PWM) PWM Comparison 1 Mode Register */
+#define REG_PWM_CMPMUPD1 REG_ACCESS(WoReg, 0x4009414CU) /**< \brief (PWM) PWM Comparison 1 Mode Update Register */
+#define REG_PWM_CMPV2 REG_ACCESS(RwReg, 0x40094150U) /**< \brief (PWM) PWM Comparison 2 Value Register */
+#define REG_PWM_CMPVUPD2 REG_ACCESS(WoReg, 0x40094154U) /**< \brief (PWM) PWM Comparison 2 Value Update Register */
+#define REG_PWM_CMPM2 REG_ACCESS(RwReg, 0x40094158U) /**< \brief (PWM) PWM Comparison 2 Mode Register */
+#define REG_PWM_CMPMUPD2 REG_ACCESS(WoReg, 0x4009415CU) /**< \brief (PWM) PWM Comparison 2 Mode Update Register */
+#define REG_PWM_CMPV3 REG_ACCESS(RwReg, 0x40094160U) /**< \brief (PWM) PWM Comparison 3 Value Register */
+#define REG_PWM_CMPVUPD3 REG_ACCESS(WoReg, 0x40094164U) /**< \brief (PWM) PWM Comparison 3 Value Update Register */
+#define REG_PWM_CMPM3 REG_ACCESS(RwReg, 0x40094168U) /**< \brief (PWM) PWM Comparison 3 Mode Register */
+#define REG_PWM_CMPMUPD3 REG_ACCESS(WoReg, 0x4009416CU) /**< \brief (PWM) PWM Comparison 3 Mode Update Register */
+#define REG_PWM_CMPV4 REG_ACCESS(RwReg, 0x40094170U) /**< \brief (PWM) PWM Comparison 4 Value Register */
+#define REG_PWM_CMPVUPD4 REG_ACCESS(WoReg, 0x40094174U) /**< \brief (PWM) PWM Comparison 4 Value Update Register */
+#define REG_PWM_CMPM4 REG_ACCESS(RwReg, 0x40094178U) /**< \brief (PWM) PWM Comparison 4 Mode Register */
+#define REG_PWM_CMPMUPD4 REG_ACCESS(WoReg, 0x4009417CU) /**< \brief (PWM) PWM Comparison 4 Mode Update Register */
+#define REG_PWM_CMPV5 REG_ACCESS(RwReg, 0x40094180U) /**< \brief (PWM) PWM Comparison 5 Value Register */
+#define REG_PWM_CMPVUPD5 REG_ACCESS(WoReg, 0x40094184U) /**< \brief (PWM) PWM Comparison 5 Value Update Register */
+#define REG_PWM_CMPM5 REG_ACCESS(RwReg, 0x40094188U) /**< \brief (PWM) PWM Comparison 5 Mode Register */
+#define REG_PWM_CMPMUPD5 REG_ACCESS(WoReg, 0x4009418CU) /**< \brief (PWM) PWM Comparison 5 Mode Update Register */
+#define REG_PWM_CMPV6 REG_ACCESS(RwReg, 0x40094190U) /**< \brief (PWM) PWM Comparison 6 Value Register */
+#define REG_PWM_CMPVUPD6 REG_ACCESS(WoReg, 0x40094194U) /**< \brief (PWM) PWM Comparison 6 Value Update Register */
+#define REG_PWM_CMPM6 REG_ACCESS(RwReg, 0x40094198U) /**< \brief (PWM) PWM Comparison 6 Mode Register */
+#define REG_PWM_CMPMUPD6 REG_ACCESS(WoReg, 0x4009419CU) /**< \brief (PWM) PWM Comparison 6 Mode Update Register */
+#define REG_PWM_CMPV7 REG_ACCESS(RwReg, 0x400941A0U) /**< \brief (PWM) PWM Comparison 7 Value Register */
+#define REG_PWM_CMPVUPD7 REG_ACCESS(WoReg, 0x400941A4U) /**< \brief (PWM) PWM Comparison 7 Value Update Register */
+#define REG_PWM_CMPM7 REG_ACCESS(RwReg, 0x400941A8U) /**< \brief (PWM) PWM Comparison 7 Mode Register */
+#define REG_PWM_CMPMUPD7 REG_ACCESS(WoReg, 0x400941ACU) /**< \brief (PWM) PWM Comparison 7 Mode Update Register */
+#define REG_PWM_CMR0 REG_ACCESS(RwReg, 0x40094200U) /**< \brief (PWM) PWM Channel Mode Register (ch_num = 0) */
+#define REG_PWM_CDTY0 REG_ACCESS(RwReg, 0x40094204U) /**< \brief (PWM) PWM Channel Duty Cycle Register (ch_num = 0) */
+#define REG_PWM_CDTYUPD0 REG_ACCESS(WoReg, 0x40094208U) /**< \brief (PWM) PWM Channel Duty Cycle Update Register (ch_num = 0) */
+#define REG_PWM_CPRD0 REG_ACCESS(RwReg, 0x4009420CU) /**< \brief (PWM) PWM Channel Period Register (ch_num = 0) */
+#define REG_PWM_CPRDUPD0 REG_ACCESS(WoReg, 0x40094210U) /**< \brief (PWM) PWM Channel Period Update Register (ch_num = 0) */
+#define REG_PWM_CCNT0 REG_ACCESS(RoReg, 0x40094214U) /**< \brief (PWM) PWM Channel Counter Register (ch_num = 0) */
+#define REG_PWM_DT0 REG_ACCESS(RwReg, 0x40094218U) /**< \brief (PWM) PWM Channel Dead Time Register (ch_num = 0) */
+#define REG_PWM_DTUPD0 REG_ACCESS(WoReg, 0x4009421CU) /**< \brief (PWM) PWM Channel Dead Time Update Register (ch_num = 0) */
+#define REG_PWM_CMR1 REG_ACCESS(RwReg, 0x40094220U) /**< \brief (PWM) PWM Channel Mode Register (ch_num = 1) */
+#define REG_PWM_CDTY1 REG_ACCESS(RwReg, 0x40094224U) /**< \brief (PWM) PWM Channel Duty Cycle Register (ch_num = 1) */
+#define REG_PWM_CDTYUPD1 REG_ACCESS(WoReg, 0x40094228U) /**< \brief (PWM) PWM Channel Duty Cycle Update Register (ch_num = 1) */
+#define REG_PWM_CPRD1 REG_ACCESS(RwReg, 0x4009422CU) /**< \brief (PWM) PWM Channel Period Register (ch_num = 1) */
+#define REG_PWM_CPRDUPD1 REG_ACCESS(WoReg, 0x40094230U) /**< \brief (PWM) PWM Channel Period Update Register (ch_num = 1) */
+#define REG_PWM_CCNT1 REG_ACCESS(RoReg, 0x40094234U) /**< \brief (PWM) PWM Channel Counter Register (ch_num = 1) */
+#define REG_PWM_DT1 REG_ACCESS(RwReg, 0x40094238U) /**< \brief (PWM) PWM Channel Dead Time Register (ch_num = 1) */
+#define REG_PWM_DTUPD1 REG_ACCESS(WoReg, 0x4009423CU) /**< \brief (PWM) PWM Channel Dead Time Update Register (ch_num = 1) */
+#define REG_PWM_CMR2 REG_ACCESS(RwReg, 0x40094240U) /**< \brief (PWM) PWM Channel Mode Register (ch_num = 2) */
+#define REG_PWM_CDTY2 REG_ACCESS(RwReg, 0x40094244U) /**< \brief (PWM) PWM Channel Duty Cycle Register (ch_num = 2) */
+#define REG_PWM_CDTYUPD2 REG_ACCESS(WoReg, 0x40094248U) /**< \brief (PWM) PWM Channel Duty Cycle Update Register (ch_num = 2) */
+#define REG_PWM_CPRD2 REG_ACCESS(RwReg, 0x4009424CU) /**< \brief (PWM) PWM Channel Period Register (ch_num = 2) */
+#define REG_PWM_CPRDUPD2 REG_ACCESS(WoReg, 0x40094250U) /**< \brief (PWM) PWM Channel Period Update Register (ch_num = 2) */
+#define REG_PWM_CCNT2 REG_ACCESS(RoReg, 0x40094254U) /**< \brief (PWM) PWM Channel Counter Register (ch_num = 2) */
+#define REG_PWM_DT2 REG_ACCESS(RwReg, 0x40094258U) /**< \brief (PWM) PWM Channel Dead Time Register (ch_num = 2) */
+#define REG_PWM_DTUPD2 REG_ACCESS(WoReg, 0x4009425CU) /**< \brief (PWM) PWM Channel Dead Time Update Register (ch_num = 2) */
+#define REG_PWM_CMR3 REG_ACCESS(RwReg, 0x40094260U) /**< \brief (PWM) PWM Channel Mode Register (ch_num = 3) */
+#define REG_PWM_CDTY3 REG_ACCESS(RwReg, 0x40094264U) /**< \brief (PWM) PWM Channel Duty Cycle Register (ch_num = 3) */
+#define REG_PWM_CDTYUPD3 REG_ACCESS(WoReg, 0x40094268U) /**< \brief (PWM) PWM Channel Duty Cycle Update Register (ch_num = 3) */
+#define REG_PWM_CPRD3 REG_ACCESS(RwReg, 0x4009426CU) /**< \brief (PWM) PWM Channel Period Register (ch_num = 3) */
+#define REG_PWM_CPRDUPD3 REG_ACCESS(WoReg, 0x40094270U) /**< \brief (PWM) PWM Channel Period Update Register (ch_num = 3) */
+#define REG_PWM_CCNT3 REG_ACCESS(RoReg, 0x40094274U) /**< \brief (PWM) PWM Channel Counter Register (ch_num = 3) */
+#define REG_PWM_DT3 REG_ACCESS(RwReg, 0x40094278U) /**< \brief (PWM) PWM Channel Dead Time Register (ch_num = 3) */
+#define REG_PWM_DTUPD3 REG_ACCESS(WoReg, 0x4009427CU) /**< \brief (PWM) PWM Channel Dead Time Update Register (ch_num = 3) */
+#define REG_PWM_CMR4 REG_ACCESS(RwReg, 0x40094280U) /**< \brief (PWM) PWM Channel Mode Register (ch_num = 4) */
+#define REG_PWM_CDTY4 REG_ACCESS(RwReg, 0x40094284U) /**< \brief (PWM) PWM Channel Duty Cycle Register (ch_num = 4) */
+#define REG_PWM_CDTYUPD4 REG_ACCESS(WoReg, 0x40094288U) /**< \brief (PWM) PWM Channel Duty Cycle Update Register (ch_num = 4) */
+#define REG_PWM_CPRD4 REG_ACCESS(RwReg, 0x4009428CU) /**< \brief (PWM) PWM Channel Period Register (ch_num = 4) */
+#define REG_PWM_CPRDUPD4 REG_ACCESS(WoReg, 0x40094290U) /**< \brief (PWM) PWM Channel Period Update Register (ch_num = 4) */
+#define REG_PWM_CCNT4 REG_ACCESS(RoReg, 0x40094294U) /**< \brief (PWM) PWM Channel Counter Register (ch_num = 4) */
+#define REG_PWM_DT4 REG_ACCESS(RwReg, 0x40094298U) /**< \brief (PWM) PWM Channel Dead Time Register (ch_num = 4) */
+#define REG_PWM_DTUPD4 REG_ACCESS(WoReg, 0x4009429CU) /**< \brief (PWM) PWM Channel Dead Time Update Register (ch_num = 4) */
+#define REG_PWM_CMR5 REG_ACCESS(RwReg, 0x400942A0U) /**< \brief (PWM) PWM Channel Mode Register (ch_num = 5) */
+#define REG_PWM_CDTY5 REG_ACCESS(RwReg, 0x400942A4U) /**< \brief (PWM) PWM Channel Duty Cycle Register (ch_num = 5) */
+#define REG_PWM_CDTYUPD5 REG_ACCESS(WoReg, 0x400942A8U) /**< \brief (PWM) PWM Channel Duty Cycle Update Register (ch_num = 5) */
+#define REG_PWM_CPRD5 REG_ACCESS(RwReg, 0x400942ACU) /**< \brief (PWM) PWM Channel Period Register (ch_num = 5) */
+#define REG_PWM_CPRDUPD5 REG_ACCESS(WoReg, 0x400942B0U) /**< \brief (PWM) PWM Channel Period Update Register (ch_num = 5) */
+#define REG_PWM_CCNT5 REG_ACCESS(RoReg, 0x400942B4U) /**< \brief (PWM) PWM Channel Counter Register (ch_num = 5) */
+#define REG_PWM_DT5 REG_ACCESS(RwReg, 0x400942B8U) /**< \brief (PWM) PWM Channel Dead Time Register (ch_num = 5) */
+#define REG_PWM_DTUPD5 REG_ACCESS(WoReg, 0x400942BCU) /**< \brief (PWM) PWM Channel Dead Time Update Register (ch_num = 5) */
+#define REG_PWM_CMR6 REG_ACCESS(RwReg, 0x400942C0U) /**< \brief (PWM) PWM Channel Mode Register (ch_num = 6) */
+#define REG_PWM_CDTY6 REG_ACCESS(RwReg, 0x400942C4U) /**< \brief (PWM) PWM Channel Duty Cycle Register (ch_num = 6) */
+#define REG_PWM_CDTYUPD6 REG_ACCESS(WoReg, 0x400942C8U) /**< \brief (PWM) PWM Channel Duty Cycle Update Register (ch_num = 6) */
+#define REG_PWM_CPRD6 REG_ACCESS(RwReg, 0x400942CCU) /**< \brief (PWM) PWM Channel Period Register (ch_num = 6) */
+#define REG_PWM_CPRDUPD6 REG_ACCESS(WoReg, 0x400942D0U) /**< \brief (PWM) PWM Channel Period Update Register (ch_num = 6) */
+#define REG_PWM_CCNT6 REG_ACCESS(RoReg, 0x400942D4U) /**< \brief (PWM) PWM Channel Counter Register (ch_num = 6) */
+#define REG_PWM_DT6 REG_ACCESS(RwReg, 0x400942D8U) /**< \brief (PWM) PWM Channel Dead Time Register (ch_num = 6) */
+#define REG_PWM_DTUPD6 REG_ACCESS(WoReg, 0x400942DCU) /**< \brief (PWM) PWM Channel Dead Time Update Register (ch_num = 6) */
+#define REG_PWM_CMR7 REG_ACCESS(RwReg, 0x400942E0U) /**< \brief (PWM) PWM Channel Mode Register (ch_num = 7) */
+#define REG_PWM_CDTY7 REG_ACCESS(RwReg, 0x400942E4U) /**< \brief (PWM) PWM Channel Duty Cycle Register (ch_num = 7) */
+#define REG_PWM_CDTYUPD7 REG_ACCESS(WoReg, 0x400942E8U) /**< \brief (PWM) PWM Channel Duty Cycle Update Register (ch_num = 7) */
+#define REG_PWM_CPRD7 REG_ACCESS(RwReg, 0x400942ECU) /**< \brief (PWM) PWM Channel Period Register (ch_num = 7) */
+#define REG_PWM_CPRDUPD7 REG_ACCESS(WoReg, 0x400942F0U) /**< \brief (PWM) PWM Channel Period Update Register (ch_num = 7) */
+#define REG_PWM_CCNT7 REG_ACCESS(RoReg, 0x400942F4U) /**< \brief (PWM) PWM Channel Counter Register (ch_num = 7) */
+#define REG_PWM_DT7 REG_ACCESS(RwReg, 0x400942F8U) /**< \brief (PWM) PWM Channel Dead Time Register (ch_num = 7) */
+#define REG_PWM_DTUPD7 REG_ACCESS(WoReg, 0x400942FCU) /**< \brief (PWM) PWM Channel Dead Time Update Register (ch_num = 7) */
+/* ========== Register definition for USART0 peripheral ========== */
+#define REG_USART0_CR REG_ACCESS(WoReg, 0x40098000U) /**< \brief (USART0) Control Register */
+#define REG_USART0_MR REG_ACCESS(RwReg, 0x40098004U) /**< \brief (USART0) Mode Register */
+#define REG_USART0_IER REG_ACCESS(WoReg, 0x40098008U) /**< \brief (USART0) Interrupt Enable Register */
+#define REG_USART0_IDR REG_ACCESS(WoReg, 0x4009800CU) /**< \brief (USART0) Interrupt Disable Register */
+#define REG_USART0_IMR REG_ACCESS(RoReg, 0x40098010U) /**< \brief (USART0) Interrupt Mask Register */
+#define REG_USART0_CSR REG_ACCESS(RoReg, 0x40098014U) /**< \brief (USART0) Channel Status Register */
+#define REG_USART0_RHR REG_ACCESS(RoReg, 0x40098018U) /**< \brief (USART0) Receiver Holding Register */
+#define REG_USART0_THR REG_ACCESS(WoReg, 0x4009801CU) /**< \brief (USART0) Transmitter Holding Register */
+#define REG_USART0_BRGR REG_ACCESS(RwReg, 0x40098020U) /**< \brief (USART0) Baud Rate Generator Register */
+#define REG_USART0_RTOR REG_ACCESS(RwReg, 0x40098024U) /**< \brief (USART0) Receiver Time-out Register */
+#define REG_USART0_TTGR REG_ACCESS(RwReg, 0x40098028U) /**< \brief (USART0) Transmitter Timeguard Register */
+#define REG_USART0_FIDI REG_ACCESS(RwReg, 0x40098040U) /**< \brief (USART0) FI DI Ratio Register */
+#define REG_USART0_NER REG_ACCESS(RoReg, 0x40098044U) /**< \brief (USART0) Number of Errors Register */
+#define REG_USART0_IF REG_ACCESS(RwReg, 0x4009804CU) /**< \brief (USART0) IrDA Filter Register */
+#define REG_USART0_MAN REG_ACCESS(RwReg, 0x40098050U) /**< \brief (USART0) Manchester Encoder Decoder Register */
+#define REG_USART0_LINMR REG_ACCESS(RwReg, 0x40098054U) /**< \brief (USART0) LIN Mode Register */
+#define REG_USART0_LINIR REG_ACCESS(RwReg, 0x40098058U) /**< \brief (USART0) LIN Identifier Register */
+#define REG_USART0_WPMR REG_ACCESS(RwReg, 0x400980E4U) /**< \brief (USART0) Write Protect Mode Register */
+#define REG_USART0_WPSR REG_ACCESS(RoReg, 0x400980E8U) /**< \brief (USART0) Write Protect Status Register */
+#define REG_USART0_RPR REG_ACCESS(RwReg, 0x40098100U) /**< \brief (USART0) Receive Pointer Register */
+#define REG_USART0_RCR REG_ACCESS(RwReg, 0x40098104U) /**< \brief (USART0) Receive Counter Register */
+#define REG_USART0_TPR REG_ACCESS(RwReg, 0x40098108U) /**< \brief (USART0) Transmit Pointer Register */
+#define REG_USART0_TCR REG_ACCESS(RwReg, 0x4009810CU) /**< \brief (USART0) Transmit Counter Register */
+#define REG_USART0_RNPR REG_ACCESS(RwReg, 0x40098110U) /**< \brief (USART0) Receive Next Pointer Register */
+#define REG_USART0_RNCR REG_ACCESS(RwReg, 0x40098114U) /**< \brief (USART0) Receive Next Counter Register */
+#define REG_USART0_TNPR REG_ACCESS(RwReg, 0x40098118U) /**< \brief (USART0) Transmit Next Pointer Register */
+#define REG_USART0_TNCR REG_ACCESS(RwReg, 0x4009811CU) /**< \brief (USART0) Transmit Next Counter Register */
+#define REG_USART0_PTCR REG_ACCESS(WoReg, 0x40098120U) /**< \brief (USART0) Transfer Control Register */
+#define REG_USART0_PTSR REG_ACCESS(RoReg, 0x40098124U) /**< \brief (USART0) Transfer Status Register */
+/* ========== Register definition for USART1 peripheral ========== */
+#define REG_USART1_CR REG_ACCESS(WoReg, 0x4009C000U) /**< \brief (USART1) Control Register */
+#define REG_USART1_MR REG_ACCESS(RwReg, 0x4009C004U) /**< \brief (USART1) Mode Register */
+#define REG_USART1_IER REG_ACCESS(WoReg, 0x4009C008U) /**< \brief (USART1) Interrupt Enable Register */
+#define REG_USART1_IDR REG_ACCESS(WoReg, 0x4009C00CU) /**< \brief (USART1) Interrupt Disable Register */
+#define REG_USART1_IMR REG_ACCESS(RoReg, 0x4009C010U) /**< \brief (USART1) Interrupt Mask Register */
+#define REG_USART1_CSR REG_ACCESS(RoReg, 0x4009C014U) /**< \brief (USART1) Channel Status Register */
+#define REG_USART1_RHR REG_ACCESS(RoReg, 0x4009C018U) /**< \brief (USART1) Receiver Holding Register */
+#define REG_USART1_THR REG_ACCESS(WoReg, 0x4009C01CU) /**< \brief (USART1) Transmitter Holding Register */
+#define REG_USART1_BRGR REG_ACCESS(RwReg, 0x4009C020U) /**< \brief (USART1) Baud Rate Generator Register */
+#define REG_USART1_RTOR REG_ACCESS(RwReg, 0x4009C024U) /**< \brief (USART1) Receiver Time-out Register */
+#define REG_USART1_TTGR REG_ACCESS(RwReg, 0x4009C028U) /**< \brief (USART1) Transmitter Timeguard Register */
+#define REG_USART1_FIDI REG_ACCESS(RwReg, 0x4009C040U) /**< \brief (USART1) FI DI Ratio Register */
+#define REG_USART1_NER REG_ACCESS(RoReg, 0x4009C044U) /**< \brief (USART1) Number of Errors Register */
+#define REG_USART1_IF REG_ACCESS(RwReg, 0x4009C04CU) /**< \brief (USART1) IrDA Filter Register */
+#define REG_USART1_MAN REG_ACCESS(RwReg, 0x4009C050U) /**< \brief (USART1) Manchester Encoder Decoder Register */
+#define REG_USART1_LINMR REG_ACCESS(RwReg, 0x4009C054U) /**< \brief (USART1) LIN Mode Register */
+#define REG_USART1_LINIR REG_ACCESS(RwReg, 0x4009C058U) /**< \brief (USART1) LIN Identifier Register */
+#define REG_USART1_WPMR REG_ACCESS(RwReg, 0x4009C0E4U) /**< \brief (USART1) Write Protect Mode Register */
+#define REG_USART1_WPSR REG_ACCESS(RoReg, 0x4009C0E8U) /**< \brief (USART1) Write Protect Status Register */
+#define REG_USART1_RPR REG_ACCESS(RwReg, 0x4009C100U) /**< \brief (USART1) Receive Pointer Register */
+#define REG_USART1_RCR REG_ACCESS(RwReg, 0x4009C104U) /**< \brief (USART1) Receive Counter Register */
+#define REG_USART1_TPR REG_ACCESS(RwReg, 0x4009C108U) /**< \brief (USART1) Transmit Pointer Register */
+#define REG_USART1_TCR REG_ACCESS(RwReg, 0x4009C10CU) /**< \brief (USART1) Transmit Counter Register */
+#define REG_USART1_RNPR REG_ACCESS(RwReg, 0x4009C110U) /**< \brief (USART1) Receive Next Pointer Register */
+#define REG_USART1_RNCR REG_ACCESS(RwReg, 0x4009C114U) /**< \brief (USART1) Receive Next Counter Register */
+#define REG_USART1_TNPR REG_ACCESS(RwReg, 0x4009C118U) /**< \brief (USART1) Transmit Next Pointer Register */
+#define REG_USART1_TNCR REG_ACCESS(RwReg, 0x4009C11CU) /**< \brief (USART1) Transmit Next Counter Register */
+#define REG_USART1_PTCR REG_ACCESS(WoReg, 0x4009C120U) /**< \brief (USART1) Transfer Control Register */
+#define REG_USART1_PTSR REG_ACCESS(RoReg, 0x4009C124U) /**< \brief (USART1) Transfer Status Register */
+/* ========== Register definition for USART2 peripheral ========== */
+#define REG_USART2_CR REG_ACCESS(WoReg, 0x400A0000U) /**< \brief (USART2) Control Register */
+#define REG_USART2_MR REG_ACCESS(RwReg, 0x400A0004U) /**< \brief (USART2) Mode Register */
+#define REG_USART2_IER REG_ACCESS(WoReg, 0x400A0008U) /**< \brief (USART2) Interrupt Enable Register */
+#define REG_USART2_IDR REG_ACCESS(WoReg, 0x400A000CU) /**< \brief (USART2) Interrupt Disable Register */
+#define REG_USART2_IMR REG_ACCESS(RoReg, 0x400A0010U) /**< \brief (USART2) Interrupt Mask Register */
+#define REG_USART2_CSR REG_ACCESS(RoReg, 0x400A0014U) /**< \brief (USART2) Channel Status Register */
+#define REG_USART2_RHR REG_ACCESS(RoReg, 0x400A0018U) /**< \brief (USART2) Receiver Holding Register */
+#define REG_USART2_THR REG_ACCESS(WoReg, 0x400A001CU) /**< \brief (USART2) Transmitter Holding Register */
+#define REG_USART2_BRGR REG_ACCESS(RwReg, 0x400A0020U) /**< \brief (USART2) Baud Rate Generator Register */
+#define REG_USART2_RTOR REG_ACCESS(RwReg, 0x400A0024U) /**< \brief (USART2) Receiver Time-out Register */
+#define REG_USART2_TTGR REG_ACCESS(RwReg, 0x400A0028U) /**< \brief (USART2) Transmitter Timeguard Register */
+#define REG_USART2_FIDI REG_ACCESS(RwReg, 0x400A0040U) /**< \brief (USART2) FI DI Ratio Register */
+#define REG_USART2_NER REG_ACCESS(RoReg, 0x400A0044U) /**< \brief (USART2) Number of Errors Register */
+#define REG_USART2_IF REG_ACCESS(RwReg, 0x400A004CU) /**< \brief (USART2) IrDA Filter Register */
+#define REG_USART2_MAN REG_ACCESS(RwReg, 0x400A0050U) /**< \brief (USART2) Manchester Encoder Decoder Register */
+#define REG_USART2_LINMR REG_ACCESS(RwReg, 0x400A0054U) /**< \brief (USART2) LIN Mode Register */
+#define REG_USART2_LINIR REG_ACCESS(RwReg, 0x400A0058U) /**< \brief (USART2) LIN Identifier Register */
+#define REG_USART2_WPMR REG_ACCESS(RwReg, 0x400A00E4U) /**< \brief (USART2) Write Protect Mode Register */
+#define REG_USART2_WPSR REG_ACCESS(RoReg, 0x400A00E8U) /**< \brief (USART2) Write Protect Status Register */
+#define REG_USART2_RPR REG_ACCESS(RwReg, 0x400A0100U) /**< \brief (USART2) Receive Pointer Register */
+#define REG_USART2_RCR REG_ACCESS(RwReg, 0x400A0104U) /**< \brief (USART2) Receive Counter Register */
+#define REG_USART2_TPR REG_ACCESS(RwReg, 0x400A0108U) /**< \brief (USART2) Transmit Pointer Register */
+#define REG_USART2_TCR REG_ACCESS(RwReg, 0x400A010CU) /**< \brief (USART2) Transmit Counter Register */
+#define REG_USART2_RNPR REG_ACCESS(RwReg, 0x400A0110U) /**< \brief (USART2) Receive Next Pointer Register */
+#define REG_USART2_RNCR REG_ACCESS(RwReg, 0x400A0114U) /**< \brief (USART2) Receive Next Counter Register */
+#define REG_USART2_TNPR REG_ACCESS(RwReg, 0x400A0118U) /**< \brief (USART2) Transmit Next Pointer Register */
+#define REG_USART2_TNCR REG_ACCESS(RwReg, 0x400A011CU) /**< \brief (USART2) Transmit Next Counter Register */
+#define REG_USART2_PTCR REG_ACCESS(WoReg, 0x400A0120U) /**< \brief (USART2) Transfer Control Register */
+#define REG_USART2_PTSR REG_ACCESS(RoReg, 0x400A0124U) /**< \brief (USART2) Transfer Status Register */
+/* ========== Register definition for USART3 peripheral ========== */
+#define REG_USART3_CR REG_ACCESS(WoReg, 0x400A4000U) /**< \brief (USART3) Control Register */
+#define REG_USART3_MR REG_ACCESS(RwReg, 0x400A4004U) /**< \brief (USART3) Mode Register */
+#define REG_USART3_IER REG_ACCESS(WoReg, 0x400A4008U) /**< \brief (USART3) Interrupt Enable Register */
+#define REG_USART3_IDR REG_ACCESS(WoReg, 0x400A400CU) /**< \brief (USART3) Interrupt Disable Register */
+#define REG_USART3_IMR REG_ACCESS(RoReg, 0x400A4010U) /**< \brief (USART3) Interrupt Mask Register */
+#define REG_USART3_CSR REG_ACCESS(RoReg, 0x400A4014U) /**< \brief (USART3) Channel Status Register */
+#define REG_USART3_RHR REG_ACCESS(RoReg, 0x400A4018U) /**< \brief (USART3) Receiver Holding Register */
+#define REG_USART3_THR REG_ACCESS(WoReg, 0x400A401CU) /**< \brief (USART3) Transmitter Holding Register */
+#define REG_USART3_BRGR REG_ACCESS(RwReg, 0x400A4020U) /**< \brief (USART3) Baud Rate Generator Register */
+#define REG_USART3_RTOR REG_ACCESS(RwReg, 0x400A4024U) /**< \brief (USART3) Receiver Time-out Register */
+#define REG_USART3_TTGR REG_ACCESS(RwReg, 0x400A4028U) /**< \brief (USART3) Transmitter Timeguard Register */
+#define REG_USART3_FIDI REG_ACCESS(RwReg, 0x400A4040U) /**< \brief (USART3) FI DI Ratio Register */
+#define REG_USART3_NER REG_ACCESS(RoReg, 0x400A4044U) /**< \brief (USART3) Number of Errors Register */
+#define REG_USART3_IF REG_ACCESS(RwReg, 0x400A404CU) /**< \brief (USART3) IrDA Filter Register */
+#define REG_USART3_MAN REG_ACCESS(RwReg, 0x400A4050U) /**< \brief (USART3) Manchester Encoder Decoder Register */
+#define REG_USART3_LINMR REG_ACCESS(RwReg, 0x400A4054U) /**< \brief (USART3) LIN Mode Register */
+#define REG_USART3_LINIR REG_ACCESS(RwReg, 0x400A4058U) /**< \brief (USART3) LIN Identifier Register */
+#define REG_USART3_WPMR REG_ACCESS(RwReg, 0x400A40E4U) /**< \brief (USART3) Write Protect Mode Register */
+#define REG_USART3_WPSR REG_ACCESS(RoReg, 0x400A40E8U) /**< \brief (USART3) Write Protect Status Register */
+#define REG_USART3_RPR REG_ACCESS(RwReg, 0x400A4100U) /**< \brief (USART3) Receive Pointer Register */
+#define REG_USART3_RCR REG_ACCESS(RwReg, 0x400A4104U) /**< \brief (USART3) Receive Counter Register */
+#define REG_USART3_TPR REG_ACCESS(RwReg, 0x400A4108U) /**< \brief (USART3) Transmit Pointer Register */
+#define REG_USART3_TCR REG_ACCESS(RwReg, 0x400A410CU) /**< \brief (USART3) Transmit Counter Register */
+#define REG_USART3_RNPR REG_ACCESS(RwReg, 0x400A4110U) /**< \brief (USART3) Receive Next Pointer Register */
+#define REG_USART3_RNCR REG_ACCESS(RwReg, 0x400A4114U) /**< \brief (USART3) Receive Next Counter Register */
+#define REG_USART3_TNPR REG_ACCESS(RwReg, 0x400A4118U) /**< \brief (USART3) Transmit Next Pointer Register */
+#define REG_USART3_TNCR REG_ACCESS(RwReg, 0x400A411CU) /**< \brief (USART3) Transmit Next Counter Register */
+#define REG_USART3_PTCR REG_ACCESS(WoReg, 0x400A4120U) /**< \brief (USART3) Transfer Control Register */
+#define REG_USART3_PTSR REG_ACCESS(RoReg, 0x400A4124U) /**< \brief (USART3) Transfer Status Register */
+/* ========== Register definition for UOTGHS peripheral ========== */
+#define REG_UOTGHS_DEVCTRL REG_ACCESS(RwReg, 0x400AC000U) /**< \brief (UOTGHS) Device General Control Register */
+#define REG_UOTGHS_DEVISR REG_ACCESS(RoReg, 0x400AC004U) /**< \brief (UOTGHS) Device Global Interrupt Status Register */
+#define REG_UOTGHS_DEVICR REG_ACCESS(WoReg, 0x400AC008U) /**< \brief (UOTGHS) Device Global Interrupt Clear Register */
+#define REG_UOTGHS_DEVIFR REG_ACCESS(WoReg, 0x400AC00CU) /**< \brief (UOTGHS) Device Global Interrupt Set Register */
+#define REG_UOTGHS_DEVIMR REG_ACCESS(RoReg, 0x400AC010U) /**< \brief (UOTGHS) Device Global Interrupt Mask Register */
+#define REG_UOTGHS_DEVIDR REG_ACCESS(WoReg, 0x400AC014U) /**< \brief (UOTGHS) Device Global Interrupt Disable Register */
+#define REG_UOTGHS_DEVIER REG_ACCESS(WoReg, 0x400AC018U) /**< \brief (UOTGHS) Device Global Interrupt Enable Register */
+#define REG_UOTGHS_DEVEPT REG_ACCESS(RwReg, 0x400AC01CU) /**< \brief (UOTGHS) Device Endpoint Register */
+#define REG_UOTGHS_DEVFNUM REG_ACCESS(RoReg, 0x400AC020U) /**< \brief (UOTGHS) Device Frame Number Register */
+#define REG_UOTGHS_DEVEPTCFG REG_ACCESS(RwReg, 0x400AC100U) /**< \brief (UOTGHS) Device Endpoint Configuration Register (n = 0) */
+#define REG_UOTGHS_DEVEPTISR REG_ACCESS(RoReg, 0x400AC130U) /**< \brief (UOTGHS) Device Endpoint Status Register (n = 0) */
+#define REG_UOTGHS_DEVEPTICR REG_ACCESS(WoReg, 0x400AC160U) /**< \brief (UOTGHS) Device Endpoint Clear Register (n = 0) */
+#define REG_UOTGHS_DEVEPTIFR REG_ACCESS(WoReg, 0x400AC190U) /**< \brief (UOTGHS) Device Endpoint Set Register (n = 0) */
+#define REG_UOTGHS_DEVEPTIMR REG_ACCESS(RoReg, 0x400AC1C0U) /**< \brief (UOTGHS) Device Endpoint Mask Register (n = 0) */
+#define REG_UOTGHS_DEVEPTIER REG_ACCESS(WoReg, 0x400AC1F0U) /**< \brief (UOTGHS) Device Endpoint Enable Register (n = 0) */
+#define REG_UOTGHS_DEVEPTIDR REG_ACCESS(WoReg, 0x400AC220U) /**< \brief (UOTGHS) Device Endpoint Disable Register (n = 0) */
+#define REG_UOTGHS_DEVDMANXTDSC1 REG_ACCESS(RwReg, 0x400AC310U) /**< \brief (UOTGHS) Device DMA Channel Next Descriptor Address Register (n = 1) */
+#define REG_UOTGHS_DEVDMAADDRESS1 REG_ACCESS(RwReg, 0x400AC314U) /**< \brief (UOTGHS) Device DMA Channel Address Register (n = 1) */
+#define REG_UOTGHS_DEVDMACONTROL1 REG_ACCESS(RwReg, 0x400AC318U) /**< \brief (UOTGHS) Device DMA Channel Control Register (n = 1) */
+#define REG_UOTGHS_DEVDMASTATUS1 REG_ACCESS(RwReg, 0x400AC31CU) /**< \brief (UOTGHS) Device DMA Channel Status Register (n = 1) */
+#define REG_UOTGHS_DEVDMANXTDSC2 REG_ACCESS(RwReg, 0x400AC320U) /**< \brief (UOTGHS) Device DMA Channel Next Descriptor Address Register (n = 2) */
+#define REG_UOTGHS_DEVDMAADDRESS2 REG_ACCESS(RwReg, 0x400AC324U) /**< \brief (UOTGHS) Device DMA Channel Address Register (n = 2) */
+#define REG_UOTGHS_DEVDMACONTROL2 REG_ACCESS(RwReg, 0x400AC328U) /**< \brief (UOTGHS) Device DMA Channel Control Register (n = 2) */
+#define REG_UOTGHS_DEVDMASTATUS2 REG_ACCESS(RwReg, 0x400AC32CU) /**< \brief (UOTGHS) Device DMA Channel Status Register (n = 2) */
+#define REG_UOTGHS_DEVDMANXTDSC3 REG_ACCESS(RwReg, 0x400AC330U) /**< \brief (UOTGHS) Device DMA Channel Next Descriptor Address Register (n = 3) */
+#define REG_UOTGHS_DEVDMAADDRESS3 REG_ACCESS(RwReg, 0x400AC334U) /**< \brief (UOTGHS) Device DMA Channel Address Register (n = 3) */
+#define REG_UOTGHS_DEVDMACONTROL3 REG_ACCESS(RwReg, 0x400AC338U) /**< \brief (UOTGHS) Device DMA Channel Control Register (n = 3) */
+#define REG_UOTGHS_DEVDMASTATUS3 REG_ACCESS(RwReg, 0x400AC33CU) /**< \brief (UOTGHS) Device DMA Channel Status Register (n = 3) */
+#define REG_UOTGHS_DEVDMANXTDSC4 REG_ACCESS(RwReg, 0x400AC340U) /**< \brief (UOTGHS) Device DMA Channel Next Descriptor Address Register (n = 4) */
+#define REG_UOTGHS_DEVDMAADDRESS4 REG_ACCESS(RwReg, 0x400AC344U) /**< \brief (UOTGHS) Device DMA Channel Address Register (n = 4) */
+#define REG_UOTGHS_DEVDMACONTROL4 REG_ACCESS(RwReg, 0x400AC348U) /**< \brief (UOTGHS) Device DMA Channel Control Register (n = 4) */
+#define REG_UOTGHS_DEVDMASTATUS4 REG_ACCESS(RwReg, 0x400AC34CU) /**< \brief (UOTGHS) Device DMA Channel Status Register (n = 4) */
+#define REG_UOTGHS_DEVDMANXTDSC5 REG_ACCESS(RwReg, 0x400AC350U) /**< \brief (UOTGHS) Device DMA Channel Next Descriptor Address Register (n = 5) */
+#define REG_UOTGHS_DEVDMAADDRESS5 REG_ACCESS(RwReg, 0x400AC354U) /**< \brief (UOTGHS) Device DMA Channel Address Register (n = 5) */
+#define REG_UOTGHS_DEVDMACONTROL5 REG_ACCESS(RwReg, 0x400AC358U) /**< \brief (UOTGHS) Device DMA Channel Control Register (n = 5) */
+#define REG_UOTGHS_DEVDMASTATUS5 REG_ACCESS(RwReg, 0x400AC35CU) /**< \brief (UOTGHS) Device DMA Channel Status Register (n = 5) */
+#define REG_UOTGHS_DEVDMANXTDSC6 REG_ACCESS(RwReg, 0x400AC360U) /**< \brief (UOTGHS) Device DMA Channel Next Descriptor Address Register (n = 6) */
+#define REG_UOTGHS_DEVDMAADDRESS6 REG_ACCESS(RwReg, 0x400AC364U) /**< \brief (UOTGHS) Device DMA Channel Address Register (n = 6) */
+#define REG_UOTGHS_DEVDMACONTROL6 REG_ACCESS(RwReg, 0x400AC368U) /**< \brief (UOTGHS) Device DMA Channel Control Register (n = 6) */
+#define REG_UOTGHS_DEVDMASTATUS6 REG_ACCESS(RwReg, 0x400AC36CU) /**< \brief (UOTGHS) Device DMA Channel Status Register (n = 6) */
+#define REG_UOTGHS_DEVDMANXTDSC7 REG_ACCESS(RwReg, 0x400AC370U) /**< \brief (UOTGHS) Device DMA Channel Next Descriptor Address Register (n = 7) */
+#define REG_UOTGHS_DEVDMAADDRESS7 REG_ACCESS(RwReg, 0x400AC374U) /**< \brief (UOTGHS) Device DMA Channel Address Register (n = 7) */
+#define REG_UOTGHS_DEVDMACONTROL7 REG_ACCESS(RwReg, 0x400AC378U) /**< \brief (UOTGHS) Device DMA Channel Control Register (n = 7) */
+#define REG_UOTGHS_DEVDMASTATUS7 REG_ACCESS(RwReg, 0x400AC37CU) /**< \brief (UOTGHS) Device DMA Channel Status Register (n = 7) */
+#define REG_UOTGHS_HSTCTRL REG_ACCESS(RwReg, 0x400AC400U) /**< \brief (UOTGHS) Host General Control Register */
+#define REG_UOTGHS_HSTISR REG_ACCESS(RoReg, 0x400AC404U) /**< \brief (UOTGHS) Host Global Interrupt Status Register */
+#define REG_UOTGHS_HSTICR REG_ACCESS(WoReg, 0x400AC408U) /**< \brief (UOTGHS) Host Global Interrupt Clear Register */
+#define REG_UOTGHS_HSTIFR REG_ACCESS(WoReg, 0x400AC40CU) /**< \brief (UOTGHS) Host Global Interrupt Set Register */
+#define REG_UOTGHS_HSTIMR REG_ACCESS(RoReg, 0x400AC410U) /**< \brief (UOTGHS) Host Global Interrupt Mask Register */
+#define REG_UOTGHS_HSTIDR REG_ACCESS(WoReg, 0x400AC414U) /**< \brief (UOTGHS) Host Global Interrupt Disable Register */
+#define REG_UOTGHS_HSTIER REG_ACCESS(WoReg, 0x400AC418U) /**< \brief (UOTGHS) Host Global Interrupt Enable Register */
+#define REG_UOTGHS_HSTPIP REG_ACCESS(RwReg, 0x400AC41CU) /**< \brief (UOTGHS) Host Pipe Register */
+#define REG_UOTGHS_HSTFNUM REG_ACCESS(RwReg, 0x400AC420U) /**< \brief (UOTGHS) Host Frame Number Register */
+#define REG_UOTGHS_HSTADDR1 REG_ACCESS(RwReg, 0x400AC424U) /**< \brief (UOTGHS) Host Address 1 Register */
+#define REG_UOTGHS_HSTADDR2 REG_ACCESS(RwReg, 0x400AC428U) /**< \brief (UOTGHS) Host Address 2 Register */
+#define REG_UOTGHS_HSTADDR3 REG_ACCESS(RwReg, 0x400AC42CU) /**< \brief (UOTGHS) Host Address 3 Register */
+#define REG_UOTGHS_HSTPIPCFG REG_ACCESS(RwReg, 0x400AC500U) /**< \brief (UOTGHS) Host Pipe Configuration Register (n = 0) */
+#define REG_UOTGHS_HSTPIPISR REG_ACCESS(RoReg, 0x400AC530U) /**< \brief (UOTGHS) Host Pipe Status Register (n = 0) */
+#define REG_UOTGHS_HSTPIPICR REG_ACCESS(WoReg, 0x400AC560U) /**< \brief (UOTGHS) Host Pipe Clear Register (n = 0) */
+#define REG_UOTGHS_HSTPIPIFR REG_ACCESS(WoReg, 0x400AC590U) /**< \brief (UOTGHS) Host Pipe Set Register (n = 0) */
+#define REG_UOTGHS_HSTPIPIMR REG_ACCESS(RoReg, 0x400AC5C0U) /**< \brief (UOTGHS) Host Pipe Mask Register (n = 0) */
+#define REG_UOTGHS_HSTPIPIER REG_ACCESS(WoReg, 0x400AC5F0U) /**< \brief (UOTGHS) Host Pipe Enable Register (n = 0) */
+#define REG_UOTGHS_HSTPIPIDR REG_ACCESS(WoReg, 0x400AC620U) /**< \brief (UOTGHS) Host Pipe Disable Register (n = 0) */
+#define REG_UOTGHS_HSTPIPINRQ REG_ACCESS(RwReg, 0x400AC650U) /**< \brief (UOTGHS) Host Pipe IN Request Register (n = 0) */
+#define REG_UOTGHS_HSTPIPERR REG_ACCESS(RwReg, 0x400AC680U) /**< \brief (UOTGHS) Host Pipe Error Register (n = 0) */
+#define REG_UOTGHS_HSTDMANXTDSC1 REG_ACCESS(RwReg, 0x400AC710U) /**< \brief (UOTGHS) Host DMA Channel Next Descriptor Address Register (n = 1) */
+#define REG_UOTGHS_HSTDMAADDRESS1 REG_ACCESS(RwReg, 0x400AC714U) /**< \brief (UOTGHS) Host DMA Channel Address Register (n = 1) */
+#define REG_UOTGHS_HSTDMACONTROL1 REG_ACCESS(RwReg, 0x400AC718U) /**< \brief (UOTGHS) Host DMA Channel Control Register (n = 1) */
+#define REG_UOTGHS_HSTDMASTATUS1 REG_ACCESS(RwReg, 0x400AC71CU) /**< \brief (UOTGHS) Host DMA Channel Status Register (n = 1) */
+#define REG_UOTGHS_HSTDMANXTDSC2 REG_ACCESS(RwReg, 0x400AC720U) /**< \brief (UOTGHS) Host DMA Channel Next Descriptor Address Register (n = 2) */
+#define REG_UOTGHS_HSTDMAADDRESS2 REG_ACCESS(RwReg, 0x400AC724U) /**< \brief (UOTGHS) Host DMA Channel Address Register (n = 2) */
+#define REG_UOTGHS_HSTDMACONTROL2 REG_ACCESS(RwReg, 0x400AC728U) /**< \brief (UOTGHS) Host DMA Channel Control Register (n = 2) */
+#define REG_UOTGHS_HSTDMASTATUS2 REG_ACCESS(RwReg, 0x400AC72CU) /**< \brief (UOTGHS) Host DMA Channel Status Register (n = 2) */
+#define REG_UOTGHS_HSTDMANXTDSC3 REG_ACCESS(RwReg, 0x400AC730U) /**< \brief (UOTGHS) Host DMA Channel Next Descriptor Address Register (n = 3) */
+#define REG_UOTGHS_HSTDMAADDRESS3 REG_ACCESS(RwReg, 0x400AC734U) /**< \brief (UOTGHS) Host DMA Channel Address Register (n = 3) */
+#define REG_UOTGHS_HSTDMACONTROL3 REG_ACCESS(RwReg, 0x400AC738U) /**< \brief (UOTGHS) Host DMA Channel Control Register (n = 3) */
+#define REG_UOTGHS_HSTDMASTATUS3 REG_ACCESS(RwReg, 0x400AC73CU) /**< \brief (UOTGHS) Host DMA Channel Status Register (n = 3) */
+#define REG_UOTGHS_HSTDMANXTDSC4 REG_ACCESS(RwReg, 0x400AC740U) /**< \brief (UOTGHS) Host DMA Channel Next Descriptor Address Register (n = 4) */
+#define REG_UOTGHS_HSTDMAADDRESS4 REG_ACCESS(RwReg, 0x400AC744U) /**< \brief (UOTGHS) Host DMA Channel Address Register (n = 4) */
+#define REG_UOTGHS_HSTDMACONTROL4 REG_ACCESS(RwReg, 0x400AC748U) /**< \brief (UOTGHS) Host DMA Channel Control Register (n = 4) */
+#define REG_UOTGHS_HSTDMASTATUS4 REG_ACCESS(RwReg, 0x400AC74CU) /**< \brief (UOTGHS) Host DMA Channel Status Register (n = 4) */
+#define REG_UOTGHS_HSTDMANXTDSC5 REG_ACCESS(RwReg, 0x400AC750U) /**< \brief (UOTGHS) Host DMA Channel Next Descriptor Address Register (n = 5) */
+#define REG_UOTGHS_HSTDMAADDRESS5 REG_ACCESS(RwReg, 0x400AC754U) /**< \brief (UOTGHS) Host DMA Channel Address Register (n = 5) */
+#define REG_UOTGHS_HSTDMACONTROL5 REG_ACCESS(RwReg, 0x400AC758U) /**< \brief (UOTGHS) Host DMA Channel Control Register (n = 5) */
+#define REG_UOTGHS_HSTDMASTATUS5 REG_ACCESS(RwReg, 0x400AC75CU) /**< \brief (UOTGHS) Host DMA Channel Status Register (n = 5) */
+#define REG_UOTGHS_HSTDMANXTDSC6 REG_ACCESS(RwReg, 0x400AC760U) /**< \brief (UOTGHS) Host DMA Channel Next Descriptor Address Register (n = 6) */
+#define REG_UOTGHS_HSTDMAADDRESS6 REG_ACCESS(RwReg, 0x400AC764U) /**< \brief (UOTGHS) Host DMA Channel Address Register (n = 6) */
+#define REG_UOTGHS_HSTDMACONTROL6 REG_ACCESS(RwReg, 0x400AC768U) /**< \brief (UOTGHS) Host DMA Channel Control Register (n = 6) */
+#define REG_UOTGHS_HSTDMASTATUS6 REG_ACCESS(RwReg, 0x400AC76CU) /**< \brief (UOTGHS) Host DMA Channel Status Register (n = 6) */
+#define REG_UOTGHS_HSTDMANXTDSC7 REG_ACCESS(RwReg, 0x400AC770U) /**< \brief (UOTGHS) Host DMA Channel Next Descriptor Address Register (n = 7) */
+#define REG_UOTGHS_HSTDMAADDRESS7 REG_ACCESS(RwReg, 0x400AC774U) /**< \brief (UOTGHS) Host DMA Channel Address Register (n = 7) */
+#define REG_UOTGHS_HSTDMACONTROL7 REG_ACCESS(RwReg, 0x400AC778U) /**< \brief (UOTGHS) Host DMA Channel Control Register (n = 7) */
+#define REG_UOTGHS_HSTDMASTATUS7 REG_ACCESS(RwReg, 0x400AC77CU) /**< \brief (UOTGHS) Host DMA Channel Status Register (n = 7) */
+#define REG_UOTGHS_CTRL REG_ACCESS(RwReg, 0x400AC800U) /**< \brief (UOTGHS) General Control Register */
+#define REG_UOTGHS_SR REG_ACCESS(RoReg, 0x400AC804U) /**< \brief (UOTGHS) General Status Register */
+#define REG_UOTGHS_SCR REG_ACCESS(WoReg, 0x400AC808U) /**< \brief (UOTGHS) General Status Clear Register */
+#define REG_UOTGHS_SFR REG_ACCESS(WoReg, 0x400AC80CU) /**< \brief (UOTGHS) General Status Set Register */
+#define REG_UOTGHS_FSM REG_ACCESS(RoReg, 0x400AC82CU) /**< \brief (UOTGHS) General Finite State Machine Register */
+/* ========== Register definition for EMAC peripheral ========== */
+#define REG_EMAC_NCR REG_ACCESS(RwReg, 0x400B0000U) /**< \brief (EMAC) Network Control Register */
+#define REG_EMAC_NCFGR REG_ACCESS(RwReg, 0x400B0004U) /**< \brief (EMAC) Network Configuration Register */
+#define REG_EMAC_NSR REG_ACCESS(RoReg, 0x400B0008U) /**< \brief (EMAC) Network Status Register */
+#define REG_EMAC_TSR REG_ACCESS(RwReg, 0x400B0014U) /**< \brief (EMAC) Transmit Status Register */
+#define REG_EMAC_RBQP REG_ACCESS(RwReg, 0x400B0018U) /**< \brief (EMAC) Receive Buffer Queue Pointer Register */
+#define REG_EMAC_TBQP REG_ACCESS(RwReg, 0x400B001CU) /**< \brief (EMAC) Transmit Buffer Queue Pointer Register */
+#define REG_EMAC_RSR REG_ACCESS(RwReg, 0x400B0020U) /**< \brief (EMAC) Receive Status Register */
+#define REG_EMAC_ISR REG_ACCESS(RwReg, 0x400B0024U) /**< \brief (EMAC) Interrupt Status Register */
+#define REG_EMAC_IER REG_ACCESS(WoReg, 0x400B0028U) /**< \brief (EMAC) Interrupt Enable Register */
+#define REG_EMAC_IDR REG_ACCESS(WoReg, 0x400B002CU) /**< \brief (EMAC) Interrupt Disable Register */
+#define REG_EMAC_IMR REG_ACCESS(RoReg, 0x400B0030U) /**< \brief (EMAC) Interrupt Mask Register */
+#define REG_EMAC_MAN REG_ACCESS(RwReg, 0x400B0034U) /**< \brief (EMAC) Phy Maintenance Register */
+#define REG_EMAC_PTR REG_ACCESS(RwReg, 0x400B0038U) /**< \brief (EMAC) Pause Time Register */
+#define REG_EMAC_PFR REG_ACCESS(RwReg, 0x400B003CU) /**< \brief (EMAC) Pause Frames Received Register */
+#define REG_EMAC_FTO REG_ACCESS(RwReg, 0x400B0040U) /**< \brief (EMAC) Frames Transmitted Ok Register */
+#define REG_EMAC_SCF REG_ACCESS(RwReg, 0x400B0044U) /**< \brief (EMAC) Single Collision Frames Register */
+#define REG_EMAC_MCF REG_ACCESS(RwReg, 0x400B0048U) /**< \brief (EMAC) Multiple Collision Frames Register */
+#define REG_EMAC_FRO REG_ACCESS(RwReg, 0x400B004CU) /**< \brief (EMAC) Frames Received Ok Register */
+#define REG_EMAC_FCSE REG_ACCESS(RwReg, 0x400B0050U) /**< \brief (EMAC) Frame Check Sequence Errors Register */
+#define REG_EMAC_ALE REG_ACCESS(RwReg, 0x400B0054U) /**< \brief (EMAC) Alignment Errors Register */
+#define REG_EMAC_DTF REG_ACCESS(RwReg, 0x400B0058U) /**< \brief (EMAC) Deferred Transmission Frames Register */
+#define REG_EMAC_LCOL REG_ACCESS(RwReg, 0x400B005CU) /**< \brief (EMAC) Late Collisions Register */
+#define REG_EMAC_ECOL REG_ACCESS(RwReg, 0x400B0060U) /**< \brief (EMAC) Excessive Collisions Register */
+#define REG_EMAC_TUND REG_ACCESS(RwReg, 0x400B0064U) /**< \brief (EMAC) Transmit Underrun Errors Register */
+#define REG_EMAC_CSE REG_ACCESS(RwReg, 0x400B0068U) /**< \brief (EMAC) Carrier Sense Errors Register */
+#define REG_EMAC_RRE REG_ACCESS(RwReg, 0x400B006CU) /**< \brief (EMAC) Receive Resource Errors Register */
+#define REG_EMAC_ROV REG_ACCESS(RwReg, 0x400B0070U) /**< \brief (EMAC) Receive Overrun Errors Register */
+#define REG_EMAC_RSE REG_ACCESS(RwReg, 0x400B0074U) /**< \brief (EMAC) Receive Symbol Errors Register */
+#define REG_EMAC_ELE REG_ACCESS(RwReg, 0x400B0078U) /**< \brief (EMAC) Excessive Length Errors Register */
+#define REG_EMAC_RJA REG_ACCESS(RwReg, 0x400B007CU) /**< \brief (EMAC) Receive Jabbers Register */
+#define REG_EMAC_USF REG_ACCESS(RwReg, 0x400B0080U) /**< \brief (EMAC) Undersize Frames Register */
+#define REG_EMAC_STE REG_ACCESS(RwReg, 0x400B0084U) /**< \brief (EMAC) SQE Test Errors Register */
+#define REG_EMAC_RLE REG_ACCESS(RwReg, 0x400B0088U) /**< \brief (EMAC) Received Length Field Mismatch Register */
+#define REG_EMAC_HRB REG_ACCESS(RwReg, 0x400B0090U) /**< \brief (EMAC) Hash Register Bottom [31:0] Register */
+#define REG_EMAC_HRT REG_ACCESS(RwReg, 0x400B0094U) /**< \brief (EMAC) Hash Register Top [63:32] Register */
+#define REG_EMAC_SA1B REG_ACCESS(RwReg, 0x400B0098U) /**< \brief (EMAC) Specific Address 1 Bottom Register */
+#define REG_EMAC_SA1T REG_ACCESS(RwReg, 0x400B009CU) /**< \brief (EMAC) Specific Address 1 Top Register */
+#define REG_EMAC_SA2B REG_ACCESS(RwReg, 0x400B00A0U) /**< \brief (EMAC) Specific Address 2 Bottom Register */
+#define REG_EMAC_SA2T REG_ACCESS(RwReg, 0x400B00A4U) /**< \brief (EMAC) Specific Address 2 Top Register */
+#define REG_EMAC_SA3B REG_ACCESS(RwReg, 0x400B00A8U) /**< \brief (EMAC) Specific Address 3 Bottom Register */
+#define REG_EMAC_SA3T REG_ACCESS(RwReg, 0x400B00ACU) /**< \brief (EMAC) Specific Address 3 Top Register */
+#define REG_EMAC_SA4B REG_ACCESS(RwReg, 0x400B00B0U) /**< \brief (EMAC) Specific Address 4 Bottom Register */
+#define REG_EMAC_SA4T REG_ACCESS(RwReg, 0x400B00B4U) /**< \brief (EMAC) Specific Address 4 Top Register */
+#define REG_EMAC_TID REG_ACCESS(RwReg, 0x400B00B8U) /**< \brief (EMAC) Type ID Checking Register */
+#define REG_EMAC_USRIO REG_ACCESS(RwReg, 0x400B00C0U) /**< \brief (EMAC) User Input/Output Register */
+/* ========== Register definition for CAN0 peripheral ========== */
+#define REG_CAN0_MR REG_ACCESS(RwReg, 0x400B4000U) /**< \brief (CAN0) Mode Register */
+#define REG_CAN0_IER REG_ACCESS(WoReg, 0x400B4004U) /**< \brief (CAN0) Interrupt Enable Register */
+#define REG_CAN0_IDR REG_ACCESS(WoReg, 0x400B4008U) /**< \brief (CAN0) Interrupt Disable Register */
+#define REG_CAN0_IMR REG_ACCESS(RoReg, 0x400B400CU) /**< \brief (CAN0) Interrupt Mask Register */
+#define REG_CAN0_SR REG_ACCESS(RoReg, 0x400B4010U) /**< \brief (CAN0) Status Register */
+#define REG_CAN0_BR REG_ACCESS(RwReg, 0x400B4014U) /**< \brief (CAN0) Baudrate Register */
+#define REG_CAN0_TIM REG_ACCESS(RoReg, 0x400B4018U) /**< \brief (CAN0) Timer Register */
+#define REG_CAN0_TIMESTP REG_ACCESS(RoReg, 0x400B401CU) /**< \brief (CAN0) Timestamp Register */
+#define REG_CAN0_ECR REG_ACCESS(RoReg, 0x400B4020U) /**< \brief (CAN0) Error Counter Register */
+#define REG_CAN0_TCR REG_ACCESS(WoReg, 0x400B4024U) /**< \brief (CAN0) Transfer Command Register */
+#define REG_CAN0_ACR REG_ACCESS(WoReg, 0x400B4028U) /**< \brief (CAN0) Abort Command Register */
+#define REG_CAN0_MMR0 REG_ACCESS(RwReg, 0x400B4200U) /**< \brief (CAN0) Mailbox Mode Register (MB = 0) */
+#define REG_CAN0_MAM0 REG_ACCESS(RwReg, 0x400B4204U) /**< \brief (CAN0) Mailbox Acceptance Mask Register (MB = 0) */
+#define REG_CAN0_MID0 REG_ACCESS(RwReg, 0x400B4208U) /**< \brief (CAN0) Mailbox ID Register (MB = 0) */
+#define REG_CAN0_MFID0 REG_ACCESS(RoReg, 0x400B420CU) /**< \brief (CAN0) Mailbox Family ID Register (MB = 0) */
+#define REG_CAN0_MSR0 REG_ACCESS(RoReg, 0x400B4210U) /**< \brief (CAN0) Mailbox Status Register (MB = 0) */
+#define REG_CAN0_MDL0 REG_ACCESS(RwReg, 0x400B4214U) /**< \brief (CAN0) Mailbox Data Low Register (MB = 0) */
+#define REG_CAN0_MDH0 REG_ACCESS(RwReg, 0x400B4218U) /**< \brief (CAN0) Mailbox Data High Register (MB = 0) */
+#define REG_CAN0_MCR0 REG_ACCESS(WoReg, 0x400B421CU) /**< \brief (CAN0) Mailbox Control Register (MB = 0) */
+#define REG_CAN0_MMR1 REG_ACCESS(RwReg, 0x400B4220U) /**< \brief (CAN0) Mailbox Mode Register (MB = 1) */
+#define REG_CAN0_MAM1 REG_ACCESS(RwReg, 0x400B4224U) /**< \brief (CAN0) Mailbox Acceptance Mask Register (MB = 1) */
+#define REG_CAN0_MID1 REG_ACCESS(RwReg, 0x400B4228U) /**< \brief (CAN0) Mailbox ID Register (MB = 1) */
+#define REG_CAN0_MFID1 REG_ACCESS(RoReg, 0x400B422CU) /**< \brief (CAN0) Mailbox Family ID Register (MB = 1) */
+#define REG_CAN0_MSR1 REG_ACCESS(RoReg, 0x400B4230U) /**< \brief (CAN0) Mailbox Status Register (MB = 1) */
+#define REG_CAN0_MDL1 REG_ACCESS(RwReg, 0x400B4234U) /**< \brief (CAN0) Mailbox Data Low Register (MB = 1) */
+#define REG_CAN0_MDH1 REG_ACCESS(RwReg, 0x400B4238U) /**< \brief (CAN0) Mailbox Data High Register (MB = 1) */
+#define REG_CAN0_MCR1 REG_ACCESS(WoReg, 0x400B423CU) /**< \brief (CAN0) Mailbox Control Register (MB = 1) */
+#define REG_CAN0_MMR2 REG_ACCESS(RwReg, 0x400B4240U) /**< \brief (CAN0) Mailbox Mode Register (MB = 2) */
+#define REG_CAN0_MAM2 REG_ACCESS(RwReg, 0x400B4244U) /**< \brief (CAN0) Mailbox Acceptance Mask Register (MB = 2) */
+#define REG_CAN0_MID2 REG_ACCESS(RwReg, 0x400B4248U) /**< \brief (CAN0) Mailbox ID Register (MB = 2) */
+#define REG_CAN0_MFID2 REG_ACCESS(RoReg, 0x400B424CU) /**< \brief (CAN0) Mailbox Family ID Register (MB = 2) */
+#define REG_CAN0_MSR2 REG_ACCESS(RoReg, 0x400B4250U) /**< \brief (CAN0) Mailbox Status Register (MB = 2) */
+#define REG_CAN0_MDL2 REG_ACCESS(RwReg, 0x400B4254U) /**< \brief (CAN0) Mailbox Data Low Register (MB = 2) */
+#define REG_CAN0_MDH2 REG_ACCESS(RwReg, 0x400B4258U) /**< \brief (CAN0) Mailbox Data High Register (MB = 2) */
+#define REG_CAN0_MCR2 REG_ACCESS(WoReg, 0x400B425CU) /**< \brief (CAN0) Mailbox Control Register (MB = 2) */
+#define REG_CAN0_MMR3 REG_ACCESS(RwReg, 0x400B4260U) /**< \brief (CAN0) Mailbox Mode Register (MB = 3) */
+#define REG_CAN0_MAM3 REG_ACCESS(RwReg, 0x400B4264U) /**< \brief (CAN0) Mailbox Acceptance Mask Register (MB = 3) */
+#define REG_CAN0_MID3 REG_ACCESS(RwReg, 0x400B4268U) /**< \brief (CAN0) Mailbox ID Register (MB = 3) */
+#define REG_CAN0_MFID3 REG_ACCESS(RoReg, 0x400B426CU) /**< \brief (CAN0) Mailbox Family ID Register (MB = 3) */
+#define REG_CAN0_MSR3 REG_ACCESS(RoReg, 0x400B4270U) /**< \brief (CAN0) Mailbox Status Register (MB = 3) */
+#define REG_CAN0_MDL3 REG_ACCESS(RwReg, 0x400B4274U) /**< \brief (CAN0) Mailbox Data Low Register (MB = 3) */
+#define REG_CAN0_MDH3 REG_ACCESS(RwReg, 0x400B4278U) /**< \brief (CAN0) Mailbox Data High Register (MB = 3) */
+#define REG_CAN0_MCR3 REG_ACCESS(WoReg, 0x400B427CU) /**< \brief (CAN0) Mailbox Control Register (MB = 3) */
+#define REG_CAN0_MMR4 REG_ACCESS(RwReg, 0x400B4280U) /**< \brief (CAN0) Mailbox Mode Register (MB = 4) */
+#define REG_CAN0_MAM4 REG_ACCESS(RwReg, 0x400B4284U) /**< \brief (CAN0) Mailbox Acceptance Mask Register (MB = 4) */
+#define REG_CAN0_MID4 REG_ACCESS(RwReg, 0x400B4288U) /**< \brief (CAN0) Mailbox ID Register (MB = 4) */
+#define REG_CAN0_MFID4 REG_ACCESS(RoReg, 0x400B428CU) /**< \brief (CAN0) Mailbox Family ID Register (MB = 4) */
+#define REG_CAN0_MSR4 REG_ACCESS(RoReg, 0x400B4290U) /**< \brief (CAN0) Mailbox Status Register (MB = 4) */
+#define REG_CAN0_MDL4 REG_ACCESS(RwReg, 0x400B4294U) /**< \brief (CAN0) Mailbox Data Low Register (MB = 4) */
+#define REG_CAN0_MDH4 REG_ACCESS(RwReg, 0x400B4298U) /**< \brief (CAN0) Mailbox Data High Register (MB = 4) */
+#define REG_CAN0_MCR4 REG_ACCESS(WoReg, 0x400B429CU) /**< \brief (CAN0) Mailbox Control Register (MB = 4) */
+#define REG_CAN0_MMR5 REG_ACCESS(RwReg, 0x400B42A0U) /**< \brief (CAN0) Mailbox Mode Register (MB = 5) */
+#define REG_CAN0_MAM5 REG_ACCESS(RwReg, 0x400B42A4U) /**< \brief (CAN0) Mailbox Acceptance Mask Register (MB = 5) */
+#define REG_CAN0_MID5 REG_ACCESS(RwReg, 0x400B42A8U) /**< \brief (CAN0) Mailbox ID Register (MB = 5) */
+#define REG_CAN0_MFID5 REG_ACCESS(RoReg, 0x400B42ACU) /**< \brief (CAN0) Mailbox Family ID Register (MB = 5) */
+#define REG_CAN0_MSR5 REG_ACCESS(RoReg, 0x400B42B0U) /**< \brief (CAN0) Mailbox Status Register (MB = 5) */
+#define REG_CAN0_MDL5 REG_ACCESS(RwReg, 0x400B42B4U) /**< \brief (CAN0) Mailbox Data Low Register (MB = 5) */
+#define REG_CAN0_MDH5 REG_ACCESS(RwReg, 0x400B42B8U) /**< \brief (CAN0) Mailbox Data High Register (MB = 5) */
+#define REG_CAN0_MCR5 REG_ACCESS(WoReg, 0x400B42BCU) /**< \brief (CAN0) Mailbox Control Register (MB = 5) */
+#define REG_CAN0_MMR6 REG_ACCESS(RwReg, 0x400B42C0U) /**< \brief (CAN0) Mailbox Mode Register (MB = 6) */
+#define REG_CAN0_MAM6 REG_ACCESS(RwReg, 0x400B42C4U) /**< \brief (CAN0) Mailbox Acceptance Mask Register (MB = 6) */
+#define REG_CAN0_MID6 REG_ACCESS(RwReg, 0x400B42C8U) /**< \brief (CAN0) Mailbox ID Register (MB = 6) */
+#define REG_CAN0_MFID6 REG_ACCESS(RoReg, 0x400B42CCU) /**< \brief (CAN0) Mailbox Family ID Register (MB = 6) */
+#define REG_CAN0_MSR6 REG_ACCESS(RoReg, 0x400B42D0U) /**< \brief (CAN0) Mailbox Status Register (MB = 6) */
+#define REG_CAN0_MDL6 REG_ACCESS(RwReg, 0x400B42D4U) /**< \brief (CAN0) Mailbox Data Low Register (MB = 6) */
+#define REG_CAN0_MDH6 REG_ACCESS(RwReg, 0x400B42D8U) /**< \brief (CAN0) Mailbox Data High Register (MB = 6) */
+#define REG_CAN0_MCR6 REG_ACCESS(WoReg, 0x400B42DCU) /**< \brief (CAN0) Mailbox Control Register (MB = 6) */
+#define REG_CAN0_MMR7 REG_ACCESS(RwReg, 0x400B42E0U) /**< \brief (CAN0) Mailbox Mode Register (MB = 7) */
+#define REG_CAN0_MAM7 REG_ACCESS(RwReg, 0x400B42E4U) /**< \brief (CAN0) Mailbox Acceptance Mask Register (MB = 7) */
+#define REG_CAN0_MID7 REG_ACCESS(RwReg, 0x400B42E8U) /**< \brief (CAN0) Mailbox ID Register (MB = 7) */
+#define REG_CAN0_MFID7 REG_ACCESS(RoReg, 0x400B42ECU) /**< \brief (CAN0) Mailbox Family ID Register (MB = 7) */
+#define REG_CAN0_MSR7 REG_ACCESS(RoReg, 0x400B42F0U) /**< \brief (CAN0) Mailbox Status Register (MB = 7) */
+#define REG_CAN0_MDL7 REG_ACCESS(RwReg, 0x400B42F4U) /**< \brief (CAN0) Mailbox Data Low Register (MB = 7) */
+#define REG_CAN0_MDH7 REG_ACCESS(RwReg, 0x400B42F8U) /**< \brief (CAN0) Mailbox Data High Register (MB = 7) */
+#define REG_CAN0_MCR7 REG_ACCESS(WoReg, 0x400B42FCU) /**< \brief (CAN0) Mailbox Control Register (MB = 7) */
+/* ========== Register definition for CAN1 peripheral ========== */
+#define REG_CAN1_MR REG_ACCESS(RwReg, 0x400B8000U) /**< \brief (CAN1) Mode Register */
+#define REG_CAN1_IER REG_ACCESS(WoReg, 0x400B8004U) /**< \brief (CAN1) Interrupt Enable Register */
+#define REG_CAN1_IDR REG_ACCESS(WoReg, 0x400B8008U) /**< \brief (CAN1) Interrupt Disable Register */
+#define REG_CAN1_IMR REG_ACCESS(RoReg, 0x400B800CU) /**< \brief (CAN1) Interrupt Mask Register */
+#define REG_CAN1_SR REG_ACCESS(RoReg, 0x400B8010U) /**< \brief (CAN1) Status Register */
+#define REG_CAN1_BR REG_ACCESS(RwReg, 0x400B8014U) /**< \brief (CAN1) Baudrate Register */
+#define REG_CAN1_TIM REG_ACCESS(RoReg, 0x400B8018U) /**< \brief (CAN1) Timer Register */
+#define REG_CAN1_TIMESTP REG_ACCESS(RoReg, 0x400B801CU) /**< \brief (CAN1) Timestamp Register */
+#define REG_CAN1_ECR REG_ACCESS(RoReg, 0x400B8020U) /**< \brief (CAN1) Error Counter Register */
+#define REG_CAN1_TCR REG_ACCESS(WoReg, 0x400B8024U) /**< \brief (CAN1) Transfer Command Register */
+#define REG_CAN1_ACR REG_ACCESS(WoReg, 0x400B8028U) /**< \brief (CAN1) Abort Command Register */
+#define REG_CAN1_MMR0 REG_ACCESS(RwReg, 0x400B8200U) /**< \brief (CAN1) Mailbox Mode Register (MB = 0) */
+#define REG_CAN1_MAM0 REG_ACCESS(RwReg, 0x400B8204U) /**< \brief (CAN1) Mailbox Acceptance Mask Register (MB = 0) */
+#define REG_CAN1_MID0 REG_ACCESS(RwReg, 0x400B8208U) /**< \brief (CAN1) Mailbox ID Register (MB = 0) */
+#define REG_CAN1_MFID0 REG_ACCESS(RoReg, 0x400B820CU) /**< \brief (CAN1) Mailbox Family ID Register (MB = 0) */
+#define REG_CAN1_MSR0 REG_ACCESS(RoReg, 0x400B8210U) /**< \brief (CAN1) Mailbox Status Register (MB = 0) */
+#define REG_CAN1_MDL0 REG_ACCESS(RwReg, 0x400B8214U) /**< \brief (CAN1) Mailbox Data Low Register (MB = 0) */
+#define REG_CAN1_MDH0 REG_ACCESS(RwReg, 0x400B8218U) /**< \brief (CAN1) Mailbox Data High Register (MB = 0) */
+#define REG_CAN1_MCR0 REG_ACCESS(WoReg, 0x400B821CU) /**< \brief (CAN1) Mailbox Control Register (MB = 0) */
+#define REG_CAN1_MMR1 REG_ACCESS(RwReg, 0x400B8220U) /**< \brief (CAN1) Mailbox Mode Register (MB = 1) */
+#define REG_CAN1_MAM1 REG_ACCESS(RwReg, 0x400B8224U) /**< \brief (CAN1) Mailbox Acceptance Mask Register (MB = 1) */
+#define REG_CAN1_MID1 REG_ACCESS(RwReg, 0x400B8228U) /**< \brief (CAN1) Mailbox ID Register (MB = 1) */
+#define REG_CAN1_MFID1 REG_ACCESS(RoReg, 0x400B822CU) /**< \brief (CAN1) Mailbox Family ID Register (MB = 1) */
+#define REG_CAN1_MSR1 REG_ACCESS(RoReg, 0x400B8230U) /**< \brief (CAN1) Mailbox Status Register (MB = 1) */
+#define REG_CAN1_MDL1 REG_ACCESS(RwReg, 0x400B8234U) /**< \brief (CAN1) Mailbox Data Low Register (MB = 1) */
+#define REG_CAN1_MDH1 REG_ACCESS(RwReg, 0x400B8238U) /**< \brief (CAN1) Mailbox Data High Register (MB = 1) */
+#define REG_CAN1_MCR1 REG_ACCESS(WoReg, 0x400B823CU) /**< \brief (CAN1) Mailbox Control Register (MB = 1) */
+#define REG_CAN1_MMR2 REG_ACCESS(RwReg, 0x400B8240U) /**< \brief (CAN1) Mailbox Mode Register (MB = 2) */
+#define REG_CAN1_MAM2 REG_ACCESS(RwReg, 0x400B8244U) /**< \brief (CAN1) Mailbox Acceptance Mask Register (MB = 2) */
+#define REG_CAN1_MID2 REG_ACCESS(RwReg, 0x400B8248U) /**< \brief (CAN1) Mailbox ID Register (MB = 2) */
+#define REG_CAN1_MFID2 REG_ACCESS(RoReg, 0x400B824CU) /**< \brief (CAN1) Mailbox Family ID Register (MB = 2) */
+#define REG_CAN1_MSR2 REG_ACCESS(RoReg, 0x400B8250U) /**< \brief (CAN1) Mailbox Status Register (MB = 2) */
+#define REG_CAN1_MDL2 REG_ACCESS(RwReg, 0x400B8254U) /**< \brief (CAN1) Mailbox Data Low Register (MB = 2) */
+#define REG_CAN1_MDH2 REG_ACCESS(RwReg, 0x400B8258U) /**< \brief (CAN1) Mailbox Data High Register (MB = 2) */
+#define REG_CAN1_MCR2 REG_ACCESS(WoReg, 0x400B825CU) /**< \brief (CAN1) Mailbox Control Register (MB = 2) */
+#define REG_CAN1_MMR3 REG_ACCESS(RwReg, 0x400B8260U) /**< \brief (CAN1) Mailbox Mode Register (MB = 3) */
+#define REG_CAN1_MAM3 REG_ACCESS(RwReg, 0x400B8264U) /**< \brief (CAN1) Mailbox Acceptance Mask Register (MB = 3) */
+#define REG_CAN1_MID3 REG_ACCESS(RwReg, 0x400B8268U) /**< \brief (CAN1) Mailbox ID Register (MB = 3) */
+#define REG_CAN1_MFID3 REG_ACCESS(RoReg, 0x400B826CU) /**< \brief (CAN1) Mailbox Family ID Register (MB = 3) */
+#define REG_CAN1_MSR3 REG_ACCESS(RoReg, 0x400B8270U) /**< \brief (CAN1) Mailbox Status Register (MB = 3) */
+#define REG_CAN1_MDL3 REG_ACCESS(RwReg, 0x400B8274U) /**< \brief (CAN1) Mailbox Data Low Register (MB = 3) */
+#define REG_CAN1_MDH3 REG_ACCESS(RwReg, 0x400B8278U) /**< \brief (CAN1) Mailbox Data High Register (MB = 3) */
+#define REG_CAN1_MCR3 REG_ACCESS(WoReg, 0x400B827CU) /**< \brief (CAN1) Mailbox Control Register (MB = 3) */
+#define REG_CAN1_MMR4 REG_ACCESS(RwReg, 0x400B8280U) /**< \brief (CAN1) Mailbox Mode Register (MB = 4) */
+#define REG_CAN1_MAM4 REG_ACCESS(RwReg, 0x400B8284U) /**< \brief (CAN1) Mailbox Acceptance Mask Register (MB = 4) */
+#define REG_CAN1_MID4 REG_ACCESS(RwReg, 0x400B8288U) /**< \brief (CAN1) Mailbox ID Register (MB = 4) */
+#define REG_CAN1_MFID4 REG_ACCESS(RoReg, 0x400B828CU) /**< \brief (CAN1) Mailbox Family ID Register (MB = 4) */
+#define REG_CAN1_MSR4 REG_ACCESS(RoReg, 0x400B8290U) /**< \brief (CAN1) Mailbox Status Register (MB = 4) */
+#define REG_CAN1_MDL4 REG_ACCESS(RwReg, 0x400B8294U) /**< \brief (CAN1) Mailbox Data Low Register (MB = 4) */
+#define REG_CAN1_MDH4 REG_ACCESS(RwReg, 0x400B8298U) /**< \brief (CAN1) Mailbox Data High Register (MB = 4) */
+#define REG_CAN1_MCR4 REG_ACCESS(WoReg, 0x400B829CU) /**< \brief (CAN1) Mailbox Control Register (MB = 4) */
+#define REG_CAN1_MMR5 REG_ACCESS(RwReg, 0x400B82A0U) /**< \brief (CAN1) Mailbox Mode Register (MB = 5) */
+#define REG_CAN1_MAM5 REG_ACCESS(RwReg, 0x400B82A4U) /**< \brief (CAN1) Mailbox Acceptance Mask Register (MB = 5) */
+#define REG_CAN1_MID5 REG_ACCESS(RwReg, 0x400B82A8U) /**< \brief (CAN1) Mailbox ID Register (MB = 5) */
+#define REG_CAN1_MFID5 REG_ACCESS(RoReg, 0x400B82ACU) /**< \brief (CAN1) Mailbox Family ID Register (MB = 5) */
+#define REG_CAN1_MSR5 REG_ACCESS(RoReg, 0x400B82B0U) /**< \brief (CAN1) Mailbox Status Register (MB = 5) */
+#define REG_CAN1_MDL5 REG_ACCESS(RwReg, 0x400B82B4U) /**< \brief (CAN1) Mailbox Data Low Register (MB = 5) */
+#define REG_CAN1_MDH5 REG_ACCESS(RwReg, 0x400B82B8U) /**< \brief (CAN1) Mailbox Data High Register (MB = 5) */
+#define REG_CAN1_MCR5 REG_ACCESS(WoReg, 0x400B82BCU) /**< \brief (CAN1) Mailbox Control Register (MB = 5) */
+#define REG_CAN1_MMR6 REG_ACCESS(RwReg, 0x400B82C0U) /**< \brief (CAN1) Mailbox Mode Register (MB = 6) */
+#define REG_CAN1_MAM6 REG_ACCESS(RwReg, 0x400B82C4U) /**< \brief (CAN1) Mailbox Acceptance Mask Register (MB = 6) */
+#define REG_CAN1_MID6 REG_ACCESS(RwReg, 0x400B82C8U) /**< \brief (CAN1) Mailbox ID Register (MB = 6) */
+#define REG_CAN1_MFID6 REG_ACCESS(RoReg, 0x400B82CCU) /**< \brief (CAN1) Mailbox Family ID Register (MB = 6) */
+#define REG_CAN1_MSR6 REG_ACCESS(RoReg, 0x400B82D0U) /**< \brief (CAN1) Mailbox Status Register (MB = 6) */
+#define REG_CAN1_MDL6 REG_ACCESS(RwReg, 0x400B82D4U) /**< \brief (CAN1) Mailbox Data Low Register (MB = 6) */
+#define REG_CAN1_MDH6 REG_ACCESS(RwReg, 0x400B82D8U) /**< \brief (CAN1) Mailbox Data High Register (MB = 6) */
+#define REG_CAN1_MCR6 REG_ACCESS(WoReg, 0x400B82DCU) /**< \brief (CAN1) Mailbox Control Register (MB = 6) */
+#define REG_CAN1_MMR7 REG_ACCESS(RwReg, 0x400B82E0U) /**< \brief (CAN1) Mailbox Mode Register (MB = 7) */
+#define REG_CAN1_MAM7 REG_ACCESS(RwReg, 0x400B82E4U) /**< \brief (CAN1) Mailbox Acceptance Mask Register (MB = 7) */
+#define REG_CAN1_MID7 REG_ACCESS(RwReg, 0x400B82E8U) /**< \brief (CAN1) Mailbox ID Register (MB = 7) */
+#define REG_CAN1_MFID7 REG_ACCESS(RoReg, 0x400B82ECU) /**< \brief (CAN1) Mailbox Family ID Register (MB = 7) */
+#define REG_CAN1_MSR7 REG_ACCESS(RoReg, 0x400B82F0U) /**< \brief (CAN1) Mailbox Status Register (MB = 7) */
+#define REG_CAN1_MDL7 REG_ACCESS(RwReg, 0x400B82F4U) /**< \brief (CAN1) Mailbox Data Low Register (MB = 7) */
+#define REG_CAN1_MDH7 REG_ACCESS(RwReg, 0x400B82F8U) /**< \brief (CAN1) Mailbox Data High Register (MB = 7) */
+#define REG_CAN1_MCR7 REG_ACCESS(WoReg, 0x400B82FCU) /**< \brief (CAN1) Mailbox Control Register (MB = 7) */
+/* ========== Register definition for TRNG peripheral ========== */
+#define REG_TRNG_CR REG_ACCESS(WoReg, 0x400BC000U) /**< \brief (TRNG) Control Register */
+#define REG_TRNG_IER REG_ACCESS(WoReg, 0x400BC010U) /**< \brief (TRNG) Interrupt Enable Register */
+#define REG_TRNG_IDR REG_ACCESS(WoReg, 0x400BC014U) /**< \brief (TRNG) Interrupt Disable Register */
+#define REG_TRNG_IMR REG_ACCESS(RoReg, 0x400BC018U) /**< \brief (TRNG) Interrupt Mask Register */
+#define REG_TRNG_ISR REG_ACCESS(RoReg, 0x400BC01CU) /**< \brief (TRNG) Interrupt Status Register */
+#define REG_TRNG_ODATA REG_ACCESS(RoReg, 0x400BC050U) /**< \brief (TRNG) Output Data Register */
+/* ========== Register definition for ADC peripheral ========== */
+#define REG_ADC_CR REG_ACCESS(WoReg, 0x400C0000U) /**< \brief (ADC) Control Register */
+#define REG_ADC_MR REG_ACCESS(RwReg, 0x400C0004U) /**< \brief (ADC) Mode Register */
+#define REG_ADC_SEQR1 REG_ACCESS(RwReg, 0x400C0008U) /**< \brief (ADC) Channel Sequence Register 1 */
+#define REG_ADC_SEQR2 REG_ACCESS(RwReg, 0x400C000CU) /**< \brief (ADC) Channel Sequence Register 2 */
+#define REG_ADC_CHER REG_ACCESS(WoReg, 0x400C0010U) /**< \brief (ADC) Channel Enable Register */
+#define REG_ADC_CHDR REG_ACCESS(WoReg, 0x400C0014U) /**< \brief (ADC) Channel Disable Register */
+#define REG_ADC_CHSR REG_ACCESS(RoReg, 0x400C0018U) /**< \brief (ADC) Channel Status Register */
+#define REG_ADC_LCDR REG_ACCESS(RoReg, 0x400C0020U) /**< \brief (ADC) Last Converted Data Register */
+#define REG_ADC_IER REG_ACCESS(WoReg, 0x400C0024U) /**< \brief (ADC) Interrupt Enable Register */
+#define REG_ADC_IDR REG_ACCESS(WoReg, 0x400C0028U) /**< \brief (ADC) Interrupt Disable Register */
+#define REG_ADC_IMR REG_ACCESS(RoReg, 0x400C002CU) /**< \brief (ADC) Interrupt Mask Register */
+#define REG_ADC_ISR REG_ACCESS(RoReg, 0x400C0030U) /**< \brief (ADC) Interrupt Status Register */
+#define REG_ADC_OVER REG_ACCESS(RoReg, 0x400C003CU) /**< \brief (ADC) Overrun Status Register */
+#define REG_ADC_EMR REG_ACCESS(RwReg, 0x400C0040U) /**< \brief (ADC) Extended Mode Register */
+#define REG_ADC_CWR REG_ACCESS(RwReg, 0x400C0044U) /**< \brief (ADC) Compare Window Register */
+#define REG_ADC_CGR REG_ACCESS(RwReg, 0x400C0048U) /**< \brief (ADC) Channel Gain Register */
+#define REG_ADC_COR REG_ACCESS(RwReg, 0x400C004CU) /**< \brief (ADC) Channel Offset Register */
+#define REG_ADC_CDR REG_ACCESS(RoReg, 0x400C0050U) /**< \brief (ADC) Channel Data Register */
+#define REG_ADC_ACR REG_ACCESS(RwReg, 0x400C0094U) /**< \brief (ADC) Analog Control Register */
+#define REG_ADC_WPMR REG_ACCESS(RwReg, 0x400C00E4U) /**< \brief (ADC) Write Protect Mode Register */
+#define REG_ADC_WPSR REG_ACCESS(RoReg, 0x400C00E8U) /**< \brief (ADC) Write Protect Status Register */
+#define REG_ADC_RPR REG_ACCESS(RwReg, 0x400C0100U) /**< \brief (ADC) Receive Pointer Register */
+#define REG_ADC_RCR REG_ACCESS(RwReg, 0x400C0104U) /**< \brief (ADC) Receive Counter Register */
+#define REG_ADC_TPR REG_ACCESS(RwReg, 0x400C0108U) /**< \brief (ADC) Transmit Pointer Register */
+#define REG_ADC_TCR REG_ACCESS(RwReg, 0x400C010CU) /**< \brief (ADC) Transmit Counter Register */
+#define REG_ADC_RNPR REG_ACCESS(RwReg, 0x400C0110U) /**< \brief (ADC) Receive Next Pointer Register */
+#define REG_ADC_RNCR REG_ACCESS(RwReg, 0x400C0114U) /**< \brief (ADC) Receive Next Counter Register */
+#define REG_ADC_TNPR REG_ACCESS(RwReg, 0x400C0118U) /**< \brief (ADC) Transmit Next Pointer Register */
+#define REG_ADC_TNCR REG_ACCESS(RwReg, 0x400C011CU) /**< \brief (ADC) Transmit Next Counter Register */
+#define REG_ADC_PTCR REG_ACCESS(WoReg, 0x400C0120U) /**< \brief (ADC) Transfer Control Register */
+#define REG_ADC_PTSR REG_ACCESS(RoReg, 0x400C0124U) /**< \brief (ADC) Transfer Status Register */
+/* ========== Register definition for DMAC peripheral ========== */
+#define REG_DMAC_GCFG REG_ACCESS(RwReg, 0x400C4000U) /**< \brief (DMAC) DMAC Global Configuration Register */
+#define REG_DMAC_EN REG_ACCESS(RwReg, 0x400C4004U) /**< \brief (DMAC) DMAC Enable Register */
+#define REG_DMAC_SREQ REG_ACCESS(RwReg, 0x400C4008U) /**< \brief (DMAC) DMAC Software Single Request Register */
+#define REG_DMAC_CREQ REG_ACCESS(RwReg, 0x400C400CU) /**< \brief (DMAC) DMAC Software Chunk Transfer Request Register */
+#define REG_DMAC_LAST REG_ACCESS(RwReg, 0x400C4010U) /**< \brief (DMAC) DMAC Software Last Transfer Flag Register */
+#define REG_DMAC_EBCIER REG_ACCESS(WoReg, 0x400C4018U) /**< \brief (DMAC) DMAC Error, Chained Buffer Transfer Completed Interrupt and Buffer Transfer Completed Interrupt Enable register. */
+#define REG_DMAC_EBCIDR REG_ACCESS(WoReg, 0x400C401CU) /**< \brief (DMAC) DMAC Error, Chained Buffer Transfer Completed Interrupt and Buffer Transfer Completed Interrupt Disable register. */
+#define REG_DMAC_EBCIMR REG_ACCESS(RoReg, 0x400C4020U) /**< \brief (DMAC) DMAC Error, Chained Buffer Transfer Completed Interrupt and Buffer transfer completed Mask Register. */
+#define REG_DMAC_EBCISR REG_ACCESS(RoReg, 0x400C4024U) /**< \brief (DMAC) DMAC Error, Chained Buffer Transfer Completed Interrupt and Buffer transfer completed Status Register. */
+#define REG_DMAC_CHER REG_ACCESS(WoReg, 0x400C4028U) /**< \brief (DMAC) DMAC Channel Handler Enable Register */
+#define REG_DMAC_CHDR REG_ACCESS(WoReg, 0x400C402CU) /**< \brief (DMAC) DMAC Channel Handler Disable Register */
+#define REG_DMAC_CHSR REG_ACCESS(RoReg, 0x400C4030U) /**< \brief (DMAC) DMAC Channel Handler Status Register */
+#define REG_DMAC_SADDR0 REG_ACCESS(RwReg, 0x400C403CU) /**< \brief (DMAC) DMAC Channel Source Address Register (ch_num = 0) */
+#define REG_DMAC_DADDR0 REG_ACCESS(RwReg, 0x400C4040U) /**< \brief (DMAC) DMAC Channel Destination Address Register (ch_num = 0) */
+#define REG_DMAC_DSCR0 REG_ACCESS(RwReg, 0x400C4044U) /**< \brief (DMAC) DMAC Channel Descriptor Address Register (ch_num = 0) */
+#define REG_DMAC_CTRLA0 REG_ACCESS(RwReg, 0x400C4048U) /**< \brief (DMAC) DMAC Channel Control A Register (ch_num = 0) */
+#define REG_DMAC_CTRLB0 REG_ACCESS(RwReg, 0x400C404CU) /**< \brief (DMAC) DMAC Channel Control B Register (ch_num = 0) */
+#define REG_DMAC_CFG0 REG_ACCESS(RwReg, 0x400C4050U) /**< \brief (DMAC) DMAC Channel Configuration Register (ch_num = 0) */
+#define REG_DMAC_SADDR1 REG_ACCESS(RwReg, 0x400C4064U) /**< \brief (DMAC) DMAC Channel Source Address Register (ch_num = 1) */
+#define REG_DMAC_DADDR1 REG_ACCESS(RwReg, 0x400C4068U) /**< \brief (DMAC) DMAC Channel Destination Address Register (ch_num = 1) */
+#define REG_DMAC_DSCR1 REG_ACCESS(RwReg, 0x400C406CU) /**< \brief (DMAC) DMAC Channel Descriptor Address Register (ch_num = 1) */
+#define REG_DMAC_CTRLA1 REG_ACCESS(RwReg, 0x400C4070U) /**< \brief (DMAC) DMAC Channel Control A Register (ch_num = 1) */
+#define REG_DMAC_CTRLB1 REG_ACCESS(RwReg, 0x400C4074U) /**< \brief (DMAC) DMAC Channel Control B Register (ch_num = 1) */
+#define REG_DMAC_CFG1 REG_ACCESS(RwReg, 0x400C4078U) /**< \brief (DMAC) DMAC Channel Configuration Register (ch_num = 1) */
+#define REG_DMAC_SADDR2 REG_ACCESS(RwReg, 0x400C408CU) /**< \brief (DMAC) DMAC Channel Source Address Register (ch_num = 2) */
+#define REG_DMAC_DADDR2 REG_ACCESS(RwReg, 0x400C4090U) /**< \brief (DMAC) DMAC Channel Destination Address Register (ch_num = 2) */
+#define REG_DMAC_DSCR2 REG_ACCESS(RwReg, 0x400C4094U) /**< \brief (DMAC) DMAC Channel Descriptor Address Register (ch_num = 2) */
+#define REG_DMAC_CTRLA2 REG_ACCESS(RwReg, 0x400C4098U) /**< \brief (DMAC) DMAC Channel Control A Register (ch_num = 2) */
+#define REG_DMAC_CTRLB2 REG_ACCESS(RwReg, 0x400C409CU) /**< \brief (DMAC) DMAC Channel Control B Register (ch_num = 2) */
+#define REG_DMAC_CFG2 REG_ACCESS(RwReg, 0x400C40A0U) /**< \brief (DMAC) DMAC Channel Configuration Register (ch_num = 2) */
+#define REG_DMAC_SADDR3 REG_ACCESS(RwReg, 0x400C40B4U) /**< \brief (DMAC) DMAC Channel Source Address Register (ch_num = 3) */
+#define REG_DMAC_DADDR3 REG_ACCESS(RwReg, 0x400C40B8U) /**< \brief (DMAC) DMAC Channel Destination Address Register (ch_num = 3) */
+#define REG_DMAC_DSCR3 REG_ACCESS(RwReg, 0x400C40BCU) /**< \brief (DMAC) DMAC Channel Descriptor Address Register (ch_num = 3) */
+#define REG_DMAC_CTRLA3 REG_ACCESS(RwReg, 0x400C40C0U) /**< \brief (DMAC) DMAC Channel Control A Register (ch_num = 3) */
+#define REG_DMAC_CTRLB3 REG_ACCESS(RwReg, 0x400C40C4U) /**< \brief (DMAC) DMAC Channel Control B Register (ch_num = 3) */
+#define REG_DMAC_CFG3 REG_ACCESS(RwReg, 0x400C40C8U) /**< \brief (DMAC) DMAC Channel Configuration Register (ch_num = 3) */
+#define REG_DMAC_SADDR4 REG_ACCESS(RwReg, 0x400C40DCU) /**< \brief (DMAC) DMAC Channel Source Address Register (ch_num = 4) */
+#define REG_DMAC_DADDR4 REG_ACCESS(RwReg, 0x400C40E0U) /**< \brief (DMAC) DMAC Channel Destination Address Register (ch_num = 4) */
+#define REG_DMAC_DSCR4 REG_ACCESS(RwReg, 0x400C40E4U) /**< \brief (DMAC) DMAC Channel Descriptor Address Register (ch_num = 4) */
+#define REG_DMAC_CTRLA4 REG_ACCESS(RwReg, 0x400C40E8U) /**< \brief (DMAC) DMAC Channel Control A Register (ch_num = 4) */
+#define REG_DMAC_CTRLB4 REG_ACCESS(RwReg, 0x400C40ECU) /**< \brief (DMAC) DMAC Channel Control B Register (ch_num = 4) */
+#define REG_DMAC_CFG4 REG_ACCESS(RwReg, 0x400C40F0U) /**< \brief (DMAC) DMAC Channel Configuration Register (ch_num = 4) */
+#define REG_DMAC_SADDR5 REG_ACCESS(RwReg, 0x400C4104U) /**< \brief (DMAC) DMAC Channel Source Address Register (ch_num = 5) */
+#define REG_DMAC_DADDR5 REG_ACCESS(RwReg, 0x400C4108U) /**< \brief (DMAC) DMAC Channel Destination Address Register (ch_num = 5) */
+#define REG_DMAC_DSCR5 REG_ACCESS(RwReg, 0x400C410CU) /**< \brief (DMAC) DMAC Channel Descriptor Address Register (ch_num = 5) */
+#define REG_DMAC_CTRLA5 REG_ACCESS(RwReg, 0x400C4110U) /**< \brief (DMAC) DMAC Channel Control A Register (ch_num = 5) */
+#define REG_DMAC_CTRLB5 REG_ACCESS(RwReg, 0x400C4114U) /**< \brief (DMAC) DMAC Channel Control B Register (ch_num = 5) */
+#define REG_DMAC_CFG5 REG_ACCESS(RwReg, 0x400C4118U) /**< \brief (DMAC) DMAC Channel Configuration Register (ch_num = 5) */
+#define REG_DMAC_WPMR REG_ACCESS(RwReg, 0x400C41E4U) /**< \brief (DMAC) DMAC Write Protect Mode Register */
+#define REG_DMAC_WPSR REG_ACCESS(RoReg, 0x400C41E8U) /**< \brief (DMAC) DMAC Write Protect Status Register */
+/* ========== Register definition for DACC peripheral ========== */
+#define REG_DACC_CR REG_ACCESS(WoReg, 0x400C8000U) /**< \brief (DACC) Control Register */
+#define REG_DACC_MR REG_ACCESS(RwReg, 0x400C8004U) /**< \brief (DACC) Mode Register */
+#define REG_DACC_CHER REG_ACCESS(WoReg, 0x400C8010U) /**< \brief (DACC) Channel Enable Register */
+#define REG_DACC_CHDR REG_ACCESS(WoReg, 0x400C8014U) /**< \brief (DACC) Channel Disable Register */
+#define REG_DACC_CHSR REG_ACCESS(RoReg, 0x400C8018U) /**< \brief (DACC) Channel Status Register */
+#define REG_DACC_CDR REG_ACCESS(WoReg, 0x400C8020U) /**< \brief (DACC) Conversion Data Register */
+#define REG_DACC_IER REG_ACCESS(WoReg, 0x400C8024U) /**< \brief (DACC) Interrupt Enable Register */
+#define REG_DACC_IDR REG_ACCESS(WoReg, 0x400C8028U) /**< \brief (DACC) Interrupt Disable Register */
+#define REG_DACC_IMR REG_ACCESS(RoReg, 0x400C802CU) /**< \brief (DACC) Interrupt Mask Register */
+#define REG_DACC_ISR REG_ACCESS(RoReg, 0x400C8030U) /**< \brief (DACC) Interrupt Status Register */
+#define REG_DACC_ACR REG_ACCESS(RwReg, 0x400C8094U) /**< \brief (DACC) Analog Current Register */
+#define REG_DACC_WPMR REG_ACCESS(RwReg, 0x400C80E4U) /**< \brief (DACC) Write Protect Mode register */
+#define REG_DACC_WPSR REG_ACCESS(RoReg, 0x400C80E8U) /**< \brief (DACC) Write Protect Status register */
+#define REG_DACC_RPR REG_ACCESS(RwReg, 0x400C8100U) /**< \brief (DACC) Receive Pointer Register */
+#define REG_DACC_RCR REG_ACCESS(RwReg, 0x400C8104U) /**< \brief (DACC) Receive Counter Register */
+#define REG_DACC_TPR REG_ACCESS(RwReg, 0x400C8108U) /**< \brief (DACC) Transmit Pointer Register */
+#define REG_DACC_TCR REG_ACCESS(RwReg, 0x400C810CU) /**< \brief (DACC) Transmit Counter Register */
+#define REG_DACC_RNPR REG_ACCESS(RwReg, 0x400C8110U) /**< \brief (DACC) Receive Next Pointer Register */
+#define REG_DACC_RNCR REG_ACCESS(RwReg, 0x400C8114U) /**< \brief (DACC) Receive Next Counter Register */
+#define REG_DACC_TNPR REG_ACCESS(RwReg, 0x400C8118U) /**< \brief (DACC) Transmit Next Pointer Register */
+#define REG_DACC_TNCR REG_ACCESS(RwReg, 0x400C811CU) /**< \brief (DACC) Transmit Next Counter Register */
+#define REG_DACC_PTCR REG_ACCESS(WoReg, 0x400C8120U) /**< \brief (DACC) Transfer Control Register */
+#define REG_DACC_PTSR REG_ACCESS(RoReg, 0x400C8124U) /**< \brief (DACC) Transfer Status Register */
+/* ========== Register definition for SMC peripheral ========== */
+#define REG_SMC_CFG REG_ACCESS(RwReg, 0x400E0000U) /**< \brief (SMC) SMC NFC Configuration Register */
+#define REG_SMC_CTRL REG_ACCESS(WoReg, 0x400E0004U) /**< \brief (SMC) SMC NFC Control Register */
+#define REG_SMC_SR REG_ACCESS(RoReg, 0x400E0008U) /**< \brief (SMC) SMC NFC Status Register */
+#define REG_SMC_IER REG_ACCESS(WoReg, 0x400E000CU) /**< \brief (SMC) SMC NFC Interrupt Enable Register */
+#define REG_SMC_IDR REG_ACCESS(WoReg, 0x400E0010U) /**< \brief (SMC) SMC NFC Interrupt Disable Register */
+#define REG_SMC_IMR REG_ACCESS(RoReg, 0x400E0014U) /**< \brief (SMC) SMC NFC Interrupt Mask Register */
+#define REG_SMC_ADDR REG_ACCESS(RwReg, 0x400E0018U) /**< \brief (SMC) SMC NFC Address Cycle Zero Register */
+#define REG_SMC_BANK REG_ACCESS(RwReg, 0x400E001CU) /**< \brief (SMC) SMC Bank Address Register */
+#define REG_SMC_ECC_CTRL REG_ACCESS(WoReg, 0x400E0020U) /**< \brief (SMC) SMC ECC Control Register */
+#define REG_SMC_ECC_MD REG_ACCESS(RwReg, 0x400E0024U) /**< \brief (SMC) SMC ECC Mode Register */
+#define REG_SMC_ECC_SR1 REG_ACCESS(RoReg, 0x400E0028U) /**< \brief (SMC) SMC ECC Status 1 Register */
+#define REG_SMC_ECC_PR0 REG_ACCESS(RoReg, 0x400E002CU) /**< \brief (SMC) SMC ECC Parity 0 Register */
+#define REG_SMC_ECC_PR1 REG_ACCESS(RoReg, 0x400E0030U) /**< \brief (SMC) SMC ECC parity 1 Register */
+#define REG_SMC_ECC_SR2 REG_ACCESS(RoReg, 0x400E0034U) /**< \brief (SMC) SMC ECC status 2 Register */
+#define REG_SMC_ECC_PR2 REG_ACCESS(RoReg, 0x400E0038U) /**< \brief (SMC) SMC ECC parity 2 Register */
+#define REG_SMC_ECC_PR3 REG_ACCESS(RoReg, 0x400E003CU) /**< \brief (SMC) SMC ECC parity 3 Register */
+#define REG_SMC_ECC_PR4 REG_ACCESS(RoReg, 0x400E0040U) /**< \brief (SMC) SMC ECC parity 4 Register */
+#define REG_SMC_ECC_PR5 REG_ACCESS(RoReg, 0x400E0044U) /**< \brief (SMC) SMC ECC parity 5 Register */
+#define REG_SMC_ECC_PR6 REG_ACCESS(RoReg, 0x400E0048U) /**< \brief (SMC) SMC ECC parity 6 Register */
+#define REG_SMC_ECC_PR7 REG_ACCESS(RoReg, 0x400E004CU) /**< \brief (SMC) SMC ECC parity 7 Register */
+#define REG_SMC_ECC_PR8 REG_ACCESS(RoReg, 0x400E0050U) /**< \brief (SMC) SMC ECC parity 8 Register */
+#define REG_SMC_ECC_PR9 REG_ACCESS(RoReg, 0x400E0054U) /**< \brief (SMC) SMC ECC parity 9 Register */
+#define REG_SMC_ECC_PR10 REG_ACCESS(RoReg, 0x400E0058U) /**< \brief (SMC) SMC ECC parity 10 Register */
+#define REG_SMC_ECC_PR11 REG_ACCESS(RoReg, 0x400E005CU) /**< \brief (SMC) SMC ECC parity 11 Register */
+#define REG_SMC_ECC_PR12 REG_ACCESS(RoReg, 0x400E0060U) /**< \brief (SMC) SMC ECC parity 12 Register */
+#define REG_SMC_ECC_PR13 REG_ACCESS(RoReg, 0x400E0064U) /**< \brief (SMC) SMC ECC parity 13 Register */
+#define REG_SMC_ECC_PR14 REG_ACCESS(RoReg, 0x400E0068U) /**< \brief (SMC) SMC ECC parity 14 Register */
+#define REG_SMC_ECC_PR15 REG_ACCESS(RoReg, 0x400E006CU) /**< \brief (SMC) SMC ECC parity 15 Register */
+#define REG_SMC_SETUP0 REG_ACCESS(RwReg, 0x400E0070U) /**< \brief (SMC) SMC Setup Register (CS_number = 0) */
+#define REG_SMC_PULSE0 REG_ACCESS(RwReg, 0x400E0074U) /**< \brief (SMC) SMC Pulse Register (CS_number = 0) */
+#define REG_SMC_CYCLE0 REG_ACCESS(RwReg, 0x400E0078U) /**< \brief (SMC) SMC Cycle Register (CS_number = 0) */
+#define REG_SMC_TIMINGS0 REG_ACCESS(RwReg, 0x400E007CU) /**< \brief (SMC) SMC Timings Register (CS_number = 0) */
+#define REG_SMC_MODE0 REG_ACCESS(RwReg, 0x400E0080U) /**< \brief (SMC) SMC Mode Register (CS_number = 0) */
+#define REG_SMC_SETUP1 REG_ACCESS(RwReg, 0x400E0084U) /**< \brief (SMC) SMC Setup Register (CS_number = 1) */
+#define REG_SMC_PULSE1 REG_ACCESS(RwReg, 0x400E0088U) /**< \brief (SMC) SMC Pulse Register (CS_number = 1) */
+#define REG_SMC_CYCLE1 REG_ACCESS(RwReg, 0x400E008CU) /**< \brief (SMC) SMC Cycle Register (CS_number = 1) */
+#define REG_SMC_TIMINGS1 REG_ACCESS(RwReg, 0x400E0090U) /**< \brief (SMC) SMC Timings Register (CS_number = 1) */
+#define REG_SMC_MODE1 REG_ACCESS(RwReg, 0x400E0094U) /**< \brief (SMC) SMC Mode Register (CS_number = 1) */
+#define REG_SMC_SETUP2 REG_ACCESS(RwReg, 0x400E0098U) /**< \brief (SMC) SMC Setup Register (CS_number = 2) */
+#define REG_SMC_PULSE2 REG_ACCESS(RwReg, 0x400E009CU) /**< \brief (SMC) SMC Pulse Register (CS_number = 2) */
+#define REG_SMC_CYCLE2 REG_ACCESS(RwReg, 0x400E00A0U) /**< \brief (SMC) SMC Cycle Register (CS_number = 2) */
+#define REG_SMC_TIMINGS2 REG_ACCESS(RwReg, 0x400E00A4U) /**< \brief (SMC) SMC Timings Register (CS_number = 2) */
+#define REG_SMC_MODE2 REG_ACCESS(RwReg, 0x400E00A8U) /**< \brief (SMC) SMC Mode Register (CS_number = 2) */
+#define REG_SMC_SETUP3 REG_ACCESS(RwReg, 0x400E00ACU) /**< \brief (SMC) SMC Setup Register (CS_number = 3) */
+#define REG_SMC_PULSE3 REG_ACCESS(RwReg, 0x400E00B0U) /**< \brief (SMC) SMC Pulse Register (CS_number = 3) */
+#define REG_SMC_CYCLE3 REG_ACCESS(RwReg, 0x400E00B4U) /**< \brief (SMC) SMC Cycle Register (CS_number = 3) */
+#define REG_SMC_TIMINGS3 REG_ACCESS(RwReg, 0x400E00B8U) /**< \brief (SMC) SMC Timings Register (CS_number = 3) */
+#define REG_SMC_MODE3 REG_ACCESS(RwReg, 0x400E00BCU) /**< \brief (SMC) SMC Mode Register (CS_number = 3) */
+#define REG_SMC_SETUP4 REG_ACCESS(RwReg, 0x400E00C0U) /**< \brief (SMC) SMC Setup Register (CS_number = 4) */
+#define REG_SMC_PULSE4 REG_ACCESS(RwReg, 0x400E00C4U) /**< \brief (SMC) SMC Pulse Register (CS_number = 4) */
+#define REG_SMC_CYCLE4 REG_ACCESS(RwReg, 0x400E00C8U) /**< \brief (SMC) SMC Cycle Register (CS_number = 4) */
+#define REG_SMC_TIMINGS4 REG_ACCESS(RwReg, 0x400E00CCU) /**< \brief (SMC) SMC Timings Register (CS_number = 4) */
+#define REG_SMC_MODE4 REG_ACCESS(RwReg, 0x400E00D0U) /**< \brief (SMC) SMC Mode Register (CS_number = 4) */
+#define REG_SMC_SETUP5 REG_ACCESS(RwReg, 0x400E00D4U) /**< \brief (SMC) SMC Setup Register (CS_number = 5) */
+#define REG_SMC_PULSE5 REG_ACCESS(RwReg, 0x400E00D8U) /**< \brief (SMC) SMC Pulse Register (CS_number = 5) */
+#define REG_SMC_CYCLE5 REG_ACCESS(RwReg, 0x400E00DCU) /**< \brief (SMC) SMC Cycle Register (CS_number = 5) */
+#define REG_SMC_TIMINGS5 REG_ACCESS(RwReg, 0x400E00E0U) /**< \brief (SMC) SMC Timings Register (CS_number = 5) */
+#define REG_SMC_MODE5 REG_ACCESS(RwReg, 0x400E00E4U) /**< \brief (SMC) SMC Mode Register (CS_number = 5) */
+#define REG_SMC_SETUP6 REG_ACCESS(RwReg, 0x400E00E8U) /**< \brief (SMC) SMC Setup Register (CS_number = 6) */
+#define REG_SMC_PULSE6 REG_ACCESS(RwReg, 0x400E00ECU) /**< \brief (SMC) SMC Pulse Register (CS_number = 6) */
+#define REG_SMC_CYCLE6 REG_ACCESS(RwReg, 0x400E00F0U) /**< \brief (SMC) SMC Cycle Register (CS_number = 6) */
+#define REG_SMC_TIMINGS6 REG_ACCESS(RwReg, 0x400E00F4U) /**< \brief (SMC) SMC Timings Register (CS_number = 6) */
+#define REG_SMC_MODE6 REG_ACCESS(RwReg, 0x400E00F8U) /**< \brief (SMC) SMC Mode Register (CS_number = 6) */
+#define REG_SMC_SETUP7 REG_ACCESS(RwReg, 0x400E00FCU) /**< \brief (SMC) SMC Setup Register (CS_number = 7) */
+#define REG_SMC_PULSE7 REG_ACCESS(RwReg, 0x400E0100U) /**< \brief (SMC) SMC Pulse Register (CS_number = 7) */
+#define REG_SMC_CYCLE7 REG_ACCESS(RwReg, 0x400E0104U) /**< \brief (SMC) SMC Cycle Register (CS_number = 7) */
+#define REG_SMC_TIMINGS7 REG_ACCESS(RwReg, 0x400E0108U) /**< \brief (SMC) SMC Timings Register (CS_number = 7) */
+#define REG_SMC_MODE7 REG_ACCESS(RwReg, 0x400E010CU) /**< \brief (SMC) SMC Mode Register (CS_number = 7) */
+#define REG_SMC_OCMS REG_ACCESS(RwReg, 0x400E0110U) /**< \brief (SMC) SMC OCMS Register */
+#define REG_SMC_KEY1 REG_ACCESS(WoReg, 0x400E0114U) /**< \brief (SMC) SMC OCMS KEY1 Register */
+#define REG_SMC_KEY2 REG_ACCESS(WoReg, 0x400E0118U) /**< \brief (SMC) SMC OCMS KEY2 Register */
+#define REG_SMC_WPCR REG_ACCESS(WoReg, 0x400E01E4U) /**< \brief (SMC) Write Protection Control Register */
+#define REG_SMC_WPSR REG_ACCESS(RoReg, 0x400E01E8U) /**< \brief (SMC) Write Protection Status Register */
+/* ========== Register definition for SDRAMC peripheral ========== */
+#define REG_SDRAMC_MR REG_ACCESS(RwReg, 0x400E0200U) /**< \brief (SDRAMC) SDRAMC Mode Register */
+#define REG_SDRAMC_TR REG_ACCESS(RwReg, 0x400E0204U) /**< \brief (SDRAMC) SDRAMC Refresh Timer Register */
+#define REG_SDRAMC_CR REG_ACCESS(RwReg, 0x400E0208U) /**< \brief (SDRAMC) SDRAMC Configuration Register */
+#define REG_SDRAMC_LPR REG_ACCESS(RwReg, 0x400E0210U) /**< \brief (SDRAMC) SDRAMC Low Power Register */
+#define REG_SDRAMC_IER REG_ACCESS(WoReg, 0x400E0214U) /**< \brief (SDRAMC) SDRAMC Interrupt Enable Register */
+#define REG_SDRAMC_IDR REG_ACCESS(WoReg, 0x400E0218U) /**< \brief (SDRAMC) SDRAMC Interrupt Disable Register */
+#define REG_SDRAMC_IMR REG_ACCESS(RoReg, 0x400E021CU) /**< \brief (SDRAMC) SDRAMC Interrupt Mask Register */
+#define REG_SDRAMC_ISR REG_ACCESS(RoReg, 0x400E0220U) /**< \brief (SDRAMC) SDRAMC Interrupt Status Register */
+#define REG_SDRAMC_MDR REG_ACCESS(RwReg, 0x400E0224U) /**< \brief (SDRAMC) SDRAMC Memory Device Register */
+#define REG_SDRAMC_CR1 REG_ACCESS(RwReg, 0x400E0228U) /**< \brief (SDRAMC) SDRAMC Configuration Register 1 */
+#define REG_SDRAMC_OCMS REG_ACCESS(RwReg, 0x400E022CU) /**< \brief (SDRAMC) SDRAMC OCMS Register 1 */
+/* ========== Register definition for MATRIX peripheral ========== */
+#define REG_MATRIX_MCFG REG_ACCESS(RwReg, 0x400E0400U) /**< \brief (MATRIX) Master Configuration Register */
+#define REG_MATRIX_SCFG REG_ACCESS(RwReg, 0x400E0440U) /**< \brief (MATRIX) Slave Configuration Register */
+#define REG_MATRIX_PRAS0 REG_ACCESS(RwReg, 0x400E0480U) /**< \brief (MATRIX) Priority Register A for Slave 0 */
+#define REG_MATRIX_PRAS1 REG_ACCESS(RwReg, 0x400E0488U) /**< \brief (MATRIX) Priority Register A for Slave 1 */
+#define REG_MATRIX_PRAS2 REG_ACCESS(RwReg, 0x400E0490U) /**< \brief (MATRIX) Priority Register A for Slave 2 */
+#define REG_MATRIX_PRAS3 REG_ACCESS(RwReg, 0x400E0498U) /**< \brief (MATRIX) Priority Register A for Slave 3 */
+#define REG_MATRIX_PRAS4 REG_ACCESS(RwReg, 0x400E04A0U) /**< \brief (MATRIX) Priority Register A for Slave 4 */
+#define REG_MATRIX_PRAS5 REG_ACCESS(RwReg, 0x400E04A8U) /**< \brief (MATRIX) Priority Register A for Slave 5 */
+#define REG_MATRIX_PRAS6 REG_ACCESS(RwReg, 0x400E04B0U) /**< \brief (MATRIX) Priority Register A for Slave 6 */
+#define REG_MATRIX_PRAS7 REG_ACCESS(RwReg, 0x400E04B8U) /**< \brief (MATRIX) Priority Register A for Slave 7 */
+#define REG_MATRIX_PRAS8 REG_ACCESS(RwReg, 0x400E04C0U) /**< \brief (MATRIX) Priority Register A for Slave 8 */
+#define REG_MATRIX_MRCR REG_ACCESS(RwReg, 0x400E0500U) /**< \brief (MATRIX) Master Remap Control Register */
+#define REG_CCFG_SYSIO REG_ACCESS(RwReg, 0x400E0514U) /**< \brief (MATRIX) System I/O Configuration register */
+#define REG_MATRIX_WPMR REG_ACCESS(RwReg, 0x400E05E4U) /**< \brief (MATRIX) Write Protect Mode Register */
+#define REG_MATRIX_WPSR REG_ACCESS(RoReg, 0x400E05E8U) /**< \brief (MATRIX) Write Protect Status Register */
+/* ========== Register definition for PMC peripheral ========== */
+#define REG_PMC_SCER REG_ACCESS(WoReg, 0x400E0600U) /**< \brief (PMC) System Clock Enable Register */
+#define REG_PMC_SCDR REG_ACCESS(WoReg, 0x400E0604U) /**< \brief (PMC) System Clock Disable Register */
+#define REG_PMC_SCSR REG_ACCESS(RoReg, 0x400E0608U) /**< \brief (PMC) System Clock Status Register */
+#define REG_PMC_PCER0 REG_ACCESS(WoReg, 0x400E0610U) /**< \brief (PMC) Peripheral Clock Enable Register 0 */
+#define REG_PMC_PCDR0 REG_ACCESS(WoReg, 0x400E0614U) /**< \brief (PMC) Peripheral Clock Disable Register 0 */
+#define REG_PMC_PCSR0 REG_ACCESS(RoReg, 0x400E0618U) /**< \brief (PMC) Peripheral Clock Status Register 0 */
+#define REG_CKGR_UCKR REG_ACCESS(RwReg, 0x400E061CU) /**< \brief (PMC) UTMI Clock Register */
+#define REG_CKGR_MOR REG_ACCESS(RwReg, 0x400E0620U) /**< \brief (PMC) Main Oscillator Register */
+#define REG_CKGR_MCFR REG_ACCESS(RoReg, 0x400E0624U) /**< \brief (PMC) Main Clock Frequency Register */
+#define REG_CKGR_PLLAR REG_ACCESS(RwReg, 0x400E0628U) /**< \brief (PMC) PLLA Register */
+#define REG_PMC_MCKR REG_ACCESS(RwReg, 0x400E0630U) /**< \brief (PMC) Master Clock Register */
+#define REG_PMC_USB REG_ACCESS(RwReg, 0x400E0638U) /**< \brief (PMC) USB Clock Register */
+#define REG_PMC_PCK REG_ACCESS(RwReg, 0x400E0640U) /**< \brief (PMC) Programmable Clock 0 Register */
+#define REG_PMC_IER REG_ACCESS(WoReg, 0x400E0660U) /**< \brief (PMC) Interrupt Enable Register */
+#define REG_PMC_IDR REG_ACCESS(WoReg, 0x400E0664U) /**< \brief (PMC) Interrupt Disable Register */
+#define REG_PMC_SR REG_ACCESS(RoReg, 0x400E0668U) /**< \brief (PMC) Status Register */
+#define REG_PMC_IMR REG_ACCESS(RoReg, 0x400E066CU) /**< \brief (PMC) Interrupt Mask Register */
+#define REG_PMC_FSMR REG_ACCESS(RwReg, 0x400E0670U) /**< \brief (PMC) Fast Startup Mode Register */
+#define REG_PMC_FSPR REG_ACCESS(RwReg, 0x400E0674U) /**< \brief (PMC) Fast Startup Polarity Register */
+#define REG_PMC_FOCR REG_ACCESS(WoReg, 0x400E0678U) /**< \brief (PMC) Fault Output Clear Register */
+#define REG_PMC_WPMR REG_ACCESS(RwReg, 0x400E06E4U) /**< \brief (PMC) Write Protect Mode Register */
+#define REG_PMC_WPSR REG_ACCESS(RoReg, 0x400E06E8U) /**< \brief (PMC) Write Protect Status Register */
+#define REG_PMC_PCER1 REG_ACCESS(WoReg, 0x400E0700U) /**< \brief (PMC) Peripheral Clock Enable Register 1 */
+#define REG_PMC_PCDR1 REG_ACCESS(WoReg, 0x400E0704U) /**< \brief (PMC) Peripheral Clock Disable Register 1 */
+#define REG_PMC_PCSR1 REG_ACCESS(RoReg, 0x400E0708U) /**< \brief (PMC) Peripheral Clock Status Register 1 */
+#define REG_PMC_PCR REG_ACCESS(RwReg, 0x400E070CU) /**< \brief (PMC) Peripheral Control Register */
+/* ========== Register definition for UART peripheral ========== */
+#define REG_UART_CR REG_ACCESS(WoReg, 0x400E0800U) /**< \brief (UART) Control Register */
+#define REG_UART_MR REG_ACCESS(RwReg, 0x400E0804U) /**< \brief (UART) Mode Register */
+#define REG_UART_IER REG_ACCESS(WoReg, 0x400E0808U) /**< \brief (UART) Interrupt Enable Register */
+#define REG_UART_IDR REG_ACCESS(WoReg, 0x400E080CU) /**< \brief (UART) Interrupt Disable Register */
+#define REG_UART_IMR REG_ACCESS(RoReg, 0x400E0810U) /**< \brief (UART) Interrupt Mask Register */
+#define REG_UART_SR REG_ACCESS(RoReg, 0x400E0814U) /**< \brief (UART) Status Register */
+#define REG_UART_RHR REG_ACCESS(RoReg, 0x400E0818U) /**< \brief (UART) Receive Holding Register */
+#define REG_UART_THR REG_ACCESS(WoReg, 0x400E081CU) /**< \brief (UART) Transmit Holding Register */
+#define REG_UART_BRGR REG_ACCESS(RwReg, 0x400E0820U) /**< \brief (UART) Baud Rate Generator Register */
+#define REG_UART_RPR REG_ACCESS(RwReg, 0x400E0900U) /**< \brief (UART) Receive Pointer Register */
+#define REG_UART_RCR REG_ACCESS(RwReg, 0x400E0904U) /**< \brief (UART) Receive Counter Register */
+#define REG_UART_TPR REG_ACCESS(RwReg, 0x400E0908U) /**< \brief (UART) Transmit Pointer Register */
+#define REG_UART_TCR REG_ACCESS(RwReg, 0x400E090CU) /**< \brief (UART) Transmit Counter Register */
+#define REG_UART_RNPR REG_ACCESS(RwReg, 0x400E0910U) /**< \brief (UART) Receive Next Pointer Register */
+#define REG_UART_RNCR REG_ACCESS(RwReg, 0x400E0914U) /**< \brief (UART) Receive Next Counter Register */
+#define REG_UART_TNPR REG_ACCESS(RwReg, 0x400E0918U) /**< \brief (UART) Transmit Next Pointer Register */
+#define REG_UART_TNCR REG_ACCESS(RwReg, 0x400E091CU) /**< \brief (UART) Transmit Next Counter Register */
+#define REG_UART_PTCR REG_ACCESS(WoReg, 0x400E0920U) /**< \brief (UART) Transfer Control Register */
+#define REG_UART_PTSR REG_ACCESS(RoReg, 0x400E0924U) /**< \brief (UART) Transfer Status Register */
+/* ========== Register definition for CHIPID peripheral ========== */
+#define REG_CHIPID_CIDR REG_ACCESS(RoReg, 0x400E0940U) /**< \brief (CHIPID) Chip ID Register */
+#define REG_CHIPID_EXID REG_ACCESS(RoReg, 0x400E0944U) /**< \brief (CHIPID) Chip ID Extension Register */
+/* ========== Register definition for EFC0 peripheral ========== */
+#define REG_EFC0_FMR REG_ACCESS(RwReg, 0x400E0A00U) /**< \brief (EFC0) EEFC Flash Mode Register */
+#define REG_EFC0_FCR REG_ACCESS(WoReg, 0x400E0A04U) /**< \brief (EFC0) EEFC Flash Command Register */
+#define REG_EFC0_FSR REG_ACCESS(RoReg, 0x400E0A08U) /**< \brief (EFC0) EEFC Flash Status Register */
+#define REG_EFC0_FRR REG_ACCESS(RoReg, 0x400E0A0CU) /**< \brief (EFC0) EEFC Flash Result Register */
+/* ========== Register definition for EFC1 peripheral ========== */
+#define REG_EFC1_FMR REG_ACCESS(RwReg, 0x400E0C00U) /**< \brief (EFC1) EEFC Flash Mode Register */
+#define REG_EFC1_FCR REG_ACCESS(WoReg, 0x400E0C04U) /**< \brief (EFC1) EEFC Flash Command Register */
+#define REG_EFC1_FSR REG_ACCESS(RoReg, 0x400E0C08U) /**< \brief (EFC1) EEFC Flash Status Register */
+#define REG_EFC1_FRR REG_ACCESS(RoReg, 0x400E0C0CU) /**< \brief (EFC1) EEFC Flash Result Register */
+/* ========== Register definition for PIOA peripheral ========== */
+#define REG_PIOA_PER REG_ACCESS(WoReg, 0x400E0E00U) /**< \brief (PIOA) PIO Enable Register */
+#define REG_PIOA_PDR REG_ACCESS(WoReg, 0x400E0E04U) /**< \brief (PIOA) PIO Disable Register */
+#define REG_PIOA_PSR REG_ACCESS(RoReg, 0x400E0E08U) /**< \brief (PIOA) PIO Status Register */
+#define REG_PIOA_OER REG_ACCESS(WoReg, 0x400E0E10U) /**< \brief (PIOA) Output Enable Register */
+#define REG_PIOA_ODR REG_ACCESS(WoReg, 0x400E0E14U) /**< \brief (PIOA) Output Disable Register */
+#define REG_PIOA_OSR REG_ACCESS(RoReg, 0x400E0E18U) /**< \brief (PIOA) Output Status Register */
+#define REG_PIOA_IFER REG_ACCESS(WoReg, 0x400E0E20U) /**< \brief (PIOA) Glitch Input Filter Enable Register */
+#define REG_PIOA_IFDR REG_ACCESS(WoReg, 0x400E0E24U) /**< \brief (PIOA) Glitch Input Filter Disable Register */
+#define REG_PIOA_IFSR REG_ACCESS(RoReg, 0x400E0E28U) /**< \brief (PIOA) Glitch Input Filter Status Register */
+#define REG_PIOA_SODR REG_ACCESS(WoReg, 0x400E0E30U) /**< \brief (PIOA) Set Output Data Register */
+#define REG_PIOA_CODR REG_ACCESS(WoReg, 0x400E0E34U) /**< \brief (PIOA) Clear Output Data Register */
+#define REG_PIOA_ODSR REG_ACCESS(RwReg, 0x400E0E38U) /**< \brief (PIOA) Output Data Status Register */
+#define REG_PIOA_PDSR REG_ACCESS(RoReg, 0x400E0E3CU) /**< \brief (PIOA) Pin Data Status Register */
+#define REG_PIOA_IER REG_ACCESS(WoReg, 0x400E0E40U) /**< \brief (PIOA) Interrupt Enable Register */
+#define REG_PIOA_IDR REG_ACCESS(WoReg, 0x400E0E44U) /**< \brief (PIOA) Interrupt Disable Register */
+#define REG_PIOA_IMR REG_ACCESS(RoReg, 0x400E0E48U) /**< \brief (PIOA) Interrupt Mask Register */
+#define REG_PIOA_ISR REG_ACCESS(RoReg, 0x400E0E4CU) /**< \brief (PIOA) Interrupt Status Register */
+#define REG_PIOA_MDER REG_ACCESS(WoReg, 0x400E0E50U) /**< \brief (PIOA) Multi-driver Enable Register */
+#define REG_PIOA_MDDR REG_ACCESS(WoReg, 0x400E0E54U) /**< \brief (PIOA) Multi-driver Disable Register */
+#define REG_PIOA_MDSR REG_ACCESS(RoReg, 0x400E0E58U) /**< \brief (PIOA) Multi-driver Status Register */
+#define REG_PIOA_PUDR REG_ACCESS(WoReg, 0x400E0E60U) /**< \brief (PIOA) Pull-up Disable Register */
+#define REG_PIOA_PUER REG_ACCESS(WoReg, 0x400E0E64U) /**< \brief (PIOA) Pull-up Enable Register */
+#define REG_PIOA_PUSR REG_ACCESS(RoReg, 0x400E0E68U) /**< \brief (PIOA) Pad Pull-up Status Register */
+#define REG_PIOA_ABSR REG_ACCESS(RwReg, 0x400E0E70U) /**< \brief (PIOA) Peripheral AB Select Register */
+#define REG_PIOA_SCIFSR REG_ACCESS(WoReg, 0x400E0E80U) /**< \brief (PIOA) System Clock Glitch Input Filter Select Register */
+#define REG_PIOA_DIFSR REG_ACCESS(WoReg, 0x400E0E84U) /**< \brief (PIOA) Debouncing Input Filter Select Register */
+#define REG_PIOA_IFDGSR REG_ACCESS(RoReg, 0x400E0E88U) /**< \brief (PIOA) Glitch or Debouncing Input Filter Clock Selection Status Register */
+#define REG_PIOA_SCDR REG_ACCESS(RwReg, 0x400E0E8CU) /**< \brief (PIOA) Slow Clock Divider Debouncing Register */
+#define REG_PIOA_OWER REG_ACCESS(WoReg, 0x400E0EA0U) /**< \brief (PIOA) Output Write Enable */
+#define REG_PIOA_OWDR REG_ACCESS(WoReg, 0x400E0EA4U) /**< \brief (PIOA) Output Write Disable */
+#define REG_PIOA_OWSR REG_ACCESS(RoReg, 0x400E0EA8U) /**< \brief (PIOA) Output Write Status Register */
+#define REG_PIOA_AIMER REG_ACCESS(WoReg, 0x400E0EB0U) /**< \brief (PIOA) Additional Interrupt Modes Enable Register */
+#define REG_PIOA_AIMDR REG_ACCESS(WoReg, 0x400E0EB4U) /**< \brief (PIOA) Additional Interrupt Modes Disables Register */
+#define REG_PIOA_AIMMR REG_ACCESS(RoReg, 0x400E0EB8U) /**< \brief (PIOA) Additional Interrupt Modes Mask Register */
+#define REG_PIOA_ESR REG_ACCESS(WoReg, 0x400E0EC0U) /**< \brief (PIOA) Edge Select Register */
+#define REG_PIOA_LSR REG_ACCESS(WoReg, 0x400E0EC4U) /**< \brief (PIOA) Level Select Register */
+#define REG_PIOA_ELSR REG_ACCESS(RoReg, 0x400E0EC8U) /**< \brief (PIOA) Edge/Level Status Register */
+#define REG_PIOA_FELLSR REG_ACCESS(WoReg, 0x400E0ED0U) /**< \brief (PIOA) Falling Edge/Low Level Select Register */
+#define REG_PIOA_REHLSR REG_ACCESS(WoReg, 0x400E0ED4U) /**< \brief (PIOA) Rising Edge/ High Level Select Register */
+#define REG_PIOA_FRLHSR REG_ACCESS(RoReg, 0x400E0ED8U) /**< \brief (PIOA) Fall/Rise - Low/High Status Register */
+#define REG_PIOA_LOCKSR REG_ACCESS(RoReg, 0x400E0EE0U) /**< \brief (PIOA) Lock Status */
+#define REG_PIOA_WPMR REG_ACCESS(RwReg, 0x400E0EE4U) /**< \brief (PIOA) Write Protect Mode Register */
+#define REG_PIOA_WPSR REG_ACCESS(RoReg, 0x400E0EE8U) /**< \brief (PIOA) Write Protect Status Register */
+/* ========== Register definition for PIOB peripheral ========== */
+#define REG_PIOB_PER REG_ACCESS(WoReg, 0x400E1000U) /**< \brief (PIOB) PIO Enable Register */
+#define REG_PIOB_PDR REG_ACCESS(WoReg, 0x400E1004U) /**< \brief (PIOB) PIO Disable Register */
+#define REG_PIOB_PSR REG_ACCESS(RoReg, 0x400E1008U) /**< \brief (PIOB) PIO Status Register */
+#define REG_PIOB_OER REG_ACCESS(WoReg, 0x400E1010U) /**< \brief (PIOB) Output Enable Register */
+#define REG_PIOB_ODR REG_ACCESS(WoReg, 0x400E1014U) /**< \brief (PIOB) Output Disable Register */
+#define REG_PIOB_OSR REG_ACCESS(RoReg, 0x400E1018U) /**< \brief (PIOB) Output Status Register */
+#define REG_PIOB_IFER REG_ACCESS(WoReg, 0x400E1020U) /**< \brief (PIOB) Glitch Input Filter Enable Register */
+#define REG_PIOB_IFDR REG_ACCESS(WoReg, 0x400E1024U) /**< \brief (PIOB) Glitch Input Filter Disable Register */
+#define REG_PIOB_IFSR REG_ACCESS(RoReg, 0x400E1028U) /**< \brief (PIOB) Glitch Input Filter Status Register */
+#define REG_PIOB_SODR REG_ACCESS(WoReg, 0x400E1030U) /**< \brief (PIOB) Set Output Data Register */
+#define REG_PIOB_CODR REG_ACCESS(WoReg, 0x400E1034U) /**< \brief (PIOB) Clear Output Data Register */
+#define REG_PIOB_ODSR REG_ACCESS(RwReg, 0x400E1038U) /**< \brief (PIOB) Output Data Status Register */
+#define REG_PIOB_PDSR REG_ACCESS(RoReg, 0x400E103CU) /**< \brief (PIOB) Pin Data Status Register */
+#define REG_PIOB_IER REG_ACCESS(WoReg, 0x400E1040U) /**< \brief (PIOB) Interrupt Enable Register */
+#define REG_PIOB_IDR REG_ACCESS(WoReg, 0x400E1044U) /**< \brief (PIOB) Interrupt Disable Register */
+#define REG_PIOB_IMR REG_ACCESS(RoReg, 0x400E1048U) /**< \brief (PIOB) Interrupt Mask Register */
+#define REG_PIOB_ISR REG_ACCESS(RoReg, 0x400E104CU) /**< \brief (PIOB) Interrupt Status Register */
+#define REG_PIOB_MDER REG_ACCESS(WoReg, 0x400E1050U) /**< \brief (PIOB) Multi-driver Enable Register */
+#define REG_PIOB_MDDR REG_ACCESS(WoReg, 0x400E1054U) /**< \brief (PIOB) Multi-driver Disable Register */
+#define REG_PIOB_MDSR REG_ACCESS(RoReg, 0x400E1058U) /**< \brief (PIOB) Multi-driver Status Register */
+#define REG_PIOB_PUDR REG_ACCESS(WoReg, 0x400E1060U) /**< \brief (PIOB) Pull-up Disable Register */
+#define REG_PIOB_PUER REG_ACCESS(WoReg, 0x400E1064U) /**< \brief (PIOB) Pull-up Enable Register */
+#define REG_PIOB_PUSR REG_ACCESS(RoReg, 0x400E1068U) /**< \brief (PIOB) Pad Pull-up Status Register */
+#define REG_PIOB_ABSR REG_ACCESS(RwReg, 0x400E1070U) /**< \brief (PIOB) Peripheral AB Select Register */
+#define REG_PIOB_SCIFSR REG_ACCESS(WoReg, 0x400E1080U) /**< \brief (PIOB) System Clock Glitch Input Filter Select Register */
+#define REG_PIOB_DIFSR REG_ACCESS(WoReg, 0x400E1084U) /**< \brief (PIOB) Debouncing Input Filter Select Register */
+#define REG_PIOB_IFDGSR REG_ACCESS(RoReg, 0x400E1088U) /**< \brief (PIOB) Glitch or Debouncing Input Filter Clock Selection Status Register */
+#define REG_PIOB_SCDR REG_ACCESS(RwReg, 0x400E108CU) /**< \brief (PIOB) Slow Clock Divider Debouncing Register */
+#define REG_PIOB_OWER REG_ACCESS(WoReg, 0x400E10A0U) /**< \brief (PIOB) Output Write Enable */
+#define REG_PIOB_OWDR REG_ACCESS(WoReg, 0x400E10A4U) /**< \brief (PIOB) Output Write Disable */
+#define REG_PIOB_OWSR REG_ACCESS(RoReg, 0x400E10A8U) /**< \brief (PIOB) Output Write Status Register */
+#define REG_PIOB_AIMER REG_ACCESS(WoReg, 0x400E10B0U) /**< \brief (PIOB) Additional Interrupt Modes Enable Register */
+#define REG_PIOB_AIMDR REG_ACCESS(WoReg, 0x400E10B4U) /**< \brief (PIOB) Additional Interrupt Modes Disables Register */
+#define REG_PIOB_AIMMR REG_ACCESS(RoReg, 0x400E10B8U) /**< \brief (PIOB) Additional Interrupt Modes Mask Register */
+#define REG_PIOB_ESR REG_ACCESS(WoReg, 0x400E10C0U) /**< \brief (PIOB) Edge Select Register */
+#define REG_PIOB_LSR REG_ACCESS(WoReg, 0x400E10C4U) /**< \brief (PIOB) Level Select Register */
+#define REG_PIOB_ELSR REG_ACCESS(RoReg, 0x400E10C8U) /**< \brief (PIOB) Edge/Level Status Register */
+#define REG_PIOB_FELLSR REG_ACCESS(WoReg, 0x400E10D0U) /**< \brief (PIOB) Falling Edge/Low Level Select Register */
+#define REG_PIOB_REHLSR REG_ACCESS(WoReg, 0x400E10D4U) /**< \brief (PIOB) Rising Edge/ High Level Select Register */
+#define REG_PIOB_FRLHSR REG_ACCESS(RoReg, 0x400E10D8U) /**< \brief (PIOB) Fall/Rise - Low/High Status Register */
+#define REG_PIOB_LOCKSR REG_ACCESS(RoReg, 0x400E10E0U) /**< \brief (PIOB) Lock Status */
+#define REG_PIOB_WPMR REG_ACCESS(RwReg, 0x400E10E4U) /**< \brief (PIOB) Write Protect Mode Register */
+#define REG_PIOB_WPSR REG_ACCESS(RoReg, 0x400E10E8U) /**< \brief (PIOB) Write Protect Status Register */
+/* ========== Register definition for PIOC peripheral ========== */
+#define REG_PIOC_PER REG_ACCESS(WoReg, 0x400E1200U) /**< \brief (PIOC) PIO Enable Register */
+#define REG_PIOC_PDR REG_ACCESS(WoReg, 0x400E1204U) /**< \brief (PIOC) PIO Disable Register */
+#define REG_PIOC_PSR REG_ACCESS(RoReg, 0x400E1208U) /**< \brief (PIOC) PIO Status Register */
+#define REG_PIOC_OER REG_ACCESS(WoReg, 0x400E1210U) /**< \brief (PIOC) Output Enable Register */
+#define REG_PIOC_ODR REG_ACCESS(WoReg, 0x400E1214U) /**< \brief (PIOC) Output Disable Register */
+#define REG_PIOC_OSR REG_ACCESS(RoReg, 0x400E1218U) /**< \brief (PIOC) Output Status Register */
+#define REG_PIOC_IFER REG_ACCESS(WoReg, 0x400E1220U) /**< \brief (PIOC) Glitch Input Filter Enable Register */
+#define REG_PIOC_IFDR REG_ACCESS(WoReg, 0x400E1224U) /**< \brief (PIOC) Glitch Input Filter Disable Register */
+#define REG_PIOC_IFSR REG_ACCESS(RoReg, 0x400E1228U) /**< \brief (PIOC) Glitch Input Filter Status Register */
+#define REG_PIOC_SODR REG_ACCESS(WoReg, 0x400E1230U) /**< \brief (PIOC) Set Output Data Register */
+#define REG_PIOC_CODR REG_ACCESS(WoReg, 0x400E1234U) /**< \brief (PIOC) Clear Output Data Register */
+#define REG_PIOC_ODSR REG_ACCESS(RwReg, 0x400E1238U) /**< \brief (PIOC) Output Data Status Register */
+#define REG_PIOC_PDSR REG_ACCESS(RoReg, 0x400E123CU) /**< \brief (PIOC) Pin Data Status Register */
+#define REG_PIOC_IER REG_ACCESS(WoReg, 0x400E1240U) /**< \brief (PIOC) Interrupt Enable Register */
+#define REG_PIOC_IDR REG_ACCESS(WoReg, 0x400E1244U) /**< \brief (PIOC) Interrupt Disable Register */
+#define REG_PIOC_IMR REG_ACCESS(RoReg, 0x400E1248U) /**< \brief (PIOC) Interrupt Mask Register */
+#define REG_PIOC_ISR REG_ACCESS(RoReg, 0x400E124CU) /**< \brief (PIOC) Interrupt Status Register */
+#define REG_PIOC_MDER REG_ACCESS(WoReg, 0x400E1250U) /**< \brief (PIOC) Multi-driver Enable Register */
+#define REG_PIOC_MDDR REG_ACCESS(WoReg, 0x400E1254U) /**< \brief (PIOC) Multi-driver Disable Register */
+#define REG_PIOC_MDSR REG_ACCESS(RoReg, 0x400E1258U) /**< \brief (PIOC) Multi-driver Status Register */
+#define REG_PIOC_PUDR REG_ACCESS(WoReg, 0x400E1260U) /**< \brief (PIOC) Pull-up Disable Register */
+#define REG_PIOC_PUER REG_ACCESS(WoReg, 0x400E1264U) /**< \brief (PIOC) Pull-up Enable Register */
+#define REG_PIOC_PUSR REG_ACCESS(RoReg, 0x400E1268U) /**< \brief (PIOC) Pad Pull-up Status Register */
+#define REG_PIOC_ABSR REG_ACCESS(RwReg, 0x400E1270U) /**< \brief (PIOC) Peripheral AB Select Register */
+#define REG_PIOC_SCIFSR REG_ACCESS(WoReg, 0x400E1280U) /**< \brief (PIOC) System Clock Glitch Input Filter Select Register */
+#define REG_PIOC_DIFSR REG_ACCESS(WoReg, 0x400E1284U) /**< \brief (PIOC) Debouncing Input Filter Select Register */
+#define REG_PIOC_IFDGSR REG_ACCESS(RoReg, 0x400E1288U) /**< \brief (PIOC) Glitch or Debouncing Input Filter Clock Selection Status Register */
+#define REG_PIOC_SCDR REG_ACCESS(RwReg, 0x400E128CU) /**< \brief (PIOC) Slow Clock Divider Debouncing Register */
+#define REG_PIOC_OWER REG_ACCESS(WoReg, 0x400E12A0U) /**< \brief (PIOC) Output Write Enable */
+#define REG_PIOC_OWDR REG_ACCESS(WoReg, 0x400E12A4U) /**< \brief (PIOC) Output Write Disable */
+#define REG_PIOC_OWSR REG_ACCESS(RoReg, 0x400E12A8U) /**< \brief (PIOC) Output Write Status Register */
+#define REG_PIOC_AIMER REG_ACCESS(WoReg, 0x400E12B0U) /**< \brief (PIOC) Additional Interrupt Modes Enable Register */
+#define REG_PIOC_AIMDR REG_ACCESS(WoReg, 0x400E12B4U) /**< \brief (PIOC) Additional Interrupt Modes Disables Register */
+#define REG_PIOC_AIMMR REG_ACCESS(RoReg, 0x400E12B8U) /**< \brief (PIOC) Additional Interrupt Modes Mask Register */
+#define REG_PIOC_ESR REG_ACCESS(WoReg, 0x400E12C0U) /**< \brief (PIOC) Edge Select Register */
+#define REG_PIOC_LSR REG_ACCESS(WoReg, 0x400E12C4U) /**< \brief (PIOC) Level Select Register */
+#define REG_PIOC_ELSR REG_ACCESS(RoReg, 0x400E12C8U) /**< \brief (PIOC) Edge/Level Status Register */
+#define REG_PIOC_FELLSR REG_ACCESS(WoReg, 0x400E12D0U) /**< \brief (PIOC) Falling Edge/Low Level Select Register */
+#define REG_PIOC_REHLSR REG_ACCESS(WoReg, 0x400E12D4U) /**< \brief (PIOC) Rising Edge/ High Level Select Register */
+#define REG_PIOC_FRLHSR REG_ACCESS(RoReg, 0x400E12D8U) /**< \brief (PIOC) Fall/Rise - Low/High Status Register */
+#define REG_PIOC_LOCKSR REG_ACCESS(RoReg, 0x400E12E0U) /**< \brief (PIOC) Lock Status */
+#define REG_PIOC_WPMR REG_ACCESS(RwReg, 0x400E12E4U) /**< \brief (PIOC) Write Protect Mode Register */
+#define REG_PIOC_WPSR REG_ACCESS(RoReg, 0x400E12E8U) /**< \brief (PIOC) Write Protect Status Register */
+/* ========== Register definition for PIOD peripheral ========== */
+#define REG_PIOD_PER REG_ACCESS(WoReg, 0x400E1400U) /**< \brief (PIOD) PIO Enable Register */
+#define REG_PIOD_PDR REG_ACCESS(WoReg, 0x400E1404U) /**< \brief (PIOD) PIO Disable Register */
+#define REG_PIOD_PSR REG_ACCESS(RoReg, 0x400E1408U) /**< \brief (PIOD) PIO Status Register */
+#define REG_PIOD_OER REG_ACCESS(WoReg, 0x400E1410U) /**< \brief (PIOD) Output Enable Register */
+#define REG_PIOD_ODR REG_ACCESS(WoReg, 0x400E1414U) /**< \brief (PIOD) Output Disable Register */
+#define REG_PIOD_OSR REG_ACCESS(RoReg, 0x400E1418U) /**< \brief (PIOD) Output Status Register */
+#define REG_PIOD_IFER REG_ACCESS(WoReg, 0x400E1420U) /**< \brief (PIOD) Glitch Input Filter Enable Register */
+#define REG_PIOD_IFDR REG_ACCESS(WoReg, 0x400E1424U) /**< \brief (PIOD) Glitch Input Filter Disable Register */
+#define REG_PIOD_IFSR REG_ACCESS(RoReg, 0x400E1428U) /**< \brief (PIOD) Glitch Input Filter Status Register */
+#define REG_PIOD_SODR REG_ACCESS(WoReg, 0x400E1430U) /**< \brief (PIOD) Set Output Data Register */
+#define REG_PIOD_CODR REG_ACCESS(WoReg, 0x400E1434U) /**< \brief (PIOD) Clear Output Data Register */
+#define REG_PIOD_ODSR REG_ACCESS(RwReg, 0x400E1438U) /**< \brief (PIOD) Output Data Status Register */
+#define REG_PIOD_PDSR REG_ACCESS(RoReg, 0x400E143CU) /**< \brief (PIOD) Pin Data Status Register */
+#define REG_PIOD_IER REG_ACCESS(WoReg, 0x400E1440U) /**< \brief (PIOD) Interrupt Enable Register */
+#define REG_PIOD_IDR REG_ACCESS(WoReg, 0x400E1444U) /**< \brief (PIOD) Interrupt Disable Register */
+#define REG_PIOD_IMR REG_ACCESS(RoReg, 0x400E1448U) /**< \brief (PIOD) Interrupt Mask Register */
+#define REG_PIOD_ISR REG_ACCESS(RoReg, 0x400E144CU) /**< \brief (PIOD) Interrupt Status Register */
+#define REG_PIOD_MDER REG_ACCESS(WoReg, 0x400E1450U) /**< \brief (PIOD) Multi-driver Enable Register */
+#define REG_PIOD_MDDR REG_ACCESS(WoReg, 0x400E1454U) /**< \brief (PIOD) Multi-driver Disable Register */
+#define REG_PIOD_MDSR REG_ACCESS(RoReg, 0x400E1458U) /**< \brief (PIOD) Multi-driver Status Register */
+#define REG_PIOD_PUDR REG_ACCESS(WoReg, 0x400E1460U) /**< \brief (PIOD) Pull-up Disable Register */
+#define REG_PIOD_PUER REG_ACCESS(WoReg, 0x400E1464U) /**< \brief (PIOD) Pull-up Enable Register */
+#define REG_PIOD_PUSR REG_ACCESS(RoReg, 0x400E1468U) /**< \brief (PIOD) Pad Pull-up Status Register */
+#define REG_PIOD_ABSR REG_ACCESS(RwReg, 0x400E1470U) /**< \brief (PIOD) Peripheral AB Select Register */
+#define REG_PIOD_SCIFSR REG_ACCESS(WoReg, 0x400E1480U) /**< \brief (PIOD) System Clock Glitch Input Filter Select Register */
+#define REG_PIOD_DIFSR REG_ACCESS(WoReg, 0x400E1484U) /**< \brief (PIOD) Debouncing Input Filter Select Register */
+#define REG_PIOD_IFDGSR REG_ACCESS(RoReg, 0x400E1488U) /**< \brief (PIOD) Glitch or Debouncing Input Filter Clock Selection Status Register */
+#define REG_PIOD_SCDR REG_ACCESS(RwReg, 0x400E148CU) /**< \brief (PIOD) Slow Clock Divider Debouncing Register */
+#define REG_PIOD_OWER REG_ACCESS(WoReg, 0x400E14A0U) /**< \brief (PIOD) Output Write Enable */
+#define REG_PIOD_OWDR REG_ACCESS(WoReg, 0x400E14A4U) /**< \brief (PIOD) Output Write Disable */
+#define REG_PIOD_OWSR REG_ACCESS(RoReg, 0x400E14A8U) /**< \brief (PIOD) Output Write Status Register */
+#define REG_PIOD_AIMER REG_ACCESS(WoReg, 0x400E14B0U) /**< \brief (PIOD) Additional Interrupt Modes Enable Register */
+#define REG_PIOD_AIMDR REG_ACCESS(WoReg, 0x400E14B4U) /**< \brief (PIOD) Additional Interrupt Modes Disables Register */
+#define REG_PIOD_AIMMR REG_ACCESS(RoReg, 0x400E14B8U) /**< \brief (PIOD) Additional Interrupt Modes Mask Register */
+#define REG_PIOD_ESR REG_ACCESS(WoReg, 0x400E14C0U) /**< \brief (PIOD) Edge Select Register */
+#define REG_PIOD_LSR REG_ACCESS(WoReg, 0x400E14C4U) /**< \brief (PIOD) Level Select Register */
+#define REG_PIOD_ELSR REG_ACCESS(RoReg, 0x400E14C8U) /**< \brief (PIOD) Edge/Level Status Register */
+#define REG_PIOD_FELLSR REG_ACCESS(WoReg, 0x400E14D0U) /**< \brief (PIOD) Falling Edge/Low Level Select Register */
+#define REG_PIOD_REHLSR REG_ACCESS(WoReg, 0x400E14D4U) /**< \brief (PIOD) Rising Edge/ High Level Select Register */
+#define REG_PIOD_FRLHSR REG_ACCESS(RoReg, 0x400E14D8U) /**< \brief (PIOD) Fall/Rise - Low/High Status Register */
+#define REG_PIOD_LOCKSR REG_ACCESS(RoReg, 0x400E14E0U) /**< \brief (PIOD) Lock Status */
+#define REG_PIOD_WPMR REG_ACCESS(RwReg, 0x400E14E4U) /**< \brief (PIOD) Write Protect Mode Register */
+#define REG_PIOD_WPSR REG_ACCESS(RoReg, 0x400E14E8U) /**< \brief (PIOD) Write Protect Status Register */
+/* ========== Register definition for PIOE peripheral ========== */
+#define REG_PIOE_PER REG_ACCESS(WoReg, 0x400E1600U) /**< \brief (PIOE) PIO Enable Register */
+#define REG_PIOE_PDR REG_ACCESS(WoReg, 0x400E1604U) /**< \brief (PIOE) PIO Disable Register */
+#define REG_PIOE_PSR REG_ACCESS(RoReg, 0x400E1608U) /**< \brief (PIOE) PIO Status Register */
+#define REG_PIOE_OER REG_ACCESS(WoReg, 0x400E1610U) /**< \brief (PIOE) Output Enable Register */
+#define REG_PIOE_ODR REG_ACCESS(WoReg, 0x400E1614U) /**< \brief (PIOE) Output Disable Register */
+#define REG_PIOE_OSR REG_ACCESS(RoReg, 0x400E1618U) /**< \brief (PIOE) Output Status Register */
+#define REG_PIOE_IFER REG_ACCESS(WoReg, 0x400E1620U) /**< \brief (PIOE) Glitch Input Filter Enable Register */
+#define REG_PIOE_IFDR REG_ACCESS(WoReg, 0x400E1624U) /**< \brief (PIOE) Glitch Input Filter Disable Register */
+#define REG_PIOE_IFSR REG_ACCESS(RoReg, 0x400E1628U) /**< \brief (PIOE) Glitch Input Filter Status Register */
+#define REG_PIOE_SODR REG_ACCESS(WoReg, 0x400E1630U) /**< \brief (PIOE) Set Output Data Register */
+#define REG_PIOE_CODR REG_ACCESS(WoReg, 0x400E1634U) /**< \brief (PIOE) Clear Output Data Register */
+#define REG_PIOE_ODSR REG_ACCESS(RwReg, 0x400E1638U) /**< \brief (PIOE) Output Data Status Register */
+#define REG_PIOE_PDSR REG_ACCESS(RoReg, 0x400E163CU) /**< \brief (PIOE) Pin Data Status Register */
+#define REG_PIOE_IER REG_ACCESS(WoReg, 0x400E1640U) /**< \brief (PIOE) Interrupt Enable Register */
+#define REG_PIOE_IDR REG_ACCESS(WoReg, 0x400E1644U) /**< \brief (PIOE) Interrupt Disable Register */
+#define REG_PIOE_IMR REG_ACCESS(RoReg, 0x400E1648U) /**< \brief (PIOE) Interrupt Mask Register */
+#define REG_PIOE_ISR REG_ACCESS(RoReg, 0x400E164CU) /**< \brief (PIOE) Interrupt Status Register */
+#define REG_PIOE_MDER REG_ACCESS(WoReg, 0x400E1650U) /**< \brief (PIOE) Multi-driver Enable Register */
+#define REG_PIOE_MDDR REG_ACCESS(WoReg, 0x400E1654U) /**< \brief (PIOE) Multi-driver Disable Register */
+#define REG_PIOE_MDSR REG_ACCESS(RoReg, 0x400E1658U) /**< \brief (PIOE) Multi-driver Status Register */
+#define REG_PIOE_PUDR REG_ACCESS(WoReg, 0x400E1660U) /**< \brief (PIOE) Pull-up Disable Register */
+#define REG_PIOE_PUER REG_ACCESS(WoReg, 0x400E1664U) /**< \brief (PIOE) Pull-up Enable Register */
+#define REG_PIOE_PUSR REG_ACCESS(RoReg, 0x400E1668U) /**< \brief (PIOE) Pad Pull-up Status Register */
+#define REG_PIOE_ABSR REG_ACCESS(RwReg, 0x400E1670U) /**< \brief (PIOE) Peripheral AB Select Register */
+#define REG_PIOE_SCIFSR REG_ACCESS(WoReg, 0x400E1680U) /**< \brief (PIOE) System Clock Glitch Input Filter Select Register */
+#define REG_PIOE_DIFSR REG_ACCESS(WoReg, 0x400E1684U) /**< \brief (PIOE) Debouncing Input Filter Select Register */
+#define REG_PIOE_IFDGSR REG_ACCESS(RoReg, 0x400E1688U) /**< \brief (PIOE) Glitch or Debouncing Input Filter Clock Selection Status Register */
+#define REG_PIOE_SCDR REG_ACCESS(RwReg, 0x400E168CU) /**< \brief (PIOE) Slow Clock Divider Debouncing Register */
+#define REG_PIOE_OWER REG_ACCESS(WoReg, 0x400E16A0U) /**< \brief (PIOE) Output Write Enable */
+#define REG_PIOE_OWDR REG_ACCESS(WoReg, 0x400E16A4U) /**< \brief (PIOE) Output Write Disable */
+#define REG_PIOE_OWSR REG_ACCESS(RoReg, 0x400E16A8U) /**< \brief (PIOE) Output Write Status Register */
+#define REG_PIOE_AIMER REG_ACCESS(WoReg, 0x400E16B0U) /**< \brief (PIOE) Additional Interrupt Modes Enable Register */
+#define REG_PIOE_AIMDR REG_ACCESS(WoReg, 0x400E16B4U) /**< \brief (PIOE) Additional Interrupt Modes Disables Register */
+#define REG_PIOE_AIMMR REG_ACCESS(RoReg, 0x400E16B8U) /**< \brief (PIOE) Additional Interrupt Modes Mask Register */
+#define REG_PIOE_ESR REG_ACCESS(WoReg, 0x400E16C0U) /**< \brief (PIOE) Edge Select Register */
+#define REG_PIOE_LSR REG_ACCESS(WoReg, 0x400E16C4U) /**< \brief (PIOE) Level Select Register */
+#define REG_PIOE_ELSR REG_ACCESS(RoReg, 0x400E16C8U) /**< \brief (PIOE) Edge/Level Status Register */
+#define REG_PIOE_FELLSR REG_ACCESS(WoReg, 0x400E16D0U) /**< \brief (PIOE) Falling Edge/Low Level Select Register */
+#define REG_PIOE_REHLSR REG_ACCESS(WoReg, 0x400E16D4U) /**< \brief (PIOE) Rising Edge/ High Level Select Register */
+#define REG_PIOE_FRLHSR REG_ACCESS(RoReg, 0x400E16D8U) /**< \brief (PIOE) Fall/Rise - Low/High Status Register */
+#define REG_PIOE_LOCKSR REG_ACCESS(RoReg, 0x400E16E0U) /**< \brief (PIOE) Lock Status */
+#define REG_PIOE_WPMR REG_ACCESS(RwReg, 0x400E16E4U) /**< \brief (PIOE) Write Protect Mode Register */
+#define REG_PIOE_WPSR REG_ACCESS(RoReg, 0x400E16E8U) /**< \brief (PIOE) Write Protect Status Register */
+/* ========== Register definition for PIOF peripheral ========== */
+#define REG_PIOF_PER REG_ACCESS(WoReg, 0x400E1800U) /**< \brief (PIOF) PIO Enable Register */
+#define REG_PIOF_PDR REG_ACCESS(WoReg, 0x400E1804U) /**< \brief (PIOF) PIO Disable Register */
+#define REG_PIOF_PSR REG_ACCESS(RoReg, 0x400E1808U) /**< \brief (PIOF) PIO Status Register */
+#define REG_PIOF_OER REG_ACCESS(WoReg, 0x400E1810U) /**< \brief (PIOF) Output Enable Register */
+#define REG_PIOF_ODR REG_ACCESS(WoReg, 0x400E1814U) /**< \brief (PIOF) Output Disable Register */
+#define REG_PIOF_OSR REG_ACCESS(RoReg, 0x400E1818U) /**< \brief (PIOF) Output Status Register */
+#define REG_PIOF_IFER REG_ACCESS(WoReg, 0x400E1820U) /**< \brief (PIOF) Glitch Input Filter Enable Register */
+#define REG_PIOF_IFDR REG_ACCESS(WoReg, 0x400E1824U) /**< \brief (PIOF) Glitch Input Filter Disable Register */
+#define REG_PIOF_IFSR REG_ACCESS(RoReg, 0x400E1828U) /**< \brief (PIOF) Glitch Input Filter Status Register */
+#define REG_PIOF_SODR REG_ACCESS(WoReg, 0x400E1830U) /**< \brief (PIOF) Set Output Data Register */
+#define REG_PIOF_CODR REG_ACCESS(WoReg, 0x400E1834U) /**< \brief (PIOF) Clear Output Data Register */
+#define REG_PIOF_ODSR REG_ACCESS(RwReg, 0x400E1838U) /**< \brief (PIOF) Output Data Status Register */
+#define REG_PIOF_PDSR REG_ACCESS(RoReg, 0x400E183CU) /**< \brief (PIOF) Pin Data Status Register */
+#define REG_PIOF_IER REG_ACCESS(WoReg, 0x400E1840U) /**< \brief (PIOF) Interrupt Enable Register */
+#define REG_PIOF_IDR REG_ACCESS(WoReg, 0x400E1844U) /**< \brief (PIOF) Interrupt Disable Register */
+#define REG_PIOF_IMR REG_ACCESS(RoReg, 0x400E1848U) /**< \brief (PIOF) Interrupt Mask Register */
+#define REG_PIOF_ISR REG_ACCESS(RoReg, 0x400E184CU) /**< \brief (PIOF) Interrupt Status Register */
+#define REG_PIOF_MDER REG_ACCESS(WoReg, 0x400E1850U) /**< \brief (PIOF) Multi-driver Enable Register */
+#define REG_PIOF_MDDR REG_ACCESS(WoReg, 0x400E1854U) /**< \brief (PIOF) Multi-driver Disable Register */
+#define REG_PIOF_MDSR REG_ACCESS(RoReg, 0x400E1858U) /**< \brief (PIOF) Multi-driver Status Register */
+#define REG_PIOF_PUDR REG_ACCESS(WoReg, 0x400E1860U) /**< \brief (PIOF) Pull-up Disable Register */
+#define REG_PIOF_PUER REG_ACCESS(WoReg, 0x400E1864U) /**< \brief (PIOF) Pull-up Enable Register */
+#define REG_PIOF_PUSR REG_ACCESS(RoReg, 0x400E1868U) /**< \brief (PIOF) Pad Pull-up Status Register */
+#define REG_PIOF_ABSR REG_ACCESS(RwReg, 0x400E1870U) /**< \brief (PIOF) Peripheral AB Select Register */
+#define REG_PIOF_SCIFSR REG_ACCESS(WoReg, 0x400E1880U) /**< \brief (PIOF) System Clock Glitch Input Filter Select Register */
+#define REG_PIOF_DIFSR REG_ACCESS(WoReg, 0x400E1884U) /**< \brief (PIOF) Debouncing Input Filter Select Register */
+#define REG_PIOF_IFDGSR REG_ACCESS(RoReg, 0x400E1888U) /**< \brief (PIOF) Glitch or Debouncing Input Filter Clock Selection Status Register */
+#define REG_PIOF_SCDR REG_ACCESS(RwReg, 0x400E188CU) /**< \brief (PIOF) Slow Clock Divider Debouncing Register */
+#define REG_PIOF_OWER REG_ACCESS(WoReg, 0x400E18A0U) /**< \brief (PIOF) Output Write Enable */
+#define REG_PIOF_OWDR REG_ACCESS(WoReg, 0x400E18A4U) /**< \brief (PIOF) Output Write Disable */
+#define REG_PIOF_OWSR REG_ACCESS(RoReg, 0x400E18A8U) /**< \brief (PIOF) Output Write Status Register */
+#define REG_PIOF_AIMER REG_ACCESS(WoReg, 0x400E18B0U) /**< \brief (PIOF) Additional Interrupt Modes Enable Register */
+#define REG_PIOF_AIMDR REG_ACCESS(WoReg, 0x400E18B4U) /**< \brief (PIOF) Additional Interrupt Modes Disables Register */
+#define REG_PIOF_AIMMR REG_ACCESS(RoReg, 0x400E18B8U) /**< \brief (PIOF) Additional Interrupt Modes Mask Register */
+#define REG_PIOF_ESR REG_ACCESS(WoReg, 0x400E18C0U) /**< \brief (PIOF) Edge Select Register */
+#define REG_PIOF_LSR REG_ACCESS(WoReg, 0x400E18C4U) /**< \brief (PIOF) Level Select Register */
+#define REG_PIOF_ELSR REG_ACCESS(RoReg, 0x400E18C8U) /**< \brief (PIOF) Edge/Level Status Register */
+#define REG_PIOF_FELLSR REG_ACCESS(WoReg, 0x400E18D0U) /**< \brief (PIOF) Falling Edge/Low Level Select Register */
+#define REG_PIOF_REHLSR REG_ACCESS(WoReg, 0x400E18D4U) /**< \brief (PIOF) Rising Edge/ High Level Select Register */
+#define REG_PIOF_FRLHSR REG_ACCESS(RoReg, 0x400E18D8U) /**< \brief (PIOF) Fall/Rise - Low/High Status Register */
+#define REG_PIOF_LOCKSR REG_ACCESS(RoReg, 0x400E18E0U) /**< \brief (PIOF) Lock Status */
+#define REG_PIOF_WPMR REG_ACCESS(RwReg, 0x400E18E4U) /**< \brief (PIOF) Write Protect Mode Register */
+#define REG_PIOF_WPSR REG_ACCESS(RoReg, 0x400E18E8U) /**< \brief (PIOF) Write Protect Status Register */
+/* ========== Register definition for RSTC peripheral ========== */
+#define REG_RSTC_CR REG_ACCESS(WoReg, 0x400E1A00U) /**< \brief (RSTC) Control Register */
+#define REG_RSTC_SR REG_ACCESS(RoReg, 0x400E1A04U) /**< \brief (RSTC) Status Register */
+#define REG_RSTC_MR REG_ACCESS(RwReg, 0x400E1A08U) /**< \brief (RSTC) Mode Register */
+/* ========== Register definition for SUPC peripheral ========== */
+#define REG_SUPC_CR REG_ACCESS(WoReg, 0x400E1A10U) /**< \brief (SUPC) Supply Controller Control Register */
+#define REG_SUPC_SMMR REG_ACCESS(RwReg, 0x400E1A14U) /**< \brief (SUPC) Supply Controller Supply Monitor Mode Register */
+#define REG_SUPC_MR REG_ACCESS(RwReg, 0x400E1A18U) /**< \brief (SUPC) Supply Controller Mode Register */
+#define REG_SUPC_WUMR REG_ACCESS(RwReg, 0x400E1A1CU) /**< \brief (SUPC) Supply Controller Wake Up Mode Register */
+#define REG_SUPC_WUIR REG_ACCESS(RwReg, 0x400E1A20U) /**< \brief (SUPC) Supply Controller Wake Up Inputs Register */
+#define REG_SUPC_SR REG_ACCESS(RoReg, 0x400E1A24U) /**< \brief (SUPC) Supply Controller Status Register */
+/* ========== Register definition for RTT peripheral ========== */
+#define REG_RTT_MR REG_ACCESS(RwReg, 0x400E1A30U) /**< \brief (RTT) Mode Register */
+#define REG_RTT_AR REG_ACCESS(RwReg, 0x400E1A34U) /**< \brief (RTT) Alarm Register */
+#define REG_RTT_VR REG_ACCESS(RoReg, 0x400E1A38U) /**< \brief (RTT) Value Register */
+#define REG_RTT_SR REG_ACCESS(RoReg, 0x400E1A3CU) /**< \brief (RTT) Status Register */
+/* ========== Register definition for WDT peripheral ========== */
+#define REG_WDT_CR REG_ACCESS(WoReg, 0x400E1A50U) /**< \brief (WDT) Control Register */
+#define REG_WDT_MR REG_ACCESS(RwReg, 0x400E1A54U) /**< \brief (WDT) Mode Register */
+#define REG_WDT_SR REG_ACCESS(RoReg, 0x400E1A58U) /**< \brief (WDT) Status Register */
+/* ========== Register definition for RTC peripheral ========== */
+#define REG_RTC_CR REG_ACCESS(RwReg, 0x400E1A60U) /**< \brief (RTC) Control Register */
+#define REG_RTC_MR REG_ACCESS(RwReg, 0x400E1A64U) /**< \brief (RTC) Mode Register */
+#define REG_RTC_TIMR REG_ACCESS(RwReg, 0x400E1A68U) /**< \brief (RTC) Time Register */
+#define REG_RTC_CALR REG_ACCESS(RwReg, 0x400E1A6CU) /**< \brief (RTC) Calendar Register */
+#define REG_RTC_TIMALR REG_ACCESS(RwReg, 0x400E1A70U) /**< \brief (RTC) Time Alarm Register */
+#define REG_RTC_CALALR REG_ACCESS(RwReg, 0x400E1A74U) /**< \brief (RTC) Calendar Alarm Register */
+#define REG_RTC_SR REG_ACCESS(RoReg, 0x400E1A78U) /**< \brief (RTC) Status Register */
+#define REG_RTC_SCCR REG_ACCESS(WoReg, 0x400E1A7CU) /**< \brief (RTC) Status Clear Command Register */
+#define REG_RTC_IER REG_ACCESS(WoReg, 0x400E1A80U) /**< \brief (RTC) Interrupt Enable Register */
+#define REG_RTC_IDR REG_ACCESS(WoReg, 0x400E1A84U) /**< \brief (RTC) Interrupt Disable Register */
+#define REG_RTC_IMR REG_ACCESS(RoReg, 0x400E1A88U) /**< \brief (RTC) Interrupt Mask Register */
+#define REG_RTC_VER REG_ACCESS(RoReg, 0x400E1A8CU) /**< \brief (RTC) Valid Entry Register */
+#define REG_RTC_WPMR REG_ACCESS(RwReg, 0x400E1B44U) /**< \brief (RTC) Write Protect Mode Register */
+/* ========== Register definition for GPBR peripheral ========== */
+#define REG_GPBR_GPBR0 REG_ACCESS(RwReg, 0x400E1A90U) /**< \brief (GPBR) General Purpose Backup Register 0 */
+#define REG_GPBR_GPBR1 REG_ACCESS(RwReg, 0x400E1A94U) /**< \brief (GPBR) General Purpose Backup Register 1 */
+#define REG_GPBR_GPBR2 REG_ACCESS(RwReg, 0x400E1A98U) /**< \brief (GPBR) General Purpose Backup Register 2 */
+#define REG_GPBR_GPBR3 REG_ACCESS(RwReg, 0x400E1A9CU) /**< \brief (GPBR) General Purpose Backup Register 3 */
+#define REG_GPBR_GPBR4 REG_ACCESS(RwReg, 0x400E1AA0U) /**< \brief (GPBR) General Purpose Backup Register 4 */
+#define REG_GPBR_GPBR5 REG_ACCESS(RwReg, 0x400E1AA4U) /**< \brief (GPBR) General Purpose Backup Register 5 */
+#define REG_GPBR_GPBR6 REG_ACCESS(RwReg, 0x400E1AA8U) /**< \brief (GPBR) General Purpose Backup Register 6 */
+#define REG_GPBR_GPBR7 REG_ACCESS(RwReg, 0x400E1AACU) /**< \brief (GPBR) General Purpose Backup Register 7 */
+/*@}*/
+
+/* ************************************************************************** */
+/* PERIPHERAL ID DEFINITIONS FOR SAM3XA */
+/* ************************************************************************** */
+/** \addtogroup SAM3XA_id Peripheral Ids Definitions */
+/*@{*/
+
+#define ID_SUPC ( 0) /**< \brief Supply Controller (SUPC) */
+#define ID_RSTC ( 1) /**< \brief Reset Controller (RSTC) */
+#define ID_RTC ( 2) /**< \brief Real Time Clock (RTC) */
+#define ID_RTT ( 3) /**< \brief Real Time Timer (RTT) */
+#define ID_WDT ( 4) /**< \brief Watchdog Timer (WDT) */
+#define ID_PMC ( 5) /**< \brief Power Management Controller (PMC) */
+#define ID_EFC0 ( 6) /**< \brief Enhanced Flash Controller 0 (EFC0) */
+#define ID_EFC1 ( 7) /**< \brief Enhanced Flash Controller 1 (EFC1) */
+#define ID_UART ( 8) /**< \brief Universal Asynchronous Receiver Transceiver (UART) */
+#define ID_SMC ( 9) /**< \brief Static Memory Controller (SMC) */
+#define ID_SDRAMC (10) /**< \brief Synchronous Dynamic RAM Controller (SDRAMC) */
+#define ID_PIOA (11) /**< \brief Parallel I/O Controller A, (PIOA) */
+#define ID_PIOB (12) /**< \brief Parallel I/O Controller B (PIOB) */
+#define ID_PIOC (13) /**< \brief Parallel I/O Controller C (PIOC) */
+#define ID_PIOD (14) /**< \brief Parallel I/O Controller D (PIOD) */
+#define ID_PIOE (15) /**< \brief Parallel I/O Controller E (PIOE) */
+#define ID_PIOF (16) /**< \brief Parallel I/O Controller F (PIOF) */
+#define ID_USART0 (17) /**< \brief USART 0 (USART0) */
+#define ID_USART1 (18) /**< \brief USART 1 (USART1) */
+#define ID_USART2 (19) /**< \brief USART 2 (USART2) */
+#define ID_USART3 (20) /**< \brief USART 3 (USART3) */
+#define ID_HSMCI (21) /**< \brief Multimedia Card Interface (HSMCI) */
+#define ID_TWI0 (22) /**< \brief Two-Wire Interface 0 (TWI0) */
+#define ID_TWI1 (23) /**< \brief Two-Wire Interface 1 (TWI1) */
+#define ID_SPI0 (24) /**< \brief Serial Peripheral Interface (SPI0) */
+#define ID_SPI1 (25) /**< \brief Serial Peripheral Interface (SPI1) */
+#define ID_SSC (26) /**< \brief Synchronous Serial Controller (SSC) */
+#define ID_TC0 (27) /**< \brief Timer Counter 0 (TC0) */
+#define ID_TC1 (28) /**< \brief Timer Counter 1 (TC1) */
+#define ID_TC2 (29) /**< \brief Timer Counter 2 (TC2) */
+#define ID_TC3 (30) /**< \brief Timer Counter 3 (TC3) */
+#define ID_TC4 (31) /**< \brief Timer Counter 4 (TC4) */
+#define ID_TC5 (32) /**< \brief Timer Counter 5 (TC5) */
+#define ID_TC6 (33) /**< \brief Timer Counter 6 (TC6) */
+#define ID_TC7 (34) /**< \brief Timer Counter 7 (TC7) */
+#define ID_TC8 (35) /**< \brief Timer Counter 8 (TC8) */
+#define ID_PWM (36) /**< \brief Pulse Width Modulation Controller (PWM) */
+#define ID_ADC (37) /**< \brief ADC Controller (ADC) */
+#define ID_DACC (38) /**< \brief DAC Controller (DACC) */
+#define ID_DMAC (39) /**< \brief DMA Controller (DMAC) */
+#define ID_UOTGHS (40) /**< \brief USB OTG High Speed (UOTGHS) */
+#define ID_TRNG (41) /**< \brief True Random Number Generator (TRNG) */
+#define ID_EMAC (42) /**< \brief Ethernet MAC (EMAC) */
+#define ID_CAN0 (43) /**< \brief CAN Controller 0 (CAN0) */
+#define ID_CAN1 (44) /**< \brief CAN Controller 1 (CAN1) */
+/*@}*/
+
+/* ************************************************************************** */
+/* BASE ADDRESS DEFINITIONS FOR SAM3XA */
+/* ************************************************************************** */
+/** \addtogroup SAM3XA_base Peripheral Base Address Definitions */
+/*@{*/
+
+#define HSMCI CAST(Hsmci , 0x40000000U) /**< \brief (HSMCI ) Base Address */
+#define SSC CAST(Ssc , 0x40004000U) /**< \brief (SSC ) Base Address */
+#define SPI0 CAST(Spi , 0x40008000U) /**< \brief (SPI0 ) Base Address */
+#define SPI1 CAST(Spi , 0x4000C000U) /**< \brief (SPI1 ) Base Address */
+#define TC0 CAST(Tc , 0x40080000U) /**< \brief (TC0 ) Base Address */
+#define TC1 CAST(Tc , 0x40084000U) /**< \brief (TC1 ) Base Address */
+#define TC2 CAST(Tc , 0x40088000U) /**< \brief (TC2 ) Base Address */
+#define TWI0 CAST(Twi , 0x4008C000U) /**< \brief (TWI0 ) Base Address */
+#define PDC_TWI0 CAST(Pdc , 0x4008C100U) /**< \brief (PDC_TWI0 ) Base Address */
+#define TWI1 CAST(Twi , 0x40090000U) /**< \brief (TWI1 ) Base Address */
+#define PDC_TWI1 CAST(Pdc , 0x40090100U) /**< \brief (PDC_TWI1 ) Base Address */
+#define PWM CAST(Pwm , 0x40094000U) /**< \brief (PWM ) Base Address */
+#define PDC_PWM CAST(Pdc , 0x40094100U) /**< \brief (PDC_PWM ) Base Address */
+#define USART0 CAST(Usart , 0x40098000U) /**< \brief (USART0 ) Base Address */
+#define PDC_USART0 CAST(Pdc , 0x40098100U) /**< \brief (PDC_USART0) Base Address */
+#define USART1 CAST(Usart , 0x4009C000U) /**< \brief (USART1 ) Base Address */
+#define PDC_USART1 CAST(Pdc , 0x4009C100U) /**< \brief (PDC_USART1) Base Address */
+#define USART2 CAST(Usart , 0x400A0000U) /**< \brief (USART2 ) Base Address */
+#define PDC_USART2 CAST(Pdc , 0x400A0100U) /**< \brief (PDC_USART2) Base Address */
+#define USART3 CAST(Usart , 0x400A4000U) /**< \brief (USART3 ) Base Address */
+#define PDC_USART3 CAST(Pdc , 0x400A4100U) /**< \brief (PDC_USART3) Base Address */
+#define UOTGHS CAST(Uotghs , 0x400AC000U) /**< \brief (UOTGHS ) Base Address */
+#define EMAC CAST(Emac , 0x400B0000U) /**< \brief (EMAC ) Base Address */
+#define CAN0 CAST(Can , 0x400B4000U) /**< \brief (CAN0 ) Base Address */
+#define CAN1 CAST(Can , 0x400B8000U) /**< \brief (CAN1 ) Base Address */
+#define TRNG CAST(Trng , 0x400BC000U) /**< \brief (TRNG ) Base Address */
+#define ADC CAST(Adc , 0x400C0000U) /**< \brief (ADC ) Base Address */
+#define PDC_ADC CAST(Pdc , 0x400C0100U) /**< \brief (PDC_ADC ) Base Address */
+#define DMAC CAST(Dmac , 0x400C4000U) /**< \brief (DMAC ) Base Address */
+#define DACC CAST(Dacc , 0x400C8000U) /**< \brief (DACC ) Base Address */
+#define PDC_DACC CAST(Pdc , 0x400C8100U) /**< \brief (PDC_DACC ) Base Address */
+#define SMC CAST(Smc , 0x400E0000U) /**< \brief (SMC ) Base Address */
+#define SDRAMC CAST(Sdramc , 0x400E0200U) /**< \brief (SDRAMC ) Base Address */
+#define MATRIX CAST(Matrix , 0x400E0400U) /**< \brief (MATRIX ) Base Address */
+#define PMC CAST(Pmc , 0x400E0600U) /**< \brief (PMC ) Base Address */
+#define UART CAST(Uart , 0x400E0800U) /**< \brief (UART ) Base Address */
+#define PDC_UART CAST(Pdc , 0x400E0900U) /**< \brief (PDC_UART ) Base Address */
+#define CHIPID CAST(Chipid , 0x400E0940U) /**< \brief (CHIPID ) Base Address */
+#define EFC0 CAST(Efc , 0x400E0A00U) /**< \brief (EFC0 ) Base Address */
+#define EFC1 CAST(Efc , 0x400E0C00U) /**< \brief (EFC1 ) Base Address */
+#define PIOA CAST(Pio , 0x400E0E00U) /**< \brief (PIOA ) Base Address */
+#define PIOB CAST(Pio , 0x400E1000U) /**< \brief (PIOB ) Base Address */
+#define PIOC CAST(Pio , 0x400E1200U) /**< \brief (PIOC ) Base Address */
+#define PIOD CAST(Pio , 0x400E1400U) /**< \brief (PIOD ) Base Address */
+#define PIOE CAST(Pio , 0x400E1600U) /**< \brief (PIOE ) Base Address */
+#define PIOF CAST(Pio , 0x400E1800U) /**< \brief (PIOF ) Base Address */
+#define RSTC CAST(Rstc , 0x400E1A00U) /**< \brief (RSTC ) Base Address */
+#define SUPC CAST(Supc , 0x400E1A10U) /**< \brief (SUPC ) Base Address */
+#define RTT CAST(Rtt , 0x400E1A30U) /**< \brief (RTT ) Base Address */
+#define WDT CAST(Wdt , 0x400E1A50U) /**< \brief (WDT ) Base Address */
+#define RTC CAST(Rtc , 0x400E1A60U) /**< \brief (RTC ) Base Address */
+#define GPBR CAST(Gpbr , 0x400E1A90U) /**< \brief (GPBR ) Base Address */
+/*@}*/
+
+/* ************************************************************************** */
+/* PIO DEFINITIONS FOR SAM3XA */
+/* ************************************************************************** */
+/** \addtogroup SAM3XA_pio Peripheral Pio Definitions */
+/*@{*/
+
+#define PIO_PA0 (1u << 0) /**< \brief Pin Controlled by PA0 */
+#define PIO_PA1 (1u << 1) /**< \brief Pin Controlled by PA1 */
+#define PIO_PA2 (1u << 2) /**< \brief Pin Controlled by PA2 */
+#define PIO_PA3 (1u << 3) /**< \brief Pin Controlled by PA3 */
+#define PIO_PA4 (1u << 4) /**< \brief Pin Controlled by PA4 */
+#define PIO_PA5 (1u << 5) /**< \brief Pin Controlled by PA5 */
+#define PIO_PA6 (1u << 6) /**< \brief Pin Controlled by PA6 */
+#define PIO_PA7 (1u << 7) /**< \brief Pin Controlled by PA7 */
+#define PIO_PA8 (1u << 8) /**< \brief Pin Controlled by PA8 */
+#define PIO_PA9 (1u << 9) /**< \brief Pin Controlled by PA9 */
+#define PIO_PA10 (1u << 10) /**< \brief Pin Controlled by PA10 */
+#define PIO_PA11 (1u << 11) /**< \brief Pin Controlled by PA11 */
+#define PIO_PA12 (1u << 12) /**< \brief Pin Controlled by PA12 */
+#define PIO_PA13 (1u << 13) /**< \brief Pin Controlled by PA13 */
+#define PIO_PA14 (1u << 14) /**< \brief Pin Controlled by PA14 */
+#define PIO_PA15 (1u << 15) /**< \brief Pin Controlled by PA15 */
+#define PIO_PA16 (1u << 16) /**< \brief Pin Controlled by PA16 */
+#define PIO_PA17 (1u << 17) /**< \brief Pin Controlled by PA17 */
+#define PIO_PA18 (1u << 18) /**< \brief Pin Controlled by PA18 */
+#define PIO_PA19 (1u << 19) /**< \brief Pin Controlled by PA19 */
+#define PIO_PA20 (1u << 20) /**< \brief Pin Controlled by PA20 */
+#define PIO_PA21 (1u << 21) /**< \brief Pin Controlled by PA21 */
+#define PIO_PA22 (1u << 22) /**< \brief Pin Controlled by PA22 */
+#define PIO_PA23 (1u << 23) /**< \brief Pin Controlled by PA23 */
+#define PIO_PA24 (1u << 24) /**< \brief Pin Controlled by PA24 */
+#define PIO_PA25 (1u << 25) /**< \brief Pin Controlled by PA25 */
+#define PIO_PA26 (1u << 26) /**< \brief Pin Controlled by PA26 */
+#define PIO_PA27 (1u << 27) /**< \brief Pin Controlled by PA27 */
+#define PIO_PA28 (1u << 28) /**< \brief Pin Controlled by PA28 */
+#define PIO_PA29 (1u << 29) /**< \brief Pin Controlled by PA29 */
+#define PIO_PA30 (1u << 30) /**< \brief Pin Controlled by PA30 */
+#define PIO_PA31 (1u << 31) /**< \brief Pin Controlled by PA31 */
+#define PIO_PB0 (1u << 0) /**< \brief Pin Controlled by PB0 */
+#define PIO_PB1 (1u << 1) /**< \brief Pin Controlled by PB1 */
+#define PIO_PB2 (1u << 2) /**< \brief Pin Controlled by PB2 */
+#define PIO_PB3 (1u << 3) /**< \brief Pin Controlled by PB3 */
+#define PIO_PB4 (1u << 4) /**< \brief Pin Controlled by PB4 */
+#define PIO_PB5 (1u << 5) /**< \brief Pin Controlled by PB5 */
+#define PIO_PB6 (1u << 6) /**< \brief Pin Controlled by PB6 */
+#define PIO_PB7 (1u << 7) /**< \brief Pin Controlled by PB7 */
+#define PIO_PB8 (1u << 8) /**< \brief Pin Controlled by PB8 */
+#define PIO_PB9 (1u << 9) /**< \brief Pin Controlled by PB9 */
+#define PIO_PB10 (1u << 10) /**< \brief Pin Controlled by PB10 */
+#define PIO_PB11 (1u << 11) /**< \brief Pin Controlled by PB11 */
+#define PIO_PB12 (1u << 12) /**< \brief Pin Controlled by PB12 */
+#define PIO_PB13 (1u << 13) /**< \brief Pin Controlled by PB13 */
+#define PIO_PB14 (1u << 14) /**< \brief Pin Controlled by PB14 */
+#define PIO_PB15 (1u << 15) /**< \brief Pin Controlled by PB15 */
+#define PIO_PB16 (1u << 16) /**< \brief Pin Controlled by PB16 */
+#define PIO_PB17 (1u << 17) /**< \brief Pin Controlled by PB17 */
+#define PIO_PB18 (1u << 18) /**< \brief Pin Controlled by PB18 */
+#define PIO_PB19 (1u << 19) /**< \brief Pin Controlled by PB19 */
+#define PIO_PB20 (1u << 20) /**< \brief Pin Controlled by PB20 */
+#define PIO_PB21 (1u << 21) /**< \brief Pin Controlled by PB21 */
+#define PIO_PB22 (1u << 22) /**< \brief Pin Controlled by PB22 */
+#define PIO_PB23 (1u << 23) /**< \brief Pin Controlled by PB23 */
+#define PIO_PB24 (1u << 24) /**< \brief Pin Controlled by PB24 */
+#define PIO_PB25 (1u << 25) /**< \brief Pin Controlled by PB25 */
+#define PIO_PB26 (1u << 26) /**< \brief Pin Controlled by PB26 */
+#define PIO_PB27 (1u << 27) /**< \brief Pin Controlled by PB27 */
+#define PIO_PB28 (1u << 28) /**< \brief Pin Controlled by PB28 */
+#define PIO_PB29 (1u << 29) /**< \brief Pin Controlled by PB29 */
+#define PIO_PB30 (1u << 30) /**< \brief Pin Controlled by PB30 */
+#define PIO_PB31 (1u << 31) /**< \brief Pin Controlled by PB31 */
+#define PIO_PC0 (1u << 0) /**< \brief Pin Controlled by PC0 */
+#define PIO_PC1 (1u << 1) /**< \brief Pin Controlled by PC1 */
+#define PIO_PC2 (1u << 2) /**< \brief Pin Controlled by PC2 */
+#define PIO_PC3 (1u << 3) /**< \brief Pin Controlled by PC3 */
+#define PIO_PC4 (1u << 4) /**< \brief Pin Controlled by PC4 */
+#define PIO_PC5 (1u << 5) /**< \brief Pin Controlled by PC5 */
+#define PIO_PC6 (1u << 6) /**< \brief Pin Controlled by PC6 */
+#define PIO_PC7 (1u << 7) /**< \brief Pin Controlled by PC7 */
+#define PIO_PC8 (1u << 8) /**< \brief Pin Controlled by PC8 */
+#define PIO_PC9 (1u << 9) /**< \brief Pin Controlled by PC9 */
+#define PIO_PC10 (1u << 10) /**< \brief Pin Controlled by PC10 */
+#define PIO_PC11 (1u << 11) /**< \brief Pin Controlled by PC11 */
+#define PIO_PC12 (1u << 12) /**< \brief Pin Controlled by PC12 */
+#define PIO_PC13 (1u << 13) /**< \brief Pin Controlled by PC13 */
+#define PIO_PC14 (1u << 14) /**< \brief Pin Controlled by PC14 */
+#define PIO_PC15 (1u << 15) /**< \brief Pin Controlled by PC15 */
+#define PIO_PC16 (1u << 16) /**< \brief Pin Controlled by PC16 */
+#define PIO_PC17 (1u << 17) /**< \brief Pin Controlled by PC17 */
+#define PIO_PC18 (1u << 18) /**< \brief Pin Controlled by PC18 */
+#define PIO_PC19 (1u << 19) /**< \brief Pin Controlled by PC19 */
+#define PIO_PC20 (1u << 20) /**< \brief Pin Controlled by PC20 */
+#define PIO_PC21 (1u << 21) /**< \brief Pin Controlled by PC21 */
+#define PIO_PC22 (1u << 22) /**< \brief Pin Controlled by PC22 */
+#define PIO_PC23 (1u << 23) /**< \brief Pin Controlled by PC23 */
+#define PIO_PC24 (1u << 24) /**< \brief Pin Controlled by PC24 */
+#define PIO_PC25 (1u << 25) /**< \brief Pin Controlled by PC25 */
+#define PIO_PC26 (1u << 26) /**< \brief Pin Controlled by PC26 */
+#define PIO_PC27 (1u << 27) /**< \brief Pin Controlled by PC27 */
+#define PIO_PC28 (1u << 28) /**< \brief Pin Controlled by PC28 */
+#define PIO_PC29 (1u << 29) /**< \brief Pin Controlled by PC29 */
+#define PIO_PC30 (1u << 30) /**< \brief Pin Controlled by PC30 */
+#define PIO_PD0 (1u << 0) /**< \brief Pin Controlled by PD0 */
+#define PIO_PD1 (1u << 1) /**< \brief Pin Controlled by PD1 */
+#define PIO_PD2 (1u << 2) /**< \brief Pin Controlled by PD2 */
+#define PIO_PD3 (1u << 3) /**< \brief Pin Controlled by PD3 */
+#define PIO_PD4 (1u << 4) /**< \brief Pin Controlled by PD4 */
+#define PIO_PD5 (1u << 5) /**< \brief Pin Controlled by PD5 */
+#define PIO_PD6 (1u << 6) /**< \brief Pin Controlled by PD6 */
+#define PIO_PD7 (1u << 7) /**< \brief Pin Controlled by PD7 */
+#define PIO_PD8 (1u << 8) /**< \brief Pin Controlled by PD8 */
+#define PIO_PD9 (1u << 9) /**< \brief Pin Controlled by PD9 */
+#define PIO_PD10 (1u << 10) /**< \brief Pin Controlled by PD10 */
+#define PIO_PD11 (1u << 11) /**< \brief Pin Controlled by PD11 */
+#define PIO_PD12 (1u << 12) /**< \brief Pin Controlled by PD12 */
+#define PIO_PD13 (1u << 13) /**< \brief Pin Controlled by PD13 */
+#define PIO_PD14 (1u << 14) /**< \brief Pin Controlled by PD14 */
+#define PIO_PD15 (1u << 15) /**< \brief Pin Controlled by PD15 */
+#define PIO_PD16 (1u << 16) /**< \brief Pin Controlled by PD16 */
+#define PIO_PD17 (1u << 17) /**< \brief Pin Controlled by PD17 */
+#define PIO_PD18 (1u << 18) /**< \brief Pin Controlled by PD18 */
+#define PIO_PD19 (1u << 19) /**< \brief Pin Controlled by PD19 */
+#define PIO_PD20 (1u << 20) /**< \brief Pin Controlled by PD20 */
+#define PIO_PD21 (1u << 21) /**< \brief Pin Controlled by PD21 */
+#define PIO_PD22 (1u << 22) /**< \brief Pin Controlled by PD22 */
+#define PIO_PD23 (1u << 23) /**< \brief Pin Controlled by PD23 */
+#define PIO_PD24 (1u << 24) /**< \brief Pin Controlled by PD24 */
+#define PIO_PD25 (1u << 25) /**< \brief Pin Controlled by PD25 */
+#define PIO_PD26 (1u << 26) /**< \brief Pin Controlled by PD26 */
+#define PIO_PD27 (1u << 27) /**< \brief Pin Controlled by PD27 */
+#define PIO_PD28 (1u << 28) /**< \brief Pin Controlled by PD28 */
+#define PIO_PD29 (1u << 29) /**< \brief Pin Controlled by PD29 */
+#define PIO_PD30 (1u << 30) /**< \brief Pin Controlled by PD30 */
+#define PIO_PE0 (1u << 0) /**< \brief Pin Controlled by PE0 */
+#define PIO_PE1 (1u << 1) /**< \brief Pin Controlled by PE1 */
+#define PIO_PE2 (1u << 2) /**< \brief Pin Controlled by PE2 */
+#define PIO_PE3 (1u << 3) /**< \brief Pin Controlled by PE3 */
+#define PIO_PE4 (1u << 4) /**< \brief Pin Controlled by PE4 */
+#define PIO_PE5 (1u << 5) /**< \brief Pin Controlled by PE5 */
+#define PIO_PE6 (1u << 6) /**< \brief Pin Controlled by PE6 */
+#define PIO_PE7 (1u << 7) /**< \brief Pin Controlled by PE7 */
+#define PIO_PE8 (1u << 8) /**< \brief Pin Controlled by PE8 */
+#define PIO_PE9 (1u << 9) /**< \brief Pin Controlled by PE9 */
+#define PIO_PE10 (1u << 10) /**< \brief Pin Controlled by PE10 */
+#define PIO_PE11 (1u << 11) /**< \brief Pin Controlled by PE11 */
+#define PIO_PE12 (1u << 12) /**< \brief Pin Controlled by PE12 */
+#define PIO_PE13 (1u << 13) /**< \brief Pin Controlled by PE13 */
+#define PIO_PE14 (1u << 14) /**< \brief Pin Controlled by PE14 */
+#define PIO_PE15 (1u << 15) /**< \brief Pin Controlled by PE15 */
+#define PIO_PE16 (1u << 16) /**< \brief Pin Controlled by PE16 */
+#define PIO_PE17 (1u << 17) /**< \brief Pin Controlled by PE17 */
+#define PIO_PE18 (1u << 18) /**< \brief Pin Controlled by PE18 */
+#define PIO_PE19 (1u << 19) /**< \brief Pin Controlled by PE19 */
+#define PIO_PE20 (1u << 20) /**< \brief Pin Controlled by PE20 */
+#define PIO_PE21 (1u << 21) /**< \brief Pin Controlled by PE21 */
+#define PIO_PE22 (1u << 22) /**< \brief Pin Controlled by PE22 */
+#define PIO_PE23 (1u << 23) /**< \brief Pin Controlled by PE23 */
+#define PIO_PE24 (1u << 24) /**< \brief Pin Controlled by PE24 */
+#define PIO_PE25 (1u << 25) /**< \brief Pin Controlled by PE25 */
+#define PIO_PE26 (1u << 26) /**< \brief Pin Controlled by PE26 */
+#define PIO_PE27 (1u << 27) /**< \brief Pin Controlled by PE27 */
+#define PIO_PE28 (1u << 28) /**< \brief Pin Controlled by PE28 */
+#define PIO_PE29 (1u << 29) /**< \brief Pin Controlled by PE29 */
+#define PIO_PE30 (1u << 30) /**< \brief Pin Controlled by PE30 */
+#define PIO_PE31 (1u << 31) /**< \brief Pin Controlled by PE31 */
+#define PIO_PF0 (1u << 0) /**< \brief Pin Controlled by PF0 */
+#define PIO_PF1 (1u << 1) /**< \brief Pin Controlled by PF1 */
+#define PIO_PF2 (1u << 2) /**< \brief Pin Controlled by PF2 */
+#define PIO_PF3 (1u << 3) /**< \brief Pin Controlled by PF3 */
+#define PIO_PF4 (1u << 4) /**< \brief Pin Controlled by PF4 */
+#define PIO_PF5 (1u << 5) /**< \brief Pin Controlled by PF5 */
+/* ========== Pio definition for ADC peripheral ========== */
+#define PIO_PA2X1_AD0 (1u << 2) /**< \brief Adc signal: AD0 */
+#define PIO_PA3X1_AD1_WKUP1 (1u << 3) /**< \brief Adc signal: AD1/WKUP1 */
+#define PIO_PB17X1_AD10 (1u << 17) /**< \brief Adc signal: AD10 */
+#define PIO_PB18X1_AD11 (1u << 18) /**< \brief Adc signal: AD11 */
+#define PIO_PB19X1_AD12 (1u << 19) /**< \brief Adc signal: AD12 */
+#define PIO_PB20X1_AD13 (1u << 20) /**< \brief Adc signal: AD13 */
+#define PIO_PB21X1_AD14_WKUP13 (1u << 21) /**< \brief Adc signal: AD14/WKUP13 */
+#define PIO_PA4X1_AD2 (1u << 4) /**< \brief Adc signal: AD2 */
+#define PIO_PA6X1_AD3 (1u << 6) /**< \brief Adc signal: AD3 */
+#define PIO_PA22X1_AD4 (1u << 22) /**< \brief Adc signal: AD4 */
+#define PIO_PA23X1_AD5 (1u << 23) /**< \brief Adc signal: AD5 */
+#define PIO_PA24X1_AD6 (1u << 24) /**< \brief Adc signal: AD6 */
+#define PIO_PA16X1_AD7 (1u << 16) /**< \brief Adc signal: AD7 */
+#define PIO_PB12X1_AD8 (1u << 12) /**< \brief Adc signal: AD8 */
+#define PIO_PB13X1_AD9 (1u << 13) /**< \brief Adc signal: AD9 */
+#define PIO_PA11B_ADTRG (1u << 11) /**< \brief Adc signal: ADTRG */
+/* ========== Pio definition for CAN0 peripheral ========== */
+#define PIO_PA1A_CANRX0 (1u << 1) /**< \brief Can0 signal: CANRX0 */
+#define PIO_PA0A_CANTX0 (1u << 0) /**< \brief Can0 signal: CANTX0 */
+/* ========== Pio definition for CAN1 peripheral ========== */
+#define PIO_PB15A_CANRX1 (1u << 15) /**< \brief Can1 signal: CANRX1 */
+#define PIO_PB14A_CANTX1 (1u << 14) /**< \brief Can1 signal: CANTX1 */
+/* ========== Pio definition for DACC peripheral ========== */
+#define PIO_PB15X1_DAC0_WKUP12 (1u << 15) /**< \brief Dacc signal: DAC0/WKUP12 */
+#define PIO_PB16X1_DAC1 (1u << 16) /**< \brief Dacc signal: DAC1 */
+#define PIO_PA10B_DATRG (1u << 10) /**< \brief Dacc signal: DATRG */
+/* ========== Pio definition for EBI peripheral ========== */
+#define PIO_PC21A_A0_NBS0 (1u << 21) /**< \brief Ebi signal: A0/NBS0 */
+#define PIO_PC22A_A1 (1u << 22) /**< \brief Ebi signal: A1 */
+#define PIO_PD0A_A10 (1u << 0) /**< \brief Ebi signal: A10 */
+#define PIO_PD22A_A10 (1u << 22) /**< \brief Ebi signal: A10 */
+#define PIO_PD1A_A11 (1u << 1) /**< \brief Ebi signal: A11 */
+#define PIO_PD23A_A11 (1u << 23) /**< \brief Ebi signal: A11 */
+#define PIO_PD2A_A12 (1u << 2) /**< \brief Ebi signal: A12 */
+#define PIO_PD24A_A12 (1u << 24) /**< \brief Ebi signal: A12 */
+#define PIO_PD3A_A13 (1u << 3) /**< \brief Ebi signal: A13 */
+#define PIO_PD25A_A13 (1u << 25) /**< \brief Ebi signal: A13 */
+#define PIO_PD4A_A14 (1u << 4) /**< \brief Ebi signal: A14 */
+#define PIO_PD26A_A14 (1u << 26) /**< \brief Ebi signal: A14 */
+#define PIO_PD5A_A15 (1u << 5) /**< \brief Ebi signal: A15 */
+#define PIO_PD27A_A15 (1u << 27) /**< \brief Ebi signal: A15 */
+#define PIO_PD6A_A16_BA0 (1u << 6) /**< \brief Ebi signal: A16/BA0 */
+#define PIO_PD28A_A16_BA0 (1u << 28) /**< \brief Ebi signal: A16/BA0 */
+#define PIO_PD7A_A17_BA1 (1u << 7) /**< \brief Ebi signal: A17/BA1 */
+#define PIO_PD29A_A17_BA1 (1u << 29) /**< \brief Ebi signal: A17/BA1 */
+#define PIO_PA25B_A18 (1u << 25) /**< \brief Ebi signal: A18 */
+#define PIO_PB10B_A18 (1u << 10) /**< \brief Ebi signal: A18 */
+#define PIO_PD30A_A18 (1u << 30) /**< \brief Ebi signal: A18 */
+#define PIO_PA26B_A19 (1u << 26) /**< \brief Ebi signal: A19 */
+#define PIO_PB11B_A19 (1u << 11) /**< \brief Ebi signal: A19 */
+#define PIO_PE0A_A19 (1u << 0) /**< \brief Ebi signal: A19 */
+#define PIO_PC23A_A2 (1u << 23) /**< \brief Ebi signal: A2 */
+#define PIO_PA18B_A20 (1u << 18) /**< \brief Ebi signal: A20 */
+#define PIO_PA27B_A20 (1u << 27) /**< \brief Ebi signal: A20 */
+#define PIO_PE1A_A20 (1u << 1) /**< \brief Ebi signal: A20 */
+#define PIO_PD8A_A21_NANDALE (1u << 8) /**< \brief Ebi signal: A21/NANDALE */
+#define PIO_PE2A_A21_NANDALE (1u << 2) /**< \brief Ebi signal: A21/NANDALE */
+#define PIO_PD9A_A22_NANDCLE (1u << 9) /**< \brief Ebi signal: A22/NANDCLE */
+#define PIO_PE3A_A22_NANDCLE (1u << 3) /**< \brief Ebi signal: A22/NANDCLE */
+#define PIO_PE4A_A23 (1u << 4) /**< \brief Ebi signal: A23 */
+#define PIO_PC24A_A3 (1u << 24) /**< \brief Ebi signal: A3 */
+#define PIO_PC25A_A4 (1u << 25) /**< \brief Ebi signal: A4 */
+#define PIO_PC26A_A5 (1u << 26) /**< \brief Ebi signal: A5 */
+#define PIO_PD17A_A5 (1u << 17) /**< \brief Ebi signal: A5 */
+#define PIO_PC27A_A6 (1u << 27) /**< \brief Ebi signal: A6 */
+#define PIO_PD18A_A6 (1u << 18) /**< \brief Ebi signal: A6 */
+#define PIO_PC28A_A7 (1u << 28) /**< \brief Ebi signal: A7 */
+#define PIO_PD19A_A7 (1u << 19) /**< \brief Ebi signal: A7 */
+#define PIO_PC29A_A8 (1u << 29) /**< \brief Ebi signal: A8 */
+#define PIO_PD20A_A8 (1u << 20) /**< \brief Ebi signal: A8 */
+#define PIO_PC30A_A9 (1u << 30) /**< \brief Ebi signal: A9 */
+#define PIO_PD21A_A9 (1u << 21) /**< \brief Ebi signal: A9 */
+#define PIO_PD16A_CAS (1u << 16) /**< \brief Ebi signal: CAS */
+#define PIO_PC2A_D0 (1u << 2) /**< \brief Ebi signal: D0 */
+#define PIO_PC3A_D1 (1u << 3) /**< \brief Ebi signal: D1 */
+#define PIO_PC12A_D10 (1u << 12) /**< \brief Ebi signal: D10 */
+#define PIO_PC13A_D11 (1u << 13) /**< \brief Ebi signal: D11 */
+#define PIO_PC14A_D12 (1u << 14) /**< \brief Ebi signal: D12 */
+#define PIO_PC15A_D13 (1u << 15) /**< \brief Ebi signal: D13 */
+#define PIO_PC16A_D14 (1u << 16) /**< \brief Ebi signal: D14 */
+#define PIO_PC17A_D15 (1u << 17) /**< \brief Ebi signal: D15 */
+#define PIO_PC4A_D2 (1u << 4) /**< \brief Ebi signal: D2 */
+#define PIO_PC5A_D3 (1u << 5) /**< \brief Ebi signal: D3 */
+#define PIO_PC6A_D4 (1u << 6) /**< \brief Ebi signal: D4 */
+#define PIO_PC7A_D5 (1u << 7) /**< \brief Ebi signal: D5 */
+#define PIO_PC8A_D6 (1u << 8) /**< \brief Ebi signal: D6 */
+#define PIO_PC9A_D7 (1u << 9) /**< \brief Ebi signal: D7 */
+#define PIO_PC10A_D8 (1u << 10) /**< \brief Ebi signal: D8 */
+#define PIO_PC11A_D9 (1u << 11) /**< \brief Ebi signal: D9 */
+#define PIO_PC19A_NANDOE (1u << 19) /**< \brief Ebi signal: NANDOE */
+#define PIO_PA2B_NANDRDY (1u << 2) /**< \brief Ebi signal: NANDRDY */
+#define PIO_PC20A_NANDWE (1u << 20) /**< \brief Ebi signal: NANDWE */
+#define PIO_PA6B_NCS0 (1u << 6) /**< \brief Ebi signal: NCS0 */
+#define PIO_PA7B_NCS1 (1u << 7) /**< \brief Ebi signal: NCS1 */
+#define PIO_PB24B_NCS2 (1u << 24) /**< \brief Ebi signal: NCS2 */
+#define PIO_PB27A_NCS3 (1u << 27) /**< \brief Ebi signal: NCS3 */
+#define PIO_PE5A_NCS4 (1u << 5) /**< \brief Ebi signal: NCS4 */
+#define PIO_PE6A_NCS5 (1u << 6) /**< \brief Ebi signal: NCS5 */
+#define PIO_PE18B_NCS6 (1u << 18) /**< \brief Ebi signal: NCS6 */
+#define PIO_PE27A_NCS7 (1u << 27) /**< \brief Ebi signal: NCS7 */
+#define PIO_PA29B_NRD (1u << 29) /**< \brief Ebi signal: NRD */
+#define PIO_PA4B_NWAIT (1u << 4) /**< \brief Ebi signal: NWAIT */
+#define PIO_PC18A_NWR0_NWE (1u << 18) /**< \brief Ebi signal: NWR0/NWE */
+#define PIO_PD10A_NWR1_NBS1 (1u << 10) /**< \brief Ebi signal: NWR1/NBS1 */
+#define PIO_PD15A_RAS (1u << 15) /**< \brief Ebi signal: RAS */
+#define PIO_PD11A_SDA10 (1u << 11) /**< \brief Ebi signal: SDA10 */
+#define PIO_PD13A_SDCKE (1u << 13) /**< \brief Ebi signal: SDCKE */
+#define PIO_PD12A_SDCS (1u << 12) /**< \brief Ebi signal: SDCS */
+#define PIO_PD14A_SDWE (1u << 14) /**< \brief Ebi signal: SDWE */
+/* ========== Pio definition for EMAC peripheral ========== */
+#define PIO_PC13B_ECOL (1u << 13) /**< \brief Emac signal: ECOL */
+#define PIO_PC10B_ECRS (1u << 10) /**< \brief Emac signal: ECRS */
+#define PIO_PB4A_ECRSDV_ERXDV (1u << 4) /**< \brief Emac signal: ECRSDV/ERXDV */
+#define PIO_PB8A_EMDC (1u << 8) /**< \brief Emac signal: EMDC */
+#define PIO_PB9A_EMDIO (1u << 9) /**< \brief Emac signal: EMDIO */
+#define PIO_PB5A_ERX0 (1u << 5) /**< \brief Emac signal: ERX0 */
+#define PIO_PB6A_ERX1 (1u << 6) /**< \brief Emac signal: ERX1 */
+#define PIO_PC11B_ERX2 (1u << 11) /**< \brief Emac signal: ERX2 */
+#define PIO_PC12B_ERX3 (1u << 12) /**< \brief Emac signal: ERX3 */
+#define PIO_PC14B_ERXCK (1u << 14) /**< \brief Emac signal: ERXCK */
+#define PIO_PB7A_ERXER (1u << 7) /**< \brief Emac signal: ERXER */
+#define PIO_PB2A_ETX0 (1u << 2) /**< \brief Emac signal: ETX0 */
+#define PIO_PB3A_ETX1 (1u << 3) /**< \brief Emac signal: ETX1 */
+#define PIO_PC15B_ETX2 (1u << 15) /**< \brief Emac signal: ETX2 */
+#define PIO_PC16B_ETX3 (1u << 16) /**< \brief Emac signal: ETX3 */
+#define PIO_PB0A_ETXCK (1u << 0) /**< \brief Emac signal: ETXCK */
+#define PIO_PB1A_ETXEN (1u << 1) /**< \brief Emac signal: ETXEN */
+#define PIO_PC17B_ETXER (1u << 17) /**< \brief Emac signal: ETXER */
+/* ========== Pio definition for HSMCI peripheral ========== */
+#define PIO_PA20A_MCCDA (1u << 20) /**< \brief Hsmci signal: MCCDA */
+#define PIO_PE20B_MCCDB (1u << 20) /**< \brief Hsmci signal: MCCDB */
+#define PIO_PA19A_MCCK (1u << 19) /**< \brief Hsmci signal: MCCK */
+#define PIO_PA21A_MCDA0 (1u << 21) /**< \brief Hsmci signal: MCDA0 */
+#define PIO_PA22A_MCDA1 (1u << 22) /**< \brief Hsmci signal: MCDA1 */
+#define PIO_PA23A_MCDA2 (1u << 23) /**< \brief Hsmci signal: MCDA2 */
+#define PIO_PA24A_MCDA3 (1u << 24) /**< \brief Hsmci signal: MCDA3 */
+#define PIO_PD0B_MCDA4 (1u << 0) /**< \brief Hsmci signal: MCDA4 */
+#define PIO_PD1B_MCDA5 (1u << 1) /**< \brief Hsmci signal: MCDA5 */
+#define PIO_PD2B_MCDA6 (1u << 2) /**< \brief Hsmci signal: MCDA6 */
+#define PIO_PD3B_MCDA7 (1u << 3) /**< \brief Hsmci signal: MCDA7 */
+#define PIO_PE22B_MCDB0 (1u << 22) /**< \brief Hsmci signal: MCDB0 */
+#define PIO_PE24B_MCDB1 (1u << 24) /**< \brief Hsmci signal: MCDB1 */
+#define PIO_PE26B_MCDB2 (1u << 26) /**< \brief Hsmci signal: MCDB2 */
+#define PIO_PE27B_MCDB3 (1u << 27) /**< \brief Hsmci signal: MCDB3 */
+/* ========== Pio definition for PMC peripheral ========== */
+#define PIO_PA1B_PCK0 (1u << 1) /**< \brief Pmc signal: PCK0 */
+#define PIO_PB22B_PCK0 (1u << 22) /**< \brief Pmc signal: PCK0 */
+#define PIO_PA24B_PCK1 (1u << 24) /**< \brief Pmc signal: PCK1 */
+#define PIO_PA30B_PCK1 (1u << 30) /**< \brief Pmc signal: PCK1 */
+#define PIO_PA28B_PCK2 (1u << 28) /**< \brief Pmc signal: PCK2 */
+#define PIO_PA31B_PCK2 (1u << 31) /**< \brief Pmc signal: PCK2 */
+/* ========== Pio definition for PWM peripheral ========== */
+#define PIO_PA5B_PWMFI0 (1u << 5) /**< \brief Pwm signal: PWMFI0 */
+#define PIO_PA3B_PWMFI1 (1u << 3) /**< \brief Pwm signal: PWMFI1 */
+#define PIO_PD6B_PWMFI2 (1u << 6) /**< \brief Pwm signal: PWMFI2 */
+#define PIO_PA8B_PWMH0 (1u << 8) /**< \brief Pwm signal: PWMH0 */
+#define PIO_PB12B_PWMH0 (1u << 12) /**< \brief Pwm signal: PWMH0 */
+#define PIO_PC3B_PWMH0 (1u << 3) /**< \brief Pwm signal: PWMH0 */
+#define PIO_PE15A_PWMH0 (1u << 15) /**< \brief Pwm signal: PWMH0 */
+#define PIO_PA19B_PWMH1 (1u << 19) /**< \brief Pwm signal: PWMH1 */
+#define PIO_PB13B_PWMH1 (1u << 13) /**< \brief Pwm signal: PWMH1 */
+#define PIO_PC5B_PWMH1 (1u << 5) /**< \brief Pwm signal: PWMH1 */
+#define PIO_PE16A_PWMH1 (1u << 16) /**< \brief Pwm signal: PWMH1 */
+#define PIO_PA13B_PWMH2 (1u << 13) /**< \brief Pwm signal: PWMH2 */
+#define PIO_PB14B_PWMH2 (1u << 14) /**< \brief Pwm signal: PWMH2 */
+#define PIO_PC7B_PWMH2 (1u << 7) /**< \brief Pwm signal: PWMH2 */
+#define PIO_PA9B_PWMH3 (1u << 9) /**< \brief Pwm signal: PWMH3 */
+#define PIO_PB15B_PWMH3 (1u << 15) /**< \brief Pwm signal: PWMH3 */
+#define PIO_PC9B_PWMH3 (1u << 9) /**< \brief Pwm signal: PWMH3 */
+#define PIO_PF3A_PWMH3 (1u << 3) /**< \brief Pwm signal: PWMH3 */
+#define PIO_PC20B_PWMH4 (1u << 20) /**< \brief Pwm signal: PWMH4 */
+#define PIO_PE20A_PWMH4 (1u << 20) /**< \brief Pwm signal: PWMH4 */
+#define PIO_PC19B_PWMH5 (1u << 19) /**< \brief Pwm signal: PWMH5 */
+#define PIO_PE22A_PWMH5 (1u << 22) /**< \brief Pwm signal: PWMH5 */
+#define PIO_PC18B_PWMH6 (1u << 18) /**< \brief Pwm signal: PWMH6 */
+#define PIO_PE24A_PWMH6 (1u << 24) /**< \brief Pwm signal: PWMH6 */
+#define PIO_PE26A_PWMH7 (1u << 26) /**< \brief Pwm signal: PWMH7 */
+#define PIO_PA21B_PWML0 (1u << 21) /**< \brief Pwm signal: PWML0 */
+#define PIO_PB16B_PWML0 (1u << 16) /**< \brief Pwm signal: PWML0 */
+#define PIO_PC2B_PWML0 (1u << 2) /**< \brief Pwm signal: PWML0 */
+#define PIO_PE18A_PWML0 (1u << 18) /**< \brief Pwm signal: PWML0 */
+#define PIO_PA12B_PWML1 (1u << 12) /**< \brief Pwm signal: PWML1 */
+#define PIO_PB17B_PWML1 (1u << 17) /**< \brief Pwm signal: PWML1 */
+#define PIO_PC4B_PWML1 (1u << 4) /**< \brief Pwm signal: PWML1 */
+#define PIO_PA20B_PWML2 (1u << 20) /**< \brief Pwm signal: PWML2 */
+#define PIO_PB18B_PWML2 (1u << 18) /**< \brief Pwm signal: PWML2 */
+#define PIO_PC6B_PWML2 (1u << 6) /**< \brief Pwm signal: PWML2 */
+#define PIO_PE17A_PWML2 (1u << 17) /**< \brief Pwm signal: PWML2 */
+#define PIO_PA0B_PWML3 (1u << 0) /**< \brief Pwm signal: PWML3 */
+#define PIO_PB19B_PWML3 (1u << 19) /**< \brief Pwm signal: PWML3 */
+#define PIO_PC8B_PWML3 (1u << 8) /**< \brief Pwm signal: PWML3 */
+#define PIO_PB6B_PWML4 (1u << 6) /**< \brief Pwm signal: PWML4 */
+#define PIO_PC21B_PWML4 (1u << 21) /**< \brief Pwm signal: PWML4 */
+#define PIO_PE19A_PWML4 (1u << 19) /**< \brief Pwm signal: PWML4 */
+#define PIO_PB7B_PWML5 (1u << 7) /**< \brief Pwm signal: PWML5 */
+#define PIO_PC22B_PWML5 (1u << 22) /**< \brief Pwm signal: PWML5 */
+#define PIO_PE21A_PWML5 (1u << 21) /**< \brief Pwm signal: PWML5 */
+#define PIO_PB8B_PWML6 (1u << 8) /**< \brief Pwm signal: PWML6 */
+#define PIO_PC23B_PWML6 (1u << 23) /**< \brief Pwm signal: PWML6 */
+#define PIO_PE23A_PWML6 (1u << 23) /**< \brief Pwm signal: PWML6 */
+#define PIO_PB9B_PWML7 (1u << 9) /**< \brief Pwm signal: PWML7 */
+#define PIO_PC24B_PWML7 (1u << 24) /**< \brief Pwm signal: PWML7 */
+#define PIO_PE25A_PWML7 (1u << 25) /**< \brief Pwm signal: PWML7 */
+/* ========== Pio definition for SPI0 peripheral ========== */
+#define PIO_PA25A_SPI0_MISO (1u << 25) /**< \brief Spi0 signal: SPI0_MISO */
+#define PIO_PA26A_SPI0_MOSI (1u << 26) /**< \brief Spi0 signal: SPI0_MOSI */
+#define PIO_PA28A_SPI0_NPCS0 (1u << 28) /**< \brief Spi0 signal: SPI0_NPCS0 */
+#define PIO_PA29A_SPI0_NPCS1 (1u << 29) /**< \brief Spi0 signal: SPI0_NPCS1 */
+#define PIO_PB20B_SPI0_NPCS1 (1u << 20) /**< \brief Spi0 signal: SPI0_NPCS1 */
+#define PIO_PA30A_SPI0_NPCS2 (1u << 30) /**< \brief Spi0 signal: SPI0_NPCS2 */
+#define PIO_PB21B_SPI0_NPCS2 (1u << 21) /**< \brief Spi0 signal: SPI0_NPCS2 */
+#define PIO_PA31A_SPI0_NPCS3 (1u << 31) /**< \brief Spi0 signal: SPI0_NPCS3 */
+#define PIO_PB23B_SPI0_NPCS3 (1u << 23) /**< \brief Spi0 signal: SPI0_NPCS3 */
+#define PIO_PA27A_SPI0_SPCK (1u << 27) /**< \brief Spi0 signal: SPI0_SPCK */
+/* ========== Pio definition for SPI1 peripheral ========== */
+#define PIO_PE28A_SPI1_MISO (1u << 28) /**< \brief Spi1 signal: SPI1_MISO */
+#define PIO_PE29A_SPI1_MOSI (1u << 29) /**< \brief Spi1 signal: SPI1_MOSI */
+#define PIO_PE31A_SPI1_NPCS0 (1u << 31) /**< \brief Spi1 signal: SPI1_NPCS0 */
+#define PIO_PF0A_SPI1_NPCS1 (1u << 0) /**< \brief Spi1 signal: SPI1_NPCS1 */
+#define PIO_PF1A_SPI1_NPCS2 (1u << 1) /**< \brief Spi1 signal: SPI1_NPCS2 */
+#define PIO_PF2A_SPI1_NPCS3 (1u << 2) /**< \brief Spi1 signal: SPI1_NPCS3 */
+#define PIO_PE30A_SPI1_SPCK (1u << 30) /**< \brief Spi1 signal: SPI1_SPCK */
+/* ========== Pio definition for SSC peripheral ========== */
+#define PIO_PB18A_RD (1u << 18) /**< \brief Ssc signal: RD */
+#define PIO_PB17A_RF (1u << 17) /**< \brief Ssc signal: RF */
+#define PIO_PB19A_RK (1u << 19) /**< \brief Ssc signal: RK */
+#define PIO_PA16B_TD (1u << 16) /**< \brief Ssc signal: TD */
+#define PIO_PA15B_TF (1u << 15) /**< \brief Ssc signal: TF */
+#define PIO_PA14B_TK (1u << 14) /**< \brief Ssc signal: TK */
+/* ========== Pio definition for TC0 peripheral ========== */
+#define PIO_PB26B_TCLK0 (1u << 26) /**< \brief Tc0 signal: TCLK0 */
+#define PIO_PA4A_TCLK1 (1u << 4) /**< \brief Tc0 signal: TCLK1 */
+#define PIO_PA7A_TCLK2 (1u << 7) /**< \brief Tc0 signal: TCLK2 */
+#define PIO_PB25B_TIOA0 (1u << 25) /**< \brief Tc0 signal: TIOA0 */
+#define PIO_PA2A_TIOA1 (1u << 2) /**< \brief Tc0 signal: TIOA1 */
+#define PIO_PA5A_TIOA2 (1u << 5) /**< \brief Tc0 signal: TIOA2 */
+#define PIO_PB27B_TIOB0 (1u << 27) /**< \brief Tc0 signal: TIOB0 */
+#define PIO_PA3A_TIOB1 (1u << 3) /**< \brief Tc0 signal: TIOB1 */
+#define PIO_PA6A_TIOB2 (1u << 6) /**< \brief Tc0 signal: TIOB2 */
+/* ========== Pio definition for TC1 peripheral ========== */
+#define PIO_PA22B_TCLK3 (1u << 22) /**< \brief Tc1 signal: TCLK3 */
+#define PIO_PA23B_TCLK4 (1u << 23) /**< \brief Tc1 signal: TCLK4 */
+#define PIO_PB16A_TCLK5 (1u << 16) /**< \brief Tc1 signal: TCLK5 */
+#define PIO_PB0B_TIOA3 (1u << 0) /**< \brief Tc1 signal: TIOA3 */
+#define PIO_PE9A_TIOA3 (1u << 9) /**< \brief Tc1 signal: TIOA3 */
+#define PIO_PB2B_TIOA4 (1u << 2) /**< \brief Tc1 signal: TIOA4 */
+#define PIO_PE11A_TIOA4 (1u << 11) /**< \brief Tc1 signal: TIOA4 */
+#define PIO_PB4B_TIOA5 (1u << 4) /**< \brief Tc1 signal: TIOA5 */
+#define PIO_PE13A_TIOA5 (1u << 13) /**< \brief Tc1 signal: TIOA5 */
+#define PIO_PB1B_TIOB3 (1u << 1) /**< \brief Tc1 signal: TIOB3 */
+#define PIO_PE10A_TIOB3 (1u << 10) /**< \brief Tc1 signal: TIOB3 */
+#define PIO_PB3B_TIOB4 (1u << 3) /**< \brief Tc1 signal: TIOB4 */
+#define PIO_PE12A_TIOB4 (1u << 12) /**< \brief Tc1 signal: TIOB4 */
+#define PIO_PB5B_TIOB5 (1u << 5) /**< \brief Tc1 signal: TIOB5 */
+#define PIO_PE14A_TIOB5 (1u << 14) /**< \brief Tc1 signal: TIOB5 */
+/* ========== Pio definition for TC2 peripheral ========== */
+#define PIO_PC27B_TCLK6 (1u << 27) /**< \brief Tc2 signal: TCLK6 */
+#define PIO_PC30B_TCLK7 (1u << 30) /**< \brief Tc2 signal: TCLK7 */
+#define PIO_PD9B_TCLK8 (1u << 9) /**< \brief Tc2 signal: TCLK8 */
+#define PIO_PC25B_TIOA6 (1u << 25) /**< \brief Tc2 signal: TIOA6 */
+#define PIO_PC28B_TIOA7 (1u << 28) /**< \brief Tc2 signal: TIOA7 */
+#define PIO_PD7B_TIOA8 (1u << 7) /**< \brief Tc2 signal: TIOA8 */
+#define PIO_PC26B_TIOB6 (1u << 26) /**< \brief Tc2 signal: TIOB6 */
+#define PIO_PC29B_TIOB7 (1u << 29) /**< \brief Tc2 signal: TIOB7 */
+#define PIO_PD8B_TIOB8 (1u << 8) /**< \brief Tc2 signal: TIOB8 */
+/* ========== Pio definition for TWI0 peripheral ========== */
+#define PIO_PA18A_TWCK0 (1u << 18) /**< \brief Twi0 signal: TWCK0 */
+#define PIO_PA17A_TWD0 (1u << 17) /**< \brief Twi0 signal: TWD0 */
+/* ========== Pio definition for TWI1 peripheral ========== */
+#define PIO_PB13A_TWCK1 (1u << 13) /**< \brief Twi1 signal: TWCK1 */
+#define PIO_PB12A_TWD1 (1u << 12) /**< \brief Twi1 signal: TWD1 */
+/* ========== Pio definition for UART peripheral ========== */
+#define PIO_PA8A_URXD (1u << 8) /**< \brief Uart signal: URXD */
+#define PIO_PA9A_UTXD (1u << 9) /**< \brief Uart signal: UTXD */
+/* ========== Pio definition for UOTGHS peripheral ========== */
+#define PIO_PB11A_UOTGID (1u << 11) /**< \brief Uotghs signal: UOTGID */
+#define PIO_PB10A_UOTGVBOF (1u << 10) /**< \brief Uotghs signal: UOTGVBOF */
+/* ========== Pio definition for USART0 peripheral ========== */
+#define PIO_PB26A_CTS0 (1u << 26) /**< \brief Usart0 signal: CTS0 */
+#define PIO_PB25A_RTS0 (1u << 25) /**< \brief Usart0 signal: RTS0 */
+#define PIO_PA10A_RXD0 (1u << 10) /**< \brief Usart0 signal: RXD0 */
+#define PIO_PA17B_SCK0 (1u << 17) /**< \brief Usart0 signal: SCK0 */
+#define PIO_PA11A_TXD0 (1u << 11) /**< \brief Usart0 signal: TXD0 */
+/* ========== Pio definition for USART1 peripheral ========== */
+#define PIO_PA15A_CTS1 (1u << 15) /**< \brief Usart1 signal: CTS1 */
+#define PIO_PA14A_RTS1 (1u << 14) /**< \brief Usart1 signal: RTS1 */
+#define PIO_PA12A_RXD1 (1u << 12) /**< \brief Usart1 signal: RXD1 */
+#define PIO_PA16A_SCK1 (1u << 16) /**< \brief Usart1 signal: SCK1 */
+#define PIO_PA13A_TXD1 (1u << 13) /**< \brief Usart1 signal: TXD1 */
+/* ========== Pio definition for USART2 peripheral ========== */
+#define PIO_PB23A_CTS2 (1u << 23) /**< \brief Usart2 signal: CTS2 */
+#define PIO_PB22A_RTS2 (1u << 22) /**< \brief Usart2 signal: RTS2 */
+#define PIO_PB21A_RXD2 (1u << 21) /**< \brief Usart2 signal: RXD2 */
+#define PIO_PB24A_SCK2 (1u << 24) /**< \brief Usart2 signal: SCK2 */
+#define PIO_PB20A_TXD2 (1u << 20) /**< \brief Usart2 signal: TXD2 */
+/* ========== Pio definition for USART3 peripheral ========== */
+#define PIO_PF4A_CTS3 (1u << 4) /**< \brief Usart3 signal: CTS3 */
+#define PIO_PF5A_RTS3 (1u << 5) /**< \brief Usart3 signal: RTS3 */
+#define PIO_PD5B_RXD3 (1u << 5) /**< \brief Usart3 signal: RXD3 */
+#define PIO_PE16B_SCK3 (1u << 16) /**< \brief Usart3 signal: SCK3 */
+#define PIO_PD4B_TXD3 (1u << 4) /**< \brief Usart3 signal: TXD3 */
+/*@}*/
+
+/* ************************************************************************** */
+/* MEMORY MAPPING DEFINITIONS FOR SAM3XA */
+/* ************************************************************************** */
+
+#define IFLASH0_ADDR (0x00080000u) /**< Internal Flash 0 base address */
+#define IROM_ADDR (0x00100000u) /**< Internal ROM base address */
+#define IRAM0_ADDR (0x20000000u) /**< Internal RAM 0 base address */
+#define IRAM1_ADDR (0x20080000u) /**< Internal RAM 1 base address */
+#define NFC_RAM_ADDR (0x20100000u) /**< NAND Flash Controller RAM base address */
+#define UOTGHS_RAM_ADDR (0x20180000u) /**< USB On-The-Go Interface RAM base address */
+#define EBI_CS0_ADDR (0x60000000u) /**< EBI Chip Select 0 base address */
+#define EBI_CS1_ADDR (0x61000000u) /**< EBI Chip Select 1 base address */
+#define EBI_CS2_ADDR (0x62000000u) /**< EBI Chip Select 2 base address */
+#define EBI_CS3_ADDR (0x63000000u) /**< EBI Chip Select 3 base address */
+#define EBI_CS4_ADDR (0x64000000u) /**< EBI Chip Select 4 base address */
+#define EBI_CS5_ADDR (0x65000000u) /**< EBI Chip Select 5 base address */
+#define EBI_CS6_ADDR (0x66000000u) /**< EBI Chip Select 6 base address */
+#define EBI_CS7_ADDR (0x67000000u) /**< EBI Chip Select 7 base address */
+
+#if defined sam3x2
+# define IFLASH1_ADDR (0x00090000u) /**< Internal Flash 1 base address */
+# define IFLASH_SIZE (0x20000u)
+# define IFLASH_PAGE_SIZE (256) /* Internal FLASH 0 Page Size: 256 bytes */
+# define IFLASH_LOCK_REGION_SIZE (16384) /* Internal FLASH 0 Lock Region Size: 16 Kbytes */
+# define IFLASH_NB_OF_PAGES (256) /* Internal FLASH 0 Number of Pages: 256 */
+# define IFLASH_NB_OF_LOCK_BITS (8) /* Internal FLASH 0 Number of Lock Bits: 8 */
+
+# define NFC_RAM_SIZE (0x1000u)
+
+# define IRAM0_SIZE (0x4000u)
+# define IRAM1_SIZE (0x4000u)
+# define IRAM_SIZE (IRAM0_SIZE+IRAM1_SIZE)
+# define IRAM_ADDR (IRAM1_ADDR-IRAM0_SIZE)
+#elif defined sam3x2c | defined sam3a2
+# define IFLASH1_ADDR (0x00090000u) /**< Internal Flash 1 base address */
+# define IFLASH_SIZE (0x20000u)
+# define IFLASH_PAGE_SIZE (256) /* Internal FLASH 0 Page Size: 256 bytes */
+# define IFLASH_LOCK_REGION_SIZE (16384) /* Internal FLASH 0 Lock Region Size: 16 Kbytes */
+# define IFLASH_NB_OF_PAGES (256) /* Internal FLASH 0 Number of Pages: 256 */
+# define IFLASH_NB_OF_LOCK_BITS (8) /* Internal FLASH 0 Number of Lock Bits: 8 */
+# define IRAM_SIZE 0x8000
+
+# define IRAM0_SIZE (0x4000u)
+# define IRAM1_SIZE (0x4000u)
+# define IRAM_SIZE (IRAM0_SIZE+IRAM1_SIZE)
+# define IRAM_ADDR (IRAM1_ADDR-IRAM0_SIZE)
+#elif defined sam3x4
+# define IFLASH1_ADDR (0x000A0000u) /**< Internal Flash 1 base address */
+# define IFLASH_SIZE (0x40000u)
+# define IFLASH_PAGE_SIZE (256) /* Internal FLASH 0 Page Size: 256 bytes */
+# define IFLASH_LOCK_REGION_SIZE (16384) /* Internal FLASH 0 Lock Region Size: 16 Kbytes */
+# define IFLASH_NB_OF_PAGES (512) /* Internal FLASH 0 Number of Pages: 512 */
+# define IFLASH_NB_OF_LOCK_BITS (16) /* Internal FLASH 0 Number of Lock Bits: 16 */
+
+# define NFC_RAM_SIZE (0x1000u)
+
+# define IRAM0_SIZE (0x8000u)
+# define IRAM1_SIZE (0x8000u)
+# define IRAM_SIZE (IRAM0_SIZE+IRAM1_SIZE)
+# define IRAM_ADDR (IRAM1_ADDR-IRAM0_SIZE)
+#elif defined sam3x4c | defined sam3a4
+# define IFLASH1_ADDR (0x000A0000u) /**< Internal Flash 1 base address */
+# define IFLASH_SIZE (0x40000u)
+# define IFLASH_PAGE_SIZE (256) /* Internal FLASH 0 Page Size: 256 bytes */
+# define IFLASH_LOCK_REGION_SIZE (16384) /* Internal FLASH 0 Lock Region Size: 16 Kbytes */
+# define IFLASH_NB_OF_PAGES (512) /* Internal FLASH 0 Number of Pages: 512 */
+# define IFLASH_NB_OF_LOCK_BITS (16) /* Internal FLASH 0 Number of Lock Bits: 16 */
+
+# define IRAM0_SIZE (0x8000u)
+# define IRAM1_SIZE (0x8000u)
+# define IRAM_SIZE (IRAM0_SIZE+IRAM1_SIZE)
+# define IRAM_ADDR (IRAM1_ADDR-IRAM0_SIZE)
+#elif defined sam3x8
+# define IFLASH1_ADDR (0x000C0000u) /**< Internal Flash 1 base address */
+# define IFLASH_SIZE (0x80000u)
+# define IFLASH_PAGE_SIZE (256) /* Internal FLASH 0 Page Size: 256 bytes */
+# define IFLASH_LOCK_REGION_SIZE (16384) /* Internal FLASH 0 Lock Region Size: 16 Kbytes */
+# define IFLASH_NB_OF_PAGES (1024) /* Internal FLASH 0 Number of Pages: 1024 */
+# define IFLASH_NB_OF_LOCK_BITS (32) /* Internal FLASH 0 Number of Lock Bits: 32 */
+
+# define NFC_RAM_SIZE (0x1000u)
+
+# define IRAM0_SIZE (0x10000u)
+# define IRAM1_SIZE (0x8000u)
+# define IRAM_SIZE (IRAM0_SIZE+IRAM1_SIZE)
+# define IRAM_ADDR (IRAM1_ADDR-IRAM0_SIZE)
+#elif defined sam3x8c | defined sam3a8
+# define IFLASH1_ADDR (0x000C0000u) /**< Internal Flash 1 base address */
+# define IFLASH_SIZE (0x80000u)
+# define IFLASH_PAGE_SIZE (256) /* Internal FLASH 0 Page Size: 256 bytes */
+# define IFLASH_LOCK_REGION_SIZE (16384) /* Internal FLASH 0 Lock Region Size: 16 Kbytes */
+# define IFLASH_NB_OF_PAGES (1024) /* Internal FLASH 0 Number of Pages: 1024 */
+# define IFLASH_NB_OF_LOCK_BITS (32) /* Internal FLASH 0 Number of Lock Bits: 32 */
+
+# define IRAM0_SIZE (0x10000u)
+# define IRAM1_SIZE (0x8000u)
+# define IRAM_SIZE (IRAM0_SIZE+IRAM1_SIZE)
+# define IRAM_ADDR (IRAM1_ADDR-IRAM0_SIZE)
+#else
+ #error Library does not support the specified device.
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+/*@}*/
+
+#endif /* SAM3XA_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/adc.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/adc.h
new file mode 100644
index 0000000..dafd1ce
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/adc.h
@@ -0,0 +1,169 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * \section Purpose
+ *
+ * Interface for configuration the Analog-to-Digital Converter (ADC) peripheral.
+ *
+ * \section Usage
+ *
+ * -# Configurate the pins for ADC.
+ * -# Initialize the ADC with ADC_Initialize().
+ * -# Set ADC clock and timing with ADC_SetClock() and ADC_SetTiming().
+ * -# Select the active channel using ADC_EnableChannel().
+ * -# Start the conversion with ADC_StartConversion().
+ * -# Wait the end of the conversion by polling status with ADC_GetStatus().
+ * -# Finally, get the converted data using ADC_GetConvertedData() or ADC_GetLastConvertedData().
+ *
+*/
+#ifndef _ADC_
+#define _ADC_
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+#include <assert.h>
+#include <stdint.h>
+
+/*------------------------------------------------------------------------------
+ * Definitions
+ *------------------------------------------------------------------------------*/
+
+/* Max. ADC Clock Frequency (Hz) */
+#define ADC_CLOCK_MAX 20000000
+
+/* Max. normal ADC startup time (us) */
+#define ADC_STARTUP_NORMAL_MAX 40
+/* Max. fast ADC startup time (us) */
+#define ADC_STARTUP_FAST_MAX 12
+
+/* Definitions for ADC channels */
+#define ADC_CHANNEL_0 0
+#define ADC_CHANNEL_1 1
+#define ADC_CHANNEL_2 2
+#define ADC_CHANNEL_3 3
+#define ADC_CHANNEL_4 4
+#define ADC_CHANNEL_5 5
+#define ADC_CHANNEL_6 6
+#define ADC_CHANNEL_7 7
+#define ADC_CHANNEL_8 8
+#define ADC_CHANNEL_9 9
+#define ADC_CHANNEL_10 10
+#define ADC_CHANNEL_11 11
+#define ADC_CHANNEL_12 12
+#define ADC_CHANNEL_13 13
+#define ADC_CHANNEL_14 14
+#define ADC_CHANNEL_15 15
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/*------------------------------------------------------------------------------
+ * Macros function of register access
+ *------------------------------------------------------------------------------*/
+
+#define ADC_GetModeReg( pAdc ) ((pAdc)->ADC_MR)
+
+#define ADC_StartConversion( pAdc ) ((pAdc)->ADC_CR = ADC_CR_START)
+
+
+#define ADC_EnableChannel( pAdc, dwChannel ) {\
+ (pAdc)->ADC_CHER = (1 << (dwChannel));\
+ }
+
+#define ADC_DisableChannel(pAdc, dwChannel) {\
+ (pAdc)->ADC_CHDR = (1 << (dwChannel));\
+ }
+
+#define ADC_EnableIt(pAdc, dwMode) {\
+ (pAdc)->ADC_IER = (dwMode);\
+ }
+
+#define ADC_DisableIt(pAdc, dwMode) {\
+ (pAdc)->ADC_IDR = (dwMode);\
+ }
+
+#define ADC_EnableTS(pAdc) {\
+ (pAdc)->ADC_ACR |= ADC_ACR_TSON;\
+ }
+
+#define ADC_SetChannelGain(pAdc,dwMode) {\
+ (pAdc)->ADC_CGR = dwMode;\
+ }
+
+#define ADC_SetChannelOffset(pAdc,dwMode) {\
+ (pAdc)->ADC_COR = dwMode;\
+ }
+
+#define ADC_EnableDataReadyIt(pAdc) ((pAdc)->ADC_IER = ADC_IER_DRDY)
+
+#define ADC_GetStatus(pAdc) ((pAdc)->ADC_ISR)
+
+#define ADC_GetCompareMode(pAdc) (((pAdc)->ADC_EMR)& (ADC_EMR_CMPMODE_Msk))
+
+#define ADC_GetChannelStatus(pAdc) ((pAdc)->ADC_CHSR)
+
+#define ADC_GetInterruptMaskStatus(pAdc) ((pAdc)->ADC_IMR)
+
+#define ADC_GetLastConvertedData(pAdc) ((pAdc)->ADC_LCDR)
+
+/*------------------------------------------------------------------------------
+ * Exported functions
+ *------------------------------------------------------------------------------*/
+extern void ADC_Initialize( Adc* pAdc, uint32_t dwId );
+extern uint32_t ADC_SetClock( Adc* pAdc, uint32_t dwPres, uint32_t dwMck );
+extern void ADC_SetTiming( Adc* pAdc, uint32_t dwStartup, uint32_t dwTransfer,
+ uint32_t dwTracking, uint32_t dwSettling );
+extern void ADC_SetTrigger( Adc* pAdc, uint32_t bEnDis, uint32_t dwTrgSel );
+extern void ADC_SetFreeRunMode( Adc* pAdc, uint32_t bEnDis );
+extern void ADC_SetLowResolution( Adc* pAdc, uint32_t bEnDis );
+extern void ADC_SetSleepMode( Adc *pAdc, uint8_t bEnDis );
+extern void ADC_SetFastWakeup( Adc *pAdc, uint8_t bEnDis );
+extern void ADC_SetSequenceMode( Adc *pAdc, uint8_t bEnDis );
+extern void ADC_SetSequence( Adc *pAdc, uint32_t dwSEQ1, uint32_t dwSEQ2 );
+extern void ADC_SetSequenceByList( Adc *pAdc, uint8_t ucChList[], uint8_t ucNumCh );
+extern void ADC_SetAnalogChange( Adc *pAdc, uint8_t bEnDis );
+extern void ADC_SetTagEnable( Adc *pAdc, uint8_t bEnDis );
+extern void ADC_SetCompareChannel( Adc* pAdc, uint32_t dwChannel ) ;
+extern void ADC_SetCompareMode( Adc* pAdc, uint32_t dwMode ) ;
+extern void ADC_SetComparisonWindow( Adc* pAdc, uint32_t dwHi_Lo ) ;
+extern uint8_t ADC_CheckConfiguration( Adc* pAdc, uint32_t dwMcK ) ;
+extern uint32_t ADC_GetConvertedData( Adc* pAdc, uint32_t dwChannel ) ;
+extern uint32_t ADC_ReadBuffer( Adc* pADC, uint16_t *pwBuffer, uint32_t dwSize ) ;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* #ifndef _ADC_ */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/async.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/async.h
new file mode 100644
index 0000000..f332cb9
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/async.h
@@ -0,0 +1,80 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * Provide a routine for asynchronous transfer.
+ *
+ */
+
+#ifndef _ASYNC_
+#define _ASYNC_
+
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+#include <stdint.h>
+
+/*----------------------------------------------------------------------------
+ * Definition
+ *----------------------------------------------------------------------------*/
+/** Transfer is still pending.*/
+#define ASYNC_STATUS_PENDING 0xFF
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/*----------------------------------------------------------------------------
+ * Type
+ *----------------------------------------------------------------------------*/
+/** \brief Asynchronous transfer descriptor. */
+typedef struct _Async
+{
+ /** Asynchronous transfer status.*/
+ volatile uint8_t status ;
+ /** Callback function to invoke when transfer completes or fails.*/
+ void *callback ;
+ /** Driver storage area; do not use.*/
+ uint32_t pStorage[4] ;
+} Async ;
+
+/*----------------------------------------------------------------------------
+ * Global functions
+ *----------------------------------------------------------------------------*/
+extern uint32_t ASYNC_IsFinished( Async* pAsync ) ;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* #ifndef _ASYNC_ */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/can.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/can.h
new file mode 100644
index 0000000..d18fd09
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/can.h
@@ -0,0 +1,85 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2011, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+ * \file
+ *
+ * Definitions and function prototype for CAN.
+ */
+
+#ifndef _CAN_
+#define _CAN_
+
+/*----------------------------------------------------------------------------
+ * Definitions
+ *----------------------------------------------------------------------------*/
+
+/* CAN API return status */
+#define CAN_STATUS_SUCCESS 0
+#define CAN_STATUS_LOCKED 1
+#define CAN_STATUS_ABORTED 2
+#define CAN_STATUS_RESET 3
+
+/*----------------------------------------------------------------------------
+ * Types
+ *----------------------------------------------------------------------------*/
+typedef struct _SCanTransfer
+{
+ volatile uint8_t state ;
+ volatile uint8_t mailbox_number ;
+ volatile uint8_t sync_can ;
+ volatile uint32_t mode_reg ; /* CAN_MMR */
+ volatile uint32_t acceptance_mask_reg ; /* CAN_MAM */
+ volatile uint32_t identifier ; /* CAN_MID */
+ volatile uint32_t data_low_reg ; /* CAN_MDL */
+ volatile uint32_t data_high_reg ; /* CAN_MDH */
+ volatile uint32_t control_reg ; /* CAN_MCR */
+ volatile uint32_t mailbox_in_use ;
+ volatile int size ;
+} SCanTransfer ;
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+extern uint32_t CAN_Init( Can* pCan, uint32_t dwMCK, uint32_t dwBaudrate, SCanTransfer *pTransfer) ;
+
+extern void CAN_Disable( Can* pCan ) ;
+
+extern void CAN_ResetAllMailbox( Can* pCan, SCanTransfer* pTransfer) ;
+extern void CAN_TransferReset( Can* pCan, SCanTransfer* pTransfer ) ;
+extern void CAN_InitMailboxRegisters( Can* pCan, SCanTransfer* pTransfer ) ;
+
+extern uint32_t CAN_Write( Can* pCan, SCanTransfer* pTransfer ) ;
+extern uint32_t CAN_Read( Can* pCan, SCanTransfer* pTransfer ) ;
+
+extern uint32_t CAN_IsInIdle( Can* pCan, SCanTransfer* pTransfer ) ;
+
+extern void CAN_Handler( Can* pCan, SCanTransfer* pTransfer ) ;
+
+#endif /* _CAN_ */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/chipid.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/chipid.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/chipid.h
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/dacc.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/dacc.h
new file mode 100644
index 0000000..80944bc
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/dacc.h
@@ -0,0 +1,146 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * \section Purpose
+ *
+ * Interface for configuration the Analog-to-Digital Converter (DACC) peripheral.
+ *
+ * \section Usage
+ *
+ * -# Configurate the pins for DACC
+ * -# Initialize the DACC with DACC_Initialize().
+ * -# Select the active channel using DACC_EnableChannel()
+ * -# Start the conversion with DACC_StartConversion()
+ * -# Wait the end of the conversion by polling status with DACC_GetStatus()
+ * -# Finally, get the converted data using DACC_GetConvertedData()
+ *
+*/
+#ifndef _DACC_
+#define _DACC_
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+#include "chip.h"
+
+#include <stdint.h>
+#include <assert.h>
+
+/*------------------------------------------------------------------------------
+ * Definitions
+ *------------------------------------------------------------------------------*/
+#define DACC_CHANNEL_0 0
+#define DACC_CHANNEL_1 1
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/*------------------------------------------------------------------------------
+ * Macros function of register access
+ *------------------------------------------------------------------------------*/
+#define DACC_CfgModeReg(pDACC, mode) { \
+ (pDACC)->DACC_MR = (mode);\
+ }
+
+#define DACC_GetModeReg(pDACC) ((pDACC)->DACC_MR)
+
+#define DACC_StartConversion(pDACC) ((pDACC)->DACC_CR = DACC_CR_START)
+
+#define DACC_SoftReset(pDACC) ((pDACC)->DACC_CR = DACC_CR_SWRST)
+
+#define DACC_EnableChannel(pDACC, channel) {\
+ (pDACC)->DACC_CHER = (1 << (channel));\
+ }
+
+#define DACC_DisableChannel(pDACC, channel) {\
+ (pDACC)->DACC_CHDR = (1 << (channel));\
+ }
+
+#define DACC_EnableIt(pDACC, mode) {\
+ assert( ((mode)&0xFFF00000)== 0 ) ;\
+ (pDACC)->DACC_IER = (mode);\
+ }
+
+#define DACC_DisableIt(pDACC, mode) {\
+ assert( ((mode)&0xFFF00000)== 0 ) ;\
+ (pDACC)->DACC_IDR = (mode);\
+ }
+
+#define DACC_EnableDataReadyIt(pDACC) ((pDACC)->DACC_IER = AT91C_DACC_DRDY)
+
+#define DACC_GetStatus(pDACC) ((pDACC)->DACC_ISR)
+
+#define DACC_GetChannelStatus(pDACC) ((pDACC)->DACC_CHSR)
+
+#define DACC_GetInterruptMaskStatus(pDACC) ((pDACC)->DACC_IMR)
+
+#define DACC_GetLastConvertedData(pDACC) ((pDACC)->DACC_LCDR)
+
+#define DACC_CfgAnalogCtrlReg(pDACC,mode) {\
+ assert( ((mode) & 0xFFFCFF3C)==0 ) ;\
+ (pDACC)->DACC_ACR = (mode);\
+ }
+
+#define DACC_CfgExtModeReg(pDACC, extmode) {\
+ assert( ((extmode) & 0xFF00FFFE)==0 ) ;\
+ (pDACC)->DACC_EMR = (extmode);\
+ }
+
+#define DACC_GetAnalogCtrlReg(pDACC) ((pDACC)->DACC_ACR)
+
+/*------------------------------------------------------------------------------
+ * Exported functions
+ *------------------------------------------------------------------------------*/
+extern void DACC_Initialize( Dacc* pDACC,
+ uint8_t idDACC,
+ uint8_t trgEn,
+ uint8_t trgSel,
+ uint8_t word,
+ uint8_t sleepMode,
+ uint32_t mck,
+ uint8_t refresh,/*refresh period*/
+ uint8_t user_sel,/*user channel selection*/
+ uint32_t tag_mode,/*using tag for channel number*/
+ uint32_t startup
+ );
+
+
+extern void DACC_SetConversionData( Dacc* pDACC, uint32_t dwData ) ;
+
+extern uint32_t DACC_WriteBuffer( Dacc* pDACC, uint16_t* pwBuffer, uint32_t dwSize ) ;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* #ifndef _DACC_ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/dmac.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/dmac.h
new file mode 100644
index 0000000..73e89e9
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/dmac.h
@@ -0,0 +1,238 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support - ROUSSET -
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2006, Atmel Corporation
+
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaiimer below.
+ *
+ * - Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the disclaimer below in the documentation and/or
+ * other materials provided with the distribution.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/** \file */
+
+/** \addtogroup dmac_module Working with DMAC
+ *
+ * \section Usage
+ * <ul>
+ * <li> Enable or disable the a DMAC controller with DMAC_Enable() and or DMAC_Disable().</li>
+ * <li> Enable or disable %Dma interrupt using DMAC_EnableIt()or DMAC_DisableIt().</li>
+ * <li> Get %Dma interrupt status by DMAC_GetStatus() and DMAC_GetInterruptMask().</li>
+ * <li> Enable or disable specified %Dma channel with DMAC_EnableChannel() or DMAC_DisableChannel().</li>
+ * <li> Get %Dma channel status by DMAC_GetChannelStatus().</li>
+ * <li> ControlA and ControlB register is set by DMAC_SetControlA() and DMAC_SetControlB().</li>
+ * <li> Configure source and/or destination start address with DMAC_SetSourceAddr() and/or DMAC_SetDestinationAddr().</li>
+ * <li> Set %Dma descriptor address using DMAC_SetDescriptorAddr().</li>
+ * <li> Set source transfer buffer size with DMAC_SetBufferSize().</li>
+ * <li> Configure source and/or destination Picture-In-Picutre mode with DMAC_SetSourcePip() and/or DMAC_SetDestPip().</li>
+ * </ul>
+ *
+ * For more accurate information, please look at the DMAC section of the
+ * Datasheet.
+ *
+ * \sa \ref dmad_module
+ *
+ * Related files :\n
+ * \ref dmac.c\n
+ * \ref dmac.h.\n
+ *
+ */
+
+#ifndef DMAC_H
+#define DMAC_H
+/**@{*/
+#if defined sam3x2
+#elif defined sam3x2c | defined sam3a2
+#elif defined sam3x4
+#elif defined sam3x4c | defined sam3a4
+#elif defined sam3x8
+#elif defined sam3x8c | defined sam3a8
+#else
+ #error Library does not support the specified device.
+#endif
+
+/*------------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "chip.h"
+
+#include <stdint.h>
+
+/*------------------------------------------------------------------------------
+ * Definitions
+ *----------------------------------------------------------------------------*/
+
+/** \addtogroup dmac_defines DMAC Definitions
+ * @{
+ */
+ /** Number of DMA controllers */
+#define DMAC_CONTROLLER_NUM 1
+/** Number of DMA channels */
+#define DMAC_CHANNEL_NUM 6
+/** Max DMA single transfer size */
+#define DMAC_MAX_BT_SIZE 0xFFFF
+/** @}*/
+
+/*------------------------------------------------------------------------------
+ * Data structs
+ *----------------------------------------------------------------------------*/
+
+/** \addtogroup dmac_struct DMAC Data Structs
+ * @{
+ */
+/** DMA Transfer Descriptor as well as Linked List Item */
+typedef struct _DmaTransferDescriptor {
+ uint32_t dwSrcAddr; /**< Source buffer address */
+ uint32_t dwDstAddr; /**< Destination buffer address */
+ uint32_t dwCtrlA; /**< Control A register settings */
+ uint32_t dwCtrlB; /**< Control B register settings */
+ uint32_t dwDscAddr; /**< Next descriptor address */
+} sDmaTransferDescriptor;
+
+/** DMA channel control A */
+typedef struct _DmaCtrlA {
+ uint32_t btSize:16, /**< Buffer Transfer size */
+ scSize:3, /**< Source Chunk Transfer size */
+ reserve1:1,
+ dcSize:3, /**< Destination Chunk Transfer size */
+ reserve2:1,
+ srcWidth:2, /**< Source width */
+ reserve3:2,
+ dstWidth:2, /**< Destination width */
+ reserve4:1,
+ done:1; /**< The transfer is done */
+} sDmaCtrlA;
+
+/** DMA channel control B */
+typedef struct _DmaCtrlB {
+ uint32_t sIf:2, /**< Source Interface Selection Field */
+ reserve1:2,
+ dIf:2, /**< Destination Interface Selection Field */
+ reserve2:2,
+ srcPip:1, /**< Source Picture-in-picture mode enable */
+ reserve3:3,
+ dstPip:1, /**< Destination Picture-in-picture mode enable */
+ reserve4:3,
+ srcDscr:1, /**< Source Descriptor disabled */
+ reserve5:3,
+ dstDscr:1, /**< Destination Descriptor disabled */
+ fc:3, /**< Flow Controller */
+ srcIncr:2, /**< Source Fixed/Dec/Inc setting */
+ reserve6,
+ dstIncr:2, /**< Destination Fixed/Dec/Inc setting */
+ iEn:1, /**< Active low to enable interrupt */
+ autoEn:1; /**< Automatic multiple buffer transfer */
+} sDmaCtrlB;
+
+/** DMA channel Picture-In-Picture */
+typedef struct _DmaPip {
+ uint32_t pipHole:16, /**< Hole size */
+ pipBoundary:10,/**< Number of transfers to perform before
+ hole increse */
+ reserve:6;
+} sDmaPIP;
+/** @}*/
+
+/*------------------------------------------------------------------------------
+ * Global functions
+ *------------------------------------------------------------------------------*/
+/** \addtogroup dmac_functions
+ * @{
+ */
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+extern void DMAC_Modified_Arbiter( Dmac* pDmac);
+extern void DMAC_Enable( Dmac* pDmac );
+extern void DMAC_Disable( Dmac* pDmac );
+extern void DMAC_EnableIt (Dmac* pDmac, uint32_t dwInteruptMask );
+extern void DMAC_DisableIt (Dmac* pDmac, uint32_t dwInteruptMask );
+extern uint32_t DMAC_GetInterruptMask( Dmac* pDmac );
+extern uint32_t DMAC_GetStatus( Dmac* pDmac );
+extern uint32_t DMAC_GetMaskedStatus( Dmac* pDmac );
+extern void DMAC_EnableChannel( Dmac* pDmac, uint8_t ucChannel );
+extern void DMAC_EnableChannels( Dmac* pDmac, uint8_t ucChannel );
+extern void DMAC_DisableChannel( Dmac* pDmac, uint8_t ucChannel );
+extern void DMAC_DisableChannels( Dmac* pDmac, uint8_t ucChannel );
+extern void DMAC_SuspendChannel( Dmac* pDmac, uint8_t ucChannel );
+extern void DMAC_KeepChannel( Dmac* pDmac, uint8_t ucChannel );
+extern void DMAC_RestoreChannel( Dmac* pDmac, uint8_t ucChannel );
+extern uint32_t DMAC_GetChannelStatus( Dmac* pDmac );
+extern void DMAC_SetSourceAddr( Dmac* pDmac,
+ uint8_t ucChannel,
+ uint32_t dwSaddr );
+extern uint32_t DMAC_GetSourceAddr( Dmac * pDmac,
+ uint8_t ucChannel );
+extern void DMAC_SetDestinationAddr( Dmac* pDmac,
+ uint8_t ucChannel,
+ uint32_t dwDaddr );
+extern uint32_t DMAC_GetDestinationAddr( Dmac * pDmac,
+ uint8_t ucChannel );
+extern void DMAC_SetDescriptorAddr( Dmac* pDmac,
+ uint8_t ucChannel,
+ uint32_t dwDescr,
+ uint8_t ucDescrif );
+extern void DMAC_SetControlA( Dmac* pDmac,
+ uint8_t ucChannel,
+ uint32_t controlA );
+extern void DMAC_SetBufferSize( Dmac* pDmac,
+ uint8_t ucChannel,
+ uint16_t uwBuffsize);
+extern void DMAC_SetSingleTransferSize ( Dmac* pDmac,
+ uint8_t ucChannel,
+ uint8_t ucSrcWidth,
+ uint8_t ucDstWidth );
+extern void DMAC_SetChunkTransferSize ( Dmac* pDmac,
+ uint8_t ucChannel,
+ uint8_t ucScSize,
+ uint8_t ucDcSize);
+extern void DMAC_SetControlB( Dmac* pDmac,
+ uint8_t ucChannel,
+ uint32_t dwControlB );
+extern void DMAC_SetDescFetchMode( Dmac* pDmac,
+ uint8_t ucChannel,
+ uint8_t ucSrcDscr,
+ uint8_t ucDstDscr );
+extern void DMAC_SetFlowControl( Dmac* pDmac,
+ uint8_t ucChannel,
+ uint8_t ucFlowControl );
+extern void DMAC_SetCFG( Dmac* pDmac,
+ uint8_t ucChannel,
+ uint32_t dwConfiguration );
+extern void DMAC_SethandshakeInterface( Dmac* pDmac,
+ uint8_t ucChannel,
+ uint8_t ucSrcH2sel,
+ uint8_t ucDstH2sel );
+#ifdef __cplusplus
+}
+#endif
+
+/** @}*/
+/**@}*/
+#endif //#ifndef DMAC_H
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/eefc.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/eefc.h
new file mode 100644
index 0000000..dde2c8d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/eefc.h
@@ -0,0 +1,115 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * \section Purpose
+ *
+ * Interface for configuration the Enhanced Embedded Flash Controller (EEFC) peripheral.
+ *
+ * \section Usage
+ *
+ * -# Enable/disable %flash ready interrupt sources using EFC_EnableFrdyIt()
+ * and EFC_DisableFrdyIt().
+ * -# Translates the given address into which EEFC, page and offset values
+ * for difference density %flash memory using EFC_TranslateAddress().
+ * -# Computes the address of a %flash access given the EFC, page and offset
+ * for difference density %flash memory using EFC_ComputeAddress().
+ * -# Start the executing command with EFC_StartCommand()
+ * -# Retrieve the current status of the EFC using EFC_GetStatus().
+ * -# Retrieve the result of the last executed command with EFC_GetResult().
+ */
+
+#ifndef _EEFC_
+#define _EEFC_
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+#include "chip.h"
+
+#include <stdint.h>
+
+/*----------------------------------------------------------------------------
+ * Definitions
+ *----------------------------------------------------------------------------*/
+/* EFC command */
+#define EFC_FCMD_GETD 0x00
+#define EFC_FCMD_WP 0x01
+#define EFC_FCMD_WPL 0x02
+#define EFC_FCMD_EWP 0x03
+#define EFC_FCMD_EWPL 0x04
+#define EFC_FCMD_EA 0x05
+#define EFC_FCMD_SLB 0x08
+#define EFC_FCMD_CLB 0x09
+#define EFC_FCMD_GLB 0x0A
+#define EFC_FCMD_SFB 0x0B
+#define EFC_FCMD_CFB 0x0C
+#define EFC_FCMD_GFB 0x0D
+#define EFC_FCMD_STUI 0x0E /* Start unique ID */
+#define EFC_FCMD_SPUI 0x0F /* Stop unique ID */
+
+/* The IAP function entry addreass */
+#define CHIP_FLASH_IAP_ADDRESS (IROM_ADDR + 8)
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+extern void EFC_EnableFrdyIt( Efc* efc ) ;
+
+extern void EFC_DisableFrdyIt( Efc* efc ) ;
+
+extern void EFC_SetWaitState( Efc* efc, uint8_t cycles ) ;
+
+extern void EFC_TranslateAddress( Efc** pEfc, uint32_t dwAddress, uint16_t *pwPage, uint16_t *pwOffset ) ;
+
+extern void EFC_ComputeAddress( Efc* efc, uint16_t wPage, uint16_t wOffset, uint32_t *pdwAddress ) ;
+
+extern void EFC_StartCommand( Efc* efc, uint32_t dwCommand, uint32_t dwArgument ) ;
+
+extern uint32_t EFC_PerformCommand( Efc* efc, uint32_t dwCommand, uint32_t dwArgument, uint32_t dwUseIAP ) ;
+
+extern uint32_t EFC_GetStatus( Efc* efc ) ;
+
+extern uint32_t EFC_GetResult( Efc* efc ) ;
+
+extern void EFC_SetFlashAccessMode(Efc* efc, uint32_t dwMode) ;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* #ifndef _EEFC_ */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/emac.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/emac.h
new file mode 100644
index 0000000..bb16269
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/emac.h
@@ -0,0 +1,305 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/** \file */
+
+/** \addtogroup emac_module
+ * @{
+ * Provides the interface to configure and use the EMAC peripheral.
+ *
+ * \section emac_usage Usage
+ * - Configure Emac::EMAC_NCFG with EMAC_Configure(), some of related controls
+ * are also available, such as:
+ * - EMAC_SetSpeed(): Setup EMAC working clock.
+ * - EMAC_FullDuplexEnable(): Working in full duplex or not.
+ * - EMAC_CpyAllEnable(): Copying all valid frames (\ref EMAC_NCFG_CAF).
+ * - ...
+ * - Setup Emac::EMAC_NCR with EMAC_NetworkControl(), more related controls
+ * can modify with:
+ * - EMAC_ReceiveEnable(): Enable/Disable Rx.
+ * - EMAC_TransmitEnable(): Enable/Disable Tx.
+ * - EMAC_BroadcastDisable(): Enable/Disable broadcast receiving.
+ * - ...
+ * - Manage EMAC interrupts with EMAC_EnableIt(), EMAC_DisableIt(),
+ * EMAC_GetItMask() and EMAC_GetItStatus().
+ * - Manage EMAC Tx/Rx status with EMAC_GetTxStatus(), EMAC_GetRxStatus()
+ * EMAC_ClearTxStatus() and EMAC_ClearRxStatus().
+ * - Manage EMAC Queue with EMAC_SetTxQueue(), EMAC_GetTxQueue(),
+ * EMAC_SetRxQueue() and EMAC_GetRxQueue(), the queue descriptor can define
+ * by \ref sEmacRxDescriptor and \ref sEmacTxDescriptor.
+ * - Manage PHY through EMAC is performed by
+ * - EMAC_ManagementEnable(): Enable/Disable PHY management.
+ * - EMAC_PHYMaintain(): Execute PHY management commands.
+ * - EMAC_PHYData(): Return PHY management data.
+ * - EMAC_IsIdle(): Check if PHY is idle.
+ * - Setup EMAC parameters with following functions:
+ * - EMAC_SetHash(): Set Hash value.
+ * - EMAC_SetAddress(): Set MAC address.
+ * - Enable/Disable EMAC transceiver clock via EMAC_TransceiverClockEnable()
+ * - Switch EMAC MII/RMII mode through EMAC_RMIIEnable()
+ *
+ * For more accurate information, please look at the EMAC section of the
+ * Datasheet.
+ *
+ * \sa \ref emacd_module
+ *
+ * Related files:\n
+ * emac.c\n
+ * emac.h.\n
+ *
+ * \defgroup emac_defines EMAC Defines
+ * \defgroup emac_structs EMAC Data Structs
+ * \defgroup emac_functions EMAC Functions
+ */
+/**@}*/
+
+#ifndef _EMAC_H
+#define _EMAC_H
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+#include "chip.h"
+
+#include <stdint.h>
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/*----------------------------------------------------------------------------
+ * Defines
+ *----------------------------------------------------------------------------*/
+/** \addtogroup emac_defines
+ @{*/
+
+/** The buffer addresses written into the descriptors must be aligned so the
+ last few bits are zero. These bits have special meaning for the EMAC
+ peripheral and cannot be used as part of the address. */
+#define EMAC_RXD_ADDR_MASK 0xFFFFFFFC
+#define EMAC_RXD_bmWRAP (1ul << 1) /**< Wrap bit */
+#define EMAC_RXD_bmOWNERSHIP (1ul << 0) /**< Ownership bit */
+
+#define EMAC_RXD_bmBROADCAST (1ul << 31) /**< Broadcast detected */
+#define EMAC_RXD_bmMULTIHASH (1ul << 30) /**< Multicast hash match */
+#define EMAC_RXD_bmUNIHASH (1ul << 29) /**< Unicast hash match */
+#define EMAC_RXD_bmEXTADDR (1ul << 28) /**< External address match */
+#define EMAC_RXD_bmADDR1 (1ul << 26) /**< Address 1 match */
+#define EMAC_RXD_bmADDR2 (1ul << 25) /**< Address 2 match */
+#define EMAC_RXD_bmADDR3 (1ul << 24) /**< Address 3 match */
+#define EMAC_RXD_bmADDR4 (1ul << 23) /**< Address 4 match */
+#define EMAC_RXD_bmTYPE (1ul << 22) /**< Type ID match */
+#define EMAC_RXD_bmVLAN (1ul << 21) /**< VLAN tag detected */
+#define EMAC_RXD_bmPRIORITY (1ul << 20) /**< Prority tag detected */
+#define EMAC_RXD_PRIORITY_MASK (3ul << 17) /**< VLAN prority */
+#define EMAC_RXD_bmCFI (1ul << 16) /**< Concatenation Format Indicator
+ only if bit 21 is set */
+#define EMAC_RXD_bmEOF (1ul << 15) /**< End of frame */
+#define EMAC_RXD_bmSOF (1ul << 14) /**< Start of frame */
+#define EMAC_RXD_OFFSET_MASK /**< Receive buffer offset */
+#define EMAC_RXD_LEN_MASK (0xFFF) /**< Length of frame including FCS
+ (if selected) */
+#define EMAC_RXD_LENJUMBO_MASK (0x3FFF) /**< Jumbo frame length */
+
+#define EMAC_TXD_bmUSED (1ul << 31) /**< Frame is transmitted */
+#define EMAC_TXD_bmWRAP (1ul << 30) /**< Last descriptor */
+#define EMAC_TXD_bmERROR (1ul << 29) /**< Retry limit exceed, error */
+#define EMAC_TXD_bmUNDERRUN (1ul << 28) /**< Transmit underrun */
+#define EMAC_TXD_bmEXHAUSTED (1ul << 27) /**< Buffer exhausted */
+#define EMAC_TXD_bmNOCRC (1ul << 16) /**< No CRC */
+#define EMAC_TXD_bmLAST (1ul << 15) /**< Last buffer in frame */
+#define EMAC_TXD_LEN_MASK (0x7FF) /**< Length of buffer */
+
+
+/** The MAC can support frame lengths up to 1536 bytes. */
+#define EMAC_FRAME_LENTGH_MAX 1536
+
+/** @}*/
+/*----------------------------------------------------------------------------
+ * Types
+ *----------------------------------------------------------------------------*/
+/** \addtogroup emac_structs
+ @{*/
+#if defined __ICCARM__
+#pragma pack(4) /* IAR */
+#define __attribute__(...) /* IAR */
+#endif /* IAR */
+
+/** Receive buffer descriptor struct */
+typedef struct _EmacRxDescriptor {
+ union _EmacRxAddr {
+ uint32_t val;
+ struct _EmacRxAddrBM {
+ uint32_t bOwnership:1, /**< User clear, EMAC set this to one once
+ it has successfully written a frame to
+ memory */
+ bWrap:1, /**< Marks last descriptor in receive buffer */
+ addrDW:30; /**< Address in number of DW */
+ } bm;
+ } addr; /**< Address, Wrap & Ownership */
+ union _EmacRxStatus {
+ uint32_t val;
+ struct _EmacRxStatusBM {
+ uint32_t len:12, /** Length of frame including FCS */
+ offset:2, /** Receive buffer offset,
+ bits 13:12 of frame length for jumbo
+ frame */
+ bSof:1, /** Start of frame */
+ bEof:1, /** End of frame */
+ bCFI:1, /** Concatenation Format Indicator */
+ vlanPriority:3, /** VLAN priority (if VLAN detected) */
+ bPriorityDetected:1, /** Priority tag detected */
+ bVlanDetected:1, /**< VLAN tag detected */
+ bTypeIDMatch:1, /**< Type ID match */
+ bAddr4Match:1, /**< Address register 4 match */
+ bAddr3Match:1, /**< Address register 3 match */
+ bAddr2Match:1, /**< Address register 2 match */
+ bAddr1Match:1, /**< Address register 1 match */
+ reserved:1,
+ bExtAddrMatch:1, /**< External address match */
+ bUniHashMatch:1, /**< Unicast hash match */
+ bMultiHashMatch:1, /**< Multicast hash match */
+ bBroadcastDetected:1; /**< Global all ones broadcast
+ address detected */
+ } bm;
+ } status;
+} __attribute__ ((packed, aligned(8))) sEmacRxDescriptor; /* GCC */
+
+/** Transmit buffer descriptor struct */
+typedef struct _EmacTxDescriptor {
+ uint32_t addr;
+ union _EmacTxStatus {
+ uint32_t val;
+ struct _EmacTxStatusBM {
+ uint32_t len:11, /**< Length of buffer */
+ reserved:4,
+ bLastBuffer:1, /**< Last buffer (in the current frame) */
+ bNoCRC:1, /**< No CRC */
+ reserved1:10,
+ bExhausted:1, /**< Buffer exhausted in mid frame */
+ bUnderrun:1, /**< Transmit underrun */
+ bError:1, /**< Retry limit exceeded, error detected */
+ bWrap:1, /**< Marks last descriptor in TD list */
+ bUsed:1; /**< User clear, EMAC sets this once a frame
+ has been successfully transmitted */
+ } bm;
+ } status;
+}__attribute__ ((packed, aligned(8))) sEmacTxDescriptor; /* GCC */
+
+#ifdef __ICCARM__ /* IAR */
+#pragma pack() /* IAR */
+#endif /* IAR */
+
+/** @}*/
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/** \addtogroup emac_functions
+ @{*/
+extern void EMAC_NetworkControl(Emac *pEmac, uint32_t bmNCR);
+extern uint32_t EMAC_GetNetworkControl(Emac * pEmac);
+extern void EMAC_ReceiveEnable(Emac * pEmac,uint8_t bEnaDis);
+extern void EMAC_TransmitEnable(Emac * pEmac,uint8_t bEnaDis);
+extern void EMAC_ManagementEnable(Emac * pEmac,uint8_t bEnaDis);
+extern void EMAC_ClearStatistics(Emac * pEmac);
+extern void EMAC_IncreaseStatistics(Emac * pEmac);
+extern void EMAC_StatisticsWriteEnable(Emac * pEmac,uint8_t bEnaDis);
+extern void EMAC_BackPressureEnable(Emac * pEmac,uint8_t bEnaDis);
+extern void EMAC_TransmissionStart(Emac * pEmac);
+extern void EMAC_TransmissionHalt(Emac * pEmac);
+
+extern void EMAC_Configure(Emac * pEmac,uint32_t dwCfg);
+extern uint32_t EMAC_GetConfigure(Emac * pEmac);
+extern void EMAC_SetSpeed(Emac * pEmac,uint8_t bSpeed);
+extern void EMAC_FullDuplexEnable(Emac * pEmac,uint8_t bFD);
+extern void EMAC_CpyAllEnable(Emac * pEmac,uint8_t bCAF);
+extern void EMAC_JumboFrameEnable(Emac * pEmac,uint8_t bEnaDis);
+extern void EMAC_BroadcastDisable(Emac * pEmac,uint8_t bDisEna);
+extern void EMAC_MulticastHashEnable(Emac * pEmac,uint8_t bEnaDis);
+extern void EMAC_BigFrameEnable(Emac * pEmac,uint8_t bEnaDis);
+extern uint8_t EMAC_SetClock(Emac * pEmac,uint32_t dwMck);
+extern void EMAC_RetryTestEnable(Emac * pEmac,uint8_t bEnaDis);
+extern void EMAC_PauseFrameEnable(Emac * pEmac,uint8_t bEnaDis);
+extern void EMAC_SetRxBufferOffset(Emac * pEmac,uint8_t bOffset);
+extern void EMAC_RxLenthCheckEnable(Emac * pEmac,uint8_t bEnaDis);
+extern void EMAC_DiscardFCSEnable(Emac * pEmac,uint8_t bEnaDis);
+extern void EMAC_EFRHD(Emac * pEmac,uint8_t bEnaDis);
+extern void EMAC_IRXFCS(Emac * pEmac,uint8_t bEnaDis);
+
+extern uint32_t EMAC_GetStatus(Emac * pEmac);
+extern uint8_t EMAC_GetMDIO(Emac * pEmac);
+extern uint8_t EMAC_IsIdle(Emac * pEmac);
+
+extern uint32_t EMAC_GetTxStatus(Emac * pEmac);
+extern void EMAC_ClearTxStatus(Emac * pEmac,uint32_t dwStatus);
+
+extern uint32_t EMAC_GetRxStatus(Emac * pEmac);
+extern void EMAC_ClearRxStatus(Emac * pEmac,uint32_t dwStatus);
+
+extern void EMAC_SetTxQueue(Emac * pEmac,uint32_t dwAddr);
+extern uint32_t EMAC_GetTxQueue(Emac * pEmac);
+
+extern void EMAC_SetRxQueue(Emac * pEmac,uint32_t dwAddr);
+extern uint32_t EMAC_GetRxQueue(Emac * pEmac);
+
+extern void EMAC_EnableIt(Emac * pEmac,uint32_t dwSources);
+extern void EMAC_DisableIt(Emac * pEmac,uint32_t dwSources);
+extern uint32_t EMAC_GetItMask(Emac * pEmac);
+extern uint32_t EMAC_GetItStatus(Emac * pEmac);
+
+extern void EMAC_PHYMaintain(Emac * pEmac,
+ uint8_t bPhyAddr, uint8_t bRegAddr,
+ uint8_t bRW,
+ uint16_t wData);
+extern uint16_t EMAC_PHYData(Emac * pEmac);
+
+extern void EMAC_SetPauseTime(Emac * pEmac,uint16_t wPTime);
+
+extern void EMAC_SetHash(Emac * pEmac,uint32_t dwHashTop,uint32_t dwHashBottom);
+extern void EMAC_SetHash64(Emac * pEmac,uint64_t ddwHash);
+
+extern void EMAC_SetAddress(Emac * pEmac,uint8_t bIndex,uint8_t * pMacAddr);
+extern void EMAC_SetAddress32(Emac * pEmac,uint8_t bIndex,
+ uint32_t dwMacT,uint32_t dwMacB);
+extern void EMAC_SetAddress64(Emac * pEmac,uint8_t bIndex,uint64_t ddwMac);
+
+extern void EMAC_SetTypeID(Emac * pEmac,uint16_t wTID);
+extern uint16_t EMAC_GetTypeID(Emac * pEmac);
+
+extern void EMAC_RMIIEnable(Emac * pEmac,uint8_t bEnaDis);
+extern void EMAC_TransceiverClockEnable(Emac * pEmac,uint8_t bEnaDis);
+/** @}*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* #ifndef _EMAC_H */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/exceptions.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/exceptions.h
new file mode 100644
index 0000000..892c6d0
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/exceptions.h
@@ -0,0 +1,112 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ * Interface for default exception handlers.
+ */
+
+#ifndef _EXCEPTIONS_
+#define _EXCEPTIONS_
+
+/*----------------------------------------------------------------------------
+ * Types
+ *----------------------------------------------------------------------------*/
+
+/* Function prototype for exception table items (interrupt handler). */
+typedef void( *IntFunc )( void ) ;
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/* Default empty handler */
+extern void IrqHandlerNotUsed( void ) ;
+
+/* Cortex-M3 core handlers */
+extern void NMI_Handler( void );
+extern void HardFault_Handler( void );
+extern void MemManage_Handler( void );
+extern void BusFault_Handler( void );
+extern void UsageFault_Handler( void );
+extern void SVC_Handler( void );
+extern void DebugMon_Handler( void );
+extern void PendSV_Handler( void );
+extern void SysTick_Handler( void );
+
+/* Peripherals handlers */
+extern void ACC_IrqHandler( void ) ;
+extern void ADC_IrqHandler( void ) ;
+extern void CAN0_IrqHandler( void ) ;
+extern void CAN1_IrqHandler( void ) ;
+extern void CRCCU_IrqHandler( void ) ;
+extern void DACC_IrqHandler( void ) ;
+extern void DMAC_IrqHandler( void ) ;
+extern void EFC0_IrqHandler( void ) ;
+extern void EFC1_IrqHandler( void ) ;
+extern void EMAC_IrqHandler( void ) ;
+extern void HSMCI_IrqHandler( void ) ;
+extern void PIOA_IrqHandler( void ) ;
+extern void PIOB_IrqHandler( void ) ;
+extern void PIOC_IrqHandler( void ) ;
+extern void PIOD_IrqHandler( void ) ;
+extern void PIOE_IrqHandler( void ) ;
+extern void PIOF_IrqHandler( void ) ;
+extern void PMC_IrqHandler( void ) ;
+extern void PWM_IrqHandler( void ) ;
+extern void RSTC_IrqHandler( void ) ;
+extern void RTC_IrqHandler( void ) ;
+extern void RTT_IrqHandler( void ) ;
+extern void SDRAMC_IrqHandler( void ) ;
+extern void SMC_IrqHandler( void ) ;
+extern void SPI0_IrqHandler( void ) ;
+extern void SPI1_IrqHandler( void ) ;
+extern void SSC_IrqHandler( void ) ;
+extern void SUPC_IrqHandler( void ) ;
+extern void TC0_IrqHandler( void ) ;
+extern void TC1_IrqHandler( void ) ;
+extern void TC2_IrqHandler( void ) ;
+extern void TC3_IrqHandler( void ) ;
+extern void TC4_IrqHandler( void ) ;
+extern void TC5_IrqHandler( void ) ;
+extern void TC6_IrqHandler( void ) ;
+extern void TC7_IrqHandler( void ) ;
+extern void TC8_IrqHandler( void ) ;
+extern void TRNG_IrqHandler( void ) ;
+extern void TWI0_IrqHandler( void ) ;
+extern void TWI1_IrqHandler( void ) ;
+extern void UART_IrqHandler( void ) ;
+extern void UOTGHS_IrqHandler( void ) ;
+extern void USART0_IrqHandler( void ) ;
+extern void USART1_IrqHandler( void ) ;
+extern void USART2_IrqHandler( void ) ;
+extern void USART3_IrqHandler( void ) ;
+extern void WDT_IrqHandler( void ) ;
+
+#endif /* _EXCEPTIONS_ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/flashd.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/flashd.h
new file mode 100644
index 0000000..59064cb
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/flashd.h
@@ -0,0 +1,79 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+*/
+
+/**
+ * \file
+ *
+ * The flash driver provides the unified interface for flash program operations.
+ *
+ */
+
+#ifndef _FLASHD_
+#define _FLASHD_
+
+#include <stdint.h>
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+extern void FLASHD_Initialize( uint32_t dwMCk, uint32_t dwUseIAP ) ;
+
+extern uint32_t FLASHD_Erase( uint32_t dwAddress ) ;
+
+extern uint32_t FLASHD_Write( uint32_t dwAddress, const void *pvBuffer, uint32_t dwSize ) ;
+
+extern uint32_t FLASHD_Lock( uint32_t dwStart, uint32_t dwEnd, uint32_t *pdwActualStart, uint32_t *pdwActualEnd ) ;
+
+extern uint32_t FLASHD_Unlock( uint32_t dwStart, uint32_t dwEnd, uint32_t *pdwActualStart, uint32_t *pdwActualEnd ) ;
+
+extern uint32_t FLASHD_IsLocked( uint32_t dwStart, uint32_t dwEnd ) ;
+
+extern uint32_t FLASHD_SetGPNVM( uint8_t gpnvm ) ;
+
+extern uint32_t FLASHD_ClearGPNVM( uint8_t gpnvm ) ;
+
+extern uint32_t FLASHD_IsGPNVMSet( uint8_t gpnvm ) ;
+
+#define FLASHD_IsSecurityBitSet() FLASHD_IsGPNVMSet( 0 )
+
+#define FLASHD_SetSecurityBit() FLASHD_SetGPNVM( 0 )
+
+extern uint32_t FLASHD_ReadUniqueID( uint32_t* pdwUniqueID ) ;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* #ifndef _FLASHD_ */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/hsmci.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/hsmci.h
new file mode 100644
index 0000000..1a5476e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/hsmci.h
@@ -0,0 +1,152 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/** \file */
+
+/** \addtogroup hsmci_module Working with HSMCI
+ * \ingroup mcid_module
+ *
+ * \section Purpose
+ *
+ * The HSMCI driver provides the interface to configure and use the HSMCI
+ * peripheral.
+ *
+ * \section Usage
+ *
+ * -# HSMCI_Enable(), MCI_Disable(): Enable/Disable HSMCI interface.
+ * -# HSMCI_Reset(): Reset HSMCI interface.
+ * -# HSMCI_Select(): HSMCI slot and buswidth selection
+ * (\ref Hsmci::HSMCI_SDCR).
+ * -# HSMCI_ConfigureMode(): Configure the MCI CLKDIV in the _MR register
+ * (\ref Hsmci::HSMCI_MR).
+ * -# HSMCI_EnableIt(), HSMCI_DisableIt(), HSMCI_GetItMask(), HSMCI_GetStatus()
+ * HSMCI Interrupt control (\ref Hsmci::HSMCI_IER, \ref Hsmci::HSMCI_IDR,
+ * \ref Hsmci::HSMCI_IMR, \ref Hsmci::HSMCI_SR).
+ * -# HSMCI_ConfigureTransfer(): Setup block length and count for MCI transfer
+ * (\ref Hsmci::HSMCI_BLKR).
+ * -# HSMCI_SendCmd(): Send SD/MMC command with argument
+ * (\ref Hsmci::HSMCI_ARGR, \ref Hsmci::HSMCI_CMDR).
+ * -# HSMCI_GetResponse(): Get SD/MMC response after command finished
+ * (\ref Hsmci::HSMCI_RSPR).
+ * -# HSMCI_ConfigureDma(): Configure MCI DMA transfer
+ * (\ref Hsmci::HSMCI_DMA).
+ * -# HSMCI_Configure(): Configure the HSMCI interface (\ref Hsmci::HSMCI_CFG).
+ * -# HSMCI_HsEnable(), HSMCI_IsHsEnabled(): High Speed control.
+ *
+ * For more accurate information, please look at the HSMCI section of the
+ * Datasheet.
+ *
+ * \sa \ref mcid_module
+ *
+ * Related files :\n
+ * \ref hsmci.h\n
+ * \ref hsmci.c.\n
+ */
+
+#ifndef HSMCID_H
+#define HSMCID_H
+/** \addtogroup hsmci_module
+ *@{
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "chip.h"
+
+#include <stdint.h>
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+/** \addtogroup hsmci_functions HSMCI Functions
+ * @{
+ */
+
+extern void HSMCI_Enable(Hsmci* pRMci);
+extern void HSMCI_Disable(Hsmci* pRMci);
+extern void HSMCI_Reset(Hsmci* pRMci, uint8_t bBackup);
+
+extern void HSMCI_Select(Hsmci * pRMci,uint8_t bSlot,uint8_t bBusWidth);
+extern void HSMCI_SetSlot(Hsmci * pRMci,uint8_t bSlot);
+extern void HSMCI_SetBusWidth(Hsmci * pRMci,uint8_t bBusWidth);
+extern uint8_t HSMCI_GetBusWidth(Hsmci * pRMci);
+
+extern void HSMCI_ConfigureMode(Hsmci *pRMci, uint32_t dwMode);
+extern uint32_t HSMCI_GetMode(Hsmci *pRMci);
+extern void HSMCI_ProofEnable(Hsmci *pRMci, uint8_t bRdProof, uint8_t bWrProof);
+extern void HSMCI_PadvCtl(Hsmci *pRMci, uint8_t bPadv);
+extern void HSMCI_FByteEnable(Hsmci *pRMci, uint8_t bFByteEn);
+extern uint8_t HSMCI_IsFByteEnabled(Hsmci * pRMci);
+extern void HSMCI_DivCtrl(Hsmci *pRMci, uint8_t bClkDiv, uint8_t bPwsDiv);
+
+extern void HSMCI_EnableIt(Hsmci *pRMci, uint32_t dwSources);
+extern void HSMCI_DisableIt(Hsmci *pRMci, uint32_t dwSources);
+extern uint32_t HSMCI_GetItMask(Hsmci *pRMci);
+
+extern void HSMCI_ConfigureTransfer(Hsmci * pRMci,uint16_t wBlkLen,uint16_t wCnt);
+extern void HSMCI_SetBlockLen(Hsmci * pRMci,uint16_t wBlkSize);
+extern void HSMCI_SetBlockCount(Hsmci * pRMci,uint16_t wBlkCnt);
+
+extern void HSMCI_ConfigureCompletionTO(Hsmci *pRMci, uint32_t dwConfigure);
+extern void HSMCI_ConfigureDataTO(Hsmci *pRMci, uint32_t dwConfigure);
+
+extern void HSMCI_SendCmd(Hsmci * pRMci,uint32_t dwCmd,uint32_t dwArg);
+extern uint32_t HSMCI_GetResponse(Hsmci *pRMci);
+extern uint32_t HSMCI_Read(Hsmci *pRMci);
+extern void HSMCI_ReadFifo(Hsmci *pRMci, uint8_t *pdwData, uint32_t dwSize);
+extern void HSMCI_Write(Hsmci *pRMci, uint32_t dwData);
+extern void HSMCI_WriteFifo(Hsmci *pRMci, uint8_t *pdwData, uint32_t dwSize);
+
+extern uint32_t HSMCI_GetStatus(Hsmci *pRMci);
+
+extern void HSMCI_ConfigureDma(Hsmci *pRMci, uint32_t dwConfigure);
+extern void HSMCI_EnableDma(Hsmci * pRMci,uint8_t bEnable);
+extern void HSMCI_SetDmaOffset(Hsmci * pRMci,uint8_t bOffset);
+
+extern void HSMCI_Configure(Hsmci *pRMci, uint32_t dwConfigure);
+extern void HSMCI_HsEnable(Hsmci *pRMci, uint8_t bHsEnable);
+extern uint8_t HSMCI_IsHsEnabled(Hsmci *pRMci);
+
+extern void HSMCI_BusWidthCtl(Hsmci *pRMci, uint8_t bBusWidth);
+extern void HSMCI_SlotCtl(Hsmci *pRMci, uint8_t bSlot);
+extern uint8_t HSMCI_GetSlot(Hsmci *pRMci);
+
+extern void HSMCI_ConfigureWP(Hsmci *pRMci, uint32_t dwConfigure);
+extern uint32_t HSMCI_GetWPStatus(Hsmci *pRMci);
+
+#ifdef __cplusplus
+}
+#endif
+
+/** @}*/
+/**@}*/
+#endif //#ifndef HSMCID_H
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/matrix.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/matrix.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/matrix.h
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/pio.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/pio.h
new file mode 100644
index 0000000..b695226
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/pio.h
@@ -0,0 +1,155 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * \section Purpose
+ *
+ * This file provides a basic API for PIO configuration and usage of
+ * user-controlled pins. Please refer to the board.h file for a list of
+ * available pin definitions.
+ *
+ * \section Usage
+ *
+ * -# Define a constant pin description array such as the following one, using
+ * the existing definitions provided by the board.h file if possible:
+ * \code
+ * const Pin pPins[] = {PIN_USART0_TXD, PIN_USART0_RXD};
+ * \endcode
+ * Alternatively, it is possible to add new pins by provided the full Pin
+ * structure:
+ * \code
+ * // Pin instance to configure PA10 & PA11 as inputs with the internal
+ * // pull-up enabled.
+ * const Pin pPins = {
+ * (1 << 10) | (1 << 11),
+ * REG_PIOA,
+ * ID_PIOA,
+ * PIO_INPUT,
+ * PIO_PULLUP
+ * };
+ * \endcode
+ * -# Configure a pin array by calling PIO_Configure() with a pointer to the
+ * array and its size (which is computed using the PIO_LISTSIZE macro).
+ * -# Change and get the value of a user-controlled pin using the PIO_Set,
+ * PIO_Clear and PIO_Get methods.
+ * -# Get the level being currently output by a user-controlled pin configured
+ * as an output using PIO_GetOutputDataStatus().
+ */
+
+#ifndef _PIO_
+#define _PIO_
+
+/*
+ * Headers
+ */
+
+#include "chip.h"
+
+#include <stdint.h>
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/*
+ * Global Definitions
+ */
+
+/**
+ * Definitions for pin usage types
+ */
+typedef enum _EPIO_PinType
+{
+/** The pin is controlled by the associated signal of peripheral A. */
+ PIO_PERIPH_A=0u,
+/** The pin is controlled by the associated signal of peripheral B. */
+ PIO_PERIPH_B,
+/** The pin is an input. */
+ PIO_INPUT,
+/** The pin is an output and has a default level of 0. */
+ PIO_OUTPUT_0,
+ /** The pin is an output and has a default level of 1. */
+ PIO_OUTPUT_1
+} EPIO_PinType ;
+
+/**
+ * Definitions to be used as attributes in PIO API functions calls
+ */
+
+ /** Default pin configuration (no attribute). */
+#define PIO_DEFAULT (0u << 0)
+/** The internal pin pull-up is active. */
+#define PIO_PULLUP (1u << 0)
+/** The internal glitch filter is active. */
+#define PIO_DEGLITCH (1u << 1)
+/** The pin is open-drain. */
+#define PIO_OPENDRAIN (1u << 2)
+/** The internal debouncing filter is active. */
+#define PIO_DEBOUNCE (1u << 3)
+/** Enable additional interrupt modes. */
+#define PIO_IT_AIME (1u << 4)
+/** Interrupt High Level/Rising Edge detection is active. */
+#define PIO_IT_RE_OR_HL (1u << 5)
+/** Interrupt Edge detection is active. */
+#define PIO_IT_EDGE (1u << 6)
+/** Low level interrupt is active */
+#define PIO_IT_LOW_LEVEL (0 | 0 | PIO_IT_AIME)
+/** High level interrupt is active */
+#define PIO_IT_HIGH_LEVEL (PIO_IT_RE_OR_HL | 0 | PIO_IT_AIME)
+/** Falling edge interrupt is active */
+#define PIO_IT_FALL_EDGE (0 | PIO_IT_EDGE | PIO_IT_AIME)
+/** Rising edge interrupt is active */
+#define PIO_IT_RISE_EDGE (PIO_IT_RE_OR_HL | PIO_IT_EDGE | PIO_IT_AIME)
+/** The output is high. */
+#define PIO_OUTPUT_HIGH (1u << 7)
+ /** The output is low. */
+#define PIO_OUTPUT_LOW (0u << 7)
+ /** The WP is enable */
+#define PIO_WPMR_WPEN_EN ( 0x01 << 0 )
+ /** The WP is disable */
+#define PIO_WPMR_WPEN_DIS ( 0x00 << 0 )
+ /** Valid WP key */
+#define PIO_WPMR_WPKEY_VALID ( 0x50494F << 8 )
+/*
+ * Global Functions
+ */
+
+extern void PIO_SetPeripheralA( Pio *pio, uint32_t dwMask, uint32_t dwOptions ) ;
+extern void PIO_SetPeripheralB( Pio *pio, uint32_t dwMask, uint32_t dwOptions ) ;
+extern void PIO_SetInput( Pio *pio, uint32_t dwMask, uint32_t dwAttributes ) ;
+extern void PIO_SetOutput( Pio* pPio, uint32_t dwMask, uint32_t dwOptions ) ;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* #ifndef _PIO_ */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/pio_it.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/pio_it.h
new file mode 100644
index 0000000..c81f8fd
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/pio_it.h
@@ -0,0 +1,89 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * \par Purpose
+ *
+ * Configuration and handling of interrupts on PIO status changes. The API
+ * provided here have several advantages over the traditional PIO interrupt
+ * configuration approach:
+ * - It is highly portable
+ * - It automatically demultiplexes interrupts when multiples pins have been
+ * configured on a single PIO controller
+ * - It allows a group of pins to share the same interrupt
+ *
+ * However, it also has several minor drawbacks that may prevent from using it
+ * in particular applications:
+ * - It enables the clocks of all PIO controllers
+ * - PIO controllers all share the same interrupt handler, which does the
+ * demultiplexing and can be slower than direct configuration
+ * - It reserves space for a fixed number of interrupts, which can be
+ * increased by modifying the appropriate constant in pio_it.c.
+ *
+ * \par Usage
+ *
+ * -# Initialize the PIO interrupt mechanism using PIO_InitializeInterrupts()
+ * with the desired priority (0 ... 7).
+ * -# Configure a status change interrupt on one or more pin(s) with
+ * PIO_ConfigureIt().
+ * -# Enable & disable interrupts on pins using PIO_EnableIt() and
+ * PIO_DisableIt().
+ */
+
+#ifndef _PIO_IT_
+#define _PIO_IT_
+
+/*
+ * Headers
+ */
+
+#include "pio.h"
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/*
+ * Global functions
+ */
+
+extern void PIO_InitializeInterrupts( uint32_t dwPriority ) ;
+
+extern void PIO_IT_InterruptHandler( void ) ;
+
+extern void PioInterruptHandler( uint32_t id, Pio *pPio ) ;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* #ifndef _PIO_IT_ */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/pio_pin.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/pio_pin.h
new file mode 100644
index 0000000..c8602e6
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/pio_pin.h
@@ -0,0 +1,170 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * \section Purpose
+ *
+ * This file provides a basic API for PIO configuration and usage of
+ * user-controlled pins. Please refer to the board.h file for a list of
+ * available pin definitions.
+ *
+ * \section Usage
+ *
+ * -# Define a constant pin description array such as the following one, using
+ * the existing definitions provided by the board.h file if possible:
+ * \code
+ * const Pin pPins[] = {PIN_USART0_TXD, PIN_USART0_RXD};
+ * \endcode
+ * Alternatively, it is possible to add new pins by provided the full Pin
+ * structure:
+ * \code
+ * // Pin instance to configure PA10 & PA11 as inputs with the internal
+ * // pull-up enabled.
+ * const Pin pPins = {
+ * (1 << 10) | (1 << 11),
+ * REG_PIOA,
+ * ID_PIOA,
+ * PIO_INPUT,
+ * PIO_PULLUP
+ * };
+ * \endcode
+ * -# Configure a pin array by calling PIO_Configure() with a pointer to the
+ * array and its size (which is computed using the PIO_LISTSIZE macro).
+ * -# Change and get the value of a user-controlled pin using the PIO_Set,
+ * PIO_Clear and PIO_Get methods.
+ * -# Get the level being currently output by a user-controlled pin configured
+ * as an output using PIO_GetOutputDataStatus().
+ */
+
+#ifndef _PIO_PIN_
+#define _PIO_PIN_
+
+/*
+ * Headers
+ */
+
+#include "chip.h"
+
+#include <stdint.h>
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/*
+ * Global Macros
+ */
+
+/**
+ * Calculates the size of an array of Pin instances. The array must be defined
+ * locally (i.e. not a pointer), otherwise the computation will not be correct.
+ * \param pPins Local array of Pin instances.
+ * \return Number of elements in array.
+ */
+#define PIO_LISTSIZE(pPins) (sizeof(pPins) / sizeof(Pin))
+
+/*
+ * Global Types
+ */
+
+
+/*
+ * Describes the type and attribute of one PIO pin or a group of similar pins.
+ * The #type# field can have the following values:
+ * - PIO_PERIPH_A
+ * - PIO_PERIPH_B
+ * - PIO_PERIPH_C
+ * - PIO_PERIPH_D
+ * - PIO_PERIPH_E
+ * - PIO_PERIPH_F
+ * - PIO_OUTPUT_0
+ * - PIO_OUTPUT_1
+ * - PIO_INPUT
+ *
+ * The #attribute# field is a bitmask that can either be set to PIO_DEFAULT,
+ * or combine (using bitwise OR '|') any number of the following constants:
+ * - PIO_PULLUP
+ * - PIO_DEGLITCH
+ * - PIO_DEBOUNCE
+ * - PIO_OPENDRAIN
+ * - PIO_IT_LOW_LEVEL
+ * - PIO_IT_HIGH_LEVEL
+ * - PIO_IT_FALL_EDGE
+ * - PIO_IT_RISE_EDGE
+ */
+typedef struct _Pin
+{
+ /* Bitmask indicating which pin(s) to configure. */
+ uint32_t mask;
+ /* Pointer to the PIO controller which has the pin(s). */
+ Pio *pio;
+ /* Peripheral ID of the PIO controller which has the pin(s). */
+ uint8_t id;
+ /* Pin type. */
+ uint8_t type;
+ /* Pin attribute. */
+ uint8_t attribute;
+} Pin ;
+
+/*
+ * Global Access Macros
+ */
+
+/*
+ * Global Functions
+ */
+
+extern uint32_t PIO_PinConfigure( const Pin* pPins, uint32_t dwSize ) ;
+
+extern void PIO_PinSet( const Pin* pPin ) ;
+
+extern void PIO_PinClear( const Pin* pPin ) ;
+
+extern uint32_t PIO_PinGet( const Pin* pPin ) ;
+
+extern uint32_t PIO_PinGetOutputDataStatus( const Pin* pPin ) ;
+
+extern void PIO_PinSetDebounceFilter( const Pin* pPin, uint32_t dwCutOff ) ;
+
+extern void PIO_PinEnableWriteProtect( const Pin *pin );
+
+extern void PIO_PinDisableWriteProtect( const Pin *pin );
+
+extern void PIO_PinSetPinType( Pin * pin, uint8_t pinType);
+
+extern uint32_t PIO_PinGetWriteProtectViolationInfo( const Pin * pin );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* #ifndef _PIO_PIN_ */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/pio_pin_it.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/pio_pin_it.h
new file mode 100644
index 0000000..2fe8a31
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/pio_pin_it.h
@@ -0,0 +1,62 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+ * \file
+ *
+ * PIO function prototype definitions.
+ */
+
+#ifndef _PIO_PIN_IT_
+#define _PIO_PIN_IT_
+
+/*
+ * Headers
+ */
+
+#include "pio.h"
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/*
+ * Global functions
+ */
+
+extern void PIO_PinConfigureIt( const Pin *pPin, void (*handler)( const Pin* ) ) ;
+
+extern void PIO_PinEnableIt( const Pin *pPin ) ;
+
+extern void PIO_PinDisableIt( const Pin *pPin ) ;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* #ifndef _PIO_PIN_IT_ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/pmc.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/pmc.h
new file mode 100644
index 0000000..e5e1bb7
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/pmc.h
@@ -0,0 +1,105 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+ * \file
+ *
+ * Definitions and function prototype for PMC module
+ */
+
+
+#ifndef _PMC_
+#define _PMC_
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+#include <stdint.h>
+
+/*----------------------------------------------------------------------------
+ * Definitions
+ *----------------------------------------------------------------------------*/
+/* Definition for fast RC frequency */
+#define FAST_RC_4MHZ CKGR_MOR_MOSCRCF_4MHz
+#define FAST_RC_8MHZ CKGR_MOR_MOSCRCF_8MHz
+#define FAST_RC_12MHZ CKGR_MOR_MOSCRCF_12MHz
+
+/* Definitions for startup count.
+ * Note: 1 count unit stand for: 1 / 32768 * 8 = 244 us
+ */
+/* Default startup count for 4/8/12MHz fast RC (startup time: 10us ) */
+#define DEFAUTL_FAST_RC_COUNT 1
+/* Default startup count for 3-20MHz main oscilator (startup time: 1.4ms ) */
+#define DEFAUTL_MAIN_OSC_COUNT 8
+/* Default startup count for PLLA (startup time: 200us ) */
+#define DEFAUTL_PLLA_COUNT 1
+/* Default startup count for UPLL */
+#define DEFAUTL_UPLL_COUNT 3
+/* No change for default startup count */
+#define DEFAUTL_COUNT_NO_CHANGE 0xFFFF
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern void PMC_EnablePeripheral( uint32_t dwId ) ;
+extern void PMC_DisablePeripheral( uint32_t dwId ) ;
+
+extern void PMC_EnableAllPeripherals( void ) ;
+extern void PMC_DisableAllPeripherals( void ) ;
+
+extern uint32_t PMC_IsPeriphEnabled( uint32_t dwId ) ;
+
+extern void PMC_EnablePck(uint32_t pck);
+extern void PMC_DisablePck(uint32_t pck);
+extern void PMC_ConfigurePck(uint32_t id, uint32_t clockSource, uint32_t prescaler);
+
+extern void PMC_SetStartupTime(uint32_t fastRcCnt, uint32_t mainOscCnt, uint32_t pllaCnt, uint32_t upllCnt);
+extern void PMC_GetStartupTime(uint32_t *pFastRcCnt, uint32_t *pMainOscCnt, uint32_t *pPllaCnt, uint32_t *pUpllCnt);
+
+extern void SUPC_SelectExtCrystal32K(void);
+extern void PMC_EnableExtOsc12MHz(void);
+extern void PMC_DisableExtOsc12MHz(void);
+extern void PMC_EnableIntRC4_8_12MHz(uint32_t fastRcFreq);
+extern void PMC_DisableIntRC4_8_12MHz(void);
+extern void PMC_SetPllaClock(uint32_t mul, uint32_t div);
+extern void PMC_EnableUpllClock(void);
+extern void PMC_DisableUpllClock(void);
+extern void PMC_SetMckSelection(uint32_t clockSource, uint32_t prescaler);
+extern void PMC_DisableAllClocks(void);
+extern void PMC_ConfigureMckWithPlla(uint32_t mul, uint32_t div, uint32_t prescaler);
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* #ifndef _PMC_ */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/pwm.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/pwm.h
new file mode 100644
index 0000000..61e811a
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/pwm.h
@@ -0,0 +1,127 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * \par Purpose
+ *
+ * Interface for configuration the Pulse Width Modulation Controller (PWM) peripheral.
+ *
+ * \par Usage
+ *
+ * -# Configures PWM clocks A & B to run at the given frequencies using
+ * \ref PWMC_ConfigureClocks().
+ * -# Configure PWMC channel using \ref PWMC_ConfigureChannel(), \ref PWMC_ConfigureChannelExt()
+ * \ref PWMC_SetPeriod(), \ref PWMC_SetDutyCycle() and \ref PWMC_SetDeadTime().
+ * -# Enable & disable channel using \ref PWMC_EnableChannel() and
+ * \ref PWMC_DisableChannel().
+ * -# Enable & disable the period interrupt for the given PWM channel using
+ * \ref PWMC_EnableChannelIt() and \ref PWMC_DisableChannelIt().
+ * -# Enable & disable the selected interrupts sources on a PWMC peripheral
+ * using \ref PWMC_EnableIt() and \ref PWMC_DisableIt().
+ * -# Control syncronous channel using \ref PWMC_ConfigureSyncChannel(),
+ * \ref PWMC_SetSyncChannelUpdatePeriod() and \ref PWMC_SetSyncChannelUpdateUnlock().
+ * -# Control PWM override output using \ref PWMC_SetOverrideValue(),
+ * \ref PWMC_EnableOverrideOutput() and \ref PWMC_DisableOverrideOutput().
+ * -# Send data through the transmitter using \ref PWMC_WriteBuffer().
+ *
+ */
+
+#ifndef _PWMC_
+#define _PWMC_
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "chip.h"
+
+#include <stdint.h>
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+extern void PWMC_ConfigureChannel(
+ Pwm* pPwm,
+ uint8_t channel,
+ uint32_t prescaler,
+ uint32_t alignment,
+ uint32_t polarity);
+extern void PWMC_ConfigureChannelExt(
+ Pwm* pPwm,
+ uint8_t channel,
+ uint32_t prescaler,
+ uint32_t alignment,
+ uint32_t polarity,
+ uint32_t countEventSelect,
+ uint32_t DTEnable,
+ uint32_t DTHInverte,
+ uint32_t DTLInverte);
+extern void PWMC_ConfigureClocks(uint32_t clka, uint32_t clkb, uint32_t mck);
+extern void PWMC_SetPeriod( Pwm* pPwm, uint8_t channel, uint16_t period);
+extern void PWMC_SetDutyCycle( Pwm* pPwm, uint8_t channel, uint16_t duty);
+extern void PWMC_SetDeadTime( Pwm* pPwm, uint8_t channel, uint16_t timeH, uint16_t timeL);
+extern void PWMC_ConfigureSyncChannel( Pwm* pPwm,
+ uint32_t channels,
+ uint32_t updateMode,
+ uint32_t requestMode,
+ uint32_t requestComparisonSelect);
+extern void PWMC_SetSyncChannelUpdatePeriod( Pwm* pPwm, uint8_t period);
+extern void PWMC_SetSyncChannelUpdateUnlock( Pwm* pPwm );
+extern void PWMC_EnableChannel( Pwm* pPwm, uint8_t channel);
+extern void PWMC_DisableChannel( Pwm* pPwm, uint8_t channel);
+extern void PWMC_EnableChannelIt( Pwm* pPwm, uint8_t channel);
+extern void PWMC_DisableChannelIt( Pwm* pPwm, uint8_t channel);
+extern void PWMC_EnableIt( Pwm* pPwm, uint32_t sources1, uint32_t sources2);
+extern void PWMC_DisableIt( Pwm* pPwm, uint32_t sources1, uint32_t sources2);
+extern uint8_t PWMC_WriteBuffer(Pwm *pwmc,
+ void *buffer,
+ uint32_t length);
+extern void PWMC_SetOverrideValue( Pwm* pPwm, uint32_t value);
+extern void PWMC_EnableOverrideOutput( Pwm* pPwm, uint32_t value, uint32_t sync);
+extern void PWMC_DisableOverrideOutput( Pwm* pPwm, uint32_t value, uint32_t sync);
+extern void PWMC_SetFaultMode( Pwm* pPwm, uint32_t mode);
+extern void PWMC_FaultClear( Pwm* pPwm, uint32_t fault);
+extern void PWMC_SetFaultProtectionValue( Pwm* pPwm, uint32_t value);
+extern void PWMC_EnableFaultProtection( Pwm* pPwm, uint32_t dwChannel, uint32_t dwValue ) ;
+extern void PWMC_ConfigureComparisonUnit( Pwm* pPwm, uint32_t x, uint32_t value, uint32_t mode);
+extern void PWMC_ConfigureEventLineMode( Pwm* pPwm, uint32_t x, uint32_t mode);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* #ifndef _PWMC_ */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/rstc.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/rstc.h
new file mode 100644
index 0000000..c4ed206
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/rstc.h
@@ -0,0 +1,60 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+ * \file
+ *
+ * Function prototypes for RSTC.
+ */
+
+#ifndef _RSTC_H
+#define _RSTC_H
+
+//-----------------------------------------------------------------------------
+// Exported functions
+//-----------------------------------------------------------------------------
+
+extern void RSTC_ConfigureMode( Rstc* pRstc, uint32_t dwValue ) ;
+
+extern void RSTC_SetUserResetEnable( Rstc* pRstc, uint32_t dwEnable ) ;
+extern void RSTC_SetUserResetInterruptEnable( Rstc* pRstc, uint32_t dwEnable ) ;
+
+extern void RSTC_SetExtResetLength( Rstc* pRstc, uint32_t dwPowerLength ) ;
+
+extern void RSTC_ProcessorReset( Rstc* pRstc ) ;
+extern void RSTC_PeripheralReset( Rstc* pRstc ) ;
+extern void RSTC_ExtReset( Rstc* pRstc ) ;
+
+extern uint32_t RSTC_GetNrstLevel( Rstc* pRstc ) ;
+extern uint32_t RSTC_IsUserResetDetected( Rstc* pRstc ) ;
+extern uint32_t RSTC_IsBusy( Rstc* pRstc ) ;
+
+extern uint32_t RSTC_GetStatus( Rstc* pRstc ) ;
+
+
+#endif // #ifndef _RSTC_H
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/rtc.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/rtc.h
new file mode 100644
index 0000000..ed82170
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/rtc.h
@@ -0,0 +1,97 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * Interface for Real Time Clock (RTC) controller.
+ *
+ */
+
+#ifndef _RTC_
+#define _RTC_
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+#include "chip.h"
+
+#include <stdint.h>
+
+/*----------------------------------------------------------------------------
+ * Definitions
+ *----------------------------------------------------------------------------*/
+
+#define RTC_HOUR_BIT_LEN_MASK 0x3F
+#define RTC_MIN_BIT_LEN_MASK 0x7F
+#define RTC_SEC_BIT_LEN_MASK 0x7F
+#define RTC_CENT_BIT_LEN_MASK 0x7F
+#define RTC_YEAR_BIT_LEN_MASK 0xFF
+#define RTC_MONTH_BIT_LEN_MASK 0x1F
+#define RTC_DATE_BIT_LEN_MASK 0x3F
+#define RTC_WEEK_BIT_LEN_MASK 0x07
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+extern void RTC_SetHourMode( Rtc* pRtc, uint32_t dwMode ) ;
+
+extern uint32_t RTC_GetHourMode( Rtc* pRtc ) ;
+
+extern void RTC_EnableIt( Rtc* pRtc, uint32_t dwSources ) ;
+
+extern void RTC_DisableIt( Rtc* pRtc, uint32_t dwSources ) ;
+
+extern int RTC_SetTime( Rtc* pRtc, uint8_t ucHour, uint8_t ucMinute, uint8_t ucSecond ) ;
+
+extern void RTC_GetTime( Rtc* pRtc, uint8_t *pucHour, uint8_t *pucMinute, uint8_t *pucSecond ) ;
+
+extern int RTC_SetTimeAlarm( Rtc* pRtc, uint8_t *pucHour, uint8_t *pucMinute, uint8_t *pucSecond ) ;
+
+extern void RTC_GetDate( Rtc* pRtc, uint16_t *pwYear, uint8_t *pucMonth, uint8_t *pucDay, uint8_t *pucWeek ) ;
+
+extern int RTC_SetDate( Rtc* pRtc, uint16_t wYear, uint8_t ucMonth, uint8_t ucDay, uint8_t ucWeek ) ;
+
+extern int RTC_SetDateAlarm( Rtc* pRtc, uint8_t *pucMonth, uint8_t *pucDay ) ;
+
+extern void RTC_ClearSCCR( Rtc* pRtc, uint32_t dwMask ) ;
+
+extern uint32_t RTC_GetSR( Rtc* pRtc, uint32_t dwMask ) ;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* #ifndef _RTC_ */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/rtt.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/rtt.h
new file mode 100644
index 0000000..4db1069
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/rtt.h
@@ -0,0 +1,82 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * \par Purpose
+ *
+ * Interface for Real Time Timer (RTT) controller.
+ *
+ * \par Usage
+ *
+ * -# Changes the prescaler value of the given RTT and restarts it
+ * using \ref RTT_SetPrescaler().
+ * -# Get current value of the RTT using \ref RTT_GetTime().
+ * -# Enables the specified RTT interrupt using \ref RTT_EnableIT().
+ * -# Get the status register value of the given RTT using \ref RTT_GetStatus().
+ * -# Configures the RTT to generate an alarm at the given time
+ * using \ref RTT_SetAlarm().
+ */
+
+#ifndef _RTT_
+#define _RTT_
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "chip.h"
+
+#include <stdint.h>
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+extern void RTT_SetPrescaler( Rtt* pRtt, uint16_t wPrescaler ) ;
+
+extern uint32_t RTT_GetTime( Rtt* pRtt ) ;
+
+extern void RTT_EnableIT( Rtt* pRtt, uint32_t dwSources ) ;
+
+extern uint32_t RTT_GetStatus( Rtt *pRtt ) ;
+
+extern void RTT_SetAlarm( Rtt *pRtt, uint32_t dwTime ) ;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* #ifndef RTT_H */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/sdramc.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/sdramc.h
new file mode 100644
index 0000000..8757060
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/sdramc.h
@@ -0,0 +1,68 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+ * \file
+ *
+ * Definitions and function prototype for SDRAMC.
+ */
+
+// ----------------------------------------------------------------------------------------------------------
+// SDRAM
+// ----------------------------------------------------------------------------------------------------------
+/** SDRAMC Configuration */
+#define EBI_SDRAMC_ADDR (0x70000000u)
+
+/** SDRAM bus width */
+#define BOARD_SDRAM_BUSWIDTH 16
+
+
+typedef struct _SSdramc_config
+{
+ uint32_t dwColumnBits ; // Number of Column Bits
+ uint32_t dwRowBits ; // Number of Row Bits
+ uint32_t dwBanks ; // Number of Banks
+ uint32_t dwCAS ; // CAS Latency
+ uint32_t dwDataBusWidth ; // Data Bus Width
+ uint32_t dwWriteRecoveryDelay ; // Write Recovery Delay
+ uint32_t dwRowCycleDelay_RowRefreshCycle ; // Row Cycle Delay and Row Refresh Cycle
+ uint32_t dwRowPrechargeDelay ; // Row Precharge Delay
+ uint32_t dwRowColumnDelay ; // Row to Column Delay
+ uint32_t dwActivePrechargeDelay ; // Active to Precharge Delay
+ uint32_t dwExitSelfRefreshActiveDelay ; // Exit Self Refresh to Active Delay
+ uint32_t dwBK1 ; // bk1 addr
+
+} SSdramc_config ;
+
+typedef struct _SSdramc_Memory
+{
+ SSdramc_config cfg ;
+
+} SSdramc_Memory ;
+
+extern void SDRAMC_Configure( SSdramc_Memory* pMemory, uint32_t dwClockFrequency ) ;
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/smc.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/smc.h
new file mode 100644
index 0000000..cf18633
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/smc.h
@@ -0,0 +1,113 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+* \file
+*
+* Definitions and function prototype for smc module
+*/
+
+#ifndef _SMC_
+#define _SMC_
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "chip.h"
+
+/*----------------------------------------------------------------------------
+ * Definitions
+ *----------------------------------------------------------------------------*/
+
+/*
+ * NFC definitions
+ */
+
+/** Base address of NFC SRAM */
+#define NFC_SRAM_BASE_ADDRESS 0x20100000
+/** Base address for NFC Address Command */
+#define NFC_CMD_BASE_ADDR 0x60000000
+
+/*
+ * ECC definitions (Hsiao Code Errors)
+ */
+
+/** A single bit was incorrect but has been recovered. */
+#define Hsiao_ERROR_SINGLEBIT 1
+
+/** The original code has been corrupted. */
+#define Hsiao_ERROR_ECC 2
+
+/** Multiple bits are incorrect in the data and they cannot be corrected. */
+#define Hsiao_ERROR_MULTIPLEBITS 3
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/*
+ * NFC functions
+ */
+
+extern void SMC_NFC_Configure(Smc* pSmc, uint32_t mode);
+extern void SMC_NFC_Reset(Smc* pSmc);
+extern void SMC_NFC_EnableNfc(Smc* pSmc);
+extern void SMC_NFC_EnableSpareRead(Smc* pSmc);
+extern void SMC_NFC_DisableSpareRead(Smc* pSmc);
+extern void SMC_NFC_EnableSpareWrite(Smc* pSmc);
+extern void SMC_NFC_DisableSpareWrite(Smc* pSmc);
+extern uint8_t SMC_NFC_isSpareRead(Smc* pSmc);
+extern uint8_t SMC_NFC_isSpareWrite(Smc* pSmc);
+extern uint8_t SMC_NFC_isTransferComplete(Smc* pSmc);
+extern uint8_t SMC_NFC_isReadyBusy(Smc* pSmc);
+extern uint8_t SMC_NFC_isNfcBusy(Smc* pSmc);
+extern uint32_t SMC_NFC_GetStatus(Smc* pSmc);
+
+extern void SMC_NFC_SendCommand(Smc* pSmc, uint32_t cmd, uint32_t addressCycle, uint32_t cycle0);
+
+/*
+ * ECC functions
+ */
+extern void SMC_ECC_Configure(Smc* pSmc, uint32_t type, uint32_t pageSize);
+extern uint32_t SMC_ECC_GetCorrectoinType(Smc* pSmc);
+extern uint8_t SMC_ECC_GetStatus(Smc *pSmc, uint8_t eccNumber);
+extern void SMC_ECC_GetValue(Smc* pSmc, uint32_t *ecc);
+extern void SMC_ECC_GetEccParity(
+ uint32_t pageDataSize,
+ uint8_t *code,
+ uint8_t dataPath);
+extern uint8_t SMC_ECC_VerifyHsiao(
+ uint8_t *data,
+ uint32_t size,
+ const uint8_t *originalCode,
+ const uint8_t *verifyCode,
+ uint8_t dataPath);
+
+#endif /* #ifndef _SMC_ */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/spi.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/spi.h
new file mode 100644
index 0000000..eb80951
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/spi.h
@@ -0,0 +1,110 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * Interface for Serial Peripheral Interface (SPI) controller.
+ *
+ */
+
+#ifndef _SPI_
+#define _SPI_
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "chip.h"
+
+/*----------------------------------------------------------------------------
+ * Macros
+ *----------------------------------------------------------------------------*/
+
+/**
+ *
+ * Here are several macros which should be used when configuring a SPI
+ * peripheral.
+ *
+ * \section spi_configuration_macros SPI Configuration Macros
+ * - \ref SPI_PCS
+ * - \ref SPI_SCBR
+ * - \ref SPI_DLYBS
+ * - \ref SPI_DLYBCT
+ */
+
+/** Calculate the PCS field value given the chip select NPCS value */
+#define SPI_PCS(npcs) ((~(1 << npcs) & 0xF) << 16)
+
+/** Calculates the value of the CSR SCBR field given the baudrate and MCK. */
+#define SPI_SCBR(baudrate, masterClock) ((uint32_t) (masterClock / baudrate) << 8)
+
+/** Calculates the value of the CSR DLYBS field given the desired delay (in ns) */
+#define SPI_DLYBS(delay, masterClock) ((uint32_t) (((masterClock / 1000000) * delay) / 1000) << 16)
+
+/** Calculates the value of the CSR DLYBCT field given the desired delay (in ns) */
+#define SPI_DLYBCT(delay, masterClock) ((uint32_t) (((masterClock / 1000000) * delay) / 32000) << 24)
+
+/*------------------------------------------------------------------------------ */
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+extern void SPI_Enable( Spi* spi ) ;
+extern void SPI_Disable( Spi* spi ) ;
+
+extern void SPI_EnableIt( Spi* spi, uint32_t dwSources ) ;
+extern void SPI_DisableIt( Spi* spi, uint32_t dwSources ) ;
+
+extern void SPI_Configure( Spi* spi, uint32_t dwId, uint32_t dwConfiguration ) ;
+extern void SPI_SetMode( Spi* spi, uint32_t dwConfiguration );
+
+extern void SPI_ChipSelect( Spi* spi, uint8_t cS);
+extern void SPI_ReleaseCS( Spi* spi );
+
+extern void SPI_ConfigureNPCS( Spi* spi, uint32_t dwNpcs, uint32_t dwConfiguration ) ;
+extern void SPI_ConfigureCSMode( Spi* spi, uint32_t dwNpcs, uint32_t bReleaseOnLast );
+extern uint32_t SPI_Read( Spi* spi ) ;
+extern void SPI_Write( Spi* spi, uint32_t dwNpcs, uint16_t wData ) ;
+extern void SPI_WriteLast( Spi* spi, uint32_t dwNpcs, uint16_t wData );
+
+extern uint32_t SPI_GetStatus( Spi* spi ) ;
+extern uint32_t SPI_IsFinished( Spi* pSpi ) ;
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* #ifndef _SPI_ */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/ssc.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/ssc.h
new file mode 100644
index 0000000..7383dbf
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/ssc.h
@@ -0,0 +1,75 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * Interface for Synchronous Serial (SSC) controller.
+ *
+ */
+
+#ifndef _SSC_
+#define _SSC_
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+#include "chip.h"
+
+#include <stdint.h>
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+extern void SSC_Configure( Ssc* pSsc, uint32_t dwBitRate, uint32_t dwMasterClock ) ;
+
+extern void SSC_ConfigureTransmitter( Ssc* pSsc, uint32_t dwTCMR, uint32_t dwTFMR ) ;
+extern void SSC_ConfigureReceiver( Ssc* pSsc, uint32_t dwRCMR, uint32_t dwRFMR ) ;
+
+extern void SSC_EnableTransmitter( Ssc* pSsc ) ;
+extern void SSC_DisableTransmitter( Ssc* pSsc ) ;
+extern void SSC_EnableReceiver( Ssc* pSsc ) ;
+extern void SSC_DisableReceiver( Ssc* pSsc );
+
+extern void SSC_EnableInterrupts( Ssc* pSsc, uint32_t dwSources ) ;
+extern void SSC_DisableInterrupts( Ssc* pSsc, uint32_t dwSources ) ;
+
+extern void SSC_Write( Ssc* pSsc, uint32_t dwFrame ) ;
+extern uint32_t SSC_Read( Ssc* pSsc ) ;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* #ifndef _SSC_ */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/tc.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/tc.h
new file mode 100644
index 0000000..e577c5a
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/tc.h
@@ -0,0 +1,76 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * \section Purpose
+ *
+ * Interface for configuring and using Timer Counter (TC) peripherals.
+ *
+ * \section Usage
+ * -# Optionally, use TC_FindMckDivisor() to let the program find the best
+ * TCCLKS field value automatically.
+ * -# Configure a Timer Counter in the desired mode using TC_Configure().
+ * -# Start or stop the timer clock using TC_Start() and TC_Stop().
+ */
+
+#ifndef _TC_
+#define _TC_
+
+/*------------------------------------------------------------------------------
+ * Headers
+ *------------------------------------------------------------------------------*/
+
+#include "chip.h"
+
+#include <stdint.h>
+
+/*------------------------------------------------------------------------------
+ * Global functions
+ *------------------------------------------------------------------------------*/
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+extern void TC_Configure( Tc *pTc, uint32_t dwChannel, uint32_t dwMode ) ;
+
+extern void TC_Start( Tc *pTc, uint32_t dwChannel ) ;
+
+extern void TC_Stop( Tc *pTc, uint32_t dwChannel ) ;
+
+extern uint32_t TC_FindMckDivisor( uint32_t dwFreq, uint32_t dwMCk, uint32_t *dwDiv, uint32_t *dwTcClks, uint32_t dwBoardMCK ) ;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* #ifndef _TC_ */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/trace.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/trace.h
new file mode 100644
index 0000000..6f7893a
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/trace.h
@@ -0,0 +1,230 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * \par Purpose
+ *
+ * Standard output methods for reporting debug information, warnings and
+ * errors, which can be easily be turned on/off.
+ *
+ * \par Usage
+ * -# Initialize the DBGU using TRACE_CONFIGURE() if you intend to eventually
+ * disable ALL traces; otherwise use DBGU_Configure().
+ * -# Uses the TRACE_DEBUG(), TRACE_INFO(), TRACE_WARNING(), TRACE_ERROR()
+ * TRACE_FATAL() macros to output traces throughout the program.
+ * -# Each type of trace has a level : Debug 5, Info 4, Warning 3, Error 2
+ * and Fatal 1. Disable a group of traces by changing the value of
+ * TRACE_LEVEL during compilation; traces with a level bigger than TRACE_LEVEL
+ * are not generated. To generate no trace, use the reserved value 0.
+ * -# Trace disabling can be static or dynamic. If dynamic disabling is selected
+ * the trace level can be modified in runtime. If static disabling is selected
+ * the disabled traces are not compiled.
+ *
+ * \par traceLevels Trace level description
+ * -# TRACE_DEBUG (5): Traces whose only purpose is for debugging the program,
+ * and which do not produce meaningful information otherwise.
+ * -# TRACE_INFO (4): Informational trace about the program execution. Should
+ * enable the user to see the execution flow.
+ * -# TRACE_WARNING (3): Indicates that a minor error has happened. In most case
+ * it can be discarded safely; it may even be expected.
+ * -# TRACE_ERROR (2): Indicates an error which may not stop the program execution,
+ * but which indicates there is a problem with the code.
+ * -# TRACE_FATAL (1): Indicates a major error which prevents the program from going
+ * any further.
+ */
+
+#ifndef _TRACE_
+#define _TRACE_
+
+/*
+ * Headers
+ */
+
+#include "pio.h"
+
+#include <stdio.h>
+
+/*
+ * Global Definitions
+ */
+
+/** Softpack Version */
+#define SOFTPACK_VERSION "1.0"
+
+#define TRACE_LEVEL_DEBUG 5
+#define TRACE_LEVEL_INFO 4
+#define TRACE_LEVEL_WARNING 3
+#define TRACE_LEVEL_ERROR 2
+#define TRACE_LEVEL_FATAL 1
+#define TRACE_LEVEL_NO_TRACE 0
+
+/* By default, all traces are output except the debug one. */
+#if !defined(TRACE_LEVEL)
+#define TRACE_LEVEL TRACE_LEVEL_INFO
+#endif
+
+/* By default, trace level is static (not dynamic) */
+#if !defined(DYN_TRACES)
+#define DYN_TRACES 0
+#endif
+
+#if defined(NOTRACE)
+#error "Error: NOTRACE has to be not defined !"
+#endif
+
+#undef NOTRACE
+#if (DYN_TRACES==0)
+ #if (TRACE_LEVEL == TRACE_LEVEL_NO_TRACE)
+ #define NOTRACE
+ #endif
+#endif
+
+
+
+/* ------------------------------------------------------------------------------
+ * Global Macros
+ * ------------------------------------------------------------------------------
+ */
+
+extern void TRACE_CONFIGURE( uint32_t dwBaudRate, uint32_t dwMCk ) ;
+
+/**
+ * Initializes the DBGU for ISP project
+ *
+ * \param mode DBGU mode.
+ * \param baudrate DBGU baudrate.
+ * \param mck Master clock frequency.
+ */
+#ifndef DYNTRACE
+#define DYNTRACE 0
+#endif
+
+#if (TRACE_LEVEL==0) && (DYNTRACE==0)
+#define TRACE_CONFIGURE_ISP(mode, baudrate, mck) {}
+#else
+#define TRACE_CONFIGURE_ISP(mode, baudrate, mck) { \
+ const Pin pinsUART0[] = {PINS_UART}; \
+ PIO_Configure(pinsUART0, PIO_LISTSIZE(pinsUART0)); \
+ UART_Configure( baudrate, mck ) ; \
+ }
+#endif
+
+/**
+ * Outputs a formatted string using 'printf' if the log level is high
+ * enough. Can be disabled by defining TRACE_LEVEL=0 during compilation.
+ * \param ... Additional parameters depending on formatted string.
+ */
+#if defined(NOTRACE)
+
+/* Empty macro */
+#define TRACE_DEBUG(...) { }
+#define TRACE_INFO(...) { }
+#define TRACE_WARNING(...) { }
+#define TRACE_ERROR(...) { }
+#define TRACE_FATAL(...) { while(1); }
+
+#define TRACE_DEBUG_WP(...) { }
+#define TRACE_INFO_WP(...) { }
+#define TRACE_WARNING_WP(...) { }
+#define TRACE_ERROR_WP(...) { }
+#define TRACE_FATAL_WP(...) { while(1); }
+
+#elif (DYN_TRACES == 1)
+
+/* Trace output depends on dwTraceLevel value */
+#define TRACE_DEBUG(...) { if (dwTraceLevel >= TRACE_LEVEL_DEBUG) { printf("-D- " __VA_ARGS__); } }
+#define TRACE_INFO(...) { if (dwTraceLevel >= TRACE_LEVEL_INFO) { printf("-I- " __VA_ARGS__); } }
+#define TRACE_WARNING(...) { if (dwTraceLevel >= TRACE_LEVEL_WARNING) { printf("-W- " __VA_ARGS__); } }
+#define TRACE_ERROR(...) { if (dwTraceLevel >= TRACE_LEVEL_ERROR) { printf("-E- " __VA_ARGS__); } }
+#define TRACE_FATAL(...) { if (dwTraceLevel >= TRACE_LEVEL_FATAL) { printf("-F- " __VA_ARGS__); while(1); } }
+
+#define TRACE_DEBUG_WP(...) { if (dwTraceLevel >= TRACE_LEVEL_DEBUG) { printf(__VA_ARGS__); } }
+#define TRACE_INFO_WP(...) { if (dwTraceLevel >= TRACE_LEVEL_INFO) { printf(__VA_ARGS__); } }
+#define TRACE_WARNING_WP(...) { if (dwTraceLevel >= TRACE_LEVEL_WARNING) { printf(__VA_ARGS__); } }
+#define TRACE_ERROR_WP(...) { if (dwTraceLevel >= TRACE_LEVEL_ERROR) { printf(__VA_ARGS__); } }
+#define TRACE_FATAL_WP(...) { if (dwTraceLevel >= TRACE_LEVEL_FATAL) { printf(__VA_ARGS__); while(1); } }
+
+#else
+
+/* Trace compilation depends on TRACE_LEVEL value */
+#if (TRACE_LEVEL >= TRACE_LEVEL_DEBUG)
+#define TRACE_DEBUG(...) { printf("-D- " __VA_ARGS__); }
+#define TRACE_DEBUG_WP(...) { printf(__VA_ARGS__); }
+#else
+#define TRACE_DEBUG(...) { }
+#define TRACE_DEBUG_WP(...) { }
+#endif
+
+#if (TRACE_LEVEL >= TRACE_LEVEL_INFO)
+#define TRACE_INFO(...) { printf("-I- " __VA_ARGS__); }
+#define TRACE_INFO_WP(...) { printf(__VA_ARGS__); }
+#else
+#define TRACE_INFO(...) { }
+#define TRACE_INFO_WP(...) { }
+#endif
+
+#if (TRACE_LEVEL >= TRACE_LEVEL_WARNING)
+#define TRACE_WARNING(...) { printf("-W- " __VA_ARGS__); }
+#define TRACE_WARNING_WP(...) { printf(__VA_ARGS__); }
+#else
+#define TRACE_WARNING(...) { }
+#define TRACE_WARNING_WP(...) { }
+#endif
+
+#if (TRACE_LEVEL >= TRACE_LEVEL_ERROR)
+#define TRACE_ERROR(...) { printf("-E- " __VA_ARGS__); }
+#define TRACE_ERROR_WP(...) { printf(__VA_ARGS__); }
+#else
+#define TRACE_ERROR(...) { }
+#define TRACE_ERROR_WP(...) { }
+#endif
+
+#if (TRACE_LEVEL >= TRACE_LEVEL_FATAL)
+#define TRACE_FATAL(...) { printf("-F- " __VA_ARGS__); while(1); }
+#define TRACE_FATAL_WP(...) { printf(__VA_ARGS__); while(1); }
+#else
+#define TRACE_FATAL(...) { while(1); }
+#define TRACE_FATAL_WP(...) { while(1); }
+#endif
+
+#endif
+
+
+/**
+ * Exported variables
+ */
+/** Depending on DYN_TRACES, dwTraceLevel is a modifable runtime variable or a define */
+#if !defined(NOTRACE) && (DYN_TRACES == 1)
+ extern uint32_t dwTraceLevel ;
+#endif
+
+#endif //#ifndef TRACE_H
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/trng.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/trng.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/trng.h
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/twi.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/twi.h
new file mode 100644
index 0000000..402a3a9
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/twi.h
@@ -0,0 +1,120 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * Interface for configuration the Two Wire Interface (TWI) peripheral.
+ *
+ */
+
+#ifndef _TWI_
+#define _TWI_
+
+/*------------------------------------------------------------------------------
+ * Headers
+ *------------------------------------------------------------------------------*/
+
+#include "chip.h"
+
+#include <stdint.h>
+
+/*----------------------------------------------------------------------------
+ * Macros
+ *----------------------------------------------------------------------------*/
+/* Returns 1 if the TXRDY bit (ready to transmit data) is set in the given status register value.*/
+#define TWI_STATUS_TXRDY(status) ((status & TWI_SR_TXRDY) == TWI_SR_TXRDY)
+
+/* Returns 1 if the RXRDY bit (ready to receive data) is set in the given status register value.*/
+#define TWI_STATUS_RXRDY(status) ((status & TWI_SR_RXRDY) == TWI_SR_RXRDY)
+
+/* Returns 1 if the TXCOMP bit (transfer complete) is set in the given status register value.*/
+#define TWI_STATUS_TXCOMP(status) ((status & TWI_SR_TXCOMP) == TWI_SR_TXCOMP)
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/*----------------------------------------------------------------------------
+ * External function
+ *----------------------------------------------------------------------------*/
+
+extern void TWI_ConfigureMaster(Twi *pTwi, uint32_t twck, uint32_t mck);
+
+extern void TWI_ConfigureSlave(Twi *pTwi, uint8_t slaveAddress);
+
+extern void TWI_Stop(Twi *pTwi);
+
+extern void TWI_StartRead(
+ Twi *pTwi,
+ uint8_t address,
+ uint32_t iaddress,
+ uint8_t isize);
+
+extern uint8_t TWI_ReadByte(Twi *pTwi);
+
+extern void TWI_WriteByte(Twi *pTwi, uint8_t byte);
+
+extern void TWI_StartWrite(
+ Twi *pTwi,
+ uint8_t address,
+ uint32_t iaddress,
+ uint8_t isize);
+
+extern uint8_t TWI_ByteReceived(Twi *pTwi);
+
+extern uint8_t TWI_ByteSent(Twi *pTwi);
+
+extern uint8_t TWI_TransferComplete(Twi *pTwi);
+
+extern uint8_t TWI_PDCTransferComplete(Twi *pTwi);
+
+extern uint8_t TWI_PDCReceiveComplete(Twi *pTwi);
+
+extern void TWI_EnableIt(Twi *pTwi, uint32_t sources);
+
+extern void TWI_DisableIt(Twi *pTwi, uint32_t sources);
+
+extern uint32_t TWI_GetStatus(Twi *pTwi);
+
+extern uint32_t TWI_GetMaskedStatus(Twi *pTwi);
+
+extern void TWI_SendSTOPCondition(Twi *pTwi);
+
+extern uint32_t TWI_PDC_write( Twi * pTwi, uint8_t *pwBuffer, uint32_t dwSize );
+
+extern uint32_t TWI_PDC_read( Twi * pTwi, uint8_t *pwBuffer, uint32_t dwSize );
+
+extern void TWI_PDC_Disable( Twi * pTwi );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* #ifndef _TWI_ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/usart.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/usart.h
new file mode 100644
index 0000000..6baf35e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/usart.h
@@ -0,0 +1,133 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * \par Purpose
+ *
+ * This module provides several definitions and methods for using an USART
+ * peripheral.
+ *
+ * \par Usage
+ *
+ * -# Enable the USART peripheral clock in the PMC.
+ * -# Enable the required USART PIOs (see pio.h).
+ * -# Configure the UART by calling USART_Configure.
+ * -# Enable the transmitter and/or the receiver of the USART using
+ * USART_SetTransmitterEnabled and USART_SetReceiverEnabled.
+ * -# Send data through the USART using the USART_Write and
+ * USART_WriteBuffer methods.
+ * -# Receive data from the USART using the USART_Read and
+ * USART_ReadBuffer functions; the availability of data can be polled
+ * with USART_IsDataAvailable.
+ * -# Disable the transmitter and/or the receiver of the USART with
+ * USART_SetTransmitterEnabled and USART_SetReceiverEnabled.
+ */
+
+#ifndef _USART_
+#define _USART_
+
+/*------------------------------------------------------------------------------
+ * Headers
+ *------------------------------------------------------------------------------*/
+
+#include "chip.h"
+
+#include <stdint.h>
+
+/*------------------------------------------------------------------------------
+ * Definitions
+ *------------------------------------------------------------------------------*/
+
+/** \section USART_mode USART modes
+ * This section lists several common operating modes for an USART peripheral.
+ *
+ * \b Modes
+ * - USART_MODE_ASYNCHRONOUS
+ * - USART_MODE_IRDA
+ */
+
+/** Basic asynchronous mode, i.e. 8 bits no parity.*/
+#define USART_MODE_ASYNCHRONOUS (US_MR_CHRL_8_BIT | US_MR_PAR_NO)
+
+/** IRDA mode*/
+#define USART_MODE_IRDA (AT91C_US_USMODE_IRDA | AT91C_US_CHRL_8_BITS | AT91C_US_PAR_NONE | AT91C_US_FILTER)
+
+/** SPI mode*/
+#define AT91C_US_USMODE_SPIM 0xE
+#define US_SPI_CPOL_0 (0x0<<16)
+#define US_SPI_CPHA_0 (0x0<<8)
+#define US_SPI_CPOL_1 (0x1<<16)
+#define US_SPI_CPHA_1 (0x1<<8)
+#define US_SPI_BPMODE_0 (US_SPI_CPOL_0|US_SPI_CPHA_1)
+#define US_SPI_BPMODE_1 (US_SPI_CPOL_0|US_SPI_CPHA_0)
+#define US_SPI_BPMODE_2 (US_SPI_CPOL_1|US_SPI_CPHA_1)
+#define US_SPI_BPMODE_3 (US_SPI_CPOL_1|US_SPI_CPHA_0)
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/*------------------------------------------------------------------------------*/
+/* Exported functions */
+/*------------------------------------------------------------------------------*/
+
+extern void USART_Configure( Usart *usart, uint32_t mode, uint32_t baudrate, uint32_t masterClock ) ;
+extern uint32_t USART_GetStatus( Usart *usart ) ;
+extern void USART_EnableIt( Usart *usart,uint32_t mode ) ;
+extern void USART_DisableIt( Usart *usart,uint32_t mode ) ;
+extern void USART_SetTransmitterEnabled( Usart *usart, uint8_t enabled ) ;
+
+extern void USART_SetReceiverEnabled( Usart *usart, uint8_t enabled ) ;
+
+extern void USART_Write( Usart *usart, uint16_t data, volatile uint32_t timeOut ) ;
+
+extern uint8_t USART_WriteBuffer( Usart *usart, void *buffer, uint32_t size ) ;
+
+extern uint16_t USART_Read( Usart *usart, volatile uint32_t timeOut ) ;
+
+extern uint8_t USART_ReadBuffer( Usart *usart, void *buffer, uint32_t size ) ;
+
+extern uint8_t USART_IsDataAvailable( Usart *usart ) ;
+
+extern void USART_SetIrdaFilter(Usart *pUsart, uint8_t filter);
+
+extern void USART_PutChar( Usart *usart, uint8_t c ) ;
+
+extern uint32_t USART_IsRxReady( Usart *usart ) ;
+
+extern uint8_t USART_GetChar( Usart *usart ) ;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* #ifndef _USART_ */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/wdt.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/wdt.h
new file mode 100644
index 0000000..b6c921c
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/include/wdt.h
@@ -0,0 +1,74 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * \section Purpose
+ * Interface for Watchdog Timer (WDT) controller.
+ *
+ * \section Usage
+ * -# Enable watchdog with given mode using \ref WDT_Enable().
+ * -# Disable watchdog using \ref WDT_Disable()
+ * -# Restart the watchdog using \ref WDT_Restart().
+ * -# Get watchdog status using \ref WDT_GetStatus().
+ * -# Caculate watchdog period value using \ref WDT_GetPeriod().
+ */
+
+#ifndef _WDT_
+#define _WDT_
+
+#include "chip.h"
+
+#include <stdint.h>
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+extern void WDT_Enable( Wdt* pWDT, uint32_t dwMode ) ;
+
+extern void WDT_Disable( Wdt* pWDT ) ;
+
+extern void WDT_Restart( Wdt* pWDT ) ;
+
+extern uint32_t WDT_GetStatus( Wdt* pWDT ) ;
+
+extern uint32_t WDT_GetPeriod( uint32_t dwMs ) ;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* #ifndef _WDT_ */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/lib/libchip_sam3x2_gcc_dbg.a.txt b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/lib/libchip_sam3x2_gcc_dbg.a.txt
new file mode 100644
index 0000000..a8d5783
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/lib/libchip_sam3x2_gcc_dbg.a.txt
@@ -0,0 +1,722 @@
+
+adc.o:
+00000000 r .LC0
+00000014 r .LC1
+00000024 r .LC2
+0000005c r .LC3
+00000088 r .LC4
+000000b8 r .LC5
+00000000 T ADC_CheckConfiguration
+00000000 T ADC_GetConvertedData
+00000000 T ADC_Initialize
+00000000 T ADC_ReadBuffer
+00000000 T ADC_SetAnalogChange
+00000000 T ADC_SetClock
+00000000 T ADC_SetCompareChannel
+00000000 T ADC_SetCompareMode
+00000000 T ADC_SetComparisonWindow
+00000000 T ADC_SetFastWakeup
+00000000 T ADC_SetFreeRunMode
+00000000 T ADC_SetLowResolution
+00000000 T ADC_SetSequence
+00000000 T ADC_SetSequenceByList
+00000000 T ADC_SetSequenceMode
+00000000 T ADC_SetSleepMode
+00000000 T ADC_SetTagEnable
+00000000 T ADC_SetTiming
+00000000 T ADC_SetTrigger
+00000000 t GetStartupValue
+ U PMC_EnablePeripheral
+000000e0 r __FUNCTION__.4980
+000000c8 r __FUNCTION__.5110
+ U __assert_func
+ U iprintf
+
+async.o:
+00000000 T ASYNC_IsFinished
+
+chipid.o:
+
+dacc.o:
+00000000 r .LC0
+00000014 r .LC1
+00000000 T DACC_Initialize
+00000000 T DACC_SetConversionData
+00000000 T DACC_WriteBuffer
+ U PMC_EnablePeripheral
+00000034 r __FUNCTION__.4838
+ U __assert_func
+
+dmac.o:
+00000000 r .LC0
+00000014 r .LC1
+0000001c r .LC2
+0000003c r .LC3
+00000000 T DMAC_Disable
+00000000 T DMAC_DisableChannel
+00000000 T DMAC_DisableChannels
+00000000 T DMAC_DisableIt
+00000000 T DMAC_Enable
+00000000 T DMAC_EnableChannel
+00000000 T DMAC_EnableChannels
+00000000 T DMAC_EnableIt
+00000000 T DMAC_GetChannelStatus
+00000000 T DMAC_GetDestinationAddr
+00000000 T DMAC_GetInterruptMask
+00000000 T DMAC_GetMaskedStatus
+00000000 T DMAC_GetSourceAddr
+00000000 T DMAC_GetStatus
+00000000 T DMAC_KeepChannel
+00000000 T DMAC_Modified_Arbiter
+00000000 T DMAC_RestoreChannel
+00000000 T DMAC_SetBufferSize
+00000000 T DMAC_SetCFG
+00000000 T DMAC_SetChunkTransferSize
+00000000 T DMAC_SetControlA
+00000000 T DMAC_SetControlB
+00000000 T DMAC_SetDescFetchMode
+00000000 T DMAC_SetDescriptorAddr
+00000000 T DMAC_SetDestinationAddr
+00000000 T DMAC_SetFlowControl
+00000000 T DMAC_SetSingleTransferSize
+00000000 T DMAC_SetSourceAddr
+00000000 T DMAC_SethandshakeInterface
+00000000 T DMAC_SuspendChannel
+000002a8 r __FUNCTION__.4828
+0000029c r __FUNCTION__.4834
+0000028c r __FUNCTION__.4840
+0000027c r __FUNCTION__.4847
+0000026c r __FUNCTION__.4854
+00000254 r __FUNCTION__.4860
+00000244 r __FUNCTION__.4867
+0000022c r __FUNCTION__.4875
+00000218 r __FUNCTION__.4884
+00000204 r __FUNCTION__.4897
+000001f0 r __FUNCTION__.4905
+000001d8 r __FUNCTION__.4918
+000001c4 r __FUNCTION__.4926
+000001b0 r __FUNCTION__.4939
+0000019c r __FUNCTION__.4952
+00000184 r __FUNCTION__.4964
+00000170 r __FUNCTION__.4973
+0000015c r __FUNCTION__.4983
+00000144 r __FUNCTION__.4995
+0000012c r __FUNCTION__.5005
+00000114 r __FUNCTION__.5018
+00000100 r __FUNCTION__.5034
+000000ec r __FUNCTION__.5045
+000000d0 r __FUNCTION__.5065
+000000b4 r __FUNCTION__.5090
+000000a0 r __FUNCTION__.5114
+00000088 r __FUNCTION__.5126
+00000074 r __FUNCTION__.5150
+00000068 r __FUNCTION__.5169
+0000004c r __FUNCTION__.5181
+ U __assert_func
+
+eefc.o:
+00000000 r .LC0
+00000014 r .LC1
+00000030 r .LC2
+0000005c r .LC3
+00000060 r .LC4
+00000080 r .LC5
+00000090 r .LC6
+000000a0 r .LC7
+000000a4 r .LC8
+00000000 T EFC_ComputeAddress
+00000000 T EFC_DisableFrdyIt
+00000000 T EFC_EnableFrdyIt
+00000000 T EFC_GetResult
+00000000 T EFC_GetStatus
+00000000 T EFC_PerformCommand
+00000000 T EFC_SetFlashAccessMode
+00000000 T EFC_SetWaitState
+00000000 T EFC_StartCommand
+00000000 T EFC_TranslateAddress
+00000000 b IAP_PerformCommand.4954
+00000100 r __FUNCTION__.4858
+000000ec r __FUNCTION__.4890
+000000d8 r __FUNCTION__.4918
+ U __assert_func
+
+emac.o:
+00000000 T EMAC_BackPressureEnable
+00000000 T EMAC_BigFrameEnable
+00000000 T EMAC_BroadcastDisable
+00000000 T EMAC_ClearRxStatus
+00000000 T EMAC_ClearStatistics
+00000000 T EMAC_ClearTxStatus
+00000000 T EMAC_Configure
+00000000 T EMAC_CpyAllEnable
+00000000 T EMAC_DisableIt
+00000000 T EMAC_DiscardFCSEnable
+00000000 T EMAC_EFRHD
+00000000 T EMAC_EnableIt
+00000000 T EMAC_FullDuplexEnable
+00000000 T EMAC_GetConfigure
+00000000 T EMAC_GetItMask
+00000000 T EMAC_GetItStatus
+00000000 T EMAC_GetMDIO
+00000000 T EMAC_GetNetworkControl
+00000000 T EMAC_GetRxQueue
+00000000 T EMAC_GetRxStatus
+00000000 T EMAC_GetStatus
+00000000 T EMAC_GetTxQueue
+00000000 T EMAC_GetTxStatus
+00000000 T EMAC_GetTypeID
+00000000 T EMAC_IRXFCS
+00000000 T EMAC_IncreaseStatistics
+00000000 T EMAC_IsIdle
+00000000 T EMAC_JumboFrameEnable
+00000000 T EMAC_ManagementEnable
+00000000 T EMAC_MulticastHashEnable
+00000000 T EMAC_NetworkControl
+00000000 T EMAC_PHYData
+00000000 T EMAC_PHYMaintain
+00000000 T EMAC_PauseFrameEnable
+00000000 T EMAC_RMIIEnable
+00000000 T EMAC_ReceiveEnable
+00000000 T EMAC_RetryTestEnable
+00000000 T EMAC_RxLenthCheckEnable
+00000000 T EMAC_SetAddress
+00000000 T EMAC_SetAddress32
+00000000 T EMAC_SetAddress64
+00000000 T EMAC_SetClock
+00000000 T EMAC_SetHash
+00000000 T EMAC_SetHash64
+00000000 T EMAC_SetPauseTime
+00000000 T EMAC_SetRxBufferOffset
+00000000 T EMAC_SetRxQueue
+00000000 T EMAC_SetSpeed
+00000000 T EMAC_SetTxQueue
+00000000 T EMAC_SetTypeID
+00000000 T EMAC_StatisticsWriteEnable
+00000000 T EMAC_TransceiverClockEnable
+00000000 T EMAC_TransmissionHalt
+00000000 T EMAC_TransmissionStart
+00000000 T EMAC_TransmitEnable
+
+exceptions.o:
+00000000 W ADC_IrqHandler
+00000000 W BusFault_Handler
+00000000 W CAN0_IrqHandler
+00000000 W CAN1_IrqHandler
+00000000 W DACC_IrqHandler
+00000000 W DMAC_IrqHandler
+00000000 W DebugMon_Handler
+00000000 W EFC0_IrqHandler
+00000000 W EFC1_IrqHandler
+00000000 W EMAC_IrqHandler
+00000000 W HSMCI_IrqHandler
+00000000 W HardFault_Handler
+00000000 T IrqHandlerNotUsed
+00000000 W MemManage_Handler
+00000000 W NMI_Handler
+00000000 W PIOA_IrqHandler
+00000000 W PIOB_IrqHandler
+00000000 W PIOC_IrqHandler
+00000000 W PIOD_IrqHandler
+00000000 W PIOE_IrqHandler
+00000000 W PIOF_IrqHandler
+00000000 W PMC_IrqHandler
+00000000 W PWM_IrqHandler
+00000000 W PendSV_Handler
+00000000 W RSTC_IrqHandler
+00000000 W RTC_IrqHandler
+00000000 W RTT_IrqHandler
+00000000 W SDRAMC_IrqHandler
+00000000 W SMC_IrqHandler
+00000000 W SPI0_IrqHandler
+00000000 W SPI1_IrqHandler
+00000000 W SSC_IrqHandler
+00000000 W SUPC_IrqHandler
+00000000 W SVC_Handler
+00000000 W SysTick_Handler
+00000000 W TC0_IrqHandler
+00000000 W TC1_IrqHandler
+00000000 W TC2_IrqHandler
+00000000 W TC3_IrqHandler
+00000000 W TC4_IrqHandler
+00000000 W TC5_IrqHandler
+00000000 W TC6_IrqHandler
+00000000 W TC7_IrqHandler
+00000000 W TC8_IrqHandler
+00000000 W TRNG_IrqHandler
+00000000 W TWI0_IrqHandler
+00000000 W TWI1_IrqHandler
+00000000 W UART_IrqHandler
+00000000 W UOTGHS_IrqHandler
+00000000 W USART0_IrqHandler
+00000000 W USART1_IrqHandler
+00000000 W USART2_IrqHandler
+00000000 W USART3_IrqHandler
+00000000 W UsageFault_Handler
+00000000 W WDT_IrqHandler
+
+flashd.o:
+00000000 r .LC0
+00000018 r .LC1
+00000064 r .LC2
+00000070 r .LC3
+0000008c r .LC4
+000000c4 r .LC5
+000000d4 r .LC6
+00000114 r .LC7
+00000138 r .LC8
+00000000 t ComputeLockRange
+ U EFC_ComputeAddress
+ U EFC_DisableFrdyIt
+ U EFC_GetResult
+ U EFC_PerformCommand
+ U EFC_SetWaitState
+ U EFC_TranslateAddress
+00000000 T FLASHD_ClearGPNVM
+00000000 T FLASHD_Erase
+00000000 T FLASHD_Initialize
+00000000 T FLASHD_IsGPNVMSet
+00000000 T FLASHD_IsLocked
+00000000 T FLASHD_Lock
+00000000 T FLASHD_ReadUniqueID
+00000000 T FLASHD_SetGPNVM
+00000000 T FLASHD_Unlock
+00000000 T FLASHD_Write
+0000019c r __FUNCTION__.5034
+0000018c r __FUNCTION__.5063
+0000017c r __FUNCTION__.5246
+00000168 r __FUNCTION__.5295
+00000158 r __FUNCTION__.5314
+00000144 r __FUNCTION__.5327
+ U __assert_func
+00000000 b _adwPageBuffer
+00000000 d _aucPageBuffer
+00000004 d _dwUseIAP
+ U iprintf
+ U memcpy
+
+hsmci.o:
+00000000 T HSMCI_Configure
+00000000 T HSMCI_ConfigureCompletionTO
+00000000 T HSMCI_ConfigureDataTO
+00000000 T HSMCI_ConfigureDma
+00000000 T HSMCI_ConfigureMode
+00000000 T HSMCI_ConfigureTransfer
+00000000 T HSMCI_ConfigureWP
+00000000 T HSMCI_Disable
+00000000 T HSMCI_DisableIt
+00000000 T HSMCI_DivCtrl
+00000000 T HSMCI_Enable
+00000000 T HSMCI_EnableDma
+00000000 T HSMCI_EnableIt
+00000000 T HSMCI_FByteEnable
+00000000 T HSMCI_GetBusWidth
+00000000 T HSMCI_GetItMask
+00000000 T HSMCI_GetMode
+00000000 T HSMCI_GetResponse
+00000000 T HSMCI_GetStatus
+00000000 T HSMCI_GetWPStatus
+00000000 T HSMCI_HsEnable
+00000000 T HSMCI_IsFByteEnabled
+00000000 T HSMCI_IsHsEnabled
+00000000 T HSMCI_PadvCtl
+00000000 T HSMCI_ProofEnable
+00000000 T HSMCI_Read
+00000000 T HSMCI_ReadFifo
+00000000 T HSMCI_Reset
+00000000 T HSMCI_Select
+00000000 T HSMCI_SendCmd
+00000000 T HSMCI_SetBlockCount
+00000000 T HSMCI_SetBlockLen
+00000000 T HSMCI_SetBusWidth
+00000000 T HSMCI_SetDmaOffset
+00000000 T HSMCI_SetSlot
+00000000 T HSMCI_Write
+00000000 T HSMCI_WriteFifo
+
+matrix.o:
+
+pio.o:
+00000000 T PIO_SetInput
+00000000 T PIO_SetOutput
+00000000 T PIO_SetPeripheralA
+00000000 T PIO_SetPeripheralB
+
+pio_it.o:
+00000000 t NVIC_ClearPendingIRQ
+00000000 t NVIC_DisableIRQ
+00000000 t NVIC_EnableIRQ
+00000000 t NVIC_SetPriority
+00000000 T PIOA_IrqHandler
+00000000 T PIOB_IrqHandler
+00000000 T PIOC_IrqHandler
+00000000 T PIOD_IrqHandler
+00000000 T PIOE_IrqHandler
+00000000 T PIOF_IrqHandler
+00000000 T PIO_InitializeInterrupts
+ U PMC_EnablePeripheral
+ U PioInterruptHandler
+
+pio_pin.o:
+00000000 T PIO_PinClear
+00000000 T PIO_PinConfigure
+00000000 T PIO_PinDisableWriteProtect
+00000000 T PIO_PinEnableWriteProtect
+00000000 T PIO_PinGet
+00000000 T PIO_PinGetOutputDataStatus
+00000000 T PIO_PinGetWriteProtectViolationInfo
+00000000 T PIO_PinSet
+00000000 T PIO_PinSetDebounceFilter
+00000000 T PIO_PinSetPinType
+ U PIO_SetInput
+ U PIO_SetOutput
+ U PIO_SetPeripheralA
+ U PIO_SetPeripheralB
+ U PMC_EnablePeripheral
+
+pio_pin_it.o:
+00000000 r .LC0
+0000001c r .LC1
+00000030 r .LC2
+00000038 r .LC3
+00000060 r .LC4
+00000070 r .LC5
+00000000 T PIO_PinConfigureIt
+00000000 T PIO_PinDisableIt
+00000000 T PIO_PinEnableIt
+00000000 T PioInterruptHandler
+000000b8 r __FUNCTION__.4829
+000000a4 r __FUNCTION__.4866
+00000094 r __FUNCTION__.4903
+00000080 r __FUNCTION__.4926
+ U __assert_func
+00000000 b _aIntSources
+00000038 b _dwNumSources
+
+pmc.o:
+00000000 r .LC0
+00000014 r .LC1
+00000000 T PMC_ConfigureMckWithPlla
+00000000 T PMC_ConfigurePck
+00000000 T PMC_DisableAllClocks
+00000000 T PMC_DisableAllPeripherals
+00000000 T PMC_DisableExtOsc12MHz
+00000000 T PMC_DisableIntRC4_8_12MHz
+00000000 T PMC_DisablePck
+00000000 T PMC_DisablePeripheral
+00000000 T PMC_DisableUpllClock
+00000000 T PMC_EnableAllPeripherals
+00000000 T PMC_EnableExtOsc12MHz
+00000000 T PMC_EnableIntRC4_8_12MHz
+00000000 T PMC_EnablePck
+00000000 T PMC_EnablePeripheral
+00000000 T PMC_EnableUpllClock
+00000000 T PMC_GetStartupTime
+00000000 T PMC_IsPeriphEnabled
+00000000 T PMC_SetMckSelection
+00000000 T PMC_SetPllaClock
+00000000 T PMC_SetStartupTime
+00000000 D PmcFastRcCnt
+00000004 D PmcMainOscCnt
+00000008 D PmcPllaCnt
+0000000c D PmcUpllCnt
+00000000 T SUPC_SelectExtCrystal32K
+00000000 t _PMC_SetMckPrescaler
+00000000 t _PMC_SwitchMck2MainClock
+00000000 t _PMC_SwitchMck2PllaClock
+00000000 t _PMC_SwitchMck2SlowClock
+00000000 t _PMC_SwitchMck2UpllClock
+0000004c r __FUNCTION__.4900
+00000034 r __FUNCTION__.4937
+00000020 r __FUNCTION__.5006
+ U __assert_func
+
+pwm.o:
+00000000 r .LC0
+00000014 r .LC1
+0000016c r .LC10
+00000198 r .LC11
+000001c4 r .LC12
+000001d4 r .LC13
+000001dc r .LC14
+00000024 r .LC2
+00000050 r .LC3
+0000007c r .LC4
+000000b0 r .LC5
+000000dc r .LC6
+00000108 r .LC7
+00000134 r .LC8
+00000140 r .LC9
+000002b0 r C.18.4836
+00000000 t FindClockConfiguration
+00000000 T PWMC_ConfigureChannel
+00000000 T PWMC_ConfigureChannelExt
+00000000 T PWMC_ConfigureClocks
+00000000 T PWMC_ConfigureComparisonUnit
+00000000 T PWMC_ConfigureEventLineMode
+00000000 T PWMC_ConfigureSyncChannel
+00000000 T PWMC_DisableChannel
+00000000 T PWMC_DisableChannelIt
+00000000 T PWMC_DisableIt
+00000000 T PWMC_DisableOverrideOutput
+00000000 T PWMC_EnableChannel
+00000000 T PWMC_EnableChannelIt
+00000000 T PWMC_EnableFaultProtection
+00000000 T PWMC_EnableIt
+00000000 T PWMC_EnableOverrideOutput
+00000000 T PWMC_FaultClear
+00000000 T PWMC_SetDeadTime
+00000000 T PWMC_SetDutyCycle
+00000000 T PWMC_SetFaultMode
+00000000 T PWMC_SetFaultProtectionValue
+00000000 T PWMC_SetOverrideValue
+00000000 T PWMC_SetPeriod
+00000000 T PWMC_SetSyncChannelUpdatePeriod
+00000000 T PWMC_SetSyncChannelUpdateUnlock
+00000000 T PWMC_WriteBuffer
+000002dc r __FUNCTION__.4832
+00000298 r __FUNCTION__.4859
+0000027c r __FUNCTION__.4898
+00000264 r __FUNCTION__.4949
+00000250 r __FUNCTION__.4984
+0000023c r __FUNCTION__.5008
+00000220 r __FUNCTION__.5152
+00000200 r __FUNCTION__.5180
+000001e4 r __FUNCTION__.5197
+ U __assert_func
+
+rstc.o:
+00000000 T RSTC_ConfigureMode
+00000000 T RSTC_ExtReset
+00000000 T RSTC_GetNrstLevel
+00000000 T RSTC_GetStatus
+00000000 T RSTC_IsBusy
+00000000 T RSTC_IsUserResetDetected
+00000000 T RSTC_PeripheralReset
+00000000 T RSTC_ProcessorReset
+00000000 T RSTC_SetExtResetLength
+00000000 T RSTC_SetUserResetEnable
+00000000 T RSTC_SetUserResetInterruptEnable
+
+rtc.o:
+00000000 r .LC0
+00000014 r .LC1
+00000030 r .LC2
+00000000 T RTC_ClearSCCR
+00000000 T RTC_DisableIt
+00000000 T RTC_EnableIt
+00000000 T RTC_GetDate
+00000000 T RTC_GetHourMode
+00000000 T RTC_GetSR
+00000000 T RTC_GetTime
+00000000 T RTC_SetDate
+00000000 T RTC_SetDateAlarm
+00000000 T RTC_SetHourMode
+00000000 T RTC_SetTime
+00000000 T RTC_SetTimeAlarm
+00000078 r __FUNCTION__.4829
+00000068 r __FUNCTION__.4842
+00000058 r __FUNCTION__.4850
+ U __assert_func
+
+rtt.o:
+00000000 r .LC0
+00000014 r .LC1
+00000034 r .LC2
+00000000 T RTT_EnableIT
+00000000 T RTT_GetStatus
+00000000 T RTT_GetTime
+00000000 T RTT_SetAlarm
+00000000 T RTT_SetPrescaler
+00000050 r __FUNCTION__.4839
+00000040 r __FUNCTION__.4853
+ U __assert_func
+
+sdramc.o:
+ U PMC_EnablePeripheral
+00000000 T SDRAMC_Configure
+00000000 t SDRAMC_compute_CR_value
+
+smc.o:
+00000000 r .LC0
+0000003c r .LC1
+00000000 t ECC_CountBitsInByte
+00000000 t ECC_CountBitsInCode
+00000000 T SMC_ECC_Configure
+00000000 t SMC_ECC_Get24bitPer256Ecc
+00000000 t SMC_ECC_Get24bitPer512Ecc
+00000000 t SMC_ECC_Get24bitPerPageEcc
+00000000 t SMC_ECC_Get32bitPer256Ecc
+00000000 t SMC_ECC_Get32bitPerPageEcc
+00000000 T SMC_ECC_GetCorrectoinType
+00000000 T SMC_ECC_GetEccParity
+00000000 T SMC_ECC_GetStatus
+00000000 T SMC_ECC_GetValue
+00000000 t SMC_ECC_Verify256x16bitHsiao
+00000000 t SMC_ECC_Verify256x8bitHsiao
+00000000 t SMC_ECC_Verify512x8bitHsiao
+00000000 T SMC_ECC_VerifyHsiao
+00000000 t SMC_ECC_VerifyPageOf16bitHsiao
+00000000 t SMC_ECC_VerifyPageOf8bitHsiao
+00000000 t SMC_NFC_CommandDone
+00000000 T SMC_NFC_Configure
+00000000 T SMC_NFC_DisableSpareRead
+00000000 T SMC_NFC_DisableSpareWrite
+00000000 T SMC_NFC_EnableNfc
+00000000 T SMC_NFC_EnableSpareRead
+00000000 T SMC_NFC_EnableSpareWrite
+00000000 T SMC_NFC_GetStatus
+00000000 T SMC_NFC_Reset
+00000000 T SMC_NFC_SendCommand
+00000000 t SMC_NFC_isHostBusy
+00000000 T SMC_NFC_isNfcBusy
+00000000 T SMC_NFC_isReadyBusy
+00000000 T SMC_NFC_isSpareRead
+00000000 T SMC_NFC_isSpareWrite
+00000000 T SMC_NFC_isTransferComplete
+ U iprintf
+
+spi.o:
+ U PMC_EnablePeripheral
+00000000 T SPI_ChipSelect
+00000000 T SPI_Configure
+00000000 T SPI_ConfigureCSMode
+00000000 T SPI_ConfigureNPCS
+00000000 T SPI_Disable
+00000000 T SPI_DisableIt
+00000000 T SPI_Enable
+00000000 T SPI_EnableIt
+00000000 T SPI_GetStatus
+00000000 T SPI_IsFinished
+00000000 T SPI_Read
+00000000 T SPI_ReleaseCS
+00000000 T SPI_SetMode
+00000000 T SPI_Write
+00000000 T SPI_WriteLast
+
+ssc.o:
+ U PMC_EnablePeripheral
+00000000 T SSC_Configure
+00000000 T SSC_ConfigureReceiver
+00000000 T SSC_ConfigureTransmitter
+00000000 T SSC_DisableInterrupts
+00000000 T SSC_DisableReceiver
+00000000 T SSC_DisableTransmitter
+00000000 T SSC_EnableInterrupts
+00000000 T SSC_EnableReceiver
+00000000 T SSC_EnableTransmitter
+00000000 T SSC_Read
+00000000 T SSC_Write
+
+tc.o:
+00000000 r .LC0
+00000014 r .LC1
+00000000 T TC_Configure
+00000000 T TC_FindMckDivisor
+00000000 T TC_Start
+00000000 T TC_Stop
+00000070 r __FUNCTION__.4831
+00000064 r __FUNCTION__.4842
+0000005c r __FUNCTION__.4852
+ U __assert_func
+
+trng.o:
+
+twi.o:
+00000000 r .LC0
+00000014 r .LC1
+0000001c r .LC2
+00000028 r .LC3
+00000058 r .LC4
+00000068 r .LC5
+00000080 r .LC6
+000000a0 r .LC7
+000000ac r .LC8
+00000000 T TWI_ByteReceived
+00000000 T TWI_ByteSent
+00000000 T TWI_ConfigureMaster
+00000000 T TWI_ConfigureSlave
+00000000 T TWI_DisableIt
+00000000 T TWI_EnableIt
+00000000 T TWI_GetMaskedStatus
+00000000 T TWI_GetStatus
+00000000 T TWI_PDCReceiveComplete
+00000000 T TWI_PDCTransferComplete
+00000000 T TWI_PDC_Disable
+00000000 T TWI_PDC_read
+00000000 T TWI_PDC_write
+00000000 T TWI_ReadByte
+00000000 T TWI_SendSTOPCondition
+00000000 T TWI_StartRead
+00000000 T TWI_StartWrite
+00000000 T TWI_Stop
+00000000 T TWI_TransferComplete
+00000000 T TWI_WriteByte
+00000194 r __FUNCTION__.4833
+00000180 r __FUNCTION__.4864
+00000174 r __FUNCTION__.4877
+00000164 r __FUNCTION__.4886
+00000154 r __FUNCTION__.4908
+00000144 r __FUNCTION__.4917
+00000134 r __FUNCTION__.4927
+00000124 r __FUNCTION__.4978
+00000114 r __FUNCTION__.4988
+00000104 r __FUNCTION__.4997
+000000f0 r __FUNCTION__.5005
+000000d8 r __FUNCTION__.5013
+000000c8 r __FUNCTION__.5053
+ U __assert_func
+
+usart.o:
+00000000 r .LC0
+00000020 r .LC1
+00000040 r .LC2
+00000058 r .LC3
+00000000 T USART_Configure
+00000000 T USART_DisableIt
+00000000 T USART_EnableIt
+00000000 T USART_GetChar
+00000000 T USART_GetStatus
+00000000 T USART_IsDataAvailable
+00000000 T USART_IsRxReady
+00000000 T USART_PutChar
+00000000 T USART_Read
+00000000 T USART_ReadBuffer
+00000000 T USART_SetIrdaFilter
+00000000 T USART_SetReceiverEnabled
+00000000 T USART_SetTransmitterEnabled
+00000000 T USART_Write
+00000000 T USART_WriteBuffer
+00000068 r __FUNCTION__.5125
+ U __assert_func
+ U iprintf
+
+wdt.o:
+00000000 T WDT_Disable
+00000000 T WDT_Enable
+00000000 T WDT_GetPeriod
+00000000 T WDT_GetStatus
+00000000 T WDT_Restart
+
+core_cm3.o:
+00000000 T __LDREXB
+00000000 T __LDREXH
+00000000 T __LDREXW
+00000000 T __RBIT
+00000000 T __REV
+00000000 T __REV16
+00000000 T __REVSH
+00000000 T __STREXB
+00000000 T __STREXH
+00000000 T __STREXW
+00000000 T __get_BASEPRI
+00000000 T __get_CONTROL
+00000000 T __get_FAULTMASK
+00000000 T __get_MSP
+00000000 T __get_PRIMASK
+00000000 T __get_PSP
+00000000 T __set_BASEPRI
+00000000 T __set_CONTROL
+00000000 T __set_FAULTMASK
+00000000 T __set_MSP
+00000000 T __set_PRIMASK
+00000000 T __set_PSP
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/lib/libchip_sam3x2_gcc_rel.a.txt b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/lib/libchip_sam3x2_gcc_rel.a.txt
new file mode 100644
index 0000000..6a2dcc5
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/lib/libchip_sam3x2_gcc_rel.a.txt
@@ -0,0 +1,624 @@
+
+adc.o:
+00000000 T ADC_CheckConfiguration
+00000000 T ADC_GetConvertedData
+00000000 T ADC_Initialize
+00000000 T ADC_ReadBuffer
+00000000 T ADC_SetAnalogChange
+00000000 T ADC_SetClock
+00000000 T ADC_SetCompareChannel
+00000000 T ADC_SetCompareMode
+00000000 T ADC_SetComparisonWindow
+00000000 T ADC_SetFastWakeup
+00000000 T ADC_SetFreeRunMode
+00000000 T ADC_SetLowResolution
+00000000 T ADC_SetSequence
+00000000 T ADC_SetSequenceByList
+00000000 T ADC_SetSequenceMode
+00000000 T ADC_SetSleepMode
+00000000 T ADC_SetTagEnable
+00000000 T ADC_SetTiming
+00000000 T ADC_SetTrigger
+00000000 t GetStartupValue
+ U PMC_EnablePeripheral
+00000018 r __FUNCTION__.4953
+00000000 r __FUNCTION__.5082
+ U __assert_func
+ U iprintf
+
+async.o:
+00000000 T ASYNC_IsFinished
+
+chipid.o:
+
+dacc.o:
+00000000 T DACC_Initialize
+00000000 T DACC_SetConversionData
+00000000 T DACC_WriteBuffer
+ U PMC_EnablePeripheral
+00000000 r __FUNCTION__.4818
+ U __assert_func
+
+dmac.o:
+00000000 T DMAC_Disable
+00000000 T DMAC_DisableChannel
+00000000 T DMAC_DisableChannels
+00000000 T DMAC_DisableIt
+00000000 T DMAC_Enable
+00000000 T DMAC_EnableChannel
+00000000 T DMAC_EnableChannels
+00000000 T DMAC_EnableIt
+00000000 T DMAC_GetChannelStatus
+00000000 T DMAC_GetDestinationAddr
+00000000 T DMAC_GetInterruptMask
+00000000 T DMAC_GetMaskedStatus
+00000000 T DMAC_GetSourceAddr
+00000000 T DMAC_GetStatus
+00000000 T DMAC_KeepChannel
+00000000 T DMAC_Modified_Arbiter
+00000000 T DMAC_RestoreChannel
+00000000 T DMAC_SetBufferSize
+00000000 T DMAC_SetCFG
+00000000 T DMAC_SetChunkTransferSize
+00000000 T DMAC_SetControlA
+00000000 T DMAC_SetControlB
+00000000 T DMAC_SetDescFetchMode
+00000000 T DMAC_SetDescriptorAddr
+00000000 T DMAC_SetDestinationAddr
+00000000 T DMAC_SetFlowControl
+00000000 T DMAC_SetSingleTransferSize
+00000000 T DMAC_SetSourceAddr
+00000000 T DMAC_SethandshakeInterface
+00000000 T DMAC_SuspendChannel
+0000025c r __FUNCTION__.4808
+00000250 r __FUNCTION__.4814
+00000240 r __FUNCTION__.4820
+00000230 r __FUNCTION__.4827
+00000220 r __FUNCTION__.4834
+00000208 r __FUNCTION__.4840
+000001f8 r __FUNCTION__.4847
+000001e0 r __FUNCTION__.4855
+000001cc r __FUNCTION__.4864
+000001b8 r __FUNCTION__.4877
+000001a4 r __FUNCTION__.4885
+0000018c r __FUNCTION__.4898
+00000178 r __FUNCTION__.4906
+00000164 r __FUNCTION__.4919
+00000150 r __FUNCTION__.4932
+00000138 r __FUNCTION__.4944
+00000124 r __FUNCTION__.4953
+00000110 r __FUNCTION__.4963
+000000f8 r __FUNCTION__.4975
+000000e0 r __FUNCTION__.4985
+000000c8 r __FUNCTION__.4998
+000000b4 r __FUNCTION__.5014
+000000a0 r __FUNCTION__.5025
+00000084 r __FUNCTION__.5042
+00000068 r __FUNCTION__.5062
+00000054 r __FUNCTION__.5081
+0000003c r __FUNCTION__.5093
+00000028 r __FUNCTION__.5112
+0000001c r __FUNCTION__.5128
+00000000 r __FUNCTION__.5140
+ U __assert_func
+
+eefc.o:
+00000000 T EFC_ComputeAddress
+00000000 T EFC_DisableFrdyIt
+00000000 T EFC_EnableFrdyIt
+00000000 T EFC_GetResult
+00000000 T EFC_GetStatus
+00000000 T EFC_PerformCommand
+00000000 T EFC_SetFlashAccessMode
+00000000 T EFC_SetWaitState
+00000000 T EFC_StartCommand
+00000000 T EFC_TranslateAddress
+00000000 b IAP_PerformCommand.4932
+00000028 r __FUNCTION__.4838
+00000014 r __FUNCTION__.4870
+00000000 r __FUNCTION__.4896
+ U __assert_func
+
+emac.o:
+00000000 T EMAC_BackPressureEnable
+00000000 T EMAC_BigFrameEnable
+00000000 T EMAC_BroadcastDisable
+00000000 T EMAC_ClearRxStatus
+00000000 T EMAC_ClearStatistics
+00000000 T EMAC_ClearTxStatus
+00000000 T EMAC_Configure
+00000000 T EMAC_CpyAllEnable
+00000000 T EMAC_DisableIt
+00000000 T EMAC_DiscardFCSEnable
+00000000 T EMAC_EFRHD
+00000000 T EMAC_EnableIt
+00000000 T EMAC_FullDuplexEnable
+00000000 T EMAC_GetConfigure
+00000000 T EMAC_GetItMask
+00000000 T EMAC_GetItStatus
+00000000 T EMAC_GetMDIO
+00000000 T EMAC_GetNetworkControl
+00000000 T EMAC_GetRxQueue
+00000000 T EMAC_GetRxStatus
+00000000 T EMAC_GetStatus
+00000000 T EMAC_GetTxQueue
+00000000 T EMAC_GetTxStatus
+00000000 T EMAC_GetTypeID
+00000000 T EMAC_IRXFCS
+00000000 T EMAC_IncreaseStatistics
+00000000 T EMAC_IsIdle
+00000000 T EMAC_JumboFrameEnable
+00000000 T EMAC_ManagementEnable
+00000000 T EMAC_MulticastHashEnable
+00000000 T EMAC_NetworkControl
+00000000 T EMAC_PHYData
+00000000 T EMAC_PHYMaintain
+00000000 T EMAC_PauseFrameEnable
+00000000 T EMAC_RMIIEnable
+00000000 T EMAC_ReceiveEnable
+00000000 T EMAC_RetryTestEnable
+00000000 T EMAC_RxLenthCheckEnable
+00000000 T EMAC_SetAddress
+00000000 T EMAC_SetAddress32
+00000000 T EMAC_SetAddress64
+00000000 T EMAC_SetClock
+00000000 T EMAC_SetHash
+00000000 T EMAC_SetHash64
+00000000 T EMAC_SetPauseTime
+00000000 T EMAC_SetRxBufferOffset
+00000000 T EMAC_SetRxQueue
+00000000 T EMAC_SetSpeed
+00000000 T EMAC_SetTxQueue
+00000000 T EMAC_SetTypeID
+00000000 T EMAC_StatisticsWriteEnable
+00000000 T EMAC_TransceiverClockEnable
+00000000 T EMAC_TransmissionHalt
+00000000 T EMAC_TransmissionStart
+00000000 T EMAC_TransmitEnable
+
+exceptions.o:
+00000000 W ADC_IrqHandler
+00000000 W BusFault_Handler
+00000000 W CAN0_IrqHandler
+00000000 W CAN1_IrqHandler
+00000000 W DACC_IrqHandler
+00000000 W DMAC_IrqHandler
+00000000 W DebugMon_Handler
+00000000 W EFC0_IrqHandler
+00000000 W EFC1_IrqHandler
+00000000 W EMAC_IrqHandler
+00000000 W HSMCI_IrqHandler
+00000000 W HardFault_Handler
+00000000 T IrqHandlerNotUsed
+00000000 W MemManage_Handler
+00000000 W NMI_Handler
+00000000 W PIOA_IrqHandler
+00000000 W PIOB_IrqHandler
+00000000 W PIOC_IrqHandler
+00000000 W PIOD_IrqHandler
+00000000 W PIOE_IrqHandler
+00000000 W PIOF_IrqHandler
+00000000 W PMC_IrqHandler
+00000000 W PWM_IrqHandler
+00000000 W PendSV_Handler
+00000000 W RSTC_IrqHandler
+00000000 W RTC_IrqHandler
+00000000 W RTT_IrqHandler
+00000000 W SDRAMC_IrqHandler
+00000000 W SMC_IrqHandler
+00000000 W SPI0_IrqHandler
+00000000 W SPI1_IrqHandler
+00000000 W SSC_IrqHandler
+00000000 W SUPC_IrqHandler
+00000000 W SVC_Handler
+00000000 W SysTick_Handler
+00000000 W TC0_IrqHandler
+00000000 W TC1_IrqHandler
+00000000 W TC2_IrqHandler
+00000000 W TC3_IrqHandler
+00000000 W TC4_IrqHandler
+00000000 W TC5_IrqHandler
+00000000 W TC6_IrqHandler
+00000000 W TC7_IrqHandler
+00000000 W TC8_IrqHandler
+00000000 W TRNG_IrqHandler
+00000000 W TWI0_IrqHandler
+00000000 W TWI1_IrqHandler
+00000000 W UART_IrqHandler
+00000000 W UOTGHS_IrqHandler
+00000000 W USART0_IrqHandler
+00000000 W USART1_IrqHandler
+00000000 W USART2_IrqHandler
+00000000 W USART3_IrqHandler
+00000000 W UsageFault_Handler
+00000000 W WDT_IrqHandler
+
+flashd.o:
+00000000 t ComputeLockRange
+ U EFC_ComputeAddress
+ U EFC_DisableFrdyIt
+ U EFC_GetResult
+ U EFC_PerformCommand
+ U EFC_SetWaitState
+ U EFC_TranslateAddress
+00000000 T FLASHD_ClearGPNVM
+00000000 T FLASHD_Erase
+00000000 T FLASHD_Initialize
+00000000 T FLASHD_IsGPNVMSet
+00000000 T FLASHD_IsLocked
+00000000 T FLASHD_Lock
+00000000 T FLASHD_ReadUniqueID
+00000000 T FLASHD_SetGPNVM
+00000000 T FLASHD_Unlock
+00000000 T FLASHD_Write
+00000048 r __FUNCTION__.5036
+00000038 r __FUNCTION__.5194
+00000000 r __FUNCTION__.5240
+00000028 r __FUNCTION__.5259
+00000014 r __FUNCTION__.5272
+ U __assert_func
+00000000 b _adwPageBuffer
+00000058 r _aucPageBuffer
+00000000 d _dwUseIAP
+ U memcpy
+
+hsmci.o:
+00000000 T HSMCI_Configure
+00000000 T HSMCI_ConfigureCompletionTO
+00000000 T HSMCI_ConfigureDataTO
+00000000 T HSMCI_ConfigureDma
+00000000 T HSMCI_ConfigureMode
+00000000 T HSMCI_ConfigureTransfer
+00000000 T HSMCI_ConfigureWP
+00000000 T HSMCI_Disable
+00000000 T HSMCI_DisableIt
+00000000 T HSMCI_DivCtrl
+00000000 T HSMCI_Enable
+00000000 T HSMCI_EnableDma
+00000000 T HSMCI_EnableIt
+00000000 T HSMCI_FByteEnable
+00000000 T HSMCI_GetBusWidth
+00000000 T HSMCI_GetItMask
+00000000 T HSMCI_GetMode
+00000000 T HSMCI_GetResponse
+00000000 T HSMCI_GetStatus
+00000000 T HSMCI_GetWPStatus
+00000000 T HSMCI_HsEnable
+00000000 T HSMCI_IsFByteEnabled
+00000000 T HSMCI_IsHsEnabled
+00000000 T HSMCI_PadvCtl
+00000000 T HSMCI_ProofEnable
+00000000 T HSMCI_Read
+00000000 T HSMCI_ReadFifo
+00000000 T HSMCI_Reset
+00000000 T HSMCI_Select
+00000000 T HSMCI_SendCmd
+00000000 T HSMCI_SetBlockCount
+00000000 T HSMCI_SetBlockLen
+00000000 T HSMCI_SetBusWidth
+00000000 T HSMCI_SetDmaOffset
+00000000 T HSMCI_SetSlot
+00000000 T HSMCI_Write
+00000000 T HSMCI_WriteFifo
+
+matrix.o:
+
+pio.o:
+00000000 T PIO_SetInput
+00000000 T PIO_SetOutput
+00000000 T PIO_SetPeripheralA
+00000000 T PIO_SetPeripheralB
+
+pio_it.o:
+00000000 T PIOA_IrqHandler
+00000000 T PIOB_IrqHandler
+00000000 T PIOC_IrqHandler
+00000000 T PIOD_IrqHandler
+00000000 T PIOE_IrqHandler
+00000000 T PIOF_IrqHandler
+00000000 T PIO_InitializeInterrupts
+ U PMC_EnablePeripheral
+ U PioInterruptHandler
+
+pio_pin.o:
+00000000 T PIO_PinClear
+00000000 T PIO_PinConfigure
+00000000 T PIO_PinDisableWriteProtect
+00000000 T PIO_PinEnableWriteProtect
+00000000 T PIO_PinGet
+00000000 T PIO_PinGetOutputDataStatus
+00000000 T PIO_PinGetWriteProtectViolationInfo
+00000000 T PIO_PinSet
+00000000 T PIO_PinSetDebounceFilter
+00000000 T PIO_PinSetPinType
+ U PIO_SetInput
+ U PIO_SetOutput
+ U PIO_SetPeripheralA
+ U PIO_SetPeripheralB
+ U PMC_EnablePeripheral
+
+pio_pin_it.o:
+00000000 T PIO_PinConfigureIt
+00000000 T PIO_PinDisableIt
+00000000 T PIO_PinEnableIt
+00000000 T PioInterruptHandler
+00000038 r __FUNCTION__.4809
+00000024 r __FUNCTION__.4838
+00000014 r __FUNCTION__.4864
+00000000 r __FUNCTION__.4886
+ U __assert_func
+00000004 b _aIntSources
+00000000 b _dwNumSources
+
+pmc.o:
+00000000 T PMC_ConfigureMckWithPlla
+00000000 T PMC_ConfigurePck
+00000000 T PMC_DisableAllClocks
+00000000 T PMC_DisableAllPeripherals
+00000000 T PMC_DisableExtOsc12MHz
+00000000 T PMC_DisableIntRC4_8_12MHz
+00000000 T PMC_DisablePck
+00000000 T PMC_DisablePeripheral
+00000000 T PMC_DisableUpllClock
+00000000 T PMC_EnableAllPeripherals
+00000000 T PMC_EnableExtOsc12MHz
+00000000 T PMC_EnableIntRC4_8_12MHz
+00000000 T PMC_EnablePck
+00000000 T PMC_EnablePeripheral
+00000000 T PMC_EnableUpllClock
+00000000 T PMC_GetStartupTime
+00000000 T PMC_IsPeriphEnabled
+00000000 T PMC_SetMckSelection
+00000000 T PMC_SetPllaClock
+00000000 T PMC_SetStartupTime
+00000000 D PmcFastRcCnt
+00000004 D PmcMainOscCnt
+00000008 D PmcPllaCnt
+0000000c D PmcUpllCnt
+00000000 T SUPC_SelectExtCrystal32K
+00000000 t _PMC_SetMckPrescaler
+00000000 t _PMC_SwitchMck2MainClock
+00000000 t _PMC_SwitchMck2SlowClock
+0000002c r __FUNCTION__.4870
+00000014 r __FUNCTION__.4894
+00000000 r __FUNCTION__.4944
+ U __assert_func
+
+pwm.o:
+00000080 r C.16.4816
+00000000 t FindClockConfiguration
+00000000 T PWMC_ConfigureChannel
+00000000 T PWMC_ConfigureChannelExt
+00000000 T PWMC_ConfigureClocks
+00000000 T PWMC_ConfigureComparisonUnit
+00000000 T PWMC_ConfigureEventLineMode
+00000000 T PWMC_ConfigureSyncChannel
+00000000 T PWMC_DisableChannel
+00000000 T PWMC_DisableChannelIt
+00000000 T PWMC_DisableIt
+00000000 T PWMC_DisableOverrideOutput
+00000000 T PWMC_EnableChannel
+00000000 T PWMC_EnableChannelIt
+00000000 T PWMC_EnableFaultProtection
+00000000 T PWMC_EnableIt
+00000000 T PWMC_EnableOverrideOutput
+00000000 T PWMC_FaultClear
+00000000 T PWMC_SetDeadTime
+00000000 T PWMC_SetDutyCycle
+00000000 T PWMC_SetFaultMode
+00000000 T PWMC_SetFaultProtectionValue
+00000000 T PWMC_SetOverrideValue
+00000000 T PWMC_SetPeriod
+00000000 T PWMC_SetSyncChannelUpdatePeriod
+00000000 T PWMC_SetSyncChannelUpdateUnlock
+00000000 T PWMC_WriteBuffer
+000000ac r __FUNCTION__.4812
+000000f8 r __FUNCTION__.4836
+000000dc r __FUNCTION__.4869
+000000c4 r __FUNCTION__.4914
+0000006c r __FUNCTION__.4946
+00000058 r __FUNCTION__.4966
+0000003c r __FUNCTION__.5099
+0000001c r __FUNCTION__.5122
+00000000 r __FUNCTION__.5136
+ U __assert_func
+
+rstc.o:
+00000000 T RSTC_ConfigureMode
+00000000 T RSTC_ExtReset
+00000000 T RSTC_GetNrstLevel
+00000000 T RSTC_GetStatus
+00000000 T RSTC_IsBusy
+00000000 T RSTC_IsUserResetDetected
+00000000 T RSTC_PeripheralReset
+00000000 T RSTC_ProcessorReset
+00000000 T RSTC_SetExtResetLength
+00000000 T RSTC_SetUserResetEnable
+00000000 T RSTC_SetUserResetInterruptEnable
+
+rtc.o:
+00000000 T RTC_ClearSCCR
+00000000 T RTC_DisableIt
+00000000 T RTC_EnableIt
+00000000 T RTC_GetDate
+00000000 T RTC_GetHourMode
+00000000 T RTC_GetSR
+00000000 T RTC_GetTime
+00000000 T RTC_SetDate
+00000000 T RTC_SetDateAlarm
+00000000 T RTC_SetHourMode
+00000000 T RTC_SetTime
+00000000 T RTC_SetTimeAlarm
+00000020 r __FUNCTION__.4809
+00000010 r __FUNCTION__.4822
+00000000 r __FUNCTION__.4830
+ U __assert_func
+
+rtt.o:
+00000000 T RTT_EnableIT
+00000000 T RTT_GetStatus
+00000000 T RTT_GetTime
+00000000 T RTT_SetAlarm
+00000000 T RTT_SetPrescaler
+00000010 r __FUNCTION__.4819
+00000000 r __FUNCTION__.4833
+ U __assert_func
+
+sdramc.o:
+ U PMC_EnablePeripheral
+00000000 T SDRAMC_Configure
+
+smc.o:
+00000000 t ECC_CountBitsInByte
+00000000 t ECC_CountBitsInCode
+00000000 T SMC_ECC_Configure
+00000000 T SMC_ECC_GetCorrectoinType
+00000000 T SMC_ECC_GetEccParity
+00000000 T SMC_ECC_GetStatus
+00000000 T SMC_ECC_GetValue
+00000000 T SMC_ECC_VerifyHsiao
+00000000 T SMC_NFC_Configure
+00000000 T SMC_NFC_DisableSpareRead
+00000000 T SMC_NFC_DisableSpareWrite
+00000000 T SMC_NFC_EnableNfc
+00000000 T SMC_NFC_EnableSpareRead
+00000000 T SMC_NFC_EnableSpareWrite
+00000000 T SMC_NFC_GetStatus
+00000000 T SMC_NFC_Reset
+00000000 T SMC_NFC_SendCommand
+00000000 T SMC_NFC_isNfcBusy
+00000000 T SMC_NFC_isReadyBusy
+00000000 T SMC_NFC_isSpareRead
+00000000 T SMC_NFC_isSpareWrite
+00000000 T SMC_NFC_isTransferComplete
+00000000 t T.35
+
+spi.o:
+ U PMC_EnablePeripheral
+00000000 T SPI_ChipSelect
+00000000 T SPI_Configure
+00000000 T SPI_ConfigureCSMode
+00000000 T SPI_ConfigureNPCS
+00000000 T SPI_Disable
+00000000 T SPI_DisableIt
+00000000 T SPI_Enable
+00000000 T SPI_EnableIt
+00000000 T SPI_GetStatus
+00000000 T SPI_IsFinished
+00000000 T SPI_Read
+00000000 T SPI_ReleaseCS
+00000000 T SPI_SetMode
+00000000 T SPI_Write
+00000000 T SPI_WriteLast
+
+ssc.o:
+ U PMC_EnablePeripheral
+00000000 T SSC_Configure
+00000000 T SSC_ConfigureReceiver
+00000000 T SSC_ConfigureTransmitter
+00000000 T SSC_DisableInterrupts
+00000000 T SSC_DisableReceiver
+00000000 T SSC_DisableTransmitter
+00000000 T SSC_EnableInterrupts
+00000000 T SSC_EnableReceiver
+00000000 T SSC_EnableTransmitter
+00000000 T SSC_Read
+00000000 T SSC_Write
+
+tc.o:
+00000000 T TC_Configure
+00000000 T TC_FindMckDivisor
+00000000 T TC_Start
+00000000 T TC_Stop
+00000014 r __FUNCTION__.4811
+00000008 r __FUNCTION__.4822
+00000000 r __FUNCTION__.4832
+ U __assert_func
+
+trng.o:
+
+twi.o:
+00000000 T TWI_ByteReceived
+00000000 T TWI_ByteSent
+00000000 T TWI_ConfigureMaster
+00000000 T TWI_ConfigureSlave
+00000000 T TWI_DisableIt
+00000000 T TWI_EnableIt
+00000000 T TWI_GetMaskedStatus
+00000000 T TWI_GetStatus
+00000000 T TWI_PDCReceiveComplete
+00000000 T TWI_PDCTransferComplete
+00000000 T TWI_PDC_Disable
+00000000 T TWI_PDC_read
+00000000 T TWI_PDC_write
+00000000 T TWI_ReadByte
+00000000 T TWI_SendSTOPCondition
+00000000 T TWI_StartRead
+00000000 T TWI_StartWrite
+00000000 T TWI_Stop
+00000000 T TWI_TransferComplete
+00000000 T TWI_WriteByte
+000000cc r __FUNCTION__.4813
+000000b8 r __FUNCTION__.4844
+000000ac r __FUNCTION__.4857
+0000009c r __FUNCTION__.4866
+0000008c r __FUNCTION__.4888
+0000007c r __FUNCTION__.4897
+0000006c r __FUNCTION__.4907
+0000005c r __FUNCTION__.4958
+0000004c r __FUNCTION__.4968
+0000003c r __FUNCTION__.4977
+00000028 r __FUNCTION__.4985
+00000010 r __FUNCTION__.4993
+00000000 r __FUNCTION__.5031
+ U __assert_func
+
+usart.o:
+00000000 T USART_Configure
+00000000 T USART_DisableIt
+00000000 T USART_EnableIt
+00000000 T USART_GetChar
+00000000 T USART_GetStatus
+00000000 T USART_IsDataAvailable
+00000000 T USART_IsRxReady
+00000000 T USART_PutChar
+00000000 T USART_Read
+00000000 T USART_ReadBuffer
+00000000 T USART_SetIrdaFilter
+00000000 T USART_SetReceiverEnabled
+00000000 T USART_SetTransmitterEnabled
+00000000 T USART_Write
+00000000 T USART_WriteBuffer
+00000000 r __FUNCTION__.5098
+ U __assert_func
+
+wdt.o:
+00000000 T WDT_Disable
+00000000 T WDT_Enable
+00000000 T WDT_GetPeriod
+00000000 T WDT_GetStatus
+00000000 T WDT_Restart
+
+core_cm3.o:
+00000000 T __LDREXB
+00000000 T __LDREXH
+00000000 T __LDREXW
+00000000 T __RBIT
+00000000 T __REV
+00000000 T __REV16
+00000000 T __REVSH
+00000000 T __STREXB
+00000000 T __STREXH
+00000000 T __STREXW
+00000000 T __get_BASEPRI
+00000000 T __get_CONTROL
+00000000 T __get_FAULTMASK
+00000000 T __get_MSP
+00000000 T __get_PRIMASK
+00000000 T __get_PSP
+00000000 T __set_BASEPRI
+00000000 T __set_CONTROL
+00000000 T __set_FAULTMASK
+00000000 T __set_MSP
+00000000 T __set_PRIMASK
+00000000 T __set_PSP
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/lib/libchip_sam3x4_gcc_dbg.a.txt b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/lib/libchip_sam3x4_gcc_dbg.a.txt
new file mode 100644
index 0000000..a8d5783
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/lib/libchip_sam3x4_gcc_dbg.a.txt
@@ -0,0 +1,722 @@
+
+adc.o:
+00000000 r .LC0
+00000014 r .LC1
+00000024 r .LC2
+0000005c r .LC3
+00000088 r .LC4
+000000b8 r .LC5
+00000000 T ADC_CheckConfiguration
+00000000 T ADC_GetConvertedData
+00000000 T ADC_Initialize
+00000000 T ADC_ReadBuffer
+00000000 T ADC_SetAnalogChange
+00000000 T ADC_SetClock
+00000000 T ADC_SetCompareChannel
+00000000 T ADC_SetCompareMode
+00000000 T ADC_SetComparisonWindow
+00000000 T ADC_SetFastWakeup
+00000000 T ADC_SetFreeRunMode
+00000000 T ADC_SetLowResolution
+00000000 T ADC_SetSequence
+00000000 T ADC_SetSequenceByList
+00000000 T ADC_SetSequenceMode
+00000000 T ADC_SetSleepMode
+00000000 T ADC_SetTagEnable
+00000000 T ADC_SetTiming
+00000000 T ADC_SetTrigger
+00000000 t GetStartupValue
+ U PMC_EnablePeripheral
+000000e0 r __FUNCTION__.4980
+000000c8 r __FUNCTION__.5110
+ U __assert_func
+ U iprintf
+
+async.o:
+00000000 T ASYNC_IsFinished
+
+chipid.o:
+
+dacc.o:
+00000000 r .LC0
+00000014 r .LC1
+00000000 T DACC_Initialize
+00000000 T DACC_SetConversionData
+00000000 T DACC_WriteBuffer
+ U PMC_EnablePeripheral
+00000034 r __FUNCTION__.4838
+ U __assert_func
+
+dmac.o:
+00000000 r .LC0
+00000014 r .LC1
+0000001c r .LC2
+0000003c r .LC3
+00000000 T DMAC_Disable
+00000000 T DMAC_DisableChannel
+00000000 T DMAC_DisableChannels
+00000000 T DMAC_DisableIt
+00000000 T DMAC_Enable
+00000000 T DMAC_EnableChannel
+00000000 T DMAC_EnableChannels
+00000000 T DMAC_EnableIt
+00000000 T DMAC_GetChannelStatus
+00000000 T DMAC_GetDestinationAddr
+00000000 T DMAC_GetInterruptMask
+00000000 T DMAC_GetMaskedStatus
+00000000 T DMAC_GetSourceAddr
+00000000 T DMAC_GetStatus
+00000000 T DMAC_KeepChannel
+00000000 T DMAC_Modified_Arbiter
+00000000 T DMAC_RestoreChannel
+00000000 T DMAC_SetBufferSize
+00000000 T DMAC_SetCFG
+00000000 T DMAC_SetChunkTransferSize
+00000000 T DMAC_SetControlA
+00000000 T DMAC_SetControlB
+00000000 T DMAC_SetDescFetchMode
+00000000 T DMAC_SetDescriptorAddr
+00000000 T DMAC_SetDestinationAddr
+00000000 T DMAC_SetFlowControl
+00000000 T DMAC_SetSingleTransferSize
+00000000 T DMAC_SetSourceAddr
+00000000 T DMAC_SethandshakeInterface
+00000000 T DMAC_SuspendChannel
+000002a8 r __FUNCTION__.4828
+0000029c r __FUNCTION__.4834
+0000028c r __FUNCTION__.4840
+0000027c r __FUNCTION__.4847
+0000026c r __FUNCTION__.4854
+00000254 r __FUNCTION__.4860
+00000244 r __FUNCTION__.4867
+0000022c r __FUNCTION__.4875
+00000218 r __FUNCTION__.4884
+00000204 r __FUNCTION__.4897
+000001f0 r __FUNCTION__.4905
+000001d8 r __FUNCTION__.4918
+000001c4 r __FUNCTION__.4926
+000001b0 r __FUNCTION__.4939
+0000019c r __FUNCTION__.4952
+00000184 r __FUNCTION__.4964
+00000170 r __FUNCTION__.4973
+0000015c r __FUNCTION__.4983
+00000144 r __FUNCTION__.4995
+0000012c r __FUNCTION__.5005
+00000114 r __FUNCTION__.5018
+00000100 r __FUNCTION__.5034
+000000ec r __FUNCTION__.5045
+000000d0 r __FUNCTION__.5065
+000000b4 r __FUNCTION__.5090
+000000a0 r __FUNCTION__.5114
+00000088 r __FUNCTION__.5126
+00000074 r __FUNCTION__.5150
+00000068 r __FUNCTION__.5169
+0000004c r __FUNCTION__.5181
+ U __assert_func
+
+eefc.o:
+00000000 r .LC0
+00000014 r .LC1
+00000030 r .LC2
+0000005c r .LC3
+00000060 r .LC4
+00000080 r .LC5
+00000090 r .LC6
+000000a0 r .LC7
+000000a4 r .LC8
+00000000 T EFC_ComputeAddress
+00000000 T EFC_DisableFrdyIt
+00000000 T EFC_EnableFrdyIt
+00000000 T EFC_GetResult
+00000000 T EFC_GetStatus
+00000000 T EFC_PerformCommand
+00000000 T EFC_SetFlashAccessMode
+00000000 T EFC_SetWaitState
+00000000 T EFC_StartCommand
+00000000 T EFC_TranslateAddress
+00000000 b IAP_PerformCommand.4954
+00000100 r __FUNCTION__.4858
+000000ec r __FUNCTION__.4890
+000000d8 r __FUNCTION__.4918
+ U __assert_func
+
+emac.o:
+00000000 T EMAC_BackPressureEnable
+00000000 T EMAC_BigFrameEnable
+00000000 T EMAC_BroadcastDisable
+00000000 T EMAC_ClearRxStatus
+00000000 T EMAC_ClearStatistics
+00000000 T EMAC_ClearTxStatus
+00000000 T EMAC_Configure
+00000000 T EMAC_CpyAllEnable
+00000000 T EMAC_DisableIt
+00000000 T EMAC_DiscardFCSEnable
+00000000 T EMAC_EFRHD
+00000000 T EMAC_EnableIt
+00000000 T EMAC_FullDuplexEnable
+00000000 T EMAC_GetConfigure
+00000000 T EMAC_GetItMask
+00000000 T EMAC_GetItStatus
+00000000 T EMAC_GetMDIO
+00000000 T EMAC_GetNetworkControl
+00000000 T EMAC_GetRxQueue
+00000000 T EMAC_GetRxStatus
+00000000 T EMAC_GetStatus
+00000000 T EMAC_GetTxQueue
+00000000 T EMAC_GetTxStatus
+00000000 T EMAC_GetTypeID
+00000000 T EMAC_IRXFCS
+00000000 T EMAC_IncreaseStatistics
+00000000 T EMAC_IsIdle
+00000000 T EMAC_JumboFrameEnable
+00000000 T EMAC_ManagementEnable
+00000000 T EMAC_MulticastHashEnable
+00000000 T EMAC_NetworkControl
+00000000 T EMAC_PHYData
+00000000 T EMAC_PHYMaintain
+00000000 T EMAC_PauseFrameEnable
+00000000 T EMAC_RMIIEnable
+00000000 T EMAC_ReceiveEnable
+00000000 T EMAC_RetryTestEnable
+00000000 T EMAC_RxLenthCheckEnable
+00000000 T EMAC_SetAddress
+00000000 T EMAC_SetAddress32
+00000000 T EMAC_SetAddress64
+00000000 T EMAC_SetClock
+00000000 T EMAC_SetHash
+00000000 T EMAC_SetHash64
+00000000 T EMAC_SetPauseTime
+00000000 T EMAC_SetRxBufferOffset
+00000000 T EMAC_SetRxQueue
+00000000 T EMAC_SetSpeed
+00000000 T EMAC_SetTxQueue
+00000000 T EMAC_SetTypeID
+00000000 T EMAC_StatisticsWriteEnable
+00000000 T EMAC_TransceiverClockEnable
+00000000 T EMAC_TransmissionHalt
+00000000 T EMAC_TransmissionStart
+00000000 T EMAC_TransmitEnable
+
+exceptions.o:
+00000000 W ADC_IrqHandler
+00000000 W BusFault_Handler
+00000000 W CAN0_IrqHandler
+00000000 W CAN1_IrqHandler
+00000000 W DACC_IrqHandler
+00000000 W DMAC_IrqHandler
+00000000 W DebugMon_Handler
+00000000 W EFC0_IrqHandler
+00000000 W EFC1_IrqHandler
+00000000 W EMAC_IrqHandler
+00000000 W HSMCI_IrqHandler
+00000000 W HardFault_Handler
+00000000 T IrqHandlerNotUsed
+00000000 W MemManage_Handler
+00000000 W NMI_Handler
+00000000 W PIOA_IrqHandler
+00000000 W PIOB_IrqHandler
+00000000 W PIOC_IrqHandler
+00000000 W PIOD_IrqHandler
+00000000 W PIOE_IrqHandler
+00000000 W PIOF_IrqHandler
+00000000 W PMC_IrqHandler
+00000000 W PWM_IrqHandler
+00000000 W PendSV_Handler
+00000000 W RSTC_IrqHandler
+00000000 W RTC_IrqHandler
+00000000 W RTT_IrqHandler
+00000000 W SDRAMC_IrqHandler
+00000000 W SMC_IrqHandler
+00000000 W SPI0_IrqHandler
+00000000 W SPI1_IrqHandler
+00000000 W SSC_IrqHandler
+00000000 W SUPC_IrqHandler
+00000000 W SVC_Handler
+00000000 W SysTick_Handler
+00000000 W TC0_IrqHandler
+00000000 W TC1_IrqHandler
+00000000 W TC2_IrqHandler
+00000000 W TC3_IrqHandler
+00000000 W TC4_IrqHandler
+00000000 W TC5_IrqHandler
+00000000 W TC6_IrqHandler
+00000000 W TC7_IrqHandler
+00000000 W TC8_IrqHandler
+00000000 W TRNG_IrqHandler
+00000000 W TWI0_IrqHandler
+00000000 W TWI1_IrqHandler
+00000000 W UART_IrqHandler
+00000000 W UOTGHS_IrqHandler
+00000000 W USART0_IrqHandler
+00000000 W USART1_IrqHandler
+00000000 W USART2_IrqHandler
+00000000 W USART3_IrqHandler
+00000000 W UsageFault_Handler
+00000000 W WDT_IrqHandler
+
+flashd.o:
+00000000 r .LC0
+00000018 r .LC1
+00000064 r .LC2
+00000070 r .LC3
+0000008c r .LC4
+000000c4 r .LC5
+000000d4 r .LC6
+00000114 r .LC7
+00000138 r .LC8
+00000000 t ComputeLockRange
+ U EFC_ComputeAddress
+ U EFC_DisableFrdyIt
+ U EFC_GetResult
+ U EFC_PerformCommand
+ U EFC_SetWaitState
+ U EFC_TranslateAddress
+00000000 T FLASHD_ClearGPNVM
+00000000 T FLASHD_Erase
+00000000 T FLASHD_Initialize
+00000000 T FLASHD_IsGPNVMSet
+00000000 T FLASHD_IsLocked
+00000000 T FLASHD_Lock
+00000000 T FLASHD_ReadUniqueID
+00000000 T FLASHD_SetGPNVM
+00000000 T FLASHD_Unlock
+00000000 T FLASHD_Write
+0000019c r __FUNCTION__.5034
+0000018c r __FUNCTION__.5063
+0000017c r __FUNCTION__.5246
+00000168 r __FUNCTION__.5295
+00000158 r __FUNCTION__.5314
+00000144 r __FUNCTION__.5327
+ U __assert_func
+00000000 b _adwPageBuffer
+00000000 d _aucPageBuffer
+00000004 d _dwUseIAP
+ U iprintf
+ U memcpy
+
+hsmci.o:
+00000000 T HSMCI_Configure
+00000000 T HSMCI_ConfigureCompletionTO
+00000000 T HSMCI_ConfigureDataTO
+00000000 T HSMCI_ConfigureDma
+00000000 T HSMCI_ConfigureMode
+00000000 T HSMCI_ConfigureTransfer
+00000000 T HSMCI_ConfigureWP
+00000000 T HSMCI_Disable
+00000000 T HSMCI_DisableIt
+00000000 T HSMCI_DivCtrl
+00000000 T HSMCI_Enable
+00000000 T HSMCI_EnableDma
+00000000 T HSMCI_EnableIt
+00000000 T HSMCI_FByteEnable
+00000000 T HSMCI_GetBusWidth
+00000000 T HSMCI_GetItMask
+00000000 T HSMCI_GetMode
+00000000 T HSMCI_GetResponse
+00000000 T HSMCI_GetStatus
+00000000 T HSMCI_GetWPStatus
+00000000 T HSMCI_HsEnable
+00000000 T HSMCI_IsFByteEnabled
+00000000 T HSMCI_IsHsEnabled
+00000000 T HSMCI_PadvCtl
+00000000 T HSMCI_ProofEnable
+00000000 T HSMCI_Read
+00000000 T HSMCI_ReadFifo
+00000000 T HSMCI_Reset
+00000000 T HSMCI_Select
+00000000 T HSMCI_SendCmd
+00000000 T HSMCI_SetBlockCount
+00000000 T HSMCI_SetBlockLen
+00000000 T HSMCI_SetBusWidth
+00000000 T HSMCI_SetDmaOffset
+00000000 T HSMCI_SetSlot
+00000000 T HSMCI_Write
+00000000 T HSMCI_WriteFifo
+
+matrix.o:
+
+pio.o:
+00000000 T PIO_SetInput
+00000000 T PIO_SetOutput
+00000000 T PIO_SetPeripheralA
+00000000 T PIO_SetPeripheralB
+
+pio_it.o:
+00000000 t NVIC_ClearPendingIRQ
+00000000 t NVIC_DisableIRQ
+00000000 t NVIC_EnableIRQ
+00000000 t NVIC_SetPriority
+00000000 T PIOA_IrqHandler
+00000000 T PIOB_IrqHandler
+00000000 T PIOC_IrqHandler
+00000000 T PIOD_IrqHandler
+00000000 T PIOE_IrqHandler
+00000000 T PIOF_IrqHandler
+00000000 T PIO_InitializeInterrupts
+ U PMC_EnablePeripheral
+ U PioInterruptHandler
+
+pio_pin.o:
+00000000 T PIO_PinClear
+00000000 T PIO_PinConfigure
+00000000 T PIO_PinDisableWriteProtect
+00000000 T PIO_PinEnableWriteProtect
+00000000 T PIO_PinGet
+00000000 T PIO_PinGetOutputDataStatus
+00000000 T PIO_PinGetWriteProtectViolationInfo
+00000000 T PIO_PinSet
+00000000 T PIO_PinSetDebounceFilter
+00000000 T PIO_PinSetPinType
+ U PIO_SetInput
+ U PIO_SetOutput
+ U PIO_SetPeripheralA
+ U PIO_SetPeripheralB
+ U PMC_EnablePeripheral
+
+pio_pin_it.o:
+00000000 r .LC0
+0000001c r .LC1
+00000030 r .LC2
+00000038 r .LC3
+00000060 r .LC4
+00000070 r .LC5
+00000000 T PIO_PinConfigureIt
+00000000 T PIO_PinDisableIt
+00000000 T PIO_PinEnableIt
+00000000 T PioInterruptHandler
+000000b8 r __FUNCTION__.4829
+000000a4 r __FUNCTION__.4866
+00000094 r __FUNCTION__.4903
+00000080 r __FUNCTION__.4926
+ U __assert_func
+00000000 b _aIntSources
+00000038 b _dwNumSources
+
+pmc.o:
+00000000 r .LC0
+00000014 r .LC1
+00000000 T PMC_ConfigureMckWithPlla
+00000000 T PMC_ConfigurePck
+00000000 T PMC_DisableAllClocks
+00000000 T PMC_DisableAllPeripherals
+00000000 T PMC_DisableExtOsc12MHz
+00000000 T PMC_DisableIntRC4_8_12MHz
+00000000 T PMC_DisablePck
+00000000 T PMC_DisablePeripheral
+00000000 T PMC_DisableUpllClock
+00000000 T PMC_EnableAllPeripherals
+00000000 T PMC_EnableExtOsc12MHz
+00000000 T PMC_EnableIntRC4_8_12MHz
+00000000 T PMC_EnablePck
+00000000 T PMC_EnablePeripheral
+00000000 T PMC_EnableUpllClock
+00000000 T PMC_GetStartupTime
+00000000 T PMC_IsPeriphEnabled
+00000000 T PMC_SetMckSelection
+00000000 T PMC_SetPllaClock
+00000000 T PMC_SetStartupTime
+00000000 D PmcFastRcCnt
+00000004 D PmcMainOscCnt
+00000008 D PmcPllaCnt
+0000000c D PmcUpllCnt
+00000000 T SUPC_SelectExtCrystal32K
+00000000 t _PMC_SetMckPrescaler
+00000000 t _PMC_SwitchMck2MainClock
+00000000 t _PMC_SwitchMck2PllaClock
+00000000 t _PMC_SwitchMck2SlowClock
+00000000 t _PMC_SwitchMck2UpllClock
+0000004c r __FUNCTION__.4900
+00000034 r __FUNCTION__.4937
+00000020 r __FUNCTION__.5006
+ U __assert_func
+
+pwm.o:
+00000000 r .LC0
+00000014 r .LC1
+0000016c r .LC10
+00000198 r .LC11
+000001c4 r .LC12
+000001d4 r .LC13
+000001dc r .LC14
+00000024 r .LC2
+00000050 r .LC3
+0000007c r .LC4
+000000b0 r .LC5
+000000dc r .LC6
+00000108 r .LC7
+00000134 r .LC8
+00000140 r .LC9
+000002b0 r C.18.4836
+00000000 t FindClockConfiguration
+00000000 T PWMC_ConfigureChannel
+00000000 T PWMC_ConfigureChannelExt
+00000000 T PWMC_ConfigureClocks
+00000000 T PWMC_ConfigureComparisonUnit
+00000000 T PWMC_ConfigureEventLineMode
+00000000 T PWMC_ConfigureSyncChannel
+00000000 T PWMC_DisableChannel
+00000000 T PWMC_DisableChannelIt
+00000000 T PWMC_DisableIt
+00000000 T PWMC_DisableOverrideOutput
+00000000 T PWMC_EnableChannel
+00000000 T PWMC_EnableChannelIt
+00000000 T PWMC_EnableFaultProtection
+00000000 T PWMC_EnableIt
+00000000 T PWMC_EnableOverrideOutput
+00000000 T PWMC_FaultClear
+00000000 T PWMC_SetDeadTime
+00000000 T PWMC_SetDutyCycle
+00000000 T PWMC_SetFaultMode
+00000000 T PWMC_SetFaultProtectionValue
+00000000 T PWMC_SetOverrideValue
+00000000 T PWMC_SetPeriod
+00000000 T PWMC_SetSyncChannelUpdatePeriod
+00000000 T PWMC_SetSyncChannelUpdateUnlock
+00000000 T PWMC_WriteBuffer
+000002dc r __FUNCTION__.4832
+00000298 r __FUNCTION__.4859
+0000027c r __FUNCTION__.4898
+00000264 r __FUNCTION__.4949
+00000250 r __FUNCTION__.4984
+0000023c r __FUNCTION__.5008
+00000220 r __FUNCTION__.5152
+00000200 r __FUNCTION__.5180
+000001e4 r __FUNCTION__.5197
+ U __assert_func
+
+rstc.o:
+00000000 T RSTC_ConfigureMode
+00000000 T RSTC_ExtReset
+00000000 T RSTC_GetNrstLevel
+00000000 T RSTC_GetStatus
+00000000 T RSTC_IsBusy
+00000000 T RSTC_IsUserResetDetected
+00000000 T RSTC_PeripheralReset
+00000000 T RSTC_ProcessorReset
+00000000 T RSTC_SetExtResetLength
+00000000 T RSTC_SetUserResetEnable
+00000000 T RSTC_SetUserResetInterruptEnable
+
+rtc.o:
+00000000 r .LC0
+00000014 r .LC1
+00000030 r .LC2
+00000000 T RTC_ClearSCCR
+00000000 T RTC_DisableIt
+00000000 T RTC_EnableIt
+00000000 T RTC_GetDate
+00000000 T RTC_GetHourMode
+00000000 T RTC_GetSR
+00000000 T RTC_GetTime
+00000000 T RTC_SetDate
+00000000 T RTC_SetDateAlarm
+00000000 T RTC_SetHourMode
+00000000 T RTC_SetTime
+00000000 T RTC_SetTimeAlarm
+00000078 r __FUNCTION__.4829
+00000068 r __FUNCTION__.4842
+00000058 r __FUNCTION__.4850
+ U __assert_func
+
+rtt.o:
+00000000 r .LC0
+00000014 r .LC1
+00000034 r .LC2
+00000000 T RTT_EnableIT
+00000000 T RTT_GetStatus
+00000000 T RTT_GetTime
+00000000 T RTT_SetAlarm
+00000000 T RTT_SetPrescaler
+00000050 r __FUNCTION__.4839
+00000040 r __FUNCTION__.4853
+ U __assert_func
+
+sdramc.o:
+ U PMC_EnablePeripheral
+00000000 T SDRAMC_Configure
+00000000 t SDRAMC_compute_CR_value
+
+smc.o:
+00000000 r .LC0
+0000003c r .LC1
+00000000 t ECC_CountBitsInByte
+00000000 t ECC_CountBitsInCode
+00000000 T SMC_ECC_Configure
+00000000 t SMC_ECC_Get24bitPer256Ecc
+00000000 t SMC_ECC_Get24bitPer512Ecc
+00000000 t SMC_ECC_Get24bitPerPageEcc
+00000000 t SMC_ECC_Get32bitPer256Ecc
+00000000 t SMC_ECC_Get32bitPerPageEcc
+00000000 T SMC_ECC_GetCorrectoinType
+00000000 T SMC_ECC_GetEccParity
+00000000 T SMC_ECC_GetStatus
+00000000 T SMC_ECC_GetValue
+00000000 t SMC_ECC_Verify256x16bitHsiao
+00000000 t SMC_ECC_Verify256x8bitHsiao
+00000000 t SMC_ECC_Verify512x8bitHsiao
+00000000 T SMC_ECC_VerifyHsiao
+00000000 t SMC_ECC_VerifyPageOf16bitHsiao
+00000000 t SMC_ECC_VerifyPageOf8bitHsiao
+00000000 t SMC_NFC_CommandDone
+00000000 T SMC_NFC_Configure
+00000000 T SMC_NFC_DisableSpareRead
+00000000 T SMC_NFC_DisableSpareWrite
+00000000 T SMC_NFC_EnableNfc
+00000000 T SMC_NFC_EnableSpareRead
+00000000 T SMC_NFC_EnableSpareWrite
+00000000 T SMC_NFC_GetStatus
+00000000 T SMC_NFC_Reset
+00000000 T SMC_NFC_SendCommand
+00000000 t SMC_NFC_isHostBusy
+00000000 T SMC_NFC_isNfcBusy
+00000000 T SMC_NFC_isReadyBusy
+00000000 T SMC_NFC_isSpareRead
+00000000 T SMC_NFC_isSpareWrite
+00000000 T SMC_NFC_isTransferComplete
+ U iprintf
+
+spi.o:
+ U PMC_EnablePeripheral
+00000000 T SPI_ChipSelect
+00000000 T SPI_Configure
+00000000 T SPI_ConfigureCSMode
+00000000 T SPI_ConfigureNPCS
+00000000 T SPI_Disable
+00000000 T SPI_DisableIt
+00000000 T SPI_Enable
+00000000 T SPI_EnableIt
+00000000 T SPI_GetStatus
+00000000 T SPI_IsFinished
+00000000 T SPI_Read
+00000000 T SPI_ReleaseCS
+00000000 T SPI_SetMode
+00000000 T SPI_Write
+00000000 T SPI_WriteLast
+
+ssc.o:
+ U PMC_EnablePeripheral
+00000000 T SSC_Configure
+00000000 T SSC_ConfigureReceiver
+00000000 T SSC_ConfigureTransmitter
+00000000 T SSC_DisableInterrupts
+00000000 T SSC_DisableReceiver
+00000000 T SSC_DisableTransmitter
+00000000 T SSC_EnableInterrupts
+00000000 T SSC_EnableReceiver
+00000000 T SSC_EnableTransmitter
+00000000 T SSC_Read
+00000000 T SSC_Write
+
+tc.o:
+00000000 r .LC0
+00000014 r .LC1
+00000000 T TC_Configure
+00000000 T TC_FindMckDivisor
+00000000 T TC_Start
+00000000 T TC_Stop
+00000070 r __FUNCTION__.4831
+00000064 r __FUNCTION__.4842
+0000005c r __FUNCTION__.4852
+ U __assert_func
+
+trng.o:
+
+twi.o:
+00000000 r .LC0
+00000014 r .LC1
+0000001c r .LC2
+00000028 r .LC3
+00000058 r .LC4
+00000068 r .LC5
+00000080 r .LC6
+000000a0 r .LC7
+000000ac r .LC8
+00000000 T TWI_ByteReceived
+00000000 T TWI_ByteSent
+00000000 T TWI_ConfigureMaster
+00000000 T TWI_ConfigureSlave
+00000000 T TWI_DisableIt
+00000000 T TWI_EnableIt
+00000000 T TWI_GetMaskedStatus
+00000000 T TWI_GetStatus
+00000000 T TWI_PDCReceiveComplete
+00000000 T TWI_PDCTransferComplete
+00000000 T TWI_PDC_Disable
+00000000 T TWI_PDC_read
+00000000 T TWI_PDC_write
+00000000 T TWI_ReadByte
+00000000 T TWI_SendSTOPCondition
+00000000 T TWI_StartRead
+00000000 T TWI_StartWrite
+00000000 T TWI_Stop
+00000000 T TWI_TransferComplete
+00000000 T TWI_WriteByte
+00000194 r __FUNCTION__.4833
+00000180 r __FUNCTION__.4864
+00000174 r __FUNCTION__.4877
+00000164 r __FUNCTION__.4886
+00000154 r __FUNCTION__.4908
+00000144 r __FUNCTION__.4917
+00000134 r __FUNCTION__.4927
+00000124 r __FUNCTION__.4978
+00000114 r __FUNCTION__.4988
+00000104 r __FUNCTION__.4997
+000000f0 r __FUNCTION__.5005
+000000d8 r __FUNCTION__.5013
+000000c8 r __FUNCTION__.5053
+ U __assert_func
+
+usart.o:
+00000000 r .LC0
+00000020 r .LC1
+00000040 r .LC2
+00000058 r .LC3
+00000000 T USART_Configure
+00000000 T USART_DisableIt
+00000000 T USART_EnableIt
+00000000 T USART_GetChar
+00000000 T USART_GetStatus
+00000000 T USART_IsDataAvailable
+00000000 T USART_IsRxReady
+00000000 T USART_PutChar
+00000000 T USART_Read
+00000000 T USART_ReadBuffer
+00000000 T USART_SetIrdaFilter
+00000000 T USART_SetReceiverEnabled
+00000000 T USART_SetTransmitterEnabled
+00000000 T USART_Write
+00000000 T USART_WriteBuffer
+00000068 r __FUNCTION__.5125
+ U __assert_func
+ U iprintf
+
+wdt.o:
+00000000 T WDT_Disable
+00000000 T WDT_Enable
+00000000 T WDT_GetPeriod
+00000000 T WDT_GetStatus
+00000000 T WDT_Restart
+
+core_cm3.o:
+00000000 T __LDREXB
+00000000 T __LDREXH
+00000000 T __LDREXW
+00000000 T __RBIT
+00000000 T __REV
+00000000 T __REV16
+00000000 T __REVSH
+00000000 T __STREXB
+00000000 T __STREXH
+00000000 T __STREXW
+00000000 T __get_BASEPRI
+00000000 T __get_CONTROL
+00000000 T __get_FAULTMASK
+00000000 T __get_MSP
+00000000 T __get_PRIMASK
+00000000 T __get_PSP
+00000000 T __set_BASEPRI
+00000000 T __set_CONTROL
+00000000 T __set_FAULTMASK
+00000000 T __set_MSP
+00000000 T __set_PRIMASK
+00000000 T __set_PSP
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/lib/libchip_sam3x4_gcc_rel.a.txt b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/lib/libchip_sam3x4_gcc_rel.a.txt
new file mode 100644
index 0000000..6a2dcc5
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/lib/libchip_sam3x4_gcc_rel.a.txt
@@ -0,0 +1,624 @@
+
+adc.o:
+00000000 T ADC_CheckConfiguration
+00000000 T ADC_GetConvertedData
+00000000 T ADC_Initialize
+00000000 T ADC_ReadBuffer
+00000000 T ADC_SetAnalogChange
+00000000 T ADC_SetClock
+00000000 T ADC_SetCompareChannel
+00000000 T ADC_SetCompareMode
+00000000 T ADC_SetComparisonWindow
+00000000 T ADC_SetFastWakeup
+00000000 T ADC_SetFreeRunMode
+00000000 T ADC_SetLowResolution
+00000000 T ADC_SetSequence
+00000000 T ADC_SetSequenceByList
+00000000 T ADC_SetSequenceMode
+00000000 T ADC_SetSleepMode
+00000000 T ADC_SetTagEnable
+00000000 T ADC_SetTiming
+00000000 T ADC_SetTrigger
+00000000 t GetStartupValue
+ U PMC_EnablePeripheral
+00000018 r __FUNCTION__.4953
+00000000 r __FUNCTION__.5082
+ U __assert_func
+ U iprintf
+
+async.o:
+00000000 T ASYNC_IsFinished
+
+chipid.o:
+
+dacc.o:
+00000000 T DACC_Initialize
+00000000 T DACC_SetConversionData
+00000000 T DACC_WriteBuffer
+ U PMC_EnablePeripheral
+00000000 r __FUNCTION__.4818
+ U __assert_func
+
+dmac.o:
+00000000 T DMAC_Disable
+00000000 T DMAC_DisableChannel
+00000000 T DMAC_DisableChannels
+00000000 T DMAC_DisableIt
+00000000 T DMAC_Enable
+00000000 T DMAC_EnableChannel
+00000000 T DMAC_EnableChannels
+00000000 T DMAC_EnableIt
+00000000 T DMAC_GetChannelStatus
+00000000 T DMAC_GetDestinationAddr
+00000000 T DMAC_GetInterruptMask
+00000000 T DMAC_GetMaskedStatus
+00000000 T DMAC_GetSourceAddr
+00000000 T DMAC_GetStatus
+00000000 T DMAC_KeepChannel
+00000000 T DMAC_Modified_Arbiter
+00000000 T DMAC_RestoreChannel
+00000000 T DMAC_SetBufferSize
+00000000 T DMAC_SetCFG
+00000000 T DMAC_SetChunkTransferSize
+00000000 T DMAC_SetControlA
+00000000 T DMAC_SetControlB
+00000000 T DMAC_SetDescFetchMode
+00000000 T DMAC_SetDescriptorAddr
+00000000 T DMAC_SetDestinationAddr
+00000000 T DMAC_SetFlowControl
+00000000 T DMAC_SetSingleTransferSize
+00000000 T DMAC_SetSourceAddr
+00000000 T DMAC_SethandshakeInterface
+00000000 T DMAC_SuspendChannel
+0000025c r __FUNCTION__.4808
+00000250 r __FUNCTION__.4814
+00000240 r __FUNCTION__.4820
+00000230 r __FUNCTION__.4827
+00000220 r __FUNCTION__.4834
+00000208 r __FUNCTION__.4840
+000001f8 r __FUNCTION__.4847
+000001e0 r __FUNCTION__.4855
+000001cc r __FUNCTION__.4864
+000001b8 r __FUNCTION__.4877
+000001a4 r __FUNCTION__.4885
+0000018c r __FUNCTION__.4898
+00000178 r __FUNCTION__.4906
+00000164 r __FUNCTION__.4919
+00000150 r __FUNCTION__.4932
+00000138 r __FUNCTION__.4944
+00000124 r __FUNCTION__.4953
+00000110 r __FUNCTION__.4963
+000000f8 r __FUNCTION__.4975
+000000e0 r __FUNCTION__.4985
+000000c8 r __FUNCTION__.4998
+000000b4 r __FUNCTION__.5014
+000000a0 r __FUNCTION__.5025
+00000084 r __FUNCTION__.5042
+00000068 r __FUNCTION__.5062
+00000054 r __FUNCTION__.5081
+0000003c r __FUNCTION__.5093
+00000028 r __FUNCTION__.5112
+0000001c r __FUNCTION__.5128
+00000000 r __FUNCTION__.5140
+ U __assert_func
+
+eefc.o:
+00000000 T EFC_ComputeAddress
+00000000 T EFC_DisableFrdyIt
+00000000 T EFC_EnableFrdyIt
+00000000 T EFC_GetResult
+00000000 T EFC_GetStatus
+00000000 T EFC_PerformCommand
+00000000 T EFC_SetFlashAccessMode
+00000000 T EFC_SetWaitState
+00000000 T EFC_StartCommand
+00000000 T EFC_TranslateAddress
+00000000 b IAP_PerformCommand.4932
+00000028 r __FUNCTION__.4838
+00000014 r __FUNCTION__.4870
+00000000 r __FUNCTION__.4896
+ U __assert_func
+
+emac.o:
+00000000 T EMAC_BackPressureEnable
+00000000 T EMAC_BigFrameEnable
+00000000 T EMAC_BroadcastDisable
+00000000 T EMAC_ClearRxStatus
+00000000 T EMAC_ClearStatistics
+00000000 T EMAC_ClearTxStatus
+00000000 T EMAC_Configure
+00000000 T EMAC_CpyAllEnable
+00000000 T EMAC_DisableIt
+00000000 T EMAC_DiscardFCSEnable
+00000000 T EMAC_EFRHD
+00000000 T EMAC_EnableIt
+00000000 T EMAC_FullDuplexEnable
+00000000 T EMAC_GetConfigure
+00000000 T EMAC_GetItMask
+00000000 T EMAC_GetItStatus
+00000000 T EMAC_GetMDIO
+00000000 T EMAC_GetNetworkControl
+00000000 T EMAC_GetRxQueue
+00000000 T EMAC_GetRxStatus
+00000000 T EMAC_GetStatus
+00000000 T EMAC_GetTxQueue
+00000000 T EMAC_GetTxStatus
+00000000 T EMAC_GetTypeID
+00000000 T EMAC_IRXFCS
+00000000 T EMAC_IncreaseStatistics
+00000000 T EMAC_IsIdle
+00000000 T EMAC_JumboFrameEnable
+00000000 T EMAC_ManagementEnable
+00000000 T EMAC_MulticastHashEnable
+00000000 T EMAC_NetworkControl
+00000000 T EMAC_PHYData
+00000000 T EMAC_PHYMaintain
+00000000 T EMAC_PauseFrameEnable
+00000000 T EMAC_RMIIEnable
+00000000 T EMAC_ReceiveEnable
+00000000 T EMAC_RetryTestEnable
+00000000 T EMAC_RxLenthCheckEnable
+00000000 T EMAC_SetAddress
+00000000 T EMAC_SetAddress32
+00000000 T EMAC_SetAddress64
+00000000 T EMAC_SetClock
+00000000 T EMAC_SetHash
+00000000 T EMAC_SetHash64
+00000000 T EMAC_SetPauseTime
+00000000 T EMAC_SetRxBufferOffset
+00000000 T EMAC_SetRxQueue
+00000000 T EMAC_SetSpeed
+00000000 T EMAC_SetTxQueue
+00000000 T EMAC_SetTypeID
+00000000 T EMAC_StatisticsWriteEnable
+00000000 T EMAC_TransceiverClockEnable
+00000000 T EMAC_TransmissionHalt
+00000000 T EMAC_TransmissionStart
+00000000 T EMAC_TransmitEnable
+
+exceptions.o:
+00000000 W ADC_IrqHandler
+00000000 W BusFault_Handler
+00000000 W CAN0_IrqHandler
+00000000 W CAN1_IrqHandler
+00000000 W DACC_IrqHandler
+00000000 W DMAC_IrqHandler
+00000000 W DebugMon_Handler
+00000000 W EFC0_IrqHandler
+00000000 W EFC1_IrqHandler
+00000000 W EMAC_IrqHandler
+00000000 W HSMCI_IrqHandler
+00000000 W HardFault_Handler
+00000000 T IrqHandlerNotUsed
+00000000 W MemManage_Handler
+00000000 W NMI_Handler
+00000000 W PIOA_IrqHandler
+00000000 W PIOB_IrqHandler
+00000000 W PIOC_IrqHandler
+00000000 W PIOD_IrqHandler
+00000000 W PIOE_IrqHandler
+00000000 W PIOF_IrqHandler
+00000000 W PMC_IrqHandler
+00000000 W PWM_IrqHandler
+00000000 W PendSV_Handler
+00000000 W RSTC_IrqHandler
+00000000 W RTC_IrqHandler
+00000000 W RTT_IrqHandler
+00000000 W SDRAMC_IrqHandler
+00000000 W SMC_IrqHandler
+00000000 W SPI0_IrqHandler
+00000000 W SPI1_IrqHandler
+00000000 W SSC_IrqHandler
+00000000 W SUPC_IrqHandler
+00000000 W SVC_Handler
+00000000 W SysTick_Handler
+00000000 W TC0_IrqHandler
+00000000 W TC1_IrqHandler
+00000000 W TC2_IrqHandler
+00000000 W TC3_IrqHandler
+00000000 W TC4_IrqHandler
+00000000 W TC5_IrqHandler
+00000000 W TC6_IrqHandler
+00000000 W TC7_IrqHandler
+00000000 W TC8_IrqHandler
+00000000 W TRNG_IrqHandler
+00000000 W TWI0_IrqHandler
+00000000 W TWI1_IrqHandler
+00000000 W UART_IrqHandler
+00000000 W UOTGHS_IrqHandler
+00000000 W USART0_IrqHandler
+00000000 W USART1_IrqHandler
+00000000 W USART2_IrqHandler
+00000000 W USART3_IrqHandler
+00000000 W UsageFault_Handler
+00000000 W WDT_IrqHandler
+
+flashd.o:
+00000000 t ComputeLockRange
+ U EFC_ComputeAddress
+ U EFC_DisableFrdyIt
+ U EFC_GetResult
+ U EFC_PerformCommand
+ U EFC_SetWaitState
+ U EFC_TranslateAddress
+00000000 T FLASHD_ClearGPNVM
+00000000 T FLASHD_Erase
+00000000 T FLASHD_Initialize
+00000000 T FLASHD_IsGPNVMSet
+00000000 T FLASHD_IsLocked
+00000000 T FLASHD_Lock
+00000000 T FLASHD_ReadUniqueID
+00000000 T FLASHD_SetGPNVM
+00000000 T FLASHD_Unlock
+00000000 T FLASHD_Write
+00000048 r __FUNCTION__.5036
+00000038 r __FUNCTION__.5194
+00000000 r __FUNCTION__.5240
+00000028 r __FUNCTION__.5259
+00000014 r __FUNCTION__.5272
+ U __assert_func
+00000000 b _adwPageBuffer
+00000058 r _aucPageBuffer
+00000000 d _dwUseIAP
+ U memcpy
+
+hsmci.o:
+00000000 T HSMCI_Configure
+00000000 T HSMCI_ConfigureCompletionTO
+00000000 T HSMCI_ConfigureDataTO
+00000000 T HSMCI_ConfigureDma
+00000000 T HSMCI_ConfigureMode
+00000000 T HSMCI_ConfigureTransfer
+00000000 T HSMCI_ConfigureWP
+00000000 T HSMCI_Disable
+00000000 T HSMCI_DisableIt
+00000000 T HSMCI_DivCtrl
+00000000 T HSMCI_Enable
+00000000 T HSMCI_EnableDma
+00000000 T HSMCI_EnableIt
+00000000 T HSMCI_FByteEnable
+00000000 T HSMCI_GetBusWidth
+00000000 T HSMCI_GetItMask
+00000000 T HSMCI_GetMode
+00000000 T HSMCI_GetResponse
+00000000 T HSMCI_GetStatus
+00000000 T HSMCI_GetWPStatus
+00000000 T HSMCI_HsEnable
+00000000 T HSMCI_IsFByteEnabled
+00000000 T HSMCI_IsHsEnabled
+00000000 T HSMCI_PadvCtl
+00000000 T HSMCI_ProofEnable
+00000000 T HSMCI_Read
+00000000 T HSMCI_ReadFifo
+00000000 T HSMCI_Reset
+00000000 T HSMCI_Select
+00000000 T HSMCI_SendCmd
+00000000 T HSMCI_SetBlockCount
+00000000 T HSMCI_SetBlockLen
+00000000 T HSMCI_SetBusWidth
+00000000 T HSMCI_SetDmaOffset
+00000000 T HSMCI_SetSlot
+00000000 T HSMCI_Write
+00000000 T HSMCI_WriteFifo
+
+matrix.o:
+
+pio.o:
+00000000 T PIO_SetInput
+00000000 T PIO_SetOutput
+00000000 T PIO_SetPeripheralA
+00000000 T PIO_SetPeripheralB
+
+pio_it.o:
+00000000 T PIOA_IrqHandler
+00000000 T PIOB_IrqHandler
+00000000 T PIOC_IrqHandler
+00000000 T PIOD_IrqHandler
+00000000 T PIOE_IrqHandler
+00000000 T PIOF_IrqHandler
+00000000 T PIO_InitializeInterrupts
+ U PMC_EnablePeripheral
+ U PioInterruptHandler
+
+pio_pin.o:
+00000000 T PIO_PinClear
+00000000 T PIO_PinConfigure
+00000000 T PIO_PinDisableWriteProtect
+00000000 T PIO_PinEnableWriteProtect
+00000000 T PIO_PinGet
+00000000 T PIO_PinGetOutputDataStatus
+00000000 T PIO_PinGetWriteProtectViolationInfo
+00000000 T PIO_PinSet
+00000000 T PIO_PinSetDebounceFilter
+00000000 T PIO_PinSetPinType
+ U PIO_SetInput
+ U PIO_SetOutput
+ U PIO_SetPeripheralA
+ U PIO_SetPeripheralB
+ U PMC_EnablePeripheral
+
+pio_pin_it.o:
+00000000 T PIO_PinConfigureIt
+00000000 T PIO_PinDisableIt
+00000000 T PIO_PinEnableIt
+00000000 T PioInterruptHandler
+00000038 r __FUNCTION__.4809
+00000024 r __FUNCTION__.4838
+00000014 r __FUNCTION__.4864
+00000000 r __FUNCTION__.4886
+ U __assert_func
+00000004 b _aIntSources
+00000000 b _dwNumSources
+
+pmc.o:
+00000000 T PMC_ConfigureMckWithPlla
+00000000 T PMC_ConfigurePck
+00000000 T PMC_DisableAllClocks
+00000000 T PMC_DisableAllPeripherals
+00000000 T PMC_DisableExtOsc12MHz
+00000000 T PMC_DisableIntRC4_8_12MHz
+00000000 T PMC_DisablePck
+00000000 T PMC_DisablePeripheral
+00000000 T PMC_DisableUpllClock
+00000000 T PMC_EnableAllPeripherals
+00000000 T PMC_EnableExtOsc12MHz
+00000000 T PMC_EnableIntRC4_8_12MHz
+00000000 T PMC_EnablePck
+00000000 T PMC_EnablePeripheral
+00000000 T PMC_EnableUpllClock
+00000000 T PMC_GetStartupTime
+00000000 T PMC_IsPeriphEnabled
+00000000 T PMC_SetMckSelection
+00000000 T PMC_SetPllaClock
+00000000 T PMC_SetStartupTime
+00000000 D PmcFastRcCnt
+00000004 D PmcMainOscCnt
+00000008 D PmcPllaCnt
+0000000c D PmcUpllCnt
+00000000 T SUPC_SelectExtCrystal32K
+00000000 t _PMC_SetMckPrescaler
+00000000 t _PMC_SwitchMck2MainClock
+00000000 t _PMC_SwitchMck2SlowClock
+0000002c r __FUNCTION__.4870
+00000014 r __FUNCTION__.4894
+00000000 r __FUNCTION__.4944
+ U __assert_func
+
+pwm.o:
+00000080 r C.16.4816
+00000000 t FindClockConfiguration
+00000000 T PWMC_ConfigureChannel
+00000000 T PWMC_ConfigureChannelExt
+00000000 T PWMC_ConfigureClocks
+00000000 T PWMC_ConfigureComparisonUnit
+00000000 T PWMC_ConfigureEventLineMode
+00000000 T PWMC_ConfigureSyncChannel
+00000000 T PWMC_DisableChannel
+00000000 T PWMC_DisableChannelIt
+00000000 T PWMC_DisableIt
+00000000 T PWMC_DisableOverrideOutput
+00000000 T PWMC_EnableChannel
+00000000 T PWMC_EnableChannelIt
+00000000 T PWMC_EnableFaultProtection
+00000000 T PWMC_EnableIt
+00000000 T PWMC_EnableOverrideOutput
+00000000 T PWMC_FaultClear
+00000000 T PWMC_SetDeadTime
+00000000 T PWMC_SetDutyCycle
+00000000 T PWMC_SetFaultMode
+00000000 T PWMC_SetFaultProtectionValue
+00000000 T PWMC_SetOverrideValue
+00000000 T PWMC_SetPeriod
+00000000 T PWMC_SetSyncChannelUpdatePeriod
+00000000 T PWMC_SetSyncChannelUpdateUnlock
+00000000 T PWMC_WriteBuffer
+000000ac r __FUNCTION__.4812
+000000f8 r __FUNCTION__.4836
+000000dc r __FUNCTION__.4869
+000000c4 r __FUNCTION__.4914
+0000006c r __FUNCTION__.4946
+00000058 r __FUNCTION__.4966
+0000003c r __FUNCTION__.5099
+0000001c r __FUNCTION__.5122
+00000000 r __FUNCTION__.5136
+ U __assert_func
+
+rstc.o:
+00000000 T RSTC_ConfigureMode
+00000000 T RSTC_ExtReset
+00000000 T RSTC_GetNrstLevel
+00000000 T RSTC_GetStatus
+00000000 T RSTC_IsBusy
+00000000 T RSTC_IsUserResetDetected
+00000000 T RSTC_PeripheralReset
+00000000 T RSTC_ProcessorReset
+00000000 T RSTC_SetExtResetLength
+00000000 T RSTC_SetUserResetEnable
+00000000 T RSTC_SetUserResetInterruptEnable
+
+rtc.o:
+00000000 T RTC_ClearSCCR
+00000000 T RTC_DisableIt
+00000000 T RTC_EnableIt
+00000000 T RTC_GetDate
+00000000 T RTC_GetHourMode
+00000000 T RTC_GetSR
+00000000 T RTC_GetTime
+00000000 T RTC_SetDate
+00000000 T RTC_SetDateAlarm
+00000000 T RTC_SetHourMode
+00000000 T RTC_SetTime
+00000000 T RTC_SetTimeAlarm
+00000020 r __FUNCTION__.4809
+00000010 r __FUNCTION__.4822
+00000000 r __FUNCTION__.4830
+ U __assert_func
+
+rtt.o:
+00000000 T RTT_EnableIT
+00000000 T RTT_GetStatus
+00000000 T RTT_GetTime
+00000000 T RTT_SetAlarm
+00000000 T RTT_SetPrescaler
+00000010 r __FUNCTION__.4819
+00000000 r __FUNCTION__.4833
+ U __assert_func
+
+sdramc.o:
+ U PMC_EnablePeripheral
+00000000 T SDRAMC_Configure
+
+smc.o:
+00000000 t ECC_CountBitsInByte
+00000000 t ECC_CountBitsInCode
+00000000 T SMC_ECC_Configure
+00000000 T SMC_ECC_GetCorrectoinType
+00000000 T SMC_ECC_GetEccParity
+00000000 T SMC_ECC_GetStatus
+00000000 T SMC_ECC_GetValue
+00000000 T SMC_ECC_VerifyHsiao
+00000000 T SMC_NFC_Configure
+00000000 T SMC_NFC_DisableSpareRead
+00000000 T SMC_NFC_DisableSpareWrite
+00000000 T SMC_NFC_EnableNfc
+00000000 T SMC_NFC_EnableSpareRead
+00000000 T SMC_NFC_EnableSpareWrite
+00000000 T SMC_NFC_GetStatus
+00000000 T SMC_NFC_Reset
+00000000 T SMC_NFC_SendCommand
+00000000 T SMC_NFC_isNfcBusy
+00000000 T SMC_NFC_isReadyBusy
+00000000 T SMC_NFC_isSpareRead
+00000000 T SMC_NFC_isSpareWrite
+00000000 T SMC_NFC_isTransferComplete
+00000000 t T.35
+
+spi.o:
+ U PMC_EnablePeripheral
+00000000 T SPI_ChipSelect
+00000000 T SPI_Configure
+00000000 T SPI_ConfigureCSMode
+00000000 T SPI_ConfigureNPCS
+00000000 T SPI_Disable
+00000000 T SPI_DisableIt
+00000000 T SPI_Enable
+00000000 T SPI_EnableIt
+00000000 T SPI_GetStatus
+00000000 T SPI_IsFinished
+00000000 T SPI_Read
+00000000 T SPI_ReleaseCS
+00000000 T SPI_SetMode
+00000000 T SPI_Write
+00000000 T SPI_WriteLast
+
+ssc.o:
+ U PMC_EnablePeripheral
+00000000 T SSC_Configure
+00000000 T SSC_ConfigureReceiver
+00000000 T SSC_ConfigureTransmitter
+00000000 T SSC_DisableInterrupts
+00000000 T SSC_DisableReceiver
+00000000 T SSC_DisableTransmitter
+00000000 T SSC_EnableInterrupts
+00000000 T SSC_EnableReceiver
+00000000 T SSC_EnableTransmitter
+00000000 T SSC_Read
+00000000 T SSC_Write
+
+tc.o:
+00000000 T TC_Configure
+00000000 T TC_FindMckDivisor
+00000000 T TC_Start
+00000000 T TC_Stop
+00000014 r __FUNCTION__.4811
+00000008 r __FUNCTION__.4822
+00000000 r __FUNCTION__.4832
+ U __assert_func
+
+trng.o:
+
+twi.o:
+00000000 T TWI_ByteReceived
+00000000 T TWI_ByteSent
+00000000 T TWI_ConfigureMaster
+00000000 T TWI_ConfigureSlave
+00000000 T TWI_DisableIt
+00000000 T TWI_EnableIt
+00000000 T TWI_GetMaskedStatus
+00000000 T TWI_GetStatus
+00000000 T TWI_PDCReceiveComplete
+00000000 T TWI_PDCTransferComplete
+00000000 T TWI_PDC_Disable
+00000000 T TWI_PDC_read
+00000000 T TWI_PDC_write
+00000000 T TWI_ReadByte
+00000000 T TWI_SendSTOPCondition
+00000000 T TWI_StartRead
+00000000 T TWI_StartWrite
+00000000 T TWI_Stop
+00000000 T TWI_TransferComplete
+00000000 T TWI_WriteByte
+000000cc r __FUNCTION__.4813
+000000b8 r __FUNCTION__.4844
+000000ac r __FUNCTION__.4857
+0000009c r __FUNCTION__.4866
+0000008c r __FUNCTION__.4888
+0000007c r __FUNCTION__.4897
+0000006c r __FUNCTION__.4907
+0000005c r __FUNCTION__.4958
+0000004c r __FUNCTION__.4968
+0000003c r __FUNCTION__.4977
+00000028 r __FUNCTION__.4985
+00000010 r __FUNCTION__.4993
+00000000 r __FUNCTION__.5031
+ U __assert_func
+
+usart.o:
+00000000 T USART_Configure
+00000000 T USART_DisableIt
+00000000 T USART_EnableIt
+00000000 T USART_GetChar
+00000000 T USART_GetStatus
+00000000 T USART_IsDataAvailable
+00000000 T USART_IsRxReady
+00000000 T USART_PutChar
+00000000 T USART_Read
+00000000 T USART_ReadBuffer
+00000000 T USART_SetIrdaFilter
+00000000 T USART_SetReceiverEnabled
+00000000 T USART_SetTransmitterEnabled
+00000000 T USART_Write
+00000000 T USART_WriteBuffer
+00000000 r __FUNCTION__.5098
+ U __assert_func
+
+wdt.o:
+00000000 T WDT_Disable
+00000000 T WDT_Enable
+00000000 T WDT_GetPeriod
+00000000 T WDT_GetStatus
+00000000 T WDT_Restart
+
+core_cm3.o:
+00000000 T __LDREXB
+00000000 T __LDREXH
+00000000 T __LDREXW
+00000000 T __RBIT
+00000000 T __REV
+00000000 T __REV16
+00000000 T __REVSH
+00000000 T __STREXB
+00000000 T __STREXH
+00000000 T __STREXW
+00000000 T __get_BASEPRI
+00000000 T __get_CONTROL
+00000000 T __get_FAULTMASK
+00000000 T __get_MSP
+00000000 T __get_PRIMASK
+00000000 T __get_PSP
+00000000 T __set_BASEPRI
+00000000 T __set_CONTROL
+00000000 T __set_FAULTMASK
+00000000 T __set_MSP
+00000000 T __set_PRIMASK
+00000000 T __set_PSP
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/lib/libchip_sam3x8_gcc_dbg.a.txt b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/lib/libchip_sam3x8_gcc_dbg.a.txt
new file mode 100644
index 0000000..a8d5783
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/lib/libchip_sam3x8_gcc_dbg.a.txt
@@ -0,0 +1,722 @@
+
+adc.o:
+00000000 r .LC0
+00000014 r .LC1
+00000024 r .LC2
+0000005c r .LC3
+00000088 r .LC4
+000000b8 r .LC5
+00000000 T ADC_CheckConfiguration
+00000000 T ADC_GetConvertedData
+00000000 T ADC_Initialize
+00000000 T ADC_ReadBuffer
+00000000 T ADC_SetAnalogChange
+00000000 T ADC_SetClock
+00000000 T ADC_SetCompareChannel
+00000000 T ADC_SetCompareMode
+00000000 T ADC_SetComparisonWindow
+00000000 T ADC_SetFastWakeup
+00000000 T ADC_SetFreeRunMode
+00000000 T ADC_SetLowResolution
+00000000 T ADC_SetSequence
+00000000 T ADC_SetSequenceByList
+00000000 T ADC_SetSequenceMode
+00000000 T ADC_SetSleepMode
+00000000 T ADC_SetTagEnable
+00000000 T ADC_SetTiming
+00000000 T ADC_SetTrigger
+00000000 t GetStartupValue
+ U PMC_EnablePeripheral
+000000e0 r __FUNCTION__.4980
+000000c8 r __FUNCTION__.5110
+ U __assert_func
+ U iprintf
+
+async.o:
+00000000 T ASYNC_IsFinished
+
+chipid.o:
+
+dacc.o:
+00000000 r .LC0
+00000014 r .LC1
+00000000 T DACC_Initialize
+00000000 T DACC_SetConversionData
+00000000 T DACC_WriteBuffer
+ U PMC_EnablePeripheral
+00000034 r __FUNCTION__.4838
+ U __assert_func
+
+dmac.o:
+00000000 r .LC0
+00000014 r .LC1
+0000001c r .LC2
+0000003c r .LC3
+00000000 T DMAC_Disable
+00000000 T DMAC_DisableChannel
+00000000 T DMAC_DisableChannels
+00000000 T DMAC_DisableIt
+00000000 T DMAC_Enable
+00000000 T DMAC_EnableChannel
+00000000 T DMAC_EnableChannels
+00000000 T DMAC_EnableIt
+00000000 T DMAC_GetChannelStatus
+00000000 T DMAC_GetDestinationAddr
+00000000 T DMAC_GetInterruptMask
+00000000 T DMAC_GetMaskedStatus
+00000000 T DMAC_GetSourceAddr
+00000000 T DMAC_GetStatus
+00000000 T DMAC_KeepChannel
+00000000 T DMAC_Modified_Arbiter
+00000000 T DMAC_RestoreChannel
+00000000 T DMAC_SetBufferSize
+00000000 T DMAC_SetCFG
+00000000 T DMAC_SetChunkTransferSize
+00000000 T DMAC_SetControlA
+00000000 T DMAC_SetControlB
+00000000 T DMAC_SetDescFetchMode
+00000000 T DMAC_SetDescriptorAddr
+00000000 T DMAC_SetDestinationAddr
+00000000 T DMAC_SetFlowControl
+00000000 T DMAC_SetSingleTransferSize
+00000000 T DMAC_SetSourceAddr
+00000000 T DMAC_SethandshakeInterface
+00000000 T DMAC_SuspendChannel
+000002a8 r __FUNCTION__.4828
+0000029c r __FUNCTION__.4834
+0000028c r __FUNCTION__.4840
+0000027c r __FUNCTION__.4847
+0000026c r __FUNCTION__.4854
+00000254 r __FUNCTION__.4860
+00000244 r __FUNCTION__.4867
+0000022c r __FUNCTION__.4875
+00000218 r __FUNCTION__.4884
+00000204 r __FUNCTION__.4897
+000001f0 r __FUNCTION__.4905
+000001d8 r __FUNCTION__.4918
+000001c4 r __FUNCTION__.4926
+000001b0 r __FUNCTION__.4939
+0000019c r __FUNCTION__.4952
+00000184 r __FUNCTION__.4964
+00000170 r __FUNCTION__.4973
+0000015c r __FUNCTION__.4983
+00000144 r __FUNCTION__.4995
+0000012c r __FUNCTION__.5005
+00000114 r __FUNCTION__.5018
+00000100 r __FUNCTION__.5034
+000000ec r __FUNCTION__.5045
+000000d0 r __FUNCTION__.5065
+000000b4 r __FUNCTION__.5090
+000000a0 r __FUNCTION__.5114
+00000088 r __FUNCTION__.5126
+00000074 r __FUNCTION__.5150
+00000068 r __FUNCTION__.5169
+0000004c r __FUNCTION__.5181
+ U __assert_func
+
+eefc.o:
+00000000 r .LC0
+00000014 r .LC1
+00000030 r .LC2
+0000005c r .LC3
+00000060 r .LC4
+00000080 r .LC5
+00000090 r .LC6
+000000a0 r .LC7
+000000a4 r .LC8
+00000000 T EFC_ComputeAddress
+00000000 T EFC_DisableFrdyIt
+00000000 T EFC_EnableFrdyIt
+00000000 T EFC_GetResult
+00000000 T EFC_GetStatus
+00000000 T EFC_PerformCommand
+00000000 T EFC_SetFlashAccessMode
+00000000 T EFC_SetWaitState
+00000000 T EFC_StartCommand
+00000000 T EFC_TranslateAddress
+00000000 b IAP_PerformCommand.4954
+00000100 r __FUNCTION__.4858
+000000ec r __FUNCTION__.4890
+000000d8 r __FUNCTION__.4918
+ U __assert_func
+
+emac.o:
+00000000 T EMAC_BackPressureEnable
+00000000 T EMAC_BigFrameEnable
+00000000 T EMAC_BroadcastDisable
+00000000 T EMAC_ClearRxStatus
+00000000 T EMAC_ClearStatistics
+00000000 T EMAC_ClearTxStatus
+00000000 T EMAC_Configure
+00000000 T EMAC_CpyAllEnable
+00000000 T EMAC_DisableIt
+00000000 T EMAC_DiscardFCSEnable
+00000000 T EMAC_EFRHD
+00000000 T EMAC_EnableIt
+00000000 T EMAC_FullDuplexEnable
+00000000 T EMAC_GetConfigure
+00000000 T EMAC_GetItMask
+00000000 T EMAC_GetItStatus
+00000000 T EMAC_GetMDIO
+00000000 T EMAC_GetNetworkControl
+00000000 T EMAC_GetRxQueue
+00000000 T EMAC_GetRxStatus
+00000000 T EMAC_GetStatus
+00000000 T EMAC_GetTxQueue
+00000000 T EMAC_GetTxStatus
+00000000 T EMAC_GetTypeID
+00000000 T EMAC_IRXFCS
+00000000 T EMAC_IncreaseStatistics
+00000000 T EMAC_IsIdle
+00000000 T EMAC_JumboFrameEnable
+00000000 T EMAC_ManagementEnable
+00000000 T EMAC_MulticastHashEnable
+00000000 T EMAC_NetworkControl
+00000000 T EMAC_PHYData
+00000000 T EMAC_PHYMaintain
+00000000 T EMAC_PauseFrameEnable
+00000000 T EMAC_RMIIEnable
+00000000 T EMAC_ReceiveEnable
+00000000 T EMAC_RetryTestEnable
+00000000 T EMAC_RxLenthCheckEnable
+00000000 T EMAC_SetAddress
+00000000 T EMAC_SetAddress32
+00000000 T EMAC_SetAddress64
+00000000 T EMAC_SetClock
+00000000 T EMAC_SetHash
+00000000 T EMAC_SetHash64
+00000000 T EMAC_SetPauseTime
+00000000 T EMAC_SetRxBufferOffset
+00000000 T EMAC_SetRxQueue
+00000000 T EMAC_SetSpeed
+00000000 T EMAC_SetTxQueue
+00000000 T EMAC_SetTypeID
+00000000 T EMAC_StatisticsWriteEnable
+00000000 T EMAC_TransceiverClockEnable
+00000000 T EMAC_TransmissionHalt
+00000000 T EMAC_TransmissionStart
+00000000 T EMAC_TransmitEnable
+
+exceptions.o:
+00000000 W ADC_IrqHandler
+00000000 W BusFault_Handler
+00000000 W CAN0_IrqHandler
+00000000 W CAN1_IrqHandler
+00000000 W DACC_IrqHandler
+00000000 W DMAC_IrqHandler
+00000000 W DebugMon_Handler
+00000000 W EFC0_IrqHandler
+00000000 W EFC1_IrqHandler
+00000000 W EMAC_IrqHandler
+00000000 W HSMCI_IrqHandler
+00000000 W HardFault_Handler
+00000000 T IrqHandlerNotUsed
+00000000 W MemManage_Handler
+00000000 W NMI_Handler
+00000000 W PIOA_IrqHandler
+00000000 W PIOB_IrqHandler
+00000000 W PIOC_IrqHandler
+00000000 W PIOD_IrqHandler
+00000000 W PIOE_IrqHandler
+00000000 W PIOF_IrqHandler
+00000000 W PMC_IrqHandler
+00000000 W PWM_IrqHandler
+00000000 W PendSV_Handler
+00000000 W RSTC_IrqHandler
+00000000 W RTC_IrqHandler
+00000000 W RTT_IrqHandler
+00000000 W SDRAMC_IrqHandler
+00000000 W SMC_IrqHandler
+00000000 W SPI0_IrqHandler
+00000000 W SPI1_IrqHandler
+00000000 W SSC_IrqHandler
+00000000 W SUPC_IrqHandler
+00000000 W SVC_Handler
+00000000 W SysTick_Handler
+00000000 W TC0_IrqHandler
+00000000 W TC1_IrqHandler
+00000000 W TC2_IrqHandler
+00000000 W TC3_IrqHandler
+00000000 W TC4_IrqHandler
+00000000 W TC5_IrqHandler
+00000000 W TC6_IrqHandler
+00000000 W TC7_IrqHandler
+00000000 W TC8_IrqHandler
+00000000 W TRNG_IrqHandler
+00000000 W TWI0_IrqHandler
+00000000 W TWI1_IrqHandler
+00000000 W UART_IrqHandler
+00000000 W UOTGHS_IrqHandler
+00000000 W USART0_IrqHandler
+00000000 W USART1_IrqHandler
+00000000 W USART2_IrqHandler
+00000000 W USART3_IrqHandler
+00000000 W UsageFault_Handler
+00000000 W WDT_IrqHandler
+
+flashd.o:
+00000000 r .LC0
+00000018 r .LC1
+00000064 r .LC2
+00000070 r .LC3
+0000008c r .LC4
+000000c4 r .LC5
+000000d4 r .LC6
+00000114 r .LC7
+00000138 r .LC8
+00000000 t ComputeLockRange
+ U EFC_ComputeAddress
+ U EFC_DisableFrdyIt
+ U EFC_GetResult
+ U EFC_PerformCommand
+ U EFC_SetWaitState
+ U EFC_TranslateAddress
+00000000 T FLASHD_ClearGPNVM
+00000000 T FLASHD_Erase
+00000000 T FLASHD_Initialize
+00000000 T FLASHD_IsGPNVMSet
+00000000 T FLASHD_IsLocked
+00000000 T FLASHD_Lock
+00000000 T FLASHD_ReadUniqueID
+00000000 T FLASHD_SetGPNVM
+00000000 T FLASHD_Unlock
+00000000 T FLASHD_Write
+0000019c r __FUNCTION__.5034
+0000018c r __FUNCTION__.5063
+0000017c r __FUNCTION__.5246
+00000168 r __FUNCTION__.5295
+00000158 r __FUNCTION__.5314
+00000144 r __FUNCTION__.5327
+ U __assert_func
+00000000 b _adwPageBuffer
+00000000 d _aucPageBuffer
+00000004 d _dwUseIAP
+ U iprintf
+ U memcpy
+
+hsmci.o:
+00000000 T HSMCI_Configure
+00000000 T HSMCI_ConfigureCompletionTO
+00000000 T HSMCI_ConfigureDataTO
+00000000 T HSMCI_ConfigureDma
+00000000 T HSMCI_ConfigureMode
+00000000 T HSMCI_ConfigureTransfer
+00000000 T HSMCI_ConfigureWP
+00000000 T HSMCI_Disable
+00000000 T HSMCI_DisableIt
+00000000 T HSMCI_DivCtrl
+00000000 T HSMCI_Enable
+00000000 T HSMCI_EnableDma
+00000000 T HSMCI_EnableIt
+00000000 T HSMCI_FByteEnable
+00000000 T HSMCI_GetBusWidth
+00000000 T HSMCI_GetItMask
+00000000 T HSMCI_GetMode
+00000000 T HSMCI_GetResponse
+00000000 T HSMCI_GetStatus
+00000000 T HSMCI_GetWPStatus
+00000000 T HSMCI_HsEnable
+00000000 T HSMCI_IsFByteEnabled
+00000000 T HSMCI_IsHsEnabled
+00000000 T HSMCI_PadvCtl
+00000000 T HSMCI_ProofEnable
+00000000 T HSMCI_Read
+00000000 T HSMCI_ReadFifo
+00000000 T HSMCI_Reset
+00000000 T HSMCI_Select
+00000000 T HSMCI_SendCmd
+00000000 T HSMCI_SetBlockCount
+00000000 T HSMCI_SetBlockLen
+00000000 T HSMCI_SetBusWidth
+00000000 T HSMCI_SetDmaOffset
+00000000 T HSMCI_SetSlot
+00000000 T HSMCI_Write
+00000000 T HSMCI_WriteFifo
+
+matrix.o:
+
+pio.o:
+00000000 T PIO_SetInput
+00000000 T PIO_SetOutput
+00000000 T PIO_SetPeripheralA
+00000000 T PIO_SetPeripheralB
+
+pio_it.o:
+00000000 t NVIC_ClearPendingIRQ
+00000000 t NVIC_DisableIRQ
+00000000 t NVIC_EnableIRQ
+00000000 t NVIC_SetPriority
+00000000 T PIOA_IrqHandler
+00000000 T PIOB_IrqHandler
+00000000 T PIOC_IrqHandler
+00000000 T PIOD_IrqHandler
+00000000 T PIOE_IrqHandler
+00000000 T PIOF_IrqHandler
+00000000 T PIO_InitializeInterrupts
+ U PMC_EnablePeripheral
+ U PioInterruptHandler
+
+pio_pin.o:
+00000000 T PIO_PinClear
+00000000 T PIO_PinConfigure
+00000000 T PIO_PinDisableWriteProtect
+00000000 T PIO_PinEnableWriteProtect
+00000000 T PIO_PinGet
+00000000 T PIO_PinGetOutputDataStatus
+00000000 T PIO_PinGetWriteProtectViolationInfo
+00000000 T PIO_PinSet
+00000000 T PIO_PinSetDebounceFilter
+00000000 T PIO_PinSetPinType
+ U PIO_SetInput
+ U PIO_SetOutput
+ U PIO_SetPeripheralA
+ U PIO_SetPeripheralB
+ U PMC_EnablePeripheral
+
+pio_pin_it.o:
+00000000 r .LC0
+0000001c r .LC1
+00000030 r .LC2
+00000038 r .LC3
+00000060 r .LC4
+00000070 r .LC5
+00000000 T PIO_PinConfigureIt
+00000000 T PIO_PinDisableIt
+00000000 T PIO_PinEnableIt
+00000000 T PioInterruptHandler
+000000b8 r __FUNCTION__.4829
+000000a4 r __FUNCTION__.4866
+00000094 r __FUNCTION__.4903
+00000080 r __FUNCTION__.4926
+ U __assert_func
+00000000 b _aIntSources
+00000038 b _dwNumSources
+
+pmc.o:
+00000000 r .LC0
+00000014 r .LC1
+00000000 T PMC_ConfigureMckWithPlla
+00000000 T PMC_ConfigurePck
+00000000 T PMC_DisableAllClocks
+00000000 T PMC_DisableAllPeripherals
+00000000 T PMC_DisableExtOsc12MHz
+00000000 T PMC_DisableIntRC4_8_12MHz
+00000000 T PMC_DisablePck
+00000000 T PMC_DisablePeripheral
+00000000 T PMC_DisableUpllClock
+00000000 T PMC_EnableAllPeripherals
+00000000 T PMC_EnableExtOsc12MHz
+00000000 T PMC_EnableIntRC4_8_12MHz
+00000000 T PMC_EnablePck
+00000000 T PMC_EnablePeripheral
+00000000 T PMC_EnableUpllClock
+00000000 T PMC_GetStartupTime
+00000000 T PMC_IsPeriphEnabled
+00000000 T PMC_SetMckSelection
+00000000 T PMC_SetPllaClock
+00000000 T PMC_SetStartupTime
+00000000 D PmcFastRcCnt
+00000004 D PmcMainOscCnt
+00000008 D PmcPllaCnt
+0000000c D PmcUpllCnt
+00000000 T SUPC_SelectExtCrystal32K
+00000000 t _PMC_SetMckPrescaler
+00000000 t _PMC_SwitchMck2MainClock
+00000000 t _PMC_SwitchMck2PllaClock
+00000000 t _PMC_SwitchMck2SlowClock
+00000000 t _PMC_SwitchMck2UpllClock
+0000004c r __FUNCTION__.4900
+00000034 r __FUNCTION__.4937
+00000020 r __FUNCTION__.5006
+ U __assert_func
+
+pwm.o:
+00000000 r .LC0
+00000014 r .LC1
+0000016c r .LC10
+00000198 r .LC11
+000001c4 r .LC12
+000001d4 r .LC13
+000001dc r .LC14
+00000024 r .LC2
+00000050 r .LC3
+0000007c r .LC4
+000000b0 r .LC5
+000000dc r .LC6
+00000108 r .LC7
+00000134 r .LC8
+00000140 r .LC9
+000002b0 r C.18.4836
+00000000 t FindClockConfiguration
+00000000 T PWMC_ConfigureChannel
+00000000 T PWMC_ConfigureChannelExt
+00000000 T PWMC_ConfigureClocks
+00000000 T PWMC_ConfigureComparisonUnit
+00000000 T PWMC_ConfigureEventLineMode
+00000000 T PWMC_ConfigureSyncChannel
+00000000 T PWMC_DisableChannel
+00000000 T PWMC_DisableChannelIt
+00000000 T PWMC_DisableIt
+00000000 T PWMC_DisableOverrideOutput
+00000000 T PWMC_EnableChannel
+00000000 T PWMC_EnableChannelIt
+00000000 T PWMC_EnableFaultProtection
+00000000 T PWMC_EnableIt
+00000000 T PWMC_EnableOverrideOutput
+00000000 T PWMC_FaultClear
+00000000 T PWMC_SetDeadTime
+00000000 T PWMC_SetDutyCycle
+00000000 T PWMC_SetFaultMode
+00000000 T PWMC_SetFaultProtectionValue
+00000000 T PWMC_SetOverrideValue
+00000000 T PWMC_SetPeriod
+00000000 T PWMC_SetSyncChannelUpdatePeriod
+00000000 T PWMC_SetSyncChannelUpdateUnlock
+00000000 T PWMC_WriteBuffer
+000002dc r __FUNCTION__.4832
+00000298 r __FUNCTION__.4859
+0000027c r __FUNCTION__.4898
+00000264 r __FUNCTION__.4949
+00000250 r __FUNCTION__.4984
+0000023c r __FUNCTION__.5008
+00000220 r __FUNCTION__.5152
+00000200 r __FUNCTION__.5180
+000001e4 r __FUNCTION__.5197
+ U __assert_func
+
+rstc.o:
+00000000 T RSTC_ConfigureMode
+00000000 T RSTC_ExtReset
+00000000 T RSTC_GetNrstLevel
+00000000 T RSTC_GetStatus
+00000000 T RSTC_IsBusy
+00000000 T RSTC_IsUserResetDetected
+00000000 T RSTC_PeripheralReset
+00000000 T RSTC_ProcessorReset
+00000000 T RSTC_SetExtResetLength
+00000000 T RSTC_SetUserResetEnable
+00000000 T RSTC_SetUserResetInterruptEnable
+
+rtc.o:
+00000000 r .LC0
+00000014 r .LC1
+00000030 r .LC2
+00000000 T RTC_ClearSCCR
+00000000 T RTC_DisableIt
+00000000 T RTC_EnableIt
+00000000 T RTC_GetDate
+00000000 T RTC_GetHourMode
+00000000 T RTC_GetSR
+00000000 T RTC_GetTime
+00000000 T RTC_SetDate
+00000000 T RTC_SetDateAlarm
+00000000 T RTC_SetHourMode
+00000000 T RTC_SetTime
+00000000 T RTC_SetTimeAlarm
+00000078 r __FUNCTION__.4829
+00000068 r __FUNCTION__.4842
+00000058 r __FUNCTION__.4850
+ U __assert_func
+
+rtt.o:
+00000000 r .LC0
+00000014 r .LC1
+00000034 r .LC2
+00000000 T RTT_EnableIT
+00000000 T RTT_GetStatus
+00000000 T RTT_GetTime
+00000000 T RTT_SetAlarm
+00000000 T RTT_SetPrescaler
+00000050 r __FUNCTION__.4839
+00000040 r __FUNCTION__.4853
+ U __assert_func
+
+sdramc.o:
+ U PMC_EnablePeripheral
+00000000 T SDRAMC_Configure
+00000000 t SDRAMC_compute_CR_value
+
+smc.o:
+00000000 r .LC0
+0000003c r .LC1
+00000000 t ECC_CountBitsInByte
+00000000 t ECC_CountBitsInCode
+00000000 T SMC_ECC_Configure
+00000000 t SMC_ECC_Get24bitPer256Ecc
+00000000 t SMC_ECC_Get24bitPer512Ecc
+00000000 t SMC_ECC_Get24bitPerPageEcc
+00000000 t SMC_ECC_Get32bitPer256Ecc
+00000000 t SMC_ECC_Get32bitPerPageEcc
+00000000 T SMC_ECC_GetCorrectoinType
+00000000 T SMC_ECC_GetEccParity
+00000000 T SMC_ECC_GetStatus
+00000000 T SMC_ECC_GetValue
+00000000 t SMC_ECC_Verify256x16bitHsiao
+00000000 t SMC_ECC_Verify256x8bitHsiao
+00000000 t SMC_ECC_Verify512x8bitHsiao
+00000000 T SMC_ECC_VerifyHsiao
+00000000 t SMC_ECC_VerifyPageOf16bitHsiao
+00000000 t SMC_ECC_VerifyPageOf8bitHsiao
+00000000 t SMC_NFC_CommandDone
+00000000 T SMC_NFC_Configure
+00000000 T SMC_NFC_DisableSpareRead
+00000000 T SMC_NFC_DisableSpareWrite
+00000000 T SMC_NFC_EnableNfc
+00000000 T SMC_NFC_EnableSpareRead
+00000000 T SMC_NFC_EnableSpareWrite
+00000000 T SMC_NFC_GetStatus
+00000000 T SMC_NFC_Reset
+00000000 T SMC_NFC_SendCommand
+00000000 t SMC_NFC_isHostBusy
+00000000 T SMC_NFC_isNfcBusy
+00000000 T SMC_NFC_isReadyBusy
+00000000 T SMC_NFC_isSpareRead
+00000000 T SMC_NFC_isSpareWrite
+00000000 T SMC_NFC_isTransferComplete
+ U iprintf
+
+spi.o:
+ U PMC_EnablePeripheral
+00000000 T SPI_ChipSelect
+00000000 T SPI_Configure
+00000000 T SPI_ConfigureCSMode
+00000000 T SPI_ConfigureNPCS
+00000000 T SPI_Disable
+00000000 T SPI_DisableIt
+00000000 T SPI_Enable
+00000000 T SPI_EnableIt
+00000000 T SPI_GetStatus
+00000000 T SPI_IsFinished
+00000000 T SPI_Read
+00000000 T SPI_ReleaseCS
+00000000 T SPI_SetMode
+00000000 T SPI_Write
+00000000 T SPI_WriteLast
+
+ssc.o:
+ U PMC_EnablePeripheral
+00000000 T SSC_Configure
+00000000 T SSC_ConfigureReceiver
+00000000 T SSC_ConfigureTransmitter
+00000000 T SSC_DisableInterrupts
+00000000 T SSC_DisableReceiver
+00000000 T SSC_DisableTransmitter
+00000000 T SSC_EnableInterrupts
+00000000 T SSC_EnableReceiver
+00000000 T SSC_EnableTransmitter
+00000000 T SSC_Read
+00000000 T SSC_Write
+
+tc.o:
+00000000 r .LC0
+00000014 r .LC1
+00000000 T TC_Configure
+00000000 T TC_FindMckDivisor
+00000000 T TC_Start
+00000000 T TC_Stop
+00000070 r __FUNCTION__.4831
+00000064 r __FUNCTION__.4842
+0000005c r __FUNCTION__.4852
+ U __assert_func
+
+trng.o:
+
+twi.o:
+00000000 r .LC0
+00000014 r .LC1
+0000001c r .LC2
+00000028 r .LC3
+00000058 r .LC4
+00000068 r .LC5
+00000080 r .LC6
+000000a0 r .LC7
+000000ac r .LC8
+00000000 T TWI_ByteReceived
+00000000 T TWI_ByteSent
+00000000 T TWI_ConfigureMaster
+00000000 T TWI_ConfigureSlave
+00000000 T TWI_DisableIt
+00000000 T TWI_EnableIt
+00000000 T TWI_GetMaskedStatus
+00000000 T TWI_GetStatus
+00000000 T TWI_PDCReceiveComplete
+00000000 T TWI_PDCTransferComplete
+00000000 T TWI_PDC_Disable
+00000000 T TWI_PDC_read
+00000000 T TWI_PDC_write
+00000000 T TWI_ReadByte
+00000000 T TWI_SendSTOPCondition
+00000000 T TWI_StartRead
+00000000 T TWI_StartWrite
+00000000 T TWI_Stop
+00000000 T TWI_TransferComplete
+00000000 T TWI_WriteByte
+00000194 r __FUNCTION__.4833
+00000180 r __FUNCTION__.4864
+00000174 r __FUNCTION__.4877
+00000164 r __FUNCTION__.4886
+00000154 r __FUNCTION__.4908
+00000144 r __FUNCTION__.4917
+00000134 r __FUNCTION__.4927
+00000124 r __FUNCTION__.4978
+00000114 r __FUNCTION__.4988
+00000104 r __FUNCTION__.4997
+000000f0 r __FUNCTION__.5005
+000000d8 r __FUNCTION__.5013
+000000c8 r __FUNCTION__.5053
+ U __assert_func
+
+usart.o:
+00000000 r .LC0
+00000020 r .LC1
+00000040 r .LC2
+00000058 r .LC3
+00000000 T USART_Configure
+00000000 T USART_DisableIt
+00000000 T USART_EnableIt
+00000000 T USART_GetChar
+00000000 T USART_GetStatus
+00000000 T USART_IsDataAvailable
+00000000 T USART_IsRxReady
+00000000 T USART_PutChar
+00000000 T USART_Read
+00000000 T USART_ReadBuffer
+00000000 T USART_SetIrdaFilter
+00000000 T USART_SetReceiverEnabled
+00000000 T USART_SetTransmitterEnabled
+00000000 T USART_Write
+00000000 T USART_WriteBuffer
+00000068 r __FUNCTION__.5125
+ U __assert_func
+ U iprintf
+
+wdt.o:
+00000000 T WDT_Disable
+00000000 T WDT_Enable
+00000000 T WDT_GetPeriod
+00000000 T WDT_GetStatus
+00000000 T WDT_Restart
+
+core_cm3.o:
+00000000 T __LDREXB
+00000000 T __LDREXH
+00000000 T __LDREXW
+00000000 T __RBIT
+00000000 T __REV
+00000000 T __REV16
+00000000 T __REVSH
+00000000 T __STREXB
+00000000 T __STREXH
+00000000 T __STREXW
+00000000 T __get_BASEPRI
+00000000 T __get_CONTROL
+00000000 T __get_FAULTMASK
+00000000 T __get_MSP
+00000000 T __get_PRIMASK
+00000000 T __get_PSP
+00000000 T __set_BASEPRI
+00000000 T __set_CONTROL
+00000000 T __set_FAULTMASK
+00000000 T __set_MSP
+00000000 T __set_PRIMASK
+00000000 T __set_PSP
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/lib/libchip_sam3x8_gcc_rel.a.txt b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/lib/libchip_sam3x8_gcc_rel.a.txt
new file mode 100644
index 0000000..6a2dcc5
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/lib/libchip_sam3x8_gcc_rel.a.txt
@@ -0,0 +1,624 @@
+
+adc.o:
+00000000 T ADC_CheckConfiguration
+00000000 T ADC_GetConvertedData
+00000000 T ADC_Initialize
+00000000 T ADC_ReadBuffer
+00000000 T ADC_SetAnalogChange
+00000000 T ADC_SetClock
+00000000 T ADC_SetCompareChannel
+00000000 T ADC_SetCompareMode
+00000000 T ADC_SetComparisonWindow
+00000000 T ADC_SetFastWakeup
+00000000 T ADC_SetFreeRunMode
+00000000 T ADC_SetLowResolution
+00000000 T ADC_SetSequence
+00000000 T ADC_SetSequenceByList
+00000000 T ADC_SetSequenceMode
+00000000 T ADC_SetSleepMode
+00000000 T ADC_SetTagEnable
+00000000 T ADC_SetTiming
+00000000 T ADC_SetTrigger
+00000000 t GetStartupValue
+ U PMC_EnablePeripheral
+00000018 r __FUNCTION__.4953
+00000000 r __FUNCTION__.5082
+ U __assert_func
+ U iprintf
+
+async.o:
+00000000 T ASYNC_IsFinished
+
+chipid.o:
+
+dacc.o:
+00000000 T DACC_Initialize
+00000000 T DACC_SetConversionData
+00000000 T DACC_WriteBuffer
+ U PMC_EnablePeripheral
+00000000 r __FUNCTION__.4818
+ U __assert_func
+
+dmac.o:
+00000000 T DMAC_Disable
+00000000 T DMAC_DisableChannel
+00000000 T DMAC_DisableChannels
+00000000 T DMAC_DisableIt
+00000000 T DMAC_Enable
+00000000 T DMAC_EnableChannel
+00000000 T DMAC_EnableChannels
+00000000 T DMAC_EnableIt
+00000000 T DMAC_GetChannelStatus
+00000000 T DMAC_GetDestinationAddr
+00000000 T DMAC_GetInterruptMask
+00000000 T DMAC_GetMaskedStatus
+00000000 T DMAC_GetSourceAddr
+00000000 T DMAC_GetStatus
+00000000 T DMAC_KeepChannel
+00000000 T DMAC_Modified_Arbiter
+00000000 T DMAC_RestoreChannel
+00000000 T DMAC_SetBufferSize
+00000000 T DMAC_SetCFG
+00000000 T DMAC_SetChunkTransferSize
+00000000 T DMAC_SetControlA
+00000000 T DMAC_SetControlB
+00000000 T DMAC_SetDescFetchMode
+00000000 T DMAC_SetDescriptorAddr
+00000000 T DMAC_SetDestinationAddr
+00000000 T DMAC_SetFlowControl
+00000000 T DMAC_SetSingleTransferSize
+00000000 T DMAC_SetSourceAddr
+00000000 T DMAC_SethandshakeInterface
+00000000 T DMAC_SuspendChannel
+0000025c r __FUNCTION__.4808
+00000250 r __FUNCTION__.4814
+00000240 r __FUNCTION__.4820
+00000230 r __FUNCTION__.4827
+00000220 r __FUNCTION__.4834
+00000208 r __FUNCTION__.4840
+000001f8 r __FUNCTION__.4847
+000001e0 r __FUNCTION__.4855
+000001cc r __FUNCTION__.4864
+000001b8 r __FUNCTION__.4877
+000001a4 r __FUNCTION__.4885
+0000018c r __FUNCTION__.4898
+00000178 r __FUNCTION__.4906
+00000164 r __FUNCTION__.4919
+00000150 r __FUNCTION__.4932
+00000138 r __FUNCTION__.4944
+00000124 r __FUNCTION__.4953
+00000110 r __FUNCTION__.4963
+000000f8 r __FUNCTION__.4975
+000000e0 r __FUNCTION__.4985
+000000c8 r __FUNCTION__.4998
+000000b4 r __FUNCTION__.5014
+000000a0 r __FUNCTION__.5025
+00000084 r __FUNCTION__.5042
+00000068 r __FUNCTION__.5062
+00000054 r __FUNCTION__.5081
+0000003c r __FUNCTION__.5093
+00000028 r __FUNCTION__.5112
+0000001c r __FUNCTION__.5128
+00000000 r __FUNCTION__.5140
+ U __assert_func
+
+eefc.o:
+00000000 T EFC_ComputeAddress
+00000000 T EFC_DisableFrdyIt
+00000000 T EFC_EnableFrdyIt
+00000000 T EFC_GetResult
+00000000 T EFC_GetStatus
+00000000 T EFC_PerformCommand
+00000000 T EFC_SetFlashAccessMode
+00000000 T EFC_SetWaitState
+00000000 T EFC_StartCommand
+00000000 T EFC_TranslateAddress
+00000000 b IAP_PerformCommand.4932
+00000028 r __FUNCTION__.4838
+00000014 r __FUNCTION__.4870
+00000000 r __FUNCTION__.4896
+ U __assert_func
+
+emac.o:
+00000000 T EMAC_BackPressureEnable
+00000000 T EMAC_BigFrameEnable
+00000000 T EMAC_BroadcastDisable
+00000000 T EMAC_ClearRxStatus
+00000000 T EMAC_ClearStatistics
+00000000 T EMAC_ClearTxStatus
+00000000 T EMAC_Configure
+00000000 T EMAC_CpyAllEnable
+00000000 T EMAC_DisableIt
+00000000 T EMAC_DiscardFCSEnable
+00000000 T EMAC_EFRHD
+00000000 T EMAC_EnableIt
+00000000 T EMAC_FullDuplexEnable
+00000000 T EMAC_GetConfigure
+00000000 T EMAC_GetItMask
+00000000 T EMAC_GetItStatus
+00000000 T EMAC_GetMDIO
+00000000 T EMAC_GetNetworkControl
+00000000 T EMAC_GetRxQueue
+00000000 T EMAC_GetRxStatus
+00000000 T EMAC_GetStatus
+00000000 T EMAC_GetTxQueue
+00000000 T EMAC_GetTxStatus
+00000000 T EMAC_GetTypeID
+00000000 T EMAC_IRXFCS
+00000000 T EMAC_IncreaseStatistics
+00000000 T EMAC_IsIdle
+00000000 T EMAC_JumboFrameEnable
+00000000 T EMAC_ManagementEnable
+00000000 T EMAC_MulticastHashEnable
+00000000 T EMAC_NetworkControl
+00000000 T EMAC_PHYData
+00000000 T EMAC_PHYMaintain
+00000000 T EMAC_PauseFrameEnable
+00000000 T EMAC_RMIIEnable
+00000000 T EMAC_ReceiveEnable
+00000000 T EMAC_RetryTestEnable
+00000000 T EMAC_RxLenthCheckEnable
+00000000 T EMAC_SetAddress
+00000000 T EMAC_SetAddress32
+00000000 T EMAC_SetAddress64
+00000000 T EMAC_SetClock
+00000000 T EMAC_SetHash
+00000000 T EMAC_SetHash64
+00000000 T EMAC_SetPauseTime
+00000000 T EMAC_SetRxBufferOffset
+00000000 T EMAC_SetRxQueue
+00000000 T EMAC_SetSpeed
+00000000 T EMAC_SetTxQueue
+00000000 T EMAC_SetTypeID
+00000000 T EMAC_StatisticsWriteEnable
+00000000 T EMAC_TransceiverClockEnable
+00000000 T EMAC_TransmissionHalt
+00000000 T EMAC_TransmissionStart
+00000000 T EMAC_TransmitEnable
+
+exceptions.o:
+00000000 W ADC_IrqHandler
+00000000 W BusFault_Handler
+00000000 W CAN0_IrqHandler
+00000000 W CAN1_IrqHandler
+00000000 W DACC_IrqHandler
+00000000 W DMAC_IrqHandler
+00000000 W DebugMon_Handler
+00000000 W EFC0_IrqHandler
+00000000 W EFC1_IrqHandler
+00000000 W EMAC_IrqHandler
+00000000 W HSMCI_IrqHandler
+00000000 W HardFault_Handler
+00000000 T IrqHandlerNotUsed
+00000000 W MemManage_Handler
+00000000 W NMI_Handler
+00000000 W PIOA_IrqHandler
+00000000 W PIOB_IrqHandler
+00000000 W PIOC_IrqHandler
+00000000 W PIOD_IrqHandler
+00000000 W PIOE_IrqHandler
+00000000 W PIOF_IrqHandler
+00000000 W PMC_IrqHandler
+00000000 W PWM_IrqHandler
+00000000 W PendSV_Handler
+00000000 W RSTC_IrqHandler
+00000000 W RTC_IrqHandler
+00000000 W RTT_IrqHandler
+00000000 W SDRAMC_IrqHandler
+00000000 W SMC_IrqHandler
+00000000 W SPI0_IrqHandler
+00000000 W SPI1_IrqHandler
+00000000 W SSC_IrqHandler
+00000000 W SUPC_IrqHandler
+00000000 W SVC_Handler
+00000000 W SysTick_Handler
+00000000 W TC0_IrqHandler
+00000000 W TC1_IrqHandler
+00000000 W TC2_IrqHandler
+00000000 W TC3_IrqHandler
+00000000 W TC4_IrqHandler
+00000000 W TC5_IrqHandler
+00000000 W TC6_IrqHandler
+00000000 W TC7_IrqHandler
+00000000 W TC8_IrqHandler
+00000000 W TRNG_IrqHandler
+00000000 W TWI0_IrqHandler
+00000000 W TWI1_IrqHandler
+00000000 W UART_IrqHandler
+00000000 W UOTGHS_IrqHandler
+00000000 W USART0_IrqHandler
+00000000 W USART1_IrqHandler
+00000000 W USART2_IrqHandler
+00000000 W USART3_IrqHandler
+00000000 W UsageFault_Handler
+00000000 W WDT_IrqHandler
+
+flashd.o:
+00000000 t ComputeLockRange
+ U EFC_ComputeAddress
+ U EFC_DisableFrdyIt
+ U EFC_GetResult
+ U EFC_PerformCommand
+ U EFC_SetWaitState
+ U EFC_TranslateAddress
+00000000 T FLASHD_ClearGPNVM
+00000000 T FLASHD_Erase
+00000000 T FLASHD_Initialize
+00000000 T FLASHD_IsGPNVMSet
+00000000 T FLASHD_IsLocked
+00000000 T FLASHD_Lock
+00000000 T FLASHD_ReadUniqueID
+00000000 T FLASHD_SetGPNVM
+00000000 T FLASHD_Unlock
+00000000 T FLASHD_Write
+00000048 r __FUNCTION__.5036
+00000038 r __FUNCTION__.5194
+00000000 r __FUNCTION__.5240
+00000028 r __FUNCTION__.5259
+00000014 r __FUNCTION__.5272
+ U __assert_func
+00000000 b _adwPageBuffer
+00000058 r _aucPageBuffer
+00000000 d _dwUseIAP
+ U memcpy
+
+hsmci.o:
+00000000 T HSMCI_Configure
+00000000 T HSMCI_ConfigureCompletionTO
+00000000 T HSMCI_ConfigureDataTO
+00000000 T HSMCI_ConfigureDma
+00000000 T HSMCI_ConfigureMode
+00000000 T HSMCI_ConfigureTransfer
+00000000 T HSMCI_ConfigureWP
+00000000 T HSMCI_Disable
+00000000 T HSMCI_DisableIt
+00000000 T HSMCI_DivCtrl
+00000000 T HSMCI_Enable
+00000000 T HSMCI_EnableDma
+00000000 T HSMCI_EnableIt
+00000000 T HSMCI_FByteEnable
+00000000 T HSMCI_GetBusWidth
+00000000 T HSMCI_GetItMask
+00000000 T HSMCI_GetMode
+00000000 T HSMCI_GetResponse
+00000000 T HSMCI_GetStatus
+00000000 T HSMCI_GetWPStatus
+00000000 T HSMCI_HsEnable
+00000000 T HSMCI_IsFByteEnabled
+00000000 T HSMCI_IsHsEnabled
+00000000 T HSMCI_PadvCtl
+00000000 T HSMCI_ProofEnable
+00000000 T HSMCI_Read
+00000000 T HSMCI_ReadFifo
+00000000 T HSMCI_Reset
+00000000 T HSMCI_Select
+00000000 T HSMCI_SendCmd
+00000000 T HSMCI_SetBlockCount
+00000000 T HSMCI_SetBlockLen
+00000000 T HSMCI_SetBusWidth
+00000000 T HSMCI_SetDmaOffset
+00000000 T HSMCI_SetSlot
+00000000 T HSMCI_Write
+00000000 T HSMCI_WriteFifo
+
+matrix.o:
+
+pio.o:
+00000000 T PIO_SetInput
+00000000 T PIO_SetOutput
+00000000 T PIO_SetPeripheralA
+00000000 T PIO_SetPeripheralB
+
+pio_it.o:
+00000000 T PIOA_IrqHandler
+00000000 T PIOB_IrqHandler
+00000000 T PIOC_IrqHandler
+00000000 T PIOD_IrqHandler
+00000000 T PIOE_IrqHandler
+00000000 T PIOF_IrqHandler
+00000000 T PIO_InitializeInterrupts
+ U PMC_EnablePeripheral
+ U PioInterruptHandler
+
+pio_pin.o:
+00000000 T PIO_PinClear
+00000000 T PIO_PinConfigure
+00000000 T PIO_PinDisableWriteProtect
+00000000 T PIO_PinEnableWriteProtect
+00000000 T PIO_PinGet
+00000000 T PIO_PinGetOutputDataStatus
+00000000 T PIO_PinGetWriteProtectViolationInfo
+00000000 T PIO_PinSet
+00000000 T PIO_PinSetDebounceFilter
+00000000 T PIO_PinSetPinType
+ U PIO_SetInput
+ U PIO_SetOutput
+ U PIO_SetPeripheralA
+ U PIO_SetPeripheralB
+ U PMC_EnablePeripheral
+
+pio_pin_it.o:
+00000000 T PIO_PinConfigureIt
+00000000 T PIO_PinDisableIt
+00000000 T PIO_PinEnableIt
+00000000 T PioInterruptHandler
+00000038 r __FUNCTION__.4809
+00000024 r __FUNCTION__.4838
+00000014 r __FUNCTION__.4864
+00000000 r __FUNCTION__.4886
+ U __assert_func
+00000004 b _aIntSources
+00000000 b _dwNumSources
+
+pmc.o:
+00000000 T PMC_ConfigureMckWithPlla
+00000000 T PMC_ConfigurePck
+00000000 T PMC_DisableAllClocks
+00000000 T PMC_DisableAllPeripherals
+00000000 T PMC_DisableExtOsc12MHz
+00000000 T PMC_DisableIntRC4_8_12MHz
+00000000 T PMC_DisablePck
+00000000 T PMC_DisablePeripheral
+00000000 T PMC_DisableUpllClock
+00000000 T PMC_EnableAllPeripherals
+00000000 T PMC_EnableExtOsc12MHz
+00000000 T PMC_EnableIntRC4_8_12MHz
+00000000 T PMC_EnablePck
+00000000 T PMC_EnablePeripheral
+00000000 T PMC_EnableUpllClock
+00000000 T PMC_GetStartupTime
+00000000 T PMC_IsPeriphEnabled
+00000000 T PMC_SetMckSelection
+00000000 T PMC_SetPllaClock
+00000000 T PMC_SetStartupTime
+00000000 D PmcFastRcCnt
+00000004 D PmcMainOscCnt
+00000008 D PmcPllaCnt
+0000000c D PmcUpllCnt
+00000000 T SUPC_SelectExtCrystal32K
+00000000 t _PMC_SetMckPrescaler
+00000000 t _PMC_SwitchMck2MainClock
+00000000 t _PMC_SwitchMck2SlowClock
+0000002c r __FUNCTION__.4870
+00000014 r __FUNCTION__.4894
+00000000 r __FUNCTION__.4944
+ U __assert_func
+
+pwm.o:
+00000080 r C.16.4816
+00000000 t FindClockConfiguration
+00000000 T PWMC_ConfigureChannel
+00000000 T PWMC_ConfigureChannelExt
+00000000 T PWMC_ConfigureClocks
+00000000 T PWMC_ConfigureComparisonUnit
+00000000 T PWMC_ConfigureEventLineMode
+00000000 T PWMC_ConfigureSyncChannel
+00000000 T PWMC_DisableChannel
+00000000 T PWMC_DisableChannelIt
+00000000 T PWMC_DisableIt
+00000000 T PWMC_DisableOverrideOutput
+00000000 T PWMC_EnableChannel
+00000000 T PWMC_EnableChannelIt
+00000000 T PWMC_EnableFaultProtection
+00000000 T PWMC_EnableIt
+00000000 T PWMC_EnableOverrideOutput
+00000000 T PWMC_FaultClear
+00000000 T PWMC_SetDeadTime
+00000000 T PWMC_SetDutyCycle
+00000000 T PWMC_SetFaultMode
+00000000 T PWMC_SetFaultProtectionValue
+00000000 T PWMC_SetOverrideValue
+00000000 T PWMC_SetPeriod
+00000000 T PWMC_SetSyncChannelUpdatePeriod
+00000000 T PWMC_SetSyncChannelUpdateUnlock
+00000000 T PWMC_WriteBuffer
+000000ac r __FUNCTION__.4812
+000000f8 r __FUNCTION__.4836
+000000dc r __FUNCTION__.4869
+000000c4 r __FUNCTION__.4914
+0000006c r __FUNCTION__.4946
+00000058 r __FUNCTION__.4966
+0000003c r __FUNCTION__.5099
+0000001c r __FUNCTION__.5122
+00000000 r __FUNCTION__.5136
+ U __assert_func
+
+rstc.o:
+00000000 T RSTC_ConfigureMode
+00000000 T RSTC_ExtReset
+00000000 T RSTC_GetNrstLevel
+00000000 T RSTC_GetStatus
+00000000 T RSTC_IsBusy
+00000000 T RSTC_IsUserResetDetected
+00000000 T RSTC_PeripheralReset
+00000000 T RSTC_ProcessorReset
+00000000 T RSTC_SetExtResetLength
+00000000 T RSTC_SetUserResetEnable
+00000000 T RSTC_SetUserResetInterruptEnable
+
+rtc.o:
+00000000 T RTC_ClearSCCR
+00000000 T RTC_DisableIt
+00000000 T RTC_EnableIt
+00000000 T RTC_GetDate
+00000000 T RTC_GetHourMode
+00000000 T RTC_GetSR
+00000000 T RTC_GetTime
+00000000 T RTC_SetDate
+00000000 T RTC_SetDateAlarm
+00000000 T RTC_SetHourMode
+00000000 T RTC_SetTime
+00000000 T RTC_SetTimeAlarm
+00000020 r __FUNCTION__.4809
+00000010 r __FUNCTION__.4822
+00000000 r __FUNCTION__.4830
+ U __assert_func
+
+rtt.o:
+00000000 T RTT_EnableIT
+00000000 T RTT_GetStatus
+00000000 T RTT_GetTime
+00000000 T RTT_SetAlarm
+00000000 T RTT_SetPrescaler
+00000010 r __FUNCTION__.4819
+00000000 r __FUNCTION__.4833
+ U __assert_func
+
+sdramc.o:
+ U PMC_EnablePeripheral
+00000000 T SDRAMC_Configure
+
+smc.o:
+00000000 t ECC_CountBitsInByte
+00000000 t ECC_CountBitsInCode
+00000000 T SMC_ECC_Configure
+00000000 T SMC_ECC_GetCorrectoinType
+00000000 T SMC_ECC_GetEccParity
+00000000 T SMC_ECC_GetStatus
+00000000 T SMC_ECC_GetValue
+00000000 T SMC_ECC_VerifyHsiao
+00000000 T SMC_NFC_Configure
+00000000 T SMC_NFC_DisableSpareRead
+00000000 T SMC_NFC_DisableSpareWrite
+00000000 T SMC_NFC_EnableNfc
+00000000 T SMC_NFC_EnableSpareRead
+00000000 T SMC_NFC_EnableSpareWrite
+00000000 T SMC_NFC_GetStatus
+00000000 T SMC_NFC_Reset
+00000000 T SMC_NFC_SendCommand
+00000000 T SMC_NFC_isNfcBusy
+00000000 T SMC_NFC_isReadyBusy
+00000000 T SMC_NFC_isSpareRead
+00000000 T SMC_NFC_isSpareWrite
+00000000 T SMC_NFC_isTransferComplete
+00000000 t T.35
+
+spi.o:
+ U PMC_EnablePeripheral
+00000000 T SPI_ChipSelect
+00000000 T SPI_Configure
+00000000 T SPI_ConfigureCSMode
+00000000 T SPI_ConfigureNPCS
+00000000 T SPI_Disable
+00000000 T SPI_DisableIt
+00000000 T SPI_Enable
+00000000 T SPI_EnableIt
+00000000 T SPI_GetStatus
+00000000 T SPI_IsFinished
+00000000 T SPI_Read
+00000000 T SPI_ReleaseCS
+00000000 T SPI_SetMode
+00000000 T SPI_Write
+00000000 T SPI_WriteLast
+
+ssc.o:
+ U PMC_EnablePeripheral
+00000000 T SSC_Configure
+00000000 T SSC_ConfigureReceiver
+00000000 T SSC_ConfigureTransmitter
+00000000 T SSC_DisableInterrupts
+00000000 T SSC_DisableReceiver
+00000000 T SSC_DisableTransmitter
+00000000 T SSC_EnableInterrupts
+00000000 T SSC_EnableReceiver
+00000000 T SSC_EnableTransmitter
+00000000 T SSC_Read
+00000000 T SSC_Write
+
+tc.o:
+00000000 T TC_Configure
+00000000 T TC_FindMckDivisor
+00000000 T TC_Start
+00000000 T TC_Stop
+00000014 r __FUNCTION__.4811
+00000008 r __FUNCTION__.4822
+00000000 r __FUNCTION__.4832
+ U __assert_func
+
+trng.o:
+
+twi.o:
+00000000 T TWI_ByteReceived
+00000000 T TWI_ByteSent
+00000000 T TWI_ConfigureMaster
+00000000 T TWI_ConfigureSlave
+00000000 T TWI_DisableIt
+00000000 T TWI_EnableIt
+00000000 T TWI_GetMaskedStatus
+00000000 T TWI_GetStatus
+00000000 T TWI_PDCReceiveComplete
+00000000 T TWI_PDCTransferComplete
+00000000 T TWI_PDC_Disable
+00000000 T TWI_PDC_read
+00000000 T TWI_PDC_write
+00000000 T TWI_ReadByte
+00000000 T TWI_SendSTOPCondition
+00000000 T TWI_StartRead
+00000000 T TWI_StartWrite
+00000000 T TWI_Stop
+00000000 T TWI_TransferComplete
+00000000 T TWI_WriteByte
+000000cc r __FUNCTION__.4813
+000000b8 r __FUNCTION__.4844
+000000ac r __FUNCTION__.4857
+0000009c r __FUNCTION__.4866
+0000008c r __FUNCTION__.4888
+0000007c r __FUNCTION__.4897
+0000006c r __FUNCTION__.4907
+0000005c r __FUNCTION__.4958
+0000004c r __FUNCTION__.4968
+0000003c r __FUNCTION__.4977
+00000028 r __FUNCTION__.4985
+00000010 r __FUNCTION__.4993
+00000000 r __FUNCTION__.5031
+ U __assert_func
+
+usart.o:
+00000000 T USART_Configure
+00000000 T USART_DisableIt
+00000000 T USART_EnableIt
+00000000 T USART_GetChar
+00000000 T USART_GetStatus
+00000000 T USART_IsDataAvailable
+00000000 T USART_IsRxReady
+00000000 T USART_PutChar
+00000000 T USART_Read
+00000000 T USART_ReadBuffer
+00000000 T USART_SetIrdaFilter
+00000000 T USART_SetReceiverEnabled
+00000000 T USART_SetTransmitterEnabled
+00000000 T USART_Write
+00000000 T USART_WriteBuffer
+00000000 r __FUNCTION__.5098
+ U __assert_func
+
+wdt.o:
+00000000 T WDT_Disable
+00000000 T WDT_Enable
+00000000 T WDT_GetPeriod
+00000000 T WDT_GetStatus
+00000000 T WDT_Restart
+
+core_cm3.o:
+00000000 T __LDREXB
+00000000 T __LDREXH
+00000000 T __LDREXW
+00000000 T __RBIT
+00000000 T __REV
+00000000 T __REV16
+00000000 T __REVSH
+00000000 T __STREXB
+00000000 T __STREXH
+00000000 T __STREXW
+00000000 T __get_BASEPRI
+00000000 T __get_CONTROL
+00000000 T __get_FAULTMASK
+00000000 T __get_MSP
+00000000 T __get_PRIMASK
+00000000 T __get_PSP
+00000000 T __set_BASEPRI
+00000000 T __set_CONTROL
+00000000 T __set_FAULTMASK
+00000000 T __set_MSP
+00000000 T __set_PRIMASK
+00000000 T __set_PSP
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/adc.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/adc.c
new file mode 100644
index 0000000..62cee5f
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/adc.c
@@ -0,0 +1,557 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/** \addtogroup adc_module Working with ADC
+ * \ingroup peripherals_module
+ * The ADC driver provides the interface to configure and use the ADC peripheral.
+ * \n
+ *
+ * It converts the analog input to digital format. The converted result could be
+ * 12bit or 10bit. The ADC supports up to 16 analog lines.
+ *
+ * To Enable a ADC conversion,the user has to follow these few steps:
+ * <ul>
+ * <li> Select an appropriate reference voltage on ADVREF </li>
+ * <li> Configure the ADC according to its requirements and special needs,which
+ * could be broken down into several parts:
+ * -# Select the resolution by setting or clearing ADC_MR_LOWRES bit in
+ * ADC_MR (Mode Register)
+ * -# Set ADC clock by setting ADC_MR_PRESCAL bits in ADC_MR, the clock is
+ * calculated with ADCClock = MCK / ( (PRESCAL+1) * 2 )
+ * -# Set Startup Time,Tracking Clock cycles and Transfer Clock respectively
+ * in ADC_MR.
+ </li>
+ * <li> Start conversion by setting ADC_CR_START in ADC_CR. </li>
+ * </ul>
+ *
+ * For more accurate information, please look at the ADC section of the
+ * Datasheet.
+ *
+ * Related files :\n
+ * \ref adc.c\n
+ * \ref adc.h\n
+ */
+/*@{*/
+/*@}*/
+/**
+ * \file
+ *
+ * Implementation of Analog-to-Digital Converter (ADC).
+ *
+ */
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "chip.h"
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Initialize the ADC controller
+ *
+ * \param pAdc Pointer to an Adc instance.
+ * \param dwID ADC Index
+ */
+extern void ADC_Initialize( Adc* pAdc, uint32_t dwID )
+{
+ /* Enable peripheral clock*/
+ PMC_EnablePeripheral(dwID);
+
+ /* Reset the controller */
+ pAdc->ADC_CR = ADC_CR_SWRST;
+
+ /* Reset Mode Register */
+ pAdc->ADC_MR = 0;
+
+ /* Reset PDC transfer */
+ pAdc->ADC_PTCR = (ADC_PTCR_RXTDIS | ADC_PTCR_TXTDIS);
+ pAdc->ADC_RCR = 0;
+ pAdc->ADC_RNCR = 0;
+ pAdc->ADC_TCR = 0;
+ pAdc->ADC_TNCR = 0;
+}
+
+/**
+ * \brief Set ADC clock.
+ *
+ * \param pAdc Pointer to an Adc instance.
+ * \param dwPres prescal value
+ * \param dwMck Board MCK (Hz)
+ *
+ * \return ADC clock
+ */
+
+extern uint32_t ADC_SetClock( Adc* pAdc, uint32_t dwPres, uint32_t dwMck )
+{
+ uint32_t dwMr;
+ uint32_t dwAdcClock;
+
+ dwMr = pAdc->ADC_MR;
+ dwMr = (dwMr & ~ADC_MR_PRESCAL_Msk) | ADC_MR_PRESCAL( dwPres );
+ pAdc->ADC_MR |= dwMr;
+
+ /* Formula: ADCClock = MCK / ( (PRESCAL+1) * 2 ) */
+ dwAdcClock = dwMck / ( (dwPres + 1) * 2 );
+
+ return dwAdcClock;
+}
+
+/**
+ * \brief Set ADC timing.
+ *
+ * \param pAdc Pointer to an Adc instance.
+ * \param dwStartup startup value
+ * \param dwTransfer transfer value
+ * \param dwTracking tracking value
+ * \param dwSettling settling value
+ */
+extern void ADC_SetTiming( Adc* pAdc, uint32_t dwStartup, uint32_t dwTransfer,
+ uint32_t dwTracking, uint32_t dwSettling )
+{
+ uint32_t dwMr;
+
+ dwMr = pAdc->ADC_MR;
+ dwMr &= (~ADC_MR_STARTUP_Msk) & (~ADC_MR_TRACKTIM_Msk) &
+ (~ADC_MR_TRANSFER_Msk) & (~ADC_MR_SETTLING_Msk);
+
+ /* Formula:
+ * Startup Time = startup value / ADCClock
+ * Transfer Time = (TRANSFER * 2 + 3) / ADCClock
+ * Tracking Time = (TRACKTIM + 1) / ADCClock
+ * Settling Time = settling value / ADCClock
+ */
+ dwMr |= dwStartup | dwTransfer | dwTracking | dwSettling;
+ pAdc->ADC_MR |= dwMr;
+}
+
+/**
+ * \brief Set ADC trigger.
+ *
+ * \param pAdc Pointer to an Adc instance.
+ * \param bEnDis Enable/Disable hardware trigger
+ * \param dwTrgSel Trigger selection
+ */
+extern void ADC_SetTrigger( Adc* pAdc, uint32_t bEnDis, uint32_t dwTrgSel )
+{
+ uint32_t dwMr;
+
+ dwMr = pAdc->ADC_MR;
+
+ if ( bEnDis )
+ {
+ dwMr |= ADC_MR_TRGEN;
+ }
+ else
+ {
+ dwMr &= ~ADC_MR_TRGEN;
+ }
+ dwMr &= ~ADC_MR_TRGSEL_Msk;
+ dwMr |= dwTrgSel;
+ pAdc->ADC_MR |= dwMr;
+}
+
+/**
+ * \brief Set free run mode.
+ *
+ * \param pAdc Pointer to an Adc instance.
+ * \param bEnDis Enable/Disable free run mode.
+ */
+extern void ADC_SetFreeRunMode( Adc* pAdc, uint32_t bEnDis )
+{
+ if ( bEnDis )
+ {
+ pAdc->ADC_MR |= ADC_MR_FREERUN;
+ }
+ else
+ {
+ pAdc->ADC_MR &= ~ADC_MR_FREERUN;
+ }
+}
+
+
+/**
+ * \brief Enable/Disable low resolution.
+ *
+ * \param pAdc Pointer to an Adc instance.
+ * \param bEnDis Enable/Disable low resolution.
+ */
+extern void ADC_SetLowResolution( Adc* pAdc, uint32_t bEnDis )
+{
+ if ( bEnDis )
+ {
+ pAdc->ADC_MR |= ADC_MR_LOWRES;
+ }
+ else
+ {
+ pAdc->ADC_MR &= ~ADC_MR_LOWRES;
+ }
+}
+
+/**
+ * \brief Enable/Disable sleep mode.
+ *
+ * \param pAdc Pointer to an Adc instance.
+ * \param bEnDis Enable/Disable sleep mode.
+ */
+extern void ADC_SetSleepMode( Adc *pAdc, uint8_t bEnDis )
+{
+ if ( bEnDis )
+ {
+ pAdc->ADC_MR |= ADC_MR_SLEEP;
+ }
+ else
+ {
+ pAdc->ADC_MR &= ~ADC_MR_SLEEP;
+ }
+}
+
+/**
+ * \brief Enable/Disable fast wake up.
+ *
+ * \param pAdc Pointer to an Adc instance.
+ * \param bEnDis Enable/Disable fast wake up in sleep mode.
+ */
+extern void ADC_SetFastWakeup( Adc *pAdc, uint8_t bEnDis )
+{
+ if ( bEnDis )
+ {
+ pAdc->ADC_MR |= ADC_MR_FWUP;
+ }
+ else
+ {
+ pAdc->ADC_MR &= ~ADC_MR_FWUP;
+ }
+}
+
+/**
+ * \brief Enable/Disable seqnence mode.
+ *
+ * \param pAdc Pointer to an Adc instance.
+ * \param bEnDis Enable/Disable seqnence mode.
+ */
+extern void ADC_SetSequenceMode( Adc *pAdc, uint8_t bEnDis )
+{
+ if ( bEnDis )
+ {
+ /* User Sequence Mode: The sequence respects what is defined in
+ ADC_SEQR1 and ADC_SEQR2 */
+ pAdc->ADC_MR |= ADC_MR_USEQ;
+ }
+ else
+ {
+ /* Normal Mode: The controller converts channels in a simple numeric order. */
+ pAdc->ADC_MR &= ~ADC_MR_USEQ;
+ }
+}
+
+/**
+ * \brief Set channel sequence.
+ *
+ * \param pAdc Pointer to an Adc instance.
+ * \param dwSEQ1 Sequence 1 ~ 8 channel number.
+ * \param dwSEQ2 Sequence 9 ~ 16 channel number.
+ */
+extern void ADC_SetSequence( Adc *pAdc, uint32_t dwSEQ1, uint32_t dwSEQ2 )
+{
+ pAdc->ADC_SEQR1 = dwSEQ1;
+ pAdc->ADC_SEQR2 = dwSEQ2;
+}
+
+/**
+ * \brief Set channel sequence by given channel list.
+ *
+ * \param pAdc Pointer to an Adc instance.
+ * \param ucChList Channel list.
+ * \param ucNumCh Number of channels in list.
+ */
+extern void ADC_SetSequenceByList( Adc *pAdc, uint8_t ucChList[], uint8_t ucNumCh )
+{
+ uint8_t i;
+ uint8_t ucShift;
+
+ pAdc->ADC_SEQR1 = 0;
+ for (i = 0, ucShift = 0; i < 8; i ++, ucShift += 4)
+ {
+ if (i >= ucNumCh) return;
+ pAdc->ADC_SEQR1 |= ucChList[i] << ucShift;
+
+ }
+ pAdc->ADC_SEQR2 = 0;
+ for (ucShift = 0; i < 16; i ++, ucShift += 4)
+ {
+ if (i >= ucNumCh) return;
+ pAdc->ADC_SEQR2 |= ucChList[i] << ucShift;
+ }
+}
+
+/**
+ * \brief Set analog change.
+ * IF enabled, it allows different analog settings for each channel,
+ * otherwise, DIFF0, GAIN0 and OFF0 are used for all channels.
+ *
+ * \param pAdc Pointer to an Adc instance.
+ * \param bEnDis Enable/Disable.
+ */
+extern void ADC_SetAnalogChange( Adc *pAdc, uint8_t bEnDis )
+{
+ if ( bEnDis )
+ {
+ pAdc->ADC_MR |= ADC_MR_ANACH;
+ }
+ else
+ {
+ pAdc->ADC_MR &= ~ADC_MR_ANACH;
+ }
+}
+
+/**
+ * \brief Set "TAG" mode, show channel number in last data or not.
+ *
+ * \param pAdc Pointer to an Adc instance.
+ * \param bEnDis Enable/Disable TAG value.
+ */
+extern void ADC_SetTagEnable( Adc *pAdc, uint8_t bEnDis )
+{
+ if ( bEnDis )
+ {
+ pAdc->ADC_EMR |= ADC_EMR_TAG;
+ }
+ else
+ {
+ pAdc->ADC_EMR &= ~ADC_EMR_TAG;
+ }
+}
+
+/**
+ * \brief Set compare channel.
+ *
+ * \param pAdc Pointer to an Adc instance.
+ * \param dwChannel channel number to be set,16 for all channels
+ */
+extern void ADC_SetCompareChannel( Adc* pAdc, uint32_t dwChannel )
+{
+ assert( dwChannel <= 16 ) ;
+
+ if ( dwChannel < 16 )
+ {
+ pAdc->ADC_EMR &= ~(ADC_EMR_CMPALL);
+ pAdc->ADC_EMR &= ~(ADC_EMR_CMPSEL_Msk);
+ pAdc->ADC_EMR |= (dwChannel << ADC_EMR_CMPSEL_Pos);
+ }
+ else
+ {
+ pAdc->ADC_EMR |= ADC_EMR_CMPALL;
+ }
+}
+
+/**
+ * \brief Set compare mode.
+ *
+ * \param pAdc Pointer to an Adc instance.
+ * \param dwMode compare mode
+ */
+extern void ADC_SetCompareMode( Adc* pAdc, uint32_t dwMode )
+{
+ pAdc->ADC_EMR &= ~(ADC_EMR_CMPMODE_Msk);
+ pAdc->ADC_EMR |= (dwMode & ADC_EMR_CMPMODE_Msk);
+}
+
+/**
+ * \brief Set comparsion window.
+ *
+ * \param pAdc Pointer to an Adc instance.
+ * \param dwHi_Lo Comparison Window
+ */
+extern void ADC_SetComparisonWindow( Adc* pAdc, uint32_t dwHi_Lo )
+{
+ pAdc->ADC_CWR = dwHi_Lo ;
+}
+
+/**
+ * \brief Get startup value.
+ */
+static uint32_t GetStartupValue( uint32_t dwStartup )
+{
+ uint32_t dwStartupValue = 0;
+
+ if( dwStartup == 0 )
+ dwStartupValue = 0;
+ else if( dwStartup == 1 )
+ dwStartupValue = 8;
+ else if( dwStartup == 2 )
+ dwStartupValue = 16;
+ else if( dwStartup == 3 )
+ dwStartupValue = 24;
+ else if( dwStartup == 4 )
+ dwStartupValue = 64;
+ else if( dwStartup == 5 )
+ dwStartupValue = 80;
+ else if( dwStartup == 6 )
+ dwStartupValue = 96;
+ else if( dwStartup == 7 )
+ dwStartupValue = 112;
+ else if( dwStartup == 8 )
+ dwStartupValue = 512;
+ else if( dwStartup == 9 )
+ dwStartupValue = 576;
+ else if( dwStartup == 10 )
+ dwStartupValue = 640;
+ else if( dwStartup == 11 )
+ dwStartupValue = 704;
+ else if( dwStartup == 12 )
+ dwStartupValue = 768;
+ else if( dwStartup == 13 )
+ dwStartupValue = 832;
+ else if( dwStartup == 14 )
+ dwStartupValue = 896;
+ else if( dwStartup == 15 )
+ dwStartupValue = 960;
+
+ return dwStartupValue;
+}
+
+/**
+ * \brief Check if ADC configuration is right.
+ *
+ * \param pAdc Pointer to an Adc instance.
+ * \param dwMck Board MCK (Hz)
+ *
+ * \return 0 if check ok, others if not ok.
+ */
+extern uint8_t ADC_CheckConfiguration( Adc* pAdc, uint32_t dwMck )
+{
+ uint8_t bOk = 0;
+ uint32_t dwMr;
+ uint32_t dwPres;
+ uint32_t dwStartup;
+ uint32_t dwAdcClock;
+ uint32_t dwTemp;
+
+ dwMr = pAdc->ADC_MR;
+
+ dwPres = (dwMr & ADC_MR_PRESCAL_Msk) >> ADC_MR_PRESCAL_Pos;
+ /* Formula: ADCClock = MCK / ( (PRESCAL+1) * 2 ) */
+ dwAdcClock = dwMck / ( (dwPres + 1) * 2 );
+ if (dwAdcClock > ADC_CLOCK_MAX)
+ {
+ printf("ADC clock is too high (out of specification: %d Hz)\r\n", (int)ADC_CLOCK_MAX);
+ bOk = 1;
+ }
+
+ dwStartup = (dwMr & ADC_MR_STARTUP_Msk) >> ADC_MR_STARTUP_Pos;
+ if (dwMr & ADC_MR_SLEEP_SLEEP)
+ {
+ if (dwMr & ADC_MR_FREERUN_ON)
+ {
+ printf("FreeRun mode is forbidden in sleep mode\n\r");
+ bOk = 1;
+ }
+ if( !(dwMr & ADC_MR_FWUP_ON) )
+ {
+ /* Sleep 40µs */
+ dwTemp = ADC_STARTUP_NORMAL_MAX * dwAdcClock / 1000000;
+ if( dwTemp > GetStartupValue(dwStartup) )
+ {
+ printf("Startup time too small: %d, programmed: %d\r\n", (int)dwTemp, (int)(GetStartupValue(dwStartup)));
+ bOk = 1;
+ }
+ }
+ else
+ {
+ if( pAdc->ADC_MR & ADC_MR_FWUP_ON )
+ {
+ /* Fast Wake Up Sleep Mode: 12µs */
+ dwTemp = ADC_STARTUP_FAST_MAX * dwAdcClock / 1000000;
+ if( dwTemp > GetStartupValue(dwStartup) )
+ {
+ printf("Startup time too small: %d, programmed: %d\r\n", (int)dwTemp, (int)(GetStartupValue(dwStartup)));
+ bOk = 1;
+ }
+ }
+ }
+ }
+
+ return bOk;
+}
+
+/**
+ * \brief Return the Channel Converted Data
+ *
+ * \param pAdc Pointer to an Adc instance.
+ * \param dwChannel channel to get converted value
+ */
+extern uint32_t ADC_GetConvertedData( Adc* pAdc, uint32_t dwChannel )
+{
+ uint32_t dwData = 0;
+
+ assert( dwChannel < 16 ) ;
+
+ dwData = pAdc->ADC_CDR[dwChannel];
+
+ return dwData ;
+}
+
+/**
+ * \brief Read converted data through PDC channel
+ *
+ * \param pADC the pointer of adc peripheral
+ * \param pBuffer the destination buffer
+ * \param dwSize the size of the buffer
+ */
+extern uint32_t ADC_ReadBuffer( Adc* pADC, uint16_t *pwBuffer, uint32_t dwSize )
+{
+ /* Check if the first PDC bank is free*/
+ if ( (pADC->ADC_RCR == 0) && (pADC->ADC_RNCR == 0) )
+ {
+ pADC->ADC_RPR = (uint32_t)pwBuffer ;
+ pADC->ADC_RCR = dwSize ;
+ pADC->ADC_PTCR = ADC_PTCR_RXTEN;
+
+ return 1;
+ }
+ /* Check if the second PDC bank is free*/
+ else
+ {
+ if ( pADC->ADC_RNCR == 0 )
+ {
+ pADC->ADC_RNPR = (uint32_t)pwBuffer ;
+ pADC->ADC_RNCR = dwSize ;
+
+ return 1 ;
+ }
+ else
+ {
+ return 0 ;
+ }
+ }
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/async.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/async.c
new file mode 100644
index 0000000..b202be2
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/async.c
@@ -0,0 +1,53 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * Provide a routine for asynchronos transfer.
+ *
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+#include "chip.h"
+
+/*----------------------------------------------------------------------------
+ * Global functions
+ *----------------------------------------------------------------------------*/
+ /**
+ * \brief Returns 1 if the given transfer has ended; otherwise returns 0.
+ * \param pAsync Pointer to an Async instance.
+ */
+uint32_t ASYNC_IsFinished( Async* pAsync )
+{
+ return (pAsync->status != ASYNC_STATUS_PENDING) ;
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/can.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/can.c
new file mode 100644
index 0000000..1804b1c
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/can.c
@@ -0,0 +1,639 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2011, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+ * \file
+ *
+ * Implementation of the CAN low level functions.
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "chip.h"
+
+/*----------------------------------------------------------------------------
+ * Definitions
+ *----------------------------------------------------------------------------*/
+
+/* CAN state */
+#define CAN_DISABLED 0
+#define CAN_HALTED 1
+#define CAN_IDLE 2
+#define CAN_SENDING 3
+#define CAN_RECEIVING 4
+
+/* MOT: Mailbox Object Type */
+#define CAN_MOT_DISABLE 0 /* Mailbox is disabled */
+#define CAN_MOT_RECEPT 1 /* Reception Mailbox */
+#define CAN_MOT_RECEPT_OW 2 /* Reception mailbox with overwrite */
+#define CAN_MOT_TRANSMIT 3 /* Transmit mailbox */
+#define CAN_MOT_CONSUMER 4 /* Consumer mailbox */
+#define CAN_MOT_PRODUCER 5 /* Producer mailbox */
+
+/* CAN synchronisation state */
+#define CAN_SYNC_NOK 0
+#define CAN_SYNC_OK 1
+/* CAN timeout for sync */
+#define CAN_TIMEOUT 100000
+
+/*----------------------------------------------------------------------------
+ * Local functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * CAN Error Detection
+ *
+ * \param pCan Can peripheral
+ * \param dwStatus Status register content
+ */
+static void CAN_ErrorHandling( Can* pCan, uint32_t dwStatus )
+{
+ if ( (dwStatus & CAN_SR_ERRA) == CAN_SR_ERRA )
+ {
+ TRACE_ERROR( "(CAN) CAN is in Error Active mode\n\r" ) ;
+ }
+ else
+ {
+ if ( (dwStatus & CAN_SR_ERRP) == CAN_SR_ERRP )
+ {
+ TRACE_ERROR( "(CAN) CAN is in Error Passive mode\n\r" ) ;
+ }
+ else
+ {
+ if ( (dwStatus & CAN_SR_BOFF) == CAN_SR_BOFF )
+ {
+ TRACE_ERROR( "(CAN) CAN is in Buff Off mode\n\r" ) ;
+ /* CAN reset */
+ TRACE_ERROR( "(CAN) CAN reset\n\r" ) ;
+ /* CAN Controller Disable */
+ pCan->CAN_MR &= ~CAN_MR_CANEN ;
+ /* CAN Controller Enable */
+ pCan->CAN_MR |= CAN_MR_CANEN ;
+ }
+ }
+ }
+
+ /* Error for Frame dataframe */
+ /* CRC error */
+ if ( (dwStatus & CAN_SR_CERR) == CAN_SR_CERR )
+ {
+ TRACE_ERROR( "(CAN) CRC Error\n\r" ) ;
+ }
+ else
+ {
+ /* Bit-stuffing error */
+ if ( (dwStatus & CAN_SR_SERR) == CAN_SR_SERR )
+ {
+ TRACE_ERROR( "(CAN) Stuffing Error\n\r" ) ;
+ }
+ else
+ {
+ /* Bit error */
+ if ( (dwStatus & CAN_SR_BERR) == CAN_SR_BERR )
+ {
+ TRACE_ERROR( "(CAN) Bit Error\n\r" ) ;
+ }
+ else
+ {
+ /* Form error */
+ if ( (dwStatus & CAN_SR_FERR) == CAN_SR_FERR )
+ {
+ TRACE_ERROR( "(CAN) Form Error\n\r" ) ;
+ }
+ else
+ {
+ /* Acknowledgment error */
+ if ( (dwStatus & CAN_SR_AERR) == CAN_SR_AERR )
+ {
+ TRACE_ERROR( "(CAN) Acknowledgment Error\n\r" ) ;
+ }
+ }
+ }
+ }
+ }
+
+ /* Error interrupt handler
+ * Represent the current status of the CAN bus and are not latched.
+ * See CAN, par. Error Interrupt Handler
+ * CAN_SR_WARN
+ * CAN_SR_ERRA
+ */
+}
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * Generic CAN Interrupt handler
+ *
+ * \param pCan CAN peripheral
+ * \param pTransfer Xfer parameters
+ */
+extern void CAN_Handler( Can* pCan, SCanTransfer* pTransfer )
+{
+ uint32_t dwStatus ;
+ uint32_t dwMSR ;
+ uint32_t dwMid ;
+ uint32_t dwMessageMode ;
+ uint32_t dwMailbox ;
+ uint8_t ucState = CAN_DISABLED ;
+
+ ucState = pTransfer->state ;
+
+ dwStatus = (pCan->CAN_SR) ;
+ dwStatus &= (pCan->CAN_IMR) ;
+ pCan->CAN_IDR = dwStatus ;
+
+ TRACE_DEBUG( "CAN status=0x%X\n\r", status ) ;
+ if ( dwStatus & CAN_IDR_WAKEUP )
+ {
+ pTransfer->sync_can = CAN_SYNC_OK ;
+ pTransfer->state = CAN_IDLE ;
+ }
+ /* Mailbox event ? */
+ else
+ {
+ if ( (dwStatus&0x0000FFFF) != 0 )
+ {
+ TRACE_DEBUG( "Mailbox event\n\r" ) ;
+
+ /* Handle Mailbox interrupts */
+ for ( dwMailbox = 0 ; dwMailbox < CAN_MB_NUMBER ; dwMailbox++ )
+ {
+ dwMSR = pCan->CAN_MB[dwMailbox].CAN_MSR ;
+
+ if ( (dwMSR & CAN_MSR_MRDY) == CAN_MSR_MRDY )
+ {
+ /* Mailbox object type */
+ dwMessageMode = (pCan->CAN_MB[dwMailbox].CAN_MMR & CAN_MMR_MOT_Msk) >> CAN_MMR_MOT_Pos ;
+ TRACE_DEBUG( "message_mode 0x%X\n\r", dwMessageMode ) ;
+ TRACE_DEBUG( "dwMailbox 0x%X\n\r", dwMailbox ) ;
+
+ if ( dwMessageMode == 0 )
+ {
+ TRACE_ERROR( "Error in MOT\n\r" ) ;
+ }
+ else
+ {
+ if ( ( dwMessageMode == CAN_MOT_RECEPT ) || ( dwMessageMode == CAN_MOT_RECEPT_OW ) || ( dwMessageMode == CAN_MOT_PRODUCER ) )
+ {
+ TRACE_DEBUG( "Mailbox is in RECEPTION\n\r" ) ;
+ TRACE_DEBUG( "Length 0x%X\n\r", (can_msr>>16)&0xF ) ;
+ TRACE_DEBUG( "CAN Mailbox ID 0x%X\n\r", (pCan->CAN_MB[dwMailbox].dwMid & CAN_MID_MIDvA_Msk) >> CAN_MID_MIDvA_Pos ) ;
+
+ /* Read CAN data */
+ pTransfer->data_low_reg = pCan->CAN_MB[dwMailbox].CAN_MDL ;
+ pTransfer->data_high_reg = pCan->CAN_MB[dwMailbox].CAN_MDH ;
+ pTransfer->size = (pCan->CAN_MB[dwMailbox].CAN_MSR&CAN_MSR_MDLC_Msk)>>CAN_MSR_MDLC_Pos ;
+ pTransfer->mailbox_number = dwMailbox ;
+ dwMid = pCan->CAN_MB[dwMailbox].CAN_MID ;
+ if( (dwMid & CAN_MID_MIDE) == CAN_MID_MIDE )
+ {
+ pTransfer->identifier = dwMid & CAN_MID_MIDvA_Msk & CAN_MID_MIDvB_Msk;
+ }
+ else
+ {
+ pTransfer->identifier = (dwMid & CAN_MID_MIDvA_Msk) >> 18 ;
+ }
+ ucState = CAN_IDLE ;
+
+ /* Message Data has been received */
+ pCan->CAN_MB[dwMailbox].CAN_MCR = CAN_MCR_MTCR ;
+ }
+ else
+ {
+ TRACE_DEBUG( "Mailbox is in TRANSMIT\n\r" ) ;
+ TRACE_DEBUG( "Length 0x%X\n\r", (can_msr>>16)&0xF ) ;
+ ucState = CAN_IDLE ;
+ }
+ }
+ }
+ }
+
+ pTransfer->state = ucState ;
+ }
+ }
+
+ if ( (dwStatus & 0xFFCF0000) != 0 )
+ {
+ CAN_ErrorHandling( pCan, dwStatus ) ;
+ }
+}
+
+/**
+ * Configure the corresponding mailbox
+ * \param pCan CAN peripheral
+ * \param pTransfer can transfer structure
+ */
+extern void CAN_InitMailboxRegisters( Can* pCan, SCanTransfer* pTransfer )
+{
+ CanMb* pCAN_Mailbox ;
+ uint32_t dwTemp;
+
+ pCAN_Mailbox = pCan->CAN_MB + pTransfer->mailbox_number ;
+
+ dwTemp = 1 << (pTransfer->mailbox_number) ;
+ pTransfer->mailbox_in_use |= dwTemp;
+
+ /* MailBox Control Register */
+ pCAN_Mailbox->CAN_MCR = 0x0 ;
+ /* MailBox Mode Register */
+ pCAN_Mailbox->CAN_MMR = 0x00 ;
+ /* CAN Message Acceptance Mask Register */
+ pCAN_Mailbox->CAN_MAM = pTransfer->acceptance_mask_reg ;
+
+ /* MailBox ID Register */
+ /* Disable the mailbox before writing to CAN_MIDx registers */
+ if( (pTransfer->identifier & CAN_MAM_MIDE) == CAN_MAM_MIDE )
+ {
+ /* Extended */
+ pCAN_Mailbox->CAN_MAM |= CAN_MAM_MIDE ;
+ }
+ else
+ {
+ pCAN_Mailbox->CAN_MAM &= ~CAN_MAM_MIDE ;
+ }
+ pCAN_Mailbox->CAN_MID = pTransfer->identifier;
+
+ /* MailBox Mode Register */
+ pCAN_Mailbox->CAN_MMR = pTransfer->mode_reg ;
+ /* MailBox Data Low Register */
+ pCAN_Mailbox->CAN_MDL = pTransfer->data_low_reg ;
+ /* MailBox Data High Register */
+ pCAN_Mailbox->CAN_MDH = pTransfer->data_high_reg ;
+ /* MailBox Control Register */
+ pCAN_Mailbox->CAN_MCR = pTransfer->control_reg ;
+}
+
+/**
+ * Reset the MBx
+ * \param pCan CAN peripheral
+ * \param pTransfer can transfer structure
+ */
+extern void CAN_ResetAllMailbox( Can* pCan, SCanTransfer* pTransfer)
+{
+ uint32_t dw ;
+
+ if ( pTransfer != NULL )
+ {
+ CAN_TransferReset( pCan, pTransfer ) ;
+
+ for ( dw = 0 ; dw < CAN_MB_NUMBER ; dw++ )
+ {
+ pTransfer->mailbox_number = dw ;
+ pTransfer->mode_reg = CAN_MMR_MOT_MB_DISABLED ;
+ pTransfer->acceptance_mask_reg = 0x00000000 ;
+ pTransfer->identifier = 0x00000000 ;
+ pTransfer->data_low_reg = 0x00000000 ;
+ pTransfer->data_high_reg = 0x00000000 ;
+ pTransfer->control_reg = 0x00000000 ;
+
+ CAN_InitMailboxRegisters( pCan, pTransfer ) ;
+ }
+ }
+}
+
+/**
+ * CAN reset Transfer descriptor
+ * \param pCan CAN peripheral
+ * \param pTransfer can transfer structure
+ */
+extern void CAN_TransferReset( Can* pCan, SCanTransfer* pTransfer )
+{
+ pCan = pCan; /* stop warning */
+
+ pTransfer->state = CAN_IDLE ;
+ pTransfer->mailbox_number = 0 ;
+ pTransfer->sync_can = 0 ;
+ pTransfer->mode_reg = 0 ;
+ pTransfer->acceptance_mask_reg = 0 ;
+ pTransfer->identifier = 0 ;
+ pTransfer->data_low_reg = 0x00000000 ;
+ pTransfer->data_high_reg = 0x00000000 ;
+ pTransfer->control_reg = 0x00000000 ;
+ pTransfer->mailbox_in_use = 0 ;
+ pTransfer->size = 0 ;
+}
+
+/**
+ * Wait for CAN synchronisation
+ * \param pCan CAN peripheral
+ * \param pTransfer can transfer structure
+ *
+ * \return 1 for good initialisation, otherwise 0
+ */
+
+static uint32_t CAN_Synchronisation( Can* pCan, SCanTransfer *pTransfer )
+{
+ uint32_t dwTick = 0 ;
+
+ TRACE_INFO( "CAN_Synchronisation\n\r" ) ;
+
+ pTransfer->sync_can = CAN_SYNC_NOK ;
+
+ /* Enable CAN and Wait for WakeUp Interrupt */
+ pCan->CAN_IER = CAN_IER_WAKEUP ;
+ /* CAN Controller Enable */
+ pCan->CAN_MR = CAN_MR_CANEN ;
+ /* Enable Autobaud/Listen mode */
+ /* dangerous, CAN not answer in this mode */
+
+ while( (pTransfer->sync_can != CAN_SYNC_OK) && (dwTick < CAN_TIMEOUT) )
+ {
+ dwTick++ ;
+ }
+
+ if ( dwTick == CAN_TIMEOUT )
+ {
+ TRACE_ERROR( "CAN Initialisations FAILED\n\r" ) ;
+ return 0 ;
+ }
+ else
+ {
+ TRACE_INFO( "CAN Initialisations Completed\n\r" ) ;
+ }
+
+ return 1 ;
+}
+
+/**
+ * Write a CAN transfer
+ * \param pCan CAN peripheral
+ * \param pTransfer can transfer structure
+ *
+ * \return return CAN_STATUS_SUCCESS if command passed, otherwise
+ * return CAN_STATUS_LOCKED
+ */
+extern uint32_t CAN_Write( Can* pCan, SCanTransfer *pTransfer )
+{
+ if ( pTransfer->state == CAN_RECEIVING )
+ {
+ pTransfer->state = CAN_IDLE ;
+ }
+
+ if ( pTransfer->state != CAN_IDLE )
+ {
+ return CAN_STATUS_LOCKED ;
+ }
+
+ TRACE_DEBUG( "CAN_Write\n\r" ) ;
+ pTransfer->state = CAN_SENDING ;
+
+ pCan->CAN_TCR = pTransfer->mailbox_in_use ;
+ pCan->CAN_IER = pTransfer->mailbox_in_use ;
+
+ return CAN_STATUS_SUCCESS ;
+}
+
+/**
+ * Read a CAN transfer
+ * \param pCan CAN peripheral
+ * \param pTransfer can transfer structure
+ *
+ * \return return CAN_STATUS_SUCCESS if command passed, otherwise
+ * return CAN_STATUS_LOCKED
+ */
+extern uint32_t CAN_Read( Can* pCan, SCanTransfer *pTransfer )
+{
+ if ( pTransfer->state != CAN_IDLE )
+ {
+ return CAN_STATUS_LOCKED ;
+ }
+
+ TRACE_DEBUG( "CAN_Read\n\r" ) ;
+ pTransfer->state = CAN_RECEIVING ;
+
+ /* Enable interrupt */
+ pCan->CAN_IER = pTransfer->mailbox_in_use ;
+
+ return CAN_STATUS_SUCCESS ;
+}
+
+/**
+ * Test if CAN is in IDLE state
+ *
+ * \param pTransfer can transfer structure
+ *
+ * \return return 0 if CAN is in IDLE, otherwise return 1
+ */
+extern uint32_t CAN_IsInIdle( Can* pCan, SCanTransfer* pTransfer )
+{
+ pCan = pCan; /* stop warning */
+ return ( pTransfer->state != CAN_IDLE ) ;
+}
+
+/**
+ * Disable CAN and enter in low power
+ */
+extern void CAN_Disable( Can* pCan )
+{
+ /* Disable the interrupt on the interrupt controller */
+ if ( pCan == CAN0 )
+ {
+ NVIC_DisableIRQ( CAN0_IRQn ) ;
+ }
+ else
+ {
+ NVIC_DisableIRQ( CAN1_IRQn ) ;
+ }
+
+ /* Disable all IT */
+ pCan->CAN_IDR = 0x1FFFFFFF ;
+
+ /* Enable Low Power mode */
+ pCan->CAN_MR |= CAN_MR_LPM ;
+
+ /* Disable the CAN controller peripheral clock */
+ if ( pCan == CAN0 )
+ {
+ PMC_DisablePeripheral( ID_CAN0 ) ;
+ }
+ else
+ {
+ PMC_DisablePeripheral( ID_CAN1 ) ;
+ }
+}
+
+/**
+ * Baudrate processing
+ *
+ * \param pCan CAN base address
+ * \param baudrate Baudrate value (kB/s)
+ * allowed values: 1000, 800, 500, 250, 125, 50, 25, 10
+ *
+ * \return return 1 in success, otherwise return 0
+ */
+static uint32_t CAN_BaudRateCalculate( Can* pCan, uint32_t dwMCK, uint32_t dwBaudrate )
+{
+ uint32_t BRP ;
+ uint32_t PROPAG ;
+ uint32_t PHASE1;
+ uint32_t PHASE2 ;
+ uint32_t SJW ;
+ uint32_t t1t2 ;
+ uint32_t dwTimeQuanta ;
+
+ pCan->CAN_BR = 0 ;
+
+ if ( dwBaudrate == 1000 )
+ {
+ dwTimeQuanta = 8 ;
+ }
+ else
+ {
+ dwTimeQuanta = 16 ;
+ }
+
+ BRP = (dwMCK / (dwBaudrate*1000*dwTimeQuanta))-1 ;
+ /*TRACE_DEBUG("BRP = 0x%X\n\r", BRP); */
+ /* timing Delay:
+ * Delay Bus Driver: 50 ns
+ * Delay Receiver: 30 ns
+ * Delay Bus Line (20m): 110 ns
+ */
+ if ( (dwTimeQuanta*dwBaudrate*2*(50+30+110)/1000000) >= 1 )
+ {
+ PROPAG = (dwTimeQuanta*dwBaudrate*2*(50+30+110)/1000000)-1 ;
+ }
+ else
+ {
+ PROPAG = 0 ;
+ }
+ /*TRACE_DEBUG("PROPAG = 0x%X\n\r", PROPAG); */
+
+ t1t2 = dwTimeQuanta-1-(PROPAG+1) ;
+ /*TRACE_DEBUG("t1t2 = 0x%X\n\r", t1t2); */
+
+ if ( (t1t2 & 0x01) == 0x01 )
+ {
+ /* ODD */
+ /*TRACE_DEBUG("ODD\n\r"); */
+ PHASE1 = ((t1t2-1)/2)-1 ;
+ PHASE2 = PHASE1+1 ;
+ }
+ else
+ {
+ /* EVEN */
+ /*TRACE_DEBUG("EVEN\n\r"); */
+ PHASE1 = (t1t2/2)-1 ;
+ PHASE2 = PHASE1 ;
+ }
+ /*TRACE_DEBUG("PHASE1 = 0x%X\n\r", PHASE1); */
+ /*TRACE_DEBUG("PHASE2 = 0x%X\n\r", PHASE2); */
+
+ if ( 1 > (4/(PHASE1+1)) )
+ {
+ /*TRACE_DEBUG("4*Tcsc\n\r"); */
+ SJW = 3 ;
+ }
+ else
+ {
+ /*TRACE_DEBUG("Tphs1\n\r"); */
+ SJW = PHASE1 ;
+ }
+ /*TRACE_DEBUG("SJW = 0x%X\n\r", SJW); */
+ /* Verif */
+ if ( BRP == 0 )
+ {
+ TRACE_DEBUG( "BRP = 0 is not authorized\n\r" ) ;
+
+ return 0 ;
+ }
+
+ if ( (PROPAG + PHASE1 + PHASE2) != (dwTimeQuanta-4) )
+ {
+ TRACE_DEBUG( "Pb (PROPAG + PHASE1 + PHASE2) = %d\n\r", PROPAG + PHASE1 + PHASE2 ) ;
+ TRACE_DEBUG( "with TimeQuanta-4 = %d\n\r", dwTimeQuanta-4 ) ;
+
+ return 0 ;
+ }
+
+ pCan->CAN_BR = CAN_BR_PHASE2( PHASE2 ) | CAN_BR_PHASE1( PHASE1 ) | CAN_BR_PROPAG( PROPAG ) | CAN_BR_SJW( SJW ) | CAN_BR_BRP( BRP ) ;
+
+ return 1 ;
+
+}
+
+/**
+ * Init of the CAN peripheral
+ * \param baudrate Baudrate value (kB/s)
+ * allowed values: 1000, 800, 500, 250, 125, 50, 25, 10
+ * \param canTransfer0 CAN0 structure transfer
+ * \param canTransfer1 CAN1 structure transfer
+ * \return return 1 if CAN has good baudrate and CAN is synchronized,
+ * otherwise return 0
+ */
+extern uint32_t CAN_Init( Can* pCan, uint32_t dwMCK, uint32_t dwBaudrate, SCanTransfer *pTransfer)
+{
+ /* Enable the CAN controller peripheral clock */
+ if ( pCan == CAN0 )
+ {
+ PMC_EnablePeripheral( ID_CAN0 ) ;
+ }
+ else
+ {
+ PMC_EnablePeripheral( ID_CAN1 ) ;
+ }
+
+ /* disable all IT */
+ pCan->CAN_IDR = 0x1FFFFFFF ;
+
+ /* Enable the interrupt on the interrupt controller */
+ NVIC_EnableIRQ( (pCan == CAN0) ? CAN0_IRQn : CAN1_IRQn ) ;
+
+ if ( CAN_BaudRateCalculate( pCan, dwMCK, dwBaudrate ) == 0 )
+ {
+ /* Baudrate problem */
+ TRACE_DEBUG( "Baudrate problem\r\n" ) ;
+
+ return 0 ;
+ }
+
+ CAN_ResetAllMailbox( pCan, pTransfer);
+
+ /* Enable the interrupt with all error cases */
+ pCan->CAN_IER = CAN_IER_CERR | /* (CAN) CRC Error */
+ CAN_IER_SERR | /* (CAN) Stuffing Error */
+ CAN_IER_BERR | /* (CAN) Bit Error */
+ CAN_IER_FERR | /* (CAN) Form Error */
+ CAN_IER_AERR ; /* (CAN) Acknowledgment Error */
+
+ /* Wait for CAN synchronisation */
+ if ( CAN_Synchronisation( pCan, pTransfer ) == 1 )
+ {
+ return 1u ;
+ }
+ else
+ {
+ return 0u ;
+ }
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/chipid.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/chipid.c
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/chipid.c
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/dacc.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/dacc.c
new file mode 100644
index 0000000..c45410f
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/dacc.c
@@ -0,0 +1,186 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/** \addtogroup dacc_module Working with DACC
+ * The DACC driver provides the interface to configure and use the DACC peripheral.\n
+ *
+ * The DACC(Digital-to-Analog Converter Controller) converts digital code to analog output.
+ * The data to be converted are sent in a common register for all channels. It offers up to 2
+ * analog outputs.The output voltage ranges from (1/6)ADVREF to (5/6)ADVREF.
+ *
+ * To Enable a DACC conversion,the user has to follow these few steps:
+ * <ul>
+ * <li> Select an appropriate reference voltage on ADVREF </li>
+ * <li> Configure the DACC according to its requirements and special needs,which could be
+ broken down into several parts:
+ * -# Enable DACC in free running mode by clearing TRGEN in DACC_MR;
+ * -# Configure Startup Time and Refresh Period through setting STARTUP and REFRESH fields
+ * in DACC_MR; The refresh mechanism is used to protect the output analog value from
+ * decreasing.
+ * -# Enable channels and write digital code to DACC_CDR,in free running mode, the conversion
+ * is started right after at least one channel is enabled and data is written .
+ </li>
+ * </ul>
+ *
+ * For more accurate information, please look at the DACC section of the
+ * Datasheet.
+ *
+ * Related files :\n
+ * \ref DACC.c\n
+ * \ref DACC.h\n
+*/
+/*@{*/
+/*@}*/
+/**
+ * \file
+ *
+ * Implementation of Digital-to-Analog Converter Controller (DACC).
+ *
+ */
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "chip.h"
+
+#include <stdint.h>
+#include <assert.h>
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Initialize the DACC controller
+ * \param pDACC Pointer to an DACC instance.
+ * \param idDACC identifier of DAC peripheral
+ * \param trgEn trigger mode, free running mode or external Hardware trigger
+ * \param word transfer size,word or half word
+ * \param trgSel hardware trigger selection
+ * \param sleepMode sleep mode selection
+ * \param mck value of MCK in Hz
+ * \param refresh refresh period
+ * \param user_sel user channel selection ,0 or 1
+ * \param tag_mode tag for channel number
+ * \param startup value of the start up time (in DACCClock) (see datasheet)
+*/
+extern void DACC_Initialize( Dacc* pDACC,
+ uint8_t idDACC,
+ uint8_t trgEn,
+ uint8_t trgSel,
+ uint8_t word,
+ uint8_t sleepMode,
+ uint32_t mck,
+ uint8_t refresh, /* refresh period */
+ uint8_t user_sel, /* user channel selection */
+ uint32_t tag_mode, /* using tag for channel number */
+ uint32_t startup
+ )
+{
+ assert( 1024*refresh*1000/(mck>>1) < 20 ) ;
+
+ /* mck is for future usage, remove warnings. */
+ mck = mck;
+
+ /* Enable peripheral clock*/
+ PMC_EnablePeripheral(idDACC);
+
+ /* Reset the controller */
+ DACC_SoftReset(pDACC);
+
+ /* Write to the MR register */
+ DACC_CfgModeReg( pDACC,
+ ( (trgEn<<0) & DACC_MR_TRGEN)
+ | DACC_MR_TRGSEL(trgSel)
+ | ( (word<<4) & DACC_MR_WORD)
+ | ( (sleepMode<<5) & DACC_MR_SLEEP)
+ | DACC_MR_REFRESH(refresh)
+ | ( (user_sel<<DACC_MR_USER_SEL_Pos)& DACC_MR_USER_SEL_Msk)
+ | ( (tag_mode<<20) & DACC_MR_TAG)
+ | ( (startup<<DACC_MR_STARTUP_Pos) & DACC_MR_STARTUP_Msk));
+}
+
+
+/**
+ * Set the Conversion Data
+ * \param pDACC Pointer to an Dacc instance.
+ * \param data date to be converted.
+ */
+extern void DACC_SetConversionData( Dacc* pDACC, uint32_t dwData )
+{
+ uint32_t dwMR = pDACC->DACC_MR ;
+
+ if ( dwMR & DACC_MR_WORD )
+ {
+ pDACC->DACC_CDR = dwData ;
+ }
+ else
+ {
+ pDACC->DACC_CDR = (dwData&0xFFFF) ;
+ }
+}
+
+
+/**
+ * \brief Write converted data through PDC channel
+ * \param pDACC the pointer of DACC peripheral
+ * \param pBuffer the destination buffer
+ * \param size the size of the buffer
+*/
+extern uint32_t DACC_WriteBuffer( Dacc* pDACC, uint16_t *pwBuffer, uint32_t dwSize )
+{
+
+ /* Check if the first PDC bank is free*/
+ if ( (pDACC->DACC_TCR == 0) && (pDACC->DACC_TNCR == 0) )
+ {
+ pDACC->DACC_TPR = (uint32_t)pwBuffer ;
+ pDACC->DACC_TCR = dwSize ;
+ pDACC->DACC_PTCR = DACC_PTCR_TXTEN ;
+
+ return 1 ;
+ }
+ /* Check if the second PDC bank is free*/
+ else
+ {
+ if (pDACC->DACC_TNCR == 0)
+ {
+ pDACC->DACC_TNPR = (uint32_t)pwBuffer ;
+ pDACC->DACC_TNCR = dwSize ;
+
+ return 1 ;
+ }
+ else
+ {
+ return 0 ;
+ }
+ }
+
+}
+
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/dmac.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/dmac.c
new file mode 100644
index 0000000..45e5318
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/dmac.c
@@ -0,0 +1,502 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2011, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * Implementation of DMA controller (DMAC).
+ *
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "chip.h"
+
+#include <stdint.h>
+#include <assert.h>
+/** \addtogroup dmac_functions DMAC Functions
+ *@{
+ */
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Configures an DMAC peripheral with modified round robin arbiter.
+ *
+ * \param pDmac Pointer to the DMAC peripheral.
+ */
+extern void DMAC_Modified_Arbiter( Dmac* pDmac )
+{
+ assert(pDmac);
+ pDmac->DMAC_GCFG = DMAC_GCFG_ARB_CFG ;
+}
+
+/**
+ * \brief Enables a DMAC peripheral.
+ *
+ * \param pDmac Pointer to the DMAC peripheral.
+ */
+extern void DMAC_Enable( Dmac* pDmac )
+{
+ assert(pDmac);
+ pDmac->DMAC_EN = DMAC_EN_ENABLE;
+}
+
+/**
+ * \brief Disables a DMAC peripheral.
+ *
+ * \param pDmac Pointer to the DMAC peripheral .
+ */
+extern void DMAC_Disable( Dmac* pDmac )
+{
+ assert(pDmac);
+ pDmac->DMAC_EN = ~(uint32_t)DMAC_EN_ENABLE;
+}
+
+/**
+ * \brief Enables DMAC interrupt.
+ *
+ * \param pDmac Pointer to the DMAC peripheral.
+ * \param dwInteruptMask IT to be enabled.
+ */
+extern void DMAC_EnableIt (Dmac* pDmac, uint32_t dwInteruptMask )
+{
+ assert(pDmac);
+ pDmac->DMAC_EBCIER = dwInteruptMask;
+}
+
+/**
+ * \brief Disables DMAC interrupt
+ *
+ * \param pDmac Pointer to the DMAC peripheral.
+ * \param dwInteruptMask IT to be enabled
+ */
+extern void DMAC_DisableIt (Dmac* pDmac, uint32_t dwInteruptMask )
+{
+ assert(pDmac);
+ pDmac->DMAC_EBCIDR = dwInteruptMask;
+}
+
+/**
+ * \brief Get DMAC Interrupt Mask Status.
+ *
+ * \param pDmac Pointer to the DMAC peripheral.
+ * \return DMAC Error, buffer transfer and chained buffer
+ * transfer interrupt mask register value.
+ */
+extern uint32_t DMAC_GetInterruptMask( Dmac* pDmac )
+{
+ assert(pDmac);
+ return (pDmac->DMAC_EBCIMR);
+}
+
+/**
+ * \brief Get DMAC Error, buffer transfer and chained buffer
+ * transfer status register.
+ *
+ * \param pDmac Pointer to the DMAC peripheral.
+ * \return DMAC Error, buffer transfer and chained buffer
+ * transfer status register.
+ */
+extern uint32_t DMAC_GetStatus( Dmac* pDmac )
+{
+ assert(pDmac);
+ return (pDmac->DMAC_EBCISR);
+}
+
+/**
+ * \brief Get DMAC Error, buffer transfer and chained buffer
+ * transfer status register of the given DMAC peripheral, but
+ * masking interrupt sources which are not currently enabled.
+ *
+ * \param pDmac Pointer to the DMAC peripheral.
+ * \return DMAC Error, buffer transfer and chained buffer
+ * transfer status register.
+ */
+extern uint32_t DMAC_GetMaskedStatus( Dmac* pDmac )
+{
+ uint32_t dwStatus;
+ assert(pDmac);
+ dwStatus = pDmac->DMAC_EBCISR;
+ dwStatus &= pDmac->DMAC_EBCIMR;
+ return dwStatus;
+}
+
+/**
+ * \brief enables the relevant channel of given DMAC.
+ *
+ * \param pDmac Pointer to the DMAC peripheral.
+ * \param ucChannel Particular channel number.
+ */
+extern void DMAC_EnableChannel( Dmac* pDmac, uint8_t ucChannel )
+{
+ assert(pDmac);
+ assert(ucChannel < DMAC_CHANNEL_NUM);
+ pDmac->DMAC_CHER |= DMAC_CHER_ENA0 << ucChannel;
+}
+
+/**
+ * \brief enables the relevant channels of given DMAC.
+ *
+ * \param pDmac Pointer to the DMAC peripheral.
+ * \param ucChannel Channels bitmap.
+ */
+extern void DMAC_EnableChannels( Dmac* pDmac, uint8_t ucChannel )
+{
+ assert(pDmac);
+ pDmac->DMAC_CHER = ucChannel;
+}
+
+/**
+ * \brief Disables the relevant channel of given DMAC.
+ *
+ * \param pDmac Pointer to the DMAC peripheral.
+ * \param ucChannel Particular channel number.
+ */
+extern void DMAC_DisableChannel( Dmac* pDmac, uint8_t ucChannel )
+{
+ assert(pDmac);
+ assert(ucChannel < DMAC_CHANNEL_NUM);
+ pDmac->DMAC_CHDR |= DMAC_CHDR_DIS0 << ucChannel;
+}
+
+/**
+ * \brief Disables the relevant channels of given DMAC.
+ *
+ * \param pDmac Pointer to the DMAC peripheral.
+ * \param ucChannel Channels bitmap.
+ */
+extern void DMAC_DisableChannels( Dmac* pDmac, uint8_t ucChannel )
+{
+ assert(pDmac);
+ pDmac->DMAC_CHDR = ucChannel;
+}
+
+/**
+ * \brief freezes the relevant channel of given DMAC.
+ *
+ * \param pDmac Pointer to the DMAC peripheral.
+ * \param ucChannel Particular channel number.
+ */
+extern void DMAC_SuspendChannel( Dmac* pDmac, uint8_t ucChannel )
+{
+ assert(pDmac);
+ assert(ucChannel < DMAC_CHANNEL_NUM);
+ pDmac->DMAC_CHER |= DMAC_CHER_SUSP0 << ucChannel;
+}
+
+/**
+ * \brief resumes the current channel from an automatic
+ * stall state of given DMAC.
+ *
+ * \param pDmac Pointer to the DMAC peripheral.
+ * \param ucChannel Particular channel number.
+ */
+extern void DMAC_KeepChannel( Dmac* pDmac, uint8_t ucChannel )
+{
+ assert(pDmac);
+ assert(ucChannel < DMAC_CHANNEL_NUM);
+ pDmac->DMAC_CHER |= DMAC_CHER_KEEP0 << ucChannel;
+}
+
+/**
+ * \brief resume the channel transfer restoring its context.
+ *
+ * \param pDmac Pointer to the DMAC peripheral.
+ * \param ucChannel Particular channel number.
+ */
+extern void DMAC_RestoreChannel( Dmac* pDmac, uint8_t ucChannel )
+{
+ assert(pDmac);
+ assert(ucChannel < DMAC_CHANNEL_NUM);
+ pDmac->DMAC_CHDR |= DMAC_CHDR_RES0 << ucChannel;
+}
+
+/**
+ * \brief Get DMAC channel handler Status.
+ *
+ * \param pDmac Pointer to the DMAC peripheral.
+ * \return DMAC channel handler status register.
+ */
+extern uint32_t DMAC_GetChannelStatus( Dmac* pDmac )
+{
+ assert(pDmac);
+ return (pDmac->DMAC_CHSR);
+}
+
+/**
+ * \brief Set DMAC source address in a DMAC channel.
+ *
+ * \param pDmac Pointer to the DMAC peripheral.
+ * \param ucChannel Particular channel number.
+ * \param dwSaddr sources address.
+ * \note This register must be aligned with the source transfer width.
+ */
+extern void DMAC_SetSourceAddr( Dmac* pDmac,
+ uint8_t ucChannel,
+ uint32_t dwSaddr )
+{
+ assert(pDmac);
+ assert(ucChannel < DMAC_CHANNEL_NUM);
+ pDmac->DMAC_CH_NUM[ucChannel].DMAC_SADDR = dwSaddr;
+}
+
+/**
+ * \brief Return DMAC source address of a DMAC channel.
+ *
+ * \param pDmac Pointer to the DMAC peripheral.
+ * \param ucChannel Particular channel number.
+ */
+extern uint32_t DMAC_GetSourceAddr( Dmac* pDmac,
+ uint8_t ucChannel )
+{
+ assert(pDmac);
+ assert(ucChannel < DMAC_CHANNEL_NUM);
+ return pDmac->DMAC_CH_NUM[ucChannel].DMAC_SADDR;
+}
+
+/**
+ * \brief Set DMAC destination address in a DMAC channel.
+ *
+ * \param pDmac Pointer to the DMAC peripheral.
+ * \param ucChannel Particular channel number.
+ * \param dwDaddr sources address.
+ * \note This register must be aligned with the source transfer width.
+ */
+extern void DMAC_SetDestinationAddr( Dmac* pDmac,
+ uint8_t ucChannel,
+ uint32_t dwDaddr )
+{
+ assert(pDmac);
+ assert(ucChannel < DMAC_CHANNEL_NUM);
+ pDmac->DMAC_CH_NUM[ucChannel].DMAC_DADDR = dwDaddr;
+}
+
+/**
+ * \brief Return DMAC destination address of a DMAC channel.
+ *
+ * \param pDmac Pointer to the DMAC peripheral.
+ * \param ucChannel Particular channel number.
+ */
+extern uint32_t DMAC_GetDestinationAddr( Dmac* pDmac,
+ uint8_t ucChannel )
+{
+ assert(pDmac);
+ assert(ucChannel < DMAC_CHANNEL_NUM);
+ return pDmac->DMAC_CH_NUM[ucChannel].DMAC_DADDR;
+}
+
+/**
+ * \brief Set DMAC descriptor address used by a DMAC channel.
+ *
+ * \param pDmac Pointer to the DMAC peripheral.
+ * \param ucChannel Particular channel number.
+ * \param dwDescr Buffer Transfer descriptor address
+ * \param ucDescrif AHB-Lite interface to be fetched
+ */
+extern void DMAC_SetDescriptorAddr( Dmac* pDmac,
+ uint8_t ucChannel,
+ uint32_t dwDescr,
+ uint8_t ucDescrif )
+{
+ assert(pDmac);
+ assert(ucChannel < DMAC_CHANNEL_NUM);
+ assert(ucDescrif < 2);
+ pDmac->DMAC_CH_NUM[ucChannel].DMAC_DSCR = ( dwDescr & 0xFFFFFFFC ) | ucDescrif;
+}
+
+/**
+ * \brief Set DMAC controlA used by a DMAC channel.
+ *
+ * \param pDmac Pointer to the DMAC peripheral.
+ * \param ucChannel Particular channel number.
+ * \param dwControlA Configuration for controlA register.
+ */
+extern void DMAC_SetControlA( Dmac* pDmac,
+ uint8_t ucChannel,
+ uint32_t dwControlA )
+{
+ assert(pDmac);
+ assert(ucChannel < DMAC_CHANNEL_NUM);
+ pDmac->DMAC_CH_NUM[ucChannel].DMAC_CTRLA = dwControlA;
+}
+
+
+/**
+ * \brief Set DMAC buffer transfer size used by a DMAC channel.
+ *
+ * \param pDmac Pointer to the DMAC peripheral.
+ * \param ucChannel Particular channel number.
+ * \param uwBuffsize number of transfers to be performed.
+ */
+extern void DMAC_SetBufferSize( Dmac* pDmac,
+ uint8_t ucChannel,
+ uint16_t uwBuffsize)
+{
+ assert(pDmac);
+ assert(ucChannel < DMAC_CHANNEL_NUM);
+ pDmac->DMAC_CH_NUM[ucChannel].DMAC_CTRLA &= ~DMAC_CTRLA_BTSIZE_Msk;
+ pDmac->DMAC_CH_NUM[ucChannel].DMAC_CTRLA |= DMAC_CTRLA_BTSIZE( uwBuffsize );
+}
+
+/**
+ * \brief Set DMAC single transfer size used by a DMAC channel.
+ *
+ * \param pDmac Pointer to the DMAC peripheral.
+ * \param ucChannel Particular channel number.
+ * \param ucSrcWidth source width for single transfer.
+ * \param ucDstWidth destination width for single transfer.
+ */
+extern void DMAC_SetSingleTransferSize ( Dmac* pDmac,
+ uint8_t ucChannel,
+ uint8_t ucSrcWidth,
+ uint8_t ucDstWidth )
+{
+ assert(pDmac);
+ assert(ucChannel < DMAC_CHANNEL_NUM);
+ pDmac->DMAC_CH_NUM[ucChannel].DMAC_CTRLA &= ~DMAC_CTRLA_SRC_WIDTH_Msk;
+ pDmac->DMAC_CH_NUM[ucChannel].DMAC_CTRLA &= ~DMAC_CTRLA_DST_WIDTH_Msk;
+ pDmac->DMAC_CH_NUM[ucChannel].DMAC_CTRLA |= ucSrcWidth | ucDstWidth;
+}
+
+/**
+ * \brief Set DMAC single transfer size used by a DMAC channel.
+ *
+ * \param pDmac Pointer to the DMAC peripheral.
+ * \param ucChannel Particular channel number.
+ * \param ucScSize Size of source chunk transfer.
+ * \param ucDcSize Size of destination chunk transfer.
+ */
+extern void DMAC_SetChunkTransferSize ( Dmac* pDmac,
+ uint8_t ucChannel,
+ uint8_t ucScSize,
+ uint8_t ucDcSize)
+{
+ assert(pDmac);
+ assert(ucChannel < DMAC_CHANNEL_NUM);
+ pDmac->DMAC_CH_NUM[ucChannel].DMAC_CTRLA &= ~DMAC_CTRLA_SCSIZE_Msk;
+ pDmac->DMAC_CH_NUM[ucChannel].DMAC_CTRLA &= ~DMAC_CTRLA_DCSIZE_Msk;
+ pDmac->DMAC_CH_NUM[ucChannel].DMAC_CTRLA |= ucScSize | ucDcSize;
+}
+
+/**
+ * \brief Set DMAC controlB used by a DMAC channel.
+ *
+ * \param pDmac Pointer to the DMAC peripheral.
+ * \param ucChannel Particular channel number.
+ * \param dwControlB Configuration for controlB register.
+ */
+extern void DMAC_SetControlB( Dmac* pDmac,
+ uint8_t ucChannel,
+ uint32_t dwControlB )
+{
+ assert(pDmac);
+ assert(ucChannel < DMAC_CHANNEL_NUM);
+ pDmac->DMAC_CH_NUM[ucChannel].DMAC_CTRLB = dwControlB;
+}
+
+/**
+ * \brief Set DMAC buffer descriptor fetch mode.
+ *
+ * \param pDmac Pointer to the DMAC peripheral.
+ * \param ucChannel Particular channel number.
+ * \param ucSrcDscr Source buffer descriptor fetch mode.
+ * \param ucDstDscr destination buffer descriptor fetch mode.
+ */
+extern void DMAC_SetDescFetchMode( Dmac* pDmac,
+ uint8_t ucChannel,
+ uint8_t ucSrcDscr,
+ uint8_t ucDstDscr )
+{
+ assert(pDmac);
+ assert(ucChannel < DMAC_CHANNEL_NUM );
+ pDmac->DMAC_CH_NUM[ucChannel].DMAC_CTRLB &= ~DMAC_CTRLB_SRC_DSCR;
+ pDmac->DMAC_CH_NUM[ucChannel].DMAC_CTRLB &= ~DMAC_CTRLB_DST_DSCR;
+ pDmac->DMAC_CH_NUM[ucChannel].DMAC_CTRLB |= ucSrcDscr | ucDstDscr;
+}
+
+/**
+ * \brief Set DMAC control B register Flow control bit field.
+ *
+ * \param pDmac Pointer to the DMAC peripheral.
+ * \param ucChannel Particular channel number.
+ * \param ucFlowControl Flow which device controls the size of the buffer transfer.
+ */
+extern void DMAC_SetFlowControl( Dmac* pDmac,
+ uint8_t ucChannel,
+ uint8_t ucFlowControl )
+{
+ assert(pDmac);
+ assert(ucChannel < DMAC_CHANNEL_NUM);
+ pDmac->DMAC_CH_NUM[ucChannel].DMAC_CTRLB &= ~DMAC_CTRLB_FC_Msk;
+ pDmac->DMAC_CH_NUM[ucChannel].DMAC_CTRLB |= ucFlowControl;
+}
+
+/**
+ * \brief Set DMAC CFG register used by a DMAC channel.
+ *
+ * \param pDmac Pointer to the DMAC peripheral.
+ * \param ucChannel Particular channel number.
+ * \param dwConfiguration Configuration for CFG register.
+ */
+extern void DMAC_SetCFG( Dmac* pDmac,
+ uint8_t ucChannel,
+ uint32_t dwConfiguration )
+{
+ assert(pDmac);
+ assert(ucChannel < DMAC_CHANNEL_NUM);
+ pDmac->DMAC_CH_NUM[ucChannel].DMAC_CFG = dwConfiguration;
+}
+
+/**
+ * \brief Set DMAC SW/HW handshaking interface used to
+ * trigger a transfer request.
+ *
+ * \param pDmac Pointer to the DMAC peripheral.
+ * \param channel Particular channel number.
+ * \param srcH2sel Source handshaking interface.
+ * \param dstH2sel Destination handshaking interface.
+ */
+extern void DMAC_SethandshakeInterface( Dmac* pDmac,
+ uint8_t ucChannel,
+ uint8_t ucSrcH2sel,
+ uint8_t ucDstH2sel )
+{
+ assert(pDmac);
+ assert(ucChannel < DMAC_CHANNEL_NUM );
+ pDmac->DMAC_CH_NUM[ucChannel].DMAC_CFG &= ~DMAC_CFG_SRC_H2SEL;
+ pDmac->DMAC_CH_NUM[ucChannel].DMAC_CFG &= ~DMAC_CFG_DST_H2SEL;
+ pDmac->DMAC_CH_NUM[ucChannel].DMAC_CFG |= ucSrcH2sel | ucDstH2sel;
+}
+/**@}*/
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/eefc.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/eefc.c
new file mode 100644
index 0000000..bf109a2
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/eefc.c
@@ -0,0 +1,306 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/** \addtogroup efc_module Working with EEFC
+ * The EEFC driver provides the interface to configure and use the EEFC
+ * peripheral.
+ *
+ * The user needs to set the number of wait states depending on the frequency used.\n
+ * Configure number of cycles for flash read/write operations in the FWS field of EEFC_FMR.
+ *
+ * It offers a function to send flash command to EEFC and waits for the
+ * flash to be ready.
+ *
+ * To send flash command, the user could do in either of following way:
+ * <ul>
+ * <li>Write a correct key, command and argument in EEFC_FCR. </li>
+ * <li>Or, Use IAP (In Application Programming) function which is executed from
+ * ROM directly, this allows flash programming to be done by code running in flash.</li>
+ * <li>Once the command is achieved, it can be detected even by polling EEFC_FSR or interrupt.
+ * </ul>
+ *
+ * The command argument could be a page number,GPNVM number or nothing, it depends on
+ * the command itself. Some useful functions in this driver could help user tranlate physical
+ * flash address into a page number and vice verse.
+ *
+ * For more accurate information, please look at the EEFC section of the
+ * Datasheet.
+ *
+ * Related files :\n
+ * \ref efc.c\n
+ * \ref efc.h.\n
+*/
+/*@{*/
+/*@}*/
+
+
+/**
+ * \file
+ *
+ * Implementation of Enhanced Embedded Flash Controller (EEFC).
+ *
+ */
+
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+#include "chip.h"
+
+#include <assert.h>
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Enables the flash ready interrupt source on the EEFC peripheral.
+ *
+ * \param efc Pointer to a Efc instance
+ */
+extern void EFC_EnableFrdyIt( Efc* efc )
+{
+ efc->EEFC_FMR |= EEFC_FMR_FRDY ;
+}
+
+/**
+ * \brief Disables the flash ready interrupt source on the EEFC peripheral.
+ *
+ * \param efc Pointer to a Efc instance
+ */
+
+extern void EFC_DisableFrdyIt( Efc* efc )
+{
+ efc->EEFC_FMR &= ~((uint32_t)EEFC_FMR_FRDY) ;
+}
+
+
+/**
+ * \brief Set read/write wait state on the EEFC perpherial.
+ *
+ * \param efc Pointer to a Efc instance
+ * \param cycles the number of wait states in cycle.
+ */
+
+extern void EFC_SetWaitState( Efc* efc, uint8_t ucCycles )
+{
+ uint32_t dwValue ;
+
+ dwValue = efc->EEFC_FMR ;
+ dwValue &= ~((uint32_t)EEFC_FMR_FWS_Msk) ;
+ dwValue |= EEFC_FMR_FWS(ucCycles);
+ efc->EEFC_FMR = dwValue ;
+}
+
+/**
+ * \brief Returns the current status of the EEFC.
+ *
+ * \note Keep in mind that this function clears the value of some status bits (LOCKE, PROGE).
+ *
+ * \param efc Pointer to a Efc instance
+ */
+extern uint32_t EFC_GetStatus( Efc* efc )
+{
+ return efc->EEFC_FSR ;
+}
+
+/**
+ * \brief Returns the result of the last executed command.
+ *
+ * \param efc Pointer to a Efc instance
+ */
+extern uint32_t EFC_GetResult( Efc* efc )
+{
+ return efc->EEFC_FRR ;
+}
+
+/**
+ * \brief Translates the given address page and offset values.
+ * \note The resulting values are stored in the provided variables if they are not null.
+ *
+ * \param efc Pointer to a Efc instance
+ * \param address Address to translate.
+ * \param pPage First page accessed.
+ * \param pOffset Byte offset in first page.
+ */
+extern void EFC_TranslateAddress( Efc** ppEfc, uint32_t dwAddress, uint16_t* pwPage, uint16_t* pwOffset )
+{
+ assert( dwAddress >= IFLASH0_ADDR ) ;
+ assert( dwAddress <= (IFLASH0_ADDR + IFLASH_SIZE) ) ;
+
+ /* Store values */
+ if ( ppEfc )
+ {
+ *ppEfc = (dwAddress < (IFLASH0_ADDR + IFLASH_SIZE/2)) ? EFC0 : EFC1;
+ }
+
+ if ( pwPage )
+ {
+ *pwPage = (dwAddress < (IFLASH0_ADDR + IFLASH_SIZE/2)) ?
+ (dwAddress - IFLASH0_ADDR) / IFLASH_PAGE_SIZE:
+ (dwAddress - (IFLASH0_ADDR + IFLASH_SIZE/2)) / IFLASH_PAGE_SIZE;
+ }
+
+ if ( pwOffset )
+ {
+ *pwOffset = (dwAddress < (IFLASH0_ADDR + IFLASH_SIZE/2)) ?
+ ((dwAddress - IFLASH0_ADDR) % IFLASH_PAGE_SIZE) :
+ (dwAddress - (IFLASH0_ADDR + IFLASH_SIZE/2)) % IFLASH_PAGE_SIZE;
+ }
+}
+
+/**
+ * \brief Computes the address of a flash access given the page and offset.
+ *
+ * \param efc Pointer to a Efc instance
+ * \param page Page number.
+ * \param offset Byte offset inside page.
+ * \param pAddress Computed address (optional).
+ */
+extern void EFC_ComputeAddress( Efc *efc, uint16_t wPage, uint16_t wOffset, uint32_t *pdwAddress )
+{
+ uint32_t dwAddress ;
+
+ assert( efc ) ;
+
+ /* Compute address */
+ dwAddress = (efc == EFC0) ?
+ IFLASH0_ADDR + wPage * IFLASH_PAGE_SIZE + wOffset :
+ IFLASH1_ADDR + wPage * IFLASH_PAGE_SIZE + wOffset;
+
+ /* Store result */
+ if ( pdwAddress != NULL )
+ {
+ *pdwAddress = dwAddress ;
+ }
+}
+
+/**
+ * \brief Starts the executing the given command on the EEFC and returns as soon as the command is started.
+ *
+ * \note It does NOT set the FMCN field automatically.
+ * \param efc Pointer to a Efc instance
+ * \param command Command to execute.
+ * \param argument Command argument (should be 0 if not used).
+ */
+extern void EFC_StartCommand( Efc* efc, uint32_t dwCommand, uint32_t dwArgument )
+{
+ /* Check command & argument */
+ switch ( dwCommand )
+ {
+ case EFC_FCMD_WP:
+ case EFC_FCMD_WPL:
+ case EFC_FCMD_EWP:
+ case EFC_FCMD_EWPL:
+ case EFC_FCMD_SLB:
+ case EFC_FCMD_CLB:
+ assert( dwArgument < IFLASH_NB_OF_PAGES ) ;
+ break ;
+
+ case EFC_FCMD_SFB:
+ case EFC_FCMD_CFB:
+ assert( dwArgument < 2 ) ;
+ break;
+
+ case EFC_FCMD_GETD:
+ case EFC_FCMD_EA:
+ case EFC_FCMD_GLB:
+ case EFC_FCMD_GFB:
+ case EFC_FCMD_STUI:
+ assert( dwArgument == 0 ) ;
+ break;
+
+ default: assert( 0 ) ;
+ }
+
+ /* Start command Embedded flash */
+ assert( (efc->EEFC_FSR & EEFC_FMR_FRDY) == EEFC_FMR_FRDY ) ;
+ efc->EEFC_FCR = EEFC_FCR_FKEY(0x5A) | EEFC_FCR_FARG(dwArgument) | EEFC_FCR_FCMD(dwCommand) ;
+}
+
+/**
+ * \brief Performs the given command and wait until its completion (or an error).
+ *
+ * \param efc Pointer to a Efc instance
+ * \param command Command to perform.
+ * \param argument Optional command argument.
+ *
+ * \return 0 if successful, otherwise returns an error code.
+ */
+
+extern uint32_t EFC_PerformCommand( Efc* efc, uint32_t dwCommand, uint32_t dwArgument, uint32_t dwUseIAP )
+{
+ if ( dwUseIAP != 0 )
+ {
+ /* Pointer on IAP function in ROM */
+ static uint32_t (*IAP_PerformCommand)( uint32_t, uint32_t ) ;
+
+ IAP_PerformCommand = (uint32_t (*)( uint32_t, uint32_t )) *((uint32_t*)CHIP_FLASH_IAP_ADDRESS ) ;
+
+ if (efc == EFC0)
+ { /* Flash0 */
+ IAP_PerformCommand( 0, EEFC_FCR_FKEY(0x5A) | EEFC_FCR_FARG(dwArgument) | EEFC_FCR_FCMD(dwCommand) ) ;
+ }
+ else
+ { /* Flash1 */
+ IAP_PerformCommand( 1, EEFC_FCR_FKEY(0x5A) | EEFC_FCR_FARG(dwArgument) | EEFC_FCR_FCMD(dwCommand) ) ;
+ }
+
+ return (efc->EEFC_FSR & (EEFC_FSR_FLOCKE | EEFC_FSR_FCMDE)) ;
+ }
+ else
+ {
+ uint32_t dwStatus ;
+
+ efc->EEFC_FCR = EEFC_FCR_FKEY(0x5A) | EEFC_FCR_FARG(dwArgument) | EEFC_FCR_FCMD(dwCommand) ;
+ do
+ {
+ dwStatus = efc->EEFC_FSR ;
+ }
+ while ( (dwStatus & EEFC_FSR_FRDY) != EEFC_FSR_FRDY ) ;
+
+ return ( dwStatus & (EEFC_FSR_FLOCKE | EEFC_FSR_FCMDE) ) ;
+ }
+}
+
+/**
+ * \brief Set flash access mode.
+ *
+ * \param dwMode - 0:128-bit, (1<<24):64-bit
+ */
+#ifdef __ICCARM__
+extern __ramfunc void EFC_SetFlashAccessMode(Efc* efc, uint32_t dwMode)
+#else
+__attribute__ ((section (".ramfunc")))
+extern void EFC_SetFlashAccessMode(Efc* efc, uint32_t dwMode)
+#endif
+{
+ efc->EEFC_FMR = (efc->EEFC_FMR & ~EEFC_FMR_FAM) | dwMode;
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/emac.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/emac.c
new file mode 100644
index 0000000..20256a5
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/emac.c
@@ -0,0 +1,567 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+
+/** \file */
+
+/** \addtogroup emac_functions
+ *@{
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "chip.h"
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * Write network control value
+ */
+void EMAC_NetworkControl(Emac *pEmac, uint32_t bmNCR)
+{
+ pEmac->EMAC_NCR = bmNCR;
+}
+
+/**
+ * Get network control value
+ */
+
+uint32_t EMAC_GetNetworkControl(Emac *pEmac)
+{
+ return pEmac->EMAC_NCR;
+}
+
+/**
+ * Enable/Disable EMAC receive.
+ */
+void EMAC_ReceiveEnable(Emac* pEmac, uint8_t bEnaDis)
+{
+ if (bEnaDis) pEmac->EMAC_NCR |= EMAC_NCR_RE;
+ else pEmac->EMAC_NCR &= ~EMAC_NCR_RE;
+}
+
+/**
+ * Enable/Disable EMAC transmit.
+ */
+void EMAC_TransmitEnable(Emac *pEmac, uint8_t bEnaDis)
+{
+ if (bEnaDis) pEmac->EMAC_NCR |= EMAC_NCR_TE;
+ else pEmac->EMAC_NCR &= ~EMAC_NCR_TE;
+}
+
+/**
+ * Enable/Disable EMAC management.
+ */
+void EMAC_ManagementEnable(Emac *pEmac, uint8_t bEnaDis)
+{
+ if (bEnaDis) pEmac->EMAC_NCR |= EMAC_NCR_MPE;
+ else pEmac->EMAC_NCR &= ~EMAC_NCR_MPE;
+}
+
+/**
+ * Clear all statistics registers
+ */
+void EMAC_ClearStatistics(Emac *pEmac)
+{
+ pEmac->EMAC_NCR |= EMAC_NCR_CLRSTAT;
+}
+
+/**
+ * Increase all statistics registers
+ */
+void EMAC_IncreaseStatistics(Emac *pEmac)
+{
+ pEmac->EMAC_NCR |= EMAC_NCR_INCSTAT;
+}
+
+/**
+ * Enable/Disable statistics registers writing.
+ */
+void EMAC_StatisticsWriteEnable(Emac *pEmac, uint8_t bEnaDis)
+{
+ if (bEnaDis) pEmac->EMAC_NCR |= EMAC_NCR_WESTAT;
+ else pEmac->EMAC_NCR &= ~EMAC_NCR_WESTAT;
+}
+
+/**
+ * In half-duplex mode, forces collisions on all received frames.
+ */
+void EMAC_BackPressureEnable(Emac *pEmac, uint8_t bEnaDis)
+{
+ if (bEnaDis) pEmac->EMAC_NCR |= EMAC_NCR_BP;
+ else pEmac->EMAC_NCR &= ~EMAC_NCR_BP;
+}
+
+/**
+ * Start transmission
+ */
+void EMAC_TransmissionStart(Emac *pEmac)
+{
+ pEmac->EMAC_NCR |= EMAC_NCR_TSTART;
+}
+
+/**
+ * Halt transmission
+ */
+void EMAC_TransmissionHalt(Emac *pEmac)
+{
+ pEmac->EMAC_NCR |= EMAC_NCR_THALT;
+}
+
+/**
+ * Setup network configuration register
+ */
+void EMAC_Configure(Emac *pEmac, uint32_t dwCfg)
+{
+ pEmac->EMAC_NCFGR = dwCfg;
+}
+
+/**
+ * Return network configuration.
+ */
+uint32_t EMAC_GetConfigure(Emac *pEmac)
+{
+ return pEmac->EMAC_NCFGR;
+}
+
+/**
+ * Set speed.
+ * \param bSpeed 1 to indicate 100Mbps, 0 for 10Mbps.
+ */
+void EMAC_SetSpeed(Emac *pEmac, uint8_t bSpeed)
+{
+ if (bSpeed) pEmac->EMAC_NCFGR |= EMAC_NCFGR_SPD;
+ else pEmac->EMAC_NCFGR &= ~EMAC_NCFGR_SPD;
+}
+
+/**
+ * Enable/Disable Full-Duplex mode
+ */
+void EMAC_FullDuplexEnable(Emac *pEmac, uint8_t bFD)
+{
+ if (bFD) pEmac->EMAC_NCFGR |= EMAC_NCFGR_FD;
+ else pEmac->EMAC_NCFGR &= ~EMAC_NCFGR_FD;
+}
+
+/**
+ * Enable/Disable Copy(Receive) All Valid Frames
+ */
+void EMAC_CpyAllEnable(Emac *pEmac, uint8_t bCAF)
+{
+ if (bCAF) pEmac->EMAC_NCFGR |= EMAC_NCFGR_CAF;
+ else pEmac->EMAC_NCFGR &= ~EMAC_NCFGR_CAF;
+}
+
+/**
+ * Enable/Disable jumbo frames (up to 10240 bytes).
+ */
+void EMAC_JumboFrameEnable(Emac *pEmac, uint8_t bEnaDis)
+{
+ if (bEnaDis) pEmac->EMAC_NCFGR |= EMAC_NCFGR_JFRAME;
+ else pEmac->EMAC_NCFGR &= ~EMAC_NCFGR_JFRAME;
+}
+
+/**
+ * Disable/Enable broadcase receiving.
+ */
+void EMAC_BroadcastDisable(Emac *pEmac, uint8_t bDisEna)
+{
+ if (bDisEna) pEmac->EMAC_NCFGR |= EMAC_NCFGR_NBC;
+ else pEmac->EMAC_NCFGR &= ~EMAC_NCFGR_NBC;
+}
+
+/**
+ * Enable/Disable multicast hash
+ */
+void EMAC_MulticastHashEnable(Emac *pEmac, uint8_t bEnaDis)
+{
+ if (bEnaDis) pEmac->EMAC_NCFGR |= EMAC_NCFGR_UNI;
+ else pEmac->EMAC_NCFGR &= ~EMAC_NCFGR_UNI;
+}
+
+/**
+ * Enable/Disable big frames (over 1518, up to 1536)
+ */
+void EMAC_BigFrameEnable(Emac *pEmac, uint8_t bEnaDis)
+{
+ if (bEnaDis) pEmac->EMAC_NCFGR |= EMAC_NCFGR_BIG;
+ else pEmac->EMAC_NCFGR &= ~EMAC_NCFGR_BIG;
+}
+
+/**
+ * Set MDC clock divider
+ * \return 1 if success.
+ */
+uint8_t EMAC_SetClock(Emac *pEmac, uint32_t dwMck)
+{
+ uint32_t dwClk;
+
+ /* Not supported */
+ if (dwMck > 160*1000*1000)
+ {
+ return 0;
+ }
+ else if (dwMck > 80*1000*1000)
+ {
+ dwClk = EMAC_NCFGR_CLK_MCK_64;
+ }
+ else if (dwMck > 40*1000*1000)
+ {
+ dwClk = EMAC_NCFGR_CLK_MCK_32;
+ }
+ else if (dwMck > 20*1000*1000)
+ {
+ dwClk = EMAC_NCFGR_CLK_MCK_16;
+ }
+ else
+ {
+ dwClk = EMAC_NCFGR_CLK_MCK_8;
+ }
+
+ pEmac->EMAC_NCFGR &= ~EMAC_NCFGR_CLK_Msk;
+ pEmac->EMAC_NCFGR |= dwClk;
+
+ return 1;
+}
+
+/**
+ * Enable/Disable retry test
+ */
+void EMAC_RetryTestEnable(Emac *pEmac, uint8_t bEnaDis)
+{
+ if (bEnaDis) pEmac->EMAC_NCFGR |= EMAC_NCFGR_RTY;
+ else pEmac->EMAC_NCFGR &= ~EMAC_NCFGR_RTY;
+}
+
+/**
+ * Enable/Disable pause (when a valid pause frame received).
+ */
+void EMAC_PauseFrameEnable(Emac *pEmac, uint8_t bEnaDis)
+{
+ if (bEnaDis) pEmac->EMAC_NCFGR |= EMAC_NCFGR_PAE;
+ else pEmac->EMAC_NCFGR &= ~EMAC_NCFGR_PAE;
+}
+
+/**
+ * Set receive buffer offset to 0 ~ 3.
+ */
+void EMAC_SetRxBufferOffset(Emac *pEmac, uint8_t bOffset)
+{
+ pEmac->EMAC_NCFGR &= ~EMAC_NCFGR_RBOF_Msk;
+ pEmac->EMAC_NCFGR |= (EMAC_NCFGR_RBOF_Msk & ((bOffset) << EMAC_NCFGR_RBOF_Pos));
+}
+
+/**
+ * Enable/Disable receive length field checking
+ */
+void EMAC_RxLenthCheckEnable(Emac *pEmac, uint8_t bEnaDis)
+{
+ if (bEnaDis) pEmac->EMAC_NCFGR |= EMAC_NCFGR_RLCE;
+ else pEmac->EMAC_NCFGR &= ~EMAC_NCFGR_RLCE;
+}
+
+/**
+ * Enable/Disable discarding FCS field of received frames.
+ */
+void EMAC_DiscardFCSEnable(Emac *pEmac, uint8_t bEnaDis)
+{
+ if (bEnaDis) pEmac->EMAC_NCFGR |= EMAC_NCFGR_DRFCS;
+ else pEmac->EMAC_NCFGR &= ~EMAC_NCFGR_DRFCS;
+}
+
+
+/**
+ * Enable/Disable frames to be received in half-duplex mode
+ * while transmitting.
+ */
+void EMAC_EFRHD(Emac *pEmac, uint8_t bEnaDis)
+{
+ if (bEnaDis) pEmac->EMAC_NCFGR |= EMAC_NCFGR_EFRHD;
+ else pEmac->EMAC_NCFGR &= ~EMAC_NCFGR_EFRHD;
+}
+
+/**
+ * Enable/Disable ignore RX FCS
+ */
+void EMAC_IRXFCS(Emac *pEmac, uint8_t bEnaDis)
+{
+ if (bEnaDis) pEmac->EMAC_NCFGR |= EMAC_NCFGR_IRXFCS;
+ else pEmac->EMAC_NCFGR &= ~EMAC_NCFGR_IRXFCS;
+}
+
+/**
+ * Return Network Status
+ */
+uint32_t EMAC_GetStatus(Emac *pEmac)
+{
+ return pEmac->EMAC_NSR;
+}
+
+/**
+ * Return mdio_in pin status
+ */
+uint8_t EMAC_GetMDIO(Emac *pEmac)
+{
+ return ((pEmac->EMAC_NSR & EMAC_NSR_MDIO) > 0);
+}
+
+/**
+ * Return 1 if PHY is idle
+ */
+uint8_t EMAC_IsIdle(Emac *pEmac)
+{
+ return ((pEmac->EMAC_NSR & EMAC_NSR_IDLE) > 0);
+}
+
+/**
+ * Return transmit status
+ */
+uint32_t EMAC_GetTxStatus(Emac *pEmac)
+{
+ return pEmac->EMAC_TSR;
+}
+
+/**
+ * Clear transmit status
+ */
+void EMAC_ClearTxStatus(Emac *pEmac, uint32_t dwStatus)
+{
+ pEmac->EMAC_TSR = dwStatus;
+}
+
+/**
+ * Return receive status
+ */
+uint32_t EMAC_GetRxStatus(Emac *pEmac)
+{
+ return pEmac->EMAC_RSR;
+}
+
+/**
+ * Clear receive status
+ */
+void EMAC_ClearRxStatus(Emac *pEmac, uint32_t dwStatus)
+{
+ pEmac->EMAC_RSR = dwStatus;
+}
+
+/**
+ * Set Rx Queue
+ */
+void EMAC_SetRxQueue(Emac *pEmac, uint32_t dwAddr)
+{
+ pEmac->EMAC_RBQP = EMAC_RBQP_ADDR_Msk & dwAddr;
+}
+
+/**
+ * Get Rx Queue Address
+ */
+uint32_t EMAC_GetRxQueue(Emac *pEmac)
+{
+ return pEmac->EMAC_RBQP;
+}
+
+/**
+ * Set Tx Queue
+ */
+void EMAC_SetTxQueue(Emac *pEmac, uint32_t dwAddr)
+{
+ pEmac->EMAC_TBQP = EMAC_TBQP_ADDR_Msk & dwAddr;
+}
+
+/**
+ * Get Tx Queue
+ */
+uint32_t EMAC_GetTxQueue(Emac *pEmac)
+{
+ return pEmac->EMAC_TBQP;
+}
+
+/**
+ * Enable interrupt(s).
+ */
+void EMAC_EnableIt(Emac *pEmac, uint32_t dwSources)
+{
+ pEmac->EMAC_IER = dwSources;
+}
+
+/**
+ * Disable interrupt(s).
+ */
+void EMAC_DisableIt(Emac *pEmac, uint32_t dwSources)
+{
+ pEmac->EMAC_IDR = dwSources;
+}
+
+/**
+ * Return interrupt status.
+ */
+uint32_t EMAC_GetItStatus(Emac *pEmac)
+{
+ return pEmac->EMAC_ISR;
+}
+
+/**
+ * Return interrupt mask.
+ */
+uint32_t EMAC_GetItMask(Emac *pEmac)
+{
+ return pEmac->EMAC_IMR;
+}
+
+/**
+ * Execute PHY maintanance command
+ */
+void EMAC_PHYMaintain(Emac *pEmac,
+ uint8_t bPhyAddr,
+ uint8_t bRegAddr,
+ uint8_t bRW,
+ uint16_t wData)
+{
+ /* Wait until bus idle */
+ while((pEmac->EMAC_NSR & EMAC_NSR_IDLE) == 0);
+ /* Write maintain register */
+ pEmac->EMAC_MAN = EMAC_MAN_CODE(10) | EMAC_MAN_SOF(0x1)
+ | EMAC_MAN_PHYA(bPhyAddr)
+ | EMAC_MAN_REGA(bRegAddr)
+ | EMAC_MAN_RW((bRW ? 0x2 : 0x1))
+ | EMAC_MAN_DATA(wData)
+ ;
+}
+
+/**
+ * Return PHY maintainance data returned
+ */
+uint16_t EMAC_PHYData(Emac *pEmac)
+{
+ /* Wait until bus idle */
+ while((pEmac->EMAC_NSR & EMAC_NSR_IDLE) == 0);
+ /* Return data */
+ return (uint16_t)(pEmac->EMAC_MAN & EMAC_MAN_DATA_Msk);
+}
+
+/**
+ * Set pause time.
+ */
+void EMAC_SetPauseTime(Emac *pEmac, uint16_t wPTime)
+{
+ pEmac->EMAC_PTR = wPTime;
+}
+
+/**
+ * Set Hash
+ */
+void EMAC_SetHash(Emac *pEmac, uint32_t dwHashTop, uint32_t dwHashBottom)
+{
+ pEmac->EMAC_HRB = dwHashBottom;
+ pEmac->EMAC_HRT = dwHashTop;
+}
+
+/**
+ * Set Hash
+ */
+void EMAC_SetHash64(Emac *pEmac, uint64_t ddwHash)
+{
+ pEmac->EMAC_HRB = (uint32_t)ddwHash;
+ pEmac->EMAC_HRT = (uint32_t)(ddwHash >> 32);
+}
+
+/**
+ * Set MAC Address
+ */
+void EMAC_SetAddress(Emac *pEmac, uint8_t bIndex, uint8_t *pMacAddr)
+{
+ pEmac->EMAC_SA[bIndex].EMAC_SAxB = (pMacAddr[3] << 24)
+ | (pMacAddr[2] << 16)
+ | (pMacAddr[1] << 8)
+ | (pMacAddr[0] )
+ ;
+ pEmac->EMAC_SA[bIndex].EMAC_SAxT = (pMacAddr[5] << 8)
+ | (pMacAddr[4] )
+ ;
+}
+
+/**
+ * Set MAC Address via 2 DW
+ */
+void EMAC_SetAddress32(Emac *pEmac, uint8_t bIndex, uint32_t dwMacT, uint32_t dwMacB)
+{
+ pEmac->EMAC_SA[bIndex].EMAC_SAxB = dwMacB;
+ pEmac->EMAC_SA[bIndex].EMAC_SAxT = dwMacT;
+}
+
+/**
+ * Set MAC Address via int64
+ */
+void EMAC_SetAddress64(Emac *pEmac, uint8_t bIndex, uint64_t ddwMac)
+{
+ pEmac->EMAC_SA[bIndex].EMAC_SAxB = (uint32_t)ddwMac;
+ pEmac->EMAC_SA[bIndex].EMAC_SAxT = (uint32_t)(ddwMac >> 32);
+}
+
+/**
+ * Set Type ID
+ */
+void EMAC_SetTypeID(Emac *pEmac, uint16_t wTID)
+{
+ pEmac->EMAC_TID = EMAC_TID_TID(wTID);
+}
+
+/**
+ * Get Type ID
+ */
+uint16_t EMAC_GetTypeID(Emac *pEmac)
+{
+ return (pEmac->EMAC_TID & EMAC_TID_TID_Msk);
+}
+
+/**
+ * Enable/Disable RMII
+ */
+void EMAC_RMIIEnable(Emac *pEmac, uint8_t bEnaDis)
+{
+ if (bEnaDis) pEmac->EMAC_USRIO |= EMAC_USRIO_RMII;
+ else pEmac->EMAC_USRIO &= ~EMAC_USRIO_RMII;
+}
+
+/**
+ * Enable/Disable transceiver input clock
+ */
+void EMAC_TransceiverClockEnable(Emac *pEmac, uint8_t bEnaDis)
+{
+ if (bEnaDis) pEmac->EMAC_USRIO |= EMAC_USRIO_CLKEN;
+ else pEmac->EMAC_USRIO &= ~EMAC_USRIO_CLKEN;
+}
+
+/**@}*/
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/exceptions.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/exceptions.c
new file mode 100644
index 0000000..3ba4284
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/exceptions.c
@@ -0,0 +1,489 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ * This file contains the default exception handlers.
+ *
+ * \note
+ * The exception handler has weak aliases.
+ * As they are weak aliases, any function with the same name will override
+ * this definition.
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "chip.h"
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Default interrupt handler for not used irq.
+ */
+void IrqHandlerNotUsed( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default NMI interrupt handler.
+ */
+WEAK void NMI_Handler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default HardFault interrupt handler.
+ */
+WEAK void HardFault_Handler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default MemManage interrupt handler.
+ */
+WEAK void MemManage_Handler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default BusFault interrupt handler.
+ */
+WEAK void BusFault_Handler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default UsageFault interrupt handler.
+ */
+WEAK void UsageFault_Handler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default SVC interrupt handler.
+ */
+WEAK void SVC_Handler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default DebugMon interrupt handler.
+ */
+WEAK void DebugMon_Handler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default PendSV interrupt handler.
+ */
+WEAK void PendSV_Handler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default SysTick interrupt handler.
+ */
+WEAK void SysTick_Handler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for Supply Controller.
+ */
+WEAK void SUPC_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for Reset Controller.
+ */
+WEAK void RSTC_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for Real Time Clock.
+ */
+WEAK void RTC_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for Real Time Timer.
+ */
+WEAK void RTT_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for Watchdog Timer.
+ */
+WEAK void WDT_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for PMC.
+ */
+WEAK void PMC_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for EFC 0.
+ */
+WEAK void EFC0_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for EFC 0.
+ */
+WEAK void EFC1_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for UART.
+ */
+WEAK void UART_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for SMC.
+ */
+WEAK void SMC_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for PIOA Controller.
+ */
+WEAK void PIOA_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for PIOB Controller.
+ */
+WEAK void PIOB_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for PIOC Controller.
+ */
+WEAK void PIOC_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for PIOD Controller.
+ */
+WEAK void PIOD_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for PIOE Controller.
+ */
+WEAK void PIOE_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for PIOF Controller.
+ */
+WEAK void PIOF_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for USART0.
+ */
+WEAK void USART0_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for USART1.
+ */
+WEAK void USART1_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for USART2.
+ */
+WEAK void USART2_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for USART3.
+ */
+WEAK void USART3_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for MCI.
+ */
+WEAK void HSMCI_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for TWI0.
+ */
+WEAK void TWI0_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for TWI1.
+ */
+WEAK void TWI1_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for SPI 0.
+ */
+WEAK void SPI0_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for SPI 1.
+ */
+WEAK void SPI1_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for SSC.
+ */
+WEAK void SSC_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for TC0.
+ */
+WEAK void TC0_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for TC1.
+ */
+WEAK void TC1_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for TC2.
+ */
+WEAK void TC2_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for TC3.
+ */
+WEAK void TC3_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for TC4.
+ */
+WEAK void TC4_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for TC5.
+ */
+WEAK void TC5_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for TC6.
+ */
+WEAK void TC6_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for TC7.
+ */
+WEAK void TC7_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for TC8.
+ */
+WEAK void TC8_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for ADC.
+ */
+WEAK void ADC_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for DAC.
+ */
+WEAK void DACC_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for PWM.
+ */
+WEAK void PWM_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for UOTGHS.
+ */
+WEAK void UOTGHS_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for CAN 0.
+ */
+WEAK void CAN0_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for CAN 1.
+ */
+WEAK void CAN1_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for TRNG.
+ */
+WEAK void TRNG_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for EMAC.
+ */
+WEAK void EMAC_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for DMAC.
+ */
+WEAK void DMAC_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
+/**
+ * \brief Default interrupt handler for SDRAMC.
+ */
+WEAK void SDRAMC_IrqHandler( void )
+{
+ while ( 1 ) ;
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/flashd.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/flashd.c
new file mode 100644
index 0000000..f9bea21
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/flashd.c
@@ -0,0 +1,677 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/** \addtogroup flashd_module Flash Memory Interface
+ * The flash driver manages the programming, erasing, locking and unlocking sequences
+ * with dedicated commands.
+ *
+ * To implement flash programing operation, the user has to follow these few steps :
+ * <ul>
+ * <li>Configue flash wait states to initializes the flash. </li>
+ * <li>Checks whether a region to be programmed is locked. </li>
+ * <li>Unlocks the user region to be programmed if the region have locked before.</li>
+ * <li>Erases the user page before program (optional).</li>
+ * <li>Writes the user page from the page buffer.</li>
+ * <li>Locks the region of programmed area if any.</li>
+ * </ul>
+ *
+ * Writing 8-bit and 16-bit data is not allowed and may lead to unpredictable data corruption.
+ * A check of this validity and padding for 32-bit alignment should be done in write algorithm.
+
+ * Lock/unlock range associated with the user address range is automatically translated.
+ *
+ * This security bit can be enabled through the command "Set General Purpose NVM Bit 0".
+ *
+ * A 128-bit factory programmed unique ID could be read to serve several purposes.
+ *
+ * The driver accesses the flash memory by calling the lowlevel module provided in \ref efc_module.
+ * For more accurate information, please look at the EEFC section of the Datasheet.
+ *
+ * Related files :\n
+ * \ref flashd.c\n
+ * \ref flashd.h.\n
+ * \ref efc.c\n
+ * \ref efc.h.\n
+*/
+/*@{*/
+/*@}*/
+
+
+/**
+ * \file
+ *
+ * The flash driver provides the unified interface for flash program operations.
+ *
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+#include "chip.h"
+
+#include <string.h>
+#include <assert.h>
+
+/*----------------------------------------------------------------------------
+ * Local variables
+ *----------------------------------------------------------------------------*/
+
+static uint32_t _adwPageBuffer[IFLASH_PAGE_SIZE/sizeof(uint32_t)] ;
+static uint8_t* _aucPageBuffer = (uint8_t*)_adwPageBuffer;
+static uint32_t _dwUseIAP = 1; /* Use IAP interface by default. */
+
+/*----------------------------------------------------------------------------
+ * Local macros
+ *----------------------------------------------------------------------------*/
+
+#define min( a, b ) (((a) < (b)) ? (a) : (b))
+
+/*----------------------------------------------------------------------------
+ * Local functions
+ *----------------------------------------------------------------------------*/
+
+
+/**
+ * \brief Computes the lock range associated with the given address range.
+ *
+ * \param dwStart Start address of lock range.
+ * \param dwEnd End address of lock range.
+ * \param pdwActualStart Actual start address of lock range.
+ * \param pdwActualEnd Actual end address of lock range.
+ */
+static void ComputeLockRange( uint32_t dwStart, uint32_t dwEnd, uint32_t *pdwActualStart, uint32_t *pdwActualEnd )
+{
+ Efc* pStartEfc ;
+ Efc* pEndEfc ;
+ uint16_t wStartPage ;
+ uint16_t wEndPage ;
+ uint16_t wNumPagesInRegion ;
+ uint16_t wActualStartPage ;
+ uint16_t wActualEndPage ;
+
+ /* If "dwEnd" is at the start address of a lock region, */
+ /* It actually means the end address of previous lock region */
+ /* So, we do adjustment of "dwEnd" here. */
+ if ((dwEnd != IFLASH0_ADDR) && ((dwEnd & (IFLASH_LOCK_REGION_SIZE-1)) == 0))
+ {
+ dwEnd -= 1;
+ }
+
+ /* Convert start and end address in page numbers */
+ EFC_TranslateAddress( &pStartEfc, dwStart, &wStartPage, 0 ) ;
+ EFC_TranslateAddress( &pEndEfc, dwEnd, &wEndPage, 0 ) ;
+
+ /* Find out the first page of the first region to lock */
+ wNumPagesInRegion = IFLASH_LOCK_REGION_SIZE / IFLASH_PAGE_SIZE;
+ wActualStartPage = wStartPage - (wStartPage % wNumPagesInRegion) ;
+ wActualEndPage = wEndPage ;
+ if ( (wEndPage % wNumPagesInRegion) != (wNumPagesInRegion-1) )
+ {
+ wActualEndPage += wNumPagesInRegion - (wEndPage % wNumPagesInRegion) - 1;
+ }
+
+ /* Store actual page numbers */
+ EFC_ComputeAddress( pStartEfc, wActualStartPage, 0, pdwActualStart ) ;
+ EFC_ComputeAddress( pEndEfc, wActualEndPage, 0, pdwActualEnd ) ;
+ TRACE_DEBUG( "Actual lock range is 0x%06X - 0x%06X\n\r",
+ *pdwActualStart, (*pdwActualEnd + IFLASH_PAGE_SIZE - 1) ) ;
+}
+
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Initializes the flash driver.
+ *
+ * \param dwMCk Master clock frequency in Hz.
+ * \param dwUseIAP 0: use EEFC controller interface, 1: use IAP interface.
+ * dwUseIAP should be set to 1 when running out of flash.
+ */
+
+extern void FLASHD_Initialize( uint32_t dwMCk, uint32_t dwUseIAP )
+{
+ dwMCk = dwMCk; /* avoid warnings */
+
+ EFC_DisableFrdyIt( EFC0 ) ;
+ EFC_DisableFrdyIt( EFC1 ) ;
+
+ _dwUseIAP = dwUseIAP ;
+}
+
+/**
+ * \brief Erases the entire flash.
+ *
+ * \param address Flash start address.
+ * \return 0 if successful; otherwise returns an error code.
+ */
+extern uint32_t FLASHD_Erase( uint32_t dwAddress )
+{
+ Efc* pEfc ;
+ uint16_t wPage ;
+ uint16_t wOffset ;
+ uint32_t dwError ;
+
+ assert( (dwAddress >=IFLASH0_ADDR) || (dwAddress <= (IFLASH0_ADDR + IFLASH_SIZE)) ) ;
+
+ /* Translate write address */
+ EFC_TranslateAddress( &pEfc, dwAddress, &wPage, &wOffset ) ;
+ dwError = EFC_PerformCommand( pEfc, EFC_FCMD_EA, 0, _dwUseIAP ) ;
+
+ return dwError ;
+}
+
+/**
+ * \brief Writes a data buffer in the internal flash.
+ *
+ * \note This function works in polling mode, and thus only returns when the
+ * data has been effectively written.
+ * \param address Write address.
+ * \param pBuffer Data buffer.
+ * \param size Size of data buffer in bytes.
+ * \return 0 if successful, otherwise returns an error code.
+ */
+extern uint32_t FLASHD_Write( uint32_t dwAddress, const void *pvBuffer, uint32_t dwSize )
+{
+ Efc* pEfc ;
+ uint16_t page ;
+ uint16_t offset ;
+ uint32_t writeSize ;
+ uint32_t pageAddress ;
+ uint16_t padding ;
+ uint32_t dwError ;
+ uint32_t sizeTmp ;
+ uint32_t *pAlignedDestination ;
+ uint32_t *pAlignedSource ;
+ uint32_t fwsBak0, fwsBak1;
+
+ /* Set 6 WS for internal Flash writing (refer to errata) */
+ fwsBak0 = ((EFC0->EEFC_FMR) & EEFC_FMR_FWS_Msk) >> EEFC_FMR_FWS_Pos;
+ fwsBak1 = ((EFC1->EEFC_FMR) & EEFC_FMR_FWS_Msk) >> EEFC_FMR_FWS_Pos;
+ EFC_SetWaitState(EFC0, 6);
+ EFC_SetWaitState(EFC1, 6);
+
+ uint32_t crossWrite = 0;
+ void *pvBufferRemain = 0;
+ uint32_t dwSizeRemain = 0;
+
+ assert( pvBuffer ) ;
+ assert( dwAddress >= IFLASH0_ADDR ) ;
+ assert( (dwAddress + dwSize) <= (IFLASH0_ADDR + IFLASH_SIZE) ) ;
+
+ /* Check if the write operation will cross over flash0 and flash1 */
+ if ( ((dwAddress + dwSize) <= (IFLASH0_ADDR + IFLASH_SIZE/2)) ||
+ (dwAddress >= IFLASH1_ADDR) )
+ {
+ crossWrite = 0;
+ }
+ else
+ {
+ /* Save information for write operation on flash1 */
+ crossWrite = 1;
+ pvBufferRemain = (void *)((uint8_t *)pvBuffer + (IFLASH1_ADDR - dwAddress));
+ dwSizeRemain = dwSize - (IFLASH1_ADDR - dwAddress);
+ /* Adjust size for write operation on flash0 */
+ dwSize = (IFLASH1_ADDR - dwAddress);
+ }
+
+fd_write:
+ /* Translate write address */
+ EFC_TranslateAddress( &pEfc, dwAddress, &page, &offset ) ;
+
+ /* Write all pages */
+ while ( dwSize > 0 )
+ {
+ /* Copy data in temporary buffer to avoid alignment problems */
+ writeSize = min((uint32_t)IFLASH_PAGE_SIZE - offset, dwSize ) ;
+ EFC_ComputeAddress(pEfc, page, 0, &pageAddress ) ;
+ padding = IFLASH_PAGE_SIZE - offset - writeSize ;
+
+ /* Pre-buffer data */
+ memcpy( _aucPageBuffer, (void *) pageAddress, offset);
+
+ /* Buffer data */
+ memcpy( _aucPageBuffer + offset, pvBuffer, writeSize);
+
+ /* Post-buffer data */
+ memcpy( _aucPageBuffer + offset + writeSize, (void *) (pageAddress + offset + writeSize), padding);
+
+ /* Write page
+ * Writing 8-bit and 16-bit data is not allowed and may lead to unpredictable data corruption
+ */
+ pAlignedDestination = (uint32_t*)pageAddress ;
+ pAlignedSource = (uint32_t*)_adwPageBuffer ;
+ sizeTmp = IFLASH_PAGE_SIZE ;
+
+ while ( sizeTmp >= 4 )
+ {
+ *pAlignedDestination++ = *pAlignedSource++;
+ sizeTmp -= 4;
+ }
+
+ /* Send writing command */
+ dwError = EFC_PerformCommand( pEfc, EFC_FCMD_EWP, page, _dwUseIAP ) ;
+ if ( dwError )
+ {
+ /* Restore FWS settings */
+ EFC_SetWaitState(EFC0, fwsBak0);
+ EFC_SetWaitState(EFC1, fwsBak1);
+ return dwError ;
+ }
+
+ /* Progression */
+ dwAddress += IFLASH_PAGE_SIZE ;
+ pvBuffer = (void *)((uint32_t) pvBuffer + writeSize) ;
+ dwSize -= writeSize ;
+ page++;
+ offset = 0;
+ }
+
+ /* Check if there is a writing operation on flash1 */
+ if (crossWrite == 1)
+ {
+ dwAddress = IFLASH1_ADDR;
+ pvBuffer = pvBufferRemain;
+ dwSize = dwSizeRemain;
+ crossWrite = 0;
+ goto fd_write;
+ }
+
+ /* Restore FWS settings */
+ EFC_SetWaitState(EFC0, fwsBak0);
+ EFC_SetWaitState(EFC1, fwsBak1);
+ return 0 ;
+}
+/**
+ * \brief Locks all the regions in the given address range. The actual lock range is
+ * reported through two output parameters.
+ *
+ * \param start Start address of lock range.
+ * \param end End address of lock range.
+ * \param pActualStart Start address of the actual lock range (optional).
+ * \param pActualEnd End address of the actual lock range (optional).
+ * \return 0 if successful, otherwise returns an error code.
+ */
+extern uint32_t FLASHD_Lock( uint32_t start, uint32_t end, uint32_t *pActualStart, uint32_t *pActualEnd )
+{
+ Efc *pEfc ;
+ uint32_t actualStart, actualEnd ;
+ uint16_t startPage, endPage ;
+ uint32_t dwError ;
+ uint16_t numPagesInRegion = IFLASH_LOCK_REGION_SIZE / IFLASH_PAGE_SIZE;
+
+ uint32_t crossLock = 0;
+ uint32_t endBak = end;
+
+ /* Check if the lock operation will cross over flash0 and flash1 */
+ if ( (start >= IFLASH1_ADDR) || (end <= IFLASH1_ADDR) )
+ {
+ crossLock = 0;
+ }
+ else
+ {
+ /* Save information for lock operation on flash1 */
+ crossLock = 1;
+ endBak = end;
+ /* Adjust end address for lock operation on flash0 */
+ end = (IFLASH1_ADDR - 1);
+ }
+
+fd_lock:
+ /* Compute actual lock range and store it */
+ ComputeLockRange( start, end, &actualStart, &actualEnd ) ;
+ if ( pActualStart != NULL )
+ {
+ *pActualStart = actualStart ;
+ }
+ if ( pActualEnd != NULL )
+ {
+ *pActualEnd = actualEnd;
+ }
+
+ /* Compute page numbers */
+ EFC_TranslateAddress( &pEfc, actualStart, &startPage, 0 ) ;
+ EFC_TranslateAddress( 0, actualEnd, &endPage, 0 ) ;
+
+ /* Lock all pages */
+ while ( startPage < endPage )
+ {
+ dwError = EFC_PerformCommand( pEfc, EFC_FCMD_SLB, startPage, _dwUseIAP ) ;
+ if ( dwError )
+ {
+ return dwError ;
+ }
+ startPage += numPagesInRegion;
+ }
+
+ /* Check if there is a lock operation on flash1 */
+ if (crossLock == 1)
+ {
+ start = IFLASH1_ADDR;
+ end = endBak;
+ crossLock = 0;
+ goto fd_lock;
+ }
+
+ return 0 ;
+}
+
+/**
+ * \brief Unlocks all the regions in the given address range. The actual unlock range is
+ * reported through two output parameters.
+ * \param start Start address of unlock range.
+ * \param end End address of unlock range.
+ * \param pActualStart Start address of the actual unlock range (optional).
+ * \param pActualEnd End address of the actual unlock range (optional).
+ * \return 0 if successful, otherwise returns an error code.
+ */
+extern uint32_t FLASHD_Unlock( uint32_t start, uint32_t end, uint32_t *pActualStart, uint32_t *pActualEnd )
+{
+ Efc* pEfc ;
+ uint32_t actualStart, actualEnd ;
+ uint16_t startPage, endPage ;
+ uint32_t dwError ;
+ uint16_t numPagesInRegion = IFLASH_LOCK_REGION_SIZE / IFLASH_PAGE_SIZE;
+
+ uint32_t crossUnlock = 0;
+ uint32_t endBak = end;
+
+ /* Check if the unlock operation will cross over flash0 and flash1 */
+ if ( (start >= IFLASH1_ADDR) || (end <= IFLASH1_ADDR) )
+ {
+ crossUnlock = 0;
+ }
+ else
+ {
+ /* Save information for unlock operation on flash1 */
+ crossUnlock = 1;
+ endBak = end;
+ /* Adjust end address for unlock operation on flash0 */
+ end = (IFLASH1_ADDR - 1);
+ }
+
+fd_unlock:
+ /* Compute actual unlock range and store it */
+ ComputeLockRange(start, end, &actualStart, &actualEnd);
+ if ( pActualStart != NULL )
+ {
+ *pActualStart = actualStart ;
+ }
+ if ( pActualEnd != NULL )
+ {
+ *pActualEnd = actualEnd ;
+ }
+
+ /* Compute page numbers */
+ EFC_TranslateAddress( &pEfc, actualStart, &startPage, 0 ) ;
+ EFC_TranslateAddress( 0, actualEnd, &endPage, 0 ) ;
+
+ /* Unlock all pages */
+ while ( startPage < endPage )
+ {
+ dwError = EFC_PerformCommand( pEfc, EFC_FCMD_CLB, startPage, _dwUseIAP ) ;
+ if ( dwError )
+ {
+ return dwError ;
+ }
+ startPage += numPagesInRegion ;
+ }
+
+ /* Check if there is a unlock operation on flash1 */
+ if (crossUnlock == 1)
+ {
+ start = IFLASH1_ADDR;
+ end = endBak;
+ crossUnlock = 0;
+ goto fd_unlock;
+ }
+
+ return 0 ;
+}
+
+/**
+ * \brief Returns the number of locked regions inside the given address range.
+ *
+ * \param start Start address of range
+ * \param end End address of range.
+ */
+extern uint32_t FLASHD_IsLocked( uint32_t start, uint32_t end )
+{
+ Efc *pEfc ;
+ uint16_t startPage, endPage ;
+ uint8_t startRegion, endRegion ;
+ uint32_t numPagesInRegion ;
+ uint32_t status ;
+ uint32_t dwError ;
+ uint32_t numLockedRegions = 0 ;
+
+ assert( end >= start ) ;
+ assert( (start >=IFLASH0_ADDR) && (end <= IFLASH0_ADDR + IFLASH_SIZE) ) ;
+
+ uint32_t crossLockCheck = 0;
+ uint32_t endBak = end;
+
+ /* Check if the lock check space will cross over flash0 and flash1 */
+ if ( (start >= IFLASH1_ADDR) || (end <= IFLASH1_ADDR) )
+ {
+ crossLockCheck = 0;
+ }
+ else
+ {
+ /* Save information for lock check on flash1 */
+ crossLockCheck = 1;
+ endBak = end;
+ /* Adjust end address for lock check on flash0 */
+ end = (IFLASH1_ADDR - 1);
+ }
+
+fd_lock_check:
+ /* Compute page numbers */
+ EFC_TranslateAddress( &pEfc, start, &startPage, 0 ) ;
+ EFC_TranslateAddress( 0, end, &endPage, 0 ) ;
+
+ /* Compute region numbers */
+ numPagesInRegion = IFLASH_LOCK_REGION_SIZE / IFLASH_PAGE_SIZE ;
+ startRegion = startPage / numPagesInRegion ;
+ endRegion = endPage / numPagesInRegion ;
+ if ((endPage % numPagesInRegion) != 0)
+ {
+ endRegion++ ;
+ }
+
+ /* Retrieve lock status */
+ dwError = EFC_PerformCommand( pEfc, EFC_FCMD_GLB, 0, _dwUseIAP ) ;
+
+ if( dwError )
+ {
+ TRACE_ERROR("EFC_PerformCommand error %u\n\r", dwError);
+ /* Wait for watchdog expire or froze the program */
+ while (1);
+ }
+
+ status = EFC_GetResult( pEfc ) ;
+
+ /* Check status of each involved region */
+ while ( startRegion < endRegion )
+ {
+ if ( (status & (1 << startRegion)) != 0 )
+ {
+ numLockedRegions++ ;
+ }
+ startRegion++ ;
+ }
+
+ /* Check if there is a lock check on flash1 */
+ if (crossLockCheck == 1)
+ {
+ start = IFLASH1_ADDR;
+ end = endBak;
+ crossLockCheck = 0;
+ goto fd_lock_check;
+ }
+
+ return numLockedRegions ;
+}
+
+/**
+ * \brief Check if the given GPNVM bit is set or not.
+ *
+ * \param gpnvm GPNVM bit index.
+ * \returns 1 if the given GPNVM bit is currently set; otherwise returns 0.
+ */
+extern uint32_t FLASHD_IsGPNVMSet( uint8_t ucGPNVM )
+{
+ uint32_t dwError ;
+ uint32_t dwStatus ;
+
+ assert( ucGPNVM < 3 ) ;
+
+ /* Get GPNVMs status */
+ dwError = EFC_PerformCommand( EFC0, EFC_FCMD_GFB, 0, _dwUseIAP ) ;
+
+ if( dwError )
+ {
+ TRACE_ERROR("EFC_PerformCommand error %u\n\r", dwError);
+
+ /* Wait for watchdog expire or froze the program */
+ while (1);
+ }
+
+ dwStatus = EFC_GetResult( EFC0 ) ;
+
+ /* Check if GPNVM is set */
+ if ( (dwStatus & (1 << ucGPNVM)) != 0 )
+ {
+ return 1 ;
+ }
+ else
+ {
+ return 0 ;
+ }
+}
+
+/**
+ * \brief Sets the selected GPNVM bit.
+ *
+ * \param gpnvm GPNVM bit index.
+ * \returns 0 if successful; otherwise returns an error code.
+ */
+extern uint32_t FLASHD_SetGPNVM( uint8_t ucGPNVM )
+{
+ assert( ucGPNVM < 3 ) ;
+
+ if ( !FLASHD_IsGPNVMSet( ucGPNVM ) )
+ {
+ return EFC_PerformCommand( EFC0, EFC_FCMD_SFB, ucGPNVM, _dwUseIAP ) ;
+ }
+ else
+ {
+ return 0 ;
+ }
+}
+
+/**
+ * \brief Clears the selected GPNVM bit.
+ *
+ * \param gpnvm GPNVM bit index.
+ * \returns 0 if successful; otherwise returns an error code.
+ */
+extern uint32_t FLASHD_ClearGPNVM( uint8_t ucGPNVM )
+{
+ assert( ucGPNVM < 3 ) ;
+
+ if ( FLASHD_IsGPNVMSet( ucGPNVM ) )
+ {
+ return EFC_PerformCommand( EFC0, EFC_FCMD_CFB, ucGPNVM, _dwUseIAP ) ;
+ }
+ else
+ {
+ return 0 ;
+ }
+}
+
+/**
+ * \brief Read the unique ID.
+ *
+ * \param pdwUniqueID pointer on a 4bytes char containing the unique ID value.
+ * \returns 0 if successful; otherwise returns an error code.
+ */
+#ifdef __ICCARM__
+ __ramfunc
+#else
+ __attribute__ ((section (".ramfunc")))
+#endif
+uint32_t FLASHD_ReadUniqueID( uint32_t* pdwUniqueID )
+{
+ uint32_t status ;
+
+ if (pdwUniqueID == NULL) {
+ return 1;
+ }
+
+ pdwUniqueID[0] = 0 ;
+ pdwUniqueID[1] = 0 ;
+ pdwUniqueID[2] = 0 ;
+ pdwUniqueID[3] = 0 ;
+
+ /* Send the Start Read unique Identifier command (STUI) by writing the Flash
+ Command Register with the STUI command.*/
+ EFC0->EEFC_FCR = (0x5A << 24) | EFC_FCMD_STUI;
+
+ /* When the Unique Identifier is ready to be read, the FRDY bit in the Flash
+ Programming Status Register (EEFC_FSR) falls. */
+ do
+ {
+ status = EFC0->EEFC_FSR ;
+ } while ( (status & EEFC_FSR_FRDY) == EEFC_FSR_FRDY ) ;
+
+ /* The Unique Identifier is located in the first 128 bits of the Flash
+ memory mapping.*/
+ pdwUniqueID[0] = *(uint32_t *)IFLASH0_ADDR;
+ pdwUniqueID[1] = *(uint32_t *)(IFLASH0_ADDR + 4);
+ pdwUniqueID[2] = *(uint32_t *)(IFLASH0_ADDR + 8);
+ pdwUniqueID[3] = *(uint32_t *)(IFLASH0_ADDR + 12);
+
+ /* To stop the Unique Identifier mode, the user needs to send the Stop Read
+ unique Identifier command (SPUI) by writing the Flash Command Register
+ with the SPUI command. */
+ EFC0->EEFC_FCR = (0x5A << 24) | EFC_FCMD_SPUI ;
+
+ /* When the Stop read Unique Unique Identifier command (SPUI) has been
+ performed, the FRDY bit in the Flash Programming Status Register (EEFC_FSR)
+ rises. */
+ do
+ {
+ status = EFC0->EEFC_FSR ;
+ } while ( (status & EEFC_FSR_FRDY) != EEFC_FSR_FRDY ) ;
+
+ return 0;
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/hsmci.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/hsmci.c
new file mode 100644
index 0000000..9969d5a
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/hsmci.c
@@ -0,0 +1,599 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/** \file
+ *
+ * Implementation of High Speed MultiMedia Card Interface (HSMCI) controller.
+ */
+
+/*---------------------------------------------------------------------------
+ * Headers
+ *---------------------------------------------------------------------------*/
+
+#include "chip.h"
+
+#include <assert.h>
+
+
+/*---------------------------------------------------------------------------
+ * Macros
+ *---------------------------------------------------------------------------*/
+
+
+
+/*---------------------------------------------------------------------------
+ * Exported functions
+ *---------------------------------------------------------------------------*/
+
+/** \addtogroup hsmci_functions
+ *@{
+ */
+
+/**
+ * \brief Enable Multi-Media Interface
+ *
+ * \param pRMci Pointer to a Hsmci instance
+ */
+extern void HSMCI_Enable(Hsmci* pRMci)
+{
+ pRMci->HSMCI_CR = HSMCI_CR_MCIEN;
+}
+
+/**
+ * \brief Disable Multi-Media Interface
+ *
+ * \param pRMci Pointer to a Hsmci instance
+ */
+extern void HSMCI_Disable(Hsmci* pRMci)
+{
+ pRMci->HSMCI_CR = HSMCI_CR_MCIDIS;
+}
+
+/**
+ * \brief Reset (& Disable) Multi-Media Interface
+ *
+ * \param mci Pointer to a Hsmci instance
+ * \param bBackup Backup registers values to keep previous settings, including
+ * _MR, _SDCR, _DTOR, _CSTOR, _DMA and _CFG.
+ */
+extern void HSMCI_Reset(Hsmci* pRMci, uint8_t bBackup)
+{
+ if (bBackup)
+ {
+ uint32_t mr = pRMci->HSMCI_MR;
+ uint32_t dtor = pRMci->HSMCI_DTOR;
+ uint32_t sdcr = pRMci->HSMCI_SDCR;
+ uint32_t cstor = pRMci->HSMCI_CSTOR;
+ uint32_t dma = pRMci->HSMCI_DMA;
+ uint32_t cfg = pRMci->HSMCI_CFG;
+
+ pRMci->HSMCI_CR = HSMCI_CR_SWRST;
+
+ pRMci->HSMCI_MR = mr;
+ pRMci->HSMCI_DTOR = dtor;
+ pRMci->HSMCI_SDCR = sdcr;
+ pRMci->HSMCI_CSTOR = cstor;
+ pRMci->HSMCI_DMA = dma;
+ pRMci->HSMCI_CFG = cfg;
+ }
+ else
+ {
+ pRMci->HSMCI_CR = HSMCI_CR_SWRST;
+ }
+}
+
+/**
+ * \brief Select slot
+ * \param pRMci Pointer to a Hsmci instance
+ * \param bSlot Slot ID (0~3 for A~D).
+ */
+extern void HSMCI_Select(Hsmci *pRMci, uint8_t bSlot, uint8_t bBusWidth)
+{
+ uint32_t dwSdcr;
+ dwSdcr = (HSMCI_SDCR_SDCSEL_Msk & bSlot);
+ switch(bBusWidth)
+ {
+ case 1:
+ pRMci->HSMCI_SDCR = dwSdcr | HSMCI_SDCR_SDCBUS_1;
+ break;
+ case 4:
+ pRMci->HSMCI_SDCR = dwSdcr | HSMCI_SDCR_SDCBUS_4;
+ break;
+ case 8:
+ pRMci->HSMCI_SDCR = dwSdcr | HSMCI_SDCR_SDCBUS_8;
+ break;
+ }
+}
+
+/**
+ * \brief Set slot
+ * \param pRMci Pointer to a Hsmci instance
+ * \param bSlot Slot ID (0~3 for A~D).
+ */
+extern void HSMCI_SetSlot(Hsmci *pRMci, uint8_t bSlot)
+{
+ uint32_t dwSdcr = pRMci->HSMCI_SDCR & ~HSMCI_SDCR_SDCSEL_Msk;
+ pRMci->HSMCI_SDCR = dwSdcr | (HSMCI_SDCR_SDCSEL_Msk & bSlot);
+}
+
+/**
+ * \brief Set bus width of MCI
+ * \param pRMci Pointer to a Hsmci instance
+ * \param bBusWidth 1,4 or 8 (bits).
+ */
+extern void HSMCI_SetBusWidth(Hsmci * pRMci,uint8_t bBusWidth)
+{
+ uint32_t dwSdcr = pRMci->HSMCI_SDCR & ~HSMCI_SDCR_SDCBUS_Msk;
+ switch(bBusWidth)
+ {
+ case 1:
+ pRMci->HSMCI_SDCR = dwSdcr | HSMCI_SDCR_SDCBUS_1;
+ break;
+ case 4:
+ pRMci->HSMCI_SDCR = dwSdcr | HSMCI_SDCR_SDCBUS_4;
+ break;
+ case 8:
+ pRMci->HSMCI_SDCR = dwSdcr | HSMCI_SDCR_SDCBUS_8;
+ break;
+ }
+}
+
+/**
+ * \brief Return bus width setting.
+ *
+ * \param pRMci Pointer to an MCI instance.
+ * \return 1, 4 or 8.
+ */
+extern uint8_t HSMCI_GetBusWidth(Hsmci * pRMci)
+{
+ switch(pRMci->HSMCI_SDCR & HSMCI_SDCR_SDCBUS_Msk)
+ {
+ case HSMCI_SDCR_SDCBUS_1: return 1;
+ case HSMCI_SDCR_SDCBUS_4: return 4;
+ case HSMCI_SDCR_SDCBUS_8: return 8;
+ }
+ return 0;
+}
+
+/**
+ * \brief Configures a MCI peripheral as specified.
+ *
+ * \param pRMci Pointer to an MCI instance.
+ * \param dwMode Value of the MCI Mode register.
+ */
+extern void HSMCI_ConfigureMode(Hsmci *pRMci, uint32_t dwMode)
+{
+ pRMci->HSMCI_MR = dwMode;
+}
+
+/**
+ * \brief Return mode register
+ * \param pRMci Pointer to an MCI instance.
+ */
+extern uint32_t HSMCI_GetMode(Hsmci * pRMci)
+{
+ return pRMci->HSMCI_MR;
+}
+
+/**
+ * \brief Enable/Disable R/W proof
+ *
+ * \param pRMci Pointer to an MCI instance.
+ * \param bRdProof Read proof enable/disable.
+ * \param bWrProof Write proof enable/disable.
+ */
+extern void HSMCI_ProofEnable(Hsmci *pRMci, uint8_t bRdProof, uint8_t bWrProof)
+{
+ uint32_t mr = pRMci->HSMCI_MR;
+ pRMci->HSMCI_MR = (mr & (~(HSMCI_MR_WRPROOF | HSMCI_MR_RDPROOF)))
+ | (bRdProof ? HSMCI_MR_RDPROOF : 0)
+ | (bWrProof ? HSMCI_MR_WRPROOF : 0)
+ ;
+}
+
+/**
+ * \brief Padding value setting.
+ *
+ * \param pRMci Pointer to an MCI instance.
+ * \param bPadvEn Padding value 0xFF/0x00.
+ */
+extern void HSMCI_PadvCtl(Hsmci *pRMci, uint8_t bPadv)
+{
+ if (bPadv)
+ {
+ pRMci->HSMCI_MR |= HSMCI_MR_PADV;
+ }
+ else
+ {
+ pRMci->HSMCI_MR &= ~HSMCI_MR_PADV;
+ }
+}
+
+/**
+ * \brief Force byte transfer enable/disable.
+ *
+ * \param pRMci Pointer to an MCI instance.
+ * \param bFByteEn FBYTE enable/disable.
+ */
+extern void HSMCI_FByteEnable(Hsmci *pRMci, uint8_t bFByteEn)
+{
+ if (bFByteEn)
+ {
+ pRMci->HSMCI_MR |= HSMCI_MR_FBYTE;
+ }
+ else
+ {
+ pRMci->HSMCI_MR &= ~HSMCI_MR_FBYTE;
+ }
+}
+
+/**
+ * \brief Check if Force Byte mode enabled.
+ *
+ * \param pRMci Pointer to an MCI instance.
+ * \return 1 if _FBYTE is enabled.
+ */
+extern uint8_t HSMCI_IsFByteEnabled(Hsmci *pRMci)
+{
+ return ((pRMci->HSMCI_MR & HSMCI_MR_FBYTE) > 0);
+}
+
+/**
+ * \brief Set Clock Divider & Power save divider for MCI.
+ *
+ * \param pRMci Pointer to an MCI instance.
+ * \param bClkDiv Clock Divider value (0 ~ 255).
+ * \param bPwsDiv Power Saving Divider (1 ~ 7).
+ */
+extern void HSMCI_DivCtrl(Hsmci *pRMci, uint8_t bClkDiv, uint8_t bPwsDiv)
+{
+ uint32_t mr = pRMci->HSMCI_MR;
+ pRMci->HSMCI_MR = (mr & ~(HSMCI_MR_CLKDIV_Msk | HSMCI_MR_PWSDIV_Msk))
+ | HSMCI_MR_CLKDIV(bClkDiv)
+ | HSMCI_MR_PWSDIV(bPwsDiv)
+ ;
+}
+
+/**
+ * \brief Enables one or more interrupt sources of MCI peripheral.
+ *
+ * \param pRMci Pointer to an Hsmci instance.
+ * \param sources Bitwise OR of selected interrupt sources.
+ */
+extern void HSMCI_EnableIt(Hsmci *pRMci, uint32_t dwSources)
+{
+ pRMci->HSMCI_IER = dwSources;
+}
+
+/**
+ * \brief Disable one or more interrupt sources of MCI peripheral.
+ *
+ * \param pRMci Pointer to an Hsmci instance.
+ * \param sources Bitwise OR of selected interrupt sources.
+ */
+extern void HSMCI_DisableIt(Hsmci *pRMci, uint32_t dwSources)
+{
+ pRMci->HSMCI_IDR = dwSources;
+}
+
+/**
+ * \brief Return the interrupt mask register.
+ *
+ * \param pRMci Pointer to an Hsmci instance.
+ * \return MCI interrupt mask register.
+ */
+extern uint32_t HSMCI_GetItMask(Hsmci *pRMci)
+{
+ return (pRMci->HSMCI_IMR) ;
+}
+
+/**
+ * \brief Set block len & count for transfer
+ *
+ * \param pRMci Pointer to an Hsmci instance.
+ * \param wBlkLen Block size.
+ * \param wCnt Block(byte) count.
+ */
+extern void HSMCI_ConfigureTransfer(Hsmci *pRMci,
+ uint16_t wBlkLen,
+ uint16_t wCnt)
+{
+ pRMci->HSMCI_BLKR = (wBlkLen << 16) | wCnt;
+}
+
+/**
+ * \brief Set block length
+ *
+ * Count is reset to 0.
+ *
+ * \param pRMci Pointer to an Hsmci instance.
+ * \param wBlkSize Block size.
+ */
+extern void HSMCI_SetBlockLen(Hsmci *pRMci, uint16_t wBlkSize)
+{
+ pRMci->HSMCI_BLKR = wBlkSize << 16;
+}
+
+/**
+ * \brief Set block (byte) count
+ *
+ * \param pRMci Pointer to an Hsmci instance.
+ * \param wBlkCnt Block(byte) count.
+ */
+extern void HSMCI_SetBlockCount(Hsmci *pRMci, uint16_t wBlkCnt)
+{
+ pRMci->HSMCI_BLKR |= wBlkCnt;
+}
+
+/**
+ * \brief Configure the Completion Signal Timeout
+ *
+ * \param pRMci Pointer to an Hsmci instance.
+ * \param dwConfigure Completion Signal Timeout configure.
+ */
+extern void HSMCI_ConfigureCompletionTO(Hsmci *pRMci, uint32_t dwConfigure)
+{
+ pRMci->HSMCI_CSTOR = dwConfigure;
+}
+
+/**
+ * \brief Configure the Data Timeout
+ *
+ * \param pRMci Pointer to an Hsmci instance.
+ * \param dwConfigure Data Timeout configure.
+ */
+extern void HSMCI_ConfigureDataTO(Hsmci *pRMci, uint32_t dwConfigure)
+{
+ pRMci->HSMCI_DTOR = dwConfigure;
+}
+
+/**
+ * \brief Send command
+ *
+ * \param pRMci Pointer to an Hsmci instance.
+ * \param dwCmd Command register value.
+ * \param dwArg Argument register value.
+ */
+extern void HSMCI_SendCmd(Hsmci *pRMci, uint32_t dwCmd, uint32_t dwArg)
+{
+ pRMci->HSMCI_ARGR = dwArg;
+ pRMci->HSMCI_CMDR = dwCmd;
+}
+
+
+/**
+ * \brief Return the response register.
+ *
+ * \param pRMci Pointer to an Hsmci instance.
+ * \return MCI response register.
+ */
+extern uint32_t HSMCI_GetResponse(Hsmci *pRMci)
+{
+ return pRMci->HSMCI_RSPR[0];
+}
+
+/**
+ * \brief Return the receive data register.
+ *
+ * \param pRMci Pointer to an Hsmci instance.
+ * \return MCI receive data register.
+ */
+extern uint32_t HSMCI_Read(Hsmci *pRMci)
+{
+ return pRMci->HSMCI_RDR;
+}
+
+/**
+ * \brief Read from FIFO
+ *
+ * \param pRMci Pointer to an Hsmci instance.
+ * \param pdwData Pointer to data buffer.
+ * \param dwSize Size of data buffer (in DWord).
+ */
+extern void HSMCI_ReadFifo(Hsmci *pRMci, uint8_t *pdwData, uint32_t dwSize)
+{
+ volatile uint32_t *pFIFO = (volatile uint32_t*)(pRMci->HSMCI_FIFO);
+ register uint32_t c4, c1;
+
+ if (dwSize == 0)
+ return;
+
+ c4 = dwSize >> 2;
+ c1 = dwSize & 0x3;
+
+ for(;c4;c4 --)
+ {
+ *pdwData ++ = *pFIFO ++;
+ *pdwData ++ = *pFIFO ++;
+ *pdwData ++ = *pFIFO ++;
+ *pdwData ++ = *pFIFO ++;
+ }
+ for(;c1;c1 --)
+ {
+ *pdwData ++ = *pFIFO ++;
+ }
+}
+
+/**
+ * \brief Sends data through MCI peripheral.
+ *
+ * \param pRMci Pointer to an Hsmci instance.
+ * \param
+ */
+extern void HSMCI_Write(Hsmci *pRMci, uint32_t dwData)
+{
+ pRMci->HSMCI_TDR = dwData;
+}
+
+/**
+ * \brief Write to FIFO
+ *
+ * \param pRMci Pointer to an Hsmci instance.
+ * \param pdwData Pointer to data buffer.
+ * \param dwSize Size of data buffer (In DWord).
+ */
+extern void HSMCI_WriteFifo(Hsmci *pRMci, uint8_t *pdwData, uint32_t dwSize)
+{
+ volatile uint32_t *pFIFO = (volatile uint32_t*)(pRMci->HSMCI_FIFO);
+ register uint32_t c4, c1;
+
+ if (dwSize == 0)
+ return;
+
+ c4 = dwSize >> 2;
+ c1 = dwSize & 0x3;
+
+ for(;c4;c4 --)
+ {
+ *pFIFO ++ = *pdwData ++;
+ *pFIFO ++ = *pdwData ++;
+ *pFIFO ++ = *pdwData ++;
+ *pFIFO ++ = *pdwData ++;
+ }
+ for(;c1;c1 --)
+ {
+ *pFIFO ++ = *pdwData ++;
+ }
+}
+
+/**
+ * \brief Return the status register.
+ *
+ * \param pRMci Pointer to an Hsmci instance.
+ * \return MCI status register.
+ */
+extern uint32_t HSMCI_GetStatus(Hsmci *pRMci)
+{
+ return pRMci->HSMCI_SR;
+}
+
+/**
+ * \brief Configure the HSMCI DMA
+ *
+ * \param pRMci Pointer to an Hsmci instance.
+ * \param dwConfigure Configure value.
+ */
+extern void HSMCI_ConfigureDma(Hsmci *pRMci, uint32_t dwConfigure)
+{
+ pRMci->HSMCI_DMA = dwConfigure;
+}
+
+/**
+ * \brief Enable the HSMCI DMA
+ *
+ * \param pRMci Pointer to an Hsmci instance.
+ * \param bEnable 1 to enable, 0 to disable.
+ */
+extern void HSMCI_EnableDma(Hsmci *pRMci, uint8_t bEnable)
+{
+ if (bEnable)
+ {
+ pRMci->HSMCI_DMA |= HSMCI_DMA_DMAEN;
+ }
+ else
+ {
+ pRMci->HSMCI_DMA &= ~HSMCI_DMA_DMAEN;
+ }
+}
+
+/**
+ * \brief Enable the HSMCI DMA
+ *
+ * \param pRMci Pointer to an Hsmci instance.
+ * \param bOffset Offset value.
+ */
+extern void HSMCI_SetDmaOffset(Hsmci *pRMci, uint8_t bOffset)
+{
+ uint32_t dwDma = pRMci->HSMCI_DMA & (~HSMCI_DMA_OFFSET_Msk);
+ pRMci->HSMCI_DMA = dwDma | HSMCI_DMA_OFFSET(bOffset);
+}
+
+/**
+ * \brief Configure the HSMCI
+ *
+ * \param pRMci Pointer to an Hsmci instance.
+ * \param dwConfigure Configure value.
+ */
+extern void HSMCI_Configure(Hsmci *pRMci, uint32_t dwConfigure)
+{
+ pRMci->HSMCI_CFG = dwConfigure;
+}
+
+/**
+ * \brief Enable/Disable High-Speed mode for MCI
+ *
+ * \param pRMci Pointer to an Hsmci instance.
+ * \param bHsEnable Enable/Disable high-speed.
+ */
+extern void HSMCI_HsEnable(Hsmci *pRMci, uint8_t bHsEnable)
+{
+ if (bHsEnable)
+ {
+ pRMci->HSMCI_CFG |= HSMCI_CFG_HSMODE;
+ }
+ else
+ {
+ pRMci->HSMCI_CFG &= ~HSMCI_CFG_HSMODE;
+ }
+}
+
+/**
+ * \brief Check if High-speed mode is enabled on MCI
+ * \param pRMci Pointer to an Hsmci instance.
+ * \return 1
+ */
+extern uint8_t HSMCI_IsHsEnabled(Hsmci * pRMci)
+{
+ return ((pRMci->HSMCI_CFG & HSMCI_CFG_HSMODE) > 0);
+}
+
+/**
+ * \brief Configure the Write Protection Mode
+ *
+ * \param pRMci Pointer to an Hsmci instance.
+ * \param dwConfigure WP mode configure value.
+ */
+extern void HSMCI_ConfigureWP(Hsmci *pRMci, uint32_t dwConfigure)
+{
+ pRMci->HSMCI_WPMR = dwConfigure;
+}
+
+/**
+ * \brief Return the write protect status register.
+ *
+ * \param pRMci Pointer to an Hsmci instance.
+ * \return MCI write protect status register.
+ */
+extern uint32_t HSMCI_GetWPStatus(Hsmci *pRMci)
+{
+ return pRMci->HSMCI_WPSR;
+}
+
+/**@}*/
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/matrix.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/matrix.c
new file mode 100644
index 0000000..a3916ba
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/matrix.c
@@ -0,0 +1,33 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/*------------------------------------------------------------------------------
+ * Headers
+ *------------------------------------------------------------------------------*/
+#include "chip.h"
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/pio.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/pio.c
new file mode 100644
index 0000000..170dd9b
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/pio.c
@@ -0,0 +1,197 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/** \file
+ *
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+#include "chip.h"
+
+/*----------------------------------------------------------------------------
+ * Local functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Configures one or more pin(s) of a PIO controller as being controlled by
+ * peripheral A. Optionally, the corresponding internal pull-up(s) can be enabled.
+ *
+ * \param pio Pointer to a PIO controller.
+ * \param mask Bitmask of one or more pin(s) to configure.
+ * \param enablePullUp Indicates if the pin(s) internal pull-up shall be
+ * configured.
+ */
+extern void PIO_SetPeripheralA( Pio *pio, uint32_t dwMask, uint32_t dwOptions )
+{
+ /* Disable interrupts on the pin(s) */
+ pio->PIO_IDR = dwMask ;
+
+ /* Enable the pull-up(s) if necessary */
+ if ( dwOptions == PIO_PULLUP )
+ {
+ pio->PIO_PUER = dwMask ;
+ }
+ else
+ {
+ pio->PIO_PUDR = dwMask ;
+ }
+
+ pio->PIO_ABSR &= ~dwMask ;
+ pio->PIO_PDR = dwMask ;
+}
+
+/**
+ * \brief Configures one or more pin(s) of a PIO controller as being controlled by
+ * peripheral B. Optionally, the corresponding internal pull-up(s) can be enabled.
+ *
+ * \param pio Pointer to a PIO controller.
+ * \param mask Bitmask of one or more pin(s) to configure.
+ * \param enablePullUp Indicates if the pin(s) internal pull-up shall be
+ * configured.
+ */
+extern void PIO_SetPeripheralB( Pio *pio, uint32_t dwMask, uint32_t dwOptions )
+{
+ /* Disable interrupts on the pin(s) */
+ pio->PIO_IDR = dwMask ;
+
+ /* Enable the pull-up(s) if necessary */
+ if ( dwOptions == PIO_PULLUP )
+ {
+ pio->PIO_PUER = dwMask ;
+ }
+ else
+ {
+ pio->PIO_PUDR = dwMask ;
+ }
+
+ pio->PIO_ABSR |= dwMask ;
+ pio->PIO_PDR = dwMask ;
+}
+
+/**
+ * \brief Configures one or more pin(s) or a PIO controller as inputs. Optionally,
+ * the corresponding internal pull-up(s) and glitch filter(s) can be enabled.
+ *
+ * \param pPio Pointer to a PIO controller.
+ * \param dwMask Bitmask indicating which pin(s) to configure as input(s).
+ * \param dwAttribute Input attributes.
+ */
+extern void PIO_SetInput( Pio* pPio, uint32_t dwMask, uint32_t dwAttributes )
+{
+ /* Disable interrupts */
+ pPio->PIO_IDR = dwMask ;
+
+ /* Enable pull-up(s) if necessary */
+ if ( dwAttributes & PIO_PULLUP )
+ {
+ pPio->PIO_PUER = dwMask ;
+ }
+ else
+ {
+ pPio->PIO_PUDR = dwMask ;
+ }
+
+ /* Enable Input Filter if necessary */
+ if ( dwAttributes & (PIO_DEGLITCH | PIO_DEBOUNCE) )
+ {
+ pPio->PIO_IFER = dwMask ;
+ }
+ else
+ {
+ pPio->PIO_IFDR = dwMask ;
+ }
+
+ /* Enable de-glitch or de-bounce if necessary */
+ if ( dwAttributes & PIO_DEGLITCH )
+ {
+ pPio->PIO_SCIFSR = dwMask ;
+ }
+ else
+ {
+ if ( dwAttributes & PIO_DEBOUNCE )
+ {
+ pPio->PIO_DIFSR = dwMask ;
+ }
+ }
+
+ /* Configure pin as input */
+ pPio->PIO_ODR = dwMask ;
+ pPio->PIO_PER = dwMask ;
+}
+
+/**
+ * \brief Configures one or more pin(s) of a PIO controller as outputs, with the
+ * given default value. Optionally, the multi-drive feature can be enabled
+ * on the pin(s).
+ *
+ * \param pPio Pointer to a PIO controller.
+ * \param dwMask Bitmask indicating which pin(s) to configure.
+ * \param dwOptions Default level on the pin(s).
+ */
+extern void PIO_SetOutput( Pio* pPio, uint32_t dwMask, uint32_t dwOptions )
+{
+ /* Disable interrupts */
+ pPio->PIO_IDR = dwMask ;
+
+ /* Enable pull-up(s) if necessary */
+ if ( (dwOptions & PIO_PULLUP) == PIO_PULLUP )
+ {
+ pPio->PIO_PUER = dwMask ;
+ }
+ else
+ {
+ pPio->PIO_PUDR = dwMask ;
+ }
+
+ /* Enable multi-drive if necessary */
+ if ( (dwOptions & PIO_OPENDRAIN) == PIO_OPENDRAIN )
+ {
+ pPio->PIO_MDER = dwMask ;
+ }
+ else
+ {
+ pPio->PIO_MDDR = dwMask ;
+ }
+
+ /* Set default value */
+ if ( (dwOptions & PIO_OUTPUT_HIGH) == PIO_OUTPUT_HIGH )
+ {
+ pPio->PIO_SODR = dwMask ;
+ }
+ else
+ {
+ pPio->PIO_CODR = dwMask ;
+ }
+
+ /* Configure pin(s) as output(s) */
+ pPio->PIO_OER = dwMask ;
+ pPio->PIO_PER = dwMask ;
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/pio_it.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/pio_it.c
new file mode 100644
index 0000000..8867f0d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/pio_it.c
@@ -0,0 +1,175 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * Implementation of the PIO low level handlers.
+ */
+
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "chip.h"
+
+#include <assert.h>
+
+/*----------------------------------------------------------------------------
+ * Global Functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Parallel IO Controller A interrupt handler
+ * \Redefined PIOA interrupt handler for NVIC interrupt table.
+ */
+extern void PIOA_IrqHandler( void )
+{
+ PioInterruptHandler( ID_PIOA, PIOA ) ;
+}
+
+/**
+ * \brief Parallel IO Controller B interrupt handler
+ * \Redefined PIOB interrupt handler for NVIC interrupt table.
+ */
+extern void PIOB_IrqHandler( void )
+{
+ PioInterruptHandler( ID_PIOB, PIOB ) ;
+}
+
+/**
+ * \brief Parallel IO Controller C interrupt handler
+ * \Redefined PIOC interrupt handler for NVIC interrupt table.
+ */
+extern void PIOC_IrqHandler( void )
+{
+ PioInterruptHandler( ID_PIOC, PIOC ) ;
+}
+
+/**
+ * \brief Parallel IO Controller D interrupt handler
+ * \Redefined PIOD interrupt handler for NVIC interrupt table.
+ */
+extern void PIOD_IrqHandler( void )
+{
+ PioInterruptHandler( ID_PIOD, PIOD ) ;
+}
+
+/**
+ * \brief Parallel IO Controller E interrupt handler
+ * \Redefined PIOE interrupt handler for NVIC interrupt table.
+ */
+extern void PIOE_IrqHandler( void )
+{
+ PioInterruptHandler( ID_PIOE, PIOE ) ;
+}
+
+/**
+ * \brief Parallel IO Controller F interrupt handler
+ * \Redefined PIOF interrupt handler for NVIC interrupt table.
+ */
+extern void PIOF_IrqHandler( void )
+{
+ PioInterruptHandler( ID_PIOF, PIOF ) ;
+}
+
+
+/**
+ * \brief Initializes the PIO interrupt management logic
+ *
+ * The desired priority of PIO interrupts must be provided.
+ * Calling this function multiple times result in the reset of currently
+ * configured interrupts.
+ *
+ * \param priority PIO controller interrupts priority.
+ */
+extern void PIO_InitializeInterrupts( uint32_t dwPriority )
+{
+ TRACE_DEBUG( "PIO_Initialize()\n\r" ) ;
+
+ /* Reset sources */
+// _dwNumSources = 0 ;
+
+ /* Configure PIO interrupt sources */
+ TRACE_DEBUG( "PIO_Initialize: Configuring PIOA\n\r" ) ;
+ PMC_EnablePeripheral( ID_PIOA ) ;
+ PIOA->PIO_ISR ;
+ PIOA->PIO_IDR = 0xFFFFFFFF ;
+ NVIC_DisableIRQ( PIOA_IRQn ) ;
+ NVIC_ClearPendingIRQ( PIOA_IRQn ) ;
+ NVIC_SetPriority( PIOA_IRQn, dwPriority ) ;
+ NVIC_EnableIRQ( PIOA_IRQn ) ;
+
+ TRACE_DEBUG( "PIO_Initialize: Configuring PIOB\n\r" ) ;
+ PMC_EnablePeripheral( ID_PIOB ) ;
+ PIOB->PIO_ISR ;
+ PIOB->PIO_IDR = 0xFFFFFFFF ;
+ NVIC_DisableIRQ( PIOB_IRQn ) ;
+ NVIC_ClearPendingIRQ( PIOB_IRQn ) ;
+ NVIC_SetPriority( PIOB_IRQn, dwPriority ) ;
+ NVIC_EnableIRQ( PIOB_IRQn ) ;
+
+ TRACE_DEBUG( "PIO_Initialize: Configuring PIOC\n\r" ) ;
+ PMC_EnablePeripheral( ID_PIOC ) ;
+ PIOC->PIO_ISR ;
+ PIOC->PIO_IDR = 0xFFFFFFFF ;
+ NVIC_DisableIRQ( PIOC_IRQn ) ;
+ NVIC_ClearPendingIRQ( PIOC_IRQn ) ;
+ NVIC_SetPriority( PIOC_IRQn, dwPriority ) ;
+ NVIC_EnableIRQ( PIOC_IRQn ) ;
+
+ TRACE_DEBUG( "PIO_Initialize: Configuring PIOD\n\r" ) ;
+ PMC_EnablePeripheral( ID_PIOD ) ;
+ PIOD->PIO_ISR ;
+ PIOD->PIO_IDR = 0xFFFFFFFF ;
+ NVIC_DisableIRQ( PIOD_IRQn ) ;
+ NVIC_ClearPendingIRQ( PIOD_IRQn ) ;
+ NVIC_SetPriority( PIOD_IRQn, dwPriority ) ;
+ NVIC_EnableIRQ( PIOD_IRQn ) ;
+
+ TRACE_DEBUG( "PIO_Initialize: Configuring PIOE\n\r" ) ;
+ PMC_EnablePeripheral( ID_PIOE ) ;
+ PIOE->PIO_ISR ;
+ PIOE->PIO_IDR = 0xFFFFFFFF ;
+ NVIC_DisableIRQ( PIOE_IRQn ) ;
+ NVIC_ClearPendingIRQ( PIOE_IRQn ) ;
+ NVIC_SetPriority( PIOE_IRQn, dwPriority ) ;
+ NVIC_EnableIRQ( PIOE_IRQn ) ;
+
+ TRACE_DEBUG( "PIO_Initialize: Configuring PIOF\n\r" ) ;
+ PMC_EnablePeripheral( ID_PIOF ) ;
+ PIOF->PIO_ISR ;
+ PIOF->PIO_IDR = 0xFFFFFFFF ;
+ NVIC_DisableIRQ( PIOF_IRQn ) ;
+ NVIC_ClearPendingIRQ( PIOF_IRQn ) ;
+ NVIC_SetPriority( PIOF_IRQn, dwPriority ) ;
+ NVIC_EnableIRQ( PIOF_IRQn ) ;
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/pio_pin.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/pio_pin.c
new file mode 100644
index 0000000..6ace148
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/pio_pin.c
@@ -0,0 +1,254 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/** \file */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+#include "chip.h"
+
+/*----------------------------------------------------------------------------
+ * Global functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Configures a list of Pin instances, each of which can either hold a single
+ * pin or a group of pins, depending on the mask value; all pins are configured
+ * by this function. The size of the array must also be provided and is easily
+ * computed using PIO_LISTSIZE whenever its length is not known in advance.
+ *
+ * \param list Pointer to a list of Pin instances.
+ * \param size Size of the Pin list (calculated using PIO_LISTSIZE).
+ *
+ * \return 1 if the pins have been configured properly; otherwise 0.
+ */
+extern uint32_t PIO_PinConfigure( const Pin* pPins, uint32_t dwSize )
+{
+ uint32_t dwOptions=0 ;
+
+ /* Configure pins */
+ while ( dwSize > 0 )
+ {
+ switch ( pPins->type )
+ {
+ case PIO_PERIPH_A :
+ if ( pPins->attribute & PIO_PULLUP )
+ {
+ dwOptions=PIO_PULLUP ;
+ }
+
+ PIO_SetPeripheralA( pPins->pio, pPins->mask, dwOptions ) ;
+ break ;
+
+ case PIO_PERIPH_B :
+ if ( pPins->attribute & PIO_PULLUP )
+ {
+ dwOptions=PIO_PULLUP ;
+ }
+
+ PIO_SetPeripheralB( pPins->pio, pPins->mask, dwOptions ) ;
+ break ;
+
+ case PIO_INPUT :
+ PMC_EnablePeripheral( pPins->id ) ;
+ PIO_SetInput( pPins->pio, pPins->mask, pPins->attribute ) ;
+ break ;
+
+ case PIO_OUTPUT_0 :
+ case PIO_OUTPUT_1 :
+ if ( pPins->type == PIO_OUTPUT_1 )
+ {
+ dwOptions|=PIO_OUTPUT_HIGH ;
+ }
+
+ if ( pPins->attribute & PIO_OPENDRAIN )
+ {
+ dwOptions|=PIO_OPENDRAIN ;
+ }
+
+ if ( pPins->attribute & PIO_PULLUP )
+ {
+ dwOptions|=PIO_PULLUP ;
+ }
+
+ PIO_SetOutput( pPins->pio, pPins->mask, dwOptions ) ;
+ break ;
+
+ default :
+ return 0 ;
+ }
+
+ pPins++ ;
+ dwSize-- ;
+ }
+
+ return 1 ;
+}
+
+/**
+ * \brief Sets a high output level on all the PIOs defined in the given Pin instance.
+ * This has no immediate effects on PIOs that are not output, but the PIO
+ * controller will memorize the value they are changed to outputs.
+ *
+ * \param pin Pointer to a Pin instance describing one or more pins.
+ */
+extern void PIO_PinSet( const Pin* pPin )
+{
+ pPin->pio->PIO_SODR = pPin->mask ;
+}
+
+/**
+ * \brief Sets a low output level on all the PIOs defined in the given Pin instance.
+ * This has no immediate effects on PIOs that are not output, but the PIO
+ * controller will memorize the value they are changed to outputs.
+ *
+ * \param pin Pointer to a Pin instance describing one or more pins.
+ */
+extern void PIO_PinClear( const Pin* pPin )
+{
+ pPin->pio->PIO_CODR = pPin->mask ;
+}
+
+/**
+ * \brief Returns 1 if one or more PIO of the given Pin instance currently have
+ * a high level; otherwise returns 0. This method returns the actual value that
+ * is being read on the pin. To return the supposed output value of a pin, use
+ * PIO_GetOutputDataStatus() instead.
+ *
+ * \param pin Pointer to a Pin instance describing one or more pins.
+ *
+ * \return 1 if the Pin instance contains at least one PIO that currently has
+ * a high level; otherwise 0.
+ */
+extern uint32_t PIO_PinGet( const Pin* pPin )
+{
+ uint32_t dwReg ;
+
+ if ( (pPin->type == PIO_OUTPUT_0) || (pPin->type == PIO_OUTPUT_1) )
+ {
+ dwReg = pPin->pio->PIO_ODSR ;
+ }
+ else
+ {
+ dwReg = pPin->pio->PIO_PDSR ;
+ }
+
+ if ( (dwReg & pPin->mask) == 0 )
+ {
+ return 0 ;
+ }
+ else
+ {
+ return 1 ;
+ }
+}
+
+/**
+ * \brief Returns 1 if one or more PIO of the given Pin are configured to output a
+ * high level (even if they are not output).
+ * To get the actual value of the pin, use PIO_Get() instead.
+ *
+ * \param pin Pointer to a Pin instance describing one or more pins.
+ *
+ * \return 1 if the Pin instance contains at least one PIO that is configured
+ * to output a high level; otherwise 0.
+ */
+extern uint32_t PIO_PinGetOutputDataStatus( const Pin* pPin )
+{
+ if ( (pPin->pio->PIO_ODSR & pPin->mask) == 0 )
+ {
+ return 0 ;
+ }
+ else
+ {
+ return 1 ;
+ }
+}
+
+/*
+ * \brief Configures Glitch or Debouncing filter for input.
+ *
+ * \param pPin Pointer to a Pin instance describing one or more pins.
+ * \param dwCutOff Cut off frequency for debounce filter.
+ */
+extern void PIO_PinSetDebounceFilter( const Pin* pPin, uint32_t dwCutOff )
+{
+ Pio* pPio = pPin->pio ;
+
+ pPio->PIO_DIFSR = pPin->mask; /* set Debouncing, 0 bit field no effect */
+ pPio->PIO_SCDR = PIO_SCDR_DIV( (32678/(dwCutOff << 1)) - 1 ) ;
+}
+/*
+ * \brief Enable write protect.
+ *
+ * \param pin Pointer to a Pin instance describing one or more pins.
+ */
+void PIO_PinEnableWriteProtect( const Pin *pin )
+{
+ Pio *pio = pin->pio;
+
+ pio->PIO_WPMR = ( PIO_WPMR_WPKEY_VALID | PIO_WPMR_WPEN_EN );
+}
+
+/*
+ * \brief Disable write protect.
+ *
+ * \param pin Pointer to a Pin instance describing one or more pins.
+ */
+
+void PIO_PinDisableWriteProtect( const Pin *pin )
+{
+ Pio *pio = pin->pio;
+
+ pio->PIO_WPMR = ( PIO_WPMR_WPKEY_VALID | PIO_WPMR_WPEN_DIS );
+}
+
+/*
+ * \brief Get write protect violation information.
+ *
+ * \param pin Pointer to a Pin instance describing one or more pins.
+ */
+
+uint32_t PIO_PinGetWriteProtectViolationInfo( const Pin * pin )
+{
+ Pio *pio = pin->pio;
+ return (pio->PIO_WPSR);
+}
+/* \brief Set pin type
+ * the pin is controlled by the corresponding peripheral (A, B, C, D,E)
+ * \param pin Pointer to a Pin instance describing one or more pins.
+ * \param pinType PIO_PERIPH_A, PIO_PERIPH_B, ...
+ */
+
+void PIO_PinSetPinType( Pin * pin, uint8_t pinType)
+{
+ pin->type = pinType;
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/pio_pin_it.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/pio_pin_it.c
new file mode 100644
index 0000000..fdf0dac
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/pio_pin_it.c
@@ -0,0 +1,221 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/** \file */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+#include "chip.h"
+
+/*----------------------------------------------------------------------------
+ * Local definitions
+ *----------------------------------------------------------------------------*/
+
+/* Maximum number of interrupt sources that can be defined. This
+ * constant can be increased, but the current value is the smallest possible
+ * that will be compatible with all existing projects. */
+#define MAX_INTERRUPT_SOURCES 7
+
+/*----------------------------------------------------------------------------
+ * Local types
+ *----------------------------------------------------------------------------*/
+
+/**
+ * Describes a PIO interrupt source, including the PIO instance triggering the
+ * interrupt and the associated interrupt handler.
+ */
+typedef struct _InterruptSource
+{
+ /* Pointer to the source pin instance. */
+ const Pin *pPin ;
+
+ /* Interrupt handler. */
+ void (*handler)( const Pin* ) ;
+} InterruptSource ;
+
+/*----------------------------------------------------------------------------
+ * Local variables
+ *----------------------------------------------------------------------------*/
+
+/* List of interrupt sources. */
+static InterruptSource _aIntSources[MAX_INTERRUPT_SOURCES] ;
+
+/* Number of currently defined interrupt sources. */
+static uint32_t _dwNumSources = 0 ;
+
+/*----------------------------------------------------------------------------
+ * Local Functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Handles all interrupts on the given PIO controller.
+ * \param id PIO controller ID.
+ * \param pPio PIO controller base address.
+ */
+extern void PioInterruptHandler( uint32_t id, Pio *pPio )
+{
+ uint32_t status ;
+ uint32_t i ;
+
+ /* Read PIO controller status */
+ status = pPio->PIO_ISR ;
+ status &= pPio->PIO_IMR ;
+
+ /* Check pending events */
+ if ( status != 0 )
+ {
+ TRACE_DEBUG( "PIO interrupt on PIO controller #%d\n\r", id ) ;
+
+ /* Find triggering source */
+ i = 0 ;
+ while ( status != 0 )
+ {
+ /* There cannot be an unconfigured source enabled. */
+ assert( i < _dwNumSources ) ;
+
+ /* Source is configured on the same controller */
+ if ( _aIntSources[i].pPin->id == id )
+ {
+ /* Source has PIOs whose statuses have changed */
+ if ( (status & _aIntSources[i].pPin->mask) != 0 )
+ {
+ TRACE_DEBUG( "Interrupt source #%d triggered\n\r", i ) ;
+
+ _aIntSources[i].handler(_aIntSources[i].pPin ) ;
+ status &= ~(_aIntSources[i].pPin->mask) ;
+ }
+ }
+ i++ ;
+ }
+ }
+}
+
+/**
+ * Configures a PIO or a group of PIO to generate an interrupt on status
+ * change. The provided interrupt handler will be called with the triggering
+ * pin as its parameter (enabling different pin instances to share the same
+ * handler).
+ * \param pPin Pointer to a Pin instance.
+ * \param handler Interrupt handler function pointer.
+ */
+extern void PIO_PinConfigureIt( const Pin *pPin, void (*handler)( const Pin* ) )
+{
+ Pio* pio ;
+ InterruptSource* pSource ;
+
+ TRACE_DEBUG( "PIO_ConfigureIt()\n\r" ) ;
+
+ assert( pPin ) ;
+ pio = pPin->pio ;
+ assert( _dwNumSources < MAX_INTERRUPT_SOURCES ) ;
+
+ /* Define new source */
+ TRACE_DEBUG( "PIO_ConfigureIt: Defining new source #%d.\n\r", _dwNumSources ) ;
+
+ pSource = &(_aIntSources[_dwNumSources]) ;
+ pSource->pPin = pPin ;
+ pSource->handler = handler ;
+ _dwNumSources++ ;
+
+ /* PIO3 with additional interrupt support
+ * Configure additional interrupt mode registers */
+ if ( pPin->attribute & PIO_IT_AIME )
+ {
+ // enable additional interrupt mode
+ pio->PIO_AIMER = pPin->mask ;
+
+ // if bit field of selected pin is 1, set as Rising Edge/High level detection event
+ if ( pPin->attribute & PIO_IT_RE_OR_HL )
+ {
+ pio->PIO_REHLSR = pPin->mask ;
+ }
+ else
+ {
+ pio->PIO_FELLSR = pPin->mask;
+ }
+
+ /* if bit field of selected pin is 1, set as edge detection source */
+ if (pPin->attribute & PIO_IT_EDGE)
+ pio->PIO_ESR = pPin->mask;
+ else
+ pio->PIO_LSR = pPin->mask;
+ }
+ else
+ {
+ /* disable additional interrupt mode */
+ pio->PIO_AIMDR = pPin->mask;
+ }
+}
+
+/**
+ * Enables the given interrupt source if it has been configured. The status
+ * register of the corresponding PIO controller is cleared prior to enabling
+ * the interrupt.
+ * \param pPin Interrupt source to enable.
+ */
+extern void PIO_PinEnableIt( const Pin *pPin )
+{
+ TRACE_DEBUG( "PIO_EnableIt()\n\r" ) ;
+
+ assert( pPin != NULL ) ;
+
+#ifndef NOASSERT
+ uint32_t i = 0;
+ uint32_t dwFound = 0;
+
+ while ( (i < _dwNumSources) && !dwFound )
+ {
+ if ( _aIntSources[i].pPin == pPin )
+ {
+ dwFound = 1 ;
+ }
+ i++ ;
+ }
+ assert( dwFound != 0 ) ;
+#endif
+
+ pPin->pio->PIO_ISR ;
+ pPin->pio->PIO_IER = pPin->mask ;
+}
+
+/**
+ * Disables a given interrupt source, with no added side effects.
+ *
+ * \param pPin Interrupt source to disable.
+ */
+extern void PIO_PinDisableIt( const Pin *pPin )
+{
+ assert( pPin != NULL ) ;
+
+ TRACE_DEBUG( "PIO_DisableIt()\n\r" ) ;
+
+ pPin->pio->PIO_IDR = pPin->mask ;
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/pmc.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/pmc.c
new file mode 100644
index 0000000..e7e03aa
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/pmc.c
@@ -0,0 +1,613 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+ * \file
+ *
+ * Implementation of the power management control low level functions.
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "chip.h"
+
+#include <assert.h>
+
+/*----------------------------------------------------------------------------
+ * Local definitions
+ *----------------------------------------------------------------------------*/
+
+#define MASK_STATUS0 0xFFFFFF00
+#define MASK_STATUS1 0xFFFFFFFF
+
+/*----------------------------------------------------------------------------
+ * Local variables
+ *----------------------------------------------------------------------------*/
+
+/* Startup count for 4/8/12MHz fast RC */
+uint32_t PmcFastRcCnt = DEFAUTL_FAST_RC_COUNT;
+/* Startup count for 3-20MHz main oscilator */
+uint32_t PmcMainOscCnt = DEFAUTL_MAIN_OSC_COUNT;
+/* Startup count for PLLA */
+uint32_t PmcPllaCnt = DEFAUTL_PLLA_COUNT;
+/* Startup count for UPLL */
+uint32_t PmcUpllCnt = DEFAUTL_UPLL_COUNT;
+
+/*----------------------------------------------------------------------------
+ * Local functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Switch MCK to PLLA clock.
+ */
+static void _PMC_SwitchMck2PllaClock(void)
+
+{
+ /* Select PLLA as input clock for MCK */
+ PMC->PMC_MCKR = (PMC->PMC_MCKR & ~PMC_MCKR_CSS_Msk) | PMC_MCKR_CSS_PLLA_CLK ;
+
+ /* Wait until the master clock is established */
+ while( !(PMC->PMC_SR & PMC_SR_MCKRDY) );
+}
+
+/**
+ * \brief Switch MCK to UPLL clock.
+ */
+static void _PMC_SwitchMck2UpllClock(void)
+{
+ /* Select UPLL as input clock for MCK */
+ /* UPLLDIV must be set (clock divided by 2) when UPLL is selected as source of clock for MCK. */
+ PMC->PMC_MCKR = (PMC->PMC_MCKR & ~PMC_MCKR_CSS_Msk) | PMC_MCKR_CSS_UPLL_CLK
+ | PMC_MCKR_UPLLDIV;
+
+ /* Wait until the master clock is established */
+ while( !(PMC->PMC_SR & PMC_SR_MCKRDY) );
+}
+
+/**
+ * \brief Switch MCK to main clock.
+ */
+static void _PMC_SwitchMck2MainClock(void)
+{
+ /* Select Main Oscillator as input clock for MCK */
+ PMC->PMC_MCKR = (PMC->PMC_MCKR & ~PMC_MCKR_CSS_Msk) | PMC_MCKR_CSS_MAIN_CLK ;
+
+ /* Wait until the master clock is established */
+ while( !(PMC->PMC_SR & PMC_SR_MCKRDY) );
+}
+
+/**
+ * \brief Switch MCK to slow clock.
+ */
+static void _PMC_SwitchMck2SlowClock(void)
+{
+ /* Select Slow Clock as input clock for MCK */
+ PMC->PMC_MCKR = (PMC->PMC_MCKR & ~PMC_MCKR_CSS_Msk) | PMC_MCKR_CSS_SLOW_CLK ;
+
+ /* Wait until the master clock is established */
+ while( !(PMC->PMC_SR & PMC_SR_MCKRDY) );
+}
+
+/**
+ * \brief Set prescaler for MCK.
+ *
+ * \param prescaler Master Clock prescaler
+ */
+static void _PMC_SetMckPrescaler(uint32_t prescaler)
+{
+ /* Change MCK Prescaler divider in PMC_MCKR register */
+ PMC->PMC_MCKR = (PMC->PMC_MCKR & ~PMC_MCKR_PRES_Msk) | prescaler;
+
+ /* Wait until the master clock is established */
+ while( !(PMC->PMC_SR & PMC_SR_MCKRDY) );
+}
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Enables the clock of a peripheral. The peripheral ID is used
+ * to identify which peripheral is targetted.
+ *
+ * \note The ID must NOT be shifted (i.e. 1 << ID_xxx).
+ *
+ * \param id Peripheral ID (ID_xxx).
+ */
+extern void PMC_EnablePeripheral( uint32_t dwId )
+{
+ assert( dwId < 45 ) ;
+
+ if ( dwId < 32 )
+ {
+ if ( (PMC->PMC_PCSR0 & ((uint32_t)1 << dwId)) == ((uint32_t)1 << dwId) )
+ {
+ TRACE_DEBUG( "PMC_EnablePeripheral: clock of peripheral" " %u is already enabled\n\r", dwId ) ;
+ }
+ else
+ {
+ PMC->PMC_PCER0 = 1 << dwId ;
+ }
+ }
+ else
+ {
+ dwId -= 32;
+ if ((PMC->PMC_PCSR1 & ((uint32_t)1 << dwId)) == ((uint32_t)1 << dwId))
+ {
+ TRACE_DEBUG( "PMC_EnablePeripheral: clock of peripheral" " %u is already enabled\n\r", dwId + 32 ) ;
+ }
+ else
+ {
+ PMC->PMC_PCER1 = 1 << dwId ;
+ }
+ }
+}
+
+/**
+ * \brief Disables the clock of a peripheral. The peripheral ID is used
+ * to identify which peripheral is targetted.
+ *
+ * \note The ID must NOT be shifted (i.e. 1 << ID_xxx).
+ *
+ * \param id Peripheral ID (ID_xxx).
+ */
+extern void PMC_DisablePeripheral( uint32_t dwId )
+{
+ assert( dwId < 45 ) ;
+
+ if ( dwId < 32 )
+ {
+ if ( (PMC->PMC_PCSR0 & ((uint32_t)1 << dwId)) != ((uint32_t)1 << dwId) )
+ {
+ TRACE_DEBUG("PMC_DisablePeripheral: clock of peripheral" " %u is not enabled\n\r", dwId ) ;
+ }
+ else
+ {
+ PMC->PMC_PCDR0 = 1 << dwId ;
+ }
+ }
+ else
+ {
+ dwId -= 32 ;
+ if ( (PMC->PMC_PCSR1 & ((uint32_t)1 << dwId)) != ((uint32_t)1 << dwId) )
+ {
+ TRACE_DEBUG( "PMC_DisablePeripheral: clock of peripheral" " %u is not enabled\n\r", dwId + 32 ) ;
+ }
+ else
+ {
+ PMC->PMC_PCDR1 = 1 << dwId ;
+ }
+ }
+}
+
+/**
+ * \brief Enable all the periph clock via PMC.
+ */
+extern void PMC_EnableAllPeripherals( void )
+{
+ PMC->PMC_PCER0 = MASK_STATUS0 ;
+ while ( (PMC->PMC_PCSR0 & MASK_STATUS0) != MASK_STATUS0 ) ;
+
+ PMC->PMC_PCER1 = MASK_STATUS1 ;
+ while ( (PMC->PMC_PCSR1 & MASK_STATUS1) != MASK_STATUS1 ) ;
+
+ TRACE_DEBUG( "Enable all periph clocks\n\r" ) ;
+}
+
+/**
+ * \brief Disable all the periph clock via PMC.
+ */
+extern void PMC_DisableAllPeripherals( void )
+{
+ PMC->PMC_PCDR0 = MASK_STATUS0 ;
+ while ( (PMC->PMC_PCSR0 & MASK_STATUS0) != 0 ) ;
+
+ PMC->PMC_PCDR1 = MASK_STATUS1 ;
+ while ( (PMC->PMC_PCSR1 & MASK_STATUS1) != 0 ) ;
+
+ TRACE_DEBUG( "Disable all periph clocks\n\r" ) ;
+}
+
+/**
+ * \brief Get Periph Status for the given peripheral ID.
+ *
+ * \param id Peripheral ID (ID_xxx).
+ */
+extern uint32_t PMC_IsPeriphEnabled( uint32_t dwId )
+{
+ assert( dwId < 45 ) ;
+
+ if ( dwId < 32 )
+ {
+ return ( PMC->PMC_PCSR0 & (1 << dwId) ) ;
+ }
+ else {
+ return ( PMC->PMC_PCSR1 & (1 << (dwId - 32)) ) ;
+ }
+}
+
+/**
+ * \brief Enable Programmable Clock x Output.
+ *
+ * \param pck pck ID (shifted as in register)
+ */
+extern void PMC_EnablePck(uint32_t pck)
+{
+ PMC->PMC_SCER = pck;
+}
+
+/**
+ * \brief Disable Programmable Clock x Output
+ *
+ * \param pck pck ID (shifted as in register)
+ */
+extern void PMC_DisablePck(uint32_t pck)
+{
+ PMC->PMC_SCDR = pck;
+}
+
+/**
+ * \brief Configure Programmable Clock with clock source and prescaler.
+ *
+ * \param id pck id (0, 1, 2)
+ * \param clockSource clock source input for pck
+ * \param prescaler prescaler for pck
+ *
+ * \note
+ * It is strongly recommended to disable the Programmable Clock before any
+ * configuration change and to re-enable it after the change is actually performed.
+ */
+extern void PMC_ConfigurePck(uint32_t id, uint32_t clockSource, uint32_t prescaler)
+{
+ /* Configure PMC Programmable Clock */
+ if (id == 0)
+ {
+ PMC->PMC_PCK[0] = clockSource | prescaler;
+ while ( (PMC->PMC_SR & PMC_SR_PCKRDY0) == 0 );
+ }
+ else if (id == 1)
+ {
+ PMC->PMC_PCK[1] = clockSource | prescaler;
+ while ( (PMC->PMC_SR & PMC_SR_PCKRDY1) == 0 );
+ }
+ else if (id == 2)
+ {
+ PMC->PMC_PCK[2] = clockSource | prescaler;
+ while ( (PMC->PMC_SR & PMC_SR_PCKRDY2) == 0 );
+ }
+}
+
+/**
+ * \brief Select external 32K Crystal.
+ *
+ * \note
+ * There's no option to return to internal slow RC after switching to ext 32kHz crystal.
+ */
+/* TBD: move it to SUPC driver. */
+extern void SUPC_SelectExtCrystal32K(void)
+{
+ /* Select XTAL 32k instead of internal slow RC 32k for slow clock */
+ if ( (SUPC->SUPC_SR & SUPC_SR_OSCSEL) != SUPC_SR_OSCSEL_CRYST )
+ {
+ SUPC->SUPC_CR = SUPC_CR_KEY(0xA5u) | SUPC_CR_XTALSEL_CRYSTAL_SEL;
+
+ while( !(SUPC->SUPC_SR & SUPC_SR_OSCSEL) );
+ }
+}
+
+/**
+ * \ Set startup time of 4/8/12MHz fast RC, 3-20MHz main oscilator, PLLA, UPLL.
+ *
+ * \param fastRcCnt Count for fast RC
+ * \param mainOscCnt Count for main OSC
+ * \param pllaCnt Count for PLLA
+ * \param upllCnt Count for UPLL
+ */
+extern void PMC_SetStartupTime(uint32_t fastRcCnt, uint32_t mainOscCnt, uint32_t pllaCnt, uint32_t upllCnt)
+{
+ if (fastRcCnt != DEFAUTL_COUNT_NO_CHANGE)
+ {
+ PmcFastRcCnt = fastRcCnt;
+ }
+
+ if (mainOscCnt != DEFAUTL_COUNT_NO_CHANGE)
+ {
+ PmcMainOscCnt = mainOscCnt;
+ }
+
+ if (pllaCnt != DEFAUTL_COUNT_NO_CHANGE)
+ {
+ PmcPllaCnt = pllaCnt;
+ }
+
+ if (upllCnt != DEFAUTL_COUNT_NO_CHANGE)
+ {
+ PmcUpllCnt = upllCnt;
+ }
+}
+
+/**
+ * \ Get startup time of 4/8/12MHz fast RC, 3-20MHz main oscilator, PLLA, UPLL.
+ *
+ * \param pFastRcCnt Count for fast RC
+ * \param pMainOscCnt Count for main OSC
+ * \param pPllaCnt Count for PLLA
+ * \param pUpllCnt Count for UPLL
+ */
+extern void PMC_GetStartupTime(uint32_t *pFastRcCnt, uint32_t *pMainOscCnt, uint32_t *pPllaCnt, uint32_t *pUpllCnt)
+{
+ if (pFastRcCnt != NULL)
+ {
+ *pFastRcCnt = PmcFastRcCnt;
+ }
+
+ if (pMainOscCnt != NULL)
+ {
+ *pMainOscCnt = PmcMainOscCnt;
+ }
+
+ if (pPllaCnt != NULL)
+ {
+ *pPllaCnt = PmcPllaCnt;
+ }
+
+ if (pUpllCnt != NULL)
+ {
+ *pUpllCnt = PmcUpllCnt;
+ }
+}
+
+/**
+ * \brief Enable external 12MHz oscilator as main clock input.
+ */
+extern void PMC_EnableExtOsc12MHz(void)
+{
+ uint32_t read_MOR;
+
+ /* Before switching MAIN OSC on external crystal : enable it and don't disable
+ * at the same time RC OSC in case of if MAIN OSC is still using RC OSC
+ */
+
+ read_MOR = PMC->CKGR_MOR;
+
+ read_MOR &= ~CKGR_MOR_MOSCRCF_Msk; /* reset MOSCRCF field in MOR register before select RC 12MHz */
+
+ read_MOR |= (CKGR_MOR_KEY(0x37u) |
+ CKGR_MOR_MOSCRCF_12MHz |
+ CKGR_MOR_MOSCXTEN |
+ CKGR_MOR_MOSCRCEN |
+ CKGR_MOR_MOSCXTST(PmcMainOscCnt)); /* enable external crystal - enable RC OSC */
+
+ PMC->CKGR_MOR = read_MOR;
+
+ while( !(PMC->PMC_SR & PMC_SR_MOSCRCS ) ); /* wait end of RC oscillator stabilization */
+ while( !(PMC->PMC_SR & PMC_SR_MCKRDY) );
+
+ read_MOR |= CKGR_MOR_MOSCSEL; /* select external crystal */
+
+ PMC->CKGR_MOR = read_MOR;
+
+ while( !(PMC->PMC_SR & PMC_SR_MOSCSELS ) ); /* Wait end of Main Oscillator Selection */
+ while( !(PMC->PMC_SR & PMC_SR_MCKRDY) );
+}
+
+/**
+ * \brief Disable external 12MHz oscilator.
+ */
+extern void PMC_DisableExtOsc12MHz(void)
+{
+ uint32_t read_MOR;
+
+ read_MOR = PMC->CKGR_MOR;
+
+ read_MOR &= ~CKGR_MOR_MOSCXTEN; /* disable main xtal osc */
+ PMC->CKGR_MOR = CKGR_MOR_KEY(0x37u) | read_MOR;
+ while( !(PMC->PMC_SR & PMC_SR_MCKRDY) );
+}
+
+/**
+ * \brief Enable internal 4/8/12MHz fast RC as main clock input.
+ *
+ * \param freqSelect fast RC frequency (FAST_RC_4MHZ, FAST_RC_8MHZ, FAST_RC_12MHZ).
+ */
+extern void PMC_EnableIntRC4_8_12MHz(uint32_t freqSelect)
+{
+ uint32_t read_MOR;
+
+ /* Before switching MAIN OSC on RC OSC : enable it and don't disable
+ * at the same time external crystal in case of if MAIN OSC is still using external crystal
+ */
+
+ read_MOR = PMC->CKGR_MOR;
+
+ read_MOR &= ~CKGR_MOR_MOSCRCF_Msk; /* reset MOSCRCF field in MOR register before select RC 12MHz */
+
+ read_MOR |= (CKGR_MOR_KEY(0x37u) |
+ freqSelect |
+ CKGR_MOR_MOSCXTEN |
+ CKGR_MOR_MOSCRCEN |
+ CKGR_MOR_MOSCXTST(PmcFastRcCnt)); /* enable external crystal - enable RC OSC */
+
+ PMC->CKGR_MOR = read_MOR;
+
+ while( !(PMC->PMC_SR & PMC_SR_MOSCRCS ) ); /* wait end of RC oscillator stabilization */
+ while( !(PMC->PMC_SR & PMC_SR_MCKRDY) );
+
+
+ read_MOR &= ~CKGR_MOR_MOSCSEL; /* select internal fast RC */
+
+ PMC->CKGR_MOR = read_MOR;
+
+ while( !(PMC->PMC_SR & PMC_SR_MOSCSELS ) ); /* Wait end of Main Oscillator Selection */
+ while( !(PMC->PMC_SR & PMC_SR_MCKRDY) );
+}
+
+/**
+ * \brief Disable internal 4/8/12MHz fast RC.
+ */
+extern void PMC_DisableIntRC4_8_12MHz(void)
+{
+ uint32_t read_MOR;
+
+ read_MOR = PMC->CKGR_MOR;
+
+ read_MOR &= ~CKGR_MOR_MOSCRCF_Msk; /* reset MOSCRCF field in MOR register */
+ read_MOR &= ~CKGR_MOR_MOSCRCEN; /* disable fast RC */
+ PMC->CKGR_MOR = CKGR_MOR_KEY(0x37u) | read_MOR;
+ while( !(PMC->PMC_SR & PMC_SR_MCKRDY) );
+}
+
+/**
+ * \brief Configure PLLA clock by giving MUL and DIV.
+ * Disable PLLA when 'mul' set to 0.
+ *
+ * \param mul PLL multiplier factor.
+ * \param div PLL divider factor.
+ */
+extern void PMC_SetPllaClock(uint32_t mul, uint32_t div)
+{
+ if (mul != 0)
+ {
+ /* Init PLL speed */
+ PMC->CKGR_PLLAR = CKGR_PLLAR_STUCKTO1 |
+ CKGR_PLLAR_PLLACOUNT(PmcPllaCnt) |
+ CKGR_PLLAR_MULA(mul - 1) |
+ CKGR_PLLAR_DIVA(div);
+
+ /* Wait for PLL stabilization */
+ while( !(PMC->PMC_SR & PMC_SR_LOCKA) );
+ }
+ else
+ {
+ PMC->CKGR_PLLAR = CKGR_PLLAR_STUCKTO1; /* disable PLL A */
+ }
+}
+
+/**
+ * \brief Enable UPLL clock.
+ */
+extern void PMC_EnableUpllClock(void)
+{
+ PMC->CKGR_UCKR = CKGR_UCKR_UPLLCOUNT(PmcUpllCnt) | CKGR_UCKR_UPLLEN;
+
+ /* Wait UTMI PLL Lock Status */
+ while (!(PMC->PMC_SR & PMC_SR_LOCKU));
+}
+
+/**
+ * \brief Disable UPLL clock.
+ */
+extern void PMC_DisableUpllClock(void)
+{
+ PMC->CKGR_UCKR &= ~CKGR_UCKR_UPLLEN;
+}
+
+/**
+ * \brief Selection of Master Clock.
+ *
+ * \param clockSource Master Clock source.
+ * \param prescaler Master Clock prescaler.
+ *
+ * \note
+ * The PMC_MCKR register must not be programmed in a single write
+ * operation (see. Product Data Sheet).
+ */
+extern void PMC_SetMckSelection(uint32_t clockSource, uint32_t prescaler)
+{
+ switch ( clockSource )
+ {
+ case PMC_MCKR_CSS_SLOW_CLK :
+ _PMC_SwitchMck2SlowClock();
+ _PMC_SetMckPrescaler(prescaler);
+ break;
+
+ case PMC_MCKR_CSS_MAIN_CLK :
+ _PMC_SwitchMck2MainClock();
+ _PMC_SetMckPrescaler(prescaler);
+ break;
+
+ case PMC_MCKR_CSS_PLLA_CLK :
+ _PMC_SetMckPrescaler(prescaler);
+ _PMC_SwitchMck2PllaClock();
+ break ;
+
+ case PMC_MCKR_CSS_UPLL_CLK :
+ _PMC_SetMckPrescaler(prescaler);
+ _PMC_SwitchMck2UpllClock();
+ break ;
+ }
+}
+
+/**
+ * \brief Disable all clocks.
+ */
+extern void PMC_DisableAllClocks(void)
+{
+ uint32_t read_reg;
+
+ PMC->PMC_SCDR = PMC_SCDR_PCK0 | PMC_SCDR_PCK1 | PMC_SCDR_PCK2; /* disable PCK */
+
+ _PMC_SwitchMck2MainClock();
+
+ PMC->CKGR_PLLAR = PMC->CKGR_PLLAR & ~CKGR_PLLAR_MULA_Msk; /* disable PLL A */
+
+ _PMC_SwitchMck2SlowClock();
+
+ read_reg = PMC->CKGR_MOR;
+
+ read_reg = (read_reg & ~CKGR_MOR_MOSCRCEN) | CKGR_MOR_KEY(0x37u); /* disable RC OSC */
+
+ PMC->CKGR_MOR = read_reg;
+
+ PMC_DisableAllPeripherals(); /* disable all peripheral clocks */
+}
+
+/**
+ * \brief Configure PLLA as clock input for MCK.
+ *
+ * \param mul PLL multiplier factor (not shifted, don't minus 1).
+ * \param div PLL divider factor (not shifted).
+ * \param prescaler Master Clock prescaler (shifted as in register).
+ */
+extern void PMC_ConfigureMckWithPlla(uint32_t mul, uint32_t div, uint32_t prescaler)
+{
+ /* First, select Main OSC as input clock for MCK */
+ _PMC_SwitchMck2MainClock();
+
+ /* Then, Set PLLA clock */
+ PMC_SetPllaClock(mul, div);
+
+ /* Wait until the master clock is established for the case we already turn on the PLL */
+ while( !(PMC->PMC_SR & PMC_SR_MCKRDY) );
+
+ /* Finally, select PllA as input clock for MCK */
+ PMC_SetMckSelection(PMC_MCKR_CSS_PLLA_CLK, prescaler);
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/pwm.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/pwm.c
new file mode 100644
index 0000000..f9aa8da
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/pwm.c
@@ -0,0 +1,614 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/** \addtogroup pwm_module Working with PWM
+ * The PWM driver provides the interface to configure and use the PWM
+ * peripheral.
+ *
+ * The PWM macrocell controls square output waveforms of 4 channels.
+ * Characteristics of output waveforms such as period, duty-cycle,
+ * dead-time can be configured.\n
+ * Some of PWM channels can be linked together as synchronous channel and
+ * duty-cycle of synchronous channels can be updated by PDC automaticly.
+ *
+ * Before enabling the channels, they must have been configured first.
+ * The main settings include:
+ * <ul>
+ * <li>Configuration of the clock generator.</li>
+ * <li>Selection of the clock for each channel.</li>
+ * <li>Configuration of output waveform characteristics, such as period, duty-cycle etc.</li>
+ * <li>Configuration for synchronous channels if needed.</li>
+ * - Selection of the synchronous channels.
+ * - Selection of the moment when the WRDY flag and the corresponding PDC
+ * transfer request are set (PTRM and PTRCS in the PWM_SCM register).
+ * - Configuration of the update mode (UPDM in the PWM_SCM register).
+ * - Configuration of the update period (UPR in the PWM_SCUP register).
+ * </ul>
+ *
+ * After the channels is enabled, the user must use respective update registers
+ * to change the wave characteristics to prevent unexpected output waveform.
+ * i.e. PWM_CDTYUPDx register should be used if user want to change duty-cycle
+ * when the channel is enabled.
+ *
+ * For more accurate information, please look at the PWM section of the
+ * Datasheet.
+ *
+ * Related files :\n
+ * \ref pwmc.c\n
+ * \ref pwmc.h.\n
+ */
+/*@{*/
+/*@}*/
+
+/**
+ * \file
+ *
+ * Implementation of the Pulse Width Modulation Controller (PWM) peripheral.
+ *
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "chip.h"
+
+#include <stdint.h>
+#include <assert.h>
+
+/*----------------------------------------------------------------------------
+ * Local functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Finds a prescaler/divisor couple to generate the desired frequency
+ * from MCK.
+ *
+ * Returns the value to enter in PWM_CLK or 0 if the configuration cannot be
+ * met.
+ *
+ * \param frequency Desired frequency in Hz.
+ * \param mck Master clock frequency in Hz.
+ */
+static uint16_t FindClockConfiguration(
+ uint32_t frequency,
+ uint32_t mck)
+{
+ uint32_t divisors[11] = {1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024};
+ uint8_t divisor = 0;
+ uint32_t prescaler;
+
+ assert(frequency < mck);
+
+ /* Find prescaler and divisor values */
+ prescaler = (mck / divisors[divisor]) / frequency;
+ while ((prescaler > 255) && (divisor < 11)) {
+
+ divisor++;
+ prescaler = (mck / divisors[divisor]) / frequency;
+ }
+
+ /* Return result */
+ if ( divisor < 11 )
+ {
+ TRACE_DEBUG( "Found divisor=%u and prescaler=%u for freq=%uHz\n\r", divisors[divisor], prescaler, frequency ) ;
+
+ return prescaler | (divisor << 8) ;
+ }
+ else
+ {
+ return 0 ;
+ }
+}
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Configures PWM a channel with the given parameters, basic configure function.
+ *
+ * The PWM controller must have been clocked in the PMC prior to calling this
+ * function.
+ * Beware: this function disables the channel. It waits until disable is effective.
+ *
+ * \param channel Channel number.
+ * \param prescaler Channel prescaler.
+ * \param alignment Channel alignment.
+ * \param polarity Channel polarity.
+ */
+void PWMC_ConfigureChannel(
+ Pwm* pPwm,
+ uint8_t channel,
+ uint32_t prescaler,
+ uint32_t alignment,
+ uint32_t polarity)
+{
+ pPwm->PWM_CH_NUM[0].PWM_CMR = 1;
+
+// assert(prescaler < PWM_CMR0_CPRE_MCKB);
+ assert((alignment & (uint32_t)~PWM_CMR_CALG) == 0);
+ assert((polarity & (uint32_t)~PWM_CMR_CPOL) == 0);
+
+ /* Disable channel (effective at the end of the current period) */
+ if ((pPwm->PWM_SR & (1 << channel)) != 0) {
+ pPwm->PWM_DIS = 1 << channel;
+ while ((pPwm->PWM_SR & (1 << channel)) != 0);
+ }
+
+ /* Configure channel */
+ pPwm->PWM_CH_NUM[channel].PWM_CMR = prescaler | alignment | polarity;
+}
+
+/**
+ * \brief Configures PWM a channel with the given parameters, extend configure function.
+ *
+ * The PWM controller must have been clocked in the PMC prior to calling this
+ * function.
+ * Beware: this function disables the channel. It waits until disable is effective.
+ *
+ * \param channel Channel number.
+ * \param prescaler Channel prescaler.
+ * \param alignment Channel alignment.
+ * \param polarity Channel polarity.
+ * \param countEventSelect Channel counter event selection.
+ * \param DTEnable Channel dead time generator enable.
+ * \param DTHInverte Channel Dead-Time PWMHx output Inverted.
+ * \param DTLInverte Channel Dead-Time PWMHx output Inverted.
+ */
+void PWMC_ConfigureChannelExt(
+ Pwm* pPwm,
+ uint8_t channel,
+ uint32_t prescaler,
+ uint32_t alignment,
+ uint32_t polarity,
+ uint32_t countEventSelect,
+ uint32_t DTEnable,
+ uint32_t DTHInverte,
+ uint32_t DTLInverte)
+{
+// assert(prescaler < PWM_CMR0_CPRE_MCKB);
+ assert((alignment & (uint32_t)~PWM_CMR_CALG) == 0);
+ assert((polarity & (uint32_t)~PWM_CMR_CPOL) == 0);
+ assert((countEventSelect & (uint32_t)~PWM_CMR_CES) == 0);
+ assert((DTEnable & (uint32_t)~PWM_CMR_DTE) == 0);
+ assert((DTHInverte & (uint32_t)~PWM_CMR_DTHI) == 0);
+ assert((DTLInverte & (uint32_t)~PWM_CMR_DTLI) == 0);
+
+ /* Disable channel (effective at the end of the current period) */
+ if ((pPwm->PWM_SR & (1 << channel)) != 0) {
+ pPwm->PWM_DIS = 1 << channel;
+ while ((pPwm->PWM_SR & (1 << channel)) != 0);
+ }
+
+ /* Configure channel */
+ pPwm->PWM_CH_NUM[channel].PWM_CMR = prescaler | alignment | polarity |
+ countEventSelect | DTEnable | DTHInverte | DTLInverte;
+}
+
+/**
+ * \brief Configures PWM clocks A & B to run at the given frequencies.
+ *
+ * This function finds the best MCK divisor and prescaler values automatically.
+ *
+ * \param clka Desired clock A frequency (0 if not used).
+ * \param clkb Desired clock B frequency (0 if not used).
+ * \param mck Master clock frequency.
+ */
+void PWMC_ConfigureClocks(uint32_t clka, uint32_t clkb, uint32_t mck)
+{
+ uint32_t mode = 0;
+ uint32_t result;
+
+ /* Clock A */
+ if (clka != 0) {
+
+ result = FindClockConfiguration(clka, mck);
+ assert( result != 0 ) ;
+ mode |= result;
+ }
+
+ /* Clock B */
+ if (clkb != 0) {
+
+ result = FindClockConfiguration(clkb, mck);
+ assert( result != 0 ) ;
+ mode |= (result << 16);
+ }
+
+ /* Configure clocks */
+ TRACE_DEBUG( "Setting PWM_CLK = 0x%08X\n\r", mode ) ;
+ PWM->PWM_CLK = mode;
+}
+
+/**
+ * \brief Sets the period value used by a PWM channel.
+ *
+ * This function writes directly to the CPRD register if the channel is disabled;
+ * otherwise, it uses the update register CPRDUPD.
+ *
+ * \param channel Channel number.
+ * \param period Period value.
+ */
+void PWMC_SetPeriod( Pwm* pPwm, uint8_t channel, uint16_t period)
+{
+ /* If channel is disabled, write to CPRD */
+ if ((pPwm->PWM_SR & (1 << channel)) == 0) {
+
+ pPwm->PWM_CH_NUM[channel].PWM_CPRD = period;
+ }
+ /* Otherwise use update register */
+ else {
+
+ pPwm->PWM_CH_NUM[channel].PWM_CPRDUPD = period;
+ }
+}
+
+/**
+ * \brief Sets the duty cycle used by a PWM channel.
+ * This function writes directly to the CDTY register if the channel is disabled;
+ * otherwise it uses the update register CDTYUPD.
+ * Note that the duty cycle must always be inferior or equal to the channel
+ * period.
+ *
+ * \param channel Channel number.
+ * \param duty Duty cycle value.
+ */
+void PWMC_SetDutyCycle( Pwm* pPwm, uint8_t channel, uint16_t duty)
+{
+ assert(duty <= pPwm->PWM_CH_NUM[channel].PWM_CPRD);
+
+ /* If channel is disabled, write to CDTY */
+ if ((pPwm->PWM_SR & (1 << channel)) == 0) {
+
+ pPwm->PWM_CH_NUM[channel].PWM_CDTY = duty;
+ }
+ /* Otherwise use update register */
+ else {
+
+ pPwm->PWM_CH_NUM[channel].PWM_CDTYUPD = duty;
+ }
+}
+
+/**
+ * \brief Sets the dead time used by a PWM channel.
+ * This function writes directly to the DT register if the channel is disabled;
+ * otherwise it uses the update register DTUPD.
+ * Note that the dead time must always be inferior or equal to the channel
+ * period.
+ *
+ * \param channel Channel number.
+ * \param timeH Dead time value for PWMHx output.
+ * \param timeL Dead time value for PWMLx output.
+ */
+void PWMC_SetDeadTime( Pwm* pPwm, uint8_t channel, uint16_t timeH, uint16_t timeL)
+{
+ assert(timeH <= pPwm->PWM_CH_NUM[channel].PWM_CPRD);
+ assert(timeL <= pPwm->PWM_CH_NUM[channel].PWM_CPRD);
+
+ /* If channel is disabled, write to DT */
+ if ((pPwm->PWM_SR & (1 << channel)) == 0) {
+
+ pPwm->PWM_CH_NUM[channel].PWM_DT = timeH | (timeL << 16);
+ }
+ /* Otherwise use update register */
+ else {
+ pPwm->PWM_CH_NUM[channel].PWM_DTUPD = timeH | (timeL << 16);
+ }
+}
+
+/**
+ * \brief Configures Syncronous channel with the given parameters.
+ * Beware: At this time, the channels should be disabled.
+ *
+ * \param channels Bitwise OR of Syncronous channels.
+ * \param updateMode Syncronous channel update mode.
+ * \param requestMode PDC transfer request mode.
+ * \param requestComparisonSelect PDC transfer request comparison selection.
+ */
+void PWMC_ConfigureSyncChannel( Pwm* pPwm,
+ uint32_t channels,
+ uint32_t updateMode,
+ uint32_t requestMode,
+ uint32_t requestComparisonSelect)
+{
+ pPwm->PWM_SCM = channels | updateMode | requestMode | requestComparisonSelect;
+}
+
+/**
+ * \brief Sets the update period of the synchronous channels.
+ * This function writes directly to the SCUP register if the channel #0 is disabled;
+ * otherwise it uses the update register SCUPUPD.
+ *
+ * \param period update period.
+ */
+void PWMC_SetSyncChannelUpdatePeriod( Pwm* pPwm, uint8_t period)
+{
+ /* If channel is disabled, write to SCUP */
+ if ((pPwm->PWM_SR & (1 << 0)) == 0) {
+
+ pPwm->PWM_SCUP = period;
+ }
+ /* Otherwise use update register */
+ else {
+
+ pPwm->PWM_SCUPUPD = period;
+ }
+}
+
+/**
+ * \brief Sets synchronous channels update unlock.
+ *
+ * Note: If the UPDM field is set to 0, writing the UPDULOCK bit to 1
+ * triggers the update of the period value, the duty-cycle and
+ * the dead-time values of synchronous channels at the beginning
+ * of the next PWM period. If the field UPDM is set to 1 or 2,
+ * writing the UPDULOCK bit to 1 triggers only the update of
+ * the period value and of the dead-time values of synchronous channels.
+ * This bit is automatically reset when the update is done.
+ */
+void PWMC_SetSyncChannelUpdateUnlock( Pwm* pPwm )
+{
+ pPwm->PWM_SCUC = PWM_SCUC_UPDULOCK;
+}
+
+/**
+ * \brief Enables the given PWM channel.
+ *
+ * This does NOT enable the corresponding pin;this must be done in the user code.
+ *
+ * \param channel Channel number.
+ */
+void PWMC_EnableChannel( Pwm* pPwm, uint8_t channel)
+{
+ pPwm->PWM_ENA = 1 << channel;
+}
+
+/**
+ * \brief Disables the given PWM channel.
+ *
+ * Beware, channel will be effectively disabled at the end of the current period.
+ * Application can check channel is disabled using the following wait loop:
+ * while ((PWM->PWM_SR & (1 << channel)) != 0);
+ *
+ * \param channel Channel number.
+ */
+void PWMC_DisableChannel( Pwm* pPwm, uint8_t channel)
+{
+ pPwm->PWM_DIS = 1 << channel;
+}
+
+/**
+ * \brief Enables the period interrupt for the given PWM channel.
+ *
+ * \param channel Channel number.
+ */
+void PWMC_EnableChannelIt( Pwm* pPwm, uint8_t channel)
+{
+ pPwm->PWM_IER1 = 1 << channel;
+}
+
+/**
+ * \brief Disables the period interrupt for the given PWM channel.
+ *
+ * \param channel Channel number.
+ */
+void PWMC_DisableChannelIt( Pwm* pPwm, uint8_t channel)
+{
+ pPwm->PWM_IDR1 = 1 << channel;
+}
+
+/**
+ * \brief Enables the selected interrupts sources on a PWMC peripheral.
+ *
+ * \param sources1 Bitwise OR of selected interrupt sources of PWM_IER1.
+ * \param sources2 Bitwise OR of selected interrupt sources of PWM_IER2.
+ */
+void PWMC_EnableIt( Pwm* pPwm, uint32_t sources1, uint32_t sources2)
+{
+ pPwm->PWM_IER1 = sources1;
+ pPwm->PWM_IER2 = sources2;
+}
+
+/**
+ * \brief Disables the selected interrupts sources on a PWMC peripheral.
+ *
+ * \param sources1 Bitwise OR of selected interrupt sources of PWM_IDR1.
+ * \param sources2 Bitwise OR of selected interrupt sources of PWM_IDR2.
+ */
+void PWMC_DisableIt( Pwm* pPwm, uint32_t sources1, uint32_t sources2)
+{
+ pPwm->PWM_IDR1 = sources1;
+ pPwm->PWM_IDR2 = sources2;
+}
+
+/**
+ * \brief Sends the contents of buffer through a PWMC peripheral, using the PDC to
+ * take care of the transfer.
+ *
+ * Note: Duty cycle of syncronous channels can update by PDC
+ * when the field UPDM (Update Mode) in the PWM_SCM register is set to 2.
+ *
+ * \param pwmc Pointer to an Pwm instance.
+ * \param buffer Data buffer to send.
+ * \param length Length of the data buffer.
+ */
+uint8_t PWMC_WriteBuffer(Pwm *pwmc,
+ void *buffer,
+ uint32_t length)
+{
+ /* Check if first bank is free */
+ if (pwmc->PWM_TCR == 0) {
+
+ pwmc->PWM_TPR = (uint32_t) buffer;
+ pwmc->PWM_TCR = length;
+ pwmc->PWM_PTCR = PERIPH_PTCR_TXTEN;
+ return 1;
+ }
+ /* Check if second bank is free */
+ else if (pwmc->PWM_TNCR == 0) {
+
+ pwmc->PWM_TNPR = (uint32_t) buffer;
+ pwmc->PWM_TNCR = length;
+ return 1;
+ }
+
+ /* No free banks */
+ return 0;
+}
+
+/**
+ * \brief Set PWM output override value.
+ *
+ * \param value Bitwise OR of output override value.
+ */
+void PWMC_SetOverrideValue( Pwm* pPwm, uint32_t value)
+{
+ pPwm->PWM_OOV = value;
+}
+
+/**
+ * \brief Enalbe override output.
+ *
+ * \param value Bitwise OR of output selection.
+ * \param sync 0: enable the output asyncronously, 1: enable it syncronously
+ */
+void PWMC_EnableOverrideOutput( Pwm* pPwm, uint32_t value, uint32_t sync)
+{
+ if (sync) {
+
+ pPwm->PWM_OSSUPD = value;
+ } else {
+
+ pPwm->PWM_OSS = value;
+ }
+}
+
+/**
+ * \brief Disalbe override output.
+ *
+ * \param value Bitwise OR of output selection.
+ * \param sync 0: enable the output asyncronously, 1: enable it syncronously
+ */
+void PWMC_DisableOverrideOutput( Pwm* pPwm, uint32_t value, uint32_t sync)
+{
+ if (sync) {
+
+ pPwm->PWM_OSCUPD = value;
+ } else {
+
+ pPwm->PWM_OSC = value;
+ }
+}
+
+/**
+ * \brief Set PWM fault mode.
+ *
+ * \param mode Bitwise OR of fault mode.
+ */
+void PWMC_SetFaultMode( Pwm* pPwm, uint32_t mode)
+{
+ pPwm->PWM_FMR = mode;
+}
+
+/**
+ * \brief PWM fault clear.
+ *
+ * \param fault Bitwise OR of fault to clear.
+ */
+void PWMC_FaultClear( Pwm* pPwm, uint32_t fault)
+{
+ pPwm->PWM_FCR = fault;
+}
+
+/**
+ * \brief Set PWM fault protection value.
+ *
+ * \param value Bitwise OR of fault protection value.
+ */
+void PWMC_SetFaultProtectionValue( Pwm* pPwm, uint32_t value)
+{
+ pPwm->PWM_FPV = value;
+}
+
+/**
+ * \brief Enable PWM fault protection.
+ *
+ * \param value Bitwise OR of FPEx[y].
+ */
+extern void PWMC_EnableFaultProtection( Pwm* pPwm, uint32_t dwChannel, uint32_t dwValue )
+{
+ assert( dwChannel < 8 ) ;
+
+ if ( dwChannel < 4 )
+ {
+ pPwm->PWM_FPE1 = (((0xffu << (dwChannel<<4)) & ((dwValue) << (dwChannel<<4)))) ;
+ }
+ else
+ {
+ pPwm->PWM_FPE2 = (((0xffu << ((dwChannel-4)<<4)) & ((dwValue) << ((dwChannel-4)<<4)))) ;
+ }
+}
+
+/**
+ * \brief Configure comparison unit.
+ *
+ * \param x comparison x index
+ * \param value comparison x value.
+ * \param mode comparison x mode
+ */
+void PWMC_ConfigureComparisonUnit( Pwm* pPwm, uint32_t x, uint32_t value, uint32_t mode)
+{
+ assert(x < 8);
+
+ /* If channel is disabled, write to CMPxM & CMPxV */
+ if ((pPwm->PWM_SR & (1 << 0)) == 0) {
+ pPwm->PWM_CMP[x].PWM_CMPM = mode;
+ pPwm->PWM_CMP[x].PWM_CMPV = value;
+ }
+ /* Otherwise use update register */
+ else {
+ pPwm->PWM_CMP[x].PWM_CMPMUPD = mode;
+ pPwm->PWM_CMP[x].PWM_CMPVUPD = value;
+ }
+}
+
+/**
+ * \brief Configure event line mode.
+ *
+ * \param x Line x
+ * \param mode Bitwise OR of line mode selection
+ */
+void PWMC_ConfigureEventLineMode( Pwm* pPwm, uint32_t x, uint32_t mode)
+{
+ assert(x < 2);
+
+ pPwm->PWM_ELMR[x] = mode;
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/rstc.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/rstc.c
new file mode 100644
index 0000000..ffa405d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/rstc.c
@@ -0,0 +1,179 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+ * \file
+ *
+ * Implementation of the RSTC module.
+ */
+
+/*-----------------------------------------------------------------------------
+ * Headers
+ *-----------------------------------------------------------------------------*/
+
+#include "chip.h"
+
+/*-----------------------------------------------------------------------------
+ * Exported functions
+ *-----------------------------------------------------------------------------*/
+
+/**
+ * \brief Configure the mode of the RSTC peripheral.
+ * The configuration is computed by the lib (AT91C_RSTC_*).
+ * \param rmr Desired mode configuration.
+ */
+extern void RSTC_ConfigureMode( Rstc* pRstc, uint32_t dwValue )
+{
+ dwValue &= ~RSTC_MR_KEY_Msk ;
+ pRstc->RSTC_MR = dwValue | RSTC_MR_KEY( 0xA5u ) ;
+}
+
+/**
+ * \brief Enable/Disable the detection of a low level on the pin NRST as User Reset
+ *
+ * \param enable 1 to enable & 0 to disable.
+ */
+extern void RSTC_SetUserResetEnable( Rstc* pRstc, uint32_t dwEnable )
+{
+ uint32_t dw = pRstc->RSTC_MR & (~RSTC_MR_KEY_Msk) ;
+
+ if ( dwEnable )
+ {
+ dw |= RSTC_MR_URSTEN ;
+ }
+ else
+ {
+ dw &= ~RSTC_MR_URSTEN ;
+ }
+
+ pRstc->RSTC_MR = dw | RSTC_MR_KEY( 0xA5u ) ;
+}
+/**
+ * \brief Enable/Disable the interrupt of a User Reset (USRTS bit in RSTC_RST).
+ *
+ * \param enable 1 to enable & 0 to disable.
+ */
+extern void RSTC_SetUserResetInterruptEnable( Rstc* pRstc, uint32_t dwEnable )
+{
+ uint32_t dw = pRstc->RSTC_MR & (~RSTC_MR_KEY_Msk) ;
+
+ if ( dwEnable )
+ {
+ dw |= RSTC_MR_URSTIEN ;
+ }
+ else
+ {
+ dw &= ~RSTC_MR_URSTIEN ;
+ }
+ pRstc->RSTC_MR = dw | RSTC_MR_KEY( 0xA5u ) ;
+}
+/**
+ * \brief Setup the external reset length. The length is asserted during a time of
+ * pow(2, powl+1) Slow Clock(32KHz). The duration is between 60us and 2s.
+ * \param enable 1 to enable & 0 to disable.
+ */
+extern void RSTC_SetExtResetLength( Rstc* pRstc, uint32_t dwPowerLength )
+{
+ uint32_t dw = pRstc->RSTC_MR ;
+
+ dw &= ~(RSTC_MR_KEY_Msk | RSTC_MR_ERSTL_Msk) ;
+ dw |= RSTC_MR_ERSTL( dwPowerLength ) ;
+ pRstc->RSTC_MR = dw | RSTC_MR_KEY( 0xA5u ) ;
+}
+
+/**
+ * \brief Resets the processor.
+ */
+extern void RSTC_ProcessorReset( Rstc* pRstc )
+{
+ pRstc->RSTC_CR = RSTC_CR_PROCRST | RSTC_CR_KEY( 0xA5u ) ;
+}
+/**
+ * \brief Resets the peripherals.
+ */
+extern void RSTC_PeripheralReset( Rstc* pRstc )
+{
+ pRstc->RSTC_CR = RSTC_CR_PERRST | RSTC_CR_KEY( 0xA5u ) ;
+}
+
+/**
+ * \brief Asserts the NRST pin for external resets.
+ */
+extern void RSTC_ExtReset( Rstc* pRstc )
+{
+ pRstc->RSTC_CR = RSTC_CR_EXTRST | RSTC_CR_KEY( 0xA5u ) ;
+}
+/**
+ * \brief Return NRST pin level ( 1 or 0 ).
+ */
+extern uint32_t RSTC_GetNrstLevel( Rstc* pRstc )
+{
+ if ( pRstc->RSTC_SR & RSTC_SR_NRSTL )
+ {
+ return 1 ;
+ }
+
+ return 0 ;
+}
+/**
+ * \brief Check the user had trigged the reset
+ *
+ * \return Returns 1 if at least one high-to-low transition of NRST (User Reset) has
+ * been detected since the last read of RSTC_SR.
+ */
+extern uint32_t RSTC_IsUserResetDetected( Rstc* pRstc )
+{
+ if ( pRstc->RSTC_SR & RSTC_SR_URSTS )
+ {
+ return 1 ;
+ }
+
+ return 0 ;
+}
+/**
+ * \brief Check the RSTC if busy
+ *
+ * \return Return 1 if a software reset command is being performed by the reset
+ * controller. The reset controller is busy.
+ */
+extern uint32_t RSTC_IsBusy( Rstc* pRstc )
+{
+ if ( pRstc->RSTC_SR & RSTC_SR_SRCMP )
+ {
+ return 1 ;
+ }
+
+ return 0 ;
+}
+/**
+ * \brief Get the status
+ */
+extern uint32_t RSTC_GetStatus( Rstc* pRstc )
+{
+ return (pRstc->RSTC_SR) ;
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/rtc.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/rtc.c
new file mode 100644
index 0000000..60ab3ef
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/rtc.c
@@ -0,0 +1,464 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/** \addtogroup rtc_module Working with RTC
+ * The RTC driver provides the interface to configure and use the RTC
+ * peripheral.
+ *
+ * It manages date, time, and alarms.\n
+ * This timer is clocked by the 32kHz system clock, and is not impacted by
+ * power management settings (PMC). To be accurate, it is better to use an
+ * external 32kHz crystal instead of the internal 32kHz RC.\n
+ *
+ * It uses BCD format, and time can be set in AM/PM or 24h mode through a
+ * configuration bit in the mode register.\n
+ *
+ * To update date or time, the user has to follow these few steps :
+ * <ul>
+ * <li>Set UPDTIM and/or UPDCAL bit(s) in RTC_CR,</li>
+ * <li>Polling or IRQ on the ACKUPD bit of RTC_CR,</li>
+ * <li>Clear ACKUPD bit in RTC_SCCR,</li>
+ * <li>Update Time and/or Calendar values in RTC_TIMR/RTC_CALR (BCD format),</li>
+ * <li>Clear UPDTIM and/or UPDCAL bit in RTC_CR.</li>
+ * </ul>
+ * An alarm can be set to happen on month, date, hours, minutes or seconds,
+ * by setting the proper "Enable" bit of each of these fields in the Time and
+ * Calendar registers.
+ * This allows a large number of configurations to be available for the user.
+ * Alarm occurence can be detected even by polling or interrupt.
+ *
+ * A check of the validity of the date and time format and values written by the user is automatically done.
+ * Errors are reported through the Valid Entry Register.
+ *
+ * For more accurate information, please look at the RTC section of the
+ * Datasheet.
+ *
+ * Related files :\n
+ * \ref rtc.c\n
+ * \ref rtc.h.\n
+*/
+/*@{*/
+/*@}*/
+
+
+/**
+ * \file
+ *
+ * Implementation of Real Time Clock (RTC) controller.
+ *
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "chip.h"
+
+#include <stdint.h>
+#include <assert.h>
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Sets the RTC in either 12 or 24 hour mode.
+ *
+ * \param mode Hour mode.
+ */
+extern void RTC_SetHourMode( Rtc* pRtc, uint32_t dwMode )
+{
+ assert((dwMode & 0xFFFFFFFE) == 0);
+
+ pRtc->RTC_MR = dwMode ;
+}
+
+/**
+ * \brief Gets the RTC mode.
+ *
+ * \return Hour mode.
+ */
+extern uint32_t RTC_GetHourMode( Rtc* pRtc )
+{
+ uint32_t dwMode ;
+
+ TRACE_DEBUG( "RTC_SetHourMode()\n\r" ) ;
+
+ dwMode = pRtc->RTC_MR;
+ dwMode &= 0xFFFFFFFE;
+
+ return dwMode ;
+}
+
+/**
+ * \brief Enables the selected interrupt sources of the RTC.
+ *
+ * \param sources Interrupt sources to enable.
+ */
+extern void RTC_EnableIt( Rtc* pRtc, uint32_t dwSources )
+{
+ assert((dwSources & (uint32_t)(~0x1F)) == 0);
+
+ TRACE_DEBUG( "RTC_EnableIt()\n\r" ) ;
+
+ pRtc->RTC_IER = dwSources ;
+}
+
+/**
+* \brief Disables the selected interrupt sources of the RTC.
+*
+* \param sources Interrupt sources to disable.
+*/
+extern void RTC_DisableIt( Rtc* pRtc, uint32_t dwSources )
+{
+ assert((dwSources & (uint32_t)(~0x1F)) == 0);
+
+ TRACE_DEBUG( "RTC_DisableIt()\n\r" ) ;
+
+ pRtc->RTC_IDR = dwSources ;
+}
+
+/**
+ * \brief Sets the current time in the RTC.
+ *
+ * \note In successive update operations, the user must wait at least one second
+ * after resetting the UPDTIM/UPDCAL bit in the RTC_CR before setting these
+ * bits again. Please look at the RTC section of the datasheet for detail.
+ *
+ * \param ucHour Current hour in 12 or 24 hour mode.
+ * \param ucMinute Current minute.
+ * \param ucSecond Current second.
+ *
+ * \return 0 sucess, 1 fail to set
+ */
+extern int RTC_SetTime( Rtc* pRtc, uint8_t ucHour, uint8_t ucMinute, uint8_t ucSecond )
+{
+ uint32_t dwTime=0 ;
+ uint8_t ucHour_bcd ;
+ uint8_t ucMin_bcd ;
+ uint8_t ucSec_bcd ;
+
+ TRACE_DEBUG( "RTC_SetTime(%02d:%02d:%02d)\n\r", ucHour, ucMinute, ucSecond ) ;
+
+ /* if 12-hour mode, set AMPM bit */
+ if ( (pRtc->RTC_MR & RTC_MR_HRMOD) == RTC_MR_HRMOD )
+ {
+ if ( ucHour > 12 )
+ {
+ ucHour -= 12 ;
+ dwTime |= RTC_TIMR_AMPM ;
+ }
+ }
+ ucHour_bcd = (ucHour%10) | ((ucHour/10)<<4) ;
+ ucMin_bcd = (ucMinute%10) | ((ucMinute/10)<<4) ;
+ ucSec_bcd = (ucSecond%10) | ((ucSecond/10)<<4) ;
+
+ /* value overflow */
+ if ( (ucHour_bcd & (uint8_t)(~RTC_HOUR_BIT_LEN_MASK)) |
+ (ucMin_bcd & (uint8_t)(~RTC_MIN_BIT_LEN_MASK)) |
+ (ucSec_bcd & (uint8_t)(~RTC_SEC_BIT_LEN_MASK)))
+ {
+ return 1 ;
+ }
+
+ dwTime = ucSec_bcd | (ucMin_bcd << 8) | (ucHour_bcd<<16) ;
+
+ pRtc->RTC_CR |= RTC_CR_UPDTIM ;
+ while ((pRtc->RTC_SR & RTC_SR_ACKUPD) != RTC_SR_ACKUPD) ;
+ pRtc->RTC_SCCR = RTC_SCCR_ACKCLR ;
+ pRtc->RTC_TIMR = dwTime ;
+ pRtc->RTC_CR &= (uint32_t)(~RTC_CR_UPDTIM) ;
+ pRtc->RTC_SCCR |= RTC_SCCR_SECCLR ;
+
+ return (int)(pRtc->RTC_VER & RTC_VER_NVTIM) ;
+}
+
+/**
+ * \brief Retrieves the current time as stored in the RTC in several variables.
+ *
+ * \param pucHour If not null, current hour is stored in this variable.
+ * \param pucMinute If not null, current minute is stored in this variable.
+ * \param pucSecond If not null, current second is stored in this variable.
+ */
+extern void RTC_GetTime( Rtc* pRtc, uint8_t *pucHour, uint8_t *pucMinute, uint8_t *pucSecond )
+{
+ uint32_t dwTime ;
+
+ TRACE_DEBUG( "RTC_GetTime()\n\r" ) ;
+
+ /* Get current RTC time */
+ dwTime = pRtc->RTC_TIMR ;
+ while ( dwTime != pRtc->RTC_TIMR )
+ {
+ dwTime = pRtc->RTC_TIMR ;
+ }
+
+ /* Hour */
+ if ( pucHour )
+ {
+ *pucHour = ((dwTime & 0x00300000) >> 20) * 10
+ + ((dwTime & 0x000F0000) >> 16);
+
+ if ( (dwTime & RTC_TIMR_AMPM) == RTC_TIMR_AMPM )
+ {
+ *pucHour += 12 ;
+ }
+ }
+
+ /* Minute */
+ if ( pucMinute )
+ {
+ *pucMinute = ((dwTime & 0x00007000) >> 12) * 10
+ + ((dwTime & 0x00000F00) >> 8);
+ }
+
+ /* Second */
+ if ( pucSecond )
+ {
+ *pucSecond = ((dwTime & 0x00000070) >> 4) * 10
+ + (dwTime & 0x0000000F);
+ }
+}
+
+/**
+ * \brief Sets a time alarm on the RTC.
+ * The match is performed only on the provided variables;
+ * Setting all pointers to 0 disables the time alarm.
+ *
+ * \note In AM/PM mode, the hour value must have bit #7 set for PM, cleared for
+ * AM (as expected in the time registers).
+ *
+ * \param pucHour If not null, the time alarm will hour-match this value.
+ * \param pucMinute If not null, the time alarm will minute-match this value.
+ * \param pucSecond If not null, the time alarm will second-match this value.
+ *
+ * \return 0 success, 1 fail to set
+ */
+extern int RTC_SetTimeAlarm( Rtc* pRtc, uint8_t *pucHour, uint8_t *pucMinute, uint8_t *pucSecond )
+{
+ uint32_t dwAlarm=0 ;
+
+ TRACE_DEBUG( "RTC_SetTimeAlarm()\n\r" ) ;
+
+ /* Hour */
+ if ( pucHour )
+ {
+ dwAlarm |= RTC_TIMALR_HOUREN | ((*pucHour / 10) << 20) | ((*pucHour % 10) << 16);
+ }
+
+ /* Minute */
+ if ( pucMinute )
+ {
+ dwAlarm |= RTC_TIMALR_MINEN | ((*pucMinute / 10) << 12) | ((*pucMinute % 10) << 8);
+ }
+
+ /* Second */
+ if ( pucSecond )
+ {
+ dwAlarm |= RTC_TIMALR_SECEN | ((*pucSecond / 10) << 4) | (*pucSecond % 10);
+ }
+
+ pRtc->RTC_TIMALR = dwAlarm ;
+
+ return (int)(pRtc->RTC_VER & RTC_VER_NVTIMALR) ;
+}
+
+/**
+ * \brief Retrieves the current year, month and day from the RTC.
+ * Month, day and week values are numbered starting at 1.
+ *
+ * \param pYwear Current year (optional).
+ * \param pucMonth Current month (optional).
+ * \param pucDay Current day (optional).
+ * \param pucWeek Current day in current week (optional).
+ */
+extern void RTC_GetDate( Rtc* pRtc, uint16_t *pwYear, uint8_t *pucMonth, uint8_t *pucDay, uint8_t *pucWeek )
+{
+ uint32_t dwDate ;
+
+ /* Get current date (multiple reads are necessary to insure a stable value) */
+ do
+ {
+ dwDate = pRtc->RTC_CALR ;
+ }
+ while ( dwDate != pRtc->RTC_CALR ) ;
+
+ /* Retrieve year */
+ if ( pwYear )
+ {
+ *pwYear = (((dwDate >> 4) & 0x7) * 1000)
+ + ((dwDate & 0xF) * 100)
+ + (((dwDate >> 12) & 0xF) * 10)
+ + ((dwDate >> 8) & 0xF);
+ }
+
+ /* Retrieve month */
+ if ( pucMonth )
+ {
+ *pucMonth = (((dwDate >> 20) & 1) * 10) + ((dwDate >> 16) & 0xF);
+ }
+
+ /* Retrieve day */
+ if ( pucDay )
+ {
+ *pucDay = (((dwDate >> 28) & 0x3) * 10) + ((dwDate >> 24) & 0xF);
+ }
+
+ /* Retrieve week */
+ if ( pucWeek )
+ {
+ *pucWeek = ((dwDate >> 21) & 0x7);
+ }
+}
+
+/**
+ * \brief Sets the current year, month and day in the RTC.
+ * Month, day and week values must be numbered starting from 1.
+ *
+ * \note In successive update operations, the user must wait at least one second
+ * after resetting the UPDTIM/UPDCAL bit in the RTC_CR before setting these
+ * bits again. Please look at the RTC section of the datasheet for detail.
+ *
+ * \param wYear Current year.
+ * \param ucMonth Current month.
+ * \param ucDay Current day.
+ * \param ucWeek Day number in current week.
+ *
+ * \return 0 success, 1 fail to set
+ */
+extern int RTC_SetDate( Rtc* pRtc, uint16_t wYear, uint8_t ucMonth, uint8_t ucDay, uint8_t ucWeek )
+{
+ uint32_t wDate ;
+ uint8_t ucCent_bcd ;
+ uint8_t ucYear_bcd ;
+ uint8_t ucMonth_bcd ;
+ uint8_t ucDay_bcd ;
+ uint8_t ucWeek_bcd ;
+
+ ucCent_bcd = ((wYear/100)%10) | ((wYear/1000)<<4);
+ ucYear_bcd = (wYear%10) | (((wYear/10)%10)<<4);
+ ucMonth_bcd = ((ucMonth%10) | (ucMonth/10)<<4);
+ ucDay_bcd = ((ucDay%10) | (ucDay/10)<<4);
+ ucWeek_bcd = ((ucWeek%10) | (ucWeek/10)<<4);
+
+ /* value over flow */
+ if ( (ucCent_bcd & (uint8_t)(~RTC_CENT_BIT_LEN_MASK)) |
+ (ucYear_bcd & (uint8_t)(~RTC_YEAR_BIT_LEN_MASK)) |
+ (ucMonth_bcd & (uint8_t)(~RTC_MONTH_BIT_LEN_MASK)) |
+ (ucWeek_bcd & (uint8_t)(~RTC_WEEK_BIT_LEN_MASK)) |
+ (ucDay_bcd & (uint8_t)(~RTC_DATE_BIT_LEN_MASK))
+ )
+ {
+ return 1 ;
+ }
+
+
+ /* Convert values to date register value */
+ wDate = ucCent_bcd |
+ (ucYear_bcd << 8) |
+ (ucMonth_bcd << 16) |
+ (ucWeek_bcd << 21) |
+ (ucDay_bcd << 24);
+
+ /* Update calendar register */
+ pRtc->RTC_CR |= RTC_CR_UPDCAL ;
+ while ((pRtc->RTC_SR & RTC_SR_ACKUPD) != RTC_SR_ACKUPD) ;
+
+ pRtc->RTC_SCCR = RTC_SCCR_ACKCLR;
+ pRtc->RTC_CALR = wDate ;
+ pRtc->RTC_CR &= (uint32_t)(~RTC_CR_UPDCAL) ;
+ pRtc->RTC_SCCR |= RTC_SCCR_SECCLR; /* clear SECENV in SCCR */
+
+ return (int)(pRtc->RTC_VER & RTC_VER_NVCAL) ;
+}
+
+/**
+ * \brief Sets a date alarm in the RTC.
+ * The alarm will match only the provided values;
+ * Passing a null-pointer disables the corresponding field match.
+ *
+ * \param pucMonth If not null, the RTC alarm will month-match this value.
+ * \param pucDay If not null, the RTC alarm will day-match this value.
+ *
+ * \return 0 success, 1 fail to set
+ */
+extern int RTC_SetDateAlarm( Rtc* pRtc, uint8_t *pucMonth, uint8_t *pucDay )
+{
+ uint32_t dwAlarm ;
+
+ dwAlarm = ((pucMonth) || (pucDay)) ? (0) : (0x01010000);
+
+ TRACE_DEBUG( "RTC_SetDateAlarm()\n\r" ) ;
+
+ /* Compute alarm field value */
+ if ( pucMonth )
+ {
+ dwAlarm |= RTC_CALALR_MTHEN | ((*pucMonth / 10) << 20) | ((*pucMonth % 10) << 16);
+ }
+
+ if ( pucDay )
+ {
+ dwAlarm |= RTC_CALALR_DATEEN | ((*pucDay / 10) << 28) | ((*pucDay % 10) << 24);
+ }
+
+ /* Set alarm */
+ pRtc->RTC_CALALR = dwAlarm ;
+
+ return (int)(pRtc->RTC_VER & RTC_VER_NVCALALR) ;
+}
+
+/**
+ * \brief Clear flag bits of status clear command register in the RTC.
+ *
+ * \param mask Bits mask of cleared events
+ */
+extern void RTC_ClearSCCR( Rtc* pRtc, uint32_t dwMask )
+{
+ /* Clear all flag bits in status clear command register */
+ dwMask &= RTC_SCCR_ACKCLR | RTC_SCCR_ALRCLR | RTC_SCCR_SECCLR | RTC_SCCR_TIMCLR | RTC_SCCR_CALCLR ;
+
+ pRtc->RTC_SCCR = dwMask ;
+}
+
+/**
+ * \brief Get flag bits of status register in the RTC.
+ *
+ * \param mask Bits mask of Status Register
+ *
+ * \return Status register & mask
+ */
+extern uint32_t RTC_GetSR( Rtc* pRtc, uint32_t dwMask )
+{
+ uint32_t dwEvent ;
+
+ dwEvent = pRtc->RTC_SR ;
+
+ return (dwEvent & dwMask) ;
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/rtt.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/rtt.c
new file mode 100644
index 0000000..d2e553d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/rtt.c
@@ -0,0 +1,133 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/** \addtogroup rtt_module Working with RTT
+ * The RTT driver provides the interface to configure and use the RTT
+ * peripheral.
+ *
+ * The Real-time Timer is used to count elapsed seconds.\n
+ * This timer is clocked by the 32kHz system clock divided by a programmable
+ * 16-bit balue. To be accurate, it is better to use an
+ * external 32kHz crystal instead of the internal 32kHz RC.\n
+ *
+ * To count elapsed seconds, the user could follow these few steps:
+ * <ul>
+ * <li>Programming PTPRES in RTT_MR to feeding the timer with a 1Hz signal.</li>
+ * <li>Writing the bit RTTRST in RTT_MR to restart the timer with new settings.</li>
+ * </ul>
+ *
+ * An alarm can be set to happen on second by setting alarm value in RTT_AR.
+ * Alarm occurence can be detected by polling or interrupt.
+ *
+ * For more accurate information, please look at the RTT section of the
+ * Datasheet.
+ *
+ * Related files :\n
+ * \ref rtt.c\n
+ * \ref rtt.h.\n
+ */
+/*@{*/
+/*@}*/
+
+/**
+ * \file
+ *
+ * Implementation of Real Time Timer (RTT) controller.
+ *
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+#include "chip.h"
+
+#include <assert.h>
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Changes the prescaler value of the given RTT and restarts it.
+ *
+ * \note This function disables RTT interrupt sources.
+ *
+ * \param rtt Pointer to a Rtt instance.
+ * \param prescaler Prescaler value for the RTT.
+ */
+void RTT_SetPrescaler( Rtt *rtt, uint16_t wPreScaler )
+{
+ rtt->RTT_MR = (wPreScaler | RTT_MR_RTTRST) ;
+}
+
+/**
+ * \brief Returns the current value of the RTT timer value.
+ *
+ * \param rtt Pointer to a Rtt instance.
+ */
+uint32_t RTT_GetTime( Rtt *rtt )
+{
+ return rtt->RTT_VR ;
+}
+
+/**
+ * \brief Enables the specified RTT interrupt sources.
+ *
+ * \param rtt Pointer to a Rtt instance.
+ * \param sources Bitmask of interrupts to enable.
+ */
+void RTT_EnableIT( Rtt *rtt, uint32_t dwSources )
+{
+ assert( (dwSources & 0x0004FFFF) == 0 ) ;
+
+ rtt->RTT_MR |= dwSources ;
+}
+
+/**
+ * \brief Returns the status register value of the given RTT.
+ *
+ * \param rtt Pointer to an Rtt instance.
+ */
+uint32_t RTT_GetStatus( Rtt *rtt )
+{
+ return rtt->RTT_SR ;
+}
+
+/**
+ * \brief Configures the RTT to generate an alarm at the given time.
+ *
+ * \param pRtt Pointer to an Rtt instance.
+ * \param time Alarm time.
+ */
+void RTT_SetAlarm( Rtt *pRtt, uint32_t dwTime )
+{
+ assert( dwTime > 0 ) ;
+
+ pRtt->RTT_AR = dwTime - 1 ;
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/sdramc.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/sdramc.c
new file mode 100644
index 0000000..d3297ac
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/sdramc.c
@@ -0,0 +1,187 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * Implementation of memories configuration on board.
+ *
+ */
+/*----------------------------------------------------------------------------
+* Headers
+*----------------------------------------------------------------------------*/
+#include "chip.h"
+
+/*----------------------------------------------------------------------------
+* Local functions
+*----------------------------------------------------------------------------*/
+/**
+ * \brief Calculate the sdram controller config register value.
+ * \param pMemory Pointer to the sdram structure.
+ * \return Configure register value.
+ */
+static uint32_t SDRAMC_compute_CR_value( SSdramc_Memory* pMemory )
+{
+ uint32_t dw=0 ;
+
+ dw |= pMemory->cfg.dwColumnBits ;
+ dw |= pMemory->cfg.dwRowBits ;
+ dw |= pMemory->cfg.dwBanks ; //NB, number of banks
+ dw |= pMemory->cfg.dwCAS ; //CAS, CAS latency
+ dw |= pMemory->cfg.dwDataBusWidth ; //DBW, data bus width
+ dw |= SDRAMC_CR_TWR( pMemory->cfg.dwWriteRecoveryDelay ) ; //TWR, Write Recovery Delay
+ dw |= SDRAMC_CR_TRC_TRFC( pMemory->cfg.dwRowCycleDelay_RowRefreshCycle ) ; //TRC_TRFC,Row Cycle Delay and Row Refresh Cycle
+ dw |= SDRAMC_CR_TRP( pMemory->cfg.dwRowPrechargeDelay ) ; //TRP, Row Precharge Delay
+ dw |= SDRAMC_CR_TRCD( pMemory->cfg.dwRowColumnDelay ) ; //TRCD, Row to Column Delay
+ dw |= SDRAMC_CR_TRAS( pMemory->cfg.dwActivePrechargeDelay ) ; //TRAS, Active to Precharge Delay
+ dw |= SDRAMC_CR_TXSR( pMemory->cfg.dwExitSelfRefreshActiveDelay ) ; //TXSR, Exit Self Refresh to Active Delay
+
+ return dw ;
+}
+
+/*----------------------------------------------------------------------------
+* Exported functions
+*----------------------------------------------------------------------------*/
+/**
+ * \brief Configure and initialize the SDRAM controller.
+ * \param pMemory Pointer to the sdram structure.
+ * \param dwClockFrequency SDRAM clock frequency.
+ */
+extern void SDRAMC_Configure( SSdramc_Memory* pMemory, uint32_t dwClockFrequency )
+{
+ volatile uint32_t dw ;
+
+ /* SDRAM hardware init */
+ /* Enable peripheral clock */
+ PMC_EnablePeripheral( ID_SMC ) ;
+
+ /* SDRAM device configure */
+ /* Step 1. */
+ /* Program the features of SDRAM device into the Configuration Register.*/
+ SDRAMC->SDRAMC_CR = SDRAMC_compute_CR_value( pMemory ) ;
+
+ /* Step 2. */
+ /* For low-power SDRAM, temperature-compensated self refresh (TCSR),
+ drive strength (DS) and partial array self refresh (PASR) must be set
+ in the Low-power Register.*/
+ SDRAMC->SDRAMC_LPR = 0;
+
+ /* Step 3. */
+ /* Program the memory device type into the Memory Device Register */
+ SDRAMC->SDRAMC_MDR = SDRAMC_MDR_MD_SDRAM;
+
+ /* Step 4 */
+ /* A minimum pause of 200 ¦Ìs is provided to precede any signal toggle.
+ (6 core cycles per iteration) */
+ for ( dw = 0; dw < ((dwClockFrequency/1000000)*200/6) ; dw++ )
+ {
+ ;
+ }
+
+ /* Step 5. */
+ /* A NOP command is issued to the SDR-SDRAM. Program NOP command into
+ Mode Register, the application must set Mode to 1 in the Mode Register.
+ Perform a write access to any SDR-SDRAM address to acknowledge this command.
+ Now the clock which drives SDR-SDRAM device is enabled.*/
+ SDRAMC->SDRAMC_MR = SDRAMC_MR_MODE_NOP;
+ *(uint16_t *)(EBI_SDRAMC_ADDR) = 0;
+
+ /* Step 6. */
+ /* An all banks precharge command is issued to the SDR-SDRAM. Program all
+ banks precharge command into Mode Register, the application must set Mode to
+ 2 in the Mode Register . Perform a write access to any SDRSDRAM address to
+ acknowledge this command. */
+ SDRAMC->SDRAMC_MR = SDRAMC_MR_MODE_ALLBANKS_PRECHARGE;
+ *(uint16_t *)(EBI_SDRAMC_ADDR) = 0x0;
+
+ /* add some delays after precharge */
+ for ( dw = 0; dw < ((dwClockFrequency/1000000)*200/6) ; dw++ )
+ {
+ ;
+ }
+
+ /* Step 7. */
+ /* Eight auto-refresh (CBR) cycles are provided. Program the auto refresh
+ command (CBR) into Mode Register, the application must set Mode to 4 in
+ the Mode Register. Once in the idle state, eight AUTO REFRESH cycles must
+ be performed. */
+ SDRAMC->SDRAMC_MR = SDRAMC_MR_MODE_AUTO_REFRESH;
+ *(uint16_t *)(EBI_SDRAMC_ADDR + 0 ) = 0x1;
+
+ SDRAMC->SDRAMC_MR = SDRAMC_MR_MODE_AUTO_REFRESH;
+ *(uint16_t *)(EBI_SDRAMC_ADDR + 0) = 0x2;
+
+ SDRAMC->SDRAMC_MR = SDRAMC_MR_MODE_AUTO_REFRESH;
+ *(uint16_t *)(EBI_SDRAMC_ADDR + 0 ) = 0x3;
+
+ SDRAMC->SDRAMC_MR = SDRAMC_MR_MODE_AUTO_REFRESH;
+ *(uint16_t *)(EBI_SDRAMC_ADDR + 0) = 0x4;
+
+ SDRAMC->SDRAMC_MR = SDRAMC_MR_MODE_AUTO_REFRESH;
+ *(uint16_t *)(EBI_SDRAMC_ADDR + 0 ) = 0x5;
+
+ SDRAMC->SDRAMC_MR = SDRAMC_MR_MODE_AUTO_REFRESH;
+ *(uint16_t *)(EBI_SDRAMC_ADDR + 0) = 0x6;
+
+ SDRAMC->SDRAMC_MR = SDRAMC_MR_MODE_AUTO_REFRESH;
+ *(uint16_t *)(EBI_SDRAMC_ADDR + 0 ) = 0x7;
+
+ SDRAMC->SDRAMC_MR = SDRAMC_MR_MODE_AUTO_REFRESH;
+ *(uint16_t *)(EBI_SDRAMC_ADDR + 0) = 0x8;
+
+ /* Step 8. */
+ /* A Mode Register set (MRS) cycle is issued to program the parameters of
+ the SDRAM devices, in particular CAS latency and burst length. */
+ SDRAMC->SDRAMC_MR = SDRAMC_MR_MODE_LOAD_MODEREG;
+ *(uint16_t *)(EBI_SDRAMC_ADDR + 0x22) = 0xcafe;
+
+ /* Step 9. */
+ /* For low-power SDR-SDRAM initialization, an Extended Mode Register set
+ (EMRS) cycle is issued to program the SDR-SDRAM parameters (TCSR, PASR, DS).
+ The write address must be chosen so that BA[1] is set to 1 and BA[0] is set
+ to 0 */
+ SDRAMC->SDRAMC_MR = SDRAMC_MR_MODE_EXT_LOAD_MODEREG;
+ *((uint16_t *)(EBI_SDRAMC_ADDR + (1 << pMemory->cfg.dwBK1))) = 0;
+
+ /* Step 10. */
+ /* The application must go into Normal Mode, setting Mode to 0 in the Mode
+ Register and perform a write access at any location in the SDRAM to
+ acknowledge this command. */
+ SDRAMC->SDRAMC_MR = SDRAMC_MR_MODE_NORMAL;
+ *(uint16_t *)(EBI_SDRAMC_ADDR ) = 0x0;
+
+ /* Step 11. */
+ /* Write the refresh rate into the count field in the SDRAMC Refresh
+ Timer register. Set Refresh timer 15.625 us*/
+ dw=dwClockFrequency/1000u ;
+ dw*=15625u ;
+ dw/=1000000u ;
+ SDRAMC->SDRAMC_TR = SDRAMC_TR_COUNT( dw ) ;
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/smc.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/smc.c
new file mode 100644
index 0000000..e37ed03
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/smc.c
@@ -0,0 +1,947 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+ * \file
+ *
+ * Implementation of NFC functions.
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "chip.h"
+/*----------------------------------------------------------------------------
+ * Local functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Check if NFC command has done.
+ * \param pSmc Pointer to a Smc instance.
+ *
+ * \return Returns 1 if NFC controller has terminated the command,
+ * otherwise returns 0.
+ */
+static uint8_t SMC_NFC_CommandDone(Smc* pSmc)
+{
+ return ((pSmc->SMC_SR & SMC_SR_CMDDONE) == SMC_SR_CMDDONE);
+}
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Sets NFC configuration.
+ * \param pSmc Pointer to a Smc instance.
+ * \param cfg NFC configuration.
+ */
+void SMC_NFC_Configure(Smc* pSmc, uint32_t cfg)
+{
+ pSmc->SMC_CFG = cfg;
+}
+
+/**
+ * \brief Reset NFC controller.
+ * \param pSmc Pointer to a Smc instance.
+ */
+void SMC_NFC_Reset(Smc* pSmc)
+{
+ /* Disable all the SMC NFC interrupts */
+ pSmc->SMC_IDR = 0xFFFFFFFF;
+ pSmc->SMC_CTRL = 0;
+}
+
+/**
+ * \brief Enable NFC controller.
+ * \param pSmc Pointer to a Smc instance.
+ */
+void SMC_NFC_EnableNfc(Smc* pSmc)
+{
+ pSmc->SMC_CTRL = SMC_CTRL_NFCEN;
+}
+
+/**
+ * \brief Enable NFC controller reads both main and spare area in read mode.
+ * \param pSmc Pointer to a Smc instance.
+ */
+void SMC_NFC_EnableSpareRead(Smc* pSmc)
+{
+ pSmc->SMC_CFG |= SMC_CFG_RSPARE;
+}
+
+/**
+ * \brief The NFC controller skips spare area in read mode.
+ * \param pSmc Pointer to a Smc instance.
+ */
+void SMC_NFC_DisableSpareRead(Smc* pSmc)
+{
+ pSmc->SMC_CFG &= (~SMC_CFG_RSPARE);
+}
+
+/**
+ * \brief Enables the NFC controller writes both main and spare area in write
+ * \param pSmc Pointer to a Smc instance.
+ */
+void SMC_NFC_EnableSpareWrite(Smc* pSmc)
+{
+ pSmc->SMC_CFG |= SMC_CFG_WSPARE;
+}
+
+/**
+ * \brief The NFC controller skips spare area in write mode.
+ * \param pSmc Pointer to a Smc instance.
+ */
+void SMC_NFC_DisableSpareWrite(Smc* pSmc)
+{
+ pSmc->SMC_CFG &= (~SMC_CFG_WSPARE);
+}
+
+/**
+ * \brief Check if spare area be read in read mode.
+ * \param pSmc Pointer to a Smc instance.
+ *
+ * \return Returns 1 if NFC controller reads both main and spare area in
+ * read mode, otherwise returns 0.
+ */
+uint8_t SMC_NFC_isSpareRead(Smc* pSmc)
+{
+ return (((pSmc->SMC_CFG) >> 9) & 0x1);
+}
+
+/**
+ * \brief Check if spare area be written in write mode.
+ * \param pSmc Pointer to a Smc instance.
+ *
+ * \return Returns 1 if NFC controller writes both main and spare area in
+ * write mode, otherwise returns 0.
+ */
+uint8_t SMC_NFC_isSpareWrite(Smc* pSmc)
+{
+ return (((pSmc->SMC_CFG) >> 8) & 0x1);
+}
+
+/**
+ * \brief Check if NFC transfer complete.
+ * \param pSmc Pointer to a Smc instance.
+ *
+ * \return Returns 1 if NFC controller has terminated the data transmission,
+ * otherwise returns 0.
+ */
+uint8_t SMC_NFC_isTransferComplete(Smc* pSmc)
+{
+ return ((pSmc->SMC_SR & SMC_SR_XFRDONE) == SMC_SR_XFRDONE);
+}
+
+/**
+ * \brief Check Ready/Busy line.
+ * \param pSmc Pointer to a Smc instance.
+ *
+ * \return Returns 1 if edge has been detected on the Ready/Busy line,
+ * otherwise returns 0.
+ */
+uint8_t SMC_NFC_isReadyBusy(Smc* pSmc)
+{
+ return ((pSmc->SMC_SR & SMC_SR_RB_EDGE0) == SMC_SR_RB_EDGE0);
+}
+
+/**
+ * \brief Check if NFC Controller is busy.
+ * \param pSmc Pointer to a Smc instance.
+ *
+ * \return Returns 1 if NFC Controller is activated and accesses the memory device,
+ * otherwise returns 0.
+ */
+uint8_t SMC_NFC_isNfcBusy(Smc* pSmc)
+{
+ return ((pSmc->SMC_SR & SMC_SR_NFCBUSY) == SMC_SR_NFCBUSY);
+}
+
+/**
+ * \brief Get NFC Status.
+ * \param pSmc Pointer to a Smc instance.
+ *
+ * \return Returns the current status register of SMC NFC Status Register.
+ * This resets the internal value of the status register, so further
+ * read may yield different values.
+ */
+uint32_t SMC_NFC_GetStatus(Smc* pSmc)
+{
+ return pSmc->SMC_SR;
+}
+
+/*
+ * HOST command functions
+ */
+
+/**
+ * \brief Check if the host controller is busy.
+ * \return Returns 1 if the host controller is busy, otherwise returns 0.
+ */
+static uint8_t SMC_NFC_isHostBusy(void)
+{
+ return (((*((volatile uint32_t *) (NFC_CMD_BASE_ADDR + NFCADDR_CMD_NFCCMD))) & 0x8000000) == 0x8000000);
+}
+
+/**
+ * \brief Uses the HOST nandflash conntroller to send a command to the NFC.
+ * \param pSmc Pointer to a Smc instance.
+ * \param cmd command to send.
+ * \param addressCycle address cycle when command access id decoded.
+ * \param cycle0 address at first cycle.
+ */
+void SMC_NFC_SendCommand(Smc* pSmc, uint32_t cmd, uint32_t addressCycle, uint32_t cycle0)
+{
+ volatile uint32_t *pCommandAddress;
+
+ /* Wait until host controller is not busy. */
+ while(SMC_NFC_isHostBusy());
+ /* Send the command plus the ADDR_CYCLE */
+ pCommandAddress = (volatile uint32_t *) (cmd + NFC_CMD_BASE_ADDR);
+ pSmc->SMC_ADDR = cycle0;
+ *pCommandAddress = addressCycle;
+ while( !SMC_NFC_CommandDone(SMC));
+}
+
+/*
+ * ECC functions
+ */
+
+/*----------------------------------------------------------------------------
+ * Local functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Counts and return the number of bits set to '1' in the given byte.
+ * \param byte Byte to count.
+ */
+static uint8_t ECC_CountBitsInByte(uint8_t byte)
+{
+ uint8_t count = 0;
+
+ while (byte > 0) {
+
+ if (byte & 1) {
+
+ count++;
+ }
+ byte >>= 1;
+ }
+
+ return count;
+}
+
+/**
+ * \brief Counts and return the number of bits set to '1' in the given hsiao code.
+ * \param code Hsiao code.
+ */
+static uint8_t ECC_CountBitsInCode(uint8_t *code)
+{
+ return ECC_CountBitsInByte(code[0])
+ + ECC_CountBitsInByte(code[1])
+ + ECC_CountBitsInByte(code[2]);
+}
+
+/**
+ * \brief Get all ECC parity and Nparity value.
+ * \param pSmc Pointer to a Smc instance.
+ */
+void SMC_ECC_GetValue(Smc* pSmc, uint32_t *ecc)
+{
+ ecc[0] = pSmc->SMC_ECC_PR0;
+ ecc[1] = pSmc->SMC_ECC_PR1;
+ ecc[2] = pSmc->SMC_ECC_PR2;
+ ecc[3] = pSmc->SMC_ECC_PR3;
+ ecc[4] = pSmc->SMC_ECC_PR4;
+ ecc[5] = pSmc->SMC_ECC_PR5;
+ ecc[6] = pSmc->SMC_ECC_PR6;
+ ecc[7] = pSmc->SMC_ECC_PR7;
+ ecc[8] = pSmc->SMC_ECC_PR8;
+ ecc[9] = pSmc->SMC_ECC_PR9;
+ ecc[10] = pSmc->SMC_ECC_PR10;
+ ecc[11] = pSmc->SMC_ECC_PR11;
+ ecc[12] = pSmc->SMC_ECC_PR12;
+ ecc[13] = pSmc->SMC_ECC_PR13;
+ ecc[14] = pSmc->SMC_ECC_PR14;
+ ecc[15] = pSmc->SMC_ECC_PR15;
+#ifdef DUMP_ECC_PARITY
+ TRACE_INFO("Ecc parity(0-7) %x, %x, %x, %x, %x, %x, %x, %x \n\r",ecc[0],ecc[1],ecc[2],ecc[3],ecc[4],ecc[5],ecc[6],ecc[7]);
+ TRACE_INFO("Ecc parity(8-15) %x, %x, %x, %x, %x, %x, %x, %x \n\r",ecc[8],ecc[9],ecc[10],ecc[11],ecc[12],ecc[13],ecc[14],ecc[15]);
+#endif
+}
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Configures ECC mode.
+ * \param pSmc Pointer to a Smc instance.
+ * \param type Type of correction.
+ * \param pageSize Page size of NAND flash device.
+ */
+void SMC_ECC_Configure(Smc* pSmc, uint32_t type, uint32_t pageSize)
+{
+ /* Software Reset ECC. */
+ pSmc->SMC_ECC_CTRL = (0x1 << 1) ;
+ pSmc->SMC_ECC_MD = type | pageSize;
+}
+
+/**
+ * \brief Get ECC correction type.
+ * \param pSmc Pointer to a Smc instance.
+ *
+ * \return Returns type of ECC correction setting.
+ */
+uint32_t SMC_ECC_GetCorrectoinType(Smc* pSmc)
+{
+ return ((pSmc->SMC_ECC_MD)& SMC_ECC_MD_TYPCORREC_Msk);
+}
+
+/**
+ * \brief Get ECC status.
+ * \param pSmc Pointer to a Smc instance.
+ * \param eccNumber ecc parity number from 0 to 15.
+ *
+ * \return Returns ECC status by giving ecc number.
+ */
+uint8_t SMC_ECC_GetStatus(Smc* pSmc, uint8_t eccNumber)
+{
+ uint32_t status;
+
+ if (eccNumber < 8){
+ status = pSmc->SMC_ECC_SR1;
+ }
+ else {
+ status = pSmc->SMC_ECC_SR2;
+ eccNumber -=8;
+ }
+ return ((status >> (eccNumber * 4)) & 0x07);
+}
+
+/**
+ * \brief Verifies 4-bytes hsiao codes for a data block whose size is a page Size
+ * word. Page words block is verified between the given HSIAO code
+ * generated by hardware and original HSIAO codes store has been previously stored.
+ * Returns 0 if the data is correct, Hsiao_ERROR_SINGLEBIT if one or more
+ * block(s) have had a single bit corrected, or either Hsiao_ERROR_ECC
+ * or Hsiao_ERROR_MULTIPLEBITS.
+ *
+ * \param data Data buffer to verify.
+ * \param originalCode Original codes.
+ * \param verifyCode codes to be verified.
+ */
+static uint8_t SMC_ECC_VerifyPageOf8bitHsiao(
+ uint8_t *data,
+ const uint8_t *originalCode,
+ const uint8_t *verifyCode)
+{
+ uint8_t correctionCode[4];
+ uint8_t bitCount;
+
+ /* Xor both codes together */
+ correctionCode[0] = verifyCode[0] ^ originalCode[0];
+ correctionCode[1] = verifyCode[1] ^ originalCode[1];
+ correctionCode[2] = verifyCode[2] ^ originalCode[2];
+ correctionCode[3] = verifyCode[3] ^ originalCode[3];
+ TRACE_DEBUG("Correction code = %02X %02X %02X %02X\n\r",
+ correctionCode[0], correctionCode[1], correctionCode[2], correctionCode[3]);
+ /* If all bytes are 0, there is no error */
+ if ((correctionCode[0] == 0)
+ && (correctionCode[1] == 0)
+ && (correctionCode[2] == 0)
+ && (correctionCode[3] == 0)) {
+
+ return 0;
+ }
+ /* If there is a single bit error, there are 15 bits set to 1 */
+ bitCount = ECC_CountBitsInByte(correctionCode[0]) +
+ ECC_CountBitsInByte(correctionCode[1]) +
+ ECC_CountBitsInByte(correctionCode[2]) +
+ ECC_CountBitsInByte(correctionCode[3]);
+ if (bitCount == 15) {
+ /* Get byte and bit indexes */
+ uint16_t byte = (correctionCode[0] & 0xf0) >> 4;
+ byte |= (correctionCode[1] & 0xff) << 4;
+ uint8_t bit = correctionCode[0] & 0x0f;
+
+ /* Correct bit */
+ TRACE_INFO("Correcting byte #%d at bit %d\n\r", byte, bit);
+ data[byte] ^= (1 << bit);
+
+ return Hsiao_ERROR_SINGLEBIT;
+ }
+
+ /* Check if ECC has been corrupted */
+ if (bitCount == 1) {
+ return Hsiao_ERROR_ECC;
+ }
+ /* Otherwise, this is a multi-bit error */
+ else {
+ return Hsiao_ERROR_MULTIPLEBITS;
+ }
+}
+
+/**
+ * \brief Verifies 3-bytes hsiao codes for a data block whose size is multiple of
+ * 256 bytes. Each 256-bytes block is verified between the given HSIAO code
+ * generated by hardware and original HSIAO codes store has been previously stored.
+ * Returns 0 if the data is correct, Hsiao_ERROR_SINGLEBIT if one or more
+ * block(s) have had a single bit corrected, or either Hsiao_ERROR_ECC
+ * or Hsiao_ERROR_MULTIPLEBITS.
+ *
+ * \param data Data buffer to verify.
+ * \param size Size of the data in words.
+ * \param originalCode Original codes.
+ * \param verifyCode codes to be verified.
+ */
+static uint8_t SMC_ECC_Verify256x8bitHsiao(
+ uint8_t *data,
+ uint32_t size,
+ const uint8_t *originalCode,
+ const uint8_t *verifyCode)
+{
+ uint8_t correctionCode[3];
+ uint32_t position = 0;
+ uint8_t byte;
+ uint8_t bit;
+ uint8_t error = 0;
+
+ TRACE_DEBUG("SMC_ECC_Verify256x8bitHsiao()\n\r");
+ while (position < size) {
+ /* Xor both codes together */
+ correctionCode[0] = verifyCode[0] ^ originalCode[0];
+ correctionCode[1] = verifyCode[1] ^ originalCode[1];
+ correctionCode[2] = verifyCode[2] ^ originalCode[2];
+ TRACE_DEBUG("Correction code = %02X %02X %02X\n\r",
+ correctionCode[0], correctionCode[1], correctionCode[2]);
+
+ /* If all bytes are 0, there is no error */
+ if ( correctionCode[0] || correctionCode[1] || correctionCode[2]) {
+ /* If there is a single bit error, there are 11 bits set to 1 */
+ if (ECC_CountBitsInCode(correctionCode) == 11) {
+ /* Get byte and bit indexes */
+ byte = (correctionCode[0] & 0xf8) >> 3;
+ byte |= (correctionCode[1] & 0x07) << 5;
+ bit = correctionCode[0] & 0x07;
+
+ /* Correct bit */
+ TRACE_INFO("Correcting byte #%d at bit %d\n\r", (int)(position + byte), (int)bit);
+ data[byte] ^= (1 << bit);
+ error = Hsiao_ERROR_SINGLEBIT;
+ }
+ /* Check if ECC has been corrupted */
+ else if (ECC_CountBitsInCode(correctionCode) == 1) {
+ return Hsiao_ERROR_ECC;
+ }
+ else {
+ /* Otherwise, this is a multi-bit error */
+ return Hsiao_ERROR_MULTIPLEBITS;
+ }
+ }
+ data += 256;
+ originalCode += 3;
+ verifyCode += 3;
+ position += 256;
+ }
+ return error;
+}
+
+/**
+ * \brief Verifies 3-bytes hsiao codes for a data block whose size is multiple of
+ * 512 bytes. Each 512-bytes block is verified between the given HSIAO code
+ * generated by hardware and original HSIAO codes store has been previously stored.
+ * Returns 0 if the data is correct, Hsiao_ERROR_SINGLEBIT if one or more
+ * block(s) have had a single bit corrected, or either Hsiao_ERROR_ECC
+ * or Hsiao_ERROR_MULTIPLEBITS.
+ *
+ * \param data Data buffer to verify.
+ * \param size Size of the data in words.
+ * \param originalCode Original codes.
+ * \param verifyCode codes to be verified.
+ */
+static uint8_t SMC_ECC_Verify512x8bitHsiao(
+ uint8_t *data,
+ uint32_t size,
+ const uint8_t *originalCode,
+ const uint8_t *verifyCode)
+{
+ uint8_t correctionCode[3];
+ uint32_t position = 0;
+ uint16_t byte;
+ uint8_t bit;
+ uint8_t error = 0;
+
+ TRACE_DEBUG("SMC_ECC_Verify512x8bitHsiao()\n\r");
+ while (position < size) {
+ /* Xor both codes together */
+ correctionCode[0] = verifyCode[0] ^ originalCode[0];
+ correctionCode[1] = verifyCode[1] ^ originalCode[1];
+ correctionCode[2] = verifyCode[2] ^ originalCode[2];
+ TRACE_DEBUG("Correction code = %02X %02X %02X\n\r",
+ correctionCode[0], correctionCode[1], correctionCode[2]);
+
+ /* If all bytes are 0, there is no error */
+ if ( correctionCode[0] || correctionCode[1] || correctionCode[2]) {
+ /* If there is a single bit error, there are 11 bits set to 1 */
+ if (ECC_CountBitsInCode(correctionCode) == 12) {
+ /* Get byte and bit indexes */
+ byte = (correctionCode[0] & 0xf8) >> 3;
+ byte |= (correctionCode[1] & 0x0f) << 5;
+ bit = correctionCode[0] & 0x07;
+
+ /* Correct bit */
+ TRACE_INFO("Correcting byte #%d at bit %d\n\r", (int)(position + byte), (int)bit);
+ data[byte] ^= (1 << bit);
+ error = Hsiao_ERROR_SINGLEBIT;
+ }
+ /* Check if ECC has been corrupted */
+ else if (ECC_CountBitsInCode(correctionCode) == 1) {
+ return Hsiao_ERROR_ECC;
+ }
+ else {
+ /* Otherwise, this is a multi-bit error */
+ return Hsiao_ERROR_MULTIPLEBITS;
+ }
+ }
+ data += 512;
+ originalCode += 3;
+ verifyCode += 3;
+ position += 512;
+ }
+ return error;
+}
+
+/**
+ * \breif Verifies 4-bytes hsiao codes for a data block whose size is a page Size
+ * word. Page words block is verified between the given HSIAO code
+ * generated by hardware and original HSIAO codes store has been previously stored.
+ * Returns 0 if the data is correct, Hsiao_ERROR_SINGLEBIT if one or more
+ * block(s) have had a single bit corrected, or either Hsiao_ERROR_ECC
+ * or Hsiao_ERROR_MULTIPLEBITS.
+ *
+ * \param data Data buffer to verify.
+ * \param originalCode Original codes.
+ * \param verifyCode codes to be verified.
+ */
+static uint8_t SMC_ECC_VerifyPageOf16bitHsiao(
+ uint16_t *data,
+ const uint8_t *originalCode,
+ const uint8_t *verifyCode)
+{
+ uint8_t correctionCode[4];
+ uint8_t bitCount;
+
+ /* Xor both codes together */
+ correctionCode[0] = verifyCode[0] ^ originalCode[0];
+ correctionCode[1] = verifyCode[1] ^ originalCode[1];
+ correctionCode[2] = verifyCode[2] ^ originalCode[2];
+ correctionCode[3] = verifyCode[3] ^ originalCode[3];
+ TRACE_DEBUG("Correction code = %02X %02X %02X %02X\n\r",
+ correctionCode[0], correctionCode[1], correctionCode[2], correctionCode[3]);
+ /* If all bytes are 0, there is no error */
+ if ((correctionCode[0] == 0)
+ && (correctionCode[1] == 0)
+ && (correctionCode[2] == 0)
+ && (correctionCode[3] == 0)) {
+
+ return 0;
+ }
+ /* If there is a single bit error, there are 11 bits set to 1 */
+ bitCount = ECC_CountBitsInByte(correctionCode[0]) +
+ ECC_CountBitsInByte(correctionCode[1]) +
+ ECC_CountBitsInByte(correctionCode[2]) +
+ ECC_CountBitsInByte(correctionCode[3]);
+ TRACE_DEBUG("bitCount = %d \n\r",bitCount);
+ if (bitCount == 12) {
+ /* Get byte and bit indexes */
+ uint8_t word = (correctionCode[0] & 0xf0) >> 4;
+ word |= (correctionCode[1] & 0xff) << 4;
+ uint8_t bit = correctionCode[0] & 0x0f;
+
+ /* Correct bit */
+ TRACE_INFO("Correcting word #%d at bit %d\n\r", word, bit);
+ data[word] ^= (1 << bit);
+
+ return Hsiao_ERROR_SINGLEBIT;
+ }
+
+ /* Check if ECC has been corrupted */
+ if (bitCount == 1) {
+ return Hsiao_ERROR_ECC;
+ }
+ /* Otherwise, this is a multi-bit error */
+ else {
+ return Hsiao_ERROR_MULTIPLEBITS;
+ }
+}
+
+/**
+ * \brief Verifies 3-bytes hsiao codes for a data block whose size is multiple of
+ * 256 word.Each 256-words block is verified between the given HSIAO code
+ * generated by hardware and original HSIAO codes store has been previously stored.
+ * Returns 0 if the data is correct, Hsiao_ERROR_SINGLEBIT if one or more
+ * block(s) have had a single bit corrected, or either Hsiao_ERROR_ECC
+ * or Hsiao_ERROR_MULTIPLEBITS.
+ *
+ * \param data Data buffer to verify.
+ * \param size Size of the data in words.
+ * \param originalCode Original codes.
+ * \param verifyCode codes to be verified.
+ */
+static uint8_t SMC_ECC_Verify256x16bitHsiao(
+ uint16_t *data,
+ uint32_t size,
+ const uint8_t *originalCode,
+ const uint8_t *verifyCode
+ )
+{
+ uint8_t correctionCode[3];
+ uint32_t position = 0;
+ uint8_t word;
+ uint8_t bit;
+ uint8_t error = 0;
+
+ TRACE_DEBUG("SMC_ECC_Verify256x16bitHsiao()\n\r");
+ while (position < size) {
+ /* Xor both codes together */
+ correctionCode[0] = verifyCode[0] ^ originalCode[0];
+ correctionCode[1] = verifyCode[1] ^ originalCode[1];
+ correctionCode[2] = verifyCode[2] ^ originalCode[2];
+ TRACE_DEBUG("Correction code = %02X %02X %02X\n\r",
+ correctionCode[0], correctionCode[1], correctionCode[2]);
+
+ /* If all bytes are 0, there is no error */
+ if ( correctionCode[0] || correctionCode[1] || correctionCode[2]) {
+ /* If there is a single bit error, there are 11 bits set to 1 */
+ if (ECC_CountBitsInCode(correctionCode) == 12) {
+ /* Get word and bit indexes */
+ word = (correctionCode[0] & 0xf0) >> 4;
+ word |= (correctionCode[1] & 0x0f) << 4;
+ bit = correctionCode[0] & 0x0f;
+
+ /* Correct bit */
+ TRACE_INFO("Correcting word #%d at bit %d\n\r", (int)(position + word), (int)bit);
+ data[word] ^= (1 << bit);
+ error = Hsiao_ERROR_SINGLEBIT;
+ }
+ /* Check if ECC has been corrupted */
+ else if (ECC_CountBitsInCode(correctionCode) == 1) {
+ return Hsiao_ERROR_ECC;
+ }
+ else {
+ /* Otherwise, this is a multi-bit error */
+ return Hsiao_ERROR_MULTIPLEBITS;
+ }
+ }
+ data += 256;
+ originalCode += 3;
+ verifyCode += 3;
+ position += 256;
+ }
+ return error;
+}
+
+/**
+ * \brief Verifies hsiao codes for a data block. The block is verified between the given
+ * HSIAO code generated by hardware and original HSIAO codes store has been
+ * previously stored.
+ *
+ * \param data Data buffer to verify.
+ * \param size Size of the data in words.
+ * \param originalCode Original codes.
+ * \param verifyCode codes to be verified.
+ * \param dataPath 8bit/16bit data path.
+ *
+ * \return Returns 0 if the data is correct, Hsiao_ERROR_SINGLEBIT if one or more
+ * block(s) have had a single bit corrected, or either Hsiao_ERROR_ECC
+ * or Hsiao_ERROR_MULTIPLEBITS.
+ */
+uint8_t SMC_ECC_VerifyHsiao(
+ uint8_t *data,
+ uint32_t size,
+ const uint8_t *originalCode,
+ const uint8_t *verifyCode,
+ uint8_t dataPath)
+{
+ uint8_t correctionType;
+ uint8_t error = 0;
+
+ correctionType = SMC_ECC_GetCorrectoinType(SMC);
+ /* For 16-bit data path */
+ if (dataPath == 16) {
+ switch (correctionType){
+ case SMC_ECC_MD_TYPCORREC_CPAGE:
+ error = SMC_ECC_VerifyPageOf16bitHsiao((uint16_t*)data, originalCode, verifyCode);
+ break;
+ case SMC_ECC_MD_TYPCORREC_C256B:
+ error= SMC_ECC_Verify256x16bitHsiao((uint16_t*)data, size / 2, originalCode, verifyCode);
+ break;
+ case SMC_ECC_MD_TYPCORREC_C512B :
+ TRACE_WARNING("16-bit 512 per page correction not yet implement! \n\r");
+ break;
+ }
+ }
+ /* For 8-bit data path */
+ else {
+ switch (correctionType){
+ case SMC_ECC_MD_TYPCORREC_CPAGE:
+ error = SMC_ECC_VerifyPageOf8bitHsiao(data, originalCode, verifyCode);
+ break;
+ case SMC_ECC_MD_TYPCORREC_C256B:
+ error = SMC_ECC_Verify256x8bitHsiao(data, size, originalCode, verifyCode);
+ break;
+ case SMC_ECC_MD_TYPCORREC_C512B:
+ error = SMC_ECC_Verify512x8bitHsiao(data, size, originalCode, verifyCode);
+ break;
+ }
+ }
+ return error;
+}
+
+/**
+ * \brief Get 32-bit ECC code for 16-bit data path NAND flash.
+ * 32-bit ECC is generated in order to perform one bit correction
+ * for a page in page 512/1024/2048/4096 for 16-bit words
+ *
+ * \param size Data size in bytes.
+ * \param code Codes buffer.
+ */
+static void SMC_ECC_Get24bitPerPageEcc(uint32_t pageDataSize, uint8_t *code)
+{
+ uint32_t eccParity;
+ uint32_t eccNparity;
+ uint32_t ecc[16];
+
+ pageDataSize = pageDataSize; /* stop warning */
+
+ /* Get Parity value. */
+ SMC_ECC_GetValue(SMC, ecc);
+
+ /* ---- P16384'P8192'P4096'P2048' P1024'P512'P256' --- 4th. Ecc Byte to store */
+ /* P128' P64' P32' P16' P8' P4' P2' P1' --- 3rd. Ecc Byte to store */
+ /* ---- P16384 P8192 P4096 P2048 P1024 P512 P256 --- 2nd. Ecc Byte to store */
+ /* P128 P64 P32 P16 P8 P4 P2 P1 --- 1st. Ecc Byte to store */
+
+ /* Invert codes (linux compatibility) */
+ eccParity = ~(ecc[0]);
+ eccNparity = ~(ecc[1]);
+ TRACE_DEBUG("ecc Parity is 0x%08x, ecc Nparity is 0x%08x \n\r", (unsigned int)eccParity, (unsigned int)eccNparity);
+ code[0] = eccParity & 0xff;
+ code[1] = (eccParity >> 8 )& 0xff;
+ code[2] = eccNparity & 0xff;
+ code[3] = (eccNparity >> 8 )& 0xff;
+}
+
+/**
+ * \brief Get 24-bit ECC code for 8-bit data path NAND flash.
+ * 24-bit ECC is generated in order to perform one bit correction
+ * for 256 byte in page 512/1024/2048/4096 for 8-bit words
+ *
+ * \param size Data size in bytes.
+ * \param code Codes buffer.
+ */
+static void SMC_ECC_Get24bitPer256Ecc(uint32_t pageDataSize, uint8_t *code)
+{
+ uint8_t i;
+ uint8_t numEcc;
+ uint32_t eccParity;
+ uint32_t ecc[16];
+
+ SMC_ECC_GetValue(SMC, ecc);
+ numEcc = pageDataSize / 256;
+
+ /* P2048' P1024' P512' P256' P128' P64' P32' P16' --- 3rd. Ecc Byte to store */
+ /* P8' P4' P2' P1' P2048 P1024 P512 P256 --- 2nd. Ecc Byte to store */
+ /* P128 P64 P32 P16 P8 P4 P2 P1 --- 1st. Ecc Byte to store */
+ for (i = 0; i < numEcc; i++) {
+ /* Get Parity and NParity value. */
+ eccParity = ecc[i];
+ /* Invert codes (linux compatibility) */
+ eccParity = ~eccParity;
+ TRACE_DEBUG("ecc Parity%d is 0x%08x \n\r", (int)i, (unsigned int)eccParity);
+ code[i * 3] = eccParity & 0xff;
+ code[i * 3 + 1] = (eccParity >> 8) & 0xff;
+ code[i * 3 + 2] = (eccParity >> 16) & 0xff;
+ }
+}
+
+/**
+ * \brief Get 24-bit ECC code for 8-bit data path NAND flash.
+ * 24-bit ECC is generated in order to perform one bit correction
+ * for 512 byte in page 512/1024/2048/4096 for 8-bit words
+ *
+ * \param size Data size in bytes.
+ * \param code Codes buffer.
+ */
+static void SMC_ECC_Get24bitPer512Ecc(uint32_t pageDataSize, uint8_t *code)
+{
+ uint8_t i;
+ uint8_t numEcc;
+ uint32_t eccParity;
+ uint32_t ecc[16];
+
+ SMC_ECC_GetValue(SMC, ecc);
+ numEcc = pageDataSize / 512;
+
+ /* P2048' P1024' P512' P256' P128' P64' P32' P16' --- 3rd. Ecc Byte to store */
+ /* P8' P4' P2' P1' P2048 P1024 P512 P256 --- 2nd. Ecc Byte to store */
+ /* P128 P64 P32 P16 P8 P4 P2 P1 --- 1st. Ecc Byte to store */
+ for (i = 0; i < numEcc; i++) {
+ /* Get Parity and NParity value. */
+ eccParity = ecc[i];
+ /* Invert codes (linux compatibility) */
+ eccParity = ~eccParity;
+ TRACE_DEBUG("ecc Parity%d is 0x%08x \n\r", (int)i, (unsigned int)eccParity);
+ code[i * 3] = eccParity & 0xff;
+ code[i * 3 + 1] = (eccParity >> 8) & 0xff;
+ code[i * 3 + 2] = (eccParity >> 16) & 0xff;
+ }
+}
+
+/**
+ * \breif Get 32-bit ECC code for 16-bit data path NAND flash.
+ * 32-bit ECC is generated in order to perform one bit correction
+ * for 256 word in page 512/1024/2048/4096 for 16-bit words
+ *
+ * \param size Data size in bytes.
+ * \param code Codes buffer.
+ */
+static void SMC_ECC_Get32bitPer256Ecc(uint32_t pageDataSize, uint8_t *code)
+{
+ uint8_t i;
+ uint8_t numEcc;
+ uint32_t eccParity;
+ uint32_t eccNparity;
+ uint32_t ecc[16];
+
+ SMC_ECC_GetValue(SMC, ecc);
+ numEcc = pageDataSize / 256;
+
+ /* P2048' P1024' P512' P256' P128' P64' P32' P16' --- 3rd. Ecc Byte to store */
+ /* P8' P4' P2' P1' P2048 P1024 P512 P256 --- 2nd. Ecc Byte to store */
+ /* P128 P64 P32 P16 P8 P4 P2 P1 --- 1st. Ecc Byte to store */
+ for (i = 0; i < numEcc; i+= 2) {
+ /* Get Parity value. */
+ eccParity = ecc[i];
+ /* Invert codes (linux compatibility) */
+ eccParity = ~eccParity;
+ /* Get NParity value. */
+ eccNparity = ecc[i + 1];
+ eccNparity = ~eccNparity;
+ TRACE_DEBUG("ecc Parity%d is 0x%08x, ecc Nparity%d is 0x%08x \n\r", (int)i, (unsigned int)eccParity, (int)i, (unsigned int)eccNparity);
+ code[i * 3] = eccParity & 0xff;
+ code[i * 3 + 1] = ((eccParity >> 8) & 0x0f ) | ((eccNparity & 0x0f) << 4);
+ code[i * 3 + 2] = (eccNparity >> 4) & 0xff;
+
+ code[(i + 1) * 3] = (eccParity >> 16) & 0xff;
+ code[(i + 1) * 3 + 1] = ((eccParity >> 24) & 0x0f ) | (((eccNparity >> 16)& 0x0f) << 4);
+ code[(i + 1) * 3 + 2] = (eccNparity >> 20) & 0xff;
+
+ }
+}
+
+/**
+ * \breif Get 32-bit ECC code for 16-bit data path NAND flash.
+ * 32-bit ECC is generated in order to perform one bit correction
+ * for a page in page 512/1024/2048/4096 for 16-bit words
+ *
+ * \param size Data size in bytes.
+ * \param code Codes buffer.
+ */
+static void SMC_ECC_Get32bitPerPageEcc(uint32_t pageDataSize, uint8_t *code)
+{
+ uint32_t eccParity;
+ uint32_t eccNparity;
+ uint32_t ecc[16];
+
+ pageDataSize = pageDataSize; /* stop warning */
+
+ /* Get Parity value. */
+ SMC_ECC_GetValue(SMC, ecc);
+
+ /* ---- P16384'P8192'P4096'P2048' P1024'P512'P256' --- 4th. Ecc Byte to store */
+ /* P128' P64' P32' P16' P8' P4' P2' P1' --- 3rd. Ecc Byte to store */
+ /* ---- P16384 P8192 P4096 P2048 P1024 P512 P256 --- 2nd. Ecc Byte to store */
+ /* P128 P64 P32 P16 P8 P4 P2 P1 --- 1st. Ecc Byte to store */
+
+ /* Invert codes (linux compatibility) */
+ eccParity = ~(ecc[0]);
+ eccNparity = ~(ecc[1]);
+ TRACE_DEBUG("ecc Parity is 0x%08x, ecc Nparity is 0x%08x \n\r", (unsigned int)eccParity, (unsigned int)eccNparity);
+ code[0] = eccParity & 0xff;
+ code[1] = (eccParity >> 8 )& 0xff;
+ code[2] = eccNparity & 0xff;
+ code[3] = (eccNparity >> 8 )& 0xff;
+}
+
+/**
+ * Get ECC code for 8bit/16-bit data path NAND flash by giving data path.
+ * 24-bit or 32-bit ECC is generated in order to perform one bit correction
+ * for a page in page 512/1024/2048/4096.
+ *
+ * \param size Data size in bytes.
+ * \param code Codes buffer.
+ * \param dataPath 8bit/16bit data path.
+ */
+void SMC_ECC_GetEccParity(uint32_t pageDataSize, uint8_t *code, uint8_t dataPath)
+{
+ uint8_t correctionType;
+
+ correctionType = SMC_ECC_GetCorrectoinType(SMC);
+ /* For 16-bit data path */
+ if (dataPath == 16) {
+ switch (correctionType){
+ case SMC_ECC_MD_TYPCORREC_CPAGE:
+ SMC_ECC_Get32bitPerPageEcc(pageDataSize, code);
+ break;
+ case SMC_ECC_MD_TYPCORREC_C256B:
+ SMC_ECC_Get32bitPer256Ecc(pageDataSize, code);
+ break;
+ case SMC_ECC_MD_TYPCORREC_C512B:
+ TRACE_WARNING("16 bit 512 byte correct not yet implement! \n\r");
+ break;
+ }
+ }
+ /* For 8-bit data path */
+ else {
+ switch (correctionType){
+ case SMC_ECC_MD_TYPCORREC_CPAGE:
+ SMC_ECC_Get24bitPerPageEcc(pageDataSize, code);
+ break;
+ case SMC_ECC_MD_TYPCORREC_C256B:
+ SMC_ECC_Get24bitPer256Ecc(pageDataSize, code);
+ break;
+ case SMC_ECC_MD_TYPCORREC_C512B:
+ SMC_ECC_Get24bitPer512Ecc(pageDataSize, code);
+ break;
+ }
+ }
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/spi.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/spi.c
new file mode 100644
index 0000000..dbe09c7
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/spi.c
@@ -0,0 +1,282 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2011, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/** \addtogroup spi_module Working with SPI
+ * The SPI driver provides the interface to configure and use the SPI
+ * peripheral.
+ *
+ * The Serial Peripheral Interface (SPI) circuit is a synchronous serial
+ * data link that provides communication with external devices in Master
+ * or Slave Mode.
+ *
+ * To use the SPI, the user has to follow these few steps:
+ * -# Enable the SPI pins required by the application (see pio.h).
+ * -# Configure the SPI using the \ref SPI_Configure(). This enables the
+ * peripheral clock. The mode register is loaded with the given value.
+ * -# Configure all the necessary chip selects with \ref SPI_ConfigureNPCS().
+ * -# Enable the SPI by calling \ref SPI_Enable().
+ * -# Send/receive data using \ref SPI_Write() and \ref SPI_Read(). Note that
+\ref SPI_Read()
+ * must be called after \ref SPI_Write() to retrieve the last value read.
+ * -# Send/receive data using the PDC with the \ref SPI_WriteBuffer() and
+ * \ref SPI_ReadBuffer() functions.
+ * -# Disable the SPI by calling \ref SPI_Disable().
+ *
+ * For more accurate information, please look at the SPI section of the
+ * Datasheet.
+ *
+ * Related files :\n
+ * \ref spi.c\n
+ * \ref spi.h.\n
+*/
+/*@{*/
+/*@}*/
+
+/**
+ * \file
+ *
+ * Implementation of Serial Peripheral Interface (SPI) controller.
+ *
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "chip.h"
+
+#include <stdint.h>
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Enables a SPI peripheral.
+ *
+ * \param spi Pointer to an Spi instance.
+ */
+extern void SPI_Enable( Spi* spi )
+{
+ spi->SPI_CR = SPI_CR_SPIEN ;
+}
+
+/**
+ * \brief Disables a SPI peripheral.
+ *
+ * \param spi Pointer to an Spi instance.
+ */
+extern void SPI_Disable( Spi* spi )
+{
+ spi->SPI_CR = SPI_CR_SPIDIS ;
+}
+
+/**
+ * \brief Enables one or more interrupt sources of a SPI peripheral.
+ *
+ * \param spi Pointer to an Spi instance.
+ * \param sources Bitwise OR of selected interrupt sources.
+ */
+extern void SPI_EnableIt( Spi* spi, uint32_t dwSources )
+{
+ spi->SPI_IER = dwSources ;
+}
+
+/**
+ * \brief Disables one or more interrupt sources of a SPI peripheral.
+ *
+ * \param spi Pointer to an Spi instance.
+ * \param sources Bitwise OR of selected interrupt sources.
+ */
+extern void SPI_DisableIt( Spi* spi, uint32_t dwSources )
+{
+ spi->SPI_IDR = dwSources ;
+}
+
+/**
+ * \brief Configures a SPI peripheral as specified. The configuration can be computed
+ * using several macros (see \ref spi_configuration_macros).
+ *
+ * \param spi Pointer to an Spi instance.
+ * \param id Peripheral ID of the SPI.
+ * \param configuration Value of the SPI configuration register.
+ */
+extern void SPI_Configure( Spi* spi, uint32_t dwId, uint32_t dwConfiguration )
+{
+ PMC_EnablePeripheral( dwId ) ;
+ spi->SPI_CR = SPI_CR_SPIDIS ;
+
+ /* Execute a software reset of the SPI twice */
+ spi->SPI_CR = SPI_CR_SWRST ;
+ spi->SPI_CR = SPI_CR_SWRST ;
+ spi->SPI_MR = dwConfiguration ;
+}
+
+/**
+ * \brief Configures SPI chip select.
+ *
+ * \param spi Pointer to an Spi instance.
+ * \param cS Chip select of NPSCx.
+ */
+extern void SPI_ChipSelect( Spi* spi, uint8_t cS)
+{
+ spi->SPI_MR |= SPI_MR_PCS_Msk ;
+ spi->SPI_MR &= ~(SPI_MR_PCS ( cS )) ;
+}
+
+/**
+ * \brief Configures SPI Mode Register.
+ *
+ * \param spi Pointer to an Spi instance.
+ * \param configuration Value of the SPI mode register.
+ */
+extern void SPI_SetMode( Spi* spi,
+ uint32_t dwConfiguration )
+{
+ spi->SPI_MR = dwConfiguration ;
+}
+
+/**
+ * \brief Configures SPI to release last used CS line.
+ *
+ * \param spi Pointer to an Spi instance.
+ */
+extern void SPI_ReleaseCS( Spi* spi )
+{
+ spi->SPI_CR = SPI_CR_LASTXFER ;
+}
+
+
+/**
+ * \brief Configures a chip select of a SPI peripheral. The chip select configuration
+ * is computed using several macros (see \ref spi_configuration_macros).
+ *
+ * \param spi Pointer to an Spi instance.
+ * \param npcs Chip select to configure (0, 1, 2 or 3).
+ * \param configuration Desired chip select configuration.
+ */
+void SPI_ConfigureNPCS( Spi* spi, uint32_t dwNpcs, uint32_t dwConfiguration )
+{
+ spi->SPI_CSR[dwNpcs] = dwConfiguration ;
+}
+
+/**
+ * \brief Configures a chip select active mode of a SPI peripheral.
+ *
+ * \param spi Pointer to an Spi instance.
+ * \param dwNpcs Chip select to configure (0, 1, 2 or 3).
+ * \param bReleaseOnLast CS controlled by last transfer.
+ * SPI_ReleaseCS() is used to deactive CS.
+ */
+void SPI_ConfigureCSMode( Spi* spi, uint32_t dwNpcs, uint32_t bReleaseOnLast )
+{
+ if (bReleaseOnLast)
+ {
+ spi->SPI_CSR[dwNpcs] |= SPI_CSR_CSAAT;
+ }
+ else
+ {
+ spi->SPI_CSR[dwNpcs] &= ~SPI_CSR_CSAAT;
+ }
+}
+
+/**
+ * \brief Get the current status register of the given SPI peripheral.
+ * \note This resets the internal value of the status register, so further
+ * read may yield different values.
+ * \param spi Pointer to a Spi instance.
+ * \return SPI status register.
+ */
+extern uint32_t SPI_GetStatus( Spi* spi )
+{
+ return spi->SPI_SR ;
+}
+
+/**
+ * \brief Reads and returns the last word of data received by a SPI peripheral. This
+ * method must be called after a successful SPI_Write call.
+ *
+ * \param spi Pointer to an Spi instance.
+ *
+ * \return readed data.
+ */
+extern uint32_t SPI_Read( Spi* spi )
+{
+ while ( (spi->SPI_SR & SPI_SR_RDRF) == 0 ) ;
+
+ return spi->SPI_RDR & 0xFFFF ;
+}
+
+/**
+ * \brief Sends data through a SPI peripheral. If the SPI is configured to use a fixed
+ * peripheral select, the npcs value is meaningless. Otherwise, it identifies
+ * the component which shall be addressed.
+ *
+ * \param spi Pointer to an Spi instance.
+ * \param npcs Chip select of the component to address (0, 1, 2 or 3).
+ * \param data Word of data to send.
+ */
+extern void SPI_Write( Spi* spi, uint32_t dwNpcs, uint16_t wData )
+{
+ /* Send data */
+ while ( (spi->SPI_SR & SPI_SR_TXEMPTY) == 0 ) ;
+ spi->SPI_TDR = wData | SPI_PCS( dwNpcs ) ;
+ while ( (spi->SPI_SR & SPI_SR_TDRE) == 0 ) ;
+}
+
+/**
+ * \brief Sends last data through a SPI peripheral.
+ * If the SPI is configured to use a fixed peripheral select, the npcs value is
+ * meaningless. Otherwise, it identifies the component which shall be addressed.
+ *
+ * \param spi Pointer to an Spi instance.
+ * \param npcs Chip select of the component to address (0, 1, 2 or 3).
+ * \param data Word of data to send.
+ */
+extern void SPI_WriteLast( Spi* spi, uint32_t dwNpcs, uint16_t wData )
+{
+ /* Send data */
+ while ( (spi->SPI_SR & SPI_SR_TXEMPTY) == 0 ) ;
+ spi->SPI_TDR = wData | SPI_PCS( dwNpcs ) | SPI_TDR_LASTXFER ;
+ while ( (spi->SPI_SR & SPI_SR_TDRE) == 0 ) ;
+}
+
+/**
+ * \brief Check if SPI transfer finish.
+ *
+ * \param spi Pointer to an Spi instance.
+ *
+ * \return Returns 1 if there is no pending write operation on the SPI; otherwise
+ * returns 0.
+ */
+extern uint32_t SPI_IsFinished( Spi* spi )
+{
+ return ((spi->SPI_SR & SPI_SR_TXEMPTY) != 0) ;
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/ssc.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/ssc.c
new file mode 100644
index 0000000..a25eeb6
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/ssc.c
@@ -0,0 +1,197 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/** \addtogroup ssc_module Working with SSC
+ * The SSC driver provides the interface to configure and use the SSC
+ * peripheral.
+ *
+ * !Usage
+ *
+ * -# Enable the SSC interface pins.
+ * -# Configure the SSC to operate at a specific frequency by calling
+ * SSC_Configure(). This function enables the peripheral clock of the SSC,
+ * but not its PIOs.
+ * -# Configure the transmitter and/or the receiver using the
+ * SSC_ConfigureTransmitter() and SSC_ConfigureEmitter() functions.
+ * -# Enable the PIOs or the transmitter and/or the received.
+ * -# Enable the transmitter and/or the receiver using SSC_EnableTransmitter()
+ * and SSC_EnableReceiver()
+ * -# Send data through the transmitter using SSC_Write()
+ * -# Receive data from the receiver using SSC_Read()
+ * -# Disable the transmitter and/or the receiver using SSC_DisableTransmitter()
+ * and SSC_DisableReceiver()
+ *
+ * For more accurate information, please look at the RTC section of the
+ * Datasheet.
+ *
+ * Related files :\n
+ * \ref ssc.c\n
+ * \ref ssc.h.\n
+*/
+/*@{*/
+/*@}*/
+
+
+/**
+ * \file
+ *
+ * Implementation of Synchronous Serial (SSC) controller.
+ *
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "chip.h"
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Configures a SSC peripheral.If the divided clock is not used, the master
+ * clock frequency can be set to 0.
+ * \note The emitter and transmitter are disabled by this function.
+ * \param bitRate bit rate.
+ * \param masterClock master clock.
+ */
+extern void SSC_Configure( Ssc* pSsc, uint32_t dwBitRate, uint32_t dwMasterClock )
+{
+ /* Enable SSC peripheral clock */
+ PMC_EnablePeripheral( ID_SSC ) ;
+
+ /* Reset, disable receiver & transmitter */
+ pSsc->SSC_CR = SSC_CR_RXDIS | SSC_CR_TXDIS | SSC_CR_SWRST ;
+
+// pSsc->SSC_PTCR = SSC_PTCR_RXTDIS | SSC_PTCR_TXTDIS ;
+
+ /* Configure clock frequency */
+ if ( dwBitRate != 0 )
+ {
+ pSsc->SSC_CMR = dwMasterClock / (dwBitRate<<1) ;
+ }
+ else
+ {
+ pSsc->SSC_CMR = 0 ;
+ }
+}
+
+/**
+ * \brief Configures the transmitter of a SSC peripheral.
+ * \param tcmr Transmit Clock Mode Register value.
+ * \param tfmr Transmit Frame Mode Register value.
+ */
+extern void SSC_ConfigureTransmitter( Ssc* pSsc, uint32_t dwTCMR, uint32_t dwTFMR )
+{
+ pSsc->SSC_TCMR = dwTCMR ;
+ pSsc->SSC_TFMR = dwTFMR ;
+}
+
+/**
+ * \brief Configures the receiver of a SSC peripheral.
+ * \param rcmr Receive Clock Mode Register value.
+ * \param rfmr Receive Frame Mode Register value.
+ */
+extern void SSC_ConfigureReceiver( Ssc* pSsc, uint32_t dwRCMR, uint32_t dwRFMR )
+{
+ pSsc->SSC_RCMR = dwRCMR ;
+ pSsc->SSC_RFMR = dwRFMR ;
+}
+
+/**
+ * \brief Enables the transmitter of a SSC peripheral.
+ */
+extern void SSC_EnableTransmitter( Ssc* pSsc )
+{
+ pSsc->SSC_CR = SSC_CR_TXEN ;
+}
+
+/**
+ * \brief Disables the transmitter of a SSC peripheral.
+ */
+extern void SSC_DisableTransmitter( Ssc* pSsc )
+{
+ pSsc->SSC_CR = SSC_CR_TXDIS ;
+}
+
+/**
+ * \brief Enables the receiver of a SSC peripheral.
+ */
+extern void SSC_EnableReceiver( Ssc* pSsc )
+{
+ pSsc->SSC_CR = SSC_CR_RXEN ;
+}
+
+/**
+ * \brief Disables the receiver of a SSC peripheral.
+ */
+extern void SSC_DisableReceiver( Ssc* pSsc )
+{
+ pSsc->SSC_CR = SSC_CR_RXDIS ;
+}
+
+/**
+ * \brief Enables one or more interrupt sources of a SSC peripheral.
+ * \param sources Bitwise OR of selected interrupt sources.
+ */
+extern void SSC_EnableInterrupts( Ssc* pSsc, uint32_t dwSources )
+{
+ pSsc->SSC_IER = dwSources ;
+}
+
+/**
+ * \brief Disables one or more interrupt sources of a SSC peripheral.
+ * \param sources Bitwise OR of selected interrupt sources.
+ */
+extern void SSC_DisableInterrupts( Ssc* pSsc, uint32_t dwSources )
+{
+ pSsc->SSC_IDR = dwSources ;
+}
+
+/**
+ * \brief Sends one data frame through a SSC peripheral. If another frame is currently
+ * being sent, this function waits for the previous transfer to complete.
+ * \param frame Data frame to send.
+ */
+extern void SSC_Write( Ssc* pSsc, uint32_t dwFrame )
+{
+ while ( (pSsc->SSC_SR & SSC_SR_TXRDY) == 0 ) ;
+ pSsc->SSC_THR = dwFrame ;
+}
+
+/**
+ * \brief Waits until one frame is received on a SSC peripheral, and returns it.
+ */
+extern uint32_t SSC_Read( Ssc* pSsc )
+{
+ while ( (pSsc->SSC_SR & SSC_SR_RXRDY) == 0 ) ;
+
+ return pSsc->SSC_RHR ;
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/tc.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/tc.c
new file mode 100644
index 0000000..9cad546
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/tc.c
@@ -0,0 +1,175 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * Implementation of Timer Counter (TC).
+ *
+ */
+
+/*------------------------------------------------------------------------------
+ * Headers
+ *------------------------------------------------------------------------------*/
+
+#include "chip.h"
+
+#include <assert.h>
+
+/*------------------------------------------------------------------------------
+ * Global functions
+ *------------------------------------------------------------------------------*/
+
+/**
+ * \brief Configures a Timer Counter Channel
+ *
+ * Configures a Timer Counter to operate in the given mode. Timer is stopped
+ * after configuration and must be restarted with TC_Start(). All the
+ * interrupts of the timer are also disabled.
+ *
+ * \param pTc Pointer to a Tc instance.
+ * \param channel Channel number.
+ * \param mode Operating mode (TC_CMR value).
+ */
+extern void TC_Configure( Tc *pTc, uint32_t dwChannel, uint32_t dwMode )
+{
+ TcChannel* pTcCh ;
+
+ assert( dwChannel < (sizeof( pTc->TC_CHANNEL )/sizeof( pTc->TC_CHANNEL[0] )) ) ;
+ pTcCh = pTc->TC_CHANNEL+dwChannel ;
+
+ /* Disable TC clock */
+ pTcCh->TC_CCR = TC_CCR_CLKDIS ;
+
+ /* Disable interrupts */
+ pTcCh->TC_IDR = 0xFFFFFFFF ;
+
+ /* Clear status register */
+ pTcCh->TC_SR ;
+
+ /* Set mode */
+ pTcCh->TC_CMR = dwMode ;
+}
+
+/**
+ * \brief Reset and Start the TC Channel
+ *
+ * Enables the timer clock and performs a software reset to start the counting.
+ *
+ * \param pTc Pointer to a Tc instance.
+ * \param dwChannel Channel number.
+ */
+extern void TC_Start( Tc *pTc, uint32_t dwChannel )
+{
+ TcChannel* pTcCh ;
+
+ assert( dwChannel < (sizeof( pTc->TC_CHANNEL )/sizeof( pTc->TC_CHANNEL[0] )) ) ;
+
+ pTcCh = pTc->TC_CHANNEL+dwChannel ;
+ pTcCh->TC_CCR = TC_CCR_CLKEN | TC_CCR_SWTRG ;
+}
+
+/**
+ * \brief Stop TC Channel
+ *
+ * Disables the timer clock, stopping the counting.
+ *
+ * \param pTc Pointer to a Tc instance.
+ * \param dwChannel Channel number.
+ */
+extern void TC_Stop(Tc *pTc, uint32_t dwChannel )
+{
+ TcChannel* pTcCh ;
+
+ assert( dwChannel < (sizeof( pTc->TC_CHANNEL )/sizeof( pTc->TC_CHANNEL[0] )) ) ;
+
+ pTcCh = pTc->TC_CHANNEL+dwChannel ;
+ pTcCh->TC_CCR = TC_CCR_CLKDIS ;
+}
+
+/**
+ * \brief Find best MCK divisor
+ *
+ * Finds the best MCK divisor given the timer frequency and MCK. The result
+ * is guaranteed to satisfy the following equation:
+ * \code
+ * (MCK / (DIV * 65536)) <= freq <= (MCK / DIV)
+ * \endcode
+ * with DIV being the highest possible value.
+ *
+ * \param dwFreq Desired timer frequency.
+ * \param dwMCk Master clock frequency.
+ * \param dwDiv Divisor value.
+ * \param dwTcClks TCCLKS field value for divisor.
+ * \param dwBoardMCK Board clock frequency.
+ *
+ * \return 1 if a proper divisor has been found, otherwise 0.
+ */
+extern uint32_t TC_FindMckDivisor( uint32_t dwFreq, uint32_t dwMCk, uint32_t *dwDiv, uint32_t *dwTcClks, uint32_t dwBoardMCK )
+{
+ const uint32_t adwDivisors[5] = { 2, 8, 32, 128, dwBoardMCK / 32768 } ;
+
+ uint32_t dwIndex = 0 ;
+
+ /* Satisfy lower bound */
+ while ( dwFreq < ((dwMCk / adwDivisors[dwIndex]) / 65536) )
+ {
+ dwIndex++ ;
+
+ /* If no divisor can be found, return 0 */
+ if ( dwIndex == (sizeof( adwDivisors )/sizeof( adwDivisors[0] )) )
+ {
+ return 0 ;
+ }
+ }
+
+ /* Try to maximize DIV while satisfying upper bound */
+ while ( dwIndex < 4 )
+ {
+
+ if ( dwFreq > (dwMCk / adwDivisors[dwIndex + 1]) )
+ {
+ break ;
+ }
+ dwIndex++ ;
+ }
+
+ /* Store results */
+ if ( dwDiv )
+ {
+ *dwDiv = adwDivisors[dwIndex] ;
+ }
+ if ( dwTcClks )
+ {
+ *dwTcClks = dwIndex ;
+ }
+
+ return 1 ;
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/trng.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/trng.c
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/trng.c
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/twi.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/twi.c
new file mode 100644
index 0000000..6ed6a51
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/twi.c
@@ -0,0 +1,479 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/** \addtogroup twi_module Working with TWI
+ * The TWI driver provides the interface to configure and use the TWI
+ * peripheral.
+ *
+ * \section Usage
+ * <ul>
+ * <li> Configures a TWI peripheral to operate in master mode, at the given
+ * frequency (in Hz) using TWI_Configure(). </li>
+ * <li> Sends a STOP condition on the TWI using TWI_Stop().</li>
+ * <li> Starts a read operation on the TWI bus with the specified slave using
+ * TWI_StartRead(). Data must then be read using TWI_ReadByte() whenever
+ * a byte is available (poll using TWI_ByteReceived()).</li>
+ * <li> Starts a write operation on the TWI to access the selected slave using
+ * TWI_StartWrite(). A byte of data must be provided to start the write;
+ * other bytes are written next.</li>
+ * <li> Sends a byte of data to one of the TWI slaves on the bus using TWI_WriteByte().
+ * This function must be called once before TWI_StartWrite() with the first byte of data
+ * to send, then it shall be called repeatedly after that to send the remaining bytes.</li>
+ * <li> Check if a byte has been received and can be read on the given TWI
+ * peripheral using TWI_ByteReceived().<
+ * Check if a byte has been sent using TWI_ByteSent().</li>
+ * <li> Check if the current transmission is complete (the STOP has been sent)
+ * using TWI_TransferComplete().</li>
+ * <li> Enables & disable the selected interrupts sources on a TWI peripheral
+ * using TWI_EnableIt() and TWI_DisableIt().</li>
+ * <li> Get current status register of the given TWI peripheral using
+ * TWI_GetStatus(). Get current status register of the given TWI peripheral, but
+ * masking interrupt sources which are not currently enabled using
+ * TWI_GetMaskedStatus().</li>
+ * </ul>
+ * For more accurate information, please look at the TWI section of the
+ * Datasheet.
+ *
+ * Related files :\n
+ * \ref twi.c\n
+ * \ref twi.h.\n
+*/
+/*@{*/
+/*@}*/
+
+/**
+ * \file
+ *
+ * Implementation of Two Wire Interface (TWI).
+ *
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "chip.h"
+
+#include <assert.h>
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Configures a TWI peripheral to operate in master mode, at the given
+ * frequency (in Hz). The duty cycle of the TWI clock is set to 50%.
+ * \param pTwi Pointer to an Twi instance.
+ * \param twck Desired TWI clock frequency.
+ * \param mck Master clock frequency.
+ */
+void TWI_ConfigureMaster( Twi* pTwi, uint32_t dwTwCk, uint32_t dwMCk )
+{
+ uint32_t dwCkDiv = 0 ;
+ uint32_t dwClDiv ;
+ uint32_t dwOk = 0 ;
+
+ TRACE_DEBUG( "TWI_ConfigureMaster()\n\r" ) ;
+ assert( pTwi ) ;
+
+ /* SVEN: TWI Slave Mode Enabled */
+ pTwi->TWI_CR = TWI_CR_SVEN ;
+ /* Reset the TWI */
+ pTwi->TWI_CR = TWI_CR_SWRST ;
+ pTwi->TWI_RHR ;
+
+ /* TWI Slave Mode Disabled, TWI Master Mode Disabled. */
+ pTwi->TWI_CR = TWI_CR_SVDIS ;
+ pTwi->TWI_CR = TWI_CR_MSDIS ;
+
+ /* Set master mode */
+ pTwi->TWI_CR = TWI_CR_MSEN ;
+
+ /* Configure clock */
+ while ( !dwOk )
+ {
+ dwClDiv = ((dwMCk / (2 * dwTwCk)) - 4) / (1<<dwCkDiv) ;
+
+ if ( dwClDiv <= 255 )
+ {
+ dwOk = 1 ;
+ }
+ else
+ {
+ dwCkDiv++ ;
+ }
+ }
+
+ assert( dwCkDiv < 8 ) ;
+ TRACE_DEBUG( "Using CKDIV = %u and CLDIV/CHDIV = %u\n\r", dwCkDiv, dwClDiv ) ;
+
+ pTwi->TWI_CWGR = 0 ;
+ pTwi->TWI_CWGR = (dwCkDiv << 16) | (dwClDiv << 8) | dwClDiv ;
+}
+
+/**
+ * \brief Configures a TWI peripheral to operate in slave mode.
+ * \param pTwi Pointer to an Twi instance.
+ * \param slaveAddress Slave address.
+ */
+void TWI_ConfigureSlave(Twi *pTwi, uint8_t slaveAddress)
+{
+ uint32_t i;
+
+ /* TWI software reset */
+ pTwi->TWI_CR = TWI_CR_SWRST;
+ pTwi->TWI_RHR;
+
+ /* Wait at least 10 ms */
+ for (i=0; i < 1000000; i++);
+
+ /* TWI Slave Mode Disabled, TWI Master Mode Disabled*/
+ pTwi->TWI_CR = TWI_CR_SVDIS | TWI_CR_MSDIS;
+
+ /* Configure slave address. */
+ pTwi->TWI_SMR = 0;
+ pTwi->TWI_SMR = TWI_SMR_SADR(slaveAddress);
+
+ /* SVEN: TWI Slave Mode Enabled */
+ pTwi->TWI_CR = TWI_CR_SVEN;
+
+ /* Wait at least 10 ms */
+ for (i=0; i < 1000000; i++);
+ assert( (pTwi->TWI_CR & TWI_CR_SVDIS)!= TWI_CR_SVDIS ) ;
+}
+
+/**
+ * \brief Sends a STOP condition on the TWI.
+ * \param pTwi Pointer to an Twi instance.
+ */
+void TWI_Stop( Twi *pTwi )
+{
+ assert( pTwi != NULL ) ;
+
+ pTwi->TWI_CR = TWI_CR_STOP;
+}
+
+/**
+ * \brief Starts a read operation on the TWI bus with the specified slave, it returns
+ * immediately. Data must then be read using TWI_ReadByte() whenever a byte is
+ * available (poll using TWI_ByteReceived()).
+ * \param pTwi Pointer to an Twi instance.
+ * \param address Slave address on the bus.
+ * \param iaddress Optional internal address bytes.
+ * \param isize Number of internal address bytes.
+ */
+void TWI_StartRead(
+ Twi *pTwi,
+ uint8_t address,
+ uint32_t iaddress,
+ uint8_t isize)
+{
+ assert( pTwi != NULL ) ;
+ assert( (address & 0x80) == 0 ) ;
+ assert( (iaddress & 0xFF000000) == 0 ) ;
+ assert( isize < 4 ) ;
+
+ /* Set slave address and number of internal address bytes. */
+ pTwi->TWI_MMR = 0;
+ pTwi->TWI_MMR = (isize << 8) | TWI_MMR_MREAD | (address << 16);
+
+ /* Set internal address bytes */
+ pTwi->TWI_IADR = 0;
+ pTwi->TWI_IADR = iaddress;
+
+ /* Send START condition */
+ pTwi->TWI_CR = TWI_CR_START;
+}
+
+/**
+ * \brief Reads a byte from the TWI bus. The read operation must have been started
+ * using TWI_StartRead() and a byte must be available (check with TWI_ByteReceived()).
+ * \param pTwi Pointer to an Twi instance.
+ * \return byte read.
+ */
+uint8_t TWI_ReadByte(Twi *pTwi)
+{
+ assert( pTwi != NULL ) ;
+
+ return pTwi->TWI_RHR;
+}
+
+/**
+ * \brief Sends a byte of data to one of the TWI slaves on the bus.
+ * \note This function must be called once before TWI_StartWrite() with
+ * the first byte of data to send, then it shall be called repeatedly
+ * after that to send the remaining bytes.
+ * \param pTwi Pointer to an Twi instance.
+ * \param byte Byte to send.
+ */
+void TWI_WriteByte(Twi *pTwi, uint8_t byte)
+{
+ assert( pTwi != NULL ) ;
+
+ pTwi->TWI_THR = byte;
+}
+
+/**
+ * \brief Starts a write operation on the TWI to access the selected slave, then
+ * returns immediately. A byte of data must be provided to start the write;
+ * other bytes are written next.
+ * after that to send the remaining bytes.
+ * \param pTwi Pointer to an Twi instance.
+ * \param address Address of slave to acccess on the bus.
+ * \param iaddress Optional slave internal address.
+ * \param isize Number of internal address bytes.
+ * \param byte First byte to send.
+ */
+void TWI_StartWrite(
+ Twi *pTwi,
+ uint8_t address,
+ uint32_t iaddress,
+ uint8_t isize)
+{
+ assert( pTwi != NULL ) ;
+ assert( (address & 0x80) == 0 ) ;
+ assert( (iaddress & 0xFF000000) == 0 ) ;
+ assert( isize < 4 ) ;
+
+ /* Set slave address and number of internal address bytes. */
+ pTwi->TWI_MMR = 0;
+ pTwi->TWI_MMR = (isize << 8) | (address << 16);
+
+ /* Set internal address bytes. */
+ pTwi->TWI_IADR = 0;
+ pTwi->TWI_IADR = iaddress;
+
+}
+
+/**
+ * \brief Check if a byte have been receiced from TWI.
+ * \param pTwi Pointer to an Twi instance.
+ * \return 1 if a byte has been received and can be read on the given TWI
+ * peripheral; otherwise, returns 0. This function resets the status register.
+ */
+uint8_t TWI_ByteReceived(Twi *pTwi)
+{
+ return ((pTwi->TWI_SR & TWI_SR_RXRDY) == TWI_SR_RXRDY);
+}
+
+/**
+ * \brief Check if a byte have been sent to TWI.
+ * \param pTwi Pointer to an Twi instance.
+ * \return 1 if a byte has been sent so another one can be stored for
+ * transmission; otherwise returns 0. This function clears the status register.
+ */
+uint8_t TWI_ByteSent(Twi *pTwi)
+{
+ return ((pTwi->TWI_SR & TWI_SR_TXRDY) == TWI_SR_TXRDY);
+}
+
+/**
+ * \brief Check if current transmission is complet.
+ * \param pTwi Pointer to an Twi instance.
+ * \return 1 if the current transmission is complete (the STOP has been sent);
+ * otherwise returns 0.
+ */
+uint8_t TWI_TransferComplete(Twi *pTwi)
+{
+ return ((pTwi->TWI_SR & TWI_SR_TXCOMP) == TWI_SR_TXCOMP);
+}
+
+/**
+ * \brief Check if current PDC transmission is completed.
+ * \param pTwi Pointer to an Twi instance.
+ * \return 1 if the current transmission is completed (before the STOP condition);
+ * otherwise returns 0.
+ */
+uint8_t TWI_PDCTransferComplete(Twi *pTwi)
+{
+ return ((pTwi->TWI_SR & TWI_SR_TXBUFE) == TWI_SR_TXBUFE);
+}
+
+/**
+ * \brief Check if current PDC receiving is completed.
+ * \param pTwi Pointer to an Twi instance.
+ * \return 1 if the current transmission is completed;
+ * otherwise returns 0.
+ */
+uint8_t TWI_PDCReceiveComplete(Twi *pTwi)
+{
+ return ((pTwi->TWI_SR & TWI_SR_RXBUFF) == TWI_SR_RXBUFF);
+}
+
+/**
+ * \brief Enables the selected interrupts sources on a TWI peripheral.
+ * \param pTwi Pointer to an Twi instance.
+ * \param sources Bitwise OR of selected interrupt sources.
+ */
+void TWI_EnableIt(Twi *pTwi, uint32_t sources)
+{
+ assert( pTwi != NULL ) ;
+ assert( (sources & 0xFFFFF088) == 0 ) ;
+
+ pTwi->TWI_IER = sources;
+}
+
+/**
+ * \brief Disables the selected interrupts sources on a TWI peripheral.
+ * \param pTwi Pointer to an Twi instance.
+ * \param sources Bitwise OR of selected interrupt sources.
+ */
+void TWI_DisableIt(Twi *pTwi, uint32_t sources)
+{
+ assert( pTwi != NULL ) ;
+ assert( (sources & 0xFFFFF088) == 0 ) ;
+
+ pTwi->TWI_IDR = sources;
+}
+
+/**
+ * \brief Get the current status register of the given TWI peripheral.
+ * \note This resets the internal value of the status register, so further
+ * read may yield different values.
+ * \param pTwi Pointer to an Twi instance.
+ * \return TWI status register.
+ */
+uint32_t TWI_GetStatus(Twi *pTwi)
+{
+ assert( pTwi != NULL ) ;
+
+ return pTwi->TWI_SR;
+}
+
+/**
+ * \brief Returns the current status register of the given TWI peripheral, but
+ * masking interrupt sources which are not currently enabled.
+ * \note This resets the internal value of the status register, so further
+ * read may yield different values.
+ * \param pTwi Pointer to an Twi instance.
+ */
+uint32_t TWI_GetMaskedStatus(Twi *pTwi)
+{
+ uint32_t status;
+
+ assert( pTwi != NULL ) ;
+
+ status = pTwi->TWI_SR;
+ status &= pTwi->TWI_IMR;
+
+ return status;
+}
+
+/**
+ * \brief Sends a STOP condition. STOP Condition is sent just after completing
+ * the current byte transmission in master read mode.
+ * \param pTwi Pointer to an Twi instance.
+ */
+void TWI_SendSTOPCondition(Twi *pTwi)
+{
+ assert( pTwi != NULL ) ;
+
+ pTwi->TWI_CR |= TWI_CR_STOP;
+}
+
+/**
+ * \brief Write data to the EEPROM through PDC channel
+ * \param pTWI the pointer of TWI peripheral
+ * \param pBuffer the destination buffer
+ * \param size the size of the buffer
+*/
+uint32_t TWI_PDC_write( Twi* pTwi, uint8_t *pwBuffer, uint32_t dwSize )
+{
+ /* Check if the first PDC bank is free*/
+ if ( (pTwi->TWI_TCR == 0) && (pTwi->TWI_TNCR == 0) )
+ {
+ pTwi->TWI_TPR = (uint32_t)pwBuffer ;
+ pTwi->TWI_TCR = dwSize ;
+ pTwi->TWI_PTCR = TWI_PTCR_TXTEN ;
+
+ return 1 ;
+ }
+ /* Check if the second PDC bank is free*/
+ else
+ {
+ if (pTwi->TWI_TNCR == 0)
+ {
+ pTwi->TWI_TNPR = (uint32_t)pwBuffer ;
+ pTwi->TWI_TNCR = dwSize ;
+
+ return 1 ;
+ }
+ else
+ {
+ return 0 ;
+ }
+ }
+}
+
+/**
+ * \brief Read data from the EEPROM through PDC channel
+ *
+ * \param pTwi the pointer of adc peripheral
+ * \param pBuffer the destination buffer
+ * \param dwSize the size of the buffer
+ */
+uint32_t TWI_PDC_read( Twi * pTwi, uint8_t *pwBuffer, uint32_t dwSize )
+{
+ /* Check if the first PDC bank is free*/
+ if ( (pTwi->TWI_RCR == 0) && (pTwi->TWI_RNCR == 0) )
+ {
+ pTwi->TWI_RPR = (uint32_t)pwBuffer ;
+ pTwi->TWI_RCR = dwSize ;
+ pTwi->TWI_PTCR = TWI_PTCR_RXTEN;
+
+ return 1;
+ }
+ /* Check if the second PDC bank is free*/
+ else
+ {
+ if ( pTwi->TWI_RNCR == 0 )
+ {
+ pTwi->TWI_RNPR = (uint32_t)pwBuffer ;
+ pTwi->TWI_RNCR = dwSize ;
+
+ return 1 ;
+ }
+ else
+ {
+ return 0 ;
+ }
+ }
+}
+
+/**
+ * \brief Disable PDC channel.
+ * \param pTwi Pointer to an Twi instance.
+ */
+
+void TWI_PDC_Disable( Twi * pTwi )
+{
+ assert( pTwi != NULL ) ;
+ pTwi->TWI_PTCR = TWI_PTCR_RXTDIS;
+ pTwi->TWI_PTCR = TWI_PTCR_TXTDIS;
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/usart.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/usart.c
new file mode 100644
index 0000000..0c53986
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/usart.c
@@ -0,0 +1,409 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/** \addtogroup usart_module Working with USART
+ * The USART driver provides the interface to configure and use the USART peripheral.\n
+ *
+ * The USART supports several kinds of comminication modes such as full-duplex asynchronous/
+ * synchronous serial commnunication,RS485 with driver control signal,ISO7816,SPI and Test modes.
+ *
+ * To start a USART transfer with \ref AT91SAM3S_PDC "PDC" support, the user could follow these steps:
+ * <ul>
+ * <li> Configure USART with expected mode and baudrate(see \ref USART_Configure), which could be done by:
+ * -# Resetting and disabling transmitter and receiver by setting US_CR(Control Register). </li>
+ * -# Conifguring the USART in a specific mode by setting USART_MODE bits in US_MR(Mode Register) </li>
+ * -# Setting baudrate which is different from mode to mode.
+ </li>
+ * <li> Enable transmitter or receiver respectively by set US_CR_TXEN or US_CR_RXEN in US_CR.</li>
+ * <li> Read from or write to the peripheral with \ref USART_ReadBuffer or \ref USART_WriteBuffer.
+ These operations could be done by polling or interruption. </li>
+ * <li> For polling, check the status bit US_CSR_ENDRX/US_CSR_RXBUFF (READ) or US_CSR_ENDTX/
+ US_CSR_TXBUFE (WRITE). </li>
+ * <li> For interruption,"enable" the status bit through US_IER and
+ realize the hanler with USARTx_IrqHandler according to IRQ vector
+ table which is defined in board_cstartup_<toolchain>.c
+ To enable the interruption of USART,it should be configured with priority and enabled first through
+ NVIC .</li>
+ * </ul>
+ *
+ * For more accurate information, please look at the USART section of the
+ * Datasheet.
+ *
+ * Related files :\n
+ * \ref usart.c\n
+ * \ref usart.h\n
+*/
+
+
+
+/**
+ * \file
+ *
+ * Implementation of USART (Universal Synchronous Asynchronous Receiver Transmitter)
+ * controller.
+ *
+ */
+/*------------------------------------------------------------------------------
+ * Headers
+ *------------------------------------------------------------------------------*/
+#include "chip.h"
+
+#include <assert.h>
+#include <string.h>
+
+/*----------------------------------------------------------------------------
+ * Local definitions
+ *----------------------------------------------------------------------------*/
+
+
+/*------------------------------------------------------------------------------
+ * Exported functions
+ *------------------------------------------------------------------------------*/
+
+/**
+ * \brief Configures an USART peripheral with the specified parameters.
+ *
+ *
+ * \param usart Pointer to the USART peripheral to configure.
+ * \param mode Desired value for the USART mode register (see the datasheet).
+ * \param baudrate Baudrate at which the USART should operate (in Hz).
+ * \param masterClock Frequency of the system master clock (in Hz).
+ */
+void USART_Configure(Usart *usart,
+ uint32_t mode,
+ uint32_t baudrate,
+ uint32_t masterClock)
+{
+ /* Reset and disable receiver & transmitter*/
+ usart->US_CR = US_CR_RSTRX | US_CR_RSTTX
+ | US_CR_RXDIS | US_CR_TXDIS;
+
+ /* Configure mode*/
+ usart->US_MR = mode;
+
+ /* Configure baudrate*/
+ /* Asynchronous, no oversampling*/
+ if ( ((mode & US_MR_SYNC) == 0) && ((mode & US_MR_OVER) == 0) )
+ {
+ usart->US_BRGR = (masterClock / baudrate) / 16;
+ }
+
+ if( ((mode & US_MR_USART_MODE_SPI_MASTER) == US_MR_USART_MODE_SPI_MASTER)
+ || ((mode & US_MR_SYNC) == US_MR_SYNC))
+ {
+ if( (mode & US_MR_USCLKS_Msk) == US_MR_USCLKS_MCK)
+ {
+ usart->US_BRGR = masterClock / baudrate;
+ }
+ else
+ {
+ if ( (mode & US_MR_USCLKS_DIV) == US_MR_USCLKS_DIV)
+ {
+ usart->US_BRGR = masterClock / baudrate / 8;
+ }
+ }
+ }
+ /* TODO other modes*/
+}
+/**
+ * \brief Enables or disables the transmitter of an USART peripheral.
+ *
+ *
+ * \param usart Pointer to an USART peripheral
+ * \param enabled If true, the transmitter is enabled; otherwise it is
+ * disabled.
+ */
+void USART_SetTransmitterEnabled(Usart *usart, uint8_t enabled)
+{
+ if (enabled) {
+
+ usart->US_CR = US_CR_TXEN;
+ }
+ else {
+
+ usart->US_CR = US_CR_TXDIS;
+ }
+}
+
+/**
+ * \brief Enables or disables the receiver of an USART peripheral
+ *
+ *
+ * \param usart Pointer to an USART peripheral
+ * \param enabled If true, the receiver is enabled; otherwise it is disabled.
+ */
+void USART_SetReceiverEnabled(Usart *usart,
+ uint8_t enabled)
+{
+ if (enabled) {
+
+ usart->US_CR = US_CR_RXEN;
+ }
+ else {
+
+ usart->US_CR = US_CR_RXDIS;
+ }
+}
+
+/**
+ * \brief Sends one packet of data through the specified USART peripheral. This
+ * function operates synchronously, so it only returns when the data has been
+ * actually sent.
+ *
+ *
+ * \param usart Pointer to an USART peripheral.
+ * \param data Data to send including 9nth bit and sync field if necessary (in
+ * the same format as the US_THR register in the datasheet).
+ * \param timeOut Time out value (0 = no timeout).
+ */
+void USART_Write(
+ Usart *usart,
+ uint16_t data,
+ volatile uint32_t timeOut)
+{
+ if (timeOut == 0) {
+
+ while ((usart->US_CSR & US_CSR_TXEMPTY) == 0);
+ }
+ else {
+
+ while ((usart->US_CSR & US_CSR_TXEMPTY) == 0) {
+
+ if (timeOut == 0) {
+
+ TRACE_ERROR("USART_Write: Timed out.\n\r");
+ return;
+ }
+ timeOut--;
+ }
+ }
+
+ usart->US_THR = data;
+}
+
+/**
+ * \brief Sends the contents of a data buffer through the specified USART peripheral.
+ * This function returns immediately (1 if the buffer has been queued, 0
+ * otherwise); poll the ENDTX and TXBUFE bits of the USART status register
+ * to check for the transfer completion.
+ *
+ * \param usart Pointer to an USART peripheral.
+ * \param buffer Pointer to the data buffer to send.
+ * \param size Size of the data buffer (in bytes).
+ */
+uint8_t USART_WriteBuffer(
+ Usart *usart,
+ void *buffer,
+ uint32_t size)
+{
+ /* Check if the first PDC bank is free*/
+ if ((usart->US_TCR == 0) && (usart->US_TNCR == 0)) {
+
+ usart->US_TPR = (uint32_t) buffer;
+ usart->US_TCR = size;
+ usart->US_PTCR = US_PTCR_TXTEN;
+
+ return 1;
+ }
+ /* Check if the second PDC bank is free*/
+ else if (usart->US_TNCR == 0) {
+
+ usart->US_TNPR = (uint32_t) buffer;
+ usart->US_TNCR = size;
+
+ return 1;
+ }
+ else {
+
+ return 0;
+ }
+}
+
+
+/**
+ * \brief Reads and return a packet of data on the specified USART peripheral. This
+ * function operates asynchronously, so it waits until some data has been
+ * received.
+ *
+ * \param usart Pointer to an USART peripheral.
+ * \param timeOut Time out value (0 -> no timeout).
+ */
+uint16_t USART_Read(
+ Usart *usart,
+ volatile uint32_t timeOut)
+{
+ if (timeOut == 0) {
+
+ while ((usart->US_CSR & US_CSR_RXRDY) == 0);
+ }
+ else {
+
+ while ((usart->US_CSR & US_CSR_RXRDY) == 0) {
+
+ if (timeOut == 0) {
+
+ TRACE_ERROR( "USART_Read: Timed out.\n\r" ) ;
+ return 0;
+ }
+ timeOut--;
+ }
+ }
+
+ return usart->US_RHR;
+}
+
+/**
+ * \brief Reads data from an USART peripheral, filling the provided buffer until it
+ * becomes full. This function returns immediately with 1 if the buffer has
+ * been queued for transmission; otherwise 0.
+ *
+ * \param usart Pointer to an USART peripheral.
+ * \param buffer Pointer to the buffer where the received data will be stored.
+ * \param size Size of the data buffer (in bytes).
+ */
+uint8_t USART_ReadBuffer(Usart *usart,
+ void *buffer,
+ uint32_t size)
+{
+ /* Check if the first PDC bank is free*/
+ if ((usart->US_RCR == 0) && (usart->US_RNCR == 0)) {
+
+ usart->US_RPR = (uint32_t) buffer;
+ usart->US_RCR = size;
+ usart->US_PTCR = US_PTCR_RXTEN;
+
+ return 1;
+ }
+ /* Check if the second PDC bank is free*/
+ else if (usart->US_RNCR == 0) {
+
+ usart->US_RNPR = (uint32_t) buffer;
+ usart->US_RNCR = size;
+
+ return 1;
+ }
+ else {
+
+ return 0;
+ }
+}
+
+/**
+ * \brief Returns 1 if some data has been received and can be read from an USART;
+ * otherwise returns 0.
+ *
+ * \param usart Pointer to an Usart instance.
+ */
+uint8_t USART_IsDataAvailable(Usart *usart)
+{
+ if ((usart->US_CSR & US_CSR_RXRDY) != 0) {
+
+ return 1;
+ }
+ else {
+
+ return 0;
+ }
+}
+
+/**
+ * \brief Sets the filter value for the IRDA demodulator.
+ *
+ * \param pUsart Pointer to an Usart instance.
+ * \param filter Filter value.
+ */
+void USART_SetIrdaFilter(Usart *pUsart, uint8_t filter)
+{
+ assert( pUsart != NULL ) ;
+
+ pUsart->US_IF = filter;
+}
+
+/**
+ * \brief Sends one packet of data through the specified USART peripheral. This
+ * function operates synchronously, so it only returns when the data has been
+ * actually sent.
+ *
+ * \param usart Pointer to an USART peripheral.
+ * \param c Character to send
+ */
+void USART_PutChar(
+ Usart *usart,
+ uint8_t c)
+{
+ /* Wait for the transmitter to be ready*/
+ while ((usart->US_CSR & US_CSR_TXEMPTY) == 0);
+
+ /* Send character*/
+ usart->US_THR = c;
+
+ /* Wait for the transfer to complete*/
+ while ((usart->US_CSR & US_CSR_TXEMPTY) == 0);
+}
+
+/**
+ * \brief Return 1 if a character can be read in USART
+ */
+uint32_t USART_IsRxReady(Usart *usart)
+{
+ return (usart->US_CSR & US_CSR_RXRDY);
+}
+/**
+ * \brief Get present status
+ */
+uint32_t USART_GetStatus(Usart *usart)
+{
+ return usart->US_CSR;
+}
+/**
+ * \brief Enable interrupt
+ */
+void USART_EnableIt(Usart *usart,uint32_t mode)
+{
+ usart->US_IER = mode;
+}
+/**
+ * \brief Disable interrupt
+ */
+void USART_DisableIt(Usart *usart,uint32_t mode)
+{
+ usart->US_IDR = mode;
+}
+/**
+ * \brief Reads and returns a character from the USART.
+ *
+ * \note This function is synchronous (i.e. uses polling).
+ * \param usart Pointer to an USART peripheral.
+ * \return Character received.
+ */
+uint8_t USART_GetChar(Usart *usart)
+{
+ while ((usart->US_CSR & US_CSR_RXRDY) == 0);
+ return usart->US_RHR;
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/wdt.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/wdt.c
new file mode 100644
index 0000000..f8a493b
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libchip_sam3x/source/wdt.c
@@ -0,0 +1,132 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * Implementation of Watchdog Timer (WDT) controller.
+ *
+ */
+
+/** \addtogroup wdt_module Working with WDT
+ * The WDT driver provides the interface to configure and use the WDT
+ * peripheral.
+ *
+ * The WDT can be used to prevent system lock-up if the software becomes
+ * trapped in a deadlock. It can generate a general reset or a processor
+ * reset only. It is clocked by slow clock divided by 128.
+ *
+ * The WDT is running at reset with 16 seconds watchdog period (slow clock at 32.768 kHz)
+ * and external reset generation enabled. The user must either disable it or
+ * reprogram it to meet the application requires.
+ *
+ * To use the WDT, the user could follow these few steps:
+ * <ul>
+ * <li>Enable watchdog with given mode using \ref WDT_Enable().
+ * <li>Restart the watchdog using \ref WDT_Restart() within the watchdog period.
+ * </ul>
+ *
+ * For more accurate information, please look at the WDT section of the
+ * Datasheet.
+ *
+ * \note
+ * The Watchdog Mode Register (WDT_MR) can be written only once.\n
+ *
+ * Related files :\n
+ * \ref wdt.c\n
+ * \ref wdt.h.\n
+ */
+/*@{*/
+/*@}*/
+
+/*---------------------------------------------------------------------------
+ * Headers
+ *---------------------------------------------------------------------------*/
+
+#include "chip.h"
+
+#include <stdint.h>
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Enable watchdog with given mode.
+ *
+ * \note The Watchdog Mode Register (WDT_MR) can be written only once.
+ * Only a processor reset resets it.
+ *
+ * \param dwMode WDT mode to be set
+ */
+extern void WDT_Enable( Wdt* pWDT, uint32_t dwMode )
+{
+ pWDT->WDT_MR = dwMode ;
+}
+
+/**
+ * \brief Disable watchdog.
+ *
+ * \note The Watchdog Mode Register (WDT_MR) can be written only once.
+ * Only a processor reset resets it.
+ */
+extern void WDT_Disable( Wdt* pWDT )
+{
+ pWDT->WDT_MR = WDT_MR_WDDIS;
+}
+
+/**
+ * \brief Watchdog restart.
+ */
+extern void WDT_Restart( Wdt* pWDT )
+{
+ pWDT->WDT_CR = 0xA5000001;
+}
+
+/**
+ * \brief Watchdog get status.
+ */
+extern uint32_t WDT_GetStatus( Wdt* pWDT )
+{
+ return (pWDT->WDT_SR & 0x3) ;
+}
+
+/**
+ * \brief Watchdog get period.
+ *
+ * \param dwMs desired watchdog period in millisecond.
+ */
+extern uint32_t WDT_GetPeriod( uint32_t dwMs )
+{
+ if ( (dwMs < 4) || (dwMs > 16000) )
+ {
+ return 0 ;
+ }
+ return ((dwMs << 8) / 1000) ;
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/build/gcc/Makefile b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/build/gcc/Makefile
new file mode 100644
index 0000000..15a7c3e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/build/gcc/Makefile
@@ -0,0 +1,56 @@
+# ----------------------------------------------------------------------------
+# ATMEL Microcontroller Software Support
+# ----------------------------------------------------------------------------
+# Copyright (c) 2010, Atmel Corporation
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# - Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the disclaimer below.
+#
+# Atmel's name may not be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+# DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# ----------------------------------------------------------------------------
+
+# Makefile for compiling libfatfs
+
+SERIE = sam3x
+
+SUBMAKE_FILES=debug.mk gcc.mk iar.mk mdk.mk release.mk win.mk linux.mk libfatfs.mk
+#SUBMAKE_OPTIONS=--no-builtin-rules --no-builtin-variables -d -p
+SUBMAKE_OPTIONS=--no-builtin-rules --no-builtin-variables
+SUBMAKE_VARS=
+
+#-------------------------------------------------------------------------------
+# Rules
+#-------------------------------------------------------------------------------
+
+all: $(SERIE)
+
+.PHONY: $(SERIE)
+$(SERIE):
+ @echo --- Making $(SERIE)
+ @$(MAKE) DEBUG=1 $(SUBMAKE_OPTIONS) -f libfatfs.mk
+ @$(MAKE) $(SUBMAKE_OPTIONS) -f libfatfs.mk
+
+.PHONY: clean
+clean:
+ @echo --- Cleaning $(SERIE)
+ @$(MAKE) $(SUBMAKE_OPTIONS) -f libfatfs.mk $@
+ @$(MAKE) DEBUG=1 $(SUBMAKE_OPTIONS) -f libfatfs.mk $@
+
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/build/gcc/debug.mk b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/build/gcc/debug.mk
new file mode 100644
index 0000000..c7f57b5
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/build/gcc/debug.mk
@@ -0,0 +1,18 @@
+
+# Trace level used for compilation
+# (can be overriden by adding TRACE_LEVEL=#number to the command-line)
+# TRACE_LEVEL_DEBUG 5
+# TRACE_LEVEL_INFO 4
+# TRACE_LEVEL_WARNING 3
+# TRACE_LEVEL_ERROR 2
+# TRACE_LEVEL_FATAL 1
+# TRACE_LEVEL_NO_TRACE 0
+TRACE_LEVEL = 3
+
+# Optimization level
+# -O1 Optimize
+# -O2 Optimize even more
+# -O3 Optimize yet more
+# -O0 Reduce compilation time and make debugging produce the expected results
+# -Os Optimize for size
+OPTIMIZATION = -g -O0 -D DEBUG
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/build/gcc/gcc.mk b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/build/gcc/gcc.mk
new file mode 100644
index 0000000..108f1e8
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/build/gcc/gcc.mk
@@ -0,0 +1,37 @@
+
+# Tool suffix when cross-compiling
+CROSS_COMPILE = arm-none-eabi-
+
+# Compilation tools
+AR = $(CROSS_COMPILE)ar
+CC = $(CROSS_COMPILE)gcc
+AS = $(CROSS_COMPILE)as
+LD = $(CROSS_COMPILE)ld
+SIZE = $(CROSS_COMPILE)size
+NM = $(CROSS_COMPILE)nm
+OBJCOPY = $(CROSS_COMPILE)objcopy
+
+# Flags
+
+CFLAGS += -Wall -Wchar-subscripts -Wcomment -Wformat=2 -Wimplicit-int
+CFLAGS += -Werror-implicit-function-declaration -Wmain -Wparentheses
+CFLAGS += -Wsequence-point -Wreturn-type -Wswitch -Wtrigraphs -Wunused
+CFLAGS += -Wuninitialized -Wunknown-pragmas -Wfloat-equal -Wundef
+CFLAGS += -Wshadow -Wpointer-arith -Wbad-function-cast -Wwrite-strings
+CFLAGS += -Wsign-compare -Waggregate-return -Wstrict-prototypes
+CFLAGS += -Wmissing-prototypes -Wmissing-declarations
+CFLAGS += -Wformat -Wmissing-format-attribute -Wno-deprecated-declarations
+CFLAGS += -Wpacked -Wredundant-decls -Wnested-externs -Winline -Wlong-long
+CFLAGS += -Wunreachable-code
+CFLAGS += -Wcast-align
+#CFLAGS += -Wmissing-noreturn
+#CFLAGS += -Wconversion
+
+CFLAGS += --param max-inline-insns-single=2000 -mcpu=cortex-m3 -mthumb -mlong-calls -ffunction-sections
+CFLAGS += $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -DTRACE_LEVEL=$(TRACE_LEVEL)
+
+# To reduce application size use only integer printf function.
+CFLAGS += -Dprintf=iprintf
+
+ASFLAGS = -mcpu=cortex-m3 -mthumb -Wall -g $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -D__ASSEMBLY__
+LDFLAGS = -g $(OPTIMIZATION) -nostartfiles -mcpu=cortex-m3 -mthumb -Wl,-Map=$(OUTPUT).map,--cref,--gc-sections
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/build/gcc/iar.mk b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/build/gcc/iar.mk
new file mode 100644
index 0000000..cc78e08
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/build/gcc/iar.mk
@@ -0,0 +1,15 @@
+
+# Compilation tools
+AR = iarchive.exe
+CC = iccarm.exe
+LD = ilinkarm.exe
+SIZE =
+OBJCOPY =
+
+# Flags
+
+CFLAGS += $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -DTRACE_LEVEL=$(TRACE_LEVEL)
+
+ASFLAGS = $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -D__ASSEMBLY__
+
+LDFLAGS =
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/build/gcc/libfatfs.mk b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/build/gcc/libfatfs.mk
new file mode 100644
index 0000000..1e47b36
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/build/gcc/libfatfs.mk
@@ -0,0 +1,189 @@
+# ----------------------------------------------------------------------------
+# ATMEL Microcontroller Software Support
+# ----------------------------------------------------------------------------
+# Copyright (c) 2010, Atmel Corporation
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# - Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the disclaimer below.
+#
+# Atmel's name may not be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+# DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# ----------------------------------------------------------------------------
+
+# Makefile for compiling libfatfs
+.SUFFIXES: .o .a .c .s
+SUB_MAKEFILES=debug.mk gcc.mk iar.mk mdk.mk release.mk win.mk linux.mk
+
+#-------------------------------------------------------------------------------
+# User-modifiable options
+#-------------------------------------------------------------------------------
+SERIE=sam3x
+CHIP=$(SERIE)8
+BOARD=$(SERIE)_ek
+LIBNAME=libfatfs
+TOOLCHAIN=gcc
+
+#-------------------------------------------------------------------------------
+# we detect OS (Linux/Windows/Cygwin)
+# not defined for Cygwin
+#ifdef $(OS)
+ifeq ($(OS), Windows_NT)
+include win.mk
+else
+include linux.mk
+endif
+#else
+# Cygwin case
+#include linux.mk
+#endif
+
+#-------------------------------------------------------------------------------
+# Path
+#-------------------------------------------------------------------------------
+
+# Output directories
+OUTPUT_BIN = ../../lib
+
+# Libraries
+PROJECT_BASE_PATH = ../..
+
+#-------------------------------------------------------------------------------
+# Files
+#-------------------------------------------------------------------------------
+vpath %.h $(PROJECT_BASE_PATH)
+vpath %.h $(PROJECT_BASE_PATH)/fatfs/src
+vpath %.c $(PROJECT_BASE_PATH)/fatfs/src
+vpath %.c $(PROJECT_BASE_PATH)/fatfs/src/option
+
+VPATH+=$(PROJECT_BASE_PATH)
+VPATH+=$(PROJECT_BASE_PATH)/fatfs/src
+VPATH+=$(PROJECT_BASE_PATH)/fatfs/src/option
+
+INCLUDES = -I$(PROJECT_BASE_PATH)
+INCLUDES += -I$(PROJECT_BASE_PATH)/../libboard_$(SERIE)-ek
+INCLUDES += -I$(PROJECT_BASE_PATH)/../libchip_$(SERIE)
+INCLUDES += -I$(PROJECT_BASE_PATH)/../memories
+#-------------------------------------------------------------------------------
+ifdef DEBUG
+include debug.mk
+else
+include release.mk
+endif
+
+#-------------------------------------------------------------------------------
+# Tools
+#-------------------------------------------------------------------------------
+
+include $(TOOLCHAIN).mk
+
+#-------------------------------------------------------------------------------
+ifdef DEBUG
+OUTPUT_OBJ=debug
+OUTPUT_LIB=$(LIBNAME)_$(SERIE)_$(TOOLCHAIN)_dbg.a
+else
+OUTPUT_OBJ=release
+OUTPUT_LIB=$(LIBNAME)_$(SERIE)_$(TOOLCHAIN)_rel.a
+endif
+
+OUTPUT_PATH=$(OUTPUT_OBJ)_$(LIBNAME)
+
+#-------------------------------------------------------------------------------
+# C source files and objects
+#-------------------------------------------------------------------------------
+C_SRC=$(wildcard $(PROJECT_BASE_PATH)/fatfs/src/diskio_$(SERIE).c)
+C_SRC+=$(wildcard $(PROJECT_BASE_PATH)/fatfs/src/ff.c)
+C_SRC+=$(wildcard $(PROJECT_BASE_PATH)/fatfs/src/option/ccsbcs.c)
+
+C_OBJ_TEMP=$(patsubst %.c, %.o, $(notdir $(C_SRC)))
+
+# during development, remove some files
+C_OBJ_FILTER=
+
+ifneq '$(TOOLCHAIN)' 'gcc'
+C_OBJ_FILTER+=syscalls.o board_cstartup_gnu.o
+endif
+
+ifneq '$(TOOLCHAIN)' 'ewarm'
+C_OBJ_FILTER+=board_cstartup_iar.o
+endif
+
+ifneq '$(TOOLCHAIN)' 'mdk'
+C_OBJ_FILTER+=board_cstartup_keil.o
+endif
+
+C_OBJ=$(filter-out $(C_OBJ_FILTER), $(C_OBJ_TEMP))
+
+#-------------------------------------------------------------------------------
+# Assembler source files and objects
+#-------------------------------------------------------------------------------
+A_SRC=$(wildcard $(PROJECT_BASE_PATH)/source/*.s)
+
+A_OBJ_TEMP=$(patsubst %.s, %.o, $(notdir $(A_SRC)))
+
+# during development, remove some files
+A_OBJ_FILTER=
+
+A_OBJ=$(filter-out $(A_OBJ_FILTER), $(A_OBJ_TEMP))
+
+#-------------------------------------------------------------------------------
+# Rules
+#-------------------------------------------------------------------------------
+all: $(BOARD)
+
+$(BOARD): create_output $(OUTPUT_LIB)
+
+debug: create_output $(OUTPUT_LIB)
+
+release: create_output $(OUTPUT_LIB)
+
+.PHONY: create_output
+create_output: $(OUTPUT_PATH) $(subst /,$(SEP),$(OUTPUT_BIN))
+# @echo --- Preparing $(BOARD) files $(OUTPUT_PATH) $(OUTPUT_BIN) $(OS) $(TOOLCHAIN)
+# @echo -------------------------
+# @echo *$(C_SRC)
+# @echo -------------------------
+# @echo *$(C_OBJ)
+# @echo -------------------------
+# @echo *$(addprefix $(OUTPUT_PATH)/, $(C_OBJ))
+# @echo -------------------------
+# @echo *$(A_SRC)
+# @echo -------------------------
+
+$(OUTPUT_PATH) $(subst /,$(SEP),$(OUTPUT_BIN)):
+ mkdir $@
+
+$(addprefix $(OUTPUT_PATH)/,$(C_OBJ)): $(OUTPUT_PATH)/%.o: %.c
+ @$(CC) -c $(CFLAGS) $< -o $@
+
+$(addprefix $(OUTPUT_PATH)/,$(A_OBJ)): $(OUTPUT_PATH)/%.o: %.s
+ @$(AS) -c $(ASFLAGS) $< -o $@
+
+$(OUTPUT_LIB): $(addprefix $(OUTPUT_PATH)/, $(C_OBJ)) $(addprefix $(OUTPUT_PATH)/, $(A_OBJ))
+ @$(AR) -r $(OUTPUT_BIN)/$@ $^
+
+.PHONY: clean
+clean:
+ @echo --- Cleaning $(BOARD) files [$(OUTPUT_PATH)$(SEP)*.o]
+# -cs-rm -fR $(OUTPUT_PATH)
+# -cs-rm $(subst /,$(SEP),$(OUTPUT_BIN)/$(OUTPUT_LIB))
+
+ -@cs-rm -fR $(OUTPUT_PATH) 1>NUL 2>&1
+ -@cs-rm -fR $(OUTPUT_BIN)/$(OUTPUT_LIB) 1>NUL 2>&1
+
+$(addprefix $(OUTPUT_PATH)/,$(C_OBJ)):
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/build/gcc/linux.mk b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/build/gcc/linux.mk
new file mode 100644
index 0000000..08d2f9f
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/build/gcc/linux.mk
@@ -0,0 +1,4 @@
+
+RM=rm -f
+RMDIR=rm -fr
+SEP=/ \ No newline at end of file
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/build/gcc/readme.txt b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/build/gcc/readme.txt
new file mode 100644
index 0000000..6f574b4
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/build/gcc/readme.txt
@@ -0,0 +1,6 @@
+This makefile allows build of libfatfs_???.a
+
+where
+??? could be dbg and rel (debug, release)
+
+It checks for source files (C and assembler) from folder ../../fatfs/src then compiles them to build given library
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/build/gcc/release.mk b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/build/gcc/release.mk
new file mode 100644
index 0000000..74b2686
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/build/gcc/release.mk
@@ -0,0 +1,18 @@
+
+# Trace level used for compilation
+# (can be overriden by adding TRACE_LEVEL=#number to the command-line)
+# TRACE_LEVEL_DEBUG 5
+# TRACE_LEVEL_INFO 4
+# TRACE_LEVEL_WARNING 3
+# TRACE_LEVEL_ERROR 2
+# TRACE_LEVEL_FATAL 1
+# TRACE_LEVEL_NO_TRACE 0
+TRACE_LEVEL = 1
+
+# Optimization level
+# -O1 Optimize
+# -O2 Optimize even more
+# -O3 Optimize yet more
+# -O0 Reduce compilation time and make debugging produce the expected results
+# -Os Optimize for size
+OPTIMIZATION = -Os
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/build/gcc/win.mk b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/build/gcc/win.mk
new file mode 100644
index 0000000..67b3fa7
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/build/gcc/win.mk
@@ -0,0 +1,4 @@
+
+RM=del
+RMDIR=rmdir /s /q
+SEP=\ \ No newline at end of file
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/00index_e.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/00index_e.html
new file mode 100644
index 0000000..a5bf3b7
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/00index_e.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<meta name="description" content="Open souece FAT file system module for embedded projects">
+<link rel="start" title="Site Top" href="../../">
+<link rel="up" title="Freewares" href="../../fsw_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese version" href="00index_j.html">
+<link rel="stylesheet" href="css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>ELM - FatFs Generic FAT File System Module</title>
+</head>
+
+<body>
+<h1>FatFs Generic FAT File System Module</h1>
+<hr>
+
+<div class="abst">
+<img src="img/layers.png" class="rset" width="245" height="255" alt="layer">
+<p>FatFs is a generic FAT file system module for small embedded systems. The FatFs is written in compliance with ANSI C and completely separated from the disk I/O layer. Therefore it is independent of hardware architecture. It can be incorporated into low cost microcontrollers, such as AVR, 8051, PIC, ARM, Z80, 68k and etc..., without any change. Petit FatFs module is also available <a href="http://elm-chan.org/fsw/ff/00index_p.html">here</a>.</p>
+
+<h4>Features</h4>
+<ul>
+ <li>Windows compatible FAT file system.</li>
+ <li>Platform independent. Easy to port.</li>
+ <li>Very small footprint for code and work area.</li>
+ <li>Various configuration options:
+ <ul>
+ <li>Multiple volumes (physical drives and partitions).</li>
+ <li>Multiple ANSI/OEM code pages including DBCS.</li>
+ <li>Long file name support in ANSI/OEM or Unicode.</li>
+ <li>RTOS support.</li>
+ <li>Multiple sector size support.</li>
+ <li>Read-only, minimized API, I/O buffer and etc...</li>
+ </ul>
+ </li>
+</ul>
+</div>
+
+
+<div class="para">
+<h3>Application Interface</h3>
+<p>FatFs module provides following functions to the applications. In other words, this list describes what FatFs can do to access the FAT volumes.</p>
+<ul>
+<li><a href="en/mount.html">f_mount</a> - Register/Unregister a work area</li>
+<li><a href="en/open.html">f_open</a> - Open/Create a file</li>
+<li><a href="en/close.html">f_close</a> - Close a file</li>
+<li><a href="en/read.html">f_read</a> - Read file</li>
+<li><a href="en/write.html">f_write</a> - Write file</li>
+<li><a href="en/lseek.html">f_lseek</a> - Move read/write pointer, Expand file size</li>
+<li><a href="en/truncate.html">f_truncate</a> - Truncate file size</li>
+<li><a href="en/sync.html">f_sync</a> - Flush cached data</li>
+<li><a href="en/opendir.html">f_opendir</a> - Open a directory</li>
+<li><a href="en/readdir.html">f_readdir</a> - Read a directory item</li>
+<li><a href="en/getfree.html">f_getfree</a> - Get free clusters</li>
+<li><a href="en/stat.html">f_stat</a> - Get file status</li>
+<li><a href="en/mkdir.html">f_mkdir</a> - Create a directory</li>
+<li><a href="en/unlink.html">f_unlink</a> - Remove a file or directory</li>
+<li><a href="en/chmod.html">f_chmod</a> - Change attribute</li>
+<li><a href="en/utime.html">f_utime</a> - Change timestamp</li>
+<li><a href="en/rename.html">f_rename</a> - Rename/Move a file or directory</li>
+<li><a href="en/mkfs.html">f_mkfs</a> - Create a file system on the drive</li>
+<li><a href="en/forward.html">f_forward</a> - Forward file data to the stream directly</li>
+<li><a href="en/chdir.html">f_chdir</a> - Change current directory</li>
+<li><a href="en/chdrive.html">f_chdrive</a> - Change current drive</li>
+<li><a href="en/getcwd.html">f_getcwd</a> - Retrieve the current directory</li>
+<li><a href="en/gets.html">f_gets</a> - Read a string</li>
+<li><a href="en/putc.html">f_putc</a> - Write a character</li>
+<li><a href="en/puts.html">f_puts</a> - Write a string</li>
+<li><a href="en/printf.html">f_printf</a> - Write a formatted string</li>
+<li><a href="en/tell.html">f_tell</a> - Get the current read/write pointer</li>
+<li><a href="en/eof.html">f_eof</a> - Test for end-of-file on a file</li>
+<li><a href="en/size.html">f_size</a> - Get size of a file</li>
+<li><a href="en/error.html">f_error</a> - Test for an error on a file</li>
+</ul>
+</div>
+
+
+<div class="para">
+<h3>Disk I/O Interface</h3>
+<p>Since the FatFs module is completely separated from disk I/O layer, it requires following functions at least to access the physical media. When O/S related feature is enabled, it will require process/memory functions in addition. However the low level disk I/O module is not a part of FatFs module so that it must be provided by user. The sample drivers are also available in the resources.</p>
+<ul>
+<li><a href="en/dinit.html">disk_initialize</a> - Initialize disk drive</li>
+<li><a href="en/dstat.html">disk_status</a> - Get disk status</li>
+<li><a href="en/dread.html">disk_read</a> - Read sector(s)</li>
+<li><a href="en/dwrite.html">disk_write</a> - Write sector(s)</li>
+<li><a href="en/dioctl.html">disk_ioctl</a> - Control device dependent features</li>
+<li><a href="en/fattime.html">get_fattime</a> - Get current time</li>
+</ul>
+</div>
+
+
+<div class="para">
+<h3>Resources</h3>
+<p>The FatFs module is a free software opened for education, research and development. You can use, modify and/or redistribute it for personal projects or commercial products without any restriction under your responsibility. For further information, refer to the application note.</p>
+<ul>
+<li><a href="http://elm-chan.org/fsw/ff/bd/"><em>FatFs User Forum</em></a></li>
+<li>Read first: <a href="en/appnote.html">FatFs module application note</a></li>
+<li><a href="http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects/arm_memcards/index.html">ARM-Projects by Martin THOMAS</a> (examples for LPC2000, AT91SAM and STM32)</li>
+<li><a href="http://www.microsoft.com/whdc/system/platform/firmware/fatgen.mspx">FAT32 Specification by Microsoft</a> (The reference document on FAT file system)</li>
+<li><a href="http://elm-chan.org/docs/mmc/mmc_e.html">How to Use MMC/SDC</a></li>
+<li><a href="img/rwtest.png">Benchmark 1</a> (ATmega64/9.2MHz with MMC via SPI, HDD/CFC via GPIO)</li>
+<li><a href="img/rwtest2.png">Benchmark 2</a> (LPC2368/72MHz with MMC via MCI)</li>
+</ul>
+</div>
+
+
+<hr>
+<p class="foot"><a href="http://elm-chan.org/fsw/ff/00index_e.html">FatFs Home Page</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/00index_j.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/00index_j.html
new file mode 100644
index 0000000..6050c6e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/00index_j.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<meta name="description" content="‘g‚Ýž‚݃VƒXƒeƒ€Œü‚¯FATƒtƒ@ƒCƒ‹EƒVƒXƒeƒ€">
+<link rel="start" title="Site Top" href="../../index_j.html">
+<link rel="up" title="Freewares" href="../../fsw.html">
+<link rel="alternate" hreflang="en" title="‰p•¶" href="00index_e.html">
+<link rel="stylesheet" href="css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>ELM - FatFs ”Ä—pFATƒtƒ@ƒCƒ‹ƒVƒXƒeƒ€Eƒ‚ƒWƒ…[ƒ‹</title>
+</head>
+
+<body>
+<h1>FatFs ”Ä—pFATƒtƒ@ƒCƒ‹ƒVƒXƒeƒ€Eƒ‚ƒWƒ…[ƒ‹</h1>
+<hr>
+
+<div class="abst">
+<img src="img/layers.png" class="rset" width="245" height="255" alt="layer">
+<p>FatFs‚ͬ‹K–Í‚È‘g‚Ýž‚݃VƒXƒeƒ€Œü‚¯‚̔ėpFATƒtƒ@ƒCƒ‹ƒVƒXƒeƒ€Eƒ‚ƒWƒ…[ƒ‹‚Å‚·BANSI C€‹’‚Ńn[ƒhƒEƒFƒAEƒA[ƒLƒeƒNƒ`ƒƒ‚ɂ͈ˑ¶‚µ‚È‚¢‚Ì‚ÅA•K—v‚ȃ[ƒNEƒGƒŠƒA‚ªŠm•Û‚Å‚«‚ê‚ÎA8051, PIC, AVR, SH, Z80, 68k, H8, ARM‚ȂLjÀ‰¿‚ȃ}ƒCƒRƒ“‚Å‚àŽg—p‰Â”\‚Å‚·BFatFs‚ðƒVƒ…ƒŠƒ“ƒN‚µ‚½<a href="http://elm-chan.org/fsw/ff/00index_p.html">‚Õ‚¿FatFs</a>‚à‚ ‚è‚Ü‚·B</p>
+<h4>FatFsƒ‚ƒWƒ…[ƒ‹‚Ì“Á’¥</h4>
+<ul>
+ <li>WindowsŒÝŠ· FATƒtƒ@ƒCƒ‹EƒVƒXƒeƒ€</li>
+ <li>ƒvƒ‰ƒbƒgƒtƒH[ƒ€”ñˆË‘¶</li>
+ <li>ƒRƒ“ƒpƒNƒg‚ȃR[ƒh‚ÆRAMŽg—p—Ê</li>
+ <li>‘½‚­‚Ì\¬ƒIƒvƒVƒ‡ƒ“:
+ <ul>
+ <li>•¡”‚̃{ƒŠƒ…[ƒ€(•¨—ƒhƒ‰ƒCƒuE‹æ‰æ)</li>
+ <li>DBCS‚ðŠÜ‚Þ•¡”‚ÌANSI/OEMƒR[ƒhEƒy[ƒW</li>
+ <li>’·‚¢ƒtƒ@ƒCƒ‹–¼(LFN) (Unicode API‚à‘I‘ð‰Â)</li>
+ <li>ƒ}ƒ‹ƒ`ƒ^ƒXƒNŠÖ˜A</li>
+ <li>ƒ}ƒ‹ƒ`EƒZƒNƒ^EƒTƒCƒY</li>
+ <li>ƒŠ[ƒhEƒIƒ“ƒŠ[\¬Aˆê•”API‚ÌíœAƒoƒbƒtƒ@\¬A‚»‚Ì‘¼c</li>
+ </ul>
+ </li>
+</ul>
+</div>
+
+
+<div class="para">
+<h3>ãˆÊƒŒƒCƒ„EƒCƒ“ƒ^[ƒtƒF[ƒX</h3>
+<p>FatFsƒ‚ƒWƒ…[ƒ‹‚ÍAŽŸ‚̃tƒ@ƒCƒ‹‘€ìŠÖ”(API)‚ð’ñ‹Ÿ‚µ‚Ü‚·B‚‚܂èA‚±‚̃ŠƒXƒg‚ÍFatFs‚É‚Å‚«‚邱‚Æ‚ðƒVƒ“ƒvƒ‹‚ÉŽ¦‚µ‚Ä‚¢‚Ü‚·B</p>
+<ul>
+<li><a href="ja/mount.html">f_mount</a> - ƒ[ƒNƒGƒŠƒA‚Ì“o˜^Eíœ</li>
+<li><a href="ja/open.html">f_open</a> - ƒtƒ@ƒCƒ‹‚̃I[ƒvƒ“Eì¬</li>
+<li><a href="ja/close.html">f_close</a> - ƒtƒ@ƒCƒ‹‚̃Nƒ[ƒY</li>
+<li><a href="ja/read.html">f_read</a> - ƒtƒ@ƒCƒ‹‚Ì“Ç‚Ýo‚µ</li>
+<li><a href="ja/write.html">f_write</a> - ƒtƒ@ƒCƒ‹‚Ì‘‚«ž‚Ý</li>
+<li><a href="ja/lseek.html">f_lseek</a> - ƒŠ[ƒh/ƒ‰ƒCƒgEƒ|ƒCƒ“ƒ^‚̈ړ®, ƒtƒ@ƒCƒ‹‚ÌŠg’£</li>
+<li><a href="ja/truncate.html">f_truncate</a> - ƒtƒ@ƒCƒ‹EƒTƒCƒY‚ÌØ‚è‹l‚ß</li>
+<li><a href="ja/sync.html">f_sync</a> - ƒLƒƒƒbƒVƒ…‚³‚ꂽƒf[ƒ^‚̃tƒ‰ƒbƒVƒ…</li>
+<li><a href="ja/opendir.html">f_opendir</a> - ƒfƒBƒŒƒNƒgƒŠ‚̃I[ƒvƒ“</li>
+<li><a href="ja/readdir.html">f_readdir</a> - ƒfƒBƒŒƒNƒgƒŠ‚Ì“Ç‚Ýo‚µ</li>
+<li><a href="ja/getfree.html">f_getfree</a> - ƒ{ƒŠƒ…[ƒ€‹ó‚«—̈æ‚̎擾</li>
+<li><a href="ja/stat.html">f_stat</a> - ƒtƒ@ƒCƒ‹EƒXƒe[ƒ^ƒX‚̎擾</li>
+<li><a href="ja/mkdir.html">f_mkdir</a> - ƒfƒBƒŒƒNƒgƒŠ‚Ìì¬</li>
+<li><a href="ja/unlink.html">f_unlink</a> - ƒtƒ@ƒCƒ‹/ƒfƒBƒŒƒNƒgƒŠ‚Ìíœ</li>
+<li><a href="ja/chmod.html">f_chmod</a> - ƒtƒ@ƒCƒ‹/ƒfƒBƒŒƒNƒgƒŠ‚Ì‘®«‚Ì•ÏX</li>
+<li><a href="ja/utime.html">f_utime</a> - ƒtƒ@ƒCƒ‹/ƒfƒBƒŒƒNƒgƒŠ‚̃^ƒCƒ€ƒXƒ^ƒ“ƒv‚Ì•ÏX</li>
+<li><a href="ja/rename.html">f_rename</a> - ƒtƒ@ƒCƒ‹/ƒfƒBƒŒƒNƒgƒŠ‚Ì–¼‘O•ÏXEˆÚ“®</li>
+<li><a href="ja/mkfs.html">f_mkfs</a> - ƒfƒBƒXƒN‚̃tƒH[ƒ}ƒbƒg</li>
+<li><a href="ja/chdir.html">f_chdir</a> - ƒJƒŒƒ“ƒgEƒfƒBƒŒƒNƒgƒŠ‚Ì•ÏX</li>
+<li><a href="ja/chdrive.html">f_chdrive</a> - ƒJƒŒƒ“ƒgEƒhƒ‰ƒCƒu‚Ì•ÏX</li>
+<li><a href="ja/getcwd.html">f_getcwd</a> - ƒJƒŒƒ“ƒgEƒfƒBƒŒƒNƒgƒŠ‚̎擾</li>
+<li><a href="ja/forward.html">f_forward</a> - ƒtƒ@ƒCƒ‹Eƒf[ƒ^‚ðƒXƒgƒŠ[ƒ€ŠÖ”‚É“]‘—</li>
+<li><a href="ja/gets.html">f_gets</a> - •¶Žš—ñ‚Ì“Ç‚Ýo‚µ</li>
+<li><a href="ja/putc.html">f_putc</a> - •¶Žš‚Ì‘‚«ž‚Ý</li>
+<li><a href="ja/puts.html">f_puts</a> - •¶Žš—ñ‚Ì‘‚«ž‚Ý</li>
+<li><a href="ja/printf.html">f_printf</a> - ‘Ž®‰»•¶Žš—ñ‚Ì‘‚«ž‚Ý</li>
+<li><a href="ja/tell.html">f_tell</a> - Œ»Ý‚̃Š[ƒh/ƒ‰ƒCƒgEƒ|ƒCƒ“ƒ^‚̎擾</li>
+<li><a href="ja/eof.html">f_eof</a> - ƒtƒ@ƒCƒ‹I’[‚Ì—L–³‚̎擾</li>
+<li><a href="ja/size.html">f_size</a> - ƒtƒ@ƒCƒ‹EƒTƒCƒY‚̎擾</li>
+<li><a href="ja/error.html">f_error</a> - ƒtƒ@ƒCƒ‹‚̃Gƒ‰[‚Ì—L–³‚̎擾</li>
+</ul>
+</div>
+
+
+<div class="para">
+<h3>‰ºˆÊƒŒƒCƒ„EƒCƒ“ƒ^[ƒtƒF[ƒX</h3>
+<p>FatFsƒ‚ƒWƒ…[ƒ‹‚ÍA•¨—ƒhƒ‰ƒCƒu“™‚ւ̃AƒNƒZƒX‚Ì‚½‚ßA‰ºˆÊƒŒƒCƒ„‚É­‚È‚­‚Æ‚àŽŸ‚̃Cƒ“ƒ^[ƒtƒF[ƒX‚ð—v‹‚µ‚Ü‚·BŽg—p‚·‚é‹L˜^ƒƒfƒBƒA‚ɑΉž‚µ‚½ƒfƒBƒXƒNI/Oƒ‚ƒWƒ…[ƒ‹‚ÍAƒ†[ƒU‚É‚æ‚Á‚Ä—pˆÓ‚³‚ê‚é•K—v‚ª‚ ‚è‚Ü‚·BOSŠÖ˜A‹@”\‚ð—LŒø‚É‚µ‚½‚Æ‚«‚ÍA‰Á‚¦‚ăvƒƒZƒXEƒƒ‚ƒŠŠÖ˜AŠÖ”‚à•K—v‚É‚È‚è‚Ü‚·BŽ‘—¿‚Ƀhƒ‰ƒCƒo‚ðŠÜ‚ÞƒTƒ“ƒvƒ‹EƒvƒƒWƒFƒNƒg‚ ‚èB</p>
+<ul>
+<li><a href="ja/dinit.html">disk_initialize</a> - ƒfƒBƒXƒNEƒhƒ‰ƒCƒu‚̉Šú‰»</li>
+<li><a href="ja/dstat.html">disk_status</a> - ƒfƒBƒXƒNEƒhƒ‰ƒCƒu‚Ìó‘Ԏ擾</li>
+<li><a href="ja/dread.html">disk_read</a> - ƒfƒBƒXƒN‚©‚ç‚Ì“Ç‚Ýž‚Ý</li>
+<li><a href="ja/dwrite.html">disk_write</a> - ƒfƒBƒXƒN‚Ö‚Ì‘‚«ž‚Ý</li>
+<li><a href="ja/dioctl.html">disk_ioctl</a> - ‚»‚Ì‘¼‚̃hƒ‰ƒCƒu§Œä</li>
+<li><a href="ja/fattime.html">get_fattime</a> - “ú•tEŽž‚̎擾</li>
+</ul>
+</div>
+
+
+<div class="para">
+<h3>Ž‘—¿</h3>
+<p>FatFsƒ‚ƒWƒ…[ƒ‹‚̓tƒŠ[Eƒ\ƒtƒgƒEƒFƒA‚Æ‚µ‚Ä‹³ˆçEŒ¤‹†EŠJ”­—p‚ÉŒöŠJ‚µ‚Ä‚¢‚Ü‚·B‚ǂ̂悤‚È—˜—p–Ú“IiŒÂl—˜—p‚©‚礗p‚Ü‚Åj‚Å‚àŽg—pE‰ü•ÏE”z•z‚ɂ‚¢‚Ĉê؂̧ŒÀ‚Í‚ ‚è‚Ü‚¹‚ñ‚ªA‘S‚Ä—˜—pŽÒ‚ÌÓ”C‚̉º‚Å‚Ì—˜—p‚Æ‚µ‚Ü‚·BÚ‚µ‚­‚̓AƒvƒŠƒP[ƒVƒ‡ƒ“Eƒm[ƒg‚ðŽQÆ‚µ‚Ä‚­‚¾‚³‚¢B</p>
+<ul>
+<li><a href="http://elm-chan.org/fsw/ff/bd/"><em>FatFsƒ†[ƒUEƒtƒH[ƒ‰ƒ€</em></a></li>
+<li>ʼn‚É“Ç‚ß: <a href="ja/appnote.html">FatFsƒ‚ƒWƒ…[ƒ‹EƒAƒvƒŠƒP[ƒVƒ‡ƒ“Eƒm[ƒg</a></li>
+<li><a href="http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects/arm_memcards/index.html">ARM-Projects by Martin THOMAS</a> (examples for LPC2000, AT91SAM and STM32)</li>
+<li><a href="http://www.microsoft.com/whdc/system/platform/firmware/fatgen.mspx">FATƒtƒ@ƒCƒ‹EƒVƒXƒeƒ€Žd—l‘ by Microsoft</a> (FAT‚Ì—‰ðEŽÀ‘•‚É•K—v‚È—Bˆê‚̃Šƒtƒ@ƒŒƒ“ƒX)</li>
+<li><a href="http://elm-chan.org/docs/fat.html">FATƒtƒ@ƒCƒ‹EƒVƒXƒeƒ€ŠT—v</a> (ª‚ð“Ç‚Þ‚½‚߂̃KƒCƒh)</li>
+<li><a href="http://elm-chan.org/docs/mmc/mmc.html">MMC‚ÌŽg‚¢‚©‚½</a></li>
+<li><a href="img/rwtest.png">ƒpƒtƒH[ƒ}ƒ“ƒXEƒeƒXƒg1</a> (ATmega64/9.2MHz with MMC via SPI, HDD/CFC via GPIO)</li>
+<li><a href="img/rwtest2.png">ƒpƒtƒH[ƒ}ƒ“ƒXEƒeƒXƒg2</a> (LPC2368/72MHz with MMC via MCI)</li>
+</ul>
+</div>
+
+
+<hr>
+<p class="foot"><a href="http://elm-chan.org/fsw/ff/00index_j.html">FatFs Home Page</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/css_e.css b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/css_e.css
new file mode 100644
index 0000000..b44dfaa
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/css_e.css
@@ -0,0 +1,58 @@
+* {margin: 0; padding: 0; border-width: 0;}
+body {margin: 8px; background-color: #e0ffff; font-color: black; font-family: serif; line-height: 133%; max-width: 1024px;}
+a:link {color: blue;}
+a:visited {color: darkmagenta;}
+a:hover {background-color: #a0ffff;}
+a:active {color: darkmagenta; position: relative; top: 1px; left: 1px;}
+abbr {border-width: 1px;}
+
+p {margin: 0 0 0.3em 1em;}
+em {font-style: normal; font-weight: bold; margin: 0 0.1em;}
+pre em {font-style: italic; font-weight: normal;}
+strong {}
+pre {border: 1px dashed gray; margin: 0.5em 1em; padding: 0.5em; line-height: 1.2em; font-family: monospace; background-color: white;}
+pre span.c {color: green;}
+pre span.k {color: blue;}
+tt {margin: 0 0.2em; font-family: monospace; }
+ol {margin: 0 2.5em;}
+ul {margin: 0 2em;}
+dl {margin: 0 1em;}
+dt {font-family: monospace;}
+dl.par dt {margin: 0.5em 0 0 0 ; font-style: italic; }
+dl.ret dt {margin: 0.5em 0 0 0 ; font-weight: bold;}
+dd {margin: 0 2em;}
+hr {border-width: 1px; margin: 1em;}
+div.abst {font-family: sans-serif;}
+div.para {clear: both; font-family: serif;}
+.equ {text-indent: 0; margin: 1em 2em 1em;}
+.indent {margin-left: 2em;}
+.rset {float: right; margin: 0 0 0.5em 0.5em;}
+.lset {float: left; margin: 0 0.5em 0.5em 0.5em;}
+ul.flat li {list-style-type: none; margin: 0;}
+a.imglnk img {border: 1px solid;}
+.iequ {white-space: nowrap; font-weight: bold;}
+.clr {clear: both;}
+.it {font-style: italic;}
+.mfd {font-size: 0.7em; padding: 0 1px; border: 1px solid; white-space : nowrap}
+
+h1 {line-height: 1em; font-size: 2em; font-family: sans-serif; padding: 0.3em 0 0.3em;}
+p.hdd {float: right; text-align: right; margin-top: 0.5em;}
+hr.hds {clear: both; margin-bottom: 1em;}
+
+h2 {font-size: 1.5em; color: blueviolet; font-family: sans-serif; margin: 0 0 0.5em;}
+h3 {font-size: 1.5em; font-family: sans-serif; margin: 1.5em 0 0.5em;}
+h4 {font-size: 1.2em; font-family: sans-serif; margin: 1em 0 0.2em;}
+h5 {font-size: 1em; font-family: sans-serif; margin: 0.5em 0 0em;}
+small {font-size: 80%;}
+.indent {margin-left: 2em;}
+
+/* Tables */
+table {margin: 0.5em 1em; border-collapse: collapse; border: 2px solid black; }
+th {background-color: white; border-style: solid; border-width: 1px 1px 2px; border-color: black; padding: 0 3px; vertical-align: top; white-space: nowrap;}
+td {background-color: white; border: 1px solid black; padding: 0 3px; vertical-align: top; line-height: 1.3em;}
+table.lst td:first-child {font-family: monospace;}
+table.lst2 td {font-family: monospace;}
+table caption {font-family: sans-serif; font-weight: bold;}
+tr.lst3 td { border-width: 2px 1px 1px; }
+
+p.foot {clear: both; text-indent: 0; margin: 1em 0.5em 1em;}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/css_j.css b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/css_j.css
new file mode 100644
index 0000000..770c68e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/css_j.css
@@ -0,0 +1,61 @@
+@charset "Shift_JIS";
+/* Common style sheet for Tech Notes */
+
+* {margin: 0; padding: 0; border-width: 0;}
+body {margin: 8px; background-color: #e0ffff; font-color: black; font-family:"‚l‚r ‚o–¾’©", serif; line-height: 150%; letter-spacing: 1px; max-width: 1024px;}
+a:link {color: blue;}
+a:visited {color: darkmagenta;}
+a:hover {background-color: #a0ffff;}
+a:active {color: darkmagenta; position: relative; top: 1px; left: 1px;}
+abbr {border-width: 1px;}
+
+p {text-indent: 1em; margin: 0 0 0.3em 0.5em;}
+em {font-style: normal; font-weight: bold; margin: 0 0.1em;}
+pre em {font-style: italic; font-weight: normal;}
+strong {}
+pre {border: 1px dashed gray; margin: 0.5em 1em; padding: 0.5em; line-height: 1.2em; letter-spacing: 0; font-family: monospace; background-color: white;}
+pre span.c {color: green;}
+pre span.k {color: blue;}
+tt {margin: 0 0.2em; letter-spacing: 0; font-family: monospace; }
+ol {margin: 0 2.5em;}
+ul {margin: 0 2em;}
+dl {margin: 0 1em;}
+dt {font-family: monospace;}
+dl.par dt {margin: 0.5em 0 0 0 ; font-style: italic; letter-spacing: 0;}
+dl.ret dt {margin: 0.5em 0 0 0 ; font-family: monospace; letter-spacing: 0; font-weight: bold;}
+dd {margin: 0 2em;}
+hr {border-width: 1px; margin: 1em;}
+div.abst {font-family: "‚l‚r ‚oƒSƒVƒbƒN",sans-serif;}
+div.para {clear: both; font-family: "‚l‚r ‚o–¾’©",serif;}
+.equ {text-indent: 0; margin: 1em 2em 1em;}
+.indent {margin-left: 2em;}
+.rset {float: right; margin: 0 0 0.5em 0.5em;}
+.lset {float: left; margin: 0 0.5em 0.5em 0.5em;}
+ul.flat li {list-style-type: none; margin: 0;}
+a.imglnk img {border: 1px solid;}
+.iequ {white-space: nowrap; font-weight: bold;}
+.clr {clear: both;}
+.it {font-style: italic;}
+.mfd {font-size: 0.7em; padding: 0 1px; border: 1px solid; white-space : nowrap}
+
+h1 {line-height: 1em; font-size: 2em; font-family: sans-serif; padding: 0.3em 0 0.3em;}
+p.hdd {float: right; text-align: right; margin-top: 0.5em;}
+hr.hds {clear: both; margin-bottom: 1em;}
+
+h2 {font-size: 1.5em; color: blueviolet; font-family: "‚l‚r ‚oƒSƒVƒbƒN",sans-serif; margin: 0 0 0.5em;}
+h3 {font-size: 1.5em; font-family: "‚l‚r ‚oƒSƒVƒbƒN",sans-serif; margin: 1.5em 0 0.5em;}
+h4 {font-size: 1.2em; font-family: "‚l‚r ‚oƒSƒVƒbƒN",sans-serif; margin: 1em 0 0.2em;}
+h5 {font-size: 1em; font-family: "‚l‚r ‚oƒSƒVƒbƒN",sans-serif; margin: 0.5em 0 0em;}
+small {font-size: 80%;}
+.indent {margin-left: 2em;}
+
+/* Tables */
+table {margin: 0.5em 1em; border-collapse: collapse; border: 2px solid black; letter-spacing: 0;}
+th {background-color: white; border-style: solid; border-width: 1px 1px 2px; border-color: black; padding: 0 3px; vertical-align: top;}
+td {background-color: white; border: 1px solid black; padding: 0 3px; vertical-align: top; line-height: 1.3em;}
+table.lst td:first-child {font-family: monospace; white-space: nowrap;}
+table.lst2 td {font-family: monospace; white-space: nowrap;}
+table caption {font-family: sans-serif; font-weight: bold;}
+tr.lst3 td { border-width: 2px 1px 1px; }
+
+p.foot {clear: both; text-indent: 0; margin: 1em 0.5em 1em;}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/appnote.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/appnote.html
new file mode 100644
index 0000000..4f2ada2
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/appnote.html
@@ -0,0 +1,258 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/appnote.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs Module Application Note</title>
+</head>
+
+<body>
+<h1>FatFs Module Application Note</h1>
+<ol class="toc">
+<li><a href="#port">How to Port</a></li>
+<li><a href="#limits">Limits</a></li>
+<li><a href="#memory">Memory Usage</a></li>
+<li><a href="#reduce">Module Size Reduction</a></li>
+<li><a href="#lfn">Long File Name</a></li>
+<li><a href="#unicode">Unicode API</a></li>
+<li><a href="#reentrant">Re-entrancy</a></li>
+<li><a href="#dup">Duplicated File Access</a></li>
+<li><a href="#fs1">Performance Effective File Access</a></li>
+<li><a href="#fs2">Considerations on Flash Memory Media</a></li>
+<li><a href="#critical">Critical Section</a></li>
+<li><a href="#license">About FatFs License</a></li>
+</ol>
+<hr>
+
+<div class="para" id="port">
+<h3>How to Port</h3>
+
+<h4>Basic considerations</h4>
+<p>The FatFs module is assuming following conditions on portability.</p>
+<ul>
+<li>ANSI C<br>
+The FatFs module is a middleware which is written in ANSI C (C89). There is no platform dependence, so long as the compiler is in compliance with ANSI C.</li>
+<li>Size of integer types<br>
+The FatFs module assumes that size of char/short/long are 8/16/32 bit and int is 16 or 32 bit. These correspondence are defined in integer.h. This will not be a problem on most compilers. When any conflict with existing definitions is occured, you must resolve it with care.</li>
+</ul>
+
+<h4>Which function is required?</h4>
+<p>You need to provide only low level disk I/O functions that required by FatFs module and nothing else. If a working disk module for the target is already existing, you need to write only glue functions to attach it to the FatFs module. If not, you need to port any other disk module or write it from scratch. All defined functions are not that always required. For example, disk write function is not required in read-only configuration. Following table shows which function is required depends on configuration options.</p>
+<table class="lst2">
+<tr><th>Function</th><th>Required when:</th><th>Note</th></tr>
+<tr><td>disk_initialize</td><td>Always</td><td rowspan="10">Disk I/O functions.<br>Samples available in ffsample.zip.<br>There are many implementations on the web.</td></tr>
+<tr><td>disk_status</td><td>Always</td></tr>
+<tr><td>disk_read</td><td>Always</td></tr>
+<tr><td>disk_write</td><td>_FS_READONLY == 0</td></tr>
+<tr><td>disk_ioctl (CTRL_SYNC)</td><td>_FS_READONLY == 0</td></tr>
+<tr><td>disk_ioctl (GET_SECTOR_COUNT)</td><td>_USE_MKFS == 1</td></tr>
+<tr><td>disk_ioctl (GET_BLOCK_SIZE)</td><td>_USE_MKFS == 1</td></tr>
+<tr><td>disk_ioctl (GET_SECTOR_SIZE)</td><td>_MAX_SS &gt;= 1024</td></tr>
+<tr><td>disk_ioctl (CTRL_ERASE_SECTOR)</td><td>_USE_ERASE == 1</td></tr>
+<tr><td>get_fattime</td><td>_FS_READONLY == 0</td></tr>
+<tr><td>ff_convert</td><td>_USE_LFN &gt;= 1</td><td rowspan="2">Unicode support functions.<br>Available in option/cc*.c.</td></tr>
+<tr><td>ff_wtoupper</td><td>_USE_LFN &gt;= 1</td></tr>
+<tr><td>ff_cre_syncobj</td><td>_FS_REENTRANT == 1</td><td rowspan="6">O/S dependent functions.<br>Samples available in option/syscall.c.</td></tr>
+<tr><td>ff_del_syncobj</td><td>_FS_REENTRANT == 1</td></tr>
+<tr><td>ff_req_grant</td><td>_FS_REENTRANT == 1</td></tr>
+<tr><td>ff_rel_grant</td><td>_FS_REENTRANT == 1</td></tr>
+<tr><td>ff_mem_alloc</td><td>_USE_LFN == 3</td></tr>
+<tr><td>ff_mem_free</td><td>_USE_LFN == 3</td></tr>
+</table>
+</div>
+
+<div class="para" id="limits">
+<h3>Limits</h3>
+<ul>
+<li>FAT sub-types: FAT12, FAT16 and FAT32.</li>
+<li>Number of open files: Unlimited, depends on available memory.</li>
+<li>Number of volumes: Upto 10.</li>
+<li>File size: Depends on FAT specs. (upto 4G-1 bytes)</li>
+<li>Volume size: Depends on FAT specs. (upto 2T bytes on 512 bytes/sector)</li>
+<li>Cluster size: Depends on FAT specs. (upto 64K bytes on 512 bytes/sector)</li>
+<li>Sector size: Depends on FAT specs. (upto 4K bytes)</li>
+</ul>
+</div>
+
+<div class="para" id="memory">
+<h3>Memory Usage (R0.08b)</h3>
+<table class="lst2">
+<tr><th></th><th>AVR</th><th>H8/300H</th><th>PIC24</th><th>V850ES</th><th>RX</th><th>SH-2A</th><th>ARM7</th><th>x86</th></tr>
+<tr><td>Compiler</td><td>WinAVR</td><td>CH38</td><td>C30</td><td>CA850</td><td>RXC</td><td>SHC</td><td>WinARM</td><td>VC6</td></tr>
+<tr><td>_WORD_ACCESS</td><td>1</td><td>0</td><td>0</td><td>1</td><td>1</td><td>0</td><td>0</td><td>1</td></tr>
+<tr class="lst3"><td>text (Full, R/W)</td><td>12646</td><td>10686</td><td>11430</td><td>7732</td><td>5747</td><td>8752</td><td>10560</td><td>7545</td></tr>
+<tr> <td>text (Min, R/W)</td><td>8306</td><td>6986</td><td>7413</td><td>4938</td><td>3746</td><td>5576</td><td>6680</td><td>4923</td></tr>
+<tr><td>text (Full, R/O)</td><td>5960</td><td>4876</td><td>5250</td><td>3554</td><td>2659</td><td>3804</td><td>4688</td><td>3450</td></tr>
+<tr> <td>text (Min, R/O)</td><td>4366</td><td>3770</td><td>3939</td><td>2684</td><td>2025</td><td>2940</td><td>3452</td><td>2664</td></tr>
+<tr><td>bss</td><td>D*2 + 2</td><td>D*4 + 2</td><td>D*2 + 2</td><td>D*4 + 2</td><td>D*4 + 2</td><td>D*4 + 2</td><td>D*4 + 2</td><td>D*4 + 2</td></tr>
+<tr><td>Work area<br>(_FS_TINY == 0)</td><td>D*560 +<br>F*544</td><td>D*560 +<br>F*550</td><td>D*560 +<br>F*544</td><td>D*560 +<br>F*544</td><td>D*560 +<br>F*550</td><td>D*560 +<br>F*550</td><td>D*560 +<br>F*550</td><td>D*560 +<br>F*550</td></tr>
+<tr><td>Work area<br>(_FS_TINY == 1)</td><td>D*560 +<br>F*32</td><td>D*560 +<br>F*36</td><td>D*560 +<br>F*32</td><td>D*560 +<br>F*36</td><td>D*560 +<br>F*36</td><td>D*560 +<br>F*36</td><td>D*560 +<br>F*36</td><td>D*560 +<br>F*36</td></tr>
+</table>
+<p>These are the memory usage on some target systems with following condition. The memory sizes are in unit of byte, D means number of volumes and F means number of open files. All samples are optimezed in code size.</p>
+<pre>
+_FS_READONLY 0 (R/W), 1 (R/O)
+_FS_MINIMIZE 0 (Full function), 3 (Minimized function)
+_USE_STRFUNC 0 (Disable string functions)
+_USE_MKFS 0 (Disable f_mkfs function)
+_USE_FORWARD 0 (Disable f_forward function)
+_USE_FASTSEEK 0 (Disable fast seek feature)
+_CODE_PAGE 932 (Japanese Shift-JIS)
+_USE_LFN 0 (Disable LFN)
+_MAX_SS 512 (Fixed sector size)
+_FS_RPATH 0 (Disable relative path)
+_MULTI_PARTITION 0 (Single partition per drive)
+_FS_REENTRANT 0 (Disable reentrancy)
+_FS_SHARE 0 (Disable shareing control)
+</pre>
+</div>
+
+<div class="para" id="reduce">
+<h3>Module Size Reduction</h3>
+<p>Follwing table shows which API function is removed by configuration options for the module size reduction.</p>
+<table class="lst2">
+<tr><td rowspan="2">Function</td><td colspan="4">_FS_MINIMIZE</td><td colspan="2">_FS_READONLY</td><td colspan="2">_USE_STRFUNC</td><td colspan="3">_FS_RPATH</td><td colspan="2">_USE_MKFS</td><td colspan="2">_USE_FORWARD</td></tr>
+<tr><td>0</td><td>1</td><td>2</td><td>3</td><td>0</td><td>1</td><td>0</td><td>1</td><td>0</td><td>1</td><td>2</td><td>0</td><td>1</td><td>0</td><td>1</td></tr>
+<tr class="lst3"><td>f_mount</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_open</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_close</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_read</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_write</td><td></td><td></td><td></td><td></td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_sync</td><td></td><td></td><td></td><td></td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_lseek</td><td></td><td></td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_opendir</td><td></td><td></td><td>x</td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_readdir</td><td></td><td></td><td>x</td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_stat</td><td></td><td>x</td><td>x</td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_getfree</td><td></td><td>x</td><td>x</td><td>x</td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_truncate</td><td></td><td>x</td><td>x</td><td>x</td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_unlink</td><td></td><td>x</td><td>x</td><td>x</td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_mkdir</td><td></td><td>x</td><td>x</td><td>x</td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_chmod</td><td></td><td>x</td><td>x</td><td>x</td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_utime</td><td></td><td>x</td><td>x</td><td>x</td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_rename</td><td></td><td>x</td><td>x</td><td>x</td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_chdir</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_chdrive</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_getcwd</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>x</td><td>x</td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_mkfs</td><td></td><td></td><td></td><td></td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td>x</td><td></td><td></td><td></td></tr>
+<tr><td>f_forward</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>x</td><td></td></tr>
+<tr><td>f_putc</td><td></td><td></td><td></td><td></td><td></td><td>x</td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_puts</td><td></td><td></td><td></td><td></td><td></td><td>x</td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_printf</td><td></td><td></td><td></td><td></td><td></td><td>x</td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_gets</td><td></td><td></td><td></td><td></td><td></td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+</table>
+</div>
+
+<div class="para" id="lfn">
+<h3>Long File Name</h3>
+<p>The FatFs module has started to support long file name (LFN) at revision 0.07. The two different file names, SFN and LFN, of a file is transparent in the file functions except for f_readdir function. To enable LFN feature, set <tt>_USE_LFN</tt> to 1, 2 or 3, and add a Unicode code conversion function <tt>ff_convert()</tt> and <tt>ff_wtoupper()</tt> to the project. The LFN feature requiers a certain working buffer in addition. The buffer size can be configured by <tt>_MAX_LFN</tt> corresponding to the available memory size. The size of long file name will reach up to 255 characters so that the <tt>_MAX_LFN</tt> should be set to 255 for full featured LFN operation. If the size of working buffer is insufficient for the given file name, the file function fails with <tt>FR_INVALID_NAME</tt>. When enable the LFN feature with re-entrant feature, <tt>_USE_LFN</tt> must be set to 2 or 3. In this case, the file function allocates the working buffer on the stack or heap. The working buffer occupies <tt>(_MAX_LFN + 1) * 2</tt> bytes.</p>
+<table class="lst2 rset">
+<caption>LFN cfg on ARM7</caption>
+<tr><th>Code page</th><th>Program size</th></tr>
+<tr><td>SBCS</td><td>+3.7K</td></tr>
+<tr><td>932(Shift-JIS)</td><td>+62K</td></tr>
+<tr><td>936(GBK)</td><td>+177K</td></tr>
+<tr><td>949(Korean)</td><td>+139K</td></tr>
+<tr><td>950(Big5)</td><td>+111K</td></tr>
+</table>
+<p>When the LFN feature is enabled, the module size will be increased depends on the selected code page. Right table shows how many bytes increased when LFN feature is enabled with some code pages. We are the East-Asians have tens of thousands of characters. Unfortunately, it requires a huge OEM-Unicode bidirectional conversion table and the module size will be drastically increased that shown in the table. As the result, the FatFs with LFN feature with DBCS will not able to be implemented to most 8-bit microcontrollers. <small>This is the reason why I had not been interested in implementing the LFN feature for a long time :-)</small></p>
+<p>Note that the LFN feature on the FAT file system is a patent of Microsoft Corporation. This is not the case on FAT32. When enable LFN feature on the commercial products, a license from Microsoft may be required depends on the final destination.</p>
+</div>
+
+<div class="para" id="unicode">
+<h3>Unicode API</h3>
+<p>FatFs supports ANSI/OEM code set on the API in default but FatFs can also switch the code set to Unicode. For more information, refer to the description in the <a href="filename.html">file name</a>.</p>
+</div>
+
+<div class="para" id="reentrant">
+<h3>Re-entrancy</h3>
+<p>The file operations to the different volume is always re-entrant ant can work simultaneously. The file operations to the same volume is not re-entrant but it can also be configured to thread-safe with <tt>_FS_REENTRANT</tt> option. In this case, also the OS dependent synchronization object control functions, ff_cre_syncobj, ff_del_syncobj, ff_req_grant and ff_rel_grant must be added to the project.</p>
+<p>When a file function is called while the volume is in use by any other task, the file function is suspended until that task leaves file function. If wait time exceeded a period defined by <tt>_TIMEOUT</tt>, the file function will abort with <tt>FR_TIMEOUT</tt>. The timeout feature might not be supported on some RTOS.</p>
+<p>There is an exception on f_mount and f_mkfs function. These functions are not re-entrant to the same volume. When use these functions, all other task must close the corresponding file on the volume and avoid to access the volume.</p>
+<p>Note that this section describes on the re-entrancy of the FatFs module itself but also the low level disk I/O layer must be re-entrant.</p>
+</div>
+
+<div class="para" id="dup">
+<h3>Duplicated File Access</h3>
+<p>FatFs module does not support the shareing controls of duplicated file access in default. It is permitted when open method to a file is only read mode. The duplicated open in write mode to a file is always prohibited and open file must not be renamed, deleted, or the FAT structure on the volume can be collapted.</p>
+<p>The file shareing control can also be available when <tt>_FS_SHARE</tt> is set to 1 or grater. The value specifies the number of files to manage simultaneously. In this case, if any open, rename or remove that violating the file shareing rule that described above is attempted, the file function will fail with <tt>FR_LOCKED</tt>. If number of open files gets larger than <tt>_FS_SHARE</tt>, the f_open function will fail with <tt>FR_TOO_MANY_OPEN_FILES</tt>.</p>
+</div>
+
+<div class="para" id="fs1">
+<h3>Performance Effective File Access</h3>
+<p>For good performance on reading/writing files on the small embedded system, application programmer should consider what process is done in the FatFs module. The file data on the disk is transferred in following sequence by f_read function.</p>
+<p>Figure 1. Sector miss-aligned read (short)<br>
+<img src="../img/f1.png" width="490" height="73" alt="">
+</p>
+<p>Figure 2. Sector miss-aligned read (long)<br>
+<img src="../img/f2.png" width="490" height="140" alt="">
+</p>
+<p>Figure 3. Sector aligned read<br>
+<img src="../img/f3.png" width="490" height="119" alt="">
+</p>
+<p>The file I/O buffer means a sector buffer to read/write a partial data on the sector. The sector buffer is either file private sector buffer on each file object or shared sector buffer on the file system object. The buffer configuration option <tt>_FS_TINY</tt> determins which sector buffer is used for the file data transfer. When tiny buffer (1) is selected, data memory consumption is reduced 512 bytes each file object. In this case, FatFs module uses only a sector buffer on the file system object for file data transfer and FAT/directory access. The disadvantage of the tiny buffer configuration is: the FAT data cached in the sector buffer will be lost by file data transfer and it must be reloaded at every cluster boundary. However it will be suitable for most application from view point of the decent performance and low memory comsumption.</p>
+<p>Figure 1 shows that partial sector data is transferred via the file I/O buffer. On long data transfer shown in Figure 2, middle of transfer data that covers one or more sector is transferred to application buffer directly. Figure 3 shows that the case of entier transfer data is aligned to the sector boundary. In this case, file I/O buffer is not used. On the direct transfer, the maximum extent of sectors are read with disk_read function at a time but the multi sector transfer never across the cluster boundary even if it is contiguous.</p>
+<p>Therefore taking effort to sector aligned read/write accesss avoids buffered data transfer and the read/write performance will be improved. Besides the effect, cached FAT data will not be flushed by file data transfer on the tiny configuration so that it can achieve same performance as non-tiny configuration with small memory footprint.</p>
+</div>
+
+<div class="para" id="fs2">
+<h3>Considerations on Flash Memory Media</h3>
+<p>To maximize the write performance of flash memory media, such as SDC and CFC, it must be controlled in consideration of its characteristitcs.</p>
+<h4>Using Mutiple-Sector Write</h4>
+<div class="rset">
+Figure 6. Comparison between Multiple/Single Sector Write<br>
+<img src="../img/f6.png" width="630" height="148" alt="fig.6">
+</div>
+<p>The write throughput of the flash memory media becomes the worst at single sector write and it increases proportional to the number of sectors per a write transaction. This effect more appers at more fast bus clock and its ratio often becomes grater than ten. The number of write transaction also affects the life time of the media. Therefore the application program should write the data in large block as possible. The ideal block size is cluster size or power of 2 bytes and the byte offset should be aligned to the block. Of course all layers between the application and the media must support multiple sector write feature, however most of open-source disk drivers lack it. Do not split a multiple sector write request into single sector writes or the write throughput gets poor. Note that FatFs module and its sample disk drivers supprt multiple sector read/write.</p>
+<h4>Forcing Memory Erase</h4>
+<p>When remove a file via f_remove function, the data clusters occupied by the file are maeked 'free' on the FAT. But the data sectors containing the file data are not that applied any process so that the file data left occupies a part of the media as live blocks. If the file data is forced erased on removing the file, the number of free blocks on the media will be increased. This may skip internal block erase operation to the data block on next write. As the result the write performance might be improved. To enable this feature, set <tt>_USE_ERASE</tt> to 1. Note that this is a feature with expectation of internal process of the flash memory media. It may not always effective and f_remove function will take a time on removing a large file.</p>
+</div>
+
+<div class="para" id="critical">
+<h3>Critical Section</h3>
+<p>If a write operation to the FAT file system is interrupted due to any accidental failure, such as sudden blackout, incorrect disk removal and unrecoverable disk error, the FAT structure can be collapted. Following images shows the critical section on the FatFs application.</p>
+<div class="lset">
+Figure 4. Long critical section<br>
+<img src="../img/f4.png" width="320" height="436" alt="fig.4">
+</div>
+<div class="lset">
+Figure 5. Minimized critical section<br>
+<img src="../img/f5.png" width="320" height="436" alt="fig.5">
+</div>
+<br class="clr">
+<p>An interruption in the red section can cause a cross link; as a result, the object being changed may be lost. There is one or more possibility listed below when an interruption in the yellow section is occured.</p>
+<ul>
+<li>File data being rewrited is collapted.</li>
+<li>A file being appended returns initial state.</li>
+<li>A file created as new is gone.</li>
+<li>A file created as new or in overwritten remains with no content.</li>
+<li>Efficiency of disk use gets worse due to lost clusters.</li>
+</ul>
+<p>Each case does not affect the files that not in write mode open. To minimize risk of data loss, the critical section can be minimized like shown in Figure 5 by minimizing the time that file is opened in write mode or using f_sync function properly.</p>
+</div>
+
+<div class="para" id="license">
+<h3>About FatFs License</h3>
+<p>This is a copy of the FatFs license document that included in the source codes.</p>
+<pre>/*----------------------------------------------------------------------------/
+/ FatFs - FAT file system module R0.08b (C)ChaN, 2011
+/-----------------------------------------------------------------------------/
+/ FatFs module is a generic FAT file system module for small embedded systems.
+/ This is a free software that opened for education, research and commercial
+/ developments under license policy of following trems.
+/
+/ Copyright (C) 2011, ChaN, all right reserved.
+/
+/ * The FatFs module is a free software and there is NO WARRANTY.
+/ * No restriction on use. You can use, modify and redistribute it for
+/ personal, non-profit or commercial products UNDER YOUR RESPONSIBILITY.
+/ * Redistributions of source code must retain the above copyright notice.
+/
+/-----------------------------------------------------------------------------/</pre>
+<p>Therefore FatFs license is one of the BSD-style license but there is a big difference. Because FatFs is for embedded projects, the conditions for redistributions in binary form, such as embedded code, hex file and binary library, are not specified to increase its usability. The documentation of the distributions need not include about FatFs and its license document, and it may also. Of course FatFs is compatible with the projects under GNU GPL. When redistribute it with any modification, the license can also be changed to GNU GPL or BSD-style license.</p>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/chdir.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/chdir.html
new file mode 100644
index 0000000..80a50f6
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/chdir.html
@@ -0,0 +1,88 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/chdir.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_chdir</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_chdir</h2>
+<p>The f_chdir function changes the current directory of a drive.</p>
+<pre>
+FRESULT f_chdir (
+ const TCHAR* <em>Path</em> <span class="c">/* Pointer to the path name */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>Path</dt>
+<dd>Pointer to the null-terminated string that specifies a <a href="filename.html">directory</a> to go.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Values</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>The function succeeded.</dd>
+<dt>FR_NO_PATH</dt>
+<dd>Could not find the path.</dd>
+<dt>FR_INVALID_NAME</dt>
+<dd>The path name is invalid.</dd>
+<dt>FR_INVALID_DRIVE</dt>
+<dd>The drive number is invalid.</dd>
+<dt>FR_NOT_READY</dt>
+<dd>The disk drive cannot work due to no medium in the drive or any other reason.</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>The function failed due to an error in the disk function.</dd>
+<dt>FR_INT_ERR</dt>
+<dd>The function failed due to a wrong FAT structure or an internal error.</dd>
+<dt>FR_NOT_ENABLED</dt>
+<dd>The logical drive has no work area.</dd>
+<dt>FR_NO_FILESYSTEM</dt>
+<dd>There is no valid FAT volume on the drive.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>The f_chdir function changes the current directory of the logical drive. The current directory of a drive is initialized to the root directory when the drive is auto-mounted. Note that the current directory is retained in the each file system object so that it also affects other tasks that using the drive.</p>
+</div>
+
+
+<div class="para">
+<h4>QuickInfo</h4>
+<p>Available when <tt>_FS_RPATH >= 1</tt>.</p>
+</div>
+
+
+<div class="para">
+<h4>Example</h4>
+<pre>
+ <span class="c">/* Change current direcoty of the current drive (dir1 under root dir) */</span>
+ f_chdir("/dir1");
+
+ <span class="c">/* Change current direcoty of drive 2 (parent dir) */</span>
+ f_chdir("2:..");
+</pre>
+</div>
+
+<div class="para">
+<h4>See Also</h4>
+<p><tt><a href="chdrive.html">f_chdrive</a>, <a href="getcwd.html">f_getcwd</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/chdrive.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/chdrive.html
new file mode 100644
index 0000000..e3f40c4
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/chdrive.html
@@ -0,0 +1,62 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/chdrive.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_chdrive</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_chdrive</h2>
+<p>The f_chdrive function changes the current drive.</p>
+<pre>
+FRESULT f_chdrive (
+ BYTE <em>Drive</em> <span class="c">/* Logical drive number */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>Drive</dt>
+<dd>Specifies the <a href="filename.html">logical drive number</a> to be set as the current drive.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Values</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>The function succeeded.</dd>
+<dt>FR_INVALID_DRIVE</dt>
+<dd>The drive number is invalid.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>The f_chdrive function changes the current drive. The initial value of the current drive number is 0. Note that the current drive is retained in a static variable so that it also affects other tasks that using the file functions.</p>
+</div>
+
+<div class="para">
+<h4>QuickInfo</h4>
+<p>Available when <tt>_FS_RPATH >= 1</tt>.</p>
+</div>
+
+
+<div class="para">
+<h4>See Also</h4>
+<p><tt><a href="chdir.html">f_chdir</a>, <a href="getcwd.html">f_getcwd</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/chmod.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/chmod.html
new file mode 100644
index 0000000..c4f533c
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/chmod.html
@@ -0,0 +1,98 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/chmod.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_chmod</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_chmod</h2>
+<p>The f_chmod function changes the attribute of a file or directory.</p>
+<pre>
+FRESULT f_chmod (
+ const TCHAR* <em>FileName</em>, <span class="c">/* Pointer to the file or directory */</span>
+ BYTE <em>Attribute</em>, <span class="c">/* Attribute flags */</span>
+ BYTE <em>AttributeMask</em> <span class="c">/* Attribute masks */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>FileName</dt>
+<dd>Pointer to the null-terminated string that specifies a <a href="filename.html">file or directory</a> to be changed</dd>
+<dt>Attribute</dt>
+<dd>Attribute flags to be set in one or more combination of the following flags. The specified flags are set and others are cleard.<br>
+<table class="lst">
+<tr><th>Attribute</th><th>Description</th></tr>
+<tr><td>AM_RDO</td><td>Read only</td></tr>
+<tr><td>AM_ARC</td><td>Archive</td></tr>
+<tr><td>AM_SYS</td><td>System</td></tr>
+<tr><td>AM_HID</td><td>Hidden</td></tr>
+</table>
+</dd>
+<dt>AttributeMask</dt>
+<dd>Attribute mask that specifies which attribute is changed. The specified aattributes are set or cleard.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Values</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>The function succeeded.</dd>
+<dt>FR_NO_FILE</dt>
+<dd>Could not find the file.</dd>
+<dt>FR_NO_PATH</dt>
+<dd>Could not find the path.</dd>
+<dt>FR_INVALID_NAME</dt>
+<dd>The file name is invalid.</dd>
+<dt>FR_INVALID_DRIVE</dt>
+<dd>The drive number is invalid.</dd>
+<dt>FR_NOT_READY</dt>
+<dd>The disk drive cannot work due to no medium in the drive or any other reason.</dd>
+<dt>FR_WRITE_PROTECTED</dt>
+<dd>The medium is write protected.</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>The function failed due to an error in the disk function.</dd>
+<dt>FR_INT_ERR</dt>
+<dd>The function failed due to a wrong FAT structure or an internal error.</dd>
+<dt>FR_NOT_ENABLED</dt>
+<dd>The logical drive has no work area.</dd>
+<dt>FR_NO_FILESYSTEM</dt>
+<dd>There is no valid FAT volume on the drive.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>The f_chmod function changes the attribute of a file or directory.</p>
+</div>
+
+
+<div class="para">
+<h4>QuickInfo</h4>
+<p>Available when <tt>_FS_READONLY == 0</tt> and <tt>_FS_MINIMIZE == 0</tt>.</p>
+</div>
+
+
+<div class="para">
+<h4>Example</h4>
+<pre>
+ <span class="c">/* Set read-only flag, clear archive flag and others are retained. */</span>
+ f_chmod("file.txt", AR_RDO, AR_RDO | AR_ARC);
+</pre>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/close.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/close.html
new file mode 100644
index 0000000..af3f032
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/close.html
@@ -0,0 +1,69 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/close.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_close</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_close</h2>
+<p>The f_close function closes an open file.</p>
+<pre>
+FRESULT f_close (
+ FIL* <em>FileObject</em> <span class="c">/* Pointer to the file object structure */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameter</h4>
+<dl class="par">
+<dt>FileObject</dt>
+<dd>Pointer to the open file object structure to be closed.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Values</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>The file object has been closed successfuly.</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>The function failed due to an error in the disk function.</dd>
+<dt>FR_INT_ERR</dt>
+<dd>The function failed due to a wrong FAT structure or an internal error.</dd>
+<dt>FR_NOT_READY</dt>
+<dd>The disk drive cannot work due to no medium in the drive or any other reason.</dd>
+<dt>FR_INVALID_OBJECT</dt>
+<dd>The file object is invalid.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>The f_close function closes an open file object. If any data has been written to the file, the cached information of the file is written back to the disk. After the function succeeded, the file object is no longer valid and it can be discarded.</p>
+</div>
+
+
+<div class="para">
+<h4>QuickInfo</h4>
+<p>Always available.</p>
+</div>
+
+
+<div class="para">
+<h4>See Also</h4>
+<p><tt><a href="open.html">f_open</a>, <a href="read.html">f_read</a>, <a href="write.html">f_write</a>, <a href="sync.html">f_sync</a>, <a href="sfile.html">FIL</a>, <a href="sfatfs.html">FATFS</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/dinit.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/dinit.html
new file mode 100644
index 0000000..7b56afe
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/dinit.html
@@ -0,0 +1,46 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/dinit.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - disk_initialize</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>disk_initialize</h2>
+<p>The disk_initialize function initializes the disk drive.</p>
+<pre>
+DSTATUS disk_initialize (
+ BYTE <em>Drive</em> <span class="c">/* Physical drive number */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameter</h4>
+<dl class="par">
+<dt>Drive</dt>
+<dd>Specifies the physical drive number to initialize.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Values</h4>
+<p>This function returns a disk status as the result. For details of the disk status, refer to the <a href="dstat.html">disk_status</a> function.</p>
+</div>
+
+<div class="para">
+<h4>Description</h4>
+<p>The disk_initialize function initializes a physical drive and put it ready to read/write. When the function succeeded, <tt>STA_NOINIT</tt> flag in the return value is cleard.</p>
+<p><em>Application program should not call this function, or FAT structure on the volume can be collapted. To re-initialize the file system, use f_mount function.</em>This function is called on volume mount process in the FatFs module to manage the media change.</p>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/dioctl.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/dioctl.html
new file mode 100644
index 0000000..be019e7
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/dioctl.html
@@ -0,0 +1,69 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/dioctl.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - disk_ioctl</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>disk_ioctl</h2>
+<p>The disk_ioctl function cntrols device specified features and miscellaneous functions other than disk read/write.</p>
+<pre>
+DRESULT disk_ioctl (
+ BYTE <em>Drive</em>, <span class="c">/* Drive number */</span>
+ BYTE <em>Command</em>, <span class="c">/* Control command code */</span>
+ void* <em>Buffer</em> <span class="c">/* Parameter and data buffer */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>Drive</dt>
+<dd>Specifies the drive number (0-9).</dd>
+<dt>Command</dt>
+<dd>Specifies the command code.</dd>
+<dt>Buffer</dt>
+<dd>Pointer to the parameter buffer depends on the command code. When it is not used, specify a NULL pointer.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Value</h4>
+<dl class="ret">
+<dt>RES_OK (0)</dt>
+<dd>The function succeeded.</dd>
+<dt>RES_ERROR</dt>
+<dd>Any error occured.</dd>
+<dt>RES_PARERR</dt>
+<dd>Invalid command code.</dd>
+<dt>RES_NOTRDY</dt>
+<dd>The disk drive has not been initialized.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>The FatFs module uses only device independent commands described below. Any device dependent function is not used.</p>
+<table class="lst">
+<tr><th>Command</th><th>Description</th></tr>
+<tr><td>CTRL_SYNC</td><td>Make sure that the disk drive has finished pending write process. When the disk I/O module has a write back cache, flush the dirty sector immediately. This command is not used in read-only configuration.</td></tr>
+<tr><td>GET_SECTOR_SIZE</td><td>Returns sector size of the drive into the WORD variable pointed by <tt>Buffer</tt>. This command is not used in fixed sector size configuration, <tt>_MAX_SS</tt> is 512.</td></tr>
+<tr><td>GET_SECTOR_COUNT</td><td>Returns number of available sectors on the drive into the DWORD variable pointed by <tt>Buffer</tt>. This command is used by only f_mkfs function to determine the volume size to be created.</td></tr>
+<tr><td>GET_BLOCK_SIZE</td><td>Returns erase block size of the flash memory in unit of sector into the DWORD variable pointed by <tt>Buffer</tt>. The allowable value is 1 to 32768 in power of 2. Return 1 if the erase block size is unknown or disk devices. This command is used by only f_mkfs function and it attempts to align data area to the erase block boundary.</td></tr>
+<tr><td>CTRL_ERASE_SECTOR</td><td>Erases a part of the flash memory specified by a DWORD array {&lt;start sector&gt;, &lt;end sector&gt;} pointed by <tt>Buffer</tt>. When this feature is not supported or not a flash memory media, this command has no effect. The FatFs does not check the result code and the file function is not affected even if the sectors are not erased well. This command is called on removing a cluster chain when <tt>_USE_ERASE</tt> is 1.</td></tr>
+</table>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/dread.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/dread.html
new file mode 100644
index 0000000..5e45a65
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/dread.html
@@ -0,0 +1,59 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/dread.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - disk_read</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>disk_read</h2>
+<p>The disk_read function reads sector(s) from the disk drive.</p>
+<pre>
+DRESULT disk_read (
+ BYTE <em>Drive</em>, <span class="c">/* Physical drive number */</span>
+ BYTE* <em>Buffer</em>, <span class="c">/* Pointer to the read data buffer */</span>
+ DWORD <em>SectorNumber</em>, <span class="c">/* Start sector number */</span>
+ BYTE <em>SectorCount</em> <span class="c">/* Number of sectros to read */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>Drive</dt>
+<dd>Specifies the physical drive number.</dd>
+<dt>Buffer</dt>
+<dd>Pointer to the <em>byte array</em> to store the read data. The buffer size of number of bytes to be read, sector size * sector count, is required. Note that the specified memory address is not that always aligned to word boundary. If the hardware does not support misaligned data transfer, it must be solved in this function.</dd>
+<dt>SectorNumber</dt>
+<dd>Specifies the start sector number in logical block address (LBA).</dd>
+<dt>SectorCount</dt>
+<dd>Specifies number of sectors to read. The value can be 1 to 128. Generally, a multiple sector transfer request must not be split into single sector transactions to the device, or you may not get good read performance.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Value</h4>
+<dl class="ret">
+<dt>RES_OK (0)</dt>
+<dd>The function succeeded.</dd>
+<dt>RES_ERROR</dt>
+<dd>Any hard error occured during the read operation and could not recover it.</dd>
+<dt>RES_PARERR</dt>
+<dd>Invalid parameter.</dd>
+<dt>RES_NOTRDY</dt>
+<dd>The disk drive has not been initialized.</dd>
+</dl>
+</div>
+
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/dstat.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/dstat.html
new file mode 100644
index 0000000..9f98914
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/dstat.html
@@ -0,0 +1,48 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/dstat.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - disk_status</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>disk_status</h2>
+<p>The disk_status function returns the current disk status.</p>
+<pre>
+DSTATUS disk_status (
+ BYTE <em>Drive</em> <span class="c">/* Physical drive number */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameter</h4>
+<dl class="par">
+<dt>Drive</dt>
+<dd>Specifies the physical drive number to be confirmed.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Values</h4>
+<p>The disk status is returned in combination of following flags. FatFs refers only <tt>STA_NOINIT</tt> and <tt>STA_PROTECTED</tt>.</p>
+<dl class="ret">
+<dt>STA_NOINIT</dt>
+<dd>Indicates that the disk drive has not been initialized. This flag is set on: system reset, disk removal and disk_initialize function failed, and cleared on: disk_initialize function succeeded.</dd>
+<dt>STA_NODISK</dt>
+<dd>Indicates that no medium in the drive. This is always cleared on fixed disk drive.</dd>
+<dt>STA_PROTECTED</dt>
+<dd>Indicates that the medium is write protected. This is always cleared on the drive that does not support write protect notch. Not valid when <tt>STA_NODISK</tt> is set.</dd>
+</dl>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/dwrite.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/dwrite.html
new file mode 100644
index 0000000..a6b172e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/dwrite.html
@@ -0,0 +1,67 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/dwrite.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - disk_write</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>disk_write</h2>
+<p>The disk_write writes sector(s) to the disk.</p>
+<pre>
+DRESULT disk_write (
+ BYTE <em>Drive</em>, <span class="c">/* Physical drive number */</span>
+ const BYTE* <em>Buffer</em>, <span class="c">/* Pointer to the write data (may be non aligned) */</span>
+ DWORD <em>SectorNumber</em>, <span class="c">/* Sector number to write */</span>
+ BYTE <em>SectorCount</em> <span class="c">/* Number of sectors to write */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>Drive</dt>
+<dd>Specifies the physical drive number.</dd>
+<dt>Buffer</dt>
+<dd>Pointer to the <em>byte array</em> to be written. Note that the specified memory address is not that always aligned to word boundary. If the hardware does not support misaligned data transfer, it must be solved in this function.</dd>
+<dt>SectorNumber</dt>
+<dd>Specifies the start sector number in logical block address (LBA).</dd>
+<dt>SectorCount</dt>
+<dd>Specifies the number of sectors to write. The value can be 1 to 128. Generally, a multiple sector transfer request must not be split into single sector transactions to the device, or you will never get good write performance.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Values</h4>
+<dl class="ret">
+<dt>RES_OK (0)</dt>
+<dd>The function succeeded.</dd>
+<dt>RES_ERROR</dt>
+<dd>Any hard error occured during the write operation and could not recover it.</dd>
+<dt>RES_WRPRT</dt>
+<dd>The medium is write protected.</dd>
+<dt>RES_PARERR</dt>
+<dd>Invalid parameter.</dd>
+<dt>RES_NOTRDY</dt>
+<dd>The disk drive has not been initialized.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>This function is not required in read only configuration.</p>
+</div>
+
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/eof.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/eof.html
new file mode 100644
index 0000000..38562bd
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/eof.html
@@ -0,0 +1,61 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/eof.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_eof</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_eof</h2>
+<p>The f_eof function tests for end-of-file on a file.</p>
+<pre>
+int f_eof (
+ FIL* <em>FileObject</em> <span class="c">/* File object */</span>
+);
+</pre>
+</div>
+
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>FileObject</dt>
+<dd>Pointer to the open file object structure.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Values</h4>
+<p>The feof function returns a non-zero value if the read/write pointer has reached end of the file; otherwise it returns a zero.</p>
+</div>
+
+
+<h4>Description</h4>
+<p>The f_eof function is implemented as a macro.</p>
+<pre>
+<span class="k">#define</span> f_eof(fp) (((fp)->fptr) == ((fp)->fsize) ? 1 : 0)
+</pre>
+</div>
+
+
+<div class="para">
+<h4>QuickInfo</h4>
+<p>Always available.</p>
+</div>
+
+
+<div class="para">
+<h4>See Also</h4>
+<p><tt><a href="open.html">f_open</a>, <a href="lseek.html">f_lseek</a>, <a href="sfile.html">FIL</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/error.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/error.html
new file mode 100644
index 0000000..d0aed00
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/error.html
@@ -0,0 +1,61 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/error.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_error</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_error</h2>
+<p>The f_error tests for an error on a file.</p>
+<pre>
+int f_error (
+ FIL* <em>FileObject</em> <span class="c">/* File object */</span>
+);
+</pre>
+</div>
+
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>FileObject</dt>
+<dd>Pointer to the open file object structure.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Values</h4>
+<p>Returns a non-zero value if an error has occured; otherwise it returns a zero.</p>
+</div>
+
+
+<h4>Description</h4>
+<p>The f_error function is implemented as a macro.</p>
+<pre>
+<span class="k">#define</span> f_error(fp) (((fp)->flag & FA__ERROR) ? 1 : 0)
+</pre>
+</div>
+
+
+<div class="para">
+<h4>QuickInfo</h4>
+<p>Always available.</p>
+</div>
+
+
+<div class="para">
+<h4>See Also</h4>
+<p><tt><a href="open.html">f_open</a>, <a href="sfile.html">FIL</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/fattime.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/fattime.html
new file mode 100644
index 0000000..e726731
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/fattime.html
@@ -0,0 +1,51 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/fattime.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - get_fattime</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>get_fattime</h2>
+<p>The get_fattime function gets current time.</p>
+<pre>
+DWORD get_fattime (void);
+</pre>
+</div>
+
+
+<div class="para">
+<h4>Return Value</h4>
+<p>Currnet time is returned with packed into a DWORD value. The bit field is as follows:</p>
+<dl class="ret">
+<dt>bit31:25</dt>
+<dd>Year from 1980 (0..127)</dd>
+<dt>bit24:21</dt>
+<dd>Month (1..12)</dd>
+<dt>bit20:16</dt>
+<dd>Day in month(1..31)</dd>
+<dt>bit15:11</dt>
+<dd>Hour (0..23)</dd>
+<dt>bit10:5</dt>
+<dd>Minute (0..59)</dd>
+<dt>bit4:0</dt>
+<dd>Second / 2 (0..29)</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>The get_fattime function must return any valid time even if the system does not support a real time clock. If a zero is returned, the file will not have a valid time. This fucntion is not required in read only configuration.</p>
+</div>
+
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/filename.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/filename.html
new file mode 100644
index 0000000..643fa74
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/filename.html
@@ -0,0 +1,74 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/filename.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - Path Names</title>
+</head>
+
+<body>
+
+<div class="para">
+<h3>Format of the path names</h3>
+<p>The path name format on the FatFs module is similer to the filename specs of DOS/Windos as follows:</p>
+<p><tt>"[drive#:][/]directory/file"</tt></p>
+<p>The FatFs module supports long file name (LFN) and 8.3 format file name (SFN). The LFN can be used when LFN feature is enabled <tt>(_USE_LFN &gt; 0)</tt>. The sub directories are separated with a \ or / in the same way as DOS/Windows API. Duplicated separators are skipped and ignored. Only a difference is that the logical drive is specified in a numeral with a colon. When the drive number is omitted, it is assumed as default drive (0 or current drive).</p>
+<p>Control characters (\0 to \x1F) are recognized as end of the path name. Leading/embedded spaces in the path name are valid as a part of the name on LFN configuration but they are recognized as end of the path name on non-LFN configuration. Trailing spaces and dots are ignored.</p>
+<p>In default configuration <tt>(_FS_RPATH == 0)</tt>, it does not have a concept of current directory like OS oriented file system. All objects on the volume are always specified in full path name that follows from the root directory. Dot directory names are not allowed. Heading separator is ignored and it can be exist or omitted. The default drive number is fixed to 0.</p>
+<p>When relative path feature is enabled <tt>(_FS_RPATH == 1)</tt>, specified path is followed from the root directory if a heading separator is exist. If not, it is followed from the current directory set with <a href="chdir.html">f_chdir</a> function. Dot names are also allowed for the path name. The default drive is the current drive set with <a href="chdrive.html">f_chdrive</a> function.</p>
+<table class="lst2">
+<tr><td>Path name</td><td>_FS_RPATH == 0</td><td>_FS_RPATH == 1</td></tr>
+<tr class="lst3"><td>file.txt</td><td>A file in the root directory of the drive 0</td><td>A file in the current directory of the current drive</td></tr>
+<tr><td>/file.txt</td><td>A file in the root directory of the drive 0</td><td>A file in the root directory of the current drive</td></tr>
+<tr><td></td><td>The root directory of the drive 0</td><td>The current directory of the current drive</td></tr>
+<tr><td>/</td><td>The root directory of the drive 0</td><td>The root directory of the current drive</td></tr>
+<tr><td>2:</td><td>The root directory of the drive 2</td><td>The current directory of the drive 2</td></tr>
+<tr><td>2:/</td><td>The root directory of the drive 2</td><td>The root directory of the drive 2</td></tr>
+<tr><td>2:file.txt</td><td>A file in the root directory of the drive 2</td><td>A file in the current directory of the drive 2</td></tr>
+<tr><td>../file.txt</td><td>Invalid name</td><td>A file in the parent directory</td></tr>
+<tr><td>.</td><td>Invalid name</td><td>This directory</td></tr>
+<tr><td>..</td><td>Invalid name</td><td>Parent directory of the current directory</td></tr>
+<tr><td>dir1/..</td><td>Invalid name</td><td>The current directory</td></tr>
+<tr><td>/..</td><td>Invalid name</td><td>The root directory (sticks the top level)</td></tr>
+</table>
+</div>
+
+<p><br></p>
+<div class="para">
+<h3>Unicode API</h3>
+<p>The path names are input/output in either ANSI/OEM code (SBCS/DBCS) or Unicode depends on the configuration options. The type of arguments that specifies the file names are defined as <tt>TCHAR</tt> which is an alias of <tt>char</tt> in default. The code set of the file name string is the ANSI/OEM code set specifid by <tt>_CODE_PAGE</tt>. When <tt>_LFN_UNICODE</tt> is set to 1 under LFN configuration, the type of the <tt>TCHAR</tt> is switched to <tt>unsigned short</tt> (UCS-2 character) to support Unicode. In this case, the LFN feature is fully supported and the Unicode specific characters, such as âœâ˜ªâœ¡â˜¸â˜­, can also be used for the path name. It also affects data types and encoding of the string I/O functions. To define literal strings, <tt>_T(s)</tt> and <tt>_TEXT(s)</tt> macro are available to select either ANSI/OEM or Unicode automatically. The code shown below is an example to define the literal strings.</p>
+<pre>
+ f_open(fp, "filename.txt", FA_READ); <span class="c">/* ANSI/OEM only */</span>
+ f_open(fp, L"filename.txt", FA_READ); <span class="c">/* Unicode only */</span>
+ f_open(fp, _T("filename.txt"), FA_READ); <span class="c">/* Changed automatically */</span>
+</pre>
+</div>
+
+<p><br></p>
+<div class="para">
+<h3>Correspondence between logical and physical drives</h3>
+<p>The FatFs module has work areas that called <em>file system object</em> for each volume (logical drive). In default, the logical drive is bound to the physical drive that has same drive number, and the first partition is mounted. When <tt>_MULTI_PARTITION == 1</tt> is specified in configuration option, each individual logical drive can be bound to any physical drive/partition. In this case, a drive number resolution table must be defined as follows:</p>
+<pre>
+Example: Logical drive 0-2 are assigned to three pri-partitions on the physical drive 0 (fixed disk)
+ Logical drive 3 is assigned to physical drive 1 (removable disk)
+
+const PARTITION Drives[] = {
+ {0, 0}, <span class="c">/* Logical drive 0 ==> Physical drive 0, 1st partition */</span>
+ {0, 1}, <span class="c">/* Logical drive 1 ==> Physical drive 0, 2nd partition */</span>
+ {0, 2}, <span class="c">/* Logical drive 2 ==> Physical drive 0, 3rd partition */</span>
+ {1, 0} <span class="c">/* Logical drive 3 ==> Physical drive 1 */</span>
+};
+</pre>
+<p>There are some considerations when use <tt>_MULTI_PARTITION</tt> configuration.</p>
+<ul>
+<li>Only pri-partition (0-3) can be mounted.</li>
+<li>When the physical drive has no partition table (SFD format), the partition number is ignored.</li>
+<li>The physical drive that has two or more logical drives must be a fixed drive.</li>
+</ul>
+</div>
+
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/forward.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/forward.html
new file mode 100644
index 0000000..9d96c81
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/forward.html
@@ -0,0 +1,145 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/forward.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_forward</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_forward</h2>
+<p>The f_forward function reads the file data and forward it to the data streaming device.</p>
+<pre>
+FRESULT f_forward (
+ FIL* <em>FileObject</em>, <span class="c">/* File object */</span>
+ UINT (*<em>Func</em>)(const BYTE*,UINT), <span class="c">/* Data streaming function */</span>
+ UINT <em>ByteToFwd</em>, <span class="c">/* Number of bytes to forward */</span>
+ UINT* <em>ByteFwd</em> <span class="c">/* Number of bytes forwarded */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>FileObject</dt>
+<dd>Pointer to the open file object.</dd>
+<dt>Func</dt>
+<dd>Pointer to the user-defined data streaming function. For details, refer to the sample code.</dd>
+<dt>ByteToFwd</dt>
+<dd>Number of bytes to forward in range of UINT.</dd>
+<dt>ByteFwd</dt>
+<dd>Pointer to the UINT variable to return number of bytes forwarded.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Values</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>The function succeeded.</dd>
+<dt>FR_DENIED</dt>
+<dd>The function denied due to the file has been opened in non-read mode.</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>The function failed due to an error in the disk function.</dd>
+<dt>FR_INT_ERR</dt>
+<dd>The function failed due to a wrong FAT structure or an internal error.</dd>
+<dt>FR_NOT_READY</dt>
+<dd>The disk drive cannot work due to no medium in the drive or any other reason.</dd>
+<dt>FR_INVALID_OBJECT</dt>
+<dd>The file object is invalid.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>The f_forward function reads the data from the file and forward it to the outgoing stream without data buffer. This is suitable for small memory system because it does not require any data buffer at application module. The file pointer of the file object increases in number of bytes forwarded. In case of <tt>*ByteFwd &lt; ByteToFwd</tt> without error, it means the requested bytes could not be transferred due to end of file or stream goes busy during data transfer.</p>
+</div>
+
+
+<div class="para">
+<h4>QuickInfo</h4>
+<p>Available when <tt>_USE_FORWARD == 1</tt> and <tt>_FS_TINY == 1</tt>.</p>
+</div>
+
+
+<div class="para">
+<h4>Example (Audio playback)</h4>
+<pre>
+<span class="c">/*------------------------------------------------------------------------*/</span>
+<span class="c">/* Sample code of data transfer function to be called back from f_forward */</span>
+<span class="c">/*------------------------------------------------------------------------*/</span>
+
+UINT out_stream ( <span class="c">/* Returns number of bytes sent or stream status */</span>
+ const BYTE *p, <span class="c">/* Pointer to the data block to be sent */</span>
+ UINT btf <span class="c">/* &gt;0: Transfer call (Number of bytes to be sent). 0: Sense call */</span>
+)
+{
+ UINT cnt = 0;
+
+
+ if (btf == 0) { <span class="c">/* Sense call */</span>
+ <span class="c">/* Return stream status (0: Busy, 1: Ready) */</span>
+ <span class="c">/* When once it returned ready to sense call, it must accept a byte at least */</span>
+ <span class="c">/* at subsequent transfer call, or f_forward will fail with FR_INT_ERROR. */</span>
+ if (FIFO_READY) cnt = 1;
+ }
+ else { <span class="c">/* Transfer call */</span>
+ do { <span class="c">/* Repeat while there is any data to be sent and the stream is ready */</span>
+ FIFO_PORT = *p++;
+ cnt++;
+ } while (cnt &lt; btf &amp;&amp; FIFO_READY);
+ }
+
+ return cnt;
+}
+
+
+<span class="c">/*------------------------------------------------------------------------*/</span>
+<span class="c">/* Sample code using f_forward function */</span>
+<span class="c">/*------------------------------------------------------------------------*/</span>
+
+FRESULT play_file (
+ char *fn <span class="c">/* Pointer to the audio file name to be played */</span>
+)
+{
+ FRESULT rc;
+ FIL fil;
+ UINT dmy;
+
+ <span class="c">/* Open the audio file in read only mode */</span>
+ rc = f_open(&amp;fil, fn, FA_READ);
+ if (rc) return rc;
+
+ <span class="c">/* Repeat until the file pointer reaches end of the file */</span>
+ while (rc == FR_OK &amp;&amp; fil.fptr &lt; fil.fsize) {
+
+ <span class="c">/* any other processes... */</span>
+
+ <span class="c">/* Fill output stream periodicaly or on-demand */</span>
+ rc = f_forward(&amp;fil, out_stream, 1000, &amp;dmy);
+ }
+
+ <span class="c">/* Close the file and return */</span>
+ f_close(&amp;fil);
+ return rc;
+}
+</pre>
+</div>
+
+
+<div class="para">
+<h4>See Also</h4>
+<p><tt><a href="open.html">f_open</a>, <a href="gets.html">fgets</a>, <a href="write.html">f_write</a>, <a href="close.html">f_close</a>, <a href="sfile.html">FIL</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/getcwd.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/getcwd.html
new file mode 100644
index 0000000..0e389e1
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/getcwd.html
@@ -0,0 +1,76 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/getcwd.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_getcwd</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_getcwd</h2>
+<p>The f_getcwd function retrieves the current directory.</p>
+<pre>
+FRESULT f_getcwd (
+ TCHAR* <em>Buffer</em>, <span class="c">/* Pointer to the buffer */</span>
+ UINT <em>BufferLen</em> <span class="c">/* The length of the buffer */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>Buffer</dt>
+<dd>Pointer to the buffer to receive the current directory string.</dd>
+<dt>BufferLen</dt>
+<dd>Size of the buffer in unit of TCHAR.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Values</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>The function succeeded.</dd>
+<dt>FR_NOT_READY</dt>
+<dd>The disk drive cannot work due to no medium in the drive or any other reason.</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>The function failed due to an error in the disk function.</dd>
+<dt>FR_INT_ERR</dt>
+<dd>The function failed due to a wrong FAT structure or an internal error.</dd>
+<dt>FR_NOT_ENABLED</dt>
+<dd>The logical drive has no work area.</dd>
+<dt>FR_NO_FILESYSTEM</dt>
+<dd>There is no valid FAT volume on the drive.</dd>
+<dt>FR_NOT_ENOUGH_CORE</dt>
+<dd>Insufficient size of Buffer.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>The f_getcwd function retrieves the current directory of the current drive in full path string including drive number.</p>
+</div>
+
+
+<div class="para">
+<h4>QuickInfo</h4>
+<p>Available when <tt>_FS_RPATH == 2</tt>.</p>
+</div>
+
+
+<div class="para">
+<h4>See Also</h4>
+<p><tt><a href="chdrive.html">f_chdrive</a>, <a href="chdir.html">f_chdir</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/getfree.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/getfree.html
new file mode 100644
index 0000000..04ae6cb
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/getfree.html
@@ -0,0 +1,102 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/getfree.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_getfree</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_getfree</h2>
+<p>The f_getfree function gets number of the free clusters.</p>
+<pre>
+FRESULT f_getfree (
+ const TCHAR* <em>Path</em>, <span>/* Logical drive number */</span>
+ DWORD* <em>Clusters</em>, <span>/* Pointer to the variable to store number of free clusters */</span>
+ FATFS** <em>FileSystemObject</em> <span>/* Pointer to pointer to file system object */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>Path</dt>
+<dd>Pinter to the null-terminated string that specifies the <a href="filename.html">logical drive</a>.</dd>
+<dt>Clusters</dt>
+<dd>Pointer to the DWORD variable to store number of free clusters.</dd>
+<dt>FileSystemObject</dt>
+<dd>Pointer to pointer that to store a pointer to the corresponding file system object.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Values</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>The function succeeded. The <tt><em>*Clusters</em></tt> has number of free clusters and <tt><em>*FileSystemObject</em></tt> points the file system object.</dd>
+<dt>FR_INVALID_DRIVE</dt>
+<dd>The drive number is invalid.</dd>
+<dt>FR_NOT_READY</dt>
+<dd>The disk drive cannot work due to no medium in the drive or any other reason.</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>The function failed due to an error in the disk function.</dd>
+<dt>FR_INT_ERR</dt>
+<dd>The function failed due to a wrong FAT structure or an internal error.</dd>
+<dt>FR_NOT_ENABLED</dt>
+<dd>The logical drive has no work area.</dd>
+<dt>FR_NO_FILESYSTEM</dt>
+<dd>There is no valid FAT partition on the drive.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Descriptions</h4>
+<p>The f_getfree function gets number of free clusters on the drive. The member <tt>csize</tt> in the file system object is refrecting number of sectors per cluster, so that the free space in unit of sector can be calcurated with this. When FSInfo structure on FAT32 volume is not in sync, this function can return an incorrect free cluster count.</p>
+</div>
+
+
+<div class="para">
+<h4>QuickInfo</h4>
+<p>Available when <tt>_FS_READONLY == 0</tt> and <tt>_FS_MINIMIZE == 0</tt>.</p>
+</div>
+
+
+<div class="para">
+<h4>Example</h4>
+<pre>
+ FATFS *fs;
+ DWORD fre_clust, fre_sect, tot_sect;
+
+
+ <span>/* Get volume information and free clusters of drive 1 */</span>
+ res = f_getfree("1:", &amp;fre_clust, &amp;fs);
+ if (res) die(res);
+
+ <span>/* Get total sectors and free sectors */</span>
+ tot_sect = (fs->n_fatent - 2) * fs->csize;
+ fre_sect = fre_clust * fs->csize;
+
+ <span>/* Print free space in unit of KB (assuming 512 bytes/sector) */</span>
+ printf("%lu KB total drive space.\n"
+ "%lu KB available.\n",
+ fre_sect / 2, tot_sect / 2);
+</pre>
+</div>
+
+
+<div class="para">
+<h4>See Also</h4>
+<p><tt><a href="sfatfs.html">FATFS</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/gets.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/gets.html
new file mode 100644
index 0000000..26fdf01
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/gets.html
@@ -0,0 +1,65 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/gets.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_gets</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_gets</h2>
+<p>The f_gets reads a string from the file.</p>
+<pre>
+TCHAR* f_gets (
+ TCHAR* <em>Str</em>, <span class="c">/* Read buffer */</span>
+ int <em>Size</em>, <span class="c">/* Size of the read buffer */</span>
+ FIL* <em>FileObject</em> <span class="c">/* File object */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>Str</dt>
+<dd>Pointer to read buffer to store the read string.</dd>
+<dt>Size</dt>
+<dd>Size of the read buffer in unit of character.</dd>
+<dt>FileObject</dt>
+<dd>Pointer to the open file object structure.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Values</h4>
+<p>When the function succeeded, <tt>Str</tt> will be returuned.</p>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>The f_gets() is a wrapper function of <a href="read.html">f_read()</a>. The read operation continues until a <tt>'\n'</tt> is stored, reached end of the file or the buffer is filled with <tt>Size - 1</tt> characters. The read string is terminated with a <tt>'\0'</tt>. When no character to read or any error occured during read operation, f_gets() returns a null pointer. The end of file and error status can be examined with <tt>f_eof()</tt> and <tt>f_error()</tt> macros.</p>
+<p>When the FatFs is configured to Unicode API (<tt>_LFN_UNICODE == 1</tt>), the file is read in UTF-8 encoding and stored it to the buffer in UCS-2. If not the case, the file will be read in one byte per character without any code conversion.</p>
+</div>
+
+
+<div class="para">
+<h4>QuickInfo</h4>
+<p>Available when <tt>_USE_STRFUNC</tt> is 1 or 2. When it is set to 2, <tt>'\r'</tt>s contained in the file are stripped out.</p>
+</div>
+
+
+<div class="para">
+<h4>See Also</h4>
+<p><tt><a href="open.html">f_open</a>, <a href="read.html">f_read</a>, <a href="putc.html">f_putc</a>, <a href="puts.html">f_puts</a>, <a href="printf.html">f_printf</a>, <a href="close.html">f_close</a>, <a href="sfile.html">FIL</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/lseek.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/lseek.html
new file mode 100644
index 0000000..4d24c21
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/lseek.html
@@ -0,0 +1,134 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/lseek.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_lseek</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_lseek</h2>
+<p>The f_lseek function moves the file read/write pointer of an open file object. It can also be used to increase the file size (cluster pre-allocation). </p>
+
+<pre>
+FRESULT f_lseek (
+ FIL* <em>FileObject</em>, <span class="c">/* Pointer to the file object structure */</span>
+ DWORD <em>Offset</em> <span class="c">/* File offset in unit of byte */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>FileObject</dt>
+<dd>Pointer to the open file object.</dd>
+<dt>Offset</dt>
+<dd>Number of bytes where from start of the file</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Values</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>The function succeeded.</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>The function failed due to an error in the disk function.</dd>
+<dt>FR_INT_ERR</dt>
+<dd>The function failed due to a wrong FAT structure or an internal error.</dd>
+<dt>FR_NOT_READY</dt>
+<dd>The disk drive cannot work due to no medium in the drive or any other reason.</dd>
+<dt>FR_INVALID_OBJECT</dt>
+<dd>The file object is invalid.</dd>
+<dt>FR_NOT_ENOUGH_CORE</dt>
+<dd>Insufficient size of link map table for the file.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>The f_lseek function moves the file read/write pointer of an open file. The offset can be specified in only origin from top of the file. When an offset above the file size is specified in write mode, the file size is increased to the offset and the data in the expanded area is undefined. This is suitable to create a large file quickly, for fast write operation. After the f_lseek function succeeded, member fptr in the file object should be checked in order to make sure the read/write pointer has been moved correctry. In case of fptr is not the expected value, either of followings has been occured.</p>
+<ul>
+<li>End of file. The specified Offset was clipped at the file size because the file has been opened in read-only mode.</li>
+<li>Disk full. There is insufficient free space on the volume to expand the file size.</li>
+</ul>
+<p>Fast seek mode is enabled when <tt>_USE_FASTSEEK</tt> is set to 1 and <tt>cltbl</tt> member in the file object is not NULL. This feature enables fast backward/long seek operations without FAT access by cluster link map table (CLMT) stored in the user defined table. It is also applied to f_read/f_write functions. In this mode, the file size cannot be increased by f_write/f_lseek functions.</p>
+<p>The CLMT must be created in the user defined DWORD array prior to use fast seek feature. To create the CLMT, set pointer to the DWORD array to <tt>cltbl</tt> member in the file object, set the array size in unit of items into the first item and call the f_lseek function with <tt>Offset = CREATE_LINKMAP</tt>. After the function succeeded and CLMT is created, no FAT access is occured in subsequent f_read/f_write/f_lseek functions to the file. If the function failed with <tt>FR_NOT_ENOUGH_CORE</tt>, the given array size is insufficient for the file and the required items is returned into the first item of the array. The required array size is (number of fragments + 1) * 2 items. For example, when the file is fragmented in 5, 12 items will be required for the CLMT. </p>
+</div>
+
+
+<div class="para">
+<h4>QuickInfo</h4>
+<p>Available when <tt>_FS_MINIMIZE &lt;= 2</tt>.</p>
+</div>
+
+
+<div class="para">
+<h4>Example</h4>
+<pre>
+ <span class="c">/* Open file */</span>
+ file = malloc(sizeof(FIL));
+ if (!file) ...
+ res = f_open(file, "file.dat", FA_READ|FA_WRITE);
+ if (res) ...
+
+ <span class="c">/* Move to offset of 5000 from top of the file */</span>
+ res = f_lseek(file, 5000);
+
+ <span class="c">/* Move to end of the file to append data */</span>
+ res = f_lseek(file, f_size(file));
+
+ <span class="c">/* Forward 3000 bytes */</span>
+ res = f_lseek(file, f_tell(file) + 3000);
+
+ <span class="c">/* Rewind 2000 bytes (take care on overflow) */</span>
+ res = f_lseek(file, f_tell(file) - 2000);
+</pre>
+<pre> <span class="c">/* Cluster pre-allocation (to prevent buffer overrun on streaming write) */</span>
+
+ res = f_open(file, recfile, FA_CREATE_NEW | FA_WRITE); <span class="c">/* Create a file */</span>
+
+ res = f_lseek(file, PRE_SIZE); <span class="c">/* Pre-allocate clusters */</span>
+ if (res || file-&gt;fptr != PRE_SIZE) ... <span class="c">/* Check if the file size has been increased correctly */</span>
+
+ res = f_lseek(file, DATA_START); <span class="c">/* Record data stream without cluster allocation delay */</span>
+ ...
+
+ res = f_truncate(file); <span class="c">/* Truncate unused area */</span>
+ res = f_lseek(file, 0); <span class="c">/* Put file header */</span>
+ ...
+
+ res = f_close(file);
+</pre>
+<pre> <span class="c">/* Using fast seek feature */</span>
+
+ DWORD lktbl[SZ_TBL]; <span class="c">/* Link map table buffer */</span>
+
+ res = f_lseek(file, ofs1); <span class="c">/* This is normal seek (file.cltbl is nulled on file open) */</span>
+
+ file.cltbl = lktbl; <span class="c">/* Enable fast seek feature */</span>
+ lktbl[0] = SZ_TBL; <span class="c">/* Set table size to the first item */</span>
+ res = f_lseek(file, CREATE_LINKMAP); <span class="c">/* Create CLMT */</span>
+ ...
+
+ res = f_lseek(file, ofs2); <span class="c">/* This is fast seek (file.cltbl != NULL) */</span>
+</pre>
+</div>
+
+
+<div class="para">
+<h4>See Also</h4>
+<p><tt><a href="open.html">f_open</a>, <a href="truncate.html">f_truncate</a>, <a href="sfile.html">FIL</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/mkdir.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/mkdir.html
new file mode 100644
index 0000000..80c55e3
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/mkdir.html
@@ -0,0 +1,90 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/mkdir.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_mkdir</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_mkdir</h2>
+<p>The f_mkdir function creates a new directory.</p>
+<pre>
+FRESULT f_mkdir (
+ const TCHAR* <em>DirName</em> <span class="c">/* Pointer to the directory name */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameter</h4>
+<dl class="par">
+<dt>DirName</dt>
+<dd>Pointer to the null-terminated string that specifies the <a href="filename.html">directory name</a> to create. </dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Value</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>The function succeeded.</dd>
+<dt>FR_NO_PATH</dt>
+<dd>Could not find the path.</dd>
+<dt>FR_INVALID_NAME</dt>
+<dd>The path name is invalid.</dd>
+<dt>FR_INVALID_DRIVE</dt>
+<dd>The drive number is invalid.</dd>
+<dt>FR_DENIED</dt>
+<dd>The directory cannot be created due to directory table or disk is full.</dd>
+<dt>FR_EXIST</dt>
+<dd>An object that has same name is already existing.</dd>
+<dt>FR_NOT_READY</dt>
+<dd>The disk drive cannot work due to no medium in the drive or any other reason.</dd>
+<dt>FR_WRITE_PROTECTED</dt>
+<dd>The medium is write protected.</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>The function failed due to an error in the disk function.</dd>
+<dt>FR_INT_ERR</dt>
+<dd>The function failed due to a wrong FAT structure or an internal error.</dd>
+<dt>FR_NOT_ENABLED</dt>
+<dd>The logical drive has no work area.</dd>
+<dt>FR_NO_FILESYSTEM</dt>
+<dd>There is no valid FAT volume on the drive.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>The f_mkdir function creates a new directory.</p>
+</div>
+
+
+<div class="para">
+<h4>QuickInfo</h4>
+<p>Available when <tt>_FS_READONLY == 0</tt> and <tt>_FS_MINIMIZE == 0</tt>.</p>
+</div>
+
+
+<div class="para">
+<h4>Example</h4>
+<pre>
+ res = f_mkdir("sub1");
+ if (res) die(res);
+ res = f_mkdir("sub1/sub2");
+ if (res) die(res);
+ res = f_mkdir("sub1/sub2/sub3");
+ if (res) die(res);
+</pre>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/mkfs.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/mkfs.html
new file mode 100644
index 0000000..fa3f2b9
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/mkfs.html
@@ -0,0 +1,80 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/mkfs.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_mkfs</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_mkfs</h2>
+<p>The f_mkfs fucntion creates a file system on the drive.</p>
+<pre>
+FRESULT f_mkfs (
+ BYTE <em>Drive</em>, <span class="c">/* Logical drive number */</span>
+ BYTE <em>PartitioningRule</em>, <span class="c">/* Partitioning rule */</span>
+ UINT <em>AllocSize</em> <span class="c">/* Size of the allocation unit */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>Drive</dt>
+<dd>Logical drive number (0-9) to be formatted.</dd>
+<dt>PartitioningRule</dt>
+<dd>When 0 is given, a partition table is created into the master boot record and a primary DOS partition is created and then an FAT volume is created on the partition. This is called FDISK format and used for harddisk and memory cards. When 1 is given, the FAT volume starts from the first sector on the drive without partition table. This is called <abbr title="Super Floppy Disk">SFD</abbr> format and used for floppy disk and most optical disk.</dd>
+<dt>AllocSize</dt>
+<dd>Force the allocation unit (cluter) size in unit of byte. The value must be power of 2 and between the sector size and 128 times sector size. When invalid value is specified, the cluster size is determined depends on the volume size.</dd>
+</dl>
+</div>
+
+<div class="para">
+<h4>Return Values</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>The function succeeded.</dd>
+<dt>FR_INVALID_DRIVE</dt>
+<dd>The drive number is invalid.</dd>
+<dt>FR_NOT_READY</dt>
+<dd>The drive cannot work due to any reason.</dd>
+<dt>FR_WRITE_PROTECTED</dt>
+<dd>The drive is write protected.</dd>
+<dt>FR_NOT_ENABLED</dt>
+<dd>The logical drive has no work area.</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>The function failed due to an error in the disk function.</dd>
+<dt>FR_MKFS_ABORTED</dt>
+<dd>The function aborted before start in format due to a reason as follows.
+<ul>
+<li>The disk size is too small.</li>
+<li>Invalid parameter was given to any parameter.</li>
+<li>Not allowable cluster size for this drive. This can occure when number of clusters gets near the 0xFF7 and 0xFFF7.</li>
+</ul>
+</dd>
+</dl>
+</div>
+
+<div class="para">
+<h4>Description</h4>
+<p>The f_mkfs function creates an FAT volume on the drive. There are two partitioning rules, FDISK and SFD, for removable media. The FDISK format is recommended for the most case. This function currently <em>does not support multiple partition</em>, so that existing partitions on the physical dirve will be deleted and re-created a new partition occupies entire disk space.</p>
+<p>The FAT sub-type, FAT12/FAT16/FAT32, is determined by number of clusters on the volume and nothing else, according to the FAT specification issued by Microsoft. Thus which FAT sub-type is selected, is depends on the volume size and the specified cluster size. The cluster size affects performance of the file system and large cluster increases the performance.</p>
+<p>When the number of clusters gets near the FAT sub-type boundaries, the function can fail with FR_MKFS_ABORTED.</p>
+</div>
+
+
+<div class="para">
+<h4>QuickInfo</h4>
+<p>Available when <tt>_FS_READOLNY == 0</tt> and <tt>_USE_MKFS == 1</tt>.</p>
+</div>
+
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/mount.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/mount.html
new file mode 100644
index 0000000..374971e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/mount.html
@@ -0,0 +1,66 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/mount.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_mount</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_mount</h2>
+<p>The f_mount fucntion registers/unregisters a work area to the FatFs module.</p>
+<pre>
+FRESULT f_mount (
+ BYTE <em>Drive</em>, <span class="c">/* Logical drive number */</span>
+ FATFS* <em>FileSystemObject</em> <span class="c">/* Pointer to the work area */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>Drive</dt>
+<dd>Logical drive number (0-9) to register/unregister the work area.</dd>
+<dt>FileSystemObject</dt>
+<dd>Pointer to the work area (file system object) to be registered.</dd>
+</dl>
+</div>
+
+<div class="para">
+<h4>Return Values</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>The function succeeded.</dd>
+<dt>FR_INVALID_DRIVE</dt>
+<dd>The drive number is invalid.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>The f_mount function registers/unregisters a work area to the FatFs module. The work area must be given to the each volume with this function prior to use any other file function. To unregister a work area, specify a NULL to the <em>FileSystemObject</em>, and then the work area can be discarded.</p>
+<p>This function always succeeds regardless of the drive status. No media access is occured in this function. It only initializes the given work area and registers its address to the internal table. The volume mount process is performed on first file access after f_mount function or media change.</p>
+</div>
+
+
+<div class="para">
+<h4>QuickInfo</h4>
+<p>Always available.</p>
+</div>
+
+
+<div class="para">
+<h4>See Also</h4>
+<p><tt><a href="sfatfs.html">FATFS</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/open.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/open.html
new file mode 100644
index 0000000..9bf14dc
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/open.html
@@ -0,0 +1,152 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/open.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_open</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_open</h2>
+<p>The f_open function creates a <em>file object</em> to be used to access the file.</p>
+<pre>
+FRESULT f_open (
+ FIL* <em>FileObject</em>, <span class="c">/* Pointer to the blank file object structure */</span>
+ const TCHAR* <em>FileName</em>, <span class="c">/* Pointer to the file neme */</span>
+ BYTE <em>ModeFlags</em> <span class="c">/* Mode flags */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>FileObject</dt>
+<dd>Pointer to the file object structure to be created.</dd>
+<dt>FileName</dt>
+<dd>Pointer to a null-terminated string that specifies the <a href="filename.html">file name</a> to create or open.</dd>
+<dt>ModeFlags</dt>
+<dd>Specifies the type of access and open method for the file. It is specified by a combination of following flags.<br>
+<table class="lst">
+<tr><th>Value</th><th>Description</th></tr>
+<tr><td>FA_READ</td><td>Specifies read access to the object. Data can be read from the file.<br>Combine with FA_WRITE for read-write access.</td></tr>
+<tr><td>FA_WRITE</td><td>Specifies write access to the object. Data can be written to the file.<br>Combine with FA_READ for read-write access.</td></tr>
+<tr><td>FA_OPEN_EXISTING</td><td>Opens the file. The function fails if the file is not existing. (Default)</td></tr>
+<tr><td>FA_OPEN_ALWAYS</td><td>Opens the file if it is existing. If not, a new file is created.<br>
+To append data to the file, use f_lseek function after file open in this method.</td></tr>
+<tr><td>FA_CREATE_NEW</td><td>Creates a new file. The function fails with FR_EXIST if the file is existing.</td></tr>
+<tr><td>FA_CREATE_ALWAYS</td><td>Creates a new file. If the file is existing, it is truncated and overwritten.</td></tr>
+</table>
+</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Values</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>The function succeeded and the file object is valid.</dd>
+<dt>FR_NO_FILE</dt>
+<dd>Could not find the file.</dd>
+<dt>FR_NO_PATH</dt>
+<dd>Could not find the path.</dd>
+<dt>FR_INVALID_NAME</dt>
+<dd>The file name is invalid.</dd>
+<dt>FR_INVALID_DRIVE</dt>
+<dd>The drive number is invalid.</dd>
+<dt>FR_EXIST</dt>
+<dd>The file is already existing.</dd>
+<dt>FR_DENIED</dt>
+<dd>The required access was denied due to one of the following reasons:
+<ul><li>Write mode open against a read-only file.</li>
+<li>File cannot be created due to a directory or read-only file is existing.</li>
+<li>File cannot be created due to the directory table is full.</li></ul></dd>
+<dt>FR_NOT_READY</dt>
+<dd>The disk drive cannot work due to no medium in the drive or any other reason.</dd>
+<dt>FR_WRITE_PROTECTED</dt>
+<dd>Write mode open or creation under the medium is write protected.</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>The function failed due to an error in the disk function.</dd>
+<dt>FR_INT_ERR</dt>
+<dd>The function failed due to a wrong FAT structure or an internal error.</dd>
+<dt>FR_NOT_ENABLED</dt>
+<dd>The logical drive has no work area.</dd>
+<dt>FR_NO_FILESYSTEM</dt>
+<dd>There is no valid FAT volume on the drive.</dd>
+<dt>FR_LOCKED</dt>
+<dd>The function was rejected due to file shareing policy (_FS_SHARE).</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>A file object is created when the function succeeded. The file object is used for subsequent read/write functions to refer to the file. When close an open file object, use <a href="close.html">f_close</a> function. If the modified file is not closed, the file data can be collapsed.</p>
+<p>Before using any file function, a work area (file system object) must be given to the logical drive with <a href="mount.html">f_mount</a> function. All file functions can work after this procedure.</p>
+</div>
+
+
+<div class="para">
+<h4>QuickInfo</h4>
+<p>Always available. The mode flags, <tt>FA_WRITE, FA_CREATE_ALWAYS, FA_CREATE_NEW and FA_OPEN_ALWAYS</tt>, are not available when <tt>_FS_READONLY == 1</tt>.</p>
+</div>
+
+
+<div class="para">
+<h4>Example (File Copy)</h4>
+<pre>
+void main (void)
+{
+ FATFS fs[2]; <span class="c">/* Work area (file system object) for logical drives */</span>
+ FIL fsrc, fdst; <span class="c">/* file objects */</span>
+ BYTE buffer[4096]; <span class="c">/* file copy buffer */</span>
+ FRESULT res; <span class="c">/* FatFs function common result code */</span>
+ UINT br, bw; <span class="c">/* File read/write count */</span>
+
+
+ <span class="c">/* Register work area for each volume (Always succeeds regardless of disk status) */</span>
+ f_mount(0, &amp;fs[0]);
+ f_mount(1, &amp;fs[1]);
+
+ <span class="c">/* Open source file on the drive 1 */</span>
+ res = f_open(&amp;fsrc, "1:srcfile.dat", FA_OPEN_EXISTING | FA_READ);
+ if (res) die(res);
+
+ <span class="c">/* Create destination file on the drive 0 */</span>
+ res = f_open(&amp;fdst, "0:dstfile.dat", FA_CREATE_ALWAYS | FA_WRITE);
+ if (res) die(res);
+
+ <span class="c">/* Copy source to destination */</span>
+ for (;;) {
+ res = f_read(&amp;fsrc, buffer, sizeof(buffer), &amp;br); <span class="c">/* Read a chunk of src file */</span>
+ if (res || br == 0) break; <span class="c">/* error or eof */</span>
+ res = f_write(&amp;fdst, buffer, br, &amp;bw); <span class="c">/* Write it to the dst file */</span>
+ if (res || bw &lt; br) break; <span class="c">/* error or disk full */</span>
+ }
+
+ <span class="c">/* Close open files */</span>
+ f_close(&amp;fsrc);
+ f_close(&amp;fdst);
+
+ <span class="c">/* Unregister work area prior to discard it */</span>
+ f_mount(0, NULL);
+ f_mount(1, NULL);
+}
+</pre>
+</div>
+
+
+<div class="para">
+<h4>See Also</h4>
+<p><tt><a href="read.html">f_read</a>, <a href="write.html">f_write</a>, <a href="close.html">f_close</a>, <a href="sfile.html">FIL</a>, <a href="sfatfs.html">FATFS</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/opendir.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/opendir.html
new file mode 100644
index 0000000..a75c8f7
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/opendir.html
@@ -0,0 +1,80 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/opendir.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_opendir</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_opendir</h2>
+<p>The f_opendir function opens a directory.</p>
+<pre>
+FRESULT f_opendir (
+ DIR* <em>DirObject</em>, <span class="c">/* Pointer to the blank directory object structure */</span>
+ const TCHAR* <em>DirName</em> <span class="c">/* Pointer to the directory name */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>DirObject</dt>
+<dd>Pointer to the blank directory object to be created.</dd>
+<dt>DirName</dt>
+<dd>Pinter to the null-terminated string that specifies the <a href="filename.html">directory name</a> to be opened.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Values</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>The function succeeded and the directory object is created. It is used for subsequent calls to read the directory entries.</dd>
+<dt>FR_NO_PATH</dt>
+<dd>Could not find the path.</dd>
+<dt>FR_INVALID_NAME</dt>
+<dd>The path name is invalid.</dd>
+<dt>FR_INVALID_DRIVE</dt>
+<dd>The drive number is invalid.</dd>
+<dt>FR_NOT_READY</dt>
+<dd>The disk drive cannot work due to no medium in the drive or any other reason.</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>The function failed due to an error in the disk function.</dd>
+<dt>FR_INT_ERR</dt>
+<dd>The function failed due to a wrong FAT structure or an internal error.</dd>
+<dt>FR_NOT_ENABLED</dt>
+<dd>The logical drive has no work area.</dd>
+<dt>FR_NO_FILESYSTEM</dt>
+<dd>There is no valid FAT volume on the drive.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>The f_opendir function opens an exsisting directory and creates the directory object for subsequent calls. The directory object structure can be discarded at any time without any procedure.</p>
+</div>
+
+
+<div class="para">
+<h4>QuickInfo</h4>
+<p>Available when <tt>_FS_MINIMIZE &lt;= 1</tt>.</p>
+</div>
+
+
+<div class="para">
+<h4>See Also</h4>
+<p><tt><a href="readdir.html">f_readdir</a>, <a href="sdir.html">DIR</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/printf.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/printf.html
new file mode 100644
index 0000000..8104d8e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/printf.html
@@ -0,0 +1,90 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/printf.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_printf</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_printf</h2>
+<p>The f_printf function writes formatted string to the file.</p>
+<pre>
+int f_printf (
+ FIL* <em>FileObject</em>, <span class="c">/* File object */</span>
+ const TCHAR* <em>Foramt</em>, <span class="c">/* Format stirng */</span>
+ ...
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>FileObject</dt>
+<dd>Pointer to the open file object structure.</dd>
+<dt>Format</dt>
+<dd>Pointer to the null terminated format string.</dd>
+<dt>...</dt>
+<dd>Optional arguments.</dd>
+
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Values</h4>
+<p>When the function succeeded, number of characters written is returned. When the function failed due to disk full or any error, an <tt>EOF (-1)</tt> will be returned.</p>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>The f_printf() is a wrapper function of <a href="putc.html">f_putc()</a> and <a href="puts.html">f_puts()</a>. The format control directive is a sub-set of standard library shown as follos:</p>
+<ul>
+<li>Type: <tt>c C s S d D u U x X b B</tt></li>
+<li>Size: <tt>l L</tt></li>
+<li>Flag: <tt>0 -</tt></li>
+</ul>
+</div>
+
+
+<div class="para">
+<h4>QuickInfo</h4>
+<p>Available when <tt>_FS_READONLY == 0</tt> and <tt>_USE_STRFUNC</tt> is 1 or 2. When it is set to 2, <tt>'\n'</tt>s contained in the output are converted to <tt>"\r\n"</tt>.</p>
+<p>When the FatFs is configured to Unicode API (<tt>_LFN_UNICODE == 1</tt>), the generated UCS-2 characters are written to the file in UTF-8 encoding. If not the case, the byte characters will be written directly.</p>
+</div>
+
+
+<div class="para">
+<h4>Example</h4>
+<pre>
+ f_printf(&amp;fil, "%d", 1234); <span class="c">/* "1234" */</span>
+ f_printf(&amp;fil, "%6d,%3d%%", -200, 5); <span class="c">/* " -200, 5%" */</span>
+ f_printf(&amp;fil, "%-6u", 100); <span class="c">/* "100 " */</span>
+ f_printf(&amp;fil, "%ld", 12345678L); <span class="c">/* "12345678" */</span>
+ f_printf(&amp;fil, "%04x", 0xA3); <span class="c">/* "00a3" */</span>
+ f_printf(&amp;fil, "%08LX", 0x123ABC); <span class="c">/* "00123ABC" */</span>
+ f_printf(&amp;fil, "%016b", 0x550F); <span class="c">/* "0101010100001111" */</span>
+ f_printf(&amp;fil, "%s", "String"); <span class="c">/* "String" */</span>
+ f_printf(&amp;fil, "%-4s", "abc"); <span class="c">/* "abc " */</span>
+ f_printf(&amp;fil, "%4s", "abc"); <span class="c">/* " abc" */</span>
+ f_printf(&amp;fil, "%c", 'a'); <span class="c">/* "a" */</span>
+ f_printf(&amp;fil, "%f", 10.0); <span class="c">/* f_printf lacks floating point support */</span>
+</pre>
+</div>
+
+
+<div class="para">
+<h4>See Also</h4>
+<p><tt><a href="open.html">f_open</a>, <a href="putc.html">f_putc</a>, <a href="puts.html">f_puts</a>, <a href="gets.html">f_gets</a>, <a href="close.html">f_close</a>, <a href="sfile.html">FIL</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/putc.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/putc.html
new file mode 100644
index 0000000..c9b5c88
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/putc.html
@@ -0,0 +1,62 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/putc.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_putc</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_putc</h2>
+<p>The f_putc funciton puts a character to the file.</p>
+<pre>
+int f_putc (
+ TCHAR <em>Chr</em>, <span class="c">/* A character to put */</span>
+ FIL* <em>FileObject</em> <span class="c">/* File object */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>Chr</dt>
+<dd>A character to be put.</dd>
+<dt>FileObject</dt>
+<dd>Pointer to the open file object structuer.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Values</h4>
+<p>When the character was written successfuly, the function returns the character. When the function failed due to disk full or any error, an <tt>EOF (-1)</tt> will be returned.</p>
+<p>When the FatFs is configured to Unicode API (<tt>_LFN_UNICODE == 1</tt>), the UCS-2 character is written to the file in UTF-8 encoding. If not the case, the byte will be written directly.</p>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>The f_putc() is a wrapper function of <a href="write.html">f_write()</a>.</p>
+</div>
+
+
+<div class="para">
+<h4>QuickInfo</h4>
+<p>Available when <tt>_FS_READONLY == 0</tt> and <tt>_USE_STRFUNC</tt> is 1 or 2. When it is set to 2, a <tt>'\n'</tt> is converted to <tt>"\r\n"</tt>.</p>
+</div>
+
+
+<div class="para">
+<h4>See Also</h4>
+<p><tt><a href="open.html">f_open</a>, <a href="puts.html">f_puts</a>, <a href="printf.html">f_printf</a>, <a href="gets.html">f_gets</a>, <a href="close.html">f_close</a>, <a href="sfile.html">FIL</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/puts.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/puts.html
new file mode 100644
index 0000000..6a09442
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/puts.html
@@ -0,0 +1,62 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/puts.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_puts</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_puts</h2>
+<p>The f_puts function writes a string to the file.</p>
+<pre>
+int f_puts (
+ const TCHAR* <em>Str</em>, <span class="c">/* String */</span>
+ FIL* <em>FileObject</em> <span class="c">/* File object */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>Str</dt>
+<dd>Pointer to the null terminated string to be written. The null character will not be written.</dd>
+<dt>FileObject</dt>
+<dd>Pointer to the open file object structure.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Value</h4>
+<p>When the function succeeded, number of characters written that is not minus value is returned. When the function failed due to disk full or any error, an <tt>EOF (-1)</tt> will be returned.</p>
+<p>When the FatFs is configured to Unicode API (<tt>_LFN_UNICODE == 1</tt>), the UCS-2 string is written to the file in UTF-8 encoding. If not the case, the byte stream will be written directly.</p>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>The f_puts() is a wrapper function of <a href="putc.html">f_putc()</a>.</p>
+</div>
+
+
+<div class="para">
+<h4>QuickInfo</h4>
+<p>Available when <tt>_FS_READONLY == 0</tt> and <tt>_USE_STRFUNC</tt> is 1 or 2. When it is set to 2, <tt>'\n'</tt>s contained in the string are converted to <tt>"\r\n"</tt>.</p>
+</div>
+
+
+<div class="para">
+<h4>See Also</h4>
+<p><tt><a href="open.html">f_open</a>, <a href="putc.html">f_putc</a>, <a href="printf.html">f_printf</a>, <a href="gets.html">f_gets</a>, <a href="close.html">f_close</a>, <a href="sfile.html">FIL</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/read.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/read.html
new file mode 100644
index 0000000..e10b8c3
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/read.html
@@ -0,0 +1,80 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/read.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_read</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_read</h2>
+<p>The f_read function reads data from a file.</p>
+<pre>
+FRESULT f_read (
+ FIL* <em>FileObject</em>, <span class="c">/* Pointer to the file object structure */</span>
+ void* <em>Buffer</em>, <span class="c">/* Pointer to the buffer to store read data */</span>
+ UINT <em>ByteToRead</em>, <span class="c">/* Number of bytes to read */</span>
+ UINT* <em>ByteRead</em> <span class="c">/* Pointer to the variable to return number of bytes read */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>FileObject</dt>
+<dd>Pointer to the open file object.</dd>
+<dt>Buffer</dt>
+<dd>Pointer to the buffer to store read data</dd>
+<dt>ByteToRead</dt>
+<dd>Number of bytes to read in range of UINT.</dd>
+<dt>ByteRead</dt>
+<dd>Pointer to the UINT variable to return number of bytes read. The value is always valid after the function call regardless of the result.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Values</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>The function succeeded.</dd>
+<dt>FR_DENIED</dt>
+<dd>The function denied due to the file has been opened in non-read mode.</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>The function failed due to an error in the disk function.</dd>
+<dt>FR_INT_ERR</dt>
+<dd>The function failed due to a wrong FAT structure or an internal error.</dd>
+<dt>FR_NOT_READY</dt>
+<dd>The disk drive cannot work due to no medium in the drive or any other reason.</dd>
+<dt>FR_INVALID_OBJECT</dt>
+<dd>The file object is invalid.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>The file pointer of the file object increases in number of bytes read. After the function succeeded, <tt>*ByteRead</tt> should be checked to detect the end of file. In case of <tt>*ByteRead &lt; ByteToRead</tt>, it means the read/write pointer reached end of the file during read operation.</p>
+</div>
+
+
+<div class="para">
+<h4>QuickInfo</h4>
+<p>Always available.</p>
+</div>
+
+
+<div class="para">
+<h4>See Also</h4>
+<p><tt><a href="open.html">f_open</a>, <a href="gets.html">fgets</a>, <a href="write.html">f_write</a>, <a href="close.html">f_close</a>, <a href="sfile.html">FIL</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/readdir.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/readdir.html
new file mode 100644
index 0000000..04ab65d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/readdir.html
@@ -0,0 +1,120 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/readdir.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_readdir</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_readdir</h2>
+<p>The f_readdir function reads directory entries.</p>
+<pre>
+FRESULT f_readdir (
+ DIR* <em>DirObject</em>, <span class="c">/* Pointer to the open directory object */</span>
+ FILINFO* <em>FileInfo</em> <span class="c">/* Pointer to the file information structure */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>DirObject</dt>
+<dd>Pointer to the open directory object.</dd>
+<dt>FileInfo</dt>
+<dd>Pointer to the file information structure to store the read item.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Values</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>The function succeeded.</dd>
+<dt>FR_NOT_READY</dt>
+<dd>The disk drive cannot work due to no medium in the drive or any other reason.</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>The function failed due to an error in the disk function.</dd>
+<dt>FR_INT_ERR</dt>
+<dd>The function failed due to a wrong FAT structure or an internal error.</dd>
+<dt>FR_INVALID_OBJECT</dt>
+<dd>The directory object is invalid.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>The f_readdir function reads directory entries in sequence. All items in the directory can be read by calling f_readdir function repeatedly. When all directory entries have been read and no item to read, the function returns a null string into <tt>f_name[]</tt> member without any error. When a null pointer is given to the <tt>FileInfo</tt>, the read index of the directory object will be rewinded.</p>
+<p>When LFN feature is enabled, <tt>lfname</tt> and <tt>lfsize</tt> in the file information structure must be initialized with valid value prior to use the f_readdir function. The <tt>lfname</tt> is a pointer to the string buffer to return the long file name. The <tt>lfsize</tt> is the size of the string buffer in unit of TCHAR. If either the size of read buffer or LFN working buffer is insufficient for the LFN or the object has no LFN, a null string will be returned to the LFN read buffer. If the LFN contains any charactrer that cannot be converted to OEM code, a null string will be returned but this is not the case on Unicode API configuration. When <tt>lfname</tt> is a NULL, nothing of the LFN is returned. When the object has no LFN, some small capitals can be contained in the SFN.</p>
+<p>When relative path feature is enabled <tt>(_FS_RPATH == 1)</tt>, "." and ".." entries are not filtered out and it will appear in the read entries.</p>
+</div>
+
+
+<div class="para">
+<h4>QuickInfo</h4>
+<p>Available when <tt>_FS_MINIMIZE &lt;= 1</tt>.</p>
+</div>
+
+
+<div class="para">
+<h4>Sample Code</h4>
+<pre>
+FRESULT scan_files (char* path)
+{
+ FRESULT res;
+ FILINFO fno;
+ DIR dir;
+ int i;
+ char *fn;
+#if _USE_LFN
+ static char lfn[_MAX_LFN * (_DF1S ? 2 : 1) + 1];
+ fno.lfname = lfn;
+ fno.lfsize = sizeof(lfn);
+#endif
+
+
+ res = f_opendir(&amp;dir, path);
+ if (res == FR_OK) {
+ i = strlen(path);
+ for (;;) {
+ res = f_readdir(&amp;dir, &amp;fno);
+ if (res != FR_OK || fno.fname[0] == 0) break;
+ if (fno.fname[0] == '.') continue;
+#if _USE_LFN
+ fn = *fno.lfname ? fno.lfname : fno.fname;
+#else
+ fn = fno.fname;
+#endif
+ if (fno.fattrib &amp; AM_DIR) {
+ sprintf(&amp;path[i], "/%s", fn);
+ res = scan_files(path);
+ if (res != FR_OK) break;
+ path[i] = 0;
+ } else {
+ printf("%s/%s\n", path, fn);
+ }
+ }
+ }
+
+ return res;
+}
+</pre>
+</div>
+
+
+<div class="para">
+<h4>See Also</h4>
+<p><tt><a href="opendir.html">f_opendir</a>, <a href="stat.html">f_stat</a>, <a href="sfileinfo.html">FILINFO</a>, <a href="sdir.html">DIR</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/rename.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/rename.html
new file mode 100644
index 0000000..59572b7
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/rename.html
@@ -0,0 +1,96 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/rename.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_rename</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_rename</h2>
+<p>Renames an object.</p>
+<pre>
+FRESULT f_rename (
+ const TCHAR* <em>OldName</em>, <span class="c">/* Pointer to old object name */</span>
+ const TCHAR* <em>NewName</em> <span class="c">/* Pointer to new object name */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>OldName</dt>
+<dd>Pointer to a null-terminated string specifies the old <a href="filename.html">object name</a> to be renamed.</dd>
+<dt>NewName</dt>
+<dd>Pointer to a null-terminated string specifies the new object name without drive number.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Values</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>The function succeeded.</dd>
+<dt>FR_NO_FILE</dt>
+<dd>Could not find the old name.</dd>
+<dt>FR_NO_PATH</dt>
+<dd>Could not find the path.</dd>
+<dt>FR_INVALID_NAME</dt>
+<dd>The file name is invalid.</dd>
+<dt>FR_INVALID_DRIVE</dt>
+<dd>The drive number is invalid.</dd>
+<dt>FR_NOT_READY</dt>
+<dd>The disk drive cannot work due to no medium in the drive or any other reason.</dd>
+<dt>FR_EXIST</dt>
+<dd>The new name is colliding with an existing name.</dd>
+<dt>FR_DENIED</dt>
+<dd>The new name could not be created due to any reason.</dd>
+<dt>FR_WRITE_PROTECTED</dt>
+<dd>The medium is write protected.</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>The function failed due to an error in the disk function.</dd>
+<dt>FR_INT_ERR</dt>
+<dd>The function failed due to a wrong FAT structure or an internal error.</dd>
+<dt>FR_NOT_ENABLED</dt>
+<dd>The logical drive has no work area.</dd>
+<dt>FR_NO_FILESYSTEM</dt>
+<dd>There is no valid FAT volume on the drive.</dd>
+<dt>FR_LOCKED</dt>
+<dd>The function was rejected due to file shareing policy (_FS_SHARE).</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>Renames an object (file or directory) and can also move it to other directory. The logical drive number is determined by old name, new name must not contain a logical drive number. <em>Do not rename open objects</em>.</p>
+</div>
+
+
+<div class="para">
+<h4>QuickInfo</h4>
+<p>Available when <tt>_FS_READONLY == 0</tt> and <tt>_FS_MINIMIZE == 0</tt>.</p>
+</div>
+
+
+<div class="para">
+<h4>Example</h4>
+<pre>
+ <span class="c">/* Rename an object */</span>
+ f_rename("oldname.txt", "newname.txt");
+
+ <span class="c">/* Rename and move an object to other directory */</span>
+ f_rename("oldname.txt", "dir1/newname.txt");
+</pre>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/sdir.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/sdir.html
new file mode 100644
index 0000000..41e5d06
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/sdir.html
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/sdir.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - DIR</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>DIR</h2>
+<p>The <tt>DIR</tt> structure is used for the work area to read a directory by f_oepndir, f_readdir function. There is no member that can be changed by application.</p>
+<pre>
+<span class="k">typedef</span> <span class="k">struct</span> {
+ FATFS* fs; <span class="c">/* Pointer to the owner file system object */</span>
+ WORD id; <span class="c">/* Owner file system mount ID */</span>
+ WORD index; <span class="c">/* Directory index number to be read/write next */</span>
+ DWORD sclust; <span class="c">/* Table start cluster (0:Root dir) */</span>
+ DWORD clust; <span class="c">/* Current cluster */</span>
+ DWORD sect; <span class="c">/* Current sector */</span>
+ BYTE* dir; <span class="c">/* Pointer to the current SFN entry in the win[] */</span>
+ BYTE* fn; <span class="c">/* Pointer to the SFN (in/out) {file[8],ext[3],status[1]} */</span>
+<span class="k">#if</span> _USE_LFN
+ WCHAR* lfn; <span class="c">/* Pointer to the LFN working buffer */</span>
+ WORD lfn_idx; <span class="c">/* Last matched LFN index (0xFFFF:No LFN) */</span>
+<span class="k">#endif</span>
+} DIR;
+</pre>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/sfatfs.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/sfatfs.html
new file mode 100644
index 0000000..c73d890
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/sfatfs.html
@@ -0,0 +1,54 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/sfatfs.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - FATFS</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>FATFS</h2>
+<p>The <tt>FATFS</tt> structure holds dynamic work area of individual logical drives. It is given by application program and registerd/unregisterd to the FatFs module with f_mount function. Following members are in standard configuration. There is no member that can be changed from the application program.</p>
+<pre>
+<span class="k">typedef</span> <span class="k">struct</span> {
+ BYTE fs_type; <span class="c">/* FAT sub-type (0:Not mounted) */</span>
+ BYTE drv; <span class="c">/* Physical drive number */</span>
+ BYTE csize; <span class="c">/* Sectors per cluster (1,2,4...128) */</span>
+ BYTE n_fats; <span class="c">/* Number of FAT copies (1,2) */</span>
+ BYTE wflag; <span class="c">/* win[] dirty flag */</span>
+ BYTE fsi_flag; <span class="c">/* fsinfo dirty flag */</span>
+ WORD id; <span class="c">/* File system mount ID */</span>
+ WORD n_rootdir; <span class="c">/* Number of root directory entries (FAT12/16) */</span>
+<span class="k">#if</span> _MAX_SS != 512
+ WORD ssize; <span class="c">/* Sector size (512,1024,2048,4096) */</span>
+<span class="k">#endif</span>
+<span class="k">#if</span> _FS_REENTRANT
+ _SYNC_t sobj; <span class="c">/* Identifier of sync object */</span>
+<span class="k">#endif</span>
+<span class="k">#if</span> !_FS_READONLY
+ DWORD last_clust; <span class="c">/* Last allocated cluster */</span>
+ DWORD free_clust; <span class="c">/* Number of free clusters */</span>
+ DWORD fsi_sector; <span class="c">/* fsinfo sector (FAT32) */</span>
+<span class="k">#endif</span>
+<span class="k">#if</span> _FS_RPATH
+ DWORD cdir; <span class="c">/* Current directory cluster (0:root) */</span>
+<span class="k">#endif</span>
+ DWORD n_fatent; <span class="c">/* Number of FAT entries (= number of clusters + 2) */</span>
+ DWORD fsize; <span class="c">/* Sectors per FAT */</span>
+ DWORD fatbase; <span class="c">/* FAT area start sector */</span>
+ DWORD dirbase; <span class="c">/* Root directory area start sector (FAT32: cluster#) */</span>
+ DWORD database; <span class="c">/* Data area start sector */</span>
+ DWORD winsect; <span class="c">/* Current sector appearing in the win[] */</span>
+ BYTE win[_MAX_SS]; <span class="c">/* Disk access window for Directory, FAT (and Data on tiny cfg) */</span>
+} FATFS;
+</pre>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/sfile.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/sfile.html
new file mode 100644
index 0000000..bcdc904
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/sfile.html
@@ -0,0 +1,49 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/sfile.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - FIL</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>FIL</h2>
+<p>The FIL structure (file object) holds state of an open file. It is created by f_open function and discarded by f_close function. There is no member that can be changed by the application program except for <tt>cltbl</tt>. Note that a sector buffer is defined in this structure under non-tiny configuration so that the FIL structures should not be defined as auto variable.</p>
+
+<pre>
+<span class="k">typedef</span> <span class="k">struct</span> {
+ FATFS* fs; <span class="c">/* Pointer to the owner file system object */</span>
+ WORD id; <span class="c">/* Owner file system mount ID */</span>
+ BYTE flag; <span class="c">/* File status flags */</span>
+ BYTE pad1;
+ DWORD fptr; <span class="c">/* File read/write pointer (Byte offset origin from top of the file) */</span>
+ DWORD fsize; <span class="c">/* File size */</span>
+ DWORD sclust; <span class="c">/* File start cluster */</span>
+ DWORD clust; <span class="c">/* Current cluster */</span>
+ DWORD dsect; <span class="c">/* Current data sector */</span>
+<span class="k">#if</span> !_FS_READONLY
+ DWORD dir_sect; <span class="c">/* Sector containing the directory entry */</span>
+ BYTE* dir_ptr; <span class="c">/* Ponter to the directory entry in the window */</span>
+<span class="k">#endif</span>
+<span class="k">#if</span> _USE_FASTSEEK
+ DWORD* cltbl; <span class="c">/* Pointer to the cluster link map table (Nulled on file open) */</span>
+<span class="k">#endif</span>
+<span class="k">#if</span> _FS_SHARE
+ UINT lockid; <span class="c">/* File lock ID */</span>
+<span class="k">#endif</span>
+<span class="k">#if</span> !_FS_TINY
+ BYTE buf[_MAX_SS]; <span class="c">/* Data read/write buffer */</span>
+<span class="k">#endif</span>
+} FIL;
+</pre>
+
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/sfileinfo.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/sfileinfo.html
new file mode 100644
index 0000000..2322eb1
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/sfileinfo.html
@@ -0,0 +1,70 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/sfileinfo.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - FILINFO</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>FILINFO</h2>
+<p>The <tt>FILINFO</tt> structure holds a file information returned by f_stat and f_readdir function.</p>
+<pre>
+<span class="k">typedef</span> <span class="k">struct</span> {
+ DWORD fsize; <span class="k">/* File size */</span>
+ WORD fdate; <span class="k">/* Last modified date */</span>
+ WORD ftime; <span class="k">/* Last modified time */</span>
+ BYTE fattrib; <span class="k">/* Attribute */</span>
+ TCHAR fname[13]; <span class="k">/* Short file name (8.3 format) */</span>
+<span class="k">#if</span> _USE_LFN
+ TCHAR* lfname; <span class="k">/* Pointer to the LFN buffer */</span>
+ int lfsize; <span class="k">/* Size of the LFN buffer in unit of TCHAR */</span>
+<span class="k">#endif</span>
+} FILINFO;
+</pre>
+</div>
+
+<h4>Members</h4>
+<dl>
+<dt>fsize</dt>
+<dd>Indicates size of the file in unit of byte. This is always zero when it is a directory.</dd>
+<dt>fdate</dt>
+<dd>Indicates the date that the file was modified or the directory was created.<br>
+<dl>
+<dt>bit15:9</dt>
+<dd>Year origin from 1980 (0..127)</dd>
+<dt>bit8:5</dt>
+<dd>Month (1..12)</dd>
+<dt>bit4:0</dt>
+<dd>Day (1..31)</dd>
+</dl>
+</dd>
+<dt>ftime</dt>
+<dd>Indicates the time that the file was modified or the directory was created.<br>
+<dl>
+<dt>bit15:11</dt>
+<dd>Hour (0..23)</dd>
+<dt>bit10:5</dt>
+<dd>Minute (0..59)</dd>
+<dt>bit4:0</dt>
+<dd>Second / 2 (0..29)</dd>
+</dl>
+</dd>
+<dt>fattrib</dt>
+<dd>Indicates the file/directory attribute in combination of <tt>AM_DIR</tt>, <tt>AM_RDO</tt>, <tt>AM_HID</tt>, <tt>AM_SYS</tt> and <tt>AM_ARC</tt>.</dd>
+<dt>fname[]</dt>
+<dd>Indicates the file/directory name in 8.3 format null-terminated string. It is always returnd with upper case on non-LFN configuration but it can be returned with lower case on LFN configuration.</dd>
+<dt>lfname</dt>
+<dd>Pointer to the LFN buffer to store the read LFN. This member must be initialized by application prior to use this structure. Not available on non-LFN configuration.</dd>
+<dt>lfsize</dt>
+<dd>Size of the LFN buffer in unit of chars. This member must be initialized by application prior to use this structure. Not available on non-LFN configuration.</dd>
+</dl>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/size.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/size.html
new file mode 100644
index 0000000..1d41db4
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/size.html
@@ -0,0 +1,61 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/size.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_size</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_size</h2>
+<p>The f_size function gets the size of a file.</p>
+<pre>
+DWORD f_size (
+ FIL* <em>FileObject</em> <span class="c">/* File object */</span>
+);
+</pre>
+</div>
+
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>FileObject</dt>
+<dd>Pointer to the open file object structure.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Values</h4>
+<p>Returns the size of the file in unit of byte.</p>
+</div>
+
+
+<h4>Description</h4>
+<p>The f_size function is implemented as a macro.</p>
+<pre>
+<span class="k">#define</span> f_size(fp) ((fp)->fsize)
+</pre>
+</div>
+
+
+<div class="para">
+<h4>QuickInfo</h4>
+<p>Always available.</p>
+</div>
+
+
+<div class="para">
+<h4>See Also</h4>
+<p><tt><a href="open.html">f_open</a>, <a href="lseek.html">f_lseek</a>, <a href="sfile.html">FIL</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/stat.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/stat.html
new file mode 100644
index 0000000..99c75e3
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/stat.html
@@ -0,0 +1,76 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/stat.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_stat</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_stat</h2>
+<p>The f_stat gets the file status.</p>
+<pre>
+FRESULT f_stat (
+ const TCHAR* <em>FileName</em>, <span class="k">/* Pointer to the file or directory name */</span>
+ FILINFO* <em>FileInfo</em> <span class="k">/* Pointer to the FILINFO structure */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>FileName</dt>
+<dd>Pointer to the null-terminated string that specifies the <a href="filename.html">file or directory</a> to get its information.</dd>
+<dt>FileInfo</dt>
+<dd>Pointer to the blank <tt>FILINFO</tt> structure to store the information.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Values</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>The function succeeded.</dd>
+<dt>FR_NO_FILE</dt>
+<dd>Could not find the file or directory.</dd>
+<dt>FR_NO_PATH</dt>
+<dd>Could not find the path.</dd>
+<dt>FR_INVALID_NAME</dt>
+<dd>The file name is invalid.</dd>
+<dt>FR_INVALID_DRIVE</dt>
+<dd>The drive number is invalid.</dd>
+<dt>FR_NOT_READY</dt>
+<dd>The disk drive cannot work due to no medium in the drive or any other reason.</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>The function failed due to an error in the disk function.</dd>
+<dt>FR_INT_ERR</dt>
+<dd>The function failed due to a wrong FAT structure or an internal error.</dd>
+<dt>FR_NOT_ENABLED</dt>
+<dd>The logical drive has no work area.</dd>
+<dt>FR_NO_FILESYSTEM</dt>
+<dd>There is no valid FAT volume on the drive.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>The f_stat gets the information of a file or directory. For details of the infomation, refer to the <tt>FILINFO</tt> structure and <a href="readdir.html">f_readdir</a> function. This function is not supported in minimization level of &gt;= 1.</p>
+</div>
+
+
+<div class="para">
+<h4>References</h4>
+<p><tt><a href="opendir.html">f_opendir</a>, <a href="readdir.html">f_readdir</a>, <a href="sfileinfo.html">FILINFO</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/sync.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/sync.html
new file mode 100644
index 0000000..f50502b
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/sync.html
@@ -0,0 +1,69 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/sync.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_sync</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_sync</h2>
+<p>The f_sync function flushes the cached information of a writing file.</p>
+<pre>
+FRESULT f_sync (
+ FIL* <em>FileObject</em> <span class="k">/* Pointer to the file object */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameter</h4>
+<dl class="par">
+<dt>FileObject</dt>
+<dd>Pointer to the open file object to be flushed.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Values</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>The function succeeded.</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>The function failed due to an error in the disk function.</dd>
+<dt>FR_INT_ERR</dt>
+<dd>The function failed due to a wrong FAT structure or an internal error.</dd>
+<dt>FR_NOT_READY</dt>
+<dd>The disk drive cannot work due to no medium in the drive or any other reason.</dd>
+<dt>FR_INVALID_OBJECT</dt>
+<dd>The file object is invalid.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>The f_sync function performs the same process as f_close function but the file is left opened and can continue read/write/seek operations to the file. This is suitable for the applications that open files for a long time in write mode, such as data logger. Performing f_sync of periodic or immediataly after f_write can minimize the risk of data loss due to a sudden blackout or an unintentional disk removal. However f_sync immediataly before f_close has no advantage because f_close performs f_sync in it. In other words, the differnce between those functions is that the file object is invalidated or not. </p>
+</div>
+
+
+<div class="para">
+<h4>QuickInfo</h4>
+<p>Available when <tt>_FS_READONLY == 0</tt>.</p>
+</div>
+
+
+<div class="para">
+<h4>See Also</h4>
+<p><tt><a href="close.html">f_close</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/tell.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/tell.html
new file mode 100644
index 0000000..a2617b3
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/tell.html
@@ -0,0 +1,61 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/tell.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_tell</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_tell</h2>
+<p>The f_tell function gets the current read/write pointer of a file.</p>
+<pre>
+DWORD f_tell (
+ FIL* <em>FileObject</em> <span class="c">/* File object */</span>
+);
+</pre>
+</div>
+
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>FileObject</dt>
+<dd>Pointer to the open file object structure.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Values</h4>
+<p>Returns current read/write pointer of the file.</p>
+</div>
+
+
+<h4>Description</h4>
+<p>The f_tell function is implemented as a macro.</p>
+<pre>
+<span class="k">#define</span> f_tell(fp) ((fp)->fptr)
+</pre>
+</div>
+
+
+<div class="para">
+<h4>QuickInfo</h4>
+<p>Always available.</p>
+</div>
+
+
+<div class="para">
+<h4>See Also</h4>
+<p><tt><a href="open.html">f_open</a>, <a href="lseek.html">f_lseek</a>, <a href="sfile.html">FIL</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/truncate.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/truncate.html
new file mode 100644
index 0000000..32a8259
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/truncate.html
@@ -0,0 +1,72 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/truncate.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_truncate</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_truncate</h2>
+<p>The f_truncate function truncates the file size.</p>
+<pre>
+FRESULT f_truncate (
+ FIL* <em>FileObject</em> <span class="k">/* Pointer to the file object */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameter</h4>
+<dl class="par">
+<dt>FileObject</dt>
+<dd>Pointer to the open file object to be truncated.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Values</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>The function succeeded.</dd>
+<dt>FR_DENIED</dt>
+<dd>The file has been opened in read-only mode.</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>The function failed due to an error in the disk function.</dd>
+<dt>FR_INT_ERR</dt>
+<dd>The function failed due to a wrong FAT structure or an internal error.</dd>
+<dt>FR_NOT_READY</dt>
+<dd>The disk drive cannot work due to no medium in the drive or any other reason.</dd>
+<dt>FR_INVALID_OBJECT</dt>
+<dd>The file object is invalid.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>The f_truncate function truncates the file size to the current file read/write point. This function has no effect if the file read/write pointer is already pointing end of the file.</p>
+</div>
+
+
+<div class="para">
+<h4>QuickInfo</h4>
+<p>Available when <tt>_FS_READONLY == 0</tt> and <tt>_FS_MINIMIZE == 0</tt>.</p>
+</div>
+
+
+<div class="para">
+<h4>See Also</h4>
+<p><tt><a href="open.html">f_open</a>, <a href="lseek.html">f_lseek</a>, <a href="sfile.html">FIL</a></tt></p>
+</div>
+
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/unlink.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/unlink.html
new file mode 100644
index 0000000..dace746
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/unlink.html
@@ -0,0 +1,81 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/unlink.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_unlink</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_unlink</h2>
+<p>The f_unlink function removes an object.</p>
+<pre>
+FRESULT f_unlink (
+ const TCHAR* <em>FileName</em> <span class="k">/* Pointer to the object name */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameter</h4>
+<dl class="par">
+<dt>FileName</dt>
+<dd>Pointer to the null-terminated string that specifies an <a href="filename.html">object</a> to be removed.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Values</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>The function succeeded.</dd>
+<dt>FR_NO_FILE</dt>
+<dd>Could not find the file or directory.</dd>
+<dt>FR_NO_PATH</dt>
+<dd>Could not find the path.</dd>
+<dt>FR_INVALID_NAME</dt>
+<dd>The path name is invalid.</dd>
+<dt>FR_INVALID_DRIVE</dt>
+<dd>The drive number is invalid.</dd>
+<dt>FR_DENIED</dt>
+<dd>The function was denied due to either of following reasons:
+<ul><li>The object has read-only attribute</li><li>Not empty directory</li><li>Current directory</li></ul></dd>
+<dt>FR_NOT_READY</dt>
+<dd>The disk drive cannot work due to no medium in the drive or any other reason.</dd>
+<dt>FR_WRITE_PROTECTED</dt>
+<dd>The medium is write protected.</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>The function failed due to an error in the disk function.</dd>
+<dt>FR_INT_ERR</dt>
+<dd>The function failed due to a wrong FAT structure or an internal error.</dd>
+<dt>FR_NOT_ENABLED</dt>
+<dd>The logical drive has no work area.</dd>
+<dt>FR_NO_FILESYSTEM</dt>
+<dd>There is no valid FAT volume on the drive.</dd>
+<dt>FR_LOCKED</dt>
+<dd>The function was rejected due to file shareing policy (_FS_SHARE).</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>The f_unlink function removes an object. <em>Do not remove open objects</em>.</p>
+</div>
+
+
+<div class="para">
+<h4>QuickInfo</h4>
+<p>Available when <tt>_FS_READONLY == 0</tt> and <tt>_FS_MINIMIZE == 0</tt>.</p>
+</div>
+
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/utime.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/utime.html
new file mode 100644
index 0000000..c6fac92
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/utime.html
@@ -0,0 +1,108 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/utime.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_utime</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_utime</h2>
+<p>The f_utime function changes the timestamp of a file or directory.</p>
+<pre>
+FRESULT f_utime (
+ const TCHAR* <em>FileName</em>, <span class="k">/* Pointer to the file or directory path */</span>
+ const FILINFO* <em>TimeDate</em> <span class="k">/* Time and data to be set */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>FileName</dt>
+<dd>Pointer to the null-terminated string that specifies a <a href="filename.html">file or directory</a> to be changed.</dd>
+<dt>TimeDate</dt>
+<dd>Pointer to the file information structure that has a timestamp to be set in member fdate and ftime. Do not care any other members.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Values</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>The function succeeded.</dd>
+<dt>FR_NO_FILE</dt>
+<dd>Could not find the file.</dd>
+<dt>FR_NO_PATH</dt>
+<dd>Could not find the path.</dd>
+<dt>FR_INVALID_NAME</dt>
+<dd>The file name is invalid.</dd>
+<dt>FR_INVALID_DRIVE</dt>
+<dd>The drive number is invalid.</dd>
+<dt>FR_NOT_READY</dt>
+<dd>The disk drive cannot work due to no medium in the drive or any other reason.</dd>
+<dt>FR_WRITE_PROTECTED</dt>
+<dd>The medium is write protected.</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>The function failed due to an error in the disk function.</dd>
+<dt>FR_INT_ERR</dt>
+<dd>The function failed due to a wrong FAT structure or an internal error.</dd>
+<dt>FR_NOT_ENABLED</dt>
+<dd>The logical drive has no work area.</dd>
+<dt>FR_NO_FILESYSTEM</dt>
+<dd>There is no valid FAT volume on the drive.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>The f_utime function changes the timestamp of a file or directory</p>
+</div>
+
+
+<div class="para">
+<h4>Example</h4>
+<pre>
+FRESULT set_timestamp (
+ char *obj, <span class="k">/* Pointer to the file name */</span>
+ int year,
+ int month,
+ int mday,
+ int hour,
+ int min,
+ int sec
+)
+{
+ FILINFO fno;
+
+ fno.fdate = (WORD)(((year - 1980) * 512U) | month * 32U | mday);
+ fno.ftime = (WORD)(hour * 2048U | min * 32U | sec / 2U);
+
+ return f_utime(obj, &amp;fno);
+}
+</pre>
+</div>
+
+
+<div class="para">
+<h4>QuickInfo</h4>
+<p>Available when <tt>_FS_READONLY == 0</tt> and <tt>_FS_MINIMIZE == 0</tt>.</p>
+</div>
+
+
+<div class="para">
+<h4>See Also</h4>
+<p><tt><a href="stat.html">f_stat</a>, <a href="sfileinfo.html">FILINFO</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/write.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/write.html
new file mode 100644
index 0000000..7b6c8ae
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/en/write.html
@@ -0,0 +1,80 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/write.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_write</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_write</h2>
+<p>The f_write writes data to a file.</p>
+<pre>
+FRESULT f_write (
+ FIL* <em>FileObject</em>, <span class="c">/* Pointer to the file object structure */</span>
+ const void* <em>Buffer</em>, <span class="c">/* Pointer to the data to be written */</span>
+ UINT <em>ByteToWrite</em>, <span class="c">/* Number of bytes to write */</span>
+ UINT* <em>ByteWritten</em> <span class="c">/* Pointer to the variable to return number of bytes written */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>FileObject</dt>
+<dd>Pointer to the open file object structure.</dd>
+<dt>Buffer</dt>
+<dd>Pointer to the data to be written.</dd>
+<dt>ByteToWrite</dt>
+<dd>Specifies number of bytes to write in range of UINT.</dd>
+<dt>ByteWritten</dt>
+<dd>Pointer to the UINT variable to return the number of bytes written. The value is always valid after the function call regardless of the result.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Values</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>The function succeeded.</dd>
+<dt>FR_DENIED</dt>
+<dd>The function denied due to the file has been opened in non-write mode.</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>The function failed due to an error in the disk function.</dd>
+<dt>FR_INT_ERR</dt>
+<dd>The function failed due to a wrong FAT structure or an internal error.</dd>
+<dt>FR_NOT_READY</dt>
+<dd>The disk drive cannot work due to no medium in the drive or any other reason.</dd>
+<dt>FR_INVALID_OBJECT</dt>
+<dd>The file object is invalid.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>The read/write pointer in the file object is increased in number of bytes written. After the function succeeded, <tt>*ByteWritten</tt> should be checked to detect the disk full. In case of <tt>*ByteWritten &lt; ByteToWrite</tt>, it means the volume got full during the write operation. The function can take a time when the volume is full or close to full.</p>
+</div>
+
+
+<div class="para">
+<h4>QuickInfo</h4>
+<p>Available when <tt>_FS_READONLY == 0</tt>.</p>
+</div>
+
+
+<div class="para">
+<h4>See Also</h4>
+<p><tt><a href="open.html">f_open</a>, <a href="read.html">f_read</a>, <a href="putc.html">fputc</a>, <a href="puts.html">fputs</a>, <a href="printf.html">fprintf</a>, <a href="close.html">f_close</a>, <a href="sfile.html">FIL</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/img/f1.png b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/img/f1.png
new file mode 100644
index 0000000..42cc271
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/img/f1.png
Binary files differ
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/img/f2.png b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/img/f2.png
new file mode 100644
index 0000000..8ef0ec2
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/img/f2.png
Binary files differ
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/img/f3.png b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/img/f3.png
new file mode 100644
index 0000000..9111bfc
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/img/f3.png
Binary files differ
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/img/f4.png b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/img/f4.png
new file mode 100644
index 0000000..f9a6b46
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/img/f4.png
Binary files differ
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/img/f5.png b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/img/f5.png
new file mode 100644
index 0000000..b110b29
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/img/f5.png
Binary files differ
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/img/f6.png b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/img/f6.png
new file mode 100644
index 0000000..a7b0d71
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/img/f6.png
Binary files differ
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/img/layers.png b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/img/layers.png
new file mode 100644
index 0000000..d485d6b
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/img/layers.png
Binary files differ
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/img/rwtest.png b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/img/rwtest.png
new file mode 100644
index 0000000..a34bf06
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/img/rwtest.png
Binary files differ
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/img/rwtest2.png b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/img/rwtest2.png
new file mode 100644
index 0000000..41a8c1f
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/img/rwtest2.png
Binary files differ
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/appnote.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/appnote.html
new file mode 100644
index 0000000..20401b5
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/appnote.html
@@ -0,0 +1,263 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_j.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/appnote.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFsモジュール アプリケーション・ノート</title>
+</head>
+
+<body>
+<h1>FatFsモジュール アプリケーション・ノート</h1>
+<ol class="toc">
+<li><a href="#port">ãƒãƒ¼ãƒ†ã‚£ãƒ³ã‚°ã®éš›ã«é…æ…®ã™ã¹ãã“ã¨</a></li>
+<li><a href="#limits">é™ç•Œå€¤</a></li>
+<li><a href="#memory">メモリ使用é‡</a></li>
+<li><a href="#reduce">モジュール・サイズã®ç¸®å°</a></li>
+<li><a href="#lfn">é•·ã„ファイルå</a></li>
+<li><a href="#jap">日本語ファイルåã®å¤§æ–‡å­—変æ›</a></li>
+<li><a href="#unicode">Unicode入出力ã¸ã®å¯¾å¿œ</a></li>
+<li><a href="#reentrant">リエントランシー</a></li>
+<li><a href="#dup">多é‡ãƒ•ã‚¡ã‚¤ãƒ«ãƒ»ã‚¢ã‚¯ã‚»ã‚¹</a></li>
+<li><a href="#fs1">効率的ãªãƒ•ã‚¡ã‚¤ãƒ«ãƒ»ã‚¢ã‚¯ã‚»ã‚¹</a></li>
+<li><a href="#fs2">フラッシュ・メモリã®ç‰¹æ€§ã¸ã®é…æ…®</a></li>
+<li><a href="#critical">クリãƒã‚«ãƒ«ãƒ»ã‚»ã‚¯ã‚·ãƒ§ãƒ³</a></li>
+<li><a href="#license">FatFsã®ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ã«ã¤ã„ã¦</a></li>
+</ol>
+<hr>
+
+<div class="para" id="port">
+<h3>ãƒãƒ¼ãƒ†ã‚£ãƒ³ã‚°ã®éš›ã«é…æ…®ã™ã¹ãã“ã¨</h3>
+<h4>移æ¤ã®éš›ã®å‰ææ¡ä»¶</h4>
+<p>FatFsモジュールã¯ç§»æ¤æ€§ã«é–¢ã—ã¦æ¬¡ã®ç‚¹ã‚’å‰æã¨ã—ã¦ã„ã¾ã™ã€‚</p>
+<ul>
+<li>処ç†ç³»ã¯ANSI C準拠ã§ã‚ã‚‹ã“ã¨ã€‚<br>
+FatFsモジュールã¯ANSI C(C89)準拠ã§è¨˜è¿°ã•ã‚Œã¦ã„ã‚‹ã®ã§ã€ANSI Cã«æº–æ‹ ã—ãŸã¾ã¨ã‚‚ãªã‚³ãƒ³ãƒ‘イラãªã‚‰ç‰¹ã«å‡¦ç†ç³»ä¾å­˜ã«ãªã‚‹ç‚¹ã¯ã‚ã‚Šã¾ã›ã‚“。</li>
+<li>char/short/longã®ã‚µã‚¤ã‚ºã¯ã€ãã‚Œãžã‚Œ8/16/32ビットã§ã€intã¯16ã¾ãŸã¯32ビットã§ã‚ã‚‹ã“ã¨ã€‚<br>
+サイズを明示ã™ã‚‹æ•´æ•°ã®åž‹ãŒ integer.h 内ã§å®šç¾©ã•ã‚Œã¦ã„ã¾ã™ã€‚æ•´æ•°ã®åž‹ã¨ã‚µã‚¤ã‚ºã«é–¢ã—ã¦ã¯ã€ã¾ã£ã¨ã†ãªå‡¦ç†ç³»ãªã‚‰å•é¡Œãªã„ã¯ãšã§ã™ãŒã€æ—¢å­˜ã®å®šç¾©ã¨è¡çªã—ãŸå ´åˆã¯ãƒ¦ãƒ¼ã‚¶ã«ã‚ˆã£ã¦è§£æ±ºã•ã‚Œãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。</li>
+</ul>
+<h4>ユーザã®ä½œæˆã™ã‚‹é–¢æ•°</h4>
+<p>å¿…è¦ãªã®ã¯ FatFsモジュールã®è¦æ±‚ã™ã‚‹ãƒ‡ã‚£ã‚¹ã‚¯é–¢æ•°ã‚’用æ„ã™ã‚‹ã“ã¨ã ã‘ã§ã€ãれ以外ã«ã™ã‚‹ã“ã¨ã¯ã‚ã‚Šã¾ã›ã‚“。既ã«å‹•ä½œã—ã¦ã„るディスク関数ãŒã‚ã‚‹ãªã‚‰ãã® APIã‚’ FatFsã«åˆã‚ã›ã‚‹ã ã‘ã§æ¸ˆã¿ã¾ã™ãŒã€ç„¡ã„å ´åˆã¯ã»ã‹ã‹ã‚‰ç§»æ¤ã™ã‚‹ã‹ã€æœ€åˆã‹ã‚‰æ›¸ãã‹ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚定義ã•ã‚Œã¦ã„ã‚‹å…¨ã¦ã®é–¢æ•°ãŒå¸¸ã«å¿…è¦ãªã‚ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。例ãˆã°ã€ãƒªãƒ¼ãƒ‰ãƒ»ã‚ªãƒ³ãƒªãƒ¼æ§‹æˆã§ã¯æ›¸ãè¾¼ã¿ç³»é–¢æ•°ã¯å¿…è¦ã‚ã‚Šã¾ã›ã‚“。次ã®è¡¨ã«æ§‹æˆã‚ªãƒ—ションã¨è¦æ±‚ã•ã‚Œã‚‹é–¢æ•°ã®å¯¾å¿œã‚’示ã—ã¾ã™ã€‚</p>
+<table class="lst2">
+<tr><th>ユーザ作æˆé–¢æ•°</th><th>å¿…è¦ã¨ãªã‚‹æ¡ä»¶</th><th>備考</th></tr>
+<tr><td>disk_initialize</td><td>常時</td><td rowspan="10">ffsample.zip (サンプル)<br>ãã®ä»–web上ã«å¤šæ•°</td></tr>
+<tr><td>disk_status</td><td>常時</td></tr>
+<tr><td>disk_read</td><td>常時</td></tr>
+<tr><td>disk_write</td><td>_FS_READONLY == 0</td></tr>
+<tr><td>disk_ioctl (CTRL_SYNC)</td><td>_FS_READONLY == 0</td></tr>
+<tr><td>disk_ioctl (GET_SECTOR_COUNT)</td><td>_USE_MKFS == 1</td></tr>
+<tr><td>disk_ioctl (GET_BLOCK_SIZE)</td><td>_USE_MKFS == 1</td></tr>
+<tr><td>disk_ioctl (GET_SECTOR_SIZE)</td><td>_MAX_SS &gt;= 1024</td></tr>
+<tr><td>disk_ioctl (CTRL_ERASE_SECTOR)</td><td>_USE_ERASE == 1</td></tr>
+<tr><td>get_fattime</td><td>_FS_READONLY == 0</td></tr>
+<tr><td>ff_convert</td><td>_USE_LFN &gt;= 1</td><td rowspan="2">option/cc*.c</td></tr>
+<tr><td>ff_wtoupper</td><td>_USE_LFN &gt;= 1</td></tr>
+<tr><td>ff_cre_syncobj</td><td>_FS_REENTRANT == 1</td><td rowspan="6">option/syscall.c (サンプル)</td></tr>
+<tr><td>ff_del_syncobj</td><td>_FS_REENTRANT == 1</td></tr>
+<tr><td>ff_req_grant</td><td>_FS_REENTRANT == 1</td></tr>
+<tr><td>ff_rel_grant</td><td>_FS_REENTRANT == 1</td></tr>
+<tr><td>ff_mem_alloc</td><td>_USE_LFN == 3</td></tr>
+<tr><td>ff_mem_free</td><td>_USE_LFN == 3</td></tr>
+</table>
+</div>
+
+<div class="para" id="limits">
+<h3>é™ç•Œå€¤</h3>
+<ul>
+<li>FATタイプ: FAT12, FAT16, FAT32。</li>
+<li>åŒæ™‚オープン・ファイル数: 無制é™ã€‚(利用å¯èƒ½ãƒ¡ãƒ¢ãƒªã«ã‚ˆã‚‹)</li>
+<li>ボリューム数: 最大 10。</li>
+<li>ファイル・サイズ: FATè¦æ ¼ã«ä¾å­˜ã€‚(最大 4G-1ãƒã‚¤ãƒˆ)</li>
+<li>ボリューム・サイズ: FATè¦æ ¼ã«ä¾å­˜ã€‚(最大 2Tãƒã‚¤ãƒˆ(512ãƒã‚¤ãƒˆ/セクタ時))</li>
+<li>クラスタ・サイズ: FATè¦æ ¼ã«ä¾å­˜ã€‚(最大 64Kãƒã‚¤ãƒˆ(512ãƒã‚¤ãƒˆ/セクタ時))</li>
+<li>セクタ・サイズ: FATè¦æ ¼ã«ä¾å­˜ã€‚(最大 4Kãƒã‚¤ãƒˆ)</li>
+</ul>
+</div>
+
+<div class="para" id="memory">
+<h3>ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ (R0.08b)</h3>
+<p>次ã®è¡¨ã«ã„ãã¤ã‹ã®ã‚¿ãƒ¼ã‚²ãƒƒãƒˆã«ãŠã‘るメモリ使用é‡ã®ä¾‹ã‚’示ã—ã¾ã™ã€‚テスト時ã®æ§‹æˆã‚ªãƒ—ションã¯ãã®ä¸‹ã®é€šã‚Šã§ã™ã€‚数値ã®å˜ä½ã¯ãƒã‚¤ãƒˆã§ã€<em>D</em>ã¯è«–ç†ãƒœãƒªãƒ¥ãƒ¼ãƒ æ•°ã€<em>F</em>ã¯åŒæ™‚オープン・ファイル数を示ã—ã¾ã™ã€‚コンパイラã®æœ€é©åŒ–オプションã¯ã‚³ãƒ¼ãƒ‰ãƒ»ã‚µã‚¤ã‚ºã¨ã—ã¦ã„ã¾ã™ã€‚</p>
+<table class="lst2">
+<tr><th></th><th>AVR</th><th>H8/300H</th><th>PIC24</th><th>V850ES</th><th>RX</th><th>SH-2A</th><th>ARM7</th><th>x86</th></tr>
+<tr><td>Compiler</td><td>WinAVR</td><td>CH38</td><td>C30</td><td>CA850</td><td>RXC</td><td>SHC</td><td>WinARM</td><td>VC6</td></tr>
+<tr><td>_WORD_ACCESS</td><td>1</td><td>0</td><td>0</td><td>1</td><td>1</td><td>0</td><td>0</td><td>1</td></tr>
+<tr class="lst3"><td>text (Full, R/W)</td><td>12646</td><td>10686</td><td>11430</td><td>7732</td><td>5747</td><td>8752</td><td>10560</td><td>7545</td></tr>
+<tr> <td>text (Min, R/W)</td><td>8306</td><td>6986</td><td>7413</td><td>4938</td><td>3746</td><td>5576</td><td>6680</td><td>4923</td></tr>
+<tr><td>text (Full, R/O)</td><td>5960</td><td>4876</td><td>5250</td><td>3554</td><td>2659</td><td>3804</td><td>4688</td><td>3450</td></tr>
+<tr> <td>text (Min, R/O)</td><td>4366</td><td>3770</td><td>3939</td><td>2684</td><td>2025</td><td>2940</td><td>3452</td><td>2664</td></tr>
+<tr><td>bss</td><td>D*2 + 2</td><td>D*4 + 2</td><td>D*2 + 2</td><td>D*4 + 2</td><td>D*4 + 2</td><td>D*4 + 2</td><td>D*4 + 2</td><td>D*4 + 2</td></tr>
+<tr><td>Work area<br>(_FS_TINY == 0)</td><td>D*560 +<br>F*544</td><td>D*560 +<br>F*550</td><td>D*560 +<br>F*544</td><td>D*560 +<br>F*544</td><td>D*560 +<br>F*550</td><td>D*560 +<br>F*550</td><td>D*560 +<br>F*550</td><td>D*560 +<br>F*550</td></tr>
+<tr><td>Work area<br>(_FS_TINY == 1)</td><td>D*560 +<br>F*32</td><td>D*560 +<br>F*36</td><td>D*560 +<br>F*32</td><td>D*560 +<br>F*36</td><td>D*560 +<br>F*36</td><td>D*560 +<br>F*36</td><td>D*560 +<br>F*36</td><td>D*560 +<br>F*36</td></tr>
+</table>
+<pre>
+_FS_READONLY 0 (R/W), 1 (R/O)
+_FS_MINIMIZE 0 (Full function), 3 (Minimized function)
+_USE_STRFUNC 0 (Disable string functions)
+_USE_MKFS 0 (Disable f_mkfs function)
+_USE_FORWARD 0 (Disable f_forward function)
+_USE_FASTSEEK 0 (Disable fast seek feature)
+_CODE_PAGE 932 (Japanese Shift-JIS)
+_USE_LFN 0 (Disable LFN)
+_MAX_SS 512 (Fixed sector size)
+_FS_RPATH 0 (Disable relative path)
+_MULTI_PARTITION 0 (Single partition per drive)
+_FS_REENTRANT 0 (Disable reentrancy)
+_FS_SHARE 0 (Disable shareing control)
+</pre>
+</div>
+
+<div class="para" id="reduce">
+<h3>モジュール・サイズã®ç¸®å°</h3>
+<p>次ã®è¡¨ã¯æ§‹æˆã‚ªãƒ—ションã®è¨­å®šå€¤ã«ã‚ˆã‚Šã©ã®æ©Ÿèƒ½ãŒå‰Šé™¤ã•ã‚Œã‚‹ã‹ã‚’示ã—ã¾ã™ã€‚</p>
+<table class="lst2">
+<tr><td rowspan="2">Function</td><td colspan="4">_FS_MINIMIZE</td><td colspan="2">_FS_READONLY</td><td colspan="2">_USE_STRFUNC</td><td colspan="3">_FS_RPATH</td><td colspan="2">_USE_MKFS</td><td colspan="2">_USE_FORWARD</td></tr>
+<tr><td>0</td><td>1</td><td>2</td><td>3</td><td>0</td><td>1</td><td>0</td><td>1</td><td>0</td><td>1</td><td>2</td><td>0</td><td>1</td><td>0</td><td>1</td></tr>
+<tr class="lst3"><td>f_mount</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_open</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_close</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_read</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_write</td><td></td><td></td><td></td><td></td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_sync</td><td></td><td></td><td></td><td></td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_lseek</td><td></td><td></td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_opendir</td><td></td><td></td><td>x</td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_readdir</td><td></td><td></td><td>x</td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_stat</td><td></td><td>x</td><td>x</td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_getfree</td><td></td><td>x</td><td>x</td><td>x</td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_truncate</td><td></td><td>x</td><td>x</td><td>x</td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_unlink</td><td></td><td>x</td><td>x</td><td>x</td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_mkdir</td><td></td><td>x</td><td>x</td><td>x</td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_chmod</td><td></td><td>x</td><td>x</td><td>x</td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_utime</td><td></td><td>x</td><td>x</td><td>x</td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_rename</td><td></td><td>x</td><td>x</td><td>x</td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_chdir</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_chdrive</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_getcwd</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>x</td><td>x</td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_mkfs</td><td></td><td></td><td></td><td></td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td>x</td><td></td><td></td><td></td></tr>
+<tr><td>f_forward</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>x</td><td></td></tr>
+<tr><td>f_putc</td><td></td><td></td><td></td><td></td><td></td><td>x</td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_puts</td><td></td><td></td><td></td><td></td><td></td><td>x</td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_printf</td><td></td><td></td><td></td><td></td><td></td><td>x</td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+<tr><td>f_gets</td><td></td><td></td><td></td><td></td><td></td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+</table>
+</div>
+
+<div class="para" id="lfn">
+<h3>é•·ã„ファイルå</h3>
+<p>FatFsモジュールã¯R0.07ã‹ã‚‰é•·ã„ファイルå(LFN)をサãƒãƒ¼ãƒˆã—ã¾ã—ãŸã€‚ファイルã«ä»˜ã‘られãŸ2ã¤ã®ç•°ãªã‚‹åå‰(短ã„ファルåã¨é•·ã„ファイルå)ã¯ã€f_readdir関数を除ãファイルæ“作関数ã«ãŠã„ã¦é€éŽã§ã™ã€‚LFN機能を有効ã«ã™ã‚‹ã«ã¯ã€<tt>_USE_LFN</tt>ã‚’1,2ã¾ãŸã¯3ã«è¨­å®šã—ã€Unicode変æ›é–¢æ•°<tt>ff_convert(), ff_wtoupper()</tt>をプロジェクトã«è¿½åŠ ã—ã¾ã™ã€‚ã“れらã®é–¢æ•°ã¯ã€<tt>option/cc*.c</tt>ã«å«ã¾ã‚Œã¦ã„ã¾ã™ã€‚LFN機能ã¯ã€åŠ ãˆã¦ã‚る程度ã®ãƒ¯ãƒ¼ã‚¯ãƒ»ã‚¨ãƒªã‚¢(LFNæ“作ãƒãƒƒãƒ•ã‚¡)ã‚’å¿…è¦ã¨ã—ã¾ã™ã€‚ãƒãƒƒãƒ•ã‚¡é•·ã¯ä½¿ç”¨ã§ãるメモリã«å¿œã˜ã¦<tt>_MAX_LFN</tt>オプションã§æ§‹æˆã•ã‚Œã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚LFNã®é•·ã•ã¯æœ€å¤§255文字ã«é”ã™ã‚‹ã®ã§ã€LFN完全対応ã®ãŸã‚ã«ã¯<tt>_MAX_LFN</tt>ã¯255ã«è¨­å®šã•ã‚Œã‚‹ã¹ãã§ã™ã€‚与ãˆã‚‰ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«åã«å¯¾ã—ã¦ãƒãƒƒãƒ•ã‚¡é•·ãŒä¸è¶³ã—ãŸå ´åˆã€ãƒ•ã‚¡ã‚¤ãƒ«é–¢æ•°ã¯<tt>FR_INVALID_NAME</tt>ã§å¤±æ•—ã—ã¾ã™ã€‚</p>
+<p>何らã‹ã®ãƒªã‚¨ãƒ³ãƒˆãƒ©ãƒ³ãƒˆçŠ¶æ…‹ã®ä¸‹ã§LFN機能を使用ã™ã‚‹å ´åˆã¯ã€<tt>_USE_LFN</tt>ã¯2ã¾ãŸã¯3ã«è¨­å®šã•ã‚Œãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。ã“ã®å ´åˆã€ãƒ•ã‚¡ã‚¤ãƒ«é–¢æ•°ã¯ãƒãƒƒãƒ•ã‚¡ã‚’スタックやヒープã«ç¢ºä¿ã—ã¾ã™ã€‚ãƒãƒƒãƒ•ã‚¡ãƒ»ã‚µã‚¤ã‚ºã¯ã€<tt>(_MAX_LFN + 1) * 2</tt>ãƒã‚¤ãƒˆã«ãªã‚‹ã®ã§ã€ã‚¹ã‚¿ãƒƒã‚¯ç­‰ã®ã‚µã‚¤ã‚ºã¯ãれを考慮ã—ãŸå分ãªã‚µã‚¤ã‚ºã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。</p>
+<table class="lst2 rset">
+<caption>LFN cfg on ARM7</caption>
+<tr><th>コードページ</th><th>コードサイズ[bytes]</th></tr>
+<tr><td>SBCS</td><td>+3721</td></tr>
+<tr><td>932(Shift-JIS)</td><td>+62609</td></tr>
+<tr><td>936(GBK)</td><td>+177797</td></tr>
+<tr><td>949(Korean)</td><td>+139857</td></tr>
+<tr><td>950(Big5)</td><td>+111497</td></tr>
+</table>
+<p>LFN機能ã®ä¸Šæ‰‹ãªä½¿ã„æ–¹ã¯ã€ãれを使ã‚ãªã„ã¨ã„ã†ã“ã¨ã§ã™ã€‚実際ã€çµ„ã¿è¾¼ã¿ç”¨é€”ã§ã¯LFN機能ãŒã©ã†ã—ã¦ã‚‚å¿…è¦ã«ãªã‚‹ã¨ã„ã†ã“ã¨ã¯ã»ã¨ã‚“ã©ç„¡ã„ã¯ãšã§ã™ã€‚LFNを有効ã«ã™ã‚‹ã¨ã€é¸æŠžã•ã‚ŒãŸã‚³ãƒ¼ãƒ‰ãƒ»ãƒšãƒ¼ã‚¸ã«å¿œã˜ã¦ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ãƒ»ã‚µã‚¤ã‚ºãŒå¢—大ã•ã‚Œã¾ã™ã€‚å³ã®è¡¨ã«å„コード・ページã«ãŠã‘ã‚‹LFNを有効ã«ã—ãŸã¨ãã®ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ãƒ»ã‚µã‚¤ã‚ºã®é•ã„を示ã—ã¾ã™ã€‚ç§ãŸã¡æ—¥æœ¬äººã€ä¸­å›½äººãŠã‚ˆã³éŸ“国人ã¯æ•°ä¸‡ã®æ–‡å­—ã‚’æŒã¡ã¾ã™ã€‚ä¸å¹¸ãªã“ã¨ã«ã€ãã‚Œã¯å·¨å¤§ãªOEMï¼Unicode相互変æ›ãƒ†ãƒ¼ãƒ–ルをè¦æ±‚ã—ã€ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ãƒ»ã‚µã‚¤ã‚ºã¯åŠ‡çš„ã«å¢—大ã•ã‚Œã¾ã™ã€‚ãã®çµæžœã€LFNを有効ã«ã—ãŸFatFsモジュールã¯ã€AVRã‚’å«ã‚€æ®†ã©ã®8ビット・マイコンã«ã‚¤ãƒ³ãƒ—リメントã•ã‚Œã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“。<small>ã“ã‚Œã¯é•·ã„é–“ç§ãŒLFNをインプリメントã™ã‚‹ã“ã¨ã«èˆˆå‘³ã‚’æŒã£ã¦ã“ãªã‹ã£ãŸç†ç”±ã§ã™ã€‚</small></p>
+<p>注: マイクロソフト社ã¯FATファイル・システムã«ã¤ã„ã¦ã„ãã¤ã‹ã®ç‰¹è¨±ã‚’ä¿æœ‰ã—ã¦ã„ã¾ã™ã€‚ã„ãšã‚Œã‚‚LFNã®å®Ÿè£…ã«é–¢ã™ã‚‹ã‚‚ã®ã§ã€LFN機能ã«å¯¾ã—ã¦$0.25/unitã®ãƒ©ã‚¤ã‚»ãƒ³ã‚¹æ–™ã‚’è¦æ±‚ã—ã¦ã„ã¾ã™ã€‚FAT32ã¯ç„¡é–¢ä¿‚ã§ã™ã€‚ã“ã®ãŸã‚ã€å•†ç”¨è£½å“ã§LFN機能有効ã«ã™ã‚‹ã¨ãã¯ã€æœ€çµ‚仕å‘地ã«ã‚ˆã£ã¦ã¯ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ãŒå¿…è¦ã‹ã‚‚知れã¾ã›ã‚“。</p>
+</div>
+
+<div class="para" id="jap">
+<h3>日本語ファイルåã®å¤§æ–‡å­—変æ›</h3>
+<p>CP932(Shift_JIS)ã§ã‹ã¤éžLFN構æˆã®ã¨ãã¯ã€æ‹¡å¼µæ–‡å­—ã®å°æ–‡å­—(2ãƒã‚¤ãƒˆè‹±å­—・キリル文字・ギリシャ文字)ã«å¯¾ã—ã¦å¤§æ–‡å­—変æ›ã‚’è¡Œã‚ãšã€å°æ–‡å­—ã®ã¾ã¾SFNエントリã«è¨˜éŒ²ãƒ»æ¤œç´¢ã•ã‚Œã¾ã™(日本語MSDOS仕様)。ã“ã®ãŸã‚ã€éžLFN構æˆã§å…¨è§’å°æ–‡å­—ã‚’å«ã‚€ãƒ•ã‚¡ã‚¤ãƒ«ã‚’作æˆã™ã‚‹ã¨ã€NTç³»Windowsã§ãã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’é–‹ã‘ãªããªã‚Šã¾ã™ã€‚LFN構æˆã§ã¯å¤§æ–‡å­—変æ›ã‚’è¡Œã„ã¾ã™(NTç³»Windows仕様)。</p>
+</div>
+
+<div class="para" id="unicode">
+<h3>Unicode入出力ã¸ã®å¯¾å¿œ</h3>
+<p>ファイル関数ã®ãƒ•ã‚¡ã‚¤ãƒ«å入出力ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯ ANSI/OEMコードã§ã™ãŒã€ã“れをUnicodeã«åˆ‡ã‚Šæ›¿ãˆã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚Unicodeファイルåã«é–¢ã™ã‚‹è©³ç´°ã¯ã€<a href="filename.html">ファイルå</a>ã‚’å‚ç…§ã—ã¦ãã ã•ã„。</p>
+</div>
+
+<div class="para" id="reentrant">
+<h3>リエントランシー</h3>
+<p>互ã„ã«ç•°ãªã‚‹ãƒœãƒªãƒ¥ãƒ¼ãƒ ã«å¯¾ã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«æ“作ã¯ãƒªã‚¨ãƒ³ãƒˆãƒ©ãƒ³ãƒˆã§ã€å¸¸ã«åŒæ™‚平行ã«å‹•ä½œã§ãã¾ã™ã€‚åŒã˜ãƒœãƒªãƒ¥ãƒ¼ãƒ ã«å¯¾ã—ã¦ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯ãƒªã‚¨ãƒ³ãƒˆãƒ©ãƒ³ãƒˆã§ã¯ã‚ã‚Šã¾ã›ã‚“ãŒã€<tt>_FS_REENTRANT</tt>オプションã§ãƒªã‚¨ãƒ³ãƒˆãƒ©ãƒ³ãƒˆ(スレッド・セーフ)ã«ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã™ã€‚ã“ã®å ´åˆã€OSä¾å­˜ã®åŒæœŸã‚ªãƒ–ジェクトæ“作関数<tt>ff_cre_syncobj, ff_del_syncobj, ff_req_grant</tt> 㨠<tt>ff_rel_grant</tt>ã‚‚ã¾ãŸãƒ—ロジェクトã«è¿½åŠ ã•ã‚Œãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。サンプル・コードã¨è§£èª¬ã¯<tt>option/syncobj.c</tt>ã«ã‚ã‚Šã¾ã™ã€‚</p>
+<p>ã“ã®å ´åˆã€ã‚るタスクãŒãƒœãƒªãƒ¥ãƒ¼ãƒ ã‚’使用中ã«ä»–ã®ã‚¿ã‚¹ã‚¯ã‹ã‚‰ãã®ãƒœãƒªãƒ¥ãƒ¼ãƒ ã«å¯¾ã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«é–¢æ•°ãŒå‘¼ã³å‡ºã•ã‚Œã‚‹ã¨ã€ãã®ã‚¢ã‚¯ã‚»ã‚¹ã¯å…ˆã®ã‚¿ã‚¹ã‚¯ãŒãƒ•ã‚¡ã‚¤ãƒ«é–¢æ•°ã‚’抜ã‘ã‚‹ã¾ã§ãƒ–ロックã•ã‚Œã¾ã™ã€‚ã‚‚ã—ã€å¾…ã¡æ™‚é–“ãŒ<tt>_TIMEOUT</tt>ã§æŒ‡å®šã•ã‚ŒãŸæœŸé–“を越ã™ã¨ã€ãã®é–¢æ•°ã¯<tt>FR_TIMEOUT</tt>ã§ã‚¢ãƒœãƒ¼ãƒˆã—ã¾ã™ã€‚ã„ãã¤ã‹ã®RTOSã§ã¯ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆæ©Ÿèƒ½ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œãªã„ã‹ã‚‚知れã¾ã›ã‚“。</p>
+<p>ã²ã¨ã¤ã®ä¾‹å¤–ãŒ<tt>f_mount()</tt>ã¨<tt>f_mkfs()</tt>ã«ã‚ã‚Šã¾ã™ã€‚ã“れらã®é–¢æ•°ã¯åŒã˜ãƒœãƒªãƒ¥ãƒ¼ãƒ ã«å¯¾ã—ã¦ãƒªã‚¨ãƒ³ãƒˆãƒ©ãƒ³ãƒˆã§ã¯ã‚ã‚Šã¾ã›ã‚“。ã“れらã®é–¢æ•°ã‚’使用ã™ã‚‹ã¨ãã¯ã€ã‚¢ãƒ—リケーション・レベルã§æŽ’他制御ã—ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。</p>
+<p>注: ã“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã¯FatFsモジュールãれ自体ã®ãƒªã‚¨ãƒ³ãƒˆãƒ©ãƒ³ã‚·ãƒ¼ã«ã¤ã„ã¦èª¬æ˜Žã—ã¦ã„ã¾ã™ã€‚ディスクI/Oモジュールã®ãƒªã‚¨ãƒ³ãƒˆãƒ©ãƒ³ã‚·ãƒ¼ã«é–¢ã—ã¦ã¯ä½•ã®å‰æã‚‚ã‚ã‚Šã¾ã›ã‚“。</p>
+</div>
+
+<div class="para" id="dup">
+<h3>多é‡ãƒ•ã‚¡ã‚¤ãƒ«ãƒ»ã‚¢ã‚¯ã‚»ã‚¹</h3>
+<p>FatFsモジュールã§ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯å¤šé‡ã‚¢ã‚¯ã‚»ã‚¹åˆ¶å¾¡æ©Ÿèƒ½ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã›ã‚“。ファイルã«å¯¾ã™ã‚‹å¤šé‡ã‚¢ã‚¯ã‚»ã‚¹ã¯ã€ãã®ã‚¢ã‚¯ã‚»ã‚¹ãƒ»ãƒ¢ãƒ¼ãƒ‰ã«ã‚ˆã£ã¦åˆ¶é™ã•ã‚Œã¾ã™ã€‚一ã¤ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«å¯¾ã™ã‚‹å¤šé‡ã‚ªãƒ¼ãƒ—ンã¯ã€ãれらãŒå…¨ã¦ãƒªãƒ¼ãƒ‰ãƒ»ãƒ¢ãƒ¼ãƒ‰ã®ã¨ãã«é™ã£ã¦è¨±å¯ã•ã‚Œã¾ã™ã€‚書ãè¾¼ã¿ãƒ¢ãƒ¼ãƒ‰ã‚’å«ã‚€å¤šé‡ã‚ªãƒ¼ãƒ—ンã€ã¾ãŸé–‹ã‹ã‚Œã¦ã„るファイルã«å¯¾ã™ã‚‹ãƒªãƒãƒ¼ãƒ ã‚„削除を行ã£ã¦ã¯ãªã‚Šã¾ã›ã‚“。ã•ã‚‚ãªã„ã¨ã€ãã®ãƒœãƒªãƒ¥ãƒ¼ãƒ ã®FAT構造ãŒç ´å£Šã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚</p>
+<p><tt>_FS_SHARE</tt>ã«1以上ã®å€¤(値ã¯åŒæ™‚ã«ç®¡ç†ã§ãるファイル数)をセットã™ã‚‹ã“ã¨ã§å¤šé‡ã‚¢ã‚¯ã‚»ã‚¹åˆ¶å¾¡æ©Ÿèƒ½ãŒæœ‰åŠ¹ã«ãªã‚Šã€ãƒ•ã‚¡ã‚¤ãƒ«å˜ä½ã®æŽ’他制御を自動ã§è¡Œã†ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ã“ã®å ´åˆã€ä¸Šè¨˜ã®ãƒ«ãƒ¼ãƒ«ã‚’ç ´ã£ãŸã‚ªãƒ¼ãƒ—ン・リãƒãƒ¼ãƒ ãƒ»å‰Šé™¤ã‚’試ã¿ã‚‹ã¨ã€ãã®é–¢æ•°ã¯<tt>FR_LOCKED</tt>ã§å¤±æ•—ã—ã¾ã™ã€‚<tt>_FS_SHARE</tt>を越ãˆãŸæ•°ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’オープンã—よã†ã¨ã™ã‚‹ã¨ã€<tt>FR_TOO_MANY_OPEN_FILES</tt>ã§å¤±æ•—ã—ã¾ã™ã€‚</p>
+</div>
+
+<div class="para" id="fs1">
+<h3>効率的ãªãƒ•ã‚¡ã‚¤ãƒ«ãƒ»ã‚¢ã‚¯ã‚»ã‚¹</h3>
+<p>å°è¦æ¨¡ãªçµ„込システムã§ã®ãƒ•ã‚¡ã‚¤ãƒ«ã®èª­ã¿æ›¸ãã«ãŠã‘る効率ã®è‰¯ã„アクセスã®ãŸã‚ã€ã‚¢ãƒ—リケーション・プログラマã¯FatFsモジュールã®ä¸­ã§ã©ã®ã‚ˆã†ãªå‡¦ç†ãŒè¡Œã‚ã‚Œã¦ã„ã‚‹ã‹è€ƒæ…®ã™ã¹ãã§ã™ã€‚ストレージ上ã®ãƒ‡ãƒ¼ã‚¿ã¯f_read関数ã«ã‚ˆã‚Šæ¬¡ã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã§è»¢é€ã•ã‚Œã¾ã™ã€‚</p>
+<p>図1. セクタ・ミスアラインド・リード (ショート)<br>
+<img src="../img/f1.png" width="490" height="73" alt="fig.1">
+</p>
+<p>図2. セクタ・ミスアラインド・リード (ロング)<br>
+<img src="../img/f2.png" width="490" height="140" alt="fig.2">
+</p>
+<p>図3. セクタ・アラインド・リード<br>
+<img src="../img/f3.png" width="490" height="119" alt="fig.3">
+</p>
+<p>ファイルI/Oãƒãƒƒãƒ•ã‚¡ã¯ã‚»ã‚¯ã‚¿ã®ä¸€éƒ¨ã®ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿æ›¸ãã™ã‚‹ãŸã‚ã®ã‚»ã‚¯ã‚¿ãƒ»ãƒãƒƒãƒ•ã‚¡ã‚’æ„味ã—ã¾ã™ã€‚セクタ・ãƒãƒƒãƒ•ã‚¡ã¯ã€ãã‚Œãžã‚Œã®ãƒ•ã‚¡ã‚¤ãƒ«ãƒ»ã‚ªãƒ–ジェクト内ã®ãƒ—ライベート・セクタ・ãƒãƒƒãƒ•ã‚¡ã¾ãŸã¯ãƒ•ã‚¡ã‚¤ãƒ«ãƒ»ã‚·ã‚¹ãƒ†ãƒ ãƒ»ã‚ªãƒ–ジェクト内ã®å…±æœ‰ã‚»ã‚¯ã‚¿ãƒ»ãƒãƒƒãƒ•ã‚¡ã®ã©ã¡ã‚‰ã‹ã§ã™ã€‚ãƒãƒƒãƒ•ã‚¡æ§‹æˆã‚ªãƒ—ションã®<tt>_FS_TINY</tt>ã¯ã€ãƒ‡ãƒ¼ã‚¿è»¢é€ã«ã©ã¡ã‚‰ã‚’使ã†ã‹ã‚’決定ã—ã¾ã™ã€‚タイニー・ãƒãƒƒãƒ•ã‚¡(1)ãŒé¸æŠžã•ã‚Œã‚‹ã¨ãƒ‡ãƒ¼ã‚¿ãƒ»ãƒ¡ãƒ¢ãƒªã®æ¶ˆè²»ã¯ãã‚Œãžã‚Œã®ãƒ•ã‚¡ã‚¤ãƒ«ãƒ»ã‚ªãƒ–ジェクトã§512ãƒã‚¤ãƒˆæ¸›å°‘ã•ã‚Œã¾ã™ã€‚ã“ã®å ´åˆã€FatFsモジュールã¯ãƒ•ã‚¡ã‚¤ãƒ«ãƒ»ãƒ‡ãƒ¼ã‚¿ã®è»¢é€ã¨FAT/ディレクトリ・アクセスã«ãƒ•ã‚¡ã‚¤ãƒ«ãƒ»ã‚·ã‚¹ãƒ†ãƒ ãƒ»ã‚ªãƒ–ジェクト内ã®ã‚»ã‚¯ã‚¿ãƒ»ãƒãƒƒãƒ•ã‚¡ã ã‘を使用ã—ã¾ã™ã€‚タイニー・ãƒãƒƒãƒ•ã‚¡ã®æ¬ ç‚¹ã¯ã€ã‚»ã‚¯ã‚¿ãƒ»ãƒãƒƒãƒ•ã‚¡ã«ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã•ã‚ŒãŸFATデータãŒãƒ•ã‚¡ã‚¤ãƒ«ãƒ»ãƒ‡ãƒ¼ã‚¿ã®è»¢é€ã«ã‚ˆã‚Šå¤±ã‚ã‚Œã€ã‚¯ãƒ©ã‚¹ã‚¿å¢ƒç•Œã®æ¯Žã«ãƒªãƒ­ãƒ¼ãƒ‰ã•ã‚Œãªã‘ã‚Œã°ãªã‚‰ãªã„ã“ã¨ã§ã™ã€‚ã§ã‚‚ã€æ‚ªããªã„性能ã¨å°‘ãªã„メモリ消費ã®è¦–点ã‹ã‚‰å¤šãã®ã‚¢ãƒ—リケーションã«é©ã™ã‚‹ã§ã—ょã†ã€‚</p>
+<p>図1ã¯ã‚»ã‚¯ã‚¿ã®ä¸€éƒ¨ã®ãƒ‡ãƒ¼ã‚¿ãŒãƒ•ã‚¡ã‚¤ãƒ«I/Oãƒãƒƒãƒ•ã‚¡ã‚’経由ã§è»¢é€ã•ã‚Œã‚‹ã“ã¨ã‚’示ã—ã¾ã™ã€‚図2ã«ç¤ºã•ã‚Œã‚‹é•·ã„データã®è»¢é€ã§ã¯ã€è»¢é€ãƒ‡ãƒ¼ã‚¿ã®ä¸­é–“ã®1セクタã¾ãŸã¯ãれ以上ã®ã‚»ã‚¯ã‚¿ã«ã¾ãŸãŒã‚‹è»¢é€ãƒ‡ãƒ¼ã‚¿ãŒã‚¢ãƒ—リケーション・ãƒãƒƒãƒ•ã‚¡ã«ç›´æŽ¥è»¢é€ã•ã‚Œã¦ã„ã¾ã™ã€‚図3ã¯è»¢é€ãƒ‡ãƒ¼ã‚¿å…¨ä½“ãŒã‚»ã‚¯ã‚¿å¢ƒç•Œã«ã‚¢ãƒ©ã‚¤ãƒ¡ãƒ³ãƒˆã•ã‚Œã¦ã„ã‚‹å ´åˆã‚’示ã—ã¦ã„ã¾ã™ã€‚ã“ã®å ´åˆã€ãƒ•ã‚¡ã‚¤ãƒ«I/Oãƒãƒƒãƒ•ã‚¡ã¯ä½¿ç”¨ã•ã‚Œã¾ã›ã‚“。直接転é€ã«ãŠã„ã¦ã¯æœ€å¤§ã®ç¯„囲ã®ã‚»ã‚¯ã‚¿ãŒdisk_read関数ã§ä¸€åº¦ã«èª­ã¿è¾¼ã¾ã‚Œã¾ã™ãŒã€ã‚¯ãƒ©ã‚¹ã‚¿å¢ƒç•Œã‚’越ãˆã‚‹ãƒžãƒ«ãƒãƒ»ã‚»ã‚¯ã‚¿è»¢é€ã¯ãã‚ŒãŒéš£æŽ¥ã§ã‚ã£ã¦ã‚‚è¡Œã‚ã‚Œã¾ã›ã‚“。</p>
+<p>ã“ã®ã‚ˆã†ã«ã€ã‚»ã‚¯ã‚¿ã«ã‚¢ãƒ©ã‚¤ãƒ¡ãƒ³ãƒˆã—ãŸãƒ•ã‚¡ã‚¤ãƒ«ã®èª­ã¿æ›¸ãã¸ã®é…æ…®ã¯ãƒãƒƒãƒ•ã‚¡çµŒç”±ã®ãƒ‡ãƒ¼ã‚¿è»¢é€ã‚’é¿ã‘ã€èª­ã¿æ›¸ã性能ã¯æ”¹å–„ã•ã‚Œã‚‹ã§ã—ょã†ã€‚ãã®åŠ¹æžœã«åŠ ãˆã€ã‚¿ã‚¤ãƒ‹ãƒ¼æ§‹æˆã§ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã•ã‚ŒãŸFATデータãŒãƒ•ã‚¡ã‚¤ãƒ«ãƒ»ãƒ‡ãƒ¼ã‚¿ã®è»¢é€ã«ã‚ˆã‚Šãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã•ã‚Œãšã€éžã‚¿ã‚¤ãƒ‹ãƒ¼æ§‹æˆã¨åŒã˜æ€§èƒ½ã‚’å°ã•ãªãƒ¡ãƒ¢ãƒªãƒ»ãƒ•ãƒƒãƒˆãƒ—リントã§é”æˆã§ãã¾ã™ã€‚</p>
+</div>
+
+<div class="para" id="fs2">
+<h3>フラッシュ・メモリã®ç‰¹æ€§ã¸ã®é…æ…®</h3>
+<p>HDDãªã©ã®ãƒ‡ã‚£ã‚¹ã‚¯ãƒ»ãƒ¡ãƒ‡ã‚£ã‚¢ã¨ã¯ç•°ãªã‚Šã€SDCã‚„CFCãªã©ã®ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ãƒ»ãƒ¡ãƒ¢ãƒªãƒ»ãƒ¡ãƒ‡ã‚£ã‚¢ã®æ€§èƒ½ã‚’引ã出ã™ã«ã¯ã€ãã®ç‰¹æ€§ã‚’æ„è­˜ã—ãŸåˆ¶å¾¡ãŒå¿…è¦ã«ãªã‚Šã¾ã™ã€‚</p>
+<h4>マルãƒãƒ»ã‚»ã‚¯ã‚¿æ›¸ãè¾¼ã¿</h4>
+<div class="rset">
+図6. マルãƒ/シングル・セクタ・ライトã®æ¯”較<br>
+<img src="../img/f6.png" width="630" height="148" alt="fig.6">
+</div>
+<p>フラッシュ・メモリ・メディアã®æ›¸ãè¾¼ã¿é€Ÿåº¦ã¯ã‚·ãƒ³ã‚°ãƒ«ãƒ»ã‚»ã‚¯ã‚¿æ›¸ãè¾¼ã¿ã®æ™‚ã«æœ€ã‚‚低ã„ã‚‚ã®ã«ãªã‚Šã€ä¸€å›žã®ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã§è»¢é€ã•ã‚Œã‚‹ã‚»ã‚¯ã‚¿æ•°ãŒå¤§ãããªã‚‹ã»ã©æ›¸ãè¾¼ã¿é€Ÿåº¦ã¯å‘上ã—ã¾ã™ã€‚ã“ã®åŠ¹æžœã¯ãƒã‚¹é€Ÿåº¦ãŒé«˜é€Ÿã«ãªã‚‹ã»ã©é¡•è‘—ã§ã€10å€ä»¥ä¸Šã®å·®ãŒç¾ã‚Œã‚‹ã“ã¨ã‚‚çã—ãã‚ã‚Šã¾ã›ã‚“。書ãè¾¼ã¿ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã®å›žæ•°ã¯ã¾ãŸã€ãƒ¡ãƒ‡ã‚£ã‚¢ã®å¯¿å‘½ã«ã‚‚影響ã—ã¦ãã¾ã™ã€‚ã“ã®ãŸã‚ã€ã‚¢ãƒ—リケーションã¯ãªã‚‹ã¹ã大ããªãƒ–ロック(クラスタ・サイズã¾ãŸã¯2ã®ç´¯ä¹—セクタ境界ã«ã‚¢ãƒ©ã‚¤ãƒ¡ãƒ³ãƒˆã—ãŸ)ã§èª­ã¿æ›¸ãã‚’è¡Œã†å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã‚‚ã¡ã‚ã‚“ã€ã‚¢ãƒ—リケーションã‹ã‚‰ãƒ¡ãƒ‡ã‚£ã‚¢ã«è‡³ã‚‹å…¨ã¦ã®ãƒ¬ã‚¤ãƒ¤ãŒãƒžãƒ«ãƒãƒ»ã‚»ã‚¯ã‚¿è»¢é€ã«å¯¾å¿œã—ã¦ã„ãªã„ã¨æ„味ãŒã‚ã‚Šã¾ã›ã‚“。残念ãªãŒã‚‰ã€æ—¢å­˜ã®ã‚ªãƒ¼ãƒ—ン・ソースã®ãƒ‰ãƒ©ã‚¤ãƒã®å¤šãã¯ãƒžãƒ«ãƒãƒ»ã‚»ã‚¯ã‚¿è»¢é€ã«æœªå¯¾å¿œã§ã™ã€‚ãªãŠã€FatFsモジュールãŠã‚ˆã³ãれ用ã®ã‚µãƒ³ãƒ—ル・ドライãƒã¯ãƒžãƒ«ãƒãƒ»ã‚»ã‚¯ã‚¿è»¢é€ã«å¯¾å¿œã—ã¦ã„ã¾ã™ã€‚</p>
+<h4>明示的ãªãƒ¡ãƒ¢ãƒªæ¶ˆåŽ»</h4>
+<p>通常ã®ãƒ•ã‚¡ã‚¤ãƒ«æ¶ˆåŽ»ã§ã¯ã€è¨˜éŒ²ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã«å¯¾ã—ã¦ä½•ã‚‰ã‹ã®åˆ¶å¾¡ãŒè¡Œã‚れるã‚ã‘ã§ã¯ãªãã€å˜ã«FAT上ã«æœªä½¿ç”¨ã‚¯ãƒ©ã‚¹ã‚¿ã¨ã—ã¦è¨˜éŒ²ã•ã‚Œã¦ã„ã‚‹ã ã‘ã§ã™ã€‚ã“ã®ãŸã‚ã€ãƒ•ã‚¡ã‚¤ãƒ«ãŒæ¶ˆåŽ»ã•ã‚ŒãŸã‚ã¨ã‚‚ãれらã¯æœ‰åŠ¹ãªãƒ¡ãƒ¢ãƒªãƒ»ãƒ–ロックã¨ã—ã¦ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ãƒ»ãƒ¡ãƒ¢ãƒªä¸Šã«æ®‹ã‚Šã¾ã™ã€‚ãã“ã§ã€ãƒ•ã‚¡ã‚¤ãƒ«ã‚’消去ã™ã‚‹ã¨ãã€å æœ‰ã—ã¦ã„ãŸãƒ‡ãƒ¼ã‚¿ãƒ»ã‚»ã‚¯ã‚¿ã‚’明示的ã«æ¶ˆåŽ»(ã¤ã¾ã‚Šæœªä½¿ç”¨ãƒ–ロックã«ã™ã‚‹)ã™ã‚‹ã“ã¨ã«ã‚ˆã‚Šã€ãƒ¡ãƒ‡ã‚£ã‚¢å†…ã®ç©ºãブロックを増やã™ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€æ¬¡ã«ãã®ãƒ–ロックã«æ›¸ã込むã¨ãã®æ¶ˆåŽ»å‹•ä½œãŒç„¡ããªã‚Šã€æ›¸ãè¾¼ã¿æ€§èƒ½ãŒå‘上ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã¾ãŸã€ã‚¦ã‚§ã‚¢ãƒ¬ãƒ™ãƒªãƒ³ã‚°ã«ä½¿ãˆã‚‹ãƒ–ロックãŒå¢—ãˆã€ãƒ¡ãƒ‡ã‚£ã‚¢ã®è€ä¹…性もå‘上ã™ã‚‹ã‹ã‚‚知れã¾ã›ã‚“。ã“ã®æ©Ÿèƒ½ã‚’有効ã«ã™ã‚‹ã«ã¯ã€æ§‹æˆã‚ªãƒ—ションã®<tt>_USE_ERASE</tt>ã«1を設定ã—ã¾ã™ã€‚ã“ã‚Œã¯ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ãƒ»ãƒ¡ãƒ¢ãƒªãƒ»ãƒ¡ãƒ‡ã‚£ã‚¢ã®å†…部動作ã«æœŸå¾…ã—ãŸåˆ¶å¾¡ãªã®ã§ã€åŠ¹æžœãŒã‚ã‚‹ã¨ã¯é™ã‚Šã¾ã›ã‚“。ã¾ãŸã€ãƒ•ã‚¡ã‚¤ãƒ«æ¶ˆåŽ»ã®æ™‚é–“ãŒå»¶ã³ã‚‹ã“ã¨ã‚‚考慮ã«å…¥ã‚Œã‚‹ã¹ãã§ã™ã€‚</p>
+</div>
+
+<div class="para" id="critical">
+<h3>クリãƒã‚«ãƒ«ãƒ»ã‚»ã‚¯ã‚·ãƒ§ãƒ³</h3>
+<p>ストレージ上ã®FAT構造をæ“作ã—ã¦ã„る途中ã§ã€åœé›»ã€ä¸æ­£ãªãƒ¡ãƒ‡ã‚£ã‚¢ã®å–り外ã—ã€å›žå¾©ä¸èƒ½ãªãƒ‡ãƒ¼ã‚¿ãƒ»ã‚¨ãƒ©ãƒ¼ç­‰ã®éšœå®³ãŒç™ºç”Ÿã™ã‚‹ã¨ã€å‡¦ç†ãŒä¸­é€”åŠç«¯ãªçŠ¶æ…‹ã§ä¸­æ–­ã•ã‚Œã€ãã®çµæžœã¨ã—ã¦FAT構造ãŒç ´å£Šã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚次ã«FatFsモジュールã«ãŠã‘るクリãƒã‚«ãƒ«ãƒ»ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã¨ã€ãã®é–“ã®éšœå®³ã«ã‚ˆã‚Šèµ·ãã†ã‚‹ã‚¨ãƒ©ãƒ¼ã®çŠ¶æ…‹ã‚’示ã—ã¾ã™ã€‚</p>
+<div class="lset">
+図4. é•·ã„クリãƒã‚«ãƒ«ãƒ»ã‚»ã‚¯ã‚·ãƒ§ãƒ³<br>
+<img src="../img/f4.png" width="320" height="436" alt="fig.4">
+</div>
+<div class="lset">
+図5. 最å°åŒ–ã—ãŸã‚¯ãƒªãƒã‚«ãƒ«ãƒ»ã‚»ã‚¯ã‚·ãƒ§ãƒ³<br>
+<img src="../img/f5.png" width="320" height="436" alt="fig.5">
+</div>
+<br class="clr">
+<p>赤ã§ç¤ºã—ãŸã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’実行中ã«éšœå®³ãŒç™ºç”Ÿã—ãŸå ´åˆã€ã‚¯ãƒ­ã‚¹ãƒ»ãƒªãƒ³ã‚¯ãŒç™ºç”Ÿã—ã¦æ“作対象ã®ãƒ•ã‚¡ã‚¤ãƒ«ãƒ»ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªãŒå¤±ã‚れるå¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚黄色ã§ç¤ºã—ãŸã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’実行中ã«éšœå®³ãŒç™ºç”Ÿã—ãŸå ´åˆã€ã¤ãŽã®ã†ã¡ã„ãšã‚Œã‹ã¾ãŸã¯è¤‡æ•°ã®çµæžœãŒç”Ÿã˜ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚</p>
+<ul>
+<li>書ãæ›ãˆä¸­ã®ãƒ•ã‚¡ã‚¤ãƒ«ã®ãƒ‡ãƒ¼ã‚¿ãŒç ´å£Šã•ã‚Œã‚‹ã€‚</li>
+<li>追記中ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒã‚ªãƒ¼ãƒ—ンå‰ã®çŠ¶æ…‹ã«æˆ»ã‚‹ã€‚</li>
+<li>æ–°è¦ã«ä½œæˆã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ãŒæ¶ˆãˆã‚‹ã€‚</li>
+<li>æ–°è¦ã¾ãŸã¯ä¸Šæ›¸ãã§ä½œæˆã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã®é•·ã•ãŒã‚¼ãƒ­ã«ãªã£ã¦æ®‹ã‚‹ã€‚</li>
+<li>ロストãƒã‚§ãƒ¼ãƒ³ã®ç™ºç”Ÿã«ã‚ˆã‚Šãƒœãƒªãƒ¥ãƒ¼ãƒ ã®åˆ©ç”¨åŠ¹çŽ‡ãŒæ‚ªåŒ–ã™ã‚‹ã€‚</li>
+</ul>
+<p>ã„ãšã‚Œã‚‚書ãè¾¼ã¿ä¸­ã‚„æ“作対象ã§ãªã„ファイルã«ã¯å½±éŸ¿ã¯ã‚ã‚Šã¾ã›ã‚“。ã“れらã®ã‚¯ãƒªãƒã‚«ãƒ«ãƒ»ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã¯ã€ãƒ•ã‚¡ã‚¤ãƒ«ã‚’書ãè¾¼ã¿ãƒ¢ãƒ¼ãƒ‰ã§é–‹ã„ã¦ã„る時間を最å°é™ã«ã™ã‚‹ã‹ã€f_sync()ã‚’é©å®œä½¿ç”¨ã™ã‚‹ã“ã¨ã§å›³5ã®ã‚ˆã†ã«ãƒªã‚¹ã‚¯ã‚’最å°åŒ–ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚</p>
+</div>
+
+<div class="para" id="license">
+<h3>FatFsã®ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ã«ã¤ã„ã¦</h3>
+<p>ソース・ファイルã®ãƒ˜ãƒƒãƒ€ã«ãƒ©ã‚¤ã‚»ãƒ³ã‚¹æ¡ä»¶ãŒè¨˜è¿°ã•ã‚Œã¦ã„ã‚‹ã®ã§ã€åˆ©ç”¨ã®éš›ã¯ãã‚Œã«å¾“ã†ã“ã¨ã€‚英語を読ã‚ãªã„æ–¹ã®ãŸã‚ã«ä»¥ä¸‹ã«æ—¥æœ¬èªžè¨³ã‚’示ã—ã¦ãŠãã¾ã™ã€‚</p>
+<pre>/*----------------------------------------------------------------------------/
+/ FatFs - FAT file system module R0.08b (C)ChaN, 2011
+/-----------------------------------------------------------------------------/
+/ FatFsモジュールã¯ã€å°è¦æ¨¡ãªçµ„ã¿è¾¼ã¿ã‚·ã‚¹ãƒ†ãƒ å‘ã‘ã®æ±Žç”¨FATファイルシステム・
+/ モジュールã§ã™ã€‚ã“ã‚Œã¯ãƒ•ãƒªãƒ¼ãƒ»ã‚½ãƒ•ãƒˆã‚¦ã‚§ã‚¢ã¨ã—ã¦ã€æ•™è‚²ãƒ»ç ”究・開発ã®ãŸã‚ã«
+/ 以下ã®ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ãƒ»ãƒãƒªã‚·ãƒ¼ã®ä¸‹ã§å…¬é–‹ã•ã‚Œã¦ã„ã¾ã™ã€‚
+/
+/ Copyright (C) 2011, ChaN, all right reserved.
+/
+/ * FatFsモジュールã¯ãƒ•ãƒªãƒ¼ãƒ»ã‚½ãƒ•ãƒˆã‚¦ã‚§ã‚¢ã§ã‚ã‚Šã€ã¾ãŸ<em>ç„¡ä¿è¨¼ã§ã™</em>。
+/ * 用途ã«åˆ¶é™ã¯ã‚ã‚Šã¾ã›ã‚“。<em>ã‚ãªãŸã®è²¬ä»»ã®ä¸‹ã«ãŠã„ã¦</em>ã€å€‹äººçš„・éžå–¶åˆ©çš„ãª
+/ ã‚‚ã®ã‹ã‚‰å•†ç”¨è£½å“ã®é–‹ç™ºã«åŠã¶ç›®çš„ã«ä½¿ç”¨ãƒ»æ”¹å¤‰ãƒ»å†é…布ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚
+/ * ソース・コードをå†é…布ã™ã‚‹ã¨ãã¯ã€ä¸Šè¨˜ã®è‘—作権表示をä¿æŒã—ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。
+/
+/-----------------------------------------------------------------------------/</pre>
+<p>è¦ã™ã‚‹ã«FatFsã¯ã‚¿ãƒ€ã§è‡ªç”±ã«ä½¿ãˆã‚‹ã¨ã„ã†ã“ã¨ã§ã™ã€‚ソース・コードをå†é…布ã™ã‚‹ã¨ãã¯ã€ã“ã®ãƒ–ロックをãã®ã¾ã¾ä¿æŒã—ã¦ãŠãã“ã¨ã€‚ã“ã®ã‚ˆã†ã«FatFsã¯BSDライクãªãƒ©ã‚¤ã‚»ãƒ³ã‚¹ã¨ã—ã¦ã„ã¾ã™ãŒã€ä¸€ã¤å¤§ããªé•ã„ãŒã‚ã‚Šã¾ã™ã€‚特ã«çµ„ã¿è¾¼ã¿ç”¨é€”ã§ã®åˆ©ç”¨ä¾¡å€¤ã‚’高ã‚ã‚‹ãŸã‚ã€ãƒã‚¤ãƒŠãƒªå½¢å¼(ソース・コードをå«ã¾ãªã„å½¢å¼å…¨ã¦)ã§ã®å†é…布ã«ã¤ã„ã¦ã¯ã€æ¡ä»¶ã¯è¨­ã‘ã¦ã„ã¾ã›ã‚“。ãã®å ´åˆã¯ã€FatFsãŠã‚ˆã³ãã®ãƒ©ã‚¤ã‚»ãƒ³ã‚¹æ–‡æ›¸ã«ã¤ã„ã¦ã¯ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã«æ˜Žè¨˜ã—ã¦ã‚‚ã—ãªãã¦ã‚‚ã‹ã¾ã„ã¾ã›ã‚“。もã¡ã‚ã‚“GNU GPLプロジェクトã¨ã‚‚共存å¯èƒ½ã§ã™ã€‚何らã‹ã®å¤‰æ›´ã‚’加ãˆã¦å†é…布ã™ã‚‹éš›ã¯ã€çŸ›ç›¾ã—ãªã„ä»–ã®ãƒ©ã‚¤ã‚»ãƒ³ã‚¹(GNU GPLã‚„BSDライセンスãªã©)ã«å¤‰æ›´ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚</p>
+</div>
+
+<p class="foot"><a href="../00index_j.html">戻る</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/chdir.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/chdir.html
new file mode 100644
index 0000000..d3c1768
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/chdir.html
@@ -0,0 +1,92 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_j.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/chdir.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_chdir</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_chdir</h2>
+<p>ƒJƒŒƒ“ƒgEƒfƒBƒŒƒNƒgƒŠ‚ð•ÏX‚µ‚Ü‚·B</p>
+<pre>
+FRESULT f_chdir (
+ const XCHAR* <em>Path</em> <span class="c">/* ƒfƒBƒŒƒNƒgƒŠ–¼‚ւ̃|ƒCƒ“ƒ^ */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>ˆø”</h4>
+<dl class="par">
+<dt>Path</dt>
+<dd>ˆÚ“®‘Îۂ̃fƒBƒŒƒNƒgƒŠ‚Ì<a href="filename.html">ƒpƒX–¼</a>‚Ì“ü‚Á‚½<tt>'\0'</tt>‚ÅI‚í‚镶Žš—ñ‚ðŽw’肵‚Ü‚·B</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>–ß‚è’l</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>³íI—¹B</dd>
+<dt>FR_NO_FILE</dt>
+<dd>ƒtƒ@ƒCƒ‹‚ªŒ©‚‚©‚ç‚È‚¢B</dd>
+<dt>FR_NO_PATH</dt>
+<dd>ƒpƒX‚ªŒ©‚‚©‚ç‚È‚¢B</dd>
+<dt>FR_INVALID_NAME</dt>
+<dd>ƒpƒX–¼‚ª•s³B</dd>
+<dt>FR_INVALID_DRIVE</dt>
+<dd>ƒhƒ‰ƒCƒu”Ô†‚ª•s³B</dd>
+<dt>FR_NOT_READY</dt>
+<dd>ƒƒfƒBƒA‚ªƒZƒbƒg‚³‚ê‚Ä‚¢‚È‚¢‚È‚ÇA•¨—ƒhƒ‰ƒCƒu‚ª“®ì•s”\ó‘ÔB</dd>
+<dt>FR_WRITE_PROTECTED</dt>
+<dd>ƒƒfƒBƒA‚ª‘‚«ž‚Ý‹ÖŽ~ó‘ÔB</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>ƒfƒBƒXƒNEƒGƒ‰[‚É‚æ‚鎸”sB</dd>
+<dt>FR_INT_ERR</dt>
+<dd>•s³‚ÈFAT\‘¢‚Ü‚½‚Í“à•”ƒGƒ‰[‚É‚æ‚鎸”sB</dd>
+<dt>FR_NOT_ENABLED</dt>
+<dd>‚»‚̘_—ƒhƒ‰ƒCƒu‚Ƀ[ƒNEƒGƒŠƒA‚ª—^‚¦‚ç‚ê‚Ä‚¢‚È‚¢B</dd>
+<dt>FR_NO_FILESYSTEM</dt>
+<dd>—LŒø‚ÈFATƒ{ƒŠƒ…[ƒ€‚ªŒ©‚‚©‚ç‚È‚¢B</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>‰ðà</h4>
+<p>f_chdirŠÖ”‚ÍŠeƒ{ƒŠƒ…[ƒ€‚̃JƒŒƒ“ƒgEƒfƒBƒŒƒNƒgƒŠ‚ð•ÏX‚µ‚Ü‚·BƒJƒŒƒ“ƒgEƒfƒBƒŒƒNƒgƒŠ‚̓tƒ@ƒCƒ‹EƒVƒXƒeƒ€EƒIƒuƒWƒFƒNƒg‚̉Šú‰»‚ªs‚í‚ꂽ‚Æ‚«Aƒ‹[ƒgEƒfƒBƒŒƒNƒgƒŠ‚Éݒ肳‚ê‚Ü‚·BƒJƒŒƒ“ƒgEƒfƒBƒŒƒNƒgƒŠ‚ÍAƒtƒ@ƒCƒ‹EƒVƒXƒeƒ€EƒIƒuƒWƒFƒNƒg‚É‹L˜^‚³‚ê‚邽‚ßA‚»‚̃{ƒŠƒ…[ƒ€‚ðŽg—p‚·‚é‘S‚Ẵ^ƒXƒN‚ɑ΂µ‚ĉe‹¿‚ð—^‚¦‚Ü‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>‘Ήžî•ñ</h4>
+<p><tt>_FS_RPATH == 1</tt>‚Ì‚Æ‚«‚ÉŽg—p‰Â”\‚Æ‚È‚è‚Ü‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>Žg—p—á</h4>
+<pre>
+ // ƒJƒŒƒ“ƒgEƒhƒ‰ƒCƒu‚̃JƒŒƒ“ƒgEƒfƒBƒŒƒNƒgƒŠ‚ð•ÏX (ƒ‹[ƒg‰º‚Ìdir1‚Ö)
+ f_chdir("/dir1");
+
+ // ƒhƒ‰ƒCƒu2‚̃JƒŒƒ“ƒgEƒfƒBƒŒƒNƒgƒŠ‚ð•ÏX (eƒfƒBƒŒƒNƒgƒŠ‚Ö)
+ f_chdir("2:..");
+</pre>
+</div>
+
+<div class="para">
+<h4>ŽQÆ</h4>
+<p><tt><a href="chdrive.html">f_chdrive</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_j.html">–ß‚é</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/chdrive.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/chdrive.html
new file mode 100644
index 0000000..4558c93
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/chdrive.html
@@ -0,0 +1,63 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_j.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/chdrive.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_chdrive</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_chdrive</h2>
+<p>ƒJƒŒƒ“ƒgEƒhƒ‰ƒCƒu‚ð•ÏX‚µ‚Ü‚·B</p>
+<pre>
+FRESULT f_chdrive (
+ BYTE <em>Drive</em> <span class="c">/* ˜_—ƒhƒ‰ƒCƒu”Ô† */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>ˆø”</h4>
+<dl class="par">
+<dt>Drive</dt>
+<dd>ƒJƒŒƒ“ƒgEƒhƒ‰ƒCƒu‚ÉÝ’è‚·‚é<a href="filename.html">˜_—ƒhƒ‰ƒCƒu”Ô†</a>‚ðŽw’肵‚Ü‚·B</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>–ß‚è’l</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>³íI—¹B</dd>
+<dt>FR_INVALID_DRIVE</dt>
+<dd>ƒhƒ‰ƒCƒu”Ô†‚ª•s³B</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>‰ðà</h4>
+<p>f_chdriveŠÖ”‚̓JƒŒƒ“ƒgEƒhƒ‰ƒCƒu‚ð•ÏX‚µ‚Ü‚·BƒVƒXƒeƒ€‹N“®Žž‚̉Šú’l‚Í0‚Å‚·B‚±‚ÌÝ’è‚ÍFatFsƒ‚ƒWƒ…[ƒ‹‚ÌÓI•Ï”‚É‹L˜^‚³‚ê‚邽‚ßA‘S‚Ẵ^ƒXƒN‚ɑ΂µ‚ĉe‹¿‚ð—^‚¦‚Ü‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>‘Ήžî•ñ</h4>
+<p><tt>_FS_RPATH == 1</tt>‚Ì‚Æ‚«‚ÉŽg—p‰Â”\‚Æ‚È‚è‚Ü‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>ŽQÆ</h4>
+<p><tt><a href="chdir.html">f_chdir</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_j.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/chmod.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/chmod.html
new file mode 100644
index 0000000..dd097f8
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/chmod.html
@@ -0,0 +1,98 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_j.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/chmod.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_chmod</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_chmod</h2>
+<p>ƒtƒ@ƒCƒ‹‚Ü‚½‚̓fƒBƒŒƒNƒgƒŠ‚Ì‘®«‚ð•ÏX‚µ‚Ü‚·B</p>
+<pre>
+FRESULT f_chmod (
+ const TCHAR* <em>FileName</em>, <span class="c">/* ƒtƒ@ƒCƒ‹‚Ü‚½‚̓fƒBƒŒƒNƒgƒŠ–¼‚ւ̃|ƒCƒ“ƒ^ */</span>
+ BYTE <em>Attribute</em>, <span class="c">/* Ý’è’l */</span>
+ BYTE <em>AttributeMask</em> <span class="c">/* •ÏXƒ}ƒXƒN */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>ˆø”</h4>
+<dl class="par">
+<dt>FileName</dt>
+<dd>‘®«•ÏX‘Îۂ̃tƒ@ƒCƒ‹‚Ü‚½‚̓fƒBƒŒƒNƒgƒŠ‚Ì<a href="filename.html">ƒpƒX–¼</a>‚Ì“ü‚Á‚½<tt>'\0'</tt>‚ÅI‚í‚镶Žš—ñ‚ðŽw’肵‚Ü‚·B</dd>
+<dt>Attribute</dt>
+<dd>Ý’è‚·‚é‘®«BŽw’è‰Â”\‚È‘®«‚ÍŽŸ‚Ì’Ê‚è‚ÅA‚±‚ê‚ç‚Ì‘g‚݇‚킹‚ÅŽw’肵‚Ü‚·BŽw’肳‚ê‚È‚©‚Á‚½‘®«‚͉𜂳‚ê‚Ü‚·B<br>
+<table class="lst">
+<tr><th>’l</th><th>ˆÓ–¡</th></tr>
+<tr><td>AM_RDO</td><td>ƒŠ[ƒhEƒIƒ“ƒŠ[</td></tr>
+<tr><td>AM_ARC</td><td>ƒA[ƒJƒCƒu</td></tr>
+<tr><td>AM_SYS</td><td>ƒVƒXƒeƒ€</td></tr>
+<tr><td>AM_HID</td><td>ƒqƒhƒDƒ“</td></tr>
+</table>
+</dd>
+<dt>AttributeMask</dt>
+<dd>•ÏX‚·‚é‘®«‚̃}ƒXƒNBŽw’肵‚½‘®«‚ªÝ’è‚Ü‚½‚͉𜂳‚êAŽw’肳‚ê‚È‚©‚Á‚½‘®«‚Íó‘Ô‚ª•ÛŽ‚³‚ê‚Ü‚·B<tt>Attribute</tt>‚Æ“¯‚¶’l‚ðŽg‚¢‚Ü‚·B</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>–ß‚è’l</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>³íI—¹B</dd>
+<dt>FR_NO_FILE</dt>
+<dd>ƒtƒ@ƒCƒ‹‚ªŒ©‚‚©‚ç‚È‚¢B</dd>
+<dt>FR_NO_PATH</dt>
+<dd>ƒpƒX‚ªŒ©‚‚©‚ç‚È‚¢B</dd>
+<dt>FR_INVALID_NAME</dt>
+<dd>ƒpƒX–¼‚ª•s³B</dd>
+<dt>FR_INVALID_DRIVE</dt>
+<dd>ƒhƒ‰ƒCƒu”Ô†‚ª•s³B</dd>
+<dt>FR_NOT_READY</dt>
+<dd>ƒƒfƒBƒA‚ªƒZƒbƒg‚³‚ê‚Ä‚¢‚È‚¢‚È‚ÇA•¨—ƒhƒ‰ƒCƒu‚ª“®ì•s”\ó‘ÔB</dd>
+<dt>FR_WRITE_PROTECTED</dt>
+<dd>ƒƒfƒBƒA‚ª‘‚«ž‚Ý‹ÖŽ~ó‘ÔB</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>ƒfƒBƒXƒNEƒGƒ‰[‚É‚æ‚鎸”sB</dd>
+<dt>FR_INT_ERR</dt>
+<dd>•s³‚ÈFAT\‘¢‚Ü‚½‚Í“à•”ƒGƒ‰[‚É‚æ‚鎸”sB</dd>
+<dt>FR_NOT_ENABLED</dt>
+<dd>‚»‚̘_—ƒhƒ‰ƒCƒu‚Ƀ[ƒNEƒGƒŠƒA‚ª—^‚¦‚ç‚ê‚Ä‚¢‚È‚¢B</dd>
+<dt>FR_NO_FILESYSTEM</dt>
+<dd>—LŒø‚ÈFATƒ{ƒŠƒ…[ƒ€‚ªŒ©‚‚©‚ç‚È‚¢B</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>‰ðà</h4>
+<p>ƒtƒ@ƒCƒ‹‚Ü‚½‚̓fƒBƒŒƒNƒgƒŠ‚Ì‘®«‚ð•ÏX‚µ‚Ü‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>‘Ήžî•ñ</h4>
+<p><tt>_FS_READONLY == 0</tt>‚ÅAŠŽ‚Â<tt>_FS_MINIMIZE == 0</tt>‚Ì‚Æ‚«Žg—p‰Â”\‚Å‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>Žg—p—á</h4>
+<pre>
+ <span class="c">/* ƒŠ[ƒhƒIƒ“ƒŠ[‚ðƒZƒbƒgAƒA[ƒJƒCƒu‚ðƒNƒŠƒAA‚»‚Ì‘¼‚Í•ÏX‚µ‚È‚¢ */</span>
+ f_chmod("file.txt", AM_RDO, AM_RDO | AM_ARC);
+</pre>
+</div>
+
+<p class="foot"><a href="../00index_j.html">–ß‚é</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/close.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/close.html
new file mode 100644
index 0000000..8605b17
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/close.html
@@ -0,0 +1,69 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_j.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/close.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_close</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_close</h2>
+<p>ƒtƒ@ƒCƒ‹‚ð•Â‚¶‚Ü‚·B</p>
+<pre>
+FRESULT f_close (
+ FIL* <em>FileObject</em> <span class="c">/* ƒtƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒg‚ւ̃|ƒCƒ“ƒ^ */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>ˆø”</h4>
+<dl class="par">
+<dt>FileObject</dt>
+<dd>•Â‚¶‚悤‚Æ‚·‚éƒtƒ@ƒCƒ‹‚̃tƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒg\‘¢‘̂ւ̃|ƒCƒ“ƒ^‚ðŽw’肵‚Ü‚·B</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>–ß‚è’l</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>³íI—¹B</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>ƒfƒBƒXƒNEƒGƒ‰[‚É‚æ‚鎸”sB</dd>
+<dt>FR_INT_ERR</dt>
+<dd>•s³‚ÈFAT\‘¢‚Ü‚½‚Í“à•”ƒGƒ‰[‚É‚æ‚鎸”sB</dd>
+<dt>FR_NOT_READY</dt>
+<dd>ƒƒfƒBƒA‚ªƒZƒbƒg‚³‚ê‚Ä‚¢‚È‚¢‚È‚ÇA•¨—ƒhƒ‰ƒCƒu‚ª“®ì•s”\ó‘ÔB</dd>
+<dt>FR_INVALID_OBJECT</dt>
+<dd>–³Œø‚ȃtƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒgB</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>‰ðà</h4>
+<p>ƒtƒ@ƒCƒ‹‚ð•Â‚¶‚Ü‚·B‰½‚ç‚©‚Ì‘‚«ž‚Ý‚Ìs‚í‚ꂽƒtƒ@ƒCƒ‹‚Ìê‡AƒLƒƒƒbƒVƒ…‚³‚ꂽó‘Ô(ƒŠ[ƒh/ƒ‰ƒCƒgEƒoƒbƒtƒ@ã‚̃f[ƒ^A•ÏX‚³‚ꂽFAT‚âƒfƒBƒŒƒNƒgƒŠ€–Ú)‚̓fƒBƒXƒN‚É‘‚«–ß‚³‚ê‚Ü‚·BŠÖ”‚ª³íI—¹‚·‚é‚ÆA‚»‚̃tƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒg‚Í–³Œø‚É‚È‚èA‚»‚̃ƒ‚ƒŠ‚à‰ð•ú‚Å‚«‚Ü‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>‘Ήžî•ñ</h4>
+<p>‘S‚Ä‚Ì\¬‚ÅŽg—p‰Â”\‚Å‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>ŽQÆ</h4>
+<tt><a href="open.html">f_open</a>, <a href="read.html">f_read</a>, <a href="write.html">f_write</a>, <a href="sync.html">f_sync</a>, <a href="sfile.html">FIL</a>, <a href="sfatfs.html">FATFS</a></tt>
+</div>
+
+<p class="foot"><a href="../00index_j.html">–ß‚é</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/dinit.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/dinit.html
new file mode 100644
index 0000000..415d713
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/dinit.html
@@ -0,0 +1,46 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_j.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/dinit.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - disk_initialize</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>disk_initialize</h2>
+<p>ƒfƒBƒXƒNEƒhƒ‰ƒCƒu‚ð‰Šú‰»‚µ‚Ü‚·B</p>
+<pre>
+DSTATUS disk_initialize (
+ BYTE <em>Drive</em> <span class="c">/* •¨—ƒhƒ‰ƒCƒu”Ô† */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>ˆø”</h4>
+<dl class="par">
+<dt>Drive</dt>
+<dd>‰Šú‰»‚·‚镨—ƒhƒ‰ƒCƒu”Ô†(0-9)‚ðŽw’肵‚Ü‚·B</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>–ß‚è’l</h4>
+<p>‚±‚ÌŠÖ”‚Í–ß‚è’l‚Æ‚µ‚ăfƒBƒXƒNEƒXƒe[ƒ^ƒX‚ð•Ô‚µ‚Ü‚·BƒfƒBƒXƒNEƒXƒe[ƒ^ƒX‚ÌÚׂɊւµ‚Ä‚Í<tt><a href="dstat.html">disk_status()</a></tt>‚ðŽQÆ‚µ‚Ä‚­‚¾‚³‚¢B</p>
+</div>
+
+<div class="para">
+<h4>‰ðà</h4>
+<p>ƒfƒBƒXƒNEƒhƒ‰ƒCƒu‚ð‰Šú‰»‚µ‚Ü‚·BŠÖ”‚ª¬Œ÷‚·‚é‚ÆA–ß‚è’l‚Ì<tt>STA_NOINIT</tt>ƒtƒ‰ƒO‚ªƒNƒŠƒA‚³‚ê‚Ü‚·B</p>
+<p><em>ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚©‚炱‚ÌŠÖ”‚ðŒÄ‚Ño‚·‚ÆAFATƒ{ƒŠƒ…[ƒ€‚ª”j‰ó‚³‚ê‚é‰Â”\«‚ª‚ ‚è‚Ü‚·BƒGƒ‰[“™‚É‚æ‚èĉŠú‰»‚ª•K—v‚È‚Æ‚«‚ÍA<tt>f_mount()</tt>‚ðŽg—p‚µ‚Ü‚·B</em>FatFsƒ‚ƒWƒ…[ƒ‹‚ÍAŽ©“®ƒ}ƒEƒ“ƒg“®ì‚É‚æ‚èA•K—v‚ɉž‚¶‚Ä‚±‚ÌŠÖ”‚ðŒÄ‚Ño‚µ‚Ü‚·B</p>
+</div>
+
+<p class="foot"><a href="../00index_j.html">–ß‚é</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/dioctl.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/dioctl.html
new file mode 100644
index 0000000..3c055fd
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/dioctl.html
@@ -0,0 +1,68 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_j.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/dioctl.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - disk_ioctl</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>disk_ioctl</h2>
+<p>ƒZƒNƒ^‚Ì“Ç‚Ý‘‚«ˆÈŠO‚̃fƒBƒXƒNEƒhƒ‰ƒCƒuŽ©‘̂ɑ΂·‚é—lX‚ȧŒä‚ð‚µ‚Ü‚·B</p>
+<pre>
+DRESULT disk_ioctl (
+ BYTE <em>Drive</em>, <span class="c">/* •¨—ƒhƒ‰ƒCƒu”Ô† */</span>
+ BYTE <em>Command</em>, <span class="c">/* §ŒäƒRƒ}ƒ“ƒh */</span>
+ void* <em>Buffer</em> <span class="c">/* ƒf[ƒ^Žó‚¯“n‚µƒoƒbƒtƒ@ */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>ˆø”</h4>
+<dl class="par">
+<dt>Drive</dt>
+<dd>•¨—ƒhƒ‰ƒCƒu”Ô†(0-9)‚ðŽw’肵‚Ü‚·B</dd>
+<dt>Command</dt>
+<dd>§ŒäƒRƒ}ƒ“ƒhEƒR[ƒh‚ðŽw’肵‚Ü‚·B</dd>
+<dt>Buffer</dt>
+<dd>§ŒäƒRƒ}ƒ“ƒh‚Ɉˑ¶‚µ‚½ƒpƒ‰ƒ[ƒ^‚ðŽöŽó‚·‚éƒoƒbƒtƒ@‚ðŽw‚·ƒ|ƒCƒ“ƒ^‚ðŽw’肵‚Ü‚·Bƒf[ƒ^‚ÌŽöŽó‚Ì‚È‚¢ƒRƒ}ƒ“ƒh‚ÌꇂÍANULL‚ðŽw’肵‚Ü‚·B</dd>
+</dl>
+</div>
+
+<div class="para">
+<h4>–ß‚è’l</h4>
+<dl class="ret">
+<dt>RES_OK (0)</dt>
+<dd>³íI—¹B</dd>
+<dt>RES_ERROR</dt>
+<dd>‰½‚ç‚©‚̃Gƒ‰[‚ª”­¶‚µ‚½B</dd>
+<dt>RES_PARERR</dt>
+<dd>ƒRƒ}ƒ“ƒh‚ª•s³B</dd>
+<dt>RES_NOTRDY</dt>
+<dd>ƒhƒ‰ƒCƒu‚ª“®ì‰Â”\ó‘Ô‚Å‚Í‚È‚¢A‚Ü‚½‚͉Šú‰»‚³‚ê‚Ä‚¢‚È‚¢B</dd>
+</dl>
+</div>
+
+<div class="para">
+<h4>‰ðà</h4>
+<p>•¨—ƒhƒ‰ƒCƒu‚ÌŽí—Þ‚É‚æ‚èƒTƒ|[ƒg‚³‚ê‚éƒRƒ}ƒ“ƒh‚͈قȂè‚Ü‚·‚ªAFatFsƒ‚ƒWƒ…[ƒ‹‚Å‚ÍAŽŸ‚̔ėpƒRƒ}ƒ“ƒh‚Ì‚ÝŽg—p‚µA“Á’è‚̃n[ƒhƒEƒFƒA‚Ɉˑ¶‚µ‚½§Œä‚Ís‚¢‚Ü‚¹‚ñB</p>
+<table class="lst">
+<tr><th>ƒRƒ}ƒ“ƒh</th><th>‰ðà</th></tr>
+<tr><td>CTRL_SYNC</td><td>ƒhƒ‰ƒCƒu‚ªƒf[ƒ^‚Ì‘‚«ž‚݈—‚ðŠ®—¹‚·‚é‚Ì‚ð‘Ò‚¿‚Ü‚·B‚Ü‚½Aƒ‰ƒCƒgEƒoƒbƒNEƒLƒƒƒbƒVƒ…‚ª‘¶Ý‚·‚éꇂÍA‘‚«ž‚Ü‚ê‚Ä‚¢‚È‚¢ƒf[ƒ^‚𑦎ž‘‚«–ß‚µ‚Ü‚·BƒŠ[ƒhEƒIƒ“ƒŠ[\¬‚Å‚ÍŽg—p‚³‚ê‚Ü‚¹‚ñB</td></tr>
+<tr><td>GET_SECTOR_SIZE</td><td><tt>Buffer</tt>‚ÌŽw‚·WORD•Ï”‚Ƀhƒ‰ƒCƒu‚̃ZƒNƒ^EƒTƒCƒY‚ð•Ô‚µ‚Ü‚·BƒZƒNƒ^EƒTƒCƒY‚ªŒÅ’è(<tt>_MAX_SS</tt>‚ª512)‚Ì‚Æ‚«‚Í‚±‚̃Rƒ}ƒ“ƒh‚ÍŽg‚í‚ê‚Ü‚¹‚ñB</td></tr>
+<tr><td>GET_SECTOR_COUNT</td><td><tt>Buffer</tt>‚ÌŽw‚·DWORD•Ï”‚Ƀhƒ‰ƒCƒuã‚Ì‘ƒZƒNƒ^”‚ð•Ô‚µ‚Ü‚·Bf_mkfsŠÖ”“à‚Å쬂·‚éƒ{ƒŠƒ…[ƒ€‚̃TƒCƒY‚ðŒˆ’è‚·‚邽‚ß‚ÉŽg—p‚³‚ê‚Ü‚·B</td></tr>
+<tr><td>GET_BLOCK_SIZE</td><td>ƒtƒ‰ƒbƒVƒ…Eƒƒ‚ƒŠ‚ÌÁ‹ŽƒuƒƒbƒNEƒTƒCƒY‚ð<tt>Buffer</tt>‚ÌŽw‚·DWORD•Ï”‚ɃZƒNƒ^’PˆÊ‚Å•Ô‚µ‚Ü‚·B1‚©‚ç32768‚Å‚©‚Â2‚Ì—Ýæ‚Ì’l‚Å‚È‚¯‚ê‚΂Ȃè‚Ü‚¹‚ñB•s–¾‚Èꇂ܂½‚̓tƒ‰ƒbƒVƒ…Eƒƒ‚ƒŠˆÈŠO‚̃ƒfƒBƒA‚Å‚Í1‚ð•Ô‚µ‚Ü‚·Bf_mkfsŠÖ”“à‚Å‚Ì‚ÝŽg—p‚³‚êAƒ{ƒŠƒ…[ƒ€‚̃f[ƒ^—̈æ‚Í‚±‚Ì‹«ŠE‚ɃAƒ‰ƒCƒƒ“ƒg‚³‚ê‚Ü‚·B</td></tr>
+<tr><td>CTRL_ERASE_SECTOR</td><td>ƒtƒ‰ƒbƒVƒ…Eƒƒ‚ƒŠ‚̈ꕔ‚̗̈æ‚ðÁ‹Ž‚µ‚Ü‚·B<tt>Buffer</tt>‚ÌŽw‚·DWORD”z—ñ‚É‚ÍÁ‹Ž‚·‚é—̈æ {ŠJŽnƒZƒNƒ^,I—¹ƒZƒNƒ^} ‚ðŽw’肵‚ČĂÑo‚µ‚Ü‚·B‚±‚Ì‹@”\‚ðƒTƒ|[ƒg‚µ‚È‚¢ê‡‚âƒtƒ‰ƒbƒVƒ…Eƒƒ‚ƒŠˆÈŠO‚̃ƒfƒBƒA‚ł͉½‚à‚µ‚Ü‚¹‚ñB‚±‚Ì‹@”\‚Ì–ß‚è’l‚̓`ƒFƒbƒN‚³‚ꂸA‚Ü‚½AŽw’è—̈æ‚ÌÁ‹Ž‚ªŠ®‘S‚És‚í‚ê‚È‚©‚Á‚½‚Æ‚µ‚Ä‚àƒtƒ@ƒCƒ‹EƒVƒXƒeƒ€‚Ì“®ì‚ɂ͉e‹¿‚ ‚è‚Ü‚¹‚ñB<tt>_USE_ERASE</tt>‚ª1‚Ì‚Æ‚«AƒNƒ‰ƒXƒ^‚ª‰ð•ú‚³‚ê‚é‚Æ‚«‚ɌĂÑo‚³‚ê‚Ü‚·B</td></tr>
+</table>
+</div>
+
+
+<p class="foot"><a href="../00index_j.html">–ß‚é</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/dread.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/dread.html
new file mode 100644
index 0000000..fd025b2
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/dread.html
@@ -0,0 +1,59 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_j.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/dread.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - disk_read</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>disk_read</h2>
+<p>ƒfƒBƒXƒN‚©‚çƒZƒNƒ^‚ð“Ç‚Ýo‚µ‚Ü‚·B</p>
+<pre>
+DRESULT disk_read (
+ BYTE <em>Drive</em>, <span class="c">/* •¨—ƒhƒ‰ƒCƒu”Ô† */</span>
+ BYTE* <em>Buffer</em>, <span class="c">/* “Ç‚Ýo‚µƒoƒbƒtƒ@‚ւ̃|ƒCƒ“ƒ^ */</span>
+ DWORD <em>SectorNumber</em>, <span class="c">/* “Ç‚Ýo‚µŠJŽnƒZƒNƒ^”Ô† */</span>
+ BYTE <em>SectorCount</em> <span class="c">/* “Ç‚Ýo‚µƒZƒNƒ^” */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>ˆø”</h4>
+<dl class="par">
+<dt>Drive</dt>
+<dd>•¨—ƒhƒ‰ƒCƒu”Ô†(0-9)‚ðŽw’肵‚Ü‚·B</dd>
+<dt>Buffer</dt>
+<dd>ƒfƒBƒXƒN‚©‚ç“Ç‚Ýo‚µ‚½ƒf[ƒ^‚ðŠi”[‚·‚é<em>ƒoƒCƒg”z—ñ</em>‚ÅA“Ç‚Ýo‚³‚ê‚éƒoƒCƒg”•ª‚̃TƒCƒY‚ª•K—v‚Å‚·BŽw’肳‚ê‚éƒAƒhƒŒƒX‚̓[ƒhEƒAƒ‰ƒCƒƒ“ƒg‚³‚ê‚Ä‚¢‚é‚Æ‚ÍŒÀ‚è‚Ü‚¹‚ñB</dd>
+<dt>SectorNumber</dt>
+<dd>“Ç‚Ýo‚µ‚ðŠJŽn‚·‚éƒZƒNƒ^”Ô†BLBA‚ÅŽw’肵‚Ü‚·B</dd>
+<dt>SectorCount</dt>
+<dd>“Ç‚Ýo‚·ƒZƒNƒ^”B 1`128‚͈̔͂Ŏw’肵‚Ü‚·Bˆê”Ê“I‚ÉA•¡”ƒZƒNƒ^‚Ì“]‘——v‹‚̓fƒoƒCƒX‚ɑ΂µ‚ĉ”\‚ÈŒÀ‚èƒ}ƒ‹ƒ`EƒZƒNƒ^“]‘—‚µ‚È‚¯‚ê‚΂Ȃè‚Ü‚¹‚ñB•¡”‚̃Vƒ“ƒOƒ‹EƒZƒNƒ^“]‘—‚É•ª‰ð‚µ‚½ê‡A“Ç‚Ýo‚µ‘¬“x‚ª’ቺ‚µ‚Ü‚·B</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>–ß‚è’l</h4>
+<dl class="ret">
+<dt>RES_OK (0)</dt>
+<dd>³íI—¹B</dd>
+<dt>RES_ERROR</dt>
+<dd>“Ç‚Ýž‚Ý’†‚ɃGƒ‰[‚ª”­¶‚µA‚»‚̉ñ•œ‚É‚àŽ¸”s‚µ‚½B</dd>
+<dt>RES_PARERR</dt>
+<dd>ƒpƒ‰ƒ[ƒ^‚ª•s³B</dd>
+<dt>RES_NOTRDY</dt>
+<dd>ƒhƒ‰ƒCƒu‚ª“®ì‰Â”\ó‘Ô‚Å‚Í‚È‚¢i‰Šú‰»‚³‚ê‚Ä‚¢‚È‚¢jB</dd>
+</dl>
+</div>
+
+
+<p class="foot"><a href="../00index_j.html">–ß‚é</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/dstat.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/dstat.html
new file mode 100644
index 0000000..79eb836
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/dstat.html
@@ -0,0 +1,48 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_j.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/dstat.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - disk_status</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>disk_status</h2>
+<p>ƒfƒBƒXƒNEƒhƒ‰ƒCƒu‚Ìó‘Ô‚ðŽæ“¾‚µ‚Ü‚·B</p>
+<pre>
+DSTATUS disk_status (
+ BYTE <em>Drive</em> <span class="c">/* •¨—ƒhƒ‰ƒCƒu”Ô† */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>ˆø”</h4>
+<dl class="par">
+<dt>Drive</dt>
+<dd>ƒXƒe[ƒ^ƒX‚ðŽæ“¾‚·‚镨—ƒhƒ‰ƒCƒu”Ô†‚ðŽw’肵‚Ü‚·B</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>–ß‚è’l</h4>
+<p>•¨—ƒhƒ‰ƒCƒu‚Ìó‘Ô‚ªŽŸ‚̃tƒ‰ƒO‚Ì‘g‚݇‚킹‚Ì’l‚Å•Ô‚³‚ê‚Ü‚·B</p>
+<dl class="ret">
+<dt>STA_NOINIT</dt>
+<dd>ƒhƒ‰ƒCƒu‚ª‰Šú‰»‚³‚ê‚Ä‚¢‚È‚¢‚±‚Æ‚ðŽ¦‚·ƒtƒ‰ƒOBƒVƒXƒeƒ€EƒŠƒZƒbƒg‚⃃fƒBƒA‚ÌŽæ‚èŠO‚µ“™‚ŃZƒbƒg‚³‚êAdisk_initialize() ‚̳íI—¹‚ŃNƒŠƒAAŽ¸”s‚ŃZƒbƒg‚³‚ê‚Ü‚·B</dd>
+<dt>STA_NODISK</dt>
+<dd>ƒƒfƒBƒA‚ªƒZƒbƒg‚³‚ê‚Ä‚¢‚È‚¢‚±‚Æ‚ðŽ¦‚·ƒtƒ‰ƒOBƒƒfƒBƒA‚ªŽæ‚èŠO‚³‚ê‚Ä‚¢‚éŠÔ‚̓Zƒbƒg‚³‚êAƒƒfƒBƒA‚ªƒZƒbƒg‚³‚ê‚Ä‚¢‚éŠÔ‚̓NƒŠƒA‚³‚ê‚Ü‚·BŒÅ’èƒfƒBƒXƒN‚Å‚Íí‚ɃNƒŠƒA‚³‚ê‚Ä‚¢‚Ü‚·B</dd>
+<dt>STA_PROTECTED</dt>
+<dd>ƒƒfƒBƒA‚ªƒ‰ƒCƒgEƒvƒƒeƒNƒg‚³‚ê‚Ä‚¢‚邱‚Æ‚ðŽ¦‚·ƒtƒ‰ƒOBƒ‰ƒCƒgEƒvƒƒeƒNƒg‹@”\‚ðƒTƒ|[ƒg‚µ‚È‚¢ƒƒfƒBƒA‚Å‚Íí‚ɃNƒŠƒA‚³‚ê‚Ä‚¢‚Ü‚·B</dd>
+</dl>
+</div>
+
+<p class="foot"><a href="../00index_j.html">–ß‚é</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/dwrite.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/dwrite.html
new file mode 100644
index 0000000..9f0fe87
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/dwrite.html
@@ -0,0 +1,67 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_j.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/dwrite.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - disk_write</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>disk_write</h2>
+<p>ƒfƒBƒXƒN‚Ƀf[ƒ^‚ð‘‚«ž‚Ý‚Ü‚·B</p>
+<pre>
+DRESULT disk_write (
+ BYTE <em>Drive</em>, <span class="c">/* •¨—ƒhƒ‰ƒCƒu”Ô† */</span>
+ const BYTE* <em>Buffer</em>, <span class="c">/* ‘‚«ž‚Þƒf[ƒ^‚ւ̃|ƒCƒ“ƒ^ */</span>
+ DWORD <em>SectorNumber</em>, <span class="c">/* ‘‚«ž‚ÝŠJŽnƒZƒNƒ^”Ô† */</span>
+ BYTE <em>SectorCount</em> <span class="c">/* ‘‚«ž‚݃ZƒNƒ^” */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>ˆø”</h4>
+<dl class="par">
+<dt>Drive</dt>
+<dd>•¨—ƒhƒ‰ƒCƒu”Ô†(0-9)‚ðŽw’肵‚Ü‚·B</dd>
+<dt>Buffer</dt>
+<dd>ƒfƒBƒXƒN‚É‘‚«ž‚Þ<em>ƒoƒCƒg”z—ñ</em>‚ðŽw’肵‚Ü‚·BŽw’肳‚ê‚éƒAƒhƒŒƒX‚̓[ƒhEƒAƒ‰ƒCƒƒ“ƒg‚³‚ê‚Ä‚¢‚é‚Æ‚ÍŒÀ‚è‚Ü‚¹‚ñB</dd>
+<dt>SectorNumber</dt>
+<dd>‘‚«ž‚Ý‚ðŠJŽn‚·‚éƒZƒNƒ^”Ô†BLBA‚ÅŽw’肵‚Ü‚·B</dd>
+<dt>SectorCount</dt>
+<dd>‘‚«ž‚ÞƒZƒNƒ^”B 1`128‚ÅŽw’肵‚Ü‚·Bˆê”Ê“I‚ÉA•¡”ƒZƒNƒ^‚Ì“]‘——v‹‚̓fƒoƒCƒX‚ɑ΂µ‚ĉ”\‚ÈŒÀ‚èƒ}ƒ‹ƒ`EƒZƒNƒ^“]‘—‚µ‚È‚¯‚ê‚΂Ȃè‚Ü‚¹‚ñB•¡”‚̃Vƒ“ƒOƒ‹EƒZƒNƒ^“]‘—‚É•ª‰ð‚µ‚½ê‡A‘‚«ž‚Ý‘¬“x‚Í‹É’[‚ɒቺ‚µ‚Ü‚·B</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>–ß‚è’l</h4>
+<dl class="ret">
+<dt>RES_OK (0)</dt>
+<dd>³íI—¹B</dd>
+<dt>RES_ERROR</dt>
+<dd>‘‚«ž‚Ý’†‚ɃGƒ‰[‚ª”­¶‚µA‚»‚̉ñ•œ‚É‚àŽ¸”s‚µ‚½B</dd>
+<dt>RES_WRPRT</dt>
+<dd>ƒƒfƒBƒA‚ª‘‚«ž‚Ý‹ÖŽ~ó‘ÔB</dd>
+<dt>RES_PARERR</dt>
+<dd>ƒpƒ‰ƒ[ƒ^‚ª•s³B</dd>
+<dt>RES_NOTRDY</dt>
+<dd>ƒhƒ‰ƒCƒu‚ª“®ì‰Â”\ó‘Ô‚Å‚Í‚È‚¢i‰Šú‰»‚³‚ê‚Ä‚¢‚È‚¢jB</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>‰ðà</h4>
+<p>ƒŠ[ƒhEƒIƒ“ƒŠ[\¬‚Å‚Í‚±‚ÌŠÖ”‚Í•K—v‚Æ‚³‚ê‚Ü‚¹‚ñB</p>
+</div>
+
+
+<p class="foot"><a href="../00index_j.html">–ß‚é</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/eof.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/eof.html
new file mode 100644
index 0000000..6fe3cdc
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/eof.html
@@ -0,0 +1,61 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_j.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/eof.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_eof</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_eof</h2>
+<p>ƒŠ[ƒh/ƒ‰ƒCƒgEƒ|ƒCƒ“ƒ^‚ªƒtƒ@ƒCƒ‹I’[‚É’B‚µ‚Ä‚¢‚é‚©‚Ç‚¤‚©’²‚ׂ܂·B.</p>
+<pre>
+int f_eof (
+ FIL* <em>FileObject</em> <span class="c">/* ƒtƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒg */</span>
+);
+</pre>
+</div>
+
+
+<div class="para">
+<h4>ˆø”</h4>
+<dl class="par">
+<dt>FileObject</dt>
+<dd>ƒtƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒg\‘¢‘̂ւ̃|ƒCƒ“ƒ^‚ðŽw’肵‚Ü‚·B</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>–ß‚è’l</h4>
+<p>ƒŠ[ƒh/ƒ‰ƒCƒgEƒ|ƒCƒ“ƒ^‚ªƒtƒ@ƒCƒ‹I’[‚É‚ ‚è“Ç‚Ýo‚·ƒf[ƒ^‚ª‚È‚¢ê‡‚ÍA0ˆÈŠO‚Ì’l‚ð•Ô‚µ‚Ü‚·B‚»‚êˆÈŠO‚ÌŽž‚Í0‚ð•Ô‚µ‚Ü‚·B</p>
+</div>
+
+
+<h4>‰ðà</h4>
+<p>f_eofŠÖ”‚ÍAƒ}ƒNƒ‚Æ‚µ‚ÄŽÀ‘•‚³‚ê‚Ä‚¢‚Ü‚·B</p>
+<pre>
+<span class="k">#define</span> f_eof(fp) (((fp)->fptr) == ((fp)->fsize) ? 1 : 0)
+</pre>
+</div>
+
+
+<div class="para">
+<h4>‘Ήžî•ñ</h4>
+<p>í‚ÉŽg—p‰Â”\B</p>
+</div>
+
+
+<div class="para">
+<h4>ŽQÆ</h4>
+<p><tt><a href="open.html">f_open</a>, <a href="lseek.html">f_lseek</a>, <a href="sfile.html">FIL</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_j.html">–ß‚é</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/error.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/error.html
new file mode 100644
index 0000000..066beab
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/error.html
@@ -0,0 +1,61 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_j.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/error.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_error</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_error</h2>
+<p>ƒGƒ‰[”­¶‚Ì—L–³‚𒲂ׂ܂·B</p>
+<pre>
+int f_error (
+ FIL* <em>FileObject</em> <span class="c">/* ƒtƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒg */</span>
+);
+</pre>
+</div>
+
+
+<div class="para">
+<h4>ˆø”</h4>
+<dl class="par">
+<dt>FileObject</dt>
+<dd>ƒtƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒg\‘¢‘̂ւ̃|ƒCƒ“ƒ^‚ðŽw’肵‚Ü‚·B</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>–ß‚è’l</h4>
+<p>ƒtƒ@ƒCƒ‹‘€ì’†‚̃Gƒ‰[‚ň—‚ª’†’f‚³‚ê‚Ä‚¢‚éꇂÍA0ˆÈŠO‚Ì’l‚ð•Ô‚µ‚Ü‚·B‚»‚êˆÈŠO‚ÌŽž‚Í0‚ð•Ô‚µ‚Ü‚·B</p>
+</div>
+
+
+<h4>‰ðà</h4>
+<p>f_errorŠÖ”‚ÍAƒ}ƒNƒ‚Æ‚µ‚ÄŽÀ‘•‚³‚ê‚Ä‚¢‚Ü‚·B</p>
+<pre>
+<span class="k">#define</span> f_error(fp) (((fp)->flag & FA__ERROR) ? 1 : 0)
+</pre>
+</div>
+
+
+<div class="para">
+<h4>‘Ήžî•ñ</h4>
+<p>í‚ÉŽg—p‰Â”\B</p>
+</div>
+
+
+<div class="para">
+<h4>ŽQÆ</h4>
+<p><tt><a href="open.html">f_open</a>, <a href="sfile.html">FIL</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_j.html">–ß‚é</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/fattime.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/fattime.html
new file mode 100644
index 0000000..f9a1f94
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/fattime.html
@@ -0,0 +1,51 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_j.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/fattime.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - get_fattime</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>get_fattime</h2>
+<p>Œ»ÝŽž‚ðŽæ“¾‚µ‚Ü‚·B</p>
+<pre>
+DWORD get_fattime (void);
+</pre>
+</div>
+
+
+<div class="para">
+<h4>–ß‚è’l</h4>
+<p>Œ»Ý‚̃[ƒJƒ‹Eƒ^ƒCƒ€‚ª<tt>DWORD</tt>’l‚ɃpƒbƒN‚³‚ê‚Ä•Ô‚³‚ê‚Ü‚·BƒrƒbƒgEƒtƒB[ƒ‹ƒh‚ÍŽŸ‚ÉŽ¦‚·‚悤‚É‚È‚è‚Ü‚·B</p>
+<dl>
+<dt>bit31:25</dt>
+<dd>1980”N‚ð‹N“_‚Æ‚µ‚½”N‚ª 0..127 ‚Å“ü‚è‚Ü‚·B</dd>
+<dt>bit24:21</dt>
+<dd>ŒŽ‚ª 1..12 ‚Ì’l‚Å“ü‚è‚Ü‚·B</dd>
+<dt>bit20:16</dt>
+<dd>“ú‚ª 1..31 ‚Ì’l‚Å“ü‚è‚Ü‚·B</dd>
+<dt>bit15:11</dt>
+<dd>Žž‚ª 0..23 ‚Ì’l‚Å“ü‚è‚Ü‚·B</dd>
+<dt>bit10:5</dt>
+<dd>•ª‚ª 0..59 ‚Ì’l‚Å“ü‚è‚Ü‚·B</dd>
+<dt>bit4:0</dt>
+<dd>•b/2‚ª 0..29 ‚Ì’l‚Å“ü‚è‚Ü‚·B</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>‰ðà</h4>
+<p>RTC‚ðƒTƒ|[ƒg‚µ‚È‚¢ƒVƒXƒeƒ€‚Å‚àA‰½‚ç‚©‚Ì“ú•t‚Æ‚µ‚Ä—LŒø‚È’l‚ð•Ô‚³‚È‚¯‚ê‚΂Ȃè‚Ü‚¹‚ñB0‚ð•Ô‚µ‚½ê‡A‚»‚̃tƒ@ƒCƒ‹‚Í“ú•t‚ðŽ‚¿‚Ü‚¹‚ñBƒŠ[ƒhEƒIƒ“ƒŠ[\¬‚Å‚Í‚±‚ÌŠÖ”‚Í•K—v‚Æ‚³‚ê‚Ü‚¹‚ñB</p>
+</div>
+
+
+<p class="foot"><a href="../00index_j.html">–ß‚é</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/filename.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/filename.html
new file mode 100644
index 0000000..0243c09
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/filename.html
@@ -0,0 +1,72 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_j.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/filename.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - ファイル・ディレクトリã®æŒ‡å®šæ–¹æ³•</title>
+</head>
+
+<body>
+<div class="para">
+<h3>ファイル・ディレクトリã®æŒ‡å®šæ–¹æ³•</h3>
+<p>FatFsモジュールã§ã®ãƒ•ã‚¡ã‚¤ãƒ«ã€ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã€ãƒ‰ãƒ©ã‚¤ãƒ–ã®æŒ‡å®šæ–¹æ³•ã¯DOS/Windows APIã¨ã»ã¼åŒã˜ã§ã™ã€‚パスåã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯æ¬¡ã®é€šã‚Šã§ã™ã€‚</p>
+<p><tt>"[è«–ç†ãƒ‰ãƒ©ã‚¤ãƒ–番å·:][/]ディレクトリå/ファイルå"</tt></p>
+<p>FatFsモジュールã¯é•·ã„ファイルå(LFN)ãŠã‚ˆã³8.3å½¢å¼ãƒ•ã‚¡ã‚¤ãƒ«å(SFN)ã«å¯¾å¿œã—ã¦ã„ã¾ã™ã€‚LFNã¯ã€<tt>(_USE_LFN &gt; 0)</tt>ã®ã¨ã使用å¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ディレクトリ・セパレータã«ã¯DOS/Windows APIã¨åŒã˜ã / 㨠\ を使用ã—ã¾ã™ã€‚連続ã—ãŸã‚»ãƒ‘レータã¯ç„¡è¦–ã•ã‚Œ1個ã¨ã—ã¦æ‰±ã‚ã‚Œã¾ã™ã€‚唯一ã®é•ã„ã¯ã€è«–ç†ãƒ‰ãƒ©ã‚¤ãƒ–ã®æŒ‡å®šã ã‘ã§ã™ã€‚è«–ç†ãƒ‰ãƒ©ã‚¤ãƒ–番å·ã¯ã€'0'~'9'ã®ä¸€æ–‡å­—ã®æ•°å­—ã¨ã‚³ãƒ­ãƒ³ã§æŒ‡å®šã—ã€çœç•¥ã—ãŸå ´åˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ»ãƒ‰ãƒ©ã‚¤ãƒ–(0ã¾ãŸã¯ã‚«ãƒ¬ãƒ³ãƒˆãƒ»ãƒ‰ãƒ©ã‚¤ãƒ–)ãŒé¸æŠžã•ã‚Œã¾ã™ã€‚</p>
+<p>Nul文字ã¨åˆ¶å¾¡æ–‡å­—(\0~\x1F)ã¯ã€ãƒ‘スåã®çµ‚端ã¨ã—ã¦èªè­˜ã•ã‚Œã¾ã™ã€‚パスåã«å…ˆè¡Œã‚ã‚‹ã„ã¯ä¸­ã«å«ã¾ã‚Œã‚‹ã‚¹ãƒšãƒ¼ã‚¹ã¯ã€LFN構æˆã§ã¯åå‰ã®ä¸€éƒ¨ã¨ã—ã¦æœ‰åŠ¹ã§ã™ãŒã€éžLFN構æˆã§ã¯ãƒ‘スåã®çµ‚端ã¨ã—ã¦èªè­˜ã•ã‚Œã¾ã™ã€‚</p>
+<p>標準構æˆ<tt>(_FS_RPATH == 0)</tt>ã®ã¨ãã¯ã€å…¨ã¦ã®ã‚ªãƒ–ジェクトãŒãƒ«ãƒ¼ãƒˆãƒ»ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‹ã‚‰è¾¿ã‚‹çµ¶å¯¾ãƒ‘スã§æŒ‡å®šã•ã‚Œã¾ã™ã€‚OS指å‘ãªã‚«ãƒ¬ãƒ³ãƒˆãƒ»ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã¨ã„ã†æ¦‚念ã¯ç„¡ãã€ã¾ãŸãƒ‰ãƒƒãƒˆãƒ»ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒª(&quot;.&quot;ã‚„&quot;..&quot;)ã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。パスå先頭ã®ã‚»ãƒ‘レータã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚デフォルト・ドライブ番å·ã¯å¸¸ã«0ã«ãªã‚Šã¾ã™ã€‚</p>
+<p>相対パスを有効<tt>(_FS_RPATH == 1)</tt>ã«ã—ãŸã¨ãã¯ã€å…ˆè¡Œã™ã‚‹ã‚»ãƒ‘レータã®æœ‰ç„¡ã«ã‚ˆã£ã¦æ¤œç´¢é–‹å§‹ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªãŒå¤‰ã‚ã‚Šã€ã‚»ãƒ‘レータãŒã‚ã‚‹å ´åˆã¯ãƒ«ãƒ¼ãƒˆãƒ»ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‹ã‚‰ã€ç„¡ã„å ´åˆã¯<a href="chdir.html">f_chdir関数</a>ã§è¨­å®šã•ã‚Œã‚‹ã‚«ãƒ¬ãƒ³ãƒˆãƒ»ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‹ã‚‰ã«ãªã‚Šã¾ã™ã€‚ã¾ãŸãƒ‘スåã«ãƒ‰ãƒƒãƒˆãƒ»ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªãŒä½¿ç”¨ã§ãã¾ã™ã€‚デフォルト・ドライブ番å·ã¯<a href="chdrive.html">f_chdrive関数</a>ã§è¨­å®šã•ã‚ŒãŸå€¤ã¨ãªã‚Šã¾ã™ã€‚</p>
+<table class="lst2">
+<tr><td>パスå</td><td>_FS_RPATH == 0</td><td>_FS_RPATH == 1</td></tr>
+<tr class="lst3"><td>file.txt</td><td>ドライブ0ã®ãƒ«ãƒ¼ãƒˆãƒ»ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªä¸‹ã®ãƒ•ã‚¡ã‚¤ãƒ«</td><td>カレント・ドライブã®ã‚«ãƒ¬ãƒ³ãƒˆãƒ»ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªä¸‹ã®ãƒ•ã‚¡ã‚¤ãƒ«</td></tr>
+<tr><td>/file.txt</td><td>ドライブ0ã®ãƒ«ãƒ¼ãƒˆãƒ»ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªä¸‹ã®ãƒ•ã‚¡ã‚¤ãƒ«</td><td>カレント・ドライブã®ãƒ«ãƒ¼ãƒˆãƒ»ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªä¸‹ã®ãƒ•ã‚¡ã‚¤ãƒ«</td></tr>
+<tr><td></td><td>ドライブ0ã®ãƒ«ãƒ¼ãƒˆãƒ»ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒª</td><td>カレント・ドライブã®ã‚«ãƒ¬ãƒ³ãƒˆãƒ»ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒª</td></tr>
+<tr><td>2:</td><td>ドライブ2ã®ãƒ«ãƒ¼ãƒˆãƒ»ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒª</td><td>ドライブ2ã®ã‚«ãƒ¬ãƒ³ãƒˆãƒ»ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒª</td></tr>
+<tr><td>2:file1.txt</td><td>ドライブ2ã®ãƒ«ãƒ¼ãƒˆãƒ»ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªä¸‹ã®ãƒ•ã‚¡ã‚¤ãƒ«</td><td>ドライブ2ã®ã‚«ãƒ¬ãƒ³ãƒˆãƒ»ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªä¸‹ã®ãƒ•ã‚¡ã‚¤ãƒ«</td></tr>
+<tr><td>2:/</td><td>ドライブ2ã®ãƒ«ãƒ¼ãƒˆãƒ»ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒª</td><td>ドライブ2ã®ãƒ«ãƒ¼ãƒˆãƒ»ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒª</td></tr>
+<tr><td>../file.txt</td><td>無効</td><td>親ディレクトリ下ã®ãƒ•ã‚¡ã‚¤ãƒ«</td></tr>
+<tr><td>.</td><td>無効</td><td>ã“ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒª</td></tr>
+<tr><td>..</td><td>無効</td><td>カレント・ディレクトリã®è¦ªãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒª</td></tr>
+<tr><td>dir1/..</td><td>無効</td><td>カレント・ディレクトリ</td></tr>
+<tr><td>/..</td><td>無効</td><td>ルート・ディレクトリ(ãã®ä¸Šã¯è¾¿ã‚Œãªã„)</td></tr>
+</table>
+</div>
+
+<p><br></p>
+<div class="para">
+<h3>Unicode API</h3>
+<p>ファイル関数ã®å…¥å‡ºåŠ›ã®ã†ã¡ãƒ•ã‚¡ã‚¤ãƒ«åやパスåを指定ã™ã‚‹å¼•æ•°ã®åž‹ã¯ã€<tt>TCHAR</tt>ã§å®šç¾©ã•ã‚Œã¦ã„ã¾ã™ãŒã€ã“ã‚Œã¯<tt>char</tt>ã®ã‚¨ãƒªã‚¢ã‚¹ã«ãªã£ã¦ã„ã¾ã™ã€‚ãã—ã¦ã€<tt>_CODE_PAGE</tt>ã§æŒ‡å®šã•ã‚Œã‚‹ ANSI/OEMコード(SBCSã¾ãŸã¯DBCS)ã®æ–‡å­—列ã¨ã—ã¦æ‰±ã‚ã‚Œã¾ã™ã€‚ファイルå入出力をUnicodeã¨ã™ã‚‹æ§‹æˆ(LFN構æˆã§ã€ã‹ã¤<tt>_LFN_UNICODE</tt>ã‚’ 1)ã«ã—ãŸã¨ãã¯ã€<tt>TCHAR</tt>ã¯ãƒ¯ã‚¤ãƒ‰æ–‡å­—(<tt>unsigned short</tt>)ã«åˆ‡ã‚Šæ›¿ã‚ã‚Šã€ãƒ‘スåã«Unicodeを使用ã™ã‚‹ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Š LFNフル対応ã¨ãªã‚Šã€ANSI/OEMコードã«ãªã„文字(ãŸã¨ãˆã° âœâ˜ªâœ¡â˜¸â˜­ãªã©)も使用ã§ãã¾ã™ã€‚ã“ã®è¨­å®šã¯æ–‡å­—列入出力関数ã®ãƒ‡ãƒ¼ã‚¿åž‹ã¨ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã«ã‚‚影響を与ãˆã¾ã™ã€‚リテラル文字列を定義ã™ã‚‹ã¨ãã€æ¬¡ã«ç¤ºã™ã‚ˆã†ã«<tt>_T(s)</tt>ãŠã‚ˆã³<tt>_TEXT(s)</tt>マクロを使ã£ã¦ANSI/OEMã¨Unicodeを自動切り替ãˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚</p>
+<pre>
+ f_open(fp, "filename.txt", FA_READ); <span class="c">/* ANSI/OEM専用コード */</span>
+ f_open(fp, L"filename.txt", FA_READ); <span class="c">/* Unicode専用コード */</span>
+ f_open(fp, _T("filename.txt"), FA_READ); <span class="c">/* 両用コード */</span>
+</pre>
+</div>
+
+<p><br></p>
+<div class="para">
+<h3>è«–ç†ãƒ‰ãƒ©ã‚¤ãƒ–(ボリューム)ã¨ç‰©ç†ãƒ‰ãƒ©ã‚¤ãƒ–(ディスク装置)ã®å¯¾å¿œ</h3>
+<p>デフォルトã®æ§‹æˆã§ã¯ã€ãã‚Œãžã‚Œã®è«–ç†ãƒ‰ãƒ©ã‚¤ãƒ–ã¯åŒã˜ç•ªå·ã®ç‰©ç†ãƒ‰ãƒ©ã‚¤ãƒ–ã«1:1ã§çµã³ã¤ã‘られã¦ã„ã¦ã€ç‰©ç†ãƒ‰ãƒ©ã‚¤ãƒ–ã®å…ˆé ­ã®åŒºç”»ã«ã‚るボリュームãŒãƒžã‚¦ãƒ³ãƒˆã•ã‚Œã¾ã™ã€‚<tt>_MULTI_PARTITION</tt>ã« 1を指定ã™ã‚‹ã¨ã€å€‹ã€…ã®è«–ç†ãƒ‰ãƒ©ã‚¤ãƒ–ã«å¯¾ã—ã¦å€‹åˆ¥ã«ç‰©ç†ãƒ‰ãƒ©ã‚¤ãƒ–番å·ãƒ»åŒºç”»ã‚’指定ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ã“ã®æ§‹æˆã§ã¯ã€è«–ç†ãƒ‰ãƒ©ã‚¤ãƒ–ã¨åŒºç”»ã®å¯¾å¿œã‚’解決ã™ã‚‹ãŸã‚ã®ãƒ†ãƒ¼ãƒ–ルを次ã«ç¤ºã™ã‚ˆã†ã«å®šç¾©ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚</p>
+<pre>
+例:è«–ç†ãƒ‰ãƒ©ã‚¤ãƒ–0~2を物ç†ãƒ‰ãƒ©ã‚¤ãƒ–0(固定ディスク)ã®3ã¤ã®åŸºæœ¬åŒºç”»ã«å‰²ã‚Šå½“ã¦ã€
+ è«–ç†ãƒ‰ãƒ©ã‚¤ãƒ–3を物ç†ãƒ‰ãƒ©ã‚¤ãƒ–1(リムーãƒãƒ–ル・ディスク)ã«å‰²ã‚Šå½“ã¦ã‚‹å ´åˆã€‚
+
+const PARTITION Drives[] = {
+ {0, 0}, <span class="c">/* Logical drive 0 ==> Physical drive 0, 1st partition */</span>
+ {0, 1}, <span class="c">/* Logical drive 1 ==> Physical drive 0, 2nd partition */</span>
+ {0, 2}, <span class="c">/* Logical drive 2 ==> Physical drive 0, 3rd partition */</span>
+ {1, 0} <span class="c">/* Logical drive 3 ==> Physical drive 1 */</span>
+};
+</pre>
+<p>複数区画指定を使用ã™ã‚‹å ´åˆã€æ¬¡ã®ç‚¹ã«æ³¨æ„ã—ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。
+<ul>
+<li>指定å¯èƒ½ãªåŒºç”»ã¯åŸºæœ¬åŒºç”»(0~3)ã®ã¿ã€‚</li>
+<li>物ç†ãƒ‰ãƒ©ã‚¤ãƒ–ãŒSFDå½¢å¼(区画テーブル無ã—)ã®å ´åˆã€åŒºç”»æŒ‡å®šã¯ç„¡è¦–ã•ã‚Œã‚‹ã€‚</li>
+<li>複数ã®è«–ç†ãƒ‰ãƒ©ã‚¤ãƒ–ã‚’æŒã¤ç‰©ç†ãƒ‰ãƒ©ã‚¤ãƒ–ã¯ã€å›ºå®šãƒ‡ã‚£ã‚¹ã‚¯ã§ãªã‘ã‚Œã°ãªã‚‰ãªã„。</li>
+</ul>
+</div>
+
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/forward.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/forward.html
new file mode 100644
index 0000000..dab0c00
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/forward.html
@@ -0,0 +1,145 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_j.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/forward.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_forward</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_forward</h2>
+<p>ƒtƒ@ƒCƒ‹‚©‚çƒf[ƒ^‚ð“Ç‚Ýo‚µA‘—MƒXƒgƒŠ[ƒ€‚É’¼Ú“]‘—‚µ‚Ü‚·B</p>
+<pre>
+FRESULT f_forward (
+ FIL* <em>FileObject</em>, <span class="c">/* ƒtƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒg\‘¢‘Ì */</span>
+ UINT (*<em>Func</em>)(const BYTE*,UINT), <span class="c">/* ƒf[ƒ^“]‘—ŠÖ” */</span>
+ UINT <em>ByteToFwd</em>, <span class="c">/* “]‘—‚·‚éƒoƒCƒg” */</span>
+ UINT* <em>ByteFwd</em> <span class="c">/* “]‘—‚³‚ꂽƒoƒCƒg” */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>ˆø”</h4>
+<dl class="par">
+<dt>FileObject</dt>
+<dd>ƒtƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒg\‘¢‘̂ւ̃|ƒCƒ“ƒ^‚ðŽw’肵‚Ü‚·B</dd>
+<dt>Func</dt>
+<dd>ƒf[ƒ^‚ð“n‚·ƒ†[ƒU’è‹`ŠÖ”‚ւ̃|ƒCƒ“ƒ^‚ðŽw’肵‚Ü‚·B‚±‚ÌŠÖ”‚ÌŽd—l‚̓Tƒ“ƒvƒ‹‚ðŽQÆ‚µ‚Ä‚­‚¾‚³‚¢B</dd>
+<dt>ByteToRead</dt>
+<dd>“]‘—‚·‚éƒoƒCƒg”(0`UINT‚ÌÅ‘å’l)‚ðŽw’肵‚Ü‚·B</dd>
+<dt>ByteRead</dt>
+<dd>ŽÀÛ‚É“]‘—‚³‚ꂽƒoƒCƒg”‚ðŠi”[‚·‚é•Ï”‚ðŽw‚·ƒ|ƒCƒ“ƒ^‚ðŽw’肵‚Ü‚·B</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>–ß‚è’l</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>³íI—¹B</dd>
+<dt>FR_DENIED</dt>
+<dd>”ñ“Ç‚Ýž‚݃‚[ƒh‚ÅŠJ‚¢‚½ƒtƒ@ƒCƒ‹‚©‚ç“Ç‚Ýž‚à‚¤‚Æ‚µ‚½B</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>ƒfƒBƒXƒNEƒGƒ‰[‚É‚æ‚鎸”sB</dd>
+<dt>FR_INT_ERR</dt>
+<dd>•s³‚ÈFAT\‘¢‚Ü‚½‚Í“à•”ƒGƒ‰[‚É‚æ‚鎸”sB</dd>
+<dt>FR_NOT_READY</dt>
+<dd>ƒƒfƒBƒA‚ªƒZƒbƒg‚³‚ê‚Ä‚¢‚È‚¢‚È‚ÇA•¨—ƒhƒ‰ƒCƒu‚ª“®ì•s”\ó‘ÔB</dd>
+<dt>FR_INVALID_OBJECT</dt>
+<dd>–³Œø‚ȃtƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒgB</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>‰ðà</h4>
+<p>ƒtƒ@ƒCƒ‹‚̃f[ƒ^‚ðƒoƒbƒtƒ@‚É“Ç‚Ýo‚³‚¸‚É‘—MƒXƒgƒŠ[ƒ€‚É’¼Ú“]‘—‚µ‚Ü‚·BƒAƒvƒŠƒP[ƒVƒ‡ƒ“‘¤‚Ńf[ƒ^Eƒoƒbƒtƒ@‚ð•K—v‚Æ‚µ‚È‚¢‚Ì‚ÅAƒƒ‚ƒŠ‚ÌŒÀ‚ç‚ꂽŠÂ‹«‚Å—LŒø‚Å‚·BƒŠ[ƒh/ƒ‰ƒCƒgEƒ|ƒCƒ“ƒ^‚Í“]‘—‚³‚ꂽƒoƒCƒg”‚¾‚¯i‚Ý‚Ü‚·BŽw’肳‚ꂽƒoƒCƒg”‚Ì“]‘—’†‚Ƀtƒ@ƒCƒ‹‚ÌI’[‚É’B‚µ‚½ê‡‚â‘—MƒXƒgƒŠ[ƒ€‚ªƒrƒW[‚É‚È‚Á‚½ê‡A<tt>*ByteFwd</tt>‚Í<tt>ByteToFwd</tt>‚æ‚è‚ଂ³‚­‚È‚è‚Ü‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>‘Ήžî•ñ</h4>
+<p><tt>_USE_FORWARD == 1</tt>‚ÅAŠŽ‚Â<tt>_FS_TINY == 1</tt>‚Ì‚Æ‚«‚ÉŽg—p‰Â”\‚Å‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>Žg—p—áiƒI[ƒfƒBƒIĶj</h4>
+<pre>
+<span class="c">/*-----------------------------------------------------------------------*/</span>
+<span class="c">/* f_forwardŠÖ”‚©‚çŒÄ‚΂ê‚éƒf[ƒ^‘—MŠÖ”‚Ì—á */</span>
+<span class="c">/*-----------------------------------------------------------------------*/</span>
+
+UINT out_stream ( <span class="c">/* –ß‚è’l: “]‘—‚³‚ꂽƒoƒCƒg”‚Ü‚½‚̓XƒgƒŠ[ƒ€‚Ìó‘Ô */</span>
+ const BYTE *p, <span class="c">/* “]‘—‚·‚éƒf[ƒ^‚ðŽw‚·ƒ|ƒCƒ“ƒ^ */</span>
+ UINT btf <span class="c">/* &gt;0: “]‘—‚ðs‚¤(ƒoƒCƒg”). 0: ƒXƒgƒŠ[ƒ€‚Ìó‘Ԃ𒲂ׂé */</span>
+)
+{
+ UINT cnt = 0;
+
+
+ if (btf == 0) { <span class="c">/* ƒZƒ“ƒX—v‹ */</span>
+ <span class="c">/* ƒXƒgƒŠ[ƒ€‚Ìó‘Ô‚ð•Ô‚· (0: ƒrƒW[, 1: ƒŒƒfƒB) */</span>
+ <span class="c">/* ˆê’UAƒŒƒfƒB‚ð•Ô‚µ‚½‚çA‘±‚­“]‘——v‹‚Å­‚È‚­‚Æ‚à1ƒoƒCƒg‚Í */</span>
+ <span class="c">/* “]‘—‚³‚ê‚È‚¢‚Æ f_forwardŠÖ”‚Í FR_RW_ERROR ‚Æ‚È‚éB */</span>
+ if (FIFO_READY) cnt = 1;
+ }
+ else { <span class="c">/* “]‘——v‹ */</span>
+ do { <span class="c">/* ‘S‚ẴoƒCƒg‚ð“]‘—‚·‚é‚©AƒXƒgƒŠ[ƒ€‚ªƒrƒW[‚É‚È‚é‚Ü‚ÅŒJ‚è•Ô‚· */</span>
+ FIFO_PORT = *p++;
+ cnt++;
+ } while (cnt &lt; btf &amp;&amp; FIFO_READY);
+ }
+
+ return cnt;
+}
+
+
+<span class="c">/*-----------------------------------------------------------------------*/</span>
+<span class="c">/* f_forwardŠÖ”‚ÌŽg—p—á */</span>
+<span class="c">/*-----------------------------------------------------------------------*/</span>
+
+FRESULT play_file (
+ char *fn <span class="c">/* Ķ‚·‚éƒI[ƒfƒBƒIEƒtƒ@ƒCƒ‹–¼‚ðŽw‚·ƒ|ƒCƒ“ƒ^ */</span>
+)
+{
+ FRESULT rc;
+ FIL fil;
+ UINT dmy;
+
+ <span class="c">/* ƒtƒ@ƒCƒ‹‚ð“Ç‚Ýo‚µƒ‚[ƒh‚ÅŠJ‚­ */</span>
+ rc = f_open(&amp;fil, fn, FA_READ);
+ if (rc) return rc;
+
+ <span class="c">/* ‘S‚Ẵf[ƒ^‚ª“]‘—‚³‚ê‚é‚©ƒGƒ‰[‚ª”­¶‚·‚é‚Ü‚Å‘±‚¯‚é */</span>
+ while (rc == FR_OK &amp;&amp; fil.fptr &lt; fil.fsize) {
+
+ <span class="c">/* ‚Ù‚©‚̈—... */</span>
+
+ <span class="c">/* ’èŠú“I‚Ü‚½‚Í—v‹‚ɉž‚¶‚ăf[ƒ^‚ðƒXƒgƒŠ[ƒ€‚É‘—o‚·‚é */</span>
+ rc = f_forward(&amp;fil, out_stream, 1000, &amp;dmy);
+ }
+
+ <span class="c">/* ƒtƒ@ƒCƒ‹‚ð•Â‚¶‚Ä–ß‚é */</span>
+ f_close(&amp;fil);
+ return rc;
+}
+</pre>
+</div>
+
+
+<div class="para">
+<h4>ŽQÆ</h4>
+<p><tt><a href="open.html">f_open</a>, <a href="gets.html">fgets</a>, <a href="write.html">f_write</a>, <a href="close.html">f_close</a>, <a href="sfile.html">FIL</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_j.html">–ß‚é</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/getcwd.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/getcwd.html
new file mode 100644
index 0000000..90c8d70
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/getcwd.html
@@ -0,0 +1,76 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_j.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/getcwd.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_getcwd</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_getcwd</h2>
+<p>ƒJƒŒƒ“ƒgEƒfƒBƒŒƒNƒgƒŠ‚𓾂܂·</p>
+<pre>
+FRESULT f_getcwd (
+ TCHAR* <em>Buffer</em>, <span class="c">/* ƒoƒbƒtƒ@ */</span>
+ UINT <em>BufferLen</em> <span class="c">/* ƒoƒbƒtƒ@EƒTƒCƒY */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>ˆø”</h4>
+<dl class="par">
+<dt>Buffer</dt>
+<dd>ƒJƒŒƒ“ƒgEƒfƒBƒŒƒNƒgƒŠ‚Ì•¶Žš—ñ‚ðŠi”[‚·‚éƒoƒbƒtƒ@</dd>
+<dt>BufferLen</dt>
+<dd>TCHAR’PˆÊ‚̃oƒbƒtƒ@EƒTƒCƒY</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>–ß‚è’l</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>³íI—¹B</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>ƒfƒBƒXƒNEƒGƒ‰[‚É‚æ‚鎸”sB</dd>
+<dt>FR_INT_ERR</dt>
+<dd>•s³‚ÈFAT\‘¢‚Ü‚½‚Í“à•”ƒGƒ‰[‚É‚æ‚鎸”sB</dd>
+<dt>FR_NOT_READY</dt>
+<dd>ƒƒfƒBƒA‚ªƒZƒbƒg‚³‚ê‚Ä‚¢‚È‚¢‚È‚ÇA•¨—ƒhƒ‰ƒCƒu‚ª“®ì•s”\ó‘ÔB</dd>
+<dt>FR_NO_FILESYSTEM</dt>
+<dd>—LŒø‚ÈFATƒ{ƒŠƒ…[ƒ€‚ªŒ©‚‚©‚ç‚È‚¢B</dd>
+<dt>FR_NOT_ENABLED</dt>
+<dd>‚»‚̘_—ƒhƒ‰ƒCƒu‚Ƀ[ƒNEƒGƒŠƒA‚ª—^‚¦‚ç‚ê‚Ä‚¢‚È‚¢B</dd>
+<dt>FR_NOT_ENOUGH_CORE</dt>
+<dd>ƒoƒbƒtƒ@EƒTƒCƒY‚ª•s‘«B</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>‰ðà</h4>
+<p>f_getcwdŠÖ”‚ÍAƒJƒŒƒ“ƒgEƒhƒ‰ƒCƒu‚̃JƒŒƒ“ƒgEƒfƒBƒŒƒNƒgƒŠ‚̃pƒX•¶Žš—ñ‚ðŽæ“¾‚µ‚Ü‚·BƒpƒX•¶Žš—ñ‚ÍAƒhƒ‰ƒCƒu”Ô†‚ðŠÜ‚ñ‚¾ƒtƒ‹EƒpƒX–¼‚Å‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>‘Ήžî•ñ</h4>
+<p><tt>_FS_RPATH == 2</tt>‚Ì‚Æ‚«Žg—p‰Â”\‚Å‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>ŽQÆ</h4>
+<p><tt><a href="chdrive.html">f_chdrive</a>, <a href="chdir.html">f_chdir</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_j.html">–ß‚é</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/getfree.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/getfree.html
new file mode 100644
index 0000000..1c2f50f
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/getfree.html
@@ -0,0 +1,102 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_j.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/getfree.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_getfree</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_getfree</h2>
+<p>˜_—ƒhƒ‰ƒCƒuã‚Ì–¢Žg—pƒNƒ‰ƒXƒ^”‚𓾂܂·B</p>
+<pre>
+FRESULT f_getfree (
+ const TCHAR* <em>Path</em>, <span class="c">/* ‘ÎÛƒhƒ‰ƒCƒu‚ðŽw’肵‚Ü‚· */</span>
+ DWORD* <em>Clusters</em>, <span class="c">/* ‹ó‚«ƒNƒ‰ƒXƒ^”‚ðŠi”[‚·‚é•Ï”‚ւ̃|ƒCƒ“ƒ^ */</span>
+ FATFS** <em>FileSystemObject</em> <span class="c">/* ƒtƒ@ƒCƒ‹EƒVƒXƒeƒ€EƒIƒuƒWƒFƒNƒg‚ðŽw‚·ƒ|ƒCƒ“ƒ^‚ւ̃|ƒCƒ“ƒ^ */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>ˆø”</h4>
+<dl class="par">
+<dt>Path</dt>
+<dd>’²‚ׂé‘Îۂ̘_—ƒhƒ‰ƒCƒu‚ðŽ¦‚·<a href="filename.html">ƒpƒX–¼</a>‚ª“ü‚Á‚½<tt>'\0'</tt>‚ÅI‚í‚镶Žš—ñ‚ւ̃|ƒCƒ“ƒ^‚ðŽw’肵‚Ü‚·B</dd>
+<dt>Clusters</dt>
+<dd>‹ó‚«ƒNƒ‰ƒXƒ^”‚ðŠi”[‚·‚é<tt>DWORD</tt>•Ï”‚ւ̃|ƒCƒ“ƒ^‚ðŽw’肵‚Ü‚·B</dd>
+<dt>FileSystemObject</dt>
+<dd>‘ÎÛƒhƒ‰ƒCƒu‚̃tƒ@ƒCƒ‹EƒVƒXƒeƒ€EƒIƒuƒWƒFƒNƒg‚ðŽw‚·ƒ|ƒCƒ“ƒ^‚ª•Ô‚³‚ê‚Ü‚·B</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>–ß‚è’l</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>³íI—¹B<tt>*Clusters</tt>‚ɋ󂫃Nƒ‰ƒXƒ^”‚ª•Ô‚³‚ê‚Ü‚·B</dd>
+<dt>FR_INVALID_DRIVE</dt>
+<dd>ƒhƒ‰ƒCƒu”Ô†‚ª•s³B</dd>
+<dt>FR_NOT_READY</dt>
+<dd>ƒƒfƒBƒA‚ªƒZƒbƒg‚³‚ê‚Ä‚¢‚È‚¢‚È‚ÇA•¨—ƒhƒ‰ƒCƒu‚ª“®ì•s”\ó‘ÔB</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>ƒfƒBƒXƒNEƒGƒ‰[‚É‚æ‚鎸”sB</dd>
+<dt>FR_INT_ERR</dt>
+<dd>•s³‚ÈFAT\‘¢‚Ü‚½‚Í“à•”ƒGƒ‰[‚É‚æ‚鎸”sB</dd>
+<dt>FR_NOT_ENABLED</dt>
+<dd>‚»‚̘_—ƒhƒ‰ƒCƒu‚Ƀ[ƒNEƒGƒŠƒA‚ª—^‚¦‚ç‚ê‚Ä‚¢‚È‚¢B</dd>
+<dt>FR_NO_FILESYSTEM</dt>
+<dd>—LŒø‚ÈFATƒ{ƒŠƒ…[ƒ€‚ªŒ©‚‚©‚ç‚È‚¢B</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>‰ðà</h4>
+<p>˜_—ƒhƒ‰ƒCƒuã‚̋󂫃Nƒ‰ƒXƒ^”‚ðŽæ“¾‚µ‚Ü‚·B•Ô‚³‚ꂽƒtƒ@ƒCƒ‹EƒVƒXƒeƒ€EƒIƒuƒWƒFƒNƒg‚Ì<tt>csize</tt>ƒƒ“ƒo‚ªƒNƒ‰ƒXƒ^‚ ‚½‚è‚̃ZƒNƒ^”‚ðŽ¦‚µ‚Ä‚¢‚é‚Ì‚ÅA‚±‚ê‚ðŒ³‚ÉŽÀۂ̋󂫃TƒCƒY‚ªŒvŽZ‚Å‚«‚Ü‚·BFAT32ƒ{ƒŠƒ…[ƒ€‚É‚¨‚¢‚Ä‚ÍAFSINFOƒZƒNƒ^‚Ìó‘Ô‚É‚æ‚Á‚Ä‚Í•s³Šm‚È’l‚ð•Ô‚µ‚½‚èAˆ—‚ÉŽžŠÔ‚ª‚©‚©‚Á‚½‚è‚·‚é‰Â”\«‚ª‚ ‚è‚Ü‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>‘Ήžî•ñ</h4>
+<p><tt>_FS_READONLY == 0</tt>‚ÅAŠŽ‚Â<tt>_FS_MINIMIZE == 0</tt>‚Ì‚Æ‚«Žg—p‰Â”\‚Å‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>Žg—p—á</h4>
+<pre>
+ FATFS *fs;
+ DWORD fre_clust, fre_sect, tot_sect;
+
+
+ <span class="c">/* ƒhƒ‰ƒCƒu1‚̃{ƒŠƒ…[ƒ€î•ñ‚Ƌ󂫃Nƒ‰ƒXƒ^”‚𓾂é */</span>
+ res = f_getfree("1:", &amp;fre_clust, &amp;fs);
+ if (res) die(res);
+
+ <span class="c">/* ‘SƒZƒNƒ^”‚Ƌ󂫃ZƒNƒ^”‚ðŒvŽZ */</span>
+ tot_sect = (fs->n_fatent - 2) * fs->csize;
+ fre_sect = fre_clust * fs->csize;
+
+ <span class="c">/* ƒhƒ‰ƒCƒuƒTƒCƒY‚Ƌ󂫃TƒCƒY‚Ì•\Ž¦ (512ƒoƒCƒg/ƒZƒNƒ^‚Ɖ¼’è) */</span>
+ printf("%lu KB total drive space.\n"
+ "%lu KB available.\n",
+ fre_sect / 2, tot_sect / 2);
+</pre>
+</div>
+
+
+<div class="para">
+<h4>ŽQÆ</h4>
+<tt><a href="sfatfs.html">FATFS</a></tt>
+</div>
+
+<p class="foot"><a href="../00index_j.html">–ß‚é</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/gets.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/gets.html
new file mode 100644
index 0000000..31e3fda
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/gets.html
@@ -0,0 +1,65 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_j.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/gets.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_gets</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_gets</h2>
+<p>ƒtƒ@ƒCƒ‹‚©‚當Žš—ñ‚ð“Ç‚Ýo‚µ‚Ü‚·B</p>
+<pre>
+TCHAR* f_gets (
+ TCHAR* <em>Str</em>, <span class="c">/* ƒoƒbƒtƒ@ */</span>
+ int <em>Size</em>, <span class="c">/* ƒoƒbƒtƒ@‚̃TƒCƒY */</span>
+ FIL* <em>FileObject</em> <span class="c">/* ƒtƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒg */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>ˆø”</h4>
+<dl class="par">
+<dt>Str</dt>
+<dd>•¶Žš—ñ‚ð“Ç‚Ýo‚·ƒoƒbƒtƒ@‚ðŽw‚·ƒ|ƒCƒ“ƒ^‚ðŽw’肵‚Ü‚·B</dd>
+<dt>Size</dt>
+<dd>ƒoƒbƒtƒ@‚̃TƒCƒY‚ð—v‘f”‚ÅŽw’肵‚Ü‚·B</dd>
+<dt>FileObject</dt>
+<dd>ƒtƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒg\‘¢‘̂ւ̃|ƒCƒ“ƒ^‚ðŽw’肵‚Ü‚·B</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>–ß‚è’l</h4>
+<p>ŠÖ”‚ª¬Œ÷‚·‚é‚Æ<tt>Str</tt>‚ª•Ô‚³‚ê‚Ü‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>‰ðà</h4>
+<p>‚±‚ÌŠÖ”‚Í<a href="read.html">f_read()</a>‚̃‰ƒbƒp[ŠÖ”‚Å‚·B“Ç‚Ýo‚µ“®ì‚ÍAʼn‚Ì<tt>'\n'</tt>‚ð“Ç‚Ýž‚Þ‚©Aƒtƒ@ƒCƒ‹I’[‚É’B‚·‚é‚©A<tt>Size - 1</tt>•¶Žš‚ð“Ç‚Ýo‚·‚Ü‚Å‘±‚«‚Ü‚·B“Ç‚Ýž‚܂ꂽ•¶Žš—ñ‚ÌI’[‚É‚Í<tt>'\0'</tt>‚ª•t‰Á‚³‚ê‚Ü‚·BŠù‚Ƀtƒ@ƒCƒ‹I’[‚Å1•¶Žš‚à“Ç‚Ýž‚Ü‚ê‚È‚©‚Á‚½‚Æ‚«A‚Ü‚½‚͉½‚ç‚©‚̃Gƒ‰[‚ª”­¶‚µ‚½‚Æ‚«‚ÍŠÖ”‚ÍŽ¸”s‚µƒkƒ‹Eƒ|ƒCƒ“ƒ^‚ð•Ô‚µ‚Ü‚·Bƒtƒ@ƒCƒ‹I’[‚©ƒGƒ‰[‚©‚Í<tt>f_eof()</tt>,<tt>f_error()</tt>ƒ}ƒNƒ‚Å’²‚ׂç‚ê‚Ü‚·B</p>
+<p>API‚ÉUnicode‚ª‘I‘ð‚³‚ê‚Ä‚¢‚é(<tt>_LFN_UNICODE</tt>‚ª1)‚Æ‚«‚ÍAUTF-8ƒGƒ“ƒR[ƒh‚̃eƒLƒXƒgEƒtƒ@ƒCƒ‹‚Æ‚µ‚ÄUCS-2‚É•ÏŠ·‚µ‚ăoƒbƒtƒ@‚É“Ç‚Ýž‚Ý‚Ü‚·B‚»‚êˆÈŠO‚ÌŽž‚Í–³•ÏŠ·(1•¶Žš1ƒoƒCƒg)‚Å“Ç‚Ýž‚Ý‚Ü‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>‘Ήžî•ñ</h4>
+<p><tt>_USE_STRFUNC</tt>‚ª 1‚Ü‚½‚Í 2‚Ì‚Æ‚«Žg—p‰Â”\‚Å‚·B2‚Ì‚Æ‚«‚ÍAƒtƒ@ƒCƒ‹‚ÉŠÜ‚Ü‚ê‚é<tt>'\r'</tt>‚ªŽæ‚蜂©‚ê‚ăoƒbƒtƒ@‚É“Ç‚Ýž‚Ü‚ê‚Ü‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>ŽQÆ</h4>
+<p><tt><a href="open.html">f_open</a>, <a href="read.html">f_read</a>, <a href="putc.html">f_putc</a>, <a href="puts.html">f_puts</a>, <a href="printf.html">f_printf</a>, <a href="close.html">f_close</a>, <a href="sfile.html">FIL</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_j.html">–ß‚é</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/lseek.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/lseek.html
new file mode 100644
index 0000000..e7af5f8
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/lseek.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_j.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/lseek.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_lseek</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_lseek</h2>
+<p>ƒtƒ@ƒCƒ‹‚̃Š[ƒh/ƒ‰ƒCƒgEƒ|ƒCƒ“ƒ^‚ðˆÚ“®‚µ‚Ü‚·B‚Ü‚½A‚‘¬ƒV[ƒN‹@”\Žg—pŽž‚É‚ÍCLMT(Œãq)‚Ì쬂ðs‚¢‚Ü‚·B</p>
+<pre>
+FRESULT f_lseek (
+ FIL* <em>FileObject</em>, <span class="c">/* ƒtƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒg\‘¢‘̂ւ̃|ƒCƒ“ƒ^ */</span>
+ DWORD <em>Offset</em> <span class="c">/* ˆÚ“®æƒIƒtƒZƒbƒg */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>ˆø”</h4>
+<dl class="par">
+<dt>FileObject</dt>
+<dd>‘ÎÛ‚Æ‚È‚éƒtƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒg\‘¢‘̂ւ̃|ƒCƒ“ƒ^‚ðŽw’肵‚Ü‚·B</dd>
+<dt>Offset</dt>
+<dd>ˆÚ“®æ‚̃IƒtƒZƒbƒgiƒŠ[ƒh/ƒ‰ƒCƒgEƒ|ƒCƒ“ƒ^j’lBƒtƒ@ƒCƒ‹æ“ª‚©‚ç‚̃IƒtƒZƒbƒg‚ðƒoƒCƒg’PˆÊ‚ÅŽw’肵‚Ü‚·B</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>–ß‚è’l</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>³íI—¹B</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>ƒfƒBƒXƒNEƒGƒ‰[‚É‚æ‚鎸”sB</dd>
+<dt>FR_INT_ERR</dt>
+<dd>•s³‚ÈFAT\‘¢‚Ü‚½‚Í“à•”ƒGƒ‰[‚É‚æ‚鎸”sB</dd>
+<dt>FR_NOT_READY</dt>
+<dd>ƒƒfƒBƒA‚ªƒZƒbƒg‚³‚ê‚Ä‚¢‚È‚¢‚È‚ÇA•¨—ƒhƒ‰ƒCƒu‚ª“®ì•s”\ó‘ÔB</dd>
+<dt>FR_INVALID_OBJECT</dt>
+<dd>–³Œø‚ȃtƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒgB</dd>
+<dt>FR_NOT_ENOUGH_CORE</dt>
+<dd>CLMTŠi”[ƒoƒbƒtƒ@‚̃TƒCƒY‚ª•s‘«B</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>‰ðà</h4>
+<p>ƒtƒ@ƒCƒ‹‚̃Š[ƒh/ƒ‰ƒCƒgEƒ|ƒCƒ“ƒ^(ƒtƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒg“à‚Ìfptrƒƒ“ƒo‚ÅAŽŸ‚É“Ç‚Ýo‚µE‘‚«ž‚Ý‚³‚ê‚éƒoƒCƒg‚̃IƒtƒZƒbƒg‚ðŽ¦‚·)‚ðˆÚ“®‚µ‚Ü‚·BƒIƒtƒZƒbƒg‚ÌŒ´“_‚̓tƒ@ƒCƒ‹æ“ª‚Å‚·B‘‚«ž‚݃‚[ƒh‚Ńtƒ@ƒCƒ‹EƒTƒCƒY‚æ‚è‘å‚«‚È’l‚ðŽw’è‚·‚é‚ÆA‚»‚±‚܂Ńtƒ@ƒCƒ‹EƒTƒCƒY‚ªŠg’£‚³‚êAŠg’£‚³‚ꂽ•”•ª‚̃f[ƒ^‚Í–¢’è‹`‚Æ‚È‚è‚Ü‚·Bƒf[ƒ^‚ð’x‰„–³‚­‚‘¬‚É‘‚«ž‚Ý‚½‚¢‚Æ‚«‚ÍA—\‚ß‚±‚ÌŠÖ”‚Å•K—v‚ȃTƒCƒY‚܂Ńtƒ@ƒCƒ‹EƒTƒCƒY‚ðŠg’£‚µ‚Ä‚¨‚­‚Æ—Ç‚¢‚Å‚µ‚傤Bf_lseekŠÖ”‚ª³íI—¹‚µ‚½‚ ‚Æ‚ÍAƒŠ[ƒh/ƒ‰ƒCƒgEƒ|ƒCƒ“ƒ^‚ª³‚µ‚­ˆÚ“®‚µ‚½‚©fptr‚ðƒ`ƒFƒbƒN‚·‚é‚ׂ«‚Å‚·BƒŠ[ƒh/ƒ‰ƒCƒgEƒ|ƒCƒ“ƒ^‚ªŽw’è‚æ‚謂³‚¢‚Æ‚«‚ÍAŽŸ‚ÌŒ´ˆö‚ªl‚¦‚ç‚ê‚Ü‚·B</p>
+<ul>
+<li>”ñ‘‚«ž‚݃‚[ƒh‚Ü‚½‚Í‚‘¬ƒV[ƒNEƒ‚[ƒh‚Ì‚½‚ßAƒtƒ@ƒCƒ‹EƒTƒCƒY‚ŃNƒŠƒbƒv‚³‚ꂽB</li>
+<li>ƒtƒ@ƒCƒ‹Šg’£’†‚ɃfƒBƒXƒN‚ª–ž”t‚É‚È‚Á‚½B</li>
+</ul>
+<p><tt>_USE_FASTSEEK</tt>‚É1‚ªŽw’肳‚ê‚Ä‚¢‚ÄAŠŽ‚ƒtƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒg‚Ì<tt>cltbl</tt>ƒƒ“ƒo‚ªNULLˆÈŠO(ƒtƒ@ƒCƒ‹‚ðŠJ‚¢‚½‚Æ‚«‚ÍNULL)‚Ì‚Æ‚«A‚‘¬ƒV[ƒNEƒ‚[ƒh‚É‚È‚è‚Ü‚·B‚±‚ê‚̓tƒ@ƒCƒ‹‚̃Nƒ‰ƒXƒ^”z’uî•ñ(CLMT)‚ðƒƒ‚ƒŠã‚É•ÛŽ‚µ‚Ä‚¨‚­‚±‚Æ‚É‚æ‚èAFAT‚ɃAƒNƒZƒX‚·‚邱‚Æ‚È‚­Œã•ûƒV[ƒN‚⃃“ƒOEƒV[ƒN‚ð‚‘¬‚És‚¤‹@”\‚Å‚·B‚‘¬ƒV[ƒNEƒ‚[ƒh‚ÍAf_read/f_wtiteŠÖ”‚É‚à“K—p‚³‚ê‚Ü‚·B‚‘¬ƒV[ƒNEƒ‚[ƒh‚Å‚Íf_wtite/f_lseekŠÖ”‚É‚æ‚éƒtƒ@ƒCƒ‹EƒTƒCƒY‚ÌŠg’£‚Í‚Å‚«‚Ü‚¹‚ñB</p>
+<p>‚‘¬ƒV[ƒN“®ì‚ðs‚¤‘O‚ÉACLMT‚ð쬂µ‚Ä‚¨‚­•K—v‚ª‚ ‚è‚Ü‚·B‚±‚ê‚ð쬂·‚é‚É‚ÍA‚Ü‚¸<tt>cltbl</tt>ƒƒ“ƒo‚ÉCLMTŠi”[ƒoƒbƒtƒ@(DWORD”z—ñ)‚ւ̃|ƒCƒ“ƒ^‚ðƒZƒbƒg‚µ‚Ü‚·B‚»‚µ‚ÄA”z—ñ‚Ì擪—v‘f‚É‚»‚Ì”z—ñ‚Ì—v‘f”‚ð“ü‚êAf_lseekŠÖ”‚ð<tt>Offset</tt>‚É<tt>CREATE_LINKMAP</tt>‚ðŽw’肵‚ÄŽÀs‚µ‚Ü‚·BŠÖ”‚ª¬Œ÷‚·‚é‚ÆCLMT‚ªì¬‚³‚êAˆÈ~‚Ìf_read/f_write/f_lseekŠÖ”‚Å‚ÍFAT‚ւ̃AƒNƒZƒX‚Í”­¶‚µ‚Ü‚¹‚ñB<tt>FR_NOT_ENOUGH_CORE</tt>‚ÅŽ¸”s‚µ‚½‚Æ‚«‚Í”z—ñƒTƒCƒY‚ª•s‘«‚ÅA擪—v‘f‚É‚ÍŽÀÛ‚É•K—v‚Æ‚È‚é—v‘f”‚ª•Ô‚³‚ê‚Ü‚·B•K—v‚È—v‘f”‚ÍA(ƒtƒ@ƒCƒ‹‚Ì•ªŠ„” + 1) * 2 ‚Å‚·B‚½‚Æ‚¦‚ÎAƒtƒ@ƒCƒ‹‚ª5‚‚ɕª’f‚³‚ê‚Ä‚¢‚é‚Æ‚«‚É•K—v‚È—v‘f”‚ÍA12‚Æ‚È‚è‚Ü‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>‘Ήžî•ñ</h4>
+<p><tt>_FS_MINIMIZE &lt; 3</tt>‚Ì‚Æ‚«Žg—p‰Â”\‚Å‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>Žg—p—á</h4>
+<pre>
+ <span class="c">/* ƒtƒ@ƒCƒ‹‚ðŠJ‚­ */</span>
+ file = malloc(sizeof(FIL));
+ if (!file) ...
+ res = f_open(file, "file.dat", FA_READ|FA_WRITE);
+ if (res) ...
+
+ <span class="c">/* ƒtƒ@ƒCƒ‹EƒIƒtƒZƒbƒg5000‚ÖˆÚ“® */</span>
+ res = f_lseek(file, 5000, 0);
+
+ <span class="c">/* ƒtƒ@ƒCƒ‹I’[‚ÖˆÚ“®(ƒtƒ@ƒCƒ‹’Ç‹L‚Ì€”õ) */</span>
+ res = f_lseek(file, f_size(file), 0);
+
+ <span class="c">/* 3000ƒoƒCƒgi‚ß‚é */</span>
+ res = f_lseek(file, f_tell(file) + 3000, 0);
+
+ <span class="c">/* 2000ƒoƒCƒg–ß‚· (ƒI[ƒo[ƒtƒ[‚É’ˆÓ) */</span>
+ res = f_lseek(file, f_tell(file) - 2000, 0);
+</pre>
+<pre>
+ <span class="c">/* ƒNƒ‰ƒXƒ^æsŠ„‚è“–‚Ä (ƒXƒgƒŠ[ƒ~ƒ“ƒOEƒ‰ƒCƒgŽž‚̃oƒbƒtƒ@EƒI[ƒo[ƒ‰ƒ“–hŽ~) */</span>
+
+ res = f_open(file, "record.wav", FA_CREATE_NEW | FA_WRITE); <span class="c">/* ƒtƒ@ƒCƒ‹ì¬ */</span>
+
+ res = f_lseek(file, MAX_SIZE, 0); <span class="c">/* \•ª‚ȃNƒ‰ƒXƒ^‚ÌæsŠ„‚è“–‚Ä */</span>
+ if (res || file.fptr != PRE_SIZE) .... <span class="c">/* ³‚µ‚­ƒtƒ@ƒCƒ‹‚ªŠg’£‚³‚ꂽ‚©ƒ`ƒFƒbƒN */</span>
+
+ res = f_lseek(file, DATA_START, 0); <span class="c">/* ƒf[ƒ^EƒXƒgƒŠ[ƒ€‚Ì‹L˜^(ƒAƒƒP[ƒVƒ‡ƒ“ƒfƒBƒŒƒC–³‚µ) */</span>
+ ...
+
+ res = f_truncate(file); <span class="c">/* •s—v—̈æ‚ÌØ‚èŽÌ‚Ä */</span>
+ res = f_lseek(file, 0, 0); <span class="c">/* ƒwƒbƒ_‚Ì‹L˜^ */</span>
+ ...
+
+ res = f_close(file);
+</pre>
+<pre>
+ <span class="c">/* ‚‘¬ƒV[ƒN‹@”\‚ðŽg‚¤ */</span>
+
+ DWORD lktbl[SZ_TBL]; <span class="c">/* ƒŠƒ“ƒNEƒ}ƒbƒvEƒe[ƒuƒ‹Ši”[ƒoƒbƒtƒ@ */</span>
+
+ res = f_lseek(file, ofs1); <span class="c">/* ’ÊíƒV[ƒN (ƒI[ƒvƒ“ŽžAfile.cltbl == NULL) */</span>
+
+ file.cltbl = lktbl; <span class="c">/* ‚‘¬ƒV[ƒN‹@”\‚Ì—LŒø‰» */</span>
+ lktbl[0] = SZ_TBL; <span class="c">/* 擪—v‘f‚É”z—ñ—v‘f”‚ðƒZƒbƒg */</span>
+ res = f_lseek(file, CREATE_LINKMAP); <span class="c">/* CLMT‚Ìì¬ */</span>
+ ...
+
+ res = f_lseek(file, ofs2); <span class="c">/* ˆÈ~Af_read/f_write/f_lseek‚ÅFATƒAƒNƒZƒX‚ª”­¶‚µ‚È‚¢ */</span>
+</pre>
+</div>
+
+
+<div class="para">
+<h4>ŽQÆ</h4>
+<p><tt><a href="open.html">f_open</a>, <a href="sfile.html">FIL</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_j.html">–ß‚é</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/mkdir.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/mkdir.html
new file mode 100644
index 0000000..beda5bb
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/mkdir.html
@@ -0,0 +1,90 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_j.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/mkdir.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_mkdir</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_mkdir</h2>
+<p>ƒfƒBƒŒƒNƒgƒŠ‚ð쬂µ‚Ü‚·B</p>
+<pre>
+FRESULT f_mkdir (
+ const TCHAR* <em>DirName</em> <span class="c">/* 쬂·‚éƒfƒBƒŒƒNƒgƒŠ–¼‚ւ̃|ƒCƒ“ƒ^ */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>ˆø”</h4>
+<dl class="par">
+<dt>DirName</dt>
+<dd>쬂·‚éƒfƒBƒŒƒNƒgƒŠ‚Ì<a href="filename.html">ƒpƒX–¼</a>‚ª“ü‚Á‚½<tt>'\0'</tt>‚ÅI‚í‚镶Žš—ñ‚ւ̃|ƒCƒ“ƒ^‚ðŽw’肵‚Ü‚·B</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>–ß‚è’l</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>³íI—¹B</dd>
+<dt>FR_NO_PATH</dt>
+<dd>ƒpƒX‚ªŒ©‚‚©‚ç‚È‚¢B</dd>
+<dt>FR_INVALID_NAME</dt>
+<dd>ƒpƒX–¼‚ª•s³B</dd>
+<dt>FR_INVALID_DRIVE</dt>
+<dd>ƒhƒ‰ƒCƒu”Ô†‚ª•s³B</dd>
+<dt>FR_DENIED</dt>
+<dd>ƒfƒBƒXƒN‚âƒfƒBƒŒƒNƒgƒŠEƒGƒ“ƒgƒŠ‚ª–ž”t‚ÌꇂȂÇB</dd>
+<dt>FR_EXIST</dt>
+<dd>“¯–¼‚̃IƒuƒWƒFƒNƒg‚ª‘¶Ý‚·‚éB</dd>
+<dt>FR_NOT_READY</dt>
+<dd>ƒƒfƒBƒA‚ªƒZƒbƒg‚³‚ê‚Ä‚¢‚È‚¢‚È‚ÇA•¨—ƒhƒ‰ƒCƒu‚ª“®ì•s”\ó‘ÔB</dd>
+<dt>FR_WRITE_PROTECTED</dt>
+<dd>ƒƒfƒBƒA‚ª‘‚«ž‚Ý‹ÖŽ~ó‘ÔB</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>ƒfƒBƒXƒNEƒGƒ‰[‚É‚æ‚鎸”sB</dd>
+<dt>FR_INT_ERR</dt>
+<dd>•s³‚ÈFAT\‘¢‚Ü‚½‚Í“à•”ƒGƒ‰[‚É‚æ‚鎸”sB</dd>
+<dt>FR_NOT_ENABLED</dt>
+<dd>‚»‚̘_—ƒhƒ‰ƒCƒu‚Ƀ[ƒNEƒGƒŠƒA‚ª—^‚¦‚ç‚ê‚Ä‚¢‚È‚¢B</dd>
+<dt>FR_NO_FILESYSTEM</dt>
+<dd>—LŒø‚ÈFATƒ{ƒŠƒ…[ƒ€‚ªŒ©‚‚©‚ç‚È‚¢B</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>‰ðà</h4>
+<p>‹ó‚̃fƒBƒŒƒNƒgƒŠ‚ð쬂µ‚Ü‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>‘Ήžî•ñ</h4>
+<p><tt>_FS_READONLY == 0</tt>‚ÅAŠŽ‚Â<tt>_FS_MINIMIZE == 0</tt>‚Ì‚Æ‚«Žg—p‰Â”\‚Å‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>Žg—p—á</h4>
+<pre>
+ res = f_mkdir("sub1");
+ if (res) die(res);
+ res = f_mkdir("sub1/sub2");
+ if (res) die(res);
+ res = f_mkdir("sub1/sub2/sub3");
+ if (res) die(res);
+</pre>
+</div>
+
+<p class="foot"><a href="../00index_j.html">–ß‚é</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/mkfs.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/mkfs.html
new file mode 100644
index 0000000..e0632c4
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/mkfs.html
@@ -0,0 +1,80 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_j.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/mkfs.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_mkfs</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_mkfs</h2>
+<p>•¨—ƒhƒ‰ƒCƒuã‚ÉFATƒ{ƒŠƒ…[ƒ€‚ðì¬(ƒtƒH[ƒ}ƒbƒg)‚µ‚Ü‚·B</p>
+<pre>
+FRESULT f_mkfs (
+ BYTE <em>Drive</em>, <span class="c">/* ˜_—ƒhƒ‰ƒCƒu”Ô† */</span>
+ BYTE <em>PartitioningRule</em>, <span class="c">/* ‹æ‰æ쬕û–@ */</span>
+ UINT <em>AllocSize</em> <span class="c">/* ƒNƒ‰ƒXEƒ^ƒTƒCƒY */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>ˆø”</h4>
+<dl class="par">
+<dt>Drive</dt>
+<dd>ƒtƒH[ƒ}ƒbƒg‚·‚é˜_—ƒhƒ‰ƒCƒu(0-9)B</dd>
+<dt>PartitioningRule</dt>
+<dd>0‚ðŽw’è‚·‚é‚ÆAƒhƒ‰ƒCƒu‚Ì‘S—̈æ‚ðè‚ß‚éŠî–{DOS‹æ‰æ‚ð쬂µ‚½‚ ‚ÆA‚»‚±‚ÉFATƒ{ƒŠƒ…[ƒ€‚ð쬂µ‚Ü‚·(FDISKƒtƒH[ƒ}ƒbƒg)B1‚ðŽw’è‚·‚é‚ÆA‹æ‰æƒe[ƒuƒ‹‚ð쬂¹‚¸•¨—ƒhƒ‰ƒCƒu‚Ì擪ƒZƒNƒ^‚©‚ç’¼Úƒtƒ@ƒCƒ‹EƒVƒXƒeƒ€‚ð쬂µ‚Ü‚·(super floppy (SFD) ƒtƒH[ƒ}ƒbƒg)B</dd>
+<dt>AllocSize</dt>
+<dd>ƒNƒ‰ƒXƒ^EƒTƒCƒY‚ðƒoƒCƒg’PˆÊ‚ÅŽw’肵‚Ü‚·B2‚Ì—ÝæAŠŽ‚ƒZƒNƒ^EƒTƒCƒYˆÈãAŠŽ‚ƒZƒNƒ^EƒTƒCƒY‚Ì128”{ˆÈ‰º‚Å‚È‚¯‚ê‚΂Ȃè‚Ü‚¹‚ñB–³Œø‚È’l‚ðŽw’肵‚½ê‡Aƒhƒ‰ƒCƒuEƒTƒCƒY‚ɉž‚¶‚½ƒfƒtƒHƒ‹ƒg‚̃Nƒ‰ƒXƒ^EƒTƒCƒY‚ª‘I‘ð‚³‚ê‚Ü‚·B“Á‚ÉŽw’肵‚È‚¢ê‡‚ÍA0‚ðŽw’肵‚ÄŽ©“®‘I‘ð‚Æ‚µ‚Ü‚·B</dd>
+</dl>
+</div>
+
+<div class="para">
+<h4>–ß‚è’l</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>³íI—¹B</dd>
+<dt>FR_INVALID_DRIVE</dt>
+<dd>ƒhƒ‰ƒCƒu”Ô†‚ª–³ŒøB</dd>
+<dt>FR_NOT_READY</dt>
+<dd>ƒƒfƒBƒA‚ªƒZƒbƒg‚³‚ê‚Ä‚¢‚È‚¢‚È‚ÇA•¨—ƒhƒ‰ƒCƒu‚ª“®ì•s”\ó‘ÔB</dd>
+<dt>FR_WRITE_PROTECTED</dt>
+<dd>ƒƒfƒBƒA‚ª‘‚«ž‚Ý‹ÖŽ~ó‘ÔB</dd>
+<dt>FR_NOT_ENABLED</dt>
+<dd>‚»‚̘_—ƒhƒ‰ƒCƒu‚Ƀ[ƒNEƒGƒŠƒA‚ªŠ„‚è“–‚Ä‚ç‚ê‚Ä‚¢‚È‚¢B</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>ƒfƒBƒXƒNEƒGƒ‰[‚É‚æ‚鎸”sB</dd>
+<dt>FR_MKFS_ABORTED</dt>
+<dd>ŽŸ‚Ì——R‚ÅŠJŽn‘O‚Ɉ—‚ª’†’f‚³‚ꂽB
+<ul>
+<li>ƒfƒBƒXƒNEƒTƒCƒY‚ª¬‚³‚·‚¬‚éB</li>
+<li>‰½‚ç‚©‚̈ø”‚ª•s³B</li>
+<li>‚»‚̃Nƒ‰ƒXƒ^EƒTƒCƒY‚ªŽg‚¦‚È‚¢BƒNƒ‰ƒXƒ^”‚ªFATƒ^ƒCƒv‚Ì‹«ŠE‚É‹ß‚­‚È‚é‚Æ‚«”­¶‚·‚é‰Â”\«‚ª‚ ‚éB</li>
+</ul>
+</dd>
+</dl>
+</div>
+
+<div class="para">
+<h4>à–¾</h4>
+<p>f_mkfsŠÖ”‚Í•¨—ƒhƒ‰ƒCƒuã‚ÉFATƒ{ƒŠƒ…[ƒ€‚ð쬂µ‚Ü‚·BƒŠƒ€[ƒoƒuƒ‹EƒƒfƒBƒA‚̃p[ƒe[ƒVƒ‡ƒjƒ“ƒOEƒ‹[ƒ‹‚Æ‚µ‚Ä‚ÍFDISKŒ`Ž®‚ÆSFDŒ`Ž®‚ª‚ ‚èAƒƒ‚ƒŠEƒJ[ƒh‚Å‚ÍFDISKŒ`Ž®‚ª•’Ê‚Å‚·B‚±‚ÌŠÖ”‚Í<em>•¡”‹æ‰æ‚ɂ͑Ήž‚µ‚Ä‚¢‚È‚¢</em>‚Ì‚ÅA‚»‚Ì•¨—ƒhƒ‰ƒCƒu‚ÌŠù‘¶‚Ì‹æ‰æ‚Í‘S‚Ä휂³‚êA‘S‘Ì‚ªˆê‚‚̋æ‰æ‚É‚È‚è‚Ü‚·B</p>
+<p>FATƒ^ƒCƒv(FAT12/FAT16/FAT32)‚ÍA‚»‚̘_—ƒhƒ‰ƒCƒuã‚Ì<em>ƒNƒ‰ƒXƒ^”‚É‚æ‚Á‚Ä‚Ì‚ÝŒˆ’è</em>‚³‚ê‚錈‚Ü‚è[FATŽd—l‘‚æ‚è]‚É‚È‚Á‚Ä‚¢‚ÄA‚»‚êˆÈŠO‚Ì—vˆö‚Í‚ ‚è‚Ü‚¹‚ñB‚µ‚½‚ª‚Á‚ÄA‚Ç‚ÌFATƒ^ƒCƒv‚É‚È‚é‚©‚̓hƒ‰ƒCƒuEƒTƒCƒY‚ƃNƒ‰ƒXƒ^EƒTƒCƒY‚Ɉˑ¶‚µ‚Ü‚·BƒNƒ‰ƒXƒ^EƒTƒCƒY‚Í‘å‚«‚­‚·‚é‚Ù‚Ç«”\‚ªã‚ª‚èA‹t‚ɃfƒBƒXƒN—˜—pŒø—¦‚Í—Ž‚¿‚Ü‚·B</p>
+<p>ƒNƒ‰ƒXƒ^”‚ªFATƒ^ƒCƒv‚Ì‹«ŠE‚É‹ß‚­‚È‚é‚Æ‚«‚ÍAFR_MKFS_ABORTED‚ÅŠÖ”‚ªŽ¸”s‚·‚é‰Â”\«‚ª‚ ‚è‚Ü‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>‘Ήžî•ñ</h4>
+<p><tt>_FS_READONLY == 0</tt>‚ÅAŠŽ‚Â<tt>_USE_MKFS == 1</tt>‚Ì‚Æ‚«Žg—p‰Â”\‚Å‚·B</p>
+</div>
+
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/mount.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/mount.html
new file mode 100644
index 0000000..c2f4dc4
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/mount.html
@@ -0,0 +1,66 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_j.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/mount.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_mount</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_mount</h2>
+<p>˜_—ƒhƒ‰ƒCƒu‚̃[ƒNEƒGƒŠƒA‚ð“o˜^E–•Á‚µ‚Ü‚·B</p>
+<pre>
+FRESULT f_mount (
+ BYTE <em>Drive</em>, <span class="c">/* ˜_—ƒhƒ‰ƒCƒu”Ô† */</span>
+ FATFS* <em>FileSystemObject</em> <span class="c">/* ƒ[ƒNEƒGƒŠƒA‚ւ̃|ƒCƒ“ƒ^ */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>ˆø”</h4>
+<dl class="par">
+<dt>Drive</dt>
+<dd>˜_—ƒhƒ‰ƒCƒu”Ô†(0-9)B</dd>
+<dt>FileSystemObject</dt>
+<dd>“o˜^‚·‚éƒ[ƒNEƒGƒŠƒA(ƒtƒ@ƒCƒ‹EƒVƒXƒeƒ€EƒIƒuƒWƒFƒNƒg)‚ւ̃|ƒCƒ“ƒ^B</dd>
+</dl>
+</div>
+
+<div class="para">
+<h4>–ß‚è’l</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>³íI—¹B</dd>
+<dt>FR_INVALID_DRIVE</dt>
+<dd>˜_—ƒhƒ‰ƒCƒu”Ô†‚ª–³ŒøB</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>‰ðà</h4>
+<p>FatFsƒ‚ƒWƒ…[ƒ‹‚Å‚Í‚»‚ꂼ‚ê‚̘_—ƒhƒ‰ƒCƒu‚Ƀtƒ@ƒCƒ‹EƒVƒXƒeƒ€EƒIƒuƒWƒFƒNƒg‚Æ‚¢‚¤ƒ[ƒNEƒGƒŠƒA‚ª•K—v‚Å‚·B‚±‚ÌŠÖ”‚͘_—ƒhƒ‰ƒCƒu‚É‚»‚̃[ƒNEƒGƒŠƒA‚ð“o˜^‚µ‚½‚è–•Á‚µ‚½‚肵‚Ü‚·B‰½‚ç‚©‚̃tƒ@ƒCƒ‹ŠÖ”‚ðŽg—p‚·‚é‘O‚É‚±‚ÌŠÖ”‚Å‚»‚̘_—ƒhƒ‰ƒCƒu‚̃[ƒNEƒGƒŠƒA‚ð—^‚¦‚Ä‚¨‚©‚È‚¯‚ê‚΂Ȃè‚Ü‚¹‚ñB<tt>FileSystemObject</tt>‚Ƀkƒ‹Eƒ|ƒCƒ“ƒ^‚ðŽw’è‚·‚é‚Æ‚»‚̘_—ƒhƒ‰ƒCƒu‚̃[ƒNEƒGƒŠƒA‚Ì“o˜^‚Í–•Á‚³‚êA“o˜^‚³‚ê‚Ä‚¢‚½ƒ[ƒNEƒGƒŠƒA‚Í”jŠü‚Å‚«‚Ü‚·B‘€ì‘Îۂ̃hƒ‰ƒCƒu‚ɑ΂µ‚ÄŠJ‚©‚ê‚Ä‚¢‚éƒtƒ@ƒCƒ‹‚âƒfƒBƒŒƒNƒgƒŠ‚ª‚ ‚Á‚½ê‡A‚»‚ê‚ç‚Í‘S‚Ä–³Œø‚É‚È‚è‚Ü‚·B</p>
+<p>‚±‚ÌŠÖ”‚ÍAƒhƒ‰ƒCƒu‚Ìó‘Ô‚ÉŠÖ‚í‚炸í‚ɬŒ÷‚µ‚Ü‚·BŠÖ”“à‚ł͉ºˆÊƒŒƒCƒ„(•¨—ƒhƒ‰ƒCƒu)‚ւ̃AƒNƒZƒX‚Í”­¶‚¹‚¸Aƒ[ƒNEƒGƒŠƒA‚ð‰Šú‰»‚µ‚Ä“à•””z—ñ‚É‚»‚̃AƒhƒŒƒX‚ð“o˜^‚·‚邾‚¯‚Å‚·BŽÀۂ̃}ƒEƒ“ƒg“®ì‚ÍA‚±‚ÌŠÖ”‚ÌŽÀs‚Ü‚½‚̓ƒfƒBƒAŒðŠ·”­¶‚ÌŒãAʼn‚̃tƒ@ƒCƒ‹EƒAƒNƒZƒX‚Ì‚Æ‚«‚És‚í‚ê‚Ü‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>‘Ήžî•ñ</h4>
+<p>‘S‚Ä‚Ì\¬‚ÅŽg—p‰Â”\‚Å‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>ŽQÆ</h4>
+<p><tt><a href="sfatfs.html">FATFS</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_j.html">–ß‚é</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/open.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/open.html
new file mode 100644
index 0000000..b6f4150
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/open.html
@@ -0,0 +1,153 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_j.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/open.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_open</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_open</h2>
+<p>ƒtƒ@ƒCƒ‹‚ðƒI[ƒvƒ“‚Ü‚½‚Í쬂µ‚Ü‚·B</p>
+<pre>
+FRESULT f_open (
+ FIL* <em>FileObject</em>, <span class="c">/* ‹ó‚̃tƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒg\‘¢‘̂ւ̃|ƒCƒ“ƒ^ */</span>
+ const TCHAR* <em>FileName</em>, <span class="c">/* ƒtƒ@ƒCƒ‹‚̃tƒ‹ƒpƒX–¼‚ւ̃|ƒCƒ“ƒ^ */</span>
+ BYTE <em>ModeFlags</em> <span class="c">/* ƒ‚[ƒhƒtƒ‰ƒO */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>ˆø”</h4>
+<dl class="par">
+<dt>FileObject</dt>
+<dd>V‚µ‚­ì¬‚·‚éƒtƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒg\‘¢‘̂ւ̃|ƒCƒ“ƒ^‚ðŽw’肵‚Ü‚·BˆÈ~A‚»‚̃tƒ@ƒCƒ‹‚ð•Â‚¶‚é‚Ü‚Å‚±‚̃tƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒg‚ðŽg—p‚µ‚ătƒ@ƒCƒ‹‘€ì‚ð‚µ‚Ü‚·B</dd>
+<dt>FileName</dt>
+<dd>ŠJ‚­(‚Ü‚½‚Í쬂·‚é)ƒtƒ@ƒCƒ‹‚Ì <a href="filename.html">ƒtƒ@ƒCƒ‹–¼</a>‚ª“ü‚Á‚½<tt>'\0'</tt>‚ÅI‚í‚镶Žš—ñ‚ւ̃|ƒCƒ“ƒ^‚ðŽw’肵‚Ü‚·B</dd>
+<dt>ModeFlags</dt>
+<dd>ƒtƒ@ƒCƒ‹‚̃AƒNƒZƒX•û–@‚âƒI[ƒvƒ“•û–@‚ðŒˆ‚ß‚éƒtƒ‰ƒO‚Å‚·B‚±‚̃pƒ‰ƒ[ƒ^‚É‚ÍŽŸ‚Ì‘g‚݇‚킹‚ðŽw’肵‚Ü‚·B<br>
+<table class="lst">
+<tr><th>’l</th><th>ˆÓ–¡</th></tr>
+<tr><td>FA_READ</td><td>“Ç‚Ýo‚µƒ‚[ƒh‚ÅŠJ‚«‚Ü‚·B“Ç‚Ý‘‚«‚·‚éꇂÍ<tt>FA_WRITE</tt>‚Æ‹¤‚ÉŽw’肵‚Ü‚·B</td></tr>
+<tr><td>FA_WRITE</td><td>‘‚«ž‚݃‚[ƒh‚ÅŠJ‚«‚Ü‚·B“Ç‚Ý‘‚«‚·‚éꇂÍ<tt>FA_READ</tt>‚Æ‹¤‚ÉŽw’肵‚Ü‚·B</td></tr>
+<tr><td>FA_OPEN_EXISTING</td><td>Šù‘¶‚̃tƒ@ƒCƒ‹‚ðŠJ‚«‚Ü‚·Bƒtƒ@ƒCƒ‹‚ª–³‚¢‚Æ‚«‚̓Gƒ‰[‚É‚È‚è‚Ü‚·B(ƒfƒtƒHƒ‹ƒg)</td></tr>
+<tr><td>FA_OPEN_ALWAYS</td><td>Šù‘¶‚̃tƒ@ƒCƒ‹‚ðŠJ‚«‚Ü‚·Bƒtƒ@ƒCƒ‹‚ª–³‚¢‚Æ‚«‚̓tƒ@ƒCƒ‹‚ð쬂µ‚Ü‚·B’Ç‹L‘€ì‚·‚éꇂÍA‚±‚Ì•û–@‚ŃI[ƒvƒ“‚µ‚½ŒãA<tt>f_lseek()</tt>‚Ńtƒ@ƒCƒ‹‚ÌÅŒã”ö‚Ɉړ®‚µ‚Ä‚­‚¾‚³‚¢B</td></tr>
+<tr><td>FA_CREATE_NEW</td><td>ƒtƒ@ƒCƒ‹‚ð쬂µ‚Ü‚·B“¯–¼‚̃tƒ@ƒCƒ‹‚ª‚ ‚éꇂÍAƒGƒ‰[(FR_EXIST)‚É‚È‚è‚Ü‚·B</td></tr>
+<tr><td>FA_CREATE_ALWAYS</td><td>ƒtƒ@ƒCƒ‹‚ð쬂µ‚Ü‚·B“¯–¼‚̃tƒ@ƒCƒ‹‚ª‚ ‚éꇂÍAƒTƒCƒY‚ð0‚É‚µ‚Ä‚©‚çŠJ‚«‚Ü‚·B</td></tr>
+</table>
+</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>–ß‚è’l</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>³íI—¹BˆÈ~A<tt>FileObject</tt>\‘¢‘Ì‚ðŽg‚Á‚Ä‚±‚̃tƒ@ƒCƒ‹‚ð‘€ì‚Å‚«‚Ü‚·B</dd>
+<dt>FR_NO_FILE</dt>
+<dd>ƒtƒ@ƒCƒ‹‚ªŒ©‚‚©‚ç‚È‚¢B</dd>
+<dt>FR_NO_PATH</dt>
+<dd>ƒpƒX‚ªŒ©‚‚©‚ç‚È‚¢B</dd>
+<dt>FR_INVALID_NAME</dt>
+<dd>ƒtƒ@ƒCƒ‹–¼‚ª•s³B</dd>
+<dt>FR_INVALID_DRIVE</dt>
+<dd>ƒhƒ‰ƒCƒu”Ô†‚ª•s³B</dd>
+<dt>FR_EXIST</dt>
+<dd>“¯–¼‚̃tƒ@ƒCƒ‹‚ªŠù‚É‘¶Ý‚·‚éB</dd>
+<dt>FR_DENIED</dt>
+<dd>ƒAƒNƒZƒX‚ª‹‘”Û‚³‚ꂽB
+<ul>
+<li>ƒŠ[ƒhEƒIƒ“ƒŠ[Eƒtƒ@ƒCƒ‹‚Ì‘‚«ž‚݃‚[ƒhEƒI[ƒvƒ“B</li>
+<li>“¯–¼‚̃fƒBƒŒƒNƒgƒŠ‚Ü‚½‚̓Š[ƒhEƒIƒ“ƒŠ[Eƒtƒ@ƒCƒ‹‚ª‚ ‚éó‘Ԃł̃tƒ@ƒCƒ‹ì¬B</li>
+<li>ƒfƒBƒŒƒNƒgƒŠEƒe[ƒuƒ‹‚ª–ž”t‚Ńtƒ@ƒCƒ‹‚ð쬂ł«‚È‚¢B</li>
+</ul>
+</dd>
+<dt>FR_NOT_READY</dt>
+<dd>ƒƒfƒBƒA‚ªƒZƒbƒg‚³‚ê‚Ä‚¢‚È‚¢‚È‚ÇA•¨—ƒhƒ‰ƒCƒu‚ª“®ì•s”\ó‘ÔB</dd>
+<dt>FR_WRITE_PROTECTED</dt>
+<dd>ƒƒfƒBƒA‚ª‘‚«ž‚Ý‹ÖŽ~ó‘Ô‚Å‘‚«ž‚ÝŒnƒI[ƒvƒ“‚ð‚µ‚½B</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>ƒfƒBƒXƒNEƒGƒ‰[‚É‚æ‚鎸”sB</dd>
+<dt>FR_INT_ERR</dt>
+<dd>•s³‚ÈFAT\‘¢‚Ü‚½‚Í“à•”ƒGƒ‰[‚É‚æ‚鎸”sB</dd>
+<dt>FR_NOT_ENABLED</dt>
+<dd>‚»‚̘_—ƒhƒ‰ƒCƒu‚Ƀ[ƒNEƒGƒŠƒA‚ªŠ„‚è“–‚Ä‚ç‚ê‚Ä‚¢‚È‚¢B</dd>
+<dt>FR_NO_FILESYSTEM</dt>
+<dd>—LŒø‚ÈFATƒ{ƒŠƒ…[ƒ€‚ªŒ©‚‚©‚ç‚È‚¢B</dd>
+<dt>FR_LOCKED</dt>
+<dd>ƒtƒ@ƒCƒ‹‹¤—L‹@”\(_FS_SHARE)‚É‚æ‚éƒAƒNƒZƒX‹‘”ÛB</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>‰ðà</h4>
+<p>Šù‘¶‚̃tƒ@ƒCƒ‹‚ðŠJ‚¢‚½‚èAV‚µ‚¢ƒtƒ@ƒCƒ‹‚ð쬂µ‚Ü‚·BŠÖ”‚ª¬Œ÷‚·‚é‚ƃtƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒg‚ªì¬‚³‚êAˆÈ~‚»‚̃tƒ@ƒCƒ‹‚ɑ΂·‚éƒAƒNƒZƒX‚ÉŽg—p‚µ‚Ü‚·Bƒtƒ@ƒCƒ‹‚ð•Â‚¶‚é‚Æ‚«‚ÍA<a href="close.html">f_close()</a>‚ðŽg—p‚µ‚Ü‚·B‰½‚ç‚©‚Ì•ÏX‚ªs‚í‚ꂽƒtƒ@ƒCƒ‹‚ª‚»‚̌㳂µ‚­•Â‚¶‚ç‚ê‚È‚©‚Á‚½ê‡A‚»‚̃tƒ@ƒCƒ‹‚ª”j‘¹‚·‚éꇂª‚ ‚è‚Ü‚·B</p>
+<p>ƒtƒ@ƒCƒ‹EƒAƒNƒZƒX‚ðŠJŽn‚·‚é‘O‚ÉA<a href="mount.html">f_mount()</a>‚ðŽg‚Á‚Ä‚»‚ꂼ‚ê‚̘_—ƒhƒ‰ƒCƒu‚Ƀ[ƒNEƒGƒŠƒA(ƒtƒ@ƒCƒ‹EƒVƒXƒeƒ€EƒIƒuƒWƒFƒNƒg)‚ð—^‚¦‚é•K—v‚ª‚ ‚è‚Ü‚·B‚±‚̉Šú‰»‚ÌŒãA‚»‚̘_—ƒhƒ‰ƒCƒu‚ɑ΂µ‚Ä‘S‚Ẵtƒ@ƒCƒ‹ŠÖ”‚ªŽg‚¦‚é‚悤‚É‚È‚è‚Ü‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>‘Ήžî•ñ</h4>
+<p>‘S‚Ä‚Ì\¬‚ÅŽg—p‰Â”\‚Å‚·B<tt>_FS_READONLY == 1</tt>‚Ì‚Æ‚«‚ÍA<tt>FA_WRITE, FA_CREATE_ALWAYS, FA_CREATE_NEW, FA_OPEN_ALWAYS</tt>‚ÌŠeƒtƒ‰ƒO‚̓Tƒ|[ƒg‚³‚ê‚Ü‚¹‚ñB</p>
+</div>
+
+
+<div class="para">
+<h4>Žg—p—áiƒtƒ@ƒCƒ‹EƒRƒs[j</h4>
+<pre>
+void main (void)
+{
+ FATFS fs[2]; <span class="c">/* ˜_—ƒhƒ‰ƒCƒu‚̃[ƒNEƒGƒŠƒA(ƒtƒ@ƒCƒ‹EƒVƒXƒeƒ€EƒIƒuƒWƒFƒNƒg) */</span>
+ FIL fsrc, fdst; <span class="c">/* ƒtƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒg */</span>
+ BYTE buffer[4096]; <span class="c">/* file copy buffer */</span>
+ FRESULT res; <span class="c">/* FatFs function common result code */</span>
+ UINT br, bw; <span class="c">/* File R/W count */</span>
+
+ <span class="c">/* ƒhƒ‰ƒCƒu0,1‚Ƀ[ƒNEƒGƒŠƒA‚ð—^‚¦‚é (í‚ɬŒ÷‚·‚é) */</span>
+ f_mount(0, &amp;fs[0]);
+ f_mount(1, &amp;fs[1]);
+
+ <span class="c">/* ƒhƒ‰ƒCƒu1‚̃\[ƒXEƒtƒ@ƒCƒ‹‚ðŠJ‚­ */</span>
+ res = f_open(&amp;fsrc, "1:srcfile.dat", FA_OPEN_EXISTING | FA_READ);
+ if (res) die(res);
+
+ <span class="c">/* ƒhƒ‰ƒCƒu0‚ɃfƒXƒeƒBƒl[ƒVƒ‡ƒ“Eƒtƒ@ƒCƒ‹‚ð쬂·‚é */</span>
+ res = f_open(&amp;fdst, "0:dstfile.dat", FA_CREATE_ALWAYS | FA_WRITE);
+ if (res) die(res);
+
+ <span class="c">/* ƒ\[ƒX‚©‚çƒfƒXƒeƒBƒl[ƒVƒ‡ƒ“‚ɃRƒs[‚·‚é */</span>
+ for (;;) {
+ res = f_read(&amp;fsrc, buffer, sizeof(buffer), &amp;br);
+ if (res || br == 0) break; <span class="c">/* ƒGƒ‰[‚©ƒtƒ@ƒCƒ‹I’[ */</span>
+ res = f_write(&amp;fdst, buffer, br, &amp;bw);
+ if (res || bw &lt; br) break; <span class="c">/* ƒGƒ‰[‚©ƒfƒBƒXƒN–ž”t */</span>
+ }
+
+ <span class="c">/* ‘S‚Ẵtƒ@ƒCƒ‹‚ð•Â‚¶‚é */</span>
+ f_close(&amp;fsrc);
+ f_close(&amp;fdst);
+
+ <span class="c">/* ƒ[ƒNEƒGƒŠƒA‚ðŠJ•ú‚·‚é */</span>
+ f_mount(0, NULL);
+ f_mount(1, NULL);
+}
+</pre>
+</div>
+
+
+<div class="para">
+<h4>ŽQÆ</h4>
+<p><tt><a href="read.html">f_read</a>, <a href="write.html">f_write</a>, <a href="close.html">f_close</a>, <a href="sfile.html">FIL</a>, <a href="sfatfs.html">FATFS</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_j.html">–ß‚é</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/opendir.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/opendir.html
new file mode 100644
index 0000000..c794fd7
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/opendir.html
@@ -0,0 +1,80 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_j.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/opendir.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_opendir</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_opendir</h2>
+<p>ƒfƒBƒŒƒNƒgƒŠ‚ðŠJ‚«‚Ü‚·B</p>
+<pre>
+FRESULT f_opendir (
+ DIR* <em>DirObject</em>, <span class="c">/* ƒfƒBƒŒƒNƒgƒŠEƒuƒWƒFƒNƒg\‘¢‘̂ւ̃|ƒCƒ“ƒ^ */</span>
+ const TCHAR* <em>DirName</em> <span class="c">/* ƒfƒBƒŒƒNƒgƒŠ–¼‚ւ̃|ƒCƒ“ƒ^ */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>ˆø”</h4>
+<dl class="par">
+<dt>DirObject</dt>
+<dd>‰Šú‰»‚·‚éƒfƒBƒŒƒNƒgƒŠEƒIƒuƒWƒFƒNƒg\‘¢‘̂ւ̃|ƒCƒ“ƒ^‚ðŽw’肵‚Ü‚·B</dd>
+<dt>DirName</dt>
+<dd>ƒI[ƒvƒ“‚·‚éƒfƒBƒŒƒNƒgƒŠ‚Ö‚Ì<a href="filename.html">ƒpƒX–¼</a>‚ª“ü‚Á‚½<tt>'\0'</tt>‚ÅI‚í‚镶Žš—ñ‚ւ̃|ƒCƒ“ƒ^‚ðŽw’肵‚Ü‚·B</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>–ß‚è’l</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>³íI—¹B</dd>
+<dt>FR_NO_PATH</dt>
+<dd>ƒpƒX‚ªŒ©‚‚©‚ç‚È‚¢B</dd>
+<dt>FR_INVALID_NAME</dt>
+<dd>ƒpƒX–¼‚ª•s³B</dd>
+<dt>FR_INVALID_DRIVE</dt>
+<dd>˜_—ƒhƒ‰ƒCƒu”Ô†‚ª•s³B</dd>
+<dt>FR_NOT_READY</dt>
+<dd>ƒƒfƒBƒA‚ªƒZƒbƒg‚³‚ê‚Ä‚¢‚È‚¢‚È‚ÇA•¨—ƒhƒ‰ƒCƒu‚ª“®ì•s”\ó‘ÔB</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>ƒfƒBƒXƒNEƒGƒ‰[‚É‚æ‚鎸”sB</dd>
+<dt>FR_INT_ERR</dt>
+<dd>•s³‚ÈFAT\‘¢‚Ü‚½‚Í“à•”ƒGƒ‰[‚É‚æ‚鎸”sB</dd>
+<dt>FR_NOT_ENABLED</dt>
+<dd>˜_—ƒhƒ‰ƒCƒu‚Ƀ[ƒNEƒGƒŠƒA‚ª—^‚¦‚ç‚ê‚Ä‚¢‚È‚¢B</dd>
+<dt>FR_NO_FILESYSTEM</dt>
+<dd>—LŒø‚ÈFATƒ{ƒŠƒ…[ƒ€‚ªŒ©‚‚©‚ç‚È‚¢B</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>‰ðà</h4>
+<p>ƒfƒBƒŒƒNƒgƒŠ‚ðŠJ‚«‚Ü‚·B³íI—¹‚µ‚½‚çA<tt>DirObject</tt>\‘¢‘Ì‚ðŽg‚Á‚Ä‚±‚̃fƒBƒŒƒNƒgƒŠ‚Ì€–Ú‚ð‡ŽŸ“Ç‚Ýo‚¹‚Ü‚·B<tt>DirObject</tt>\‘¢‘Ì‚ÍŽg—pŒã‚Í”CˆÓ‚ÌŽž“_‚Å”jŠü‚Å‚«‚Ü‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>‘Ήžî•ñ</h4>
+<p><tt>_FS_MINIMIZE &lt;= 1</tt>‚Ì‚Æ‚«Žg—p‰Â”\‚É‚È‚è‚Ü‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>ŽQÆ</h4>
+<p><tt><a href="readdir.html">f_readdir</a>, <a href="sdir.html">DIR</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_j.html">–ß‚é</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/printf.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/printf.html
new file mode 100644
index 0000000..556fb31
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/printf.html
@@ -0,0 +1,90 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_j.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/printf.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_printf</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_printf</h2>
+<p>ƒtƒ@ƒCƒ‹‚É‘Ž®‰»•¶Žš—ñ‚ð‘‚«ž‚Ý‚Ü‚·B</p>
+<pre>
+int f_printf (
+ FIL* <em>FileObject</em>, <span class="c">/* ƒtƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒg */</span>
+ const TCHAR* <em>Foramt</em>, <span class="c">/* ‘Ž®§Œä•¶Žš—ñ */</span>
+ ...
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>ˆø”</h4>
+<dl class="par">
+<dt>FileObject</dt>
+<dd>ƒtƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒg\‘¢‘̂ւ̃|ƒCƒ“ƒ^‚ðŽw’肵‚Ü‚·B</dd>
+<dt>Format</dt>
+<dd>'\0'‚ÅI‚í‚é‘Ž®§Œä•¶Žš—ñ‚ðŽw‚·ƒ|ƒCƒ“ƒ^‚ðŽw’肵‚Ü‚·B'\0'‚Í‘‚«ž‚Ü‚ê‚Ü‚¹‚ñB</dd>
+<dt>...</dt>
+<dd>ƒIƒvƒVƒ‡ƒ“‚̈ø”B</dd>
+
+</dl>
+</div>
+
+
+<div class="para">
+<h4>–ß‚è’l</h4>
+<p>•¶Žš—ñ‚ª³í‚É‘‚«ž‚Ü‚ê‚é‚Æ‘‚«ž‚܂ꂽ•¶Žš”‚ª•Ô‚³‚ê‚Ü‚·BƒfƒBƒXƒN‚ª–ž”t‚Ü‚½‚Í‚»‚Ì‘¼ƒGƒ‰[‚É‚æ‚è³í‚É‘‚«ž‚Ü‚ê‚È‚©‚Á‚½‚Æ‚«‚ÍŠÖ”‚ÍŽ¸”s‚µ<tt>EOF (-1)</tt>‚ª•Ô‚³‚ê‚Ü‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>‰ðà</h4>
+<p>‚±‚ÌŠÖ”‚Í<a href="putc.html">f_putc()</a>‚¨‚æ‚Ñ<a href="puts.html">f_puts()</a>‚̃‰ƒbƒp[ŠÖ”‚Å‚·B‘Ž®§Œä‹@”\‚̓TƒuƒZƒbƒg‚Æ‚È‚Á‚Ä‚¢‚ÄA‘Ž®§Œä•¶Žš‚ÍŽŸ‚ÉŽ¦‚·‚à‚Ì‚ªŽg—p‰Â”\‚Å‚·B</p>
+<ul>
+<li>ƒ^ƒCƒv: <tt>c C s S d D u U x X b B</tt></li>
+<li>¸“xŽw’è: <tt>l L</tt></li>
+<li>ƒtƒ‰ƒO: <tt>0 -</tt></li>
+</ul>
+</div>
+
+
+<div class="para">
+<h4>‘Ήžî•ñ</h4>
+<p><tt>_FS_READONLY == 0</tt>‚ÅAŠŽ‚Â<tt>_USE_STRFUNC</tt>‚ª 1‚Ü‚½‚Í 2‚Ì‚Æ‚«Žg—p‰Â”\‚É‚È‚è‚Ü‚·B2‚ÌŽž‚ÍAo—Í‚ÉŠÜ‚Ü‚ê‚é<tt>'\n'</tt>‚ª<tt>"\r\n"</tt>‚É“WŠJ‚³‚ê‚ătƒ@ƒCƒ‹‚É‘‚«ž‚Ü‚ê‚Ü‚·B</p>
+<p>API‚ÉUnicode‚ª‘I‘ð‚³‚ê‚Ä‚¢‚é(<tt>_LFN_UNICODE</tt>‚ª1)‚Æ‚«‚ÍAUTF-8ƒGƒ“ƒR[ƒh‚Ńtƒ@ƒCƒ‹‚É‘‚«ž‚Ý‚Ü‚·B‚»‚êˆÈŠO‚ÌŽž‚Í–³•ÏŠ·(1•¶Žš1ƒoƒCƒg)‚Å‘‚«ž‚Ý‚Ü‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>Žg—p—á</h4>
+<pre>
+ f_printf(&amp;fil, "%d", 1234); <span class="c">/* "1234" */</span>
+ f_printf(&amp;fil, "%6d,%3d%%", -200, 5); <span class="c">/* " -200, 5%" */</span>
+ f_printf(&amp;fil, "%-6u", 100); <span class="c">/* "100 " */</span>
+ f_printf(&amp;fil, "%ld", 12345678L); <span class="c">/* "12345678" */</span>
+ f_printf(&amp;fil, "%04x", 0xA3); <span class="c">/* "00a3" */</span>
+ f_printf(&amp;fil, "%08LX", 0x123ABC); <span class="c">/* "00123ABC" */</span>
+ f_printf(&amp;fil, "%016b", 0x550F); <span class="c">/* "0101010100001111" */</span>
+ f_printf(&amp;fil, "%s", "String"); <span class="c">/* "String" */</span>
+ f_printf(&amp;fil, "%-4s", "abc"); <span class="c">/* "abc " */</span>
+ f_printf(&amp;fil, "%4s", "abc"); <span class="c">/* " abc" */</span>
+ f_printf(&amp;fil, "%c", 'a'); <span class="c">/* "a" */</span>
+ f_printf(&amp;fil, "%f", 10.0); <span class="c">/* •‚“®¬”“_‚Í–¢ƒTƒ|[ƒg */</span>
+</pre>
+</div>
+
+
+<div class="para">
+<h4>ŽQÆ</h4>
+<p><tt><a href="open.html">f_open</a>, <a href="putc.html">f_putc</a>, <a href="puts.html">f_puts</a>, <a href="gets.html">f_gets</a>, <a href="close.html">f_close</a>, <a href="sfile.html">FIL</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_j.html">–ß‚é</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/putc.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/putc.html
new file mode 100644
index 0000000..531e89e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/putc.html
@@ -0,0 +1,62 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_j.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/putc.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_putc</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_putc</h2>
+<p>ƒtƒ@ƒCƒ‹‚É•¶Žš‚ð‘‚«ž‚Ý‚Ü‚·B</p>
+<pre>
+int f_putc (
+ TCHAR <em>Chr</em>, <span class="c">/* ‘‚«ž‚Þ•¶Žš */</span>
+ FIL* <em>FileObject</em> <span class="c">/* ƒtƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒg */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>ˆø”</h4>
+<dl class="par">
+<dt>Chr</dt>
+<dd>‘‚«ž‚Þ•¶Žš‚ðŽw’肵‚Ü‚·B</dd>
+<dt>FileObject</dt>
+<dd>ƒtƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒg\‘¢‘̂ւ̃|ƒCƒ“ƒ^‚ðŽw’肵‚Ü‚·B</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>–ß‚è’l</h4>
+<p>•¶Žš‚ª³í‚É‘‚«ž‚Ü‚ê‚é‚Æ‘‚«ž‚ñ‚¾•¶Žš‚ª•Ô‚³‚ê‚Ü‚·BƒfƒBƒXƒN‚ª–ž”t‚Ü‚½‚̓Gƒ‰[‚É‚æ‚è‘‚«ž‚Ü‚ê‚È‚©‚Á‚½‚Æ‚«‚Í<tt>EOF (-1)</tt>‚ª•Ô‚³‚ê‚Ü‚·B</p>
+<p>API‚ÉUnicode‚ª‘I‘ð‚³‚ê‚Ä‚¢‚é(<tt>_LFN_UNICODE</tt>‚ª1)‚Æ‚«‚ÍAUTF-8ƒGƒ“ƒR[ƒh‚Ńtƒ@ƒCƒ‹‚É‘‚«ž‚Ý‚Ü‚·B‚»‚êˆÈŠO‚ÌŽž‚Í–³•ÏŠ·(1•¶Žš1ƒoƒCƒg)‚Å‘‚«ž‚Ý‚Ü‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>‰ðà</h4>
+<p>1•¶Žš‚ðƒtƒ@ƒCƒ‹‚É‘‚«ž‚Ý‚Ü‚·B‚±‚ÌŠÖ”‚Í<a href="write.html">f_write()</a>‚̃‰ƒbƒp[ŠÖ”‚Å‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>‘Ήžî•ñ</h4>
+<p><tt>_FS_READONLY == 0</tt>‚ÅAŠŽ‚Â<tt>_USE_STRFUNC</tt>‚ª 1‚Ü‚½‚Í 2‚Ì‚Æ‚«Žg—p‰Â”\‚Å‚·B2‚ðŽw’è‚·‚é‚ÆA<tt>'\n'</tt>‚Í<tt>"\r\n"</tt>‚É“WŠJ‚³‚ê‚ătƒ@ƒCƒ‹‚É‘‚«ž‚Ü‚ê‚Ü‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>ŽQÆ</h4>
+<p><tt><a href="open.html">f_open</a>, <a href="puts.html">f_puts</a>, <a href="printf.html">f_printf</a>, <a href="gets.html">f_gets</a>, <a href="close.html">f_close</a>, <a href="sfile.html">FIL</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_j.html">–ß‚é</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/puts.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/puts.html
new file mode 100644
index 0000000..f844238
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/puts.html
@@ -0,0 +1,62 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_j.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/puts.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_puts</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_puts</h2>
+<p>ƒtƒ@ƒCƒ‹‚É•¶Žš—ñ‚ð‘‚«ž‚Ý‚Ü‚·B</p>
+<pre>
+int f_puts (
+ const TCHAR* <em>Str</em>, <span class="c">/* •¶Žš—ñ */</span>
+ FIL* <em>FileObject</em> <span class="c">/* ƒtƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒg */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>ˆø”</h4>
+<dl class="par">
+<dt>Str</dt>
+<dd>‘‚«ž‚Þ'\0'‚ÅI‚í‚镶Žš—ñ‚ðŽw‚·ƒ|ƒCƒ“ƒ^‚ðŽw’肵‚Ü‚·B'\0'‚Í‘‚«ž‚Ü‚ê‚Ü‚¹‚ñB</dd>
+<dt>FileObject</dt>
+<dd>ƒtƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒg\‘¢‘̂ւ̃|ƒCƒ“ƒ^‚ðŽw’肵‚Ü‚·B</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>–ß‚è’l</h4>
+<p>•¶Žš—ñ‚ª³í‚É‘‚«ž‚Ü‚ê‚é‚ÆA‘‚«ž‚܂ꂽ•¶Žš”‚ª•Ô‚³‚ê‚Ü‚·BƒfƒBƒXƒN‚ª–ž”t‚Ü‚½‚̓Gƒ‰[‚É‚æ‚è³í‚É‘‚«ž‚Ü‚ê‚È‚©‚Á‚½‚Æ‚«‚Í<tt>EOF (-1)</tt>‚ª•Ô‚³‚ê‚Ü‚·B</p>
+<p>API‚ÉUnicode‚ª‘I‘ð‚³‚ê‚Ä‚¢‚é(<tt>_LFN_UNICODE</tt>‚ª1)‚Æ‚«‚ÍAUTF-8ƒGƒ“ƒR[ƒh‚Ńtƒ@ƒCƒ‹‚É‘‚«ž‚Ý‚Ü‚·B‚»‚êˆÈŠO‚ÌŽž‚Í–³•ÏŠ·(1•¶Žš1ƒoƒCƒg)‚Å‘‚«ž‚Ý‚Ü‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>‰ðà</h4>
+<p>•¶Žš—ñ‚ðƒtƒ@ƒCƒ‹‚É‘‚«ž‚Ý‚Ü‚·B‚±‚ÌŠÖ”‚Í<a href="putc.html">f_putc()</a>‚̃‰ƒbƒp[ŠÖ”‚Å‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>‘Ήžî•ñ</h4>
+<p><tt>_FS_READONLY == 0</tt>‚ÅAŠŽ‚Â<tt>_USE_STRFUNC</tt>‚ª 1‚Ü‚½‚Í 2‚Ì‚Æ‚«Žg—p‰Â”\‚Å‚·B2‚ðŽw’è‚·‚é‚ÆA•¶Žš—ñ‚ÉŠÜ‚Ü‚ê‚é<tt>'\n'</tt>‚Í<tt>"\r\n"</tt>‚É“WŠJ‚³‚ê‚ătƒ@ƒCƒ‹‚É‘‚«ž‚Ü‚ê‚Ü‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>ŽQÆ</h4>
+<p><tt><a href="open.html">f_open</a>, <a href="putc.html">f_putc</a>, <a href="printf.html">f_printf</a>, <a href="gets.html">f_gets</a>, <a href="close.html">f_close</a>, <a href="sfile.html">FIL</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_j.html">–ß‚é</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/read.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/read.html
new file mode 100644
index 0000000..24b2c28
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/read.html
@@ -0,0 +1,80 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_j.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/read.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_read</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_read</h2>
+<p>ƒtƒ@ƒCƒ‹‚©‚çƒf[ƒ^‚ð“Ç‚Ýo‚µ‚Ü‚·B</p>
+<pre>
+FRESULT f_read (
+ FIL* <em>FileObject</em>, <span class="c">/* ƒtƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒg\‘¢‘Ì */</span>
+ void* <em>Buffer</em>, <span class="c">/* “Ç‚Ýo‚µ‚½ƒf[ƒ^‚ðŠi”[‚·‚éƒoƒbƒtƒ@ */</span>
+ UINT <em>ByteToRead</em>, <span class="c">/* “Ç‚Ýo‚·ƒoƒCƒg” */</span>
+ UINT* <em>ByteRead</em> <span class="c">/* “Ç‚Ýo‚³‚ꂽƒoƒCƒg” */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>ˆø”</h4>
+<dl class="par">
+<dt>FileObject</dt>
+<dd>ƒtƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒg\‘¢‘̂ւ̃|ƒCƒ“ƒ^‚ðŽw’肵‚Ü‚·B</dd>
+<dt>Buffer</dt>
+<dd>“Ç‚Ýo‚µ‚½ƒf[ƒ^‚ðŠi”[‚·‚éƒoƒbƒtƒ@‚ðŽw‚·ƒ|ƒCƒ“ƒ^‚ðŽw’肵‚Ü‚·B</dd>
+<dt>ByteToRead</dt>
+<dd>“Ç‚Ýo‚·ƒoƒCƒg”(0`UINT‚ÌÅ‘å’l)‚ðŽw’肵‚Ü‚·B</dd>
+<dt>ByteRead</dt>
+<dd>ŽÀÛ‚É“Ç‚Ýo‚³‚ꂽƒoƒCƒg”‚ðŠi”[‚·‚é•Ï”‚ðŽw‚·ƒ|ƒCƒ“ƒ^‚ðŽw’肵‚Ü‚·B–ß‚è’l‚ÍŠÖ”‚̬”Û‚É‚©‚©‚í‚炸í‚É—LŒø‚Å‚·B</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>–ß‚è’l</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>³íI—¹B</dd>
+<dt>FR_DENIED</dt>
+<dd>”ñ“Ç‚Ýž‚݃‚[ƒh‚ÅŠJ‚¢‚½ƒtƒ@ƒCƒ‹‚©‚ç“Ç‚Ýž‚à‚¤‚Æ‚µ‚½B</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>ƒfƒBƒXƒNEƒGƒ‰[‚É‚æ‚鎸”sB</dd>
+<dt>FR_INT_ERR</dt>
+<dd>•s³‚ÈFAT\‘¢‚Ü‚½‚Í“à•”ƒGƒ‰[‚É‚æ‚鎸”sB</dd>
+<dt>FR_NOT_READY</dt>
+<dd>ƒƒfƒBƒA‚ªƒZƒbƒg‚³‚ê‚Ä‚¢‚È‚¢‚È‚ÇA•¨—ƒhƒ‰ƒCƒu‚ª“®ì•s”\ó‘ÔB</dd>
+<dt>FR_INVALID_OBJECT</dt>
+<dd>–³Œø‚ȃtƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒgB</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>‰ðà</h4>
+<p>“Ç‚Ýž‚ÝŠJŽnˆÊ’u‚ÍAŒ»Ý‚̃Š[ƒh/ƒ‰ƒCƒgEƒ|ƒCƒ“ƒ^‚©‚ç‚É‚È‚è‚Ü‚·BƒŠ[ƒh/ƒ‰ƒCƒgEƒ|ƒCƒ“ƒ^‚Í“Ç‚Ýž‚܂ꂽƒoƒCƒg”‚¾‚¯i‚Ý‚Ü‚·BŠÖ”‚ª³íI—¹‚µ‚½Œã‚ÍA<tt>*ByteRead</tt>‚Ì’l‚ðƒ`ƒFƒbƒN‚·‚ׂ«‚Å‚·B<tt>*ByteRead</tt>‚ª<tt>ByteToRead</tt>‚æ‚è‚ଂ³‚¢‚Æ‚«‚ÍA“Ç‚Ýž‚Ý’†‚Ƀtƒ@ƒCƒ‹‚ÌI’[‚É’B‚µ‚½‚±‚Æ‚ðŽ¦‚µ‚Ä‚¢‚Ü‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>‘Ήžî•ñ</h4>
+<p>‘S‚Ä‚Ì\¬‚ÅŽg—p‰Â”\‚Å‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>ŽQÆ</h4>
+<p><tt><a href="open.html">f_open</a>, <a href="gets.html">fgets</a>, <a href="write.html">f_write</a>, <a href="close.html">f_close</a>, <a href="sfile.html">FIL</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_j.html">–ß‚é</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/readdir.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/readdir.html
new file mode 100644
index 0000000..d4852c9
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/readdir.html
@@ -0,0 +1,125 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_j.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/readdir.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_readdir</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_readdir</h2>
+<p>ƒfƒBƒŒƒNƒgƒŠ€–Ú‚ð“Ç‚Ýo‚µ‚Ü‚·</p>
+<pre>
+FRESULT f_readdir (
+ DIR* <em>DirObject</em>, <span class="c">/* ƒfƒBƒŒƒNƒgƒŠEƒuƒWƒFƒNƒg\‘¢‘̂ւ̃|ƒCƒ“ƒ^ */</span>
+ FILINFO* <em>FileInfo</em> <span class="c">/* ƒtƒ@ƒCƒ‹î•ñ\‘¢‘̂ւ̃|ƒCƒ“ƒ^ */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>ˆø”</h4>
+<dl class="par">
+<dt>DirObject</dt>
+<dd>—LŒø‚ȃfƒBƒŒƒNƒgƒŠEƒIƒuƒWƒFƒNƒg\‘¢‘̂ւ̃|ƒCƒ“ƒ^‚ðŽw’肵‚Ü‚·B</dd>
+<dt>FileInfo</dt>
+<dd>“Ç‚Ýo‚µ‚½ƒfƒBƒŒƒNƒgƒŠ€–Ú‚ðŠi”[‚·‚éƒtƒ@ƒCƒ‹î•ñ\‘¢‘̂ւ̃|ƒCƒ“ƒ^‚ðŽw’肵‚Ü‚·B</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>–ß‚è’l</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>³íI—¹B</dd>
+<dt>FR_NOT_READY</dt>
+<dd>ƒƒfƒBƒA‚ªƒZƒbƒg‚³‚ê‚Ä‚¢‚È‚¢‚È‚ÇA•¨—ƒhƒ‰ƒCƒu‚ª“®ì•s”\ó‘ÔB</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>ƒfƒBƒXƒNEƒGƒ‰[‚É‚æ‚鎸”sB</dd>
+<dt>FR_INT_ERR</dt>
+<dd>•s³‚ÈFAT\‘¢‚Ü‚½‚Í“à•”ƒGƒ‰[‚É‚æ‚鎸”sB</dd>
+<dt>FR_INVALID_OBJECT</dt>
+<dd>–³Œø‚ȃfƒBƒŒƒNƒgƒŠEƒIƒuƒWƒFƒNƒgB</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>‰ðà</h4>
+<p>ƒfƒBƒŒƒNƒgƒŠ€–Ú‚ð‡ŽŸ“Ç‚Ýo‚µ‚Ü‚·B‚±‚ÌŠÖ”‚ðŒJ‚è•Ô‚µŽÀs‚·‚邱‚Æ‚É‚æ‚èƒfƒBƒŒƒNƒgƒŠ‚Ì‘S‚Ä‚Ì€–Ú‚ð“Ç‚Ýo‚·‚±‚Æ‚ª‚Å‚«‚Ü‚·B‘S‚Ä‚Ì€–Ú‚ð“Ç‚Ýo‚µA“Ç‚Ýo‚·€–Ú‚ª‚à‚¤–³‚¢‚Æ‚«‚ÍA<tt>f_name[]</tt>ƒƒ“ƒo‚Ƀkƒ‹•¶Žš—ñ‚ª•Ô‚³‚ê‚Ü‚·Bƒ{ƒŠƒ…[ƒ€Eƒ‰ƒxƒ‹‚Í“Ç‚Ýo‚·‚Æ‚«‚ÉŠü‚Ä‚ç‚êAŒ»‚ê‚邱‚Æ‚Í‚ ‚è‚Ü‚¹‚ñB"."A".."‚ÍA‘Š‘΃pƒX‚ª—LŒø‚È‚Æ‚«(<tt>_FS_RPATH == 1</tt>)‚É‚Ì‚ÝŒ»‚ê‚Ü‚·B“¾‚ç‚ê‚éƒtƒ@ƒCƒ‹î•ñ‚ÌÚׂɂ‚¢‚Ä‚Í <tt>FILINFO</tt>\‘¢‘Ì‚ðŽQÆ‚µ‚Ä‚­‚¾‚³‚¢BFileInfo‚Ƀkƒ‹Eƒ|ƒCƒ“ƒ^‚ðŽw’è‚·‚é‚ÆA‚»‚̃fƒBƒŒƒNƒgƒŠ‚̃Š[ƒhEƒCƒ“ƒfƒbƒNƒX‚ðŠª‚«–ß‚µ‚Ü‚·B</p>
+<p>LFN‹@”\‚ª—LŒø‚ÈŽž‚ÍAf_readdirŠÖ”‚̌ĂÑo‚µ‚Éæ—§‚Á‚ÄFILINFO\‘¢‘Ì‚Ì<tt>lfname</tt>‚Æ<tt>lfsize</tt>‚ª—LŒø‚È’l‚ʼnŠú‰»‚³‚ê‚Ä‚¢‚È‚¯‚ê‚΂Ȃè‚Ü‚¹‚ñB<tt>lfname</tt>‚ÍLFN‚ðŠi”[‚·‚éƒoƒbƒtƒ@‚ÅA<tt>lfsize</tt>‚Í‚»‚̃oƒbƒtƒ@EƒTƒCƒY(TCHAR)‚Å‚·BŽŸ‚ÌðŒ‚Ɉê‚‚łàŠY“–‚·‚éꇂÍALFNŠi”[ƒoƒbƒtƒ@‚Ƀkƒ‹•¶Žš—ñ‚ª•Ô‚³‚ê‚Ü‚·B</p>
+<ul>
+<li>‚»‚̃fƒBƒŒƒNƒgƒŠ€–Ú‚ÉLFN‚ª‘¶Ý‚µ‚È‚¢B</li>
+<li>LFN‚Ì’·‚³‚ɑ΂µ‚ÄLFNŠi”[ƒoƒbƒtƒ@‚Ü‚½‚ÍLFN‘€ìƒoƒbƒtƒ@‚̃TƒCƒY‚ª•s\•ªB</li>
+<li>LFN‚ÉŒ»Ý‚ÌOEMƒR[ƒh‚É‘¶Ý‚µ‚È‚¢•¶Žš‚ªŠÜ‚Ü‚ê‚Ä‚¢‚éB(Unicode API‚Å‚Í‚È‚¢‚Æ‚«)</li>
+</ul>
+<p>‚Ü‚½A<tt>lfname</tt>‚Ƀkƒ‹Eƒ|ƒCƒ“ƒ^‚ðŽw’肵‚½ê‡‚ÍALFN‚ÉŠÖ‚µ‚ĉ½‚à•Ô‚³‚ê‚Ü‚¹‚ñBLFN‚ª‘¶Ý‚µ‚È‚¢‚Æ‚«‚ÍA<tt>f_name[]</tt>ƒƒ“ƒo‚ÌSFN‚ÉASCII‰p¬•¶Žš‚ªŠÜ‚Ü‚ê‚éꇂª‚ ‚è‚Ü‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>‘Ήžî•ñ</h4>
+<p><tt>_FS_MINIMIZE &lt;= 1</tt>‚Ì‚Æ‚«‚ÉŽg—p‰Â”\‚Å‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>Žg—p—á</h4>
+<pre>
+FRESULT scan_files (char* path)
+{
+ FRESULT res;
+ FILINFO fno;
+ DIR dir;
+ int i;
+ char *fn;
+#if _USE_LFN
+ static char lfn[_MAX_LFN * (_DF1S ? 2 : 1) + 1];
+ fno.lfname = lfn;
+ fno.lfsize = sizeof(lfn);
+#endif
+
+
+ res = f_opendir(&amp;dir, path);
+ if (res == FR_OK) {
+ i = strlen(path);
+ for (;;) {
+ res = f_readdir(&amp;dir, &amp;fno);
+ if (res != FR_OK || fno.fname[0] == 0) break;
+ if (fno.fname[0] == '.') continue;
+#if _USE_LFN
+ fn = *fno.lfname ? fno.lfname : fno.fname;
+#else
+ fn = fno.fname;
+#endif
+ if (fno.fattrib &amp; AM_DIR) {
+ sprintf(&amp;path[i], "/%s", fn);
+ res = scan_files(path);
+ if (res != FR_OK) break;
+ path[i] = 0;
+ } else {
+ printf("%s/%s\n", path, fn);
+ }
+ }
+ }
+
+ return res;
+}
+</pre>
+</div>
+
+
+<div class="para">
+<h4>ŽQÆ</h4>
+<p><tt><a href="opendir.html">f_opendir</a>, <a href="stat.html">f_stat</a>, <a href="sfileinfo.html">FILINFO</a>, <a href="sdir.html">DIR</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_j.html">–ß‚é</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/rename.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/rename.html
new file mode 100644
index 0000000..da70b99
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/rename.html
@@ -0,0 +1,96 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_j.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/rename.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_rename</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_rename</h2>
+<p>ƒIƒuƒWƒFƒNƒg‚Ì–¼‘O‚Ì•ÏX‚Ü‚½‚͈ړ®B</p>
+<pre>
+FRESULT f_rename (
+ const TCHAR* <em>OldName</em>, <span class="c">/* ŒÃ‚¢ƒIƒuƒWƒFƒNƒg–¼ */</span>
+ const TCHAR* <em>NewName</em> <span class="c">/* V‚µ‚¢ƒIƒuƒWƒFƒNƒg–¼ */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>ˆø”</h4>
+<dl class="par">
+<dt>OldName</dt>
+<dd>•ÏX‘Îۂ̃IƒuƒWƒFƒNƒg(ƒtƒ@ƒCƒ‹‚Ü‚½‚̓fƒBƒŒƒNƒgƒŠ)‚Ö‚Ì<a href="filename.html">ƒpƒX–¼</a>‚Ì“ü‚Á‚½<tt>'\0'</tt>‚ÅI‚í‚镶Žš—ñ‚ւ̃|ƒCƒ“ƒ^‚ðŽw’肵‚Ü‚·B</dd>
+<dt>NewName</dt>
+<dd>V‚µ‚¢ƒIƒuƒWƒFƒNƒg‚̃tƒ‹ƒpƒX–¼‚Ì“ü‚Á‚½<tt>'\0'</tt>‚ÅI‚í‚镶Žš—ñ‚ւ̃|ƒCƒ“ƒ^‚ðŽw’肵‚Ü‚·BŠù‚É‘¶Ý‚·‚é–¼‘O‚ÍŽg‚¦‚Ü‚¹‚ñB‚Ü‚½Aƒhƒ‰ƒCƒu”Ô†‚ÍŽw’è‚Å‚«‚¸A<tt>OldName</tt>‚ÅŽw’肳‚ꂽ˜_—ƒhƒ‰ƒCƒuã‚̃IƒuƒWƒFƒNƒg‚Æ‚µ‚Ĉµ‚í‚ê‚Ü‚·B<br>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>–ß‚è’l</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>³íI—¹B</dd>
+<dt>FR_NO_FILE</dt>
+<dd>OldName‚̃IƒuƒWƒFƒNƒg‚ªŒ©‚‚©‚ç‚È‚¢B</dd>
+<dt>FR_NO_PATH</dt>
+<dd>ƒpƒX‚ªŒ©‚‚©‚ç‚È‚¢B</dd>
+<dt>FR_INVALID_NAME</dt>
+<dd>ƒpƒX–¼‚ª•s³B</dd>
+<dt>FR_INVALID_DRIVE</dt>
+<dd>ƒhƒ‰ƒCƒu”Ô†‚ª•s³B</dd>
+<dt>FR_DENIED</dt>
+<dd>ƒhƒ‰ƒCƒu—e—Ê‚Ì•s‘«“™‚Ì——R‚ÅV‚µ‚¢–¼‘O‚̃IƒuƒWƒFƒNƒg‚ªì‚ê‚È‚¢B</dd>
+<dt>FR_EXIST</dt>
+<dd>NewName‚Æ“¯‚¶–¼‘O‚ªŠù‚É‘¶Ý‚·‚éB</dd>
+<dt>FR_NOT_READY</dt>
+<dd>ƒƒfƒBƒA‚ªƒZƒbƒg‚³‚ê‚Ä‚¢‚È‚¢‚È‚ÇA•¨—ƒhƒ‰ƒCƒu‚ª“®ì•s”\ó‘ÔB</dd>
+<dt>FR_WRITE_PROTECTED</dt>
+<dd>ƒƒfƒBƒA‚ª‘‚«ž‚Ý‹ÖŽ~ó‘ÔB</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>ƒfƒBƒXƒNEƒGƒ‰[‚É‚æ‚鎸”sB</dd>
+<dt>FR_INT_ERR</dt>
+<dd>•s³‚ÈFAT\‘¢‚Ü‚½‚Í“à•”ƒGƒ‰[‚É‚æ‚鎸”sB</dd>
+<dt>FR_NOT_ENABLED</dt>
+<dd>˜_—ƒhƒ‰ƒCƒu‚Ƀ[ƒNƒGƒŠƒA‚ªŠ„‚è“–‚Ä‚ç‚ê‚Ä‚¢‚È‚¢B</dd>
+<dt>FR_NO_FILESYSTEM</dt>
+<dd>—LŒø‚ÈFATƒ{ƒŠƒ…[ƒ€‚ªŒ©‚‚©‚ç‚È‚¢B</dd>
+<dt>FR_LOCKED</dt>
+<dd>ƒtƒ@ƒCƒ‹‹¤—L‹@”\(_FS_SHARE)‚É‚æ‚éƒAƒNƒZƒX‹‘”ÛB</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>‰ðà</h4>
+<p>ƒIƒuƒWƒFƒNƒg‚Ì–¼‘O‚ð•ÏX‚µ‚Ü‚·B‚Ü‚½A•Ê‚̃fƒBƒŒƒNƒgƒŠ‚ւ̈ړ®‚à‰Â”\‚Å‚·B<em>ŠJ‚©‚ê‚Ä‚¢‚éƒIƒuƒWƒFƒNƒg‚ɑ΂µ‚ÄŽg—p‚µ‚Ä‚Í‚È‚è‚Ü‚¹‚ñ</em>B</p>
+</div>
+
+
+<div class="para">
+<h4>‘Ήžî•ñ</h4>
+<p><tt>_FS_READONLY == 0</tt>‚ÅAŠŽ‚Â<tt>_FS_MINIMIZE == 0</tt>‚Ì‚Æ‚«‚ÉŽg—p‰Â”\‚Å‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>Žg—p—á</h4>
+<pre>
+ <span class="c">/* ƒtƒ@ƒCƒ‹‚Ü‚½‚̓TƒuƒfƒBƒŒƒNƒgƒŠ‚Ì–¼‘O‚ð•ÏX‚·‚é */</span>
+ f_rename("oldname.txt", "newname.txt");
+
+ <span class="c">/* ƒtƒ@ƒCƒ‹‚Ü‚½‚̓TƒuƒfƒBƒŒƒNƒgƒŠ‚Ì–¼‘O‚Ì•ÏX‚ƕʂ̃fƒBƒŒƒNƒgƒŠ‚ւ̈ړ® */</span>
+ f_rename("oldname.txt", "dir1/newname.txt");
+</pre>
+</div>
+
+<p class="foot"><a href="../00index_j.html">–ß‚é</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/sdir.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/sdir.html
new file mode 100644
index 0000000..30bed5e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/sdir.html
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_j.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/sdir.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - DIR</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>DIR</h2>
+<p><tt>DIR</tt>\‘¢‘Ì‚ÍAf_opendir(), f_readdir()‚̃[ƒNEƒGƒŠƒA‚Æ‚µ‚ÄŽg—p‚³‚ê‚Ü‚·BƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚©‚ç•ÏX‰Â”\‚ȃƒ“ƒo‚Í‚ ‚è‚Ü‚¹‚ñB</p>
+<pre>
+<span class="k">typedef</span> <span class="k">struct</span> {
+ FATFS* fs; <span class="c">/* eƒtƒ@ƒCƒ‹EƒVƒXƒeƒ€EƒIƒuƒWƒFƒNƒg‚ւ̃|ƒCƒ“ƒ^ */</span>
+ WORD id; <span class="c">/* eƒtƒ@ƒCƒ‹EƒVƒXƒeƒ€EƒIƒuƒWƒFƒNƒg‚̃}ƒEƒ“ƒgID */</span>
+ WORD index; <span class="c">/* ŽŸ‚É“Ç‚Ýo‚·ƒfƒBƒŒƒNƒgƒŠEƒCƒ“ƒfƒbƒNƒX”Ô† */</span>
+ DWORD sclust; <span class="c">/* ƒfƒBƒŒƒNƒgƒŠŠJŽnƒNƒ‰ƒXƒ^ (0:ƒ‹[ƒg) */</span>
+ DWORD clust; <span class="c">/* Œ»Ý‚̃Nƒ‰ƒXƒ^”Ô† */</span>
+ DWORD sect; <span class="c">/* Œ»Ý‚̃ZƒNƒ^”Ô† */</span>
+ BYTE* dir; <span class="c">/* Œ»Ý‚ÌSFNƒGƒ“ƒgƒŠ‚ւ̃|ƒCƒ“ƒ^ */</span>
+ BYTE* fn; <span class="c">/* SFNƒoƒbƒtƒ@‚ւ̃|ƒCƒ“ƒ^ (in/out) {file[8],ext[3],status[1]} */</span>
+<span class="k">#if</span> _USE_LFN
+ WCHAR* lfn; <span class="c">/* LFNƒoƒbƒtƒ@‚ւ̃|ƒCƒ“ƒ^ */</span>
+ WORD lfn_idx; <span class="c">/* ÅŒã‚Ƀ}ƒbƒ`‚µ‚½LFNƒGƒ“ƒgƒŠ‚̃Cƒ“ƒfƒbƒNƒX (0xFFFF:–³Œø) */</span>
+<span class="k">#endif</span>
+} DIR;
+</pre>
+</div>
+
+<p class="foot"><a href="../00index_j.html">–ß‚é</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/sfatfs.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/sfatfs.html
new file mode 100644
index 0000000..8367eba
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/sfatfs.html
@@ -0,0 +1,55 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_j.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/sfatfs.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - FATFS</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>FATFS</h2>
+<p><tt>FATFS</tt>\‘¢‘Ì‚ÍAŒÂX‚̘_—ƒhƒ‰ƒCƒu‚̃_ƒCƒiƒ~ƒbƒNEƒ[ƒNEƒGƒŠƒA‚ð•ÛŽ‚µAf_mount()‚ÅFatFsƒ‚ƒWƒ…[ƒ‹‚É“o˜^‚³‚ê‚Ü‚·B•W€ó‘Ô‚Å‚ÍŽŸ‚̂悤‚ȃƒ“ƒo‚É‚È‚Á‚Ä‚¢‚Ü‚·BƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚©‚ç‘‚«Š·‚¦‰Â”\‚ȃƒ“ƒo‚Í‚ ‚è‚Ü‚¹‚ñB</p>
+
+<pre>
+<span class="k">typedef</span> <span class="k">struct</span> {
+ BYTE fs_type; <span class="c">/* FATƒ^ƒCƒv */</span>
+ BYTE drv; <span class="c">/* •¨—ƒhƒ‰ƒCƒu”Ô† */</span>
+ BYTE csize; <span class="c">/* ƒNƒ‰ƒXƒ^“–‚½‚è‚̃ZƒNƒ^” */</span>
+ BYTE n_fats; <span class="c">/* FAT‚Ì‘½d‰»” */</span>
+ BYTE wflag; <span class="c">/* win[]ƒ_[ƒeƒBEƒtƒ‰ƒO */</span>
+ BYTE fsi_flag; <span class="c">/* fsinfoƒ_[ƒeƒBEƒtƒ‰ƒO */</span>
+ WORD id; <span class="c">/* ƒtƒ@ƒCƒ‹EƒVƒXƒeƒ€Eƒ}ƒEƒ“ƒgID */</span>
+ WORD n_rootdir; <span class="c">/* ƒ‹[ƒgEƒfƒBƒŒƒNƒgƒŠ‚̃Gƒ“ƒgƒŠ” (FAT12/16) */</span>
+<span class="k">#if</span> _MAX_SS != 512
+ WORD ssize; <span class="c">/* ƒZƒNƒ^EƒTƒCƒY (‰Â•ÏƒZƒNƒ^’·‚Ì‚Ý) */</span>
+<span class="k">#endif</span>
+<span class="k">#if</span> _FS_REENTRANT
+ HANDLE h_mutex; <span class="c">/* “¯ŠúƒIƒuƒWƒFƒNƒgID */</span>
+<span class="k">#endif</span>
+<span class="k">#if</span> !_FS_READONLY
+ DWORD last_clust; <span class="c">/* ÅŒã‚ÉŠ„‚è“–‚Ä‚ç‚ꂽƒNƒ‰ƒXƒ^”Ô† */</span>
+ DWORD free_clust; <span class="c">/* ‹ó‚«ƒNƒ‰ƒXƒ^” */</span>
+ DWORD fsi_sector; <span class="c">/* fsinfoƒZƒNƒ^ (FAT32) */</span>
+<span class="k">#endif</span>
+<span class="k">#if</span> _FS_RPATH
+ DWORD cdir; <span class="c">/* ƒJƒŒƒ“ƒgEƒfƒBƒŒƒNƒgƒŠ‚̃Nƒ‰ƒXƒ^ (0:ƒ‹[ƒg) */</span>
+<span class="k">#endif</span>
+ DWORD n_fatent; <span class="c">/* FAT‚̃Gƒ“ƒgƒŠ” (= ƒNƒ‰ƒXƒ^” + 2) */</span>
+ DWORD fsize; <span class="c">/* FAT 1ŒÂ“–‚½‚è‚̃ZƒNƒ^” */</span>
+ DWORD fatbase; <span class="c">/* FAT—̈æŠJŽnƒZƒNƒ^ */</span>
+ DWORD dirbase; <span class="c">/* ƒ‹[ƒgEƒfƒBƒŒƒNƒgƒŠŠJŽnƒZƒNƒ^ (FAT32: ƒNƒ‰ƒXƒ^”Ô†) */</span>
+ DWORD database; <span class="c">/* ƒf[ƒ^—̈æŠJŽn‹æƒZƒNƒ^ */</span>
+ DWORD winsect; <span class="c">/* win[]‚ÉŒ»‚ê‚Ä‚¢‚éƒZƒNƒ^”Ô† */</span>
+ BYTE win[_MAX_SS]; <span class="c">/* ƒfƒBƒXƒNEƒAƒNƒZƒXEƒEƒBƒ“ƒhƒE */</span>
+} FATFS;
+</pre>
+</div>
+
+<p class="foot"><a href="../00index_j.html">–ß‚é</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/sfile.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/sfile.html
new file mode 100644
index 0000000..a475b01
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/sfile.html
@@ -0,0 +1,48 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_j.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/sfile.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - FIL</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>FIL</h2>
+<p><tt>FIL</tt>\‘¢‘Ì‚ÍAf_openŠÖ”‚Å쬂³‚êA‚»‚̃tƒ@ƒCƒ‹‚Ìó‘Ô‚ð•ÛŽ‚µ‚Ü‚·B‚Ü‚½Af_closeŠÖ”‚Ńtƒ@ƒCƒ‹‚ª•Â‚¶‚ç‚ê‚é‚Æ–³Œø‰»‚³‚ê‚Ü‚·BƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚©‚ç‚Ì‘‚«Š·‚¦‚ª‰Â”\‚ȃƒ“ƒo‚Í<tt>cltbl</tt>‚Ì‚Ý‚Å‚·B”ñƒ^ƒCƒj[\¬‚Å‚Í“à•”‚ɃZƒNƒ^Eƒoƒbƒtƒ@‚ªŠm•Û‚³‚ê‚é‚Ì‚ÅAƒTƒCƒY‚É’ˆÓ‚ª•K—v‚Å‚·B</p>
+
+<pre>
+<span class="k">typedef</span> <span class="k">struct</span> {
+ FATFS* fs; <span class="c">/* eƒtƒ@ƒCƒ‹EƒVƒXƒeƒ€EƒIƒuƒWƒFƒNƒg‚ւ̃|ƒCƒ“ƒ^ */</span>
+ WORD id; <span class="c">/* eƒtƒ@ƒCƒ‹EƒVƒXƒeƒ€EƒIƒuƒWƒFƒNƒg‚̃}ƒEƒ“ƒgID */</span>
+ BYTE flag; <span class="c">/* ƒtƒ@ƒCƒ‹EƒXƒe[ƒ^ƒXEƒtƒ‰ƒO */</span>
+ BYTE pad1;
+ DWORD fptr; <span class="c">/* ƒtƒ@ƒCƒ‹“Ç‚Ý‘‚«ƒ|ƒCƒ“ƒ^ (ƒtƒ@ƒCƒ‹æ“ª‚©‚ç‚̃oƒCƒgEƒIƒtƒZƒbƒg) */</span>
+ DWORD fsize; <span class="c">/* ƒtƒ@ƒCƒ‹EƒTƒCƒY(ƒoƒCƒg’PˆÊ) */</span>
+ DWORD sclust; <span class="c">/* ƒtƒ@ƒCƒ‹ŠJŽnƒNƒ‰ƒXƒ^”Ô† (0 on fsize==0) */</span>
+ DWORD clust; <span class="c">/* Œ»Ý‚̃Nƒ‰ƒXƒ^ */</span>
+ DWORD dsect; <span class="c">/* Œ»Ý‚̃f[ƒ^EƒZƒNƒ^ */</span>
+<span class="k">#if</span> _FS_READONLY == 0
+ DWORD dir_sect; <span class="c">/* ‚±‚̃tƒ@ƒCƒ‹‚̃fƒBƒŒƒNƒgƒŠEƒGƒ“ƒgƒŠ‚Ì‚ ‚éƒZƒNƒ^ */</span>
+ BYTE* dir_ptr; <span class="c">/* ‚±‚̃tƒ@ƒCƒ‹‚̃fƒBƒŒƒNƒgƒŠ‚ւ̃|ƒCƒ“ƒ^ */</span>
+<span class="k">#endif</span>
+<span class="k">#if</span> _USE_FASTSEEK
+ DWORD* cltbl; <span class="c">/* ƒtƒ@ƒCƒ‹‚̃Nƒ‰ƒXƒ^EƒŠƒ“ƒNî•ñ‚ւ̃|ƒCƒ“ƒ^ (Nulled on file open) */</span>
+<span class="k">#endif</span>
+<span class="k">#if</span> _FS_SHARE
+ UINT lockid; <span class="c">/* ƒtƒ@ƒCƒ‹EƒƒbƒNID */</span>
+<span class="k">#endif</span>
+<span class="k">#if</span> !_FS_TINY
+ BYTE buf[_MAX_SS]; <span class="c">/* ƒf[ƒ^“]‘—ƒoƒbƒtƒ@ */</span>
+<span class="k">#endif</span>
+} FIL;
+</pre>
+</div>
+
+<p class="foot"><a href="../00index_j.html">–ß‚é</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/sfileinfo.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/sfileinfo.html
new file mode 100644
index 0000000..3dcac1c
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/sfileinfo.html
@@ -0,0 +1,70 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_j.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/sfileinfo.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - FILINFO</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>FILINFO</h2>
+<p><tt>FILINFO</tt>\‘¢‘Ì‚ÍA<tt>f_stat(), f_readdir()</tt>‚Å•Ô‚³‚ê‚éƒtƒ@ƒCƒ‹î•ñ‚ð•ÛŽ‚µ‚Ü‚·B</p>
+<pre>
+<span class="k">typedef</span> <span class="k">struct</span> {
+ DWORD fsize; <span class="c">/* ƒtƒ@ƒCƒ‹EƒTƒCƒY */</span>
+ WORD fdate; <span class="c">/* ÅŒã‚ÉXV‚³‚ꂽ“ú•t */</span>
+ WORD ftime; <span class="c">/* ÅŒã‚ÉXV‚³‚ꂽŽž */</span>
+ BYTE fattrib; <span class="c">/* ƒAƒgƒŠƒrƒ…[ƒg */</span>
+ TCHAR fname[13]; <span class="c">/* ’Z‚¢ƒtƒ@ƒCƒ‹–¼ (8.3ƒtƒH[ƒ}ƒbƒg) */</span>
+<span class="k">#if</span> _USE_LFN
+ TCHAR* lfname; <span class="c">/* ’·‚¢ƒtƒ@ƒCƒ‹–¼‚̃oƒbƒtƒ@‚ւ̃|ƒCƒ“ƒ^ */</span>
+ int lfsize; <span class="c">/* ’·‚¢ƒtƒ@ƒCƒ‹–¼‚̃oƒbƒtƒ@‚̃TƒCƒY [•¶Žš”] */</span>
+<span class="k">#endif</span>
+} FILINFO;
+</pre>
+</div>
+
+<h4>ƒƒ“ƒo</h4>
+<dl>
+<dt>fsize</dt>
+<dd>ƒtƒ@ƒCƒ‹‚̃oƒCƒg’PˆÊ‚̃TƒCƒY‚ªŠi”[‚³‚ê‚Ü‚·BƒfƒBƒŒƒNƒgƒŠ‚ÌꇂÍí‚É0‚Å‚·B</dd>
+<dt>fdate</dt>
+<dd>ƒtƒ@ƒCƒ‹‚Ì•ÏX‚³‚ꂽ“ú•tA‚Ü‚½‚̓fƒBƒŒƒNƒgƒŠ‚Ì쬂³‚ꂽ“ú•t‚ªŠi”[‚³‚ê‚Ü‚·B<br>
+<dl>
+<dt>bit15:9</dt>
+<dd>1980”N‚ð‹N“_‚Æ‚µ‚½”N‚ª 0..127 ‚Å“ü‚è‚Ü‚·B</dd>
+<dt>bit8:5</dt>
+<dd>ŒŽ‚ª 1..12 ‚Ì’l‚Å“ü‚è‚Ü‚·B</dd>
+<dt>bit4:0</dt>
+<dd>“ú‚ª 1..31 ‚Ì’l‚Å“ü‚è‚Ü‚·B</dd>
+</dl>
+</dd>
+<dt>ftime</dt>
+<dd>ƒtƒ@ƒCƒ‹‚Ì•ÏX‚³‚ꂽŽžA‚Ü‚½‚̓fƒBƒŒƒNƒgƒŠ‚Ì쬂³‚ꂽŽž‚ªŠi”[‚³‚ê‚Ü‚·B<br>
+<dl>
+<dt>bit15:11</dt>
+<dd>Žž‚ª 0..23 ‚Ì’l‚Å“ü‚è‚Ü‚·B</dd>
+<dt>bit10:5</dt>
+<dd>•ª‚ª 0..59 ‚Ì’l‚Å“ü‚è‚Ü‚·B</dd>
+<dt>bit4:0</dt>
+<dd>•b/2‚ª 0..29 ‚Ì’l‚Å“ü‚è‚Ü‚·B</dd>
+</dl>
+</dd>
+<dt>fattrib</dt>
+<dd>‘®«ƒtƒ‰ƒO‚ªŠi”[‚³‚ê‚Ü‚·Bƒtƒ‰ƒO‚Í<tt>AM_DIR, AM_RDO, AM_HID, AM_SYS, AM_ARC</tt>‚Ì‘g‚݇‚킹‚Æ‚È‚è‚Ü‚·B</dd>
+<dt>fname[]</dt>
+<dd>8.3Œ`Ž®‚Ì–¼‘O‚ª<tt>'\0'</tt>‚ÅI‚í‚镶Žš—ñ‚Æ‚µ‚ÄŠi”[‚³‚ê‚Ü‚·B”ñLFN\¬‚Ì‚Æ‚«‚ÍAí‚ɑ啶Žš‚Å•Ô‚³‚ê‚Ü‚·BLFN\¬‚Ì‚Æ‚«‚Í’Z‚¢–¼‘O‚ª•Ô‚³‚ê‚Ü‚·‚ªAASCII‰pŽš‚ª¬•¶Žš‚É‚È‚éꇂª‚ ‚è‚Ü‚·B</dd>
+<dt>lfname</dt>
+<dd>•Ô‚³‚ê‚é’·‚¢ƒtƒ@ƒCƒ‹–¼‚ðŠi”[‚·‚éƒoƒbƒtƒ@‚ւ̃|ƒCƒ“ƒ^B‚±‚Ì\‘¢‘Ì‚ðŽg—p‚·‚é‘O‚ɃAƒvƒŠƒP[ƒVƒ‡ƒ“‚É‚æ‚艊ú‰»‚³‚ê‚È‚¯‚ê‚΂Ȃè‚Ü‚¹‚ñB‚±‚̃ƒ“ƒo‚ÉNULL‚ªÝ’肳‚ê‚é‚ÆLFN‚Í•Ô‚³‚ê‚Ü‚¹‚ñB”ñLFN\¬‚Ì‚Æ‚«‚Í‚±‚̃ƒ“ƒo‚Í‘¶Ý‚µ‚Ü‚¹‚ñB</dd>
+<dt>lfsize</dt>
+<dd>’·‚¢ƒtƒ@ƒCƒ‹–¼‚ðŠi”[‚·‚éƒoƒbƒtƒ@‚̃TƒCƒY(•¶Žš”)B‚±‚Ì\‘¢‘Ì‚ðŽg—p‚·‚é‘O‚ɃAƒvƒŠƒP[ƒVƒ‡ƒ“‚É‚æ‚艊ú‰»‚³‚ê‚È‚¯‚ê‚΂Ȃè‚Ü‚¹‚ñB”ñLFN\¬‚Ì‚Æ‚«‚Í‚±‚̃ƒ“ƒo‚Í‘¶Ý‚µ‚Ü‚¹‚ñB</dd>
+</dl>
+
+<p class="foot"><a href="../00index_j.html">–ß‚é</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/size.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/size.html
new file mode 100644
index 0000000..a30a872
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/size.html
@@ -0,0 +1,61 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_j.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/size.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_size</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_size</h2>
+<p>ƒtƒ@ƒCƒ‹‚̃TƒCƒY‚ðŽæ“¾‚µ‚Ü‚·B</p>
+<pre>
+DWORD f_size (
+ FIL* <em>FileObject</em> <span class="c">/* ƒtƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒg */</span>
+);
+</pre>
+</div>
+
+
+<div class="para">
+<h4>ˆø”</h4>
+<dl class="par">
+<dt>FileObject</dt>
+<dd>ƒtƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒg\‘¢‘̂ւ̃|ƒCƒ“ƒ^‚ðŽw’肵‚Ü‚·B</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>–ß‚è’l</h4>
+<p>ƒoƒCƒg’PˆÊ‚̃tƒ@ƒCƒ‹EƒTƒCƒY‚ª•Ô‚è‚Ü‚·B</p>
+</div>
+
+
+<h4>‰ðà</h4>
+<p>f_sizeŠÖ”‚ÍAƒ}ƒNƒ‚Æ‚µ‚ÄŽÀ‘•‚³‚ê‚Ä‚¢‚Ü‚·B</p>
+<pre>
+<span class="k">#define</span> f_size(fp) ((fp)->fsize)
+</pre>
+</div>
+
+
+<div class="para">
+<h4>‘Ήžî•ñ</h4>
+<p>í‚ÉŽg—p‰Â”\B</p>
+</div>
+
+
+<div class="para">
+<h4>ŽQÆ</h4>
+<p><tt><a href="open.html">f_open</a>, <a href="lseek.html">f_lseek</a>, <a href="sfile.html">FIL</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_j.html">–ß‚é</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/stat.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/stat.html
new file mode 100644
index 0000000..0beb88e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/stat.html
@@ -0,0 +1,81 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_j.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/stat.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_stat</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_stat</h2>
+<pre>
+FRESULT f_stat (
+ const TCHAR* <em>FileName</em>, <span class="c">/* ƒtƒ@ƒCƒ‹‚Ü‚½‚̓fƒBƒŒƒNƒgƒŠ–¼‚ւ̃|ƒCƒ“ƒ^ */</span>
+ FILINFO* <em>FileInfo</em> <span class="c">/* ƒtƒ@ƒCƒ‹î•ñ\‘¢‘̂ւ̃|ƒCƒ“ƒ^ */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>ˆø”</h4>
+<dl class="par">
+<dt>FileName</dt>
+<dd>î•ñ‚𓾂éƒtƒ@ƒCƒ‹‚Ü‚½‚̓fƒBƒŒƒNƒgƒŠ–¼‚Ì<tt>'\0'</tt>‚ÅI‚í‚镶Žš—ñ‚ðŽw‚·ƒ|ƒCƒ“ƒ^‚ðŽw’肵‚Ü‚·B</dd>
+<dt>FileInfo</dt>
+<dd>“Ç‚Ýo‚µ‚½ƒtƒ@ƒCƒ‹î•ñ‚ðŠi”[‚·‚éƒtƒ@ƒCƒ‹î•ñ\‘¢‘̂ւ̃|ƒCƒ“ƒ^‚ðŽw’肵‚Ü‚·B</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>–ß‚è’l</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>³íI—¹B</dd>
+<dt>FR_NO_FILE</dt>
+<dd>ƒtƒ@ƒCƒ‹‚Ü‚½‚̓fƒBƒŒƒNƒgƒŠ‚ªŒ©‚‚©‚ç‚È‚¢B</dd>
+<dt>FR_NO_PATH</dt>
+<dd>ƒpƒX‚ªŒ©‚‚©‚ç‚È‚¢B</dd>
+<dt>FR_INVALID_NAME</dt>
+<dd>ƒpƒX–¼‚ª•s³B</dd>
+<dt>FR_INVALID_DRIVE</dt>
+<dd>˜_—ƒhƒ‰ƒCƒu”Ô†‚ª•s³B</dd>
+<dt>FR_NOT_READY</dt>
+<dd>ƒƒfƒBƒA‚ªƒZƒbƒg‚³‚ê‚Ä‚¢‚È‚¢‚È‚ÇA•¨—ƒhƒ‰ƒCƒu‚ª“®ì•s”\ó‘ÔB</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>ƒfƒBƒXƒNEƒGƒ‰[‚É‚æ‚鎸”sB</dd>
+<dt>FR_INT_ERR</dt>
+<dd>•s³‚ÈFAT\‘¢‚Ü‚½‚Í“à•”ƒGƒ‰[‚É‚æ‚鎸”sB</dd>
+<dt>FR_NOT_ENABLED</dt>
+<dd>˜_—ƒhƒ‰ƒCƒu‚Ƀ[ƒNƒGƒŠƒA‚ªŠ„‚è“–‚Ä‚ç‚ê‚Ä‚¢‚È‚¢B</dd>
+<dt>FR_NO_FILESYSTEM</dt>
+<dd>—LŒø‚ÈFATƒ{ƒŠƒ…[ƒ€‚ªŒ©‚‚©‚ç‚È‚¢B</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>‰ðà</h4>
+<p>ƒtƒ@ƒCƒ‹‚Ü‚½‚̓fƒBƒŒƒNƒgƒŠ‚ÉŠÖ‚·‚éî•ñ‚𓾂܂·B“¾‚ç‚ê‚éƒtƒ@ƒCƒ‹î•ñ‚ÌÚׂɂ‚¢‚Ä‚Í <tt>FILINFO</tt>\‘¢‘Ì‚ðŽQÆ‚µ‚Ä‚­‚¾‚³‚¢B</p>
+</div>
+
+
+<div class="para">
+<h4>‘Ήžî•ñ</h4>
+<p><tt>_FS_MINIMIZE == 0</tt>‚Ì‚Æ‚«‚ÉŽg—p‰Â”\‚Å‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>ŽQÆ</h4>
+<p><tt><a href="opendir.html">f_opendir</a>, <a href="readdir.html">f_readdir</a>, <a href="sfileinfo.html">FILINFO</a>, <a href="sdir.html">DIR</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_j.html">–ß‚é</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/sync.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/sync.html
new file mode 100644
index 0000000..7c154a3
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/sync.html
@@ -0,0 +1,69 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_j.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/sync.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_sync</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_sync</h2>
+<p>‘‚«ž‚Ý’†‚̃tƒ@ƒCƒ‹‚̃LƒƒƒbƒVƒ…‚³‚ꂽî•ñ‚ðƒtƒ‰ƒbƒVƒ…‚µ‚Ü‚·B</p>
+<pre>
+FRESULT f_sync (
+ FIL* <em>FileObject</em> <span class="c">/* ƒtƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒg\‘¢‘̂ւ̃|ƒCƒ“ƒ^ */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>ˆø”</h4>
+<dl class="par">
+<dt>FileObject</dt>
+<dd>sync‚·‚éƒtƒ@ƒCƒ‹‚̃tƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒg\‘¢‘̂ւ̃|ƒCƒ“ƒ^‚ðŽw’肵‚Ü‚·B</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>–ß‚è’l</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>³íI—¹B</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>ƒfƒBƒXƒNEƒGƒ‰[‚É‚æ‚鎸”sB</dd>
+<dt>FR_INT_ERR</dt>
+<dd>•s³‚ÈFAT\‘¢‚Ü‚½‚Í“à•”ƒGƒ‰[‚É‚æ‚鎸”sB</dd>
+<dt>FR_NOT_READY</dt>
+<dd>ƒƒfƒBƒA‚ªƒZƒbƒg‚³‚ê‚Ä‚¢‚È‚¢‚È‚ÇA•¨—ƒhƒ‰ƒCƒu‚ª“®ì•s”\ó‘ÔB</dd>
+<dt>FR_INVALID_OBJECT</dt>
+<dd>ƒtƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒg‚ª–³ŒøB</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>‰ðà</h4>
+<p>‚±‚ÌŠÖ”‚Í<tt>f_close()</tt>‚Æ“¯‚¶ˆ—‚ðŽÀs‚µ‚Ü‚·‚ªAƒtƒ@ƒCƒ‹‚͈ø‚«‘±‚«ŠJ‚©‚ꂽ‚Ü‚Ü‚É‚È‚èA“Ç‚Ý‘‚«‚ð‘±s‚Å‚«‚Ü‚·BƒƒMƒ“ƒO‚È‚ÇA‘‚«ž‚݃‚[ƒh‚Å’·ŽžŠÔƒtƒ@ƒCƒ‹‚ªŠJ‚©‚ê‚Ä‚¢‚éƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚É‚¨‚¢‚ÄA’èŠú“I‚Ü‚½‚Í‹æØ‚è‚Ì—Ç‚¢‚Æ‚±‚ë‚Å‚±‚ÌŠÖ”‚ðŽg—p‚·‚邱‚Æ‚É‚æ‚èA•sˆÓ‚Ì“dŒ¹’f‚⃃fƒBƒA‚ÌŽæ‚èŠO‚µ‚É‚æ‚莸‚í‚ê‚éƒf[ƒ^‚ðŬ‚É‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·BŽÀÛ‚Ì‚Æ‚±‚ëA<tt>f_close()</tt>“à‚Å‚Í‚±‚ÌŠÖ”‚ðŒÄ‚Ño‚µ‚½Œãƒtƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒg‚𖳌ø‰»‚µ‚Ä‚¢‚邾‚¯‚È‚Ì‚ÅA<tt>f_close()</tt>’¼‘O‚Ì<tt>f_sync()</tt>‚͈Ӗ¡‚ª‚ ‚è‚Ü‚¹‚ñB</p>
+</div>
+
+
+<div class="para">
+<h4>‘Ήžî•ñ</h4>
+<p><tt>_FS_READONLY == 0</tt>‚Ì‚Æ‚«‚ÉŽg—p‰Â”\‚Å‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>ŽQÆ</h4>
+<p><tt><a href="close.html">f_close</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_j.html">–ß‚é</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/tell.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/tell.html
new file mode 100644
index 0000000..6fc8d69
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/tell.html
@@ -0,0 +1,61 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_e.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/tell.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_tell</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_tell</h2>
+<p>Œ»Ý‚̃Š[ƒh/ƒ‰ƒCƒgEƒ|ƒCƒ“ƒ^‚ðŽæ“¾‚µ‚Ü‚·B</p>
+<pre>
+DWORD f_tell (
+ FIL* <em>FileObject</em> <span class="c">/* ƒtƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒg */</span>
+);
+</pre>
+</div>
+
+
+<div class="para">
+<h4>ˆø”</h4>
+<dl class="par">
+<dt>FileObject</dt>
+<dd>ƒtƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒg\‘¢‘̂ւ̃|ƒCƒ“ƒ^‚ðŽw’肵‚Ü‚·B</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>–ß‚è’l</h4>
+<p>Œ»Ý‚̃Š[ƒh/ƒ‰ƒCƒgEƒ|ƒCƒ“ƒ^(ƒtƒ@ƒCƒ‹æ“ª‚©‚ç‚̃oƒCƒg’PˆÊ‚̃IƒtƒZƒbƒg)‚ª•Ô‚è‚Ü‚·B</p>
+</div>
+
+
+<h4>‰ðà</h4>
+<p>f_tellŠÖ”‚ÍAƒ}ƒNƒ‚Æ‚µ‚ÄŽÀ‘•‚³‚ê‚Ä‚¢‚Ü‚·B</p>
+<pre>
+<span class="k">#define</span> f_tell(fp) ((fp)->fptr)
+</pre>
+</div>
+
+
+<div class="para">
+<h4>‘Ήžî•ñ</h4>
+<p>í‚ÉŽg—p‰Â”\B</p>
+</div>
+
+
+<div class="para">
+<h4>ŽQÆ</h4>
+<p><tt><a href="open.html">f_open</a>, <a href="lseek.html">f_lseek</a>, <a href="sfile.html">FIL</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_j.html">–ß‚é</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/truncate.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/truncate.html
new file mode 100644
index 0000000..eabbc94
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/truncate.html
@@ -0,0 +1,72 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_j.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/truncate.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_truncate</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_truncate</h2>
+<p>ƒtƒ@ƒCƒ‹’·‚ðØ‚è‹l‚ß‚Ü‚·B</p>
+<pre>
+FRESULT f_truncate (
+ FIL* <em>FileObject</em> <span class="c">/* ƒtƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒg‚ւ̃|ƒCƒ“ƒ^ */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>ˆø”</h4>
+<dl class="par">
+<dt>FileObject</dt>
+<dd>Ø‚è‹l‚ß‘ÎÛƒtƒ@ƒCƒ‹‚̃tƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒg‚ւ̃|ƒCƒ“ƒ^</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>–ß‚è’l</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>³íI—¹B</dd>
+<dt>FR_DENIED</dt>
+<dd>ƒtƒ@ƒCƒ‹‚ª”ñ‘‚«ž‚݃‚[ƒh‚ÅŠJ‚©‚ê‚Ä‚¢‚éB</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>ƒfƒBƒXƒNEƒGƒ‰[‚É‚æ‚鎸”sB</dd>
+<dt>FR_INT_ERR</dt>
+<dd>•s³‚ÈFAT\‘¢‚Ü‚½‚Í“à•”ƒGƒ‰[‚É‚æ‚鎸”sB</dd>
+<dt>FR_NOT_READY</dt>
+<dd>ƒƒfƒBƒA‚ªƒZƒbƒg‚³‚ê‚Ä‚¢‚È‚¢‚È‚ÇA•¨—ƒhƒ‰ƒCƒu‚ª“®ì•s”\ó‘ÔB</dd>
+<dt>FR_INVALID_OBJECT</dt>
+<dd>–³Œø‚ȃtƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒgB</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>‰ðà</h4>
+<p>ƒtƒ@ƒCƒ‹‚Ì’·‚³‚ªŒ»Ý‚̃Š[ƒh/ƒ‰ƒCƒgEƒ|ƒCƒ“ƒ^‚ÉØ‚è‹l‚ß‚ç‚ê‚Ü‚·BƒŠ[ƒh/ƒ‰ƒCƒgEƒ|ƒCƒ“ƒ^‚ªŠù‚Ƀtƒ@ƒCƒ‹‚ÌI’[‚ðŽw‚µ‚Ä‚¢‚é‚Æ‚«‚ÍA‚±‚ÌŠÖ”‚͉½‚ÌŒø‰Ê‚àŽ‚¿‚Ü‚¹‚ñB</p>
+</div>
+
+
+<div class="para">
+<h4>‘Ήžî•ñ</h4>
+<p><tt>_FS_READONLY == 0</tt>‚ÅAŠŽ‚Â<tt>_FS_MINIMIZE == 0</tt>‚Ì‚Æ‚«‚ÉŽg—p‰Â”\‚Å‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>ŽQÆ</h4>
+<p><tt><a href="open.html">f_open</a>, <a href="lseek.html">f_lseek</a>, <a href="sfile.html">FIL</a></tt></p>
+</div>
+
+
+<p class="foot"><a href="../00index_j.html">Return</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/unlink.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/unlink.html
new file mode 100644
index 0000000..5ed1d8f
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/unlink.html
@@ -0,0 +1,79 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_j.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/unlink.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_unlink</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_unlink</h2>
+<p>ƒIƒuƒWƒFƒNƒg‚ð휂µ‚Ü‚·B</p>
+<pre>
+FRESULT f_unlink (
+ const TCHAR* <em>FileName</em> <span class="c">/* ƒIƒuƒWƒFƒNƒg–¼‚ւ̃|ƒCƒ“ƒ^ */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>ˆø”</h4>
+<dl class="par">
+<dt>FileName</dt>
+<dd>휑ÎÛ‚Ì<a href="filename.html">ƒtƒ@ƒCƒ‹‚Ü‚½‚̓fƒBƒŒƒNƒgƒŠ–¼</a>‚Ì“ü‚Á‚½<tt>'\0'</tt>‚ÅI‚í‚镶Žš—ñ‚ւ̃|ƒCƒ“ƒ^‚ðŽw’肵‚Ü‚·B</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>–ß‚è’l</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>³íI—¹B</dd>
+<dt>FR_NO_FILE</dt>
+<dd>ƒtƒ@ƒCƒ‹‚ªŒ©‚‚©‚ç‚È‚¢B</dd>
+<dt>FR_NO_PATH</dt>
+<dd>ƒpƒX‚ªŒ©‚‚©‚ç‚È‚¢B</dd>
+<dt>FR_INVALID_NAME</dt>
+<dd>ƒpƒX–¼‚ª•s³B</dd>
+<dt>FR_INVALID_DRIVE</dt>
+<dd>ƒhƒ‰ƒCƒu”Ô†‚ª•s³B</dd>
+<dt>FR_DENIED</dt>
+<dd>‘ÎÛƒIƒuƒWƒFƒNƒg‚ªƒŠ[ƒhEƒIƒ“ƒŠ[‘®«A‹ó‚Å‚È‚¢ƒfƒBƒŒƒNƒgƒŠ‚âƒJƒŒƒ“ƒgEƒfƒBƒŒƒNƒgƒŠB</dd>
+<dt>FR_NOT_READY</dt>
+<dd>ƒƒfƒBƒA‚ªƒZƒbƒg‚³‚ê‚Ä‚¢‚È‚¢‚È‚ÇA•¨—ƒhƒ‰ƒCƒu‚ª“®ì•s”\ó‘ÔB</dd>
+<dt>FR_WRITE_PROTECTED</dt>
+<dd>ƒƒfƒBƒA‚ª‘‚«ž‚Ý‹ÖŽ~ó‘ÔB</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>ƒfƒBƒXƒNEƒGƒ‰[‚É‚æ‚鎸”sB</dd>
+<dt>FR_INT_ERR</dt>
+<dd>•s³‚ÈFAT\‘¢‚Ü‚½‚Í“à•”ƒGƒ‰[‚É‚æ‚鎸”sB</dd>
+<dt>FR_NOT_ENABLED</dt>
+<dd>˜_—ƒhƒ‰ƒCƒu‚Ƀ[ƒNEƒGƒŠƒA‚ªŠ„‚è“–‚Ä‚ç‚ê‚Ä‚¢‚È‚¢B</dd>
+<dt>FR_NO_FILESYSTEM</dt>
+<dd>—LŒø‚ÈFATƒ{ƒŠƒ…[ƒ€‚ªŒ©‚‚©‚ç‚È‚¢B</dd>
+<dt>FR_LOCKED</dt>
+<dd>ƒtƒ@ƒCƒ‹‹¤—L‹@”\(_FS_SHARE)‚É‚æ‚éƒAƒNƒZƒX‹‘”ÛB</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>‰ðà</h4>
+<p>ƒIƒuƒWƒFƒNƒg‚ð휂µ‚Ü‚·B<em>ŠJ‚©‚ê‚Ä‚¢‚éƒIƒuƒWƒFƒNƒg‚Í휂µ‚Ä‚Í‚È‚è‚Ü‚¹‚ñ</em>B</p>
+</div>
+
+<div class="para">
+<h4>‘Ήžî•ñ</h4>
+<p><tt>_FS_READONLY == 0</tt>‚ÅAŠŽ‚Â<tt>_FS_MINIMIZE == 0</tt>‚Ì‚Æ‚«‚ÉŽg—p‰Â”\‚Å‚·B</p>
+</div>
+
+
+<p class="foot"><a href="../00index_j.html">–ß‚é</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/utime.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/utime.html
new file mode 100644
index 0000000..44040d9
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/utime.html
@@ -0,0 +1,108 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_j.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/utime.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_utime</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_utime</h2>
+<p>ƒIƒuƒWƒFƒNƒg‚̃^ƒCƒ€ƒXƒ^ƒ“ƒv‚ð•ÏX‚µ‚Ü‚·B</p>
+<pre>
+FRESULT f_utime (
+ const TCHAR* <em>FileName</em>, <span class="c">/* ƒIƒuƒWƒFƒNƒg–¼‚ւ̃|ƒCƒ“ƒ^ */</span>
+ const FILINFO* <em>TimeDate</em> <span class="c">/* Ý’è‚·‚é“ú•t */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>ˆø”</h4>
+<dl class="par">
+<dt>FileName</dt>
+<dd>•ÏX‘Îۂ̃tƒ@ƒCƒ‹‚Ü‚½‚̓fƒBƒŒƒNƒgƒŠ‚Ö‚Ì<a href="filename.html">ƒpƒX–¼</a>‚Ì“ü‚Á‚½<tt>'\0'</tt>‚ÅI‚í‚镶Žš—ñ‚ðŽw’肵‚Ü‚·B</dd>
+<dt>TimeDate</dt>
+<dd>Ý’è‚·‚é“ú•t‚ÆŽžŠÔ‚ðfdate‚Æftimeƒƒ“ƒo‚Éݒ肳‚ꂽFILINFO\‘¢‘̂ւ̃|ƒCƒ“ƒ^B‘¼‚̃ƒ“ƒo‚ÍDon't care‚Å‚·B</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>–ß‚è’l</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>³íI—¹B</dd>
+<dt>FR_NO_FILE</dt>
+<dd>ƒtƒ@ƒCƒ‹‚ªŒ©‚‚©‚ç‚È‚¢B</dd>
+<dt>FR_NO_PATH</dt>
+<dd>ƒpƒX‚ªŒ©‚‚©‚ç‚È‚¢B</dd>
+<dt>FR_INVALID_NAME</dt>
+<dd>ƒpƒX–¼‚ª•s³B</dd>
+<dt>FR_INVALID_NAME</dt>
+<dd>˜_—ƒhƒ‰ƒCƒu”Ô†‚ª•s³B</dd>
+<dt>FR_NOT_READY</dt>
+<dd>ƒƒfƒBƒA‚ªƒZƒbƒg‚³‚ê‚Ä‚¢‚È‚¢‚È‚ÇA•¨—ƒhƒ‰ƒCƒu‚ª“®ì•s”\ó‘ÔB</dd>
+<dt>FR_WRITE_PROTECTED</dt>
+<dd>ƒƒfƒBƒA‚ª‘‚«ž‚Ý‹ÖŽ~ó‘ÔB</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>ƒfƒBƒXƒNEƒGƒ‰[‚É‚æ‚鎸”sB</dd>
+<dt>FR_INT_ERR</dt>
+<dd>•s³‚ÈFAT\‘¢‚Ü‚½‚Í“à•”ƒGƒ‰[‚É‚æ‚鎸”sB</dd>
+<dt>FR_NOT_ENABLED</dt>
+<dd>‚»‚̘_—ƒhƒ‰ƒCƒu‚Ƀ[ƒNEƒGƒŠƒA‚ª—^‚¦‚ç‚ê‚Ä‚¢‚È‚¢B</dd>
+<dt>FR_NO_FILESYSTEM</dt>
+<dd>—LŒø‚ÈFATƒ{ƒŠƒ…[ƒ€‚ªŒ©‚‚©‚ç‚È‚¢B</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>‰ðà</h4>
+<p>ƒIƒuƒWƒFƒNƒg‚̃^ƒCƒ€ƒXƒ^ƒ“ƒv‚ð•ÏX‚µ‚Ü‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>Žg—p—á</h4>
+<pre>
+FRESULT set_timestamp (
+ char *obj, <span class="c">/* ƒtƒ@ƒCƒ‹–¼‚ւ̃|ƒCƒ“ƒ^ */</span>
+ int year,
+ int month,
+ int mday,
+ int hour,
+ int min,
+ int sec
+)
+{
+ FILINFO fno;
+
+ fno.fdate = (WORD)(((year - 1980) * 512U) | month * 32U | mday);
+ fno.ftime = (WORD)(hour * 2048U | min * 32U | sec / 2U);
+
+ return f_utime(obj, &amp;fno);
+}
+</pre>
+</div>
+
+
+<div class="para">
+<h4>‘Ήžî•ñ</h4>
+<p><tt>_FS_READONLY == 0</tt>‚ÅAŠŽ‚Â<tt>_FS_MINIMIZE == 0</tt>‚Ì‚Æ‚«‚ÉŽg—p‰Â”\‚Å‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>ŽQÆ</h4>
+<p><tt><a href="stat.html">f_stat</a>, <a href="sfileinfo.html">FILINFO</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_j.html">–ß‚é</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/write.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/write.html
new file mode 100644
index 0000000..7d48885
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/ja/write.html
@@ -0,0 +1,80 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="FatFs" href="../00index_j.html">
+<link rel="alternate" hreflang="en" title="English" href="../en/write.html">
+<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_write</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_write</h2>
+<p>ƒtƒ@ƒCƒ‹‚Ƀf[ƒ^‚ð‘‚«ž‚Ý‚Ü‚·B</p>
+<pre>
+FRESULT f_write (
+ FIL* <em>FileObject</em>, <span class="c">/* ƒtƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒg */</span>
+ const void* <em>Buffer</em>, <span class="c">/* ‘‚«ž‚݃f[ƒ^ */</span>
+ UINT <em>ByteToWrite</em>, <span class="c">/* ‘‚«ž‚ÞƒoƒCƒg” */</span>
+ UINT* <em>ByteWritten</em> <span class="c">/* ‘‚«ž‚܂ꂽƒoƒCƒg” */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>ˆø”</h4>
+<dl class="par">
+<dt>FileObject</dt>
+<dd>ƒtƒ@ƒCƒ‹EƒIƒuƒWƒFƒNƒg\‘¢‘̂ւ̃|ƒCƒ“ƒ^‚ðŽw’肵‚Ü‚·B</dd>
+<dt>Buffer</dt>
+<dd>‘‚«ž‚Þƒf[ƒ^‚ðŠi”[‚µ‚½ƒoƒbƒtƒ@‚ðŽw‚·ƒ|ƒCƒ“ƒ^‚ðŽw’肵‚Ü‚·B</dd>
+<dt>ByteToWrite</dt>
+<dd>‘‚«ž‚ÞƒoƒCƒg”(0`UINT‚ÌÅ‘å’l)‚ðŽw’肵‚Ü‚·B</dd>
+<dt>ByteWritten</dt>
+<dd>‘‚«ž‚܂ꂽƒoƒCƒg”‚ðŠi”[‚·‚é•Ï”‚ðŽw‚·ƒ|ƒCƒ“ƒ^‚ðŽw’肵‚Ü‚·B–ß‚è’l‚ÍŠÖ”‚̬”Û‚É‚©‚©‚í‚炸í‚É—LŒø‚Å‚·B</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>–ß‚è’l</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>³íI—¹B</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>ƒfƒBƒXƒNEƒGƒ‰[‚É‚æ‚鎸”sB</dd>
+<dt>FR_INT_ERR</dt>
+<dd>•s³‚ÈFAT\‘¢‚Ü‚½‚Í“à•”ƒGƒ‰[‚É‚æ‚鎸”sB</dd>
+<dt>FR_NOT_READY</dt>
+<dd>ƒƒfƒBƒA‚ªƒZƒbƒg‚³‚ê‚Ä‚¢‚È‚¢‚È‚ÇA•¨—ƒhƒ‰ƒCƒu‚ª“®ì•s”\ó‘ÔB</dd>
+<dt>FR_DENIED</dt>
+<dd>”ñ‘‚«ž‚݃‚[ƒh‚ÅŠJ‚©‚ꂽƒtƒ@ƒCƒ‹‚É‘‚«ž‚à‚¤‚Æ‚µ‚½B</dd>
+<dt>FR_INVALID_OBJECT</dt>
+<dd>–³Œø‚ȃtƒ@ƒCƒ‹ƒIƒuƒWƒFƒNƒgB</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>‰ðà</h4>
+<p>‘‚«ž‚ÝŠJŽnˆÊ’u‚ÍAƒŠ[ƒh/ƒ‰ƒCƒgEƒ|ƒCƒ“ƒ^‚̈ʒu‚©‚ç‚É‚È‚è‚Ü‚·BƒŠ[ƒh/ƒ‰ƒCƒgEƒ|ƒCƒ“ƒ^‚ÍŽÀÛ‚É‘‚«ž‚܂ꂽƒoƒCƒg”‚¾‚¯i‚Ý‚Ü‚·BŠÖ”‚ª³íI—¹‚µ‚½ŒãA—v‹‚µ‚½ƒoƒCƒg”‚ª‘‚«ž‚܂ꂽ‚©‚Ç‚¤‚©<tt>*ByteWritten</tt>‚ðƒ`ƒFƒbƒN‚·‚ׂ«‚Å‚·B<tt>*ByteWritten &lt; ByteToWrite</tt>‚Ì‚Æ‚«‚ÍAƒfƒBƒXƒNEƒtƒ‹‚ðˆÓ–¡‚µ‚Ü‚·BƒfƒBƒXƒNEƒtƒ‹‚ª”­¶‚µ‚Ä‚¢‚é‚Æ‚«‚Ü‚½‚Í‚»‚ê‚É‹ß‚¢‚Æ‚«‚ÍA§Œä‚ª‹A‚é‚Ü‚ÅŽžŠÔ‚ª‚©‚©‚éꇂª‚ ‚è‚Ü‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>‘Ήžî•ñ</h4>
+<p><tt>_FS_READONLY == 0</tt>‚Ì‚Æ‚«‚ÉŽg—p‰Â”\‚Å‚·B</p>
+</div>
+
+
+<div class="para">
+<h4>ŽQÆ</h4>
+<p><tt><a href="open.html">f_open</a>, <a href="read.html">f_read</a>, <a href="putc.html">fputc</a>, <a href="puts.html">fputs</a>, <a href="printf.html">fprintf</a>, <a href="close.html">f_close</a>, <a href="sfile.html">FIL</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_j.html">–ß‚é</a></p>
+</body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/updates.txt b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/updates.txt
new file mode 100644
index 0000000..abf7eb2
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/doc/updates.txt
@@ -0,0 +1,110 @@
+R0.08b, Jan 15, 2011
+ Fast seek feature is also applied to f_read() and f_write().
+ f_lseek() reports required table size on creating CLMP.
+ Extended format syntax of f_printf function.
+ Ignores duplicated directory separators in given path names.
+
+R0.08a, Aug 16, 2010
+ Added f_getcwd(). (_FS_RPATH = 2)
+ Added sector erase feature. (_USE_ERASE)
+ Moved file lock semaphore table from fs object to the bss.
+ Fixed a wrong directory entry is created on non-LFN cfg when the given name contains ';'.
+ Fixed f_mkfs() creates wrong FAT32 volume.
+
+R0.08, May 15, 2010
+ Added a memory configuration option. (_USE_LFN)
+ Added file lock feature. (_FS_SHARE)
+ Added fast seek feature. (_USE_FASTSEEK)
+ Changed some types on the API, XCHAR->TCHAR.
+ Changed fname member in the FILINFO structure on Unicode cfg.
+ String functions support UTF-8 encoding files on Unicode cfg.
+
+R0.07e, Nov 3, 2009
+ Separated out configuration options from ff.h to ffconf.h.
+ Added a configuration option, _LFN_UNICODE.
+ Fixed f_unlink() fails to remove a sub-dir on _FS_RPATH.
+ Fixed name matching error on the 13 char boundary.
+ Changed f_readdir() to return the SFN with always upper case on non-LFN cfg.
+
+R0.07c, Jun 21, 2009
+ Fixed f_unlink() may return FR_OK on error.
+ Fixed wrong cache control in f_lseek().
+ Added relative path feature.
+ Added f_chdir().
+ Added f_chdrive().
+ Added proper case conversion to extended characters.
+
+R0.07a, Apr 14, 2009
+ Separated out OS dependent code on re-entrant configuration.
+ Added multiple sector size support.
+
+R0.07, Apr 01, 2009
+ Merged Tiny-FatFs into FatFs as a buffer configuration option.
+ Added long file name support.
+ Added multiple code page support.
+ Added re-entrancy for multitask operation.
+ Added auto cluster size selection to f_mkfs().
+ Added rewind option to f_readdir().
+ Changed result code of critical errors.
+ Renamed string functions to avoid name collision.
+
+R0.06, Apr 01, 2008
+ Added f_forward. (Tiny-FatFs)
+ Added string functions: fgets, fputc, fputs and fprintf.
+ Improved performance of f_lseek on moving to the same or following cluster.
+
+R0.05a, Feb 03, 2008
+ Added f_truncate.
+ Added f_utime.
+ Fixed off by one error at FAT sub-type determination.
+ Fixed btr in f_read can be mistruncated.
+ Fixed cached sector is left not flushed when create and close without write.
+
+R0.05, Aug 26, 2007
+ Changed arguments of f_read, f_write.
+ Changed arguments of f_mkfs. (FatFs)
+ Fixed f_mkfs on FAT32 creates incorrect FSInfo. (FatFs)
+ Fixed f_mkdir on FAT32 creates incorrect directory. (FatFs)
+
+R0.04b, May 05, 2007
+ Added _USE_NTFLAG option.
+ Added FSInfo support.
+ Fixed some problems corresponds to FAT32. (Tiny-FatFs)
+ Fixed DBCS name can result FR_INVALID_NAME.
+ Fixed short seek (<= csize) collapses the file object.
+
+R0.04a, Apr 01, 2007
+ Supported multiple partitions on a plysical drive. (FatFs)
+ Added minimization level 3.
+ Added a capability of extending file size to f_lseek.
+ Fixed an endian sensitive code in f_mkfs. (FatFs)
+ Fixed a problem corresponds to FAT32 support. (Tiny-FatFs)
+
+R0.04, Feb 04, 2007
+ Supported multiple drive system. (FatFs)
+ Changed some APIs for multiple drive system.
+ Added f_mkfs. (FatFs)
+ Added _USE_FAT32 option. (Tiny-FatFs)
+
+R0.03a, Dec 11, 2006
+ Improved cluster scan algolithm to write files fast.
+ Fixed f_mkdir creates incorrect directory on FAT32.
+
+R0.03, Sep 22, 2006
+ Added f_rename.
+ Changed option _FS_MINIMUM to _FS_MINIMIZE.
+
+R0.02a, Jun 10, 2006
+ Added a configuration option _FS_MINIMUM.
+
+R0.02, Jun 01, 2006
+ Added FAT12.
+ Removed unbuffered mode.
+ Fixed a problem on small (<32M) patition.
+
+R0.01, Apr 29, 2006
+ First release
+
+R0.00, Feb 26, 2006
+ Prototype (not released)
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/00readme.txt b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/00readme.txt
new file mode 100644
index 0000000..50805cc
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/00readme.txt
@@ -0,0 +1,127 @@
+FatFs Module Source Files R0.08b (C)ChaN, 2011
+
+
+FILES
+
+ ffconf.h Configuration file for FatFs module.
+ ff.h Common include file for FatFs and application module.
+ ff.c FatFs module.
+ diskio.h Common include file for FatFs and disk I/O module.
+ integer.h Alternative type definitions for integer variables.
+ option Optional external functions.
+
+ Low level disk I/O module is not included in this archive because the FatFs
+ module is only a generic file system layer and not depend on any specific
+ storage device. You have to provide a low level disk I/O module that written
+ to control your storage device.
+
+
+
+AGREEMENTS
+
+ FatFs module is an open source software to implement FAT file system to
+ small embedded systems. This is a free software and is opened for education,
+ research and commercial developments under license policy of following trems.
+
+ Copyright (C) 2011, ChaN, all right reserved.
+
+ * The FatFs module is a free software and there is NO WARRANTY.
+ * No restriction on use. You can use, modify and redistribute it for
+ personal, non-profit or commercial product UNDER YOUR RESPONSIBILITY.
+ * Redistributions of source code must retain the above copyright notice.
+
+
+
+REVISION HISTORY
+
+ Feb 26, 2006 R0.00 Prototype
+
+ Apr 29, 2006 R0.01 First release.
+
+ Jun 01, 2006 R0.02 Added FAT12.
+ Removed unbuffered mode.
+ Fixed a problem on small (<32M) patition.
+
+ Jun 10, 2006 R0.02a Added a configuration option _FS_MINIMUM.
+
+ Sep 22, 2006 R0.03 Added f_rename.
+ Changed option _FS_MINIMUM to _FS_MINIMIZE.
+
+ Dec 11, 2006 R0.03a Improved cluster scan algolithm to write files fast.
+ Fixed f_mkdir creates incorrect directory on FAT32.
+
+ Feb 04, 2007 R0.04 Supported multiple drive system. (FatFs)
+ Changed some APIs for multiple drive system.
+ Added f_mkfs. (FatFs)
+ Added _USE_FAT32 option. (Tiny-FatFs)
+
+ Apr 01, 2007 R0.04a Supported multiple partitions on a plysical drive. (FatFs)
+ Fixed an endian sensitive code in f_mkfs. (FatFs)
+ Added a capability of extending the file size to f_lseek.
+ Added minimization level 3.
+ Fixed a problem that can collapse a sector when recreate an
+ existing file in any sub-directory at non FAT32 cfg. (Tiny-FatFs)
+
+ May 05, 2007 R0.04b Added _USE_NTFLAG option.
+ Added FSInfo support.
+ Fixed some problems corresponds to FAT32. (Tiny-FatFs)
+ Fixed DBCS name can result FR_INVALID_NAME.
+ Fixed short seek (0 < ofs <= csize) collapses the file object.
+
+ Aug 25, 2007 R0.05 Changed arguments of f_read, f_write.
+ Changed arguments of f_mkfs. (FatFs)
+ Fixed f_mkfs on FAT32 creates incorrect FSInfo. (FatFs)
+ Fixed f_mkdir on FAT32 creates incorrect directory. (FatFs)
+
+ Feb 03, 2008 R0.05a Added f_truncate().
+ Added f_utime().
+ Fixed off by one error at FAT sub-type determination.
+ Fixed btr in f_read() can be mistruncated.
+ Fixed cached sector is not flushed when create and close without write.
+
+ Apr 01, 2008 R0.06 Added f_forward(). (Tiny-FatFs)
+ Added string functions: fputc(), fputs(), fprintf() and fgets().
+ Improved performance of f_lseek() on move to the same or following cluster.
+
+ Apr 01, 2009, R0.07 Merged Tiny-FatFs as a buffer configuration option.
+ Added long file name support.
+ Added multiple code page support.
+ Added re-entrancy for multitask operation.
+ Added auto cluster size selection to f_mkfs().
+ Added rewind option to f_readdir().
+ Changed result code of critical errors.
+ Renamed string functions to avoid name collision.
+
+ Apr 14, 2009, R0.07a Separated out OS dependent code on reentrant cfg.
+ Added multiple sector size support.
+
+ Jun 21, 2009, R0.07c Fixed f_unlink() may return FR_OK on error.
+ Fixed wrong cache control in f_lseek().
+ Added relative path feature.
+ Added f_chdir().
+ Added f_chdrive().
+ Added proper case conversion for extended characters.
+
+ Nov 03, 2009 R0.07e Separated out configuration options from ff.h to ffconf.h.
+ Added a configuration option, _LFN_UNICODE.
+ Fixed f_unlink() fails to remove a sub-dir on _FS_RPATH.
+ Fixed name matching error on the 13 char boundary.
+ Changed f_readdir() to return the SFN with always upper case on non-LFN cfg.
+
+ May 15, 2010, R0.08 Added a memory configuration option. (_USE_LFN)
+ Added file lock feature. (_FS_SHARE)
+ Added fast seek feature. (_USE_FASTSEEK)
+ Changed some types on the API, XCHAR->TCHAR.
+ Changed fname member in the FILINFO structure on Unicode cfg.
+ String functions support UTF-8 encoding files on Unicode cfg.
+
+ Aug 16,'10 R0.08a Added f_getcwd(). (_FS_RPATH = 2)
+ Added sector erase feature. (_USE_ERASE)
+ Moved file lock semaphore table from fs object to the bss.
+ Fixed a wrong directory entry is created on non-LFN cfg when the given name contains ';'.
+ Fixed f_mkfs() creates wrong FAT32 volume.
+
+ Jan 15,'11 R0.08b Fast seek feature is also applied to f_read() and f_write().
+ f_lseek() reports required table size on creating CLMP.
+ Extended format syntax of f_printf function.
+ Ignores duplicated directory separators in given path names.
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/diskio.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/diskio.c
new file mode 100644
index 0000000..e69a271
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/diskio.c
@@ -0,0 +1,213 @@
+/*-----------------------------------------------------------------------*/
+/* Low level disk I/O module skeleton for FatFs (C)ChaN, 2007 */
+/*-----------------------------------------------------------------------*/
+/* This is a stub disk I/O module that acts as front end of the existing */
+/* disk I/O modules and attach it to FatFs module with common interface. */
+/*-----------------------------------------------------------------------*/
+
+#include "diskio.h"
+
+/*-----------------------------------------------------------------------*/
+/* Correspondence between physical drive number and physical drive. */
+/*-----------------------------------------------------------------------*/
+
+#define ATA 0
+#define MMC 1
+#define USB 2
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Inidialize a Drive */
+/*-----------------------------------------------------------------------*/
+
+DSTATUS disk_initialize (
+ BYTE drv /* Physical drive nmuber (0..) */
+)
+{
+ DSTATUS stat;
+ int result;
+
+ switch (drv) {
+ case ATA :
+ result = ATA_disk_initialize();
+ // translate the reslut code here
+
+ return stat;
+
+ case MMC :
+ result = MMC_disk_initialize();
+ // translate the reslut code here
+
+ return stat;
+
+ case USB :
+ result = USB_disk_initialize();
+ // translate the reslut code here
+
+ return stat;
+ }
+ return STA_NOINIT;
+}
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Return Disk Status */
+/*-----------------------------------------------------------------------*/
+
+DSTATUS disk_status (
+ BYTE drv /* Physical drive nmuber (0..) */
+)
+{
+ DSTATUS stat;
+ int result;
+
+ switch (drv) {
+ case ATA :
+ result = ATA_disk_status();
+ // translate the reslut code here
+
+ return stat;
+
+ case MMC :
+ result = MMC_disk_status();
+ // translate the reslut code here
+
+ return stat;
+
+ case USB :
+ result = USB_disk_status();
+ // translate the reslut code here
+
+ return stat;
+ }
+ return STA_NOINIT;
+}
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Read Sector(s) */
+/*-----------------------------------------------------------------------*/
+
+DRESULT disk_read (
+ BYTE drv, /* Physical drive nmuber (0..) */
+ BYTE *buff, /* Data buffer to store read data */
+ DWORD sector, /* Sector address (LBA) */
+ BYTE count /* Number of sectors to read (1..255) */
+)
+{
+ DRESULT res;
+ int result;
+
+ switch (drv) {
+ case ATA :
+ result = ATA_disk_read(buff, sector, count);
+ // translate the reslut code here
+
+ return res;
+
+ case MMC :
+ result = MMC_disk_read(buff, sector, count);
+ // translate the reslut code here
+
+ return res;
+
+ case USB :
+ result = USB_disk_read(buff, sector, count);
+ // translate the reslut code here
+
+ return res;
+ }
+ return RES_PARERR;
+}
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Write Sector(s) */
+/*-----------------------------------------------------------------------*/
+/* The FatFs module will issue multiple sector transfer request
+/ (count > 1) to the disk I/O layer. The disk function should process
+/ the multiple sector transfer properly Do. not translate it into
+/ multiple single sector transfers to the media, or the data read/write
+/ performance may be drasticaly decreased. */
+
+#if _READONLY == 0
+DRESULT disk_write (
+ BYTE drv, /* Physical drive nmuber (0..) */
+ const BYTE *buff, /* Data to be written */
+ DWORD sector, /* Sector address (LBA) */
+ BYTE count /* Number of sectors to write (1..255) */
+)
+{
+ DRESULT res;
+ int result;
+
+ switch (drv) {
+ case ATA :
+ result = ATA_disk_write(buff, sector, count);
+ // translate the reslut code here
+
+ return res;
+
+ case MMC :
+ result = MMC_disk_write(buff, sector, count);
+ // translate the reslut code here
+
+ return res;
+
+ case USB :
+ result = USB_disk_write(buff, sector, count);
+ // translate the reslut code here
+
+ return res;
+ }
+ return RES_PARERR;
+}
+#endif /* _READONLY */
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Miscellaneous Functions */
+/*-----------------------------------------------------------------------*/
+
+DRESULT disk_ioctl (
+ BYTE drv, /* Physical drive nmuber (0..) */
+ BYTE ctrl, /* Control code */
+ void *buff /* Buffer to send/receive control data */
+)
+{
+ DRESULT res;
+ int result;
+
+ switch (drv) {
+ case ATA :
+ // pre-process here
+
+ result = ATA_disk_ioctl(ctrl, buff);
+ // post-process here
+
+ return res;
+
+ case MMC :
+ // pre-process here
+
+ result = MMC_disk_ioctl(ctrl, buff);
+ // post-process here
+
+ return res;
+
+ case USB :
+ // pre-process here
+
+ result = USB_disk_ioctl(ctrl, buff);
+ // post-process here
+
+ return res;
+ }
+ return RES_PARERR;
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/diskio.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/diskio.h
new file mode 100644
index 0000000..72f1848
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/diskio.h
@@ -0,0 +1,78 @@
+/*-----------------------------------------------------------------------
+/ Low level disk interface modlue include file
+/-----------------------------------------------------------------------*/
+
+#ifndef _DISKIO
+
+#define _READONLY 0 /* 1: Remove write functions */
+#define _USE_IOCTL 1 /* 1: Use disk_ioctl fucntion */
+
+#include "integer.h"
+
+
+/* Status of Disk Functions */
+typedef BYTE DSTATUS;
+
+/* Results of Disk Functions */
+typedef enum {
+ RES_OK = 0, /* 0: Successful */
+ RES_ERROR, /* 1: R/W Error */
+ RES_WRPRT, /* 2: Write Protected */
+ RES_NOTRDY, /* 3: Not Ready */
+ RES_PARERR /* 4: Invalid Parameter */
+} DRESULT;
+
+
+/*---------------------------------------*/
+/* Prototypes for disk control functions */
+
+int assign_drives (int, int);
+DSTATUS disk_initialize (BYTE);
+DSTATUS disk_status (BYTE);
+DRESULT disk_read (BYTE, BYTE*, DWORD, BYTE);
+#if _READONLY == 0
+DRESULT disk_write (BYTE, const BYTE*, DWORD, BYTE);
+#endif
+DRESULT disk_ioctl (BYTE, BYTE, void*);
+
+
+
+/* Disk Status Bits (DSTATUS) */
+
+#define STA_NOINIT 0x01 /* Drive not initialized */
+#define STA_NODISK 0x02 /* No medium in the drive */
+#define STA_PROTECT 0x04 /* Write protected */
+
+
+/* Command code for disk_ioctrl fucntion */
+
+/* Generic command (defined for FatFs) */
+#define CTRL_SYNC 0 /* Flush disk cache (for write functions) */
+#define GET_SECTOR_COUNT 1 /* Get media size (for only f_mkfs()) */
+#define GET_SECTOR_SIZE 2 /* Get sector size (for multiple sector size (_MAX_SS >= 1024)) */
+#define GET_BLOCK_SIZE 3 /* Get erase block size (for only f_mkfs()) */
+#define CTRL_ERASE_SECTOR 4 /* Force erased a block of sectors (for only _USE_ERASE) */
+
+/* Generic command */
+#define CTRL_POWER 5 /* Get/Set power status */
+#define CTRL_LOCK 6 /* Lock/Unlock media removal */
+#define CTRL_EJECT 7 /* Eject media */
+
+/* MMC/SDC specific ioctl command */
+#define MMC_GET_TYPE 10 /* Get card type */
+#define MMC_GET_CSD 11 /* Get CSD */
+#define MMC_GET_CID 12 /* Get CID */
+#define MMC_GET_OCR 13 /* Get OCR */
+#define MMC_GET_SDSTAT 14 /* Get SD status */
+
+/* ATA/CF specific ioctl command */
+#define ATA_GET_REV 20 /* Get F/W revision */
+#define ATA_GET_MODEL 21 /* Get model name */
+#define ATA_GET_SN 22 /* Get serial number */
+
+/* NAND specific ioctl command */
+#define NAND_FORMAT 30 /* Create physical format */
+
+
+#define _DISKIO
+#endif
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/diskio_rt.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/diskio_rt.c
new file mode 100644
index 0000000..916fe94
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/diskio_rt.c
@@ -0,0 +1,371 @@
+/*-----------------------------------------------------------------------*/
+/* Low level disk I/O module skeleton for FatFs (C)ChaN, 2007 */
+/*-----------------------------------------------------------------------*/
+/* This is a stub disk I/O module that acts as front end of the existing */
+/* disk I/O modules and attach it to FatFs module with common interface. */
+/*-----------------------------------------------------------------------*/
+
+#include "board.h"
+#include <assert.h>
+
+#include "fatfs_config.h"
+#include "diskio.h"
+#include "ftldrv.h"
+#include "integer.h"
+
+
+#include <string.h>
+#include <stdio.h>
+
+
+/*-----------------------------------------------------------------------*/
+/* Initialize a Drive */
+/*-----------------------------------------------------------------------*/
+
+
+DSTATUS disk_initialize (
+ BYTE drv /* Physical drive number (0..) */
+)
+{
+ DSTATUS stat = STA_NOINIT;
+
+ switch (drv) {
+ case DRV_SDRAM :
+ stat = 0;
+ break;
+
+ case DRV_MMC :
+ stat = 0;
+ break;
+
+ case DRV_NAND:
+ stat = 0;
+ break;
+ }
+
+ return stat;
+}
+
+/*-----------------------------------------------------------------------*/
+/* Return Disk Status */
+/*-----------------------------------------------------------------------*/
+
+DSTATUS disk_status (
+ BYTE drv /* Physical drive number (0..) */
+)
+{
+ DSTATUS stat=STA_NOINIT;
+
+ switch (drv) {
+ case DRV_SDRAM :
+ stat = 0; // ok
+ break;
+
+ case DRV_MMC :
+ stat = 0; // ok
+ break;
+ case DRV_NAND:
+ stat = 0;
+ break;
+ }
+
+ return stat;
+}
+
+/*-----------------------------------------------------------------------*/
+/* Read Sector(s) */
+/*-----------------------------------------------------------------------*/
+
+DRESULT disk_read (
+ BYTE drv, /* Physical drive number (0..) */
+ BYTE *buff, /* Data buffer to store read data */
+ DWORD sector, /* Sector address (LBA) */
+ BYTE count /* Number of sectors to read (1..255) */
+)
+{
+ unsigned char result;
+ DRESULT res = RES_ERROR;
+
+ unsigned int addr, len;
+ RtMedia *pRtMedia;
+ Media *pMedia;
+
+ if (drv == DRV_NAND)
+ pRtMedia = &(gRtNandMedias);
+ else {
+ TRACE_ERROR("disk_read: Unknown drive\n\r");
+ return RES_ERROR;
+ }
+
+ pMedia = &(pRtMedia->media);
+
+ if (pMedia->blockSize < SECTOR_SIZE_DEFAULT) {
+ addr = sector * (SECTOR_SIZE_DEFAULT / pMedia->blockSize);
+ len = count * (SECTOR_SIZE_DEFAULT / pMedia->blockSize);
+ }
+ else {
+ addr = sector;
+ len = count;
+ }
+
+ result = RTMEDIA_Read(pRtMedia,
+ addr, // address
+ (void*)buff, // data
+ len, // data size
+ NULL,
+ NULL);
+
+ if( result == MED_STATUS_SUCCESS ) {
+ res = RES_OK;
+ }
+ else {
+ TRACE_ERROR("RTMEDIA_Read pb: 0x%X\n\r", result);
+ res = RES_ERROR;
+ }
+
+ return res;
+}
+
+/*-----------------------------------------------------------------------*/
+/* Write Sector(s) */
+/*-----------------------------------------------------------------------*/
+/* The FatFs module will issue multiple sector transfer request
+/ (count > 1) to the disk I/O layer. The disk function should process
+/ the multiple sector transfer properly Do. not translate it into
+/ multiple single sector transfers to the media, or the data read/write
+/ performance may be drasticaly decreased. */
+
+#if _READONLY == 0
+DRESULT disk_write (
+ BYTE drv, /* Physical drive number (0..) */
+ const BYTE *buff, /* Data to be written */
+ DWORD sector, /* Sector address (LBA) */
+ BYTE count /* Number of sectors to write (1..255) */
+)
+{
+ DRESULT res=RES_PARERR;
+ unsigned int result;
+ void * tmp;
+ tmp = (void *) buff;
+ RtMedia *pRtMedia;
+ Media *pMedia;
+ unsigned int addr, len;
+
+ if (drv == DRV_NAND)
+ pRtMedia = &(gRtNandMedias);
+ else {
+ TRACE_ERROR("disk_read: Unknown drive\n\r");
+ return RES_ERROR;
+ }
+
+ pMedia = &(pRtMedia->media);
+
+ if (pMedia->blockSize < SECTOR_SIZE_DEFAULT) {
+ addr = sector * (SECTOR_SIZE_DEFAULT / pMedia->blockSize);
+ len = count * (SECTOR_SIZE_DEFAULT / pMedia->blockSize);
+ }
+ else {
+ addr = sector;
+ len = count;
+ }
+
+ result = RTMEDIA_Write(pRtMedia,
+ addr, // address
+ (void*)tmp, // data
+ len, // data size
+ NULL,
+ NULL);
+
+ if( result == MED_STATUS_SUCCESS ) {
+
+ res = RES_OK;
+ }
+ else {
+
+ TRACE_ERROR("RTMEDIA_Write pb: 0x%X\n\r", result);
+ res = RES_ERROR;
+ }
+
+ return res;
+}
+#endif /* _READONLY */
+
+/*-----------------------------------------------------------------------*/
+/* Miscellaneous Functions */
+// Command Description
+//
+//CTRL_SYNC Make sure that the disk drive has finished pending write process.
+// When the disk I/O module has a write back cache, flush the dirty sector immediately.
+// In read-only configuration, this command is not needed.
+//
+//GET_SECTOR_COUNT Returns total sectors on the drive into the DWORD variable pointed by Buffer.
+// This command is used in only f_mkfs function.
+//
+//GET_BLOCK_SIZE Returns erase block size of the memory array in unit
+// of sector into the DWORD variable pointed by Buffer.
+// When the erase block size is unknown or magnetic disk device, return 1.
+// This command is used in only f_mkfs function.
+/*-----------------------------------------------------------------------*/
+
+DRESULT disk_ioctl (
+ BYTE drv, /* Physical drive number (0..) */
+ BYTE ctrl, /* Control code */
+ void *buff /* Buffer to send/receive control data */
+)
+{
+ DRESULT res=RES_PARERR;
+ RtMedia *pRtMedia;
+ Media *pMedia;
+
+ if (drv == DRV_NAND)
+ pRtMedia = &(gRtNandMedias);
+ else {
+ TRACE_ERROR("disk_read: Unknown drive\n\r");
+ return RES_ERROR;
+ }
+
+ pMedia = &(pRtMedia->media);
+
+ switch (drv) {
+ case DRV_SDRAM :
+ switch (ctrl) {
+
+ case GET_BLOCK_SIZE:
+ *(WORD*)buff = 1;
+ res = RES_OK;
+ break;
+
+ case GET_SECTOR_COUNT : /* Get number of sectors on the disk (DWORD) */
+ //*(DWORD*)buff = (DWORD)(medias[DRV_SDRAM].size);
+ if (pMedia->blockSize < SECTOR_SIZE_DEFAULT)
+ *(DWORD*)buff = (DWORD)(pMedia->size /
+ (SECTOR_SIZE_DEFAULT /
+ pMedia->blockSize));
+ else
+ *(DWORD*)buff = (DWORD)(pMedia->size);
+
+ res = RES_OK;
+ break;
+
+ case GET_SECTOR_SIZE : /* Get sectors on the disk (WORD) */
+ //*(WORD*)buff = medias[DRV_SDRAM].blockSize;
+ if (pMedia->blockSize < SECTOR_SIZE_DEFAULT)
+ *(WORD*)buff = SECTOR_SIZE_DEFAULT;
+ else
+ *(WORD*)buff = pMedia->blockSize;
+ res = RES_OK;
+ break;
+
+ case CTRL_SYNC : /* Make sure that data has been written */
+ res = RES_OK;
+ break;
+
+ default:
+ res = RES_PARERR;
+ }
+ break;
+
+ case DRV_MMC :
+ switch (ctrl) {
+
+ case GET_BLOCK_SIZE:
+ *(WORD*)buff = 1;
+ res = RES_OK;
+ break;
+
+ case GET_SECTOR_COUNT : /* Get number of sectors on the disk (DWORD) */
+ //*(DWORD*)buff = (DWORD)(medias[DRV_MMC].size);
+ if (pMedia->blockSize < SECTOR_SIZE_DEFAULT)
+ *(DWORD*)buff = (DWORD)(pMedia->size /
+ (SECTOR_SIZE_DEFAULT /
+ pMedia->blockSize));
+ else
+ *(DWORD*)buff = (DWORD)(pMedia->size);
+ res = RES_OK;
+ break;
+
+ case GET_SECTOR_SIZE : /* Get sectors on the disk (WORD) */
+ //*(WORD*)buff = medias[DRV_MMC].blockSize;
+ if (pMedia->blockSize < SECTOR_SIZE_DEFAULT)
+ *(WORD*)buff = SECTOR_SIZE_DEFAULT;
+ else
+ *(WORD*)buff = pMedia->blockSize;
+ res = RES_OK;
+ break;
+
+ case CTRL_SYNC : /* Make sure that data has been written */
+ res = RES_OK;
+ break;
+
+ default:
+ res = RES_PARERR;
+ }
+ break;
+
+ case DRV_NAND :
+ switch (ctrl) {
+
+ case GET_BLOCK_SIZE:
+ *(WORD*)buff = 1;
+ res = RES_OK;
+ break;
+
+ case GET_SECTOR_COUNT : /* Get number of sectors on the disk (DWORD) */
+ if (pMedia->blockSize < SECTOR_SIZE_DEFAULT)
+ *(DWORD*)buff = (DWORD)(pMedia->size /
+ (SECTOR_SIZE_DEFAULT /
+ pMedia->blockSize));
+ else
+ *(DWORD*)buff = (DWORD)(pMedia->size);
+ res = RES_OK;
+ break;
+
+ case GET_SECTOR_SIZE : /* Get sectors on the disk (WORD) */
+ //*(WORD*)buff = medias[DRV_MMC].blockSize;
+ if (pMedia->blockSize < SECTOR_SIZE_DEFAULT)
+ *(WORD*)buff = SECTOR_SIZE_DEFAULT;
+ else
+ *(WORD*)buff = pMedia->blockSize;
+ res = RES_OK;
+ break;
+
+ case CTRL_SYNC : /* Make sure that data has been written */
+ MED_Flush(pMedia);
+ res = RES_OK;
+ break;
+
+ default:
+ res = RES_PARERR;
+ }
+
+ }
+
+ return res;
+}
+
+//------------------------------------------------------------------------------
+/// Current time is returned with packed into a DWORD value.
+/// The bit field is as follows:
+/// bit31:25 Year from 1980 (0..127)
+/// bit24:21 Month (1..12)
+/// bit20:16 Day in month(1..31)
+/// bit15:11 Hour (0..23)
+/// bit10:5 Minute (0..59)
+/// bit4:0 Second / 2 (0..29)
+//------------------------------------------------------------------------------
+DWORD get_fattime (void)
+{
+ unsigned int time;
+
+ time = ((2010-1980)<<25)
+ | ( 9<<21)
+ | (15<<16)
+ | (17<<11)
+ | (45<<5)
+ | ((59/2)<<0);
+
+ return time;
+}
+
+
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/diskio_sam3x.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/diskio_sam3x.c
new file mode 100644
index 0000000..06b50fb
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/diskio_sam3x.c
@@ -0,0 +1,353 @@
+/*-----------------------------------------------------------------------*/
+/* Low level disk I/O module skeleton for FatFs (C)ChaN, 2007 */
+/*-----------------------------------------------------------------------*/
+/* This is a stub disk I/O module that acts as front end of the existing */
+/* disk I/O modules and attach it to FatFs module with common interface. */
+/*-----------------------------------------------------------------------*/
+
+#include "board.h"
+#include "memories.h"
+
+#include "diskio.h"
+#include "integer.h"
+#include "fatfs_config.h"
+
+#include <string.h>
+#include <stdio.h>
+#include <assert.h>
+
+#define MAX_MEDS 1
+extern Media medias[MAX_MEDS];
+
+
+/*-----------------------------------------------------------------------*/
+/* Initialize a Drive */
+/*-----------------------------------------------------------------------*/
+
+
+DSTATUS disk_initialize (
+ BYTE drv /* Physical drive number (0..) */
+)
+{
+ DSTATUS stat = STA_NOINIT;
+
+ switch (drv)
+ {
+ case DRV_SDRAM :
+ stat = 0;
+ break;
+
+ case DRV_MMC :
+ stat = 0;
+ break;
+
+ case DRV_NAND:
+ stat = 0;
+ break;
+ }
+
+ return stat;
+}
+
+/*-----------------------------------------------------------------------*/
+/* Return Disk Status */
+/*-----------------------------------------------------------------------*/
+
+DSTATUS disk_status (
+ BYTE drv /* Physical drive number (0..) */
+)
+{
+ DSTATUS stat=STA_NOINIT;
+
+ switch (drv)
+ {
+ case DRV_SDRAM :
+ stat = 0; // ok
+ break;
+
+ case DRV_MMC :
+ stat = 0; // ok
+ break;
+ case DRV_NAND:
+ stat = 0;
+ break;
+ }
+
+ return stat;
+}
+
+/*-----------------------------------------------------------------------*/
+/* Read Sector(s) */
+/*-----------------------------------------------------------------------*/
+
+DRESULT disk_read (
+ BYTE drv, /* Physical drive number (0..) */
+ BYTE *buff, /* Data buffer to store read data */
+ DWORD sector, /* Sector address (LBA) */
+ BYTE count /* Number of sectors to read (1..255) */
+)
+{
+ unsigned char result;
+ DRESULT res = RES_ERROR;
+
+ unsigned int addr, len;
+ if (medias[drv].blockSize < SECTOR_SIZE_DEFAULT)
+ {
+ addr = sector * (SECTOR_SIZE_DEFAULT / medias[drv].blockSize);
+ len = count * (SECTOR_SIZE_DEFAULT / medias[drv].blockSize);
+ }
+ else
+ {
+ addr = sector;
+ len = count;
+ }
+
+ result = MED_Read(&medias[drv], addr, (void*)buff, len, NULL, NULL);
+
+ if( result == MED_STATUS_SUCCESS )
+ {
+ res = RES_OK;
+ }
+ else
+ {
+ TRACE_ERROR("MED_Read pb: 0x%X\n\r", result);
+ res = RES_ERROR;
+ }
+ return res;
+}
+
+/*-----------------------------------------------------------------------*/
+/* Write Sector(s) */
+/*-----------------------------------------------------------------------*/
+/* The FatFs module will issue multiple sector transfer request
+/ (count > 1) to the disk I/O layer. The disk function should process
+/ the multiple sector transfer properly Do. not translate it into
+/ multiple single sector transfers to the media, or the data read/write
+/ performance may be drasticaly decreased. */
+
+#if _READONLY == 0
+DRESULT disk_write (
+ BYTE drv, /* Physical drive number (0..) */
+ const BYTE *buff, /* Data to be written */
+ DWORD sector, /* Sector address (LBA) */
+ BYTE count /* Number of sectors to write (1..255) */
+)
+{
+ DRESULT res=RES_PARERR;
+ unsigned int result;
+ void * tmp;
+ tmp = (void *) buff;
+
+ unsigned int addr, len;
+ if (medias[drv].blockSize < SECTOR_SIZE_DEFAULT)
+ {
+ addr = sector * (SECTOR_SIZE_DEFAULT / medias[drv].blockSize);
+ len = count * (SECTOR_SIZE_DEFAULT / medias[drv].blockSize);
+ }
+ else
+ {
+ addr = sector;
+ len = count;
+ }
+
+ result = MED_Write(&medias[drv], addr, (void*)tmp, len, NULL, NULL);
+
+ if( result == MED_STATUS_SUCCESS )
+ {
+ res = RES_OK;
+ }
+ else
+ {
+ TRACE_ERROR("MED_Write pb: 0x%X\n\r", result);
+ res = RES_ERROR;
+ }
+
+ return res;
+}
+#endif /* _READONLY */
+
+/*-----------------------------------------------------------------------*/
+/* Miscellaneous Functions */
+// Command Description
+//
+//CTRL_SYNC Make sure that the disk drive has finished pending write process.
+// When the disk I/O module has a write back cache, flush the dirty sector immediately.
+// In read-only configuration, this command is not needed.
+//
+//GET_SECTOR_COUNT Returns total sectors on the drive into the DWORD variable pointed by Buffer.
+// This command is used in only f_mkfs function.
+//
+//GET_BLOCK_SIZE Returns erase block size of the memory array in unit
+// of sector into the DWORD variable pointed by Buffer.
+// When the erase block size is unknown or magnetic disk device, return 1.
+// This command is used in only f_mkfs function.
+/*-----------------------------------------------------------------------*/
+
+DRESULT disk_ioctl (
+ BYTE drv, /* Physical drive number (0..) */
+ BYTE ctrl, /* Control code */
+ void *buff /* Buffer to send/receive control data */
+)
+{
+ DRESULT res=RES_PARERR;
+
+ switch (drv)
+ {
+ case DRV_SDRAM :
+ switch (ctrl)
+ {
+ case GET_BLOCK_SIZE:
+ *(DWORD*)buff = 1;
+ res = RES_OK;
+ break;
+
+ case GET_SECTOR_COUNT : /* Get number of sectors on the disk (DWORD) */
+ if (medias[DRV_SDRAM].blockSize < SECTOR_SIZE_DEFAULT)
+ {
+ *(DWORD*)buff = (DWORD)(medias[DRV_SDRAM].size /
+ (SECTOR_SIZE_DEFAULT /
+ medias[DRV_SDRAM].blockSize));
+ }
+ else
+ {
+ *(DWORD*)buff = (DWORD)(medias[DRV_SDRAM].size);
+ }
+ res = RES_OK;
+ break;
+
+ case GET_SECTOR_SIZE : /* Get sectors on the disk (WORD) */
+ if (medias[DRV_SDRAM].blockSize < SECTOR_SIZE_DEFAULT)
+ {
+ *(WORD*)buff = SECTOR_SIZE_DEFAULT;
+ }
+ else
+ {
+ *(WORD*)buff = medias[DRV_SDRAM].blockSize;
+ }
+ res = RES_OK;
+ break;
+
+ case CTRL_SYNC : /* Make sure that data has been written */
+ res = RES_OK;
+ break;
+
+ default:
+ res = RES_PARERR;
+ }
+ break;
+
+ case DRV_MMC :
+ switch (ctrl)
+ {
+ case GET_BLOCK_SIZE:
+ *(DWORD*)buff = 1;
+ res = RES_OK;
+ break;
+
+ case GET_SECTOR_COUNT : /* Get number of sectors on the disk (DWORD) */
+ if (medias[DRV_MMC].blockSize < SECTOR_SIZE_DEFAULT)
+ {
+ *(DWORD*)buff = (DWORD)(medias[DRV_MMC].size /
+ (SECTOR_SIZE_DEFAULT /
+ medias[DRV_MMC].blockSize));
+ }
+ else
+ {
+ *(DWORD*)buff = (DWORD)(medias[DRV_MMC].size);
+ }
+ res = RES_OK;
+ break;
+
+ case GET_SECTOR_SIZE : /* Get sectors on the disk (WORD) */
+ if (medias[DRV_MMC].blockSize < SECTOR_SIZE_DEFAULT)
+ {
+ *(WORD*)buff = SECTOR_SIZE_DEFAULT;
+ }
+ else
+ {
+ *(WORD*)buff = medias[DRV_MMC].blockSize;
+ }
+ res = RES_OK;
+ break;
+
+ case CTRL_SYNC : /* Make sure that data has been written */
+ res = RES_OK;
+ break;
+
+ default:
+ res = RES_PARERR;
+ }
+ break;
+
+ case DRV_NAND :
+ switch (ctrl)
+ {
+ case GET_BLOCK_SIZE:
+ *(DWORD*)buff = 1;
+ res = RES_OK;
+ break;
+
+ case GET_SECTOR_COUNT : /* Get number of sectors on the disk (DWORD) */
+ if (medias[DRV_NAND].blockSize < SECTOR_SIZE_DEFAULT)
+ {
+ *(DWORD*)buff = (DWORD)(medias[DRV_NAND].size /
+ (SECTOR_SIZE_DEFAULT /
+ medias[DRV_NAND].blockSize));
+ }
+ else
+ {
+ *(DWORD*)buff = (DWORD)(medias[DRV_NAND].size);
+ }
+ res = RES_OK;
+ break;
+
+ case GET_SECTOR_SIZE : /* Get sectors on the disk (WORD) */
+ if (medias[DRV_NAND].blockSize < SECTOR_SIZE_DEFAULT)
+ {
+ *(WORD*)buff = SECTOR_SIZE_DEFAULT;
+ }
+ else
+ {
+ *(WORD*)buff = medias[DRV_NAND].blockSize;
+ }
+ res = RES_OK;
+ break;
+
+ case CTRL_SYNC : /* Make sure that data has been written */
+ MED_Flush(&medias[DRV_NAND]);
+ res = RES_OK;
+ break;
+
+ default:
+ res = RES_PARERR;
+ }
+ }
+ return res;
+}
+
+//------------------------------------------------------------------------------
+/// Current time is returned with packed into a DWORD value.
+/// The bit field is as follows:
+/// bit31:25 Year from 1980 (0..127)
+/// bit24:21 Month (1..12)
+/// bit20:16 Day in month(1..31)
+/// bit15:11 Hour (0..23)
+/// bit10:5 Minute (0..59)
+/// bit4:0 Second / 2 (0..29)
+//------------------------------------------------------------------------------
+DWORD get_fattime (void)
+{
+ unsigned int time;
+
+ time = ((2010-1980)<<25)
+ | ( 9<<21)
+ | (15<<16)
+ | (17<<11)
+ | (45<<5)
+ | ((59/2)<<0);
+
+ return time;
+}
+
+
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/ff.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/ff.c
new file mode 100644
index 0000000..5de7b3d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/ff.c
@@ -0,0 +1,3982 @@
+/*----------------------------------------------------------------------------/
+/ FatFs - FAT file system module R0.08b (C)ChaN, 2011
+/-----------------------------------------------------------------------------/
+/ FatFs module is a generic FAT file system module for small embedded systems.
+/ This is a free software that opened for education, research and commercial
+/ developments under license policy of following terms.
+/
+/ Copyright (C) 2011, ChaN, all right reserved.
+/
+/ * The FatFs module is a free software and there is NO WARRANTY.
+/ * No restriction on use. You can use, modify and redistribute it for
+/ personal, non-profit or commercial products UNDER YOUR RESPONSIBILITY.
+/ * Redistributions of source code must retain the above copyright notice.
+/
+/-----------------------------------------------------------------------------/
+/ Feb 26,'06 R0.00 Prototype.
+/
+/ Apr 29,'06 R0.01 First stable version.
+/
+/ Jun 01,'06 R0.02 Added FAT12 support.
+/ Removed unbuffered mode.
+/ Fixed a problem on small (<32M) partition.
+/ Jun 10,'06 R0.02a Added a configuration option (_FS_MINIMUM).
+/
+/ Sep 22,'06 R0.03 Added f_rename().
+/ Changed option _FS_MINIMUM to _FS_MINIMIZE.
+/ Dec 11,'06 R0.03a Improved cluster scan algorithm to write files fast.
+/ Fixed f_mkdir() creates incorrect directory on FAT32.
+/
+/ Feb 04,'07 R0.04 Supported multiple drive system.
+/ Changed some interfaces for multiple drive system.
+/ Changed f_mountdrv() to f_mount().
+/ Added f_mkfs().
+/ Apr 01,'07 R0.04a Supported multiple partitions on a physical drive.
+/ Added a capability of extending file size to f_lseek().
+/ Added minimization level 3.
+/ Fixed an endian sensitive code in f_mkfs().
+/ May 05,'07 R0.04b Added a configuration option _USE_NTFLAG.
+/ Added FSInfo support.
+/ Fixed DBCS name can result FR_INVALID_NAME.
+/ Fixed short seek (<= csize) collapses the file object.
+/
+/ Aug 25,'07 R0.05 Changed arguments of f_read(), f_write() and f_mkfs().
+/ Fixed f_mkfs() on FAT32 creates incorrect FSInfo.
+/ Fixed f_mkdir() on FAT32 creates incorrect directory.
+/ Feb 03,'08 R0.05a Added f_truncate() and f_utime().
+/ Fixed off by one error at FAT sub-type determination.
+/ Fixed btr in f_read() can be mistruncated.
+/ Fixed cached sector is not flushed when create and close without write.
+/
+/ Apr 01,'08 R0.06 Added fputc(), fputs(), fprintf() and fgets().
+/ Improved performance of f_lseek() on moving to the same or following cluster.
+/
+/ Apr 01,'09 R0.07 Merged Tiny-FatFs as a configuration option. (_FS_TINY)
+/ Added long file name feature.
+/ Added multiple code page feature.
+/ Added re-entrancy for multitask operation.
+/ Added auto cluster size selection to f_mkfs().
+/ Added rewind option to f_readdir().
+/ Changed result code of critical errors.
+/ Renamed string functions to avoid name collision.
+/ Apr 14,'09 R0.07a Separated out OS dependent code on reentrant cfg.
+/ Added multiple sector size feature.
+/ Jun 21,'09 R0.07c Fixed f_unlink() can return FR_OK on error.
+/ Fixed wrong cache control in f_lseek().
+/ Added relative path feature.
+/ Added f_chdir() and f_chdrive().
+/ Added proper case conversion to extended char.
+/ Nov 03,'09 R0.07e Separated out configuration options from ff.h to ffconf.h.
+/ Fixed f_unlink() fails to remove a sub-dir on _FS_RPATH.
+/ Fixed name matching error on the 13 char boundary.
+/ Added a configuration option, _LFN_UNICODE.
+/ Changed f_readdir() to return the SFN with always upper case on non-LFN cfg.
+/
+/ May 15,'10 R0.08 Added a memory configuration option. (_USE_LFN = 3)
+/ Added file lock feature. (_FS_SHARE)
+/ Added fast seek feature. (_USE_FASTSEEK)
+/ Changed some types on the API, XCHAR->TCHAR.
+/ Changed fname member in the FILINFO structure on Unicode cfg.
+/ String functions support UTF-8 encoding files on Unicode cfg.
+/ Aug 16,'10 R0.08a Added f_getcwd(). (_FS_RPATH = 2)
+/ Added sector erase feature. (_USE_ERASE)
+/ Moved file lock semaphore table from fs object to the bss.
+/ Fixed a wrong directory entry is created on non-LFN cfg when the given name contains ';'.
+/ Fixed f_mkfs() creates wrong FAT32 volume.
+/ Jan 15,'11 R0.08b Fast seek feature is also applied to f_read() and f_write().
+/ f_lseek() reports required table size on creating CLMP.
+/ Extended format syntax of f_printf function.
+/ Ignores duplicated directory separators in given path names.
+/---------------------------------------------------------------------------*/
+
+#include "ff.h" /* FatFs configurations and declarations */
+#include "diskio.h" /* Declarations of low level disk I/O functions */
+
+
+/*--------------------------------------------------------------------------
+
+ Module Private Definitions
+
+---------------------------------------------------------------------------*/
+
+#if _FATFS != 8237
+#error Wrong include file (ff.h).
+#endif
+
+
+/* Definitions on sector size */
+#if _MAX_SS != 512 && _MAX_SS != 1024 && _MAX_SS != 2048 && _MAX_SS != 4096
+#error Wrong sector size.
+#endif
+#if _MAX_SS != 512
+#define SS(fs) ((fs)->ssize) /* Multiple sector size */
+#else
+#define SS(fs) 512U /* Fixed sector size */
+#endif
+
+
+/* Reentrancy related */
+#if _FS_REENTRANT
+#if _USE_LFN == 1
+#error Static LFN work area must not be used in re-entrant configuration.
+#endif
+#define ENTER_FF(fs) { if (!lock_fs(fs)) return FR_TIMEOUT; }
+#define LEAVE_FF(fs, res) { unlock_fs(fs, res); return res; }
+#else
+#define ENTER_FF(fs)
+#define LEAVE_FF(fs, res) return res
+#endif
+
+#define ABORT(fs, res) { fp->flag |= FA__ERROR; LEAVE_FF(fs, res); }
+
+
+/* File shareing feature */
+#if _FS_SHARE
+#if _FS_READONLY
+#error _FS_SHARE must be 0 on read-only cfg.
+#endif
+typedef struct {
+ FATFS *fs; /* File ID 1, volume (NULL:blank entry) */
+ DWORD clu; /* File ID 2, directory */
+ WORD idx; /* File ID 3, directory index */
+ WORD ctr; /* File open counter, 0:none, 0x01..0xFF:read open count, 0x100:write mode */
+} FILESEM;
+#endif
+
+
+/* Misc definitions */
+#define LD_CLUST(dir) (((DWORD)LD_WORD(dir+DIR_FstClusHI)<<16) | LD_WORD(dir+DIR_FstClusLO))
+#define ST_CLUST(dir,cl) {ST_WORD(dir+DIR_FstClusLO, cl); ST_WORD(dir+DIR_FstClusHI, (DWORD)cl>>16);}
+
+
+#if 0 /* Removed to ff.h for application usage, by ATMEL */
+/* DBCS code ranges and SBCS extend char conversion table */
+
+#if _CODE_PAGE == 932 /* Japanese Shift-JIS */
+#define _DF1S 0x81 /* DBC 1st byte range 1 start */
+#define _DF1E 0x9F /* DBC 1st byte range 1 end */
+#define _DF2S 0xE0 /* DBC 1st byte range 2 start */
+#define _DF2E 0xFC /* DBC 1st byte range 2 end */
+#define _DS1S 0x40 /* DBC 2nd byte range 1 start */
+#define _DS1E 0x7E /* DBC 2nd byte range 1 end */
+#define _DS2S 0x80 /* DBC 2nd byte range 2 start */
+#define _DS2E 0xFC /* DBC 2nd byte range 2 end */
+
+#elif _CODE_PAGE == 936 /* Simplified Chinese GBK */
+#define _DF1S 0x81
+#define _DF1E 0xFE
+#define _DS1S 0x40
+#define _DS1E 0x7E
+#define _DS2S 0x80
+#define _DS2E 0xFE
+
+#elif _CODE_PAGE == 949 /* Korean */
+#define _DF1S 0x81
+#define _DF1E 0xFE
+#define _DS1S 0x41
+#define _DS1E 0x5A
+#define _DS2S 0x61
+#define _DS2E 0x7A
+#define _DS3S 0x81
+#define _DS3E 0xFE
+
+#elif _CODE_PAGE == 950 /* Traditional Chinese Big5 */
+#define _DF1S 0x81
+#define _DF1E 0xFE
+#define _DS1S 0x40
+#define _DS1E 0x7E
+#define _DS2S 0xA1
+#define _DS2E 0xFE
+
+#elif _CODE_PAGE == 437 /* U.S. (OEM) */
+#define _DF1S 0
+#define _EXCVT {0x80,0x9A,0x90,0x41,0x8E,0x41,0x8F,0x80,0x45,0x45,0x45,0x49,0x49,0x49,0x8E,0x8F,0x90,0x92,0x92,0x4F,0x99,0x4F,0x55,0x55,0x59,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \
+ 0x41,0x49,0x4F,0x55,0xA5,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0x21,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \
+ 0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF}
+
+#elif _CODE_PAGE == 720 /* Arabic (OEM) */
+#define _DF1S 0
+#define _EXCVT {0x80,0x81,0x45,0x41,0x84,0x41,0x86,0x43,0x45,0x45,0x45,0x49,0x49,0x8D,0x8E,0x8F,0x90,0x92,0x92,0x93,0x94,0x95,0x49,0x49,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \
+ 0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0x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0xE7,0xE9,0xEA,0xEB,0xED,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF}
+
+#elif _CODE_PAGE == 862 /* Hebrew (OEM) */
+#define _DF1S 0
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \
+ 0x41,0x49,0x4F,0x55,0xA5,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0x21,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \
+ 0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF}
+
+#elif _CODE_PAGE == 866 /* Russian (OEM) */
+#define _DF1S 0
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \
+ 0x80,0x81,0x82,0x83,0x84,0x85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,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF}
+
+#elif _CODE_PAGE == 1250 /* Central Europe (Windows) */
+#define _DF1S 0
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x8A,0x9B,0x8C,0x8D,0x8E,0x8F, \
+ 0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xA3,0xB4,0xB5,0xB6,0xB7,0xB8,0xA5,0xAA,0xBB,0xBC,0xBD,0xBC,0xAF, \
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF}
+
+#elif _CODE_PAGE == 1251 /* Cyrillic (Windows) */
+#define _DF1S 0
+#define _EXCVT {0x80,0x81,0x82,0x82,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x80,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x8A,0x9B,0x8C,0x8D,0x8E,0x8F, \
+ 0xA0,0xA2,0xA2,0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,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0x9F}
+
+#elif _CODE_PAGE == 1253 /* Greek (Windows) */
+#define _DF1S 0
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \
+ 0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xA2,0xB8,0xB9,0xBA, \
+ 0xE0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xF2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xFB,0xBC,0xFD,0xBF,0xFF}
+
+#elif _CODE_PAGE == 1254 /* Turkish (Windows) */
+#define _DF1S 0
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x8A,0x9B,0x8C,0x9D,0x9E,0x9F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 0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF}
+
+#elif _CODE_PAGE == 1256 /* Arabic (Windows) */
+#define _DF1S 0
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x8C,0x9D,0x9E,0x9F, \
+ 0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \
+ 0x41,0xE1,0x41,0xE3,0xE4,0xE5,0xE6,0x43,0x45,0x45,0x45,0x45,0xEC,0xED,0x49,0x49,0xF0,0xF1,0xF2,0xF3,0x4F,0xF5,0xF6,0xF7,0xF8,0x55,0xFA,0x55,0x55,0xFD,0xFE,0xFF}
+
+#elif _CODE_PAGE == 1257 /* Baltic (Windows) */
+#define _DF1S 0
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x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DE,0xDF, \
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xEC,0xCD,0xCE,0xCF,0xD0,0xD1,0xF2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xFE,0x9F}
+
+#elif _CODE_PAGE == 1 /* ASCII (for only non-LFN cfg) */
+#if _USE_LFN
+#error Cannot use LFN feature without valid code page.
+#endif
+#define _DF1S 0
+
+#else
+#error Unknown code page
+
+#endif
+#endif
+
+/* Character code support macros */
+#define IsUpper(c) (((c)>='A')&&((c)<='Z'))
+#define IsLower(c) (((c)>='a')&&((c)<='z'))
+#define IsDigit(c) (((c)>='0')&&((c)<='9'))
+
+#if _DF1S /* Code page is DBCS */
+
+#ifdef _DF2S /* Two 1st byte areas */
+#define IsDBCS1(c) (((BYTE)(c) >= _DF1S && (BYTE)(c) <= _DF1E) || ((BYTE)(c) >= _DF2S && (BYTE)(c) <= _DF2E))
+#else /* One 1st byte area */
+#define IsDBCS1(c) ((BYTE)(c) >= _DF1S && (BYTE)(c) <= _DF1E)
+#endif
+
+#ifdef _DS3S /* Three 2nd byte areas */
+#define IsDBCS2(c) (((BYTE)(c) >= _DS1S && (BYTE)(c) <= _DS1E) || ((BYTE)(c) >= _DS2S && (BYTE)(c) <= _DS2E) || ((BYTE)(c) >= _DS3S && (BYTE)(c) <= _DS3E))
+#else /* Two 2nd byte areas */
+#define IsDBCS2(c) (((BYTE)(c) >= _DS1S && (BYTE)(c) <= _DS1E) || ((BYTE)(c) >= _DS2S && (BYTE)(c) <= _DS2E))
+#endif
+
+#else /* Code page is SBCS */
+
+#define IsDBCS1(c) 0
+#define IsDBCS2(c) 0
+
+#endif /* _DF1S */
+
+
+/* Name status flags */
+#define NS 11 /* Index of name status byte in fn[] */
+#define NS_LOSS 0x01 /* Out of 8.3 format */
+#define NS_LFN 0x02 /* Force to create LFN entry */
+#define NS_LAST 0x04 /* Last segment */
+#define NS_BODY 0x08 /* Lower case flag (body) */
+#define NS_EXT 0x10 /* Lower case flag (ext) */
+#define NS_DOT 0x20 /* Dot entry */
+
+
+/* FAT sub-type boundaries */
+/* Note that the FAT spec by Microsoft says 4085 but Windows works with 4087! */
+#define MIN_FAT16 4086 /* Minimum number of clusters for FAT16 */
+#define MIN_FAT32 65526 /* Minimum number of clusters for FAT32 */
+
+
+/* FatFs refers the members in the FAT structures as byte array instead of
+/ structure member because the structure is not binary compatible between
+/ different platforms */
+
+#define BS_jmpBoot 0 /* Jump instruction (3) */
+#define BS_OEMName 3 /* OEM name (8) */
+#define BPB_BytsPerSec 11 /* Sector size [byte] (2) */
+#define BPB_SecPerClus 13 /* Cluster size [sector] (1) */
+#define BPB_RsvdSecCnt 14 /* Size of reserved area [sector] (2) */
+#define BPB_NumFATs 16 /* Number of FAT copies (1) */
+#define BPB_RootEntCnt 17 /* Number of root dir entries for FAT12/16 (2) */
+#define BPB_TotSec16 19 /* Volume size [sector] (2) */
+#define BPB_Media 21 /* Media descriptor (1) */
+#define BPB_FATSz16 22 /* FAT size [sector] (2) */
+#define BPB_SecPerTrk 24 /* Track size [sector] (2) */
+#define BPB_NumHeads 26 /* Number of heads (2) */
+#define BPB_HiddSec 28 /* Number of special hidden sectors (4) */
+#define BPB_TotSec32 32 /* Volume size [sector] (4) */
+#define BS_DrvNum 36 /* Physical drive number (2) */
+#define BS_BootSig 38 /* Extended boot signature (1) */
+#define BS_VolID 39 /* Volume serial number (4) */
+#define BS_VolLab 43 /* Volume label (8) */
+#define BS_FilSysType 54 /* File system type (1) */
+#define BPB_FATSz32 36 /* FAT size [sector] (4) */
+#define BPB_ExtFlags 40 /* Extended flags (2) */
+#define BPB_FSVer 42 /* File system version (2) */
+#define BPB_RootClus 44 /* Root dir first cluster (4) */
+#define BPB_FSInfo 48 /* Offset of FSInfo sector (2) */
+#define BPB_BkBootSec 50 /* Offset of backup boot sectot (2) */
+#define BS_DrvNum32 64 /* Physical drive number (2) */
+#define BS_BootSig32 66 /* Extended boot signature (1) */
+#define BS_VolID32 67 /* Volume serial number (4) */
+#define BS_VolLab32 71 /* Volume label (8) */
+#define BS_FilSysType32 82 /* File system type (1) */
+#define FSI_LeadSig 0 /* FSI: Leading signature (4) */
+#define FSI_StrucSig 484 /* FSI: Structure signature (4) */
+#define FSI_Free_Count 488 /* FSI: Number of free clusters (4) */
+#define FSI_Nxt_Free 492 /* FSI: Last allocated cluster (4) */
+#define MBR_Table 446 /* MBR: Partition table offset (2) */
+#define SZ_PTE 16 /* MBR: Size of a partition table entry */
+#define BS_55AA 510 /* Boot sector signature (2) */
+
+#define DIR_Name 0 /* Short file name (11) */
+#define DIR_Attr 11 /* Attribute (1) */
+#define DIR_NTres 12 /* NT flag (1) */
+#define DIR_CrtTime 14 /* Created time (2) */
+#define DIR_CrtDate 16 /* Created date (2) */
+#define DIR_FstClusHI 20 /* Higher 16-bit of first cluster (2) */
+#define DIR_WrtTime 22 /* Modified time (2) */
+#define DIR_WrtDate 24 /* Modified date (2) */
+#define DIR_FstClusLO 26 /* Lower 16-bit of first cluster (2) */
+#define DIR_FileSize 28 /* File size (4) */
+#define LDIR_Ord 0 /* LFN entry order and LLE flag (1) */
+#define LDIR_Attr 11 /* LFN attribute (1) */
+#define LDIR_Type 12 /* LFN type (1) */
+#define LDIR_Chksum 13 /* Sum of corresponding SFN entry */
+#define LDIR_FstClusLO 26 /* Filled by zero (0) */
+#define SZ_DIR 32 /* Size of a directory entry */
+#define LLE 0x40 /* Last long entry flag in LDIR_Ord */
+#define DDE 0xE5 /* Deleted directory enrty mark in DIR_Name[0] */
+#define NDDE 0x05 /* Replacement of a character collides with DDE */
+
+
+/*------------------------------------------------------------*/
+/* Work area */
+
+#if _VOLUMES
+static
+FATFS *FatFs[_VOLUMES]; /* Pointer to the file system objects (logical drives) */
+#else
+#error Number of drives must not be 0.
+#endif
+
+static
+WORD Fsid; /* File system mount ID */
+
+#if _FS_RPATH
+static
+BYTE CurrVol; /* Current drive */
+#endif
+
+#if _FS_SHARE
+static
+FILESEM Files[_FS_SHARE]; /* File lock semaphores */
+#endif
+
+#if _USE_LFN == 0 /* No LFN */
+#define DEF_NAMEBUF BYTE sfn[12]
+#define INIT_BUF(dobj) (dobj).fn = sfn
+#define FREE_BUF()
+
+#elif _USE_LFN == 1 /* LFN with static LFN working buffer */
+static WCHAR LfnBuf[_MAX_LFN+1];
+#define DEF_NAMEBUF BYTE sfn[12]
+#define INIT_BUF(dobj) { (dobj).fn = sfn; (dobj).lfn = LfnBuf; }
+#define FREE_BUF()
+
+#elif _USE_LFN == 2 /* LFN with dynamic LFN working buffer on the stack */
+#define DEF_NAMEBUF BYTE sfn[12]; WCHAR lbuf[_MAX_LFN+1]
+#define INIT_BUF(dobj) { (dobj).fn = sfn; (dobj).lfn = lbuf; }
+#define FREE_BUF()
+
+#elif _USE_LFN == 3 /* LFN with dynamic LFN working buffer on the heap */
+#define DEF_NAMEBUF BYTE sfn[12]; WCHAR *lfn
+#define INIT_BUF(dobj) { lfn = ff_memalloc((_MAX_LFN + 1) * 2); \
+ if (!lfn) LEAVE_FF((dobj).fs, FR_NOT_ENOUGH_CORE); \
+ (dobj).lfn = lfn; (dobj).fn = sfn; }
+#define FREE_BUF() ff_memfree(lfn)
+
+#else
+#error Wrong LFN configuration.
+#endif
+
+
+
+
+/*--------------------------------------------------------------------------
+
+ Module Private Functions
+
+---------------------------------------------------------------------------*/
+
+
+/*-----------------------------------------------------------------------*/
+/* String functions */
+/*-----------------------------------------------------------------------*/
+
+/* Copy memory to memory */
+static
+void mem_cpy (void* dst, const void* src, UINT cnt) {
+ BYTE *d = (BYTE*)dst;
+ const BYTE *s = (const BYTE*)src;
+
+#if _WORD_ACCESS == 1
+ while (cnt >= sizeof(int)) {
+ *(int*)d = *(int*)s;
+ d += sizeof(int); s += sizeof(int);
+ cnt -= sizeof(int);
+ }
+#endif
+ while (cnt--)
+ *d++ = *s++;
+}
+
+/* Fill memory */
+static
+void mem_set (void* dst, int val, UINT cnt) {
+ BYTE *d = (BYTE*)dst;
+
+ while (cnt--)
+ *d++ = (BYTE)val;
+}
+
+/* Compare memory to memory */
+static
+int mem_cmp (const void* dst, const void* src, UINT cnt) {
+ const BYTE *d = (const BYTE *)dst, *s = (const BYTE *)src;
+ int r = 0;
+
+ while (cnt-- && (r = *d++ - *s++) == 0) ;
+ return r;
+}
+
+/* Check if chr is contained in the string */
+static
+int chk_chr (const char* str, int chr) {
+ while (*str && *str != chr) str++;
+ return *str;
+}
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Request/Release grant to access the volume */
+/*-----------------------------------------------------------------------*/
+#if _FS_REENTRANT
+
+static
+int lock_fs (
+ FATFS *fs /* File system object */
+)
+{
+ return ff_req_grant(fs->sobj);
+}
+
+
+static
+void unlock_fs (
+ FATFS *fs, /* File system object */
+ FRESULT res /* Result code to be returned */
+)
+{
+ if (res != FR_NOT_ENABLED &&
+ res != FR_INVALID_DRIVE &&
+ res != FR_INVALID_OBJECT &&
+ res != FR_TIMEOUT) {
+ ff_rel_grant(fs->sobj);
+ }
+}
+#endif
+
+
+
+/*-----------------------------------------------------------------------*/
+/* File shareing control functions */
+/*-----------------------------------------------------------------------*/
+#if _FS_SHARE
+
+static
+FRESULT chk_lock ( /* Check if the file can be accessed */
+ DIR* dj, /* Directory object pointing the file to be checked */
+ int acc /* Desired access (0:Read, 1:Write, 2:Delete/Rename) */
+)
+{
+ UINT i, be;
+
+ /* Search file semaphore table */
+ for (i = be = 0; i < _FS_SHARE; i++) {
+ if (Files[i].fs) { /* Existing entry */
+ if (Files[i].fs == dj->fs && /* Check if the file matched with an open file */
+ Files[i].clu == dj->sclust &&
+ Files[i].idx == dj->index) break;
+ } else { /* Blank entry */
+ be++;
+ }
+ }
+ if (i == _FS_SHARE) /* The file is not opened */
+ return (be || acc == 2) ? FR_OK : FR_TOO_MANY_OPEN_FILES; /* Is there a blank entry for new file? */
+
+ /* The file has been opened. Reject any open against writing file and all write mode open */
+ return (acc || Files[i].ctr == 0x100) ? FR_LOCKED : FR_OK;
+}
+
+
+static
+int enq_lock ( /* Check if an entry is available for a new file */
+ FATFS* fs /* File system object */
+)
+{
+ UINT i;
+
+ for (i = 0; i < _FS_SHARE && Files[i].fs; i++) ;
+ return (i == _FS_SHARE) ? 0 : 1;
+}
+
+
+static
+UINT inc_lock ( /* Increment file open counter and returns its index (0:int error) */
+ DIR* dj, /* Directory object pointing the file to register or increment */
+ int acc /* Desired access mode (0:Read, !0:Write) */
+)
+{
+ UINT i;
+
+
+ for (i = 0; i < _FS_SHARE; i++) { /* Find the file */
+ if (Files[i].fs == dj->fs &&
+ Files[i].clu == dj->sclust &&
+ Files[i].idx == dj->index) break;
+ }
+
+ if (i == _FS_SHARE) { /* Not opened. Register it as new. */
+ for (i = 0; i < _FS_SHARE && Files[i].fs; i++) ;
+ if (i == _FS_SHARE) return 0; /* No space to register (int err) */
+ Files[i].fs = dj->fs;
+ Files[i].clu = dj->sclust;
+ Files[i].idx = dj->index;
+ Files[i].ctr = 0;
+ }
+
+ if (acc && Files[i].ctr) return 0; /* Access violation (int err) */
+
+ Files[i].ctr = acc ? 0x100 : Files[i].ctr + 1; /* Set semaphore value */
+
+ return i + 1;
+}
+
+
+static
+FRESULT dec_lock ( /* Decrement file open counter */
+ UINT i /* Semaphore index */
+)
+{
+ WORD n;
+ FRESULT res;
+
+
+ if (--i < _FS_SHARE) {
+ n = Files[i].ctr;
+ if (n == 0x100) n = 0;
+ if (n) n--;
+ Files[i].ctr = n;
+ if (!n) Files[i].fs = 0;
+ res = FR_OK;
+ } else {
+ res = FR_INT_ERR;
+ }
+ return res;
+}
+
+
+static
+void clear_lock ( /* Clear lock entries of the volume */
+ FATFS *fs
+)
+{
+ UINT i;
+
+ for (i = 0; i < _FS_SHARE; i++) {
+ if (Files[i].fs == fs) Files[i].fs = 0;
+ }
+}
+#endif
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Change window offset */
+/*-----------------------------------------------------------------------*/
+
+static
+FRESULT move_window (
+ FATFS *fs, /* File system object */
+ DWORD sector /* Sector number to make appearance in the fs->win[] */
+) /* Move to zero only writes back dirty window */
+{
+ DWORD wsect;
+
+
+ wsect = fs->winsect;
+ if (wsect != sector) { /* Changed current window */
+#if !_FS_READONLY
+ if (fs->wflag) { /* Write back dirty window if needed */
+ if (disk_write(fs->drv, fs->win, wsect, 1) != RES_OK)
+ return FR_DISK_ERR;
+ fs->wflag = 0;
+ if (wsect < (fs->fatbase + fs->fsize)) { /* In FAT area */
+ BYTE nf;
+ for (nf = fs->n_fats; nf > 1; nf--) { /* Reflect the change to all FAT copies */
+ wsect += fs->fsize;
+ disk_write(fs->drv, fs->win, wsect, 1);
+ }
+ }
+ }
+#endif
+ if (sector) {
+ if (disk_read(fs->drv, fs->win, sector, 1) != RES_OK)
+ return FR_DISK_ERR;
+ fs->winsect = sector;
+ }
+ }
+
+ return FR_OK;
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Clean-up cached data */
+/*-----------------------------------------------------------------------*/
+#if !_FS_READONLY
+static
+FRESULT sync ( /* FR_OK: successful, FR_DISK_ERR: failed */
+ FATFS *fs /* File system object */
+)
+{
+ FRESULT res;
+
+
+ res = move_window(fs, 0);
+ if (res == FR_OK) {
+ /* Update FSInfo sector if needed */
+ if (fs->fs_type == FS_FAT32 && fs->fsi_flag) {
+ fs->winsect = 0;
+ /* Create FSInfo structure */
+ mem_set(fs->win, 0, 512);
+ ST_WORD(fs->win+BS_55AA, 0xAA55);
+ ST_DWORD(fs->win+FSI_LeadSig, 0x41615252);
+ ST_DWORD(fs->win+FSI_StrucSig, 0x61417272);
+ ST_DWORD(fs->win+FSI_Free_Count, fs->free_clust);
+ ST_DWORD(fs->win+FSI_Nxt_Free, fs->last_clust);
+ /* Write it into the FSInfo sector */
+ disk_write(fs->drv, fs->win, fs->fsi_sector, 1);
+ fs->fsi_flag = 0;
+ }
+ /* Make sure that no pending write process in the physical drive */
+ if (disk_ioctl(fs->drv, CTRL_SYNC, (void*)0) != RES_OK)
+ res = FR_DISK_ERR;
+ }
+
+ return res;
+}
+#endif
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Get sector# from cluster# */
+/*-----------------------------------------------------------------------*/
+
+
+DWORD clust2sect ( /* !=0: Sector number, 0: Failed - invalid cluster# */
+ FATFS *fs, /* File system object */
+ DWORD clst /* Cluster# to be converted */
+)
+{
+ clst -= 2;
+ if (clst >= (fs->n_fatent - 2)) return 0; /* Invalid cluster# */
+ return clst * fs->csize + fs->database;
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* FAT access - Read value of a FAT entry */
+/*-----------------------------------------------------------------------*/
+
+
+DWORD get_fat ( /* 0xFFFFFFFF:Disk error, 1:Internal error, Else:Cluster status */
+ FATFS *fs, /* File system object */
+ DWORD clst /* Cluster# to get the link information */
+)
+{
+ UINT wc, bc;
+ BYTE *p;
+
+
+ if (clst < 2 || clst >= fs->n_fatent) /* Chack range */
+ return 1;
+
+ switch (fs->fs_type) {
+ case FS_FAT12 :
+ bc = (UINT)clst; bc += bc / 2;
+ if (move_window(fs, fs->fatbase + (bc / SS(fs)))) break;
+ wc = fs->win[bc % SS(fs)]; bc++;
+ if (move_window(fs, fs->fatbase + (bc / SS(fs)))) break;
+ wc |= fs->win[bc % SS(fs)] << 8;
+ return (clst & 1) ? (wc >> 4) : (wc & 0xFFF);
+
+ case FS_FAT16 :
+ if (move_window(fs, fs->fatbase + (clst / (SS(fs) / 2)))) break;
+ p = &fs->win[clst * 2 % SS(fs)];
+ return LD_WORD(p);
+
+ case FS_FAT32 :
+ if (move_window(fs, fs->fatbase + (clst / (SS(fs) / 4)))) break;
+ p = &fs->win[clst * 4 % SS(fs)];
+ return LD_DWORD(p) & 0x0FFFFFFF;
+ }
+
+ return 0xFFFFFFFF; /* An error occurred at the disk I/O layer */
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* FAT access - Change value of a FAT entry */
+/*-----------------------------------------------------------------------*/
+#if !_FS_READONLY
+
+FRESULT put_fat (
+ FATFS *fs, /* File system object */
+ DWORD clst, /* Cluster# to be changed in range of 2 to fs->n_fatent - 1 */
+ DWORD val /* New value to mark the cluster */
+)
+{
+ UINT bc;
+ BYTE *p;
+ FRESULT res;
+
+
+ if (clst < 2 || clst >= fs->n_fatent) { /* Check range */
+ res = FR_INT_ERR;
+
+ } else {
+ switch (fs->fs_type) {
+ case FS_FAT12 :
+ bc = clst; bc += bc / 2;
+ res = move_window(fs, fs->fatbase + (bc / SS(fs)));
+ if (res != FR_OK) break;
+ p = &fs->win[bc % SS(fs)];
+ *p = (clst & 1) ? ((*p & 0x0F) | ((BYTE)val << 4)) : (BYTE)val;
+ bc++;
+ fs->wflag = 1;
+ res = move_window(fs, fs->fatbase + (bc / SS(fs)));
+ if (res != FR_OK) break;
+ p = &fs->win[bc % SS(fs)];
+ *p = (clst & 1) ? (BYTE)(val >> 4) : ((*p & 0xF0) | ((BYTE)(val >> 8) & 0x0F));
+ break;
+
+ case FS_FAT16 :
+ res = move_window(fs, fs->fatbase + (clst / (SS(fs) / 2)));
+ if (res != FR_OK) break;
+ p = &fs->win[clst * 2 % SS(fs)];
+ ST_WORD(p, (WORD)val);
+ break;
+
+ case FS_FAT32 :
+ res = move_window(fs, fs->fatbase + (clst / (SS(fs) / 4)));
+ if (res != FR_OK) break;
+ p = &fs->win[clst * 4 % SS(fs)];
+ val |= LD_DWORD(p) & 0xF0000000;
+ ST_DWORD(p, val);
+ break;
+
+ default :
+ res = FR_INT_ERR;
+ }
+ fs->wflag = 1;
+ }
+
+ return res;
+}
+#endif /* !_FS_READONLY */
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* FAT handling - Remove a cluster chain */
+/*-----------------------------------------------------------------------*/
+#if !_FS_READONLY
+static
+FRESULT remove_chain (
+ FATFS *fs, /* File system object */
+ DWORD clst /* Cluster# to remove a chain from */
+)
+{
+ FRESULT res;
+ DWORD nxt;
+#if _USE_ERASE
+ DWORD scl = clst, ecl = clst, resion[2];
+#endif
+
+ if (clst < 2 || clst >= fs->n_fatent) { /* Check range */
+ res = FR_INT_ERR;
+
+ } else {
+ res = FR_OK;
+ while (clst < fs->n_fatent) { /* Not a last link? */
+ nxt = get_fat(fs, clst); /* Get cluster status */
+ if (nxt == 0) break; /* Empty cluster? */
+ if (nxt == 1) { res = FR_INT_ERR; break; } /* Internal error? */
+ if (nxt == 0xFFFFFFFF) { res = FR_DISK_ERR; break; } /* Disk error? */
+ res = put_fat(fs, clst, 0); /* Mark the cluster "empty" */
+ if (res != FR_OK) break;
+ if (fs->free_clust != 0xFFFFFFFF) { /* Update FSInfo */
+ fs->free_clust++;
+ fs->fsi_flag = 1;
+ }
+#if _USE_ERASE
+ if (ecl + 1 == nxt) { /* Next cluster is contiguous */
+ ecl = nxt;
+ } else { /* End of contiguous clusters */
+ resion[0] = clust2sect(fs, scl); /* Start sector */
+ resion[1] = clust2sect(fs, ecl) + fs->csize - 1; /* End sector */
+ disk_ioctl(fs->drv, CTRL_ERASE_SECTOR, resion); /* Erase the block */
+ scl = ecl = nxt;
+ }
+#endif
+ clst = nxt; /* Next cluster */
+ }
+ }
+
+ return res;
+}
+#endif
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* FAT handling - Stretch or Create a cluster chain */
+/*-----------------------------------------------------------------------*/
+#if !_FS_READONLY
+static
+DWORD create_chain ( /* 0:No free cluster, 1:Internal error, 0xFFFFFFFF:Disk error, >=2:New cluster# */
+ FATFS *fs, /* File system object */
+ DWORD clst /* Cluster# to stretch. 0 means create a new chain. */
+)
+{
+ DWORD cs, ncl, scl;
+ FRESULT res;
+
+
+ if (clst == 0) { /* Create a new chain */
+ scl = fs->last_clust; /* Get suggested start point */
+ if (!scl || scl >= fs->n_fatent) scl = 1;
+ }
+ else { /* Stretch the current chain */
+ cs = get_fat(fs, clst); /* Check the cluster status */
+ if (cs < 2) return 1; /* It is an invalid cluster */
+ if (cs < fs->n_fatent) return cs; /* It is already followed by next cluster */
+ scl = clst;
+ }
+
+ ncl = scl; /* Start cluster */
+ for (;;) {
+ ncl++; /* Next cluster */
+ if (ncl >= fs->n_fatent) { /* Wrap around */
+ ncl = 2;
+ if (ncl > scl) return 0; /* No free cluster */
+ }
+ cs = get_fat(fs, ncl); /* Get the cluster status */
+ if (cs == 0) break; /* Found a free cluster */
+ if (cs == 0xFFFFFFFF || cs == 1)/* An error occurred */
+ return cs;
+ if (ncl == scl) return 0; /* No free cluster */
+ }
+
+ res = put_fat(fs, ncl, 0x0FFFFFFF); /* Mark the new cluster "last link" */
+ if (res == FR_OK && clst != 0) {
+ res = put_fat(fs, clst, ncl); /* Link it to the previous one if needed */
+ }
+ if (res == FR_OK) {
+ fs->last_clust = ncl; /* Update FSINFO */
+ if (fs->free_clust != 0xFFFFFFFF) {
+ fs->free_clust--;
+ fs->fsi_flag = 1;
+ }
+ } else {
+ ncl = (res == FR_DISK_ERR) ? 0xFFFFFFFF : 1;
+ }
+
+ return ncl; /* Return new cluster number or error code */
+}
+#endif /* !_FS_READONLY */
+
+
+
+/*-----------------------------------------------------------------------*/
+/* FAT handling - Convert offset into cluster with link map table */
+/*-----------------------------------------------------------------------*/
+
+#if _USE_FASTSEEK
+static
+DWORD clmt_clust ( /* <2:Error, >=2:Cluster number */
+ FIL* fp, /* Pointer to the file object */
+ DWORD ofs /* File offset to be converted to cluster# */
+)
+{
+ DWORD cl, ncl, *tbl;
+
+
+ tbl = fp->cltbl + 1; /* Top of CLMT */
+ cl = ofs / SS(fp->fs) / fp->fs->csize; /* Cluster order from top of the file */
+ for (;;) {
+ ncl = *tbl++; /* Number of cluters in the fragment */
+ if (!ncl) return 0; /* End of table? (error) */
+ if (cl < ncl) break; /* In this fragment? */
+ cl -= ncl; tbl++; /* Next fragment */
+ }
+ return cl + *tbl; /* Return the cluster number */
+}
+#endif /* _USE_FASTSEEK */
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Directory handling - Set directory index */
+/*-----------------------------------------------------------------------*/
+
+static
+FRESULT dir_sdi (
+ DIR *dj, /* Pointer to directory object */
+ WORD idx /* Directory index number */
+)
+{
+ DWORD clst;
+ WORD ic;
+
+
+ dj->index = idx;
+ clst = dj->sclust;
+ if (clst == 1 || clst >= dj->fs->n_fatent) /* Check start cluster range */
+ return FR_INT_ERR;
+ if (!clst && dj->fs->fs_type == FS_FAT32) /* Replace cluster# 0 with root cluster# if in FAT32 */
+ clst = dj->fs->dirbase;
+
+ if (clst == 0) { /* Static table (root-dir in FAT12/16) */
+ dj->clust = clst;
+ if (idx >= dj->fs->n_rootdir) /* Index is out of range */
+ return FR_INT_ERR;
+ dj->sect = dj->fs->dirbase + idx / (SS(dj->fs) / SZ_DIR); /* Sector# */
+ }
+ else { /* Dynamic table (sub-dirs or root-dir in FAT32) */
+ ic = SS(dj->fs) / SZ_DIR * dj->fs->csize; /* Entries per cluster */
+ while (idx >= ic) { /* Follow cluster chain */
+ clst = get_fat(dj->fs, clst); /* Get next cluster */
+ if (clst == 0xFFFFFFFF) return FR_DISK_ERR; /* Disk error */
+ if (clst < 2 || clst >= dj->fs->n_fatent) /* Reached to end of table or int error */
+ return FR_INT_ERR;
+ idx -= ic;
+ }
+ dj->clust = clst;
+ dj->sect = clust2sect(dj->fs, clst) + idx / (SS(dj->fs) / SZ_DIR); /* Sector# */
+ }
+
+ dj->dir = dj->fs->win + (idx % (SS(dj->fs) / SZ_DIR)) * SZ_DIR; /* Ptr to the entry in the sector */
+
+ return FR_OK; /* Seek succeeded */
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Directory handling - Move directory index next */
+/*-----------------------------------------------------------------------*/
+
+static
+FRESULT dir_next ( /* FR_OK:Succeeded, FR_NO_FILE:End of table, FR_DENIED:EOT and could not stretch */
+ DIR *dj, /* Pointer to directory object */
+ int stretch /* 0: Do not stretch table, 1: Stretch table if needed */
+)
+{
+ DWORD clst;
+ WORD i;
+
+
+ i = dj->index + 1;
+ if (!i || !dj->sect) /* Report EOT when index has reached 65535 */
+ return FR_NO_FILE;
+
+ if (!(i % (SS(dj->fs) / SZ_DIR))) { /* Sector changed? */
+ dj->sect++; /* Next sector */
+
+ if (dj->clust == 0) { /* Static table */
+ if (i >= dj->fs->n_rootdir) /* Report EOT when end of table */
+ return FR_NO_FILE;
+ }
+ else { /* Dynamic table */
+ if (((i / (SS(dj->fs) / SZ_DIR)) & (dj->fs->csize - 1)) == 0) { /* Cluster changed? */
+ clst = get_fat(dj->fs, dj->clust); /* Get next cluster */
+ if (clst <= 1) return FR_INT_ERR;
+ if (clst == 0xFFFFFFFF) return FR_DISK_ERR;
+ if (clst >= dj->fs->n_fatent) { /* When it reached end of dynamic table */
+#if !_FS_READONLY
+ BYTE c;
+ if (!stretch) return FR_NO_FILE; /* When do not stretch, report EOT */
+ clst = create_chain(dj->fs, dj->clust); /* Stretch cluster chain */
+ if (clst == 0) return FR_DENIED; /* No free cluster */
+ if (clst == 1) return FR_INT_ERR;
+ if (clst == 0xFFFFFFFF) return FR_DISK_ERR;
+ /* Clean-up stretched table */
+ if (move_window(dj->fs, 0)) return FR_DISK_ERR; /* Flush active window */
+ mem_set(dj->fs->win, 0, SS(dj->fs)); /* Clear window buffer */
+ dj->fs->winsect = clust2sect(dj->fs, clst); /* Cluster start sector */
+ for (c = 0; c < dj->fs->csize; c++) { /* Fill the new cluster with 0 */
+ dj->fs->wflag = 1;
+ if (move_window(dj->fs, 0)) return FR_DISK_ERR;
+ dj->fs->winsect++;
+ }
+ dj->fs->winsect -= c; /* Rewind window address */
+#else
+ return FR_NO_FILE; /* Report EOT */
+#endif
+ }
+ dj->clust = clst; /* Initialize data for new cluster */
+ dj->sect = clust2sect(dj->fs, clst);
+ }
+ }
+ }
+
+ dj->index = i;
+ dj->dir = dj->fs->win + (i % (SS(dj->fs) / SZ_DIR)) * SZ_DIR;
+
+ return FR_OK;
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* LFN handling - Test/Pick/Fit an LFN segment from/to directory entry */
+/*-----------------------------------------------------------------------*/
+#if _USE_LFN
+static
+const BYTE LfnOfs[] = {1,3,5,7,9,14,16,18,20,22,24,28,30}; /* Offset of LFN chars in the directory entry */
+
+
+static
+int cmp_lfn ( /* 1:Matched, 0:Not matched */
+ WCHAR *lfnbuf, /* Pointer to the LFN to be compared */
+ BYTE *dir /* Pointer to the directory entry containing a part of LFN */
+)
+{
+ UINT i, s;
+ WCHAR wc, uc;
+
+
+ i = ((dir[LDIR_Ord] & ~LLE) - 1) * 13; /* Get offset in the LFN buffer */
+ s = 0; wc = 1;
+ do {
+ uc = LD_WORD(dir+LfnOfs[s]); /* Pick an LFN character from the entry */
+ if (wc) { /* Last char has not been processed */
+ wc = ff_wtoupper(uc); /* Convert it to upper case */
+ if (i >= _MAX_LFN || wc != ff_wtoupper(lfnbuf[i++])) /* Compare it */
+ return 0; /* Not matched */
+ } else {
+ if (uc != 0xFFFF) return 0; /* Check filler */
+ }
+ } while (++s < 13); /* Repeat until all chars in the entry are checked */
+
+ if ((dir[LDIR_Ord] & LLE) && wc && lfnbuf[i]) /* Last segment matched but different length */
+ return 0;
+
+ return 1; /* The part of LFN matched */
+}
+
+
+
+static
+int pick_lfn ( /* 1:Succeeded, 0:Buffer overflow */
+ WCHAR *lfnbuf, /* Pointer to the Unicode-LFN buffer */
+ BYTE *dir /* Pointer to the directory entry */
+)
+{
+ UINT i, s;
+ WCHAR wc, uc;
+
+
+ i = ((dir[LDIR_Ord] & 0x3F) - 1) * 13; /* Offset in the LFN buffer */
+
+ s = 0; wc = 1;
+ do {
+ uc = LD_WORD(dir+LfnOfs[s]); /* Pick an LFN character from the entry */
+ if (wc) { /* Last char has not been processed */
+ if (i >= _MAX_LFN) return 0; /* Buffer overflow? */
+ lfnbuf[i++] = wc = uc; /* Store it */
+ } else {
+ if (uc != 0xFFFF) return 0; /* Check filler */
+ }
+ } while (++s < 13); /* Read all character in the entry */
+
+ if (dir[LDIR_Ord] & LLE) { /* Put terminator if it is the last LFN part */
+ if (i >= _MAX_LFN) return 0; /* Buffer overflow? */
+ lfnbuf[i] = 0;
+ }
+
+ return 1;
+}
+
+
+#if !_FS_READONLY
+static
+void fit_lfn (
+ const WCHAR *lfnbuf, /* Pointer to the LFN buffer */
+ BYTE *dir, /* Pointer to the directory entry */
+ BYTE ord, /* LFN order (1-20) */
+ BYTE sum /* SFN sum */
+)
+{
+ UINT i, s;
+ WCHAR wc;
+
+
+ dir[LDIR_Chksum] = sum; /* Set check sum */
+ dir[LDIR_Attr] = AM_LFN; /* Set attribute. LFN entry */
+ dir[LDIR_Type] = 0;
+ ST_WORD(dir+LDIR_FstClusLO, 0);
+
+ i = (ord - 1) * 13; /* Get offset in the LFN buffer */
+ s = wc = 0;
+ do {
+ if (wc != 0xFFFF) wc = lfnbuf[i++]; /* Get an effective char */
+ ST_WORD(dir+LfnOfs[s], wc); /* Put it */
+ if (!wc) wc = 0xFFFF; /* Padding chars following last char */
+ } while (++s < 13);
+ if (wc == 0xFFFF || !lfnbuf[i]) ord |= LLE; /* Bottom LFN part is the start of LFN sequence */
+ dir[LDIR_Ord] = ord; /* Set the LFN order */
+}
+
+#endif
+#endif
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Create numbered name */
+/*-----------------------------------------------------------------------*/
+#if _USE_LFN
+void gen_numname (
+ BYTE *dst, /* Pointer to generated SFN */
+ const BYTE *src, /* Pointer to source SFN to be modified */
+ const WCHAR *lfn, /* Pointer to LFN */
+ WORD seq /* Sequence number */
+)
+{
+ BYTE ns[8], c;
+ UINT i, j;
+
+
+ mem_cpy(dst, src, 11);
+
+ if (seq > 5) { /* On many collisions, generate a hash number instead of sequential number */
+ do seq = (seq >> 1) + (seq << 15) + (WORD)*lfn++; while (*lfn);
+ }
+
+ /* itoa (hexdecimal) */
+ i = 7;
+ do {
+ c = (seq % 16) + '0';
+ if (c > '9') c += 7;
+ ns[i--] = c;
+ seq /= 16;
+ } while (seq);
+ ns[i] = '~';
+
+ /* Append the number */
+ for (j = 0; j < i && dst[j] != ' '; j++) {
+ if (IsDBCS1(dst[j])) {
+ if (j == i - 1) break;
+ j++;
+ }
+ }
+ do {
+ dst[j++] = (i < 8) ? ns[i++] : ' ';
+ } while (j < 8);
+}
+#endif
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Calculate sum of an SFN */
+/*-----------------------------------------------------------------------*/
+#if _USE_LFN
+static
+BYTE sum_sfn (
+ const BYTE *dir /* Ptr to directory entry */
+)
+{
+ BYTE sum = 0;
+ UINT n = 11;
+
+ do sum = (sum >> 1) + (sum << 7) + *dir++; while (--n);
+ return sum;
+}
+#endif
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Directory handling - Find an object in the directory */
+/*-----------------------------------------------------------------------*/
+
+static
+FRESULT dir_find (
+ DIR *dj /* Pointer to the directory object linked to the file name */
+)
+{
+ FRESULT res;
+ BYTE c, *dir;
+#if _USE_LFN
+ BYTE a, ord, sum;
+#endif
+
+ res = dir_sdi(dj, 0); /* Rewind directory object */
+ if (res != FR_OK) return res;
+
+#if _USE_LFN
+ ord = sum = 0xFF;
+#endif
+ do {
+ res = move_window(dj->fs, dj->sect);
+ if (res != FR_OK) break;
+ dir = dj->dir; /* Ptr to the directory entry of current index */
+ c = dir[DIR_Name];
+ if (c == 0) { res = FR_NO_FILE; break; } /* Reached to end of table */
+#if _USE_LFN /* LFN configuration */
+ a = dir[DIR_Attr] & AM_MASK;
+ if (c == DDE || ((a & AM_VOL) && a != AM_LFN)) { /* An entry without valid data */
+ ord = 0xFF;
+ } else {
+ if (a == AM_LFN) { /* An LFN entry is found */
+ if (dj->lfn) {
+ if (c & LLE) { /* Is it start of LFN sequence? */
+ sum = dir[LDIR_Chksum];
+ c &= ~LLE; ord = c; /* LFN start order */
+ dj->lfn_idx = dj->index;
+ }
+ /* Check validity of the LFN entry and compare it with given name */
+ ord = (c == ord && sum == dir[LDIR_Chksum] && cmp_lfn(dj->lfn, dir)) ? ord - 1 : 0xFF;
+ }
+ } else { /* An SFN entry is found */
+ if (!ord && sum == sum_sfn(dir)) break; /* LFN matched? */
+ ord = 0xFF; dj->lfn_idx = 0xFFFF; /* Reset LFN sequence */
+ if (!(dj->fn[NS] & NS_LOSS) && !mem_cmp(dir, dj->fn, 11)) break; /* SFN matched? */
+ }
+ }
+#else /* Non LFN configuration */
+ if (!(dir[DIR_Attr] & AM_VOL) && !mem_cmp(dir, dj->fn, 11)) /* Is it a valid entry? */
+ break;
+#endif
+ res = dir_next(dj, 0); /* Next entry */
+ } while (res == FR_OK);
+
+ return res;
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Read an object from the directory */
+/*-----------------------------------------------------------------------*/
+#if _FS_MINIMIZE <= 1
+static
+FRESULT dir_read (
+ DIR *dj /* Pointer to the directory object that pointing the entry to be read */
+)
+{
+ FRESULT res;
+ BYTE c, *dir;
+#if _USE_LFN
+ BYTE a, ord = 0xFF, sum = 0xFF;
+#endif
+
+ res = FR_NO_FILE;
+ while (dj->sect) {
+ res = move_window(dj->fs, dj->sect);
+ if (res != FR_OK) break;
+ dir = dj->dir; /* Ptr to the directory entry of current index */
+ c = dir[DIR_Name];
+ if (c == 0) { res = FR_NO_FILE; break; } /* Reached to end of table */
+#if _USE_LFN /* LFN configuration */
+ a = dir[DIR_Attr] & AM_MASK;
+ if (c == DDE || (!_FS_RPATH && c == '.') || ((a & AM_VOL) && a != AM_LFN)) { /* An entry without valid data */
+ ord = 0xFF;
+ } else {
+ if (a == AM_LFN) { /* An LFN entry is found */
+ if (c & LLE) { /* Is it start of LFN sequence? */
+ sum = dir[LDIR_Chksum];
+ c &= ~LLE; ord = c;
+ dj->lfn_idx = dj->index;
+ }
+ /* Check LFN validity and capture it */
+ ord = (c == ord && sum == dir[LDIR_Chksum] && pick_lfn(dj->lfn, dir)) ? ord - 1 : 0xFF;
+ } else { /* An SFN entry is found */
+ if (ord || sum != sum_sfn(dir)) /* Is there a valid LFN? */
+ dj->lfn_idx = 0xFFFF; /* It has no LFN. */
+ break;
+ }
+ }
+#else /* Non LFN configuration */
+ if (c != DDE && (_FS_RPATH || c != '.') && !(dir[DIR_Attr] & AM_VOL)) /* Is it a valid entry? */
+ break;
+#endif
+ res = dir_next(dj, 0); /* Next entry */
+ if (res != FR_OK) break;
+ }
+
+ if (res != FR_OK) dj->sect = 0;
+
+ return res;
+}
+#endif
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Register an object to the directory */
+/*-----------------------------------------------------------------------*/
+#if !_FS_READONLY
+static
+FRESULT dir_register ( /* FR_OK:Successful, FR_DENIED:No free entry or too many SFN collision, FR_DISK_ERR:Disk error */
+ DIR *dj /* Target directory with object name to be created */
+)
+{
+ FRESULT res;
+ BYTE c, *dir;
+#if _USE_LFN /* LFN configuration */
+ WORD n, ne, is;
+ BYTE sn[12], *fn, sum;
+ WCHAR *lfn;
+
+
+ fn = dj->fn; lfn = dj->lfn;
+ mem_cpy(sn, fn, 12);
+
+ if (_FS_RPATH && (sn[NS] & NS_DOT)) /* Cannot create dot entry */
+ return FR_INVALID_NAME;
+
+ if (sn[NS] & NS_LOSS) { /* When LFN is out of 8.3 format, generate a numbered name */
+ fn[NS] = 0; dj->lfn = 0; /* Find only SFN */
+ for (n = 1; n < 100; n++) {
+ gen_numname(fn, sn, lfn, n); /* Generate a numbered name */
+ res = dir_find(dj); /* Check if the name collides with existing SFN */
+ if (res != FR_OK) break;
+ }
+ if (n == 100) return FR_DENIED; /* Abort if too many collisions */
+ if (res != FR_NO_FILE) return res; /* Abort if the result is other than 'not collided' */
+ fn[NS] = sn[NS]; dj->lfn = lfn;
+ }
+
+ if (sn[NS] & NS_LFN) { /* When LFN is to be created, reserve an SFN + LFN entries. */
+ for (ne = 0; lfn[ne]; ne++) ;
+ ne = (ne + 25) / 13;
+ } else { /* Otherwise reserve only an SFN entry. */
+ ne = 1;
+ }
+
+ /* Reserve contiguous entries */
+ res = dir_sdi(dj, 0);
+ if (res != FR_OK) return res;
+ n = is = 0;
+ do {
+ res = move_window(dj->fs, dj->sect);
+ if (res != FR_OK) break;
+ c = *dj->dir; /* Check the entry status */
+ if (c == DDE || c == 0) { /* Is it a blank entry? */
+ if (n == 0) is = dj->index; /* First index of the contiguous entry */
+ if (++n == ne) break; /* A contiguous entry that required count is found */
+ } else {
+ n = 0; /* Not a blank entry. Restart to search */
+ }
+ res = dir_next(dj, 1); /* Next entry with table stretch */
+ } while (res == FR_OK);
+
+ if (res == FR_OK && ne > 1) { /* Initialize LFN entry if needed */
+ res = dir_sdi(dj, is);
+ if (res == FR_OK) {
+ sum = sum_sfn(dj->fn); /* Sum of the SFN tied to the LFN */
+ ne--;
+ do { /* Store LFN entries in bottom first */
+ res = move_window(dj->fs, dj->sect);
+ if (res != FR_OK) break;
+ fit_lfn(dj->lfn, dj->dir, (BYTE)ne, sum);
+ dj->fs->wflag = 1;
+ res = dir_next(dj, 0); /* Next entry */
+ } while (res == FR_OK && --ne);
+ }
+ }
+
+#else /* Non LFN configuration */
+ res = dir_sdi(dj, 0);
+ if (res == FR_OK) {
+ do { /* Find a blank entry for the SFN */
+ res = move_window(dj->fs, dj->sect);
+ if (res != FR_OK) break;
+ c = *dj->dir;
+ if (c == DDE || c == 0) break; /* Is it a blank entry? */
+ res = dir_next(dj, 1); /* Next entry with table stretch */
+ } while (res == FR_OK);
+ }
+#endif
+
+ if (res == FR_OK) { /* Initialize the SFN entry */
+ res = move_window(dj->fs, dj->sect);
+ if (res == FR_OK) {
+ dir = dj->dir;
+ mem_set(dir, 0, SZ_DIR); /* Clean the entry */
+ mem_cpy(dir, dj->fn, 11); /* Put SFN */
+#if _USE_LFN
+ dir[DIR_NTres] = *(dj->fn+NS) & (NS_BODY | NS_EXT); /* Put NT flag */
+#endif
+ dj->fs->wflag = 1;
+ }
+ }
+
+ return res;
+}
+#endif /* !_FS_READONLY */
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Remove an object from the directory */
+/*-----------------------------------------------------------------------*/
+#if !_FS_READONLY && !_FS_MINIMIZE
+static
+FRESULT dir_remove ( /* FR_OK: Successful, FR_DISK_ERR: A disk error */
+ DIR *dj /* Directory object pointing the entry to be removed */
+)
+{
+ FRESULT res;
+#if _USE_LFN /* LFN configuration */
+ WORD i;
+
+ i = dj->index; /* SFN index */
+ res = dir_sdi(dj, (WORD)((dj->lfn_idx == 0xFFFF) ? i : dj->lfn_idx)); /* Goto the SFN or top of the LFN entries */
+ if (res == FR_OK) {
+ do {
+ res = move_window(dj->fs, dj->sect);
+ if (res != FR_OK) break;
+ *dj->dir = DDE; /* Mark the entry "deleted" */
+ dj->fs->wflag = 1;
+ if (dj->index >= i) break; /* When reached SFN, all entries of the object has been deleted. */
+ res = dir_next(dj, 0); /* Next entry */
+ } while (res == FR_OK);
+ if (res == FR_NO_FILE) res = FR_INT_ERR;
+ }
+
+#else /* Non LFN configuration */
+ res = dir_sdi(dj, dj->index);
+ if (res == FR_OK) {
+ res = move_window(dj->fs, dj->sect);
+ if (res == FR_OK) {
+ *dj->dir = DDE; /* Mark the entry "deleted" */
+ dj->fs->wflag = 1;
+ }
+ }
+#endif
+
+ return res;
+}
+#endif /* !_FS_READONLY */
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Pick a segment and create the object name in directory form */
+/*-----------------------------------------------------------------------*/
+
+static
+FRESULT create_name (
+ DIR *dj, /* Pointer to the directory object */
+ const TCHAR **path /* Pointer to pointer to the segment in the path string */
+)
+{
+#ifdef _EXCVT
+ static const BYTE excvt[] = _EXCVT; /* Upper conversion table for extended chars */
+#endif
+
+#if _USE_LFN /* LFN configuration */
+ BYTE b, cf;
+ WCHAR w, *lfn;
+ UINT i, ni, si, di;
+ const TCHAR *p;
+
+ /* Create LFN in Unicode */
+ for (p = *path; *p == '/' || *p == '\\'; p++) ; /* Strip duplicated separator */
+ lfn = dj->lfn;
+ si = di = 0;
+ for (;;) {
+ w = p[si++]; /* Get a character */
+ if (w < ' ' || w == '/' || w == '\\') break; /* Break on end of segment */
+ if (di >= _MAX_LFN) /* Reject too long name */
+ return FR_INVALID_NAME;
+#if !_LFN_UNICODE
+ w &= 0xFF;
+ if (IsDBCS1(w)) { /* Check if it is a DBC 1st byte (always false on SBCS cfg) */
+ b = (BYTE)p[si++]; /* Get 2nd byte */
+ if (!IsDBCS2(b))
+ return FR_INVALID_NAME; /* Reject invalid sequence */
+ else /* Added by ATMEL, remove warnings */
+ w = (w << 8) + b; /* Create a DBC */
+ }
+ w = ff_convert(w, 1); /* Convert ANSI/OEM to Unicode */
+ if (!w) return FR_INVALID_NAME; /* Reject invalid code */
+#endif
+ if (w < 0x80 && chk_chr("\"*:<>\?|\x7F", w)) /* Reject illegal chars for LFN */
+ return FR_INVALID_NAME;
+ lfn[di++] = w; /* Store the Unicode char */
+ }
+ *path = &p[si]; /* Return pointer to the next segment */
+ cf = (w < ' ') ? NS_LAST : 0; /* Set last segment flag if end of path */
+#if _FS_RPATH
+ if ((di == 1 && lfn[di-1] == '.') || /* Is this a dot entry? */
+ (di == 2 && lfn[di-1] == '.' && lfn[di-2] == '.')) {
+ lfn[di] = 0;
+ for (i = 0; i < 11; i++)
+ dj->fn[i] = (i < di) ? '.' : ' ';
+ dj->fn[i] = cf | NS_DOT; /* This is a dot entry */
+ return FR_OK;
+ }
+#endif
+ while (di) { /* Strip trailing spaces and dots */
+ w = lfn[di-1];
+ if (w != ' ' && w != '.') break;
+ di--;
+ }
+ if (!di) return FR_INVALID_NAME; /* Reject nul string */
+
+ lfn[di] = 0; /* LFN is created */
+
+ /* Create SFN in directory form */
+ mem_set(dj->fn, ' ', 11);
+ for (si = 0; lfn[si] == ' ' || lfn[si] == '.'; si++) ; /* Strip leading spaces and dots */
+ if (si) cf |= NS_LOSS | NS_LFN;
+ while (di && lfn[di - 1] != '.') di--; /* Find extension (di<=si: no extension) */
+
+ b = i = 0; ni = 8;
+ for (;;) {
+ w = lfn[si++]; /* Get an LFN char */
+ if (!w) break; /* Break on end of the LFN */
+ if (w == ' ' || (w == '.' && si != di)) { /* Remove spaces and dots */
+ cf |= NS_LOSS | NS_LFN; continue;
+ }
+
+ if (i >= ni || si == di) { /* Extension or end of SFN */
+ if (ni == 11) { /* Long extension */
+ cf |= NS_LOSS | NS_LFN; break;
+ }
+ if (si != di) cf |= NS_LOSS | NS_LFN; /* Out of 8.3 format */
+ if (si > di) break; /* No extension */
+ si = di; i = 8; ni = 11; /* Enter extension section */
+ b <<= 2; continue;
+ }
+
+ if (w >= 0x80) { /* Non ASCII char */
+#ifdef _EXCVT
+ w = ff_convert(w, 0); /* Unicode -> OEM code */
+ if (w) w = excvt[w - 0x80]; /* Convert extended char to upper (SBCS) */
+#else
+ w = ff_convert(ff_wtoupper(w), 0); /* Upper converted Unicode -> OEM code */
+#endif
+ cf |= NS_LFN; /* Force create LFN entry */
+ }
+
+ if (_DF1S && w >= 0x100) { /* Double byte char (always false on SBCS cfg) */
+ if (i >= ni - 1) {
+ cf |= NS_LOSS | NS_LFN; i = ni; continue;
+ }
+ dj->fn[i++] = (BYTE)(w >> 8);
+ } else { /* Single byte char */
+ if (!w || chk_chr("+,;=[]", w)) { /* Replace illegal chars for SFN */
+ w = '_'; cf |= NS_LOSS | NS_LFN;/* Lossy conversion */
+ } else {
+ if (IsUpper(w)) { /* ASCII large capital */
+ b |= 2;
+ } else {
+ if (IsLower(w)) { /* ASCII small capital */
+ b |= 1; w -= 0x20;
+ }
+ }
+ }
+ }
+ dj->fn[i++] = (BYTE)w;
+ }
+
+ if (dj->fn[0] == DDE) dj->fn[0] = NDDE; /* If the first char collides with deleted mark, replace it with 0x05 */
+
+ if (ni == 8) b <<= 2;
+ if ((b & 0x0C) == 0x0C || (b & 0x03) == 0x03) /* Create LFN entry when there are composite capitals */
+ cf |= NS_LFN;
+ if (!(cf & NS_LFN)) { /* When LFN is in 8.3 format without extended char, NT flags are created */
+ if ((b & 0x03) == 0x01) cf |= NS_EXT; /* NT flag (Extension has only small capital) */
+ if ((b & 0x0C) == 0x04) cf |= NS_BODY; /* NT flag (Filename has only small capital) */
+ }
+
+ dj->fn[NS] = cf; /* SFN is created */
+
+ return FR_OK;
+
+
+#else /* Non-LFN configuration */
+ BYTE b, c, d, *sfn;
+ UINT ni, si, i;
+ const char *p;
+
+ /* Create file name in directory form */
+ for (p = *path; *p == '/' || *p == '\\'; p++) ; /* Strip duplicated separator */
+ sfn = dj->fn;
+ mem_set(sfn, ' ', 11);
+ si = i = b = 0; ni = 8;
+#if _FS_RPATH
+ if (p[si] == '.') { /* Is this a dot entry? */
+ for (;;) {
+ c = (BYTE)p[si++];
+ if (c != '.' || si >= 3) break;
+ sfn[i++] = c;
+ }
+ if (c != '/' && c != '\\' && c > ' ') return FR_INVALID_NAME;
+ *path = &p[si]; /* Return pointer to the next segment */
+ sfn[NS] = (c <= ' ') ? NS_LAST | NS_DOT : NS_DOT; /* Set last segment flag if end of path */
+ return FR_OK;
+ }
+#endif
+ for (;;) {
+ c = (BYTE)p[si++];
+ if (c <= ' ' || c == '/' || c == '\\') break; /* Break on end of segment */
+ if (c == '.' || i >= ni) {
+ if (ni != 8 || c != '.') return FR_INVALID_NAME;
+ i = 8; ni = 11;
+ b <<= 2; continue;
+ }
+ if (c >= 0x80) { /* Extended char? */
+ b |= 3; /* Eliminate NT flag */
+#ifdef _EXCVT
+ c = excvt[c-0x80]; /* Upper conversion (SBCS) */
+#else
+#if !_DF1S /* ASCII only cfg */
+ return FR_INVALID_NAME;
+#endif
+#endif
+ }
+ if (IsDBCS1(c)) { /* Check if it is a DBC 1st byte (always false on SBCS cfg) */
+ d = (BYTE)p[si++]; /* Get 2nd byte */
+ if (!IsDBCS2(d) || i >= ni - 1) /* Reject invalid DBC */
+ return FR_INVALID_NAME;
+ sfn[i++] = c;
+ sfn[i++] = d;
+ } else { /* Single byte code */
+ if (chk_chr("\"*+,:;<=>\?[]|\x7F", c)) /* Reject illegal chrs for SFN */
+ return FR_INVALID_NAME;
+ if (IsUpper(c)) { /* ASCII large capital? */
+ b |= 2;
+ } else {
+ if (IsLower(c)) { /* ASCII small capital? */
+ b |= 1; c -= 0x20;
+ }
+ }
+ sfn[i++] = c;
+ }
+ }
+ *path = &p[si]; /* Return pointer to the next segment */
+ c = (c <= ' ') ? NS_LAST : 0; /* Set last segment flag if end of path */
+
+ if (!i) return FR_INVALID_NAME; /* Reject nul string */
+ if (sfn[0] == DDE) sfn[0] = NDDE; /* When first char collides with DDE, replace it with 0x05 */
+
+ if (ni == 8) b <<= 2;
+ if ((b & 0x03) == 0x01) c |= NS_EXT; /* NT flag (Name extension has only small capital) */
+ if ((b & 0x0C) == 0x04) c |= NS_BODY; /* NT flag (Name body has only small capital) */
+
+ sfn[NS] = c; /* Store NT flag, File name is created */
+
+ return FR_OK;
+#endif
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Get file information from directory entry */
+/*-----------------------------------------------------------------------*/
+#if _FS_MINIMIZE <= 1
+static
+void get_fileinfo ( /* No return code */
+ DIR *dj, /* Pointer to the directory object */
+ FILINFO *fno /* Pointer to the file information to be filled */
+)
+{
+ UINT i;
+ BYTE nt, *dir;
+ TCHAR *p, c;
+
+
+ p = fno->fname;
+ if (dj->sect) {
+ dir = dj->dir;
+ nt = dir[DIR_NTres]; /* NT flag */
+ for (i = 0; i < 8; i++) { /* Copy name body */
+ c = dir[i];
+ if (c == ' ') break;
+ if (c == NDDE) c = (TCHAR)DDE;
+ if (_USE_LFN && (nt & NS_BODY) && IsUpper(c)) c += 0x20;
+#if _LFN_UNICODE
+ if (IsDBCS1(c) && i < 7 && IsDBCS2(dir[i+1]))
+ c = (c << 8) | dir[++i];
+ c = ff_convert(c, 1);
+ if (!c) c = '?';
+#endif
+ *p++ = c;
+ }
+ if (dir[8] != ' ') { /* Copy name extension */
+ *p++ = '.';
+ for (i = 8; i < 11; i++) {
+ c = dir[i];
+ if (c == ' ') break;
+ if (_USE_LFN && (nt & NS_EXT) && IsUpper(c)) c += 0x20;
+#if _LFN_UNICODE
+ if (IsDBCS1(c) && i < 10 && IsDBCS2(dir[i+1]))
+ c = (c << 8) | dir[++i];
+ c = ff_convert(c, 1);
+ if (!c) c = '?';
+#endif
+ *p++ = c;
+ }
+ }
+ fno->fattrib = dir[DIR_Attr]; /* Attribute */
+ fno->fsize = LD_DWORD(dir+DIR_FileSize); /* Size */
+ fno->fdate = LD_WORD(dir+DIR_WrtDate); /* Date */
+ fno->ftime = LD_WORD(dir+DIR_WrtTime); /* Time */
+ }
+ *p = 0; /* Terminate SFN str by a \0 */
+
+#if _USE_LFN
+ if (fno->lfname && fno->lfsize) {
+ TCHAR *tp = fno->lfname;
+ WCHAR w, *lfn;
+
+ i = 0;
+ if (dj->sect && dj->lfn_idx != 0xFFFF) {/* Get LFN if available */
+ lfn = dj->lfn;
+ while ((w = *lfn++) != 0) { /* Get an LFN char */
+#if !_LFN_UNICODE
+ w = ff_convert(w, 0); /* Unicode -> OEM conversion */
+ if (!w) { i = 0; break; } /* Could not convert, no LFN */
+ if (_DF1S && w >= 0x100) /* Put 1st byte if it is a DBC (always false on SBCS cfg) */
+ tp[i++] = (TCHAR)(w >> 8);
+#endif
+ if (i >= fno->lfsize - 1) { i = 0; break; } /* Buffer overflow, no LFN */
+ tp[i++] = (TCHAR)w;
+ }
+ }
+ tp[i] = 0; /* Terminate the LFN str by a \0 */
+ }
+#endif
+}
+#endif /* _FS_MINIMIZE <= 1 */
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Follow a file path */
+/*-----------------------------------------------------------------------*/
+
+static
+FRESULT follow_path ( /* FR_OK(0): successful, !=0: error code */
+ DIR *dj, /* Directory object to return last directory and found object */
+ const TCHAR *path /* Full-path string to find a file or directory */
+)
+{
+ FRESULT res;
+ BYTE *dir, ns;
+
+
+#if _FS_RPATH
+ if (*path == '/' || *path == '\\') { /* There is a heading separator */
+ path++; dj->sclust = 0; /* Strip it and start from the root dir */
+ } else { /* No heading separator */
+ dj->sclust = dj->fs->cdir; /* Start from the current dir */
+ }
+#else
+ if (*path == '/' || *path == '\\') /* Strip heading separator if exist */
+ path++;
+ dj->sclust = 0; /* Start from the root dir */
+#endif
+
+ if ((UINT)*path < ' ') { /* Nul path means the start directory itself */
+ res = dir_sdi(dj, 0);
+ dj->dir = 0;
+
+ } else { /* Follow path */
+ for (;;) {
+ res = create_name(dj, &path); /* Get a segment */
+ if (res != FR_OK) break;
+ res = dir_find(dj); /* Find it */
+ ns = *(dj->fn+NS);
+ if (res != FR_OK) { /* Failed to find the object */
+ if (res != FR_NO_FILE) break; /* Abort if any hard error occured */
+ /* Object not found */
+ if (_FS_RPATH && (ns & NS_DOT)) { /* If dot entry is not exit */
+ dj->sclust = 0; dj->dir = 0; /* It is the root dir */
+ res = FR_OK;
+ if (!(ns & NS_LAST)) continue;
+ } else { /* Could not find the object */
+ if (!(ns & NS_LAST)) res = FR_NO_PATH;
+ }
+ break;
+ }
+ if (ns & NS_LAST) break; /* Last segment match. Function completed. */
+ dir = dj->dir; /* There is next segment. Follow the sub directory */
+ if (!(dir[DIR_Attr] & AM_DIR)) { /* Cannot follow because it is a file */
+ res = FR_NO_PATH; break;
+ }
+ dj->sclust = LD_CLUST(dir);
+ }
+ }
+
+ return res;
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Load boot record and check if it is an FAT boot record */
+/*-----------------------------------------------------------------------*/
+
+static
+BYTE check_fs ( /* 0:The FAT BR, 1:Valid BR but not an FAT, 2:Not a BR, 3:Disk error */
+ FATFS *fs, /* File system object */
+ DWORD sect /* Sector# (lba) to check if it is an FAT boot record or not */
+)
+{
+ if (disk_read(fs->drv, fs->win, sect, 1) != RES_OK) /* Load boot record */
+ return 3;
+ if (LD_WORD(&fs->win[BS_55AA]) != 0xAA55) /* Check record signature (always placed at offset 510 even if the sector size is >512) */
+ return 2;
+
+ if ((LD_DWORD(&fs->win[BS_FilSysType]) & 0xFFFFFF) == 0x544146) /* Check "FAT" string */
+ return 0;
+ if ((LD_DWORD(&fs->win[BS_FilSysType32]) & 0xFFFFFF) == 0x544146)
+ return 0;
+
+ return 1;
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Check if the file system object is valid or not */
+/*-----------------------------------------------------------------------*/
+
+static
+FRESULT chk_mounted ( /* FR_OK(0): successful, !=0: any error occurred */
+ const TCHAR **path, /* Pointer to pointer to the path name (drive number) */
+ FATFS **rfs, /* Pointer to pointer to the found file system object */
+ BYTE chk_wp /* !=0: Check media write protection for write access */
+)
+{
+ BYTE fmt, b, *tbl;
+ UINT vol;
+ DSTATUS stat;
+ DWORD bsect, fasize, tsect, sysect, nclst, szbfat;
+ WORD nrsv;
+ const TCHAR *p = *path;
+ FATFS *fs;
+
+ /* Get logical drive number from the path name */
+ vol = p[0] - '0'; /* Is there a drive number? */
+ if (vol <= 9 && p[1] == ':') { /* Found a drive number, get and strip it */
+ p += 2; *path = p; /* Return pointer to the path name */
+ } else { /* No drive number is given */
+#if _FS_RPATH
+ vol = CurrVol; /* Use current drive */
+#else
+ vol = 0; /* Use drive 0 */
+#endif
+ }
+
+ /* Check if the logical drive is valid or not */
+ if (vol >= _VOLUMES) /* Is the drive number valid? */
+ return FR_INVALID_DRIVE;
+ *rfs = fs = FatFs[vol]; /* Return pointer to the corresponding file system object */
+ if (!fs) return FR_NOT_ENABLED; /* Is the file system object available? */
+
+ ENTER_FF(fs); /* Lock file system */
+
+ if (fs->fs_type) { /* If the logical drive has been mounted */
+ stat = disk_status(fs->drv);
+ if (!(stat & STA_NOINIT)) { /* and the physical drive is kept initialized (has not been changed), */
+#if !_FS_READONLY
+ if (chk_wp && (stat & STA_PROTECT)) /* Check write protection if needed */
+ return FR_WRITE_PROTECTED;
+#endif
+ return FR_OK; /* The file system object is valid */
+ }
+ }
+
+ /* The logical drive must be mounted. */
+ /* Following code attempts to mount a volume. (analyze BPB and initialize the fs object) */
+
+ fs->fs_type = 0; /* Clear the file system object */
+ fs->drv = (BYTE)LD2PD(vol); /* Bind the logical drive and a physical drive */
+ stat = disk_initialize(fs->drv); /* Initialize low level disk I/O layer */
+ if (stat & STA_NOINIT) /* Check if the initialization succeeded */
+ return FR_NOT_READY; /* Failed to initialize due to no media or hard error */
+#if _MAX_SS != 512 /* Get disk sector size (variable sector size cfg only) */
+ if (disk_ioctl(fs->drv, GET_SECTOR_SIZE, &fs->ssize) != RES_OK)
+ return FR_DISK_ERR;
+#endif
+#if !_FS_READONLY
+ if (chk_wp && (stat & STA_PROTECT)) /* Check disk write protection if needed */
+ return FR_WRITE_PROTECTED;
+#endif
+ /* Search FAT partition on the drive. Supports only generic partitionings, FDISK and SFD. */
+ fmt = check_fs(fs, bsect = 0); /* Check sector 0 if it is a VBR */
+ if (fmt == 1) { /* Not an FAT-VBR, the disk may be partitioned */
+ /* Check the partition listed in top of the partition table */
+ tbl = &fs->win[MBR_Table + LD2PT(vol) * SZ_PTE];/* Partition table */
+ if (tbl[4]) { /* Is the partition existing? */
+ bsect = LD_DWORD(&tbl[8]); /* Partition offset in LBA */
+ fmt = check_fs(fs, bsect); /* Check the partition */
+ }
+ }
+ if (fmt == 3) return FR_DISK_ERR;
+ if (fmt) return FR_NO_FILESYSTEM; /* No FAT volume is found */
+
+ /* Following code initializes the file system object */
+
+ if (LD_WORD(fs->win+BPB_BytsPerSec) != SS(fs)) /* (BPB_BytsPerSec must be equal to the physical sector size) */
+ return FR_NO_FILESYSTEM;
+
+ fasize = LD_WORD(fs->win+BPB_FATSz16); /* Number of sectors per FAT */
+ if (!fasize) fasize = LD_DWORD(fs->win+BPB_FATSz32);
+ fs->fsize = fasize;
+
+ fs->n_fats = b = fs->win[BPB_NumFATs]; /* Number of FAT copies */
+ if (b != 1 && b != 2) return FR_NO_FILESYSTEM; /* (Must be 1 or 2) */
+ fasize *= b; /* Number of sectors for FAT area */
+
+ fs->csize = b = fs->win[BPB_SecPerClus]; /* Number of sectors per cluster */
+ if (!b || (b & (b - 1))) return FR_NO_FILESYSTEM; /* (Must be power of 2) */
+
+ fs->n_rootdir = LD_WORD(fs->win+BPB_RootEntCnt); /* Number of root directory entries */
+ if (fs->n_rootdir % (SS(fs) / SZ_DIR)) return FR_NO_FILESYSTEM; /* (BPB_RootEntCnt must be sector aligned) */
+
+ tsect = LD_WORD(fs->win+BPB_TotSec16); /* Number of sectors on the volume */
+ if (!tsect) tsect = LD_DWORD(fs->win+BPB_TotSec32);
+
+ nrsv = LD_WORD(fs->win+BPB_RsvdSecCnt); /* Number of reserved sectors */
+ if (!nrsv) return FR_NO_FILESYSTEM; /* (BPB_RsvdSecCnt must not be 0) */
+
+ /* Determine the FAT sub type */
+ sysect = nrsv + fasize + fs->n_rootdir / (SS(fs) / SZ_DIR); /* RSV+FAT+DIR */
+ if (tsect < sysect) return FR_NO_FILESYSTEM; /* (Invalid volume size) */
+ nclst = (tsect - sysect) / fs->csize; /* Number of clusters */
+ if (!nclst) return FR_NO_FILESYSTEM; /* (Invalid volume size) */
+ fmt = FS_FAT12;
+ if (nclst >= MIN_FAT16) fmt = FS_FAT16;
+ if (nclst >= MIN_FAT32) fmt = FS_FAT32;
+
+ /* Boundaries and Limits */
+ fs->n_fatent = nclst + 2; /* Number of FAT entries */
+ fs->database = bsect + sysect; /* Data start sector */
+ fs->fatbase = bsect + nrsv; /* FAT start sector */
+ if (fmt == FS_FAT32) {
+ if (fs->n_rootdir) return FR_NO_FILESYSTEM; /* (BPB_RootEntCnt must be 0) */
+ fs->dirbase = LD_DWORD(fs->win+BPB_RootClus); /* Root directory start cluster */
+ szbfat = fs->n_fatent * 4; /* (Required FAT size) */
+ } else {
+ if (!fs->n_rootdir) return FR_NO_FILESYSTEM; /* (BPB_RootEntCnt must not be 0) */
+ fs->dirbase = fs->fatbase + fasize; /* Root directory start sector */
+ szbfat = (fmt == FS_FAT16) ? /* (Required FAT size) */
+ fs->n_fatent * 2 : fs->n_fatent * 3 / 2 + (fs->n_fatent & 1);
+ }
+ if (fs->fsize < (szbfat + (SS(fs) - 1)) / SS(fs)) /* (BPB_FATSz must not be less than required) */
+ return FR_NO_FILESYSTEM;
+
+#if !_FS_READONLY
+ /* Initialize cluster allocation information */
+ fs->free_clust = 0xFFFFFFFF;
+ fs->last_clust = 0;
+
+ /* Get fsinfo if available */
+ if (fmt == FS_FAT32) {
+ fs->fsi_flag = 0;
+ fs->fsi_sector = bsect + LD_WORD(fs->win+BPB_FSInfo);
+ if (disk_read(fs->drv, fs->win, fs->fsi_sector, 1) == RES_OK &&
+ LD_WORD(fs->win+BS_55AA) == 0xAA55 &&
+ LD_DWORD(fs->win+FSI_LeadSig) == 0x41615252 &&
+ LD_DWORD(fs->win+FSI_StrucSig) == 0x61417272) {
+ fs->last_clust = LD_DWORD(fs->win+FSI_Nxt_Free);
+ fs->free_clust = LD_DWORD(fs->win+FSI_Free_Count);
+ }
+ }
+#endif
+ fs->fs_type = fmt; /* FAT sub-type */
+ fs->id = ++Fsid; /* File system mount ID */
+ fs->winsect = 0; /* Invalidate sector cache */
+ fs->wflag = 0;
+#if _FS_RPATH
+ fs->cdir = 0; /* Current directory (root dir) */
+#endif
+#if _FS_SHARE /* Clear file lock semaphores */
+ clear_lock(fs);
+#endif
+
+ return FR_OK;
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Check if the file/dir object is valid or not */
+/*-----------------------------------------------------------------------*/
+
+static
+FRESULT validate ( /* FR_OK(0): The object is valid, !=0: Invalid */
+ FATFS *fs, /* Pointer to the file system object */
+ WORD id /* Member id of the target object to be checked */
+)
+{
+ if (!fs || !fs->fs_type || fs->id != id)
+ return FR_INVALID_OBJECT;
+
+ ENTER_FF(fs); /* Lock file system */
+
+ if (disk_status(fs->drv) & STA_NOINIT)
+ return FR_NOT_READY;
+
+ return FR_OK;
+}
+
+
+
+
+/*--------------------------------------------------------------------------
+
+ Public Functions
+
+--------------------------------------------------------------------------*/
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Mount/Unmount a Logical Drive */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_mount (
+ BYTE vol, /* Logical drive number to be mounted/unmounted */
+ FATFS *fs /* Pointer to new file system object (NULL for unmount)*/
+)
+{
+ FATFS *rfs;
+
+
+ if (vol >= _VOLUMES) /* Check if the drive number is valid */
+ return FR_INVALID_DRIVE;
+ rfs = FatFs[vol]; /* Get current fs object */
+
+ if (rfs) {
+#if _FS_SHARE
+ clear_lock(rfs);
+#endif
+#if _FS_REENTRANT /* Discard sync object of the current volume */
+ if (!ff_del_syncobj(rfs->sobj)) return FR_INT_ERR;
+#endif
+ rfs->fs_type = 0; /* Clear old fs object */
+ }
+
+ if (fs) {
+ fs->fs_type = 0; /* Clear new fs object */
+#if _FS_REENTRANT /* Create sync object for the new volume */
+ if (!ff_cre_syncobj(vol, &fs->sobj)) return FR_INT_ERR;
+#endif
+ }
+ FatFs[vol] = fs; /* Register new fs object */
+
+ return FR_OK;
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Open or Create a File */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_open (
+ FIL *fp, /* Pointer to the blank file object */
+ const TCHAR *path, /* Pointer to the file name */
+ BYTE mode /* Access mode and file open mode flags */
+)
+{
+ FRESULT res;
+ DIR dj;
+ BYTE *dir;
+ DEF_NAMEBUF;
+
+
+ fp->fs = 0; /* Clear file object */
+
+#if !_FS_READONLY
+ mode &= FA_READ | FA_WRITE | FA_CREATE_ALWAYS | FA_OPEN_ALWAYS | FA_CREATE_NEW;
+ res = chk_mounted(&path, &dj.fs, (BYTE)(mode & ~FA_READ));
+#else
+ mode &= FA_READ;
+ res = chk_mounted(&path, &dj.fs, 0);
+#endif
+ INIT_BUF(dj);
+ if (res == FR_OK)
+ res = follow_path(&dj, path); /* Follow the file path */
+ dir = dj.dir;
+
+#if !_FS_READONLY /* R/W configuration */
+ if (res == FR_OK) {
+ if (!dir) /* Current dir itself */
+ res = FR_INVALID_NAME;
+#if _FS_SHARE
+ else
+ res = chk_lock(&dj, (mode & ~FA_READ) ? 1 : 0);
+#endif
+ }
+ /* Create or Open a file */
+ if (mode & (FA_CREATE_ALWAYS | FA_OPEN_ALWAYS | FA_CREATE_NEW)) {
+ DWORD dw, cl;
+
+ if (res != FR_OK) { /* No file, create new */
+ if (res == FR_NO_FILE) /* There is no file to open, create a new entry */
+#if _FS_SHARE
+ res = enq_lock(dj.fs) ? dir_register(&dj) : FR_TOO_MANY_OPEN_FILES;
+#else
+ res = dir_register(&dj);
+#endif
+ mode |= FA_CREATE_ALWAYS; /* File is created */
+ dir = dj.dir; /* New entry */
+ }
+ else { /* Any object is already existing */
+ if (dir[DIR_Attr] & (AM_RDO | AM_DIR)) { /* Cannot overwrite it (R/O or DIR) */
+ res = FR_DENIED;
+ } else {
+ if (mode & FA_CREATE_NEW) /* Cannot create as new file */
+ res = FR_EXIST;
+ }
+ }
+ if (res == FR_OK && (mode & FA_CREATE_ALWAYS)) { /* Truncate it if overwrite mode */
+ dw = get_fattime(); /* Created time */
+ ST_DWORD(dir+DIR_CrtTime, dw);
+ dir[DIR_Attr] = 0; /* Reset attribute */
+ ST_DWORD(dir+DIR_FileSize, 0); /* size = 0 */
+ cl = LD_CLUST(dir); /* Get start cluster */
+ ST_CLUST(dir, 0); /* cluster = 0 */
+ dj.fs->wflag = 1;
+ if (cl) { /* Remove the cluster chain if exist */
+ dw = dj.fs->winsect;
+ res = remove_chain(dj.fs, cl);
+ if (res == FR_OK) {
+ dj.fs->last_clust = cl - 1; /* Reuse the cluster hole */
+ res = move_window(dj.fs, dw);
+ }
+ }
+ }
+ }
+ else { /* Open an existing file */
+ if (res == FR_OK) { /* Follow succeeded */
+ if (dir[DIR_Attr] & AM_DIR) { /* It is a directory */
+ res = FR_NO_FILE;
+ } else {
+ if ((mode & FA_WRITE) && (dir[DIR_Attr] & AM_RDO)) /* R/O violation */
+ res = FR_DENIED;
+ }
+ }
+ }
+ if (res == FR_OK) {
+ if (mode & FA_CREATE_ALWAYS) /* Set file change flag if created or overwritten */
+ mode |= FA__WRITTEN;
+ fp->dir_sect = dj.fs->winsect; /* Pointer to the directory entry */
+ fp->dir_ptr = dir;
+#if _FS_SHARE
+ fp->lockid = inc_lock(&dj, (mode & ~FA_READ) ? 1 : 0);
+ if (!fp->lockid) res = FR_INT_ERR;
+#endif
+ }
+
+#else /* R/O configuration */
+ if (res == FR_OK) { /* Follow succeeded */
+ if (!dir) { /* Current dir itself */
+ res = FR_INVALID_NAME;
+ } else {
+ if (dir[DIR_Attr] & AM_DIR) /* It is a directory */
+ res = FR_NO_FILE;
+ }
+ }
+#endif
+ FREE_BUF();
+
+ if (res == FR_OK) {
+ fp->flag = mode; /* File access mode */
+ fp->sclust = LD_CLUST(dir); /* File start cluster */
+ fp->fsize = LD_DWORD(dir+DIR_FileSize); /* File size */
+ fp->fptr = 0; /* File pointer */
+ fp->dsect = 0;
+#if _USE_FASTSEEK
+ fp->cltbl = 0; /* Normal seek mode */
+#endif
+ fp->fs = dj.fs; fp->id = dj.fs->id; /* Validate file object */
+ }
+
+ LEAVE_FF(dj.fs, res);
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Read File */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_read (
+ FIL *fp, /* Pointer to the file object */
+ void *buff, /* Pointer to data buffer */
+ UINT btr, /* Number of bytes to read */
+ UINT *br /* Pointer to number of bytes read */
+)
+{
+ FRESULT res;
+ DWORD clst, sect, remain;
+ UINT rcnt, cc;
+ BYTE csect, *rbuff = buff;
+
+
+ *br = 0; /* Initialize byte counter */
+
+ res = validate(fp->fs, fp->id); /* Check validity */
+ if (res != FR_OK) LEAVE_FF(fp->fs, res);
+ if (fp->flag & FA__ERROR) /* Aborted file? */
+ LEAVE_FF(fp->fs, FR_INT_ERR);
+ if (!(fp->flag & FA_READ)) /* Check access mode */
+ LEAVE_FF(fp->fs, FR_DENIED);
+ remain = fp->fsize - fp->fptr;
+ if (btr > remain) btr = (UINT)remain; /* Truncate btr by remaining bytes */
+
+ for ( ; btr; /* Repeat until all data read */
+ rbuff += rcnt, fp->fptr += rcnt, *br += rcnt, btr -= rcnt) {
+ if ((fp->fptr % SS(fp->fs)) == 0) { /* On the sector boundary? */
+ csect = (BYTE)(fp->fptr / SS(fp->fs) & (fp->fs->csize - 1)); /* Sector offset in the cluster */
+ if (!csect) { /* On the cluster boundary? */
+ if (fp->fptr == 0) { /* On the top of the file? */
+ clst = fp->sclust; /* Follow from the origin */
+ } else { /* Middle or end of the file */
+#if _USE_FASTSEEK
+ if (fp->cltbl)
+ clst = clmt_clust(fp, fp->fptr); /* Get cluster# from the CLMT */
+ else
+#endif
+ clst = get_fat(fp->fs, fp->clust); /* Follow cluster chain on the FAT */
+ }
+ if (clst < 2) ABORT(fp->fs, FR_INT_ERR);
+ if (clst == 0xFFFFFFFF) ABORT(fp->fs, FR_DISK_ERR);
+ fp->clust = clst; /* Update current cluster */
+ }
+ sect = clust2sect(fp->fs, fp->clust); /* Get current sector */
+ if (!sect) ABORT(fp->fs, FR_INT_ERR);
+ sect += csect;
+ cc = btr / SS(fp->fs); /* When remaining bytes >= sector size, */
+ if (cc) { /* Read maximum contiguous sectors directly */
+ if (csect + cc > fp->fs->csize) /* Clip at cluster boundary */
+ cc = fp->fs->csize - csect;
+ if (disk_read(fp->fs->drv, rbuff, sect, (BYTE)cc) != RES_OK)
+ ABORT(fp->fs, FR_DISK_ERR);
+#if !_FS_READONLY && _FS_MINIMIZE <= 2 /* Replace one of the read sectors with cached data if it contains a dirty sector */
+#if _FS_TINY
+ if (fp->fs->wflag && fp->fs->winsect - sect < cc)
+ mem_cpy(rbuff + ((fp->fs->winsect - sect) * SS(fp->fs)), fp->fs->win, SS(fp->fs));
+#else
+ if ((fp->flag & FA__DIRTY) && fp->dsect - sect < cc)
+ mem_cpy(rbuff + ((fp->dsect - sect) * SS(fp->fs)), fp->buf, SS(fp->fs));
+#endif
+#endif
+ rcnt = SS(fp->fs) * cc; /* Number of bytes transferred */
+ continue;
+ }
+#if !_FS_TINY
+ if (fp->dsect != sect) { /* Load data sector if not in cache */
+#if !_FS_READONLY
+ if (fp->flag & FA__DIRTY) { /* Write-back dirty sector cache */
+ if (disk_write(fp->fs->drv, fp->buf, fp->dsect, 1) != RES_OK)
+ ABORT(fp->fs, FR_DISK_ERR);
+ fp->flag &= ~FA__DIRTY;
+ }
+#endif
+ if (disk_read(fp->fs->drv, fp->buf, sect, 1) != RES_OK) /* Fill sector cache */
+ ABORT(fp->fs, FR_DISK_ERR);
+ }
+#endif
+ fp->dsect = sect;
+ }
+ rcnt = SS(fp->fs) - (fp->fptr % SS(fp->fs)); /* Get partial sector data from sector buffer */
+ if (rcnt > btr) rcnt = btr;
+#if _FS_TINY
+ if (move_window(fp->fs, fp->dsect)) /* Move sector window */
+ ABORT(fp->fs, FR_DISK_ERR);
+ mem_cpy(rbuff, &fp->fs->win[fp->fptr % SS(fp->fs)], rcnt); /* Pick partial sector */
+#else
+ mem_cpy(rbuff, &fp->buf[fp->fptr % SS(fp->fs)], rcnt); /* Pick partial sector */
+#endif
+ }
+
+ LEAVE_FF(fp->fs, FR_OK);
+}
+
+
+
+
+#if !_FS_READONLY
+/*-----------------------------------------------------------------------*/
+/* Write File */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_write (
+ FIL *fp, /* Pointer to the file object */
+ const void *buff, /* Pointer to the data to be written */
+ UINT btw, /* Number of bytes to write */
+ UINT *bw /* Pointer to number of bytes written */
+)
+{
+ FRESULT res;
+ DWORD clst, sect;
+ UINT wcnt, cc;
+ const BYTE *wbuff = buff;
+ BYTE csect;
+
+
+ *bw = 0; /* Initialize byte counter */
+
+ res = validate(fp->fs, fp->id); /* Check validity */
+ if (res != FR_OK) LEAVE_FF(fp->fs, res);
+ if (fp->flag & FA__ERROR) /* Aborted file? */
+ LEAVE_FF(fp->fs, FR_INT_ERR);
+ if (!(fp->flag & FA_WRITE)) /* Check access mode */
+ LEAVE_FF(fp->fs, FR_DENIED);
+ if ((DWORD)(fp->fsize + btw) < fp->fsize) btw = 0; /* File size cannot reach 4GB */
+
+ for ( ; btw; /* Repeat until all data written */
+ wbuff += wcnt, fp->fptr += wcnt, *bw += wcnt, btw -= wcnt) {
+ if ((fp->fptr % SS(fp->fs)) == 0) { /* On the sector boundary? */
+ csect = (BYTE)(fp->fptr / SS(fp->fs) & (fp->fs->csize - 1)); /* Sector offset in the cluster */
+ if (!csect) { /* On the cluster boundary? */
+ if (fp->fptr == 0) { /* On the top of the file? */
+ clst = fp->sclust; /* Follow from the origin */
+ if (clst == 0) /* When no cluster is allocated, */
+ fp->sclust = clst = create_chain(fp->fs, 0); /* Create a new cluster chain */
+ } else { /* Middle or end of the file */
+#if _USE_FASTSEEK
+ if (fp->cltbl)
+ clst = clmt_clust(fp, fp->fptr); /* Get cluster# from the CLMT */
+ else
+#endif
+ clst = create_chain(fp->fs, fp->clust); /* Follow or stretch cluster chain on the FAT */
+ }
+ if (clst == 0) break; /* Could not allocate a new cluster (disk full) */
+ if (clst == 1) ABORT(fp->fs, FR_INT_ERR);
+ if (clst == 0xFFFFFFFF) ABORT(fp->fs, FR_DISK_ERR);
+ fp->clust = clst; /* Update current cluster */
+ }
+#if _FS_TINY
+ if (fp->fs->winsect == fp->dsect && move_window(fp->fs, 0)) /* Write-back sector cache */
+ ABORT(fp->fs, FR_DISK_ERR);
+#else
+ if (fp->flag & FA__DIRTY) { /* Write-back sector cache */
+ if (disk_write(fp->fs->drv, fp->buf, fp->dsect, 1) != RES_OK)
+ ABORT(fp->fs, FR_DISK_ERR);
+ fp->flag &= ~FA__DIRTY;
+ }
+#endif
+ sect = clust2sect(fp->fs, fp->clust); /* Get current sector */
+ if (!sect) ABORT(fp->fs, FR_INT_ERR);
+ sect += csect;
+ cc = btw / SS(fp->fs); /* When remaining bytes >= sector size, */
+ if (cc) { /* Write maximum contiguous sectors directly */
+ if (csect + cc > fp->fs->csize) /* Clip at cluster boundary */
+ cc = fp->fs->csize - csect;
+ if (disk_write(fp->fs->drv, wbuff, sect, (BYTE)cc) != RES_OK)
+ ABORT(fp->fs, FR_DISK_ERR);
+#if _FS_TINY
+ if (fp->fs->winsect - sect < cc) { /* Refill sector cache if it gets invalidated by the direct write */
+ mem_cpy(fp->fs->win, wbuff + ((fp->fs->winsect - sect) * SS(fp->fs)), SS(fp->fs));
+ fp->fs->wflag = 0;
+ }
+#else
+ if (fp->dsect - sect < cc) { /* Refill sector cache if it gets invalidated by the direct write */
+ mem_cpy(fp->buf, wbuff + ((fp->dsect - sect) * SS(fp->fs)), SS(fp->fs));
+ fp->flag &= ~FA__DIRTY;
+ }
+#endif
+ wcnt = SS(fp->fs) * cc; /* Number of bytes transferred */
+ continue;
+ }
+#if _FS_TINY
+ if (fp->fptr >= fp->fsize) { /* Avoid silly cache filling at growing edge */
+ if (move_window(fp->fs, 0)) ABORT(fp->fs, FR_DISK_ERR);
+ fp->fs->winsect = sect;
+ }
+#else
+ if (fp->dsect != sect) { /* Fill sector cache with file data */
+ if (fp->fptr < fp->fsize &&
+ disk_read(fp->fs->drv, fp->buf, sect, 1) != RES_OK)
+ ABORT(fp->fs, FR_DISK_ERR);
+ }
+#endif
+ fp->dsect = sect;
+ }
+ wcnt = SS(fp->fs) - (fp->fptr % SS(fp->fs));/* Put partial sector into file I/O buffer */
+ if (wcnt > btw) wcnt = btw;
+#if _FS_TINY
+ if (move_window(fp->fs, fp->dsect)) /* Move sector window */
+ ABORT(fp->fs, FR_DISK_ERR);
+ mem_cpy(&fp->fs->win[fp->fptr % SS(fp->fs)], wbuff, wcnt); /* Fit partial sector */
+ fp->fs->wflag = 1;
+#else
+ mem_cpy(&fp->buf[fp->fptr % SS(fp->fs)], wbuff, wcnt); /* Fit partial sector */
+ fp->flag |= FA__DIRTY;
+#endif
+ }
+
+ if (fp->fptr > fp->fsize) fp->fsize = fp->fptr; /* Update file size if needed */
+ fp->flag |= FA__WRITTEN; /* Set file change flag */
+
+ LEAVE_FF(fp->fs, FR_OK);
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Synchronize the File Object */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_sync (
+ FIL *fp /* Pointer to the file object */
+)
+{
+ FRESULT res;
+ DWORD tim;
+ BYTE *dir;
+
+
+ res = validate(fp->fs, fp->id); /* Check validity of the object */
+ if (res == FR_OK) {
+ if (fp->flag & FA__WRITTEN) { /* Has the file been written? */
+#if !_FS_TINY /* Write-back dirty buffer */
+ if (fp->flag & FA__DIRTY) {
+ if (disk_write(fp->fs->drv, fp->buf, fp->dsect, 1) != RES_OK)
+ LEAVE_FF(fp->fs, FR_DISK_ERR);
+ fp->flag &= ~FA__DIRTY;
+ }
+#endif
+ /* Update the directory entry */
+ res = move_window(fp->fs, fp->dir_sect);
+ if (res == FR_OK) {
+ dir = fp->dir_ptr;
+ dir[DIR_Attr] |= AM_ARC; /* Set archive bit */
+ ST_DWORD(dir+DIR_FileSize, fp->fsize); /* Update file size */
+ ST_CLUST(dir, fp->sclust); /* Update start cluster */
+ tim = get_fattime(); /* Update updated time */
+ ST_DWORD(dir+DIR_WrtTime, tim);
+ fp->flag &= ~FA__WRITTEN;
+ fp->fs->wflag = 1;
+ res = sync(fp->fs);
+ }
+ }
+ }
+
+ LEAVE_FF(fp->fs, res);
+}
+
+#endif /* !_FS_READONLY */
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Close File */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_close (
+ FIL *fp /* Pointer to the file object to be closed */
+)
+{
+ FRESULT res;
+
+#if _FS_READONLY
+ FATFS *fs = fp->fs;
+ res = validate(fs, fp->id);
+ if (res == FR_OK) fp->fs = 0; /* Discard file object */
+ LEAVE_FF(fs, res);
+
+#else
+ res = f_sync(fp); /* Flush cached data */
+#if _FS_SHARE
+ if (res == FR_OK) { /* Decrement open counter */
+#if _FS_REENTRANT
+ res = validate(fp->fs, fp->id);
+ if (res == FR_OK) {
+ res = dec_lock(fp->lockid);
+ unlock_fs(fp->fs, FR_OK);
+ }
+#else
+ res = dec_lock(fp->lockid);
+#endif
+ }
+#endif
+ if (res == FR_OK) fp->fs = 0; /* Discard file object */
+ return res;
+#endif
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Current Drive/Directory Handlings */
+/*-----------------------------------------------------------------------*/
+
+#if _FS_RPATH >= 1
+
+FRESULT f_chdrive (
+ BYTE drv /* Drive number */
+)
+{
+ if (drv >= _VOLUMES) return FR_INVALID_DRIVE;
+
+ CurrVol = drv;
+
+ return FR_OK;
+}
+
+
+
+FRESULT f_chdir (
+ const TCHAR *path /* Pointer to the directory path */
+)
+{
+ FRESULT res;
+ DIR dj;
+ DEF_NAMEBUF;
+
+
+ res = chk_mounted(&path, &dj.fs, 0);
+ if (res == FR_OK) {
+ INIT_BUF(dj);
+ res = follow_path(&dj, path); /* Follow the path */
+ FREE_BUF();
+ if (res == FR_OK) { /* Follow completed */
+ if (!dj.dir) {
+ dj.fs->cdir = dj.sclust; /* Start directory itself */
+ } else {
+ if (dj.dir[DIR_Attr] & AM_DIR) /* Reached to the directory */
+ dj.fs->cdir = LD_CLUST(dj.dir);
+ else
+ res = FR_NO_PATH; /* Reached but a file */
+ }
+ }
+ if (res == FR_NO_FILE) res = FR_NO_PATH;
+ }
+
+ LEAVE_FF(dj.fs, res);
+}
+
+
+#if _FS_RPATH >= 2
+FRESULT f_getcwd (
+ TCHAR *path, /* Pointer to the directory path */
+ UINT sz_path /* Size of path */
+)
+{
+ FRESULT res;
+ DIR dj;
+ UINT i, n;
+ DWORD ccl;
+ TCHAR *tp;
+ FILINFO fno;
+ DEF_NAMEBUF;
+
+
+ *path = 0;
+ res = chk_mounted((const TCHAR**)&path, &dj.fs, 0); /* Get current volume */
+ if (res == FR_OK) {
+ INIT_BUF(dj);
+ i = sz_path; /* Bottom of buffer (dir stack base) */
+ dj.sclust = dj.fs->cdir; /* Start to follow upper dir from current dir */
+ while ((ccl = dj.sclust) != 0) { /* Repeat while current dir is a sub-dir */
+ res = dir_sdi(&dj, 1); /* Get parent dir */
+ if (res != FR_OK) break;
+ res = dir_read(&dj);
+ if (res != FR_OK) break;
+ dj.sclust = LD_CLUST(dj.dir); /* Goto parent dir */
+ res = dir_sdi(&dj, 0);
+ if (res != FR_OK) break;
+ do { /* Find the entry links to the child dir */
+ res = dir_read(&dj);
+ if (res != FR_OK) break;
+ if (ccl == LD_CLUST(dj.dir)) break; /* Found the entry */
+ res = dir_next(&dj, 0);
+ } while (res == FR_OK);
+ if (res == FR_NO_FILE) res = FR_INT_ERR;/* It cannot be 'not found'. */
+ if (res != FR_OK) break;
+#if _USE_LFN
+ fno.lfname = path;
+ fno.lfsize = i;
+#endif
+ get_fileinfo(&dj, &fno); /* Get the dir name and push it to the buffer */
+ tp = fno.fname;
+ if (_USE_LFN && *path) tp = path;
+ for (n = 0; tp[n]; n++) ;
+ if (i < n + 3) {
+ res = FR_NOT_ENOUGH_CORE; break;
+ }
+ while (n) path[--i] = tp[--n];
+ path[--i] = '/';
+ }
+ tp = path;
+ if (res == FR_OK) {
+ *tp++ = '0' + CurrVol; /* Put drive number */
+ *tp++ = ':';
+ if (i == sz_path) { /* Root-dir */
+ *tp++ = '/';
+ } else { /* Sub-dir */
+ do /* Add stacked path str */
+ *tp++ = path[i++];
+ while (i < sz_path);
+ }
+ }
+ *tp = 0;
+ FREE_BUF();
+ }
+
+ LEAVE_FF(dj.fs, res);
+}
+#endif /* _FS_RPATH >= 2 */
+#endif /* _FS_RPATH >= 1 */
+
+
+
+#if _FS_MINIMIZE <= 2
+/*-----------------------------------------------------------------------*/
+/* Seek File R/W Pointer */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_lseek (
+ FIL *fp, /* Pointer to the file object */
+ DWORD ofs /* File pointer from top of file */
+)
+{
+ FRESULT res;
+
+
+ res = validate(fp->fs, fp->id); /* Check validity of the object */
+ if (res != FR_OK) LEAVE_FF(fp->fs, res);
+ if (fp->flag & FA__ERROR) /* Check abort flag */
+ LEAVE_FF(fp->fs, FR_INT_ERR);
+
+#if _USE_FASTSEEK
+ if (fp->cltbl) { /* Fast seek */
+ DWORD cl, pcl, ncl, tcl, dsc, tlen, ulen, *tbl;
+
+ if (ofs == CREATE_LINKMAP) { /* Create CLMT */
+ tbl = fp->cltbl;
+ tlen = *tbl++; ulen = 2; /* Given table size and required table size */
+ cl = fp->sclust; /* Top of the chain */
+ if (cl) {
+ do {
+ /* Get a fragment */
+ tcl = cl; ncl = 0; ulen += 2; /* Top, length and used items */
+ do {
+ pcl = cl; ncl++;
+ cl = get_fat(fp->fs, cl);
+ if (cl <= 1) ABORT(fp->fs, FR_INT_ERR);
+ if (cl == 0xFFFFFFFF) ABORT(fp->fs, FR_DISK_ERR);
+ } while (cl == pcl + 1);
+ if (ulen <= tlen) { /* Store the length and top of the fragment */
+ *tbl++ = ncl; *tbl++ = tcl;
+ }
+ } while (cl < fp->fs->n_fatent); /* Repeat until end of chain */
+ }
+ *fp->cltbl = ulen; /* Number of items used */
+ if (ulen <= tlen)
+ *tbl = 0; /* Terminate table */
+ else
+ res = FR_NOT_ENOUGH_CORE; /* Given table size is smaller than required */
+
+ } else { /* Fast seek */
+ if (ofs > fp->fsize) /* Clip offset at the file size */
+ ofs = fp->fsize;
+ fp->fptr = ofs; /* Set file pointer */
+ if (ofs) {
+ fp->clust = clmt_clust(fp, ofs - 1);
+ dsc = clust2sect(fp->fs, fp->clust);
+ if (!dsc) ABORT(fp->fs, FR_INT_ERR);
+ dsc += (ofs - 1) / SS(fp->fs) & (fp->fs->csize - 1);
+ if (fp->fptr % SS(fp->fs) && dsc != fp->dsect) { /* Refill sector cache if needed */
+#if !_FS_TINY
+#if !_FS_READONLY
+ if (fp->flag & FA__DIRTY) { /* Write-back dirty sector cache */
+ if (disk_write(fp->fs->drv, fp->buf, fp->dsect, 1) != RES_OK)
+ ABORT(fp->fs, FR_DISK_ERR);
+ fp->flag &= ~FA__DIRTY;
+ }
+#endif
+ if (disk_read(fp->fs->drv, fp->buf, dsc, 1) != RES_OK) /* Load current sector */
+ ABORT(fp->fs, FR_DISK_ERR);
+#endif
+ fp->dsect = dsc;
+ }
+ }
+ }
+ } else
+#endif
+
+ /* Normal Seek */
+ {
+ DWORD clst, bcs, nsect, ifptr;
+
+ if (ofs > fp->fsize /* In read-only mode, clip offset with the file size */
+#if !_FS_READONLY
+ && !(fp->flag & FA_WRITE)
+#endif
+ ) ofs = fp->fsize;
+
+ ifptr = fp->fptr;
+ fp->fptr = nsect = 0;
+ if (ofs) {
+ bcs = (DWORD)fp->fs->csize * SS(fp->fs); /* Cluster size (byte) */
+ if (ifptr > 0 &&
+ (ofs - 1) / bcs >= (ifptr - 1) / bcs) { /* When seek to same or following cluster, */
+ fp->fptr = (ifptr - 1) & ~(bcs - 1); /* start from the current cluster */
+ ofs -= fp->fptr;
+ clst = fp->clust;
+ } else { /* When seek to back cluster, */
+ clst = fp->sclust; /* start from the first cluster */
+#if !_FS_READONLY
+ if (clst == 0) { /* If no cluster chain, create a new chain */
+ clst = create_chain(fp->fs, 0);
+ if (clst == 1) ABORT(fp->fs, FR_INT_ERR);
+ if (clst == 0xFFFFFFFF) ABORT(fp->fs, FR_DISK_ERR);
+ fp->sclust = clst;
+ }
+#endif
+ fp->clust = clst;
+ }
+ if (clst != 0) {
+ while (ofs > bcs) { /* Cluster following loop */
+#if !_FS_READONLY
+ if (fp->flag & FA_WRITE) { /* Check if in write mode or not */
+ clst = create_chain(fp->fs, clst); /* Force stretch if in write mode */
+ if (clst == 0) { /* When disk gets full, clip file size */
+ ofs = bcs; break;
+ }
+ } else
+#endif
+ clst = get_fat(fp->fs, clst); /* Follow cluster chain if not in write mode */
+ if (clst == 0xFFFFFFFF) ABORT(fp->fs, FR_DISK_ERR);
+ if (clst <= 1 || clst >= fp->fs->n_fatent) ABORT(fp->fs, FR_INT_ERR);
+ fp->clust = clst;
+ fp->fptr += bcs;
+ ofs -= bcs;
+ }
+ fp->fptr += ofs;
+ if (ofs % SS(fp->fs)) {
+ nsect = clust2sect(fp->fs, clst); /* Current sector */
+ if (!nsect) ABORT(fp->fs, FR_INT_ERR);
+ nsect += ofs / SS(fp->fs);
+ }
+ }
+ }
+ if (fp->fptr % SS(fp->fs) && nsect != fp->dsect) { /* Fill sector cache if needed */
+#if !_FS_TINY
+#if !_FS_READONLY
+ if (fp->flag & FA__DIRTY) { /* Write-back dirty sector cache */
+ if (disk_write(fp->fs->drv, fp->buf, fp->dsect, 1) != RES_OK)
+ ABORT(fp->fs, FR_DISK_ERR);
+ fp->flag &= ~FA__DIRTY;
+ }
+#endif
+ if (disk_read(fp->fs->drv, fp->buf, nsect, 1) != RES_OK) /* Fill sector cache */
+ ABORT(fp->fs, FR_DISK_ERR);
+#endif
+ fp->dsect = nsect;
+ }
+#if !_FS_READONLY
+ if (fp->fptr > fp->fsize) { /* Set file change flag if the file size is extended */
+ fp->fsize = fp->fptr;
+ fp->flag |= FA__WRITTEN;
+ }
+#endif
+ }
+
+ LEAVE_FF(fp->fs, res);
+}
+
+
+
+#if _FS_MINIMIZE <= 1
+/*-----------------------------------------------------------------------*/
+/* Create a Directroy Object */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_opendir (
+ DIR *dj, /* Pointer to directory object to create */
+ const TCHAR *path /* Pointer to the directory path */
+)
+{
+ FRESULT res;
+ DEF_NAMEBUF;
+
+
+ res = chk_mounted(&path, &dj->fs, 0);
+ if (res == FR_OK) {
+ INIT_BUF(*dj);
+ res = follow_path(dj, path); /* Follow the path to the directory */
+ FREE_BUF();
+ if (res == FR_OK) { /* Follow completed */
+ if (dj->dir) { /* It is not the root dir */
+ if (dj->dir[DIR_Attr] & AM_DIR) { /* The object is a directory */
+ dj->sclust = LD_CLUST(dj->dir);
+ } else { /* The object is not a directory */
+ res = FR_NO_PATH;
+ }
+ }
+ if (res == FR_OK) {
+ dj->id = dj->fs->id;
+ res = dir_sdi(dj, 0); /* Rewind dir */
+ }
+ }
+ if (res == FR_NO_FILE) res = FR_NO_PATH;
+ }
+
+ LEAVE_FF(dj->fs, res);
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Read Directory Entry in Sequense */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_readdir (
+ DIR *dj, /* Pointer to the open directory object */
+ FILINFO *fno /* Pointer to file information to return */
+)
+{
+ FRESULT res;
+ DEF_NAMEBUF;
+
+
+ res = validate(dj->fs, dj->id); /* Check validity of the object */
+ if (res == FR_OK) {
+ if (!fno) {
+ res = dir_sdi(dj, 0); /* Rewind the directory object */
+ } else {
+ INIT_BUF(*dj);
+ res = dir_read(dj); /* Read an directory item */
+ if (res == FR_NO_FILE) { /* Reached end of dir */
+ dj->sect = 0;
+ res = FR_OK;
+ }
+ if (res == FR_OK) { /* A valid entry is found */
+ get_fileinfo(dj, fno); /* Get the object information */
+ res = dir_next(dj, 0); /* Increment index for next */
+ if (res == FR_NO_FILE) {
+ dj->sect = 0;
+ res = FR_OK;
+ }
+ }
+ FREE_BUF();
+ }
+ }
+
+ LEAVE_FF(dj->fs, res);
+}
+
+
+
+#if _FS_MINIMIZE == 0
+/*-----------------------------------------------------------------------*/
+/* Get File Status */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_stat (
+ const TCHAR *path, /* Pointer to the file path */
+ FILINFO *fno /* Pointer to file information to return */
+)
+{
+ FRESULT res;
+ DIR dj;
+ DEF_NAMEBUF;
+
+
+ res = chk_mounted(&path, &dj.fs, 0);
+ if (res == FR_OK) {
+ INIT_BUF(dj);
+ res = follow_path(&dj, path); /* Follow the file path */
+ if (res == FR_OK) { /* Follow completed */
+ if (dj.dir) /* Found an object */
+ get_fileinfo(&dj, fno);
+ else /* It is root dir */
+ res = FR_INVALID_NAME;
+ }
+ FREE_BUF();
+ }
+
+ LEAVE_FF(dj.fs, res);
+}
+
+
+
+#if !_FS_READONLY
+/*-----------------------------------------------------------------------*/
+/* Get Number of Free Clusters */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_getfree (
+ const TCHAR *path, /* Pointer to the logical drive number (root dir) */
+ DWORD *nclst, /* Pointer to the variable to return number of free clusters */
+ FATFS **fatfs /* Pointer to pointer to corresponding file system object to return */
+)
+{
+ FRESULT res;
+ DWORD n, clst, sect, stat;
+ UINT i;
+ BYTE fat, *p;
+
+
+ /* Get drive number */
+ res = chk_mounted(&path, fatfs, 0);
+ if (res == FR_OK) {
+ /* If free_clust is valid, return it without full cluster scan */
+ if ((*fatfs)->free_clust <= (*fatfs)->n_fatent - 2) {
+ *nclst = (*fatfs)->free_clust;
+ } else {
+ /* Get number of free clusters */
+ fat = (*fatfs)->fs_type;
+ n = 0;
+ if (fat == FS_FAT12) {
+ clst = 2;
+ do {
+ stat = get_fat(*fatfs, clst);
+ if (stat == 0xFFFFFFFF) { res = FR_DISK_ERR; break; }
+ if (stat == 1) { res = FR_INT_ERR; break; }
+ if (stat == 0) n++;
+ } while (++clst < (*fatfs)->n_fatent);
+ } else {
+ clst = (*fatfs)->n_fatent;
+ sect = (*fatfs)->fatbase;
+ i = 0; p = 0;
+ do {
+ if (!i) {
+ res = move_window(*fatfs, sect++);
+ if (res != FR_OK) break;
+ p = (*fatfs)->win;
+ i = SS(*fatfs);
+ }
+ if (fat == FS_FAT16) {
+ if (LD_WORD(p) == 0) n++;
+ p += 2; i -= 2;
+ } else {
+ if ((LD_DWORD(p) & 0x0FFFFFFF) == 0) n++;
+ p += 4; i -= 4;
+ }
+ } while (--clst);
+ }
+ (*fatfs)->free_clust = n;
+ if (fat == FS_FAT32) (*fatfs)->fsi_flag = 1;
+ *nclst = n;
+ }
+ }
+ LEAVE_FF(*fatfs, res);
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Truncate File */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_truncate (
+ FIL *fp /* Pointer to the file object */
+)
+{
+ FRESULT res;
+ DWORD ncl;
+
+
+ res = validate(fp->fs, fp->id); /* Check validity of the object */
+ if (res == FR_OK) {
+ if (fp->flag & FA__ERROR) { /* Check abort flag */
+ res = FR_INT_ERR;
+ } else {
+ if (!(fp->flag & FA_WRITE)) /* Check access mode */
+ res = FR_DENIED;
+ }
+ }
+ if (res == FR_OK) {
+ if (fp->fsize > fp->fptr) {
+ fp->fsize = fp->fptr; /* Set file size to current R/W point */
+ fp->flag |= FA__WRITTEN;
+ if (fp->fptr == 0) { /* When set file size to zero, remove entire cluster chain */
+ res = remove_chain(fp->fs, fp->sclust);
+ fp->sclust = 0;
+ } else { /* When truncate a part of the file, remove remaining clusters */
+ ncl = get_fat(fp->fs, fp->clust);
+ res = FR_OK;
+ if (ncl == 0xFFFFFFFF) res = FR_DISK_ERR;
+ if (ncl == 1) res = FR_INT_ERR;
+ if (res == FR_OK && ncl < fp->fs->n_fatent) {
+ res = put_fat(fp->fs, fp->clust, 0x0FFFFFFF);
+ if (res == FR_OK) res = remove_chain(fp->fs, ncl);
+ }
+ }
+ }
+ if (res != FR_OK) fp->flag |= FA__ERROR;
+ }
+
+ LEAVE_FF(fp->fs, res);
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Delete a File or Directory */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_unlink (
+ const TCHAR *path /* Pointer to the file or directory path */
+)
+{
+ FRESULT res;
+ DIR dj, sdj;
+ BYTE *dir;
+ DWORD dclst;
+ DEF_NAMEBUF;
+
+
+ res = chk_mounted(&path, &dj.fs, 1);
+ if (res == FR_OK) {
+ INIT_BUF(dj);
+ res = follow_path(&dj, path); /* Follow the file path */
+ if (_FS_RPATH && res == FR_OK && (dj.fn[NS] & NS_DOT))
+ res = FR_INVALID_NAME; /* Cannot remove dot entry */
+#if _FS_SHARE
+ if (res == FR_OK) res = chk_lock(&dj, 2); /* Cannot remove open file */
+#endif
+ if (res == FR_OK) { /* The object is accessible */
+ dir = dj.dir;
+ if (!dir) {
+ res = FR_INVALID_NAME; /* Cannot remove the start directory */
+ } else {
+ if (dir[DIR_Attr] & AM_RDO)
+ res = FR_DENIED; /* Cannot remove R/O object */
+ }
+ dclst = LD_CLUST(dir);
+ if (res == FR_OK && (dir[DIR_Attr] & AM_DIR)) { /* Is it a sub-dir? */
+ if (dclst < 2) {
+ res = FR_INT_ERR;
+ } else {
+ mem_cpy(&sdj, &dj, sizeof(DIR)); /* Check if the sub-dir is empty or not */
+ sdj.sclust = dclst;
+ res = dir_sdi(&sdj, 2); /* Exclude dot entries */
+ if (res == FR_OK) {
+ res = dir_read(&sdj);
+ if (res == FR_OK /* Not empty dir */
+#if _FS_RPATH
+ || dclst == sdj.fs->cdir /* Current dir */
+#endif
+ ) res = FR_DENIED;
+ if (res == FR_NO_FILE) res = FR_OK; /* Empty */
+ }
+ }
+ }
+ if (res == FR_OK) {
+ res = dir_remove(&dj); /* Remove the directory entry */
+ if (res == FR_OK) {
+ if (dclst) /* Remove the cluster chain if exist */
+ res = remove_chain(dj.fs, dclst);
+ if (res == FR_OK) res = sync(dj.fs);
+ }
+ }
+ }
+ FREE_BUF();
+ }
+ LEAVE_FF(dj.fs, res);
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Create a Directory */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_mkdir (
+ const TCHAR *path /* Pointer to the directory path */
+)
+{
+ FRESULT res;
+ DIR dj;
+ BYTE *dir, n;
+ DWORD dsc, dcl, pcl, tim = get_fattime();
+ DEF_NAMEBUF;
+
+
+ res = chk_mounted(&path, &dj.fs, 1);
+ if (res == FR_OK) {
+ INIT_BUF(dj);
+ res = follow_path(&dj, path); /* Follow the file path */
+ if (res == FR_OK) res = FR_EXIST; /* Any object with same name is already existing */
+ if (_FS_RPATH && res == FR_NO_FILE && (dj.fn[NS] & NS_DOT))
+ res = FR_INVALID_NAME;
+ if (res == FR_NO_FILE) { /* Can create a new directory */
+ dcl = create_chain(dj.fs, 0); /* Allocate a cluster for the new directory table */
+ res = FR_OK;
+ if (dcl == 0) res = FR_DENIED; /* No space to allocate a new cluster */
+ if (dcl == 1) res = FR_INT_ERR;
+ if (dcl == 0xFFFFFFFF) res = FR_DISK_ERR;
+ if (res == FR_OK) /* Flush FAT */
+ res = move_window(dj.fs, 0);
+ if (res == FR_OK) { /* Initialize the new directory table */
+ dsc = clust2sect(dj.fs, dcl);
+ dir = dj.fs->win;
+ mem_set(dir, 0, SS(dj.fs));
+ mem_set(dir+DIR_Name, ' ', 8+3); /* Create "." entry */
+ dir[DIR_Name] = '.';
+ dir[DIR_Attr] = AM_DIR;
+ ST_DWORD(dir+DIR_WrtTime, tim);
+ ST_CLUST(dir, dcl);
+ mem_cpy(dir+SZ_DIR, dir, SZ_DIR); /* Create ".." entry */
+ dir[33] = '.'; pcl = dj.sclust;
+ if (dj.fs->fs_type == FS_FAT32 && pcl == dj.fs->dirbase)
+ pcl = 0;
+ ST_CLUST(dir+SZ_DIR, pcl);
+ for (n = dj.fs->csize; n; n--) { /* Write dot entries and clear following sectors */
+ dj.fs->winsect = dsc++;
+ dj.fs->wflag = 1;
+ res = move_window(dj.fs, 0);
+ if (res != FR_OK) break;
+ mem_set(dir, 0, SS(dj.fs));
+ }
+ }
+ if (res == FR_OK) res = dir_register(&dj); /* Register the object to the directoy */
+ if (res != FR_OK) {
+ remove_chain(dj.fs, dcl); /* Could not register, remove cluster chain */
+ } else {
+ dir = dj.dir;
+ dir[DIR_Attr] = AM_DIR; /* Attribute */
+ ST_DWORD(dir+DIR_WrtTime, tim); /* Created time */
+ ST_CLUST(dir, dcl); /* Table start cluster */
+ dj.fs->wflag = 1;
+ res = sync(dj.fs);
+ }
+ }
+ FREE_BUF();
+ }
+
+ LEAVE_FF(dj.fs, res);
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Change Attribute */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_chmod (
+ const TCHAR *path, /* Pointer to the file path */
+ BYTE value, /* Attribute bits */
+ BYTE mask /* Attribute mask to change */
+)
+{
+ FRESULT res;
+ DIR dj;
+ BYTE *dir;
+ DEF_NAMEBUF;
+
+
+ res = chk_mounted(&path, &dj.fs, 1);
+ if (res == FR_OK) {
+ INIT_BUF(dj);
+ res = follow_path(&dj, path); /* Follow the file path */
+ FREE_BUF();
+ if (_FS_RPATH && res == FR_OK && (dj.fn[NS] & NS_DOT))
+ res = FR_INVALID_NAME;
+ if (res == FR_OK) {
+ dir = dj.dir;
+ if (!dir) { /* Is it a root directory? */
+ res = FR_INVALID_NAME;
+ } else { /* File or sub directory */
+ mask &= AM_RDO|AM_HID|AM_SYS|AM_ARC; /* Valid attribute mask */
+ dir[DIR_Attr] = (value & mask) | (dir[DIR_Attr] & (BYTE)~mask); /* Apply attribute change */
+ dj.fs->wflag = 1;
+ res = sync(dj.fs);
+ }
+ }
+ }
+
+ LEAVE_FF(dj.fs, res);
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Change Timestamp */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_utime (
+ const TCHAR *path, /* Pointer to the file/directory name */
+ const FILINFO *fno /* Pointer to the time stamp to be set */
+)
+{
+ FRESULT res;
+ DIR dj;
+ BYTE *dir;
+ DEF_NAMEBUF;
+
+
+ res = chk_mounted(&path, &dj.fs, 1);
+ if (res == FR_OK) {
+ INIT_BUF(dj);
+ res = follow_path(&dj, path); /* Follow the file path */
+ FREE_BUF();
+ if (_FS_RPATH && res == FR_OK && (dj.fn[NS] & NS_DOT))
+ res = FR_INVALID_NAME;
+ if (res == FR_OK) {
+ dir = dj.dir;
+ if (!dir) { /* Root directory */
+ res = FR_INVALID_NAME;
+ } else { /* File or sub-directory */
+ ST_WORD(dir+DIR_WrtTime, fno->ftime);
+ ST_WORD(dir+DIR_WrtDate, fno->fdate);
+ dj.fs->wflag = 1;
+ res = sync(dj.fs);
+ }
+ }
+ }
+
+ LEAVE_FF(dj.fs, res);
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Rename File/Directory */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_rename (
+ const TCHAR *path_old, /* Pointer to the old name */
+ const TCHAR *path_new /* Pointer to the new name */
+)
+{
+ FRESULT res;
+ DIR djo, djn;
+ BYTE buf[21], *dir;
+ DWORD dw;
+ DEF_NAMEBUF;
+
+
+ res = chk_mounted(&path_old, &djo.fs, 1);
+ if (res == FR_OK) {
+ djn.fs = djo.fs;
+ INIT_BUF(djo);
+ res = follow_path(&djo, path_old); /* Check old object */
+ if (_FS_RPATH && res == FR_OK && (djo.fn[NS] & NS_DOT))
+ res = FR_INVALID_NAME;
+#if _FS_SHARE
+ if (res == FR_OK) res = chk_lock(&djo, 2);
+#endif
+ if (res == FR_OK) { /* Old object is found */
+ if (!djo.dir) { /* Is root dir? */
+ res = FR_NO_FILE;
+ } else {
+ mem_cpy(buf, djo.dir+DIR_Attr, 21); /* Save the object information except for name */
+ mem_cpy(&djn, &djo, sizeof(DIR)); /* Check new object */
+ res = follow_path(&djn, path_new);
+ if (res == FR_OK) res = FR_EXIST; /* The new object name is already existing */
+ if (res == FR_NO_FILE) { /* Is it a valid path and no name collision? */
+/* Start critical section that any interruption or error can cause cross-link */
+ res = dir_register(&djn); /* Register the new entry */
+ if (res == FR_OK) {
+ dir = djn.dir; /* Copy object information except for name */
+ mem_cpy(dir+13, buf+2, 19);
+ dir[DIR_Attr] = buf[0] | AM_ARC;
+ djo.fs->wflag = 1;
+ if (djo.sclust != djn.sclust && (dir[DIR_Attr] & AM_DIR)) { /* Update .. entry in the directory if needed */
+ dw = clust2sect(djn.fs, LD_CLUST(dir));
+ if (!dw) {
+ res = FR_INT_ERR;
+ } else {
+ res = move_window(djn.fs, dw);
+ dir = djn.fs->win+SZ_DIR; /* .. entry */
+ if (res == FR_OK && dir[1] == '.') {
+ dw = (djn.fs->fs_type == FS_FAT32 && djn.sclust == djn.fs->dirbase) ? 0 : djn.sclust;
+ ST_CLUST(dir, dw);
+ djn.fs->wflag = 1;
+ }
+ }
+ }
+ if (res == FR_OK) {
+ res = dir_remove(&djo); /* Remove old entry */
+ if (res == FR_OK)
+ res = sync(djo.fs);
+ }
+ }
+/* End critical section */
+ }
+ }
+ }
+ FREE_BUF();
+ }
+ LEAVE_FF(djo.fs, res);
+}
+
+#endif /* !_FS_READONLY */
+#endif /* _FS_MINIMIZE == 0 */
+#endif /* _FS_MINIMIZE <= 1 */
+#endif /* _FS_MINIMIZE <= 2 */
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Forward data to the stream directly (available on only tiny cfg) */
+/*-----------------------------------------------------------------------*/
+#if _USE_FORWARD && _FS_TINY
+
+FRESULT f_forward (
+ FIL *fp, /* Pointer to the file object */
+ UINT (*func)(const BYTE*,UINT), /* Pointer to the streaming function */
+ UINT btr, /* Number of bytes to forward */
+ UINT *bf /* Pointer to number of bytes forwarded */
+)
+{
+ FRESULT res;
+ DWORD remain, clst, sect;
+ UINT rcnt;
+ BYTE csect;
+
+
+ *bf = 0; /* Initialize byte counter */
+
+ res = validate(fp->fs, fp->id); /* Check validity of the object */
+ if (res != FR_OK) LEAVE_FF(fp->fs, res);
+ if (fp->flag & FA__ERROR) /* Check error flag */
+ LEAVE_FF(fp->fs, FR_INT_ERR);
+ if (!(fp->flag & FA_READ)) /* Check access mode */
+ LEAVE_FF(fp->fs, FR_DENIED);
+
+ remain = fp->fsize - fp->fptr;
+ if (btr > remain) btr = (UINT)remain; /* Truncate btr by remaining bytes */
+
+ for ( ; btr && (*func)(0, 0); /* Repeat until all data transferred or stream becomes busy */
+ fp->fptr += rcnt, *bf += rcnt, btr -= rcnt) {
+ csect = (BYTE)(fp->fptr / SS(fp->fs) & (fp->fs->csize - 1)); /* Sector offset in the cluster */
+ if ((fp->fptr % SS(fp->fs)) == 0) { /* On the sector boundary? */
+ if (!csect) { /* On the cluster boundary? */
+ clst = (fp->fptr == 0) ? /* On the top of the file? */
+ fp->sclust : get_fat(fp->fs, fp->clust);
+ if (clst <= 1) ABORT(fp->fs, FR_INT_ERR);
+ if (clst == 0xFFFFFFFF) ABORT(fp->fs, FR_DISK_ERR);
+ fp->clust = clst; /* Update current cluster */
+ }
+ }
+ sect = clust2sect(fp->fs, fp->clust); /* Get current data sector */
+ if (!sect) ABORT(fp->fs, FR_INT_ERR);
+ sect += csect;
+ if (move_window(fp->fs, sect)) /* Move sector window */
+ ABORT(fp->fs, FR_DISK_ERR);
+ fp->dsect = sect;
+ rcnt = SS(fp->fs) - (WORD)(fp->fptr % SS(fp->fs)); /* Forward data from sector window */
+ if (rcnt > btr) rcnt = btr;
+ rcnt = (*func)(&fp->fs->win[(WORD)fp->fptr % SS(fp->fs)], rcnt);
+ if (!rcnt) ABORT(fp->fs, FR_INT_ERR);
+ }
+
+ LEAVE_FF(fp->fs, FR_OK);
+}
+#endif /* _USE_FORWARD */
+
+
+
+#if _USE_MKFS && !_FS_READONLY
+/*-----------------------------------------------------------------------*/
+/* Create File System on the Drive */
+/*-----------------------------------------------------------------------*/
+#define N_ROOTDIR 512 /* Number of root dir entries for FAT12/16 */
+#define N_FATS 1 /* Number of FAT copies (1 or 2) */
+
+
+FRESULT f_mkfs (
+ BYTE drv, /* Logical drive number */
+ BYTE sfd, /* Partitioning rule 0:FDISK, 1:SFD */
+ UINT au /* Allocation unit size [bytes] */
+)
+{
+ static const WORD vst[] = { 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 0};
+ static const WORD cst[] = {32768, 16384, 8192, 4096, 2048, 16384, 8192, 4096, 2048, 1024, 512};
+ BYTE fmt, md, *tbl;
+ DWORD n_clst, vs, n, wsect;
+ UINT i;
+ DWORD b_vol, b_fat, b_dir, b_data; /* Offset (LBA) */
+ DWORD n_vol, n_rsv, n_fat, n_dir; /* Size */
+ FATFS *fs;
+ DSTATUS stat;
+
+
+ /* Check mounted drive and clear work area */
+ if (drv >= _VOLUMES) return FR_INVALID_DRIVE;
+ fs = FatFs[drv];
+ if (!fs) return FR_NOT_ENABLED;
+ fs->fs_type = 0;
+ drv = LD2PD(drv);
+
+ /* Get disk statics */
+ stat = disk_initialize(drv);
+ if (stat & STA_NOINIT) return FR_NOT_READY;
+ if (stat & STA_PROTECT) return FR_WRITE_PROTECTED;
+#if _MAX_SS != 512 /* Get disk sector size */
+ if (disk_ioctl(drv, GET_SECTOR_SIZE, &SS(fs)) != RES_OK)
+ return FR_DISK_ERR;
+#endif
+ if (disk_ioctl(drv, GET_SECTOR_COUNT, &n_vol) != RES_OK || n_vol < 128)
+ return FR_DISK_ERR;
+ b_vol = (sfd) ? 0 : 63; /* Volume start sector */
+ n_vol -= b_vol;
+ if (au & (au - 1)) au = 0; /* Check validity of the AU size */
+ if (!au) { /* AU auto selection */
+ vs = n_vol / (2000 / (SS(fs) / 512));
+ for (i = 0; vs < vst[i]; i++) ;
+ au = cst[i];
+ }
+ au /= SS(fs); /* Number of sectors per cluster */
+ if (au == 0) au = 1;
+ if (au > 128) au = 128;
+
+ /* Pre-compute number of clusters and FAT syb-type */
+ n_clst = n_vol / au;
+ fmt = FS_FAT12;
+ if (n_clst >= MIN_FAT16) fmt = FS_FAT16;
+ if (n_clst >= MIN_FAT32) fmt = FS_FAT32;
+
+ /* Determine offset and size of FAT structure */
+ if (fmt == FS_FAT32) {
+ n_fat = ((n_clst * 4) + 8 + SS(fs) - 1) / SS(fs);
+ n_rsv = 32;
+ n_dir = 0;
+ } else {
+ n_fat = (fmt == FS_FAT12) ? (n_clst * 3 + 1) / 2 + 3 : (n_clst * 2) + 4;
+ n_fat = (n_fat + SS(fs) - 1) / SS(fs);
+ n_rsv = 1;
+ n_dir = (DWORD)N_ROOTDIR * SZ_DIR / SS(fs);
+ }
+ b_fat = b_vol + n_rsv; /* FAT area start sector */
+ b_dir = b_fat + n_fat * N_FATS; /* Directory area start sector */
+ b_data = b_dir + n_dir; /* Data area start sector */
+ if (n_vol < b_data + au) return FR_MKFS_ABORTED; /* Too small volume */
+
+ /* Align data start sector to erase block boundary (for flash memory media) */
+ if (disk_ioctl(drv, GET_BLOCK_SIZE, &n) != RES_OK || !n || n > 32768) n = 1;
+ n = (b_data + n - 1) & ~(n - 1); /* Next nearest erase block from current data start */
+ n = (n - b_data) / N_FATS;
+ if (fmt == FS_FAT32) { /* FAT32: Move FAT offset */
+ n_rsv += n;
+ b_fat += n;
+ } else { /* FAT12/16: Expand FAT size */
+ n_fat += n;
+ }
+
+ /* Determine number of clusters and final check of validity of the FAT sub-type */
+ n_clst = (n_vol - n_rsv - n_fat * N_FATS - n_dir) / au;
+ if ( (fmt == FS_FAT16 && n_clst < MIN_FAT16)
+ || (fmt == FS_FAT32 && n_clst < MIN_FAT32))
+ return FR_MKFS_ABORTED;
+
+ /* Create partition table if required */
+ if (sfd) { /* No patition table (SFD) */
+ md = 0xF0;
+ } else { /* With patition table (FDISK) */
+ DWORD n_disk = b_vol + n_vol;
+
+ mem_set(fs->win, 0, SS(fs));
+ tbl = fs->win+MBR_Table;
+ ST_DWORD(tbl, 0x00010180); /* Partition start in CHS */
+ if (n_disk < 63UL * 255 * 1024) { /* Partition end in CHS */
+ n_disk = n_disk / 63 / 255;
+ tbl[7] = (BYTE)n_disk;
+ tbl[6] = (BYTE)((n_disk >> 2) | 63);
+ } else {
+ ST_WORD(&tbl[6], 0xFFFF); /* CHS saturated */
+ }
+ tbl[5] = 254;
+ if (fmt != FS_FAT32) /* System ID */
+ tbl[4] = (n_vol < 0x10000) ? 0x04 : 0x06;
+ else
+ tbl[4] = 0x0c;
+ ST_DWORD(tbl+8, 63); /* Partition start in LBA */
+ ST_DWORD(tbl+12, n_vol); /* Partition size in LBA */
+ ST_WORD(fs->win+BS_55AA, 0xAA55); /* MBR signature */
+ if (disk_write(drv, fs->win, 0, 1) != RES_OK) /* Put the MBR into first physical sector */
+ return FR_DISK_ERR;
+ md = 0xF8;
+ }
+
+ /* Create volume boot record */
+ tbl = fs->win; /* Clear sector */
+ mem_set(tbl, 0, SS(fs));
+ mem_cpy(tbl, "\xEB\xFE\x90" "MSDOS5.0", 11);/* Boot jump code, OEM name */
+ i = SS(fs); /* Sector size */
+ ST_WORD(tbl+BPB_BytsPerSec, i);
+ tbl[BPB_SecPerClus] = (BYTE)au; /* Sectors per cluster */
+ ST_WORD(tbl+BPB_RsvdSecCnt, n_rsv); /* Reserved sectors */
+ tbl[BPB_NumFATs] = N_FATS; /* Number of FATs */
+ i = (fmt == FS_FAT32) ? 0 : N_ROOTDIR; /* Number of rootdir entries */
+ ST_WORD(tbl+BPB_RootEntCnt, i);
+ if (n_vol < 0x10000) { /* Number of total sectors */
+ ST_WORD(tbl+BPB_TotSec16, n_vol);
+ } else {
+ ST_DWORD(tbl+BPB_TotSec32, n_vol);
+ }
+ tbl[BPB_Media] = md; /* Media descriptor */
+ ST_WORD(tbl+BPB_SecPerTrk, 63); /* Number of sectors per track */
+ ST_WORD(tbl+BPB_NumHeads, 255); /* Number of heads */
+ ST_DWORD(tbl+BPB_HiddSec, b_vol); /* Hidden sectors */
+ n = get_fattime(); /* Use current time as VSN */
+ if (fmt == FS_FAT32) {
+ ST_DWORD(tbl+BS_VolID32, n); /* VSN */
+ ST_DWORD(tbl+BPB_FATSz32, n_fat); /* Number of sectors per FAT */
+ ST_DWORD(tbl+BPB_RootClus, 2); /* Root directory start cluster (2) */
+ ST_WORD(tbl+BPB_FSInfo, 1); /* FSInfo record offset (VBR+1) */
+ ST_WORD(tbl+BPB_BkBootSec, 6); /* Backup boot record offset (VBR+6) */
+ tbl[BS_DrvNum32] = 0x80; /* Drive number */
+ tbl[BS_BootSig32] = 0x29; /* Extended boot signature */
+ mem_cpy(tbl+BS_VolLab32, "NO NAME " "FAT32 ", 19); /* Volume label, FAT signature */
+ } else {
+ ST_DWORD(tbl+BS_VolID, n); /* VSN */
+ ST_WORD(tbl+BPB_FATSz16, n_fat); /* Number of sectors per FAT */
+ tbl[BS_DrvNum] = 0x80; /* Drive number */
+ tbl[BS_BootSig] = 0x29; /* Extended boot signature */
+ mem_cpy(tbl+BS_VolLab, "NO NAME " "FAT ", 19); /* Volume label, FAT signature */
+ }
+ ST_WORD(tbl+BS_55AA, 0xAA55); /* Signature (Offset is fixed here regardless of sector size) */
+ if (disk_write(drv, tbl, b_vol, 1) != RES_OK) /* Write VBR */
+ return FR_DISK_ERR;
+ if (fmt == FS_FAT32) /* Write backup VBR if needed (VBR+6) */
+ disk_write(drv, tbl, b_vol + 6, 1);
+
+ /* Initialize FAT area */
+ wsect = b_fat;
+ for (i = 0; i < N_FATS; i++) { /* Initialize each FAT copy */
+ mem_set(tbl, 0, SS(fs)); /* 1st sector of the FAT */
+ n = md; /* Media descriptor byte */
+ if (fmt != FS_FAT32) {
+ n |= (fmt == FS_FAT12) ? 0x00FFFF00 : 0xFFFFFF00;
+ ST_DWORD(tbl+0, n); /* Reserve cluster #0-1 (FAT12/16) */
+ } else {
+ n |= 0xFFFFFF00;
+ ST_DWORD(tbl+0, n); /* Reserve cluster #0-1 (FAT32) */
+ ST_DWORD(tbl+4, 0xFFFFFFFF);
+ ST_DWORD(tbl+8, 0x0FFFFFFF); /* Reserve cluster #2 for root dir */
+ }
+ if (disk_write(drv, tbl, wsect++, 1) != RES_OK)
+ return FR_DISK_ERR;
+ mem_set(tbl, 0, SS(fs)); /* Fill following FAT entries with zero */
+ for (n = 1; n < n_fat; n++) { /* This loop may take a time on FAT32 volume due to many single sector writes */
+ if (disk_write(drv, tbl, wsect++, 1) != RES_OK)
+ return FR_DISK_ERR;
+ }
+ }
+
+ /* Initialize root directory */
+ i = (fmt == FS_FAT32) ? au : n_dir;
+ do {
+ if (disk_write(drv, tbl, wsect++, 1) != RES_OK)
+ return FR_DISK_ERR;
+ } while (--i);
+
+#if _USE_ERASE /* Erase data area if needed */
+ {
+ DWORD eb[2];
+
+ eb[0] = wsect; eb[1] = wsect + (n_clst - ((fmt == FS_FAT32) ? 1 : 0)) * au - 1;
+ disk_ioctl(drv, CTRL_ERASE_SECTOR, eb);
+ }
+#endif
+
+ /* Create FSInfo if needed */
+ if (fmt == FS_FAT32) {
+ ST_DWORD(tbl+FSI_LeadSig, 0x41615252);
+ ST_DWORD(tbl+FSI_StrucSig, 0x61417272);
+ ST_DWORD(tbl+FSI_Free_Count, n_clst - 1); /* Number of free clusters */
+ ST_DWORD(tbl+FSI_Nxt_Free, 2); /* Last allocated cluster# */
+ ST_WORD(tbl+BS_55AA, 0xAA55);
+ disk_write(drv, tbl, b_vol + 1, 1); /* Write original (VBR+1) */
+ disk_write(drv, tbl, b_vol + 7, 1); /* Write backup (VBR+7) */
+ }
+
+ return (disk_ioctl(drv, CTRL_SYNC, (void*)0) == RES_OK) ? FR_OK : FR_DISK_ERR;
+}
+
+#endif /* _USE_MKFS && !_FS_READONLY */
+
+
+
+
+#if _USE_STRFUNC
+/*-----------------------------------------------------------------------*/
+/* Get a string from the file */
+/*-----------------------------------------------------------------------*/
+TCHAR* f_gets (
+ TCHAR* buff, /* Pointer to the string buffer to read */
+ int len, /* Size of string buffer (characters) */
+ FIL* fil /* Pointer to the file object */
+)
+{
+ int n = 0;
+ TCHAR c, *p = buff;
+ BYTE s[2];
+ UINT rc;
+
+
+ while (n < len - 1) { /* Read bytes until buffer gets filled */
+ f_read(fil, s, 1, &rc);
+ if (rc != 1) break; /* Break on EOF or error */
+ c = s[0];
+#if _LFN_UNICODE /* Read a character in UTF-8 encoding */
+ if (c >= 0x80) {
+ if (c < 0xC0) continue; /* Skip stray trailer */
+ if (c < 0xE0) { /* Two-byte sequense */
+ f_read(fil, s, 1, &rc);
+ if (rc != 1) break;
+ c = ((c & 0x1F) << 6) | (s[0] & 0x3F);
+ if (c < 0x80) c = '?';
+ } else {
+ if (c < 0xF0) { /* Three-byte sequense */
+ f_read(fil, s, 2, &rc);
+ if (rc != 2) break;
+ c = (c << 12) | ((s[0] & 0x3F) << 6) | (s[1] & 0x3F);
+ if (c < 0x800) c = '?';
+ } else { /* Reject four-byte sequense */
+ c = '?';
+ }
+ }
+ }
+#endif
+#if _USE_STRFUNC >= 2
+ if (c == '\r') continue; /* Strip '\r' */
+#endif
+ *p++ = c;
+ n++;
+ if (c == '\n') break; /* Break on EOL */
+ }
+ *p = 0;
+ return n ? buff : 0; /* When no data read (eof or error), return with error. */
+}
+
+
+
+#if !_FS_READONLY
+#include <stdarg.h>
+/*-----------------------------------------------------------------------*/
+/* Put a character to the file */
+/*-----------------------------------------------------------------------*/
+int f_putc (
+ TCHAR c, /* A character to be output */
+ FIL* fil /* Pointer to the file object */
+)
+{
+ UINT bw, btw;
+ BYTE s[3];
+
+
+#if _USE_STRFUNC >= 2
+ if (c == '\n') f_putc ('\r', fil); /* LF -> CRLF conversion */
+#endif
+
+#if _LFN_UNICODE /* Write the character in UTF-8 encoding */
+ if (c < 0x80) { /* 7-bit */
+ s[0] = (BYTE)c;
+ btw = 1;
+ } else {
+ if (c < 0x800) { /* 11-bit */
+ s[0] = (BYTE)(0xC0 | (c >> 6));
+ s[1] = (BYTE)(0x80 | (c & 0x3F));
+ btw = 2;
+ } else { /* 16-bit */
+ s[0] = (BYTE)(0xE0 | (c >> 12));
+ s[1] = (BYTE)(0x80 | ((c >> 6) & 0x3F));
+ s[2] = (BYTE)(0x80 | (c & 0x3F));
+ btw = 3;
+ }
+ }
+#else /* Write the character without conversion */
+ s[0] = (BYTE)c;
+ btw = 1;
+#endif
+ f_write(fil, s, btw, &bw); /* Write the char to the file */
+ return (bw == btw) ? 1 : EOF; /* Return the result */
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Put a string to the file */
+/*-----------------------------------------------------------------------*/
+int f_puts (
+ const TCHAR* str, /* Pointer to the string to be output */
+ FIL* fil /* Pointer to the file object */
+)
+{
+ int n;
+
+
+ for (n = 0; *str; str++, n++) {
+ if (f_putc(*str, fil) == EOF) return EOF;
+ }
+ return n;
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Put a formatted string to the file */
+/*-----------------------------------------------------------------------*/
+int f_printf (
+ FIL* fil, /* Pointer to the file object */
+ const TCHAR* str, /* Pointer to the format string */
+ ... /* Optional arguments... */
+)
+{
+ va_list arp;
+ BYTE f, r;
+ UINT i, j, w;
+ ULONG v;
+ TCHAR c, d, s[16], *p;
+ int res, cc;
+
+
+ va_start(arp, str);
+
+ for (cc = res = 0; cc != EOF; res += cc) {
+ c = *str++;
+ if (c == 0) break; /* End of string */
+ if (c != '%') { /* Non escape character */
+ cc = f_putc(c, fil);
+ if (cc != EOF) cc = 1;
+ continue;
+ }
+ w = f = 0;
+ c = *str++;
+ if (c == '0') { /* Flag: '0' padding */
+ f = 1; c = *str++;
+ } else {
+ if (c == '-') { /* Flag: left justified */
+ f = 2; c = *str++;
+ }
+ }
+ while (IsDigit(c)) { /* Precision */
+ w = w * 10 + c - '0';
+ c = *str++;
+ }
+ if (c == 'l' || c == 'L') { /* Prefix: Size is long int */
+ f |= 4; c = *str++;
+ }
+ if (!c) break;
+ d = c;
+ if (IsLower(d)) d -= 0x20;
+ switch (d) { /* Type is... */
+ case 'S' : /* String */
+ p = va_arg(arp, TCHAR*);
+ for (j = 0; p[j]; j++) ;
+ res = 0;
+ while (!(f & 2) && j++ < w) res += (cc = f_putc(' ', fil));
+ res += (cc = f_puts(p, fil));
+ while (j++ < w) res += (cc = f_putc(' ', fil));
+ if (cc != EOF) cc = res;
+ continue;
+ case 'C' : /* Character */
+ cc = f_putc((TCHAR)va_arg(arp, int), fil); continue;
+ case 'B' : /* Binary */
+ r = 2; break;
+ case 'O' : /* Octal */
+ r = 8; break;
+ case 'D' : /* Signed decimal */
+ case 'U' : /* Unsigned decimal */
+ r = 10; break;
+ case 'X' : /* Hexdecimal */
+ r = 16; break;
+ default: /* Unknown type (passthrough) */
+ cc = f_putc(c, fil); continue;
+ }
+
+ /* Get an argument and put it in numeral */
+ v = (f & 4) ? va_arg(arp, long) : ((d == 'D') ? (long)va_arg(arp, int) : va_arg(arp, unsigned int));
+ if (d == 'D' && (v & 0x80000000)) {
+ v = 0 - v;
+ f |= 8;
+ }
+ i = 0;
+ do {
+ d = (TCHAR)(v % r); v /= r;
+ if (d > 9) d += (c == 'x') ? 0x27 : 0x07;
+ s[i++] = d + '0';
+ } while (v && i < sizeof(s) / sizeof(s[0]));
+ if (f & 8) s[i++] = '-';
+ j = i; d = (f & 1) ? '0' : ' ';
+ res = 0;
+ while (!(f & 2) && j++ < w) res += (cc = f_putc(d, fil));
+ do res += (cc = f_putc(s[--i], fil)); while(i);
+ while (j++ < w) res += (cc = f_putc(' ', fil));
+ if (cc != EOF) cc = res;
+ }
+
+ va_end(arp);
+ return (cc == EOF) ? cc : res;
+}
+
+#endif /* !_FS_READONLY */
+#endif /* _USE_STRFUNC */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/ff.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/ff.h
new file mode 100644
index 0000000..776a78f
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/ff.h
@@ -0,0 +1,529 @@
+/*---------------------------------------------------------------------------/
+/ FatFs - FAT file system module include file R0.08b (C)ChaN, 2011
+/----------------------------------------------------------------------------/
+/ FatFs module is a generic FAT file system module for small embedded systems.
+/ This is a free software that opened for education, research and commercial
+/ developments under license policy of following trems.
+/
+/ Copyright (C) 2011, ChaN, all right reserved.
+/
+/ * The FatFs module is a free software and there is NO WARRANTY.
+/ * No restriction on use. You can use, modify and redistribute it for
+/ personal, non-profit or commercial product UNDER YOUR RESPONSIBILITY.
+/ * Redistributions of source code must retain the above copyright notice.
+/
+/----------------------------------------------------------------------------*/
+
+#ifndef _FATFS
+#define _FATFS 8237 /* Revision ID */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "integer.h" /* Basic integer types */
+#include "ffconf.h" /* FatFs configuration options */
+
+#if _FATFS != _FFCONF
+#error Wrong configuration file (ffconf.h).
+#endif
+
+/* Moved DBCS code from ff.c, by ATMEL */
+/* DBCS code ranges and SBCS extend char conversion table */
+
+#if _CODE_PAGE == 932 /* Japanese Shift-JIS */
+#define _DF1S 0x81 /* DBC 1st byte range 1 start */
+#define _DF1E 0x9F /* DBC 1st byte range 1 end */
+#define _DF2S 0xE0 /* DBC 1st byte range 2 start */
+#define _DF2E 0xFC /* DBC 1st byte range 2 end */
+#define _DS1S 0x40 /* DBC 2nd byte range 1 start */
+#define _DS1E 0x7E /* DBC 2nd byte range 1 end */
+#define _DS2S 0x80 /* DBC 2nd byte range 2 start */
+#define _DS2E 0xFC /* DBC 2nd byte range 2 end */
+
+#elif _CODE_PAGE == 936 /* Simplified Chinese GBK */
+#define _DF1S 0x81
+#define _DF1E 0xFE
+#define _DS1S 0x40
+#define _DS1E 0x7E
+#define _DS2S 0x80
+#define _DS2E 0xFE
+
+#elif _CODE_PAGE == 949 /* Korean */
+#define _DF1S 0x81
+#define _DF1E 0xFE
+#define _DS1S 0x41
+#define _DS1E 0x5A
+#define _DS2S 0x61
+#define _DS2E 0x7A
+#define _DS3S 0x81
+#define _DS3E 0xFE
+
+#elif _CODE_PAGE == 950 /* Traditional Chinese Big5 */
+#define _DF1S 0x81
+#define _DF1E 0xFE
+#define _DS1S 0x40
+#define _DS1E 0x7E
+#define _DS2S 0xA1
+#define _DS2E 0xFE
+
+#elif _CODE_PAGE == 437 /* U.S. (OEM) */
+#define _DF1S 0
+#define _EXCVT {0x80,0x9A,0x90,0x41,0x8E,0x41,0x8F,0x80,0x45,0x45,0x45,0x49,0x49,0x49,0x8E,0x8F,0x90,0x92,0x92,0x4F,0x99,0x4F,0x55,0x55,0x59,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \
+ 0x41,0x49,0x4F,0x55,0xA5,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0x21,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \
+ 0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF}
+
+#elif _CODE_PAGE == 720 /* Arabic (OEM) */
+#define _DF1S 0
+#define _EXCVT {0x80,0x81,0x45,0x41,0x84,0x41,0x86,0x43,0x45,0x45,0x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ODE_PAGE == 866 /* Russian (OEM) */
+#define _DF1S 0
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \
+ 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \
+ 0x90,0x91,0x92,0x93,0x9d,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,0xF0,0xF0,0xF2,0xF2,0xF4,0xF4,0xF6,0xF6,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF}
+
+#elif _CODE_PAGE == 874 /* Thai (OEM, Windows) */
+#define _DF1S 0
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \
+ 0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \
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BC,0xFD,0xBF,0xFF}
+
+#elif _CODE_PAGE == 1254 /* Turkish (Windows) */
+#define _DF1S 0
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x8A,0x9B,0x8C,0x9D,0x9E,0x9F, \
+ 0xA0,0x21,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0x9F}
+
+#elif _CODE_PAGE == 1255 /* Hebrew (Windows) */
+#define _DF1S 0
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \
+ 0xA0,0x21,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0x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A,0x55,0x55,0xFD,0xFE,0xFF}
+
+#elif _CODE_PAGE == 1257 /* Baltic (Windows) */
+#define _DF1S 0
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \
+ 0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xA8,0xB9,0xAA,0xBB,0xBC,0xBD,0xBE,0xAF, \
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF}
+
+#elif _CODE_PAGE == 1258 /* Vietnam (OEM, Windows) */
+#define _DF1S 0
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0xAC,0x9D,0x9E,0x9F, \
+ 0xA0,0x21,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xEC,0xCD,0xCE,0xCF,0xD0,0xD1,0xF2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xFE,0x9F}
+
+#elif _CODE_PAGE == 1 /* ASCII (for only non-LFN cfg) */
+#define _DF1S 0
+
+#else
+#error Unknown code page
+
+#endif
+
+
+
+/* Definitions of volume management */
+
+#if _MULTI_PARTITION /* Multiple partition configuration */
+#define LD2PD(vol) (VolToPart[vol].pd) /* Get physical drive# */
+#define LD2PT(vol) (VolToPart[vol].pt) /* Get partition# */
+typedef struct {
+ BYTE pd; /* Physical drive# */
+ BYTE pt; /* Partition # (0-3) */
+} PARTITION;
+extern const PARTITION VolToPart[]; /* Volume - Physical location resolution table */
+
+#else /* Single partition configuration */
+#define LD2PD(vol) (vol) /* Logical drive# is bound to the same physical drive# */
+#define LD2PT(vol) 0 /* Always mounts the 1st partition */
+
+#endif
+
+
+
+/* Type of path name strings on FatFs API */
+
+#if _LFN_UNICODE /* Unicode string */
+#if !_USE_LFN
+#error _LFN_UNICODE must be 0 in non-LFN cfg.
+#endif
+#ifndef _INC_TCHAR
+typedef WCHAR TCHAR;
+#define _T(x) L ## x
+#define _TEXT(x) L ## x
+#endif
+
+#else /* ANSI/OEM string */
+#ifndef _INC_TCHAR
+typedef char TCHAR;
+#define _T(x) x
+#define _TEXT(x) x
+#endif
+
+#endif
+
+
+
+/* File system object structure (FATFS) */
+
+typedef struct {
+ BYTE fs_type; /* FAT sub-type (0:Not mounted) */
+ BYTE drv; /* Physical drive number */
+ BYTE csize; /* Sectors per cluster (1,2,4...128) */
+ BYTE n_fats; /* Number of FAT copies (1,2) */
+ BYTE wflag; /* win[] dirty flag (1:must be written back) */
+ BYTE fsi_flag; /* fsinfo dirty flag (1:must be written back) */
+ WORD id; /* File system mount ID */
+ WORD n_rootdir; /* Number of root directory entries (FAT12/16) */
+#if _MAX_SS != 512
+ WORD ssize; /* Bytes per sector (512,1024,2048,4096) */
+#endif
+#if _FS_REENTRANT
+ _SYNC_t sobj; /* Identifier of sync object */
+#endif
+#if !_FS_READONLY
+ DWORD last_clust; /* Last allocated cluster */
+ DWORD free_clust; /* Number of free clusters */
+ DWORD fsi_sector; /* fsinfo sector (FAT32) */
+#endif
+#if _FS_RPATH
+ DWORD cdir; /* Current directory start cluster (0:root) */
+#endif
+ DWORD n_fatent; /* Number of FAT entries (= number of clusters + 2) */
+ DWORD fsize; /* Sectors per FAT */
+ DWORD fatbase; /* FAT start sector */
+ DWORD dirbase; /* Root directory start sector (FAT32:Cluster#) */
+ DWORD database; /* Data start sector */
+ DWORD winsect; /* Current sector appearing in the win[] */
+ BYTE win[_MAX_SS]; /* Disk access window for Directory, FAT (and Data on tiny cfg) */
+} FATFS;
+
+
+
+/* File object structure (FIL) */
+
+typedef struct {
+ FATFS* fs; /* Pointer to the owner file system object */
+ WORD id; /* Owner file system mount ID */
+ BYTE flag; /* File status flags */
+ BYTE pad1;
+ DWORD fptr; /* File read/write pointer (0 on file open) */
+ DWORD fsize; /* File size */
+ DWORD sclust; /* File start cluster (0 when fsize==0) */
+ DWORD clust; /* Current cluster */
+ DWORD dsect; /* Current data sector */
+#if !_FS_READONLY
+ DWORD dir_sect; /* Sector containing the directory entry */
+ BYTE* dir_ptr; /* Ponter to the directory entry in the window */
+#endif
+#if _USE_FASTSEEK
+ DWORD* cltbl; /* Pointer to the cluster link map table (null on file open) */
+#endif
+#if _FS_SHARE
+ UINT lockid; /* File lock ID (index of file semaphore table) */
+#endif
+#if !_FS_TINY
+ BYTE buf[_MAX_SS]; /* File data read/write buffer */
+#endif
+} FIL;
+
+
+
+/* Directory object structure (DIR) */
+
+typedef struct {
+ FATFS* fs; /* Pointer to the owner file system object */
+ WORD id; /* Owner file system mount ID */
+ WORD index; /* Current read/write index number */
+ DWORD sclust; /* Table start cluster (0:Root dir) */
+ DWORD clust; /* Current cluster */
+ DWORD sect; /* Current sector */
+ BYTE* dir; /* Pointer to the current SFN entry in the win[] */
+ BYTE* fn; /* Pointer to the SFN (in/out) {file[8],ext[3],status[1]} */
+#if _USE_LFN
+ WCHAR* lfn; /* Pointer to the LFN working buffer */
+ WORD lfn_idx; /* Last matched LFN index number (0xFFFF:No LFN) */
+#endif
+} DIR;
+
+
+
+/* File status structure (FILINFO) */
+
+typedef struct {
+ DWORD fsize; /* File size */
+ WORD fdate; /* Last modified date */
+ WORD ftime; /* Last modified time */
+ BYTE fattrib; /* Attribute */
+ TCHAR fname[13]; /* Short file name (8.3 format) */
+#if _USE_LFN
+ TCHAR* lfname; /* Pointer to the LFN buffer */
+ UINT lfsize; /* Size of LFN buffer in TCHAR */
+#endif
+} FILINFO;
+
+
+
+/* File function return code (FRESULT) */
+
+typedef enum {
+ FR_OK = 0, /* (0) Succeeded */
+ FR_DISK_ERR, /* (1) A hard error occured in the low level disk I/O layer */
+ FR_INT_ERR, /* (2) Assertion failed */
+ FR_NOT_READY, /* (3) The physical drive cannot work */
+ FR_NO_FILE, /* (4) Could not find the file */
+ FR_NO_PATH, /* (5) Could not find the path */
+ FR_INVALID_NAME, /* (6) The path name format is invalid */
+ FR_DENIED, /* (7) Acces denied due to prohibited access or directory full */
+ FR_EXIST, /* (8) Acces denied due to prohibited access */
+ FR_INVALID_OBJECT, /* (9) The file/directory object is invalid */
+ FR_WRITE_PROTECTED, /* (10) The physical drive is write protected */
+ FR_INVALID_DRIVE, /* (11) The logical drive number is invalid */
+ FR_NOT_ENABLED, /* (12) The volume has no work area */
+ FR_NO_FILESYSTEM, /* (13) There is no valid FAT volume on the physical drive */
+ FR_MKFS_ABORTED, /* (14) The f_mkfs() aborted due to any parameter error */
+ FR_TIMEOUT, /* (15) Could not get a grant to access the volume within defined period */
+ FR_LOCKED, /* (16) The operation is rejected according to the file shareing policy */
+ FR_NOT_ENOUGH_CORE, /* (17) LFN working buffer could not be allocated */
+ FR_TOO_MANY_OPEN_FILES /* (18) Number of open files > _FS_SHARE */
+} FRESULT;
+
+
+
+/*--------------------------------------------------------------*/
+/* FatFs module application interface */
+
+FRESULT f_mount (BYTE, FATFS*); /* Mount/Unmount a logical drive */
+FRESULT f_open (FIL*, const TCHAR*, BYTE); /* Open or create a file */
+FRESULT f_read (FIL*, void*, UINT, UINT*); /* Read data from a file */
+FRESULT f_lseek (FIL*, DWORD); /* Move file pointer of a file object */
+FRESULT f_close (FIL*); /* Close an open file object */
+FRESULT f_opendir (DIR*, const TCHAR*); /* Open an existing directory */
+FRESULT f_readdir (DIR*, FILINFO*); /* Read a directory item */
+FRESULT f_stat (const TCHAR*, FILINFO*); /* Get file status */
+FRESULT f_write (FIL*, const void*, UINT, UINT*); /* Write data to a file */
+FRESULT f_getfree (const TCHAR*, DWORD*, FATFS**); /* Get number of free clusters on the drive */
+FRESULT f_truncate (FIL*); /* Truncate file */
+FRESULT f_sync (FIL*); /* Flush cached data of a writing file */
+FRESULT f_unlink (const TCHAR*); /* Delete an existing file or directory */
+FRESULT f_mkdir (const TCHAR*); /* Create a new directory */
+FRESULT f_chmod (const TCHAR*, BYTE, BYTE); /* Change attriburte of the file/dir */
+FRESULT f_utime (const TCHAR*, const FILINFO*); /* Change timestamp of the file/dir */
+FRESULT f_rename (const TCHAR*, const TCHAR*); /* Rename/Move a file or directory */
+FRESULT f_forward (FIL*, UINT(*)(const BYTE*,UINT), UINT, UINT*); /* Forward data to the stream */
+FRESULT f_mkfs (BYTE, BYTE, UINT); /* Create a file system on the drive */
+FRESULT f_chdrive (BYTE); /* Change current drive */
+FRESULT f_chdir (const TCHAR*); /* Change current directory */
+FRESULT f_getcwd (TCHAR*, UINT); /* Get current directory */
+int f_putc (TCHAR, FIL*); /* Put a character to the file */
+int f_puts (const TCHAR*, FIL*); /* Put a string to the file */
+int f_printf (FIL*, const TCHAR*, ...); /* Put a formatted string to the file */
+TCHAR* f_gets (TCHAR*, int, FIL*); /* Get a string from the file */
+
+#ifndef EOF
+#define EOF (-1)
+#endif
+
+#define f_eof(fp) (((fp)->fptr == (fp)->fsize) ? 1 : 0)
+#define f_error(fp) (((fp)->flag & FA__ERROR) ? 1 : 0)
+#define f_tell(fp) ((fp)->fptr)
+#define f_size(fp) ((fp)->fsize)
+
+
+
+
+/*--------------------------------------------------------------*/
+/* Additional user defined functions */
+
+/* RTC function */
+#if !_FS_READONLY
+DWORD get_fattime (void);
+#endif
+
+/* Unicode support functions */
+#if _USE_LFN /* Unicode - OEM code conversion */
+WCHAR ff_convert (WCHAR, UINT); /* OEM-Unicode bidirectional conversion */
+WCHAR ff_wtoupper (WCHAR); /* Unicode upper-case conversion */
+#if _USE_LFN == 3 /* Memory functions */
+void* ff_memalloc (UINT); /* Allocate memory block */
+void ff_memfree (void*); /* Free memory block */
+#endif
+#endif
+
+/* Sync functions */
+#if _FS_REENTRANT
+int ff_cre_syncobj (BYTE, _SYNC_t*);/* Create a sync object */
+int ff_req_grant (_SYNC_t); /* Lock sync object */
+void ff_rel_grant (_SYNC_t); /* Unlock sync object */
+int ff_del_syncobj (_SYNC_t); /* Delete a sync object */
+#endif
+
+
+
+
+/*--------------------------------------------------------------*/
+/* Flags and offset address */
+
+
+/* File access control and file status flags (FIL.flag) */
+
+#define FA_READ 0x01
+#define FA_OPEN_EXISTING 0x00
+#define FA__ERROR 0x80
+
+#if !_FS_READONLY
+#define FA_WRITE 0x02
+#define FA_CREATE_NEW 0x04
+#define FA_CREATE_ALWAYS 0x08
+#define FA_OPEN_ALWAYS 0x10
+#define FA__WRITTEN 0x20
+#define FA__DIRTY 0x40
+#endif
+
+
+/* FAT sub type (FATFS.fs_type) */
+
+#define FS_FAT12 1
+#define FS_FAT16 2
+#define FS_FAT32 3
+
+
+/* File attribute bits for directory entry */
+
+#define AM_RDO 0x01 /* Read only */
+#define AM_HID 0x02 /* Hidden */
+#define AM_SYS 0x04 /* System */
+#define AM_VOL 0x08 /* Volume label */
+#define AM_LFN 0x0F /* LFN entry */
+#define AM_DIR 0x10 /* Directory */
+#define AM_ARC 0x20 /* Archive */
+#define AM_MASK 0x3F /* Mask of defined bits */
+
+
+/* Fast seek function */
+#define CREATE_LINKMAP 0xFFFFFFFF
+
+
+
+/*--------------------------------*/
+/* Multi-byte word access macros */
+
+#if _WORD_ACCESS == 1 /* Enable word access to the FAT structure */
+#define LD_WORD(ptr) (WORD)(*(WORD*)(BYTE*)(ptr))
+#define LD_DWORD(ptr) (DWORD)(*(DWORD*)(BYTE*)(ptr))
+#define ST_WORD(ptr,val) *(WORD*)(BYTE*)(ptr)=(WORD)(val)
+#define ST_DWORD(ptr,val) *(DWORD*)(BYTE*)(ptr)=(DWORD)(val)
+#else /* Use byte-by-byte access to the FAT structure */
+#define LD_WORD(ptr) (WORD)(((WORD)*((BYTE*)(ptr)+1)<<8)|(WORD)*(BYTE*)(ptr))
+#define LD_DWORD(ptr) (DWORD)(((DWORD)*((BYTE*)(ptr)+3)<<24)|((DWORD)*((BYTE*)(ptr)+2)<<16)|((WORD)*((BYTE*)(ptr)+1)<<8)|*(BYTE*)(ptr))
+#define ST_WORD(ptr,val) *(BYTE*)(ptr)=(BYTE)(val); *((BYTE*)(ptr)+1)=(BYTE)((WORD)(val)>>8)
+#define ST_DWORD(ptr,val) *(BYTE*)(ptr)=(BYTE)(val); *((BYTE*)(ptr)+1)=(BYTE)((WORD)(val)>>8); *((BYTE*)(ptr)+2)=(BYTE)((DWORD)(val)>>16); *((BYTE*)(ptr)+3)=(BYTE)((DWORD)(val)>>24)
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _FATFS */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/ffconf.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/ffconf.h
new file mode 100644
index 0000000..21fb84a
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/ffconf.h
@@ -0,0 +1,191 @@
+/*---------------------------------------------------------------------------/
+/ FatFs - FAT file system module configuration file R0.08b (C)ChaN, 2011
+/----------------------------------------------------------------------------/
+/
+/ CAUTION! Do not forget to make clean the project after any changes to
+/ the configuration options.
+/
+/----------------------------------------------------------------------------*/
+#include "fatfs_config.h" /* ATMEL modification */
+#ifndef _FFCONF
+#define _FFCONF 8237 /* Revision ID */
+
+#error "fatfs_config.h is not correctly implemented" /* ATMEL modification */
+
+/*---------------------------------------------------------------------------/
+/ Function and Buffer Configurations
+/----------------------------------------------------------------------------*/
+
+#define _FS_TINY 0 /* 0:Normal or 1:Tiny */
+/* When _FS_TINY is set to 1, FatFs uses the sector buffer in the file system
+/ object instead of the sector buffer in the individual file object for file
+/ data transfer. This reduces memory consumption 512 bytes each file object. */
+
+
+#define _FS_READONLY 0 /* 0:Read/Write or 1:Read only */
+/* Setting _FS_READONLY to 1 defines read only configuration. This removes
+/ writing functions, f_write, f_sync, f_unlink, f_mkdir, f_chmod, f_rename,
+/ f_truncate and useless f_getfree. */
+
+
+#define _FS_MINIMIZE 0 /* 0 to 3 */
+/* The _FS_MINIMIZE option defines minimization level to remove some functions.
+/
+/ 0: Full function.
+/ 1: f_stat, f_getfree, f_unlink, f_mkdir, f_chmod, f_truncate and f_rename
+/ are removed.
+/ 2: f_opendir and f_readdir are removed in addition to 1.
+/ 3: f_lseek is removed in addition to 2. */
+
+
+#define _USE_STRFUNC 0 /* 0:Disable or 1/2:Enable */
+/* To enable string functions, set _USE_STRFUNC to 1 or 2. */
+
+
+#define _USE_MKFS 0 /* 0:Disable or 1:Enable */
+/* To enable f_mkfs function, set _USE_MKFS to 1 and set _FS_READONLY to 0 */
+
+
+#define _USE_FORWARD 0 /* 0:Disable or 1:Enable */
+/* To enable f_forward function, set _USE_FORWARD to 1 and set _FS_TINY to 1. */
+
+
+#define _USE_FASTSEEK 0 /* 0:Disable or 1:Enable */
+/* To enable fast seek feature, set _USE_FASTSEEK to 1. */
+
+
+
+/*---------------------------------------------------------------------------/
+/ Locale and Namespace Configurations
+/----------------------------------------------------------------------------*/
+
+#define _CODE_PAGE 932
+/* The _CODE_PAGE specifies the OEM code page to be used on the target system.
+/ Incorrect setting of the code page can cause a file open failure.
+/
+/ 932 - Japanese Shift-JIS (DBCS, OEM, Windows)
+/ 936 - Simplified Chinese GBK (DBCS, OEM, Windows)
+/ 949 - Korean (DBCS, OEM, Windows)
+/ 950 - Traditional Chinese Big5 (DBCS, OEM, Windows)
+/ 1250 - Central Europe (Windows)
+/ 1251 - Cyrillic (Windows)
+/ 1252 - Latin 1 (Windows)
+/ 1253 - Greek (Windows)
+/ 1254 - Turkish (Windows)
+/ 1255 - Hebrew (Windows)
+/ 1256 - Arabic (Windows)
+/ 1257 - Baltic (Windows)
+/ 1258 - Vietnam (OEM, Windows)
+/ 437 - U.S. (OEM)
+/ 720 - Arabic (OEM)
+/ 737 - Greek (OEM)
+/ 775 - Baltic (OEM)
+/ 850 - Multilingual Latin 1 (OEM)
+/ 858 - Multilingual Latin 1 + Euro (OEM)
+/ 852 - Latin 2 (OEM)
+/ 855 - Cyrillic (OEM)
+/ 866 - Russian (OEM)
+/ 857 - Turkish (OEM)
+/ 862 - Hebrew (OEM)
+/ 874 - Thai (OEM, Windows)
+/ 1 - ASCII only (Valid for non LFN cfg.)
+*/
+
+
+#define _USE_LFN 0 /* 0 to 3 */
+#define _MAX_LFN 255 /* Maximum LFN length to handle (12 to 255) */
+/* The _USE_LFN option switches the LFN support.
+/
+/ 0: Disable LFN feature. _MAX_LFN and _LFN_UNICODE have no effect.
+/ 1: Enable LFN with static working buffer on the BSS. Always NOT reentrant.
+/ 2: Enable LFN with dynamic working buffer on the STACK.
+/ 3: Enable LFN with dynamic working buffer on the HEAP.
+/
+/ The LFN working buffer occupies (_MAX_LFN + 1) * 2 bytes. To enable LFN,
+/ Unicode handling functions ff_convert() and ff_wtoupper() must be added
+/ to the project. When enable to use heap, memory control functions
+/ ff_memalloc() and ff_memfree() must be added to the project. */
+
+
+#define _LFN_UNICODE 0 /* 0:ANSI/OEM or 1:Unicode */
+/* To switch the character code set on FatFs API to Unicode,
+/ enable LFN feature and set _LFN_UNICODE to 1. */
+
+
+#define _FS_RPATH 0 /* 0 to 2 */
+/* The _FS_RPATH option configures relative path feature.
+/
+/ 0: Disable relative path feature and remove related functions.
+/ 1: Enable relative path. f_chdrive() and f_chdir() are available.
+/ 2: f_getcwd() is available in addition to 1.
+/
+/ Note that output of the f_readdir fnction is affected by this option. */
+
+
+
+/*---------------------------------------------------------------------------/
+/ Physical Drive Configurations
+/----------------------------------------------------------------------------*/
+
+#define _VOLUMES 1
+/* Number of volumes (logical drives) to be used. */
+
+
+#define _MAX_SS 512 /* 512, 1024, 2048 or 4096 */
+/* Maximum sector size to be handled.
+/ Always set 512 for memory card and hard disk but a larger value may be
+/ required for on-board flash memory, floppy disk and optical disk.
+/ When _MAX_SS is larger than 512, it configures FatFs to variable sector size
+/ and GET_SECTOR_SIZE command must be implememted to the disk_ioctl function. */
+
+
+#define _MULTI_PARTITION 0 /* 0:Single partition or 1:Multiple partition */
+/* When set to 0, each volume is bound to the same physical drive number and
+/ it can mount only first primaly partition. When it is set to 1, each volume
+/ is tied to the partitions listed in VolToPart[]. */
+
+
+#define _USE_ERASE 0 /* 0:Disable or 1:Enable */
+/* To enable sector erase feature, set _USE_ERASE to 1. CTRL_ERASE_SECTOR command
+/ should be added to the disk_ioctl functio. */
+
+
+
+/*---------------------------------------------------------------------------/
+/ System Configurations
+/----------------------------------------------------------------------------*/
+
+#define _WORD_ACCESS 0 /* 0 or 1 */
+/* Set 0 first and it is always compatible with all platforms. The _WORD_ACCESS
+/ option defines which access method is used to the word data on the FAT volume.
+/
+/ 0: Byte-by-byte access.
+/ 1: Word access. Do not choose this unless following condition is met.
+/
+/ When the byte order on the memory is big-endian or address miss-aligned word
+/ access results incorrect behavior, the _WORD_ACCESS must be set to 0.
+/ If it is not the case, the value can also be set to 1 to improve the
+/ performance and code size. */
+
+
+/* A header file that defines sync object types on the O/S, such as
+/ windows.h, ucos_ii.h and semphr.h, must be included prior to ff.h. */
+
+#define _FS_REENTRANT 0 /* 0:Disable or 1:Enable */
+#define _FS_TIMEOUT 1000 /* Timeout period in unit of time ticks */
+#define _SYNC_t HANDLE /* O/S dependent type of sync object. e.g. HANDLE, OS_EVENT*, ID and etc.. */
+
+/* The _FS_REENTRANT option switches the reentrancy (thread safe) of the FatFs module.
+/
+/ 0: Disable reentrancy. _SYNC_t and _FS_TIMEOUT have no effect.
+/ 1: Enable reentrancy. Also user provided synchronization handlers,
+/ ff_req_grant, ff_rel_grant, ff_del_syncobj and ff_cre_syncobj
+/ function must be added to the project. */
+
+
+#define _FS_SHARE 0 /* 0:Disable or >=1:Enable */
+/* To enable file shareing feature, set _FS_SHARE to 1 or greater. The value
+ defines how many files can be opened simultaneously. */
+
+
+#endif /* _FFCONFIG */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/integer.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/integer.h
new file mode 100644
index 0000000..dcfc80f
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/integer.h
@@ -0,0 +1,37 @@
+/*-------------------------------------------*/
+/* Integer type definitions for FatFs module */
+/*-------------------------------------------*/
+
+#ifndef _INTEGER
+#define _INTEGER
+
+#ifdef _WIN32 /* FatFs development platform */
+
+#include <windows.h>
+#include <tchar.h>
+
+#else /* Embedded platform */
+
+/* These types must be 16-bit, 32-bit or larger integer */
+typedef int INT;
+typedef unsigned int UINT;
+
+/* These types must be 8-bit integer */
+typedef char CHAR;
+typedef unsigned char UCHAR;
+typedef unsigned char BYTE;
+
+/* These types must be 16-bit integer */
+typedef short SHORT;
+typedef unsigned short USHORT;
+typedef unsigned short WORD;
+typedef unsigned short WCHAR;
+
+/* These types must be 32-bit integer */
+typedef long LONG;
+typedef unsigned long ULONG;
+typedef unsigned long DWORD;
+
+#endif
+
+#endif
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/option/cc932.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/option/cc932.c
new file mode 100644
index 0000000..a5bb707
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/option/cc932.c
@@ -0,0 +1,3798 @@
+/*------------------------------------------------------------------------*/
+/* Unicode - OEM code bidirectional converter (C)ChaN, 2009 */
+/* */
+/* CP932 (Japanese Shift-JIS) */
+/*------------------------------------------------------------------------*/
+
+#include "../ff.h"
+
+#define _TINY_TABLE 0
+
+#if !_USE_LFN || _CODE_PAGE != 932
+#error This file is not needed in current configuration. Remove from the project.
+#endif
+
+
+static
+const WCHAR uni2sjis[] = {
+/* Unicode - Sjis, Unicode - Sjis, Unicode - Sjis, Unicode - Sjis, */
+ 0x00A7, 0x8198, 0x00A8, 0x814E, 0x00B0, 0x818B, 0x00B1, 0x817D,
+ 0x00B4, 0x814C, 0x00B6, 0x81F7, 0x00D7, 0x817E, 0x00F7, 0x8180,
+ 0x0391, 0x839F, 0x0392, 0x83A0, 0x0393, 0x83A1, 0x0394, 0x83A2,
+ 0x0395, 0x83A3, 0x0396, 0x83A4, 0x0397, 0x83A5, 0x0398, 0x83A6,
+ 0x0399, 0x83A7, 0x039A, 0x83A8, 0x039B, 0x83A9, 0x039C, 0x83AA,
+ 0x039D, 0x83AB, 0x039E, 0x83AC, 0x039F, 0x83AD, 0x03A0, 0x83AE,
+ 0x03A1, 0x83AF, 0x03A3, 0x83B0, 0x03A4, 0x83B1, 0x03A5, 0x83B2,
+ 0x03A6, 0x83B3, 0x03A7, 0x83B4, 0x03A8, 0x83B5, 0x03A9, 0x83B6,
+ 0x03B1, 0x83BF, 0x03B2, 0x83C0, 0x03B3, 0x83C1, 0x03B4, 0x83C2,
+ 0x03B5, 0x83C3, 0x03B6, 0x83C4, 0x03B7, 0x83C5, 0x03B8, 0x83C6,
+ 0x03B9, 0x83C7, 0x03BA, 0x83C8, 0x03BB, 0x83C9, 0x03BC, 0x83CA,
+ 0x03BD, 0x83CB, 0x03BE, 0x83CC, 0x03BF, 0x83CD, 0x03C0, 0x83CE,
+ 0x03C1, 0x83CF, 0x03C3, 0x83D0, 0x03C4, 0x83D1, 0x03C5, 0x83D2,
+ 0x03C6, 0x83D3, 0x03C7, 0x83D4, 0x03C8, 0x83D5, 0x03C9, 0x83D6,
+ 0x0401, 0x8446, 0x0410, 0x8440, 0x0411, 0x8441, 0x0412, 0x8442,
+ 0x0413, 0x8443, 0x0414, 0x8444, 0x0415, 0x8445, 0x0416, 0x8447,
+ 0x0417, 0x8448, 0x0418, 0x8449, 0x0419, 0x844A, 0x041A, 0x844B,
+ 0x041B, 0x844C, 0x041C, 0x844D, 0x041D, 0x844E, 0x041E, 0x844F,
+ 0x041F, 0x8450, 0x0420, 0x8451, 0x0421, 0x8452, 0x0422, 0x8453,
+ 0x0423, 0x8454, 0x0424, 0x8455, 0x0425, 0x8456, 0x0426, 0x8457,
+ 0x0427, 0x8458, 0x0428, 0x8459, 0x0429, 0x845A, 0x042A, 0x845B,
+ 0x042B, 0x845C, 0x042C, 0x845D, 0x042D, 0x845E, 0x042E, 0x845F,
+ 0x042F, 0x8460, 0x0430, 0x8470, 0x0431, 0x8471, 0x0432, 0x8472,
+ 0x0433, 0x8473, 0x0434, 0x8474, 0x0435, 0x8475, 0x0436, 0x8477,
+ 0x0437, 0x8478, 0x0438, 0x8479, 0x0439, 0x847A, 0x043A, 0x847B,
+ 0x043B, 0x847C, 0x043C, 0x847D, 0x043D, 0x847E, 0x043E, 0x8480,
+ 0x043F, 0x8481, 0x0440, 0x8482, 0x0441, 0x8483, 0x0442, 0x8484,
+ 0x0443, 0x8485, 0x0444, 0x8486, 0x0445, 0x8487, 0x0446, 0x8488,
+ 0x0447, 0x8489, 0x0448, 0x848A, 0x0449, 0x848B, 0x044A, 0x848C,
+ 0x044B, 0x848D, 0x044C, 0x848E, 0x044D, 0x848F, 0x044E, 0x8490,
+ 0x044F, 0x8491, 0x0451, 0x8476, 0x2010, 0x815D, 0x2015, 0x815C,
+ 0x2018, 0x8165, 0x2019, 0x8166, 0x201C, 0x8167, 0x201D, 0x8168,
+ 0x2020, 0x81F5, 0x2021, 0x81F6, 0x2025, 0x8164, 0x2026, 0x8163,
+ 0x2030, 0x81F1, 0x2032, 0x818C, 0x2033, 0x818D, 0x203B, 0x81A6,
+ 0x2103, 0x818E, 0x2116, 0x8782, 0x2121, 0x8784, 0x212B, 0x81F0,
+ 0x2160, 0x8754, 0x2161, 0x8755, 0x2162, 0x8756, 0x2163, 0x8757,
+ 0x2164, 0x8758, 0x2165, 0x8759, 0x2166, 0x875A, 0x2167, 0x875B,
+ 0x2168, 0x875C, 0x2169, 0x875D, 0x2170, 0xFA40, 0x2171, 0xFA41,
+ 0x2172, 0xFA42, 0x2173, 0xFA43, 0x2174, 0xFA44, 0x2175, 0xFA45,
+ 0x2176, 0xFA46, 0x2177, 0xFA47, 0x2178, 0xFA48, 0x2179, 0xFA49,
+ 0x2190, 0x81A9, 0x2191, 0x81AA, 0x2192, 0x81A8, 0x2193, 0x81AB,
+ 0x21D2, 0x81CB, 0x21D4, 0x81CC, 0x2200, 0x81CD, 0x2202, 0x81DD,
+ 0x2203, 0x81CE, 0x2207, 0x81DE, 0x2208, 0x81B8, 0x220B, 0x81B9,
+ 0x2211, 0x8794, 0x221A, 0x81E3, 0x221D, 0x81E5, 0x221E, 0x8187,
+ 0x221F, 0x8798, 0x2220, 0x81DA, 0x2225, 0x8161, 0x2227, 0x81C8,
+ 0x2228, 0x81C9, 0x2229, 0x81BF, 0x222A, 0x81BE, 0x222B, 0x81E7,
+ 0x222C, 0x81E8, 0x222E, 0x8793, 0x2234, 0x8188, 0x2235, 0x81E6,
+ 0x223D, 0x81E4, 0x2252, 0x81E0, 0x2260, 0x8182, 0x2261, 0x81DF,
+ 0x2266, 0x8185, 0x2267, 0x8186, 0x226A, 0x81E1, 0x226B, 0x81E2,
+ 0x2282, 0x81BC, 0x2283, 0x81BD, 0x2286, 0x81BA, 0x2287, 0x81BB,
+ 0x22A5, 0x81DB, 0x22BF, 0x8799, 0x2312, 0x81DC, 0x2460, 0x8740,
+ 0x2461, 0x8741, 0x2462, 0x8742, 0x2463, 0x8743, 0x2464, 0x8744,
+ 0x2465, 0x8745, 0x2466, 0x8746, 0x2467, 0x8747, 0x2468, 0x8748,
+ 0x2469, 0x8749, 0x246A, 0x874A, 0x246B, 0x874B, 0x246C, 0x874C,
+ 0x246D, 0x874D, 0x246E, 0x874E, 0x246F, 0x874F, 0x2470, 0x8750,
+ 0x2471, 0x8751, 0x2472, 0x8752, 0x2473, 0x8753, 0x2500, 0x849F,
+ 0x2501, 0x84AA, 0x2502, 0x84A0, 0x2503, 0x84AB, 0x250C, 0x84A1,
+ 0x250F, 0x84AC, 0x2510, 0x84A2, 0x2513, 0x84AD, 0x2514, 0x84A4,
+ 0x2517, 0x84AF, 0x2518, 0x84A3, 0x251B, 0x84AE, 0x251C, 0x84A5,
+ 0x251D, 0x84BA, 0x2520, 0x84B5, 0x2523, 0x84B0, 0x2524, 0x84A7,
+ 0x2525, 0x84BC, 0x2528, 0x84B7, 0x252B, 0x84B2, 0x252C, 0x84A6,
+ 0x252F, 0x84B6, 0x2530, 0x84BB, 0x2533, 0x84B1, 0x2534, 0x84A8,
+ 0x2537, 0x84B8, 0x2538, 0x84BD, 0x253B, 0x84B3, 0x253C, 0x84A9,
+ 0x253F, 0x84B9, 0x2542, 0x84BE, 0x254B, 0x84B4, 0x25A0, 0x81A1,
+ 0x25A1, 0x81A0, 0x25B2, 0x81A3, 0x25B3, 0x81A2, 0x25BC, 0x81A5,
+ 0x25BD, 0x81A4, 0x25C6, 0x819F, 0x25C7, 0x819E, 0x25CB, 0x819B,
+ 0x25CE, 0x819D, 0x25CF, 0x819C, 0x25EF, 0x81FC, 0x2605, 0x819A,
+ 0x2606, 0x8199, 0x2640, 0x818A, 0x2642, 0x8189, 0x266A, 0x81F4,
+ 0x266D, 0x81F3, 0x266F, 0x81F2, 0x3000, 0x8140, 0x3001, 0x8141,
+ 0x3002, 0x8142, 0x3003, 0x8156, 0x3005, 0x8158, 0x3006, 0x8159,
+ 0x3007, 0x815A, 0x3008, 0x8171, 0x3009, 0x8172, 0x300A, 0x8173,
+ 0x300B, 0x8174, 0x300C, 0x8175, 0x300D, 0x8176, 0x300E, 0x8177,
+ 0x300F, 0x8178, 0x3010, 0x8179, 0x3011, 0x817A, 0x3012, 0x81A7,
+ 0x3013, 0x81AC, 0x3014, 0x816B, 0x3015, 0x816C, 0x301D, 0x8780,
+ 0x301F, 0x8781, 0x3041, 0x829F, 0x3042, 0x82A0, 0x3043, 0x82A1,
+ 0x3044, 0x82A2, 0x3045, 0x82A3, 0x3046, 0x82A4, 0x3047, 0x82A5,
+ 0x3048, 0x82A6, 0x3049, 0x82A7, 0x304A, 0x82A8, 0x304B, 0x82A9,
+ 0x304C, 0x82AA, 0x304D, 0x82AB, 0x304E, 0x82AC, 0x304F, 0x82AD,
+ 0x3050, 0x82AE, 0x3051, 0x82AF, 0x3052, 0x82B0, 0x3053, 0x82B1,
+ 0x3054, 0x82B2, 0x3055, 0x82B3, 0x3056, 0x82B4, 0x3057, 0x82B5,
+ 0x3058, 0x82B6, 0x3059, 0x82B7, 0x305A, 0x82B8, 0x305B, 0x82B9,
+ 0x305C, 0x82BA, 0x305D, 0x82BB, 0x305E, 0x82BC, 0x305F, 0x82BD,
+ 0x3060, 0x82BE, 0x3061, 0x82BF, 0x3062, 0x82C0, 0x3063, 0x82C1,
+ 0x3064, 0x82C2, 0x3065, 0x82C3, 0x3066, 0x82C4, 0x3067, 0x82C5,
+ 0x3068, 0x82C6, 0x3069, 0x82C7, 0x306A, 0x82C8, 0x306B, 0x82C9,
+ 0x306C, 0x82CA, 0x306D, 0x82CB, 0x306E, 0x82CC, 0x306F, 0x82CD,
+ 0x3070, 0x82CE, 0x3071, 0x82CF, 0x3072, 0x82D0, 0x3073, 0x82D1,
+ 0x3074, 0x82D2, 0x3075, 0x82D3, 0x3076, 0x82D4, 0x3077, 0x82D5,
+ 0x3078, 0x82D6, 0x3079, 0x82D7, 0x307A, 0x82D8, 0x307B, 0x82D9,
+ 0x307C, 0x82DA, 0x307D, 0x82DB, 0x307E, 0x82DC, 0x307F, 0x82DD,
+ 0x3080, 0x82DE, 0x3081, 0x82DF, 0x3082, 0x82E0, 0x3083, 0x82E1,
+ 0x3084, 0x82E2, 0x3085, 0x82E3, 0x3086, 0x82E4, 0x3087, 0x82E5,
+ 0x3088, 0x82E6, 0x3089, 0x82E7, 0x308A, 0x82E8, 0x308B, 0x82E9,
+ 0x308C, 0x82EA, 0x308D, 0x82EB, 0x308E, 0x82EC, 0x308F, 0x82ED,
+ 0x3090, 0x82EE, 0x3091, 0x82EF, 0x3092, 0x82F0, 0x3093, 0x82F1,
+ 0x309B, 0x814A, 0x309C, 0x814B, 0x309D, 0x8154,
+ 0x309E, 0x8155, 0x30A1, 0x8340, 0x30A2, 0x8341, 0x30A3, 0x8342,
+ 0x30A4, 0x8343, 0x30A5, 0x8344, 0x30A6, 0x8345, 0x30A7, 0x8346,
+ 0x30A8, 0x8347, 0x30A9, 0x8348, 0x30AA, 0x8349, 0x30AB, 0x834A,
+ 0x30AC, 0x834B, 0x30AD, 0x834C, 0x30AE, 0x834D, 0x30AF, 0x834E,
+ 0x30B0, 0x834F, 0x30B1, 0x8350, 0x30B2, 0x8351, 0x30B3, 0x8352,
+ 0x30B4, 0x8353, 0x30B5, 0x8354, 0x30B6, 0x8355, 0x30B7, 0x8356,
+ 0x30B8, 0x8357, 0x30B9, 0x8358, 0x30BA, 0x8359, 0x30BB, 0x835A,
+ 0x30BC, 0x835B, 0x30BD, 0x835C, 0x30BE, 0x835D, 0x30BF, 0x835E,
+ 0x30C0, 0x835F, 0x30C1, 0x8360, 0x30C2, 0x8361, 0x30C3, 0x8362,
+ 0x30C4, 0x8363, 0x30C5, 0x8364, 0x30C6, 0x8365, 0x30C7, 0x8366,
+ 0x30C8, 0x8367, 0x30C9, 0x8368, 0x30CA, 0x8369, 0x30CB, 0x836A,
+ 0x30CC, 0x836B, 0x30CD, 0x836C, 0x30CE, 0x836D, 0x30CF, 0x836E,
+ 0x30D0, 0x836F, 0x30D1, 0x8370, 0x30D2, 0x8371, 0x30D3, 0x8372,
+ 0x30D4, 0x8373, 0x30D5, 0x8374, 0x30D6, 0x8375, 0x30D7, 0x8376,
+ 0x30D8, 0x8377, 0x30D9, 0x8378, 0x30DA, 0x8379, 0x30DB, 0x837A,
+ 0x30DC, 0x837B, 0x30DD, 0x837C, 0x30DE, 0x837D, 0x30DF, 0x837E,
+ 0x30E0, 0x8380, 0x30E1, 0x8381, 0x30E2, 0x8382, 0x30E3, 0x8383,
+ 0x30E4, 0x8384, 0x30E5, 0x8385, 0x30E6, 0x8386, 0x30E7, 0x8387,
+ 0x30E8, 0x8388, 0x30E9, 0x8389, 0x30EA, 0x838A, 0x30EB, 0x838B,
+ 0x30EC, 0x838C, 0x30ED, 0x838D, 0x30EE, 0x838E, 0x30EF, 0x838F,
+ 0x30F0, 0x8390, 0x30F1, 0x8391, 0x30F2, 0x8392, 0x30F3, 0x8393,
+ 0x30F4, 0x8394, 0x30F5, 0x8395, 0x30F6, 0x8396, 0x30FB, 0x8145,
+ 0x30FC, 0x815B, 0x30FD, 0x8152, 0x30FE, 0x8153, 0x3231, 0x878A,
+ 0x3232, 0x878B, 0x3239, 0x878C, 0x32A4, 0x8785, 0x32A5, 0x8786,
+ 0x32A6, 0x8787, 0x32A7, 0x8788, 0x32A8, 0x8789, 0x3303, 0x8765,
+ 0x330D, 0x8769, 0x3314, 0x8760, 0x3318, 0x8763, 0x3322, 0x8761,
+ 0x3323, 0x876B, 0x3326, 0x876A, 0x3327, 0x8764, 0x332B, 0x876C,
+ 0x3336, 0x8766, 0x333B, 0x876E, 0x3349, 0x875F, 0x334A, 0x876D,
+ 0x334D, 0x8762, 0x3351, 0x8767, 0x3357, 0x8768, 0x337B, 0x877E,
+ 0x337C, 0x878F, 0x337D, 0x878E, 0x337E, 0x878D, 0x338E, 0x8772,
+ 0x338F, 0x8773, 0x339C, 0x876F, 0x339D, 0x8770, 0x339E, 0x8771,
+ 0x33A1, 0x8775, 0x33C4, 0x8774, 0x33CD, 0x8783, 0x4E00, 0x88EA,
+ 0x4E01, 0x929A, 0x4E03, 0x8EB5, 0x4E07, 0x969C, 0x4E08, 0x8FE4,
+ 0x4E09, 0x8E4F, 0x4E0A, 0x8FE3, 0x4E0B, 0x89BA, 0x4E0D, 0x9573,
+ 0x4E0E, 0x975E, 0x4E10, 0x98A0, 0x4E11, 0x894E, 0x4E14, 0x8A8E,
+ 0x4E15, 0x98A1, 0x4E16, 0x90A2, 0x4E17, 0x99C0, 0x4E18, 0x8B75,
+ 0x4E19, 0x95B8, 0x4E1E, 0x8FE5, 0x4E21, 0x97BC, 0x4E26, 0x95C0,
+ 0x4E28, 0xFA68, 0x4E2A, 0x98A2, 0x4E2D, 0x9286, 0x4E31, 0x98A3,
+ 0x4E32, 0x8BF8, 0x4E36, 0x98A4, 0x4E38, 0x8ADB, 0x4E39, 0x924F,
+ 0x4E3B, 0x8EE5, 0x4E3C, 0x98A5, 0x4E3F, 0x98A6, 0x4E42, 0x98A7,
+ 0x4E43, 0x9454, 0x4E45, 0x8B76, 0x4E4B, 0x9456, 0x4E4D, 0x93E1,
+ 0x4E4E, 0x8CC1, 0x4E4F, 0x9652, 0x4E55, 0xE568, 0x4E56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x5029, 0x98E8, 0x502A, 0x98E2, 0x502B, 0x97CF, 0x502C, 0x98E9,
+ 0x502D, 0x9860, 0x5036, 0x8BE4, 0x5039, 0x8C90, 0x5040, 0xFA74,
+ 0x5042, 0xFA7A, 0x5043, 0x98EE, 0x5046, 0xFA78, 0x5047, 0x98EF,
+ 0x5048, 0x98F3, 0x5049, 0x88CC, 0x504F, 0x95CE, 0x5050, 0x98F2,
+ 0x5055, 0x98F1, 0x5056, 0x98F5, 0x505A, 0x98F4, 0x505C, 0x92E2,
+ 0x5065, 0x8C92, 0x506C, 0x98F6, 0x5070, 0xFA79, 0x5072, 0x8EC3,
+ 0x5074, 0x91A4, 0x5075, 0x92E3, 0x5076, 0x8BF4, 0x5078, 0x98F7,
+ 0x507D, 0x8B55, 0x5080, 0x98F8, 0x5085, 0x98FA, 0x508D, 0x9654,
+ 0x5091, 0x8C86, 0x5094, 0xFA7B, 0x5098, 0x8E50, 0x5099, 0x94F5,
+ 0x509A, 0x98F9, 0x50AC, 0x8DC3, 0x50AD, 0x9762, 0x50B2, 0x98FC,
+ 0x50B3, 0x9942, 0x50B4, 0x98FB, 0x50B5, 0x8DC2, 0x50B7, 0x8F9D,
+ 0x50BE, 0x8C58, 0x50C2, 0x9943, 0x50C5, 0x8BCD, 0x50C9, 0x9940,
+ 0x50CA, 0x9941, 0x50CD, 0x93AD, 0x50CF, 0x919C, 0x50D1, 0x8BA1,
+ 0x50D5, 0x966C, 0x50D6, 0x9944, 0x50D8, 0xFA7D, 0x50DA, 0x97BB,
+ 0x50DE, 0x9945, 0x50E3, 0x9948, 0x50E5, 0x9946, 0x50E7, 0x916D,
+ 0x50ED, 0x9947, 0x50EE, 0x9949, 0x50F4, 0xFA7C, 0x50F5, 0x994B,
+ 0x50F9, 0x994A, 0x50FB, 0x95C6, 0x5100, 0x8B56, 0x5101, 0x994D,
+ 0x5102, 0x994E, 0x5104, 0x89AD, 0x5109, 0x994C, 0x5112, 0x8EF2,
+ 0x5114, 0x9951, 0x5115, 0x9950, 0x5116, 0x994F, 0x5118, 0x98D4,
+ 0x511A, 0x9952, 0x511F, 0x8F9E, 0x5121, 0x9953, 0x512A, 0x9744,
+ 0x5132, 0x96D7, 0x5137, 0x9955, 0x513A, 0x9954, 0x513B, 0x9957,
+ 0x513C, 0x9956, 0x513F, 0x9958, 0x5140, 0x9959, 0x5141, 0x88F2,
+ 0x5143, 0x8CB3, 0x5144, 0x8C5A, 0x5145, 0x8F5B, 0x5146, 0x929B,
+ 0x5147, 0x8BA2, 0x5148, 0x90E6, 0x5149, 0x8CF5, 0x514A, 0xFA7E,
+ 0x514B, 0x8D8E, 0x514C, 0x995B, 0x514D, 0x96C6, 0x514E, 0x9365,
+ 0x5150, 0x8E99, 0x5152, 0x995A, 0x5154, 0x995C, 0x515A, 0x937D,
+ 0x515C, 0x8A95, 0x5162, 0x995D, 0x5164, 0xFA80, 0x5165, 0x93FC,
+ 0x5168, 0x9153, 0x5169, 0x995F, 0x516A, 0x9960, 0x516B, 0x94AA,
+ 0x516C, 0x8CF6, 0x516D, 0x985A, 0x516E, 0x9961, 0x5171, 0x8BA4,
+ 0x5175, 0x95BA, 0x5176, 0x91B4, 0x5177, 0x8BEF, 0x5178, 0x9354,
+ 0x517C, 0x8C93, 0x5180, 0x9962, 0x5182, 0x9963, 0x5185, 0x93E0,
+ 0x5186, 0x897E, 0x5189, 0x9966, 0x518A, 0x8DFB, 0x518C, 0x9965,
+ 0x518D, 0x8DC4, 0x518F, 0x9967, 0x5190, 0xE3EC, 0x5191, 0x9968,
+ 0x5192, 0x9660, 0x5193, 0x9969, 0x5195, 0x996A, 0x5196, 0x996B,
+ 0x5197, 0x8FE7, 0x5199, 0x8ECA, 0x519D, 0xFA81, 0x51A0, 0x8AA5,
+ 0x51A2, 0x996E, 0x51A4, 0x996C, 0x51A5, 0x96BB, 0x51A6, 0x996D,
+ 0x51A8, 0x9579, 0x51A9, 0x996F, 0x51AA, 0x9970, 0x51AB, 0x9971,
+ 0x51AC, 0x937E, 0x51B0, 0x9975, 0x51B1, 0x9973, 0x51B2, 0x9974,
+ 0x51B3, 0x9972, 0x51B4, 0x8DE1, 0x51B5, 0x9976, 0x51B6, 0x96E8,
+ 0x51B7, 0x97E2, 0x51BD, 0x9977, 0x51BE, 0xFA82, 0x51C4, 0x90A6,
+ 0x51C5, 0x9978, 0x51C6, 0x8F79, 0x51C9, 0x9979, 0x51CB, 0x929C,
+ 0x51CC, 0x97BD, 0x51CD, 0x9380, 0x51D6, 0x99C3, 0x51DB, 0x997A,
+ 0x51DC, 0xEAA3, 0x51DD, 0x8BC3, 0x51E0, 0x997B, 0x51E1, 0x967D,
+ 0x51E6, 0x8F88, 0x51E7, 0x91FA, 0x51E9, 0x997D, 0x51EA, 0x93E2,
+ 0x51EC, 0xFA83, 0x51ED, 0x997E, 0x51F0, 0x9980, 0x51F1, 0x8A4D,
+ 0x51F5, 0x9981, 0x51F6, 0x8BA5, 0x51F8, 0x93CA, 0x51F9, 0x899A,
+ 0x51FA, 0x8F6F, 0x51FD, 0x949F, 0x51FE, 0x9982, 0x5200, 0x9381,
+ 0x5203, 0x906E, 0x5204, 0x9983, 0x5206, 0x95AA, 0x5207, 0x90D8,
+ 0x5208, 0x8AA0, 0x520A, 0x8AA7, 0x520B, 0x9984, 0x520E, 0x9986,
+ 0x5211, 0x8C59, 0x5214, 0x9985, 0x5215, 0xFA84, 0x5217, 0x97F1,
+ 0x521D, 0x8F89, 0x5224, 0x94BB, 0x5225, 0x95CA, 0x5227, 0x9987,
+ 0x5229, 0x9798, 0x522A, 0x9988, 0x522E, 0x9989, 0x5230, 0x939E,
+ 0x5233, 0x998A, 0x5236, 0x90A7, 0x5237, 0x8DFC, 0x5238, 0x8C94,
+ 0x5239, 0x998B, 0x523A, 0x8E68, 0x523B, 0x8D8F, 0x5243, 0x92E4,
+ 0x5244, 0x998D, 0x5247, 0x91A5, 0x524A, 0x8DED, 0x524B, 0x998E,
+ 0x524C, 0x998F, 0x524D, 0x914F, 0x524F, 0x998C, 0x5254, 0x9991,
+ 0x5256, 0x9655, 0x525B, 0x8D84, 0x525E, 0x9990, 0x5263, 0x8C95,
+ 0x5264, 0x8DDC, 0x5265, 0x948D, 0x5269, 0x9994, 0x526A, 0x9992,
+ 0x526F, 0x959B, 0x5270, 0x8FE8, 0x5271, 0x999B, 0x5272, 0x8A84,
+ 0x5273, 0x9995, 0x5274, 0x9993, 0x5275, 0x916E, 0x527D, 0x9997,
+ 0x527F, 0x9996, 0x5283, 0x8A63, 0x5287, 0x8C80, 0x5288, 0x999C,
+ 0x5289, 0x97AB, 0x528D, 0x9998, 0x5291, 0x999D, 0x5292, 0x999A,
+ 0x5294, 0x9999, 0x529B, 0x97CD, 0x529C, 0xFA85, 0x529F, 0x8CF7,
+ 0x52A0, 0x89C1, 0x52A3, 0x97F2, 0x52A6, 0xFA86, 0x52A9, 0x8F95,
+ 0x52AA, 0x9377, 0x52AB, 0x8D85, 0x52AC, 0x99A0, 0x52AD, 0x99A1,
+ 0x52AF, 0xFB77, 0x52B1, 0x97E3, 0x52B4, 0x984A, 0x52B5, 0x99A3,
+ 0x52B9, 0x8CF8, 0x52BC, 0x99A2, 0x52BE, 0x8A4E, 0x52C0, 0xFA87,
+ 0x52C1, 0x99A4, 0x52C3, 0x9675, 0x52C5, 0x92BA, 0x52C7, 0x9745,
+ 0x52C9, 0x95D7, 0x52CD, 0x99A5, 0x52D2, 0xE8D3, 0x52D5, 0x93AE,
+ 0x52D7, 0x99A6, 0x52D8, 0x8AA8, 0x52D9, 0x96B1, 0x52DB, 0xFA88,
+ 0x52DD, 0x8F9F, 0x52DE, 0x99A7, 0x52DF, 0x95E5, 0x52E0, 0x99AB,
+ 0x52E2, 0x90A8, 0x52E3, 0x99A8, 0x52E4, 0x8BCE, 0x52E6, 0x99A9,
+ 0x52E7, 0x8AA9, 0x52F2, 0x8C4D, 0x52F3, 0x99AC, 0x52F5, 0x99AD,
+ 0x52F8, 0x99AE, 0x52F9, 0x99AF, 0x52FA, 0x8ED9, 0x52FE, 0x8CF9,
+ 0x52FF, 0x96DC, 0x5300, 0xFA89, 0x5301, 0x96E6, 0x5302, 0x93F5,
+ 0x5305, 0x95EF, 0x5306, 0x99B0, 0x5307, 0xFA8A, 0x5308, 0x99B1,
+ 0x530D, 0x99B3, 0x530F, 0x99B5, 0x5310, 0x99B4, 0x5315, 0x99B6,
+ 0x5316, 0x89BB, 0x5317, 0x966B, 0x5319, 0x8DFA, 0x531A, 0x99B7,
+ 0x531D, 0x9178, 0x5320, 0x8FA0, 0x5321, 0x8BA7, 0x5323, 0x99B8,
+ 0x5324, 0xFA8B, 0x532A, 0x94D9, 0x532F, 0x99B9, 0x5331, 0x99BA,
+ 0x5333, 0x99BB, 0x5338, 0x99BC, 0x5339, 0x9543, 0x533A, 0x8BE6,
+ 0x533B, 0x88E3, 0x533F, 0x93BD, 0x5340, 0x99BD, 0x5341, 0x8F5C,
+ 0x5343, 0x90E7, 0x5345, 0x99BF, 0x5346, 0x99BE, 0x5347, 0x8FA1,
+ 0x5348, 0x8CDF, 0x5349, 0x99C1, 0x534A, 0x94BC, 0x534D, 0x99C2,
+ 0x5351, 0x94DA, 0x5352, 0x91B2, 0x5353, 0x91EC, 0x5354, 0x8BA6,
+ 0x5357, 0x93EC, 0x5358, 0x9250, 0x535A, 0x948E, 0x535C, 0x966D,
+ 0x535E, 0x99C4, 0x5360, 0x90E8, 0x5366, 0x8C54, 0x5369, 0x99C5,
+ 0x536E, 0x99C6, 0x536F, 0x894B, 0x5370, 0x88F3, 0x5371, 0x8AEB,
+ 0x5372, 0xFA8C, 0x5373, 0x91A6, 0x5374, 0x8B70, 0x5375, 0x9791,
+ 0x5377, 0x99C9, 0x5378, 0x89B5, 0x537B, 0x99C8, 0x537F, 0x8BA8,
+ 0x5382, 0x99CA, 0x5384, 0x96EF, 0x5393, 0xFA8D, 0x5396, 0x99CB,
+ 0x5398, 0x97D0, 0x539A, 0x8CFA, 0x539F, 0x8CB4, 0x53A0, 0x99CC,
+ 0x53A5, 0x99CE, 0x53A6, 0x99CD, 0x53A8, 0x907E, 0x53A9, 0x8958,
+ 0x53AD, 0x897D, 0x53AE, 0x99CF, 0x53B0, 0x99D0, 0x53B2, 0xFA8E,
+ 0x53B3, 0x8CB5, 0x53B6, 0x99D1, 0x53BB, 0x8B8E, 0x53C2, 0x8E51,
+ 0x53C3, 0x99D2, 0x53C8, 0x9694, 0x53C9, 0x8DB3, 0x53CA, 0x8B79,
+ 0x53CB, 0x9746, 0x53CC, 0x916F, 0x53CD, 0x94BD, 0x53CE, 0x8EFB,
+ 0x53D4, 0x8F66, 0x53D6, 0x8EE6, 0x53D7, 0x8EF3, 0x53D9, 0x8F96,
+ 0x53DB, 0x94BE, 0x53DD, 0xFA8F, 0x53DF, 0x99D5, 0x53E1, 0x8962,
+ 0x53E2, 0x9170, 0x53E3, 0x8CFB, 0x53E4, 0x8CC3, 0x53E5, 0x8BE5,
+ 0x53E8, 0x99D9, 0x53E9, 0x9240, 0x53EA, 0x91FC, 0x53EB, 0x8BA9,
+ 0x53EC, 0x8FA2, 0x53ED, 0x99DA, 0x53EE, 0x99D8, 0x53EF, 0x89C2,
+ 0x53F0, 0x91E4, 0x53F1, 0x8EB6, 0x53F2, 0x8E6A, 0x53F3, 0x8945,
+ 0x53F6, 0x8A90, 0x53F7, 0x8D86, 0x53F8, 0x8E69, 0x53FA, 0x99DB,
+ 0x5401, 0x99DC, 0x5403, 0x8B68, 0x5404, 0x8A65, 0x5408, 0x8D87,
+ 0x5409, 0x8B67, 0x540A, 0x92DD, 0x540B, 0x8944, 0x540C, 0x93AF,
+ 0x540D, 0x96BC, 0x540E, 0x8D40, 0x540F, 0x9799, 0x5410, 0x9366,
+ 0x5411, 0x8CFC, 0x541B, 0x8C4E, 0x541D, 0x99E5, 0x541F, 0x8BE1,
+ 0x5420, 0x9669, 0x5426, 0x94DB, 0x5429, 0x99E4, 0x542B, 0x8ADC,
+ 0x542C, 0x99DF, 0x542D, 0x99E0, 0x542E, 0x99E2, 0x5436, 0x99E3,
+ 0x5438, 0x8B7A, 0x5439, 0x9081, 0x543B, 0x95AB, 0x543C, 0x99E1,
+ 0x543D, 0x99DD, 0x543E, 0x8CE1, 0x5440, 0x99DE, 0x5442, 0x9843,
+ 0x5446, 0x95F0, 0x5448, 0x92E6, 0x5449, 0x8CE0, 0x544A, 0x8D90,
+ 0x544E, 0x99E6, 0x5451, 0x93DB, 0x545F, 0x99EA, 0x5468, 0x8EFC,
+ 0x546A, 0x8EF4, 0x5470, 0x99ED, 0x5471, 0x99EB, 0x5473, 0x96A1,
+ 0x5475, 0x99E8, 0x5476, 0x99F1, 0x5477, 0x99EC, 0x547B, 0x99EF,
+ 0x547C, 0x8CC4, 0x547D, 0x96BD, 0x5480, 0x99F0, 0x5484, 0x99F2,
+ 0x5486, 0x99F4, 0x548A, 0xFA92, 0x548B, 0x8DEE, 0x548C, 0x9861,
+ 0x548E, 0x99E9, 0x548F, 0x99E7, 0x5490, 0x99F3, 0x5492, 0x99EE,
+ 0x549C, 0xFA91, 0x54A2, 0x99F6, 0x54A4, 0x9A42, 0x54A5, 0x99F8,
+ 0x54A8, 0x99FC, 0x54A9, 0xFA93, 0x54AB, 0x9A40, 0x54AC, 0x99F9,
+ 0x54AF, 0x9A5D, 0x54B2, 0x8DE7, 0x54B3, 0x8A50, 0x54B8, 0x99F7,
+ 0x54BC, 0x9A44, 0x54BD, 0x88F4, 0x54BE, 0x9A43, 0x54C0, 0x88A3,
+ 0x54C1, 0x9569, 0x54C2, 0x9A41, 0x54C4, 0x99FA, 0x54C7, 0x99F5,
+ 0x54C8, 0x99FB, 0x54C9, 0x8DC6, 0x54D8, 0x9A45, 0x54E1, 0x88F5,
+ 0x54E2, 0x9A4E, 0x54E5, 0x9A46, 0x54E6, 0x9A47, 0x54E8, 0x8FA3,
+ 0x54E9, 0x9689, 0x54ED, 0x9A4C, 0x54EE, 0x9A4B, 0x54F2, 0x934E,
+ 0x54FA, 0x9A4D, 0x54FD, 0x9A4A, 0x54FF, 0xFA94, 0x5504, 0x8953,
+ 0x5506, 0x8DB4, 0x5507, 0x904F, 0x550F, 0x9A48, 0x5510, 0x9382,
+ 0x5514, 0x9A49, 0x5516, 0x88A0, 0x552E, 0x9A53, 0x552F, 0x9742,
+ 0x5531, 0x8FA5, 0x5533, 0x9A59, 0x5538, 0x9A58, 0x5539, 0x9A4F,
+ 0x553E, 0x91C1, 0x5540, 0x9A50, 0x5544, 0x91ED, 0x5545, 0x9A55,
+ 0x5546, 0x8FA4, 0x554C, 0x9A52, 0x554F, 0x96E2, 0x5553, 0x8C5B,
+ 0x5556, 0x9A56, 0x5557, 0x9A57, 0x555C, 0x9A54, 0x555D, 0x9A5A,
+ 0x5563, 0x9A51, 0x557B, 0x9A60, 0x557C, 0x9A65, 0x557E, 0x9A61,
+ 0x5580, 0x9A5C, 0x5583, 0x9A66, 0x5584, 0x9150, 0x5586, 0xFA95,
+ 0x5587, 0x9A68, 0x5589, 0x8D41, 0x558A, 0x9A5E, 0x558B, 0x929D,
+ 0x5598, 0x9A62, 0x5599, 0x9A5B, 0x559A, 0x8AAB, 0x559C, 0x8AEC,
+ 0x559D, 0x8A85, 0x559E, 0x9A63, 0x559F, 0x9A5F, 0x55A7, 0x8C96,
+ 0x55A8, 0x9A69, 0x55A9, 0x9A67, 0x55AA, 0x9172, 0x55AB, 0x8B69,
+ 0x55AC, 0x8BAA, 0x55AE, 0x9A64, 0x55B0, 0x8BF2, 0x55B6, 0x8963,
+ 0x55C4, 0x9A6D, 0x55C5, 0x9A6B, 0x55C7, 0x9AA5, 0x55D4, 0x9A70,
+ 0x55DA, 0x9A6A, 0x55DC, 0x9A6E, 0x55DF, 0x9A6C, 0x55E3, 0x8E6B,
+ 0x55E4, 0x9A6F, 0x55F7, 0x9A72, 0x55F9, 0x9A77, 0x55FD, 0x9A75,
+ 0x55FE, 0x9A74, 0x5606, 0x9251, 0x5609, 0x89C3, 0x5614, 0x9A71,
+ 0x5616, 0x9A73, 0x5617, 0x8FA6, 0x5618, 0x8952, 0x561B, 0x9A76,
+ 0x5629, 0x89DC, 0x562F, 0x9A82, 0x5631, 0x8FFA, 0x5632, 0x9A7D,
+ 0x5634, 0x9A7B, 0x5636, 0x9A7C, 0x5638, 0x9A7E, 0x5642, 0x895C,
+ 0x564C, 0x9158, 0x564E, 0x9A78, 0x5650, 0x9A79, 0x565B, 0x8A9A,
+ 0x5664, 0x9A81, 0x5668, 0x8AED, 0x566A, 0x9A84, 0x566B, 0x9A80,
+ 0x566C, 0x9A83, 0x5674, 0x95AC, 0x5678, 0x93D3, 0x567A, 0x94B6,
+ 0x5680, 0x9A86, 0x5686, 0x9A85, 0x5687, 0x8A64, 0x568A, 0x9A87,
+ 0x568F, 0x9A8A, 0x5694, 0x9A89, 0x56A0, 0x9A88, 0x56A2, 0x9458,
+ 0x56A5, 0x9A8B, 0x56AE, 0x9A8C, 0x56B4, 0x9A8E, 0x56B6, 0x9A8D,
+ 0x56BC, 0x9A90, 0x56C0, 0x9A93, 0x56C1, 0x9A91, 0x56C2, 0x9A8F,
+ 0x56C3, 0x9A92, 0x56C8, 0x9A94, 0x56CE, 0x9A95, 0x56D1, 0x9A96,
+ 0x56D3, 0x9A97, 0x56D7, 0x9A98, 0x56D8, 0x9964, 0x56DA, 0x8EFA,
+ 0x56DB, 0x8E6C, 0x56DE, 0x89F1, 0x56E0, 0x88F6, 0x56E3, 0x9263,
+ 0x56EE, 0x9A99, 0x56F0, 0x8DA2, 0x56F2, 0x88CD, 0x56F3, 0x907D,
+ 0x56F9, 0x9A9A, 0x56FA, 0x8CC5, 0x56FD, 0x8D91, 0x56FF, 0x9A9C,
+ 0x5700, 0x9A9B, 0x5703, 0x95DE, 0x5704, 0x9A9D, 0x5708, 0x9A9F,
+ 0x5709, 0x9A9E, 0x570B, 0x9AA0, 0x570D, 0x9AA1, 0x570F, 0x8C97,
+ 0x5712, 0x8980, 0x5713, 0x9AA2, 0x5716, 0x9AA4, 0x5718, 0x9AA3,
+ 0x571C, 0x9AA6, 0x571F, 0x9379, 0x5726, 0x9AA7, 0x5727, 0x88B3,
+ 0x5728, 0x8DDD, 0x572D, 0x8C5C, 0x5730, 0x926E, 0x5737, 0x9AA8,
+ 0x5738, 0x9AA9, 0x573B, 0x9AAB, 0x5740, 0x9AAC, 0x5742, 0x8DE2,
+ 0x5747, 0x8BCF, 0x574A, 0x9656, 0x574E, 0x9AAA, 0x574F, 0x9AAD,
+ 0x5750, 0x8DBF, 0x5751, 0x8D42, 0x5759, 0xFA96, 0x5761, 0x9AB1,
+ 0x5764, 0x8DA3, 0x5765, 0xFA97, 0x5766, 0x9252, 0x5769, 0x9AAE,
+ 0x576A, 0x92D8, 0x577F, 0x9AB2, 0x5782, 0x9082, 0x5788, 0x9AB0,
+ 0x5789, 0x9AB3, 0x578B, 0x8C5E, 0x5793, 0x9AB4, 0x57A0, 0x9AB5,
+ 0x57A2, 0x8D43, 0x57A3, 0x8A5F, 0x57A4, 0x9AB7, 0x57AA, 0x9AB8,
+ 0x57AC, 0xFA98, 0x57B0, 0x9AB9, 0x57B3, 0x9AB6, 0x57C0, 0x9AAF,
+ 0x57C3, 0x9ABA, 0x57C6, 0x9ABB, 0x57C7, 0xFA9A, 0x57C8, 0xFA99,
+ 0x57CB, 0x9684, 0x57CE, 0x8FE9, 0x57D2, 0x9ABD, 0x57D3, 0x9ABE,
+ 0x57D4, 0x9ABC, 0x57D6, 0x9AC0, 0x57DC, 0x9457, 0x57DF, 0x88E6,
+ 0x57E0, 0x9575, 0x57E3, 0x9AC1, 0x57F4, 0x8FFB, 0x57F7, 0x8EB7,
+ 0x57F9, 0x947C, 0x57FA, 0x8AEE, 0x57FC, 0x8DE9, 0x5800, 0x9678,
+ 0x5802, 0x93B0, 0x5805, 0x8C98, 0x5806, 0x91CD, 0x580A, 0x9ABF,
+ 0x580B, 0x9AC2, 0x5815, 0x91C2, 0x5819, 0x9AC3, 0x581D, 0x9AC4,
+ 0x5821, 0x9AC6, 0x5824, 0x92E7, 0x582A, 0x8AAC, 0x582F, 0xEA9F,
+ 0x5830, 0x8981, 0x5831, 0x95F1, 0x5834, 0x8FEA, 0x5835, 0x9367,
+ 0x583A, 0x8DE4, 0x583D, 0x9ACC, 0x5840, 0x95BB, 0x5841, 0x97DB,
+ 0x584A, 0x89F2, 0x584B, 0x9AC8, 0x5851, 0x9159, 0x5852, 0x9ACB,
+ 0x5854, 0x9383, 0x5857, 0x9368, 0x5858, 0x9384, 0x5859, 0x94B7,
+ 0x585A, 0x92CB, 0x585E, 0x8DC7, 0x5862, 0x9AC7, 0x5869, 0x8996,
+ 0x586B, 0x9355, 0x5870, 0x9AC9, 0x5872, 0x9AC5, 0x5875, 0x906F,
+ 0x5879, 0x9ACD, 0x587E, 0x8F6D, 0x5883, 0x8BAB, 0x5885, 0x9ACE,
+ 0x5893, 0x95E6, 0x5897, 0x919D, 0x589C, 0x92C4, 0x589E, 0xFA9D,
+ 0x589F, 0x9AD0, 0x58A8, 0x966E, 0x58AB, 0x9AD1, 0x58AE, 0x9AD6,
+ 0x58B2, 0xFA9E, 0x58B3, 0x95AD, 0x58B8, 0x9AD5, 0x58B9, 0x9ACF,
+ 0x58BA, 0x9AD2, 0x58BB, 0x9AD4, 0x58BE, 0x8DA4, 0x58C1, 0x95C7,
+ 0x58C5, 0x9AD7, 0x58C7, 0x9264, 0x58CA, 0x89F3, 0x58CC, 0x8FEB,
+ 0x58D1, 0x9AD9, 0x58D3, 0x9AD8, 0x58D5, 0x8D88, 0x58D7, 0x9ADA,
+ 0x58D8, 0x9ADC, 0x58D9, 0x9ADB, 0x58DC, 0x9ADE, 0x58DE, 0x9AD3,
+ 0x58DF, 0x9AE0, 0x58E4, 0x9ADF, 0x58E5, 0x9ADD, 0x58EB, 0x8E6D,
+ 0x58EC, 0x9070, 0x58EE, 0x9173, 0x58EF, 0x9AE1, 0x58F0, 0x90BA,
+ 0x58F1, 0x88EB, 0x58F2, 0x9484, 0x58F7, 0x92D9, 0x58F9, 0x9AE3,
+ 0x58FA, 0x9AE2, 0x58FB, 0x9AE4, 0x58FC, 0x9AE5, 0x58FD, 0x9AE6,
+ 0x5902, 0x9AE7, 0x5909, 0x95CF, 0x590A, 0x9AE8, 0x590B, 0xFA9F,
+ 0x590F, 0x89C4, 0x5910, 0x9AE9, 0x5915, 0x975B, 0x5916, 0x8A4F,
+ 0x5918, 0x99C7, 0x5919, 0x8F67, 0x591A, 0x91BD, 0x591B, 0x9AEA,
+ 0x591C, 0x96E9, 0x5922, 0x96B2, 0x5925, 0x9AEC, 0x5927, 0x91E5,
+ 0x5929, 0x9356, 0x592A, 0x91BE, 0x592B, 0x9576, 0x592C, 0x9AED,
+ 0x592D, 0x9AEE, 0x592E, 0x899B, 0x5931, 0x8EB8, 0x5932, 0x9AEF,
+ 0x5937, 0x88CE, 0x5938, 0x9AF0, 0x593E, 0x9AF1, 0x5944, 0x8982,
+ 0x5947, 0x8AEF, 0x5948, 0x93DE, 0x5949, 0x95F2, 0x594E, 0x9AF5,
+ 0x594F, 0x9174, 0x5950, 0x9AF4, 0x5951, 0x8C5F, 0x5953, 0xFAA0,
+ 0x5954, 0x967A, 0x5955, 0x9AF3, 0x5957, 0x9385, 0x5958, 0x9AF7,
+ 0x595A, 0x9AF6, 0x595B, 0xFAA1, 0x595D, 0xFAA2, 0x5960, 0x9AF9,
+ 0x5962, 0x9AF8, 0x5963, 0xFAA3, 0x5965, 0x899C, 0x5967, 0x9AFA,
+ 0x5968, 0x8FA7, 0x5969, 0x9AFC, 0x596A, 0x9244, 0x596C, 0x9AFB,
+ 0x596E, 0x95B1, 0x5973, 0x8F97, 0x5974, 0x937A, 0x5978, 0x9B40,
+ 0x597D, 0x8D44, 0x5981, 0x9B41, 0x5982, 0x9440, 0x5983, 0x94DC,
+ 0x5984, 0x96CF, 0x598A, 0x9444, 0x598D, 0x9B4A, 0x5993, 0x8B57,
+ 0x5996, 0x9764, 0x5999, 0x96AD, 0x599B, 0x9BAA, 0x599D, 0x9B42,
+ 0x59A3, 0x9B45, 0x59A4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 0x93BE, 0x5F98, 0x9C70, 0x5F99, 0x9C6F,
+ 0x5F9E, 0x9C6E, 0x5FA0, 0x9C71, 0x5FA1, 0x8CE4, 0x5FA8, 0x9C72,
+ 0x5FA9, 0x959C, 0x5FAA, 0x8F7A, 0x5FAD, 0x9C73, 0x5FAE, 0x94F7,
+ 0x5FB3, 0x93BF, 0x5FB4, 0x92A5, 0x5FB7, 0xFABA, 0x5FB9, 0x934F,
+ 0x5FBC, 0x9C74, 0x5FBD, 0x8B4A, 0x5FC3, 0x9053, 0x5FC5, 0x954B,
+ 0x5FCC, 0x8AF5, 0x5FCD, 0x9445, 0x5FD6, 0x9C75, 0x5FD7, 0x8E75,
+ 0x5FD8, 0x9659, 0x5FD9, 0x965A, 0x5FDC, 0x899E, 0x5FDD, 0x9C7A,
+ 0x5FDE, 0xFABB, 0x5FE0, 0x9289, 0x5FE4, 0x9C77, 0x5FEB, 0x89F5,
+ 0x5FF0, 0x9CAB, 0x5FF1, 0x9C79, 0x5FF5, 0x944F, 0x5FF8, 0x9C78,
+ 0x5FFB, 0x9C76, 0x5FFD, 0x8D9A, 0x5FFF, 0x9C7C, 0x600E, 0x9C83,
+ 0x600F, 0x9C89, 0x6010, 0x9C81, 0x6012, 0x937B, 0x6015, 0x9C86,
+ 0x6016, 0x957C, 0x6019, 0x9C80, 0x601B, 0x9C85, 0x601C, 0x97E5,
+ 0x601D, 0x8E76, 0x6020, 0x91D3, 0x6021, 0x9C7D, 0x6025, 0x8B7D,
+ 0x6026, 0x9C88, 0x6027, 0x90AB, 0x6028, 0x8985, 0x6029, 0x9C82,
+ 0x602A, 0x89F6, 0x602B, 0x9C87, 0x602F, 0x8BAF, 0x6031, 0x9C84,
+ 0x603A, 0x9C8A, 0x6041, 0x9C8C, 0x6042, 0x9C96, 0x6043, 0x9C94,
+ 0x6046, 0x9C91, 0x604A, 0x9C90, 0x604B, 0x97F6, 0x604D, 0x9C92,
+ 0x6050, 0x8BB0, 0x6052, 0x8D50, 0x6055, 0x8F9A, 0x6059, 0x9C99,
+ 0x605A, 0x9C8B, 0x605D, 0xFABC, 0x605F, 0x9C8F, 0x6060, 0x9C7E,
+ 0x6062, 0x89F8, 0x6063, 0x9C93, 0x6064, 0x9C95, 0x6065, 0x9270,
+ 0x6068, 0x8DA6, 0x6069, 0x89B6, 0x606A, 0x9C8D, 0x606B, 0x9C98,
+ 0x606C, 0x9C97, 0x606D, 0x8BB1, 0x606F, 0x91A7, 0x6070, 0x8A86,
+ 0x6075, 0x8C62, 0x6077, 0x9C8E, 0x6081, 0x9C9A, 0x6083, 0x9C9D,
+ 0x6084, 0x9C9F, 0x6085, 0xFABD, 0x6089, 0x8EBB, 0x608A, 0xFABE,
+ 0x608B, 0x9CA5, 0x608C, 0x92EE, 0x608D, 0x9C9B, 0x6092, 0x9CA3,
+ 0x6094, 0x89F7, 0x6096, 0x9CA1, 0x6097, 0x9CA2, 0x609A, 0x9C9E,
+ 0x609B, 0x9CA0, 0x609F, 0x8CE5, 0x60A0, 0x9749, 0x60A3, 0x8AB3,
+ 0x60A6, 0x8978, 0x60A7, 0x9CA4, 0x60A9, 0x9459, 0x60AA, 0x88AB,
+ 0x60B2, 0x94DF, 0x60B3, 0x9C7B, 0x60B4, 0x9CAA, 0x60B5, 0x9CAE,
+ 0x60B6, 0x96E3, 0x60B8, 0x9CA7, 0x60BC, 0x9389, 0x60BD, 0x9CAC,
+ 0x60C5, 0x8FEE, 0x60C6, 0x9CAD, 0x60C7, 0x93D5, 0x60D1, 0x9866,
+ 0x60D3, 0x9CA9, 0x60D5, 0xFAC0, 0x60D8, 0x9CAF, 0x60DA, 0x8D9B,
+ 0x60DC, 0x90C9, 0x60DE, 0xFABF, 0x60DF, 0x88D2, 0x60E0, 0x9CA8,
+ 0x60E1, 0x9CA6, 0x60E3, 0x9179, 0x60E7, 0x9C9C, 0x60E8, 0x8E53,
+ 0x60F0, 0x91C4, 0x60F1, 0x9CBB, 0x60F2, 0xFAC2, 0x60F3, 0x917A,
+ 0x60F4, 0x9CB6, 0x60F6, 0x9CB3, 0x60F7, 0x9CB4, 0x60F9, 0x8EE4,
+ 0x60FA, 0x9CB7, 0x60FB, 0x9CBA, 0x6100, 0x9CB5, 0x6101, 0x8F44,
+ 0x6103, 0x9CB8, 0x6106, 0x9CB2, 0x6108, 0x96FA, 0x6109, 0x96F9,
+ 0x610D, 0x9CBC, 0x610E, 0x9CBD, 0x610F, 0x88D3, 0x6111, 0xFAC3,
+ 0x6115, 0x9CB1, 0x611A, 0x8BF0, 0x611B, 0x88A4, 0x611F, 0x8AB4,
+ 0x6120, 0xFAC1, 0x6121, 0x9CB9, 0x6127, 0x9CC1, 0x6128, 0x9CC0,
+ 0x612C, 0x9CC5, 0x6130, 0xFAC5, 0x6134, 0x9CC6, 0x6137, 0xFAC4,
+ 0x613C, 0x9CC4, 0x613D, 0x9CC7, 0x613E, 0x9CBF, 0x613F, 0x9CC3,
+ 0x6142, 0x9CC8, 0x6144, 0x9CC9, 0x6147, 0x9CBE, 0x6148, 0x8E9C,
+ 0x614A, 0x9CC2, 0x614B, 0x91D4, 0x614C, 0x8D51, 0x614D, 0x9CB0,
+ 0x614E, 0x9054, 0x6153, 0x9CD6, 0x6155, 0x95E7, 0x6158, 0x9CCC,
+ 0x6159, 0x9CCD, 0x615A, 0x9CCE, 0x615D, 0x9CD5, 0x615F, 0x9CD4,
+ 0x6162, 0x969D, 0x6163, 0x8AB5, 0x6165, 0x9CD2, 0x6167, 0x8C64,
+ 0x6168, 0x8A53, 0x616B, 0x9CCF, 0x616E, 0x97B6, 0x616F, 0x9CD1,
+ 0x6170, 0x88D4, 0x6171, 0x9CD3, 0x6173, 0x9CCA, 0x6174, 0x9CD0,
+ 0x6175, 0x9CD7, 0x6176, 0x8C63, 0x6177, 0x9CCB, 0x617E, 0x977C,
+ 0x6182, 0x974A, 0x6187, 0x9CDA, 0x618A, 0x9CDE, 0x618E, 0x919E,
+ 0x6190, 0x97F7, 0x6191, 0x9CDF, 0x6194, 0x9CDC, 0x6196, 0x9CD9,
+ 0x6198, 0xFAC6, 0x6199, 0x9CD8, 0x619A, 0x9CDD, 0x61A4, 0x95AE,
+ 0x61A7, 0x93B2, 0x61A9, 0x8C65, 0x61AB, 0x9CE0, 0x61AC, 0x9CDB,
+ 0x61AE, 0x9CE1, 0x61B2, 0x8C9B, 0x61B6, 0x89AF, 0x61BA, 0x9CE9,
+ 0x61BE, 0x8AB6, 0x61C3, 0x9CE7, 0x61C6, 0x9CE8, 0x61C7, 0x8DA7,
+ 0x61C8, 0x9CE6, 0x61C9, 0x9CE4, 0x61CA, 0x9CE3, 0x61CB, 0x9CEA,
+ 0x61CC, 0x9CE2, 0x61CD, 0x9CEC, 0x61D0, 0x89F9, 0x61E3, 0x9CEE,
+ 0x61E6, 0x9CED, 0x61F2, 0x92A6, 0x61F4, 0x9CF1, 0x61F6, 0x9CEF,
+ 0x61F7, 0x9CE5, 0x61F8, 0x8C9C, 0x61FA, 0x9CF0, 0x61FC, 0x9CF4,
+ 0x61FD, 0x9CF3, 0x61FE, 0x9CF5, 0x61FF, 0x9CF2, 0x6200, 0x9CF6,
+ 0x6208, 0x9CF7, 0x6209, 0x9CF8, 0x620A, 0x95E8, 0x620C, 0x9CFA,
+ 0x620D, 0x9CF9, 0x620E, 0x8F5E, 0x6210, 0x90AC, 0x6211, 0x89E4,
+ 0x6212, 0x89FA, 0x6213, 0xFAC7, 0x6214, 0x9CFB, 0x6216, 0x88BD,
+ 0x621A, 0x90CA, 0x621B, 0x9CFC, 0x621D, 0xE6C1, 0x621E, 0x9D40,
+ 0x621F, 0x8C81, 0x6221, 0x9D41, 0x6226, 0x90ED, 0x622A, 0x9D42,
+ 0x622E, 0x9D43, 0x622F, 0x8B59, 0x6230, 0x9D44, 0x6232, 0x9D45,
+ 0x6233, 0x9D46, 0x6234, 0x91D5, 0x6238, 0x8CCB, 0x623B, 0x96DF,
+ 0x623F, 0x965B, 0x6240, 0x8F8A, 0x6241, 0x9D47, 0x6247, 0x90EE,
+ 0x6248, 0xE7BB, 0x6249, 0x94E0, 0x624B, 0x8EE8, 0x624D, 0x8DCB,
+ 0x624E, 0x9D48, 0x6253, 0x91C5, 0x6255, 0x95A5, 0x6258, 0x91EF,
+ 0x625B, 0x9D4B, 0x625E, 0x9D49, 0x6260, 0x9D4C, 0x6263, 0x9D4A,
+ 0x6268, 0x9D4D, 0x626E, 0x95AF, 0x6271, 0x88B5, 0x6276, 0x957D,
+ 0x6279, 0x94E1, 0x627C, 0x9D4E, 0x627E, 0x9D51, 0x627F, 0x8FB3,
+ 0x6280, 0x8B5A, 0x6282, 0x9D4F, 0x6283, 0x9D56, 0x6284, 0x8FB4,
+ 0x6289, 0x9D50, 0x628A, 0x9463, 0x6291, 0x977D, 0x6292, 0x9D52,
+ 0x6293, 0x9D53, 0x6294, 0x9D57, 0x6295, 0x938A, 0x6296, 0x9D54,
+ 0x6297, 0x8D52, 0x6298, 0x90DC, 0x629B, 0x9D65, 0x629C, 0x94B2,
+ 0x629E, 0x91F0, 0x62A6, 0xFAC8, 0x62AB, 0x94E2, 0x62AC, 0x9DAB,
+ 0x62B1, 0x95F8, 0x62B5, 0x92EF, 0x62B9, 0x9695, 0x62BB, 0x9D5A,
+ 0x62BC, 0x899F, 0x62BD, 0x928A, 0x62C2, 0x9D63, 0x62C5, 0x9253,
+ 0x62C6, 0x9D5D, 0x62C7, 0x9D64, 0x62C8, 0x9D5F, 0x62C9, 0x9D66,
+ 0x62CA, 0x9D62, 0x62CC, 0x9D61, 0x62CD, 0x948F, 0x62CF, 0x9D5B,
+ 0x62D0, 0x89FB, 0x62D1, 0x9D59, 0x62D2, 0x8B91, 0x62D3, 0x91F1,
+ 0x62D4, 0x9D55, 0x62D7, 0x9D58, 0x62D8, 0x8D53, 0x62D9, 0x90D9,
+ 0x62DB, 0x8FB5, 0x62DC, 0x9D60, 0x62DD, 0x9471, 0x62E0, 0x8B92,
+ 0x62E1, 0x8A67, 0x62EC, 0x8A87, 0x62ED, 0x9040, 0x62EE, 0x9D68,
+ 0x62EF, 0x9D6D, 0x62F1, 0x9D69, 0x62F3, 0x8C9D, 0x62F5, 0x9D6E,
+ 0x62F6, 0x8E41, 0x62F7, 0x8D89, 0x62FE, 0x8F45, 0x62FF, 0x9D5C,
+ 0x6301, 0x8E9D, 0x6302, 0x9D6B, 0x6307, 0x8E77, 0x6308, 0x9D6C,
+ 0x6309, 0x88C2, 0x630C, 0x9D67, 0x6311, 0x92A7, 0x6319, 0x8B93,
+ 0x631F, 0x8BB2, 0x6327, 0x9D6A, 0x6328, 0x88A5, 0x632B, 0x8DC1,
+ 0x632F, 0x9055, 0x633A, 0x92F0, 0x633D, 0x94D2, 0x633E, 0x9D70,
+ 0x633F, 0x917D, 0x6349, 0x91A8, 0x634C, 0x8E4A, 0x634D, 0x9D71,
+ 0x634F, 0x9D73, 0x6350, 0x9D6F, 0x6355, 0x95DF, 0x6357, 0x92BB,
+ 0x635C, 0x917B, 0x6367, 0x95F9, 0x6368, 0x8ECC, 0x6369, 0x9D80,
+ 0x636B, 0x9D7E, 0x636E, 0x9098, 0x6372, 0x8C9E, 0x6376, 0x9D78,
+ 0x6377, 0x8FB7, 0x637A, 0x93E6, 0x637B, 0x9450, 0x6380, 0x9D76,
+ 0x6383, 0x917C, 0x6388, 0x8EF6, 0x6389, 0x9D7B, 0x638C, 0x8FB6,
+ 0x638E, 0x9D75, 0x638F, 0x9D7A, 0x6392, 0x9472, 0x6396, 0x9D74,
+ 0x6398, 0x8C40, 0x639B, 0x8A7C, 0x639F, 0x9D7C, 0x63A0, 0x97A9,
+ 0x63A1, 0x8DCC, 0x63A2, 0x9254, 0x63A3, 0x9D79, 0x63A5, 0x90DA,
+ 0x63A7, 0x8D54, 0x63A8, 0x9084, 0x63A9, 0x8986, 0x63AA, 0x915B,
+ 0x63AB, 0x9D77, 0x63AC, 0x8B64, 0x63B2, 0x8C66, 0x63B4, 0x92CD,
+ 0x63B5, 0x9D7D, 0x63BB, 0x917E, 0x63BE, 0x9D81, 0x63C0, 0x9D83,
+ 0x63C3, 0x91B5, 0x63C4, 0x9D89, 0x63C6, 0x9D84, 0x63C9, 0x9D86,
+ 0x63CF, 0x9560, 0x63D0, 0x92F1, 0x63D2, 0x9D87, 0x63D6, 0x974B,
+ 0x63DA, 0x9767, 0x63DB, 0x8AB7, 0x63E1, 0x88AC, 0x63E3, 0x9D85,
+ 0x63E9, 0x9D82, 0x63EE, 0x8AF6, 0x63F4, 0x8987, 0x63F5, 0xFAC9,
+ 0x63F6, 0x9D88, 0x63FA, 0x9768, 0x6406, 0x9D8C, 0x640D, 0x91B9,
+ 0x640F, 0x9D93, 0x6413, 0x9D8D, 0x6416, 0x9D8A, 0x6417, 0x9D91,
+ 0x641C, 0x9D72, 0x6426, 0x9D8E, 0x6428, 0x9D92, 0x642C, 0x94C0,
+ 0x642D, 0x938B, 0x6434, 0x9D8B, 0x6436, 0x9D8F, 0x643A, 0x8C67,
+ 0x643E, 0x8DEF, 0x6442, 0x90DB, 0x644E, 0x9D97, 0x6458, 0x9345,
+ 0x6460, 0xFACA, 0x6467, 0x9D94, 0x6469, 0x9680, 0x646F, 0x9D95,
+ 0x6476, 0x9D96, 0x6478, 0x96CC, 0x647A, 0x90A0, 0x6483, 0x8C82,
+ 0x6488, 0x9D9D, 0x6492, 0x8E54, 0x6493, 0x9D9A, 0x6495, 0x9D99,
+ 0x649A, 0x9451, 0x649D, 0xFACB, 0x649E, 0x93B3, 0x64A4, 0x9350,
+ 0x64A5, 0x9D9B, 0x64A9, 0x9D9C, 0x64AB, 0x958F, 0x64AD, 0x9464,
+ 0x64AE, 0x8E42, 0x64B0, 0x90EF, 0x64B2, 0x966F, 0x64B9, 0x8A68,
+ 0x64BB, 0x9DA3, 0x64BC, 0x9D9E, 0x64C1, 0x9769, 0x64C2, 0x9DA5,
+ 0x64C5, 0x9DA1, 0x64C7, 0x9DA2, 0x64CD, 0x9180, 0x64CE, 0xFACC,
+ 0x64D2, 0x9DA0, 0x64D4, 0x9D5E, 0x64D8, 0x9DA4, 0x64DA, 0x9D9F,
+ 0x64E0, 0x9DA9, 0x64E1, 0x9DAA, 0x64E2, 0x9346, 0x64E3, 0x9DAC,
+ 0x64E6, 0x8E43, 0x64E7, 0x9DA7, 0x64EC, 0x8B5B, 0x64EF, 0x9DAD,
+ 0x64F1, 0x9DA6, 0x64F2, 0x9DB1, 0x64F4, 0x9DB0, 0x64F6, 0x9DAF,
+ 0x64FA, 0x9DB2, 0x64FD, 0x9DB4, 0x64FE, 0x8FEF, 0x6500, 0x9DB3,
+ 0x6505, 0x9DB7, 0x6518, 0x9DB5, 0x651C, 0x9DB6, 0x651D, 0x9D90,
+ 0x6523, 0x9DB9, 0x6524, 0x9DB8, 0x652A, 0x9D98, 0x652B, 0x9DBA,
+ 0x652C, 0x9DAE, 0x652F, 0x8E78, 0x6534, 0x9DBB, 0x6535, 0x9DBC,
+ 0x6536, 0x9DBE, 0x6537, 0x9DBD, 0x6538, 0x9DBF, 0x6539, 0x89FC,
+ 0x653B, 0x8D55, 0x653E, 0x95FA, 0x653F, 0x90AD, 0x6545, 0x8CCC,
+ 0x6548, 0x9DC1, 0x654D, 0x9DC4, 0x654E, 0xFACD, 0x654F, 0x9571,
+ 0x6551, 0x8B7E, 0x6555, 0x9DC3, 0x6556, 0x9DC2, 0x6557, 0x9473,
+ 0x6558, 0x9DC5, 0x6559, 0x8BB3, 0x655D, 0x9DC7, 0x655E, 0x9DC6,
+ 0x6562, 0x8AB8, 0x6563, 0x8E55, 0x6566, 0x93D6, 0x656C, 0x8C68,
+ 0x6570, 0x9094, 0x6572, 0x9DC8, 0x6574, 0x90AE, 0x6575, 0x9347,
+ 0x6577, 0x957E, 0x6578, 0x9DC9, 0x6582, 0x9DCA, 0x6583, 0x9DCB,
+ 0x6587, 0x95B6, 0x6588, 0x9B7C, 0x6589, 0x90C4, 0x658C, 0x956B,
+ 0x658E, 0x8DD6, 0x6590, 0x94E3, 0x6591, 0x94C1, 0x6597, 0x936C,
+ 0x6599, 0x97BF, 0x659B, 0x9DCD, 0x659C, 0x8ECE, 0x659F, 0x9DCE,
+ 0x65A1, 0x88B4, 0x65A4, 0x8BD2, 0x65A5, 0x90CB, 0x65A7, 0x9580,
+ 0x65AB, 0x9DCF, 0x65AC, 0x8E61, 0x65AD, 0x9266, 0x65AF, 0x8E7A,
+ 0x65B0, 0x9056, 0x65B7, 0x9DD0, 0x65B9, 0x95FB, 0x65BC, 0x8997,
+ 0x65BD, 0x8E7B, 0x65C1, 0x9DD3, 0x65C3, 0x9DD1, 0x65C4, 0x9DD4,
+ 0x65C5, 0x97B7, 0x65C6, 0x9DD2, 0x65CB, 0x90F9, 0x65CC, 0x9DD5,
+ 0x65CF, 0x91B0, 0x65D2, 0x9DD6, 0x65D7, 0x8AF8, 0x65D9, 0x9DD8,
+ 0x65DB, 0x9DD7, 0x65E0, 0x9DD9, 0x65E1, 0x9DDA, 0x65E2, 0x8AF9,
+ 0x65E5, 0x93FA, 0x65E6, 0x9255, 0x65E7, 0x8B8C, 0x65E8, 0x8E7C,
+ 0x65E9, 0x9181, 0x65EC, 0x8F7B, 0x65ED, 0x88AE, 0x65F1, 0x9DDB,
+ 0x65FA, 0x89A0, 0x65FB, 0x9DDF, 0x6600, 0xFACE, 0x6602, 0x8D56,
+ 0x6603, 0x9DDE, 0x6606, 0x8DA9, 0x6607, 0x8FB8, 0x6609, 0xFAD1,
+ 0x660A, 0x9DDD, 0x660C, 0x8FB9, 0x660E, 0x96BE, 0x660F, 0x8DA8,
+ 0x6613, 0x88D5, 0x6614, 0x90CC, 0x6615, 0xFACF, 0x661C, 0x9DE4,
+ 0x661E, 0xFAD3, 0x661F, 0x90AF, 0x6620, 0x8966, 0x6624, 0xFAD4,
+ 0x6625, 0x8F74, 0x6627, 0x9686, 0x6628, 0x8DF0, 0x662D, 0x8FBA,
+ 0x662E, 0xFAD2, 0x662F, 0x90A5, 0x6631, 0xFA63, 0x6634, 0x9DE3,
+ 0x6635, 0x9DE1, 0x6636, 0x9DE2, 0x663B, 0xFAD0, 0x663C, 0x928B,
+ 0x663F, 0x9E45, 0x6641, 0x9DE8, 0x6642, 0x8E9E, 0x6643, 0x8D57,
+ 0x6644, 0x9DE6, 0x6649, 0x9DE7, 0x664B, 0x9057, 0x664F, 0x9DE5,
+ 0x6652, 0x8E4E, 0x6657, 0xFAD6, 0x6659, 0xFAD7, 0x665D, 0x9DEA,
+ 0x665E, 0x9DE9, 0x665F, 0x9DEE, 0x6662, 0x9DEF, 0x6664, 0x9DEB,
+ 0x6665, 0xFAD5, 0x6666, 0x8A41, 0x6667, 0x9DEC, 0x6668, 0x9DED,
+ 0x6669, 0x94D3, 0x666E, 0x9581, 0x666F, 0x8C69, 0x6670, 0x9DF0,
+ 0x6673, 0xFAD9, 0x6674, 0x90B0, 0x6676, 0x8FBB, 0x667A, 0x9271,
+ 0x6681, 0x8BC5, 0x6683, 0x9DF1, 0x6684, 0x9DF5, 0x6687, 0x89C9,
+ 0x6688, 0x9DF2, 0x6689, 0x9DF4, 0x668E, 0x9DF3, 0x6691, 0x8F8B,
+ 0x6696, 0x9267, 0x6697, 0x88C3, 0x6698, 0x9DF6, 0x6699, 0xFADA,
+ 0x669D, 0x9DF7, 0x66A0, 0xFADB, 0x66A2, 0x92A8, 0x66A6, 0x97EF,
+ 0x66AB, 0x8E62, 0x66AE, 0x95E9, 0x66B2, 0xFADC, 0x66B4, 0x965C,
+ 0x66B8, 0x9E41, 0x66B9, 0x9DF9, 0x66BC, 0x9DFC, 0x66BE, 0x9DFB,
+ 0x66BF, 0xFADD, 0x66C1, 0x9DF8, 0x66C4, 0x9E40, 0x66C7, 0x93DC,
+ 0x66C9, 0x9DFA, 0x66D6, 0x9E42, 0x66D9, 0x8F8C, 0x66DA, 0x9E43,
+ 0x66DC, 0x976A, 0x66DD, 0x9498, 0x66E0, 0x9E44, 0x66E6, 0x9E46,
+ 0x66E9, 0x9E47, 0x66F0, 0x9E48, 0x66F2, 0x8BC8, 0x66F3, 0x8967,
+ 0x66F4, 0x8D58, 0x66F5, 0x9E49, 0x66F7, 0x9E4A, 0x66F8, 0x8F91,
+ 0x66F9, 0x9182, 0x66FA, 0xFADE, 0x66FB, 0xFA66, 0x66FC, 0x99D6,
+ 0x66FD, 0x915D, 0x66FE, 0x915C, 0x66FF, 0x91D6, 0x6700, 0x8DC5,
+ 0x6703, 0x98F0, 0x6708, 0x8C8E, 0x6709, 0x974C, 0x670B, 0x95FC,
+ 0x670D, 0x959E, 0x670E, 0xFADF, 0x670F, 0x9E4B, 0x6714, 0x8DF1,
+ 0x6715, 0x92BD, 0x6716, 0x9E4C, 0x6717, 0x984E, 0x671B, 0x965D,
+ 0x671D, 0x92A9, 0x671E, 0x9E4D, 0x671F, 0x8AFA, 0x6726, 0x9E4E,
+ 0x6727, 0x9E4F, 0x6728, 0x96D8, 0x672A, 0x96A2, 0x672B, 0x9696,
+ 0x672C, 0x967B, 0x672D, 0x8E44, 0x672E, 0x9E51, 0x6731, 0x8EE9,
+ 0x6734, 0x9670, 0x6736, 0x9E53, 0x6737, 0x9E56, 0x6738, 0x9E55,
+ 0x673A, 0x8AF7, 0x673D, 0x8B80, 0x673F, 0x9E52, 0x6741, 0x9E54,
+ 0x6746, 0x9E57, 0x6749, 0x9099, 0x674E, 0x979B, 0x674F, 0x88C7,
+ 0x6750, 0x8DDE, 0x6751, 0x91BA, 0x6753, 0x8EDB, 0x6756, 0x8FF1,
+ 0x6759, 0x9E5A, 0x675C, 0x936D, 0x675E, 0x9E58, 0x675F, 0x91A9,
+ 0x6760, 0x9E59, 0x6761, 0x8FF0, 0x6762, 0x96DB, 0x6763, 0x9E5B,
+ 0x6764, 0x9E5C, 0x6765, 0x9788, 0x6766, 0xFAE1, 0x676A, 0x9E61,
+ 0x676D, 0x8D59, 0x676F, 0x9474, 0x6770, 0x9E5E, 0x6771, 0x938C,
+ 0x6772, 0x9DDC, 0x6773, 0x9DE0, 0x6775, 0x8B6E, 0x6777, 0x9466,
+ 0x677C, 0x9E60, 0x677E, 0x8FBC, 0x677F, 0x94C2, 0x6785, 0x9E66,
+ 0x6787, 0x94F8, 0x6789, 0x9E5D, 0x678B, 0x9E63, 0x678C, 0x9E62,
+ 0x6790, 0x90CD, 0x6795, 0x968D, 0x6797, 0x97D1, 0x679A, 0x9687,
+ 0x679C, 0x89CA, 0x679D, 0x8E7D, 0x67A0, 0x9867, 0x67A1, 0x9E65,
+ 0x67A2, 0x9095, 0x67A6, 0x9E64, 0x67A9, 0x9E5F, 0x67AF, 0x8CCD,
+ 0x67B3, 0x9E6B, 0x67B4, 0x9E69, 0x67B6, 0x89CB, 0x67B7, 0x9E67,
+ 0x67B8, 0x9E6D, 0x67B9, 0x9E73, 0x67BB, 0xFAE2, 0x67C0, 0xFAE4,
+ 0x67C1, 0x91C6, 0x67C4, 0x95BF, 0x67C6, 0x9E75, 0x67CA, 0x9541,
+ 0x67CE, 0x9E74, 0x67CF, 0x9490, 0x67D0, 0x965E, 0x67D1, 0x8AB9,
+ 0x67D3, 0x90F5, 0x67D4, 0x8F5F, 0x67D8, 0x92D1, 0x67DA, 0x974D,
+ 0x67DD, 0x9E70, 0x67DE, 0x9E6F, 0x67E2, 0x9E71, 0x67E4, 0x9E6E,
+ 0x67E7, 0x9E76, 0x67E9, 0x9E6C, 0x67EC, 0x9E6A, 0x67EE, 0x9E72,
+ 0x67EF, 0x9E68, 0x67F1, 0x928C, 0x67F3, 0x96F6, 0x67F4, 0x8EC4,
+ 0x67F5, 0x8DF2, 0x67FB, 0x8DB8, 0x67FE, 0x968F, 0x67FF, 0x8A60,
+ 0x6801, 0xFAE5, 0x6802, 0x92CC, 0x6803, 0x93C8, 0x6804, 0x8968,
+ 0x6813, 0x90F0, 0x6816, 0x90B2, 0x6817, 0x8C49, 0x681E, 0x9E78,
+ 0x6821, 0x8D5A, 0x6822, 0x8A9C, 0x6829, 0x9E7A, 0x682A, 0x8A94,
+ 0x682B, 0x9E81, 0x6832, 0x9E7D, 0x6834, 0x90F1, 0x6838, 0x8A6A,
+ 0x6839, 0x8DAA, 0x683C, 0x8A69, 0x683D, 0x8DCD, 0x6840, 0x9E7B,
+ 0x6841, 0x8C85, 0x6842, 0x8C6A, 0x6843, 0x938D, 0x6844, 0xFAE6,
+ 0x6846, 0x9E79, 0x6848, 0x88C4, 0x684D, 0x9E7C, 0x684E, 0x9E7E,
+ 0x6850, 0x8BCB, 0x6851, 0x8C4B, 0x6852, 0xFAE3, 0x6853, 0x8ABA,
+ 0x6854, 0x8B6A, 0x6859, 0x9E82, 0x685C, 0x8DF7, 0x685D, 0x9691,
+ 0x685F, 0x8E56, 0x6863, 0x9E83, 0x6867, 0x954F, 0x6874, 0x9E8F,
+ 0x6876, 0x89B1, 0x6877, 0x9E84, 0x687E, 0x9E95, 0x687F, 0x9E85,
+ 0x6881, 0x97C0, 0x6883, 0x9E8C, 0x6885, 0x947E, 0x688D, 0x9E94,
+ 0x688F, 0x9E87, 0x6893, 0x88B2, 0x6894, 0x9E89, 0x6897, 0x8D5B,
+ 0x689B, 0x9E8B, 0x689D, 0x9E8A, 0x689F, 0x9E86, 0x68A0, 0x9E91,
+ 0x68A2, 0x8FBD, 0x68A6, 0x9AEB, 0x68A7, 0x8CE6, 0x68A8, 0x979C,
+ 0x68AD, 0x9E88, 0x68AF, 0x92F2, 0x68B0, 0x8A42, 0x68B1, 0x8DAB,
+ 0x68B3, 0x9E80, 0x68B5, 0x9E90, 0x68B6, 0x8A81, 0x68B9, 0x9E8E,
+ 0x68BA, 0x9E92, 0x68BC, 0x938E, 0x68C4, 0x8AFC, 0x68C6, 0x9EB0,
+ 0x68C8, 0xFA64, 0x68C9, 0x96C7, 0x68CA, 0x9E97, 0x68CB, 0x8AFB,
+ 0x68CD, 0x9E9E, 0x68CF, 0xFAE7, 0x68D2, 0x965F, 0x68D4, 0x9E9F,
+ 0x68D5, 0x9EA1, 0x68D7, 0x9EA5, 0x68D8, 0x9E99, 0x68DA, 0x9249,
+ 0x68DF, 0x938F, 0x68E0, 0x9EA9, 0x68E1, 0x9E9C, 0x68E3, 0x9EA6,
+ 0x68E7, 0x9EA0, 0x68EE, 0x9058, 0x68EF, 0x9EAA, 0x68F2, 0x90B1,
+ 0x68F9, 0x9EA8, 0x68FA, 0x8ABB, 0x6900, 0x986F, 0x6901, 0x9E96,
+ 0x6904, 0x9EA4, 0x6905, 0x88D6, 0x6908, 0x9E98, 0x690B, 0x96B8,
+ 0x690C, 0x9E9D, 0x690D, 0x9041, 0x690E, 0x92C5, 0x690F, 0x9E93,
+ 0x6912, 0x9EA3, 0x6919, 0x909A, 0x691A, 0x9EAD, 0x691B, 0x8A91,
+ 0x691C, 0x8C9F, 0x6921, 0x9EAF, 0x6922, 0x9E9A, 0x6923, 0x9EAE,
+ 0x6925, 0x9EA7, 0x6926, 0x9E9B, 0x6928, 0x9EAB, 0x692A, 0x9EAC,
+ 0x6930, 0x9EBD, 0x6934, 0x93CC, 0x6936, 0x9EA2, 0x6939, 0x9EB9,
+ 0x693D, 0x9EBB, 0x693F, 0x92D6, 0x694A, 0x976B, 0x6953, 0x9596,
+ 0x6954, 0x9EB6, 0x6955, 0x91C8, 0x6959, 0x9EBC, 0x695A, 0x915E,
+ 0x695C, 0x9EB3, 0x695D, 0x9EC0, 0x695E, 0x9EBF, 0x6960, 0x93ED,
+ 0x6961, 0x9EBE, 0x6962, 0x93E8, 0x6968, 0xFAE9, 0x696A, 0x9EC2,
+ 0x696B, 0x9EB5, 0x696D, 0x8BC6, 0x696E, 0x9EB8, 0x696F, 0x8F7C,
+ 0x6973, 0x9480, 0x6974, 0x9EBA, 0x6975, 0x8BC9, 0x6977, 0x9EB2,
+ 0x6978, 0x9EB4, 0x6979, 0x9EB1, 0x697C, 0x984F, 0x697D, 0x8A79,
+ 0x697E, 0x9EB7, 0x6981, 0x9EC1, 0x6982, 0x8A54, 0x698A, 0x8DE5,
+ 0x698E, 0x897C, 0x6991, 0x9ED2, 0x6994, 0x9850, 0x6995, 0x9ED5,
+ 0x6998, 0xFAEB, 0x699B, 0x9059, 0x699C, 0x9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EC, 0xE05C,
+ 0x6FEE, 0xE060, 0x6FEF, 0x91F3, 0x6FF1, 0xE05F, 0x6FF3, 0xE04A,
+ 0x6FF5, 0xFB4D, 0x6FF6, 0xE889, 0x6FFA, 0xE064, 0x6FFE, 0xE068,
+ 0x7001, 0xE066, 0x7005, 0xFB4E, 0x7007, 0xFB4F, 0x7009, 0xE062,
+ 0x700B, 0xE063, 0x700F, 0xE067, 0x7011, 0xE065, 0x7015, 0x956D,
+ 0x7018, 0xE06D, 0x701A, 0xE06A, 0x701B, 0xE069, 0x701D, 0xE06C,
+ 0x701E, 0x93D2, 0x701F, 0xE06E, 0x7026, 0x9295, 0x7027, 0x91EB,
+ 0x7028, 0xFB50, 0x702C, 0x90A3, 0x7030, 0xE06F, 0x7032, 0xE071,
+ 0x703E, 0xE070, 0x704C, 0x9FF3, 0x7051, 0xE072, 0x7058, 0x93E5,
+ 0x7063, 0xE073, 0x706B, 0x89CE, 0x706F, 0x9394, 0x7070, 0x8A44,
+ 0x7078, 0x8B84, 0x707C, 0x8EDC, 0x707D, 0x8DD0, 0x7085, 0xFB51,
+ 0x7089, 0x9846, 0x708A, 0x9086, 0x708E, 0x898A, 0x7092, 0xE075,
+ 0x7099, 0xE074, 0x70AB, 0xFB52, 0x70AC, 0xE078, 0x70AD, 0x9259,
+ 0x70AE, 0xE07B, 0x70AF, 0xE076, 0x70B3, 0xE07A, 0x70B8, 0xE079,
+ 0x70B9, 0x935F, 0x70BA, 0x88D7, 0x70BB, 0xFA62, 0x70C8, 0x97F3,
+ 0x70CB, 0xE07D, 0x70CF, 0x8947, 0x70D9, 0xE080, 0x70DD, 0xE07E,
+ 0x70DF, 0xE07C, 0x70F1, 0xE077, 0x70F9, 0x9642, 0x70FD, 0xE082,
+ 0x7104, 0xFB54, 0x7109, 0xE081, 0x710F, 0xFB53, 0x7114, 0x898B,
+ 0x7119, 0xE084, 0x711A, 0x95B0, 0x711C, 0xE083, 0x7121, 0x96B3,
+ 0x7126, 0x8FC5, 0x7136, 0x9152, 0x713C, 0x8FC4, 0x7146, 0xFB56,
+ 0x7147, 0xFB57, 0x7149, 0x97F9, 0x714C, 0xE08A, 0x714E, 0x90F7,
+ 0x7155, 0xE086, 0x7156, 0xE08B, 0x7159, 0x898C, 0x715C, 0xFB55,
+ 0x7162, 0xE089, 0x7164, 0x9481, 0x7165, 0xE085, 0x7166, 0xE088,
+ 0x7167, 0x8FC6, 0x7169, 0x94CF, 0x716C, 0xE08C, 0x716E, 0x8ECF,
+ 0x717D, 0x90F8, 0x7184, 0xE08F, 0x7188, 0xE087, 0x718A, 0x8C46,
+ 0x718F, 0xE08D, 0x7194, 0x976F, 0x7195, 0xE090, 0x7199, 0xEAA4,
+ 0x719F, 0x8F6E, 0x71A8, 0xE091, 0x71AC, 0xE092, 0x71B1, 0x944D,
+ 0x71B9, 0xE094, 0x71BE, 0xE095, 0x71C1, 0xFB59, 0x71C3, 0x9452,
+ 0x71C8, 0x9395, 0x71C9, 0xE097, 0x71CE, 0xE099, 0x71D0, 0x97D3,
+ 0x71D2, 0xE096, 0x71D4, 0xE098, 0x71D5, 0x898D, 0x71D7, 0xE093,
+ 0x71DF, 0x9A7A, 0x71E0, 0xE09A, 0x71E5, 0x9187, 0x71E6, 0x8E57,
+ 0x71E7, 0xE09C, 0x71EC, 0xE09B, 0x71ED, 0x9043, 0x71EE, 0x99D7,
+ 0x71F5, 0xE09D, 0x71F9, 0xE09F, 0x71FB, 0xE08E, 0x71FC, 0xE09E,
+ 0x71FE, 0xFB5A, 0x71FF, 0xE0A0, 0x7206, 0x949A, 0x720D, 0xE0A1,
+ 0x7210, 0xE0A2, 0x721B, 0xE0A3, 0x7228, 0xE0A4, 0x722A, 0x92DC,
+ 0x722C, 0xE0A6, 0x722D, 0xE0A5, 0x7230, 0xE0A7, 0x7232, 0xE0A8,
+ 0x7235, 0x8EDD, 0x7236, 0x9583, 0x723A, 0x96EA, 0x723B, 0xE0A9,
+ 0x723C, 0xE0AA, 0x723D, 0x9175, 0x723E, 0x8EA2, 0x723F, 0xE0AB,
+ 0x7240, 0xE0AC, 0x7246, 0xE0AD, 0x7247, 0x95D0, 0x7248, 0x94C5,
+ 0x724B, 0xE0AE, 0x724C, 0x9476, 0x7252, 0x92AB, 0x7258, 0xE0AF,
+ 0x7259, 0x89E5, 0x725B, 0x8B8D, 0x725D, 0x96C4, 0x725F, 0x96B4,
+ 0x7261, 0x89B2, 0x7262, 0x9853, 0x7267, 0x9671, 0x7269, 0x95A8,
+ 0x7272, 0x90B5, 0x7274, 0xE0B0, 0x7279, 0x93C1, 0x727D, 0x8CA1,
+ 0x727E, 0xE0B1, 0x7280, 0x8DD2, 0x7281, 0xE0B3, 0x7282, 0xE0B2,
+ 0x7287, 0xE0B4, 0x7292, 0xE0B5, 0x7296, 0xE0B6, 0x72A0, 0x8B5D,
+ 0x72A2, 0xE0B7, 0x72A7, 0xE0B8, 0x72AC, 0x8CA2, 0x72AF, 0x94C6,
+ 0x72B1, 0xFB5B, 0x72B2, 0xE0BA, 0x72B6, 0x8FF3, 0x72B9, 0xE0B9,
+ 0x72BE, 0xFB5C, 0x72C2, 0x8BB6, 0x72C3, 0xE0BB, 0x72C4, 0xE0BD,
+ 0x72C6, 0xE0BC, 0x72CE, 0xE0BE, 0x72D0, 0x8CCF, 0x72D2, 0xE0BF,
+ 0x72D7, 0x8BE7, 0x72D9, 0x915F, 0x72DB, 0x8D9D, 0x72E0, 0xE0C1,
+ 0x72E1, 0xE0C2, 0x72E2, 0xE0C0, 0x72E9, 0x8EEB, 0x72EC, 0x93C6,
+ 0x72ED, 0x8BB7, 0x72F7, 0xE0C4, 0x72F8, 0x924B, 0x72F9, 0xE0C3,
+ 0x72FC, 0x9854, 0x72FD, 0x9482, 0x730A, 0xE0C7, 0x7316, 0xE0C9,
+ 0x7317, 0xE0C6, 0x731B, 0x96D2, 0x731C, 0xE0C8, 0x731D, 0xE0CA,
+ 0x731F, 0x97C2, 0x7324, 0xFB5D, 0x7325, 0xE0CE, 0x7329, 0xE0CD,
+ 0x732A, 0x9296, 0x732B, 0x944C, 0x732E, 0x8CA3, 0x732F, 0xE0CC,
+ 0x7334, 0xE0CB, 0x7336, 0x9750, 0x7337, 0x9751, 0x733E, 0xE0CF,
+ 0x733F, 0x898E, 0x7344, 0x8D96, 0x7345, 0x8E82, 0x734E, 0xE0D0,
+ 0x734F, 0xE0D1, 0x7357, 0xE0D3, 0x7363, 0x8F62, 0x7368, 0xE0D5,
+ 0x736A, 0xE0D4, 0x7370, 0xE0D6, 0x7372, 0x8A6C, 0x7375, 0xE0D8,
+ 0x7377, 0xFB5F, 0x7378, 0xE0D7, 0x737A, 0xE0DA, 0x737B, 0xE0D9,
+ 0x7384, 0x8CBA, 0x7387, 0x97A6, 0x7389, 0x8BCA, 0x738B, 0x89A4,
+ 0x7396, 0x8BE8, 0x73A9, 0x8ADF, 0x73B2, 0x97E6, 0x73B3, 0xE0DC,
+ 0x73BB, 0xE0DE, 0x73BD, 0xFB60, 0x73C0, 0xE0DF, 0x73C2, 0x89CF,
+ 0x73C8, 0xE0DB, 0x73C9, 0xFB61, 0x73CA, 0x8E58, 0x73CD, 0x92BF,
+ 0x73CE, 0xE0DD, 0x73D2, 0xFB64, 0x73D6, 0xFB62, 0x73DE, 0xE0E2,
+ 0x73E0, 0x8EEC, 0x73E3, 0xFB63, 0x73E5, 0xE0E0, 0x73EA, 0x8C5D,
+ 0x73ED, 0x94C7, 0x73EE, 0xE0E1, 0x73F1, 0xE0FC, 0x73F5, 0xFB66,
+ 0x73F8, 0xE0E7, 0x73FE, 0x8CBB, 0x7403, 0x8B85, 0x7405, 0xE0E4,
+ 0x7406, 0x979D, 0x7407, 0xFB65, 0x7409, 0x97AE, 0x7422, 0x91F4,
+ 0x7425, 0xE0E6, 0x7426, 0xFB67, 0x7429, 0xFB69, 0x742A, 0xFB68,
+ 0x742E, 0xFB6A, 0x7432, 0xE0E8, 0x7433, 0x97D4, 0x7434, 0x8BD5,
+ 0x7435, 0x94FA, 0x7436, 0x9469, 0x743A, 0xE0E9, 0x743F, 0xE0EB,
+ 0x7441, 0xE0EE, 0x7455, 0xE0EA, 0x7459, 0xE0ED, 0x745A, 0x8CE8,
+ 0x745B, 0x896C, 0x745C, 0xE0EF, 0x745E, 0x9090, 0x745F, 0xE0EC,
+ 0x7460, 0x97DA, 0x7462, 0xFB6B, 0x7463, 0xE0F2, 0x7464, 0xEAA2,
+ 0x7469, 0xE0F0, 0x746A, 0xE0F3, 0x746F, 0xE0E5, 0x7470, 0xE0F1,
+ 0x7473, 0x8DBA, 0x7476, 0xE0F4, 0x747E, 0xE0F5, 0x7483, 0x979E,
+ 0x7489, 0xFB6C, 0x748B, 0xE0F6, 0x749E, 0xE0F7, 0x749F, 0xFB6D,
+ 0x74A2, 0xE0E3, 0x74A7, 0xE0F8, 0x74B0, 0x8AC2, 0x74BD, 0x8EA3,
+ 0x74CA, 0xE0F9, 0x74CF, 0xE0FA, 0x74D4, 0xE0FB, 0x74DC, 0x895A,
+ 0x74E0, 0xE140, 0x74E2, 0x955A, 0x74E3, 0xE141, 0x74E6, 0x8AA2,
+ 0x74E7, 0xE142, 0x74E9, 0xE143, 0x74EE, 0xE144, 0x74F0, 0xE146,
+ 0x74F1, 0xE147, 0x74F2, 0xE145, 0x74F6, 0x9572, 0x74F7, 0xE149,
+ 0x74F8, 0xE148, 0x7501, 0xFB6E, 0x7503, 0xE14B, 0x7504, 0xE14A,
+ 0x7505, 0xE14C, 0x750C, 0xE14D, 0x750D, 0xE14F, 0x750E, 0xE14E,
+ 0x7511, 0x8D99, 0x7513, 0xE151, 0x7515, 0xE150, 0x7518, 0x8AC3,
+ 0x751A, 0x9072, 0x751C, 0x935B, 0x751E, 0xE152, 0x751F, 0x90B6,
+ 0x7523, 0x8E59, 0x7525, 0x8999, 0x7526, 0xE153, 0x7528, 0x9770,
+ 0x752B, 0x95E1, 0x752C, 0xE154, 0x752F, 0xFAA8, 0x7530, 0x9363,
+ 0x7531, 0x9752, 0x7532, 0x8D62, 0x7533, 0x905C, 0x7537, 0x926A,
+ 0x7538, 0x99B2, 0x753A, 0x92AC, 0x753B, 0x89E6, 0x753C, 0xE155,
+ 0x7544, 0xE156, 0x7546, 0xE15B, 0x7549, 0xE159, 0x754A, 0xE158,
+ 0x754B, 0x9DC0, 0x754C, 0x8A45, 0x754D, 0xE157, 0x754F, 0x88D8,
+ 0x7551, 0x94A8, 0x7554, 0x94C8, 0x7559, 0x97AF, 0x755A, 0xE15C,
+ 0x755B, 0xE15A, 0x755C, 0x927B, 0x755D, 0x90A4, 0x7560, 0x94A9,
+ 0x7562, 0x954C, 0x7564, 0xE15E, 0x7565, 0x97AA, 0x7566, 0x8C6C,
+ 0x7567, 0xE15F, 0x7569, 0xE15D, 0x756A, 0x94D4, 0x756B, 0xE160,
+ 0x756D, 0xE161, 0x756F, 0xFB6F, 0x7570, 0x88D9, 0x7573, 0x8FF4,
+ 0x7574, 0xE166, 0x7576, 0xE163, 0x7577, 0x93EB, 0x7578, 0xE162,
+ 0x757F, 0x8B45, 0x7582, 0xE169, 0x7586, 0xE164, 0x7587, 0xE165,
+ 0x7589, 0xE168, 0x758A, 0xE167, 0x758B, 0x9544, 0x758E, 0x9161,
+ 0x758F, 0x9160, 0x7591, 0x8B5E, 0x7594, 0xE16A, 0x759A, 0xE16B,
+ 0x759D, 0xE16C, 0x75A3, 0xE16E, 0x75A5, 0xE16D, 0x75AB, 0x8975,
+ 0x75B1, 0xE176, 0x75B2, 0x94E6, 0x75B3, 0xE170, 0x75B5, 0xE172,
+ 0x75B8, 0xE174, 0x75B9, 0x905D, 0x75BC, 0xE175, 0x75BD, 0xE173,
+ 0x75BE, 0x8EBE, 0x75C2, 0xE16F, 0x75C3, 0xE171, 0x75C5, 0x9561,
+ 0x75C7, 0x8FC7, 0x75CA, 0xE178, 0x75CD, 0xE177, 0x75D2, 0xE179,
+ 0x75D4, 0x8EA4, 0x75D5, 0x8DAD, 0x75D8, 0x9397, 0x75D9, 0xE17A,
+ 0x75DB, 0x92C9, 0x75DE, 0xE17C, 0x75E2, 0x979F, 0x75E3, 0xE17B,
+ 0x75E9, 0x9189, 0x75F0, 0xE182, 0x75F2, 0xE184, 0x75F3, 0xE185,
+ 0x75F4, 0x9273, 0x75FA, 0xE183, 0x75FC, 0xE180, 0x75FE, 0xE17D,
+ 0x75FF, 0xE17E, 0x7601, 0xE181, 0x7609, 0xE188, 0x760B, 0xE186,
+ 0x760D, 0xE187, 0x761F, 0xE189, 0x7620, 0xE18B, 0x7621, 0xE18C,
+ 0x7622, 0xE18D, 0x7624, 0xE18E, 0x7627, 0xE18A, 0x7630, 0xE190,
+ 0x7634, 0xE18F, 0x763B, 0xE191, 0x7642, 0x97C3, 0x7646, 0xE194,
+ 0x7647, 0xE192, 0x7648, 0xE193, 0x764C, 0x8AE0, 0x7652, 0x96FC,
+ 0x7656, 0x95C8, 0x7658, 0xE196, 0x765C, 0xE195, 0x7661, 0xE197,
+ 0x7662, 0xE198, 0x7667, 0xE19C, 0x7668, 0xE199, 0x7669, 0xE19A,
+ 0x766A, 0xE19B, 0x766C, 0xE19D, 0x7670, 0xE19E, 0x7672, 0xE19F,
+ 0x7676, 0xE1A0, 0x7678, 0xE1A1, 0x767A, 0x94AD, 0x767B, 0x936F,
+ 0x767C, 0xE1A2, 0x767D, 0x9492, 0x767E, 0x9553, 0x7680, 0xE1A3,
+ 0x7682, 0xFB70, 0x7683, 0xE1A4, 0x7684, 0x9349, 0x7686, 0x8A46,
+ 0x7687, 0x8D63, 0x7688, 0xE1A5, 0x768B, 0xE1A6, 0x768E, 0xE1A7,
+ 0x7690, 0x8E48, 0x7693, 0xE1A9, 0x7696, 0xE1A8, 0x7699, 0xE1AA,
+ 0x769A, 0xE1AB, 0x769B, 0xFB73, 0x769C, 0xFB71, 0x769E, 0xFB72,
+ 0x76A6, 0xFB74, 0x76AE, 0x94E7, 0x76B0, 0xE1AC, 0x76B4, 0xE1AD,
+ 0x76B7, 0xEA89, 0x76B8, 0xE1AE, 0x76B9, 0xE1AF, 0x76BA, 0xE1B0,
+ 0x76BF, 0x8E4D, 0x76C2, 0xE1B1, 0x76C3, 0x9475, 0x76C6, 0x967E,
+ 0x76C8, 0x896D, 0x76CA, 0x8976, 0x76CD, 0xE1B2, 0x76D2, 0xE1B4,
+ 0x76D6, 0xE1B3, 0x76D7, 0x9390, 0x76DB, 0x90B7, 0x76DC, 0x9F58,
+ 0x76DE, 0xE1B5, 0x76DF, 0x96BF, 0x76E1, 0xE1B6, 0x76E3, 0x8AC4,
+ 0x76E4, 0x94D5, 0x76E5, 0xE1B7, 0x76E7, 0xE1B8, 0x76EA, 0xE1B9,
+ 0x76EE, 0x96DA, 0x76F2, 0x96D3, 0x76F4, 0x92BC, 0x76F8, 0x918A,
+ 0x76FB, 0xE1BB, 0x76FE, 0x8F82, 0x7701, 0x8FC8, 0x7704, 0xE1BE,
+ 0x7707, 0xE1BD, 0x7708, 0xE1BC, 0x7709, 0x94FB, 0x770B, 0x8AC5,
+ 0x770C, 0x8CA7, 0x771B, 0xE1C4, 0x771E, 0xE1C1, 0x771F, 0x905E,
+ 0x7720, 0x96B0, 0x7724, 0xE1C0, 0x7725, 0xE1C2, 0x7726, 0xE1C3,
+ 0x7729, 0xE1BF, 0x7737, 0xE1C5, 0x7738, 0xE1C6, 0x773A, 0x92AD,
+ 0x773C, 0x8AE1, 0x7740, 0x9285, 0x7746, 0xFB76, 0x7747, 0xE1C7,
+ 0x775A, 0xE1C8, 0x775B, 0xE1CB, 0x7761, 0x9087, 0x7763, 0x93C2,
+ 0x7765, 0xE1CC, 0x7766, 0x9672, 0x7768, 0xE1C9, 0x776B, 0xE1CA,
+ 0x7779, 0xE1CF, 0x777E, 0xE1CE, 0x777F, 0xE1CD, 0x778B, 0xE1D1,
+ 0x778E, 0xE1D0, 0x7791, 0xE1D2, 0x779E, 0xE1D4, 0x77A0, 0xE1D3,
+ 0x77A5, 0x95CB, 0x77AC, 0x8F75, 0x77AD, 0x97C4, 0x77B0, 0xE1D5,
+ 0x77B3, 0x93B5, 0x77B6, 0xE1D6, 0x77B9, 0xE1D7, 0x77BB, 0xE1DB,
+ 0x77BC, 0xE1D9, 0x77BD, 0xE1DA, 0x77BF, 0xE1D8, 0x77C7, 0xE1DC,
+ 0x77CD, 0xE1DD, 0x77D7, 0xE1DE, 0x77DA, 0xE1DF, 0x77DB, 0x96B5,
+ 0x77DC, 0xE1E0, 0x77E2, 0x96EE, 0x77E3, 0xE1E1, 0x77E5, 0x926D,
+ 0x77E7, 0x948A, 0x77E9, 0x8BE9, 0x77ED, 0x925A, 0x77EE, 0xE1E2,
+ 0x77EF, 0x8BB8, 0x77F3, 0x90CE, 0x77FC, 0xE1E3, 0x7802, 0x8DBB,
+ 0x780C, 0xE1E4, 0x7812, 0xE1E5, 0x7814, 0x8CA4, 0x7815, 0x8DD3,
+ 0x7820, 0xE1E7, 0x7821, 0xFB78, 0x7825, 0x9375, 0x7826, 0x8DD4,
+ 0x7827, 0x8B6D, 0x7832, 0x9643, 0x7834, 0x946A, 0x783A, 0x9376,
+ 0x783F, 0x8D7B, 0x7845, 0xE1E9, 0x784E, 0xFB79, 0x785D, 0x8FC9,
+ 0x7864, 0xFB7A, 0x786B, 0x97B0, 0x786C, 0x8D64, 0x786F, 0x8CA5,
+ 0x7872, 0x94A1, 0x7874, 0xE1EB, 0x787A, 0xFB7B, 0x787C, 0xE1ED,
+ 0x7881, 0x8CE9, 0x7886, 0xE1EC, 0x7887, 0x92F4, 0x788C, 0xE1EF,
+ 0x788D, 0x8A56, 0x788E, 0xE1EA, 0x7891, 0x94E8, 0x7893, 0x894F,
+ 0x7895, 0x8DEA, 0x7897, 0x9871, 0x789A, 0xE1EE, 0x78A3, 0xE1F0,
+ 0x78A7, 0x95C9, 0x78A9, 0x90D7, 0x78AA, 0xE1F2, 0x78AF, 0xE1F3,
+ 0x78B5, 0xE1F1, 0x78BA, 0x8A6D, 0x78BC, 0xE1F9, 0x78BE, 0xE1F8,
+ 0x78C1, 0x8EA5, 0x78C5, 0xE1FA, 0x78C6, 0xE1F5, 0x78CA, 0xE1FB,
+ 0x78CB, 0xE1F6, 0x78D0, 0x94D6, 0x78D1, 0xE1F4, 0x78D4, 0xE1F7,
+ 0x78DA, 0xE241, 0x78E7, 0xE240, 0x78E8, 0x9681, 0x78EC, 0xE1FC,
+ 0x78EF, 0x88E9, 0x78F4, 0xE243, 0x78FD, 0xE242, 0x7901, 0x8FCA,
+ 0x7907, 0xE244, 0x790E, 0x9162, 0x7911, 0xE246, 0x7912, 0xE245,
+ 0x7919, 0xE247, 0x7926, 0xE1E6, 0x792A, 0xE1E8, 0x792B, 0xE249,
+ 0x792C, 0xE248, 0x7930, 0xFB7C, 0x793A, 0x8EA6, 0x793C, 0x97E7,
+ 0x793E, 0x8ED0, 0x7940, 0xE24A, 0x7941, 0x8C56, 0x7947, 0x8B5F,
+ 0x7948, 0x8B46, 0x7949, 0x8E83, 0x7950, 0x9753, 0x7953, 0xE250,
+ 0x7955, 0xE24F, 0x7956, 0x9163, 0x7957, 0xE24C, 0x795A, 0xE24E,
+ 0x795D, 0x8F6A, 0x795E, 0x905F, 0x795F, 0xE24D, 0x7960, 0xE24B,
+ 0x7962, 0x9449, 0x7965, 0x8FCB, 0x7968, 0x955B, 0x796D, 0x8DD5,
+ 0x7977, 0x9398, 0x797A, 0xE251, 0x797F, 0xE252, 0x7980, 0xE268,
+ 0x7981, 0x8BD6, 0x7984, 0x985C, 0x7985, 0x9154, 0x798A, 0xE253,
+ 0x798D, 0x89D0, 0x798E, 0x92F5, 0x798F, 0x959F, 0x7994, 0xFB81,
+ 0x799B, 0xFB83, 0x799D, 0xE254, 0x79A6, 0x8B9A, 0x79A7, 0xE255,
+ 0x79AA, 0xE257, 0x79AE, 0xE258, 0x79B0, 0x9448, 0x79B3, 0xE259,
+ 0x79B9, 0xE25A, 0x79BA, 0xE25B, 0x79BD, 0x8BD7, 0x79BE, 0x89D1,
+ 0x79BF, 0x93C3, 0x79C0, 0x8F47, 0x79C1, 0x8E84, 0x79C9, 0xE25C,
+ 0x79CB, 0x8F48, 0x79D1, 0x89C8, 0x79D2, 0x9562, 0x79D5, 0xE25D,
+ 0x79D8, 0x94E9, 0x79DF, 0x9164, 0x79E1, 0xE260, 0x79E3, 0xE261,
+ 0x79E4, 0x9489, 0x79E6, 0x9060, 0x79E7, 0xE25E, 0x79E9, 0x9281,
+ 0x79EC, 0xE25F, 0x79F0, 0x8FCC, 0x79FB, 0x88DA, 0x7A00, 0x8B48,
+ 0x7A08, 0xE262, 0x7A0B, 0x92F6, 0x7A0D, 0xE263, 0x7A0E, 0x90C5,
+ 0x7A14, 0x96AB, 0x7A17, 0x9542, 0x7A18, 0xE264, 0x7A19, 0xE265,
+ 0x7A1A, 0x9274, 0x7A1C, 0x97C5, 0x7A1F, 0xE267, 0x7A20, 0xE266,
+ 0x7A2E, 0x8EED, 0x7A31, 0xE269, 0x7A32, 0x88EE, 0x7A37, 0xE26C,
+ 0x7A3B, 0xE26A, 0x7A3C, 0x89D2, 0x7A3D, 0x8C6D, 0x7A3E, 0xE26B,
+ 0x7A3F, 0x8D65, 0x7A40, 0x8D92, 0x7A42, 0x95E4, 0x7A43, 0xE26D,
+ 0x7A46, 0x9673, 0x7A49, 0xE26F, 0x7A4D, 0x90CF, 0x7A4E, 0x896E,
+ 0x7A4F, 0x89B8, 0x7A50, 0x88AA, 0x7A57, 0xE26E, 0x7A61, 0xE270,
+ 0x7A62, 0xE271, 0x7A63, 0x8FF5, 0x7A69, 0xE272, 0x7A6B, 0x8A6E,
+ 0x7A70, 0xE274, 0x7A74, 0x8C8A, 0x7A76, 0x8B86, 0x7A79, 0xE275,
+ 0x7A7A, 0x8BF3, 0x7A7D, 0xE276, 0x7A7F, 0x90FA, 0x7A81, 0x93CB,
+ 0x7A83, 0x90DE, 0x7A84, 0x8DF3, 0x7A88, 0xE277, 0x7A92, 0x9282,
+ 0x7A93, 0x918B, 0x7A95, 0xE279, 0x7A96, 0xE27B, 0x7A97, 0xE278,
+ 0x7A98, 0xE27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A, 0xE36F, 0x7E0B, 0xE376,
+ 0x7E12, 0xE372, 0x7E1B, 0x949B, 0x7E1E, 0x8EC8, 0x7E1F, 0xE374,
+ 0x7E21, 0xE371, 0x7E22, 0xE377, 0x7E23, 0xE370, 0x7E26, 0x8F63,
+ 0x7E2B, 0x9644, 0x7E2E, 0x8F6B, 0x7E31, 0xE373, 0x7E32, 0xE380,
+ 0x7E35, 0xE37B, 0x7E37, 0xE37E, 0x7E39, 0xE37C, 0x7E3A, 0xE381,
+ 0x7E3B, 0xE37A, 0x7E3D, 0xE360, 0x7E3E, 0x90D1, 0x7E41, 0x94C9,
+ 0x7E43, 0xE37D, 0x7E46, 0xE378, 0x7E4A, 0x9140, 0x7E4B, 0x8C71,
+ 0x7E4D, 0x8F4A, 0x7E52, 0xFB8F, 0x7E54, 0x9044, 0x7E55, 0x9155,
+ 0x7E56, 0xE384, 0x7E59, 0xE386, 0x7E5A, 0xE387, 0x7E5D, 0xE383,
+ 0x7E5E, 0xE385, 0x7E66, 0xE379, 0x7E67, 0xE382, 0x7E69, 0xE38A,
+ 0x7E6A, 0xE389, 0x7E6D, 0x969A, 0x7E70, 0x8C4A, 0x7E79, 0xE388,
+ 0x7E7B, 0xE38C, 0x7E7C, 0xE38B, 0x7E7D, 0xE38F, 0x7E7F, 0xE391,
+ 0x7E82, 0x8E5B, 0x7E83, 0xE38D, 0x7E88, 0xE392, 0x7E89, 0xE393,
+ 0x7E8A, 0xFA5C, 0x7E8C, 0xE394, 0x7E8E, 0xE39A, 0x7E8F, 0x935A,
+ 0x7E90, 0xE396, 0x7E92, 0xE395, 0x7E93, 0xE397, 0x7E94, 0xE398,
+ 0x7E96, 0xE399, 0x7E9B, 0xE39B, 0x7E9C, 0xE39C, 0x7F36, 0x8ACA,
+ 0x7F38, 0xE39D, 0x7F3A, 0xE39E, 0x7F45, 0xE39F, 0x7F47, 0xFB90,
+ 0x7F4C, 0xE3A0, 0x7F4D, 0xE3A1, 0x7F4E, 0xE3A2, 0x7F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 0x8004, 0xE3CC, 0x8005, 0x8ED2, 0x8006, 0xE3CB, 0x800B, 0xE3CD,
+ 0x800C, 0x8EA7, 0x8010, 0x91CF, 0x8012, 0xE3CE, 0x8015, 0x8D6B,
+ 0x8017, 0x96D5, 0x8018, 0xE3CF, 0x8019, 0xE3D0, 0x801C, 0xE3D1,
+ 0x8021, 0xE3D2, 0x8028, 0xE3D3, 0x8033, 0x8EA8, 0x8036, 0x96EB,
+ 0x803B, 0xE3D5, 0x803D, 0x925E, 0x803F, 0xE3D4, 0x8046, 0xE3D7,
+ 0x804A, 0xE3D6, 0x8052, 0xE3D8, 0x8056, 0x90B9, 0x8058, 0xE3D9,
+ 0x805A, 0xE3DA, 0x805E, 0x95B7, 0x805F, 0xE3DB, 0x8061, 0x918F,
+ 0x8062, 0xE3DC, 0x8068, 0xE3DD, 0x806F, 0x97FC, 0x8070, 0xE3E0,
+ 0x8072, 0xE3DF, 0x8073, 0xE3DE, 0x8074, 0x92AE, 0x8076, 0xE3E1,
+ 0x8077, 0x9045, 0x8079, 0xE3E2, 0x807D, 0xE3E3, 0x807E, 0x9857,
+ 0x807F, 0xE3E4, 0x8084, 0xE3E5, 0x8085, 0xE3E7, 0x8086, 0xE3E6,
+ 0x8087, 0x94A3, 0x8089, 0x93F7, 0x808B, 0x985D, 0x808C, 0x94A7,
+ 0x8093, 0xE3E9, 0x8096, 0x8FD1, 0x8098, 0x9549, 0x809A, 0xE3EA,
+ 0x809B, 0xE3E8, 0x809D, 0x8ACC, 0x80A1, 0x8CD2, 0x80A2, 0x8E88,
+ 0x80A5, 0x94EC, 0x80A9, 0x8CA8, 0x80AA, 0x9662, 0x80AC, 0xE3ED,
+ 0x80AD, 0xE3EB, 0x80AF, 0x8D6D, 0x80B1, 0x8D6E, 0x80B2, 0x88E7,
+ 0x80B4, 0x8DE6, 0x80BA, 0x9478, 0x80C3, 0x88DD, 0x80C4, 0xE3F2,
+ 0x80C6, 0x925F, 0x80CC, 0x9477, 0x80CE, 0x91D9, 0x80D6, 0xE3F4,
+ 0x80D9, 0xE3F0, 0x80DA, 0xE3F3, 0x80DB, 0xE3EE, 0x80DD, 0xE3F1,
+ 0x80DE, 0x9645, 0x80E1, 0x8CD3, 0x80E4, 0x88FB, 0x80E5, 0xE3EF,
+ 0x80EF, 0xE3F6, 0x80F1, 0xE3F7, 0x80F4, 0x93B7, 0x80F8, 0x8BB9,
+ 0x80FC, 0xE445, 0x80FD, 0x945C, 0x8102, 0x8E89, 0x8105, 0x8BBA,
+ 0x8106, 0x90C6, 0x8107, 0x9865, 0x8108, 0x96AC, 0x8109, 0xE3F5,
+ 0x810A, 0x90D2, 0x811A, 0x8B72, 0x811B, 0xE3F8, 0x8123, 0xE3FA,
+ 0x8129, 0xE3F9, 0x812F, 0xE3FB, 0x8131, 0x9245, 0x8133, 0x945D,
+ 0x8139, 0x92AF, 0x813E, 0xE442, 0x8146, 0xE441, 0x814B, 0xE3FC,
+ 0x814E, 0x9074, 0x8150, 0x9585, 0x8151, 0xE444, 0x8153, 0xE443,
+ 0x8154, 0x8D6F, 0x8155, 0x9872, 0x815F, 0xE454, 0x8165, 0xE448,
+ 0x8166, 0xE449, 0x816B, 0x8EEE, 0x816E, 0xE447, 0x8170, 0x8D98,
+ 0x8171, 0xE446, 0x8174, 0xE44A, 0x8178, 0x92B0, 0x8179, 0x95A0,
+ 0x817A, 0x9142, 0x817F, 0x91DA, 0x8180, 0xE44E, 0x8182, 0xE44F,
+ 0x8183, 0xE44B, 0x8188, 0xE44C, 0x818A, 0xE44D, 0x818F, 0x8D70,
+ 0x8193, 0xE455, 0x8195, 0xE451, 0x819A, 0x9586, 0x819C, 0x968C,
+ 0x819D, 0x9547, 0x81A0, 0xE450, 0x81A3, 0xE453, 0x81A4, 0xE452,
+ 0x81A8, 0x9663, 0x81A9, 0xE456, 0x81B0, 0xE457, 0x81B3, 0x9156,
+ 0x81B5, 0xE458, 0x81B8, 0xE45A, 0x81BA, 0xE45E, 0x81BD, 0xE45B,
+ 0x81BE, 0xE459, 0x81BF, 0x945E, 0x81C0, 0xE45C, 0x81C2, 0xE45D,
+ 0x81C6, 0x89B0, 0x81C8, 0xE464, 0x81C9, 0xE45F, 0x81CD, 0xE460,
+ 0x81D1, 0xE461, 0x81D3, 0x919F, 0x81D8, 0xE463, 0x81D9, 0xE462,
+ 0x81DA, 0xE465, 0x81DF, 0xE466, 0x81E0, 0xE467, 0x81E3, 0x9062,
+ 0x81E5, 0x89E7, 0x81E7, 0xE468, 0x81E8, 0x97D5, 0x81EA, 0x8EA9,
+ 0x81ED, 0x8F4C, 0x81F3, 0x8E8A, 0x81F4, 0x9276, 0x81FA, 0xE469,
+ 0x81FB, 0xE46A, 0x81FC, 0x8950, 0x81FE, 0xE46B, 0x8201, 0xE46C,
+ 0x8202, 0xE46D, 0x8205, 0xE46E, 0x8207, 0xE46F, 0x8208, 0x8BBB,
+ 0x8209, 0x9DA8, 0x820A, 0xE470, 0x820C, 0x90E3, 0x820D, 0xE471,
+ 0x820E, 0x8EC9, 0x8210, 0xE472, 0x8212, 0x98AE, 0x8216, 0xE473,
+ 0x8217, 0x95DC, 0x8218, 0x8ADA, 0x821B, 0x9143, 0x821C, 0x8F77,
+ 0x821E, 0x9591, 0x821F, 0x8F4D, 0x8229, 0xE474, 0x822A, 0x8D71,
+ 0x822B, 0xE475, 0x822C, 0x94CA, 0x822E, 0xE484, 0x8233, 0xE477,
+ 0x8235, 0x91C7, 0x8236, 0x9495, 0x8237, 0x8CBD, 0x8238, 0xE476,
+ 0x8239, 0x9144, 0x8240, 0xE478, 0x8247, 0x92F8, 0x8258, 0xE47A,
+ 0x8259, 0xE479, 0x825A, 0xE47C, 0x825D, 0xE47B, 0x825F, 0xE47D,
+ 0x8262, 0xE480, 0x8264, 0xE47E, 0x8266, 0x8ACD, 0x8268, 0xE481,
+ 0x826A, 0xE482, 0x826B, 0xE483, 0x826E, 0x8DAF, 0x826F, 0x97C7,
+ 0x8271, 0xE485, 0x8272, 0x9046, 0x8276, 0x8990, 0x8277, 0xE486,
+ 0x8278, 0xE487, 0x827E, 0xE488, 0x828B, 0x88F0, 0x828D, 0xE489,
+ 0x8292, 0xE48A, 0x8299, 0x9587, 0x829D, 0x8EC5, 0x829F, 0xE48C,
+ 0x82A5, 0x8A48, 0x82A6, 0x88B0, 0x82AB, 0xE48B, 0x82AC, 0xE48E,
+ 0x82AD, 0x946D, 0x82AF, 0x9063, 0x82B1, 0x89D4, 0x82B3, 0x9646,
+ 0x82B8, 0x8C7C, 0x82B9, 0x8BDA, 0x82BB, 0xE48D, 0x82BD, 0x89E8,
+ 0x82C5, 0x8AA1, 0x82D1, 0x8991, 0x82D2, 0xE492, 0x82D3, 0x97E8,
+ 0x82D4, 0x91DB, 0x82D7, 0x9563, 0x82D9, 0xE49E, 0x82DB, 0x89D5,
+ 0x82DC, 0xE49C, 0x82DE, 0xE49A, 0x82DF, 0xE491, 0x82E1, 0xE48F,
+ 0x82E3, 0xE490, 0x82E5, 0x8EE1, 0x82E6, 0x8BEA, 0x82E7, 0x9297,
+ 0x82EB, 0x93CF, 0x82F1, 0x8970, 0x82F3, 0xE494, 0x82F4, 0xE493,
+ 0x82F9, 0xE499, 0x82FA, 0xE495, 0x82FB, 0xE498, 0x8301, 0xFB93,
+ 0x8302, 0x96CE, 0x8303, 0xE497, 0x8304, 0x89D6, 0x8305, 0x8A9D,
+ 0x8306, 0xE49B, 0x8309, 0xE49D, 0x830E, 0x8C73, 0x8316, 0xE4A1,
+ 0x8317, 0xE4AA, 0x8318, 0xE4AB, 0x831C, 0x88A9, 0x8323, 0xE4B2,
+ 0x8328, 0x88EF, 0x832B, 0xE4A9, 0x832F, 0xE4A8, 0x8331, 0xE4A3,
+ 0x8332, 0xE4A2, 0x8334, 0xE4A0, 0x8335, 0xE49F, 0x8336, 0x9283,
+ 0x8338, 0x91F9, 0x8339, 0xE4A5, 0x8340, 0xE4A4, 0x8345, 0xE4A7,
+ 0x8349, 0x9190, 0x834A, 0x8C74, 0x834F, 0x8960, 0x8350, 0xE4A6,
+ 0x8352, 0x8D72, 0x8358, 0x9191, 0x8362, 0xFB94, 0x8373, 0xE4B8,
+ 0x8375, 0xE4B9, 0x8377, 0x89D7, 0x837B, 0x89AC, 0x837C, 0xE4B6,
+ 0x837F, 0xFB95, 0x8385, 0xE4AC, 0x8387, 0xE4B4, 0x8389, 0xE4BB,
+ 0x838A, 0xE4B5, 0x838E, 0xE4B3, 0x8393, 0xE496, 0x8396, 0xE4B1,
+ 0x839A, 0xE4AD, 0x839E, 0x8ACE, 0x839F, 0xE4AF, 0x83A0, 0xE4BA,
+ 0x83A2, 0xE4B0, 0x83A8, 0xE4BC, 0x83AA, 0xE4AE, 0x83AB, 0x949C,
+ 0x83B1, 0x9789, 0x83B5, 0xE4B7, 0x83BD, 0xE4CD, 0x83C1, 0xE4C5,
+ 0x83C5, 0x909B, 0x83C7, 0xFB96, 0x83CA, 0x8B65, 0x83CC, 0x8BDB,
+ 0x83CE, 0xE4C0, 0x83D3, 0x89D9, 0x83D6, 0x8FD2, 0x83D8, 0xE4C3,
+ 0x83DC, 0x8DD8, 0x83DF, 0x9370, 0x83E0, 0xE4C8, 0x83E9, 0x95EC,
+ 0x83EB, 0xE4BF, 0x83EF, 0x89D8, 0x83F0, 0x8CD4, 0x83F1, 0x9548,
+ 0x83F2, 0xE4C9, 0x83F4, 0xE4BD, 0x83F6, 0xFB97, 0x83F7, 0xE4C6,
+ 0x83FB, 0xE4D0, 0x83FD, 0xE4C1, 0x8403, 0xE4C2, 0x8404, 0x93B8,
+ 0x8407, 0xE4C7, 0x840B, 0xE4C4, 0x840C, 0x9647, 0x840D, 0xE4CA,
+ 0x840E, 0x88DE, 0x8413, 0xE4BE, 0x8420, 0xE4CC, 0x8422, 0xE4CB,
+ 0x8429, 0x948B, 0x842A, 0xE4D2, 0x842C, 0xE4DD, 0x8431, 0x8A9E,
+ 0x8435, 0xE4E0, 0x8438, 0xE4CE, 0x843C, 0xE4D3, 0x843D, 0x978E,
+ 0x8446, 0xE4DC, 0x8448, 0xFB98, 0x8449, 0x9774, 0x844E, 0x97A8,
+ 0x8457, 0x9298, 0x845B, 0x8A8B, 0x8461, 0x9592, 0x8462, 0xE4E2,
+ 0x8463, 0x939F, 0x8466, 0x88AF, 0x8469, 0xE4DB, 0x846B, 0xE4D7,
+ 0x846C, 0x9192, 0x846D, 0xE4D1, 0x846E, 0xE4D9, 0x846F, 0xE4DE,
+ 0x8471, 0x944B, 0x8475, 0x88A8, 0x8477, 0xE4D6, 0x8479, 0xE4DF,
+ 0x847A, 0x9598, 0x8482, 0xE4DA, 0x8484, 0xE4D5, 0x848B, 0x8FD3,
+ 0x8490, 0x8F4E, 0x8494, 0x8EAA, 0x8499, 0x96D6, 0x849C, 0x9566,
+ 0x849F, 0xE4E5, 0x84A1, 0xE4EE, 0x84AD, 0xE4D8, 0x84B2, 0x8A97,
+ 0x84B4, 0xFB99, 0x84B8, 0x8FF6, 0x84B9, 0xE4E3, 0x84BB, 0xE4E8,
+ 0x84BC, 0x9193, 0x84BF, 0xE4E4, 0x84C1, 0xE4EB, 0x84C4, 0x927E,
+ 0x84C6, 0xE4EC, 0x84C9, 0x9775, 0x84CA, 0xE4E1, 0x84CB, 0x8A57,
+ 0x84CD, 0xE4E7, 0x84D0, 0xE4EA, 0x84D1, 0x96AA, 0x84D6, 0xE4ED,
+ 0x84D9, 0xE4E6, 0x84DA, 0xE4E9, 0x84DC, 0xFA60, 0x84EC, 0x9648,
+ 0x84EE, 0x9840, 0x84F4, 0xE4F1, 0x84FC, 0xE4F8, 0x84FF, 0xE4F0,
+ 0x8500, 0x8EC1, 0x8506, 0xE4CF, 0x8511, 0x95CC, 0x8513, 0x96A0,
+ 0x8514, 0xE4F7, 0x8515, 0xE4F6, 0x8517, 0xE4F2, 0x8518, 0xE4F3,
+ 0x851A, 0x8955, 0x851F, 0xE4F5, 0x8521, 0xE4EF, 0x8526, 0x92D3,
+ 0x852C, 0xE4F4, 0x852D, 0x88FC, 0x8535, 0x91A0, 0x853D, 0x95C1,
+ 0x8540, 0xE4F9, 0x8541, 0xE540, 0x8543, 0x94D7, 0x8548, 0xE4FC,
+ 0x8549, 0x8FD4, 0x854A, 0x8EC7, 0x854B, 0xE542, 0x854E, 0x8BBC,
+ 0x8553, 0xFB9A, 0x8555, 0xE543, 0x8557, 0x9599, 0x8558, 0xE4FB,
+ 0x8559, 0xFB9B, 0x855A, 0xE4D4, 0x8563, 0xE4FA, 0x8568, 0x986E,
+ 0x8569, 0x93A0, 0x856A, 0x9593, 0x856B, 0xFB9C, 0x856D, 0xE54A,
+ 0x8577, 0xE550, 0x857E, 0xE551, 0x8580, 0xE544, 0x8584, 0x9496,
+ 0x8587, 0xE54E, 0x8588, 0xE546, 0x858A, 0xE548, 0x8590, 0xE552,
+ 0x8591, 0xE547, 0x8594, 0xE54B, 0x8597, 0x8992, 0x8599, 0x93E3,
+ 0x859B, 0xE54C, 0x859C, 0xE54F, 0x85A4, 0xE545, 0x85A6, 0x9145,
+ 0x85A8, 0xE549, 0x85A9, 0x8E46, 0x85AA, 0x9064, 0x85AB, 0x8C4F,
+ 0x85AC, 0x96F2, 0x85AE, 0x96F7, 0x85AF, 0x8F92, 0x85B0, 0xFB9E,
+ 0x85B9, 0xE556, 0x85BA, 0xE554, 0x85C1, 0x986D, 0x85C9, 0xE553,
+ 0x85CD, 0x9795, 0x85CF, 0xE555, 0x85D0, 0xE557, 0x85D5, 0xE558,
+ 0x85DC, 0xE55B, 0x85DD, 0xE559, 0x85E4, 0x93A1, 0x85E5, 0xE55A,
+ 0x85E9, 0x94CB, 0x85EA, 0xE54D, 0x85F7, 0x8F93, 0x85F9, 0xE55C,
+ 0x85FA, 0xE561, 0x85FB, 0x9194, 0x85FE, 0xE560, 0x8602, 0xE541,
+ 0x8606, 0xE562, 0x8607, 0x9168, 0x860A, 0xE55D, 0x860B, 0xE55F,
+ 0x8613, 0xE55E, 0x8616, 0x9F50, 0x8617, 0x9F41, 0x861A, 0xE564,
+ 0x8622, 0xE563, 0x862D, 0x9796, 0x862F, 0xE1BA, 0x8630, 0xE565,
+ 0x863F, 0xE566, 0x864D, 0xE567, 0x864E, 0x8CD5, 0x8650, 0x8B73,
+ 0x8654, 0xE569, 0x8655, 0x997C, 0x865A, 0x8B95, 0x865C, 0x97B8,
+ 0x865E, 0x8BF1, 0x865F, 0xE56A, 0x8667, 0xE56B, 0x866B, 0x928E,
+ 0x8671, 0xE56C, 0x8679, 0x93F8, 0x867B, 0x88B8, 0x868A, 0x89E1,
+ 0x868B, 0xE571, 0x868C, 0xE572, 0x8693, 0xE56D, 0x8695, 0x8E5C,
+ 0x86A3, 0xE56E, 0x86A4, 0x9461, 0x86A9, 0xE56F, 0x86AA, 0xE570,
+ 0x86AB, 0xE57A, 0x86AF, 0xE574, 0x86B0, 0xE577, 0x86B6, 0xE573,
+ 0x86C4, 0xE575, 0x86C6, 0xE576, 0x86C7, 0x8ED6, 0x86C9, 0xE578,
+ 0x86CB, 0x9260, 0x86CD, 0x8C75, 0x86CE, 0x8A61, 0x86D4, 0xE57B,
+ 0x86D9, 0x8A5E, 0x86DB, 0xE581, 0x86DE, 0xE57C, 0x86DF, 0xE580,
+ 0x86E4, 0x94B8, 0x86E9, 0xE57D, 0x86EC, 0xE57E, 0x86ED, 0x9567,
+ 0x86EE, 0x94D8, 0x86EF, 0xE582, 0x86F8, 0x91FB, 0x86F9, 0xE58C,
+ 0x86FB, 0xE588, 0x86FE, 0x89E9, 0x8700, 0xE586, 0x8702, 0x9649,
+ 0x8703, 0xE587, 0x8706, 0xE584, 0x8708, 0xE585, 0x8709, 0xE58A,
+ 0x870A, 0xE58D, 0x870D, 0xE58B, 0x8711, 0xE589, 0x8712, 0xE583,
+ 0x8718, 0x9277, 0x871A, 0xE594, 0x871C, 0x96A8, 0x8725, 0xE592,
+ 0x8729, 0xE593, 0x8734, 0xE58E, 0x8737, 0xE590, 0x873B, 0xE591,
+ 0x873F, 0xE58F, 0x8749, 0x90E4, 0x874B, 0x9858, 0x874C, 0xE598,
+ 0x874E, 0xE599, 0x8753, 0xE59F, 0x8755, 0x9049, 0x8757, 0xE59B,
+ 0x8759, 0xE59E, 0x875F, 0xE596, 0x8760, 0xE595, 0x8763, 0xE5A0,
+ 0x8766, 0x89DA, 0x8768, 0xE59C, 0x876A, 0xE5A1, 0x876E, 0xE59D,
+ 0x8774, 0xE59A, 0x8776, 0x92B1, 0x8778, 0xE597, 0x877F, 0x9488,
+ 0x8782, 0xE5A5, 0x878D, 0x975A, 0x879F, 0xE5A4, 0x87A2, 0xE5A3,
+ 0x87AB, 0xE5AC, 0x87AF, 0xE5A6, 0x87B3, 0xE5AE, 0x87BA, 0x9786,
+ 0x87BB, 0xE5B1, 0x87BD, 0xE5A8, 0x87C0, 0xE5A9, 0x87C4, 0xE5AD,
+ 0x87C6, 0xE5B0, 0x87C7, 0xE5AF, 0x87CB, 0xE5A7, 0x87D0, 0xE5AA,
+ 0x87D2, 0xE5BB, 0x87E0, 0xE5B4, 0x87EF, 0xE5B2, 0x87F2, 0xE5B3,
+ 0x87F6, 0xE5B8, 0x87F7, 0xE5B9, 0x87F9, 0x8A49, 0x87FB, 0x8B61,
+ 0x87FE, 0xE5B7, 0x8805, 0xE5A2, 0x8807, 0xFBA1, 0x880D, 0xE5B6,
+ 0x880E, 0xE5BA, 0x880F, 0xE5B5, 0x8811, 0xE5BC, 0x8815, 0xE5BE,
+ 0x8816, 0xE5BD, 0x8821, 0xE5C0, 0x8822, 0xE5BF, 0x8823, 0xE579,
+ 0x8827, 0xE5C4, 0x8831, 0xE5C1, 0x8836, 0xE5C2, 0x8839, 0xE5C3,
+ 0x883B, 0xE5C5, 0x8840, 0x8C8C, 0x8842, 0xE5C7, 0x8844, 0xE5C6,
+ 0x8846, 0x8F4F, 0x884C, 0x8D73, 0x884D, 0x9FA5, 0x8852, 0xE5C8,
+ 0x8853, 0x8F70, 0x8857, 0x8A58, 0x8859, 0xE5C9, 0x885B, 0x8971,
+ 0x885D, 0x8FD5, 0x885E, 0xE5CA, 0x8861, 0x8D74, 0x8862, 0xE5CB,
+ 0x8863, 0x88DF, 0x8868, 0x955C, 0x886B, 0xE5CC, 0x8870, 0x908A,
+ 0x8872, 0xE5D3, 0x8875, 0xE5D0, 0x8877, 0x928F, 0x887D, 0xE5D1,
+ 0x887E, 0xE5CE, 0x887F, 0x8BDC, 0x8881, 0xE5CD, 0x8882, 0xE5D4,
+ 0x8888, 0x8C55, 0x888B, 0x91DC, 0x888D, 0xE5DA, 0x8892, 0xE5D6,
+ 0x8896, 0x91B3, 0x8897, 0xE5D5, 0x8899, 0xE5D8, 0x889E, 0xE5CF,
+ 0x88A2, 0xE5D9, 0x88A4, 0xE5DB, 0x88AB, 0x94ED, 0x88AE, 0xE5D7,
+ 0x88B0, 0xE5DC, 0x88B1, 0xE5DE, 0x88B4, 0x8CD1, 0x88B5, 0xE5D2,
+ 0x88B7, 0x88BF, 0x88BF, 0xE5DD, 0x88C1, 0x8DD9, 0x88C2, 0x97F4,
+ 0x88C3, 0xE5DF, 0x88C4, 0xE5E0, 0x88C5, 0x9195, 0x88CF, 0x97A0,
+ 0x88D4, 0xE5E1, 0x88D5, 0x9754, 0x88D8, 0xE5E2, 0x88D9, 0xE5E3,
+ 0x88DC, 0x95E2, 0x88DD, 0xE5E4, 0x88DF, 0x8DBE, 0x88E1, 0x97A1,
+ 0x88E8, 0xE5E9, 0x88F2, 0xE5EA, 0x88F3, 0x8FD6, 0x88F4, 0xE5E8,
+ 0x88F5, 0xFBA2, 0x88F8, 0x9787, 0x88F9, 0xE5E5, 0x88FC, 0xE5E7,
+ 0x88FD, 0x90BB, 0x88FE, 0x909E, 0x8902, 0xE5E6, 0x8904, 0xE5EB,
+ 0x8907, 0x95A1, 0x890A, 0xE5ED, 0x890C, 0xE5EC, 0x8910, 0x8A8C,
+ 0x8912, 0x964A, 0x8913, 0xE5EE, 0x891C, 0xFA5D, 0x891D, 0xE5FA,
+ 0x891E, 0xE5F0, 0x8925, 0xE5F1, 0x892A, 0xE5F2, 0x892B, 0xE5F3,
+ 0x8936, 0xE5F7, 0x8938, 0xE5F8, 0x893B, 0xE5F6, 0x8941, 0xE5F4,
+ 0x8943, 0xE5EF, 0x8944, 0xE5F5, 0x894C, 0xE5F9, 0x894D, 0xE8B5,
+ 0x8956, 0x89A6, 0x895E, 0xE5FC, 0x895F, 0x8BDD, 0x8960, 0xE5FB,
+ 0x8964, 0xE641, 0x8966, 0xE640, 0x896A, 0xE643, 0x896D, 0xE642,
+ 0x896F, 0xE644, 0x8972, 0x8F50, 0x8974, 0xE645, 0x8977, 0xE646,
+ 0x897E, 0xE647, 0x897F, 0x90BC, 0x8981, 0x9776, 0x8983, 0xE648,
+ 0x8986, 0x95A2, 0x8987, 0x9465, 0x8988, 0xE649, 0x898A, 0xE64A,
+ 0x898B, 0x8CA9, 0x898F, 0x8B4B, 0x8993, 0xE64B, 0x8996, 0x8E8B,
+ 0x8997, 0x9460, 0x8998, 0xE64C, 0x899A, 0x8A6F, 0x89A1, 0xE64D,
+ 0x89A6, 0xE64F, 0x89A7, 0x9797, 0x89A9, 0xE64E, 0x89AA, 0x9065,
+ 0x89AC, 0xE650, 0x89AF, 0xE651, 0x89B2, 0xE652, 0x89B3, 0x8ACF,
+ 0x89BA, 0xE653, 0x89BD, 0xE654, 0x89BF, 0xE655, 0x89C0, 0xE656,
+ 0x89D2, 0x8A70, 0x89DA, 0xE657, 0x89DC, 0xE658, 0x89DD, 0xE659,
+ 0x89E3, 0x89F0, 0x89E6, 0x9047, 0x89E7, 0xE65A, 0x89F4, 0xE65B,
+ 0x89F8, 0xE65C, 0x8A00, 0x8CBE, 0x8A02, 0x92F9, 0x8A03, 0xE65D,
+ 0x8A08, 0x8C76, 0x8A0A, 0x9075, 0x8A0C, 0xE660, 0x8A0E, 0x93A2,
+ 0x8A10, 0xE65F, 0x8A12, 0xFBA3, 0x8A13, 0x8C50, 0x8A16, 0xE65E,
+ 0x8A17, 0x91F5, 0x8A18, 0x8B4C, 0x8A1B, 0xE661, 0x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 0x8F9B, 0x9068, 0x8F9C, 0xE783,
+ 0x8F9E, 0x8EAB, 0x8F9F, 0xE784, 0x8FA3, 0xE785, 0x8FA7, 0x999F,
+ 0x8FA8, 0x999E, 0x8FAD, 0xE786, 0x8FAE, 0xE390, 0x8FAF, 0xE787,
+ 0x8FB0, 0x9243, 0x8FB1, 0x904A, 0x8FB2, 0x945F, 0x8FB7, 0xE788,
+ 0x8FBA, 0x95D3, 0x8FBB, 0x92D2, 0x8FBC, 0x8D9E, 0x8FBF, 0x9248,
+ 0x8FC2, 0x8949, 0x8FC4, 0x9698, 0x8FC5, 0x9076, 0x8FCE, 0x8C7D,
+ 0x8FD1, 0x8BDF, 0x8FD4, 0x95D4, 0x8FDA, 0xE789, 0x8FE2, 0xE78B,
+ 0x8FE5, 0xE78A, 0x8FE6, 0x89DE, 0x8FE9, 0x93F4, 0x8FEA, 0xE78C,
+ 0x8FEB, 0x9497, 0x8FED, 0x9352, 0x8FEF, 0xE78D, 0x8FF0, 0x8F71,
+ 0x8FF4, 0xE78F, 0x8FF7, 0x96C0, 0x8FF8, 0xE79E, 0x8FF9, 0xE791,
+ 0x8FFA, 0xE792, 0x8FFD, 0x92C7, 0x9000, 0x91DE, 0x9001, 0x9197,
+ 0x9003, 0x93A6, 0x9005, 0xE790, 0x9006, 0x8B74, 0x900B, 0xE799,
+ 0x900D, 0xE796, 0x900E, 0xE7A3, 0x900F, 0x93A7, 0x9010, 0x9280,
+ 0x9011, 0xE793, 0x9013, 0x92FC, 0x9014, 0x9372, 0x9015, 0xE794,
+ 0x9016, 0xE798, 0x9017, 0x9080, 0x9019, 0x9487, 0x901A, 0x92CA,
+ 0x901D, 0x90C0, 0x901E, 0xE797, 0x901F, 0x91AC, 0x9020, 0x91A2,
+ 0x9021, 0xE795, 0x9022, 0x88A7, 0x9023, 0x9841, 0x9027, 0xE79A,
+ 0x902E, 0x91DF, 0x9031, 0x8F54, 0x9032, 0x9069, 0x9035, 0xE79C,
+ 0x9036, 0xE79B, 0x9038, 0x88ED, 0x9039, 0xE79D, 0x903C, 0x954E,
+ 0x903E, 0xE7A5, 0x9041, 0x93D9, 0x9042, 0x908B, 0x9045, 0x9278,
+ 0x9047, 0x8BF6, 0x9049, 0xE7A4, 0x904A, 0x9756, 0x904B, 0x895E,
+ 0x904D, 0x95D5, 0x904E, 0x89DF, 0x904F, 0xE79F, 0x9050, 0xE7A0,
+ 0x9051, 0xE7A1, 0x9052, 0xE7A2, 0x9053, 0x93B9, 0x9054, 0x9242,
+ 0x9055, 0x88E1, 0x9056, 0xE7A6, 0x9058, 0xE7A7, 0x9059, 0xEAA1,
+ 0x905C, 0x91BB, 0x905E, 0xE7A8, 0x9060, 0x8993, 0x9061, 0x916B,
+ 0x9063, 0x8CAD, 0x9065, 0x9779, 0x9067, 0xFBB5, 0x9068, 0xE7A9,
+ 0x9069, 0x934B, 0x906D, 0x9198, 0x906E, 0x8ED5, 0x906F, 0xE7AA,
+ 0x9072, 0xE7AD, 0x9075, 0x8F85, 0x9076, 0xE7AB, 0x9077, 0x914A,
+ 0x9078, 0x9149, 0x907A, 0x88E2, 0x907C, 0x97C9, 0x907D, 0xE7AF,
+ 0x907F, 0x94F0, 0x9080, 0xE7B1, 0x9081, 0xE7B0, 0x9082, 0xE7AE,
+ 0x9083, 0xE284, 0x9084, 0x8AD2, 0x9087, 0xE78E, 0x9089, 0xE7B3,
+ 0x908A, 0xE7B2, 0x908F, 0xE7B4, 0x9091, 0x9757, 0x90A3, 0x93DF,
+ 0x90A6, 0x964D, 0x90A8, 0xE7B5, 0x90AA, 0x8ED7, 0x90AF, 0xE7B6,
+ 0x90B1, 0xE7B7, 0x90B5, 0xE7B8, 0x90B8, 0x9340, 0x90C1, 0x88E8,
+ 0x90CA, 0x8D78, 0x90CE, 0x9859, 0x90DB, 0xE7BC, 0x90DE, 0xFBB6,
+ 0x90E1, 0x8C53, 0x90E2, 0xE7B9, 0x90E4, 0xE7BA, 0x90E8, 0x9594,
+ 0x90ED, 0x8A73, 0x90F5, 0x9758, 0x90F7, 0x8BBD, 0x90FD, 0x9373,
+ 0x9102, 0xE7BD, 0x9112, 0xE7BE, 0x9115, 0xFBB8, 0x9119, 0xE7BF,
+ 0x9127, 0xFBB9, 0x912D, 0x9341, 0x9130, 0xE7C1, 0x9132, 0xE7C0,
+ 0x9149, 0x93D1, 0x914A, 0xE7C2, 0x914B, 0x8F55, 0x914C, 0x8EDE,
+ 0x914D, 0x947A, 0x914E, 0x9291, 0x9152, 0x8EF0, 0x9154, 0x908C,
+ 0x9156, 0xE7C3, 0x9158, 0xE7C4, 0x9162, 0x907C, 0x9163, 0xE7C5,
+ 0x9165, 0xE7C6, 0x9169, 0xE7C7, 0x916A, 0x978F, 0x916C, 0x8F56,
+ 0x9172, 0xE7C9, 0x9173, 0xE7C8, 0x9175, 0x8D79, 0x9177, 0x8D93,
+ 0x9178, 0x8E5F, 0x9182, 0xE7CC, 0x9187, 0x8F86, 0x9189, 0xE7CB,
+ 0x918B, 0xE7CA, 0x918D, 0x91E7, 0x9190, 0x8CED, 0x9192, 0x90C1,
+ 0x9197, 0x94AE, 0x919C, 0x8F58, 0x91A2, 0xE7CD, 0x91A4, 0x8FDD,
+ 0x91AA, 0xE7D0, 0x91AB, 0xE7CE, 0x91AF, 0xE7CF, 0x91B4, 0xE7D2,
+ 0x91B5, 0xE7D1, 0x91B8, 0x8FF8, 0x91BA, 0xE7D3, 0x91C0, 0xE7D4,
+ 0x91C1, 0xE7D5, 0x91C6, 0x94CE, 0x91C7, 0x8DD1, 0x91C8, 0x8EDF,
+ 0x91C9, 0xE7D6, 0x91CB, 0xE7D7, 0x91CC, 0x97A2, 0x91CD, 0x8F64,
+ 0x91CE, 0x96EC, 0x91CF, 0x97CA, 0x91D0, 0xE7D8, 0x91D1, 0x8BE0,
+ 0x91D6, 0xE7D9, 0x91D7, 0xFBBB, 0x91D8, 0x9342, 0x91DA, 0xFBBA,
+ 0x91DB, 0xE7DC, 0x91DC, 0x8A98, 0x91DD, 0x906A, 0x91DE, 0xFBBC,
+ 0x91DF, 0xE7DA, 0x91E1, 0xE7DB, 0x91E3, 0x92DE, 0x91E4, 0xFBBF,
+ 0x91E5, 0xFBC0, 0x91E6, 0x9674, 0x91E7, 0x8BFA, 0x91ED, 0xFBBD,
+ 0x91EE, 0xFBBE, 0x91F5, 0xE7DE, 0x91F6, 0xE7DF, 0x91FC, 0xE7DD,
+ 0x91FF, 0xE7E1, 0x9206, 0xFBC1, 0x920A, 0xFBC3, 0x920D, 0x93DD,
+ 0x920E, 0x8A62, 0x9210, 0xFBC2, 0x9211, 0xE7E5, 0x9214, 0xE7E2,
+ 0x9215, 0xE7E4, 0x921E, 0xE7E0, 0x9229, 0xE86E, 0x922C, 0xE7E3,
+ 0x9234, 0x97E9, 0x9237, 0x8CD8, 0x9239, 0xFBCA, 0x923A, 0xFBC4,
+ 0x923C, 0xFBC6, 0x923F, 0xE7ED, 0x9240, 0xFBC5, 0x9244, 0x9353,
+ 0x9245, 0xE7E8, 0x9248, 0xE7EB, 0x9249, 0xE7E9, 0x924B, 0xE7EE,
+ 0x924E, 0xFBC7, 0x9250, 0xE7EF, 0x9251, 0xFBC9, 0x9257, 0xE7E7,
+ 0x9259, 0xFBC8, 0x925A, 0xE7F4, 0x925B, 0x8994, 0x925E, 0xE7E6,
+ 0x9262, 0x94AB, 0x9264, 0xE7EA, 0x9266, 0x8FDE, 0x9267, 0xFBCB,
+ 0x9271, 0x8D7A, 0x9277, 0xFBCD, 0x9278, 0xFBCE, 0x927E, 0x9667,
+ 0x9280, 0x8BE2, 0x9283, 0x8F65, 0x9285, 0x93BA, 0x9288, 0xFA5F,
+ 0x9291, 0x914C, 0x9293, 0xE7F2, 0x9295, 0xE7EC, 0x9296, 0xE7F1,
+ 0x9298, 0x96C1, 0x929A, 0x92B6, 0x929B, 0xE7F3, 0x929C, 0xE7F0,
+ 0x92A7, 0xFBCC, 0x92AD, 0x914B, 0x92B7, 0xE7F7, 0x92B9, 0xE7F6,
+ 0x92CF, 0xE7F5, 0x92D0, 0xFBD2, 0x92D2, 0x964E, 0x92D3, 0xFBD6,
+ 0x92D5, 0xFBD4, 0x92D7, 0xFBD0, 0x92D9, 0xFBD1, 0x92E0, 0xFBD5,
+ 0x92E4, 0x8F9B, 0x92E7, 0xFBCF, 0x92E9, 0xE7F8, 0x92EA, 0x95DD,
+ 0x92ED, 0x8973, 0x92F2, 0x9565, 0x92F3, 0x9292, 0x92F8, 0x8B98,
+ 0x92F9, 0xFA65, 0x92FA, 0xE7FA, 0x92FB, 0xFBD9, 0x92FC, 0x8D7C,
+ 0x92FF, 0xFBDC, 0x9302, 0xFBDE, 0x9306, 0x8E4B, 0x930F, 0xE7F9,
+ 0x9310, 0x908D, 0x9318, 0x908E, 0x9319, 0xE840, 0x931A, 0xE842,
+ 0x931D, 0xFBDD, 0x931E, 0xFBDB, 0x9320, 0x8FF9, 0x9321, 0xFBD8,
+ 0x9322, 0xE841, 0x9323, 0xE843, 0x9325, 0xFBD7, 0x9326, 0x8BD1,
+ 0x9328, 0x9564, 0x932B, 0x8EE0, 0x932C, 0x9842, 0x932E, 0xE7FC,
+ 0x932F, 0x8DF6, 0x9332, 0x985E, 0x9335, 0xE845, 0x933A, 0xE844,
+ 0x933B, 0xE846, 0x9344, 0xE7FB, 0x9348, 0xFA5E, 0x934B, 0x93E7,
+ 0x934D, 0x9374, 0x9354, 0x92D5, 0x9356, 0xE84B, 0x9357, 0xFBE0,
+ 0x935B, 0x9262, 0x935C, 0xE847, 0x9360, 0xE848, 0x936C, 0x8C4C,
+ 0x936E, 0xE84A, 0x9370, 0xFBDF, 0x9375, 0x8CAE, 0x937C, 0xE849,
+ 0x937E, 0x8FDF, 0x938C, 0x8A99, 0x9394, 0xE84F, 0x9396, 0x8DBD,
+ 0x9397, 0x9199, 0x939A, 0x92C8, 0x93A4, 0xFBE1, 0x93A7, 0x8A5A,
+ 0x93AC, 0xE84D, 0x93AD, 0xE84E, 0x93AE, 0x92C1, 0x93B0, 0xE84C,
+ 0x93B9, 0xE850, 0x93C3, 0xE856, 0x93C6, 0xFBE2, 0x93C8, 0xE859,
+ 0x93D0, 0xE858, 0x93D1, 0x934C, 0x93D6, 0xE851, 0x93D7, 0xE852,
+ 0x93D8, 0xE855, 0x93DD, 0xE857, 0x93DE, 0xFBE3, 0x93E1, 0x8BBE,
+ 0x93E4, 0xE85A, 0x93E5, 0xE854, 0x93E8, 0xE853, 0x93F8, 0xFBE4,
+ 0x9403, 0xE85E, 0x9407, 0xE85F, 0x9410, 0xE860, 0x9413, 0xE85D,
+ 0x9414, 0xE85C, 0x9418, 0x8FE0, 0x9419, 0x93A8, 0x941A, 0xE85B,
+ 0x9421, 0xE864, 0x942B, 0xE862, 0x9431, 0xFBE5, 0x9435, 0xE863,
+ 0x9436, 0xE861, 0x9438, 0x91F6, 0x943A, 0xE865, 0x9441, 0xE866,
+ 0x9444, 0xE868, 0x9445, 0xFBE6, 0x9448, 0xFBE7, 0x9451, 0x8AD3,
+ 0x9452, 0xE867, 0x9453, 0x96F8, 0x945A, 0xE873, 0x945B, 0xE869,
+ 0x945E, 0xE86C, 0x9460, 0xE86A, 0x9462, 0xE86B, 0x946A, 0xE86D,
+ 0x9470, 0xE86F, 0x9475, 0xE870, 0x9477, 0xE871, 0x947C, 0xE874,
+ 0x947D, 0xE872, 0x947E, 0xE875, 0x947F, 0xE877, 0x9481, 0xE876,
+ 0x9577, 0x92B7, 0x9580, 0x96E5, 0x9582, 0xE878, 0x9583, 0x914D,
+ 0x9587, 0xE879, 0x9589, 0x95C2, 0x958A, 0xE87A, 0x958B, 0x8A4A,
+ 0x958F, 0x895B, 0x9591, 0x8AD5, 0x9592, 0xFBE8, 0x9593, 0x8AD4,
+ 0x9594, 0xE87B, 0x9596, 0xE87C, 0x9598, 0xE87D, 0x9599, 0xE87E,
+ 0x95A0, 0xE880, 0x95A2, 0x8AD6, 0x95A3, 0x8A74, 0x95A4, 0x8D7D,
+ 0x95A5, 0x94B4, 0x95A7, 0xE882, 0x95A8, 0xE881, 0x95AD, 0xE883,
+ 0x95B2, 0x897B, 0x95B9, 0xE886, 0x95BB, 0xE885, 0x95BC, 0xE884,
+ 0x95BE, 0xE887, 0x95C3, 0xE88A, 0x95C7, 0x88C5, 0x95CA, 0xE888,
+ 0x95CC, 0xE88C, 0x95CD, 0xE88B, 0x95D4, 0xE88E, 0x95D5, 0xE88D,
+ 0x95D6, 0xE88F, 0x95D8, 0x93AC, 0x95DC, 0xE890, 0x95E1, 0xE891,
+ 0x95E2, 0xE893, 0x95E5, 0xE892, 0x961C, 0x958C, 0x9621, 0xE894,
+ 0x9628, 0xE895, 0x962A, 0x8DE3, 0x962E, 0xE896, 0x962F, 0xE897,
+ 0x9632, 0x9668, 0x963B, 0x916A, 0x963F, 0x88A2, 0x9640, 0x91C9,
+ 0x9642, 0xE898, 0x9644, 0x958D, 0x964B, 0xE89B, 0x964C, 0xE899,
+ 0x964D, 0x8D7E, 0x964F, 0xE89A, 0x9650, 0x8CC0, 0x965B, 0x95C3,
+ 0x965C, 0xE89D, 0x965D, 0xE89F, 0x965E, 0xE89E, 0x965F, 0xE8A0,
+ 0x9662, 0x8940, 0x9663, 0x9077, 0x9664, 0x8F9C, 0x9665, 0x8AD7,
+ 0x9666, 0xE8A1, 0x966A, 0x9486, 0x966C, 0xE8A3, 0x9670, 0x8941,
+ 0x9672, 0xE8A2, 0x9673, 0x92C2, 0x9675, 0x97CB, 0x9676, 0x93A9,
+ 0x9677, 0xE89C, 0x9678, 0x97A4, 0x967A, 0x8CAF, 0x967D, 0x977A,
+ 0x9685, 0x8BF7, 0x9686, 0x97B2, 0x9688, 0x8C47, 0x968A, 0x91E0,
+ 0x968B, 0xE440, 0x968D, 0xE8A4, 0x968E, 0x8A4B, 0x968F, 0x908F,
+ 0x9694, 0x8A75, 0x9695, 0xE8A6, 0x9697, 0xE8A7, 0x9698, 0xE8A5,
+ 0x9699, 0x8C84, 0x969B, 0x8DDB, 0x969C, 0x8FE1, 0x969D, 0xFBEB,
+ 0x96A0, 0x8942, 0x96A3, 0x97D7, 0x96A7, 0xE8A9, 0x96A8, 0xE7AC,
+ 0x96AA, 0xE8A8, 0x96AF, 0xFBEC, 0x96B0, 0xE8AC, 0x96B1, 0xE8AA,
+ 0x96B2, 0xE8AB, 0x96B4, 0xE8AD, 0x96B6, 0xE8AE, 0x96B7, 0x97EA,
+ 0x96B8, 0xE8AF, 0x96B9, 0xE8B0, 0x96BB, 0x90C7, 0x96BC, 0x94B9,
+ 0x96C0, 0x909D, 0x96C1, 0x8AE5, 0x96C4, 0x9759, 0x96C5, 0x89EB,
+ 0x96C6, 0x8F57, 0x96C7, 0x8CD9, 0x96C9, 0xE8B3, 0x96CB, 0xE8B2,
+ 0x96CC, 0x8E93, 0x96CD, 0xE8B4, 0x96CE, 0xE8B1, 0x96D1, 0x8E47,
+ 0x96D5, 0xE8B8, 0x96D6, 0xE5AB, 0x96D9, 0x99D4, 0x96DB, 0x9097,
+ 0x96DC, 0xE8B6, 0x96E2, 0x97A3, 0x96E3, 0x93EF, 0x96E8, 0x894A,
+ 0x96EA, 0x90E1, 0x96EB, 0x8EB4, 0x96F0, 0x95B5, 0x96F2, 0x895F,
+ 0x96F6, 0x97EB, 0x96F7, 0x978B, 0x96F9, 0xE8B9, 0x96FB, 0x9364,
+ 0x9700, 0x8EF9, 0x9704, 0xE8BA, 0x9706, 0xE8BB, 0x9707, 0x906B,
+ 0x9708, 0xE8BC, 0x970A, 0x97EC, 0x970D, 0xE8B7, 0x970E, 0xE8BE,
+ 0x970F, 0xE8C0, 0x9711, 0xE8BF, 0x9713, 0xE8BD, 0x9716, 0xE8C1,
+ 0x9719, 0xE8C2, 0x971C, 0x919A, 0x971E, 0x89E0, 0x9724, 0xE8C3,
+ 0x9727, 0x96B6, 0x972A, 0xE8C4, 0x9730, 0xE8C5, 0x9732, 0x9849,
+ 0x9733, 0xFBED, 0x9738, 0x9E50, 0x9739, 0xE8C6, 0x973B, 0xFBEE,
+ 0x973D, 0xE8C7, 0x973E, 0xE8C8, 0x9742, 0xE8CC, 0x9743, 0xFBEF,
+ 0x9744, 0xE8C9, 0x9746, 0xE8CA, 0x9748, 0xE8CB, 0x9749, 0xE8CD,
+ 0x974D, 0xFBF0, 0x974F, 0xFBF1, 0x9751, 0xFBF2, 0x9752, 0x90C2,
+ 0x9755, 0xFBF3, 0x9756, 0x96F5, 0x9759, 0x90C3, 0x975C, 0xE8CE,
+ 0x975E, 0x94F1, 0x9760, 0xE8CF, 0x9761, 0xEA72, 0x9762, 0x96CA,
+ 0x9764, 0xE8D0, 0x9766, 0xE8D1, 0x9768, 0xE8D2, 0x9769, 0x8A76,
+ 0x976B, 0xE8D4, 0x976D, 0x9078, 0x9771, 0xE8D5, 0x9774, 0x8C43,
+ 0x9779, 0xE8D6, 0x977A, 0xE8DA, 0x977C, 0xE8D8, 0x9781, 0xE8D9,
+ 0x9784, 0x8A93, 0x9785, 0xE8D7, 0x9786, 0xE8DB, 0x978B, 0xE8DC,
+ 0x978D, 0x88C6, 0x978F, 0xE8DD, 0x9790, 0xE8DE, 0x9798, 0x8FE2,
+ 0x979C, 0xE8DF, 0x97A0, 0x8B66, 0x97A3, 0xE8E2, 0x97A6, 0xE8E1,
+ 0x97A8, 0xE8E0, 0x97AB, 0xE691, 0x97AD, 0x95DA, 0x97B3, 0xE8E3,
+ 0x97B4, 0xE8E4, 0x97C3, 0xE8E5, 0x97C6, 0xE8E6, 0x97C8, 0xE8E7,
+ 0x97CB, 0xE8E8, 0x97D3, 0x8AD8, 0x97DC, 0xE8E9, 0x97ED, 0xE8EA,
+ 0x97EE, 0x9442, 0x97F2, 0xE8EC, 0x97F3, 0x89B9, 0x97F5, 0xE8EF,
+ 0x97F6, 0xE8EE, 0x97FB, 0x8943, 0x97FF, 0x8BBF, 0x9801, 0x95C5,
+ 0x9802, 0x92B8, 0x9803, 0x8DA0, 0x9805, 0x8D80, 0x9806, 0x8F87,
+ 0x9808, 0x907B, 0x980C, 0xE8F1, 0x980F, 0xE8F0, 0x9810, 0x9761,
+ 0x9811, 0x8AE6, 0x9812, 0x94D0, 0x9813, 0x93DA, 0x9817, 0x909C,
+ 0x9818, 0x97CC, 0x981A, 0x8C7A, 0x9821, 0xE8F4, 0x9824, 0xE8F3,
+ 0x982C, 0x966A, 0x982D, 0x93AA, 0x9834, 0x896F, 0x9837, 0xE8F5,
+ 0x9838, 0xE8F2, 0x983B, 0x9570, 0x983C, 0x978A, 0x983D, 0xE8F6,
+ 0x9846, 0xE8F7, 0x984B, 0xE8F9, 0x984C, 0x91E8, 0x984D, 0x8A7A,
+ 0x984E, 0x8A7B, 0x984F, 0xE8F8, 0x9854, 0x8AE7, 0x9855, 0x8CB0,
+ 0x9857, 0xFBF4, 0x9858, 0x8AE8, 0x985B, 0x935E, 0x985E, 0x97DE,
+ 0x9865, 0xFBF5, 0x9867, 0x8CDA, 0x986B, 0xE8FA, 0x986F, 0xE8FB,
+ 0x9870, 0xE8FC, 0x9871, 0xE940, 0x9873, 0xE942, 0x9874, 0xE941,
+ 0x98A8, 0x9597, 0x98AA, 0xE943, 0x98AF, 0xE944, 0x98B1, 0xE945,
+ 0x98B6, 0xE946, 0x98C3, 0xE948, 0x98C4, 0xE947, 0x98C6, 0xE949,
+ 0x98DB, 0x94F2, 0x98DC, 0xE3CA, 0x98DF, 0x9048, 0x98E2, 0x8B51,
+ 0x98E9, 0xE94A, 0x98EB, 0xE94B, 0x98ED, 0x99AA, 0x98EE, 0x9F5A,
+ 0x98EF, 0x94D1, 0x98F2, 0x88F9, 0x98F4, 0x88B9, 0x98FC, 0x8E94,
+ 0x98FD, 0x964F, 0x98FE, 0x8FFC, 0x9903, 0xE94C, 0x9905, 0x96DD,
+ 0x9909, 0xE94D, 0x990A, 0x977B, 0x990C, 0x8961, 0x9910, 0x8E60,
+ 0x9912, 0xE94E, 0x9913, 0x89EC, 0x9914, 0xE94F, 0x9918, 0xE950,
+ 0x991D, 0xE952, 0x991E, 0xE953, 0x9920, 0xE955, 0x9921, 0xE951,
+ 0x9924, 0xE954, 0x9927, 0xFBF8, 0x9928, 0x8AD9, 0x992C, 0xE956,
+ 0x992E, 0xE957, 0x993D, 0xE958, 0x993E, 0xE959, 0x9942, 0xE95A,
+ 0x9945, 0xE95C, 0x9949, 0xE95B, 0x994B, 0xE95E, 0x994C, 0xE961,
+ 0x9950, 0xE95D, 0x9951, 0xE95F, 0x9952, 0xE960, 0x9955, 0xE962,
+ 0x9957, 0x8BC0, 0x9996, 0x8EF1, 0x9997, 0xE963, 0x9998, 0xE964,
+ 0x9999, 0x8D81, 0x999E, 0xFBFA, 0x99A5, 0xE965, 0x99A8, 0x8A5D,
+ 0x99AC, 0x946E, 0x99AD, 0xE966, 0x99AE, 0xE967, 0x99B3, 0x9279,
+ 0x99B4, 0x93E9, 0x99BC, 0xE968, 0x99C1, 0x949D, 0x99C4, 0x91CA,
+ 0x99C5, 0x8977, 0x99C6, 0x8BEC, 0x99C8, 0x8BED, 0x99D0, 0x9293,
+ 0x99D1, 0xE96D, 0x99D2, 0x8BEE, 0x99D5, 0x89ED, 0x99D8, 0xE96C,
+ 0x99DB, 0xE96A, 0x99DD, 0xE96B, 0x99DF, 0xE969, 0x99E2, 0xE977,
+ 0x99ED, 0xE96E, 0x99EE, 0xE96F, 0x99F1, 0xE970, 0x99F2, 0xE971,
+ 0x99F8, 0xE973, 0x99FB, 0xE972, 0x99FF, 0x8F78, 0x9A01, 0xE974,
+ 0x9A05, 0xE976, 0x9A0E, 0x8B52, 0x9A0F, 0xE975, 0x9A12, 0x919B,
+ 0x9A13, 0x8CB1, 0x9A19, 0xE978, 0x9A28, 0x91CB, 0x9A2B, 0xE979,
+ 0x9A30, 0x93AB, 0x9A37, 0xE97A, 0x9A3E, 0xE980, 0x9A40, 0xE97D,
+ 0x9A42, 0xE97C, 0x9A43, 0xE97E, 0x9A45, 0xE97B, 0x9A4D, 0xE982,
+ 0x9A4E, 0xFBFB, 0x9A55, 0xE981, 0x9A57, 0xE984, 0x9A5A, 0x8BC1,
+ 0x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1C, 0xFB86, 0xFA1D, 0xFB89, 0xFA1E, 0xFB92,
+ 0xFA1F, 0xFB9D, 0xFA20, 0xFB9F, 0xFA21, 0xFBA0, 0xFA22, 0xFBA9,
+ 0xFA23, 0xFBB1, 0xFA24, 0xFBB3, 0xFA25, 0xFBB4, 0xFA26, 0xFBB7,
+ 0xFA27, 0xFBD3, 0xFA28, 0xFBDA, 0xFA29, 0xFBEA, 0xFA2A, 0xFBF6,
+ 0xFA2B, 0xFBF7, 0xFA2C, 0xFBF9, 0xFA2D, 0xFC49, 0xFF01, 0x8149,
+ 0xFF02, 0xFA57, 0xFF03, 0x8194, 0xFF04, 0x8190, 0xFF05, 0x8193,
+ 0xFF06, 0x8195, 0xFF07, 0xFA56, 0xFF08, 0x8169, 0xFF09, 0x816A,
+ 0xFF0A, 0x8196, 0xFF0B, 0x817B, 0xFF0C, 0x8143, 0xFF0D, 0x817C,
+ 0xFF0E, 0x8144, 0xFF0F, 0x815E, 0xFF10, 0x824F, 0xFF11, 0x8250,
+ 0xFF12, 0x8251, 0xFF13, 0x8252, 0xFF14, 0x8253, 0xFF15, 0x8254,
+ 0xFF16, 0x8255, 0xFF17, 0x8256, 0xFF18, 0x8257, 0xFF19, 0x8258,
+ 0xFF1A, 0x8146, 0xFF1B, 0x8147, 0xFF1C, 0x8183, 0xFF1D, 0x8181,
+ 0xFF1E, 0x8184, 0xFF1F, 0x8148, 0xFF20, 0x8197, 0xFF21, 0x8260,
+ 0xFF22, 0x8261, 0xFF23, 0x8262, 0xFF24, 0x8263, 0xFF25, 0x8264,
+ 0xFF26, 0x8265, 0xFF27, 0x8266, 0xFF28, 0x8267, 0xFF29, 0x8268,
+ 0xFF2A, 0x8269, 0xFF2B, 0x826A, 0xFF2C, 0x826B, 0xFF2D, 0x826C,
+ 0xFF2E, 0x826D, 0xFF2F, 0x826E, 0xFF30, 0x826F, 0xFF31, 0x8270,
+ 0xFF32, 0x8271, 0xFF33, 0x8272, 0xFF34, 0x8273, 0xFF35, 0x8274,
+ 0xFF36, 0x8275, 0xFF37, 0x8276, 0xFF38, 0x8277, 0xFF39, 0x8278,
+ 0xFF3A, 0x8279, 0xFF3B, 0x816D, 0xFF3C, 0x815F, 0xFF3D, 0x816E,
+ 0xFF3E, 0x814F, 0xFF3F, 0x8151, 0xFF40, 0x814D, 0xFF41, 0x8281,
+ 0xFF42, 0x8282, 0xFF43, 0x8283, 0xFF44, 0x8284, 0xFF45, 0x8285,
+ 0xFF46, 0x8286, 0xFF47, 0x8287, 0xFF48, 0x8288, 0xFF49, 0x8289,
+ 0xFF4A, 0x828A, 0xFF4B, 0x828B, 0xFF4C, 0x828C, 0xFF4D, 0x828D,
+ 0xFF4E, 0x828E, 0xFF4F, 0x828F, 0xFF50, 0x8290, 0xFF51, 0x8291,
+ 0xFF52, 0x8292, 0xFF53, 0x8293, 0xFF54, 0x8294, 0xFF55, 0x8295,
+ 0xFF56, 0x8296, 0xFF57, 0x8297, 0xFF58, 0x8298, 0xFF59, 0x8299,
+ 0xFF5A, 0x829A, 0xFF5B, 0x816F, 0xFF5C, 0x8162, 0xFF5D, 0x8170,
+ 0xFF5E, 0x8160, 0xFF61, 0x00A1, 0xFF62, 0x00A2, 0xFF63, 0x00A3,
+ 0xFF64, 0x00A4, 0xFF65, 0x00A5, 0xFF66, 0x00A6, 0xFF67, 0x00A7,
+ 0xFF68, 0x00A8, 0xFF69, 0x00A9, 0xFF6A, 0x00AA, 0xFF6B, 0x00AB,
+ 0xFF6C, 0x00AC, 0xFF6D, 0x00AD, 0xFF6E, 0x00AE, 0xFF6F, 0x00AF,
+ 0xFF70, 0x00B0, 0xFF71, 0x00B1, 0xFF72, 0x00B2, 0xFF73, 0x00B3,
+ 0xFF74, 0x00B4, 0xFF75, 0x00B5, 0xFF76, 0x00B6, 0xFF77, 0x00B7,
+ 0xFF78, 0x00B8, 0xFF79, 0x00B9, 0xFF7A, 0x00BA, 0xFF7B, 0x00BB,
+ 0xFF7C, 0x00BC, 0xFF7D, 0x00BD, 0xFF7E, 0x00BE, 0xFF7F, 0x00BF,
+ 0xFF80, 0x00C0, 0xFF81, 0x00C1, 0xFF82, 0x00C2, 0xFF83, 0x00C3,
+ 0xFF84, 0x00C4, 0xFF85, 0x00C5, 0xFF86, 0x00C6, 0xFF87, 0x00C7,
+ 0xFF88, 0x00C8, 0xFF89, 0x00C9, 0xFF8A, 0x00CA, 0xFF8B, 0x00CB,
+ 0xFF8C, 0x00CC, 0xFF8D, 0x00CD, 0xFF8E, 0x00CE, 0xFF8F, 0x00CF,
+ 0xFF90, 0x00D0, 0xFF91, 0x00D1, 0xFF92, 0x00D2, 0xFF93, 0x00D3,
+ 0xFF94, 0x00D4, 0xFF95, 0x00D5, 0xFF96, 0x00D6, 0xFF97, 0x00D7,
+ 0xFF98, 0x00D8, 0xFF99, 0x00D9, 0xFF9A, 0x00DA, 0xFF9B, 0x00DB,
+ 0xFF9C, 0x00DC, 0xFF9D, 0x00DD, 0xFF9E, 0x00DE, 0xFF9F, 0x00DF,
+ 0xFFE0, 0x8191, 0xFFE1, 0x8192, 0xFFE2, 0x81CA, 0xFFE3, 0x8150,
+ 0xFFE4, 0xFA55, 0xFFE5, 0x818F, 0, 0
+};
+
+#if !_TINY_TABLE
+static
+const WCHAR sjis2uni[] = {
+/* SJIS - Unicode, SJIS - Unicode, SJIS - Unicode, SJIS - Unicode, */
+ 0x00A1, 0xFF61, 0x00A2, 0xFF62, 0x00A3, 0xFF63, 0x00A4, 0xFF64,
+ 0x00A5, 0xFF65, 0x00A6, 0xFF66, 0x00A7, 0xFF67, 0x00A8, 0xFF68,
+ 0x00A9, 0xFF69, 0x00AA, 0xFF6A, 0x00AB, 0xFF6B, 0x00AC, 0xFF6C,
+ 0x00AD, 0xFF6D, 0x00AE, 0xFF6E, 0x00AF, 0xFF6F, 0x00B0, 0xFF70,
+ 0x00B1, 0xFF71, 0x00B2, 0xFF72, 0x00B3, 0xFF73, 0x00B4, 0xFF74,
+ 0x00B5, 0xFF75, 0x00B6, 0xFF76, 0x00B7, 0xFF77, 0x00B8, 0xFF78,
+ 0x00B9, 0xFF79, 0x00BA, 0xFF7A, 0x00BB, 0xFF7B, 0x00BC, 0xFF7C,
+ 0x00BD, 0xFF7D, 0x00BE, 0xFF7E, 0x00BF, 0xFF7F, 0x00C0, 0xFF80,
+ 0x00C1, 0xFF81, 0x00C2, 0xFF82, 0x00C3, 0xFF83, 0x00C4, 0xFF84,
+ 0x00C5, 0xFF85, 0x00C6, 0xFF86, 0x00C7, 0xFF87, 0x00C8, 0xFF88,
+ 0x00C9, 0xFF89, 0x00CA, 0xFF8A, 0x00CB, 0xFF8B, 0x00CC, 0xFF8C,
+ 0x00CD, 0xFF8D, 0x00CE, 0xFF8E, 0x00CF, 0xFF8F, 0x00D0, 0xFF90,
+ 0x00D1, 0xFF91, 0x00D2, 0xFF92, 0x00D3, 0xFF93, 0x00D4, 0xFF94,
+ 0x00D5, 0xFF95, 0x00D6, 0xFF96, 0x00D7, 0xFF97, 0x00D8, 0xFF98,
+ 0x00D9, 0xFF99, 0x00DA, 0xFF9A, 0x00DB, 0xFF9B, 0x00DC, 0xFF9C,
+ 0x00DD, 0xFF9D, 0x00DE, 0xFF9E, 0x00DF, 0xFF9F, 0x8140, 0x3000,
+ 0x8141, 0x3001, 0x8142, 0x3002, 0x8143, 0xFF0C, 0x8144, 0xFF0E,
+ 0x8145, 0x30FB, 0x8146, 0xFF1A, 0x8147, 0xFF1B, 0x8148, 0xFF1F,
+ 0x8149, 0xFF01, 0x814A, 0x309B, 0x814B, 0x309C, 0x814C, 0x00B4,
+ 0x814D, 0xFF40, 0x814E, 0x00A8, 0x814F, 0xFF3E, 0x8150, 0xFFE3,
+ 0x8151, 0xFF3F, 0x8152, 0x30FD, 0x8153, 0x30FE, 0x8154, 0x309D,
+ 0x8155, 0x309E, 0x8156, 0x3003, 0x8157, 0x4EDD, 0x8158, 0x3005,
+ 0x8159, 0x3006, 0x815A, 0x3007, 0x815B, 0x30FC, 0x815C, 0x2015,
+ 0x815D, 0x2010, 0x815E, 0xFF0F, 0x815F, 0xFF3C, 0x8160, 0xFF5E,
+ 0x8161, 0x2225, 0x8162, 0xFF5C, 0x8163, 0x2026, 0x8164, 0x2025,
+ 0x8165, 0x2018, 0x8166, 0x2019, 0x8167, 0x201C, 0x8168, 0x201D,
+ 0x8169, 0xFF08, 0x816A, 0xFF09, 0x816B, 0x3014, 0x816C, 0x3015,
+ 0x816D, 0xFF3B, 0x816E, 0xFF3D, 0x816F, 0xFF5B, 0x8170, 0xFF5D,
+ 0x8171, 0x3008, 0x8172, 0x3009, 0x8173, 0x300A, 0x8174, 0x300B,
+ 0x8175, 0x300C, 0x8176, 0x300D, 0x8177, 0x300E, 0x8178, 0x300F,
+ 0x8179, 0x3010, 0x817A, 0x3011, 0x817B, 0xFF0B, 0x817C, 0xFF0D,
+ 0x817D, 0x00B1, 0x817E, 0x00D7, 0x8180, 0x00F7, 0x8181, 0xFF1D,
+ 0x8182, 0x2260, 0x8183, 0xFF1C, 0x8184, 0xFF1E, 0x8185, 0x2266,
+ 0x8186, 0x2267, 0x8187, 0x221E, 0x8188, 0x2234, 0x8189, 0x2642,
+ 0x818A, 0x2640, 0x818B, 0x00B0, 0x818C, 0x2032, 0x818D, 0x2033,
+ 0x818E, 0x2103, 0x818F, 0xFFE5, 0x8190, 0xFF04, 0x8191, 0xFFE0,
+ 0x8192, 0xFFE1, 0x8193, 0xFF05, 0x8194, 0xFF03, 0x8195, 0xFF06,
+ 0x8196, 0xFF0A, 0x8197, 0xFF20, 0x8198, 0x00A7, 0x8199, 0x2606,
+ 0x819A, 0x2605, 0x819B, 0x25CB, 0x819C, 0x25CF, 0x819D, 0x25CE,
+ 0x819E, 0x25C7, 0x819F, 0x25C6, 0x81A0, 0x25A1, 0x81A1, 0x25A0,
+ 0x81A2, 0x25B3, 0x81A3, 0x25B2, 0x81A4, 0x25BD, 0x81A5, 0x25BC,
+ 0x81A6, 0x203B, 0x81A7, 0x3012, 0x81A8, 0x2192, 0x81A9, 0x2190,
+ 0x81AA, 0x2191, 0x81AB, 0x2193, 0x81AC, 0x3013, 0x81B8, 0x2208,
+ 0x81B9, 0x220B, 0x81BA, 0x2286, 0x81BB, 0x2287, 0x81BC, 0x2282,
+ 0x81BD, 0x2283, 0x81BE, 0x222A, 0x81BF, 0x2229, 0x81C8, 0x2227,
+ 0x81C9, 0x2228, 0x81CA, 0xFFE2, 0x81CB, 0x21D2, 0x81CC, 0x21D4,
+ 0x81CD, 0x2200, 0x81CE, 0x2203, 0x81DA, 0x2220, 0x81DB, 0x22A5,
+ 0x81DC, 0x2312, 0x81DD, 0x2202, 0x81DE, 0x2207, 0x81DF, 0x2261,
+ 0x81E0, 0x2252, 0x81E1, 0x226A, 0x81E2, 0x226B, 0x81E3, 0x221A,
+ 0x81E4, 0x223D, 0x81E5, 0x221D, 0x81E6, 0x2235, 0x81E7, 0x222B,
+ 0x81E8, 0x222C, 0x81F0, 0x212B, 0x81F1, 0x2030, 0x81F2, 0x266F,
+ 0x81F3, 0x266D, 0x81F4, 0x266A, 0x81F5, 0x2020, 0x81F6, 0x2021,
+ 0x81F7, 0x00B6, 0x81FC, 0x25EF, 0x824F, 0xFF10, 0x8250, 0xFF11,
+ 0x8251, 0xFF12, 0x8252, 0xFF13, 0x8253, 0xFF14, 0x8254, 0xFF15,
+ 0x8255, 0xFF16, 0x8256, 0xFF17, 0x8257, 0xFF18, 0x8258, 0xFF19,
+ 0x8260, 0xFF21, 0x8261, 0xFF22, 0x8262, 0xFF23, 0x8263, 0xFF24,
+ 0x8264, 0xFF25, 0x8265, 0xFF26, 0x8266, 0xFF27, 0x8267, 0xFF28,
+ 0x8268, 0xFF29, 0x8269, 0xFF2A, 0x826A, 0xFF2B, 0x826B, 0xFF2C,
+ 0x826C, 0xFF2D, 0x826D, 0xFF2E, 0x826E, 0xFF2F, 0x826F, 0xFF30,
+ 0x8270, 0xFF31, 0x8271, 0xFF32, 0x8272, 0xFF33, 0x8273, 0xFF34,
+ 0x8274, 0xFF35, 0x8275, 0xFF36, 0x8276, 0xFF37, 0x8277, 0xFF38,
+ 0x8278, 0xFF39, 0x8279, 0xFF3A, 0x8281, 0xFF41, 0x8282, 0xFF42,
+ 0x8283, 0xFF43, 0x8284, 0xFF44, 0x8285, 0xFF45, 0x8286, 0xFF46,
+ 0x8287, 0xFF47, 0x8288, 0xFF48, 0x8289, 0xFF49, 0x828A, 0xFF4A,
+ 0x828B, 0xFF4B, 0x828C, 0xFF4C, 0x828D, 0xFF4D, 0x828E, 0xFF4E,
+ 0x828F, 0xFF4F, 0x8290, 0xFF50, 0x8291, 0xFF51, 0x8292, 0xFF52,
+ 0x8293, 0xFF53, 0x8294, 0xFF54, 0x8295, 0xFF55, 0x8296, 0xFF56,
+ 0x8297, 0xFF57, 0x8298, 0xFF58, 0x8299, 0xFF59, 0x829A, 0xFF5A,
+ 0x829F, 0x3041, 0x82A0, 0x3042, 0x82A1, 0x3043, 0x82A2, 0x3044,
+ 0x82A3, 0x3045, 0x82A4, 0x3046, 0x82A5, 0x3047, 0x82A6, 0x3048,
+ 0x82A7, 0x3049, 0x82A8, 0x304A, 0x82A9, 0x304B, 0x82AA, 0x304C,
+ 0x82AB, 0x304D, 0x82AC, 0x304E, 0x82AD, 0x304F, 0x82AE, 0x3050,
+ 0x82AF, 0x3051, 0x82B0, 0x3052, 0x82B1, 0x3053, 0x82B2, 0x3054,
+ 0x82B3, 0x3055, 0x82B4, 0x3056, 0x82B5, 0x3057, 0x82B6, 0x3058,
+ 0x82B7, 0x3059, 0x82B8, 0x305A, 0x82B9, 0x305B, 0x82BA, 0x305C,
+ 0x82BB, 0x305D, 0x82BC, 0x305E, 0x82BD, 0x305F, 0x82BE, 0x3060,
+ 0x82BF, 0x3061, 0x82C0, 0x3062, 0x82C1, 0x3063, 0x82C2, 0x3064,
+ 0x82C3, 0x3065, 0x82C4, 0x3066, 0x82C5, 0x3067, 0x82C6, 0x3068,
+ 0x82C7, 0x3069, 0x82C8, 0x306A, 0x82C9, 0x306B, 0x82CA, 0x306C,
+ 0x82CB, 0x306D, 0x82CC, 0x306E, 0x82CD, 0x306F, 0x82CE, 0x3070,
+ 0x82CF, 0x3071, 0x82D0, 0x3072, 0x82D1, 0x3073, 0x82D2, 0x3074,
+ 0x82D3, 0x3075, 0x82D4, 0x3076, 0x82D5, 0x3077, 0x82D6, 0x3078,
+ 0x82D7, 0x3079, 0x82D8, 0x307A, 0x82D9, 0x307B, 0x82DA, 0x307C,
+ 0x82DB, 0x307D, 0x82DC, 0x307E, 0x82DD, 0x307F, 0x82DE, 0x3080,
+ 0x82DF, 0x3081, 0x82E0, 0x3082, 0x82E1, 0x3083, 0x82E2, 0x3084,
+ 0x82E3, 0x3085, 0x82E4, 0x3086, 0x82E5, 0x3087, 0x82E6, 0x3088,
+ 0x82E7, 0x3089, 0x82E8, 0x308A, 0x82E9, 0x308B, 0x82EA, 0x308C,
+ 0x82EB, 0x308D, 0x82EC, 0x308E, 0x82ED, 0x308F, 0x82EE, 0x3090,
+ 0x82EF, 0x3091, 0x82F0, 0x3092, 0x82F1, 0x3093, 0x8340, 0x30A1,
+ 0x8341, 0x30A2, 0x8342, 0x30A3, 0x8343, 0x30A4, 0x8344, 0x30A5,
+ 0x8345, 0x30A6, 0x8346, 0x30A7, 0x8347, 0x30A8, 0x8348, 0x30A9,
+ 0x8349, 0x30AA, 0x834A, 0x30AB, 0x834B, 0x30AC, 0x834C, 0x30AD,
+ 0x834D, 0x30AE, 0x834E, 0x30AF, 0x834F, 0x30B0, 0x8350, 0x30B1,
+ 0x8351, 0x30B2, 0x8352, 0x30B3, 0x8353, 0x30B4, 0x8354, 0x30B5,
+ 0x8355, 0x30B6, 0x8356, 0x30B7, 0x8357, 0x30B8, 0x8358, 0x30B9,
+ 0x8359, 0x30BA, 0x835A, 0x30BB, 0x835B, 0x30BC, 0x835C, 0x30BD,
+ 0x835D, 0x30BE, 0x835E, 0x30BF, 0x835F, 0x30C0, 0x8360, 0x30C1,
+ 0x8361, 0x30C2, 0x8362, 0x30C3, 0x8363, 0x30C4, 0x8364, 0x30C5,
+ 0x8365, 0x30C6, 0x8366, 0x30C7, 0x8367, 0x30C8, 0x8368, 0x30C9,
+ 0x8369, 0x30CA, 0x836A, 0x30CB, 0x836B, 0x30CC, 0x836C, 0x30CD,
+ 0x836D, 0x30CE, 0x836E, 0x30CF, 0x836F, 0x30D0, 0x8370, 0x30D1,
+ 0x8371, 0x30D2, 0x8372, 0x30D3, 0x8373, 0x30D4, 0x8374, 0x30D5,
+ 0x8375, 0x30D6, 0x8376, 0x30D7, 0x8377, 0x30D8, 0x8378, 0x30D9,
+ 0x8379, 0x30DA, 0x837A, 0x30DB, 0x837B, 0x30DC, 0x837C, 0x30DD,
+ 0x837D, 0x30DE, 0x837E, 0x30DF, 0x8380, 0x30E0, 0x8381, 0x30E1,
+ 0x8382, 0x30E2, 0x8383, 0x30E3, 0x8384, 0x30E4, 0x8385, 0x30E5,
+ 0x8386, 0x30E6, 0x8387, 0x30E7, 0x8388, 0x30E8, 0x8389, 0x30E9,
+ 0x838A, 0x30EA, 0x838B, 0x30EB, 0x838C, 0x30EC, 0x838D, 0x30ED,
+ 0x838E, 0x30EE, 0x838F, 0x30EF, 0x8390, 0x30F0, 0x8391, 0x30F1,
+ 0x8392, 0x30F2, 0x8393, 0x30F3, 0x8394, 0x30F4,
+ 0x8395, 0x30F5, 0x8396, 0x30F6, 0x839F, 0x0391, 0x83A0, 0x0392,
+ 0x83A1, 0x0393, 0x83A2, 0x0394, 0x83A3, 0x0395, 0x83A4, 0x0396,
+ 0x83A5, 0x0397, 0x83A6, 0x0398, 0x83A7, 0x0399, 0x83A8, 0x039A,
+ 0x83A9, 0x039B, 0x83AA, 0x039C, 0x83AB, 0x039D, 0x83AC, 0x039E,
+ 0x83AD, 0x039F, 0x83AE, 0x03A0, 0x83AF, 0x03A1, 0x83B0, 0x03A3,
+ 0x83B1, 0x03A4, 0x83B2, 0x03A5, 0x83B3, 0x03A6, 0x83B4, 0x03A7,
+ 0x83B5, 0x03A8, 0x83B6, 0x03A9, 0x83BF, 0x03B1, 0x83C0, 0x03B2,
+ 0x83C1, 0x03B3, 0x83C2, 0x03B4, 0x83C3, 0x03B5, 0x83C4, 0x03B6,
+ 0x83C5, 0x03B7, 0x83C6, 0x03B8, 0x83C7, 0x03B9, 0x83C8, 0x03BA,
+ 0x83C9, 0x03BB, 0x83CA, 0x03BC, 0x83CB, 0x03BD, 0x83CC, 0x03BE,
+ 0x83CD, 0x03BF, 0x83CE, 0x03C0, 0x83CF, 0x03C1, 0x83D0, 0x03C3,
+ 0x83D1, 0x03C4, 0x83D2, 0x03C5, 0x83D3, 0x03C6, 0x83D4, 0x03C7,
+ 0x83D5, 0x03C8, 0x83D6, 0x03C9, 0x8440, 0x0410, 0x8441, 0x0411,
+ 0x8442, 0x0412, 0x8443, 0x0413, 0x8444, 0x0414, 0x8445, 0x0415,
+ 0x8446, 0x0401, 0x8447, 0x0416, 0x8448, 0x0417, 0x8449, 0x0418,
+ 0x844A, 0x0419, 0x844B, 0x041A, 0x844C, 0x041B, 0x844D, 0x041C,
+ 0x844E, 0x041D, 0x844F, 0x041E, 0x8450, 0x041F, 0x8451, 0x0420,
+ 0x8452, 0x0421, 0x8453, 0x0422, 0x8454, 0x0423, 0x8455, 0x0424,
+ 0x8456, 0x0425, 0x8457, 0x0426, 0x8458, 0x0427, 0x8459, 0x0428,
+ 0x845A, 0x0429, 0x845B, 0x042A, 0x845C, 0x042B, 0x845D, 0x042C,
+ 0x845E, 0x042D, 0x845F, 0x042E, 0x8460, 0x042F, 0x8470, 0x0430,
+ 0x8471, 0x0431, 0x8472, 0x0432, 0x8473, 0x0433, 0x8474, 0x0434,
+ 0x8475, 0x0435, 0x8476, 0x0451, 0x8477, 0x0436, 0x8478, 0x0437,
+ 0x8479, 0x0438, 0x847A, 0x0439, 0x847B, 0x043A, 0x847C, 0x043B,
+ 0x847D, 0x043C, 0x847E, 0x043D, 0x8480, 0x043E, 0x8481, 0x043F,
+ 0x8482, 0x0440, 0x8483, 0x0441, 0x8484, 0x0442, 0x8485, 0x0443,
+ 0x8486, 0x0444, 0x8487, 0x0445, 0x8488, 0x0446, 0x8489, 0x0447,
+ 0x848A, 0x0448, 0x848B, 0x0449, 0x848C, 0x044A, 0x848D, 0x044B,
+ 0x848E, 0x044C, 0x848F, 0x044D, 0x8490, 0x044E, 0x8491, 0x044F,
+ 0x849F, 0x2500, 0x84A0, 0x2502, 0x84A1, 0x250C, 0x84A2, 0x2510,
+ 0x84A3, 0x2518, 0x84A4, 0x2514, 0x84A5, 0x251C, 0x84A6, 0x252C,
+ 0x84A7, 0x2524, 0x84A8, 0x2534, 0x84A9, 0x253C, 0x84AA, 0x2501,
+ 0x84AB, 0x2503, 0x84AC, 0x250F, 0x84AD, 0x2513, 0x84AE, 0x251B,
+ 0x84AF, 0x2517, 0x84B0, 0x2523, 0x84B1, 0x2533, 0x84B2, 0x252B,
+ 0x84B3, 0x253B, 0x84B4, 0x254B, 0x84B5, 0x2520, 0x84B6, 0x252F,
+ 0x84B7, 0x2528, 0x84B8, 0x2537, 0x84B9, 0x253F, 0x84BA, 0x251D,
+ 0x84BB, 0x2530, 0x84BC, 0x2525, 0x84BD, 0x2538, 0x84BE, 0x2542,
+ 0x8740, 0x2460, 0x8741, 0x2461, 0x8742, 0x2462, 0x8743, 0x2463,
+ 0x8744, 0x2464, 0x8745, 0x2465, 0x8746, 0x2466, 0x8747, 0x2467,
+ 0x8748, 0x2468, 0x8749, 0x2469, 0x874A, 0x246A, 0x874B, 0x246B,
+ 0x874C, 0x246C, 0x874D, 0x246D, 0x874E, 0x246E, 0x874F, 0x246F,
+ 0x8750, 0x2470, 0x8751, 0x2471, 0x8752, 0x2472, 0x8753, 0x2473,
+ 0x8754, 0x2160, 0x8755, 0x2161, 0x8756, 0x2162, 0x8757, 0x2163,
+ 0x8758, 0x2164, 0x8759, 0x2165, 0x875A, 0x2166, 0x875B, 0x2167,
+ 0x875C, 0x2168, 0x875D, 0x2169, 0x875F, 0x3349, 0x8760, 0x3314,
+ 0x8761, 0x3322, 0x8762, 0x334D, 0x8763, 0x3318, 0x8764, 0x3327,
+ 0x8765, 0x3303, 0x8766, 0x3336, 0x8767, 0x3351, 0x8768, 0x3357,
+ 0x8769, 0x330D, 0x876A, 0x3326, 0x876B, 0x3323, 0x876C, 0x332B,
+ 0x876D, 0x334A, 0x876E, 0x333B, 0x876F, 0x339C, 0x8770, 0x339D,
+ 0x8771, 0x339E, 0x8772, 0x338E, 0x8773, 0x338F, 0x8774, 0x33C4,
+ 0x8775, 0x33A1, 0x877E, 0x337B, 0x8780, 0x301D, 0x8781, 0x301F,
+ 0x8782, 0x2116, 0x8783, 0x33CD, 0x8784, 0x2121, 0x8785, 0x32A4,
+ 0x8786, 0x32A5, 0x8787, 0x32A6, 0x8788, 0x32A7, 0x8789, 0x32A8,
+ 0x878A, 0x3231, 0x878B, 0x3232, 0x878C, 0x3239, 0x878D, 0x337E,
+ 0x878E, 0x337D, 0x878F, 0x337C, 0x8793, 0x222E, 0x8794, 0x2211,
+ 0x8798, 0x221F, 0x8799, 0x22BF, 0x889F, 0x4E9C, 0x88A0, 0x5516,
+ 0x88A1, 0x5A03, 0x88A2, 0x963F, 0x88A3, 0x54C0, 0x88A4, 0x611B,
+ 0x88A5, 0x6328, 0x88A6, 0x59F6, 0x88A7, 0x9022, 0x88A8, 0x8475,
+ 0x88A9, 0x831C, 0x88AA, 0x7A50, 0x88AB, 0x60AA, 0x88AC, 0x63E1,
+ 0x88AD, 0x6E25, 0x88AE, 0x65ED, 0x88AF, 0x8466, 0x88B0, 0x82A6,
+ 0x88B1, 0x9BF5, 0x88B2, 0x6893, 0x88B3, 0x5727, 0x88B4, 0x65A1,
+ 0x88B5, 0x6271, 0x88B6, 0x5B9B, 0x88B7, 0x59D0, 0x88B8, 0x867B,
+ 0x88B9, 0x98F4, 0x88BA, 0x7D62, 0x88BB, 0x7DBE, 0x88BC, 0x9B8E,
+ 0x88BD, 0x6216, 0x88BE, 0x7C9F, 0x88BF, 0x88B7, 0x88C0, 0x5B89,
+ 0x88C1, 0x5EB5, 0x88C2, 0x6309, 0x88C3, 0x6697, 0x88C4, 0x6848,
+ 0x88C5, 0x95C7, 0x88C6, 0x978D, 0x88C7, 0x674F, 0x88C8, 0x4EE5,
+ 0x88C9, 0x4F0A, 0x88CA, 0x4F4D, 0x88CB, 0x4F9D, 0x88CC, 0x5049,
+ 0x88CD, 0x56F2, 0x88CE, 0x5937, 0x88CF, 0x59D4, 0x88D0, 0x5A01,
+ 0x88D1, 0x5C09, 0x88D2, 0x60DF, 0x88D3, 0x610F, 0x88D4, 0x6170,
+ 0x88D5, 0x6613, 0x88D6, 0x6905, 0x88D7, 0x70BA, 0x88D8, 0x754F,
+ 0x88D9, 0x7570, 0x88DA, 0x79FB, 0x88DB, 0x7DAD, 0x88DC, 0x7DEF,
+ 0x88DD, 0x80C3, 0x88DE, 0x840E, 0x88DF, 0x8863, 0x88E0, 0x8B02,
+ 0x88E1, 0x9055, 0x88E2, 0x907A, 0x88E3, 0x533B, 0x88E4, 0x4E95,
+ 0x88E5, 0x4EA5, 0x88E6, 0x57DF, 0x88E7, 0x80B2, 0x88E8, 0x90C1,
+ 0x88E9, 0x78EF, 0x88EA, 0x4E00, 0x88EB, 0x58F1, 0x88EC, 0x6EA2,
+ 0x88ED, 0x9038, 0x88EE, 0x7A32, 0x88EF, 0x8328, 0x88F0, 0x828B,
+ 0x88F1, 0x9C2F, 0x88F2, 0x5141, 0x88F3, 0x5370, 0x88F4, 0x54BD,
+ 0x88F5, 0x54E1, 0x88F6, 0x56E0, 0x88F7, 0x59FB, 0x88F8, 0x5F15,
+ 0x88F9, 0x98F2, 0x88FA, 0x6DEB, 0x88FB, 0x80E4, 0x88FC, 0x852D,
+ 0x8940, 0x9662, 0x8941, 0x9670, 0x8942, 0x96A0, 0x8943, 0x97FB,
+ 0x8944, 0x540B, 0x8945, 0x53F3, 0x8946, 0x5B87, 0x8947, 0x70CF,
+ 0x8948, 0x7FBD, 0x8949, 0x8FC2, 0x894A, 0x96E8, 0x894B, 0x536F,
+ 0x894C, 0x9D5C, 0x894D, 0x7ABA, 0x894E, 0x4E11, 0x894F, 0x7893,
+ 0x8950, 0x81FC, 0x8951, 0x6E26, 0x8952, 0x5618, 0x8953, 0x5504,
+ 0x8954, 0x6B1D, 0x8955, 0x851A, 0x8956, 0x9C3B, 0x8957, 0x59E5,
+ 0x8958, 0x53A9, 0x8959, 0x6D66, 0x895A, 0x74DC, 0x895B, 0x958F,
+ 0x895C, 0x5642, 0x895D, 0x4E91, 0x895E, 0x904B, 0x895F, 0x96F2,
+ 0x8960, 0x834F, 0x8961, 0x990C, 0x8962, 0x53E1, 0x8963, 0x55B6,
+ 0x8964, 0x5B30, 0x8965, 0x5F71, 0x8966, 0x6620, 0x8967, 0x66F3,
+ 0x8968, 0x6804, 0x8969, 0x6C38, 0x896A, 0x6CF3, 0x896B, 0x6D29,
+ 0x896C, 0x745B, 0x896D, 0x76C8, 0x896E, 0x7A4E, 0x896F, 0x9834,
+ 0x8970, 0x82F1, 0x8971, 0x885B, 0x8972, 0x8A60, 0x8973, 0x92ED,
+ 0x8974, 0x6DB2, 0x8975, 0x75AB, 0x8976, 0x76CA, 0x8977, 0x99C5,
+ 0x8978, 0x60A6, 0x8979, 0x8B01, 0x897A, 0x8D8A, 0x897B, 0x95B2,
+ 0x897C, 0x698E, 0x897D, 0x53AD, 0x897E, 0x5186, 0x8980, 0x5712,
+ 0x8981, 0x5830, 0x8982, 0x5944, 0x8983, 0x5BB4, 0x8984, 0x5EF6,
+ 0x8985, 0x6028, 0x8986, 0x63A9, 0x8987, 0x63F4, 0x8988, 0x6CBF,
+ 0x8989, 0x6F14, 0x898A, 0x708E, 0x898B, 0x7114, 0x898C, 0x7159,
+ 0x898D, 0x71D5, 0x898E, 0x733F, 0x898F, 0x7E01, 0x8990, 0x8276,
+ 0x8991, 0x82D1, 0x8992, 0x8597, 0x8993, 0x9060, 0x8994, 0x925B,
+ 0x8995, 0x9D1B, 0x8996, 0x5869, 0x8997, 0x65BC, 0x8998, 0x6C5A,
+ 0x8999, 0x7525, 0x899A, 0x51F9, 0x899B, 0x592E, 0x899C, 0x5965,
+ 0x899D, 0x5F80, 0x899E, 0x5FDC, 0x899F, 0x62BC, 0x89A0, 0x65FA,
+ 0x89A1, 0x6A2A, 0x89A2, 0x6B27, 0x89A3, 0x6BB4, 0x89A4, 0x738B,
+ 0x89A5, 0x7FC1, 0x89A6, 0x8956, 0x89A7, 0x9D2C, 0x89A8, 0x9D0E,
+ 0x89A9, 0x9EC4, 0x89AA, 0x5CA1, 0x89AB, 0x6C96, 0x89AC, 0x837B,
+ 0x89AD, 0x5104, 0x89AE, 0x5C4B, 0x89AF, 0x61B6, 0x89B0, 0x81C6,
+ 0x89B1, 0x6876, 0x89B2, 0x7261, 0x89B3, 0x4E59, 0x89B4, 0x4FFA,
+ 0x89B5, 0x5378, 0x89B6, 0x6069, 0x89B7, 0x6E29, 0x89B8, 0x7A4F,
+ 0x89B9, 0x97F3, 0x89BA, 0x4E0B, 0x89BB, 0x5316, 0x89BC, 0x4EEE,
+ 0x89BD, 0x4F55, 0x89BE, 0x4F3D, 0x89BF, 0x4FA1, 0x89C0, 0x4F73,
+ 0x89C1, 0x52A0, 0x89C2, 0x53EF, 0x89C3, 0x5609, 0x89C4, 0x590F,
+ 0x89C5, 0x5AC1, 0x89C6, 0x5BB6, 0x89C7, 0x5BE1, 0x89C8, 0x79D1,
+ 0x89C9, 0x6687, 0x89CA, 0x679C, 0x89CB, 0x67B6, 0x89CC, 0x6B4C,
+ 0x89CD, 0x6CB3, 0x89CE, 0x706B, 0x89CF, 0x73C2, 0x89D0, 0x798D,
+ 0x89D1, 0x79BE, 0x89D2, 0x7A3C, 0x89D3, 0x7B87, 0x89D4, 0x82B1,
+ 0x89D5, 0x82DB, 0x89D6, 0x8304, 0x89D7, 0x8377, 0x89D8, 0x83EF,
+ 0x89D9, 0x83D3, 0x89DA, 0x8766, 0x89DB, 0x8AB2, 0x89DC, 0x5629,
+ 0x89DD, 0x8CA8, 0x89DE, 0x8FE6, 0x89DF, 0x904E, 0x89E0, 0x971E,
+ 0x89E1, 0x868A, 0x89E2, 0x4FC4, 0x89E3, 0x5CE8, 0x89E4, 0x6211,
+ 0x89E5, 0x7259, 0x89E6, 0x753B, 0x89E7, 0x81E5, 0x89E8, 0x82BD,
+ 0x89E9, 0x86FE, 0x89EA, 0x8CC0, 0x89EB, 0x96C5, 0x89EC, 0x9913,
+ 0x89ED, 0x99D5, 0x89EE, 0x4ECB, 0x89EF, 0x4F1A, 0x89F0, 0x89E3,
+ 0x89F1, 0x56DE, 0x89F2, 0x584A, 0x89F3, 0x58CA, 0x89F4, 0x5EFB,
+ 0x89F5, 0x5FEB, 0x89F6, 0x602A, 0x89F7, 0x6094, 0x89F8, 0x6062,
+ 0x89F9, 0x61D0, 0x89FA, 0x6212, 0x89FB, 0x62D0, 0x89FC, 0x6539,
+ 0x8A40, 0x9B41, 0x8A41, 0x6666, 0x8A42, 0x68B0, 0x8A43, 0x6D77,
+ 0x8A44, 0x7070, 0x8A45, 0x754C, 0x8A46, 0x7686, 0x8A47, 0x7D75,
+ 0x8A48, 0x82A5, 0x8A49, 0x87F9, 0x8A4A, 0x958B, 0x8A4B, 0x968E,
+ 0x8A4C, 0x8C9D, 0x8A4D, 0x51F1, 0x8A4E, 0x52BE, 0x8A4F, 0x5916,
+ 0x8A50, 0x54B3, 0x8A51, 0x5BB3, 0x8A52, 0x5D16, 0x8A53, 0x6168,
+ 0x8A54, 0x6982, 0x8A55, 0x6DAF, 0x8A56, 0x788D, 0x8A57, 0x84CB,
+ 0x8A58, 0x8857, 0x8A59, 0x8A72, 0x8A5A, 0x93A7, 0x8A5B, 0x9AB8,
+ 0x8A5C, 0x6D6C, 0x8A5D, 0x99A8, 0x8A5E, 0x86D9, 0x8A5F, 0x57A3,
+ 0x8A60, 0x67FF, 0x8A61, 0x86CE, 0x8A62, 0x920E, 0x8A63, 0x5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 0x9047, 0x8BF7, 0x9685, 0x8BF8, 0x4E32,
+ 0x8BF9, 0x6ADB, 0x8BFA, 0x91E7, 0x8BFB, 0x5C51, 0x8BFC, 0x5C48,
+ 0x8C40, 0x6398, 0x8C41, 0x7A9F, 0x8C42, 0x6C93, 0x8C43, 0x9774,
+ 0x8C44, 0x8F61, 0x8C45, 0x7AAA, 0x8C46, 0x718A, 0x8C47, 0x9688,
+ 0x8C48, 0x7C82, 0x8C49, 0x6817, 0x8C4A, 0x7E70, 0x8C4B, 0x6851,
+ 0x8C4C, 0x936C, 0x8C4D, 0x52F2, 0x8C4E, 0x541B, 0x8C4F, 0x85AB,
+ 0x8C50, 0x8A13, 0x8C51, 0x7FA4, 0x8C52, 0x8ECD, 0x8C53, 0x90E1,
+ 0x8C54, 0x5366, 0x8C55, 0x8888, 0x8C56, 0x7941, 0x8C57, 0x4FC2,
+ 0x8C58, 0x50BE, 0x8C59, 0x5211, 0x8C5A, 0x5144, 0x8C5B, 0x5553,
+ 0x8C5C, 0x572D, 0x8C5D, 0x73EA, 0x8C5E, 0x578B, 0x8C5F, 0x5951,
+ 0x8C60, 0x5F62, 0x8C61, 0x5F84, 0x8C62, 0x6075, 0x8C63, 0x6176,
+ 0x8C64, 0x6167, 0x8C65, 0x61A9, 0x8C66, 0x63B2, 0x8C67, 0x643A,
+ 0x8C68, 0x656C, 0x8C69, 0x666F, 0x8C6A, 0x6842, 0x8C6B, 0x6E13,
+ 0x8C6C, 0x7566, 0x8C6D, 0x7A3D, 0x8C6E, 0x7CFB, 0x8C6F, 0x7D4C,
+ 0x8C70, 0x7D99, 0x8C71, 0x7E4B, 0x8C72, 0x7F6B, 0x8C73, 0x830E,
+ 0x8C74, 0x834A, 0x8C75, 0x86CD, 0x8C76, 0x8A08, 0x8C77, 0x8A63,
+ 0x8C78, 0x8B66, 0x8C79, 0x8EFD, 0x8C7A, 0x981A, 0x8C7B, 0x9D8F,
+ 0x8C7C, 0x82B8, 0x8C7D, 0x8FCE, 0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E8, 0x5270,
+ 0x8FE9, 0x57CE, 0x8FEA, 0x5834, 0x8FEB, 0x58CC, 0x8FEC, 0x5B22,
+ 0x8FED, 0x5E38, 0x8FEE, 0x60C5, 0x8FEF, 0x64FE, 0x8FF0, 0x6761,
+ 0x8FF1, 0x6756, 0x8FF2, 0x6D44, 0x8FF3, 0x72B6, 0x8FF4, 0x7573,
+ 0x8FF5, 0x7A63, 0x8FF6, 0x84B8, 0x8FF7, 0x8B72, 0x8FF8, 0x91B8,
+ 0x8FF9, 0x9320, 0x8FFA, 0x5631, 0x8FFB, 0x57F4, 0x8FFC, 0x98FE,
+ 0x9040, 0x62ED, 0x9041, 0x690D, 0x9042, 0x6B96, 0x9043, 0x71ED,
+ 0x9044, 0x7E54, 0x9045, 0x8077, 0x9046, 0x8272, 0x9047, 0x89E6,
+ 0x9048, 0x98DF, 0x9049, 0x8755, 0x904A, 0x8FB1, 0x904B, 0x5C3B,
+ 0x904C, 0x4F38, 0x904D, 0x4FE1, 0x904E, 0x4FB5, 0x904F, 0x5507,
+ 0x9050, 0x5A20, 0x9051, 0x5BDD, 0x9052, 0x5BE9, 0x9053, 0x5FC3,
+ 0x9054, 0x614E, 0x9055, 0x632F, 0x9056, 0x65B0, 0x9057, 0x664B,
+ 0x9058, 0x68EE, 0x9059, 0x699B, 0x905A, 0x6D78, 0x905B, 0x6DF1,
+ 0x905C, 0x7533, 0x905D, 0x75B9, 0x905E, 0x771F, 0x905F, 0x795E,
+ 0x9060, 0x79E6, 0x9061, 0x7D33, 0x9062, 0x81E3, 0x9063, 0x82AF,
+ 0x9064, 0x85AA, 0x9065, 0x89AA, 0x9066, 0x8A3A, 0x9067, 0x8EAB,
+ 0x9068, 0x8F9B, 0x9069, 0x9032, 0x906A, 0x91DD, 0x906B, 0x9707,
+ 0x906C, 0x4EBA, 0x906D, 0x4EC1, 0x906E, 0x5203, 0x906F, 0x5875,
+ 0x9070, 0x58EC, 0x9071, 0x5C0B, 0x9072, 0x751A, 0x9073, 0x5C3D,
+ 0x9074, 0x814E, 0x9075, 0x8A0A, 0x9076, 0x8FC5, 0x9077, 0x9663,
+ 0x9078, 0x976D, 0x9079, 0x7B25, 0x907A, 0x8ACF, 0x907B, 0x9808,
+ 0x907C, 0x9162, 0x907D, 0x56F3, 0x907E, 0x53A8, 0x9080, 0x9017,
+ 0x9081, 0x5439, 0x9082, 0x5782, 0x9083, 0x5E25, 0x9084, 0x63A8,
+ 0x9085, 0x6C34, 0x9086, 0x708A, 0x9087, 0x7761, 0x9088, 0x7C8B,
+ 0x9089, 0x7FE0, 0x908A, 0x8870, 0x908B, 0x9042, 0x908C, 0x9154,
+ 0x908D, 0x9310, 0x908E, 0x9318, 0x908F, 0x968F, 0x9090, 0x745E,
+ 0x9091, 0x9AC4, 0x9092, 0x5D07, 0x9093, 0x5D69, 0x9094, 0x6570,
+ 0x9095, 0x67A2, 0x9096, 0x8DA8, 0x9097, 0x96DB, 0x9098, 0x636E,
+ 0x9099, 0x6749, 0x909A, 0x6919, 0x909B, 0x83C5, 0x909C, 0x9817,
+ 0x909D, 0x96C0, 0x909E, 0x88FE, 0x909F, 0x6F84, 0x90A0, 0x647A,
+ 0x90A1, 0x5BF8, 0x90A2, 0x4E16, 0x90A3, 0x702C, 0x90A4, 0x755D,
+ 0x90A5, 0x662F, 0x90A6, 0x51C4, 0x90A7, 0x5236, 0x90A8, 0x52E2,
+ 0x90A9, 0x59D3, 0x90AA, 0x5F81, 0x90AB, 0x6027, 0x90AC, 0x6210,
+ 0x90AD, 0x653F, 0x90AE, 0x6574, 0x90AF, 0x661F, 0x90B0, 0x6674,
+ 0x90B1, 0x68F2, 0x90B2, 0x6816, 0x90B3, 0x6B63, 0x90B4, 0x6E05,
+ 0x90B5, 0x7272, 0x90B6, 0x751F, 0x90B7, 0x76DB, 0x90B8, 0x7CBE,
+ 0x90B9, 0x8056, 0x90BA, 0x58F0, 0x90BB, 0x88FD, 0x90BC, 0x897F,
+ 0x90BD, 0x8AA0, 0x90BE, 0x8A93, 0x90BF, 0x8ACB, 0x90C0, 0x901D,
+ 0x90C1, 0x9192, 0x90C2, 0x9752, 0x90C3, 0x9759, 0x90C4, 0x6589,
+ 0x90C5, 0x7A0E, 0x90C6, 0x8106, 0x90C7, 0x96BB, 0x90C8, 0x5E2D,
+ 0x90C9, 0x60DC, 0x90CA, 0x621A, 0x90CB, 0x65A5, 0x90CC, 0x6614,
+ 0x90CD, 0x6790, 0x90CE, 0x77F3, 0x90CF, 0x7A4D, 0x90D0, 0x7C4D,
+ 0x90D1, 0x7E3E, 0x90D2, 0x810A, 0x90D3, 0x8CAC, 0x90D4, 0x8D64,
+ 0x90D5, 0x8DE1, 0x90D6, 0x8E5F, 0x90D7, 0x78A9, 0x90D8, 0x5207,
+ 0x90D9, 0x62D9, 0x90DA, 0x63A5, 0x90DB, 0x6442, 0x90DC, 0x6298,
+ 0x90DD, 0x8A2D, 0x90DE, 0x7A83, 0x90DF, 0x7BC0, 0x90E0, 0x8AAC,
+ 0x90E1, 0x96EA, 0x90E2, 0x7D76, 0x90E3, 0x820C, 0x90E4, 0x8749,
+ 0x90E5, 0x4ED9, 0x90E6, 0x5148, 0x90E7, 0x5343, 0x90E8, 0x5360,
+ 0x90E9, 0x5BA3, 0x90EA, 0x5C02, 0x90EB, 0x5C16, 0x90EC, 0x5DDD,
+ 0x90ED, 0x6226, 0x90EE, 0x6247, 0x90EF, 0x64B0, 0x90F0, 0x6813,
+ 0x90F1, 0x6834, 0x90F2, 0x6CC9, 0x90F3, 0x6D45, 0x90F4, 0x6D17,
+ 0x90F5, 0x67D3, 0x90F6, 0x6F5C, 0x90F7, 0x714E, 0x90F8, 0x717D,
+ 0x90F9, 0x65CB, 0x90FA, 0x7A7F, 0x90FB, 0x7BAD, 0x90FC, 0x7DDA,
+ 0x9140, 0x7E4A, 0x9141, 0x7FA8, 0x9142, 0x817A, 0x9143, 0x821B,
+ 0x9144, 0x8239, 0x9145, 0x85A6, 0x9146, 0x8A6E, 0x9147, 0x8CCE,
+ 0x9148, 0x8DF5, 0x9149, 0x9078, 0x914A, 0x9077, 0x914B, 0x92AD,
+ 0x914C, 0x9291, 0x914D, 0x9583, 0x914E, 0x9BAE, 0x914F, 0x524D,
+ 0x9150, 0x5584, 0x9151, 0x6F38, 0x9152, 0x7136, 0x9153, 0x5168,
+ 0x9154, 0x7985, 0x9155, 0x7E55, 0x9156, 0x81B3, 0x9157, 0x7CCE,
+ 0x9158, 0x564C, 0x9159, 0x5851, 0x915A, 0x5CA8, 0x915B, 0x63AA,
+ 0x915C, 0x66FE, 0x915D, 0x66FD, 0x915E, 0x695A, 0x915F, 0x72D9,
+ 0x9160, 0x758F, 0x9161, 0x758E, 0x9162, 0x790E, 0x9163, 0x7956,
+ 0x9164, 0x79DF, 0x9165, 0x7C97, 0x9166, 0x7D20, 0x9167, 0x7D44,
+ 0x9168, 0x8607, 0x9169, 0x8A34, 0x916A, 0x963B, 0x916B, 0x9061,
+ 0x916C, 0x9F20, 0x916D, 0x50E7, 0x916E, 0x5275, 0x916F, 0x53CC,
+ 0x9170, 0x53E2, 0x9171, 0x5009, 0x9172, 0x55AA, 0x9173, 0x58EE,
+ 0x9174, 0x594F, 0x9175, 0x723D, 0x9176, 0x5B8B, 0x9177, 0x5C64,
+ 0x9178, 0x531D, 0x9179, 0x60E3, 0x917A, 0x60F3, 0x917B, 0x635C,
+ 0x917C, 0x6383, 0x917D, 0x633F, 0x917E, 0x63BB, 0x9180, 0x64CD,
+ 0x9181, 0x65E9, 0x9182, 0x66F9, 0x9183, 0x5DE3, 0x9184, 0x69CD,
+ 0x9185, 0x69FD, 0x9186, 0x6F15, 0x9187, 0x71E5, 0x9188, 0x4E89,
+ 0x9189, 0x75E9, 0x918A, 0x76F8, 0x918B, 0x7A93, 0x918C, 0x7CDF,
+ 0x918D, 0x7DCF, 0x918E, 0x7D9C, 0x918F, 0x8061, 0x9190, 0x8349,
+ 0x9191, 0x8358, 0x9192, 0x846C, 0x9193, 0x84BC, 0x9194, 0x85FB,
+ 0x9195, 0x88C5, 0x9196, 0x8D70, 0x9197, 0x9001, 0x9198, 0x906D,
+ 0x9199, 0x9397, 0x919A, 0x971C, 0x919B, 0x9A12, 0x919C, 0x50CF,
+ 0x919D, 0x5897, 0x919E, 0x618E, 0x919F, 0x81D3, 0x91A0, 0x8535,
+ 0x91A1, 0x8D08, 0x91A2, 0x9020, 0x91A3, 0x4FC3, 0x91A4, 0x5074,
+ 0x91A5, 0x5247, 0x91A6, 0x5373, 0x91A7, 0x606F, 0x91A8, 0x6349,
+ 0x91A9, 0x675F, 0x91AA, 0x6E2C, 0x91AB, 0x8DB3, 0x91AC, 0x901F,
+ 0x91AD, 0x4FD7, 0x91AE, 0x5C5E, 0x91AF, 0x8CCA, 0x91B0, 0x65CF,
+ 0x91B1, 0x7D9A, 0x91B2, 0x5352, 0x91B3, 0x8896, 0x91B4, 0x5176,
+ 0x91B5, 0x63C3, 0x91B6, 0x5B58, 0x91B7, 0x5B6B, 0x91B8, 0x5C0A,
+ 0x91B9, 0x640D, 0x91BA, 0x6751, 0x91BB, 0x905C, 0x91BC, 0x4ED6,
+ 0x91BD, 0x591A, 0x91BE, 0x592A, 0x91BF, 0x6C70, 0x91C0, 0x8A51,
+ 0x91C1, 0x553E, 0x91C2, 0x5815, 0x91C3, 0x59A5, 0x91C4, 0x60F0,
+ 0x91C5, 0x6253, 0x91C6, 0x67C1, 0x91C7, 0x8235, 0x91C8, 0x6955,
+ 0x91C9, 0x9640, 0x91CA, 0x99C4, 0x91CB, 0x9A28, 0x91CC, 0x4F53,
+ 0x91CD, 0x5806, 0x91CE, 0x5BFE, 0x91CF, 0x8010, 0x91D0, 0x5CB1,
+ 0x91D1, 0x5E2F, 0x91D2, 0x5F85, 0x91D3, 0x6020, 0x91D4, 0x614B,
+ 0x91D5, 0x6234, 0x91D6, 0x66FF, 0x91D7, 0x6CF0, 0x91D8, 0x6EDE,
+ 0x91D9, 0x80CE, 0x91DA, 0x817F, 0x91DB, 0x82D4, 0x91DC, 0x888B,
+ 0x91DD, 0x8CB8, 0x91DE, 0x9000, 0x91DF, 0x902E, 0x91E0, 0x968A,
+ 0x91E1, 0x9EDB, 0x91E2, 0x9BDB, 0x91E3, 0x4EE3, 0x91E4, 0x53F0,
+ 0x91E5, 0x5927, 0x91E6, 0x7B2C, 0x91E7, 0x918D, 0x91E8, 0x984C,
+ 0x91E9, 0x9DF9, 0x91EA, 0x6EDD, 0x91EB, 0x7027, 0x91EC, 0x5353,
+ 0x91ED, 0x5544, 0x91EE, 0x5B85, 0x91EF, 0x6258, 0x91F0, 0x629E,
+ 0x91F1, 0x62D3, 0x91F2, 0x6CA2, 0x91F3, 0x6FEF, 0x91F4, 0x7422,
+ 0x91F5, 0x8A17, 0x91F6, 0x9438, 0x91F7, 0x6FC1, 0x91F8, 0x8AFE,
+ 0x91F9, 0x8338, 0x91FA, 0x51E7, 0x91FB, 0x86F8, 0x91FC, 0x53EA,
+ 0x9240, 0x53E9, 0x9241, 0x4F46, 0x9242, 0x9054, 0x9243, 0x8FB0,
+ 0x9244, 0x596A, 0x9245, 0x8131, 0x9246, 0x5DFD, 0x9247, 0x7AEA,
+ 0x9248, 0x8FBF, 0x9249, 0x68DA, 0x924A, 0x8C37, 0x924B, 0x72F8,
+ 0x924C, 0x9C48, 0x924D, 0x6A3D, 0x924E, 0x8AB0, 0x924F, 0x4E39,
+ 0x9250, 0x5358, 0x9251, 0x5606, 0x9252, 0x5766, 0x9253, 0x62C5,
+ 0x9254, 0x63A2, 0x9255, 0x65E6, 0x9256, 0x6B4E, 0x9257, 0x6DE1,
+ 0x9258, 0x6E5B, 0x9259, 0x70AD, 0x925A, 0x77ED, 0x925B, 0x7AEF,
+ 0x925C, 0x7BAA, 0x925D, 0x7DBB, 0x925E, 0x803D, 0x925F, 0x80C6,
+ 0x9260, 0x86CB, 0x9261, 0x8A95, 0x9262, 0x935B, 0x9263, 0x56E3,
+ 0x9264, 0x58C7, 0x9265, 0x5F3E, 0x9266, 0x65AD, 0x9267, 0x6696,
+ 0x9268, 0x6A80, 0x9269, 0x6BB5, 0x926A, 0x7537, 0x926B, 0x8AC7,
+ 0x926C, 0x5024, 0x926D, 0x77E5, 0x926E, 0x5730, 0x926F, 0x5F1B,
+ 0x9270, 0x6065, 0x9271, 0x667A, 0x9272, 0x6C60, 0x9273, 0x75F4,
+ 0x9274, 0x7A1A, 0x9275, 0x7F6E, 0x9276, 0x81F4, 0x9277, 0x8718,
+ 0x9278, 0x9045, 0x9279, 0x99B3, 0x927A, 0x7BC9, 0x927B, 0x755C,
+ 0x927C, 0x7AF9, 0x927D, 0x7B51, 0x927E, 0x84C4, 0x9280, 0x9010,
+ 0x9281, 0x79E9, 0x9282, 0x7A92, 0x9283, 0x8336, 0x9284, 0x5AE1,
+ 0x9285, 0x7740, 0x9286, 0x4E2D, 0x9287, 0x4EF2, 0x9288, 0x5B99,
+ 0x9289, 0x5FE0, 0x928A, 0x62BD, 0x928B, 0x663C, 0x928C, 0x67F1,
+ 0x928D, 0x6CE8, 0x928E, 0x866B, 0x928F, 0x8877, 0x9290, 0x8A3B,
+ 0x9291, 0x914E, 0x9292, 0x92F3, 0x9293, 0x99D0, 0x9294, 0x6A17,
+ 0x9295, 0x7026, 0x9296, 0x732A, 0x9297, 0x82E7, 0x9298, 0x8457,
+ 0x9299, 0x8CAF, 0x929A, 0x4E01, 0x929B, 0x5146, 0x929C, 0x51CB,
+ 0x929D, 0x558B, 0x929E, 0x5BF5, 0x929F, 0x5E16, 0x92A0, 0x5E33,
+ 0x92A1, 0x5E81, 0x92A2, 0x5F14, 0x92A3, 0x5F35, 0x92A4, 0x5F6B,
+ 0x92A5, 0x5FB4, 0x92A6, 0x61F2, 0x92A7, 0x6311, 0x92A8, 0x66A2,
+ 0x92A9, 0x671D, 0x92AA, 0x6F6E, 0x92AB, 0x7252, 0x92AC, 0x753A,
+ 0x92AD, 0x773A, 0x92AE, 0x8074, 0x92AF, 0x8139, 0x92B0, 0x8178,
+ 0x92B1, 0x8776, 0x92B2, 0x8ABF, 0x92B3, 0x8ADC, 0x92B4, 0x8D85,
+ 0x92B5, 0x8DF3, 0x92B6, 0x929A, 0x92B7, 0x9577, 0x92B8, 0x9802,
+ 0x92B9, 0x9CE5, 0x92BA, 0x52C5, 0x92BB, 0x6357, 0x92BC, 0x76F4,
+ 0x92BD, 0x6715, 0x92BE, 0x6C88, 0x92BF, 0x73CD, 0x92C0, 0x8CC3,
+ 0x92C1, 0x93AE, 0x92C2, 0x9673, 0x92C3, 0x6D25, 0x92C4, 0x589C,
+ 0x92C5, 0x690E, 0x92C6, 0x69CC, 0x92C7, 0x8FFD, 0x92C8, 0x939A,
+ 0x92C9, 0x75DB, 0x92CA, 0x901A, 0x92CB, 0x585A, 0x92CC, 0x6802,
+ 0x92CD, 0x63B4, 0x92CE, 0x69FB, 0x92CF, 0x4F43, 0x92D0, 0x6F2C,
+ 0x92D1, 0x67D8, 0x92D2, 0x8FBB, 0x92D3, 0x8526, 0x92D4, 0x7DB4,
+ 0x92D5, 0x9354, 0x92D6, 0x693F, 0x92D7, 0x6F70, 0x92D8, 0x576A,
+ 0x92D9, 0x58F7, 0x92DA, 0x5B2C, 0x92DB, 0x7D2C, 0x92DC, 0x722A,
+ 0x92DD, 0x540A, 0x92DE, 0x91E3, 0x92DF, 0x9DB4, 0x92E0, 0x4EAD,
+ 0x92E1, 0x4F4E, 0x92E2, 0x505C, 0x92E3, 0x5075, 0x92E4, 0x5243,
+ 0x92E5, 0x8C9E, 0x92E6, 0x5448, 0x92E7, 0x5824, 0x92E8, 0x5B9A,
+ 0x92E9, 0x5E1D, 0x92EA, 0x5E95, 0x92EB, 0x5EAD, 0x92EC, 0x5EF7,
+ 0x92ED, 0x5F1F, 0x92EE, 0x608C, 0x92EF, 0x62B5, 0x92F0, 0x633A,
+ 0x92F1, 0x63D0, 0x92F2, 0x68AF, 0x92F3, 0x6C40, 0x92F4, 0x7887,
+ 0x92F5, 0x798E, 0x92F6, 0x7A0B, 0x92F7, 0x7DE0, 0x92F8, 0x8247,
+ 0x92F9, 0x8A02, 0x92FA, 0x8AE6, 0x92FB, 0x8E44, 0x92FC, 0x9013,
+ 0x9340, 0x90B8, 0x9341, 0x912D, 0x9342, 0x91D8, 0x9343, 0x9F0E,
+ 0x9344, 0x6CE5, 0x9345, 0x6458, 0x9346, 0x64E2, 0x9347, 0x6575,
+ 0x9348, 0x6EF4, 0x9349, 0x7684, 0x934A, 0x7B1B, 0x934B, 0x9069,
+ 0x934C, 0x93D1, 0x934D, 0x6EBA, 0x934E, 0x54F2, 0x934F, 0x5FB9,
+ 0x9350, 0x64A4, 0x9351, 0x8F4D, 0x9352, 0x8FED, 0x9353, 0x9244,
+ 0x9354, 0x5178, 0x9355, 0x586B, 0x9356, 0x5929, 0x9357, 0x5C55,
+ 0x9358, 0x5E97, 0x9359, 0x6DFB, 0x935A, 0x7E8F, 0x935B, 0x751C,
+ 0x935C, 0x8CBC, 0x935D, 0x8EE2, 0x935E, 0x985B, 0x935F, 0x70B9,
+ 0x9360, 0x4F1D, 0x9361, 0x6BBF, 0x9362, 0x6FB1, 0x9363, 0x7530,
+ 0x9364, 0x96FB, 0x9365, 0x514E, 0x9366, 0x5410, 0x9367, 0x5835,
+ 0x9368, 0x5857, 0x9369, 0x59AC, 0x936A, 0x5C60, 0x936B, 0x5F92,
+ 0x936C, 0x6597, 0x936D, 0x675C, 0x936E, 0x6E21, 0x936F, 0x767B,
+ 0x9370, 0x83DF, 0x9371, 0x8CED, 0x9372, 0x9014, 0x9373, 0x90FD,
+ 0x9374, 0x934D, 0x9375, 0x7825, 0x9376, 0x783A, 0x9377, 0x52AA,
+ 0x9378, 0x5EA6, 0x9379, 0x571F, 0x937A, 0x5974, 0x937B, 0x6012,
+ 0x937C, 0x5012, 0x937D, 0x515A, 0x937E, 0x51AC, 0x9380, 0x51CD,
+ 0x9381, 0x5200, 0x9382, 0x5510, 0x9383, 0x5854, 0x9384, 0x5858,
+ 0x9385, 0x5957, 0x9386, 0x5B95, 0x9387, 0x5CF6, 0x9388, 0x5D8B,
+ 0x9389, 0x60BC, 0x938A, 0x6295, 0x938B, 0x642D, 0x938C, 0x6771,
+ 0x938D, 0x6843, 0x938E, 0x68BC, 0x938F, 0x68DF, 0x9390, 0x76D7,
+ 0x9391, 0x6DD8, 0x9392, 0x6E6F, 0x9393, 0x6D9B, 0x9394, 0x706F,
+ 0x9395, 0x71C8, 0x9396, 0x5F53, 0x9397, 0x75D8, 0x9398, 0x7977,
+ 0x9399, 0x7B49, 0x939A, 0x7B54, 0x939B, 0x7B52, 0x939C, 0x7CD6,
+ 0x939D, 0x7D71, 0x939E, 0x5230, 0x939F, 0x8463, 0x93A0, 0x8569,
+ 0x93A1, 0x85E4, 0x93A2, 0x8A0E, 0x93A3, 0x8B04, 0x93A4, 0x8C46,
+ 0x93A5, 0x8E0F, 0x93A6, 0x9003, 0x93A7, 0x900F, 0x93A8, 0x9419,
+ 0x93A9, 0x9676, 0x93AA, 0x982D, 0x93AB, 0x9A30, 0x93AC, 0x95D8,
+ 0x93AD, 0x50CD, 0x93AE, 0x52D5, 0x93AF, 0x540C, 0x93B0, 0x5802,
+ 0x93B1, 0x5C0E, 0x93B2, 0x61A7, 0x93B3, 0x649E, 0x93B4, 0x6D1E,
+ 0x93B5, 0x77B3, 0x93B6, 0x7AE5, 0x93B7, 0x80F4, 0x93B8, 0x8404,
+ 0x93B9, 0x9053, 0x93BA, 0x9285, 0x93BB, 0x5CE0, 0x93BC, 0x9D07,
+ 0x93BD, 0x533F, 0x93BE, 0x5F97, 0x93BF, 0x5FB3, 0x93C0, 0x6D9C,
+ 0x93C1, 0x7279, 0x93C2, 0x7763, 0x93C3, 0x79BF, 0x93C4, 0x7BE4,
+ 0x93C5, 0x6BD2, 0x93C6, 0x72EC, 0x93C7, 0x8AAD, 0x93C8, 0x6803,
+ 0x93C9, 0x6A61, 0x93CA, 0x51F8, 0x93CB, 0x7A81, 0x93CC, 0x6934,
+ 0x93CD, 0x5C4A, 0x93CE, 0x9CF6, 0x93CF, 0x82EB, 0x93D0, 0x5BC5,
+ 0x93D1, 0x9149, 0x93D2, 0x701E, 0x93D3, 0x5678, 0x93D4, 0x5C6F,
+ 0x93D5, 0x60C7, 0x93D6, 0x6566, 0x93D7, 0x6C8C, 0x93D8, 0x8C5A,
+ 0x93D9, 0x9041, 0x93DA, 0x9813, 0x93DB, 0x5451, 0x93DC, 0x66C7,
+ 0x93DD, 0x920D, 0x93DE, 0x5948, 0x93DF, 0x90A3, 0x93E0, 0x5185,
+ 0x93E1, 0x4E4D, 0x93E2, 0x51EA, 0x93E3, 0x8599, 0x93E4, 0x8B0E,
+ 0x93E5, 0x7058, 0x93E6, 0x637A, 0x93E7, 0x934B, 0x93E8, 0x6962,
+ 0x93E9, 0x99B4, 0x93EA, 0x7E04, 0x93EB, 0x7577, 0x93EC, 0x5357,
+ 0x93ED, 0x6960, 0x93EE, 0x8EDF, 0x93EF, 0x96E3, 0x93F0, 0x6C5D,
+ 0x93F1, 0x4E8C, 0x93F2, 0x5C3C, 0x93F3, 0x5F10, 0x93F4, 0x8FE9,
+ 0x93F5, 0x5302, 0x93F6, 0x8CD1, 0x93F7, 0x8089, 0x93F8, 0x8679,
+ 0x93F9, 0x5EFF, 0x93FA, 0x65E5, 0x93FB, 0x4E73, 0x93FC, 0x5165,
+ 0x9440, 0x5982, 0x9441, 0x5C3F, 0x9442, 0x97EE, 0x9443, 0x4EFB,
+ 0x9444, 0x598A, 0x9445, 0x5FCD, 0x9446, 0x8A8D, 0x9447, 0x6FE1,
+ 0x9448, 0x79B0, 0x9449, 0x7962, 0x944A, 0x5BE7, 0x944B, 0x8471,
+ 0x944C, 0x732B, 0x944D, 0x71B1, 0x944E, 0x5E74, 0x944F, 0x5FF5,
+ 0x9450, 0x637B, 0x9451, 0x649A, 0x9452, 0x71C3, 0x9453, 0x7C98,
+ 0x9454, 0x4E43, 0x9455, 0x5EFC, 0x9456, 0x4E4B, 0x9457, 0x57DC,
+ 0x9458, 0x56A2, 0x9459, 0x60A9, 0x945A, 0x6FC3, 0x945B, 0x7D0D,
+ 0x945C, 0x80FD, 0x945D, 0x8133, 0x945E, 0x81BF, 0x945F, 0x8FB2,
+ 0x9460, 0x8997, 0x9461, 0x86A4, 0x9462, 0x5DF4, 0x9463, 0x628A,
+ 0x9464, 0x64AD, 0x9465, 0x8987, 0x9466, 0x6777, 0x9467, 0x6CE2,
+ 0x9468, 0x6D3E, 0x9469, 0x7436, 0x946A, 0x7834, 0x946B, 0x5A46,
+ 0x946C, 0x7F75, 0x946D, 0x82AD, 0x946E, 0x99AC, 0x946F, 0x4FF3,
+ 0x9470, 0x5EC3, 0x9471, 0x62DD, 0x9472, 0x6392, 0x9473, 0x6557,
+ 0x9474, 0x676F, 0x9475, 0x76C3, 0x9476, 0x724C, 0x9477, 0x80CC,
+ 0x9478, 0x80BA, 0x9479, 0x8F29, 0x947A, 0x914D, 0x947B, 0x500D,
+ 0x947C, 0x57F9, 0x947D, 0x5A92, 0x947E, 0x6885, 0x9480, 0x6973,
+ 0x9481, 0x7164, 0x9482, 0x72FD, 0x9483, 0x8CB7, 0x9484, 0x58F2,
+ 0x9485, 0x8CE0, 0x9486, 0x966A, 0x9487, 0x9019, 0x9488, 0x877F,
+ 0x9489, 0x79E4, 0x948A, 0x77E7, 0x948B, 0x8429, 0x948C, 0x4F2F,
+ 0x948D, 0x5265, 0x948E, 0x535A, 0x948F, 0x62CD, 0x9490, 0x67CF,
+ 0x9491, 0x6CCA, 0x9492, 0x767D, 0x9493, 0x7B94, 0x9494, 0x7C95,
+ 0x9495, 0x8236, 0x9496, 0x8584, 0x9497, 0x8FEB, 0x9498, 0x66DD,
+ 0x9499, 0x6F20, 0x949A, 0x7206, 0x949B, 0x7E1B, 0x949C, 0x83AB,
+ 0x949D, 0x99C1, 0x949E, 0x9EA6, 0x949F, 0x51FD, 0x94A0, 0x7BB1,
+ 0x94A1, 0x7872, 0x94A2, 0x7BB8, 0x94A3, 0x8087, 0x94A4, 0x7B48,
+ 0x94A5, 0x6AE8, 0x94A6, 0x5E61, 0x94A7, 0x808C, 0x94A8, 0x7551,
+ 0x94A9, 0x7560, 0x94AA, 0x516B, 0x94AB, 0x9262, 0x94AC, 0x6E8C,
+ 0x94AD, 0x767A, 0x94AE, 0x9197, 0x94AF, 0x9AEA, 0x94B0, 0x4F10,
+ 0x94B1, 0x7F70, 0x94B2, 0x629C, 0x94B3, 0x7B4F, 0x94B4, 0x95A5,
+ 0x94B5, 0x9CE9, 0x94B6, 0x567A, 0x94B7, 0x5859, 0x94B8, 0x86E4,
+ 0x94B9, 0x96BC, 0x94BA, 0x4F34, 0x94BB, 0x5224, 0x94BC, 0x534A,
+ 0x94BD, 0x53CD, 0x94BE, 0x53DB, 0x94BF, 0x5E06, 0x94C0, 0x642C,
+ 0x94C1, 0x6591, 0x94C2, 0x677F, 0x94C3, 0x6C3E, 0x94C4, 0x6C4E,
+ 0x94C5, 0x7248, 0x94C6, 0x72AF, 0x94C7, 0x73ED, 0x94C8, 0x7554,
+ 0x94C9, 0x7E41, 0x94CA, 0x822C, 0x94CB, 0x85E9, 0x94CC, 0x8CA9,
+ 0x94CD, 0x7BC4, 0x94CE, 0x91C6, 0x94CF, 0x7169, 0x94D0, 0x9812,
+ 0x94D1, 0x98EF, 0x94D2, 0x633D, 0x94D3, 0x6669, 0x94D4, 0x756A,
+ 0x94D5, 0x76E4, 0x94D6, 0x78D0, 0x94D7, 0x8543, 0x94D8, 0x86EE,
+ 0x94D9, 0x532A, 0x94DA, 0x5351, 0x94DB, 0x5426, 0x94DC, 0x5983,
+ 0x94DD, 0x5E87, 0x94DE, 0x5F7C, 0x94DF, 0x60B2, 0x94E0, 0x6249,
+ 0x94E1, 0x6279, 0x94E2, 0x62AB, 0x94E3, 0x6590, 0x94E4, 0x6BD4,
+ 0x94E5, 0x6CCC, 0x94E6, 0x75B2, 0x94E7, 0x76AE, 0x94E8, 0x7891,
+ 0x94E9, 0x79D8, 0x94EA, 0x7DCB, 0x94EB, 0x7F77, 0x94EC, 0x80A5,
+ 0x94ED, 0x88AB, 0x94EE, 0x8AB9, 0x94EF, 0x8CBB, 0x94F0, 0x907F,
+ 0x94F1, 0x975E, 0x94F2, 0x98DB, 0x94F3, 0x6A0B, 0x94F4, 0x7C38,
+ 0x94F5, 0x5099, 0x94F6, 0x5C3E, 0x94F7, 0x5FAE, 0x94F8, 0x6787,
+ 0x94F9, 0x6BD8, 0x94FA, 0x7435, 0x94FB, 0x7709, 0x94FC, 0x7F8E,
+ 0x9540, 0x9F3B, 0x9541, 0x67CA, 0x9542, 0x7A17, 0x9543, 0x5339,
+ 0x9544, 0x758B, 0x9545, 0x9AED, 0x9546, 0x5F66, 0x9547, 0x819D,
+ 0x9548, 0x83F1, 0x9549, 0x8098, 0x954A, 0x5F3C, 0x954B, 0x5FC5,
+ 0x954C, 0x7562, 0x954D, 0x7B46, 0x954E, 0x903C, 0x954F, 0x6867,
+ 0x9550, 0x59EB, 0x9551, 0x5A9B, 0x9552, 0x7D10, 0x9553, 0x767E,
+ 0x9554, 0x8B2C, 0x9555, 0x4FF5, 0x9556, 0x5F6A, 0x9557, 0x6A19,
+ 0x9558, 0x6C37, 0x9559, 0x6F02, 0x955A, 0x74E2, 0x955B, 0x7968,
+ 0x955C, 0x8868, 0x955D, 0x8A55, 0x955E, 0x8C79, 0x955F, 0x5EDF,
+ 0x9560, 0x63CF, 0x9561, 0x75C5, 0x9562, 0x79D2, 0x9563, 0x82D7,
+ 0x9564, 0x9328, 0x9565, 0x92F2, 0x9566, 0x849C, 0x9567, 0x86ED,
+ 0x9568, 0x9C2D, 0x9569, 0x54C1, 0x956A, 0x5F6C, 0x956B, 0x658C,
+ 0x956C, 0x6D5C, 0x956D, 0x7015, 0x956E, 0x8CA7, 0x956F, 0x8CD3,
+ 0x9570, 0x983B, 0x9571, 0x654F, 0x9572, 0x74F6, 0x9573, 0x4E0D,
+ 0x9574, 0x4ED8, 0x9575, 0x57E0, 0x9576, 0x592B, 0x9577, 0x5A66,
+ 0x9578, 0x5BCC, 0x9579, 0x51A8, 0x957A, 0x5E03, 0x957B, 0x5E9C,
+ 0x957C, 0x6016, 0x957D, 0x6276, 0x957E, 0x6577, 0x9580, 0x65A7,
+ 0x9581, 0x666E, 0x9582, 0x6D6E, 0x9583, 0x7236, 0x9584, 0x7B26,
+ 0x9585, 0x8150, 0x9586, 0x819A, 0x9587, 0x8299, 0x9588, 0x8B5C,
+ 0x9589, 0x8CA0, 0x958A, 0x8CE6, 0x958B, 0x8D74, 0x958C, 0x961C,
+ 0x958D, 0x9644, 0x958E, 0x4FAE, 0x958F, 0x64AB, 0x9590, 0x6B66,
+ 0x9591, 0x821E, 0x9592, 0x8461, 0x9593, 0x856A, 0x9594, 0x90E8,
+ 0x9595, 0x5C01, 0x9596, 0x6953, 0x9597, 0x98A8, 0x9598, 0x847A,
+ 0x9599, 0x8557, 0x959A, 0x4F0F, 0x959B, 0x526F, 0x959C, 0x5FA9,
+ 0x959D, 0x5E45, 0x959E, 0x670D, 0x959F, 0x798F, 0x95A0, 0x8179,
+ 0x95A1, 0x8907, 0x95A2, 0x8986, 0x95A3, 0x6DF5, 0x95A4, 0x5F17,
+ 0x95A5, 0x6255, 0x95A6, 0x6CB8, 0x95A7, 0x4ECF, 0x95A8, 0x7269,
+ 0x95A9, 0x9B92, 0x95AA, 0x5206, 0x95AB, 0x543B, 0x95AC, 0x5674,
+ 0x95AD, 0x58B3, 0x95AE, 0x61A4, 0x95AF, 0x626E, 0x95B0, 0x711A,
+ 0x95B1, 0x596E, 0x95B2, 0x7C89, 0x95B3, 0x7CDE, 0x95B4, 0x7D1B,
+ 0x95B5, 0x96F0, 0x95B6, 0x6587, 0x95B7, 0x805E, 0x95B8, 0x4E19,
+ 0x95B9, 0x4F75, 0x95BA, 0x5175, 0x95BB, 0x5840, 0x95BC, 0x5E63,
+ 0x95BD, 0x5E73, 0x95BE, 0x5F0A, 0x95BF, 0x67C4, 0x95C0, 0x4E26,
+ 0x95C1, 0x853D, 0x95C2, 0x9589, 0x95C3, 0x965B, 0x95C4, 0x7C73,
+ 0x95C5, 0x9801, 0x95C6, 0x50FB, 0x95C7, 0x58C1, 0x95C8, 0x7656,
+ 0x95C9, 0x78A7, 0x95CA, 0x5225, 0x95CB, 0x77A5, 0x95CC, 0x8511,
+ 0x95CD, 0x7B86, 0x95CE, 0x504F, 0x95CF, 0x5909, 0x95D0, 0x7247,
+ 0x95D1, 0x7BC7, 0x95D2, 0x7DE8, 0x95D3, 0x8FBA, 0x95D4, 0x8FD4,
+ 0x95D5, 0x904D, 0x95D6, 0x4FBF, 0x95D7, 0x52C9, 0x95D8, 0x5A29,
+ 0x95D9, 0x5F01, 0x95DA, 0x97AD, 0x95DB, 0x4FDD, 0x95DC, 0x8217,
+ 0x95DD, 0x92EA, 0x95DE, 0x5703, 0x95DF, 0x6355, 0x95E0, 0x6B69,
+ 0x95E1, 0x752B, 0x95E2, 0x88DC, 0x95E3, 0x8F14, 0x95E4, 0x7A42,
+ 0x95E5, 0x52DF, 0x95E6, 0x5893, 0x95E7, 0x6155, 0x95E8, 0x620A,
+ 0x95E9, 0x66AE, 0x95EA, 0x6BCD, 0x95EB, 0x7C3F, 0x95EC, 0x83E9,
+ 0x95ED, 0x5023, 0x95EE, 0x4FF8, 0x95EF, 0x5305, 0x95F0, 0x5446,
+ 0x95F1, 0x5831, 0x95F2, 0x5949, 0x95F3, 0x5B9D, 0x95F4, 0x5CF0,
+ 0x95F5, 0x5CEF, 0x95F6, 0x5D29, 0x95F7, 0x5E96, 0x95F8, 0x62B1,
+ 0x95F9, 0x6367, 0x95FA, 0x653E, 0x95FB, 0x65B9, 0x95FC, 0x670B,
+ 0x9640, 0x6CD5, 0x9641, 0x6CE1, 0x9642, 0x70F9, 0x9643, 0x7832,
+ 0x9644, 0x7E2B, 0x9645, 0x80DE, 0x9646, 0x82B3, 0x9647, 0x840C,
+ 0x9648, 0x84EC, 0x9649, 0x8702, 0x964A, 0x8912, 0x964B, 0x8A2A,
+ 0x964C, 0x8C4A, 0x964D, 0x90A6, 0x964E, 0x92D2, 0x964F, 0x98FD,
+ 0x9650, 0x9CF3, 0x9651, 0x9D6C, 0x9652, 0x4E4F, 0x9653, 0x4EA1,
+ 0x9654, 0x508D, 0x9655, 0x5256, 0x9656, 0x574A, 0x9657, 0x59A8,
+ 0x9658, 0x5E3D, 0x9659, 0x5FD8, 0x965A, 0x5FD9, 0x965B, 0x623F,
+ 0x965C, 0x66B4, 0x965D, 0x671B, 0x965E, 0x67D0, 0x965F, 0x68D2,
+ 0x9660, 0x5192, 0x9661, 0x7D21, 0x9662, 0x80AA, 0x9663, 0x81A8,
+ 0x9664, 0x8B00, 0x9665, 0x8C8C, 0x9666, 0x8CBF, 0x9667, 0x927E,
+ 0x9668, 0x9632, 0x9669, 0x5420, 0x966A, 0x982C, 0x966B, 0x5317,
+ 0x966C, 0x50D5, 0x966D, 0x535C, 0x966E, 0x58A8, 0x966F, 0x64B2,
+ 0x9670, 0x6734, 0x9671, 0x7267, 0x9672, 0x7766, 0x9673, 0x7A46,
+ 0x9674, 0x91E6, 0x9675, 0x52C3, 0x9676, 0x6CA1, 0x9677, 0x6B86,
+ 0x9678, 0x5800, 0x9679, 0x5E4C, 0x967A, 0x5954, 0x967B, 0x672C,
+ 0x967C, 0x7FFB, 0x967D, 0x51E1, 0x967E, 0x76C6, 0x9680, 0x6469,
+ 0x9681, 0x78E8, 0x9682, 0x9B54, 0x9683, 0x9EBB, 0x9684, 0x57CB,
+ 0x9685, 0x59B9, 0x9686, 0x6627, 0x9687, 0x679A, 0x9688, 0x6BCE,
+ 0x9689, 0x54E9, 0x968A, 0x69D9, 0x968B, 0x5E55, 0x968C, 0x819C,
+ 0x968D, 0x6795, 0x968E, 0x9BAA, 0x968F, 0x67FE, 0x9690, 0x9C52,
+ 0x9691, 0x685D, 0x9692, 0x4EA6, 0x9693, 0x4FE3, 0x9694, 0x53C8,
+ 0x9695, 0x62B9, 0x9696, 0x672B, 0x9697, 0x6CAB, 0x9698, 0x8FC4,
+ 0x9699, 0x4FAD, 0x969A, 0x7E6D, 0x969B, 0x9EBF, 0x969C, 0x4E07,
+ 0x969D, 0x6162, 0x969E, 0x6E80, 0x969F, 0x6F2B, 0x96A0, 0x8513,
+ 0x96A1, 0x5473, 0x96A2, 0x672A, 0x96A3, 0x9B45, 0x96A4, 0x5DF3,
+ 0x96A5, 0x7B95, 0x96A6, 0x5CAC, 0x96A7, 0x5BC6, 0x96A8, 0x871C,
+ 0x96A9, 0x6E4A, 0x96AA, 0x84D1, 0x96AB, 0x7A14, 0x96AC, 0x8108,
+ 0x96AD, 0x5999, 0x96AE, 0x7C8D, 0x96AF, 0x6C11, 0x96B0, 0x7720,
+ 0x96B1, 0x52D9, 0x96B2, 0x5922, 0x96B3, 0x7121, 0x96B4, 0x725F,
+ 0x96B5, 0x77DB, 0x96B6, 0x9727, 0x96B7, 0x9D61, 0x96B8, 0x690B,
+ 0x96B9, 0x5A7F, 0x96BA, 0x5A18, 0x96BB, 0x51A5, 0x96BC, 0x540D,
+ 0x96BD, 0x547D, 0x96BE, 0x660E, 0x96BF, 0x76DF, 0x96C0, 0x8FF7,
+ 0x96C1, 0x9298, 0x96C2, 0x9CF4, 0x96C3, 0x59EA, 0x96C4, 0x725D,
+ 0x96C5, 0x6EC5, 0x96C6, 0x514D, 0x96C7, 0x68C9, 0x96C8, 0x7DBF,
+ 0x96C9, 0x7DEC, 0x96CA, 0x9762, 0x96CB, 0x9EBA, 0x96CC, 0x6478,
+ 0x96CD, 0x6A21, 0x96CE, 0x8302, 0x96CF, 0x5984, 0x96D0, 0x5B5F,
+ 0x96D1, 0x6BDB, 0x96D2, 0x731B, 0x96D3, 0x76F2, 0x96D4, 0x7DB2,
+ 0x96D5, 0x8017, 0x96D6, 0x8499, 0x96D7, 0x5132, 0x96D8, 0x6728,
+ 0x96D9, 0x9ED9, 0x96DA, 0x76EE, 0x96DB, 0x6762, 0x96DC, 0x52FF,
+ 0x96DD, 0x9905, 0x96DE, 0x5C24, 0x96DF, 0x623B, 0x96E0, 0x7C7E,
+ 0x96E1, 0x8CB0, 0x96E2, 0x554F, 0x96E3, 0x60B6, 0x96E4, 0x7D0B,
+ 0x96E5, 0x9580, 0x96E6, 0x5301, 0x96E7, 0x4E5F, 0x96E8, 0x51B6,
+ 0x96E9, 0x591C, 0x96EA, 0x723A, 0x96EB, 0x8036, 0x96EC, 0x91CE,
+ 0x96ED, 0x5F25, 0x96EE, 0x77E2, 0x96EF, 0x5384, 0x96F0, 0x5F79,
+ 0x96F1, 0x7D04, 0x96F2, 0x85AC, 0x96F3, 0x8A33, 0x96F4, 0x8E8D,
+ 0x96F5, 0x9756, 0x96F6, 0x67F3, 0x96F7, 0x85AE, 0x96F8, 0x9453,
+ 0x96F9, 0x6109, 0x96FA, 0x6108, 0x96FB, 0x6CB9, 0x96FC, 0x7652,
+ 0x9740, 0x8AED, 0x9741, 0x8F38, 0x9742, 0x552F, 0x9743, 0x4F51,
+ 0x9744, 0x512A, 0x9745, 0x52C7, 0x9746, 0x53CB, 0x9747, 0x5BA5,
+ 0x9748, 0x5E7D, 0x9749, 0x60A0, 0x974A, 0x6182, 0x974B, 0x63D6,
+ 0x974C, 0x6709, 0x974D, 0x67DA, 0x974E, 0x6E67, 0x974F, 0x6D8C,
+ 0x9750, 0x7336, 0x9751, 0x7337, 0x9752, 0x7531, 0x9753, 0x7950,
+ 0x9754, 0x88D5, 0x9755, 0x8A98, 0x9756, 0x904A, 0x9757, 0x9091,
+ 0x9758, 0x90F5, 0x9759, 0x96C4, 0x975A, 0x878D, 0x975B, 0x5915,
+ 0x975C, 0x4E88, 0x975D, 0x4F59, 0x975E, 0x4E0E, 0x975F, 0x8A89,
+ 0x9760, 0x8F3F, 0x9761, 0x9810, 0x9762, 0x50AD, 0x9763, 0x5E7C,
+ 0x9764, 0x5996, 0x9765, 0x5BB9, 0x9766, 0x5EB8, 0x9767, 0x63DA,
+ 0x9768, 0x63FA, 0x9769, 0x64C1, 0x976A, 0x66DC, 0x976B, 0x694A,
+ 0x976C, 0x69D8, 0x976D, 0x6D0B, 0x976E, 0x6EB6, 0x976F, 0x7194,
+ 0x9770, 0x7528, 0x9771, 0x7AAF, 0x9772, 0x7F8A, 0x9773, 0x8000,
+ 0x9774, 0x8449, 0x9775, 0x84C9, 0x9776, 0x8981, 0x9777, 0x8B21,
+ 0x9778, 0x8E0A, 0x9779, 0x9065, 0x977A, 0x967D, 0x977B, 0x990A,
+ 0x977C, 0x617E, 0x977D, 0x6291, 0x977E, 0x6B32, 0x9780, 0x6C83,
+ 0x9781, 0x6D74, 0x9782, 0x7FCC, 0x9783, 0x7FFC, 0x9784, 0x6DC0,
+ 0x9785, 0x7F85, 0x9786, 0x87BA, 0x9787, 0x88F8, 0x9788, 0x6765,
+ 0x9789, 0x83B1, 0x978A, 0x983C, 0x978B, 0x96F7, 0x978C, 0x6D1B,
+ 0x978D, 0x7D61, 0x978E, 0x843D, 0x978F, 0x916A, 0x9790, 0x4E71,
+ 0x9791, 0x5375, 0x9792, 0x5D50, 0x9793, 0x6B04, 0x9794, 0x6FEB,
+ 0x9795, 0x85CD, 0x9796, 0x862D, 0x9797, 0x89A7, 0x9798, 0x5229,
+ 0x9799, 0x540F, 0x979A, 0x5C65, 0x979B, 0x674E, 0x979C, 0x68A8,
+ 0x979D, 0x7406, 0x979E, 0x7483, 0x979F, 0x75E2, 0x97A0, 0x88CF,
+ 0x97A1, 0x88E1, 0x97A2, 0x91CC, 0x97A3, 0x96E2, 0x97A4, 0x9678,
+ 0x97A5, 0x5F8B, 0x97A6, 0x7387, 0x97A7, 0x7ACB, 0x97A8, 0x844E,
+ 0x97A9, 0x63A0, 0x97AA, 0x7565, 0x97AB, 0x5289, 0x97AC, 0x6D41,
+ 0x97AD, 0x6E9C, 0x97AE, 0x7409, 0x97AF, 0x7559, 0x97B0, 0x786B,
+ 0x97B1, 0x7C92, 0x97B2, 0x9686, 0x97B3, 0x7ADC, 0x97B4, 0x9F8D,
+ 0x97B5, 0x4FB6, 0x97B6, 0x616E, 0x97B7, 0x65C5, 0x97B8, 0x865C,
+ 0x97B9, 0x4E86, 0x97BA, 0x4EAE, 0x97BB, 0x50DA, 0x97BC, 0x4E21,
+ 0x97BD, 0x51CC, 0x97BE, 0x5BEE, 0x97BF, 0x6599, 0x97C0, 0x6881,
+ 0x97C1, 0x6DBC, 0x97C2, 0x731F, 0x97C3, 0x7642, 0x97C4, 0x77AD,
+ 0x97C5, 0x7A1C, 0x97C6, 0x7CE7, 0x97C7, 0x826F, 0x97C8, 0x8AD2,
+ 0x97C9, 0x907C, 0x97CA, 0x91CF, 0x97CB, 0x9675, 0x97CC, 0x9818,
+ 0x97CD, 0x529B, 0x97CE, 0x7DD1, 0x97CF, 0x502B, 0x97D0, 0x5398,
+ 0x97D1, 0x6797, 0x97D2, 0x6DCB, 0x97D3, 0x71D0, 0x97D4, 0x7433,
+ 0x97D5, 0x81E8, 0x97D6, 0x8F2A, 0x97D7, 0x96A3, 0x97D8, 0x9C57,
+ 0x97D9, 0x9E9F, 0x97DA, 0x7460, 0x97DB, 0x5841, 0x97DC, 0x6D99,
+ 0x97DD, 0x7D2F, 0x97DE, 0x985E, 0x97DF, 0x4EE4, 0x97E0, 0x4F36,
+ 0x97E1, 0x4F8B, 0x97E2, 0x51B7, 0x97E3, 0x52B1, 0x97E4, 0x5DBA,
+ 0x97E5, 0x601C, 0x97E6, 0x73B2, 0x97E7, 0x793C, 0x97E8, 0x82D3,
+ 0x97E9, 0x9234, 0x97EA, 0x96B7, 0x97EB, 0x96F6, 0x97EC, 0x970A,
+ 0x97ED, 0x9E97, 0x97EE, 0x9F62, 0x97EF, 0x66A6, 0x97F0, 0x6B74,
+ 0x97F1, 0x5217, 0x97F2, 0x52A3, 0x97F3, 0x70C8, 0x97F4, 0x88C2,
+ 0x97F5, 0x5EC9, 0x97F6, 0x604B, 0x97F7, 0x6190, 0x97F8, 0x6F23,
+ 0x97F9, 0x7149, 0x97FA, 0x7C3E, 0x97FB, 0x7DF4, 0x97FC, 0x806F,
+ 0x9840, 0x84EE, 0x9841, 0x9023, 0x9842, 0x932C, 0x9843, 0x5442,
+ 0x9844, 0x9B6F, 0x9845, 0x6AD3, 0x9846, 0x7089, 0x9847, 0x8CC2,
+ 0x9848, 0x8DEF, 0x9849, 0x9732, 0x984A, 0x52B4, 0x984B, 0x5A41,
+ 0x984C, 0x5ECA, 0x984D, 0x5F04, 0x984E, 0x6717, 0x984F, 0x697C,
+ 0x9850, 0x6994, 0x9851, 0x6D6A, 0x9852, 0x6F0F, 0x9853, 0x7262,
+ 0x9854, 0x72FC, 0x9855, 0x7BED, 0x9856, 0x8001, 0x9857, 0x807E,
+ 0x9858, 0x874B, 0x9859, 0x90CE, 0x985A, 0x516D, 0x985B, 0x9E93,
+ 0x985C, 0x7984, 0x985D, 0x808B, 0x985E, 0x9332, 0x985F, 0x8AD6,
+ 0x9860, 0x502D, 0x9861, 0x548C, 0x9862, 0x8A71, 0x9863, 0x6B6A,
+ 0x9864, 0x8CC4, 0x9865, 0x8107, 0x9866, 0x60D1, 0x9867, 0x67A0,
+ 0x9868, 0x9DF2, 0x9869, 0x4E99, 0x986A, 0x4E98, 0x986B, 0x9C10,
+ 0x986C, 0x8A6B, 0x986D, 0x85C1, 0x986E, 0x8568, 0x986F, 0x6900,
+ 0x9870, 0x6E7E, 0x9871, 0x7897, 0x9872, 0x8155, 0x989F, 0x5F0C,
+ 0x98A0, 0x4E10, 0x98A1, 0x4E15, 0x98A2, 0x4E2A, 0x98A3, 0x4E31,
+ 0x98A4, 0x4E36, 0x98A5, 0x4E3C, 0x98A6, 0x4E3F, 0x98A7, 0x4E42,
+ 0x98A8, 0x4E56, 0x98A9, 0x4E58, 0x98AA, 0x4E82, 0x98AB, 0x4E85,
+ 0x98AC, 0x8C6B, 0x98AD, 0x4E8A, 0x98AE, 0x8212, 0x98AF, 0x5F0D,
+ 0x98B0, 0x4E8E, 0x98B1, 0x4E9E, 0x98B2, 0x4E9F, 0x98B3, 0x4EA0,
+ 0x98B4, 0x4EA2, 0x98B5, 0x4EB0, 0x98B6, 0x4EB3, 0x98B7, 0x4EB6,
+ 0x98B8, 0x4ECE, 0x98B9, 0x4ECD, 0x98BA, 0x4EC4, 0x98BB, 0x4EC6,
+ 0x98BC, 0x4EC2, 0x98BD, 0x4ED7, 0x98BE, 0x4EDE, 0x98BF, 0x4EED,
+ 0x98C0, 0x4EDF, 0x98C1, 0x4EF7, 0x98C2, 0x4F09, 0x98C3, 0x4F5A,
+ 0x98C4, 0x4F30, 0x98C5, 0x4F5B, 0x98C6, 0x4F5D, 0x98C7, 0x4F57,
+ 0x98C8, 0x4F47, 0x98C9, 0x4F76, 0x98CA, 0x4F88, 0x98CB, 0x4F8F,
+ 0x98CC, 0x4F98, 0x98CD, 0x4F7B, 0x98CE, 0x4F69, 0x98CF, 0x4F70,
+ 0x98D0, 0x4F91, 0x98D1, 0x4F6F, 0x98D2, 0x4F86, 0x98D3, 0x4F96,
+ 0x98D4, 0x5118, 0x98D5, 0x4FD4, 0x98D6, 0x4FDF, 0x98D7, 0x4FCE,
+ 0x98D8, 0x4FD8, 0x98D9, 0x4FDB, 0x98DA, 0x4FD1, 0x98DB, 0x4FDA,
+ 0x98DC, 0x4FD0, 0x98DD, 0x4FE4, 0x98DE, 0x4FE5, 0x98DF, 0x501A,
+ 0x98E0, 0x5028, 0x98E1, 0x5014, 0x98E2, 0x502A, 0x98E3, 0x5025,
+ 0x98E4, 0x5005, 0x98E5, 0x4F1C, 0x98E6, 0x4FF6, 0x98E7, 0x5021,
+ 0x98E8, 0x5029, 0x98E9, 0x502C, 0x98EA, 0x4FFE, 0x98EB, 0x4FEF,
+ 0x98EC, 0x5011, 0x98ED, 0x5006, 0x98EE, 0x5043, 0x98EF, 0x5047,
+ 0x98F0, 0x6703, 0x98F1, 0x5055, 0x98F2, 0x5050, 0x98F3, 0x5048,
+ 0x98F4, 0x505A, 0x98F5, 0x5056, 0x98F6, 0x506C, 0x98F7, 0x5078,
+ 0x98F8, 0x5080, 0x98F9, 0x509A, 0x98FA, 0x5085, 0x98FB, 0x50B4,
+ 0x98FC, 0x50B2, 0x9940, 0x50C9, 0x9941, 0x50CA, 0x9942, 0x50B3,
+ 0x9943, 0x50C2, 0x9944, 0x50D6, 0x9945, 0x50DE, 0x9946, 0x50E5,
+ 0x9947, 0x50ED, 0x9948, 0x50E3, 0x9949, 0x50EE, 0x994A, 0x50F9,
+ 0x994B, 0x50F5, 0x994C, 0x5109, 0x994D, 0x5101, 0x994E, 0x5102,
+ 0x994F, 0x5116, 0x9950, 0x5115, 0x9951, 0x5114, 0x9952, 0x511A,
+ 0x9953, 0x5121, 0x9954, 0x513A, 0x9955, 0x5137, 0x9956, 0x513C,
+ 0x9957, 0x513B, 0x9958, 0x513F, 0x9959, 0x5140, 0x995A, 0x5152,
+ 0x995B, 0x514C, 0x995C, 0x5154, 0x995D, 0x5162, 0x995E, 0x7AF8,
+ 0x995F, 0x5169, 0x9960, 0x516A, 0x9961, 0x516E, 0x9962, 0x5180,
+ 0x9963, 0x5182, 0x9964, 0x56D8, 0x9965, 0x518C, 0x9966, 0x5189,
+ 0x9967, 0x518F, 0x9968, 0x5191, 0x9969, 0x5193, 0x996A, 0x5195,
+ 0x996B, 0x5196, 0x996C, 0x51A4, 0x996D, 0x51A6, 0x996E, 0x51A2,
+ 0x996F, 0x51A9, 0x9970, 0x51AA, 0x9971, 0x51AB, 0x9972, 0x51B3,
+ 0x9973, 0x51B1, 0x9974, 0x51B2, 0x9975, 0x51B0, 0x9976, 0x51B5,
+ 0x9977, 0x51BD, 0x9978, 0x51C5, 0x9979, 0x51C9, 0x997A, 0x51DB,
+ 0x997B, 0x51E0, 0x997C, 0x8655, 0x997D, 0x51E9, 0x997E, 0x51ED,
+ 0x9980, 0x51F0, 0x9981, 0x51F5, 0x9982, 0x51FE, 0x9983, 0x5204,
+ 0x9984, 0x520B, 0x9985, 0x5214, 0x9986, 0x520E, 0x9987, 0x5227,
+ 0x9988, 0x522A, 0x9989, 0x522E, 0x998A, 0x5233, 0x998B, 0x5239,
+ 0x998C, 0x524F, 0x998D, 0x5244, 0x998E, 0x524B, 0x998F, 0x524C,
+ 0x9990, 0x525E, 0x9991, 0x5254, 0x9992, 0x526A, 0x9993, 0x5274,
+ 0x9994, 0x5269, 0x9995, 0x5273, 0x9996, 0x527F, 0x9997, 0x527D,
+ 0x9998, 0x528D, 0x9999, 0x5294, 0x999A, 0x5292, 0x999B, 0x5271,
+ 0x999C, 0x5288, 0x999D, 0x5291, 0x999E, 0x8FA8, 0x999F, 0x8FA7,
+ 0x99A0, 0x52AC, 0x99A1, 0x52AD, 0x99A2, 0x52BC, 0x99A3, 0x52B5,
+ 0x99A4, 0x52C1, 0x99A5, 0x52CD, 0x99A6, 0x52D7, 0x99A7, 0x52DE,
+ 0x99A8, 0x52E3, 0x99A9, 0x52E6, 0x99AA, 0x98ED, 0x99AB, 0x52E0,
+ 0x99AC, 0x52F3, 0x99AD, 0x52F5, 0x99AE, 0x52F8, 0x99AF, 0x52F9,
+ 0x99B0, 0x5306, 0x99B1, 0x5308, 0x99B2, 0x7538, 0x99B3, 0x530D,
+ 0x99B4, 0x5310, 0x99B5, 0x530F, 0x99B6, 0x5315, 0x99B7, 0x531A,
+ 0x99B8, 0x5323, 0x99B9, 0x532F, 0x99BA, 0x5331, 0x99BB, 0x5333,
+ 0x99BC, 0x5338, 0x99BD, 0x5340, 0x99BE, 0x5346, 0x99BF, 0x5345,
+ 0x99C0, 0x4E17, 0x99C1, 0x5349, 0x99C2, 0x534D, 0x99C3, 0x51D6,
+ 0x99C4, 0x535E, 0x99C5, 0x5369, 0x99C6, 0x536E, 0x99C7, 0x5918,
+ 0x99C8, 0x537B, 0x99C9, 0x5377, 0x99CA, 0x5382, 0x99CB, 0x5396,
+ 0x99CC, 0x53A0, 0x99CD, 0x53A6, 0x99CE, 0x53A5, 0x99CF, 0x53AE,
+ 0x99D0, 0x53B0, 0x99D1, 0x53B6, 0x99D2, 0x53C3, 0x99D3, 0x7C12,
+ 0x99D4, 0x96D9, 0x99D5, 0x53DF, 0x99D6, 0x66FC, 0x99D7, 0x71EE,
+ 0x99D8, 0x53EE, 0x99D9, 0x53E8, 0x99DA, 0x53ED, 0x99DB, 0x53FA,
+ 0x99DC, 0x5401, 0x99DD, 0x543D, 0x99DE, 0x5440, 0x99DF, 0x542C,
+ 0x99E0, 0x542D, 0x99E1, 0x543C, 0x99E2, 0x542E, 0x99E3, 0x5436,
+ 0x99E4, 0x5429, 0x99E5, 0x541D, 0x99E6, 0x544E, 0x99E7, 0x548F,
+ 0x99E8, 0x5475, 0x99E9, 0x548E, 0x99EA, 0x545F, 0x99EB, 0x5471,
+ 0x99EC, 0x5477, 0x99ED, 0x5470, 0x99EE, 0x5492, 0x99EF, 0x547B,
+ 0x99F0, 0x5480, 0x99F1, 0x5476, 0x99F2, 0x5484, 0x99F3, 0x5490,
+ 0x99F4, 0x5486, 0x99F5, 0x54C7, 0x99F6, 0x54A2, 0x99F7, 0x54B8,
+ 0x99F8, 0x54A5, 0x99F9, 0x54AC, 0x99FA, 0x54C4, 0x99FB, 0x54C8,
+ 0x99FC, 0x54A8, 0x9A40, 0x54AB, 0x9A41, 0x54C2, 0x9A42, 0x54A4,
+ 0x9A43, 0x54BE, 0x9A44, 0x54BC, 0x9A45, 0x54D8, 0x9A46, 0x54E5,
+ 0x9A47, 0x54E6, 0x9A48, 0x550F, 0x9A49, 0x5514, 0x9A4A, 0x54FD,
+ 0x9A4B, 0x54EE, 0x9A4C, 0x54ED, 0x9A4D, 0x54FA, 0x9A4E, 0x54E2,
+ 0x9A4F, 0x5539, 0x9A50, 0x5540, 0x9A51, 0x5563, 0x9A52, 0x554C,
+ 0x9A53, 0x552E, 0x9A54, 0x555C, 0x9A55, 0x5545, 0x9A56, 0x5556,
+ 0x9A57, 0x5557, 0x9A58, 0x5538, 0x9A59, 0x5533, 0x9A5A, 0x555D,
+ 0x9A5B, 0x5599, 0x9A5C, 0x5580, 0x9A5D, 0x54AF, 0x9A5E, 0x558A,
+ 0x9A5F, 0x559F, 0x9A60, 0x557B, 0x9A61, 0x557E, 0x9A62, 0x5598,
+ 0x9A63, 0x559E, 0x9A64, 0x55AE, 0x9A65, 0x557C, 0x9A66, 0x5583,
+ 0x9A67, 0x55A9, 0x9A68, 0x5587, 0x9A69, 0x55A8, 0x9A6A, 0x55DA,
+ 0x9A6B, 0x55C5, 0x9A6C, 0x55DF, 0x9A6D, 0x55C4, 0x9A6E, 0x55DC,
+ 0x9A6F, 0x55E4, 0x9A70, 0x55D4, 0x9A71, 0x5614, 0x9A72, 0x55F7,
+ 0x9A73, 0x5616, 0x9A74, 0x55FE, 0x9A75, 0x55FD, 0x9A76, 0x561B,
+ 0x9A77, 0x55F9, 0x9A78, 0x564E, 0x9A79, 0x5650, 0x9A7A, 0x71DF,
+ 0x9A7B, 0x5634, 0x9A7C, 0x5636, 0x9A7D, 0x5632, 0x9A7E, 0x5638,
+ 0x9A80, 0x566B, 0x9A81, 0x5664, 0x9A82, 0x562F, 0x9A83, 0x566C,
+ 0x9A84, 0x566A, 0x9A85, 0x5686, 0x9A86, 0x5680, 0x9A87, 0x568A,
+ 0x9A88, 0x56A0, 0x9A89, 0x5694, 0x9A8A, 0x568F, 0x9A8B, 0x56A5,
+ 0x9A8C, 0x56AE, 0x9A8D, 0x56B6, 0x9A8E, 0x56B4, 0x9A8F, 0x56C2,
+ 0x9A90, 0x56BC, 0x9A91, 0x56C1, 0x9A92, 0x56C3, 0x9A93, 0x56C0,
+ 0x9A94, 0x56C8, 0x9A95, 0x56CE, 0x9A96, 0x56D1, 0x9A97, 0x56D3,
+ 0x9A98, 0x56D7, 0x9A99, 0x56EE, 0x9A9A, 0x56F9, 0x9A9B, 0x5700,
+ 0x9A9C, 0x56FF, 0x9A9D, 0x5704, 0x9A9E, 0x5709, 0x9A9F, 0x5708,
+ 0x9AA0, 0x570B, 0x9AA1, 0x570D, 0x9AA2, 0x5713, 0x9AA3, 0x5718,
+ 0x9AA4, 0x5716, 0x9AA5, 0x55C7, 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 0x9C73, 0x5FAD, 0x9C74, 0x5FBC, 0x9C75, 0x5FD6, 0x9C76, 0x5FFB,
+ 0x9C77, 0x5FE4, 0x9C78, 0x5FF8, 0x9C79, 0x5FF1, 0x9C7A, 0x5FDD,
+ 0x9C7B, 0x60B3, 0x9C7C, 0x5FFF, 0x9C7D, 0x6021, 0x9C7E, 0x6060,
+ 0x9C80, 0x6019, 0x9C81, 0x6010, 0x9C82, 0x6029, 0x9C83, 0x600E,
+ 0x9C84, 0x6031, 0x9C85, 0x601B, 0x9C86, 0x6015, 0x9C87, 0x602B,
+ 0x9C88, 0x6026, 0x9C89, 0x600F, 0x9C8A, 0x603A, 0x9C8B, 0x605A,
+ 0x9C8C, 0x6041, 0x9C8D, 0x606A, 0x9C8E, 0x6077, 0x9C8F, 0x605F,
+ 0x9C90, 0x604A, 0x9C91, 0x6046, 0x9C92, 0x604D, 0x9C93, 0x6063,
+ 0x9C94, 0x6043, 0x9C95, 0x6064, 0x9C96, 0x6042, 0x9C97, 0x606C,
+ 0x9C98, 0x606B, 0x9C99, 0x6059, 0x9C9A, 0x6081, 0x9C9B, 0x608D,
+ 0x9C9C, 0x60E7, 0x9C9D, 0x6083, 0x9C9E, 0x609A, 0x9C9F, 0x6084,
+ 0x9CA0, 0x609B, 0x9CA1, 0x6096, 0x9CA2, 0x6097, 0x9CA3, 0x6092,
+ 0x9CA4, 0x60A7, 0x9CA5, 0x608B, 0x9CA6, 0x60E1, 0x9CA7, 0x60B8,
+ 0x9CA8, 0x60E0, 0x9CA9, 0x60D3, 0x9CAA, 0x60B4, 0x9CAB, 0x5FF0,
+ 0x9CAC, 0x60BD, 0x9CAD, 0x60C6, 0x9CAE, 0x60B5, 0x9CAF, 0x60D8,
+ 0x9CB0, 0x614D, 0x9CB1, 0x6115, 0x9CB2, 0x6106, 0x9CB3, 0x60F6,
+ 0x9CB4, 0x60F7, 0x9CB5, 0x6100, 0x9CB6, 0x60F4, 0x9CB7, 0x60FA,
+ 0x9CB8, 0x6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0x621B, 0x9D40, 0x621E, 0x9D41, 0x6221, 0x9D42, 0x622A,
+ 0x9D43, 0x622E, 0x9D44, 0x6230, 0x9D45, 0x6232, 0x9D46, 0x6233,
+ 0x9D47, 0x6241, 0x9D48, 0x624E, 0x9D49, 0x625E, 0x9D4A, 0x6263,
+ 0x9D4B, 0x625B, 0x9D4C, 0x6260, 0x9D4D, 0x6268, 0x9D4E, 0x627C,
+ 0x9D4F, 0x6282, 0x9D50, 0x6289, 0x9D51, 0x627E, 0x9D52, 0x6292,
+ 0x9D53, 0x6293, 0x9D54, 0x6296, 0x9D55, 0x62D4, 0x9D56, 0x6283,
+ 0x9D57, 0x6294, 0x9D58, 0x62D7, 0x9D59, 0x62D1, 0x9D5A, 0x62BB,
+ 0x9D5B, 0x62CF, 0x9D5C, 0x62FF, 0x9D5D, 0x62C6, 0x9D5E, 0x64D4,
+ 0x9D5F, 0x62C8, 0x9D60, 0x62DC, 0x9D61, 0x62CC, 0x9D62, 0x62CA,
+ 0x9D63, 0x62C2, 0x9D64, 0x62C7, 0x9D65, 0x629B, 0x9D66, 0x62C9,
+ 0x9D67, 0x630C, 0x9D68, 0x62EE, 0x9D69, 0x62F1, 0x9D6A, 0x6327,
+ 0x9D6B, 0x6302, 0x9D6C, 0x6308, 0x9D6D, 0x62EF, 0x9D6E, 0x62F5,
+ 0x9D6F, 0x6350, 0x9D70, 0x633E, 0x9D71, 0x634D, 0x9D72, 0x641C,
+ 0x9D73, 0x634F, 0x9D74, 0x6396, 0x9D75, 0x638E, 0x9D76, 0x6380,
+ 0x9D77, 0x63AB, 0x9D78, 0x6376, 0x9D79, 0x63A3, 0x9D7A, 0x638F,
+ 0x9D7B, 0x6389, 0x9D7C, 0x639F, 0x9D7D, 0x63B5, 0x9D7E, 0x636B,
+ 0x9D80, 0x6369, 0x9D81, 0x63BE, 0x9D82, 0x63E9, 0x9D83, 0x63C0,
+ 0x9D84, 0x63C6, 0x9D85, 0x63E3, 0x9D86, 0x63C9, 0x9D87, 0x63D2,
+ 0x9D88, 0x63F6, 0x9D89, 0x63C4, 0x9D8A, 0x6416, 0x9D8B, 0x6434,
+ 0x9D8C, 0x6406, 0x9D8D, 0x6413, 0x9D8E, 0x6426, 0x9D8F, 0x6436,
+ 0x9D90, 0x651D, 0x9D91, 0x6417, 0x9D92, 0x6428, 0x9D93, 0x640F,
+ 0x9D94, 0x6467, 0x9D95, 0x646F, 0x9D96, 0x6476, 0x9D97, 0x644E,
+ 0x9D98, 0x652A, 0x9D99, 0x6495, 0x9D9A, 0x6493, 0x9D9B, 0x64A5,
+ 0x9D9C, 0x64A9, 0x9D9D, 0x6488, 0x9D9E, 0x64BC, 0x9D9F, 0x64DA,
+ 0x9DA0, 0x64D2, 0x9DA1, 0x64C5, 0x9DA2, 0x64C7, 0x9DA3, 0x64BB,
+ 0x9DA4, 0x64D8, 0x9DA5, 0x64C2, 0x9DA6, 0x64F1, 0x9DA7, 0x64E7,
+ 0x9DA8, 0x8209, 0x9DA9, 0x64E0, 0x9DAA, 0x64E1, 0x9DAB, 0x62AC,
+ 0x9DAC, 0x64E3, 0x9DAD, 0x64EF, 0x9DAE, 0x652C, 0x9DAF, 0x64F6,
+ 0x9DB0, 0x64F4, 0x9DB1, 0x64F2, 0x9DB2, 0x64FA, 0x9DB3, 0x6500,
+ 0x9DB4, 0x64FD, 0x9DB5, 0x6518, 0x9DB6, 0x651C, 0x9DB7, 0x6505,
+ 0x9DB8, 0x6524, 0x9DB9, 0x6523, 0x9DBA, 0x652B, 0x9DBB, 0x6534,
+ 0x9DBC, 0x6535, 0x9DBD, 0x6537, 0x9DBE, 0x6536, 0x9DBF, 0x6538,
+ 0x9DC0, 0x754B, 0x9DC1, 0x6548, 0x9DC2, 0x6556, 0x9DC3, 0x6555,
+ 0x9DC4, 0x654D, 0x9DC5, 0x6558, 0x9DC6, 0x655E, 0x9DC7, 0x655D,
+ 0x9DC8, 0x6572, 0x9DC9, 0x6578, 0x9DCA, 0x6582, 0x9DCB, 0x6583,
+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9E53, 0x6736, 0x9E54, 0x6741, 0x9E55, 0x6738, 0x9E56, 0x6737,
+ 0x9E57, 0x6746, 0x9E58, 0x675E, 0x9E59, 0x6760, 0x9E5A, 0x6759,
+ 0x9E5B, 0x6763, 0x9E5C, 0x6764, 0x9E5D, 0x6789, 0x9E5E, 0x6770,
+ 0x9E5F, 0x67A9, 0x9E60, 0x677C, 0x9E61, 0x676A, 0x9E62, 0x678C,
+ 0x9E63, 0x678B, 0x9E64, 0x67A6, 0x9E65, 0x67A1, 0x9E66, 0x6785,
+ 0x9E67, 0x67B7, 0x9E68, 0x67EF, 0x9E69, 0x67B4, 0x9E6A, 0x67EC,
+ 0x9E6B, 0x67B3, 0x9E6C, 0x67E9, 0x9E6D, 0x67B8, 0x9E6E, 0x67E4,
+ 0x9E6F, 0x67DE, 0x9E70, 0x67DD, 0x9E71, 0x67E2, 0x9E72, 0x67EE,
+ 0x9E73, 0x67B9, 0x9E74, 0x67CE, 0x9E75, 0x67C6, 0x9E76, 0x67E7,
+ 0x9E77, 0x6A9C, 0x9E78, 0x681E, 0x9E79, 0x6846, 0x9E7A, 0x6829,
+ 0x9E7B, 0x6840, 0x9E7C, 0x684D, 0x9E7D, 0x6832, 0x9E7E, 0x684E,
+ 0x9E80, 0x68B3, 0x9E81, 0x682B, 0x9E82, 0x6859, 0x9E83, 0x6863,
+ 0x9E84, 0x6877, 0x9E85, 0x687F, 0x9E86, 0x689F, 0x9E87, 0x688F,
+ 0x9E88, 0x68AD, 0x9E89, 0x6894, 0x9E8A, 0x689D, 0x9E8B, 0x689B,
+ 0x9E8C, 0x6883, 0x9E8D, 0x6AAE, 0x9E8E, 0x68B9, 0x9E8F, 0x6874,
+ 0x9E90, 0x68B5, 0x9E91, 0x68A0, 0x9E92, 0x68BA, 0x9E93, 0x690F,
+ 0x9E94, 0x688D, 0x9E95, 0x687E, 0x9E96, 0x6901, 0x9E97, 0x68CA,
+ 0x9E98, 0x6908, 0x9E99, 0x68D8, 0x9E9A, 0x6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0x700F, 0xE068, 0x6FFE, 0xE069, 0x701B, 0xE06A, 0x701A,
+ 0xE06B, 0x6F74, 0xE06C, 0x701D, 0xE06D, 0x7018, 0xE06E, 0x701F,
+ 0xE06F, 0x7030, 0xE070, 0x703E, 0xE071, 0x7032, 0xE072, 0x7051,
+ 0xE073, 0x7063, 0xE074, 0x7099, 0xE075, 0x7092, 0xE076, 0x70AF,
+ 0xE077, 0x70F1, 0xE078, 0x70AC, 0xE079, 0x70B8, 0xE07A, 0x70B3,
+ 0xE07B, 0x70AE, 0xE07C, 0x70DF, 0xE07D, 0x70CB, 0xE07E, 0x70DD,
+ 0xE080, 0x70D9, 0xE081, 0x7109, 0xE082, 0x70FD, 0xE083, 0x711C,
+ 0xE084, 0x7119, 0xE085, 0x7165, 0xE086, 0x7155, 0xE087, 0x7188,
+ 0xE088, 0x7166, 0xE089, 0x7162, 0xE08A, 0x714C, 0xE08B, 0x7156,
+ 0xE08C, 0x716C, 0xE08D, 0x718F, 0xE08E, 0x71FB, 0xE08F, 0x7184,
+ 0xE090, 0x7195, 0xE091, 0x71A8, 0xE092, 0x71AC, 0xE093, 0x71D7,
+ 0xE094, 0x71B9, 0xE095, 0x71BE, 0xE096, 0x71D2, 0xE097, 0x71C9,
+ 0xE098, 0x71D4, 0xE099, 0x71CE, 0xE09A, 0x71E0, 0xE09B, 0x71EC,
+ 0xE09C, 0x71E7, 0xE09D, 0x71F5, 0xE09E, 0x71FC, 0xE09F, 0x71F9,
+ 0xE0A0, 0x71FF, 0xE0A1, 0x720D, 0xE0A2, 0x7210, 0xE0A3, 0x721B,
+ 0xE0A4, 0x7228, 0xE0A5, 0x722D, 0xE0A6, 0x722C, 0xE0A7, 0x7230,
+ 0xE0A8, 0x7232, 0xE0A9, 0x723B, 0xE0AA, 0x723C, 0xE0AB, 0x723F,
+ 0xE0AC, 0x7240, 0xE0AD, 0x7246, 0xE0AE, 0x724B, 0xE0AF, 0x7258,
+ 0xE0B0, 0x7274, 0xE0B1, 0x727E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 0x747E, 0xE0F6, 0x748B, 0xE0F7, 0x749E,
+ 0xE0F8, 0x74A7, 0xE0F9, 0x74CA, 0xE0FA, 0x74CF, 0xE0FB, 0x74D4,
+ 0xE0FC, 0x73F1, 0xE140, 0x74E0, 0xE141, 0x74E3, 0xE142, 0x74E7,
+ 0xE143, 0x74E9, 0xE144, 0x74EE, 0xE145, 0x74F2, 0xE146, 0x74F0,
+ 0xE147, 0x74F1, 0xE148, 0x74F8, 0xE149, 0x74F7, 0xE14A, 0x7504,
+ 0xE14B, 0x7503, 0xE14C, 0x7505, 0xE14D, 0x750C, 0xE14E, 0x750E,
+ 0xE14F, 0x750D, 0xE150, 0x7515, 0xE151, 0x7513, 0xE152, 0x751E,
+ 0xE153, 0x7526, 0xE154, 0x752C, 0xE155, 0x753C, 0xE156, 0x7544,
+ 0xE157, 0x754D, 0xE158, 0x754A, 0xE159, 0x7549, 0xE15A, 0x755B,
+ 0xE15B, 0x7546, 0xE15C, 0x755A, 0xE15D, 0x7569, 0xE15E, 0x7564,
+ 0xE15F, 0x7567, 0xE160, 0x756B, 0xE161, 0x756D, 0xE162, 0x7578,
+ 0xE163, 0x7576, 0xE164, 0x7586, 0xE165, 0x7587, 0xE166, 0x7574,
+ 0xE167, 0x758A, 0xE168, 0x7589, 0xE169, 0x7582, 0xE16A, 0x7594,
+ 0xE16B, 0x759A, 0xE16C, 0x759D, 0xE16D, 0x75A5, 0xE16E, 0x75A3,
+ 0xE16F, 0x75C2, 0xE170, 0x75B3, 0xE171, 0x75C3, 0xE172, 0x75B5,
+ 0xE173, 0x75BD, 0xE174, 0x75B8, 0xE175, 0x75BC, 0xE176, 0x75B1,
+ 0xE177, 0x75CD, 0xE178, 0x75CA, 0xE179, 0x75D2, 0xE17A, 0x75D9,
+ 0xE17B, 0x75E3, 0xE17C, 0x75DE, 0xE17D, 0x75FE, 0xE17E, 0x75FF,
+ 0xE180, 0x75FC, 0xE181, 0x7601, 0xE182, 0x75F0, 0xE183, 0x75FA,
+ 0xE184, 0x75F2, 0xE185, 0x75F3, 0xE186, 0x760B, 0xE187, 0x760D,
+ 0xE188, 0x7609, 0xE189, 0x761F, 0xE18A, 0x7627, 0xE18B, 0x7620,
+ 0xE18C, 0x7621, 0xE18D, 0x7622, 0xE18E, 0x7624, 0xE18F, 0x7634,
+ 0xE190, 0x7630, 0xE191, 0x763B, 0xE192, 0x7647, 0xE193, 0x7648,
+ 0xE194, 0x7646, 0xE195, 0x765C, 0xE196, 0x7658, 0xE197, 0x7661,
+ 0xE198, 0x7662, 0xE199, 0x7668, 0xE19A, 0x7669, 0xE19B, 0x766A,
+ 0xE19C, 0x7667, 0xE19D, 0x766C, 0xE19E, 0x7670, 0xE19F, 0x7672,
+ 0xE1A0, 0x7676, 0xE1A1, 0x7678, 0xE1A2, 0x767C, 0xE1A3, 0x7680,
+ 0xE1A4, 0x7683, 0xE1A5, 0x7688, 0xE1A6, 0x768B, 0xE1A7, 0x768E,
+ 0xE1A8, 0x7696, 0xE1A9, 0x7693, 0xE1AA, 0x7699, 0xE1AB, 0x769A,
+ 0xE1AC, 0x76B0, 0xE1AD, 0x76B4, 0xE1AE, 0x76B8, 0xE1AF, 0x76B9,
+ 0xE1B0, 0x76BA, 0xE1B1, 0x76C2, 0xE1B2, 0x76CD, 0xE1B3, 0x76D6,
+ 0xE1B4, 0x76D2, 0xE1B5, 0x76DE, 0xE1B6, 0x76E1, 0xE1B7, 0x76E5,
+ 0xE1B8, 0x76E7, 0xE1B9, 0x76EA, 0xE1BA, 0x862F, 0xE1BB, 0x76FB,
+ 0xE1BC, 0x7708, 0xE1BD, 0x7707, 0xE1BE, 0x7704, 0xE1BF, 0x7729,
+ 0xE1C0, 0x7724, 0xE1C1, 0x771E, 0xE1C2, 0x7725, 0xE1C3, 0x7726,
+ 0xE1C4, 0x771B, 0xE1C5, 0x7737, 0xE1C6, 0x7738, 0xE1C7, 0x7747,
+ 0xE1C8, 0x775A, 0xE1C9, 0x7768, 0xE1CA, 0x776B, 0xE1CB, 0x775B,
+ 0xE1CC, 0x7765, 0xE1CD, 0x777F, 0xE1CE, 0x777E, 0xE1CF, 0x7779,
+ 0xE1D0, 0x778E, 0xE1D1, 0x778B, 0xE1D2, 0x7791, 0xE1D3, 0x77A0,
+ 0xE1D4, 0x779E, 0xE1D5, 0x77B0, 0xE1D6, 0x77B6, 0xE1D7, 0x77B9,
+ 0xE1D8, 0x77BF, 0xE1D9, 0x77BC, 0xE1DA, 0x77BD, 0xE1DB, 0x77BB,
+ 0xE1DC, 0x77C7, 0xE1DD, 0x77CD, 0xE1DE, 0x77D7, 0xE1DF, 0x77DA,
+ 0xE1E0, 0x77DC, 0xE1E1, 0x77E3, 0xE1E2, 0x77EE, 0xE1E3, 0x77FC,
+ 0xE1E4, 0x780C, 0xE1E5, 0x7812, 0xE1E6, 0x7926, 0xE1E7, 0x7820,
+ 0xE1E8, 0x792A, 0xE1E9, 0x7845, 0xE1EA, 0x788E, 0xE1EB, 0x7874,
+ 0xE1EC, 0x7886, 0xE1ED, 0x787C, 0xE1EE, 0x789A, 0xE1EF, 0x788C,
+ 0xE1F0, 0x78A3, 0xE1F1, 0x78B5, 0xE1F2, 0x78AA, 0xE1F3, 0x78AF,
+ 0xE1F4, 0x78D1, 0xE1F5, 0x78C6, 0xE1F6, 0x78CB, 0xE1F7, 0x78D4,
+ 0xE1F8, 0x78BE, 0xE1F9, 0x78BC, 0xE1FA, 0x78C5, 0xE1FB, 0x78CA,
+ 0xE1FC, 0x78EC, 0xE240, 0x78E7, 0xE241, 0x78DA, 0xE242, 0x78FD,
+ 0xE243, 0x78F4, 0xE244, 0x7907, 0xE245, 0x7912, 0xE246, 0x7911,
+ 0xE247, 0x7919, 0xE248, 0x792C, 0xE249, 0x792B, 0xE24A, 0x7940,
+ 0xE24B, 0x7960, 0xE24C, 0x7957, 0xE24D, 0x795F, 0xE24E, 0x795A,
+ 0xE24F, 0x7955, 0xE250, 0x7953, 0xE251, 0x797A, 0xE252, 0x797F,
+ 0xE253, 0x798A, 0xE254, 0x799D, 0xE255, 0x79A7, 0xE256, 0x9F4B,
+ 0xE257, 0x79AA, 0xE258, 0x79AE, 0xE259, 0x79B3, 0xE25A, 0x79B9,
+ 0xE25B, 0x79BA, 0xE25C, 0x79C9, 0xE25D, 0x79D5, 0xE25E, 0x79E7,
+ 0xE25F, 0x79EC, 0xE260, 0x79E1, 0xE261, 0x79E3, 0xE262, 0x7A08,
+ 0xE263, 0x7A0D, 0xE264, 0x7A18, 0xE265, 0x7A19, 0xE266, 0x7A20,
+ 0xE267, 0x7A1F, 0xE268, 0x7980, 0xE269, 0x7A31, 0xE26A, 0x7A3B,
+ 0xE26B, 0x7A3E, 0xE26C, 0x7A37, 0xE26D, 0x7A43, 0xE26E, 0x7A57,
+ 0xE26F, 0x7A49, 0xE270, 0x7A61, 0xE271, 0x7A62, 0xE272, 0x7A69,
+ 0xE273, 0x9F9D, 0xE274, 0x7A70, 0xE275, 0x7A79, 0xE276, 0x7A7D,
+ 0xE277, 0x7A88, 0xE278, 0x7A97, 0xE279, 0x7A95, 0xE27A, 0x7A98,
+ 0xE27B, 0x7A96, 0xE27C, 0x7AA9, 0xE27D, 0x7AC8, 0xE27E, 0x7AB0,
+ 0xE280, 0x7AB6, 0xE281, 0x7AC5, 0xE282, 0x7AC4, 0xE283, 0x7ABF,
+ 0xE284, 0x9083, 0xE285, 0x7AC7, 0xE286, 0x7ACA, 0xE287, 0x7ACD,
+ 0xE288, 0x7ACF, 0xE289, 0x7AD5, 0xE28A, 0x7AD3, 0xE28B, 0x7AD9,
+ 0xE28C, 0x7ADA, 0xE28D, 0x7ADD, 0xE28E, 0x7AE1, 0xE28F, 0x7AE2,
+ 0xE290, 0x7AE6, 0xE291, 0x7AED, 0xE292, 0x7AF0, 0xE293, 0x7B02,
+ 0xE294, 0x7B0F, 0xE295, 0x7B0A, 0xE296, 0x7B06, 0xE297, 0x7B33,
+ 0xE298, 0x7B18, 0xE299, 0x7B19, 0xE29A, 0x7B1E, 0xE29B, 0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 0xE35F, 0x7DAB, 0xE360, 0x7E3D, 0xE361, 0x7DA2, 0xE362, 0x7DAF,
+ 0xE363, 0x7DDC, 0xE364, 0x7DB8, 0xE365, 0x7D9F, 0xE366, 0x7DB0,
+ 0xE367, 0x7DD8, 0xE368, 0x7DDD, 0xE369, 0x7DE4, 0xE36A, 0x7DDE,
+ 0xE36B, 0x7DFB, 0xE36C, 0x7DF2, 0xE36D, 0x7DE1, 0xE36E, 0x7E05,
+ 0xE36F, 0x7E0A, 0xE370, 0x7E23, 0xE371, 0x7E21, 0xE372, 0x7E12,
+ 0xE373, 0x7E31, 0xE374, 0x7E1F, 0xE375, 0x7E09, 0xE376, 0x7E0B,
+ 0xE377, 0x7E22, 0xE378, 0x7E46, 0xE379, 0x7E66, 0xE37A, 0x7E3B,
+ 0xE37B, 0x7E35, 0xE37C, 0x7E39, 0xE37D, 0x7E43, 0xE37E, 0x7E37,
+ 0xE380, 0x7E32, 0xE381, 0x7E3A, 0xE382, 0x7E67, 0xE383, 0x7E5D,
+ 0xE384, 0x7E56, 0xE385, 0x7E5E, 0xE386, 0x7E59, 0xE387, 0x7E5A,
+ 0xE388, 0x7E79, 0xE389, 0x7E6A, 0xE38A, 0x7E69, 0xE38B, 0x7E7C,
+ 0xE38C, 0x7E7B, 0xE38D, 0x7E83, 0xE38E, 0x7DD5, 0xE38F, 0x7E7D,
+ 0xE390, 0x8FAE, 0xE391, 0x7E7F, 0xE392, 0x7E88, 0xE393, 0x7E89,
+ 0xE394, 0x7E8C, 0xE395, 0x7E92, 0xE396, 0x7E90, 0xE397, 0x7E93,
+ 0xE398, 0x7E94, 0xE399, 0x7E96, 0xE39A, 0x7E8E, 0xE39B, 0x7E9B,
+ 0xE39C, 0x7E9C, 0xE39D, 0x7F38, 0xE39E, 0x7F3A, 0xE39F, 0x7F45,
+ 0xE3A0, 0x7F4C, 0xE3A1, 0x7F4D, 0xE3A2, 0x7F4E, 0xE3A3, 0x7F50,
+ 0xE3A4, 0x7F51, 0xE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x8086, 0xE3E7, 0x8085,
+ 0xE3E8, 0x809B, 0xE3E9, 0x8093, 0xE3EA, 0x809A, 0xE3EB, 0x80AD,
+ 0xE3EC, 0x5190, 0xE3ED, 0x80AC, 0xE3EE, 0x80DB, 0xE3EF, 0x80E5,
+ 0xE3F0, 0x80D9, 0xE3F1, 0x80DD, 0xE3F2, 0x80C4, 0xE3F3, 0x80DA,
+ 0xE3F4, 0x80D6, 0xE3F5, 0x8109, 0xE3F6, 0x80EF, 0xE3F7, 0x80F1,
+ 0xE3F8, 0x811B, 0xE3F9, 0x8129, 0xE3FA, 0x8123, 0xE3FB, 0x812F,
+ 0xE3FC, 0x814B, 0xE440, 0x968B, 0xE441, 0x8146, 0xE442, 0x813E,
+ 0xE443, 0x8153, 0xE444, 0x8151, 0xE445, 0x80FC, 0xE446, 0x8171,
+ 0xE447, 0x816E, 0xE448, 0x8165, 0xE449, 0x8166, 0xE44A, 0x8174,
+ 0xE44B, 0x8183, 0xE44C, 0x8188, 0xE44D, 0x818A, 0xE44E, 0x8180,
+ 0xE44F, 0x8182, 0xE450, 0x81A0, 0xE451, 0x8195, 0xE452, 0x81A4,
+ 0xE453, 0x81A3, 0xE454, 0x815F, 0xE455, 0x8193, 0xE456, 0x81A9,
+ 0xE457, 0x81B0, 0xE458, 0x81B5, 0xE459, 0x81BE, 0xE45A, 0x81B8,
+ 0xE45B, 0x81BD, 0xE45C, 0x81C0, 0xE45D, 0x81C2, 0xE45E, 0x81BA,
+ 0xE45F, 0x81C9, 0xE460, 0x81CD, 0xE461, 0x81D1, 0xE462, 0x81D9,
+ 0xE463, 0x81D8, 0xE464, 0x81C8, 0xE465, 0x81DA, 0xE466, 0x81DF,
+ 0xE467, 0x81E0, 0xE468, 0x81E7, 0xE469, 0x81FA, 0xE46A, 0x81FB,
+ 0xE46B, 0x81FE, 0xE46C, 0x8201, 0xE46D, 0x8202, 0xE46E, 0x8205,
+ 0xE46F, 0x8207, 0xE470, 0x820A, 0xE471, 0x820D, 0xE472, 0x8210,
+ 0xE473, 0x8216, 0xE474, 0x8229, 0xE475, 0x822B, 0xE476, 0x8238,
+ 0xE477, 0x8233, 0xE478, 0x8240, 0xE479, 0x8259, 0xE47A, 0x8258,
+ 0xE47B, 0x825D, 0xE47C, 0x825A, 0xE47D, 0x825F, 0xE47E, 0x8264,
+ 0xE480, 0x8262, 0xE481, 0x8268, 0xE482, 0x826A, 0xE483, 0x826B,
+ 0xE484, 0x822E, 0xE485, 0x8271, 0xE486, 0x8277, 0xE487, 0x8278,
+ 0xE488, 0x827E, 0xE489, 0x828D, 0xE48A, 0x8292, 0xE48B, 0x82AB,
+ 0xE48C, 0x829F, 0xE48D, 0x82BB, 0xE48E, 0x82AC, 0xE48F, 0x82E1,
+ 0xE490, 0x82E3, 0xE491, 0x82DF, 0xE492, 0x82D2, 0xE493, 0x82F4,
+ 0xE494, 0x82F3, 0xE495, 0x82FA, 0xE496, 0x8393, 0xE497, 0x8303,
+ 0xE498, 0x82FB, 0xE499, 0x82F9, 0xE49A, 0x82DE, 0xE49B, 0x8306,
+ 0xE49C, 0x82DC, 0xE49D, 0x8309, 0xE49E, 0x82D9, 0xE49F, 0x8335,
+ 0xE4A0, 0x8334, 0xE4A1, 0x8316, 0xE4A2, 0x8332, 0xE4A3, 0x8331,
+ 0xE4A4, 0x8340, 0xE4A5, 0x8339, 0xE4A6, 0x8350, 0xE4A7, 0x8345,
+ 0xE4A8, 0x832F, 0xE4A9, 0x832B, 0xE4AA, 0x8317, 0xE4AB, 0x8318,
+ 0xE4AC, 0x8385, 0xE4AD, 0x839A, 0xE4AE, 0x83AA, 0xE4AF, 0x839F,
+ 0xE4B0, 0x83A2, 0xE4B1, 0x8396, 0xE4B2, 0x8323, 0xE4B3, 0x838E,
+ 0xE4B4, 0x8387, 0xE4B5, 0x838A, 0xE4B6, 0x837C, 0xE4B7, 0x83B5,
+ 0xE4B8, 0x8373, 0xE4B9, 0x8375, 0xE4BA, 0x83A0, 0xE4BB, 0x8389,
+ 0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0xE543, 0x8555, 0xE544, 0x8580, 0xE545, 0x85A4, 0xE546, 0x8588,
+ 0xE547, 0x8591, 0xE548, 0x858A, 0xE549, 0x85A8, 0xE54A, 0x856D,
+ 0xE54B, 0x8594, 0xE54C, 0x859B, 0xE54D, 0x85EA, 0xE54E, 0x8587,
+ 0xE54F, 0x859C, 0xE550, 0x8577, 0xE551, 0x857E, 0xE552, 0x8590,
+ 0xE553, 0x85C9, 0xE554, 0x85BA, 0xE555, 0x85CF, 0xE556, 0x85B9,
+ 0xE557, 0x85D0, 0xE558, 0x85D5, 0xE559, 0x85DD, 0xE55A, 0x85E5,
+ 0xE55B, 0x85DC, 0xE55C, 0x85F9, 0xE55D, 0x860A, 0xE55E, 0x8613,
+ 0xE55F, 0x860B, 0xE560, 0x85FE, 0xE561, 0x85FA, 0xE562, 0x8606,
+ 0xE563, 0x8622, 0xE564, 0x861A, 0xE565, 0x8630, 0xE566, 0x863F,
+ 0xE567, 0x864D, 0xE568, 0x4E55, 0xE569, 0x8654, 0xE56A, 0x865F,
+ 0xE56B, 0x8667, 0xE56C, 0x8671, 0xE56D, 0x8693, 0xE56E, 0x86A3,
+ 0xE56F, 0x86A9, 0xE570, 0x86AA, 0xE571, 0x868B, 0xE572, 0x868C,
+ 0xE573, 0x86B6, 0xE574, 0x86AF, 0xE575, 0x86C4, 0xE576, 0x86C6,
+ 0xE577, 0x86B0, 0xE578, 0x86C9, 0xE579, 0x8823, 0xE57A, 0x86AB,
+ 0xE57B, 0x86D4, 0xE57C, 0x86DE, 0xE57D, 0x86E9, 0xE57E, 0x86EC,
+ 0xE580, 0x86DF, 0xE581, 0x86DB, 0xE582, 0x86EF, 0xE583, 0x8712,
+ 0xE584, 0x8706, 0xE585, 0x8708, 0xE586, 0x8700, 0xE587, 0x8703,
+ 0xE588, 0x86FB, 0xE589, 0x8711, 0xE58A, 0x8709, 0xE58B, 0x870D,
+ 0xE58C, 0x86F9, 0xE58D, 0x870A, 0xE58E, 0x8734, 0xE58F, 0x873F,
+ 0xE590, 0x8737, 0xE591, 0x873B, 0xE592, 0x8725, 0xE593, 0x8729,
+ 0xE594, 0x871A, 0xE595, 0x8760, 0xE596, 0x875F, 0xE597, 0x8778,
+ 0xE598, 0x874C, 0xE599, 0x874E, 0xE59A, 0x8774, 0xE59B, 0x8757,
+ 0xE59C, 0x8768, 0xE59D, 0x876E, 0xE59E, 0x8759, 0xE59F, 0x8753,
+ 0xE5A0, 0x8763, 0xE5A1, 0x876A, 0xE5A2, 0x8805, 0xE5A3, 0x87A2,
+ 0xE5A4, 0x879F, 0xE5A5, 0x8782, 0xE5A6, 0x87AF, 0xE5A7, 0x87CB,
+ 0xE5A8, 0x87BD, 0xE5A9, 0x87C0, 0xE5AA, 0x87D0, 0xE5AB, 0x96D6,
+ 0xE5AC, 0x87AB, 0xE5AD, 0x87C4, 0xE5AE, 0x87B3, 0xE5AF, 0x87C7,
+ 0xE5B0, 0x87C6, 0xE5B1, 0x87BB, 0xE5B2, 0x87EF, 0xE5B3, 0x87F2,
+ 0xE5B4, 0x87E0, 0xE5B5, 0x880F, 0xE5B6, 0x880D, 0xE5B7, 0x87FE,
+ 0xE5B8, 0x87F6, 0xE5B9, 0x87F7, 0xE5BA, 0x880E, 0xE5BB, 0x87D2,
+ 0xE5BC, 0x8811, 0xE5BD, 0x8816, 0xE5BE, 0x8815, 0xE5BF, 0x8822,
+ 0xE5C0, 0x8821, 0xE5C1, 0x8831, 0xE5C2, 0x8836, 0xE5C3, 0x8839,
+ 0xE5C4, 0x8827, 0xE5C5, 0x883B, 0xE5C6, 0x8844, 0xE5C7, 0x8842,
+ 0xE5C8, 0x8852, 0xE5C9, 0x8859, 0xE5CA, 0x885E, 0xE5CB, 0x8862,
+ 0xE5CC, 0x886B, 0xE5CD, 0x8881, 0xE5CE, 0x887E, 0xE5CF, 0x889E,
+ 0xE5D0, 0x8875, 0xE5D1, 0x887D, 0xE5D2, 0x88B5, 0xE5D3, 0x8872,
+ 0xE5D4, 0x8882, 0xE5D5, 0x8897, 0xE5D6, 0x8892, 0xE5D7, 0x88AE,
+ 0xE5D8, 0x8899, 0xE5D9, 0x88A2, 0xE5DA, 0x888D, 0xE5DB, 0x88A4,
+ 0xE5DC, 0x88B0, 0xE5DD, 0x88BF, 0xE5DE, 0x88B1, 0xE5DF, 0x88C3,
+ 0xE5E0, 0x88C4, 0xE5E1, 0x88D4, 0xE5E2, 0x88D8, 0xE5E3, 0x88D9,
+ 0xE5E4, 0x88DD, 0xE5E5, 0x88F9, 0xE5E6, 0x8902, 0xE5E7, 0x88FC,
+ 0xE5E8, 0x88F4, 0xE5E9, 0x88E8, 0xE5EA, 0x88F2, 0xE5EB, 0x8904,
+ 0xE5EC, 0x890C, 0xE5ED, 0x890A, 0xE5EE, 0x8913, 0xE5EF, 0x8943,
+ 0xE5F0, 0x891E, 0xE5F1, 0x8925, 0xE5F2, 0x892A, 0xE5F3, 0x892B,
+ 0xE5F4, 0x8941, 0xE5F5, 0x8944, 0xE5F6, 0x893B, 0xE5F7, 0x8936,
+ 0xE5F8, 0x8938, 0xE5F9, 0x894C, 0xE5FA, 0x891D, 0xE5FB, 0x8960,
+ 0xE5FC, 0x895E, 0xE640, 0x8966, 0xE641, 0x8964, 0xE642, 0x896D,
+ 0xE643, 0x896A, 0xE644, 0x896F, 0xE645, 0x8974, 0xE646, 0x8977,
+ 0xE647, 0x897E, 0xE648, 0x8983, 0xE649, 0x8988, 0xE64A, 0x898A,
+ 0xE64B, 0x8993, 0xE64C, 0x8998, 0xE64D, 0x89A1, 0xE64E, 0x89A9,
+ 0xE64F, 0x89A6, 0xE650, 0x89AC, 0xE651, 0x89AF, 0xE652, 0x89B2,
+ 0xE653, 0x89BA, 0xE654, 0x89BD, 0xE655, 0x89BF, 0xE656, 0x89C0,
+ 0xE657, 0x89DA, 0xE658, 0x89DC, 0xE659, 0x89DD, 0xE65A, 0x89E7,
+ 0xE65B, 0x89F4, 0xE65C, 0x89F8, 0xE65D, 0x8A03, 0xE65E, 0x8A16,
+ 0xE65F, 0x8A10, 0xE660, 0x8A0C, 0xE661, 0x8A1B, 0xE662, 0x8A1D,
+ 0xE663, 0x8A25, 0xE664, 0x8A36, 0xE665, 0x8A41, 0xE666, 0x8A5B,
+ 0xE667, 0x8A52, 0xE668, 0x8A46, 0xE669, 0x8A48, 0xE66A, 0x8A7C,
+ 0xE66B, 0x8A6D, 0xE66C, 0x8A6C, 0xE66D, 0x8A62, 0xE66E, 0x8A85,
+ 0xE66F, 0x8A82, 0xE670, 0x8A84, 0xE671, 0x8AA8, 0xE672, 0x8AA1,
+ 0xE673, 0x8A91, 0xE674, 0x8AA5, 0xE675, 0x8AA6, 0xE676, 0x8A9A,
+ 0xE677, 0x8AA3, 0xE678, 0x8AC4, 0xE679, 0x8ACD, 0xE67A, 0x8AC2,
+ 0xE67B, 0x8ADA, 0xE67C, 0x8AEB, 0xE67D, 0x8AF3, 0xE67E, 0x8AE7,
+ 0xE680, 0x8AE4, 0xE681, 0x8AF1, 0xE682, 0x8B14, 0xE683, 0x8AE0,
+ 0xE684, 0x8AE2, 0xE685, 0x8AF7, 0xE686, 0x8ADE, 0xE687, 0x8ADB,
+ 0xE688, 0x8B0C, 0xE689, 0x8B07, 0xE68A, 0x8B1A, 0xE68B, 0x8AE1,
+ 0xE68C, 0x8B16, 0xE68D, 0x8B10, 0xE68E, 0x8B17, 0xE68F, 0x8B20,
+ 0xE690, 0x8B33, 0xE691, 0x97AB, 0xE692, 0x8B26, 0xE693, 0x8B2B,
+ 0xE694, 0x8B3E, 0xE695, 0x8B28, 0xE696, 0x8B41, 0xE697, 0x8B4C,
+ 0xE698, 0x8B4F, 0xE699, 0x8B4E, 0xE69A, 0x8B49, 0xE69B, 0x8B56,
+ 0xE69C, 0x8B5B, 0xE69D, 0x8B5A, 0xE69E, 0x8B6B, 0xE69F, 0x8B5F,
+ 0xE6A0, 0x8B6C, 0xE6A1, 0x8B6F, 0xE6A2, 0x8B74, 0xE6A3, 0x8B7D,
+ 0xE6A4, 0x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8F05, 0xE76A, 0x8F15,
+ 0xE76B, 0x8F12, 0xE76C, 0x8F19, 0xE76D, 0x8F13, 0xE76E, 0x8F1C,
+ 0xE76F, 0x8F1F, 0xE770, 0x8F1B, 0xE771, 0x8F0C, 0xE772, 0x8F26,
+ 0xE773, 0x8F33, 0xE774, 0x8F3B, 0xE775, 0x8F39, 0xE776, 0x8F45,
+ 0xE777, 0x8F42, 0xE778, 0x8F3E, 0xE779, 0x8F4C, 0xE77A, 0x8F49,
+ 0xE77B, 0x8F46, 0xE77C, 0x8F4E, 0xE77D, 0x8F57, 0xE77E, 0x8F5C,
+ 0xE780, 0x8F62, 0xE781, 0x8F63, 0xE782, 0x8F64, 0xE783, 0x8F9C,
+ 0xE784, 0x8F9F, 0xE785, 0x8FA3, 0xE786, 0x8FAD, 0xE787, 0x8FAF,
+ 0xE788, 0x8FB7, 0xE789, 0x8FDA, 0xE78A, 0x8FE5, 0xE78B, 0x8FE2,
+ 0xE78C, 0x8FEA, 0xE78D, 0x8FEF, 0xE78E, 0x9087, 0xE78F, 0x8FF4,
+ 0xE790, 0x9005, 0xE791, 0x8FF9, 0xE792, 0x8FFA, 0xE793, 0x9011,
+ 0xE794, 0x9015, 0xE795, 0x9021, 0xE796, 0x900D, 0xE797, 0x901E,
+ 0xE798, 0x9016, 0xE799, 0x900B, 0xE79A, 0x9027, 0xE79B, 0x9036,
+ 0xE79C, 0x9035, 0xE79D, 0x9039, 0xE79E, 0x8FF8, 0xE79F, 0x904F,
+ 0xE7A0, 0x9050, 0xE7A1, 0x9051, 0xE7A2, 0x9052, 0xE7A3, 0x900E,
+ 0xE7A4, 0x9049, 0xE7A5, 0x903E, 0xE7A6, 0x9056, 0xE7A7, 0x9058,
+ 0xE7A8, 0x905E, 0xE7A9, 0x9068, 0xE7AA, 0x906F, 0xE7AB, 0x9076,
+ 0xE7AC, 0x96A8, 0xE7AD, 0x9072, 0xE7AE, 0x9082, 0xE7AF, 0x907D,
+ 0xE7B0, 0x9081, 0xE7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, 0xE7F5, 0x92CF, 0xE7F6, 0x92B9, 0xE7F7, 0x92B7,
+ 0xE7F8, 0x92E9, 0xE7F9, 0x930F, 0xE7FA, 0x92FA, 0xE7FB, 0x9344,
+ 0xE7FC, 0x932E, 0xE840, 0x9319, 0xE841, 0x9322, 0xE842, 0x931A,
+ 0xE843, 0x9323, 0xE844, 0x933A, 0xE845, 0x9335, 0xE846, 0x933B,
+ 0xE847, 0x935C, 0xE848, 0x9360, 0xE849, 0x937C, 0xE84A, 0x936E,
+ 0xE84B, 0x9356, 0xE84C, 0x93B0, 0xE84D, 0x93AC, 0xE84E, 0x93AD,
+ 0xE84F, 0x9394, 0xE850, 0x93B9, 0xE851, 0x93D6, 0xE852, 0x93D7,
+ 0xE853, 0x93E8, 0xE854, 0x93E5, 0xE855, 0x93D8, 0xE856, 0x93C3,
+ 0xE857, 0x93DD, 0xE858, 0x93D0, 0xE859, 0x93C8, 0xE85A, 0x93E4,
+ 0xE85B, 0x941A, 0xE85C, 0x9414, 0xE85D, 0x9413, 0xE85E, 0x9403,
+ 0xE85F, 0x9407, 0xE860, 0x9410, 0xE861, 0x9436, 0xE862, 0x942B,
+ 0xE863, 0x9435, 0xE864, 0x9421, 0xE865, 0x943A, 0xE866, 0x9441,
+ 0xE867, 0x9452, 0xE868, 0x9444, 0xE869, 0x945B, 0xE86A, 0x9460,
+ 0xE86B, 0x9462, 0xE86C, 0x945E, 0xE86D, 0x946A, 0xE86E, 0x9229,
+ 0xE86F, 0x9470, 0xE870, 0x9475, 0xE871, 0x9477, 0xE872, 0x947D,
+ 0xE873, 0x945A, 0xE874, 0x947C, 0xE875, 0x947E, 0xE876, 0x9481,
+ 0xE877, 0x947F, 0xE878, 0x9582, 0xE879, 0x9587, 0xE87A, 0x958A,
+ 0xE87B, 0x9594, 0xE87C, 0x9596, 0xE87D, 0x9598, 0xE87E, 0x9599,
+ 0xE880, 0x95A0, 0xE881, 0x95A8, 0xE882, 0x95A7, 0xE883, 0x95AD,
+ 0xE884, 0x95BC, 0xE885, 0x95BB, 0xE886, 0x95B9, 0xE887, 0x95BE,
+ 0xE888, 0x95CA, 0xE889, 0x6FF6, 0xE88A, 0x95C3, 0xE88B, 0x95CD,
+ 0xE88C, 0x95CC, 0xE88D, 0x95D5, 0xE88E, 0x95D4, 0xE88F, 0x95D6,
+ 0xE890, 0x95DC, 0xE891, 0x95E1, 0xE892, 0x95E5, 0xE893, 0x95E2,
+ 0xE894, 0x9621, 0xE895, 0x9628, 0xE896, 0x962E, 0xE897, 0x962F,
+ 0xE898, 0x9642, 0xE899, 0x964C, 0xE89A, 0x964F, 0xE89B, 0x964B,
+ 0xE89C, 0x9677, 0xE89D, 0x965C, 0xE89E, 0x965E, 0xE89F, 0x965D,
+ 0xE8A0, 0x965F, 0xE8A1, 0x9666, 0xE8A2, 0x9672, 0xE8A3, 0x966C,
+ 0xE8A4, 0x968D, 0xE8A5, 0x9698, 0xE8A6, 0x9695, 0xE8A7, 0x9697,
+ 0xE8A8, 0x96AA, 0xE8A9, 0x96A7, 0xE8AA, 0x96B1, 0xE8AB, 0x96B2,
+ 0xE8AC, 0x96B0, 0xE8AD, 0x96B4, 0xE8AE, 0x96B6, 0xE8AF, 0x96B8,
+ 0xE8B0, 0x96B9, 0xE8B1, 0x96CE, 0xE8B2, 0x96CB, 0xE8B3, 0x96C9,
+ 0xE8B4, 0x96CD, 0xE8B5, 0x894D, 0xE8B6, 0x96DC, 0xE8B7, 0x970D,
+ 0xE8B8, 0x96D5, 0xE8B9, 0x96F9, 0xE8BA, 0x9704, 0xE8BB, 0x9706,
+ 0xE8BC, 0x9708, 0xE8BD, 0x9713, 0xE8BE, 0x970E, 0xE8BF, 0x9711,
+ 0xE8C0, 0x970F, 0xE8C1, 0x9716, 0xE8C2, 0x9719, 0xE8C3, 0x9724,
+ 0xE8C4, 0x972A, 0xE8C5, 0x9730, 0xE8C6, 0x9739, 0xE8C7, 0x973D,
+ 0xE8C8, 0x973E, 0xE8C9, 0x9744, 0xE8CA, 0x9746, 0xE8CB, 0x9748,
+ 0xE8CC, 0x9742, 0xE8CD, 0x9749, 0xE8CE, 0x975C, 0xE8CF, 0x9760,
+ 0xE8D0, 0x9764, 0xE8D1, 0x9766, 0xE8D2, 0x9768, 0xE8D3, 0x52D2,
+ 0xE8D4, 0x976B, 0xE8D5, 0x9771, 0xE8D6, 0x9779, 0xE8D7, 0x9785,
+ 0xE8D8, 0x977C, 0xE8D9, 0x9781, 0xE8DA, 0x977A, 0xE8DB, 0x9786,
+ 0xE8DC, 0x978B, 0xE8DD, 0x978F, 0xE8DE, 0x9790, 0xE8DF, 0x979C,
+ 0xE8E0, 0x97A8, 0xE8E1, 0x97A6, 0xE8E2, 0x97A3, 0xE8E3, 0x97B3,
+ 0xE8E4, 0x97B4, 0xE8E5, 0x97C3, 0xE8E6, 0x97C6, 0xE8E7, 0x97C8,
+ 0xE8E8, 0x97CB, 0xE8E9, 0x97DC, 0xE8EA, 0x97ED, 0xE8EB, 0x9F4F,
+ 0xE8EC, 0x97F2, 0xE8ED, 0x7ADF, 0xE8EE, 0x97F6, 0xE8EF, 0x97F5,
+ 0xE8F0, 0x980F, 0xE8F1, 0x980C, 0xE8F2, 0x9838, 0xE8F3, 0x9824,
+ 0xE8F4, 0x9821, 0xE8F5, 0x9837, 0xE8F6, 0x983D, 0xE8F7, 0x9846,
+ 0xE8F8, 0x984F, 0xE8F9, 0x984B, 0xE8FA, 0x986B, 0xE8FB, 0x986F,
+ 0xE8FC, 0x9870, 0xE940, 0x9871, 0xE941, 0x9874, 0xE942, 0x9873,
+ 0xE943, 0x98AA, 0xE944, 0x98AF, 0xE945, 0x98B1, 0xE946, 0x98B6,
+ 0xE947, 0x98C4, 0xE948, 0x98C3, 0xE949, 0x98C6, 0xE94A, 0x98E9,
+ 0xE94B, 0x98EB, 0xE94C, 0x9903, 0xE94D, 0x9909, 0xE94E, 0x9912,
+ 0xE94F, 0x9914, 0xE950, 0x9918, 0xE951, 0x9921, 0xE952, 0x991D,
+ 0xE953, 0x991E, 0xE954, 0x9924, 0xE955, 0x9920, 0xE956, 0x992C,
+ 0xE957, 0x992E, 0xE958, 0x993D, 0xE959, 0x993E, 0xE95A, 0x9942,
+ 0xE95B, 0x9949, 0xE95C, 0x9945, 0xE95D, 0x9950, 0xE95E, 0x994B,
+ 0xE95F, 0x9951, 0xE960, 0x9952, 0xE961, 0x994C, 0xE962, 0x9955,
+ 0xE963, 0x9997, 0xE964, 0x9998, 0xE965, 0x99A5, 0xE966, 0x99AD,
+ 0xE967, 0x99AE, 0xE968, 0x99BC, 0xE969, 0x99DF, 0xE96A, 0x99DB,
+ 0xE96B, 0x99DD, 0xE96C, 0x99D8, 0xE96D, 0x99D1, 0xE96E, 0x99ED,
+ 0xE96F, 0x99EE, 0xE970, 0x99F1, 0xE971, 0x99F2, 0xE972, 0x99FB,
+ 0xE973, 0x99F8, 0xE974, 0x9A01, 0xE975, 0x9A0F, 0xE976, 0x9A05,
+ 0xE977, 0x99E2, 0xE978, 0x9A19, 0xE979, 0x9A2B, 0xE97A, 0x9A37,
+ 0xE97B, 0x9A45, 0xE97C, 0x9A42, 0xE97D, 0x9A40, 0xE97E, 0x9A43,
+ 0xE980, 0x9A3E, 0xE981, 0x9A55, 0xE982, 0x9A4D, 0xE983, 0x9A5B,
+ 0xE984, 0x9A57, 0xE985, 0x9A5F, 0xE986, 0x9A62, 0xE987, 0x9A65,
+ 0xE988, 0x9A64, 0xE989, 0x9A69, 0xE98A, 0x9A6B, 0xE98B, 0x9A6A,
+ 0xE98C, 0x9AAD, 0xE98D, 0x9AB0, 0xE98E, 0x9ABC, 0xE98F, 0x9AC0,
+ 0xE990, 0x9ACF, 0xE991, 0x9AD1, 0xE992, 0x9AD3, 0xE993, 0x9AD4,
+ 0xE994, 0x9ADE, 0xE995, 0x9ADF, 0xE996, 0x9AE2, 0xE997, 0x9AE3,
+ 0xE998, 0x9AE6, 0xE999, 0x9AEF, 0xE99A, 0x9AEB, 0xE99B, 0x9AEE,
+ 0xE99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x69C7, 0xEAA1, 0x9059, 0xEAA2, 0x7464, 0xEAA3, 0x51DC,
+ 0xEAA4, 0x7199, 0xFA40, 0x2170, 0xFA41, 0x2171, 0xFA42, 0x2172,
+ 0xFA43, 0x2173, 0xFA44, 0x2174, 0xFA45, 0x2175, 0xFA46, 0x2176,
+ 0xFA47, 0x2177, 0xFA48, 0x2178, 0xFA49, 0x2179, 0xFA55, 0xFFE4,
+ 0xFA56, 0xFF07, 0xFA57, 0xFF02, 0xFA5C, 0x7E8A, 0xFA5D, 0x891C,
+ 0xFA5E, 0x9348, 0xFA5F, 0x9288, 0xFA60, 0x84DC, 0xFA61, 0x4FC9,
+ 0xFA62, 0x70BB, 0xFA63, 0x6631, 0xFA64, 0x68C8, 0xFA65, 0x92F9,
+ 0xFA66, 0x66FB, 0xFA67, 0x5F45, 0xFA68, 0x4E28, 0xFA69, 0x4EE1,
+ 0xFA6A, 0x4EFC, 0xFA6B, 0x4F00, 0xFA6C, 0x4F03, 0xFA6D, 0x4F39,
+ 0xFA6E, 0x4F56, 0xFA6F, 0x4F92, 0xFA70, 0x4F8A, 0xFA71, 0x4F9A,
+ 0xFA72, 0x4F94, 0xFA73, 0x4FCD, 0xFA74, 0x5040, 0xFA75, 0x5022,
+ 0xFA76, 0x4FFF, 0xFA77, 0x501E, 0xFA78, 0x5046, 0xFA79, 0x5070,
+ 0xFA7A, 0x5042, 0xFA7B, 0x5094, 0xFA7C, 0x50F4, 0xFA7D, 0x50D8,
+ 0xFA7E, 0x514A, 0xFA80, 0x5164, 0xFA81, 0x519D, 0xFA82, 0x51BE,
+ 0xFA83, 0x51EC, 0xFA84, 0x5215, 0xFA85, 0x529C, 0xFA86, 0x52A6,
+ 0xFA87, 0x52C0, 0xFA88, 0x52DB, 0xFA89, 0x5300, 0xFA8A, 0x5307,
+ 0xFA8B, 0x5324, 0xFA8C, 0x5372, 0xFA8D, 0x5393, 0xFA8E, 0x53B2,
+ 0xFA8F, 0x53DD, 0xFA90, 0xFA0E, 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B5A, 0x71FE, 0xFB5B, 0x72B1, 0xFB5C, 0x72BE, 0xFB5D, 0x7324,
+ 0xFB5E, 0xFA16, 0xFB5F, 0x7377, 0xFB60, 0x73BD, 0xFB61, 0x73C9,
+ 0xFB62, 0x73D6, 0xFB63, 0x73E3, 0xFB64, 0x73D2, 0xFB65, 0x7407,
+ 0xFB66, 0x73F5, 0xFB67, 0x7426, 0xFB68, 0x742A, 0xFB69, 0x7429,
+ 0xFB6A, 0x742E, 0xFB6B, 0x7462, 0xFB6C, 0x7489, 0xFB6D, 0x749F,
+ 0xFB6E, 0x7501, 0xFB6F, 0x756F, 0xFB70, 0x7682, 0xFB71, 0x769C,
+ 0xFB72, 0x769E, 0xFB73, 0x769B, 0xFB74, 0x76A6, 0xFB75, 0xFA17,
+ 0xFB76, 0x7746, 0xFB77, 0x52AF, 0xFB78, 0x7821, 0xFB79, 0x784E,
+ 0xFB7A, 0x7864, 0xFB7B, 0x787A, 0xFB7C, 0x7930, 0xFB7D, 0xFA18,
+ 0xFB7E, 0xFA19, 0xFB80, 0xFA1A, 0xFB81, 0x7994, 0xFB82, 0xFA1B,
+ 0xFB83, 0x799B, 0xFB84, 0x7AD1, 0xFB85, 0x7AE7, 0xFB86, 0xFA1C,
+ 0xFB87, 0x7AEB, 0xFB88, 0x7B9E, 0xFB89, 0xFA1D, 0xFB8A, 0x7D48,
+ 0xFB8B, 0x7D5C, 0xFB8C, 0x7DB7, 0xFB8D, 0x7DA0, 0xFB8E, 0x7DD6,
+ 0xFB8F, 0x7E52, 0xFB90, 0x7F47, 0xFB91, 0x7FA1, 0xFB92, 0xFA1E,
+ 0xFB93, 0x8301, 0xFB94, 0x8362, 0xFB95, 0x837F, 0xFB96, 0x83C7,
+ 0xFB97, 0x83F6, 0xFB98, 0x8448, 0xFB99, 0x84B4, 0xFB9A, 0x8553,
+ 0xFB9B, 0x8559, 0xFB9C, 0x856B, 0xFB9D, 0xFA1F, 0xFB9E, 0x85B0,
+ 0xFB9F, 0xFA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 0xFBE2, 0x93C6,
+ 0xFBE3, 0x93DE, 0xFBE4, 0x93F8, 0xFBE5, 0x9431, 0xFBE6, 0x9445,
+ 0xFBE7, 0x9448, 0xFBE8, 0x9592, 0xFBE9, 0xF9DC, 0xFBEA, 0xFA29,
+ 0xFBEB, 0x969D, 0xFBEC, 0x96AF, 0xFBED, 0x9733, 0xFBEE, 0x973B,
+ 0xFBEF, 0x9743, 0xFBF0, 0x974D, 0xFBF1, 0x974F, 0xFBF2, 0x9751,
+ 0xFBF3, 0x9755, 0xFBF4, 0x9857, 0xFBF5, 0x9865, 0xFBF6, 0xFA2A,
+ 0xFBF7, 0xFA2B, 0xFBF8, 0x9927, 0xFBF9, 0xFA2C, 0xFBFA, 0x999E,
+ 0xFBFB, 0x9A4E, 0xFBFC, 0x9AD9, 0xFC40, 0x9ADC, 0xFC41, 0x9B75,
+ 0xFC42, 0x9B72, 0xFC43, 0x9B8F, 0xFC44, 0x9BB1, 0xFC45, 0x9BBB,
+ 0xFC46, 0x9C00, 0xFC47, 0x9D70, 0xFC48, 0x9D6B, 0xFC49, 0xFA2D,
+ 0xFC4A, 0x9E19, 0xFC4B, 0x9ED1, 0, 0
+};
+#endif
+
+
+
+WCHAR ff_convert ( /* Converted code, 0 means conversion error */
+ WCHAR src, /* Character code to be converted */
+ UINT dir /* 0: Unicode to OEMCP, 1: OEMCP to Unicode */
+)
+{
+ const WCHAR *p;
+ WCHAR c;
+ int i, n, li, hi;
+
+
+ if (src <= 0x80) { /* ASCII */
+ c = src;
+ } else {
+#if !_TINY_TABLE
+ if (dir) { /* OEMCP to unicode */
+ p = sjis2uni;
+ hi = sizeof(sjis2uni) / 4 - 1;
+ } else { /* Unicode to OEMCP */
+ p = uni2sjis;
+ hi = sizeof(uni2sjis) / 4 - 1;
+ }
+ li = 0;
+ for (n = 16; n; n--) {
+ i = li + (hi - li) / 2;
+ if (src == p[i * 2]) break;
+ if (src > p[i * 2])
+ li = i;
+ else
+ hi = i;
+ }
+ c = n ? p[i * 2 + 1] : 0;
+#else
+ if (dir) { /* OEMCP to unicode (Incremental search)*/
+ p = &uni2sjis[1];
+ do {
+ c = *p;
+ p += 2;
+ } while (c && c != src);
+ p -= 3;
+ c = *p;
+ } else { /* Unicode to OEMCP */
+ li = 0; hi = sizeof(uni2sjis) / 4 - 1;
+ for (n = 16; n; n--) {
+ i = li + (hi - li) / 2;
+ if (src == uni2sjis[i * 2]) break;
+ if (src > uni2sjis[i * 2])
+ li = i;
+ else
+ hi = i;
+ }
+ c = n ? uni2sjis[i * 2 + 1] : 0;
+ }
+#endif
+ }
+
+ return c;
+}
+
+
+
+WCHAR ff_wtoupper ( /* Upper converted character */
+ WCHAR chr /* Input character */
+)
+{
+ static const WCHAR tbl_lower[] = { 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0xA1, 0x00A2, 0x00A3, 0x00A5, 0x00AC, 0x00AF, 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0x0FF, 0x101, 0x103, 0x105, 0x107, 0x109, 0x10B, 0x10D, 0x10F, 0x111, 0x113, 0x115, 0x117, 0x119, 0x11B, 0x11D, 0x11F, 0x121, 0x123, 0x125, 0x127, 0x129, 0x12B, 0x12D, 0x12F, 0x131, 0x133, 0x135, 0x137, 0x13A, 0x13C, 0x13E, 0x140, 0x142, 0x144, 0x146, 0x148, 0x14B, 0x14D, 0x14F, 0x151, 0x153, 0x155, 0x157, 0x159, 0x15B, 0x15D, 0x15F, 0x161, 0x163, 0x165, 0x167, 0x169, 0x16B, 0x16D, 0x16F, 0x171, 0x173, 0x175, 0x177, 0x17A, 0x17C, 0x17E, 0x192, 0x3B1, 0x3B2, 0x3B3, 0x3B4, 0x3B5, 0x3B6, 0x3B7, 0x3B8, 0x3B9, 0x3BA, 0x3BB, 0x3BC, 0x3BD, 0x3BE, 0x3BF, 0x3C0, 0x3C1, 0x3C3, 0x3C4, 0x3C5, 0x3C6, 0x3C7, 0x3C8, 0x3C9, 0x3CA, 0x430, 0x431, 0x432, 0x433, 0x434, 0x435, 0x436, 0x437, 0x438, 0x439, 0x43A, 0x43B, 0x43C, 0x43D, 0x43E, 0x43F, 0x440, 0x441, 0x442, 0x443, 0x444, 0x445, 0x446, 0x447, 0x448, 0x449, 0x44A, 0x44B, 0x44C, 0x44D, 0x44E, 0x44F, 0x451, 0x452, 0x453, 0x454, 0x455, 0x456, 0x457, 0x458, 0x459, 0x45A, 0x45B, 0x45C, 0x45E, 0x45F, 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177, 0x2178, 0x2179, 0x217A, 0x217B, 0x217C, 0x217D, 0x217E, 0x217F, 0xFF41, 0xFF42, 0xFF43, 0xFF44, 0xFF45, 0xFF46, 0xFF47, 0xFF48, 0xFF49, 0xFF4A, 0xFF4B, 0xFF4C, 0xFF4D, 0xFF4E, 0xFF4F, 0xFF50, 0xFF51, 0xFF52, 0xFF53, 0xFF54, 0xFF55, 0xFF56, 0xFF57, 0xFF58, 0xFF59, 0xFF5A, 0 };
+ static const WCHAR tbl_upper[] = { 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x21, 0xFFE0, 0xFFE1, 0xFFE5, 0xFFE2, 0xFFE3, 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0x178, 0x100, 0x102, 0x104, 0x106, 0x108, 0x10A, 0x10C, 0x10E, 0x110, 0x112, 0x114, 0x116, 0x118, 0x11A, 0x11C, 0x11E, 0x120, 0x122, 0x124, 0x126, 0x128, 0x12A, 0x12C, 0x12E, 0x130, 0x132, 0x134, 0x136, 0x139, 0x13B, 0x13D, 0x13F, 0x141, 0x143, 0x145, 0x147, 0x14A, 0x14C, 0x14E, 0x150, 0x152, 0x154, 0x156, 0x158, 0x15A, 0x15C, 0x15E, 0x160, 0x162, 0x164, 0x166, 0x168, 0x16A, 0x16C, 0x16E, 0x170, 0x172, 0x174, 0x176, 0x179, 0x17B, 0x17D, 0x191, 0x391, 0x392, 0x393, 0x394, 0x395, 0x396, 0x397, 0x398, 0x399, 0x39A, 0x39B, 0x39C, 0x39D, 0x39E, 0x39F, 0x3A0, 0x3A1, 0x3A3, 0x3A4, 0x3A5, 0x3A6, 0x3A7, 0x3A8, 0x3A9, 0x3AA, 0x410, 0x411, 0x412, 0x413, 0x414, 0x415, 0x416, 0x417, 0x418, 0x419, 0x41A, 0x41B, 0x41C, 0x41D, 0x41E, 0x41F, 0x420, 0x421, 0x422, 0x423, 0x424, 0x425, 0x426, 0x427, 0x428, 0x429, 0x42A, 0x42B, 0x42C, 0x42D, 0x42E, 0x42F, 0x401, 0x402, 0x403, 0x404, 0x405, 0x406, 0x407, 0x408, 0x409, 0x40A, 0x40B, 0x40C, 0x40E, 0x40F, 0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166, 0x2167, 0x2168, 0x2169, 0x216A, 0x216B, 0x216C, 0x216D, 0x216E, 0x216F, 0xFF21, 0xFF22, 0xFF23, 0xFF24, 0xFF25, 0xFF26, 0xFF27, 0xFF28, 0xFF29, 0xFF2A, 0xFF2B, 0xFF2C, 0xFF2D, 0xFF2E, 0xFF2F, 0xFF30, 0xFF31, 0xFF32, 0xFF33, 0xFF34, 0xFF35, 0xFF36, 0xFF37, 0xFF38, 0xFF39, 0xFF3A, 0 };
+ int i;
+
+
+ for (i = 0; tbl_lower[i] && chr != tbl_lower[i]; i++) ;
+
+ return tbl_lower[i] ? tbl_upper[i] : chr;
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/option/cc936.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/option/cc936.c
new file mode 100644
index 0000000..6e58e89
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/option/cc936.c
@@ -0,0 +1,10973 @@
+/*------------------------------------------------------------------------*/
+/* Unicode - OEM code bidirectional converter (C)ChaN, 2009 */
+/* */
+/* CP936 (Simplified Chinese GBK) */
+/*------------------------------------------------------------------------*/
+
+#include "../ff.h"
+
+
+#if !_USE_LFN || _CODE_PAGE != 936
+#error This file is not needed in current configuration. Remove from the project.
+#endif
+
+static
+const WCHAR uni2oem[] = {
+/* Unicode - OEM, Unicode - OEM, Unicode - OEM, Unicode - OEM */
+ 0x00A4, 0xA1E8, 0x00A7, 0xA1EC, 0x00A8, 0xA1A7, 0x00B0, 0xA1E3,
+ 0x00B1, 0xA1C0, 0x00B7, 0xA1A4, 0x00D7, 0xA1C1, 0x00E0, 0xA8A4,
+ 0x00E1, 0xA8A2, 0x00E8, 0xA8A8, 0x00E9, 0xA8A6, 0x00EA, 0xA8BA,
+ 0x00EC, 0xA8AC, 0x00ED, 0xA8AA, 0x00F2, 0xA8B0, 0x00F3, 0xA8AE,
+ 0x00F7, 0xA1C2, 0x00F9, 0xA8B4, 0x00FA, 0xA8B2, 0x00FC, 0xA8B9,
+ 0x0101, 0xA8A1, 0x0113, 0xA8A5, 0x011B, 0xA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 0xA6D7, 0x03C9, 0xA6D8, 0x0401, 0xA7A7,
+ 0x0410, 0xA7A1, 0x0411, 0xA7A2, 0x0412, 0xA7A3, 0x0413, 0xA7A4,
+ 0x0414, 0xA7A5, 0x0415, 0xA7A6, 0x0416, 0xA7A8, 0x0417, 0xA7A9,
+ 0x0418, 0xA7AA, 0x0419, 0xA7AB, 0x041A, 0xA7AC, 0x041B, 0xA7AD,
+ 0x041C, 0xA7AE, 0x041D, 0xA7AF, 0x041E, 0xA7B0, 0x041F, 0xA7B1,
+ 0x0420, 0xA7B2, 0x0421, 0xA7B3, 0x0422, 0xA7B4, 0x0423, 0xA7B5,
+ 0x0424, 0xA7B6, 0x0425, 0xA7B7, 0x0426, 0xA7B8, 0x0427, 0xA7B9,
+ 0x0428, 0xA7BA, 0x0429, 0xA7BB, 0x042A, 0xA7BC, 0x042B, 0xA7BD,
+ 0x042C, 0xA7BE, 0x042D, 0xA7BF, 0x042E, 0xA7C0, 0x042F, 0xA7C1,
+ 0x0430, 0xA7D1, 0x0431, 0xA7D2, 0x0432, 0xA7D3, 0x0433, 0xA7D4,
+ 0x0434, 0xA7D5, 0x0435, 0xA7D6, 0x0436, 0xA7D8, 0x0437, 0xA7D9,
+ 0x0438, 0xA7DA, 0x0439, 0xA7DB, 0x043A, 0xA7DC, 0x043B, 0xA7DD,
+ 0x043C, 0xA7DE, 0x043D, 0xA7DF, 0x043E, 0xA7E0, 0x043F, 0xA7E1,
+ 0x0440, 0xA7E2, 0x0441, 0xA7E3, 0x0442, 0xA7E4, 0x0443, 0xA7E5,
+ 0x0444, 0xA7E6, 0x0445, 0xA7E7, 0x0446, 0xA7E8, 0x0447, 0xA7E9,
+ 0x0448, 0xA7EA, 0x0449, 0xA7EB, 0x044A, 0xA7EC, 0x044B, 0xA7ED,
+ 0x044C, 0xA7EE, 0x044D, 0xA7EF, 0x044E, 0xA7F0, 0x044F, 0xA7F1,
+ 0x0451, 0xA7D7, 0x2010, 0xA95C, 0x2013, 0xA843, 0x2014, 0xA1AA,
+ 0x2015, 0xA844, 0x2016, 0xA1AC, 0x2018, 0xA1AE, 0x2019, 0xA1AF,
+ 0x201C, 0xA1B0, 0x201D, 0xA1B1, 0x2025, 0xA845, 0x2026, 0xA1AD,
+ 0x2030, 0xA1EB, 0x2032, 0xA1E4, 0x2033, 0xA1E5, 0x2035, 0xA846,
+ 0x203B, 0xA1F9, 0x20AC, 0x0080, 0x2103, 0xA1E6, 0x2105, 0xA847,
+ 0x2109, 0xA848, 0x2116, 0xA1ED, 0x2121, 0xA959, 0x2160, 0xA2F1,
+ 0x2161, 0xA2F2, 0x2162, 0xA2F3, 0x2163, 0xA2F4, 0x2164, 0xA2F5,
+ 0x2165, 0xA2F6, 0x2166, 0xA2F7, 0x2167, 0xA2F8, 0x2168, 0xA2F9,
+ 0x2169, 0xA2FA, 0x216A, 0xA2FB, 0x216B, 0xA2FC, 0x2170, 0xA2A1,
+ 0x2171, 0xA2A2, 0x2172, 0xA2A3, 0x2173, 0xA2A4, 0x2174, 0xA2A5,
+ 0x2175, 0xA2A6, 0x2176, 0xA2A7, 0x2177, 0xA2A8, 0x2178, 0xA2A9,
+ 0x2179, 0xA2AA, 0x2190, 0xA1FB, 0x2191, 0xA1FC, 0x2192, 0xA1FA,
+ 0x2193, 0xA1FD, 0x2196, 0xA849, 0x2197, 0xA84A, 0x2198, 0xA84B,
+ 0x2199, 0xA84C, 0x2208, 0xA1CA, 0x220F, 0xA1C7, 0x2211, 0xA1C6,
+ 0x2215, 0xA84D, 0x221A, 0xA1CC, 0x221D, 0xA1D8, 0x221E, 0xA1DE,
+ 0x221F, 0xA84E, 0x2220, 0xA1CF, 0x2223, 0xA84F, 0x2225, 0xA1CE,
+ 0x2227, 0xA1C4, 0x2228, 0xA1C5, 0x2229, 0xA1C9, 0x222A, 0xA1C8,
+ 0x222B, 0xA1D2, 0x222E, 0xA1D3, 0x2234, 0xA1E0, 0x2235, 0xA1DF,
+ 0x2236, 0xA1C3, 0x2237, 0xA1CB, 0x223D, 0xA1D7, 0x2248, 0xA1D6,
+ 0x224C, 0xA1D5, 0x2252, 0xA850, 0x2260, 0xA1D9, 0x2261, 0xA1D4,
+ 0x2264, 0xA1DC, 0x2265, 0xA1DD, 0x2266, 0xA851, 0x2267, 0xA852,
+ 0x226E, 0xA1DA, 0x226F, 0xA1DB, 0x2295, 0xA892, 0x2299, 0xA1D1,
+ 0x22A5, 0xA1CD, 0x22BF, 0xA853, 0x2312, 0xA1D0, 0x2460, 0xA2D9,
+ 0x2461, 0xA2DA, 0x2462, 0xA2DB, 0x2463, 0xA2DC, 0x2464, 0xA2DD,
+ 0x2465, 0xA2DE, 0x2466, 0xA2DF, 0x2467, 0xA2E0, 0x2468, 0xA2E1,
+ 0x2469, 0xA2E2, 0x2474, 0xA2C5, 0x2475, 0xA2C6, 0x2476, 0xA2C7,
+ 0x2477, 0xA2C8, 0x2478, 0xA2C9, 0x2479, 0xA2CA, 0x247A, 0xA2CB,
+ 0x247B, 0xA2CC, 0x247C, 0xA2CD, 0x247D, 0xA2CE, 0x247E, 0xA2CF,
+ 0x247F, 0xA2D0, 0x2480, 0xA2D1, 0x2481, 0xA2D2, 0x2482, 0xA2D3,
+ 0x2483, 0xA2D4, 0x2484, 0xA2D5, 0x2485, 0xA2D6, 0x2486, 0xA2D7,
+ 0x2487, 0xA2D8, 0x2488, 0xA2B1, 0x2489, 0xA2B2, 0x248A, 0xA2B3,
+ 0x248B, 0xA2B4, 0x248C, 0xA2B5, 0x248D, 0xA2B6, 0x248E, 0xA2B7,
+ 0x248F, 0xA2B8, 0x2490, 0xA2B9, 0x2491, 0xA2BA, 0x2492, 0xA2BB,
+ 0x2493, 0xA2BC, 0x2494, 0xA2BD, 0x2495, 0xA2BE, 0x2496, 0xA2BF,
+ 0x2497, 0xA2C0, 0x2498, 0xA2C1, 0x2499, 0xA2C2, 0x249A, 0xA2C3,
+ 0x249B, 0xA2C4, 0x2500, 0xA9A4, 0x2501, 0xA9A5, 0x2502, 0xA9A6,
+ 0x2503, 0xA9A7, 0x2504, 0xA9A8, 0x2505, 0xA9A9, 0x2506, 0xA9AA,
+ 0x2507, 0xA9AB, 0x2508, 0xA9AC, 0x2509, 0xA9AD, 0x250A, 0xA9AE,
+ 0x250B, 0xA9AF, 0x250C, 0xA9B0, 0x250D, 0xA9B1, 0x250E, 0xA9B2,
+ 0x250F, 0xA9B3, 0x2510, 0xA9B4, 0x2511, 0xA9B5, 0x2512, 0xA9B6,
+ 0x2513, 0xA9B7, 0x2514, 0xA9B8, 0x2515, 0xA9B9, 0x2516, 0xA9BA,
+ 0x2517, 0xA9BB, 0x2518, 0xA9BC, 0x2519, 0xA9BD, 0x251A, 0xA9BE,
+ 0x251B, 0xA9BF, 0x251C, 0xA9C0, 0x251D, 0xA9C1, 0x251E, 0xA9C2,
+ 0x251F, 0xA9C3, 0x2520, 0xA9C4, 0x2521, 0xA9C5, 0x2522, 0xA9C6,
+ 0x2523, 0xA9C7, 0x2524, 0xA9C8, 0x2525, 0xA9C9, 0x2526, 0xA9CA,
+ 0x2527, 0xA9CB, 0x2528, 0xA9CC, 0x2529, 0xA9CD, 0x252A, 0xA9CE,
+ 0x252B, 0xA9CF, 0x252C, 0xA9D0, 0x252D, 0xA9D1, 0x252E, 0xA9D2,
+ 0x252F, 0xA9D3, 0x2530, 0xA9D4, 0x2531, 0xA9D5, 0x2532, 0xA9D6,
+ 0x2533, 0xA9D7, 0x2534, 0xA9D8, 0x2535, 0xA9D9, 0x2536, 0xA9DA,
+ 0x2537, 0xA9DB, 0x2538, 0xA9DC, 0x2539, 0xA9DD, 0x253A, 0xA9DE,
+ 0x253B, 0xA9DF, 0x253C, 0xA9E0, 0x253D, 0xA9E1, 0x253E, 0xA9E2,
+ 0x253F, 0xA9E3, 0x2540, 0xA9E4, 0x2541, 0xA9E5, 0x2542, 0xA9E6,
+ 0x2543, 0xA9E7, 0x2544, 0xA9E8, 0x2545, 0xA9E9, 0x2546, 0xA9EA,
+ 0x2547, 0xA9EB, 0x2548, 0xA9EC, 0x2549, 0xA9ED, 0x254A, 0xA9EE,
+ 0x254B, 0xA9EF, 0x2550, 0xA854, 0x2551, 0xA855, 0x2552, 0xA856,
+ 0x2553, 0xA857, 0x2554, 0xA858, 0x2555, 0xA859, 0x2556, 0xA85A,
+ 0x2557, 0xA85B, 0x2558, 0xA85C, 0x2559, 0xA85D, 0x255A, 0xA85E,
+ 0x255B, 0xA85F, 0x255C, 0xA860, 0x255D, 0xA861, 0x255E, 0xA862,
+ 0x255F, 0xA863, 0x2560, 0xA864, 0x2561, 0xA865, 0x2562, 0xA866,
+ 0x2563, 0xA867, 0x2564, 0xA868, 0x2565, 0xA869, 0x2566, 0xA86A,
+ 0x2567, 0xA86B, 0x2568, 0xA86C, 0x2569, 0xA86D, 0x256A, 0xA86E,
+ 0x256B, 0xA86F, 0x256C, 0xA870, 0x256D, 0xA871, 0x256E, 0xA872,
+ 0x256F, 0xA873, 0x2570, 0xA874, 0x2571, 0xA875, 0x2572, 0xA876,
+ 0x2573, 0xA877, 0x2581, 0xA878, 0x2582, 0xA879, 0x2583, 0xA87A,
+ 0x2584, 0xA87B, 0x2585, 0xA87C, 0x2586, 0xA87D, 0x2587, 0xA87E,
+ 0x2588, 0xA880, 0x2589, 0xA881, 0x258A, 0xA882, 0x258B, 0xA883,
+ 0x258C, 0xA884, 0x258D, 0xA885, 0x258E, 0xA886, 0x258F, 0xA887,
+ 0x2593, 0xA888, 0x2594, 0xA889, 0x2595, 0xA88A, 0x25A0, 0xA1F6,
+ 0x25A1, 0xA1F5, 0x25B2, 0xA1F8, 0x25B3, 0xA1F7, 0x25BC, 0xA88B,
+ 0x25BD, 0xA88C, 0x25C6, 0xA1F4, 0x25C7, 0xA1F3, 0x25CB, 0xA1F0,
+ 0x25CE, 0xA1F2, 0x25CF, 0xA1F1, 0x25E2, 0xA88D, 0x25E3, 0xA88E,
+ 0x25E4, 0xA88F, 0x25E5, 0xA890, 0x2605, 0xA1EF, 0x2606, 0xA1EE,
+ 0x2609, 0xA891, 0x2640, 0xA1E2, 0x2642, 0xA1E1, 0x3000, 0xA1A1,
+ 0x3001, 0xA1A2, 0x3002, 0xA1A3, 0x3003, 0xA1A8, 0x3005, 0xA1A9,
+ 0x3006, 0xA965, 0x3007, 0xA996, 0x3008, 0xA1B4, 0x3009, 0xA1B5,
+ 0x300A, 0xA1B6, 0x300B, 0xA1B7, 0x300C, 0xA1B8, 0x300D, 0xA1B9,
+ 0x300E, 0xA1BA, 0x300F, 0xA1BB, 0x3010, 0xA1BE, 0x3011, 0xA1BF,
+ 0x3012, 0xA893, 0x3013, 0xA1FE, 0x3014, 0xA1B2, 0x3015, 0xA1B3,
+ 0x3016, 0xA1BC, 0x3017, 0xA1BD, 0x301D, 0xA894, 0x301E, 0xA895,
+ 0x3021, 0xA940, 0x3022, 0xA941, 0x3023, 0xA942, 0x3024, 0xA943,
+ 0x3025, 0xA944, 0x3026, 0xA945, 0x3027, 0xA946, 0x3028, 0xA947,
+ 0x3029, 0xA948, 0x3041, 0xA4A1, 0x3042, 0xA4A2, 0x3043, 0xA4A3,
+ 0x3044, 0xA4A4, 0x3045, 0xA4A5, 0x3046, 0xA4A6, 0x3047, 0xA4A7,
+ 0x3048, 0xA4A8, 0x3049, 0xA4A9, 0x304A, 0xA4AA, 0x304B, 0xA4AB,
+ 0x304C, 0xA4AC, 0x304D, 0xA4AD, 0x304E, 0xA4AE, 0x304F, 0xA4AF,
+ 0x3050, 0xA4B0, 0x3051, 0xA4B1, 0x3052, 0xA4B2, 0x3053, 0xA4B3,
+ 0x3054, 0xA4B4, 0x3055, 0xA4B5, 0x3056, 0xA4B6, 0x3057, 0xA4B7,
+ 0x3058, 0xA4B8, 0x3059, 0xA4B9, 0x305A, 0xA4BA, 0x305B, 0xA4BB,
+ 0x305C, 0xA4BC, 0x305D, 0xA4BD, 0x305E, 0xA4BE, 0x305F, 0xA4BF,
+ 0x3060, 0xA4C0, 0x3061, 0xA4C1, 0x3062, 0xA4C2, 0x3063, 0xA4C3,
+ 0x3064, 0xA4C4, 0x3065, 0xA4C5, 0x3066, 0xA4C6, 0x3067, 0xA4C7,
+ 0x3068, 0xA4C8, 0x3069, 0xA4C9, 0x306A, 0xA4CA, 0x306B, 0xA4CB,
+ 0x306C, 0xA4CC, 0x306D, 0xA4CD, 0x306E, 0xA4CE, 0x306F, 0xA4CF,
+ 0x3070, 0xA4D0, 0x3071, 0xA4D1, 0x3072, 0xA4D2, 0x3073, 0xA4D3,
+ 0x3074, 0xA4D4, 0x3075, 0xA4D5, 0x3076, 0xA4D6, 0x3077, 0xA4D7,
+ 0x3078, 0xA4D8, 0x3079, 0xA4D9, 0x307A, 0xA4DA, 0x307B, 0xA4DB,
+ 0x307C, 0xA4DC, 0x307D, 0xA4DD, 0x307E, 0xA4DE, 0x307F, 0xA4DF,
+ 0x3080, 0xA4E0, 0x3081, 0xA4E1, 0x3082, 0xA4E2, 0x3083, 0xA4E3,
+ 0x3084, 0xA4E4, 0x3085, 0xA4E5, 0x3086, 0xA4E6, 0x3087, 0xA4E7,
+ 0x3088, 0xA4E8, 0x3089, 0xA4E9, 0x308A, 0xA4EA, 0x308B, 0xA4EB,
+ 0x308C, 0xA4EC, 0x308D, 0xA4ED, 0x308E, 0xA4EE, 0x308F, 0xA4EF,
+ 0x3090, 0xA4F0, 0x3091, 0xA4F1, 0x3092, 0xA4F2, 0x3093, 0xA4F3,
+ 0x309B, 0xA961, 0x309C, 0xA962, 0x309D, 0xA966, 0x309E, 0xA967,
+ 0x30A1, 0xA5A1, 0x30A2, 0xA5A2, 0x30A3, 0xA5A3, 0x30A4, 0xA5A4,
+ 0x30A5, 0xA5A5, 0x30A6, 0xA5A6, 0x30A7, 0xA5A7, 0x30A8, 0xA5A8,
+ 0x30A9, 0xA5A9, 0x30AA, 0xA5AA, 0x30AB, 0xA5AB, 0x30AC, 0xA5AC,
+ 0x30AD, 0xA5AD, 0x30AE, 0xA5AE, 0x30AF, 0xA5AF, 0x30B0, 0xA5B0,
+ 0x30B1,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0xA5F2, 0x30F3, 0xA5F3, 0x30F4, 0xA5F4,
+ 0x30F5, 0xA5F5, 0x30F6, 0xA5F6, 0x30FC, 0xA960, 0x30FD, 0xA963,
+ 0x30FE, 0xA964, 0x3105, 0xA8C5, 0x3106, 0xA8C6, 0x3107, 0xA8C7,
+ 0x3108, 0xA8C8, 0x3109, 0xA8C9, 0x310A, 0xA8CA, 0x310B, 0xA8CB,
+ 0x310C, 0xA8CC, 0x310D, 0xA8CD, 0x310E, 0xA8CE, 0x310F, 0xA8CF,
+ 0x3110, 0xA8D0, 0x3111, 0xA8D1, 0x3112, 0xA8D2, 0x3113, 0xA8D3,
+ 0x3114, 0xA8D4, 0x3115, 0xA8D5, 0x3116, 0xA8D6, 0x3117, 0xA8D7,
+ 0x3118, 0xA8D8, 0x3119, 0xA8D9, 0x311A, 0xA8DA, 0x311B, 0xA8DB,
+ 0x311C, 0xA8DC, 0x311D, 0xA8DD, 0x311E, 0xA8DE, 0x311F, 0xA8DF,
+ 0x3120, 0xA8E0, 0x3121, 0xA8E1, 0x3122, 0xA8E2, 0x3123, 0xA8E3,
+ 0x3124, 0xA8E4, 0x3125, 0xA8E5, 0x3126, 0xA8E6, 0x3127, 0xA8E7,
+ 0x3128, 0xA8E8, 0x3129, 0xA8E9, 0x3220, 0xA2E5, 0x3221, 0xA2E6,
+ 0x3222, 0xA2E7, 0x3223, 0xA2E8, 0x3224, 0xA2E9, 0x3225, 0xA2EA,
+ 0x3226, 0xA2EB, 0x3227, 0xA2EC, 0x3228, 0xA2ED, 0x3229, 0xA2EE,
+ 0x3231, 0xA95A, 0x32A3, 0xA949, 0x338E, 0xA94A, 0x338F, 0xA94B,
+ 0x339C, 0xA94C, 0x339D, 0xA94D, 0x339E, 0xA94E, 0x33A1, 0xA94F,
+ 0x33C4, 0xA950, 0x33CE, 0xA951, 0x33D1, 0xA952, 0x33D2, 0xA953,
+ 0x33D5, 0xA954, 0x4E00, 0xD2BB, 0x4E01, 0xB6A1, 0x4E02, 0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x4E45, 0xBEC3, 0x4E46, 0x8158,
+ 0x4E47, 0xD8B1, 0x4E48, 0xC3B4, 0x4E49, 0xD2E5, 0x4E4A, 0x8159,
+ 0x4E4B, 0xD6AE, 0x4E4C, 0xCEDA, 0x4E4D, 0xD5A7, 0x4E4E, 0xBAF5,
+ 0x4E4F, 0xB7A6, 0x4E50, 0xC0D6, 0x4E51, 0x815A, 0x4E52, 0xC6B9,
+ 0x4E53, 0xC5D2, 0x4E54, 0xC7C7, 0x4E55, 0x815B, 0x4E56, 0xB9D4,
+ 0x4E57, 0x815C, 0x4E58, 0xB3CB, 0x4E59, 0xD2D2, 0x4E5A, 0x815D,
+ 0x4E5B, 0x815E, 0x4E5C, 0xD8BF, 0x4E5D, 0xBEC5, 0x4E5E, 0xC6F2,
+ 0x4E5F, 0xD2B2, 0x4E60, 0xCFB0, 0x4E61, 0xCFE7, 0x4E62, 0x815F,
+ 0x4E63, 0x8160, 0x4E64, 0x8161, 0x4E65, 0x8162, 0x4E66, 0xCAE9,
+ 0x4E67, 0x8163, 0x4E68, 0x8164, 0x4E69, 0xD8C0, 0x4E6A, 0x8165,
+ 0x4E6B, 0x8166, 0x4E6C, 0x8167, 0x4E6D, 0x8168, 0x4E6E, 0x8169,
+ 0x4E6F, 0x816A, 0x4E70, 0xC2F2, 0x4E71, 0xC2D2, 0x4E72, 0x816B,
+ 0x4E73, 0xC8E9, 0x4E74, 0x816C, 0x4E75, 0x816D, 0x4E76, 0x816E,
+ 0x4E77, 0x816F, 0x4E78, 0x8170, 0x4E79, 0x8171, 0x4E7A, 0x8172,
+ 0x4E7B, 0x8173, 0x4E7C, 0x8174, 0x4E7D, 0x8175, 0x4E7E, 0xC7AC,
+ 0x4E7F, 0x8176, 0x4E80, 0x8177, 0x4E81, 0x8178, 0x4E82, 0x8179,
+ 0x4E83, 0x817A, 0x4E84, 0x817B, 0x4E85, 0x817C, 0x4E86, 0xC1CB,
+ 0x4E87, 0x817D, 0x4E88, 0xD3E8, 0x4E89,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 0x5013, 0x8284, 0x5014, 0xBEF3, 0x5015, 0x8285, 0x5016, 0x8286,
+ 0x5017, 0x8287, 0x5018, 0xCCC8, 0x5019, 0xBAF2, 0x501A, 0xD2D0,
+ 0x501B, 0x8288, 0x501C, 0xD9C3, 0x501D, 0x8289, 0x501E, 0x828A,
+ 0x501F, 0xBDE8, 0x5020, 0x828B, 0x5021, 0xB3AB, 0x5022, 0x828C,
+ 0x5023, 0x828D, 0x5024, 0x828E, 0x5025, 0xD9C5, 0x5026, 0xBEEB,
+ 0x5027, 0x828F, 0x5028, 0xD9C6, 0x5029, 0xD9BB, 0x502A, 0xC4DF,
+ 0x502B, 0x8290, 0x502C, 0xD9BE, 0x502D, 0xD9C1, 0x502E, 0xD9C0,
+ 0x502F, 0x8291, 0x5030, 0x8292, 0x5031, 0x8293, 0x5032, 0x8294,
+ 0x5033, 0x8295, 0x5034, 0x8296, 0x5035, 0x8297, 0x5036, 0x8298,
+ 0x5037, 0x8299, 0x5038, 0x829A, 0x5039, 0x829B, 0x503A, 0xD5AE,
+ 0x503B, 0x829C, 0x503C, 0xD6B5, 0x503D, 0x829D, 0x503E, 0xC7E3,
+ 0x503F, 0x829E, 0x5040, 0x829F, 0x5041, 0x82A0, 0x5042, 0x82A1,
+ 0x5043, 0xD9C8, 0x5044, 0x82A2, 0x5045, 0x82A3, 0x5046, 0x82A4,
+ 0x5047, 0xBCD9, 0x5048, 0xD9CA, 0x5049, 0x82A5, 0x504A, 0x82A6,
+ 0x504B, 0x82A7, 0x504C, 0xD9BC, 0x504D, 0x82A8, 0x504E, 0xD9CB,
+ 0x504F, 0xC6AB, 0x5050, 0x82A9, 0x5051, 0x82AA, 0x5052, 0x82AB,
+ 0x5053, 0x82AC, 0x5054, 0x82AD, 0x5055, 0xD9C9, 0x5056, 0x82AE,
+ 0x5057, 0x82AF, 0x5058, 0x82B0, 0x5059, 0x82B1, 0x505A, 0xD7F6,
+ 0x505B, 0x82B2, 0x505C, 0xCDA3, 0x505D, 0x82B3, 0x505E, 0x82B4,
+ 0x505F, 0x82B5, 0x5060, 0x82B6, 0x5061, 0x82B7, 0x5062, 0x82B8,
+ 0x5063, 0x82B9, 0x5064, 0x82BA, 0x5065, 0xBDA1, 0x5066, 0x82BB,
+ 0x5067, 0x82BC, 0x5068, 0x82BD, 0x5069, 0x82BE, 0x506A, 0x82BF,
+ 0x506B, 0x82C0, 0x506C, 0xD9CC, 0x506D, 0x82C1, 0x506E, 0x82C2,
+ 0x506F, 0x82C3, 0x5070, 0x82C4, 0x5071, 0x82C5, 0x5072, 0x82C6,
+ 0x5073, 0x82C7, 0x5074, 0x82C8, 0x5075, 0x82C9, 0x5076, 0xC5BC,
+ 0x5077, 0xCDB5, 0x5078, 0x82CA, 0x5079, 0x82CB, 0x507A, 0x82CC,
+ 0x507B, 0xD9CD, 0x507C, 0x82CD, 0x507D, 0x82CE, 0x507E, 0xD9C7,
+ 0x507F, 0xB3A5, 0x5080, 0xBFFE, 0x5081, 0x82CF, 0x5082, 0x82D0,
+ 0x5083, 0x82D1, 0x5084, 0x82D2, 0x5085, 0xB8B5, 0x5086, 0x82D3,
+ 0x5087, 0x82D4, 0x5088, 0xC0FC, 0x5089, 0x82D5, 0x508A, 0x82D6,
+ 0x508B, 0x82D7, 0x508C, 0x82D8, 0x508D, 0xB0F8, 0x508E, 0x82D9,
+ 0x508F, 0x82DA, 0x5090, 0x82DB, 0x5091, 0x82DC, 0x5092, 0x82DD,
+ 0x5093, 0x82DE, 0x5094, 0x82DF, 0x5095, 0x82E0, 0x5096, 0x82E1,
+ 0x5097, 0x82E2, 0x5098, 0x82E3, 0x5099, 0x82E4, 0x509A, 0x82E5,
+ 0x509B, 0x82E6, 0x509C, 0x82E7, 0x509D, 0x82E8, 0x509E, 0x82E9,
+ 0x509F, 0x82EA, 0x50A0, 0x82EB, 0x50A1, 0x82EC, 0x50A2, 0x82ED,
+ 0x50A3, 0xB4F6, 0x50A4, 0x82EE, 0x50A5, 0xD9CE, 0x50A6, 0x82EF,
+ 0x50A7, 0xD9CF, 0x50A8, 0xB4A2, 0x50A9, 0xD9D0, 0x50AA, 0x82F0,
+ 0x50AB, 0x82F1, 0x50AC, 0xB4DF, 0x50AD, 0x82F2, 0x50AE, 0x82F3,
+ 0x50AF, 0x82F4, 0x50B0, 0x82F5, 0x50B1, 0x82F6, 0x50B2, 0xB0C1,
+ 0x50B3, 0x82F7, 0x50B4, 0x82F8, 0x50B5, 0x82F9, 0x50B6, 0x82FA,
+ 0x50B7, 0x82FB, 0x50B8, 0x82FC, 0x50B9, 0x82FD, 0x50BA, 0xD9D1,
+ 0x50BB, 0xC9B5, 0x50BC, 0x82FE, 0x50BD, 0x8340, 0x50BE, 0x8341,
+ 0x50BF, 0x8342, 0x50C0, 0x8343, 0x50C1, 0x8344, 0x50C2, 0x8345,
+ 0x50C3, 0x8346, 0x50C4, 0x8347, 0x50C5, 0x8348, 0x50C6, 0x8349,
+ 0x50C7, 0x834A, 0x50C8, 0x834B, 0x50C9, 0x834C, 0x50CA, 0x834D,
+ 0x50CB, 0x834E, 0x50CC, 0x834F, 0x50CD, 0x8350, 0x50CE, 0x8351,
+ 0x50CF, 0xCFF1, 0x50D0, 0x8352, 0x50D1, 0x8353, 0x50D2, 0x8354,
+ 0x50D3, 0x8355, 0x50D4, 0x8356, 0x50D5, 0x8357, 0x50D6, 0xD9D2,
+ 0x50D7, 0x8358, 0x50D8, 0x8359, 0x50D9, 0x835A, 0x50DA, 0xC1C5,
+ 0x50DB, 0x835B, 0x50DC, 0x835C, 0x50DD, 0x835D, 0x50DE, 0x835E,
+ 0x50DF, 0x835F, 0x50E0, 0x8360, 0x50E1, 0x8361, 0x50E2, 0x8362,
+ 0x50E3, 0x8363, 0x50E4, 0x8364, 0x50E5, 0x8365, 0x50E6, 0xD9D6,
+ 0x50E7, 0xC9AE, 0x50E8, 0x8366, 0x50E9, 0x8367, 0x50EA, 0x8368,
+ 0x50EB, 0x8369, 0x50EC, 0xD9D5, 0x50ED, 0xD9D4, 0x50EE, 0xD9D7,
+ 0x50EF, 0x836A, 0x50F0, 0x836B, 0x50F1, 0x836C, 0x50F2, 0x836D,
+ 0x50F3, 0xCBDB, 0x50F4, 0x836E, 0x50F5, 0xBDA9, 0x50F6, 0x836F,
+ 0x50F7, 0x8370, 0x50F8, 0x8371, 0x50F9, 0x8372, 0x50FA, 0x8373,
+ 0x50FB, 0xC6A7, 0x50FC, 0x8374, 0x50FD, 0x8375, 0x50FE, 0x8376,
+ 0x50FF, 0x8377, 0x5100, 0x8378, 0x5101, 0x8379, 0x5102, 0x837A,
+ 0x5103, 0x837B, 0x5104, 0x837C, 0x5105, 0x837D, 0x5106, 0xD9D3,
+ 0x5107, 0xD9D8, 0x5108, 0x837E, 0x5109, 0x8380, 0x510A, 0x8381,
+ 0x510B, 0xD9D9, 0x510C, 0x8382, 0x510D, 0x8383, 0x510E, 0x8384,
+ 0x510F, 0x8385, 0x5110, 0x8386, 0x5111, 0x8387, 0x5112, 0xC8E5,
+ 0x5113, 0x8388, 0x5114, 0x8389, 0x5115, 0x838A, 0x5116, 0x838B,
+ 0x5117, 0x838C, 0x5118, 0x838D, 0x5119, 0x838E, 0x511A, 0x838F,
+ 0x511B, 0x8390, 0x511C, 0x8391, 0x511D, 0x8392, 0x511E, 0x8393,
+ 0x511F, 0x8394, 0x5120, 0x8395, 0x5121, 0xC0DC, 0x5122, 0x8396,
+ 0x5123, 0x8397, 0x5124, 0x8398, 0x5125, 0x8399, 0x5126, 0x839A,
+ 0x5127, 0x839B, 0x5128, 0x839C, 0x5129, 0x839D, 0x512A, 0x839E,
+ 0x512B, 0x839F, 0x512C, 0x83A0, 0x512D, 0x83A1, 0x512E, 0x83A2,
+ 0x512F, 0x83A3, 0x5130, 0x83A4, 0x5131, 0x83A5, 0x5132, 0x83A6,
+ 0x5133, 0x83A7, 0x5134, 0x83A8, 0x5135, 0x83A9, 0x5136, 0x83AA,
+ 0x5137, 0x83AB, 0x5138, 0x83AC, 0x5139, 0x83AD, 0x513A, 0x83AE,
+ 0x513B, 0x83AF, 0x513C, 0x83B0, 0x513D, 0x83B1, 0x513E, 0x83B2,
+ 0x513F, 0xB6F9, 0x5140, 0xD8A3, 0x5141, 0xD4CA, 0x5142, 0x83B3,
+ 0x5143, 0xD4AA, 0x5144, 0xD0D6, 0x5145, 0xB3E4, 0x5146, 0xD5D7,
+ 0x5147, 0x83B4, 0x5148, 0xCFC8, 0x5149, 0xB9E2, 0x514A, 0x83B5,
+ 0x514B, 0xBFCB, 0x514C, 0x83B6, 0x514D, 0xC3E2, 0x514E, 0x83B7,
+ 0x514F, 0x83B8, 0x5150, 0x83B9, 0x5151, 0xB6D2, 0x5152, 0x83BA,
+ 0x5153, 0x83BB, 0x5154, 0xCDC3, 0x5155, 0xD9EE, 0x5156, 0xD9F0,
+ 0x5157, 0x83BC, 0x5158, 0x83BD, 0x5159, 0x83BE, 0x515A, 0xB5B3,
+ 0x515B, 0x83BF, 0x515C, 0xB6B5, 0x515D, 0x83C0, 0x515E, 0x83C1,
+ 0x515F, 0x83C2, 0x5160, 0x83C3, 0x5161, 0x83C4, 0x5162, 0xBEA4,
+ 0x5163, 0x83C5, 0x5164, 0x83C6, 0x5165, 0xC8EB, 0x5166, 0x83C7,
+ 0x5167, 0x83C8, 0x5168, 0xC8AB, 0x5169, 0x83C9, 0x516A, 0x83CA,
+ 0x516B, 0xB0CB, 0x516C, 0xB9AB, 0x516D, 0xC1F9, 0x516E, 0xD9E2,
+ 0x516F, 0x83CB, 0x5170, 0xC0BC, 0x5171, 0xB9B2, 0x5172, 0x83CC,
+ 0x5173, 0xB9D8, 0x5174, 0xD0CB, 0x5175, 0xB1F8, 0x5176, 0xC6E4,
+ 0x5177, 0xBEDF, 0x5178, 0xB5E4, 0x5179, 0xD7C8, 0x517A, 0x83CD,
+ 0x517B, 0xD1F8, 0x517C, 0xBCE6, 0x517D, 0xCADE, 0x517E, 0x83CE,
+ 0x517F, 0x83CF, 0x5180, 0xBCBD, 0x5181, 0xD9E6, 0x5182, 0xD8E7,
+ 0x5183, 0x83D0, 0x5184, 0x83D1, 0x5185, 0xC4DA, 0x5186, 0x83D2,
+ 0x5187, 0x83D3, 0x5188, 0xB8D4, 0x5189, 0xC8BD, 0x518A, 0x83D4,
+ 0x518B, 0x83D5, 0x518C, 0xB2E1, 0x518D, 0xD4D9, 0x518E, 0x83D6,
+ 0x518F, 0x83D7, 0x5190, 0x83D8, 0x5191, 0x83D9, 0x5192, 0xC3B0,
+ 0x5193, 0x83DA, 0x5194, 0x83DB, 0x5195, 0xC3E1, 0x5196, 0xDAA2,
+ 0x5197, 0xC8DF, 0x5198, 0x83DC, 0x5199, 0xD0B4, 0x519A, 0x83DD,
+ 0x519B, 0xBEFC, 0x519C, 0xC5A9, 0x519D, 0x83DE, 0x519E, 0x83DF,
+ 0x519F, 0x83E0, 0x51A0, 0xB9DA, 0x51A1, 0x83E1, 0x51A2, 0xDAA3,
+ 0x51A3, 0x83E2, 0x51A4, 0xD4A9, 0x51A5, 0xDAA4, 0x51A6, 0x83E3,
+ 0x51A7, 0x83E4, 0x51A8, 0x83E5, 0x51A9, 0x83E6, 0x51AA, 0x83E7,
+ 0x51AB, 0xD9FB, 0x51AC, 0xB6AC, 0x51AD, 0x83E8, 0x51AE, 0x83E9,
+ 0x51AF, 0xB7EB, 0x51B0, 0xB1F9, 0x51B1, 0xD9FC, 0x51B2, 0xB3E5,
+ 0x51B3, 0xBEF6, 0x51B4, 0x83EA, 0x51B5, 0xBFF6, 0x51B6, 0xD2B1,
+ 0x51B7, 0xC0E4, 0x51B8, 0x83EB, 0x51B9, 0x83EC, 0x51BA, 0x83ED,
+ 0x51BB, 0xB6B3, 0x51BC, 0xD9FE, 0x51BD, 0xD9FD, 0x51BE, 0x83EE,
+ 0x51BF, 0x83EF, 0x51C0, 0xBEBB, 0x51C1, 0x83F0, 0x51C2, 0x83F1,
+ 0x51C3, 0x83F2, 0x51C4, 0xC6E0, 0x51C5, 0x83F3, 0x51C6, 0xD7BC,
+ 0x51C7, 0xDAA1, 0x51C8, 0x83F4, 0x51C9, 0xC1B9, 0x51CA, 0x83F5,
+ 0x51CB, 0xB5F2, 0x51CC, 0xC1E8, 0x51CD, 0x83F6, 0x51CE, 0x83F7,
+ 0x51CF, 0xBCF5, 0x51D0, 0x83F8, 0x51D1, 0xB4D5, 0x51D2, 0x83F9,
+ 0x51D3, 0x83FA, 0x51D4, 0x83FB, 0x51D5, 0x83FC, 0x51D6, 0x83FD,
+ 0x51D7, 0x83FE, 0x51D8, 0x8440, 0x51D9, 0x8441, 0x51DA, 0x8442,
+ 0x51DB, 0xC1DD, 0x51DC, 0x8443, 0x51DD, 0xC4FD, 0x51DE, 0x8444,
+ 0x51DF, 0x8445, 0x51E0, 0xBCB8, 0x51E1, 0xB7B2, 0x51E2, 0x8446,
+ 0x51E3, 0x8447, 0x51E4, 0xB7EF, 0x51E5, 0x8448, 0x51E6, 0x8449,
+ 0x51E7, 0x844A, 0x51E8, 0x844B, 0x51E9, 0x844C, 0x51EA, 0x844D,
+ 0x51EB, 0xD9EC, 0x51EC, 0x844E, 0x51ED, 0xC6BE, 0x51EE, 0x844F,
+ 0x51EF, 0xBFAD, 0x51F0, 0xBBCB, 0x51F1, 0x8450, 0x51F2, 0x8451,
+ 0x51F3, 0xB5CA, 0x51F4, 0x8452, 0x51F5, 0xDBC9, 0x51F6, 0xD0D7,
+ 0x51F7, 0x8453, 0x51F8, 0xCDB9, 0x51F9, 0xB0BC, 0x51FA, 0xB3F6,
+ 0x51FB, 0xBBF7, 0x51FC, 0xDBCA, 0x51FD, 0xBAAF, 0x51FE, 0x8454,
+ 0x51FF, 0xD4E4, 0x5200, 0xB5B6, 0x5201, 0xB5F3, 0x5202, 0xD8D6,
+ 0x5203, 0xC8D0, 0x5204, 0x8455, 0x5205, 0x8456, 0x5206, 0xB7D6,
+ 0x5207, 0xC7D0, 0x5208, 0xD8D7, 0x5209, 0x8457, 0x520A, 0xBFAF,
+ 0x520B, 0x8458, 0x520C, 0x8459, 0x520D, 0xDBBB, 0x520E, 0xD8D8,
+ 0x520F, 0x845A, 0x5210, 0x845B, 0x5211, 0xD0CC, 0x5212, 0xBBAE,
+ 0x5213, 0x845C, 0x5214, 0x845D, 0x5215, 0x845E, 0x5216, 0xEBBE,
+ 0x5217, 0xC1D0, 0x5218, 0xC1F5, 0x5219, 0xD4F2, 0x521A, 0xB8D5,
+ 0x521B, 0xB4B4, 0x521C, 0x845F, 0x521D, 0xB3F5, 0x521E, 0x8460,
+ 0x521F, 0x8461, 0x5220, 0xC9BE, 0x5221, 0x8462, 0x5222, 0x8463,
+ 0x5223, 0x8464, 0x5224, 0xC5D0, 0x5225, 0x8465, 0x5226, 0x8466,
+ 0x5227, 0x8467, 0x5228, 0xC5D9, 0x5229, 0xC0FB, 0x522A, 0x8468,
+ 0x522B, 0xB1F0, 0x522C, 0x8469, 0x522D, 0xD8D9, 0x522E, 0xB9CE,
+ 0x522F, 0x846A, 0x5230, 0xB5BD, 0x5231, 0x846B, 0x5232, 0x846C,
+ 0x5233, 0xD8DA, 0x5234, 0x846D, 0x5235, 0x846E, 0x5236, 0xD6C6,
+ 0x5237, 0xCBA2, 0x5238, 0xC8AF, 0x5239, 0xC9B2, 0x523A, 0xB4CC,
+ 0x523B, 0xBFCC, 0x523C, 0x846F, 0x523D, 0xB9F4, 0x523E, 0x8470,
+ 0x523F, 0xD8DB, 0x5240, 0xD8DC, 0x5241, 0xB6E7, 0x5242, 0xBCC1,
+ 0x5243, 0xCCEA, 0x5244, 0x8471, 0x5245, 0x8472, 0x5246, 0x8473,
+ 0x5247, 0x8474, 0x5248, 0x8475, 0x5249, 0x8476, 0x524A, 0xCFF7,
+ 0x524B, 0x8477, 0x524C, 0xD8DD, 0x524D, 0xC7B0, 0x524E, 0x8478,
+ 0x524F, 0x8479, 0x5250, 0xB9D0, 0x5251, 0xBDA3, 0x5252, 0x847A,
+ 0x5253, 0x847B, 0x5254, 0xCCDE, 0x5255, 0x847C, 0x5256, 0xC6CA,
+ 0x5257, 0x847D, 0x5258, 0x847E, 0x5259, 0x8480, 0x525A, 0x8481,
+ 0x525B, 0x8482, 0x525C, 0xD8E0, 0x525D, 0x8483, 0x525E, 0xD8DE,
+ 0x525F, 0x8484, 0x5260, 0x8485, 0x5261, 0xD8DF, 0x5262, 0x8486,
+ 0x5263, 0x8487, 0x5264, 0x8488, 0x5265, 0xB0FE, 0x5266, 0x8489,
+ 0x5267, 0xBEE7, 0x5268, 0x848A, 0x5269, 0xCAA3, 0x526A, 0xBCF4,
+ 0x526B, 0x848B, 0x526C, 0x848C, 0x526D, 0x848D, 0x526E, 0x848E,
+ 0x526F, 0xB8B1, 0x5270, 0x848F, 0x5271, 0x8490, 0x5272, 0xB8EE,
+ 0x5273, 0x8491, 0x5274, 0x8492, 0x5275, 0x8493, 0x5276, 0x8494,
+ 0x5277, 0x8495, 0x5278, 0x8496, 0x5279, 0x8497, 0x527A, 0x8498,
+ 0x527B, 0x8499, 0x527C, 0x849A, 0x527D, 0xD8E2, 0x527E, 0x849B,
+ 0x527F, 0xBDCB, 0x5280, 0x849C, 0x5281, 0xD8E4, 0x5282, 0xD8E3,
+ 0x5283, 0x849D, 0x5284, 0x849E, 0x5285, 0x849F, 0x5286, 0x84A0,
+ 0x5287, 0x84A1, 0x5288, 0xC5FC, 0x5289, 0x84A2, 0x528A, 0x84A3,
+ 0x528B, 0x84A4, 0x528C, 0x84A5, 0x528D, 0x84A6, 0x528E, 0x84A7,
+ 0x528F, 0x84A8, 0x5290, 0xD8E5, 0x5291, 0x84A9, 0x5292, 0x84AA,
+ 0x5293, 0xD8E6, 0x5294, 0x84AB, 0x5295, 0x84AC, 0x5296, 0x84AD,
+ 0x5297, 0x84AE, 0x5298, 0x84AF, 0x5299, 0x84B0, 0x529A, 0x84B1,
+ 0x529B, 0xC1A6, 0x529C, 0x84B2, 0x529D, 0xC8B0, 0x529E, 0xB0EC,
+ 0x529F, 0xB9A6, 0x52A0, 0xBCD3, 0x52A1, 0xCEF1, 0x52A2, 0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 0x84E0,
+ 0x52E7, 0x84E1, 0x52E8, 0x84E2, 0x52E9, 0x84E3, 0x52EA, 0x84E4,
+ 0x52EB, 0x84E5, 0x52EC, 0x84E6, 0x52ED, 0x84E7, 0x52EE, 0x84E8,
+ 0x52EF, 0x84E9, 0x52F0, 0xDBC4, 0x52F1, 0x84EA, 0x52F2, 0x84EB,
+ 0x52F3, 0x84EC, 0x52F4, 0x84ED, 0x52F5, 0x84EE, 0x52F6, 0x84EF,
+ 0x52F7, 0x84F0, 0x52F8, 0x84F1, 0x52F9, 0xD9E8, 0x52FA, 0xC9D7,
+ 0x52FB, 0x84F2, 0x52FC, 0x84F3, 0x52FD, 0x84F4, 0x52FE, 0xB9B4,
+ 0x52FF, 0xCEF0, 0x5300, 0xD4C8, 0x5301, 0x84F5, 0x5302, 0x84F6,
+ 0x5303, 0x84F7, 0x5304, 0x84F8, 0x5305, 0xB0FC, 0x5306, 0xB4D2,
+ 0x5307, 0x84F9, 0x5308, 0xD0D9, 0x5309, 0x84FA, 0x530A, 0x84FB,
+ 0x530B, 0x84FC, 0x530C, 0x84FD, 0x530D, 0xD9E9, 0x530E, 0x84FE,
+ 0x530F, 0xDECB, 0x5310, 0xD9EB, 0x5311, 0x8540, 0x5312, 0x8541,
+ 0x5313, 0x8542, 0x5314, 0x8543, 0x5315, 0xD8B0, 0x5316, 0xBBAF,
+ 0x5317, 0xB1B1, 0x5318, 0x8544, 0x5319, 0xB3D7, 0x531A, 0xD8CE,
+ 0x531B, 0x8545, 0x531C, 0x8546, 0x531D, 0xD4D1, 0x531E, 0x8547,
+ 0x531F, 0x8548, 0x5320, 0xBDB3, 0x5321, 0xBFEF, 0x5322, 0x8549,
+ 0x5323, 0xCFBB, 0x5324, 0x854A, 0x5325, 0x854B, 0x5326, 0xD8D0,
+ 0x5327, 0x854C, 0x5328, 0x854D, 0x5329, 0x854E, 0x532A, 0xB7CB,
+ 0x532B, 0x854F, 0x532C, 0x8550, 0x532D, 0x8551, 0x532E, 0xD8D1,
+ 0x532F, 0x8552, 0x5330, 0x8553, 0x5331, 0x8554, 0x5332, 0x8555,
+ 0x5333, 0x8556, 0x5334, 0x8557, 0x5335, 0x8558, 0x5336, 0x8559,
+ 0x5337, 0x855A, 0x5338, 0x855B, 0x5339, 0xC6A5, 0x533A, 0xC7F8,
+ 0x533B, 0xD2BD, 0x533C, 0x855C, 0x533D, 0x855D, 0x533E, 0xD8D2,
+ 0x533F, 0xC4E4, 0x5340, 0x855E, 0x5341, 0xCAAE, 0x5342, 0x855F,
+ 0x5343, 0xC7A7, 0x5344, 0x8560, 0x5345, 0xD8A6, 0x5346, 0x8561,
+ 0x5347, 0xC9FD, 0x5348, 0xCEE7, 0x5349, 0xBBDC, 0x534A, 0xB0EB,
+ 0x534B, 0x8562, 0x534C, 0x8563, 0x534D, 0x8564, 0x534E, 0xBBAA,
+ 0x534F, 0xD0AD, 0x5350, 0x8565, 0x5351, 0xB1B0, 0x5352, 0xD7E4,
+ 0x5353, 0xD7BF, 0x5354, 0x8566, 0x5355, 0xB5A5, 0x5356, 0xC2F4,
+ 0x5357, 0xC4CF, 0x5358, 0x8567, 0x5359, 0x8568, 0x535A, 0xB2A9,
+ 0x535B, 0x8569, 0x535C, 0xB2B7, 0x535D, 0x856A, 0x535E, 0xB1E5,
+ 0x535F, 0xDFB2, 0x5360, 0xD5BC, 0x5361, 0xBFA8, 0x5362, 0xC2AC,
+ 0x5363, 0xD8D5, 0x5364, 0xC2B1, 0x5365, 0x856B, 0x5366, 0xD8D4,
+ 0x5367, 0xCED4, 0x5368, 0x856C, 0x5369, 0xDAE0, 0x536A, 0x856D,
+ 0x536B, 0xCEC0, 0x536C, 0x856E, 0x536D, 0x856F, 0x536E, 0xD8B4,
+ 0x536F, 0xC3AE, 0x5370, 0xD3A1, 0x5371, 0xCEA3, 0x5372, 0x8570,
+ 0x5373, 0xBCB4, 0x5374, 0xC8B4, 0x5375, 0xC2D1, 0x5376, 0x8571,
+ 0x5377, 0xBEED, 0x5378, 0xD0B6, 0x5379, 0x8572, 0x537A, 0xDAE1,
+ 0x537B, 0x8573, 0x537C, 0x8574, 0x537D, 0x8575, 0x537E, 0x8576,
+ 0x537F, 0xC7E4, 0x5380, 0x8577, 0x5381, 0x8578, 0x5382, 0xB3A7,
+ 0x5383, 0x8579, 0x5384, 0xB6F2, 0x5385, 0xCCFC, 0x5386, 0xC0FA,
+ 0x5387, 0x857A, 0x5388, 0x857B, 0x5389, 0xC0F7, 0x538A, 0x857C,
+ 0x538B, 0xD1B9, 0x538C, 0xD1E1, 0x538D, 0xD8C7, 0x538E, 0x857D,
+ 0x538F, 0x857E, 0x5390, 0x8580, 0x5391, 0x8581, 0x5392, 0x8582,
+ 0x5393, 0x8583, 0x5394, 0x8584, 0x5395, 0xB2DE, 0x5396, 0x8585,
+ 0x5397, 0x8586, 0x5398, 0xC0E5, 0x5399, 0x8587, 0x539A, 0xBAF1,
+ 0x539B, 0x8588, 0x539C, 0x8589, 0x539D, 0xD8C8, 0x539E, 0x858A,
+ 0x539F, 0xD4AD, 0x53A0, 0x858B, 0x53A1, 0x858C, 0x53A2, 0xCFE1,
+ 0x53A3, 0xD8C9, 0x53A4, 0x858D, 0x53A5, 0xD8CA, 0x53A6, 0xCFC3,
+ 0x53A7, 0x858E, 0x53A8, 0xB3F8, 0x53A9, 0xBEC7, 0x53AA, 0x858F,
+ 0x53AB, 0x8590, 0x53AC, 0x8591, 0x53AD, 0x8592, 0x53AE, 0xD8CB,
+ 0x53AF, 0x8593, 0x53B0, 0x8594, 0x53B1, 0x8595, 0x53B2, 0x8596,
+ 0x53B3, 0x8597, 0x53B4, 0x8598, 0x53B5, 0x8599, 0x53B6, 0xDBCC,
+ 0x53B7, 0x859A, 0x53B8, 0x859B, 0x53B9, 0x859C, 0x53BA, 0x859D,
+ 0x53BB, 0xC8A5, 0x53BC, 0x859E, 0x53BD, 0x859F, 0x53BE, 0x85A0,
+ 0x53BF, 0xCFD8, 0x53C0, 0x85A1, 0x53C1, 0xC8FE,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7, 0x5405, 0x85BA, 0x5406, 0xDFBA,
+ 0x5407, 0x85BB, 0x5408, 0xBACF, 0x5409, 0xBCAA, 0x540A, 0xB5F5,
+ 0x540B, 0x85BC, 0x540C, 0xCDAC, 0x540D, 0xC3FB, 0x540E, 0xBAF3,
+ 0x540F, 0xC0F4, 0x5410, 0xCDC2, 0x5411, 0xCFF2, 0x5412, 0xDFB8,
+ 0x5413, 0xCFC5, 0x5414, 0x85BD, 0x5415, 0xC2C0, 0x5416, 0xDFB9,
+ 0x5417, 0xC2F0, 0x5418, 0x85BE, 0x5419, 0x85BF, 0x541A, 0x85C0,
+ 0x541B, 0xBEFD, 0x541C, 0x85C1, 0x541D, 0xC1DF, 0x541E, 0xCDCC,
+ 0x541F, 0xD2F7, 0x5420, 0xB7CD, 0x5421, 0xDFC1, 0x5422, 0x85C2,
+ 0x5423, 0xDFC4, 0x5424, 0x85C3, 0x5425, 0x85C4, 0x5426, 0xB7F1,
+ 0x5427, 0xB0C9, 0x5428, 0xB6D6, 0x5429, 0xB7D4, 0x542A, 0x85C5,
+ 0x542B, 0xBAAC, 0x542C, 0xCCFD, 0x542D, 0xBFD4, 0x542E, 0xCBB1,
+ 0x542F, 0xC6F4, 0x5430, 0x85C6, 0x5431, 0xD6A8, 0x5432, 0xDFC5,
+ 0x5433, 0x85C7, 0x5434, 0xCEE2, 0x5435, 0xB3B3, 0x5436, 0x85C8,
+ 0x5437, 0x85C9, 0x5438, 0xCEFC, 0x5439, 0xB4B5, 0x543A, 0x85CA,
+ 0x543B, 0xCEC7, 0x543C, 0xBAF0, 0x543D, 0x85CB, 0x543E, 0xCEE1,
+ 0x543F, 0x85CC, 0x5440, 0xD1BD, 0x5441, 0x85CD, 0x5442, 0x85CE,
+ 0x5443, 0xDFC0, 0x5444, 0x85CF, 0x5445, 0x85D0, 0x5446, 0xB4F4,
+ 0x5447, 0x85D1, 0x5448, 0xB3CA, 0x5449, 0x85D2, 0x544A, 0xB8E6,
+ 0x544B, 0xDFBB, 0x544C, 0x85D3, 0x544D, 0x85D4, 0x544E, 0x85D5,
+ 0x544F, 0x85D6, 0x5450, 0xC4C5, 0x5451, 0x85D7, 0x5452, 0xDFBC,
+ 0x5453, 0xDFBD, 0x5454, 0xDFBE, 0x5455, 0xC5BB, 0x5456, 0xDFBF,
+ 0x5457, 0xDFC2, 0x5458, 0xD4B1, 0x5459, 0xDFC3, 0x545A, 0x85D8,
+ 0x545B, 0xC7BA, 0x545C, 0xCED8, 0x545D, 0x85D9, 0x545E, 0x85DA,
+ 0x545F, 0x85DB, 0x5460, 0x85DC, 0x5461, 0x85DD, 0x5462, 0xC4D8,
+ 0x5463, 0x85DE, 0x5464, 0xDFCA, 0x5465, 0x85DF, 0x5466, 0xDFCF,
+ 0x5467, 0x85E0, 0x5468, 0xD6DC, 0x5469, 0x85E1, 0x546A, 0x85E2,
+ 0x546B, 0x85E3, 0x546C, 0x85E4, 0x546D, 0x85E5, 0x546E, 0x85E6,
+ 0x546F, 0x85E7, 0x5470, 0x85E8, 0x5471, 0xDFC9, 0x5472, 0xDFDA,
+ 0x5473, 0xCEB6, 0x5474, 0x85E9, 0x5475, 0xBAC7, 0x5476, 0xDFCE,
+ 0x5477, 0xDFC8, 0x5478, 0xC5DE, 0x5479, 0x85EA, 0x547A, 0x85EB,
+ 0x547B, 0xC9EB, 0x547C, 0xBAF4, 0x547D, 0xC3FC, 0x547E, 0x85EC,
+ 0x547F, 0x85ED, 0x5480, 0xBED7, 0x5481, 0x85EE, 0x5482, 0xDFC6,
+ 0x5483, 0x85EF, 0x5484, 0xDFCD, 0x5485, 0x85F0, 0x5486, 0xC5D8,
+ 0x5487, 0x85F1, 0x5488, 0x85F2, 0x5489, 0x85F3, 0x548A, 0x85F4,
+ 0x548B, 0xD5A6, 0x548C, 0xBACD, 0x548D, 0x85F5, 0x548E, 0xBECC,
+ 0x548F, 0xD3BD, 0x5490, 0xB8C0, 0x5491, 0x85F6, 0x5492, 0xD6E4,
+ 0x5493, 0x85F7, 0x5494, 0xDFC7, 0x5495, 0xB9BE, 0x5496, 0xBFA7,
+ 0x5497, 0x85F8, 0x5498, 0x85F9, 0x5499, 0xC1FC, 0x549A, 0xDFCB,
+ 0x549B, 0xDFCC, 0x549C, 0x85FA, 0x549D, 0xDFD0, 0x549E, 0x85FB,
+ 0x549F, 0x85FC, 0x54A0, 0x85FD, 0x54A1, 0x85FE, 0x54A2, 0x8640,
+ 0x54A3, 0xDFDB, 0x54A4, 0xDFE5, 0x54A5, 0x8641, 0x54A6, 0xDFD7,
+ 0x54A7, 0xDFD6, 0x54A8, 0xD7C9, 0x54A9, 0xDFE3, 0x54AA, 0xDFE4,
+ 0x54AB, 0xE5EB, 0x54AC, 0xD2A7, 0x54AD, 0xDFD2, 0x54AE, 0x8642,
+ 0x54AF, 0xBFA9, 0x54B0, 0x8643, 0x54B1, 0xD4DB, 0x54B2, 0x8644,
+ 0x54B3, 0xBFC8, 0x54B4, 0xDFD4, 0x54B5, 0x8645, 0x54B6, 0x8646,
+ 0x54B7, 0x8647, 0x54B8, 0xCFCC, 0x54B9, 0x8648, 0x54BA, 0x8649,
+ 0x54BB, 0xDFDD, 0x54BC, 0x864A, 0x54BD, 0xD1CA, 0x54BE, 0x864B,
+ 0x54BF, 0xDFDE, 0x54C0, 0xB0A7, 0x54C1, 0xC6B7, 0x54C2, 0xDFD3,
+ 0x54C3, 0x864C, 0x54C4, 0xBAE5, 0x54C5, 0x864D, 0x54C6, 0xB6DF,
+ 0x54C7, 0xCDDB, 0x54C8, 0xB9FE, 0x54C9, 0xD4D5, 0x54CA, 0x864E,
+ 0x54CB, 0x864F, 0x54CC, 0xDFDF, 0x54CD, 0xCFEC, 0x54CE, 0xB0A5,
+ 0x54CF, 0xDFE7, 0x54D0, 0xDFD1, 0x54D1, 0xD1C6, 0x54D2, 0xDFD5,
+ 0x54D3, 0xDFD8, 0x54D4, 0xDFD9, 0x54D5, 0xDFDC, 0x54D6, 0x8650,
+ 0x54D7, 0xBBA9, 0x54D8, 0x8651, 0x54D9, 0xDFE0, 0x54DA, 0xDFE1,
+ 0x54DB, 0x8652, 0x54DC, 0xDFE2, 0x54DD, 0xDFE6, 0x54DE, 0xDFE8,
+ 0x54DF, 0xD3B4, 0x54E0, 0x8653, 0x54E1, 0x8654, 0x54E2, 0x8655,
+ 0x54E3, 0x8656, 0x54E4, 0x8657, 0x54E5, 0xB8E7, 0x54E6, 0xC5B6,
+ 0x54E7, 0xDFEA, 0x54E8, 0xC9DA, 0x54E9, 0xC1A8, 0x54EA, 0xC4C4,
+ 0x54EB, 0x8658, 0x54EC, 0x8659, 0x54ED, 0xBFDE, 0x54EE, 0xCFF8,
+ 0x54EF, 0x865A, 0x54F0, 0x865B, 0x54F1, 0x865C, 0x54F2, 0xD5DC,
+ 0x54F3, 0xDFEE, 0x54F4, 0x865D, 0x54F5, 0x865E, 0x54F6, 0x865F,
+ 0x54F7, 0x8660, 0x54F8, 0x8661, 0x54F9, 0x8662, 0x54FA, 0xB2B8,
+ 0x54FB, 0x8663, 0x54FC, 0xBADF, 0x54FD, 0xDFEC, 0x54FE, 0x8664,
+ 0x54FF, 0xDBC1, 0x5500, 0x8665, 0x5501, 0xD1E4, 0x5502, 0x8666,
+ 0x5503, 0x8667, 0x5504, 0x8668, 0x5505, 0x8669, 0x5506, 0xCBF4,
+ 0x5507, 0xB4BD, 0x5508, 0x866A, 0x5509, 0xB0A6, 0x550A, 0x866B,
+ 0x550B, 0x866C, 0x550C, 0x866D, 0x550D, 0x866E, 0x550E, 0x866F,
+ 0x550F, 0xDFF1, 0x5510, 0xCCC6, 0x5511, 0xDFF2, 0x5512, 0x8670,
+ 0x5513, 0x8671, 0x5514, 0xDFED, 0x5515, 0x8672, 0x5516, 0x8673,
+ 0x5517, 0x8674, 0x5518, 0x8675, 0x5519, 0x8676, 0x551A, 0x8677,
+ 0x551B, 0xDFE9, 0x551C, 0x8678, 0x551D, 0x8679, 0x551E, 0x867A,
+ 0x551F, 0x867B, 0x5520, 0xDFEB, 0x5521, 0x867C, 0x5522, 0xDFEF,
+ 0x5523, 0xDFF0, 0x5524, 0xBBBD, 0x5525, 0x867D, 0x5526, 0x867E,
+ 0x5527, 0xDFF3, 0x5528, 0x8680, 0x5529, 0x8681, 0x552A, 0xDFF4,
+ 0x552B, 0x8682, 0x552C, 0xBBA3, 0x552D, 0x8683, 0x552E, 0xCADB,
+ 0x552F, 0xCEA8, 0x5530, 0xE0A7, 0x5531, 0xB3AA, 0x5532, 0x8684,
+ 0x5533, 0xE0A6, 0x5534, 0x8685, 0x5535, 0x8686, 0x5536, 0x8687,
+ 0x5537, 0xE0A1, 0x5538, 0x8688, 0x5539, 0x8689, 0x553A, 0x868A,
+ 0x553B, 0x868B, 0x553C, 0xDFFE, 0x553D, 0x868C, 0x553E, 0xCDD9,
+ 0x553F, 0xDFFC, 0x5540, 0x868D, 0x5541, 0xDFFA, 0x5542, 0x868E,
+ 0x5543, 0xBFD0, 0x5544, 0xD7C4, 0x5545, 0x868F, 0x5546, 0xC9CC,
+ 0x5547, 0x8690, 0x5548, 0x8691, 0x5549, 0xDFF8, 0x554A, 0xB0A1,
+ 0x554B, 0x8692, 0x554C, 0x8693, 0x554D, 0x8694, 0x554E, 0x8695,
+ 0x554F, 0x8696, 0x5550, 0xDFFD, 0x5551, 0x8697, 0x5552, 0x8698,
+ 0x5553, 0x8699, 0x5554, 0x869A, 0x5555, 0xDFFB, 0x5556, 0xE0A2,
+ 0x5557, 0x869B, 0x5558, 0x869C, 0x5559, 0x869D, 0x555A, 0x869E,
+ 0x555B, 0x869F, 0x555C, 0xE0A8, 0x555D, 0x86A0, 0x555E, 0x86A1,
+ 0x555F, 0x86A2, 0x5560, 0x86A3, 0x5561, 0xB7C8, 0x5562, 0x86A4,
+ 0x5563, 0x86A5, 0x5564, 0xC6A1, 0x5565, 0xC9B6, 0x5566, 0xC0B2,
+ 0x5567, 0xDFF5, 0x5568, 0x86A6, 0x5569, 0x86A7, 0x556A, 0xC5BE,
+ 0x556B, 0x86A8, 0x556C, 0xD8C4, 0x556D, 0xDFF9, 0x556E, 0xC4F6,
+ 0x556F, 0x86A9, 0x5570, 0x86AA, 0x5571, 0x86AB, 0x5572, 0x86AC,
+ 0x5573, 0x86AD, 0x5574, 0x86AE, 0x5575, 0xE0A3, 0x5576, 0xE0A4,
+ 0x5577, 0xE0A5, 0x5578, 0xD0A5, 0x5579, 0x86AF, 0x557A, 0x86B0,
+ 0x557B, 0xE0B4, 0x557C, 0xCCE4, 0x557D, 0x86B1, 0x557E, 0xE0B1,
+ 0x557F, 0x86B2, 0x5580, 0xBFA6, 0x5581, 0xE0AF, 0x5582, 0xCEB9,
+ 0x5583, 0xE0AB, 0x5584, 0xC9C6, 0x5585, 0x86B3, 0x5586, 0x86B4,
+ 0x5587, 0xC0AE, 0x5588, 0xE0AE, 0x5589, 0xBAED, 0x558A, 0xBAB0,
+ 0x558B, 0xE0A9, 0x558C, 0x86B5, 0x558D, 0x86B6, 0x558E, 0x86B7,
+ 0x558F, 0xDFF6, 0x5590, 0x86B8, 0x5591, 0xE0B3, 0x5592, 0x86B9,
+ 0x5593, 0x86BA, 0x5594, 0xE0B8, 0x5595, 0x86BB, 0x5596, 0x86BC,
+ 0x5597, 0x86BD, 0x5598, 0xB4AD, 0x5599, 0xE0B9, 0x559A, 0x86BE,
+ 0x559B, 0x86BF, 0x559C, 0xCFB2, 0x559D, 0xBAC8, 0x559E, 0x86C0,
+ 0x559F, 0xE0B0, 0x55A0, 0x86C1, 0x55A1, 0x86C2, 0x55A2, 0x86C3,
+ 0x55A3, 0x86C4, 0x55A4, 0x86C5, 0x55A5, 0x86C6, 0x55A6, 0x86C7,
+ 0x55A7, 0xD0FA, 0x55A8, 0x86C8, 0x55A9, 0x86C9, 0x55AA, 0x86CA,
+ 0x55AB, 0x86CB, 0x55AC, 0x86CC, 0x55AD, 0x86CD, 0x55AE, 0x86CE,
+ 0x55AF, 0x86CF, 0x55B0, 0x86D0, 0x55B1, 0xE0AC, 0x55B2, 0x86D1,
+ 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 0x86F4,
+ 0x55F7, 0xE0BB, 0x55F8, 0x86F5, 0x55F9, 0x86F6, 0x55FA, 0x86F7,
+ 0x55FB, 0x86F8, 0x55FC, 0x86F9, 0x55FD, 0xCBD4, 0x55FE, 0xE0D5,
+ 0x55FF, 0x86FA, 0x5600, 0xE0D6, 0x5601, 0xE0D2, 0x5602, 0x86FB,
+ 0x5603, 0x86FC, 0x5604, 0x86FD, 0x5605, 0x86FE, 0x5606, 0x8740,
+ 0x5607, 0x8741, 0x5608, 0xE0D0, 0x5609, 0xBCCE, 0x560A, 0x8742,
+ 0x560B, 0x8743, 0x560C, 0xE0D1, 0x560D, 0x8744, 0x560E, 0xB8C2,
+ 0x560F, 0xD8C5, 0x5610, 0x8745, 0x5611, 0x8746, 0x5612, 0x8747,
+ 0x5613, 0x8748, 0x5614, 0x8749, 0x5615, 0x874A, 0x5616, 0x874B,
+ 0x5617, 0x874C, 0x5618, 0xD0EA, 0x5619, 0x874D, 0x561A, 0x874E,
+ 0x561B, 0xC2EF, 0x561C, 0x874F, 0x561D, 0x8750, 0x561E, 0xE0CF,
+ 0x561F, 0xE0BD, 0x5620, 0x8751, 0x5621, 0x8752, 0x5622, 0x8753,
+ 0x5623, 0xE0D4, 0x5624, 0xE0D3, 0x5625, 0x8754, 0x5626, 0x8755,
+ 0x5627, 0xE0D7, 0x5628, 0x8756, 0x5629, 0x8757, 0x562A, 0x8758,
+ 0x562B, 0x8759, 0x562C, 0xE0DC, 0x562D, 0xE0D8, 0x562E, 0x875A,
+ 0x562F, 0x875B, 0x5630, 0x875C, 0x5631, 0xD6F6, 0x5632, 0xB3B0,
+ 0x5633, 0x875D, 0x5634, 0xD7EC, 0x5635, 0x875E, 0x5636, 0xCBBB,
+ 0x5637, 0x875F, 0x5638, 0x8760, 0x5639, 0xE0DA, 0x563A, 0x8761,
+ 0x563B, 0xCEFB, 0x563C, 0x8762, 0x563D, 0x8763, 0x563E, 0x8764,
+ 0x563F, 0xBAD9, 0x5640, 0x8765, 0x5641, 0x8766, 0x5642, 0x8767,
+ 0x5643, 0x8768, 0x5644, 0x8769, 0x5645, 0x876A, 0x5646, 0x876B,
+ 0x5647, 0x876C, 0x5648, 0x876D, 0x5649, 0x876E, 0x564A, 0x876F,
+ 0x564B, 0x8770, 0x564C, 0xE0E1, 0x564D, 0xE0DD, 0x564E, 0xD2AD,
+ 0x564F, 0x8771, 0x5650, 0x8772, 0x5651, 0x8773, 0x5652, 0x8774,
+ 0x5653, 0x8775, 0x5654, 0xE0E2, 0x5655, 0x8776, 0x5656, 0x8777,
+ 0x5657, 0xE0DB, 0x5658, 0xE0D9, 0x5659, 0xE0DF, 0x565A, 0x8778,
+ 0x565B, 0x8779, 0x565C, 0xE0E0, 0x565D, 0x877A, 0x565E, 0x877B,
+ 0x565F, 0x877C, 0x5660, 0x877D, 0x5661, 0x877E, 0x5662, 0xE0DE,
+ 0x5663, 0x8780, 0x5664, 0xE0E4, 0x5665, 0x8781, 0x5666, 0x8782,
+ 0x5667, 0x8783, 0x5668, 0xC6F7, 0x5669, 0xD8AC, 0x566A, 0xD4EB,
+ 0x566B, 0xE0E6, 0x566C, 0xCAC9, 0x566D, 0x8784, 0x566E, 0x8785,
+ 0x566F, 0x8786, 0x5670, 0x8787, 0x5671, 0xE0E5, 0x5672, 0x8788,
+ 0x5673, 0x8789, 0x5674, 0x878A, 0x5675, 0x878B, 0x5676, 0xB8C1,
+ 0x5677, 0x878C, 0x5678, 0x878D, 0x5679, 0x878E, 0x567A, 0x878F,
+ 0x567B, 0xE0E7, 0x567C, 0xE0E8, 0x567D, 0x8790, 0x567E, 0x8791,
+ 0x567F, 0x8792, 0x5680, 0x8793, 0x5681, 0x8794, 0x5682, 0x8795,
+ 0x5683, 0x8796, 0x5684, 0x8797, 0x5685, 0xE0E9, 0x5686, 0xE0E3,
+ 0x5687, 0x8798, 0x5688, 0x8799, 0x5689, 0x879A, 0x568A, 0x879B,
+ 0x568B, 0x879C, 0x568C, 0x879D, 0x568D, 0x879E, 0x568E, 0xBABF,
+ 0x568F, 0xCCE7, 0x5690, 0x879F, 0x5691, 0x87A0, 0x5692, 0x87A1,
+ 0x5693, 0xE0EA, 0x5694, 0x87A2, 0x5695, 0x87A3, 0x5696, 0x87A4,
+ 0x5697, 0x87A5, 0x5698, 0x87A6, 0x5699, 0x87A7, 0x569A, 0x87A8,
+ 0x569B, 0x87A9, 0x569C, 0x87AA, 0x569D, 0x87AB, 0x569E, 0x87AC,
+ 0x569F, 0x87AD, 0x56A0, 0x87AE, 0x56A1, 0x87AF, 0x56A2, 0x87B0,
+ 0x56A3, 0xCFF9, 0x56A4, 0x87B1, 0x56A5, 0x87B2, 0x56A6, 0x87B3,
+ 0x56A7, 0x87B4, 0x56A8, 0x87B5, 0x56A9, 0x87B6, 0x56AA, 0x87B7,
+ 0x56AB, 0x87B8, 0x56AC, 0x87B9, 0x56AD, 0x87BA, 0x56AE, 0x87BB,
+ 0x56AF, 0xE0EB, 0x56B0, 0x87BC, 0x56B1, 0x87BD, 0x56B2, 0x87BE,
+ 0x56B3, 0x87BF, 0x56B4, 0x87C0, 0x56B5, 0x87C1, 0x56B6, 0x87C2,
+ 0x56B7, 0xC8C2, 0x56B8, 0x87C3, 0x56B9, 0x87C4, 0x56BA, 0x87C5,
+ 0x56BB, 0x87C6, 0x56BC, 0xBDC0, 0x56BD, 0x87C7, 0x56BE, 0x87C8,
+ 0x56BF, 0x87C9, 0x56C0, 0x87CA, 0x56C1, 0x87CB, 0x56C2, 0x87CC,
+ 0x56C3, 0x87CD, 0x56C4, 0x87CE, 0x56C5, 0x87CF, 0x56C6, 0x87D0,
+ 0x56C7, 0x87D1, 0x56C8, 0x87D2, 0x56C9, 0x87D3, 0x56CA, 0xC4D2,
+ 0x56CB, 0x87D4, 0x56CC, 0x87D5, 0x56CD, 0x87D6, 0x56CE, 0x87D7,
+ 0x56CF, 0x87D8, 0x56D0, 0x87D9, 0x56D1, 0x87DA, 0x56D2, 0x87DB,
+ 0x56D3, 0x87DC, 0x56D4, 0xE0EC, 0x56D5, 0x87DD, 0x56D6, 0x87DE,
+ 0x56D7, 0xE0ED, 0x56D8, 0x87DF, 0x56D9, 0x87E0, 0x56DA, 0xC7F4,
+ 0x56DB, 0xCBC4, 0x56DC, 0x87E1, 0x56DD, 0xE0EE, 0x56DE, 0xBBD8,
+ 0x56DF, 0xD8B6, 0x56E0, 0xD2F2, 0x56E1, 0xE0EF, 0x56E2, 0xCDC5,
+ 0x56E3, 0x87E2, 0x56E4, 0xB6DA, 0x56E5, 0x87E3, 0x56E6, 0x87E4,
+ 0x56E7, 0x87E5, 0x56E8, 0x87E6, 0x56E9, 0x87E7, 0x56EA, 0x87E8,
+ 0x56EB, 0xE0F1, 0x56EC, 0x87E9, 0x56ED, 0xD4B0, 0x56EE, 0x87EA,
+ 0x56EF, 0x87EB, 0x56F0, 0xC0A7, 0x56F1, 0xB4D1, 0x56F2, 0x87EC,
+ 0x56F3, 0x87ED, 0x56F4, 0xCEA7, 0x56F5, 0xE0F0, 0x56F6, 0x87EE,
+ 0x56F7, 0x87EF, 0x56F8, 0x87F0, 0x56F9, 0xE0F2, 0x56FA, 0xB9CC,
+ 0x56FB, 0x87F1, 0x56FC, 0x87F2, 0x56FD, 0xB9FA, 0x56FE, 0xCDBC,
+ 0x56FF, 0xE0F3, 0x5700, 0x87F3, 0x5701, 0x87F4, 0x5702, 0x87F5,
+ 0x5703, 0xC6D4, 0x5704, 0xE0F4, 0x5705, 0x87F6, 0x5706, 0xD4B2,
+ 0x5707, 0x87F7, 0x5708, 0xC8A6, 0x5709, 0xE0F6, 0x570A, 0xE0F5,
+ 0x570B, 0x87F8, 0x570C, 0x87F9, 0x570D, 0x87FA, 0x570E, 0x87FB,
+ 0x570F, 0x87FC, 0x5710, 0x87FD, 0x5711, 0x87FE, 0x5712, 0x8840,
+ 0x5713, 0x8841, 0x5714, 0x8842, 0x5715, 0x8843, 0x5716, 0x8844,
+ 0x5717, 0x8845, 0x5718, 0x8846, 0x5719, 0x8847, 0x571A, 0x8848,
+ 0x571B, 0x8849, 0x571C, 0xE0F7, 0x571D, 0x884A, 0x571E, 0x884B,
+ 0x571F, 0xCDC1, 0x5720, 0x884C, 0x5721, 0x884D, 0x5722, 0x884E,
+ 0x5723, 0xCAA5, 0x5724, 0x884F, 0x5725, 0x8850, 0x5726, 0x8851,
+ 0x5727, 0x8852, 0x5728, 0xD4DA, 0x5729, 0xDBD7, 0x572A, 0xDBD9,
+ 0x572B, 0x8853, 0x572C, 0xDBD8, 0x572D, 0xB9E7, 0x572E, 0xDBDC,
+ 0x572F, 0xDBDD, 0x5730, 0xB5D8, 0x5731, 0x8854, 0x5732, 0x8855,
+ 0x5733, 0xDBDA, 0x5734, 0x8856, 0x5735, 0x8857, 0x5736, 0x8858,
+ 0x5737, 0x8859, 0x5738, 0x885A, 0x5739, 0xDBDB, 0x573A, 0xB3A1,
+ 0x573B, 0xDBDF, 0x573C, 0x885B, 0x573D, 0x885C, 0x573E, 0xBBF8,
+ 0x573F, 0x885D, 0x5740, 0xD6B7, 0x5741, 0x885E, 0x5742, 0xDBE0,
+ 0x5743, 0x885F, 0x5744, 0x8860, 0x5745, 0x8861, 0x5746, 0x8862,
+ 0x5747, 0xBEF9, 0x5748, 0x8863, 0x5749, 0x8864, 0x574A, 0xB7BB,
+ 0x574B, 0x8865, 0x574C, 0xDBD0, 0x574D, 0xCCAE, 0x574E, 0xBFB2,
+ 0x574F, 0xBBB5, 0x5750, 0xD7F8, 0x5751, 0xBFD3, 0x5752, 0x8866,
+ 0x5753, 0x8867, 0x5754, 0x8868, 0x5755, 0x8869, 0x5756, 0x886A,
+ 0x5757, 0xBFE9, 0x5758, 0x886B, 0x5759, 0x886C, 0x575A, 0xBCE1,
+ 0x575B, 0xCCB3, 0x575C, 0xDBDE, 0x575D, 0xB0D3, 0x575E, 0xCEEB,
+ 0x575F, 0xB7D8, 0x5760, 0xD7B9, 0x5761, 0xC6C2, 0x5762, 0x886D,
+ 0x5763, 0x886E, 0x5764, 0xC0A4, 0x5765, 0x886F, 0x5766, 0xCCB9,
+ 0x5767, 0x8870, 0x5768, 0xDBE7, 0x5769, 0xDBE1, 0x576A, 0xC6BA,
+ 0x576B, 0xDBE3, 0x576C, 0x8871, 0x576D, 0xDBE8, 0x576E, 0x8872,
+ 0x576F, 0xC5F7, 0x5770, 0x8873, 0x5771, 0x8874, 0x5772, 0x8875,
+ 0x5773, 0xDBEA, 0x5774, 0x8876, 0x5775, 0x8877, 0x5776, 0xDBE9,
+ 0x5777, 0xBFC0, 0x5778, 0x8878, 0x5779, 0x8879, 0x577A, 0x887A,
+ 0x577B, 0xDBE6, 0x577C, 0xDBE5, 0x577D, 0x887B, 0x577E, 0x887C,
+ 0x577F, 0x887D, 0x5780, 0x887E, 0x5781, 0x8880, 0x5782, 0xB4B9,
+ 0x5783, 0xC0AC, 0x5784, 0xC2A2, 0x5785, 0xDBE2, 0x5786, 0xDBE4,
+ 0x5787, 0x8881, 0x5788, 0x8882, 0x5789, 0x8883, 0x578A, 0x8884,
+ 0x578B, 0xD0CD, 0x578C, 0xDBED, 0x578D, 0x8885, 0x578E, 0x8886,
+ 0x578F, 0x8887, 0x5790, 0x8888, 0x5791, 0x8889, 0x5792, 0xC0DD,
+ 0x5793, 0xDBF2, 0x5794, 0x888A, 0x5795, 0x888B, 0x5796, 0x888C,
+ 0x5797, 0x888D, 0x5798, 0x888E, 0x5799, 0x888F, 0x579A, 0x8890,
+ 0x579B, 0xB6E2, 0x579C, 0x8891, 0x579D, 0x8892, 0x579E, 0x8893,
+ 0x579F, 0x8894, 0x57A0, 0xDBF3, 0x57A1, 0xDBD2, 0x57A2, 0xB9B8,
+ 0x57A3, 0xD4AB, 0x57A4, 0xDBEC, 0x57A5, 0x8895, 0x57A6, 0xBFD1,
+ 0x57A7, 0xDBF0, 0x57A8, 0x8896, 0x57A9, 0xDBD1, 0x57AA, 0x8897,
+ 0x57AB, 0xB5E6, 0x57AC, 0x8898, 0x57AD, 0xDBEB, 0x57AE, 0xBFE5,
+ 0x57AF, 0x8899, 0x57B0, 0x889A, 0x57B1, 0x889B, 0x57B2, 0xDBEE,
+ 0x57B3, 0x889C, 0x57B4, 0xDBF1, 0x57B5, 0x889D, 0x57B6, 0x889E,
+ 0x57B7, 0x889F, 0x57B8, 0xDBF9, 0x57B9, 0x88A0, 0x57BA, 0x88A1,
+ 0x57BB, 0x88A2, 0x57BC, 0x88A3, 0x57BD, 0x88A4, 0x57BE, 0x88A5,
+ 0x57BF, 0x88A6, 0x57C0, 0x88A7, 0x57C1, 0x88A8, 0x57C2, 0xB9A1,
+ 0x57C3, 0xB0A3, 0x57C4, 0x88A9, 0x57C5, 0x88AA, 0x57C6, 0x88AB,
+ 0x57C7, 0x88AC, 0x57C8, 0x88AD, 0x57C9, 0x88AE, 0x57CA, 0x88AF,
+ 0x57CB, 0xC2F1, 0x57CC, 0x88B0, 0x57CD, 0x88B1, 0x57CE, 0xB3C7,
+ 0x57CF, 0xDBEF, 0x57D0, 0x88B2, 0x57D1, 0x88B3, 0x57D2, 0xDBF8,
+ 0x57D3, 0x88B4, 0x57D4, 0xC6D2, 0x57D5, 0xDBF4, 0x57D6, 0x88B5,
+ 0x57D7, 0x88B6, 0x57D8, 0xDBF5, 0x57D9, 0xDBF7, 0x57DA, 0xDBF6,
+ 0x57DB, 0x88B7, 0x57DC, 0x88B8, 0x57DD, 0xDBFE, 0x57DE, 0x88B9,
+ 0x57DF, 0xD3F2, 0x57E0, 0xB2BA, 0x57E1, 0x88BA, 0x57E2, 0x88BB,
+ 0x57E3, 0x88BC, 0x57E4, 0xDBFD, 0x57E5, 0x88BD, 0x57E6, 0x88BE,
+ 0x57E7, 0x88BF, 0x57E8, 0x88C0, 0x57E9, 0x88C1, 0x57EA, 0x88C2,
+ 0x57EB, 0x88C3, 0x57EC, 0x88C4, 0x57ED, 0xDCA4, 0x57EE, 0x88C5,
+ 0x57EF, 0xDBFB, 0x57F0, 0x88C6, 0x57F1, 0x88C7, 0x57F2, 0x88C8,
+ 0x57F3, 0x88C9, 0x57F4, 0xDBFA, 0x57F5, 0x88CA, 0x57F6, 0x88CB,
+ 0x57F7, 0x88CC, 0x57F8, 0xDBFC, 0x57F9, 0xC5E0, 0x57FA, 0xBBF9,
+ 0x57FB, 0x88CD, 0x57FC, 0x88CE, 0x57FD, 0xDCA3, 0x57FE, 0x88CF,
+ 0x57FF, 0x88D0, 0x5800, 0xDCA5, 0x5801, 0x88D1, 0x5802, 0xCCC3,
+ 0x5803, 0x88D2, 0x5804, 0x88D3, 0x5805, 0x88D4, 0x5806, 0xB6D1,
+ 0x5807, 0xDDC0, 0x5808, 0x88D5, 0x5809, 0x88D6, 0x580A, 0x88D7,
+ 0x580B, 0xDCA1, 0x580C, 0x88D8, 0x580D, 0xDCA2, 0x580E, 0x88D9,
+ 0x580F, 0x88DA, 0x5810, 0x88DB, 0x5811, 0xC7B5, 0x5812, 0x88DC,
+ 0x5813, 0x88DD, 0x5814, 0x88DE, 0x5815, 0xB6E9, 0x5816, 0x88DF,
+ 0x5817, 0x88E0, 0x5818, 0x88E1, 0x5819, 0xDCA7, 0x581A, 0x88E2,
+ 0x581B, 0x88E3, 0x581C, 0x88E4, 0x581D, 0x88E5, 0x581E, 0xDCA6,
+ 0x581F, 0x88E6, 0x5820, 0xDCA9, 0x5821, 0xB1A4, 0x5822, 0x88E7,
+ 0x5823, 0x88E8, 0x5824, 0xB5CC, 0x5825, 0x88E9, 0x5826, 0x88EA,
+ 0x5827, 0x88EB, 0x5828, 0x88EC, 0x5829, 0x88ED, 0x582A, 0xBFB0,
+ 0x582B, 0x88EE, 0x582C, 0x88EF, 0x582D, 0x88F0, 0x582E, 0x88F1,
+ 0x582F, 0x88F2, 0x5830, 0xD1DF, 0x5831, 0x88F3, 0x5832, 0x88F4,
+ 0x5833, 0x88F5, 0x5834, 0x88F6, 0x5835, 0xB6C2, 0x5836, 0x88F7,
+ 0x5837, 0x88F8, 0x5838, 0x88F9, 0x5839, 0x88FA, 0x583A, 0x88FB,
+ 0x583B, 0x88FC, 0x583C, 0x88FD, 0x583D, 0x88FE, 0x583E, 0x8940,
+ 0x583F, 0x8941, 0x5840, 0x8942, 0x5841, 0x8943, 0x5842, 0x8944,
+ 0x5843, 0x8945, 0x5844, 0xDCA8, 0x5845, 0x8946, 0x5846, 0x8947,
+ 0x5847, 0x8948, 0x5848, 0x8949, 0x5849, 0x894A, 0x584A, 0x894B,
+ 0x584B, 0x894C, 0x584C, 0xCBFA, 0x584D, 0xEBF3, 0x584E, 0x894D,
+ 0x584F, 0x894E, 0x5850, 0x894F, 0x5851, 0xCBDC, 0x5852, 0x8950,
+ 0x5853, 0x8951, 0x5854, 0xCBFE, 0x5855, 0x8952, 0x5856, 0x8953,
+ 0x5857, 0x8954, 0x5858, 0xCCC1, 0x5859, 0x8955, 0x585A, 0x8956,
+ 0x585B, 0x8957, 0x585C, 0x8958, 0x585D, 0x8959, 0x585E, 0xC8FB,
+ 0x585F, 0x895A, 0x5860, 0x895B, 0x5861, 0x895C, 0x5862, 0x895D,
+ 0x5863, 0x895E, 0x5864, 0x895F, 0x5865, 0xDCAA, 0x5866, 0x8960,
+ 0x5867, 0x8961, 0x5868, 0x8962, 0x5869, 0x8963, 0x586A, 0x8964,
+ 0x586B, 0xCCEE, 0x586C, 0xDCAB, 0x586D, 0x8965, 0x586E, 0x8966,
+ 0x586F, 0x8967, 0x5870, 0x8968, 0x5871, 0x8969, 0x5872, 0x896A,
+ 0x5873, 0x896B, 0x5874, 0x896C, 0x5875, 0x896D, 0x5876, 0x896E,
+ 0x5877, 0x896F, 0x5878, 0x8970, 0x5879, 0x8971, 0x587A, 0x8972,
+ 0x587B, 0x8973, 0x587C, 0x8974, 0x587D, 0x8975, 0x587E, 0xDBD3,
+ 0x587F, 0x8976, 0x5880, 0xDCAF, 0x5881, 0xDCAC, 0x5882, 0x8977,
+ 0x5883, 0xBEB3, 0x5884, 0x8978, 0x5885, 0xCAFB, 0x5886, 0x8979,
+ 0x5887, 0x897A, 0x5888, 0x897B, 0x5889, 0xDCAD, 0x588A, 0x897C,
+ 0x588B, 0x897D, 0x588C, 0x897E, 0x588D, 0x8980, 0x588E, 0x8981,
+ 0x588F, 0x8982, 0x5890, 0x8983, 0x5891, 0x8984, 0x5892, 0xC9CA,
+ 0x5893, 0xC4B9, 0x5894, 0x8985, 0x5895, 0x8986, 0x5896, 0x8987,
+ 0x5897, 0x8988, 0x5898, 0x8989, 0x5899, 0xC7BD, 0x589A, 0xDCAE,
+ 0x589B, 0x898A, 0x589C, 0x898B, 0x589D, 0x898C, 0x589E, 0xD4F6,
+ 0x589F, 0xD0E6, 0x58A0, 0x898D, 0x58A1, 0x898E, 0x58A2, 0x898F,
+ 0x58A3, 0x8990, 0x58A4, 0x8991, 0x58A5, 0x8992, 0x58A6, 0x8993,
+ 0x58A7, 0x8994, 0x58A8, 0xC4AB, 0x58A9, 0xB6D5, 0x58AA, 0x8995,
+ 0x58AB, 0x8996, 0x58AC, 0x8997, 0x58AD, 0x8998, 0x58AE, 0x8999,
+ 0x58AF, 0x899A, 0x58B0, 0x899B, 0x58B1, 0x899C, 0x58B2, 0x899D,
+ 0x58B3, 0x899E, 0x58B4, 0x899F, 0x58B5, 0x89A0, 0x58B6, 0x89A1,
+ 0x58B7, 0x89A2, 0x58B8, 0x89A3, 0x58B9, 0x89A4, 0x58BA, 0x89A5,
+ 0x58BB, 0x89A6, 0x58BC, 0xDBD4, 0x58BD, 0x89A7, 0x58BE, 0x89A8,
+ 0x58BF, 0x89A9, 0x58C0, 0x89AA, 0x58C1, 0xB1DA, 0x58C2, 0x89AB,
+ 0x58C3, 0x89AC, 0x58C4, 0x89AD, 0x58C5, 0xDBD5, 0x58C6, 0x89AE,
+ 0x58C7, 0x89AF, 0x58C8, 0x89B0, 0x58C9, 0x89B1, 0x58CA, 0x89B2,
+ 0x58CB, 0x89B3, 0x58CC, 0x89B4, 0x58CD, 0x89B5, 0x58CE, 0x89B6,
+ 0x58CF, 0x89B7, 0x58D0, 0x89B8, 0x58D1, 0xDBD6, 0x58D2, 0x89B9,
+ 0x58D3, 0x89BA, 0x58D4, 0x89BB, 0x58D5, 0xBABE, 0x58D6, 0x89BC,
+ 0x58D7, 0x89BD, 0x58D8, 0x89BE, 0x58D9, 0x89BF, 0x58DA, 0x89C0,
+ 0x58DB, 0x89C1, 0x58DC, 0x89C2, 0x58DD, 0x89C3, 0x58DE, 0x89C4,
+ 0x58DF, 0x89C5, 0x58E0, 0x89C6, 0x58E1, 0x89C7, 0x58E2, 0x89C8,
+ 0x58E3, 0x89C9, 0x58E4, 0xC8C0, 0x58E5, 0x89CA, 0x58E6, 0x89CB,
+ 0x58E7, 0x89CC, 0x58E8, 0x89CD, 0x58E9, 0x89CE, 0x58EA, 0x89CF,
+ 0x58EB, 0xCABF, 0x58EC, 0xC8C9, 0x58ED, 0x89D0, 0x58EE, 0xD7B3,
+ 0x58EF, 0x89D1, 0x58F0, 0xC9F9, 0x58F1, 0x89D2, 0x58F2, 0x89D3,
+ 0x58F3, 0xBFC7, 0x58F4, 0x89D4, 0x58F5, 0x89D5, 0x58F6, 0xBAF8,
+ 0x58F7, 0x89D6, 0x58F8, 0x89D7, 0x58F9, 0xD2BC, 0x58FA, 0x89D8,
+ 0x58FB, 0x89D9, 0x58FC, 0x89DA, 0x58FD, 0x89DB, 0x58FE, 0x89DC,
+ 0x58FF, 0x89DD, 0x5900, 0x89DE, 0x5901, 0x89DF, 0x5902, 0xE2BA,
+ 0x5903, 0x89E0, 0x5904, 0xB4A6, 0x5905, 0x89E1, 0x5906, 0x89E2,
+ 0x5907, 0xB1B8, 0x5908, 0x89E3, 0x5909, 0x89E4, 0x590A, 0x89E5,
+ 0x590B, 0x89E6, 0x590C, 0x89E7, 0x590D, 0xB8B4, 0x590E, 0x89E8,
+ 0x590F, 0xCFC4, 0x5910, 0x89E9, 0x5911, 0x89EA, 0x5912, 0x89EB,
+ 0x5913, 0x89EC, 0x5914, 0xD9E7, 0x5915, 0xCFA6, 0x5916, 0xCDE2,
+ 0x5917, 0x89ED, 0x5918, 0x89EE, 0x5919, 0xD9ED, 0x591A, 0xB6E0,
+ 0x591B, 0x89EF, 0x591C, 0xD2B9, 0x591D, 0x89F0, 0x591E, 0x89F1,
+ 0x591F, 0xB9BB, 0x5920, 0x89F2, 0x5921, 0x89F3, 0x5922, 0x89F4,
+ 0x5923, 0x89F5, 0x5924, 0xE2B9, 0x5925, 0xE2B7, 0x5926, 0x89F6,
+ 0x5927, 0xB4F3, 0x5928, 0x89F7, 0x5929, 0xCCEC, 0x592A, 0xCCAB,
+ 0x592B, 0xB7F2, 0x592C, 0x89F8, 0x592D, 0xD8B2, 0x592E, 0xD1EB,
+ 0x592F, 0xBABB, 0x5930, 0x89F9, 0x5931, 0xCAA7, 0x5932, 0x89FA,
+ 0x5933, 0x89FB, 0x5934, 0xCDB7, 0x5935, 0x89FC, 0x5936, 0x89FD,
+ 0x5937, 0xD2C4, 0x5938, 0xBFE4, 0x5939, 0xBCD0, 0x593A, 0xB6E1,
+ 0x593B, 0x89FE, 0x593C, 0xDEC5, 0x593D, 0x8A40, 0x593E, 0x8A41,
+ 0x593F, 0x8A42, 0x5940, 0x8A43, 0x5941, 0xDEC6, 0x5942, 0xDBBC,
+ 0x5943, 0x8A44, 0x5944, 0xD1D9, 0x5945, 0x8A45, 0x5946, 0x8A46,
+ 0x5947, 0xC6E6, 0x5948, 0xC4CE, 0x5949, 0xB7EE, 0x594A, 0x8A47,
+ 0x594B, 0xB7DC, 0x594C, 0x8A48, 0x594D, 0x8A49, 0x594E, 0xBFFC,
+ 0x594F, 0xD7E0, 0x5950, 0x8A4A, 0x5951, 0xC6F5, 0x5952, 0x8A4B,
+ 0x5953, 0x8A4C, 0x5954, 0xB1BC, 0x5955, 0xDEC8, 0x5956, 0xBDB1,
+ 0x5957, 0xCCD7, 0x5958, 0xDECA, 0x5959, 0x8A4D, 0x595A, 0xDEC9,
+ 0x595B, 0x8A4E, 0x595C, 0x8A4F, 0x595D, 0x8A50, 0x595E, 0x8A51,
+ 0x595F, 0x8A52, 0x5960, 0xB5EC, 0x5961, 0x8A53, 0x5962, 0xC9DD,
+ 0x5963, 0x8A54, 0x5964, 0x8A55, 0x5965, 0xB0C2, 0x5966, 0x8A56,
+ 0x5967, 0x8A57, 0x5968, 0x8A58, 0x5969, 0x8A59, 0x596A, 0x8A5A,
+ 0x596B, 0x8A5B, 0x596C, 0x8A5C, 0x596D, 0x8A5D, 0x596E, 0x8A5E,
+ 0x596F, 0x8A5F, 0x5970, 0x8A60, 0x5971, 0x8A61, 0x5972, 0x8A62,
+ 0x5973, 0xC5AE, 0x5974, 0xC5AB, 0x5975, 0x8A63, 0x5976, 0xC4CC,
+ 0x5977, 0x8A64, 0x5978, 0xBCE9, 0x5979, 0xCBFD, 0x597A, 0x8A65,
+ 0x597B, 0x8A66, 0x597C, 0x8A67, 0x597D, 0xBAC3, 0x597E, 0x8A68,
+ 0x597F, 0x8A69, 0x5980, 0x8A6A, 0x5981, 0xE5F9, 0x5982, 0xC8E7,
+ 0x5983, 0xE5FA, 0x5984, 0xCDFD, 0x5985, 0x8A6B, 0x5986, 0xD7B1,
+ 0x5987, 0xB8BE, 0x5988, 0xC2E8, 0x5989, 0x8A6C, 0x598A, 0xC8D1,
+ 0x598B, 0x8A6D, 0x598C, 0x8A6E, 0x598D, 0xE5FB, 0x598E, 0x8A6F,
+ 0x598F, 0x8A70, 0x5990, 0x8A71, 0x5991, 0x8A72, 0x5992, 0xB6CA,
+ 0x5993, 0xBCCB, 0x5994, 0x8A73, 0x5995, 0x8A74, 0x5996, 0xD1FD,
+ 0x5997, 0xE6A1, 0x5998, 0x8A75, 0x5999, 0xC3EE, 0x599A, 0x8A76,
+ 0x599B, 0x8A77, 0x599C, 0x8A78, 0x599D, 0x8A79, 0x599E, 0xE6A4,
+ 0x599F, 0x8A7A, 0x59A0, 0x8A7B, 0x59A1, 0x8A7C, 0x59A2, 0x8A7D,
+ 0x59A3, 0xE5FE, 0x59A4, 0xE6A5, 0x59A5, 0xCDD7, 0x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x904A,
+ 0x601F, 0x904B, 0x6020, 0xB5A1, 0x6021, 0xE2F9, 0x6022, 0x904C,
+ 0x6023, 0x904D, 0x6024, 0x904E, 0x6025, 0xBCB1, 0x6026, 0xE2F1,
+ 0x6027, 0xD0D4, 0x6028, 0xD4B9, 0x6029, 0xE2F5, 0x602A, 0xB9D6,
+ 0x602B, 0xE2F6, 0x602C, 0x904F, 0x602D, 0x9050, 0x602E, 0x9051,
+ 0x602F, 0xC7D3, 0x6030, 0x9052, 0x6031, 0x9053, 0x6032, 0x9054,
+ 0x6033, 0x9055, 0x6034, 0x9056, 0x6035, 0xE2F0, 0x6036, 0x9057,
+ 0x6037, 0x9058, 0x6038, 0x9059, 0x6039, 0x905A, 0x603A, 0x905B,
+ 0x603B, 0xD7DC, 0x603C, 0xEDA1, 0x603D, 0x905C, 0x603E, 0x905D,
+ 0x603F, 0xE2F8, 0x6040, 0x905E, 0x6041, 0xEDA5, 0x6042, 0xE2FE,
+ 0x6043, 0xCAD1, 0x6044, 0x905F, 0x6045, 0x9060, 0x6046, 0x9061,
+ 0x6047, 0x9062, 0x6048, 0x9063, 0x6049, 0x9064, 0x604A, 0x9065,
+ 0x604B, 0xC1B5, 0x604C, 0x9066, 0x604D, 0xBBD0, 0x604E, 0x9067,
+ 0x604F, 0x9068, 0x6050, 0xBFD6, 0x6051, 0x9069, 0x6052, 0xBAE3,
+ 0x6053, 0x906A, 0x6054, 0x906B, 0x6055, 0xCBA1, 0x6056, 0x906C,
+ 0x6057, 0x906D, 0x6058, 0x906E, 0x6059, 0xEDA6, 0x605A, 0xEDA3,
+ 0x605B, 0x906F, 0x605C, 0x9070, 0x605D, 0xEDA2, 0x605E, 0x9071,
+ 0x605F, 0x9072, 0x6060, 0x9073, 0x6061, 0x9074, 0x6062, 0xBBD6,
+ 0x6063, 0xEDA7, 0x6064, 0xD0F4, 0x6065, 0x9075, 0x6066, 0x9076,
+ 0x6067, 0xEDA4, 0x6068, 0xBADE, 0x6069, 0xB6F7, 0x606A, 0xE3A1,
+ 0x606B, 0xB6B2, 0x606C, 0xCCF1, 0x606D, 0xB9A7, 0x606E, 0x9077,
+ 0x606F, 0xCFA2, 0x6070, 0xC7A1, 0x6071, 0x9078, 0x6072, 0x9079,
+ 0x6073, 0xBFD2, 0x6074, 0x907A, 0x6075, 0x907B, 0x6076, 0xB6F1,
+ 0x6077, 0x907C, 0x6078, 0xE2FA, 0x6079, 0xE2FB, 0x607A, 0xE2FD,
+ 0x607B, 0xE2FC, 0x607C, 0xC4D5, 0x607D, 0xE3A2, 0x607E, 0x907D,
+ 0x607F, 0xD3C1, 0x6080, 0x907E, 0x6081, 0x9080, 0x6082, 0x9081,
+ 0x6083, 0xE3A7, 0x6084, 0xC7C4, 0x6085, 0x9082, 0x6086, 0x9083,
+ 0x6087, 0x9084, 0x6088, 0x9085, 0x6089, 0xCFA4, 0x608A, 0x9086,
+ 0x608B, 0x9087, 0x608C, 0xE3A9, 0x608D, 0xBAB7, 0x608E, 0x9088,
+ 0x608F, 0x9089, 0x6090, 0x908A, 0x6091, 0x908B, 0x6092, 0xE3A8,
+ 0x6093, 0x908C, 0x6094, 0xBBDA, 0x6095, 0x908D, 0x6096, 0xE3A3,
+ 0x6097, 0x908E, 0x6098, 0x908F, 0x6099, 0x9090, 0x609A, 0xE3A4,
+ 0x609B, 0xE3AA, 0x609C, 0x9091, 0x609D, 0xE3A6, 0x609E, 0x9092,
+ 0x609F, 0xCEF2, 0x60A0, 0xD3C6, 0x60A1, 0x9093, 0x60A2, 0x9094,
+ 0x60A3, 0xBBBC, 0x60A4, 0x9095, 0x60A5, 0x9096, 0x60A6, 0xD4C3,
+ 0x60A7, 0x9097, 0x60A8, 0xC4FA, 0x60A9, 0x9098, 0x60AA, 0x9099,
+ 0x60AB, 0xEDA8, 0x60AC, 0xD0FC, 0x60AD, 0xE3A5, 0x60AE, 0x909A,
+ 0x60AF, 0xC3F5, 0x60B0, 0x909B, 0x60B1, 0xE3AD, 0x60B2, 0xB1AF,
+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,
+ 0x60F7, 0x90C3, 0x60F8, 0x90C4, 0x60F9, 0xC8C7, 0x60FA, 0xD0CA,
+ 0x60FB, 0x90C5, 0x60FC, 0x90C6, 0x60FD, 0x90C7, 0x60FE, 0x90C8,
+ 0x60FF, 0x90C9, 0x6100, 0xE3B8, 0x6101, 0xB3EE, 0x6102, 0x90CA,
+ 0x6103, 0x90CB, 0x6104, 0x90CC, 0x6105, 0x90CD, 0x6106, 0xEDA9,
+ 0x6107, 0x90CE, 0x6108, 0xD3FA, 0x6109, 0xD3E4, 0x610A, 0x90CF,
+ 0x610B, 0x90D0, 0x610C, 0x90D1, 0x610D, 0xEDAA, 0x610E, 0xE3B9,
+ 0x610F, 0xD2E2, 0x6110, 0x90D2, 0x6111, 0x90D3, 0x6112, 0x90D4,
+ 0x6113, 0x90D5, 0x6114, 0x90D6, 0x6115, 0xE3B5, 0x6116, 0x90D7,
+ 0x6117, 0x90D8, 0x6118, 0x90D9, 0x6119, 0x90DA, 0x611A, 0xD3DE,
+ 0x611B, 0x90DB, 0x611C, 0x90DC, 0x611D, 0x90DD, 0x611E, 0x90DE,
+ 0x611F, 0xB8D0, 0x6120, 0xE3B3, 0x6121, 0x90DF, 0x6122, 0x90E0,
+ 0x6123, 0xE3B6, 0x6124, 0xB7DF, 0x6125, 0x90E1, 0x6126, 0xE3B4,
+ 0x6127, 0xC0A2, 0x6128, 0x90E2, 0x6129, 0x90E3, 0x612A, 0x90E4,
+ 0x612B, 0xE3BA, 0x612C, 0x90E5, 0x612D, 0x90E6, 0x612E, 0x90E7,
+ 0x612F, 0x90E8, 0x6130, 0x90E9, 0x6131, 0x90EA, 0x6132, 0x90EB,
+ 0x6133, 0x90EC, 0x6134, 0x90ED, 0x6135, 0x90EE, 0x6136, 0x90EF,
+ 0x6137, 0x90F0, 0x6138, 0x90F1, 0x6139, 0x90F2, 0x613A, 0x90F3,
+ 0x613B, 0x90F4, 0x613C, 0x90F5, 0x613D, 0x90F6, 0x613E, 0x90F7,
+ 0x613F, 0xD4B8, 0x6140, 0x90F8, 0x6141, 0x90F9, 0x6142, 0x90FA,
+ 0x6143, 0x90FB, 0x6144, 0x90FC, 0x6145, 0x90FD, 0x6146, 0x90FE,
+ 0x6147, 0x9140, 0x6148, 0xB4C8, 0x6149, 0x9141, 0x614A, 0xE3BB,
+ 0x614B, 0x9142, 0x614C, 0xBBC5, 0x614D, 0x9143, 0x614E, 0xC9F7,
+ 0x614F, 0x9144, 0x6150, 0x9145, 0x6151, 0xC9E5, 0x6152, 0x9146,
+ 0x6153, 0x9147, 0x6154, 0x9148, 0x6155, 0xC4BD, 0x6156, 0x9149,
+ 0x6157, 0x914A, 0x6158, 0x914B, 0x6159, 0x914C, 0x615A, 0x914D,
+ 0x615B, 0x914E, 0x615C, 0x914F, 0x615D, 0xEDAB, 0x615E, 0x9150,
+ 0x615F, 0x9151, 0x6160, 0x9152, 0x6161, 0x9153, 0x6162, 0xC2FD,
+ 0x6163, 0x9154, 0x6164, 0x9155, 0x6165, 0x9156, 0x6166, 0x9157,
+ 0x6167, 0xBBDB, 0x6168, 0xBFAE, 0x6169, 0x9158, 0x616A, 0x9159,
+ 0x616B, 0x915A, 0x616C, 0x915B, 0x616D, 0x915C, 0x616E, 0x915D,
+ 0x616F, 0x915E, 0x6170, 0xCEBF, 0x6171, 0x915F, 0x6172, 0x9160,
+ 0x6173, 0x9161, 0x6174, 0x9162, 0x6175, 0xE3BC, 0x6176, 0x9163,
+ 0x6177, 0xBFB6, 0x6178, 0x9164, 0x6179, 0x9165, 0x617A, 0x9166,
+ 0x617B, 0x9167, 0x617C, 0x9168, 0x617D, 0x9169, 0x617E, 0x916A,
+ 0x617F, 0x916B, 0x6180, 0x916C, 0x6181, 0x916D, 0x6182, 0x916E,
+ 0x6183, 0x916F, 0x6184, 0x9170, 0x6185, 0x9171, 0x6186, 0x9172,
+ 0x6187, 0x9173, 0x6188, 0x9174, 0x6189, 0x9175, 0x618A, 0x9176,
+ 0x618B, 0xB1EF, 0x618C, 0x9177, 0x618D, 0x9178, 0x618E, 0xD4F7,
+ 0x618F, 0x9179, 0x6190, 0x917A, 0x6191, 0x917B, 0x6192, 0x917C,
+ 0x6193, 0x917D, 0x6194, 0xE3BE, 0x6195, 0x917E, 0x6196, 0x9180,
+ 0x6197, 0x9181, 0x6198, 0x9182, 0x6199, 0x9183, 0x619A, 0x9184,
+ 0x619B, 0x9185, 0x619C, 0x9186, 0x619D, 0xEDAD, 0x619E, 0x9187,
+ 0x619F, 0x9188, 0x61A0, 0x9189, 0x61A1, 0x918A, 0x61A2, 0x918B,
+ 0x61A3, 0x918C, 0x61A4, 0x918D, 0x61A5, 0x918E, 0x61A6, 0x918F,
+ 0x61A7, 0xE3BF, 0x61A8, 0xBAA9, 0x61A9, 0xEDAC, 0x61AA, 0x9190,
+ 0x61AB, 0x9191, 0x61AC, 0xE3BD, 0x61AD, 0x9192, 0x61AE, 0x9193,
+ 0x61AF, 0x9194, 0x61B0, 0x9195, 0x61B1, 0x9196, 0x61B2, 0x9197,
+ 0x61B3, 0x9198, 0x61B4, 0x9199, 0x61B5, 0x919A, 0x61B6, 0x919B,
+ 0x61B7, 0xE3C0, 0x61B8, 0x919C, 0x61B9, 0x919D, 0x61BA, 0x919E,
+ 0x61BB, 0x919F, 0x61BC, 0x91A0, 0x61BD, 0x91A1, 0x61BE, 0xBAB6,
+ 0x61BF, 0x91A2, 0x61C0, 0x91A3, 0x61C1, 0x91A4, 0x61C2, 0xB6AE,
+ 0x61C3, 0x91A5, 0x61C4, 0x91A6, 0x61C5, 0x91A7, 0x61C6, 0x91A8,
+ 0x61C7, 0x91A9, 0x61C8, 0xD0B8, 0x61C9, 0x91AA, 0x61CA, 0xB0C3,
+ 0x61CB, 0xEDAE, 0x61CC, 0x91AB, 0x61CD, 0x91AC, 0x61CE, 0x91AD,
+ 0x61CF, 0x91AE, 0x61D0, 0x91AF, 0x61D1, 0xEDAF, 0x61D2, 0xC0C1,
+ 0x61D3, 0x91B0, 0x61D4, 0xE3C1, 0x61D5, 0x91B1, 0x61D6, 0x91B2,
+ 0x61D7, 0x91B3, 0x61D8, 0x91B4, 0x61D9, 0x91B5, 0x61DA, 0x91B6,
+ 0x61DB, 0x91B7, 0x61DC, 0x91B8, 0x61DD, 0x91B9, 0x61DE, 0x91BA,
+ 0x61DF, 0x91BB, 0x61E0, 0x91BC, 0x61E1, 0x91BD, 0x61E2, 0x91BE,
+ 0x61E3, 0x91BF, 0x61E4, 0x91C0, 0x61E5, 0x91C1, 0x61E6, 0xC5B3,
+ 0x61E7, 0x91C2, 0x61E8, 0x91C3, 0x61E9, 0x91C4, 0x61EA, 0x91C5,
+ 0x61EB, 0x91C6, 0x61EC, 0x91C7, 0x61ED, 0x91C8, 0x61EE, 0x91C9,
+ 0x61EF, 0x91CA, 0x61F0, 0x91CB, 0x61F1, 0x91CC, 0x61F2, 0x91CD,
+ 0x61F3, 0x91CE, 0x61F4, 0x91CF, 0x61F5, 0xE3C2, 0x61F6, 0x91D0,
+ 0x61F7, 0x91D1, 0x61F8, 0x91D2, 0x61F9, 0x91D3, 0x61FA, 0x91D4,
+ 0x61FB, 0x91D5, 0x61FC, 0x91D6, 0x61FD, 0x91D7, 0x61FE, 0x91D8,
+ 0x61FF, 0xDCB2, 0x6200, 0x91D9, 0x6201, 0x91DA, 0x6202, 0x91DB,
+ 0x6203, 0x91DC, 0x6204, 0x91DD, 0x6205, 0x91DE, 0x6206, 0xEDB0,
+ 0x6207, 0x91DF, 0x6208, 0xB8EA, 0x6209, 0x91E0, 0x620A, 0xCEEC,
+ 0x620B, 0xEAA7, 0x620C, 0xD0E7, 0x620D, 0xCAF9, 0x620E, 0xC8D6,
+ 0x620F, 0xCFB7, 0x6210, 0xB3C9, 0x6211, 0xCED2, 0x6212, 0xBDE4,
+ 0x6213, 0x91E1, 0x6214, 0x91E2, 0x6215, 0xE3DE, 0x6216, 0xBBF2,
+ 0x6217, 0xEAA8, 0x6218, 0xD5BD, 0x6219, 0x91E3, 0x621A, 0xC6DD,
+ 0x621B, 0xEAA9, 0x621C, 0x91E4, 0x621D, 0x91E5, 0x621E, 0x91E6,
+ 0x621F, 0xEAAA, 0x6220, 0x91E7, 0x6221, 0xEAAC, 0x6222, 0xEAAB,
+ 0x6223, 0x91E8, 0x6224, 0xEAAE, 0x6225, 0xEAAD, 0x6226, 0x91E9,
+ 0x6227, 0x91EA, 0x6228, 0x91EB, 0x6229, 0x91EC, 0x622A, 0xBDD8,
+ 0x622B, 0x91ED, 0x622C, 0xEAAF, 0x622D, 0x91EE, 0x622E, 0xC2BE,
+ 0x622F, 0x91EF, 0x6230, 0x91F0, 0x6231, 0x91F1, 0x6232, 0x91F2,
+ 0x6233, 0xB4C1, 0x6234, 0xB4F7, 0x6235, 0x91F3, 0x6236, 0x91F4,
+ 0x6237, 0xBBA7, 0x6238, 0x91F5, 0x6239, 0x91F6, 0x623A, 0x91F7,
+ 0x623B, 0x91F8, 0x623C, 0x91F9, 0x623D, 0xECE6, 0x623E, 0xECE5,
+ 0x623F, 0xB7BF, 0x6240, 0xCBF9, 0x6241, 0xB1E2, 0x6242, 0x91FA,
+ 0x6243, 0xECE7, 0x6244, 0x91FB, 0x6245, 0x91FC, 0x6246, 0x91FD,
+ 0x6247, 0xC9C8, 0x6248, 0xECE8, 0x6249, 0xECE9, 0x624A, 0x91FE,
+ 0x624B, 0xCAD6, 0x624C, 0xDED0, 0x624D, 0xB2C5, 0x624E, 0xD4FA,
+ 0x624F, 0x9240, 0x6250, 0x9241, 0x6251, 0xC6CB, 0x6252, 0xB0C7,
+ 0x6253, 0xB4F2, 0x6254, 0xC8D3, 0x6255, 0x9242, 0x6256, 0x9243,
+ 0x6257, 0x9244, 0x6258, 0xCDD0, 0x6259, 0x9245, 0x625A, 0x9246,
+ 0x625B, 0xBFB8, 0x625C, 0x9247, 0x625D, 0x9248, 0x625E, 0x9249,
+ 0x625F, 0x924A, 0x6260, 0x924B, 0x6261, 0x924C, 0x6262, 0x924D,
+ 0x6263, 0xBFDB, 0x6264, 0x924E, 0x6265, 0x924F, 0x6266, 0xC7A4,
+ 0x6267, 0xD6B4, 0x6268, 0x9250, 0x6269, 0xC0A9, 0x626A, 0xDED1,
+ 0x626B, 0xC9A8, 0x626C, 0xD1EF, 0x626D, 0xC5A4, 0x626E, 0xB0E7,
+ 0x626F, 0xB3B6, 0x6270, 0xC8C5, 0x6271, 0x9251, 0x6272, 0x9252,
+ 0x6273, 0xB0E2, 0x6274, 0x9253, 0x6275, 0x9254, 0x6276, 0xB7F6,
+ 0x6277, 0x9255, 0x6278, 0x9256, 0x6279, 0xC5FA, 0x627A, 0x9257,
+ 0x627B, 0x9258, 0x627C, 0xB6F3, 0x627D, 0x9259, 0x627E, 0xD5D2,
+ 0x627F, 0xB3D0, 0x6280, 0xBCBC, 0x6281, 0x925A, 0x6282, 0x925B,
+ 0x6283, 0x925C, 0x6284, 0xB3AD, 0x6285, 0x925D, 0x6286, 0x925E,
+ 0x6287, 0x925F, 0x6288, 0x9260, 0x6289, 0xBEF1, 0x628A, 0xB0D1,
+ 0x628B, 0x9261, 0x628C, 0x9262, 0x628D, 0x9263, 0x628E, 0x9264,
+ 0x628F, 0x9265, 0x6290, 0x9266, 0x6291, 0xD2D6, 0x6292, 0xCAE3,
+ 0x6293, 0xD7A5, 0x6294, 0x9267, 0x6295, 0xCDB6, 0x6296, 0xB6B6,
+ 0x6297, 0xBFB9, 0x6298, 0xD5DB, 0x6299, 0x9268, 0x629A, 0xB8A7,
+ 0x629B, 0xC5D7, 0x629C, 0x9269, 0x629D, 0x926A, 0x629E, 0x926B,
+ 0x629F, 0xDED2, 0x62A0, 0xBFD9, 0x62A1, 0xC2D5, 0x62A2, 0xC7C0,
+ 0x62A3, 0x926C, 0x62A4, 0xBBA4, 0x62A5, 0xB1A8, 0x62A6, 0x926D,
+ 0x62A7, 0x926E, 0x62A8, 0xC5EA, 0x62A9, 0x926F, 0x62AA, 0x9270,
+ 0x62AB, 0xC5FB, 0x62AC, 0xCCA7, 0x62AD, 0x9271, 0x62AE, 0x9272,
+ 0x62AF, 0x9273, 0x62B0, 0x9274, 0x62B1, 0xB1A7, 0x62B2, 0x9275,
+ 0x62B3, 0x9276, 0x62B4, 0x9277, 0x62B5, 0xB5D6, 0x62B6, 0x9278,
+ 0x62B7, 0x9279, 0x62B8, 0x927A, 0x62B9, 0xC4A8, 0x62BA, 0x927B,
+ 0x62BB, 0xDED3, 0x62BC, 0xD1BA, 0x62BD, 0xB3E9, 0x62BE, 0x927C,
+ 0x62BF, 0xC3F2, 0x62C0, 0x927D, 0x62C1, 0x927E, 0x62C2, 0xB7F7,
+ 0x62C3, 0x9280, 0x62C4, 0xD6F4, 0x62C5, 0xB5A3, 0x62C6, 0xB2F0,
+ 0x62C7, 0xC4B4, 0x62C8, 0xC4E9, 0x62C9, 0xC0AD, 0x62CA, 0xDED4,
+ 0x62CB, 0x9281, 0x62CC, 0xB0E8, 0x62CD, 0xC5C4, 0x62CE, 0xC1E0,
+ 0x62CF, 0x9282, 0x62D0, 0xB9D5, 0x62D1, 0x9283, 0x62D2, 0xBEDC,
+ 0x62D3, 0xCDD8, 0x62D4, 0xB0CE, 0x62D5, 0x9284, 0x62D6, 0xCDCF,
+ 0x62D7, 0xDED6, 0x62D8, 0xBED0, 0x62D9, 0xD7BE, 0x62DA, 0xDED5,
+ 0x62DB, 0xD5D0, 0x62DC, 0xB0DD, 0x62DD, 0x9285, 0x62DE, 0x9286,
+ 0x62DF, 0xC4E2, 0x62E0, 0x9287, 0x62E1, 0x9288, 0x62E2, 0xC2A3,
+ 0x62E3, 0xBCF0, 0x62E4, 0x9289, 0x62E5, 0xD3B5, 0x62E6, 0xC0B9,
+ 0x62E7, 0xC5A1, 0x62E8, 0xB2A6, 0x62E9, 0xD4F1, 0x62EA, 0x928A,
+ 0x62EB, 0x928B, 0x62EC, 0xC0A8, 0x62ED, 0xCAC3, 0x62EE, 0xDED7,
+ 0x62EF, 0xD5FC, 0x62F0, 0x928C, 0x62F1, 0xB9B0, 0x62F2, 0x928D,
+ 0x62F3, 0xC8AD, 0x62F4, 0xCBA9, 0x62F5, 0x928E, 0x62F6, 0xDED9,
+ 0x62F7, 0xBFBD, 0x62F8, 0x928F, 0x62F9, 0x9290, 0x62FA, 0x9291,
+ 0x62FB, 0x9292, 0x62FC, 0xC6B4, 0x62FD, 0xD7A7, 0x62FE, 0xCAB0,
+ 0x62FF, 0xC4C3, 0x6300, 0x9293, 0x6301, 0xB3D6, 0x6302, 0xB9D2,
+ 0x6303, 0x9294, 0x6304, 0x9295, 0x6305, 0x9296, 0x6306, 0x9297,
+ 0x6307, 0xD6B8, 0x6308, 0xEAFC, 0x6309, 0xB0B4, 0x630A, 0x9298,
+ 0x630B, 0x9299, 0x630C, 0x929A, 0x630D, 0x929B, 0x630E, 0xBFE6,
+ 0x630F, 0x929C, 0x6310, 0x929D, 0x6311, 0xCCF4, 0x6312, 0x929E,
+ 0x6313, 0x929F, 0x6314, 0x92A0, 0x6315, 0x92A1, 0x6316, 0xCDDA,
+ 0x6317, 0x92A2, 0x6318, 0x92A3, 0x6319, 0x92A4, 0x631A, 0xD6BF,
+ 0x631B, 0xC2CE, 0x631C, 0x92A5, 0x631D, 0xCECE, 0x631E, 0xCCA2,
+ 0x631F, 0xD0AE, 0x6320, 0xC4D3, 0x6321, 0xB5B2, 0x6322, 0xDED8,
+ 0x6323, 0xD5F5, 0x6324, 0xBCB7, 0x6325, 0xBBD3, 0x6326, 0x92A6,
+ 0x6327, 0x92A7, 0x6328, 0xB0A4, 0x6329, 0x92A8, 0x632A, 0xC5B2,
+ 0x632B, 0xB4EC, 0x632C, 0x92A9, 0x632D, 0x92AA, 0x632E, 0x92AB,
+ 0x632F, 0xD5F1, 0x6330, 0x92AC, 0x6331, 0x92AD, 0x6332, 0xEAFD,
+ 0x6333, 0x92AE, 0x6334, 0x92AF, 0x6335, 0x92B0, 0x6336, 0x92B1,
+ 0x6337, 0x92B2, 0x6338, 0x92B3, 0x6339, 0xDEDA, 0x633A, 0xCDA6,
+ 0x633B, 0x92B4, 0x633C, 0x92B5, 0x633D, 0xCDEC, 0x633E, 0x92B6,
+ 0x633F, 0x92B7, 0x6340, 0x92B8, 0x6341, 0x92B9, 0x6342, 0xCEE6,
+ 0x6343, 0xDEDC, 0x6344, 0x92BA, 0x6345, 0xCDB1, 0x6346, 0xC0A6,
+ 0x6347, 0x92BB, 0x6348, 0x92BC, 0x6349, 0xD7BD, 0x634A, 0x92BD,
+ 0x634B, 0xDEDB, 0x634C, 0xB0C6, 0x634D, 0xBAB4, 0x634E, 0xC9D3,
+ 0x634F, 0xC4F3, 0x6350, 0xBEE8, 0x6351, 0x92BE, 0x6352, 0x92BF,
+ 0x6353, 0x92C0, 0x6354, 0x92C1, 0x6355, 0xB2B6, 0x6356, 0x92C2,
+ 0x6357, 0x92C3, 0x6358, 0x92C4, 0x6359, 0x92C5, 0x635A, 0x92C6,
+ 0x635B, 0x92C7, 0x635C, 0x92C8, 0x635D, 0x92C9, 0x635E, 0xC0CC,
+ 0x635F, 0xCBF0, 0x6360, 0x92CA, 0x6361, 0xBCF1, 0x6362, 0xBBBB,
+ 0x6363, 0xB5B7, 0x6364, 0x92CB, 0x6365, 0x92CC, 0x6366, 0x92CD,
+ 0x6367, 0xC5F5, 0x6368, 0x92CE, 0x6369, 0xDEE6, 0x636A, 0x92CF,
+ 0x636B, 0x92D0, 0x636C, 0x92D1, 0x636D, 0xDEE3, 0x636E, 0xBEDD,
+ 0x636F, 0x92D2, 0x6370, 0x92D3, 0x6371, 0xDEDF, 0x6372, 0x92D4,
+ 0x6373, 0x92D5, 0x6374, 0x92D6, 0x6375, 0x92D7, 0x6376, 0xB4B7,
+ 0x6377, 0xBDDD, 0x6378, 0x92D8, 0x6379, 0x92D9, 0x637A, 0xDEE0,
+ 0x637B, 0xC4ED, 0x637C, 0x92DA, 0x637D, 0x92DB, 0x637E, 0x92DC,
+ 0x637F, 0x92DD, 0x6380, 0xCFC6, 0x6381, 0x92DE, 0x6382, 0xB5E0,
+ 0x6383, 0x92DF, 0x6384, 0x92E0, 0x6385, 0x92E1, 0x6386, 0x92E2,
+ 0x6387, 0xB6DE, 0x6388, 0xCADA, 0x6389, 0xB5F4, 0x638A, 0xDEE5,
+ 0x638B, 0x92E3, 0x638C, 0xD5C6, 0x638D, 0x92E4, 0x638E, 0xDEE1,
+ 0x638F, 0xCCCD, 0x6390, 0xC6FE, 0x6391, 0x92E5, 0x6392, 0xC5C5,
+ 0x6393, 0x92E6, 0x6394, 0x92E7, 0x6395, 0x92E8, 0x6396, 0xD2B4,
+ 0x6397, 0x92E9, 0x6398, 0xBEF2, 0x6399, 0x92EA, 0x639A, 0x92EB,
+ 0x639B, 0x92EC, 0x639C, 0x92ED, 0x639D, 0x92EE, 0x639E, 0x92EF,
+ 0x639F, 0x92F0, 0x63A0, 0xC2D3, 0x63A1, 0x92F1, 0x63A2, 0xCCBD,
+ 0x63A3, 0xB3B8, 0x63A4, 0x92F2, 0x63A5, 0xBDD3, 0x63A6, 0x92F3,
+ 0x63A7, 0xBFD8, 0x63A8, 0xCDC6, 0x63A9, 0xD1DA, 0x63AA, 0xB4EB,
+ 0x63AB, 0x92F4, 0x63AC, 0xDEE4, 0x63AD, 0xDEDD, 0x63AE, 0xDEE7,
+ 0x63AF, 0x92F5, 0x63B0, 0xEAFE, 0x63B1, 0x92F6, 0x63B2, 0x92F7,
+ 0x63B3, 0xC2B0, 0x63B4, 0xDEE2, 0x63B5, 0x92F8, 0x63B6, 0x92F9,
+ 0x63B7, 0xD6C0, 0x63B8, 0xB5A7, 0x63B9, 0x92FA, 0x63BA, 0xB2F4,
+ 0x63BB, 0x92FB, 0x63BC, 0xDEE8, 0x63BD, 0x92FC, 0x63BE, 0xDEF2,
+ 0x63BF, 0x92FD, 0x63C0, 0x92FE, 0x63C1, 0x9340, 0x63C2, 0x9341,
+ 0x63C3, 0x9342, 0x63C4, 0xDEED, 0x63C5, 0x9343, 0x63C6, 0xDEF1,
+ 0x63C7, 0x9344, 0x63C8, 0x9345, 0x63C9, 0xC8E0, 0x63CA, 0x9346,
+ 0x63CB, 0x9347, 0x63CC, 0x9348, 0x63CD, 0xD7E1, 0x63CE, 0xDEEF,
+ 0x63CF, 0xC3E8, 0x63D0, 0xCCE1, 0x63D1, 0x9349, 0x63D2, 0xB2E5,
+ 0x63D3, 0x934A, 0x63D4, 0x934B, 0x63D5, 0x934C, 0x63D6, 0xD2BE,
+ 0x63D7, 0x934D, 0x63D8, 0x934E, 0x63D9, 0x934F, 0x63DA, 0x9350,
+ 0x63DB, 0x9351, 0x63DC, 0x9352, 0x63DD, 0x9353, 0x63DE, 0xDEEE,
+ 0x63DF, 0x9354, 0x63E0, 0xDEEB, 0x63E1, 0xCED5, 0x63E2, 0x9355,
+ 0x63E3, 0xB4A7, 0x63E4, 0x9356, 0x63E5, 0x9357, 0x63E6, 0x9358,
+ 0x63E7, 0x9359, 0x63E8, 0x935A, 0x63E9, 0xBFAB, 0x63EA, 0xBEBE,
+ 0x63EB, 0x935B, 0x63EC, 0x935C, 0x63ED, 0xBDD2, 0x63EE, 0x935D,
+ 0x63EF, 0x935E, 0x63F0, 0x935F, 0x63F1, 0x9360, 0x63F2, 0xDEE9,
+ 0x63F3, 0x9361, 0x63F4, 0xD4AE, 0x63F5, 0x9362, 0x63F6, 0xDEDE,
+ 0x63F7, 0x9363, 0x63F8, 0xDEEA, 0x63F9, 0x9364, 0x63FA, 0x9365,
+ 0x63FB, 0x9366, 0x63FC, 0x9367, 0x63FD, 0xC0BF, 0x63FE, 0x9368,
+ 0x63FF, 0xDEEC, 0x6400, 0xB2F3, 0x6401, 0xB8E9, 0x6402, 0xC2A7,
+ 0x6403, 0x9369, 0x6404, 0x936A, 0x6405, 0xBDC1, 0x6406, 0x936B,
+ 0x6407, 0x936C, 0x6408, 0x936D, 0x6409, 0x936E, 0x640A, 0x936F,
+ 0x640B, 0xDEF5, 0x640C, 0xDEF8, 0x640D, 0x9370, 0x640E, 0x9371,
+ 0x640F, 0xB2AB, 0x6410, 0xB4A4, 0x6411, 0x9372, 0x6412, 0x9373,
+ 0x6413, 0xB4EA, 0x6414, 0xC9A6, 0x6415, 0x9374, 0x6416, 0x9375,
+ 0x6417, 0x9376, 0x6418, 0x9377, 0x6419, 0x9378, 0x641A, 0x9379,
+ 0x641B, 0xDEF6, 0x641C, 0xCBD1, 0x641D, 0x937A, 0x641E, 0xB8E3,
+ 0x641F, 0x937B, 0x6420, 0xDEF7, 0x6421, 0xDEFA, 0x6422, 0x937C,
+ 0x6423, 0x937D, 0x6424, 0x937E, 0x6425, 0x9380, 0x6426, 0xDEF9,
+ 0x6427, 0x9381, 0x6428, 0x9382, 0x6429, 0x9383, 0x642A, 0xCCC2,
+ 0x642B, 0x9384, 0x642C, 0xB0E1, 0x642D, 0xB4EE, 0x642E, 0x9385,
+ 0x642F, 0x9386, 0x6430, 0x9387, 0x6431, 0x9388, 0x6432, 0x9389,
+ 0x6433, 0x938A, 0x6434, 0xE5BA, 0x6435, 0x938B, 0x6436, 0x938C,
+ 0x6437, 0x938D, 0x6438, 0x938E, 0x6439, 0x938F, 0x643A, 0xD0AF,
+ 0x643B, 0x9390, 0x643C, 0x9391, 0x643D, 0xB2EB, 0x643E, 0x9392,
+ 0x643F, 0xEBA1, 0x6440, 0x9393, 0x6441, 0xDEF4, 0x6442, 0x9394,
+ 0x6443, 0x9395, 0x6444, 0xC9E3, 0x6445, 0xDEF3, 0x6446, 0xB0DA,
+ 0x6447, 0xD2A1, 0x6448, 0xB1F7, 0x6449, 0x9396, 0x644A, 0xCCAF,
+ 0x644B, 0x9397, 0x644C, 0x9398, 0x644D, 0x9399, 0x644E, 0x939A,
+ 0x644F, 0x939B, 0x6450, 0x939C, 0x6451, 0x939D, 0x6452, 0xDEF0,
+ 0x6453, 0x939E, 0x6454, 0xCBA4, 0x6455, 0x939F, 0x6456, 0x93A0,
+ 0x6457, 0x93A1, 0x6458, 0xD5AA, 0x6459, 0x93A2, 0x645A, 0x93A3,
+ 0x645B, 0x93A4, 0x645C, 0x93A5, 0x645D, 0x93A6, 0x645E, 0xDEFB,
+ 0x645F, 0x93A7, 0x6460, 0x93A8, 0x6461, 0x93A9, 0x6462, 0x93AA,
+ 0x6463, 0x93AB, 0x6464, 0x93AC, 0x6465, 0x93AD, 0x6466, 0x93AE,
+ 0x6467, 0xB4DD, 0x6468, 0x93AF, 0x6469, 0xC4A6, 0x646A, 0x93B0,
+ 0x646B, 0x93B1, 0x646C, 0x93B2, 0x646D, 0xDEFD, 0x646E, 0x93B3,
+ 0x646F, 0x93B4, 0x6470, 0x93B5, 0x6471, 0x93B6, 0x6472, 0x93B7,
+ 0x6473, 0x93B8, 0x6474, 0x93B9, 0x6475, 0x93BA, 0x6476, 0x93BB,
+ 0x6477, 0x93BC, 0x6478, 0xC3FE, 0x6479, 0xC4A1, 0x647A, 0xDFA1,
+ 0x647B, 0x93BD, 0x647C, 0x93BE, 0x647D, 0x93BF, 0x647E, 0x93C0,
+ 0x647F, 0x93C1, 0x6480, 0x93C2, 0x6481, 0x93C3, 0x6482, 0xC1CC,
+ 0x6483, 0x93C4, 0x6484, 0xDEFC, 0x6485, 0xBEEF, 0x6486, 0x93C5,
+ 0x6487, 0xC6B2, 0x6488, 0x93C6, 0x6489, 0x93C7, 0x648A, 0x93C8,
+ 0x648B, 0x93C9, 0x648C, 0x93CA, 0x648D, 0x93CB, 0x648E, 0x93CC,
+ 0x648F, 0x93CD, 0x6490, 0x93CE, 0x6491, 0xB3C5, 0x6492, 0xC8F6,
+ 0x6493, 0x93CF, 0x6494, 0x93D0, 0x6495, 0xCBBA, 0x6496, 0xDEFE,
+ 0x6497, 0x93D1, 0x6498, 0x93D2, 0x6499, 0xDFA4, 0x649A, 0x93D3,
+ 0x649B, 0x93D4, 0x649C, 0x93D5, 0x649D, 0x93D6, 0x649E, 0xD7B2,
+ 0x649F, 0x93D7, 0x64A0, 0x93D8, 0x64A1, 0x93D9, 0x64A2, 0x93DA,
+ 0x64A3, 0x93DB, 0x64A4, 0xB3B7, 0x64A5, 0x93DC, 0x64A6, 0x93DD,
+ 0x64A7, 0x93DE, 0x64A8, 0x93DF, 0x64A9, 0xC1C3, 0x64AA, 0x93E0,
+ 0x64AB, 0x93E1, 0x64AC, 0xC7CB, 0x64AD, 0xB2A5, 0x64AE, 0xB4E9,
+ 0x64AF, 0x93E2, 0x64B0, 0xD7AB, 0x64B1, 0x93E3, 0x64B2, 0x93E4,
+ 0x64B3, 0x93E5, 0x64B4, 0x93E6, 0x64B5, 0xC4EC, 0x64B6, 0x93E7,
+ 0x64B7, 0xDFA2, 0x64B8, 0xDFA3, 0x64B9, 0x93E8, 0x64BA, 0xDFA5,
+ 0x64BB, 0x93E9, 0x64BC, 0xBAB3, 0x64BD, 0x93EA, 0x64BE, 0x93EB,
+ 0x64BF, 0x93EC, 0x64C0, 0xDFA6, 0x64C1, 0x93ED, 0x64C2, 0xC0DE,
+ 0x64C3, 0x93EE, 0x64C4, 0x93EF, 0x64C5, 0xC9C3, 0x64C6, 0x93F0,
+ 0x64C7, 0x93F1, 0x64C8, 0x93F2, 0x64C9, 0x93F3, 0x64CA, 0x93F4,
+ 0x64CB, 0x93F5, 0x64CC, 0x93F6, 0x64CD, 0xB2D9, 0x64CE, 0xC7E6,
+ 0x64CF, 0x93F7, 0x64D0, 0xDFA7, 0x64D1, 0x93F8, 0x64D2, 0xC7DC,
+ 0x64D3, 0x93F9, 0x64D4, 0x93FA, 0x64D5, 0x93FB, 0x64D6, 0x93FC,
+ 0x64D7, 0xDFA8, 0x64D8, 0xEBA2, 0x64D9, 0x93FD, 0x64DA, 0x93FE,
+ 0x64DB, 0x9440, 0x64DC, 0x9441, 0x64DD, 0x9442, 0x64DE, 0xCBD3,
+ 0x64DF, 0x9443, 0x64E0, 0x9444, 0x64E1, 0x9445, 0x64E2, 0xDFAA,
+ 0x64E3, 0x9446, 0x64E4, 0xDFA9, 0x64E5, 0x9447, 0x64E6, 0xB2C1,
+ 0x64E7, 0x9448, 0x64E8, 0x9449, 0x64E9, 0x944A, 0x64EA, 0x944B,
+ 0x64EB, 0x944C, 0x64EC, 0x944D, 0x64ED, 0x944E, 0x64EE, 0x944F,
+ 0x64EF, 0x9450, 0x64F0, 0x9451, 0x64F1, 0x9452, 0x64F2, 0x9453,
+ 0x64F3, 0x9454, 0x64F4, 0x9455, 0x64F5, 0x9456, 0x64F6, 0x9457,
+ 0x64F7, 0x9458, 0x64F8, 0x9459, 0x64F9, 0x945A, 0x64FA, 0x945B,
+ 0x64FB, 0x945C, 0x64FC, 0x945D, 0x64FD, 0x945E, 0x64FE, 0x945F,
+ 0x64FF, 0x9460, 0x6500, 0xC5CA, 0x6501, 0x9461, 0x6502, 0x9462,
+ 0x6503, 0x9463, 0x6504, 0x9464, 0x6505, 0x9465, 0x6506, 0x9466,
+ 0x6507, 0x9467, 0x6508, 0x9468, 0x6509, 0xDFAB, 0x650A, 0x9469,
+ 0x650B, 0x946A, 0x650C, 0x946B, 0x650D, 0x946C, 0x650E, 0x946D,
+ 0x650F, 0x946E, 0x6510, 0x946F, 0x6511, 0x9470, 0x6512, 0xD4DC,
+ 0x6513, 0x9471, 0x6514, 0x9472, 0x6515, 0x9473, 0x6516, 0x9474,
+ 0x6517, 0x9475, 0x6518, 0xC8C1, 0x6519, 0x9476, 0x651A, 0x9477,
+ 0x651B, 0x9478, 0x651C, 0x9479, 0x651D, 0x947A, 0x651E, 0x947B,
+ 0x651F, 0x947C, 0x6520, 0x947D, 0x6521, 0x947E, 0x6522, 0x9480,
+ 0x6523, 0x9481, 0x6524, 0x9482, 0x6525, 0xDFAC, 0x6526, 0x9483,
+ 0x6527, 0x9484, 0x6528, 0x9485, 0x6529, 0x9486, 0x652A, 0x9487,
+ 0x652B, 0xBEF0, 0x652C, 0x9488, 0x652D, 0x9489, 0x652E, 0xDFAD,
+ 0x652F, 0xD6A7, 0x6530, 0x948A, 0x6531, 0x948B, 0x6532, 0x948C,
+ 0x6533, 0x948D, 0x6534, 0xEAB7, 0x6535, 0xEBB6, 0x6536, 0xCAD5,
+ 0x6537, 0x948E, 0x6538, 0xD8FC, 0x6539, 0xB8C4, 0x653A, 0x948F,
+ 0x653B, 0xB9A5, 0x653C, 0x9490, 0x653D, 0x9491, 0x653E, 0xB7C5,
+ 0x653F, 0xD5FE, 0x6540, 0x9492, 0x6541, 0x9493, 0x6542, 0x9494,
+ 0x6543, 0x9495, 0x6544, 0x9496, 0x6545, 0xB9CA, 0x6546, 0x9497,
+ 0x6547, 0x9498, 0x6548, 0xD0A7, 0x6549, 0xF4CD, 0x654A, 0x9499,
+ 0x654B, 0x949A, 0x654C, 0xB5D0, 0x654D, 0x949B, 0x654E, 0x949C,
+ 0x654F, 0xC3F4, 0x6550, 0x949D, 0x6551, 0xBEC8, 0x6552, 0x949E,
+ 0x6553, 0x949F, 0x6554, 0x94A0, 0x6555, 0xEBB7, 0x6556, 0xB0BD,
+ 0x6557, 0x94A1, 0x6558, 0x94A2, 0x6559, 0xBDCC, 0x655A, 0x94A3,
+ 0x655B, 0xC1B2, 0x655C, 0x94A4, 0x655D, 0xB1D6, 0x655E, 0xB3A8,
+ 0x655F, 0x94A5, 0x6560, 0x94A6, 0x6561, 0x94A7, 0x6562, 0xB8D2,
+ 0x6563, 0xC9A2, 0x6564, 0x94A8, 0x6565, 0x94A9, 0x6566, 0xB6D8,
+ 0x6567, 0x94AA, 0x6568, 0x94AB, 0x6569, 0x94AC, 0x656A, 0x94AD,
+ 0x656B, 0xEBB8, 0x656C, 0xBEB4, 0x656D, 0x94AE, 0x656E, 0x94AF,
+ 0x656F, 0x94B0, 0x6570, 0xCAFD, 0x6571, 0x94B1, 0x6572, 0xC7C3,
+ 0x6573, 0x94B2, 0x6574, 0xD5FB, 0x6575, 0x94B3, 0x6576, 0x94B4,
+ 0x6577, 0xB7F3, 0x6578, 0x94B5, 0x6579, 0x94B6, 0x657A, 0x94B7,
+ 0x657B, 0x94B8, 0x657C, 0x94B9, 0x657D, 0x94BA, 0x657E, 0x94BB,
+ 0x657F, 0x94BC, 0x6580, 0x94BD, 0x6581, 0x94BE, 0x6582, 0x94BF,
+ 0x6583, 0x94C0, 0x6584, 0x94C1, 0x6585, 0x94C2, 0x6586, 0x94C3,
+ 0x6587, 0xCEC4, 0x6588, 0x94C4, 0x6589, 0x94C5, 0x658A, 0x94C6,
+ 0x658B, 0xD5AB, 0x658C, 0xB1F3, 0x658D, 0x94C7, 0x658E, 0x94C8,
+ 0x658F, 0x94C9, 0x6590, 0xECB3, 0x6591, 0xB0DF, 0x6592, 0x94CA,
+ 0x6593, 0xECB5, 0x6594, 0x94CB, 0x6595, 0x94CC, 0x6596, 0x94CD,
+ 0x6597, 0xB6B7, 0x6598, 0x94CE, 0x6599, 0xC1CF, 0x659A, 0x94CF,
+ 0x659B, 0xF5FA, 0x659C, 0xD0B1, 0x659D, 0x94D0, 0x659E, 0x94D1,
+ 0x659F, 0xD5E5, 0x65A0, 0x94D2, 0x65A1, 0xCED3, 0x65A2, 0x94D3,
+ 0x65A3, 0x94D4, 0x65A4, 0xBDEF, 0x65A5, 0xB3E2, 0x65A6, 0x94D5,
+ 0x65A7, 0xB8AB, 0x65A8, 0x94D6, 0x65A9, 0xD5B6, 0x65AA, 0x94D7,
+ 0x65AB, 0xEDBD, 0x65AC, 0x94D8, 0x65AD, 0xB6CF, 0x65AE, 0x94D9,
+ 0x65AF, 0xCBB9, 0x65B0, 0xD0C2, 0x65B1, 0x94DA, 0x65B2, 0x94DB,
+ 0x65B3, 0x94DC, 0x65B4, 0x94DD, 0x65B5, 0x94DE, 0x65B6, 0x94DF,
+ 0x65B7, 0x94E0, 0x65B8, 0x94E1, 0x65B9, 0xB7BD, 0x65BA, 0x94E2,
+ 0x65BB, 0x94E3, 0x65BC, 0xECB6, 0x65BD, 0xCAA9, 0x65BE, 0x94E4,
+ 0x65BF, 0x94E5, 0x65C0, 0x94E6, 0x65C1, 0xC5D4, 0x65C2, 0x94E7,
+ 0x65C3, 0xECB9, 0x65C4, 0xECB8, 0x65C5, 0xC2C3, 0x65C6, 0xECB7,
+ 0x65C7, 0x94E8, 0x65C8, 0x94E9, 0x65C9, 0x94EA, 0x65CA, 0x94EB,
+ 0x65CB, 0xD0FD, 0x65CC, 0xECBA, 0x65CD, 0x94EC, 0x65CE, 0xECBB,
+ 0x65CF, 0xD7E5, 0x65D0, 0x94ED, 0x65D1, 0x94EE, 0x65D2, 0xECBC,
+ 0x65D3, 0x94EF, 0x65D4, 0x94F0, 0x65D5, 0x94F1, 0x65D6, 0xECBD,
+ 0x65D7, 0xC6EC, 0x65D8, 0x94F2, 0x65D9, 0x94F3, 0x65DA, 0x94F4,
+ 0x65DB, 0x94F5, 0x65DC, 0x94F6, 0x65DD, 0x94F7, 0x65DE, 0x94F8,
+ 0x65DF, 0x94F9, 0x65E0, 0xCEDE, 0x65E1, 0x94FA, 0x65E2, 0xBCC8,
+ 0x65E3, 0x94FB, 0x65E4, 0x94FC, 0x65E5, 0xC8D5, 0x65E6, 0xB5A9,
+ 0x65E7, 0xBEC9, 0x65E8, 0xD6BC, 0x65E9, 0xD4E7, 0x65EA, 0x94FD,
+ 0x65EB, 0x94FE, 0x65EC, 0xD1AE, 0x65ED, 0xD0F1, 0x65EE, 0xEAB8,
+ 0x65EF, 0xEAB9, 0x65F0, 0xEABA, 0x65F1, 0xBAB5, 0x65F2, 0x9540,
+ 0x65F3, 0x9541, 0x65F4, 0x9542, 0x65F5, 0x9543, 0x65F6, 0xCAB1,
+ 0x65F7, 0xBFF5, 0x65F8, 0x9544, 0x65F9, 0x9545, 0x65FA, 0xCDFA,
+ 0x65FB, 0x9546, 0x65FC, 0x9547, 0x65FD, 0x9548, 0x65FE, 0x9549,
+ 0x65FF, 0x954A, 0x6600, 0xEAC0, 0x6601, 0x954B, 0x6602, 0xB0BA,
+ 0x6603, 0xEABE, 0x6604, 0x954C, 0x6605, 0x954D, 0x6606, 0xC0A5,
+ 0x6607, 0x954E, 0x6608, 0x954F, 0x6609, 0x9550, 0x660A, 0xEABB,
+ 0x660B, 0x9551, 0x660C, 0xB2FD, 0x660D, 0x9552, 0x660E, 0xC3F7,
+ 0x660F, 0xBBE8, 0x6610, 0x9553, 0x6611, 0x9554, 0x6612, 0x9555,
+ 0x6613, 0xD2D7, 0x6614, 0xCEF4, 0x6615, 0xEABF, 0x6616, 0x9556,
+ 0x6617, 0x9557, 0x6618, 0x9558, 0x6619, 0xEABC, 0x661A, 0x9559,
+ 0x661B, 0x955A, 0x661C, 0x955B, 0x661D, 0xEAC3, 0x661E, 0x955C,
+ 0x661F, 0xD0C7, 0x6620, 0xD3B3, 0x6621, 0x955D, 0x6622, 0x955E,
+ 0x6623, 0x955F, 0x6624, 0x9560, 0x6625, 0xB4BA, 0x6626, 0x9561,
+ 0x6627, 0xC3C1, 0x6628, 0xD7F2, 0x6629, 0x9562, 0x662A, 0x9563,
+ 0x662B, 0x9564, 0x662C, 0x9565, 0x662D, 0xD5D1, 0x662E, 0x9566,
+ 0x662F, 0xCAC7, 0x6630, 0x9567, 0x6631, 0xEAC5, 0x6632, 0x9568,
+ 0x6633, 0x9569, 0x6634, 0xEAC4, 0x6635, 0xEAC7, 0x6636, 0xEAC6,
+ 0x6637, 0x956A, 0x6638, 0x956B, 0x6639, 0x956C, 0x663A, 0x956D,
+ 0x663B, 0x956E, 0x663C, 0xD6E7, 0x663D, 0x956F, 0x663E, 0xCFD4,
+ 0x663F, 0x9570, 0x6640, 0x9571, 0x6641, 0xEACB, 0x6642, 0x9572,
+ 0x6643, 0xBBCE, 0x6644, 0x9573, 0x6645, 0x9574, 0x6646, 0x9575,
+ 0x6647, 0x9576, 0x6648, 0x9577, 0x6649, 0x9578, 0x664A, 0x9579,
+ 0x664B, 0xBDFA, 0x664C, 0xC9CE, 0x664D, 0x957A, 0x664E, 0x957B,
+ 0x664F, 0xEACC, 0x6650, 0x957C, 0x6651, 0x957D, 0x6652, 0xC9B9,
+ 0x6653, 0xCFFE, 0x6654, 0xEACA, 0x6655, 0xD4CE, 0x6656, 0xEACD,
+ 0x6657, 0xEACF, 0x6658, 0x957E, 0x6659, 0x9580, 0x665A, 0xCDED,
+ 0x665B, 0x9581, 0x665C, 0x9582, 0x665D, 0x9583, 0x665E, 0x9584,
+ 0x665F, 0xEAC9, 0x6660, 0x9585, 0x6661, 0xEACE, 0x6662, 0x9586,
+ 0x6663, 0x9587, 0x6664, 0xCEEE, 0x6665, 0x9588, 0x6666, 0xBBDE,
+ 0x6667, 0x9589, 0x6668, 0xB3BF, 0x6669, 0x958A, 0x666A, 0x958B,
+ 0x666B, 0x958C, 0x666C, 0x958D, 0x666D, 0x958E, 0x666E, 0xC6D5,
+ 0x666F, 0xBEB0, 0x6670, 0xCEFA, 0x6671, 0x958F, 0x6672, 0x9590,
+ 0x6673, 0x9591, 0x6674, 0xC7E7, 0x6675, 0x9592, 0x6676, 0xBEA7,
+ 0x6677, 0xEAD0, 0x6678, 0x9593, 0x6679, 0x9594, 0x667A, 0xD6C7,
+ 0x667B, 0x9595, 0x667C, 0x9596, 0x667D, 0x9597, 0x667E, 0xC1C0,
+ 0x667F, 0x9598, 0x6680, 0x9599, 0x6681, 0x959A, 0x6682, 0xD4DD,
+ 0x6683, 0x959B, 0x6684, 0xEAD1, 0x6685, 0x959C, 0x6686, 0x959D,
+ 0x6687, 0xCFBE, 0x6688, 0x959E, 0x6689, 0x959F, 0x668A, 0x95A0,
+ 0x668B, 0x95A1, 0x668C, 0xEAD2, 0x668D, 0x95A2, 0x668E, 0x95A3,
+ 0x668F, 0x95A4, 0x6690, 0x95A5, 0x6691, 0xCAEE, 0x6692, 0x95A6,
+ 0x6693, 0x95A7, 0x6694, 0x95A8, 0x6695, 0x95A9, 0x6696, 0xC5AF,
+ 0x6697, 0xB0B5, 0x6698, 0x95AA, 0x6699, 0x95AB, 0x669A, 0x95AC,
+ 0x669B, 0x95AD, 0x669C, 0x95AE, 0x669D, 0xEAD4, 0x669E, 0x95AF,
+ 0x669F, 0x95B0, 0x66A0, 0x95B1, 0x66A1, 0x95B2, 0x66A2, 0x95B3,
+ 0x66A3, 0x95B4, 0x66A4, 0x95B5, 0x66A5, 0x95B6, 0x66A6, 0x95B7,
+ 0x66A7, 0xEAD3, 0x66A8, 0xF4DF, 0x66A9, 0x95B8, 0x66AA, 0x95B9,
+ 0x66AB, 0x95BA, 0x66AC, 0x95BB, 0x66AD, 0x95BC, 0x66AE, 0xC4BA,
+ 0x66AF, 0x95BD, 0x66B0, 0x95BE, 0x66B1, 0x95BF, 0x66B2, 0x95C0,
+ 0x66B3, 0x95C1, 0x66B4, 0xB1A9, 0x66B5, 0x95C2, 0x66B6, 0x95C3,
+ 0x66B7, 0x95C4, 0x66B8, 0x95C5, 0x66B9, 0xE5DF, 0x66BA, 0x95C6,
+ 0x66BB, 0x95C7, 0x66BC, 0x95C8, 0x66BD, 0x95C9, 0x66BE, 0xEAD5,
+ 0x66BF, 0x95CA, 0x66C0, 0x95CB, 0x66C1, 0x95CC, 0x66C2, 0x95CD,
+ 0x66C3, 0x95CE, 0x66C4, 0x95CF, 0x66C5, 0x95D0, 0x66C6, 0x95D1,
+ 0x66C7, 0x95D2, 0x66C8, 0x95D3, 0x66C9, 0x95D4, 0x66CA, 0x95D5,
+ 0x66CB, 0x95D6, 0x66CC, 0x95D7, 0x66CD, 0x95D8, 0x66CE, 0x95D9,
+ 0x66CF, 0x95DA, 0x66D0, 0x95DB, 0x66D1, 0x95DC, 0x66D2, 0x95DD,
+ 0x66D3, 0x95DE, 0x66D4, 0x95DF, 0x66D5, 0x95E0, 0x66D6, 0x95E1,
+ 0x66D7, 0x95E2, 0x66D8, 0x95E3, 0x66D9, 0xCAEF, 0x66DA, 0x95E4,
+ 0x66DB, 0xEAD6, 0x66DC, 0xEAD7, 0x66DD, 0xC6D8, 0x66DE, 0x95E5,
+ 0x66DF, 0x95E6, 0x66E0, 0x95E7, 0x66E1, 0x95E8, 0x66E2, 0x95E9,
+ 0x66E3, 0x95EA, 0x66E4, 0x95EB, 0x66E5, 0x95EC, 0x66E6, 0xEAD8,
+ 0x66E7, 0x95ED, 0x66E8, 0x95EE, 0x66E9, 0xEAD9, 0x66EA, 0x95EF,
+ 0x66EB, 0x95F0, 0x66EC, 0x95F1, 0x66ED, 0x95F2, 0x66EE, 0x95F3,
+ 0x66EF, 0x95F4, 0x66F0, 0xD4BB, 0x66F1, 0x95F5, 0x66F2, 0xC7FA,
+ 0x66F3, 0xD2B7, 0x66F4, 0xB8FC, 0x66F5, 0x95F6, 0x66F6, 0x95F7,
+ 0x66F7, 0xEAC2, 0x66F8, 0x95F8, 0x66F9, 0xB2DC, 0x66FA, 0x95F9,
+ 0x66FB, 0x95FA, 0x66FC, 0xC2FC, 0x66FD, 0x95FB, 0x66FE, 0xD4F8,
+ 0x66FF, 0xCCE6, 0x6700, 0xD7EE, 0x6701, 0x95FC, 0x6702, 0x95FD,
+ 0x6703, 0x95FE, 0x6704, 0x9640, 0x6705, 0x9641, 0x6706, 0x9642,
+ 0x6707, 0x9643, 0x6708, 0xD4C2, 0x6709, 0xD3D0, 0x670A, 0xEBC3,
+ 0x670B, 0xC5F3, 0x670C, 0x9644, 0x670D, 0xB7FE, 0x670E, 0x9645,
+ 0x670F, 0x9646, 0x6710, 0xEBD4, 0x6711, 0x9647, 0x6712, 0x9648,
+ 0x6713, 0x9649, 0x6714, 0xCBB7, 0x6715, 0xEBDE, 0x6716, 0x964A,
+ 0x6717, 0xC0CA, 0x6718, 0x964B, 0x6719, 0x964C, 0x671A, 0x964D,
+ 0x671B, 0xCDFB, 0x671C, 0x964E, 0x671D, 0xB3AF, 0x671E, 0x964F,
+ 0x671F, 0xC6DA, 0x6720, 0x9650, 0x6721, 0x9651, 0x6722, 0x9652,
+ 0x6723, 0x9653, 0x6724, 0x9654, 0x6725, 0x9655, 0x6726, 0xEBFC,
+ 0x6727, 0x9656, 0x6728, 0xC4BE, 0x6729, 0x9657, 0x672A, 0xCEB4,
+ 0x672B, 0xC4A9, 0x672C, 0xB1BE, 0x672D, 0xD4FD, 0x672E, 0x9658,
+ 0x672F, 0xCAF5, 0x6730, 0x9659, 0x6731, 0xD6EC, 0x6732, 0x965A,
+ 0x6733, 0x965B, 0x6734, 0xC6D3, 0x6735, 0xB6E4, 0x6736, 0x965C,
+ 0x6737, 0x965D, 0x6738, 0x965E, 0x6739, 0x965F, 0x673A, 0xBBFA,
+ 0x673B, 0x9660, 0x673C, 0x9661, 0x673D, 0xD0E0, 0x673E, 0x9662,
+ 0x673F, 0x9663, 0x6740, 0xC9B1, 0x6741, 0x9664, 0x6742, 0xD4D3,
+ 0x6743, 0xC8A8, 0x6744, 0x9665, 0x6745, 0x9666, 0x6746, 0xB8CB,
+ 0x6747, 0x9667, 0x6748, 0xE8BE, 0x6749, 0xC9BC, 0x674A, 0x9668,
+ 0x674B, 0x9669, 0x674C, 0xE8BB, 0x674D, 0x966A, 0x674E, 0xC0EE,
+ 0x674F, 0xD0D3, 0x6750, 0xB2C4, 0x6751, 0xB4E5, 0x6752, 0x966B,
+ 0x6753, 0xE8BC, 0x6754, 0x966C, 0x6755, 0x966D, 0x6756, 0xD5C8,
+ 0x6757, 0x966E, 0x6758, 0x966F, 0x6759, 0x9670, 0x675A, 0x9671,
+ 0x675B, 0x9672, 0x675C, 0xB6C5, 0x675D, 0x9673, 0x675E, 0xE8BD,
+ 0x675F, 0xCAF8, 0x6760, 0xB8DC, 0x6761, 0xCCF5, 0x6762, 0x9674,
+ 0x6763, 0x9675, 0x6764, 0x9676, 0x6765, 0xC0B4, 0x6766, 0x9677,
+ 0x6767, 0x9678, 0x6768, 0xD1EE, 0x6769, 0xE8BF, 0x676A, 0xE8C2,
+ 0x676B, 0x9679, 0x676C, 0x967A, 0x676D, 0xBABC, 0x676E, 0x967B,
+ 0x676F, 0xB1AD, 0x6770, 0xBDDC, 0x6771, 0x967C, 0x6772, 0xEABD,
+ 0x6773, 0xE8C3, 0x6774, 0x967D, 0x6775, 0xE8C6, 0x6776, 0x967E,
+ 0x6777, 0xE8CB, 0x6778, 0x9680, 0x6779, 0x9681, 0x677A, 0x9682,
+ 0x677B, 0x9683, 0x677C, 0xE8CC, 0x677D, 0x9684, 0x677E, 0xCBC9,
+ 0x677F, 0xB0E5, 0x6780, 0x9685, 0x6781, 0xBCAB, 0x6782, 0x9686,
+ 0x6783, 0x9687, 0x6784, 0xB9B9, 0x6785, 0x9688, 0x6786, 0x9689,
+ 0x6787, 0xE8C1, 0x6788, 0x968A, 0x6789, 0xCDF7, 0x678A, 0x968B,
+ 0x678B, 0xE8CA, 0x678C, 0x968C, 0x678D, 0x968D, 0x678E, 0x968E,
+ 0x678F, 0x968F, 0x6790, 0xCEF6, 0x6791, 0x9690, 0x6792, 0x9691,
+ 0x6793, 0x9692, 0x6794, 0x9693, 0x6795, 0xD5ED, 0x6796, 0x9694,
+ 0x6797, 0xC1D6, 0x6798, 0xE8C4, 0x6799, 0x9695, 0x679A, 0xC3B6,
+ 0x679B, 0x9696, 0x679C, 0xB9FB, 0x679D, 0xD6A6, 0x679E, 0xE8C8,
+ 0x679F, 0x9697, 0x67A0, 0x9698, 0x67A1, 0x9699, 0x67A2, 0xCAE0,
+ 0x67A3, 0xD4E6, 0x67A4, 0x969A, 0x67A5, 0xE8C0, 0x67A6, 0x969B,
+ 0x67A7, 0xE8C5, 0x67A8, 0xE8C7, 0x67A9, 0x969C, 0x67AA, 0xC7B9,
+ 0x67AB, 0xB7E3, 0x67AC, 0x969D, 0x67AD, 0xE8C9, 0x67AE, 0x969E,
+ 0x67AF, 0xBFDD, 0x67B0, 0xE8D2, 0x67B1, 0x969F, 0x67B2, 0x96A0,
+ 0x67B3, 0xE8D7, 0x67B4, 0x96A1, 0x67B5, 0xE8D5, 0x67B6, 0xBCDC,
+ 0x67B7, 0xBCCF, 0x67B8, 0xE8DB, 0x67B9, 0x96A2, 0x67BA, 0x96A3,
+ 0x67BB, 0x96A4, 0x67BC, 0x96A5, 0x67BD, 0x96A6, 0x67BE, 0x96A7,
+ 0x67BF, 0x96A8, 0x67C0, 0x96A9, 0x67C1, 0xE8DE, 0x67C2, 0x96AA,
+ 0x67C3, 0xE8DA, 0x67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 0xD5BB, 0x6809, 0xE8CE, 0x680A, 0xE8D0,
+ 0x680B, 0xB6B0, 0x680C, 0xE8D3, 0x680D, 0x96D3, 0x680E, 0xE8DD,
+ 0x680F, 0xC0B8, 0x6810, 0x96D4, 0x6811, 0xCAF7, 0x6812, 0x96D5,
+ 0x6813, 0xCBA8, 0x6814, 0x96D6, 0x6815, 0x96D7, 0x6816, 0xC6DC,
+ 0x6817, 0xC0F5, 0x6818, 0x96D8, 0x6819, 0x96D9, 0x681A, 0x96DA,
+ 0x681B, 0x96DB, 0x681C, 0x96DC, 0x681D, 0xE8E9, 0x681E, 0x96DD,
+ 0x681F, 0x96DE, 0x6820, 0x96DF, 0x6821, 0xD0A3, 0x6822, 0x96E0,
+ 0x6823, 0x96E1, 0x6824, 0x96E2, 0x6825, 0x96E3, 0x6826, 0x96E4,
+ 0x6827, 0x96E5, 0x6828, 0x96E6, 0x6829, 0xE8F2, 0x682A, 0xD6EA,
+ 0x682B, 0x96E7, 0x682C, 0x96E8, 0x682D, 0x96E9, 0x682E, 0x96EA,
+ 0x682F, 0x96EB, 0x6830, 0x96EC, 0x6831, 0x96ED, 0x6832, 0xE8E0,
+ 0x6833, 0xE8E1, 0x6834, 0x96EE, 0x6835, 0x96EF, 0x6836, 0x96F0,
+ 0x6837, 0xD1F9, 0x6838, 0xBACB, 0x6839, 0xB8F9, 0x683A, 0x96F1,
+ 0x683B, 0x96F2, 0x683C, 0xB8F1, 0x683D, 0xD4D4, 0x683E, 0xE8EF,
+ 0x683F, 0x96F3, 0x6840, 0xE8EE, 0x6841, 0xE8EC, 0x6842, 0xB9F0,
+ 0x6843, 0xCCD2, 0x6844, 0xE8E6, 0x6845, 0xCEA6, 0x6846, 0xBFF2,
+ 0x6847, 0x96F4, 0x6848, 0xB0B8, 0x6849, 0xE8F1, 0x684A, 0xE8F0,
+ 0x684B, 0x96F5, 0x684C, 0xD7C0, 0x684D, 0x96F6, 0x684E, 0xE8E4,
+ 0x684F, 0x96F7, 0x6850, 0xCDA9, 0x6851, 0xC9A3, 0x6852, 0x96F8,
+ 0x6853, 0xBBB8, 0x6854, 0xBDDB, 0x6855, 0xE8EA, 0x6856, 0x96F9,
+ 0x6857, 0x96FA, 0x6858, 0x96FB, 0x6859, 0x96FC, 0x685A, 0x96FD,
+ 0x685B, 0x96FE, 0x685C, 0x9740, 0x685D, 0x9741, 0x685E, 0x9742,
+ 0x685F, 0x9743, 0x6860, 0xE8E2, 0x6861, 0xE8E3, 0x6862, 0xE8E5,
+ 0x6863, 0xB5B5, 0x6864, 0xE8E7, 0x6865, 0xC7C5, 0x6866, 0xE8EB,
+ 0x6867, 0xE8ED, 0x6868, 0xBDB0, 0x6869, 0xD7AE, 0x686A, 0x9744,
+ 0x686B, 0xE8F8, 0x686C, 0x9745, 0x686D, 0x9746, 0x686E, 0x9747,
+ 0x686F, 0x9748, 0x6870, 0x9749, 0x6871, 0x974A, 0x6872, 0x974B,
+ 0x6873, 0x974C, 0x6874, 0xE8F5, 0x6875, 0x974D, 0x6876, 0xCDB0,
+ 0x6877, 0xE8F6, 0x6878, 0x974E, 0x6879, 0x974F, 0x687A, 0x9750,
+ 0x687B, 0x9751, 0x687C, 0x9752, 0x687D, 0x9753, 0x687E, 0x9754,
+ 0x687F, 0x9755, 0x6880, 0x9756, 0x6881, 0xC1BA, 0x6882, 0x9757,
+ 0x6883, 0xE8E8, 0x6884, 0x9758, 0x6885, 0xC3B7, 0x6886, 0xB0F0,
+ 0x6887, 0x9759, 0x6888, 0x975A, 0x6889, 0x975B, 0x688A, 0x975C,
+ 0x688B, 0x975D, 0x688C, 0x975E, 0x688D, 0x975F, 0x688E, 0x9760,
+ 0x688F, 0xE8F4, 0x6890, 0x9761, 0x6891, 0x9762, 0x6892, 0x9763,
+ 0x6893, 0xE8F7, 0x6894, 0x9764, 0x6895, 0x9765, 0x6896, 0x9766,
+ 0x6897, 0xB9A3, 0x6898, 0x9767, 0x6899, 0x9768, 0x689A, 0x9769,
+ 0x689B, 0x976A, 0x689C, 0x976B, 0x689D, 0x976C, 0x689E, 0x976D,
+ 0x689F, 0x976E, 0x68A0, 0x976F, 0x68A1, 0x9770, 0x68A2, 0xC9D2,
+ 0x68A3, 0x9771, 0x68A4, 0x9772, 0x68A5, 0x9773, 0x68A6, 0xC3CE,
+ 0x68A7, 0xCEE0, 0x68A8, 0xC0E6, 0x68A9, 0x9774, 0x68AA, 0x9775,
+ 0x68AB, 0x9776, 0x68AC, 0x9777, 0x68AD, 0xCBF3, 0x68AE, 0x9778,
+ 0x68AF, 0xCCDD, 0x68B0, 0xD0B5, 0x68B1, 0x9779, 0x68B2, 0x977A,
+ 0x68B3, 0xCAE1, 0x68B4, 0x977B, 0x68B5, 0xE8F3, 0x68B6, 0x977C,
+ 0x68B7, 0x977D, 0x68B8, 0x977E, 0x68B9, 0x9780, 0x68BA, 0x9781,
+ 0x68BB, 0x9782, 0x68BC, 0x9783, 0x68BD, 0x9784, 0x68BE, 0x9785,
+ 0x68BF, 0x9786, 0x68C0, 0xBCEC, 0x68C1, 0x9787, 0x68C2, 0xE8F9,
+ 0x68C3, 0x9788, 0x68C4, 0x9789, 0x68C5, 0x978A, 0x68C6, 0x978B,
+ 0x68C7, 0x978C, 0x68C8, 0x978D, 0x68C9, 0xC3DE, 0x68CA, 0x978E,
+ 0x68CB, 0xC6E5, 0x68CC, 0x978F, 0x68CD, 0xB9F7, 0x68CE, 0x9790,
+ 0x68CF, 0x9791, 0x68D0, 0x9792, 0x68D1, 0x9793, 0x68D2, 0xB0F4,
+ 0x68D3, 0x9794, 0x68D4, 0x9795, 0x68D5, 0xD7D8, 0x68D6, 0x9796,
+ 0x68D7, 0x9797, 0x68D8, 0xBCAC, 0x68D9, 0x9798, 0x68DA, 0xC5EF,
+ 0x68DB, 0x9799, 0x68DC, 0x979A, 0x68DD, 0x979B, 0x68DE, 0x979C,
+ 0x68DF, 0x979D, 0x68E0, 0xCCC4, 0x68E1, 0x979E, 0x68E2, 0x979F,
+ 0x68E3, 0xE9A6, 0x68E4, 0x97A0, 0x68E5, 0x97A1, 0x68E6, 0x97A2,
+ 0x68E7, 0x97A3, 0x68E8, 0x97A4, 0x68E9, 0x97A5, 0x68EA, 0x97A6,
+ 0x68EB, 0x97A7, 0x68EC, 0x97A8, 0x68ED, 0x97A9, 0x68EE, 0xC9AD,
+ 0x68EF, 0x97AA, 0x68F0, 0xE9A2, 0x68F1, 0xC0E2, 0x68F2, 0x97AB,
+ 0x68F3, 0x97AC, 0x68F4, 0x97AD, 0x68F5, 0xBFC3, 0x68F6, 0x97AE,
+ 0x68F7, 0x97AF, 0x68F8, 0x97B0, 0x68F9, 0xE8FE, 0x68FA, 0xB9D7,
+ 0x68FB, 0x97B1, 0x68FC, 0xE8FB, 0x68FD, 0x97B2, 0x68FE, 0x97B3,
+ 0x68FF, 0x97B4, 0x6900, 0x97B5, 0x6901, 0xE9A4, 0x6902, 0x97B6,
+ 0x6903, 0x97B7, 0x6904, 0x97B8, 0x6905, 0xD2CE, 0x6906, 0x97B9,
+ 0x6907, 0x97BA, 0x6908, 0x97BB, 0x6909, 0x97BC, 0x690A, 0x97BD,
+ 0x690B, 0xE9A3, 0x690C, 0x97BE, 0x690D, 0xD6B2, 0x690E, 0xD7B5,
+ 0x690F, 0x97BF, 0x6910, 0xE9A7, 0x6911, 0x97C0, 0x6912, 0xBDB7,
+ 0x6913, 0x97C1, 0x6914, 0x97C2, 0x6915, 0x97C3, 0x6916, 0x97C4,
+ 0x6917, 0x97C5, 0x6918, 0x97C6, 0x6919, 0x97C7, 0x691A, 0x97C8,
+ 0x691B, 0x97C9, 0x691C, 0x97CA, 0x691D, 0x97CB, 0x691E, 0x97CC,
+ 0x691F, 0xE8FC, 0x6920, 0xE8FD, 0x6921, 0x97CD, 0x6922, 0x97CE,
+ 0x6923, 0x97CF, 0x6924, 0xE9A1, 0x6925, 0x97D0, 0x6926, 0x97D1,
+ 0x6927, 0x97D2, 0x6928, 0x97D3, 0x6929, 0x97D4, 0x692A, 0x97D5,
+ 0x692B, 0x97D6, 0x692C, 0x97D7, 0x692D, 0xCDD6, 0x692E, 0x97D8,
+ 0x692F, 0x97D9, 0x6930, 0xD2AC, 0x6931, 0x97DA, 0x6932, 0x97DB,
+ 0x6933, 0x97DC, 0x6934, 0xE9B2, 0x6935, 0x97DD, 0x6936, 0x97DE,
+ 0x6937, 0x97DF, 0x6938, 0x97E0, 0x6939, 0xE9A9, 0x693A, 0x97E1,
+ 0x693B, 0x97E2, 0x693C, 0x97E3, 0x693D, 0xB4AA, 0x693E, 0x97E4,
+ 0x693F, 0xB4BB, 0x6940, 0x97E5, 0x6941, 0x97E6, 0x6942, 0xE9AB,
+ 0x6943, 0x97E7, 0x6944, 0x97E8, 0x6945, 0x97E9, 0x6946, 0x97EA,
+ 0x6947, 0x97EB, 0x6948, 0x97EC, 0x6949, 0x97ED, 0x694A, 0x97EE,
+ 0x694B, 0x97EF, 0x694C, 0x97F0, 0x694D, 0x97F1, 0x694E, 0x97F2,
+ 0x694F, 0x97F3, 0x6950, 0x97F4, 0x6951, 0x97F5, 0x6952, 0x97F6,
+ 0x6953, 0x97F7, 0x6954, 0xD0A8, 0x6955, 0x97F8, 0x6956, 0x97F9,
+ 0x6957, 0xE9A5, 0x6958, 0x97FA, 0x6959, 0x97FB, 0x695A, 0xB3FE,
+ 0x695B, 0x97FC, 0x695C, 0x97FD, 0x695D, 0xE9AC, 0x695E, 0xC0E3,
+ 0x695F, 0x97FE, 0x6960, 0xE9AA, 0x6961, 0x9840, 0x6962, 0x9841,
+ 0x6963, 0xE9B9, 0x6964, 0x9842, 0x6965, 0x9843, 0x6966, 0xE9B8,
+ 0x6967, 0x9844, 0x6968, 0x9845, 0x6969, 0x9846, 0x696A, 0x9847,
+ 0x696B, 0xE9AE, 0x696C, 0x9848, 0x696D, 0x9849, 0x696E, 0xE8FA,
+ 0x696F, 0x984A, 0x6970, 0x984B, 0x6971, 0xE9A8, 0x6972, 0x984C,
+ 0x6973, 0x984D, 0x6974, 0x984E, 0x6975, 0x984F, 0x6976, 0x9850,
+ 0x6977, 0xBFAC, 0x6978, 0xE9B1, 0x6979, 0xE9BA, 0x697A, 0x9851,
+ 0x697B, 0x9852, 0x697C, 0xC2A5, 0x697D, 0x9853, 0x697E, 0x9854,
+ 0x697F, 0x9855, 0x6980, 0xE9AF, 0x6981, 0x9856, 0x6982, 0xB8C5,
+ 0x6983, 0x9857, 0x6984, 0xE9AD, 0x6985, 0x9858, 0x6986, 0xD3DC,
+ 0x6987, 0xE9B4, 0x6988, 0xE9B5, 0x6989, 0xE9B7, 0x698A, 0x9859,
+ 0x698B, 0x985A, 0x698C, 0x985B, 0x698D, 0xE9C7, 0x698E, 0x985C,
+ 0x698F, 0x985D, 0x6990, 0x985E, 0x6991, 0x985F, 0x6992, 0x9860,
+ 0x6993, 0x9861, 0x6994, 0xC0C6, 0x6995, 0xE9C5, 0x6996, 0x9862,
+ 0x6997, 0x9863, 0x6998, 0xE9B0, 0x6999, 0x9864, 0x699A, 0x9865,
+ 0x699B, 0xE9BB, 0x699C, 0xB0F1, 0x699D, 0x9866, 0x699E, 0x9867,
+ 0x699F, 0x9868, 0x69A0, 0x9869, 0x69A1, 0x986A, 0x69A2, 0x986B,
+ 0x69A3, 0x986C, 0x69A4, 0x986D, 0x69A5, 0x986E, 0x69A6, 0x986F,
+ 0x69A7, 0xE9BC, 0x69A8, 0xD5A5, 0x69A9, 0x9870, 0x69AA, 0x9871,
+ 0x69AB, 0xE9BE, 0x69AC, 0x9872, 0x69AD, 0xE9BF, 0x69AE, 0x9873,
+ 0x69AF, 0x9874, 0x69B0, 0x9875, 0x69B1, 0xE9C1, 0x69B2, 0x9876,
+ 0x69B3, 0x9877, 0x69B4, 0xC1F1, 0x69B5, 0x9878, 0x69B6, 0x9879,
+ 0x69B7, 0xC8B6, 0x69B8, 0x987A, 0x69B9, 0x987B, 0x69BA, 0x987C,
+ 0x69BB, 0xE9BD, 0x69BC, 0x987D, 0x69BD, 0x987E, 0x69BE, 0x9880,
+ 0x69BF, 0x9881, 0x69C0, 0x9882, 0x69C1, 0xE9C2, 0x69C2, 0x9883,
+ 0x69C3, 0x9884, 0x69C4, 0x9885, 0x69C5, 0x9886, 0x69C6, 0x9887,
+ 0x69C7, 0x9888, 0x69C8, 0x9889, 0x69C9, 0x988A, 0x69CA, 0xE9C3,
+ 0x69CB, 0x988B, 0x69CC, 0xE9B3, 0x69CD, 0x988C, 0x69CE, 0xE9B6,
+ 0x69CF, 0x988D, 0x69D0, 0xBBB1, 0x69D1, 0x988E, 0x69D2, 0x988F,
+ 0x69D3, 0x9890, 0x69D4, 0xE9C0, 0x69D5, 0x9891, 0x69D6, 0x9892,
+ 0x69D7, 0x9893, 0x69D8, 0x9894, 0x69D9, 0x9895, 0x69DA, 0x9896,
+ 0x69DB, 0xBCF7, 0x69DC, 0x9897, 0x69DD, 0x9898, 0x69DE, 0x9899,
+ 0x69DF, 0xE9C4, 0x69E0, 0xE9C6, 0x69E1, 0x989A, 0x69E2, 0x989B,
+ 0x69E3, 0x989C, 0x69E4, 0x989D, 0x69E5, 0x989E, 0x69E6, 0x989F,
+ 0x69E7, 0x98A0, 0x69E8, 0x98A1, 0x69E9, 0x98A2, 0x69EA, 0x98A3,
+ 0x69EB, 0x98A4, 0x69EC, 0x98A5, 0x69ED, 0xE9CA, 0x69EE, 0x98A6,
+ 0x69EF, 0x98A7, 0x69F0, 0x98A8, 0x69F1, 0x98A9, 0x69F2, 0xE9CE,
+ 0x69F3, 0x98AA, 0x69F4, 0x98AB, 0x69F5, 0x98AC, 0x69F6, 0x98AD,
+ 0x69F7, 0x98AE, 0x69F8, 0x98AF, 0x69F9, 0x98B0, 0x69FA, 0x98B1,
+ 0x69FB, 0x98B2, 0x69FC, 0x98B3, 0x69FD, 0xB2DB, 0x69FE, 0x98B4,
+ 0x69FF, 0xE9C8, 0x6A00, 0x98B5, 0x6A01, 0x98B6, 0x6A02, 0x98B7,
+ 0x6A03, 0x98B8, 0x6A04, 0x98B9, 0x6A05, 0x98BA, 0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, 0x6A49, 0x98F0, 0x6A4A, 0x98F1,
+ 0x6A4B, 0x98F2, 0x6A4C, 0x98F3, 0x6A4D, 0x98F4, 0x6A4E, 0x98F5,
+ 0x6A4F, 0x98F6, 0x6A50, 0xE9D2, 0x6A51, 0x98F7, 0x6A52, 0x98F8,
+ 0x6A53, 0x98F9, 0x6A54, 0x98FA, 0x6A55, 0x98FB, 0x6A56, 0x98FC,
+ 0x6A57, 0x98FD, 0x6A58, 0xE9D9, 0x6A59, 0xB3C8, 0x6A5A, 0x98FE,
+ 0x6A5B, 0xE9D3, 0x6A5C, 0x9940, 0x6A5D, 0x9941, 0x6A5E, 0x9942,
+ 0x6A5F, 0x9943, 0x6A60, 0x9944, 0x6A61, 0xCFF0, 0x6A62, 0x9945,
+ 0x6A63, 0x9946, 0x6A64, 0x9947, 0x6A65, 0xE9CD, 0x6A66, 0x9948,
+ 0x6A67, 0x9949, 0x6A68, 0x994A, 0x6A69, 0x994B, 0x6A6A, 0x994C,
+ 0x6A6B, 0x994D, 0x6A6C, 0x994E, 0x6A6D, 0x994F, 0x6A6E, 0x9950,
+ 0x6A6F, 0x9951, 0x6A70, 0x9952, 0x6A71, 0xB3F7, 0x6A72, 0x9953,
+ 0x6A73, 0x9954, 0x6A74, 0x9955, 0x6A75, 0x9956, 0x6A76, 0x9957,
+ 0x6A77, 0x9958, 0x6A78, 0x9959, 0x6A79, 0xE9D6, 0x6A7A, 0x995A,
+ 0x6A7B, 0x995B, 0x6A7C, 0xE9DA, 0x6A7D, 0x995C, 0x6A7E, 0x995D,
+ 0x6A7F, 0x995E, 0x6A80, 0xCCB4, 0x6A81, 0x995F, 0x6A82, 0x9960,
+ 0x6A83, 0x9961, 0x6A84, 0xCFAD, 0x6A85, 0x9962, 0x6A86, 0x9963,
+ 0x6A87, 0x9964, 0x6A88, 0x9965, 0x6A89, 0x9966, 0x6A8A, 0x9967,
+ 0x6A8B, 0x9968, 0x6A8C, 0x9969, 0x6A8D, 0x996A, 0x6A8E, 0xE9D5,
+ 0x6A8F, 0x996B, 0x6A90, 0xE9DC, 0x6A91, 0xE9DB, 0x6A92, 0x996C,
+ 0x6A93, 0x996D, 0x6A94, 0x996E, 0x6A95, 0x996F, 0x6A96, 0x9970,
+ 0x6A97, 0xE9DE, 0x6A98, 0x9971, 0x6A99, 0x9972, 0x6A9A, 0x9973,
+ 0x6A9B, 0x9974, 0x6A9C, 0x9975, 0x6A9D, 0x9976, 0x6A9E, 0x9977,
+ 0x6A9F, 0x9978, 0x6AA0, 0xE9D1, 0x6AA1, 0x9979, 0x6AA2, 0x997A,
+ 0x6AA3, 0x997B, 0x6AA4, 0x997C, 0x6AA5, 0x997D, 0x6AA6, 0x997E,
+ 0x6AA7, 0x9980, 0x6AA8, 0x9981, 0x6AA9, 0xE9DD, 0x6AAA, 0x9982,
+ 0x6AAB, 0xE9DF, 0x6AAC, 0xC3CA, 0x6AAD, 0x9983, 0x6AAE, 0x9984,
+ 0x6AAF, 0x9985, 0x6AB0, 0x9986, 0x6AB1, 0x9987, 0x6AB2, 0x9988,
+ 0x6AB3, 0x9989, 0x6AB4, 0x998A, 0x6AB5, 0x998B, 0x6AB6, 0x998C,
+ 0x6AB7, 0x998D, 0x6AB8, 0x998E, 0x6AB9, 0x998F, 0x6ABA, 0x9990,
+ 0x6ABB, 0x9991, 0x6ABC, 0x9992, 0x6ABD, 0x9993, 0x6ABE, 0x9994,
+ 0x6ABF, 0x9995, 0x6AC0, 0x9996, 0x6AC1, 0x9997, 0x6AC2, 0x9998,
+ 0x6AC3, 0x9999, 0x6AC4, 0x999A, 0x6AC5, 0x999B, 0x6AC6, 0x999C,
+ 0x6AC7, 0x999D, 0x6AC8, 0x999E, 0x6AC9, 0x999F, 0x6ACA, 0x99A0,
+ 0x6ACB, 0x99A1, 0x6ACC, 0x99A2, 0x6ACD, 0x99A3, 0x6ACE, 0x99A4,
+ 0x6ACF, 0x99A5, 0x6AD0, 0x99A6, 0x6AD1, 0x99A7, 0x6AD2, 0x99A8,
+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 0x9E64, 0x700D, 0x9E65, 0x700E, 0x9E66,
+ 0x700F, 0x9E67, 0x7010, 0x9E68, 0x7011, 0xC6D9, 0x7012, 0x9E69,
+ 0x7013, 0x9E6A, 0x7014, 0x9E6B, 0x7015, 0x9E6C, 0x7016, 0x9E6D,
+ 0x7017, 0x9E6E, 0x7018, 0x9E6F, 0x7019, 0x9E70, 0x701A, 0xE5AB,
+ 0x701B, 0xE5AD, 0x701C, 0x9E71, 0x701D, 0x9E72, 0x701E, 0x9E73,
+ 0x701F, 0x9E74, 0x7020, 0x9E75, 0x7021, 0x9E76, 0x7022, 0x9E77,
+ 0x7023, 0xE5AC, 0x7024, 0x9E78, 0x7025, 0x9E79, 0x7026, 0x9E7A,
+ 0x7027, 0x9E7B, 0x7028, 0x9E7C, 0x7029, 0x9E7D, 0x702A, 0x9E7E,
+ 0x702B, 0x9E80, 0x702C, 0x9E81, 0x702D, 0x9E82, 0x702E, 0x9E83,
+ 0x702F, 0x9E84, 0x7030, 0x9E85, 0x7031, 0x9E86, 0x7032, 0x9E87,
+ 0x7033, 0x9E88, 0x7034, 0x9E89, 0x7035, 0xE5AF, 0x7036, 0x9E8A,
+ 0x7037, 0x9E8B, 0x7038, 0x9E8C, 0x7039, 0xE5AE, 0x703A, 0x9E8D,
+ 0x703B, 0x9E8E, 0x703C, 0x9E8F, 0x703D, 0x9E90, 0x703E, 0x9E91,
+ 0x703F, 0x9E92, 0x7040, 0x9E93, 0x7041, 0x9E94, 0x7042, 0x9E95,
+ 0x7043, 0x9E96, 0x7044, 0x9E97, 0x7045, 0x9E98, 0x7046, 0x9E99,
+ 0x7047, 0x9E9A, 0x7048, 0x9E9B, 0x7049, 0x9E9C, 0x704A, 0x9E9D,
+ 0x704B, 0x9E9E, 0x704C, 0xB9E0, 0x704D, 0x9E9F, 0x704E, 0x9EA0,
+ 0x704F, 0xE5B0, 0x7050, 0x9EA1, 0x7051, 0x9EA2, 0x7052, 0x9EA3,
+ 0x7053, 0x9EA4, 0x7054, 0x9EA5, 0x7055, 0x9EA6, 0x7056, 0x9EA7,
+ 0x7057, 0x9EA8, 0x7058, 0x9EA9, 0x7059, 0x9EAA, 0x705A, 0x9EAB,
+ 0x705B, 0x9EAC, 0x705C, 0x9EAD, 0x705D, 0x9EAE, 0x705E, 0xE5B1,
+ 0x705F, 0x9EAF, 0x7060, 0x9EB0, 0x7061, 0x9EB1, 0x7062, 0x9EB2,
+ 0x7063, 0x9EB3, 0x7064, 0x9EB4, 0x7065, 0x9EB5, 0x7066, 0x9EB6,
+ 0x7067, 0x9EB7, 0x7068, 0x9EB8, 0x7069, 0x9EB9, 0x706A, 0x9EBA,
+ 0x706B, 0xBBF0, 0x706C, 0xECE1, 0x706D, 0xC3F0, 0x706E, 0x9EBB,
+ 0x706F, 0xB5C6, 0x7070, 0xBBD2, 0x7071, 0x9EBC, 0x7072, 0x9EBD,
+ 0x7073, 0x9EBE, 0x7074, 0x9EBF, 0x7075, 0xC1E9, 0x7076, 0xD4EE,
+ 0x7077, 0x9EC0, 0x7078, 0xBEC4, 0x7079, 0x9EC1, 0x707A, 0x9EC2,
+ 0x707B, 0x9EC3, 0x707C, 0xD7C6, 0x707D, 0x9EC4, 0x707E, 0xD4D6,
+ 0x707F, 0xB2D3, 0x7080, 0xECBE, 0x7081, 0x9EC5, 0x7082, 0x9EC6,
+ 0x7083, 0x9EC7, 0x7084, 0x9EC8, 0x7085, 0xEAC1, 0x7086, 0x9EC9,
+ 0x7087, 0x9ECA, 0x7088, 0x9ECB, 0x7089, 0xC2AF, 0x708A, 0xB4B6,
+ 0x708B, 0x9ECC, 0x708C, 0x9ECD, 0x708D, 0x9ECE, 0x708E, 0xD1D7,
+ 0x708F, 0x9ECF, 0x7090, 0x9ED0, 0x7091, 0x9ED1, 0x7092, 0xB3B4,
+ 0x7093, 0x9ED2, 0x7094, 0xC8B2, 0x7095, 0xBFBB, 0x7096, 0xECC0,
+ 0x7097, 0x9ED3, 0x7098, 0x9ED4, 0x7099, 0xD6CB,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2, 0x70DC, 0x9F40, 0x70DD, 0x9F41, 0x70DE, 0x9F42,
+ 0x70DF, 0xD1CC, 0x70E0, 0x9F43, 0x70E1, 0x9F44, 0x70E2, 0x9F45,
+ 0x70E3, 0x9F46, 0x70E4, 0xBFBE, 0x70E5, 0x9F47, 0x70E6, 0xB7B3,
+ 0x70E7, 0xC9D5, 0x70E8, 0xECC7, 0x70E9, 0xBBE2, 0x70EA, 0x9F48,
+ 0x70EB, 0xCCCC, 0x70EC, 0xBDFD, 0x70ED, 0xC8C8, 0x70EE, 0x9F49,
+ 0x70EF, 0xCFA9, 0x70F0, 0x9F4A, 0x70F1, 0x9F4B, 0x70F2, 0x9F4C,
+ 0x70F3, 0x9F4D, 0x70F4, 0x9F4E, 0x70F5, 0x9F4F, 0x70F6, 0x9F50,
+ 0x70F7, 0xCDE9, 0x70F8, 0x9F51, 0x70F9, 0xC5EB, 0x70FA, 0x9F52,
+ 0x70FB, 0x9F53, 0x70FC, 0x9F54, 0x70FD, 0xB7E9, 0x70FE, 0x9F55,
+ 0x70FF, 0x9F56, 0x7100, 0x9F57, 0x7101, 0x9F58, 0x7102, 0x9F59,
+ 0x7103, 0x9F5A, 0x7104, 0x9F5B, 0x7105, 0x9F5C, 0x7106, 0x9F5D,
+ 0x7107, 0x9F5E, 0x7108, 0x9F5F, 0x7109, 0xD1C9, 0x710A, 0xBAB8,
+ 0x710B, 0x9F60, 0x710C, 0x9F61, 0x710D, 0x9F62, 0x710E, 0x9F63,
+ 0x710F, 0x9F64, 0x7110, 0xECC9, 0x7111, 0x9F65, 0x7112, 0x9F66,
+ 0x7113, 0xECCA, 0x7114, 0x9F67, 0x7115, 0xBBC0, 0x7116, 0xECCB,
+ 0x7117, 0x9F68, 0x7118, 0xECE2, 0x7119, 0xB1BA, 0x711A, 0xB7D9,
+ 0x711B, 0x9F69, 0x711C, 0x9F6A, 0x711D, 0x9F6B, 0x711E, 0x9F6C,
+ 0x711F, 0x9F6D, 0x7120, 0x9F6E, 0x7121, 0x9F6F, 0x7122, 0x9F70,
+ 0x7123, 0x9F71, 0x7124, 0x9F72, 0x7125, 0x9F73, 0x7126, 0xBDB9,
+ 0x7127, 0x9F74, 0x7128, 0x9F75, 0x7129, 0x9F76, 0x712A, 0x9F77,
+ 0x712B, 0x9F78, 0x712C, 0x9F79, 0x712D, 0x9F7A, 0x712E, 0x9F7B,
+ 0x712F, 0xECCC, 0x7130, 0xD1E6, 0x7131, 0xECCD, 0x7132, 0x9F7C,
+ 0x7133, 0x9F7D, 0x7134, 0x9F7E, 0x7135, 0x9F80, 0x7136, 0xC8BB,
+ 0x7137, 0x9F81, 0x7138, 0x9F82, 0x7139, 0x9F83, 0x713A, 0x9F84,
+ 0x713B, 0x9F85, 0x713C, 0x9F86, 0x713D, 0x9F87, 0x713E, 0x9F88,
+ 0x713F, 0x9F89, 0x7140, 0x9F8A, 0x7141, 0x9F8B, 0x7142, 0x9F8C,
+ 0x7143, 0x9F8D, 0x7144, 0x9F8E, 0x7145, 0xECD1, 0x7146, 0x9F8F,
+ 0x7147, 0x9F90, 0x7148, 0x9F91, 0x7149, 0x9F92, 0x714A, 0xECD3,
+ 0x714B, 0x9F93, 0x714C, 0xBBCD, 0x714D, 0x9F94, 0x714E, 0xBCE5,
+ 0x714F, 0x9F95, 0x7150, 0x9F96, 0x7151, 0x9F97, 0x7152, 0x9F98,
+ 0x7153, 0x9F99, 0x7154, 0x9F9A, 0x7155, 0x9F9B, 0x7156, 0x9F9C,
+ 0x7157, 0x9F9D, 0x7158, 0x9F9E, 0x7159, 0x9F9F, 0x715A, 0x9FA0,
+ 0x715B, 0x9FA1, 0x715C, 0xECCF, 0x715D, 0x9FA2, 0x715E, 0xC9B7,
+ 0x715F, 0x9FA3, 0x7160, 0x9FA4, 0x7161, 0x9FA5, 0x7162, 0x9FA6,
+ 0x7163, 0x9FA7, 0x7164, 0xC3BA, 0x7165, 0x9FA8, 0x7166, 0xECE3,
+ 0x7167, 0xD5D5, 0x7168, 0xECD0, 0x7169, 0x9FA9, 0x716A, 0x9FAA,
+ 0x716B, 0x9FAB, 0x716C, 0x9FAC, 0x716D, 0x9FAD, 0x716E, 0xD6F3,
+ 0x716F, 0x9FAE, 0x7170, 0x9FAF, 0x7171, 0x9FB0, 0x7172, 0xECD2,
+ 0x7173, 0xECCE, 0x7174, 0x9FB1, 0x7175, 0x9FB2, 0x7176, 0x9FB3,
+ 0x7177, 0x9FB4, 0x7178, 0xECD4, 0x7179, 0x9FB5, 0x717A, 0xECD5,
+ 0x717B, 0x9FB6, 0x717C, 0x9FB7, 0x717D, 0xC9BF, 0x717E, 0x9FB8,
+ 0x717F, 0x9FB9, 0x7180, 0x9FBA, 0x7181, 0x9FBB, 0x7182, 0x9FBC,
+ 0x7183, 0x9FBD, 0x7184, 0xCFA8, 0x7185, 0x9FBE, 0x7186, 0x9FBF,
+ 0x7187, 0x9FC0, 0x7188, 0x9FC1, 0x7189, 0x9FC2, 0x718A, 0xD0DC,
+ 0x718B, 0x9FC3, 0x718C, 0x9FC4, 0x718D, 0x9FC5, 0x718E, 0x9FC6,
+ 0x718F, 0xD1AC, 0x7190, 0x9FC7, 0x7191, 0x9FC8, 0x7192, 0x9FC9,
+ 0x7193, 0x9FCA, 0x7194, 0xC8DB, 0x7195, 0x9FCB, 0x7196, 0x9FCC,
+ 0x7197, 0x9FCD, 0x7198, 0xECD6, 0x7199, 0xCEF5, 0x719A, 0x9FCE,
+ 0x719B, 0x9FCF, 0x719C, 0x9FD0, 0x719D, 0x9FD1, 0x719E, 0x9FD2,
+ 0x719F, 0xCAEC, 0x71A0, 0xECDA, 0x71A1, 0x9FD3, 0x71A2, 0x9FD4,
+ 0x71A3, 0x9FD5, 0x71A4, 0x9FD6, 0x71A5, 0x9FD7, 0x71A6, 0x9FD8,
+ 0x71A7, 0x9FD9, 0x71A8, 0xECD9, 0x71A9, 0x9FDA, 0x71AA, 0x9FDB,
+ 0x71AB, 0x9FDC, 0x71AC, 0xB0BE, 0x71AD, 0x9FDD, 0x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2, 0xA058,
+ 0x71F3, 0xA059, 0x71F4, 0xA05A, 0x71F5, 0xA05B, 0x71F6, 0xA05C,
+ 0x71F7, 0xA05D, 0x71F8, 0xA05E, 0x71F9, 0xECDE, 0x71FA, 0xA05F,
+ 0x71FB, 0xA060, 0x71FC, 0xA061, 0x71FD, 0xA062, 0x71FE, 0xA063,
+ 0x71FF, 0xA064, 0x7200, 0xA065, 0x7201, 0xA066, 0x7202, 0xA067,
+ 0x7203, 0xA068, 0x7204, 0xA069, 0x7205, 0xA06A, 0x7206, 0xB1AC,
+ 0x7207, 0xA06B, 0x7208, 0xA06C, 0x7209, 0xA06D, 0x720A, 0xA06E,
+ 0x720B, 0xA06F, 0x720C, 0xA070, 0x720D, 0xA071, 0x720E, 0xA072,
+ 0x720F, 0xA073, 0x7210, 0xA074, 0x7211, 0xA075, 0x7212, 0xA076,
+ 0x7213, 0xA077, 0x7214, 0xA078, 0x7215, 0xA079, 0x7216, 0xA07A,
+ 0x7217, 0xA07B, 0x7218, 0xA07C, 0x7219, 0xA07D, 0x721A, 0xA07E,
+ 0x721B, 0xA080, 0x721C, 0xA081, 0x721D, 0xECDF, 0x721E, 0xA082,
+ 0x721F, 0xA083, 0x7220, 0xA084, 0x7221, 0xA085, 0x7222, 0xA086,
+ 0x7223, 0xA087, 0x7224, 0xA088, 0x7225, 0xA089, 0x7226, 0xA08A,
+ 0x7227, 0xA08B, 0x7228, 0xECE0, 0x7229, 0xA08C, 0x722A, 0xD7A6,
+ 0x722B, 0xA08D, 0x722C, 0xC5C0, 0x722D, 0xA08E, 0x722E, 0xA08F,
+ 0x722F, 0xA090, 0x7230, 0xEBBC, 0x7231, 0xB0AE, 0x7232, 0xA091,
+ 0x7233, 0xA092, 0x7234, 0xA093, 0x7235, 0xBEF4, 0x7236, 0xB8B8,
+ 0x7237, 0xD2AF, 0x7238, 0xB0D6, 0x7239, 0xB5F9, 0x723A, 0xA094,
+ 0x723B, 0xD8B3, 0x723C, 0xA095, 0x723D, 0xCBAC, 0x723E, 0xA096,
+ 0x723F, 0xE3DD, 0x7240, 0xA097, 0x7241, 0xA098, 0x7242, 0xA099,
+ 0x7243, 0xA09A, 0x7244, 0xA09B, 0x7245, 0xA09C, 0x7246, 0xA09D,
+ 0x7247, 0xC6AC, 0x7248, 0xB0E6, 0x7249, 0xA09E, 0x724A, 0xA09F,
+ 0x724B, 0xA0A0, 0x724C, 0xC5C6, 0x724D, 0xEBB9, 0x724E, 0xA0A1,
+ 0x724F, 0xA0A2, 0x7250, 0xA0A3, 0x7251, 0xA0A4, 0x7252, 0xEBBA,
+ 0x7253, 0xA0A5, 0x7254, 0xA0A6, 0x7255, 0xA0A7, 0x7256, 0xEBBB,
+ 0x7257, 0xA0A8, 0x7258, 0xA0A9, 0x7259, 0xD1C0, 0x725A, 0xA0AA,
+ 0x725B, 0xC5A3, 0x725C, 0xA0AB, 0x725D, 0xEAF2, 0x725E, 0xA0AC,
+ 0x725F, 0xC4B2, 0x7260, 0xA0AD, 0x7261, 0xC4B5, 0x7262, 0xC0CE,
+ 0x7263, 0xA0AE, 0x7264, 0xA0AF, 0x7265, 0xA0B0, 0x7266, 0xEAF3,
+ 0x7267, 0xC4C1, 0x7268, 0xA0B1, 0x7269, 0xCEEF, 0x726A, 0xA0B2,
+ 0x726B, 0xA0B3, 0x726C, 0xA0B4, 0x726D, 0xA0B5, 0x726E, 0xEAF0,
+ 0x726F, 0xEAF4, 0x7270, 0xA0B6, 0x7271, 0xA0B7, 0x7272, 0xC9FC,
+ 0x7273, 0xA0B8, 0x7274, 0xA0B9, 0x7275, 0xC7A3, 0x7276, 0xA0BA,
+ 0x7277, 0xA0BB, 0x7278, 0xA0BC, 0x7279, 0xCCD8, 0x727A, 0xCEFE,
+ 0x727B, 0xA0BD, 0x727C, 0xA0BE, 0x727D, 0xA0BF, 0x727E, 0xEAF5,
+ 0x727F, 0xEAF6, 0x7280, 0xCFAC, 0x7281, 0xC0E7, 0x7282, 0xA0C0,
+ 0x7283, 0xA0C1,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58, 0x730A, 0xE2A5,
+ 0x730B, 0xAA59, 0x730C, 0xAA5A, 0x730D, 0xAA5B, 0x730E, 0xC1D4,
+ 0x730F, 0xAA5C, 0x7310, 0xAA5D, 0x7311, 0xAA5E, 0x7312, 0xAA5F,
+ 0x7313, 0xE2A3, 0x7314, 0xAA60, 0x7315, 0xE2A8, 0x7316, 0xB2FE,
+ 0x7317, 0xE2A2, 0x7318, 0xAA61, 0x7319, 0xAA62, 0x731A, 0xAA63,
+ 0x731B, 0xC3CD, 0x731C, 0xB2C2, 0x731D, 0xE2A7, 0x731E, 0xE2A6,
+ 0x731F, 0xAA64, 0x7320, 0xAA65, 0x7321, 0xE2A4, 0x7322, 0xE2A9,
+ 0x7323, 0xAA66, 0x7324, 0xAA67, 0x7325, 0xE2AB, 0x7326, 0xAA68,
+ 0x7327, 0xAA69, 0x7328, 0xAA6A, 0x7329, 0xD0C9, 0x732A, 0xD6ED,
+ 0x732B, 0xC3A8, 0x732C, 0xE2AC, 0x732D, 0xAA6B, 0x732E, 0xCFD7,
+ 0x732F, 0xAA6C, 0x7330, 0xAA6D, 0x7331, 0xE2AE, 0x7332, 0xAA6E,
+ 0x7333, 0xAA6F, 0x7334, 0xBAEF, 0x7335, 0xAA70, 0x7336, 0xAA71,
+ 0x7337, 0xE9E0, 0x7338, 0xE2AD, 0x7339, 0xE2AA, 0x733A, 0xAA72,
+ 0x733B, 0xAA73, 0x733C, 0xAA74, 0x733D, 0xAA75, 0x733E, 0xBBAB,
+ 0x733F, 0xD4B3, 0x7340, 0xAA76, 0x7341, 0xAA77, 0x7342, 0xAA78,
+ 0x7343, 0xAA79, 0x7344, 0xAA7A, 0x7345, 0xAA7B, 0x7346, 0xAA7C,
+ 0x7347, 0xAA7D, 0x7348, 0xAA7E, 0x7349, 0xAA80, 0x734A, 0xAA81,
+ 0x734B, 0xAA82, 0x734C, 0xAA83, 0x734D, 0xE2B0, 0x734E, 0xAA84,
+ 0x734F, 0xAA85, 0x7350, 0xE2AF, 0x7351, 0xAA86, 0x7352, 0xE9E1,
+ 0x7353, 0xAA87, 0x7354, 0xAA88, 0x7355, 0xAA89, 0x7356, 0xAA8A,
+ 0x7357, 0xE2B1, 0x7358, 0xAA8B, 0x7359, 0xAA8C, 0x735A, 0xAA8D,
+ 0x735B, 0xAA8E, 0x735C, 0xAA8F, 0x735D, 0xAA90, 0x735E, 0xAA91,
+ 0x735F, 0xAA92, 0x7360, 0xE2B2, 0x7361, 0xAA93, 0x7362, 0xAA94,
+ 0x7363, 0xAA95, 0x7364, 0xAA96, 0x7365, 0xAA97, 0x7366, 0xAA98,
+ 0x7367, 0xAA99, 0x7368, 0xAA9A, 0x7369, 0xAA9B, 0x736A, 0xAA9C,
+ 0x736B, 0xAA9D, 0x736C, 0xE2B3, 0x736D, 0xCCA1, 0x736E, 0xAA9E,
+ 0x736F, 0xE2B4, 0x7370, 0xAA9F, 0x7371, 0xAAA0, 0x7372, 0xAB40,
+ 0x7373, 0xAB41, 0x7374, 0xAB42, 0x7375, 0xAB43, 0x7376, 0xAB44,
+ 0x7377, 0xAB45, 0x7378, 0xAB46, 0x7379, 0xAB47, 0x737A, 0xAB48,
+ 0x737B, 0xAB49, 0x737C, 0xAB4A, 0x737D, 0xAB4B, 0x737E, 0xE2B5,
+ 0x737F, 0xAB4C, 0x7380, 0xAB4D, 0x7381, 0xAB4E, 0x7382, 0xAB4F,
+ 0x7383, 0xAB50, 0x7384, 0xD0FE, 0x7385, 0xAB51, 0x7386, 0xAB52,
+ 0x7387, 0xC2CA, 0x7388, 0xAB53, 0x7389, 0xD3F1, 0x738A, 0xAB54,
+ 0x738B, 0xCDF5, 0x738C, 0xAB55, 0x738D, 0xAB56, 0x738E, 0xE7E0,
+ 0x738F, 0xAB57, 0x7390, 0xAB58, 0x7391, 0xE7E1, 0x7392, 0xAB59,
+ 0x7393, 0xAB5A, 0x7394, 0xAB5B, 0x7395, 0xAB5C, 0x7396, 0xBEC1,
+ 0x7397, 0xAB5D, 0x7398, 0xAB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x73DC, 0xAB8C, 0x73DD, 0xAB8D, 0x73DE, 0xE7F3,
+ 0x73DF, 0xAB8E, 0x73E0, 0xD6E9, 0x73E1, 0xAB8F, 0x73E2, 0xAB90,
+ 0x73E3, 0xAB91, 0x73E4, 0xAB92, 0x73E5, 0xE7ED, 0x73E6, 0xAB93,
+ 0x73E7, 0xE7F2, 0x73E8, 0xAB94, 0x73E9, 0xE7F1, 0x73EA, 0xAB95,
+ 0x73EB, 0xAB96, 0x73EC, 0xAB97, 0x73ED, 0xB0E0, 0x73EE, 0xAB98,
+ 0x73EF, 0xAB99, 0x73F0, 0xAB9A, 0x73F1, 0xAB9B, 0x73F2, 0xE7F5,
+ 0x73F3, 0xAB9C, 0x73F4, 0xAB9D, 0x73F5, 0xAB9E, 0x73F6, 0xAB9F,
+ 0x73F7, 0xABA0, 0x73F8, 0xAC40, 0x73F9, 0xAC41, 0x73FA, 0xAC42,
+ 0x73FB, 0xAC43, 0x73FC, 0xAC44, 0x73FD, 0xAC45, 0x73FE, 0xAC46,
+ 0x73FF, 0xAC47, 0x7400, 0xAC48, 0x7401, 0xAC49, 0x7402, 0xAC4A,
+ 0x7403, 0xC7F2, 0x7404, 0xAC4B, 0x7405, 0xC0C5, 0x7406, 0xC0ED,
+ 0x7407, 0xAC4C, 0x7408, 0xAC4D, 0x7409, 0xC1F0, 0x740A, 0xE7F0,
+ 0x740B, 0xAC4E, 0x740C, 0xAC4F, 0x740D, 0xAC50, 0x740E, 0xAC51,
+ 0x740F, 0xE7F6, 0x7410, 0xCBF6, 0x7411, 0xAC52, 0x7412, 0xAC53,
+ 0x7413, 0xAC54, 0x7414, 0xAC55, 0x7415, 0xAC56, 0x7416, 0xAC57,
+ 0x7417, 0xAC58, 0x7418, 0xAC59, 0x7419, 0xAC5A, 0x741A, 0xE8A2,
+ 0x741B, 0xE8A1, 0x741C, 0xAC5B, 0x741D, 0xAC5C, 0x741E, 0xAC5D,
+ 0x741F, 0xAC5E, 0x7420, 0xAC5F, 0x7421, 0xAC60, 0x7422, 0xD7C1,
+ 0x7423, 0xAC61, 0x7424, 0xAC62, 0x7425, 0xE7FA, 0x7426, 0xE7F9,
+ 0x7427, 0xAC63, 0x7428, 0xE7FB, 0x7429, 0xAC64, 0x742A, 0xE7F7,
+ 0x742B, 0xAC65, 0x742C, 0xE7FE, 0x742D, 0xAC66, 0x742E, 0xE7FD,
+ 0x742F, 0xAC67, 0x7430, 0xE7FC, 0x7431, 0xAC68, 0x7432, 0xAC69,
+ 0x7433, 0xC1D5, 0x7434, 0xC7D9, 0x7435, 0xC5FD, 0x7436, 0xC5C3,
+ 0x7437, 0xAC6A, 0x7438, 0xAC6B, 0x7439, 0xAC6C, 0x743A, 0xAC6D,
+ 0x743B, 0xAC6E, 0x743C, 0xC7ED, 0x743D, 0xAC6F, 0x743E, 0xAC70,
+ 0x743F, 0xAC71, 0x7440, 0xAC72, 0x7441, 0xE8A3, 0x7442, 0xAC73,
+ 0x7443, 0xAC74, 0x7444, 0xAC75, 0x7445, 0xAC76, 0x7446, 0xAC77,
+ 0x7447, 0xAC78, 0x7448, 0xAC79, 0x7449, 0xAC7A, 0x744A, 0xAC7B,
+ 0x744B, 0xAC7C, 0x744C, 0xAC7D, 0x744D, 0xAC7E, 0x744E, 0xAC80,
+ 0x744F, 0xAC81, 0x7450, 0xAC82, 0x7451, 0xAC83, 0x7452, 0xAC84,
+ 0x7453, 0xAC85, 0x7454, 0xAC86, 0x7455, 0xE8A6, 0x7456, 0xAC87,
+ 0x7457, 0xE8A5, 0x7458, 0xAC88, 0x7459, 0xE8A7, 0x745A, 0xBAF7,
+ 0x745B, 0xE7F8, 0x745C, 0xE8A4, 0x745D, 0xAC89, 0x745E, 0xC8F0,
+ 0x745F, 0xC9AA, 0x7460, 0xAC8A, 0x7461, 0xAC8B, 0x7462, 0xAC8C,
+ 0x7463, 0xAC8D, 0x7464, 0xAC8E, 0x7465, 0xAC8F, 0x7466, 0xAC90,
+ 0x7467, 0xAC91, 0x7468, 0xAC92, 0x7469, 0xAC93, 0x746A, 0xAC94,
+ 0x746B, 0xAC95, 0x746C, 0xAC96, 0x746D, 0xE8A9, 0x746E, 0xAC97,
+ 0x746F, 0xAC98, 0x7470, 0xB9E5, 0x7471, 0xAC99, 0x7472, 0xAC9A,
+ 0x7473, 0xAC9B, 0x7474, 0xAC9C, 0x7475, 0xAC9D, 0x7476, 0xD1FE,
+ 0x7477, 0xE8A8, 0x7478, 0xAC9E, 0x7479, 0xAC9F, 0x747A, 0xACA0,
+ 0x747B, 0xAD40, 0x747C, 0xAD41, 0x747D, 0xAD42, 0x747E, 0xE8AA,
+ 0x747F, 0xAD43, 0x7480, 0xE8AD, 0x7481, 0xE8AE, 0x7482, 0xAD44,
+ 0x7483, 0xC1A7, 0x7484, 0xAD45, 0x7485, 0xAD46, 0x7486, 0xAD47,
+ 0x7487, 0xE8AF, 0x7488, 0xAD48, 0x7489, 0xAD49, 0x748A, 0xAD4A,
+ 0x748B, 0xE8B0, 0x748C, 0xAD4B, 0x748D, 0xAD4C, 0x748E, 0xE8AC,
+ 0x748F, 0xAD4D, 0x7490, 0xE8B4, 0x7491, 0xAD4E, 0x7492, 0xAD4F,
+ 0x7493, 0xAD50, 0x7494, 0xAD51, 0x7495, 0xAD52, 0x7496, 0xAD53,
+ 0x7497, 0xAD54, 0x7498, 0xAD55, 0x7499, 0xAD56, 0x749A, 0xAD57,
+ 0x749B, 0xAD58, 0x749C, 0xE8AB, 0x749D, 0xAD59, 0x749E, 0xE8B1,
+ 0x749F, 0xAD5A, 0x74A0, 0xAD5B, 0x74A1, 0xAD5C, 0x74A2, 0xAD5D,
+ 0x74A3, 0xAD5E, 0x74A4, 0xAD5F, 0x74A5, 0xAD60, 0x74A6, 0xAD61,
+ 0x74A7, 0xE8B5, 0x74A8, 0xE8B2, 0x74A9, 0xE8B3, 0x74AA, 0xAD62,
+ 0x74AB, 0xAD63, 0x74AC, 0xAD64, 0x74AD, 0xAD65, 0x74AE, 0xAD66,
+ 0x74AF, 0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
+ 0x74F3, 0xAE40, 0x74F4, 0xEAB2, 0x74F5, 0xAE41, 0x74F6, 0xC6BF,
+ 0x74F7, 0xB4C9, 0x74F8, 0xAE42, 0x74F9, 0xAE43, 0x74FA, 0xAE44,
+ 0x74FB, 0xAE45, 0x74FC, 0xAE46, 0x74FD, 0xAE47, 0x74FE, 0xAE48,
+ 0x74FF, 0xEAB3, 0x7500, 0xAE49, 0x7501, 0xAE4A, 0x7502, 0xAE4B,
+ 0x7503, 0xAE4C, 0x7504, 0xD5E7, 0x7505, 0xAE4D, 0x7506, 0xAE4E,
+ 0x7507, 0xAE4F, 0x7508, 0xAE50, 0x7509, 0xAE51, 0x750A, 0xAE52,
+ 0x750B, 0xAE53, 0x750C, 0xAE54, 0x750D, 0xDDF9, 0x750E, 0xAE55,
+ 0x750F, 0xEAB4, 0x7510, 0xAE56, 0x7511, 0xEAB5, 0x7512, 0xAE57,
+ 0x7513, 0xEAB6, 0x7514, 0xAE58, 0x7515, 0xAE59, 0x7516, 0xAE5A,
+ 0x7517, 0xAE5B, 0x7518, 0xB8CA, 0x7519, 0xDFB0, 0x751A, 0xC9F5,
+ 0x751B, 0xAE5C, 0x751C, 0xCCF0, 0x751D, 0xAE5D, 0x751E, 0xAE5E,
+ 0x751F, 0xC9FA, 0x7520, 0xAE5F, 0x7521, 0xAE60, 0x7522, 0xAE61,
+ 0x7523, 0xAE62, 0x7524, 0xAE63, 0x7525, 0xC9FB, 0x7526, 0xAE64,
+ 0x7527, 0xAE65, 0x7528, 0xD3C3, 0x7529, 0xCBA6, 0x752A, 0xAE66,
+ 0x752B, 0xB8A6, 0x752C, 0xF0AE, 0x752D, 0xB1C2, 0x752E, 0xAE67,
+ 0x752F, 0xE5B8, 0x7530, 0xCCEF, 0x7531, 0xD3C9, 0x7532, 0xBCD7,
+ 0x7533, 0xC9EA, 0x7534, 0xAE68, 0x7535, 0xB5E7, 0x7536, 0xAE69,
+ 0x7537, 0xC4D0, 0x7538, 0xB5E9, 0x7539, 0xAE6A, 0x753A, 0xEEAE,
+ 0x753B, 0xBBAD, 0x753C, 0xAE6B, 0x753D, 0xAE6C, 0x753E, 0xE7DE,
+ 0x753F, 0xAE6D, 0x7540, 0xEEAF, 0x7541, 0xAE6E, 0x7542, 0xAE6F,
+ 0x7543, 0xAE70, 0x7544, 0xAE71, 0x7545, 0xB3A9, 0x7546, 0xAE72,
+ 0x7547, 0xAE73, 0x7548, 0xEEB2, 0x7549, 0xAE74, 0x754A, 0xAE75,
+ 0x754B, 0xEEB1, 0x754C, 0xBDE7, 0x754D, 0xAE76, 0x754E, 0xEEB0,
+ 0x754F, 0xCEB7, 0x7550, 0xAE77, 0x7551, 0xAE78, 0x7552, 0xAE79,
+ 0x7553, 0xAE7A, 0x7554, 0xC5CF, 0x7555, 0xAE7B, 0x7556, 0xAE7C,
+ 0x7557, 0xAE7D, 0x7558, 0xAE7E, 0x7559, 0xC1F4, 0x755A, 0xDBCE,
+ 0x755B, 0xEEB3, 0x755C, 0xD0F3, 0x755D, 0xAE80, 0x755E, 0xAE81,
+ 0x755F, 0xAE82, 0x7560, 0xAE83, 0x7561, 0xAE84, 0x7562, 0xAE85,
+ 0x7563, 0xAE86, 0x7564, 0xAE87, 0x7565, 0xC2D4, 0x7566, 0xC6E8,
+ 0x7567, 0xAE88, 0x7568, 0xAE89, 0x7569, 0xAE8A, 0x756A, 0xB7AC,
+ 0x756B, 0xAE8B, 0x756C, 0xAE8C, 0x756D, 0xAE8D, 0x756E, 0xAE8E,
+ 0x756F, 0xAE8F, 0x7570, 0xAE90, 0x7571, 0xAE91, 0x7572, 0xEEB4,
+ 0x7573, 0xAE92, 0x7574, 0xB3EB, 0x7575, 0xAE93, 0x7576, 0xAE94,
+ 0x7577, 0xAE95, 0x7578, 0xBBFB, 0x7579, 0xEEB5, 0x757A, 0xAE96,
+ 0x757B, 0xAE97, 0x757C, 0xAE98, 0x757D, 0xAE99, 0x757E, 0xAE9A,
+ 0x757F, 0xE7DC, 0x7580, 0xAE9B, 0x7581, 0xAE9C, 0x7582, 0xAE9D,
+ 0x7583, 0xEEB6, 0x7584, 0xAE9E, 0x7585, 0xAE9F, 0x7586, 0xBDAE,
+ 0x7587, 0xAEA0, 0x7588, 0xAF40, 0x7589, 0xAF41, 0x758A, 0xAF42,
+ 0x758B, 0xF1E2, 0x758C, 0xAF43, 0x758D, 0xAF44, 0x758E, 0xAF45,
+ 0x758F, 0xCAE8, 0x7590, 0xAF46, 0x7591, 0xD2C9, 0x7592, 0xF0DA,
+ 0x7593, 0xAF47, 0x7594, 0xF0DB, 0x7595, 0xAF48, 0x7596, 0xF0DC,
+ 0x7597, 0xC1C6, 0x7598, 0xAF49, 0x7599, 0xB8ED, 0x759A, 0xBECE,
+ 0x759B, 0xAF4A, 0x759C, 0xAF4B, 0x759D, 0xF0DE, 0x759E, 0xAF4C,
+ 0x759F, 0xC5B1, 0x75A0, 0xF0DD, 0x75A1, 0xD1F1, 0x75A2, 0xAF4D,
+ 0x75A3, 0xF0E0, 0x75A4, 0xB0CC, 0x75A5, 0xBDEA, 0x75A6, 0xAF4E,
+ 0x75A7, 0xAF4F, 0x75A8, 0xAF50, 0x75A9, 0xAF51, 0x75AA, 0xAF52,
+ 0x75AB, 0xD2DF, 0x75AC, 0xF0DF, 0x75AD, 0xAF53, 0x75AE, 0xB4AF,
+ 0x75AF, 0xB7E8, 0x75B0, 0xF0E6, 0x75B1, 0xF0E5, 0x75B2, 0xC6A3,
+ 0x75B3, 0xF0E1, 0x75B4, 0xF0E2, 0x75B5, 0xB4C3, 0x75B6, 0xAF54,
+ 0x75B7, 0xAF55, 0x75B8, 0xF0E3, 0x75B9, 0xD5EE, 0x75BA, 0xAF56,
+ 0x75BB, 0xAF57, 0x75BC, 0xCCDB, 0x75BD, 0xBED2, 0x75BE, 0xBCB2,
+ 0x75BF, 0xAF58, 0x75C0, 0xAF59, 0x75C1, 0xAF5A, 0x75C2, 0xF0E8,
+ 0x75C3, 0xF0E7, 0x75C4, 0xF0E4, 0x75C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x7608, 0xAF80, 0x7609, 0xAF81, 0x760A, 0xF0FA,
+ 0x760B, 0xAF82, 0x760C, 0xF0F8, 0x760D, 0xAF83, 0x760E, 0xAF84,
+ 0x760F, 0xAF85, 0x7610, 0xF0F5, 0x7611, 0xAF86, 0x7612, 0xAF87,
+ 0x7613, 0xAF88, 0x7614, 0xAF89, 0x7615, 0xF0FD, 0x7616, 0xAF8A,
+ 0x7617, 0xF0F9, 0x7618, 0xF0FC, 0x7619, 0xF0FE, 0x761A, 0xAF8B,
+ 0x761B, 0xF1A1, 0x761C, 0xAF8C, 0x761D, 0xAF8D, 0x761E, 0xAF8E,
+ 0x761F, 0xCEC1, 0x7620, 0xF1A4, 0x7621, 0xAF8F, 0x7622, 0xF1A3,
+ 0x7623, 0xAF90, 0x7624, 0xC1F6, 0x7625, 0xF0FB, 0x7626, 0xCADD,
+ 0x7627, 0xAF91, 0x7628, 0xAF92, 0x7629, 0xB4F1, 0x762A, 0xB1F1,
+ 0x762B, 0xCCB1, 0x762C, 0xAF93, 0x762D, 0xF1A6, 0x762E, 0xAF94,
+ 0x762F, 0xAF95, 0x7630, 0xF1A7, 0x7631, 0xAF96, 0x7632, 0xAF97,
+ 0x7633, 0xF1AC, 0x7634, 0xD5CE, 0x7635, 0xF1A9, 0x7636, 0xAF98,
+ 0x7637, 0xAF99, 0x7638, 0xC8B3, 0x7639, 0xAF9A, 0x763A, 0xAF9B,
+ 0x763B, 0xAF9C, 0x763C, 0xF1A2, 0x763D, 0xAF9D, 0x763E, 0xF1AB,
+ 0x763F, 0xF1A8, 0x7640, 0xF1A5, 0x7641, 0xAF9E, 0x7642, 0xAF9F,
+ 0x7643, 0xF1AA, 0x7644, 0xAFA0, 0x7645, 0xB040, 0x7646, 0xB041,
+ 0x7647, 0xB042, 0x7648, 0xB043, 0x7649, 0xB044, 0x764A, 0xB045,
+ 0x764B, 0xB046, 0x764C, 0xB0A9, 0x764D, 0xF1AD, 0x764E, 0xB047,
+ 0x764F, 0xB048, 0x7650, 0xB049, 0x7651, 0xB04A, 0x7652, 0xB04B,
+ 0x7653, 0xB04C, 0x7654, 0xF1AF, 0x7655, 0xB04D, 0x7656, 0xF1B1,
+ 0x7657, 0xB04E, 0x7658, 0xB04F, 0x7659, 0xB050, 0x765A, 0xB051,
+ 0x765B, 0xB052, 0x765C, 0xF1B0, 0x765D, 0xB053, 0x765E, 0xF1AE,
+ 0x765F, 0xB054, 0x7660, 0xB055, 0x7661, 0xB056, 0x7662, 0xB057,
+ 0x7663, 0xD1A2, 0x7664, 0xB058, 0x7665, 0xB059, 0x7666, 0xB05A,
+ 0x7667, 0xB05B, 0x7668, 0xB05C, 0x7669, 0xB05D, 0x766A, 0xB05E,
+ 0x766B, 0xF1B2, 0x766C, 0xB05F, 0x766D, 0xB060, 0x766E, 0xB061,
+ 0x766F, 0xF1B3, 0x7670, 0xB062, 0x7671, 0xB063, 0x7672, 0xB064,
+ 0x7673, 0xB065, 0x7674, 0xB066, 0x7675, 0xB067, 0x7676, 0xB068,
+ 0x7677, 0xB069, 0x7678, 0xB9EF, 0x7679, 0xB06A, 0x767A, 0xB06B,
+ 0x767B, 0xB5C7, 0x767C, 0xB06C, 0x767D, 0xB0D7, 0x767E, 0xB0D9,
+ 0x767F, 0xB06D, 0x7680, 0xB06E, 0x7681, 0xB06F, 0x7682, 0xD4ED,
+ 0x7683, 0xB070, 0x7684, 0xB5C4, 0x7685, 0xB071, 0x7686, 0xBDD4,
+ 0x7687, 0xBBCA, 0x7688, 0xF0A7, 0x7689, 0xB072, 0x768A, 0xB073,
+ 0x768B, 0xB8DE, 0x768C, 0xB074, 0x768D, 0xB075, 0x768E, 0xF0A8,
+ 0x768F, 0xB076, 0x7690, 0xB077, 0x7691, 0xB0A8, 0x7692, 0xB078,
+ 0x7693, 0xF0A9, 0x7694, 0xB079, 0x7695, 0xB07A, 0x7696, 0xCDEE,
+ 0x7697, 0xB07B, 0x7698, 0xB07C, 0x7699, 0xF0AA, 0x769A, 0xB07D,
+ 0x769B, 0xB07E, 0x769C, 0xB080, 0x769D, 0xB081, 0x769E, 0xB082,
+ 0x769F, 0xB083, 0x76A0, 0xB084, 0x76A1, 0xB085, 0x76A2, 0xB086,
+ 0x76A3, 0xB087, 0x76A4, 0xF0AB, 0x76A5, 0xB088, 0x76A6, 0xB089,
+ 0x76A7, 0xB08A, 0x76A8, 0xB08B, 0x76A9, 0xB08C, 0x76AA, 0xB08D,
+ 0x76AB, 0xB08E, 0x76AC, 0xB08F, 0x76AD, 0xB090, 0x76AE, 0xC6A4,
+ 0x76AF, 0xB091, 0x76B0, 0xB092, 0x76B1, 0xD6E5, 0x76B2, 0xF1E4,
+ 0x76B3, 0xB093, 0x76B4, 0xF1E5, 0x76B5, 0xB094, 0x76B6, 0xB095,
+ 0x76B7, 0xB096, 0x76B8, 0xB097, 0x76B9, 0xB098, 0x76BA, 0xB099,
+ 0x76BB, 0xB09A, 0x76BC, 0xB09B, 0x76BD, 0xB09C, 0x76BE, 0xB09D,
+ 0x76BF, 0xC3F3, 0x76C0, 0xB09E, 0x76C1, 0xB09F, 0x76C2, 0xD3DB,
+ 0x76C3, 0xB0A0, 0x76C4, 0xB140, 0x76C5, 0xD6D1, 0x76C6, 0xC5E8,
+ 0x76C7, 0xB141, 0x76C8, 0xD3AF, 0x76C9, 0xB142, 0x76CA, 0xD2E6,
+ 0x76CB, 0xB143, 0x76CC, 0xB144, 0x76CD, 0xEEC1, 0x76CE, 0xB0BB,
+ 0x76CF, 0xD5B5, 0x76D0, 0xD1CE, 0x76D1, 0xBCE0, 0x76D2, 0xBAD0,
+ 0x76D3, 0xB145, 0x76D4, 0xBFF8, 0x76D5, 0xB146, 0x76D6, 0xB8C7,
+ 0x76D7, 0xB5C1, 0x76D8, 0xC5CC, 0x76D9, 0xB147, 0x76DA, 0xB148,
+ 0x76DB, 0xCAA2, 0x76DC, 0xB149, 0x76DD, 0xB14A, 0x76DE, 0xB14B,
+ 0x76DF, 0xC3CB, 0x76E0, 0xB14C, 0x76E1, 0xB14D, 0x76E2, 0xB14E,
+ 0x76E3, 0xB14F, 0x76E4, 0xB150, 0x76E5, 0xEEC2, 0x76E6, 0xB151,
+ 0x76E7, 0xB152, 0x76E8, 0xB153, 0x76E9, 0xB154, 0x76EA, 0xB155,
+ 0x76EB, 0xB156, 0x76EC, 0xB157, 0x76ED, 0xB158, 0x76EE, 0xC4BF,
+ 0x76EF, 0xB6A2, 0x76F0, 0xB159, 0x76F1, 0xEDEC, 0x76F2, 0xC3A4,
+ 0x76F3, 0xB15A, 0x76F4, 0xD6B1, 0x76F5, 0xB15B, 0x76F6, 0xB15C,
+ 0x76F7, 0xB15D, 0x76F8, 0xCFE0, 0x76F9, 0xEDEF, 0x76FA, 0xB15E,
+ 0x76FB, 0xB15F, 0x76FC, 0xC5CE, 0x76FD, 0xB160, 0x76FE, 0xB6DC,
+ 0x76FF, 0xB161, 0x7700, 0xB162, 0x7701, 0xCAA1, 0x7702, 0xB163,
+ 0x7703, 0xB164, 0x7704, 0xEDED, 0x7705, 0xB165, 0x7706, 0xB166,
+ 0x7707, 0xEDF0, 0x7708, 0xEDF1, 0x7709, 0xC3BC, 0x770A, 0xB167,
+ 0x770B, 0xBFB4, 0x770C, 0xB168, 0x770D, 0xEDEE, 0x770E, 0xB169,
+ 0x770F, 0xB16A, 0x7710, 0xB16B, 0x7711, 0xB16C, 0x7712, 0xB16D,
+ 0x7713, 0xB16E, 0x7714, 0xB16F, 0x7715, 0xB170, 0x7716, 0xB171,
+ 0x7717, 0xB172, 0x7718, 0xB173, 0x7719, 0xEDF4, 0x771A, 0xEDF2,
+ 0x771B, 0xB174, 0x771C, 0xB175, 0x771D, 0xB176, 0x771E, 0xB177,
+ 0x771F, 0xD5E6, 0x7720, 0xC3DF, 0x7721, 0xB178, 0x7722, 0xEDF3,
+ 0x7723, 0xB179, 0x7724, 0xB17A, 0x7725, 0xB17B, 0x7726, 0xEDF6,
+ 0x7727, 0xB17C, 0x7728, 0xD5A3, 0x7729, 0xD1A3, 0x772A, 0xB17D,
+ 0x772B, 0xB17E, 0x772C, 0xB180, 0x772D, 0xEDF5, 0x772E, 0xB181,
+ 0x772F, 0xC3D0, 0x7730, 0xB182, 0x7731, 0xB183, 0x7732, 0xB184,
+ 0x7733, 0xB185, 0x7734, 0xB186, 0x7735, 0xEDF7, 0x7736, 0xBFF4,
+ 0x7737, 0xBEEC, 0x7738, 0xEDF8, 0x7739, 0xB187, 0x773A, 0xCCF7,
+ 0x773B, 0xB188, 0x773C, 0xD1DB, 0x773D, 0xB189, 0x773E, 0xB18A,
+ 0x773F, 0xB18B, 0x7740, 0xD7C5, 0x7741, 0xD5F6, 0x7742, 0xB18C,
+ 0x7743, 0xEDFC, 0x7744, 0xB18D, 0x7745, 0xB18E, 0x7746, 0xB18F,
+ 0x7747, 0xEDFB, 0x7748, 0xB190, 0x7749, 0xB191, 0x774A, 0xB192,
+ 0x774B, 0xB193, 0x774C, 0xB194, 0x774D, 0xB195, 0x774E, 0xB196,
+ 0x774F, 0xB197, 0x7750, 0xEDF9, 0x7751, 0xEDFA, 0x7752, 0xB198,
+ 0x7753, 0xB199, 0x7754, 0xB19A, 0x7755, 0xB19B, 0x7756, 0xB19C,
+ 0x7757, 0xB19D, 0x7758, 0xB19E, 0x7759, 0xB19F, 0x775A, 0xEDFD,
+ 0x775B, 0xBEA6, 0x775C, 0xB1A0, 0x775D, 0xB240, 0x775E, 0xB241,
+ 0x775F, 0xB242, 0x7760, 0xB243, 0x7761, 0xCBAF, 0x7762, 0xEEA1,
+ 0x7763, 0xB6BD, 0x7764, 0xB244, 0x7765, 0xEEA2, 0x7766, 0xC4C0,
+ 0x7767, 0xB245, 0x7768, 0xEDFE, 0x7769, 0xB246, 0x776A, 0xB247,
+ 0x776B, 0xBDDE, 0x776C, 0xB2C7, 0x776D, 0xB248, 0x776E, 0xB249,
+ 0x776F, 0xB24A, 0x7770, 0xB24B, 0x7771, 0xB24C, 0x7772, 0xB24D,
+ 0x7773, 0xB24E, 0x7774, 0xB24F, 0x7775, 0xB250, 0x7776, 0xB251,
+ 0x7777, 0xB252, 0x7778, 0xB253, 0x7779, 0xB6C3, 0x777A, 0xB254,
+ 0x777B, 0xB255, 0x777C, 0xB256, 0x777D, 0xEEA5, 0x777E, 0xD8BA,
+ 0x777F, 0xEEA3, 0x7780, 0xEEA6, 0x7781, 0xB257, 0x7782, 0xB258,
+ 0x7783, 0xB259, 0x7784, 0xC3E9, 0x7785, 0xB3F2, 0x7786, 0xB25A,
+ 0x7787, 0xB25B, 0x7788, 0xB25C, 0x7789, 0xB25D, 0x778A, 0xB25E,
+ 0x778B, 0xB25F, 0x778C, 0xEEA7, 0x778D, 0xEEA4, 0x778E, 0xCFB9,
+ 0x778F, 0xB260, 0x7790, 0xB261, 0x7791, 0xEEA8, 0x7792, 0xC2F7,
+ 0x7793, 0xB262, 0x7794, 0xB263, 0x7795, 0xB264, 0x7796, 0xB265,
+ 0x7797, 0xB266, 0x7798, 0xB267, 0x7799, 0xB268, 0x779A, 0xB269,
+ 0x779B, 0xB26A, 0x779C, 0xB26B, 0x779D, 0xB26C, 0x779E, 0xB26D,
+ 0x779F, 0xEEA9, 0x77A0, 0xEEAA, 0x77A1, 0xB26E, 0x77A2, 0xDEAB,
+ 0x77A3, 0xB26F, 0x77A4, 0xB270, 0x77A5, 0xC6B3, 0x77A6, 0xB271,
+ 0x77A7, 0xC7C6, 0x77A8, 0xB272, 0x77A9, 0xD6F5, 0x77AA, 0xB5C9,
+ 0x77AB, 0xB273, 0x77AC, 0xCBB2, 0x77AD, 0xB274, 0x77AE, 0xB275,
+ 0x77AF, 0xB276, 0x77B0, 0xEEAB, 0x77B1, 0xB277, 0x77B2, 0xB278,
+ 0x77B3, 0xCDAB, 0x77B4, 0xB279, 0x77B5, 0xEEAC, 0x77B6, 0xB27A,
+ 0x77B7, 0xB27B, 0x77B8, 0xB27C, 0x77B9, 0xB27D, 0x77BA, 0xB27E,
+ 0x77BB, 0xD5B0, 0x77BC, 0xB280, 0x77BD, 0xEEAD, 0x77BE, 0xB281,
+ 0x77BF, 0xF6C4, 0x77C0, 0xB282, 0x77C1, 0xB283, 0x77C2, 0xB284,
+ 0x77C3, 0xB285, 0x77C4, 0xB286, 0x77C5, 0xB287, 0x77C6, 0xB288,
+ 0x77C7, 0xB289, 0x77C8, 0xB28A, 0x77C9, 0xB28B, 0x77CA, 0xB28C,
+ 0x77CB, 0xB28D, 0x77CC, 0xB28E, 0x77CD, 0xDBC7, 0x77CE, 0xB28F,
+ 0x77CF, 0xB290, 0x77D0, 0xB291, 0x77D1, 0xB292, 0x77D2, 0xB293,
+ 0x77D3, 0xB294, 0x77D4, 0xB295, 0x77D5, 0xB296, 0x77D6, 0xB297,
+ 0x77D7, 0xB4A3, 0x77D8, 0xB298, 0x77D9, 0xB299, 0x77DA, 0xB29A,
+ 0x77DB, 0xC3AC, 0x77DC, 0xF1E6, 0x77DD, 0xB29B, 0x77DE, 0xB29C,
+ 0x77DF, 0xB29D, 0x77E0, 0xB29E, 0x77E1, 0xB29F, 0x77E2, 0xCAB8,
+ 0x77E3, 0xD2D3, 0x77E4, 0xB2A0, 0x77E5, 0xD6AA, 0x77E6, 0xB340,
+ 0x77E7, 0xEFF2, 0x77E8, 0xB341, 0x77E9, 0xBED8, 0x77EA, 0xB342,
+ 0x77EB, 0xBDC3, 0x77EC, 0xEFF3, 0x77ED, 0xB6CC, 0x77EE, 0xB0AB,
+ 0x77EF, 0xB343, 0x77F0, 0xB344, 0x77F1, 0xB345, 0x77F2, 0xB346,
+ 0x77F3, 0xCAAF, 0x77F4, 0xB347, 0x77F5, 0xB348, 0x77F6, 0xEDB6,
+ 0x77F7, 0xB349, 0x77F8, 0xEDB7, 0x77F9, 0xB34A, 0x77FA, 0xB34B,
+ 0x77FB, 0xB34C, 0x77FC, 0xB34D, 0x77FD, 0xCEF9, 0x77FE, 0xB7AF,
+ 0x77FF, 0xBFF3, 0x7800, 0xEDB8, 0x7801, 0xC2EB, 0x7802, 0xC9B0,
+ 0x7803, 0xB34E, 0x7804, 0xB34F, 0x7805, 0xB350, 0x7806, 0xB351,
+ 0x7807, 0xB352, 0x7808, 0xB353, 0x7809, 0xEDB9, 0x780A, 0xB354,
+ 0x780B, 0xB355, 0x780C, 0xC6F6, 0x780D, 0xBFB3, 0x780E, 0xB356,
+ 0x780F, 0xB357, 0x7810, 0xB358, 0x7811, 0xEDBC, 0x7812, 0xC5F8,
+ 0x7813, 0xB359, 0x7814, 0xD1D0, 0x7815, 0xB35A, 0x7816, 0xD7A9,
+ 0x7817, 0xEDBA, 0x7818, 0xEDBB, 0x7819, 0xB35B, 0x781A, 0xD1E2,
+ 0x781B, 0xB35C, 0x781C, 0xEDBF, 0x781D, 0xEDC0, 0x781E, 0xB35D,
+ 0x781F, 0xEDC4, 0x7820, 0xB35E, 0x7821, 0xB35F, 0x7822, 0xB360,
+ 0x7823, 0xEDC8, 0x7824, 0xB361, 0x7825, 0xEDC6, 0x7826, 0xEDCE,
+ 0x7827, 0xD5E8, 0x7828, 0xB362, 0x7829, 0xEDC9, 0x782A, 0xB363,
+ 0x782B, 0xB364, 0x782C, 0xEDC7, 0x782D, 0xEDBE, 0x782E, 0xB365,
+ 0x782F, 0xB366, 0x7830, 0xC5E9, 0x7831, 0xB367, 0x7832, 0xB368,
+ 0x7833, 0xB369, 0x7834, 0xC6C6, 0x7835, 0xB36A, 0x7836, 0xB36B,
+ 0x7837, 0xC9E9, 0x7838, 0xD4D2, 0x7839, 0xEDC1, 0x783A, 0xEDC2,
+ 0x783B, 0xEDC3, 0x783C, 0xEDC5, 0x783D, 0xB36C, 0x783E, 0xC0F9,
+ 0x783F, 0xB36D, 0x7840, 0xB4A1, 0x7841, 0xB36E, 0x7842, 0xB36F,
+ 0x7843, 0xB370, 0x7844, 0xB371, 0x7845, 0xB9E8, 0x7846, 0xB372,
+ 0x7847, 0xEDD0, 0x7848, 0xB373, 0x7849, 0xB374, 0x784A, 0xB375,
+ 0x784B, 0xB376, 0x784C, 0xEDD1, 0x784D, 0xB377, 0x784E, 0xEDCA,
+ 0x784F, 0xB378, 0x7850, 0xEDCF, 0x7851, 0xB379, 0x7852, 0xCEF8,
+ 0x7853, 0xB37A, 0x7854, 0xB37B, 0x7855, 0xCBB6, 0x7856, 0xEDCC,
+ 0x7857, 0xEDCD, 0x7858, 0xB37C, 0x7859, 0xB37D, 0x785A, 0xB37E,
+ 0x785B, 0xB380, 0x785C, 0xB381, 0x785D, 0xCFF5, 0x785E, 0xB382,
+ 0x785F, 0xB383, 0x7860, 0xB384, 0x7861, 0xB385, 0x7862, 0xB386,
+ 0x7863, 0xB387, 0x7864, 0xB388, 0x7865, 0xB389, 0x7866, 0xB38A,
+ 0x7867, 0xB38B, 0x7868, 0xB38C, 0x7869, 0xB38D, 0x786A, 0xEDD2,
+ 0x786B, 0xC1F2, 0x786C, 0xD3B2, 0x786D, 0xEDCB, 0x786E, 0xC8B7,
+ 0x786F, 0xB38E, 0x7870, 0xB38F, 0x7871, 0xB390, 0x7872, 0xB391,
+ 0x7873, 0xB392, 0x7874, 0xB393, 0x7875, 0xB394, 0x7876, 0xB395,
+ 0x7877, 0xBCEF, 0x7878, 0xB396, 0x7879, 0xB397, 0x787A, 0xB398,
+ 0x787B, 0xB399, 0x787C, 0xC5F0, 0x787D, 0xB39A, 0x787E, 0xB39B,
+ 0x787F, 0xB39C, 0x7880, 0xB39D, 0x7881, 0xB39E, 0x7882, 0xB39F,
+ 0x7883, 0xB3A0, 0x7884, 0xB440, 0x7885, 0xB441, 0x7886, 0xB442,
+ 0x7887, 0xEDD6, 0x7888, 0xB443, 0x7889, 0xB5EF, 0x788A, 0xB444,
+ 0x788B, 0xB445, 0x788C, 0xC2B5, 0x788D, 0xB0AD, 0x788E, 0xCBE9,
+ 0x788F, 0xB446, 0x7890, 0xB447, 0x7891, 0xB1AE, 0x7892, 0xB448,
+ 0x7893, 0xEDD4, 0x7894, 0xB449, 0x7895, 0xB44A, 0x7896, 0xB44B,
+ 0x7897, 0xCDEB, 0x7898, 0xB5E2, 0x7899, 0xB44C, 0x789A, 0xEDD5,
+ 0x789B, 0xEDD3, 0x789C, 0xEDD7, 0x789D, 0xB44D, 0x789E, 0xB44E,
+ 0x789F, 0xB5FA, 0x78A0, 0xB44F, 0x78A1, 0xEDD8, 0x78A2, 0xB450,
+ 0x78A3, 0xEDD9, 0x78A4, 0xB451, 0x78A5, 0xEDDC, 0x78A6, 0xB452,
+ 0x78A7, 0xB1CC, 0x78A8, 0xB453, 0x78A9, 0xB454, 0x78AA, 0xB455,
+ 0x78AB, 0xB456, 0x78AC, 0xB457, 0x78AD, 0xB458, 0x78AE, 0xB459,
+ 0x78AF, 0xB45A, 0x78B0, 0xC5F6, 0x78B1, 0xBCEE, 0x78B2, 0xEDDA,
+ 0x78B3, 0xCCBC, 0x78B4, 0xB2EA, 0x78B5, 0xB45B, 0x78B6, 0xB45C,
+ 0x78B7, 0xB45D, 0x78B8, 0xB45E, 0x78B9, 0xEDDB, 0x78BA, 0xB45F,
+ 0x78BB, 0xB460, 0x78BC, 0xB461, 0x78BD, 0xB462, 0x78BE, 0xC4EB,
+ 0x78BF, 0xB463, 0x78C0, 0xB464, 0x78C1, 0xB4C5, 0x78C2, 0xB465,
+ 0x78C3, 0xB466, 0x78C4, 0xB467, 0x78C5, 0xB0F5, 0x78C6, 0xB468,
+ 0x78C7, 0xB469, 0x78C8, 0xB46A, 0x78C9, 0xEDDF, 0x78CA, 0xC0DA,
+ 0x78CB, 0xB4E8, 0x78CC, 0xB46B, 0x78CD, 0xB46C, 0x78CE, 0xB46D,
+ 0x78CF, 0xB46E, 0x78D0, 0xC5CD, 0x78D1, 0xB46F, 0x78D2, 0xB470,
+ 0x78D3, 0xB471, 0x78D4, 0xEDDD, 0x78D5, 0xBFC4, 0x78D6, 0xB472,
+ 0x78D7, 0xB473, 0x78D8, 0xB474, 0x78D9, 0xEDDE, 0x78DA, 0xB475,
+ 0x78DB, 0xB476, 0x78DC, 0xB477, 0x78DD, 0xB478, 0x78DE, 0xB479,
+ 0x78DF, 0xB47A, 0x78E0, 0xB47B, 0x78E1, 0xB47C, 0x78E2, 0xB47D,
+ 0x78E3, 0xB47E, 0x78E4, 0xB480, 0x78E5, 0xB481, 0x78E6, 0xB482,
+ 0x78E7, 0xB483, 0x78E8, 0xC4A5, 0x78E9, 0xB484, 0x78EA, 0xB485,
+ 0x78EB, 0xB486, 0x78EC, 0xEDE0, 0x78ED, 0xB487, 0x78EE, 0xB488,
+ 0x78EF, 0xB489, 0x78F0, 0xB48A, 0x78F1, 0xB48B, 0x78F2, 0xEDE1,
+ 0x78F3, 0xB48C, 0x78F4, 0xEDE3, 0x78F5, 0xB48D, 0x78F6, 0xB48E,
+ 0x78F7, 0xC1D7, 0x78F8, 0xB48F, 0x78F9, 0xB490, 0x78FA, 0xBBC7,
+ 0x78FB, 0xB491, 0x78FC, 0xB492, 0x78FD, 0xB493, 0x78FE, 0xB494,
+ 0x78FF, 0xB495, 0x7900, 0xB496, 0x7901, 0xBDB8, 0x7902, 0xB497,
+ 0x7903, 0xB498, 0x7904, 0xB499, 0x7905, 0xEDE2, 0x7906, 0xB49A,
+ 0x7907, 0xB49B, 0x7908, 0xB49C, 0x7909, 0xB49D, 0x790A, 0xB49E,
+ 0x790B, 0xB49F, 0x790C, 0xB4A0, 0x790D, 0xB540, 0x790E, 0xB541,
+ 0x790F, 0xB542, 0x7910, 0xB543, 0x7911, 0xB544, 0x7912, 0xB545,
+ 0x7913, 0xEDE4, 0x7914, 0xB546, 0x7915, 0xB547, 0x7916, 0xB548,
+ 0x7917, 0xB549, 0x7918, 0xB54A, 0x7919, 0xB54B, 0x791A, 0xB54C,
+ 0x791B, 0xB54D, 0x791C, 0xB54E, 0x791D, 0xB54F, 0x791E, 0xEDE6,
+ 0x791F, 0xB550, 0x7920, 0xB551, 0x7921, 0xB552, 0x7922, 0xB553,
+ 0x7923, 0xB554, 0x7924, 0xEDE5, 0x7925, 0xB555, 0x7926, 0xB556,
+ 0x7927, 0xB557, 0x7928, 0xB558, 0x7929, 0xB559, 0x792A, 0xB55A,
+ 0x792B, 0xB55B, 0x792C, 0xB55C, 0x792D, 0xB55D, 0x792E, 0xB55E,
+ 0x792F, 0xB55F, 0x7930, 0xB560, 0x7931, 0xB561, 0x7932, 0xB562,
+ 0x7933, 0xB563, 0x7934, 0xEDE7, 0x7935, 0xB564, 0x7936, 0xB565,
+ 0x7937, 0xB566, 0x7938, 0xB567, 0x7939, 0xB568, 0x793A, 0xCABE,
+ 0x793B, 0xECEA, 0x793C, 0xC0F1, 0x793D, 0xB569, 0x793E, 0xC9E7,
+ 0x793F, 0xB56A, 0x7940, 0xECEB, 0x7941, 0xC6EE, 0x7942, 0xB56B,
+ 0x7943, 0xB56C, 0x7944, 0xB56D, 0x7945, 0xB56E, 0x7946, 0xECEC,
+ 0x7947, 0xB56F, 0x7948, 0xC6ED, 0x7949, 0xECED, 0x794A, 0xB570,
+ 0x794B, 0xB571, 0x794C, 0xB572, 0x794D, 0xB573, 0x794E, 0xB574,
+ 0x794F, 0xB575, 0x7950, 0xB576, 0x7951, 0xB577, 0x7952, 0xB578,
+ 0x7953, 0xECF0, 0x7954, 0xB579, 0x7955, 0xB57A, 0x7956, 0xD7E6,
+ 0x7957, 0xECF3, 0x7958, 0xB57B, 0x7959, 0xB57C, 0x795A, 0xECF1,
+ 0x795B, 0xECEE, 0x795C, 0xECEF, 0x795D, 0xD7A3, 0x795E, 0xC9F1,
+ 0x795F, 0xCBEE, 0x7960, 0xECF4, 0x7961, 0xB57D, 0x7962, 0xECF2,
+ 0x7963, 0xB57E, 0x7964, 0xB580, 0x7965, 0xCFE9, 0x7966, 0xB581,
+ 0x7967, 0xECF6, 0x7968, 0xC6B1, 0x7969, 0xB582, 0x796A, 0xB583,
+ 0x796B, 0xB584, 0x796C, 0xB585, 0x796D, 0xBCC0, 0x796E, 0xB586,
+ 0x796F, 0xECF5, 0x7970, 0xB587, 0x7971, 0xB588, 0x7972, 0xB589,
+ 0x7973, 0xB58A, 0x7974, 0xB58B, 0x7975, 0xB58C, 0x7976, 0xB58D,
+ 0x7977, 0xB5BB, 0x7978, 0xBBF6, 0x7979, 0xB58E, 0x797A, 0xECF7,
+ 0x797B, 0xB58F, 0x797C, 0xB590, 0x797D, 0xB591, 0x797E, 0xB592,
+ 0x797F, 0xB593, 0x7980, 0xD9F7, 0x7981, 0xBDFB, 0x7982, 0xB594,
+ 0x7983, 0xB595, 0x7984, 0xC2BB, 0x7985, 0xECF8, 0x7986, 0xB596,
+ 0x7987, 0xB597, 0x7988, 0xB598, 0x7989, 0xB599, 0x798A, 0xECF9,
+ 0x798B, 0xB59A, 0x798C, 0xB59B, 0x798D, 0xB59C, 0x798E, 0xB59D,
+ 0x798F, 0xB8A3, 0x7990, 0xB59E, 0x7991, 0xB59F, 0x7992, 0xB5A0,
+ 0x7993, 0xB640, 0x7994, 0xB641, 0x7995, 0xB642, 0x7996, 0xB643,
+ 0x7997, 0xB644, 0x7998, 0xB645, 0x7999, 0xB646, 0x799A, 0xECFA,
+ 0x799B, 0xB647, 0x799C, 0xB648, 0x799D, 0xB649, 0x799E, 0xB64A,
+ 0x799F, 0xB64B, 0x79A0, 0xB64C, 0x79A1, 0xB64D, 0x79A2, 0xB64E,
+ 0x79A3, 0xB64F, 0x79A4, 0xB650, 0x79A5, 0xB651, 0x79A6, 0xB652,
+ 0x79A7, 0xECFB, 0x79A8, 0xB653, 0x79A9, 0xB654, 0x79AA, 0xB655,
+ 0x79AB, 0xB656, 0x79AC, 0xB657, 0x79AD, 0xB658, 0x79AE, 0xB659,
+ 0x79AF, 0xB65A, 0x79B0, 0xB65B, 0x79B1, 0xB65C, 0x79B2, 0xB65D,
+ 0x79B3, 0xECFC, 0x79B4, 0xB65E, 0x79B5, 0xB65F, 0x79B6, 0xB660,
+ 0x79B7, 0xB661, 0x79B8, 0xB662, 0x79B9, 0xD3ED, 0x79BA, 0xD8AE,
+ 0x79BB, 0xC0EB, 0x79BC, 0xB663, 0x79BD, 0xC7DD, 0x79BE, 0xBACC,
+ 0x79BF, 0xB664, 0x79C0, 0xD0E3, 0x79C1, 0xCBBD, 0x79C2, 0xB665,
+ 0x79C3, 0xCDBA, 0x79C4, 0xB666, 0x79C5, 0xB667, 0x79C6, 0xB8D1,
+ 0x79C7, 0xB668, 0x79C8, 0xB669, 0x79C9, 0xB1FC, 0x79CA, 0xB66A,
+ 0x79CB, 0xC7EF, 0x79CC, 0xB66B, 0x79CD, 0xD6D6, 0x79CE, 0xB66C,
+ 0x79CF, 0xB66D, 0x79D0, 0xB66E, 0x79D1, 0xBFC6, 0x79D2, 0xC3EB,
+ 0x79D3, 0xB66F, 0x79D4, 0xB670, 0x79D5, 0xEFF5, 0x79D6, 0xB671,
+ 0x79D7, 0xB672, 0x79D8, 0xC3D8, 0x79D9, 0xB673, 0x79DA, 0xB674,
+ 0x79DB, 0xB675, 0x79DC, 0xB676, 0x79DD, 0xB677, 0x79DE, 0xB678,
+ 0x79DF, 0xD7E2, 0x79E0, 0xB679, 0x79E1, 0xB67A, 0x79E2, 0xB67B,
+ 0x79E3, 0xEFF7, 0x79E4, 0xB3D3, 0x79E5, 0xB67C, 0x79E6, 0xC7D8,
+ 0x79E7, 0xD1ED, 0x79E8, 0xB67D, 0x79E9, 0xD6C8, 0x79EA, 0xB67E,
+ 0x79EB, 0xEFF8, 0x79EC, 0xB680, 0x79ED, 0xEFF6, 0x79EE, 0xB681,
+ 0x79EF, 0xBBFD, 0x79F0, 0xB3C6, 0x79F1, 0xB682, 0x79F2, 0xB683,
+ 0x79F3, 0xB684, 0x79F4, 0xB685, 0x79F5, 0xB686, 0x79F6, 0xB687,
+ 0x79F7, 0xB688, 0x79F8, 0xBDD5, 0x79F9, 0xB689, 0x79FA, 0xB68A,
+ 0x79FB, 0xD2C6, 0x79FC, 0xB68B, 0x79FD, 0xBBE0, 0x79FE, 0xB68C,
+ 0x79FF, 0xB68D, 0x7A00, 0xCFA1, 0x7A01, 0xB68E, 0x7A02, 0xEFFC,
+ 0x7A03, 0xEFFB, 0x7A04, 0xB68F, 0x7A05, 0xB690, 0x7A06, 0xEFF9,
+ 0x7A07, 0xB691, 0x7A08, 0xB692, 0x7A09, 0xB693, 0x7A0A, 0xB694,
+ 0x7A0B, 0xB3CC, 0x7A0C, 0xB695, 0x7A0D, 0xC9D4, 0x7A0E, 0xCBB0,
+ 0x7A0F, 0xB696, 0x7A10, 0xB697, 0x7A11, 0xB698, 0x7A12, 0xB699,
+ 0x7A13, 0xB69A, 0x7A14, 0xEFFE, 0x7A15, 0xB69B, 0x7A16, 0xB69C,
+ 0x7A17, 0xB0DE, 0x7A18, 0xB69D, 0x7A19, 0xB69E, 0x7A1A, 0xD6C9,
+ 0x7A1B, 0xB69F, 0x7A1C, 0xB6A0, 0x7A1D, 0xB740, 0x7A1E, 0xEFFD,
+ 0x7A1F, 0xB741, 0x7A20, 0xB3ED, 0x7A21, 0xB742, 0x7A22, 0xB743,
+ 0x7A23, 0xF6D5, 0x7A24, 0xB744, 0x7A25, 0xB745, 0x7A26, 0xB746,
+ 0x7A27, 0xB747, 0x7A28, 0xB748, 0x7A29, 0xB749, 0x7A2A, 0xB74A,
+ 0x7A2B, 0xB74B, 0x7A2C, 0xB74C, 0x7A2D, 0xB74D, 0x7A2E, 0xB74E,
+ 0x7A2F, 0xB74F, 0x7A30, 0xB750, 0x7A31, 0xB751, 0x7A32, 0xB752,
+ 0x7A33, 0xCEC8, 0x7A34, 0xB753, 0x7A35, 0xB754, 0x7A36, 0xB755,
+ 0x7A37, 0xF0A2, 0x7A38, 0xB756, 0x7A39, 0xF0A1, 0x7A3A, 0xB757,
+ 0x7A3B, 0xB5BE, 0x7A3C, 0xBCDA, 0x7A3D, 0xBBFC, 0x7A3E, 0xB758,
+ 0x7A3F, 0xB8E5, 0x7A40, 0xB759, 0x7A41, 0xB75A, 0x7A42, 0xB75B,
+ 0x7A43, 0xB75C, 0x7A44, 0xB75D, 0x7A45, 0xB75E, 0x7A46, 0xC4C2,
+ 0x7A47, 0xB75F, 0x7A48, 0xB760, 0x7A49, 0xB761, 0x7A4A, 0xB762,
+ 0x7A4B, 0xB763, 0x7A4C, 0xB764, 0x7A4D, 0xB765, 0x7A4E, 0xB766,
+ 0x7A4F, 0xB767, 0x7A50, 0xB768, 0x7A51, 0xF0A3, 0x7A52, 0xB769,
+ 0x7A53, 0xB76A, 0x7A54, 0xB76B, 0x7A55, 0xB76C, 0x7A56, 0xB76D,
+ 0x7A57, 0xCBEB, 0x7A58, 0xB76E, 0x7A59, 0xB76F, 0x7A5A, 0xB770,
+ 0x7A5B, 0xB771, 0x7A5C, 0xB772, 0x7A5D, 0xB773, 0x7A5E, 0xB774,
+ 0x7A5F, 0xB775, 0x7A60, 0xB776, 0x7A61, 0xB777, 0x7A62, 0xB778,
+ 0x7A63, 0xB779, 0x7A64, 0xB77A, 0x7A65, 0xB77B, 0x7A66, 0xB77C,
+ 0x7A67, 0xB77D, 0x7A68, 0xB77E, 0x7A69, 0xB780, 0x7A6A, 0xB781,
+ 0x7A6B, 0xB782, 0x7A6C, 0xB783, 0x7A6D, 0xB784, 0x7A6E, 0xB785,
+ 0x7A6F, 0xB786, 0x7A70, 0xF0A6, 0x7A71, 0xB787, 0x7A72, 0xB788,
+ 0x7A73, 0xB789, 0x7A74, 0xD1A8, 0x7A75, 0xB78A, 0x7A76, 0xBEBF,
+ 0x7A77, 0xC7EE, 0x7A78, 0xF1B6, 0x7A79, 0xF1B7, 0x7A7A, 0xBFD5,
+ 0x7A7B, 0xB78B, 0x7A7C, 0xB78C, 0x7A7D, 0xB78D, 0x7A7E, 0xB78E,
+ 0x7A7F, 0xB4A9, 0x7A80, 0xF1B8, 0x7A81, 0xCDBB, 0x7A82, 0xB78F,
+ 0x7A83, 0xC7D4, 0x7A84, 0xD5AD, 0x7A85, 0xB790, 0x7A86, 0xF1B9,
+ 0x7A87, 0xB791, 0x7A88, 0xF1BA, 0x7A89, 0xB792, 0x7A8A, 0xB793,
+ 0x7A8B, 0xB794, 0x7A8C, 0xB795, 0x7A8D, 0xC7CF,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+ 0x7E63, 0xC045, 0x7E64, 0xC046, 0x7E65, 0xC047, 0x7E66, 0xC048,
+ 0x7E67, 0xC049, 0x7E68, 0xC04A, 0x7E69, 0xC04B, 0x7E6A, 0xC04C,
+ 0x7E6B, 0xC04D, 0x7E6C, 0xC04E, 0x7E6D, 0xC04F, 0x7E6E, 0xC050,
+ 0x7E6F, 0xC051, 0x7E70, 0xC052, 0x7E71, 0xC053, 0x7E72, 0xC054,
+ 0x7E73, 0xC055, 0x7E74, 0xC056, 0x7E75, 0xC057, 0x7E76, 0xC058,
+ 0x7E77, 0xC059, 0x7E78, 0xC05A, 0x7E79, 0xC05B, 0x7E7A, 0xC05C,
+ 0x7E7B, 0xC05D, 0x7E7C, 0xC05E, 0x7E7D, 0xC05F, 0x7E7E, 0xC060,
+ 0x7E7F, 0xC061, 0x7E80, 0xC062, 0x7E81, 0xC063, 0x7E82, 0xD7EB,
+ 0x7E83, 0xC064, 0x7E84, 0xC065, 0x7E85, 0xC066, 0x7E86, 0xC067,
+ 0x7E87, 0xC068, 0x7E88, 0xC069, 0x7E89, 0xC06A, 0x7E8A, 0xC06B,
+ 0x7E8B, 0xC06C, 0x7E8C, 0xC06D, 0x7E8D, 0xC06E, 0x7E8E, 0xC06F,
+ 0x7E8F, 0xC070, 0x7E90, 0xC071, 0x7E91, 0xC072, 0x7E92, 0xC073,
+ 0x7E93, 0xC074, 0x7E94, 0xC075, 0x7E95, 0xC076, 0x7E96, 0xC077,
+ 0x7E97, 0xC078, 0x7E98, 0xC079, 0x7E99, 0xC07A, 0x7E9A, 0xC07B,
+ 0x7E9B, 0xF4EE, 0x7E9C, 0xC07C, 0x7E9D, 0xC07D, 0x7E9E, 0xC07E,
+ 0x7E9F, 0xE6F9, 0x7EA0, 0xBEC0, 0x7EA1, 0xE6FA, 0x7EA2, 0xBAEC,
+ 0x7EA3, 0xE6FB, 0x7EA4, 0xCFCB, 0x7EA5, 0xE6FC, 0x7EA6, 0xD4BC,
+ 0x7EA7, 0xBC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0xC245, 0x7FED, 0xC246, 0x7FEE, 0xF4E7,
+ 0x7FEF, 0xC247, 0x7FF0, 0xBAB2, 0x7FF1, 0xB0BF, 0x7FF2, 0xC248,
+ 0x7FF3, 0xF4E8, 0x7FF4, 0xC249, 0x7FF5, 0xC24A, 0x7FF6, 0xC24B,
+ 0x7FF7, 0xC24C, 0x7FF8, 0xC24D, 0x7FF9, 0xC24E, 0x7FFA, 0xC24F,
+ 0x7FFB, 0xB7AD, 0x7FFC, 0xD2ED, 0x7FFD, 0xC250, 0x7FFE, 0xC251,
+ 0x7FFF, 0xC252, 0x8000, 0xD2AB, 0x8001, 0xC0CF, 0x8002, 0xC253,
+ 0x8003, 0xBFBC, 0x8004, 0xEBA3, 0x8005, 0xD5DF, 0x8006, 0xEAC8,
+ 0x8007, 0xC254, 0x8008, 0xC255, 0x8009, 0xC256, 0x800A, 0xC257,
+ 0x800B, 0xF1F3, 0x800C, 0xB6F8, 0x800D, 0xCBA3, 0x800E, 0xC258,
+ 0x800F, 0xC259, 0x8010, 0xC4CD, 0x8011, 0xC25A, 0x8012, 0xF1E7,
+ 0x8013, 0xC25B, 0x8014, 0xF1E8, 0x8015, 0xB8FB, 0x8016, 0xF1E9,
+ 0x8017, 0xBAC4, 0x8018, 0xD4C5, 0x8019, 0xB0D2, 0x801A, 0xC25C,
+ 0x801B, 0xC25D, 0x801C, 0xF1EA, 0x801D, 0xC25E, 0x801E, 0xC25F,
+ 0x801F, 0xC260, 0x8020, 0xF1EB, 0x8021, 0xC261, 0x8022, 0xF1EC,
+ 0x8023, 0xC262, 0x8024, 0xC263, 0x8025, 0xF1ED, 0x8026, 0xF1EE,
+ 0x8027, 0xF1EF, 0x8028, 0xF1F1, 0x8029, 0xF1F0, 0x802A, 0xC5D5,
+ 0x802B, 0xC264, 0x802C, 0xC265, 0x802D, 0xC266, 0x802E, 0xC267,
+ 0x802F, 0xC268, 0x8030, 0xC269, 0x8031, 0xF1F2, 0x8032, 0xC26A,
+ 0x8033, 0xB6FA, 0x8034, 0xC26B, 0x8035, 0xF1F4, 0x8036, 0xD2AE,
+ 0x8037, 0xDEC7, 0x8038, 0xCBCA, 0x8039, 0xC26C, 0x803A, 0xC26D,
+ 0x803B, 0xB3DC, 0x803C, 0xC26E, 0x803D, 0xB5A2, 0x803E, 0xC26F,
+ 0x803F, 0xB9A2, 0x8040, 0xC270, 0x8041, 0xC271, 0x8042, 0xC4F4,
+ 0x8043, 0xF1F5, 0x8044, 0xC272, 0x8045, 0xC273, 0x8046, 0xF1F6,
+ 0x8047, 0xC274, 0x8048, 0xC275, 0x8049, 0xC276, 0x804A, 0xC1C4,
+ 0x804B, 0xC1FB, 0x804C, 0xD6B0, 0x804D, 0xF1F7, 0x804E, 0xC277,
+ 0x804F, 0xC278, 0x8050, 0xC279, 0x8051, 0xC27A, 0x8052, 0xF1F8,
+ 0x8053, 0xC27B, 0x8054, 0xC1AA, 0x8055, 0xC27C, 0x8056, 0xC27D,
+ 0x8057, 0xC27E, 0x8058, 0xC6B8, 0x8059, 0xC280, 0x805A, 0xBEDB,
+ 0x805B, 0xC281, 0x805C, 0xC282, 0x805D, 0xC283, 0x805E, 0xC284,
+ 0x805F, 0xC285, 0x8060, 0xC286, 0x8061, 0xC287, 0x8062, 0xC288,
+ 0x8063, 0xC289, 0x8064, 0xC28A, 0x8065, 0xC28B, 0x8066, 0xC28C,
+ 0x8067, 0xC28D, 0x8068, 0xC28E, 0x8069, 0xF1F9, 0x806A, 0xB4CF,
+ 0x806B, 0xC28F, 0x806C, 0xC290, 0x806D, 0xC291, 0x806E, 0xC292,
+ 0x806F, 0xC293, 0x8070, 0xC294, 0x8071, 0xF1FA, 0x8072, 0xC295,
+ 0x8073, 0xC296, 0x8074, 0xC297, 0x8075, 0xC298, 0x8076, 0xC299,
+ 0x8077, 0xC29A, 0x8078, 0xC29B, 0x8079, 0xC29C, 0x807A, 0xC29D,
+ 0x807B, 0xC29E, 0x807C, 0xC29F, 0x807D, 0xC2A0, 0x807E, 0xC340,
+ 0x807F, 0xEDB2, 0x8080, 0xEDB1, 0x8081, 0xC341, 0x8082, 0xC342,
+ 0x8083, 0xCBE0, 0x8084, 0xD2DE, 0x8085, 0xC343, 0x8086, 0xCBC1,
+ 0x8087, 0xD5D8, 0x8088, 0xC344, 0x8089, 0xC8E2, 0x808A, 0xC345,
+ 0x808B, 0xC0DF, 0x808C, 0xBCA1, 0x808D, 0xC346, 0x808E, 0xC347,
+ 0x808F, 0xC348, 0x8090, 0xC349, 0x8091, 0xC34A, 0x8092, 0xC34B,
+ 0x8093, 0xEBC1, 0x8094, 0xC34C, 0x8095, 0xC34D, 0x8096, 0xD0A4,
+ 0x8097, 0xC34E, 0x8098, 0xD6E2, 0x8099, 0xC34F, 0x809A, 0xB6C7,
+ 0x809B, 0xB8D8, 0x809C, 0xEBC0, 0x809D, 0xB8CE, 0x809E, 0xC350,
+ 0x809F, 0xEBBF, 0x80A0, 0xB3A6, 0x80A1, 0xB9C9, 0x80A2, 0xD6AB,
+ 0x80A3, 0xC351, 0x80A4, 0xB7F4, 0x80A5, 0xB7CA, 0x80A6, 0xC352,
+ 0x80A7, 0xC353, 0x80A8, 0xC354, 0x80A9, 0xBCE7, 0x80AA, 0xB7BE,
+ 0x80AB, 0xEBC6, 0x80AC, 0xC355, 0x80AD, 0xEBC7, 0x80AE, 0xB0B9,
+ 0x80AF, 0xBFCF, 0x80B0, 0xC356, 0x80B1, 0xEBC5, 0x80B2, 0xD3FD,
+ 0x80B3, 0xC357, 0x80B4, 0xEBC8, 0x80B5, 0xC358, 0x80B6, 0xC359,
+ 0x80B7, 0xEBC9, 0x80B8, 0xC35A, 0x80B9, 0xC35B, 0x80BA, 0xB7CE,
+ 0x80BB, 0xC35C, 0x80BC, 0xEBC2, 0x80BD, 0xEBC4, 0x80BE, 0xC9F6,
+ 0x80BF, 0xD6D7, 0x80C0, 0xD5CD, 0x80C1, 0xD0B2, 0x80C2, 0xEBCF,
+ 0x80C3, 0xCEB8, 0x80C4, 0xEBD0, 0x80C5, 0xC35D, 0x80C6, 0xB5A8,
+ 0x80C7, 0xC35E, 0x80C8, 0xC35F, 0x80C9, 0xC360, 0x80CA, 0xC361,
+ 0x80CB, 0xC362, 0x80CC, 0xB1B3, 0x80CD, 0xEBD2, 0x80CE, 0xCCA5,
+ 0x80CF, 0xC363, 0x80D0, 0xC364, 0x80D1, 0xC365, 0x80D2, 0xC366,
+ 0x80D3, 0xC367, 0x80D4, 0xC368, 0x80D5, 0xC369, 0x80D6, 0xC5D6,
+ 0x80D7, 0xEBD3, 0x80D8, 0xC36A, 0x80D9, 0xEBD1, 0x80DA, 0xC5DF,
+ 0x80DB, 0xEBCE, 0x80DC, 0xCAA4, 0x80DD, 0xEBD5, 0x80DE, 0xB0FB,
+ 0x80DF, 0xC36B, 0x80E0, 0xC36C, 0x80E1, 0xBAFA, 0x80E2, 0xC36D,
+ 0x80E3, 0xC36E, 0x80E4, 0xD8B7, 0x80E5, 0xF1E3, 0x80E6, 0xC36F,
+ 0x80E7, 0xEBCA, 0x80E8, 0xEBCB, 0x80E9, 0xEBCC, 0x80EA, 0xEBCD,
+ 0x80EB, 0xEBD6, 0x80EC, 0xE6C0, 0x80ED, 0xEBD9, 0x80EE, 0xC370,
+ 0x80EF, 0xBFE8, 0x80F0, 0xD2C8, 0x80F1, 0xEBD7, 0x80F2, 0xEBDC,
+ 0x80F3, 0xB8EC, 0x80F4, 0xEBD8, 0x80F5, 0xC371, 0x80F6, 0xBDBA,
+ 0x80F7, 0xC372, 0x80F8, 0xD0D8, 0x80F9, 0xC373, 0x80FA, 0xB0B7,
+ 0x80FB, 0xC374, 0x80FC, 0xEBDD, 0x80FD, 0xC4DC, 0x80FE, 0xC375,
+ 0x80FF, 0xC376, 0x8100, 0xC377, 0x8101, 0xC378, 0x8102, 0xD6AC,
+ 0x8103, 0xC379, 0x8104, 0xC37A, 0x8105, 0xC37B, 0x8106, 0xB4E0,
+ 0x8107, 0xC37C, 0x8108, 0xC37D, 0x8109, 0xC2F6, 0x810A, 0xBCB9,
+ 0x810B, 0xC37E, 0x810C, 0xC380, 0x810D, 0xEBDA, 0x810E, 0xEBDB,
+ 0x810F, 0xD4E0, 0x8110, 0xC6EA, 0x8111, 0xC4D4, 0x8112, 0xEBDF,
+ 0x8113, 0xC5A7, 0x8114, 0xD9F5, 0x8115, 0xC381, 0x8116, 0xB2B1,
+ 0x8117, 0xC382, 0x8118, 0xEBE4, 0x8119, 0xC383, 0x811A, 0xBDC5,
+ 0x811B, 0xC384, 0x811C, 0xC385, 0x811D, 0xC386, 0x811E, 0xEBE2,
+ 0x811F, 0xC387, 0x8120, 0xC388, 0x8121, 0xC389, 0x8122, 0xC38A,
+ 0x8123, 0xC38B, 0x8124, 0xC38C, 0x8125, 0xC38D, 0x8126, 0xC38E,
+ 0x8127, 0xC38F, 0x8128, 0xC390, 0x8129, 0xC391, 0x812A, 0xC392,
+ 0x812B, 0xC393, 0x812C, 0xEBE3, 0x812D, 0xC394, 0x812E, 0xC395,
+ 0x812F, 0xB8AC, 0x8130, 0xC396, 0x8131, 0xCDD1, 0x8132, 0xEBE5,
+ 0x8133, 0xC397, 0x8134, 0xC398, 0x8135, 0xC399, 0x8136, 0xEBE1,
+ 0x8137, 0xC39A, 0x8138, 0xC1B3, 0x8139, 0xC39B, 0x813A, 0xC39C,
+ 0x813B, 0xC39D, 0x813C, 0xC39E, 0x813D, 0xC39F, 0x813E, 0xC6A2,
+ 0x813F, 0xC3A0, 0x8140, 0xC440, 0x8141, 0xC441, 0x8142, 0xC442,
+ 0x8143, 0xC443, 0x8144, 0xC444, 0x8145, 0xC445, 0x8146, 0xCCF3,
+ 0x8147, 0xC446, 0x8148, 0xEBE6, 0x8149, 0xC447, 0x814A, 0xC0B0,
+ 0x814B, 0xD2B8, 0x814C, 0xEBE7, 0x814D, 0xC448, 0x814E, 0xC449,
+ 0x814F, 0xC44A, 0x8150, 0xB8AF, 0x8151, 0xB8AD, 0x8152, 0xC44B,
+ 0x8153, 0xEBE8, 0x8154, 0xC7BB, 0x8155, 0xCDF3, 0x8156, 0xC44C,
+ 0x8157, 0xC44D, 0x8158, 0xC44E, 0x8159, 0xEBEA, 0x815A, 0xEBEB,
+ 0x815B, 0xC44F, 0x815C, 0xC450, 0x815D, 0xC451, 0x815E, 0xC452,
+ 0x815F, 0xC453, 0x8160, 0xEBED, 0x8161, 0xC454, 0x8162, 0xC455,
+ 0x8163, 0xC456, 0x8164, 0xC457, 0x8165, 0xD0C8, 0x8166, 0xC458,
+ 0x8167, 0xEBF2, 0x8168, 0xC459, 0x8169, 0xEBEE, 0x816A, 0xC45A,
+ 0x816B, 0xC45B, 0x816C, 0xC45C, 0x816D, 0xEBF1, 0x816E, 0xC8F9,
+ 0x816F, 0xC45D, 0x8170, 0xD1FC, 0x8171, 0xEBEC, 0x8172, 0xC45E,
+ 0x8173, 0xC45F, 0x8174, 0xEBE9, 0x8175, 0xC460, 0x8176, 0xC461,
+ 0x8177, 0xC462, 0x8178, 0xC463, 0x8179, 0xB8B9, 0x817A, 0xCFD9,
+ 0x817B, 0xC4E5, 0x817C, 0xEBEF, 0x817D, 0xEBF0, 0x817E, 0xCCDA,
+ 0x817F, 0xCDC8, 0x8180, 0xB0F2, 0x8181, 0xC464, 0x8182, 0xEBF6,
+ 0x8183, 0xC465, 0x8184, 0xC466, 0x8185, 0xC467, 0x8186, 0xC468,
+ 0x8187, 0xC469, 0x8188, 0xEBF5, 0x8189, 0xC46A, 0x818A, 0xB2B2,
+ 0x818B, 0xC46B, 0x818C, 0xC46C, 0x818D, 0xC46D, 0x818E, 0xC46E,
+ 0x818F, 0xB8E0, 0x8190, 0xC46F, 0x8191, 0xEBF7, 0x8192, 0xC470,
+ 0x8193, 0xC471, 0x8194, 0xC472, 0x8195, 0xC473, 0x8196, 0xC474,
+ 0x8197, 0xC475, 0x8198, 0xB1EC, 0x8199, 0xC476, 0x819A, 0xC477,
+ 0x819B, 0xCCC5, 0x819C, 0xC4A4, 0x819D, 0xCFA5, 0x819E, 0xC478,
+ 0x819F, 0xC479, 0x81A0, 0xC47A, 0x81A1, 0xC47B, 0x81A2, 0xC47C,
+ 0x81A3, 0xEBF9, 0x81A4, 0xC47D, 0x81A5, 0xC47E, 0x81A6, 0xECA2,
+ 0x81A7, 0xC480, 0x81A8, 0xC5F2, 0x81A9, 0xC481, 0x81AA, 0xEBFA,
+ 0x81AB, 0xC482, 0x81AC, 0xC483, 0x81AD, 0xC484, 0x81AE, 0xC485,
+ 0x81AF, 0xC486, 0x81B0, 0xC487, 0x81B1, 0xC488, 0x81B2, 0xC489,
+ 0x81B3, 0xC9C5, 0x81B4, 0xC48A, 0x81B5, 0xC48B, 0x81B6, 0xC48C,
+ 0x81B7, 0xC48D, 0x81B8, 0xC48E, 0x81B9, 0xC48F, 0x81BA, 0xE2DF,
+ 0x81BB, 0xEBFE, 0x81BC, 0xC490, 0x81BD, 0xC491, 0x81BE, 0xC492,
+ 0x81BF, 0xC493, 0x81C0, 0xCDCE, 0x81C1, 0xECA1, 0x81C2, 0xB1DB,
+ 0x81C3, 0xD3B7, 0x81C4, 0xC494, 0x81C5, 0xC495, 0x81C6, 0xD2DC,
+ 0x81C7, 0xC496, 0x81C8, 0xC497, 0x81C9, 0xC498, 0x81CA, 0xEBFD,
+ 0x81CB, 0xC499, 0x81CC, 0xEBFB, 0x81CD, 0xC49A, 0x81CE, 0xC49B,
+ 0x81CF, 0xC49C, 0x81D0, 0xC49D, 0x81D1, 0xC49E, 0x81D2, 0xC49F,
+ 0x81D3, 0xC4A0, 0x81D4, 0xC540, 0x81D5, 0xC541, 0x81D6, 0xC542,
+ 0x81D7, 0xC543, 0x81D8, 0xC544, 0x81D9, 0xC545, 0x81DA, 0xC546,
+ 0x81DB, 0xC547, 0x81DC, 0xC548, 0x81DD, 0xC549, 0x81DE, 0xC54A,
+ 0x81DF, 0xC54B, 0x81E0, 0xC54C, 0x81E1, 0xC54D, 0x81E2, 0xC54E,
+ 0x81E3, 0xB3BC, 0x81E4, 0xC54F, 0x81E5, 0xC550, 0x81E6, 0xC551,
+ 0x81E7, 0xEAB0, 0x81E8, 0xC552, 0x81E9, 0xC553, 0x81EA, 0xD7D4,
+ 0x81EB, 0xC554, 0x81EC, 0xF4AB, 0x81ED, 0xB3F4, 0x81EE, 0xC555,
+ 0x81EF, 0xC556, 0x81F0, 0xC557, 0x81F1, 0xC558, 0x81F2, 0xC559,
+ 0x81F3, 0xD6C1, 0x81F4, 0xD6C2, 0x81F5, 0xC55A, 0x81F6, 0xC55B,
+ 0x81F7, 0xC55C, 0x81F8, 0xC55D, 0x81F9, 0xC55E, 0x81FA, 0xC55F,
+ 0x81FB, 0xD5E9, 0x81FC, 0xBECA, 0x81FD, 0xC560, 0x81FE, 0xF4A7,
+ 0x81FF, 0xC561, 0x8200, 0xD2A8, 0x8201, 0xF4A8, 0x8202, 0xF4A9,
+ 0x8203, 0xC562, 0x8204, 0xF4AA, 0x8205, 0xBECB, 0x8206, 0xD3DF,
+ 0x8207, 0xC563, 0x8208, 0xC564, 0x8209, 0xC565, 0x820A, 0xC566,
+ 0x820B, 0xC567, 0x820C, 0xC9E0, 0x820D, 0xC9E1, 0x820E, 0xC568,
+ 0x820F, 0xC569, 0x8210, 0xF3C2, 0x8211, 0xC56A, 0x8212, 0xCAE6,
+ 0x8213, 0xC56B, 0x8214, 0xCCF2, 0x8215, 0xC56C, 0x8216, 0xC56D,
+ 0x8217, 0xC56E, 0x8218, 0xC56F, 0x8219, 0xC570, 0x821A, 0xC571,
+ 0x821B, 0xE2B6, 0x821C, 0xCBB4, 0x821D, 0xC572, 0x821E, 0xCEE8,
+ 0x821F, 0xD6DB, 0x8220, 0xC573, 0x8221, 0xF4AD, 0x8222, 0xF4AE,
+ 0x8223, 0xF4AF, 0x8224, 0xC574, 0x8225, 0xC575, 0x8226, 0xC576,
+ 0x8227, 0xC577, 0x8228, 0xF4B2, 0x8229, 0xC578, 0x822A, 0xBABD,
+ 0x822B, 0xF4B3, 0x822C, 0xB0E3, 0x822D, 0xF4B0, 0x822E, 0xC579,
+ 0x822F, 0xF4B1, 0x8230, 0xBDA2, 0x8231, 0xB2D5, 0x8232, 0xC57A,
+ 0x8233, 0xF4B6, 0x8234, 0xF4B7, 0x8235, 0xB6E6, 0x8236, 0xB2B0,
+ 0x8237, 0xCFCF, 0x8238, 0xF4B4, 0x8239, 0xB4AC, 0x823A, 0xC57B,
+ 0x823B, 0xF4B5, 0x823C, 0xC57C, 0x823D, 0xC57D, 0x823E, 0xF4B8,
+ 0x823F, 0xC57E, 0x8240, 0xC580, 0x8241, 0xC581, 0x8242, 0xC582,
+ 0x8243, 0xC583, 0x8244, 0xF4B9, 0x8245, 0xC584, 0x8246, 0xC585,
+ 0x8247, 0xCDA7, 0x8248, 0xC586, 0x8249, 0xF4BA, 0x824A, 0xC587,
+ 0x824B, 0xF4BB, 0x824C, 0xC588, 0x824D, 0xC589, 0x824E, 0xC58A,
+ 0x824F, 0xF4BC, 0x8250, 0xC58B, 0x8251, 0xC58C, 0x8252, 0xC58D,
+ 0x8253, 0xC58E, 0x8254, 0xC58F, 0x8255, 0xC590, 0x8256, 0xC591,
+ 0x8257, 0xC592, 0x8258, 0xCBD2, 0x8259, 0xC593, 0x825A, 0xF4BD,
+ 0x825B, 0xC594, 0x825C, 0xC595, 0x825D, 0xC596, 0x825E, 0xC597,
+ 0x825F, 0xF4BE, 0x8260, 0xC598, 0x8261, 0xC599, 0x8262, 0xC59A,
+ 0x8263, 0xC59B, 0x8264, 0xC59C, 0x8265, 0xC59D, 0x8266, 0xC59E,
+ 0x8267, 0xC59F, 0x8268, 0xF4BF, 0x8269, 0xC5A0, 0x826A, 0xC640,
+ 0x826B, 0xC641, 0x826C, 0xC642, 0x826D, 0xC643, 0x826E, 0xF4DE,
+ 0x826F, 0xC1BC, 0x8270, 0xBCE8, 0x8271, 0xC644, 0x8272, 0xC9AB,
+ 0x8273, 0xD1DE, 0x8274, 0xE5F5, 0x8275, 0xC645, 0x8276, 0xC646,
+ 0x8277, 0xC647, 0x8278, 0xC648, 0x8279, 0xDCB3, 0x827A, 0xD2D5,
+ 0x827B, 0xC649, 0x827C, 0xC64A, 0x827D, 0xDCB4, 0x827E, 0xB0AC,
+ 0x827F, 0xDCB5, 0x8280, 0xC64B, 0x8281, 0xC64C, 0x8282, 0xBDDA,
+ 0x8283, 0xC64D, 0x8284, 0xDCB9, 0x8285, 0xC64E, 0x8286, 0xC64F,
+ 0x8287, 0xC650, 0x8288, 0xD8C2, 0x8289, 0xC651, 0x828A, 0xDCB7,
+ 0x828B, 0xD3F3, 0x828C, 0xC652, 0x828D, 0xC9D6, 0x828E, 0xDCBA,
+ 0x828F, 0xDCB6, 0x8290, 0xC653, 0x8291, 0xDCBB, 0x8292, 0xC3A2,
+ 0x8293, 0xC654, 0x8294, 0xC655, 0x8295, 0xC656, 0x8296, 0xC657,
+ 0x8297, 0xDCBC, 0x8298, 0xDCC5, 0x8299, 0xDCBD, 0x829A, 0xC658,
+ 0x829B, 0xC659, 0x829C, 0xCEDF, 0x829D, 0xD6A5, 0x829E, 0xC65A,
+ 0x829F, 0xDCCF, 0x82A0, 0xC65B, 0x82A1, 0xDCCD, 0x82A2, 0xC65C,
+ 0x82A3, 0xC65D, 0x82A4, 0xDCD2, 0x82A5, 0xBDE6, 0x82A6, 0xC2AB,
+ 0x82A7, 0xC65E, 0x82A8, 0xDCB8, 0x82A9, 0xDCCB, 0x82AA, 0xDCCE,
+ 0x82AB, 0xDCBE, 0x82AC, 0xB7D2, 0x82AD, 0xB0C5, 0x82AE, 0xDCC7,
+ 0x82AF, 0xD0BE, 0x82B0, 0xDCC1, 0x82B1, 0xBBA8, 0x82B2, 0xC65F,
+ 0x82B3, 0xB7BC, 0x82B4, 0xDCCC, 0x82B5, 0xC660, 0x82B6, 0xC661,
+ 0x82B7, 0xDCC6, 0x82B8, 0xDCBF, 0x82B9, 0xC7DB, 0x82BA, 0xC662,
+ 0x82BB, 0xC663, 0x82BC, 0xC664, 0x82BD, 0xD1BF, 0x82BE, 0xDCC0,
+ 0x82BF, 0xC665, 0x82C0, 0xC666, 0x82C1, 0xDCCA, 0x82C2, 0xC667,
+ 0x82C3, 0xC668, 0x82C4, 0xDCD0, 0x82C5, 0xC669, 0x82C6, 0xC66A,
+ 0x82C7, 0xCEAD, 0x82C8, 0xDCC2, 0x82C9, 0xC66B, 0x82CA, 0xDCC3,
+ 0x82CB, 0xDCC8, 0x82CC, 0xDCC9, 0x82CD, 0xB2D4, 0x82CE, 0xDCD1,
+ 0x82CF, 0xCBD5, 0x82D0, 0xC66C, 0x82D1, 0xD4B7, 0x82D2, 0xDCDB,
+ 0x82D3, 0xDCDF, 0x82D4, 0xCCA6, 0x82D5, 0xDCE6, 0x82D6, 0xC66D,
+ 0x82D7, 0xC3E7, 0x82D8, 0xDCDC, 0x82D9, 0xC66E, 0x82DA, 0xC66F,
+ 0x82DB, 0xBFC1, 0x82DC, 0xDCD9, 0x82DD, 0xC670, 0x82DE, 0xB0FA,
+ 0x82DF, 0xB9B6, 0x82E0, 0xDCE5, 0x82E1, 0xDCD3, 0x82E2, 0xC671,
+ 0x82E3, 0xDCC4, 0x82E4, 0xDCD6, 0x82E5, 0xC8F4, 0x82E6, 0xBFE0,
+ 0x82E7, 0xC672, 0x82E8, 0xC673, 0x82E9, 0xC674, 0x82EA, 0xC675,
+ 0x82EB, 0xC9BB, 0x82EC, 0xC676, 0x82ED, 0xC677, 0x82EE, 0xC678,
+ 0x82EF, 0xB1BD, 0x82F0, 0xC679, 0x82F1, 0xD3A2, 0x82F2, 0xC67A,
+ 0x82F3, 0xC67B, 0x82F4, 0xDCDA, 0x82F5, 0xC67C, 0x82F6, 0xC67D,
+ 0x82F7, 0xDCD5, 0x82F8, 0xC67E, 0x82F9, 0xC6BB, 0x82FA, 0xC680,
+ 0x82FB, 0xDCDE, 0x82FC, 0xC681, 0x82FD, 0xC682, 0x82FE, 0xC683,
+ 0x82FF, 0xC684, 0x8300, 0xC685, 0x8301, 0xD7C2, 0x8302, 0xC3AF,
+ 0x8303, 0xB7B6, 0x8304, 0xC7D1, 0x8305, 0xC3A9, 0x8306, 0xDCE2,
+ 0x8307, 0xDCD8, 0x8308, 0xDCEB, 0x8309, 0xDCD4, 0x830A, 0xC686,
+ 0x830B, 0xC687, 0x830C, 0xDCDD, 0x830D, 0xC688, 0x830E, 0xBEA5,
+ 0x830F, 0xDCD7, 0x8310, 0xC689, 0x8311, 0xDCE0, 0x8312, 0xC68A,
+ 0x8313, 0xC68B, 0x8314, 0xDCE3, 0x8315, 0xDCE4, 0x8316, 0xC68C,
+ 0x8317, 0xDCF8, 0x8318, 0xC68D, 0x8319, 0xC68E, 0x831A, 0xDCE1,
+ 0x831B, 0xDDA2, 0x831C, 0xDCE7, 0x831D, 0xC68F, 0x831E, 0xC690,
+ 0x831F, 0xC691, 0x8320, 0xC692, 0x8321, 0xC693, 0x8322, 0xC694,
+ 0x8323, 0xC695, 0x8324, 0xC696, 0x8325, 0xC697, 0x8326, 0xC698,
+ 0x8327, 0xBCEB, 0x8328, 0xB4C4, 0x8329, 0xC699, 0x832A, 0xC69A,
+ 0x832B, 0xC3A3, 0x832C, 0xB2E7, 0x832D, 0xDCFA, 0x832E, 0xC69B,
+ 0x832F, 0xDCF2, 0x8330, 0xC69C, 0x8331, 0xDCEF, 0x8332, 0xC69D,
+ 0x8333, 0xDCFC, 0x8334, 0xDCEE, 0x8335, 0xD2F0, 0x8336, 0xB2E8,
+ 0x8337, 0xC69E, 0x8338, 0xC8D7, 0x8339, 0xC8E3, 0x833A, 0xDCFB,
+ 0x833B, 0xC69F, 0x833C, 0xDCED, 0x833D, 0xC6A0, 0x833E, 0xC740,
+ 0x833F, 0xC741, 0x8340, 0xDCF7, 0x8341, 0xC742, 0x8342, 0xC743,
+ 0x8343, 0xDCF5, 0x8344, 0xC744, 0x8345, 0xC745, 0x8346, 0xBEA3,
+ 0x8347, 0xDCF4, 0x8348, 0xC746, 0x8349, 0xB2DD, 0x834A, 0xC747,
+ 0x834B, 0xC748, 0x834C, 0xC749, 0x834D, 0xC74A, 0x834E, 0xC74B,
+ 0x834F, 0xDCF3, 0x8350, 0xBCF6, 0x8351, 0xDCE8, 0x8352, 0xBBC4,
+ 0x8353, 0xC74C, 0x8354, 0xC0F3, 0x8355, 0xC74D, 0x8356, 0xC74E,
+ 0x8357, 0xC74F, 0x8358, 0xC750, 0x8359, 0xC751, 0x835A, 0xBCD4,
+ 0x835B, 0xDCE9, 0x835C, 0xDCEA, 0x835D, 0xC752, 0x835E, 0xDCF1,
+ 0x835F, 0xDCF6, 0x8360, 0xDCF9, 0x8361, 0xB5B4, 0x8362, 0xC753,
+ 0x8363, 0xC8D9, 0x8364, 0xBBE7, 0x8365, 0xDCFE, 0x8366, 0xDCFD,
+ 0x8367, 0xD3AB, 0x8368, 0xDDA1, 0x8369, 0xDDA3, 0x836A, 0xDDA5,
+ 0x836B, 0xD2F1, 0x836C, 0xDDA4, 0x836D, 0xDDA6, 0x836E, 0xDDA7,
+ 0x836F, 0xD2A9, 0x8370, 0xC754, 0x8371, 0xC755, 0x8372, 0xC756,
+ 0x8373, 0xC757, 0x8374, 0xC758, 0x8375, 0xC759, 0x8376, 0xC75A,
+ 0x8377, 0xBAC9, 0x8378, 0xDDA9, 0x8379, 0xC75B, 0x837A, 0xC75C,
+ 0x837B, 0xDDB6, 0x837C, 0xDDB1, 0x837D, 0xDDB4, 0x837E, 0xC75D,
+ 0x837F, 0xC75E, 0x8380, 0xC75F, 0x8381, 0xC760, 0x8382, 0xC761,
+ 0x8383, 0xC762, 0x8384, 0xC763, 0x8385, 0xDDB0, 0x8386, 0xC6CE,
+ 0x8387, 0xC764, 0x8388, 0xC765, 0x8389, 0xC0F2, 0x838A, 0xC766,
+ 0x838B, 0xC767, 0x838C, 0xC768, 0x838D, 0xC769, 0x838E, 0xC9AF,
+ 0x838F, 0xC76A, 0x8390, 0xC76B, 0x8391, 0xC76C, 0x8392, 0xDCEC,
+ 0x8393, 0xDDAE, 0x8394, 0xC76D, 0x8395, 0xC76E, 0x8396, 0xC76F,
+ 0x8397, 0xC770, 0x8398, 0xDDB7, 0x8399, 0xC771, 0x839A, 0xC772,
+ 0x839B, 0xDCF0, 0x839C, 0xDDAF, 0x839D, 0xC773, 0x839E, 0xDDB8,
+ 0x839F, 0xC774, 0x83A0, 0xDDAC, 0x83A1, 0xC775, 0x83A2, 0xC776,
+ 0x83A3, 0xC777, 0x83A4, 0xC778, 0x83A5, 0xC779, 0x83A6, 0xC77A,
+ 0x83A7, 0xC77B, 0x83A8, 0xDDB9, 0x83A9, 0xDDB3, 0x83AA, 0xDDAD,
+ 0x83AB, 0xC4AA, 0x83AC, 0xC77C, 0x83AD, 0xC77D, 0x83AE, 0xC77E,
+ 0x83AF, 0xC780, 0x83B0, 0xDDA8, 0x83B1, 0xC0B3, 0x83B2, 0xC1AB,
+ 0x83B3, 0xDDAA, 0x83B4, 0xDDAB, 0x83B5, 0xC781, 0x83B6, 0xDDB2,
+ 0x83B7, 0xBBF1, 0x83B8, 0xDDB5, 0x83B9, 0xD3A8, 0x83BA, 0xDDBA,
+ 0x83BB, 0xC782, 0x83BC, 0xDDBB, 0x83BD, 0xC3A7, 0x83BE, 0xC783,
+ 0x83BF, 0xC784, 0x83C0, 0xDDD2, 0x83C1, 0xDDBC, 0x83C2, 0xC785,
+ 0x83C3, 0xC786, 0x83C4, 0xC787, 0x83C5, 0xDDD1, 0x83C6, 0xC788,
+ 0x83C7, 0xB9BD, 0x83C8, 0xC789, 0x83C9, 0xC78A, 0x83CA, 0xBED5,
+ 0x83CB, 0xC78B, 0x83CC, 0xBEFA, 0x83CD, 0xC78C, 0x83CE, 0xC78D,
+ 0x83CF, 0xBACA, 0x83D0, 0xC78E, 0x83D1, 0xC78F, 0x83D2, 0xC790,
+ 0x83D3, 0xC791, 0x83D4, 0xDDCA, 0x83D5, 0xC792, 0x83D6, 0xDDC5,
+ 0x83D7, 0xC793, 0x83D8, 0xDDBF, 0x83D9, 0xC794, 0x83DA, 0xC795,
+ 0x83DB, 0xC796, 0x83DC, 0xB2CB, 0x83DD, 0xDDC3, 0x83DE, 0xC797,
+ 0x83DF, 0xDDCB, 0x83E0, 0xB2A4, 0x83E1, 0xDDD5, 0x83E2, 0xC798,
+ 0x83E3, 0xC799, 0x83E4, 0xC79A, 0x83E5, 0xDDBE, 0x83E6, 0xC79B,
+ 0x83E7, 0xC79C, 0x83E8, 0xC79D, 0x83E9, 0xC6D0, 0x83EA, 0xDDD0,
+ 0x83EB, 0xC79E, 0x83EC, 0xC79F, 0x83ED, 0xC7A0, 0x83EE, 0xC840,
+ 0x83EF, 0xC841, 0x83F0, 0xDDD4, 0x83F1, 0xC1E2, 0x83F2, 0xB7C6,
+ 0x83F3, 0xC842, 0x83F4, 0xC843, 0x83F5, 0xC844, 0x83F6, 0xC845,
+ 0x83F7, 0xC846, 0x83F8, 0xDDCE, 0x83F9, 0xDDCF, 0x83FA, 0xC847,
+ 0x83FB, 0xC848, 0x83FC, 0xC849, 0x83FD, 0xDDC4, 0x83FE, 0xC84A,
+ 0x83FF, 0xC84B, 0x8400, 0xC84C, 0x8401, 0xDDBD, 0x8402, 0xC84D,
+ 0x8403, 0xDDCD, 0x8404, 0xCCD1, 0x8405, 0xC84E, 0x8406, 0xDDC9,
+ 0x8407, 0xC84F, 0x8408, 0xC850, 0x8409, 0xC851, 0x840A, 0xC852,
+ 0x840B, 0xDDC2, 0x840C, 0xC3C8, 0x840D, 0xC6BC, 0x840E, 0xCEAE,
+ 0x840F, 0xDDCC, 0x8410, 0xC853, 0x8411, 0xDDC8, 0x8412, 0xC854,
+ 0x8413, 0xC855, 0x8414, 0xC856, 0x8415, 0xC857, 0x8416, 0xC858,
+ 0x8417, 0xC859, 0x8418, 0xDDC1, 0x8419, 0xC85A, 0x841A, 0xC85B,
+ 0x841B, 0xC85C, 0x841C, 0xDDC6, 0x841D, 0xC2DC, 0x841E, 0xC85D,
+ 0x841F, 0xC85E, 0x8420, 0xC85F, 0x8421, 0xC860, 0x8422, 0xC861,
+ 0x8423, 0xC862, 0x8424, 0xD3A9, 0x8425, 0xD3AA, 0x8426, 0xDDD3,
+ 0x8427, 0xCFF4, 0x8428, 0xC8F8, 0x8429, 0xC863, 0x842A, 0xC864,
+ 0x842B, 0xC865, 0x842C, 0xC866, 0x842D, 0xC867, 0x842E, 0xC868,
+ 0x842F, 0xC869, 0x8430, 0xC86A, 0x8431, 0xDDE6, 0x8432, 0xC86B,
+ 0x8433, 0xC86C, 0x8434, 0xC86D, 0x8435, 0xC86E, 0x8436, 0xC86F,
+ 0x8437, 0xC870, 0x8438, 0xDDC7, 0x8439, 0xC871, 0x843A, 0xC872,
+ 0x843B, 0xC873, 0x843C, 0xDDE0, 0x843D, 0xC2E4, 0x843E, 0xC874,
+ 0x843F, 0xC875, 0x8440, 0xC876, 0x8441, 0xC877, 0x8442, 0xC878,
+ 0x8443, 0xC879, 0x8444, 0xC87A, 0x8445, 0xC87B, 0x8446, 0xDDE1,
+ 0x8447, 0xC87C, 0x8448, 0xC87D, 0x8449, 0xC87E, 0x844A, 0xC880,
+ 0x844B, 0xC881, 0x844C, 0xC882, 0x844D, 0xC883, 0x844E, 0xC884,
+ 0x844F, 0xC885, 0x8450, 0xC886, 0x8451, 0xDDD7, 0x8452, 0xC887,
+ 0x8453, 0xC888, 0x8454, 0xC889, 0x8455, 0xC88A, 0x8456, 0xC88B,
+ 0x8457, 0xD6F8, 0x8458, 0xC88C, 0x8459, 0xDDD9, 0x845A, 0xDDD8,
+ 0x845B, 0xB8F0, 0x845C, 0xDDD6, 0x845D, 0xC88D, 0x845E, 0xC88E,
+ 0x845F, 0xC88F, 0x8460, 0xC890, 0x8461, 0xC6CF, 0x8462, 0xC891,
+ 0x8463, 0xB6AD, 0x8464, 0xC892, 0x8465, 0xC893, 0x8466, 0xC894,
+ 0x8467, 0xC895, 0x8468, 0xC896, 0x8469, 0xDDE2, 0x846A, 0xC897,
+ 0x846B, 0xBAF9, 0x846C, 0xD4E1, 0x846D, 0xDDE7, 0x846E, 0xC898,
+ 0x846F, 0xC899, 0x8470, 0xC89A, 0x8471, 0xB4D0, 0x8472, 0xC89B,
+ 0x8473, 0xDDDA, 0x8474, 0xC89C, 0x8475, 0xBFFB, 0x8476, 0xDDE3,
+ 0x8477, 0xC89D, 0x8478, 0xDDDF, 0x8479, 0xC89E, 0x847A, 0xDDDD,
+ 0x847B, 0xC89F, 0x847C, 0xC8A0, 0x847D, 0xC940, 0x847E, 0xC941,
+ 0x847F, 0xC942, 0x8480, 0xC943, 0x8481, 0xC944, 0x8482, 0xB5D9,
+ 0x8483, 0xC945, 0x8484, 0xC946, 0x8485, 0xC947, 0x8486, 0xC948,
+ 0x8487, 0xDDDB, 0x8488, 0xDDDC, 0x8489, 0xDDDE, 0x848A, 0xC949,
+ 0x848B, 0xBDAF, 0x848C, 0xDDE4, 0x848D, 0xC94A, 0x848E, 0xDDE5,
+ 0x848F, 0xC94B, 0x8490, 0xC94C, 0x8491, 0xC94D, 0x8492, 0xC94E,
+ 0x8493, 0xC94F, 0x8494, 0xC950, 0x8495, 0xC951, 0x8496, 0xC952,
+ 0x8497, 0xDDF5, 0x8498, 0xC953, 0x8499, 0xC3C9, 0x849A, 0xC954,
+ 0x849B, 0xC955, 0x849C, 0xCBE2, 0x849D, 0xC956, 0x849E, 0xC957,
+ 0x849F, 0xC958, 0x84A0, 0xC959, 0x84A1, 0xDDF2, 0x84A2, 0xC95A,
+ 0x84A3, 0xC95B, 0x84A4, 0xC95C, 0x84A5, 0xC95D, 0x84A6, 0xC95E,
+ 0x84A7, 0xC95F, 0x84A8, 0xC960, 0x84A9, 0xC961, 0x84AA, 0xC962,
+ 0x84AB, 0xC963, 0x84AC, 0xC964, 0x84AD, 0xC965, 0x84AE, 0xC966,
+ 0x84AF, 0xD8E1, 0x84B0, 0xC967, 0x84B1, 0xC968, 0x84B2, 0xC6D1,
+ 0x84B3, 0xC969, 0x84B4, 0xDDF4, 0x84B5, 0xC96A, 0x84B6, 0xC96B,
+ 0x84B7, 0xC96C, 0x84B8, 0xD5F4, 0x84B9, 0xDDF3, 0x84BA, 0xDDF0,
+ 0x84BB, 0xC96D, 0x84BC, 0xC96E, 0x84BD, 0xDDEC, 0x84BE, 0xC96F,
+ 0x84BF, 0xDDEF, 0x84C0, 0xC970, 0x84C1, 0xDDE8, 0x84C2, 0xC971,
+ 0x84C3, 0xC972, 0x84C4, 0xD0EE, 0x84C5, 0xC973, 0x84C6, 0xC974,
+ 0x84C7, 0xC975, 0x84C8, 0xC976, 0x84C9, 0xC8D8, 0x84CA, 0xDDEE,
+ 0x84CB, 0xC977, 0x84CC, 0xC978, 0x84CD, 0xDDE9, 0x84CE, 0xC979,
+ 0x84CF, 0xC97A, 0x84D0, 0xDDEA, 0x84D1, 0xCBF2, 0x84D2, 0xC97B,
+ 0x84D3, 0xDDED, 0x84D4, 0xC97C, 0x84D5, 0xC97D, 0x84D6, 0xB1CD,
+ 0x84D7, 0xC97E, 0x84D8, 0xC980, 0x84D9, 0xC981, 0x84DA, 0xC982,
+ 0x84DB, 0xC983, 0x84DC, 0xC984, 0x84DD, 0xC0B6, 0x84DE, 0xC985,
+ 0x84DF, 0xBCBB, 0x84E0, 0xDDF1, 0x84E1, 0xC986, 0x84E2, 0xC987,
+ 0x84E3, 0xDDF7, 0x84E4, 0xC988, 0x84E5, 0xDDF6, 0x84E6, 0xDDEB,
+ 0x84E7, 0xC989, 0x84E8, 0xC98A, 0x84E9, 0xC98B, 0x84EA, 0xC98C,
+ 0x84EB, 0xC98D, 0x84EC, 0xC5EE, 0x84ED, 0xC98E, 0x84EE, 0xC98F,
+ 0x84EF, 0xC990, 0x84F0, 0xDDFB, 0x84F1, 0xC991, 0x84F2, 0xC992,
+ 0x84F3, 0xC993, 0x84F4, 0xC994, 0x84F5, 0xC995, 0x84F6, 0xC996,
+ 0x84F7, 0xC997, 0x84F8, 0xC998, 0x84F9, 0xC999, 0x84FA, 0xC99A,
+ 0x84FB, 0xC99B, 0x84FC, 0xDEA4, 0x84FD, 0xC99C, 0x84FE, 0xC99D,
+ 0x84FF, 0xDEA3, 0x8500, 0xC99E, 0x8501, 0xC99F, 0x8502, 0xC9A0,
+ 0x8503, 0xCA40, 0x8504, 0xCA41, 0x8505, 0xCA42, 0x8506, 0xCA43,
+ 0x8507, 0xCA44, 0x8508, 0xCA45, 0x8509, 0xCA46, 0x850A, 0xCA47,
+ 0x850B, 0xCA48, 0x850C, 0xDDF8, 0x850D, 0xCA49, 0x850E, 0xCA4A,
+ 0x850F, 0xCA4B, 0x8510, 0xCA4C, 0x8511, 0xC3EF, 0x8512, 0xCA4D,
+ 0x8513, 0xC2FB, 0x8514, 0xCA4E, 0x8515, 0xCA4F, 0x8516, 0xCA50,
+ 0x8517, 0xD5E1, 0x8518, 0xCA51, 0x8519, 0xCA52, 0x851A, 0xCEB5,
+ 0x851B, 0xCA53, 0x851C, 0xCA54, 0x851D, 0xCA55, 0x851E, 0xCA56,
+ 0x851F, 0xDDFD, 0x8520, 0xCA57, 0x8521, 0xB2CC, 0x8522, 0xCA58,
+ 0x8523, 0xCA59, 0x8524, 0xCA5A, 0x8525, 0xCA5B, 0x8526, 0xCA5C,
+ 0x8527, 0xCA5D, 0x8528, 0xCA5E, 0x8529, 0xCA5F, 0x852A, 0xCA60,
+ 0x852B, 0xC4E8, 0x852C, 0xCADF, 0x852D, 0xCA61, 0x852E, 0xCA62,
+ 0x852F, 0xCA63, 0x8530, 0xCA64, 0x8531, 0xCA65, 0x8532, 0xCA66,
+ 0x8533, 0xCA67, 0x8534, 0xCA68, 0x8535, 0xCA69, 0x8536, 0xCA6A,
+ 0x8537, 0xC7BE, 0x8538, 0xDDFA, 0x8539, 0xDDFC, 0x853A, 0xDDFE,
+ 0x853B, 0xDEA2, 0x853C, 0xB0AA, 0x853D, 0xB1CE, 0x853E, 0xCA6B,
+ 0x853F, 0xCA6C, 0x8540, 0xCA6D, 0x8541, 0xCA6E, 0x8542, 0xCA6F,
+ 0x8543, 0xDEAC, 0x8544, 0xCA70, 0x8545, 0xCA71, 0x8546, 0xCA72,
+ 0x8547, 0xCA73, 0x8548, 0xDEA6, 0x8549, 0xBDB6, 0x854A, 0xC8EF,
+ 0x854B, 0xCA74, 0x854C, 0xCA75, 0x854D, 0xCA76, 0x854E, 0xCA77,
+ 0x854F, 0xCA78, 0x8550, 0xCA79, 0x8551, 0xCA7A, 0x8552, 0xCA7B,
+ 0x8553, 0xCA7C, 0x8554, 0xCA7D, 0x8555, 0xCA7E, 0x8556, 0xDEA1,
+ 0x8557, 0xCA80, 0x8558, 0xCA81, 0x8559, 0xDEA5, 0x855A, 0xCA82,
+ 0x855B, 0xCA83, 0x855C, 0xCA84, 0x855D, 0xCA85, 0x855E, 0xDEA9,
+ 0x855F, 0xCA86, 0x8560, 0xCA87, 0x8561, 0xCA88, 0x8562, 0xCA89,
+ 0x8563, 0xCA8A, 0x8564, 0xDEA8, 0x8565, 0xCA8B, 0x8566, 0xCA8C,
+ 0x8567, 0xCA8D, 0x8568, 0xDEA7, 0x8569, 0xCA8E, 0x856A, 0xCA8F,
+ 0x856B, 0xCA90, 0x856C, 0xCA91, 0x856D, 0xCA92, 0x856E, 0xCA93,
+ 0x856F, 0xCA94, 0x8570, 0xCA95, 0x8571, 0xCA96, 0x8572, 0xDEAD,
+ 0x8573, 0xCA97, 0x8574, 0xD4CC, 0x8575, 0xCA98, 0x8576, 0xCA99,
+ 0x8577, 0xCA9A, 0x8578, 0xCA9B, 0x8579, 0xDEB3, 0x857A, 0xDEAA,
+ 0x857B, 0xDEAE, 0x857C, 0xCA9C, 0x857D, 0xCA9D, 0x857E, 0xC0D9,
+ 0x857F, 0xCA9E, 0x8580, 0xCA9F, 0x8581, 0xCAA0, 0x8582, 0xCB40,
+ 0x8583, 0xCB41, 0x8584, 0xB1A1, 0x8585, 0xDEB6, 0x8586, 0xCB42,
+ 0x8587, 0xDEB1, 0x8588, 0xCB43, 0x8589, 0xCB44, 0x858A, 0xCB45,
+ 0x858B, 0xCB46, 0x858C, 0xCB47, 0x858D, 0xCB48, 0x858E, 0xCB49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
+ 0x85D3, 0xDEBA, 0x85D4, 0xCB80, 0x85D5, 0xC5BA, 0x85D6, 0xCB81,
+ 0x85D7, 0xCB82, 0x85D8, 0xCB83, 0x85D9, 0xCB84, 0x85DA, 0xCB85,
+ 0x85DB, 0xCB86, 0x85DC, 0xDEBC, 0x85DD, 0xCB87, 0x85DE, 0xCB88,
+ 0x85DF, 0xCB89, 0x85E0, 0xCB8A, 0x85E1, 0xCB8B, 0x85E2, 0xCB8C,
+ 0x85E3, 0xCB8D, 0x85E4, 0xCCD9, 0x85E5, 0xCB8E, 0x85E6, 0xCB8F,
+ 0x85E7, 0xCB90, 0x85E8, 0xCB91, 0x85E9, 0xB7AA, 0x85EA, 0xCB92,
+ 0x85EB, 0xCB93, 0x85EC, 0xCB94, 0x85ED, 0xCB95, 0x85EE, 0xCB96,
+ 0x85EF, 0xCB97, 0x85F0, 0xCB98, 0x85F1, 0xCB99, 0x85F2, 0xCB9A,
+ 0x85F3, 0xCB9B, 0x85F4, 0xCB9C, 0x85F5, 0xCB9D, 0x85F6, 0xCB9E,
+ 0x85F7, 0xCB9F, 0x85F8, 0xCBA0, 0x85F9, 0xCC40, 0x85FA, 0xCC41,
+ 0x85FB, 0xD4E5, 0x85FC, 0xCC42, 0x85FD, 0xCC43, 0x85FE, 0xCC44,
+ 0x85FF, 0xDEBD, 0x8600, 0xCC45, 0x8601, 0xCC46, 0x8602, 0xCC47,
+ 0x8603, 0xCC48, 0x8604, 0xCC49, 0x8605, 0xDEBF, 0x8606, 0xCC4A,
+ 0x8607, 0xCC4B, 0x8608, 0xCC4C, 0x8609, 0xCC4D, 0x860A, 0xCC4E,
+ 0x860B, 0xCC4F, 0x860C, 0xCC50, 0x860D, 0xCC51, 0x860E, 0xCC52,
+ 0x860F, 0xCC53, 0x8610, 0xCC54, 0x8611, 0xC4A2, 0x8612, 0xCC55,
+ 0x8613, 0xCC56, 0x8614, 0xCC57, 0x8615, 0xCC58, 0x8616, 0xDEC1,
+ 0x8617, 0xCC59, 0x8618, 0xCC5A, 0x8619, 0xCC5B, 0x861A, 0xCC5C,
+ 0x861B, 0xCC5D, 0x861C, 0xCC5E, 0x861D, 0xCC5F, 0x861E, 0xCC60,
+ 0x861F, 0xCC61, 0x8620, 0xCC62, 0x8621, 0xCC63, 0x8622, 0xCC64,
+ 0x8623, 0xCC65, 0x8624, 0xCC66, 0x8625, 0xCC67, 0x8626, 0xCC68,
+ 0x8627, 0xDEBE, 0x8628, 0xCC69, 0x8629, 0xDEC0, 0x862A, 0xCC6A,
+ 0x862B, 0xCC6B, 0x862C, 0xCC6C, 0x862D, 0xCC6D, 0x862E, 0xCC6E,
+ 0x862F, 0xCC6F, 0x8630, 0xCC70, 0x8631, 0xCC71, 0x8632, 0xCC72,
+ 0x8633, 0xCC73, 0x8634, 0xCC74, 0x8635, 0xCC75, 0x8636, 0xCC76,
+ 0x8637, 0xCC77, 0x8638, 0xD5BA, 0x8639, 0xCC78, 0x863A, 0xCC79,
+ 0x863B, 0xCC7A, 0x863C, 0xDEC2, 0x863D, 0xCC7B, 0x863E, 0xCC7C,
+ 0x863F, 0xCC7D, 0x8640, 0xCC7E, 0x8641, 0xCC80, 0x8642, 0xCC81,
+ 0x8643, 0xCC82, 0x8644, 0xCC83, 0x8645, 0xCC84, 0x8646, 0xCC85,
+ 0x8647, 0xCC86, 0x8648, 0xCC87, 0x8649, 0xCC88, 0x864A, 0xCC89,
+ 0x864B, 0xCC8A, 0x864C, 0xCC8B, 0x864D, 0xF2AE, 0x864E, 0xBBA2,
+ 0x864F, 0xC2B2, 0x8650, 0xC5B0, 0x8651, 0xC2C7, 0x8652, 0xCC8C,
+ 0x8653, 0xCC8D, 0x8654, 0xF2AF, 0x8655, 0xCC8E, 0x8656, 0xCC8F,
+ 0x8657, 0xCC90, 0x8658, 0xCC91, 0x8659, 0xCC92, 0x865A, 0xD0E9,
+ 0x865B, 0xCC93, 0x865C, 0xCC94, 0x865D, 0xCC95, 0x865E, 0xD3DD,
+ 0x865F, 0xCC96, 0x8660, 0xCC97, 0x8661, 0xCC98, 0x8662, 0xEBBD,
+ 0x8663, 0xCC99, 0x8664, 0xCC9A, 0x8665, 0xCC9B, 0x8666, 0xCC9C,
+ 0x8667, 0xCC9D, 0x8668, 0xCC9E, 0x8669, 0xCC9F, 0x866A, 0xCCA0,
+ 0x866B, 0xB3E6, 0x866C, 0xF2B0, 0x866D, 0xCD40, 0x866E, 0xF2B1,
+ 0x866F, 0xCD41, 0x8670, 0xCD42, 0x8671, 0xCAAD, 0x8672, 0xCD43,
+ 0x8673, 0xCD44, 0x8674, 0xCD45, 0x8675, 0xCD46, 0x8676, 0xCD47,
+ 0x8677, 0xCD48, 0x8678, 0xCD49, 0x8679, 0xBAE7, 0x867A, 0xF2B3,
+ 0x867B, 0xF2B5, 0x867C, 0xF2B4, 0x867D, 0xCBE4, 0x867E, 0xCFBA,
+ 0x867F, 0xF2B2, 0x8680, 0xCAB4, 0x8681, 0xD2CF, 0x8682, 0xC2EC,
+ 0x8683, 0xCD4A, 0x8684, 0xCD4B, 0x8685, 0xCD4C, 0x8686, 0xCD4D,
+ 0x8687, 0xCD4E, 0x8688, 0xCD4F, 0x8689, 0xCD50, 0x868A, 0xCEC3,
+ 0x868B, 0xF2B8, 0x868C, 0xB0F6, 0x868D, 0xF2B7, 0x868E, 0xCD51,
+ 0x868F, 0xCD52, 0x8690, 0xCD53, 0x8691, 0xCD54, 0x8692, 0xCD55,
+ 0x8693, 0xF2BE, 0x8694, 0xCD56, 0x8695, 0xB2CF, 0x8696, 0xCD57,
+ 0x8697, 0xCD58, 0x8698, 0xCD59, 0x8699, 0xCD5A, 0x869A, 0xCD5B,
+ 0x869B, 0xCD5C, 0x869C, 0xD1C1, 0x869D, 0xF2BA, 0x869E, 0xCD5D,
+ 0x869F, 0xCD5E, 0x86A0, 0xCD5F, 0x86A1, 0xCD60, 0x86A2, 0xCD61,
+ 0x86A3, 0xF2BC, 0x86A4, 0xD4E9, 0x86A5, 0xCD62, 0x86A6, 0xC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9, 0xF2CB, 0x86EA, 0xCD89,
+ 0x86EB, 0xCD8A, 0x86EC, 0xCD8B, 0x86ED, 0xF2CE, 0x86EE, 0xC2F9,
+ 0x86EF, 0xCD8C, 0x86F0, 0xD5DD, 0x86F1, 0xF2CC, 0x86F2, 0xF2CD,
+ 0x86F3, 0xF2CF, 0x86F4, 0xF2D3, 0x86F5, 0xCD8D, 0x86F6, 0xCD8E,
+ 0x86F7, 0xCD8F, 0x86F8, 0xF2D9, 0x86F9, 0xD3BC, 0x86FA, 0xCD90,
+ 0x86FB, 0xCD91, 0x86FC, 0xCD92, 0x86FD, 0xCD93, 0x86FE, 0xB6EA,
+ 0x86FF, 0xCD94, 0x8700, 0xCAF1, 0x8701, 0xCD95, 0x8702, 0xB7E4,
+ 0x8703, 0xF2D7, 0x8704, 0xCD96, 0x8705, 0xCD97, 0x8706, 0xCD98,
+ 0x8707, 0xF2D8, 0x8708, 0xF2DA, 0x8709, 0xF2DD, 0x870A, 0xF2DB,
+ 0x870B, 0xCD99, 0x870C, 0xCD9A, 0x870D, 0xF2DC, 0x870E, 0xCD9B,
+ 0x870F, 0xCD9C, 0x8710, 0xCD9D, 0x8711, 0xCD9E, 0x8712, 0xD1D1,
+ 0x8713, 0xF2D1, 0x8714, 0xCD9F, 0x8715, 0xCDC9, 0x8716, 0xCDA0,
+ 0x8717, 0xCECF, 0x8718, 0xD6A9, 0x8719, 0xCE40, 0x871A, 0xF2E3,
+ 0x871B, 0xCE41, 0x871C, 0xC3DB, 0x871D, 0xCE42, 0x871E, 0xF2E0,
+ 0x871F, 0xCE43, 0x8720, 0xCE44, 0x8721, 0xC0AF, 0x8722, 0xF2EC,
+ 0x8723, 0xF2DE, 0x8724, 0xCE45, 0x8725, 0xF2E1, 0x8726, 0xCE46,
+ 0x8727, 0xCE47, 0x8728, 0xCE48, 0x8729, 0xF2E8, 0x872A, 0xCE49,
+ 0x872B, 0xCE4A, 0x872C, 0xCE4B, 0x872D, 0xCE4C, 0x872E, 0xF2E2,
+ 0x872F, 0xCE4D, 0x8730, 0xCE4E, 0x8731, 0xF2E7, 0x8732, 0xCE4F,
+ 0x8733, 0xCE50, 0x8734, 0xF2E6, 0x8735, 0xCE51, 0x8736, 0xCE52,
+ 0x8737, 0xF2E9, 0x8738, 0xCE53, 0x8739, 0xCE54, 0x873A, 0xCE55,
+ 0x873B, 0xF2DF, 0x873C, 0xCE56, 0x873D, 0xCE57, 0x873E, 0xF2E4,
+ 0x873F, 0xF2EA, 0x8740, 0xCE58, 0x8741, 0xCE59, 0x8742, 0xCE5A,
+ 0x8743, 0xCE5B, 0x8744, 0xCE5C, 0x8745, 0xCE5D, 0x8746, 0xCE5E,
+ 0x8747, 0xD3AC, 0x8748, 0xF2E5, 0x8749, 0xB2F5, 0x874A, 0xCE5F,
+ 0x874B, 0xCE60, 0x874C, 0xF2F2, 0x874D, 0xCE61, 0x874E, 0xD0AB,
+ 0x874F, 0xCE62, 0x8750, 0xCE63, 0x8751, 0xCE64, 0x8752, 0xCE65,
+ 0x8753, 0xF2F5, 0x8754, 0xCE66, 0x8755, 0xCE67, 0x8756, 0xCE68,
+ 0x8757, 0xBBC8, 0x8758, 0xCE69, 0x8759, 0xF2F9, 0x875A, 0xCE6A,
+ 0x875B, 0xCE6B, 0x875C, 0xCE6C, 0x875D, 0xCE6D, 0x875E, 0xCE6E,
+ 0x875F, 0xCE6F, 0x8760, 0xF2F0, 0x8761, 0xCE70, 0x8762, 0xCE71,
+ 0x8763, 0xF2F6, 0x8764, 0xF2F8, 0x8765, 0xF2FA, 0x8766, 0xCE72,
+ 0x8767, 0xCE73, 0x8768, 0xCE74, 0x8769, 0xCE75, 0x876A, 0xCE76,
+ 0x876B, 0xCE77, 0x876C, 0xCE78, 0x876D, 0xCE79, 0x876E, 0xF2F3,
+ 0x876F, 0xCE7A, 0x8770, 0xF2F1, 0x8771, 0xCE7B, 0x8772, 0xCE7C,
+ 0x8773, 0xCE7D, 0x8774, 0xBAFB, 0x8775, 0xCE7E, 0x8776, 0xB5FB,
+ 0x8777, 0xCE80, 0x8778, 0xCE81, 0x8779, 0xCE82, 0x877A, 0xCE83,
+ 0x877B, 0xF2EF, 0x877C, 0xF2F7, 0x877D, 0xF2ED, 0x877E, 0xF2EE,
+ 0x877F, 0xCE84, 0x8780, 0xCE85, 0x8781, 0xCE86, 0x8782, 0xF2EB,
+ 0x8783, 0xF3A6, 0x8784, 0xCE87, 0x8785, 0xF3A3, 0x8786, 0xCE88,
+ 0x8787, 0xCE89, 0x8788, 0xF3A2, 0x8789, 0xCE8A, 0x878A, 0xCE8B,
+ 0x878B, 0xF2F4, 0x878C, 0xCE8C, 0x878D, 0xC8DA, 0x878E, 0xCE8D,
+ 0x878F, 0xCE8E, 0x8790, 0xCE8F, 0x8791, 0xCE90, 0x8792, 0xCE91,
+ 0x8793, 0xF2FB, 0x8794, 0xCE92, 0x8795, 0xCE93, 0x8796, 0xCE94,
+ 0x8797, 0xF3A5, 0x8798, 0xCE95, 0x8799, 0xCE96, 0x879A, 0xCE97,
+ 0x879B, 0xCE98, 0x879C, 0xCE99, 0x879D, 0xCE9A, 0x879E, 0xCE9B,
+ 0x879F, 0xC3F8, 0x87A0, 0xCE9C, 0x87A1, 0xCE9D, 0x87A2, 0xCE9E,
+ 0x87A3, 0xCE9F, 0x87A4, 0xCEA0, 0x87A5, 0xCF40, 0x87A6, 0xCF41,
+ 0x87A7, 0xCF42, 0x87A8, 0xF2FD, 0x87A9, 0xCF43, 0x87AA, 0xCF44,
+ 0x87AB, 0xF3A7, 0x87AC, 0xF3A9, 0x87AD, 0xF3A4, 0x87AE, 0xCF45,
+ 0x87AF, 0xF2FC, 0x87B0, 0xCF46, 0x87B1, 0xCF47, 0x87B2, 0xCF48,
+ 0x87B3, 0xF3AB, 0x87B4, 0xCF49, 0x87B5, 0xF3AA, 0x87B6, 0xCF4A,
+ 0x87B7, 0xCF4B, 0x87B8, 0xCF4C, 0x87B9, 0xCF4D, 0x87BA, 0xC2DD,
+ 0x87BB, 0x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
+ 0x87FF, 0xCF84, 0x8800, 0xCF85, 0x8801, 0xCF86, 0x8802, 0xCF87,
+ 0x8803, 0xD9F9, 0x8804, 0xCF88, 0x8805, 0xCF89, 0x8806, 0xCF8A,
+ 0x8807, 0xCF8B, 0x8808, 0xCF8C, 0x8809, 0xCF8D, 0x880A, 0xF3B9,
+ 0x880B, 0xCF8E, 0x880C, 0xCF8F, 0x880D, 0xCF90, 0x880E, 0xCF91,
+ 0x880F, 0xCF92, 0x8810, 0xCF93, 0x8811, 0xCF94, 0x8812, 0xCF95,
+ 0x8813, 0xF3B7, 0x8814, 0xCF96, 0x8815, 0xC8E4, 0x8816, 0xF3B6,
+ 0x8817, 0xCF97, 0x8818, 0xCF98, 0x8819, 0xCF99, 0x881A, 0xCF9A,
+ 0x881B, 0xF3BA, 0x881C, 0xCF9B, 0x881D, 0xCF9C, 0x881E, 0xCF9D,
+ 0x881F, 0xCF9E, 0x8820, 0xCF9F, 0x8821, 0xF3BB, 0x8822, 0xB4C0,
+ 0x8823, 0xCFA0, 0x8824, 0xD040, 0x8825, 0xD041, 0x8826, 0xD042,
+ 0x8827, 0xD043, 0x8828, 0xD044, 0x8829, 0xD045, 0x882A, 0xD046,
+ 0x882B, 0xD047, 0x882C, 0xD048, 0x882D, 0xD049, 0x882E, 0xD04A,
+ 0x882F, 0xD04B, 0x8830, 0xD04C, 0x8831, 0xD04D, 0x8832, 0xEEC3,
+ 0x8833, 0xD04E, 0x8834, 0xD04F, 0x8835, 0xD050, 0x8836, 0xD051,
+ 0x8837, 0xD052, 0x8838, 0xD053, 0x8839, 0xF3BC, 0x883A, 0xD054,
+ 0x883B, 0xD055, 0x883C, 0xF3BD, 0x883D, 0xD056, 0x883E, 0xD057,
+ 0x883F, 0xD058, 0x8840, 0xD1AA, 0x8841, 0xD059, 0x8842, 0xD05A,
+ 0x8843, 0xD05B, 0x8844, 0xF4AC, 0x8845, 0xD0C6, 0x8846, 0xD05C,
+ 0x8847, 0xD05D, 0x8848, 0xD05E, 0x8849, 0xD05F, 0x884A, 0xD060,
+ 0x884B, 0xD061, 0x884C, 0xD0D0, 0x884D, 0xD1DC, 0x884E, 0xD062,
+ 0x884F, 0xD063, 0x8850, 0xD064, 0x8851, 0xD065, 0x8852, 0xD066,
+ 0x8853, 0xD067, 0x8854, 0xCFCE, 0x8855, 0xD068, 0x8856, 0xD069,
+ 0x8857, 0xBDD6, 0x8858, 0xD06A, 0x8859, 0xD1C3, 0x885A, 0xD06B,
+ 0x885B, 0xD06C, 0x885C, 0xD06D, 0x885D, 0xD06E, 0x885E, 0xD06F,
+ 0x885F, 0xD070, 0x8860, 0xD071, 0x8861, 0xBAE2, 0x8862, 0xE1E9,
+ 0x8863, 0xD2C2, 0x8864, 0xF1C2, 0x8865, 0xB2B9, 0x8866, 0xD072,
+ 0x8867, 0xD073, 0x8868, 0xB1ED, 0x8869, 0xF1C3, 0x886A, 0xD074,
+ 0x886B, 0xC9C0, 0x886C, 0xB3C4, 0x886D, 0xD075, 0x886E, 0xD9F2,
+ 0x886F, 0xD076, 0x8870, 0xCBA5, 0x8871, 0xD077, 0x8872, 0xF1C4,
+ 0x8873, 0xD078, 0x8874, 0xD079, 0x8875, 0xD07A, 0x8876, 0xD07B,
+ 0x8877, 0xD6D4, 0x8878, 0xD07C, 0x8879, 0xD07D, 0x887A, 0xD07E,
+ 0x887B, 0xD080, 0x887C, 0xD081, 0x887D, 0xF1C5, 0x887E, 0xF4C0,
+ 0x887F, 0xF1C6, 0x8880, 0xD082, 0x8881, 0xD4AC, 0x8882, 0xF1C7,
+ 0x8883, 0xD083, 0x8884, 0xB0C0, 0x8885, 0xF4C1, 0x8886, 0xD084,
+ 0x8887, 0xD085, 0x8888, 0xF4C2, 0x8889, 0xD086, 0x888A, 0xD087,
+ 0x888B, 0xB4FC, 0x888C, 0xD088, 0x888D, 0xC5DB, 0x888E, 0xD089,
+ 0x888F, 0xD08A, 0x8890, 0xD08B, 0x8891, 0xD08C, 0x8892, 0xCCBB,
+ 0x8893, 0xD08D, 0x8894, 0xD08E, 0x8895, 0xD08F, 0x8896, 0xD0E4,
+ 0x8897, 0xD090, 0x8898, 0xD091, 0x8899, 0xD092, 0x889A, 0xD093,
+ 0x889B, 0xD094, 0x889C, 0xCDE0, 0x889D, 0xD095, 0x889E, 0xD096,
+ 0x889F, 0xD097, 0x88A0, 0xD098, 0x88A1, 0xD099, 0x88A2, 0xF1C8,
+ 0x88A3, 0xD09A, 0x88A4, 0xD9F3, 0x88A5, 0xD09B, 0x88A6, 0xD09C,
+ 0x88A7, 0xD09D, 0x88A8, 0xD09E, 0x88A9, 0xD09F, 0x88AA, 0xD0A0,
+ 0x88AB, 0xB1BB, 0x88AC, 0xD140, 0x88AD, 0xCFAE, 0x88AE, 0xD141,
+ 0x88AF, 0xD142, 0x88B0, 0xD143, 0x88B1, 0xB8A4, 0x88B2, 0xD144,
+ 0x88B3, 0xD145, 0x88B4, 0xD146, 0x88B5, 0xD147, 0x88B6, 0xD148,
+ 0x88B7, 0xF1CA, 0x88B8, 0xD149, 0x88B9, 0xD14A, 0x88BA, 0xD14B,
+ 0x88BB, 0xD14C, 0x88BC, 0xF1CB, 0x88BD, 0xD14D, 0x88BE, 0xD14E,
+ 0x88BF, 0xD14F, 0x88C0, 0xD150, 0x88C1, 0xB2C3, 0x88C2, 0xC1D1,
+ 0x88C3, 0xD151, 0x88C4, 0xD152, 0x88C5, 0xD7B0, 0x88C6, 0xF1C9,
+ 0x88C7, 0xD153, 0x88C8, 0xD154, 0x88C9, 0xF1CC, 0x88CA, 0xD155,
+ 0x88CB, 0xD156, 0x88CC, 0xD157, 0x88CD, 0xD158, 0x88CE, 0xF1CE,
+ 0x88CF, 0xD159, 0x88D0, 0xD15A, 0x88D1, 0xD15B, 0x88D2, 0xD9F6,
+ 0x88D3, 0xD15C, 0x88D4, 0xD2E1, 0x88D5, 0xD4A3, 0x88D6, 0xD15D,
+ 0x88D7, 0xD15E, 0x88D8, 0xF4C3, 0x88D9, 0xC8B9, 0x88DA, 0xD15F,
+ 0x88DB, 0xD160, 0x88DC, 0xD161, 0x88DD, 0xD162, 0x88DE, 0xD163,
+ 0x88DF, 0xF4C4, 0x88E0, 0xD164, 0x88E1, 0xD165, 0x88E2, 0xF1CD,
+ 0x88E3, 0xF1CF, 0x88E4, 0xBFE3, 0x88E5, 0xF1D0, 0x88E6, 0xD166,
+ 0x88E7, 0xD167, 0x88E8, 0xF1D4, 0x88E9, 0xD168, 0x88EA, 0xD169,
+ 0x88EB, 0xD16A, 0x88EC, 0xD16B, 0x88ED, 0xD16C, 0x88EE, 0xD16D,
+ 0x88EF, 0xD16E, 0x88F0, 0xF1D6, 0x88F1, 0xF1D1, 0x88F2, 0xD16F,
+ 0x88F3, 0xC9D1, 0x88F4, 0xC5E1, 0x88F5, 0xD170, 0x88F6, 0xD171,
+ 0x88F7, 0xD172, 0x88F8, 0xC2E3, 0x88F9, 0xB9FC, 0x88FA, 0xD173,
+ 0x88FB, 0xD174, 0x88FC, 0xF1D3, 0x88FD, 0xD175, 0x88FE, 0xF1D5,
+ 0x88FF, 0xD176, 0x8900, 0xD177, 0x8901, 0xD178, 0x8902, 0xB9D3,
+ 0x8903, 0xD179, 0x8904, 0xD17A, 0x8905, 0xD17B, 0x8906, 0xD17C,
+ 0x8907, 0xD17D, 0x8908, 0xD17E, 0x8909, 0xD180, 0x890A, 0xF1DB,
+ 0x890B, 0xD181, 0x890C, 0xD182, 0x890D, 0xD183, 0x890E, 0xD184,
+ 0x890F, 0xD185, 0x8910, 0xBAD6, 0x8911, 0xD186, 0x8912, 0xB0FD,
+ 0x8913, 0xF1D9, 0x8914, 0xD187, 0x8915, 0xD188, 0x8916, 0xD189,
+ 0x8917, 0xD18A, 0x8918, 0xD18B, 0x8919, 0xF1D8, 0x891A, 0xF1D2,
+ 0x891B, 0xF1DA, 0x891C, 0xD18C, 0x891D, 0xD18D, 0x891E, 0xD18E,
+ 0x891F, 0xD18F, 0x8920, 0xD190, 0x8921, 0xF1D7, 0x8922, 0xD191,
+ 0x8923, 0xD192, 0x8924, 0xD193, 0x8925, 0xC8EC, 0x8926, 0xD194,
+ 0x8927, 0xD195, 0x8928, 0xD196, 0x8929, 0xD197, 0x892A, 0xCDCA,
+ 0x892B, 0xF1DD, 0x892C, 0xD198, 0x892D, 0xD199, 0x892E, 0xD19A,
+ 0x892F, 0xD19B, 0x8930, 0xE5BD, 0x8931, 0xD19C, 0x8932, 0xD19D,
+ 0x8933, 0xD19E, 0x8934, 0xF1DC, 0x8935, 0xD19F, 0x8936, 0xF1DE,
+ 0x8937, 0xD1A0, 0x8938, 0xD240, 0x8939, 0xD241, 0x893A, 0xD242,
+ 0x893B, 0xD243, 0x893C, 0xD244, 0x893D, 0xD245, 0x893E, 0xD246,
+ 0x893F, 0xD247, 0x8940, 0xD248, 0x8941, 0xF1DF, 0x8942, 0xD249,
+ 0x8943, 0xD24A, 0x8944, 0xCFE5, 0x8945, 0xD24B, 0x8946, 0xD24C,
+ 0x8947, 0xD24D, 0x8948, 0xD24E, 0x8949, 0xD24F, 0x894A, 0xD250,
+ 0x894B, 0xD251, 0x894C, 0xD252, 0x894D, 0xD253, 0x894E, 0xD254,
+ 0x894F, 0xD255, 0x8950, 0xD256, 0x8951, 0xD257, 0x8952, 0xD258,
+ 0x8953, 0xD259, 0x8954, 0xD25A, 0x8955, 0xD25B, 0x8956, 0xD25C,
+ 0x8957, 0xD25D, 0x8958, 0xD25E, 0x8959, 0xD25F, 0x895A, 0xD260,
+ 0x895B, 0xD261, 0x895C, 0xD262, 0x895D, 0xD263, 0x895E, 0xF4C5,
+ 0x895F, 0xBDF3, 0x8960, 0xD264, 0x8961, 0xD265, 0x8962, 0xD266,
+ 0x8963, 0xD267, 0x8964, 0xD268, 0x8965, 0xD269, 0x8966, 0xF1E0,
+ 0x8967, 0xD26A, 0x8968, 0xD26B, 0x8969, 0xD26C, 0x896A, 0xD26D,
+ 0x896B, 0xD26E, 0x896C, 0xD26F, 0x896D, 0xD270, 0x896E, 0xD271,
+ 0x896F, 0xD272, 0x8970, 0xD273, 0x8971, 0xD274, 0x8972, 0xD275,
+ 0x8973, 0xD276, 0x8974, 0xD277, 0x8975, 0xD278, 0x8976, 0xD279,
+ 0x8977, 0xD27A, 0x8978, 0xD27B, 0x8979, 0xD27C, 0x897A, 0xD27D,
+ 0x897B, 0xF1E1, 0x897C, 0xD27E, 0x897D, 0xD280, 0x897E, 0xD281,
+ 0x897F, 0xCEF7, 0x8980, 0xD282, 0x8981, 0xD2AA, 0x8982, 0xD283,
+ 0x8983, 0xF1FB, 0x8984, 0xD284, 0x8985, 0xD285, 0x8986, 0xB8B2,
+ 0x8987, 0xD286, 0x8988, 0xD287, 0x8989, 0xD288, 0x898A, 0xD289,
+ 0x898B, 0xD28A, 0x898C, 0xD28B, 0x898D, 0xD28C, 0x898E, 0xD28D,
+ 0x898F, 0xD28E, 0x8990, 0xD28F, 0x8991, 0xD290, 0x8992, 0xD291,
+ 0x8993, 0xD292, 0x8994, 0xD293, 0x8995, 0xD294, 0x8996, 0xD295,
+ 0x8997, 0xD296, 0x8998, 0xD297, 0x8999, 0xD298, 0x899A, 0xD299,
+ 0x899B, 0xD29A, 0x899C, 0xD29B, 0x899D, 0xD29C, 0x899E, 0xD29D,
+ 0x899F, 0xD29E, 0x89A0, 0xD29F, 0x89A1, 0xD2A0, 0x89A2, 0xD340,
+ 0x89A3, 0xD341, 0x89A4, 0xD342, 0x89A5, 0xD343, 0x89A6, 0xD344,
+ 0x89A7, 0xD345, 0x89A8, 0xD346, 0x89A9, 0xD347, 0x89AA, 0xD348,
+ 0x89AB, 0xD349, 0x89AC, 0xD34A, 0x89AD, 0xD34B, 0x89AE, 0xD34C,
+ 0x89AF, 0xD34D, 0x89B0, 0xD34E, 0x89B1, 0xD34F, 0x89B2, 0xD350,
+ 0x89B3, 0xD351, 0x89B4, 0xD352, 0x89B5, 0xD353, 0x89B6, 0xD354,
+ 0x89B7, 0xD355, 0x89B8, 0xD356, 0x89B9, 0xD357, 0x89BA, 0xD358,
+ 0x89BB, 0xD359, 0x89BC, 0xD35A, 0x89BD, 0xD35B, 0x89BE, 0xD35C,
+ 0x89BF, 0xD35D, 0x89C0, 0xD35E, 0x89C1, 0xBCFB, 0x89C2, 0xB9DB,
+ 0x89C3, 0xD35F, 0x89C4, 0xB9E6, 0x89C5, 0xC3D9, 0x89C6, 0xCAD3,
+ 0x89C7, 0xEAE8, 0x89C8, 0xC0C0, 0x89C9, 0xBEF5, 0x89CA, 0xEAE9,
+ 0x89CB, 0xEAEA, 0x89CC, 0xEAEB, 0x89CD, 0xD360, 0x89CE, 0xEAEC,
+ 0x89CF, 0xEAED, 0x89D0, 0xEAEE, 0x89D1, 0xEAEF, 0x89D2, 0xBDC7,
+ 0x89D3, 0xD361, 0x89D4, 0xD362, 0x89D5, 0xD363, 0x89D6, 0xF5FB,
+ 0x89D7, 0xD364, 0x89D8, 0xD365, 0x89D9, 0xD366, 0x89DA, 0xF5FD,
+ 0x89DB, 0xD367, 0x89DC, 0xF5FE, 0x89DD, 0xD368, 0x89DE, 0xF5FC,
+ 0x89DF, 0xD369, 0x89E0, 0xD36A, 0x89E1, 0xD36B, 0x89E2, 0xD36C,
+ 0x89E3, 0xBDE2, 0x89E4, 0xD36D, 0x89E5, 0xF6A1, 0x89E6, 0xB4A5,
+ 0x89E7, 0xD36E, 0x89E8, 0xD36F, 0x89E9, 0xD370, 0x89EA, 0xD371,
+ 0x89EB, 0xF6A2, 0x89EC, 0xD372, 0x89ED, 0xD373, 0x89EE, 0xD374,
+ 0x89EF, 0xF6A3, 0x89F0, 0xD375, 0x89F1, 0xD376, 0x89F2, 0xD377,
+ 0x89F3, 0xECB2, 0x89F4, 0xD378, 0x89F5, 0xD379, 0x89F6, 0xD37A,
+ 0x89F7, 0xD37B, 0x89F8, 0xD37C, 0x89F9, 0xD37D, 0x89FA, 0xD37E,
+ 0x89FB, 0xD380, 0x89FC, 0xD381, 0x89FD, 0xD382, 0x89FE, 0xD383,
+ 0x89FF, 0xD384, 0x8A00, 0xD1D4, 0x8A01, 0xD385, 0x8A02, 0xD386,
+ 0x8A03, 0xD387, 0x8A04, 0xD388, 0x8A05, 0xD389, 0x8A06, 0xD38A,
+ 0x8A07, 0xD9EA, 0x8A08, 0xD38B, 0x8A09, 0xD38C, 0x8A0A, 0xD38D,
+ 0x8A0B, 0xD38E, 0x8A0C, 0xD38F, 0x8A0D, 0xD390, 0x8A0E, 0xD391,
+ 0x8A0F, 0xD392, 0x8A10, 0xD393, 0x8A11, 0xD394, 0x8A12, 0xD395,
+ 0x8A13, 0xD396, 0x8A14, 0xD397, 0x8A15, 0xD398, 0x8A16, 0xD399,
+ 0x8A17, 0xD39A, 0x8A18, 0xD39B, 0x8A19, 0xD39C, 0x8A1A, 0xD39D,
+ 0x8A1B, 0xD39E, 0x8A1C, 0xD39F, 0x8A1D, 0xD3A0, 0x8A1E, 0xD440,
+ 0x8A1F, 0xD441, 0x8A20, 0xD442, 0x8A21, 0xD443, 0x8A22, 0xD444,
+ 0x8A23, 0xD445, 0x8A24, 0xD446, 0x8A25, 0xD447, 0x8A26, 0xD448,
+ 0x8A27, 0xD449, 0x8A28, 0xD44A, 0x8A29, 0xD44B, 0x8A2A, 0xD44C,
+ 0x8A2B, 0xD44D, 0x8A2C, 0xD44E, 0x8A2D, 0xD44F, 0x8A2E, 0xD450,
+ 0x8A2F, 0xD451, 0x8A30, 0xD452, 0x8A31, 0xD453, 0x8A32, 0xD454,
+ 0x8A33, 0xD455, 0x8A34, 0xD456, 0x8A35, 0xD457, 0x8A36, 0xD458,
+ 0x8A37, 0xD459, 0x8A38, 0xD45A, 0x8A39, 0xD45B, 0x8A3A, 0xD45C,
+ 0x8A3B, 0xD45D, 0x8A3C, 0xD45E, 0x8A3D, 0xD45F, 0x8A3E, 0xF6A4,
+ 0x8A3F, 0xD460, 0x8A40, 0xD461, 0x8A41, 0xD462, 0x8A42, 0xD463,
+ 0x8A43, 0xD464, 0x8A44, 0xD465, 0x8A45, 0xD466, 0x8A46, 0xD467,
+ 0x8A47, 0xD468, 0x8A48, 0xEEBA, 0x8A49, 0xD469, 0x8A4A, 0xD46A,
+ 0x8A4B, 0xD46B, 0x8A4C, 0xD46C, 0x8A4D, 0xD46D, 0x8A4E, 0xD46E,
+ 0x8A4F, 0xD46F, 0x8A50, 0xD470, 0x8A51, 0xD471, 0x8A52, 0xD472,
+ 0x8A53, 0xD473, 0x8A54, 0xD474, 0x8A55, 0xD475, 0x8A56, 0xD476,
+ 0x8A57, 0xD477, 0x8A58, 0xD478, 0x8A59, 0xD479, 0x8A5A, 0xD47A,
+ 0x8A5B, 0xD47B, 0x8A5C, 0xD47C, 0x8A5D, 0xD47D, 0x8A5E, 0xD47E,
+ 0x8A5F, 0xD480, 0x8A60, 0xD481, 0x8A61, 0xD482, 0x8A62, 0xD483,
+ 0x8A63, 0xD484, 0x8A64, 0xD485, 0x8A65, 0xD486, 0x8A66, 0xD487,
+ 0x8A67, 0xD488, 0x8A68, 0xD489, 0x8A69, 0xD48A, 0x8A6A, 0xD48B,
+ 0x8A6B, 0xD48C, 0x8A6C, 0xD48D, 0x8A6D, 0xD48E, 0x8A6E, 0xD48F,
+ 0x8A6F, 0xD490, 0x8A70, 0xD491, 0x8A71, 0xD492, 0x8A72, 0xD493,
+ 0x8A73, 0xD494, 0x8A74, 0xD495, 0x8A75, 0xD496, 0x8A76, 0xD497,
+ 0x8A77, 0xD498, 0x8A78, 0xD499, 0x8A79, 0xD5B2, 0x8A7A, 0xD49A,
+ 0x8A7B, 0xD49B, 0x8A7C, 0xD49C, 0x8A7D, 0xD49D, 0x8A7E, 0xD49E,
+ 0x8A7F, 0xD49F, 0x8A80, 0xD4A0, 0x8A81, 0xD540, 0x8A82, 0xD541,
+ 0x8A83, 0xD542, 0x8A84, 0xD543, 0x8A85, 0xD544, 0x8A86, 0xD545,
+ 0x8A87, 0xD546, 0x8A88, 0xD547, 0x8A89, 0xD3FE, 0x8A8A, 0xCCDC,
+ 0x8A8B, 0xD548, 0x8A8C, 0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D, 0x8AD1, 0xD58E, 0x8AD2, 0xD58F,
+ 0x8AD3, 0xD590, 0x8AD4, 0xD591, 0x8AD5, 0xD592, 0x8AD6, 0xD593,
+ 0x8AD7, 0xD594, 0x8AD8, 0xD595, 0x8AD9, 0xD596, 0x8ADA, 0xD597,
+ 0x8ADB, 0xD598, 0x8ADC, 0xD599, 0x8ADD, 0xD59A, 0x8ADE, 0xD59B,
+ 0x8ADF, 0xD59C, 0x8AE0, 0xD59D, 0x8AE1, 0xD59E, 0x8AE2, 0xD59F,
+ 0x8AE3, 0xD5A0, 0x8AE4, 0xD640, 0x8AE5, 0xD641, 0x8AE6, 0xD642,
+ 0x8AE7, 0xD643, 0x8AE8, 0xD644, 0x8AE9, 0xD645, 0x8AEA, 0xD646,
+ 0x8AEB, 0xD647, 0x8AEC, 0xD648, 0x8AED, 0xD649, 0x8AEE, 0xD64A,
+ 0x8AEF, 0xD64B, 0x8AF0, 0xD64C, 0x8AF1, 0xD64D, 0x8AF2, 0xD64E,
+ 0x8AF3, 0xD64F, 0x8AF4, 0xD650, 0x8AF5, 0xD651, 0x8AF6, 0xD652,
+ 0x8AF7, 0xD653, 0x8AF8, 0xD654, 0x8AF9, 0xD655, 0x8AFA, 0xD656,
+ 0x8AFB, 0xD657, 0x8AFC, 0xD658, 0x8AFD, 0xD659, 0x8AFE, 0xD65A,
+ 0x8AFF, 0xD65B, 0x8B00, 0xD65C, 0x8B01, 0xD65D, 0x8B02, 0xD65E,
+ 0x8B03, 0xD65F, 0x8B04, 0xD660, 0x8B05, 0xD661, 0x8B06, 0xD662,
+ 0x8B07, 0xE5C0, 0x8B08, 0xD663, 0x8B09, 0xD664, 0x8B0A, 0xD665,
+ 0x8B0B, 0xD666, 0x8B0C, 0xD667, 0x8B0D, 0xD668, 0x8B0E, 0xD669,
+ 0x8B0F, 0xD66A, 0x8B10, 0xD66B, 0x8B11, 0xD66C, 0x8B12, 0xD66D,
+ 0x8B13, 0xD66E, 0x8B14, 0xD66F, 0x8B15, 0xD670, 0x8B16, 0xD671,
+ 0x8B17, 0xD672, 0x8B18, 0xD673, 0x8B19, 0xD674, 0x8B1A, 0xD675,
+ 0x8B1B, 0xD676, 0x8B1C, 0xD677, 0x8B1D, 0xD678, 0x8B1E, 0xD679,
+ 0x8B1F, 0xD67A, 0x8B20, 0xD67B, 0x8B21, 0xD67C, 0x8B22, 0xD67D,
+ 0x8B23, 0xD67E, 0x8B24, 0xD680, 0x8B25, 0xD681, 0x8B26, 0xF6A5,
+ 0x8B27, 0xD682, 0x8B28, 0xD683, 0x8B29, 0xD684, 0x8B2A, 0xD685,
+ 0x8B2B, 0xD686, 0x8B2C, 0xD687, 0x8B2D, 0xD688, 0x8B2E, 0xD689,
+ 0x8B2F, 0xD68A, 0x8B30, 0xD68B, 0x8B31, 0xD68C, 0x8B32, 0xD68D,
+ 0x8B33, 0xD68E, 0x8B34, 0xD68F, 0x8B35, 0xD690, 0x8B36, 0xD691,
+ 0x8B37, 0xD692, 0x8B38, 0xD693, 0x8B39, 0xD694, 0x8B3A, 0xD695,
+ 0x8B3B, 0xD696, 0x8B3C, 0xD697, 0x8B3D, 0xD698, 0x8B3E, 0xD699,
+ 0x8B3F, 0xD69A, 0x8B40, 0xD69B, 0x8B41, 0xD69C, 0x8B42, 0xD69D,
+ 0x8B43, 0xD69E, 0x8B44, 0xD69F, 0x8B45, 0xD6A0, 0x8B46, 0xD740,
+ 0x8B47, 0xD741, 0x8B48, 0xD742, 0x8B49, 0xD743, 0x8B4A, 0xD744,
+ 0x8B4B, 0xD745, 0x8B4C, 0xD746, 0x8B4D, 0xD747, 0x8B4E, 0xD748,
+ 0x8B4F, 0xD749, 0x8B50, 0xD74A, 0x8B51, 0xD74B, 0x8B52, 0xD74C,
+ 0x8B53, 0xD74D, 0x8B54, 0xD74E, 0x8B55, 0xD74F, 0x8B56, 0xD750,
+ 0x8B57, 0xD751, 0x8B58, 0xD752, 0x8B59, 0xD753, 0x8B5A, 0xD754,
+ 0x8B5B, 0xD755, 0x8B5C, 0xD756, 0x8B5D, 0xD757, 0x8B5E, 0xD758,
+ 0x8B5F, 0xD759, 0x8B60, 0xD75A, 0x8B61, 0xD75B, 0x8B62, 0xD75C,
+ 0x8B63, 0xD75D, 0x8B64, 0xD75E, 0x8B65, 0xD75F, 0x8B66, 0xBEAF,
+ 0x8B67, 0xD760, 0x8B68, 0xD761, 0x8B69, 0xD762, 0x8B6A, 0xD763,
+ 0x8B6B, 0xD764, 0x8B6C, 0xC6A9, 0x8B6D, 0xD765, 0x8B6E, 0xD766,
+ 0x8B6F, 0xD767, 0x8B70, 0xD768, 0x8B71, 0xD769, 0x8B72, 0xD76A,
+ 0x8B73, 0xD76B, 0x8B74, 0xD76C, 0x8B75, 0xD76D, 0x8B76, 0xD76E,
+ 0x8B77, 0xD76F, 0x8B78, 0xD770, 0x8B79, 0xD771, 0x8B7A, 0xD772,
+ 0x8B7B, 0xD773, 0x8B7C, 0xD774, 0x8B7D, 0xD775, 0x8B7E, 0xD776,
+ 0x8B7F, 0xD777, 0x8B80, 0xD778, 0x8B81, 0xD779, 0x8B82, 0xD77A,
+ 0x8B83, 0xD77B, 0x8B84, 0xD77C, 0x8B85, 0xD77D, 0x8B86, 0xD77E,
+ 0x8B87, 0xD780, 0x8B88, 0xD781, 0x8B89, 0xD782, 0x8B8A, 0xD783,
+ 0x8B8B, 0xD784, 0x8B8C, 0xD785, 0x8B8D, 0xD786, 0x8B8E, 0xD787,
+ 0x8B8F, 0xD788, 0x8B90, 0xD789, 0x8B91, 0xD78A, 0x8B92, 0xD78B,
+ 0x8B93, 0xD78C, 0x8B94, 0xD78D, 0x8B95, 0xD78E, 0x8B96, 0xD78F,
+ 0x8B97, 0xD790, 0x8B98, 0xD791, 0x8B99, 0xD792, 0x8B9A, 0xD793,
+ 0x8B9B, 0xD794, 0x8B9C, 0xD795, 0x8B9D, 0xD796, 0x8B9E, 0xD797,
+ 0x8B9F, 0xD798, 0x8BA0, 0xDAA5, 0x8BA1, 0xBCC6, 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8C62, 0xBBBF,
+ 0x8C63, 0xD862, 0x8C64, 0xD863, 0x8C65, 0xD864, 0x8C66, 0xD865,
+ 0x8C67, 0xD866, 0x8C68, 0xD867, 0x8C69, 0xD868, 0x8C6A, 0xBAC0,
+ 0x8C6B, 0xD4A5, 0x8C6C, 0xD869, 0x8C6D, 0xD86A, 0x8C6E, 0xD86B,
+ 0x8C6F, 0xD86C, 0x8C70, 0xD86D, 0x8C71, 0xD86E, 0x8C72, 0xD86F,
+ 0x8C73, 0xE1D9, 0x8C74, 0xD870, 0x8C75, 0xD871, 0x8C76, 0xD872,
+ 0x8C77, 0xD873, 0x8C78, 0xF5F4, 0x8C79, 0xB1AA, 0x8C7A, 0xB2F2,
+ 0x8C7B, 0xD874, 0x8C7C, 0xD875, 0x8C7D, 0xD876, 0x8C7E, 0xD877,
+ 0x8C7F, 0xD878, 0x8C80, 0xD879, 0x8C81, 0xD87A, 0x8C82, 0xF5F5,
+ 0x8C83, 0xD87B, 0x8C84, 0xD87C, 0x8C85, 0xF5F7, 0x8C86, 0xD87D,
+ 0x8C87, 0xD87E, 0x8C88, 0xD880, 0x8C89, 0xBAD1, 0x8C8A, 0xF5F6,
+ 0x8C8B, 0xD881, 0x8C8C, 0xC3B2, 0x8C8D, 0xD882, 0x8C8E, 0xD883,
+ 0x8C8F, 0xD884, 0x8C90, 0xD885, 0x8C91, 0xD886, 0x8C92, 0xD887,
+ 0x8C93, 0xD888, 0x8C94, 0xF5F9, 0x8C95, 0xD889, 0x8C96, 0xD88A,
+ 0x8C97, 0xD88B, 0x8C98, 0xF5F8, 0x8C99, 0xD88C, 0x8C9A, 0xD88D,
+ 0x8C9B, 0xD88E, 0x8C9C, 0xD88F, 0x8C9D, 0xD890, 0x8C9E, 0xD891,
+ 0x8C9F, 0xD892, 0x8CA0, 0xD893, 0x8CA1, 0xD894, 0x8CA2, 0xD895,
+ 0x8CA3, 0xD896, 0x8CA4, 0xD897, 0x8CA5, 0xD898, 0x8CA6, 0xD899,
+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8FEF, 0xDE8F, 0x8FF0, 0xCAF6, 0x8FF1, 0xDE90, 0x8FF2, 0xDE91,
+ 0x8FF3, 0xE5C9, 0x8FF4, 0xDE92, 0x8FF5, 0xDE93, 0x8FF6, 0xDE94,
+ 0x8FF7, 0xC3D4, 0x8FF8, 0xB1C5, 0x8FF9, 0xBCA3, 0x8FFA, 0xDE95,
+ 0x8FFB, 0xDE96, 0x8FFC, 0xDE97, 0x8FFD, 0xD7B7, 0x8FFE, 0xDE98,
+ 0x8FFF, 0xDE99, 0x9000, 0xCDCB, 0x9001, 0xCBCD, 0x9002, 0xCACA,
+ 0x9003, 0xCCD3, 0x9004, 0xE5CC, 0x9005, 0xE5CB, 0x9006, 0xC4E6,
+ 0x9007, 0xDE9A, 0x9008, 0xDE9B, 0x9009, 0xD1A1, 0x900A, 0xD1B7,
+ 0x900B, 0xE5CD, 0x900C, 0xDE9C, 0x900D, 0xE5D0, 0x900E, 0xDE9D,
+ 0x900F, 0xCDB8, 0x9010, 0xD6F0, 0x9011, 0xE5CF, 0x9012, 0xB5DD,
+ 0x9013, 0xDE9E, 0x9014, 0xCDBE, 0x9015, 0xDE9F, 0x9016, 0xE5D1,
+ 0x9017, 0xB6BA, 0x9018, 0xDEA0, 0x9019, 0xDF40, 0x901A, 0xCDA8,
+ 0x901B, 0xB9E4, 0x901C, 0xDF41, 0x901D, 0xCAC5, 0x901E, 0xB3D1,
+ 0x901F, 0xCBD9, 0x9020, 0xD4EC, 0x9021, 0xE5D2, 0x9022, 0xB7EA,
+ 0x9023, 0xDF42, 0x9024, 0xDF43, 0x9025, 0xDF44, 0x9026, 0xE5CE,
+ 0x9027, 0xDF45, 0x9028, 0xDF46, 0x9029, 0xDF47, 0x902A, 0xDF48,
+ 0x902B, 0xDF49, 0x902C, 0xDF4A, 0x902D, 0xE5D5, 0x902E, 0xB4FE,
+ 0x902F, 0xE5D6, 0x9030, 0xDF4B, 0x9031, 0xDF4C, 0x9032, 0xDF4D,
+ 0x9033, 0xDF4E, 0x9034, 0xDF4F, 0x9035, 0xE5D3, 0x9036, 0xE5D4,
+ 0x9037, 0xDF50, 0x9038, 0xD2DD, 0x9039, 0xDF51, 0x903A, 0xDF52,
+ 0x903B, 0xC2DF, 0x903C, 0xB1C6, 0x903D, 0xDF53, 0x903E, 0xD3E2,
+ 0x903F, 0xDF54, 0x9040, 0xDF55, 0x9041, 0xB6DD, 0x9042, 0xCBEC,
+ 0x9043, 0xDF56, 0x9044, 0xE5D7, 0x9045, 0xDF57, 0x9046, 0xDF58,
+ 0x9047, 0xD3F6, 0x9048, 0xDF59, 0x9049, 0xDF5A, 0x904A, 0xDF5B,
+ 0x904B, 0xDF5C, 0x904C, 0xDF5D, 0x904D, 0xB1E9, 0x904E, 0xDF5E,
+ 0x904F, 0xB6F4, 0x9050, 0xE5DA, 0x9051, 0xE5D8, 0x9052, 0xE5D9,
+ 0x9053, 0xB5C0, 0x9054, 0xDF5F, 0x9055, 0xDF60, 0x9056, 0xDF61,
+ 0x9057, 0xD2C5, 0x9058, 0xE5DC, 0x9059, 0xDF62, 0x905A, 0xDF63,
+ 0x905B, 0xE5DE, 0x905C, 0xDF64, 0x905D, 0xDF65, 0x905E, 0xDF66,
+ 0x905F, 0xDF67, 0x9060, 0xDF68, 0x9061, 0xDF69, 0x9062, 0xE5DD,
+ 0x9063, 0xC7B2, 0x9064, 0xDF6A, 0x9065, 0xD2A3, 0x9066, 0xDF6B,
+ 0x9067, 0xDF6C, 0x9068, 0xE5DB, 0x9069, 0xDF6D, 0x906A, 0xDF6E,
+ 0x906B, 0xDF6F, 0x906C, 0xDF70, 0x906D, 0xD4E2, 0x906E, 0xD5DA,
+ 0x906F, 0xDF71, 0x9070, 0xDF72, 0x9071, 0xDF73, 0x9072, 0xDF74,
+ 0x9073, 0xDF75, 0x9074, 0xE5E0, 0x9075, 0xD7F1, 0x9076, 0xDF76,
+ 0x9077, 0xDF77, 0x9078, 0xDF78, 0x9079, 0xDF79, 0x907A, 0xDF7A,
+ 0x907B, 0xDF7B, 0x907C, 0xDF7C, 0x907D, 0xE5E1, 0x907E, 0xDF7D,
+ 0x907F, 0xB1DC, 0x9080, 0xD1FB, 0x9081, 0xDF7E, 0x9082, 0xE5E2,
+ 0x9083, 0xE5E4, 0x9084, 0xDF80, 0x9085, 0xDF81, 0x9086, 0xDF82,
+ 0x9087, 0xDF83, 0x9088, 0xE5E3, 0x9089, 0xDF84, 0x908A, 0xDF85,
+ 0x908B, 0xE5E5, 0x908C, 0xDF86, 0x908D, 0xDF87, 0x908E, 0xDF88,
+ 0x908F, 0xDF89, 0x9090, 0xDF8A, 0x9091, 0xD2D8, 0x9092, 0xDF8B,
+ 0x9093, 0xB5CB, 0x9094, 0xDF8C, 0x9095, 0xE7DF, 0x9096, 0xDF8D,
+ 0x9097, 0xDAF5, 0x9098, 0xDF8E, 0x9099, 0xDAF8, 0x909A, 0xDF8F,
+ 0x909B, 0xDAF6, 0x909C, 0xDF90, 0x909D, 0xDAF7, 0x909E, 0xDF91,
+ 0x909F, 0xDF92, 0x90A0, 0xDF93, 0x90A1, 0xDAFA, 0x90A2, 0xD0CF,
+ 0x90A3, 0xC4C7, 0x90A4, 0xDF94, 0x90A5, 0xDF95, 0x90A6, 0xB0EE,
+ 0x90A7, 0xDF96, 0x90A8, 0xDF97, 0x90A9, 0xDF98, 0x90AA, 0xD0B0,
+ 0x90AB, 0xDF99, 0x90AC, 0xDAF9, 0x90AD, 0xDF9A, 0x90AE, 0xD3CA,
+ 0x90AF, 0xBAAA, 0x90B0, 0xDBA2, 0x90B1, 0xC7F1, 0x90B2, 0xDF9B,
+ 0x90B3, 0xDAFC, 0x90B4, 0xDAFB, 0x90B5, 0xC9DB, 0x90B6, 0xDAFD,
+ 0x90B7, 0xDF9C, 0x90B8, 0xDBA1, 0x90B9, 0xD7DE, 0x90BA, 0xDAFE,
+ 0x90BB, 0xC1DA, 0x90BC, 0xDF9D, 0x90BD, 0xDF9E, 0x90BE, 0xDBA5,
+ 0x90BF, 0xDF9F, 0x90C0, 0xDFA0, 0x90C1, 0xD3F4, 0x90C2, 0xE040,
+ 0x90C3, 0xE041, 0x90C4, 0xDBA7, 0x90C5, 0xDBA4, 0x90C6, 0xE042,
+ 0x90C7, 0xDBA8, 0x90C8, 0xE043, 0x90C9, 0xE044, 0x90CA, 0xBDBC,
+ 0x90CB, 0xE045, 0x90CC, 0xE046, 0x90CD, 0xE047, 0x90CE, 0xC0C9,
+ 0x90CF, 0xDBA3, 0x90D0, 0xDBA6, 0x90D1, 0xD6A3, 0x90D2, 0xE048,
+ 0x90D3, 0xDBA9, 0x90D4, 0xE049, 0x90D5, 0xE04A, 0x90D6, 0xE04B,
+ 0x90D7, 0xDBAD, 0x90D8, 0xE04C, 0x90D9, 0xE04D, 0x90DA, 0xE04E,
+ 0x90DB, 0xDBAE, 0x90DC, 0xDBAC, 0x90DD, 0xBAC2, 0x90DE, 0xE04F,
+ 0x90DF, 0xE050, 0x90E0, 0xE051, 0x90E1, 0xBFA4, 0x90E2, 0xDBAB,
+ 0x90E3, 0xE052, 0x90E4, 0xE053, 0x90E5, 0xE054, 0x90E6, 0xDBAA,
+ 0x90E7, 0xD4C7, 0x90E8, 0xB2BF, 0x90E9, 0xE055, 0x90EA, 0xE056,
+ 0x90EB, 0xDBAF, 0x90EC, 0xE057, 0x90ED, 0xB9F9, 0x90EE, 0xE058,
+ 0x90EF, 0xDBB0, 0x90F0, 0xE059, 0x90F1, 0xE05A, 0x90F2, 0xE05B,
+ 0x90F3, 0xE05C, 0x90F4, 0xB3BB, 0x90F5, 0xE05D, 0x90F6, 0xE05E,
+ 0x90F7, 0xE05F, 0x90F8, 0xB5A6, 0x90F9, 0xE060, 0x90FA, 0xE061,
+ 0x90FB, 0xE062, 0x90FC, 0xE063, 0x90FD, 0xB6BC, 0x90FE, 0xDBB1,
+ 0x90FF, 0xE064, 0x9100, 0xE065, 0x9101, 0xE066, 0x9102, 0xB6F5,
+ 0x9103, 0xE067, 0x9104, 0xDBB2, 0x9105, 0xE068, 0x9106, 0xE069,
+ 0x9107, 0xE06A, 0x9108, 0xE06B, 0x9109, 0xE06C, 0x910A, 0xE06D,
+ 0x910B, 0xE06E, 0x910C, 0xE06F, 0x910D, 0xE070, 0x910E, 0xE071,
+ 0x910F, 0xE072, 0x9110, 0xE073, 0x9111, 0xE074, 0x9112, 0xE075,
+ 0x9113, 0xE076, 0x9114, 0xE077, 0x9115, 0xE078, 0x9116, 0xE079,
+ 0x9117, 0xE07A, 0x9118, 0xE07B, 0x9119, 0xB1C9, 0x911A, 0xE07C,
+ 0x911B, 0xE07D, 0x911C, 0xE07E, 0x911D, 0xE080, 0x911E, 0xDBB4,
+ 0x911F, 0xE081, 0x9120, 0xE082, 0x9121, 0xE083, 0x9122, 0xDBB3,
+ 0x9123, 0xDBB5, 0x9124, 0xE084, 0x9125, 0xE085, 0x9126, 0xE086,
+ 0x9127, 0xE087, 0x9128, 0xE088, 0x9129, 0xE089, 0x912A, 0xE08A,
+ 0x912B, 0xE08B, 0x912C, 0xE08C, 0x912D, 0xE08D, 0x912E, 0xE08E,
+ 0x912F, 0xDBB7, 0x9130, 0xE08F, 0x9131, 0xDBB6, 0x9132, 0xE090,
+ 0x9133, 0xE091, 0x9134, 0xE092, 0x9135, 0xE093, 0x9136, 0xE094,
+ 0x9137, 0xE095, 0x9138, 0xE096, 0x9139, 0xDBB8, 0x913A, 0xE097,
+ 0x913B, 0xE098, 0x913C, 0xE099, 0x913D, 0xE09A, 0x913E, 0xE09B,
+ 0x913F, 0xE09C, 0x9140, 0xE09D, 0x9141, 0xE09E, 0x9142, 0xE09F,
+ 0x9143, 0xDBB9, 0x9144, 0xE0A0, 0x9145, 0xE140, 0x9146, 0xDBBA,
+ 0x9147, 0xE141, 0x9148, 0xE142, 0x9149, 0xD3CF, 0x914A, 0xF4FA,
+ 0x914B, 0xC7F5, 0x914C, 0xD7C3, 0x914D, 0xC5E4, 0x914E, 0xF4FC,
+ 0x914F, 0xF4FD, 0x9150, 0xF4FB, 0x9151, 0xE143, 0x9152, 0xBEC6,
+ 0x9153, 0xE144, 0x9154, 0xE145, 0x9155, 0xE146, 0x9156, 0xE147,
+ 0x9157, 0xD0EF, 0x9158, 0xE148, 0x9159, 0xE149, 0x915A, 0xB7D3,
+ 0x915B, 0xE14A, 0x915C, 0xE14B, 0x915D, 0xD4CD, 0x915E, 0xCCAA,
+ 0x915F, 0xE14C, 0x9160, 0xE14D, 0x9161, 0xF5A2, 0x9162, 0xF5A1,
+ 0x9163, 0xBAA8, 0x9164, 0xF4FE, 0x9165, 0xCBD6, 0x9166, 0xE14E,
+ 0x9167, 0xE14F, 0x9168, 0xE150, 0x9169, 0xF5A4, 0x916A, 0xC0D2,
+ 0x916B, 0xE151, 0x916C, 0xB3EA, 0x916D, 0xE152, 0x916E, 0xCDAA,
+ 0x916F, 0xF5A5, 0x9170, 0xF5A3, 0x9171, 0xBDB4, 0x9172, 0xF5A8,
+ 0x9173, 0xE153, 0x9174, 0xF5A9, 0x9175, 0xBDCD, 0x9176, 0xC3B8,
+ 0x9177, 0xBFE1, 0x9178, 0xCBE1, 0x9179, 0xF5AA, 0x917A, 0xE154,
+ 0x917B, 0xE155, 0x917C, 0xE156, 0x917D, 0xF5A6, 0x917E, 0xF5A7,
+ 0x917F, 0xC4F0, 0x9180, 0xE157, 0x9181, 0xE158, 0x9182, 0xE159,
+ 0x9183, 0xE15A, 0x9184, 0xE15B, 0x9185, 0xF5AC, 0x9186, 0xE15C,
+ 0x9187, 0xB4BC, 0x9188, 0xE15D, 0x9189, 0xD7ED, 0x918A, 0xE15E,
+ 0x918B, 0xB4D7, 0x918C, 0xF5AB, 0x918D, 0xF5AE, 0x918E, 0xE15F,
+ 0x918F, 0xE160, 0x9190, 0xF5AD, 0x9191, 0xF5AF, 0x9192, 0xD0D1,
+ 0x9193, 0xE161, 0x9194, 0xE162, 0x9195, 0xE163, 0x9196, 0xE164,
+ 0x9197, 0xE165, 0x9198, 0xE166, 0x9199, 0xE167, 0x919A, 0xC3D1,
+ 0x919B, 0xC8A9, 0x919C, 0xE168, 0x919D, 0xE169, 0x919E, 0xE16A,
+ 0x919F, 0xE16B, 0x91A0, 0xE16C, 0x91A1, 0xE16D, 0x91A2, 0xF5B0,
+ 0x91A3, 0xF5B1, 0x91A4, 0xE16E, 0x91A5, 0xE16F, 0x91A6, 0xE170,
+ 0x91A7, 0xE171, 0x91A8, 0xE172, 0x91A9, 0xE173, 0x91AA, 0xF5B2,
+ 0x91AB, 0xE174, 0x91AC, 0xE175, 0x91AD, 0xF5B3, 0x91AE, 0xF5B4,
+ 0x91AF, 0xF5B5, 0x91B0, 0xE176, 0x91B1, 0xE177, 0x91B2, 0xE178,
+ 0x91B3, 0xE179, 0x91B4, 0xF5B7, 0x91B5, 0xF5B6, 0x91B6, 0xE17A,
+ 0x91B7, 0xE17B, 0x91B8, 0xE17C, 0x91B9, 0xE17D, 0x91BA, 0xF5B8,
+ 0x91BB, 0xE17E, 0x91BC, 0xE180, 0x91BD, 0xE181, 0x91BE, 0xE182,
+ 0x91BF, 0xE183, 0x91C0, 0xE184, 0x91C1, 0xE185, 0x91C2, 0xE186,
+ 0x91C3, 0xE187, 0x91C4, 0xE188, 0x91C5, 0xE189, 0x91C6, 0xE18A,
+ 0x91C7, 0xB2C9, 0x91C8, 0xE18B, 0x91C9, 0xD3D4, 0x91CA, 0xCACD,
+ 0x91CB, 0xE18C, 0x91CC, 0xC0EF, 0x91CD, 0xD6D8, 0x91CE, 0xD2B0,
+ 0x91CF, 0xC1BF, 0x91D0, 0xE18D, 0x91D1, 0xBDF0, 0x91D2, 0xE18E,
+ 0x91D3, 0xE18F, 0x91D4, 0xE190, 0x91D5, 0xE191, 0x91D6, 0xE192,
+ 0x91D7, 0xE193, 0x91D8, 0xE194, 0x91D9, 0xE195, 0x91DA, 0xE196,
+ 0x91DB, 0xE197, 0x91DC, 0xB8AA, 0x91DD, 0xE198, 0x91DE, 0xE199,
+ 0x91DF, 0xE19A, 0x91E0, 0xE19B, 0x91E1, 0xE19C, 0x91E2, 0xE19D,
+ 0x91E3, 0xE19E, 0x91E4, 0xE19F, 0x91E5, 0xE1A0, 0x91E6, 0xE240,
+ 0x91E7, 0xE241, 0x91E8, 0xE242, 0x91E9, 0xE243, 0x91EA, 0xE244,
+ 0x91EB, 0xE245, 0x91EC, 0xE246, 0x91ED, 0xE247, 0x91EE, 0xE248,
+ 0x91EF, 0xE249, 0x91F0, 0xE24A, 0x91F1, 0xE24B, 0x91F2, 0xE24C,
+ 0x91F3, 0xE24D, 0x91F4, 0xE24E, 0x91F5, 0xE24F, 0x91F6, 0xE250,
+ 0x91F7, 0xE251, 0x91F8, 0xE252, 0x91F9, 0xE253, 0x91FA, 0xE254,
+ 0x91FB, 0xE255, 0x91FC, 0xE256, 0x91FD, 0xE257, 0x91FE, 0xE258,
+ 0x91FF, 0xE259, 0x9200, 0xE25A, 0x9201, 0xE25B, 0x9202, 0xE25C,
+ 0x9203, 0xE25D, 0x9204, 0xE25E, 0x9205, 0xE25F, 0x9206, 0xE260,
+ 0x9207, 0xE261, 0x9208, 0xE262, 0x9209, 0xE263, 0x920A, 0xE264,
+ 0x920B, 0xE265, 0x920C, 0xE266, 0x920D, 0xE267, 0x920E, 0xE268,
+ 0x920F, 0xE269, 0x9210, 0xE26A, 0x9211, 0xE26B, 0x9212, 0xE26C,
+ 0x9213, 0xE26D, 0x9214, 0xE26E, 0x9215, 0xE26F, 0x9216, 0xE270,
+ 0x9217, 0xE271, 0x9218, 0xE272, 0x9219, 0xE273, 0x921A, 0xE274,
+ 0x921B, 0xE275, 0x921C, 0xE276, 0x921D, 0xE277, 0x921E, 0xE278,
+ 0x921F, 0xE279, 0x9220, 0xE27A, 0x9221, 0xE27B, 0x9222, 0xE27C,
+ 0x9223, 0xE27D, 0x9224, 0xE27E, 0x9225, 0xE280, 0x9226, 0xE281,
+ 0x9227, 0xE282, 0x9228, 0xE283, 0x9229, 0xE284, 0x922A, 0xE285,
+ 0x922B, 0xE286, 0x922C, 0xE287, 0x922D, 0xE288, 0x922E, 0xE289,
+ 0x922F, 0xE28A, 0x9230, 0xE28B, 0x9231, 0xE28C, 0x9232, 0xE28D,
+ 0x9233, 0xE28E, 0x9234, 0xE28F, 0x9235, 0xE290, 0x9236, 0xE291,
+ 0x9237, 0xE292, 0x9238, 0xE293, 0x9239, 0xE294, 0x923A, 0xE295,
+ 0x923B, 0xE296, 0x923C, 0xE297, 0x923D, 0xE298, 0x923E, 0xE299,
+ 0x923F, 0xE29A, 0x9240, 0xE29B, 0x9241, 0xE29C, 0x9242, 0xE29D,
+ 0x9243, 0xE29E, 0x9244, 0xE29F, 0x9245, 0xE2A0, 0x9246, 0xE340,
+ 0x9247, 0xE341, 0x9248, 0xE342, 0x9249, 0xE343, 0x924A, 0xE344,
+ 0x924B, 0xE345, 0x924C, 0xE346, 0x924D, 0xE347, 0x924E, 0xE348,
+ 0x924F, 0xE349, 0x9250, 0xE34A, 0x9251, 0xE34B, 0x9252, 0xE34C,
+ 0x9253, 0xE34D, 0x9254, 0xE34E, 0x9255, 0xE34F, 0x9256, 0xE350,
+ 0x9257, 0xE351, 0x9258, 0xE352, 0x9259, 0xE353, 0x925A, 0xE354,
+ 0x925B, 0xE355, 0x925C, 0xE356, 0x925D, 0xE357, 0x925E, 0xE358,
+ 0x925F, 0xE359, 0x9260, 0xE35A, 0x9261, 0xE35B, 0x9262, 0xE35C,
+ 0x9263, 0xE35D, 0x9264, 0xE35E, 0x9265, 0xE35F, 0x9266, 0xE360,
+ 0x9267, 0xE361, 0x9268, 0xE362, 0x9269, 0xE363, 0x926A, 0xE364,
+ 0x926B, 0xE365, 0x926C, 0xE366, 0x926D, 0xE367, 0x926E, 0xE368,
+ 0x926F, 0xE369, 0x9270, 0xE36A, 0x9271, 0xE36B, 0x9272, 0xE36C,
+ 0x9273, 0xE36D, 0x9274, 0xBCF8, 0x9275, 0xE36E, 0x9276, 0xE36F,
+ 0x9277, 0xE370, 0x9278, 0xE371, 0x9279, 0xE372, 0x927A, 0xE373,
+ 0x927B, 0xE374, 0x927C, 0xE375, 0x927D, 0xE376, 0x927E, 0xE377,
+ 0x927F, 0xE378, 0x9280, 0xE379, 0x9281, 0xE37A, 0x9282, 0xE37B,
+ 0x9283, 0xE37C, 0x9284, 0xE37D, 0x9285, 0xE37E, 0x9286, 0xE380,
+ 0x9287, 0xE381, 0x9288, 0xE382, 0x9289, 0xE383, 0x928A, 0xE384,
+ 0x928B, 0xE385, 0x928C, 0xE386, 0x928D, 0xE387, 0x928E, 0xF6C6,
+ 0x928F, 0xE388, 0x9290, 0xE389, 0x9291, 0xE38A, 0x9292, 0xE38B,
+ 0x9293, 0xE38C, 0x9294, 0xE38D, 0x9295, 0xE38E, 0x9296, 0xE38F,
+ 0x9297, 0xE390, 0x9298, 0xE391, 0x9299, 0xE392, 0x929A, 0xE393,
+ 0x929B, 0xE394, 0x929C, 0xE395, 0x929D, 0xE396, 0x929E, 0xE397,
+ 0x929F, 0xE398, 0x92A0, 0xE399, 0x92A1, 0xE39A, 0x92A2, 0xE39B,
+ 0x92A3, 0xE39C, 0x92A4, 0xE39D, 0x92A5, 0xE39E, 0x92A6, 0xE39F,
+ 0x92A7, 0xE3A0, 0x92A8, 0xE440, 0x92A9, 0xE441, 0x92AA, 0xE442,
+ 0x92AB, 0xE443, 0x92AC, 0xE444, 0x92AD, 0xE445, 0x92AE, 0xF6C7,
+ 0x92AF, 0xE446, 0x92B0, 0xE447, 0x92B1, 0xE448, 0x92B2, 0xE449,
+ 0x92B3, 0xE44A, 0x92B4, 0xE44B, 0x92B5, 0xE44C, 0x92B6, 0xE44D,
+ 0x92B7, 0xE44E, 0x92B8, 0xE44F, 0x92B9, 0xE450, 0x92BA, 0xE451,
+ 0x92BB, 0xE452, 0x92BC, 0xE453, 0x92BD, 0xE454, 0x92BE, 0xE455,
+ 0x92BF, 0xE456, 0x92C0, 0xE457, 0x92C1, 0xE458, 0x92C2, 0xE459,
+ 0x92C3, 0xE45A, 0x92C4, 0xE45B, 0x92C5, 0xE45C, 0x92C6, 0xE45D,
+ 0x92C7, 0xE45E, 0x92C8, 0xF6C8, 0x92C9, 0xE45F, 0x92CA, 0xE460,
+ 0x92CB, 0xE461, 0x92CC, 0xE462, 0x92CD, 0xE463, 0x92CE, 0xE464,
+ 0x92CF, 0xE465, 0x92D0, 0xE466, 0x92D1, 0xE467, 0x92D2, 0xE468,
+ 0x92D3, 0xE469, 0x92D4, 0xE46A, 0x92D5, 0xE46B, 0x92D6, 0xE46C,
+ 0x92D7, 0xE46D, 0x92D8, 0xE46E, 0x92D9, 0xE46F, 0x92DA, 0xE470,
+ 0x92DB, 0xE471, 0x92DC, 0xE472, 0x92DD, 0xE473, 0x92DE, 0xE474,
+ 0x92DF, 0xE475, 0x92E0, 0xE476, 0x92E1, 0xE477, 0x92E2, 0xE478,
+ 0x92E3, 0xE479, 0x92E4, 0xE47A, 0x92E5, 0xE47B, 0x92E6, 0xE47C,
+ 0x92E7, 0xE47D, 0x92E8, 0xE47E, 0x92E9, 0xE480, 0x92EA, 0xE481,
+ 0x92EB, 0xE482, 0x92EC, 0xE483, 0x92ED, 0xE484, 0x92EE, 0xE485,
+ 0x92EF, 0xE486, 0x92F0, 0xE487, 0x92F1, 0xE488, 0x92F2, 0xE489,
+ 0x92F3, 0xE48A, 0x92F4, 0xE48B, 0x92F5, 0xE48C, 0x92F6, 0xE48D,
+ 0x92F7, 0xE48E, 0x92F8, 0xE48F, 0x92F9, 0xE490, 0x92FA, 0xE491,
+ 0x92FB, 0xE492, 0x92FC, 0xE493, 0x92FD, 0xE494, 0x92FE, 0xE495,
+ 0x92FF, 0xE496, 0x9300, 0xE497, 0x9301, 0xE498, 0x9302, 0xE499,
+ 0x9303, 0xE49A, 0x9304, 0xE49B, 0x9305, 0xE49C, 0x9306, 0xE49D,
+ 0x9307, 0xE49E, 0x9308, 0xE49F, 0x9309, 0xE4A0, 0x930A, 0xE540,
+ 0x930B, 0xE541, 0x930C, 0xE542, 0x930D, 0xE543, 0x930E, 0xE544,
+ 0x930F, 0xE545, 0x9310, 0xE546, 0x9311, 0xE547, 0x9312, 0xE548,
+ 0x9313, 0xE549, 0x9314, 0xE54A, 0x9315, 0xE54B, 0x9316, 0xE54C,
+ 0x9317, 0xE54D, 0x9318, 0xE54E, 0x9319, 0xE54F, 0x931A, 0xE550,
+ 0x931B, 0xE551, 0x931C, 0xE552, 0x931D, 0xE553, 0x931E, 0xE554,
+ 0x931F, 0xE555, 0x9320, 0xE556, 0x9321, 0xE557, 0x9322, 0xE558,
+ 0x9323, 0xE559, 0x9324, 0xE55A, 0x9325, 0xE55B, 0x9326, 0xE55C,
+ 0x9327, 0xE55D, 0x9328, 0xE55E, 0x9329, 0xE55F, 0x932A, 0xE560,
+ 0x932B, 0xE561, 0x932C, 0xE562, 0x932D, 0xE563, 0x932E, 0xE564,
+ 0x932F, 0xE565, 0x9330, 0xE566, 0x9331, 0xE567, 0x9332, 0xE568,
+ 0x9333, 0xE569, 0x9334, 0xE56A, 0x9335, 0xE56B, 0x9336, 0xE56C,
+ 0x9337, 0xE56D, 0x9338, 0xE56E, 0x9339, 0xE56F, 0x933A, 0xE570,
+ 0x933B, 0xE571, 0x933C, 0xE572, 0x933D, 0xE573, 0x933E, 0xF6C9,
+ 0x933F, 0xE574, 0x9340, 0xE575, 0x9341, 0xE576, 0x9342, 0xE577,
+ 0x9343, 0xE578, 0x9344, 0xE579, 0x9345, 0xE57A, 0x9346, 0xE57B,
+ 0x9347, 0xE57C, 0x9348, 0xE57D, 0x9349, 0xE57E, 0x934A, 0xE580,
+ 0x934B, 0xE581, 0x934C, 0xE582, 0x934D, 0xE583, 0x934E, 0xE584,
+ 0x934F, 0xE585, 0x9350, 0xE586, 0x9351, 0xE587, 0x9352, 0xE588,
+ 0x9353, 0xE589, 0x9354, 0xE58A, 0x9355, 0xE58B, 0x9356, 0xE58C,
+ 0x9357, 0xE58D, 0x9358, 0xE58E, 0x9359, 0xE58F, 0x935A, 0xE590,
+ 0x935B, 0xE591, 0x935C, 0xE592, 0x935D, 0xE593, 0x935E, 0xE594,
+ 0x935F, 0xE595, 0x9360, 0xE596, 0x9361, 0xE597, 0x9362, 0xE598,
+ 0x9363, 0xE599, 0x9364, 0xE59A, 0x9365, 0xE59B, 0x9366, 0xE59C,
+ 0x9367, 0xE59D, 0x9368, 0xE59E, 0x9369, 0xE59F, 0x936A, 0xF6CA,
+ 0x936B, 0xE5A0, 0x936C, 0xE640, 0x936D, 0xE641, 0x936E, 0xE642,
+ 0x936F, 0xE643, 0x9370, 0xE644, 0x9371, 0xE645, 0x9372, 0xE646,
+ 0x9373, 0xE647, 0x9374, 0xE648, 0x9375, 0xE649, 0x9376, 0xE64A,
+ 0x9377, 0xE64B, 0x9378, 0xE64C, 0x9379, 0xE64D, 0x937A, 0xE64E,
+ 0x937B, 0xE64F, 0x937C, 0xE650, 0x937D, 0xE651, 0x937E, 0xE652,
+ 0x937F, 0xE653, 0x9380, 0xE654, 0x9381, 0xE655, 0x9382, 0xE656,
+ 0x9383, 0xE657, 0x9384, 0xE658, 0x9385, 0xE659, 0x9386, 0xE65A,
+ 0x9387, 0xE65B, 0x9388, 0xE65C, 0x9389, 0xE65D, 0x938A, 0xE65E,
+ 0x938B, 0xE65F, 0x938C, 0xE660, 0x938D, 0xE661, 0x938E, 0xE662,
+ 0x938F, 0xF6CC, 0x9390, 0xE663, 0x9391, 0xE664, 0x9392, 0xE665,
+ 0x9393, 0xE666, 0x9394, 0xE667, 0x9395, 0xE668, 0x9396, 0xE669,
+ 0x9397, 0xE66A, 0x9398, 0xE66B, 0x9399, 0xE66C, 0x939A, 0xE66D,
+ 0x939B, 0xE66E, 0x939C, 0xE66F, 0x939D, 0xE670, 0x939E, 0xE671,
+ 0x939F, 0xE672, 0x93A0, 0xE673, 0x93A1, 0xE674, 0x93A2, 0xE675,
+ 0x93A3, 0xE676, 0x93A4, 0xE677, 0x93A5, 0xE678, 0x93A6, 0xE679,
+ 0x93A7, 0xE67A, 0x93A8, 0xE67B, 0x93A9, 0xE67C, 0x93AA, 0xE67D,
+ 0x93AB, 0xE67E, 0x93AC, 0xE680, 0x93AD, 0xE681, 0x93AE, 0xE682,
+ 0x93AF, 0xE683, 0x93B0, 0xE684, 0x93B1, 0xE685, 0x93B2, 0xE686,
+ 0x93B3, 0xE687, 0x93B4, 0xE688, 0x93B5, 0xE689, 0x93B6, 0xE68A,
+ 0x93B7, 0xE68B, 0x93B8, 0xE68C, 0x93B9, 0xE68D, 0x93BA, 0xE68E,
+ 0x93BB, 0xE68F, 0x93BC, 0xE690, 0x93BD, 0xE691, 0x93BE, 0xE692,
+ 0x93BF, 0xE693, 0x93C0, 0xE694, 0x93C1, 0xE695, 0x93C2, 0xE696,
+ 0x93C3, 0xE697, 0x93C4, 0xE698, 0x93C5, 0xE699, 0x93C6, 0xE69A,
+ 0x93C7, 0xE69B, 0x93C8, 0xE69C, 0x93C9, 0xE69D, 0x93CA, 0xF6CB,
+ 0x93CB, 0xE69E, 0x93CC, 0xE69F, 0x93CD, 0xE6A0, 0x93CE, 0xE740,
+ 0x93CF, 0xE741, 0x93D0, 0xE742, 0x93D1, 0xE743, 0x93D2, 0xE744,
+ 0x93D3, 0xE745, 0x93D4, 0xE746, 0x93D5, 0xE747, 0x93D6, 0xF7E9,
+ 0x93D7, 0xE748, 0x93D8, 0xE749, 0x93D9, 0xE74A, 0x93DA, 0xE74B,
+ 0x93DB, 0xE74C, 0x93DC, 0xE74D, 0x93DD, 0xE74E, 0x93DE, 0xE74F,
+ 0x93DF, 0xE750, 0x93E0, 0xE751, 0x93E1, 0xE752, 0x93E2, 0xE753,
+ 0x93E3, 0xE754, 0x93E4, 0xE755, 0x93E5, 0xE756, 0x93E6, 0xE757,
+ 0x93E7, 0xE758, 0x93E8, 0xE759, 0x93E9, 0xE75A, 0x93EA, 0xE75B,
+ 0x93EB, 0xE75C, 0x93EC, 0xE75D, 0x93ED, 0xE75E, 0x93EE, 0xE75F,
+ 0x93EF, 0xE760, 0x93F0, 0xE761, 0x93F1, 0xE762, 0x93F2, 0xE763,
+ 0x93F3, 0xE764, 0x93F4, 0xE765, 0x93F5, 0xE766, 0x93F6, 0xE767,
+ 0x93F7, 0xE768, 0x93F8, 0xE769, 0x93F9, 0xE76A, 0x93FA, 0xE76B,
+ 0x93FB, 0xE76C, 0x93FC, 0xE76D, 0x93FD, 0xE76E, 0x93FE, 0xE76F,
+ 0x93FF, 0xE770, 0x9400, 0xE771, 0x9401, 0xE772, 0x9402, 0xE773,
+ 0x9403, 0xE774, 0x9404, 0xE775, 0x9405, 0xE776, 0x9406, 0xE777,
+ 0x9407, 0xE778, 0x9408, 0xE779, 0x9409, 0xE77A, 0x940A, 0xE77B,
+ 0x940B, 0xE77C, 0x940C, 0xE77D, 0x940D, 0xE77E, 0x940E, 0xE780,
+ 0x940F, 0xE781, 0x9410, 0xE782, 0x9411, 0xE783, 0x9412, 0xE784,
+ 0x9413, 0xE785, 0x9414, 0xE786, 0x9415, 0xE787, 0x9416, 0xE788,
+ 0x9417, 0xE789, 0x9418, 0xE78A, 0x9419, 0xE78B, 0x941A, 0xE78C,
+ 0x941B, 0xE78D, 0x941C, 0xE78E, 0x941D, 0xE78F, 0x941E, 0xE790,
+ 0x941F, 0xE791, 0x9420, 0xE792, 0x9421, 0xE793, 0x9422, 0xE794,
+ 0x9423, 0xE795, 0x9424, 0xE796, 0x9425, 0xE797, 0x9426, 0xE798,
+ 0x9427, 0xE799, 0x9428, 0xE79A, 0x9429, 0xE79B, 0x942A, 0xE79C,
+ 0x942B, 0xE79D, 0x942C, 0xE79E, 0x942D, 0xE79F, 0x942E, 0xE7A0,
+ 0x942F, 0xE840, 0x9430, 0xE841, 0x9431, 0xE842, 0x9432, 0xE843,
+ 0x9433, 0xE844, 0x9434, 0xE845, 0x9435, 0xE846, 0x9436, 0xE847,
+ 0x9437, 0xE848, 0x9438, 0xE849, 0x9439, 0xE84A, 0x943A, 0xE84B,
+ 0x943B, 0xE84C, 0x943C, 0xE84D, 0x943D, 0xE84E, 0x943E, 0xF6CD,
+ 0x943F, 0xE84F, 0x9440, 0xE850, 0x9441, 0xE851, 0x9442, 0xE852,
+ 0x9443, 0xE853, 0x9444, 0xE854, 0x9445, 0xE855, 0x9446, 0xE856,
+ 0x9447, 0xE857, 0x9448, 0xE858, 0x9449, 0xE859, 0x944A, 0xE85A,
+ 0x944B, 0xE85B, 0x944C, 0xE85C, 0x944D, 0xE85D, 0x944E, 0xE85E,
+ 0x944F, 0xE85F, 0x9450, 0xE860, 0x9451, 0xE861, 0x9452, 0xE862,
+ 0x9453, 0xE863, 0x9454, 0xE864, 0x9455, 0xE865, 0x9456, 0xE866,
+ 0x9457, 0xE867, 0x9458, 0xE868, 0x9459, 0xE869, 0x945A, 0xE86A,
+ 0x945B, 0xE86B, 0x945C, 0xE86C, 0x945D, 0xE86D, 0x945E, 0xE86E,
+ 0x945F, 0xE86F, 0x9460, 0xE870, 0x9461, 0xE871, 0x9462, 0xE872,
+ 0x9463, 0xE873, 0x9464, 0xE874, 0x9465, 0xE875, 0x9466, 0xE876,
+ 0x9467, 0xE877, 0x9468, 0xE878, 0x9469, 0xE879, 0x946A, 0xE87A,
+ 0x946B, 0xF6CE, 0x946C, 0xE87B, 0x946D, 0xE87C, 0x946E, 0xE87D,
+ 0x946F, 0xE87E, 0x9470, 0xE880, 0x9471, 0xE881, 0x9472, 0xE882,
+ 0x9473, 0xE883, 0x9474, 0xE884, 0x9475, 0xE885, 0x9476, 0xE886,
+ 0x9477, 0xE887, 0x9478, 0xE888, 0x9479, 0xE889, 0x947A, 0xE88A,
+ 0x947B, 0xE88B, 0x947C, 0xE88C, 0x947D, 0xE88D, 0x947E, 0xE88E,
+ 0x947F, 0xE88F, 0x9480, 0xE890, 0x9481, 0xE891, 0x9482, 0xE892,
+ 0x9483, 0xE893, 0x9484, 0xE894, 0x9485, 0xEEC4, 0x9486, 0xEEC5,
+ 0x9487, 0xEEC6, 0x9488, 0xD5EB, 0x9489, 0xB6A4, 0x948A, 0xEEC8,
+ 0x948B, 0xEEC7, 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B6,
+ 0x9513, 0xEFB7, 0x9514, 0xEFB8, 0x9515, 0xEFB9, 0x9516, 0xEFBA,
+ 0x9517, 0xD5E0, 0x9518, 0xEFBB, 0x9519, 0xB4ED, 0x951A, 0xC3AA,
+ 0x951B, 0xEFBC, 0x951C, 0xE89F, 0x951D, 0xEFBD, 0x951E, 0xEFBE,
+ 0x951F, 0xEFBF, 0x9520, 0xE8A0, 0x9521, 0xCEFD, 0x9522, 0xEFC0,
+ 0x9523, 0xC2E0, 0x9524, 0xB4B8, 0x9525, 0xD7B6, 0x9526, 0xBDF5,
+ 0x9527, 0xE940, 0x9528, 0xCFC7, 0x9529, 0xEFC3, 0x952A, 0xEFC1,
+ 0x952B, 0xEFC2, 0x952C, 0xEFC4, 0x952D, 0xB6A7, 0x952E, 0xBCFC,
+ 0x952F, 0xBEE2, 0x9530, 0xC3CC, 0x9531, 0xEFC5, 0x9532, 0xEFC6,
+ 0x9533, 0xE941, 0x9534, 0xEFC7, 0x9535, 0xEFCF, 0x9536, 0xEFC8,
+ 0x9537, 0xEFC9, 0x9538, 0xEFCA, 0x9539, 0xC7C2, 0x953A, 0xEFF1,
+ 0x953B, 0xB6CD, 0x953C, 0xEFCB, 0x953D, 0xE942, 0x953E, 0xEFCC,
+ 0x953F, 0xEFCD, 0x9540, 0xB6C6, 0x9541, 0xC3BE, 0x9542, 0xEFCE,
+ 0x9543, 0xE943, 0x9544, 0xEFD0, 0x9545, 0xEFD1, 0x9546, 0xEFD2,
+ 0x9547, 0xD5F2, 0x9548, 0xE944, 0x9549, 0xEFD3, 0x954A, 0xC4F7,
+ 0x954B, 0xE945, 0x954C, 0xEFD4, 0x954D, 0xC4F8, 0x954E, 0xEFD5,
+ 0x954F, 0xEFD6, 0x9550, 0xB8E4, 0x9551, 0xB0F7, 0x9552, 0xEFD7,
+ 0x9553, 0xEFD8, 0x9554, 0xEFD9, 0x9555, 0xE946, 0x9556, 0xEFDA,
+ 0x9557, 0xEFDB, 0x9558, 0xEFDC, 0x9559, 0xEFDD, 0x955A, 0xE947,
+ 0x955B, 0xEFDE, 0x955C, 0xBEB5, 0x955D, 0xEFE1, 0x955E, 0xEFDF,
+ 0x955F, 0xEFE0, 0x9560, 0xE948, 0x9561, 0xEFE2, 0x9562, 0xEFE3,
+ 0x9563, 0xC1CD, 0x9564, 0xEFE4, 0x9565, 0xEFE5, 0x9566, 0xEFE6,
+ 0x9567, 0xEFE7, 0x9568, 0xEFE8, 0x9569, 0xEFE9, 0x956A, 0xEFEA,
+ 0x956B, 0xEFEB, 0x956C, 0xEFEC, 0x956D, 0xC0D8, 0x956E, 0xE949,
+ 0x956F, 0xEFED, 0x9570, 0xC1AD, 0x9571, 0xEFEE, 0x9572, 0xEFEF,
+ 0x9573, 0xEFF0, 0x9574, 0xE94A, 0x9575, 0xE94B, 0x9576, 0xCFE2,
+ 0x9577, 0xE94C, 0x9578, 0xE94D, 0x9579, 0xE94E, 0x957A, 0xE94F,
+ 0x957B, 0xE950, 0x957C, 0xE951, 0x957D, 0xE952, 0x957E, 0xE953,
+ 0x957F, 0xB3A4, 0x9580, 0xE954, 0x9581, 0xE955, 0x9582, 0xE956,
+ 0x9583, 0xE957, 0x9584, 0xE958, 0x9585, 0xE959, 0x9586, 0xE95A,
+ 0x9587, 0xE95B, 0x9588, 0xE95C, 0x9589, 0xE95D, 0x958A, 0xE95E,
+ 0x958B, 0xE95F, 0x958C, 0xE960, 0x958D, 0xE961, 0x958E, 0xE962,
+ 0x958F, 0xE963, 0x9590, 0xE964, 0x9591, 0xE965, 0x9592, 0xE966,
+ 0x9593, 0xE967, 0x9594, 0xE968, 0x9595, 0xE969, 0x9596, 0xE96A,
+ 0x9597, 0xE96B, 0x9598, 0xE96C, 0x9599, 0xE96D, 0x959A, 0xE96E,
+ 0x959B, 0xE96F, 0x959C, 0xE970, 0x959D, 0xE971, 0x959E, 0xE972,
+ 0x959F, 0xE973, 0x95A0, 0xE974, 0x95A1, 0xE975, 0x95A2, 0xE976,
+ 0x95A3, 0xE977, 0x95A4, 0xE978, 0x95A5, 0xE979, 0x95A6, 0xE97A,
+ 0x95A7, 0xE97B, 0x95A8, 0xE97C, 0x95A9, 0xE97D, 0x95AA, 0xE97E,
+ 0x95AB, 0xE980, 0x95AC, 0xE981, 0x95AD, 0xE982, 0x95AE, 0xE983,
+ 0x95AF, 0xE984, 0x95B0, 0xE985, 0x95B1, 0xE986, 0x95B2, 0xE987,
+ 0x95B3, 0xE988, 0x95B4, 0xE989, 0x95B5, 0xE98A, 0x95B6, 0xE98B,
+ 0x95B7, 0xE98C, 0x95B8, 0xE98D, 0x95B9, 0xE98E, 0x95BA, 0xE98F,
+ 0x95BB, 0xE990, 0x95BC, 0xE991, 0x95BD, 0xE992, 0x95BE, 0xE993,
+ 0x95BF, 0xE994, 0x95C0, 0xE995, 0x95C1, 0xE996, 0x95C2, 0xE997,
+ 0x95C3, 0xE998, 0x95C4, 0xE999, 0x95C5, 0xE99A, 0x95C6, 0xE99B,
+ 0x95C7, 0xE99C, 0x95C8, 0xE99D, 0x95C9, 0xE99E, 0x95CA, 0xE99F,
+ 0x95CB, 0xE9A0, 0x95CC, 0xEA40, 0x95CD, 0xEA41, 0x95CE, 0xEA42,
+ 0x95CF, 0xEA43, 0x95D0, 0xEA44, 0x95D1, 0xEA45, 0x95D2, 0xEA46,
+ 0x95D3, 0xEA47, 0x95D4, 0xEA48, 0x95D5, 0xEA49, 0x95D6, 0xEA4A,
+ 0x95D7, 0xEA4B, 0x95D8, 0xEA4C, 0x95D9, 0xEA4D, 0x95DA, 0xEA4E,
+ 0x95DB, 0xEA4F, 0x95DC, 0xEA50, 0x95DD, 0xEA51, 0x95DE, 0xEA52,
+ 0x95DF, 0xEA53, 0x95E0, 0xEA54, 0x95E1, 0xEA55, 0x95E2, 0xEA56,
+ 0x95E3, 0xEA57, 0x95E4, 0xEA58, 0x95E5, 0xEA59, 0x95E6, 0xEA5A,
+ 0x95E7, 0xEA5B, 0x95E8, 0xC3C5, 0x95E9, 0xE3C5, 0x95EA, 0xC9C1,
+ 0x95EB, 0xE3C6, 0x95EC, 0xEA5C, 0x95ED, 0xB1D5, 0x95EE, 0xCECA,
+ 0x95EF, 0xB4B3, 0x95F0, 0xC8F2, 0x95F1, 0xE3C7, 0x95F2, 0xCFD0,
+ 0x95F3, 0xE3C8, 0x95F4, 0xBCE4, 0x95F5, 0xE3C9, 0x95F6, 0xE3CA,
+ 0x95F7, 0xC3C6, 0x95F8, 0xD5A2, 0x95F9, 0xC4D6, 0x95FA, 0xB9EB,
+ 0x95FB, 0xCEC5, 0x95FC, 0xE3CB, 0x95FD, 0xC3F6, 0x95FE, 0xE3CC,
+ 0x95FF, 0xEA5D, 0x9600, 0xB7A7, 0x9601, 0xB8F3, 0x9602, 0xBAD2,
+ 0x9603, 0xE3CD, 0x9604, 0xE3CE, 0x9605, 0xD4C4, 0x9606, 0xE3CF,
+ 0x9607, 0xEA5E, 0x9608, 0xE3D0, 0x9609, 0xD1CB, 0x960A, 0xE3D1,
+ 0x960B, 0xE3D2, 0x960C, 0xE3D3, 0x960D, 0xE3D4, 0x960E, 0xD1D6,
+ 0x960F, 0xE3D5, 0x9610, 0xB2FB, 0x9611, 0xC0BB, 0x9612, 0xE3D6,
+ 0x9613, 0xEA5F, 0x9614, 0xC0AB, 0x9615, 0xE3D7, 0x9616, 0xE3D8,
+ 0x9617, 0xE3D9, 0x9618, 0xEA60, 0x9619, 0xE3DA, 0x961A, 0xE3DB,
+ 0x961B, 0xEA61, 0x961C, 0xB8B7, 0x961D, 0xDAE2, 0x961E, 0xEA62,
+ 0x961F, 0xB6D3, 0x9620, 0xEA63, 0x9621, 0xDAE4, 0x9622, 0xDAE3,
+ 0x9623, 0xEA64, 0x9624, 0xEA65, 0x9625, 0xEA66, 0x9626, 0xEA67,
+ 0x9627, 0xEA68, 0x9628, 0xEA69, 0x9629, 0xEA6A, 0x962A, 0xDAE6,
+ 0x962B, 0xEA6B, 0x962C, 0xEA6C, 0x962D, 0xEA6D, 0x962E, 0xC8EE,
+ 0x962F, 0xEA6E, 0x9630, 0xEA6F, 0x9631, 0xDAE5, 0x9632, 0xB7C0,
+ 0x9633, 0xD1F4, 0x9634, 0xD2F5, 0x9635, 0xD5F3, 0x9636, 0xBDD7,
+ 0x9637, 0xEA70, 0x9638, 0xEA71, 0x9639, 0xEA72, 0x963A, 0xEA73,
+ 0x963B, 0xD7E8, 0x963C, 0xDAE8, 0x963D, 0xDAE7, 0x963E, 0xEA74,
+ 0x963F, 0xB0A2, 0x9640, 0xCDD3, 0x9641, 0xEA75, 0x9642, 0xDAE9,
+ 0x9643, 0xEA76, 0x9644, 0xB8BD, 0x9645, 0xBCCA, 0x9646, 0xC2BD,
+ 0x9647, 0xC2A4, 0x9648, 0xB3C2, 0x9649, 0xDAEA, 0x964A, 0xEA77,
+ 0x964B, 0xC2AA, 0x964C, 0xC4B0, 0x964D, 0xBDB5, 0x964E, 0xEA78,
+ 0x964F, 0xEA79, 0x9650, 0xCFDE, 0x9651, 0xEA7A, 0x9652, 0xEA7B,
+ 0x9653, 0xEA7C, 0x9654, 0xDAEB, 0x9655, 0xC9C2, 0x9656, 0xEA7D,
+ 0x9657, 0xEA7E, 0x9658, 0xEA80, 0x9659, 0xEA81, 0x965A, 0xEA82,
+ 0x965B, 0xB1DD, 0x965C, 0xEA83, 0x965D, 0xEA84, 0x965E, 0xEA85,
+ 0x965F, 0xDAEC, 0x9660, 0xEA86, 0x9661, 0xB6B8, 0x9662, 0xD4BA,
+ 0x9663, 0xEA87, 0x9664, 0xB3FD, 0x9665, 0xEA88, 0x9666, 0xEA89,
+ 0x9667, 0xDAED, 0x9668, 0xD4C9, 0x9669, 0xCFD5, 0x966A, 0xC5E3,
+ 0x966B, 0xEA8A, 0x966C, 0xDAEE, 0x966D, 0xEA8B, 0x966E, 0xEA8C,
+ 0x966F, 0xEA8D, 0x9670, 0xEA8E, 0x9671, 0xEA8F, 0x9672, 0xDAEF,
+ 0x9673, 0xEA90, 0x9674, 0xDAF0, 0x9675, 0xC1EA, 0x9676, 0xCCD5,
+ 0x9677, 0xCFDD, 0x9678, 0xEA91, 0x9679, 0xEA92, 0x967A, 0xEA93,
+ 0x967B, 0xEA94, 0x967C, 0xEA95, 0x967D, 0xEA96, 0x967E, 0xEA97,
+ 0x967F, 0xEA98, 0x9680, 0xEA99, 0x9681, 0xEA9A, 0x9682, 0xEA9B,
+ 0x9683, 0xEA9C, 0x9684, 0xEA9D, 0x9685, 0xD3E7, 0x9686, 0xC2A1,
+ 0x9687, 0xEA9E, 0x9688, 0xDAF1, 0x9689, 0xEA9F, 0x968A, 0xEAA0,
+ 0x968B, 0xCBE5, 0x968C, 0xEB40, 0x968D, 0xDAF2, 0x968E, 0xEB41,
+ 0x968F, 0xCBE6, 0x9690, 0xD2FE, 0x9691, 0xEB42, 0x9692, 0xEB43,
+ 0x9693, 0xEB44, 0x9694, 0xB8F4, 0x9695, 0xEB45, 0x9696, 0xEB46,
+ 0x9697, 0xDAF3, 0x9698, 0xB0AF, 0x9699, 0xCFB6, 0x969A, 0xEB47,
+ 0x969B, 0xEB48, 0x969C, 0xD5CF, 0x969D, 0xEB49, 0x969E, 0xEB4A,
+ 0x969F, 0xEB4B, 0x96A0, 0xEB4C, 0x96A1, 0xEB4D, 0x96A2, 0xEB4E,
+ 0x96A3, 0xEB4F, 0x96A4, 0xEB50, 0x96A5, 0xEB51, 0x96A6, 0xEB52,
+ 0x96A7, 0xCBED, 0x96A8, 0xEB53, 0x96A9, 0xEB54, 0x96AA, 0xEB55,
+ 0x96AB, 0xEB56, 0x96AC, 0xEB57, 0x96AD, 0xEB58, 0x96AE, 0xEB59,
+ 0x96AF, 0xEB5A, 0x96B0, 0xDAF4, 0x96B1, 0xEB5B, 0x96B2, 0xEB5C,
+ 0x96B3, 0xE3C4, 0x96B4, 0xEB5D, 0x96B5, 0xEB5E, 0x96B6, 0xC1A5,
+ 0x96B7, 0xEB5F, 0x96B8, 0xEB60, 0x96B9, 0xF6BF, 0x96BA, 0xEB61,
+ 0x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x96FE, 0xCEED,
+ 0x96FF, 0xEB8D, 0x9700, 0xD0E8, 0x9701, 0xF6AB, 0x9702, 0xEB8E,
+ 0x9703, 0xEB8F, 0x9704, 0xCFF6, 0x9705, 0xEB90, 0x9706, 0xF6AA,
+ 0x9707, 0xD5F0, 0x9708, 0xF6AC, 0x9709, 0xC3B9, 0x970A, 0xEB91,
+ 0x970B, 0xEB92, 0x970C, 0xEB93, 0x970D, 0xBBF4, 0x970E, 0xF6AE,
+ 0x970F, 0xF6AD, 0x9710, 0xEB94, 0x9711, 0xEB95, 0x9712, 0xEB96,
+ 0x9713, 0xC4DE, 0x9714, 0xEB97, 0x9715, 0xEB98, 0x9716, 0xC1D8,
+ 0x9717, 0xEB99, 0x9718, 0xEB9A, 0x9719, 0xEB9B, 0x971A, 0xEB9C,
+ 0x971B, 0xEB9D, 0x971C, 0xCBAA, 0x971D, 0xEB9E, 0x971E, 0xCFBC,
+ 0x971F, 0xEB9F, 0x9720, 0xEBA0, 0x9721, 0xEC40, 0x9722, 0xEC41,
+ 0x9723, 0xEC42, 0x9724, 0xEC43, 0x9725, 0xEC44, 0x9726, 0xEC45,
+ 0x9727, 0xEC46, 0x9728, 0xEC47, 0x9729, 0xEC48, 0x972A, 0xF6AF,
+ 0x972B, 0xEC49, 0x972C, 0xEC4A, 0x972D, 0xF6B0, 0x972E, 0xEC4B,
+ 0x972F, 0xEC4C, 0x9730, 0xF6B1, 0x9731, 0xEC4D, 0x9732, 0xC2B6,
+ 0x9733, 0xEC4E, 0x9734, 0xEC4F, 0x9735, 0xEC50, 0x9736, 0xEC51,
+ 0x9737, 0xEC52, 0x9738, 0xB0D4, 0x9739, 0xC5F9, 0x973A, 0xEC53,
+ 0x973B, 0xEC54, 0x973C, 0xEC55, 0x973D, 0xEC56, 0x973E, 0xF6B2,
+ 0x973F, 0xEC57, 0x9740, 0xEC58, 0x9741, 0xEC59, 0x9742, 0xEC5A,
+ 0x9743, 0xEC5B, 0x9744, 0xEC5C, 0x9745, 0xEC5D, 0x9746, 0xEC5E,
+ 0x9747, 0xEC5F, 0x9748, 0xEC60, 0x9749, 0xEC61, 0x974A, 0xEC62,
+ 0x974B, 0xEC63, 0x974C, 0xEC64, 0x974D, 0xEC65, 0x974E, 0xEC66,
+ 0x974F, 0xEC67, 0x9750, 0xEC68, 0x9751, 0xEC69, 0x9752, 0xC7E0,
+ 0x9753, 0xF6A6, 0x9754, 0xEC6A, 0x9755, 0xEC6B, 0x9756, 0xBEB8,
+ 0x9757, 0xEC6C, 0x9758, 0xEC6D, 0x9759, 0xBEB2, 0x975A, 0xEC6E,
+ 0x975B, 0xB5E5, 0x975C, 0xEC6F, 0x975D, 0xEC70, 0x975E, 0xB7C7,
+ 0x975F, 0xEC71, 0x9760, 0xBFBF, 0x9761, 0xC3D2, 0x9762, 0xC3E6,
+ 0x9763, 0xEC72, 0x9764, 0xEC73, 0x9765, 0xD8CC, 0x9766, 0xEC74,
+ 0x9767, 0xEC75, 0x9768, 0xEC76, 0x9769, 0xB8EF, 0x976A, 0xEC77,
+ 0x976B, 0xEC78, 0x976C, 0xEC79, 0x976D, 0xEC7A, 0x976E, 0xEC7B,
+ 0x976F, 0xEC7C, 0x9770, 0xEC7D, 0x9771, 0xEC7E, 0x9772, 0xEC80,
+ 0x9773, 0xBDF9, 0x9774, 0xD1A5, 0x9775, 0xEC81, 0x9776, 0xB0D0,
+ 0x9777, 0xEC82, 0x9778, 0xEC83, 0x9779, 0xEC84, 0x977A, 0xEC85,
+ 0x977B, 0xEC86, 0x977C, 0xF7B0, 0x977D, 0xEC87, 0x977E, 0xEC88,
+ 0x977F, 0xEC89, 0x9780, 0xEC8A, 0x9781, 0xEC8B, 0x9782, 0xEC8C,
+ 0x9783, 0xEC8D, 0x9784, 0xEC8E, 0x9785, 0xF7B1, 0x9786, 0xEC8F,
+ 0x9787, 0xEC90, 0x9788, 0xEC91, 0x9789, 0xEC92, 0x978A, 0xEC93,
+ 0x978B, 0xD0AC, 0x978C, 0xEC94, 0x978D, 0xB0B0, 0x978E, 0xEC95,
+ 0x978F, 0xEC96, 0x9790, 0xEC97, 0x9791, 0xF7B2, 0x9792, 0xF7B3,
+ 0x9793, 0xEC98, 0x9794, 0xF7B4, 0x9795, 0xEC99, 0x9796, 0xEC9A,
+ 0x9797, 0xEC9B, 0x9798, 0xC7CA, 0x9799, 0xEC9C, 0x979A, 0xEC9D,
+ 0x979B, 0xEC9E, 0x979C, 0xEC9F, 0x979D, 0xECA0, 0x979E, 0xED40,
+ 0x979F, 0xED41, 0x97A0, 0xBECF, 0x97A1, 0xED42, 0x97A2, 0xED43,
+ 0x97A3, 0xF7B7, 0x97A4, 0xED44, 0x97A5, 0xED45, 0x97A6, 0xED46,
+ 0x97A7, 0xED47, 0x97A8, 0xED48, 0x97A9, 0xED49, 0x97AA, 0xED4A,
+ 0x97AB, 0xF7B6, 0x97AC, 0xED4B, 0x97AD, 0xB1DE, 0x97AE, 0xED4C,
+ 0x97AF, 0xF7B5, 0x97B0, 0xED4D, 0x97B1, 0xED4E, 0x97B2, 0xF7B8,
+ 0x97B3, 0xED4F, 0x97B4, 0xF7B9, 0x97B5, 0xED50, 0x97B6, 0xED51,
+ 0x97B7, 0xED52, 0x97B8, 0xED53, 0x97B9, 0xED54, 0x97BA, 0xED55,
+ 0x97BB, 0xED56, 0x97BC, 0xED57, 0x97BD, 0xED58, 0x97BE, 0xED59,
+ 0x97BF, 0xED5A, 0x97C0, 0xED5B, 0x97C1, 0xED5C, 0x97C2, 0xED5D,
+ 0x97C3, 0xED5E, 0x97C4, 0xED5F, 0x97C5, 0xED60, 0x97C6, 0xED61,
+ 0x97C7, 0xED62, 0x97C8, 0xED63, 0x97C9, 0xED64, 0x97CA, 0xED65,
+ 0x97CB, 0xED66, 0x97CC, 0xED67, 0x97CD, 0xED68, 0x97CE, 0xED69,
+ 0x97CF, 0xED6A, 0x97D0, 0xED6B, 0x97D1, 0xED6C, 0x97D2, 0xED6D,
+ 0x97D3, 0xED6E, 0x97D4, 0xED6F, 0x97D5, 0xED70, 0x97D6, 0xED71,
+ 0x97D7, 0xED72, 0x97D8, 0xED73, 0x97D9, 0xED74, 0x97DA, 0xED75,
+ 0x97DB, 0xED76, 0x97DC, 0xED77, 0x97DD, 0xED78, 0x97DE, 0xED79,
+ 0x97DF, 0xED7A, 0x97E0, 0xED7B, 0x97E1, 0xED7C, 0x97E2, 0xED7D,
+ 0x97E3, 0xED7E, 0x97E4, 0xED80, 0x97E5, 0xED81, 0x97E6, 0xCEA4,
+ 0x97E7, 0xC8CD, 0x97E8, 0xED82, 0x97E9, 0xBAAB, 0x97EA, 0xE8B8,
+ 0x97EB, 0xE8B9, 0x97EC, 0xE8BA, 0x97ED, 0xBEC2, 0x97EE, 0xED83,
+ 0x97EF, 0xED84, 0x97F0, 0xED85, 0x97F1, 0xED86, 0x97F2, 0xED87,
+ 0x97F3, 0xD2F4, 0x97F4, 0xED88, 0x97F5, 0xD4CF, 0x97F6, 0xC9D8,
+ 0x97F7, 0xED89, 0x97F8, 0xED8A, 0x97F9, 0xED8B, 0x97FA, 0xED8C,
+ 0x97FB, 0xED8D, 0x97FC, 0xED8E, 0x97FD, 0xED8F, 0x97FE, 0xED90,
+ 0x97FF, 0xED91, 0x9800, 0xED92, 0x9801, 0xED93, 0x9802, 0xED94,
+ 0x9803, 0xED95, 0x9804, 0xED96, 0x9805, 0xED97, 0x9806, 0xED98,
+ 0x9807, 0xED99, 0x9808, 0xED9A, 0x9809, 0xED9B, 0x980A, 0xED9C,
+ 0x980B, 0xED9D, 0x980C, 0xED9E, 0x980D, 0xED9F, 0x980E, 0xEDA0,
+ 0x980F, 0xEE40, 0x9810, 0xEE41, 0x9811, 0xEE42, 0x9812, 0xEE43,
+ 0x9813, 0xEE44, 0x9814, 0xEE45, 0x9815, 0xEE46, 0x9816, 0xEE47,
+ 0x9817, 0xEE48, 0x9818, 0xEE49, 0x9819, 0xEE4A, 0x981A, 0xEE4B,
+ 0x981B, 0xEE4C, 0x981C, 0xEE4D, 0x981D, 0xEE4E, 0x981E, 0xEE4F,
+ 0x981F, 0xEE50, 0x9820, 0xEE51, 0x9821, 0xEE52, 0x9822, 0xEE53,
+ 0x9823, 0xEE54, 0x9824, 0xEE55, 0x9825, 0xEE56, 0x9826, 0xEE57,
+ 0x9827, 0xEE58, 0x9828, 0xEE59, 0x9829, 0xEE5A, 0x982A, 0xEE5B,
+ 0x982B, 0xEE5C, 0x982C, 0xEE5D, 0x982D, 0xEE5E, 0x982E, 0xEE5F,
+ 0x982F, 0xEE60, 0x9830, 0xEE61, 0x9831, 0xEE62, 0x9832, 0xEE63,
+ 0x9833, 0xEE64, 0x9834, 0xEE65, 0x9835, 0xEE66, 0x9836, 0xEE67,
+ 0x9837, 0xEE68, 0x9838, 0xEE69, 0x9839, 0xEE6A, 0x983A, 0xEE6B,
+ 0x983B, 0xEE6C, 0x983C, 0xEE6D, 0x983D, 0xEE6E, 0x983E, 0xEE6F,
+ 0x983F, 0xEE70, 0x9840, 0xEE71, 0x9841, 0xEE72, 0x9842, 0xEE73,
+ 0x9843, 0xEE74, 0x9844, 0xEE75, 0x9845, 0xEE76, 0x9846, 0xEE77,
+ 0x9847, 0xEE78, 0x9848, 0xEE79, 0x9849, 0xEE7A, 0x984A, 0xEE7B,
+ 0x984B, 0xEE7C, 0x984C, 0xEE7D, 0x984D, 0xEE7E, 0x984E, 0xEE80,
+ 0x984F, 0xEE81, 0x9850, 0xEE82, 0x9851, 0xEE83, 0x9852, 0xEE84,
+ 0x9853, 0xEE85, 0x9854, 0xEE86, 0x9855, 0xEE87, 0x9856, 0xEE88,
+ 0x9857, 0xEE89, 0x9858, 0xEE8A, 0x9859, 0xEE8B, 0x985A, 0xEE8C,
+ 0x985B, 0xEE8D, 0x985C, 0xEE8E, 0x985D, 0xEE8F, 0x985E, 0xEE90,
+ 0x985F, 0xEE91, 0x9860, 0xEE92, 0x9861, 0xEE93, 0x9862, 0xEE94,
+ 0x9863, 0xEE95, 0x9864, 0xEE96, 0x9865, 0xEE97, 0x9866, 0xEE98,
+ 0x9867, 0xEE99, 0x9868, 0xEE9A, 0x9869, 0xEE9B, 0x986A, 0xEE9C,
+ 0x986B, 0xEE9D, 0x986C, 0xEE9E, 0x986D, 0xEE9F, 0x986E, 0xEEA0,
+ 0x986F, 0xEF40, 0x9870, 0xEF41, 0x9871, 0xEF42, 0x9872, 0xEF43,
+ 0x9873, 0xEF44, 0x9874, 0xEF45, 0x9875, 0xD2B3, 0x9876, 0xB6A5,
+ 0x9877, 0xC7EA, 0x9878, 0xF1FC, 0x9879, 0xCFEE, 0x987A, 0xCBB3,
+ 0x987B, 0xD0EB, 0x987C, 0xE7EF, 0x987D, 0xCDE7, 0x987E, 0xB9CB,
+ 0x987F, 0xB6D9, 0x9880, 0xF1FD, 0x9881, 0xB0E4, 0x9882, 0xCBCC,
+ 0x9883, 0xF1FE, 0x9884, 0xD4A4, 0x9885, 0xC2AD, 0x9886, 0xC1EC,
+ 0x9887, 0xC6C4, 0x9888, 0xBEB1, 0x9889, 0xF2A1, 0x988A, 0xBCD5,
+ 0x988B, 0xEF46, 0x988C, 0xF2A2, 0x988D, 0xF2A3, 0x988E, 0xEF47,
+ 0x988F, 0xF2A4, 0x9890, 0xD2C3, 0x9891, 0xC6B5, 0x9892, 0xEF48,
+ 0x9893, 0xCDC7, 0x9894, 0xF2A5, 0x9895, 0xEF49, 0x9896, 0xD3B1,
+ 0x9897, 0xBFC5, 0x9898, 0xCCE2, 0x9899, 0xEF4A, 0x989A, 0xF2A6,
+ 0x989B, 0xF2A7, 0x989C, 0xD1D5, 0x989D, 0xB6EE, 0x989E, 0xF2A8,
+ 0x989F, 0xF2A9, 0x98A0, 0xB5DF, 0x98A1, 0xF2AA, 0x98A2, 0xF2AB,
+ 0x98A3, 0xEF4B, 0x98A4, 0xB2FC, 0x98A5, 0xF2AC, 0x98A6, 0xF2AD,
+ 0x98A7, 0xC8A7, 0x98A8, 0xEF4C, 0x98A9, 0xEF4D, 0x98AA, 0xEF4E,
+ 0x98A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x98EF, 0xEF88, 0x98F0, 0xEF89, 0x98F1, 0xEF8A, 0x98F2, 0xEF8B,
+ 0x98F3, 0xEF8C, 0x98F4, 0xEF8D, 0x98F5, 0xEF8E, 0x98F6, 0xEF8F,
+ 0x98F7, 0xEF90, 0x98F8, 0xEF91, 0x98F9, 0xEF92, 0x98FA, 0xEF93,
+ 0x98FB, 0xEF94, 0x98FC, 0xEF95, 0x98FD, 0xEF96, 0x98FE, 0xEF97,
+ 0x98FF, 0xEF98, 0x9900, 0xEF99, 0x9901, 0xEF9A, 0x9902, 0xEF9B,
+ 0x9903, 0xEF9C, 0x9904, 0xEF9D, 0x9905, 0xEF9E, 0x9906, 0xEF9F,
+ 0x9907, 0xEFA0, 0x9908, 0xF040, 0x9909, 0xF041, 0x990A, 0xF042,
+ 0x990B, 0xF043, 0x990C, 0xF044, 0x990D, 0xF7D0, 0x990E, 0xF045,
+ 0x990F, 0xF046, 0x9910, 0xB2CD, 0x9911, 0xF047, 0x9912, 0xF048,
+ 0x9913, 0xF049, 0x9914, 0xF04A, 0x9915, 0xF04B, 0x9916, 0xF04C,
+ 0x9917, 0xF04D, 0x9918, 0xF04E, 0x9919, 0xF04F, 0x991A, 0xF050,
+ 0x991B, 0xF051, 0x991C, 0xF052, 0x991D, 0xF053, 0x991E, 0xF054,
+ 0x991F, 0xF055, 0x9920, 0xF056, 0x9921, 0xF057, 0x9922, 0xF058,
+ 0x9923, 0xF059, 0x9924, 0xF05A, 0x9925, 0xF05B, 0x9926, 0xF05C,
+ 0x9927, 0xF05D, 0x9928, 0xF05E, 0x9929, 0xF05F, 0x992A, 0xF060,
+ 0x992B, 0xF061, 0x992C, 0xF062, 0x992D, 0xF063, 0x992E, 0xF7D1,
+ 0x992F, 0xF064, 0x9930, 0xF065, 0x9931, 0xF066, 0x9932, 0xF067,
+ 0x9933, 0xF068, 0x9934, 0xF069, 0x9935, 0xF06A, 0x9936, 0xF06B,
+ 0x9937, 0xF06C, 0x9938, 0xF06D, 0x9939, 0xF06E, 0x993A, 0xF06F,
+ 0x993B, 0xF070, 0x993C, 0xF071, 0x993D, 0xF072, 0x993E, 0xF073,
+ 0x993F, 0xF074, 0x9940, 0xF075, 0x9941, 0xF076, 0x9942, 0xF077,
+ 0x9943, 0xF078, 0x9944, 0xF079, 0x9945, 0xF07A, 0x9946, 0xF07B,
+ 0x9947, 0xF07C, 0x9948, 0xF07D, 0x9949, 0xF07E, 0x994A, 0xF080,
+ 0x994B, 0xF081, 0x994C, 0xF082, 0x994D, 0xF083, 0x994E, 0xF084,
+ 0x994F, 0xF085, 0x9950, 0xF086, 0x9951, 0xF087, 0x9952, 0xF088,
+ 0x9953, 0xF089, 0x9954, 0xF7D3, 0x9955, 0xF7D2, 0x9956, 0xF08A,
+ 0x9957, 0xF08B, 0x9958, 0xF08C, 0x9959, 0xF08D, 0x995A, 0xF08E,
+ 0x995B, 0xF08F, 0x995C, 0xF090, 0x995D, 0xF091, 0x995E, 0xF092,
+ 0x995F, 0xF093, 0x9960, 0xF094, 0x9961, 0xF095, 0x9962, 0xF096,
+ 0x9963, 0xE2BB, 0x9964, 0xF097, 0x9965, 0xBCA2, 0x9966, 0xF098,
+ 0x9967, 0xE2BC, 0x9968, 0xE2BD, 0x9969, 0xE2BE, 0x996A, 0xE2BF,
+ 0x996B, 0xE2C0, 0x996C, 0xE2C1, 0x996D, 0xB7B9, 0x996E, 0xD2FB,
+ 0x996F, 0xBDA4, 0x9970, 0xCACE, 0x9971, 0xB1A5, 0x9972, 0xCBC7,
+ 0x9973, 0xF099, 0x9974, 0xE2C2, 0x9975, 0xB6FC, 0x9976, 0xC8C4,
+ 0x9977, 0xE2C3, 0x9978, 0xF09A, 0x9979, 0xF09B, 0x997A, 0xBDC8,
+ 0x997B, 0xF09C, 0x997C, 0xB1FD, 0x997D, 0xE2C4, 0x997E, 0xF09D,
+ 0x997F, 0xB6F6, 0x9980, 0xE2C5, 0x9981, 0xC4D9, 0x9982, 0xF09E,
+ 0x9983, 0xF09F, 0x9984, 0xE2C6, 0x9985, 0xCFDA, 0x9986, 0xB9DD,
+ 0x9987, 0xE2C7, 0x9988, 0xC0A1, 0x9989, 0xF0A0, 0x998A, 0xE2C8,
+ 0x998B, 0xB2F6, 0x998C, 0xF140, 0x998D, 0xE2C9, 0x998E, 0xF141,
+ 0x998F, 0xC1F3, 0x9990, 0xE2CA, 0x9991, 0xE2CB, 0x9992, 0xC2F8,
+ 0x9993, 0xE2CC, 0x9994, 0xE2CD, 0x9995, 0xE2CE, 0x9996, 0xCAD7,
+ 0x9997, 0xD8B8, 0x9998, 0xD9E5, 0x9999, 0xCFE3, 0x999A, 0xF142,
+ 0x999B, 0xF143, 0x999C, 0xF144, 0x999D, 0xF145, 0x999E, 0xF146,
+ 0x999F, 0xF147, 0x99A0, 0xF148, 0x99A1, 0xF149, 0x99A2, 0xF14A,
+ 0x99A3, 0xF14B, 0x99A4, 0xF14C, 0x99A5, 0xF0A5, 0x99A6, 0xF14D,
+ 0x99A7, 0xF14E, 0x99A8, 0xDCB0, 0x99A9, 0xF14F, 0x99AA, 0xF150,
+ 0x99AB, 0xF151, 0x99AC, 0xF152, 0x99AD, 0xF153, 0x99AE, 0xF154,
+ 0x99AF, 0xF155, 0x99B0, 0xF156, 0x99B1, 0xF157, 0x99B2, 0xF158,
+ 0x99B3, 0xF159, 0x99B4, 0xF15A, 0x99B5, 0xF15B, 0x99B6, 0xF15C,
+ 0x99B7, 0xF15D, 0x99B8, 0xF15E, 0x99B9, 0xF15F, 0x99BA, 0xF160,
+ 0x99BB, 0xF161, 0x99BC, 0xF162, 0x99BD, 0xF163, 0x99BE, 0xF164,
+ 0x99BF, 0xF165, 0x99C0, 0xF166, 0x99C1, 0xF167, 0x99C2, 0xF168,
+ 0x99C3, 0xF169, 0x99C4, 0xF16A, 0x99C5, 0xF16B, 0x99C6, 0xF16C,
+ 0x99C7, 0xF16D, 0x99C8, 0xF16E, 0x99C9, 0xF16F, 0x99CA, 0xF170,
+ 0x99CB, 0xF171, 0x99CC, 0xF172, 0x99CD, 0xF173, 0x99CE, 0xF174,
+ 0x99CF, 0xF175, 0x99D0, 0xF176, 0x99D1, 0xF177, 0x99D2, 0xF178,
+ 0x99D3, 0xF179, 0x99D4, 0xF17A, 0x99D5, 0xF17B, 0x99D6, 0xF17C,
+ 0x99D7, 0xF17D, 0x99D8, 0xF17E, 0x99D9, 0xF180, 0x99DA, 0xF181,
+ 0x99DB, 0xF182, 0x99DC, 0xF183, 0x99DD, 0xF184, 0x99DE, 0xF185,
+ 0x99DF, 0xF186, 0x99E0, 0xF187, 0x99E1, 0xF188, 0x99E2, 0xF189,
+ 0x99E3, 0xF18A, 0x99E4, 0xF18B, 0x99E5, 0xF18C, 0x99E6, 0xF18D,
+ 0x99E7, 0xF18E, 0x99E8, 0xF18F, 0x99E9, 0xF190, 0x99EA, 0xF191,
+ 0x99EB, 0xF192, 0x99EC, 0xF193, 0x99ED, 0xF194, 0x99EE, 0xF195,
+ 0x99EF, 0xF196, 0x99F0, 0xF197, 0x99F1, 0xF198, 0x99F2, 0xF199,
+ 0x99F3, 0xF19A, 0x99F4, 0xF19B, 0x99F5, 0xF19C, 0x99F6, 0xF19D,
+ 0x99F7, 0xF19E, 0x99F8, 0xF19F, 0x99F9, 0xF1A0, 0x99FA, 0xF240,
+ 0x99FB, 0xF241, 0x99FC, 0xF242, 0x99FD, 0xF243, 0x99FE, 0xF244,
+ 0x99FF, 0xF245, 0x9A00, 0xF246, 0x9A01, 0xF247, 0x9A02, 0xF248,
+ 0x9A03, 0xF249, 0x9A04, 0xF24A, 0x9A05, 0xF24B, 0x9A06, 0xF24C,
+ 0x9A07, 0xF24D, 0x9A08, 0xF24E, 0x9A09, 0xF24F, 0x9A0A, 0xF250,
+ 0x9A0B, 0xF251, 0x9A0C, 0xF252, 0x9A0D, 0xF253, 0x9A0E, 0xF254,
+ 0x9A0F, 0xF255, 0x9A10, 0xF256, 0x9A11, 0xF257, 0x9A12, 0xF258,
+ 0x9A13, 0xF259, 0x9A14, 0xF25A, 0x9A15, 0xF25B, 0x9A16, 0xF25C,
+ 0x9A17, 0xF25D, 0x9A18, 0xF25E, 0x9A19, 0xF25F, 0x9A1A, 0xF260,
+ 0x9A1B, 0xF261, 0x9A1C, 0xF262, 0x9A1D, 0xF263, 0x9A1E, 0xF264,
+ 0x9A1F, 0xF265, 0x9A20, 0xF266, 0x9A21, 0xF267, 0x9A22, 0xF268,
+ 0x9A23, 0xF269, 0x9A24, 0xF26A, 0x9A25, 0xF26B, 0x9A26, 0xF26C,
+ 0x9A27, 0xF26D, 0x9A28, 0xF26E, 0x9A29, 0xF26F, 0x9A2A, 0xF270,
+ 0x9A2B, 0xF271, 0x9A2C, 0xF272, 0x9A2D, 0xF273, 0x9A2E, 0xF274,
+ 0x9A2F, 0xF275, 0x9A30, 0xF276, 0x9A31, 0xF277, 0x9A32, 0xF278,
+ 0x9A33, 0xF279, 0x9A34, 0xF27A, 0x9A35, 0xF27B, 0x9A36, 0xF27C,
+ 0x9A37, 0xF27D, 0x9A38, 0xF27E, 0x9A39, 0xF280, 0x9A3A, 0xF281,
+ 0x9A3B, 0xF282, 0x9A3C, 0xF283, 0x9A3D, 0xF284, 0x9A3E, 0xF285,
+ 0x9A3F, 0xF286, 0x9A40, 0xF287, 0x9A41, 0xF288, 0x9A42, 0xF289,
+ 0x9A43, 0xF28A, 0x9A44, 0xF28B, 0x9A45, 0xF28C, 0x9A46, 0xF28D,
+ 0x9A47, 0xF28E, 0x9A48, 0xF28F, 0x9A49, 0xF290, 0x9A4A, 0xF291,
+ 0x9A4B, 0xF292, 0x9A4C, 0xF293, 0x9A4D, 0xF294, 0x9A4E, 0xF295,
+ 0x9A4F, 0xF296, 0x9A50, 0xF297, 0x9A51, 0xF298, 0x9A52, 0xF299,
+ 0x9A53, 0xF29A, 0x9A54, 0xF29B, 0x9A55, 0xF29C, 0x9A56, 0xF29D,
+ 0x9A57, 0xF29E, 0x9A58, 0xF29F, 0x9A59, 0xF2A0, 0x9A5A, 0xF340,
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F456, 0x9B22, 0xF457,
+ 0x9B23, 0xF7E0, 0x9B24, 0xF458, 0x9B25, 0xF459, 0x9B26, 0xF45A,
+ 0x9B27, 0xF45B, 0x9B28, 0xF45C, 0x9B29, 0xF45D, 0x9B2A, 0xF45E,
+ 0x9B2B, 0xF45F, 0x9B2C, 0xF460, 0x9B2D, 0xF461, 0x9B2E, 0xF462,
+ 0x9B2F, 0xDBCB, 0x9B30, 0xF463, 0x9B31, 0xF464, 0x9B32, 0xD8AA,
+ 0x9B33, 0xF465, 0x9B34, 0xF466, 0x9B35, 0xF467, 0x9B36, 0xF468,
+ 0x9B37, 0xF469, 0x9B38, 0xF46A, 0x9B39, 0xF46B, 0x9B3A, 0xF46C,
+ 0x9B3B, 0xE5F7, 0x9B3C, 0xB9ED, 0x9B3D, 0xF46D, 0x9B3E, 0xF46E,
+ 0x9B3F, 0xF46F, 0x9B40, 0xF470, 0x9B41, 0xBFFD, 0x9B42, 0xBBEA,
+ 0x9B43, 0xF7C9, 0x9B44, 0xC6C7, 0x9B45, 0xF7C8, 0x9B46, 0xF471,
+ 0x9B47, 0xF7CA, 0x9B48, 0xF7CC, 0x9B49, 0xF7CB, 0x9B4A, 0xF472,
+ 0x9B4B, 0xF473, 0x9B4C, 0xF474, 0x9B4D, 0xF7CD, 0x9B4E, 0xF475,
+ 0x9B4F, 0xCEBA, 0x9B50, 0xF476, 0x9B51, 0xF7CE, 0x9B52, 0xF477,
+ 0x9B53, 0xF478, 0x9B54, 0xC4A7, 0x9B55, 0xF479, 0x9B56, 0xF47A,
+ 0x9B57, 0xF47B, 0x9B58, 0xF47C, 0x9B59, 0xF47D, 0x9B5A, 0xF47E,
+ 0x9B5B, 0xF480, 0x9B5C, 0xF481, 0x9B5D, 0xF482, 0x9B5E, 0xF483,
+ 0x9B5F, 0xF484, 0x9B60, 0xF485, 0x9B61, 0xF486, 0x9B62, 0xF487,
+ 0x9B63, 0xF488, 0x9B64, 0xF489, 0x9B65, 0xF48A, 0x9B66, 0xF48B,
+ 0x9B67, 0xF48C, 0x9B68, 0xF48D, 0x9B69, 0xF48E, 0x9B6A, 0xF48F,
+ 0x9B6B, 0xF490, 0x9B6C, 0xF491, 0x9B6D, 0xF492, 0x9B6E, 0xF493,
+ 0x9B6F, 0xF494, 0x9B70, 0xF495, 0x9B71, 0xF496, 0x9B72, 0xF497,
+ 0x9B73, 0xF498, 0x9B74, 0xF499, 0x9B75, 0xF49A, 0x9B76, 0xF49B,
+ 0x9B77, 0xF49C, 0x9B78, 0xF49D, 0x9B79, 0xF49E, 0x9B7A, 0xF49F,
+ 0x9B7B, 0xF4A0, 0x9B7C, 0xF540, 0x9B7D, 0xF541, 0x9B7E, 0xF542,
+ 0x9B7F, 0xF543, 0x9B80, 0xF544, 0x9B81, 0xF545, 0x9B82, 0xF546,
+ 0x9B83, 0xF547, 0x9B84, 0xF548, 0x9B85, 0xF549, 0x9B86, 0xF54A,
+ 0x9B87, 0xF54B, 0x9B88, 0xF54C, 0x9B89, 0xF54D, 0x9B8A, 0xF54E,
+ 0x9B8B, 0xF54F, 0x9B8C, 0xF550, 0x9B8D, 0xF551, 0x9B8E, 0xF552,
+ 0x9B8F, 0xF553, 0x9B90, 0xF554, 0x9B91, 0xF555, 0x9B92, 0xF556,
+ 0x9B93, 0xF557, 0x9B94, 0xF558, 0x9B95, 0xF559, 0x9B96, 0xF55A,
+ 0x9B97, 0xF55B, 0x9B98, 0xF55C, 0x9B99, 0xF55D, 0x9B9A, 0xF55E,
+ 0x9B9B, 0xF55F, 0x9B9C, 0xF560, 0x9B9D, 0xF561, 0x9B9E, 0xF562,
+ 0x9B9F, 0xF563, 0x9BA0, 0xF564, 0x9BA1, 0xF565, 0x9BA2, 0xF566,
+ 0x9BA3, 0xF567, 0x9BA4, 0xF568, 0x9BA5, 0xF569, 0x9BA6, 0xF56A,
+ 0x9BA7, 0xF56B, 0x9BA8, 0xF56C, 0x9BA9, 0xF56D, 0x9BAA, 0xF56E,
+ 0x9BAB, 0xF56F, 0x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 0x9BF0, 0xF654, 0x9BF1, 0xF655, 0x9BF2, 0xF656,
+ 0x9BF3, 0xF657, 0x9BF4, 0xF658, 0x9BF5, 0xF659, 0x9BF6, 0xF65A,
+ 0x9BF7, 0xF65B, 0x9BF8, 0xF65C, 0x9BF9, 0xF65D, 0x9BFA, 0xF65E,
+ 0x9BFB, 0xF65F, 0x9BFC, 0xF660, 0x9BFD, 0xF661, 0x9BFE, 0xF662,
+ 0x9BFF, 0xF663, 0x9C00, 0xF664, 0x9C01, 0xF665, 0x9C02, 0xF666,
+ 0x9C03, 0xF667, 0x9C04, 0xF668, 0x9C05, 0xF669, 0x9C06, 0xF66A,
+ 0x9C07, 0xF66B, 0x9C08, 0xF66C, 0x9C09, 0xF66D, 0x9C0A, 0xF66E,
+ 0x9C0B, 0xF66F, 0x9C0C, 0xF670, 0x9C0D, 0xF671, 0x9C0E, 0xF672,
+ 0x9C0F, 0xF673, 0x9C10, 0xF674, 0x9C11, 0xF675, 0x9C12, 0xF676,
+ 0x9C13, 0xF677, 0x9C14, 0xF678, 0x9C15, 0xF679, 0x9C16, 0xF67A,
+ 0x9C17, 0xF67B, 0x9C18, 0xF67C, 0x9C19, 0xF67D, 0x9C1A, 0xF67E,
+ 0x9C1B, 0xF680, 0x9C1C, 0xF681, 0x9C1D, 0xF682, 0x9C1E, 0xF683,
+ 0x9C1F, 0xF684, 0x9C20, 0xF685, 0x9C21, 0xF686, 0x9C22, 0xF687,
+ 0x9C23, 0xF688, 0x9C24, 0xF689, 0x9C25, 0xF68A, 0x9C26, 0xF68B,
+ 0x9C27, 0xF68C, 0x9C28, 0xF68D, 0x9C29, 0xF68E, 0x9C2A, 0xF68F,
+ 0x9C2B, 0xF690, 0x9C2C, 0xF691, 0x9C2D, 0xF692, 0x9C2E, 0xF693,
+ 0x9C2F, 0xF694, 0x9C30, 0xF695, 0x9C31, 0xF696, 0x9C32, 0xF697,
+ 0x9C33, 0xF698, 0x9C34, 0xF699, 0x9C35, 0xF69A, 0x9C36, 0xF69B,
+ 0x9C37, 0xF69C, 0x9C38, 0xF69D, 0x9C39, 0xF69E, 0x9C3A, 0xF69F,
+ 0x9C3B, 0xF6A0, 0x9C3C, 0xF740, 0x9C3D, 0xF741, 0x9C3E, 0xF742,
+ 0x9C3F, 0xF743, 0x9C40, 0xF744, 0x9C41, 0xF745, 0x9C42, 0xF746,
+ 0x9C43, 0xF747, 0x9C44, 0xF748, 0x9C45, 0xF749, 0x9C46, 0xF74A,
+ 0x9C47, 0xF74B, 0x9C48, 0xF74C, 0x9C49, 0xF74D, 0x9C4A, 0xF74E,
+ 0x9C4B, 0xF74F, 0x9C4C, 0xF750, 0x9C4D, 0xF751, 0x9C4E, 0xF752,
+ 0x9C4F, 0xF753, 0x9C50, 0xF754, 0x9C51, 0xF755, 0x9C52, 0xF756,
+ 0x9C53, 0xF757, 0x9C54, 0xF758, 0x9C55, 0xF759, 0x9C56, 0xF75A,
+ 0x9C57, 0xF75B, 0x9C58, 0xF75C, 0x9C59, 0xF75D, 0x9C5A, 0xF75E,
+ 0x9C5B, 0xF75F, 0x9C5C, 0xF760, 0x9C5D, 0xF761, 0x9C5E, 0xF762,
+ 0x9C5F, 0xF763, 0x9C60, 0xF764, 0x9C61, 0xF765, 0x9C62, 0xF766,
+ 0x9C63, 0xF767, 0x9C64, 0xF768, 0x9C65, 0xF769, 0x9C66, 0xF76A,
+ 0x9C67, 0xF76B, 0x9C68, 0xF76C, 0x9C69, 0xF76D, 0x9C6A, 0xF76E,
+ 0x9C6B, 0xF76F, 0x9C6C, 0xF770, 0x9C6D, 0xF771, 0x9C6E, 0xF772,
+ 0x9C6F, 0xF773, 0x9C70, 0xF774, 0x9C71, 0xF775, 0x9C72, 0xF776,
+ 0x9C73, 0xF777, 0x9C74, 0xF778, 0x9C75, 0xF779, 0x9C76, 0xF77A,
+ 0x9C77, 0xF77B, 0x9C78, 0xF77C, 0x9C79, 0xF77D, 0x9C7A, 0xF77E,
+ 0x9C7B, 0xF780, 0x9C7C, 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, 0x9CFE, 0xF85B,
+ 0x9CFF, 0xF85C, 0x9D00, 0xF85D, 0x9D01, 0xF85E, 0x9D02, 0xF85F,
+ 0x9D03, 0xF860, 0x9D04, 0xF861, 0x9D05, 0xF862, 0x9D06, 0xF863,
+ 0x9D07, 0xF864, 0x9D08, 0xF865, 0x9D09, 0xF866, 0x9D0A, 0xF867,
+ 0x9D0B, 0xF868, 0x9D0C, 0xF869, 0x9D0D, 0xF86A, 0x9D0E, 0xF86B,
+ 0x9D0F, 0xF86C, 0x9D10, 0xF86D, 0x9D11, 0xF86E, 0x9D12, 0xF86F,
+ 0x9D13, 0xF870, 0x9D14, 0xF871, 0x9D15, 0xF872, 0x9D16, 0xF873,
+ 0x9D17, 0xF874, 0x9D18, 0xF875, 0x9D19, 0xF876, 0x9D1A, 0xF877,
+ 0x9D1B, 0xF878, 0x9D1C, 0xF879, 0x9D1D, 0xF87A, 0x9D1E, 0xF87B,
+ 0x9D1F, 0xF87C, 0x9D20, 0xF87D, 0x9D21, 0xF87E, 0x9D22, 0xF880,
+ 0x9D23, 0xF881, 0x9D24, 0xF882, 0x9D25, 0xF883, 0x9D26, 0xF884,
+ 0x9D27, 0xF885, 0x9D28, 0xF886, 0x9D29, 0xF887, 0x9D2A, 0xF888,
+ 0x9D2B, 0xF889, 0x9D2C, 0xF88A, 0x9D2D, 0xF88B, 0x9D2E, 0xF88C,
+ 0x9D2F, 0xF88D, 0x9D30, 0xF88E, 0x9D31, 0xF88F, 0x9D32, 0xF890,
+ 0x9D33, 0xF891, 0x9D34, 0xF892, 0x9D35, 0xF893, 0x9D36, 0xF894,
+ 0x9D37, 0xF895, 0x9D38, 0xF896, 0x9D39, 0xF897, 0x9D3A, 0xF898,
+ 0x9D3B, 0xF899, 0x9D3C, 0xF89A, 0x9D3D, 0xF89B, 0x9D3E, 0xF89C,
+ 0x9D3F, 0xF89D, 0x9D40, 0xF89E, 0x9D41, 0xF89F, 0x9D42, 0xF8A0,
+ 0x9D43, 0xF940, 0x9D44, 0xF941, 0x9D45, 0xF942, 0x9D46, 0xF943,
+ 0x9D47, 0xF944, 0x9D48, 0xF945, 0x9D49, 0xF946, 0x9D4A, 0xF947,
+ 0x9D4B, 0xF948, 0x9D4C, 0xF949, 0x9D4D, 0xF94A, 0x9D4E, 0xF94B,
+ 0x9D4F, 0xF94C, 0x9D50, 0xF94D, 0x9D51, 0xF94E, 0x9D52, 0xF94F,
+ 0x9D53, 0xF950, 0x9D54, 0xF951, 0x9D55, 0xF952, 0x9D56, 0xF953,
+ 0x9D57, 0xF954, 0x9D58, 0xF955, 0x9D59, 0xF956, 0x9D5A, 0xF957,
+ 0x9D5B, 0xF958, 0x9D5C, 0xF959, 0x9D5D, 0xF95A, 0x9D5E, 0xF95B,
+ 0x9D5F, 0xF95C, 0x9D60, 0xF95D, 0x9D61, 0xF95E, 0x9D62, 0xF95F,
+ 0x9D63, 0xF960, 0x9D64, 0xF961, 0x9D65, 0xF962, 0x9D66, 0xF963,
+ 0x9D67, 0xF964, 0x9D68, 0xF965, 0x9D69, 0xF966, 0x9D6A, 0xF967,
+ 0x9D6B, 0xF968, 0x9D6C, 0xF969, 0x9D6D, 0xF96A, 0x9D6E, 0xF96B,
+ 0x9D6F, 0xF96C, 0x9D70, 0xF96D, 0x9D71, 0xF96E, 0x9D72, 0xF96F,
+ 0x9D73, 0xF970, 0x9D74, 0xF971, 0x9D75, 0xF972, 0x9D76, 0xF973,
+ 0x9D77, 0xF974, 0x9D78, 0xF975, 0x9D79, 0xF976, 0x9D7A, 0xF977,
+ 0x9D7B, 0xF978, 0x9D7C, 0xF979, 0x9D7D, 0xF97A, 0x9D7E, 0xF97B,
+ 0x9D7F, 0xF97C, 0x9D80, 0xF97D, 0x9D81, 0xF97E, 0x9D82, 0xF980,
+ 0x9D83, 0xF981, 0x9D84, 0xF982, 0x9D85, 0xF983, 0x9D86, 0xF984,
+ 0x9D87, 0xF985, 0x9D88, 0xF986, 0x9D89, 0xF987, 0x9D8A, 0xF988,
+ 0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0
+};
+
+static
+const WCHAR oem2uni[] = {
+/* OEM - Unicode, OEM - Unicode, OEM - Unicode, OEM - Unicode */
+ 0x0080, 0x20AC, 0x8140, 0x4E02, 0x8141, 0x4E04, 0x8142, 0x4E05,
+ 0x8143, 0x4E06, 0x8144, 0x4E0F, 0x8145, 0x4E12, 0x8146, 0x4E17,
+ 0x8147, 0x4E1F, 0x8148, 0x4E20, 0x8149, 0x4E21, 0x814A, 0x4E23,
+ 0x814B, 0x4E26, 0x814C, 0x4E29, 0x814D, 0x4E2E, 0x814E, 0x4E2F,
+ 0x814F, 0x4E31, 0x8150, 0x4E33, 0x8151, 0x4E35, 0x8152, 0x4E37,
+ 0x8153, 0x4E3C, 0x8154, 0x4E40, 0x8155, 0x4E41, 0x8156, 0x4E42,
+ 0x8157, 0x4E44, 0x8158, 0x4E46, 0x8159, 0x4E4A, 0x815A, 0x4E51,
+ 0x815B, 0x4E55, 0x815C, 0x4E57, 0x815D, 0x4E5A, 0x815E, 0x4E5B,
+ 0x815F, 0x4E62, 0x8160, 0x4E63, 0x8161, 0x4E64, 0x8162, 0x4E65,
+ 0x8163, 0x4E67, 0x8164, 0x4E68, 0x8165, 0x4E6A, 0x8166, 0x4E6B,
+ 0x8167, 0x4E6C, 0x8168, 0x4E6D, 0x8169, 0x4E6E, 0x816A, 0x4E6F,
+ 0x816B, 0x4E72, 0x816C, 0x4E74, 0x816D, 0x4E75, 0x816E, 0x4E76,
+ 0x816F, 0x4E77, 0x8170, 0x4E78, 0x8171, 0x4E79, 0x8172, 0x4E7A,
+ 0x8173, 0x4E7B, 0x8174, 0x4E7C, 0x8175, 0x4E7D, 0x8176, 0x4E7F,
+ 0x8177, 0x4E80, 0x8178, 0x4E81, 0x8179, 0x4E82, 0x817A, 0x4E83,
+ 0x817B, 0x4E84, 0x817C, 0x4E85, 0x817D, 0x4E87, 0x817E, 0x4E8A,
+ 0x8180, 0x4E90, 0x8181, 0x4E96, 0x8182, 0x4E97, 0x8183, 0x4E99,
+ 0x8184, 0x4E9C, 0x8185, 0x4E9D, 0x8186, 0x4E9E, 0x8187, 0x4EA3,
+ 0x8188, 0x4EAA, 0x8189, 0x4EAF, 0x818A, 0x4EB0, 0x818B, 0x4EB1,
+ 0x818C, 0x4EB4, 0x818D, 0x4EB6, 0x818E, 0x4EB7, 0x818F, 0x4EB8,
+ 0x8190, 0x4EB9, 0x8191, 0x4EBC, 0x8192, 0x4EBD, 0x8193, 0x4EBE,
+ 0x8194, 0x4EC8, 0x8195, 0x4ECC, 0x8196, 0x4ECF, 0x8197, 0x4ED0,
+ 0x8198, 0x4ED2, 0x8199, 0x4EDA, 0x819A, 0x4EDB, 0x819B, 0x4EDC,
+ 0x819C, 0x4EE0, 0x819D, 0x4EE2, 0x819E, 0x4EE6, 0x819F, 0x4EE7,
+ 0x81A0, 0x4EE9, 0x81A1, 0x4EED, 0x81A2, 0x4EEE, 0x81A3, 0x4EEF,
+ 0x81A4, 0x4EF1, 0x81A5, 0x4EF4, 0x81A6, 0x4EF8, 0x81A7, 0x4EF9,
+ 0x81A8, 0x4EFA, 0x81A9, 0x4EFC, 0x81AA, 0x4EFE, 0x81AB, 0x4F00,
+ 0x81AC, 0x4F02, 0x81AD, 0x4F03, 0x81AE, 0x4F04, 0x81AF, 0x4F05,
+ 0x81B0, 0x4F06, 0x81B1, 0x4F07, 0x81B2, 0x4F08, 0x81B3, 0x4F0B,
+ 0x81B4, 0x4F0C, 0x81B5, 0x4F12, 0x81B6, 0x4F13, 0x81B7, 0x4F14,
+ 0x81B8, 0x4F15, 0x81B9, 0x4F16, 0x81BA, 0x4F1C, 0x81BB, 0x4F1D,
+ 0x81BC, 0x4F21, 0x81BD, 0x4F23, 0x81BE, 0x4F28, 0x81BF, 0x4F29,
+ 0x81C0, 0x4F2C, 0x81C1, 0x4F2D, 0x81C2, 0x4F2E, 0x81C3, 0x4F31,
+ 0x81C4, 0x4F33, 0x81C5, 0x4F35, 0x81C6, 0x4F37, 0x81C7, 0x4F39,
+ 0x81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D, 0x4FBB, 0x824E, 0x4FBC, 0x824F, 0x4FBD, 0x8250, 0x4FBE,
+ 0x8251, 0x4FC0, 0x8252, 0x4FC1, 0x8253, 0x4FC2, 0x8254, 0x4FC6,
+ 0x8255, 0x4FC7, 0x8256, 0x4FC8, 0x8257, 0x4FC9, 0x8258, 0x4FCB,
+ 0x8259, 0x4FCC, 0x825A, 0x4FCD, 0x825B, 0x4FD2, 0x825C, 0x4FD3,
+ 0x825D, 0x4FD4, 0x825E, 0x4FD5, 0x825F, 0x4FD6, 0x8260, 0x4FD9,
+ 0x8261, 0x4FDB, 0x8262, 0x4FE0, 0x8263, 0x4FE2, 0x8264, 0x4FE4,
+ 0x8265, 0x4FE5, 0x8266, 0x4FE7, 0x8267, 0x4FEB, 0x8268, 0x4FEC,
+ 0x8269, 0x4FF0, 0x826A, 0x4FF2, 0x826B, 0x4FF4, 0x826C, 0x4FF5,
+ 0x826D, 0x4FF6, 0x826E, 0x4FF7, 0x826F, 0x4FF9, 0x8270, 0x4FFB,
+ 0x8271, 0x4FFC, 0x8272, 0x4FFD, 0x8273, 0x4FFF, 0x8274, 0x5000,
+ 0x8275, 0x5001, 0x8276, 0x5002, 0x8277, 0x5003, 0x8278, 0x5004,
+ 0x8279, 0x5005, 0x827A, 0x5006, 0x827B, 0x5007, 0x827C, 0x5008,
+ 0x827D, 0x5009, 0x827E, 0x500A, 0x8280, 0x500B, 0x8281, 0x500E,
+ 0x8282, 0x5010, 0x8283, 0x5011, 0x8284, 0x5013, 0x8285, 0x5015,
+ 0x8286, 0x5016, 0x8287, 0x5017, 0x8288, 0x501B, 0x8289, 0x501D,
+ 0x828A, 0x501E, 0x828B, 0x5020, 0x828C, 0x5022, 0x828D, 0x5023,
+ 0x828E, 0x5024, 0x828F, 0x5027, 0x8290, 0x502B, 0x8291, 0x502F,
+ 0x8292, 0x5030, 0x8293, 0x5031, 0x8294, 0x5032, 0x8295, 0x5033,
+ 0x8296, 0x5034, 0x8297, 0x5035, 0x8298, 0x5036, 0x8299, 0x5037,
+ 0x829A, 0x5038, 0x829B, 0x5039, 0x829C, 0x503B, 0x829D, 0x503D,
+ 0x829E, 0x503F, 0x829F, 0x5040, 0x82A0, 0x5041, 0x82A1, 0x5042,
+ 0x82A2, 0x5044, 0x82A3, 0x5045, 0x82A4, 0x5046, 0x82A5, 0x5049,
+ 0x82A6, 0x504A, 0x82A7, 0x504B, 0x82A8, 0x504D, 0x82A9, 0x5050,
+ 0x82AA, 0x5051, 0x82AB, 0x5052, 0x82AC, 0x5053, 0x82AD, 0x5054,
+ 0x82AE, 0x5056, 0x82AF, 0x5057, 0x82B0, 0x5058, 0x82B1, 0x5059,
+ 0x82B2, 0x505B, 0x82B3, 0x505D, 0x82B4, 0x505E, 0x82B5, 0x505F,
+ 0x82B6, 0x5060, 0x82B7, 0x5061, 0x82B8, 0x5062, 0x82B9, 0x5063,
+ 0x82BA, 0x5064, 0x82BB, 0x5066, 0x82BC, 0x5067, 0x82BD, 0x5068,
+ 0x82BE, 0x5069, 0x82BF, 0x506A, 0x82C0, 0x506B, 0x82C1, 0x506D,
+ 0x82C2, 0x506E, 0x82C3, 0x506F, 0x82C4, 0x5070, 0x82C5, 0x5071,
+ 0x82C6, 0x5072, 0x82C7, 0x5073, 0x82C8, 0x5074, 0x82C9, 0x5075,
+ 0x82CA, 0x5078, 0x82CB, 0x5079, 0x82CC, 0x507A, 0x82CD, 0x507C,
+ 0x82CE, 0x507D, 0x82CF, 0x5081, 0x82D0, 0x5082, 0x82D1, 0x5083,
+ 0x82D2, 0x5084, 0x82D3, 0x5086, 0x82D4, 0x5087, 0x82D5, 0x5089,
+ 0x82D6, 0x508A, 0x82D7, 0x508B, 0x82D8, 0x508C, 0x82D9, 0x508E,
+ 0x82DA, 0x508F, 0x82DB, 0x5090, 0x82DC, 0x5091, 0x82DD, 0x5092,
+ 0x82DE, 0x5093, 0x82DF, 0x5094, 0x82E0, 0x5095, 0x82E1, 0x5096,
+ 0x82E2, 0x5097, 0x82E3, 0x5098, 0x82E4, 0x5099, 0x82E5, 0x509A,
+ 0x82E6, 0x509B, 0x82E7, 0x509C, 0x82E8, 0x509D, 0x82E9, 0x509E,
+ 0x82EA, 0x509F, 0x82EB, 0x50A0, 0x82EC, 0x50A1, 0x82ED, 0x50A2,
+ 0x82EE, 0x50A4, 0x82EF, 0x50A6, 0x82F0, 0x50AA, 0x82F1, 0x50AB,
+ 0x82F2, 0x50AD, 0x82F3, 0x50AE, 0x82F4, 0x50AF, 0x82F5, 0x50B0,
+ 0x82F6, 0x50B1, 0x82F7, 0x50B3, 0x82F8, 0x50B4, 0x82F9, 0x50B5,
+ 0x82FA, 0x50B6, 0x82FB, 0x50B7, 0x82FC, 0x50B8, 0x82FD, 0x50B9,
+ 0x82FE, 0x50BC, 0x8340, 0x50BD, 0x8341, 0x50BE, 0x8342, 0x50BF,
+ 0x8343, 0x50C0, 0x8344, 0x50C1, 0x8345, 0x50C2, 0x8346, 0x50C3,
+ 0x8347, 0x50C4, 0x8348, 0x50C5, 0x8349, 0x50C6, 0x834A, 0x50C7,
+ 0x834B, 0x50C8, 0x834C, 0x50C9, 0x834D, 0x50CA, 0x834E, 0x50CB,
+ 0x834F, 0x50CC, 0x8350, 0x50CD, 0x8351, 0x50CE, 0x8352, 0x50D0,
+ 0x8353, 0x50D1, 0x8354, 0x50D2, 0x8355, 0x50D3, 0x8356, 0x50D4,
+ 0x8357, 0x50D5, 0x8358, 0x50D7, 0x8359, 0x50D8, 0x835A, 0x50D9,
+ 0x835B, 0x50DB, 0x835C, 0x50DC, 0x835D, 0x50DD, 0x835E, 0x50DE,
+ 0x835F, 0x50DF, 0x8360, 0x50E0, 0x8361, 0x50E1, 0x8362, 0x50E2,
+ 0x8363, 0x50E3, 0x8364, 0x50E4, 0x8365, 0x50E5, 0x8366, 0x50E8,
+ 0x8367, 0x50E9, 0x8368, 0x50EA, 0x8369, 0x50EB, 0x836A, 0x50EF,
+ 0x836B, 0x50F0, 0x836C, 0x50F1, 0x836D, 0x50F2, 0x836E, 0x50F4,
+ 0x836F, 0x50F6, 0x8370, 0x50F7, 0x8371, 0x50F8, 0x8372, 0x50F9,
+ 0x8373, 0x50FA, 0x8374, 0x50FC, 0x8375, 0x50FD, 0x8376, 0x50FE,
+ 0x8377, 0x50FF, 0x8378, 0x5100, 0x8379, 0x5101, 0x837A, 0x5102,
+ 0x837B, 0x5103, 0x837C, 0x5104, 0x837D, 0x5105, 0x837E, 0x5108,
+ 0x8380, 0x5109, 0x8381, 0x510A, 0x8382, 0x510C, 0x8383, 0x510D,
+ 0x8384, 0x510E, 0x8385, 0x510F, 0x8386, 0x5110, 0x8387, 0x5111,
+ 0x8388, 0x5113, 0x8389, 0x5114, 0x838A, 0x5115, 0x838B, 0x5116,
+ 0x838C, 0x5117, 0x838D, 0x5118, 0x838E, 0x5119, 0x838F, 0x511A,
+ 0x8390, 0x511B, 0x8391, 0x511C, 0x8392, 0x511D, 0x8393, 0x511E,
+ 0x8394, 0x511F, 0x8395, 0x5120, 0x8396, 0x5122, 0x8397, 0x5123,
+ 0x8398, 0x5124, 0x8399, 0x5125, 0x839A, 0x5126, 0x839B, 0x5127,
+ 0x839C, 0x5128, 0x839D, 0x5129, 0x839E, 0x512A, 0x839F, 0x512B,
+ 0x83A0, 0x512C, 0x83A1, 0x512D, 0x83A2, 0x512E, 0x83A3, 0x512F,
+ 0x83A4, 0x5130, 0x83A5, 0x5131, 0x83A6, 0x5132, 0x83A7, 0x5133,
+ 0x83A8, 0x5134, 0x83A9, 0x5135, 0x83AA, 0x5136, 0x83AB, 0x5137,
+ 0x83AC, 0x5138, 0x83AD, 0x5139, 0x83AE, 0x513A, 0x83AF, 0x513B,
+ 0x83B0, 0x513C, 0x83B1, 0x513D, 0x83B2, 0x513E, 0x83B3, 0x5142,
+ 0x83B4, 0x5147, 0x83B5, 0x514A, 0x83B6, 0x514C, 0x83B7, 0x514E,
+ 0x83B8, 0x514F, 0x83B9, 0x5150, 0x83BA, 0x5152, 0x83BB, 0x5153,
+ 0x83BC, 0x5157, 0x83BD, 0x5158, 0x83BE, 0x5159, 0x83BF, 0x515B,
+ 0x83C0, 0x515D, 0x83C1, 0x515E, 0x83C2, 0x515F, 0x83C3, 0x5160,
+ 0x83C4, 0x5161, 0x83C5, 0x5163, 0x83C6, 0x5164, 0x83C7, 0x5166,
+ 0x83C8, 0x5167, 0x83C9, 0x5169, 0x83CA, 0x516A, 0x83CB, 0x516F,
+ 0x83CC, 0x5172, 0x83CD, 0x517A, 0x83CE, 0x517E, 0x83CF, 0x517F,
+ 0x83D0, 0x5183, 0x83D1, 0x5184, 0x83D2, 0x5186, 0x83D3, 0x5187,
+ 0x83D4, 0x518A, 0x83D5, 0x518B, 0x83D6, 0x518E, 0x83D7, 0x518F,
+ 0x83D8, 0x5190, 0x83D9, 0x5191, 0x83DA, 0x5193, 0x83DB, 0x5194,
+ 0x83DC, 0x5198, 0x83DD, 0x519A, 0x83DE, 0x519D, 0x83DF, 0x519E,
+ 0x83E0, 0x519F, 0x83E1, 0x51A1, 0x83E2, 0x51A3, 0x83E3, 0x51A6,
+ 0x83E4, 0x51A7, 0x83E5, 0x51A8, 0x83E6, 0x51A9, 0x83E7, 0x51AA,
+ 0x83E8, 0x51AD, 0x83E9, 0x51AE, 0x83EA, 0x51B4, 0x83EB, 0x51B8,
+ 0x83EC, 0x51B9, 0x83ED, 0x51BA, 0x83EE, 0x51BE, 0x83EF, 0x51BF,
+ 0x83F0, 0x51C1, 0x83F1, 0x51C2, 0x83F2, 0x51C3, 0x83F3, 0x51C5,
+ 0x83F4, 0x51C8, 0x83F5, 0x51CA, 0x83F6, 0x51CD, 0x83F7, 0x51CE,
+ 0x83F8, 0x51D0, 0x83F9, 0x51D2, 0x83FA, 0x51D3, 0x83FB, 0x51D4,
+ 0x83FC, 0x51D5, 0x83FD, 0x51D6, 0x83FE, 0x51D7, 0x8440, 0x51D8,
+ 0x8441, 0x51D9, 0x8442, 0x51DA, 0x8443, 0x51DC, 0x8444, 0x51DE,
+ 0x8445, 0x51DF, 0x8446, 0x51E2, 0x8447, 0x51E3, 0x8448, 0x51E5,
+ 0x8449, 0x51E6, 0x844A, 0x51E7, 0x844B, 0x51E8, 0x844C, 0x51E9,
+ 0x844D, 0x51EA, 0x844E, 0x51EC, 0x844F, 0x51EE, 0x8450, 0x51F1,
+ 0x8451, 0x51F2, 0x8452, 0x51F4, 0x8453, 0x51F7, 0x8454, 0x51FE,
+ 0x8455, 0x5204, 0x8456, 0x5205, 0x8457, 0x5209, 0x8458, 0x520B,
+ 0x8459, 0x520C, 0x845A, 0x520F, 0x845B, 0x5210, 0x845C, 0x5213,
+ 0x845D, 0x5214, 0x845E, 0x5215, 0x845F, 0x521C, 0x8460, 0x521E,
+ 0x8461, 0x521F, 0x8462, 0x5221, 0x8463, 0x5222, 0x8464, 0x5223,
+ 0x8465, 0x5225, 0x8466, 0x5226, 0x8467, 0x5227, 0x8468, 0x522A,
+ 0x8469, 0x522C, 0x846A, 0x522F, 0x846B, 0x5231, 0x846C, 0x5232,
+ 0x846D, 0x5234, 0x846E, 0x5235, 0x846F, 0x523C, 0x8470, 0x523E,
+ 0x8471, 0x5244, 0x8472, 0x5245, 0x8473, 0x5246, 0x8474, 0x5247,
+ 0x8475, 0x5248, 0x8476, 0x5249, 0x8477, 0x524B, 0x8478, 0x524E,
+ 0x8479, 0x524F, 0x847A, 0x5252, 0x847B, 0x5253, 0x847C, 0x5255,
+ 0x847D, 0x5257, 0x847E, 0x5258, 0x8480, 0x5259, 0x8481, 0x525A,
+ 0x8482, 0x525B, 0x8483, 0x525D, 0x8484, 0x525F, 0x8485, 0x5260,
+ 0x8486, 0x5262, 0x8487, 0x5263, 0x8488, 0x5264, 0x8489, 0x5266,
+ 0x848A, 0x5268, 0x848B, 0x526B, 0x848C, 0x526C, 0x848D, 0x526D,
+ 0x848E, 0x526E, 0x848F, 0x5270, 0x8490, 0x5271, 0x8491, 0x5273,
+ 0x8492, 0x5274, 0x8493, 0x5275, 0x8494, 0x5276, 0x8495, 0x5277,
+ 0x8496, 0x5278, 0x8497, 0x5279, 0x8498, 0x527A, 0x8499, 0x527B,
+ 0x849A, 0x527C, 0x849B, 0x527E, 0x849C, 0x5280, 0x849D, 0x5283,
+ 0x849E, 0x5284, 0x849F, 0x5285, 0x84A0, 0x5286, 0x84A1, 0x5287,
+ 0x84A2, 0x5289, 0x84A3, 0x528A, 0x84A4, 0x528B, 0x84A5, 0x528C,
+ 0x84A6, 0x528D, 0x84A7, 0x528E, 0x84A8, 0x528F, 0x84A9, 0x5291,
+ 0x84AA, 0x5292, 0x84AB, 0x5294, 0x84AC, 0x5295, 0x84AD, 0x5296,
+ 0x84AE, 0x5297, 0x84AF, 0x5298, 0x84B0, 0x5299, 0x84B1, 0x529A,
+ 0x84B2, 0x529C, 0x84B3, 0x52A4, 0x84B4, 0x52A5, 0x84B5, 0x52A6,
+ 0x84B6, 0x52A7, 0x84B7, 0x52AE, 0x84B8, 0x52AF, 0x84B9, 0x52B0,
+ 0x84BA, 0x52B4, 0x84BB, 0x52B5, 0x84BC, 0x52B6, 0x84BD, 0x52B7,
+ 0x84BE, 0x52B8, 0x84BF, 0x52B9, 0x84C0, 0x52BA, 0x84C1, 0x52BB,
+ 0x84C2, 0x52BC, 0x84C3, 0x52BD, 0x84C4, 0x52C0, 0x84C5, 0x52C1,
+ 0x84C6, 0x52C2, 0x84C7, 0x52C4, 0x84C8, 0x52C5, 0x84C9, 0x52C6,
+ 0x84CA, 0x52C8, 0x84CB, 0x52CA, 0x84CC, 0x52CC, 0x84CD, 0x52CD,
+ 0x84CE, 0x52CE, 0x84CF, 0x52CF, 0x84D0, 0x52D1, 0x84D1, 0x52D3,
+ 0x84D2, 0x52D4, 0x84D3, 0x52D5, 0x84D4, 0x52D7, 0x84D5, 0x52D9,
+ 0x84D6, 0x52DA, 0x84D7, 0x52DB, 0x84D8, 0x52DC, 0x84D9, 0x52DD,
+ 0x84DA, 0x52DE, 0x84DB, 0x52E0, 0x84DC, 0x52E1, 0x84DD, 0x52E2,
+ 0x84DE, 0x52E3, 0x84DF, 0x52E5, 0x84E0, 0x52E6, 0x84E1, 0x52E7,
+ 0x84E2, 0x52E8, 0x84E3, 0x52E9, 0x84E4, 0x52EA, 0x84E5, 0x52EB,
+ 0x84E6, 0x52EC, 0x84E7, 0x52ED, 0x84E8, 0x52EE, 0x84E9, 0x52EF,
+ 0x84EA, 0x52F1, 0x84EB, 0x52F2, 0x84EC, 0x52F3, 0x84ED, 0x52F4,
+ 0x84EE, 0x52F5, 0x84EF, 0x52F6, 0x84F0, 0x52F7, 0x84F1, 0x52F8,
+ 0x84F2, 0x52FB, 0x84F3, 0x52FC, 0x84F4, 0x52FD, 0x84F5, 0x5301,
+ 0x84F6, 0x5302, 0x84F7, 0x5303, 0x84F8, 0x5304, 0x84F9, 0x5307,
+ 0x84FA, 0x5309, 0x84FB, 0x530A, 0x84FC, 0x530B, 0x84FD, 0x530C,
+ 0x84FE, 0x530E, 0x8540, 0x5311, 0x8541, 0x5312, 0x8542, 0x5313,
+ 0x8543, 0x5314, 0x8544, 0x5318, 0x8545, 0x531B, 0x8546, 0x531C,
+ 0x8547, 0x531E, 0x8548, 0x531F, 0x8549, 0x5322, 0x854A, 0x5324,
+ 0x854B, 0x5325, 0x854C, 0x5327, 0x854D, 0x5328, 0x854E, 0x5329,
+ 0x854F, 0x532B, 0x8550, 0x532C, 0x8551, 0x532D, 0x8552, 0x532F,
+ 0x8553, 0x5330, 0x8554, 0x5331, 0x8555, 0x5332, 0x8556, 0x5333,
+ 0x8557, 0x5334, 0x8558, 0x5335, 0x8559, 0x5336, 0x855A, 0x5337,
+ 0x855B, 0x5338, 0x855C, 0x533C, 0x855D, 0x533D, 0x855E, 0x5340,
+ 0x855F, 0x5342, 0x8560, 0x5344, 0x8561, 0x5346, 0x8562, 0x534B,
+ 0x8563, 0x534C, 0x8564, 0x534D, 0x8565, 0x5350, 0x8566, 0x5354,
+ 0x8567, 0x5358, 0x8568, 0x5359, 0x8569, 0x535B, 0x856A, 0x535D,
+ 0x856B, 0x5365, 0x856C, 0x5368, 0x856D, 0x536A, 0x856E, 0x536C,
+ 0x856F, 0x536D, 0x8570, 0x5372, 0x8571, 0x5376, 0x8572, 0x5379,
+ 0x8573, 0x537B, 0x8574, 0x537C, 0x8575, 0x537D, 0x8576, 0x537E,
+ 0x8577, 0x5380, 0x8578, 0x5381, 0x8579, 0x5383, 0x857A, 0x5387,
+ 0x857B, 0x5388, 0x857C, 0x538A, 0x857D, 0x538E, 0x857E, 0x538F,
+ 0x8580, 0x5390, 0x8581, 0x5391, 0x8582, 0x5392, 0x8583, 0x5393,
+ 0x8584, 0x5394, 0x8585, 0x5396, 0x8586, 0x5397, 0x8587, 0x5399,
+ 0x8588, 0x539B, 0x8589, 0x539C, 0x858A, 0x539E, 0x858B, 0x53A0,
+ 0x858C, 0x53A1, 0x858D, 0x53A4, 0x858E, 0x53A7, 0x858F, 0x53AA,
+ 0x8590, 0x53AB, 0x8591, 0x53AC, 0x8592, 0x53AD, 0x8593, 0x53AF,
+ 0x8594, 0x53B0, 0x8595, 0x53B1, 0x8596, 0x53B2, 0x8597, 0x53B3,
+ 0x8598, 0x53B4, 0x8599, 0x53B5, 0x859A, 0x53B7, 0x859B, 0x53B8,
+ 0x859C, 0x53B9, 0x859D, 0x53BA, 0x859E, 0x53BC, 0x859F, 0x53BD,
+ 0x85A0, 0x53BE, 0x85A1, 0x53C0, 0x85A2, 0x53C3, 0x85A3, 0x53C4,
+ 0x85A4, 0x53C5, 0x85A5, 0x53C6, 0x85A6, 0x53C7, 0x85A7, 0x53CE,
+ 0x85A8, 0x53CF, 0x85A9, 0x53D0, 0x85AA, 0x53D2, 0x85AB, 0x53D3,
+ 0x85AC, 0x53D5, 0x85AD, 0x53DA, 0x85AE, 0x53DC, 0x85AF, 0x53DD,
+ 0x85B0, 0x53DE, 0x85B1, 0x53E1, 0x85B2, 0x53E2, 0x85B3, 0x53E7,
+ 0x85B4, 0x53F4, 0x85B5, 0x53FA, 0x85B6, 0x53FE, 0x85B7, 0x53FF,
+ 0x85B8, 0x5400, 0x85B9, 0x5402, 0x85BA, 0x5405, 0x85BB, 0x5407,
+ 0x85BC, 0x540B, 0x85BD, 0x5414, 0x85BE, 0x5418, 0x85BF, 0x5419,
+ 0x85C0, 0x541A, 0x85C1, 0x541C, 0x85C2, 0x5422, 0x85C3, 0x5424,
+ 0x85C4, 0x5425, 0x85C5, 0x542A, 0x85C6, 0x5430, 0x85C7, 0x5433,
+ 0x85C8, 0x5436, 0x85C9, 0x5437, 0x85CA, 0x543A, 0x85CB, 0x543D,
+ 0x85CC, 0x543F, 0x85CD, 0x5441, 0x85CE, 0x5442, 0x85CF, 0x5444,
+ 0x85D0, 0x5445, 0x85D1, 0x5447, 0x85D2, 0x5449, 0x85D3, 0x544C,
+ 0x85D4, 0x544D, 0x85D5, 0x544E, 0x85D6, 0x544F, 0x85D7, 0x5451,
+ 0x85D8, 0x545A, 0x85D9, 0x545D, 0x85DA, 0x545E, 0x85DB, 0x545F,
+ 0x85DC, 0x5460, 0x85DD, 0x5461, 0x85DE, 0x5463, 0x85DF, 0x5465,
+ 0x85E0, 0x5467, 0x85E1, 0x5469, 0x85E2, 0x546A, 0x85E3, 0x546B,
+ 0x85E4, 0x546C, 0x85E5, 0x546D, 0x85E6, 0x546E, 0x85E7, 0x546F,
+ 0x85E8, 0x5470, 0x85E9, 0x5474, 0x85EA, 0x5479, 0x85EB, 0x547A,
+ 0x85EC, 0x547E, 0x85ED, 0x547F, 0x85EE, 0x5481, 0x85EF, 0x5483,
+ 0x85F0, 0x5485, 0x85F1, 0x5487, 0x85F2, 0x5488, 0x85F3, 0x5489,
+ 0x85F4, 0x548A, 0x85F5, 0x548D, 0x85F6, 0x5491, 0x85F7, 0x5493,
+ 0x85F8, 0x5497, 0x85F9, 0x5498, 0x85FA, 0x549C, 0x85FB, 0x549E,
+ 0x85FC, 0x549F, 0x85FD, 0x54A0, 0x85FE, 0x54A1, 0x8640, 0x54A2,
+ 0x8641, 0x54A5, 0x8642, 0x54AE, 0x8643, 0x54B0, 0x8644, 0x54B2,
+ 0x8645, 0x54B5, 0x8646, 0x54B6, 0x8647, 0x54B7, 0x8648, 0x54B9,
+ 0x8649, 0x54BA, 0x864A, 0x54BC, 0x864B, 0x54BE, 0x864C, 0x54C3,
+ 0x864D, 0x54C5, 0x864E, 0x54CA, 0x864F, 0x54CB, 0x8650, 0x54D6,
+ 0x8651, 0x54D8, 0x8652, 0x54DB, 0x8653, 0x54E0, 0x8654, 0x54E1,
+ 0x8655, 0x54E2, 0x8656, 0x54E3, 0x8657, 0x54E4, 0x8658, 0x54EB,
+ 0x8659, 0x54EC, 0x865A, 0x54EF, 0x865B, 0x54F0, 0x865C, 0x54F1,
+ 0x865D, 0x54F4, 0x865E, 0x54F5, 0x865F, 0x54F6, 0x8660, 0x54F7,
+ 0x8661, 0x54F8, 0x8662, 0x54F9, 0x8663, 0x54FB, 0x8664, 0x54FE,
+ 0x8665, 0x5500, 0x8666, 0x5502, 0x8667, 0x5503, 0x8668, 0x5504,
+ 0x8669, 0x5505, 0x866A, 0x5508, 0x866B, 0x550A, 0x866C, 0x550B,
+ 0x866D, 0x550C, 0x866E, 0x550D, 0x866F, 0x550E, 0x8670, 0x5512,
+ 0x8671, 0x5513, 0x8672, 0x5515, 0x8673, 0x5516, 0x8674, 0x5517,
+ 0x8675, 0x5518, 0x8676, 0x5519, 0x8677, 0x551A, 0x8678, 0x551C,
+ 0x8679, 0x551D, 0x867A, 0x551E, 0x867B, 0x551F, 0x867C, 0x5521,
+ 0x867D, 0x5525, 0x867E, 0x5526, 0x8680, 0x5528, 0x8681, 0x5529,
+ 0x8682, 0x552B, 0x8683, 0x552D, 0x8684, 0x5532, 0x8685, 0x5534,
+ 0x8686, 0x5535, 0x8687, 0x5536, 0x8688, 0x5538, 0x8689, 0x5539,
+ 0x868A, 0x553A, 0x868B, 0x553B, 0x868C, 0x553D, 0x868D, 0x5540,
+ 0x868E, 0x5542, 0x868F, 0x5545, 0x8690, 0x5547, 0x8691, 0x5548,
+ 0x8692, 0x554B, 0x8693, 0x554C, 0x8694, 0x554D, 0x8695, 0x554E,
+ 0x8696, 0x554F, 0x8697, 0x5551, 0x8698, 0x5552, 0x8699, 0x5553,
+ 0x869A, 0x5554, 0x869B, 0x5557, 0x869C, 0x5558, 0x869D, 0x5559,
+ 0x869E, 0x555A, 0x869F, 0x555B, 0x86A0, 0x555D, 0x86A1, 0x555E,
+ 0x86A2, 0x555F, 0x86A3, 0x5560, 0x86A4, 0x5562, 0x86A5, 0x5563,
+ 0x86A6, 0x5568, 0x86A7, 0x5569, 0x86A8, 0x556B, 0x86A9, 0x556F,
+ 0x86AA, 0x5570, 0x86AB, 0x5571, 0x86AC, 0x5572, 0x86AD, 0x5573,
+ 0x86AE, 0x5574, 0x86AF, 0x5579, 0x86B0, 0x557A, 0x86B1, 0x557D,
+ 0x86B2, 0x557F, 0x86B3, 0x5585, 0x86B4, 0x5586, 0x86B5, 0x558C,
+ 0x86B6, 0x558D, 0x86B7, 0x558E, 0x86B8, 0x5590, 0x86B9, 0x5592,
+ 0x86BA, 0x5593, 0x86BB, 0x5595, 0x86BC, 0x5596, 0x86BD, 0x5597,
+ 0x86BE, 0x559A, 0x86BF, 0x559B, 0x86C0, 0x559E, 0x86C1, 0x55A0,
+ 0x86C2, 0x55A1, 0x86C3, 0x55A2, 0x86C4, 0x55A3, 0x86C5, 0x55A4,
+ 0x86C6, 0x55A5, 0x86C7, 0x55A6, 0x86C8, 0x55A8, 0x86C9, 0x55A9,
+ 0x86CA, 0x55AA, 0x86CB, 0x55AB, 0x86CC, 0x55AC, 0x86CD, 0x55AD,
+ 0x86CE, 0x55AE, 0x86CF, 0x55AF, 0x86D0, 0x55B0, 0x86D1, 0x55B2,
+ 0x86D2, 0x55B4, 0x86D3, 0x55B6, 0x86D4, 0x55B8, 0x86D5, 0x55BA,
+ 0x86D6, 0x55BC, 0x86D7, 0x55BF, 0x86D8, 0x55C0, 0x86D9, 0x55C1,
+ 0x86DA, 0x55C2, 0x86DB, 0x55C3, 0x86DC, 0x55C6, 0x86DD, 0x55C7,
+ 0x86DE, 0x55C8, 0x86DF, 0x55CA, 0x86E0, 0x55CB, 0x86E1, 0x55CE,
+ 0x86E2, 0x55CF, 0x86E3, 0x55D0, 0x86E4, 0x55D5, 0x86E5, 0x55D7,
+ 0x86E6, 0x55D8, 0x86E7, 0x55D9, 0x86E8, 0x55DA, 0x86E9, 0x55DB,
+ 0x86EA, 0x55DE, 0x86EB, 0x55E0, 0x86EC, 0x55E2, 0x86ED, 0x55E7,
+ 0x86EE, 0x55E9, 0x86EF, 0x55ED, 0x86F0, 0x55EE, 0x86F1, 0x55F0,
+ 0x86F2, 0x55F1, 0x86F3, 0x55F4, 0x86F4, 0x55F6, 0x86F5, 0x55F8,
+ 0x86F6, 0x55F9, 0x86F7, 0x55FA, 0x86F8, 0x55FB, 0x86F9, 0x55FC,
+ 0x86FA, 0x55FF, 0x86FB, 0x5602, 0x86FC, 0x5603, 0x86FD, 0x5604,
+ 0x86FE, 0x5605, 0x8740, 0x5606, 0x8741, 0x5607, 0x8742, 0x560A,
+ 0x8743, 0x560B, 0x8744, 0x560D, 0x8745, 0x5610, 0x8746, 0x5611,
+ 0x8747, 0x5612, 0x8748, 0x5613, 0x8749, 0x5614, 0x874A, 0x5615,
+ 0x874B, 0x5616, 0x874C, 0x5617, 0x874D, 0x5619, 0x874E, 0x561A,
+ 0x874F, 0x561C, 0x8750, 0x561D, 0x8751, 0x5620, 0x8752, 0x5621,
+ 0x8753, 0x5622, 0x8754, 0x5625, 0x8755, 0x5626, 0x8756, 0x5628,
+ 0x8757, 0x5629, 0x8758, 0x562A, 0x8759, 0x562B, 0x875A, 0x562E,
+ 0x875B, 0x562F, 0x875C, 0x5630, 0x875D, 0x5633, 0x875E, 0x5635,
+ 0x875F, 0x5637, 0x8760, 0x5638, 0x8761, 0x563A, 0x8762, 0x563C,
+ 0x8763, 0x563D, 0x8764, 0x563E, 0x8765, 0x5640, 0x8766, 0x5641,
+ 0x8767, 0x5642, 0x8768, 0x5643, 0x8769, 0x5644, 0x876A, 0x5645,
+ 0x876B, 0x5646, 0x876C, 0x5647, 0x876D, 0x5648, 0x876E, 0x5649,
+ 0x876F, 0x564A, 0x8770, 0x564B, 0x8771, 0x564F, 0x8772, 0x5650,
+ 0x8773, 0x5651, 0x8774, 0x5652, 0x8775, 0x5653, 0x8776, 0x5655,
+ 0x8777, 0x5656, 0x8778, 0x565A, 0x8779, 0x565B, 0x877A, 0x565D,
+ 0x877B, 0x565E, 0x877C, 0x565F, 0x877D, 0x5660, 0x877E, 0x5661,
+ 0x8780, 0x5663, 0x8781, 0x5665, 0x8782, 0x5666, 0x8783, 0x5667,
+ 0x8784, 0x566D, 0x8785, 0x566E, 0x8786, 0x566F, 0x8787, 0x5670,
+ 0x8788, 0x5672, 0x8789, 0x5673, 0x878A, 0x5674, 0x878B, 0x5675,
+ 0x878C, 0x5677, 0x878D, 0x5678, 0x878E, 0x5679, 0x878F, 0x567A,
+ 0x8790, 0x567D, 0x8791, 0x567E, 0x8792, 0x567F, 0x8793, 0x5680,
+ 0x8794, 0x5681, 0x8795, 0x5682, 0x8796, 0x5683, 0x8797, 0x5684,
+ 0x8798, 0x5687, 0x8799, 0x5688, 0x879A, 0x5689, 0x879B, 0x568A,
+ 0x879C, 0x568B, 0x879D, 0x568C, 0x879E, 0x568D, 0x879F, 0x5690,
+ 0x87A0, 0x5691, 0x87A1, 0x5692, 0x87A2, 0x5694, 0x87A3, 0x5695,
+ 0x87A4, 0x5696, 0x87A5, 0x5697, 0x87A6, 0x5698, 0x87A7, 0x5699,
+ 0x87A8, 0x569A, 0x87A9, 0x569B, 0x87AA, 0x569C, 0x87AB, 0x569D,
+ 0x87AC, 0x569E, 0x87AD, 0x569F, 0x87AE, 0x56A0, 0x87AF, 0x56A1,
+ 0x87B0, 0x56A2, 0x87B1, 0x56A4, 0x87B2, 0x56A5, 0x87B3, 0x56A6,
+ 0x87B4, 0x56A7, 0x87B5, 0x56A8, 0x87B6, 0x56A9, 0x87B7, 0x56AA,
+ 0x87B8, 0x56AB, 0x87B9, 0x56AC, 0x87BA, 0x56AD, 0x87BB, 0x56AE,
+ 0x87BC, 0x56B0, 0x87BD, 0x56B1, 0x87BE, 0x56B2, 0x87BF, 0x56B3,
+ 0x87C0, 0x56B4, 0x87C1, 0x56B5, 0x87C2, 0x56B6, 0x87C3, 0x56B8,
+ 0x87C4, 0x56B9, 0x87C5, 0x56BA, 0x87C6, 0x56BB, 0x87C7, 0x56BD,
+ 0x87C8, 0x56BE, 0x87C9, 0x56BF, 0x87CA, 0x56C0, 0x87CB, 0x56C1,
+ 0x87CC, 0x56C2, 0x87CD, 0x56C3, 0x87CE, 0x56C4, 0x87CF, 0x56C5,
+ 0x87D0, 0x56C6, 0x87D1, 0x56C7, 0x87D2, 0x56C8, 0x87D3, 0x56C9,
+ 0x87D4, 0x56CB, 0x87D5, 0x56CC, 0x87D6, 0x56CD, 0x87D7, 0x56CE,
+ 0x87D8, 0x56CF, 0x87D9, 0x56D0, 0x87DA, 0x56D1, 0x87DB, 0x56D2,
+ 0x87DC, 0x56D3, 0x87DD, 0x56D5, 0x87DE, 0x56D6, 0x87DF, 0x56D8,
+ 0x87E0, 0x56D9, 0x87E1, 0x56DC, 0x87E2, 0x56E3, 0x87E3, 0x56E5,
+ 0x87E4, 0x56E6, 0x87E5, 0x56E7, 0x87E6, 0x56E8, 0x87E7, 0x56E9,
+ 0x87E8, 0x56EA, 0x87E9, 0x56EC, 0x87EA, 0x56EE, 0x87EB, 0x56EF,
+ 0x87EC, 0x56F2, 0x87ED, 0x56F3, 0x87EE, 0x56F6, 0x87EF, 0x56F7,
+ 0x87F0, 0x56F8, 0x87F1, 0x56FB, 0x87F2, 0x56FC, 0x87F3, 0x5700,
+ 0x87F4, 0x5701, 0x87F5, 0x5702, 0x87F6, 0x5705, 0x87F7, 0x5707,
+ 0x87F8, 0x570B, 0x87F9, 0x570C, 0x87FA, 0x570D, 0x87FB, 0x570E,
+ 0x87FC, 0x570F, 0x87FD, 0x5710, 0x87FE, 0x5711, 0x8840, 0x5712,
+ 0x8841, 0x5713, 0x8842, 0x5714, 0x8843, 0x5715, 0x8844, 0x5716,
+ 0x8845, 0x5717, 0x8846, 0x5718, 0x8847, 0x5719, 0x8848, 0x571A,
+ 0x8849, 0x571B, 0x884A, 0x571D, 0x884B, 0x571E, 0x884C, 0x5720,
+ 0x884D, 0x5721, 0x884E, 0x5722, 0x884F, 0x5724, 0x8850, 0x5725,
+ 0x8851, 0x5726, 0x8852, 0x5727, 0x8853, 0x572B, 0x8854, 0x5731,
+ 0x8855, 0x5732, 0x8856, 0x5734, 0x8857, 0x5735, 0x8858, 0x5736,
+ 0x8859, 0x5737, 0x885A, 0x5738, 0x885B, 0x573C, 0x885C, 0x573D,
+ 0x885D, 0x573F, 0x885E, 0x5741, 0x885F, 0x5743, 0x8860, 0x5744,
+ 0x8861, 0x5745, 0x8862, 0x5746, 0x8863, 0x5748, 0x8864, 0x5749,
+ 0x8865, 0x574B, 0x8866, 0x5752, 0x8867, 0x5753, 0x8868, 0x5754,
+ 0x8869, 0x5755, 0x886A, 0x5756, 0x886B, 0x5758, 0x886C, 0x5759,
+ 0x886D, 0x5762, 0x886E, 0x5763, 0x886F, 0x5765, 0x8870, 0x5767,
+ 0x8871, 0x576C, 0x8872, 0x576E, 0x8873, 0x5770, 0x8874, 0x5771,
+ 0x8875, 0x5772, 0x8876, 0x5774, 0x8877, 0x5775, 0x8878, 0x5778,
+ 0x8879, 0x5779, 0x887A, 0x577A, 0x887B, 0x577D, 0x887C, 0x577E,
+ 0x887D, 0x577F, 0x887E, 0x5780, 0x8880, 0x5781, 0x8881, 0x5787,
+ 0x8882, 0x5788, 0x8883, 0x5789, 0x8884, 0x578A, 0x8885, 0x578D,
+ 0x8886, 0x578E, 0x8887, 0x578F, 0x8888, 0x5790, 0x8889, 0x5791,
+ 0x888A, 0x5794, 0x888B, 0x5795, 0x888C, 0x5796, 0x888D, 0x5797,
+ 0x888E, 0x5798, 0x888F, 0x5799, 0x8890, 0x579A, 0x8891, 0x579C,
+ 0x8892, 0x579D, 0x8893, 0x579E, 0x8894, 0x579F, 0x8895, 0x57A5,
+ 0x8896, 0x57A8, 0x8897, 0x57AA, 0x8898, 0x57AC, 0x8899, 0x57AF,
+ 0x889A, 0x57B0, 0x889B, 0x57B1, 0x889C, 0x57B3, 0x889D, 0x57B5,
+ 0x889E, 0x57B6, 0x889F, 0x57B7, 0x88A0, 0x57B9, 0x88A1, 0x57BA,
+ 0x88A2, 0x57BB, 0x88A3, 0x57BC, 0x88A4, 0x57BD, 0x88A5, 0x57BE,
+ 0x88A6, 0x57BF, 0x88A7, 0x57C0, 0x88A8, 0x57C1, 0x88A9, 0x57C4,
+ 0x88AA, 0x57C5, 0x88AB, 0x57C6, 0x88AC, 0x57C7, 0x88AD, 0x57C8,
+ 0x88AE, 0x57C9, 0x88AF, 0x57CA, 0x88B0, 0x57CC, 0x88B1, 0x57CD,
+ 0x88B2, 0x57D0, 0x88B3, 0x57D1, 0x88B4, 0x57D3, 0x88B5, 0x57D6,
+ 0x88B6, 0x57D7, 0x88B7, 0x57DB, 0x88B8, 0x57DC, 0x88B9, 0x57DE,
+ 0x88BA, 0x57E1, 0x88BB, 0x57E2, 0x88BC, 0x57E3, 0x88BD, 0x57E5,
+ 0x88BE, 0x57E6, 0x88BF, 0x57E7, 0x88C0, 0x57E8, 0x88C1, 0x57E9,
+ 0x88C2, 0x57EA, 0x88C3, 0x57EB, 0x88C4, 0x57EC, 0x88C5, 0x57EE,
+ 0x88C6, 0x57F0, 0x88C7, 0x57F1, 0x88C8, 0x57F2, 0x88C9, 0x57F3,
+ 0x88CA, 0x57F5, 0x88CB, 0x57F6, 0x88CC, 0x57F7, 0x88CD, 0x57FB,
+ 0x88CE, 0x57FC, 0x88CF, 0x57FE, 0x88D0, 0x57FF, 0x88D1, 0x5801,
+ 0x88D2, 0x5803, 0x88D3, 0x5804, 0x88D4, 0x5805, 0x88D5, 0x5808,
+ 0x88D6, 0x5809, 0x88D7, 0x580A, 0x88D8, 0x580C, 0x88D9, 0x580E,
+ 0x88DA, 0x580F, 0x88DB, 0x5810, 0x88DC, 0x5812, 0x88DD, 0x5813,
+ 0x88DE, 0x5814, 0x88DF, 0x5816, 0x88E0, 0x5817, 0x88E1, 0x5818,
+ 0x88E2, 0x581A, 0x88E3, 0x581B, 0x88E4, 0x581C, 0x88E5, 0x581D,
+ 0x88E6, 0x581F, 0x88E7, 0x5822, 0x88E8, 0x5823, 0x88E9, 0x5825,
+ 0x88EA, 0x5826, 0x88EB, 0x5827, 0x88EC, 0x5828, 0x88ED, 0x5829,
+ 0x88EE, 0x582B, 0x88EF, 0x582C, 0x88F0, 0x582D, 0x88F1, 0x582E,
+ 0x88F2, 0x582F, 0x88F3, 0x5831, 0x88F4, 0x5832, 0x88F5, 0x5833,
+ 0x88F6, 0x5834, 0x88F7, 0x5836, 0x88F8, 0x5837, 0x88F9, 0x5838,
+ 0x88FA, 0x5839, 0x88FB, 0x583A, 0x88FC, 0x583B, 0x88FD, 0x583C,
+ 0x88FE, 0x583D, 0x8940, 0x583E, 0x8941, 0x583F, 0x8942, 0x5840,
+ 0x8943, 0x5841, 0x8944, 0x5842, 0x8945, 0x5843, 0x8946, 0x5845,
+ 0x8947, 0x5846, 0x8948, 0x5847, 0x8949, 0x5848, 0x894A, 0x5849,
+ 0x894B, 0x584A, 0x894C, 0x584B, 0x894D, 0x584E, 0x894E, 0x584F,
+ 0x894F, 0x5850, 0x8950, 0x5852, 0x8951, 0x5853, 0x8952, 0x5855,
+ 0x8953, 0x5856, 0x8954, 0x5857, 0x8955, 0x5859, 0x8956, 0x585A,
+ 0x8957, 0x585B, 0x8958, 0x585C, 0x8959, 0x585D, 0x895A, 0x585F,
+ 0x895B, 0x5860, 0x895C, 0x5861, 0x895D, 0x5862, 0x895E, 0x5863,
+ 0x895F, 0x5864, 0x8960, 0x5866, 0x8961, 0x5867, 0x8962, 0x5868,
+ 0x8963, 0x5869, 0x8964, 0x586A, 0x8965, 0x586D, 0x8966, 0x586E,
+ 0x8967, 0x586F, 0x8968, 0x5870, 0x8969, 0x5871, 0x896A, 0x5872,
+ 0x896B, 0x5873, 0x896C, 0x5874, 0x896D, 0x5875, 0x896E, 0x5876,
+ 0x896F, 0x5877, 0x8970, 0x5878, 0x8971, 0x5879, 0x8972, 0x587A,
+ 0x8973, 0x587B, 0x8974, 0x587C, 0x8975, 0x587D, 0x8976, 0x587F,
+ 0x8977, 0x5882, 0x8978, 0x5884, 0x8979, 0x5886, 0x897A, 0x5887,
+ 0x897B, 0x5888, 0x897C, 0x588A, 0x897D, 0x588B, 0x897E, 0x588C,
+ 0x8980, 0x588D, 0x8981, 0x588E, 0x8982, 0x588F, 0x8983, 0x5890,
+ 0x8984, 0x5891, 0x8985, 0x5894, 0x8986, 0x5895, 0x8987, 0x5896,
+ 0x8988, 0x5897, 0x8989, 0x5898, 0x898A, 0x589B, 0x898B, 0x589C,
+ 0x898C, 0x589D, 0x898D, 0x58A0, 0x898E, 0x58A1, 0x898F, 0x58A2,
+ 0x8990, 0x58A3, 0x8991, 0x58A4, 0x8992, 0x58A5, 0x8993, 0x58A6,
+ 0x8994, 0x58A7, 0x8995, 0x58AA, 0x8996, 0x58AB, 0x8997, 0x58AC,
+ 0x8998, 0x58AD, 0x8999, 0x58AE, 0x899A, 0x58AF, 0x899B, 0x58B0,
+ 0x899C, 0x58B1, 0x899D, 0x58B2, 0x899E, 0x58B3, 0x899F, 0x58B4,
+ 0x89A0, 0x58B5, 0x89A1, 0x58B6, 0x89A2, 0x58B7, 0x89A3, 0x58B8,
+ 0x89A4, 0x58B9, 0x89A5, 0x58BA, 0x89A6, 0x58BB, 0x89A7, 0x58BD,
+ 0x89A8, 0x58BE, 0x89A9, 0x58BF, 0x89AA, 0x58C0, 0x89AB, 0x58C2,
+ 0x89AC, 0x58C3, 0x89AD, 0x58C4, 0x89AE, 0x58C6, 0x89AF, 0x58C7,
+ 0x89B0, 0x58C8, 0x89B1, 0x58C9, 0x89B2, 0x58CA, 0x89B3, 0x58CB,
+ 0x89B4, 0x58CC, 0x89B5, 0x58CD, 0x89B6, 0x58CE, 0x89B7, 0x58CF,
+ 0x89B8, 0x58D0, 0x89B9, 0x58D2, 0x89BA, 0x58D3, 0x89BB, 0x58D4,
+ 0x89BC, 0x58D6, 0x89BD, 0x58D7, 0x89BE, 0x58D8, 0x89BF, 0x58D9,
+ 0x89C0, 0x58DA, 0x89C1, 0x58DB, 0x89C2, 0x58DC, 0x89C3, 0x58DD,
+ 0x89C4, 0x58DE, 0x89C5, 0x58DF, 0x89C6, 0x58E0, 0x89C7, 0x58E1,
+ 0x89C8, 0x58E2, 0x89C9, 0x58E3, 0x89CA, 0x58E5, 0x89CB, 0x58E6,
+ 0x89CC, 0x58E7, 0x89CD, 0x58E8, 0x89CE, 0x58E9, 0x89CF, 0x58EA,
+ 0x89D0, 0x58ED, 0x89D1, 0x58EF, 0x89D2, 0x58F1, 0x89D3, 0x58F2,
+ 0x89D4, 0x58F4, 0x89D5, 0x58F5, 0x89D6, 0x58F7, 0x89D7, 0x58F8,
+ 0x89D8, 0x58FA, 0x89D9, 0x58FB, 0x89DA, 0x58FC, 0x89DB, 0x58FD,
+ 0x89DC, 0x58FE, 0x89DD, 0x58FF, 0x89DE, 0x5900, 0x89DF, 0x5901,
+ 0x89E0, 0x5903, 0x89E1, 0x5905, 0x89E2, 0x5906, 0x89E3, 0x5908,
+ 0x89E4, 0x5909, 0x89E5, 0x590A, 0x89E6, 0x590B, 0x89E7, 0x590C,
+ 0x89E8, 0x590E, 0x89E9, 0x5910, 0x89EA, 0x5911, 0x89EB, 0x5912,
+ 0x89EC, 0x5913, 0x89ED, 0x5917, 0x89EE, 0x5918, 0x89EF, 0x591B,
+ 0x89F0, 0x591D, 0x89F1, 0x591E, 0x89F2, 0x5920, 0x89F3, 0x5921,
+ 0x89F4, 0x5922, 0x89F5, 0x5923, 0x89F6, 0x5926, 0x89F7, 0x5928,
+ 0x89F8, 0x592C, 0x89F9, 0x5930, 0x89FA, 0x5932, 0x89FB, 0x5933,
+ 0x89FC, 0x5935, 0x89FD, 0x5936, 0x89FE, 0x593B, 0x8A40, 0x593D,
+ 0x8A41, 0x593E, 0x8A42, 0x593F, 0x8A43, 0x5940, 0x8A44, 0x5943,
+ 0x8A45, 0x5945, 0x8A46, 0x5946, 0x8A47, 0x594A, 0x8A48, 0x594C,
+ 0x8A49, 0x594D, 0x8A4A, 0x5950, 0x8A4B, 0x5952, 0x8A4C, 0x5953,
+ 0x8A4D, 0x5959, 0x8A4E, 0x595B, 0x8A4F, 0x595C, 0x8A50, 0x595D,
+ 0x8A51, 0x595E, 0x8A52, 0x595F, 0x8A53, 0x5961, 0x8A54, 0x5963,
+ 0x8A55, 0x5964, 0x8A56, 0x5966, 0x8A57, 0x5967, 0x8A58, 0x5968,
+ 0x8A59, 0x5969, 0x8A5A, 0x596A, 0x8A5B, 0x596B, 0x8A5C, 0x596C,
+ 0x8A5D, 0x596D, 0x8A5E, 0x596E, 0x8A5F, 0x596F, 0x8A60, 0x5970,
+ 0x8A61, 0x5971, 0x8A62, 0x5972, 0x8A63, 0x5975, 0x8A64, 0x5977,
+ 0x8A65, 0x597A, 0x8A66, 0x597B, 0x8A67, 0x597C, 0x8A68, 0x597E,
+ 0x8A69, 0x597F, 0x8A6A, 0x5980, 0x8A6B, 0x5985, 0x8A6C, 0x5989,
+ 0x8A6D, 0x598B, 0x8A6E, 0x598C, 0x8A6F, 0x598E, 0x8A70, 0x598F,
+ 0x8A71, 0x5990, 0x8A72, 0x5991, 0x8A73, 0x5994, 0x8A74, 0x5995,
+ 0x8A75, 0x5998, 0x8A76, 0x599A, 0x8A77, 0x599B, 0x8A78, 0x599C,
+ 0x8A79, 0x599D, 0x8A7A, 0x599F, 0x8A7B, 0x59A0, 0x8A7C, 0x59A1,
+ 0x8A7D, 0x59A2, 0x8A7E, 0x59A6, 0x8A80, 0x59A7, 0x8A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, 0x6022,
+ 0x904D, 0x6023, 0x904E, 0x6024, 0x904F, 0x602C, 0x9050, 0x602D,
+ 0x9051, 0x602E, 0x9052, 0x6030, 0x9053, 0x6031, 0x9054, 0x6032,
+ 0x9055, 0x6033, 0x9056, 0x6034, 0x9057, 0x6036, 0x9058, 0x6037,
+ 0x9059, 0x6038, 0x905A, 0x6039, 0x905B, 0x603A, 0x905C, 0x603D,
+ 0x905D, 0x603E, 0x905E, 0x6040, 0x905F, 0x6044, 0x9060, 0x6045,
+ 0x9061, 0x6046, 0x9062, 0x6047, 0x9063, 0x6048, 0x9064, 0x6049,
+ 0x9065, 0x604A, 0x9066, 0x604C, 0x9067, 0x604E, 0x9068, 0x604F,
+ 0x9069, 0x6051, 0x906A, 0x6053, 0x906B, 0x6054, 0x906C, 0x6056,
+ 0x906D, 0x6057, 0x906E, 0x6058, 0x906F, 0x605B, 0x9070, 0x605C,
+ 0x9071, 0x605E, 0x9072, 0x605F, 0x9073, 0x6060, 0x9074, 0x6061,
+ 0x9075, 0x6065, 0x9076, 0x6066, 0x9077, 0x606E, 0x9078, 0x6071,
+ 0x9079, 0x6072, 0x907A, 0x6074, 0x907B, 0x6075, 0x907C, 0x6077,
+ 0x907D, 0x607E, 0x907E, 0x6080, 0x9080, 0x6081, 0x9081, 0x6082,
+ 0x9082, 0x6085, 0x9083, 0x6086, 0x9084, 0x6087, 0x9085, 0x6088,
+ 0x9086, 0x608A, 0x9087, 0x608B, 0x9088, 0x608E, 0x9089, 0x608F,
+ 0x908A, 0x6090, 0x908B, 0x6091, 0x908C, 0x6093, 0x908D, 0x6095,
+ 0x908E, 0x6097, 0x908F, 0x6098, 0x9090, 0x6099, 0x9091, 0x609C,
+ 0x9092, 0x609E, 0x9093, 0x60A1, 0x9094, 0x60A2, 0x9095, 0x60A4,
+ 0x9096, 0x60A5, 0x9097, 0x60A7, 0x9098, 0x60A9, 0x9099, 0x60AA,
+ 0x909A, 0x60AE, 0x909B, 0x60B0, 0x909C, 0x60B3, 0x909D, 0x60B5,
+ 0x909E, 0x60B6, 0x909F, 0x60B7, 0x90A0, 0x60B9, 0x90A1, 0x60BA,
+ 0x90A2, 0x60BD, 0x90A3, 0x60BE, 0x90A4, 0x60BF, 0x90A5, 0x60C0,
+ 0x90A6, 0x60C1, 0x90A7, 0x60C2, 0x90A8, 0x60C3, 0x90A9, 0x60C4,
+ 0x90AA, 0x60C7, 0x90AB, 0x60C8, 0x90AC, 0x60C9, 0x90AD, 0x60CC,
+ 0x90AE, 0x60CD, 0x90AF, 0x60CE, 0x90B0, 0x60CF, 0x90B1, 0x60D0,
+ 0x90B2, 0x60D2, 0x90B3, 0x60D3, 0x90B4, 0x60D4, 0x90B5, 0x60D6,
+ 0x90B6, 0x60D7, 0x90B7, 0x60D9, 0x90B8, 0x60DB, 0x90B9, 0x60DE,
+ 0x90BA, 0x60E1, 0x90BB, 0x60E2, 0x90BC, 0x60E3, 0x90BD, 0x60E4,
+ 0x90BE, 0x60E5, 0x90BF, 0x60EA, 0x90C0, 0x60F1, 0x90C1, 0x60F2,
+ 0x90C2, 0x60F5, 0x90C3, 0x60F7, 0x90C4, 0x60F8, 0x90C5, 0x60FB,
+ 0x90C6, 0x60FC, 0x90C7, 0x60FD, 0x90C8, 0x60FE, 0x90C9, 0x60FF,
+ 0x90CA, 0x6102, 0x90CB, 0x6103, 0x90CC, 0x6104, 0x90CD, 0x6105,
+ 0x90CE, 0x6107, 0x90CF, 0x610A, 0x90D0, 0x610B, 0x90D1, 0x610C,
+ 0x90D2, 0x6110, 0x90D3, 0x6111, 0x90D4, 0x6112, 0x90D5, 0x6113,
+ 0x90D6, 0x6114, 0x90D7, 0x6116, 0x90D8, 0x6117, 0x90D9, 0x6118,
+ 0x90DA, 0x6119, 0x90DB, 0x611B, 0x90DC, 0x611C, 0x90DD, 0x611D,
+ 0x90DE, 0x611E, 0x90DF, 0x6121, 0x90E0, 0x6122, 0x90E1, 0x6125,
+ 0x90E2, 0x6128, 0x90E3, 0x6129, 0x90E4, 0x612A, 0x90E5, 0x612C,
+ 0x90E6, 0x612D, 0x90E7, 0x612E, 0x90E8, 0x612F, 0x90E9, 0x6130,
+ 0x90EA, 0x6131, 0x90EB, 0x6132, 0x90EC, 0x6133, 0x90ED, 0x6134,
+ 0x90EE, 0x6135, 0x90EF, 0x6136, 0x90F0, 0x6137, 0x90F1, 0x6138,
+ 0x90F2, 0x6139, 0x90F3, 0x613A, 0x90F4, 0x613B, 0x90F5, 0x613C,
+ 0x90F6, 0x613D, 0x90F7, 0x613E, 0x90F8, 0x6140, 0x90F9, 0x6141,
+ 0x90FA, 0x6142, 0x90FB, 0x6143, 0x90FC, 0x6144, 0x90FD, 0x6145,
+ 0x90FE, 0x6146, 0x9140, 0x6147, 0x9141, 0x6149, 0x9142, 0x614B,
+ 0x9143, 0x614D, 0x9144, 0x614F, 0x9145, 0x6150, 0x9146, 0x6152,
+ 0x9147, 0x6153, 0x9148, 0x6154, 0x9149, 0x6156, 0x914A, 0x6157,
+ 0x914B, 0x6158, 0x914C, 0x6159, 0x914D, 0x615A, 0x914E, 0x615B,
+ 0x914F, 0x615C, 0x9150, 0x615E, 0x9151, 0x615F, 0x9152, 0x6160,
+ 0x9153, 0x6161, 0x9154, 0x6163, 0x9155, 0x6164, 0x9156, 0x6165,
+ 0x9157, 0x6166, 0x9158, 0x6169, 0x9159, 0x616A, 0x915A, 0x616B,
+ 0x915B, 0x616C, 0x915C, 0x616D, 0x915D, 0x616E, 0x915E, 0x616F,
+ 0x915F, 0x6171, 0x9160, 0x6172, 0x9161, 0x6173, 0x9162, 0x6174,
+ 0x9163, 0x6176, 0x9164, 0x6178, 0x9165, 0x6179, 0x9166, 0x617A,
+ 0x9167, 0x617B, 0x9168, 0x617C, 0x9169, 0x617D, 0x916A, 0x617E,
+ 0x916B, 0x617F, 0x916C, 0x6180, 0x916D, 0x6181, 0x916E, 0x6182,
+ 0x916F, 0x6183, 0x9170, 0x6184, 0x9171, 0x6185, 0x9172, 0x6186,
+ 0x9173, 0x6187, 0x9174, 0x6188, 0x9175, 0x6189, 0x9176, 0x618A,
+ 0x9177, 0x618C, 0x9178, 0x618D, 0x9179, 0x618F, 0x917A, 0x6190,
+ 0x917B, 0x6191, 0x917C, 0x6192, 0x917D, 0x6193, 0x917E, 0x6195,
+ 0x9180, 0x6196, 0x9181, 0x6197, 0x9182, 0x6198, 0x9183, 0x6199,
+ 0x9184, 0x619A, 0x9185, 0x619B, 0x9186, 0x619C, 0x9187, 0x619E,
+ 0x9188, 0x619F, 0x9189, 0x61A0, 0x918A, 0x61A1, 0x918B, 0x61A2,
+ 0x918C, 0x61A3, 0x918D, 0x61A4, 0x918E, 0x61A5, 0x918F, 0x61A6,
+ 0x9190, 0x61AA, 0x9191, 0x61AB, 0x9192, 0x61AD, 0x9193, 0x61AE,
+ 0x9194, 0x61AF, 0x9195, 0x61B0, 0x9196, 0x61B1, 0x9197, 0x61B2,
+ 0x9198, 0x61B3, 0x9199, 0x61B4, 0x919A, 0x61B5, 0x919B, 0x61B6,
+ 0x919C, 0x61B8, 0x919D, 0x61B9, 0x919E, 0x61BA, 0x919F, 0x61BB,
+ 0x91A0, 0x61BC, 0x91A1, 0x61BD, 0x91A2, 0x61BF, 0x91A3, 0x61C0,
+ 0x91A4, 0x61C1, 0x91A5, 0x61C3, 0x91A6, 0x61C4, 0x91A7, 0x61C5,
+ 0x91A8, 0x61C6, 0x91A9, 0x61C7, 0x91AA, 0x61C9, 0x91AB, 0x61CC,
+ 0x91AC, 0x61CD, 0x91AD, 0x61CE, 0x91AE, 0x61CF, 0x91AF, 0x61D0,
+ 0x91B0, 0x61D3, 0x91B1, 0x61D5, 0x91B2, 0x61D6, 0x91B3, 0x61D7,
+ 0x91B4, 0x61D8, 0x91B5, 0x61D9, 0x91B6, 0x61DA, 0x91B7, 0x61DB,
+ 0x91B8, 0x61DC, 0x91B9, 0x61DD, 0x91BA, 0x61DE, 0x91BB, 0x61DF,
+ 0x91BC, 0x61E0, 0x91BD, 0x61E1, 0x91BE, 0x61E2, 0x91BF, 0x61E3,
+ 0x91C0, 0x61E4, 0x91C1, 0x61E5, 0x91C2, 0x61E7, 0x91C3, 0x61E8,
+ 0x91C4, 0x61E9, 0x91C5, 0x61EA, 0x91C6, 0x61EB, 0x91C7, 0x61EC,
+ 0x91C8, 0x61ED, 0x91C9, 0x61EE, 0x91CA, 0x61EF, 0x91CB, 0x61F0,
+ 0x91CC, 0x61F1, 0x91CD, 0x61F2, 0x91CE, 0x61F3, 0x91CF, 0x61F4,
+ 0x91D0, 0x61F6, 0x91D1, 0x61F7, 0x91D2, 0x61F8, 0x91D3, 0x61F9,
+ 0x91D4, 0x61FA, 0x91D5, 0x61FB, 0x91D6, 0x61FC, 0x91D7, 0x61FD,
+ 0x91D8, 0x61FE, 0x91D9, 0x6200, 0x91DA, 0x6201, 0x91DB, 0x6202,
+ 0x91DC, 0x6203, 0x91DD, 0x6204, 0x91DE, 0x6205, 0x91DF, 0x6207,
+ 0x91E0, 0x6209, 0x91E1, 0x6213, 0x91E2, 0x6214, 0x91E3, 0x6219,
+ 0x91E4, 0x621C, 0x91E5, 0x621D, 0x91E6, 0x621E, 0x91E7, 0x6220,
+ 0x91E8, 0x6223, 0x91E9, 0x6226, 0x91EA, 0x6227, 0x91EB, 0x6228,
+ 0x91EC, 0x6229, 0x91ED, 0x622B, 0x91EE, 0x622D, 0x91EF, 0x622F,
+ 0x91F0, 0x6230, 0x91F1, 0x6231, 0x91F2, 0x6232, 0x91F3, 0x6235,
+ 0x91F4, 0x6236, 0x91F5, 0x6238, 0x91F6, 0x6239, 0x91F7, 0x623A,
+ 0x91F8, 0x623B, 0x91F9, 0x623C, 0x91FA, 0x6242, 0x91FB, 0x6244,
+ 0x91FC, 0x6245, 0x91FD, 0x6246, 0x91FE, 0x624A, 0x9240, 0x624F,
+ 0x9241, 0x6250, 0x9242, 0x6255, 0x9243, 0x6256, 0x9244, 0x6257,
+ 0x9245, 0x6259, 0x9246, 0x625A, 0x9247, 0x625C, 0x9248, 0x625D,
+ 0x9249, 0x625E, 0x924A, 0x625F, 0x924B, 0x6260, 0x924C, 0x6261,
+ 0x924D, 0x6262, 0x924E, 0x6264, 0x924F, 0x6265, 0x9250, 0x6268,
+ 0x9251, 0x6271, 0x9252, 0x6272, 0x9253, 0x6274, 0x9254, 0x6275,
+ 0x9255, 0x6277, 0x9256, 0x6278, 0x9257, 0x627A, 0x9258, 0x627B,
+ 0x9259, 0x627D, 0x925A, 0x6281, 0x925B, 0x6282, 0x925C, 0x6283,
+ 0x925D, 0x6285, 0x925E, 0x6286, 0x925F, 0x6287, 0x9260, 0x6288,
+ 0x9261, 0x628B, 0x9262, 0x628C, 0x9263, 0x628D, 0x9264, 0x628E,
+ 0x9265, 0x628F, 0x9266, 0x6290, 0x9267, 0x6294, 0x9268, 0x6299,
+ 0x9269, 0x629C, 0x926A, 0x629D, 0x926B, 0x629E, 0x926C, 0x62A3,
+ 0x926D, 0x62A6, 0x926E, 0x62A7, 0x926F, 0x62A9, 0x9270, 0x62AA,
+ 0x9271, 0x62AD, 0x9272, 0x62AE, 0x9273, 0x62AF, 0x9274, 0x62B0,
+ 0x9275, 0x62B2, 0x9276, 0x62B3, 0x9277, 0x62B4, 0x9278, 0x62B6,
+ 0x9279, 0x62B7, 0x927A, 0x62B8, 0x927B, 0x62BA, 0x927C, 0x62BE,
+ 0x927D, 0x62C0, 0x927E, 0x62C1, 0x9280, 0x62C3, 0x9281, 0x62CB,
+ 0x9282, 0x62CF, 0x9283, 0x62D1, 0x9284, 0x62D5, 0x9285, 0x62DD,
+ 0x9286, 0x62DE, 0x9287, 0x62E0, 0x9288, 0x62E1, 0x9289, 0x62E4,
+ 0x928A, 0x62EA, 0x928B, 0x62EB, 0x928C, 0x62F0, 0x928D, 0x62F2,
+ 0x928E, 0x62F5, 0x928F, 0x62F8, 0x9290, 0x62F9, 0x9291, 0x62FA,
+ 0x9292, 0x62FB, 0x9293, 0x6300, 0x9294, 0x6303, 0x9295, 0x6304,
+ 0x9296, 0x6305, 0x9297, 0x6306, 0x9298, 0x630A, 0x9299, 0x630B,
+ 0x929A, 0x630C, 0x929B, 0x630D, 0x929C, 0x630F, 0x929D, 0x6310,
+ 0x929E, 0x6312, 0x929F, 0x6313, 0x92A0, 0x6314, 0x92A1, 0x6315,
+ 0x92A2, 0x6317, 0x92A3, 0x6318, 0x92A4, 0x6319, 0x92A5, 0x631C,
+ 0x92A6, 0x6326, 0x92A7, 0x6327, 0x92A8, 0x6329, 0x92A9, 0x632C,
+ 0x92AA, 0x632D, 0x92AB, 0x632E, 0x92AC, 0x6330, 0x92AD, 0x6331,
+ 0x92AE, 0x6333, 0x92AF, 0x6334, 0x92B0, 0x6335, 0x92B1, 0x6336,
+ 0x92B2, 0x6337, 0x92B3, 0x6338, 0x92B4, 0x633B, 0x92B5, 0x633C,
+ 0x92B6, 0x633E, 0x92B7, 0x633F, 0x92B8, 0x6340, 0x92B9, 0x6341,
+ 0x92BA, 0x6344, 0x92BB, 0x6347, 0x92BC, 0x6348, 0x92BD, 0x634A,
+ 0x92BE, 0x6351, 0x92BF, 0x6352, 0x92C0, 0x6353, 0x92C1, 0x6354,
+ 0x92C2, 0x6356, 0x92C3, 0x6357, 0x92C4, 0x6358, 0x92C5, 0x6359,
+ 0x92C6, 0x635A, 0x92C7, 0x635B, 0x92C8, 0x635C, 0x92C9, 0x635D,
+ 0x92CA, 0x6360, 0x92CB, 0x6364, 0x92CC, 0x6365, 0x92CD, 0x6366,
+ 0x92CE, 0x6368, 0x92CF, 0x636A, 0x92D0, 0x636B, 0x92D1, 0x636C,
+ 0x92D2, 0x636F, 0x92D3, 0x6370, 0x92D4, 0x6372, 0x92D5, 0x6373,
+ 0x92D6, 0x6374, 0x92D7, 0x6375, 0x92D8, 0x6378, 0x92D9, 0x6379,
+ 0x92DA, 0x637C, 0x92DB, 0x637D, 0x92DC, 0x637E, 0x92DD, 0x637F,
+ 0x92DE, 0x6381, 0x92DF, 0x6383, 0x92E0, 0x6384, 0x92E1, 0x6385,
+ 0x92E2, 0x6386, 0x92E3, 0x638B, 0x92E4, 0x638D, 0x92E5, 0x6391,
+ 0x92E6, 0x6393, 0x92E7, 0x6394, 0x92E8, 0x6395, 0x92E9, 0x6397,
+ 0x92EA, 0x6399, 0x92EB, 0x639A, 0x92EC, 0x639B, 0x92ED, 0x639C,
+ 0x92EE, 0x639D, 0x92EF, 0x639E, 0x92F0, 0x639F, 0x92F1, 0x63A1,
+ 0x92F2, 0x63A4, 0x92F3, 0x63A6, 0x92F4, 0x63AB, 0x92F5, 0x63AF,
+ 0x92F6, 0x63B1, 0x92F7, 0x63B2, 0x92F8, 0x63B5, 0x92F9, 0x63B6,
+ 0x92FA, 0x63B9, 0x92FB, 0x63BB, 0x92FC, 0x63BD, 0x92FD, 0x63BF,
+ 0x92FE, 0x63C0, 0x9340, 0x63C1, 0x9341, 0x63C2, 0x9342, 0x63C3,
+ 0x9343, 0x63C5, 0x9344, 0x63C7, 0x9345, 0x63C8, 0x9346, 0x63CA,
+ 0x9347, 0x63CB, 0x9348, 0x63CC, 0x9349, 0x63D1, 0x934A, 0x63D3,
+ 0x934B, 0x63D4, 0x934C, 0x63D5, 0x934D, 0x63D7, 0x934E, 0x63D8,
+ 0x934F, 0x63D9, 0x9350, 0x63DA, 0x9351, 0x63DB, 0x9352, 0x63DC,
+ 0x9353, 0x63DD, 0x9354, 0x63DF, 0x9355, 0x63E2, 0x9356, 0x63E4,
+ 0x9357, 0x63E5, 0x9358, 0x63E6, 0x9359, 0x63E7, 0x935A, 0x63E8,
+ 0x935B, 0x63EB, 0x935C, 0x63EC, 0x935D, 0x63EE, 0x935E, 0x63EF,
+ 0x935F, 0x63F0, 0x9360, 0x63F1, 0x9361, 0x63F3, 0x9362, 0x63F5,
+ 0x9363, 0x63F7, 0x9364, 0x63F9, 0x9365, 0x63FA, 0x9366, 0x63FB,
+ 0x9367, 0x63FC, 0x9368, 0x63FE, 0x9369, 0x6403, 0x936A, 0x6404,
+ 0x936B, 0x6406, 0x936C, 0x6407, 0x936D, 0x6408, 0x936E, 0x6409,
+ 0x936F, 0x640A, 0x9370, 0x640D, 0x9371, 0x640E, 0x9372, 0x6411,
+ 0x9373, 0x6412, 0x9374, 0x6415, 0x9375, 0x6416, 0x9376, 0x6417,
+ 0x9377, 0x6418, 0x9378, 0x6419, 0x9379, 0x641A, 0x937A, 0x641D,
+ 0x937B, 0x641F, 0x937C, 0x6422, 0x937D, 0x6423, 0x937E, 0x6424,
+ 0x9380, 0x6425, 0x9381, 0x6427, 0x9382, 0x6428, 0x9383, 0x6429,
+ 0x9384, 0x642B, 0x9385, 0x642E, 0x9386, 0x642F, 0x9387, 0x6430,
+ 0x9388, 0x6431, 0x9389, 0x6432, 0x938A, 0x6433, 0x938B, 0x6435,
+ 0x938C, 0x6436, 0x938D, 0x6437, 0x938E, 0x6438, 0x938F, 0x6439,
+ 0x9390, 0x643B, 0x9391, 0x643C, 0x9392, 0x643E, 0x9393, 0x6440,
+ 0x9394, 0x6442, 0x9395, 0x6443, 0x9396, 0x6449, 0x9397, 0x644B,
+ 0x9398, 0x644C, 0x9399, 0x644D, 0x939A, 0x644E, 0x939B, 0x644F,
+ 0x939C, 0x6450, 0x939D, 0x6451, 0x939E, 0x6453, 0x939F, 0x6455,
+ 0x93A0, 0x6456, 0x93A1, 0x6457, 0x93A2, 0x6459, 0x93A3, 0x645A,
+ 0x93A4, 0x645B, 0x93A5, 0x645C, 0x93A6, 0x645D, 0x93A7, 0x645F,
+ 0x93A8, 0x6460, 0x93A9, 0x6461, 0x93AA, 0x6462, 0x93AB, 0x6463,
+ 0x93AC, 0x6464, 0x93AD, 0x6465, 0x93AE, 0x6466, 0x93AF, 0x6468,
+ 0x93B0, 0x646A, 0x93B1, 0x646B, 0x93B2, 0x646C, 0x93B3, 0x646E,
+ 0x93B4, 0x646F, 0x93B5, 0x6470, 0x93B6, 0x6471, 0x93B7, 0x6472,
+ 0x93B8, 0x6473, 0x93B9, 0x6474, 0x93BA, 0x6475, 0x93BB, 0x6476,
+ 0x93BC, 0x6477, 0x93BD, 0x647B, 0x93BE, 0x647C, 0x93BF, 0x647D,
+ 0x93C0, 0x647E, 0x93C1, 0x647F, 0x93C2, 0x6480, 0x93C3, 0x6481,
+ 0x93C4, 0x6483, 0x93C5, 0x6486, 0x93C6, 0x6488, 0x93C7, 0x6489,
+ 0x93C8, 0x648A, 0x93C9, 0x648B, 0x93CA, 0x648C, 0x93CB, 0x648D,
+ 0x93CC, 0x648E, 0x93CD, 0x648F, 0x93CE, 0x6490, 0x93CF, 0x6493,
+ 0x93D0, 0x6494, 0x93D1, 0x6497, 0x93D2, 0x6498, 0x93D3, 0x649A,
+ 0x93D4, 0x649B, 0x93D5, 0x649C, 0x93D6, 0x649D, 0x93D7, 0x649F,
+ 0x93D8, 0x64A0, 0x93D9, 0x64A1, 0x93DA, 0x64A2, 0x93DB, 0x64A3,
+ 0x93DC, 0x64A5, 0x93DD, 0x64A6, 0x93DE, 0x64A7, 0x93DF, 0x64A8,
+ 0x93E0, 0x64AA, 0x93E1, 0x64AB, 0x93E2, 0x64AF, 0x93E3, 0x64B1,
+ 0x93E4, 0x64B2, 0x93E5, 0x64B3, 0x93E6, 0x64B4, 0x93E7, 0x64B6,
+ 0x93E8, 0x64B9, 0x93E9, 0x64BB, 0x93EA, 0x64BD, 0x93EB, 0x64BE,
+ 0x93EC, 0x64BF, 0x93ED, 0x64C1, 0x93EE, 0x64C3, 0x93EF, 0x64C4,
+ 0x93F0, 0x64C6, 0x93F1, 0x64C7, 0x93F2, 0x64C8, 0x93F3, 0x64C9,
+ 0x93F4, 0x64CA, 0x93F5, 0x64CB, 0x93F6, 0x64CC, 0x93F7, 0x64CF,
+ 0x93F8, 0x64D1, 0x93F9, 0x64D3, 0x93FA, 0x64D4, 0x93FB, 0x64D5,
+ 0x93FC, 0x64D6, 0x93FD, 0x64D9, 0x93FE, 0x64DA, 0x9440, 0x64DB,
+ 0x9441, 0x64DC, 0x9442, 0x64DD, 0x9443, 0x64DF, 0x9444, 0x64E0,
+ 0x9445, 0x64E1, 0x9446, 0x64E3, 0x9447, 0x64E5, 0x9448, 0x64E7,
+ 0x9449, 0x64E8, 0x944A, 0x64E9, 0x944B, 0x64EA, 0x944C, 0x64EB,
+ 0x944D, 0x64EC, 0x944E, 0x64ED, 0x944F, 0x64EE, 0x9450, 0x64EF,
+ 0x9451, 0x64F0, 0x9452, 0x64F1, 0x9453, 0x64F2, 0x9454, 0x64F3,
+ 0x9455, 0x64F4, 0x9456, 0x64F5, 0x9457, 0x64F6, 0x9458, 0x64F7,
+ 0x9459, 0x64F8, 0x945A, 0x64F9, 0x945B, 0x64FA, 0x945C, 0x64FB,
+ 0x945D, 0x64FC, 0x945E, 0x64FD, 0x945F, 0x64FE, 0x9460, 0x64FF,
+ 0x9461, 0x6501, 0x9462, 0x6502, 0x9463, 0x6503, 0x9464, 0x6504,
+ 0x9465, 0x6505, 0x9466, 0x6506, 0x9467, 0x6507, 0x9468, 0x6508,
+ 0x9469, 0x650A, 0x946A, 0x650B, 0x946B, 0x650C, 0x946C, 0x650D,
+ 0x946D, 0x650E, 0x946E, 0x650F, 0x946F, 0x6510, 0x9470, 0x6511,
+ 0x9471, 0x6513, 0x9472, 0x6514, 0x9473, 0x6515, 0x9474, 0x6516,
+ 0x9475, 0x6517, 0x9476, 0x6519, 0x9477, 0x651A, 0x9478, 0x651B,
+ 0x9479, 0x651C, 0x947A, 0x651D, 0x947B, 0x651E, 0x947C, 0x651F,
+ 0x947D, 0x6520, 0x947E, 0x6521, 0x9480, 0x6522, 0x9481, 0x6523,
+ 0x9482, 0x6524, 0x9483, 0x6526, 0x9484, 0x6527, 0x9485, 0x6528,
+ 0x9486, 0x6529, 0x9487, 0x652A, 0x9488, 0x652C, 0x9489, 0x652D,
+ 0x948A, 0x6530, 0x948B, 0x6531, 0x948C, 0x6532, 0x948D, 0x6533,
+ 0x948E, 0x6537, 0x948F, 0x653A, 0x9490, 0x653C, 0x9491, 0x653D,
+ 0x9492, 0x6540, 0x9493, 0x6541, 0x9494, 0x6542, 0x9495, 0x6543,
+ 0x9496, 0x6544, 0x9497, 0x6546, 0x9498, 0x6547, 0x9499, 0x654A,
+ 0x949A, 0x654B, 0x949B, 0x654D, 0x949C, 0x654E, 0x949D, 0x6550,
+ 0x949E, 0x6552, 0x949F, 0x6553, 0x94A0, 0x6554, 0x94A1, 0x6557,
+ 0x94A2, 0x6558, 0x94A3, 0x655A, 0x94A4, 0x655C, 0x94A5, 0x655F,
+ 0x94A6, 0x6560, 0x94A7, 0x6561, 0x94A8, 0x6564, 0x94A9, 0x6565,
+ 0x94AA, 0x6567, 0x94AB, 0x6568, 0x94AC, 0x6569, 0x94AD, 0x656A,
+ 0x94AE, 0x656D, 0x94AF, 0x656E, 0x94B0, 0x656F, 0x94B1, 0x6571,
+ 0x94B2, 0x6573, 0x94B3, 0x6575, 0x94B4, 0x6576, 0x94B5, 0x6578,
+ 0x94B6, 0x6579, 0x94B7, 0x657A, 0x94B8, 0x657B, 0x94B9, 0x657C,
+ 0x94BA, 0x657D, 0x94BB, 0x657E, 0x94BC, 0x657F, 0x94BD, 0x6580,
+ 0x94BE, 0x6581, 0x94BF, 0x6582, 0x94C0, 0x6583, 0x94C1, 0x6584,
+ 0x94C2, 0x6585, 0x94C3, 0x6586, 0x94C4, 0x6588, 0x94C5, 0x6589,
+ 0x94C6, 0x658A, 0x94C7, 0x658D, 0x94C8, 0x658E, 0x94C9, 0x658F,
+ 0x94CA, 0x6592, 0x94CB, 0x6594, 0x94CC, 0x6595, 0x94CD, 0x6596,
+ 0x94CE, 0x6598, 0x94CF, 0x659A, 0x94D0, 0x659D, 0x94D1, 0x659E,
+ 0x94D2, 0x65A0, 0x94D3, 0x65A2, 0x94D4, 0x65A3, 0x94D5, 0x65A6,
+ 0x94D6, 0x65A8, 0x94D7, 0x65AA, 0x94D8, 0x65AC, 0x94D9, 0x65AE,
+ 0x94DA, 0x65B1, 0x94DB, 0x65B2, 0x94DC, 0x65B3, 0x94DD, 0x65B4,
+ 0x94DE, 0x65B5, 0x94DF, 0x65B6, 0x94E0, 0x65B7, 0x94E1, 0x65B8,
+ 0x94E2, 0x65BA, 0x94E3, 0x65BB, 0x94E4, 0x65BE, 0x94E5, 0x65BF,
+ 0x94E6, 0x65C0, 0x94E7, 0x65C2, 0x94E8, 0x65C7, 0x94E9, 0x65C8,
+ 0x94EA, 0x65C9, 0x94EB, 0x65CA, 0x94EC, 0x65CD, 0x94ED, 0x65D0,
+ 0x94EE, 0x65D1, 0x94EF, 0x65D3, 0x94F0, 0x65D4, 0x94F1, 0x65D5,
+ 0x94F2, 0x65D8, 0x94F3, 0x65D9, 0x94F4, 0x65DA, 0x94F5, 0x65DB,
+ 0x94F6, 0x65DC, 0x94F7, 0x65DD, 0x94F8, 0x65DE, 0x94F9, 0x65DF,
+ 0x94FA, 0x65E1, 0x94FB, 0x65E3, 0x94FC, 0x65E4, 0x94FD, 0x65EA,
+ 0x94FE, 0x65EB, 0x9540, 0x65F2, 0x9541, 0x65F3, 0x9542, 0x65F4,
+ 0x9543, 0x65F5, 0x9544, 0x65F8, 0x9545, 0x65F9, 0x9546, 0x65FB,
+ 0x9547, 0x65FC, 0x9548, 0x65FD, 0x9549, 0x65FE, 0x954A, 0x65FF,
+ 0x954B, 0x6601, 0x954C, 0x6604, 0x954D, 0x6605, 0x954E, 0x6607,
+ 0x954F, 0x6608, 0x9550, 0x6609, 0x9551, 0x660B, 0x9552, 0x660D,
+ 0x9553, 0x6610, 0x9554, 0x6611, 0x9555, 0x6612, 0x9556, 0x6616,
+ 0x9557, 0x6617, 0x9558, 0x6618, 0x9559, 0x661A, 0x955A, 0x661B,
+ 0x955B, 0x661C, 0x955C, 0x661E, 0x955D, 0x6621, 0x955E, 0x6622,
+ 0x955F, 0x6623, 0x9560, 0x6624, 0x9561, 0x6626, 0x9562, 0x6629,
+ 0x9563, 0x662A, 0x9564, 0x662B, 0x9565, 0x662C, 0x9566, 0x662E,
+ 0x9567, 0x6630, 0x9568, 0x6632, 0x9569, 0x6633, 0x956A, 0x6637,
+ 0x956B, 0x6638, 0x956C, 0x6639, 0x956D, 0x663A, 0x956E, 0x663B,
+ 0x956F, 0x663D, 0x9570, 0x663F, 0x9571, 0x6640, 0x9572, 0x6642,
+ 0x9573, 0x6644, 0x9574, 0x6645, 0x9575, 0x6646, 0x9576, 0x6647,
+ 0x9577, 0x6648, 0x9578, 0x6649, 0x9579, 0x664A, 0x957A, 0x664D,
+ 0x957B, 0x664E, 0x957C, 0x6650, 0x957D, 0x6651, 0x957E, 0x6658,
+ 0x9580, 0x6659, 0x9581, 0x665B, 0x9582, 0x665C, 0x9583, 0x665D,
+ 0x9584, 0x665E, 0x9585, 0x6660, 0x9586, 0x6662, 0x9587, 0x6663,
+ 0x9588, 0x6665, 0x9589, 0x6667, 0x958A, 0x6669, 0x958B, 0x666A,
+ 0x958C, 0x666B, 0x958D, 0x666C, 0x958E, 0x666D, 0x958F, 0x6671,
+ 0x9590, 0x6672, 0x9591, 0x6673, 0x9592, 0x6675, 0x9593, 0x6678,
+ 0x9594, 0x6679, 0x9595, 0x667B, 0x9596, 0x667C, 0x9597, 0x667D,
+ 0x9598, 0x667F, 0x9599, 0x6680, 0x959A, 0x6681, 0x959B, 0x6683,
+ 0x959C, 0x6685, 0x959D, 0x6686, 0x959E, 0x6688, 0x959F, 0x6689,
+ 0x95A0, 0x668A, 0x95A1, 0x668B, 0x95A2, 0x668D, 0x95A3, 0x668E,
+ 0x95A4, 0x668F, 0x95A5, 0x6690, 0x95A6, 0x6692, 0x95A7, 0x6693,
+ 0x95A8, 0x6694, 0x95A9, 0x6695, 0x95AA, 0x6698, 0x95AB, 0x6699,
+ 0x95AC, 0x669A, 0x95AD, 0x669B, 0x95AE, 0x669C, 0x95AF, 0x669E,
+ 0x95B0, 0x669F, 0x95B1, 0x66A0, 0x95B2, 0x66A1, 0x95B3, 0x66A2,
+ 0x95B4, 0x66A3, 0x95B5, 0x66A4, 0x95B6, 0x66A5, 0x95B7, 0x66A6,
+ 0x95B8, 0x66A9, 0x95B9, 0x66AA, 0x95BA, 0x66AB, 0x95BB, 0x66AC,
+ 0x95BC, 0x66AD, 0x95BD, 0x66AF, 0x95BE, 0x66B0, 0x95BF, 0x66B1,
+ 0x95C0, 0x66B2, 0x95C1, 0x66B3, 0x95C2, 0x66B5, 0x95C3, 0x66B6,
+ 0x95C4, 0x66B7, 0x95C5, 0x66B8, 0x95C6, 0x66BA, 0x95C7, 0x66BB,
+ 0x95C8, 0x66BC, 0x95C9, 0x66BD, 0x95CA, 0x66BF, 0x95CB, 0x66C0,
+ 0x95CC, 0x66C1, 0x95CD, 0x66C2, 0x95CE, 0x66C3, 0x95CF, 0x66C4,
+ 0x95D0, 0x66C5, 0x95D1, 0x66C6, 0x95D2, 0x66C7, 0x95D3, 0x66C8,
+ 0x95D4, 0x66C9, 0x95D5, 0x66CA, 0x95D6, 0x66CB, 0x95D7, 0x66CC,
+ 0x95D8, 0x66CD, 0x95D9, 0x66CE, 0x95DA, 0x66CF, 0x95DB, 0x66D0,
+ 0x95DC, 0x66D1, 0x95DD, 0x66D2, 0x95DE, 0x66D3, 0x95DF, 0x66D4,
+ 0x95E0, 0x66D5, 0x95E1, 0x66D6, 0x95E2, 0x66D7, 0x95E3, 0x66D8,
+ 0x95E4, 0x66DA, 0x95E5, 0x66DE, 0x95E6, 0x66DF, 0x95E7, 0x66E0,
+ 0x95E8, 0x66E1, 0x95E9, 0x66E2, 0x95EA, 0x66E3, 0x95EB, 0x66E4,
+ 0x95EC, 0x66E5, 0x95ED, 0x66E7, 0x95EE, 0x66E8, 0x95EF, 0x66EA,
+ 0x95F0, 0x66EB, 0x95F1, 0x66EC, 0x95F2, 0x66ED, 0x95F3, 0x66EE,
+ 0x95F4, 0x66EF, 0x95F5, 0x66F1, 0x95F6, 0x66F5, 0x95F7, 0x66F6,
+ 0x95F8, 0x66F8, 0x95F9, 0x66FA, 0x95FA, 0x66FB, 0x95FB, 0x66FD,
+ 0x95FC, 0x6701, 0x95FD, 0x6702, 0x95FE, 0x6703, 0x9640, 0x6704,
+ 0x9641, 0x6705, 0x9642, 0x6706, 0x9643, 0x6707, 0x9644, 0x670C,
+ 0x9645, 0x670E, 0x9646, 0x670F, 0x9647, 0x6711, 0x9648, 0x6712,
+ 0x9649, 0x6713, 0x964A, 0x6716, 0x964B, 0x6718, 0x964C, 0x6719,
+ 0x964D, 0x671A, 0x964E, 0x671C, 0x964F, 0x671E, 0x9650, 0x6720,
+ 0x9651, 0x6721, 0x9652, 0x6722, 0x9653, 0x6723, 0x9654, 0x6724,
+ 0x9655, 0x6725, 0x9656, 0x6727, 0x9657, 0x6729, 0x9658, 0x672E,
+ 0x9659, 0x6730, 0x965A, 0x6732, 0x965B, 0x6733, 0x965C, 0x6736,
+ 0x965D, 0x6737, 0x965E, 0x6738, 0x965F, 0x6739, 0x9660, 0x673B,
+ 0x9661, 0x673C, 0x9662, 0x673E, 0x9663, 0x673F, 0x9664, 0x6741,
+ 0x9665, 0x6744, 0x9666, 0x6745, 0x9667, 0x6747, 0x9668, 0x674A,
+ 0x9669, 0x674B, 0x966A, 0x674D, 0x966B, 0x6752, 0x966C, 0x6754,
+ 0x966D, 0x6755, 0x966E, 0x6757, 0x966F, 0x6758, 0x9670, 0x6759,
+ 0x9671, 0x675A, 0x9672, 0x675B, 0x9673, 0x675D, 0x9674, 0x6762,
+ 0x9675, 0x6763, 0x9676, 0x6764, 0x9677, 0x6766, 0x9678, 0x6767,
+ 0x9679, 0x676B, 0x967A, 0x676C, 0x967B, 0x676E, 0x967C, 0x6771,
+ 0x967D, 0x6774, 0x967E, 0x6776, 0x9680, 0x6778, 0x9681, 0x6779,
+ 0x9682, 0x677A, 0x9683, 0x677B, 0x9684, 0x677D, 0x9685, 0x6780,
+ 0x9686, 0x6782, 0x9687, 0x6783, 0x9688, 0x6785, 0x9689, 0x6786,
+ 0x968A, 0x6788, 0x968B, 0x678A, 0x968C, 0x678C, 0x968D, 0x678D,
+ 0x968E, 0x678E, 0x968F, 0x678F, 0x9690, 0x6791, 0x9691, 0x6792,
+ 0x9692, 0x6793, 0x9693, 0x6794, 0x9694, 0x6796, 0x9695, 0x6799,
+ 0x9696, 0x679B, 0x9697, 0x679F, 0x9698, 0x67A0, 0x9699, 0x67A1,
+ 0x969A, 0x67A4, 0x969B, 0x67A6, 0x969C, 0x67A9, 0x969D, 0x67AC,
+ 0x969E, 0x67AE, 0x969F, 0x67B1, 0x96A0, 0x67B2, 0x96A1, 0x67B4,
+ 0x96A2, 0x67B9, 0x96A3, 0x67BA, 0x96A4, 0x67BB, 0x96A5, 0x67BC,
+ 0x96A6, 0x67BD, 0x96A7, 0x67BE, 0x96A8, 0x67BF, 0x96A9, 0x67C0,
+ 0x96AA, 0x67C2, 0x96AB, 0x67C5, 0x96AC, 0x67C6, 0x96AD, 0x67C7,
+ 0x96AE, 0x67C8, 0x96AF, 0x67C9, 0x96B0, 0x67CA, 0x96B1, 0x67CB,
+ 0x96B2, 0x67CC, 0x96B3, 0x67CD, 0x96B4, 0x67CE, 0x96B5, 0x67D5,
+ 0x96B6, 0x67D6, 0x96B7, 0x67D7, 0x96B8, 0x67DB, 0x96B9, 0x67DF,
+ 0x96BA, 0x67E1, 0x96BB, 0x67E3, 0x96BC, 0x67E4, 0x96BD, 0x67E6,
+ 0x96BE, 0x67E7, 0x96BF, 0x67E8, 0x96C0, 0x67EA, 0x96C1, 0x67EB,
+ 0x96C2, 0x67ED, 0x96C3, 0x67EE, 0x96C4, 0x67F2, 0x96C5, 0x67F5,
+ 0x96C6, 0x67F6, 0x96C7, 0x67F7, 0x96C8, 0x67F8, 0x96C9, 0x67F9,
+ 0x96CA, 0x67FA, 0x96CB, 0x67FB, 0x96CC, 0x67FC, 0x96CD, 0x67FE,
+ 0x96CE, 0x6801, 0x96CF, 0x6802, 0x96D0, 0x6803, 0x96D1, 0x6804,
+ 0x96D2, 0x6806, 0x96D3, 0x680D, 0x96D4, 0x6810, 0x96D5, 0x6812,
+ 0x96D6, 0x6814, 0x96D7, 0x6815, 0x96D8, 0x6818, 0x96D9, 0x6819,
+ 0x96DA, 0x681A, 0x96DB, 0x681B, 0x96DC, 0x681C, 0x96DD, 0x681E,
+ 0x96DE, 0x681F, 0x96DF, 0x6820, 0x96E0, 0x6822, 0x96E1, 0x6823,
+ 0x96E2, 0x6824, 0x96E3, 0x6825, 0x96E4, 0x6826, 0x96E5, 0x6827,
+ 0x96E6, 0x6828, 0x96E7, 0x682B, 0x96E8, 0x682C, 0x96E9, 0x682D,
+ 0x96EA, 0x682E, 0x96EB, 0x682F, 0x96EC, 0x6830, 0x96ED, 0x6831,
+ 0x96EE, 0x6834, 0x96EF, 0x6835, 0x96F0, 0x6836, 0x96F1, 0x683A,
+ 0x96F2, 0x683B, 0x96F3, 0x683F, 0x96F4, 0x6847, 0x96F5, 0x684B,
+ 0x96F6, 0x684D, 0x96F7, 0x684F, 0x96F8, 0x6852, 0x96F9, 0x6856,
+ 0x96FA, 0x6857, 0x96FB, 0x6858, 0x96FC, 0x6859, 0x96FD, 0x685A,
+ 0x96FE, 0x685B, 0x9740, 0x685C, 0x9741, 0x685D, 0x9742, 0x685E,
+ 0x9743, 0x685F, 0x9744, 0x686A, 0x9745, 0x686C, 0x9746, 0x686D,
+ 0x9747, 0x686E, 0x9748, 0x686F, 0x9749, 0x6870, 0x974A, 0x6871,
+ 0x974B, 0x6872, 0x974C, 0x6873, 0x974D, 0x6875, 0x974E, 0x6878,
+ 0x974F, 0x6879, 0x9750, 0x687A, 0x9751, 0x687B, 0x9752, 0x687C,
+ 0x9753, 0x687D, 0x9754, 0x687E, 0x9755, 0x687F, 0x9756, 0x6880,
+ 0x9757, 0x6882, 0x9758, 0x6884, 0x9759, 0x6887, 0x975A, 0x6888,
+ 0x975B, 0x6889, 0x975C, 0x688A, 0x975D, 0x688B, 0x975E, 0x688C,
+ 0x975F, 0x688D, 0x9760, 0x688E, 0x9761, 0x6890, 0x9762, 0x6891,
+ 0x9763, 0x6892, 0x9764, 0x6894, 0x9765, 0x6895, 0x9766, 0x6896,
+ 0x9767, 0x6898, 0x9768, 0x6899, 0x9769, 0x689A, 0x976A, 0x689B,
+ 0x976B, 0x689C, 0x976C, 0x689D, 0x976D, 0x689E, 0x976E, 0x689F,
+ 0x976F, 0x68A0, 0x9770, 0x68A1, 0x9771, 0x68A3, 0x9772, 0x68A4,
+ 0x9773, 0x68A5, 0x9774, 0x68A9, 0x9775, 0x68AA, 0x9776, 0x68AB,
+ 0x9777, 0x68AC, 0x9778, 0x68AE, 0x9779, 0x68B1, 0x977A, 0x68B2,
+ 0x977B, 0x68B4, 0x977C, 0x68B6, 0x977D, 0x68B7, 0x977E, 0x68B8,
+ 0x9780, 0x68B9, 0x9781, 0x68BA, 0x9782, 0x68BB, 0x9783, 0x68BC,
+ 0x9784, 0x68BD, 0x9785, 0x68BE, 0x9786, 0x68BF, 0x9787, 0x68C1,
+ 0x9788, 0x68C3, 0x9789, 0x68C4, 0x978A, 0x68C5, 0x978B, 0x68C6,
+ 0x978C, 0x68C7, 0x978D, 0x68C8, 0x978E, 0x68CA, 0x978F, 0x68CC,
+ 0x9790, 0x68CE, 0x9791, 0x68CF, 0x9792, 0x68D0, 0x9793, 0x68D1,
+ 0x9794, 0x68D3, 0x9795, 0x68D4, 0x9796, 0x68D6, 0x9797, 0x68D7,
+ 0x9798, 0x68D9, 0x9799, 0x68DB, 0x979A, 0x68DC, 0x979B, 0x68DD,
+ 0x979C, 0x68DE, 0x979D, 0x68DF, 0x979E, 0x68E1, 0x979F, 0x68E2,
+ 0x97A0, 0x68E4, 0x97A1, 0x68E5, 0x97A2, 0x68E6, 0x97A3, 0x68E7,
+ 0x97A4, 0x68E8, 0x97A5, 0x68E9, 0x97A6, 0x68EA, 0x97A7, 0x68EB,
+ 0x97A8, 0x68EC, 0x97A9, 0x68ED, 0x97AA, 0x68EF, 0x97AB, 0x68F2,
+ 0x97AC, 0x68F3, 0x97AD, 0x68F4, 0x97AE, 0x68F6, 0x97AF, 0x68F7,
+ 0x97B0, 0x68F8, 0x97B1, 0x68FB, 0x97B2, 0x68FD, 0x97B3, 0x68FE,
+ 0x97B4, 0x68FF, 0x97B5, 0x6900, 0x97B6, 0x6902, 0x97B7, 0x6903,
+ 0x97B8, 0x6904, 0x97B9, 0x6906, 0x97BA, 0x6907, 0x97BB, 0x6908,
+ 0x97BC, 0x6909, 0x97BD, 0x690A, 0x97BE, 0x690C, 0x97BF, 0x690F,
+ 0x97C0, 0x6911, 0x97C1, 0x6913, 0x97C2, 0x6914, 0x97C3, 0x6915,
+ 0x97C4, 0x6916, 0x97C5, 0x6917, 0x97C6, 0x6918, 0x97C7, 0x6919,
+ 0x97C8, 0x691A, 0x97C9, 0x691B, 0x97CA, 0x691C, 0x97CB, 0x691D,
+ 0x97CC, 0x691E, 0x97CD, 0x6921, 0x97CE, 0x6922, 0x97CF, 0x6923,
+ 0x97D0, 0x6925, 0x97D1, 0x6926, 0x97D2, 0x6927, 0x97D3, 0x6928,
+ 0x97D4, 0x6929, 0x97D5, 0x692A, 0x97D6, 0x692B, 0x97D7, 0x692C,
+ 0x97D8, 0x692E, 0x97D9, 0x692F, 0x97DA, 0x6931, 0x97DB, 0x6932,
+ 0x97DC, 0x6933, 0x97DD, 0x6935, 0x97DE, 0x6936, 0x97DF, 0x6937,
+ 0x97E0, 0x6938, 0x97E1, 0x693A, 0x97E2, 0x693B, 0x97E3, 0x693C,
+ 0x97E4, 0x693E, 0x97E5, 0x6940, 0x97E6, 0x6941, 0x97E7, 0x6943,
+ 0x97E8, 0x6944, 0x97E9, 0x6945, 0x97EA, 0x6946, 0x97EB, 0x6947,
+ 0x97EC, 0x6948, 0x97ED, 0x6949, 0x97EE, 0x694A, 0x97EF, 0x694B,
+ 0x97F0, 0x694C, 0x97F1, 0x694D, 0x97F2, 0x694E, 0x97F3, 0x694F,
+ 0x97F4, 0x6950, 0x97F5, 0x6951, 0x97F6, 0x6952, 0x97F7, 0x6953,
+ 0x97F8, 0x6955, 0x97F9, 0x6956, 0x97FA, 0x6958, 0x97FB, 0x6959,
+ 0x97FC, 0x695B, 0x97FD, 0x695C, 0x97FE, 0x695F, 0x9840, 0x6961,
+ 0x9841, 0x6962, 0x9842, 0x6964, 0x9843, 0x6965, 0x9844, 0x6967,
+ 0x9845, 0x6968, 0x9846, 0x6969, 0x9847, 0x696A, 0x9848, 0x696C,
+ 0x9849, 0x696D, 0x984A, 0x696F, 0x984B, 0x6970, 0x984C, 0x6972,
+ 0x984D, 0x6973, 0x984E, 0x6974, 0x984F, 0x6975, 0x9850, 0x6976,
+ 0x9851, 0x697A, 0x9852, 0x697B, 0x9853, 0x697D, 0x9854, 0x697E,
+ 0x9855, 0x697F, 0x9856, 0x6981, 0x9857, 0x6983, 0x9858, 0x6985,
+ 0x9859, 0x698A, 0x985A, 0x698B, 0x985B, 0x698C, 0x985C, 0x698E,
+ 0x985D, 0x698F, 0x985E, 0x6990, 0x985F, 0x6991, 0x9860, 0x6992,
+ 0x9861, 0x6993, 0x9862, 0x6996, 0x9863, 0x6997, 0x9864, 0x6999,
+ 0x9865, 0x699A, 0x9866, 0x699D, 0x9867, 0x699E, 0x9868, 0x699F,
+ 0x9869, 0x69A0, 0x986A, 0x69A1, 0x986B, 0x69A2, 0x986C, 0x69A3,
+ 0x986D, 0x69A4, 0x986E, 0x69A5, 0x986F, 0x69A6, 0x9870, 0x69A9,
+ 0x9871, 0x69AA, 0x9872, 0x69AC, 0x9873, 0x69AE, 0x9874, 0x69AF,
+ 0x9875, 0x69B0, 0x9876, 0x69B2, 0x9877, 0x69B3, 0x9878, 0x69B5,
+ 0x9879, 0x69B6, 0x987A, 0x69B8, 0x987B, 0x69B9, 0x987C, 0x69BA,
+ 0x987D, 0x69BC, 0x987E, 0x69BD, 0x9880, 0x69BE, 0x9881, 0x69BF,
+ 0x9882, 0x69C0, 0x9883, 0x69C2, 0x9884, 0x69C3, 0x9885, 0x69C4,
+ 0x9886, 0x69C5, 0x9887, 0x69C6, 0x9888, 0x69C7, 0x9889, 0x69C8,
+ 0x988A, 0x69C9, 0x988B, 0x69CB, 0x988C, 0x69CD, 0x988D, 0x69CF,
+ 0x988E, 0x69D1, 0x988F, 0x69D2, 0x9890, 0x69D3, 0x9891, 0x69D5,
+ 0x9892, 0x69D6, 0x9893, 0x69D7, 0x9894, 0x69D8, 0x9895, 0x69D9,
+ 0x9896, 0x69DA, 0x9897, 0x69DC, 0x9898, 0x69DD, 0x9899, 0x69DE,
+ 0x989A, 0x69E1, 0x989B, 0x69E2, 0x989C, 0x69E3, 0x989D, 0x69E4,
+ 0x989E, 0x69E5, 0x989F, 0x69E6, 0x98A0, 0x69E7, 0x98A1, 0x69E8,
+ 0x98A2, 0x69E9, 0x98A3, 0x69EA, 0x98A4, 0x69EB, 0x98A5, 0x69EC,
+ 0x98A6, 0x69EE, 0x98A7, 0x69EF, 0x98A8, 0x69F0, 0x98A9, 0x69F1,
+ 0x98AA, 0x69F3, 0x98AB, 0x69F4, 0x98AC, 0x69F5, 0x98AD, 0x69F6,
+ 0x98AE, 0x69F7, 0x98AF, 0x69F8, 0x98B0, 0x69F9, 0x98B1, 0x69FA,
+ 0x98B2, 0x69FB, 0x98B3, 0x69FC, 0x98B4, 0x69FE, 0x98B5, 0x6A00,
+ 0x98B6, 0x6A01, 0x98B7, 0x6A02, 0x98B8, 0x6A03, 0x98B9, 0x6A04,
+ 0x98BA, 0x6A05, 0x98BB, 0x6A06, 0x98BC, 0x6A07, 0x98BD, 0x6A08,
+ 0x98BE, 0x6A09, 0x98BF, 0x6A0B, 0x98C0, 0x6A0C, 0x98C1, 0x6A0D,
+ 0x98C2, 0x6A0E, 0x98C3, 0x6A0F, 0x98C4, 0x6A10, 0x98C5, 0x6A11,
+ 0x98C6, 0x6A12, 0x98C7, 0x6A13, 0x98C8, 0x6A14, 0x98C9, 0x6A15,
+ 0x98CA, 0x6A16, 0x98CB, 0x6A19, 0x98CC, 0x6A1A, 0x98CD, 0x6A1B,
+ 0x98CE, 0x6A1C, 0x98CF, 0x6A1D, 0x98D0, 0x6A1E, 0x98D1, 0x6A20,
+ 0x98D2, 0x6A22, 0x98D3, 0x6A23, 0x98D4, 0x6A24, 0x98D5, 0x6A25,
+ 0x98D6, 0x6A26, 0x98D7, 0x6A27, 0x98D8, 0x6A29, 0x98D9, 0x6A2B,
+ 0x98DA, 0x6A2C, 0x98DB, 0x6A2D, 0x98DC, 0x6A2E, 0x98DD, 0x6A30,
+ 0x98DE, 0x6A32, 0x98DF, 0x6A33, 0x98E0, 0x6A34, 0x98E1, 0x6A36,
+ 0x98E2, 0x6A37, 0x98E3, 0x6A38, 0x98E4, 0x6A39, 0x98E5, 0x6A3A,
+ 0x98E6, 0x6A3B, 0x98E7, 0x6A3C, 0x98E8, 0x6A3F, 0x98E9, 0x6A40,
+ 0x98EA, 0x6A41, 0x98EB, 0x6A42, 0x98EC, 0x6A43, 0x98ED, 0x6A45,
+ 0x98EE, 0x6A46, 0x98EF, 0x6A48, 0x98F0, 0x6A49, 0x98F1, 0x6A4A,
+ 0x98F2, 0x6A4B, 0x98F3, 0x6A4C, 0x98F4, 0x6A4D, 0x98F5, 0x6A4E,
+ 0x98F6, 0x6A4F, 0x98F7, 0x6A51, 0x98F8, 0x6A52, 0x98F9, 0x6A53,
+ 0x98FA, 0x6A54, 0x98FB, 0x6A55, 0x98FC, 0x6A56, 0x98FD, 0x6A57,
+ 0x98FE, 0x6A5A, 0x9940, 0x6A5C, 0x9941, 0x6A5D, 0x9942, 0x6A5E,
+ 0x9943, 0x6A5F, 0x9944, 0x6A60, 0x9945, 0x6A62, 0x9946, 0x6A63,
+ 0x9947, 0x6A64, 0x9948, 0x6A66, 0x9949, 0x6A67, 0x994A, 0x6A68,
+ 0x994B, 0x6A69, 0x994C, 0x6A6A, 0x994D, 0x6A6B, 0x994E, 0x6A6C,
+ 0x994F, 0x6A6D, 0x9950, 0x6A6E, 0x9951, 0x6A6F, 0x9952, 0x6A70,
+ 0x9953, 0x6A72, 0x9954, 0x6A73, 0x9955, 0x6A74, 0x9956, 0x6A75,
+ 0x9957, 0x6A76, 0x9958, 0x6A77, 0x9959, 0x6A78, 0x995A, 0x6A7A,
+ 0x995B, 0x6A7B, 0x995C, 0x6A7D, 0x995D, 0x6A7E, 0x995E, 0x6A7F,
+ 0x995F, 0x6A81, 0x9960, 0x6A82, 0x9961, 0x6A83, 0x9962, 0x6A85,
+ 0x9963, 0x6A86, 0x9964, 0x6A87, 0x9965, 0x6A88, 0x9966, 0x6A89,
+ 0x9967, 0x6A8A, 0x9968, 0x6A8B, 0x9969, 0x6A8C, 0x996A, 0x6A8D,
+ 0x996B, 0x6A8F, 0x996C, 0x6A92, 0x996D, 0x6A93, 0x996E, 0x6A94,
+ 0x996F, 0x6A95, 0x9970, 0x6A96, 0x9971, 0x6A98, 0x9972, 0x6A99,
+ 0x9973, 0x6A9A, 0x9974, 0x6A9B, 0x9975, 0x6A9C, 0x9976, 0x6A9D,
+ 0x9977, 0x6A9E, 0x9978, 0x6A9F, 0x9979, 0x6AA1, 0x997A, 0x6AA2,
+ 0x997B, 0x6AA3, 0x997C, 0x6AA4, 0x997D, 0x6AA5, 0x997E, 0x6AA6,
+ 0x9980, 0x6AA7, 0x9981, 0x6AA8, 0x9982, 0x6AAA, 0x9983, 0x6AAD,
+ 0x9984, 0x6AAE, 0x9985, 0x6AAF, 0x9986, 0x6AB0, 0x9987, 0x6AB1,
+ 0x9988, 0x6AB2, 0x9989, 0x6AB3, 0x998A, 0x6AB4, 0x998B, 0x6AB5,
+ 0x998C, 0x6AB6, 0x998D, 0x6AB7, 0x998E, 0x6AB8, 0x998F, 0x6AB9,
+ 0x9990, 0x6ABA, 0x9991, 0x6ABB, 0x9992, 0x6ABC, 0x9993, 0x6ABD,
+ 0x9994, 0x6ABE, 0x9995, 0x6ABF, 0x9996, 0x6AC0, 0x9997, 0x6AC1,
+ 0x9998, 0x6AC2, 0x9999, 0x6AC3, 0x999A, 0x6AC4, 0x999B, 0x6AC5,
+ 0x999C, 0x6AC6, 0x999D, 0x6AC7, 0x999E, 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7014, 0x9E6C, 0x7015,
+ 0x9E6D, 0x7016, 0x9E6E, 0x7017, 0x9E6F, 0x7018, 0x9E70, 0x7019,
+ 0x9E71, 0x701C, 0x9E72, 0x701D, 0x9E73, 0x701E, 0x9E74, 0x701F,
+ 0x9E75, 0x7020, 0x9E76, 0x7021, 0x9E77, 0x7022, 0x9E78, 0x7024,
+ 0x9E79, 0x7025, 0x9E7A, 0x7026, 0x9E7B, 0x7027, 0x9E7C, 0x7028,
+ 0x9E7D, 0x7029, 0x9E7E, 0x702A, 0x9E80, 0x702B, 0x9E81, 0x702C,
+ 0x9E82, 0x702D, 0x9E83, 0x702E, 0x9E84, 0x702F, 0x9E85, 0x7030,
+ 0x9E86, 0x7031, 0x9E87, 0x7032, 0x9E88, 0x7033, 0x9E89, 0x7034,
+ 0x9E8A, 0x7036, 0x9E8B, 0x7037, 0x9E8C, 0x7038, 0x9E8D, 0x703A,
+ 0x9E8E, 0x703B, 0x9E8F, 0x703C, 0x9E90, 0x703D, 0x9E91, 0x703E,
+ 0x9E92, 0x703F, 0x9E93, 0x7040, 0x9E94, 0x7041, 0x9E95, 0x7042,
+ 0x9E96, 0x7043, 0x9E97, 0x7044, 0x9E98, 0x7045, 0x9E99, 0x7046,
+ 0x9E9A, 0x7047, 0x9E9B, 0x7048, 0x9E9C, 0x7049, 0x9E9D, 0x704A,
+ 0x9E9E, 0x704B, 0x9E9F, 0x704D, 0x9EA0, 0x704E, 0x9EA1, 0x7050,
+ 0x9EA2, 0x7051, 0x9EA3, 0x7052, 0x9EA4, 0x7053, 0x9EA5, 0x7054,
+ 0x9EA6, 0x7055, 0x9EA7, 0x7056, 0x9EA8, 0x7057, 0x9EA9, 0x7058,
+ 0x9EAA, 0x7059, 0x9EAB, 0x705A, 0x9EAC, 0x705B, 0x9EAD, 0x705C,
+ 0x9EAE, 0x705D, 0x9EAF, 0x705F, 0x9EB0, 0x7060, 0x9EB1, 0x7061,
+ 0x9EB2, 0x7062, 0x9EB3, 0x7063, 0x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0x70D1, 0x9EF8, 0x70D2, 0x9EF9, 0x70D3,
+ 0x9EFA, 0x70D4, 0x9EFB, 0x70D5, 0x9EFC, 0x70D6, 0x9EFD, 0x70D7,
+ 0x9EFE, 0x70DA, 0x9F40, 0x70DC, 0x9F41, 0x70DD, 0x9F42, 0x70DE,
+ 0x9F43, 0x70E0, 0x9F44, 0x70E1, 0x9F45, 0x70E2, 0x9F46, 0x70E3,
+ 0x9F47, 0x70E5, 0x9F48, 0x70EA, 0x9F49, 0x70EE, 0x9F4A, 0x70F0,
+ 0x9F4B, 0x70F1, 0x9F4C, 0x70F2, 0x9F4D, 0x70F3, 0x9F4E, 0x70F4,
+ 0x9F4F, 0x70F5, 0x9F50, 0x70F6, 0x9F51, 0x70F8, 0x9F52, 0x70FA,
+ 0x9F53, 0x70FB, 0x9F54, 0x70FC, 0x9F55, 0x70FE, 0x9F56, 0x70FF,
+ 0x9F57, 0x7100, 0x9F58, 0x7101, 0x9F59, 0x7102, 0x9F5A, 0x7103,
+ 0x9F5B, 0x7104, 0x9F5C, 0x7105, 0x9F5D, 0x7106, 0x9F5E, 0x7107,
+ 0x9F5F, 0x7108, 0x9F60, 0x710B, 0x9F61, 0x710C, 0x9F62, 0x710D,
+ 0x9F63, 0x710E, 0x9F64, 0x710F, 0x9F65, 0x7111, 0x9F66, 0x7112,
+ 0x9F67, 0x7114, 0x9F68, 0x7117, 0x9F69, 0x711B, 0x9F6A, 0x711C,
+ 0x9F6B, 0x711D, 0x9F6C, 0x711E, 0x9F6D, 0x711F, 0x9F6E, 0x7120,
+ 0x9F6F, 0x7121, 0x9F70, 0x7122, 0x9F71, 0x7123, 0x9F72, 0x7124,
+ 0x9F73, 0x7125, 0x9F74, 0x7127, 0x9F75, 0x7128, 0x9F76, 0x7129,
+ 0x9F77, 0x712A, 0x9F78, 0x712B, 0x9F79, 0x712C, 0x9F7A, 0x712D,
+ 0x9F7B, 0x712E, 0x9F7C, 0x7132, 0x9F7D, 0x7133, 0x9F7E, 0x7134,
+ 0x9F80, 0x7135, 0x9F81, 0x7137, 0x9F82, 0x7138, 0x9F83, 0x7139,
+ 0x9F84, 0x713A, 0x9F85, 0x713B, 0x9F86, 0x713C, 0x9F87, 0x713D,
+ 0x9F88, 0x713E, 0x9F89, 0x713F, 0x9F8A, 0x7140, 0x9F8B, 0x7141,
+ 0x9F8C, 0x7142, 0x9F8D, 0x7143, 0x9F8E, 0x7144, 0x9F8F, 0x7146,
+ 0x9F90, 0x7147, 0x9F91, 0x7148, 0x9F92, 0x7149, 0x9F93, 0x714B,
+ 0x9F94, 0x714D, 0x9F95, 0x714F, 0x9F96, 0x7150, 0x9F97, 0x7151,
+ 0x9F98, 0x7152, 0x9F99, 0x7153, 0x9F9A, 0x7154, 0x9F9B, 0x7155,
+ 0x9F9C, 0x7156, 0x9F9D, 0x7157, 0x9F9E, 0x7158, 0x9F9F, 0x7159,
+ 0x9FA0, 0x715A, 0x9FA1, 0x715B, 0x9FA2, 0x715D, 0x9FA3, 0x715F,
+ 0x9FA4, 0x7160, 0x9FA5, 0x7161, 0x9FA6, 0x7162, 0x9FA7, 0x7163,
+ 0x9FA8, 0x7165, 0x9FA9, 0x7169, 0x9FAA, 0x716A, 0x9FAB, 0x716B,
+ 0x9FAC, 0x716C, 0x9FAD, 0x716D, 0x9FAE, 0x716F, 0x9FAF, 0x7170,
+ 0x9FB0, 0x7171, 0x9FB1, 0x7174, 0x9FB2, 0x7175, 0x9FB3, 0x7176,
+ 0x9FB4, 0x7177, 0x9FB5, 0x7179, 0x9FB6, 0x717B, 0x9FB7, 0x717C,
+ 0x9FB8, 0x717E, 0x9FB9, 0x717F, 0x9FBA, 0x7180, 0x9FBB, 0x7181,
+ 0x9FBC, 0x7182, 0x9FBD, 0x7183, 0x9FBE, 0x7185, 0x9FBF, 0x7186,
+ 0x9FC0, 0x7187, 0x9FC1, 0x7188, 0x9FC2, 0x7189, 0x9FC3, 0x718B,
+ 0x9FC4, 0x718C, 0x9FC5, 0x718D, 0x9FC6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x71E1, 0xA04B, 0x71E2, 0xA04C, 0x71E3,
+ 0xA04D, 0x71E4, 0xA04E, 0x71E6, 0xA04F, 0x71E8, 0xA050, 0x71E9,
+ 0xA051, 0x71EA, 0xA052, 0x71EB, 0xA053, 0x71EC, 0xA054, 0x71ED,
+ 0xA055, 0x71EF, 0xA056, 0x71F0, 0xA057, 0x71F1, 0xA058, 0x71F2,
+ 0xA059, 0x71F3, 0xA05A, 0x71F4, 0xA05B, 0x71F5, 0xA05C, 0x71F6,
+ 0xA05D, 0x71F7, 0xA05E, 0x71F8, 0xA05F, 0x71FA, 0xA060, 0x71FB,
+ 0xA061, 0x71FC, 0xA062, 0x71FD, 0xA063, 0x71FE, 0xA064, 0x71FF,
+ 0xA065, 0x7200, 0xA066, 0x7201, 0xA067, 0x7202, 0xA068, 0x7203,
+ 0xA069, 0x7204, 0xA06A, 0x7205, 0xA06B, 0x7207, 0xA06C, 0x7208,
+ 0xA06D, 0x7209, 0xA06E, 0x720A, 0xA06F, 0x720B, 0xA070, 0x720C,
+ 0xA071, 0x720D, 0xA072, 0x720E, 0xA073, 0x720F, 0xA074, 0x7210,
+ 0xA075, 0x7211, 0xA076, 0x7212, 0xA077, 0x7213, 0xA078, 0x7214,
+ 0xA079, 0x7215, 0xA07A, 0x7216, 0xA07B, 0x7217, 0xA07C, 0x7218,
+ 0xA07D, 0x7219, 0xA07E, 0x721A, 0xA080, 0x721B, 0xA081, 0x721C,
+ 0xA082, 0x721E, 0xA083, 0x721F, 0xA084, 0x7220, 0xA085, 0x7221,
+ 0xA086, 0x7222, 0xA087, 0x7223, 0xA088, 0x7224, 0xA089, 0x7225,
+ 0xA08A, 0x7226, 0xA08B, 0x7227, 0xA08C, 0x7229, 0xA08D, 0x722B,
+ 0xA08E, 0x722D, 0xA08F, 0x722E, 0xA090, 0x722F, 0xA091, 0x7232,
+ 0xA092, 0x7233, 0xA093, 0x7234, 0xA094, 0x723A, 0xA095, 0x723C,
+ 0xA096, 0x723E, 0xA097, 0x7240, 0xA098, 0x7241, 0xA099, 0x7242,
+ 0xA09A, 0x7243, 0xA09B, 0x7244, 0xA09C, 0x7245, 0xA09D, 0x7246,
+ 0xA09E, 0x7249, 0xA09F, 0x724A, 0xA0A0, 0x724B, 0xA0A1, 0x724E,
+ 0xA0A2, 0x724F, 0xA0A3, 0x7250, 0xA0A4, 0x7251, 0xA0A5, 0x7253,
+ 0xA0A6, 0x7254, 0xA0A7, 0x7255, 0xA0A8, 0x7257, 0xA0A9, 0x7258,
+ 0xA0AA, 0x725A, 0xA0AB, 0x725C, 0xA0AC, 0x725E, 0xA0AD, 0x7260,
+ 0xA0AE, 0x7263, 0xA0AF, 0x7264, 0xA0B0, 0x7265, 0xA0B1, 0x7268,
+ 0xA0B2, 0x726A, 0xA0B3, 0x726B, 0xA0B4, 0x726C, 0xA0B5, 0x726D,
+ 0xA0B6, 0x7270, 0xA0B7, 0x7271, 0xA0B8, 0x7273, 0xA0B9, 0x7274,
+ 0xA0BA, 0x7276, 0xA0BB, 0x7277, 0xA0BC, 0x7278, 0xA0BD, 0x727B,
+ 0xA0BE, 0x727C, 0xA0BF, 0x727D, 0xA0C0, 0x7282, 0xA0C1, 0x7283,
+ 0xA0C2, 0x7285, 0xA0C3, 0x7286, 0xA0C4, 0x7287, 0xA0C5, 0x7288,
+ 0xA0C6, 0x7289, 0xA0C7, 0x728C, 0xA0C8, 0x728E, 0xA0C9, 0x7290,
+ 0xA0CA, 0x7291, 0xA0CB, 0x7293, 0xA0CC, 0x7294, 0xA0CD, 0x7295,
+ 0xA0CE, 0x7296, 0xA0CF, 0x7297, 0xA0D0, 0x7298, 0xA0D1, 0x7299,
+ 0xA0D2, 0x729A, 0xA0D3, 0x729B, 0xA0D4, 0x729C, 0xA0D5, 0x729D,
+ 0xA0D6, 0x729E, 0xA0D7, 0x72A0, 0xA0D8, 0x72A1, 0xA0D9, 0x72A2,
+ 0xA0DA, 0x72A3, 0xA0DB, 0x72A4, 0xA0DC, 0x72A5, 0xA0DD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xA2A8, 0x2177, 0xA2A9, 0x2178,
+ 0xA2AA, 0x2179, 0xA2B1, 0x2488, 0xA2B2, 0x2489, 0xA2B3, 0x248A,
+ 0xA2B4, 0x248B, 0xA2B5, 0x248C, 0xA2B6, 0x248D, 0xA2B7, 0x248E,
+ 0xA2B8, 0x248F, 0xA2B9, 0x2490, 0xA2BA, 0x2491, 0xA2BB, 0x2492,
+ 0xA2BC, 0x2493, 0xA2BD, 0x2494, 0xA2BE, 0x2495, 0xA2BF, 0x2496,
+ 0xA2C0, 0x2497, 0xA2C1, 0x2498, 0xA2C2, 0x2499, 0xA2C3, 0x249A,
+ 0xA2C4, 0x249B, 0xA2C5, 0x2474, 0xA2C6, 0x2475, 0xA2C7, 0x2476,
+ 0xA2C8, 0x2477, 0xA2C9, 0x2478, 0xA2CA, 0x2479, 0xA2CB, 0x247A,
+ 0xA2CC, 0x247B, 0xA2CD, 0x247C, 0xA2CE, 0x247D, 0xA2CF, 0x247E,
+ 0xA2D0, 0x247F, 0xA2D1, 0x2480, 0xA2D2, 0x2481, 0xA2D3, 0x2482,
+ 0xA2D4, 0x2483, 0xA2D5, 0x2484, 0xA2D6, 0x2485, 0xA2D7, 0x2486,
+ 0xA2D8, 0x2487, 0xA2D9, 0x2460, 0xA2DA, 0x2461, 0xA2DB, 0x2462,
+ 0xA2DC, 0x2463, 0xA2DD, 0x2464, 0xA2DE, 0x2465, 0xA2DF, 0x2466,
+ 0xA2E0, 0x2467, 0xA2E1, 0x2468, 0xA2E2, 0x2469, 0xA2E5, 0x3220,
+ 0xA2E6, 0x3221, 0xA2E7, 0x3222, 0xA2E8, 0x3223, 0xA2E9, 0x3224,
+ 0xA2EA, 0x3225, 0xA2EB, 0x3226, 0xA2EC, 0x3227, 0xA2ED, 0x3228,
+ 0xA2EE, 0x3229, 0xA2F1, 0x2160, 0xA2F2, 0x2161, 0xA2F3, 0x2162,
+ 0xA2F4, 0x2163, 0xA2F5, 0x2164, 0xA2F6, 0x2165, 0xA2F7, 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 0x305F, 0xA4C0, 0x3060, 0xA4C1, 0x3061,
+ 0xA4C2, 0x3062, 0xA4C3, 0x3063, 0xA4C4, 0x3064, 0xA4C5, 0x3065,
+ 0xA4C6, 0x3066, 0xA4C7, 0x3067, 0xA4C8, 0x3068, 0xA4C9, 0x3069,
+ 0xA4CA, 0x306A, 0xA4CB, 0x306B, 0xA4CC, 0x306C, 0xA4CD, 0x306D,
+ 0xA4CE, 0x306E, 0xA4CF, 0x306F, 0xA4D0, 0x3070, 0xA4D1, 0x3071,
+ 0xA4D2, 0x3072, 0xA4D3, 0x3073, 0xA4D4, 0x3074, 0xA4D5, 0x3075,
+ 0xA4D6, 0x3076, 0xA4D7, 0x3077, 0xA4D8, 0x3078, 0xA4D9, 0x3079,
+ 0xA4DA, 0x307A, 0xA4DB, 0x307B, 0xA4DC, 0x307C, 0xA4DD, 0x307D,
+ 0xA4DE, 0x307E, 0xA4DF, 0x307F, 0xA4E0, 0x3080, 0xA4E1, 0x3081,
+ 0xA4E2, 0x3082, 0xA4E3, 0x3083, 0xA4E4, 0x3084, 0xA4E5, 0x3085,
+ 0xA4E6, 0x3086, 0xA4E7, 0x3087, 0xA4E8, 0x3088, 0xA4E9, 0x3089,
+ 0xA4EA, 0x308A, 0xA4EB, 0x308B, 0xA4EC, 0x308C, 0xA4ED, 0x308D,
+ 0xA4EE, 0x308E, 0xA4EF, 0x308F, 0xA4F0, 0x3090, 0xA4F1, 0x3091,
+ 0xA4F2, 0x3092, 0xA4F3, 0x3093, 0xA5A1, 0x30A1, 0xA5A2, 0x30A2,
+ 0xA5A3, 0x30A3, 0xA5A4, 0x30A4, 0xA5A5, 0x30A5, 0xA5A6, 0x30A6,
+ 0xA5A7, 0x30A7, 0xA5A8, 0x30A8, 0xA5A9, 0x30A9, 0xA5AA, 0x30AA,
+ 0xA5AB, 0x30AB, 0xA5AC, 0x30AC, 0xA5AD, 0x30AD, 0xA5AE, 0x30AE,
+ 0xA5AF, 0x30AF, 0xA5B0, 0x30B0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0xFE3B, 0xA6EF, 0xFE3C, 0xA6F0, 0xFE37, 0xA6F1, 0xFE38,
+ 0xA6F2, 0xFE31, 0xA6F4, 0xFE33, 0xA6F5, 0xFE34, 0xA7A1, 0x0410,
+ 0xA7A2, 0x0411, 0xA7A3, 0x0412, 0xA7A4, 0x0413, 0xA7A5, 0x0414,
+ 0xA7A6, 0x0415, 0xA7A7, 0x0401, 0xA7A8, 0x0416, 0xA7A9, 0x0417,
+ 0xA7AA, 0x0418, 0xA7AB, 0x0419, 0xA7AC, 0x041A, 0xA7AD, 0x041B,
+ 0xA7AE, 0x041C, 0xA7AF, 0x041D, 0xA7B0, 0x041E, 0xA7B1, 0x041F,
+ 0xA7B2, 0x0420, 0xA7B3, 0x0421, 0xA7B4, 0x0422, 0xA7B5, 0x0423,
+ 0xA7B6, 0x0424, 0xA7B7, 0x0425, 0xA7B8, 0x0426, 0xA7B9, 0x0427,
+ 0xA7BA, 0x0428, 0xA7BB, 0x0429, 0xA7BC, 0x042A, 0xA7BD, 0x042B,
+ 0xA7BE, 0x042C, 0xA7BF, 0x042D, 0xA7C0, 0x042E, 0xA7C1, 0x042F,
+ 0xA7D1, 0x0430, 0xA7D2, 0x0431, 0xA7D3, 0x0432, 0xA7D4, 0x0433,
+ 0xA7D5, 0x0434, 0xA7D6, 0x0435, 0xA7D7, 0x0451, 0xA7D8, 0x0436,
+ 0xA7D9, 0x0437, 0xA7DA, 0x0438, 0xA7DB, 0x0439, 0xA7DC, 0x043A,
+ 0xA7DD, 0x043B, 0xA7DE, 0x043C, 0xA7DF, 0x043D, 0xA7E0, 0x043E,
+ 0xA7E1, 0x043F, 0xA7E2, 0x0440, 0xA7E3, 0x0441, 0xA7E4, 0x0442,
+ 0xA7E5, 0x0443, 0xA7E6, 0x0444, 0xA7E7, 0x0445, 0xA7E8, 0x0446,
+ 0xA7E9, 0x0447, 0xA7EA, 0x0448, 0xA7EB, 0x0449, 0xA7EC, 0x044A,
+ 0xA7ED, 0x044B, 0xA7EE, 0x044C, 0xA7EF, 0x044D, 0xA7F0, 0x044E,
+ 0xA7F1, 0x044F, 0xA840, 0x02CA, 0xA841, 0x02CB, 0xA842, 0x02D9,
+ 0xA843, 0x2013, 0xA844, 0x2015, 0xA845, 0x2025, 0xA846, 0x2035,
+ 0xA847, 0x2105, 0xA848, 0x2109, 0xA849, 0x2196, 0xA84A, 0x2197,
+ 0xA84B, 0x2198, 0xA84C, 0x2199, 0xA84D, 0x2215, 0xA84E, 0x221F,
+ 0xA84F, 0x2223, 0xA850, 0x2252, 0xA851, 0x2266, 0xA852, 0x2267,
+ 0xA853, 0x22BF, 0xA854, 0x2550, 0xA855, 0x2551, 0xA856, 0x2552,
+ 0xA857, 0x2553, 0xA858, 0x2554, 0xA859, 0x2555, 0xA85A, 0x2556,
+ 0xA85B, 0x2557, 0xA85C, 0x2558, 0xA85D, 0x2559, 0xA85E, 0x255A,
+ 0xA85F, 0x255B, 0xA860, 0x255C, 0xA861, 0x255D, 0xA862, 0x255E,
+ 0xA863, 0x255F, 0xA864, 0x2560, 0xA865, 0x2561, 0xA866, 0x2562,
+ 0xA867, 0x2563, 0xA868, 0x2564, 0xA869, 0x2565, 0xA86A, 0x2566,
+ 0xA86B, 0x2567, 0xA86C, 0x2568, 0xA86D, 0x2569, 0xA86E, 0x256A,
+ 0xA86F, 0x256B, 0xA870, 0x256C, 0xA871, 0x256D, 0xA872, 0x256E,
+ 0xA873, 0x256F, 0xA874, 0x2570, 0xA875, 0x2571, 0xA876, 0x2572,
+ 0xA877, 0x2573, 0xA878, 0x2581, 0xA879, 0x2582, 0xA87A, 0x2583,
+ 0xA87B, 0x2584, 0xA87C, 0x2585, 0xA87D, 0x2586, 0xA87E, 0x2587,
+ 0xA880, 0x2588, 0xA881, 0x2589, 0xA882, 0x258A, 0xA883, 0x258B,
+ 0xA884, 0x258C, 0xA885, 0x258D, 0xA886, 0x258E, 0xA887, 0x258F,
+ 0xA888, 0x2593, 0xA889, 0x2594, 0xA88A, 0x2595, 0xA88B, 0x25BC,
+ 0xA88C, 0x25BD, 0xA88D, 0x25E2, 0xA88E, 0x25E3, 0xA88F, 0x25E4,
+ 0xA890, 0x25E5, 0xA891, 0x2609, 0xA892, 0x2295, 0xA893, 0x3012,
+ 0xA894, 0x301D, 0xA895, 0x301E, 0xA8A1, 0x0101, 0xA8A2, 0x00E1,
+ 0xA8A3, 0x01CE, 0xA8A4, 0x00E0, 0xA8A5, 0x0113, 0xA8A6, 0x00E9,
+ 0xA8A7, 0x011B, 0xA8A8, 0x00E8, 0xA8A9, 0x012B, 0xA8AA, 0x00ED,
+ 0xA8AB, 0x01D0, 0xA8AC, 0x00EC, 0xA8AD, 0x014D, 0xA8AE, 0x00F3,
+ 0xA8AF, 0x01D2, 0xA8B0, 0x00F2, 0xA8B1, 0x016B, 0xA8B2, 0x00FA,
+ 0xA8B3, 0x01D4, 0xA8B4, 0x00F9, 0xA8B5, 0x01D6, 0xA8B6, 0x01D8,
+ 0xA8B7, 0x01DA, 0xA8B8, 0x01DC, 0xA8B9, 0x00FC, 0xA8BA, 0x00EA,
+ 0xA8BB, 0x0251, 0xA8BD, 0x0144, 0xA8BE, 0x0148, 0xA8C0, 0x0261,
+ 0xA8C5, 0x3105, 0xA8C6, 0x3106, 0xA8C7, 0x3107, 0xA8C8, 0x3108,
+ 0xA8C9, 0x3109, 0xA8CA, 0x310A, 0xA8CB, 0x310B, 0xA8CC, 0x310C,
+ 0xA8CD, 0x310D, 0xA8CE, 0x310E, 0xA8CF, 0x310F, 0xA8D0, 0x3110,
+ 0xA8D1, 0x3111, 0xA8D2, 0x3112, 0xA8D3, 0x3113, 0xA8D4, 0x3114,
+ 0xA8D5, 0x3115, 0xA8D6, 0x3116, 0xA8D7, 0x3117, 0xA8D8, 0x3118,
+ 0xA8D9, 0x3119, 0xA8DA, 0x311A, 0xA8DB, 0x311B, 0xA8DC, 0x311C,
+ 0xA8DD, 0x311D, 0xA8DE, 0x311E, 0xA8DF, 0x311F, 0xA8E0, 0x3120,
+ 0xA8E1, 0x3121, 0xA8E2, 0x3122, 0xA8E3, 0x3123, 0xA8E4, 0x3124,
+ 0xA8E5, 0x3125, 0xA8E6, 0x3126, 0xA8E7, 0x3127, 0xA8E8, 0x3128,
+ 0xA8E9, 0x3129, 0xA940, 0x3021, 0xA941, 0x3022, 0xA942, 0x3023,
+ 0xA943, 0x3024, 0xA944, 0x3025, 0xA945, 0x3026, 0xA946, 0x3027,
+ 0xA947, 0x3028, 0xA948, 0x3029, 0xA949, 0x32A3, 0xA94A, 0x338E,
+ 0xA94B, 0x338F, 0xA94C, 0x339C, 0xA94D, 0x339D, 0xA94E, 0x339E,
+ 0xA94F, 0x33A1, 0xA950, 0x33C4, 0xA951, 0x33CE, 0xA952, 0x33D1,
+ 0xA953, 0x33D2, 0xA954, 0x33D5, 0xA955, 0xFE30, 0xA956, 0xFFE2,
+ 0xA957, 0xFFE4, 0xA959, 0x2121, 0xA95A, 0x3231, 0xA95C, 0x2010,
+ 0xA960, 0x30FC, 0xA961, 0x309B, 0xA962, 0x309C, 0xA963, 0x30FD,
+ 0xA964, 0x30FE, 0xA965, 0x3006, 0xA966, 0x309D, 0xA967, 0x309E,
+ 0xA968, 0xFE49, 0xA969, 0xFE4A, 0xA96A, 0xFE4B, 0xA96B, 0xFE4C,
+ 0xA96C, 0xFE4D, 0xA96D, 0xFE4E, 0xA96E, 0xFE4F, 0xA96F, 0xFE50,
+ 0xA970, 0xFE51, 0xA971, 0xFE52, 0xA972, 0xFE54, 0xA973, 0xFE55,
+ 0xA974, 0xFE56, 0xA975, 0xFE57, 0xA976, 0xFE59, 0xA977, 0xFE5A,
+ 0xA978, 0xFE5B, 0xA979, 0xFE5C, 0xA97A, 0xFE5D, 0xA97B, 0xFE5E,
+ 0xA97C, 0xFE5F, 0xA97D, 0xFE60, 0xA97E, 0xFE61, 0xA980, 0xFE62,
+ 0xA981, 0xFE63, 0xA982, 0xFE64, 0xA983, 0xFE65, 0xA984, 0xFE66,
+ 0xA985, 0xFE68, 0xA986, 0xFE69, 0xA987, 0xFE6A, 0xA988, 0xFE6B,
+ 0xA996, 0x3007, 0xA9A4, 0x2500, 0xA9A5, 0x2501, 0xA9A6, 0x2502,
+ 0xA9A7, 0x2503, 0xA9A8, 0x2504, 0xA9A9, 0x2505, 0xA9AA, 0x2506,
+ 0xA9AB, 0x2507, 0xA9AC, 0x2508, 0xA9AD, 0x2509, 0xA9AE, 0x250A,
+ 0xA9AF, 0x250B, 0xA9B0, 0x250C, 0xA9B1, 0x250D, 0xA9B2, 0x250E,
+ 0xA9B3, 0x250F, 0xA9B4, 0x2510, 0xA9B5, 0x2511, 0xA9B6, 0x2512,
+ 0xA9B7, 0x2513, 0xA9B8, 0x2514, 0xA9B9, 0x2515, 0xA9BA, 0x2516,
+ 0xA9BB, 0x2517, 0xA9BC, 0x2518, 0xA9BD, 0x2519, 0xA9BE, 0x251A,
+ 0xA9BF, 0x251B, 0xA9C0, 0x251C, 0xA9C1, 0x251D, 0xA9C2, 0x251E,
+ 0xA9C3, 0x251F, 0xA9C4, 0x2520, 0xA9C5, 0x2521, 0xA9C6, 0x2522,
+ 0xA9C7, 0x2523, 0xA9C8, 0x2524, 0xA9C9, 0x2525, 0xA9CA, 0x2526,
+ 0xA9CB, 0x2527, 0xA9CC, 0x2528, 0xA9CD, 0x2529, 0xA9CE, 0x252A,
+ 0xA9CF, 0x252B, 0xA9D0, 0x252C, 0xA9D1, 0x252D, 0xA9D2, 0x252E,
+ 0xA9D3, 0x252F, 0xA9D4, 0x2530, 0xA9D5, 0x2531, 0xA9D6, 0x2532,
+ 0xA9D7, 0x2533, 0xA9D8, 0x2534, 0xA9D9, 0x2535, 0xA9DA, 0x2536,
+ 0xA9DB, 0x2537, 0xA9DC, 0x2538, 0xA9DD, 0x2539, 0xA9DE, 0x253A,
+ 0xA9DF, 0x253B, 0xA9E0, 0x253C, 0xA9E1, 0x253D, 0xA9E2, 0x253E,
+ 0xA9E3, 0x253F, 0xA9E4, 0x2540, 0xA9E5, 0x2541, 0xA9E6, 0x2542,
+ 0xA9E7, 0x2543, 0xA9E8, 0x2544, 0xA9E9, 0x2545, 0xA9EA, 0x2546,
+ 0xA9EB, 0x2547, 0xA9EC, 0x2548, 0xA9ED, 0x2549, 0xA9EE, 0x254A,
+ 0xA9EF, 0x254B, 0xAA40, 0x72DC, 0xAA41, 0x72DD, 0xAA42, 0x72DF,
+ 0xAA43, 0x72E2, 0xAA44, 0x72E3, 0xAA45, 0x72E4, 0xAA46, 0x72E5,
+ 0xAA47, 0x72E6, 0xAA48, 0x72E7, 0xAA49, 0x72EA, 0xAA4A, 0x72EB,
+ 0xAA4B, 0x72F5, 0xAA4C, 0x72F6, 0xAA4D, 0x72F9, 0xAA4E, 0x72FD,
+ 0xAA4F, 0x72FE, 0xAA50, 0x72FF, 0xAA51, 0x7300, 0xAA52, 0x7302,
+ 0xAA53, 0x7304, 0xAA54, 0x7305, 0xAA55, 0x7306, 0xAA56, 0x7307,
+ 0xAA57, 0x7308, 0xAA58, 0x7309, 0xAA59, 0x730B, 0xAA5A, 0x730C,
+ 0xAA5B, 0x730D, 0xAA5C, 0x730F, 0xAA5D, 0x7310, 0xAA5E, 0x7311,
+ 0xAA5F, 0x7312, 0xAA60, 0x7314, 0xAA61, 0x7318, 0xAA62, 0x7319,
+ 0xAA63, 0x731A, 0xAA64, 0x731F, 0xAA65, 0x7320, 0xAA66, 0x7323,
+ 0xAA67, 0x7324, 0xAA68, 0x7326, 0xAA69, 0x7327, 0xAA6A, 0x7328,
+ 0xAA6B, 0x732D, 0xAA6C, 0x732F, 0xAA6D, 0x7330, 0xAA6E, 0x7332,
+ 0xAA6F, 0x7333, 0xAA70, 0x7335, 0xAA71, 0x7336, 0xAA72, 0x733A,
+ 0xAA73, 0x733B, 0xAA74, 0x733C, 0xAA75, 0x733D, 0xAA76, 0x7340,
+ 0xAA77, 0x7341, 0xAA78, 0x7342, 0xAA79, 0x7343, 0xAA7A, 0x7344,
+ 0xAA7B, 0x7345, 0xAA7C, 0x7346, 0xAA7D, 0x7347, 0xAA7E, 0x7348,
+ 0xAA80, 0x7349, 0xAA81, 0x734A, 0xAA82, 0x734B, 0xAA83, 0x734C,
+ 0xAA84, 0x734E, 0xAA85, 0x734F, 0xAA86, 0x7351, 0xAA87, 0x7353,
+ 0xAA88, 0x7354, 0xAA89, 0x7355, 0xAA8A, 0x7356, 0xAA8B, 0x7358,
+ 0xAA8C, 0x7359, 0xAA8D, 0x735A, 0xAA8E, 0x735B, 0xAA8F, 0x735C,
+ 0xAA90, 0x735D, 0xAA91, 0x735E, 0xAA92, 0x735F, 0xAA93, 0x7361,
+ 0xAA94, 0x7362, 0xAA95, 0x7363, 0xAA96, 0x7364, 0xAA97, 0x7365,
+ 0xAA98, 0x7366, 0xAA99, 0x7367, 0xAA9A, 0x7368, 0xAA9B, 0x7369,
+ 0xAA9C, 0x736A, 0xAA9D, 0x736B, 0xAA9E, 0x736E, 0xAA9F, 0x7370,
+ 0xAAA0, 0x7371, 0xAB40, 0x7372, 0xAB41, 0x7373, 0xAB42, 0x7374,
+ 0xAB43, 0x7375, 0xAB44, 0x7376, 0xAB45, 0x7377, 0xAB46, 0x7378,
+ 0xAB47, 0x7379, 0xAB48, 0x737A, 0xAB49, 0x737B, 0xAB4A, 0x737C,
+ 0xAB4B, 0x737D, 0xAB4C, 0x737F, 0xAB4D, 0x7380, 0xAB4E, 0x7381,
+ 0xAB4F, 0x7382, 0xAB50, 0x7383, 0xAB51, 0x7385, 0xAB52, 0x7386,
+ 0xAB53, 0x7388, 0xAB54, 0x738A, 0xAB55, 0x738C, 0xAB56, 0x738D,
+ 0xAB57, 0x738F, 0xAB58, 0x7390, 0xAB59, 0x7392, 0xAB5A, 0x7393,
+ 0xAB5B, 0x7394, 0xAB5C, 0x7395, 0xAB5D, 0x7397, 0xAB5E, 0x7398,
+ 0xAB5F, 0x7399, 0xAB60, 0x739A, 0xAB61, 0x739C, 0xAB62, 0x739D,
+ 0xAB63, 0x739E, 0xAB64, 0x73A0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400, 0xAC49, 0x7401, 0xAC4A, 0x7402,
+ 0xAC4B, 0x7404, 0xAC4C, 0x7407, 0xAC4D, 0x7408, 0xAC4E, 0x740B,
+ 0xAC4F, 0x740C, 0xAC50, 0x740D, 0xAC51, 0x740E, 0xAC52, 0x7411,
+ 0xAC53, 0x7412, 0xAC54, 0x7413, 0xAC55, 0x7414, 0xAC56, 0x7415,
+ 0xAC57, 0x7416, 0xAC58, 0x7417, 0xAC59, 0x7418, 0xAC5A, 0x7419,
+ 0xAC5B, 0x741C, 0xAC5C, 0x741D, 0xAC5D, 0x741E, 0xAC5E, 0x741F,
+ 0xAC5F, 0x7420, 0xAC60, 0x7421, 0xAC61, 0x7423, 0xAC62, 0x7424,
+ 0xAC63, 0x7427, 0xAC64, 0x7429, 0xAC65, 0x742B, 0xAC66, 0x742D,
+ 0xAC67, 0x742F, 0xAC68, 0x7431, 0xAC69, 0x7432, 0xAC6A, 0x7437,
+ 0xAC6B, 0x7438, 0xAC6C, 0x7439, 0xAC6D, 0x743A, 0xAC6E, 0x743B,
+ 0xAC6F, 0x743D, 0xAC70, 0x743E, 0xAC71, 0x743F, 0xAC72, 0x7440,
+ 0xAC73, 0x7442, 0xAC74, 0x7443, 0xAC75, 0x7444, 0xAC76, 0x7445,
+ 0xAC77, 0x7446, 0xAC78, 0x7447, 0xAC79, 0x7448, 0xAC7A, 0x7449,
+ 0xAC7B, 0x744A, 0xAC7C, 0x744B, 0xAC7D, 0x744C, 0xAC7E, 0x744D,
+ 0xAC80, 0x744E, 0xAC81, 0x744F, 0xAC82, 0x7450, 0xAC83, 0x7451,
+ 0xAC84, 0x7452, 0xAC85, 0x7453, 0xAC86, 0x7454, 0xAC87, 0x7456,
+ 0xAC88, 0x7458, 0xAC89, 0x745D, 0xAC8A, 0x7460, 0xAC8B, 0x7461,
+ 0xAC8C, 0x7462, 0xAC8D, 0x7463, 0xAC8E, 0x7464, 0xAC8F, 0x7465,
+ 0xAC90, 0x7466, 0xAC91, 0x7467, 0xAC92, 0x7468, 0xAC93, 0x7469,
+ 0xAC94, 0x746A, 0xAC95, 0x746B, 0xAC96, 0x746C, 0xAC97, 0x746E,
+ 0xAC98, 0x746F, 0xAC99, 0x7471, 0xAC9A, 0x7472, 0xAC9B, 0x7473,
+ 0xAC9C, 0x7474, 0xAC9D, 0x7475, 0xAC9E, 0x7478, 0xAC9F, 0x7479,
+ 0xACA0, 0x747A, 0xAD40, 0x747B, 0xAD41, 0x747C, 0xAD42, 0x747D,
+ 0xAD43, 0x747F, 0xAD44, 0x7482, 0xAD45, 0x7484, 0xAD46, 0x7485,
+ 0xAD47, 0x7486, 0xAD48, 0x7488, 0xAD49, 0x7489, 0xAD4A, 0x748A,
+ 0xAD4B, 0x748C, 0xAD4C, 0x748D, 0xAD4D, 0x748F, 0xAD4E, 0x7491,
+ 0xAD4F, 0x7492, 0xAD50, 0x7493, 0xAD51, 0x7494, 0xAD52, 0x7495,
+ 0xAD53, 0x7496, 0xAD54, 0x7497, 0xAD55, 0x7498, 0xAD56, 0x7499,
+ 0xAD57, 0x749A, 0xAD58, 0x749B, 0xAD59, 0x749D, 0xAD5A, 0x749F,
+ 0xAD5B, 0x74A0, 0xAD5C, 0x74A1, 0xAD5D, 0x74A2, 0xAD5E, 0x74A3,
+ 0xAD5F, 0x74A4, 0xAD60, 0x74A5, 0xAD61, 0x74A6, 0xAD62, 0x74AA,
+ 0xAD63, 0x74AB, 0xAD64, 0x74AC, 0xAD65, 0x74AD, 0xAD66, 0x74AE,
+ 0xAD67, 0x74AF, 0xAD68, 0x74B0, 0xAD69, 0x74B1, 0xAD6A, 0x74B2,
+ 0xAD6B, 0x74B3, 0xAD6C, 0x74B4, 0xAD6D, 0x74B5, 0xAD6E, 0x74B6,
+ 0xAD6F, 0x74B7, 0xAD70, 0x74B8, 0xAD71, 0x74B9, 0xAD72, 0x74BB,
+ 0xAD73, 0x74BC, 0xAD74, 0x74BD, 0xAD75, 0x74BE, 0xAD76, 0x74BF,
+ 0xAD77, 0x74C0, 0xAD78, 0x74C1, 0xAD79, 0x74C2, 0xAD7A, 0x74C3,
+ 0xAD7B, 0x74C4, 0xAD7C, 0x74C5, 0xAD7D, 0x74C6, 0xAD7E, 0x74C7,
+ 0xAD80, 0x74C8, 0xAD81, 0x74C9, 0xAD82, 0x74CA, 0xAD83, 0x74CB,
+ 0xAD84, 0x74CC, 0xAD85, 0x74CD, 0xAD86, 0x74CE, 0xAD87, 0x74CF,
+ 0xAD88, 0x74D0, 0xAD89, 0x74D1, 0xAD8A, 0x74D3, 0xAD8B, 0x74D4,
+ 0xAD8C, 0x74D5, 0xAD8D, 0x74D6, 0xAD8E, 0x74D7, 0xAD8F, 0x74D8,
+ 0xAD90, 0x74D9, 0xAD91, 0x74DA, 0xAD92, 0x74DB, 0xAD93, 0x74DD,
+ 0xAD94, 0x74DF, 0xAD95, 0x74E1, 0xAD96, 0x74E5, 0xAD97, 0x74E7,
+ 0xAD98, 0x74E8, 0xAD99, 0x74E9, 0xAD9A, 0x74EA, 0xAD9B, 0x74EB,
+ 0xAD9C, 0x74EC, 0xAD9D, 0x74ED, 0xAD9E, 0x74F0, 0xAD9F, 0x74F1,
+ 0xADA0, 0x74F2, 0xAE40, 0x74F3, 0xAE41, 0x74F5, 0xAE42, 0x74F8,
+ 0xAE43, 0x74F9, 0xAE44, 0x74FA, 0xAE45, 0x74FB, 0xAE46, 0x74FC,
+ 0xAE47, 0x74FD, 0xAE48, 0x74FE, 0xAE49, 0x7500, 0xAE4A, 0x7501,
+ 0xAE4B, 0x7502, 0xAE4C, 0x7503, 0xAE4D, 0x7505, 0xAE4E, 0x7506,
+ 0xAE4F, 0x7507, 0xAE50, 0x7508, 0xAE51, 0x7509, 0xAE52, 0x750A,
+ 0xAE53, 0x750B, 0xAE54, 0x750C, 0xAE55, 0x750E, 0xAE56, 0x7510,
+ 0xAE57, 0x7512, 0xAE58, 0x7514, 0xAE59, 0x7515, 0xAE5A, 0x7516,
+ 0xAE5B, 0x7517, 0xAE5C, 0x751B, 0xAE5D, 0x751D, 0xAE5E, 0x751E,
+ 0xAE5F, 0x7520, 0xAE60, 0x7521, 0xAE61, 0x7522, 0xAE62, 0x7523,
+ 0xAE63, 0x7524, 0xAE64, 0x7526, 0xAE65, 0x7527, 0xAE66, 0x752A,
+ 0xAE67, 0x752E, 0xAE68, 0x7534, 0xAE69, 0x7536, 0xAE6A, 0x7539,
+ 0xAE6B, 0x753C, 0xAE6C, 0x753D, 0xAE6D, 0x753F, 0xAE6E, 0x7541,
+ 0xAE6F, 0x7542, 0xAE70, 0x7543, 0xAE71, 0x7544, 0xAE72, 0x7546,
+ 0xAE73, 0x7547, 0xAE74, 0x7549, 0xAE75, 0x754A, 0xAE76, 0x754D,
+ 0xAE77, 0x7550, 0xAE78, 0x7551, 0xAE79, 0x7552, 0xAE7A, 0x7553,
+ 0xAE7B, 0x7555, 0xAE7C, 0x7556, 0xAE7D, 0x7557, 0xAE7E, 0x7558,
+ 0xAE80, 0x755D, 0xAE81, 0x755E, 0xAE82, 0x755F, 0xAE83, 0x7560,
+ 0xAE84, 0x7561, 0xAE85, 0x7562, 0xAE86, 0x7563, 0xAE87, 0x7564,
+ 0xAE88, 0x7567, 0xAE89, 0x7568, 0xAE8A, 0x7569, 0xAE8B, 0x756B,
+ 0xAE8C, 0x756C, 0xAE8D, 0x756D, 0xAE8E, 0x756E, 0xAE8F, 0x756F,
+ 0xAE90, 0x7570, 0xAE91, 0x7571, 0xAE92, 0x7573, 0xAE93, 0x7575,
+ 0xAE94, 0x7576, 0xAE95, 0x7577, 0xAE96, 0x757A, 0xAE97, 0x757B,
+ 0xAE98, 0x757C, 0xAE99, 0x757D, 0xAE9A, 0x757E, 0xAE9B, 0x7580,
+ 0xAE9C, 0x7581, 0xAE9D, 0x7582, 0xAE9E, 0x7584, 0xAE9F, 0x7585,
+ 0xAEA0, 0x7587, 0xAF40, 0x7588, 0xAF41, 0x7589, 0xAF42, 0x758A,
+ 0xAF43, 0x758C, 0xAF44, 0x758D, 0xAF45, 0x758E, 0xAF46, 0x7590,
+ 0xAF47, 0x7593, 0xAF48, 0x7595, 0xAF49, 0x7598, 0xAF4A, 0x759B,
+ 0xAF4B, 0x759C, 0xAF4C, 0x759E, 0xAF4D, 0x75A2, 0xAF4E, 0x75A6,
+ 0xAF4F, 0x75A7, 0xAF50, 0x75A8, 0xAF51, 0x75A9, 0xAF52, 0x75AA,
+ 0xAF53, 0x75AD, 0xAF54, 0x75B6, 0xAF55, 0x75B7, 0xAF56, 0x75BA,
+ 0xAF57, 0x75BB, 0xAF58, 0x75BF, 0xAF59, 0x75C0, 0xAF5A, 0x75C1,
+ 0xAF5B, 0x75C6, 0xAF5C, 0x75CB, 0xAF5D, 0x75CC, 0xAF5E, 0x75CE,
+ 0xAF5F, 0x75CF, 0xAF60, 0x75D0, 0xAF61, 0x75D1, 0xAF62, 0x75D3,
+ 0xAF63, 0x75D7, 0xAF64, 0x75D9, 0xAF65, 0x75DA, 0xAF66, 0x75DC,
+ 0xAF67, 0x75DD, 0xAF68, 0x75DF, 0xAF69, 0x75E0, 0xAF6A, 0x75E1,
+ 0xAF6B, 0x75E5, 0xAF6C, 0x75E9, 0xAF6D, 0x75EC, 0xAF6E, 0x75ED,
+ 0xAF6F, 0x75EE, 0xAF70, 0x75EF, 0xAF71, 0x75F2, 0xAF72, 0x75F3,
+ 0xAF73, 0x75F5, 0xAF74, 0x75F6, 0xAF75, 0x75F7, 0xAF76, 0x75F8,
+ 0xAF77, 0x75FA, 0xAF78, 0x75FB, 0xAF79, 0x75FD, 0xAF7A, 0x75FE,
+ 0xAF7B, 0x7602, 0xAF7C, 0x7604, 0xAF7D, 0x7606, 0xAF7E, 0x7607,
+ 0xAF80, 0x7608, 0xAF81, 0x7609, 0xAF82, 0x760B, 0xAF83, 0x760D,
+ 0xAF84, 0x760E, 0xAF85, 0x760F, 0xAF86, 0x7611, 0xAF87, 0x7612,
+ 0xAF88, 0x7613, 0xAF89, 0x7614, 0xAF8A, 0x7616, 0xAF8B, 0x761A,
+ 0xAF8C, 0x761C, 0xAF8D, 0x761D, 0xAF8E, 0x761E, 0xAF8F, 0x7621,
+ 0xAF90, 0x7623, 0xAF91, 0x7627, 0xAF92, 0x7628, 0xAF93, 0x762C,
+ 0xAF94, 0x762E, 0xAF95, 0x762F, 0xAF96, 0x7631, 0xAF97, 0x7632,
+ 0xAF98, 0x7636, 0xAF99, 0x7637, 0xAF9A, 0x7639, 0xAF9B, 0x763A,
+ 0xAF9C, 0x763B, 0xAF9D, 0x763D, 0xAF9E, 0x7641, 0xAF9F, 0x7642,
+ 0xAFA0, 0x7644, 0xB040, 0x7645, 0xB041, 0x7646, 0xB042, 0x7647,
+ 0xB043, 0x7648, 0xB044, 0x7649, 0xB045, 0x764A, 0xB046, 0x764B,
+ 0xB047, 0x764E, 0xB048, 0x764F, 0xB049, 0x7650, 0xB04A, 0x7651,
+ 0xB04B, 0x7652, 0xB04C, 0x7653, 0xB04D, 0x7655, 0xB04E, 0x7657,
+ 0xB04F, 0x7658, 0xB050, 0x7659, 0xB051, 0x765A, 0xB052, 0x765B,
+ 0xB053, 0x765D, 0xB054, 0x765F, 0xB055, 0x7660, 0xB056, 0x7661,
+ 0xB057, 0x7662, 0xB058, 0x7664, 0xB059, 0x7665, 0xB05A, 0x7666,
+ 0xB05B, 0x7667, 0xB05C, 0x7668, 0xB05D, 0x7669, 0xB05E, 0x766A,
+ 0xB05F, 0x766C, 0xB060, 0x766D, 0xB061, 0x766E, 0xB062, 0x7670,
+ 0xB063, 0x7671, 0xB064, 0x7672, 0xB065, 0x7673, 0xB066, 0x7674,
+ 0xB067, 0x7675, 0xB068, 0x7676, 0xB069, 0x7677, 0xB06A, 0x7679,
+ 0xB06B, 0x767A, 0xB06C, 0x767C, 0xB06D, 0x767F, 0xB06E, 0x7680,
+ 0xB06F, 0x7681, 0xB070, 0x7683, 0xB071, 0x7685, 0xB072, 0x7689,
+ 0xB073, 0x768A, 0xB074, 0x768C, 0xB075, 0x768D, 0xB076, 0x768F,
+ 0xB077, 0x7690, 0xB078, 0x7692, 0xB079, 0x7694, 0xB07A, 0x7695,
+ 0xB07B, 0x7697, 0xB07C, 0x7698, 0xB07D, 0x769A, 0xB07E, 0x769B,
+ 0xB080, 0x769C, 0xB081, 0x769D, 0xB082, 0x769E, 0xB083, 0x769F,
+ 0xB084, 0x76A0, 0xB085, 0x76A1, 0xB086, 0x76A2, 0xB087, 0x76A3,
+ 0xB088, 0x76A5, 0xB089, 0x76A6, 0xB08A, 0x76A7, 0xB08B, 0x76A8,
+ 0xB08C, 0x76A9, 0xB08D, 0x76AA, 0xB08E, 0x76AB, 0xB08F, 0x76AC,
+ 0xB090, 0x76AD, 0xB091, 0x76AF, 0xB092, 0x76B0, 0xB093, 0x76B3,
+ 0xB094, 0x76B5, 0xB095, 0x76B6, 0xB096, 0x76B7, 0xB097, 0x76B8,
+ 0xB098, 0x76B9, 0xB099, 0x76BA, 0xB09A, 0x76BB, 0xB09B, 0x76BC,
+ 0xB09C, 0x76BD, 0xB09D, 0x76BE, 0xB09E, 0x76C0, 0xB09F, 0x76C1,
+ 0xB0A0, 0x76C3, 0xB0A1, 0x554A, 0xB0A2, 0x963F, 0xB0A3, 0x57C3,
+ 0xB0A4, 0x6328, 0xB0A5, 0x54CE, 0xB0A6, 0x5509, 0xB0A7, 0x54C0,
+ 0xB0A8, 0x7691, 0xB0A9, 0x764C, 0xB0AA, 0x853C, 0xB0AB, 0x77EE,
+ 0xB0AC, 0x827E, 0xB0AD, 0x788D, 0xB0AE, 0x7231, 0xB0AF, 0x9698,
+ 0xB0B0, 0x978D, 0xB0B1, 0x6C28, 0xB0B2, 0x5B89, 0xB0B3, 0x4FFA,
+ 0xB0B4, 0x6309, 0xB0B5, 0x6697, 0xB0B6, 0x5CB8, 0xB0B7, 0x80FA,
+ 0xB0B8, 0x6848, 0xB0B9, 0x80AE, 0xB0BA, 0x6602, 0xB0BB, 0x76CE,
+ 0xB0BC, 0x51F9, 0xB0BD, 0x6556, 0xB0BE, 0x71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9, 0xB143, 0x76CB, 0xB144, 0x76CC,
+ 0xB145, 0x76D3, 0xB146, 0x76D5, 0xB147, 0x76D9, 0xB148, 0x76DA,
+ 0xB149, 0x76DC, 0xB14A, 0x76DD, 0xB14B, 0x76DE, 0xB14C, 0x76E0,
+ 0xB14D, 0x76E1, 0xB14E, 0x76E2, 0xB14F, 0x76E3, 0xB150, 0x76E4,
+ 0xB151, 0x76E6, 0xB152, 0x76E7, 0xB153, 0x76E8, 0xB154, 0x76E9,
+ 0xB155, 0x76EA, 0xB156, 0x76EB, 0xB157, 0x76EC, 0xB158, 0x76ED,
+ 0xB159, 0x76F0, 0xB15A, 0x76F3, 0xB15B, 0x76F5, 0xB15C, 0x76F6,
+ 0xB15D, 0x76F7, 0xB15E, 0x76FA, 0xB15F, 0x76FB, 0xB160, 0x76FD,
+ 0xB161, 0x76FF, 0xB162, 0x7700, 0xB163, 0x7702, 0xB164, 0x7703,
+ 0xB165, 0x7705, 0xB166, 0x7706, 0xB167, 0x770A, 0xB168, 0x770C,
+ 0xB169, 0x770E, 0xB16A, 0x770F, 0xB16B, 0x7710, 0xB16C, 0x7711,
+ 0xB16D, 0x7712, 0xB16E, 0x7713, 0xB16F, 0x7714, 0xB170, 0x7715,
+ 0xB171, 0x7716, 0xB172, 0x7717, 0xB173, 0x7718, 0xB174, 0x771B,
+ 0xB175, 0x771C, 0xB176, 0x771D, 0xB177, 0x771E, 0xB178, 0x7721,
+ 0xB179, 0x7723, 0xB17A, 0x7724, 0xB17B, 0x7725, 0xB17C, 0x7727,
+ 0xB17D, 0x772A, 0xB17E, 0x772B, 0xB180, 0x772C, 0xB181, 0x772E,
+ 0xB182, 0x7730, 0xB183, 0x7731, 0xB184, 0x7732, 0xB185, 0x7733,
+ 0xB186, 0x7734, 0xB187, 0x7739, 0xB188, 0x773B, 0xB189, 0x773D,
+ 0xB18A, 0x773E, 0xB18B, 0x773F, 0xB18C, 0x7742, 0xB18D, 0x7744,
+ 0xB18E, 0x7745, 0xB18F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 0x5E87, 0xB1D4, 0x75F9, 0xB1D5, 0x95ED,
+ 0xB1D6, 0x655D, 0xB1D7, 0x5F0A, 0xB1D8, 0x5FC5, 0xB1D9, 0x8F9F,
+ 0xB1DA, 0x58C1, 0xB1DB, 0x81C2, 0xB1DC, 0x907F, 0xB1DD, 0x965B,
+ 0xB1DE, 0x97AD, 0xB1DF, 0x8FB9, 0xB1E0, 0x7F16, 0xB1E1, 0x8D2C,
+ 0xB1E2, 0x6241, 0xB1E3, 0x4FBF, 0xB1E4, 0x53D8, 0xB1E5, 0x535E,
+ 0xB1E6, 0x8FA8, 0xB1E7, 0x8FA9, 0xB1E8, 0x8FAB, 0xB1E9, 0x904D,
+ 0xB1EA, 0x6807, 0xB1EB, 0x5F6A, 0xB1EC, 0x8198, 0xB1ED, 0x8868,
+ 0xB1EE, 0x9CD6, 0xB1EF, 0x618B, 0xB1F0, 0x522B, 0xB1F1, 0x762A,
+ 0xB1F2, 0x5F6C, 0xB1F3, 0x658C, 0xB1F4, 0x6FD2, 0xB1F5, 0x6EE8,
+ 0xB1F6, 0x5BBE, 0xB1F7, 0x6448, 0xB1F8, 0x5175, 0xB1F9, 0x51B0,
+ 0xB1FA, 0x67C4, 0xB1FB, 0x4E19, 0xB1FC, 0x79C9, 0xB1FD, 0x997C,
+ 0xB1FE, 0x70B3, 0xB240, 0x775D, 0xB241, 0x775E, 0xB242, 0x775F,
+ 0xB243, 0x7760, 0xB244, 0x7764, 0xB245, 0x7767, 0xB246, 0x7769,
+ 0xB247, 0x776A, 0xB248, 0x776D, 0xB249, 0x776E, 0xB24A, 0x776F,
+ 0xB24B, 0x7770, 0xB24C, 0x7771, 0xB24D, 0x7772, 0xB24E, 0x7773,
+ 0xB24F, 0x7774, 0xB250, 0x7775, 0xB251, 0x7776, 0xB252, 0x7777,
+ 0xB253, 0x7778, 0xB254, 0x777A, 0xB255, 0x777B, 0xB256, 0x777C,
+ 0xB257, 0x7781, 0xB258, 0x7782, 0xB259, 0x7783, 0xB25A, 0x7786,
+ 0xB25B, 0x7787, 0xB25C, 0x7788, 0xB25D, 0x7789, 0xB25E, 0x778A,
+ 0xB25F, 0x778B, 0xB260, 0x778F, 0xB261, 0x7790, 0xB262, 0x7793,
+ 0xB263, 0x7794, 0xB264, 0x7795, 0xB265, 0x7796, 0xB266, 0x7797,
+ 0xB267, 0x7798, 0xB268, 0x7799, 0xB269, 0x779A, 0xB26A, 0x779B,
+ 0xB26B, 0x779C, 0xB26C, 0x779D, 0xB26D, 0x779E, 0xB26E, 0x77A1,
+ 0xB26F, 0x77A3, 0xB270, 0x77A4, 0xB271, 0x77A6, 0xB272, 0x77A8,
+ 0xB273, 0x77AB, 0xB274, 0x77AD, 0xB275, 0x77AE, 0xB276, 0x77AF,
+ 0xB277, 0x77B1, 0xB278, 0x77B2, 0xB279, 0x77B4, 0xB27A, 0x77B6,
+ 0xB27B, 0x77B7, 0xB27C, 0x77B8, 0xB27D, 0x77B9, 0xB27E, 0x77BA,
+ 0xB280, 0x77BC, 0xB281, 0x77BE, 0xB282, 0x77C0, 0xB283, 0x77C1,
+ 0xB284, 0x77C2, 0xB285, 0x77C3, 0xB286, 0x77C4, 0xB287, 0x77C5,
+ 0xB288, 0x77C6, 0xB289, 0x77C7, 0xB28A, 0x77C8, 0xB28B, 0x77C9,
+ 0xB28C, 0x77CA, 0xB28D, 0x77CB, 0xB28E, 0x77CC, 0xB28F, 0x77CE,
+ 0xB290, 0x77CF, 0xB291, 0x77D0, 0xB292, 0x77D1, 0xB293, 0x77D2,
+ 0xB294, 0x77D3, 0xB295, 0x77D4, 0xB296, 0x77D5, 0xB297, 0x77D6,
+ 0xB298, 0x77D8, 0xB299, 0x77D9, 0xB29A, 0x77DA, 0xB29B, 0x77DD,
+ 0xB29C, 0x77DE, 0xB29D, 0x77DF, 0xB29E, 0x77E0, 0xB29F, 0x77E1,
+ 0xB2A0, 0x77E4, 0xB2A1, 0x75C5, 0xB2A2, 0x5E76, 0xB2A3, 0x73BB,
+ 0xB2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, 0xB2E6, 0x53C9, 0xB2E7, 0x832C,
+ 0xB2E8, 0x8336, 0xB2E9, 0x67E5, 0xB2EA, 0x78B4, 0xB2EB, 0x643D,
+ 0xB2EC, 0x5BDF, 0xB2ED, 0x5C94, 0xB2EE, 0x5DEE, 0xB2EF, 0x8BE7,
+ 0xB2F0, 0x62C6, 0xB2F1, 0x67F4, 0xB2F2, 0x8C7A, 0xB2F3, 0x6400,
+ 0xB2F4, 0x63BA, 0xB2F5, 0x8749, 0xB2F6, 0x998B, 0xB2F7, 0x8C17,
+ 0xB2F8, 0x7F20, 0xB2F9, 0x94F2, 0xB2FA, 0x4EA7, 0xB2FB, 0x9610,
+ 0xB2FC, 0x98A4, 0xB2FD, 0x660C, 0xB2FE, 0x7316, 0xB340, 0x77E6,
+ 0xB341, 0x77E8, 0xB342, 0x77EA, 0xB343, 0x77EF, 0xB344, 0x77F0,
+ 0xB345, 0x77F1, 0xB346, 0x77F2, 0xB347, 0x77F4, 0xB348, 0x77F5,
+ 0xB349, 0x77F7, 0xB34A, 0x77F9, 0xB34B, 0x77FA, 0xB34C, 0x77FB,
+ 0xB34D, 0x77FC, 0xB34E, 0x7803, 0xB34F, 0x7804, 0xB350, 0x7805,
+ 0xB351, 0x7806, 0xB352, 0x7807, 0xB353, 0x7808, 0xB354, 0x780A,
+ 0xB355, 0x780B, 0xB356, 0x780E, 0xB357, 0x780F, 0xB358, 0x7810,
+ 0xB359, 0x7813, 0xB35A, 0x7815, 0xB35B, 0x7819, 0xB35C, 0x781B,
+ 0xB35D, 0x781E, 0xB35E, 0x7820, 0xB35F, 0x7821, 0xB360, 0x7822,
+ 0xB361, 0x7824, 0xB362, 0x7828, 0xB363, 0x782A, 0xB364, 0x782B,
+ 0xB365, 0x782E, 0xB366, 0x782F, 0xB367, 0x7831, 0xB368, 0x7832,
+ 0xB369, 0x7833, 0xB36A, 0x7835, 0xB36B, 0x7836, 0xB36C, 0x783D,
+ 0xB36D, 0x783F, 0xB36E, 0x7841, 0xB36F, 0x7842, 0xB370, 0x7843,
+ 0xB371, 0x7844, 0xB372, 0x7846, 0xB373, 0x7848, 0xB374, 0x7849,
+ 0xB375, 0x784A, 0xB376, 0x784B, 0xB377, 0x784D, 0xB378, 0x784F,
+ 0xB379, 0x7851, 0xB37A, 0x7853, 0xB37B, 0x7854, 0xB37C, 0x7858,
+ 0xB37D, 0x7859, 0xB37E, 0x785A, 0xB380, 0x785B, 0xB381, 0x785C,
+ 0xB382, 0x785E, 0xB383, 0x785F, 0xB384, 0x7860, 0xB385, 0x7861,
+ 0xB386, 0x7862, 0xB387, 0x7863, 0xB388, 0x7864, 0xB389, 0x7865,
+ 0xB38A, 0x7866, 0xB38B, 0x7867, 0xB38C, 0x7868, 0xB38D, 0x7869,
+ 0xB38E, 0x786F, 0xB38F, 0x7870, 0xB390, 0x7871, 0xB391, 0x7872,
+ 0xB392, 0x7873, 0xB393, 0x7874, 0xB394, 0x7875, 0xB395, 0x7876,
+ 0xB396, 0x7878, 0xB397, 0x7879, 0xB398, 0x787A, 0xB399, 0x787B,
+ 0xB39A, 0x787D, 0xB39B, 0x787E, 0xB39C, 0x787F, 0xB39D, 0x7880,
+ 0xB39E, 0x7881, 0xB39F, 0x7882, 0xB3A0, 0x7883, 0xB3A1, 0x573A,
+ 0xB3A2, 0x5C1D, 0xB3A3, 0x5E38, 0xB3A4, 0x957F, 0xB3A5, 0x507F,
+ 0xB3A6, 0x80A0, 0xB3A7, 0x5382, 0xB3A8, 0x655E, 0xB3A9, 0x7545,
+ 0xB3AA, 0x5531, 0xB3AB, 0x5021, 0xB3AC, 0x8D85, 0xB3AD, 0x6284,
+ 0xB3AE, 0x949E, 0xB3AF, 0x671D, 0xB3B0, 0x5632, 0xB3B1, 0x6F6E,
+ 0xB3B2, 0x5DE2, 0xB3B3, 0x5435, 0xB3B4, 0x7092, 0xB3B5, 0x8F66,
+ 0xB3B6, 0x626F, 0xB3B7, 0x64A4, 0xB3B8, 0x63A3, 0xB3B9, 0x5F7B,
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FB, 0x96CF, 0xB3FC, 0x6EC1, 0xB3FD, 0x9664,
+ 0xB3FE, 0x695A, 0xB440, 0x7884, 0xB441, 0x7885, 0xB442, 0x7886,
+ 0xB443, 0x7888, 0xB444, 0x788A, 0xB445, 0x788B, 0xB446, 0x788F,
+ 0xB447, 0x7890, 0xB448, 0x7892, 0xB449, 0x7894, 0xB44A, 0x7895,
+ 0xB44B, 0x7896, 0xB44C, 0x7899, 0xB44D, 0x789D, 0xB44E, 0x789E,
+ 0xB44F, 0x78A0, 0xB450, 0x78A2, 0xB451, 0x78A4, 0xB452, 0x78A6,
+ 0xB453, 0x78A8, 0xB454, 0x78A9, 0xB455, 0x78AA, 0xB456, 0x78AB,
+ 0xB457, 0x78AC, 0xB458, 0x78AD, 0xB459, 0x78AE, 0xB45A, 0x78AF,
+ 0xB45B, 0x78B5, 0xB45C, 0x78B6, 0xB45D, 0x78B7, 0xB45E, 0x78B8,
+ 0xB45F, 0x78BA, 0xB460, 0x78BB, 0xB461, 0x78BC, 0xB462, 0x78BD,
+ 0xB463, 0x78BF, 0xB464, 0x78C0, 0xB465, 0x78C2, 0xB466, 0x78C3,
+ 0xB467, 0x78C4, 0xB468, 0x78C6, 0xB469, 0x78C7, 0xB46A, 0x78C8,
+ 0xB46B, 0x78CC, 0xB46C, 0x78CD, 0xB46D, 0x78CE, 0xB46E, 0x78CF,
+ 0xB46F, 0x78D1, 0xB470, 0x78D2, 0xB471, 0x78D3, 0xB472, 0x78D6,
+ 0xB473, 0x78D7, 0xB474, 0x78D8, 0xB475, 0x78DA, 0xB476, 0x78DB,
+ 0xB477, 0x78DC, 0xB478, 0x78DD, 0xB479, 0x78DE, 0xB47A, 0x78DF,
+ 0xB47B, 0x78E0, 0xB47C, 0x78E1, 0xB47D, 0x78E2, 0xB47E, 0x78E3,
+ 0xB480, 0x78E4, 0xB481, 0x78E5, 0xB482, 0x78E6, 0xB483, 0x78E7,
+ 0xB484, 0x78E9, 0xB485, 0x78EA, 0xB486, 0x78EB, 0xB487, 0x78ED,
+ 0xB488, 0x78EE, 0xB489, 0x78EF, 0xB48A, 0x78F0, 0xB48B, 0x78F1,
+ 0xB48C, 0x78F3, 0xB48D, 0x78F5, 0xB48E, 0x78F6, 0xB48F, 0x78F8,
+ 0xB490, 0x78F9, 0xB491, 0x78FB, 0xB492, 0x78FC, 0xB493, 0x78FD,
+ 0xB494, 0x78FE, 0xB495, 0x78FF, 0xB496, 0x7900, 0xB497, 0x7902,
+ 0xB498, 0x7903, 0xB499, 0x7904, 0xB49A, 0x7906, 0xB49B, 0x7907,
+ 0xB49C, 0x7908, 0xB49D, 0x7909, 0xB49E, 0x790A, 0xB49F, 0x790B,
+ 0xB4A0, 0x790C, 0xB4A1, 0x7840, 0xB4A2, 0x50A8, 0xB4A3, 0x77D7,
+ 0xB4A4, 0x6410, 0xB4A5, 0x89E6, 0xB4A6, 0x5904, 0xB4A7, 0x63E3,
+ 0xB4A8, 0x5DDD, 0xB4A9, 0x7A7F, 0xB4AA, 0x693D, 0xB4AB, 0x4F20,
+ 0xB4AC, 0x8239, 0xB4AD, 0x5598, 0xB4AE, 0x4E32, 0xB4AF, 0x75AE,
+ 0xB4B0, 0x7A97, 0xB4B1, 0x5E62, 0xB4B2, 0x5E8A, 0xB4B3, 0x95EF,
+ 0xB4B4, 0x521B, 0xB4B5, 0x5439, 0xB4B6, 0x708A, 0xB4B7, 0x6376,
+ 0xB4B8, 0x9524, 0xB4B9, 0x5782, 0xB4BA, 0x6625, 0xB4BB, 0x693F,
+ 0xB4BC, 0x9187, 0xB4BD, 0x5507, 0xB4BE, 0x6DF3, 0xB4BF, 0x7EAF,
+ 0xB4C0, 0x8822, 0xB4C1, 0x6233, 0xB4C2, 0x7EF0, 0xB4C3, 0x75B5,
+ 0xB4C4, 0x8328, 0xB4C5, 0x78C1, 0xB4C6, 0x96CC, 0xB4C7, 0x8F9E,
+ 0xB4C8, 0x6148, 0xB4C9, 0x74F7, 0xB4CA, 0x8BCD, 0xB4CB, 0x6B64,
+ 0xB4CC, 0x523A, 0xB4CD, 0x8D50, 0xB4CE, 0x6B21, 0xB4CF, 0x806A,
+ 0xB4D0, 0x8471, 0xB4D1, 0x56F1, 0xB4D2, 0x5306, 0xB4D3, 0x4ECE,
+ 0xB4D4, 0x4E1B, 0xB4D5, 0x51D1, 0xB4D6, 0x7C97, 0xB4D7, 0x918B,
+ 0xB4D8, 0x7C07, 0xB4D9, 0x4FC3, 0xB4DA, 0x8E7F, 0xB4DB, 0x7BE1,
+ 0xB4DC, 0x7A9C, 0xB4DD, 0x6467, 0xB4DE, 0x5D14, 0xB4DF, 0x50AC,
+ 0xB4E0, 0x8106, 0xB4E1, 0x7601, 0xB4E2, 0x7CB9, 0xB4E3, 0x6DEC,
+ 0xB4E4, 0x7FE0, 0xB4E5, 0x6751, 0xB4E6, 0x5B58, 0xB4E7, 0x5BF8,
+ 0xB4E8, 0x78CB, 0xB4E9, 0x64AE, 0xB4EA, 0x6413, 0xB4EB, 0x63AA,
+ 0xB4EC, 0x632B, 0xB4ED, 0x9519, 0xB4EE, 0x642D, 0xB4EF, 0x8FBE,
+ 0xB4F0, 0x7B54, 0xB4F1, 0x7629, 0xB4F2, 0x6253, 0xB4F3, 0x5927,
+ 0xB4F4, 0x5446, 0xB4F5, 0x6B79, 0xB4F6, 0x50A3, 0xB4F7, 0x6234,
+ 0xB4F8, 0x5E26, 0xB4F9, 0x6B86, 0xB4FA, 0x4EE3, 0xB4FB, 0x8D37,
+ 0xB4FC, 0x888B, 0xB4FD, 0x5F85, 0xB4FE, 0x902E, 0xB540, 0x790D,
+ 0xB541, 0x790E, 0xB542, 0x790F, 0xB543, 0x7910, 0xB544, 0x7911,
+ 0xB545, 0x7912, 0xB546, 0x7914, 0xB547, 0x7915, 0xB548, 0x7916,
+ 0xB549, 0x7917, 0xB54A, 0x7918, 0xB54B, 0x7919, 0xB54C, 0x791A,
+ 0xB54D, 0x791B, 0xB54E, 0x791C, 0xB54F, 0x791D, 0xB550, 0x791F,
+ 0xB551, 0x7920, 0xB552, 0x7921, 0xB553, 0x7922, 0xB554, 0x7923,
+ 0xB555, 0x7925, 0xB556, 0x7926, 0xB557, 0x7927, 0xB558, 0x7928,
+ 0xB559, 0x7929, 0xB55A, 0x792A, 0xB55B, 0x792B, 0xB55C, 0x792C,
+ 0xB55D, 0x792D, 0xB55E, 0x792E, 0xB55F, 0x792F, 0xB560, 0x7930,
+ 0xB561, 0x7931, 0xB562, 0x7932, 0xB563, 0x7933, 0xB564, 0x7935,
+ 0xB565, 0x7936, 0xB566, 0x7937, 0xB567, 0x7938, 0xB568, 0x7939,
+ 0xB569, 0x793D, 0xB56A, 0x793F, 0xB56B, 0x7942, 0xB56C, 0x7943,
+ 0xB56D, 0x7944, 0xB56E, 0x7945, 0xB56F, 0x7947, 0xB570, 0x794A,
+ 0xB571, 0x794B, 0xB572, 0x794C, 0xB573, 0x794D, 0xB574, 0x794E,
+ 0xB575, 0x794F, 0xB576, 0x7950, 0xB577, 0x7951, 0xB578, 0x7952,
+ 0xB579, 0x7954, 0xB57A, 0x7955, 0xB57B, 0x7958, 0xB57C, 0x7959,
+ 0xB57D, 0x7961, 0xB57E, 0x7963, 0xB580, 0x7964, 0xB581, 0x7966,
+ 0xB582, 0x7969, 0xB583, 0x796A, 0xB584, 0x796B, 0xB585, 0x796C,
+ 0xB586, 0x796E, 0xB587, 0x7970, 0xB588, 0x7971, 0xB589, 0x7972,
+ 0xB58A, 0x7973, 0xB58B, 0x7974, 0xB58C, 0x7975, 0xB58D, 0x7976,
+ 0xB58E, 0x7979, 0xB58F, 0x797B, 0xB590, 0x797C, 0xB591, 0x797D,
+ 0xB592, 0x797E, 0xB593, 0x797F, 0xB594, 0x7982, 0xB595, 0x7983,
+ 0xB596, 0x7986, 0xB597, 0x7987, 0xB598, 0x7988, 0xB599, 0x7989,
+ 0xB59A, 0x798B, 0xB59B, 0x798C, 0xB59C, 0x798D, 0xB59D, 0x798E,
+ 0xB59E, 0x7990, 0xB59F, 0x7991, 0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0x6EC7,
+ 0xB5E2, 0x7898, 0xB5E3, 0x70B9, 0xB5E4, 0x5178, 0xB5E5, 0x975B,
+ 0xB5E6, 0x57AB, 0xB5E7, 0x7535, 0xB5E8, 0x4F43, 0xB5E9, 0x7538,
+ 0xB5EA, 0x5E97, 0xB5EB, 0x60E6, 0xB5EC, 0x5960, 0xB5ED, 0x6DC0,
+ 0xB5EE, 0x6BBF, 0xB5EF, 0x7889, 0xB5F0, 0x53FC, 0xB5F1, 0x96D5,
+ 0xB5F2, 0x51CB, 0xB5F3, 0x5201, 0xB5F4, 0x6389, 0xB5F5, 0x540A,
+ 0xB5F6, 0x9493, 0xB5F7, 0x8C03, 0xB5F8, 0x8DCC, 0xB5F9, 0x7239,
+ 0xB5FA, 0x789F, 0xB5FB, 0x8776, 0xB5FC, 0x8FED, 0xB5FD, 0x8C0D,
+ 0xB5FE, 0x53E0, 0xB640, 0x7993, 0xB641, 0x7994, 0xB642, 0x7995,
+ 0xB643, 0x7996, 0xB644, 0x7997, 0xB645, 0x7998, 0xB646, 0x7999,
+ 0xB647, 0x799B, 0xB648, 0x799C, 0xB649, 0x799D, 0xB64A, 0x799E,
+ 0xB64B, 0x799F, 0xB64C, 0x79A0, 0xB64D, 0x79A1, 0xB64E, 0x79A2,
+ 0xB64F, 0x79A3, 0xB650, 0x79A4, 0xB651, 0x79A5, 0xB652, 0x79A6,
+ 0xB653, 0x79A8, 0xB654, 0x79A9, 0xB655, 0x79AA, 0xB656, 0x79AB,
+ 0xB657, 0x79AC, 0xB658, 0x79AD, 0xB659, 0x79AE, 0xB65A, 0x79AF,
+ 0xB65B, 0x79B0, 0xB65C, 0x79B1, 0xB65D, 0x79B2, 0xB65E, 0x79B4,
+ 0xB65F, 0x79B5, 0xB660, 0x79B6, 0xB661, 0x79B7, 0xB662, 0x79B8,
+ 0xB663, 0x79BC, 0xB664, 0x79BF, 0xB665, 0x79C2, 0xB666, 0x79C4,
+ 0xB667, 0x79C5, 0xB668, 0x79C7, 0xB669, 0x79C8, 0xB66A, 0x79CA,
+ 0xB66B, 0x79CC, 0xB66C, 0x79CE, 0xB66D, 0x79CF, 0xB66E, 0x79D0,
+ 0xB66F, 0x79D3, 0xB670, 0x79D4, 0xB671, 0x79D6, 0xB672, 0x79D7,
+ 0xB673, 0x79D9, 0xB674, 0x79DA, 0xB675, 0x79DB, 0xB676, 0x79DC,
+ 0xB677, 0x79DD, 0xB678, 0x79DE, 0xB679, 0x79E0, 0xB67A, 0x79E1,
+ 0xB67B, 0x79E2, 0xB67C, 0x79E5, 0xB67D, 0x79E8, 0xB67E, 0x79EA,
+ 0xB680, 0x79EC, 0xB681, 0x79EE, 0xB682, 0x79F1, 0xB683, 0x79F2,
+ 0xB684, 0x79F3, 0xB685, 0x79F4, 0xB686, 0x79F5, 0xB687, 0x79F6,
+ 0xB688, 0x79F7, 0xB689, 0x79F9, 0xB68A, 0x79FA, 0xB68B, 0x79FC,
+ 0xB68C, 0x79FE, 0xB68D, 0x79FF, 0xB68E, 0x7A01, 0xB68F, 0x7A04,
+ 0xB690, 0x7A05, 0xB691, 0x7A07, 0xB692, 0x7A08, 0xB693, 0x7A09,
+ 0xB694, 0x7A0A, 0xB695, 0x7A0C, 0xB696, 0x7A0F, 0xB697, 0x7A10,
+ 0xB698, 0x7A11, 0xB699, 0x7A12, 0xB69A, 0x7A13, 0xB69B, 0x7A15,
+ 0xB69C, 0x7A16, 0xB69D, 0x7A18, 0xB69E, 0x7A19, 0xB69F, 0x7A1B,
+ 0xB6A0, 0x7A1C, 0xB6A1, 0x4E01, 0xB6A2, 0x76EF, 0xB6A3, 0x53EE,
+ 0xB6A4, 0x9489, 0xB6A5, 0x9876, 0xB6A6, 0x9F0E, 0xB6A7, 0x952D,
+ 0xB6A8, 0x5B9A, 0xB6A9, 0x8BA2, 0xB6AA, 0x4E22, 0xB6AB, 0x4E1C,
+ 0xB6AC, 0x51AC, 0xB6AD, 0x8463, 0xB6AE, 0x61C2, 0xB6AF, 0x52A8,
+ 0xB6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5384, 0xB6F3, 0x627C,
+ 0xB6F4, 0x904F, 0xB6F5, 0x9102, 0xB6F6, 0x997F, 0xB6F7, 0x6069,
+ 0xB6F8, 0x800C, 0xB6F9, 0x513F, 0xB6FA, 0x8033, 0xB6FB, 0x5C14,
+ 0xB6FC, 0x9975, 0xB6FD, 0x6D31, 0xB6FE, 0x4E8C, 0xB740, 0x7A1D,
+ 0xB741, 0x7A1F, 0xB742, 0x7A21, 0xB743, 0x7A22, 0xB744, 0x7A24,
+ 0xB745, 0x7A25, 0xB746, 0x7A26, 0xB747, 0x7A27, 0xB748, 0x7A28,
+ 0xB749, 0x7A29, 0xB74A, 0x7A2A, 0xB74B, 0x7A2B, 0xB74C, 0x7A2C,
+ 0xB74D, 0x7A2D, 0xB74E, 0x7A2E, 0xB74F, 0x7A2F, 0xB750, 0x7A30,
+ 0xB751, 0x7A31, 0xB752, 0x7A32, 0xB753, 0x7A34, 0xB754, 0x7A35,
+ 0xB755, 0x7A36, 0xB756, 0x7A38, 0xB757, 0x7A3A, 0xB758, 0x7A3E,
+ 0xB759, 0x7A40, 0xB75A, 0x7A41, 0xB75B, 0x7A42, 0xB75C, 0x7A43,
+ 0xB75D, 0x7A44, 0xB75E, 0x7A45, 0xB75F, 0x7A47, 0xB760, 0x7A48,
+ 0xB761, 0x7A49, 0xB762, 0x7A4A, 0xB763, 0x7A4B, 0xB764, 0x7A4C,
+ 0xB765, 0x7A4D, 0xB766, 0x7A4E, 0xB767, 0x7A4F, 0xB768, 0x7A50,
+ 0xB769, 0x7A52, 0xB76A, 0x7A53, 0xB76B, 0x7A54, 0xB76C, 0x7A55,
+ 0xB76D, 0x7A56, 0xB76E, 0x7A58, 0xB76F, 0x7A59, 0xB770, 0x7A5A,
+ 0xB771, 0x7A5B, 0xB772, 0x7A5C, 0xB773, 0x7A5D, 0xB774, 0x7A5E,
+ 0xB775, 0x7A5F, 0xB776, 0x7A60, 0xB777, 0x7A61, 0xB778, 0x7A62,
+ 0xB779, 0x7A63, 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 0xB94D, 0x7B42, 0xB94E, 0x7B43, 0xB94F, 0x7B44, 0xB950, 0x7B46,
+ 0xB951, 0x7B48, 0xB952, 0x7B4A, 0xB953, 0x7B4D, 0xB954, 0x7B4E,
+ 0xB955, 0x7B53, 0xB956, 0x7B55, 0xB957, 0x7B57, 0xB958, 0x7B59,
+ 0xB959, 0x7B5C, 0xB95A, 0x7B5E, 0xB95B, 0x7B5F, 0xB95C, 0x7B61,
+ 0xB95D, 0x7B63, 0xB95E, 0x7B64, 0xB95F, 0x7B65, 0xB960, 0x7B66,
+ 0xB961, 0x7B67, 0xB962, 0x7B68, 0xB963, 0x7B69, 0xB964, 0x7B6A,
+ 0xB965, 0x7B6B, 0xB966, 0x7B6C, 0xB967, 0x7B6D, 0xB968, 0x7B6F,
+ 0xB969, 0x7B70, 0xB96A, 0x7B73, 0xB96B, 0x7B74, 0xB96C, 0x7B76,
+ 0xB96D, 0x7B78, 0xB96E, 0x7B7A, 0xB96F, 0x7B7C, 0xB970, 0x7B7D,
+ 0xB971, 0x7B7F, 0xB972, 0x7B81, 0xB973, 0x7B82, 0xB974, 0x7B83,
+ 0xB975, 0x7B84, 0xB976, 0x7B86, 0xB977, 0x7B87, 0xB978, 0x7B88,
+ 0xB979, 0x7B89, 0xB97A, 0x7B8A, 0xB97B, 0x7B8B, 0xB97C, 0x7B8C,
+ 0xB97D, 0x7B8E, 0xB97E, 0x7B8F, 0xB980, 0x7B91, 0xB981, 0x7B92,
+ 0xB982, 0x7B93, 0xB983, 0x7B96, 0xB984, 0x7B98, 0xB985, 0x7B99,
+ 0xB986, 0x7B9A, 0xB987, 0x7B9B, 0xB988, 0x7B9E, 0xB989, 0x7B9F,
+ 0xB98A, 0x7BA0, 0xB98B, 0x7BA3, 0xB98C, 0x7BA4, 0xB98D, 0x7BA5,
+ 0xB98E, 0x7BAE, 0xB98F, 0x7BAF, 0xB990, 0x7BB0, 0xB991, 0x7BB2,
+ 0xB992, 0x7BB3, 0xB993, 0x7BB5, 0x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x9B41,
+ 0xBFFE, 0x5080, 0xC040, 0x7E5E, 0xC041, 0x7E5F, 0xC042, 0x7E60,
+ 0xC043, 0x7E61, 0xC044, 0x7E62, 0xC045, 0x7E63, 0xC046, 0x7E64,
+ 0xC047, 0x7E65, 0xC048, 0x7E66, 0xC049, 0x7E67, 0xC04A, 0x7E68,
+ 0xC04B, 0x7E69, 0xC04C, 0x7E6A, 0xC04D, 0x7E6B, 0xC04E, 0x7E6C,
+ 0xC04F, 0x7E6D, 0xC050, 0x7E6E, 0xC051, 0x7E6F, 0xC052, 0x7E70,
+ 0xC053, 0x7E71, 0xC054, 0x7E72, 0xC055, 0x7E73, 0xC056, 0x7E74,
+ 0xC057, 0x7E75, 0xC058, 0x7E76, 0xC059, 0x7E77, 0xC05A, 0x7E78,
+ 0xC05B, 0x7E79, 0xC05C, 0x7E7A, 0xC05D, 0x7E7B, 0xC05E, 0x7E7C,
+ 0xC05F, 0x7E7D, 0xC060, 0x7E7E, 0xC061, 0x7E7F, 0xC062, 0x7E80,
+ 0xC063, 0x7E81, 0xC064, 0x7E83, 0xC065, 0x7E84, 0xC066, 0x7E85,
+ 0xC067, 0x7E86, 0xC068, 0x7E87, 0xC069, 0x7E88, 0xC06A, 0x7E89,
+ 0xC06B, 0x7E8A, 0xC06C, 0x7E8B, 0xC06D, 0x7E8C, 0xC06E, 0x7E8D,
+ 0xC06F, 0x7E8E, 0xC070, 0x7E8F, 0xC071, 0x7E90, 0xC072, 0x7E91,
+ 0xC073, 0x7E92, 0xC074, 0x7E93, 0xC075, 0x7E94, 0xC076, 0x7E95,
+ 0xC077, 0x7E96, 0xC078, 0x7E97, 0xC079, 0x7E98, 0xC07A, 0x7E99,
+ 0xC07B, 0x7E9A, 0xC07C, 0x7E9C, 0xC07D, 0x7E9D, 0xC07E, 0x7E9E,
+ 0xC080, 0x7EAE, 0xC081, 0x7EB4, 0xC082, 0x7EBB, 0xC083, 0x7EBC,
+ 0xC084, 0x7ED6, 0xC085, 0x7EE4, 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14D, 0x7F6C, 0xC14E, 0x7F6D, 0xC14F, 0x7F6F, 0xC150, 0x7F70,
+ 0xC151, 0x7F73, 0xC152, 0x7F75, 0xC153, 0x7F76, 0xC154, 0x7F77,
+ 0xC155, 0x7F78, 0xC156, 0x7F7A, 0xC157, 0x7F7B, 0xC158, 0x7F7C,
+ 0xC159, 0x7F7D, 0xC15A, 0x7F7F, 0xC15B, 0x7F80, 0xC15C, 0x7F82,
+ 0xC15D, 0x7F83, 0xC15E, 0x7F84, 0xC15F, 0x7F85, 0xC160, 0x7F86,
+ 0xC161, 0x7F87, 0xC162, 0x7F88, 0xC163, 0x7F89, 0xC164, 0x7F8B,
+ 0xC165, 0x7F8D, 0xC166, 0x7F8F, 0xC167, 0x7F90, 0xC168, 0x7F91,
+ 0xC169, 0x7F92, 0xC16A, 0x7F93, 0xC16B, 0x7F95, 0xC16C, 0x7F96,
+ 0xC16D, 0x7F97, 0xC16E, 0x7F98, 0xC16F, 0x7F99, 0xC170, 0x7F9B,
+ 0xC171, 0x7F9C, 0xC172, 0x7FA0, 0xC173, 0x7FA2, 0xC174, 0x7FA3,
+ 0xC175, 0x7FA5, 0xC176, 0x7FA6, 0xC177, 0x7FA8, 0xC178, 0x7FA9,
+ 0xC179, 0x7FAA, 0xC17A, 0x7FAB, 0xC17B, 0x7FAC, 0xC17C, 0x7FAD,
+ 0xC17D, 0x7FAE, 0xC17E, 0x7FB1, 0xC180, 0x7FB3, 0xC181, 0x7FB4,
+ 0xC182, 0x7FB5, 0xC183, 0x7FB6, 0xC184, 0x7FB7, 0xC185, 0x7FBA,
+ 0xC186, 0x7FBB, 0xC187, 0x7FBE, 0xC188, 0x7FC0, 0xC189, 0x7FC2,
+ 0xC18A, 0x7FC3, 0xC18B, 0x7FC4, 0xC18C, 0x7FC6, 0xC18D, 0x7FC7,
+ 0xC18E, 0x7FC8, 0xC18F, 0x7FC9, 0xC190, 0x7FCB, 0xC191, 0x7FCD,
+ 0xC192, 0x7FCF, 0xC193, 0x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xC25A, 0x8011,
+ 0xC25B, 0x8013, 0xC25C, 0x801A, 0xC25D, 0x801B, 0xC25E, 0x801D,
+ 0xC25F, 0x801E, 0xC260, 0x801F, 0xC261, 0x8021, 0xC262, 0x8023,
+ 0xC263, 0x8024, 0xC264, 0x802B, 0xC265, 0x802C, 0xC266, 0x802D,
+ 0xC267, 0x802E, 0xC268, 0x802F, 0xC269, 0x8030, 0xC26A, 0x8032,
+ 0xC26B, 0x8034, 0xC26C, 0x8039, 0xC26D, 0x803A, 0xC26E, 0x803C,
+ 0xC26F, 0x803E, 0xC270, 0x8040, 0xC271, 0x8041, 0xC272, 0x8044,
+ 0xC273, 0x8045, 0xC274, 0x8047, 0xC275, 0x8048, 0xC276, 0x8049,
+ 0xC277, 0x804E, 0xC278, 0x804F, 0xC279, 0x8050, 0xC27A, 0x8051,
+ 0xC27B, 0x8053, 0xC27C, 0x8055, 0xC27D, 0x8056, 0xC27E, 0x8057,
+ 0xC280, 0x8059, 0xC281, 0x805B, 0xC282, 0x805C, 0xC283, 0x805D,
+ 0xC284, 0x805E, 0xC285, 0x805F, 0xC286, 0x8060, 0xC287, 0x8061,
+ 0xC288, 0x8062, 0xC289, 0x8063, 0xC28A, 0x8064, 0xC28B, 0x8065,
+ 0xC28C, 0x8066, 0xC28D, 0x8067, 0xC28E, 0x8068, 0xC28F, 0x806B,
+ 0xC290, 0x806C, 0xC291, 0x806D, 0xC292, 0x806E, 0xC293, 0x806F,
+ 0xC294, 0x8070, 0xC295, 0x8072, 0xC296, 0x8073, 0xC297, 0x8074,
+ 0xC298, 0x8075, 0xC299, 0x8076, 0xC29A, 0x8077, 0xC29B, 0x8078,
+ 0xC29C, 0x8079, 0xC29D, 0x807A, 0xC29E, 0x807B, 0xC29F, 0x807C,
+ 0xC2A0, 0x807D, 0xC2A1, 0x9686, 0xC2A2, 0x5784, 0xC2A3, 0x62E2,
+ 0xC2A4, 0x9647, 0xC2A5, 0x697C, 0xC2A6, 0x5A04, 0xC2A7, 0x6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x5988, 0xC2E9, 0x9EBB, 0xC2EA, 0x739B, 0xC2EB, 0x7801,
+ 0xC2EC, 0x8682, 0xC2ED, 0x9A6C, 0xC2EE, 0x9A82, 0xC2EF, 0x561B,
+ 0xC2F0, 0x5417, 0xC2F1, 0x57CB, 0xC2F2, 0x4E70, 0xC2F3, 0x9EA6,
+ 0xC2F4, 0x5356, 0xC2F5, 0x8FC8, 0xC2F6, 0x8109, 0xC2F7, 0x7792,
+ 0xC2F8, 0x9992, 0xC2F9, 0x86EE, 0xC2FA, 0x6EE1, 0xC2FB, 0x8513,
+ 0xC2FC, 0x66FC, 0xC2FD, 0x6162, 0xC2FE, 0x6F2B, 0xC340, 0x807E,
+ 0xC341, 0x8081, 0xC342, 0x8082, 0xC343, 0x8085, 0xC344, 0x8088,
+ 0xC345, 0x808A, 0xC346, 0x808D, 0xC347, 0x808E, 0xC348, 0x808F,
+ 0xC349, 0x8090, 0xC34A, 0x8091, 0xC34B, 0x8092, 0xC34C, 0x8094,
+ 0xC34D, 0x8095, 0xC34E, 0x8097, 0xC34F, 0x8099, 0xC350, 0x809E,
+ 0xC351, 0x80A3, 0xC352, 0x80A6, 0xC353, 0x80A7, 0xC354, 0x80A8,
+ 0xC355, 0x80AC, 0xC356, 0x80B0, 0xC357, 0x80B3, 0xC358, 0x80B5,
+ 0xC359, 0x80B6, 0xC35A, 0x80B8, 0xC35B, 0x80B9, 0xC35C, 0x80BB,
+ 0xC35D, 0x80C5, 0xC35E, 0x80C7, 0xC35F, 0x80C8, 0xC360, 0x80C9,
+ 0xC361, 0x80CA, 0xC362, 0x80CB, 0xC363, 0x80CF, 0xC364, 0x80D0,
+ 0xC365, 0x80D1, 0xC366, 0x80D2, 0xC367, 0x80D3, 0xC368, 0x80D4,
+ 0xC369, 0x80D5, 0xC36A, 0x80D8, 0xC36B, 0x80DF, 0xC36C, 0x80E0,
+ 0xC36D, 0x80E2, 0xC36E, 0x80E3, 0xC36F, 0x80E6, 0xC370, 0x80EE,
+ 0xC371, 0x80F5, 0xC372, 0x80F7, 0xC373, 0x80F9, 0xC374, 0x80FB,
+ 0xC375, 0x80FE, 0xC376, 0x80FF, 0xC377, 0x8100, 0xC378, 0x8101,
+ 0xC379, 0x8103, 0xC37A, 0x8104, 0xC37B, 0x8105, 0xC37C, 0x8107,
+ 0xC37D, 0x8108, 0xC37E, 0x810B, 0xC380, 0x810C, 0xC381, 0x8115,
+ 0xC382, 0x8117, 0xC383, 0x8119, 0xC384, 0x811B, 0xC385, 0x811C,
+ 0xC386, 0x811D, 0xC387, 0x811F, 0xC388, 0x8120, 0xC389, 0x8121,
+ 0xC38A, 0x8122, 0xC38B, 0x8123, 0xC38C, 0x8124, 0xC38D, 0x8125,
+ 0xC38E, 0x8126, 0xC38F, 0x8127, 0xC390, 0x8128, 0xC391, 0x8129,
+ 0xC392, 0x812A, 0xC393, 0x812B, 0xC394, 0x812D, 0xC395, 0x812E,
+ 0xC396, 0x8130, 0xC397, 0x8133, 0xC398, 0x8134, 0xC399, 0x8135,
+ 0xC39A, 0x8137, 0xC39B, 0x8139, 0xC39C, 0x813A, 0xC39D, 0x813B,
+ 0xC39E, 0x813C, 0xC39F, 0x813D, 0xC3A0, 0x813F, 0xC3A1, 0x8C29,
+ 0xC3A2, 0x8292, 0xC3A3, 0x832B, 0xC3A4, 0x76F2, 0xC3A5, 0x6C13,
+ 0xC3A6, 0x5FD9, 0xC3A7, 0x83BD, 0xC3A8, 0x732B, 0xC3A9, 0x8305,
+ 0xC3AA, 0x951A, 0xC3AB, 0x6BDB, 0xC3AC, 0x77DB, 0xC3AD, 0x94C6,
+ 0xC3AE, 0x536F, 0xC3AF, 0x8302, 0xC3B0, 0x5192, 0xC3B1, 0x5E3D,
+ 0xC3B2, 0x8C8C, 0xC3B3, 0x8D38, 0xC3B4, 0x4E48, 0xC3B5, 0x73AB,
+ 0xC3B6, 0x679A, 0xC3B7, 0x6885, 0xC3B8, 0x9176, 0xC3B9, 0x9709,
+ 0xC3BA, 0x7164, 0x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D, 0xC3FD, 0x8C2C,
+ 0xC3FE, 0x6478, 0xC440, 0x8140, 0xC441, 0x8141, 0xC442, 0x8142,
+ 0xC443, 0x8143, 0xC444, 0x8144, 0xC445, 0x8145, 0xC446, 0x8147,
+ 0xC447, 0x8149, 0xC448, 0x814D, 0xC449, 0x814E, 0xC44A, 0x814F,
+ 0xC44B, 0x8152, 0xC44C, 0x8156, 0xC44D, 0x8157, 0xC44E, 0x8158,
+ 0xC44F, 0x815B, 0xC450, 0x815C, 0xC451, 0x815D, 0xC452, 0x815E,
+ 0xC453, 0x815F, 0xC454, 0x8161, 0xC455, 0x8162, 0xC456, 0x8163,
+ 0xC457, 0x8164, 0xC458, 0x8166, 0xC459, 0x8168, 0xC45A, 0x816A,
+ 0xC45B, 0x816B, 0xC45C, 0x816C, 0xC45D, 0x816F, 0xC45E, 0x8172,
+ 0xC45F, 0x8173, 0xC460, 0x8175, 0xC461, 0x8176, 0xC462, 0x8177,
+ 0xC463, 0x8178, 0xC464, 0x8181, 0xC465, 0x8183, 0xC466, 0x8184,
+ 0xC467, 0x8185, 0xC468, 0x8186, 0xC469, 0x8187, 0xC46A, 0x8189,
+ 0xC46B, 0x818B, 0xC46C, 0x818C, 0xC46D, 0x818D, 0xC46E, 0x818E,
+ 0xC46F, 0x8190, 0xC470, 0x8192, 0xC471, 0x8193, 0xC472, 0x8194,
+ 0xC473, 0x8195, 0xC474, 0x8196, 0xC475, 0x8197, 0xC476, 0x8199,
+ 0xC477, 0x819A, 0xC478, 0x819E, 0xC479, 0x819F, 0xC47A, 0x81A0,
+ 0xC47B, 0x81A1, 0xC47C, 0x81A2, 0xC47D, 0x81A4, 0xC47E, 0x81A5,
+ 0xC480, 0x81A7, 0xC481, 0x81A9, 0xC482, 0x81AB, 0xC483, 0x81AC,
+ 0xC484, 0x81AD, 0xC485, 0x81AE, 0xC486, 0x81AF, 0xC487, 0x81B0,
+ 0xC488, 0x81B1, 0xC489, 0x81B2, 0xC48A, 0x81B4, 0xC48B,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, 0xC554, 0x81EB,
+ 0xC555, 0x81EE, 0xC556, 0x81EF, 0xC557, 0x81F0, 0xC558, 0x81F1,
+ 0xC559, 0x81F2, 0xC55A, 0x81F5, 0xC55B, 0x81F6, 0xC55C, 0x81F7,
+ 0xC55D, 0x81F8, 0xC55E, 0x81F9, 0xC55F, 0x81FA, 0xC560, 0x81FD,
+ 0xC561, 0x81FF, 0xC562, 0x8203, 0xC563, 0x8207, 0xC564, 0x8208,
+ 0xC565, 0x8209, 0xC566, 0x820A, 0xC567, 0x820B, 0xC568, 0x820E,
+ 0xC569, 0x820F, 0xC56A, 0x8211, 0xC56B, 0x8213, 0xC56C, 0x8215,
+ 0xC56D, 0x8216, 0xC56E, 0x8217, 0xC56F, 0x8218, 0xC570, 0x8219,
+ 0xC571, 0x821A, 0xC572, 0x821D, 0xC573, 0x8220, 0xC574, 0x8224,
+ 0xC575, 0x8225, 0xC576, 0x8226, 0xC577, 0x8227, 0xC578, 0x8229,
+ 0xC579, 0x822E, 0xC57A, 0x8232, 0xC57B, 0x823A, 0xC57C, 0x823C,
+ 0xC57D, 0x823D, 0xC57E, 0x823F, 0xC580, 0x8240, 0xC581, 0x8241,
+ 0xC582, 0x8242, 0xC583, 0x8243, 0xC584, 0x8245, 0xC585, 0x8246,
+ 0xC586, 0x8248, 0xC587, 0x824A, 0xC588, 0x824C, 0xC589, 0x824D,
+ 0xC58A, 0x824E, 0xC58B, 0x8250, 0xC58C, 0x8251, 0xC58D, 0x8252,
+ 0xC58E, 0x8253, 0xC58F, 0x8254, 0xC590, 0x8255, 0xC591, 0x8256,
+ 0xC592, 0x8257, 0xC593, 0x8259, 0xC594, 0x825B, 0xC595, 0x825C,
+ 0xC596, 0x825D, 0xC597, 0x825E, 0xC598, 0x8260, 0xC599, 0x8261,
+ 0xC59A, 0x8262, 0xC59B, 0x8263, 0xC59C, 0x8264, 0xC59D, 0x8265,
+ 0xC59E, 0x8266, 0xC59F, 0x8267, 0xC5A0, 0x8269, 0xC5A1, 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0x966A, 0xC5E4, 0x914D, 0xC5E5, 0x4F69,
+ 0xC5E6, 0x6C9B, 0xC5E7, 0x55B7, 0xC5E8, 0x76C6, 0xC5E9, 0x7830,
+ 0xC5EA, 0x62A8, 0xC5EB, 0x70F9, 0xC5EC, 0x6F8E, 0xC5ED, 0x5F6D,
+ 0xC5EE, 0x84EC, 0xC5EF, 0x68DA, 0xC5F0, 0x787C, 0xC5F1, 0x7BF7,
+ 0xC5F2, 0x81A8, 0xC5F3, 0x670B, 0xC5F4, 0x9E4F, 0xC5F5, 0x6367,
+ 0xC5F6, 0x78B0, 0xC5F7, 0x576F, 0xC5F8, 0x7812, 0xC5F9, 0x9739,
+ 0xC5FA, 0x6279, 0xC5FB, 0x62AB, 0xC5FC, 0x5288, 0xC5FD, 0x7435,
+ 0xC5FE, 0x6BD7, 0xC640, 0x826A, 0xC641, 0x826B, 0xC642, 0x826C,
+ 0xC643, 0x826D, 0xC644, 0x8271, 0xC645, 0x8275, 0xC646, 0x8276,
+ 0xC647, 0x8277, 0xC648, 0x8278, 0xC649, 0x827B, 0xC64A, 0x827C,
+ 0xC64B, 0x8280, 0xC64C, 0x8281, 0xC64D, 0x8283, 0xC64E, 0x8285,
+ 0xC64F, 0x8286, 0xC650, 0x8287, 0xC651, 0x8289, 0xC652, 0x828C,
+ 0xC653, 0x8290, 0xC654, 0x8293, 0xC655, 0x8294, 0xC656, 0x8295,
+ 0xC657, 0x8296, 0xC658, 0x829A, 0xC659, 0x829B, 0xC65A, 0x829E,
+ 0xC65B, 0x82A0, 0xC65C, 0x82A2, 0xC65D, 0x82A3, 0xC65E, 0x82A7,
+ 0xC65F, 0x82B2, 0xC660, 0x82B5, 0xC661, 0x82B6, 0xC662, 0x82BA,
+ 0xC663, 0x82BB, 0xC664, 0x82BC, 0xC665, 0x82BF, 0xC666, 0x82C0,
+ 0xC667, 0x82C2, 0xC668, 0x82C3, 0xC669, 0x82C5, 0xC66A, 0x82C6,
+ 0xC66B, 0x82C9, 0xC66C, 0x82D0, 0xC66D, 0x82D6, 0xC66E, 0x82D9,
+ 0xC66F, 0x82DA, 0xC670, 0x82DD, 0xC671, 0x82E2, 0xC672, 0x82E7,
+ 0xC673, 0x82E8, 0xC674, 0x82E9, 0xC675, 0x82EA, 0xC676, 0x82EC,
+ 0xC677, 0x82ED, 0xC678, 0x82EE, 0xC679, 0x82F0, 0xC67A, 0x82F2,
+ 0xC67B, 0x82F3, 0xC67C, 0x82F5, 0xC67D, 0x82F6, 0xC67E, 0x82F8,
+ 0xC680, 0x82FA, 0xC681, 0x82FC, 0xC682, 0x82FD, 0xC683, 0x82FE,
+ 0xC684, 0x82FF, 0xC685, 0x8300, 0xC686, 0x830A, 0xC687, 0x830B,
+ 0xC688, 0x830D, 0xC689, 0x8310, 0xC68A, 0x8312, 0xC68B, 0x8313,
+ 0xC68C, 0x8316, 0xC68D, 0x8318, 0xC68E, 0x8319, 0xC68F, 0x831D,
+ 0xC690, 0x831E, 0xC691, 0x831F, 0xC692, 0x8320, 0xC693, 0x8321,
+ 0xC694, 0x8322, 0xC695, 0x8323, 0xC696, 0x8324, 0xC697, 0x8325,
+ 0xC698, 0x8326, 0xC699, 0x8329, 0xC69A, 0x832A, 0xC69B, 0x832E,
+ 0xC69C, 0x8330, 0xC69D, 0x8332, 0xC69E, 0x8337, 0xC69F, 0x833B,
+ 0xC6A0, 0x833D, 0xC6A1, 0x5564, 0xC6A2, 0x813E, 0xC6A3, 0x75B2,
+ 0xC6A4, 0x76AE, 0xC6A5, 0x5339, 0xC6A6, 0x75DE, 0xC6A7, 0x50FB,
+ 0xC6A8, 0x5C41, 0xC6A9, 0x8B6C, 0xC6AA, 0x7BC7, 0xC6AB, 0x504F,
+ 0xC6AC, 0x7247, 0xC6AD, 0x9A97, 0xC6AE, 0x98D8, 0xC6AF, 0x6F02,
+ 0xC6B0, 0x74E2, 0xC6B1, 0x7968, 0xC6B2, 0x6487, 0xC6B3, 0x77A5,
+ 0xC6B4, 0x62FC, 0xC6B5, 0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,
+ 0xC6F8, 0x6C14, 0xC6F9, 0x8FC4, 0xC6FA, 0x5F03, 0xC6FB, 0x6C7D,
+ 0xC6FC, 0x6CE3, 0xC6FD, 0x8BAB, 0xC6FE, 0x6390, 0xC740, 0x833E,
+ 0xC741, 0x833F, 0xC742, 0x8341, 0xC743, 0x8342, 0xC744, 0x8344,
+ 0xC745, 0x8345, 0xC746, 0x8348, 0xC747, 0x834A, 0xC748, 0x834B,
+ 0xC749, 0x834C, 0xC74A, 0x834D, 0xC74B, 0x834E, 0xC74C, 0x8353,
+ 0xC74D, 0x8355, 0xC74E, 0x8356, 0xC74F, 0x8357, 0xC750, 0x8358,
+ 0xC751, 0x8359, 0xC752, 0x835D, 0xC753, 0x8362, 0xC754, 0x8370,
+ 0xC755, 0x8371, 0xC756, 0x8372, 0xC757, 0x8373, 0xC758, 0x8374,
+ 0xC759, 0x8375, 0xC75A, 0x8376, 0xC75B, 0x8379, 0xC75C, 0x837A,
+ 0xC75D, 0x837E, 0xC75E, 0x837F, 0xC75F, 0x8380, 0xC760, 0x8381,
+ 0xC761, 0x8382, 0xC762, 0x8383, 0xC763, 0x8384, 0xC764, 0x8387,
+ 0xC765, 0x8388, 0xC766, 0x838A, 0xC767, 0x838B, 0xC768, 0x838C,
+ 0xC769, 0x838D, 0xC76A, 0x838F, 0xC76B, 0x8390, 0xC76C, 0x8391,
+ 0xC76D, 0x8394, 0xC76E, 0x8395, 0xC76F, 0x8396, 0xC770, 0x8397,
+ 0xC771, 0x8399, 0xC772, 0x839A, 0xC773, 0x839D, 0xC774, 0x839F,
+ 0xC775, 0x83A1, 0xC776, 0x83A2, 0xC777, 0x83A3, 0xC778, 0x83A4,
+ 0xC779, 0x83A5, 0xC77A, 0x83A6, 0xC77B, 0x83A7, 0xC77C, 0x83AC,
+ 0xC77D, 0x83AD, 0xC77E, 0x83AE, 0xC780, 0x83AF, 0xC781, 0x83B5,
+ 0xC782, 0x83BB, 0xC783, 0x83BE, 0xC784, 0x83BF, 0xC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400, 0xC84D, 0x8402, 0xC84E, 0x8405,
+ 0xC84F, 0x8407, 0xC850, 0x8408, 0xC851, 0x8409, 0xC852, 0x840A,
+ 0xC853, 0x8410, 0xC854, 0x8412, 0xC855, 0x8413, 0xC856, 0x8414,
+ 0xC857, 0x8415, 0xC858, 0x8416, 0xC859, 0x8417, 0xC85A, 0x8419,
+ 0xC85B, 0x841A, 0xC85C, 0x841B, 0xC85D, 0x841E, 0xC85E, 0x841F,
+ 0xC85F, 0x8420, 0xC860, 0x8421, 0xC861, 0x8422, 0xC862, 0x8423,
+ 0xC863, 0x8429, 0xC864, 0x842A, 0xC865, 0x842B, 0xC866, 0x842C,
+ 0xC867, 0x842D, 0xC868, 0x842E, 0xC869, 0x842F, 0xC86A, 0x8430,
+ 0xC86B, 0x8432, 0xC86C, 0x8433, 0xC86D, 0x8434, 0xC86E, 0x8435,
+ 0xC86F, 0x8436, 0xC870, 0x8437, 0xC871, 0x8439, 0xC872, 0x843A,
+ 0xC873, 0x843B, 0xC874, 0x843E, 0xC875, 0x843F, 0xC876, 0x8440,
+ 0xC877, 0x8441, 0xC878, 0x8442, 0xC879, 0x8443, 0xC87A, 0x8444,
+ 0xC87B, 0x8445, 0xC87C, 0x8447, 0xC87D, 0x8448, 0xC87E, 0x8449,
+ 0xC880, 0x844A, 0xC881, 0x844B, 0xC882, 0x844C, 0xC883, 0x844D,
+ 0xC884, 0x844E, 0xC885, 0x844F, 0xC886, 0x8450, 0xC887, 0x8452,
+ 0xC888, 0x8453, 0xC889, 0x8454, 0xC88A, 0x8455, 0xC88B, 0x8456,
+ 0xC88C, 0x8458, 0xC88D, 0x845D, 0xC88E, 0x845E, 0xC88F, 0x845F,
+ 0xC890, 0x8460, 0xC891, 0x8462, 0xC892, 0x8464, 0xC893, 0x8465,
+ 0xC894, 0x8466, 0xC895, 0x8467, 0xC896, 0x8468, 0xC897, 0x846A,
+ 0xC898, 0x846E, 0xC899, 0x846F, 0xC89A, 0x8470, 0xC89B, 0x8472,
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, 0xC8DE, 0x7ED2, 0xC8DF, 0x5197,
+ 0xC8E0, 0x63C9, 0xC8E1, 0x67D4, 0xC8E2, 0x8089, 0xC8E3, 0x8339,
+ 0xC8E4, 0x8815, 0xC8E5, 0x5112, 0xC8E6, 0x5B7A, 0xC8E7, 0x5982,
+ 0xC8E8, 0x8FB1, 0xC8E9, 0x4E73, 0xC8EA, 0x6C5D, 0xC8EB, 0x5165,
+ 0xC8EC, 0x8925, 0xC8ED, 0x8F6F, 0xC8EE, 0x962E, 0xC8EF, 0x854A,
+ 0xC8F0, 0x745E, 0xC8F1, 0x9510, 0xC8F2, 0x95F0, 0xC8F3, 0x6DA6,
+ 0xC8F4, 0x82E5, 0xC8F5, 0x5F31, 0xC8F6, 0x6492, 0xC8F7, 0x6D12,
+ 0xC8F8, 0x8428, 0xC8F9, 0x816E, 0xC8FA, 0x9CC3, 0xC8FB, 0x585E,
+ 0xC8FC, 0x8D5B, 0xC8FD, 0x4E09, 0xC8FE, 0x53C1, 0xC940, 0x847D,
+ 0xC941, 0x847E, 0xC942, 0x847F, 0xC943, 0x8480, 0xC944, 0x8481,
+ 0xC945, 0x8483, 0xC946, 0x8484, 0xC947, 0x8485, 0xC948, 0x8486,
+ 0xC949, 0x848A, 0xC94A, 0x848D, 0xC94B, 0x848F, 0xC94C, 0x8490,
+ 0xC94D, 0x8491, 0xC94E, 0x8492, 0xC94F, 0x8493, 0xC950, 0x8494,
+ 0xC951, 0x8495, 0xC952, 0x8496, 0xC953, 0x8498, 0xC954, 0x849A,
+ 0xC955, 0x849B, 0xC956, 0x849D, 0xC957, 0x849E, 0xC958, 0x849F,
+ 0xC959, 0x84A0, 0xC95A, 0x84A2, 0xC95B, 0x84A3, 0xC95C, 0x84A4,
+ 0xC95D, 0x84A5, 0xC95E, 0x84A6, 0xC95F, 0x84A7, 0xC960, 0x84A8,
+ 0xC961, 0x84A9, 0xC962, 0x84AA, 0xC963, 0x84AB, 0xC964, 0x84AC,
+ 0xC965, 0x84AD, 0xC966, 0x84AE, 0xC967, 0x84B0, 0xC968, 0x84B1,
+ 0xC969, 0x84B3, 0xC96A, 0x84B5, 0xC96B, 0x84B6, 0xC96C, 0x84B7,
+ 0xC96D, 0x84BB, 0xC96E, 0x84BC, 0xC96F, 0x84BE, 0xC970, 0x84C0,
+ 0xC971, 0x84C2, 0xC972, 0x84C3, 0xC973, 0x84C5, 0xC974, 0x84C6,
+ 0xC975, 0x84C7, 0xC976, 0x84C8, 0xC977, 0x84CB, 0xC978, 0x84CC,
+ 0xC979, 0x84CE, 0xC97A, 0x84CF, 0xC97B, 0x84D2, 0xC97C, 0x84D4,
+ 0xC97D, 0x84D5, 0xC97E, 0x84D7, 0xC980, 0x84D8, 0xC981, 0x84D9,
+ 0xC982, 0x84DA, 0xC983, 0x84DB, 0xC984, 0x84DC, 0xC985, 0x84DE,
+ 0xC986, 0x84E1, 0xC987, 0x84E2, 0xC988, 0x84E4, 0xC989, 0x84E7,
+ 0xC98A, 0x84E8, 0xC98B, 0x84E9, 0xC98C, 0x84EA, 0xC98D, 0x84EB,
+ 0xC98E, 0x84ED, 0xC98F, 0x84EE, 0xC990, 0x84EF, 0xC991, 0x84F1,
+ 0xC992, 0x84F2, 0xC993, 0x84F3, 0xC994, 0x84F4, 0xC995, 0x84F5,
+ 0xC996, 0x84F6, 0xC997, 0x84F7, 0xC998, 0x84F8, 0xC999, 0x84F9,
+ 0xC99A, 0x84FA, 0xC99B, 0x84FB, 0xC99C, 0x84FD, 0xC99D, 0x84FE,
+ 0xC99E, 0x8500, 0xC99F, 0x8501, 0xC9A0, 0x8502, 0xC9A1, 0x4F1E,
+ 0xC9A2, 0x6563, 0xC9A3, 0x6851, 0xC9A4, 0x55D3, 0xC9A5, 0x4E27,
+ 0xC9A6, 0x6414, 0xC9A7, 0x9A9A, 0xC9A8, 0x626B, 0xC9A9, 0x5AC2,
+ 0xC9AA, 0x745F, 0xC9AB, 0x8272, 0xC9AC, 0x6DA9, 0xC9AD, 0x68EE,
+ 0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9F0, 0x7EC5, 0xC9F1, 0x795E,
+ 0xC9F2, 0x6C88, 0xC9F3, 0x5BA1, 0xC9F4, 0x5A76, 0xC9F5, 0x751A,
+ 0xC9F6, 0x80BE, 0xC9F7, 0x614E, 0xC9F8, 0x6E17, 0xC9F9, 0x58F0,
+ 0xC9FA, 0x751F, 0xC9FB, 0x7525, 0xC9FC, 0x7272, 0xC9FD, 0x5347,
+ 0xC9FE, 0x7EF3, 0xCA40, 0x8503, 0xCA41, 0x8504, 0xCA42, 0x8505,
+ 0xCA43, 0x8506, 0xCA44, 0x8507, 0xCA45, 0x8508, 0xCA46, 0x8509,
+ 0xCA47, 0x850A, 0xCA48, 0x850B, 0xCA49, 0x850D, 0xCA4A, 0x850E,
+ 0xCA4B, 0x850F, 0xCA4C, 0x8510, 0xCA4D, 0x8512, 0xCA4E, 0x8514,
+ 0xCA4F, 0x8515, 0xCA50, 0x8516, 0xCA51, 0x8518, 0xCA52, 0x8519,
+ 0xCA53, 0x851B, 0xCA54, 0x851C, 0xCA55, 0x851D, 0xCA56, 0x851E,
+ 0xCA57, 0x8520, 0xCA58, 0x8522, 0xCA59, 0x8523, 0xCA5A, 0x8524,
+ 0xCA5B, 0x8525, 0xCA5C, 0x8526, 0xCA5D, 0x8527, 0xCA5E, 0x8528,
+ 0xCA5F, 0x8529, 0xCA60, 0x852A, 0xCA61, 0x852D, 0xCA62, 0x852E,
+ 0xCA63, 0x852F, 0xCA64, 0x8530, 0xCA65, 0x8531, 0xCA66, 0x8532,
+ 0xCA67, 0x8533, 0xCA68, 0x8534, 0xCA69, 0x8535, 0xCA6A, 0x8536,
+ 0xCA6B, 0x853E, 0xCA6C, 0x853F, 0xCA6D, 0x8540, 0xCA6E, 0x8541,
+ 0xCA6F, 0x8542, 0xCA70, 0x8544, 0xCA71, 0x8545, 0xCA72, 0x8546,
+ 0xCA73, 0x8547, 0xCA74, 0x854B, 0xCA75, 0x854C, 0xCA76, 0x854D,
+ 0xCA77, 0x854E, 0xCA78, 0x854F, 0xCA79, 0x8550, 0xCA7A, 0x8551,
+ 0xCA7B, 0x8552, 0xCA7C, 0x8553, 0xCA7D, 0x8554, 0xCA7E, 0x8555,
+ 0xCA80, 0x8557, 0xCA81, 0x8558, 0xCA82, 0x855A, 0xCA83, 0x855B,
+ 0xCA84, 0x855C, 0xCA85, 0x855D, 0xCA86, 0x855F, 0xCA87, 0x8560,
+ 0xCA88, 0x8561, 0xCA89, 0x8562, 0xCA8A, 0x8563, 0xCA8B, 0x8565,
+ 0xCA8C, 0x8566, 0xCA8D, 0x8567, 0xCA8E, 0x8569, 0xCA8F, 0x856A,
+ 0xCA90, 0x856B, 0xCA91, 0x856C, 0xCA92, 0x856D, 0xCA93, 0x856E,
+ 0xCA94, 0x856F, 0xCA95, 0x8570, 0xCA96, 0x8571, 0xCA97, 0x8573,
+ 0xCA98, 0x8575, 0xCA99, 0x8576, 0xCA9A, 0x8577, 0xCA9B, 0x8578,
+ 0xCA9C, 0x857C, 0xCA9D, 0x857D, 0xCA9E, 0x857F, 0xCA9F, 0x8580,
+ 0xCAA0, 0x8581, 0xCAA1, 0x7701, 0xCAA2, 0x76DB, 0xCAA3, 0x5269,
+ 0xCAA4, 0x80DC, 0xCAA5, 0x5723, 0xCAA6, 0x5E08, 0xCAA7, 0x5931,
+ 0xCAA8, 0x72EE, 0xCAA9, 0x65BD, 0xCAAA, 0x6E7F, 0xCAAB, 0x8BD7,
+ 0xCAAC, 0x5C38, 0xCAAD, 0x8671, 0xCAAE, 0x5341, 0xCAAF, 0x77F3,
+ 0xCAB0, 0x62FE, 0xCAB1, 0x65F6, 0xCAB2, 0x4EC0, 0xCAB3, 0x98DF,
+ 0xCAB4, 0x8680, 0xCAB5, 0x5B9E, 0xCAB6, 0x8BC6, 0xCAB7, 0x53F2,
+ 0xCAB8, 0x77E2, 0xCAB9, 0x4F7F, 0xCABA, 0x5C4E, 0xCABB, 0x9A76,
+ 0xCABC, 0x59CB, 0xCABD, 0x5F0F, 0xCABE, 0x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x8586, 0xCB43, 0x8588, 0xCB44, 0x8589,
+ 0xCB45, 0x858A, 0xCB46, 0x858B, 0xCB47, 0x858C, 0xCB48, 0x858D,
+ 0xCB49, 0x858E, 0xCB4A, 0x8590, 0xCB4B, 0x8591, 0xCB4C, 0x8592,
+ 0xCB4D, 0x8593, 0xCB4E, 0x8594, 0xCB4F, 0x8595, 0xCB50, 0x8596,
+ 0xCB51, 0x8597, 0xCB52, 0x8598, 0xCB53, 0x8599, 0xCB54, 0x859A,
+ 0xCB55, 0x859D, 0xCB56, 0x859E, 0xCB57, 0x859F, 0xCB58, 0x85A0,
+ 0xCB59, 0x85A1, 0xCB5A, 0x85A2, 0xCB5B, 0x85A3, 0xCB5C, 0x85A5,
+ 0xCB5D, 0x85A6, 0xCB5E, 0x85A7, 0xCB5F, 0x85A9, 0xCB60, 0x85AB,
+ 0xCB61, 0x85AC, 0xCB62, 0x85AD, 0xCB63, 0x85B1, 0xCB64, 0x85B2,
+ 0xCB65, 0x85B3, 0xCB66, 0x85B4, 0xCB67, 0x85B5, 0xCB68, 0x85B6,
+ 0xCB69, 0x85B8, 0xCB6A, 0x85BA, 0xCB6B, 0x85BB, 0xCB6C, 0x85BC,
+ 0xCB6D, 0x85BD, 0xCB6E, 0x85BE, 0xCB6F, 0x85BF, 0xCB70, 0x85C0,
+ 0xCB71, 0x85C2, 0xCB72, 0x85C3, 0xCB73, 0x85C4, 0xCB74, 0x85C5,
+ 0xCB75, 0x85C6, 0xCB76, 0x85C7, 0xCB77, 0x85C8, 0xCB78, 0x85CA,
+ 0xCB79, 0x85CB, 0xCB7A, 0x85CC, 0xCB7B, 0x85CD, 0xCB7C, 0x85CE,
+ 0xCB7D, 0x85D1, 0xCB7E, 0x85D2, 0xCB80, 0x85D4, 0xCB81, 0x85D6,
+ 0xCB82, 0x85D7, 0xCB83, 0x85D8, 0xCB84, 0x85D9, 0xCB85, 0x85DA,
+ 0xCB86, 0x85DB, 0xCB87, 0x85DD, 0xCB88, 0x85DE, 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860B, 0xCC50, 0x860C, 0xCC51, 0x860D, 0xCC52, 0x860E,
+ 0xCC53, 0x860F, 0xCC54, 0x8610, 0xCC55, 0x8612, 0xCC56, 0x8613,
+ 0xCC57, 0x8614, 0xCC58, 0x8615, 0xCC59, 0x8617, 0xCC5A, 0x8618,
+ 0xCC5B, 0x8619, 0xCC5C, 0x861A, 0xCC5D, 0x861B, 0xCC5E, 0x861C,
+ 0xCC5F, 0x861D, 0xCC60, 0x861E, 0xCC61, 0x861F, 0xCC62, 0x8620,
+ 0xCC63, 0x8621, 0xCC64, 0x8622, 0xCC65, 0x8623, 0xCC66, 0x8624,
+ 0xCC67, 0x8625, 0xCC68, 0x8626, 0xCC69, 0x8628, 0xCC6A, 0x862A,
+ 0xCC6B, 0x862B, 0xCC6C, 0x862C, 0xCC6D, 0x862D, 0xCC6E, 0x862E,
+ 0xCC6F, 0x862F, 0xCC70, 0x8630, 0xCC71, 0x8631, 0xCC72, 0x8632,
+ 0xCC73, 0x8633, 0xCC74, 0x8634, 0xCC75, 0x8635, 0xCC76, 0x8636,
+ 0xCC77, 0x8637, 0xCC78, 0x8639, 0xCC79, 0x863A, 0xCC7A, 0x863B,
+ 0xCC7B, 0x863D, 0xCC7C, 0x863E, 0xCC7D, 0x863F, 0xCC7E, 0x8640,
+ 0xCC80, 0x8641, 0xCC81, 0x8642, 0xCC82, 0x8643, 0xCC83, 0x8644,
+ 0xCC84, 0x8645, 0xCC85, 0x8646, 0xCC86, 0x8647, 0xCC87, 0x8648,
+ 0xCC88, 0x8649, 0xCC89, 0x864A, 0xCC8A, 0x864B, 0xCC8B, 0x864C,
+ 0xCC8C, 0x8652, 0xCC8D, 0x8653, 0xCC8E, 0x8655, 0xCC8F, 0x8656,
+ 0xCC90, 0x8657, 0xCC91, 0x8658, 0xCC92, 0x8659, 0xCC93, 0x865B,
+ 0xCC94, 0x865C, 0xCC95, 0x865D, 0xCC96, 0x865F, 0xCC97, 0x8660,
+ 0xCC98, 0x8661, 0xCC99, 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75BC,
+ 0xCCDC, 0x8A8A, 0xCCDD, 0x68AF, 0xCCDE, 0x5254, 0xCCDF, 0x8E22,
+ 0xCCE0, 0x9511, 0xCCE1, 0x63D0, 0xCCE2, 0x9898, 0xCCE3, 0x8E44,
+ 0xCCE4, 0x557C, 0xCCE5, 0x4F53, 0xCCE6, 0x66FF, 0xCCE7, 0x568F,
+ 0xCCE8, 0x60D5, 0xCCE9, 0x6D95, 0xCCEA, 0x5243, 0xCCEB, 0x5C49,
+ 0xCCEC, 0x5929, 0xCCED, 0x6DFB, 0xCCEE, 0x586B, 0xCCEF, 0x7530,
+ 0xCCF0, 0x751C, 0xCCF1, 0x606C, 0xCCF2, 0x8214, 0xCCF3, 0x8146,
+ 0xCCF4, 0x6311, 0xCCF5, 0x6761, 0xCCF6, 0x8FE2, 0xCCF7, 0x773A,
+ 0xCCF8, 0x8DF3, 0xCCF9, 0x8D34, 0xCCFA, 0x94C1, 0xCCFB, 0x5E16,
+ 0xCCFC, 0x5385, 0xCCFD, 0x542C, 0xCCFE, 0x70C3, 0xCD40, 0x866D,
+ 0xCD41, 0x866F, 0xCD42, 0x8670, 0xCD43, 0x8672, 0xCD44, 0x8673,
+ 0xCD45, 0x8674, 0xCD46, 0x8675, 0xCD47, 0x8676, 0xCD48, 0x8677,
+ 0xCD49, 0x8678, 0xCD4A, 0x8683, 0xCD4B, 0x8684, 0xCD4C, 0x8685,
+ 0xCD4D, 0x8686, 0xCD4E, 0x8687, 0xCD4F, 0x8688, 0xCD50, 0x8689,
+ 0xCD51, 0x868E, 0xCD52, 0x868F, 0xCD53, 0x8690, 0xCD54, 0x8691,
+ 0xCD55, 0x8692, 0xCD56, 0x8694, 0xCD57, 0x8696, 0xCD58, 0x8697,
+ 0xCD59, 0x8698, 0xCD5A, 0x8699, 0xCD5B, 0x869A, 0xCD5C, 0x869B,
+ 0xCD5D, 0x869E, 0xCD5E, 0x869F, 0xCD5F, 0x86A0, 0xCD60, 0x86A1,
+ 0xCD61, 0x86A2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9, 0x70F7,
+ 0xCDEA, 0x5B8C, 0xCDEB, 0x7897, 0xCDEC, 0x633D, 0xCDED, 0x665A,
+ 0xCDEE, 0x7696, 0xCDEF, 0x60CB, 0xCDF0, 0x5B9B, 0xCDF1, 0x5A49,
+ 0xCDF2, 0x4E07, 0xCDF3, 0x8155, 0xCDF4, 0x6C6A, 0xCDF5, 0x738B,
+ 0xCDF6, 0x4EA1, 0xCDF7, 0x6789, 0xCDF8, 0x7F51, 0xCDF9, 0x5F80,
+ 0xCDFA, 0x65FA, 0xCDFB, 0x671B, 0xCDFC, 0x5FD8, 0xCDFD, 0x5984,
+ 0xCDFE, 0x5A01, 0xCE40, 0x8719, 0xCE41, 0x871B, 0xCE42, 0x871D,
+ 0xCE43, 0x871F, 0xCE44, 0x8720, 0xCE45, 0x8724, 0xCE46, 0x8726,
+ 0xCE47, 0x8727, 0xCE48, 0x8728, 0xCE49, 0x872A, 0xCE4A, 0x872B,
+ 0xCE4B, 0x872C, 0xCE4C, 0x872D, 0xCE4D, 0x872F, 0xCE4E, 0x8730,
+ 0xCE4F, 0x8732, 0xCE50, 0x8733, 0xCE51, 0x8735, 0xCE52, 0x8736,
+ 0xCE53, 0x8738, 0xCE54, 0x8739, 0xCE55, 0x873A, 0xCE56, 0x873C,
+ 0xCE57, 0x873D, 0xCE58, 0x8740, 0xCE59, 0x8741, 0xCE5A, 0x8742,
+ 0xCE5B, 0x8743, 0xCE5C, 0x8744, 0xCE5D, 0x8745, 0xCE5E, 0x8746,
+ 0xCE5F, 0x874A, 0xCE60, 0x874B, 0xCE61, 0x874D, 0xCE62, 0x874F,
+ 0xCE63, 0x8750, 0xCE64, 0x8751, 0xCE65, 0x8752, 0xCE66, 0x8754,
+ 0xCE67, 0x8755, 0xCE68, 0x8756, 0xCE69, 0x8758, 0xCE6A, 0x875A,
+ 0xCE6B, 0x875B, 0xCE6C, 0x875C, 0xCE6D, 0x875D, 0xCE6E, 0x875E,
+ 0xCE6F, 0x875F, 0xCE70, 0x8761, 0xCE71, 0x8762, 0xCE72, 0x8766,
+ 0xCE73, 0x8767, 0xCE74, 0x8768, 0xCE75, 0x8769, 0xCE76, 0x876A,
+ 0xCE77, 0x876B, 0xCE78, 0x876C, 0xCE79, 0x876D, 0xCE7A, 0x876F,
+ 0xCE7B, 0x8771, 0xCE7C, 0x8772, 0xCE7D, 0x8773, 0xCE7E, 0x8775,
+ 0xCE80, 0x8777, 0xCE81, 0x8778, 0xCE82, 0x8779, 0xCE83, 0x877A,
+ 0xCE84, 0x877F, 0xCE85, 0x8780, 0xCE86, 0x8781, 0xCE87, 0x8784,
+ 0xCE88, 0x8786, 0xCE89, 0x8787, 0xCE8A, 0x8789, 0xCE8B, 0x878A,
+ 0xCE8C, 0x878C, 0xCE8D, 0x878E, 0xCE8E, 0x878F, 0xCE8F, 0x8790,
+ 0xCE90, 0x8791, 0xCE91, 0x8792, 0xCE92, 0x8794, 0xCE93, 0x8795,
+ 0xCE94, 0x8796, 0xCE95, 0x8798, 0xCE96, 0x8799, 0xCE97, 0x879A,
+ 0xCE98, 0x879B, 0xCE99, 0x879C, 0xCE9A, 0x879D, 0xCE9B, 0x879E,
+ 0xCE9C, 0x87A0, 0xCE9D, 0x87A1, 0xCE9E, 0x87A2, 0xCE9F, 0x87A3,
+ 0xCEA0, 0x87A4, 0xCEA1, 0x5DCD, 0xCEA2, 0x5FAE, 0xCEA3, 0x5371,
+ 0xCEA4, 0x97E6, 0xCEA5, 0x8FDD, 0xCEA6, 0x6845, 0xCEA7, 0x56F4,
+ 0xCEA8, 0x552F, 0xCEA9, 0x60DF, 0xCEAA, 0x4E3A, 0xCEAB, 0x6F4D,
+ 0xCEAC, 0x7EF4, 0xCEAD, 0x82C7, 0xCEAE, 0x840E, 0xCEAF, 0x59D4,
+ 0xCEB0, 0x4F1F, 0xCEB1, 0x4F2A, 0xCEB2, 0x5C3E, 0xCEB3, 0x7EAC,
+ 0xCEB4, 0x672A, 0xCEB5, 0x851A, 0xCEB6, 0x5473, 0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8, 0xCF80, 0x87FA, 0xCF81, 0x87FB,
+ 0xCF82, 0x87FC, 0xCF83, 0x87FD, 0xCF84, 0x87FF, 0xCF85, 0x8800,
+ 0xCF86, 0x8801, 0xCF87, 0x8802, 0xCF88, 0x8804, 0xCF89, 0x8805,
+ 0xCF8A, 0x8806, 0xCF8B, 0x8807, 0xCF8C, 0x8808, 0xCF8D, 0x8809,
+ 0xCF8E, 0x880B, 0xCF8F, 0x880C, 0xCF90, 0x880D, 0xCF91, 0x880E,
+ 0xCF92, 0x880F, 0xCF93, 0x8810, 0xCF94, 0x8811, 0xCF95, 0x8812,
+ 0xCF96, 0x8814, 0xCF97, 0x8817, 0xCF98, 0x8818, 0xCF99, 0x8819,
+ 0xCF9A, 0x881A, 0xCF9B, 0x881C, 0xCF9C, 0x881D, 0xCF9D, 0x881E,
+ 0xCF9E, 0x881F, 0xCF9F, 0x8820, 0xCFA0, 0x8823, 0xCFA1, 0x7A00,
+ 0xCFA2, 0x606F, 0xCFA3, 0x5E0C, 0xCFA4, 0x6089, 0xCFA5, 0x819D,
+ 0xCFA6, 0x5915, 0xCFA7, 0x60DC, 0xCFA8, 0x7184, 0xCFA9, 0x70EF,
+ 0xCFAA, 0x6EAA, 0xCFAB, 0x6C50, 0xCFAC, 0x7280, 0xCFAD, 0x6A84,
+ 0xCFAE, 0x88AD, 0xCFAF, 0x5E2D, 0xCFB0, 0x4E60, 0xCFB1, 0x5AB3,
+ 0xCFB2, 0x559C, 0xCFB3, 0x94E3, 0xCFB4, 0x6D17, 0xCFB5, 0x7CFB,
+ 0xCFB6, 0x9699, 0xCFB7, 0x620F, 0xCFB8, 0x7EC6, 0xCFB9, 0x778E,
+ 0xCFBA, 0x867E, 0xCFBB, 0x5323, 0xCFBC, 0x971E, 0xCFBD, 0x8F96,
+ 0xCFBE, 0x6687, 0xCFBF, 0x5CE1, 0xCFC0, 0x4FA0, 0xCFC1, 0x72ED,
+ 0xCFC2, 0x4E0B, 0xCFC3, 0x53A6, 0xC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x882C, 0xD049, 0x882D, 0xD04A, 0x882E,
+ 0xD04B, 0x882F, 0xD04C, 0x8830, 0xD04D, 0x8831, 0xD04E, 0x8833,
+ 0xD04F, 0x8834, 0xD050, 0x8835, 0xD051, 0x8836, 0xD052, 0x8837,
+ 0xD053, 0x8838, 0xD054, 0x883A, 0xD055, 0x883B, 0xD056, 0x883D,
+ 0xD057, 0x883E, 0xD058, 0x883F, 0xD059, 0x8841, 0xD05A, 0x8842,
+ 0xD05B, 0x8843, 0xD05C, 0x8846, 0xD05D, 0x8847, 0xD05E, 0x8848,
+ 0xD05F, 0x8849, 0xD060, 0x884A, 0xD061, 0x884B, 0xD062, 0x884E,
+ 0xD063, 0x884F, 0xD064, 0x8850, 0xD065, 0x8851, 0xD066, 0x8852,
+ 0xD067, 0x8853, 0xD068, 0x8855, 0xD069, 0x8856, 0xD06A, 0x8858,
+ 0xD06B, 0x885A, 0xD06C, 0x885B, 0xD06D, 0x885C, 0xD06E, 0x885D,
+ 0xD06F, 0x885E, 0xD070, 0x885F, 0xD071, 0x8860, 0xD072, 0x8866,
+ 0xD073, 0x8867, 0xD074, 0x886A, 0xD075, 0x886D, 0xD076, 0x886F,
+ 0xD077, 0x8871, 0xD078, 0x8873, 0xD079, 0x8874, 0xD07A, 0x8875,
+ 0xD07B, 0x8876, 0xD07C, 0x8878, 0xD07D, 0x8879, 0xD07E, 0x887A,
+ 0xD080, 0x887B, 0xD081, 0x887C, 0xD082, 0x8880, 0xD083, 0x8883,
+ 0xD084, 0x8886, 0xD085, 0x8887, 0xD086, 0x8889, 0xD087, 0x888A,
+ 0xD088, 0x888C, 0xD089, 0x888E, 0xD08A, 0x888F, 0xD08B, 0x8890,
+ 0xD08C, 0x8891, 0xD08D, 0x8893, 0xD08E, 0x8894, 0xD08F, 0x8895,
+ 0xD090, 0x8897, 0xD091, 0x8898, 0xD092, 0x8899, 0xD093, 0x889A,
+ 0xD094, 0x889B, 0xD095, 0x889D, 0xD096, 0x889E, 0xD097, 0x889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0x6C79, 0xD0DB, 0x96C4,
+ 0xD0DC, 0x718A, 0xD0DD, 0x4F11, 0xD0DE, 0x4FEE, 0xD0DF, 0x7F9E,
+ 0xD0E0, 0x673D, 0xD0E1, 0x55C5, 0xD0E2, 0x9508, 0xD0E3, 0x79C0,
+ 0xD0E4, 0x8896, 0xD0E5, 0x7EE3, 0xD0E6, 0x589F, 0xD0E7, 0x620C,
+ 0xD0E8, 0x9700, 0xD0E9, 0x865A, 0xD0EA, 0x5618, 0xD0EB, 0x987B,
+ 0xD0EC, 0x5F90, 0xD0ED, 0x8BB8, 0xD0EE, 0x84C4, 0xD0EF, 0x9157,
+ 0xD0F0, 0x53D9, 0xD0F1, 0x65ED, 0xD0F2, 0x5E8F, 0xD0F3, 0x755C,
+ 0xD0F4, 0x6064, 0xD0F5, 0x7D6E, 0xD0F6, 0x5A7F, 0xD0F7, 0x7EEA,
+ 0xD0F8, 0x7EED, 0xD0F9, 0x8F69, 0xD0FA, 0x55A7, 0xD0FB, 0x5BA3,
+ 0xD0FC, 0x60AC, 0xD0FD, 0x65CB, 0xD0FE, 0x7384, 0xD140, 0x88AC,
+ 0xD141, 0x88AE, 0xD142, 0x88AF, 0xD143, 0x88B0, 0xD144, 0x88B2,
+ 0xD145, 0x88B3, 0xD146, 0x88B4, 0xD147, 0x88B5, 0xD148, 0x88B6,
+ 0xD149, 0x88B8, 0xD14A, 0x88B9, 0xD14B, 0x88BA, 0xD14C, 0x88BB,
+ 0xD14D, 0x88BD, 0xD14E, 0x88BE, 0xD14F, 0x88BF, 0xD150, 0x88C0,
+ 0xD151, 0x88C3, 0xD152, 0x88C4, 0xD153, 0x88C7, 0xD154, 0x88C8,
+ 0xD155, 0x88CA, 0xD156, 0x88CB, 0xD157, 0x88CC, 0xD158, 0x88CD,
+ 0xD159, 0x88CF, 0xD15A, 0x88D0, 0xD15B, 0x88D1, 0xD15C, 0x88D3,
+ 0xD15D, 0x88D6, 0xD15E, 0x88D7, 0xD15F, 0x88DA, 0xD160, 0x88DB,
+ 0xD161, 0x88DC, 0xD162, 0x88DD, 0xD163, 0x88DE, 0xD164, 0x88E0,
+ 0xD165, 0x88E1, 0xD166, 0x88E6, 0xD167, 0x88E7, 0xD168, 0x88E9,
+ 0xD169, 0x88EA, 0xD16A, 0x88EB, 0xD16B, 0x88EC, 0xD16C, 0x88ED,
+ 0xD16D, 0x88EE, 0xD16E, 0x88EF, 0xD16F, 0x88F2, 0xD170, 0x88F5,
+ 0xD171, 0x88F6, 0xD172, 0x88F7, 0xD173, 0x88FA, 0xD174, 0x88FB,
+ 0xD175, 0x88FD, 0xD176, 0x88FF, 0xD177, 0x8900, 0xD178, 0x8901,
+ 0xD179, 0x8903, 0xD17A, 0x8904, 0xD17B, 0x8905, 0xD17C, 0x8906,
+ 0xD17D, 0x8907, 0xD17E, 0x8908, 0xD180, 0x8909, 0xD181, 0x890B,
+ 0xD182, 0x890C, 0xD183, 0x890D, 0xD184, 0x890E, 0xD185, 0x890F,
+ 0xD186, 0x8911, 0xD187, 0x8914, 0xD188, 0x8915, 0xD189, 0x8916,
+ 0xD18A, 0x8917, 0xD18B, 0x8918, 0xD18C, 0x891C, 0xD18D, 0x891D,
+ 0xD18E, 0x891E, 0xD18F, 0x891F, 0xD190, 0x8920, 0xD191, 0x8922,
+ 0xD192, 0x8923, 0xD193, 0x8924, 0xD194, 0x8926, 0xD195, 0x8927,
+ 0xD196, 0x8928, 0xD197, 0x8929, 0xD198, 0x892C, 0xD199, 0x892D,
+ 0xD19A, 0x892E, 0xD19B, 0x892F, 0xD19C, 0x8931, 0xD19D, 0x8932,
+ 0xD19E, 0x8933, 0xD19F, 0x8935, 0xD1A0, 0x8937, 0xD1A1, 0x9009,
+ 0xD1A2, 0x7663, 0xD1A3, 0x7729, 0xD1A4, 0x7EDA, 0xD1A5, 0x9774,
+ 0xD1A6, 0x859B, 0xD1A7, 0x5B66, 0xD1A8, 0x7A74, 0xD1A9, 0x96EA,
+ 0xD1AA, 0x8840, 0xD1AB, 0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F, 0xD1ED, 0x79E7,
+ 0xD1EE, 0x6768, 0xD1EF, 0x626C, 0xD1F0, 0x4F6F, 0xD1F1, 0x75A1,
+ 0xD1F2, 0x7F8A, 0xD1F3, 0x6D0B, 0xD1F4, 0x9633, 0xD1F5, 0x6C27,
+ 0xD1F6, 0x4EF0, 0xD1F7, 0x75D2, 0xD1F8, 0x517B, 0xD1F9, 0x6837,
+ 0xD1FA, 0x6F3E, 0xD1FB, 0x9080, 0xD1FC, 0x8170, 0xD1FD, 0x5996,
+ 0xD1FE, 0x7476, 0xD240, 0x8938, 0xD241, 0x8939, 0xD242, 0x893A,
+ 0xD243, 0x893B, 0xD244, 0x893C, 0xD245, 0x893D, 0xD246, 0x893E,
+ 0xD247, 0x893F, 0xD248, 0x8940, 0xD249, 0x8942, 0xD24A, 0x8943,
+ 0xD24B, 0x8945, 0xD24C, 0x8946, 0xD24D, 0x8947, 0xD24E, 0x8948,
+ 0xD24F, 0x8949, 0xD250, 0x894A, 0xD251, 0x894B, 0xD252, 0x894C,
+ 0xD253, 0x894D, 0xD254, 0x894E, 0xD255, 0x894F, 0xD256, 0x8950,
+ 0xD257, 0x8951, 0xD258, 0x8952, 0xD259, 0x8953, 0xD25A, 0x8954,
+ 0xD25B, 0x8955, 0xD25C, 0x8956, 0xD25D, 0x8957, 0xD25E, 0x8958,
+ 0xD25F, 0x8959, 0xD260, 0x895A, 0xD261, 0x895B, 0xD262, 0x895C,
+ 0xD263, 0x895D, 0xD264, 0x8960, 0xD265, 0x8961, 0xD266, 0x8962,
+ 0xD267, 0x8963, 0xD268, 0x8964, 0xD269, 0x8965, 0xD26A, 0x8967,
+ 0xD26B, 0x8968, 0xD26C, 0x8969, 0xD26D, 0x896A, 0xD26E, 0x896B,
+ 0xD26F, 0x896C, 0xD270, 0x896D, 0xD271, 0x896E, 0xD272, 0x896F,
+ 0xD273, 0x8970, 0xD274, 0x8971, 0xD275, 0x8972, 0xD276, 0x8973,
+ 0xD277, 0x8974, 0xD278, 0x8975, 0xD279, 0x8976, 0xD27A, 0x8977,
+ 0xD27B, 0x8978, 0xD27C, 0x8979, 0xD27D, 0x897A, 0xD27E, 0x897C,
+ 0xD280, 0x897D, 0xD281, 0x897E, 0xD282, 0x8980, 0xD283, 0x8982,
+ 0xD284, 0x8984, 0xD285, 0x8985, 0xD286, 0x8987, 0xD287, 0x8988,
+ 0xD288, 0x8989, 0xD289, 0x898A, 0xD28A, 0x898B, 0xD28B, 0x898C,
+ 0xD28C, 0x898D, 0xD28D, 0x898E, 0xD28E, 0x898F, 0xD28F, 0x8990,
+ 0xD290, 0x8991, 0xD291, 0x8992, 0xD292, 0x8993, 0xD293, 0x8994,
+ 0xD294, 0x8995, 0xD295, 0x8996, 0xD296, 0x8997, 0xD297, 0x8998,
+ 0xD298, 0x8999, 0xD299, 0x899A, 0xD29A, 0x899B, 0xD29B, 0x899C,
+ 0xD29C, 0x899D, 0xD29D, 0x899E, 0xD29E, 0x899F, 0xD29F, 0x89A0,
+ 0xD2A0, 0x89A1, 0xD2A1, 0x6447, 0xD2A2, 0x5C27, 0xD2A3, 0x9065,
+ 0xD2A4, 0x7A91, 0xD2A5, 0x8C23, 0xD2A6, 0x59DA, 0xD2A7, 0x54AC,
+ 0xD2A8, 0x8200, 0xD2A9, 0x836F, 0xD2AA, 0x8981, 0xD2AB, 0x8000,
+ 0xD2AC, 0x6930, 0xD2AD, 0x564E, 0xD2AE, 0x8036, 0xD2AF, 0x7237,
+ 0xD2B0, 0x91CE, 0xD2B1, 0x51B6, 0xD2B2, 0x4E5F, 0xD2B3, 0x9875,
+ 0xD2B4, 0x6396, 0xD2B5, 0x4E1A, 0xD2B6, 0x53F6, 0xD2B7, 0x66F3,
+ 0xD2B8, 0x814B, 0xD2B9, 0x591C, 0xD2BA, 0x6DB2, 0xD2BB, 0x4E00,
+ 0xD2BC, 0x58F9, 0xD2BD, 0x533B, 0xD2BE, 0x63D6, 0xD2BF, 0x94F1,
+ 0xD2C0, 0x4F9D, 0xD2C1, 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D344, 0x89A6,
+ 0xD345, 0x89A7, 0xD346, 0x89A8, 0xD347, 0x89A9, 0xD348, 0x89AA,
+ 0xD349, 0x89AB, 0xD34A, 0x89AC, 0xD34B, 0x89AD, 0xD34C, 0x89AE,
+ 0xD34D, 0x89AF, 0xD34E, 0x89B0, 0xD34F, 0x89B1, 0xD350, 0x89B2,
+ 0xD351, 0x89B3, 0xD352, 0x89B4, 0xD353, 0x89B5, 0xD354, 0x89B6,
+ 0xD355, 0x89B7, 0xD356, 0x89B8, 0xD357, 0x89B9, 0xD358, 0x89BA,
+ 0xD359, 0x89BB, 0xD35A, 0x89BC, 0xD35B, 0x89BD, 0xD35C, 0x89BE,
+ 0xD35D, 0x89BF, 0xD35E, 0x89C0, 0xD35F, 0x89C3, 0xD360, 0x89CD,
+ 0xD361, 0x89D3, 0xD362, 0x89D4, 0xD363, 0x89D5, 0xD364, 0x89D7,
+ 0xD365, 0x89D8, 0xD366, 0x89D9, 0xD367, 0x89DB, 0xD368, 0x89DD,
+ 0xD369, 0x89DF, 0xD36A, 0x89E0, 0xD36B, 0x89E1, 0xD36C, 0x89E2,
+ 0xD36D, 0x89E4, 0xD36E, 0x89E7, 0xD36F, 0x89E8, 0xD370, 0x89E9,
+ 0xD371, 0x89EA, 0xD372, 0x89EC, 0xD373, 0x89ED, 0xD374, 0x89EE,
+ 0xD375, 0x89F0, 0xD376, 0x89F1, 0xD377, 0x89F2, 0xD378, 0x89F4,
+ 0xD379, 0x89F5, 0xD37A, 0x89F6, 0xD37B, 0x89F7, 0xD37C, 0x89F8,
+ 0xD37D, 0x89F9, 0xD37E, 0x89FA, 0xD380, 0x89FB, 0xD381, 0x89FC,
+ 0xD382, 0x89FD, 0xD383, 0x89FE, 0xD384, 0x89FF, 0xD385, 0x8A01,
+ 0xD386, 0x8A02, 0xD387, 0x8A03, 0xD388, 0x8A04, 0xD389, 0x8A05,
+ 0xD38A, 0x8A06, 0xD38B, 0x8A08, 0xD38C, 0x8A09, 0xD38D, 0x8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A31, 0xD454, 0x8A32, 0xD455, 0x8A33, 0xD456, 0x8A34,
+ 0xD457, 0x8A35, 0xD458, 0x8A36, 0xD459, 0x8A37, 0xD45A, 0x8A38,
+ 0xD45B, 0x8A39, 0xD45C, 0x8A3A, 0xD45D, 0x8A3B, 0xD45E, 0x8A3C,
+ 0xD45F, 0x8A3D, 0xD460, 0x8A3F, 0xD461, 0x8A40, 0xD462, 0x8A41,
+ 0xD463, 0x8A42, 0xD464, 0x8A43, 0xD465, 0x8A44, 0xD466, 0x8A45,
+ 0xD467, 0x8A46, 0xD468, 0x8A47, 0xD469, 0x8A49, 0xD46A, 0x8A4A,
+ 0xD46B, 0x8A4B, 0xD46C, 0x8A4C, 0xD46D, 0x8A4D, 0xD46E, 0x8A4E,
+ 0xD46F, 0x8A4F, 0xD470, 0x8A50, 0xD471, 0x8A51, 0xD472, 0x8A52,
+ 0xD473, 0x8A53, 0xD474, 0x8A54, 0xD475, 0x8A55, 0xD476, 0x8A56,
+ 0xD477, 0x8A57, 0xD478, 0x8A58, 0xD479, 0x8A59, 0xD47A, 0x8A5A,
+ 0xD47B, 0x8A5B, 0xD47C, 0x8A5C, 0xD47D, 0x8A5D, 0xD47E, 0x8A5E,
+ 0xD480, 0x8A5F, 0xD481, 0x8A60, 0xD482, 0x8A61, 0xD483, 0x8A62,
+ 0xD484, 0x8A63, 0xD485, 0x8A64, 0xD486, 0x8A65, 0xD487, 0x8A66,
+ 0xD488, 0x8A67, 0xD489, 0x8A68, 0xD48A, 0x8A69, 0xD48B, 0x8A6A,
+ 0xD48C, 0x8A6B, 0xD48D, 0x8A6C, 0xD48E, 0x8A6D, 0xD48F, 0x8A6E,
+ 0xD490, 0x8A6F, 0xD491, 0x8A70, 0xD492, 0x8A71, 0xD493, 0x8A72,
+ 0xD494, 0x8A73, 0xD495, 0x8A74, 0xD496, 0x8A75, 0xD497, 0x8A76,
+ 0xD498, 0x8A77, 0xD499, 0x8A78, 0xD49A, 0x8A7A, 0xD49B, 0x8A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D66E, 0x8B13,
+ 0xD66F, 0x8B14, 0xD670, 0x8B15, 0xD671, 0x8B16, 0xD672, 0x8B17,
+ 0xD673, 0x8B18, 0xD674, 0x8B19, 0xD675, 0x8B1A, 0xD676, 0x8B1B,
+ 0xD677, 0x8B1C, 0xD678, 0x8B1D, 0xD679, 0x8B1E, 0xD67A, 0x8B1F,
+ 0xD67B, 0x8B20, 0xD67C, 0x8B21, 0xD67D, 0x8B22, 0xD67E, 0x8B23,
+ 0xD680, 0x8B24, 0xD681, 0x8B25, 0xD682, 0x8B27, 0xD683, 0x8B28,
+ 0xD684, 0x8B29, 0xD685, 0x8B2A, 0xD686, 0x8B2B, 0xD687, 0x8B2C,
+ 0xD688, 0x8B2D, 0xD689, 0x8B2E, 0xD68A, 0x8B2F, 0xD68B, 0x8B30,
+ 0xD68C, 0x8B31, 0xD68D, 0x8B32, 0xD68E, 0x8B33, 0xD68F, 0x8B34,
+ 0xD690, 0x8B35, 0xD691, 0x8B36, 0xD692, 0x8B37, 0xD693, 0x8B38,
+ 0xD694, 0x8B39, 0xD695, 0x8B3A, 0xD696, 0x8B3B, 0xD697, 0x8B3C,
+ 0xD698, 0x8B3D, 0xD699, 0x8B3E, 0xD69A, 0x8B3F, 0xD69B, 0x8B40,
+ 0xD69C, 0x8B41, 0xD69D, 0x8B42, 0xD69E, 0x8B43, 0xD69F, 0x8B44,
+ 0xD6A0, 0x8B45, 0xD6A1, 0x5E27, 0xD6A2, 0x75C7, 0xD6A3, 0x90D1,
+ 0xD6A4, 0x8BC1, 0xD6A5, 0x829D, 0xD6A6, 0x679D, 0xD6A7, 0x652F,
+ 0xD6A8, 0x5431, 0xD6A9, 0x8718, 0xD6AA, 0x77E5, 0xD6AB, 0x80A2,
+ 0xD6AC, 0x8102, 0xD6AD, 0x6C41, 0xD6AE, 0x4E4B, 0xD6AF, 0x7EC7,
+ 0xD6B0, 0x804C, 0xD6B1, 0x76F4, 0xD6B2, 0x690D, 0xD6B3, 0x6B96,
+ 0xD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6F5, 0x77A9, 0xD6F6, 0x5631, 0xD6F7, 0x4E3B,
+ 0xD6F8, 0x8457, 0xD6F9, 0x67F1, 0xD6FA, 0x52A9, 0xD6FB, 0x86C0,
+ 0xD6FC, 0x8D2E, 0xD6FD, 0x94F8, 0xD6FE, 0x7B51, 0xD740, 0x8B46,
+ 0xD741, 0x8B47, 0xD742, 0x8B48, 0xD743, 0x8B49, 0xD744, 0x8B4A,
+ 0xD745, 0x8B4B, 0xD746, 0x8B4C, 0xD747, 0x8B4D, 0xD748, 0x8B4E,
+ 0xD749, 0x8B4F, 0xD74A, 0x8B50, 0xD74B, 0x8B51, 0xD74C, 0x8B52,
+ 0xD74D, 0x8B53, 0xD74E, 0x8B54, 0xD74F, 0x8B55, 0xD750, 0x8B56,
+ 0xD751, 0x8B57, 0xD752, 0x8B58, 0xD753, 0x8B59, 0xD754, 0x8B5A,
+ 0xD755, 0x8B5B, 0xD756, 0x8B5C, 0xD757, 0x8B5D, 0xD758, 0x8B5E,
+ 0xD759, 0x8B5F, 0xD75A, 0x8B60, 0xD75B, 0x8B61, 0xD75C, 0x8B62,
+ 0xD75D, 0x8B63, 0xD75E, 0x8B64, 0xD75F, 0x8B65, 0xD760, 0x8B67,
+ 0xD761, 0x8B68, 0xD762, 0x8B69, 0xD763, 0x8B6A, 0xD764, 0x8B6B,
+ 0xD765, 0x8B6D, 0xD766, 0x8B6E, 0xD767, 0x8B6F, 0xD768, 0x8B70,
+ 0xD769, 0x8B71, 0xD76A, 0x8B72, 0xD76B, 0x8B73, 0xD76C, 0x8B74,
+ 0xD76D, 0x8B75, 0xD76E, 0x8B76, 0xD76F, 0x8B77, 0xD770, 0x8B78,
+ 0xD771, 0x8B79, 0xD772, 0x8B7A, 0xD773, 0x8B7B, 0xD774, 0x8B7C,
+ 0xD775, 0x8B7D, 0xD776, 0x8B7E, 0xD777, 0x8B7F, 0xD778, 0x8B80,
+ 0xD779, 0x8B81, 0xD77A, 0x8B82, 0xD77B, 0x8B83, 0xD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 0x8C40, 0xD849, 0x8C42, 0xD84A, 0x8C43, 0xD84B, 0x8C44,
+ 0xD84C, 0x8C45, 0xD84D, 0x8C48, 0xD84E, 0x8C4A, 0xD84F, 0x8C4B,
+ 0xD850, 0x8C4D, 0xD851, 0x8C4E, 0xD852, 0x8C4F, 0xD853, 0x8C50,
+ 0xD854, 0x8C51, 0xD855, 0x8C52, 0xD856, 0x8C53, 0xD857, 0x8C54,
+ 0xD858, 0x8C56, 0xD859, 0x8C57, 0xD85A, 0x8C58, 0xD85B, 0x8C59,
+ 0xD85C, 0x8C5B, 0xD85D, 0x8C5C, 0xD85E, 0x8C5D, 0xD85F, 0x8C5E,
+ 0xD860, 0x8C5F, 0xD861, 0x8C60, 0xD862, 0x8C63, 0xD863, 0x8C64,
+ 0xD864, 0x8C65, 0xD865, 0x8C66, 0xD866, 0x8C67, 0xD867, 0x8C68,
+ 0xD868, 0x8C69, 0xD869, 0x8C6C, 0xD86A, 0x8C6D, 0xD86B, 0x8C6E,
+ 0xD86C, 0x8C6F, 0xD86D, 0x8C70, 0xD86E, 0x8C71, 0xD86F, 0x8C72,
+ 0xD870, 0x8C74, 0xD871, 0x8C75, 0xD872, 0x8C76, 0xD873, 0x8C77,
+ 0xD874, 0x8C7B, 0xD875, 0x8C7C, 0xD876, 0x8C7D, 0xD877, 0x8C7E,
+ 0xD878, 0x8C7F, 0xD879, 0x8C80, 0xD87A, 0x8C81, 0xD87B, 0x8C83,
+ 0xD87C, 0x8C84, 0xD87D, 0x8C86, 0xD87E, 0x8C87, 0xD880, 0x8C88,
+ 0xD881, 0x8C8B, 0xD882, 0x8C8D, 0xD883, 0x8C8E, 0xD884, 0x8C8F,
+ 0xD885, 0x8C90, 0xD886, 0x8C91, 0xD887, 0x8C92, 0xD888, 0x8C93,
+ 0xD889, 0x8C95, 0xD88A, 0x8C96, 0xD88B, 0x8C97, 0xD88C, 0x8C99,
+ 0xD88D, 0x8C9A, 0xD88E, 0x8C9B, 0xD88F, 0x8C9C, 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, 0x8CC3,
+ 0xD956, 0x8CC4, 0xD957, 0x8CC5, 0xD958, 0x8CC6, 0xD959, 0x8CC7,
+ 0xD95A, 0x8CC8, 0xD95B, 0x8CC9, 0xD95C, 0x8CCA, 0xD95D, 0x8CCB,
+ 0xD95E, 0x8CCC, 0xD95F, 0x8CCD, 0xD960, 0x8CCE, 0xD961, 0x8CCF,
+ 0xD962, 0x8CD0, 0xD963, 0x8CD1, 0xD964, 0x8CD2, 0xD965, 0x8CD3,
+ 0xD966, 0x8CD4, 0xD967, 0x8CD5, 0xD968, 0x8CD6, 0xD969, 0x8CD7,
+ 0xD96A, 0x8CD8, 0xD96B, 0x8CD9, 0xD96C, 0x8CDA, 0xD96D, 0x8CDB,
+ 0xD96E, 0x8CDC, 0xD96F, 0x8CDD, 0xD970, 0x8CDE, 0xD971, 0x8CDF,
+ 0xD972, 0x8CE0, 0xD973, 0x8CE1, 0xD974, 0x8CE2, 0xD975, 0x8CE3,
+ 0xD976, 0x8CE4, 0xD977, 0x8CE5, 0xD978, 0x8CE6, 0xD979, 0x8CE7,
+ 0xD97A, 0x8CE8, 0xD97B, 0x8CE9, 0xD97C, 0x8CEA, 0xD97D, 0x8CEB,
+ 0xD97E, 0x8CEC, 0xD980, 0x8CED, 0xD981, 0x8CEE, 0xD982, 0x8CEF,
+ 0xD983, 0x8CF0, 0xD984, 0x8CF1, 0xD985, 0x8CF2, 0xD986, 0x8CF3,
+ 0xD987, 0x8CF4, 0xD988, 0x8CF5, 0xD989, 0x8CF6, 0xD98A, 0x8CF7,
+ 0xD98B, 0x8CF8, 0xD98C, 0x8CF9, 0xD98D, 0x8CFA, 0xD98E, 0x8CFB,
+ 0xD98F, 0x8CFC, 0xD990, 0x8CFD, 0xD991, 0x8CFE, 0xD992, 0x8CFF,
+ 0xD993, 0x8D00, 0xD994, 0x8D01, 0xD995, 0x8D02, 0xD996, 0x8D03,
+ 0xD997, 0x8D04, 0xD998, 0x8D05, 0xD999, 0x8D06, 0xD99A, 0x8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, 0x8605, 0xDEC0, 0x8629,
+ 0xDEC1, 0x8616, 0xDEC2, 0x863C, 0xDEC3, 0x5EFE, 0xDEC4, 0x5F08,
+ 0xDEC5, 0x593C, 0xDEC6, 0x5941, 0xDEC7, 0x8037, 0xDEC8, 0x5955,
+ 0xDEC9, 0x595A, 0xDECA, 0x5958, 0xDECB, 0x530F, 0xDECC, 0x5C22,
+ 0xDECD, 0x5C25, 0xDECE, 0x5C2C, 0xDECF, 0x5C34, 0xDED0, 0x624C,
+ 0xDED1, 0x626A, 0xDED2, 0x629F, 0xDED3, 0x62BB, 0xDED4, 0x62CA,
+ 0xDED5, 0x62DA, 0xDED6, 0x62D7, 0xDED7, 0x62EE, 0xDED8, 0x6322,
+ 0xDED9, 0x62F6, 0xDEDA, 0x6339, 0xDEDB, 0x634B, 0xDEDC, 0x6343,
+ 0xDEDD, 0x63AD, 0xDEDE, 0x63F6, 0xDEDF, 0x6371, 0xDEE0, 0x637A,
+ 0xDEE1, 0x638E, 0xDEE2, 0x63B4, 0xDEE3, 0x636D, 0xDEE4, 0x63AC,
+ 0xDEE5, 0x638A, 0xDEE6, 0x6369, 0xDEE7, 0x63AE, 0xDEE8, 0x63BC,
+ 0xDEE9, 0x63F2, 0xDEEA, 0x63F8, 0xDEEB, 0x63E0, 0xDEEC, 0x63FF,
+ 0xDEED, 0x63C4, 0xDEEE, 0x63DE, 0xDEEF, 0x63CE, 0xDEF0, 0x6452,
+ 0xDEF1, 0x63C6, 0xDEF2, 0x63BE, 0xDEF3, 0x6445, 0xDEF4, 0x6441,
+ 0xDEF5, 0x640B, 0xDEF6, 0x641B, 0xDEF7, 0x6420, 0xDEF8, 0x640C,
+ 0xDEF9, 0x6426, 0xDEFA, 0x6421, 0xDEFB, 0x645E, 0xDEFC, 0x6484,
+ 0xDEFD, 0x646D, 0xDEFE, 0x6496, 0xDF40, 0x9019, 0xDF41, 0x901C,
+ 0xDF42, 0x9023, 0xDF43, 0x9024, 0xDF44, 0x9025, 0xDF45, 0x9027,
+ 0xDF46, 0x9028, 0xDF47, 0x9029, 0xDF48, 0x902A, 0xDF49, 0x902B,
+ 0xDF4A, 0x902C, 0xDF4B, 0x9030, 0xDF4C, 0x9031, 0xDF4D, 0x9032,
+ 0xDF4E, 0x9033, 0xDF4F, 0x9034, 0xDF50, 0x9037, 0xDF51, 0x9039,
+ 0xDF52, 0x903A, 0xDF53, 0x903D, 0xDF54, 0x903F, 0xDF55, 0x9040,
+ 0xDF56, 0x9043, 0xDF57, 0x9045, 0xDF58, 0x9046, 0xDF59, 0x9048,
+ 0xDF5A, 0x9049, 0xDF5B, 0x904A, 0xDF5C, 0x904B, 0xDF5D, 0x904C,
+ 0xDF5E, 0x904E, 0xDF5F, 0x9054, 0xDF60, 0x9055, 0xDF61, 0x9056,
+ 0xDF62, 0x9059, 0xDF63, 0x905A, 0xDF64, 0x905C, 0xDF65, 0x905D,
+ 0xDF66, 0x905E, 0xDF67, 0x905F, 0xDF68, 0x9060, 0xDF69, 0x9061,
+ 0xDF6A, 0x9064, 0xDF6B, 0x9066, 0xDF6C, 0x9067, 0xDF6D, 0x9069,
+ 0xDF6E, 0x906A, 0xDF6F, 0x906B, 0xDF70, 0x906C, 0xDF71, 0x906F,
+ 0xDF72, 0x9070, 0xDF73, 0x9071, 0xDF74, 0x9072, 0xDF75, 0x9073,
+ 0xDF76, 0x9076, 0xDF77, 0x9077, 0xDF78, 0x9078, 0xDF79, 0x9079,
+ 0xDF7A, 0x907A, 0xDF7B, 0x907B, 0xDF7C, 0x907C, 0xDF7D, 0x907E,
+ 0xDF7E, 0x9081, 0xDF80, 0x9084, 0xDF81, 0x9085, 0xDF82, 0x9086,
+ 0xDF83, 0x9087, 0xDF84, 0x9089, 0xDF85, 0x908A, 0xDF86, 0x908C,
+ 0xDF87, 0x908D, 0xDF88, 0x908E, 0xDF89, 0x908F, 0xDF8A, 0x9090,
+ 0xDF8B, 0x9092, 0xDF8C, 0x9094, 0xDF8D, 0x9096, 0xDF8E, 0x9098,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AD,
+ 0xDFD3, 0x54C2, 0xDFD4, 0x54B4, 0xDFD5, 0x54D2, 0xDFD6, 0x54A7,
+ 0xDFD7, 0x54A6, 0xDFD8, 0x54D3, 0xDFD9, 0x54D4, 0xDFDA, 0x5472,
+ 0xDFDB, 0x54A3, 0xDFDC, 0x54D5, 0xDFDD, 0x54BB, 0xDFDE, 0x54BF,
+ 0xDFDF, 0x54CC, 0xDFE0, 0x54D9, 0xDFE1, 0x54DA, 0xDFE2, 0x54DC,
+ 0xDFE3, 0x54A9, 0xDFE4, 0x54AA, 0xDFE5, 0x54A4, 0xDFE6, 0x54DD,
+ 0xDFE7, 0x54CF, 0xDFE8, 0x54DE, 0xDFE9, 0x551B, 0xDFEA, 0x54E7,
+ 0xDFEB, 0x5520, 0xDFEC, 0x54FD, 0xDFED, 0x5514, 0xDFEE, 0x54F3,
+ 0xDFEF, 0x5522, 0xDFF0, 0x5523, 0xDFF1, 0x550F, 0xDFF2, 0x5511,
+ 0xDFF3, 0x5527, 0xDFF4, 0x552A, 0xDFF5, 0x5567, 0xDFF6, 0x558F,
+ 0xDFF7, 0x55B5, 0xDFF8, 0x5549, 0xDFF9, 0x556D, 0xDFFA, 0x5541,
+ 0xDFFB, 0x5555, 0xDFFC, 0x553F, 0xDFFD, 0x5550, 0xDFFE, 0x553C,
+ 0xE040, 0x90C2, 0xE041, 0x90C3, 0xE042, 0x90C6, 0xE043, 0x90C8,
+ 0xE044, 0x90C9, 0xE045, 0x90CB, 0xE046, 0x90CC, 0xE047, 0x90CD,
+ 0xE048, 0x90D2, 0xE049, 0x90D4, 0xE04A, 0x90D5, 0xE04B, 0x90D6,
+ 0xE04C, 0x90D8, 0xE04D, 0x90D9, 0xE04E, 0x90DA, 0xE04F, 0x90DE,
+ 0xE050, 0x90DF, 0xE051, 0x90E0, 0xE052, 0x90E3, 0xE053, 0x90E4,
+ 0xE054, 0x90E5, 0xE055, 0x90E9, 0xE056, 0x90EA, 0xE057, 0x90EC,
+ 0xE058, 0x90EE, 0xE059, 0x90F0, 0xE05A, 0x90F1, 0xE05B, 0x90F2,
+ 0xE05C, 0x90F3, 0xE05D, 0x90F5, 0xE05E, 0x90F6, 0xE05F, 0x90F7,
+ 0xE060, 0x90F9, 0xE061, 0x90FA, 0xE062, 0x90FB, 0xE063, 0x90FC,
+ 0xE064, 0x90FF, 0xE065, 0x9100, 0xE066, 0x9101, 0xE067, 0x9103,
+ 0xE068, 0x9105, 0xE069, 0x9106, 0xE06A, 0x9107, 0xE06B, 0x9108,
+ 0xE06C, 0x9109, 0xE06D, 0x910A, 0xE06E, 0x910B, 0xE06F, 0x910C,
+ 0xE070, 0x910D, 0xE071, 0x910E, 0xE072, 0x910F, 0xE073, 0x9110,
+ 0xE074, 0x9111, 0xE075, 0x9112, 0xE076, 0x9113, 0xE077, 0x9114,
+ 0xE078, 0x9115, 0xE079, 0x9116, 0xE07A, 0x9117, 0xE07B, 0x9118,
+ 0xE07C, 0x911A, 0xE07D, 0x911B, 0xE07E, 0x911C, 0xE080, 0x911D,
+ 0xE081, 0x911F, 0xE082, 0x9120, 0xE083, 0x9121, 0xE084, 0x9124,
+ 0xE085, 0x9125, 0xE086, 0x9126, 0xE087, 0x9127, 0xE088, 0x9128,
+ 0xE089, 0x9129, 0xE08A, 0x912A, 0xE08B, 0x912B, 0xE08C, 0x912C,
+ 0xE08D, 0x912D, 0xE08E, 0x912E, 0xE08F, 0x9130, 0xE090, 0x9132,
+ 0xE091, 0x9133, 0xE092, 0x9134, 0xE093, 0x9135, 0xE094, 0x9136,
+ 0xE095, 0x9137, 0xE096, 0x9138, 0xE097, 0x913A, 0xE098, 0x913B,
+ 0xE099, 0x913C, 0xE09A, 0x913D, 0xE09B, 0x913E, 0xE09C, 0x913F,
+ 0xE09D, 0x9140, 0xE09E, 0x9141, 0xE09F, 0x9142, 0xE0A0, 0x9144,
+ 0xE0A1, 0x5537, 0xE0A2, 0x5556, 0xE0A3, 0x5575, 0xE0A4, 0x5576,
+ 0xE0A5, 0x5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E9, 0x5685, 0xE0EA, 0x5693, 0xE0EB, 0x56AF, 0xE0EC, 0x56D4,
+ 0xE0ED, 0x56D7, 0xE0EE, 0x56DD, 0xE0EF, 0x56E1, 0xE0F0, 0x56F5,
+ 0xE0F1, 0x56EB, 0xE0F2, 0x56F9, 0xE0F3, 0x56FF, 0xE0F4, 0x5704,
+ 0xE0F5, 0x570A, 0xE0F6, 0x5709, 0xE0F7, 0x571C, 0xE0F8, 0x5E0F,
+ 0xE0F9, 0x5E19, 0xE0FA, 0x5E14, 0xE0FB, 0x5E11, 0xE0FC, 0x5E31,
+ 0xE0FD, 0x5E3B, 0xE0FE, 0x5E3C, 0xE140, 0x9145, 0xE141, 0x9147,
+ 0xE142, 0x9148, 0xE143, 0x9151, 0xE144, 0x9153, 0xE145, 0x9154,
+ 0xE146, 0x9155, 0xE147, 0x9156, 0xE148, 0x9158, 0xE149, 0x9159,
+ 0xE14A, 0x915B, 0xE14B, 0x915C, 0xE14C, 0x915F, 0xE14D, 0x9160,
+ 0xE14E, 0x9166, 0xE14F, 0x9167, 0xE150, 0x9168, 0xE151, 0x916B,
+ 0xE152, 0x916D, 0xE153, 0x9173, 0xE154, 0x917A, 0xE155, 0x917B,
+ 0xE156, 0x917C, 0xE157, 0x9180, 0xE158, 0x9181, 0xE159, 0x9182,
+ 0xE15A, 0x9183, 0xE15B, 0x9184, 0xE15C, 0x9186, 0xE15D, 0x9188,
+ 0xE15E, 0x918A, 0xE15F, 0x918E, 0xE160, 0x918F, 0xE161, 0x9193,
+ 0xE162, 0x9194, 0xE163, 0x9195, 0xE164, 0x9196, 0xE165, 0x9197,
+ 0xE166, 0x9198, 0xE167, 0x9199, 0xE168, 0x919C, 0xE169, 0x919D,
+ 0xE16A, 0x919E, 0xE16B, 0x919F, 0xE16C, 0x91A0, 0xE16D, 0x91A1,
+ 0xE16E, 0x91A4, 0xE16F, 0x91A5, 0xE170, 0x91A6, 0xE171, 0x91A7,
+ 0xE172, 0x91A8, 0xE173, 0x91A9, 0xE174, 0x91AB, 0xE175, 0x91AC,
+ 0xE176, 0x91B0, 0xE177, 0x91B1, 0xE178, 0x91B2, 0xE179, 0x91B3,
+ 0xE17A, 0x91B6, 0xE17B, 0x91B7, 0xE17C, 0x91B8, 0xE17D, 0x91B9,
+ 0xE17E, 0x91BB, 0xE180, 0x91BC, 0xE181, 0x91BD, 0xE182, 0x91BE,
+ 0xE183, 0x91BF, 0xE184, 0x91C0, 0xE185, 0x91C1, 0xE186, 0x91C2,
+ 0xE187, 0x91C3, 0xE188, 0x91C4, 0xE189, 0x91C5, 0xE18A, 0x91C6,
+ 0xE18B, 0x91C8, 0xE18C, 0x91CB, 0xE18D, 0x91D0, 0xE18E, 0x91D2,
+ 0xE18F, 0x91D3, 0xE190, 0x91D4, 0xE191, 0x91D5, 0xE192, 0x91D6,
+ 0xE193, 0x91D7, 0xE194, 0x91D8, 0xE195, 0x91D9, 0xE196, 0x91DA,
+ 0xE197, 0x91DB, 0xE198, 0x91DD, 0xE199, 0x91DE, 0xE19A, 0x91DF,
+ 0xE19B, 0x91E0, 0xE19C, 0x91E1, 0xE19D, 0x91E2, 0xE19E, 0x91E3,
+ 0xE19F, 0x91E4, 0xE1A0, 0x91E5, 0xE1A1, 0x5E37, 0xE1A2, 0x5E44,
+ 0xE1A3, 0x5E54, 0xE1A4, 0x5E5B, 0xE1A5, 0x5E5E, 0xE1A6, 0x5E61,
+ 0xE1A7, 0x5C8C, 0xE1A8, 0x5C7A, 0xE1A9, 0x5C8D, 0xE1AA, 0x5C90,
+ 0xE1AB, 0x5C96, 0xE1AC, 0x5C88, 0xE1AD, 0x5C98, 0xE1AE, 0x5C99,
+ 0xE1AF, 0x5C91, 0xE1B0, 0x5C9A, 0xE1B1, 0x5C9C, 0xE1B2, 0x5CB5,
+ 0xE1B3, 0x5CA2, 0xE1B4, 0x5CBD, 0xE1B5, 0x5CAC, 0xE1B6, 0x5CAB,
+ 0xE1B7, 0x5CB1, 0xE1B8, 0x5CA3, 0xE1B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x72F2, 0xE1F9, 0x72F4, 0xE1FA, 0x72F7,
+ 0xE1FB, 0x7301, 0xE1FC, 0x72F3, 0xE1FD, 0x7303, 0xE1FE, 0x72FA,
+ 0xE240, 0x91E6, 0xE241, 0x91E7, 0xE242, 0x91E8, 0xE243, 0x91E9,
+ 0xE244, 0x91EA, 0xE245, 0x91EB, 0xE246, 0x91EC, 0xE247, 0x91ED,
+ 0xE248, 0x91EE, 0xE249, 0x91EF, 0xE24A, 0x91F0, 0xE24B, 0x91F1,
+ 0xE24C, 0x91F2, 0xE24D, 0x91F3, 0xE24E, 0x91F4, 0xE24F, 0x91F5,
+ 0xE250, 0x91F6, 0xE251, 0x91F7, 0xE252, 0x91F8, 0xE253, 0x91F9,
+ 0xE254, 0x91FA, 0xE255, 0x91FB, 0xE256, 0x91FC, 0xE257, 0x91FD,
+ 0xE258, 0x91FE, 0xE259, 0x91FF, 0xE25A, 0x9200, 0xE25B, 0x9201,
+ 0xE25C, 0x9202, 0xE25D, 0x9203, 0xE25E, 0x9204, 0xE25F, 0x9205,
+ 0xE260, 0x9206, 0xE261, 0x9207, 0xE262, 0x9208, 0xE263, 0x9209,
+ 0xE264, 0x920A, 0xE265, 0x920B, 0xE266, 0x920C, 0xE267, 0x920D,
+ 0xE268, 0x920E, 0xE269, 0x920F, 0xE26A, 0x9210, 0xE26B, 0x9211,
+ 0xE26C, 0x9212, 0xE26D, 0x9213, 0xE26E, 0x9214, 0xE26F, 0x9215,
+ 0xE270, 0x9216, 0xE271, 0x9217, 0xE272, 0x9218, 0xE273, 0x9219,
+ 0xE274, 0x921A, 0xE275, 0x921B, 0xE276, 0x921C, 0xE277, 0x921D,
+ 0xE278, 0x921E, 0xE279, 0x921F, 0xE27A, 0x9220, 0xE27B, 0x9221,
+ 0xE27C, 0x9222, 0xE27D, 0x9223, 0xE27E, 0x9224, 0xE280, 0x9225,
+ 0xE281, 0x9226, 0xE282, 0x9227, 0xE283, 0x9228, 0xE284, 0x9229,
+ 0xE285, 0x922A, 0xE286, 0x922B, 0xE287, 0x922C, 0xE288, 0x922D,
+ 0xE289, 0x922E, 0xE28A, 0x922F, 0xE28B, 0x9230, 0xE28C, 0x9231,
+ 0xE28D, 0x9232, 0xE28E, 0x9233, 0xE28F, 0x9234, 0xE290, 0x9235,
+ 0xE291, 0x9236, 0xE292, 0x9237, 0xE293, 0x9238, 0xE294, 0x9239,
+ 0xE295, 0x923A, 0xE296, 0x923B, 0xE297, 0x923C, 0xE298, 0x923D,
+ 0xE299, 0x923E, 0xE29A, 0x923F, 0xE29B, 0x9240, 0xE29C, 0x9241,
+ 0xE29D, 0x9242, 0xE29E, 0x9243, 0xE29F, 0x9244, 0xE2A0, 0x9245,
+ 0xE2A1, 0x72FB, 0xE2A2, 0x7317, 0xE2A3, 0x7313, 0xE2A4, 0x7321,
+ 0xE2A5, 0x730A, 0xE2A6, 0x731E, 0xE2A7, 0x731D, 0xE2A8, 0x7315,
+ 0xE2A9, 0x7322, 0xE2AA, 0x7339, 0xE2AB, 0x7325, 0xE2AC, 0x732C,
+ 0xE2AD, 0x7338, 0xE2AE, 0x7331, 0xE2AF, 0x7350, 0xE2B0, 0x734D,
+ 0xE2B1, 0x7357, 0xE2B2, 0x7360, 0xE2B3, 0x736C, 0xE2B4, 0x736F,
+ 0xE2B5, 0x737E, 0xE2B6, 0x821B, 0xE2B7, 0x5925, 0xE2B8, 0x98E7,
+ 0xE2B9, 0x5924, 0xE2BA, 0x5902, 0xE2BB, 0x9963, 0xE2BC, 0x9967,
+ 0xE2BD, 0x9968, 0xE2BE, 0x9969, 0xE2BF, 0x996A, 0xE2C0, 0x996B,
+ 0xE2C1, 0x996C, 0xE2C2, 0x9974, 0xE2C3, 0x9977, 0xE2C4, 0x997D,
+ 0xE2C5, 0x9980, 0xE2C6, 0x9984, 0xE2C7, 0x9987, 0xE2C8, 0x998A,
+ 0xE2C9, 0x998D, 0xE2CA, 0x9990, 0xE2CB, 0x9991, 0xE2CC, 0x9993,
+ 0xE2CD, 0x9994, 0xE2CE, 0x9995, 0xE2CF, 0x5E80, 0xE2D0, 0x5E91,
+ 0xE2D1, 0x5E8B, 0xE2D2, 0x5E96, 0xE2D3, 0x5EA5, 0xE2D4, 0x5EA0,
+ 0xE2D5, 0x5EB9, 0xE2D6, 0x5EB5, 0xE2D7, 0x5EBE, 0xE2D8, 0x5EB3,
+ 0xE2D9, 0x8D53, 0xE2DA, 0x5ED2, 0xE2DB, 0x5ED1, 0xE2DC, 0x5EDB,
+ 0xE2DD, 0x5EE8, 0xE2DE, 0x5EEA, 0xE2DF, 0x81BA, 0xE2E0, 0x5FC4,
+ 0xE2E1, 0x5FC9, 0xE2E2, 0x5FD6, 0xE2E3, 0x5FCF, 0xE2E4, 0x6003,
+ 0xE2E5, 0x5FEE, 0xE2E6, 0x6004, 0xE2E7, 0x5FE1, 0xE2E8, 0x5FE4,
+ 0xE2E9, 0x5FFE, 0xE2EA, 0x6005, 0xE2EB, 0x6006, 0xE2EC, 0x5FEA,
+ 0xE2ED, 0x5FED, 0xE2EE, 0x5FF8, 0xE2EF, 0x6019, 0xE2F0, 0x6035,
+ 0xE2F1, 0x6026, 0xE2F2, 0x601B, 0xE2F3, 0x600F, 0xE2F4, 0x600D,
+ 0xE2F5, 0x6029, 0xE2F6, 0x602B, 0xE2F7, 0x600A, 0xE2F8, 0x603F,
+ 0xE2F9, 0x6021, 0xE2FA, 0x6078, 0xE2FB, 0x6079, 0xE2FC, 0x607B,
+ 0xE2FD, 0x607A, 0xE2FE, 0x6042, 0xE340, 0x9246, 0xE341, 0x9247,
+ 0xE342, 0x9248, 0xE343, 0x9249, 0xE344, 0x924A, 0xE345, 0x924B,
+ 0xE346, 0x924C, 0xE347, 0x924D, 0xE348, 0x924E, 0xE349, 0x924F,
+ 0xE34A, 0x9250, 0xE34B, 0x9251, 0xE34C, 0x9252, 0xE34D, 0x9253,
+ 0xE34E, 0x9254, 0xE34F, 0x9255, 0xE350, 0x9256, 0xE351, 0x9257,
+ 0xE352, 0x9258, 0xE353, 0x9259, 0xE354, 0x925A, 0xE355, 0x925B,
+ 0xE356, 0x925C, 0xE357, 0x925D, 0xE358, 0x925E, 0xE359, 0x925F,
+ 0xE35A, 0x9260, 0xE35B, 0x9261, 0xE35C, 0x9262, 0xE35D, 0x9263,
+ 0xE35E, 0x9264, 0xE35F, 0x9265, 0xE360, 0x9266, 0xE361, 0x9267,
+ 0xE362, 0x9268, 0xE363, 0x9269, 0xE364, 0x926A, 0xE365, 0x926B,
+ 0xE366, 0x926C, 0xE367, 0x926D, 0xE368, 0x926E, 0xE369, 0x926F,
+ 0xE36A, 0x9270, 0xE36B, 0x9271, 0xE36C, 0x9272, 0xE36D, 0x9273,
+ 0xE36E, 0x9275, 0xE36F, 0x9276, 0xE370, 0x9277, 0xE371, 0x9278,
+ 0xE372, 0x9279, 0xE373, 0x927A, 0xE374, 0x927B, 0xE375, 0x927C,
+ 0xE376, 0x927D, 0xE377, 0x927E, 0xE378, 0x927F, 0xE379, 0x9280,
+ 0xE37A, 0x9281, 0xE37B, 0x9282, 0xE37C, 0x9283, 0xE37D, 0x9284,
+ 0xE37E, 0x9285, 0xE380, 0x9286, 0xE381, 0x9287, 0xE382, 0x9288,
+ 0xE383, 0x9289, 0xE384, 0x928A, 0xE385, 0x928B, 0xE386, 0x928C,
+ 0xE387, 0x928D, 0xE388, 0x928F, 0xE389, 0x9290, 0xE38A, 0x9291,
+ 0xE38B, 0x9292, 0xE38C, 0x9293, 0xE38D, 0x9294, 0xE38E, 0x9295,
+ 0xE38F, 0x9296, 0xE390, 0x9297, 0xE391, 0x9298, 0xE392, 0x9299,
+ 0xE393, 0x929A, 0xE394, 0x929B, 0xE395, 0x929C, 0xE396, 0x929D,
+ 0xE397, 0x929E, 0xE398, 0x929F, 0xE399, 0x92A0, 0xE39A, 0x92A1,
+ 0xE39B, 0x92A2, 0xE39C, 0x92A3, 0xE39D, 0x92A4, 0xE39E, 0x92A5,
+ 0xE39F, 0x92A6, 0xE3A0, 0x92A7, 0xE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E3E4, 0x6C85, 0xE3E5, 0x6C90, 0xE3E6, 0x6C94,
+ 0xE3E7, 0x6C8C, 0xE3E8, 0x6C68, 0xE3E9, 0x6C69, 0xE3EA, 0x6C74,
+ 0xE3EB, 0x6C76, 0xE3EC, 0x6C86, 0xE3ED, 0x6CA9, 0xE3EE, 0x6CD0,
+ 0xE3EF, 0x6CD4, 0xE3F0, 0x6CAD, 0xE3F1, 0x6CF7, 0xE3F2, 0x6CF8,
+ 0xE3F3, 0x6CF1, 0xE3F4, 0x6CD7, 0xE3F5, 0x6CB2, 0xE3F6, 0x6CE0,
+ 0xE3F7, 0x6CD6, 0xE3F8, 0x6CFA, 0xE3F9, 0x6CEB, 0xE3FA, 0x6CEE,
+ 0xE3FB, 0x6CB1, 0xE3FC, 0x6CD3, 0xE3FD, 0x6CEF, 0xE3FE, 0x6CFE,
+ 0xE440, 0x92A8, 0xE441, 0x92A9, 0xE442, 0x92AA, 0xE443, 0x92AB,
+ 0xE444, 0x92AC, 0xE445, 0x92AD, 0xE446, 0x92AF, 0xE447, 0x92B0,
+ 0xE448, 0x92B1, 0xE449, 0x92B2, 0xE44A, 0x92B3, 0xE44B, 0x92B4,
+ 0xE44C, 0x92B5, 0xE44D, 0x92B6, 0xE44E, 0x92B7, 0xE44F, 0x92B8,
+ 0xE450, 0x92B9, 0xE451, 0x92BA, 0xE452, 0x92BB, 0xE453, 0x92BC,
+ 0xE454, 0x92BD, 0xE455, 0x92BE, 0xE456, 0x92BF, 0xE457, 0x92C0,
+ 0xE458, 0x92C1, 0xE459, 0x92C2, 0xE45A, 0x92C3, 0xE45B, 0x92C4,
+ 0xE45C, 0x92C5, 0xE45D, 0x92C6, 0xE45E, 0x92C7, 0xE45F, 0x92C9,
+ 0xE460, 0x92CA, 0xE461, 0x92CB, 0xE462, 0x92CC, 0xE463, 0x92CD,
+ 0xE464, 0x92CE, 0xE465, 0x92CF, 0xE466, 0x92D0, 0xE467, 0x92D1,
+ 0xE468, 0x92D2, 0xE469, 0x92D3, 0xE46A, 0x92D4, 0xE46B, 0x92D5,
+ 0xE46C, 0x92D6, 0xE46D, 0x92D7, 0xE46E, 0x92D8, 0xE46F, 0x92D9,
+ 0xE470, 0x92DA, 0xE471, 0x92DB, 0xE472, 0x92DC, 0xE473, 0x92DD,
+ 0xE474, 0x92DE, 0xE475, 0x92DF, 0xE476, 0x92E0, 0xE477, 0x92E1,
+ 0xE478, 0x92E2, 0xE479, 0x92E3, 0xE47A, 0x92E4, 0xE47B, 0x92E5,
+ 0xE47C, 0x92E6, 0xE47D, 0x92E7, 0xE47E, 0x92E8, 0xE480, 0x92E9,
+ 0xE481, 0x92EA, 0xE482, 0x92EB, 0xE483, 0x92EC, 0xE484, 0x92ED,
+ 0xE485, 0x92EE, 0xE486, 0x92EF, 0xE487, 0x92F0, 0xE488, 0x92F1,
+ 0xE489, 0x92F2, 0xE48A, 0x92F3, 0xE48B, 0x92F4, 0xE48C, 0x92F5,
+ 0xE48D, 0x92F6, 0xE48E, 0x92F7, 0xE48F, 0x92F8, 0xE490, 0x92F9,
+ 0xE491, 0x92FA, 0xE492, 0x92FB, 0xE493, 0x92FC, 0xE494, 0x92FD,
+ 0xE495, 0x92FE, 0xE496, 0x92FF, 0xE497, 0x9300, 0xE498, 0x9301,
+ 0xE499, 0x9302, 0xE49A, 0x9303, 0xE49B, 0x9304, 0xE49C, 0x9305,
+ 0xE49D, 0x9306, 0xE49E, 0x9307, 0xE49F, 0x9308, 0xE4A0, 0x9309,
+ 0xE4A1, 0x6D39, 0xE4A2, 0x6D27, 0xE4A3, 0x6D0C, 0xE4A4, 0x6D43,
+ 0xE4A5, 0x6D48, 0xE4A6, 0x6D07, 0xE4A7, 0x6D04, 0xE4A8, 0x6D19,
+ 0xE4A9, 0x6D0E, 0xE4AA, 0x6D2B, 0xE4AB, 0x6D4D, 0xE4AC, 0x6D2E,
+ 0xE4AD, 0x6D35, 0xE4AE, 0x6D1A, 0xE4AF, 0x6D4F, 0xE4B0, 0x6D52,
+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 0x6EF9, 0xE4F0, 0x6F2F,
+ 0xE4F1, 0x6F36, 0xE4F2, 0x6F4B, 0xE4F3, 0x6F74, 0xE4F4, 0x6F2A,
+ 0xE4F5, 0x6F09, 0xE4F6, 0x6F29, 0xE4F7, 0x6F89, 0xE4F8, 0x6F8D,
+ 0xE4F9, 0x6F8C, 0xE4FA, 0x6F78, 0xE4FB, 0x6F72, 0xE4FC, 0x6F7C,
+ 0xE4FD, 0x6F7A, 0xE4FE, 0x6FD1, 0xE540, 0x930A, 0xE541, 0x930B,
+ 0xE542, 0x930C, 0xE543, 0x930D, 0xE544, 0x930E, 0xE545, 0x930F,
+ 0xE546, 0x9310, 0xE547, 0x9311, 0xE548, 0x9312, 0xE549, 0x9313,
+ 0xE54A, 0x9314, 0xE54B, 0x9315, 0xE54C, 0x9316, 0xE54D, 0x9317,
+ 0xE54E, 0x9318, 0xE54F, 0x9319, 0xE550, 0x931A, 0xE551, 0x931B,
+ 0xE552, 0x931C, 0xE553, 0x931D, 0xE554, 0x931E, 0xE555, 0x931F,
+ 0xE556, 0x9320, 0xE557, 0x9321, 0xE558, 0x9322, 0xE559, 0x9323,
+ 0xE55A, 0x9324, 0xE55B, 0x9325, 0xE55C, 0x9326, 0xE55D, 0x9327,
+ 0xE55E, 0x9328, 0xE55F, 0x9329, 0xE560, 0x932A, 0xE561, 0x932B,
+ 0xE562, 0x932C, 0xE563, 0x932D, 0xE564, 0x932E, 0xE565, 0x932F,
+ 0xE566, 0x9330, 0xE567, 0x9331, 0xE568, 0x9332, 0xE569, 0x9333,
+ 0xE56A, 0x9334, 0xE56B, 0x9335, 0xE56C, 0x9336, 0xE56D, 0x9337,
+ 0xE56E, 0x9338, 0xE56F, 0x9339, 0xE570, 0x933A, 0xE571, 0x933B,
+ 0xE572, 0x933C, 0xE573, 0x933D, 0xE574, 0x933F, 0xE575, 0x9340,
+ 0xE576, 0x9341, 0xE577, 0x9342, 0xE578, 0x9343, 0xE579, 0x9344,
+ 0xE57A, 0x9345, 0xE57B, 0x9346, 0xE57C, 0x9347, 0xE57D, 0x9348,
+ 0xE57E, 0x9349, 0xE580, 0x934A, 0xE581, 0x934B, 0xE582, 0x934C,
+ 0xE583, 0x934D, 0xE584, 0x934E, 0xE585, 0x934F, 0xE586, 0x9350,
+ 0xE587, 0x9351, 0xE588, 0x9352, 0xE589, 0x9353, 0xE58A, 0x9354,
+ 0xE58B, 0x9355, 0xE58C, 0x9356, 0xE58D, 0x9357, 0xE58E, 0x9358,
+ 0xE58F, 0x9359, 0xE590, 0x935A, 0xE591, 0x935B, 0xE592, 0x935C,
+ 0xE593, 0x935D, 0xE594, 0x935E, 0xE595, 0x935F, 0xE596, 0x9360,
+ 0xE597, 0x9361, 0xE598, 0x9362, 0xE599, 0x9363, 0xE59A, 0x9364,
+ 0xE59B, 0x9365, 0xE59C, 0x9366, 0xE59D, 0x9367, 0xE59E, 0x9368,
+ 0xE59F, 0x9369, 0xE5A0, 0x936B, 0xE5A1, 0x6FC9, 0xE5A2, 0x6FA7,
+ 0xE5A3, 0x6FB9, 0xE5A4, 0x6FB6, 0xE5A5, 0x6FC2, 0xE5A6, 0x6FE1,
+ 0xE5A7, 0x6FEE, 0xE5A8, 0x6FDE, 0xE5A9, 0x6FE0, 0xE5AA, 0x6FEF,
+ 0xE5AB, 0x701A, 0xE5AC, 0x7023, 0xE5AD, 0x701B, 0xE5AE, 0x7039,
+ 0xE5AF, 0x7035, 0xE5B0, 0x704F, 0xE5B1, 0x705E, 0xE5B2, 0x5B80,
+ 0xE5B3, 0x5B84, 0xE5B4, 0x5B95, 0xE5B5, 0x5B93, 0xE5B6, 0x5BA5,
+ 0xE5B7, 0x5BB8, 0xE5B8, 0x752F, 0xE5B9, 0x9A9E, 0xE5BA, 0x6434,
+ 0xE5BB, 0x5BE4, 0xE5BC, 0x5BEE, 0xE5BD, 0x8930, 0xE5BE, 0x5BF0,
+ 0xE5BF, 0x8E47, 0xE5C0, 0x8B07, 0xE5C1, 0x8FB6, 0xE5C2,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x9372, 0xE647, 0x9373,
+ 0xE648, 0x9374, 0xE649, 0x9375, 0xE64A, 0x9376, 0xE64B, 0x9377,
+ 0xE64C, 0x9378, 0xE64D, 0x9379, 0xE64E, 0x937A, 0xE64F, 0x937B,
+ 0xE650, 0x937C, 0xE651, 0x937D, 0xE652, 0x937E, 0xE653, 0x937F,
+ 0xE654, 0x9380, 0xE655, 0x9381, 0xE656, 0x9382, 0xE657, 0x9383,
+ 0xE658, 0x9384, 0xE659, 0x9385, 0xE65A, 0x9386, 0xE65B, 0x9387,
+ 0xE65C, 0x9388, 0xE65D, 0x9389, 0xE65E, 0x938A, 0xE65F, 0x938B,
+ 0xE660, 0x938C, 0xE661, 0x938D, 0xE662, 0x938E, 0xE663, 0x9390,
+ 0xE664, 0x9391, 0xE665, 0x9392, 0xE666, 0x9393, 0xE667, 0x9394,
+ 0xE668, 0x9395, 0xE669, 0x9396, 0xE66A, 0x9397, 0xE66B, 0x9398,
+ 0xE66C, 0x9399, 0xE66D, 0x939A, 0xE66E, 0x939B, 0xE66F, 0x939C,
+ 0xE670, 0x939D, 0xE671, 0x939E, 0xE672, 0x939F, 0xE673, 0x93A0,
+ 0xE674, 0x93A1, 0xE675, 0x93A2, 0xE676, 0x93A3, 0xE677, 0x93A4,
+ 0xE678, 0x93A5, 0xE679, 0x93A6, 0xE67A, 0x93A7, 0xE67B, 0x93A8,
+ 0xE67C, 0x93A9, 0xE67D, 0x93AA, 0xE67E, 0x93AB, 0xE680, 0x93AC,
+ 0xE681, 0x93AD, 0xE682, 0x93AE, 0xE683, 0x93AF, 0xE684, 0x93B0,
+ 0xE685, 0x93B1, 0xE686, 0x93B2, 0xE687, 0x93B3, 0xE688, 0x93B4,
+ 0xE689, 0x93B5, 0xE68A, 0x93B6, 0xE68B, 0x93B7, 0xE68C, 0x93B8,
+ 0xE68D, 0x93B9, 0xE68E, 0x93BA, 0xE68F, 0x93BB, 0xE690, 0x93BC,
+ 0xE691, 0x93BD, 0xE692, 0x93BE, 0x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93E6, 0xE758, 0x93E7, 0xE759, 0x93E8,
+ 0xE75A, 0x93E9, 0xE75B, 0x93EA, 0xE75C, 0x93EB, 0xE75D, 0x93EC,
+ 0xE75E, 0x93ED, 0xE75F, 0x93EE, 0xE760, 0x93EF, 0xE761, 0x93F0,
+ 0xE762, 0x93F1, 0xE763, 0x93F2, 0xE764, 0x93F3, 0xE765, 0x93F4,
+ 0xE766, 0x93F5, 0xE767, 0x93F6, 0xE768, 0x93F7, 0xE769, 0x93F8,
+ 0xE76A, 0x93F9, 0xE76B, 0x93FA, 0xE76C, 0x93FB, 0xE76D, 0x93FC,
+ 0xE76E, 0x93FD, 0xE76F, 0x93FE, 0xE770, 0x93FF, 0xE771, 0x9400,
+ 0xE772, 0x9401, 0xE773, 0x9402, 0xE774, 0x9403, 0xE775, 0x9404,
+ 0xE776, 0x9405, 0xE777, 0x9406, 0xE778, 0x9407, 0xE779, 0x9408,
+ 0xE77A, 0x9409, 0xE77B, 0x940A, 0xE77C, 0x940B, 0xE77D, 0x940C,
+ 0xE77E, 0x940D, 0xE780, 0x940E, 0xE781, 0x940F, 0xE782, 0x9410,
+ 0xE783, 0x9411, 0xE784, 0x9412, 0xE785, 0x9413, 0xE786, 0x9414,
+ 0xE787, 0x9415, 0xE788, 0x9416, 0xE789, 0x9417, 0xE78A, 0x9418,
+ 0xE78B, 0x9419, 0xE78C, 0x941A, 0xE78D, 0x941B, 0xE78E, 0x941C,
+ 0xE78F, 0x941D, 0xE790, 0x941E, 0xE791, 0x941F, 0xE792, 0x9420,
+ 0xE793, 0x9421, 0xE794, 0x9422, 0xE795, 0x9423, 0xE796, 0x9424,
+ 0xE797, 0x9425, 0xE798, 0x9426, 0xE799, 0x9427, 0xE79A, 0x9428,
+ 0xE79B, 0x9429, 0xE79C, 0x942A, 0xE79D, 0x942B, 0xE79E, 0x942C,
+ 0xE79F, 0x942D, 0xE7A0, 0x942E, 0xE7A1, 0x7EAD, 0xE7A2, 0x7EB0,
+ 0xE7A3, 0x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E,
+ 0xE7E3, 0x73A2, 0xE7E4, 0x739F, 0xE7E5, 0x73CF, 0xE7E6, 0x73C2,
+ 0xE7E7, 0x73D1, 0xE7E8, 0x73B7, 0xE7E9, 0x73B3, 0xE7EA, 0x73C0,
+ 0xE7EB, 0x73C9, 0xE7EC, 0x73C8, 0xE7ED, 0x73E5, 0xE7EE, 0x73D9,
+ 0xE7EF, 0x987C, 0xE7F0, 0x740A, 0xE7F1, 0x73E9, 0xE7F2, 0x73E7,
+ 0xE7F3, 0x73DE, 0xE7F4, 0x73BA, 0xE7F5, 0x73F2, 0xE7F6, 0x740F,
+ 0xE7F7, 0x742A, 0xE7F8, 0x745B, 0xE7F9, 0x7426, 0xE7FA, 0x7425,
+ 0xE7FB, 0x7428, 0xE7FC, 0x7430, 0xE7FD, 0x742E, 0xE7FE, 0x742C,
+ 0xE840, 0x942F, 0xE841, 0x9430, 0xE842, 0x9431, 0xE843, 0x9432,
+ 0xE844, 0x9433, 0xE845, 0x9434, 0xE846, 0x9435, 0xE847, 0x9436,
+ 0xE848, 0x9437, 0xE849, 0x9438, 0xE84A, 0x9439, 0xE84B, 0x943A,
+ 0xE84C, 0x943B, 0xE84D, 0x943C, 0xE84E, 0x943D, 0xE84F, 0x943F,
+ 0xE850, 0x9440, 0xE851, 0x9441, 0xE852, 0x9442, 0xE853, 0x9443,
+ 0xE854, 0x9444, 0xE855, 0x9445, 0xE856, 0x9446, 0xE857, 0x9447,
+ 0xE858, 0x9448, 0xE859, 0x9449, 0xE85A, 0x944A, 0xE85B, 0x944B,
+ 0xE85C, 0x944C, 0xE85D, 0x944D, 0xE85E, 0x944E, 0xE85F, 0x944F,
+ 0xE860, 0x9450, 0xE861, 0x9451, 0xE862, 0x9452, 0xE863, 0x9453,
+ 0xE864, 0x9454, 0xE865, 0x9455, 0xE866, 0x9456, 0xE867, 0x9457,
+ 0xE868, 0x9458, 0xE869, 0x9459, 0xE86A, 0x945A, 0xE86B, 0x945B,
+ 0xE86C, 0x945C, 0xE86D, 0x945D, 0xE86E, 0x945E, 0xE86F, 0x945F,
+ 0xE870, 0x9460, 0xE871, 0x9461, 0xE872, 0x9462, 0xE873, 0x9463,
+ 0xE874, 0x9464, 0xE875, 0x9465, 0xE876, 0x9466, 0xE877, 0x9467,
+ 0xE878, 0x9468, 0xE879, 0x9469, 0xE87A, 0x946A, 0xE87B, 0x946C,
+ 0xE87C, 0x946D, 0xE87D, 0x946E, 0xE87E, 0x946F, 0xE880, 0x9470,
+ 0xE881, 0x9471, 0xE882, 0x9472, 0xE883, 0x9473, 0xE884, 0x9474,
+ 0xE885, 0x9475, 0xE886, 0x9476, 0xE887, 0x9477, 0xE888, 0x9478,
+ 0xE889, 0x9479, 0xE88A, 0x947A, 0xE88B, 0x947B, 0xE88C, 0x947C,
+ 0xE88D, 0x947D, 0xE88E, 0x947E, 0xE88F, 0x947F, 0xE890, 0x9480,
+ 0xE891, 0x9481, 0xE892, 0x9482, 0xE893, 0x9483, 0xE894, 0x9484,
+ 0xE895, 0x9491, 0xE896, 0x9496, 0xE897, 0x9498, 0xE898, 0x94C7,
+ 0xE899, 0x94CF, 0xE89A, 0x94D3, 0xE89B, 0x94D4, 0xE89C, 0x94DA,
+ 0xE89D, 0x94E6, 0xE89E, 0x94FB, 0xE89F, 0x951C, 0xE8A0, 0x9520,
+ 0xE8A1, 0x741B, 0xE8A2, 0x741A, 0xE8A3, 0x7441, 0xE8A4, 0x745C,
+ 0xE8A5, 0x7457, 0xE8A6, 0x7455, 0xE8A7, 0x7459, 0xE8A8, 0x7477,
+ 0xE8A9, 0x746D, 0xE8AA, 0x747E, 0xE8AB, 0x749C, 0xE8AC, 0x748E,
+ 0xE8AD, 0x7480, 0xE8AE, 0x7481, 0xE8AF, 0x7487, 0xE8B0, 0x748B,
+ 0xE8B1, 0x749E, 0xE8B2, 0x74A8, 0xE8B3, 0x74A9, 0xE8B4, 0x7490,
+ 0xE8B5, 0x74A7, 0xE8B6, 0x74D2, 0xE8B7, 0x74BA, 0xE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0xE8FC, 0x691F,
+ 0xE8FD, 0x6920, 0xE8FE, 0x68F9, 0xE940, 0x9527, 0xE941, 0x9533,
+ 0xE942, 0x953D, 0xE943, 0x9543, 0xE944, 0x9548, 0xE945, 0x954B,
+ 0xE946, 0x9555, 0xE947, 0x955A, 0xE948, 0x9560, 0xE949, 0x956E,
+ 0xE94A, 0x9574, 0xE94B, 0x9575, 0xE94C, 0x9577, 0xE94D, 0x9578,
+ 0xE94E, 0x9579, 0xE94F, 0x957A, 0xE950, 0x957B, 0xE951, 0x957C,
+ 0xE952, 0x957D, 0xE953, 0x957E, 0xE954, 0x9580, 0xE955, 0x9581,
+ 0xE956, 0x9582, 0xE957, 0x9583, 0xE958, 0x9584, 0xE959, 0x9585,
+ 0xE95A, 0x9586, 0xE95B, 0x9587, 0xE95C, 0x9588, 0xE95D, 0x9589,
+ 0xE95E, 0x958A, 0xE95F, 0x958B, 0xE960, 0x958C, 0xE961, 0x958D,
+ 0xE962, 0x958E, 0xE963, 0x958F, 0xE964, 0x9590, 0xE965, 0x9591,
+ 0xE966, 0x9592, 0xE967, 0x9593, 0xE968, 0x9594, 0xE969, 0x9595,
+ 0xE96A, 0x9596, 0xE96B, 0x9597, 0xE96C, 0x9598, 0xE96D, 0x9599,
+ 0xE96E, 0x959A, 0xE96F, 0x959B, 0xE970, 0x959C, 0xE971, 0x959D,
+ 0xE972, 0x959E, 0xE973, 0x959F, 0xE974, 0x95A0, 0xE975, 0x95A1,
+ 0xE976, 0x95A2, 0xE977, 0x95A3, 0xE978, 0x95A4, 0xE979, 0x95A5,
+ 0xE97A, 0x95A6, 0xE97B, 0x95A7, 0xE97C, 0x95A8, 0xE97D, 0x95A9,
+ 0xE97E, 0x95AA, 0xE980, 0x95AB, 0xE981, 0x95AC, 0xE982, 0x95AD,
+ 0xE983, 0x95AE, 0xE984, 0x95AF, 0xE985, 0x95B0, 0xE986, 0x95B1,
+ 0xE987, 0x95B2, 0xE988, 0x95B3, 0xE989, 0x95B4, 0xE98A, 0x95B5,
+ 0xE98B, 0x95B6, 0xE98C, 0x95B7, 0xE98D, 0x95B8, 0xE98E, 0x95B9,
+ 0xE98F, 0x95BA, 0xE990, 0x95BB, 0xE991, 0x95BC, 0xE992, 0x95BD,
+ 0xE993, 0x95BE, 0xE994, 0x95BF, 0xE995, 0x95C0, 0xE996, 0x95C1,
+ 0xE997, 0x95C2, 0xE998, 0x95C3, 0xE999, 0x95C4, 0xE99A, 0x95C5,
+ 0xE99B, 0x95C6, 0xE99C, 0x95C7, 0xE99D, 0x95C8, 0xE99E, 0x95C9,
+ 0xE99F, 0x95CA, 0xE9A0, 0x95CB, 0xE9A1, 0x6924, 0xE9A2, 0x68F0,
+ 0xE9A3, 0x690B, 0xE9A4, 0x6901, 0xE9A5, 0x6957, 0xE9A6, 0x68E3,
+ 0xE9A7, 0x6910, 0xE9A8, 0x6971, 0xE9A9, 0x6939, 0xE9AA, 0x6960,
+ 0xE9AB, 0x6942, 0xE9AC, 0x695D, 0xE9AD, 0x6984, 0xE9AE, 0x696B,
+ 0xE9AF, 0x6980, 0xE9B0, 0x6998, 0xE9B1, 0x6978, 0xE9B2, 0x6934,
+ 0xE9B3, 0x69CC, 0xE9B4, 0x6987, 0xE9B5, 0x6988, 0xE9B6, 0x69CE,
+ 0xE9B7, 0x6989, 0xE9B8, 0x6966, 0xE9B9, 0x6963, 0xE9BA, 0x6979,
+ 0xE9BB, 0x699B, 0xE9BC, 0x69A7, 0xE9BD, 0x69BB, 0xE9BE, 0x69AB,
+ 0xE9BF, 0x69AD, 0xE9C0, 0x69D4, 0xE9C1, 0x69B1, 0xE9C2, 0x69C1,
+ 0xE9C3, 0x69CA, 0xE9C4, 0x69DF, 0xE9C5, 0x6995, 0xE9C6, 0x69E0,
+ 0xE9C7, 0x698D, 0xE9C8, 0x69FF, 0xE9C9, 0x6A2F, 0xE9CA, 0x69ED,
+ 0xE9CB, 0x6A17, 0xE9CC, 0x6A18, 0xE9CD, 0x6A65, 0xE9CE, 0x69F2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50, 0x95DC, 0xEA51, 0x95DD, 0xEA52, 0x95DE, 0xEA53, 0x95DF,
+ 0xEA54, 0x95E0, 0xEA55, 0x95E1, 0xEA56, 0x95E2, 0xEA57, 0x95E3,
+ 0xEA58, 0x95E4, 0xEA59, 0x95E5, 0xEA5A, 0x95E6, 0xEA5B, 0x95E7,
+ 0xEA5C, 0x95EC, 0xEA5D, 0x95FF, 0xEA5E, 0x9607, 0xEA5F, 0x9613,
+ 0xEA60, 0x9618, 0xEA61, 0x961B, 0xEA62, 0x961E, 0xEA63, 0x9620,
+ 0xEA64, 0x9623, 0xEA65, 0x9624, 0xEA66, 0x9625, 0xEA67, 0x9626,
+ 0xEA68, 0x9627, 0xEA69, 0x9628, 0xEA6A, 0x9629, 0xEA6B, 0x962B,
+ 0xEA6C, 0x962C, 0xEA6D, 0x962D, 0xEA6E, 0x962F, 0xEA6F, 0x9630,
+ 0xEA70, 0x9637, 0xEA71, 0x9638, 0xEA72, 0x9639, 0xEA73, 0x963A,
+ 0xEA74, 0x963E, 0xEA75, 0x9641, 0xEA76, 0x9643, 0xEA77, 0x964A,
+ 0xEA78, 0x964E, 0xEA79, 0x964F, 0xEA7A, 0x9651, 0xEA7B, 0x9652,
+ 0xEA7C, 0x9653, 0xEA7D, 0x9656, 0xEA7E, 0x9657, 0xEA80, 0x9658,
+ 0xEA81, 0x9659, 0xEA82, 0x965A, 0xEA83, 0x965C, 0xEA84, 0x965D,
+ 0xEA85, 0x965E, 0xEA86, 0x9660, 0xEA87, 0x9663, 0xEA88, 0x9665,
+ 0xEA89, 0x9666, 0xEA8A, 0x966B, 0xEA8B, 0x966D, 0xEA8C, 0x966E,
+ 0xEA8D, 0x966F, 0xEA8E, 0x9670, 0xEA8F, 0x9671, 0xEA90, 0x9673,
+ 0xEA91, 0x9678, 0xEA92, 0x9679, 0xEA93, 0x967A, 0xEA94, 0x967B,
+ 0xEA95, 0x967C, 0xEA96, 0x967D, 0xEA97, 0x967E, 0xEA98, 0x967F,
+ 0xEA99, 0x9680, 0xEA9A, 0x9681, 0xEA9B, 0x9682, 0xEA9C, 0x9683,
+ 0xEA9D, 0x9684, 0xEA9E, 0x9687, 0xEA9F, 0x9689, 0xEAA0, 0x968A,
+ 0xEAA1, 0x8F8D, 0xEAA2, 0x8F8E, 0xEAA3, 0x8F8F, 0xEAA4, 0x8F98,
+ 0xEAA5, 0x8F9A, 0xEAA6, 0x8ECE, 0xEAA7, 0x620B, 0xEAA8, 0x6217,
+ 0xEAA9, 0x621B, 0xEAAA, 0x621F, 0xEAAB, 0x6222, 0xEAAC, 0x6221,
+ 0xEAAD, 0x6225, 0xEAAE, 0x6224, 0xEAAF, 0x622C, 0xEAB0, 0x81E7,
+ 0xEAB1, 0x74EF, 0xEAB2, 0x74F4, 0xEAB3, 0x74FF, 0xEAB4, 0x750F,
+ 0xEAB5, 0x7511, 0xEAB6, 0x7513, 0xEAB7, 0x6534, 0xEAB8, 0x65EE,
+ 0xEAB9, 0x65EF, 0xEABA, 0x65F0, 0xEABB, 0x660A, 0xEABC, 0x6619,
+ 0xEABD, 0x6772, 0xEABE, 0x6603, 0xEABF, 0x6615, 0xEAC0, 0x6600,
+ 0xEAC1, 0x7085, 0xEAC2, 0x66F7, 0xEAC3, 0x661D, 0xEAC4, 0x6634,
+ 0xEAC5, 0x6631, 0xEAC6, 0x6636, 0xEAC7, 0x6635, 0xEAC8, 0x8006,
+ 0xEAC9, 0x665F, 0xEACA, 0x6654, 0xEACB, 0x6641, 0xEACC, 0x664F,
+ 0xEACD, 0x6656, 0xEACE, 0x6661, 0xEACF, 0x6657, 0xEAD0, 0x6677,
+ 0xEAD1, 0x6684, 0xEAD2, 0x668C, 0xEAD3, 0x66A7, 0xEAD4, 0x669D,
+ 0xEAD5, 0x66BE, 0xEAD6, 0x66DB, 0xEAD7, 0x66DC, 0xEAD8, 0x66E6,
+ 0xEAD9, 0x66E9, 0xEADA, 0x8D32, 0xEADB, 0x8D33, 0xEADC, 0x8D36,
+ 0xEADD, 0x8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, 0xEB63, 0x96BF, 0xEB64, 0x96C2, 0xEB65, 0x96C3,
+ 0xEB66, 0x96C8, 0xEB67, 0x96CA, 0xEB68, 0x96CB, 0xEB69, 0x96D0,
+ 0xEB6A, 0x96D1, 0xEB6B, 0x96D3, 0xEB6C, 0x96D4, 0xEB6D, 0x96D6,
+ 0xEB6E, 0x96D7, 0xEB6F, 0x96D8, 0xEB70, 0x96D9, 0xEB71, 0x96DA,
+ 0xEB72, 0x96DB, 0xEB73, 0x96DC, 0xEB74, 0x96DD, 0xEB75, 0x96DE,
+ 0xEB76, 0x96DF, 0xEB77, 0x96E1, 0xEB78, 0x96E2, 0xEB79, 0x96E3,
+ 0xEB7A, 0x96E4, 0xEB7B, 0x96E5, 0xEB7C, 0x96E6, 0xEB7D, 0x96E7,
+ 0xEB7E, 0x96EB, 0xEB80, 0x96EC, 0xEB81, 0x96ED, 0xEB82, 0x96EE,
+ 0xEB83, 0x96F0, 0xEB84, 0x96F1, 0xEB85, 0x96F2, 0xEB86, 0x96F4,
+ 0xEB87, 0x96F5, 0xEB88, 0x96F8, 0xEB89, 0x96FA, 0xEB8A, 0x96FB,
+ 0xEB8B, 0x96FC, 0xEB8C, 0x96FD, 0xEB8D, 0x96FF, 0xEB8E, 0x9702,
+ 0xEB8F, 0x9703, 0xEB90, 0x9705, 0xEB91, 0x970A, 0xEB92, 0x970B,
+ 0xEB93, 0x970C, 0xEB94, 0x9710, 0xEB95, 0x9711, 0xEB96, 0x9712,
+ 0xEB97, 0x9714, 0xEB98, 0x9715, 0xEB99, 0x9717, 0xEB9A, 0x9718,
+ 0xEB9B, 0x9719, 0xEB9C, 0x971A, 0xEB9D, 0x971B, 0xEB9E, 0x971D,
+ 0xEB9F, 0x971F, 0xEBA0, 0x9720, 0xEBA1, 0x643F, 0xEBA2, 0x64D8,
+ 0xEBA3, 0x8004, 0xEBA4, 0x6BEA, 0xEBA5, 0x6BF3, 0xEBA6, 0x6BFD,
+ 0xEBA7, 0x6BF5, 0xEBA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
+ 0xEBEB, 0x815A, 0xEBEC, 0x8171, 0xEBED, 0x8160, 0xEBEE, 0x8169,
+ 0xEBEF, 0x817C, 0xEBF0, 0x817D, 0xEBF1, 0x816D, 0xEBF2, 0x8167,
+ 0xEBF3, 0x584D, 0xEBF4, 0x5AB5, 0xEBF5, 0x8188, 0xEBF6, 0x8182,
+ 0xEBF7, 0x8191, 0xEBF8, 0x6ED5, 0xEBF9, 0x81A3, 0xEBFA, 0x81AA,
+ 0xEBFB, 0x81CC, 0xEBFC, 0x6726, 0xEBFD, 0x81CA, 0xEBFE, 0x81BB,
+ 0xEC40, 0x9721, 0xEC41, 0x9722, 0xEC42, 0x9723, 0xEC43, 0x9724,
+ 0xEC44, 0x9725, 0xEC45, 0x9726, 0xEC46, 0x9727, 0xEC47, 0x9728,
+ 0xEC48, 0x9729, 0xEC49, 0x972B, 0xEC4A, 0x972C, 0xEC4B, 0x972E,
+ 0xEC4C, 0x972F, 0xEC4D, 0x9731, 0xEC4E, 0x9733, 0xEC4F, 0x9734,
+ 0xEC50, 0x9735, 0xEC51, 0x9736, 0xEC52, 0x9737, 0xEC53, 0x973A,
+ 0xEC54, 0x973B, 0xEC55, 0x973C, 0xEC56, 0x973D, 0xEC57, 0x973F,
+ 0xEC58, 0x9740, 0xEC59, 0x9741, 0xEC5A, 0x9742, 0xEC5B, 0x9743,
+ 0xEC5C, 0x9744, 0xEC5D, 0x9745, 0xEC5E, 0x9746, 0xEC5F, 0x9747,
+ 0xEC60, 0x9748, 0xEC61, 0x9749, 0xEC62, 0x974A, 0xEC63, 0x974B,
+ 0xEC64, 0x974C, 0xEC65, 0x974D, 0xEC66, 0x974E, 0xEC67, 0x974F,
+ 0xEC68, 0x9750, 0xEC69, 0x9751, 0xEC6A, 0x9754, 0xEC6B, 0x9755,
+ 0xEC6C, 0x9757, 0xEC6D, 0x9758, 0xEC6E, 0x975A, 0xEC6F, 0x975C,
+ 0xEC70, 0x975D, 0xEC71, 0x975F, 0xEC72, 0x9763, 0xEC73, 0x9764,
+ 0xEC74, 0x9766, 0xEC75, 0x9767, 0xEC76, 0x9768, 0xEC77, 0x976A,
+ 0xEC78, 0x976B, 0xEC79, 0x976C, 0xEC7A, 0x976D, 0xEC7B, 0x976E,
+ 0xEC7C, 0x976F, 0xEC7D, 0x9770, 0xEC7E, 0x9771, 0xEC80, 0x9772,
+ 0xEC81, 0x9775, 0xEC82, 0x9777, 0xEC83, 0x9778, 0xEC84, 0x9779,
+ 0xEC85, 0x977A, 0xEC86, 0x977B, 0xEC87, 0x977D, 0xEC88, 0x977E,
+ 0xEC89, 0x977F, 0xEC8A, 0x9780, 0xEC8B, 0x9781, 0xEC8C, 0x9782,
+ 0xEC8D, 0x9783, 0xEC8E, 0x9784, 0xEC8F, 0x9786, 0xEC90, 0x9787,
+ 0xEC91, 0x9788, 0xEC92, 0x9789, 0xEC93, 0x978A, 0xEC94, 0x978C,
+ 0xEC95, 0x978E, 0xEC96, 0x978F, 0xEC97, 0x9790, 0xEC98, 0x9793,
+ 0xEC99, 0x9795, 0xEC9A, 0x9796, 0xEC9B, 0x9797, 0xEC9C, 0x9799,
+ 0xEC9D, 0x979A, 0xEC9E, 0x979B, 0xEC9F, 0x979C, 0xECA0, 0x979D,
+ 0xECA1, 0x81C1, 0xECA2, 0x81A6, 0xECA3, 0x6B24, 0xECA4, 0x6B37,
+ 0xECA5, 0x6B39, 0xECA6, 0x6B43, 0xECA7, 0x6B46, 0xECA8, 0x6B59,
+ 0xECA9, 0x98D1, 0xECAA, 0x98D2, 0xECAB, 0x98D3, 0xECAC, 0x98D5,
+ 0xECAD, 0x98D9, 0xECAE, 0x98DA, 0xECAF, 0x6BB3, 0xECB0, 0x5F40,
+ 0xECB1, 0x6BC2, 0xECB2, 0x89F3, 0xECB3, 0x6590, 0xECB4, 0x9F51,
+ 0xECB5, 0x6593, 0xECB6, 0x65BC, 0xECB7, 0x65C6, 0xECB8, 0x65C4,
+ 0xECB9, 0x65C3, 0xECBA, 0x65CC, 0xECBB, 0x65CE, 0xECBC, 0x65D2,
+ 0xECBD, 0x65D6, 0xECBE, 0x7080, 0xECBF, 0x709C, 0xECC0, 0x7096,
+ 0xECC1, 0x709D, 0xECC2, 0x70BB, 0xECC3, 0x70C0, 0xECC4, 0x70B7,
+ 0xECC5, 0x70AB, 0xECC6, 0x70B1, 0xECC7, 0x70E8, 0xECC8, 0x70CA,
+ 0xECC9, 0x7110, 0xECCA, 0x7113, 0xECCB, 0x7116, 0xECCC, 0x712F,
+ 0xECCD, 0x7131, 0xECCE, 0x7173, 0xECCF, 0x715C, 0xECD0, 0x7168,
+ 0xECD1, 0x7145, 0xECD2, 0x7172, 0xECD3, 0x714A, 0xECD4, 0x7178,
+ 0xECD5, 0x717A, 0xECD6, 0x7198, 0xECD7, 0x71B3, 0xECD8, 0x71B5,
+ 0xECD9, 0x71A8, 0xECDA, 0x71A0, 0xECDB, 0x71E0, 0xECDC, 0x71D4,
+ 0xECDD, 0x71E7, 0xECDE, 0x71F9, 0xECDF, 0x721D, 0xECE0, 0x7228,
+ 0xECE1, 0x706C, 0xECE2, 0x7118, 0xECE3, 0x7166, 0xECE4, 0x71B9,
+ 0xECE5, 0x623E, 0xECE6, 0x623D, 0xECE7, 0x6243, 0xECE8, 0x6248,
+ 0xECE9, 0x6249, 0xECEA, 0x793B, 0xECEB, 0x7940, 0xECEC, 0x7946,
+ 0xECED, 0x7949, 0xECEE, 0x795B, 0xECEF, 0x795C, 0xECF0, 0x7953,
+ 0xECF1, 0x795A, 0xECF2, 0x7962, 0xECF3, 0x7957, 0xECF4, 0x7960,
+ 0xECF5, 0x796F, 0xECF6, 0x7967, 0xECF7, 0x797A, 0xECF8, 0x7985,
+ 0xECF9, 0x798A, 0xECFA, 0x799A, 0xECFB, 0x79A7, 0xECFC, 0x79B3,
+ 0xECFD, 0x5FD1, 0xECFE, 0x5FD0, 0xED40, 0x979E, 0xED41, 0x979F,
+ 0xED42, 0x97A1, 0xED43, 0x97A2, 0xED44, 0x97A4, 0xED45, 0x97A5,
+ 0xED46, 0x97A6, 0xED47, 0x97A7, 0xED48, 0x97A8, 0xED49, 0x97A9,
+ 0xED4A, 0x97AA, 0xED4B, 0x97AC, 0xED4C, 0x97AE, 0xED4D, 0x97B0,
+ 0xED4E, 0x97B1, 0xED4F, 0x97B3, 0xED50, 0x97B5, 0xED51, 0x97B6,
+ 0xED52, 0x97B7, 0xED53, 0x97B8, 0xED54, 0x97B9, 0xED55, 0x97BA,
+ 0xED56, 0x97BB, 0xED57, 0x97BC, 0xED58, 0x97BD, 0xED59, 0x97BE,
+ 0xED5A, 0x97BF, 0xED5B, 0x97C0, 0xED5C, 0x97C1, 0xED5D, 0x97C2,
+ 0xED5E, 0x97C3, 0xED5F, 0x97C4, 0xED60, 0x97C5, 0xED61, 0x97C6,
+ 0xED62, 0x97C7, 0xED63, 0x97C8, 0xED64, 0x97C9, 0xED65, 0x97CA,
+ 0xED66, 0x97CB, 0xED67, 0x97CC, 0xED68, 0x97CD, 0xED69, 0x97CE,
+ 0xED6A, 0x97CF, 0xED6B, 0x97D0, 0xED6C, 0x97D1, 0xED6D, 0x97D2,
+ 0xED6E, 0x97D3, 0xED6F, 0x97D4, 0xED70, 0x97D5, 0xED71, 0x97D6,
+ 0xED72, 0x97D7, 0xED73, 0x97D8, 0xED74, 0x97D9, 0xED75, 0x97DA,
+ 0xED76, 0x97DB, 0xED77, 0x97DC, 0xED78, 0x97DD, 0xED79, 0x97DE,
+ 0xED7A, 0x97DF, 0xED7B, 0x97E0, 0xED7C, 0x97E1, 0xED7D, 0x97E2,
+ 0xED7E, 0x97E3, 0xED80, 0x97E4, 0xED81, 0x97E5, 0xED82, 0x97E8,
+ 0xED83, 0x97EE, 0xED84, 0x97EF, 0xED85, 0x97F0, 0xED86, 0x97F1,
+ 0xED87, 0x97F2, 0xED88, 0x97F4, 0xED89, 0x97F7, 0xED8A, 0x97F8,
+ 0xED8B, 0x97F9, 0xED8C, 0x97FA, 0xED8D, 0x97FB, 0xED8E, 0x97FC,
+ 0xED8F, 0x97FD, 0xED90, 0x97FE, 0xED91, 0x97FF, 0xED92, 0x9800,
+ 0xED93, 0x9801, 0xED94, 0x9802, 0xED95, 0x9803, 0xED96, 0x9804,
+ 0xED97, 0x9805, 0xED98, 0x9806, 0xED99, 0x9807, 0xED9A, 0x9808,
+ 0xED9B, 0x9809, 0xED9C, 0x980A, 0xED9D, 0x980B, 0xED9E, 0x980C,
+ 0xED9F, 0x980D, 0xEDA0, 0x980E, 0xEDA1, 0x603C, 0xEDA2, 0x605D,
+ 0xEDA3, 0x605A, 0xEDA4, 0x6067, 0xEDA5, 0x6041, 0xEDA6, 0x6059,
+ 0xEDA7, 0x6063, 0xEDA8, 0x60AB, 0xEDA9, 0x6106, 0xEDAA, 0x610D,
+ 0xEDAB, 0x615D, 0xEDAC, 0x61A9, 0xEDAD, 0x619D, 0xEDAE, 0x61CB,
+ 0xEDAF, 0x61D1, 0xEDB0, 0x6206, 0xEDB1, 0x8080, 0xEDB2, 0x807F,
+ 0xEDB3, 0x6C93, 0xEDB4, 0x6CF6, 0xEDB5, 0x6DFC, 0xEDB6, 0x77F6,
+ 0xEDB7, 0x77F8, 0xEDB8, 0x7800, 0xEDB9, 0x7809, 0xEDBA, 0x7817,
+ 0xEDBB, 0x7818, 0xEDBC, 0x7811, 0xEDBD, 0x65AB, 0xEDBE, 0x782D,
+ 0xEDBF, 0x781C, 0xEDC0, 0x781D, 0xEDC1, 0x7839, 0xEDC2, 0x783A,
+ 0xEDC3, 0x783B, 0xEDC4, 0x781F, 0xEDC5, 0x783C, 0xEDC6, 0x7825,
+ 0xEDC7, 0x782C, 0xEDC8, 0x7823, 0xEDC9, 0x7829, 0xEDCA, 0x784E,
+ 0xEDCB, 0x786D, 0xEDCC, 0x7856, 0xEDCD, 0x7857, 0xEDCE, 0x7826,
+ 0xEDCF, 0x7850, 0xEDD0, 0x7847, 0xEDD1, 0x784C, 0xEDD2, 0x786A,
+ 0xEDD3, 0x789B, 0xEDD4, 0x7893, 0xEDD5, 0x789A, 0xEDD6, 0x7887,
+ 0xEDD7, 0x789C, 0xEDD8, 0x78A1, 0xEDD9, 0x78A3, 0xEDDA, 0x78B2,
+ 0xEDDB, 0x78B9, 0xEDDC, 0x78A5, 0xEDDD, 0x78D4, 0xEDDE, 0x78D9,
+ 0xEDDF, 0x78C9, 0xEDE0, 0x78EC, 0xEDE1, 0x78F2, 0xEDE2, 0x7905,
+ 0xEDE3, 0x78F4, 0xEDE4, 0x7913, 0xEDE5, 0x7924, 0xEDE6, 0x791E,
+ 0xEDE7, 0x7934, 0xEDE8, 0x9F9B, 0xEDE9, 0x9EF9, 0xEDEA, 0x9EFB,
+ 0xEDEB, 0x9EFC, 0xEDEC, 0x76F1, 0xEDED, 0x7704, 0xEDEE, 0x770D,
+ 0xEDEF, 0x76F9, 0xEDF0, 0x7707, 0xEDF1, 0x7708, 0xEDF2, 0x771A,
+ 0xEDF3, 0x7722, 0xEDF4, 0x7719, 0xEDF5, 0x772D, 0xEDF6, 0x7726,
+ 0xEDF7, 0x7735, 0xEDF8, 0x7738, 0xEDF9, 0x7750, 0xEDFA, 0x7751,
+ 0xEDFB, 0x7747, 0xEDFC, 0x7743, 0xEDFD, 0x775A, 0xEDFE, 0x7768,
+ 0xEE40, 0x980F, 0xEE41, 0x9810, 0xEE42, 0x9811, 0xEE43, 0x9812,
+ 0xEE44, 0x9813, 0xEE45, 0x9814, 0xEE46, 0x9815, 0xEE47, 0x9816,
+ 0xEE48, 0x9817, 0xEE49, 0x9818, 0xEE4A, 0x9819, 0xEE4B, 0x981A,
+ 0xEE4C, 0x981B, 0xEE4D, 0x981C, 0xEE4E, 0x981D, 0xEE4F, 0x981E,
+ 0xEE50, 0x981F, 0xEE51, 0x9820, 0xEE52, 0x9821, 0xEE53, 0x9822,
+ 0xEE54, 0x9823, 0xEE55, 0x9824, 0xEE56, 0x9825, 0xEE57, 0x9826,
+ 0xEE58, 0x9827, 0xEE59, 0x9828, 0xEE5A, 0x9829, 0xEE5B, 0x982A,
+ 0xEE5C, 0x982B, 0xEE5D, 0x982C, 0xEE5E, 0x982D, 0xEE5F, 0x982E,
+ 0xEE60, 0x982F, 0xEE61, 0x9830, 0xEE62, 0x9831, 0xEE63, 0x9832,
+ 0xEE64, 0x9833, 0xEE65, 0x9834, 0xEE66, 0x9835, 0xEE67, 0x9836,
+ 0xEE68, 0x9837, 0xEE69, 0x9838, 0xEE6A, 0x9839, 0xEE6B, 0x983A,
+ 0xEE6C, 0x983B, 0xEE6D, 0x983C, 0xEE6E, 0x983D, 0xEE6F, 0x983E,
+ 0xEE70, 0x983F, 0xEE71, 0x9840, 0xEE72, 0x9841, 0xEE73, 0x9842,
+ 0xEE74, 0x9843, 0xEE75, 0x9844, 0xEE76, 0x9845, 0xEE77, 0x9846,
+ 0xEE78, 0x9847, 0xEE79, 0x9848, 0xEE7A, 0x9849, 0xEE7B, 0x984A,
+ 0xEE7C, 0x984B, 0xEE7D, 0x984C, 0xEE7E, 0x984D, 0xEE80, 0x984E,
+ 0xEE81, 0x984F, 0xEE82, 0x9850, 0xEE83, 0x9851, 0xEE84, 0x9852,
+ 0xEE85, 0x9853, 0xEE86, 0x9854, 0xEE87, 0x9855, 0xEE88, 0x9856,
+ 0xEE89, 0x9857, 0xEE8A, 0x9858, 0xEE8B, 0x9859, 0xEE8C, 0x985A,
+ 0xEE8D, 0x985B, 0xEE8E, 0x985C, 0xEE8F, 0x985D, 0xEE90, 0x985E,
+ 0xEE91, 0x985F, 0xEE92, 0x9860, 0xEE93, 0x9861, 0xEE94, 0x9862,
+ 0xEE95, 0x9863, 0xEE96, 0x9864, 0xEE97, 0x9865, 0xEE98, 0x9866,
+ 0xEE99, 0x9867, 0xEE9A, 0x9868, 0xEE9B, 0x9869, 0xEE9C, 0x986A,
+ 0xEE9D, 0x986B, 0xEE9E, 0x986C, 0xEE9F, 0x986D, 0xEEA0, 0x986E,
+ 0xEEA1, 0x7762, 0xEEA2, 0x7765, 0xEEA3, 0x777F, 0xEEA4,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9509, 0xEFB2, 0x950A,
+ 0xEFB3, 0x950D, 0xEFB4, 0x950E, 0xEFB5, 0x950F, 0xEFB6, 0x9512,
+ 0xEFB7, 0x9513, 0xEFB8, 0x9514, 0xEFB9, 0x9515, 0xEFBA, 0x9516,
+ 0xEFBB, 0x9518, 0xEFBC, 0x951B, 0xEFBD, 0x951D, 0xEFBE, 0x951E,
+ 0xEFBF, 0x951F, 0xEFC0, 0x9522, 0xEFC1, 0x952A, 0xEFC2, 0x952B,
+ 0xEFC3, 0x9529, 0xEFC4, 0x952C, 0xEFC5, 0x9531, 0xEFC6, 0x9532,
+ 0xEFC7, 0x9534, 0xEFC8, 0x9536, 0xEFC9, 0x9537, 0xEFCA, 0x9538,
+ 0xEFCB, 0x953C, 0xEFCC, 0x953E, 0xEFCD, 0x953F, 0xEFCE, 0x9542,
+ 0xEFCF, 0x9535, 0xEFD0, 0x9544, 0xEFD1, 0x9545, 0xEFD2, 0x9546,
+ 0xEFD3, 0x9549, 0xEFD4, 0x954C, 0xEFD5, 0x954E, 0xEFD6, 0x954F,
+ 0xEFD7, 0x9552, 0xEFD8, 0x9553, 0xEFD9, 0x9554, 0xEFDA, 0x9556,
+ 0xEFDB, 0x9557, 0xEFDC, 0x9558, 0xEFDD, 0x9559, 0xEFDE, 0x955B,
+ 0xEFDF, 0x955E, 0xEFE0, 0x955F, 0xEFE1, 0x955D, 0xEFE2, 0x9561,
+ 0xEFE3, 0x9562, 0xEFE4, 0x9564, 0xEFE5, 0x9565, 0xEFE6, 0x9566,
+ 0xEFE7, 0x9567, 0xEFE8, 0x9568, 0xEFE9, 0x9569, 0xEFEA, 0x956A,
+ 0xEFEB, 0x956B, 0xEFEC, 0x956C, 0xEFED, 0x956F, 0xEFEE, 0x9571,
+ 0xEFEF, 0x9572, 0xEFF0, 0x9573, 0xEFF1, 0x953A, 0xEFF2, 0x77E7,
+ 0xEFF3, 0x77EC, 0xEFF4, 0x96C9, 0xEFF5, 0x79D5, 0xEFF6, 0x79ED,
+ 0xEFF7, 0x79E3, 0xEFF8, 0x79EB, 0xEFF9, 0x7A06, 0xEFFA, 0x5D47,
+ 0xEFFB, 0x7A03, 0xEFFC, 0x7A02, 0xEFFD, 0x7A1E, 0xEFFE, 0x7A14,
+ 0xF040, 0x9908, 0xF041, 0x9909, 0xF042, 0x990A, 0xF043, 0x990B,
+ 0xF044, 0x990C, 0xF045, 0x990E, 0xF046, 0x990F, 0xF047, 0x9911,
+ 0xF048, 0x9912, 0xF049, 0x9913, 0xF04A, 0x9914, 0xF04B, 0x9915,
+ 0xF04C, 0x9916, 0xF04D, 0x9917, 0xF04E, 0x9918, 0xF04F, 0x9919,
+ 0xF050, 0x991A, 0xF051, 0x991B, 0xF052, 0x991C, 0xF053, 0x991D,
+ 0xF054, 0x991E, 0xF055, 0x991F, 0xF056, 0x9920, 0xF057, 0x9921,
+ 0xF058, 0x9922, 0xF059, 0x9923, 0xF05A, 0x9924, 0xF05B, 0x9925,
+ 0xF05C, 0x9926, 0xF05D, 0x9927, 0xF05E, 0x9928, 0xF05F, 0x9929,
+ 0xF060, 0x992A, 0xF061, 0x992B, 0xF062, 0x992C, 0xF063, 0x992D,
+ 0xF064, 0x992F, 0xF065, 0x9930, 0xF066, 0x9931, 0xF067, 0x9932,
+ 0xF068, 0x9933, 0xF069, 0x9934, 0xF06A, 0x9935, 0xF06B, 0x9936,
+ 0xF06C, 0x9937, 0xF06D, 0x9938, 0xF06E, 0x9939, 0xF06F, 0x993A,
+ 0xF070, 0x993B, 0xF071, 0x993C, 0xF072, 0x993D, 0xF073, 0x993E,
+ 0xF074, 0x993F, 0xF075, 0x9940, 0xF076, 0x9941, 0xF077, 0x9942,
+ 0xF078, 0x9943, 0xF079, 0x9944, 0xF07A, 0x9945, 0xF07B, 0x9946,
+ 0xF07C, 0x9947, 0xF07D, 0x9948, 0xF07E, 0x9949, 0xF080, 0x994A,
+ 0xF081, 0x994B, 0xF082, 0x994C, 0xF083, 0x994D, 0xF084, 0x994E,
+ 0xF085, 0x994F, 0xF086, 0x9950, 0xF087, 0x9951, 0xF088, 0x9952,
+ 0xF089, 0x9953, 0xF08A, 0x9956, 0xF08B, 0x9957, 0xF08C, 0x9958,
+ 0xF08D, 0x9959, 0xF08E, 0x995A, 0xF08F, 0x995B, 0xF090, 0x995C,
+ 0xF091, 0x995D, 0xF092, 0x995E, 0xF093, 0x995F, 0xF094, 0x9960,
+ 0xF095, 0x9961, 0xF096, 0x9962, 0xF097, 0x9964, 0xF098, 0x9966,
+ 0xF099, 0x9973, 0xF09A, 0x9978, 0xF09B, 0x9979, 0xF09C, 0x997B,
+ 0xF09D, 0x997E, 0xF09E, 0x9982, 0xF09F, 0x9983, 0xF0A0, 0x9989,
+ 0xF0A1, 0x7A39, 0xF0A2, 0x7A37, 0xF0A3, 0x7A51, 0xF0A4, 0x9ECF,
+ 0xF0A5, 0x99A5, 0xF0A6, 0x7A70, 0xF0A7, 0x7688, 0xF0A8, 0x768E,
+ 0xF0A9, 0x7693, 0xF0AA, 0x7699, 0xF0AB, 0x76A4, 0xF0AC, 0x74DE,
+ 0xF0AD, 0x74E0, 0xF0AE, 0x752C, 0xF0AF, 0x9E20, 0xF0B0, 0x9E22,
+ 0xF0B1, 0x9E28, 0xF0B2, 0x9E29, 0xF0B3, 0x9E2A, 0xF0B4, 0x9E2B,
+ 0xF0B5, 0x9E2C, 0xF0B6, 0x9E32, 0xF0B7, 0x9E31, 0xF0B8, 0x9E36,
+ 0xF0B9, 0x9E38, 0xF0BA, 0x9E37, 0xF0BB, 0x9E39, 0xF0BC, 0x9E3A,
+ 0xF0BD, 0x9E3E, 0xF0BE, 0x9E41, 0xF0BF, 0x9E42, 0xF0C0, 0x9E44,
+ 0xF0C1, 0x9E46, 0xF0C2, 0x9E47, 0xF0C3, 0x9E48, 0xF0C4, 0x9E49,
+ 0xF0C5, 0x9E4B, 0xF0C6, 0x9E4C, 0xF0C7, 0x9E4E, 0xF0C8, 0x9E51,
+ 0xF0C9, 0x9E55, 0xF0CA,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0xF14F, 0x99A9, 0xF150, 0x99AA, 0xF151, 0x99AB,
+ 0xF152, 0x99AC, 0xF153, 0x99AD, 0xF154, 0x99AE, 0xF155, 0x99AF,
+ 0xF156, 0x99B0, 0xF157, 0x99B1, 0xF158, 0x99B2, 0xF159, 0x99B3,
+ 0xF15A, 0x99B4, 0xF15B, 0x99B5, 0xF15C, 0x99B6, 0xF15D, 0x99B7,
+ 0xF15E, 0x99B8, 0xF15F, 0x99B9, 0xF160, 0x99BA, 0xF161, 0x99BB,
+ 0xF162, 0x99BC, 0xF163, 0x99BD, 0xF164, 0x99BE, 0xF165, 0x99BF,
+ 0xF166, 0x99C0, 0xF167, 0x99C1, 0xF168, 0x99C2, 0xF169, 0x99C3,
+ 0xF16A, 0x99C4, 0xF16B, 0x99C5, 0xF16C, 0x99C6, 0xF16D, 0x99C7,
+ 0xF16E, 0x99C8, 0xF16F, 0x99C9, 0xF170, 0x99CA, 0xF171, 0x99CB,
+ 0xF172, 0x99CC, 0xF173, 0x99CD, 0xF174, 0x99CE, 0xF175, 0x99CF,
+ 0xF176, 0x99D0, 0xF177, 0x99D1, 0xF178, 0x99D2, 0xF179, 0x99D3,
+ 0xF17A, 0x99D4, 0xF17B, 0x99D5, 0xF17C, 0x99D6, 0xF17D, 0x99D7,
+ 0xF17E, 0x99D8, 0xF180, 0x99D9, 0xF181, 0x99DA, 0xF182, 0x99DB,
+ 0xF183, 0x99DC, 0xF184, 0x99DD, 0xF185, 0x99DE, 0xF186, 0x99DF,
+ 0xF187, 0x99E0, 0xF188, 0x99E1, 0xF189, 0x99E2, 0xF18A, 0x99E3,
+ 0xF18B, 0x99E4, 0xF18C, 0x99E5, 0xF18D, 0x99E6, 0xF18E, 0x99E7,
+ 0xF18F, 0x99E8, 0xF190, 0x99E9, 0xF191, 0x99EA, 0xF192, 0x99EB,
+ 0xF193, 0x99EC, 0xF194, 0x99ED, 0xF195, 0x99EE, 0xF196, 0x99EF,
+ 0xF197, 0x99F0, 0xF198, 0x99F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890A, 0xF1DC, 0x8934, 0xF1DD, 0x892B, 0xF1DE, 0x8936,
+ 0xF1DF, 0x8941, 0xF1E0, 0x8966, 0xF1E1, 0x897B, 0xF1E2, 0x758B,
+ 0xF1E3, 0x80E5, 0xF1E4, 0x76B2, 0xF1E5, 0x76B4, 0xF1E6, 0x77DC,
+ 0xF1E7, 0x8012, 0xF1E8, 0x8014, 0xF1E9, 0x8016, 0xF1EA, 0x801C,
+ 0xF1EB, 0x8020, 0xF1EC, 0x8022, 0xF1ED, 0x8025, 0xF1EE, 0x8026,
+ 0xF1EF, 0x8027, 0xF1F0, 0x8029, 0xF1F1, 0x8028, 0xF1F2, 0x8031,
+ 0xF1F3, 0x800B, 0xF1F4, 0x8035, 0xF1F5, 0x8043, 0xF1F6, 0x8046,
+ 0xF1F7, 0x804D, 0xF1F8, 0x8052, 0xF1F9, 0x8069, 0xF1FA, 0x8071,
+ 0xF1FB, 0x8983, 0xF1FC, 0x9878, 0xF1FD, 0x9880, 0xF1FE, 0x9883,
+ 0xF240, 0x99FA, 0xF241, 0x99FB, 0xF242, 0x99FC, 0xF243, 0x99FD,
+ 0xF244, 0x99FE, 0xF245, 0x99FF, 0xF246, 0x9A00, 0xF247, 0x9A01,
+ 0xF248, 0x9A02, 0xF249, 0x9A03, 0xF24A, 0x9A04, 0xF24B, 0x9A05,
+ 0xF24C, 0x9A06, 0xF24D, 0x9A07, 0xF24E, 0x9A08, 0xF24F, 0x9A09,
+ 0xF250, 0x9A0A, 0xF251, 0x9A0B, 0xF252, 0x9A0C, 0xF253, 0x9A0D,
+ 0xF254, 0x9A0E, 0xF255, 0x9A0F, 0xF256, 0x9A10, 0xF257, 0x9A11,
+ 0xF258, 0x9A12, 0xF259, 0x9A13, 0xF25A, 0x9A14, 0xF25B, 0x9A15,
+ 0xF25C, 0x9A16, 0xF25D, 0x9A17, 0xF25E, 0x9A18, 0xF25F, 0x9A19,
+ 0xF260, 0x9A1A, 0xF261, 0x9A1B, 0xF262, 0x9A1C, 0xF263, 0x9A1D,
+ 0xF264, 0x9A1E, 0xF265, 0x9A1F, 0xF266, 0x9A20, 0xF267, 0x9A21,
+ 0xF268, 0x9A22, 0xF269, 0x9A23, 0xF26A, 0x9A24, 0xF26B, 0x9A25,
+ 0xF26C, 0x9A26, 0xF26D, 0x9A27, 0xF26E, 0x9A28, 0xF26F, 0x9A29,
+ 0xF270, 0x9A2A, 0xF271, 0x9A2B, 0xF272, 0x9A2C, 0xF273, 0x9A2D,
+ 0xF274, 0x9A2E, 0xF275, 0x9A2F, 0xF276, 0x9A30, 0xF277, 0x9A31,
+ 0xF278, 0x9A32, 0xF279, 0x9A33, 0xF27A, 0x9A34, 0xF27B, 0x9A35,
+ 0xF27C, 0x9A36, 0xF27D, 0x9A37, 0xF27E, 0x9A38, 0xF280, 0x9A39,
+ 0xF281, 0x9A3A, 0xF282, 0x9A3B, 0xF283, 0x9A3C, 0xF284, 0x9A3D,
+ 0xF285, 0x9A3E, 0xF286, 0x9A3F, 0xF287, 0x9A40, 0xF288, 0x9A41,
+ 0xF289, 0x9A42, 0xF28A, 0x9A43, 0xF28B, 0x9A44, 0xF28C, 0x9A45,
+ 0xF28D, 0x9A46, 0xF28E, 0x9A47, 0xF28F, 0x9A48, 0xF290, 0x9A49,
+ 0xF291, 0x9A4A, 0xF292, 0x9A4B, 0xF293, 0x9A4C, 0xF294, 0x9A4D,
+ 0xF295, 0x9A4E, 0xF296, 0x9A4F, 0xF297, 0x9A50, 0xF298, 0x9A51,
+ 0xF299, 0x9A52, 0xF29A, 0x9A53, 0xF29B, 0x9A54, 0xF29C, 0x9A55,
+ 0xF29D, 0x9A56, 0xF29E, 0x9A57, 0xF29F, 0x9A58, 0xF2A0, 0x9A59,
+ 0xF2A1, 0x9889, 0xF2A2, 0x988C, 0xF2A3, 0x988D, 0xF2A4, 0x988F,
+ 0xF2A5, 0x9894, 0xF2A6, 0x989A, 0xF2A7, 0x989B, 0xF2A8, 0x989E,
+ 0xF2A9, 0x989F, 0xF2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, 0x877D, 0xF2EE, 0x877E, 0xF2EF, 0x877B, 0xF2F0, 0x8760,
+ 0xF2F1, 0x8770, 0xF2F2, 0x874C, 0xF2F3, 0x876E, 0xF2F4, 0x878B,
+ 0xF2F5, 0x8753, 0xF2F6, 0x8763, 0xF2F7, 0x877C, 0xF2F8, 0x8764,
+ 0xF2F9, 0x8759, 0xF2FA, 0x8765, 0xF2FB, 0x8793, 0xF2FC, 0x87AF,
+ 0xF2FD, 0x87A8, 0xF2FE, 0x87D2, 0xF340, 0x9A5A, 0xF341, 0x9A5B,
+ 0xF342, 0x9A5C, 0xF343, 0x9A5D, 0xF344, 0x9A5E, 0xF345, 0x9A5F,
+ 0xF346, 0x9A60, 0xF347, 0x9A61, 0xF348, 0x9A62, 0xF349, 0x9A63,
+ 0xF34A, 0x9A64, 0xF34B, 0x9A65, 0xF34C, 0x9A66, 0xF34D, 0x9A67,
+ 0xF34E, 0x9A68, 0xF34F, 0x9A69, 0xF350, 0x9A6A, 0xF351, 0x9A6B,
+ 0xF352, 0x9A72, 0xF353, 0x9A83, 0xF354, 0x9A89, 0xF355, 0x9A8D,
+ 0xF356, 0x9A8E, 0xF357, 0x9A94, 0xF358, 0x9A95, 0xF359, 0x9A99,
+ 0xF35A, 0x9AA6, 0xF35B, 0x9AA9, 0xF35C, 0x9AAA, 0xF35D, 0x9AAB,
+ 0xF35E, 0x9AAC, 0xF35F, 0x9AAD, 0xF360, 0x9AAE, 0xF361, 0x9AAF,
+ 0xF362, 0x9AB2, 0xF363, 0x9AB3, 0xF364, 0x9AB4, 0xF365, 0x9AB5,
+ 0xF366, 0x9AB9, 0xF367, 0x9ABB, 0xF368, 0x9ABD, 0xF369, 0x9ABE,
+ 0xF36A, 0x9ABF, 0xF36B, 0x9AC3, 0xF36C, 0x9AC4, 0xF36D, 0x9AC6,
+ 0xF36E, 0x9AC7, 0xF36F, 0x9AC8, 0xF370, 0x9AC9, 0xF371, 0x9ACA,
+ 0xF372, 0x9ACD, 0xF373, 0x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7, 0x7BE6, 0xF3F8, 0x7BEA, 0xF3F9, 0x7C0C, 0xF3FA, 0x7BFE,
+ 0xF3FB, 0x7BFC, 0xF3FC, 0x7C0F, 0xF3FD, 0x7C16, 0xF3FE, 0x7C0B,
+ 0xF440, 0x9B07, 0xF441, 0x9B09, 0xF442, 0x9B0A, 0xF443, 0x9B0B,
+ 0xF444, 0x9B0C, 0xF445, 0x9B0D, 0xF446, 0x9B0E, 0xF447, 0x9B10,
+ 0xF448, 0x9B11, 0xF449, 0x9B12, 0xF44A, 0x9B14, 0xF44B, 0x9B15,
+ 0xF44C, 0x9B16, 0xF44D, 0x9B17, 0xF44E, 0x9B18, 0xF44F, 0x9B19,
+ 0xF450, 0x9B1A, 0xF451, 0x9B1B, 0xF452, 0x9B1C, 0xF453, 0x9B1D,
+ 0xF454, 0x9B1E, 0xF455, 0x9B20, 0xF456, 0x9B21, 0xF457, 0x9B22,
+ 0xF458, 0x9B24, 0xF459, 0x9B25, 0xF45A, 0x9B26, 0xF45B, 0x9B27,
+ 0xF45C, 0x9B28, 0xF45D, 0x9B29, 0xF45E, 0x9B2A, 0xF45F, 0x9B2B,
+ 0xF460, 0x9B2C, 0xF461, 0x9B2D, 0xF462, 0x9B2E, 0xF463, 0x9B30,
+ 0xF464, 0x9B31, 0xF465, 0x9B33, 0xF466, 0x9B34, 0xF467, 0x9B35,
+ 0xF468, 0x9B36, 0xF469, 0x9B37, 0xF46A, 0x9B38, 0xF46B, 0x9B39,
+ 0xF46C, 0x9B3A, 0xF46D, 0x9B3D, 0xF46E, 0x9B3E, 0xF46F, 0x9B3F,
+ 0xF470, 0x9B40, 0xF471, 0x9B46, 0xF472, 0x9B4A, 0xF473, 0x9B4B,
+ 0xF474, 0x9B4C, 0xF475, 0x9B4E, 0xF476, 0x9B50, 0xF477, 0x9B52,
+ 0xF478, 0x9B53, 0xF479, 0x9B55, 0xF47A, 0x9B56, 0xF47B, 0x9B57,
+ 0xF47C, 0x9B58, 0xF47D, 0x9B59, 0xF47E, 0x9B5A, 0xF480, 0x9B5B,
+ 0xF481, 0x9B5C, 0xF482, 0x9B5D, 0xF483, 0x9B5E, 0xF484, 0x9B5F,
+ 0xF485, 0x9B60, 0xF486, 0x9B61, 0xF487, 0x9B62, 0xF488, 0x9B63,
+ 0xF489, 0x9B64, 0xF48A, 0x9B65, 0xF48B, 0x9B66, 0xF48C, 0x9B67,
+ 0xF48D, 0x9B68, 0xF48E, 0x9B69, 0xF48F, 0x9B6A, 0xF490, 0x9B6B,
+ 0xF491, 0x9B6C, 0xF492, 0x9B6D, 0xF493, 0x9B6E, 0xF494, 0x9B6F,
+ 0xF495, 0x9B70, 0xF496, 0x9B71, 0xF497, 0x9B72, 0xF498, 0x9B73,
+ 0xF499, 0x9B74, 0xF49A, 0x9B75, 0xF49B, 0x9B76, 0xF49C, 0x9B77,
+ 0xF49D, 0x9B78, 0xF49E, 0x9B79, 0xF49F, 0x9B7A, 0xF4A0, 0x9B7B,
+ 0xF4A1, 0x7C1F, 0xF4A2, 0x7C2A, 0xF4A3, 0x7C26, 0xF4A4, 0x7C38,
+ 0xF4A5, 0x7C41, 0xF4A6, 0x7C40, 0xF4A7, 0x81FE, 0xF4A8, 0x8201,
+ 0xF4A9, 0x8202, 0xF4AA, 0x8204, 0xF4AB, 0x81EC, 0xF4AC, 0x8844,
+ 0xF4AD, 0x8221, 0xF4AE, 0x8222, 0xF4AF, 0x8223, 0xF4B0, 0x822D,
+ 0xF4B1, 0x822F, 0xF4B2, 0x8228, 0xF4B3, 0x822B, 0xF4B4, 0x8238,
+ 0xF4B5, 0x823B, 0xF4B6, 0x8233, 0xF4B7, 0x8234, 0xF4B8, 0x823E,
+ 0xF4B9, 0x8244, 0xF4BA, 0x8249, 0xF4BB, 0x824B, 0xF4BC, 0x824F,
+ 0xF4BD, 0x825A, 0xF4BE, 0x825F, 0xF4BF, 0x8268, 0xF4C0, 0x887E,
+ 0xF4C1, 0x8885, 0xF4C2, 0x8888, 0xF4C3, 0x88D8, 0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 0x9B80, 0xF545, 0x9B81,
+ 0xF546, 0x9B82, 0xF547, 0x9B83, 0xF548, 0x9B84, 0xF549, 0x9B85,
+ 0xF54A, 0x9B86, 0xF54B, 0x9B87, 0xF54C, 0x9B88, 0xF54D, 0x9B89,
+ 0xF54E, 0x9B8A, 0xF54F, 0x9B8B, 0xF550, 0x9B8C, 0xF551, 0x9B8D,
+ 0xF552, 0x9B8E, 0xF553, 0x9B8F, 0xF554, 0x9B90, 0xF555, 0x9B91,
+ 0xF556, 0x9B92, 0xF557, 0x9B93, 0xF558, 0x9B94, 0xF559, 0x9B95,
+ 0xF55A, 0x9B96, 0xF55B, 0x9B97, 0xF55C, 0x9B98, 0xF55D, 0x9B99,
+ 0xF55E, 0x9B9A, 0xF55F, 0x9B9B, 0xF560, 0x9B9C, 0xF561, 0x9B9D,
+ 0xF562, 0x9B9E, 0xF563, 0x9B9F, 0xF564, 0x9BA0, 0xF565, 0x9BA1,
+ 0xF566, 0x9BA2, 0xF567, 0x9BA3, 0xF568, 0x9BA4, 0xF569, 0x9BA5,
+ 0xF56A, 0x9BA6, 0xF56B, 0x9BA7, 0xF56C, 0x9BA8, 0xF56D, 0x9BA9,
+ 0xF56E, 0x9BAA, 0xF56F, 0x9BAB, 0xF570, 0x9BAC, 0xF571, 0x9BAD,
+ 0xF572, 0x9BAE, 0xF573, 0x9BAF, 0xF574, 0x9BB0, 0xF575, 0x9BB1,
+ 0xF576, 0x9BB2, 0xF577, 0x9BB3, 0xF578, 0x9BB4, 0xF579, 0x9BB5,
+ 0xF57A, 0x9BB6, 0xF57B, 0x9BB7, 0xF57C, 0x9BB8, 0xF57D, 0x9BB9,
+ 0xF57E, 0x9BBA, 0xF580, 0x9BBB, 0xF581, 0x9BBC, 0xF582, 0x9BBD,
+ 0xF583, 0x9BBE, 0xF584, 0x9BBF, 0xF585, 0x9BC0, 0xF586, 0x9BC1,
+ 0xF587, 0x9BC2, 0xF588, 0x9BC3, 0xF589, 0x9BC4, 0xF58A, 0x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, 0x9BE9, 0xF64E, 0x9BEA, 0xF64F, 0x9BEB,
+ 0xF650, 0x9BEC, 0xF651, 0x9BED, 0xF652, 0x9BEE, 0xF653, 0x9BEF,
+ 0xF654, 0x9BF0, 0xF655, 0x9BF1, 0xF656, 0x9BF2, 0xF657, 0x9BF3,
+ 0xF658, 0x9BF4, 0xF659, 0x9BF5, 0xF65A, 0x9BF6, 0xF65B, 0x9BF7,
+ 0xF65C, 0x9BF8, 0xF65D, 0x9BF9, 0xF65E, 0x9BFA, 0xF65F, 0x9BFB,
+ 0xF660, 0x9BFC, 0xF661, 0x9BFD, 0xF662, 0x9BFE, 0xF663, 0x9BFF,
+ 0xF664, 0x9C00, 0xF665, 0x9C01, 0xF666, 0x9C02, 0xF667, 0x9C03,
+ 0xF668, 0x9C04, 0xF669, 0x9C05, 0xF66A, 0x9C06, 0xF66B, 0x9C07,
+ 0xF66C, 0x9C08, 0xF66D, 0x9C09, 0xF66E, 0x9C0A, 0xF66F, 0x9C0B,
+ 0xF670, 0x9C0C, 0xF671, 0x9C0D, 0xF672, 0x9C0E, 0xF673, 0x9C0F,
+ 0xF674, 0x9C10, 0xF675, 0x9C11, 0xF676, 0x9C12, 0xF677, 0x9C13,
+ 0xF678, 0x9C14, 0xF679, 0x9C15, 0xF67A, 0x9C16, 0xF67B, 0x9C17,
+ 0xF67C, 0x9C18, 0xF67D, 0x9C19, 0xF67E, 0x9C1A, 0xF680, 0x9C1B,
+ 0xF681, 0x9C1C, 0xF682, 0x9C1D, 0xF683, 0x9C1E, 0xF684, 0x9C1F,
+ 0xF685, 0x9C20, 0xF686, 0x9C21, 0xF687, 0x9C22, 0xF688, 0x9C23,
+ 0xF689, 0x9C24, 0xF68A, 0x9C25, 0xF68B, 0x9C26, 0xF68C, 0x9C27,
+ 0xF68D, 0x9C28, 0xF68E, 0x9C29, 0xF68F, 0x9C2A, 0xF690, 0x9C2B,
+ 0xF691, 0x9C2C, 0xF692, 0x9C2D, 0xF693, 0x9C2E, 0xF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x9C54, 0xF759, 0x9C55,
+ 0xF75A, 0x9C56, 0xF75B, 0x9C57, 0xF75C, 0x9C58, 0xF75D, 0x9C59,
+ 0xF75E, 0x9C5A, 0xF75F, 0x9C5B, 0xF760, 0x9C5C, 0xF761, 0x9C5D,
+ 0xF762, 0x9C5E, 0xF763, 0x9C5F, 0xF764, 0x9C60, 0xF765, 0x9C61,
+ 0xF766, 0x9C62, 0xF767, 0x9C63, 0xF768, 0x9C64, 0xF769, 0x9C65,
+ 0xF76A, 0x9C66, 0xF76B, 0x9C67, 0xF76C, 0x9C68, 0xF76D, 0x9C69,
+ 0xF76E, 0x9C6A, 0xF76F, 0x9C6B, 0xF770, 0x9C6C, 0xF771, 0x9C6D,
+ 0xF772, 0x9C6E, 0xF773, 0x9C6F, 0xF774, 0x9C70, 0xF775, 0x9C71,
+ 0xF776, 0x9C72, 0xF777, 0x9C73, 0xF778, 0x9C74, 0xF779, 0x9C75,
+ 0xF77A, 0x9C76, 0xF77B, 0x9C77, 0xF77C, 0x9C78, 0xF77D, 0x9C79,
+ 0xF77E, 0x9C7A, 0xF780, 0x9C7B, 0xF781, 0x9C7D, 0xF782, 0x9C7E,
+ 0xF783, 0x9C80, 0xF784, 0x9C83, 0xF785, 0x9C84, 0xF786, 0x9C89,
+ 0xF787, 0x9C8A, 0xF788, 0x9C8C, 0xF789, 0x9C8F, 0xF78A, 0x9C93,
+ 0xF78B, 0x9C96, 0xF78C, 0x9C97, 0xF78D, 0x9C98, 0xF78E, 0x9C99,
+ 0xF78F, 0x9C9D, 0xF790, 0x9CAA, 0xF791, 0x9CAC, 0xF792, 0x9CAF,
+ 0xF793, 0x9CB9, 0xF794, 0x9CBE, 0xF795, 0x9CBF, 0xF796, 0x9CC0,
+ 0xF797, 0x9CC1, 0xF798, 0x9CC2, 0xF799, 0x9CC8, 0xF79A, 0x9CC9,
+ 0xF79B, 0x9CD1, 0xF79C, 0x9CD2, 0xF79D, 0x9CDA, 0xF79E, 0x9CDB,
+ 0xF79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D03, 0xF861, 0x9D04, 0xF862, 0x9D05, 0xF863, 0x9D06,
+ 0xF864, 0x9D07, 0xF865, 0x9D08, 0xF866, 0x9D09, 0xF867, 0x9D0A,
+ 0xF868, 0x9D0B, 0xF869, 0x9D0C, 0xF86A, 0x9D0D, 0xF86B, 0x9D0E,
+ 0xF86C, 0x9D0F, 0xF86D, 0x9D10, 0xF86E, 0x9D11, 0xF86F, 0x9D12,
+ 0xF870, 0x9D13, 0xF871, 0x9D14, 0xF872, 0x9D15, 0xF873, 0x9D16,
+ 0xF874, 0x9D17, 0xF875, 0x9D18, 0xF876, 0x9D19, 0xF877, 0x9D1A,
+ 0xF878, 0x9D1B, 0xF879, 0x9D1C, 0xF87A, 0x9D1D, 0xF87B, 0x9D1E,
+ 0xF87C, 0x9D1F, 0xF87D, 0x9D20, 0xF87E, 0x9D21, 0xF880, 0x9D22,
+ 0xF881, 0x9D23, 0xF882, 0x9D24, 0xF883, 0x9D25, 0xF884, 0x9D26,
+ 0xF885, 0x9D27, 0xF886, 0x9D28, 0xF887, 0x9D29, 0xF888, 0x9D2A,
+ 0xF889, 0x9D2B, 0xF88A, 0x9D2C, 0xF88B, 0x9D2D, 0xF88C, 0x9D2E,
+ 0xF88D, 0x9D2F, 0xF88E, 0x9D30, 0xF88F, 0x9D31, 0xF890, 0x9D32,
+ 0xF891, 0x9D33, 0xF892, 0x9D34, 0xF893, 0x9D35, 0xF894, 0x9D36,
+ 0xF895, 0x9D37, 0xF896, 0x9D38, 0xF897, 0x9D39, 0xF898, 0x9D3A,
+ 0xF899, 0x9D3B, 0xF89A, 0x9D3C, 0xF89B, 0x9D3D, 0xF89C, 0x9D3E,
+ 0xF89D, 0x9D3F, 0xF89E, 0x9D40, 0xF89F, 0x9D41, 0xF8A0, 0x9D42,
+ 0xF940, 0x9D43, 0xF941, 0x9D44, 0xF942, 0x9D45, 0xF943, 0x9D46,
+ 0xF944, 0x9D47, 0xF945, 0x9D48, 0xF946, 0x9D49, 0xF947, 0x9D4A,
+ 0xF948, 0x9D4B, 0xF949, 0x9D4C, 0xF94A, 0x9D4D, 0xF94B, 0x9D4E,
+ 0xF94C, 0x9D4F, 0xF94D, 0x9D50, 0xF94E, 0x9D51, 0xF94F, 0x9D52,
+ 0xF950, 0x9D53, 0xF951, 0x9D54, 0xF952, 0x9D55, 0xF953, 0x9D56,
+ 0xF954, 0x9D57, 0xF955, 0x9D58, 0xF956, 0x9D59, 0xF957, 0x9D5A,
+ 0xF958, 0x9D5B, 0xF959, 0x9D5C, 0xF95A, 0x9D5D, 0xF95B, 0x9D5E,
+ 0xF95C, 0x9D5F, 0xF95D, 0x9D60, 0xF95E, 0x9D61, 0xF95F, 0x9D62,
+ 0xF960, 0x9D63, 0xF961, 0x9D64, 0xF962, 0x9D65, 0xF963, 0x9D66,
+ 0xF964, 0x9D67, 0xF965, 0x9D68, 0xF966, 0x9D69, 0xF967, 0x9D6A,
+ 0xF968, 0x9D6B, 0xF969, 0x9D6C, 0xF96A, 0x9D6D, 0xF96B, 0x9D6E,
+ 0xF96C, 0x9D6F, 0xF96D, 0x9D70, 0xF96E, 0x9D71, 0xF96F, 0x9D72,
+ 0xF970, 0x9D73, 0xF971, 0x9D74, 0xF972, 0x9D75, 0xF973, 0x9D76,
+ 0xF974, 0x9D77, 0xF975, 0x9D78, 0xF976, 0x9D79, 0xF977, 0x9D7A,
+ 0xF978, 0x9D7B, 0xF979, 0x9D7C, 0xF97A, 0x9D7D, 0xF97B, 0x9D7E,
+ 0xF97C, 0x9D7F, 0xF97D, 0x9D80, 0xF97E, 0x9D81, 0xF980, 0x9D82,
+ 0xF981, 0x9D83, 0xF982, 0x9D84, 0xF983, 0x9D85, 0xF984, 0x9D86,
+ 0xF985, 0x9D87, 0xF986, 0x9D88, 0xF987, 0x9D89, 0xF988, 0x9D8A,
+ 0xF989, 0x9D8B, 0xF98A, 0x9D8C, 0xF98B, 0x9D8D, 0xF98C, 0x9D8E,
+ 0xF98D, 0x9D8F, 0xF98E, 0x9D90,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96, 0x9F9E, 0xFD97, 0x9FA1, 0xFD98, 0x9FA2,
+ 0xFD99, 0x9FA3, 0xFD9A, 0x9FA4, 0xFD9B, 0x9FA5, 0xFD9C, 0xF92C,
+ 0xFD9D, 0xF979, 0xFD9E, 0xF995, 0xFD9F, 0xF9E7, 0xFDA0, 0xF9F1,
+ 0xFE40, 0xFA0C, 0xFE41, 0xFA0D, 0xFE42, 0xFA0E, 0xFE43, 0xFA0F,
+ 0xFE44, 0xFA11, 0xFE45, 0xFA13, 0xFE46, 0xFA14, 0xFE47, 0xFA18,
+ 0xFE48, 0xFA1F, 0xFE49, 0xFA20, 0xFE4A, 0xFA21, 0xFE4B, 0xFA23,
+ 0xFE4C, 0xFA24, 0xFE4D, 0xFA27, 0xFE4E, 0xFA28, 0xFE4F, 0xFA29,
+ 0, 0
+};
+
+
+
+WCHAR ff_convert ( /* Converted code, 0 means conversion error */
+ WCHAR src, /* Character code to be converted */
+ UINT dir /* 0: Unicode to OEMCP, 1: OEMCP to Unicode */
+)
+{
+ const WCHAR *p;
+ WCHAR c;
+ int i, n, li, hi;
+
+
+ if (src < 0x80) { /* ASCII */
+ c = src;
+ } else {
+ if (dir) { /* OEMCP to unicode */
+ p = oem2uni;
+ hi = sizeof(oem2uni) / 4 - 1;
+ } else { /* Unicode to OEMCP */
+ p = uni2oem;
+ hi = sizeof(uni2oem) / 4 - 1;
+ }
+ li = 0;
+ for (n = 16; n; n--) {
+ i = li + (hi - li) / 2;
+ if (src == p[i * 2]) break;
+ if (src > p[i * 2])
+ li = i;
+ else
+ hi = i;
+ }
+ c = n ? p[i * 2 + 1] : 0;
+ }
+
+ return c;
+}
+
+
+
+WCHAR ff_wtoupper ( /* Upper converted character */
+ WCHAR chr /* Input character */
+)
+{
+ static const WCHAR tbl_lower[] = { 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0xA1, 0x00A2, 0x00A3, 0x00A5, 0x00AC, 0x00AF, 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0x0FF, 0x101, 0x103, 0x105, 0x107, 0x109, 0x10B, 0x10D, 0x10F, 0x111, 0x113, 0x115, 0x117, 0x119, 0x11B, 0x11D, 0x11F, 0x121, 0x123, 0x125, 0x127, 0x129, 0x12B, 0x12D, 0x12F, 0x131, 0x133, 0x135, 0x137, 0x13A, 0x13C, 0x13E, 0x140, 0x142, 0x144, 0x146, 0x148, 0x14B, 0x14D, 0x14F, 0x151, 0x153, 0x155, 0x157, 0x159, 0x15B, 0x15D, 0x15F, 0x161, 0x163, 0x165, 0x167, 0x169, 0x16B, 0x16D, 0x16F, 0x171, 0x173, 0x175, 0x177, 0x17A, 0x17C, 0x17E, 0x192, 0x3B1, 0x3B2, 0x3B3, 0x3B4, 0x3B5, 0x3B6, 0x3B7, 0x3B8, 0x3B9, 0x3BA, 0x3BB, 0x3BC, 0x3BD, 0x3BE, 0x3BF, 0x3C0, 0x3C1, 0x3C3, 0x3C4, 0x3C5, 0x3C6, 0x3C7, 0x3C8, 0x3C9, 0x3CA, 0x430, 0x431, 0x432, 0x433, 0x434, 0x435, 0x436, 0x437, 0x438, 0x439, 0x43A, 0x43B, 0x43C, 0x43D, 0x43E, 0x43F, 0x440, 0x441, 0x442, 0x443, 0x444, 0x445, 0x446, 0x447, 0x448, 0x449, 0x44A, 0x44B, 0x44C, 0x44D, 0x44E, 0x44F, 0x451, 0x452, 0x453, 0x454, 0x455, 0x456, 0x457, 0x458, 0x459, 0x45A, 0x45B, 0x45C, 0x45E, 0x45F, 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177, 0x2178, 0x2179, 0x217A, 0x217B, 0x217C, 0x217D, 0x217E, 0x217F, 0xFF41, 0xFF42, 0xFF43, 0xFF44, 0xFF45, 0xFF46, 0xFF47, 0xFF48, 0xFF49, 0xFF4A, 0xFF4B, 0xFF4C, 0xFF4D, 0xFF4E, 0xFF4F, 0xFF50, 0xFF51, 0xFF52, 0xFF53, 0xFF54, 0xFF55, 0xFF56, 0xFF57, 0xFF58, 0xFF59, 0xFF5A, 0 };
+ static const WCHAR tbl_upper[] = { 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x21, 0xFFE0, 0xFFE1, 0xFFE5, 0xFFE2, 0xFFE3, 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0x178, 0x100, 0x102, 0x104, 0x106, 0x108, 0x10A, 0x10C, 0x10E, 0x110, 0x112, 0x114, 0x116, 0x118, 0x11A, 0x11C, 0x11E, 0x120, 0x122, 0x124, 0x126, 0x128, 0x12A, 0x12C, 0x12E, 0x130, 0x132, 0x134, 0x136, 0x139, 0x13B, 0x13D, 0x13F, 0x141, 0x143, 0x145, 0x147, 0x14A, 0x14C, 0x14E, 0x150, 0x152, 0x154, 0x156, 0x158, 0x15A, 0x15C, 0x15E, 0x160, 0x162, 0x164, 0x166, 0x168, 0x16A, 0x16C, 0x16E, 0x170, 0x172, 0x174, 0x176, 0x179, 0x17B, 0x17D, 0x191, 0x391, 0x392, 0x393, 0x394, 0x395, 0x396, 0x397, 0x398, 0x399, 0x39A, 0x39B, 0x39C, 0x39D, 0x39E, 0x39F, 0x3A0, 0x3A1, 0x3A3, 0x3A4, 0x3A5, 0x3A6, 0x3A7, 0x3A8, 0x3A9, 0x3AA, 0x410, 0x411, 0x412, 0x413, 0x414, 0x415, 0x416, 0x417, 0x418, 0x419, 0x41A, 0x41B, 0x41C, 0x41D, 0x41E, 0x41F, 0x420, 0x421, 0x422, 0x423, 0x424, 0x425, 0x426, 0x427, 0x428, 0x429, 0x42A, 0x42B, 0x42C, 0x42D, 0x42E, 0x42F, 0x401, 0x402, 0x403, 0x404, 0x405, 0x406, 0x407, 0x408, 0x409, 0x40A, 0x40B, 0x40C, 0x40E, 0x40F, 0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166, 0x2167, 0x2168, 0x2169, 0x216A, 0x216B, 0x216C, 0x216D, 0x216E, 0x216F, 0xFF21, 0xFF22, 0xFF23, 0xFF24, 0xFF25, 0xFF26, 0xFF27, 0xFF28, 0xFF29, 0xFF2A, 0xFF2B, 0xFF2C, 0xFF2D, 0xFF2E, 0xFF2F, 0xFF30, 0xFF31, 0xFF32, 0xFF33, 0xFF34, 0xFF35, 0xFF36, 0xFF37, 0xFF38, 0xFF39, 0xFF3A, 0 };
+ int i;
+
+
+ for (i = 0; tbl_lower[i] && chr != tbl_lower[i]; i++) ;
+
+ return tbl_lower[i] ? tbl_upper[i] : chr;
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/option/cc949.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/option/cc949.c
new file mode 100644
index 0000000..626268b
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/option/cc949.c
@@ -0,0 +1,8603 @@
+/*------------------------------------------------------------------------*/
+/* Unicode - OEM code bidirectional converter (C)ChaN, 2009 */
+/* */
+/* CP949 (Korean EUC-KR) */
+/*------------------------------------------------------------------------*/
+
+#include "../ff.h"
+
+
+#if !_USE_LFN || _CODE_PAGE != 949
+#error This file is not needed in current configuration. Remove from the project.
+#endif
+
+
+static
+const WCHAR uni2oem[] = {
+/* Unicode - OEM, Unicode - OEM, Unicode - OEM, Unicode - OEM */
+ 0x00A1, 0xA2AE, 0x00A4, 0xA2B4, 0x00A7, 0xA1D7, 0x00A8, 0xA1A7,
+ 0x00AA, 0xA8A3, 0x00AD, 0xA1A9, 0x00AE, 0xA2E7, 0x00B0, 0xA1C6,
+ 0x00B1, 0xA1BE, 0x00B2, 0xA9F7, 0x00B3, 0xA9F8, 0x00B4, 0xA2A5,
+ 0x00B6, 0xA2D2, 0x00B7, 0xA1A4, 0x00B8, 0xA2AC, 0x00B9, 0xA9F6,
+ 0x00BA, 0xA8AC, 0x00BC, 0xA8F9, 0x00BD, 0xA8F6, 0x00BE, 0xA8FA,
+ 0x00BF, 0xA2AF, 0x00C6, 0xA8A1, 0x00D0, 0xA8A2, 0x00D7, 0xA1BF,
+ 0x00D8, 0xA8AA, 0x00DE, 0xA8AD, 0x00DF, 0xA9AC, 0x00E6, 0xA9A1,
+ 0x00F0, 0xA9A3, 0x00F7, 0xA1C0, 0x00F8, 0xA9AA, 0x00FE, 0xA9AD,
+ 0x0111, 0xA9A2, 0x0126, 0xA8A4, 0x0127, 0xA9A4, 0x0131, 0xA9A5,
+ 0x0132, 0xA8A6, 0x0133, 0xA9A6, 0x0138, 0xA9A7, 0x013F, 0xA8A8,
+ 0x0140, 0xA9A8, 0x0141, 0xA8A9, 0x0142, 0xA9A9, 0x0149, 0xA9B0,
+ 0x014A, 0xA8AF, 0x014B, 0xA9AF, 0x0152, 0xA8AB, 0x0153, 0xA9AB,
+ 0x0166, 0xA8AE, 0x0167, 0xA9AE, 0x02C7, 0xA2A7, 0x02D0, 0xA2B0,
+ 0x02D8, 0xA2A8, 0x02D9, 0xA2AB, 0x02DA, 0xA2A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x0421, 0xACB3,
+ 0x0422, 0xACB4, 0x0423, 0xACB5, 0x0424, 0xACB6, 0x0425, 0xACB7,
+ 0x0426, 0xACB8, 0x0427, 0xACB9, 0x0428, 0xACBA, 0x0429, 0xACBB,
+ 0x042A, 0xACBC, 0x042B, 0xACBD, 0x042C, 0xACBE, 0x042D, 0xACBF,
+ 0x042E, 0xACC0, 0x042F, 0xACC1, 0x0430, 0xACD1, 0x0431, 0xACD2,
+ 0x0432, 0xACD3, 0x0433, 0xACD4, 0x0434, 0xACD5, 0x0435, 0xACD6,
+ 0x0436, 0xACD8, 0x0437, 0xACD9, 0x0438, 0xACDA, 0x0439, 0xACDB,
+ 0x043A, 0xACDC, 0x043B, 0xACDD, 0x043C, 0xACDE, 0x043D, 0xACDF,
+ 0x043E, 0xACE0, 0x043F, 0xACE1, 0x0440, 0xACE2, 0x0441, 0xACE3,
+ 0x0442, 0xACE4, 0x0443, 0xACE5, 0x0444, 0xACE6, 0x0445, 0xACE7,
+ 0x0446, 0xACE8, 0x0447, 0xACE9, 0x0448, 0xACEA, 0x0449, 0xACEB,
+ 0x044A, 0xACEC, 0x044B, 0xACED, 0x044C, 0xACEE, 0x044D, 0xACEF,
+ 0x044E, 0xACF0, 0x044F, 0xACF1, 0x0451, 0xACD7, 0x2015, 0xA1AA,
+ 0x2018, 0xA1AE, 0x2019, 0xA1AF, 0x201C, 0xA1B0, 0x201D, 0xA1B1,
+ 0x2020, 0xA2D3, 0x2021, 0xA2D4, 0x2025, 0xA1A5, 0x2026, 0xA1A6,
+ 0x2030, 0xA2B6, 0x2032, 0xA1C7, 0x2033, 0xA1C8, 0x203B, 0xA1D8,
+ 0x2074, 0xA9F9, 0x207F, 0xA9FA, 0x2081, 0xA9FB, 0x2082, 0xA9FC,
+ 0x2083, 0xA9FD, 0x2084, 0xA9FE, 0x20AC, 0xA2E6, 0x2103, 0xA1C9,
+ 0x2109, 0xA2B5, 0x2113, 0xA7A4, 0x2116, 0xA2E0, 0x2121, 0xA2E5,
+ 0x2122, 0xA2E2, 0x2126, 0xA7D9, 0x212B, 0xA1CA, 0x2153, 0xA8F7,
+ 0x2154, 0xA8F8, 0x215B, 0xA8FB, 0x215C, 0xA8FC, 0x215D, 0xA8FD,
+ 0x215E, 0xA8FE, 0x2160, 0xA5B0, 0x2161, 0xA5B1, 0x2162, 0xA5B2,
+ 0x2163, 0xA5B3, 0x2164, 0xA5B4, 0x2165, 0xA5B5, 0x2166, 0xA5B6,
+ 0x2167, 0xA5B7, 0x2168, 0xA5B8, 0x2169, 0xA5B9, 0x2170, 0xA5A1,
+ 0x2171, 0xA5A2, 0x2172, 0xA5A3, 0x2173, 0xA5A4, 0x2174, 0xA5A5,
+ 0x2175, 0xA5A6, 0x2176, 0xA5A7, 0x2177, 0xA5A8, 0x2178, 0xA5A9,
+ 0x2179, 0xA5AA, 0x2190, 0xA1E7, 0x2191, 0xA1E8, 0x2192, 0xA1E6,
+ 0x2193, 0xA1E9, 0x2194, 0xA1EA, 0x2195, 0xA2D5, 0x2196, 0xA2D8,
+ 0x2197, 0xA2D6, 0x2198, 0xA2D9, 0x2199, 0xA2D7, 0x21D2, 0xA2A1,
+ 0x21D4, 0xA2A2, 0x2200, 0xA2A3, 0x2202, 0xA1D3, 0x2203, 0xA2A4,
+ 0x2207, 0xA1D4, 0x2208, 0xA1F4, 0x220B, 0xA1F5, 0x220F, 0xA2B3,
+ 0x2211, 0xA2B2, 0x221A, 0xA1EE, 0x221D, 0xA1F0, 0x221E, 0xA1C4,
+ 0x2220, 0xA1D0, 0x2225, 0xA1AB, 0x2227, 0xA1FC, 0x2228, 0xA1FD,
+ 0x2229, 0xA1FB, 0x222A, 0xA1FA, 0x222B, 0xA1F2, 0x222C, 0xA1F3,
+ 0x222E, 0xA2B1, 0x2234, 0xA1C5, 0x2235, 0xA1F1, 0x223C, 0xA1AD,
+ 0x223D, 0xA1EF, 0x2252, 0xA1D6, 0x2260, 0xA1C1, 0x2261, 0xA1D5,
+ 0x2264, 0xA1C2,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266C, 0xA2DD, 0x266D, 0xA2DA, 0x3000, 0xA1A1, 0x3001, 0xA1A2,
+ 0x3002, 0xA1A3, 0x3003, 0xA1A8, 0x3008, 0xA1B4, 0x3009, 0xA1B5,
+ 0x300A, 0xA1B6, 0x300B, 0xA1B7, 0x300C, 0xA1B8, 0x300D, 0xA1B9,
+ 0x300E, 0xA1BA, 0x300F, 0xA1BB, 0x3010, 0xA1BC, 0x3011, 0xA1BD,
+ 0x3013, 0xA1EB, 0x3014, 0xA1B2, 0x3015, 0xA1B3, 0x3041, 0xAAA1,
+ 0x3042, 0xAAA2, 0x3043, 0xAAA3, 0x3044, 0xAAA4, 0x3045, 0xAAA5,
+ 0x3046, 0xAAA6, 0x3047, 0xAAA7, 0x3048, 0xAAA8, 0x3049, 0xAAA9,
+ 0x304A, 0xAAAA, 0x304B, 0xAAAB, 0x304C, 0xAAAC, 0x304D, 0xAAAD,
+ 0x304E, 0xAAAE, 0x304F, 0xAAAF, 0x3050, 0xAAB0, 0x3051, 0xAAB1,
+ 0x3052, 0xAAB2, 0x3053, 0xAAB3, 0x3054, 0xAAB4, 0x3055, 0xAAB5,
+ 0x3056, 0xAAB6, 0x3057, 0xAAB7, 0x3058, 0xAAB8, 0x3059, 0xAAB9,
+ 0x305A, 0xAABA, 0x305B, 0xAABB, 0x305C, 0xAABC, 0x305D, 0xAABD,
+ 0x305E, 0xAABE, 0x305F, 0xAABF, 0x3060, 0xAAC0, 0x3061, 0xAAC1,
+ 0x3062, 0xAAC2, 0x3063, 0xAAC3, 0x3064, 0xAAC4, 0x3065, 0xAAC5,
+ 0x3066, 0xAAC6, 0x3067, 0xAAC7, 0x3068, 0xAAC8, 0x3069, 0xAAC9,
+ 0x306A, 0xAACA, 0x306B, 0xAACB, 0x306C, 0xAACC, 0x306D, 0xAACD,
+ 0x306E, 0xAACE, 0x306F, 0xAACF, 0x3070, 0xAAD0, 0x3071, 0xAAD1,
+ 0x3072, 0xAAD2, 0x3073, 0xAAD3, 0x3074, 0xAAD4, 0x3075, 0xAAD5,
+ 0x3076, 0xAAD6, 0x3077, 0xAAD7, 0x3078, 0xAAD8, 0x3079, 0xAAD9,
+ 0x307A, 0xAADA, 0x307B, 0xAADB, 0x307C, 0xAADC, 0x307D, 0xAADD,
+ 0x307E, 0xAADE, 0x307F, 0xAADF, 0x3080, 0xAAE0, 0x3081, 0xAAE1,
+ 0x3082, 0xAAE2, 0x3083, 0xAAE3, 0x3084, 0xAAE4, 0x3085, 0xAAE5,
+ 0x3086, 0xAAE6, 0x3087, 0xAAE7, 0x3088, 0xAAE8, 0x3089, 0xAAE9,
+ 0x308A, 0xAAEA, 0x308B, 0xAAEB, 0x308C, 0xAAEC, 0x308D, 0xAAED,
+ 0x308E, 0xAAEE, 0x308F, 0xAAEF, 0x3090, 0xAAF0, 0x3091, 0xAAF1,
+ 0x3092, 0xAAF2, 0x3093, 0xAAF3, 0x30A1, 0xABA1, 0x30A2, 0xABA2,
+ 0x30A3, 0xABA3, 0x30A4, 0xABA4, 0x30A5, 0xABA5, 0x30A6, 0xABA6,
+ 0x30A7, 0xABA7, 0x30A8, 0xABA8, 0x30A9, 0xABA9, 0x30AA, 0xABAA,
+ 0x30AB, 0xABAB, 0x30AC, 0xABAC, 0x30AD, 0xABAD, 0x30AE, 0xABAE,
+ 0x30AF, 0xABAF, 0x30B0, 0xABB0, 0x30B1, 0xABB1, 0x30B2, 0xABB2,
+ 0x30B3, 0xABB3, 0x30B4, 0xABB4, 0x30B5, 0xABB5, 0x30B6, 0xABB6,
+ 0x30B7, 0xABB7, 0x30B8, 0xABB8, 0x30B9, 0xABB9, 0x30BA, 0xABBA,
+ 0x30BB, 0xABBB, 0x30BC, 0xABBC, 0x30BD, 0xABBD, 0x30BE, 0xABBE,
+ 0x30BF, 0xABBF, 0x30C0, 0xABC0, 0x30C1, 0xABC1, 0x30C2, 0xABC2,
+ 0x30C3, 0xABC3, 0x30C4, 0xABC4, 0x30C5, 0xABC5, 0x30C6, 0xABC6,
+ 0x30C7, 0xABC7, 0x30C8, 0xABC8, 0x30C9, 0xABC9, 0x30CA, 0xABCA,
+ 0x30CB, 0xABCB, 0x30CC, 0xABCC, 0x30CD, 0xABCD, 0x30CE, 0xABCE,
+ 0x30CF, 0xABCF, 0x30D0, 0xABD0, 0x30D1, 0xABD1, 0x30D2, 0xABD2,
+ 0x30D3, 0xABD3, 0x30D4, 0xABD4, 0x30D5, 0xABD5, 0x30D6, 0xABD6,
+ 0x30D7, 0xABD7, 0x30D8, 0xABD8, 0x30D9, 0xABD9, 0x30DA, 0xABDA,
+ 0x30DB, 0xABDB, 0x30DC, 0xABDC, 0x30DD, 0xABDD, 0x30DE, 0xABDE,
+ 0x30DF, 0xABDF, 0x30E0, 0xABE0, 0x30E1, 0xABE1, 0x30E2, 0xABE2,
+ 0x30E3, 0xABE3, 0x30E4, 0xABE4, 0x30E5, 0xABE5, 0x30E6, 0xABE6,
+ 0x30E7, 0xABE7, 0x30E8, 0xABE8, 0x30E9, 0xABE9, 0x30EA, 0xABEA,
+ 0x30EB, 0xABEB, 0x30EC, 0xABEC, 0x30ED, 0xABED, 0x30EE, 0xABEE,
+ 0x30EF, 0xABEF, 0x30F0, 0xABF0, 0x30F1, 0xABF1, 0x30F2, 0xABF2,
+ 0x30F3, 0xABF3, 0x30F4, 0xABF4, 0x30F5, 0xABF5, 0x30F6, 0xABF6,
+ 0x3131, 0xA4A1, 0x3132, 0xA4A2, 0x3133, 0xA4A3, 0x3134, 0xA4A4,
+ 0x3135, 0xA4A5, 0x3136, 0xA4A6, 0x3137, 0xA4A7, 0x3138, 0xA4A8,
+ 0x3139, 0xA4A9, 0x313A, 0xA4AA, 0x313B, 0xA4AB, 0x313C, 0xA4AC,
+ 0x313D, 0xA4AD, 0x313E, 0xA4AE, 0x313F, 0xA4AF, 0x3140, 0xA4B0,
+ 0x3141, 0xA4B1, 0x3142, 0xA4B2, 0x3143, 0xA4B3, 0x3144, 0xA4B4,
+ 0x3145, 0xA4B5, 0x3146, 0xA4B6, 0x3147, 0xA4B7, 0x3148, 0xA4B8,
+ 0x3149, 0xA4B9, 0x314A, 0xA4BA, 0x314B, 0xA4BB, 0x314C, 0xA4BC,
+ 0x314D, 0xA4BD, 0x314E, 0xA4BE, 0x314F, 0xA4BF, 0x3150, 0xA4C0,
+ 0x3151, 0xA4C1, 0x3152, 0xA4C2, 0x3153, 0xA4C3, 0x3154, 0xA4C4,
+ 0x3155, 0xA4C5, 0x3156, 0xA4C6, 0x3157, 0xA4C7, 0x3158, 0xA4C8,
+ 0x3159, 0xA4C9, 0x315A, 0xA4CA, 0x315B, 0xA4CB, 0x315C, 0xA4CC,
+ 0x315D, 0xA4CD, 0x315E, 0xA4CE, 0x315F, 0xA4CF, 0x3160, 0xA4D0,
+ 0x3161, 0xA4D1, 0x3162, 0xA4D2, 0x3163, 0xA4D3, 0x3164, 0xA4D4,
+ 0x3165, 0xA4D5, 0x3166, 0xA4D6, 0x3167, 0xA4D7, 0x3168, 0xA4D8,
+ 0x3169, 0xA4D9, 0x316A, 0xA4DA, 0x316B, 0xA4DB, 0x316C, 0xA4DC,
+ 0x316D, 0xA4DD, 0x316E, 0xA4DE, 0x316F, 0xA4DF, 0x3170, 0xA4E0,
+ 0x3171, 0xA4E1, 0x3172, 0xA4E2, 0x3173, 0xA4E3, 0x3174, 0xA4E4,
+ 0x3175, 0xA4E5, 0x3176, 0xA4E6, 0x3177, 0xA4E7, 0x3178, 0xA4E8,
+ 0x3179, 0xA4E9, 0x317A, 0xA4EA, 0x317B, 0xA4EB, 0x317C, 0xA4EC,
+ 0x317D, 0xA4ED, 0x317E, 0xA4EE, 0x317F, 0xA4EF, 0x3180, 0xA4F0,
+ 0x3181, 0xA4F1, 0x3182, 0xA4F2, 0x3183, 0xA4F3, 0x3184, 0xA4F4,
+ 0x3185, 0xA4F5, 0x3186, 0xA4F6, 0x3187, 0xA4F7, 0x3188, 0xA4F8,
+ 0x3189, 0xA4F9, 0x318A, 0xA4FA, 0x318B, 0xA4FB, 0x318C, 0xA4FC,
+ 0x318D, 0xA4FD, 0x318E, 0xA4FE, 0x3200, 0xA9B1, 0x3201, 0xA9B2,
+ 0x3202, 0xA9B3, 0x3203, 0xA9B4, 0x3204, 0xA9B5, 0x3205, 0xA9B6,
+ 0x3206, 0xA9B7, 0x3207, 0xA9B8, 0x3208, 0xA9B9, 0x3209, 0xA9BA,
+ 0x320A, 0xA9BB, 0x320B, 0xA9BC, 0x320C, 0xA9BD, 0x320D, 0xA9BE,
+ 0x320E, 0xA9BF, 0x320F, 0xA9C0, 0x3210, 0xA9C1, 0x3211, 0xA9C2,
+ 0x3212, 0xA9C3, 0x3213, 0xA9C4, 0x3214, 0xA9C5, 0x3215, 0xA9C6,
+ 0x3216, 0xA9C7, 0x3217, 0xA9C8, 0x3218, 0xA9C9, 0x3219, 0xA9CA,
+ 0x321A, 0xA9CB, 0x321B, 0xA9CC, 0x321C, 0xA2DF, 0x3260, 0xA8B1,
+ 0x3261, 0xA8B2, 0x3262, 0xA8B3, 0x3263, 0xA8B4, 0x3264, 0xA8B5,
+ 0x3265, 0xA8B6, 0x3266, 0xA8B7, 0x3267, 0xA8B8, 0x3268, 0xA8B9,
+ 0x3269, 0xA8BA, 0x326A, 0xA8BB, 0x326B, 0xA8BC, 0x326C, 0xA8BD,
+ 0x326D, 0xA8BE, 0x326E, 0xA8BF, 0x326F, 0xA8C0, 0x3270, 0xA8C1,
+ 0x3271, 0xA8C2, 0x3272, 0xA8C3, 0x3273, 0xA8C4, 0x3274, 0xA8C5,
+ 0x3275, 0xA8C6, 0x3276, 0xA8C7, 0x3277, 0xA8C8, 0x3278, 0xA8C9,
+ 0x3279, 0xA8CA, 0x327A, 0xA8CB, 0x327B, 0xA8CC, 0x327F, 0xA2DE,
+ 0x3380, 0xA7C9, 0x3381, 0xA7CA, 0x3382, 0xA7CB, 0x3383, 0xA7CC,
+ 0x3384, 0xA7CD, 0x3388, 0xA7BA, 0x3389, 0xA7BB, 0x338A, 0xA7DC,
+ 0x338B, 0xA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A8, 0x5305, 0xF8D0, 0x5308, 0xFDD6, 0x530D, 0xF8D1,
+ 0x530F, 0xF8D2, 0x5310, 0xDCD3, 0x5315, 0xDDE2, 0x5316, 0xFBF9,
+ 0x5317, 0xDDC1, 0x5319, 0xE3B5, 0x5320, 0xEDDD, 0x5321, 0xCEC4,
+ 0x5323, 0xCBA1, 0x532A, 0xDDE3, 0x532F, 0xFCDD, 0x5339, 0xF9AF,
+ 0x533F, 0xD2FB, 0x5340, 0xCFA1, 0x5341, 0xE4A8, 0x5343, 0xF4B6,
+ 0x5344, 0xECFE, 0x5347, 0xE3AE, 0x5348, 0xE7ED, 0x5349, 0xFDC1,
+ 0x534A, 0xDAE2, 0x534D, 0xD8B3, 0x5351, 0xDDE4, 0x5352, 0xF0EF,
+ 0x5353, 0xF6F1, 0x5354, 0xFAF0, 0x5357, 0xD1F5, 0x535A, 0xDACF,
+ 0x535C, 0xDCD4, 0x535E, 0xDCA6, 0x5360, 0xEFBF, 0x5366, 0xCECF,
+ 0x5368, 0xE0D9, 0x536F, 0xD9D6, 0x5370, 0xECD4, 0x5371, 0xEACB,
+ 0x5374, 0xCABF, 0x5375, 0xD5B0, 0x5377, 0xCFE9, 0x537D, 0xF1ED,
+ 0x537F, 0xCCCF, 0x5384, 0xE4F8, 0x5393, 0xE4ED, 0x5398, 0xD7D8,
+ 0x539A, 0xFDA7, 0x539F, 0xEAAB, 0x53A0, 0xF6B2, 0x53A5, 0xCFF0,
+ 0x53A6, 0xF9BD, 0x53AD, 0xE6F4, 0x53BB, 0xCBDB, 0x53C3, 0xF3D1,
+ 0x53C8, 0xE9D1, 0x53C9, 0xF3A9, 0x53CA, 0xD0E0, 0x53CB, 0xE9D2,
+ 0x53CD, 0xDAE3, 0x53D4, 0xE2D2, 0x53D6, 0xF6A2, 0x53D7, 0xE1F4,
+ 0x53DB, 0xDAE4, 0x53E1, 0xE7D5, 0x53E2, 0xF5BF, 0x53E3, 0xCFA2,
+ 0x53E4, 0xCDAF, 0x53E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xE5A9, 0x60FA, 0xE0F6, 0x60FB, 0xF6B3,
+ 0x6101, 0xE1FE, 0x6106, 0xCBF0, 0x6108, 0xEAEF, 0x6109, 0xEAF0,
+ 0x610D, 0xDAC0, 0x610E, 0xF8B4, 0x610F, 0xEBF2, 0x6115, 0xE4C3,
+ 0x611A, 0xE9D7, 0x611B, 0xE4F1, 0x611F, 0xCAEF, 0x6127, 0xCED7,
+ 0x6130, 0xFCCA, 0x6134, 0xF3E1, 0x6137, 0xCBC4, 0x613C, 0xE3E5,
+ 0x613E, 0xCBC5, 0x613F, 0xEAB4, 0x6142, 0xE9BD, 0x6144, 0xD7C9,
+ 0x6147, 0xEBDB, 0x6148, 0xEDB1, 0x614A, 0xCCC3, 0x614B, 0xF7BE,
+ 0x614C, 0xFCCB, 0x6153, 0xF8F4, 0x6155, 0xD9B7, 0x6158, 0xF3D3,
+ 0x6159, 0xF3D4, 0x615D, 0xF7E4, 0x615F, 0xF7D1, 0x6162, 0xD8B7,
+ 0x6163, 0xCEB1, 0x6164, 0xCAC2, 0x6167, 0xFBB4, 0x6168, 0xCBC6,
+ 0x616B, 0xF0F6, 0x616E, 0xD5E7, 0x6170, 0xEAD0, 0x6176, 0xCCD4,
+ 0x6177, 0xCBAF, 0x617D, 0xF4AA, 0x617E, 0xE9AF, 0x6181, 0xF5C3,
+ 0x6182, 0xE9D8, 0x618A, 0xDDE9, 0x618E, 0xF1F3, 0x6190, 0xD5FB,
+ 0x6191, 0xDEBB, 0x6194, 0xF4FB, 0x6198, 0xFDF3, 0x6199, 0xFDF2,
+ 0x619A, 0xF7A6, 0x61A4, 0xDDC9, 0x61A7, 0xD4D3, 0x61A9, 0xCCA8,
+ 0x61AB, 0xDAC1, 0x61AC, 0xCCD5, 0x61AE, 0xD9E4, 0x61B2, 0xFACA,
+ 0x61B6, 0xE5E3, 0x61BA, 0xD3BC, 0x61BE, 0xCAF0, 0x61C3, 0xD0C4,
+ 0x61C7, 0xCAD0, 0x61C8, 0xFAAB, 0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65ED, 0xE9EF, 0x65F1, 0xF9D1, 0x65F4, 0xE9D9, 0x65FA, 0xE8DA,
+ 0x65FB, 0xDAC3, 0x65FC, 0xDAC4, 0x65FD, 0xD4C5, 0x65FF, 0xE7FA,
+ 0x6606, 0xCDE0, 0x6607, 0xE3B0, 0x6609, 0xDBB2, 0x660A, 0xFBC4,
+ 0x660C, 0xF3E3, 0x660E, 0xD9A5, 0x660F, 0xFBE7, 0x6610, 0xDDCB,
+ 0x6611, 0xD0D4, 0x6613, 0xE6B6, 0x6614, 0xE0AE, 0x6615, 0xFDDA,
+ 0x661E, 0xDCB5, 0x661F, 0xE0F8, 0x6620, 0xE7B1, 0x6625, 0xF5F0,
+ 0x6627, 0xD8DC, 0x6628, 0xEDC6, 0x662D, 0xE1B9, 0x662F, 0xE3C0,
+ 0x6630, 0xF9C0, 0x6631, 0xE9F0, 0x6634, 0xD9DB, 0x6636, 0xF3E4,
+ 0x663A, 0xDCB6, 0x663B, 0xE4E9, 0x6641, 0xF0C5, 0x6642, 0xE3C1,
+ 0x6643, 0xFCCC, 0x6644, 0xFCCD, 0x6649, 0xF2CB, 0x664B, 0xF2CC,
+ 0x664F, 0xE4CF, 0x6659, 0xF1DB, 0x665B, 0xFAD9, 0x665D, 0xF1B8,
+ 0x665E, 0xFDF5, 0x665F, 0xE0F9, 0x6664, 0xE7FB, 0x6665, 0xFCB7,
+ 0x6666, 0xFCE4, 0x6667, 0xFBC5, 0x6668, 0xE3E7, 0x6669, 0xD8B9,
+ 0x666B, 0xF6F8, 0x666E, 0xDCC5, 0x666F, 0xCCD8, 0x6673, 0xE0AF,
+ 0x6674, 0xF4E7, 0x6676, 0xEFDC, 0x6677, 0xCFFC, 0x6678, 0xEFDD,
+ 0x667A, 0xF2AA, 0x6684, 0xFDBE, 0x6687, 0xCAAC, 0x6688, 0xFDBB,
+ 0x6689, 0xFDC7, 0x668E, 0xE7B2, 0x6690, 0xEAD1, 0x6691, 0xDFF4,
+ 0x6696, 0xD1EC, 0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 0x73E5, 0xECB4, 0x73E6, 0xFAC0,
+ 0x73E9, 0xFBA8, 0x73EA, 0xD0A8, 0x73ED, 0xDAEC, 0x73F7, 0xD9EE,
+ 0x73F9, 0xE0FB, 0x73FD, 0xEFEA, 0x73FE, 0xFADE, 0x7401, 0xE0C4,
+ 0x7403, 0xCFB9, 0x7405, 0xD5CA, 0x7406, 0xD7E2, 0x7407, 0xE2AF,
+ 0x7409, 0xD7B8, 0x7413, 0xE8CD, 0x741B, 0xF6DA, 0x7420, 0xEFA2,
+ 0x7421, 0xE2DA, 0x7422, 0xF6FC, 0x7425, 0xFBD0, 0x7426, 0xD1AD,
+ 0x7428, 0xCDE4, 0x742A, 0xD1AE, 0x742B, 0xDCED, 0x742C, 0xE8CE,
+ 0x742E, 0xF0F9, 0x742F, 0xCEB5, 0x7430, 0xE6FC, 0x7433, 0xD7FB,
+ 0x7434, 0xD0D6, 0x7435, 0xDDF5, 0x7436, 0xF7F1, 0x7438, 0xF6FD,
+ 0x743A, 0xDBF7, 0x743F, 0xFBEA, 0x7440, 0xE9DC, 0x7441, 0xD9C1,
+ 0x7443, 0xF5F2, 0x7444, 0xE0C5, 0x744B, 0xEAD4, 0x7455, 0xF9C2,
+ 0x7457, 0xEABC, 0x7459, 0xD2C5, 0x745A, 0xFBD1, 0x745B, 0xE7C0,
+ 0x745C, 0xEBA5, 0x745E, 0xDFFA, 0x745F, 0xE3A2, 0x7460, 0xD7B9,
+ 0x7462, 0xE9C3, 0x7464, 0xE8FD, 0x7465, 0xE8AF, 0x7468, 0xF2D3,
+ 0x7469, 0xFBA9, 0x746A, 0xD8A5, 0x746F, 0xD5CB, 0x747E, 0xD0C8,
+ 0x7482, 0xD1AF, 0x7483, 0xD7E3, 0x7487, 0xE0C6, 0x7489, 0xD6A2,
+ 0x748B, 0xEDF0, 0x7498, 0xD7F3, 0x749C, 0xFCD4, 0x749E, 0xDAD7,
+ 0x749F, 0xCCDF, 0x74A1, 0xF2D4, 0x74A3, 0xD1B0,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7825, 0xF2B2, 0x7826, 0xF3F6, 0x7827, 0xF6DB,
+ 0x782C, 0xD7FE, 0x7832, 0xF8DF, 0x7834, 0xF7F2, 0x7845, 0xD0A9,
+ 0x784F, 0xE6DA, 0x785D, 0xF5A6, 0x786B, 0xD7BC, 0x786C, 0xCCE3,
+ 0x786F, 0xE6DB, 0x787C, 0xDDDD, 0x7881, 0xD1B3, 0x7887, 0xEFED,
+ 0x788C, 0xD6DE, 0x788D, 0xE4F4, 0x788E, 0xE1EF, 0x7891, 0xDDF8,
+ 0x7897, 0xE8CF, 0x78A3, 0xCAE5, 0x78A7, 0xDCA1, 0x78A9, 0xE0B5,
+ 0x78BA, 0xFCAC, 0x78BB, 0xFCAD, 0x78BC, 0xD8A7, 0x78C1, 0xEDB8,
+ 0x78C5, 0xDBB6, 0x78CA, 0xD6F0, 0x78CB, 0xF3AF, 0x78CE, 0xCDA5,
+ 0x78D0, 0xDAF1, 0x78E8, 0xD8A8, 0x78EC, 0xCCE4, 0x78EF, 0xD1B4,
+ 0x78F5, 0xCAD8, 0x78FB, 0xDAF2, 0x7901, 0xF5A7, 0x790E, 0xF5A8,
+ 0x7916, 0xE6A6, 0x792A, 0xD5EC, 0x792B, 0xD5F8, 0x792C, 0xDAF3,
+ 0x793A, 0xE3C6, 0x793E, 0xDEE4, 0x7940, 0xDEE5, 0x7941, 0xD1B5,
+ 0x7947, 0xD1B6, 0x7948, 0xD1B7, 0x7949, 0xF2B3, 0x7950, 0xE9DE,
+ 0x7956, 0xF0D3, 0x7957, 0xF2B4, 0x795A, 0xF0D4, 0x795B, 0xCBE4,
+ 0x795C, 0xFBD4, 0x795D, 0xF5E6, 0x795E, 0xE3EA, 0x7960, 0xDEE6,
+ 0x7965, 0xDFD4, 0x7968, 0xF8F9, 0x796D, 0xF0AE, 0x797A, 0xD1B8,
+ 0x797F, 0xD6DF, 0x7981, 0xD0D7, 0x798D, 0xFCA1, 0x798E, 0xEFEE,
+ 0x798F, 0xDCD8, 0x7991, 0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8655, 0xF4A5, 0x865B, 0xFAC8, 0x865C, 0xD6D7, 0x865E, 0xE9E5,
+ 0x865F, 0xFBDC, 0x8667, 0xFDD0, 0x8679, 0xFBF6, 0x868A, 0xDAA5,
+ 0x868C, 0xDBBD, 0x8693, 0xECE2, 0x86A3, 0xCDF7, 0x86A4, 0xF0DE,
+ 0x86A9, 0xF6C9, 0x86C7, 0xDEEF, 0x86CB, 0xD3B1, 0x86D4, 0xFCEE,
+ 0x86D9, 0xE8C3, 0x86DB, 0xF1C8, 0x86DF, 0xCEF1, 0x86E4, 0xF9ED,
+ 0x86ED, 0xF2F4, 0x86FE, 0xE4B6, 0x8700, 0xF5B9, 0x8702, 0xDCF0,
+ 0x8703, 0xE3F1, 0x8708, 0xE8A5, 0x8718, 0xF2BB, 0x871A, 0xDEA4,
+ 0x871C, 0xDACC, 0x874E, 0xCAE9, 0x8755, 0xE3DA, 0x8757, 0xFCD9,
+ 0x875F, 0xEADA, 0x8766, 0xF9C4, 0x8768, 0xE3A4, 0x8774, 0xFBDD,
+ 0x8776, 0xEFCA, 0x8778, 0xE8C4, 0x8782, 0xD5CC, 0x878D, 0xEBD7,
+ 0x879F, 0xD9AD, 0x87A2, 0xFBAB, 0x87B3, 0xD3D9, 0x87BA, 0xD5A2,
+ 0x87C4, 0xF6DE, 0x87E0, 0xDAF6, 0x87EC, 0xE0D1, 0x87EF, 0xE9A8,
+ 0x87F2, 0xF5F9, 0x87F9, 0xFAAF, 0x87FB, 0xEBFC, 0x87FE, 0xE0EA,
+ 0x8805, 0xE3B2, 0x881F, 0xD5C5, 0x8822, 0xF1E3, 0x8823, 0xD5EE,
+ 0x8831, 0xCDCC, 0x8836, 0xEDD9, 0x883B, 0xD8C1, 0x8840, 0xFAEC,
+ 0x8846, 0xF1EB, 0x884C, 0xFABC, 0x884D, 0xE6E2, 0x8852, 0xFAE5,
+ 0x8853, 0xE2FA, 0x8857, 0xCAB6, 0x8859, 0xE4B7, 0x885B, 0xEADB,
+ 0x885D,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, 0xDADE, 0x8FED, 0xF2F7,
+ 0x8FF0, 0xE2FB, 0x8FF2, 0xCCA6, 0x8FF7, 0xDABB, 0x8FF9, 0xEEE9,
+ 0x8FFD, 0xF5DA, 0x9000, 0xF7DC, 0x9001, 0xE1EA, 0x9002, 0xCEC1,
+ 0x9003, 0xD4B1, 0x9005, 0xFDB1, 0x9006, 0xE6BD, 0x9008, 0xFBAD,
+ 0x900B, 0xF8E7, 0x900D, 0xE1CE, 0x900F, 0xF7E2, 0x9010, 0xF5EF,
+ 0x9011, 0xCFC7, 0x9014, 0xD4B2, 0x9015, 0xCCEF, 0x9017, 0xD4E8,
+ 0x9019, 0xEECF, 0x901A, 0xF7D7, 0x901D, 0xE0A6, 0x901E, 0xD6C1,
+ 0x901F, 0xE1DC, 0x9020, 0xF0E3, 0x9021, 0xF1E4, 0x9022, 0xDCF1,
+ 0x9023, 0xD6A7, 0x902E, 0xF4F5, 0x9031, 0xF1CE, 0x9032, 0xF2E4,
+ 0x9035, 0xD0B0, 0x9038, 0xECEF, 0x903C, 0xF9BA, 0x903E, 0xEBB5,
+ 0x9041, 0xD4ED, 0x9042, 0xE2C4, 0x9047, 0xE9E7, 0x904A, 0xEBB4,
+ 0x904B, 0xEAA1, 0x904D, 0xF8BC, 0x904E, 0xCEA6, 0x9050, 0xF9C6,
+ 0x9051, 0xFCDA, 0x9053, 0xD4B3, 0x9054, 0xD3B9, 0x9055, 0xEADE,
+ 0x9059, 0xE9AB, 0x905C, 0xE1E1, 0x905D, 0xD3CF, 0x905E, 0xF4F6,
+ 0x9060, 0xEAC0, 0x9061, 0xE1CF, 0x9063, 0xCCBA, 0x9069, 0xEEEA,
+ 0x906D, 0xF0E4, 0x906E, 0xF3B4, 0x906F, 0xD4EE, 0x9072, 0xF2C0,
+ 0x9075, 0xF1E5, 0x9077, 0xF4C3, 0x9078, 0xE0D4, 0x907A, 0xEBB6,
+ 0x907C, 0xD7A1, 0x907D, 0xCBE8, 0x907F, 0xF9AD, 0x9080,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0x96F2, 0xEAA3, 0x96F6, 0xD6C3,
+ 0x96F7, 0xD6F4, 0x96F9, 0xDADF, 0x96FB, 0xEFB3, 0x9700, 0xE2CD,
+ 0x9706, 0xEFFD, 0x9707, 0xF2E8, 0x9711, 0xEFC5, 0x9713, 0xE7E7,
+ 0x9716, 0xD7FD, 0x9719, 0xE7CE, 0x971C, 0xDFDC, 0x971E, 0xF9C7,
+ 0x9727, 0xD9F6, 0x9730, 0xDFAC, 0x9732, 0xD6DA, 0x9739, 0xDCA4,
+ 0x973D, 0xF0B8, 0x9742, 0xD5FA, 0x9744, 0xE4F7, 0x9748, 0xD6C4,
+ 0x9751, 0xF4EC, 0x9756, 0xEFFE, 0x975C, 0xF0A1, 0x975E, 0xDEAA,
+ 0x9761, 0xDABC, 0x9762, 0xD8FC, 0x9769, 0xFAD4, 0x976D, 0xECE5,
+ 0x9774, 0xFCA8, 0x9777, 0xECE6, 0x977A, 0xD8CB, 0x978B, 0xFBB9,
+ 0x978D, 0xE4D3, 0x978F, 0xCDF9, 0x97A0, 0xCFD3, 0x97A8, 0xCAEA,
+ 0x97AB, 0xCFD4, 0x97AD, 0xF8BD, 0x97C6, 0xF4C7, 0x97CB, 0xEADF,
+ 0x97D3, 0xF9DB, 0x97DC, 0xD4B7, 0x97F3, 0xEBE5, 0x97F6, 0xE1D2,
+ 0x97FB, 0xEAA4, 0x97FF, 0xFAC2, 0x9800, 0xFBE1, 0x9801, 0xFAED,
+ 0x9802, 0xF0A2, 0x9803, 0xCCF1, 0x9805, 0xFAA3, 0x9806, 0xE2F7,
+ 0x9808, 0xE2CE, 0x980A, 0xE9F5, 0x980C, 0xE1EB, 0x9810, 0xE7E8,
+ 0x9811, 0xE8D7, 0x9812, 0xDAF8, 0x9813, 0xD4CB, 0x9817, 0xF7F6,
+ 0x9818, 0xD6C5, 0x982D, 0xD4E9, 0x9830, 0xFAFA, 0x9838, 0xCCF2,
+ 0x9839, 0xF7DD, 0x983B, 0xDEBA, 0x9846, 0xCE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 0x8162, 0xAC37, 0x8163,
+ 0xAC38, 0xB0BC, 0xAC39, 0xB0BD, 0xAC3A, 0x8164, 0xAC3B, 0x8165,
+ 0xAC3C, 0xB0BE, 0xAC3D, 0x8166, 0xAC3E, 0x8167, 0xAC3F, 0x8168,
+ 0xAC40, 0xB0BF, 0xAC41, 0x8169, 0xAC42, 0x816A, 0xAC43, 0x816B,
+ 0xAC44, 0x816C, 0xAC45, 0x816D, 0xAC46, 0x816E, 0xAC47, 0x816F,
+ 0xAC48, 0x8170, 0xAC49, 0x8171, 0xAC4A, 0x8172, 0xAC4B, 0xB0C0,
+ 0xAC4C, 0x8173, 0xAC4D, 0xB0C1, 0xAC4E, 0x8174, 0xAC4F, 0x8175,
+ 0xAC50, 0x8176, 0xAC51, 0x8177, 0xAC52, 0x8178, 0xAC53, 0x8179,
+ 0xAC54, 0xB0C2, 0xAC55, 0x817A, 0xAC56, 0x8181, 0xAC57, 0x8182,
+ 0xAC58, 0xB0C3, 0xAC59, 0x8183, 0xAC5A, 0x8184, 0xAC5B, 0x8185,
+ 0xAC5C, 0xB0C4, 0xAC5D, 0x8186, 0xAC5E, 0x8187, 0xAC5F, 0x8188,
+ 0xAC60, 0x8189, 0xAC61, 0x818A, 0xAC62, 0x818B, 0xAC63, 0x818C,
+ 0xAC64, 0x818D, 0xAC65, 0x818E, 0xAC66, 0x818F, 0xAC67, 0x8190,
+ 0xAC68, 0x8191, 0xAC69, 0x8192, 0xAC6A, 0x8193, 0xAC6B, 0x8194,
+ 0xAC6C, 0x8195, 0xAC6D, 0x8196, 0xAC6E, 0x8197, 0xAC6F, 0x8198,
+ 0xAC70, 0xB0C5, 0xAC71, 0xB0C6, 0xAC72, 0x8199, 0xAC73, 0x819A,
+ 0xAC74, 0xB0C7, 0xAC75, 0x819B, 0xAC76, 0x819C, 0xAC77, 0xB0C8,
+ 0xAC78, 0xB0C9, 0xAC79, 0x819D, 0xAC7A, 0xB0CA, 0xAC7B, 0x819E,
+ 0xAC7C, 0x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, 0x81F4,
+ 0xAD04, 0xB0FD, 0xAD05, 0x81F5, 0xAD06, 0xB0FE, 0xAD07, 0x81F6,
+ 0xAD08, 0x81F7, 0xAD09, 0x81F8, 0xAD0A, 0x81F9, 0xAD0B, 0x81FA,
+ 0xAD0C, 0xB1A1, 0xAD0D, 0xB1A2, 0xAD0E, 0x81FB, 0xAD0F, 0xB1A3,
+ 0xAD10, 0x81FC, 0xAD11, 0xB1A4, 0xAD12, 0x81FD, 0xAD13, 0x81FE,
+ 0xAD14, 0x8241, 0xAD15, 0x8242, 0xAD16, 0x8243, 0xAD17, 0x8244,
+ 0xAD18, 0xB1A5, 0xAD19, 0x8245, 0xAD1A, 0x8246, 0xAD1B, 0x8247,
+ 0xAD1C, 0xB1A6, 0xAD1D, 0x8248, 0xAD1E, 0x8249, 0xAD1F, 0x824A,
+ 0xAD20, 0xB1A7, 0xAD21, 0x824B, 0xAD22, 0x824C, 0xAD23, 0x824D,
+ 0xAD24, 0x824E, 0xAD25, 0x824F, 0xAD26, 0x8250, 0xAD27, 0x8251,
+ 0xAD28, 0x8252, 0xAD29, 0xB1A8, 0xAD2A, 0x8253, 0xAD2B, 0x8254,
+ 0xAD2C, 0xB1A9, 0xAD2D, 0xB1AA, 0xAD2E, 0x8255, 0xAD2F, 0x8256,
+ 0xAD30, 0x8257, 0xAD31, 0x8258, 0xAD32, 0x8259, 0xAD33, 0x825A,
+ 0xAD34, 0xB1AB, 0xAD35, 0xB1AC, 0xAD36, 0x8261, 0xAD37, 0x8262,
+ 0xAD38, 0xB1AD, 0xAD39, 0x8263, 0xAD3A, 0x8264, 0xAD3B, 0x8265,
+ 0xAD3C, 0xB1AE, 0xAD3D, 0x8266, 0xAD3E, 0x8267, 0xAD3F, 0x8268,
+ 0xAD40, 0x8269, 0xAD41, 0x826A, 0xAD42, 0x826B, 0xAD43, 0x826C,
+ 0xAD44, 0xB1AF, 0xAD45, 0xB1B0, 0xAD46, 0x826D, 0xAD47, 0xB1B1,
+ 0xAD48, 0x826E, 0xAD49, 0xB1B2, 0xAD4A, 0x826F, 0xAD4B, 0x8270,
+ 0xAD4C, 0x8271, 0xAD4D, 0x8272, 0xAD4E, 0x8273, 0xAD4F, 0x8274,
+ 0xAD50, 0xB1B3, 0xAD51, 0x8275, 0xAD52, 0x8276, 0xAD53, 0x8277,
+ 0xAD54, 0xB1B4, 0xAD55, 0x8278, 0xAD56, 0x8279, 0xAD57, 0x827A,
+ 0xAD58, 0xB1B5, 0xAD59, 0x8281, 0xAD5A, 0x8282, 0xAD5B, 0x8283,
+ 0xAD5C, 0x8284, 0xAD5D, 0x8285, 0xAD5E, 0x8286, 0xAD5F, 0x8287,
+ 0xAD60, 0x8288, 0xAD61, 0xB1B6, 0xAD62, 0x8289, 0xAD63, 0xB1B7,
+ 0xAD64, 0x828A, 0xAD65, 0x828B, 0xAD66, 0x828C, 0xAD67, 0x828D,
+ 0xAD68, 0x828E, 0xAD69, 0x828F, 0xAD6A, 0x8290, 0xAD6B, 0x8291,
+ 0xAD6C, 0xB1B8, 0xAD6D, 0xB1B9, 0xAD6E, 0x8292, 0xAD6F, 0x8293,
+ 0xAD70, 0xB1BA, 0xAD71, 0x8294, 0xAD72, 0x8295, 0xAD73, 0xB1BB,
+ 0xAD74, 0xB1BC, 0xAD75, 0xB1BD, 0xAD76, 0xB1BE, 0xAD77, 0x8296,
+ 0xAD78, 0x8297, 0xAD79, 0x8298, 0xAD7A, 0x8299, 0xAD7B, 0xB1BF,
+ 0xAD7C, 0xB1C0, 0xAD7D, 0xB1C1, 0xAD7E, 0x829A, 0xAD7F, 0xB1C2,
+ 0xAD80, 0x829B, 0xAD81, 0xB1C3, 0xAD82, 0xB1C4, 0xAD83, 0x829C,
+ 0xAD84, 0x829D, 0xAD85, 0x829E, 0xAD86, 0x829F, 0xAD87, 0x82A0,
+ 0xAD88, 0xB1C5, 0xAD89, 0xB1C6, 0xAD8A, 0x82A1, 0xAD8B, 0x82A2,
+ 0xAD8C, 0xB1C7, 0xAD8D,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B1D2, 0xADD2, 0x82DD, 0xADD3, 0xB1D3,
+ 0xADD4, 0x82DE, 0xADD5, 0x82DF, 0xADD6, 0x82E0, 0xADD7, 0x82E1,
+ 0xADD8, 0x82E2, 0xADD9, 0x82E3, 0xADDA, 0x82E4, 0xADDB, 0x82E5,
+ 0xADDC, 0xB1D4, 0xADDD, 0x82E6, 0xADDE, 0x82E7, 0xADDF, 0x82E8,
+ 0xADE0, 0xB1D5, 0xADE1, 0x82E9, 0xADE2, 0x82EA, 0xADE3, 0x82EB,
+ 0xADE4, 0xB1D6, 0xADE5, 0x82EC, 0xADE6, 0x82ED, 0xADE7, 0x82EE,
+ 0xADE8, 0x82EF, 0xADE9, 0x82F0, 0xADEA, 0x82F1, 0xADEB, 0x82F2,
+ 0xADEC, 0x82F3, 0xADED, 0x82F4, 0xADEE, 0x82F5, 0xADEF, 0x82F6,
+ 0xADF0, 0x82F7, 0xADF1, 0x82F8, 0xADF2, 0x82F9, 0xADF3, 0x82FA,
+ 0xADF4, 0x82FB, 0xADF5, 0x82FC, 0xADF6, 0x82FD, 0xADF7, 0x82FE,
+ 0xADF8, 0xB1D7, 0xADF9, 0xB1D8, 0xADFA, 0x8341, 0xADFB, 0x8342,
+ 0xADFC, 0xB1D9, 0xADFD, 0x8343, 0xADFE, 0x8344, 0xADFF, 0xB1DA,
+ 0xAE00, 0xB1DB, 0xAE01, 0xB1DC, 0xAE02, 0x8345, 0xAE03, 0x8346,
+ 0xAE04, 0x8347, 0xAE05, 0x8348, 0xAE06, 0x8349, 0xAE07, 0x834A,
+ 0xAE08, 0xB1DD, 0xAE09, 0xB1DE, 0xAE0A, 0x834B, 0xAE0B, 0xB1DF,
+ 0xAE0C, 0x834C, 0xAE0D, 0xB1E0, 0xAE0E, 0x834D, 0xAE0F, 0x834E,
+ 0xAE10, 0x834F, 0xAE11, 0x8350, 0xAE12, 0x8351, 0xAE13, 0x8352,
+ 0xAE14, 0xB1E1, 0xAE15, 0x8353, 0xAE16, 0x8354, 0xAE17, 0x8355,
+ 0xAE18, 0x8356, 0xAE19, 0x8357, 0xAE1A, 0x8358, 0xAE1B, 0x8359,
+ 0xAE1C, 0x835A, 0xAE1D, 0x8361, 0xAE1E, 0x8362, 0xAE1F, 0x8363,
+ 0xAE20, 0x8364, 0xAE21, 0x8365, 0xAE22, 0x8366, 0xAE23, 0x8367,
+ 0xAE24, 0x8368, 0xAE25, 0x8369, 0xAE26, 0x836A, 0xAE27, 0x836B,
+ 0xAE28, 0x836C, 0xAE29, 0x836D, 0xAE2A, 0x836E, 0xAE2B, 0x836F,
+ 0xAE2C, 0x8370, 0xAE2D, 0x8371, 0xAE2E, 0x8372, 0xAE2F, 0x8373,
+ 0xAE30, 0xB1E2, 0xAE31, 0xB1E3, 0xAE32, 0x8374, 0xAE33, 0x8375,
+ 0xAE34, 0xB1E4, 0xAE35, 0x8376, 0xAE36, 0x8377, 0xAE37, 0xB1E5,
+ 0xAE38, 0xB1E6, 0xAE39, 0x8378, 0xAE3A, 0xB1E7, 0xAE3B, 0x8379,
+ 0xAE3C, 0x837A, 0xAE3D, 0x8381, 0xAE3E, 0x8382, 0xAE3F, 0x8383,
+ 0xAE40, 0xB1E8, 0xAE41, 0xB1E9, 0xAE42, 0x8384, 0xAE43, 0xB1EA,
+ 0xAE44, 0x8385, 0xAE45, 0xB1EB, 0xAE46, 0xB1EC, 0xAE47, 0x8386,
+ 0xAE48, 0x8387, 0xAE49, 0x8388, 0xAE4A, 0xB1ED, 0xAE4B, 0x8389,
+ 0xAE4C, 0xB1EE, 0xAE4D, 0xB1EF, 0xAE4E, 0xB1F0, 0xAE4F, 0x838A,
+ 0xAE50, 0xB1F1, 0xAE51, 0x838B, 0xAE52, 0x838C, 0xAE53, 0x838D,
+ 0xAE54, 0xB1F2, 0xAE55, 0x838E, 0xAE56, 0xB1F3, 0xAE57, 0x838F,
+ 0xAE58, 0x8390, 0xAE59, 0x8391, 0xAE5A, 0x8392, 0xAE5B, 0x8393,
+ 0xAE5C, 0xB1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EE1, 0x83FA, 0xAEE2, 0x83FB, 0xAEE3, 0x83FC,
+ 0xAEE4, 0x83FD, 0xAEE5, 0x83FE, 0xAEE6, 0x8441, 0xAEE7, 0x8442,
+ 0xAEE8, 0xB2B5, 0xAEE9, 0x8443, 0xAEEA, 0x8444, 0xAEEB, 0xB2B6,
+ 0xAEEC, 0x8445, 0xAEED, 0xB2B7, 0xAEEE, 0x8446, 0xAEEF, 0x8447,
+ 0xAEF0, 0x8448, 0xAEF1, 0x8449, 0xAEF2, 0x844A, 0xAEF3, 0x844B,
+ 0xAEF4, 0xB2B8, 0xAEF5, 0x844C, 0xAEF6, 0x844D, 0xAEF7, 0x844E,
+ 0xAEF8, 0xB2B9, 0xAEF9, 0x844F, 0xAEFA, 0x8450, 0xAEFB, 0x8451,
+ 0xAEFC, 0xB2BA, 0xAEFD, 0x8452, 0xAEFE, 0x8453, 0xAEFF, 0x8454,
+ 0xAF00, 0x8455, 0xAF01, 0x8456, 0xAF02, 0x8457, 0xAF03, 0x8458,
+ 0xAF04, 0x8459, 0xAF05, 0x845A, 0xAF06, 0x8461, 0xAF07, 0xB2BB,
+ 0xAF08, 0xB2BC, 0xAF09, 0x8462, 0xAF0A, 0x8463, 0xAF0B, 0x8464,
+ 0xAF0C, 0x8465, 0xAF0D, 0xB2BD, 0xAF0E, 0x8466, 0xAF0F, 0x8467,
+ 0xAF10, 0xB2BE, 0xAF11, 0x8468, 0xAF12, 0x8469, 0xAF13, 0x846A,
+ 0xAF14, 0x846B, 0xAF15, 0x846C, 0xAF16, 0x846D, 0xAF17, 0x846E,
+ 0xAF18, 0x846F, 0xAF19, 0x8470, 0xAF1A, 0x8471, 0xAF1B, 0x8472,
+ 0xAF1C, 0x8473, 0xAF1D, 0x8474, 0xAF1E, 0x8475, 0xAF1F, 0x8476,
+ 0xAF20, 0x8477, 0xAF21, 0x8478, 0xAF22, 0x8479, 0xAF23, 0x847A,
+ 0xAF24, 0x8481, 0xAF25, 0x8482, 0xAF26, 0x8483, 0xAF27, 0x8484,
+ 0xAF28, 0x8485, 0xAF29, 0x8486, 0xAF2A, 0x8487, 0xAF2B, 0x8488,
+ 0xAF2C, 0xB2BF, 0xAF2D, 0xB2C0, 0xAF2E, 0x8489, 0xAF2F, 0x848A,
+ 0xAF30, 0xB2C1, 0xAF31, 0x848B, 0xAF32, 0xB2C2, 0xAF33, 0x848C,
+ 0xAF34, 0xB2C3, 0xAF35, 0x848D, 0xAF36, 0x848E, 0xAF37, 0x848F,
+ 0xAF38, 0x8490, 0xAF39, 0x8491, 0xAF3A, 0x8492, 0xAF3B, 0x8493,
+ 0xAF3C, 0xB2C4, 0xAF3D, 0xB2C5, 0xAF3E, 0x8494, 0xAF3F, 0xB2C6,
+ 0xAF40, 0x8495, 0xAF41, 0xB2C7, 0xAF42, 0xB2C8, 0xAF43, 0xB2C9,
+ 0xAF44, 0x8496, 0xAF45, 0x8497, 0xAF46, 0x8498, 0xAF47, 0x8499,
+ 0xAF48, 0xB2CA, 0xAF49, 0xB2CB, 0xAF4A, 0x849A, 0xAF4B, 0x849B,
+ 0xAF4C, 0x849C, 0xAF4D, 0x849D, 0xAF4E, 0x849E, 0xAF4F, 0x849F,
+ 0xAF50, 0xB2CC, 0xAF51, 0x84A0, 0xAF52, 0x84A1, 0xAF53, 0x84A2,
+ 0xAF54, 0x84A3, 0xAF55, 0x84A4, 0xAF56, 0x84A5, 0xAF57, 0x84A6,
+ 0xAF58, 0x84A7, 0xAF59, 0x84A8, 0xAF5A, 0x84A9, 0xAF5B, 0x84AA,
+ 0xAF5C, 0xB2CD, 0xAF5D, 0xB2CE, 0xAF5E, 0x84AB, 0xAF5F, 0x84AC,
+ 0xAF60, 0x84AD, 0xAF61, 0x84AE, 0xAF62, 0x84AF, 0xAF63, 0x84B0,
+ 0xAF64, 0xB2CF, 0xAF65, 0xB2D0, 0xAF66, 0x84B1, 0xAF67, 0x84B2,
+ 0xAF68, 0x84B3, 0xAF69, 0x84B4, 0xAF6A, 0x84B5, 0xAF6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FF0, 0xB2E7, 0xAFF1, 0xB2E8, 0xAFF2, 0x856D, 0xAFF3, 0x856E,
+ 0xAFF4, 0xB2E9, 0xAFF5, 0x856F, 0xAFF6, 0x8570, 0xAFF7, 0x8571,
+ 0xAFF8, 0xB2EA, 0xAFF9, 0x8572, 0xAFFA, 0x8573, 0xAFFB, 0x8574,
+ 0xAFFC, 0x8575, 0xAFFD, 0x8576, 0xAFFE, 0x8577, 0xAFFF, 0x8578,
+ 0xB000, 0xB2EB, 0xB001, 0xB2EC, 0xB002, 0x8579, 0xB003, 0x857A,
+ 0xB004, 0xB2ED, 0xB005, 0x8581, 0xB006, 0x8582, 0xB007, 0x8583,
+ 0xB008, 0x8584, 0xB009, 0x8585, 0xB00A, 0x8586, 0xB00B, 0x8587,
+ 0xB00C, 0xB2EE, 0xB00D, 0x8588, 0xB00E, 0x8589, 0xB00F, 0x858A,
+ 0xB010, 0xB2EF, 0xB011, 0x858B, 0xB012, 0x858C, 0xB013, 0x858D,
+ 0xB014, 0xB2F0, 0xB015, 0x858E, 0xB016, 0x858F, 0xB017, 0x8590,
+ 0xB018, 0x8591, 0xB019, 0x8592, 0xB01A, 0x8593, 0xB01B, 0x8594,
+ 0xB01C, 0xB2F1, 0xB01D, 0xB2F2, 0xB01E, 0x8595, 0xB01F, 0x8596,
+ 0xB020, 0x8597, 0xB021, 0x8598, 0xB022, 0x8599, 0xB023, 0x859A,
+ 0xB024, 0x859B, 0xB025, 0x859C, 0xB026, 0x859D, 0xB027, 0x859E,
+ 0xB028, 0xB2F3, 0xB029, 0x859F, 0xB02A, 0x85A0, 0xB02B, 0x85A1,
+ 0xB02C, 0x85A2, 0xB02D, 0x85A3, 0xB02E, 0x85A4, 0xB02F, 0x85A5,
+ 0xB030, 0x85A6, 0xB031, 0x85A7, 0xB032, 0x85A8, 0xB033, 0x85A9,
+ 0xB034, 0x85AA, 0xB035, 0x85AB, 0xB036, 0x85AC, 0xB037, 0x85AD,
+ 0xB038, 0x85AE, 0xB039, 0x85AF, 0xB03A, 0x85B0, 0xB03B, 0x85B1,
+ 0xB03C, 0x85B2, 0xB03D, 0x85B3, 0xB03E, 0x85B4, 0xB03F, 0x85B5,
+ 0xB040, 0x85B6, 0xB041, 0x85B7, 0xB042, 0x85B8, 0xB043, 0x85B9,
+ 0xB044, 0xB2F4, 0xB045, 0xB2F5, 0xB046, 0x85BA, 0xB047, 0x85BB,
+ 0xB048, 0xB2F6, 0xB049, 0x85BC, 0xB04A, 0xB2F7, 0xB04B, 0x85BD,
+ 0xB04C, 0xB2F8, 0xB04D, 0x85BE, 0xB04E, 0xB2F9, 0xB04F, 0x85BF,
+ 0xB050, 0x85C0, 0xB051, 0x85C1, 0xB052, 0x85C2, 0xB053, 0xB2FA,
+ 0xB054, 0xB2FB, 0xB055, 0xB2FC, 0xB056, 0x85C3, 0xB057, 0xB2FD,
+ 0xB058, 0x85C4, 0xB059, 0xB2FE, 0xB05A, 0x85C5, 0xB05B, 0x85C6,
+ 0xB05C, 0x85C7, 0xB05D, 0xB3A1, 0xB05E, 0x85C8, 0xB05F, 0x85C9,
+ 0xB060, 0x85CA, 0xB061, 0x85CB, 0xB062, 0x85CC, 0xB063, 0x85CD,
+ 0xB064, 0x85CE, 0xB065, 0x85CF, 0xB066, 0x85D0, 0xB067, 0x85D1,
+ 0xB068, 0x85D2, 0xB069, 0x85D3, 0xB06A, 0x85D4, 0xB06B, 0x85D5,
+ 0xB06C, 0x85D6, 0xB06D, 0x85D7, 0xB06E, 0x85D8, 0xB06F, 0x85D9,
+ 0xB070, 0x85DA, 0xB071, 0x85DB, 0xB072, 0x85DC, 0xB073, 0x85DD,
+ 0xB074, 0x85DE, 0xB075, 0x85DF, 0xB076, 0x85E0, 0xB077, 0x85E1,
+ 0xB078, 0x85E2, 0xB079, 0x85E3, 0xB07A, 0x85E4, 0xB07B, 0x85E5,
+ 0xB07C, 0xB3A2, 0xB07D, 0xB3A3, 0xB07E, 0x85E6, 0xB07F, 0x85E7,
+ 0xB080, 0xB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4, 0xB3BF, 0xB0C5, 0xB3C0, 0xB0C6, 0x8653, 0xB0C7, 0xB3C1,
+ 0xB0C8, 0xB3C2, 0xB0C9, 0xB3C3, 0xB0CA, 0x8654, 0xB0CB, 0x8655,
+ 0xB0CC, 0x8656, 0xB0CD, 0x8657, 0xB0CE, 0x8658, 0xB0CF, 0x8659,
+ 0xB0D0, 0xB3C4, 0xB0D1, 0xB3C5, 0xB0D2, 0x865A, 0xB0D3, 0x8661,
+ 0xB0D4, 0xB3C6, 0xB0D5, 0x8662, 0xB0D6, 0x8663, 0xB0D7, 0x8664,
+ 0xB0D8, 0xB3C7, 0xB0D9, 0x8665, 0xB0DA, 0x8666, 0xB0DB, 0x8667,
+ 0xB0DC, 0x8668, 0xB0DD, 0x8669, 0xB0DE, 0x866A, 0xB0DF, 0x866B,
+ 0xB0E0, 0xB3C8, 0xB0E1, 0x866C, 0xB0E2, 0x866D, 0xB0E3, 0x866E,
+ 0xB0E4, 0x866F, 0xB0E5, 0xB3C9, 0xB0E6, 0x8670, 0xB0E7, 0x8671,
+ 0xB0E8, 0x8672, 0xB0E9, 0x8673, 0xB0EA, 0x8674, 0xB0EB, 0x8675,
+ 0xB0EC, 0x8676, 0xB0ED, 0x8677, 0xB0EE, 0x8678, 0xB0EF, 0x8679,
+ 0xB0F0, 0x867A, 0xB0F1, 0x8681, 0xB0F2, 0x8682, 0xB0F3, 0x8683,
+ 0xB0F4, 0x8684, 0xB0F5, 0x8685, 0xB0F6, 0x8686, 0xB0F7, 0x8687,
+ 0xB0F8, 0x8688, 0xB0F9, 0x8689, 0xB0FA, 0x868A, 0xB0FB, 0x868B,
+ 0xB0FC, 0x868C, 0xB0FD, 0x868D, 0xB0FE, 0x868E, 0xB0FF, 0x868F,
+ 0xB100, 0x8690, 0xB101, 0x8691, 0xB102, 0x8692, 0xB103, 0x8693,
+ 0xB104, 0x8694, 0xB105, 0x8695, 0xB106, 0x8696, 0xB107, 0x8697,
+ 0xB108, 0xB3CA, 0xB109, 0xB3CB, 0xB10A, 0x8698, 0xB10B, 0xB3CC,
+ 0xB10C, 0xB3CD, 0xB10D, 0x8699, 0xB10E, 0x869A, 0xB10F, 0x869B,
+ 0xB110, 0xB3CE, 0xB111, 0x869C, 0xB112, 0xB3CF, 0xB113, 0xB3D0,
+ 0xB114, 0x869D, 0xB115, 0x869E, 0xB116, 0x869F, 0xB117, 0x86A0,
+ 0xB118, 0xB3D1, 0xB119, 0xB3D2, 0xB11A, 0x86A1, 0xB11B, 0xB3D3,
+ 0xB11C, 0xB3D4, 0xB11D, 0xB3D5, 0xB11E, 0x86A2, 0xB11F, 0x86A3,
+ 0xB120, 0x86A4, 0xB121, 0x86A5, 0xB122, 0x86A6, 0xB123, 0xB3D6,
+ 0xB124, 0xB3D7, 0xB125, 0xB3D8, 0xB126, 0x86A7, 0xB127, 0x86A8,
+ 0xB128, 0xB3D9, 0xB129, 0x86A9, 0xB12A, 0x86AA, 0xB12B, 0x86AB,
+ 0xB12C, 0xB3DA, 0xB12D, 0x86AC, 0xB12E, 0x86AD, 0xB12F, 0x86AE,
+ 0xB130, 0x86AF, 0xB131, 0x86B0, 0xB132, 0x86B1, 0xB133, 0x86B2,
+ 0xB134, 0xB3DB, 0xB135, 0xB3DC, 0xB136, 0x86B3, 0xB137, 0xB3DD,
+ 0xB138, 0xB3DE, 0xB139, 0xB3DF, 0xB13A, 0x86B4, 0xB13B, 0x86B5,
+ 0xB13C, 0x86B6, 0xB13D, 0x86B7, 0xB13E, 0x86B8, 0xB13F, 0x86B9,
+ 0xB140, 0xB3E0, 0xB141, 0xB3E1, 0xB142, 0x86BA, 0xB143, 0x86BB,
+ 0xB144, 0xB3E2, 0xB145, 0x86BC, 0xB146, 0x86BD, 0xB147, 0x86BE,
+ 0xB148, 0xB3E3, 0xB149, 0x86BF, 0xB14A, 0x86C0, 0xB14B, 0x86C1,
+ 0xB14C, 0x86C2, 0xB14D, 0x86C3, 0xB14E, 0x86C4, 0xB14F, 0x86C5,
+ 0xB150, 0xB3E4, 0xB151, 0xB3E5, 0xB152, 0x86C6, 0xB153, 0x86C7,
+ 0xB154, 0xB3E6, 0xB155, 0xB3E7, 0xB156, 0x86C8, 0xB157, 0x86C9,
+ 0xB158, 0xB3E8, 0xB159, 0x86CA, 0xB15A, 0x86CB, 0xB15B, 0x86CC,
+ 0xB15C, 0xB3E9, 0xB15D, 0x86CD, 0xB15E, 0x86CE, 0xB15F, 0x86CF,
+ 0xB160, 0xB3EA, 0xB161, 0x86D0, 0xB162, 0x86D1, 0xB163, 0x86D2,
+ 0xB164, 0x86D3, 0xB165, 0x86D4, 0xB166, 0x86D5, 0xB167, 0x86D6,
+ 0xB168, 0x86D7, 0xB169, 0x86D8, 0xB16A, 0x86D9, 0xB16B, 0x86DA,
+ 0xB16C, 0x86DB, 0xB16D, 0x86DC, 0xB16E, 0x86DD, 0xB16F, 0x86DE,
+ 0xB170, 0x86DF, 0xB171, 0x86E0, 0xB172, 0x86E1, 0xB173, 0x86E2,
+ 0xB174, 0x86E3, 0xB175, 0x86E4, 0xB176, 0x86E5, 0xB177, 0x86E6,
+ 0xB178, 0xB3EB, 0xB179, 0xB3EC, 0xB17A, 0x86E7, 0xB17B, 0x86E8,
+ 0xB17C, 0xB3ED, 0xB17D, 0x86E9, 0xB17E, 0x86EA, 0xB17F, 0x86EB,
+ 0xB180, 0xB3EE, 0xB181, 0x86EC, 0xB182, 0xB3EF, 0xB183, 0x86ED,
+ 0xB184, 0x86EE, 0xB185, 0x86EF, 0xB186, 0x86F0, 0xB187, 0x86F1,
+ 0xB188, 0xB3F0, 0xB189, 0xB3F1, 0xB18A, 0x86F2, 0xB18B, 0xB3F2,
+ 0xB18C, 0x86F3, 0xB18D, 0xB3F3, 0xB18E, 0x86F4, 0xB18F, 0x86F5,
+ 0xB190, 0x86F6, 0xB191, 0x86F7, 0xB192, 0xB3F4, 0xB193, 0xB3F5,
+ 0xB194, 0xB3F6, 0xB195, 0x86F8, 0xB196, 0x86F9, 0xB197, 0x86FA,
+ 0xB198, 0xB3F7, 0xB199, 0x86FB, 0xB19A, 0x86FC, 0xB19B, 0x86FD,
+ 0xB19C, 0xB3F8, 0xB19D, 0x86FE, 0xB19E, 0x8741, 0xB19F, 0x8742,
+ 0xB1A0, 0x8743, 0xB1A1, 0x8744, 0xB1A2, 0x8745, 0xB1A3, 0x8746,
+ 0xB1A4, 0x8747, 0xB1A5, 0x8748, 0xB1A6, 0x8749, 0xB1A7, 0x874A,
+ 0xB1A8, 0xB3F9, 0xB1A9, 0x874B, 0xB1AA, 0x874C, 0xB1AB, 0x874D,
+ 0xB1AC, 0x874E, 0xB1AD, 0x874F, 0xB1AE, 0x8750, 0xB1AF, 0x8751,
+ 0xB1B0, 0x8752, 0xB1B1, 0x8753, 0xB1B2, 0x8754, 0xB1B3, 0x8755,
+ 0xB1B4, 0x8756, 0xB1B5, 0x8757, 0xB1B6, 0x8758, 0xB1B7, 0x8759,
+ 0xB1B8, 0x875A, 0xB1B9, 0x8761, 0xB1BA, 0x8762, 0xB1BB, 0x8763,
+ 0xB1BC, 0x8764, 0xB1BD, 0x8765, 0xB1BE, 0x8766, 0xB1BF, 0x8767,
+ 0xB1C0, 0x8768, 0xB1C1, 0x8769, 0xB1C2, 0x876A, 0xB1C3, 0x876B,
+ 0xB1C4, 0x876C, 0xB1C5, 0x876D, 0xB1C6, 0x876E, 0xB1C7, 0x876F,
+ 0xB1C8, 0x8770, 0xB1C9, 0x8771, 0xB1CA, 0x8772, 0xB1CB, 0x8773,
+ 0xB1CC, 0xB3FA, 0xB1CD, 0x8774, 0xB1CE, 0x8775, 0xB1CF, 0x8776,
+ 0xB1D0, 0xB3FB, 0xB1D1, 0x8777, 0xB1D2, 0x8778, 0xB1D3, 0x8779,
+ 0xB1D4, 0xB3FC, 0xB1D5, 0x877A, 0xB1D6, 0x8781, 0xB1D7, 0x8782,
+ 0xB1D8, 0x8783, 0xB1D9, 0x8784, 0xB1DA, 0x8785, 0xB1DB, 0x8786,
+ 0xB1DC, 0xB3FD, 0xB1DD, 0xB3FE, 0xB1DE, 0x8787, 0xB1DF, 0xB4A1,
+ 0xB1E0, 0x8788, 0xB1E1, 0x8789, 0xB1E2, 0x878A, 0xB1E3, 0x878B,
+ 0xB1E4, 0x878C, 0xB1E5, 0x878D, 0xB1E6, 0x878E, 0xB1E7, 0x878F,
+ 0xB1E8, 0xB4A2, 0xB1E9, 0xB4A3, 0xB1EA, 0x8790, 0xB1EB, 0x8791,
+ 0xB1EC, 0xB4A4, 0xB1ED, 0x8792, 0xB1EE, 0x8793, 0xB1EF, 0x8794,
+ 0xB1F0, 0xB4A5, 0xB1F1, 0x8795, 0xB1F2, 0x8796, 0xB1F3, 0x8797,
+ 0xB1F4, 0x8798, 0xB1F5, 0x8799, 0xB1F6, 0x879A, 0xB1F7, 0x879B,
+ 0xB1F8, 0x879C, 0xB1F9, 0xB4A6, 0xB1FA, 0x879D, 0xB1FB, 0xB4A7,
+ 0xB1FC, 0x879E, 0xB1FD, 0xB4A8, 0xB1FE, 0x879F, 0xB1FF, 0x87A0,
+ 0xB200, 0x87A1, 0xB201, 0x87A2, 0xB202, 0x87A3, 0xB203, 0x87A4,
+ 0xB204, 0xB4A9, 0xB205, 0xB4AA, 0xB206, 0x87A5, 0xB207, 0x87A6,
+ 0xB208, 0xB4AB, 0xB209, 0x87A7, 0xB20A, 0x87A8, 0xB20B, 0xB4AC,
+ 0xB20C, 0xB4AD, 0xB20D, 0x87A9, 0xB20E, 0x87AA, 0xB20F, 0x87AB,
+ 0xB210, 0x87AC, 0xB211, 0x87AD, 0xB212, 0x87AE, 0xB213, 0x87AF,
+ 0xB214, 0xB4AE, 0xB215, 0xB4AF, 0xB216, 0x87B0, 0xB217, 0xB4B0,
+ 0xB218, 0x87B1, 0xB219, 0xB4B1, 0xB21A, 0x87B2, 0xB21B, 0x87B3,
+ 0xB21C, 0x87B4, 0xB21D, 0x87B5, 0xB21E, 0x87B6, 0xB21F, 0x87B7,
+ 0xB220, 0xB4B2, 0xB221, 0x87B8, 0xB222, 0x87B9, 0xB223, 0x87BA,
+ 0xB224, 0x87BB, 0xB225, 0x87BC, 0xB226, 0x87BD, 0xB227, 0x87BE,
+ 0xB228, 0x87BF, 0xB229, 0x87C0, 0xB22A, 0x87C1, 0xB22B, 0x87C2,
+ 0xB22C, 0x87C3, 0xB22D, 0x87C4, 0xB22E, 0x87C5, 0xB22F, 0x87C6,
+ 0xB230, 0x87C7, 0xB231, 0x87C8, 0xB232, 0x87C9, 0xB233, 0x87CA,
+ 0xB234, 0xB4B3, 0xB235, 0x87CB, 0xB236, 0x87CC, 0xB237, 0x87CD,
+ 0xB238, 0x87CE, 0xB239, 0x87CF, 0xB23A, 0x87D0, 0xB23B, 0x87D1,
+ 0xB23C, 0xB4B4, 0xB23D, 0x87D2, 0xB23E, 0x87D3, 0xB23F, 0x87D4,
+ 0xB240, 0x87D5, 0xB241, 0x87D6, 0xB242, 0x87D7, 0xB243, 0x87D8,
+ 0xB244, 0x87D9, 0xB245, 0x87DA, 0xB246, 0x87DB, 0xB247, 0x87DC,
+ 0xB248, 0x87DD, 0xB249, 0x87DE, 0xB24A, 0x87DF, 0xB24B, 0x87E0,
+ 0xB24C, 0x87E1, 0xB24D, 0x87E2, 0xB24E, 0x87E3, 0xB24F, 0x87E4,
+ 0xB250, 0x87E5, 0xB251, 0x87E6, 0xB252, 0x87E7, 0xB253, 0x87E8,
+ 0xB254, 0x87E9, 0xB255, 0x87EA, 0xB256, 0x87EB, 0xB257, 0x87EC,
+ 0xB258, 0xB4B5, 0xB259, 0x87ED, 0xB25A, 0x87EE, 0xB25B, 0x87EF,
+ 0xB25C, 0xB4B6, 0xB25D, 0x87F0, 0xB25E, 0x87F1, 0xB25F, 0x87F2,
+ 0xB260, 0xB4B7, 0xB261, 0x87F3, 0xB262, 0x87F4, 0xB263, 0x87F5,
+ 0xB264, 0x87F6, 0xB265, 0x87F7, 0xB266, 0x87F8, 0xB267, 0x87F9,
+ 0xB268, 0xB4B8, 0xB269, 0xB4B9, 0xB26A, 0x87FA, 0xB26B, 0x87FB,
+ 0xB26C, 0x87FC, 0xB26D, 0x87FD, 0xB26E, 0x87FE, 0xB26F, 0x8841,
+ 0xB270, 0x8842, 0xB271, 0x8843, 0xB272, 0x8844, 0xB273, 0x8845,
+ 0xB274, 0xB4BA, 0xB275, 0xB4BB, 0xB276, 0x8846, 0xB277, 0x8847,
+ 0xB278, 0x8848, 0xB279, 0x8849, 0xB27A, 0x884A, 0xB27B, 0x884B,
+ 0xB27C, 0xB4BC, 0xB27D, 0x884C, 0xB27E, 0x884D, 0xB27F, 0x884E,
+ 0xB280, 0x884F, 0xB281, 0x8850, 0xB282, 0x8851, 0xB283, 0x8852,
+ 0xB284, 0xB4BD, 0xB285, 0xB4BE, 0xB286, 0x8853, 0xB287, 0x8854,
+ 0xB288, 0x8855, 0xB289, 0xB4BF, 0xB28A, 0x8856, 0xB28B, 0x8857,
+ 0xB28C, 0x8858, 0xB28D, 0x8859, 0xB28E, 0x885A, 0xB28F, 0x8861,
+ 0xB290, 0xB4C0, 0xB291, 0xB4C1, 0xB292, 0x8862, 0xB293, 0x8863,
+ 0xB294, 0xB4C2, 0xB295, 0x8864, 0xB296, 0x8865, 0xB297, 0x8866,
+ 0xB298, 0xB4C3, 0xB299, 0xB4C4, 0xB29A, 0xB4C5, 0xB29B, 0x8867,
+ 0xB29C, 0x8868, 0xB29D, 0x8869, 0xB29E, 0x886A, 0xB29F, 0x886B,
+ 0xB2A0, 0xB4C6, 0xB2A1, 0xB4C7, 0xB2A2, 0x886C, 0xB2A3, 0xB4C8,
+ 0xB2A4, 0x886D, 0xB2A5, 0xB4C9, 0xB2A6, 0xB4CA, 0xB2A7, 0x886E,
+ 0xB2A8, 0x886F, 0xB2A9, 0x8870, 0xB2AA, 0xB4CB, 0xB2AB, 0x8871,
+ 0xB2AC, 0xB4CC, 0xB2AD, 0x8872, 0xB2AE, 0x8873, 0xB2AF, 0x8874,
+ 0xB2B0, 0xB4CD, 0xB2B1, 0x8875, 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 0xB2F4, 0xB4E3, 0xB2F5, 0xB4E4, 0xB2F6, 0x88A9, 0xB2F7, 0xB4E5,
+ 0xB2F8, 0xB4E6, 0xB2F9, 0xB4E7, 0xB2FA, 0xB4E8, 0xB2FB, 0xB4E9,
+ 0xB2FC, 0x88AA, 0xB2FD, 0x88AB, 0xB2FE, 0x88AC, 0xB2FF, 0xB4EA,
+ 0xB300, 0xB4EB, 0xB301, 0xB4EC, 0xB302, 0x88AD, 0xB303, 0x88AE,
+ 0xB304, 0xB4ED, 0xB305, 0x88AF, 0xB306, 0x88B0, 0xB307, 0x88B1,
+ 0xB308, 0xB4EE, 0xB309, 0x88B2, 0xB30A, 0x88B3, 0xB30B, 0x88B4,
+ 0xB30C, 0x88B5, 0xB30D, 0x88B6, 0xB30E, 0x88B7, 0xB30F, 0x88B8,
+ 0xB310, 0xB4EF, 0xB311, 0xB4F0, 0xB312, 0x88B9, 0xB313, 0xB4F1,
+ 0xB314, 0xB4F2, 0xB315, 0xB4F3, 0xB316, 0x88BA, 0xB317, 0x88BB,
+ 0xB318, 0x88BC, 0xB319, 0x88BD, 0xB31A, 0x88BE, 0xB31B, 0x88BF,
+ 0xB31C, 0xB4F4, 0xB31D, 0x88C0, 0xB31E, 0x88C1, 0xB31F, 0x88C2,
+ 0xB320, 0x88C3, 0xB321, 0x88C4, 0xB322, 0x88C5, 0xB323, 0x88C6,
+ 0xB324, 0x88C7, 0xB325, 0x88C8, 0xB326, 0x88C9, 0xB327, 0x88CA,
+ 0xB328, 0x88CB, 0xB329, 0x88CC, 0xB32A, 0x88CD, 0xB32B, 0x88CE,
+ 0xB32C, 0x88CF, 0xB32D, 0x88D0, 0xB32E, 0x88D1, 0xB32F, 0x88D2,
+ 0xB330, 0x88D3, 0xB331, 0x88D4, 0xB332, 0x88D5, 0xB333, 0x88D6,
+ 0xB334, 0x88D7, 0xB335, 0x88D8, 0xB336, 0x88D9, 0xB337, 0x88DA,
+ 0xB338, 0x88DB, 0xB339, 0x88DC, 0xB33A, 0x88DD, 0xB33B, 0x88DE,
+ 0xB33C, 0x88DF, 0xB33D, 0x88E0, 0xB33E, 0x88E1, 0xB33F, 0x88E2,
+ 0xB340, 0x88E3, 0xB341, 0x88E4, 0xB342, 0x88E5, 0xB343, 0x88E6,
+ 0xB344, 0x88E7, 0xB345, 0x88E8, 0xB346, 0x88E9, 0xB347, 0x88EA,
+ 0xB348, 0x88EB, 0xB349, 0x88EC, 0xB34A, 0x88ED, 0xB34B, 0x88EE,
+ 0xB34C, 0x88EF, 0xB34D, 0x88F0, 0xB34E, 0x88F1, 0xB34F, 0x88F2,
+ 0xB350, 0x88F3, 0xB351, 0x88F4, 0xB352, 0x88F5, 0xB353, 0x88F6,
+ 0xB354, 0xB4F5, 0xB355, 0xB4F6, 0xB356, 0xB4F7, 0xB357, 0x88F7,
+ 0xB358, 0xB4F8, 0xB359, 0x88F8, 0xB35A, 0x88F9, 0xB35B, 0xB4F9,
+ 0xB35C, 0xB4FA, 0xB35D, 0x88FA, 0xB35E, 0xB4FB, 0xB35F, 0xB4FC,
+ 0xB360, 0x88FB, 0xB361, 0x88FC, 0xB362, 0x88FD, 0xB363, 0x88FE,
+ 0xB364, 0xB4FD, 0xB365, 0xB4FE, 0xB366, 0x8941, 0xB367, 0xB5A1,
+ 0xB368, 0x8942, 0xB369, 0xB5A2, 0xB36A, 0x8943, 0xB36B, 0xB5A3,
+ 0xB36C, 0x8944, 0xB36D, 0x8945, 0xB36E, 0xB5A4, 0xB36F, 0x8946,
+ 0xB370, 0xB5A5, 0xB371, 0xB5A6, 0xB372, 0x8947, 0xB373, 0x8948,
+ 0xB374, 0xB5A7, 0xB375, 0x8949, 0xB376, 0x894A, 0xB377, 0x894B,
+ 0xB378, 0xB5A8, 0xB379, 0x894C, 0xB37A, 0x894D, 0xB37B, 0x894E,
+ 0xB37C, 0x894F, 0xB37D, 0x8950, 0xB37E, 0x8951, 0xB37F, 0x8952,
+ 0xB380, 0xB5A9, 0xB381, 0xB5AA, 0xB382, 0x8953, 0xB383, 0xB5AB,
+ 0xB384, 0xB5AC, 0xB385, 0xB5AD, 0xB386, 0x8954, 0xB387, 0x8955,
+ 0xB388, 0x8956, 0xB389, 0x8957, 0xB38A, 0x8958, 0xB38B, 0x8959,
+ 0xB38C, 0xB5AE, 0xB38D, 0x895A, 0xB38E, 0x8961, 0xB38F, 0x8962,
+ 0xB390, 0xB5AF, 0xB391, 0x8963, 0xB392, 0x8964, 0xB393, 0x8965,
+ 0xB394, 0xB5B0, 0xB395, 0x8966, 0xB396, 0x8967, 0xB397, 0x8968,
+ 0xB398, 0x8969, 0xB399, 0x896A, 0xB39A, 0x896B, 0xB39B, 0x896C,
+ 0xB39C, 0x896D, 0xB39D, 0x896E, 0xB39E, 0x896F, 0xB39F, 0x8970,
+ 0xB3A0, 0xB5B1, 0xB3A1, 0xB5B2, 0xB3A2, 0x8971, 0xB3A3, 0x8972,
+ 0xB3A4, 0x8973, 0xB3A5, 0x8974, 0xB3A6, 0x8975, 0xB3A7, 0x8976,
+ 0xB3A8, 0xB5B3, 0xB3A9, 0x8977, 0xB3AA, 0x8978, 0xB3AB, 0x8979,
+ 0xB3AC, 0xB5B4, 0xB3AD, 0x897A, 0xB3AE, 0x8981, 0xB3AF, 0x8982,
+ 0xB3B0, 0x8983, 0xB3B1, 0x8984, 0xB3B2, 0x8985, 0xB3B3, 0x8986,
+ 0xB3B4, 0x8987, 0xB3B5, 0x8988, 0xB3B6, 0x8989, 0xB3B7, 0x898A,
+ 0xB3B8, 0x898B, 0xB3B9, 0x898C, 0xB3BA, 0x898D, 0xB3BB, 0x898E,
+ 0xB3BC, 0x898F, 0xB3BD, 0x8990, 0xB3BE, 0x8991, 0xB3BF, 0x8992,
+ 0xB3C0, 0x8993, 0xB3C1, 0x8994, 0xB3C2, 0x8995, 0xB3C3, 0x8996,
+ 0xB3C4, 0xB5B5, 0xB3C5, 0xB5B6, 0xB3C6, 0x8997, 0xB3C7, 0x8998,
+ 0xB3C8, 0xB5B7, 0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xB40B, 0x89CD,
+ 0xB40C, 0x89CE, 0xB40D, 0x89CF, 0xB40E, 0x89D0, 0xB40F, 0x89D1,
+ 0xB410, 0xB5C6, 0xB411, 0x89D2, 0xB412, 0x89D3, 0xB413, 0x89D4,
+ 0xB414, 0x89D5, 0xB415, 0x89D6, 0xB416, 0x89D7, 0xB417, 0x89D8,
+ 0xB418, 0xB5C7, 0xB419, 0x89D9, 0xB41A, 0x89DA, 0xB41B, 0x89DB,
+ 0xB41C, 0xB5C8, 0xB41D, 0x89DC, 0xB41E, 0x89DD, 0xB41F, 0x89DE,
+ 0xB420, 0xB5C9, 0xB421, 0x89DF, 0xB422, 0x89E0, 0xB423, 0x89E1,
+ 0xB424, 0x89E2, 0xB425, 0x89E3, 0xB426, 0x89E4, 0xB427, 0x89E5,
+ 0xB428, 0xB5CA, 0xB429, 0xB5CB, 0xB42A, 0x89E6, 0xB42B, 0xB5CC,
+ 0xB42C, 0x89E7, 0xB42D, 0x89E8, 0xB42E, 0x89E9, 0xB42F, 0x89EA,
+ 0xB430, 0x89EB, 0xB431, 0x89EC, 0xB432, 0x89ED, 0xB433, 0x89EE,
+ 0xB434, 0xB5CD, 0xB435, 0x89EF, 0xB436, 0x89F0, 0xB437, 0x89F1,
+ 0xB438, 0x89F2, 0xB439, 0x89F3, 0xB43A, 0x89F4, 0xB43B, 0x89F5,
+ 0xB43C, 0x89F6, 0xB43D, 0x89F7, 0xB43E, 0x89F8, 0xB43F, 0x89F9,
+ 0xB440, 0x89FA, 0xB441, 0x89FB, 0xB442, 0x89FC, 0xB443, 0x89FD,
+ 0xB444, 0x89FE, 0xB445, 0x8A41, 0xB446, 0x8A42, 0xB447, 0x8A43,
+ 0xB448, 0x8A44, 0xB449, 0x8A45, 0xB44A, 0x8A46, 0xB44B, 0x8A47,
+ 0xB44C, 0x8A48, 0xB44D, 0x8A49, 0xB44E, 0x8A4A, 0xB44F, 0x8A4B,
+ 0xB450, 0xB5CE, 0xB451, 0xB5CF, 0xB452, 0x8A4C, 0xB453, 0x8A4D,
+ 0xB454, 0xB5D0, 0xB455, 0x8A4E, 0xB456, 0x8A4F, 0xB457, 0x8A50,
+ 0xB458, 0xB5D1, 0xB459, 0x8A51, 0xB45A, 0x8A52, 0xB45B, 0x8A53,
+ 0xB45C, 0x8A54, 0xB45D, 0x8A55, 0xB45E, 0x8A56, 0xB45F, 0x8A57,
+ 0xB460, 0xB5D2, 0xB461, 0xB5D3, 0xB462, 0x8A58, 0xB463, 0xB5D4,
+ 0xB464, 0x8A59, 0xB465, 0xB5D5, 0xB466, 0x8A5A, 0xB467, 0x8A61,
+ 0xB468, 0x8A62, 0xB469, 0x8A63, 0xB46A, 0x8A64, 0xB46B, 0x8A65,
+ 0xB46C, 0xB5D6, 0xB46D, 0x8A66, 0xB46E, 0x8A67, 0xB46F, 0x8A68,
+ 0xB470, 0x8A69, 0xB471, 0x8A6A, 0xB472, 0x8A6B, 0xB473, 0x8A6C,
+ 0xB474, 0x8A6D, 0xB475, 0x8A6E, 0xB476, 0x8A6F, 0xB477, 0x8A70,
+ 0xB478, 0x8A71, 0xB479, 0x8A72, 0xB47A, 0x8A73, 0xB47B, 0x8A74,
+ 0xB47C, 0x8A75, 0xB47D, 0x8A76, 0xB47E, 0x8A77, 0xB47F, 0x8A78,
+ 0xB480, 0xB5D7, 0xB481, 0x8A79, 0xB482, 0x8A7A, 0xB483, 0x8A81,
+ 0xB484, 0x8A82, 0xB485, 0x8A83, 0xB486, 0x8A84, 0xB487, 0x8A85,
+ 0xB488, 0xB5D8, 0xB489, 0x8A86, 0xB48A, 0x8A87, 0xB48B, 0x8A88,
+ 0xB48C, 0x8A89, 0xB48D, 0x8A8A, 0xB48E, 0x8A8B, 0xB48F, 0x8A8C,
+ 0xB490, 0x8A8D, 0xB491, 0x8A8E, 0xB492, 0x8A8F, 0xB493, 0x8A90,
+ 0xB494, 0x8A91, 0xB495, 0x8A92, 0xB496, 0x8A93, 0xB497, 0x8A94,
+ 0xB498, 0x8A95, 0xB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AFA, 0xB517, 0x8AFB,
+ 0xB518, 0xB5F2, 0xB519, 0x8AFC, 0xB51A, 0x8AFD, 0xB51B, 0xB5F3,
+ 0xB51C, 0xB5F4, 0xB51D, 0x8AFE, 0xB51E, 0x8B41, 0xB51F, 0x8B42,
+ 0xB520, 0x8B43, 0xB521, 0x8B44, 0xB522, 0x8B45, 0xB523, 0x8B46,
+ 0xB524, 0xB5F5, 0xB525, 0xB5F6, 0xB526, 0x8B47, 0xB527, 0xB5F7,
+ 0xB528, 0xB5F8, 0xB529, 0xB5F9, 0xB52A, 0xB5FA, 0xB52B, 0x8B48,
+ 0xB52C, 0x8B49, 0xB52D, 0x8B4A, 0xB52E, 0x8B4B, 0xB52F, 0x8B4C,
+ 0xB530, 0xB5FB, 0xB531, 0xB5FC, 0xB532, 0x8B4D, 0xB533, 0x8B4E,
+ 0xB534, 0xB5FD, 0xB535, 0x8B4F, 0xB536, 0x8B50, 0xB537, 0x8B51,
+ 0xB538, 0xB5FE, 0xB539, 0x8B52, 0xB53A, 0x8B53, 0xB53B, 0x8B54,
+ 0xB53C, 0x8B55, 0xB53D, 0x8B56, 0xB53E, 0x8B57, 0xB53F, 0x8B58,
+ 0xB540, 0xB6A1, 0xB541, 0xB6A2, 0xB542, 0x8B59, 0xB543, 0xB6A3,
+ 0xB544, 0xB6A4, 0xB545, 0xB6A5, 0xB546, 0x8B5A, 0xB547, 0x8B61,
+ 0xB548, 0x8B62, 0xB549, 0x8B63, 0xB54A, 0x8B64, 0xB54B, 0xB6A6,
+ 0xB54C, 0xB6A7, 0xB54D, 0xB6A8, 0xB54E, 0x8B65, 0xB54F, 0x8B66,
+ 0xB550, 0xB6A9, 0xB551, 0x8B67, 0xB552, 0x8B68, 0xB553, 0x8B69,
+ 0xB554, 0xB6AA, 0xB555, 0x8B6A, 0xB556, 0x8B6B, 0xB557, 0x8B6C,
+ 0xB558, 0x8B6D, 0xB559, 0x8B6E, 0xB55A, 0x8B6F, 0xB55B, 0x8B70,
+ 0xB55C, 0xB6AB, 0xB55D, 0xB6AC, 0xB55E, 0x8B71, 0xB55F, 0xB6AD,
+ 0xB560, 0xB6AE, 0xB561, 0xB6AF, 0xB562, 0x8B72, 0xB563, 0x8B73,
+ 0xB564, 0x8B74, 0xB565, 0x8B75, 0xB566, 0x8B76, 0xB567, 0x8B77,
+ 0xB568, 0x8B78, 0xB569, 0x8B79, 0xB56A, 0x8B7A, 0xB56B, 0x8B81,
+ 0xB56C, 0x8B82, 0xB56D, 0x8B83, 0xB56E, 0x8B84, 0xB56F, 0x8B85,
+ 0xB570, 0x8B86, 0xB571, 0x8B87, 0xB572, 0x8B88, 0xB573, 0x8B89,
+ 0xB574, 0x8B8A, 0xB575, 0x8B8B, 0xB576, 0x8B8C, 0xB577, 0x8B8D,
+ 0xB578, 0x8B8E, 0xB579, 0x8B8F, 0xB57A, 0x8B90, 0xB57B, 0x8B91,
+ 0xB57C, 0x8B92, 0xB57D, 0x8B93, 0xB57E, 0x8B94, 0xB57F, 0x8B95,
+ 0xB580, 0x8B96, 0xB581, 0x8B97, 0xB582, 0x8B98, 0xB583, 0x8B99,
+ 0xB584, 0x8B9A, 0xB585, 0x8B9B, 0xB586, 0x8B9C, 0xB587, 0x8B9D,
+ 0xB588, 0x8B9E, 0xB589, 0x8B9F, 0xB58A, 0x8BA0, 0xB58B, 0x8BA1,
+ 0xB58C, 0x8BA2, 0xB58D, 0x8BA3, 0xB58E, 0x8BA4, 0xB58F, 0x8BA5,
+ 0xB590, 0x8BA6, 0xB591, 0x8BA7, 0xB592, 0x8BA8, 0xB593, 0x8BA9,
+ 0xB594, 0x8BAA, 0xB595, 0x8BAB, 0xB596, 0x8BAC, 0xB597, 0x8BAD,
+ 0xB598, 0x8BAE, 0xB599, 0x8BAF, 0xB59A, 0x8BB0, 0xB59B, 0x8BB1,
+ 0xB59C, 0x8BB2, 0xB59D, 0x8BB3, 0xB59E, 0x8BB4, 0xB59F, 0x8BB5,
+ 0xB5A0, 0xB6B0, 0xB5A1,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xB620, 0x8C63, 0xB621, 0x8C64, 0xB622, 0x8C65, 0xB623, 0x8C66,
+ 0xB624, 0x8C67, 0xB625, 0xB6CB, 0xB626, 0x8C68, 0xB627, 0x8C69,
+ 0xB628, 0x8C6A, 0xB629, 0x8C6B, 0xB62A, 0x8C6C, 0xB62B, 0x8C6D,
+ 0xB62C, 0xB6CC, 0xB62D, 0x8C6E, 0xB62E, 0x8C6F, 0xB62F, 0x8C70,
+ 0xB630, 0x8C71, 0xB631, 0x8C72, 0xB632, 0x8C73, 0xB633, 0x8C74,
+ 0xB634, 0xB6CD, 0xB635, 0x8C75, 0xB636, 0x8C76, 0xB637, 0x8C77,
+ 0xB638, 0x8C78, 0xB639, 0x8C79, 0xB63A, 0x8C7A, 0xB63B, 0x8C81,
+ 0xB63C, 0x8C82, 0xB63D, 0x8C83, 0xB63E, 0x8C84, 0xB63F, 0x8C85,
+ 0xB640, 0x8C86, 0xB641, 0x8C87, 0xB642, 0x8C88, 0xB643, 0x8C89,
+ 0xB644, 0x8C8A, 0xB645, 0x8C8B, 0xB646, 0x8C8C, 0xB647, 0x8C8D,
+ 0xB648, 0xB6CE, 0xB649, 0x8C8E, 0xB64A, 0x8C8F, 0xB64B, 0x8C90,
+ 0xB64C, 0x8C91, 0xB64D, 0x8C92, 0xB64E, 0x8C93, 0xB64F, 0x8C94,
+ 0xB650, 0x8C95, 0xB651, 0x8C96, 0xB652, 0x8C97, 0xB653, 0x8C98,
+ 0xB654, 0x8C99, 0xB655, 0x8C9A, 0xB656, 0x8C9B, 0xB657, 0x8C9C,
+ 0xB658, 0x8C9D, 0xB659, 0x8C9E, 0xB65A, 0x8C9F, 0xB65B, 0x8CA0,
+ 0xB65C, 0x8CA1, 0xB65D, 0x8CA2, 0xB65E, 0x8CA3, 0xB65F, 0x8CA4,
+ 0xB660, 0x8CA5, 0xB661, 0x8CA6, 0xB662, 0x8CA7, 0xB663, 0x8CA8,
+ 0xB664, 0xB6CF, 0xB665, 0x8CA9, 0xB666, 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9,
+ 0xB93C, 0xB7F2, 0xB93D, 0xB7F3, 0xB93E, 0x8FEA, 0xB93F, 0x8FEB,
+ 0xB940, 0xB7F4, 0xB941, 0x8FEC, 0xB942, 0x8FED, 0xB943, 0x8FEE,
+ 0xB944, 0xB7F5, 0xB945, 0x8FEF, 0xB946, 0x8FF0, 0xB947, 0x8FF1,
+ 0xB948, 0x8FF2, 0xB949, 0x8FF3, 0xB94A, 0x8FF4, 0xB94B, 0x8FF5,
+ 0xB94C, 0xB7F6, 0xB94D, 0x8FF6, 0xB94E, 0x8FF7, 0xB94F, 0xB7F7,
+ 0xB950, 0x8FF8, 0xB951, 0xB7F8, 0xB952, 0x8FF9, 0xB953, 0x8FFA,
+ 0xB954, 0x8FFB, 0xB955, 0x8FFC, 0xB956, 0x8FFD, 0xB957, 0x8FFE,
+ 0xB958, 0xB7F9, 0xB959, 0xB7FA, 0xB95A, 0x9041, 0xB95B, 0x9042,
+ 0xB95C, 0xB7FB, 0xB95D, 0x9043, 0xB95E, 0x9044, 0xB95F, 0x9045,
+ 0xB960, 0xB7FC, 0xB961, 0x9046, 0xB962, 0x9047, 0xB963, 0x9048,
+ 0xB964, 0x9049, 0xB965, 0x904A, 0xB966, 0x904B, 0xB967, 0x904C,
+ 0xB968, 0xB7FD, 0xB969, 0xB7FE, 0xB96A, 0x904D, 0xB96B, 0xB8A1,
+ 0xB96C, 0x904E, 0xB96D, 0xB8A2, 0xB96E, 0x904F, 0xB96F, 0x9050,
+ 0xB970, 0x9051, 0xB971, 0x9052, 0xB972, 0x9053, 0xB973, 0x9054,
+ 0xB974, 0xB8A3, 0xB975, 0xB8A4, 0xB976, 0x9055, 0xB977, 0x9056,
+ 0xB978, 0xB8A5, 0xB979, 0x9057, 0xB97A, 0x9058, 0xB97B, 0x9059,
+ 0xB97C, 0xB8A6, 0xB97D, 0x905A, 0xB97E, 0x9061, 0xB97F, 0x9062,
+ 0xB980, 0x9063, 0xB981, 0x9064, 0xB982, 0x9065, 0xB983, 0x9066,
+ 0xB984, 0xB8A7, 0xB985, 0xB8A8, 0xB986, 0x9067, 0xB987, 0xB8A9,
+ 0xB988, 0x9068, 0xB989, 0xB8AA, 0xB98A, 0xB8AB, 0xB98B, 0x9069,
+ 0xB98C, 0x906A, 0xB98D, 0xB8AC, 0xB98E, 0xB8AD, 0xB98F, 0x906B,
+ 0xB990, 0x906C, 0xB991, 0x906D, 0xB992, 0x906E, 0xB993, 0x906F,
+ 0xB994, 0x9070, 0xB995, 0x9071, 0xB996, 0x9072, 0xB997, 0x9073,
+ 0xB998, 0x9074, 0xB999, 0x9075, 0xB99A, 0x9076, 0xB99B, 0x9077,
+ 0xB99C, 0x9078, 0xB99D, 0x9079, 0xB99E, 0x907A, 0xB99F, 0x9081,
+ 0xB9A0, 0x9082, 0xB9A1, 0x9083, 0xB9A2, 0x9084, 0xB9A3, 0x9085,
+ 0xB9A4, 0x9086, 0xB9A5, 0x9087, 0xB9A6, 0x9088, 0xB9A7, 0x9089,
+ 0xB9A8, 0x908A, 0xB9A9, 0x908B, 0xB9AA, 0x908C, 0xB9AB, 0x908D,
+ 0xB9AC, 0xB8AE, 0xB9AD, 0xB8AF, 0xB9AE, 0x908E, 0xB9AF, 0x908F,
+ 0xB9B0, 0xB8B0, 0xB9B1, 0x9090, 0xB9B2, 0x9091, 0xB9B3, 0x9092,
+ 0xB9B4, 0xB8B1, 0xB9B5, 0x9093, 0xB9B6, 0x9094, 0xB9B7, 0x9095,
+ 0xB9B8, 0x9096, 0xB9B9, 0x9097, 0xB9BA, 0x9098, 0xB9BB, 0x9099,
+ 0xB9BC, 0xB8B2, 0xB9BD, 0xB8B3, 0xB9BE, 0x909A, 0xB9BF, 0xB8B4,
+ 0xB9C0, 0x909B, 0xB9C1, 0xB8B5, 0xB9C2, 0x909C, 0xB9C3, 0x909D,
+ 0xB9C4, 0x909E, 0xB9C5, 0x909F, 0xB9C6, 0x90A0, 0xB9C7, 0x90A1,
+ 0xB9C8, 0xB8B6, 0xB9C9, 0x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9143, 0xBA4D, 0xB8DB, 0xBA4E, 0xB8DC, 0xBA4F, 0x9144,
+ 0xBA50, 0x9145, 0xBA51, 0x9146, 0xBA52, 0x9147, 0xBA53, 0xB8DD,
+ 0xBA54, 0xB8DE, 0xBA55, 0xB8DF, 0xBA56, 0x9148, 0xBA57, 0x9149,
+ 0xBA58, 0xB8E0, 0xBA59, 0x914A, 0xBA5A, 0x914B, 0xBA5B, 0x914C,
+ 0xBA5C, 0xB8E1, 0xBA5D, 0x914D, 0xBA5E, 0x914E, 0xBA5F, 0x914F,
+ 0xBA60, 0x9150, 0xBA61, 0x9151, 0xBA62, 0x9152, 0xBA63, 0x9153,
+ 0xBA64, 0xB8E2, 0xBA65, 0xB8E3, 0xBA66, 0x9154, 0xBA67, 0xB8E4,
+ 0xBA68, 0xB8E5, 0xBA69, 0xB8E6, 0xBA6A, 0x9155, 0xBA6B, 0x9156,
+ 0xBA6C, 0x9157, 0xBA6D, 0x9158, 0xBA6E, 0x9159, 0xBA6F, 0x915A,
+ 0xBA70, 0xB8E7, 0xBA71, 0xB8E8, 0xBA72, 0x9161, 0xBA73, 0x9162,
+ 0xBA74, 0xB8E9, 0xBA75, 0x9163, 0xBA76, 0x9164, 0xBA77, 0x9165,
+ 0xBA78, 0xB8EA, 0xBA79, 0x9166, 0xBA7A, 0x9167, 0xBA7B, 0x9168,
+ 0xBA7C, 0x9169, 0xBA7D, 0x916A, 0xBA7E, 0x916B, 0xBA7F, 0x916C,
+ 0xBA80, 0x916D, 0xBA81, 0x916E, 0xBA82, 0x916F, 0xBA83, 0xB8EB,
+ 0xBA84, 0xB8EC, 0xBA85, 0xB8ED, 0xBA86, 0x9170, 0xBA87, 0xB8EE,
+ 0xBA88, 0x9171, 0xBA89, 0x9172, 0xBA8A, 0x9173, 0xBA8B, 0x9174,
+ 0xBA8C, 0xB8EF, 0xBA8D, 0x9175, 0xBA8E, 0x9176, 0xBA8F, 0x9177,
+ 0xBA90, 0x9178, 0xBA91, 0x9179, 0xB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
+ 0xBB18, 0xB9A6, 0xBB19, 0x91F2, 0xBB1A, 0x91F3, 0xBB1B, 0x91F4,
+ 0xBB1C, 0xB9A7, 0xBB1D, 0x91F5, 0xBB1E, 0x91F6, 0xBB1F, 0x91F7,
+ 0xBB20, 0xB9A8, 0xBB21, 0x91F8, 0xBB22, 0x91F9, 0xBB23, 0x91FA,
+ 0xBB24, 0x91FB, 0xBB25, 0x91FC, 0xBB26, 0x91FD, 0xBB27, 0x91FE,
+ 0xBB28, 0x9241, 0xBB29, 0xB9A9, 0xBB2A, 0x9242, 0xBB2B, 0xB9AA,
+ 0xBB2C, 0x9243, 0xBB2D, 0x9244, 0xBB2E, 0x9245, 0xBB2F, 0x9246,
+ 0xBB30, 0x9247, 0xBB31, 0x9248, 0xBB32, 0x9249, 0xBB33, 0x924A,
+ 0xBB34, 0xB9AB, 0xBB35, 0xB9AC, 0xBB36, 0xB9AD, 0xBB37, 0x924B,
+ 0xBB38, 0xB9AE, 0xBB39, 0x924C, 0xBB3A, 0x924D, 0xBB3B, 0xB9AF,
+ 0xBB3C, 0xB9B0, 0xBB3D, 0xB9B1, 0xBB3E, 0xB9B2, 0xBB3F, 0x924E,
+ 0xBB40, 0x924F, 0xBB41, 0x9250, 0xBB42, 0x9251, 0xBB43, 0x9252,
+ 0xBB44, 0xB9B3, 0xBB45, 0xB9B4, 0xBB46, 0x9253, 0xBB47, 0xB9B5,
+ 0xBB48, 0x9254, 0xBB49, 0xB9B6, 0xBB4A, 0x9255, 0xBB4B, 0x9256,
+ 0xBB4C, 0x9257, 0xBB4D, 0xB9B7, 0xBB4E, 0x9258, 0xBB4F, 0xB9B8,
+ 0xBB50, 0xB9B9, 0xBB51, 0x9259, 0xBB52, 0x925A, 0xBB53, 0x9261,
+ 0xBB54, 0xB9BA, 0xBB55, 0x9262, 0xBB56, 0x9263, 0xBB57, 0x9264,
+ 0xBB58, 0xB9BB, 0xBB59, 0x9265, 0xBB5A, 0x9266, 0xBB5B, 0x9267,
+ 0xBB5C, 0x9268, 0xBB5D, 0x9269, 0xBB5E, 0x926A, 0xBB5F, 0x926B,
+ 0xBB60, 0x926C, 0xBB61, 0xB9BC, 0xBB62, 0x926D, 0xBB63, 0xB9BD,
+ 0xBB64, 0x926E, 0xBB65, 0x926F, 0xBB66, 0x9270, 0xBB67, 0x9271,
+ 0xBB68, 0x9272, 0xBB69, 0x9273, 0xBB6A, 0x9274, 0xBB6B, 0x9275,
+ 0xBB6C, 0xB9BE, 0xBB6D, 0x9276, 0xBB6E, 0x9277, 0xBB6F, 0x9278,
+ 0xBB70, 0x9279, 0xBB71, 0x927A, 0xBB72, 0x9281, 0xBB73, 0x9282,
+ 0xBB74, 0x9283, 0xBB75, 0x9284, 0xBB76, 0x9285, 0xBB77, 0x9286,
+ 0xBB78, 0x9287, 0xBB79, 0x9288, 0xBB7A, 0x9289, 0xBB7B, 0x928A,
+ 0xBB7C, 0x928B, 0xBB7D, 0x928C, 0xBB7E, 0x928D, 0xBB7F, 0x928E,
+ 0xBB80, 0x928F, 0xBB81, 0x9290, 0xBB82, 0x9291, 0xBB83, 0x9292,
+ 0xBB84, 0x9293, 0xBB85, 0x9294, 0xBB86, 0x9295, 0xBB87, 0x9296,
+ 0xBB88, 0xB9BF, 0xBB89, 0x9297, 0xBB8A, 0x9298, 0xBB8B, 0x9299,
+ 0xBB8C, 0xB9C0, 0xBB8D, 0x929A, 0xBB8E, 0x929B, 0xBB8F, 0x929C,
+ 0xBB90, 0xB9C1, 0xBB91, 0x929D, 0xBB92, 0x929E, 0xBB93, 0x929F,
+ 0xBB94, 0x92A0, 0xBB95, 0x92A1, 0xBB96, 0x92A2, 0xBB97, 0x92A3,
+ 0xBB98, 0x92A4, 0xBB99, 0x92A5, 0xBB9A, 0x92A6, 0xBB9B, 0x92A7,
+ 0xBB9C, 0x92A8, 0xBB9D, 0x92A9, 0xBB9E, 0x92AA, 0xBB9F, 0x92AB,
+ 0xBBA0, 0x92AC, 0xBBA1, 0x92AD, 0xBBA2, 0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xBC25, 0xB9E4, 0xBC26, 0x9351, 0xBC27, 0xB9E5,
+ 0xBC28, 0x9352, 0xBC29, 0xB9E6, 0xBC2A, 0x9353, 0xBC2B, 0x9354,
+ 0xBC2C, 0x9355, 0xBC2D, 0xB9E7, 0xBC2E, 0x9356, 0xBC2F, 0x9357,
+ 0xBC30, 0xB9E8, 0xBC31, 0xB9E9, 0xBC32, 0x9358, 0xBC33, 0x9359,
+ 0xBC34, 0xB9EA, 0xBC35, 0x935A, 0xBC36, 0x9361, 0xBC37, 0x9362,
+ 0xBC38, 0xB9EB, 0xBC39, 0x9363, 0xBC3A, 0x9364, 0xBC3B, 0x9365,
+ 0xBC3C, 0x9366, 0xBC3D, 0x9367, 0xBC3E, 0x9368, 0xBC3F, 0x9369,
+ 0xBC40, 0xB9EC, 0xBC41, 0xB9ED, 0xBC42, 0x936A, 0xBC43, 0xB9EE,
+ 0xBC44, 0xB9EF, 0xBC45, 0xB9F0, 0xBC46, 0x936B, 0xBC47, 0x936C,
+ 0xBC48, 0x936D, 0xBC49, 0xB9F1, 0xBC4A, 0x936E, 0xBC4B, 0x936F,
+ 0xBC4C, 0xB9F2, 0xBC4D, 0xB9F3, 0xBC4E, 0x9370, 0xBC4F, 0x9371,
+ 0xBC50, 0xB9F4, 0xBC51, 0x9372, 0xBC52, 0x9373, 0xBC53, 0x9374,
+ 0xBC54, 0x9375, 0xBC55, 0x9376, 0xBC56, 0x9377, 0xBC57, 0x9378,
+ 0xBC58, 0x9379, 0xBC59, 0x937A, 0xBC5A, 0x9381, 0xBC5B, 0x9382,
+ 0xBC5C, 0x9383, 0xBC5D, 0xB9F5, 0xBC5E, 0x9384, 0xBC5F, 0x9385,
+ 0xBC60, 0x9386, 0xBC61, 0x9387, 0xBC62, 0x9388, 0xBC63, 0x9389,
+ 0xBC64, 0x938A, 0xBC65, 0x938B, 0xBC66, 0x938C, 0xBC67, 0x938D,
+ 0xBC68, 0x938E, 0xBC69, 0x938F, 0xBC6A, 0x9390, 0xB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xBCEE, 0x93F4, 0xBCEF, 0x93F5,
+ 0xBCF0, 0x93F6, 0xBCF1, 0x93F7, 0xBCF2, 0x93F8, 0xBCF3, 0x93F9,
+ 0xBCF4, 0xBAB8, 0xBCF5, 0xBAB9, 0xBCF6, 0xBABA, 0xBCF7, 0x93FA,
+ 0xBCF8, 0xBABB, 0xBCF9, 0x93FB, 0xBCFA, 0x93FC, 0xBCFB, 0x93FD,
+ 0xBCFC, 0xBABC, 0xBCFD, 0x93FE, 0xBCFE, 0x9441, 0xBCFF, 0x9442,
+ 0xBD00, 0x9443, 0xBD01, 0x9444, 0xBD02, 0x9445, 0xBD03, 0x9446,
+ 0xBD04, 0xBABD, 0xBD05, 0xBABE, 0xBD06, 0x9447, 0xBD07, 0xBABF,
+ 0xBD08, 0x9448, 0xBD09, 0xBAC0, 0xBD0A, 0x9449, 0xBD0B, 0x944A,
+ 0xBD0C, 0x944B, 0xBD0D, 0x944C, 0xBD0E, 0x944D, 0xBD0F, 0x944E,
+ 0xBD10, 0xBAC1, 0xBD11, 0x944F, 0xBD12, 0x9450, 0xBD13, 0x9451,
+ 0xBD14, 0xBAC2, 0xBD15, 0x9452, 0xBD16, 0x9453, 0xBD17, 0x9454,
+ 0xBD18, 0x9455, 0xBD19, 0x9456, 0xBD1A, 0x9457, 0xBD1B, 0x9458,
+ 0xBD1C, 0x9459, 0xBD1D, 0x945A, 0xBD1E, 0x9461, 0xBD1F, 0x9462,
+ 0xBD20, 0x9463, 0xBD21, 0x9464, 0xBD22, 0x9465, 0xBD23, 0x9466,
+ 0xBD24, 0xBAC3, 0xBD25, 0x9467, 0xBD26, 0x9468, 0xBD27, 0x9469,
+ 0xBD28, 0x946A, 0xBD29, 0x946B, 0xBD2A, 0x946C, 0xBD2B, 0x946D,
+ 0xBD2C, 0xBAC4, 0xBD2D, 0x946E, 0xBD2E, 0x946F, 0xBD2F, 0x9470,
+ 0xBD30, 0x9471, 0xBD31, 0x9472, 0xBD32, 0x9473, 0xBD33, 0x9474,
+ 0xBD34, 0x9475, 0xBD35, 0x9476, 0xBD36, 0x9477, 0xBD37, 0x9478,
+ 0xBD38, 0x9479, 0xBD39, 0x947A, 0xBD3A, 0x9481, 0xBD3B, 0x9482,
+ 0xBD3C, 0x9483, 0xBD3D, 0x9484, 0xBD3E, 0x9485, 0xBD3F, 0x9486,
+ 0xBD40, 0xBAC5, 0xBD41, 0x9487, 0xBD42, 0x9488, 0xBD43, 0x9489,
+ 0xBD44, 0x948A, 0xBD45, 0x948B, 0xBD46, 0x948C, 0xBD47, 0x948D,
+ 0xBD48, 0xBAC6, 0xBD49, 0xBAC7, 0xBD4A, 0x948E, 0xBD4B, 0x948F,
+ 0xBD4C, 0xBAC8, 0xBD4D, 0x9490, 0xBD4E, 0x9491, 0xBD4F, 0x9492,
+ 0xBD50, 0xBAC9, 0xBD51, 0x9493, 0xBD52, 0x9494, 0xBD53, 0x9495,
+ 0xBD54, 0x9496, 0xBD55, 0x9497, 0xBD56, 0x9498, 0xBD57, 0x9499,
+ 0xBD58, 0xBACA, 0xBD59, 0xBACB, 0xBD5A, 0x949A, 0xBD5B, 0x949B,
+ 0xBD5C, 0x949C, 0xBD5D, 0x949D, 0xBD5E, 0x949E, 0xBD5F, 0x949F,
+ 0xBD60, 0x94A0, 0xBD61, 0x94A1, 0xBD62, 0x94A2, 0xBD63, 0x94A3,
+ 0xBD64, 0xBACC, 0xBD65, 0x94A4, 0xBD66, 0x94A5, 0xBD67, 0x94A6,
+ 0xBD68, 0xBACD, 0xBD69, 0x94A7, 0xBD6A, 0x94A8, 0xBD6B, 0x94A9,
+ 0xBD6C, 0x94AA, 0xBD6D, 0x94AB, 0xBD6E, 0x94AC, 0xBD6F, 0x94AD,
+ 0xBD70, 0x94AE, 0xBD71, 0x94AF, 0xBD72, 0x94B0, 0xBD73, 0x94B1,
+ 0xBD74, 0x94B2, 0xBD75, 0x94B3, 0xBD76, 0x94B4, 0xBD77, 0x94B5,
+ 0xBD78, 0x94B6, 0xBD79, 0x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FE, 0x956B, 0xBDFF, 0x956C,
+ 0xBE00, 0xBAE7, 0xBE01, 0x956D, 0xBE02, 0x956E, 0xBE03, 0xBAE8,
+ 0xBE04, 0x956F, 0xBE05, 0xBAE9, 0xBE06, 0x9570, 0xBE07, 0x9571,
+ 0xBE08, 0x9572, 0xBE09, 0x9573, 0xBE0A, 0x9574, 0xBE0B, 0x9575,
+ 0xBE0C, 0xBAEA, 0xBE0D, 0xBAEB, 0xBE0E, 0x9576, 0xBE0F, 0x9577,
+ 0xBE10, 0xBAEC, 0xBE11, 0x9578, 0xBE12, 0x9579, 0xBE13, 0x957A,
+ 0xBE14, 0xBAED, 0xBE15, 0x9581, 0xBE16, 0x9582, 0xBE17, 0x9583,
+ 0xBE18, 0x9584, 0xBE19, 0x9585, 0xBE1A, 0x9586, 0xBE1B, 0x9587,
+ 0xBE1C, 0xBAEE, 0xBE1D, 0xBAEF, 0xBE1E, 0x9588, 0xBE1F, 0xBAF0,
+ 0xBE20, 0x9589, 0xBE21, 0x958A, 0xBE22, 0x958B, 0xBE23, 0x958C,
+ 0xBE24, 0x958D, 0xBE25, 0x958E, 0xBE26, 0x958F, 0xBE27, 0x9590,
+ 0xBE28, 0x9591, 0xBE29, 0x9592, 0xBE2A, 0x9593, 0xBE2B, 0x9594,
+ 0xBE2C, 0x9595, 0xBE2D, 0x9596, 0xBE2E, 0x9597, 0xBE2F, 0x9598,
+ 0xBE30, 0x9599, 0xBE31, 0x959A, 0xBE32, 0x959B, 0xBE33, 0x959C,
+ 0xBE34, 0x959D, 0xBE35, 0x959E, 0xBE36, 0x959F, 0xBE37, 0x95A0,
+ 0xBE38, 0x95A1, 0xBE39, 0x95A2, 0xBE3A, 0x95A3, 0xBE3B, 0x95A4,
+ 0xBE3C, 0x95A5, 0xBE3D, 0x95A6, 0xBE3E, 0x95A7, 0xBE3F, 0x95A8,
+ 0xBE40, 0x95A9, 0xBE41, 0x95AA, 0xBE42, 0x95AB, 0xBE43, 0x95AC,
+ 0xBE44,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 0xBEC9, 0x9652, 0xBECA, 0x9653, 0xBECB, 0x9654,
+ 0xBECC, 0x9655, 0xBECD, 0x9656, 0xBECE, 0x9657, 0xBECF, 0x9658,
+ 0xBED0, 0xBBB5, 0xBED1, 0xBBB6, 0xBED2, 0x9659, 0xBED3, 0x965A,
+ 0xBED4, 0xBBB7, 0xBED5, 0x9661, 0xBED6, 0x9662, 0xBED7, 0xBBB8,
+ 0xBED8, 0xBBB9, 0xBED9, 0x9663, 0xBEDA, 0x9664, 0xBEDB, 0x9665,
+ 0xBEDC, 0x9666, 0xBEDD, 0x9667, 0xBEDE, 0x9668, 0xBEDF, 0x9669,
+ 0xBEE0, 0xBBBA, 0xBEE1, 0x966A, 0xBEE2, 0x966B, 0xBEE3, 0xBBBB,
+ 0xBEE4, 0xBBBC, 0xBEE5, 0xBBBD, 0xBEE6, 0x966C, 0xBEE7, 0x966D,
+ 0xBEE8, 0x966E, 0xBEE9, 0x966F, 0xBEEA, 0x9670, 0xBEEB, 0x9671,
+ 0xBEEC, 0xBBBE, 0xBEED, 0x9672, 0xBEEE, 0x9673, 0xBEEF, 0x9674,
+ 0xBEF0, 0x9675, 0xBEF1, 0x9676, 0xBEF2, 0x9677, 0xBEF3, 0x9678,
+ 0xBEF4, 0x9679, 0xBEF5, 0x967A, 0xBEF6, 0x9681, 0xBEF7, 0x9682,
+ 0xBEF8, 0x9683, 0xBEF9, 0x9684, 0xBEFA, 0x9685, 0xBEFB, 0x9686,
+ 0xBEFC, 0x9687, 0xBEFD, 0x9688, 0xBEFE, 0x9689, 0xBEFF, 0x968A,
+ 0xBF00, 0x968B, 0xBF01, 0xBBBF, 0xBF02, 0x968C, 0xBF03, 0x968D,
+ 0xBF04, 0x968E, 0xBF05, 0x968F, 0xBF06, 0x9690, 0xBF07, 0x9691,
+ 0xBF08, 0xBBC0, 0xBF09, 0xBBC1, 0xBF0A, 0x9692, 0xBF0B, 0x9693,
+ 0xBF0C, 0x9694, 0xBF0D, 0x9695, 0xBF0E,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xBF52, 0x96CF, 0xBF53, 0x96D0,
+ 0xBF54, 0x96D1, 0xBF55, 0xBBCD, 0xBF56, 0x96D2, 0xBF57, 0x96D3,
+ 0xBF58, 0x96D4, 0xBF59, 0x96D5, 0xBF5A, 0x96D6, 0xBF5B, 0x96D7,
+ 0xBF5C, 0x96D8, 0xBF5D, 0x96D9, 0xBF5E, 0x96DA, 0xBF5F, 0x96DB,
+ 0xBF60, 0x96DC, 0xBF61, 0x96DD, 0xBF62, 0x96DE, 0xBF63, 0x96DF,
+ 0xBF64, 0x96E0, 0xBF65, 0x96E1, 0xBF66, 0x96E2, 0xBF67, 0x96E3,
+ 0xBF68, 0x96E4, 0xBF69, 0x96E5, 0xBF6A, 0x96E6, 0xBF6B, 0x96E7,
+ 0xBF6C, 0x96E8, 0xBF6D, 0x96E9, 0xBF6E, 0x96EA, 0xBF6F, 0x96EB,
+ 0xBF70, 0x96EC, 0xBF71, 0x96ED, 0xBF72, 0x96EE, 0xBF73, 0x96EF,
+ 0xBF74, 0x96F0, 0xBF75, 0x96F1, 0xBF76, 0x96F2, 0xBF77, 0x96F3,
+ 0xBF78, 0x96F4, 0xBF79, 0x96F5, 0xBF7A, 0x96F6, 0xBF7B, 0x96F7,
+ 0xBF7C, 0x96F8, 0xBF7D, 0x96F9, 0xBF7E, 0x96FA, 0xBF7F, 0x96FB,
+ 0xBF80, 0x96FC, 0xBF81, 0x96FD, 0xBF82, 0x96FE, 0xBF83, 0x9741,
+ 0xBF84, 0x9742, 0xBF85, 0x9743, 0xBF86, 0x9744, 0xBF87, 0x9745,
+ 0xBF88, 0x9746, 0xBF89, 0x9747, 0xBF8A, 0x9748, 0xBF8B, 0x9749,
+ 0xBF8C, 0x974A, 0xBF8D, 0x974B, 0xBF8E, 0x974C, 0xBF8F, 0x974D,
+ 0xBF90, 0x974E, 0xBF91, 0x974F, 0xBF92, 0x9750, 0xBF93, 0x9751,
+ 0xBF94, 0xBBCE, 0xBF95, 0x9752, 0xBF96, 0x9753, 0xBF97, 0x9754,
+ 0xBF98, 0x9755, 0xBF99, 0x9756, 0xBF9A, 0x9757, 0xBF9B, 0x9758,
+ 0xBF9C, 0x9759, 0xBF9D, 0x975A, 0xBF9E, 0x9761, 0xBF9F, 0x9762,
+ 0xBFA0, 0x9763, 0xBFA1, 0x9764, 0xBFA2, 0x9765, 0xBFA3, 0x9766,
+ 0xBFA4, 0x9767, 0xBFA5, 0x9768, 0xBFA6, 0x9769, 0xBFA7, 0x976A,
+ 0xBFA8, 0x976B, 0xBFA9, 0x976C, 0xBFAA, 0x976D, 0xBFAB, 0x976E,
+ 0xBFAC, 0x976F, 0xBFAD, 0x9770, 0xBFAE, 0x9771, 0xBFAF, 0x9772,
+ 0xBFB0, 0xBBCF, 0xBFB1, 0x9773, 0xBFB2, 0x9774, 0xBFB3, 0x9775,
+ 0xBFB4, 0x9776, 0xBFB5, 0x9777, 0xBFB6, 0x9778, 0xBFB7, 0x9779,
+ 0xBFB8, 0x977A, 0xBFB9, 0x9781, 0xBFBA, 0x9782, 0xBFBB, 0x9783,
+ 0xBFBC, 0x9784, 0xBFBD, 0x9785, 0xBFBE, 0x9786, 0xBFBF, 0x9787,
+ 0xBFC0, 0x9788, 0xBFC1, 0x9789, 0xBFC2, 0x978A, 0xBFC3, 0x978B,
+ 0xBFC4, 0x978C, 0xBFC5, 0xBBD0, 0xBFC6, 0x978D, 0xBFC7, 0x978E,
+ 0xBFC8, 0x978F, 0xBFC9, 0x9790, 0xBFCA, 0x9791, 0xBFCB, 0x9792,
+ 0xBFCC, 0xBBD1, 0xBFCD, 0xBBD2, 0xBFCE, 0x9793, 0xBFCF, 0x9794,
+ 0xBFD0, 0xBBD3, 0xBFD1, 0x9795, 0xBFD2, 0x9796, 0xBFD3, 0x9797,
+ 0xBFD4, 0xBBD4, 0xBFD5, 0x9798, 0xBFD6, 0x9799, 0xBFD7, 0x979A,
+ 0xBFD8, 0x979B, 0xBFD9, 0x979C, 0xBFDA, 0x979D, 0xBFDB, 0x979E,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0xC020, 0x97E0, 0xC021, 0x97E1, 0xC022, 0x97E2, 0xC023, 0x97E3,
+ 0xC024, 0x97E4, 0xC025, 0x97E5, 0xC026, 0x97E6, 0xC027, 0x97E7,
+ 0xC028, 0x97E8, 0xC029, 0x97E9, 0xC02A, 0x97EA, 0xC02B, 0x97EB,
+ 0xC02C, 0x97EC, 0xC02D, 0x97ED, 0xC02E, 0x97EE, 0xC02F, 0x97EF,
+ 0xC030, 0x97F0, 0xC031, 0x97F1, 0xC032, 0x97F2, 0xC033, 0x97F3,
+ 0xC034, 0x97F4, 0xC035, 0x97F5, 0xC036, 0x97F6, 0xC037, 0x97F7,
+ 0xC038, 0x97F8, 0xC039, 0x97F9, 0xC03A, 0x97FA, 0xC03B, 0x97FB,
+ 0xC03C, 0xBBD8, 0xC03D, 0x97FC, 0xC03E, 0x97FD, 0xC03F, 0x97FE,
+ 0xC040, 0x9841, 0xC041, 0x9842, 0xC042, 0x9843, 0xC043, 0x9844,
+ 0xC044, 0x9845, 0xC045, 0x9846, 0xC046, 0x9847, 0xC047, 0x9848,
+ 0xC048, 0x9849, 0xC049, 0x984A, 0xC04A, 0x984B, 0xC04B, 0x984C,
+ 0xC04C, 0x984D, 0xC04D, 0x984E, 0xC04E, 0x984F, 0xC04F, 0x9850,
+ 0xC050, 0x9851, 0xC051, 0xBBD9, 0xC052, 0x9852, 0xC053, 0x9853,
+ 0xC054, 0x9854, 0xC055, 0x9855, 0xC056, 0x9856, 0xC057, 0x9857,
+ 0xC058, 0xBBDA, 0xC059, 0x9858, 0xC05A, 0x9859, 0xC05B, 0x985A,
+ 0xC05C, 0xBBDB, 0xC05D, 0x9861, 0xC05E, 0x9862, 0xC05F, 0x9863,
+ 0xC060, 0xBBDC, 0xC061, 0x9864, 0xC062, 0x9865, 0xC063, 0x9866,
+ 0xC064, 0x9867, 0xC065, 0x9868, 0xC066, 0x9869, 0xC067, 0x986A,
+ 0xC068, 0xBBDD, 0xC069, 0xBBDE, 0xC06A, 0x986B, 0xC06B, 0x986C,
+ 0xC06C, 0x986D, 0xC06D, 0x986E, 0xC06E, 0x986F, 0xC06F, 0x9870,
+ 0xC070, 0x9871, 0xC071, 0x9872, 0xC072, 0x9873, 0xC073, 0x9874,
+ 0xC074, 0x9875, 0xC075, 0x9876, 0xC076, 0x9877, 0xC077, 0x9878,
+ 0xC078, 0x9879, 0xC079, 0x987A, 0xC07A, 0x9881, 0xC07B, 0x9882,
+ 0xC07C, 0x9883, 0xC07D, 0x9884, 0xC07E, 0x9885, 0xC07F, 0x9886,
+ 0xC080, 0x9887, 0xC081, 0x9888, 0xC082, 0x9889, 0xC083, 0x988A,
+ 0xC084, 0x988B, 0xC085, 0x988C, 0xC086, 0x988D, 0xC087, 0x988E,
+ 0xC088, 0x988F, 0xC089, 0x9890, 0xC08A, 0x9891, 0xC08B, 0x9892,
+ 0xC08C, 0x9893, 0xC08D, 0x9894, 0xC08E, 0x9895, 0xC08F, 0x9896,
+ 0xC090, 0xBBDF, 0xC091, 0xBBE0, 0xC092, 0x9897, 0xC093, 0x9898,
+ 0xC094, 0xBBE1, 0xC095, 0x9899, 0xC096, 0x989A, 0xC097, 0x989B,
+ 0xC098, 0xBBE2, 0xC099, 0x989C, 0xC09A, 0x989D, 0xC09B, 0x989E,
+ 0xC09C, 0x989F, 0xC09D, 0x98A0, 0xC09E, 0x98A1, 0xC09F, 0x98A2,
+ 0xC0A0, 0xBBE3, 0xC0A1, 0xBBE4, 0xC0A2, 0x98A3, 0xC0A3, 0xBBE5,
+ 0xC0A4, 0x98A4, 0xC0A5, 0xBBE6, 0xC0A6, 0x98A5, 0xC0A7, 0x98A6,
+ 0xC0A8, 0x98A7, 0xC0A9, 0x98A8, 0xC0AA, 0x98A9, 0xC0AB, 0x98AA,
+ 0xC0AC, 0xBBE7, 0xC0AD, 0xBBE8, 0xC0AE, 0x98AB, 0xC0AF, 0xBBE9,
+ 0xC0B0, 0xBBEA, 0xC0B1, 0x98AC, 0xC0B2, 0x98AD, 0xC0B3,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xC0F3, 0x98D7,
+ 0xC0F4, 0xBCA4, 0xC0F5, 0xBCA5, 0xC0F6, 0x98D8, 0xC0F7, 0xBCA6,
+ 0xC0F8, 0x98D9, 0xC0F9, 0xBCA7, 0xC0FA, 0x98DA, 0xC0FB, 0x98DB,
+ 0xC0FC, 0x98DC, 0xC0FD, 0x98DD, 0xC0FE, 0x98DE, 0xC0FF, 0x98DF,
+ 0xC100, 0xBCA8, 0xC101, 0x98E0, 0xC102, 0x98E1, 0xC103, 0x98E2,
+ 0xC104, 0xBCA9, 0xC105, 0x98E3, 0xC106, 0x98E4, 0xC107, 0x98E5,
+ 0xC108, 0xBCAA, 0xC109, 0x98E6, 0xC10A, 0x98E7, 0xC10B, 0x98E8,
+ 0xC10C, 0x98E9, 0xC10D, 0x98EA, 0xC10E, 0x98EB, 0xC10F, 0x98EC,
+ 0xC110, 0xBCAB, 0xC111, 0x98ED, 0xC112, 0x98EE, 0xC113, 0x98EF,
+ 0xC114, 0x98F0, 0xC115, 0xBCAC, 0xC116, 0x98F1, 0xC117, 0x98F2,
+ 0xC118, 0x98F3, 0xC119, 0x98F4, 0xC11A, 0x98F5, 0xC11B, 0x98F6,
+ 0xC11C, 0xBCAD, 0xC11D, 0xBCAE, 0xC11E, 0xBCAF, 0xC11F, 0xBCB0,
+ 0xC120, 0xBCB1, 0xC121, 0x98F7, 0xC122, 0x98F8, 0xC123, 0xBCB2,
+ 0xC124, 0xBCB3, 0xC125, 0x98F9, 0xC126, 0xBCB4, 0xC127, 0xBCB5,
+ 0xC128, 0x98FA, 0xC129, 0x98FB, 0xC12A, 0x98FC, 0xC12B, 0x98FD,
+ 0xC12C, 0xBCB6, 0xC12D, 0xBCB7, 0xC12E, 0x98FE, 0xC12F, 0xBCB8,
+ 0xC130, 0xBCB9, 0xC131, 0xBCBA, 0xC132, 0x9941, 0xC133, 0x9942,
+ 0xC134, 0x9943, 0xC135, 0x9944, 0xC136, 0xBCBB, 0xC137, 0x9945,
+ 0xC138, 0xBCBC, 0xC139, 0xBCBD, 0xC13A, 0x9946, 0xC13B, 0x9947,
+ 0xC13C, 0xBCBE, 0xC13D, 0x9948, 0xC13E, 0x9949, 0xC13F, 0x994A,
+ 0xC140, 0xBCBF, 0xC141, 0x994B, 0xC142, 0x994C, 0xC143, 0x994D,
+ 0xC144, 0x994E, 0xC145, 0x994F, 0xC146, 0x9950, 0xC147, 0x9951,
+ 0xC148, 0xBCC0, 0xC149, 0xBCC1, 0xC14A, 0x9952, 0xC14B, 0xBCC2,
+ 0xC14C, 0xBCC3, 0xC14D, 0xBCC4, 0xC14E, 0x9953, 0xC14F, 0x9954,
+ 0xC150, 0x9955, 0xC151, 0x9956, 0xC152, 0x9957, 0xC153, 0x9958,
+ 0xC154, 0xBCC5, 0xC155, 0xBCC6, 0xC156, 0x9959, 0xC157, 0x995A,
+ 0xC158, 0xBCC7, 0xC159, 0x9961, 0xC15A, 0x9962, 0xC15B, 0x9963,
+ 0xC15C, 0xBCC8, 0xC15D, 0x9964, 0xC15E, 0x9965, 0xC15F, 0x9966,
+ 0xC160, 0x9967, 0xC161, 0x9968, 0xC162, 0x9969, 0xC163, 0x996A,
+ 0xC164, 0xBCC9, 0xC165, 0xBCCA, 0xC166, 0x996B, 0xC167, 0xBCCB,
+ 0xC168, 0xBCCC, 0xC169, 0xBCCD, 0xC16A, 0x996C, 0xC16B, 0x996D,
+ 0xC16C, 0x996E, 0xC16D, 0x996F, 0xC16E, 0x9970, 0xC16F, 0x9971,
+ 0xC170, 0xBCCE, 0xC171, 0x9972, 0xC172, 0x9973, 0xC173, 0x9974,
+ 0xC174, 0xBCCF, 0xC175, 0x9975, 0xC176, 0x9976, 0xC177, 0x9977,
+ 0xC178, 0xBCD0, 0xC179, 0x9978, 0xC17A, 0x9979, 0xC17B, 0x997A,
+ 0xC17C, 0x9981, 0xC17D, 0x9982, 0xC17E, 0x9983, 0xC17F, 0x9984,
+ 0xC180, 0x9985, 0xC181, 0x9986, 0xC182, 0x9987, 0xC183, 0x9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xC209, 0x99ED, 0xC20A, 0x99EE, 0xC20B, 0x99EF,
+ 0xC20C, 0xBCF2, 0xC20D, 0xBCF3, 0xC20E, 0x99F0, 0xC20F, 0xBCF4,
+ 0xC210, 0x99F1, 0xC211, 0xBCF5, 0xC212, 0x99F2, 0xC213, 0x99F3,
+ 0xC214, 0x99F4, 0xC215, 0x99F5, 0xC216, 0x99F6, 0xC217, 0x99F7,
+ 0xC218, 0xBCF6, 0xC219, 0xBCF7, 0xC21A, 0x99F8, 0xC21B, 0x99F9,
+ 0xC21C, 0xBCF8, 0xC21D, 0x99FA, 0xC21E, 0x99FB, 0xC21F, 0xBCF9,
+ 0xC220, 0xBCFA, 0xC221, 0x99FC, 0xC222, 0x99FD, 0xC223, 0x99FE,
+ 0xC224, 0x9A41, 0xC225, 0x9A42, 0xC226, 0x9A43, 0xC227, 0x9A44,
+ 0xC228, 0xBCFB, 0xC229, 0xBCFC, 0xC22A, 0x9A45, 0xC22B, 0xBCFD,
+ 0xC22C, 0x9A46, 0xC22D, 0xBCFE, 0xC22E, 0x9A47, 0xC22F, 0xBDA1,
+ 0xC230, 0x9A48, 0xC231, 0xBDA2, 0xC232, 0xBDA3, 0xC233, 0x9A49,
+ 0xC234, 0xBDA4, 0xC235, 0x9A4A, 0xC236, 0x9A4B, 0xC237, 0x9A4C,
+ 0xC238, 0x9A4D, 0xC239, 0x9A4E, 0xC23A, 0x9A4F, 0xC23B, 0x9A50,
+ 0xC23C, 0x9A51, 0xC23D, 0x9A52, 0xC23E, 0x9A53, 0xC23F, 0x9A54,
+ 0xC240, 0x9A55, 0xC241, 0x9A56, 0xC242, 0x9A57, 0xC243, 0x9A58,
+ 0xC244, 0x9A59, 0xC245, 0x9A5A, 0xC246, 0x9A61, 0xC247, 0x9A62,
+ 0xC248, 0xBDA5, 0xC249, 0x9A63, 0xC24A, 0x9A64, 0xC24B, 0x9A65,
+ 0xC24C, 0x9A66, 0xC24D, 0x9A67, 0xC24E, 0x9A68, 0xC24F, 0x9A69,
+ 0xC250, 0xBDA6, 0xC251, 0xBDA7, 0xC252, 0x9A6A, 0xC253, 0x9A6B,
+ 0xC254, 0xBDA8, 0xC255, 0x9A6C, 0xC256, 0x9A6D, 0xC257, 0x9A6E,
+ 0xC258, 0xBDA9, 0xC259, 0x9A6F, 0xC25A, 0x9A70, 0xC25B, 0x9A71,
+ 0xC25C, 0x9A72, 0xC25D, 0x9A73, 0xC25E, 0x9A74, 0xC25F, 0x9A75,
+ 0xC260, 0xBDAA, 0xC261, 0x9A76, 0xC262, 0x9A77, 0xC263, 0x9A78,
+ 0xC264, 0x9A79, 0xC265, 0xBDAB, 0xC266, 0x9A7A, 0xC267, 0x9A81,
+ 0xC268, 0x9A82, 0xC269, 0x9A83, 0xC26A, 0x9A84, 0xC26B, 0x9A85,
+ 0xC26C, 0xBDAC, 0xC26D, 0xBDAD, 0xC26E, 0x9A86, 0xC26F, 0x9A87,
+ 0xC270, 0xBDAE, 0xC271, 0x9A88, 0xC272, 0x9A89, 0xC273, 0x9A8A,
+ 0xC274, 0xBDAF, 0xC275, 0x9A8B, 0xC276, 0x9A8C, 0xC277, 0x9A8D,
+ 0xC278, 0x9A8E, 0xC279, 0x9A8F, 0xC27A, 0x9A90, 0xC27B, 0x9A91,
+ 0xC27C, 0xBDB0, 0xC27D, 0xBDB1, 0xC27E, 0x9A92, 0xC27F, 0xBDB2,
+ 0xC280, 0x9A93, 0xC281, 0xBDB3, 0xC282, 0x9A94, 0xC283, 0x9A95,
+ 0xC284, 0x9A96, 0xC285, 0x9A97, 0xC286, 0x9A98, 0xC287, 0x9A99,
+ 0xC288, 0xBDB4, 0xC289, 0xBDB5, 0xC28A, 0x9A9A, 0xC28B, 0x9A9B,
+ 0xC28C, 0x9A9C, 0xC28D, 0x9A9D, 0xC28E, 0x9A9E, 0xC28F, 0x9A9F,
+ 0xC290, 0xBDB6, 0xC291, 0x9AA0, 0xC292, 0x9AA1, 0xC293, 0x9AA2,
+ 0xC294, 0x9AA3, 0xC295,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B43, 0xC313, 0xBDD7,
+ 0xC314, 0xBDD8, 0xC315, 0xBDD9, 0xC316, 0x9B44, 0xC317, 0x9B45,
+ 0xC318, 0xBDDA, 0xC319, 0x9B46, 0xC31A, 0x9B47, 0xC31B, 0x9B48,
+ 0xC31C, 0xBDDB, 0xC31D, 0x9B49, 0xC31E, 0x9B4A, 0xC31F, 0x9B4B,
+ 0xC320, 0x9B4C, 0xC321, 0x9B4D, 0xC322, 0x9B4E, 0xC323, 0x9B4F,
+ 0xC324, 0xBDDC, 0xC325, 0xBDDD, 0xC326, 0x9B50, 0xC327, 0x9B51,
+ 0xC328, 0xBDDE, 0xC329, 0xBDDF, 0xC32A, 0x9B52, 0xC32B, 0x9B53,
+ 0xC32C, 0x9B54, 0xC32D, 0x9B55, 0xC32E, 0x9B56, 0xC32F, 0x9B57,
+ 0xC330, 0x9B58, 0xC331, 0x9B59, 0xC332, 0x9B5A, 0xC333, 0x9B61,
+ 0xC334, 0x9B62, 0xC335, 0x9B63, 0xC336, 0x9B64, 0xC337, 0x9B65,
+ 0xC338, 0x9B66, 0xC339, 0x9B67, 0xC33A, 0x9B68, 0xC33B, 0x9B69,
+ 0xC33C, 0x9B6A, 0xC33D, 0x9B6B, 0xC33E, 0x9B6C, 0xC33F, 0x9B6D,
+ 0xC340, 0x9B6E, 0xC341, 0x9B6F, 0xC342, 0x9B70, 0xC343, 0x9B71,
+ 0xC344, 0x9B72, 0xC345, 0xBDE0, 0xC346, 0x9B73, 0xC347, 0x9B74,
+ 0xC348, 0x9B75, 0xC349, 0x9B76, 0xC34A, 0x9B77, 0xC34B, 0x9B78,
+ 0xC34C, 0x9B79, 0xC34D, 0x9B7A, 0xC34E, 0x9B81, 0xC34F, 0x9B82,
+ 0xC350, 0x9B83, 0xC351, 0x9B84, 0xC352, 0x9B85, 0xC353, 0x9B86,
+ 0xC354, 0x9B87, 0xC355, 0x9B88, 0xC356, 0x9B89, 0xC357, 0x9B8A,
+ 0xC358, 0x9B8B, 0xC359, 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x9C83, 0xC41E, 0x9C84, 0xC41F, 0x9C85,
+ 0xC420, 0x9C86, 0xC421, 0x9C87, 0xC422, 0x9C88, 0xC423, 0x9C89,
+ 0xC424, 0xBDFC, 0xC425, 0x9C8A, 0xC426, 0x9C8B, 0xC427, 0x9C8C,
+ 0xC428, 0x9C8D, 0xC429, 0x9C8E, 0xC42A, 0x9C8F, 0xC42B, 0x9C90,
+ 0xC42C, 0xBDFD, 0xC42D, 0x9C91, 0xC42E, 0x9C92, 0xC42F, 0x9C93,
+ 0xC430, 0xBDFE, 0xC431, 0x9C94, 0xC432, 0x9C95, 0xC433, 0x9C96,
+ 0xC434, 0xBEA1, 0xC435, 0x9C97, 0xC436, 0x9C98, 0xC437, 0x9C99,
+ 0xC438, 0x9C9A, 0xC439, 0x9C9B, 0xC43A, 0x9C9C, 0xC43B, 0x9C9D,
+ 0xC43C, 0xBEA2, 0xC43D, 0xBEA3, 0xC43E, 0x9C9E, 0xC43F, 0x9C9F,
+ 0xC440, 0x9CA0, 0xC441, 0x9CA1, 0xC442, 0x9CA2, 0xC443, 0x9CA3,
+ 0xC444, 0x9CA4, 0xC445, 0x9CA5, 0xC446, 0x9CA6, 0xC447, 0x9CA7,
+ 0xC448, 0xBEA4, 0xC449, 0x9CA8, 0xC44A, 0x9CA9, 0xC44B, 0x9CAA,
+ 0xC44C, 0x9CAB, 0xC44D, 0x9CAC, 0xC44E, 0x9CAD, 0xC44F, 0x9CAE,
+ 0xC450, 0x9CAF, 0xC451, 0x9CB0, 0xC452, 0x9CB1, 0xC453, 0x9CB2,
+ 0xC454, 0x9CB3, 0xC455, 0x9CB4, 0xC456, 0x9CB5, 0xC457, 0x9CB6,
+ 0xC458, 0x9CB7, 0xC459, 0x9CB8, 0xC45A, 0x9CB9, 0xC45B, 0x9CBA,
+ 0xC45C, 0x9CBB, 0xC45D, 0x9CBC, 0xC45E, 0x9CBD, 0xC45F, 0x9CBE,
+ 0xC460, 0x9CBF, 0xC461, 0x9CC0, 0xC462,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C527, 0x9DBB,
+ 0xC528, 0xBEBE, 0xC529, 0xBEBF, 0xC52A, 0x9DBC, 0xC52B, 0x9DBD,
+ 0xC52C, 0xBEC0, 0xC52D, 0x9DBE, 0xC52E, 0x9DBF, 0xC52F, 0x9DC0,
+ 0xC530, 0xBEC1, 0xC531, 0x9DC1, 0xC532, 0x9DC2, 0xC533, 0x9DC3,
+ 0xC534, 0x9DC4, 0xC535, 0x9DC5, 0xC536, 0x9DC6, 0xC537, 0x9DC7,
+ 0xC538, 0xBEC2, 0xC539, 0xBEC3, 0xC53A, 0x9DC8, 0xC53B, 0xBEC4,
+ 0xC53C, 0x9DC9, 0xC53D, 0xBEC5, 0xC53E, 0x9DCA, 0xC53F, 0x9DCB,
+ 0xC540, 0x9DCC, 0xC541, 0x9DCD, 0xC542, 0x9DCE, 0xC543, 0x9DCF,
+ 0xC544, 0xBEC6, 0xC545, 0xBEC7, 0xC546, 0x9DD0, 0xC547, 0x9DD1,
+ 0xC548, 0xBEC8, 0xC549, 0xBEC9, 0xC54A, 0xBECA, 0xC54B, 0x9DD2,
+ 0xC54C, 0xBECB, 0xC54D, 0xBECC, 0xC54E, 0xBECD, 0xC54F, 0x9DD3,
+ 0xC550, 0x9DD4, 0xC551, 0x9DD5, 0xC552, 0x9DD6, 0xC553, 0xBECE,
+ 0xC554, 0xBECF, 0xC555, 0xBED0, 0xC556, 0x9DD7, 0xC557, 0xBED1,
+ 0xC558, 0xBED2, 0xC559, 0xBED3, 0xC55A, 0x9DD8, 0xC55B, 0x9DD9,
+ 0xC55C, 0x9DDA, 0xC55D, 0xBED4, 0xC55E, 0xBED5, 0xC55F, 0x9DDB,
+ 0xC560, 0xBED6, 0xC561, 0xBED7, 0xC562, 0x9DDC, 0xC563, 0x9DDD,
+ 0xC564, 0xBED8, 0xC565, 0x9DDE, 0xC566, 0x9DDF, 0xC567, 0x9DE0,
+ 0xC568, 0xBED9, 0xC569, 0x9DE1, 0xC56A, 0x9DE2, 0xC56B, 0x9DE3,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0xC808, 0xC0FD, 0xC809, 0xA08B, 0xC80A, 0xC0FE, 0xC80B, 0xA08C,
+ 0xC80C, 0xA08D, 0xC80D, 0xA08E, 0xC80E, 0xA08F, 0xC80F, 0xA090,
+ 0xC810, 0xC1A1, 0xC811, 0xC1A2, 0xC812, 0xA091, 0xC813, 0xC1A3,
+ 0xC814, 0xA092, 0xC815, 0xC1A4, 0xC816, 0xC1A5, 0xC817, 0xA093,
+ 0xC818, 0xA094, 0xC819, 0xA095, 0xC81A, 0xA096, 0xC81B, 0xA097,
+ 0xC81C, 0xC1A6, 0xC81D, 0xC1A7, 0xC81E, 0xA098, 0xC81F, 0xA099,
+ 0xC820, 0xC1A8, 0xC821, 0xA09A, 0xC822, 0xA09B, 0xC823, 0xA09C,
+ 0xC824, 0xC1A9, 0xC825, 0xA09D, 0xC826, 0xA09E, 0xC827, 0xA09F,
+ 0xC828, 0xA0A0, 0xC829, 0xA0A1, 0xC82A, 0xA0A2, 0xC82B, 0xA0A3,
+ 0xC82C, 0xC1AA, 0xC82D, 0xC1AB, 0xC82E, 0xA0A4, 0xC82F, 0xC1AC,
+ 0xC830, 0xA0A5, 0xC831, 0xC1AD, 0xC832, 0xA0A6, 0xC833, 0xA0A7,
+ 0xC834, 0xA0A8, 0xC835, 0xA0A9, 0xC836, 0xA0AA, 0xC837, 0xA0AB,
+ 0xC838, 0xC1AE, 0xC839, 0xA0AC, 0xC83A, 0xA0AD, 0xC83B, 0xA0AE,
+ 0xC83C, 0xC1AF, 0xC83D, 0xA0AF, 0xC83E, 0xA0B0, 0xC83F, 0xA0B1,
+ 0xC840, 0xC1B0, 0xC841, 0xA0B2, 0xC842, 0xA0B3, 0xC843, 0xA0B4,
+ 0xC844, 0xA0B5, 0xC845, 0xA0B6, 0xC846, 0xA0B7, 0xC847, 0xA0B8,
+ 0xC848, 0xC1B1, 0xC849, 0xC1B2, 0xC84A, 0xA0B9, 0xC84B, 0xA0BA,
+ 0xC84C, 0xC1B3, 0xC84D, 0xC1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 0xC8D4, 0xC1CE, 0xC8D5, 0xC1CF, 0xC8D6, 0xA170, 0xC8D7, 0xC1D0,
+ 0xC8D8, 0xA171, 0xC8D9, 0xC1D1, 0xC8DA, 0xA172, 0xC8DB, 0xA173,
+ 0xC8DC, 0xA174, 0xC8DD, 0xA175, 0xC8DE, 0xA176, 0xC8DF, 0xA177,
+ 0xC8E0, 0xC1D2, 0xC8E1, 0xC1D3, 0xC8E2, 0xA178, 0xC8E3, 0xA179,
+ 0xC8E4, 0xC1D4, 0xC8E5, 0xA17A, 0xC8E6, 0xA181, 0xC8E7, 0xA182,
+ 0xC8E8, 0xA183, 0xC8E9, 0xA184, 0xC8EA, 0xA185, 0xC8EB, 0xA186,
+ 0xC8EC, 0xA187, 0xC8ED, 0xA188, 0xC8EE, 0xA189, 0xC8EF, 0xA18A,
+ 0xC8F0, 0xA18B, 0xC8F1, 0xA18C, 0xC8F2, 0xA18D, 0xC8F3, 0xA18E,
+ 0xC8F4, 0xA18F, 0xC8F5, 0xC1D5, 0xC8F6, 0xA190, 0xC8F7, 0xA191,
+ 0xC8F8, 0xA192, 0xC8F9, 0xA193, 0xC8FA, 0xA194, 0xC8FB, 0xA195,
+ 0xC8FC, 0xC1D6, 0xC8FD, 0xC1D7, 0xC8FE, 0xA196, 0xC8FF, 0xA197,
+ 0xC900, 0xC1D8, 0xC901, 0xA198, 0xC902, 0xA199, 0xC903, 0xA19A,
+ 0xC904, 0xC1D9, 0xC905, 0xC1DA, 0xC906, 0xC1DB, 0xC907, 0xA19B,
+ 0xC908, 0xA19C, 0xC909, 0xA19D, 0xC90A, 0xA19E, 0xC90B, 0xA19F,
+ 0xC90C, 0xC1DC, 0xC90D, 0xC1DD, 0xC90E, 0xA1A0, 0xC90F, 0xC1DE,
+ 0xC910, 0xA241, 0xC911, 0xC1DF, 0xC912, 0xA242, 0xC913, 0xA243,
+ 0xC914, 0xA244, 0xC915, 0xA245, 0xC916, 0xA246, 0xC917, 0xA247,
+ 0xC918, 0xC1E0, 0xC919, 0xA248, 0xC91A, 0xA249, 0xC91B, 0xA24A,
+ 0xC91C, 0xA24B, 0xC91D, 0xA24C, 0xC91E, 0xA24D, 0xC91F, 0xA24E,
+ 0xC920, 0xA24F, 0xC921, 0xA250, 0xC922, 0xA251, 0xC923, 0xA252,
+ 0xC924, 0xA253, 0xC925, 0xA254, 0xC926, 0xA255, 0xC927, 0xA256,
+ 0xC928, 0xA257, 0xC929, 0xA258, 0xC92A, 0xA259, 0xC92B, 0xA25A,
+ 0xC92C, 0xC1E1, 0xC92D, 0xA261, 0xC92E, 0xA262, 0xC92F, 0xA263,
+ 0xC930, 0xA264, 0xC931, 0xA265, 0xC932, 0xA266, 0xC933, 0xA267,
+ 0xC934, 0xC1E2, 0xC935, 0xA268, 0xC936, 0xA269, 0xC937, 0xA26A,
+ 0xC938, 0xA26B, 0xC939, 0xA26C, 0xC93A, 0xA26D, 0xC93B, 0xA26E,
+ 0xC93C, 0xA26F, 0xC93D, 0xA270, 0xC93E, 0xA271, 0xC93F, 0xA272,
+ 0xC940, 0xA273, 0xC941, 0xA274, 0xC942, 0xA275, 0xC943, 0xA276,
+ 0xC944, 0xA277, 0xC945, 0xA278, 0xC946, 0xA279, 0xC947, 0xA27A,
+ 0xC948, 0xA281, 0xC949, 0xA282, 0xC94A, 0xA283, 0xC94B, 0xA284,
+ 0xC94C, 0xA285, 0xC94D, 0xA286, 0xC94E, 0xA287, 0xC94F, 0xA288,
+ 0xC950, 0xC1E3, 0xC951, 0xC1E4, 0xC952, 0xA289, 0xC953, 0xA28A,
+ 0xC954, 0xC1E5, 0xC955, 0xA28B, 0xC956, 0xA28C, 0xC957, 0xA28D,
+ 0xC958, 0xC1E6, 0xC959, 0xA28E, 0xC95A, 0xA28F, 0xC95B, 0xA290,
+ 0xC95C, 0xA291, 0xC95D, 0xA292, 0xC95E, 0xA293, 0xC95F, 0xA294,
+ 0xC960, 0xC1E7, 0xC961, 0xC1E8, 0xC962, 0xA295, 0xC963, 0xC1E9,
+ 0xC964, 0xA296, 0xC965, 0xA297, 0xC966, 0xA298, 0xC967, 0xA299,
+ 0xC968, 0xA29A, 0xC969, 0xA29B, 0xC96A, 0xA29C, 0xC96B, 0xA29D,
+ 0xC96C, 0xC1EA, 0xC96D, 0xA29E, 0xC96E, 0xA29F, 0xC96F, 0xA2A0,
+ 0xC970, 0xC1EB, 0xC971, 0xA341, 0xC972, 0xA342, 0xC973, 0xA343,
+ 0xC974, 0xC1EC, 0xC975, 0xA344, 0xC976, 0xA345, 0xC977, 0xA346,
+ 0xC978, 0xA347, 0xC979, 0xA348, 0xC97A, 0xA349, 0xC97B, 0xA34A,
+ 0xC97C, 0xC1ED, 0xC97D, 0xA34B, 0xC97E, 0xA34C, 0xC97F, 0xA34D,
+ 0xC980, 0xA34E, 0xC981, 0xA34F, 0xC982, 0xA350, 0xC983, 0xA351,
+ 0xC984, 0xA352, 0xC985, 0xA353, 0xC986, 0xA354, 0xC987, 0xA355,
+ 0xC988, 0xC1EE, 0xC989, 0xC1EF, 0xC98A, 0xA356, 0xC98B, 0xA357,
+ 0xC98C, 0xC1F0, 0xC98D, 0xA358, 0xC98E, 0xA359, 0xC98F, 0xA35A,
+ 0xC990, 0xC1F1, 0xC991, 0xA361, 0xC992, 0xA362, 0xC993, 0xA363,
+ 0xC994, 0xA364, 0xC995, 0xA365, 0xC996, 0xA366, 0xC997, 0xA367,
+ 0xC998, 0xC1F2, 0xC999, 0xC1F3, 0xC99A, 0xA368, 0xC99B, 0xC1F4,
+ 0xC99C, 0xA369, 0xC99D, 0xC1F5, 0xC99E, 0xA36A, 0xC99F, 0xA36B,
+ 0xC9A0, 0xA36C, 0xC9A1, 0xA36D, 0xC9A2, 0xA36E, 0xC9A3, 0xA36F,
+ 0xC9A4, 0xA370, 0xC9A5, 0xA371, 0xC9A6, 0xA372, 0xC9A7, 0xA373,
+ 0xC9A8, 0xA374, 0xC9A9, 0xA375, 0xC9AA, 0xA376, 0xC9AB, 0xA377,
+ 0xC9AC, 0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9EE, 0xA44B, 0xC9EF, 0xC2AD,
+ 0xC9F0, 0xC2AE, 0xC9F1, 0xC2AF, 0xC9F2, 0xA44C, 0xC9F3, 0xA44D,
+ 0xC9F4, 0xA44E, 0xC9F5, 0xA44F, 0xC9F6, 0xA450, 0xC9F7, 0xA451,
+ 0xC9F8, 0xC2B0, 0xC9F9, 0xC2B1, 0xC9FA, 0xA452, 0xC9FB, 0xA453,
+ 0xC9FC, 0xC2B2, 0xC9FD, 0xA454, 0xC9FE, 0xA455, 0xC9FF, 0xA456,
+ 0xCA00, 0xC2B3, 0xCA01, 0xA457, 0xCA02, 0xA458, 0xCA03, 0xA459,
+ 0xCA04, 0xA45A, 0xCA05, 0xA461, 0xCA06, 0xA462, 0xCA07, 0xA463,
+ 0xCA08, 0xC2B4, 0xCA09, 0xC2B5, 0xCA0A, 0xA464, 0xCA0B, 0xC2B6,
+ 0xCA0C, 0xC2B7, 0xCA0D, 0xC2B8, 0xCA0E, 0xA465, 0xCA0F, 0xA466,
+ 0xCA10, 0xA467, 0xCA11, 0xA468, 0xCA12, 0xA469, 0xCA13, 0xA46A,
+ 0xCA14, 0xC2B9, 0xCA15, 0xA46B, 0xCA16, 0xA46C, 0xCA17, 0xA46D,
+ 0xCA18, 0xC2BA, 0xCA19, 0xA46E, 0xCA1A, 0xA46F, 0xCA1B, 0xA470,
+ 0xCA1C, 0xA471, 0xCA1D, 0xA472, 0xCA1E, 0xA473, 0xCA1F, 0xA474,
+ 0xCA20, 0xA475, 0xCA21, 0xA476, 0xCA22, 0xA477, 0xCA23, 0xA478,
+ 0xCA24, 0xA479, 0xCA25, 0xA47A, 0xCA26, 0xA481, 0xCA27, 0xA482,
+ 0xCA28, 0xA483, 0xCA29, 0xC2BB, 0xCA2A, 0xA484, 0xCA2B, 0xA485,
+ 0xCA2C, 0xA486, 0xCA2D, 0xA487, 0xCA2E, 0xA488, 0xCA2F, 0xA489,
+ 0xCA30, 0xA48A, 0xCA31, 0xA48B, 0xCA32, 0xA48C, 0xCA33, 0xA48D,
+ 0xCA34, 0xA48E, 0xCA35, 0xA48F, 0xCA36, 0xA490, 0xCA37, 0xA491,
+ 0xCA38, 0xA492, 0xCA39, 0xA493, 0xCA3A, 0xA494, 0xCA3B, 0xA495,
+ 0xCA3C, 0xA496, 0xCA3D, 0xA497, 0xCA3E, 0xA498, 0xCA3F, 0xA499,
+ 0xCA40, 0xA49A, 0xCA41, 0xA49B, 0xCA42, 0xA49C, 0xCA43, 0xA49D,
+ 0xCA44, 0xA49E, 0xCA45, 0xA49F, 0xCA46, 0xA4A0, 0xCA47, 0xA541,
+ 0xCA48, 0xA542, 0xCA49, 0xA543, 0xCA4A, 0xA544, 0xCA4B, 0xA545,
+ 0xCA4C, 0xC2BC, 0xCA4D, 0xC2BD, 0xCA4E, 0xA546, 0xCA4F, 0xA547,
+ 0xCA50, 0xC2BE, 0xCA51, 0xA548, 0xCA52, 0xA549, 0xCA53, 0xA54A,
+ 0xCA54, 0xC2BF, 0xCA55, 0xA54B, 0xCA56, 0xA54C, 0xCA57, 0xA54D,
+ 0xCA58, 0xA54E, 0xCA59, 0xA54F, 0xCA5A, 0xA550, 0xCA5B, 0xA551,
+ 0xCA5C, 0xC2C0, 0xCA5D, 0xC2C1, 0xCA5E, 0xA552, 0xCA5F, 0xC2C2,
+ 0xCA60, 0xC2C3, 0xCA61, 0xC2C4, 0xCA62, 0xA553, 0xCA63, 0xA554,
+ 0xCA64, 0xA555, 0xCA65, 0xA556, 0xCA66, 0xA557, 0xCA67, 0xA558,
+ 0xCA68, 0xC2C5, 0xCA69, 0xA559, 0xCA6A, 0xA55A, 0xCA6B, 0xA561,
+ 0xCA6C, 0xA562, 0xCA6D, 0xA563, 0xCA6E, 0xA564, 0xCA6F, 0xA565,
+ 0xCA70, 0xA566, 0xCA71, 0xA567, 0xCA72, 0xA568, 0xCA73, 0xA569,
+ 0xCA74, 0xA56A, 0xCA75, 0xA56B, 0xCA76, 0xA56C, 0xCA77, 0xA56D,
+ 0xCA78, 0xA56E, 0xCA79, 0xA56F, 0xCA7A, 0xA570, 0xCA7B, 0xA571,
+ 0xCA7C, 0xA572, 0xCA7D, 0xC2C6, 0xCA7E, 0xA573, 0xCA7F, 0xA574,
+ 0xCA80, 0xA575, 0xCA81, 0xA576, 0xCA82, 0xA577, 0xCA83, 0xA578,
+ 0xCA84, 0xC2C7, 0xCA85, 0xA579, 0xCA86, 0xA57A, 0xCA87, 0xA581,
+ 0xCA88, 0xA582, 0xCA89, 0xA583, 0xCA8A, 0xA584, 0xCA8B, 0xA585,
+ 0xCA8C, 0xA586, 0xCA8D, 0xA587, 0xCA8E, 0xA588, 0xCA8F, 0xA589,
+ 0xCA90, 0xA58A, 0xCA91, 0xA58B, 0xCA92, 0xA58C, 0xCA93, 0xA58D,
+ 0xCA94, 0xA58E, 0xCA95, 0xA58F, 0xCA96, 0xA590, 0xCA97, 0xA591,
+ 0xCA98, 0xC2C8, 0xCA99, 0xA592, 0xCA9A, 0xA593, 0xCA9B, 0xA594,
+ 0xCA9C, 0xA595, 0xCA9D, 0xA596, 0xCA9E, 0xA597, 0xCA9F, 0xA598,
+ 0xCAA0, 0xA599, 0xCAA1, 0xA59A, 0xCAA2, 0xA59B, 0xCAA3, 0xA59C,
+ 0xCAA4, 0xA59D, 0xCAA5, 0xA59E, 0xCAA6, 0xA59F, 0xCAA7, 0xA5A0,
+ 0xCAA8, 0xA641, 0xCAA9, 0xA642, 0xCAAA, 0xA643, 0xCAAB, 0xA644,
+ 0xCAAC, 0xA645, 0xCAAD, 0xA646, 0xCAAE, 0xA647, 0xCAAF, 0xA648,
+ 0xCAB0, 0xA649, 0xCAB1, 0xA64A, 0xCAB2, 0xA64B, 0xCAB3, 0xA64C,
+ 0xCAB4, 0xA64D, 0xCAB5, 0xA64E, 0xCAB6, 0xA64F, 0xCAB7, 0xA650,
+ 0xCAB8, 0xA651, 0xCAB9, 0xA652, 0xCABA, 0xA653, 0xCABB, 0xA654,
+ 0xCABC, 0xC2C9, 0xCABD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B01, 0xA698, 0xCB02, 0xA699, 0xCB03, 0xA69A,
+ 0xCB04, 0xA69B, 0xCB05, 0xA69C, 0xCB06, 0xA69D, 0xCB07, 0xA69E,
+ 0xCB08, 0xC2D7, 0xCB09, 0xA69F, 0xCB0A, 0xA6A0, 0xCB0B, 0xA741,
+ 0xCB0C, 0xA742, 0xCB0D, 0xA743, 0xCB0E, 0xA744, 0xCB0F, 0xA745,
+ 0xCB10, 0xC2D8, 0xCB11, 0xA746, 0xCB12, 0xA747, 0xCB13, 0xA748,
+ 0xCB14, 0xC2D9, 0xCB15, 0xA749, 0xCB16, 0xA74A, 0xCB17, 0xA74B,
+ 0xCB18, 0xC2DA, 0xCB19, 0xA74C, 0xCB1A, 0xA74D, 0xCB1B, 0xA74E,
+ 0xCB1C, 0xA74F, 0xCB1D, 0xA750, 0xCB1E, 0xA751, 0xCB1F, 0xA752,
+ 0xCB20, 0xC2DB, 0xCB21, 0xC2DC, 0xCB22, 0xA753, 0xCB23, 0xA754,
+ 0xCB24, 0xA755, 0xCB25, 0xA756, 0xCB26, 0xA757, 0xCB27, 0xA758,
+ 0xCB28, 0xA759, 0xCB29, 0xA75A, 0xCB2A, 0xA761, 0xCB2B, 0xA762,
+ 0xCB2C, 0xA763, 0xCB2D, 0xA764, 0xCB2E, 0xA765, 0xCB2F, 0xA766,
+ 0xCB30, 0xA767, 0xCB31, 0xA768, 0xCB32, 0xA769, 0xCB33, 0xA76A,
+ 0xCB34, 0xA76B, 0xCB35, 0xA76C, 0xCB36, 0xA76D, 0xCB37, 0xA76E,
+ 0xCB38, 0xA76F, 0xCB39, 0xA770, 0xCB3A, 0xA771, 0xCB3B, 0xA772,
+ 0xCB3C, 0xA773, 0xCB3D, 0xA774, 0xCB3E, 0xA775, 0xCB3F, 0xA776,
+ 0xCB40, 0xA777, 0xCB41, 0xC2DD, 0xCB42, 0xA778, 0xCB43, 0xA779,
+ 0xCB44, 0xA77A, 0xCB45, 0xA781, 0xCB46, 0xA782, 0xCB47, 0xA783,
+ 0xCB48, 0xC2DE, 0xCB49, 0xC2DF, 0xCB4A, 0xA784, 0xCB4B, 0xA785,
+ 0xCB4C, 0xC2E0, 0xCB4D, 0xA786, 0xCB4E, 0xA787, 0xCB4F, 0xA788,
+ 0xCB50, 0xC2E1, 0xCB51, 0xA789, 0xCB52, 0xA78A, 0xCB53, 0xA78B,
+ 0xCB54, 0xA78C, 0xCB55, 0xA78D, 0xCB56, 0xA78E, 0xCB57, 0xA78F,
+ 0xCB58, 0xC2E2, 0xCB59, 0xC2E3, 0xCB5A, 0xA790, 0xCB5B, 0xA791,
+ 0xCB5C, 0xA792, 0xCB5D, 0xC2E4, 0xCB5E, 0xA793, 0xCB5F, 0xA794,
+ 0xCB60, 0xA795, 0xCB61, 0xA796, 0xCB62, 0xA797, 0xCB63, 0xA798,
+ 0xCB64, 0xC2E5, 0xCB65, 0xA799, 0xCB66, 0xA79A, 0xCB67, 0xA79B,
+ 0xCB68, 0xA79C, 0xCB69, 0xA79D, 0xCB6A, 0xA79E, 0xCB6B, 0xA79F,
+ 0xCB6C, 0xA7A0, 0xCB6D, 0xA841, 0xCB6E, 0xA842, 0xCB6F, 0xA843,
+ 0xCB70, 0xA844, 0xCB71, 0xA845, 0xCB72, 0xA846, 0xCB73, 0xA847,
+ 0xCB74, 0xA848, 0xCB75, 0xA849, 0xCB76, 0xA84A, 0xCB77, 0xA84B,
+ 0xCB78, 0xC2E6, 0xCB79, 0xC2E7, 0xCB7A, 0xA84C, 0xCB7B, 0xA84D,
+ 0xCB7C, 0xA84E, 0xCB7D, 0xA84F, 0xCB7E, 0xA850, 0xCB7F, 0xA851,
+ 0xCB80, 0xA852, 0xCB81, 0xA853, 0xCB82, 0xA854, 0xCB83, 0xA855,
+ 0xCB84, 0xA856, 0xCB85, 0xA857, 0xCB86, 0xA858, 0xCB87, 0xA859,
+ 0xCB88, 0xA85A, 0xCB89, 0xA861, 0xCB8A, 0xA862, 0xCB8B, 0xA863,
+ 0xCB8C, 0xA864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xCBD1, 0xA94D, 0xCBD2, 0xA94E, 0xCBD3, 0xA94F,
+ 0xCBD4, 0xC2EA, 0xCBD5, 0xA950, 0xCBD6, 0xA951, 0xCBD7, 0xA952,
+ 0xCBD8, 0xA953, 0xCBD9, 0xA954, 0xCBDA, 0xA955, 0xCBDB, 0xA956,
+ 0xCBDC, 0xA957, 0xCBDD, 0xA958, 0xCBDE, 0xA959, 0xCBDF, 0xA95A,
+ 0xCBE0, 0xA961, 0xCBE1, 0xA962, 0xCBE2, 0xA963, 0xCBE3, 0xA964,
+ 0xCBE4, 0xC2EB, 0xCBE5, 0xA965, 0xCBE6, 0xA966, 0xCBE7, 0xC2EC,
+ 0xCBE8, 0xA967, 0xCBE9, 0xC2ED, 0xCBEA, 0xA968, 0xCBEB, 0xA969,
+ 0xCBEC, 0xA96A, 0xCBED, 0xA96B, 0xCBEE, 0xA96C, 0xCBEF, 0xA96D,
+ 0xCBF0, 0xA96E, 0xCBF1, 0xA96F, 0xCBF2, 0xA970, 0xCBF3, 0xA971,
+ 0xCBF4, 0xA972, 0xCBF5, 0xA973, 0xCBF6, 0xA974, 0xCBF7, 0xA975,
+ 0xCBF8, 0xA976, 0xCBF9, 0xA977, 0xCBFA, 0xA978, 0xCBFB, 0xA979,
+ 0xCBFC, 0xA97A, 0xCBFD, 0xA981, 0xCBFE, 0xA982, 0xCBFF, 0xA983,
+ 0xCC00, 0xA984, 0xCC01, 0xA985, 0xCC02, 0xA986, 0xCC03, 0xA987,
+ 0xCC04, 0xA988, 0xCC05, 0xA989, 0xCC06, 0xA98A, 0xCC07, 0xA98B,
+ 0xCC08, 0xA98C, 0xCC09, 0xA98D, 0xCC0A, 0xA98E, 0xCC0B, 0xA98F,
+ 0xCC0C, 0xC2EE, 0xCC0D, 0xC2EF, 0xCC0E, 0xA990, 0xCC0F, 0xA991,
+ 0xCC10, 0xC2F0, 0xCC11, 0xA992, 0xCC12, 0xA993, 0xCC13, 0xA994,
+ 0xCC14, 0xC2F1, 0xCC15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163,
+ 0xCF28, 0xB164, 0xCF29, 0xB165, 0xCF2A, 0xB166, 0xCF2B, 0xB167,
+ 0xCF2C, 0xC4D4, 0xCF2D, 0xC4D5, 0xCF2E, 0xB168, 0xCF2F, 0xC4D6,
+ 0xCF30, 0xC4D7, 0xCF31, 0xC4D8, 0xCF32, 0xB169, 0xCF33, 0xB16A,
+ 0xCF34, 0xB16B, 0xCF35, 0xB16C, 0xCF36, 0xB16D, 0xCF37, 0xB16E,
+ 0xCF38, 0xC4D9, 0xCF39, 0xB16F, 0xCF3A, 0xB170, 0xCF3B, 0xB171,
+ 0xCF3C, 0xB172, 0xCF3D, 0xB173, 0xCF3E, 0xB174, 0xCF3F, 0xB175,
+ 0xCF40, 0xB176, 0xCF41, 0xB177, 0xCF42, 0xB178, 0xCF43, 0xB179,
+ 0xCF44, 0xB17A, 0xCF45, 0xB181, 0xCF46, 0xB182, 0xCF47, 0xB183,
+ 0xCF48, 0xB184, 0xCF49, 0xB185, 0xCF4A, 0xB186, 0xCF4B, 0xB187,
+ 0xCF4C, 0xB188, 0xCF4D, 0xB189, 0xCF4E, 0xB18A, 0xCF4F, 0xB18B,
+ 0xCF50, 0xB18C, 0xCF51, 0xB18D, 0xCF52, 0xB18E, 0xCF53, 0xB18F,
+ 0xCF54, 0xC4DA, 0xCF55, 0xC4DB, 0xCF56, 0xB190, 0xCF57, 0xB191,
+ 0xCF58, 0xC4DC, 0xCF59, 0xB192, 0xCF5A, 0xB193, 0xCF5B, 0xB194,
+ 0xCF5C, 0xC4DD, 0xCF5D, 0xB195, 0xCF5E, 0xB196, 0xCF5F, 0xB197,
+ 0xCF60, 0xB198, 0xCF61, 0xB199, 0xCF62, 0xB19A, 0xCF63, 0xB19B,
+ 0xCF64, 0xC4DE, 0xCF65, 0xC4DF, 0xCF66, 0xB19C, 0xCF67, 0xC4E0,
+ 0xCF68, 0xB19D, 0xCF69, 0xC4E1, 0xCF6A, 0xB19E, 0xCF6B, 0xB19F,
+ 0xCF6C, 0xB1A0, 0xCF6D, 0xB241, 0xCF6E, 0xB242, 0xCF6F, 0xB243,
+ 0xCF70, 0xC4E2, 0xCF71, 0xC4E3, 0xCF72, 0xB244, 0xCF73, 0xB245,
+ 0xCF74, 0xC4E4, 0xCF75, 0xB246, 0xCF76, 0xB247, 0xCF77, 0xB248,
+ 0xCF78, 0xC4E5, 0xCF79, 0xB249, 0xCF7A, 0xB24A, 0xCF7B, 0xB24B,
+ 0xCF7C, 0xB24C, 0xCF7D, 0xB24D, 0xCF7E, 0xB24E, 0xCF7F, 0xB24F,
+ 0xCF80, 0xC4E6, 0xCF81, 0xB250, 0xCF82, 0xB251, 0xCF83, 0xB252,
+ 0xCF84, 0xB253, 0xCF85, 0xC4E7, 0xCF86, 0xB254, 0xCF87, 0xB255,
+ 0xCF88, 0xB256, 0xCF89, 0xB257, 0xCF8A, 0xB258, 0xCF8B, 0xB259,
+ 0xCF8C, 0xC4E8, 0xCF8D, 0xB25A, 0xCF8E, 0xB261, 0xCF8F, 0xB262,
+ 0xCF90, 0xB263, 0xCF91, 0xB264, 0xCF92, 0xB265, 0xCF93, 0xB266,
+ 0xCF94, 0xB267, 0xCF95, 0xB268, 0xCF96, 0xB269, 0xCF97, 0xB26A,
+ 0xCF98, 0xB26B, 0xCF99, 0xB26C, 0xCF9A, 0xB26D, 0xCF9B, 0xB26E,
+ 0xCF9C, 0xB26F, 0xCF9D, 0xB270, 0xCF9E, 0xB271, 0xCF9F, 0xB272,
+ 0xCFA0, 0xB273, 0xCFA1, 0xC4E9, 0xCFA2, 0xB274, 0xCFA3, 0xB275,
+ 0xCFA4, 0xB276, 0xCFA5, 0xB277, 0xCFA6, 0xB278, 0xCFA7, 0xB279,
+ 0xCFA8, 0xC4EA, 0xCFA9, 0xB27A, 0xCFAA, 0xB281, 0xCFAB, 0xB282,
+ 0xCFAC, 0xB283, 0xCFAD, 0xB284, 0xCFAE, 0xB285, 0xCFAF, 0xB286,
+ 0xCFB0, 0xC4EB, 0xCFB1, 0xB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B368, 0xCFF5, 0xC4F4, 0xCFF6, 0xB369, 0xCFF7, 0xB36A,
+ 0xCFF8, 0xB36B, 0xCFF9, 0xB36C, 0xCFFA, 0xB36D, 0xCFFB, 0xB36E,
+ 0xCFFC, 0xC4F5, 0xCFFD, 0xB36F, 0xCFFE, 0xB370, 0xCFFF, 0xB371,
+ 0xD000, 0xC4F6, 0xD001, 0xB372, 0xD002, 0xB373, 0xD003, 0xB374,
+ 0xD004, 0xC4F7, 0xD005, 0xB375, 0xD006, 0xB376, 0xD007, 0xB377,
+ 0xD008, 0xB378, 0xD009, 0xB379, 0xD00A, 0xB37A, 0xD00B, 0xB381,
+ 0xD00C, 0xB382, 0xD00D, 0xB383, 0xD00E, 0xB384, 0xD00F, 0xB385,
+ 0xD010, 0xB386, 0xD011, 0xC4F8, 0xD012, 0xB387, 0xD013, 0xB388,
+ 0xD014, 0xB389, 0xD015, 0xB38A, 0xD016, 0xB38B, 0xD017, 0xB38C,
+ 0xD018, 0xC4F9, 0xD019, 0xB38D, 0xD01A, 0xB38E, 0xD01B, 0xB38F,
+ 0xD01C, 0xB390, 0xD01D, 0xB391, 0xD01E, 0xB392, 0xD01F, 0xB393,
+ 0xD020, 0xB394, 0xD021, 0xB395, 0xD022, 0xB396, 0xD023, 0xB397,
+ 0xD024, 0xB398, 0xD025, 0xB399, 0xD026, 0xB39A, 0xD027, 0xB39B,
+ 0xD028, 0xB39C, 0xD029, 0xB39D, 0xD02A, 0xB39E, 0xD02B, 0xB39F,
+ 0xD02C, 0xB3A0, 0xD02D, 0xC4FA, 0xD02E, 0xB441, 0xD02F, 0xB442,
+ 0xD030, 0xB443, 0xD031, 0xB444, 0xD032, 0xB445, 0xD033, 0xB446,
+ 0xD034, 0xC4FB, 0xD035, 0xC4FC, 0xD036, 0xB447, 0xD037, 0xB448,
+ 0xD038, 0xC4FD, 0xD039, 0xB449, 0xD03A, 0xB44A, 0xD03B, 0xB44B,
+ 0xD03C, 0xC4FE, 0xD03D, 0xB44C, 0xD03E, 0xB44D, 0xD03F, 0xB44E,
+ 0xD040, 0xB44F, 0xD041, 0xB450, 0xD042, 0xB451, 0xD043, 0xB452,
+ 0xD044, 0xC5A1, 0xD045, 0xC5A2, 0xD046, 0xB453, 0xD047, 0xC5A3,
+ 0xD048, 0xB454, 0xD049, 0xC5A4, 0xD04A, 0xB455, 0xD04B, 0xB456,
+ 0xD04C, 0xB457, 0xD04D, 0xB458, 0xD04E, 0xB459, 0xD04F, 0xB45A,
+ 0xD050, 0xC5A5, 0xD051, 0xB461, 0xD052, 0xB462, 0xD053, 0xB463,
+ 0xD054, 0xC5A6, 0xD055, 0xB464, 0xD056, 0xB465, 0xD057, 0xB466,
+ 0xD058, 0xC5A7, 0xD059, 0xB467, 0xD05A, 0xB468, 0xD05B, 0xB469,
+ 0xD05C, 0xB46A, 0xD05D, 0xB46B, 0xD05E, 0xB46C, 0xD05F, 0xB46D,
+ 0xD060, 0xC5A8, 0xD061, 0xB46E, 0xD062, 0xB46F, 0xD063, 0xB470,
+ 0xD064, 0xB471, 0xD065, 0xB472, 0xD066, 0xB473, 0xD067, 0xB474,
+ 0xD068, 0xB475, 0xD069, 0xB476, 0xD06A, 0xB477, 0xD06B, 0xB478,
+ 0xD06C, 0xC5A9, 0xD06D, 0xC5AA, 0xD06E, 0xB479, 0xD06F, 0xB47A,
+ 0xD070, 0xC5AB, 0xD071, 0xB481, 0xD072, 0xB482, 0xD073, 0xB483,
+ 0xD074, 0xC5AC, 0xD075, 0xB484, 0xD076, 0xB485, 0xD077, 0xB486,
+ 0xD078, 0xB487, 0xD079, 0xB488, 0xD07A, 0xB489, 0xD07B, 0xB48A,
+ 0xD07C, 0xC5AD, 0xD07D, 0xC5AE, 0xD07E, 0xB48B, 0xD07F, 0xB48C,
+ 0xD080, 0xB48D, 0xD081, 0xC5AF, 0xD082, 0xB48E, 0xD083, 0xB48F,
+ 0xD084, 0xB490, 0xD085, 0xB491, 0xD086, 0xB492, 0xD087, 0xB493,
+ 0xD088, 0xB494, 0xD089, 0xB495, 0xD08A, 0xB496, 0xD08B, 0xB497,
+ 0xD08C, 0xB498, 0xD08D, 0xB499, 0xD08E, 0xB49A, 0xD08F, 0xB49B,
+ 0xD090, 0xB49C, 0xD091, 0xB49D, 0xD092, 0xB49E, 0xD093, 0xB49F,
+ 0xD094, 0xB4A0, 0xD095, 0xB541, 0xD096, 0xB542, 0xD097, 0xB543,
+ 0xD098, 0xB544, 0xD099, 0xB545, 0xD09A, 0xB546, 0xD09B, 0xB547,
+ 0xD09C, 0xB548, 0xD09D, 0xB549, 0xD09E, 0xB54A, 0xD09F, 0xB54B,
+ 0xD0A0, 0xB54C, 0xD0A1, 0xB54D, 0xD0A2, 0xB54E, 0xD0A3, 0xB54F,
+ 0xD0A4, 0xC5B0, 0xD0A5, 0xC5B1, 0xD0A6, 0xB550, 0xD0A7, 0xB551,
+ 0xD0A8, 0xC5B2, 0xD0A9, 0xB552, 0xD0AA, 0xB553, 0xD0AB, 0xB554,
+ 0xD0AC, 0xC5B3, 0xD0AD, 0xB555, 0xD0AE, 0xB556, 0xD0AF, 0xB557,
+ 0xD0B0, 0xB558, 0xD0B1, 0xB559, 0xD0B2, 0xB55A, 0xD0B3, 0xB561,
+ 0xD0B4, 0xC5B4, 0xD0B5, 0xC5B5, 0xD0B6, 0xB562, 0xD0B7, 0xC5B6,
+ 0xD0B8, 0xB563, 0xD0B9, 0xC5B7, 0xD0BA, 0xB564, 0xD0BB, 0xB565,
+ 0xD0BC, 0xB566, 0xD0BD, 0xB567, 0xD0BE, 0xB568, 0xD0BF, 0xB569,
+ 0xD0C0, 0xC5B8, 0xD0C1, 0xC5B9, 0xD0C2, 0xB56A, 0xD0C3, 0xB56B,
+ 0xD0C4, 0xC5BA, 0xD0C5, 0xB56C, 0xD0C6, 0xB56D, 0xD0C7, 0xB56E,
+ 0xD0C8, 0xC5BB, 0xD0C9, 0xC5BC, 0xD0CA, 0xB56F, 0xD0CB, 0xB570,
+ 0xD0CC, 0xB571, 0x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D111, 0xB64C, 0xD112, 0xB64D, 0xD113, 0xB64E,
+ 0xD114, 0xB64F, 0xD115, 0xB650, 0xD116, 0xB651, 0xD117, 0xB652,
+ 0xD118, 0xB653, 0xD119, 0xB654, 0xD11A, 0xB655, 0xD11B, 0xB656,
+ 0xD11C, 0xB657, 0xD11D, 0xB658, 0xD11E, 0xB659, 0xD11F, 0xB65A,
+ 0xD120, 0xB661, 0xD121, 0xB662, 0xD122, 0xB663, 0xD123, 0xB664,
+ 0xD124, 0xB665, 0xD125, 0xB666, 0xD126, 0xB667, 0xD127, 0xB668,
+ 0xD128, 0xB669, 0xD129, 0xB66A, 0xD12A, 0xB66B, 0xD12B, 0xB66C,
+ 0xD12C, 0xB66D, 0xD12D, 0xB66E, 0xD12E, 0xB66F, 0xD12F, 0xB670,
+ 0xD130, 0xC5CD, 0xD131, 0xC5CE, 0xD132, 0xB671, 0xD133, 0xB672,
+ 0xD134, 0xC5CF, 0xD135, 0xB673, 0xD136, 0xB674, 0xD137, 0xB675,
+ 0xD138, 0xC5D0, 0xD139, 0xB676, 0xD13A, 0xC5D1, 0xD13B, 0xB677,
+ 0xD13C, 0xB678, 0xD13D, 0xB679, 0xD13E, 0xB67A, 0xD13F, 0xB681,
+ 0xD140, 0xC5D2, 0xD141, 0xC5D3, 0xD142, 0xB682, 0xD143, 0xC5D4,
+ 0xD144, 0xC5D5, 0xD145, 0xC5D6, 0xD146, 0xB683, 0xD147, 0xB684,
+ 0xD148, 0xB685, 0xD149, 0xB686, 0xD14A, 0xB687, 0xD14B, 0xB688,
+ 0xD14C, 0xC5D7, 0xD14D, 0xC5D8, 0xD14E, 0xB689, 0xD14F, 0xB68A,
+ 0xD150, 0xC5D9, 0xD151, 0xB68B, 0xD152, 0xB68C, 0xD153, 0xB68D,
+ 0xD154, 0xC5DA, 0xD155, 0xB68E, 0xD156, 0xB68F, 0xD157, 0xB690,
+ 0xD158, 0xB691, 0xD159, 0xB692, 0xD15A, 0xB693, 0xD15B, 0xB694,
+ 0xD15C, 0xC5DB, 0xD15D, 0xC5DC, 0xD15E, 0xB695, 0xD15F, 0xC5DD,
+ 0xD160, 0xB696, 0xD161, 0xC5DE, 0xD162, 0xB697, 0xD163, 0xB698,
+ 0xD164, 0xB699, 0xD165, 0xB69A, 0xD166, 0xB69B, 0xD167, 0xB69C,
+ 0xD168, 0xC5DF, 0xD169, 0xB69D, 0xD16A, 0xB69E, 0xD16B, 0xB69F,
+ 0xD16C, 0xC5E0, 0xD16D, 0xB6A0, 0xD16E, 0xB741, 0xD16F, 0xB742,
+ 0xD170, 0xB743, 0xD171, 0xB744, 0xD172, 0xB745, 0xD173, 0xB746,
+ 0xD174, 0xB747, 0xD175, 0xB748, 0xD176, 0xB749, 0xD177, 0xB74A,
+ 0xD178, 0xB74B, 0xD179, 0xB74C, 0xD17A, 0xB74D, 0xD17B, 0xB74E,
+ 0xD17C, 0xC5E1, 0xD17D, 0xB74F, 0xD17E, 0xB750, 0xD17F, 0xB751,
+ 0xD180, 0xB752, 0xD181, 0xB753, 0xD182, 0xB754, 0xD183, 0xB755,
+ 0xD184, 0xC5E2, 0xD185, 0xB756, 0xD186, 0xB757, 0xD187, 0xB758,
+ 0xD188, 0xC5E3, 0xD189, 0xB759, 0xD18A, 0xB75A, 0xD18B, 0xB761,
+ 0xD18C, 0xB762, 0xD18D, 0xB763, 0xD18E, 0xB764, 0xD18F, 0xB765,
+ 0xD190, 0xB766, 0xD191, 0xB767, 0xD192, 0xB768, 0xD193, 0xB769,
+ 0xD194, 0xB76A, 0xD195, 0xB76B, 0xD196, 0xB76C, 0xD197, 0xB76D,
+ 0xD198, 0xB76E, 0xD199, 0xB76F, 0xD19A, 0xB770, 0xD19B, 0xB771,
+ 0xD19C, 0xB772, 0xD19D, 0xB773, 0xD19E, 0xB774, 0xD19F, 0xB775,
+ 0xD1A0, 0xC5E4, 0xD1A1, 0xC5E5, 0xD1A2, 0xB776, 0xD1A3, 0xB777,
+ 0xD1A4, 0xC5E6, 0xD1A5, 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E8, 0xB858, 0xD1E9, 0xB859, 0xD1EA, 0xB85A, 0xD1EB, 0xB861,
+ 0xD1EC, 0xB862, 0xD1ED, 0xB863, 0xD1EE, 0xB864, 0xD1EF, 0xB865,
+ 0xD1F0, 0xB866, 0xD1F1, 0xB867, 0xD1F2, 0xB868, 0xD1F3, 0xB869,
+ 0xD1F4, 0xC5F0, 0xD1F5, 0xB86A, 0xD1F6, 0xB86B, 0xD1F7, 0xB86C,
+ 0xD1F8, 0xC5F1, 0xD1F9, 0xB86D, 0xD1FA, 0xB86E, 0xD1FB, 0xB86F,
+ 0xD1FC, 0xB870, 0xD1FD, 0xB871, 0xD1FE, 0xB872, 0xD1FF, 0xB873,
+ 0xD200, 0xB874, 0xD201, 0xB875, 0xD202, 0xB876, 0xD203, 0xB877,
+ 0xD204, 0xB878, 0xD205, 0xB879, 0xD206, 0xB87A, 0xD207, 0xC5F2,
+ 0xD208, 0xB881, 0xD209, 0xC5F3, 0xD20A, 0xB882, 0xD20B, 0xB883,
+ 0xD20C, 0xB884, 0xD20D, 0xB885, 0xD20E, 0xB886, 0xD20F, 0xB887,
+ 0xD210, 0xC5F4, 0xD211, 0xB888, 0xD212, 0xB889, 0xD213, 0xB88A,
+ 0xD214, 0xB88B, 0xD215, 0xB88C, 0xD216, 0xB88D, 0xD217, 0xB88E,
+ 0xD218, 0xB88F, 0xD219, 0xB890, 0xD21A, 0xB891, 0xD21B, 0xB892,
+ 0xD21C, 0xB893, 0xD21D, 0xB894, 0xD21E, 0xB895, 0xD21F, 0xB896,
+ 0xD220, 0xB897, 0xD221, 0xB898, 0xD222, 0xB899, 0xD223, 0xB89A,
+ 0xD224, 0xB89B, 0xD225, 0xB89C, 0xD226, 0xB89D, 0xD227, 0xB89E,
+ 0xD228, 0xB89F, 0xD229, 0xB8A0, 0xD22A, 0xB941, 0xD22B, 0xB942,
+ 0xD22C, 0xC5F5, 0xD22D, 0xC5F6, 0xD22E, 0xB943, 0xD22F, 0xB944,
+ 0xD230, 0xC5F7, 0xD231, 0xB945, 0xD232, 0xB946, 0xD233, 0xB947,
+ 0xD234, 0xC5F8, 0xD235, 0xB948, 0xD236, 0xB949, 0xD237, 0xB94A,
+ 0xD238, 0xB94B, 0xD239, 0xB94C, 0xD23A, 0xB94D, 0xD23B, 0xB94E,
+ 0xD23C, 0xC5F9, 0xD23D, 0xC5FA, 0xD23E, 0xB94F, 0xD23F, 0xC5FB,
+ 0xD240, 0xB950, 0xD241, 0xC5FC, 0xD242, 0xB951, 0xD243, 0xB952,
+ 0xD244, 0xB953, 0xD245, 0xB954, 0xD246, 0xB955, 0xD247, 0xB956,
+ 0xD248, 0xC5FD, 0xD249, 0xB957, 0xD24A, 0xB958, 0xD24B, 0xB959,
+ 0xD24C, 0xB95A, 0xD24D, 0xB961, 0xD24E, 0xB962, 0xD24F, 0xB963,
+ 0xD250, 0xB964, 0xD251, 0xB965, 0xD252, 0xB966, 0xD253, 0xB967,
+ 0xD254, 0xB968, 0xD255, 0xB969, 0xD256, 0xB96A, 0xD257, 0xB96B,
+ 0xD258, 0xB96C, 0xD259, 0xB96D, 0xD25A, 0xB96E, 0xD25B, 0xB96F,
+ 0xD25C, 0xC5FE, 0xD25D, 0xB970, 0xD25E, 0xB971, 0xD25F, 0xB972,
+ 0xD260, 0xB973, 0xD261, 0xB974, 0xD262, 0xB975, 0xD263, 0xB976,
+ 0xD264, 0xC6A1, 0xD265, 0xB977, 0xD266, 0xB978, 0xD267, 0xB979,
+ 0xD268, 0xB97A, 0xD269, 0xB981, 0xD26A, 0xB982, 0xD26B, 0xB983,
+ 0xD26C, 0xB984, 0xD26D, 0xB985, 0xD26E, 0xB986, 0xD26F, 0xB987,
+ 0xD270, 0xB988, 0xD271, 0xB989, 0xD272, 0xB98A, 0xD273, 0xB98B,
+ 0xD274, 0xB98C, 0xD275, 0xB98D, 0xD276, 0xB98E, 0xD277, 0xB98F,
+ 0xD278, 0xB990, 0xD279, 0xB991, 0xD27A, 0xB992, 0xD27B, 0xB993,
+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E, 0xBB44, 0xD2FF, 0xBB45,
+ 0xD300, 0xC6C0, 0xD301, 0xC6C1, 0xD302, 0xBB46, 0xD303, 0xC6C2,
+ 0xD304, 0xBB47, 0xD305, 0xC6C3, 0xD306, 0xBB48, 0xD307, 0xBB49,
+ 0xD308, 0xBB4A, 0xD309, 0xBB4B, 0xD30A, 0xBB4C, 0xD30B, 0xBB4D,
+ 0xD30C, 0xC6C4, 0xD30D, 0xC6C5, 0xD30E, 0xC6C6, 0xD30F, 0xBB4E,
+ 0xD310, 0xC6C7, 0xD311, 0xBB4F, 0xD312, 0xBB50, 0xD313, 0xBB51,
+ 0xD314, 0xC6C8, 0xD315, 0xBB52, 0xD316, 0xC6C9, 0xD317, 0xBB53,
+ 0xD318, 0xBB54, 0xD319, 0xBB55, 0xD31A, 0xBB56, 0xD31B, 0xBB57,
+ 0xD31C, 0xC6CA, 0xD31D, 0xC6CB, 0xD31E, 0xBB58, 0xD31F, 0xC6CC,
+ 0xD320, 0xC6CD, 0xD321, 0xC6CE, 0xD322, 0xBB59, 0xD323, 0xBB5A,
+ 0xD324, 0xBB61, 0xD325, 0xC6CF, 0xD326, 0xBB62, 0xD327, 0xBB63,
+ 0xD328, 0xC6D0, 0xD329, 0xC6D1, 0xD32A, 0xBB64, 0xD32B, 0xBB65,
+ 0xD32C, 0xC6D2, 0xD32D, 0xBB66, 0xD32E, 0xBB67, 0xD32F, 0xBB68,
+ 0xD330, 0xC6D3, 0xD331, 0xBB69, 0xD332, 0xBB6A, 0xD333, 0xBB6B,
+ 0xD334, 0xBB6C, 0xD335, 0xBB6D, 0xD336, 0xBB6E, 0xD337, 0xBB6F,
+ 0xD338, 0xC6D4, 0xD339, 0xC6D5, 0xD33A, 0xBB70, 0xD33B, 0xC6D6,
+ 0xD33C, 0xC6D7, 0xD33D, 0xC6D8, 0xD33E, 0xBB71, 0xD33F, 0xBB72,
+ 0xD340, 0xBB73, 0xD341, 0xBB74, 0xD342, 0xBB75, 0xD343, 0xBB76,
+ 0xD344, 0xC6D9, 0xD345, 0xC6DA, 0xD346, 0xBB77, 0xD347, 0xBB78,
+ 0xD348, 0xBB79, 0xD349, 0xBB7A, 0xD34A, 0xBB81, 0xD34B, 0xBB82,
+ 0xD34C, 0xBB83, 0xD34D, 0xBB84, 0xD34E, 0xBB85, 0xD34F, 0xBB86,
+ 0xD350, 0xBB87, 0xD351, 0xBB88, 0xD352, 0xBB89, 0xD353, 0xBB8A,
+ 0xD354, 0xBB8B, 0xD355, 0xBB8C, 0xD356, 0xBB8D, 0xD357, 0xBB8E,
+ 0xD358, 0xBB8F, 0xD359, 0xBB90, 0xD35A, 0xBB91, 0xD35B, 0xBB92,
+ 0xD35C, 0xBB93, 0xD35D, 0xBB94, 0xD35E, 0xBB95, 0xD35F, 0xBB96,
+ 0xD360, 0xBB97, 0xD361, 0xBB98, 0xD362, 0xBB99, 0xD363, 0xBB9A,
+ 0xD364, 0xBB9B, 0xD365, 0xBB9C, 0xD366, 0xBB9D, 0xD367, 0xBB9E,
+ 0xD368, 0xBB9F, 0xD369, 0xBBA0, 0xD36A, 0xBC41, 0xD36B, 0xBC42,
+ 0xD36C, 0xBC43, 0xD36D, 0xBC44, 0xD36E, 0xBC45, 0xD36F, 0xBC46,
+ 0xD370, 0xBC47, 0xD371, 0xBC48, 0xD372, 0xBC49, 0xD373, 0xBC4A,
+ 0xD374, 0xBC4B, 0xD375, 0xBC4C, 0xD376, 0xBC4D, 0xD377, 0xBC4E,
+ 0xD378, 0xBC4F, 0xD379, 0xBC50, 0xD37A, 0xBC51, 0xD37B, 0xBC52,
+ 0xD37C, 0xC6DB, 0xD37D, 0xC6DC, 0xD37E, 0xBC53, 0xD37F, 0xBC54,
+ 0xD380, 0xC6DD, 0xD381, 0xBC55, 0xD382, 0xBC56, 0xD383, 0xBC57,
+ 0xD384, 0xC6DE, 0xD385, 0xBC58, 0xD386, 0xBC59, 0xD387, 0xBC5A,
+ 0xD388, 0xBC61, 0xD389, 0xBC62, 0xD38A, 0xBC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 0xD40C, 0xBD70, 0xD40D, 0xBD71, 0xD40E, 0xBD72, 0xD40F, 0xBD73,
+ 0xD410, 0xBD74, 0xD411, 0xBD75, 0xD412, 0xBD76, 0xD413, 0xBD77,
+ 0xD414, 0xBD78, 0xD415, 0xBD79, 0xD416, 0xBD7A, 0xD417, 0xBD81,
+ 0xD418, 0xBD82, 0xD419, 0xBD83, 0xD41A, 0xBD84, 0xD41B, 0xBD85,
+ 0xD41C, 0xBD86, 0xD41D, 0xC7A2, 0xD41E, 0xBD87, 0xD41F, 0xBD88,
+ 0xD420, 0xBD89, 0xD421, 0xBD8A, 0xD422, 0xBD8B, 0xD423, 0xBD8C,
+ 0xD424, 0xBD8D, 0xD425, 0xBD8E, 0xD426, 0xBD8F, 0xD427, 0xBD90,
+ 0xD428, 0xBD91, 0xD429, 0xBD92, 0xD42A, 0xBD93, 0xD42B, 0xBD94,
+ 0xD42C, 0xBD95, 0xD42D, 0xBD96, 0xD42E, 0xBD97, 0xD42F, 0xBD98,
+ 0xD430, 0xBD99, 0xD431, 0xBD9A, 0xD432, 0xBD9B, 0xD433, 0xBD9C,
+ 0xD434, 0xBD9D, 0xD435, 0xBD9E, 0xD436, 0xBD9F, 0xD437, 0xBDA0,
+ 0xD438, 0xBE41, 0xD439, 0xBE42, 0xD43A, 0xBE43, 0xD43B, 0xBE44,
+ 0xD43C, 0xBE45, 0xD43D, 0xBE46, 0xD43E, 0xBE47, 0xD43F, 0xBE48,
+ 0xD440, 0xC7A3, 0xD441, 0xBE49, 0xD442, 0xBE4A, 0xD443, 0xBE4B,
+ 0xD444, 0xC7A4, 0xD445, 0xBE4C, 0xD446, 0xBE4D, 0xD447, 0xBE4E,
+ 0xD448, 0xBE4F, 0xD449, 0xBE50, 0xD44A, 0xBE51, 0xD44B, 0xBE52,
+ 0xD44C, 0xBE53, 0xD44D, 0xBE54, 0xD44E, 0xBE55, 0xD44F, 0xBE56,
+ 0xD450, 0xBE57, 0xD451, 0xBE58, 0xD452, 0xBE59, 0xD453, 0xBE5A,
+ 0xD454, 0xBE61, 0xD455, 0xBE62, 0xD456, 0xBE63, 0xD457, 0xBE64,
+ 0xD458, 0xBE65, 0xD459, 0xBE66, 0xD45A, 0xBE67, 0xD45B, 0xBE68,
+ 0xD45C, 0xC7A5, 0xD45D, 0xBE69, 0xD45E, 0xBE6A, 0xD45F, 0xBE6B,
+ 0xD460, 0xC7A6, 0xD461, 0xBE6C, 0xD462, 0xBE6D, 0xD463, 0xBE6E,
+ 0xD464, 0xC7A7, 0xD465, 0xBE6F, 0xD466, 0xBE70, 0xD467, 0xBE71,
+ 0xD468, 0xBE72, 0xD469, 0xBE73, 0xD46A, 0xBE74, 0xD46B, 0xBE75,
+ 0xD46C, 0xBE76, 0xD46D, 0xC7A8, 0xD46E, 0xBE77, 0xD46F, 0xC7A9,
+ 0xD470, 0xBE78, 0xD471, 0xBE79, 0xD472, 0xBE7A, 0xD473, 0xBE81,
+ 0xD474, 0xBE82, 0xD475, 0xBE83, 0xD476, 0xBE84, 0xD477, 0xBE85,
+ 0xD478, 0xC7AA, 0xD479, 0xC7AB, 0xD47A, 0xBE86, 0xD47B, 0xBE87,
+ 0xD47C, 0xC7AC, 0xD47D, 0xBE88, 0xD47E, 0xBE89, 0xD47F, 0xC7AD,
+ 0xD480, 0xC7AE, 0xD481, 0xBE8A, 0xD482, 0xC7AF, 0xD483, 0xBE8B,
+ 0xD484, 0xBE8C, 0xD485, 0xBE8D, 0xD486, 0xBE8E, 0xD487, 0xBE8F,
+ 0xD488, 0xC7B0, 0xD489, 0xC7B1, 0xD48A, 0xBE90, 0xD48B, 0xC7B2,
+ 0xD48C, 0xBE91, 0xD48D, 0xC7B3, 0xD48E, 0xBE92, 0xD48F, 0xBE93,
+ 0xD490, 0xBE94, 0xD491, 0xBE95, 0xD492, 0xBE96, 0xD493, 0xBE97,
+ 0xD494, 0xC7B4, 0xD495, 0xBE98, 0xD496, 0xBE99, 0xD497, 0xBE9A,
+ 0xD498, 0xBE9B, 0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C059, 0xD51D, 0xC05A, 0xD51E, 0xC061, 0xD51F, 0xC062,
+ 0xD520, 0xC063, 0xD521, 0xC064, 0xD522, 0xC065, 0xD523, 0xC066,
+ 0xD524, 0xC067, 0xD525, 0xC068, 0xD526, 0xC069, 0xD527, 0xC06A,
+ 0xD528, 0xC06B, 0xD529, 0xC06C, 0xD52A, 0xC06D, 0xD52B, 0xC06E,
+ 0xD52C, 0xC06F, 0xD52D, 0xC070, 0xD52E, 0xC071, 0xD52F, 0xC072,
+ 0xD530, 0xC073, 0xD531, 0xC074, 0xD532, 0xC075, 0xD533, 0xC076,
+ 0xD534, 0xC077, 0xD535, 0xC078, 0xD536, 0xC079, 0xD537, 0xC07A,
+ 0xD538, 0xC081, 0xD539, 0xC082, 0xD53A, 0xC083, 0xD53B, 0xC084,
+ 0xD53C, 0xC7C7, 0xD53D, 0xC7C8, 0xD53E, 0xC085, 0xD53F, 0xC086,
+ 0xD540, 0xC7C9, 0xD541, 0xC087, 0xD542, 0xC088, 0xD543, 0xC089,
+ 0xD544, 0xC7CA, 0xD545, 0xC08A, 0xD546, 0xC08B, 0xD547, 0xC08C,
+ 0xD548, 0xC08D, 0xD549, 0xC08E, 0xD54A, 0xC08F, 0xD54B, 0xC090,
+ 0xD54C, 0xC7CB, 0xD54D, 0xC7CC, 0xD54E, 0xC091, 0xD54F, 0xC7CD,
+ 0xD550, 0xC092, 0xD551, 0xC7CE, 0xD552, 0xC093, 0xD553, 0xC094,
+ 0xD554, 0xC095, 0xD555, 0xC096, 0xD556, 0xC097, 0xD557, 0xC098,
+ 0xD558, 0xC7CF, 0xD559, 0xC7D0, 0xD55A, 0xC099, 0xD55B, 0xC09A,
+ 0xD55C, 0xC7D1, 0xD55D, 0xC09B, 0xD55E, 0xC09C, 0xD55F, 0xC09D,
+ 0xD560, 0xC7D2, 0xD561, 0xC09E, 0xD562, 0xC09F, 0xD563, 0xC0A0,
+ 0xD564, 0xC141, 0xD565, 0xC7D3, 0xD566, 0xC142, 0xD567, 0xC143,
+ 0xD568, 0xC7D4, 0xD569, 0xC7D5, 0xD56A, 0xC144, 0xD56B, 0xC7D6,
+ 0xD56C, 0xC145, 0xD56D, 0xC7D7, 0xD56E, 0xC146, 0xD56F, 0xC147,
+ 0xD570, 0xC148, 0xD571, 0xC149, 0xD572, 0xC14A, 0xD573, 0xC14B,
+ 0xD574, 0xC7D8, 0xD575, 0xC7D9, 0xD576, 0xC14C, 0xD577, 0xC14D,
+ 0xD578, 0xC7DA, 0xD579, 0xC14E, 0xD57A, 0xC14F, 0xD57B, 0xC150,
+ 0xD57C, 0xC7DB, 0xD57D, 0xC151, 0xD57E, 0xC152, 0xD57F, 0xC153,
+ 0xD580, 0xC154, 0xD581, 0xC155, 0xD582, 0xC156, 0xD583, 0xC157,
+ 0xD584, 0xC7DC, 0xD585, 0xC7DD, 0xD586, 0xC158, 0xD587, 0xC7DE,
+ 0xD588, 0xC7DF, 0xD589, 0xC7E0, 0xD58A, 0xC159, 0xD58B, 0xC15A,
+ 0xD58C, 0xC161, 0xD58D, 0xC162, 0xD58E, 0xC163, 0xD58F, 0xC164,
+ 0xD590, 0xC7E1, 0xD591, 0xC165, 0xD592, 0xC166, 0xD593, 0xC167,
+ 0xD594, 0xC168, 0xD595, 0xC169, 0xD596, 0xC16A, 0xD597, 0xC16B,
+ 0xD598, 0xC16C, 0xD599, 0xC16D, 0xD59A, 0xC16E, 0xD59B, 0xC16F,
+ 0xD59C, 0xC170, 0xD59D, 0xC171, 0xD59E, 0xC172, 0xD59F, 0xC173,
+ 0xD5A0, 0xC174, 0xD5A1, 0xC175, 0xD5A2, 0xC176, 0xD5A3, 0xC177,
+ 0xD5A4, 0xC178, 0xD5A5, 0xC7E2, 0xD5A6, 0xC179, 0xD5A7, 0xC17A,
+ 0xD5A8, 0xC181, 0xD5A9, 0xC182, 0xD5AA, 0xC183, 0xD5AB, 0xC184,
+ 0xD5AC, 0xC185, 0xD5AD, 0xC186, 0xD5AE, 0xC187, 0xD5AF, 0xC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 0xD5F2, 0xC264, 0xD5F3, 0xC265,
+ 0xD5F4, 0xC7F0, 0xD5F5, 0xC7F1, 0xD5F6, 0xC266, 0xD5F7, 0xC7F2,
+ 0xD5F8, 0xC267, 0xD5F9, 0xC7F3, 0xD5FA, 0xC268, 0xD5FB, 0xC269,
+ 0xD5FC, 0xC26A, 0xD5FD, 0xC26B, 0xD5FE, 0xC26C, 0xD5FF, 0xC26D,
+ 0xD600, 0xC7F4, 0xD601, 0xC7F5, 0xD602, 0xC26E, 0xD603, 0xC26F,
+ 0xD604, 0xC7F6, 0xD605, 0xC270, 0xD606, 0xC271, 0xD607, 0xC272,
+ 0xD608, 0xC7F7, 0xD609, 0xC273, 0xD60A, 0xC274, 0xD60B, 0xC275,
+ 0xD60C, 0xC276, 0xD60D, 0xC277, 0xD60E, 0xC278, 0xD60F, 0xC279,
+ 0xD610, 0xC7F8, 0xD611, 0xC7F9, 0xD612, 0xC27A, 0xD613, 0xC7FA,
+ 0xD614, 0xC7FB, 0xD615, 0xC7FC, 0xD616, 0xC281, 0xD617, 0xC282,
+ 0xD618, 0xC283, 0xD619, 0xC284, 0xD61A, 0xC285, 0xD61B, 0xC286,
+ 0xD61C, 0xC7FD, 0xD61D, 0xC287, 0xD61E, 0xC288, 0xD61F, 0xC289,
+ 0xD620, 0xC7FE, 0xD621, 0xC28A, 0xD622, 0xC28B, 0xD623, 0xC28C,
+ 0xD624, 0xC8A1, 0xD625, 0xC28D, 0xD626, 0xC28E, 0xD627, 0xC28F,
+ 0xD628, 0xC290, 0xD629, 0xC291, 0xD62A, 0xC292, 0xD62B, 0xC293,
+ 0xD62C, 0xC294, 0xD62D, 0xC8A2, 0xD62E, 0xC295, 0xD62F, 0xC296,
+ 0xD630, 0xC297, 0xD631, 0xC298, 0xD632, 0xC299, 0xD633, 0xC29A,
+ 0xD634, 0xC29B, 0xD635, 0xC29C, 0xD636, 0xC29D, 0xD637, 0xC29E,
+ 0xD638, 0xC8A3, 0xD639, 0xC8A4, 0xD63A, 0xC29F, 0xD63B, 0xC2A0,
+ 0xD63C, 0xC8A5, 0xD63D, 0xC341, 0xD63E, 0xC342, 0xD63F, 0xC343,
+ 0xD640, 0xC8A6, 0xD641, 0xC344, 0xD642, 0xC345, 0xD643, 0xC346,
+ 0xD644, 0xC347, 0xD645, 0xC8A7, 0xD646, 0xC348, 0xD647, 0xC349,
+ 0xD648, 0xC8A8, 0xD649, 0xC8A9, 0xD64A, 0xC34A, 0xD64B, 0xC8AA,
+ 0xD64C, 0xC34B, 0xD64D, 0xC8AB, 0xD64E, 0xC34C, 0xD64F, 0xC34D,
+ 0xD650, 0xC34E, 0xD651, 0xC8AC, 0xD652, 0xC34F, 0xD653, 0xC350,
+ 0xD654, 0xC8AD, 0xD655, 0xC8AE, 0xD656, 0xC351, 0xD657, 0xC352,
+ 0xD658, 0xC8AF, 0xD659, 0xC353, 0xD65A, 0xC354, 0xD65B, 0xC355,
+ 0xD65C, 0xC8B0, 0xD65D, 0xC356, 0xD65E, 0xC357, 0xD65F, 0xC358,
+ 0xD660, 0xC359, 0xD661, 0xC35A, 0xD662, 0xC361, 0xD663, 0xC362,
+ 0xD664, 0xC363, 0xD665, 0xC364, 0xD666, 0xC365, 0xD667, 0xC8B1,
+ 0xD668, 0xC366, 0xD669, 0xC8B2, 0xD66A, 0xC367, 0xD66B, 0xC368,
+ 0xD66C, 0xC369, 0xD66D, 0xC36A, 0xD66E, 0xC36B, 0xD66F, 0xC36C,
+ 0xD670, 0xC8B3, 0xD671, 0xC8B4, 0xD672, 0xC36D, 0xD673, 0xC36E,
+ 0xD674, 0xC8B5, 0xD675, 0xC36F, 0xD676, 0xC370, 0xD677, 0xC371,
+ 0xD678, 0xC372, 0xD679, 0xC373, 0xD67A, 0xC374, 0xD67B, 0xC375,
+ 0xD67C, 0xC376, 0xD67D, 0xC377, 0xD67E, 0xC378, 0xD67F, 0xC379,
+ 0xD680, 0xC37A, 0xD681, 0xC381, 0xD682, 0xC382, 0xD683, 0xC8B6,
+ 0xD684, 0xC383, 0xD685, 0xC8B7, 0xD686, 0xC384, 0xD687, 0xC385,
+ 0xD688, 0xC386, 0xD689, 0xC387, 0xD68A, 0xC388, 0xD68B, 0xC389,
+ 0xD68C, 0xC8B8, 0xD68D, 0xC8B9, 0xD68E, 0xC38A, 0xD68F, 0xC38B,
+ 0xD690, 0xC8BA, 0xD691, 0xC38C, 0xD692, 0xC38D, 0xD693, 0xC38E,
+ 0xD694, 0xC8BB, 0xD695, 0xC38F, 0xD696, 0xC390, 0xD697, 0xC391,
+ 0xD698, 0xC392, 0xD699, 0xC393, 0xD69A, 0xC394, 0xD69B, 0xC395,
+ 0xD69C, 0xC396, 0xD69D, 0xC8BC, 0xD69E, 0xC397, 0xD69F, 0xC8BD,
+ 0xD6A0, 0xC398, 0xD6A1, 0xC8BE, 0xD6A2, 0xC399, 0xD6A3, 0xC39A,
+ 0xD6A4, 0xC39B, 0xD6A5, 0xC39C, 0xD6A6, 0xC39D, 0xD6A7, 0xC39E,
+ 0xD6A8, 0xC8BF, 0xD6A9, 0xC39F, 0xD6AA, 0xC3A0, 0xD6AB, 0xC441,
+ 0xD6AC, 0xC8C0, 0xD6AD, 0xC442, 0xD6AE, 0xC443, 0xD6AF, 0xC444,
+ 0xD6B0, 0xC8C1, 0xD6B1, 0xC445, 0xD6B2, 0xC446, 0xD6B3, 0xC447,
+ 0xD6B4, 0xC448, 0xD6B5, 0xC449, 0xD6B6, 0xC44A, 0xD6B7, 0xC44B,
+ 0xD6B8, 0xC44C, 0xD6B9, 0xC8C2, 0xD6BA, 0xC44D, 0xD6BB, 0xC8C3,
+ 0xD6BC, 0xC44E, 0xD6BD, 0xC44F, 0xD6BE, 0xC450, 0xD6BF, 0xC451,
+ 0xD6C0, 0xC452, 0xD6C1, 0xC453, 0xD6C2, 0xC454, 0xD6C3, 0xC455,
+ 0xD6C4, 0xC8C4, 0xD6C5, 0xC8C5, 0xD6C6, 0xC456, 0xD6C7, 0xC457,
+ 0xD6C8, 0xC8C6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0xD70D, 0xC49A, 0xD70E, 0xC49B, 0xD70F, 0xC49C,
+ 0xD710, 0xC49D, 0xD711, 0xC8D5, 0xD712, 0xC49E, 0xD713, 0xC49F,
+ 0xD714, 0xC4A0, 0xD715, 0xC541, 0xD716, 0xC542, 0xD717, 0xC543,
+ 0xD718, 0xC8D6, 0xD719, 0xC8D7, 0xD71A, 0xC544, 0xD71B, 0xC545,
+ 0xD71C, 0xC8D8, 0xD71D, 0xC546, 0xD71E, 0xC547, 0xD71F, 0xC548,
+ 0xD720, 0xC8D9, 0xD721, 0xC549, 0xD722, 0xC54A, 0xD723, 0xC54B,
+ 0xD724, 0xC54C, 0xD725, 0xC54D, 0xD726, 0xC54E, 0xD727, 0xC54F,
+ 0xD728, 0xC8DA, 0xD729, 0xC8DB, 0xD72A, 0xC550, 0xD72B, 0xC8DC,
+ 0xD72C, 0xC551, 0xD72D, 0xC8DD, 0xD72E, 0xC552, 0xD72F, 0xC553,
+ 0xD730, 0xC554, 0xD731, 0xC555, 0xD732, 0xC556, 0xD733, 0xC557,
+ 0xD734, 0xC8DE, 0xD735, 0xC8DF, 0xD736, 0xC558, 0xD737, 0xC559,
+ 0xD738, 0xC8E0, 0xD739, 0xC55A, 0xD73A, 0xC561, 0xD73B, 0xC562,
+ 0xD73C, 0xC8E1, 0xD73D, 0xC563, 0xD73E, 0xC564, 0xD73F, 0xC565,
+ 0xD740, 0xC566, 0xD741, 0xC567, 0xD742, 0xC568, 0xD743, 0xC569,
+ 0xD744, 0xC8E2, 0xD745, 0xC56A, 0xD746, 0xC56B, 0xD747, 0xC8E3,
+ 0xD748, 0xC56C, 0xD749, 0xC8E4, 0xD74A, 0xC56D, 0xD74B, 0xC56E,
+ 0xD74C, 0xC56F, 0xD74D, 0xC570, 0xD74E, 0xC571, 0xD74F, 0xC572,
+ 0xD750, 0xC8E5, 0xD751, 0xC8E6, 0xD752, 0xC573, 0xD753, 0xC574,
+ 0xD754, 0xC8E7, 0xD755, 0xC575, 0xD756, 0xC8E8, 0xD757, 0xC8E9,
+ 0xD758, 0xC8EA, 0xD759, 0xC8EB, 0xD75A, 0xC576, 0xD75B, 0xC577,
+ 0xD75C, 0xC578, 0xD75D, 0xC579, 0xD75E, 0xC57A, 0xD75F, 0xC581,
+ 0xD760, 0xC8EC, 0xD761, 0xC8ED, 0xD762, 0xC582, 0xD763, 0xC8EE,
+ 0xD764, 0xC583, 0xD765, 0xC8EF, 0xD766, 0xC584, 0xD767, 0xC585,
+ 0xD768, 0xC586, 0xD769, 0xC8F0, 0xD76A, 0xC587, 0xD76B, 0xC588,
+ 0xD76C, 0xC8F1, 0xD76D, 0xC589, 0xD76E, 0xC58A, 0xD76F, 0xC58B,
+ 0xD770, 0xC8F2, 0xD771, 0xC58C, 0xD772, 0xC58D, 0xD773, 0xC58E,
+ 0xD774, 0xC8F3, 0xD775, 0xC58F, 0xD776, 0xC590, 0xD777, 0xC591,
+ 0xD778, 0xC592, 0xD779, 0xC593, 0xD77A, 0xC594, 0xD77B, 0xC595,
+ 0xD77C, 0xC8F4, 0xD77D, 0xC8F5, 0xD77E, 0xC596, 0xD77F, 0xC597,
+ 0xD780, 0xC598, 0xD781, 0xC8F6, 0xD782, 0xC599, 0xD783, 0xC59A,
+ 0xD784, 0xC59B, 0xD785, 0xC59C, 0xD786, 0xC59D, 0xD787, 0xC59E,
+ 0xD788, 0xC8F7, 0xD789, 0xC8F8, 0xD78A, 0xC59F, 0xD78B, 0xC5A0,
+ 0xD78C, 0xC8F9, 0xD78D, 0xC641, 0xD78E, 0xC642, 0xD78F, 0xC643,
+ 0xD790, 0xC8FA, 0xD791, 0xC644, 0xD792, 0xC645, 0xD793, 0xC646,
+ 0xD794, 0xC647, 0xD795, 0xC648, 0xD796, 0xC649, 0xD797, 0xC64A,
+ 0xD798, 0xC8FB, 0xD799, 0xC8FC, 0xD79A, 0xC64B, 0xD79B, 0xC8FD,
+ 0xD79C, 0xC64C, 0xD79D, 0xC8FE, 0xD79E, 0xC64D, 0xD79F, 0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AC22, 0x814F, 0xAC23, 0x8150, 0xAC25,
+ 0x8151, 0xAC26, 0x8152, 0xAC27, 0x8153, 0xAC28, 0x8154, 0xAC29,
+ 0x8155, 0xAC2A, 0x8156, 0xAC2B, 0x8157, 0xAC2E, 0x8158, 0xAC32,
+ 0x8159, 0xAC33, 0x815A, 0xAC34, 0x8161, 0xAC35, 0x8162, 0xAC36,
+ 0x8163, 0xAC37, 0x8164, 0xAC3A, 0x8165, 0xAC3B, 0x8166, 0xAC3D,
+ 0x8167, 0xAC3E, 0x8168, 0xAC3F, 0x8169, 0xAC41, 0x816A, 0xAC42,
+ 0x816B, 0xAC43, 0x816C, 0xAC44, 0x816D, 0xAC45, 0x816E, 0xAC46,
+ 0x816F, 0xAC47, 0x8170, 0xAC48, 0x8171, 0xAC49, 0x8172, 0xAC4A,
+ 0x8173, 0xAC4C, 0x8174, 0xAC4E, 0x8175, 0xAC4F, 0x8176, 0xAC50,
+ 0x8177, 0xAC51, 0x8178, 0xAC52, 0x8179, 0xAC53, 0x817A, 0xAC55,
+ 0x8181, 0xAC56, 0x8182, 0xAC57, 0x8183, 0xAC59, 0x8184, 0xAC5A,
+ 0x8185, 0xAC5B, 0x8186, 0xAC5D, 0x8187, 0xAC5E, 0x8188, 0xAC5F,
+ 0x8189, 0xAC60, 0x818A, 0xAC61, 0x818B, 0xAC62, 0x818C, 0xAC63,
+ 0x818D, 0xAC64, 0x818E, 0xAC65, 0x818F, 0xAC66, 0x8190, 0xAC67,
+ 0x8191, 0xAC68, 0x8192, 0xAC69, 0x8193, 0xAC6A, 0x8194, 0xAC6B,
+ 0x8195, 0xAC6C, 0x8196, 0xAC6D, 0x8197, 0xAC6E, 0x8198, 0xAC6F,
+ 0x8199, 0xAC72, 0x819A, 0xAC73, 0x819B, 0xAC75, 0x819C, 0xAC76,
+ 0x819D, 0xAC79, 0x819E, 0xAC7B, 0x819F, 0xAC7C, 0x81A0, 0xAC7D,
+ 0x81A1, 0xAC7E, 0x81A2, 0xAC7F, 0x81A3, 0xAC82, 0x81A4, 0xAC87,
+ 0x81A5, 0xAC88, 0x81A6, 0xAC8D, 0x81A7, 0xAC8E, 0x81A8, 0xAC8F,
+ 0x81A9, 0xAC91, 0x81AA, 0xAC92, 0x81AB, 0xAC93, 0x81AC, 0xAC95,
+ 0x81AD, 0xAC96, 0x81AE, 0xAC97, 0x81AF, 0xAC98, 0x81B0, 0xAC99,
+ 0x81B1, 0xAC9A, 0x81B2, 0xAC9B, 0x81B3, 0xAC9E, 0x81B4, 0xACA2,
+ 0x81B5, 0xACA3, 0x81B6, 0xACA4, 0x81B7, 0xACA5, 0x81B8, 0xACA6,
+ 0x81B9, 0xACA7, 0x81BA, 0xACAB, 0x81BB, 0xACAD, 0x81BC, 0xACAE,
+ 0x81BD, 0xACB1, 0x81BE, 0xACB2, 0x81BF, 0xACB3, 0x81C0, 0xACB4,
+ 0x81C1, 0xACB5, 0x81C2, 0xACB6, 0x81C3, 0xACB7, 0x81C4, 0xACBA,
+ 0x81C5, 0xACBE, 0x81C6, 0xACBF, 0x81C7, 0xACC0, 0x81C8, 0xACC2,
+ 0x81C9, 0xACC3, 0x81CA, 0xACC5, 0x81CB, 0xACC6, 0x81CC, 0xACC7,
+ 0x81CD, 0xACC9, 0x81CE, 0xACCA, 0x81CF, 0xACCB, 0x81D0, 0xACCD,
+ 0x81D1, 0xACCE, 0x81D2, 0xACCF, 0x81D3, 0xACD0, 0x81D4, 0xACD1,
+ 0x81D5, 0xACD2, 0x81D6, 0xACD3, 0x81D7, 0xACD4, 0x81D8, 0xACD6,
+ 0x81D9, 0xACD8, 0x81DA, 0xACD9, 0x81DB, 0xACDA, 0x81DC, 0xACDB,
+ 0x81DD, 0xACDC, 0x81DE, 0xACDD, 0x81DF, 0xACDE, 0x81E0, 0xACDF,
+ 0x81E1, 0xACE2, 0x81E2, 0xACE3, 0x81E3, 0xACE5, 0x81E4, 0xACE6,
+ 0x81E5, 0xACE9, 0x81E6, 0xACEB, 0x81E7, 0xACED, 0x81E8, 0xACEE,
+ 0x81E9, 0xACF2, 0x81EA, 0xACF4, 0x81EB, 0xACF7, 0x81EC, 0xACF8,
+ 0x81ED, 0xACF9, 0x81EE, 0xACFA, 0x81EF, 0xACFB, 0x81F0, 0xACFE,
+ 0x81F1, 0xACFF, 0x81F2, 0xAD01, 0x81F3, 0xAD02, 0x81F4, 0xAD03,
+ 0x81F5, 0xAD05, 0x81F6, 0xAD07, 0x81F7, 0xAD08, 0x81F8, 0xAD09,
+ 0x81F9, 0xAD0A, 0x81FA, 0xAD0B, 0x81FB, 0xAD0E, 0x81FC, 0xAD10,
+ 0x81FD, 0xAD12, 0x81FE, 0xAD13, 0x8241, 0xAD14, 0x8242, 0xAD15,
+ 0x8243, 0xAD16, 0x8244, 0xAD17, 0x8245, 0xAD19, 0x8246, 0xAD1A,
+ 0x8247, 0xAD1B, 0x8248, 0xAD1D, 0x8249, 0xAD1E, 0x824A, 0xAD1F,
+ 0x824B, 0xAD21, 0x824C, 0xAD22, 0x824D, 0xAD23, 0x824E, 0xAD24,
+ 0x824F, 0xAD25, 0x8250, 0xAD26, 0x8251, 0xAD27, 0x8252, 0xAD28,
+ 0x8253, 0xAD2A, 0x8254, 0xAD2B, 0x8255, 0xAD2E, 0x8256, 0xAD2F,
+ 0x8257, 0xAD30, 0x8258, 0xAD31, 0x8259, 0xAD32, 0x825A, 0xAD33,
+ 0x8261, 0xAD36, 0x8262, 0xAD37, 0x8263, 0xAD39, 0x8264, 0xAD3A,
+ 0x8265, 0xAD3B, 0x8266, 0xAD3D, 0x8267, 0xAD3E, 0x8268, 0xAD3F,
+ 0x8269, 0xAD40, 0x826A, 0xAD41, 0x826B, 0xAD42, 0x826C, 0xAD43,
+ 0x826D, 0xAD46, 0x826E, 0xAD48, 0x826F, 0xAD4A, 0x8270, 0xAD4B,
+ 0x8271, 0xAD4C, 0x8272, 0xAD4D, 0x8273, 0xAD4E, 0x8274, 0xAD4F,
+ 0x8275, 0xAD51, 0x8276, 0xAD52, 0x8277, 0xAD53, 0x8278, 0xAD55,
+ 0x8279, 0xAD56, 0x827A, 0xAD57, 0x8281, 0xAD59, 0x8282, 0xAD5A,
+ 0x8283, 0xAD5B, 0x8284, 0xAD5C, 0x8285, 0xAD5D, 0x8286, 0xAD5E,
+ 0x8287, 0xAD5F, 0x8288, 0xAD60, 0x8289, 0xAD62, 0x828A, 0xAD64,
+ 0x828B, 0xAD65, 0x828C, 0xAD66, 0x828D, 0xAD67, 0x828E, 0xAD68,
+ 0x828F, 0xAD69, 0x8290, 0xAD6A, 0x8291, 0xAD6B, 0x8292, 0xAD6E,
+ 0x8293, 0xAD6F, 0x8294, 0xAD71, 0x8295, 0xAD72, 0x8296, 0xAD77,
+ 0x8297, 0xAD78, 0x8298, 0xAD79, 0x8299, 0xAD7A, 0x829A, 0xAD7E,
+ 0x829B, 0xAD80, 0x829C, 0xAD83, 0x829D, 0xAD84, 0x829E, 0xAD85,
+ 0x829F, 0xAD86, 0x82A0, 0xAD87, 0x82A1, 0xAD8A, 0x82A2, 0xAD8B,
+ 0x82A3, 0xAD8D, 0x82A4, 0xAD8E, 0x82A5, 0xAD8F, 0x82A6, 0xAD91,
+ 0x82A7, 0xAD92, 0x82A8, 0xAD93, 0x82A9, 0xAD94, 0x82AA, 0xAD95,
+ 0x82AB, 0xAD96, 0x82AC, 0xAD97, 0x82AD, 0xAD98, 0x82AE, 0xAD99,
+ 0x82AF, 0xAD9A, 0x82B0, 0xAD9B, 0x82B1, 0xAD9E, 0x82B2, 0xAD9F,
+ 0x82B3, 0xADA0, 0x82B4, 0xADA1, 0x82B5, 0xADA2, 0x82B6, 0xADA3,
+ 0x82B7, 0xADA5, 0x82B8, 0xADA6, 0x82B9, 0xADA7, 0x82BA, 0xADA8,
+ 0x82BB, 0xADA9, 0x82BC, 0xADAA, 0x82BD, 0xADAB, 0x82BE, 0xADAC,
+ 0x82BF, 0xADAD, 0x82C0, 0xADAE, 0x82C1, 0xADAF, 0x82C2, 0xADB0,
+ 0x82C3, 0xADB1, 0x82C4, 0xADB2, 0x82C5, 0xADB3, 0x82C6, 0xADB4,
+ 0x82C7, 0xADB5, 0x82C8, 0xADB6, 0x82C9, 0xADB8, 0x82CA, 0xADB9,
+ 0x82CB, 0xADBA, 0x82CC, 0xADBB, 0x82CD, 0xADBC, 0x82CE, 0xADBD,
+ 0x82CF, 0xADBE, 0x82D0, 0xADBF, 0x82D1, 0xADC2, 0x82D2, 0xADC3,
+ 0x82D3, 0xADC5, 0x82D4, 0xADC6, 0x82D5, 0xADC7, 0x82D6, 0xADC9,
+ 0x82D7, 0xADCA, 0x82D8, 0xADCB, 0x82D9, 0xADCC, 0x82DA, 0xADCD,
+ 0x82DB, 0xADCE, 0x82DC, 0xADCF, 0x82DD, 0xADD2, 0x82DE, 0xADD4,
+ 0x82DF, 0xADD5, 0x82E0, 0xADD6, 0x82E1, 0xADD7, 0x82E2, 0xADD8,
+ 0x82E3, 0xADD9, 0x82E4, 0xADDA, 0x82E5, 0xADDB, 0x82E6, 0xADDD,
+ 0x82E7, 0xADDE, 0x82E8, 0xADDF, 0x82E9, 0xADE1, 0x82EA, 0xADE2,
+ 0x82EB, 0xADE3, 0x82EC, 0xADE5, 0x82ED, 0xADE6, 0x82EE, 0xADE7,
+ 0x82EF, 0xADE8, 0x82F0, 0xADE9, 0x82F1, 0xADEA, 0x82F2, 0xADEB,
+ 0x82F3, 0xADEC, 0x82F4, 0xADED, 0x82F5, 0xADEE, 0x82F6, 0xADEF,
+ 0x82F7, 0xADF0, 0x82F8, 0xADF1, 0x82F9, 0xADF2, 0x82FA, 0xADF3,
+ 0x82FB, 0xADF4, 0x82FC, 0xADF5, 0x82FD, 0xADF6, 0x82FE, 0xADF7,
+ 0x8341, 0xADFA, 0x8342, 0xADFB, 0x8343, 0xADFD, 0x8344, 0xADFE,
+ 0x8345, 0xAE02, 0x8346, 0xAE03, 0x8347, 0xAE04, 0x8348, 0xAE05,
+ 0x8349, 0xAE06, 0x834A, 0xAE07, 0x834B, 0xAE0A, 0x834C, 0xAE0C,
+ 0x834D, 0xAE0E, 0x834E, 0xAE0F, 0x834F, 0xAE10, 0x8350, 0xAE11,
+ 0x8351, 0xAE12, 0x8352, 0xAE13, 0x8353, 0xAE15, 0x8354, 0xAE16,
+ 0x8355, 0xAE17, 0x8356, 0xAE18, 0x8357, 0xAE19, 0x8358, 0xAE1A,
+ 0x8359, 0xAE1B, 0x835A, 0xAE1C, 0x8361, 0xAE1D, 0x8362, 0xAE1E,
+ 0x8363, 0xAE1F, 0x8364, 0xAE20, 0x8365, 0xAE21, 0x8366, 0xAE22,
+ 0x8367, 0xAE23, 0x8368, 0xAE24, 0x8369, 0xAE25, 0x836A, 0xAE26,
+ 0x836B, 0xAE27, 0x836C, 0xAE28, 0x836D, 0xAE29, 0x836E, 0xAE2A,
+ 0x836F, 0xAE2B, 0x8370, 0xAE2C, 0x8371, 0xAE2D, 0x8372, 0xAE2E,
+ 0x8373, 0xAE2F, 0x8374, 0xAE32, 0x8375, 0xAE33, 0x8376, 0xAE35,
+ 0x8377, 0xAE36, 0x8378, 0xAE39, 0x8379, 0xAE3B, 0x837A, 0xAE3C,
+ 0x8381, 0xAE3D, 0x8382, 0xAE3E, 0x8383, 0xAE3F, 0x8384, 0xAE42,
+ 0x8385, 0xAE44, 0x8386, 0xAE47, 0x8387, 0xAE48, 0x8388, 0xAE49,
+ 0x8389, 0xAE4B, 0x838A, 0xAE4F, 0x838B, 0xAE51, 0x838C, 0xAE52,
+ 0x838D, 0xAE53, 0x838E, 0xAE55, 0x838F, 0xAE57, 0x8390, 0xAE58,
+ 0x8391, 0xAE59, 0x8392, 0xAE5A, 0x8393, 0xAE5B, 0x8394, 0xAE5E,
+ 0x8395, 0xAE62, 0x8396, 0xAE63, 0x8397, 0xAE64, 0x8398, 0xAE66,
+ 0x8399, 0xAE67, 0x839A, 0xAE6A, 0x839B, 0xAE6B, 0x839C, 0xAE6D,
+ 0x839D, 0xAE6E, 0x839E, 0xAE6F, 0x839F, 0xAE71,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 0xAEBF, 0x83E3, 0xAEC1, 0x83E4, 0xAEC2,
+ 0x83E5, 0xAEC3, 0x83E6, 0xAEC5, 0x83E7, 0xAEC6, 0x83E8, 0xAEC7,
+ 0x83E9, 0xAEC8, 0x83EA, 0xAEC9, 0x83EB, 0xAECA, 0x83EC, 0xAECB,
+ 0x83ED, 0xAECE, 0x83EE, 0xAED2, 0x83EF, 0xAED3, 0x83F0, 0xAED4,
+ 0x83F1, 0xAED5, 0x83F2, 0xAED6, 0x83F3, 0xAED7, 0x83F4, 0xAEDA,
+ 0x83F5, 0xAEDB, 0x83F6, 0xAEDD, 0x83F7, 0xAEDE, 0x83F8, 0xAEDF,
+ 0x83F9, 0xAEE0, 0x83FA, 0xAEE1, 0x83FB, 0xAEE2, 0x83FC, 0xAEE3,
+ 0x83FD, 0xAEE4, 0x83FE, 0xAEE5, 0x8441, 0xAEE6, 0x8442, 0xAEE7,
+ 0x8443, 0xAEE9, 0x8444, 0xAEEA, 0x8445, 0xAEEC, 0x8446, 0xAEEE,
+ 0x8447, 0xAEEF, 0x8448, 0xAEF0, 0x8449, 0xAEF1, 0x844A, 0xAEF2,
+ 0x844B, 0xAEF3, 0x844C, 0xAEF5, 0x844D, 0xAEF6, 0x844E, 0xAEF7,
+ 0x844F, 0xAEF9, 0x8450, 0xAEFA, 0x8451, 0xAEFB, 0x8452, 0xAEFD,
+ 0x8453, 0xAEFE, 0x8454, 0xAEFF, 0x8455, 0xAF00, 0x8456, 0xAF01,
+ 0x8457, 0xAF02, 0x8458, 0xAF03, 0x8459, 0xAF04, 0x845A, 0xAF05,
+ 0x8461, 0xAF06, 0x8462, 0xAF09, 0x8463, 0xAF0A, 0x8464, 0xAF0B,
+ 0x8465, 0xAF0C, 0x8466, 0xAF0E, 0x8467, 0xAF0F, 0x8468, 0xAF11,
+ 0x8469, 0xAF12, 0x846A, 0xAF13, 0x846B, 0xAF14, 0x846C, 0xAF15,
+ 0x846D, 0xAF16, 0x846E, 0xAF17, 0x846F, 0xAF18, 0x8470, 0xAF19,
+ 0x8471, 0xAF1A, 0x8472, 0xAF1B, 0x8473, 0xAF1C, 0x8474, 0xAF1D,
+ 0x8475, 0xAF1E, 0x8476, 0xAF1F, 0x8477, 0xAF20, 0x8478, 0xAF21,
+ 0x8479, 0xAF22, 0x847A, 0xAF23, 0x8481, 0xAF24, 0x8482, 0xAF25,
+ 0x8483, 0xAF26, 0x8484, 0xAF27, 0x8485, 0xAF28, 0x8486, 0xAF29,
+ 0x8487, 0xAF2A, 0x8488, 0xAF2B, 0x8489, 0xAF2E, 0x848A, 0xAF2F,
+ 0x848B, 0xAF31, 0x848C, 0xAF33, 0x848D, 0xAF35, 0x848E, 0xAF36,
+ 0x848F, 0xAF37, 0x8490, 0xAF38, 0x8491, 0xAF39, 0x8492, 0xAF3A,
+ 0x8493, 0xAF3B, 0x8494, 0xAF3E, 0x8495, 0xAF40, 0x8496, 0xAF44,
+ 0x8497, 0xAF45, 0x8498, 0xAF46, 0x8499, 0xAF47, 0x849A, 0xAF4A,
+ 0x849B, 0xAF4B, 0x849C, 0xAF4C, 0x849D, 0xAF4D, 0x849E, 0xAF4E,
+ 0x849F, 0xAF4F, 0x84A0, 0xAF51, 0x84A1, 0xAF52, 0x84A2, 0xAF53,
+ 0x84A3, 0xAF54, 0x84A4, 0xAF55, 0x84A5, 0xAF56, 0x84A6, 0xAF57,
+ 0x84A7, 0xAF58, 0x84A8, 0xAF59, 0x84A9, 0xAF5A, 0x84AA, 0xAF5B,
+ 0x84AB, 0xAF5E, 0x84AC, 0xAF5F, 0x84AD, 0xAF60, 0x84AE, 0xAF61,
+ 0x84AF, 0xAF62, 0x84B0, 0xAF63, 0x84B1, 0xAF66, 0x84B2, 0xAF67,
+ 0x84B3, 0xAF68, 0x84B4, 0xAF69, 0x84B5, 0xAF6A, 0x84B6, 0xAF6B,
+ 0x84B7, 0xAF6C, 0x84B8, 0xAF6D, 0x84B9, 0xAF6E, 0x84BA, 0xAF6F,
+ 0x84BB, 0xAF70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 0xAFBE,
+ 0x8541, 0xAFBF, 0x8542, 0xAFC1, 0x8543, 0xAFC2, 0x8544, 0xAFC3,
+ 0x8545, 0xAFC4, 0x8546, 0xAFC5, 0x8547, 0xAFC6, 0x8548, 0xAFCA,
+ 0x8549, 0xAFCC, 0x854A, 0xAFCF, 0x854B, 0xAFD0, 0x854C, 0xAFD1,
+ 0x854D, 0xAFD2, 0x854E, 0xAFD3, 0x854F, 0xAFD5, 0x8550, 0xAFD6,
+ 0x8551, 0xAFD7, 0x8552, 0xAFD8, 0x8553, 0xAFD9, 0x8554, 0xAFDA,
+ 0x8555, 0xAFDB, 0x8556, 0xAFDD, 0x8557, 0xAFDE, 0x8558, 0xAFDF,
+ 0x8559, 0xAFE0, 0x855A, 0xAFE1, 0x8561, 0xAFE2, 0x8562, 0xAFE3,
+ 0x8563, 0xAFE4, 0x8564, 0xAFE5, 0x8565, 0xAFE6, 0x8566, 0xAFE7,
+ 0x8567, 0xAFEA, 0x8568, 0xAFEB, 0x8569, 0xAFEC, 0x856A, 0xAFED,
+ 0x856B, 0xAFEE, 0x856C, 0xAFEF, 0x856D, 0xAFF2, 0x856E, 0xAFF3,
+ 0x856F, 0xAFF5, 0x8570, 0xAFF6, 0x8571, 0xAFF7, 0x8572, 0xAFF9,
+ 0x8573, 0xAFFA, 0x8574, 0xAFFB, 0x8575, 0xAFFC, 0x8576, 0xAFFD,
+ 0x8577, 0xAFFE, 0x8578, 0xAFFF, 0x8579, 0xB002, 0x857A, 0xB003,
+ 0x8581, 0xB005, 0x8582, 0xB006, 0x8583, 0xB007, 0x8584, 0xB008,
+ 0x8585, 0xB009, 0x8586, 0xB00A, 0x8587, 0xB00B, 0x8588, 0xB00D,
+ 0x8589, 0xB00E, 0x858A, 0xB00F, 0x858B, 0xB011, 0x858C, 0xB012,
+ 0x858D, 0xB013, 0x858E, 0xB015, 0x858F, 0xB016, 0x8590, 0xB017,
+ 0x8591, 0xB018, 0x8592, 0xB019, 0x8593, 0xB01A, 0x8594, 0xB01B,
+ 0x8595, 0xB01E, 0x8596, 0xB01F, 0x8597, 0xB020, 0x8598, 0xB021,
+ 0x8599, 0xB022, 0x859A, 0xB023, 0x859B, 0xB024, 0x859C, 0xB025,
+ 0x859D, 0xB026, 0x859E, 0xB027, 0x859F, 0xB029, 0x85A0, 0xB02A,
+ 0x85A1, 0xB02B, 0x85A2, 0xB02C, 0x85A3, 0xB02D, 0x85A4, 0xB02E,
+ 0x85A5, 0xB02F, 0x85A6, 0xB030, 0x85A7, 0xB031, 0x85A8, 0xB032,
+ 0x85A9, 0xB033, 0x85AA, 0xB034, 0x85AB, 0xB035, 0x85AC, 0xB036,
+ 0x85AD, 0xB037, 0x85AE, 0xB038, 0x85AF, 0xB039, 0x85B0, 0xB03A,
+ 0x85B1, 0xB03B, 0x85B2, 0xB03C, 0x85B3, 0xB03D, 0x85B4, 0xB03E,
+ 0x85B5, 0xB03F, 0x85B6, 0xB040, 0x85B7, 0xB041, 0x85B8, 0xB042,
+ 0x85B9, 0xB043, 0x85BA, 0xB046, 0x85BB, 0xB047, 0x85BC, 0xB049,
+ 0x85BD, 0xB04B, 0x85BE, 0xB04D, 0x85BF, 0xB04F, 0x85C0, 0xB050,
+ 0x85C1, 0xB051, 0x85C2, 0xB052, 0x85C3, 0xB056, 0x85C4, 0xB058,
+ 0x85C5, 0xB05A, 0x85C6, 0xB05B, 0x85C7, 0xB05C, 0x85C8, 0xB05E,
+ 0x85C9, 0xB05F, 0x85CA, 0xB060, 0x85CB, 0xB061, 0x85CC, 0xB062,
+ 0x85CD, 0xB063, 0x85CE, 0xB064, 0x85CF, 0xB065, 0x85D0, 0xB066,
+ 0x85D1, 0xB067, 0x85D2, 0xB068, 0x85D3, 0xB069, 0x85D4, 0xB06A,
+ 0x85D5, 0xB06B, 0x85D6, 0xB06C, 0x85D7, 0xB06D, 0x85D8, 0xB06E,
+ 0x85D9, 0xB06F, 0x85DA, 0xB070, 0x85DB, 0xB071, 0x85DC, 0xB072,
+ 0x85DD, 0xB073, 0x85DE, 0xB074, 0x85DF, 0xB075, 0x85E0, 0xB076,
+ 0x85E1, 0xB077, 0x85E2, 0xB078, 0x85E3, 0xB079, 0x85E4, 0xB07A,
+ 0x85E5, 0xB07B, 0x85E6, 0xB07E, 0x85E7, 0xB07F, 0x85E8, 0xB081,
+ 0x85E9, 0xB082, 0x85EA, 0xB083, 0x85EB, 0xB085, 0x85EC, 0xB086,
+ 0x85ED, 0xB087, 0x85EE, 0xB088, 0x85EF, 0xB089, 0x85F0, 0xB08A,
+ 0x85F1, 0xB08B, 0x85F2, 0xB08E, 0x85F3, 0xB090, 0x85F4, 0xB092,
+ 0x85F5, 0xB093, 0x85F6, 0xB094, 0x85F7, 0xB095, 0x85F8, 0xB096,
+ 0x85F9, 0xB097, 0x85FA, 0xB09B, 0x85FB, 0xB09D, 0x85FC, 0xB09E,
+ 0x85FD, 0xB0A3, 0x85FE, 0xB0A4, 0x8641, 0xB0A5, 0x8642, 0xB0A6,
+ 0x8643, 0xB0A7, 0x8644, 0xB0AA, 0x8645, 0xB0B0, 0x8646, 0xB0B2,
+ 0x8647, 0xB0B6, 0x8648, 0xB0B7, 0x8649, 0xB0B9, 0x864A, 0xB0BA,
+ 0x864B, 0xB0BB, 0x864C, 0xB0BD, 0x864D, 0xB0BE, 0x864E, 0xB0BF,
+ 0x864F, 0xB0C0, 0x8650, 0xB0C1, 0x8651, 0xB0C2, 0x8652, 0xB0C3,
+ 0x8653, 0xB0C6, 0x8654, 0xB0CA, 0x8655, 0xB0CB, 0x8656, 0xB0CC,
+ 0x8657, 0xB0CD, 0x8658, 0xB0CE, 0x8659, 0xB0CF, 0x865A, 0xB0D2,
+ 0x8661, 0xB0D3, 0x8662, 0xB0D5, 0x8663, 0xB0D6, 0x8664, 0xB0D7,
+ 0x8665, 0xB0D9, 0x8666, 0xB0DA, 0x8667, 0xB0DB, 0x8668, 0xB0DC,
+ 0x8669, 0xB0DD, 0x866A, 0xB0DE, 0x866B, 0xB0DF, 0x866C, 0xB0E1,
+ 0x866D, 0xB0E2, 0x866E, 0xB0E3, 0x866F, 0xB0E4, 0x8670, 0xB0E6,
+ 0x8671, 0xB0E7, 0x8672, 0xB0E8, 0x8673, 0xB0E9, 0x8674, 0xB0EA,
+ 0x8675, 0xB0EB, 0x8676, 0xB0EC, 0x8677, 0xB0ED, 0x8678, 0xB0EE,
+ 0x8679, 0xB0EF, 0x867A, 0xB0F0, 0x8681, 0xB0F1, 0x8682, 0xB0F2,
+ 0x8683, 0xB0F3, 0x8684, 0xB0F4, 0x8685, 0xB0F5, 0x8686, 0xB0F6,
+ 0x8687, 0xB0F7, 0x8688, 0xB0F8, 0x8689, 0xB0F9, 0x868A, 0xB0FA,
+ 0x868B, 0xB0FB, 0x868C, 0xB0FC, 0x868D, 0xB0FD, 0x868E, 0xB0FE,
+ 0x868F, 0xB0FF, 0x8690, 0xB100, 0x8691, 0xB101, 0x8692, 0xB102,
+ 0x8693, 0xB103, 0x8694, 0xB104, 0x8695, 0xB105, 0x8696, 0xB106,
+ 0x8697, 0xB107, 0x8698, 0xB10A, 0x8699, 0xB10D, 0x869A, 0xB10E,
+ 0x869B, 0xB10F, 0x869C, 0xB111, 0x869D, 0xB114, 0x869E, 0xB115,
+ 0x869F, 0xB116, 0x86A0, 0xB117, 0x86A1, 0xB11A, 0x86A2, 0xB11E,
+ 0x86A3, 0xB11F, 0x86A4, 0xB120, 0x86A5, 0xB121, 0x86A6, 0xB122,
+ 0x86A7, 0xB126, 0x86A8, 0xB127, 0x86A9, 0xB129, 0x86AA, 0xB12A,
+ 0x86AB, 0xB12B, 0x86AC, 0xB12D, 0x86AD, 0xB12E, 0x86AE, 0xB12F,
+ 0x86AF, 0xB130, 0x86B0, 0xB131, 0x86B1, 0xB132, 0x86B2, 0xB133,
+ 0x86B3, 0xB136, 0x86B4, 0xB13A, 0x86B5, 0xB13B, 0x86B6, 0xB13C,
+ 0x86B7, 0xB13D, 0x86B8, 0xB13E, 0x86B9, 0xB13F, 0x86BA, 0xB142,
+ 0x86BB, 0xB143, 0x86BC, 0xB145, 0x86BD, 0xB146, 0x86BE, 0xB147,
+ 0x86BF, 0xB149, 0x86C0, 0xB14A, 0x86C1, 0xB14B, 0x86C2, 0xB14C,
+ 0x86C3, 0xB14D, 0x86C4, 0xB14E, 0x86C5, 0xB14F, 0x86C6, 0xB152,
+ 0x86C7, 0xB153, 0x86C8, 0xB156, 0x86C9, 0xB157, 0x86CA, 0xB159,
+ 0x86CB, 0xB15A, 0x86CC, 0xB15B, 0x86CD, 0xB15D, 0x86CE, 0xB15E,
+ 0x86CF, 0xB15F, 0x86D0, 0xB161, 0x86D1, 0xB162, 0x86D2, 0xB163,
+ 0x86D3, 0xB164, 0x86D4, 0xB165, 0x86D5, 0xB166, 0x86D6, 0xB167,
+ 0x86D7, 0xB168, 0x86D8, 0xB169, 0x86D9, 0xB16A, 0x86DA, 0xB16B,
+ 0x86DB, 0xB16C, 0x86DC, 0xB16D, 0x86DD, 0xB16E, 0x86DE, 0xB16F,
+ 0x86DF, 0xB170, 0x86E0, 0xB171, 0x86E1, 0xB172, 0x86E2, 0xB173,
+ 0x86E3, 0xB174, 0x86E4, 0xB175, 0x86E5, 0xB176, 0x86E6, 0xB177,
+ 0x86E7, 0xB17A, 0x86E8, 0xB17B, 0x86E9, 0xB17D, 0x86EA, 0xB17E,
+ 0x86EB, 0xB17F, 0x86EC, 0xB181, 0x86ED, 0xB183, 0x86EE, 0xB184,
+ 0x86EF, 0xB185, 0x86F0, 0xB186, 0x86F1, 0xB187, 0x86F2, 0xB18A,
+ 0x86F3, 0xB18C, 0x86F4, 0xB18E, 0x86F5, 0xB18F, 0x86F6, 0xB190,
+ 0x86F7, 0xB191, 0x86F8, 0xB195, 0x86F9, 0xB196, 0x86FA, 0xB197,
+ 0x86FB, 0xB199, 0x86FC, 0xB19A, 0x86FD, 0xB19B, 0x86FE, 0xB19D,
+ 0x8741, 0xB19E, 0x8742, 0xB19F, 0x8743, 0xB1A0, 0x8744, 0xB1A1,
+ 0x8745, 0xB1A2, 0x8746, 0xB1A3, 0x8747, 0xB1A4, 0x8748, 0xB1A5,
+ 0x8749, 0xB1A6, 0x874A, 0xB1A7, 0x874B, 0xB1A9, 0x874C, 0xB1AA,
+ 0x874D, 0xB1AB, 0x874E, 0xB1AC, 0x874F, 0xB1AD, 0x8750, 0xB1AE,
+ 0x8751, 0xB1AF, 0x8752, 0xB1B0, 0x8753, 0xB1B1, 0x8754, 0xB1B2,
+ 0x8755, 0xB1B3, 0x8756, 0xB1B4, 0x8757, 0xB1B5, 0x8758, 0xB1B6,
+ 0x8759, 0xB1B7, 0x875A, 0xB1B8, 0x8761, 0xB1B9, 0x8762, 0xB1BA,
+ 0x8763, 0xB1BB, 0x8764, 0xB1BC, 0x8765, 0xB1BD, 0x8766, 0xB1BE,
+ 0x8767, 0xB1BF, 0x8768, 0xB1C0, 0x8769, 0xB1C1, 0x876A, 0xB1C2,
+ 0x876B, 0xB1C3, 0x876C, 0xB1C4, 0x876D, 0xB1C5, 0x876E, 0xB1C6,
+ 0x876F, 0xB1C7, 0x8770, 0xB1C8, 0x8771, 0xB1C9, 0x8772, 0xB1CA,
+ 0x8773, 0xB1CB, 0x8774, 0xB1CD, 0x8775, 0xB1CE, 0x8776, 0xB1CF,
+ 0x8777, 0xB1D1, 0x8778, 0xB1D2, 0x8779, 0xB1D3, 0x877A, 0xB1D5,
+ 0x8781, 0xB1D6, 0x8782, 0xB1D7, 0x8783, 0xB1D8, 0x8784, 0xB1D9,
+ 0x8785, 0xB1DA, 0x8786, 0xB1DB, 0x8787, 0xB1DE, 0x8788, 0xB1E0,
+ 0x8789, 0xB1E1, 0x878A, 0xB1E2, 0x878B, 0xB1E3, 0x878C, 0xB1E4,
+ 0x878D, 0xB1E5, 0x878E, 0xB1E6, 0x878F, 0xB1E7, 0x8790, 0xB1EA,
+ 0x8791, 0xB1EB, 0x8792, 0xB1ED, 0x8793, 0xB1EE, 0x8794, 0xB1EF,
+ 0x8795, 0xB1F1, 0x8796, 0xB1F2, 0x8797, 0xB1F3, 0x8798, 0xB1F4,
+ 0x8799, 0xB1F5, 0x879A, 0xB1F6, 0x879B, 0xB1F7, 0x879C, 0xB1F8,
+ 0x879D, 0xB1FA, 0x879E, 0xB1FC, 0x879F, 0xB1FE, 0x87A0, 0xB1FF,
+ 0x87A1, 0xB200, 0x87A2, 0xB201, 0x87A3, 0xB202, 0x87A4, 0xB203,
+ 0x87A5, 0xB206, 0x87A6, 0xB207, 0x87A7, 0xB209, 0x87A8, 0xB20A,
+ 0x87A9, 0xB20D, 0x87AA, 0xB20E, 0x87AB, 0xB20F, 0x87AC, 0xB210,
+ 0x87AD, 0xB211, 0x87AE, 0xB212, 0x87AF, 0xB213, 0x87B0, 0xB216,
+ 0x87B1, 0xB218, 0x87B2, 0xB21A, 0x87B3, 0xB21B, 0x87B4, 0xB21C,
+ 0x87B5, 0xB21D, 0x87B6, 0xB21E, 0x87B7, 0xB21F, 0x87B8, 0xB221,
+ 0x87B9, 0xB222, 0x87BA, 0xB223, 0x87BB, 0xB224, 0x87BC, 0xB225,
+ 0x87BD, 0xB226, 0x87BE, 0xB227, 0x87BF, 0xB228, 0x87C0, 0xB229,
+ 0x87C1, 0xB22A, 0x87C2, 0xB22B, 0x87C3, 0xB22C, 0x87C4, 0xB22D,
+ 0x87C5, 0xB22E, 0x87C6, 0xB22F, 0x87C7, 0xB230, 0x87C8, 0xB231,
+ 0x87C9, 0xB232, 0x87CA, 0xB233, 0x87CB, 0xB235, 0x87CC, 0xB236,
+ 0x87CD, 0xB237, 0x87CE, 0xB238, 0x87CF, 0xB239, 0x87D0, 0xB23A,
+ 0x87D1, 0xB23B, 0x87D2, 0xB23D, 0x87D3, 0xB23E, 0x87D4, 0xB23F,
+ 0x87D5, 0xB240, 0x87D6, 0xB241, 0x87D7, 0xB242, 0x87D8, 0xB243,
+ 0x87D9, 0xB244, 0x87DA, 0xB245, 0x87DB, 0xB246, 0x87DC, 0xB247,
+ 0x87DD, 0xB248, 0x87DE, 0xB249, 0x87DF, 0xB24A, 0x87E0, 0xB24B,
+ 0x87E1, 0xB24C, 0x87E2, 0xB24D, 0x87E3, 0xB24E, 0x87E4, 0xB24F,
+ 0x87E5, 0xB250, 0x87E6, 0xB251, 0x87E7, 0xB252, 0x87E8, 0xB253,
+ 0x87E9, 0xB254, 0x87EA, 0xB255, 0x87EB, 0xB256, 0x87EC, 0xB257,
+ 0x87ED, 0xB259, 0x87EE, 0xB25A, 0x87EF, 0xB25B, 0x87F0, 0xB25D,
+ 0x87F1, 0xB25E, 0x87F2, 0xB25F, 0x87F3, 0xB261, 0x87F4, 0xB262,
+ 0x87F5, 0xB263, 0x87F6, 0xB264, 0x87F7, 0xB265, 0x87F8, 0xB266,
+ 0x87F9, 0xB267, 0x87FA, 0xB26A, 0x87FB, 0xB26B, 0x87FC, 0xB26C,
+ 0x87FD, 0xB26D, 0x87FE, 0xB26E, 0x8841, 0xB26F, 0x8842, 0xB270,
+ 0x8843, 0xB271, 0x8844, 0xB272, 0x8845, 0xB273, 0x8846, 0xB276,
+ 0x8847, 0xB277, 0x8848, 0xB278, 0x8849, 0xB279, 0x884A, 0xB27A,
+ 0x884B, 0xB27B, 0x884C, 0xB27D, 0x884D, 0xB27E, 0x884E, 0xB27F,
+ 0x884F, 0xB280, 0x8850, 0xB281, 0x8851, 0xB282, 0x8852, 0xB283,
+ 0x8853, 0xB286, 0x8854, 0xB287, 0x8855, 0xB288, 0x8856, 0xB28A,
+ 0x8857, 0xB28B, 0x8858, 0xB28C, 0x8859, 0xB28D, 0x885A, 0xB28E,
+ 0x8861, 0xB28F, 0x8862, 0xB292, 0x8863, 0xB293, 0x8864, 0xB295,
+ 0x8865, 0xB296, 0x8866, 0xB297, 0x8867, 0xB29B, 0x8868, 0xB29C,
+ 0x8869, 0xB29D, 0x886A, 0xB29E, 0x886B, 0xB29F, 0x886C, 0xB2A2,
+ 0x886D, 0xB2A4, 0x886E, 0xB2A7, 0x886F, 0xB2A8, 0x8870, 0xB2A9,
+ 0x8871, 0xB2AB, 0x8872, 0xB2AD, 0x8873, 0xB2AE, 0x8874, 0xB2AF,
+ 0x8875, 0xB2B1, 0x8876, 0xB2B2, 0x8877, 0xB2B3, 0x8878, 0xB2B5,
+ 0x8879, 0xB2B6, 0x887A, 0xB2B7, 0x8881, 0xB2B8, 0x8882, 0xB2B9,
+ 0x8883, 0xB2BA, 0x8884, 0xB2BB, 0x8885, 0xB2BC, 0x8886, 0xB2BD,
+ 0x8887, 0xB2BE, 0x8888, 0xB2BF, 0x8889, 0xB2C0, 0x888A, 0xB2C1,
+ 0x888B, 0xB2C2, 0x888C, 0xB2C3, 0x888D, 0xB2C4, 0x888E, 0xB2C5,
+ 0x888F, 0xB2C6, 0x8890, 0xB2C7, 0x8891, 0xB2CA, 0x8892, 0xB2CB,
+ 0x8893, 0xB2CD, 0x8894, 0xB2CE, 0x8895, 0xB2CF, 0x8896, 0xB2D1,
+ 0x8897, 0xB2D3, 0x8898, 0xB2D4, 0x8899, 0xB2D5, 0x889A, 0xB2D6,
+ 0x889B, 0xB2D7, 0x889C, 0xB2DA, 0x889D, 0xB2DC, 0x889E, 0xB2DE,
+ 0x889F, 0xB2DF, 0x88A0, 0xB2E0, 0x88A1, 0xB2E1, 0x88A2, 0xB2E3,
+ 0x88A3, 0xB2E7, 0x88A4, 0xB2E9, 0x88A5, 0xB2EA, 0x88A6, 0xB2F0,
+ 0x88A7, 0xB2F1, 0x88A8, 0xB2F2, 0x88A9, 0xB2F6, 0x88AA, 0xB2FC,
+ 0x88AB, 0xB2FD, 0x88AC, 0xB2FE, 0x88AD, 0xB302, 0x88AE, 0xB303,
+ 0x88AF, 0xB305, 0x88B0, 0xB306, 0x88B1, 0xB307, 0x88B2, 0xB309,
+ 0x88B3, 0xB30A, 0x88B4, 0xB30B, 0x88B5, 0xB30C, 0x88B6, 0xB30D,
+ 0x88B7, 0xB30E, 0x88B8, 0xB30F, 0x88B9, 0xB312, 0x88BA, 0xB316,
+ 0x88BB, 0xB317, 0x88BC, 0xB318, 0x88BD, 0xB319, 0x88BE, 0xB31A,
+ 0x88BF, 0xB31B, 0x88C0, 0xB31D, 0x88C1, 0xB31E, 0x88C2, 0xB31F,
+ 0x88C3, 0xB320, 0x88C4, 0xB321, 0x88C5, 0xB322, 0x88C6, 0xB323,
+ 0x88C7, 0xB324, 0x88C8, 0xB325, 0x88C9, 0xB326, 0x88CA, 0xB327,
+ 0x88CB, 0xB328, 0x88CC, 0xB329, 0x88CD, 0xB32A, 0x88CE, 0xB32B,
+ 0x88CF, 0xB32C, 0x88D0, 0xB32D, 0x88D1, 0xB32E, 0x88D2, 0xB32F,
+ 0x88D3, 0xB330, 0x88D4, 0xB331, 0x88D5, 0xB332, 0x88D6, 0xB333,
+ 0x88D7, 0xB334, 0x88D8, 0xB335, 0x88D9, 0xB336, 0x88DA, 0xB337,
+ 0x88DB, 0xB338, 0x88DC, 0xB339, 0x88DD, 0xB33A, 0x88DE, 0xB33B,
+ 0x88DF, 0xB33C, 0x88E0, 0xB33D, 0x88E1, 0xB33E, 0x88E2, 0xB33F,
+ 0x88E3, 0xB340, 0x88E4, 0xB341, 0x88E5, 0xB342, 0x88E6, 0xB343,
+ 0x88E7, 0xB344, 0x88E8, 0xB345, 0x88E9, 0xB346, 0x88EA, 0xB347,
+ 0x88EB, 0xB348, 0x88EC, 0xB349, 0x88ED, 0xB34A, 0x88EE, 0xB34B,
+ 0x88EF, 0xB34C, 0x88F0, 0xB34D, 0x88F1, 0xB34E, 0x88F2, 0xB34F,
+ 0x88F3, 0xB350, 0x88F4, 0xB351, 0x88F5, 0xB352, 0x88F6, 0xB353,
+ 0x88F7, 0xB357, 0x88F8, 0xB359, 0x88F9, 0xB35A, 0x88FA, 0xB35D,
+ 0x88FB, 0xB360, 0x88FC, 0xB361, 0x88FD, 0xB362, 0x88FE, 0xB363,
+ 0x8941, 0xB366, 0x8942, 0xB368, 0x8943, 0xB36A, 0x8944, 0xB36C,
+ 0x8945, 0xB36D, 0x8946, 0xB36F, 0x8947, 0xB372, 0x8948, 0xB373,
+ 0x8949, 0xB375, 0x894A, 0xB376, 0x894B, 0xB377, 0x894C, 0xB379,
+ 0x894D, 0xB37A, 0x894E, 0xB37B, 0x894F, 0xB37C, 0x8950, 0xB37D,
+ 0x8951, 0xB37E, 0x8952, 0xB37F, 0x8953, 0xB382, 0x8954, 0xB386,
+ 0x8955, 0xB387, 0x8956, 0xB388, 0x8957, 0xB389, 0x8958, 0xB38A,
+ 0x8959, 0xB38B, 0x895A, 0xB38D, 0x8961, 0xB38E, 0x8962, 0xB38F,
+ 0x8963, 0xB391, 0x8964, 0xB392, 0x8965, 0xB393, 0x8966, 0xB395,
+ 0x8967, 0xB396, 0x8968, 0xB397, 0x8969, 0xB398, 0x896A, 0xB399,
+ 0x896B, 0xB39A, 0x896C, 0xB39B, 0x896D, 0xB39C, 0x896E, 0xB39D,
+ 0x896F, 0xB39E, 0x8970, 0xB39F, 0x8971, 0xB3A2, 0x8972, 0xB3A3,
+ 0x8973, 0xB3A4, 0x8974, 0xB3A5, 0x8975, 0xB3A6, 0x8976, 0xB3A7,
+ 0x8977, 0xB3A9, 0x8978, 0xB3AA, 0x8979, 0xB3AB, 0x897A, 0xB3AD,
+ 0x8981, 0xB3AE, 0x8982, 0xB3AF, 0x8983, 0xB3B0, 0x8984, 0xB3B1,
+ 0x8985, 0xB3B2, 0x8986, 0xB3B3, 0x8987, 0xB3B4, 0x8988, 0xB3B5,
+ 0x8989, 0xB3B6, 0x898A, 0xB3B7, 0x898B, 0xB3B8, 0x898C, 0xB3B9,
+ 0x898D, 0xB3BA, 0x898E, 0xB3BB, 0x898F, 0xB3BC, 0x8990, 0xB3BD,
+ 0x8991, 0xB3BE, 0x8992, 0xB3BF, 0x8993, 0xB3C0, 0x8994, 0xB3C1,
+ 0x8995, 0xB3C2, 0x8996, 0xB3C3, 0x8997, 0xB3C6, 0x8998, 0xB3C7,
+ 0x8999, 0xB3C9, 0x899A, 0xB3CA, 0x899B, 0xB3CD, 0x899C, 0xB3CF,
+ 0x899D, 0xB3D1, 0x899E, 0xB3D2, 0x899F, 0xB3D3, 0x89A0, 0xB3D6,
+ 0x89A1, 0xB3D8, 0x89A2, 0xB3DA, 0x89A3, 0xB3DC, 0x89A4, 0xB3DE,
+ 0x89A5, 0xB3DF, 0x89A6, 0xB3E1, 0x89A7, 0xB3E2, 0x89A8, 0xB3E3,
+ 0x89A9, 0xB3E5, 0x89AA, 0xB3E6, 0x89AB, 0xB3E7, 0x89AC, 0xB3E9,
+ 0x89AD, 0xB3EA, 0x89AE, 0xB3EB, 0x89AF, 0xB3EC, 0x89B0, 0xB3ED,
+ 0x89B1, 0xB3EE, 0x89B2, 0xB3EF, 0x89B3, 0xB3F0, 0x89B4, 0xB3F1,
+ 0x89B5, 0xB3F2, 0x89B6, 0xB3F3, 0x89B7, 0xB3F4, 0x89B8, 0xB3F5,
+ 0x89B9, 0xB3F6, 0x89BA, 0xB3F7, 0x89BB, 0xB3F8, 0x89BC, 0xB3F9,
+ 0x89BD, 0xB3FA, 0x89BE, 0xB3FB, 0x89BF, 0xB3FD, 0x89C0, 0xB3FE,
+ 0x89C1, 0xB3FF, 0x89C2, 0xB400, 0x89C3, 0xB401, 0x89C4, 0xB402,
+ 0x89C5, 0xB403, 0x89C6, 0xB404, 0x89C7, 0xB405, 0x89C8, 0xB406,
+ 0x89C9, 0xB407, 0x89CA, 0xB408, 0x89CB, 0xB409, 0x89CC, 0xB40A,
+ 0x89CD, 0xB40B, 0x89CE, 0xB40C, 0x89CF, 0xB40D, 0x89D0, 0xB40E,
+ 0x89D1, 0xB40F, 0x89D2, 0xB411, 0x89D3, 0xB412, 0x89D4, 0xB413,
+ 0x89D5, 0xB414, 0x89D6, 0xB415, 0x89D7, 0xB416, 0x89D8, 0xB417,
+ 0x89D9, 0xB419, 0x89DA, 0xB41A, 0x89DB, 0xB41B, 0x89DC, 0xB41D,
+ 0x89DD, 0xB41E, 0x89DE, 0xB41F, 0x89DF, 0xB421, 0x89E0, 0xB422,
+ 0x89E1, 0xB423, 0x89E2, 0xB424, 0x89E3, 0xB425, 0x89E4, 0xB426,
+ 0x89E5, 0xB427, 0x89E6, 0xB42A, 0x89E7, 0xB42C, 0x89E8, 0xB42D,
+ 0x89E9, 0xB42E, 0x89EA, 0xB42F, 0x89EB, 0xB430, 0x89EC, 0xB431,
+ 0x89ED, 0xB432, 0x89EE, 0xB433, 0x89EF, 0xB435, 0x89F0, 0xB436,
+ 0x89F1, 0xB437, 0x89F2, 0xB438, 0x89F3, 0xB439, 0x89F4, 0xB43A,
+ 0x89F5, 0xB43B, 0x89F6, 0xB43C, 0x89F7, 0xB43D, 0x89F8, 0xB43E,
+ 0x89F9, 0xB43F, 0x89FA, 0xB440, 0x89FB, 0xB441, 0x89FC, 0xB442,
+ 0x89FD, 0xB443, 0x89FE, 0xB444, 0x8A41, 0xB445, 0x8A42, 0xB446,
+ 0x8A43, 0xB447, 0x8A44, 0xB448, 0x8A45, 0xB449, 0x8A46, 0xB44A,
+ 0x8A47, 0xB44B, 0x8A48, 0xB44C, 0x8A49, 0xB44D, 0x8A4A, 0xB44E,
+ 0x8A4B, 0xB44F, 0x8A4C, 0xB452, 0x8A4D, 0xB453, 0x8A4E, 0xB455,
+ 0x8A4F, 0xB456, 0x8A50, 0xB457, 0x8A51, 0xB459, 0x8A52, 0xB45A,
+ 0x8A53, 0xB45B, 0x8A54, 0xB45C, 0x8A55, 0xB45D, 0x8A56, 0xB45E,
+ 0x8A57, 0xB45F, 0x8A58, 0xB462, 0x8A59, 0xB464, 0x8A5A, 0xB466,
+ 0x8A61, 0xB467, 0x8A62, 0xB468, 0x8A63, 0xB469, 0x8A64, 0xB46A,
+ 0x8A65, 0xB46B, 0x8A66, 0xB46D, 0x8A67, 0xB46E, 0x8A68, 0xB46F,
+ 0x8A69, 0xB470, 0x8A6A, 0xB471, 0x8A6B, 0xB472, 0x8A6C, 0xB473,
+ 0x8A6D, 0xB474, 0x8A6E, 0xB475, 0x8A6F, 0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+ 0x8AF7, 0xB511, 0x8AF8, 0xB512, 0x8AF9, 0xB513, 0x8AFA, 0xB516,
+ 0x8AFB, 0xB517, 0x8AFC, 0xB519, 0x8AFD, 0xB51A, 0x8AFE, 0xB51D,
+ 0x8B41, 0xB51E, 0x8B42, 0xB51F, 0x8B43, 0xB520, 0x8B44, 0xB521,
+ 0x8B45, 0xB522, 0x8B46, 0xB523, 0x8B47, 0xB526, 0x8B48, 0xB52B,
+ 0x8B49, 0xB52C, 0x8B4A, 0xB52D, 0x8B4B, 0xB52E, 0x8B4C, 0xB52F,
+ 0x8B4D, 0xB532, 0x8B4E, 0xB533, 0x8B4F, 0xB535, 0x8B50, 0xB536,
+ 0x8B51, 0xB537, 0x8B52, 0xB539, 0x8B53, 0xB53A, 0x8B54, 0xB53B,
+ 0x8B55, 0xB53C, 0x8B56, 0xB53D, 0x8B57, 0xB53E, 0x8B58, 0xB53F,
+ 0x8B59, 0xB542, 0x8B5A, 0xB546, 0x8B61, 0xB547, 0x8B62, 0xB548,
+ 0x8B63, 0xB549, 0x8B64, 0xB54A, 0x8B65, 0xB54E, 0x8B66, 0xB54F,
+ 0x8B67, 0xB551, 0x8B68, 0xB552, 0x8B69, 0xB553, 0x8B6A, 0xB555,
+ 0x8B6B, 0xB556, 0x8B6C, 0xB557, 0x8B6D, 0xB558, 0x8B6E, 0xB559,
+ 0x8B6F, 0xB55A, 0x8B70, 0xB55B, 0x8B71, 0xB55E, 0x8B72, 0xB562,
+ 0x8B73, 0xB563, 0x8B74, 0xB564, 0x8B75, 0xB565, 0x8B76, 0xB566,
+ 0x8B77, 0xB567, 0x8B78, 0xB568, 0x8B79, 0xB569, 0x8B7A, 0xB56A,
+ 0x8B81, 0xB56B, 0x8B82, 0xB56C, 0x8B83, 0xB56D, 0x8B84, 0xB56E,
+ 0x8B85, 0xB56F, 0x8B86, 0xB570, 0x8B87, 0xB571, 0x8B88, 0xB572,
+ 0x8B89, 0xB573, 0x8B8A, 0xB574, 0x8B8B, 0x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xB60D,
+ 0x8C4F, 0xB60E, 0x8C50, 0xB60F, 0x8C51, 0xB612, 0x8C52, 0xB613,
+ 0x8C53, 0xB615, 0x8C54, 0xB616, 0x8C55, 0xB617, 0x8C56, 0xB619,
+ 0x8C57, 0xB61A, 0x8C58, 0xB61B, 0x8C59, 0xB61C, 0x8C5A, 0xB61D,
+ 0x8C61, 0xB61E, 0x8C62, 0xB61F, 0x8C63, 0xB620, 0x8C64, 0xB621,
+ 0x8C65, 0xB622, 0x8C66, 0xB623, 0x8C67, 0xB624, 0x8C68, 0xB626,
+ 0x8C69, 0xB627, 0x8C6A, 0xB628, 0x8C6B, 0xB629, 0x8C6C, 0xB62A,
+ 0x8C6D, 0xB62B, 0x8C6E, 0xB62D, 0x8C6F, 0xB62E, 0x8C70, 0xB62F,
+ 0x8C71, 0xB630, 0x8C72, 0xB631, 0x8C73, 0xB632, 0x8C74, 0xB633,
+ 0x8C75, 0xB635, 0x8C76, 0xB636, 0x8C77, 0xB637, 0x8C78, 0xB638,
+ 0x8C79, 0xB639, 0x8C7A, 0xB63A, 0x8C81, 0xB63B, 0x8C82, 0xB63C,
+ 0x8C83, 0xB63D, 0x8C84, 0xB63E, 0x8C85, 0xB63F, 0x8C86, 0xB640,
+ 0x8C87, 0xB641, 0x8C88, 0xB642, 0x8C89, 0xB643, 0x8C8A, 0xB644,
+ 0x8C8B, 0xB645, 0x8C8C, 0xB646, 0x8C8D, 0xB647, 0x8C8E, 0xB649,
+ 0x8C8F, 0xB64A, 0x8C90, 0xB64B, 0x8C91, 0xB64C, 0x8C92, 0xB64D,
+ 0x8C93, 0xB64E, 0x8C94, 0xB64F, 0x8C95, 0xB650, 0x8C96, 0xB651,
+ 0x8C97, 0xB652, 0x8C98, 0xB653, 0x8C99, 0xB654, 0x8C9A, 0xB655,
+ 0x8C9B, 0xB656, 0x8C9C, 0xB657, 0x8C9D, 0xB658, 0x8C9E, 0xB659,
+ 0x8C9F, 0xB65A, 0x8CA0, 0xB65B, 0x8CA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, 0x8EC9, 0xB842, 0x8ECA, 0xB843,
+ 0x8ECB, 0xB845, 0x8ECC, 0xB846, 0x8ECD, 0xB847, 0x8ECE, 0xB848,
+ 0x8ECF, 0xB849, 0x8ED0, 0xB84A, 0x8ED1, 0xB84B, 0x8ED2, 0xB84C,
+ 0x8ED3, 0xB84D, 0x8ED4, 0xB84E, 0x8ED5, 0xB84F, 0x8ED6, 0xB850,
+ 0x8ED7, 0xB852, 0x8ED8, 0xB854, 0x8ED9, 0xB855, 0x8EDA, 0xB856,
+ 0x8EDB, 0xB857, 0x8EDC, 0xB858, 0x8EDD, 0xB859, 0x8EDE, 0xB85A,
+ 0x8EDF, 0xB85B, 0x8EE0, 0xB85E, 0x8EE1, 0xB85F, 0x8EE2, 0xB861,
+ 0x8EE3, 0xB862, 0x8EE4, 0xB863, 0x8EE5, 0xB865, 0x8EE6, 0xB866,
+ 0x8EE7, 0xB867, 0x8EE8, 0xB868, 0x8EE9, 0xB869, 0x8EEA, 0xB86A,
+ 0x8EEB, 0xB86B, 0x8EEC, 0xB86E, 0x8EED, 0xB870, 0x8EEE, 0xB872,
+ 0x8EEF, 0xB873, 0x8EF0, 0xB874, 0x8EF1, 0xB875, 0x8EF2, 0xB876,
+ 0x8EF3, 0xB877, 0x8EF4, 0xB879, 0x8EF5, 0xB87A, 0x8EF6, 0xB87B,
+ 0x8EF7, 0xB87D, 0x8EF8, 0xB87E, 0x8EF9, 0xB87F, 0x8EFA, 0xB880,
+ 0x8EFB, 0xB881, 0x8EFC, 0xB882, 0x8EFD, 0xB883, 0x8EFE, 0xB884,
+ 0x8F41, 0xB885, 0x8F42, 0xB886, 0x8F43, 0xB887, 0x8F44, 0xB888,
+ 0x8F45, 0xB889, 0x8F46, 0xB88A, 0x8F47, 0xB88B, 0x8F48, 0xB88C,
+ 0x8F49, 0xB88E, 0x8F4A, 0xB88F, 0x8F4B, 0xB890, 0x8F4C, 0xB891,
+ 0x8F4D, 0xB892, 0x8F4E, 0xB893, 0x8F4F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F, 0x8FDE, 0xB930, 0x8FDF, 0xB931, 0x8FE0, 0xB932,
+ 0x8FE1, 0xB933, 0x8FE2, 0xB934, 0x8FE3, 0xB935, 0x8FE4, 0xB936,
+ 0x8FE5, 0xB937, 0x8FE6, 0xB938, 0x8FE7, 0xB939, 0x8FE8, 0xB93A,
+ 0x8FE9, 0xB93B, 0x8FEA, 0xB93E, 0x8FEB, 0xB93F, 0x8FEC, 0xB941,
+ 0x8FED, 0xB942, 0x8FEE, 0xB943, 0x8FEF, 0xB945, 0x8FF0, 0xB946,
+ 0x8FF1, 0xB947, 0x8FF2, 0xB948, 0x8FF3, 0xB949, 0x8FF4, 0xB94A,
+ 0x8FF5, 0xB94B, 0x8FF6, 0xB94D, 0x8FF7, 0xB94E, 0x8FF8, 0xB950,
+ 0x8FF9, 0xB952, 0x8FFA, 0xB953, 0x8FFB, 0xB954, 0x8FFC, 0xB955,
+ 0x8FFD, 0xB956, 0x8FFE, 0xB957, 0x9041, 0xB95A, 0x9042, 0xB95B,
+ 0x9043, 0xB95D, 0x9044, 0xB95E, 0x9045, 0xB95F, 0x9046, 0xB961,
+ 0x9047, 0xB962, 0x9048, 0xB963, 0x9049, 0xB964, 0x904A, 0xB965,
+ 0x904B, 0xB966, 0x904C, 0xB967, 0x904D, 0xB96A, 0x904E, 0xB96C,
+ 0x904F, 0xB96E, 0x9050, 0xB96F, 0x9051, 0xB970, 0x9052, 0xB971,
+ 0x9053, 0xB972, 0x9054, 0xB973, 0x9055, 0xB976, 0x9056, 0xB977,
+ 0x9057, 0xB979, 0x9058, 0xB97A, 0x9059, 0xB97B, 0x905A, 0xB97D,
+ 0x9061, 0xB97E, 0x9062, 0xB97F, 0x9063, 0xB980, 0x9064, 0xB981,
+ 0x9065, 0xB982, 0x9066, 0xB983, 0x9067, 0xB986, 0x9068, 0xB988,
+ 0x9069, 0xB98B, 0x906A, 0xB98C, 0x906B, 0xB98F, 0x906C, 0xB990,
+ 0x906D, 0xB991, 0x906E, 0xB992, 0x906F, 0xB993, 0x9070, 0xB994,
+ 0x9071, 0xB995, 0x9072, 0xB996, 0x9073, 0xB997, 0x9074, 0xB998,
+ 0x9075, 0xB999, 0x9076, 0xB99A, 0x9077, 0xB99B, 0x9078, 0xB99C,
+ 0x9079, 0xB99D, 0x907A, 0xB99E, 0x9081, 0xB99F, 0x9082, 0xB9A0,
+ 0x9083, 0xB9A1, 0x9084, 0xB9A2, 0x9085, 0xB9A3, 0x9086, 0xB9A4,
+ 0x9087, 0xB9A5, 0x9088, 0xB9A6, 0x9089, 0xB9A7, 0x908A, 0xB9A8,
+ 0x908B, 0xB9A9, 0x908C, 0xB9AA, 0x908D, 0xB9AB, 0x908E, 0xB9AE,
+ 0x908F, 0xB9AF, 0x9090, 0xB9B1, 0x9091, 0xB9B2, 0x9092, 0xB9B3,
+ 0x9093, 0xB9B5, 0x9094, 0xB9B6, 0x9095, 0xB9B7, 0x9096, 0xB9B8,
+ 0x9097, 0xB9B9, 0x9098, 0xB9BA, 0x9099, 0xB9BB, 0x909A, 0xB9BE,
+ 0x909B, 0xB9C0, 0x909C, 0xB9C2, 0x909D, 0xB9C3, 0x909E, 0xB9C4,
+ 0x909F, 0xB9C5, 0x90A0, 0xB9C6, 0x90A1, 0xB9C7, 0x90A2, 0xB9CA,
+ 0x90A3, 0xB9CB, 0x90A4, 0xB9CD, 0x90A5, 0xB9D3, 0x90A6, 0xB9D4,
+ 0x90A7, 0xB9D5, 0x90A8, 0xB9D6, 0x90A9, 0xB9D7, 0x90AA, 0xB9DA,
+ 0x90AB, 0xB9DC, 0x90AC, 0xB9DF, 0x90AD, 0xB9E0, 0x90AE, 0xB9E2,
+ 0x90AF, 0xB9E6, 0x90B0, 0xB9E7, 0x90B1, 0xB9E9, 0x90B2, 0xB9EA,
+ 0x90B3, 0xB9EB, 0x90B4, 0xB9ED, 0x90B5, 0xB9EE, 0x90B6, 0xB9EF,
+ 0x90B7, 0xB9F0, 0x90B8, 0xB9F1, 0x90B9, 0xB9F2, 0x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0xBA45, 0x90FE, 0xBA46,
+ 0x9141, 0xBA47, 0x9142, 0xBA4A, 0x9143, 0xBA4C, 0x9144, 0xBA4F,
+ 0x9145, 0xBA50, 0x9146, 0xBA51, 0x9147, 0xBA52, 0x9148, 0xBA56,
+ 0x9149, 0xBA57, 0x914A, 0xBA59, 0x914B, 0xBA5A, 0x914C, 0xBA5B,
+ 0x914D, 0xBA5D, 0x914E, 0xBA5E, 0x914F, 0xBA5F, 0x9150, 0xBA60,
+ 0x9151, 0xBA61, 0x9152, 0xBA62, 0x9153, 0xBA63, 0x9154, 0xBA66,
+ 0x9155, 0xBA6A, 0x9156, 0xBA6B, 0x9157, 0xBA6C, 0x9158, 0xBA6D,
+ 0x9159, 0xBA6E, 0x915A, 0xBA6F, 0x9161, 0xBA72, 0x9162, 0xBA73,
+ 0x9163, 0xBA75, 0x9164, 0xBA76, 0x9165, 0xBA77, 0x9166, 0xBA79,
+ 0x9167, 0xBA7A, 0x9168, 0xBA7B, 0x9169, 0xBA7C, 0x916A, 0xBA7D,
+ 0x916B, 0xBA7E, 0x916C, 0xBA7F, 0x916D, 0xBA80, 0x916E, 0xBA81,
+ 0x916F, 0xBA82, 0x9170, 0xBA86, 0x9171, 0xBA88, 0x9172, 0xBA89,
+ 0x9173, 0xBA8A, 0x9174, 0xBA8B, 0x9175, 0xBA8D, 0x9176, 0xBA8E,
+ 0x9177, 0xBA8F, 0x9178, 0xBA90, 0x9179, 0xBA91, 0x917A, 0xBA92,
+ 0x9181, 0xBA93, 0x9182, 0xBA94, 0x9183, 0xBA95, 0x9184, 0xBA96,
+ 0x9185, 0xBA97, 0x9186, 0xBA98, 0x9187, 0xBA99, 0x9188, 0xBA9A,
+ 0x9189, 0xBA9B, 0x918A, 0xBA9C, 0x918B, 0xBA9D, 0x918C, 0xBA9E,
+ 0x918D, 0xBA9F, 0x918E, 0xBAA0, 0x918F, 0xBAA1, 0x9190, 0xBAA2,
+ 0x9191, 0xBAA3, 0x9192, 0xBAA4, 0x9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x91D6, 0xBAF6, 0x91D7, 0xBAF7, 0x91D8, 0xBAF8,
+ 0x91D9, 0xBAF9, 0x91DA, 0xBAFA, 0x91DB, 0xBAFB, 0x91DC, 0xBAFD,
+ 0x91DD, 0xBAFE, 0x91DE, 0xBAFF, 0x91DF, 0xBB01, 0x91E0, 0xBB02,
+ 0x91E1, 0xBB03, 0x91E2, 0xBB05, 0x91E3, 0xBB06, 0x91E4, 0xBB07,
+ 0x91E5, 0xBB08, 0x91E6, 0xBB09, 0x91E7, 0xBB0A, 0x91E8, 0xBB0B,
+ 0x91E9, 0xBB0C, 0x91EA, 0xBB0E, 0x91EB, 0xBB10, 0x91EC, 0xBB12,
+ 0x91ED, 0xBB13, 0x91EE, 0xBB14, 0x91EF, 0xBB15, 0x91F0, 0xBB16,
+ 0x91F1, 0xBB17, 0x91F2, 0xBB19, 0x91F3, 0xBB1A, 0x91F4, 0xBB1B,
+ 0x91F5, 0xBB1D, 0x91F6, 0xBB1E, 0x91F7, 0xBB1F, 0x91F8, 0xBB21,
+ 0x91F9, 0xBB22, 0x91FA, 0xBB23, 0x91FB, 0xBB24, 0x91FC, 0xBB25,
+ 0x91FD, 0xBB26, 0x91FE, 0xBB27, 0x9241, 0xBB28, 0x9242, 0xBB2A,
+ 0x9243, 0xBB2C, 0x9244, 0xBB2D, 0x9245, 0xBB2E, 0x9246, 0xBB2F,
+ 0x9247, 0xBB30, 0x9248, 0xBB31, 0x9249, 0xBB32, 0x924A, 0xBB33,
+ 0x924B, 0xBB37, 0x924C, 0xBB39, 0x924D, 0xBB3A, 0x924E, 0xBB3F,
+ 0x924F, 0xBB40, 0x9250, 0xBB41, 0x9251, 0xBB42, 0x9252, 0xBB43,
+ 0x9253, 0xBB46, 0x9254, 0xBB48, 0x9255, 0xBB4A, 0x9256, 0xBB4B,
+ 0x9257, 0xBB4C, 0x9258, 0xBB4E, 0x9259, 0xBB51, 0x925A, 0xBB52,
+ 0x9261, 0xBB53, 0x9262, 0xBB55, 0x9263, 0xBB56, 0x9264, 0xBB57,
+ 0x9265, 0xBB59, 0x9266, 0xBB5A, 0x9267, 0xBB5B, 0x9268, 0xBB5C,
+ 0x9269, 0xBB5D, 0x926A, 0xBB5E, 0x926B, 0xBB5F, 0x926C, 0xBB60,
+ 0x926D, 0xBB62, 0x926E, 0xBB64, 0x926F, 0xBB65, 0x9270, 0xBB66,
+ 0x9271, 0xBB67, 0x9272, 0xBB68, 0x9273, 0xBB69, 0x9274, 0xBB6A,
+ 0x9275, 0xBB6B, 0x9276, 0xBB6D, 0x9277, 0xBB6E, 0x9278, 0xBB6F,
+ 0x9279, 0xBB70, 0x927A, 0xBB71, 0x9281, 0xBB72, 0x9282, 0xBB73,
+ 0x9283, 0xBB74, 0x9284, 0xBB75, 0x9285, 0xBB76, 0x9286, 0xBB77,
+ 0x9287, 0xBB78, 0x9288, 0xBB79, 0x9289, 0xBB7A, 0x928A, 0xBB7B,
+ 0x928B, 0xBB7C, 0x928C, 0xBB7D, 0x928D, 0xBB7E, 0x928E, 0xBB7F,
+ 0x928F, 0xBB80, 0x9290, 0xBB81, 0x9291, 0xBB82, 0x9292, 0xBB83,
+ 0x9293, 0xBB84, 0x9294, 0xBB85, 0x9295, 0xBB86, 0x9296, 0xBB87,
+ 0x9297, 0xBB89, 0x9298, 0xBB8A, 0x9299, 0xBB8B, 0x929A, 0xBB8D,
+ 0x929B, 0xBB8E, 0x929C, 0xBB8F, 0x929D, 0xBB91, 0x929E, 0xBB92,
+ 0x929F, 0xBB93, 0x92A0, 0xBB94, 0x92A1, 0xBB95, 0x92A2, 0xBB96,
+ 0x92A3, 0xBB97, 0x92A4, 0xBB98, 0x92A5, 0xBB99, 0x92A6, 0xBB9A,
+ 0x92A7, 0xBB9B, 0x92A8, 0xBB9C, 0x92A9, 0xBB9D, 0x92AA, 0xBB9E,
+ 0x92AB, 0xBB9F, 0x92AC, 0xBBA0, 0x92AD, 0xBBA1, 0x92AE, 0xBBA2,
+ 0x92AF, 0xBBA3, 0x92B0,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xBBEF, 0x92F2, 0xBBF0,
+ 0x92F3, 0xBBF1, 0x92F4, 0xBBF2, 0x92F5, 0xBBF3, 0x92F6, 0xBBF4,
+ 0x92F7, 0xBBF5, 0x92F8, 0xBBF6, 0x92F9, 0xBBF7, 0x92FA, 0xBBFA,
+ 0x92FB, 0xBBFB, 0x92FC, 0xBBFD, 0x92FD, 0xBBFE, 0x92FE, 0xBC01,
+ 0x9341, 0xBC03, 0x9342, 0xBC04, 0x9343, 0xBC05, 0x9344, 0xBC06,
+ 0x9345, 0xBC07, 0x9346, 0xBC0A, 0x9347, 0xBC0E, 0x9348, 0xBC10,
+ 0x9349, 0xBC12, 0x934A, 0xBC13, 0x934B, 0xBC19, 0x934C, 0xBC1A,
+ 0x934D, 0xBC20, 0x934E, 0xBC21, 0x934F, 0xBC22, 0x9350, 0xBC23,
+ 0x9351, 0xBC26, 0x9352, 0xBC28, 0x9353, 0xBC2A, 0x9354, 0xBC2B,
+ 0x9355, 0xBC2C, 0x9356, 0xBC2E, 0x9357, 0xBC2F, 0x9358, 0xBC32,
+ 0x9359, 0xBC33, 0x935A, 0xBC35, 0x9361, 0xBC36, 0x9362, 0xBC37,
+ 0x9363, 0xBC39, 0x9364, 0xBC3A, 0x9365, 0xBC3B, 0x9366, 0xBC3C,
+ 0x9367, 0xBC3D, 0x9368, 0xBC3E, 0x9369, 0xBC3F, 0x936A, 0xBC42,
+ 0x936B, 0xBC46, 0x936C, 0xBC47, 0x936D, 0xBC48, 0x936E, 0xBC4A,
+ 0x936F, 0xBC4B, 0x9370, 0xBC4E, 0x9371, 0xBC4F, 0x9372, 0xBC51,
+ 0x9373, 0xBC52, 0x9374, 0xBC53, 0x9375, 0xBC54, 0x9376, 0xBC55,
+ 0x9377, 0xBC56, 0x9378, 0xBC57, 0x9379, 0xBC58, 0x937A, 0xBC59,
+ 0x9381, 0xBC5A, 0x9382, 0xBC5B, 0x9383, 0xBC5C, 0x9384, 0xBC5E,
+ 0x9385, 0xBC5F, 0x9386, 0xBC60, 0x9387, 0xBC61, 0x9388, 0xBC62,
+ 0x9389, 0xBC63, 0x938A, 0xBC64, 0x938B, 0xBC65, 0x938C, 0xBC66,
+ 0x938D, 0xBC67, 0x938E, 0xBC68, 0x938F, 0xBC69, 0x9390, 0xBC6A,
+ 0x9391, 0xBC6B, 0x9392, 0xBC6C, 0x9393, 0xBC6D, 0x9394, 0xBC6E,
+ 0x9395, 0xBC6F, 0x9396, 0xBC70, 0x9397, 0xBC71, 0x9398, 0xBC72,
+ 0x9399, 0xBC73, 0x939A, 0xBC74, 0x939B, 0xBC75, 0x939C, 0xBC76,
+ 0x939D, 0xBC77, 0x939E, 0xBC78, 0x939F, 0xBC79, 0x93A0, 0xBC7A,
+ 0x93A1, 0xBC7B, 0x93A2, 0xBC7C, 0x93A3, 0xBC7D, 0x93A4, 0xBC7E,
+ 0x93A5, 0xBC7F, 0x93A6, 0xBC80, 0x93A7, 0xBC81, 0x93A8, 0xBC82,
+ 0x93A9, 0xBC83, 0x93AA, 0xBC86, 0x93AB, 0xBC87, 0x93AC, 0xBC89,
+ 0x93AD, 0xBC8A, 0x93AE, 0xBC8D, 0x93AF, 0xBC8F, 0x93B0, 0xBC90,
+ 0x93B1, 0xBC91, 0x93B2, 0xBC92, 0x93B3, 0xBC93, 0x93B4, 0xBC96,
+ 0x93B5, 0xBC98, 0x93B6, 0xBC9B, 0x93B7, 0xBC9C, 0x93B8, 0xBC9D,
+ 0x93B9, 0xBC9E, 0x93BA, 0xBC9F, 0x93BB, 0xBCA2, 0x93BC, 0xBCA3,
+ 0x93BD, 0xBCA5, 0x93BE, 0xBCA6, 0x93BF, 0xBCA9, 0x93C0, 0xBCAA,
+ 0x93C1, 0xBCAB, 0x93C2, 0xBCAC, 0x93C3, 0xBCAD, 0x93C4, 0xBCAE,
+ 0x93C5, 0xBCAF, 0x93C6, 0xBCB2, 0x93C7, 0xBCB6, 0x93C8, 0xBCB7,
+ 0x93C9, 0xBCB8, 0x93CA, 0xBCB9, 0x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0xBD11, 0x9450, 0xBD12, 0x9451, 0xBD13, 0x9452, 0xBD15,
+ 0x9453, 0xBD16, 0x9454, 0xBD17, 0x9455, 0xBD18, 0x9456, 0xBD19,
+ 0x9457, 0xBD1A, 0x9458, 0xBD1B, 0x9459, 0xBD1C, 0x945A, 0xBD1D,
+ 0x9461, 0xBD1E, 0x9462, 0xBD1F, 0x9463, 0xBD20, 0x9464, 0xBD21,
+ 0x9465, 0xBD22, 0x9466, 0xBD23, 0x9467, 0xBD25, 0x9468, 0xBD26,
+ 0x9469, 0xBD27, 0x946A, 0xBD28, 0x946B, 0xBD29, 0x946C, 0xBD2A,
+ 0x946D, 0xBD2B, 0x946E, 0xBD2D, 0x946F, 0xBD2E, 0x9470, 0xBD2F,
+ 0x9471, 0xBD30, 0x9472, 0xBD31, 0x9473, 0xBD32, 0x9474, 0xBD33,
+ 0x9475, 0xBD34, 0x9476, 0xBD35, 0x9477, 0xBD36, 0x9478, 0xBD37,
+ 0x9479, 0xBD38, 0x947A, 0xBD39, 0x9481, 0xBD3A, 0x9482, 0xBD3B,
+ 0x9483, 0xBD3C, 0x9484, 0xBD3D, 0x9485, 0xBD3E, 0x9486, 0xBD3F,
+ 0x9487, 0xBD41, 0x9488, 0xBD42, 0x9489, 0xBD43, 0x948A, 0xBD44,
+ 0x948B, 0xBD45, 0x948C, 0xBD46, 0x948D, 0xBD47, 0x948E, 0xBD4A,
+ 0x948F, 0xBD4B, 0x9490, 0xBD4D, 0x9491, 0xBD4E, 0x9492, 0xBD4F,
+ 0x9493, 0xBD51, 0x9494, 0xBD52, 0x9495, 0xBD53, 0x9496, 0xBD54,
+ 0x9497, 0xBD55, 0x9498, 0xBD56, 0x9499, 0xBD57, 0x949A, 0xBD5A,
+ 0x949B, 0xBD5B, 0x949C, 0xBD5C, 0x949D, 0xBD5D, 0x949E, 0xBD5E,
+ 0x949F, 0xBD5F, 0x94A0, 0xBD60, 0x94A1, 0xBD61, 0x94A2, 0xBD62,
+ 0x94A3, 0x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0xBE08,
+ 0x9573, 0xBE09, 0x9574, 0xBE0A, 0x9575, 0xBE0B, 0x9576, 0xBE0E,
+ 0x9577, 0xBE0F, 0x9578, 0xBE11, 0x9579, 0xBE12, 0x957A, 0xBE13,
+ 0x9581, 0xBE15, 0x9582, 0xBE16, 0x9583, 0xBE17, 0x9584, 0xBE18,
+ 0x9585, 0xBE19, 0x9586, 0xBE1A, 0x9587, 0xBE1B, 0x9588, 0xBE1E,
+ 0x9589, 0xBE20, 0x958A, 0xBE21, 0x958B, 0xBE22, 0x958C, 0xBE23,
+ 0x958D, 0xBE24, 0x958E, 0xBE25, 0x958F, 0xBE26, 0x9590, 0xBE27,
+ 0x9591, 0xBE28, 0x9592, 0xBE29, 0x9593, 0xBE2A, 0x9594, 0xBE2B,
+ 0x9595, 0xBE2C, 0x9596, 0xBE2D, 0x9597, 0xBE2E, 0x9598, 0xBE2F,
+ 0x9599, 0xBE30, 0x959A, 0xBE31, 0x959B, 0xBE32, 0x959C, 0xBE33,
+ 0x959D, 0xBE34, 0x959E, 0xBE35, 0x959F, 0xBE36, 0x95A0, 0xBE37,
+ 0x95A1, 0xBE38, 0x95A2, 0xBE39, 0x95A3, 0xBE3A, 0x95A4, 0xBE3B,
+ 0x95A5, 0xBE3C, 0x95A6, 0xBE3D, 0x95A7, 0xBE3E, 0x95A8, 0xBE3F,
+ 0x95A9, 0xBE40, 0x95AA, 0xBE41, 0x95AB, 0xBE42, 0x95AC, 0xBE43,
+ 0x95AD, 0xBE46, 0x95AE, 0xBE47, 0x95AF, 0xBE49, 0x95B0, 0xBE4A,
+ 0x95B1, 0xBE4B, 0x95B2, 0xBE4D, 0x95B3, 0xBE4F, 0x95B4, 0xBE50,
+ 0x95B5, 0xBE51, 0x95B6, 0xBE52, 0x95B7, 0xBE53, 0x95B8, 0xBE56,
+ 0x95B9, 0xBE58, 0x95BA, 0xBE5C, 0x95BB, 0xBE5D, 0x95BC, 0xBE5E,
+ 0x95BD, 0xBE5F, 0x95BE, 0x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, 0xBEBA, 0x9644, 0xBEBB, 0x9645, 0xBEBC, 0x9646, 0xBEBD,
+ 0x9647, 0xBEBE, 0x9648, 0xBEBF, 0x9649, 0xBEC0, 0x964A, 0xBEC1,
+ 0x964B, 0xBEC2, 0x964C, 0xBEC3, 0x964D, 0xBEC4, 0x964E, 0xBEC5,
+ 0x964F, 0xBEC6, 0x9650, 0xBEC7, 0x9651, 0xBEC8, 0x9652, 0xBEC9,
+ 0x9653, 0xBECA, 0x9654, 0xBECB, 0x9655, 0xBECC, 0x9656, 0xBECD,
+ 0x9657, 0xBECE, 0x9658, 0xBECF, 0x9659, 0xBED2, 0x965A, 0xBED3,
+ 0x9661, 0xBED5, 0x9662, 0xBED6, 0x9663, 0xBED9, 0x9664, 0xBEDA,
+ 0x9665, 0xBEDB, 0x9666, 0xBEDC, 0x9667, 0xBEDD, 0x9668, 0xBEDE,
+ 0x9669, 0xBEDF, 0x966A, 0xBEE1, 0x966B, 0xBEE2, 0x966C, 0xBEE6,
+ 0x966D, 0xBEE7, 0x966E, 0xBEE8, 0x966F, 0xBEE9, 0x9670, 0xBEEA,
+ 0x9671, 0xBEEB, 0x9672, 0xBEED, 0x9673, 0xBEEE, 0x9674, 0xBEEF,
+ 0x9675, 0xBEF0, 0x9676, 0xBEF1, 0x9677, 0xBEF2, 0x9678, 0xBEF3,
+ 0x9679, 0xBEF4, 0x967A, 0xBEF5, 0x9681, 0xBEF6, 0x9682, 0xBEF7,
+ 0x9683, 0xBEF8, 0x9684, 0xBEF9, 0x9685, 0xBEFA, 0x9686, 0xBEFB,
+ 0x9687, 0xBEFC, 0x9688, 0xBEFD, 0x9689, 0xBEFE, 0x968A, 0xBEFF,
+ 0x968B, 0xBF00, 0x968C, 0xBF02, 0x968D, 0xBF03, 0x968E, 0xBF04,
+ 0x968F, 0xBF05, 0x9690, 0xBF06, 0x9691, 0xBF07, 0x9692, 0xBF0A,
+ 0x9693, 0xBF0B, 0x9694, 0xBF0C, 0x9695, 0xBF0D, 0x9696, 0xBF0E,
+ 0x9697, 0xBF0F, 0x9698, 0xBF10, 0x9699, 0xBF11, 0x969A, 0xBF12,
+ 0x969B, 0xBF13, 0x969C, 0xBF14, 0x969D, 0xBF15, 0x969E, 0xBF16,
+ 0x969F, 0xBF17, 0x96A0, 0xBF1A, 0x96A1, 0xBF1E, 0x96A2, 0xBF1F,
+ 0x96A3, 0xBF20, 0x96A4, 0xBF21, 0x96A5, 0xBF22, 0x96A6, 0xBF23,
+ 0x96A7, 0xBF24, 0x96A8, 0xBF25, 0x96A9, 0xBF26, 0x96AA, 0xBF27,
+ 0x96AB, 0xBF28, 0x96AC, 0xBF29, 0x96AD, 0xBF2A, 0x96AE, 0xBF2B,
+ 0x96AF, 0xBF2C, 0x96B0, 0xBF2D, 0x96B1, 0xBF2E, 0x96B2, 0xBF2F,
+ 0x96B3, 0xBF30, 0x96B4, 0xBF31, 0x96B5, 0xBF32, 0x96B6, 0xBF33,
+ 0x96B7, 0xBF34, 0x96B8, 0xBF35, 0x96B9, 0xBF36, 0x96BA, 0xBF37,
+ 0x96BB, 0xBF38, 0x96BC, 0xBF39, 0x96BD, 0xBF3A, 0x96BE, 0xBF3B,
+ 0x96BF, 0xBF3C, 0x96C0, 0xBF3D, 0x96C1, 0xBF3E, 0x96C2, 0xBF3F,
+ 0x96C3, 0xBF42, 0x96C4, 0xBF43, 0x96C5, 0xBF45, 0x96C6, 0xBF46,
+ 0x96C7, 0xBF47, 0x96C8, 0xBF49, 0x96C9, 0xBF4A, 0x96CA, 0xBF4B,
+ 0x96CB, 0xBF4C, 0x96CC, 0xBF4D, 0x96CD, 0xBF4E, 0x96CE, 0xBF4F,
+ 0x96CF, 0xBF52, 0x96D0, 0xBF53, 0x96D1, 0xBF54, 0x96D2, 0xBF56,
+ 0x96D3, 0xBF57, 0x96D4, 0xBF58, 0x96D5, 0xBF59, 0x96D6, 0xBF5A,
+ 0x96D7, 0xBF5B, 0x96D8, 0xBF5C, 0x96D9, 0xBF5D, 0x96DA, 0xBF5E,
+ 0x96DB, 0xBF5F, 0x96DC, 0xBF60, 0x96DD, 0xBF61, 0x96DE, 0xBF62,
+ 0x96DF, 0xBF63, 0x96E0, 0xBF64, 0x96E1, 0xBF65, 0x96E2, 0xBF66,
+ 0x96E3, 0xBF67, 0x96E4, 0xBF68, 0x96E5, 0xBF69, 0x96E6, 0xBF6A,
+ 0x96E7, 0xBF6B, 0x96E8, 0xBF6C, 0x96E9, 0xBF6D, 0x96EA, 0xBF6E,
+ 0x96EB, 0xBF6F, 0x96EC, 0xBF70, 0x96ED, 0xBF71, 0x96EE, 0xBF72,
+ 0x96EF, 0xBF73, 0x96F0, 0xBF74, 0x96F1, 0xBF75, 0x96F2, 0xBF76,
+ 0x96F3, 0xBF77, 0x96F4, 0xBF78, 0x96F5, 0xBF79, 0x96F6, 0xBF7A,
+ 0x96F7, 0xBF7B, 0x96F8, 0xBF7C, 0x96F9, 0xBF7D, 0x96FA, 0xBF7E,
+ 0x96FB, 0xBF7F, 0x96FC, 0xBF80, 0x96FD, 0xBF81, 0x96FE, 0xBF82,
+ 0x9741, 0xBF83, 0x9742, 0xBF84, 0x9743, 0xBF85, 0x9744, 0xBF86,
+ 0x9745, 0xBF87, 0x9746, 0xBF88, 0x9747, 0xBF89, 0x9748, 0xBF8A,
+ 0x9749, 0xBF8B, 0x974A, 0xBF8C, 0x974B, 0xBF8D, 0x974C, 0xBF8E,
+ 0x974D, 0xBF8F, 0x974E, 0xBF90, 0x974F, 0xBF91, 0x9750, 0xBF92,
+ 0x9751, 0xBF93, 0x9752, 0xBF95, 0x9753, 0xBF96, 0x9754, 0xBF97,
+ 0x9755, 0xBF98, 0x9756, 0xBF99, 0x9757, 0xBF9A, 0x9758, 0xBF9B,
+ 0x9759, 0xBF9C, 0x975A, 0xBF9D, 0x9761, 0xBF9E, 0x9762, 0xBF9F,
+ 0x9763, 0xBFA0, 0x9764, 0xBFA1, 0x9765, 0xBFA2, 0x9766, 0xBFA3,
+ 0x9767, 0xBFA4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97B2, 0xBFF2, 0x97B3, 0xBFF3, 0x97B4, 0xBFF4,
+ 0x97B5, 0xBFF5, 0x97B6, 0xBFF6, 0x97B7, 0xBFF7, 0x97B8, 0xBFF8,
+ 0x97B9, 0xBFF9, 0x97BA, 0xBFFA, 0x97BB, 0xBFFB, 0x97BC, 0xBFFC,
+ 0x97BD, 0xBFFD, 0x97BE, 0xBFFE, 0x97BF, 0xBFFF, 0x97C0, 0xC000,
+ 0x97C1, 0xC001, 0x97C2, 0xC002, 0x97C3, 0xC003, 0x97C4, 0xC004,
+ 0x97C5, 0xC005, 0x97C6, 0xC006, 0x97C7, 0xC007, 0x97C8, 0xC008,
+ 0x97C9, 0xC009, 0x97CA, 0xC00A, 0x97CB, 0xC00B, 0x97CC, 0xC00C,
+ 0x97CD, 0xC00D, 0x97CE, 0xC00E, 0x97CF, 0xC00F, 0x97D0, 0xC010,
+ 0x97D1, 0xC011, 0x97D2, 0xC012, 0x97D3, 0xC013, 0x97D4, 0xC014,
+ 0x97D5, 0xC015, 0x97D6, 0xC016, 0x97D7, 0xC017, 0x97D8, 0xC018,
+ 0x97D9, 0xC019, 0x97DA, 0xC01A, 0x97DB, 0xC01B, 0x97DC, 0xC01C,
+ 0x97DD, 0xC01D, 0x97DE, 0xC01E, 0x97DF, 0xC01F, 0x97E0, 0xC020,
+ 0x97E1, 0xC021, 0x97E2, 0xC022, 0x97E3, 0xC023, 0x97E4, 0xC024,
+ 0x97E5, 0xC025, 0x97E6, 0xC026, 0x97E7, 0xC027, 0x97E8, 0xC028,
+ 0x97E9, 0xC029, 0x97EA, 0xC02A, 0x97EB, 0xC02B, 0x97EC, 0xC02C,
+ 0x97ED, 0xC02D, 0x97EE, 0xC02E, 0x97EF, 0xC02F, 0x97F0, 0xC030,
+ 0x97F1, 0xC031, 0x97F2, 0xC032, 0x97F3, 0xC033, 0x97F4, 0xC034,
+ 0x97F5, 0xC035, 0x97F6, 0xC036, 0x97F7, 0xC037, 0x97F8, 0xC038,
+ 0x97F9, 0xC039, 0x97FA, 0xC03A, 0x97FB, 0xC03B, 0x97FC, 0xC03D,
+ 0x97FD, 0xC03E, 0x97FE, 0xC03F, 0x9841, 0xC040, 0x9842, 0xC041,
+ 0x9843, 0xC042, 0x9844, 0xC043, 0x9845, 0xC044, 0x9846, 0xC045,
+ 0x9847, 0xC046, 0x9848, 0xC047, 0x9849, 0xC048, 0x984A, 0xC049,
+ 0x984B, 0xC04A, 0x984C, 0xC04B, 0x984D, 0xC04C, 0x984E, 0xC04D,
+ 0x984F, 0xC04E, 0x9850, 0xC04F, 0x9851, 0xC050, 0x9852, 0xC052,
+ 0x9853, 0xC053, 0x9854, 0xC054, 0x9855, 0xC055, 0x9856, 0xC056,
+ 0x9857, 0xC057, 0x9858, 0xC059, 0x9859, 0xC05A, 0x985A, 0xC05B,
+ 0x9861, 0xC05D, 0x9862, 0xC05E, 0x9863, 0xC05F, 0x9864, 0xC061,
+ 0x9865, 0xC062, 0x9866, 0xC063, 0x9867, 0xC064, 0x9868, 0xC065,
+ 0x9869, 0xC066, 0x986A, 0xC067, 0x986B, 0xC06A, 0x986C, 0xC06B,
+ 0x986D, 0xC06C, 0x986E, 0xC06D, 0x986F, 0xC06E, 0x9870, 0xC06F,
+ 0x9871, 0xC070, 0x9872, 0xC071, 0x9873, 0xC072, 0x9874, 0xC073,
+ 0x9875, 0xC074, 0x9876, 0xC075, 0x9877, 0xC076, 0x9878, 0xC077,
+ 0x9879, 0xC078, 0x987A, 0xC079, 0x9881, 0xC07A, 0x9882, 0xC07B,
+ 0x9883, 0xC07C, 0x9884, 0xC07D, 0x9885, 0xC07E, 0x9886, 0xC07F,
+ 0x9887, 0xC080, 0x9888, 0xC081, 0x9889, 0xC082, 0x988A, 0xC083,
+ 0x988B, 0xC084, 0x988C, 0xC085, 0x988D, 0xC086, 0x988E, 0xC087,
+ 0x988F, 0xC088, 0x9890, 0xC089, 0x9891, 0xC08A, 0x9892, 0xC08B,
+ 0x9893, 0xC08C, 0x9894, 0xC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0F3, 0x98D8, 0xC0F6, 0x98D9, 0xC0F8, 0x98DA, 0xC0FA,
+ 0x98DB, 0xC0FB, 0x98DC, 0xC0FC, 0x98DD, 0xC0FD, 0x98DE, 0xC0FE,
+ 0x98DF, 0xC0FF, 0x98E0, 0xC101, 0x98E1, 0xC102, 0x98E2, 0xC103,
+ 0x98E3, 0xC105, 0x98E4, 0xC106, 0x98E5, 0xC107, 0x98E6, 0xC109,
+ 0x98E7, 0xC10A, 0x98E8, 0xC10B, 0x98E9, 0xC10C, 0x98EA, 0xC10D,
+ 0x98EB, 0xC10E, 0x98EC, 0xC10F, 0x98ED, 0xC111, 0x98EE, 0xC112,
+ 0x98EF, 0xC113, 0x98F0, 0xC114, 0x98F1, 0xC116, 0x98F2, 0xC117,
+ 0x98F3, 0xC118, 0x98F4, 0xC119, 0x98F5, 0xC11A, 0x98F6, 0xC11B,
+ 0x98F7, 0xC121, 0x98F8, 0xC122, 0x98F9, 0xC125, 0x98FA, 0xC128,
+ 0x98FB, 0xC129, 0x98FC, 0xC12A, 0x98FD, 0xC12B, 0x98FE, 0xC12E,
+ 0x9941, 0xC132, 0x9942, 0xC133, 0x9943, 0xC134, 0x9944, 0xC135,
+ 0x9945, 0xC137, 0x9946, 0xC13A, 0x9947, 0xC13B, 0x9948, 0xC13D,
+ 0x9949, 0xC13E, 0x994A, 0xC13F, 0x994B, 0xC141, 0x994C, 0xC142,
+ 0x994D, 0xC143, 0x994E, 0xC144, 0x994F, 0xC145, 0x9950, 0xC146,
+ 0x9951, 0xC147, 0x9952, 0xC14A, 0x9953, 0xC14E, 0x9954, 0xC14F,
+ 0x9955, 0xC150, 0x9956, 0xC151, 0x9957, 0xC152, 0x9958, 0xC153,
+ 0x9959, 0xC156, 0x995A, 0xC157, 0x9961, 0xC159, 0x9962, 0xC15A,
+ 0x9963, 0xC15B, 0x9964, 0xC15D, 0x9965, 0xC15E, 0x9966, 0xC15F,
+ 0x9967, 0xC160, 0x9968, 0xC161, 0x9969, 0xC162, 0x996A, 0xC163,
+ 0x996B, 0xC166, 0x996C, 0xC16A, 0x996D, 0xC16B, 0x996E, 0xC16C,
+ 0x996F, 0xC16D, 0x9970, 0xC16E, 0x9971, 0xC16F, 0x9972, 0xC171,
+ 0x9973, 0xC172, 0x9974, 0xC173, 0x9975, 0xC175, 0x9976, 0xC176,
+ 0x9977, 0xC177, 0x9978, 0xC179, 0x9979, 0xC17A, 0x997A, 0xC17B,
+ 0x9981, 0xC17C, 0x9982, 0xC17D, 0x9983, 0xC17E, 0x9984, 0xC17F,
+ 0x9985, 0xC180, 0x9986, 0xC181, 0x9987, 0xC182, 0x9988, 0xC183,
+ 0x9989, 0xC184, 0x998A, 0xC186, 0x998B, 0xC187, 0x998C, 0xC188,
+ 0x998D, 0xC189, 0x998E, 0xC18A, 0x998F, 0xC18B, 0x9990, 0xC18F,
+ 0x9991, 0xC191, 0x9992, 0xC192, 0x9993, 0xC193, 0x9994, 0xC195,
+ 0x9995, 0xC197, 0x9996, 0xC198, 0x9997, 0xC199, 0x9998, 0xC19A,
+ 0x9999, 0xC19B, 0x999A, 0xC19E, 0x999B, 0xC1A0, 0x999C, 0xC1A2,
+ 0x999D, 0xC1A3, 0x999E, 0xC1A4, 0x999F, 0xC1A6, 0x99A0, 0xC1A7,
+ 0x99A1, 0xC1AA, 0x99A2, 0xC1AB, 0x99A3, 0xC1AD, 0x99A4, 0xC1AE,
+ 0x99A5, 0xC1AF, 0x99A6, 0xC1B1, 0x99A7, 0xC1B2, 0x99A8, 0xC1B3,
+ 0x99A9, 0xC1B4, 0x99AA, 0xC1B5, 0x99AB, 0xC1B6, 0x99AC, 0xC1B7,
+ 0x99AD, 0xC1B8, 0x99AE, 0xC1B9, 0x99AF, 0xC1BA, 0x99B0, 0xC1BB,
+ 0x99B1, 0xC1BC, 0x99B2, 0xC1BE, 0x99B3, 0xC1BF, 0x99B4, 0xC1C0,
+ 0x99B5, 0xC1C1, 0x99B6, 0xC1C2, 0x99B7, 0xC1C3, 0x99B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xC21E, 0x99FC, 0xC221,
+ 0x99FD, 0xC222, 0x99FE, 0xC223, 0x9A41, 0xC224, 0x9A42, 0xC225,
+ 0x9A43, 0xC226, 0x9A44, 0xC227, 0x9A45, 0xC22A, 0x9A46, 0xC22C,
+ 0x9A47, 0xC22E, 0x9A48, 0xC230, 0x9A49, 0xC233, 0x9A4A, 0xC235,
+ 0x9A4B, 0xC236, 0x9A4C, 0xC237, 0x9A4D, 0xC238, 0x9A4E, 0xC239,
+ 0x9A4F, 0xC23A, 0x9A50, 0xC23B, 0x9A51, 0xC23C, 0x9A52, 0xC23D,
+ 0x9A53, 0xC23E, 0x9A54, 0xC23F, 0x9A55, 0xC240, 0x9A56, 0xC241,
+ 0x9A57, 0xC242, 0x9A58, 0xC243, 0x9A59, 0xC244, 0x9A5A, 0xC245,
+ 0x9A61, 0xC246, 0x9A62, 0xC247, 0x9A63, 0xC249, 0x9A64, 0xC24A,
+ 0x9A65, 0xC24B, 0x9A66, 0xC24C, 0x9A67, 0xC24D, 0x9A68, 0xC24E,
+ 0x9A69, 0xC24F, 0x9A6A, 0xC252, 0x9A6B, 0xC253, 0x9A6C, 0xC255,
+ 0x9A6D, 0xC256, 0x9A6E, 0xC257, 0x9A6F, 0xC259, 0x9A70, 0xC25A,
+ 0x9A71, 0xC25B, 0x9A72, 0xC25C, 0x9A73, 0xC25D, 0x9A74, 0xC25E,
+ 0x9A75, 0xC25F, 0x9A76, 0xC261, 0x9A77, 0xC262, 0x9A78, 0xC263,
+ 0x9A79, 0xC264, 0x9A7A, 0xC266, 0x9A81, 0xC267, 0x9A82, 0xC268,
+ 0x9A83, 0xC269, 0x9A84, 0xC26A, 0x9A85, 0xC26B, 0x9A86, 0xC26E,
+ 0x9A87, 0xC26F, 0x9A88, 0xC271, 0x9A89, 0xC272, 0x9A8A, 0xC273,
+ 0x9A8B, 0xC275, 0x9A8C, 0xC276, 0x9A8D, 0xC277, 0x9A8E, 0xC278,
+ 0x9A8F, 0xC279, 0x9A90, 0x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B, 0x9B54, 0xC32C,
+ 0x9B55, 0xC32D, 0x9B56, 0xC32E, 0x9B57, 0xC32F, 0x9B58, 0xC330,
+ 0x9B59, 0xC331, 0x9B5A, 0xC332, 0x9B61, 0xC333, 0x9B62, 0xC334,
+ 0x9B63, 0xC335, 0x9B64, 0xC336, 0x9B65, 0xC337, 0x9B66, 0xC338,
+ 0x9B67, 0xC339, 0x9B68, 0xC33A, 0x9B69, 0xC33B, 0x9B6A, 0xC33C,
+ 0x9B6B, 0xC33D, 0x9B6C, 0xC33E, 0x9B6D, 0xC33F, 0x9B6E, 0xC340,
+ 0x9B6F, 0xC341, 0x9B70, 0xC342, 0x9B71, 0xC343, 0x9B72, 0xC344,
+ 0x9B73, 0xC346, 0x9B74, 0xC347, 0x9B75, 0xC348, 0x9B76, 0xC349,
+ 0x9B77, 0xC34A, 0x9B78, 0xC34B, 0x9B79, 0xC34C, 0x9B7A, 0xC34D,
+ 0x9B81, 0xC34E, 0x9B82, 0xC34F, 0x9B83, 0xC350, 0x9B84, 0xC351,
+ 0x9B85, 0xC352, 0x9B86, 0xC353, 0x9B87, 0xC354, 0x9B88, 0xC355,
+ 0x9B89, 0xC356, 0x9B8A, 0xC357, 0x9B8B, 0xC358, 0x9B8C, 0xC359,
+ 0x9B8D, 0xC35A, 0x9B8E, 0xC35B, 0x9B8F, 0xC35C, 0x9B90, 0xC35D,
+ 0x9B91, 0xC35E, 0x9B92, 0xC35F, 0x9B93, 0xC360, 0x9B94, 0xC361,
+ 0x9B95, 0xC362, 0x9B96, 0xC363, 0x9B97, 0xC364, 0x9B98, 0xC365,
+ 0x9B99, 0xC366, 0x9B9A, 0xC367, 0x9B9B, 0xC36A, 0x9B9C, 0xC36B,
+ 0x9B9D, 0xC36D, 0x9B9E, 0xC36E, 0x9B9F, 0xC36F, 0x9BA0, 0xC371,
+ 0x9BA1, 0xC373, 0x9BA2, 0xC374, 0x9BA3, 0xC375, 0x9BA4, 0xC376,
+ 0x9BA5, 0xC377, 0x9B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xC40D, 0x9C6F, 0xC40E, 0x9C70, 0xC40F,
+ 0x9C71, 0xC411, 0x9C72, 0xC412, 0x9C73, 0xC413, 0x9C74, 0xC414,
+ 0x9C75, 0xC415, 0x9C76, 0xC416, 0x9C77, 0xC417, 0x9C78, 0xC418,
+ 0x9C79, 0xC419, 0x9C7A, 0xC41A, 0x9C81, 0xC41B, 0x9C82, 0xC41C,
+ 0x9C83, 0xC41D, 0x9C84, 0xC41E, 0x9C85, 0xC41F, 0x9C86, 0xC420,
+ 0x9C87, 0xC421, 0x9C88, 0xC422, 0x9C89, 0xC423, 0x9C8A, 0xC425,
+ 0x9C8B, 0xC426, 0x9C8C, 0xC427, 0x9C8D, 0xC428, 0x9C8E, 0xC429,
+ 0x9C8F, 0xC42A, 0x9C90, 0xC42B, 0x9C91, 0xC42D, 0x9C92, 0xC42E,
+ 0x9C93, 0xC42F, 0x9C94, 0xC431, 0x9C95, 0xC432, 0x9C96, 0xC433,
+ 0x9C97, 0xC435, 0x9C98, 0xC436, 0x9C99, 0xC437, 0x9C9A, 0xC438,
+ 0x9C9B, 0xC439, 0x9C9C, 0xC43A, 0x9C9D, 0xC43B, 0x9C9E, 0xC43E,
+ 0x9C9F, 0xC43F, 0x9CA0, 0xC440, 0x9CA1, 0xC441, 0x9CA2, 0xC442,
+ 0x9CA3, 0xC443, 0x9CA4, 0xC444, 0x9CA5, 0xC445, 0x9CA6, 0xC446,
+ 0x9CA7, 0xC447, 0x9CA8, 0xC449, 0x9CA9, 0xC44A, 0x9CAA, 0xC44B,
+ 0x9CAB, 0xC44C, 0x9CAC, 0xC44D, 0x9CAD, 0xC44E, 0x9CAE, 0xC44F,
+ 0x9CAF, 0xC450, 0x9CB0, 0xC451, 0x9CB1, 0xC452, 0x9CB2, 0xC453,
+ 0x9CB3, 0xC454, 0x9CB4, 0xC455, 0x9CB5, 0xC456, 0x9CB6, 0xC457,
+ 0x9CB7, 0xC458, 0x9CB8, 0xC459, 0x9CB9, 0xC45A, 0x9CBA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C807,
+ 0xA08B, 0xC809, 0xA08C, 0xC80B, 0xA08D, 0xC80C, 0xA08E, 0xC80D,
+ 0xA08F, 0xC80E, 0xA090, 0xC80F, 0xA091, 0xC812, 0xA092, 0xC814,
+ 0xA093, 0xC817, 0xA094, 0xC818, 0xA095, 0xC819, 0xA096, 0xC81A,
+ 0xA097, 0xC81B, 0xA098, 0xC81E, 0xA099, 0xC81F, 0xA09A, 0xC821,
+ 0xA09B, 0xC822, 0xA09C, 0xC823, 0xA09D, 0xC825, 0xA09E, 0xC826,
+ 0xA09F, 0xC827, 0xA0A0, 0xC828, 0xA0A1, 0xC829, 0xA0A2, 0xC82A,
+ 0xA0A3, 0xC82B, 0xA0A4, 0xC82E, 0xA0A5, 0xC830, 0xA0A6, 0xC832,
+ 0xA0A7, 0xC833, 0xA0A8, 0xC834, 0xA0A9, 0xC835, 0xA0AA, 0xC836,
+ 0xA0AB, 0xC837, 0xA0AC, 0xC839, 0xA0AD, 0xC83A, 0xA0AE, 0xC83B,
+ 0xA0AF, 0xC83D, 0xA0B0, 0xC83E, 0xA0B1, 0xC83F, 0xA0B2, 0xC841,
+ 0xA0B3, 0xC842, 0xA0B4, 0xC843, 0xA0B5, 0xC844, 0xA0B6, 0xC845,
+ 0xA0B7, 0xC846, 0xA0B8, 0xC847, 0xA0B9, 0xC84A, 0xA0BA, 0xC84B,
+ 0xA0BB, 0xC84E, 0xA0BC, 0xC84F, 0xA0BD, 0xC850, 0xA0BE, 0xC851,
+ 0xA0BF, 0xC852, 0xA0C0, 0xC853, 0xA0C1, 0xC855, 0xA0C2, 0xC856,
+ 0xA0C3, 0xC857, 0xA0C4, 0xC858, 0xA0C5, 0xC859, 0xA0C6, 0xC85A,
+ 0xA0C7, 0xC85B, 0xA0C8, 0xC85C, 0xA0C9, 0xC85D, 0xA0CA, 0xC85E,
+ 0xA0CB, 0xC85F, 0xA0CC, 0xC860, 0xA0CD, 0xC861, 0xA0CE, 0xC862,
+ 0xA0CF, 0xC863, 0xA0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xC8BA, 0xA156, 0xC8BB, 0xA157, 0xC8BE, 0xA158, 0xC8BF,
+ 0xA159, 0xC8C0, 0xA15A, 0xC8C1, 0xA161, 0xC8C2, 0xA162, 0xC8C3,
+ 0xA163, 0xC8C5, 0xA164, 0xC8C6, 0xA165, 0xC8C7, 0xA166, 0xC8C9,
+ 0xA167, 0xC8CA, 0xA168, 0xC8CB, 0xA169, 0xC8CD, 0xA16A, 0xC8CE,
+ 0xA16B, 0xC8CF, 0xA16C, 0xC8D0, 0xA16D, 0xC8D1, 0xA16E, 0xC8D2,
+ 0xA16F, 0xC8D3, 0xA170, 0xC8D6, 0xA171, 0xC8D8, 0xA172, 0xC8DA,
+ 0xA173, 0xC8DB, 0xA174, 0xC8DC, 0xA175, 0xC8DD, 0xA176, 0xC8DE,
+ 0xA177, 0xC8DF, 0xA178, 0xC8E2, 0xA179, 0xC8E3, 0xA17A, 0xC8E5,
+ 0xA181, 0xC8E6, 0xA182, 0xC8E7, 0xA183, 0xC8E8, 0xA184, 0xC8E9,
+ 0xA185, 0xC8EA, 0xA186, 0xC8EB, 0xA187, 0xC8EC, 0xA188, 0xC8ED,
+ 0xA189, 0xC8EE, 0xA18A, 0xC8EF, 0xA18B, 0xC8F0, 0xA18C, 0xC8F1,
+ 0xA18D, 0xC8F2, 0xA18E, 0xC8F3, 0xA18F, 0xC8F4, 0xA190, 0xC8F6,
+ 0xA191, 0xC8F7, 0xA192, 0xC8F8, 0xA193, 0xC8F9, 0xA194, 0xC8FA,
+ 0xA195, 0xC8FB, 0xA196, 0xC8FE, 0xA197, 0xC8FF, 0xA198, 0xC901,
+ 0xA199, 0xC902, 0xA19A, 0xC903, 0xA19B, 0xC907, 0xA19C, 0xC908,
+ 0xA19D, 0xC909, 0xA19E, 0xC90A, 0xA19F, 0xC90B, 0xA1A0, 0xC90E,
+ 0xA1A1, 0x3000, 0xA1A2, 0x3001, 0xA1A3, 0x3002, 0xA1A4, 0x00B7,
+ 0xA1A5, 0x2025, 0xA1A6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0xA1EA, 0x2194, 0xA1EB, 0x3013, 0xA1EC, 0x226A,
+ 0xA1ED, 0x226B, 0xA1EE, 0x221A, 0xA1EF, 0x223D, 0xA1F0, 0x221D,
+ 0xA1F1, 0x2235, 0xA1F2, 0x222B, 0xA1F3, 0x222C, 0xA1F4, 0x2208,
+ 0xA1F5, 0x220B, 0xA1F6, 0x2286, 0xA1F7, 0x2287, 0xA1F8, 0x2282,
+ 0xA1F9, 0x2283, 0xA1FA, 0x222A, 0xA1FB, 0x2229, 0xA1FC, 0x2227,
+ 0xA1FD, 0x2228, 0xA1FE, 0xFFE2, 0xA241, 0xC910, 0xA242, 0xC912,
+ 0xA243, 0xC913, 0xA244, 0xC914, 0xA245, 0xC915, 0xA246, 0xC916,
+ 0xA247, 0xC917, 0xA248, 0xC919, 0xA249, 0xC91A, 0xA24A, 0xC91B,
+ 0xA24B, 0xC91C, 0xA24C, 0xC91D, 0xA24D, 0xC91E, 0xA24E, 0xC91F,
+ 0xA24F, 0xC920, 0xA250, 0xC921, 0xA251, 0xC922, 0xA252, 0xC923,
+ 0xA253, 0xC924, 0xA254, 0xC925, 0xA255, 0xC926, 0xA256, 0xC927,
+ 0xA257, 0xC928, 0xA258, 0xC929, 0xA259, 0xC92A, 0xA25A, 0xC92B,
+ 0xA261, 0xC92D, 0xA262, 0xC92E, 0xA263, 0xC92F, 0xA264, 0xC930,
+ 0xA265, 0xC931, 0xA266, 0xC932, 0xA267, 0xC933, 0xA268, 0xC935,
+ 0xA269, 0xC936, 0xA26A, 0xC937, 0xA26B, 0xC938, 0xA26C, 0xC939,
+ 0xA26D, 0xC93A, 0xA26E, 0xC93B, 0xA26F, 0xC93C, 0xA270, 0xC93D,
+ 0xA271, 0xC93E, 0xA272, 0xC93F, 0xA273, 0xC940, 0xA274, 0xC941,
+ 0xA275, 0xC942, 0xA276, 0xC943, 0xA277, 0xC944, 0xA278, 0xC945,
+ 0xA279, 0xC946, 0xA27A, 0xC947, 0xA281, 0xC948, 0xA282, 0xC949,
+ 0xA283, 0xC94A, 0xA284, 0xC94B, 0xA285, 0xC94C, 0xA286, 0xC94D,
+ 0xA287, 0xC94E, 0xA288, 0xC94F, 0xA289, 0xC952, 0xA28A, 0xC953,
+ 0xA28B, 0xC955, 0xA28C, 0xC956, 0xA28D, 0xC957, 0xA28E, 0xC959,
+ 0xA28F, 0xC95A, 0xA290, 0xC95B, 0xA291, 0xC95C, 0xA292, 0xC95D,
+ 0xA293, 0xC95E, 0xA294, 0xC95F, 0xA295, 0xC962, 0xA296, 0xC964,
+ 0xA297, 0xC965, 0xA298, 0xC966, 0xA299, 0xC967, 0xA29A, 0xC968,
+ 0xA29B, 0xC969, 0xA29C, 0xC96A, 0xA29D, 0xC96B, 0xA29E, 0xC96D,
+ 0xA29F, 0xC96E, 0xA2A0, 0xC96F, 0xA2A1, 0x21D2, 0xA2A2, 0x21D4,
+ 0xA2A3, 0x2200, 0xA2A4, 0x2203, 0xA2A5, 0x00B4, 0xA2A6, 0xFF5E,
+ 0xA2A7, 0x02C7, 0xA2A8, 0x02D8, 0xA2A9, 0x02DD, 0xA2AA, 0x02DA,
+ 0xA2AB, 0x02D9, 0xA2AC, 0x00B8, 0xA2AD, 0x02DB, 0xA2AE, 0x00A1,
+ 0xA2AF, 0x00BF, 0xA2B0, 0x02D0, 0xA2B1, 0x222E, 0xA2B2, 0x2211,
+ 0xA2B3, 0x220F, 0xA2B4, 0x00A4, 0xA2B5, 0x2109, 0xA2B6, 0x2030,
+ 0xA2B7, 0x25C1, 0xA2B8, 0x25C0, 0xA2B9, 0x25B7, 0xA2BA, 0x25B6,
+ 0xA2BB, 0x2664, 0xA2BC, 0x2660, 0xA2BD, 0x2661, 0xA2BE, 0x2665,
+ 0xA2BF, 0x2667, 0xA2C0, 0x2663, 0xA2C1, 0x2299, 0xA2C2, 0x25C8,
+ 0xA2C3, 0x25A3, 0xA2C4, 0x25D0, 0xA2C5, 0x25D1, 0xA2C6, 0x2592,
+ 0xA2C7, 0x25A4, 0xA2C8, 0x25A5, 0xA2C9, 0x25A8, 0xA2CA, 0x25A7,
+ 0xA2CB, 0x25A6, 0xA2CC, 0x25A9, 0xA2CD, 0x2668, 0xA2CE, 0x260F,
+ 0xA2CF, 0x260E, 0xA2D0, 0x261C, 0xA2D1, 0x261E, 0xA2D2, 0x00B6,
+ 0xA2D3, 0x2020, 0xA2D4, 0x2021, 0xA2D5, 0x2195, 0xA2D6, 0x2197,
+ 0xA2D7, 0x2199, 0xA2D8, 0x2196, 0xA2D9, 0x2198, 0xA2DA, 0x266D,
+ 0xA2DB, 0x2669, 0xA2DC, 0x266A, 0xA2DD, 0x266C, 0xA2DE, 0x327F,
+ 0xA2DF, 0x321C, 0xA2E0, 0x2116, 0xA2E1, 0x33C7, 0xA2E2, 0x2122,
+ 0xA2E3, 0x33C2, 0xA2E4, 0x33D8, 0xA2E5, 0x2121, 0xA2E6, 0x20AC,
+ 0xA2E7, 0x00AE, 0xA341, 0xC971, 0xA342, 0xC972, 0xA343, 0xC973,
+ 0xA344, 0xC975, 0xA345, 0xC976, 0xA346, 0xC977, 0xA347, 0xC978,
+ 0xA348, 0xC979, 0xA349, 0xC97A, 0xA34A, 0xC97B, 0xA34B, 0xC97D,
+ 0xA34C, 0xC97E, 0xA34D, 0xC97F, 0xA34E, 0xC980, 0xA34F, 0xC981,
+ 0xA350, 0xC982, 0xA351, 0xC983, 0xA352, 0xC984, 0xA353, 0xC985,
+ 0xA354, 0xC986, 0xA355, 0xC987, 0xA356, 0xC98A, 0xA357, 0xC98B,
+ 0xA358, 0xC98D, 0xA359, 0xC98E, 0xA35A, 0xC98F, 0xA361, 0xC991,
+ 0xA362, 0xC992, 0xA363, 0xC993, 0xA364, 0xC994, 0xA365, 0xC995,
+ 0xA366, 0xC996, 0xA367, 0xC997, 0xA368, 0xC99A, 0xA369, 0xC99C,
+ 0xA36A, 0xC99E, 0xA36B, 0xC99F, 0xA36C, 0xC9A0, 0xA36D, 0xC9A1,
+ 0xA36E, 0xC9A2, 0x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A3F7, 0xFF57,
+ 0xA3F8, 0xFF58, 0xA3F9, 0xFF59, 0xA3FA, 0xFF5A, 0xA3FB, 0xFF5B,
+ 0xA3FC, 0xFF5C, 0xA3FD, 0xFF5D, 0xA3FE, 0xFFE3, 0xA441, 0xC9DE,
+ 0xA442, 0xC9DF, 0xA443, 0xC9E1, 0xA444, 0xC9E3, 0xA445, 0xC9E5,
+ 0xA446, 0xC9E6, 0xA447, 0xC9E8, 0xA448, 0xC9E9, 0xA449, 0xC9EA,
+ 0xA44A, 0xC9EB, 0xA44B, 0xC9EE, 0xA44C, 0xC9F2, 0xA44D, 0xC9F3,
+ 0xA44E, 0xC9F4, 0xA44F, 0xC9F5, 0xA450, 0xC9F6, 0xA451, 0xC9F7,
+ 0xA452, 0xC9FA, 0xA453, 0xC9FB, 0xA454, 0xC9FD, 0xA455, 0xC9FE,
+ 0xA456, 0xC9FF, 0xA457, 0xCA01, 0xA458, 0xCA02, 0xA459, 0xCA03,
+ 0xA45A, 0xCA04, 0xA461, 0xCA05, 0xA462, 0xCA06, 0xA463, 0xCA07,
+ 0xA464, 0xCA0A, 0xA465, 0xCA0E, 0xA466, 0xCA0F, 0xA467, 0xCA10,
+ 0xA468, 0xCA11, 0xA469, 0xCA12, 0xA46A, 0xCA13, 0xA46B, 0xCA15,
+ 0xA46C, 0xCA16, 0xA46D, 0xCA17, 0xA46E, 0xCA19, 0xA46F, 0xCA1A,
+ 0xA470, 0xCA1B, 0xA471, 0xCA1C, 0xA472, 0xCA1D, 0xA473, 0xCA1E,
+ 0xA474, 0xCA1F, 0xA475, 0xCA20, 0xA476, 0xCA21, 0xA477, 0xCA22,
+ 0xA478, 0xCA23, 0xA479, 0xCA24, 0xA47A, 0xCA25, 0xA481, 0xCA26,
+ 0xA482, 0xCA27, 0xA483, 0xCA28, 0xA484, 0xCA2A, 0xA485, 0xCA2B,
+ 0xA486, 0xCA2C, 0xA487, 0xCA2D, 0xA488, 0xCA2E, 0xA489, 0xCA2F,
+ 0xA48A, 0xCA30, 0xA48B, 0xCA31, 0xA48C, 0xCA32, 0xA48D, 0xCA33,
+ 0xA48E, 0xCA34, 0xA48F, 0xCA35, 0xA490, 0xCA36, 0xA491, 0xCA37,
+ 0xA492, 0xCA38, 0xA493, 0xCA39, 0xA494, 0xCA3A, 0xA495, 0xCA3B,
+ 0xA496, 0xCA3C, 0xA497, 0xCA3D, 0xA498, 0xCA3E, 0xA499, 0xCA3F,
+ 0xA49A, 0xCA40, 0xA49B, 0xCA41, 0xA49C, 0xCA42, 0xA49D, 0xCA43,
+ 0xA49E, 0xCA44, 0xA49F, 0xCA45, 0xA4A0, 0xCA46, 0xA4A1, 0x3131,
+ 0xA4A2, 0x3132, 0xA4A3, 0x3133, 0xA4A4, 0x3134, 0xA4A5, 0x3135,
+ 0xA4A6, 0x3136, 0xA4A7, 0x3137, 0xA4A8, 0x3138, 0xA4A9, 0x3139,
+ 0xA4AA, 0x313A, 0xA4AB, 0x313B, 0xA4AC, 0x313C, 0xA4AD, 0x313D,
+ 0xA4AE, 0x313E, 0xA4AF, 0x313F, 0xA4B0, 0x3140, 0xA4B1, 0x3141,
+ 0xA4B2, 0x3142, 0xA4B3, 0x3143, 0xA4B4, 0x3144, 0xA4B5, 0x3145,
+ 0xA4B6, 0x3146, 0xA4B7, 0x3147, 0xA4B8, 0x3148, 0xA4B9, 0x3149,
+ 0xA4BA, 0x314A, 0xA4BB, 0x314B, 0xA4BC, 0x314C, 0xA4BD, 0x314D,
+ 0xA4BE, 0x314E, 0xA4BF, 0x314F, 0xA4C0, 0x3150, 0xA4C1, 0x3151,
+ 0xA4C2, 0x3152, 0xA4C3, 0x3153, 0xA4C4, 0x3154, 0xA4C5, 0x3155,
+ 0xA4C6, 0x3156, 0xA4C7, 0x3157, 0xA4C8, 0x3158, 0xA4C9, 0x3159,
+ 0xA4CA, 0x315A, 0xA4CB, 0x315B, 0xA4CC, 0x315C, 0xA4CD, 0x315D,
+ 0xA4CE, 0x315E, 0xA4CF, 0x315F, 0xA4D0, 0x3160, 0xA4D1, 0x3161,
+ 0xA4D2, 0x3162, 0xA4D3, 0x3163, 0xA4D4, 0x3164, 0xA4D5, 0x3165,
+ 0xA4D6, 0x3166, 0xA4D7, 0x3167, 0xA4D8, 0x3168, 0xA4D9, 0x3169,
+ 0xA4DA, 0x316A, 0xA4DB, 0x316B, 0xA4DC, 0x316C, 0xA4DD, 0x316D,
+ 0xA4DE, 0x316E, 0xA4DF, 0x316F, 0xA4E0, 0x3170, 0xA4E1, 0x3171,
+ 0xA4E2, 0x3172, 0xA4E3, 0x3173, 0xA4E4, 0x3174, 0xA4E5, 0x3175,
+ 0xA4E6, 0x3176, 0xA4E7, 0x3177, 0xA4E8, 0x3178, 0xA4E9, 0x3179,
+ 0xA4EA, 0x317A, 0xA4EB, 0x317B, 0xA4EC, 0x317C, 0xA4ED, 0x317D,
+ 0xA4EE, 0x317E, 0xA4EF, 0x317F, 0xA4F0, 0x3180, 0xA4F1, 0x3181,
+ 0xA4F2, 0x3182, 0xA4F3, 0x3183, 0xA4F4, 0x3184, 0xA4F5, 0x3185,
+ 0xA4F6, 0x3186, 0xA4F7, 0x3187, 0xA4F8, 0x3188, 0xA4F9, 0x3189,
+ 0xA4FA, 0x318A, 0xA4FB, 0x318B, 0xA4FC, 0x318C, 0xA4FD, 0x318D,
+ 0xA4FE, 0x318E, 0xA541, 0xCA47, 0xA542, 0xCA48, 0xA543, 0xCA49,
+ 0xA544, 0xCA4A, 0xA545, 0xCA4B, 0xA546, 0xCA4E, 0xA547, 0xCA4F,
+ 0xA548, 0xCA51, 0xA549, 0xCA52, 0xA54A, 0xCA53, 0xA54B, 0xCA55,
+ 0xA54C, 0xCA56, 0xA54D, 0xCA57, 0xA54E, 0xCA58, 0xA54F, 0xCA59,
+ 0xA550, 0xCA5A, 0xA551, 0xCA5B, 0xA552, 0xCA5E, 0xA553, 0xCA62,
+ 0xA554, 0xCA63, 0xA555, 0xCA64, 0xA556, 0xCA65, 0xA557, 0xCA66,
+ 0xA558, 0xCA67, 0xA559, 0xCA69, 0xA55A, 0xCA6A, 0xA561, 0xCA6B,
+ 0xA562, 0xCA6C, 0xA563, 0xCA6D, 0xA564, 0xCA6E, 0xA565, 0xCA6F,
+ 0xA566, 0xCA70, 0xA567, 0xCA71, 0xA568, 0xCA72, 0xA569, 0xCA73,
+ 0xA56A, 0xCA74, 0xA56B, 0xCA75, 0xA56C, 0xCA76, 0xA56D, 0xCA77,
+ 0xA56E, 0xCA78, 0xA56F, 0xCA79, 0xA570, 0xCA7A, 0xA571, 0xCA7B,
+ 0xA572, 0xCA7C, 0xA573, 0xCA7E, 0xA574, 0xCA7F, 0xA575, 0xCA80,
+ 0xA576, 0xCA81, 0xA577, 0xCA82, 0xA578, 0xCA83, 0xA579, 0xCA85,
+ 0xA57A, 0xCA86, 0xA581, 0xCA87, 0xA582, 0xCA88, 0xA583, 0xCA89,
+ 0xA584, 0xCA8A, 0xA585, 0xCA8B, 0xA586, 0xCA8C, 0xA587, 0xCA8D,
+ 0xA588, 0xCA8E, 0xA589, 0xCA8F, 0xA58A, 0xCA90, 0xA58B, 0xCA91,
+ 0xA58C, 0xCA92, 0xA58D, 0xCA93, 0xA58E, 0xCA94, 0xA58F, 0xCA95,
+ 0xA590, 0xCA96, 0xA591, 0xCA97, 0xA592, 0xCA99, 0xA593, 0xCA9A,
+ 0xA594, 0xCA9B, 0xA595, 0xCA9C, 0xA596, 0xCA9D, 0xA597, 0xCA9E,
+ 0xA598, 0xCA9F, 0xA599, 0xCAA0, 0xA59A, 0xCAA1, 0xA59B, 0xCAA2,
+ 0xA59C, 0xCAA3, 0xA59D, 0xCAA4, 0xA59E, 0xCAA5, 0xA59F, 0xCAA6,
+ 0xA5A0, 0xCAA7, 0xA5A1, 0x2170, 0xA5A2, 0x2171, 0xA5A3, 0x2172,
+ 0xA5A4, 0x2173, 0xA5A5, 0x2174, 0xA5A6, 0x2175, 0xA5A7, 0x2176,
+ 0xA5A8, 0x2177, 0xA5A9, 0x2178, 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A649, 0xCAB0, 0xA64A, 0xCAB1, 0xA64B, 0xCAB2,
+ 0xA64C, 0xCAB3, 0xA64D, 0xCAB4, 0xA64E, 0xCAB5, 0xA64F, 0xCAB6,
+ 0xA650, 0xCAB7, 0xA651, 0xCAB8, 0xA652, 0xCAB9, 0xA653, 0xCABA,
+ 0xA654, 0xCABB, 0xA655, 0xCABE, 0xA656, 0xCABF, 0xA657, 0xCAC1,
+ 0xA658, 0xCAC2, 0xA659, 0xCAC3, 0xA65A, 0xCAC5, 0xA661, 0xCAC6,
+ 0xA662, 0xCAC7, 0xA663, 0xCAC8, 0xA664, 0xCAC9, 0xA665, 0xCACA,
+ 0xA666, 0xCACB, 0xA667, 0xCACE, 0xA668, 0xCAD0, 0xA669, 0xCAD2,
+ 0xA66A, 0xCAD4, 0xA66B, 0xCAD5, 0xA66C, 0xCAD6, 0xA66D, 0xCAD7,
+ 0xA66E, 0xCADA, 0xA66F, 0xCADB, 0xA670, 0xCADC, 0xA671, 0xCADD,
+ 0xA672, 0xCADE, 0xA673, 0xCADF, 0xA674, 0xCAE1, 0xA675, 0xCAE2,
+ 0xA676, 0xCAE3, 0xA677, 0xCAE4, 0xA678, 0xCAE5, 0xA679, 0xCAE6,
+ 0xA67A, 0xCAE7, 0xA681, 0xCAE8, 0xA682, 0xCAE9, 0xA683, 0xCAEA,
+ 0xA684, 0xCAEB, 0xA685, 0xCAED, 0xA686, 0xCAEE, 0xA687, 0xCAEF,
+ 0xA688, 0xCAF0, 0xA689, 0xCAF1, 0xA68A, 0xCAF2, 0xA68B, 0xCAF3,
+ 0xA68C, 0xCAF5, 0xA68D, 0xCAF6, 0xA68E, 0xCAF7, 0xA68F, 0xCAF8,
+ 0xA690, 0xCAF9, 0xA691, 0xCAFA, 0xA692, 0xCAFB, 0xA693, 0xCAFC,
+ 0xA694, 0xCAFD, 0xA695, 0xCAFE, 0xA696, 0xCAFF, 0xA697, 0xCB00,
+ 0xA698, 0xCB01, 0xA699, 0xCB02, 0xA69A, 0xCB03, 0xA69B, 0xCB04,
+ 0xA69C, 0xCB05, 0xA69D, 0xCB06, 0xA69E, 0xCB07, 0xA69F, 0xCB09,
+ 0xA6A0, 0xCB0A, 0xA6A1, 0x2500, 0xA6A2, 0x2502, 0xA6A3, 0x250C,
+ 0xA6A4, 0x2510, 0xA6A5, 0x2518, 0xA6A6, 0x2514, 0xA6A7, 0x251C,
+ 0xA6A8, 0x252C, 0xA6A9, 0x2524, 0xA6AA, 0x2534, 0xA6AB, 0x253C,
+ 0xA6AC, 0x2501, 0xA6AD, 0x2503, 0xA6AE, 0x250F, 0xA6AF, 0x2513,
+ 0xA6B0, 0x251B, 0xA6B1, 0x2517, 0xA6B2, 0x2523, 0xA6B3, 0x2533,
+ 0xA6B4, 0x252B, 0xA6B5, 0x253B, 0xA6B6, 0x254B, 0xA6B7, 0x2520,
+ 0xA6B8, 0x252F, 0xA6B9, 0x2528, 0xA6BA, 0x2537, 0xA6BB, 0x253F,
+ 0xA6BC, 0x251D, 0xA6BD, 0x2530, 0xA6BE, 0x2525, 0xA6BF, 0x2538,
+ 0xA6C0, 0x2542, 0xA6C1, 0x2512, 0xA6C2, 0x2511, 0xA6C3, 0x251A,
+ 0xA6C4, 0x2519, 0xA6C5, 0x2516, 0xA6C6, 0x2515, 0xA6C7, 0x250E,
+ 0xA6C8, 0x250D, 0xA6C9, 0x251E, 0xA6CA, 0x251F, 0xA6CB, 0x2521,
+ 0xA6CC, 0x2522, 0xA6CD, 0x2526, 0xA6CE, 0x2527, 0xA6CF, 0x2529,
+ 0xA6D0, 0x252A, 0xA6D1, 0x252D, 0xA6D2, 0x252E, 0xA6D3, 0x2531,
+ 0xA6D4, 0x2532, 0xA6D5, 0x2535, 0xA6D6, 0x2536, 0xA6D7, 0x2539,
+ 0xA6D8, 0x253A, 0xA6D9, 0x253D, 0xA6DA, 0x253E, 0xA6DB, 0x2540,
+ 0xA6DC, 0x2541, 0xA6DD, 0x2543, 0xA6DE, 0x2544, 0xA6DF, 0x2545,
+ 0xA6E0, 0x2546, 0xA6E1, 0x2547, 0xA6E2, 0x2548, 0xA6E3, 0x2549,
+ 0xA6E4, 0x254A, 0xA741, 0xCB0B, 0xA742, 0xCB0C, 0xA743, 0xCB0D,
+ 0xA744, 0xCB0E, 0xA745, 0xCB0F, 0xA746, 0xCB11, 0xA747, 0xCB12,
+ 0xA748, 0xCB13, 0xA749, 0xCB15, 0xA74A, 0xCB16, 0xA74B, 0xCB17,
+ 0xA74C, 0xCB19, 0xA74D, 0xCB1A, 0xA74E, 0xCB1B, 0xA74F, 0xCB1C,
+ 0xA750, 0xCB1D, 0xA751, 0xCB1E, 0xA752, 0xCB1F, 0xA753, 0xCB22,
+ 0xA754, 0xCB23, 0xA755, 0xCB24, 0xA756, 0xCB25, 0xA757, 0xCB26,
+ 0xA758, 0xCB27, 0xA759, 0xCB28, 0xA75A, 0xCB29, 0xA761, 0xCB2A,
+ 0xA762, 0xCB2B, 0xA763, 0xCB2C, 0xA764, 0xCB2D, 0xA765, 0xCB2E,
+ 0xA766, 0xCB2F, 0xA767, 0xCB30, 0xA768, 0xCB31, 0xA769, 0xCB32,
+ 0xA76A, 0xCB33, 0xA76B, 0xCB34, 0xA76C, 0xCB35, 0xA76D, 0xCB36,
+ 0xA76E, 0xCB37, 0xA76F, 0xCB38, 0xA770, 0xCB39, 0xA771, 0xCB3A,
+ 0xA772, 0xCB3B, 0xA773, 0xCB3C, 0xA774, 0xCB3D, 0xA775, 0xCB3E,
+ 0xA776, 0xCB3F, 0xA777, 0xCB40, 0xA778, 0xCB42, 0xA779, 0xCB43,
+ 0xA77A, 0xCB44, 0xA781, 0xCB45, 0xA782, 0xCB46, 0xA783, 0xCB47,
+ 0xA784, 0xCB4A, 0xA785, 0xCB4B, 0xA786, 0xCB4D, 0xA787, 0xCB4E,
+ 0xA788, 0xCB4F, 0xA789, 0xCB51, 0xA78A, 0xCB52, 0xA78B, 0xCB53,
+ 0xA78C, 0xCB54, 0xA78D, 0xCB55, 0xA78E,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xA7D2, 0x33BE, 0xA7D3, 0x33BF,
+ 0xA7D4, 0x3390, 0xA7D5, 0x3391, 0xA7D6, 0x3392, 0xA7D7, 0x3393,
+ 0xA7D8, 0x3394, 0xA7D9, 0x2126, 0xA7DA, 0x33C0, 0xA7DB, 0x33C1,
+ 0xA7DC, 0x338A, 0xA7DD, 0x338B, 0xA7DE, 0x338C, 0xA7DF, 0x33D6,
+ 0xA7E0, 0x33C5, 0xA7E1, 0x33AD, 0xA7E2, 0x33AE, 0xA7E3, 0x33AF,
+ 0xA7E4, 0x33DB, 0xA7E5, 0x33A9, 0xA7E6, 0x33AA, 0xA7E7, 0x33AB,
+ 0xA7E8, 0x33AC, 0xA7E9, 0x33DD, 0xA7EA, 0x33D0, 0xA7EB, 0x33D3,
+ 0xA7EC, 0x33C3, 0xA7ED, 0x33C9, 0xA7EE, 0x33DC, 0xA7EF, 0x33C6,
+ 0xA841, 0xCB6D, 0xA842, 0xCB6E, 0xA843, 0xCB6F, 0xA844, 0xCB70,
+ 0xA845, 0xCB71, 0xA846, 0xCB72, 0xA847, 0xCB73, 0xA848, 0xCB74,
+ 0xA849, 0xCB75, 0xA84A, 0xCB76, 0xA84B, 0xCB77, 0xA84C, 0xCB7A,
+ 0xA84D, 0xCB7B, 0xA84E, 0xCB7C, 0xA84F, 0xCB7D, 0xA850, 0xCB7E,
+ 0xA851, 0xCB7F, 0xA852, 0xCB80, 0xA853, 0xCB81, 0xA854, 0xCB82,
+ 0xA855, 0xCB83, 0xA856, 0xCB84, 0xA857, 0xCB85, 0xA858, 0xCB86,
+ 0xA859, 0xCB87, 0xA85A, 0xCB88, 0xA861, 0xCB89, 0xA862, 0xCB8A,
+ 0xA863, 0xCB8B, 0xA864, 0xCB8C, 0xA865, 0xCB8D, 0xA866, 0xCB8E,
+ 0xA867, 0xCB8F, 0xA868, 0xCB90, 0xA869, 0xCB91, 0xA86A, 0xCB92,
+ 0xA86B, 0xCB93, 0xA86C, 0xCB94, 0xA86D, 0xCB95, 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0x215E, 0xA941, 0xCBC5,
+ 0xA942, 0xCBC6, 0xA943, 0xCBC7, 0xA944, 0xCBC8, 0xA945, 0xCBC9,
+ 0xA946, 0xCBCA, 0xA947, 0xCBCB, 0xA948, 0xCBCC, 0xA949, 0xCBCD,
+ 0xA94A, 0xCBCE, 0xA94B, 0xCBCF, 0xA94C, 0xCBD0, 0xA94D, 0xCBD1,
+ 0xA94E, 0xCBD2, 0xA94F, 0xCBD3, 0xA950, 0xCBD5, 0xA951, 0xCBD6,
+ 0xA952, 0xCBD7, 0xA953, 0xCBD8, 0xA954, 0xCBD9, 0xA955, 0xCBDA,
+ 0xA956, 0xCBDB, 0xA957, 0xCBDC, 0xA958, 0xCBDD, 0xA959, 0xCBDE,
+ 0xA95A, 0xCBDF, 0xA961, 0xCBE0, 0xA962, 0xCBE1, 0xA963, 0xCBE2,
+ 0xA964, 0xCBE3, 0xA965, 0xCBE5, 0xA966, 0xCBE6, 0xA967, 0xCBE8,
+ 0xA968, 0xCBEA, 0xA969, 0xCBEB, 0xA96A, 0xCBEC, 0xA96B, 0xCBED,
+ 0xA96C, 0xCBEE, 0xA96D, 0xCBEF, 0xA96E, 0xCBF0, 0xA96F, 0xCBF1,
+ 0xA970, 0xCBF2, 0xA971, 0xCBF3, 0xA972, 0xCBF4, 0xA973, 0xCBF5,
+ 0xA974, 0xCBF6, 0xA975, 0xCBF7, 0xA976, 0xCBF8, 0xA977, 0xCBF9,
+ 0xA978, 0xCBFA, 0xA979, 0xCBFB, 0xA97A, 0xCBFC, 0xA981, 0xCBFD,
+ 0xA982, 0xCBFE, 0xA983, 0xCBFF, 0xA984, 0xCC00, 0xA985, 0xCC01,
+ 0xA986, 0xCC02, 0xA987, 0xCC03, 0xA988, 0xCC04, 0xA989, 0xCC05,
+ 0xA98A, 0xCC06, 0xA98B, 0xCC07, 0xA98C, 0xCC08, 0xA98D, 0xCC09,
+ 0xA98E, 0xCC0A, 0xA98F, 0xCC0B, 0xA990, 0xCC0E, 0xA991, 0xCC0F,
+ 0xA992, 0xCC11, 0xA993, 0xCC12, 0xA994, 0xCC13, 0xA995, 0xCC15,
+ 0xA996, 0xCC16, 0xA997, 0xCC17, 0xA998, 0xCC18, 0xA999, 0xCC19,
+ 0xA99A, 0xCC1A, 0xA99B, 0xCC1B, 0xA99C, 0xCC1E, 0xA99D, 0xCC1F,
+ 0xA99E, 0xCC20, 0xA99F, 0xCC23, 0xA9A0, 0xCC24, 0xA9A1, 0x00E6,
+ 0xA9A2, 0x0111, 0xA9A3, 0x00F0, 0xA9A4, 0x0127, 0xA9A5, 0x0131,
+ 0xA9A6, 0x0133, 0xA9A7, 0x0138, 0xA9A8, 0x0140, 0xA9A9, 0x0142,
+ 0xA9AA, 0x00F8, 0xA9AB, 0x0153, 0xA9AC, 0x00DF, 0xA9AD, 0x00FE,
+ 0xA9AE, 0x0167, 0xA9AF, 0x014B, 0xA9B0, 0x0149, 0xA9B1, 0x3200,
+ 0xA9B2, 0x3201, 0xA9B3, 0x3202, 0xA9B4, 0x3203, 0xA9B5, 0x3204,
+ 0xA9B6, 0x3205, 0xA9B7, 0x3206, 0xA9B8, 0x3207, 0xA9B9, 0x3208,
+ 0xA9BA, 0x3209, 0xA9BB, 0x320A, 0xA9BC, 0x320B, 0xA9BD, 0x320C,
+ 0xA9BE, 0x320D, 0xA9BF, 0x320E, 0xA9C0, 0x320F, 0xA9C1, 0x3210,
+ 0xA9C2, 0x3211, 0xA9C3, 0x3212, 0xA9C4, 0x3213, 0xA9C5, 0x3214,
+ 0xA9C6, 0x3215, 0xA9C7, 0x3216, 0xA9C8, 0x3217, 0xA9C9, 0x3218,
+ 0xA9CA, 0x3219, 0xA9CB, 0x321A, 0xA9CC, 0x321B, 0xA9CD, 0x249C,
+ 0xA9CE, 0x249D, 0xA9CF, 0x249E, 0xA9D0, 0x249F, 0xA9D1, 0x24A0,
+ 0xA9D2, 0x24A1, 0xA9D3, 0x24A2, 0xA9D4, 0x24A3, 0xA9D5, 0x24A4,
+ 0xA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0x3049, 0xAAAA, 0x304A, 0xAAAB, 0x304B,
+ 0xAAAC, 0x304C, 0xAAAD, 0x304D, 0xAAAE, 0x304E, 0xAAAF, 0x304F,
+ 0xAAB0, 0x3050, 0xAAB1, 0x3051, 0xAAB2, 0x3052, 0xAAB3, 0x3053,
+ 0xAAB4, 0x3054, 0xAAB5, 0x3055, 0xAAB6, 0x3056, 0xAAB7, 0x3057,
+ 0xAAB8, 0x3058, 0xAAB9, 0x3059, 0xAABA, 0x305A, 0xAABB, 0x305B,
+ 0xAABC, 0x305C, 0xAABD, 0x305D, 0xAABE, 0x305E, 0xAABF, 0x305F,
+ 0xAAC0, 0x3060, 0xAAC1, 0x3061, 0xAAC2, 0x3062, 0xAAC3, 0x3063,
+ 0xAAC4, 0x3064, 0xAAC5, 0x3065, 0xAAC6, 0x3066, 0xAAC7, 0x3067,
+ 0xAAC8, 0x3068, 0xAAC9, 0x3069, 0xAACA, 0x306A, 0xAACB, 0x306B,
+ 0xAACC, 0x306C, 0xAACD, 0x306D, 0xAACE, 0x306E, 0xAACF, 0x306F,
+ 0xAAD0, 0x3070, 0xAAD1, 0x3071, 0xAAD2, 0x3072, 0xAAD3, 0x3073,
+ 0xAAD4, 0x3074, 0xAAD5, 0x3075, 0xAAD6, 0x3076, 0xAAD7, 0x3077,
+ 0xAAD8, 0x3078, 0xAAD9, 0x3079, 0xAADA, 0x307A, 0xAADB, 0x307B,
+ 0xAADC, 0x307C, 0xAADD, 0x307D, 0xAADE, 0x307E, 0xAADF, 0x307F,
+ 0xAAE0, 0x3080, 0xAAE1, 0x3081, 0xAAE2, 0x3082, 0xAAE3, 0x3083,
+ 0xAAE4, 0x3084, 0xAAE5, 0x3085, 0xAAE6, 0x3086, 0xAAE7, 0x3087,
+ 0xAAE8, 0x3088, 0xAAE9, 0x3089, 0xAAEA, 0x308A, 0xAAEB, 0x308B,
+ 0xAAEC, 0x308C, 0xAAED, 0x308D, 0xAAEE, 0x308E, 0xAAEF, 0x308F,
+ 0xA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0418,
+ 0xACAB, 0x0419, 0xACAC, 0x041A, 0xACAD, 0x041B, 0xACAE, 0x041C,
+ 0xACAF, 0x041D, 0xACB0, 0x041E, 0xACB1, 0x041F, 0xACB2, 0x0420,
+ 0xACB3, 0x0421, 0xACB4, 0x0422, 0xACB5, 0x0423, 0xACB6, 0x0424,
+ 0xACB7, 0x0425, 0xACB8, 0x0426, 0xACB9, 0x0427, 0xACBA, 0x0428,
+ 0xACBB, 0x0429, 0xACBC, 0x042A, 0xACBD, 0x042B, 0xACBE, 0x042C,
+ 0xACBF, 0x042D, 0xACC0, 0x042E, 0xACC1, 0x042F, 0xACD1, 0x0430,
+ 0xACD2, 0x0431, 0xACD3, 0x0432, 0xACD4, 0x0433, 0xACD5, 0x0434,
+ 0xACD6, 0x0435, 0xACD7, 0x0451, 0xACD8, 0x0436, 0xACD9, 0x0437,
+ 0xACDA, 0x0438, 0xACDB, 0x0439, 0xACDC, 0x043A, 0xACDD, 0x043B,
+ 0xACDE, 0x043C, 0xACDF, 0x043D, 0xACE0, 0x043E, 0xACE1, 0x043F,
+ 0xACE2, 0x0440, 0xACE3, 0x0441, 0xACE4, 0x0442, 0xACE5, 0x0443,
+ 0xACE6, 0x0444, 0xACE7, 0x0445, 0xACE8, 0x0446, 0xACE9, 0x0447,
+ 0xACEA, 0x0448, 0xACEB, 0x0449, 0xACEC, 0x044A, 0xACED, 0x044B,
+ 0xACEE, 0x044C, 0xACEF, 0x044D, 0xACF0, 0x044E, 0xACF1, 0x044F,
+ 0xAD41, 0xCD61, 0xAD42, 0xCD62, 0xAD43, 0xCD63, 0xAD44, 0xCD65,
+ 0xAD45, 0xCD66, 0xAD46, 0xCD67, 0xAD47, 0xCD68, 0xAD48, 0xCD69,
+ 0xAD49, 0xCD6A, 0xAD4A, 0xCD6B, 0xAD4B, 0xCD6E, 0xAD4C, 0xCD70,
+ 0xAD4D, 0xCD72, 0xAD4E, 0xCD73, 0xAD4F, 0xCD74, 0xAD50, 0xCD75,
+ 0xA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BB, 0xB062, 0xCEBC,
+ 0xB063, 0xCEBD, 0xB064, 0xCEBE, 0xB065, 0xCEBF, 0xB066, 0xCEC0,
+ 0xB067, 0xCEC2, 0xB068, 0xCEC3, 0xB069, 0xCEC4, 0xB06A, 0xCEC5,
+ 0xB06B, 0xCEC6, 0xB06C, 0xCEC7, 0xB06D, 0xCEC8, 0xB06E, 0xCEC9,
+ 0xB06F, 0xCECA, 0xB070, 0xCECB, 0xB071, 0xCECC, 0xB072, 0xCECD,
+ 0xB073, 0xCECE, 0xB074, 0xCECF, 0xB075, 0xCED0, 0xB076, 0xCED1,
+ 0xB077, 0xCED2, 0xB078, 0xCED3, 0xB079, 0xCED4, 0xB07A, 0xCED5,
+ 0xB081, 0xCED6, 0xB082, 0xCED7, 0xB083, 0xCED8, 0xB084, 0xCED9,
+ 0xB085, 0xCEDA, 0xB086, 0xCEDB, 0xB087, 0xCEDC, 0xB088, 0xCEDD,
+ 0xB089, 0xCEDE, 0xB08A, 0xCEDF, 0xB08B, 0xCEE0, 0xB08C, 0xCEE1,
+ 0xB08D, 0xCEE2, 0xB08E, 0xCEE3, 0xB08F, 0xCEE6, 0xB090, 0xCEE7,
+ 0xB091, 0xCEE9, 0xB092, 0xCEEA, 0xB093, 0xCEED, 0xB094, 0xCEEE,
+ 0xB095, 0xCEEF, 0xB096, 0xCEF0, 0xB097, 0xCEF1, 0xB098, 0xCEF2,
+ 0xB099, 0xCEF3, 0xB09A, 0xCEF6, 0xB09B, 0xCEFA, 0xB09C, 0xCEFB,
+ 0xB09D, 0xCEFC, 0xB09E, 0xCEFD, 0xB09F, 0xCEFE, 0xB0A0, 0xCEFF,
+ 0xB0A1, 0xAC00, 0xB0A2, 0xAC01, 0xB0A3, 0xAC04, 0xB0A4, 0xAC07,
+ 0xB0A5, 0xAC08, 0xB0A6, 0xAC09, 0xB0A7, 0xAC0A, 0xB0A8, 0xAC10,
+ 0xB0A9, 0xAC11, 0xB0AA, 0xAC12, 0xB0AB, 0xAC13, 0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 0xB0EC, 0xACD7,
+ 0xB0ED, 0xACE0, 0xB0EE, 0xACE1, 0xB0EF, 0xACE4, 0xB0F0, 0xACE7,
+ 0xB0F1, 0xACE8, 0xB0F2, 0xACEA, 0xB0F3, 0xACEC, 0xB0F4, 0xACEF,
+ 0xB0F5, 0xACF0, 0xB0F6, 0xACF1, 0xB0F7, 0xACF3, 0xB0F8, 0xACF5,
+ 0xB0F9, 0xACF6, 0xB0FA, 0xACFC, 0xB0FB, 0xACFD, 0xB0FC, 0xAD00,
+ 0xB0FD, 0xAD04, 0xB0FE, 0xAD06, 0xB141, 0xCF02, 0xB142, 0xCF03,
+ 0xB143, 0xCF05, 0xB144, 0xCF06, 0xB145, 0xCF07, 0xB146, 0xCF09,
+ 0xB147, 0xCF0A, 0xB148, 0xCF0B, 0xB149, 0xCF0C, 0xB14A, 0xCF0D,
+ 0xB14B, 0xCF0E, 0xB14C, 0xCF0F, 0xB14D, 0xCF12, 0xB14E, 0xCF14,
+ 0xB14F, 0xCF16, 0xB150, 0xCF17, 0xB151, 0xCF18, 0xB152, 0xCF19,
+ 0xB153, 0xCF1A, 0xB154, 0xCF1B, 0xB155, 0xCF1D, 0xB156, 0xCF1E,
+ 0xB157, 0xCF1F, 0xB158, 0xCF21, 0xB159, 0xCF22, 0xB15A, 0xCF23,
+ 0xB161, 0xCF25, 0xB162, 0xCF26, 0xB163, 0xCF27, 0xB164, 0xCF28,
+ 0xB165, 0xCF29, 0xB166, 0xCF2A, 0xB167, 0xCF2B, 0xB168, 0xCF2E,
+ 0xB169, 0xCF32, 0xB16A, 0xCF33, 0xB16B, 0xCF34, 0xB16C, 0xCF35,
+ 0xB16D, 0xCF36, 0xB16E, 0xCF37, 0xB16F, 0xCF39, 0xB170, 0xCF3A,
+ 0xB171, 0xCF3B, 0xB172, 0xCF3C, 0xB173, 0xCF3D, 0xB174, 0xCF3E,
+ 0xB175, 0xCF3F, 0xB176, 0xCF40, 0xB177, 0xCF41, 0xB178, 0xCF42,
+ 0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244, 0xCF72,
+ 0xB245, 0xCF73, 0xB246, 0xCF75, 0xB247, 0xCF76, 0xB248, 0xCF77,
+ 0xB249, 0xCF79, 0xB24A, 0xCF7A, 0xB24B, 0xCF7B, 0xB24C, 0xCF7C,
+ 0xB24D, 0xCF7D, 0xB24E, 0xCF7E, 0xB24F, 0xCF7F, 0xB250, 0xCF81,
+ 0xB251, 0xCF82, 0xB252, 0xCF83, 0xB253, 0xCF84, 0xB254, 0xCF86,
+ 0xB255, 0xCF87, 0xB256, 0xCF88, 0xB257, 0xCF89, 0xB258, 0xCF8A,
+ 0xB259, 0xCF8B, 0xB25A, 0xCF8D, 0xB261, 0xCF8E, 0xB262, 0xCF8F,
+ 0xB263, 0xCF90, 0xB264, 0xCF91, 0xB265, 0xCF92, 0xB266, 0xCF93,
+ 0xB267, 0xCF94, 0xB268, 0xCF95, 0xB269, 0xCF96, 0xB26A, 0xCF97,
+ 0xB26B, 0xCF98, 0xB26C, 0xCF99, 0xB26D, 0xCF9A, 0xB26E, 0xCF9B,
+ 0xB26F, 0xCF9C, 0xB270, 0xCF9D, 0xB271, 0xCF9E, 0xB272, 0xCF9F,
+ 0xB273, 0xCFA0, 0xB274, 0xCFA2, 0xB275, 0xCFA3, 0xB276, 0xCFA4,
+ 0xB277, 0xCFA5, 0xB278, 0xCFA6, 0xB279, 0xCFA7, 0xB27A, 0xCFA9,
+ 0xB281, 0xCFAA, 0xB282, 0xCFAB, 0xB283, 0xCFAC, 0xB284, 0xCFAD,
+ 0xB285, 0xCFAE, 0xB286, 0xCFAF, 0xB287, 0xCFB1, 0xB288, 0xCFB2,
+ 0xB289, 0xCFB3, 0xB28A, 0xCFB4, 0xB28B, 0xCFB5, 0xB28C, 0xCFB6,
+ 0xB28D, 0xCFB7, 0xB28E, 0xCFB8, 0xB28F, 0xCFB9, 0xB290, 0xCFBA,
+ 0xB291, 0xCFBB, 0xB292, 0xCFBC, 0xB293, 0xCFBD, 0xB294, 0xCFBE,
+ 0xB295, 0xCFB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xCFE7, 0xB35A, 0xCFE9,
+ 0xB361, 0xCFEA, 0xB362, 0xCFEB, 0xB363, 0xCFEC, 0xB364, 0xCFED,
+ 0xB365, 0xCFEE, 0xB366, 0xCFEF, 0xB367, 0xCFF2, 0xB368, 0xCFF4,
+ 0xB369, 0xCFF6, 0xB36A, 0xCFF7, 0xB36B, 0xCFF8, 0xB36C, 0xCFF9,
+ 0xB36D, 0xCFFA, 0xB36E, 0xCFFB, 0xB36F, 0xCFFD, 0xB370, 0xCFFE,
+ 0xB371, 0xCFFF, 0xB372, 0xD001, 0xB373, 0xD002, 0xB374, 0xD003,
+ 0xB375, 0xD005, 0xB376, 0xD006, 0xB377, 0xD007, 0xB378, 0xD008,
+ 0xB379, 0xD009, 0xB37A, 0xD00A, 0xB381, 0xD00B, 0xB382, 0xD00C,
+ 0xB383, 0xD00D, 0xB384, 0xD00E, 0xB385, 0xD00F, 0xB386, 0xD010,
+ 0xB387, 0xD012, 0xB388, 0xD013, 0xB389, 0xD014, 0xB38A, 0xD015,
+ 0xB38B, 0xD016, 0xB38C, 0xD017, 0xB38D, 0xD019, 0xB38E, 0xD01A,
+ 0xB38F, 0xD01B, 0xB390, 0xD01C, 0xB391, 0xD01D, 0xB392, 0xD01E,
+ 0xB393, 0xD01F, 0xB394, 0xD020, 0xB395, 0xD021, 0xB396, 0xD022,
+ 0xB397, 0xD023, 0xB398, 0xD024, 0xB399, 0xD025, 0xB39A, 0xD026,
+ 0xB39B, 0xD027, 0xB39C, 0xD028, 0xB39D, 0xD029, 0xB39E, 0xD02A,
+ 0xB39F, 0xD02B, 0xB3A0, 0xD02C, 0xB3A1, 0xB05D, 0xB3A2, 0xB07C,
+ 0xB3A3, 0xB07D, 0xB3A4, 0xB080, 0xB3A5, 0xB084, 0xB3A6, 0xB08C,
+ 0xB3A7, 0xB08D, 0xB3A8, 0xB08F, 0xB3A9, 0xB091, 0xB3AA, 0xB098,
+ 0xB3AB, 0xB099, 0xB3AC, 0xB09A, 0xB3AD, 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B180,
+ 0xB3EF, 0xB182, 0xB3F0, 0xB188, 0xB3F1, 0xB189, 0xB3F2, 0xB18B,
+ 0xB3F3, 0xB18D, 0xB3F4, 0xB192, 0xB3F5, 0xB193, 0xB3F6, 0xB194,
+ 0xB3F7, 0xB198, 0xB3F8, 0xB19C, 0xB3F9, 0xB1A8, 0xB3FA, 0xB1CC,
+ 0xB3FB, 0xB1D0, 0xB3FC, 0xB1D4, 0xB3FD, 0xB1DC, 0xB3FE, 0xB1DD,
+ 0xB441, 0xD02E, 0xB442, 0xD02F, 0xB443, 0xD030, 0xB444, 0xD031,
+ 0xB445, 0xD032, 0xB446, 0xD033, 0xB447, 0xD036, 0xB448, 0xD037,
+ 0xB449, 0xD039, 0xB44A, 0xD03A, 0xB44B, 0xD03B, 0xB44C, 0xD03D,
+ 0xB44D, 0xD03E, 0xB44E, 0xD03F, 0xB44F, 0xD040, 0xB450, 0xD041,
+ 0xB451, 0xD042, 0xB452, 0xD043, 0xB453, 0xD046, 0xB454, 0xD048,
+ 0xB455, 0xD04A, 0xB456, 0xD04B, 0xB457, 0xD04C, 0xB458, 0xD04D,
+ 0xB459, 0xD04E, 0xB45A, 0xD04F, 0xB461, 0xD051, 0xB462, 0xD052,
+ 0xB463, 0xD053, 0xB464, 0xD055, 0xB465, 0xD056, 0xB466, 0xD057,
+ 0xB467, 0xD059, 0xB468, 0xD05A, 0xB469, 0xD05B, 0xB46A, 0xD05C,
+ 0xB46B, 0xD05D, 0xB46C, 0xD05E, 0xB46D, 0xD05F, 0xB46E, 0xD061,
+ 0xB46F, 0xD062, 0xB470, 0xD063, 0xB471, 0xD064, 0xB472, 0xD065,
+ 0xB473, 0xD066, 0xB474, 0xD067, 0xB475, 0xD068, 0xB476, 0xD069,
+ 0xB477, 0xD06A, 0xB478, 0xD06B, 0xB479, 0xD06E, 0xB47A, 0xD06F,
+ 0xB481, 0xD071, 0xB482, 0xD072, 0xB483, 0xD073, 0xB484, 0xD075,
+ 0xB485, 0xD076, 0xB486, 0xD077, 0xB487, 0xD078, 0xB488, 0xD079,
+ 0xB489, 0xD07A, 0xB48A, 0xD07B, 0xB48B, 0xD07E, 0xB48C, 0xD07F,
+ 0xB48D, 0xD080, 0xB48E, 0xD082, 0xB48F, 0xD083, 0xB490, 0xD084,
+ 0xB491, 0xD085, 0xB492, 0xD086, 0xB493, 0xD087, 0xB494, 0xD088,
+ 0xB495, 0xD089, 0xB496, 0xD08A, 0xB497, 0xD08B, 0xB498, 0xD08C,
+ 0xB499, 0xD08D, 0xB49A, 0xD08E, 0xB49B, 0xD08F, 0xB49C, 0xD090,
+ 0xB49D, 0xD091, 0xB49E, 0xD092, 0xB49F, 0xD093, 0xB4A0, 0xD094,
+ 0xB4A1, 0xB1DF, 0xB4A2, 0xB1E8, 0xB4A3, 0xB1E9, 0xB4A4, 0xB1EC,
+ 0xB4A5, 0xB1F0, 0xB4A6, 0xB1F9, 0xB4A7, 0xB1FB, 0xB4A8, 0xB1FD,
+ 0xB4A9, 0xB204, 0xB4AA, 0xB205, 0xB4AB, 0xB208, 0xB4AC, 0xB20B,
+ 0xB4AD, 0xB20C, 0xB4AE, 0xB214, 0xB4AF, 0xB215, 0xB4B0, 0xB217,
+ 0xB4B1, 0xB219, 0xB4B2, 0xB220, 0xB4B3, 0xB234, 0xB4B4, 0xB23C,
+ 0xB4B5, 0xB258, 0xB4B6, 0xB25C, 0xB4B7, 0xB260, 0xB4B8, 0xB268,
+ 0xB4B9, 0xB269, 0xB4BA, 0xB274, 0xB4BB, 0xB275, 0xB4BC, 0xB27C,
+ 0xB4BD, 0xB284, 0xB4BE, 0xB285, 0xB4BF, 0xB289, 0xB4C0, 0xB290,
+ 0xB4C1, 0xB291, 0xB4C2, 0xB294, 0xB4C3, 0xB298, 0xB4C4, 0xB299,
+ 0xB4C5, 0xB29A, 0xB4C6, 0xB2A0, 0xB4C7, 0xB2A1, 0xB4C8, 0xB2A3,
+ 0xB4C9, 0xB2A5, 0xB4CA, 0xB2A6, 0xB4CB, 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 0xB54F, 0xD0A3, 0xB550, 0xD0A6, 0xB551, 0xD0A7, 0xB552, 0xD0A9,
+ 0xB553, 0xD0AA, 0xB554, 0xD0AB, 0xB555, 0xD0AD, 0xB556, 0xD0AE,
+ 0xB557, 0xD0AF, 0xB558, 0xD0B0, 0xB559, 0xD0B1, 0xB55A, 0xD0B2,
+ 0xB561, 0xD0B3, 0xB562, 0xD0B6, 0xB563, 0xD0B8, 0xB564, 0xD0BA,
+ 0xB565, 0xD0BB, 0xB566, 0xD0BC, 0xB567, 0xD0BD, 0xB568, 0xD0BE,
+ 0xB569, 0xD0BF, 0xB56A, 0xD0C2, 0xB56B, 0xD0C3, 0xB56C, 0xD0C5,
+ 0xB56D, 0xD0C6, 0xB56E, 0xD0C7, 0xB56F, 0xD0CA, 0xB570, 0xD0CB,
+ 0xB571, 0xD0CC, 0xB572, 0xD0CD, 0xB573, 0xD0CE, 0xB574, 0xD0CF,
+ 0xB575, 0xD0D2, 0xB576, 0xD0D6, 0xB577, 0xD0D7, 0xB578, 0xD0D8,
+ 0xB579, 0xD0D9, 0xB57A, 0xD0DA, 0xB581, 0xD0DB, 0xB582, 0xD0DE,
+ 0xB583, 0xD0DF, 0xB584, 0xD0E1, 0xB585, 0xD0E2, 0xB586, 0xD0E3,
+ 0xB587, 0xD0E5, 0xB588, 0xD0E6, 0xB589, 0xD0E7, 0xB58A, 0xD0E8,
+ 0xB58B, 0xD0E9, 0xB58C, 0xD0EA, 0xB58D, 0xD0EB, 0xB58E, 0xD0EE,
+ 0xB58F, 0xD0F2, 0xB590, 0xD0F3, 0xB591, 0xD0F4, 0xB592, 0xD0F5,
+ 0xB593, 0xD0F6, 0xB594, 0xD0F7, 0xB595, 0xD0F9, 0xB596, 0xD0FA,
+ 0xB597, 0xD0FB, 0xB598, 0xD0FC, 0xB599, 0xD0FD, 0xB59A, 0xD0FE,
+ 0xB59B, 0xD0FF, 0xB59C, 0xD100, 0xB59D, 0xD101, 0xB59E, 0xD102,
+ 0xB59F,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C0, 0xB5E1, 0xB4C4, 0xB5E2, 0xB4C8,
+ 0xB5E3, 0xB4D0, 0xB5E4, 0xB4D5, 0xB5E5, 0xB4DC, 0xB5E6, 0xB4DD,
+ 0xB5E7, 0xB4E0, 0xB5E8, 0xB4E3, 0xB5E9, 0xB4E4, 0xB5EA, 0xB4E6,
+ 0xB5EB, 0xB4EC, 0xB5EC, 0xB4ED, 0xB5ED, 0xB4EF, 0xB5EE, 0xB4F1,
+ 0xB5EF, 0xB4F8, 0xB5F0, 0xB514, 0xB5F1, 0xB515, 0xB5F2, 0xB518,
+ 0xB5F3, 0xB51B, 0xB5F4, 0xB51C, 0xB5F5, 0xB524, 0xB5F6, 0xB525,
+ 0xB5F7, 0xB527, 0xB5F8, 0xB528, 0xB5F9, 0xB529, 0xB5FA, 0xB52A,
+ 0xB5FB, 0xB530, 0xB5FC, 0xB531, 0xB5FD, 0xB534, 0xB5FE, 0xB538,
+ 0xB641, 0xD105, 0xB642, 0xD106, 0xB643, 0xD107, 0xB644, 0xD108,
+ 0xB645, 0xD109, 0xB646, 0xD10A, 0xB647, 0xD10B, 0xB648, 0xD10C,
+ 0xB649, 0xD10E, 0xB64A, 0xD10F, 0xB64B, 0xD110, 0xB64C, 0xD111,
+ 0xB64D, 0xD112, 0xB64E, 0xD113, 0xB64F, 0xD114, 0xB650, 0xD115,
+ 0xB651, 0xD116, 0xB652, 0xD117, 0xB653, 0xD118, 0xB654, 0xD119,
+ 0xB655, 0xD11A, 0xB656, 0xD11B, 0xB657, 0xD11C, 0xB658, 0xD11D,
+ 0xB659, 0xD11E, 0xB65A, 0xD11F, 0xB661, 0xD120, 0xB662, 0xD121,
+ 0xB663, 0xD122, 0xB664, 0xD123, 0xB665, 0xD124, 0xB666, 0xD125,
+ 0xB667, 0xD126, 0xB668, 0xD127, 0xB669, 0xD128, 0xB66A, 0xD129,
+ 0xB66B, 0xD12A, 0xB66C, 0xD12B, 0xB66D, 0xD12C, 0xB66E, 0xD12D,
+ 0xB66F, 0xD12E, 0xB670, 0xD12F, 0xB671, 0xD132, 0xB672, 0xD133,
+ 0xB673, 0xD135, 0xB674, 0xD136, 0xB675, 0xD137, 0xB676, 0xD139,
+ 0xB677, 0xD13B, 0xB678, 0xD13C, 0xB679, 0xD13D, 0xB67A, 0xD13E,
+ 0xB681, 0xD13F, 0xB682, 0xD142, 0xB683, 0xD146, 0xB684, 0xD147,
+ 0xB685, 0xD148, 0xB686, 0xD149, 0xB687, 0xD14A, 0xB688, 0xD14B,
+ 0xB689, 0xD14E, 0xB68A, 0xD14F, 0xB68B, 0xD151, 0xB68C, 0xD152,
+ 0xB68D, 0xD153, 0xB68E, 0xD155, 0xB68F, 0xD156, 0xB690, 0xD157,
+ 0xB691, 0xD158, 0xB692, 0xD159, 0xB693, 0xD15A, 0xB694, 0xD15B,
+ 0xB695, 0xD15E, 0xB696, 0xD160, 0xB697, 0xD162, 0xB698, 0xD163,
+ 0xB699, 0xD164, 0xB69A, 0xD165, 0xB69B, 0xD166, 0xB69C, 0xD167,
+ 0xB69D, 0xD169, 0xB69E, 0xD16A, 0xB69F, 0xD16B, 0xB6A0, 0xD16D,
+ 0xB6A1, 0xB540, 0xB6A2, 0xB541, 0xB6A3, 0xB543, 0xB6A4, 0xB544,
+ 0xB6A5, 0xB545, 0xB6A6, 0xB54B, 0xB6A7, 0xB54C, 0xB6A8, 0xB54D,
+ 0xB6A9, 0xB550, 0xB6AA, 0xB554, 0xB6AB, 0xB55C, 0xB6AC, 0xB55D,
+ 0xB6AD, 0xB55F, 0xB6AE, 0xB560, 0xB6AF, 0xB561, 0xB6B0, 0xB5A0,
+ 0xB6B1, 0xB5A1, 0xB6B2, 0xB5A4, 0xB6B3, 0xB5A8, 0xB6B4, 0xB5AA,
+ 0xB6B5, 0xB5AB, 0xB6B6, 0xB5B0, 0xB6B7, 0xB5B1, 0xB6B8, 0xB5B3,
+ 0xB6B9, 0xB5B4, 0xB6BA, 0xB5B5, 0xB6BB, 0xB5BB, 0xB6BC, 0x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 0xB797, 0xB741, 0xD16E, 0xB742, 0xD16F,
+ 0xB743, 0xD170, 0xB744, 0xD171, 0xB745, 0xD172, 0xB746, 0xD173,
+ 0xB747, 0xD174, 0xB748, 0xD175, 0xB749, 0xD176, 0xB74A, 0xD177,
+ 0xB74B, 0xD178, 0xB74C, 0xD179, 0xB74D, 0xD17A, 0xB74E, 0xD17B,
+ 0xB74F, 0xD17D, 0xB750, 0xD17E, 0xB751, 0xD17F, 0xB752, 0xD180,
+ 0xB753, 0xD181, 0xB754, 0xD182, 0xB755, 0xD183, 0xB756, 0xD185,
+ 0xB757, 0xD186, 0xB758, 0xD187, 0xB759, 0xD189, 0xB75A, 0xD18A,
+ 0xB761, 0xD18B, 0xB762, 0xD18C, 0xB763, 0xD18D, 0xB764, 0xD18E,
+ 0xB765, 0xD18F, 0xB766, 0xD190, 0xB767, 0xD191, 0xB768, 0xD192,
+ 0xB769, 0xD193, 0xB76A, 0xD194, 0xB76B, 0xD195, 0xB76C, 0xD196,
+ 0xB76D, 0xD197, 0xB76E, 0xD198, 0xB76F, 0xD199, 0xB770, 0xD19A,
+ 0xB771, 0xD19B, 0xB772, 0xD19C, 0xB773, 0xD19D, 0xB774, 0xD19E,
+ 0xB775, 0xD19F, 0xB776, 0xD1A2, 0xB777, 0xD1A3, 0xB778, 0xD1A5,
+ 0xB779, 0xD1A6, 0xB77A, 0xD1A7, 0xB781, 0xD1A9, 0xB782, 0xD1AA,
+ 0xB783, 0xD1AB, 0xB784, 0xD1AC, 0xB785, 0xD1AD, 0xB786, 0xD1AE,
+ 0xB787, 0xD1AF, 0xB788, 0xD1B2, 0xB789, 0xD1B4, 0xB78A, 0xD1B6,
+ 0xB78B, 0xD1B7, 0xB78C, 0xD1B8, 0xB78D, 0xD1B9, 0xB78E, 0xD1BB,
+ 0xB78F, 0xD1BD, 0xB790, 0xD1BE, 0xB791, 0xD1BF, 0xB792, 0xD1C1,
+ 0xB793, 0xD1C2, 0xB794, 0xD1C3, 0xB795, 0xD1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 0xB861, 0xD1EB, 0xB862, 0xD1EC,
+ 0xB863, 0xD1ED, 0xB864, 0xD1EE, 0xB865, 0xD1EF, 0xB866, 0xD1F0,
+ 0xB867, 0xD1F1, 0xB868, 0xD1F2, 0xB869, 0xD1F3, 0xB86A, 0xD1F5,
+ 0xB86B, 0xD1F6, 0xB86C, 0xD1F7, 0xB86D, 0xD1F9, 0xB86E, 0xD1FA,
+ 0xB86F, 0xD1FB, 0xB870, 0xD1FC, 0xB871, 0xD1FD, 0xB872, 0xD1FE,
+ 0xB873, 0xD1FF, 0xB874, 0xD200, 0xB875, 0xD201, 0xB876, 0xD202,
+ 0xB877, 0xD203, 0xB878, 0xD204, 0xB879, 0xD205, 0xB87A, 0xD206,
+ 0xB881, 0xD208, 0xB882, 0xD20A, 0xB883, 0xD20B, 0xB884, 0xD20C,
+ 0xB885, 0xD20D, 0xB886, 0xD20E, 0xB887, 0xD20F, 0xB888, 0xD211,
+ 0xB889, 0xD212, 0xB88A, 0xD213, 0xB88B, 0xD214, 0xB88C, 0xD215,
+ 0xB88D, 0xD216, 0xB88E, 0xD217, 0xB88F, 0xD218, 0xB890, 0xD219,
+ 0xB891, 0xD21A, 0xB892, 0xD21B, 0xB893, 0xD21C, 0xB894, 0xD21D,
+ 0xB895, 0xD21E, 0xB896, 0xD21F, 0xB897, 0xD220, 0xB898, 0xD221,
+ 0xB899, 0xD222, 0xB89A, 0xD223, 0xB89B, 0xD224, 0xB89C, 0xD225,
+ 0xB89D, 0xD226, 0xB89E, 0xD227, 0xB89F, 0xD228, 0xB8A0, 0xD229,
+ 0xB8A1, 0xB96B, 0xB8A2, 0xB96D, 0xB8A3, 0xB974, 0xB8A4, 0xB975,
+ 0xB8A5, 0xB978, 0xB8A6, 0xB97C, 0xB8A7, 0xB984, 0xB8A8, 0xB985,
+ 0xB8A9, 0xB987, 0xB8AA, 0xB989, 0xB8AB, 0xB98A, 0xB8AC, 0xB98D,
+ 0xB8AD, 0xB98E, 0xB8AE, 0xB9AC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 0xBA85, 0xB8EE, 0xBA87, 0xB8EF, 0xBA8C, 0xB8F0, 0xBAA8,
+ 0xB8F1, 0xBAA9, 0xB8F2, 0xBAAB, 0xB8F3, 0xBAAC, 0xB8F4, 0xBAB0,
+ 0xB8F5, 0xBAB2, 0xB8F6, 0xBAB8, 0xB8F7, 0xBAB9, 0xB8F8, 0xBABB,
+ 0xB8F9, 0xBABD, 0xB8FA, 0xBAC4, 0xB8FB, 0xBAC8, 0xB8FC, 0xBAD8,
+ 0xB8FD, 0xBAD9, 0xB8FE, 0xBAFC, 0xB941, 0xD22A, 0xB942, 0xD22B,
+ 0xB943, 0xD22E, 0xB944, 0xD22F, 0xB945, 0xD231, 0xB946, 0xD232,
+ 0xB947, 0xD233, 0xB948, 0xD235, 0xB949, 0xD236, 0xB94A, 0xD237,
+ 0xB94B, 0xD238, 0xB94C, 0xD239, 0xB94D, 0xD23A, 0xB94E, 0xD23B,
+ 0xB94F, 0xD23E, 0xB950, 0xD240, 0xB951, 0xD242, 0xB952, 0xD243,
+ 0xB953, 0xD244, 0xB954, 0xD245, 0xB955, 0xD246, 0xB956, 0xD247,
+ 0xB957, 0xD249, 0xB958, 0xD24A, 0xB959, 0xD24B, 0xB95A, 0xD24C,
+ 0xB961, 0xD24D, 0xB962, 0xD24E, 0xB963, 0xD24F, 0xB964, 0xD250,
+ 0xB965, 0xD251, 0xB966, 0xD252, 0xB967, 0xD253, 0xB968, 0xD254,
+ 0xB969, 0xD255, 0xB96A, 0xD256, 0xB96B, 0xD257, 0xB96C, 0xD258,
+ 0xB96D, 0xD259, 0xB96E, 0xD25A, 0xB96F, 0xD25B, 0xB970, 0xD25D,
+ 0xB971, 0xD25E, 0xB972, 0xD25F, 0xB973, 0xD260, 0xB974, 0xD261,
+ 0xB975, 0xD262, 0xB976, 0xD263, 0xB977, 0xD265, 0xB978, 0xD266,
+ 0xB979, 0xD267, 0xB97A, 0xD268, 0xB981, 0xD269, 0xB982, 0xD26A,
+ 0xB983, 0xD26B,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0xD322, 0xBB5A, 0xD323,
+ 0xBB61, 0xD324, 0xBB62, 0xD326, 0xBB63, 0xD327, 0xBB64, 0xD32A,
+ 0xBB65, 0xD32B, 0xBB66, 0xD32D, 0xBB67, 0xD32E, 0xBB68, 0xD32F,
+ 0xBB69, 0xD331, 0xBB6A, 0xD332, 0xBB6B, 0xD333, 0xBB6C, 0xD334,
+ 0xBB6D, 0xD335, 0xBB6E, 0xD336, 0xBB6F, 0xD337, 0xBB70, 0xD33A,
+ 0xBB71, 0xD33E, 0xBB72, 0xD33F, 0xBB73, 0xD340, 0xBB74, 0xD341,
+ 0xBB75, 0xD342, 0xBB76, 0xD343, 0xBB77, 0xD346, 0xBB78, 0xD347,
+ 0xBB79, 0xD348, 0xBB7A, 0xD349, 0xBB81, 0xD34A, 0xBB82, 0xD34B,
+ 0xBB83, 0xD34C, 0xBB84, 0xD34D, 0xBB85, 0xD34E, 0xBB86, 0xD34F,
+ 0xBB87, 0xD350, 0xBB88, 0xD351, 0xBB89, 0xD352, 0xBB8A, 0xD353,
+ 0xBB8B, 0xD354, 0xBB8C, 0xD355, 0xBB8D, 0xD356, 0xBB8E, 0xD357,
+ 0xBB8F, 0xD358, 0xBB90, 0xD359, 0xBB91, 0xD35A, 0xBB92, 0xD35B,
+ 0xBB93, 0xD35C, 0xBB94, 0xD35D, 0xBB95, 0xD35E, 0xBB96, 0xD35F,
+ 0xBB97, 0xD360, 0xBB98, 0xD361, 0xBB99, 0xD362, 0xBB9A, 0xD363,
+ 0xBB9B, 0xD364, 0xBB9C, 0xD365, 0xBB9D, 0xD366, 0xBB9E, 0xD367,
+ 0xBB9F, 0xD368, 0xBBA0, 0xD369, 0xBBA1, 0xBE68, 0xBBA2, 0xBE6A,
+ 0xBBA3, 0xBE70, 0xBBA4, 0xBE71, 0xBBA5, 0xBE73, 0xBBA6, 0xBE74,
+ 0xBBA7, 0xBE75, 0xBBA8, 0xBE7B, 0xBBA9, 0xBE7C, 0xBBAA, 0xBE7D,
+ 0x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BE57, 0xD450, 0xBE58, 0xD451,
+ 0xBE59, 0xD452, 0xBE5A, 0xD453, 0xBE61, 0xD454, 0xBE62, 0xD455,
+ 0xBE63, 0xD456, 0xBE64, 0xD457, 0xBE65, 0xD458, 0xBE66, 0xD459,
+ 0xBE67, 0xD45A, 0xBE68, 0xD45B, 0xBE69, 0xD45D, 0xBE6A, 0xD45E,
+ 0xBE6B, 0xD45F, 0xBE6C, 0xD461, 0xBE6D, 0xD462, 0xBE6E, 0xD463,
+ 0xBE6F, 0xD465, 0xBE70, 0xD466, 0xBE71, 0xD467, 0xBE72, 0xD468,
+ 0xBE73, 0xD469, 0xBE74, 0xD46A, 0xBE75, 0xD46B, 0xBE76, 0xD46C,
+ 0xBE77, 0xD46E, 0xBE78, 0xD470, 0xBE79, 0xD471, 0xBE7A, 0xD472,
+ 0xBE81, 0xD473, 0xBE82, 0xD474, 0xBE83, 0xD475, 0xBE84, 0xD476,
+ 0xBE85, 0xD477, 0xBE86, 0xD47A, 0xBE87, 0xD47B, 0xBE88, 0xD47D,
+ 0xBE89, 0xD47E, 0xBE8A, 0xD481, 0xBE8B, 0xD483, 0xBE8C, 0xD484,
+ 0xBE8D, 0xD485, 0xBE8E, 0xD486, 0xBE8F, 0xD487, 0xBE90, 0xD48A,
+ 0xBE91, 0xD48C, 0xBE92, 0xD48E, 0xBE93, 0xD48F, 0xBE94, 0xD490,
+ 0xBE95, 0xD491, 0xBE96, 0xD492, 0xBE97, 0xD493, 0xBE98, 0xD495,
+ 0xBE99, 0xD496, 0xBE9A, 0xD497, 0xBE9B, 0xD498, 0xBE9C, 0xD499,
+ 0xBE9D, 0xD49A, 0xBE9E, 0xD49B, 0xBE9F, 0xD49C, 0xBEA0, 0xD49D,
+ 0xBEA1, 0xC434, 0xBEA2, 0xC43C, 0xBEA3, 0xC43D, 0xBEA4, 0xC448,
+ 0xBEA5, 0xC464, 0xBEA6, 0xC465, 0xBEA7, 0xC468, 0xBEA8, 0xC46C,
+ 0xBEA9, 0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, 0xBFFC, 0xC6E0, 0xBFFD, 0xC6E1, 0xBFFE, 0xC6E8,
+ 0xC041, 0xD4FE, 0xC042, 0xD4FF, 0xC043, 0xD500, 0xC044, 0xD501,
+ 0xC045, 0xD502, 0xC046, 0xD503, 0xC047, 0xD505, 0xC048, 0xD506,
+ 0xC049, 0xD507, 0xC04A, 0xD509, 0xC04B, 0xD50A, 0xC04C, 0xD50B,
+ 0xC04D, 0xD50D, 0xC04E, 0xD50E, 0xC04F, 0xD50F, 0xC050, 0xD510,
+ 0xC051, 0xD511, 0xC052, 0xD512, 0xC053, 0xD513, 0xC054, 0xD516,
+ 0xC055, 0xD518, 0xC056, 0xD519, 0xC057, 0xD51A, 0xC058, 0xD51B,
+ 0xC059, 0xD51C, 0xC05A, 0xD51D, 0xC061, 0xD51E, 0xC062, 0xD51F,
+ 0xC063, 0xD520, 0xC064, 0xD521, 0xC065, 0xD522, 0xC066, 0xD523,
+ 0xC067, 0xD524, 0xC068, 0xD525, 0xC069, 0xD526, 0xC06A, 0xD527,
+ 0xC06B, 0xD528, 0xC06C, 0xD529, 0xC06D, 0xD52A, 0xC06E, 0xD52B,
+ 0xC06F, 0xD52C, 0xC070, 0xD52D, 0xC071, 0xD52E, 0xC072, 0xD52F,
+ 0xC073, 0xD530, 0xC074, 0xD531, 0xC075, 0xD532, 0xC076, 0xD533,
+ 0xC077, 0xD534, 0xC078, 0xD535, 0xC079, 0xD536, 0xC07A, 0xD537,
+ 0xC081, 0xD538, 0xC082, 0xD539, 0xC083, 0xD53A, 0xC084, 0xD53B,
+ 0xC085, 0xD53E, 0xC086, 0xD53F, 0xC087, 0xD541, 0xC088, 0xD542,
+ 0xC089, 0xD543, 0xC08A, 0xD545, 0xC08B, 0xD546, 0xC08C, 0xD547,
+ 0xC08D, 0xD548, 0xC08E, 0xD549, 0xC08F, 0xD54A, 0xC090, 0xD54B,
+ 0xC091, 0xD54E, 0xC092, 0xD550, 0xC093, 0xD552, 0xC094, 0xD553,
+ 0xC095, 0xD554, 0xC096, 0xD555, 0xC097, 0xD556, 0xC098, 0xD557,
+ 0xC099, 0xD55A, 0xC09A, 0xD55B, 0xC09B, 0xD55D, 0xC09C, 0xD55E,
+ 0xC09D, 0xD55F, 0xC09E, 0xD561, 0xC09F, 0xD562, 0xC0A0, 0xD563,
+ 0xC0A1, 0xC6E9, 0xC0A2, 0xC6EC, 0xC0A3, 0xC6F0, 0xC0A4, 0xC6F8,
+ 0xC0A5, 0xC6F9, 0xC0A6, 0xC6FD, 0xC0A7, 0xC704, 0xC0A8, 0xC705,
+ 0xC0A9, 0xC708, 0xC0AA, 0xC70C, 0xC0AB, 0xC714, 0xC0AC, 0xC715,
+ 0xC0AD, 0xC717, 0xC0AE, 0xC719, 0xC0AF, 0xC720, 0xC0B0, 0xC721,
+ 0xC0B1, 0xC724, 0xC0B2, 0xC728, 0xC0B3, 0xC730, 0xC0B4, 0xC731,
+ 0xC0B5, 0xC733, 0xC0B6, 0xC735, 0xC0B7, 0xC737, 0xC0B8, 0xC73C,
+ 0xC0B9, 0xC73D, 0xC0BA, 0xC740, 0xC0BB, 0xC744, 0xC0BC, 0xC74A,
+ 0xC0BD, 0xC74C, 0xC0BE, 0xC74D, 0xC0BF, 0xC74F, 0xC0C0, 0xC751,
+ 0xC0C1, 0xC752, 0xC0C2, 0xC753, 0xC0C3, 0xC754, 0xC0C4, 0xC755,
+ 0xC0C5, 0xC756, 0xC0C6, 0xC757, 0xC0C7, 0xC758, 0xC0C8, 0xC75C,
+ 0xC0C9, 0xC760, 0xC0CA, 0xC768, 0xC0CB, 0xC76B, 0xC0CC, 0xC774,
+ 0xC0CD, 0xC775, 0xC0CE, 0xC778, 0xC0CF, 0xC77C, 0xC0D0, 0xC77D,
+ 0xC0D1, 0xC77E, 0xC0D2, 0xC783, 0xC0D3, 0xC784, 0xC0D4, 0xC785,
+ 0xC0D5, 0xC787, 0xC0D6, 0xC788, 0xC0D7, 0xC789, 0xC0D8, 0xC78A,
+ 0xC0D9, 0xC78E, 0xC0DA, 0xC790, 0xC0DB, 0xC791, 0xC0DC, 0xC794,
+ 0xC0DD, 0xC796, 0xC0DE, 0xC797, 0xC0DF, 0xC798, 0xC0E0, 0xC79A,
+ 0xC0E1, 0xC7A0, 0xC0E2, 0xC7A1, 0xC0E3, 0xC7A3, 0xC0E4, 0xC7A4,
+ 0xC0E5, 0xC7A5, 0xC0E6, 0xC7A6, 0xC0E7, 0xC7AC, 0xC0E8, 0xC7AD,
+ 0xC0E9, 0xC7B0, 0xC0EA, 0xC7B4, 0xC0EB, 0xC7BC, 0xC0EC, 0xC7BD,
+ 0xC0ED, 0xC7BF, 0xC0EE, 0xC7C0, 0xC0EF, 0xC7C1, 0xC0F0, 0xC7C8,
+ 0xC0F1, 0xC7C9, 0xC0F2, 0xC7CC, 0xC0F3, 0xC7CE, 0xC0F4, 0xC7D0,
+ 0xC0F5, 0xC7D8, 0xC0F6, 0xC7DD, 0xC0F7, 0xC7E4, 0xC0F8, 0xC7E8,
+ 0xC0F9, 0xC7EC, 0xC0FA, 0xC800, 0xC0FB, 0xC801, 0xC0FC, 0xC804,
+ 0xC0FD, 0xC808, 0xC0FE, 0xC80A, 0xC141, 0xD564, 0xC142, 0xD566,
+ 0xC143, 0xD567, 0xC144, 0xD56A, 0xC145, 0xD56C, 0xC146, 0xD56E,
+ 0xC147, 0xD56F, 0xC148, 0xD570, 0xC149, 0xD571, 0xC14A, 0xD572,
+ 0xC14B, 0xD573, 0xC14C, 0xD576, 0xC14D, 0xD577, 0xC14E, 0xD579,
+ 0xC14F, 0xD57A, 0xC150, 0xD57B, 0xC151, 0xD57D, 0xC152, 0xD57E,
+ 0xC153, 0xD57F, 0xC154, 0xD580, 0xC155, 0xD581, 0xC156, 0xD582,
+ 0xC157, 0xD583, 0xC158, 0xD586, 0xC159, 0xD58A, 0xC15A, 0xD58B,
+ 0xC161, 0xD58C, 0xC162, 0xD58D, 0xC163, 0xD58E, 0xC164, 0xD58F,
+ 0xC165, 0xD591, 0xC166, 0xD592, 0xC167, 0xD593, 0xC168, 0xD594,
+ 0xC169, 0xD595, 0xC16A, 0xD596, 0xC16B, 0xD597, 0xC16C, 0xD598,
+ 0xC16D, 0xD599, 0xC16E, 0xD59A, 0xC16F, 0xD59B, 0xC170, 0xD59C,
+ 0xC171, 0xD59D, 0xC172, 0xD59E, 0xC173, 0xD59F, 0xC174, 0xD5A0,
+ 0xC175, 0xD5A1, 0xC176, 0xD5A2, 0xC177, 0xD5A3, 0xC178, 0xD5A4,
+ 0xC179, 0xD5A6, 0xC17A, 0xD5A7, 0xC181, 0xD5A8, 0xC182, 0xD5A9,
+ 0xC183, 0xD5AA, 0xC184, 0xD5AB, 0xC185, 0xD5AC, 0xC186, 0xD5AD,
+ 0xC187, 0xD5AE, 0xC188, 0xD5AF, 0xC189, 0xD5B0, 0xC18A, 0xD5B1,
+ 0xC18B, 0xD5B2, 0xC18C, 0xD5B3, 0xC18D, 0xD5B4, 0xC18E, 0xD5B5,
+ 0xC18F, 0xD5B6, 0xC190, 0xD5B7, 0xC191, 0xD5B8, 0xC192, 0xD5B9,
+ 0xC193, 0xD5BA, 0xC194, 0xD5BB, 0xC195, 0xD5BC, 0xC196, 0xD5BD,
+ 0xC197, 0xD5BE, 0xC198, 0xD5BF, 0xC199, 0xD5C0, 0xC19A, 0xD5C1,
+ 0xC19B, 0xD5C2, 0xC19C, 0xD5C3, 0xC19D, 0xD5C4, 0xC19E, 0xD5C5,
+ 0xC19F, 0xD5C6, 0xC1A0, 0xD5C7, 0xC1A1, 0xC810, 0xC1A2, 0xC811,
+ 0xC1A3, 0xC813, 0xC1A4, 0xC815, 0xC1A5, 0xC816, 0xC1A6, 0xC81C,
+ 0xC1A7, 0xC81D, 0xC1A8, 0xC820, 0xC1A9, 0xC824, 0xC1AA, 0xC82C,
+ 0xC1AB, 0xC82D, 0xC1AC, 0xC82F, 0xC1AD, 0xC831, 0xC1AE, 0xC838,
+ 0xC1AF, 0xC83C, 0xC1B0, 0xC840, 0xC1B1, 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0xC999, 0xC1F4, 0xC99B, 0xC1F5, 0xC99D, 0xC1F6, 0xC9C0,
+ 0xC1F7, 0xC9C1, 0xC1F8, 0xC9C4, 0xC1F9, 0xC9C7, 0xC1FA, 0xC9C8,
+ 0xC1FB, 0xC9CA, 0xC1FC, 0xC9D0, 0xC1FD, 0xC9D1, 0xC1FE, 0xC9D3,
+ 0xC241, 0xD5CA, 0xC242, 0xD5CB, 0xC243, 0xD5CD, 0xC244, 0xD5CE,
+ 0xC245, 0xD5CF, 0xC246, 0xD5D1, 0xC247, 0xD5D3, 0xC248, 0xD5D4,
+ 0xC249, 0xD5D5, 0xC24A, 0xD5D6, 0xC24B, 0xD5D7, 0xC24C, 0xD5DA,
+ 0xC24D, 0xD5DC, 0xC24E, 0xD5DE, 0xC24F, 0xD5DF, 0xC250, 0xD5E0,
+ 0xC251, 0xD5E1, 0xC252, 0xD5E2, 0xC253, 0xD5E3, 0xC254, 0xD5E6,
+ 0xC255, 0xD5E7, 0xC256, 0xD5E9, 0xC257, 0xD5EA, 0xC258, 0xD5EB,
+ 0xC259, 0xD5ED, 0xC25A, 0xD5EE, 0xC261, 0xD5EF, 0xC262, 0xD5F0,
+ 0xC263, 0xD5F1, 0xC264, 0xD5F2, 0xC265, 0xD5F3, 0xC266, 0xD5F6,
+ 0xC267, 0xD5F8, 0xC268, 0xD5FA, 0xC269, 0xD5FB, 0xC26A, 0xD5FC,
+ 0xC26B, 0xD5FD, 0xC26C, 0xD5FE, 0xC26D, 0xD5FF, 0xC26E, 0xD602,
+ 0xC26F, 0xD603, 0xC270, 0xD605, 0xC271, 0xD606, 0xC272, 0xD607,
+ 0xC273, 0xD609, 0xC274, 0xD60A, 0xC275, 0xD60B, 0xC276, 0xD60C,
+ 0xC277, 0xD60D, 0xC278, 0xD60E, 0xC279, 0xD60F, 0xC27A, 0xD612,
+ 0xC281, 0xD616, 0xC282, 0xD617, 0xC283, 0xD618, 0xC284, 0xD619,
+ 0xC285, 0xD61A, 0xC286, 0xD61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64E, 0xC34D, 0xD64F, 0xC34E, 0xD650,
+ 0xC34F, 0xD652, 0xC350, 0xD653, 0xC351, 0xD656, 0xC352, 0xD657,
+ 0xC353, 0xD659, 0xC354, 0xD65A, 0xC355, 0xD65B, 0xC356, 0xD65D,
+ 0xC357, 0xD65E, 0xC358, 0xD65F, 0xC359, 0xD660, 0xC35A, 0xD661,
+ 0xC361, 0xD662, 0xC362, 0xD663, 0xC363, 0xD664, 0xC364, 0xD665,
+ 0xC365, 0xD666, 0xC366, 0xD668, 0xC367, 0xD66A, 0xC368, 0xD66B,
+ 0xC369, 0xD66C, 0xC36A, 0xD66D, 0xC36B, 0xD66E, 0xC36C, 0xD66F,
+ 0xC36D, 0xD672, 0xC36E, 0xD673, 0xC36F, 0xD675, 0xC370, 0xD676,
+ 0xC371, 0xD677, 0xC372, 0xD678, 0xC373, 0xD679, 0xC374, 0xD67A,
+ 0xC375, 0xD67B, 0xC376, 0xD67C, 0xC377, 0xD67D, 0xC378, 0xD67E,
+ 0xC379, 0xD67F, 0xC37A, 0xD680, 0xC381, 0xD681, 0xC382, 0xD682,
+ 0xC383, 0xD684, 0xC384, 0xD686, 0xC385, 0xD687, 0xC386, 0xD688,
+ 0xC387, 0xD689, 0xC388, 0xD68A, 0xC389, 0xD68B, 0xC38A, 0xD68E,
+ 0xC38B, 0xD68F, 0xC38C, 0xD691, 0xC38D, 0xD692, 0xC38E, 0xD693,
+ 0xC38F, 0xD695, 0xC390, 0xD696, 0xC391, 0xD697, 0xC392, 0xD698,
+ 0xC393, 0xD699, 0xC394, 0xD69A, 0xC395, 0xD69B, 0xC396, 0xD69C,
+ 0xC397, 0xD69E, 0xC398, 0xD6A0, 0xC399, 0xD6A2, 0xC39A, 0xD6A3,
+ 0xC39B, 0xD6A4, 0xC39C, 0xD6A5, 0xC39D, 0xD6A6, 0xC39E, 0xD6A7,
+ 0xC39F, 0xD6A9, 0xC3A0, 0xD6AA, 0xC3A1, 0xCC3C, 0xC3A2, 0xCC3D,
+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DB, 0xC46C, 0xD6DC, 0xC46D, 0xD6DD, 0xC46E, 0xD6DE,
+ 0xC46F, 0xD6DF, 0xC470, 0xD6E1, 0xC471, 0xD6E2, 0xC472, 0xD6E3,
+ 0xC473, 0xD6E5, 0xC474, 0xD6E6, 0xC475, 0xD6E7, 0xC476, 0xD6E9,
+ 0xC477, 0xD6EA, 0xC478, 0xD6EB, 0xC479, 0xD6EC, 0xC47A, 0xD6ED,
+ 0xC481, 0xD6EE, 0xC482, 0xD6EF, 0xC483, 0xD6F1, 0xC484, 0xD6F2,
+ 0xC485, 0xD6F3, 0xC486, 0xD6F4, 0xC487, 0xD6F6, 0xC488, 0xD6F7,
+ 0xC489, 0xD6F8, 0xC48A, 0xD6F9, 0xC48B, 0xD6FA, 0xC48C, 0xD6FB,
+ 0xC48D, 0xD6FE, 0xC48E, 0xD6FF, 0xC48F, 0xD701, 0xC490, 0xD702,
+ 0xC491, 0xD703, 0xC492, 0xD705, 0xC493, 0xD706, 0xC494, 0xD707,
+ 0xC495, 0xD708, 0xC496, 0xD709, 0xC497, 0xD70A, 0xC498, 0xD70B,
+ 0xC499, 0xD70C, 0xC49A, 0xD70D, 0xC49B, 0xD70E, 0xC49C, 0xD70F,
+ 0xC49D, 0xD710, 0xC49E, 0xD712, 0xC49F, 0xD713, 0xC4A0, 0xD714,
+ 0xC4A1, 0xCE58, 0xC4A2, 0xCE59, 0xC4A3, 0xCE5C, 0xC4A4, 0xCE5F,
+ 0xC4A5, 0xCE60, 0xC4A6, 0xCE61, 0xC4A7, 0xCE68, 0xC4A8, 0xCE69,
+ 0xC4A9, 0xCE6B, 0xC4AA, 0xCE6D, 0xC4AB, 0xCE74, 0xC4AC, 0xCE75,
+ 0xC4AD, 0xCE78, 0xC4AE, 0xCE7C, 0xC4AF, 0xCE84, 0xC4B0, 0xCE85,
+ 0xC4B1, 0xCE87, 0xC4B2, 0xCE89, 0xC4B3, 0xCE90, 0xC4B4, 0xCE91,
+ 0xC4B5, 0xCE94, 0x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+ 0xC4F5, 0xCFFC, 0xC4F6, 0xD000, 0xC4F7, 0xD004, 0xC4F8, 0xD011,
+ 0xC4F9, 0xD018, 0xC4FA, 0xD02D, 0xC4FB, 0xD034, 0xC4FC, 0xD035,
+ 0xC4FD, 0xD038, 0xC4FE, 0xD03C, 0xC541, 0xD715, 0xC542, 0xD716,
+ 0xC543, 0xD717, 0xC544, 0xD71A, 0xC545, 0xD71B, 0xC546, 0xD71D,
+ 0xC547, 0xD71E, 0xC548, 0xD71F, 0xC549, 0xD721, 0xC54A, 0xD722,
+ 0xC54B, 0xD723, 0xC54C, 0xD724, 0xC54D, 0xD725, 0xC54E, 0xD726,
+ 0xC54F, 0xD727, 0xC550, 0xD72A, 0xC551, 0xD72C, 0xC552, 0xD72E,
+ 0xC553, 0xD72F, 0xC554, 0xD730, 0xC555, 0xD731, 0xC556, 0xD732,
+ 0xC557, 0xD733, 0xC558, 0xD736, 0xC559, 0xD737, 0xC55A, 0xD739,
+ 0xC561, 0xD73A, 0xC562, 0xD73B, 0xC563, 0xD73D, 0xC564, 0xD73E,
+ 0xC565, 0xD73F, 0xC566, 0xD740, 0xC567, 0xD741, 0xC568, 0xD742,
+ 0xC569, 0xD743, 0xC56A, 0xD745, 0xC56B, 0xD746, 0xC56C, 0xD748,
+ 0xC56D, 0xD74A, 0xC56E, 0xD74B, 0xC56F, 0xD74C, 0xC570, 0xD74D,
+ 0xC571, 0xD74E, 0xC572, 0xD74F, 0xC573, 0xD752, 0xC574, 0xD753,
+ 0xC575, 0xD755, 0xC576, 0xD75A, 0xC577, 0xD75B, 0xC578, 0xD75C,
+ 0xC579, 0xD75D, 0xC57A, 0xD75E, 0xC581, 0xD75F, 0xC582, 0xD762,
+ 0xC583, 0xD764, 0xC584, 0xD766, 0xC585, 0xD767, 0xC586, 0xD768,
+ 0xC587, 0xD76A, 0xC588, 0xD76B, 0xC589, 0xD76D, 0xC58A, 0xD76E,
+ 0xC58B, 0xD76F, 0xC58C, 0xD771, 0xC58D, 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 0x5C79, 0xFDE0, 0x7D07, 0xFDE1, 0x8A16, 0xFDE2, 0x6B20,
+ 0xFDE3, 0x6B3D, 0xFDE4, 0x6B46, 0xFDE5, 0x5438, 0xFDE6, 0x6070,
+ 0xFDE7, 0x6D3D, 0xFDE8, 0x7FD5, 0xFDE9, 0x8208, 0xFDEA, 0x50D6,
+ 0xFDEB, 0x51DE, 0xFDEC, 0x559C, 0xFDED, 0x566B, 0xFDEE, 0x56CD,
+ 0xFDEF, 0x59EC, 0xFDF0, 0x5B09, 0xFDF1, 0x5E0C, 0xFDF2, 0x6199,
+ 0xFDF3, 0x6198, 0xFDF4, 0x6231, 0xFDF5, 0x665E, 0xFDF6, 0x66E6,
+ 0xFDF7, 0x7199, 0xFDF8, 0x71B9, 0xFDF9, 0x71BA, 0xFDFA, 0x72A7,
+ 0xFDFB, 0x79A7, 0xFDFC, 0x7A00, 0xFDFD, 0x7FB2, 0xFDFE, 0x8A70,
+ 0, 0
+};
+
+
+
+WCHAR ff_convert ( /* Converted code, 0 means conversion error */
+ WCHAR src, /* Character code to be converted */
+ UINT dir /* 0: Unicode to OEMCP, 1: OEMCP to Unicode */
+)
+{
+ const WCHAR *p;
+ WCHAR c;
+ int i, n, li, hi;
+
+
+ if (src < 0x80) { /* ASCII */
+ c = src;
+ } else {
+ if (dir) { /* OEMCP to unicode */
+ p = oem2uni;
+ hi = sizeof(oem2uni) / 4 - 1;
+ } else { /* Unicode to OEMCP */
+ p = uni2oem;
+ hi = sizeof(uni2oem) / 4 - 1;
+ }
+ li = 0;
+ for (n = 16; n; n--) {
+ i = li + (hi - li) / 2;
+ if (src == p[i * 2]) break;
+ if (src > p[i * 2])
+ li = i;
+ else
+ hi = i;
+ }
+ c = n ? p[i * 2 + 1] : 0;
+ }
+
+ return c;
+}
+
+
+
+
+WCHAR ff_wtoupper ( /* Upper converted character */
+ WCHAR chr /* Input character */
+)
+{
+ static const WCHAR tbl_lower[] = { 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0xA1, 0x00A2, 0x00A3, 0x00A5, 0x00AC, 0x00AF, 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0x0FF, 0x101, 0x103, 0x105, 0x107, 0x109, 0x10B, 0x10D, 0x10F, 0x111, 0x113, 0x115, 0x117, 0x119, 0x11B, 0x11D, 0x11F, 0x121, 0x123, 0x125, 0x127, 0x129, 0x12B, 0x12D, 0x12F, 0x131, 0x133, 0x135, 0x137, 0x13A, 0x13C, 0x13E, 0x140, 0x142, 0x144, 0x146, 0x148, 0x14B, 0x14D, 0x14F, 0x151, 0x153, 0x155, 0x157, 0x159, 0x15B, 0x15D, 0x15F, 0x161, 0x163, 0x165, 0x167, 0x169, 0x16B, 0x16D, 0x16F, 0x171, 0x173, 0x175, 0x177, 0x17A, 0x17C, 0x17E, 0x192, 0x3B1, 0x3B2, 0x3B3, 0x3B4, 0x3B5, 0x3B6, 0x3B7, 0x3B8, 0x3B9, 0x3BA, 0x3BB, 0x3BC, 0x3BD, 0x3BE, 0x3BF, 0x3C0, 0x3C1, 0x3C3, 0x3C4, 0x3C5, 0x3C6, 0x3C7, 0x3C8, 0x3C9, 0x3CA, 0x430, 0x431, 0x432, 0x433, 0x434, 0x435, 0x436, 0x437, 0x438, 0x439, 0x43A, 0x43B, 0x43C, 0x43D, 0x43E, 0x43F, 0x440, 0x441, 0x442, 0x443, 0x444, 0x445, 0x446, 0x447, 0x448, 0x449, 0x44A, 0x44B, 0x44C, 0x44D, 0x44E, 0x44F, 0x451, 0x452, 0x453, 0x454, 0x455, 0x456, 0x457, 0x458, 0x459, 0x45A, 0x45B, 0x45C, 0x45E, 0x45F, 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177, 0x2178, 0x2179, 0x217A, 0x217B, 0x217C, 0x217D, 0x217E, 0x217F, 0xFF41, 0xFF42, 0xFF43, 0xFF44, 0xFF45, 0xFF46, 0xFF47, 0xFF48, 0xFF49, 0xFF4A, 0xFF4B, 0xFF4C, 0xFF4D, 0xFF4E, 0xFF4F, 0xFF50, 0xFF51, 0xFF52, 0xFF53, 0xFF54, 0xFF55, 0xFF56, 0xFF57, 0xFF58, 0xFF59, 0xFF5A, 0 };
+ static const WCHAR tbl_upper[] = { 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x21, 0xFFE0, 0xFFE1, 0xFFE5, 0xFFE2, 0xFFE3, 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0x178, 0x100, 0x102, 0x104, 0x106, 0x108, 0x10A, 0x10C, 0x10E, 0x110, 0x112, 0x114, 0x116, 0x118, 0x11A, 0x11C, 0x11E, 0x120, 0x122, 0x124, 0x126, 0x128, 0x12A, 0x12C, 0x12E, 0x130, 0x132, 0x134, 0x136, 0x139, 0x13B, 0x13D, 0x13F, 0x141, 0x143, 0x145, 0x147, 0x14A, 0x14C, 0x14E, 0x150, 0x152, 0x154, 0x156, 0x158, 0x15A, 0x15C, 0x15E, 0x160, 0x162, 0x164, 0x166, 0x168, 0x16A, 0x16C, 0x16E, 0x170, 0x172, 0x174, 0x176, 0x179, 0x17B, 0x17D, 0x191, 0x391, 0x392, 0x393, 0x394, 0x395, 0x396, 0x397, 0x398, 0x399, 0x39A, 0x39B, 0x39C, 0x39D, 0x39E, 0x39F, 0x3A0, 0x3A1, 0x3A3, 0x3A4, 0x3A5, 0x3A6, 0x3A7, 0x3A8, 0x3A9, 0x3AA, 0x410, 0x411, 0x412, 0x413, 0x414, 0x415, 0x416, 0x417, 0x418, 0x419, 0x41A, 0x41B, 0x41C, 0x41D, 0x41E, 0x41F, 0x420, 0x421, 0x422, 0x423, 0x424, 0x425, 0x426, 0x427, 0x428, 0x429, 0x42A, 0x42B, 0x42C, 0x42D, 0x42E, 0x42F, 0x401, 0x402, 0x403, 0x404, 0x405, 0x406, 0x407, 0x408, 0x409, 0x40A, 0x40B, 0x40C, 0x40E, 0x40F, 0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166, 0x2167, 0x2168, 0x2169, 0x216A, 0x216B, 0x216C, 0x216D, 0x216E, 0x216F, 0xFF21, 0xFF22, 0xFF23, 0xFF24, 0xFF25, 0xFF26, 0xFF27, 0xFF28, 0xFF29, 0xFF2A, 0xFF2B, 0xFF2C, 0xFF2D, 0xFF2E, 0xFF2F, 0xFF30, 0xFF31, 0xFF32, 0xFF33, 0xFF34, 0xFF35, 0xFF36, 0xFF37, 0xFF38, 0xFF39, 0xFF3A, 0 };
+ int i;
+
+
+ for (i = 0; tbl_lower[i] && chr != tbl_lower[i]; i++) ;
+
+ return tbl_lower[i] ? tbl_upper[i] : chr;
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/option/cc950.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/option/cc950.c
new file mode 100644
index 0000000..f58c9a4
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/option/cc950.c
@@ -0,0 +1,6829 @@
+/*------------------------------------------------------------------------*/
+/* Unicode - OEM code bidirectional converter (C)ChaN, 2009 */
+/* */
+/* CP950 (Traditional Chinese Big5) */
+/*------------------------------------------------------------------------*/
+
+#include "../ff.h"
+
+
+#if !_USE_LFN || _CODE_PAGE != 950
+#error This file is not needed in current configuration. Remove from the project.
+#endif
+
+
+static
+const WCHAR uni2oem[] = {
+/* Unicode - OEM, Unicode - OEM, Unicode - OEM, Unicode - OEM */
+ 0x00A7, 0xA1B1, 0x00AF, 0xA1C2, 0x00B0, 0xA258, 0x00B1, 0xA1D3,
+ 0x00B7, 0xA150, 0x00D7, 0xA1D1, 0x00F7, 0xA1D2, 0x02C7, 0xA3BE,
+ 0x02C9, 0xA3BC, 0x02CA, 0xA3BD, 0x02CB, 0xA3BF, 0x02CD, 0xA1C5,
+ 0x02D9, 0xA3BB, 0x0391, 0xA344, 0x0392, 0xA345, 0x0393, 0xA346,
+ 0x0394, 0xA347, 0x0395, 0xA348, 0x0396, 0xA349, 0x0397, 0xA34A,
+ 0x0398, 0xA34B, 0x0399, 0xA34C, 0x039A, 0xA34D, 0x039B, 0xA34E,
+ 0x039C, 0xA34F, 0x039D, 0xA350, 0x039E, 0xA351, 0x039F, 0xA352,
+ 0x03A0, 0xA353, 0x03A1, 0xA354, 0x03A3, 0xA355, 0x03A4, 0xA356,
+ 0x03A5, 0xA357, 0x03A6, 0xA358, 0x03A7, 0xA359, 0x03A8, 0xA35A,
+ 0x03A9, 0xA35B, 0x03B1, 0xA35C, 0x03B2, 0xA35D, 0x03B3, 0xA35E,
+ 0x03B4, 0xA35F, 0x03B5, 0xA360, 0x03B6, 0xA361, 0x03B7, 0xA362,
+ 0x03B8, 0xA363, 0x03B9, 0xA364, 0x03BA, 0xA365, 0x03BB, 0xA366,
+ 0x03BC, 0xA367, 0x03BD, 0xA368, 0x03BE, 0xA369, 0x03BF, 0xA36A,
+ 0x03C0, 0xA36B, 0x03C1, 0xA36C, 0x03C3, 0xA36D, 0x03C4, 0xA36E,
+ 0x03C5, 0xA36F, 0x03C6, 0xA370, 0x03C7, 0xA371, 0x03C8, 0xA372,
+ 0x03C9, 0xA373, 0x2013, 0xA156, 0x2014, 0xA158, 0x2018, 0xA1A5,
+ 0x2019, 0xA1A6, 0x201C, 0xA1A7, 0x201D, 0xA1A8, 0x2025, 0xA14C,
+ 0x2026, 0xA14B, 0x2027, 0xA145, 0x2032, 0xA1AC, 0x2035, 0xA1AB,
+ 0x203B, 0xA1B0, 0x20AC, 0xA3E1, 0x2103, 0xA24A, 0x2105, 0xA1C1,
+ 0x2109, 0xA24B, 0x2160, 0xA2B9, 0x2161, 0xA2BA, 0x2162, 0xA2BB,
+ 0x2163, 0xA2BC, 0x2164, 0xA2BD, 0x2165, 0xA2BE, 0x2166, 0xA2BF,
+ 0x2167, 0xA2C0, 0x2168, 0xA2C1, 0x2169, 0xA2C2, 0x2190, 0xA1F6,
+ 0x2191, 0xA1F4, 0x2192, 0xA1F7, 0x2193, 0xA1F5, 0x2196, 0xA1F8,
+ 0x2197, 0xA1F9, 0x2198, 0xA1FB, 0x2199, 0xA1FA, 0x2215, 0xA241,
+ 0x221A, 0xA1D4, 0x221E, 0xA1DB, 0x221F, 0xA1E8, 0x2220, 0xA1E7,
+ 0x2223, 0xA1FD, 0x2225, 0xA1FC, 0x2229, 0xA1E4, 0x222A, 0xA1E5,
+ 0x222B, 0xA1EC, 0x222E, 0xA1ED, 0x2234, 0xA1EF, 0x2235, 0xA1EE,
+ 0x2252, 0xA1DC, 0x2260, 0xA1DA, 0x2261, 0xA1DD, 0x2266, 0xA1D8,
+ 0x2267, 0xA1D9, 0x2295, 0xA1F2, 0x2299, 0xA1F3, 0x22A5, 0xA1E6,
+ 0x22BF, 0xA1E9, 0x2500, 0xA277, 0x2502, 0xA278, 0x250C, 0xA27A,
+ 0x2510, 0xA27B, 0x2514, 0xA27C, 0x2518, 0xA27D, 0x251C, 0xA275,
+ 0x2524, 0xA274, 0x252C, 0xA273, 0x2534, 0xA272, 0x253C, 0xA271,
+ 0x2550, 0xA2A4, 0x2550, 0xF9F9, 0x2551, 0xF9F8, 0x2552, 0xF9E6,
+ 0x2553, 0xF9EF, 0x2554, 0xF9DD, 0x2555, 0xF9E8, 0x2556, 0xF9F1,
+ 0x2557, 0xF9DF, 0x2558, 0xF9EC, 0x2559, 0xF9F5, 0x255A, 0xF9E3,
+ 0x255B, 0xF9EE, 0x255C, 0xF9F7, 0x255D, 0xF9E5, 0x255E, 0xA2A5,
+ 0x255E, 0xF9E9, 0x255F, 0xF9F2, 0x2560, 0xF9E0, 0x2561, 0xA2A7,
+ 0x2561, 0xF9EB, 0x2562, 0xF9F4, 0x2563, 0xF9E2, 0x2564, 0xF9E7,
+ 0x2565, 0xF9F0, 0x2566, 0xF9DE, 0x2567, 0xF9ED, 0x2568, 0xF9F6,
+ 0x2569, 0xF9E4, 0x256A, 0xA2A6, 0x256A, 0xF9EA, 0x256B, 0xF9F3,
+ 0x256C, 0xF9E1, 0x256D, 0xA27E, 0x256D, 0xF9FA, 0x256E, 0xA2A1,
+ 0x256E, 0xF9FB, 0x256F, 0xA2A3, 0x256F, 0xF9FD, 0x2570, 0xA2A2,
+ 0x2570, 0xF9FC, 0x2571, 0xA2AC, 0x2572, 0xA2AD, 0x2573, 0xA2AE,
+ 0x2574, 0xA15A, 0x2581, 0xA262, 0x2582, 0xA263, 0x2583, 0xA264,
+ 0x2584, 0xA265, 0x2585, 0xA266, 0x2586, 0xA267, 0x2587, 0xA268,
+ 0x2588, 0xA269, 0x2589, 0xA270, 0x258A, 0xA26F, 0x258B, 0xA26E,
+ 0x258C, 0xA26D, 0x258D, 0xA26C, 0x258E, 0xA26B, 0x258F, 0xA26A,
+ 0x2593, 0xF9FE, 0x2594, 0xA276, 0x2595, 0xA279, 0x25A0, 0xA1BD,
+ 0x25A1, 0xA1BC, 0x25B2, 0xA1B6, 0x25B3, 0xA1B5, 0x25BC, 0xA1BF,
+ 0x25BD, 0xA1BE, 0x25C6, 0xA1BB, 0x25C7, 0xA1BA, 0x25CB, 0xA1B3,
+ 0x25CE, 0xA1B7, 0x25CF, 0xA1B4, 0x25E2, 0xA2A8, 0x25E3, 0xA2A9,
+ 0x25E4, 0xA2AB, 0x25E5, 0xA2AA, 0x2605, 0xA1B9, 0x2606, 0xA1B8,
+ 0x2640, 0xA1F0, 0x2642, 0xA1F1, 0x3000, 0xA140, 0x3001, 0xA142,
+ 0x3002, 0xA143, 0x3003, 0xA1B2, 0x3008, 0xA171, 0x3009, 0xA172,
+ 0x300A, 0xA16D, 0x300B, 0xA16E, 0x300C, 0xA175, 0x300D, 0xA176,
+ 0x300E, 0xA179, 0x300F, 0xA17A, 0x3010, 0xA169, 0x3011, 0xA16A,
+ 0x3012, 0xA245, 0x3014, 0xA165, 0x3015, 0xA166, 0x301D, 0xA1A9,
+ 0x301E, 0xA1AA, 0x3021, 0xA2C3, 0x3022, 0xA2C4, 0x3023, 0xA2C5,
+ 0x3024, 0xA2C6, 0x3025, 0xA2C7, 0x3026, 0xA2C8, 0x3027, 0xA2C9,
+ 0x3028, 0xA2CA, 0x3029, 0xA2CB, 0x3105, 0xA374, 0x3106, 0xA375,
+ 0x3107, 0xA376, 0x3108, 0xA377, 0x3109, 0xA378, 0x310A, 0xA379,
+ 0x310B, 0xA37A, 0x310C, 0xA37B, 0x310D, 0xA37C, 0x310E, 0xA37D,
+ 0x310F, 0xA37E, 0x3110, 0xA3A1, 0x3111, 0xA3A2, 0x3112, 0xA3A3,
+ 0x3113, 0xA3A4, 0x3114, 0xA3A5, 0x3115, 0xA3A6, 0x3116, 0xA3A7,
+ 0x3117, 0xA3A8, 0x3118, 0xA3A9, 0x3119, 0xA3AA, 0x311A, 0xA3AB,
+ 0x311B, 0xA3AC, 0x311C, 0xA3AD, 0x311D, 0xA3AE, 0x311E, 0xA3AF,
+ 0x311F, 0xA3B0, 0x3120, 0xA3B1, 0x3121, 0xA3B2, 0x3122, 0xA3B3,
+ 0x3123, 0xA3B4, 0x3124, 0xA3B5, 0x3125, 0xA3B6, 0x3126, 0xA3B7,
+ 0x3127, 0xA3B8, 0x3128, 0xA3B9, 0x3129, 0xA3BA, 0x32A3, 0xA1C0,
+ 0x338E, 0xA255, 0x338F, 0xA256, 0x339C, 0xA250, 0x339D, 0xA251,
+ 0x339E, 0xA252, 0x33A1, 0xA254, 0x33C4, 0xA257, 0x33CE, 0xA253,
+ 0x33D1, 0xA1EB, 0x33D2, 0xA1EA, 0x33D5, 0xA24F, 0x4E00, 0xA440,
+ 0x4E01, 0xA442, 0x4E03, 0xA443, 0x4E07, 0xC945, 0x4E08, 0xA456,
+ 0x4E09, 0xA454, 0x4E0A, 0xA457, 0x4E0B, 0xA455, 0x4E0C, 0xC946,
+ 0x4E0D, 0xA4A3, 0x4E0E, 0xC94F, 0x4E0F, 0xC94D, 0x4E10, 0xA4A2,
+ 0x4E11, 0xA4A1, 0x4E14, 0xA542, 0x4E15, 0xA541, 0x4E16, 0xA540,
+ 0x4E18, 0xA543, 0x4E19, 0xA4FE, 0x4E1E, 0xA5E0, 0x4E1F, 0xA5E1,
+ 0x4E26, 0xA8C3, 0x4E2B, 0xA458, 0x4E2D, 0xA4A4, 0x4E2E, 0xC950,
+ 0x4E30, 0xA4A5, 0x4E31, 0xC963, 0x4E32, 0xA6EA, 0x4E33, 0xCBB1,
+ 0x4E38, 0xA459, 0x4E39, 0xA4A6, 0x4E3B, 0xA544, 0x4E3C, 0xC964,
+ 0x4E42, 0xC940, 0x4E43, 0xA444, 0x4E45, 0xA45B, 0x4E47, 0xC947,
+ 0x4E48, 0xA45C, 0x4E4B, 0xA4A7, 0x4E4D, 0xA545, 0x4E4E, 0xA547,
+ 0x4E4F, 0xA546, 0x4E52, 0xA5E2, 0x4E53, 0xA5E3, 0x4E56, 0xA8C4,
+ 0x4E58, 0xADBC, 0x4E59, 0xA441, 0x4E5C, 0xC941, 0x4E5D, 0xA445,
+ 0x4E5E, 0xA45E, 0x4E5F, 0xA45D, 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 0x5017, 0xD0D6, 0x5018, 0xADD5, 0x5019, 0xADD4, 0x501A, 0xADCA,
+ 0x501B, 0xD0CE, 0x501C, 0xD0D7, 0x501E, 0xD0C8, 0x501F, 0xADC9,
+ 0x5020, 0xD0D8, 0x5021, 0xADD2, 0x5022, 0xD0CC, 0x5023, 0xADC0,
+ 0x5025, 0xADC3, 0x5026, 0xADC2, 0x5027, 0xD0D9, 0x5028, 0xADD0,
+ 0x5029, 0xADC5, 0x502A, 0xADD9, 0x502B, 0xADDB, 0x502C, 0xD0D3,
+ 0x502D, 0xADD8, 0x502F, 0xD0DB, 0x5030, 0xD0CD, 0x5031, 0xD0DC,
+ 0x5033, 0xD0D1, 0x5035, 0xD0DA, 0x5037, 0xD0D2, 0x503C, 0xADC8,
+ 0x5040, 0xD463, 0x5041, 0xD457, 0x5043, 0xB0B3, 0x5045, 0xD45C,
+ 0x5046, 0xD462, 0x5047, 0xB0B2, 0x5048, 0xD455, 0x5049, 0xB0B6,
+ 0x504A, 0xD459, 0x504B, 0xD452, 0x504C, 0xB0B4, 0x504D, 0xD456,
+ 0x504E, 0xB0B9, 0x504F, 0xB0BE, 0x5051, 0xD467, 0x5053, 0xD451,
+ 0x5055, 0xB0BA, 0x5057, 0xD466, 0x505A, 0xB0B5, 0x505B, 0xD458,
+ 0x505C, 0xB0B1, 0x505D, 0xD453, 0x505E, 0xD44F, 0x505F, 0xD45D,
+ 0x5060, 0xD450, 0x5061, 0xD44E, 0x5062, 0xD45A, 0x5063, 0xD460,
+ 0x5064, 0xD461, 0x5065, 0xB0B7, 0x5068, 0xD85B, 0x5069, 0xD45E,
+ 0x506A, 0xD44D, 0x506B, 0xD45F, 0x506D, 0xB0C1, 0x506E, 0xD464,
+ 0x506F, 0xB0C0, 0x5070, 0xD44C, 0x5072, 0xD454, 0x5073, 0xD465,
+ 0x5074, 0xB0BC, 0x5075, 0xB0BB, 0x5076, 0xB0B8, 0x5077, 0xB0BD,
+ 0x507A, 0xB0AF, 0x507D, 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7, 0xB9AC, 0x50E8, 0xE0F3, 0x50E9, 0xB9B7,
+ 0x50EA, 0xE0F6, 0x50EC, 0xE0FA, 0x50ED, 0xB9B0, 0x50EE, 0xB9AD,
+ 0x50EF, 0xE0FC, 0x50F0, 0xE0FB, 0x50F1, 0xB9B5, 0x50F3, 0xE0F4,
+ 0x50F5, 0xBBF8, 0x50F6, 0xE4EC, 0x50F8, 0xE4E9, 0x50F9, 0xBBF9,
+ 0x50FB, 0xBBF7, 0x50FD, 0xE4F0, 0x50FE, 0xE4ED, 0x50FF, 0xE4E6,
+ 0x5100, 0xBBF6, 0x5102, 0xBBFA, 0x5103, 0xE4E7, 0x5104, 0xBBF5,
+ 0x5105, 0xBBFD, 0x5106, 0xE4EA, 0x5107, 0xE4EB, 0x5108, 0xBBFB,
+ 0x5109, 0xBBFC, 0x510A, 0xE4F1, 0x510B, 0xE4EE, 0x510C, 0xE4EF,
+ 0x5110, 0xBEAA, 0x5111, 0xE8F8, 0x5112, 0xBEA7, 0x5113, 0xE8F5,
+ 0x5114, 0xBEA9, 0x5115, 0xBEAB, 0x5117, 0xE8F6, 0x5118, 0xBEA8,
+ 0x511A, 0xE8F7, 0x511C, 0xE8F4, 0x511F, 0xC076, 0x5120, 0xECBD,
+ 0x5121, 0xC077, 0x5122, 0xECBB, 0x5124, 0xECBC, 0x5125, 0xECBA,
+ 0x5126, 0xECB9, 0x5129, 0xECBE, 0x512A, 0xC075, 0x512D, 0xEFB8,
+ 0x512E, 0xEFB9, 0x5130, 0xE4E8, 0x5131, 0xEFB7, 0x5132, 0xC078,
+ 0x5133, 0xC35F, 0x5134, 0xF1EB, 0x5135, 0xF1EC, 0x5137, 0xC4D7,
+ 0x5138, 0xC4D8, 0x5139, 0xF5C1, 0x513A, 0xF5C0, 0x513B, 0xC56C,
+ 0x513C, 0xC56B, 0x513D, 0xF7D0, 0x513F, 0xA449, 0x5140, 0xA461,
+ 0x5141, 0xA4B9, 0x5143, 0xA4B8, 0x5144, 0xA553, 0x5145, 0xA552,
+ 0x5146, 0xA5FC, 0x5147, 0xA5FB, 0x5148, 0xA5FD, 0x5149, 0xA5FA,
+ 0x514B, 0xA74A, 0x514C, 0xA749, 0x514D, 0xA74B, 0x5152, 0xA8E0,
+ 0x5154, 0xA8DF, 0x5155, 0xA8E1, 0x5157, 0xAB5E, 0x5159, 0xA259,
+ 0x515A, 0xD0DE, 0x515B, 0xA25A, 0x515C, 0xB0C2, 0x515D, 0xA25C,
+ 0x515E, 0xA25B, 0x515F, 0xD860, 0x5161, 0xA25D, 0x5162, 0xB9B8,
+ 0x5163, 0xA25E, 0x5165, 0xA44A, 0x5167, 0xA4BA, 0x5168, 0xA5FE,
+ 0x5169, 0xA8E2, 0x516B, 0xA44B, 0x516C, 0xA4BD, 0x516D, 0xA4BB,
+ 0x516E, 0xA4BC, 0x5171, 0xA640, 0x5175, 0xA74C, 0x5176, 0xA8E4,
+ 0x5177, 0xA8E3, 0x5178, 0xA8E5, 0x517C, 0xADDD, 0x5180, 0xBEAC,
+ 0x5187, 0xC94E, 0x5189, 0xA554, 0x518A, 0xA555, 0x518D, 0xA641,
+ 0x518F, 0xCA6A, 0x5191, 0xAB60, 0x5192, 0xAB5F, 0x5193, 0xD0E0,
+ 0x5194, 0xD0DF, 0x5195, 0xB0C3, 0x5197, 0xA4BE, 0x5198, 0xC955,
+ 0x519E, 0xCBCD, 0x51A0, 0xAB61, 0x51A2, 0xADE0, 0x51A4, 0xADDE,
+ 0x51A5, 0xADDF, 0x51AA, 0xBEAD, 0x51AC, 0xA556, 0x51B0, 0xA642,
+ 0x51B1, 0xC9BC, 0x51B6, 0xA74D, 0x51B7, 0xA74E, 0x51B9, 0xCA6B,
+ 0x51BC, 0xCBCE, 0x51BD, 0xA8E6, 0x51BE, 0xCBCF, 0x51C4, 0xD0E2,
+ 0x51C5, 0xD0E3, 0x51C6, 0xADE3, 0x51C8, 0xD0E4, 0x51CA, 0xD0E1,
+ 0x51CB, 0xADE4, 0x51CC, 0xADE2, 0x51CD, 0xADE1, 0x51CE, 0xD0E5,
+ 0x51D0, 0xD468, 0x51D4, 0xD861, 0x51D7, 0xDCC5, 0x51D8, 0xE140,
+ 0x51DC, 0xBBFE, 0x51DD, 0xBEAE, 0x51DE, 0xE8F9, 0x51E0, 0xA44C,
+ 0x51E1, 0xA45A, 0x51F0, 0xB0C4, 0x51F1, 0xB3CD, 0x51F3, 0xB9B9,
+ 0x51F5, 0xC942, 0x51F6, 0xA4BF, 0x51F8, 0xA559, 0x51F9, 0xA557,
+ 0x51FA, 0xA558, 0x51FD, 0xA8E7, 0x5200, 0xA44D, 0x5201, 0xA44E,
+ 0x5203, 0xA462, 0x5206, 0xA4C0, 0x5207, 0xA4C1, 0x5208, 0xA4C2,
+ 0x5209, 0xC9BE, 0x520A, 0xA55A, 0x520C, 0xC96B, 0x520E, 0xA646,
+ 0x5210, 0xC9BF, 0x5211, 0xA644, 0x5212, 0xA645, 0x5213, 0xC9BD,
+ 0x5216, 0xA647, 0x5217, 0xA643, 0x521C, 0xCA6C, 0x521D, 0xAAEC,
+ 0x521E, 0xCA6D, 0x5221, 0xCA6E, 0x5224, 0xA750, 0x5225, 0xA74F,
+ 0x5228, 0xA753, 0x5229, 0xA751, 0x522A, 0xA752, 0x522E, 0xA8ED,
+ 0x5230, 0xA8EC, 0x5231, 0xCBD4, 0x5232, 0xCBD1, 0x5233, 0xCBD2,
+ 0x5235, 0xCBD0, 0x5236, 0xA8EE, 0x5237, 0xA8EA, 0x5238, 0xA8E9,
+ 0x523A, 0xA8EB, 0x523B, 0xA8E8, 0x5241, 0xA8EF, 0x5243, 0xAB63,
+ 0x5244, 0xCDF0, 0x5246, 0xCBD3, 0x5247, 0xAB68, 0x5249, 0xCDF1,
+ 0x524A, 0xAB64, 0x524B, 0xAB67, 0x524C, 0xAB66, 0x524D, 0xAB65,
+ 0x524E, 0xAB62, 0x5252, 0xD0E8, 0x5254, 0xADE7, 0x5255, 0xD0EB,
+ 0x5256, 0xADE5, 0x525A, 0xD0E7, 0x525B, 0xADE8, 0x525C, 0xADE6,
+ 0x525D, 0xADE9, 0x525E, 0xD0E9, 0x525F, 0xD0EA, 0x5261, 0xD0E6,
+ 0x5262, 0xD0EC, 0x5269, 0xB3D1, 0x526A, 0xB0C5, 0x526B, 0xD469,
+ 0x526C, 0xD46B, 0x526D, 0xD46A, 0x526E, 0xD46C, 0x526F, 0xB0C6,
+ 0x5272, 0xB3CE, 0x5274, 0xB3CF, 0x5275, 0xB3D0, 0x5277, 0xB6D0,
+ 0x5278, 0xDCC7, 0x527A, 0xDCC6, 0x527B, 0xDCC8, 0x527C, 0xDCC9,
+ 0x527D, 0xB6D1, 0x527F, 0xB6CF, 0x5280, 0xE141, 0x5281, 0xE142,
+ 0x5282, 0xB9BB, 0x5283, 0xB9BA, 0x5284, 0xE35A, 0x5287, 0xBC40,
+ 0x5288, 0xBC41, 0x5289, 0xBC42, 0x528A, 0xBC44, 0x528B, 0xE4F2,
+ 0x528C, 0xE4F3, 0x528D, 0xBC43, 0x5291, 0xBEAF, 0x5293, 0xBEB0,
+ 0x5296, 0xF1ED, 0x5297, 0xF5C3, 0x5298, 0xF5C2, 0x5299, 0xF7D1,
+ 0x529B, 0xA44F, 0x529F, 0xA55C, 0x52A0, 0xA55B, 0x52A3, 0xA648,
+ 0x52A6, 0xC9C0, 0x52A9, 0xA755, 0x52AA, 0xA756, 0x52AB, 0xA754,
+ 0x52AC, 0xA757, 0x52AD, 0xCA6F, 0x52AE, 0xCA70, 0x52BB, 0xA8F1,
+ 0x52BC, 0xCBD5, 0x52BE, 0xA8F0, 0x52C0, 0xCDF2, 0x52C1, 0xAB6C,
+ 0x52C2, 0xCDF3, 0x52C3, 0xAB6B, 0x52C7, 0xAB69, 0x52C9, 0xAB6A,
+ 0x52CD, 0xD0ED, 0x52D2, 0xB0C7, 0x52D3, 0xD46E, 0x52D5, 0xB0CA,
+ 0x52D6, 0xD46D, 0x52D7, 0xB1E5, 0x52D8, 0xB0C9, 0x52D9, 0xB0C8,
+ 0x52DB, 0xB3D4, 0x52DD, 0xB3D3, 0x52DE, 0xB3D2, 0x52DF, 0xB6D2,
+ 0x52E2, 0xB6D5, 0x52E3, 0xB6D6, 0x52E4, 0xB6D4, 0x52E6, 0xB6D3,
+ 0x52E9, 0xE143, 0x52EB, 0xE144, 0x52EF, 0xE4F5, 0x52F0, 0xBC45,
+ 0x52F1, 0xE4F4, 0x52F3, 0xBEB1, 0x52F4, 0xECBF, 0x52F5, 0xC079,
+ 0x52F7, 0xF1EE, 0x52F8, 0xC455, 0x52FA, 0xA463, 0x52FB, 0xA4C3,
+ 0x52FC, 0xC956, 0x52FE, 0xA4C4, 0x52FF, 0xA4C5, 0x5305, 0xA55D,
+ 0x5306, 0xA55E, 0x5308, 0xA649, 0x5309, 0xCA71, 0x530A, 0xCBD6,
+ 0x530B, 0xCBD7, 0x530D, 0xAB6D, 0x530E, 0xD0EE, 0x530F, 0xB0CC,
+ 0x5310, 0xB0CB, 0x5311, 0xD863, 0x5312, 0xD862, 0x5315, 0xA450,
+ 0x5316, 0xA4C6, 0x5317, 0xA55F, 0x5319, 0xB0CD, 0x531A, 0xC943,
+ 0x531C, 0xC96C, 0x531D, 0xA560, 0x531F, 0xC9C2, 0x5320, 0xA64B,
+ 0x5321, 0xA64A, 0x5322, 0xC9C1, 0x5323, 0xA758, 0x532A, 0xADEA,
+ 0x532D, 0xD46F, 0x532F, 0xB6D7, 0x5330, 0xE145, 0x5331, 0xB9BC,
+ 0x5334, 0xE8FA, 0x5337, 0xF3FD, 0x5339, 0xA4C7, 0x533C, 0xCBD8,
+ 0x533D, 0xCDF4, 0x533E, 0xB0D0, 0x533F, 0xB0CE, 0x5340, 0xB0CF,
+ 0x5341, 0xA2CC, 0x5341, 0xA451, 0x5343, 0xA464, 0x5344, 0xA2CD,
+ 0x5345, 0xA2CE, 0x5345, 0xA4CA, 0x5347, 0xA4C9, 0x5348, 0xA4C8,
+ 0x5349, 0xA563, 0x534A, 0xA562, 0x534C, 0xC96D, 0x534D, 0xC9C3,
+ 0x5351, 0xA8F5, 0x5352, 0xA8F2, 0x5353, 0xA8F4, 0x5354, 0xA8F3,
+ 0x5357, 0xAB6E, 0x535A, 0xB3D5, 0x535C, 0xA452, 0x535E, 0xA4CB,
+ 0x5360, 0xA565, 0x5361, 0xA564, 0x5363, 0xCA72, 0x5366, 0xA8F6,
+ 0x536C, 0xC957, 0x536E, 0xA567, 0x536F, 0xA566, 0x5370, 0xA64C,
+ 0x5371, 0xA64D, 0x5372, 0xCA73, 0x5373, 0xA759, 0x5375, 0xA75A,
+ 0x5377, 0xA8F7, 0x5378, 0xA8F8, 0x5379, 0xA8F9, 0x537B, 0xAB6F,
+ 0x537C, 0xCDF5, 0x537F, 0xADEB, 0x5382, 0xC944, 0x5384, 0xA4CC,
+ 0x538A, 0xC9C4, 0x538E, 0xCA74, 0x538F, 0xCA75, 0x5392, 0xCBD9,
+ 0x5394, 0xCBDA, 0x5396, 0xCDF7, 0x5397, 0xCDF6, 0x5398, 0xCDF9,
+ 0x5399, 0xCDF8, 0x539A, 0xAB70, 0x539C, 0xD470, 0x539D, 0xADED,
+ 0x539E, 0xD0EF, 0x539F, 0xADEC, 0x53A4, 0xD864, 0x53A5, 0xB3D6,
+ 0x53A7, 0xD865, 0x53AC, 0xE146, 0x53AD, 0xB9BD, 0x53B2, 0xBC46,
+ 0x53B4, 0xF1EF, 0x53B9, 0xC958, 0x53BB, 0xA568, 0x53C3, 0xB0D1,
+ 0x53C8, 0xA453, 0x53C9, 0xA465, 0x53CA, 0xA4CE, 0x53CB, 0xA4CD,
+ 0x53CD, 0xA4CF, 0x53D4, 0xA8FB, 0x53D6, 0xA8FA, 0x53D7, 0xA8FC,
+ 0x53DB, 0xAB71, 0x53DF, 0xADEE, 0x53E1, 0xE8FB, 0x53E2, 0xC24F,
+ 0x53E3, 0xA466, 0x53E4, 0xA56A, 0x53E5, 0xA579, 0x53E6, 0xA574,
+ 0x53E8, 0xA56F, 0x53E9, 0xA56E, 0x53EA, 0xA575, 0x53EB, 0xA573,
+ 0x53EC, 0xA56C, 0x53ED, 0xA57A, 0x53EE, 0xA56D, 0x53EF, 0xA569,
+ 0x53F0, 0xA578, 0x53F1, 0xA577, 0x53F2, 0xA576, 0x53F3, 0xA56B,
+ 0x53F5, 0xA572, 0x53F8, 0xA571, 0x53FB, 0xA57B, 0x53FC, 0xA570,
+ 0x5401, 0xA653, 0x5403, 0xA659, 0x5404, 0xA655, 0x5406, 0xA65B,
+ 0x5407, 0xC9C5, 0x5408, 0xA658, 0x5409, 0xA64E, 0x540A, 0xA651,
+ 0x540B, 0xA654, 0x540C, 0xA650, 0x540D, 0xA657, 0x540E, 0xA65A,
+ 0x540F, 0xA64F, 0x5410, 0xA652, 0x5411, 0xA656, 0x5412, 0xA65C,
+ 0x5418, 0xCA7E, 0x5419, 0xCA7B, 0x541B, 0xA767, 0x541C, 0xCA7C,
+ 0x541D, 0xA75B, 0x541E, 0xA75D, 0x541F, 0xA775, 0x5420, 0xA770,
+ 0x5424, 0xCAA5, 0x5425, 0xCA7D, 0x5426, 0xA75F, 0x5427, 0xA761,
+ 0x5428, 0xCAA4, 0x5429, 0xA768, 0x542A, 0xCA78, 0x542B, 0xA774,
+ 0x542C, 0xA776, 0x542D, 0xA75C, 0x542E, 0xA76D, 0x5430, 0xCA76,
+ 0x5431, 0xA773, 0x5433, 0xA764, 0x5435, 0xA76E, 0x5436, 0xA76F,
+ 0x5437, 0xCA77, 0x5438, 0xA76C, 0x5439, 0xA76A, 0x543B, 0xA76B,
+ 0x543C, 0xA771, 0x543D, 0xCAA1, 0x543E, 0xA75E, 0x5440, 0xA772,
+ 0x5441, 0xCAA3, 0x5442, 0xA766, 0x5443, 0xA763, 0x5445, 0xCA7A,
+ 0x5446, 0xA762, 0x5447, 0xCAA6, 0x5448, 0xA765, 0x544A, 0xA769,
+ 0x544E, 0xA760, 0x544F, 0xCAA2, 0x5454, 0xCA79, 0x5460, 0xCBEB,
+ 0x5461, 0xCBEA, 0x5462, 0xA94F, 0x5463, 0xCBED, 0x5464, 0xCBEF,
+ 0x5465, 0xCBE4, 0x5466, 0xCBE7, 0x5467, 0xCBEE, 0x5468, 0xA950,
+ 0x546B, 0xCBE1, 0x546C, 0xCBE5, 0x546F, 0xCBE9, 0x5470, 0xCE49,
+ 0x5471, 0xA94B, 0x5472, 0xCE4D, 0x5473, 0xA8FD, 0x5474, 0xCBE6,
+ 0x5475, 0xA8FE, 0x5476, 0xA94C, 0x5477, 0xA945, 0x5478, 0xA941,
+ 0x547A, 0xCBE2, 0x547B, 0xA944, 0x547C, 0xA949, 0x547D, 0xA952,
+ 0x547E, 0xCBE3, 0x547F, 0xCBDC, 0x5480, 0xA943, 0x5481, 0xCBDD,
+ 0x5482, 0xCBDF, 0x5484, 0xA946, 0x5486, 0xA948, 0x5487, 0xCBDB,
+ 0x5488, 0xCBE0, 0x548B, 0xA951, 0x548C, 0xA94D, 0x548D, 0xCBE8,
+ 0x548E, 0xA953, 0x5490, 0xA94A, 0x5491, 0xCBDE, 0x5492, 0xA947,
+ 0x5495, 0xA942, 0x5496, 0xA940, 0x5498, 0xCBEC, 0x549A, 0xA94E,
+ 0x54A0, 0xCE48, 0x54A1, 0xCDFB, 0x54A2, 0xCE4B, 0x54A5, 0xCDFD,
+ 0x54A6, 0xAB78, 0x54A7, 0xABA8, 0x54A8, 0xAB74, 0x54A9, 0xABA7,
+ 0x54AA, 0xAB7D, 0x54AB, 0xABA4, 0x54AC, 0xAB72, 0x54AD, 0xCDFC,
+ 0x54AE, 0xCE43, 0x54AF, 0xABA3, 0x54B0, 0xCE4F, 0x54B1, 0xABA5,
+ 0x54B3, 0xAB79, 0x54B6, 0xCE45, 0x54B7, 0xCE42, 0x54B8, 0xAB77,
+ 0x54BA, 0xCDFA, 0x54BB, 0xABA6, 0x54BC, 0xCE4A, 0x54BD, 0xAB7C,
+ 0x54BE, 0xCE4C, 0x54BF, 0xABA9, 0x54C0, 0xAB73, 0x54C1, 0xAB7E,
+ 0x54C2, 0xAB7B, 0x54C3, 0xCE40, 0x54C4, 0xABA1, 0x54C5, 0xCE46,
+ 0x54C6, 0xCE47, 0x54C7, 0xAB7A, 0x54C8, 0xABA2, 0x54C9, 0xAB76,
+ 0x54CE, 0xAB75, 0x54CF, 0xCDFE, 0x54D6, 0xCE44, 0x54DE, 0xCE4E,
+ 0x54E0, 0xD144, 0x54E1, 0xADFB, 0x54E2, 0xD0F1, 0x54E4, 0xD0F6,
+ 0x54E5, 0xADF4, 0x54E6, 0xAE40, 0x54E7, 0xD0F4, 0x54E8, 0xADEF,
+ 0x54E9, 0xADF9, 0x54EA, 0xADFE, 0x54EB, 0xD0FB, 0x54ED, 0xADFA,
+ 0x54EE, 0xADFD, 0x54F1, 0xD0FE, 0x54F2, 0xADF5, 0x54F3, 0xD0F5,
+ 0x54F7, 0xD142, 0x54F8, 0xD143, 0x54FA, 0xADF7, 0x54FB, 0xD141,
+ 0x54FC, 0xADF3, 0x54FD, 0xAE43, 0x54FF, 0xD0F8, 0x5501, 0xADF1,
+ 0x5503, 0xD146, 0x5504, 0xD0F9, 0x5505, 0xD0FD, 0x5506, 0xADF6,
+ 0x5507, 0xAE42, 0x5508, 0xD0FA, 0x5509, 0xADFC, 0x550A, 0xD140,
+ 0x550B, 0xD147, 0x550C, 0xD4A1, 0x550E, 0xD145, 0x550F, 0xAE44,
+ 0x5510, 0xADF0, 0x5511, 0xD0FC, 0x5512, 0xD0F3, 0x5514, 0xADF8,
+ 0x5517, 0xD0F2, 0x551A, 0xD0F7, 0x5526, 0xD0F0, 0x5527, 0xAE41,
+ 0x552A, 0xD477, 0x552C, 0xB0E4, 0x552D, 0xD4A7, 0x552E, 0xB0E2,
+ 0x552F, 0xB0DF, 0x5530, 0xD47C, 0x5531, 0xB0DB, 0x5532, 0xD4A2,
+ 0x5533, 0xB0E6, 0x5534, 0xD476, 0x5535, 0xD47B, 0x5536, 0xD47A,
+ 0x5537, 0xADF2, 0x5538, 0xB0E1, 0x5539, 0xD4A5, 0x553B, 0xD4A8,
+ 0x553C, 0xD473, 0x553E, 0xB3E8, 0x5540, 0xD4A9, 0x5541, 0xB0E7,
+ 0x5543, 0xB0D9, 0x5544, 0xB0D6, 0x5545, 0xD47E, 0x5546, 0xB0D3,
+ 0x5548, 0xD4A6, 0x554A, 0xB0DA, 0x554B, 0xD4AA, 0x554D, 0xD474,
+ 0x554E, 0xD4A4, 0x554F, 0xB0DD, 0x5550, 0xD475, 0x5551, 0xD478,
+ 0x5552, 0xD47D, 0x5555, 0xB0DE, 0x5556, 0xB0DC, 0x5557, 0xB0E8,
+ 0x555C, 0xB0E3, 0x555E, 0xB0D7, 0x555F, 0xB1D2, 0x5561, 0xB0D8,
+ 0x5562, 0xD479, 0x5563, 0xB0E5, 0x5564, 0xB0E0, 0x5565, 0xD4A3,
+ 0x5566, 0xB0D5, 0x556A, 0xB0D4, 0x5575, 0xD471, 0x5576, 0xD472,
+ 0x5577, 0xD86A, 0x557B, 0xB3D7, 0x557C, 0xB3DA, 0x557D, 0xD875,
+ 0x557E, 0xB3EE, 0x557F, 0xD878, 0x5580, 0xB3D8, 0x5581, 0xD871,
+ 0x5582, 0xB3DE, 0x5583, 0xB3E4, 0x5584, 0xB5BD, 0x5587, 0xB3E2,
+ 0x5588, 0xD86E, 0x5589, 0xB3EF, 0x558A, 0xB3DB, 0x558B, 0xB3E3,
+ 0x558C, 0xD876, 0x558D, 0xDCD7, 0x558E, 0xD87B, 0x558F, 0xD86F,
+ 0x5591, 0xD866, 0x5592, 0xD873, 0x5593, 0xD86D, 0x5594, 0xB3E1,
+ 0x5595, 0xD879, 0x5598, 0xB3DD, 0x5599, 0xB3F1, 0x559A, 0xB3EA,
+ 0x559C, 0xB3DF, 0x559D, 0xB3DC, 0x559F, 0xB3E7, 0x55A1, 0xD87A,
+ 0x55A2, 0xD86C, 0x55A3, 0xD872, 0x55A4, 0xD874, 0x55A5, 0xD868,
+ 0x55A6, 0xD877, 0x55A7, 0xB3D9, 0x55A8, 0xD867,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9C6, 0x560E, 0xB9C7, 0x560F, 0xE14C,
+ 0x5610, 0xB9CC, 0x5612, 0xE14A, 0x5613, 0xE14F, 0x5614, 0xB9C3,
+ 0x5615, 0xE148, 0x5616, 0xB9C9, 0x5617, 0xB9C1, 0x561B, 0xB9C0,
+ 0x561C, 0xE14D, 0x561D, 0xE152, 0x561F, 0xB9CA, 0x5627, 0xE147,
+ 0x5629, 0xBC4D, 0x562A, 0xE547, 0x562C, 0xE544, 0x562E, 0xBC47,
+ 0x562F, 0xBC53, 0x5630, 0xBC54, 0x5632, 0xBC4A, 0x5633, 0xE542,
+ 0x5634, 0xBC4C, 0x5635, 0xE4F9, 0x5636, 0xBC52, 0x5638, 0xE546,
+ 0x5639, 0xBC49, 0x563A, 0xE548, 0x563B, 0xBC48, 0x563D, 0xE543,
+ 0x563E, 0xE545, 0x563F, 0xBC4B, 0x5640, 0xE541, 0x5641, 0xE4FA,
+ 0x5642, 0xE4F7, 0x5645, 0xD86B, 0x5646, 0xE4FD, 0x5648, 0xE4F6,
+ 0x5649, 0xE4FC, 0x564A, 0xE4FB, 0x564C, 0xE4F8, 0x564E, 0xBC4F,
+ 0x5653, 0xBC4E, 0x5657, 0xBC50, 0x5658, 0xE4FE, 0x5659, 0xBEB2,
+ 0x565A, 0xE540, 0x565E, 0xE945, 0x5660, 0xE8FD, 0x5662, 0xBEBE,
+ 0x5663, 0xE942, 0x5664, 0xBEB6, 0x5665, 0xBEBA, 0x5666, 0xE941,
+ 0x5668, 0xBEB9, 0x5669, 0xBEB5, 0x566A, 0xBEB8, 0x566B, 0xBEB3,
+ 0x566C, 0xBEBD, 0x566D, 0xE943, 0x566E, 0xE8FE, 0x566F, 0xBEBC,
+ 0x5670, 0xE8FC, 0x5671, 0xBEBB, 0x5672, 0xE944, 0x5673, 0xE940,
+ 0x5674, 0xBC51, 0x5676, 0xBEBF, 0x5677, 0xE946, 0x5678, 0xBEB7,
+ 0x5679, 0xBEB4, 0x567E, 0xECC6, 0x567F, 0xECC8, 0x5680, 0xC07B,
+ 0x5681, 0xECC9, 0x5682, 0xECC7, 0x5683, 0xECC5, 0x5684, 0xECC4,
+ 0x5685, 0xC07D, 0x5686, 0xECC3, 0x5687, 0xC07E, 0x568C, 0xECC1,
+ 0x568D, 0xECC2, 0x568E, 0xC07A, 0x568F, 0xC0A1, 0x5690, 0xC07C,
+ 0x5693, 0xECC0, 0x5695, 0xC250, 0x5697, 0xEFBC, 0x5698, 0xEFBA,
+ 0x5699, 0xEFBF, 0x569A, 0xEFBD, 0x569C, 0xEFBB, 0x569D, 0xEFBE,
+ 0x56A5, 0xC360, 0x56A6, 0xF1F2, 0x56A7, 0xF1F3, 0x56A8, 0xC456,
+ 0x56AA, 0xF1F4, 0x56AB, 0xF1F0, 0x56AC, 0xF1F5, 0x56AD, 0xF1F1,
+ 0x56AE, 0xC251, 0x56B2, 0xF3FE, 0x56B3, 0xF441, 0x56B4, 0xC459,
+ 0x56B5, 0xF440, 0x56B6, 0xC458, 0x56B7, 0xC457, 0x56BC, 0xC45A,
+ 0x56BD, 0xF5C5, 0x56BE, 0xF5C6, 0x56C0, 0xC4DA, 0x56C1, 0xC4D9,
+ 0x56C2, 0xC4DB, 0x56C3, 0xF5C4, 0x56C5, 0xF6D8, 0x56C6, 0xF6D7,
+ 0x56C8, 0xC56D, 0x56C9, 0xC56F, 0x56CA, 0xC56E, 0x56CB, 0xF6D9,
+ 0x56CC, 0xC5C8, 0x56CD, 0xF8A6, 0x56D1, 0xC5F1, 0x56D3, 0xF8A5,
+ 0x56D4, 0xF8EE, 0x56D7, 0xC949, 0x56DA, 0xA57D, 0x56DB, 0xA57C,
+ 0x56DD, 0xA65F, 0x56DE, 0xA65E, 0x56DF, 0xC9C7, 0x56E0, 0xA65D,
+ 0x56E1, 0xC9C6, 0x56E4, 0xA779, 0x56E5, 0xCAA9, 0x56E7, 0xCAA8,
+ 0x56EA, 0xA777, 0x56EB, 0xA77A, 0x56EE, 0xCAA7, 0x56F0, 0xA778,
+ 0x56F7, 0xCBF0, 0x56F9, 0xCBF1, 0x56FA, 0xA954, 0x56FF, 0xABAA,
+ 0x5701, 0xD148, 0x5702, 0xD149, 0x5703, 0xAE45, 0x5704, 0xAE46,
+ 0x5707, 0xD4AC, 0x5708, 0xB0E9, 0x5709, 0xB0EB, 0x570A, 0xD4AB,
+ 0x570B, 0xB0EA, 0x570C, 0xD87C, 0x570D, 0xB3F2, 0x5712, 0xB6E9,
+ 0x5713, 0xB6EA, 0x5714, 0xDCE1, 0x5716, 0xB9CF, 0x5718, 0xB9CE,
+ 0x571A, 0xE549, 0x571B, 0xE948, 0x571C, 0xE947, 0x571E, 0xF96B,
+ 0x571F, 0xA467, 0x5720, 0xC959, 0x5722, 0xC96E, 0x5723, 0xC96F,
+ 0x5728, 0xA662, 0x5729, 0xA666, 0x572A, 0xC9C9, 0x572C, 0xA664,
+ 0x572D, 0xA663, 0x572E, 0xC9C8, 0x572F, 0xA665, 0x5730, 0xA661,
+ 0x5733, 0xA660, 0x5734, 0xC9CA, 0x573B, 0xA7A6, 0x573E, 0xA7A3,
+ 0x5740, 0xA77D, 0x5741, 0xCAAA, 0x5745, 0xCAAB, 0x5747, 0xA7A1,
+ 0x5749, 0xCAAD, 0x574A, 0xA77B, 0x574B, 0xCAAE, 0x574C, 0xCAAC,
+ 0x574D, 0xA77E, 0x574E, 0xA7A2, 0x574F, 0xA7A5, 0x5750, 0xA7A4,
+ 0x5751, 0xA77C, 0x5752, 0xCAAF, 0x5761, 0xA959, 0x5762, 0xCBFE,
+ 0x5764, 0xA95B, 0x5766, 0xA95A, 0x5768, 0xCC40, 0x5769, 0xA958,
+ 0x576A, 0xA957, 0x576B, 0xCBF5, 0x576D, 0xCBF4, 0x576F, 0xCBF2,
+ 0x5770, 0xCBF7, 0x5771, 0xCBF6, 0x5772, 0xCBF3, 0x5773, 0xCBFC,
+ 0x5774, 0xCBFD, 0x5775, 0xCBFA, 0x5776, 0xCBF8, 0x5777, 0xA956,
+ 0x577B, 0xCBFB, 0x577C, 0xA95C, 0x577D, 0xCC41, 0x5780, 0xCBF9,
+ 0x5782, 0xABAB, 0x5783, 0xA955, 0x578B, 0xABAC, 0x578C, 0xCE54,
+ 0x578F, 0xCE5A, 0x5793, 0xABB2, 0x5794, 0xCE58, 0x5795, 0xCE5E,
+ 0x5797, 0xCE55, 0x5798, 0xCE59, 0x5799, 0xCE5B, 0x579A, 0xCE5D,
+ 0x579B, 0xCE57, 0x579D, 0xCE56, 0x579E, 0xCE51, 0x579F, 0xCE52,
+ 0x57A0, 0xABAD, 0x57A2, 0xABAF, 0x57A3, 0xABAE, 0x57A4, 0xCE53,
+ 0x57A5, 0xCE5C, 0x57AE, 0xABB1, 0x57B5, 0xCE50, 0x57B6, 0xD153,
+ 0x57B8, 0xD152, 0x57B9, 0xD157, 0x57BA, 0xD14E, 0x57BC, 0xD151,
+ 0x57BD, 0xD150, 0x57BF, 0xD154, 0x57C1, 0xD158, 0x57C2, 0xAE47,
+ 0x57C3, 0xAE4A, 0x57C6, 0xD14F, 0x57C7, 0xD155, 0x57CB, 0xAE49,
+ 0x57CC, 0xD14A, 0x57CE, 0xABB0, 0x57CF, 0xD4BA, 0x57D0, 0xD156,
+ 0x57D2, 0xD14D, 0x57D4, 0xAE48, 0x57D5, 0xD14C, 0x57DC, 0xD4B1,
+ 0x57DF, 0xB0EC, 0x57E0, 0xB0F0, 0x57E1, 0xD4C1, 0x57E2, 0xD4AF,
+ 0x57E3, 0xD4BD, 0x57E4, 0xB0F1, 0x57E5, 0xD4BF, 0x57E7, 0xD4C5,
+ 0x57E9, 0xD4C9, 0x57EC, 0xD4C0, 0x57ED, 0xD4B4, 0x57EE, 0xD4BC,
+ 0x57F0, 0xD4CA, 0x57F1, 0xD4C8, 0x57F2, 0xD4BE, 0x57F3, 0xD4B9,
+ 0x57F4, 0xD4B2, 0x57F5, 0xD8A6, 0x57F6, 0xD4B0, 0x57F7, 0xB0F5,
+ 0x57F8, 0xD4B7, 0x57F9, 0xB0F6, 0x57FA, 0xB0F2, 0x57FB, 0xD4AD,
+ 0x57FC, 0xD4C3, 0x57FD, 0xD4B5, 0x5800, 0xD4B3, 0x5801, 0xD4C6,
+ 0x5802, 0xB0F3, 0x5804, 0xD4CC, 0x5805, 0xB0ED, 0x5806, 0xB0EF,
+ 0x5807, 0xD4BB, 0x5808, 0xD4B6, 0x5809, 0xAE4B, 0x580A, 0xB0EE,
+ 0x580B, 0xD4B8, 0x580C, 0xD4C7, 0x580D, 0xD4CB, 0x580E, 0xD4C2,
+ 0x5810, 0xD4C4, 0x5814, 0xD4AE, 0x5819, 0xD8A1, 0x581B, 0xD8AA,
+ 0x581C, 0xD8A9, 0x581D, 0xB3FA, 0x581E, 0xD8A2, 0x5820, 0xB3FB,
+ 0x5821, 0xB3F9, 0x5823, 0xD8A4, 0x5824, 0xB3F6, 0x5825, 0xD8A8,
+ 0x5827, 0xD8A3, 0x5828, 0xD8A5, 0x5829, 0xD87D, 0x582A, 0xB3F4,
+ 0x582C, 0xD8B2, 0x582D, 0xD8B1, 0x582E, 0xD8AE, 0x582F, 0xB3F3,
+ 0x5830, 0xB3F7, 0x5831, 0xB3F8, 0x5832, 0xD14B, 0x5833, 0xD8AB,
+ 0x5834, 0xB3F5, 0x5835, 0xB0F4, 0x5836, 0xD8AD, 0x5837, 0xD87E,
+ 0x5838, 0xD8B0, 0x5839, 0xD8AF, 0x583B, 0xD8B3, 0x583D, 0xDCEF,
+ 0x583F, 0xD8AC, 0x5848, 0xD8A7, 0x5849, 0xDCE7, 0x584A, 0xB6F4,
+ 0x584B, 0xB6F7, 0x584C, 0xB6F2, 0x584D, 0xDCE6, 0x584E, 0xDCEA,
+ 0x584F, 0xDCE5, 0x5851, 0xB6EC, 0x5852, 0xB6F6, 0x5853, 0xDCE2,
+ 0x5854, 0xB6F0, 0x5855, 0xDCE9, 0x5857, 0xB6EE, 0x5858, 0xB6ED,
+ 0x5859, 0xDCEC, 0x585A, 0xB6EF, 0x585B, 0xDCEE, 0x585D, 0xDCEB,
+ 0x585E, 0xB6EB, 0x5862, 0xB6F5, 0x5863, 0xDCF0, 0x5864, 0xDCE4,
+ 0x5865, 0xDCED, 0x5868, 0xDCE3, 0x586B, 0xB6F1, 0x586D, 0xB6F3,
+ 0x586F, 0xDCE8, 0x5871, 0xDCF1, 0x5874, 0xE15D, 0x5875, 0xB9D0,
+ 0x5876, 0xE163, 0x5879, 0xB9D5, 0x587A, 0xE15F, 0x587B, 0xE166,
+ 0x587C, 0xE157, 0x587D, 0xB9D7, 0x587E, 0xB9D1, 0x587F, 0xE15C,
+ 0x5880, 0xBC55, 0x5881, 0xE15B, 0x5882, 0xE164, 0x5883, 0xB9D2,
+ 0x5885, 0xB9D6, 0x5886, 0xE15A, 0x5887, 0xE160, 0x5888, 0xE165,
+ 0x5889, 0xE156, 0x588A, 0xB9D4, 0x588B, 0xE15E, 0x588E, 0xE162,
+ 0x588F, 0xE168, 0x5890, 0xE158, 0x5891, 0xE161, 0x5893, 0xB9D3,
+ 0x5894, 0xE167, 0x5898, 0xE159, 0x589C, 0xBC59, 0x589D, 0xE54B,
+ 0x589E, 0xBC57, 0x589F, 0xBC56, 0x58A0, 0xE54D, 0x58A1, 0xE552,
+ 0x58A3, 0xE54E, 0x58A5, 0xE551, 0x58A6, 0xBC5C, 0x58A8, 0xBEA5,
+ 0x58A9, 0xBC5B, 0x58AB, 0xE54A, 0x58AC, 0xE550, 0x58AE, 0xBC5A,
+ 0x58AF, 0xE54F, 0x58B1, 0xE54C, 0x58B3, 0xBC58, 0x58BA, 0xE94D,
+ 0x58BB, 0xF9D9, 0x58BC, 0xE94F, 0x58BD, 0xE94A, 0x58BE, 0xBEC1,
+ 0x58BF, 0xE94C, 0x58C1, 0xBEC0, 0x58C2, 0xE94E, 0x58C5, 0xBEC3,
+ 0x58C6, 0xE950, 0x58C7, 0xBEC2, 0x58C8, 0xE949, 0x58C9, 0xE94B,
+ 0x58CE, 0xC0A5, 0x58CF, 0xECCC, 0x58D1, 0xC0A4, 0x58D2, 0xECCD,
+ 0x58D3, 0xC0A3, 0x58D4, 0xECCB, 0x58D5, 0xC0A2, 0x58D6, 0xECCA,
+ 0x58D8, 0xC253, 0x58D9, 0xC252, 0x58DA, 0xF1F6, 0x58DB, 0xF1F8,
+ 0x58DD, 0xF1F7, 0x58DE, 0xC361, 0x58DF, 0xC362, 0x58E2, 0xC363,
+ 0x58E3, 0xF442, 0x58E4, 0xC45B, 0x58E7, 0xF7D3, 0x58E8, 0xF7D2,
+ 0x58E9, 0xC5F2, 0x58EB, 0xA468, 0x58EC, 0xA4D0, 0x58EF, 0xA7A7,
+ 0x58F4, 0xCE5F, 0x58F9, 0xB3FC, 0x58FA, 0xB3FD, 0x58FC, 0xDCF2,
+ 0x58FD, 0xB9D8, 0x58FE, 0xE169, 0x58FF, 0xE553, 0x5903, 0xC95A,
+ 0x5906, 0xCAB0, 0x590C, 0xCC42, 0x590D, 0xCE60, 0x590E, 0xD159,
+ 0x590F, 0xAE4C, 0x5912, 0xF1F9, 0x5914, 0xC4DC, 0x5915, 0xA469,
+ 0x5916, 0xA57E, 0x5917, 0xC970, 0x5919, 0xA667, 0x591A, 0xA668,
+ 0x591C, 0xA95D, 0x5920, 0xB0F7, 0x5922, 0xB9DA, 0x5924, 0xB9DB,
+ 0x5925, 0xB9D9, 0x5927, 0xA46A, 0x5929, 0xA4D1, 0x592A, 0xA4D3,
+ 0x592B, 0xA4D2, 0x592C, 0xC95B, 0x592D, 0xA4D4, 0x592E, 0xA5A1,
+ 0x592F, 0xC971, 0x5931, 0xA5A2, 0x5937, 0xA669, 0x5938, 0xA66A,
+ 0x593C, 0xC9CB, 0x593E, 0xA7A8, 0x5940, 0xCAB1, 0x5944, 0xA961,
+ 0x5945, 0xCC43, 0x5947, 0xA95F, 0x5948, 0xA960, 0x5949, 0xA95E,
+ 0x594A, 0xD15A, 0x594E, 0xABB6, 0x594F, 0xABB5, 0x5950, 0xABB7,
+ 0x5951, 0xABB4, 0x5953, 0xCE61, 0x5954, 0xA962, 0x5955, 0xABB3,
+ 0x5957, 0xAE4D, 0x5958, 0xAE4E, 0x595A, 0xAE4F, 0x595C, 0xD4CD,
+ 0x5960, 0xB3FE, 0x5961, 0xD8B4, 0x5962, 0xB0F8, 0x5967, 0xB6F8,
+ 0x5969, 0xB9DD, 0x596A, 0xB9DC, 0x596B, 0xE16A, 0x596D, 0xBC5D,
+ 0x596E, 0xBEC4, 0x5970, 0xEFC0, 0x5971, 0xF6DA, 0x5972, 0xF7D4,
+ 0x5973, 0xA46B, 0x5974, 0xA5A3, 0x5976, 0xA5A4, 0x5977, 0xC9D1,
+ 0x5978, 0xA66C, 0x5979, 0xA66F, 0x597B, 0xC9CF, 0x597C, 0xC9CD,
+ 0x597D, 0xA66E, 0x597E, 0xC9D0, 0x597F, 0xC9D2, 0x5980, 0xC9CC,
+ 0x5981, 0xA671, 0x5982, 0xA670, 0x5983, 0xA66D, 0x5984, 0xA66B,
+ 0x5985, 0xC9CE, 0x598A, 0xA7B3, 0x598D, 0xA7B0, 0x598E, 0xCAB6,
+ 0x598F, 0xCAB9, 0x5990, 0xCAB8, 0x5992, 0xA7AA, 0x5993, 0xA7B2,
+ 0x5996, 0xA7AF, 0x5997, 0xCAB5, 0x5998, 0xCAB3, 0x5999, 0xA7AE,
+ 0x599D, 0xA7A9, 0x599E, 0xA7AC, 0x59A0, 0xCAB4, 0x59A1, 0xCABB,
+ 0x59A2, 0xCAB7, 0x59A3, 0xA7AD, 0x59A4, 0xA7B1, 0x59A5, 0xA7B4,
+ 0x59A6, 0xCAB2, 0x59A7, 0xCABA, 0x59A8, 0xA7AB, 0x59AE, 0xA967,
+ 0x59AF, 0xA96F, 0x59B1, 0xCC4F, 0x59B2, 0xCC48, 0x59B3, 0xA970,
+ 0x59B4, 0xCC53, 0x59B5, 0xCC44, 0x59B6, 0xCC4B, 0x59B9, 0xA966,
+ 0x59BA, 0xCC45, 0x59BB, 0xA964, 0x59BC, 0xCC4C, 0x59BD, 0xCC50,
+ 0x59BE, 0xA963, 0x59C0, 0xCC51, 0x59C1, 0xCC4A, 0x59C3, 0xCC4D,
+ 0x59C5, 0xA972, 0x59C6, 0xA969, 0x59C7, 0xCC54, 0x59C8, 0xCC52,
+ 0x59CA, 0xA96E, 0x59CB, 0xA96C, 0x59CC, 0xCC49, 0x59CD, 0xA96B,
+ 0x59CE, 0xCC47, 0x59CF, 0xCC46, 0x59D0, 0xA96A, 0x59D1, 0xA968,
+ 0x59D2, 0xA971, 0x59D3, 0xA96D, 0x59D4, 0xA965, 0x59D6, 0xCC4E,
+ 0x59D8, 0xABB9, 0x59DA, 0xABC0, 0x59DB, 0xCE6F, 0x59DC, 0xABB8,
+ 0x59DD, 0xCE67, 0x59DE, 0xCE63, 0x59E0, 0xCE73, 0x59E1, 0xCE62,
+ 0x59E3, 0xABBB, 0x59E4, 0xCE6C, 0x59E5, 0xABBE, 0x59E6, 0xABC1,
+ 0x59E8, 0xABBC, 0x59E9, 0xCE70, 0x59EA, 0xABBF, 0x59EC, 0xAE56,
+ 0x59ED, 0xCE76, 0x59EE, 0xCE64, 0x59F1, 0xCE66, 0x59F2, 0xCE6D,
+ 0x59F3, 0xCE71, 0x59F4, 0xCE75, 0x59F5, 0xCE72, 0x59F6, 0xCE6B,
+ 0x59F7, 0xCE6E, 0x59FA, 0xCE68, 0x59FB, 0xABC3, 0x59FC, 0xCE6A,
+ 0x59FD, 0xCE69, 0x59FE, 0xCE74, 0x59FF, 0xABBA, 0x5A00, 0xCE65,
+ 0x5A01, 0xABC2, 0x5A03, 0xABBD, 0x5A09, 0xAE5C, 0x5A0A, 0xD162,
+ 0x5A0C, 0xAE5B, 0x5A0F, 0xD160, 0x5A11, 0xAE50, 0x5A13, 0xAE55,
+ 0x5A15, 0xD15F, 0x5A16, 0xD15C, 0x5A17, 0xD161, 0x5A18, 0xAE51,
+ 0x5A19, 0xD15B, 0x5A1B, 0xAE54, 0x5A1C, 0xAE52, 0x5A1E, 0xD163,
+ 0x5A1F, 0xAE53, 0x5A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xA9C7, 0x602B, 0xA9CC, 0x602C, 0xCCA7, 0x602D, 0xCC7A,
+ 0x602E, 0xCCAB, 0x602F, 0xA9C4, 0x6032, 0xCC7D, 0x6033, 0xCCA4,
+ 0x6034, 0xCCA1, 0x6035, 0xA9C5, 0x6037, 0xCEBF, 0x6039, 0xCEC0,
+ 0x6040, 0xCECA, 0x6041, 0xD1A1, 0x6042, 0xCECB, 0x6043, 0xABEE,
+ 0x6044, 0xCECE, 0x6045, 0xCEC4, 0x6046, 0xABED, 0x6047, 0xCEC6,
+ 0x6049, 0xCEC7, 0x604C, 0xCEC9, 0x604D, 0xABE9, 0x6050, 0xAEA3,
+ 0x6052, 0xF9DA, 0x6053, 0xCEC5, 0x6054, 0xCEC1, 0x6055, 0xAEA4,
+ 0x6058, 0xCECF, 0x6059, 0xAE7E, 0x605A, 0xD17D, 0x605B, 0xCEC8,
+ 0x605D, 0xD17C, 0x605E, 0xCEC3, 0x605F, 0xCECC, 0x6062, 0xABEC,
+ 0x6063, 0xAEA1, 0x6064, 0xABF2, 0x6065, 0xAEA2, 0x6066, 0xCED0,
+ 0x6067, 0xD17E, 0x6068, 0xABEB, 0x6069, 0xAEA6, 0x606A, 0xABF1,
+ 0x606B, 0xABF0, 0x606C, 0xABEF, 0x606D, 0xAEA5, 0x606E, 0xCED1,
+ 0x606F, 0xAEA7, 0x6070, 0xABEA, 0x6072, 0xCEC2, 0x607F, 0xB176,
+ 0x6080, 0xD1A4, 0x6081, 0xD1A6, 0x6083, 0xD1A8, 0x6084, 0xAEA8,
+ 0x6085, 0xAEAE, 0x6086, 0xD553, 0x6087, 0xD1AC, 0x6088, 0xD1A3,
+ 0x6089, 0xB178, 0x608A, 0xD551, 0x608C, 0xAEAD, 0x608D, 0xAEAB,
+ 0x608E, 0xD1AE, 0x6090, 0xD552, 0x6092, 0xD1A5, 0x6094, 0xAEAC,
+ 0x6095, 0xD1A9, 0x6096, 0xAEAF, 0x6097, 0xD1AB, 0x609A, 0xAEAA,
+ 0x609B, 0xD1AA, 0x609C, 0xD1AD, 0x609D, 0xD1A7, 0x609F, 0xAEA9,
+ 0x60A0, 0xB179, 0x60A2, 0xD1A2, 0x60A3, 0xB177, 0x60A8, 0xB17A,
+ 0x60B0, 0xD555, 0x60B1, 0xD55E, 0x60B2, 0xB464, 0x60B4, 0xB17C,
+ 0x60B5, 0xB1A3, 0x60B6, 0xB465, 0x60B7, 0xD560, 0x60B8, 0xB1AA,
+ 0x60B9, 0xD8F9, 0x60BA, 0xD556, 0x60BB, 0xB1A2, 0x60BC, 0xB1A5,
+ 0x60BD, 0xB17E, 0x60BE, 0xD554, 0x60BF, 0xD562, 0x60C0, 0xD565,
+ 0x60C1, 0xD949, 0x60C3, 0xD563, 0x60C4, 0xD8FD, 0x60C5, 0xB1A1,
+ 0x60C6, 0xB1A8, 0x60C7, 0xB1AC, 0x60C8, 0xD55D, 0x60C9, 0xD8F8,
+ 0x60CA, 0xD561, 0x60CB, 0xB17B, 0x60CC, 0xD8FA, 0x60CD, 0xD564,
+ 0x60CE, 0xD8FC, 0x60CF, 0xD559, 0x60D1, 0xB462, 0x60D3, 0xD557,
+ 0x60D4, 0xD558, 0x60D5, 0xB1A7, 0x60D8, 0xB1A6, 0x60D9, 0xD55B,
+ 0x60DA, 0xB1AB, 0x60DB, 0xD55F, 0x60DC, 0xB1A4, 0x60DD, 0xD55C,
+ 0x60DF, 0xB1A9, 0x60E0, 0xB466, 0x60E1, 0xB463, 0x60E2, 0xD8FB,
+ 0x60E4, 0xD55A, 0x60E6, 0xB17D, 0x60F0, 0xB46B, 0x60F1, 0xB46F,
+ 0x60F2, 0xD940, 0x60F3, 0xB751, 0x60F4, 0xB46D, 0x60F5, 0xD944,
+ 0x60F6, 0xB471, 0x60F7, 0xDD65, 0x60F8, 0xD946, 0x60F9, 0xB753,
+ 0x60FA, 0xB469, 0x60FB, 0xB46C, 0x60FC, 0xD947, 0x60FE, 0xD948,
+ 0x60FF, 0xD94E, 0x6100, 0xB473, 0x6101, 0xB754, 0x6103, 0xD94A,
+ 0x6104, 0xD94F, 0x6105, 0xD943, 0x6106, 0xB75E, 0x6108, 0xB755,
+ 0x6109, 0xB472, 0x610A, 0xD941, 0x610B, 0xD950, 0x610D, 0xB75D,
+ 0x610E, 0xB470, 0x610F, 0xB74E, 0x6110, 0xD94D, 0x6112, 0xB474,
+ 0x6113, 0xD945, 0x6114, 0xD8FE, 0x6115, 0xB46A, 0x6116, 0xD942,
+ 0x6118, 0xD94B, 0x611A, 0xB74D, 0x611B, 0xB752, 0x611C, 0xB467,
+ 0x611D, 0xD94C, 0x611F, 0xB750, 0x6123, 0xB468, 0x6127, 0xB75C,
+ 0x6128, 0xE1C3, 0x6129, 0xDD70, 0x612B, 0xDD68, 0x612C, 0xE1C2,
+ 0x612E, 0xDD6C, 0x612F, 0xDD6E, 0x6132, 0xDD6B, 0x6134, 0xB75B,
+ 0x6136, 0xDD6A, 0x6137, 0xB75F, 0x613B, 0xE1D2, 0x613E, 0xB75A,
+ 0x613F, 0xBA40, 0x6140, 0xDD71, 0x6141, 0xE1C4, 0x6144, 0xB758,
+ 0x6145, 0xDD69, 0x6146, 0xDD6D, 0x6147, 0xB9FE, 0x6148, 0xB74F,
+ 0x6149, 0xDD66, 0x614A, 0xDD67, 0x614B, 0xBA41, 0x614C, 0xB757,
+ 0x614D, 0xB759, 0x614E, 0xB756, 0x614F, 0xDD6F, 0x6152, 0xE1C8,
+ 0x6153, 0xE1C9, 0x6154, 0xE1CE, 0x6155, 0xBC7D, 0x6156, 0xE1D5,
+ 0x6158, 0xBA47, 0x615A, 0xBA46, 0x615B, 0xE1D0, 0x615D, 0xBC7C,
+ 0x615E, 0xE1C5, 0x615F, 0xBA45, 0x6161, 0xE1D4, 0x6162, 0xBA43,
+ 0x6163, 0xBA44, 0x6165, 0xE1D1, 0x6166, 0xE5AA, 0x6167, 0xBC7A,
+ 0x6168, 0xB46E, 0x616A, 0xE1D3, 0x616B, 0xBCA3, 0x616C, 0xE1CB,
+ 0x616E, 0xBC7B, 0x6170, 0xBCA2, 0x6171, 0xE1C6, 0x6172, 0xE1CA,
+ 0x6173, 0xE1C7, 0x6174, 0xE1CD, 0x6175, 0xBA48, 0x6176, 0xBC79,
+ 0x6177, 0xBA42, 0x6179, 0xE57A, 0x617A, 0xE1CF, 0x617C, 0xBCA1,
+ 0x617E, 0xBCA4, 0x6180, 0xE1CC, 0x6182, 0xBC7E, 0x6183, 0xE579,
+ 0x6189, 0xE57E, 0x618A, 0xBECE, 0x618B, 0xE578, 0x618C, 0xE9A3,
+ 0x618D, 0xE5A9, 0x618E, 0xBCA8, 0x6190, 0xBCA6, 0x6191, 0xBECC,
+ 0x6192, 0xE5A6, 0x6193, 0xE5A2, 0x6194, 0xBCAC, 0x6196, 0xE978,
+ 0x619A, 0xBCAA, 0x619B, 0xE5A1, 0x619D, 0xE976, 0x619F, 0xE5A5,
+ 0x61A1, 0xE5A8, 0x61A2, 0xE57D, 0x61A4, 0xBCAB, 0x61A7, 0xBCA5,
+ 0x61A8, 0xE977, 0x61A9, 0xBECD, 0x61AA, 0xE5A7, 0x61AB, 0xBCA7,
+ 0x61AC, 0xBCA9, 0x61AD, 0xE5A4, 0x61AE, 0xBCAD, 0x61AF, 0xE5A3,
+ 0x61B0, 0xE57C, 0x61B1, 0xE57B, 0x61B2, 0xBECB, 0x61B3, 0xE5AB,
+ 0x61B4, 0xE97A, 0x61B5, 0xECE0, 0x61B6, 0xBED0, 0x61B8, 0xE9A2,
+ 0x61BA, 0xE97E, 0x61BC, 0xECE1, 0x61BE, 0xBED1, 0x61BF, 0xE9A1,
+ 0x61C1, 0xE97C, 0x61C2, 0xC0B4, 0x61C3, 0xECDF, 0x61C5, 0xE979,
+ 0x61C6, 0xE97B, 0x61C7, 0xC0B5, 0x61C8, 0xBED3, 0x61C9, 0xC0B3,
+ 0x61CA, 0xBED2, 0x61CB, 0xC0B7, 0x61CC, 0xE97D, 0x61CD, 0xBECF,
+ 0x61D6, 0xEFCF, 0x61D8, 0xEFC7, 0x61DE, 0xECE7, 0x61DF, 0xEFC8,
+ 0x61E0, 0xECE3, 0x61E3, 0xC256, 0x61E4, 0xECE5, 0x61E5, 0xECE4,
+ 0x61E6, 0xC0B6, 0x61E7, 0xECE2, 0x61E8, 0xECE6, 0x61E9, 0xEFD0,
+ 0x61EA, 0xEFCC, 0x61EB, 0xEFCE, 0x61ED, 0xEFC9, 0x61EE, 0xEFCA,
+ 0x61F0, 0xEFCD, 0x61F1, 0xEFCB, 0x61F2, 0xC367, 0x61F5, 0xC36A,
+ 0x61F6, 0xC369, 0x61F7, 0xC368, 0x61F8, 0xC461, 0x61F9, 0xF44A,
+ 0x61FA, 0xC462, 0x61FB, 0xF241, 0x61FC, 0xC4DF, 0x61FD, 0xF5CC,
+ 0x61FE, 0xC4E0, 0x61FF, 0xC574, 0x6200, 0xC5CA, 0x6201, 0xF7D9,
+ 0x6203, 0xF7DA, 0x6204, 0xF7DB, 0x6207, 0xF9BA, 0x6208, 0xA4E0,
+ 0x6209, 0xC97C, 0x620A, 0xA5B3, 0x620C, 0xA6A6, 0x620D, 0xA6A7,
+ 0x620E, 0xA6A5, 0x6210, 0xA6A8, 0x6211, 0xA7DA, 0x6212, 0xA7D9,
+ 0x6214, 0xCCB1, 0x6215, 0xA9CF, 0x6216, 0xA9CE, 0x6219, 0xD1AF,
+ 0x621A, 0xB1AD, 0x621B, 0xB1AE, 0x621F, 0xB475, 0x6220, 0xDD72,
+ 0x6221, 0xB760, 0x6222, 0xB761, 0x6223, 0xDD74, 0x6224, 0xDD76,
+ 0x6225, 0xDD75, 0x6227, 0xE1D7, 0x6229, 0xE1D6, 0x622A, 0xBA49,
+ 0x622B, 0xE1D8, 0x622D, 0xE5AC, 0x622E, 0xBCAE, 0x6230, 0xBED4,
+ 0x6232, 0xC0B8, 0x6233, 0xC257, 0x6234, 0xC0B9, 0x6236, 0xA4E1,
+ 0x623A, 0xCAE6, 0x623D, 0xCCB2, 0x623E, 0xA9D1, 0x623F, 0xA9D0,
+ 0x6240, 0xA9D2, 0x6241, 0xABF3, 0x6242, 0xCED2, 0x6243, 0xCED3,
+ 0x6246, 0xD1B0, 0x6247, 0xAEB0, 0x6248, 0xB1AF, 0x6249, 0xB476,
+ 0x624A, 0xD951, 0x624B, 0xA4E2, 0x624D, 0xA47E, 0x624E, 0xA4E3,
+ 0x6250, 0xC97D, 0x6251, 0xA5B7, 0x6252, 0xA5B6, 0x6253, 0xA5B4,
+ 0x6254, 0xA5B5, 0x6258, 0xA6AB, 0x6259, 0xC9E9, 0x625A, 0xC9EB,
+ 0x625B, 0xA6AA, 0x625C, 0xC9E3, 0x625E, 0xC9E4, 0x6260, 0xC9EA,
+ 0x6261, 0xC9E6, 0x6262, 0xC9E8, 0x6263, 0xA6A9, 0x6264, 0xC9E5,
+ 0x6265, 0xC9EC, 0x6266, 0xC9E7, 0x626D, 0xA7E1, 0x626E, 0xA7EA,
+ 0x626F, 0xA7E8, 0x6270, 0xCAF0, 0x6271, 0xCAED, 0x6272, 0xCAF5,
+ 0x6273, 0xA7E6, 0x6274, 0xCAF6, 0x6276, 0xA7DF, 0x6277, 0xCAF3,
+ 0x6279, 0xA7E5, 0x627A, 0xCAEF, 0x627B, 0xCAEE, 0x627C, 0xA7E3,
+ 0x627D, 0xCAF4, 0x627E, 0xA7E4, 0x627F, 0xA9D3, 0x6280, 0xA7DE,
+ 0x6281, 0xCAF1, 0x6283, 0xCAE7, 0x6284, 0xA7DB, 0x6286, 0xA7EE,
+ 0x6287, 0xCAEC, 0x6288, 0xCAF2, 0x6289, 0xA7E0, 0x628A, 0xA7E2,
+ 0x628C, 0xCAE8, 0x628E, 0xCAE9, 0x628F, 0xCAEA, 0x6291, 0xA7ED,
+ 0x6292, 0xA7E7, 0x6293, 0xA7EC, 0x6294, 0xCAEB, 0x6295, 0xA7EB,
+ 0x6296, 0xA7DD, 0x6297, 0xA7DC, 0x6298, 0xA7E9, 0x62A8, 0xA9E1,
+ 0x62A9, 0xCCBE, 0x62AA, 0x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,
+ 0x6303, 0xCED9, 0x6307, 0xABFC, 0x6308, 0xAEB2, 0x6309, 0xABF6,
+ 0x630B, 0xCED6, 0x630C, 0xCEDD, 0x630D, 0xCED5, 0x630E, 0xCED8,
+ 0x630F, 0xCEDC, 0x6310, 0xD1B2, 0x6311, 0xAC44, 0x6313, 0xCEE1,
+ 0x6314, 0xCEE2, 0x6315, 0xCEE4, 0x6316, 0xABF5, 0x6328, 0xAEC1,
+ 0x6329, 0xD1BE, 0x632A, 0xAEBF, 0x632B, 0xAEC0, 0x632C, 0xD1B4,
+ 0x632D, 0xD1C4, 0x632F, 0xAEB6, 0x6332, 0xD566, 0x6333, 0xD1C6,
+ 0x6334, 0xD1C0, 0x6336, 0xD1B7, 0x6338, 0xD1C9, 0x6339, 0xD1BA,
+ 0x633A, 0xAEBC, 0x633B, 0xD57D, 0x633C, 0xD1BD, 0x633D, 0xAEBE,
+ 0x633E, 0xAEB5, 0x6340, 0xD1CB, 0x6341, 0xD1BF, 0x6342, 0xAEB8,
+ 0x6343, 0xD1B8, 0x6344, 0xD1B5, 0x6345, 0xD1B6, 0x6346, 0xAEB9,
+ 0x6347, 0xD1C5, 0x6348, 0xD1CC, 0x6349, 0xAEBB, 0x634A, 0xD1BC,
+ 0x634B, 0xD1BB, 0x634C, 0xAEC3, 0x634D, 0xAEC2, 0x634E, 0xAEB4,
+ 0x634F, 0xAEBA, 0x6350, 0xAEBD, 0x6351, 0xD1C8, 0x6354, 0xD1C2,
+ 0x6355, 0xAEB7, 0x6356, 0xD1B3, 0x6357, 0xD1CA, 0x6358, 0xD1C1,
+ 0x6359, 0xD1C3, 0x635A, 0xD1C7, 0x6365, 0xD567, 0x6367, 0xB1B7,
+ 0x6368, 0xB1CB, 0x6369, 0xB1CA, 0x636B, 0xB1BF, 0x636D, 0xD579,
+ 0x636E, 0xD575, 0x636F, 0xD572, 0x6370, 0xD5A6, 0x6371, 0xB1BA,
+ 0x6372, 0xB1B2, 0x6375, 0xD577, 0x6376, 0xB4A8, 0x6377, 0xB1B6,
+ 0x6378, 0xD5A1, 0x637A, 0xB1CC, 0x637B, 0xB1C9, 0x637C, 0xD57B,
+ 0x637D, 0xD56A, 0x6380, 0xB1C8, 0x6381, 0xD5A3, 0x6382, 0xD569,
+ 0x6383, 0xB1BD, 0x6384, 0xB1C1, 0x6385, 0xD5A2, 0x6387, 0xD573,
+ 0x6388, 0xB1C2, 0x6389, 0xB1BC, 0x638A, 0xD568, 0x638C, 0xB478,
+ 0x638D, 0xD5A5, 0x638E, 0xD571, 0x638F, 0xB1C7, 0x6390, 0xD574,
+ 0x6391, 0xD5A4, 0x6392, 0xB1C6, 0x6394, 0xD952, 0x6396, 0xB1B3,
+ 0x6397, 0xD56F, 0x6398, 0xB1B8, 0x6399, 0xB1C3, 0x639B, 0xB1BE,
+ 0x639C, 0xD578, 0x639D, 0xD56E, 0x639E, 0xD56C, 0x639F, 0xD57E,
+ 0x63A0, 0xB1B0, 0x63A1, 0xB1C4, 0x63A2, 0xB1B4, 0x63A3, 0xB477,
+ 0x63A4, 0xD57C, 0x63A5, 0xB1B5, 0x63A7, 0xB1B1, 0x63A8, 0xB1C0,
+ 0x63A9, 0xB1BB, 0x63AA, 0xB1B9, 0x63AB, 0xD570, 0x63AC, 0xB1C5,
+ 0x63AD, 0xD56D, 0x63AE, 0xD57A, 0x63AF, 0xD576, 0x63B0, 0xD954,
+ 0x63B1, 0xD953, 0x63BD, 0xD56B, 0x63BE, 0xD964, 0x63C0, 0xB47A,
+ 0x63C2, 0xD96A, 0x63C3, 0xD959, 0x63C4, 0xD967, 0x63C5, 0xDD77,
+ 0x63C6, 0xB47D, 0x63C7, 0xD96B, 0x63C8, 0xD96E, 0x63C9, 0xB47C,
+ 0x63CA, 0xD95C, 0x63CB, 0xD96D, 0x63CC, 0xD96C, 0x63CD, 0xB47E,
+ 0x63CE, 0xD955, 0x63CF, 0xB479, 0x63D0, 0xB4A3, 0x63D2, 0xB4A1,
+ 0x63D3, 0xD969, 0x63D5, 0xD95F, 0x63D6, 0xB4A5, 0x63D7, 0xD970,
+ 0x63D8, 0xD968, 0x63D9, 0xD971, 0x63DA, 0xB4AD, 0x63DB, 0xB4AB,
+ 0x63DC, 0xD966, 0x63DD, 0xD965, 0x63DF, 0xD963, 0x63E0, 0xD95D,
+ 0x63E1, 0xB4A4, 0x63E3, 0xB4A2, 0x63E4, 0xD1B9, 0x63E5, 0xD956,
+ 0x63E7, 0xDDB7, 0x63E8, 0xD957, 0x63E9, 0xB47B, 0x63EA, 0xB4AA,
+ 0x63EB, 0xDD79, 0x63ED, 0xB4A6, 0x63EE, 0xB4A7, 0x63EF, 0xD958,
+ 0x63F0, 0xD96F, 0x63F1, 0xDD78, 0x63F2, 0xD960, 0x63F3, 0xD95B,
+ 0x63F4, 0xB4A9, 0x63F5, 0xD961, 0x63F6, 0xD95E, 0x63F9, 0xB4AE,
+ 0x6406, 0xB770, 0x6409, 0xDD7C, 0x640A, 0xDDB1, 0x640B, 0xDDB6,
+ 0x640C, 0xDDAA, 0x640D, 0xB76C, 0x640E, 0xDDBB, 0x640F, 0xB769,
+ 0x6410, 0xDD7A, 0x6412, 0xDD7B, 0x6413, 0xB762, 0x6414, 0xB76B,
+ 0x6415, 0xDDA4, 0x6416, 0xB76E, 0x6417, 0xB76F, 0x6418, 0xDDA5,
+ 0x641A, 0xDDB2, 0x641B, 0xDDB8, 0x641C, 0xB76A, 0x641E, 0xB764,
+ 0x641F, 0xDDA3, 0x6420, 0xDD7D, 0x6421, 0xDDBA, 0x6422, 0xDDA8,
+ 0x6423, 0xDDA9, 0x6424, 0xDD7E, 0x6425, 0xDDB4, 0x6426, 0xDDAB,
+ 0x6427, 0xDDB5, 0x6428, 0xDDAD, 0x642A, 0xB765, 0x642B, 0xE1D9,
+ 0x642C, 0xB768, 0x642D, 0xB766, 0x642E, 0xDDB9, 0x642F, 0xDDB0,
+ 0x6430, 0xDDAC, 0x6433, 0xDDA1, 0x6434, 0xBA53, 0x6435, 0xDDAF,
+ 0x6436, 0xB76D, 0x6437, 0xDDA7, 0x6439, 0xDDA6, 0x643D, 0xB767,
+ 0x643E, 0xB763, 0x643F, 0xE1EE, 0x6440, 0xDDB3, 0x6441, 0xDDAE,
+ 0x6443, 0xDDA2, 0x644B, 0xE1E9, 0x644D, 0xE1DA, 0x644E, 0xE1E5,
+ 0x6450, 0xE1EC, 0x6451, 0xBA51, 0x6452, 0xB4AC, 0x6453, 0xE1EA,
+ 0x6454, 0xBA4C, 0x6458, 0xBA4B, 0x6459, 0xE1F1, 0x645B, 0xE1DB,
+ 0x645C, 0xE1E8, 0x645D, 0xE1DC, 0x645E, 0xE1E7, 0x645F, 0xBA4F,
+ 0x6460, 0xE1EB, 0x6461, 0xD962, 0x6465, 0xE1F2, 0x6466, 0xE1E3,
+ 0x6467, 0xBA52, 0x6468, 0xE5BA, 0x6469, 0xBCAF, 0x646B, 0xE1F0,
+ 0x646C, 0xE1EF, 0x646D, 0xBA54, 0x646E, 0xE5AD, 0x646F, 0xBCB0,
+ 0x6470, 0xE5AE, 0x6472, 0xE1DF, 0x6473, 0xE1E0, 0x6474, 0xE1DD,
+ 0x6475, 0xE1E2, 0x6476, 0xE1DE, 0x6477, 0xE1F3, 0x6478, 0xBA4E,
+ 0x6479, 0xBCB1, 0x647A, 0xBA50, 0x647B, 0xBA55, 0x647D, 0xE1E1,
+ 0x647F, 0xE1ED, 0x6482, 0xE1E6, 0x6485, 0xE5B1, 0x6487, 0xBA4A,
+ 0x6488, 0xBCB4, 0x6489, 0xE9AA, 0x648A, 0xE5B6, 0x648B, 0xE5B5,
+ 0x648C, 0xE5B7, 0x648F, 0xE5B4, 0x6490, 0xBCB5, 0x6492, 0xBCBB,
+ 0x6493, 0xBCB8, 0x6495, 0xBCB9, 0x6496, 0xE5AF, 0x6497, 0xE5B2,
+ 0x6498, 0xE5BC, 0x6499, 0xBCC1, 0x649A, 0xBCBF, 0x649C, 0xE5B3,
+ 0x649D, 0xD95A, 0x649E, 0xBCB2, 0x649F, 0x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 0x6501, 0xEFD5, 0x6503, 0xEFD6, 0x6504, 0xEFD2,
+ 0x6506, 0xC25B, 0x6507, 0xF242, 0x6509, 0xF245, 0x650C, 0xF246,
+ 0x650D, 0xF244, 0x650E, 0xF247, 0x650F, 0xC36C, 0x6510, 0xF243,
+ 0x6513, 0xF44E, 0x6514, 0xC464, 0x6515, 0xF44D, 0x6516, 0xF44C,
+ 0x6517, 0xF44B, 0x6518, 0xC463, 0x6519, 0xC465, 0x651B, 0xF5CD,
+ 0x651C, 0xC4E2, 0x651D, 0xC4E1, 0x6520, 0xF6E1, 0x6521, 0xF6E0,
+ 0x6522, 0xF6E3, 0x6523, 0xC5CB, 0x6524, 0xC575, 0x6525, 0xF7DD,
+ 0x6526, 0xF6E2, 0x6529, 0xF7DC, 0x652A, 0xC5CD, 0x652B, 0xC5CC,
+ 0x652C, 0xC5F3, 0x652D, 0xF8A9, 0x652E, 0xF8EF, 0x652F, 0xA4E4,
+ 0x6532, 0xD972, 0x6533, 0xE9AF, 0x6536, 0xA6AC, 0x6537, 0xCAF7,
+ 0x6538, 0xA7F1, 0x6539, 0xA7EF, 0x653B, 0xA7F0, 0x653D, 0xCCC1,
+ 0x653E, 0xA9F1, 0x653F, 0xAC46, 0x6541, 0xCEE7, 0x6543, 0xCEE8,
+ 0x6545, 0xAC47, 0x6546, 0xD1CE, 0x6548, 0xAEC4, 0x6549, 0xAEC5,
+ 0x654A, 0xD1CD, 0x654F, 0xB1D3, 0x6551, 0xB1CF, 0x6553, 0xD5A7,
+ 0x6554, 0xB1D6, 0x6555, 0xB1D5, 0x6556, 0xB1CE, 0x6557, 0xB1D1,
+ 0x6558, 0xB1D4, 0x6559, 0xB1D0, 0x655C, 0xD976, 0x655D, 0xB1CD,
+ 0x655E, 0xB4AF, 0x6562, 0xB4B1, 0x6563, 0xB4B2, 0x6564, 0xD975,
+ 0x6565, 0xD978, 0x6566, 0xB4B0, 0x6567, 0xD973, 0x6568, 0xD977,
+ 0x656A, 0xD974, 0x656C, 0xB771, 0x656F, 0xDDBC, 0x6572, 0xBA56,
+ 0x6573, 0xE1F4, 0x6574, 0xBEE3, 0x6575, 0xBCC4, 0x6576, 0xE5BD,
+ 0x6577, 0xBCC5, 0x6578, 0xBCC6, 0x6579, 0xE5BF, 0x657A, 0xE5BE,
+ 0x657B, 0xE5C0, 0x657C, 0xE9B1, 0x657F, 0xE9B0, 0x6580, 0xECEF,
+ 0x6581, 0xECEE, 0x6582, 0xC0C4, 0x6583, 0xC0C5, 0x6584, 0xF248,
+ 0x6587, 0xA4E5, 0x658C, 0xD979, 0x6590, 0xB4B4, 0x6591, 0xB4B3,
+ 0x6592, 0xDDBD, 0x6594, 0xEFD8, 0x6595, 0xC4E3, 0x6596, 0xF7DE,
+ 0x6597, 0xA4E6, 0x6599, 0xAEC6, 0x659B, 0xB1D8, 0x659C, 0xB1D7,
+ 0x659D, 0xD97A, 0x659E, 0xD97B, 0x659F, 0xB772, 0x65A0, 0xE1F5,
+ 0x65A1, 0xBA57, 0x65A2, 0xE9B2, 0x65A4, 0xA4E7, 0x65A5, 0xA5B8,
+ 0x65A7, 0xA9F2, 0x65A8, 0xCCC2, 0x65AA, 0xCEE9, 0x65AB, 0xAC48,
+ 0x65AC, 0xB1D9, 0x65AE, 0xD97C, 0x65AF, 0xB4B5, 0x65B0, 0xB773,
+ 0x65B2, 0xE5C1, 0x65B3, 0xE5C2, 0x65B6, 0xECF0, 0x65B7, 0xC25F,
+ 0x65B8, 0xF8F0, 0x65B9, 0xA4E8, 0x65BB, 0xCCC3, 0x65BC, 0xA9F3,
+ 0x65BD, 0xAC49, 0x65BF, 0xCEEA, 0x65C1, 0xAEC7, 0x65C2, 0xD1D2,
+ 0x65C3, 0xD1D0, 0x65C4, 0xD1D1, 0x65C5, 0xAEC8, 0x65C6, 0xD1CF,
+ 0x65CB, 0xB1DB, 0x65CC, 0xB1DC, 0x65CD, 0xD5A8, 0x65CE, 0xB1DD,
+ 0x65CF, 0xB1DA, 0x65D0, 0xD97D, 0x65D2, 0xD97E, 0x65D3, 0xDDBE,
+ 0x65D6, 0xBA59, 0x65D7, 0xBA58, 0x65DA, 0xECF1, 0x65DB, 0xEFD9,
+ 0x65DD, 0xF24A, 0x65DE, 0xF249, 0x65DF, 0xF44F, 0x65E1, 0xC95E,
+ 0x65E2, 0xAC4A, 0x65E5, 0xA4E9, 0x65E6, 0xA5B9, 0x65E8, 0xA6AE,
+ 0x65E9, 0xA6AD, 0x65EC, 0xA6AF, 0x65ED, 0xA6B0, 0x65EE, 0xC9EE,
+ 0x65EF, 0xC9ED, 0x65F0, 0xCAF8, 0x65F1, 0xA7F2, 0x65F2, 0xCAFB,
+ 0x65F3, 0xCAFA, 0x65F4, 0xCAF9, 0x65F5, 0xCAFC, 0x65FA, 0xA9F4,
+ 0x65FB, 0xCCC9, 0x65FC, 0xCCC5, 0x65FD, 0xCCCE, 0x6600, 0xA9FB,
+ 0x6602, 0xA9F9, 0x6603, 0xCCCA, 0x6604, 0xCCC6, 0x6605, 0xCCCD,
+ 0x6606, 0xA9F8, 0x6607, 0xAA40, 0x6608, 0xCCC8, 0x6609, 0xCCC4,
+ 0x660A, 0xA9FE, 0x660B, 0xCCCB, 0x660C, 0xA9F7, 0x660D, 0xCCCC,
+ 0x660E, 0xA9FA, 0x660F, 0xA9FC, 0x6610, 0xCCD0, 0x6611, 0xCCCF,
+ 0x6612, 0xCCC7, 0x6613, 0xA9F6, 0x6614, 0xA9F5, 0x6615, 0xA9FD,
+ 0x661C, 0xCEEF, 0x661D, 0xCEF5, 0x661F, 0xAC50, 0x6620, 0xAC4D,
+ 0x6621, 0xCEEC, 0x6622, 0xCEF1, 0x6624, 0xAC53, 0x6625, 0xAC4B,
+ 0x6626, 0xCEF0, 0x6627, 0xAC4E, 0x6628, 0xAC51, 0x662B, 0xCEF3,
+ 0x662D, 0xAC4C, 0x662E, 0xCEF8, 0x662F, 0xAC4F, 0x6631, 0xAC52,
+ 0x6632, 0xCEED, 0x6633, 0xCEF2, 0x6634, 0xCEF6, 0x6635, 0xCEEE,
+ 0x6636, 0xCEEB, 0x6639, 0xCEF7, 0x663A, 0xCEF4, 0x6641, 0xAED0,
+ 0x6642, 0xAEC9, 0x6643, 0xAECC, 0x6645, 0xAECF, 0x6647, 0xD1D5,
+ 0x6649, 0xAECA, 0x664A, 0xD1D3, 0x664C, 0xAECE, 0x664F, 0xAECB,
+ 0x6651, 0xD1D6, 0x6652, 0xAECD, 0x6659, 0xD5AC, 0x665A, 0xB1DF,
+ 0x665B, 0xD5AB, 0x665C, 0xD5AD, 0x665D, 0xB1DE, 0x665E, 0xB1E3,
+ 0x665F, 0xD1D4, 0x6661, 0xD5AA, 0x6662, 0xD5AE, 0x6664, 0xB1E0,
+ 0x6665, 0xD5A9, 0x6666, 0xB1E2, 0x6668, 0xB1E1, 0x666A, 0xD9A7,
+ 0x666C, 0xD9A2, 0x666E, 0xB4B6, 0x666F, 0xB4BA, 0x6670, 0xB4B7,
+ 0x6671, 0xD9A5, 0x6672, 0xD9A8, 0x6674, 0xB4B8, 0x6676, 0xB4B9,
+ 0x6677, 0xB4BE, 0x6678, 0xDDC7, 0x6679, 0xD9A6, 0x667A, 0xB4BC,
+ 0x667B, 0xD9A3, 0x667C, 0xD9A1, 0x667E, 0xB4BD, 0x6680, 0xD9A4,
+ 0x6684, 0xB779, 0x6686, 0xDDBF, 0x6687, 0xB776, 0x6688, 0xB777,
+ 0x6689, 0xB775, 0x668A, 0xDDC4, 0x668B, 0xDDC3, 0x668C, 0xDDC0,
+ 0x668D, 0xB77B, 0x6690, 0xDDC2, 0x6691, 0xB4BB, 0x6694, 0xDDC6,
+ 0x6695, 0xDDC1, 0x6696, 0xB778, 0x6697, 0xB774, 0x6698, 0xB77A,
+ 0x6699, 0xDDC5, 0x669D, 0xBA5C, 0x669F, 0xE1F8, 0x66A0, 0xE1F7,
+ 0x66A1, 0xE1F6, 0x66A2, 0xBA5A, 0x66A8, 0xBA5B, 0x66A9, 0xE5C5,
+ 0x66AA, 0xE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A,
+ 0x6712, 0xD1D7, 0x6713, 0xD1D8, 0x6714, 0xAED2, 0x6715, 0xAED3,
+ 0x6717, 0xAED4, 0x6718, 0xD5AF, 0x671B, 0xB1E6, 0x671D, 0xB4C2,
+ 0x671F, 0xB4C1, 0x6720, 0xDDC8, 0x6721, 0xDF7A, 0x6722, 0xE1FB,
+ 0x6723, 0xE9BD, 0x6726, 0xC261, 0x6727, 0xC467, 0x6728, 0xA4EC,
+ 0x672A, 0xA5BC, 0x672B, 0xA5BD, 0x672C, 0xA5BB, 0x672D, 0xA5BE,
+ 0x672E, 0xA5BA, 0x6731, 0xA6B6, 0x6733, 0xC9F6, 0x6734, 0xA6B5,
+ 0x6735, 0xA6B7, 0x6738, 0xC9F1, 0x6739, 0xC9F0, 0x673A, 0xC9F3,
+ 0x673B, 0xC9F2, 0x673C, 0xC9F5, 0x673D, 0xA6B4, 0x673E, 0xC9EF,
+ 0x673F, 0xC9F4, 0x6745, 0xCAFD, 0x6746, 0xA7FD, 0x6747, 0xCAFE,
+ 0x6748, 0xCB43, 0x6749, 0xA7FC, 0x674B, 0xCB47, 0x674C, 0xCB42,
+ 0x674D, 0xCB45, 0x674E, 0xA7F5, 0x674F, 0xA7F6, 0x6750, 0xA7F7,
+ 0x6751, 0xA7F8, 0x6753, 0xA840, 0x6755, 0xCB41, 0x6756, 0xA7FA,
+ 0x6757, 0xA841, 0x6759, 0xCB40, 0x675A, 0xCB46, 0x675C, 0xA7F9,
+ 0x675D, 0xCB44, 0x675E, 0xA7FB, 0x675F, 0xA7F4, 0x6760, 0xA7FE,
+ 0x676A, 0xAA57, 0x676C, 0xCCD4, 0x676D, 0xAA43, 0x676F, 0xAA4D,
+ 0x6770, 0xAA4E, 0x6771, 0xAA46, 0x6772, 0xAA58, 0x6773, 0xAA48,
+ 0x6774, 0xCCDC, 0x6775, 0xAA53, 0x6776, 0xCCD7, 0x6777, 0xAA49,
+ 0x6778, 0xCCE6, 0x6779, 0xCCE7, 0x677A, 0xCCDF, 0x677B, 0xCCD8,
+ 0x677C, 0xAA56, 0x677D, 0xCCE4, 0x677E, 0xAA51, 0x677F, 0xAA4F,
+ 0x6781, 0xCCE5, 0x6783, 0xCCE3, 0x6784, 0xCCDB, 0x6785, 0xCCD3,
+ 0x6786, 0xCCDA, 0x6787, 0xAA4A, 0x6789, 0xAA50, 0x678B, 0xAA44,
+ 0x678C, 0xCCDE, 0x678D, 0xCCDD, 0x678E, 0xCCD5, 0x6790, 0xAA52,
+ 0x6791, 0xCCE1, 0x6792, 0xCCD6, 0x6793, 0xAA55, 0x6794, 0xCCE8,
+ 0x6795, 0xAA45, 0x6797, 0xAA4C, 0x6798, 0xCCD9, 0x6799, 0xCCE2,
+ 0x679A, 0xAA54, 0x679C, 0xAA47, 0x679D, 0xAA4B, 0x679F, 0xCCE0,
+ 0x67AE, 0xCF5B, 0x67AF, 0xAC5C, 0x67B0, 0xAC69, 0x67B2, 0xCF56,
+ 0x67B3, 0xCF4C, 0x67B4, 0xAC62, 0x67B5, 0xCF4A, 0x67B6, 0xAC5B,
+ 0x67B7, 0xCF45, 0x67B8, 0xAC65, 0x67B9, 0xCF52, 0x67BA, 0xCEFE,
+ 0x67BB, 0xCF41, 0x67C0, 0xCF44, 0x67C1, 0xCEFB, 0x67C2, 0xCF51,
+ 0x67C3, 0xCF61, 0x67C4, 0xAC60, 0x67C5, 0xCF46, 0x67C6, 0xCF58,
+ 0x67C8, 0xCEFD, 0x67C9, 0xCF5F, 0x67CA, 0xCF60, 0x67CB, 0xCF63,
+ 0x67CC, 0xCF5A, 0x67CD, 0xCF4B, 0x67CE, 0xCF53, 0x67CF, 0xAC66,
+ 0x67D0, 0xAC59, 0x67D1, 0xAC61, 0x67D2, 0xAC6D, 0x67D3, 0xAC56,
+ 0x67D4, 0xAC58, 0x67D8, 0xCF43, 0x67D9, 0xAC6A, 0x67DA, 0xAC63,
+ 0x67DB, 0xCF5D, 0x67DC, 0xCF40, 0x67DD, 0xAC6C, 0x67DE, 0xAC67,
+ 0x67DF, 0xCF49, 0x67E2, 0xAC6B, 0x67E3, 0xCF50, 0x67E4, 0xCF48,
+ 0x67E5, 0xAC64, 0x67E6, 0xCF5C, 0x67E7, 0xCF54, 0x67E9, 0xAC5E,
+ 0x67EA, 0xCF62, 0x67EB, 0xCF47, 0x67EC, 0xAC5A, 0x67ED, 0xCF59,
+ 0x67EE, 0xCF4F, 0x67EF, 0xAC5F, 0x67F0, 0xCF55, 0x67F1, 0xAC57,
+ 0x67F2, 0xCEFC, 0x67F3, 0xAC68, 0x67F4, 0xAEE3, 0x67F5, 0xAC5D,
+ 0x67F6, 0xCF4E, 0x67F7, 0xCF4D, 0x67F8, 0xCF42, 0x67FA, 0xCF5E,
+ 0x67FC, 0xCF57, 0x67FF, 0xAC55, 0x6812, 0xD1EC, 0x6813, 0xAEEA,
+ 0x6814, 0xD1ED, 0x6816, 0xD1E1, 0x6817, 0xAEDF, 0x6818, 0xAEEB,
+ 0x681A, 0xD1DA, 0x681C, 0xD1E3, 0x681D, 0xD1EB, 0x681F, 0xD1D9,
+ 0x6820, 0xD1F4, 0x6821, 0xAED5, 0x6825, 0xD1F3, 0x6826, 0xD1EE,
+ 0x6828, 0xD1EF, 0x6829, 0xAEDD, 0x682A, 0xAEE8, 0x682B, 0xD1E5,
+ 0x682D, 0xD1E6, 0x682E, 0xD1F0, 0x682F, 0xD1E7, 0x6831, 0xD1E2,
+ 0x6832, 0xD1DC, 0x6833, 0xD1DD, 0x6834, 0xD1EA, 0x6835, 0xD1E4,
+ 0x6838, 0xAED6, 0x6839, 0xAEDA, 0x683A, 0xD1F2, 0x683B, 0xD1DE,
+ 0x683C, 0xAEE6, 0x683D, 0xAEE2, 0x6840, 0xAEE5, 0x6841, 0xAEEC,
+ 0x6842, 0xAEDB, 0x6843, 0xAEE7, 0x6844, 0xD1E9, 0x6845, 0xAEE9,
+ 0x6846, 0xAED8, 0x6848, 0xAED7, 0x6849, 0xD1DB, 0x684B, 0xD1DF,
+ 0x684C, 0xAE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0x6917, 0xD9CC,
+ 0x6925, 0xD9D8, 0x692A, 0xD9AE, 0x692F, 0xDDF2, 0x6930, 0xB7A6,
+ 0x6932, 0xDDF0, 0x6933, 0xDDDB, 0x6934, 0xDDE0, 0x6935, 0xDDD9,
+ 0x6937, 0xDDEC, 0x6938, 0xDDCB, 0x6939, 0xDDD2, 0x693B, 0xDDEA,
+ 0x693C, 0xDDF4, 0x693D, 0xDDDC, 0x693F, 0xDDCF, 0x6940, 0xDDE2,
+ 0x6941, 0xDDE7, 0x6942, 0xDDD3, 0x6944, 0xDDE4, 0x6945, 0xDDD0,
+ 0x6948, 0xDDD7, 0x6949, 0xDDD8, 0x694A, 0xB7A8, 0x694B, 0xDDEB,
+ 0x694C, 0xDDE9, 0x694E, 0xDDCC, 0x694F, 0xDDEE, 0x6951, 0xDDEF,
+ 0x6952, 0xDDF1, 0x6953, 0xB7AC, 0x6954, 0xB7A4, 0x6956, 0xD5B8,
+ 0x6957, 0xDDD4, 0x6958, 0xDDE6, 0x6959, 0xDDD5, 0x695A, 0xB7A1,
+ 0x695B, 0xB7B1, 0x695C, 0xDDED, 0x695D, 0xB7AF, 0x695E, 0xB7AB,
+ 0x695F, 0xDDCA, 0x6960, 0xB7A3, 0x6962, 0xDDCD, 0x6963, 0xB7B0,
+ 0x6965, 0xDDDD, 0x6966, 0xDDC9, 0x6968, 0xB7A9, 0x6969, 0xDDE1,
+ 0x696A, 0xDDD1, 0x696B, 0xB7AA, 0x696C, 0xDDDA, 0x696D, 0xB77E,
+ 0x696E, 0xB4D8, 0x696F, 0xDDE3, 0x6970, 0xD9BF, 0x6971, 0xDDCE,
+ 0x6974, 0xDDE8, 0x6975, 0xB7A5, 0x6976, 0xDDE5, 0x6977, 0xB7A2,
+ 0x6978, 0xDDDF, 0x6979, 0xB7AD, 0x697A, 0xDDD6, 0x697B, 0xDDF3,
+ 0x6982, 0xB7A7, 0x6983, 0xDEC6, 0x6986, 0xB7AE, 0x698D, 0xE24A,
+ 0x698E, 0xE248, 0x6990, 0xE25E, 0x6991, 0xE246, 0x6993, 0xE258,
+ 0x6994, 0xB77D, 0x6995, 0xBA5F, 0x6996, 0xE242, 0x6997, 0xE25D,
+ 0x6999, 0xE247, 0x699A, 0xE255, 0x699B, 0xBA64, 0x699C, 0xBA5D,
+ 0x699E, 0xE25B, 0x69A0, 0xE240, 0x69A1, 0xE25A, 0x69A3, 0xBA6F,
+ 0x69A4, 0xE251, 0x69A5, 0xE261, 0x69A6, 0xBA6D, 0x69A7, 0xE249,
+ 0x69A8, 0xBA5E, 0x69A9, 0xE24B, 0x69AA, 0xE259, 0x69AB, 0xBA67,
+ 0x69AC, 0xE244, 0x69AD, 0xBA6B, 0x69AE, 0xBA61, 0x69AF, 0xE24D,
+ 0x69B0, 0xE243, 0x69B1, 0xE1FC, 0x69B3, 0xE257, 0x69B4, 0xBA68,
+ 0x69B5, 0xE260, 0x69B6, 0xE1FD, 0x69B7, 0xBA65, 0x69B9, 0xE253,
+ 0x69BB, 0xBA66, 0x69BC, 0xE245, 0x69BD, 0xE250, 0x69BE, 0xE24C,
+ 0x69BF, 0xE24E, 0x69C1, 0xBA60, 0x69C2, 0xE25F, 0x69C3, 0xBA6E,
+ 0x69C4, 0xE24F, 0x69C6, 0xE262, 0x69C9, 0xE1FE, 0x69CA, 0xE254,
+ 0x69CB, 0xBA63, 0x69CC, 0xBA6C, 0x69CD, 0xBA6A, 0x69CE, 0xE241,
+ 0x69CF, 0xE256, 0x69D0, 0xBA69, 0x69D3, 0xBA62, 0x69D4, 0xE252,
+ 0x69D9, 0xE25C, 0x69E2, 0xE5D5, 0x69E4, 0xE5D1, 0x69E5, 0xE5CD,
+ 0x69E6, 0xE5E1, 0x69E7, 0xE5DE, 0x69E8, 0xBCCD, 0x69EB, 0xE5E5,
+ 0x69EC, 0xE5D4, 0x69ED, 0xBCD8, 0x69EE, 0xE5DB, 0x69F1, 0xE5D0,
+ 0x69F2, 0xE5DA, 0x69F3, 0xBCD5, 0x69F4, 0xE5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, 0xC0D9,
+ 0x6FE0, 0xC0DA, 0x6FE1, 0xC0E1, 0x6FE2, 0xED5A, 0x6FE3, 0xED52,
+ 0x6FE4, 0xC0DC, 0x6FE6, 0xED56, 0x6FE7, 0xED55, 0x6FE8, 0xED5B,
+ 0x6FE9, 0xC0E2, 0x6FEB, 0xC0DD, 0x6FEC, 0xC0E0, 0x6FED, 0xED54,
+ 0x6FEE, 0xC0E4, 0x6FEF, 0xC0DE, 0x6FF0, 0xC0E5, 0x6FF1, 0xC0D8,
+ 0x6FF2, 0xED58, 0x6FF4, 0xED50, 0x6FF7, 0xEFF7, 0x6FFA, 0xC271,
+ 0x6FFB, 0xEFF4, 0x6FFC, 0xEFF6, 0x6FFE, 0xC26F, 0x6FFF, 0xEFF2,
+ 0x7000, 0xEFF3, 0x7001, 0xEFEE, 0x7004, 0xE9F6, 0x7005, 0xEFEF,
+ 0x7006, 0xC270, 0x7007, 0xEFEB, 0x7009, 0xC26D, 0x700A, 0xEFF8,
+ 0x700B, 0xC26E, 0x700C, 0xEFEC, 0x700D, 0xEFED, 0x700E, 0xEFF1,
+ 0x700F, 0xC273, 0x7011, 0xC272, 0x7014, 0xEFF0, 0x7015, 0xC378,
+ 0x7016, 0xF25F, 0x7017, 0xF265, 0x7018, 0xC379, 0x7019, 0xF25C,
+ 0x701A, 0xC376, 0x701B, 0xC373, 0x701C, 0xF267, 0x701D, 0xC377,
+ 0x701F, 0xC374, 0x7020, 0xF25E, 0x7021, 0xF261, 0x7022, 0xF262,
+ 0x7023, 0xF263, 0x7024, 0xF266, 0x7026, 0xEFF5, 0x7027, 0xF25D,
+ 0x7028, 0xC375, 0x7029, 0xF264, 0x702A, 0xF268, 0x702B, 0xF260,
+ 0x702F, 0xF45D, 0x7030, 0xC46A, 0x7031, 0xF460, 0x7032, 0xC46B,
+ 0x7033, 0xF468, 0x7034, 0xF45F, 0x7035, 0xF45C, 0x7037, 0xF45E,
+ 0x7038, 0xF462, 0x7039, 0xF465, 0x703A, 0xF464, 0x703B, 0xF467,
+ 0x703C, 0xF45B, 0x703E, 0xC469, 0x703F, 0xF463, 0x7040, 0xF466,
+ 0x7041, 0xF469, 0x7042, 0xF461, 0x7043, 0xF5D3, 0x7044, 0xF5D4,
+ 0x7045, 0xF5D8, 0x7046, 0xF5D9, 0x7048, 0xF5D6, 0x7049, 0xF5D7,
+ 0x704A, 0xF5D5, 0x704C, 0xC4E9, 0x7051, 0xC578, 0x7052, 0xF6EB,
+ 0x7055, 0xF6E8, 0x7056, 0xF6E9, 0x7057, 0xF6EA, 0x7058, 0xC579,
+ 0x705A, 0xF7E5, 0x705B, 0xF7E4, 0x705D, 0xF8AF, 0x705E, 0xC5F4,
+ 0x705F, 0xF8AD, 0x7060, 0xF8B0, 0x7061, 0xF8AE, 0x7062, 0xF8F5,
+ 0x7063, 0xC657, 0x7064, 0xC665, 0x7065, 0xF9A3, 0x7066, 0xF96C,
+ 0x7068, 0xF9A2, 0x7069, 0xF9D0, 0x706A, 0xF9D1, 0x706B, 0xA4F5,
+ 0x7070, 0xA6C7, 0x7071, 0xCA41, 0x7074, 0xCB5E, 0x7076, 0xA85F,
+ 0x7078, 0xA862, 0x707A, 0xCB5F, 0x707C, 0xA860, 0x707D, 0xA861,
+ 0x7082, 0xCD58, 0x7083, 0xCD5A, 0x7084, 0xCD55, 0x7085, 0xCD52,
+ 0x7086, 0xCD54, 0x708A, 0xAAA4, 0x708E, 0xAAA2, 0x7091, 0xCD56,
+ 0x7092, 0xAAA3, 0x7093, 0xCD53, 0x7094, 0xCD50, 0x7095, 0xAAA1,
+ 0x7096, 0xCD57, 0x7098, 0xCD51, 0x7099, 0xAAA5, 0x709A, 0xCD59,
+ 0x709F, 0xCFAF, 0x70A1, 0xCFB3, 0x70A4, 0xACB7, 0x70A9, 0xCFB6,
+ 0x70AB, 0xACAF, 0x70AC, 0xACB2, 0x70AD, 0xACB4, 0x70AE, 0xACB6,
+ 0x70AF, 0xACB3, 0x70B0, 0xCFB2, 0x70B1, 0xCFB1, 0x70B3, 0xACB1,
+ 0x70B4, 0xCFB4, 0x70B5, 0xCFB5, 0x70B7, 0xCFAE, 0x70B8, 0xACB5,
+ 0x70BA, 0xACB0, 0x70BE, 0xCFB0, 0x70C5, 0xD277, 0x70C6, 0xD278,
+ 0x70C7, 0xD279, 0x70C8, 0xAF50, 0x70CA, 0xAF4C, 0x70CB, 0xD26E,
+ 0x70CD, 0xD276, 0x70CE, 0xD27B, 0x70CF, 0xAF51, 0x70D1, 0xD26C,
+ 0x70D2, 0xD272, 0x70D3, 0xD26B, 0x70D4, 0xD275, 0x70D7, 0xD271,
+ 0x70D8, 0xAF4D, 0x70D9, 0xAF4F, 0x70DA, 0xD27A, 0x70DC, 0xD26A,
+ 0x70DD, 0xD26D, 0x70DE, 0xD273, 0x70E0, 0xD274, 0x70E1, 0xD27C,
+ 0x70E2, 0xD270, 0x70E4, 0xAF4E, 0x70EF, 0xB26D, 0x70F0, 0xD64E,
+ 0x70F3, 0xD650, 0x70F4, 0xD64C, 0x70F6, 0xD658, 0x70F7, 0xD64A,
+ 0x70F8, 0xD657, 0x70F9, 0xB269, 0x70FA, 0xD648, 0x70FB, 0xDA5B,
+ 0x70FC, 0xD652, 0x70FD, 0xB26C, 0x70FF, 0xD653, 0x7100, 0xD656,
+ 0x7102, 0xD65A, 0x7104, 0xD64F, 0x7106, 0xD654, 0x7109, 0xB26A,
+ 0x710A, 0xB26B, 0x710B, 0xD659, 0x710C, 0xD64D, 0x710D, 0xD649,
+ 0x710E, 0xD65B, 0x7110, 0xD651, 0x7113, 0xD655, 0x7117, 0xD64B,
+ 0x7119, 0xB548, 0x711A, 0xB549, 0x711B, 0xDA65, 0x711C, 0xB54F,
+ 0x711E, 0xDA59, 0x711F, 0xDA62, 0x7120, 0xDA58, 0x7121, 0xB54C,
+ 0x7122, 0xDA60, 0x7123, 0xDA5E, 0x7125, 0xDA5F, 0x7126, 0xB54A,
+ 0x7128, 0xDA63, 0x712E, 0xDA5C, 0x712F, 0xDA5A, 0x7130, 0xB54B,
+ 0x7131, 0xDA5D, 0x7132, 0xDA61, 0x7136, 0xB54D, 0x713A, 0xDA64,
+ 0x7141, 0xDE70, 0x7142, 0xDE77, 0x7143, 0xDE79, 0x7144, 0xDEA1,
+ 0x7146, 0xB7DA, 0x7147, 0xDE6B, 0x7149, 0xB7D2, 0x714B, 0xDE7A,
+ 0x714C, 0xB7D7, 0x714D, 0xDEA2, 0x714E, 0xB7CE, 0x7150, 0xDE7D,
+ 0x7152, 0xDE6D, 0x7153, 0xDE7E, 0x7154, 0xDE6C, 0x7156, 0xB7DC,
+ 0x7158, 0xDE78, 0x7159, 0xB7CF, 0x715A, 0xDEA3, 0x715C, 0xB7D4,
+ 0x715D, 0xDE71, 0x715E, 0xB7D9, 0x715F, 0xDE7C, 0x7160, 0xDE6F,
+ 0x7161, 0xDE76, 0x7162, 0xDE72, 0x7163, 0xDE6E, 0x7164, 0xB7D1,
+ 0x7165, 0xB7D8, 0x7166, 0xB7D6, 0x7167, 0xB7D3, 0x7168, 0xB7DB,
+ 0x7169, 0xB7D0, 0x716A, 0xDE75, 0x716C, 0xB7D5, 0x716E, 0xB54E,
+ 0x7170, 0xDE7B, 0x7172, 0xDE73, 0x7178, 0xDE74, 0x717B, 0xE2C1,
+ 0x717D, 0xBAB4, 0x7180, 0xE2BD, 0x7181, 0xE2C3, 0x7182, 0xE2BF,
+ 0x7184, 0xBAB6, 0x7185, 0xE2BE, 0x7186, 0xE2C2, 0x7187, 0xE2BA,
+ 0x7189, 0xE2BC, 0x718A, 0xBAB5, 0x718F, 0xE2C0, 0x7190, 0xE2BB,
+ 0x7192, 0xBAB7, 0x7194, 0xBAB2, 0x7197, 0xE2C4, 0x7199, 0xBAB3,
+ 0x719A, 0xE667, 0x719B, 0xE664, 0x719C, 0xE670, 0x719D, 0xE66A,
+ 0x719E, 0xE66C, 0x719F, 0xBCF4, 0x71A0, 0xE666, 0x71A1, 0xE66E,
+ 0x71A4, 0xE66D, 0x71A5, 0xE66B, 0x71A7, 0xE671, 0x71A8, 0xBCF7,
+ 0x71A9, 0xE668, 0x71AA, 0xE66F, 0x71AC, 0xBCF5, 0x71AF, 0xE663,
+ 0x71B0, 0xE665, 0x71B1, 0xBCF6, 0x71B2, 0xE662, 0x71B3, 0xE672,
+ 0x71B5, 0xE669, 0x71B8, 0xEA4A, 0x71B9, 0xBF51, 0x71BC, 0xEA55,
+ 0x71BD, 0xEA53, 0x71BE, 0xBF4B, 0x71BF, 0xEA49, 0x71C0, 0xEA4C,
+ 0x71C1, 0xEA4D, 0x71C2, 0xEA48, 0x71C3, 0xBF55, 0x71C4, 0xBF56,
+ 0x71C5, 0xEA47, 0x71C6, 0xEA56, 0x71C7, 0xEA51, 0x71C8, 0xBF4F,
+ 0x71C9, 0xBF4C, 0x71CA, 0xEA50, 0x71CB, 0xEA4E, 0x71CE, 0xBF52,
+ 0x71CF, 0xEA52, 0x71D0, 0xBF4D, 0x71D2, 0xBF4E, 0x71D4, 0xEA4F,
+ 0x71D5, 0xBF50, 0x71D6, 0xEA4B, 0x71D8, 0xEA54, 0x71D9, 0xBF53,
+ 0x71DA, 0xEA57, 0x71DB, 0xEA58, 0x71DC, 0xBF54, 0x71DF, 0xC0E7,
+ 0x71E0, 0xC0EE, 0x71E1, 0xED5C, 0x71E2, 0xED62, 0x71E4, 0xED60,
+ 0x71E5, 0xC0EA, 0x71E6, 0xC0E9, 0x71E7, 0xC0E6, 0x71E8, 0xED5E,
+ 0x71EC, 0xC0EC, 0x71ED, 0xC0EB, 0x71EE, 0xC0E8, 0x71F0, 0xED61,
+ 0x71F1, 0xED5D, 0x71F2, 0xED5F, 0x71F4, 0xC0ED, 0x71F8, 0xC277,
+ 0x71F9, 0xEFFB, 0x71FB, 0xC274, 0x71FC, 0xC275, 0x71FD, 0xEFFD,
+ 0x71FE, 0xC276, 0x71FF, 0xEFFA, 0x7201, 0xEFF9, 0x7202, 0xF26C,
+ 0x7203, 0xEFFC, 0x7205, 0xF26D, 0x7206, 0xC37A, 0x7207, 0xF26B,
+ 0x720A, 0xF26A, 0x720C, 0xF269, 0x720D, 0xC37B, 0x7210, 0xC46C,
+ 0x7213, 0xF46A, 0x7214, 0xF46B, 0x7219, 0xF5DC, 0x721A, 0xF5DB,
+ 0x721B, 0xC4EA, 0x721D, 0xF5DA, 0x721E, 0xF6EC, 0x721F, 0xF6ED,
+ 0x7222, 0xF7E6, 0x7223, 0xF8B1, 0x7226, 0xF8F6, 0x7227, 0xF9BC,
+ 0x7228, 0xC679, 0x7229, 0xF9C6, 0x722A, 0xA4F6, 0x722C, 0xAAA6,
+ 0x722D, 0xAAA7, 0x7230, 0xACB8, 0x7235, 0xC0EF, 0x7236, 0xA4F7,
+ 0x7238, 0xAAA8, 0x7239, 0xAF52, 0x723A, 0xB7DD, 0x723B, 0xA4F8,
+ 0x723D, 0xB26E, 0x723E, 0xBAB8, 0x723F, 0xC962, 0x7241, 0xCFB7,
+ 0x7242, 0xD27D, 0x7244, 0xE2C5, 0x7246, 0xC0F0, 0x7247, 0xA4F9,
+ 0x7248, 0xAAA9, 0x7249, 0xCFB8, 0x724A, 0xCFB9, 0x724B, 0xDA66,
+ 0x724C, 0xB550, 0x724F, 0xDEA4, 0x7252, 0xB7DE, 0x7253, 0xE2C6,
+ 0x7256, 0xBCF8, 0x7258, 0xC37C, 0x7259, 0xA4FA, 0x725A, 0xDA67,
+ 0x725B, 0xA4FB, 0x725D, 0xA6C9, 0x725E, 0xCA42, 0x725F, 0xA6C8,
+ 0x7260, 0xA865, 0x7261, 0xA864, 0x7262, 0xA863, 0x7263, 0xCB60,
+ 0x7267, 0xAAAA, 0x7269, 0xAAAB, 0x726A, 0xCD5B, 0x726C, 0xCFBA,
+ 0x726E, 0xCFBD, 0x726F, 0xACBA, 0x7270, 0xCFBB, 0x7272, 0xACB9,
+ 0x7273, 0xCFBC, 0x7274, 0xACBB, 0x7276, 0xD2A2, 0x7277, 0xD2A1,
+ 0x7278, 0xD27E, 0x7279, 0xAF53, 0x727B, 0xD65D, 0x727C, 0xD65E,
+ 0x727D, 0xB26F, 0x727E, 0xD65C, 0x727F, 0xD65F, 0x7280, 0xB552,
+ 0x7281, 0xB270, 0x7284, 0xB551, 0x7285, 0xDA6B, 0x7286, 0xDA6A,
+ 0x7288, 0xDA68, 0x7289, 0xDA69, 0x728B, 0xDA6C, 0x728C, 0xDEA6,
+ 0x728D, 0xDEA5, 0x728E, 0xDEA9, 0x7290, 0xDEA8, 0x7291, 0xDEA7,
+ 0x7292, 0xBAB9, 0x7293, 0xE2C9, 0x7295, 0xE2C8, 0x7296, 0xBABA,
+ 0x7297, 0xE2C7, 0x7298, 0xE673, 0x729A, 0xE674, 0x729B, 0xBCF9,
+ 0x729D, 0xEA59, 0x729E, 0xEA5A, 0x72A1, 0xF272, 0x72A2, 0xC37D,
+ 0x72A3, 0xF271, 0x72A4, 0xF270, 0x72A5, 0xF26E, 0x72A6, 0xF26F,
+ 0x72A7, 0xC4EB, 0x72A8, 0xF46C, 0x72A9, 0xF6EE, 0x72AA, 0xF8F7,
+ 0x72AC, 0xA4FC, 0x72AE, 0xC9A5, 0x72AF, 0xA5C7, 0x72B0, 0xC9A6,
+ 0x72B4, 0xCA43, 0x72B5, 0xCA44, 0x72BA, 0xCB66, 0x72BD, 0xCB62,
+ 0x72BF, 0xCB61, 0x72C0, 0xAAAC, 0x72C1, 0xCB65, 0x72C2, 0xA867,
+ 0x72C3, 0xCB63, 0x72C4, 0xA866, 0x72C5, 0xCB67, 0x72C6, 0xCB64,
+ 0x72C9, 0xCD5F, 0x72CA, 0xCFBE, 0x72CB, 0xCD5D, 0x72CC, 0xCD64,
+ 0x72CE, 0xAAAD, 0x72D0, 0xAAB0, 0x72D1, 0xCD65, 0x72D2, 0xCD61,
+ 0x72D4, 0xCD62, 0x72D6, 0xCD5C, 0x72D7, 0xAAAF, 0x72D8, 0xCD5E,
+ 0x72D9, 0xAAAE, 0x72DA, 0xCD63, 0x72DC, 0xCD60, 0x72DF, 0xCFC2,
+ 0x72E0, 0xACBD, 0x72E1, 0xACBE, 0x72E3, 0xCFC5, 0x72E4, 0xCFBF,
+ 0x72E6, 0xCFC4, 0x72E8, 0xCFC0, 0x72E9, 0xACBC, 0x72EA, 0xCFC3,
+ 0x72EB, 0xCFC1, 0x72F3, 0xD2A8, 0x72F4, 0xD2A5, 0x72F6, 0xD2A7,
+ 0x72F7, 0xAF58, 0x72F8, 0xAF57, 0x72F9, 0xAF55, 0x72FA, 0xD2A4,
+ 0x72FB, 0xD2A9, 0x72FC, 0xAF54, 0x72FD, 0xAF56, 0x72FE, 0xD2A6,
+ 0x72FF, 0xD667, 0x7300, 0xD2A3, 0x7301, 0xD2AA, 0x7307, 0xD662,
+ 0x7308, 0xD666, 0x730A, 0xD665, 0x730B, 0xDA6E, 0x730C, 0xDA79,
+ 0x730F, 0xD668, 0x7311, 0xD663, 0x7312, 0xDA6D, 0x7313, 0xB274,
+ 0x7316, 0xB273, 0x7317, 0xD661, 0x7318, 0xD664, 0x7319, 0xB275,
+ 0x731B, 0xB272, 0x731C, 0xB271, 0x731D, 0xD660, 0x731E, 0xD669,
+ 0x7322, 0xDA70, 0x7323, 0xDA77, 0x7325, 0xB554, 0x7326, 0xDA76,
+ 0x7327, 0xDA73, 0x7329, 0xB556, 0x732D, 0xDA75, 0x7330, 0xDA6F,
+ 0x7331, 0xDA71, 0x7332, 0xDA74, 0x7333, 0xDA72, 0x7334, 0xB555,
+ 0x7335, 0xDA78, 0x7336, 0xB553, 0x7337, 0xB7DF, 0x733A, 0xDEAD,
+ 0x733B, 0xDEAC, 0x733C, 0xDEAA, 0x733E, 0xB7E2, 0x733F, 0xB7E1,
+ 0x7340, 0xDEAE, 0x7342, 0xDEAB, 0x7343, 0xE2CA, 0x7344, 0xBABB,
+ 0x7345, 0xB7E0, 0x7349, 0xDEB0, 0x734A, 0xDEAF, 0x734C, 0xE2CD,
+ 0x734D, 0xE2CB, 0x734E, 0xBCFA, 0x7350, 0xBABC, 0x7351, 0xE2CC,
+ 0x7352, 0xE676, 0x7357, 0xBCFB, 0x7358, 0xE675, 0x7359, 0xE67E,
+ 0x735A, 0xE67D, 0x735B, 0xE67B, 0x735D, 0xE67A, 0x735E, 0xE677,
+ 0x735F, 0xE678, 0x7360, 0xE679, 0x7361, 0xE67C, 0x7362, 0xE6A1,
+ 0x7365, 0xEA5F, 0x7366, 0xEA5C, 0x7367, 0xEA5D, 0x7368, 0xBF57,
+ 0x7369, 0xEA5B, 0x736A, 0xEA61, 0x736B, 0xEA60, 0x736C, 0xEA5E,
+ 0x736E, 0xED64, 0x736F, 0xED65, 0x7370, 0xC0F1, 0x7372, 0xC0F2,
+ 0x7373, 0xED63, 0x7375, 0xC279, 0x7376, 0xEFFE, 0x7377, 0xC278,
+ 0x7378, 0xC37E, 0x737A, 0xC3A1, 0x737B, 0xC46D, 0x737C, 0xF46E,
+ 0x737D, 0xF46D, 0x737E, 0xF5DD, 0x737F, 0xF6EF, 0x7380, 0xC57A,
+ 0x7381, 0xF7E8, 0x7382, 0xF7E7, 0x7383, 0xF7E9, 0x7384, 0xA5C8,
+ 0x7385, 0xCFC6, 0x7386, 0xAF59, 0x7387, 0xB276, 0x7388, 0xD66A,
+ 0x7389, 0xA5C9, 0x738A, 0xC9A7, 0x738B, 0xA4FD, 0x738E, 0xCA45,
+ 0x7392, 0xCB6C, 0x7393, 0xCB6A, 0x7394, 0xCB6B, 0x7395, 0xCB68,
+ 0x7396, 0xA868, 0x7397, 0xCB69, 0x739D, 0xCD6D, 0x739F, 0xAAB3,
+ 0x73A0, 0xCD6B, 0x73A1, 0xCD67, 0x73A2, 0xCD6A, 0x73A4, 0xCD66,
+ 0x73A5, 0xAAB5, 0x73A6, 0xCD69, 0x73A8, 0xAAB2, 0x73A9, 0xAAB1,
+ 0x73AB, 0xAAB4, 0x73AC, 0xCD6C, 0x73AD, 0xCD68, 0x73B2, 0xACC2,
+ 0x73B3, 0xACC5, 0x73B4, 0xCFCE, 0x73B5, 0xCFCD, 0x73B6, 0xCFCC,
+ 0x73B7, 0xACBF, 0x73B8, 0xCFD5, 0x73B9, 0xCFCB, 0x73BB, 0xACC1,
+ 0x73BC, 0xD2AF, 0x73BE, 0xCFD2, 0x73BF, 0xCFD0, 0x73C0, 0xACC4,
+ 0x73C2, 0xCFC8, 0x73C3, 0xCFD3, 0x73C5, 0xCFCA, 0x73C6, 0xCFD4,
+ 0x73C7, 0xCFD1, 0x73C8, 0xCFC9, 0x73CA, 0xACC0, 0x73CB, 0xCFD6,
+ 0x73CC, 0xCFC7, 0x73CD, 0xACC3, 0x73D2, 0xD2B4, 0x73D3, 0xD2AB,
+ 0x73D4, 0xD2B6, 0x73D6, 0xD2AE, 0x73D7, 0xD2B9, 0x73D8, 0xD2BA,
+ 0x73D9, 0xD2AC, 0x73DA, 0xD2B8, 0x73DB, 0xD2B5, 0x73DC, 0xD2B3,
+ 0x73DD, 0xD2B7, 0x73DE, 0xAF5F, 0x73E0, 0xAF5D, 0x73E3, 0xD2B1,
+ 0x73E5, 0xD2AD, 0x73E7, 0xD2B0, 0x73E8, 0xD2BB, 0x73E9, 0xD2B2,
+ 0x73EA, 0xAF5E, 0x73EB, 0xCFCF, 0x73ED, 0xAF5A, 0x73EE, 0xAF5C,
+ 0x73F4, 0xD678, 0x73F5, 0xD66D, 0x73F6, 0xD66B, 0x73F8, 0xD66C,
+ 0x73FA, 0xD673, 0x73FC, 0xD674, 0x73FD, 0xD670, 0x73FE, 0xB27B,
+ 0x73FF, 0xD675, 0x7400, 0xD672, 0x7401, 0xD66F, 0x7403, 0xB279,
+ 0x7404, 0xD66E, 0x7405, 0xB277, 0x7406, 0xB27A, 0x7407, 0xD671,
+ 0x7408, 0xD679, 0x7409, 0xAF5B, 0x740A, 0xB278, 0x740B, 0xD677,
+ 0x740C, 0xD676, 0x740D, 0xB27C, 0x7416, 0xDA7E, 0x741A, 0xDAA1,
+ 0x741B, 0xB560, 0x741D, 0xDAA7, 0x7420, 0xDAA9, 0x7421, 0xDAA2,
+ 0x7422, 0xB55A, 0x7423, 0xDAA6, 0x7424, 0xDAA5, 0x7425, 0xB55B,
+ 0x7426, 0xB561, 0x7428, 0xB562, 0x7429, 0xDAA8, 0x742A, 0xB558,
+ 0x742B, 0xDA7D, 0x742C, 0xDA7B, 0x742D, 0xDAA3, 0x742E, 0xDA7A,
+ 0x742F, 0xB55F, 0x7430, 0xDA7C, 0x7431, 0xDAA4, 0x7432, 0xDAAA,
+ 0x7433, 0xB559, 0x7434, 0xB55E, 0x7435, 0xB55C, 0x7436, 0xB55D,
+ 0x743A, 0xB557, 0x743F, 0xB7E9, 0x7440, 0xDEB7, 0x7441, 0xB7E8,
+ 0x7442, 0xDEBB, 0x7444, 0xDEB1, 0x7446, 0xDEBC, 0x744A, 0xDEB2,
+ 0x744B, 0xDEB3, 0x744D, 0xDEBD, 0x744E, 0xDEBA, 0x744F, 0xDEB8,
+ 0x7450, 0xDEB9, 0x7451, 0xDEB5, 0x7452, 0xDEB4, 0x7454, 0xDEBE,
+ 0x7455, 0xB7E5, 0x7457, 0xDEB6, 0x7459, 0xB7EA, 0x745A, 0xB7E4,
+ 0x745B, 0xB7EB, 0x745C, 0xB7EC, 0x745E, 0xB7E7, 0x745F, 0xB7E6,
+ 0x7462, 0xE2CE, 0x7463, 0xBABE, 0x7464, 0xBABD, 0x7467, 0xE2D3,
+ 0x7469, 0xBCFC, 0x746A, 0xBABF, 0x746D, 0xBAC1, 0x746E, 0xE2D4,
+ 0x746F, 0xB7E3, 0x7470, 0xBAC0, 0x7471, 0xE2D0, 0x7472, 0xE2D2,
+ 0x7473, 0xE2CF, 0x7475, 0xE2D1, 0x7479, 0xE6AB, 0x747C, 0xE6AA,
+ 0x747D, 0xE6A7, 0x747E, 0xBD40, 0x747F, 0xEA62, 0x7480, 0xBD41,
+ 0x7481, 0xE6A6, 0x7483, 0xBCFE, 0x7485, 0xE6A8, 0x7486, 0xE6A5,
+ 0x7487, 0xE6A2, 0x7488, 0xE6A9, 0x7489, 0xE6A3, 0x748A, 0xE6A4,
+ 0x748B, 0xBCFD, 0x7490, 0xED69, 0x7492, 0xEA66, 0x7494, 0xEA65,
+ 0x7495, 0xEA67, 0x7497, 0xED66, 0x7498, 0xBF5A, 0x749A, 0xEA63,
+ 0x749C, 0xBF58, 0x749E, 0xBF5C, 0x749F, 0xBF5B, 0x74A0, 0xEA64,
+ 0x74A1, 0xEA68, 0x74A3, 0xBF59, 0x74A5, 0xED6D, 0x74A6, 0xC0F5,
+ 0x74A7, 0xC27A, 0x74A8, 0xC0F6, 0x74A9, 0xC0F3, 0x74AA, 0xED6A,
+ 0x74AB, 0xED68, 0x74AD, 0xED6B, 0x74AF, 0xED6E, 0x74B0, 0xC0F4,
+ 0x74B1, 0xED6C, 0x74B2, 0xED67, 0x74B5, 0xF042, 0x74B6, 0xF045,
+ 0x74B7, 0xF275, 0x74B8, 0xF040, 0x74BA, 0xF46F, 0x74BB, 0xF046,
+ 0x74BD, 0xC3A2, 0x74BE, 0xF044, 0x74BF, 0xC27B, 0x74C0, 0xF041,
+ 0x74C1, 0xF043, 0x74C2, 0xF047, 0x74C3, 0xF276, 0x74C5, 0xF274,
+ 0x74CA, 0xC3A3, 0x74CB, 0xF273, 0x74CF, 0xC46E, 0x74D4, 0xC4ED,
+ 0x74D5, 0xF6F1, 0x74D6, 0xC4EC, 0x74D7, 0xF6F3, 0x74D8, 0xF6F0,
+ 0x74D9, 0xF6F2, 0x74DA, 0xC5D0, 0x74DB, 0xF8B2, 0x74DC, 0xA5CA,
+ 0x74DD, 0xCD6E, 0x74DE, 0xD2BC, 0x74DF, 0xD2BD, 0x74E0, 0xB27D,
+ 0x74E1, 0xDEBF, 0x74E2, 0xBF5D, 0x74E3, 0xC3A4, 0x74E4, 0xC57B,
+ 0x74E5, 0xF8B3, 0x74E6, 0xA5CB, 0x74E8, 0xCD6F, 0x74E9, 0xA260,
+ 0x74EC, 0xCFD7, 0x74EE, 0xCFD8, 0x74F4, 0xD2BE, 0x74F5, 0xD2BF,
+ 0x74F6, 0xB27E, 0x74F7, 0xB2A1, 0x74FB, 0xDAAB, 0x74FD, 0xDEC2,
+ 0x74FE, 0xDEC1, 0x74FF, 0xDEC0, 0x7500, 0xE2D5, 0x7502, 0xE2D6,
+ 0x7503, 0xE2D7, 0x7504, 0xBAC2, 0x7507, 0xE6AD, 0x7508, 0xE6AC,
+ 0x750B, 0xEA69, 0x750C, 0xBF5E, 0x750D, 0xBF5F, 0x750F, 0xED72,
+ 0x7510, 0xED6F, 0x7511, 0xED70, 0x7512, 0xED71, 0x7513, 0xF049,
+ 0x7514, 0xF048, 0x7515, 0xC27C, 0x7516, 0xF277, 0x7517, 0xF5DE,
+ 0x7518, 0xA5CC, 0x751A, 0xACC6, 0x751C, 0xB2A2, 0x751D, 0xDEC3,
+ 0x751F, 0xA5CD, 0x7521, 0xD2C0, 0x7522, 0xB2A3, 0x7525, 0xB563,
+ 0x7526, 0xB564, 0x7528, 0xA5CE, 0x7529, 0xA5CF, 0x752A, 0xCA46,
+ 0x752B, 0xA86A, 0x752C, 0xA869, 0x752D, 0xACC7, 0x752E, 0xCFD9,
+ 0x752F, 0xDAAC, 0x7530, 0xA5D0, 0x7531, 0xA5D1, 0x7532, 0xA5D2,
+ 0x7533, 0xA5D3, 0x7537, 0xA86B, 0x7538, 0xA86C, 0x7539, 0xCB6E,
+ 0x753A, 0xCB6D, 0x753D, 0xAAB6, 0x753E, 0xCD72, 0x753F, 0xCD70,
+ 0x7540, 0xCD71, 0x7547, 0xCFDA, 0x7548, 0xCFDB, 0x754B, 0xACCB,
+ 0x754C, 0xACC9, 0x754E, 0xACCA, 0x754F, 0xACC8, 0x7554, 0xAF60,
+ 0x7559, 0xAF64, 0x755A, 0xAF63, 0x755B, 0xD2C1, 0x755C, 0xAF62,
+ 0x755D, 0xAF61, 0x755F, 0xD2C2, 0x7562, 0xB2A6, 0x7563, 0xD67B,
+ 0x7564, 0xD67A, 0x7565, 0xB2A4, 0x7566, 0xB2A5, 0x756A, 0xB566,
+ 0x756B, 0xB565, 0x756C, 0xDAAE, 0x756F, 0xDAAD, 0x7570, 0xB2A7,
+ 0x7576, 0xB7ED, 0x7577, 0xDEC5, 0x7578, 0xB7EE, 0x7579, 0xDEC4,
+ 0x757D, 0xE2D8, 0x757E, 0xE6AE, 0x757F, 0xBD42, 0x7580, 0xEA6A,
+ 0x7584, 0xED73, 0x7586, 0xC3A6, 0x7587, 0xC3A5, 0x758A, 0xC57C,
+ 0x758B, 0xA5D4, 0x758C, 0xCD73, 0x758F, 0xB2A8, 0x7590, 0xE2D9,
+ 0x7591, 0xBAC3, 0x7594, 0xCB6F, 0x7595, 0xCB70, 0x7598, 0xCD74,
+ 0x7599, 0xAAB8, 0x759A, 0xAAB9, 0x759D, 0xAAB7, 0x75A2, 0xACCF,
+ 0x75A3, 0xACD0, 0x75A4, 0xACCD, 0x75A5, 0xACCE, 0x75A7, 0xCFDC,
+ 0x75AA, 0xCFDD, 0x75AB, 0xACCC, 0x75B0, 0xD2C3, 0x75B2, 0xAF68,
+ 0x75B3, 0xAF69, 0x75B5, 0xB2AB, 0x75B6, 0xD2C9, 0x75B8, 0xAF6E,
+ 0x75B9, 0xAF6C, 0x75BA, 0xD2CA, 0x75BB, 0xD2C5, 0x75BC, 0xAF6B,
+ 0x75BD, 0xAF6A, 0x75BE, 0xAF65, 0x75BF, 0xD2C8, 0x75C0, 0xD2C7,
+ 0x75C1, 0xD2C4, 0x75C2, 0xAF6D, 0x75C4, 0xD2C6, 0x75C5, 0xAF66,
+ 0x75C7, 0xAF67, 0x75CA, 0xB2AC, 0x75CB, 0xD6A1, 0x75CC, 0xD6A2,
+ 0x75CD, 0xB2AD, 0x75CE, 0xD67C, 0x75CF, 0xD67E, 0x75D0, 0xD6A4,
+ 0x75D1, 0xD6A3, 0x75D2, 0xD67D, 0x75D4, 0xB2A9, 0x75D5, 0xB2AA,
+ 0x75D7, 0xDAB6, 0x75D8, 0xB56B, 0x75D9, 0xB56A, 0x75DA, 0xDAB0,
+ 0x75DB, 0xB568, 0x75DD, 0xDAB3, 0x75DE, 0xB56C, 0x75DF, 0xDAB4,
+ 0x75E0, 0xB56D, 0x75E1, 0xDAB1, 0x75E2, 0xB567, 0x75E3, 0xB569,
+ 0x75E4, 0xDAB5, 0x75E6, 0xDAB2, 0x75E7, 0xDAAF, 0x75ED, 0xDED2,
+ 0x75EF, 0xDEC7, 0x75F0, 0xB7F0, 0x75F1, 0xB7F3, 0x75F2, 0xB7F2,
+ 0x75F3, 0xB7F7, 0x75F4, 0xB7F6, 0x75F5, 0xDED3, 0x75F6, 0xDED1,
+ 0x75F7, 0xDECA, 0x75F8, 0xDECE, 0x75F9, 0xDECD, 0x75FA, 0xB7F4,
+ 0x75FB, 0xDED0, 0x75FC, 0xDECC, 0x75FD, 0xDED4, 0x75FE, 0xDECB,
+ 0x75FF, 0xB7F5, 0x7600, 0xB7EF, 0x7601, 0xB7F1, 0x7603, 0xDEC9,
+ 0x7608, 0xE2DB, 0x7609, 0xBAC7, 0x760A, 0xE2DF, 0x760B, 0xBAC6,
+ 0x760C, 0xE2DC, 0x760D, 0xBAC5, 0x760F, 0xDEC8, 0x7610, 0xDECF,
+ 0x7611, 0xE2DE, 0x7613, 0xBAC8, 0x7614, 0xE2E0, 0x7615, 0xE2DD,
+ 0x7616, 0xE2DA, 0x7619, 0xE6B1, 0x761A, 0xE6B5, 0x761B, 0xE6B7,
+ 0x761C, 0xE6B3, 0x761D, 0xE6B2, 0x761E, 0xE6B0, 0x761F, 0xBD45,
+ 0x7620, 0xBD43, 0x7621, 0xBD48, 0x7622, 0xBD49, 0x7623, 0xE6B4,
+ 0x7624, 0xBD46, 0x7625, 0xE6AF, 0x7626, 0xBD47, 0x7627, 0xBAC4,
+ 0x7628, 0xE6B6, 0x7629, 0xBD44, 0x762D, 0xEA6C, 0x762F, 0xEA6B,
+ 0x7630, 0xEA73, 0x7631, 0xEA6D, 0x7632, 0xEA72, 0x7633, 0xEA6F,
+ 0x7634, 0xBF60, 0x7635, 0xEA71, 0x7638, 0xBF61, 0x763A, 0xBF62,
+ 0x763C, 0xEA70, 0x763D, 0xEA6E, 0x7642, 0xC0F8, 0x7643, 0xED74,
+ 0x7646, 0xC0F7, 0x7647, 0xED77, 0x7648, 0xED75, 0x7649, 0xED76,
+ 0x764C, 0xC0F9, 0x7650, 0xF04D, 0x7652, 0xC2A1, 0x7653, 0xF04E,
+ 0x7656, 0xC27D, 0x7657, 0xF04F, 0x7658, 0xC27E, 0x7659, 0xF04C,
+ 0x765A, 0xF050, 0x765C, 0xF04A, 0x765F, 0xC3A7, 0x7660, 0xF278,
+ 0x7661, 0xC3A8, 0x7662, 0xC46F, 0x7664, 0xF04B, 0x7665, 0xC470,
+ 0x7669, 0xC4EE, 0x766A, 0xF5DF, 0x766C, 0xC57E, 0x766D, 0xF6F4,
+ 0x766E, 0xC57D, 0x7670, 0xF7EA, 0x7671, 0xC5F5, 0x7672, 0xC5F6,
+ 0x7675, 0xF9CC, 0x7678, 0xACD1, 0x7679, 0xCFDE, 0x767B, 0xB56E,
+ 0x767C, 0xB56F, 0x767D, 0xA5D5, 0x767E, 0xA6CA, 0x767F, 0xCA47,
+ 0x7681, 0xCB71, 0x7682, 0xA86D, 0x7684, 0xAABA, 0x7686, 0xACD2,
+ 0x7687, 0xACD3, 0x7688, 0xACD4, 0x7689, 0xD6A6, 0x768A, 0xD2CB,
+ 0x768B, 0xAF6F, 0x768E, 0xB2AE, 0x768F, 0xD6A5, 0x7692, 0xDAB8,
+ 0x7693, 0xB571, 0x7695, 0xDAB7, 0x7696, 0xB570, 0x7699, 0xDED5,
+ 0x769A, 0xBD4A, 0x769B, 0xE6BB, 0x769C, 0xE6B8, 0x769D, 0xE6B9,
+ 0x769E, 0xE6BA, 0x76A4, 0xED78, 0x76A6, 0xF051, 0x76AA, 0xF471,
+ 0x76AB, 0xF470, 0x76AD, 0xF6F5, 0x76AE, 0xA5D6, 0x76AF, 0xCD75,
+ 0x76B0, 0xAF70, 0x76B4, 0xB572, 0x76B5, 0xDED6, 0x76B8, 0xE2E1,
+ 0x76BA, 0xBD4B, 0x76BB, 0xEA74, 0x76BD, 0xF052, 0x76BE, 0xF472,
+ 0x76BF, 0xA5D7, 0x76C2, 0xAABB, 0x76C3, 0xACD7, 0x76C4, 0xCFDF,
+ 0x76C5, 0xACD8, 0x76C6, 0xACD6, 0x76C8, 0xACD5, 0x76C9, 0xD2CC,
+ 0x76CA, 0xAF71, 0x76CD, 0xAF72, 0x76CE, 0xAF73, 0x76D2, 0xB2B0,
+ 0x76D3, 0xD6A7, 0x76D4, 0xB2AF, 0x76DA, 0xDAB9, 0x76DB, 0xB2B1,
+ 0x76DC, 0xB573, 0x76DD, 0xDED7, 0x76DE, 0xB7F8, 0x76DF, 0xB7F9,
+ 0x76E1, 0xBAC9, 0x76E3, 0xBACA, 0x76E4, 0xBD4C, 0x76E5, 0xBF64,
+ 0x76E6, 0xEA75, 0x76E7, 0xBF63, 0x76E9, 0xED79, 0x76EA, 0xC0FA,
+ 0x76EC, 0xF053, 0x76ED, 0xF473, 0x76EE, 0xA5D8, 0x76EF, 0xA86E,
+ 0x76F0, 0xCD78, 0x76F1, 0xCD77, 0x76F2, 0xAABC, 0x76F3, 0xCD76,
+ 0x76F4, 0xAABD, 0x76F5, 0xCD79, 0x76F7, 0xCFE5, 0x76F8, 0xACDB,
+ 0x76F9, 0xACDA, 0x76FA, 0xCFE7, 0x76FB, 0xCFE6, 0x76FC, 0xACDF,
+ 0x76FE, 0xACDE, 0x7701, 0xACD9, 0x7703, 0xCFE1, 0x7704, 0xCFE2,
+ 0x7705, 0xCFE3, 0x7707, 0xACE0, 0x7708, 0xCFE0, 0x7709, 0xACDC,
+ 0x770A, 0xCFE4, 0x770B, 0xACDD, 0x7710, 0xD2CF, 0x7711, 0xD2D3,
+ 0x7712, 0xD2D1, 0x7713, 0xD2D0, 0x7715, 0xD2D4, 0x7719, 0xD2D5,
+ 0x771A, 0xD2D6, 0x771B, 0xD2CE, 0x771D, 0xD2CD, 0x771F, 0xAF75,
+ 0x7720, 0xAF76, 0x7722, 0xD2D7, 0x7723, 0xD2D2, 0x7725, 0xD6B0,
+ 0x7727, 0xD2D8, 0x7728, 0xAF77, 0x7729, 0xAF74, 0x772D, 0xD6AA,
+ 0x772F, 0xD6A9, 0x7731, 0xD6AB, 0x7732, 0xD6AC, 0x7733, 0xD6AE,
+ 0x7734, 0xD6AD, 0x7735, 0xD6B2, 0x7736, 0xB2B5, 0x7737, 0xB2B2,
+ 0x7738, 0xB2B6, 0x7739, 0xD6A8, 0x773A, 0xB2B7, 0x773B, 0xD6B1,
+ 0x773C, 0xB2B4, 0x773D, 0xD6AF, 0x773E, 0xB2B3, 0x7744, 0xDABC,
+ 0x7745, 0xDABE, 0x7746, 0xDABA, 0x7747, 0xDABB, 0x774A, 0xDABF,
+ 0x774B, 0xDAC1, 0x774C, 0xDAC2, 0x774D, 0xDABD, 0x774E, 0xDAC0,
+ 0x774F, 0xB574, 0x7752, 0xDEDB, 0x7754, 0xDEE0, 0x7755, 0xDED8,
+ 0x7756, 0xDEDC, 0x7759, 0xDEE1, 0x775A, 0xDEDD, 0x775B, 0xB7FA,
+ 0x775C, 0xB843, 0x775E, 0xB7FD, 0x775F, 0xDED9, 0x7760, 0xDEDA,
+ 0x7761, 0xBACE, 0x7762, 0xB846, 0x7763, 0xB7FE, 0x7765, 0xB844,
+ 0x7766, 0xB7FC, 0x7767, 0xDEDF, 0x7768, 0xB845, 0x7769, 0xDEDE,
+ 0x776A, 0xB841, 0x776B, 0xB7FB, 0x776C, 0xB842, 0x776D, 0xDEE2,
+ 0x776E, 0xE2E6, 0x776F, 0xE2E8, 0x7779, 0xB840, 0x777C, 0xE2E3,
+ 0x777D, 0xBACC, 0x777E, 0xE2E9, 0x777F, 0xBACD, 0x7780, 0xE2E7,
+ 0x7781, 0xE2E2, 0x7782, 0xE2E5, 0x7783, 0xE2EA, 0x7784, 0xBACB,
+ 0x7785, 0xE2E4, 0x7787, 0xBD4E, 0x7788, 0xE6BF, 0x7789, 0xE6BE,
+ 0x778B, 0xBD51, 0x778C, 0xBD4F, 0x778D, 0xE6BC, 0x778E, 0xBD4D,
+ 0x778F, 0xE6BD, 0x7791, 0xBD50, 0x7795, 0xEA7D, 0x7797, 0xEAA1,
+ 0x7799, 0xEA7E, 0x779A, 0xEA76, 0x779B, 0xEA7A, 0x779C, 0xEA79,
+ 0x779D, 0xEA77, 0x779E, 0xBF66, 0x779F, 0xBF67, 0x77A0, 0xBF65,
+ 0x77A1, 0xEA78, 0x77A2, 0xEA7B, 0x77A3, 0xEA7C, 0x77A5, 0xBF68,
+ 0x77A7, 0xC140, 0x77A8, 0xEDA3, 0x77AA, 0xC0FC, 0x77AB, 0xED7B,
+ 0x77AC, 0xC0FE, 0x77AD, 0xC141, 0x77B0, 0xC0FD, 0x77B1, 0xEDA2,
+ 0x77B2, 0xED7C, 0x77B3, 0xC0FB, 0x77B4, 0xEDA1, 0x77B5, 0xED7A,
+ 0x77B6, 0xED7E, 0x77B7, 0xED7D, 0x77BA, 0xF055, 0x77BB, 0xC2A4,
+ 0x77BC, 0xC2A5, 0x77BD, 0xC2A2, 0x77BF, 0xC2A3, 0x77C2, 0xF054,
+ 0x77C4, 0xF27B, 0x77C7, 0xC3A9, 0x77C9, 0xF279, 0x77CA, 0xF27A,
+ 0x77CC, 0xF474, 0x77CD, 0xF477, 0x77CE, 0xF475, 0x77CF, 0xF476,
+ 0x77D0, 0xF5E0, 0x77D3, 0xC4EF, 0x77D4, 0xF7EB, 0x77D5, 0xF8B4,
+ 0x77D7, 0xC5F7, 0x77D8, 0xF8F8, 0x77D9, 0xF8F9, 0x77DA, 0xC666,
+ 0x77DB, 0xA5D9, 0x77DC, 0xACE1, 0x77DE, 0xDAC3, 0x77E0, 0xDEE3,
+ 0x77E2, 0xA5DA, 0x77E3, 0xA86F, 0x77E5, 0xAABE, 0x77E7, 0xCFE8,
+ 0x77E8, 0xCFE9, 0x77E9, 0xAF78, 0x77EC, 0xDAC4, 0x77ED, 0xB575,
+ 0x77EE, 0xB847, 0x77EF, 0xC142, 0x77F0, 0xEDA4, 0x77F1, 0xF27C,
+ 0x77F2, 0xF478, 0x77F3, 0xA5DB, 0x77F7, 0xCDA1, 0x77F8, 0xCD7A,
+ 0x77F9, 0xCD7C, 0x77FA, 0xCD7E, 0x77FB, 0xCD7D, 0x77FC, 0xCD7B,
+ 0x77FD, 0xAABF, 0x7802, 0xACE2, 0x7803, 0xCFF2, 0x7805, 0xCFED,
+ 0x7806, 0xCFEA, 0x7809, 0xCFF1, 0x780C, 0xACE4, 0x780D, 0xACE5,
+ 0x780E, 0xCFF0, 0x780F, 0xCFEF, 0x7810, 0xCFEE, 0x7811, 0xCFEB,
+ 0x7812, 0xCFEC, 0x7813, 0xCFF3, 0x7814, 0xACE3, 0x781D, 0xAF7C,
+ 0x781F, 0xAFA4, 0x7820, 0xAFA3, 0x7821, 0xD2E1, 0x7822, 0xD2DB,
+ 0x7823, 0xD2D9, 0x7825, 0xAFA1, 0x7826, 0xD6B9, 0x7827, 0xAF7A,
+ 0x7828, 0xD2DE, 0x7829, 0xD2E2, 0x782A, 0xD2E4, 0x782B, 0xD2E0,
+ 0x782C, 0xD2DA, 0x782D, 0xAFA2, 0x782E, 0xD2DF, 0x782F, 0xD2DD,
+ 0x7830, 0xAF79, 0x7831, 0xD2E5, 0x7832, 0xAFA5, 0x7833, 0xD2E3,
+ 0x7834, 0xAF7D, 0x7835, 0xD2DC, 0x7837, 0xAF7E, 0x7838, 0xAF7B,
+ 0x7843, 0xB2B9, 0x7845, 0xD6BA, 0x7848, 0xD6B3, 0x7849, 0xD6B5,
+ 0x784A, 0xD6B7, 0x784C, 0xD6B8, 0x784D, 0xD6B6, 0x784E, 0xB2BA,
+ 0x7850, 0xD6BB, 0x7852, 0xD6B4, 0x785C, 0xDAC8, 0x785D, 0xB576,
+ 0x785E, 0xDAD0, 0x7860, 0xDAC5, 0x7862, 0xDAD1, 0x7864, 0xDAC6,
+ 0x7865, 0xDAC7, 0x7868, 0xDACF, 0x7869, 0xDACE, 0x786A, 0xDACB,
+ 0x786B, 0xB2B8, 0x786C, 0xB577, 0x786D, 0xDAC9, 0x786E, 0xDACC,
+ 0x786F, 0xB578, 0x7870, 0xDACD, 0x7871, 0xDACA, 0x7879, 0xDEEE,
+ 0x787B, 0xDEF2, 0x787C, 0xB84E, 0x787E, 0xE2F0, 0x787F, 0xB851,
+ 0x7880, 0xDEF0, 0x7881, 0xF9D6, 0x7883, 0xDEED, 0x7884, 0xDEE8,
+ 0x7885, 0xDEEA, 0x7886, 0xDEEB, 0x7887, 0xDEE4, 0x7889, 0xB84D,
+ 0x788C, 0xB84C, 0x788E, 0xB848, 0x788F, 0xDEE7, 0x7891, 0xB84F,
+ 0x7893, 0xB850, 0x7894, 0xDEE6, 0x7895, 0xDEE9, 0x7896, 0xDEF1,
+ 0x7897, 0xB84A, 0x7898, 0xB84B, 0x7899, 0xDEEF, 0x789A, 0xDEE5,
+ 0x789E, 0xE2F2, 0x789F, 0xBAD0, 0x78A0, 0xE2F4, 0x78A1, 0xDEEC,
+ 0x78A2, 0xE2F6, 0x78A3, 0xBAD4, 0x78A4, 0xE2F7, 0x78A5, 0xE2F3,
+ 0x78A7, 0xBAD1, 0x78A8, 0xE2EF, 0x78A9, 0xBAD3, 0x78AA, 0xE2EC,
+ 0x78AB, 0xE2F1, 0x78AC, 0xE2F5, 0x78AD, 0xE2EE, 0x78B0, 0xB849,
+ 0x78B2, 0xE2EB, 0x78B3, 0xBAD2, 0x78B4, 0xE2ED, 0x78BA, 0xBD54,
+ 0x78BB, 0xE6C1, 0x78BC, 0xBD58, 0x78BE, 0xBD56, 0x78C1, 0xBACF,
+ 0x78C3, 0xE6C8, 0x78C4, 0xE6C9, 0x78C5, 0xBD53, 0x78C8, 0xE6C7,
+ 0x78C9, 0xE6CA, 0x78CA, 0xBD55, 0x78CB, 0xBD52, 0x78CC, 0xE6C3,
+ 0x78CD, 0xE6C0, 0x78CE, 0xE6C5, 0x78CF, 0xE6C2, 0x78D0, 0xBD59,
+ 0x78D1, 0xE6C4, 0x78D4, 0xE6C6, 0x78D5, 0xBD57, 0x78DA, 0xBF6A,
+ 0x78DB, 0xEAA8, 0x78DD, 0xEAA2, 0x78DE, 0xEAA6, 0x78DF, 0xEAAC,
+ 0x78E0, 0xEAAD, 0x78E1, 0xEAA9, 0x78E2, 0xEAAA, 0x78E3, 0xEAA7,
+ 0x78E5, 0xEAA4, 0x78E7, 0xBF6C, 0x78E8, 0xBF69, 0x78E9, 0xEAA3,
+ 0x78EA, 0xEAA5, 0x78EC, 0xBF6B, 0x78ED, 0xEAAB, 0x78EF, 0xC146,
+ 0x78F2, 0xEDAA, 0x78F3, 0xEDA5, 0x78F4, 0xC145, 0x78F7, 0xC143,
+ 0x78F9, 0xEDAC, 0x78FA, 0xC144, 0x78FB, 0xEDA8, 0x78FC, 0xEDA9,
+ 0x78FD, 0xEDA6, 0x78FE, 0xEDAD, 0x78FF, 0xF056, 0x7901, 0xC147,
+ 0x7902, 0xEDA7, 0x7904, 0xEDAE, 0x7905, 0xEDAB, 0x7909, 0xF05A,
+ 0x790C, 0xF057, 0x790E, 0xC2A6, 0x7910, 0xF05B, 0x7911, 0xF05D,
+ 0x7912, 0xF05C, 0x7913, 0xF058, 0x7914, 0xF059, 0x7917, 0xF2A3,
+ 0x7919, 0xC3AA, 0x791B, 0xF27E, 0x791C, 0xF2A2, 0x791D, 0xF27D,
+ 0x791E, 0xF2A4, 0x7921, 0xF2A1, 0x7923, 0xF47A, 0x7924, 0xF47D,
+ 0x7925, 0xF479, 0x7926, 0xC471, 0x7927, 0xF47B, 0x7928, 0xF47C,
+ 0x7929, 0xF47E, 0x792A, 0xC472, 0x792B, 0xC474, 0x792C, 0xC473,
+ 0x792D, 0xF5E1, 0x792F, 0xF5E3, 0x7931, 0xF5E2, 0x7935, 0xF6F6,
+ 0x7938, 0xF8B5, 0x7939, 0xF8FA, 0x793A, 0xA5DC, 0x793D, 0xCB72,
+ 0x793E, 0xAAC0, 0x793F, 0xCDA3, 0x7940, 0xAAC1, 0x7941, 0xAAC2,
+ 0x7942, 0xCDA2, 0x7944, 0xCFF8, 0x7945, 0xCFF7, 0x7946, 0xACE6,
+ 0x7947, 0xACE9, 0x7948, 0xACE8, 0x7949, 0xACE7, 0x794A, 0xCFF4,
+ 0x794B, 0xCFF6, 0x794C, 0xCFF5, 0x794F, 0xD2E8, 0x7950, 0xAFA7,
+ 0x7951, 0xD2EC, 0x7952, 0xD2EB, 0x7953, 0xD2EA, 0x7954, 0xD2E6,
+ 0x7955, 0xAFA6, 0x7956, 0xAFAA, 0x7957, 0xAFAD, 0x795A, 0xAFAE,
+ 0x795B, 0xD2E7, 0x795C, 0xD2E9, 0x795D, 0xAFAC, 0x795E, 0xAFAB,
+ 0x795F, 0xAFA9, 0x7960, 0xAFA8, 0x7961, 0xD6C2, 0x7963, 0xD6C0,
+ 0x7964, 0xD6BC, 0x7965, 0xB2BB, 0x7967, 0xD6BD, 0x7968, 0xB2BC,
+ 0x7969, 0xD6BE, 0x796A, 0xD6BF, 0x796B, 0xD6C1, 0x796D, 0xB2BD,
+ 0x7970, 0xDAD5, 0x7972, 0xDAD4, 0x7973, 0xDAD3, 0x7974, 0xDAD2,
+ 0x7979, 0xDEF6, 0x797A, 0xB852, 0x797C, 0xDEF3, 0x797D, 0xDEF5,
+ 0x797F, 0xB853, 0x7981, 0xB854, 0x7982, 0xDEF4, 0x7988, 0xE341,
+ 0x798A, 0xE2F9, 0x798B, 0xE2FA, 0x798D, 0xBAD7, 0x798E, 0xBAD5,
+ 0x798F, 0xBAD6, 0x7990, 0xE343, 0x7992, 0xE342, 0x7993, 0xE2FE,
+ 0x7994, 0xE2FD, 0x7995, 0xE2FC, 0x7996, 0xE2FB, 0x7997, 0xE340,
+ 0x7998, 0xE2F8, 0x799A, 0xE6CB, 0x799B, 0xE6D0, 0x799C, 0xE6CE,
+ 0x79A0, 0xE6CD, 0x79A1, 0xE6CC, 0x79A2, 0xE6CF, 0x79A4, 0xEA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0xC16C, 0x7FFD, 0xF2BE,
+ 0x7FFE, 0xF2BF, 0x7FFF, 0xF4B1, 0x8000, 0xC4A3, 0x8001, 0xA6D1,
+ 0x8003, 0xA6D2, 0x8004, 0xACFE, 0x8005, 0xAACC, 0x8006, 0xAFCF,
+ 0x8007, 0xD051, 0x800B, 0xB5C0, 0x800C, 0xA6D3, 0x800D, 0xAD41,
+ 0x800E, 0xD052, 0x800F, 0xD053, 0x8010, 0xAD40, 0x8011, 0xAD42,
+ 0x8012, 0xA6D4, 0x8014, 0xD054, 0x8015, 0xAFD1, 0x8016, 0xD366,
+ 0x8017, 0xAFD3, 0x8018, 0xAFD0, 0x8019, 0xAFD2, 0x801B, 0xD741,
+ 0x801C, 0xB2E0, 0x801E, 0xD740, 0x801F, 0xD6FE, 0x8021, 0xDF71,
+ 0x8024, 0xE3A1, 0x8026, 0xBDA2, 0x8028, 0xBFAE, 0x8029, 0xEAE6,
+ 0x802A, 0xEAE5, 0x802C, 0xEDE7, 0x8030, 0xF5EF, 0x8033, 0xA6D5,
+ 0x8034, 0xCB73, 0x8035, 0xCDAA, 0x8036, 0xAD43, 0x8037, 0xD055,
+ 0x8039, 0xD368, 0x803D, 0xAFD4, 0x803E, 0xD367, 0x803F, 0xAFD5,
+ 0x8043, 0xD743, 0x8046, 0xB2E2, 0x8047, 0xD742, 0x8048, 0xD744,
+ 0x804A, 0xB2E1, 0x804F, 0xDB46, 0x8050, 0xDB47, 0x8051, 0xDB45,
+ 0x8052, 0xB5C1, 0x8056, 0xB874, 0x8058, 0xB875, 0x805A, 0xBB45,
+ 0x805C, 0xE3A3, 0x805D, 0xE3A2, 0x805E, 0xBB44, 0x8064, 0xE6FB,
+ 0x8067, 0xE6FC, 0x806C, 0xEAE7, 0x806F, 0xC170, 0x8070, 0xC16F,
+ 0x8071, 0xC16D, 0x8072, 0xC16E, 0x8073, 0xC171, 0x8075, 0xF07C,
+ 0x8076, 0xC2BF, 0x8077, 0xC2BE, 0x8078, 0xF2C0, 0x8079, 0xF4B2,
+ 0x807D, 0xC5A5, 0x807E, 0xC5A4, 0x807F, 0xA6D6, 0x8082, 0xD1FB,
+ 0x8084, 0xB877, 0x8085, 0xB5C2, 0x8086, 0xB876, 0x8087, 0xBB46,
+ 0x8089, 0xA6D7, 0x808A, 0xC9A9, 0x808B, 0xA6D8, 0x808C, 0xA6D9,
+ 0x808F, 0xCDAB, 0x8090, 0xCB76, 0x8092, 0xCB77, 0x8093, 0xA877,
+ 0x8095, 0xCB74, 0x8096, 0xA876, 0x8098, 0xA879, 0x8099, 0xCB75,
+ 0x809A, 0xA87B, 0x809B, 0xA87A, 0x809C, 0xCB78, 0x809D, 0xA878,
+ 0x80A1, 0xAAD1, 0x80A2, 0xAACF, 0x80A3, 0xCDAD, 0x80A5, 0xAACE,
+ 0x80A9, 0xAAD3, 0x80AA, 0xAAD5, 0x80AB, 0xAAD2, 0x80AD, 0xCDB0,
+ 0x80AE, 0xCDAC, 0x80AF, 0xAAD6, 0x80B1, 0xAAD0, 0x80B2, 0xA87C,
+ 0x80B4, 0xAAD4, 0x80B5, 0xCDAF, 0x80B8, 0xCDAE, 0x80BA, 0xAACD,
+ 0x80C2, 0xD05B, 0x80C3, 0xAD47, 0x80C4, 0xAD48, 0x80C5, 0xD05D,
+ 0x80C7, 0xD057, 0x80C8, 0xD05A, 0x80C9, 0xD063, 0x80CA, 0xD061,
+ 0x80CC, 0xAD49, 0x80CD, 0xD067, 0x80CE, 0xAD4C, 0x80CF, 0xD064,
+ 0x80D0, 0xD05C, 0x80D1, 0xD059, 0x80D4, 0xDB49, 0x80D5, 0xD062,
+ 0x80D6, 0xAD44, 0x80D7, 0xD065, 0x80D8, 0xD056, 0x80D9, 0xD05F,
+ 0x80DA, 0xAD46, 0x80DB, 0xAD4B, 0x80DC, 0xD060, 0x80DD, 0xAD4F,
+ 0x80DE, 0xAD4D, 0x80E0, 0xD058, 0x80E1, 0xAD4A, 0x80E3, 0xD05E,
+ 0x80E4, 0xAD4E, 0x80E5, 0xAD45, 0x80E6, 0xD066, 0x80ED, 0xAFDA,
+ 0x80EF, 0xAFE3, 0x80F0, 0xAFD8, 0x80F1, 0xAFD6, 0x80F2, 0xD36A,
+ 0x80F3, 0xAFDE, 0x80F4, 0xAFDB, 0x80F5, 0xD36C, 0x80F8, 0xAFDD,
+ 0x80F9, 0xD36B, 0x80FA, 0xD369, 0x80FB, 0xD36E, 0x80FC, 0xAFE2,
+ 0x80FD, 0xAFE0, 0x80FE, 0xDB48, 0x8100, 0xD36F, 0x8101, 0xD36D,
+ 0x8102, 0xAFD7, 0x8105, 0xAFD9, 0x8106, 0xAFDC, 0x8108, 0xAFDF,
+ 0x810A, 0xAFE1, 0x8115, 0xD74E, 0x8116, 0xB2E4, 0x8118, 0xD745,
+ 0x8119, 0xD747, 0x811B, 0xD748, 0x811D, 0xD750, 0x811E, 0xD74C,
+ 0x811F, 0xD74A, 0x8121, 0xD74D, 0x8122, 0xD751, 0x8123, 0xB2E5,
+ 0x8124, 0xB2E9, 0x8125, 0xD746, 0x8127, 0xD74F, 0x8129, 0xB2E7,
+ 0x812B, 0xB2E6, 0x812C, 0xD74B, 0x812D, 0xD749, 0x812F, 0xB2E3,
+ 0x8130, 0xB2E8, 0x8139, 0xB5C8, 0x813A, 0xDB51, 0x813D, 0xDB4F,
+ 0x813E, 0xB5CA, 0x8143, 0xDB4A, 0x8144, 0xDFA1, 0x8146, 0xB5C9,
+ 0x8147, 0xDB4E, 0x814A, 0xDB4B, 0x814B, 0xB5C5, 0x814C, 0xB5CB,
+ 0x814D, 0xDB50, 0x814E, 0xB5C7, 0x814F, 0xDB4D, 0x8150, 0xBB47,
+ 0x8151, 0xB5C6, 0x8152, 0xDB4C, 0x8153, 0xB5CC, 0x8154, 0xB5C4,
+ 0x8155, 0xB5C3, 0x815B, 0xDF77, 0x815C, 0xDF75, 0x815E, 0xDF7B,
+ 0x8160, 0xDF73, 0x8161, 0xDFA2, 0x8162, 0xDF78, 0x8164, 0xDF72,
+ 0x8165, 0xB87B, 0x8166, 0xB8A3, 0x8167, 0xDF7D, 0x8169, 0xDF76,
+ 0x816B, 0xB87E, 0x816E, 0xB87C, 0x816F, 0xDF7E, 0x8170, 0xB879,
+ 0x8171, 0xB878, 0x8172, 0xDF79, 0x8173, 0xB87D, 0x8174, 0xB5CD,
+ 0x8176, 0xDF7C, 0x8177, 0xDF74, 0x8178, 0xB87A, 0x8179, 0xB8A1,
+ 0x817A, 0xB8A2, 0x817F, 0xBB4C, 0x8180, 0xBB48, 0x8182, 0xBB4D,
+ 0x8183, 0xE3A6, 0x8186, 0xE3A5, 0x8187, 0xE3A7, 0x8188, 0xBB4A,
+ 0x8189, 0xE3A4, 0x818A, 0xBB4B, 0x818B, 0xE3AA, 0x818C, 0xE3A9,
+ 0x818D, 0xE3A8, 0x818F, 0xBB49, 0x8195, 0xE741, 0x8197, 0xE744,
+ 0x8198, 0xBDA8, 0x8199, 0xE743, 0x819A, 0xBDA7, 0x819B, 0xBDA3,
+ 0x819C, 0xBDA4, 0x819D, 0xBDA5, 0x819E, 0xE740, 0x819F, 0xE6FE,
+ 0x81A0, 0xBDA6, 0x81A2, 0xE742, 0x81A3, 0xE6FD, 0x81A6, 0xEAE9,
+ 0x81A7, 0xEAF3, 0x81A8, 0xBFB1, 0x81A9, 0xBFB0, 0x81AB, 0xEAED,
+ 0x81AC, 0xEAEF, 0x81AE, 0xEAEA, 0x81B0, 0xEAEE, 0x81B1, 0xEAE8,
+ 0x81B2, 0xEAF1, 0x81B3, 0xBFAF, 0x81B4, 0xEAF0, 0x81B5, 0xEAEC,
+ 0x81B7, 0xEAF2, 0x81B9, 0xEAEB, 0x81BA, 0xC174, 0x81BB, 0xEDE8,
+ 0x81BC, 0xEDEE, 0x81BD, 0xC178, 0x81BE, 0xC17A, 0x81BF, 0xC177,
+ 0x81C0, 0xC176, 0x81C2, 0xC175, 0x81C3, 0xC173, 0x81C4, 0xEDE9,
+ 0x81C5, 0xEDEC, 0x81C6, 0xC172, 0x81C7, 0xEDED, 0x81C9, 0xC179,
+ 0x81CA, 0xEDEB, 0x81CC, 0xEDEA, 0x81CD, 0xC2C0, 0x81CF, 0xC2C1,
+ 0x81D0, 0xF0A1, 0x81D1, 0xF07D, 0x81D2, 0xF07E, 0x81D5, 0xF2C2,
+ 0x81D7, 0xF2C1, 0x81D8, 0xC3BE, 0x81D9, 0xF4B4, 0x81DA, 0xC4A4,
+ 0x81DB, 0xF4B3, 0x81DD, 0xF5F0, 0x81DE, 0xF745, 0x81DF, 0xC5A6,
+ 0x81E0, 0xF943, 0x81E1, 0xF944, 0x81E2, 0xC5D8, 0x81E3, 0xA6DA,
+ 0x81E5, 0xAAD7, 0x81E6, 0xDB52, 0x81E7, 0xBB4E, 0x81E8, 0xC17B,
+ 0x81E9, 0xEDEF, 0x81EA, 0xA6DB, 0x81EC, 0xAFE5, 0x81ED, 0xAFE4,
+ 0x81EE, 0xDB53, 0x81F2, 0xEAF4, 0x81F3, 0xA6DC, 0x81F4, 0xAD50,
+ 0x81F7, 0xDB54, 0x81F8, 0xDB55, 0x81F9, 0xDB56, 0x81FA, 0xBB4F,
+ 0x81FB, 0xBFB2, 0x81FC, 0xA6DD, 0x81FE, 0xAAD8, 0x81FF, 0xD068,
+ 0x8200, 0xAFE6, 0x8201, 0xD370, 0x8202, 0xB2EA, 0x8204, 0xDB57,
+ 0x8205, 0xB8A4, 0x8207, 0xBB50, 0x8208, 0xBFB3, 0x8209, 0xC17C,
+ 0x820A, 0xC2C2, 0x820B, 0xF4B5, 0x820C, 0xA6DE, 0x820D, 0xAAD9,
+ 0x8210, 0xAFE7, 0x8211, 0xD752, 0x8212, 0xB5CE, 0x8214, 0xBB51,
+ 0x8215, 0xE3AB, 0x8216, 0xE745, 0x821B, 0xA6DF, 0x821C, 0xB5CF,
+ 0x821D, 0xDFA3, 0x821E, 0xBB52, 0x821F, 0xA6E0, 0x8220, 0xCDB1,
+ 0x8221, 0xD069, 0x8222, 0xAD51, 0x8225, 0xD372, 0x8228, 0xAFEA,
+ 0x822A, 0xAFE8, 0x822B, 0xAFE9, 0x822C, 0xAFEB, 0x822F, 0xD371,
+ 0x8232, 0xD757, 0x8233, 0xD754, 0x8234, 0xD756, 0x8235, 0xB2EB,
+ 0x8236, 0xB2ED, 0x8237, 0xB2EC, 0x8238, 0xD753, 0x8239, 0xB2EE,
+ 0x823A, 0xD755, 0x823C, 0xDB58, 0x823D, 0xDB59, 0x823F, 0xDB5A,
+ 0x8240, 0xDFA6, 0x8242, 0xDFA7, 0x8244, 0xDFA5, 0x8245, 0xDFA8,
+ 0x8247, 0xB8A5, 0x8249, 0xDFA4, 0x824B, 0xBB53, 0x824E, 0xE74A,
+ 0x824F, 0xE746, 0x8250, 0xE749, 0x8251, 0xE74B, 0x8252, 0xE748,
+ 0x8253, 0xE747, 0x8255, 0xEAF5, 0x8256, 0xEAF6, 0x8257, 0xEAF7,
+ 0x8258, 0xBFB4, 0x8259, 0xBFB5, 0x825A, 0xEDF1, 0x825B, 0xEDF0,
+ 0x825C, 0xEDF2, 0x825E, 0xF0A3, 0x825F, 0xF0A2, 0x8261, 0xF2C4,
+ 0x8263, 0xF2C5, 0x8264, 0xF2C3, 0x8266, 0xC4A5, 0x8268, 0xF4B6,
+ 0x8269, 0xF4B7, 0x826B, 0xF746, 0x826C, 0xF7EF, 0x826D, 0xF8BB,
+ 0x826E, 0xA6E1, 0x826F, 0xA87D, 0x8271, 0xC17D, 0x8272, 0xA6E2,
+ 0x8274, 0xD758, 0x8275, 0xDB5B, 0x8277, 0xC641, 0x8278, 0xCA4A,
+ 0x827C, 0xCA4B, 0x827D, 0xCA4D, 0x827E, 0xA6E3, 0x827F, 0xCA4E,
+ 0x8280, 0xCA4C, 0x8283, 0xCBA2, 0x8284, 0xCBA3, 0x8285, 0xCB7B,
+ 0x828A, 0xCBA1, 0x828B, 0xA8A1, 0x828D, 0xA8A2, 0x828E, 0xCB7C,
+ 0x828F, 0xCB7A, 0x8290, 0xCB79, 0x8291, 0xCB7D, 0x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 0x82F2, 0xD078,
+ 0x82F3, 0xD0A4, 0x82F4, 0xD075, 0x82F5, 0xD079, 0x82F6, 0xD07C,
+ 0x82F9, 0xD06D, 0x82FA, 0xD0A3, 0x82FB, 0xD07B, 0x82FE, 0xD06C,
+ 0x8300, 0xD070, 0x8301, 0xAD5F, 0x8302, 0xAD5A, 0x8303, 0xAD53,
+ 0x8304, 0xAD58, 0x8305, 0xAD54, 0x8306, 0xAD67, 0x8307, 0xD06E,
+ 0x8308, 0xD3A5, 0x8309, 0xAD5B, 0x830C, 0xD07A, 0x830D, 0xCE41,
+ 0x8316, 0xD3A8, 0x8317, 0xAFFA, 0x8319, 0xD376, 0x831B, 0xD3A3,
+ 0x831C, 0xD37D, 0x831E, 0xD3B2, 0x8320, 0xD3AA, 0x8322, 0xD37E,
+ 0x8324, 0xD3A9, 0x8325, 0xD378, 0x8326, 0xD37C, 0x8327, 0xD3B5,
+ 0x8328, 0xAFFD, 0x8329, 0xD3AD, 0x832A, 0xD3A4, 0x832B, 0xAFED,
+ 0x832C, 0xD3B3, 0x832D, 0xD374, 0x832F, 0xD3AC, 0x8331, 0xAFFC,
+ 0x8332, 0xAFF7, 0x8333, 0xD373, 0x8334, 0xAFF5, 0x8335, 0xAFF4,
+ 0x8336, 0xAFF9, 0x8337, 0xD3AB, 0x8338, 0xAFF1, 0x8339, 0xAFF8,
+ 0x833A, 0xD072, 0x833B, 0xDB5C, 0x833C, 0xD3A6, 0x833F, 0xD37A,
+ 0x8340, 0xAFFB, 0x8341, 0xD37B, 0x8342, 0xD3A1, 0x8343, 0xAFFE,
+ 0x8344, 0xD375, 0x8345, 0xD3AF, 0x8347, 0xD3AE, 0x8348, 0xD3B6,
+ 0x8349, 0xAFF3, 0x834A, 0xAFF0, 0x834B, 0xD3B4, 0x834C, 0xD3B0,
+ 0x834D, 0xD3A7, 0x834E, 0xD3A2, 0x834F, 0xAFF6, 0x8350, 0xAFF2,
+ 0x8351, 0xD377, 0x8352, 0xAFEE, 0x8353, 0xD3B1, 0x8354, 0xAFEF,
+ 0x8356, 0xD379, 0x8373, 0xD75E, 0x8374, 0xD760, 0x8375, 0xD765,
+ 0x8376, 0xD779, 0x8377, 0xB2FC, 0x8378, 0xB2F2, 0x837A, 0xD75D,
+ 0x837B, 0xB2FD, 0x837C, 0xB2FE, 0x837D, 0xD768, 0x837E, 0xD76F,
+ 0x837F, 0xD775, 0x8381, 0xD762, 0x8383, 0xD769, 0x8386, 0xB340,
+ 0x8387, 0xD777, 0x8388, 0xD772, 0x8389, 0xB2FA, 0x838A, 0xB2F8,
+ 0x838B, 0xD76E, 0x838C, 0xD76A, 0x838D, 0xD75C, 0x838E, 0xB2EF,
+ 0x838F, 0xD761, 0x8390, 0xD759, 0x8392, 0xB2F7, 0x8393, 0xB2F9,
+ 0x8394, 0xD766, 0x8395, 0xD763, 0x8396, 0xB2F4, 0x8397, 0xD773,
+ 0x8398, 0xB2F1, 0x8399, 0xD764, 0x839A, 0xD77A, 0x839B, 0xD76C,
+ 0x839D, 0xD76B, 0x839E, 0xB2F0, 0x83A0, 0xB2FB, 0x83A2, 0xB2F3,
+ 0x83A3, 0xD75A, 0x83A4, 0xD75F, 0x83A5, 0xD770, 0x83A6, 0xD776,
+ 0x83A7, 0xB341, 0x83A8, 0xD75B, 0x83A9, 0xD767, 0x83AA, 0xD76D,
+ 0x83AB, 0xB2F6, 0x83AE, 0xD778, 0x83AF, 0xD771, 0x83B0, 0xD774,
+ 0x83BD, 0xB2F5, 0x83BF, 0xDB6C, 0x83C0, 0xDB60, 0x83C1, 0xB5D7,
+ 0x83C2, 0xDB7D, 0x83C3, 0xDBA7, 0x83C4, 0xDBAA, 0x83C5, 0xB5D5,
+ 0x83C6, 0xDB68, 0x83C7, 0xDBA3, 0x83C8, 0xDB69, 0x83C9, 0xDB77,
+ 0x83CA, 0xB5E2, 0x83CB, 0xDB73, 0x83CC, 0xB5DF, 0x83CE, 0xDB74,
+ 0x83CF, 0xDB5D, 0x83D1, 0xDBA4, 0x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 0x8435, 0xB8B1, 0x8436, 0xDFD8,
+ 0x8437, 0xDFBF, 0x8438, 0xB5E3, 0x8439, 0xDFCF, 0x843A, 0xDFC0,
+ 0x843B, 0xDFD6, 0x843C, 0xB8B0, 0x843D, 0xB8A8, 0x843F, 0xDFAA,
+ 0x8440, 0xDFB2, 0x8442, 0xDFCB, 0x8443, 0xDFC3, 0x8444, 0xDFDC,
+ 0x8445, 0xDFC6, 0x8446, 0xB8B6, 0x8447, 0xDFD7, 0x8449, 0xB8AD,
+ 0x844B, 0xDFC9, 0x844C, 0xDFD1, 0x844D, 0xDFB6, 0x844E, 0xDFD0,
+ 0x8450, 0xDFE1, 0x8451, 0xDFB1, 0x8452, 0xDFD2, 0x8454, 0xDFDF,
+ 0x8456, 0xDFAB, 0x8457, 0xB5DB, 0x8459, 0xDFB9, 0x845A, 0xDFB8,
+ 0x845B, 0xB8AF, 0x845D, 0xDFBC, 0x845E, 0xDFBE, 0x845F, 0xDFCD,
+ 0x8460, 0xDFDE, 0x8461, 0xB8B2, 0x8463, 0xB8B3, 0x8465, 0xDFB0,
+ 0x8466, 0xB8AB, 0x8467, 0xDFB4, 0x8468, 0xDFDA, 0x8469, 0xB8B4,
+ 0x846B, 0xB8AC, 0x846C, 0xB8AE, 0x846D, 0xB8B5, 0x846E, 0xDFE0,
+ 0x846F, 0xDFD3, 0x8470, 0xDFCE, 0x8473, 0xDFBB, 0x8474, 0xDFBA,
+ 0x8475, 0xB8AA, 0x8476, 0xDFAC, 0x8477, 0xB8A7, 0x8478, 0xDFC4,
+ 0x8479, 0xDFAD, 0x847A, 0xDFC2, 0x847D, 0xDFB7, 0x847E, 0xDFDB,
+ 0x8482, 0xB8A6, 0x8486, 0xDFB3, 0x848D, 0xDFAF, 0x848E, 0xDFD5,
+ 0x848F, 0xDFAE, 0x8490, 0xBB60, 0x8491, 0xE3D3, 0x8494, 0xE3C2,
+ 0x8497, 0xE3AC, 0x8498, 0xE3CA, 0x8499, 0xBB58, 0x849A, 0x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0x84FB, 0xE758,
+ 0x84FC, 0xE764, 0x84FD, 0xE76E, 0x84FE, 0xE769, 0x84FF, 0xBDB6,
+ 0x8500, 0xE74F, 0x8502, 0xE76D, 0x8506, 0xBDB7, 0x8507, 0xDFBD,
+ 0x8508, 0xE75B, 0x8509, 0xE752, 0x850A, 0xE755, 0x850B, 0xE77B,
+ 0x850C, 0xE75C, 0x850D, 0xE753, 0x850E, 0xE751, 0x850F, 0xE74E,
+ 0x8511, 0xBDB0, 0x8512, 0xE765, 0x8513, 0xBDAF, 0x8514, 0xBDB3,
+ 0x8515, 0xE760, 0x8516, 0xE768, 0x8517, 0xBDA9, 0x8518, 0xE778,
+ 0x8519, 0xE77C, 0x851A, 0xBDAB, 0x851C, 0xE757, 0x851D, 0xE76B,
+ 0x851E, 0xE76F, 0x851F, 0xE754, 0x8520, 0xE779, 0x8521, 0xBDB2,
+ 0x8523, 0xBDB1, 0x8524, 0xE74C, 0x8525, 0xBDB5, 0x8526, 0xE772,
+ 0x8527, 0xE756, 0x8528, 0xE76A, 0x8529, 0xE750, 0x852A, 0xE75E,
+ 0x852B, 0xE759, 0x852C, 0xBDAD, 0x852D, 0xBDAE, 0x852E, 0xE76C,
+ 0x852F, 0xE77D, 0x8530, 0xE77A, 0x8531, 0xE771, 0x853B, 0xE74D,
+ 0x853D, 0xBDAA, 0x853E, 0xEB49, 0x8540, 0xEB40, 0x8541, 0xEB43,
+ 0x8543, 0xBFBB, 0x8544, 0xEB45, 0x8545, 0xEAF9, 0x8546, 0xEB41,
+ 0x8547, 0xEB47, 0x8548, 0xBFB8, 0x8549, 0xBFBC, 0x854A, 0xBFB6,
+ 0x854D, 0xEAFB, 0x854E, 0xEB4C, 0x8551, 0xEB46, 0x8553, 0xEAFC,
+ 0x8554, 0xEB55, 0x8555, 0xEB4F, 0x8556, 0xEAF8, 0x8557, 0xEE46,
+ 0x8558, 0xEAFE, 0x8559, 0xBFB7, 0x855B, 0xEB4A, 0x855D, 0xEB54,
+ 0x855E, 0xBFBF, 0x8560, 0xEB51, 0x8561, 0xEAFD, 0x8562, 0xEB44,
+ 0x8563, 0xEB48, 0x8564, 0xEB42, 0x8565, 0xEB56, 0x8566, 0xEB53,
+ 0x8567, 0xEB50, 0x8568, 0xBFB9, 0x8569, 0xBFBA, 0x856A, 0xBFBE,
+ 0x856B, 0xEAFA, 0x856C, 0xEB57, 0x856D, 0xBFBD, 0x856E, 0xEB4D,
+ 0x8571, 0xEB4B, 0x8575, 0xEB4E, 0x8576, 0xEE53, 0x8577, 0xEE40,
+ 0x8578, 0xEE45, 0x8579, 0xEE52, 0x857A, 0xEE44, 0x857B, 0xEDFB,
+ 0x857C, 0xEE41, 0x857E, 0xC1A2, 0x8580, 0xEDF4, 0x8581, 0xEE4D,
+ 0x8582, 0xEE4F, 0x8583, 0xEDF3, 0x8584, 0xC1A1, 0x8585, 0xEE51,
+ 0x8586, 0xEE49, 0x8587, 0xC1A8, 0x8588, 0xEE50, 0x8589, 0xEE42,
+ 0x858A, 0xC1AA, 0x858B, 0xEDF9, 0x858C, 0xEB52, 0x858D, 0xEE4A,
+ 0x858E, 0xEE47, 0x858F, 0xEDF5, 0x8590, 0xEE55, 0x8591, 0xC1A4,
+ 0x8594, 0xC1A5, 0x8595, 0xEDF7, 0x8596, 0xEE48, 0x8598, 0xEE54,
+ 0x8599, 0xEE4B, 0x859A, 0xEDFD, 0x859B, 0xC1A7, 0x859C, 0xC1A3,
+ 0x859D, 0xEE4C, 0x859E, 0xEDFE, 0x859F, 0xEE56, 0x85A0, 0xEDF8,
+ 0x85A1, 0xEE43, 0x85A2, 0xEE4E, 0x85A3, 0xEDFA, 0x85A4, 0xEDFC,
+ 0x85A6, 0xC2CB, 0x85A7, 0xEDF6, 0x85A8, 0xC1A9, 0x85A9, 0xC2C4,
+ 0x85AA, 0xC17E, 0x85AF, 0xC1A6, 0x85B0, 0xC2C8, 0x85B1, 0xF0B3,
+ 0x85B3, 0xF0A9, 0x85B4, 0xF0A4, 0x85B5, 0x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 0x860A, 0xC4AD, 0x860B, 0xC4AB, 0x860C, 0xF4C2, 0x8611, 0xC4A8,
+ 0x8617, 0xC4F4, 0x8618, 0xF5F1, 0x8619, 0xF5F7, 0x861A, 0xC4F6,
+ 0x861B, 0xF4BC, 0x861C, 0xF5F6, 0x861E, 0xF5FD, 0x861F, 0xF5F4,
+ 0x8620, 0xF5FB, 0x8621, 0xF5FA, 0x8622, 0xF4B8, 0x8623, 0xF5F5,
+ 0x8624, 0xF0B6, 0x8625, 0xF5FE, 0x8626, 0xF5F3, 0x8627, 0xF5F8,
+ 0x8629, 0xF5FC, 0x862A, 0xF5F2, 0x862C, 0xF74A, 0x862D, 0xC4F5,
+ 0x862E, 0xF5F9, 0x8631, 0xF7F4, 0x8632, 0xF74B, 0x8633, 0xF749,
+ 0x8634, 0xF747, 0x8635, 0xF748, 0x8636, 0xF74C, 0x8638, 0xC5D9,
+ 0x8639, 0xF7F2, 0x863A, 0xF7F0, 0x863B, 0xF7F5, 0x863C, 0xF7F3,
+ 0x863E, 0xF7F6, 0x863F, 0xC5DA, 0x8640, 0xF7F1, 0x8643, 0xF8BC,
+ 0x8646, 0xF945, 0x8647, 0xF946, 0x8648, 0xF947, 0x864B, 0xF9C7,
+ 0x864C, 0xF9BD, 0x864D, 0xCA4F, 0x864E, 0xAAEA, 0x8650, 0xAD68,
+ 0x8652, 0xD3B8, 0x8653, 0xD3B7, 0x8654, 0xB040, 0x8655, 0xB342,
+ 0x8656, 0xD77C, 0x8659, 0xD77B, 0x865B, 0xB5EA, 0x865C, 0xB8B8,
+ 0x865E, 0xB8B7, 0x865F, 0xB8B9, 0x8661, 0xE3D4, 0x8662, 0xE77E,
+ 0x8663, 0xEB58, 0x8664, 0xEB5A, 0x8665, 0xEB59, 0x8667, 0xC1AB,
+ 0x8668, 0xEE57, 0x8669, 0xF0BA, 0x866A, 0xF9A5, 0x866B, 0xA6E4,
+ 0x866D, 0xCDC9, 0x866E, 0xCDCA, 0x866F, 0xCDC8, 0x8670, 0xCDC7,
+ 0x8671, 0xAAEB, 0x8673, 0xD0A9, 0x8674, 0xD0A7, 0x8677, 0xD0A6,
+ 0x8679, 0xAD69, 0x867A, 0xAD6B, 0x867B, 0xAD6A, 0x867C, 0xD0A8,
+ 0x8685, 0xD3C4, 0x8686, 0xD3C1, 0x8687, 0xD3BF, 0x868A, 0xB041,
+ 0x868B, 0xD3C2, 0x868C, 0xB046, 0x868D, 0xD3BC, 0x868E, 0xD3CB,
+ 0x8690, 0xD3CD, 0x8691, 0xD3BD, 0x8693, 0xB043, 0x8694, 0xD3CE,
+ 0x8695, 0xD3C9, 0x8696, 0xD3BB, 0x8697, 0xD3C0, 0x8698, 0xD3CA,
+ 0x8699, 0xD3C6, 0x869A, 0xD3C3, 0x869C, 0xB048, 0x869D, 0xD3CC,
+ 0x869E, 0xD3BE, 0x86A1, 0xD3C7, 0x86A2, 0xD3B9, 0x86A3, 0xB047,
+ 0x86A4, 0xB044, 0x86A5, 0xD3C5, 0x86A7, 0xD3C8, 0x86A8, 0xD3BA,
+ 0x86A9, 0xB045, 0x86AA, 0xB042, 0x86AF, 0xB34C, 0x86B0, 0xD7A5,
+ 0x86B1, 0xB34B, 0x86B3, 0xD7A8, 0x86B4, 0xD7AB, 0x86B5, 0xB348,
+ 0x86B6, 0xB346, 0x86B7, 0xD77E, 0x86B8, 0xD7A9, 0x86B9, 0xD7A7,
+ 0x86BA, 0xD7A4, 0x86BB, 0xD7AC, 0x86BC, 0xD7AD, 0x86BD, 0xD7AF,
+ 0x86BE, 0xD7B0, 0x86BF, 0xD77D, 0x86C0, 0xB345, 0x86C1, 0xD7A2,
+ 0x86C2, 0xD7A1, 0x86C3, 0xD7AE, 0x86C4, 0xB347, 0x86C5, 0xD7A3,
+ 0x86C6, 0xB349, 0x86C7, 0xB344, 0x86C8, 0xD7A6, 0x86C9, 0xB34D,
+ 0x86CB, 0xB34A, 0x86CC, 0xD7AA, 0x86D0, 0xB5F1, 0x86D1, 0xDBBF,
+ 0x86D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 0x8730, 0xE3F3, 0x8731, 0xE3EB, 0x8732, 0xE3E5, 0x8733, 0xE3D5,
+ 0x8734, 0xBB69, 0x8735, 0xE3EC, 0x8737, 0xBB6C, 0x8738, 0xE3F0,
+ 0x873A, 0xE3EA, 0x873B, 0xBB66, 0x873C, 0xE3E8, 0x873E, 0xE3E2,
+ 0x873F, 0xBB64, 0x8740, 0xE3D9, 0x8741, 0xE3E1, 0x8742, 0xE3ED,
+ 0x8743, 0xE3DF, 0x8746, 0xE3E3, 0x874C, 0xBDC1, 0x874D, 0xDFE9,
+ 0x874E, 0xE7B2, 0x874F, 0xE7BB, 0x8750, 0xE7B1, 0x8751, 0xE7AD,
+ 0x8752, 0xE7AA, 0x8753, 0xBDC2, 0x8754, 0xE7A8, 0x8755, 0xBB6B,
+ 0x8756, 0xE7A1, 0x8757, 0xBDC0, 0x8758, 0xE7A7, 0x8759, 0xBDBF,
+ 0x875A, 0xE7AC, 0x875B, 0xE7A9, 0x875C, 0xE7B9, 0x875D, 0xE7B4,
+ 0x875E, 0xE7AE, 0x875F, 0xE7B3, 0x8760, 0xBDBB, 0x8761, 0xE7AB,
+ 0x8762, 0xE7BE, 0x8763, 0xE7A2, 0x8764, 0xE7A3, 0x8765, 0xE7BA,
+ 0x8766, 0xBDBC, 0x8767, 0xE7BF, 0x8768, 0xBDBE, 0x8769, 0xE7C0,
+ 0x876A, 0xE7B0, 0x876B, 0xE3D8, 0x876C, 0xE7B6, 0x876D, 0xE7AF,
+ 0x876E, 0xE7B8, 0x876F, 0xE7B5, 0x8773, 0xE7A6, 0x8774, 0xBDB9,
+ 0x8775, 0xE7BD, 0x8776, 0xBDBA, 0x8777, 0xE7A4, 0x8778, 0xBDBD,
+ 0x8779, 0xEB64, 0x877A, 0xE7B7, 0x877B, 0xE7BC, 0x8781, 0xEB61,
+ 0x8782, 0xBDB8, 0x8783, 0xBFC0, 0x8784, 0xEB6B, 0x8785, 0xEB67,
+ 0x8787, 0xEB65, 0x8788, 0xEB60, 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E3, 0xF0CA, 0x87E4, 0xF0C4, 0x87E5, 0xF0C1,
+ 0x87E6, 0xF0BC, 0x87E7, 0xF0BB, 0x87E8, 0xF0D0, 0x87EA, 0xF0C0,
+ 0x87EB, 0xF0BF, 0x87EC, 0xC2CD, 0x87ED, 0xF0C8, 0x87EF, 0xC2CC,
+ 0x87F2, 0xC2CE, 0x87F3, 0xF0C3, 0x87F4, 0xF0CF, 0x87F6, 0xF2DE,
+ 0x87F7, 0xF2DF, 0x87F9, 0xC3C9, 0x87FA, 0xF2DC, 0x87FB, 0xC3C6,
+ 0x87FC, 0xF2E4, 0x87FE, 0xC3CA, 0x87FF, 0xF2E6, 0x8800, 0xF2DB,
+ 0x8801, 0xF0CE, 0x8802, 0xF2E8, 0x8803, 0xF2DD, 0x8805, 0xC3C7,
+ 0x8806, 0xF2E3, 0x8808, 0xF2E5, 0x8809, 0xF2E0, 0x880A, 0xF2E7,
+ 0x880B, 0xF2E2, 0x880C, 0xF2E1, 0x880D, 0xC3C8, 0x8810, 0xF4C5,
+ 0x8811, 0xF4C6, 0x8813, 0xF4C8, 0x8814, 0xC4AE, 0x8815, 0xC4AF,
+ 0x8816, 0xF4C9, 0x8817, 0xF4C7, 0x8819, 0xF4C4, 0x881B, 0xF642,
+ 0x881C, 0xF645, 0x881D, 0xF641, 0x881F, 0xC4FA, 0x8820, 0xF643,
+ 0x8821, 0xC4F9, 0x8822, 0xC4F8, 0x8823, 0xC4F7, 0x8824, 0xF644,
+ 0x8825, 0xF751, 0x8826, 0xF74F, 0x8828, 0xF74E, 0x8829, 0xF640,
+ 0x882A, 0xF750, 0x882B, 0xF646, 0x882C, 0xF74D, 0x882E, 0xF7F9,
+ 0x882F, 0xF7D7, 0x8830, 0xF7F7, 0x8831, 0xC5DB, 0x8832, 0xF7F8,
+ 0x8833, 0xF7FA, 0x8835, 0xF8BF, 0x8836, 0xC5FA, 0x8837, 0xF8BE,
+ 0x8838, 0xF8BD, 0x8839, 0xC5FB, 0x883B, 0xC65A, 0x883C, 0xF96E,
+ 0x883D, 0xF9A7, 0x883E, 0xF9A6, 0x883F, 0xF9A8, 0x8840, 0xA6E5,
+ 0x8841, 0xD0AA, 0x8843, 0xD3CF, 0x8844, 0xD3D0, 0x8848, 0xDBC0,
+ 0x884A, 0xF647, 0x884B, 0xF8C0, 0x884C, 0xA6E6, 0x884D, 0xAD6C,
+ 0x884E, 0xD0AB, 0x8852, 0xD7B1, 0x8853, 0xB34E, 0x8855, 0xDBC2,
+ 0x8856, 0xDBC1, 0x8857, 0xB5F3, 0x8859, 0xB8C5, 0x885A, 0xE7C1,
+ 0x885B, 0xBDC3, 0x885D, 0xBDC4, 0x8861, 0xBFC5, 0x8862, 0xC5FC,
+ 0x8863, 0xA6E7, 0x8867, 0xD0AC, 0x8868, 0xAAED, 0x8869, 0xD0AE,
+ 0x886A, 0xD0AD, 0x886B, 0xAD6D, 0x886D, 0xD3D1, 0x886F, 0xD3D8,
+ 0x8870, 0xB049, 0x8871, 0xD3D6, 0x8872, 0xD3D4, 0x8874, 0xD3DB,
+ 0x8875, 0xD3D2, 0x8876, 0xD3D3, 0x8877, 0xB04A, 0x8879, 0xB04E,
+ 0x887C, 0xD3DC, 0x887D, 0xB04D, 0x887E, 0xD3DA, 0x887F, 0xD3D7,
+ 0x8880, 0xD3D5, 0x8881, 0xB04B, 0x8882, 0xB04C, 0x8883, 0xD3D9,
+ 0x8888, 0xB350, 0x8889, 0xD7B2, 0x888B, 0xB355, 0x888C, 0xD7C2,
+ 0x888D, 0xB354, 0x888E, 0xD7C4, 0x8891, 0xD7B8, 0x8892, 0xB352,
+ 0x8893, 0xD7C3, 0x8895, 0xD7B3, 0x8896, 0xB353, 0x8897, 0xD7BF,
+ 0x8898, 0xD7BB, 0x8899, 0xD7BD, 0x889A, 0xD7B7, 0x889B, 0xD7BE,
+ 0x889E, 0xB34F, 0x889F, 0xD7BA, 0x88A1, 0xD7B9, 0x88A2, 0xD7B5,
+ 0x88A4, 0xD7C0, 0x88A7,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,
+ 0x890B, 0xE7C5, 0x890C, 0xE7C3, 0x890E, 0xE7CC, 0x8910, 0xBDC5,
+ 0x8911, 0xE7CB, 0x8912, 0xBDC7, 0x8913, 0xBDC8, 0x8914, 0xE7C4,
+ 0x8915, 0xBDC9, 0x8916, 0xE7CA, 0x8917, 0xE7C6, 0x8918, 0xE7C7,
+ 0x8919, 0xE7C8, 0x891A, 0xBB75, 0x891E, 0xEB70, 0x891F, 0xEB7C,
+ 0x8921, 0xBFCA, 0x8922, 0xEB77, 0x8923, 0xEB79, 0x8925, 0xBFC8,
+ 0x8926, 0xEB71, 0x8927, 0xEB75, 0x8929, 0xEB78, 0x892A, 0xBFC6,
+ 0x892B, 0xBFC9, 0x892C, 0xEB7B, 0x892D, 0xEB73, 0x892E, 0xEB74,
+ 0x892F, 0xEB7A, 0x8930, 0xEB72, 0x8931, 0xEB76, 0x8932, 0xBFC7,
+ 0x8933, 0xEE72, 0x8935, 0xEE71, 0x8936, 0xC1B7, 0x8937, 0xEE77,
+ 0x8938, 0xC1B9, 0x893B, 0xC1B6, 0x893C, 0xEE73, 0x893D, 0xC1BA,
+ 0x893E, 0xEE74, 0x8941, 0xEE75, 0x8942, 0xEE78, 0x8944, 0xC1B8,
+ 0x8946, 0xF0D6, 0x8949, 0xF0D9, 0x894B, 0xF0D3, 0x894C, 0xF0D5,
+ 0x894F, 0xF0D4, 0x8950, 0xF0D7, 0x8951, 0xF0D8, 0x8952, 0xEE76,
+ 0x8953, 0xF0D2, 0x8956, 0xC3CD, 0x8957, 0xF2EC, 0x8958, 0xF2EF,
+ 0x8959, 0xF2F1, 0x895A, 0xF2EA, 0x895B, 0xF2EB, 0x895C, 0xF2EE,
+ 0x895D, 0xF2F0, 0x895E, 0xC3CE, 0x895F, 0xC3CC, 0x8960, 0xC3CB,
+ 0x8961, 0xF2ED, 0x8962, 0xF2E9, 0x8963, 0xF4CA, 0x8964, 0xC4B0,
+ 0x8966, 0xF4CB, 0x8969, 0xF649, 0x896A, 0xC4FB, 0x896B, 0xF64B,
+ 0x896C, 0xC4FC, 0x896D, 0xF648, 0x896E, 0xF64A, 0x896F, 0xC5A8,
+ 0x8971, 0xF752, 0x8972, 0xC5A7, 0x8973, 0xF7FD, 0x8974, 0xF7FC,
+ 0x8976, 0xF7FB, 0x8979, 0xF948, 0x897A, 0xF949, 0x897B, 0xF94B,
+ 0x897C, 0xF94A, 0x897E, 0xCA50, 0x897F, 0xA6E8, 0x8981, 0xAD6E,
+ 0x8982, 0xD7C5, 0x8983, 0xB5F7, 0x8985, 0xDFFA, 0x8986, 0xC2D0,
+ 0x8988, 0xF2F2, 0x898B, 0xA8A3, 0x898F, 0xB357, 0x8993, 0xB356,
+ 0x8995, 0xDBD0, 0x8996, 0xB5F8, 0x8997, 0xDBD2, 0x8998, 0xDBD1,
+ 0x899B, 0xDFFB, 0x899C, 0xB8D0, 0x899D, 0xE443, 0x899E, 0xE446,
+ 0x899F, 0xE445, 0x89A1, 0xE444, 0x89A2, 0xE7CE, 0x89A3, 0xE7D0,
+ 0x89A4, 0xE7CF, 0x89A6, 0xBFCC, 0x89AA, 0xBFCB, 0x89AC, 0xC1BB,
+ 0x89AD, 0xEE79, 0x89AE, 0xEE7B, 0x89AF, 0xEE7A, 0x89B2, 0xC2D1,
+ 0x89B6, 0xF2F4, 0x89B7, 0xF2F3, 0x89B9, 0xF4CC, 0x89BA, 0xC4B1,
+ 0x89BD, 0xC4FD, 0x89BE, 0xF754, 0x89BF, 0xF753, 0x89C0, 0xC65B,
+ 0x89D2, 0xA8A4, 0x89D3, 0xD0AF, 0x89D4, 0xAD6F, 0x89D5, 0xD7C8,
+ 0x89D6, 0xD7C6, 0x89D9, 0xD7C7, 0x89DA, 0xDBD4, 0x89DB, 0xDBD5,
+ 0x89DC, 0xE043, 0x89DD, 0xDBD3, 0x89DF, 0xDFFC, 0x89E0, 0xE041,
+ 0x89E1, 0xE040, 0x89E2, 0xE042, 0x89E3, 0xB8D1, 0x89E4, 0xDFFE,
+ 0x89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B069, 0x8FFB, 0xD3EE,
+ 0x8FFC, 0xD3F0, 0x8FFD, 0xB06C, 0x8FFE, 0xD3EA, 0x8FFF, 0xD3ED,
+ 0x9000, 0xB068, 0x9001, 0xB065, 0x9002, 0xD3EC, 0x9003, 0xB06B,
+ 0x9004, 0xD3EF, 0x9005, 0xB06D, 0x9006, 0xB066, 0x900B, 0xD7E3,
+ 0x900C, 0xD7E6, 0x900D, 0xB370, 0x900F, 0xB37A, 0x9010, 0xB376,
+ 0x9011, 0xD7E4, 0x9014, 0xB37E, 0x9015, 0xB377, 0x9016, 0xB37C,
+ 0x9017, 0xB372, 0x9019, 0xB36F, 0x901A, 0xB371, 0x901B, 0xB37D,
+ 0x901C, 0xD7E5, 0x901D, 0xB375, 0x901E, 0xB378, 0x901F, 0xB374,
+ 0x9020, 0xB379, 0x9021, 0xD7E7, 0x9022, 0xB37B, 0x9023, 0xB373,
+ 0x9024, 0xD7E2, 0x902D, 0xDC4D, 0x902E, 0xB665, 0x902F, 0xDC4F,
+ 0x9031, 0xB667, 0x9032, 0xB669, 0x9034, 0xDC4E, 0x9035, 0xB666,
+ 0x9036, 0xB66A, 0x9038, 0xB668, 0x903C, 0xB947, 0x903D, 0xE0A3,
+ 0x903E, 0xB94F, 0x903F, 0xE07E, 0x9041, 0xB950, 0x9042, 0xB945,
+ 0x9044, 0xE0A1, 0x9047, 0xB94A, 0x9049, 0xE0A2, 0x904A, 0xB943,
+ 0x904B, 0xB942, 0x904D, 0xB94D, 0x904E, 0xB94C, 0x904F, 0xB94B,
+ 0x9050, 0xB949, 0x9051, 0xB94E, 0x9052, 0xE07D, 0x9053, 0xB944,
+ 0x9054, 0xB946, 0x9055, 0xB948, 0x9058, 0xBBB8, 0x9059, 0xBBBB,
+ 0x905B, 0xBBBF, 0x905C, 0xBBB9, 0x905D, 0xBBBE, 0x905E, 0xBBBC,
+ 0x9060, 0xBBB7, 0x9062, 0xBBBD, 0x9063, 0xBBBA, 0x9067, 0xE852,
+ 0x9068, 0xBE43, 0x9069, 0xBE41, 0x906B, 0xE853, 0x906D, 0xBE44,
+ 0x906E, 0xBE42, 0x906F, 0xE851, 0x9070, 0xE850, 0x9072, 0xBFF0,
+ 0x9073, 0xE84F, 0x9074, 0xBFEE, 0x9075, 0xBFED, 0x9076, 0xEBD0,
+ 0x9077, 0xBE45, 0x9078, 0xBFEF, 0x9079, 0xEBD1, 0x907A, 0xBFF2,
+ 0x907B, 0xEBD2, 0x907C, 0xBFF1, 0x907D, 0xC1D8, 0x907E, 0xEEC3,
+ 0x907F, 0xC1D7, 0x9080, 0xC1DC, 0x9081, 0xC1DA, 0x9082, 0xC1DB,
+ 0x9083, 0xC2E3, 0x9084, 0xC1D9, 0x9085, 0xEEC2, 0x9086, 0xEBD3,
+ 0x9087, 0xC2E2, 0x9088, 0xC2E4, 0x908A, 0xC3E4, 0x908B, 0xC3E5,
+ 0x908D, 0xF4E0, 0x908F, 0xC5DE, 0x9090, 0xC5DD, 0x9091, 0xA8B6,
+ 0x9094, 0xCA55, 0x9095, 0xB06F, 0x9097, 0xCA52, 0x9098, 0xCA53,
+ 0x9099, 0xCA51, 0x909B, 0xCA54, 0x909E, 0xCBAA, 0x909F, 0xCBA7,
+ 0x90A0, 0xCBAC, 0x90A1, 0xCBA8, 0x90A2, 0xA8B7, 0x90A3, 0xA8BA,
+ 0x90A5, 0xCBA9, 0x90A6, 0xA8B9, 0x90A7, 0xCBAB, 0x90AA, 0xA8B8,
+ 0x90AF, 0xCDD5, 0x90B0, 0xCDD7, 0x90B1, 0xAAF4, 0x90B2, 0xCDD3,
+ 0x90B3, 0xCDD6, 0x90B4, 0xCDD4, 0x90B5, 0xAAF2, 0x90B6, 0xAAF5,
+ 0x90B8, 0xAAF3, 0x90BD, 0xD0B8, 0x90BE, 0xD0BC, 0x90BF, 0xD0B9,
+ 0x90C1, 0xADA7, 0x90C3, 0xADA8, 0x90C5, 0xD0BB, 0x90C7, 0xD0BD,
+ 0x90C8, 0xD0BF, 0x90CA, 0xADA5, 0x90CB, 0xD0BE, 0x90CE, 0xADA6,
+ 0x90D4, 0xD7EE, 0x90D5, 0xD0BA, 0x90D6, 0xD3F2, 0x90D7, 0xD3FB,
+ 0x90D8, 0xD3F9, 0x90D9, 0xD3F4, 0x90DA, 0xD3F5, 0x90DB, 0xD3FA,
+ 0x90DC, 0xD3FC, 0x90DD, 0xB071, 0x90DF, 0xD3F7, 0x90E0, 0xD3F3,
+ 0x90E1, 0xB070, 0x90E2, 0xB072, 0x90E3, 0xD3F6, 0x90E4, 0xD3FD,
+ 0x90E5, 0xD3F8, 0x90E8, 0xB3A1, 0x90E9, 0xD7F1, 0x90EA, 0xD7E9,
+ 0x90EB, 0xD7EF, 0x90EC, 0xD7F0, 0x90ED, 0xB3A2, 0x90EF, 0xD7E8,
+ 0x90F0, 0xD7EA, 0x90F1, 0xD0B7, 0x90F2, 0xD7EC, 0x90F3, 0xD7ED,
+ 0x90F4, 0xD7EB, 0x90F5, 0xB66C, 0x90F9, 0xDC56, 0x90FA, 0xEBD4,
+ 0x90FB, 0xDC57, 0x90FC, 0xDC54, 0x90FD, 0xB3A3, 0x90FE, 0xB66E,
+ 0x90FF, 0xDC53, 0x9100, 0xDC59, 0x9101, 0xDC58, 0x9102, 0xB66B,
+ 0x9103, 0xDC5C, 0x9104, 0xDC52, 0x9105, 0xDC5B, 0x9106, 0xDC50,
+ 0x9107, 0xDC5A, 0x9108, 0xDC55, 0x9109, 0xB66D, 0x910B, 0xE0AA,
+ 0x910D, 0xE0A5, 0x910E, 0xE0AB, 0x910F, 0xE0A6, 0x9110, 0xE0A4,
+ 0x9111, 0xE0A7, 0x9112, 0xB951, 0x9114, 0xE0A9, 0x9116, 0xE0A8,
+ 0x9117, 0xB952, 0x9118, 0xBBC1, 0x9119, 0xBBC0, 0x911A, 0xE46E,
+ 0x911B, 0xE471, 0x911C, 0xE469, 0x911D, 0xE46D, 0x911E, 0xBBC2,
+ 0x911F, 0xE46C, 0x9120, 0xE46A, 0x9121, 0xE470, 0x9122, 0xE46B,
+ 0x9123, 0xE468, 0x9124, 0xE46F, 0x9126, 0xE859, 0x9127, 0xBE48,
+ 0x9128, 0xF14A, 0x9129, 0xE856, 0x912A, 0xE857, 0x912B, 0xE855,
+ 0x912C, 0xDC51, 0x912D, 0xBE47, 0x912E, 0xE85A, 0x912F, 0xE854,
+ 0x9130, 0xBE46, 0x9131, 0xBE49, 0x9132, 0xE858, 0x9133, 0xEBD5,
+ 0x9134, 0xBFF3, 0x9135, 0xEBD6, 0x9136, 0xEBD7, 0x9138, 0xEEC4,
+ 0x9139, 0xC1DD, 0x913A, 0xF14B, 0x913B, 0xF14C, 0x913E, 0xF14D,
+ 0x913F, 0xF35D, 0x9140, 0xF35C, 0x9141, 0xF4E2, 0x9143, 0xF4E1,
+ 0x9144, 0xF65B, 0x9145, 0xF65C, 0x9146, 0xF65A, 0x9147, 0xF766,
+ 0x9148, 0xC5B0, 0x9149, 0xA8BB, 0x914A, 0xADAA, 0x914B, 0xADA9,
+ 0x914C, 0xB075, 0x914D, 0xB074, 0x914E, 0xD440, 0x914F, 0xD441,
+ 0x9150, 0xD3FE, 0x9152, 0xB073, 0x9153, 0xD7F5, 0x9155, 0xD7F6,
+ 0x9156, 0xD7F2, 0x9157, 0xB3A4, 0x9158, 0xD7F3, 0x915A, 0xD7F4,
+ 0x915F, 0xDC5F, 0x9160, 0xDC61, 0x9161, 0xDC5D, 0x9162, 0xDC60,
+ 0x9163, 0xB66F, 0x9164, 0xDC5E, 0x9165, 0xB670, 0x9168, 0xDD73,
+ 0x9169, 0xB955, 0x916A, 0xB954, 0x916C, 0xB953, 0x916E, 0xE0AC,
+ 0x916F, 0xE0AD, 0x9172, 0xE473, 0x9173, 0xE475, 0x9174, 0xBBC6,
+ 0x9175, 0xBBC3, 0x9177, 0xBBC5, 0x9178, 0xBBC4, 0x9179, 0xE474,
+ 0x917A, 0xE472, 0x9180, 0xE861, 0x9181, 0xE85E, 0x9182, 0xE85F,
+ 0x9183, 0xBE4D, 0x9184, 0xE860, 0x9185, 0xE85B, 0x9186, 0xE85C,
+ 0x9187, 0xBE4A, 0x9189, 0xBE4B, 0x918A, 0xE85D, 0x918B, 0xBE4C,
+ 0x918D, 0xEBDB, 0x918F, 0xEBDC, 0x9190, 0xEBD9, 0x9191, 0xEBDA,
+ 0x9192, 0xBFF4, 0x9193, 0xEBD8, 0x9199, 0xEEC8, 0x919A, 0xEEC5,
+ 0x919B, 0xEEC7, 0x919C, 0xC1E0, 0x919D, 0xEECB, 0x919E, 0xC1DF,
+ 0x919F, 0xEEC9, 0x91A0, 0xEECC, 0x91A1, 0xEECA, 0x91A2, 0xEEC6,
+ 0x91A3, 0xC1DE, 0x91A5, 0xF14F, 0x91A7, 0xF150, 0x91A8, 0xF14E,
+ 0x91AA, 0xF152, 0x91AB, 0xC2E5, 0x91AC, 0xC2E6, 0x91AD, 0xF35F,
+ 0x91AE, 0xC3E7, 0x91AF, 0xF151, 0x91B0, 0xF35E, 0x91B1, 0xC3E6,
+ 0x91B2, 0xF4E5, 0x91B3, 0xF4E6, 0x91B4, 0xC4BF, 0x91B5, 0xF4E4,
+ 0x91B7, 0xF4E3, 0x91B9, 0xF65D, 0x91BA, 0xC548, 0x91BC, 0xF849,
+ 0x91BD, 0xF8C8, 0x91BE, 0xF8C7, 0x91C0, 0xC643, 0x91C1, 0xC65D,
+ 0x91C2, 0xF8C9, 0x91C3, 0xF971, 0x91C5, 0xC66F, 0x91C6, 0xA8BC,
+ 0x91C7, 0xAAF6, 0x91C9, 0xB956, 0x91CB, 0xC4C0, 0x91CC, 0xA8BD,
+ 0x91CD, 0xADAB, 0x91CE, 0xB3A5, 0x91CF, 0xB671, 0x91D0, 0xC2E7,
+ 0x91D1, 0xAAF7, 0x91D3, 0xD0C1, 0x91D4, 0xD0C0, 0x91D5, 0xD442,
+ 0x91D7, 0xB078, 0x91D8, 0xB076, 0x91D9, 0xB07A, 0x91DA, 0xD444,
+ 0x91DC, 0xB079, 0x91DD, 0xB077, 0x91E2, 0xD443, 0x91E3, 0xB3A8,
+ 0x91E4, 0xD7FC, 0x91E6, 0xB3A7, 0x91E7, 0xB3A9, 0x91E8, 0xD842,
+ 0x91E9, 0xB3AB, 0x91EA, 0xD7FE, 0x91EB, 0xD840, 0x91EC, 0xD7F7,
+ 0x91ED, 0xB3AA, 0x91EE, 0xD843, 0x91F1, 0xD7F9, 0x91F3, 0xD7FA,
+ 0x91F4, 0xD7F8, 0x91F5, 0xB3A6, 0x91F7, 0xD841, 0x91F8, 0xD7FB,
+ 0x91F9, 0xD7FD, 0x91FD, 0xDC6D, 0x91FF, 0xDC6C, 0x9200, 0xDC6A,
+ 0x9201, 0xDC62, 0x9202, 0xDC71, 0x9203, 0xDC65, 0x9204, 0xDC6F,
+ 0x9205, 0xDC76, 0x9206, 0xDC6E, 0x9207, 0xB679, 0x9209, 0xB675,
+ 0x920A, 0xDC63, 0x920C, 0xDC69, 0x920D, 0xB677, 0x920F, 0xDC68,
+ 0x9210, 0xB678, 0x9211, 0xB67A, 0x9212, 0xDC6B, 0x9214, 0xB672,
+ 0x9215, 0xB673, 0x9216, 0xDC77, 0x9217, 0xDC75, 0x9219, 0xDC74,
+ 0x921A, 0xDC66, 0x921C, 0xDC72, 0x921E, 0xB676, 0x9223, 0xB674,
+ 0x9224, 0xDC73, 0x9225, 0xDC64, 0x9226, 0xDC67, 0x9227, 0xDC70,
+ 0x922D, 0xE4BA, 0x922E, 0xE0B7, 0x9230, 0xE0B0, 0x9231, 0xE0C3,
+ 0x9232, 0xE0CC, 0x9233, 0xE0B3, 0x9234, 0xB961, 0x9236, 0xE0C0,
+ 0x9237, 0xB957, 0x9238, 0xB959, 0x9239, 0xB965, 0x923A, 0xE0B1,
+ 0x923D, 0xB95A, 0x923E, 0xB95C, 0x923F, 0xB966, 0x9240, 0xB95B,
+ 0x9245, 0xB964, 0x9246, 0xE0B9, 0x9248, 0xE0AE, 0x9249, 0xB962,
+ 0x924A, 0xE0B8, 0x924B, 0xB95E, 0x924C, 0xE0CA, 0x924D, 0xB963,
+ 0x924E, 0xE0C8, 0x924F, 0xE0BC, 0x9250, 0xE0C6, 0x9251, 0xB960,
+ 0x9252, 0xE0AF, 0x9253, 0xE0C9, 0x9254, 0xE0C4, 0x9256, 0xE0CB,
+ 0x9257, 0xB958, 0x925A, 0xB967, 0x925B, 0xB95D, 0x925E, 0xE0B5,
+ 0x9260, 0xE0BD, 0x9261, 0xE0C1, 0x9263, 0xE0C5, 0x9264, 0xB95F,
+ 0x9265, 0xE0B4, 0x9266, 0xE0B2, 0x9267, 0xE0BE, 0x926C, 0xE0BB,
+ 0x926D, 0xE0BA, 0x926F, 0xE0BF, 0x9270, 0xE0C2, 0x9272, 0xE0C7,
+ 0x9276, 0xE478, 0x9278, 0xBBC7, 0x9279, 0xE4A4, 0x927A, 0xE47A,
+ 0x927B, 0xBBCC, 0x927C, 0xBBD0, 0x927D, 0xE4AD, 0x927E, 0xE4B5,
+ 0x927F, 0xE4A6, 0x9280, 0xBBC8, 0x9282, 0xE4AA, 0x9283, 0xE0B6,
+ 0x9285, 0xBBC9, 0x9286, 0xE4B1, 0x9287, 0xE4B6, 0x9288, 0xE4AE,
+ 0x928A, 0xE4B0, 0x928B, 0xE4B9, 0x928C, 0xE4B2, 0x928D, 0xE47E,
+ 0x928E, 0xE4A9, 0x9291, 0xBBD1, 0x9293, 0xBBCD, 0x9294, 0xE47C,
+ 0x9295, 0xE4AB, 0x9296, 0xBBCB, 0x9297, 0xE4A5, 0x9298, 0xBBCA,
+ 0x9299, 0xE4B3, 0x929A, 0xE4A2, 0x929B, 0xE479, 0x929C, 0xBBCE,
+ 0x929D, 0xE4B8, 0x92A0, 0xE47B, 0x92A1, 0xE4AF, 0x92A2, 0xE4AC,
+ 0x92A3, 0xE4A7, 0x92A4, 0xE477, 0x92A5, 0xE476, 0x92A6, 0xE4A1,
+ 0x92A7, 0xE4B4, 0x92A8, 0xBBCF, 0x92A9, 0xE4B7, 0x92AA, 0xE47D,
+ 0x92AB, 0xE4A3, 0x92AC, 0xBE52, 0x92B2, 0xBE5A, 0x92B3, 0xBE55,
+ 0x92B4, 0xE8A4, 0x92B5, 0xE8A1, 0x92B6, 0xE867, 0x92B7, 0xBE50,
+ 0x92B9, 0xF9D7, 0x92BB, 0xBE4F, 0x92BC, 0xBE56, 0x92C0, 0xE865,
+ 0x92C1, 0xBE54, 0x92C2, 0xE871, 0x92C3, 0xE863, 0x92C4, 0xE864,
+ 0x92C5, 0xBE4E, 0x92C6, 0xE8A3, 0x92C7, 0xBE58, 0x92C8, 0xE874,
+ 0x92C9, 0xE879, 0x92CA, 0xE873, 0x92CB, 0xEBEE, 0x92CC, 0xE86F,
+ 0x92CD, 0xE877, 0x92CE, 0xE875, 0x92CF, 0xE868, 0x92D0, 0xE862,
+ 0x92D1, 0xE87D, 0x92D2, 0xBE57, 0x92D3, 0xE87E, 0x92D5, 0xE878,
+ 0x92D7, 0xE86D, 0x92D8, 0xE86B, 0x92D9, 0xE866, 0x92DD, 0xE86E,
+ 0x92DE, 0xE87B, 0x92DF, 0xE86A, 0x92E0, 0xE87A, 0x92E1, 0xE8A2,
+ 0x92E4, 0xBE53, 0x92E6, 0xE876, 0x92E7, 0xE87C, 0x92E8, 0xE872,
+ 0x92E9, 0xE86C, 0x92EA, 0xBE51, 0x92EE, 0xE4A8, 0x92EF, 0xE870,
+ 0x92F0, 0xBE59, 0x92F1, 0xE869, 0x92F7, 0xEBF4, 0x92F8, 0xBFF7,
+ 0x92F9, 0xEBF3, 0x92FA, 0xEBF0, 0x92FB, 0xEC44, 0x92FC, 0xBFFB,
+ 0x92FE, 0xEC41, 0x92FF, 0xEBF8, 0x9300, 0xEC43, 0x9301, 0xEBE9,
+ 0x9302, 0xEBF6, 0x9304, 0xBFFD, 0x9306, 0xEBE1, 0x9308, 0xEBDF,
+ 0x9309, 0xEC42, 0x930B, 0xEC40, 0x930C, 0xEBFE, 0x930D, 0xEBED,
+ 0x930E, 0xEBEC, 0x930F, 0xEBE2, 0x9310, 0xC040, 0x9312, 0xEBE8,
+ 0x9313, 0xEBF2, 0x9314, 0xEBFD, 0x9315, 0xC043, 0x9316, 0xEC45,
+ 0x9318, 0xC1E8, 0x9319, 0xC045, 0x931A, 0xBFFE, 0x931B, 0xEBE6,
+ 0x931D, 0xEBEF, 0x931E, 0xEBDE, 0x931F, 0xEBE0, 0x9320, 0xBFF5,
+ 0x9321, 0xC042, 0x9322, 0xBFFA, 0x9323, 0xEBE7, 0x9324, 0xEBF7,
+ 0x9325, 0xEBF1, 0x9326, 0xC041, 0x9327, 0xEBDD, 0x9328, 0xC1E3,
+ 0x9329, 0xEBF9, 0x932A, 0xEBFC, 0x932B, 0xBFFC, 0x932D, 0xEBEB,
+ 0x932E, 0xC044, 0x932F, 0xBFF9, 0x9333, 0xBFF8, 0x9334, 0xEBF5,
+ 0x9335, 0xEBFB, 0x9336, 0xBFF6, 0x9338, 0xEBE4, 0x9339, 0xEBFA,
+ 0x933C, 0xEBE5, 0x9346, 0xEBEA, 0x9347, 0xEED2, 0x9349, 0xEED7,
+ 0x934A, 0xC1E5, 0x934B, 0xC1E7, 0x934C, 0xEEDD, 0x934D, 0xC1E1,
+ 0x934E, 0xEEEC, 0x934F, 0xEEE3, 0x9350, 0xEED8, 0x9351, 0xEED9,
+ 0x9352, 0xEEE2, 0x9354, 0xC1EE, 0x9355, 0xEEE1, 0x9356, 0xEED1,
+ 0x9357, 0xEEE0, 0x9358, 0xEED4, 0x9359, 0xEEED, 0x935A, 0xC1ED,
+ 0x935B, 0xC1EB, 0x935C, 0xEED5, 0x935E, 0xEEE8, 0x9360, 0xEEDA,
+ 0x9361, 0xEEE7, 0x9363, 0xEEE9, 0x9364, 0xEED0, 0x9365, 0xC1E6,
+ 0x9367, 0xEEEA, 0x936A, 0xEEDE, 0x936C, 0xC1EA, 0x936D, 0xEEDB,
+ 0x9370, 0xC1EC, 0x9371, 0xEEE4, 0x9375, 0xC1E4, 0x9376, 0xEED6,
+ 0x9377, 0xEEE5, 0x9379, 0xEEDF, 0x937A, 0xEBE3, 0x937B, 0xEEE6,
+ 0x937C, 0xEED3, 0x937E, 0xC1E9, 0x9380, 0xEEEB, 0x9382, 0xC1E2,
+ 0x9383, 0xEECE, 0x9388, 0xF160, 0x9389, 0xF159, 0x938A, 0xC2E9,
+ 0x938C, 0xF154, 0x938D, 0xF163, 0x938E, 0xF15B, 0x938F, 0xEEDC,
+ 0x9391, 0xF165, 0x9392, 0xF155, 0x9394, 0xC2E8, 0x9395, 0xF15F,
+ 0x9396, 0xC2EA, 0x9397, 0xC2F2, 0x9398, 0xC2F0, 0x9399, 0xF161,
+ 0x939A, 0xC2F1, 0x939B, 0xF157, 0x939D, 0xF158, 0x939E, 0xF15D,
+ 0x939F, 0xF162, 0x93A1, 0xEECD, 0x93A2, 0xC2EB, 0x93A3, 0xF16A,
+ 0x93A4, 0xF167, 0x93A5, 0xF16B, 0x93A6, 0xF15E, 0x93A7, 0xF15A,
+ 0x93A8, 0xF168, 0x93A9, 0xF36A, 0x93AA, 0xF15C, 0x93AC, 0xC2EE,
+ 0x93AE, 0xC2ED, 0x93AF, 0xEECF, 0x93B0, 0xC2EF, 0x93B1, 0xF164,
+ 0x93B2, 0xF166, 0x93B3, 0xC2EC, 0x93B4, 0xF169, 0x93B5, 0xF153,
+ 0x93B7, 0xF156, 0x93C0, 0xF373, 0x93C2, 0xF363, 0x93C3, 0xC3EB,
+ 0x93C4, 0xF371, 0x93C7, 0xF361, 0x93C8, 0xC3EC, 0x93CA, 0xF36C,
+ 0x93CC, 0xF368, 0x93CD, 0xC3F1, 0x93CE, 0xF372, 0x93CF, 0xF362,
+ 0x93D0, 0xF365, 0x93D1, 0xC3E9, 0x93D2, 0xF374, 0x93D4, 0xF36D,
+ 0x93D5, 0xF370, 0x93D6, 0xC3EF, 0x93D7, 0xC3F4, 0x93D8, 0xC3F2,
+ 0x93D9, 0xF369, 0x93DA, 0xF364, 0x93DC, 0xC3ED, 0x93DD, 0xC3EE,
+ 0x93DE, 0xF360, 0x93DF, 0xC3EA, 0x93E1, 0xC3E8, 0x93E2, 0xC3F0,
+ 0x93E3, 0xF36F, 0x93E4, 0xC3F3, 0x93E6, 0xF36B, 0x93E7, 0xF375,
+ 0x93E8, 0xC3F5, 0x93EC, 0xF367, 0x93EE, 0xF36E, 0x93F5, 0xF4F3,
+ 0x93F6, 0xF542, 0x93F7, 0xF4F5, 0x93F8, 0xF4FC, 0x93F9, 0xF366,
+ 0x93FA, 0xF4FA, 0x93FB, 0xF4E9, 0x93FC, 0xF540, 0x93FD, 0xC4C3,
+ 0x93FE, 0xF4ED, 0x93FF, 0xF4FE, 0x9400, 0xF4F4, 0x9403, 0xC4C2,
+ 0x9406, 0xF544, 0x9407, 0xF4F6, 0x9409, 0xF4FB, 0x940A, 0xF4FD,
+ 0x940B, 0xF4E7, 0x940C, 0xF541, 0x940D, 0xF4F2, 0x940E, 0xF4F7,
+ 0x940F, 0xF4EB, 0x9410, 0xF4EF, 0x9411, 0xF543, 0x9412, 0xF4F9,
+ 0x9413, 0xF4E8, 0x9414, 0xF4EC, 0x9415, 0xF4EE, 0x9416, 0xF4F8,
+ 0x9418, 0xC4C1, 0x9419, 0xF4F1, 0x9420, 0xF4EA, 0x9428, 0xF4F0,
+ 0x9429, 0xF661, 0x942A, 0xF666, 0x942B, 0xC54F, 0x942C, 0xF668,
+ 0x942E, 0xC549, 0x9430, 0xF664, 0x9431, 0xF66A, 0x9432, 0xC54E,
+ 0x9433, 0xC54A, 0x9435, 0xC54B, 0x9436, 0xF660, 0x9437, 0xF667,
+ 0x9438, 0xC54D, 0x9439, 0xF665, 0x943A, 0xC54C, 0x943B, 0xF65F,
+ 0x943C, 0xF663, 0x943D, 0xF662, 0x943F, 0xF65E, 0x9440, 0xF669,
+ 0x9444, 0xC5B1, 0x9445, 0xF76D, 0x9446, 0xF770, 0x9447, 0xF76C,
+ 0x9448, 0xF76E, 0x9449, 0xF76F, 0x944A, 0xF769, 0x944B, 0xF76A,
+ 0x944C, 0xF767, 0x944F, 0xF76B, 0x9450, 0xF768, 0x9451, 0xC5B2,
+ 0x9452, 0xC5B3, 0x9455, 0xF84B, 0x9457, 0xF84D, 0x945D, 0xF84C,
+ 0x945E, 0xF84E, 0x9460, 0xC5E0, 0x9462, 0xF84A, 0x9463, 0xC5DF,
+ 0x9464, 0xC5E1, 0x9468, 0xF8CB, 0x9469, 0xF8CC, 0x946A, 0xC644,
+ 0x946B, 0xF8CA, 0x946D, 0xF953, 0x946E, 0xF952, 0x946F, 0xF954,
+ 0x9470, 0xC65F, 0x9471, 0xF955, 0x9472, 0xC65E, 0x9473, 0xF956,
+ 0x9474, 0xF972, 0x9475, 0xF975, 0x9476, 0xF974, 0x9477, 0xC668,
+ 0x9478, 0xF973, 0x947C, 0xC672, 0x947D, 0xC670, 0x947E, 0xC671,
+ 0x947F, 0xC677, 0x9480, 0xF9C0, 0x9481, 0xF9C1, 0x9482, 0xF9BF,
+ 0x9483, 0xF9C9, 0x9577, 0xAAF8, 0x957A, 0xD844, 0x957B, 0xDC78,
+ 0x957C, 0xE8A5, 0x957D, 0xF376, 0x9580, 0xAAF9, 0x9582, 0xADAC,
+ 0x9583, 0xB07B, 0x9586, 0xD845, 0x9588, 0xD846, 0x9589, 0xB3AC,
+ 0x958B, 0xB67D, 0x958C, 0xDC7A, 0x958D, 0xDC79, 0x958E, 0xB6A3,
+ 0x958F, 0xB67C, 0x9590, 0xDC7B, 0x9591, 0xB67E, 0x9592, 0xB6A2,
+ 0x9593, 0xB6A1, 0x9594, 0xB67B, 0x9598, 0xB968, 0x959B, 0xE0D0,
+ 0x959C, 0xE0CE, 0x959E, 0xE0CF, 0x959F, 0xE0CD, 0x95A1, 0xBBD2,
+ 0x95A3, 0xBBD5, 0x95A4, 0xBBD7, 0x95A5, 0xBBD6, 0x95A8, 0xBBD3,
+ 0x95A9, 0xBBD4, 0x95AB, 0xE8A7, 0x95AC, 0xE8A6, 0x95AD, 0xBE5B,
+ 0x95AE, 0xE8A8, 0x95B0, 0xE8A9, 0x95B1, 0xBE5C, 0x95B5, 0xEC4D,
+ 0x95B6, 0xEC4B, 0x95B7, 0xEEF3, 0x95B9, 0xEC49, 0x95BA, 0xEC4A,
+ 0x95BB, 0xC046, 0x95BC, 0xEC46, 0x95BD, 0xEC4E, 0x95BE, 0xEC48,
+ 0x95BF, 0xEC4C, 0x95C0, 0xEEEF, 0x95C3, 0xEEF1, 0x95C5, 0xEEF2,
+ 0x95C6, 0xC1F3, 0x95C7, 0xEEEE, 0x95C8, 0xC1F2, 0x95C9, 0xEEF0,
+ 0x95CA, 0xC1EF, 0x95CB, 0xC1F0, 0x95CC, 0xC1F1, 0x95CD, 0xEC47,
+ 0x95D0, 0xC2F5, 0x95D1, 0xF16E, 0x95D2, 0xF16C, 0x95D3, 0xF16D,
+ 0x95D4, 0xC2F3, 0x95D5, 0xC2F6, 0x95D6, 0xC2F4, 0x95DA, 0xF377,
+ 0x95DB, 0xF378, 0x95DC, 0xC3F6, 0x95DE, 0xF545, 0x95DF, 0xF547,
+ 0x95E0, 0xF546, 0x95E1, 0xC4C4, 0x95E2, 0xC550, 0x95E3, 0xF66D,
+ 0x95E4, 0xF66C, 0x95E5, 0xF66B, 0x961C, 0xAAFA, 0x961E, 0xC9AA,
+ 0x9620, 0xCA58, 0x9621, 0xA6E9, 0x9622, 0xCA56, 0x9623, 0xCA59,
+ 0x9624, 0xCA57, 0x9628, 0xCBAE, 0x962A, 0xA8C1, 0x962C, 0xA8C2,
+ 0x962D, 0xCBB0, 0x962E, 0xA8BF, 0x962F, 0xCBAF, 0x9630, 0xCBAD,
+ 0x9631, 0xA8C0, 0x9632, 0xA8BE, 0x9639, 0xCDD8, 0x963A, 0xCDDB,
+ 0x963B, 0xAAFD, 0x963C, 0xCDDA, 0x963D, 0xCDD9, 0x963F, 0xAAFC,
+ 0x9640, 0xAAFB, 0x9642, 0xAB40, 0x9643, 0xCDDC, 0x9644, 0xAAFE,
+ 0x964A, 0xD0C6, 0x964B, 0xADAE, 0x964C, 0xADAF, 0x964D, 0xADB0,
+ 0x964E, 0xD0C7, 0x964F, 0xD0C3, 0x9650, 0xADAD, 0x9651, 0xD0C4,
+ 0x9653, 0xD0C5, 0x9654, 0xD0C2, 0x9658, 0xB0A4, 0x965B, 0xB0A1,
+ 0x965C, 0xD445, 0x965D, 0xB0A2, 0x965E, 0xB0A5, 0x965F, 0xD446,
+ 0x9661, 0xB07E, 0x9662, 0xB07C, 0x9663, 0xB07D, 0x9664, 0xB0A3,
+ 0x966A, 0xB3AD, 0x966B, 0xD849, 0x966C, 0xB3B5, 0x966D, 0xD848,
+ 0x966F, 0xD84B, 0x9670, 0xB3B1, 0x9671, 0xD84A, 0x9672, 0xB6AB,
+ 0x9673, 0xB3AF, 0x9674, 0xB3B2, 0x9675, 0xB3AE, 0x9676, 0xB3B3,
+ 0x9677, 0xB3B4, 0x9678, 0xB3B0, 0x967C, 0xD847, 0x967D, 0xB6A7,
+ 0x967E, 0xDC7D, 0x9680, 0xDCA3, 0x9683, 0xDCA2, 0x9684, 0xB6AC,
+ 0x9685, 0xB6A8, 0x9686, 0xB6A9, 0x9687, 0xDC7C, 0x9688, 0xDC7E,
+ 0x9689, 0xDCA1, 0x968A, 0xB6A4, 0x968B, 0xB6A6, 0x968D, 0xB6AA,
+ 0x968E, 0xB6A5, 0x9691, 0xE0D3, 0x9692, 0xE0D1, 0x9693, 0xE0D2,
+ 0x9694, 0xB96A, 0x9695, 0xB96B, 0x9697, 0xE0D4, 0x9698, 0xB969,
+ 0x9699, 0xBBD8, 0x969B, 0xBBDA, 0x969C, 0xBBD9, 0x969E, 0xE4BB,
+ 0x96A1, 0xE4BC, 0x96A2, 0xE8AB, 0x96A4, 0xE8AA, 0x96A7, 0xC047,
+ 0x96A8, 0xC048, 0x96A9, 0xEC4F, 0x96AA, 0xC049, 0x96AC, 0xEEF6,
+ 0x96AE, 0xEEF4, 0x96B0, 0xEEF5, 0x96B1, 0xC1F4, 0x96B3, 0xF16F,
+ 0x96B4, 0xC3F7, 0x96B8, 0xC1F5, 0x96B9, 0xAB41, 0x96BB, 0xB0A6,
+ 0x96BC, 0xD447, 0x96BF, 0xD84C, 0x96C0, 0xB3B6, 0x96C1, 0xB6AD,
+ 0x96C2, 0xDCA4, 0x96C3, 0xDCA6, 0x96C4, 0xB6AF, 0x96C5, 0xB6AE,
+ 0x96C6, 0xB6B0, 0x96C7, 0xB6B1, 0x96C8, 0xDCA5, 0x96C9, 0xB96E,
+ 0x96CA, 0xB96F, 0x96CB, 0xB96D, 0x96CC, 0xBBDB, 0x96CD, 0xB96C,
+ 0x96CE, 0xE0D5, 0x96D2, 0xBBDC, 0x96D3, 0xE8AC, 0x96D4, 0xEC50,
+ 0x96D5, 0xC04A, 0x96D6, 0xC1F6, 0x96D7, 0xF170, 0x96D8, 0xF174,
+ 0x96D9, 0xC2F9, 0x96DA, 0xF171, 0x96DB, 0xC2FA, 0x96DC, 0xC2F8,
+ 0x96DD, 0xF175, 0x96DE, 0xC2FB, 0x96DF, 0xF173, 0x96E1, 0xF379,
+ 0x96E2, 0xC2F7, 0x96E3, 0xC3F8, 0x96E5, 0xF8CD, 0x96E8, 0xAB42,
+ 0x96E9, 0xB3B8, 0x96EA, 0xB3B7, 0x96EF, 0xB6B2, 0x96F0, 0xDCA8,
+ 0x96F1, 0xDCA7, 0x96F2, 0xB6B3, 0x96F5, 0xE0D9, 0x96F6, 0xB973,
+ 0x96F7, 0xB970, 0x96F8, 0xE0D8, 0x96F9, 0xB972, 0x96FA, 0xE0D6,
+ 0x96FB, 0xB971, 0x96FD, 0xE0D7, 0x96FF, 0xE4BD, 0x9700, 0xBBDD,
+ 0x9702, 0xE8AF, 0x9704, 0xBE5D, 0x9705, 0xE8AD, 0x9706, 0xBE5E,
+ 0x9707, 0xBE5F, 0x9708, 0xE8AE, 0x9709, 0xBE60, 0x970B, 0xEC51,
+ 0x970D, 0xC04E, 0x970E, 0xC04B, 0x970F, 0xC050, 0x9710, 0xEC53,
+ 0x9711, 0xC04C, 0x9712, 0xEC52, 0x9713, 0xC04F, 0x9716, 0xC04D,
+ 0x9718, 0xEEF9, 0x9719, 0xEEFB, 0x971C, 0xC1F7, 0x971D, 0xEEFA,
+ 0x971E, 0xC1F8, 0x971F, 0xEEF8, 0x9720, 0xEEF7, 0x9722, 0xF177,
+ 0x9723, 0xF176, 0x9724, 0xC2FC, 0x9725, 0xF178, 0x9726, 0xF37E,
+ 0x9727, 0xC3FA, 0x9728, 0xF37D, 0x9729, 0xF37A, 0x972A, 0xC3F9,
+ 0x972B, 0xF37B, 0x972C, 0xF37C, 0x972E, 0xF548, 0x972F, 0xF549,
+ 0x9730, 0xC4C5, 0x9732, 0xC553, 0x9735, 0xF66E, 0x9738, 0xC551,
+ 0x9739, 0xC552, 0x973A, 0xF66F, 0x973D, 0xC5B4, 0x973E, 0xC5B5,
+ 0x973F, 0xF771, 0x9742, 0xC645, 0x9743, 0xF8CF, 0x9744, 0xC647,
+ 0x9746, 0xF8CE, 0x9747, 0xF8D0, 0x9748, 0xC646, 0x9749, 0xF957,
+ 0x974B, 0xF9AD, 0x9752, 0xAB43, 0x9756, 0xB974, 0x9758, 0xE4BE,
+ 0x975A, 0xE8B0, 0x975B, 0xC051, 0x975C, 0xC052, 0x975E, 0xAB44,
+ 0x9760, 0xBE61, 0x9761, 0xC3FB, 0x9762, 0xADB1, 0x9766, 0xC053,
+ 0x9768, 0xC5E2, 0x9769, 0xADB2, 0x976A, 0xD84D, 0x976C, 0xDCA9,
+ 0x976E, 0xDCAB, 0x9770, 0xDCAA, 0x9772, 0xE0DD, 0x9773, 0xE0DA,
+ 0x9774, 0xB975, 0x9776, 0xB976, 0x9777, 0xE0DB, 0x9778, 0xE0DC,
+ 0x977A, 0xE4C0, 0x977B, 0xE4C5, 0x977C, 0xBBDE, 0x977D, 0xE4BF,
+ 0x977E, 0xE4C1, 0x977F, 0xE4C8, 0x9780, 0xE4C3, 0x9781, 0xE4C7,
+ 0x9782, 0xE4C4, 0x9783, 0xE4C2, 0x9784, 0xE4C6, 0x9785, 0xBBDF,
+ 0x9788, 0xE8B3, 0x978A, 0xE8B1, 0x978B, 0xBE63, 0x978D, 0xBE62,
+ 0x978E, 0xE8B2, 0x978F, 0xBE64, 0x9794, 0xEC56, 0x9797, 0xEC55,
+ 0x9798, 0xC054, 0x9799, 0xEC54, 0x979A, 0xEEFC, 0x979C, 0xEEFE,
+ 0x979D, 0xEF41, 0x979E, 0xEF40, 0x97A0, 0xC1F9, 0x97A1, 0xEEFD,
+ 0x97A2, 0xF1A1, 0x97A3, 0xC2FD, 0x97A4, 0xF17D, 0x97A5, 0xF1A2,
+ 0x97A6, 0xC2FE, 0x97A8, 0xF17B, 0x97AA, 0xF17E, 0x97AB, 0xF17C,
+ 0x97AC, 0xF179, 0x97AD, 0xC340, 0x97AE, 0xF17A, 0x97B3, 0xF3A1,
+ 0x97B6, 0xF3A3, 0x97B7, 0xF3A2, 0x97B9, 0xF54A, 0x97BB, 0xF54B,
+ 0x97BF, 0xF670, 0x97C1, 0xC5B7, 0x97C3, 0xC5B6, 0x97C4, 0xF84F,
+ 0x97C5, 0xF850, 0x97C6, 0xC648, 0x97C7, 0xF8D1, 0x97C9, 0xC669,
+ 0x97CB, 0xADB3, 0x97CC, 0xB6B4, 0x97CD, 0xE4CA, 0x97CE, 0xE4C9,
+ 0x97CF, 0xE8B5, 0x97D0, 0xE8B4, 0x97D3, 0xC1FA, 0x97D4, 0xEF43,
+ 0x97D5, 0xEF42, 0x97D6, 0xF1A5, 0x97D7, 0xF1A3, 0x97D8, 0xF1A6,
+ 0x97D9, 0xF1A4, 0x97DC, 0xC3FC, 0x97DD, 0xF3A4, 0x97DE, 0xF3A5,
+ 0x97DF, 0xF3A6, 0x97E1, 0xF671, 0x97E3, 0xF772, 0x97E5, 0xF8D2,
+ 0x97ED, 0xADB4, 0x97F0, 0xEC57, 0x97F1, 0xEF44, 0x97F3, 0xADB5,
+ 0x97F6, 0xBBE0, 0x97F8, 0xEC58, 0x97F9, 0xC341, 0x97FA, 0xF1A7,
+ 0x97FB, 0xC3FD, 0x97FD, 0xF54C, 0x97FE, 0xF54D, 0x97FF, 0xC554,
+ 0x9800, 0xF851, 0x9801, 0xADB6, 0x9802, 0xB3BB, 0x9803, 0xB3BC,
+ 0x9804, 0xD84E, 0x9805, 0xB6B5, 0x9806, 0xB6B6, 0x9807, 0xDCAC,
+ 0x9808, 0xB6B7, 0x980A, 0xB97A, 0x980C, 0xB97C, 0x980D, 0xE0DF,
+ 0x980E, 0xE0E0, 0x980F, 0xE0DE, 0x9810, 0xB977, 0x9811, 0xB978,
+ 0x9812, 0xB97B, 0x9813, 0xB979, 0x9816, 0xE4CB, 0x9817, 0xBBE1,
+ 0x9818, 0xBBE2, 0x981B, 0xE8BC, 0x981C, 0xBE67, 0x981D, 0xE8B7,
+ 0x981E, 0xE8B6, 0x9820, 0xE8BB, 0x9821, 0xBE65, 0x9824, 0xC05B,
+ 0x9826, 0xE8B8, 0x9827, 0xE8BD, 0x9828, 0xE8BA, 0x9829, 0xE8B9,
+ 0x982B, 0xBE66, 0x982D, 0xC059, 0x982F, 0xEC5A, 0x9830, 0xC055,
+ 0x9832, 0xEC5B, 0x9835, 0xEC59, 0x9837, 0xC058, 0x9838, 0xC056,
+ 0x9839, 0xC05A, 0x983B, 0xC057, 0x9841, 0xEF45, 0x9843, 0xEF4A,
+ 0x9844, 0xEF46, 0x9845, 0xEF49, 0x9846, 0xC1FB, 0x9848, 0xEDD4,
+ 0x9849, 0xEF48, 0x984A, 0xEF47, 0x984C, 0xC344, 0x984D, 0xC342,
+ 0x984E, 0xC345, 0x984F, 0xC343, 0x9850, 0xF1A8, 0x9851, 0xF1A9,
+ 0x9852, 0xF1AA, 0x9853, 0xC346, 0x9857, 0xF3AA, 0x9858, 0xC440,
+ 0x9859, 0xF3A8, 0x985B, 0xC441, 0x985C, 0xF3A7, 0x985D, 0xF3A9,
+ 0x985E, 0xC3FE, 0x985F, 0xF551, 0x9860, 0xF54E, 0x9862, 0xF54F,
+ 0x9863, 0xF550, 0x9864, 0xF672, 0x9865, 0xC556, 0x9867, 0xC555,
+ 0x9869, 0xF774, 0x986A, 0xF773, 0x986B, 0xC5B8, 0x986F, 0xC5E3,
+ 0x9870, 0xC649, 0x9871, 0xC660, 0x9872, 0xF958, 0x9873, 0xF9AE,
+ 0x9874, 0xF9AF, 0x98A8, 0xADB7, 0x98A9, 0xDCAD, 0x98AC, 0xE0E1,
+ 0x98AD, 0xE4CC, 0x98AE, 0xE4CD, 0x98AF, 0xBBE3, 0x98B1, 0xBBE4,
+ 0x98B2, 0xE8BE, 0x98B3, 0xBE68, 0x98B6, 0xC1FC, 0x98B8, 0xF1AB,
+ 0x98BA, 0xC347, 0x98BB, 0xF3AD, 0x98BC, 0xC442, 0x98BD, 0xF3AC,
+ 0x98BE, 0xF3AE, 0x98BF, 0xF3AB, 0x98C0, 0xF675, 0x98C1, 0xF552,
+ 0x98C2, 0xF553, 0x98C4, 0xC4C6, 0x98C6, 0xF674, 0x98C9, 0xF673,
+ 0x98CB, 0xF775, 0x98CC, 0xF9B0, 0x98DB, 0xADB8, 0x98DF, 0xADB9,
+ 0x98E2, 0xB0A7, 0x98E3, 0xD448, 0x98E5, 0xD84F, 0x98E7, 0xB6B8,
+ 0x98E9, 0xB6BB, 0x98EA, 0xB6B9, 0x98EB, 0xDCAE, 0x98ED, 0xB6BD,
+ 0x98EF, 0xB6BA, 0x98F2, 0xB6BC, 0x98F4, 0xB97E, 0x98F6, 0xE0E2,
+ 0x98F9, 0xE0E3, 0x98FA, 0xE8C0, 0x98FC, 0xB97D, 0x98FD, 0xB9A1,
+ 0x98FE, 0xB9A2, 0x9900, 0xE4CF, 0x9902, 0xE4CE, 0x9903, 0xBBE5,
+ 0x9905, 0xBBE6, 0x9907, 0xE4D0, 0x9908, 0xE8BF, 0x9909, 0xBBE8,
+ 0x990A, 0xBE69, 0x990C, 0xBBE7, 0x9910, 0xC05C, 0x9911, 0xE8C1,
+ 0x9912, 0xBE6B, 0x9913, 0xBE6A, 0x9914, 0xE8C2, 0x9915, 0xE8C5,
+ 0x9916, 0xE8C3, 0x9917, 0xE8C4, 0x9918, 0xBE6C, 0x991A, 0xC061,
+ 0x991B, 0xC05F, 0x991E, 0xC05E, 0x991F, 0xEC5D, 0x9921, 0xC060,
+ 0x9924, 0xEC5C, 0x9925, 0xEF4B, 0x9927, 0xEC5E, 0x9928, 0xC05D,
+ 0x9929, 0xEC5F, 0x992A, 0xEF4E, 0x992B, 0xEF4C, 0x992C, 0xEF4D,
+ 0x992D, 0xEF52, 0x992E, 0xC34B, 0x992F, 0xEF51, 0x9930, 0xEF54,
+ 0x9931, 0xEF53, 0x9932, 0xEF50, 0x9933, 0xEF4F, 0x9935, 0xC1FD,
+ 0x993A, 0xF1AE, 0x993C, 0xF1AD, 0x993D, 0xC34A, 0x993E, 0xC348,
+ 0x993F, 0xC349, 0x9941, 0xF1AC, 0x9943, 0xF3B1, 0x9945, 0xC443,
+ 0x9947, 0xF3B0, 0x9948, 0xF3AF, 0x9949, 0xC444, 0x994B, 0xF558,
+ 0x994C, 0xF557, 0x994E, 0xF555, 0x9950, 0xF554, 0x9951, 0xC4C8,
+ 0x9952, 0xC4C7, 0x9953, 0xF559, 0x9954, 0xF776, 0x9955, 0xC5B9,
+ 0x9956, 0xF677, 0x9957, 0xC557, 0x9958, 0xF676, 0x9959, 0xF556,
+ 0x995B, 0xF777, 0x995C, 0xC5E4, 0x995E, 0xC661, 0x995F, 0xF959,
+ 0x9961, 0xF9B1, 0x9996, 0xADBA, 0x9997, 0xD850, 0x9998, 0xEF55,
+ 0x9999, 0xADBB, 0x999C, 0xE4D2, 0x999D, 0xE4D1, 0x999E, 0xEC60,
+ 0x99A1, 0xEF57, 0x99A3, 0xEF56, 0x99A5, 0xC34C, 0x99A6, 0xF3B2,
+ 0x99A7, 0xF3B3, 0x99A8, 0xC4C9, 0x99AB, 0xF9B2, 0x99AC, 0xB0A8,
+ 0x99AD, 0xB6BF, 0x99AE, 0xB6BE, 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 0xFF57, 0xA340,
+ 0xFF58, 0xA341, 0xFF59, 0xA342, 0xFF5A, 0xA343, 0xFF5B, 0xA161,
+ 0xFF5C, 0xA155, 0xFF5D, 0xA162, 0xFF5E, 0xA1E3, 0xFFE0, 0xA246,
+ 0xFFE1, 0xA247, 0xFFE3, 0xA1C3, 0xFFE5, 0xA244, 0, 0
+};
+
+static
+const WCHAR oem2uni[] = {
+/* OEM - Unicode, OEM - Unicode, OEM - Unicode, OEM - Unicode */
+ 0xA140, 0x3000, 0xA141, 0xFF0C, 0xA142, 0x3001, 0xA143, 0x3002,
+ 0xA144, 0xFF0E, 0xA145, 0x2027, 0xA146, 0xFF1B, 0xA147, 0xFF1A,
+ 0xA148, 0xFF1F, 0xA149, 0xFF01, 0xA14A, 0xFE30, 0xA14B, 0x2026,
+ 0xA14C, 0x2025, 0xA14D, 0xFE50, 0xA14E, 0xFE51, 0xA14F, 0xFE52,
+ 0xA150, 0x00B7, 0xA151, 0xFE54, 0xA152, 0xFE55, 0xA153, 0xFE56,
+ 0xA154, 0xFE57, 0xA155, 0xFF5C, 0xA156, 0x2013, 0xA157, 0xFE31,
+ 0xA158, 0x2014, 0xA159, 0xFE33, 0xA15A, 0x2574, 0xA15B, 0xFE34,
+ 0xA15C, 0xFE4F, 0xA15D, 0xFF08, 0xA15E, 0xFF09, 0xA15F, 0xFE35,
+ 0xA160, 0xFE36, 0xA161, 0xFF5B, 0xA162, 0xFF5D, 0xA163, 0xFE37,
+ 0xA164, 0xFE38, 0xA165, 0x3014, 0xA166, 0x3015, 0xA167, 0xFE39,
+ 0xA168, 0xFE3A, 0xA169, 0x3010, 0xA16A, 0x3011, 0xA16B, 0xFE3B,
+ 0xA16C, 0xFE3C, 0xA16D, 0x300A, 0xA16E, 0x300B, 0xA16F, 0xFE3D,
+ 0xA170, 0xFE3E, 0xA171, 0x3008, 0xA172, 0x3009, 0xA173, 0xFE3F,
+ 0xA174, 0xFE40, 0xA175, 0x300C, 0xA176, 0x300D, 0xA177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, 0xA1DB, 0x221E, 0xA1DC, 0x2252, 0xA1DD, 0x2261,
+ 0xA1DE, 0xFE62, 0xA1DF, 0xFE63, 0xA1E0, 0xFE64, 0xA1E1, 0xFE65,
+ 0xA1E2, 0xFE66, 0xA1E3, 0xFF5E, 0xA1E4, 0x2229, 0xA1E5, 0x222A,
+ 0xA1E6, 0x22A5, 0xA1E7, 0x2220, 0xA1E8, 0x221F, 0xA1E9, 0x22BF,
+ 0xA1EA, 0x33D2, 0xA1EB, 0x33D1, 0xA1EC, 0x222B, 0xA1ED, 0x222E,
+ 0xA1EE, 0x2235, 0xA1EF, 0x2234, 0xA1F0, 0x2640, 0xA1F1, 0x2642,
+ 0xA1F2, 0x2295, 0xA1F3, 0x2299, 0xA1F4, 0x2191, 0xA1F5, 0x2193,
+ 0xA1F6, 0x2190, 0xA1F7, 0x2192, 0xA1F8, 0x2196, 0xA1F9, 0x2197,
+ 0xA1FA, 0x2199, 0xA1FB, 0x2198, 0xA1FC, 0x2225, 0xA1FD, 0x2223,
+ 0xA1FE, 0xFF0F, 0xA240, 0xFF3C, 0xA241, 0x2215, 0xA242, 0xFE68,
+ 0xA243, 0xFF04, 0xA244, 0xFFE5, 0xA245, 0x3012, 0xA246, 0xFFE0,
+ 0xA247, 0xFFE1, 0xA248, 0xFF05, 0xA249, 0xFF20, 0xA24A, 0x2103,
+ 0xA24B, 0x2109, 0xA24C, 0xFE69, 0xA24D, 0xFE6A, 0xA24E, 0xFE6B,
+ 0xA24F, 0x33D5, 0xA250, 0x339C, 0xA251, 0x339D, 0xA252, 0x339E,
+ 0xA253, 0x33CE, 0xA254, 0x33A1, 0xA255, 0x338E, 0xA256, 0x338F,
+ 0xA257, 0x33C4, 0xA258, 0x00B0, 0xA259, 0x5159, 0xA25A, 0x515B,
+ 0xA25B, 0x515E, 0xA25C, 0x515D, 0xA25D, 0x5161, 0xA25E, 0x5163,
+ 0xA25F, 0x55E7, 0xA260, 0x74E9, 0xA261, 0x7CCE, 0xA262, 0x2581,
+ 0xA263, 0x2582, 0xA264, 0x2583, 0xA265, 0x2584, 0xA266, 0x2585,
+ 0xA267, 0x2586, 0xA268, 0x2587, 0xA269, 0x2588, 0xA26A, 0x258F,
+ 0xA26B, 0x258E, 0xA26C, 0x258D, 0xA26D, 0x258C, 0xA26E, 0x258B,
+ 0xA26F, 0x258A, 0xA270, 0x2589, 0xA271, 0x253C, 0xA272, 0x2534,
+ 0xA273, 0x252C, 0xA274, 0x2524, 0xA275, 0x251C, 0xA276, 0x2594,
+ 0xA277, 0x2500, 0xA278, 0x2502, 0xA279, 0x2595, 0xA27A, 0x250C,
+ 0xA27B, 0x2510, 0xA27C, 0x2514, 0xA27D, 0x2518, 0xA27E, 0x256D,
+ 0xA2A1, 0x256E, 0xA2A2, 0x2570, 0xA2A3, 0x256F, 0xA2A4, 0x2550,
+ 0xA2A5, 0x255E, 0xA2A6, 0x256A, 0xA2A7, 0x2561, 0xA2A8, 0x25E2,
+ 0xA2A9, 0x25E3, 0xA2AA, 0x25E5, 0xA2AB, 0x25E4, 0xA2AC, 0x2571,
+ 0xA2AD, 0x2572, 0xA2AE, 0x2573, 0xA2AF, 0xFF10, 0xA2B0, 0xFF11,
+ 0xA2B1, 0xFF12, 0xA2B2, 0xFF13, 0xA2B3, 0xFF14, 0xA2B4, 0xFF15,
+ 0xA2B5, 0xFF16, 0xA2B6, 0xFF17, 0xA2B7, 0xFF18, 0xA2B8, 0xFF19,
+ 0xA2B9, 0x2160, 0xA2BA, 0x2161, 0xA2BB, 0x2162, 0xA2BC, 0x2163,
+ 0xA2BD, 0x2164, 0xA2BE, 0x2165, 0xA2BF, 0x2166, 0xA2C0, 0x2167,
+ 0xA2C1, 0x2168, 0xA2C2, 0x2169, 0xA2C3, 0x3021, 0xA2C4, 0x3022,
+ 0xA2C5, 0x3023, 0xA2C6, 0x3024, 0xA2C7, 0x3025, 0xA2C8, 0x3026,
+ 0xA2C9, 0x3027, 0xA2CA, 0x3028, 0xA2CB, 0x3029, 0xA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, 0xA350, 0x039D, 0xA351, 0x039E,
+ 0xA352, 0x039F, 0xA353, 0x03A0, 0xA354, 0x03A1, 0xA355, 0x03A3,
+ 0xA356, 0x03A4, 0xA357, 0x03A5, 0xA358, 0x03A6, 0xA359, 0x03A7,
+ 0xA35A, 0x03A8, 0xA35B, 0x03A9, 0xA35C, 0x03B1, 0xA35D, 0x03B2,
+ 0xA35E, 0x03B3, 0xA35F, 0x03B4, 0xA360, 0x03B5, 0xA361, 0x03B6,
+ 0xA362, 0x03B7, 0xA363, 0x03B8, 0xA364, 0x03B9, 0xA365, 0x03BA,
+ 0xA366, 0x03BB, 0xA367, 0x03BC, 0xA368, 0x03BD, 0xA369, 0x03BE,
+ 0xA36A, 0x03BF, 0xA36B, 0x03C0, 0xA36C, 0x03C1, 0xA36D, 0x03C3,
+ 0xA36E, 0x03C4, 0xA36F, 0x03C5, 0xA370, 0x03C6, 0xA371, 0x03C7,
+ 0xA372, 0x03C8, 0xA373, 0x03C9, 0xA374, 0x3105, 0xA375, 0x3106,
+ 0xA376, 0x3107, 0xA377, 0x3108, 0xA378, 0x3109, 0xA379, 0x310A,
+ 0xA37A, 0x310B, 0xA37B, 0x310C, 0xA37C, 0x310D, 0xA37D, 0x310E,
+ 0xA37E, 0x310F, 0xA3A1, 0x3110, 0xA3A2, 0x3111, 0xA3A3, 0x3112,
+ 0xA3A4, 0x3113, 0xA3A5, 0x3114, 0xA3A6, 0x3115, 0xA3A7, 0x3116,
+ 0xA3A8, 0x3117, 0xA3A9, 0x3118, 0xA3AA, 0x3119, 0xA3AB, 0x311A,
+ 0xA3AC, 0x311B, 0xA3AD, 0x311C, 0xA3AE, 0x311D, 0xA3AF, 0x311E,
+ 0xA3B0, 0x311F, 0xA3B1, 0x3120, 0xA3B2, 0x3121, 0xA3B3, 0x3122,
+ 0xA3B4, 0x3123, 0xA3B5, 0x3124, 0xA3B6, 0x3125, 0xA3B7, 0x3126,
+ 0xA3B8, 0x3127, 0xA3B9, 0x3128, 0xA3BA, 0x3129, 0xA3BB, 0x02D9,
+ 0xA3BC, 0x02C9, 0xA3BD, 0x02CA, 0xA3BE, 0x02C7, 0xA3BF, 0x02CB,
+ 0xA3E1, 0x20AC, 0xA440, 0x4E00, 0xA441, 0x4E59, 0xA442, 0x4E01,
+ 0xA443, 0x4E03, 0xA444, 0x4E43, 0xA445, 0x4E5D, 0xA446, 0x4E86,
+ 0xA447, 0x4E8C, 0xA448, 0x4EBA, 0xA449, 0x513F, 0xA44A, 0x5165,
+ 0xA44B, 0x516B, 0xA44C, 0x51E0, 0xA44D, 0x5200, 0xA44E, 0x5201,
+ 0xA44F, 0x529B, 0xA450, 0x5315, 0xA451, 0x5341, 0xA452, 0x535C,
+ 0xA453, 0x53C8, 0xA454, 0x4E09, 0xA455, 0x4E0B, 0xA456, 0x4E08,
+ 0xA457, 0x4E0A, 0xA458, 0x4E2B, 0xA459, 0x4E38, 0xA45A, 0x51E1,
+ 0xA45B, 0x4E45, 0xA45C, 0x4E48, 0xA45D, 0x4E5F, 0xA45E, 0x4E5E,
+ 0xA45F, 0x4E8E, 0xA460, 0x4EA1, 0xA461, 0x5140, 0xA462, 0x5203,
+ 0xA463, 0x52FA, 0xA464, 0x5343, 0xA465, 0x53C9, 0xA466, 0x53E3,
+ 0xA467, 0x571F, 0xA468, 0x58EB, 0xA469, 0x5915, 0xA46A, 0x5927,
+ 0xA46B, 0x5973, 0xA46C, 0x5B50, 0xA46D, 0x5B51, 0xA46E, 0x5B53,
+ 0xA46F, 0x5BF8, 0xA470, 0x5C0F, 0xA471, 0x5C22, 0xA472, 0x5C38,
+ 0xA473, 0x5C71, 0xA474, 0x5DDD, 0xA475, 0x5DE5, 0xA476, 0x5DF1,
+ 0xA477, 0x5DF2, 0xA478, 0x5DF3, 0xA479, 0x5DFE, 0xA47A, 0x5E72,
+ 0xA47B, 0x5EFE, 0xA47C, 0x5F0B, 0xA47D, 0x5F13, 0xA47E, 0x624D,
+ 0xA4A1, 0x4E11, 0xA4A2, 0x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A4E4, 0x652F,
+ 0xA4E5, 0x6587, 0xA4E6, 0x6597, 0xA4E7, 0x65A4, 0xA4E8, 0x65B9,
+ 0xA4E9, 0x65E5, 0xA4EA, 0x66F0, 0xA4EB, 0x6708, 0xA4EC, 0x6728,
+ 0xA4ED, 0x6B20, 0xA4EE, 0x6B62, 0xA4EF, 0x6B79, 0xA4F0, 0x6BCB,
+ 0xA4F1, 0x6BD4, 0xA4F2, 0x6BDB, 0xA4F3, 0x6C0F, 0xA4F4, 0x6C34,
+ 0xA4F5, 0x706B, 0xA4F6, 0x722A, 0xA4F7, 0x7236, 0xA4F8, 0x723B,
+ 0xA4F9, 0x7247, 0xA4FA, 0x7259, 0xA4FB, 0x725B, 0xA4FC, 0x72AC,
+ 0xA4FD, 0x738B, 0xA4FE, 0x4E19, 0xA540, 0x4E16, 0xA541, 0x4E15,
+ 0xA542, 0x4E14, 0xA543, 0x4E18, 0xA544, 0x4E3B, 0xA545, 0x4E4D,
+ 0xA546, 0x4E4F, 0xA547, 0x4E4E, 0xA548, 0x4EE5, 0xA549, 0x4ED8,
+ 0xA54A, 0x4ED4, 0xA54B, 0x4ED5, 0xA54C, 0x4ED6, 0xA54D, 0x4ED7,
+ 0xA54E, 0x4EE3, 0xA54F, 0x4EE4, 0xA550, 0x4ED9, 0xA551, 0x4EDE,
+ 0xA552, 0x5145, 0xA553, 0x5144, 0xA554, 0x5189, 0xA555, 0x518A,
+ 0xA556, 0x51AC, 0xA557, 0x51F9, 0xA558, 0x51FA, 0xA559, 0x51F8,
+ 0xA55A, 0x520A, 0xA55B, 0x52A0, 0xA55C, 0x529F, 0xA55D, 0x5305,
+ 0xA55E, 0x5306, 0xA55F, 0x5317, 0xA560, 0x531D, 0xA561, 0x4EDF,
+ 0xA562, 0x534A, 0xA563, 0x5349, 0xA564, 0x5361, 0xA565, 0x5360,
+ 0xA566, 0x536F, 0xA567, 0x536E, 0xA568, 0x53BB, 0xA569, 0x53EF,
+ 0xA56A, 0x53E4, 0xA56B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A5D1, 0x7531, 0xA5D2, 0x7532, 0xA5D3, 0x7533,
+ 0xA5D4, 0x758B, 0xA5D5, 0x767D, 0xA5D6, 0x76AE, 0xA5D7, 0x76BF,
+ 0xA5D8, 0x76EE, 0xA5D9, 0x77DB, 0xA5DA, 0x77E2, 0xA5DB, 0x77F3,
+ 0xA5DC, 0x793A, 0xA5DD, 0x79BE, 0xA5DE, 0x7A74, 0xA5DF, 0x7ACB,
+ 0xA5E0, 0x4E1E, 0xA5E1, 0x4E1F, 0xA5E2, 0x4E52, 0xA5E3, 0x4E53,
+ 0xA5E4, 0x4E69, 0xA5E5, 0x4E99, 0xA5E6, 0x4EA4, 0xA5E7, 0x4EA6,
+ 0xA5E8, 0x4EA5, 0xA5E9, 0x4EFF, 0xA5EA, 0x4F09, 0xA5EB, 0x4F19,
+ 0xA5EC, 0x4F0A, 0xA5ED, 0x4F15, 0xA5EE, 0x4F0D, 0xA5EF, 0x4F10,
+ 0xA5F0, 0x4F11, 0xA5F1, 0x4F0F, 0xA5F2, 0x4EF2, 0xA5F3, 0x4EF6,
+ 0xA5F4, 0x4EFB, 0xA5F5, 0x4EF0, 0xA5F6, 0x4EF3, 0xA5F7, 0x4EFD,
+ 0xA5F8, 0x4F01, 0xA5F9, 0x4F0B, 0xA5FA, 0x5149, 0xA5FB, 0x5147,
+ 0xA5FC, 0x5146, 0xA5FD, 0x5148, 0xA5FE, 0x5168, 0xA640, 0x5171,
+ 0xA641, 0x518D, 0xA642, 0x51B0, 0xA643, 0x5217, 0xA644, 0x5211,
+ 0xA645, 0x5212, 0xA646, 0x520E, 0xA647, 0x5216, 0xA648, 0x52A3,
+ 0xA649, 0x5308, 0xA64A, 0x5321, 0xA64B, 0x5320, 0xA64C, 0x5370,
+ 0xA64D, 0x5371, 0xA64E, 0x5409, 0xA64F, 0x540F, 0xA650, 0x540C,
+ 0xA651, 0x540A, 0xA652, 0x5410, 0xA653, 0x5401, 0xA654, 0x540B,
+ 0xA655, 0x5404, 0xA656, 0x5411, 0xA657, 0x540D, 0xA658, 0x5408,
+ 0xA659, 0x5403, 0xA65A, 0x540E, 0xA65B, 0x5406, 0xA65C, 0x5412,
+ 0xA65D, 0x56E0, 0xA65E, 0x56DE, 0xA65F, 0x56DD, 0xA660, 0x5733,
+ 0xA661, 0x5730, 0xA662, 0x5728, 0xA663, 0x572D, 0xA664, 0x572C,
+ 0xA665, 0x572F, 0xA666, 0x5729, 0xA667, 0x5919, 0xA668, 0x591A,
+ 0xA669, 0x5937, 0xA66A, 0x5938, 0xA66B, 0x5984, 0xA66C, 0x5978,
+ 0xA66D, 0x5983, 0xA66E, 0x597D, 0xA66F, 0x5979, 0xA670, 0x5982,
+ 0xA671, 0x5981, 0xA672, 0x5B57, 0xA673, 0x5B58, 0xA674, 0x5B87,
+ 0xA675, 0x5B88, 0xA676, 0x5B85, 0xA677, 0x5B89, 0xA678, 0x5BFA,
+ 0xA679, 0x5C16, 0xA67A, 0x5C79, 0xA67B, 0x5DDE, 0xA67C, 0x5E06,
+ 0xA67D, 0x5E76, 0xA67E, 0x5E74, 0xA6A1, 0x5F0F, 0xA6A2, 0x5F1B,
+ 0xA6A3, 0x5FD9, 0xA6A4, 0x5FD6, 0xA6A5, 0x620E, 0xA6A6, 0x620C,
+ 0xA6A7, 0x620D, 0xA6A8, 0x6210, 0xA6A9, 0x6263, 0xA6AA, 0x625B,
+ 0xA6AB, 0x6258, 0xA6AC, 0x6536, 0xA6AD, 0x65E9, 0xA6AE, 0x65E8,
+ 0xA6AF, 0x65EC, 0xA6B0, 0x65ED, 0xA6B1, 0x66F2, 0xA6B2, 0x66F3,
+ 0xA6B3, 0x6709, 0xA6B4, 0x673D, 0xA6B5, 0x6734, 0xA6B6, 0x6731,
+ 0xA6B7, 0x6735, 0xA6B8, 0x6B21, 0xA6B9, 0x6B64, 0xA6BA, 0x6B7B,
+ 0xA6BB, 0x6C16, 0xA6BC, 0x6C5D, 0xA6BD, 0x6C57, 0xA6BE, 0x6C59,
+ 0xA6BF,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 0x4F2F, 0xA743, 0x4F4E,
+ 0xA744, 0x4F36, 0xA745, 0x4F59, 0xA746, 0x4F5D, 0xA747, 0x4F48,
+ 0xA748, 0x4F5A, 0xA749, 0x514C, 0xA74A, 0x514B, 0xA74B, 0x514D,
+ 0xA74C, 0x5175, 0xA74D, 0x51B6, 0xA74E, 0x51B7, 0xA74F, 0x5225,
+ 0xA750, 0x5224, 0xA751, 0x5229, 0xA752, 0x522A, 0xA753, 0x5228,
+ 0xA754, 0x52AB, 0xA755, 0x52A9, 0xA756, 0x52AA, 0xA757, 0x52AC,
+ 0xA758, 0x5323, 0xA759, 0x5373, 0xA75A, 0x5375, 0xA75B, 0x541D,
+ 0xA75C, 0x542D, 0xA75D, 0x541E, 0xA75E, 0x543E, 0xA75F, 0x5426,
+ 0xA760, 0x544E, 0xA761, 0x5427, 0xA762, 0x5446, 0xA763, 0x5443,
+ 0xA764, 0x5433, 0xA765, 0x5448, 0xA766, 0x5442, 0xA767, 0x541B,
+ 0xA768, 0x5429, 0xA769, 0x544A, 0xA76A, 0x5439, 0xA76B, 0x543B,
+ 0xA76C, 0x5438, 0xA76D, 0x542E, 0xA76E, 0x5435, 0xA76F, 0x5436,
+ 0xA770, 0x5420, 0xA771, 0x543C, 0xA772, 0x5440, 0xA773, 0x5431,
+ 0xA774, 0x542B, 0xA775, 0x541F, 0xA776, 0x542C, 0xA777, 0x56EA,
+ 0xA778, 0x56F0, 0xA779, 0x56E4, 0xA77A, 0x56EB, 0xA77B, 0x574A,
+ 0xA77C, 0x5751, 0xA77D, 0x5740, 0xA77E, 0x574D, 0xA7A1, 0x5747,
+ 0xA7A2, 0x574E, 0xA7A3, 0x573E, 0xA7A4, 0x5750, 0xA7A5, 0x574F,
+ 0xA7A6, 0x573B, 0xA7A7, 0x58EF, 0xA7A8, 0x593E, 0xA7A9, 0x599D,
+ 0xA7AA, 0x5992, 0xA7AB, 0x59A8, 0xA7AC, 0x599E, 0xA7AD, 0x59A3,
+ 0xA7AE, 0x5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0xA7F0, 0x653B, 0xA7F1, 0x6538,
+ 0xA7F2, 0x65F1, 0xA7F3, 0x66F4, 0xA7F4, 0x675F, 0xA7F5, 0x674E,
+ 0xA7F6, 0x674F, 0xA7F7, 0x6750, 0xA7F8, 0x6751, 0xA7F9, 0x675C,
+ 0xA7FA, 0x6756, 0xA7FB, 0x675E, 0xA7FC, 0x6749, 0xA7FD, 0x6746,
+ 0xA7FE, 0x6760, 0xA840, 0x6753, 0xA841, 0x6757, 0xA842, 0x6B65,
+ 0xA843, 0x6BCF, 0xA844, 0x6C42, 0xA845, 0x6C5E, 0xA846, 0x6C99,
+ 0xA847, 0x6C81, 0xA848, 0x6C88, 0xA849, 0x6C89, 0xA84A, 0x6C85,
+ 0xA84B, 0x6C9B, 0xA84C, 0x6C6A, 0xA84D, 0x6C7A, 0xA84E, 0x6C90,
+ 0xA84F, 0x6C70, 0xA850, 0x6C8C, 0xA851, 0x6C68, 0xA852, 0x6C96,
+ 0xA853, 0x6C92, 0xA854, 0x6C7D, 0xA855, 0x6C83, 0xA856, 0x6C72,
+ 0xA857, 0x6C7E, 0xA858, 0x6C74, 0xA859, 0x6C86, 0xA85A, 0x6C76,
+ 0xA85B, 0x6C8D, 0xA85C, 0x6C94, 0xA85D, 0x6C98, 0xA85E, 0x6C82,
+ 0xA85F, 0x7076, 0xA860, 0x707C, 0xA861, 0x707D, 0xA862, 0x7078,
+ 0xA863, 0x7262, 0xA864, 0x7261, 0xA865, 0x7260, 0xA866, 0x72C4,
+ 0xA867, 0x72C2, 0xA868, 0x7396, 0xA869, 0x752C, 0xA86A, 0x752B,
+ 0xA86B, 0x7537, 0xA86C, 0x7538, 0xA86D, 0x7682, 0xA86E, 0x76EF,
+ 0xA86F, 0x77E3, 0xA870, 0x79C1, 0xA871, 0x79C0, 0xA872, 0x79BF,
+ 0xA873, 0x7A76, 0xA874, 0x7CFB, 0xA875, 0x7F55, 0xA876, 0x8096,
+ 0xA877, 0x8093, 0xA878, 0x809D, 0xA879, 0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C, 0x4F8F,
+ 0xA8DD, 0x4F91, 0xA8DE, 0x4F7A, 0xA8DF, 0x5154, 0xA8E0, 0x5152,
+ 0xA8E1, 0x5155, 0xA8E2, 0x5169, 0xA8E3, 0x5177, 0xA8E4, 0x5176,
+ 0xA8E5, 0x5178, 0xA8E6, 0x51BD, 0xA8E7, 0x51FD, 0xA8E8, 0x523B,
+ 0xA8E9, 0x5238, 0xA8EA, 0x5237, 0xA8EB, 0x523A, 0xA8EC, 0x5230,
+ 0xA8ED, 0x522E, 0xA8EE, 0x5236, 0xA8EF, 0x5241, 0xA8F0, 0x52BE,
+ 0xA8F1, 0x52BB, 0xA8F2, 0x5352, 0xA8F3, 0x5354, 0xA8F4, 0x5353,
+ 0xA8F5, 0x5351, 0xA8F6, 0x5366, 0xA8F7, 0x5377, 0xA8F8, 0x5378,
+ 0xA8F9, 0x5379, 0xA8FA, 0x53D6, 0xA8FB, 0x53D4, 0xA8FC, 0x53D7,
+ 0xA8FD, 0x5473, 0xA8FE, 0x5475, 0xA940, 0x5496, 0xA941, 0x5478,
+ 0xA942, 0x5495, 0xA943, 0x5480, 0xA944, 0x547B, 0xA945, 0x5477,
+ 0xA946, 0x5484, 0xA947, 0x5492, 0xA948, 0x5486, 0xA949, 0x547C,
+ 0xA94A, 0x5490, 0xA94B, 0x5471, 0xA94C, 0x5476, 0xA94D, 0x548C,
+ 0xA94E, 0x549A, 0xA94F, 0x5462, 0xA950, 0x5468, 0xA951, 0x548B,
+ 0xA952, 0x547D, 0xA953, 0x548E, 0xA954, 0x56FA, 0xA955, 0x5783,
+ 0xA956, 0x5777, 0xA957, 0x576A, 0xA958, 0x5769, 0xA959, 0x5761,
+ 0xA95A, 0x5766, 0xA95B, 0x5764, 0xA95C, 0x577C, 0xA95D, 0x591C,
+ 0xA95E, 0x5949, 0xA95F, 0x5947, 0xA960, 0x5948, 0xA961, 0x5944,
+ 0xA962, 0x5954, 0xA963, 0x59BE, 0xA964, 0x59BB, 0xA965, 0x59D4,
+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xABE1, 0x5F8C,
+ 0xABE2, 0x5F89, 0xABE3, 0x6012, 0xABE4, 0x601D, 0xABE5, 0x6020,
+ 0xABE6, 0x6025, 0xABE7, 0x600E, 0xABE8, 0x6028, 0xABE9, 0x604D,
+ 0xABEA, 0x6070, 0xABEB, 0x6068, 0xABEC, 0x6062, 0xABED, 0x6046,
+ 0xABEE, 0x6043, 0xABEF, 0x606C, 0xABF0, 0x606B, 0xABF1, 0x606A,
+ 0xABF2, 0x6064, 0xABF3, 0x6241, 0xABF4, 0x62DC, 0xABF5, 0x6316,
+ 0xABF6, 0x6309, 0xABF7, 0x62FC, 0xABF8, 0x62ED, 0xABF9, 0x6301,
+ 0xABFA, 0x62EE, 0xABFB, 0x62FD, 0xABFC, 0x6307, 0xABFD, 0x62F1,
+ 0xABFE, 0x62F7, 0xAC40, 0x62EF, 0xAC41, 0x62EC, 0xAC42, 0x62FE,
+ 0xAC43, 0x62F4, 0xAC44, 0x6311, 0xAC45, 0x6302, 0xAC46, 0x653F,
+ 0xAC47, 0x6545, 0xAC48, 0x65AB, 0xAC49, 0x65BD, 0xAC4A, 0x65E2,
+ 0xAC4B, 0x6625, 0xAC4C, 0x662D, 0xAC4D, 0x6620, 0xAC4E, 0x6627,
+ 0xAC4F, 0x662F, 0xAC50, 0x661F, 0xAC51, 0x6628, 0xAC52, 0x6631,
+ 0xAC53, 0x6624, 0xAC54, 0x66F7, 0xAC55, 0x67FF, 0xAC56, 0x67D3,
+ 0xAC57, 0x67F1, 0xAC58, 0x67D4, 0xAC59, 0x67D0, 0xAC5A, 0x67EC,
+ 0xAC5B, 0x67B6, 0xAC5C, 0x67AF, 0xAC5D, 0x67F5, 0xAC5E, 0x67E9,
+ 0xAC5F, 0x67EF, 0xAC60, 0x67C4, 0xAC61, 0x67D1, 0xAC62, 0x67B4,
+ 0xAC63, 0x67DA, 0xAC64, 0x67E5, 0xAC65, 0x67B8, 0xAC66, 0x67CF,
+ 0xAC67, 0x67DE, 0xAC68, 0x67F3,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xACCF, 0x75A2, 0xACD0, 0x75A3,
+ 0xACD1, 0x7678, 0xACD2, 0x7686, 0xACD3, 0x7687, 0xACD4, 0x7688,
+ 0xACD5, 0x76C8, 0xACD6, 0x76C6, 0xACD7, 0x76C3, 0xACD8, 0x76C5,
+ 0xACD9, 0x7701, 0xACDA, 0x76F9, 0xACDB, 0x76F8, 0xACDC, 0x7709,
+ 0xACDD, 0x770B, 0xACDE, 0x76FE, 0xACDF, 0x76FC, 0xACE0, 0x7707,
+ 0xACE1, 0x77DC, 0xACE2, 0x7802, 0xACE3, 0x7814, 0xACE4, 0x780C,
+ 0xACE5, 0x780D, 0xACE6, 0x7946, 0xACE7, 0x7949, 0xACE8, 0x7948,
+ 0xACE9, 0x7947, 0xACEA, 0x79B9, 0xACEB, 0x79BA, 0xACEC, 0x79D1,
+ 0xACED, 0x79D2, 0xACEE, 0x79CB, 0xACEF, 0x7A7F, 0xACF0, 0x7A81,
+ 0xACF1, 0x7AFF, 0xACF2, 0x7AFD, 0xACF3, 0x7C7D, 0xACF4, 0x7D02,
+ 0xACF5, 0x7D05, 0xACF6, 0x7D00, 0xACF7, 0x7D09, 0xACF8, 0x7D07,
+ 0xACF9, 0x7D04, 0xACFA, 0x7D06, 0xACFB, 0x7F38, 0xACFC, 0x7F8E,
+ 0xACFD, 0x7FBF, 0xACFE, 0x8004, 0xAD40, 0x8010, 0xAD41, 0x800D,
+ 0xAD42, 0x8011, 0xAD43, 0x8036, 0xAD44, 0x80D6, 0xAD45, 0x80E5,
+ 0xAD46, 0x80DA, 0xAD47, 0x80C3, 0xAD48, 0x80C4, 0xAD49, 0x80CC,
+ 0xAD4A, 0x80E1, 0xAD4B, 0x80DB, 0xAD4C, 0x80CE, 0xAD4D, 0x80DE,
+ 0xAD4E, 0x80E4, 0xAD4F, 0x80DD, 0xAD50, 0x81F4, 0xAD51, 0x8222,
+ 0xAD52, 0x82E7, 0xAD53, 0x8303, 0xAD54, 0x8305, 0xAD55, 0x82E3,
+ 0xAD56, 0x82DB, 0xAD57, 0x82E6, 0xAD58, 0x8304, 0xAD59, 0x82E5,
+ 0xAD5A, 0x8302, 0xAD5B, 0x8309, 0xAD5C, 0x82D2, 0xAD5D, 0x82D7,
+ 0xAD5E, 0x82F1, 0xAD5F, 0x8301, 0xAD60, 0x82DC, 0xAD61, 0x82D4,
+ 0xAD62, 0x82D1, 0xAD63, 0x82DE, 0xAD64, 0x82D3, 0xAD65, 0x82DF,
+ 0xAD66, 0x82EF, 0xAD67, 0x8306, 0xAD68, 0x8650, 0xAD69, 0x8679,
+ 0xAD6A, 0x867B, 0xAD6B, 0x867A, 0xAD6C, 0x884D, 0xAD6D, 0x886B,
+ 0xAD6E, 0x8981, 0xAD6F, 0x89D4, 0xAD70, 0x8A08, 0xAD71, 0x8A02,
+ 0xAD72, 0x8A03, 0xAD73, 0x8C9E, 0xAD74, 0x8CA0, 0xAD75, 0x8D74,
+ 0xAD76, 0x8D73, 0xAD77, 0x8DB4, 0xAD78, 0x8ECD, 0xAD79, 0x8ECC,
+ 0xAD7A, 0x8FF0, 0xAD7B, 0x8FE6, 0xAD7C, 0x8FE2, 0xAD7D, 0x8FEA,
+ 0xAD7E, 0x8FE5, 0xADA1, 0x8FED, 0xADA2, 0x8FEB, 0xADA3, 0x8FE4,
+ 0xADA4, 0x8FE8, 0xADA5, 0x90CA, 0xADA6, 0x90CE, 0xADA7, 0x90C1,
+ 0xADA8, 0x90C3, 0xADA9, 0x914B, 0xADAA, 0x914A, 0xADAB, 0x91CD,
+ 0xADAC, 0x9582, 0xADAD, 0x9650, 0xADAE, 0x964B, 0xADAF, 0x964C,
+ 0xADB0, 0x964D, 0xADB1, 0x9762, 0xADB2, 0x9769, 0xADB3, 0x97CB,
+ 0xADB4, 0x97ED, 0xADB5, 0x97F3, 0xADB6, 0x9801, 0xADB7, 0x98A8,
+ 0xADB8, 0x98DB, 0xADB9, 0x98DF, 0xADBA, 0x9996, 0xADBB, 0x9999,
+ 0xADBC, 0x4E58, 0xADBD, 0x4EB3, 0xADBE, 0x500C, 0xADBF, 0x500D,
+ 0xADC0, 0x5023, 0xADC1, 0x4FEF, 0xADC2, 0x5026, 0xADC3, 0x5025,
+ 0xADC4, 0x4FF8, 0xADC5, 0x5029, 0xADC6, 0x5016, 0xADC7, 0x5006,
+ 0xADC8, 0x503C, 0xADC9, 0x501F, 0xADCA, 0x501A, 0xADCB, 0x5012,
+ 0xADCC, 0x5011, 0xADCD, 0x4FFA, 0xADCE, 0x5000, 0xADCF, 0x5014,
+ 0xADD0, 0x5028, 0xADD1, 0x4FF1, 0xADD2, 0x5021, 0xADD3, 0x500B,
+ 0xADD4, 0x5019, 0xADD5, 0x5018, 0xADD6, 0x4FF3, 0xADD7, 0x4FEE,
+ 0xADD8, 0x502D, 0xADD9, 0x502A, 0xADDA, 0x4FFE, 0xADDB, 0x502B,
+ 0xADDC, 0x5009, 0xADDD, 0x517C, 0xADDE, 0x51A4, 0xADDF, 0x51A5,
+ 0xADE0, 0x51A2, 0xADE1, 0x51CD, 0xADE2, 0x51CC, 0xADE3, 0x51C6,
+ 0xADE4, 0x51CB, 0xADE5, 0x5256, 0xADE6, 0x525C, 0xADE7, 0x5254,
+ 0xADE8, 0x525B, 0xADE9, 0x525D, 0xADEA, 0x532A, 0xADEB, 0x537F,
+ 0xADEC, 0x539F, 0xADED, 0x539D, 0xADEE, 0x53DF, 0xADEF, 0x54E8,
+ 0xADF0, 0x5510, 0xADF1, 0x5501, 0xADF2, 0x5537, 0xADF3, 0x54FC,
+ 0xADF4, 0x54E5, 0xADF5, 0x54F2, 0xADF6, 0x5506, 0xADF7, 0x54FA,
+ 0xADF8, 0x5514, 0xADF9, 0x54E9, 0xADFA, 0x54ED, 0xADFB, 0x54E1,
+ 0xADFC, 0x5509, 0xADFD, 0x54EE, 0xADFE, 0x54EA, 0xAE40, 0x54E6,
+ 0xAE41, 0x5527, 0xAE42, 0x5507, 0xAE43, 0x54FD, 0xAE44, 0x550F,
+ 0xAE45, 0x5703, 0xAE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+ 0xAEAB, 0x608D, 0xAEAC, 0x6094, 0xAEAD, 0x608C, 0xAEAE, 0x6085,
+ 0xAEAF, 0x6096, 0xAEB0, 0x6247, 0xAEB1, 0x62F3, 0xAEB2, 0x6308,
+ 0xAEB3, 0x62FF, 0xAEB4, 0x634E, 0xAEB5, 0x633E, 0xAEB6, 0x632F,
+ 0xAEB7, 0x6355, 0xAEB8, 0x6342, 0xAEB9, 0x6346, 0xAEBA, 0x634F,
+ 0xAEBB, 0x6349, 0xAEBC, 0x633A, 0xAEBD, 0x6350, 0xAEBE, 0x633D,
+ 0xAEBF, 0x632A, 0xAEC0, 0x632B, 0xAEC1, 0x6328, 0xAEC2, 0x634D,
+ 0xAEC3, 0x634C, 0xAEC4, 0x6548, 0xAEC5, 0x6549, 0xAEC6, 0x6599,
+ 0xAEC7, 0x65C1, 0xAEC8, 0x65C5, 0xAEC9, 0x6642, 0xAECA, 0x6649,
+ 0xAECB, 0x664F, 0xAECC, 0x6643, 0xAECD, 0x6652, 0xAECE, 0x664C,
+ 0xAECF, 0x6645, 0xAED0, 0x6641, 0xAED1, 0x66F8, 0xAED2, 0x6714,
+ 0xAED3, 0x6715, 0xAED4, 0x6717, 0xAED5, 0x6821, 0xAED6, 0x6838,
+ 0xAED7, 0x6848, 0xAED8, 0x6846, 0xAED9, 0x6853, 0xAEDA, 0x6839,
+ 0xAEDB, 0x6842, 0xAEDC, 0x6854, 0xAEDD, 0x6829, 0xAEDE, 0x68B3,
+ 0xAEDF, 0x6817, 0xAEE0, 0x684C, 0xAEE1, 0x6851, 0xAEE2, 0x683D,
+ 0xAEE3, 0x67F4, 0xAEE4, 0x6850, 0xAEE5, 0x6840, 0xAEE6, 0x683C,
+ 0xAEE7, 0x6843, 0xAEE8, 0x682A, 0xAEE9, 0x6845, 0xAEEA, 0x6813,
+ 0xAEEB, 0x6818, 0xAEEC, 0x6841, 0xAEED, 0x6B8A, 0xAEEE, 0x6B89,
+ 0xAEEF, 0x6BB7, 0xAEF0, 0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,
+ 0xAFDA, 0x80ED, 0xAFDB, 0x80F4, 0xAFDC, 0x8106, 0xAFDD, 0x80F8,
+ 0xAFDE, 0x80F3, 0xAFDF, 0x8108, 0xAFE0, 0x80FD, 0xAFE1, 0x810A,
+ 0xAFE2, 0x80FC, 0xAFE3, 0x80EF, 0xAFE4, 0x81ED, 0xAFE5, 0x81EC,
+ 0xAFE6, 0x8200, 0xAFE7, 0x8210, 0xAFE8, 0x822A, 0xAFE9, 0x822B,
+ 0xAFEA, 0x8228, 0xAFEB, 0x822C, 0xAFEC, 0x82BB, 0xAFED, 0x832B,
+ 0xAFEE, 0x8352, 0xAFEF, 0x8354, 0xAFF0, 0x834A, 0xAFF1, 0x8338,
+ 0xAFF2, 0x8350, 0xAFF3, 0x8349, 0xAFF4, 0x8335, 0xAFF5, 0x8334,
+ 0xAFF6, 0x834F, 0xAFF7, 0x8332, 0xAFF8, 0x8339, 0xAFF9, 0x8336,
+ 0xAFFA, 0x8317, 0xAFFB, 0x8340, 0xAFFC, 0x8331, 0xAFFD, 0x8328,
+ 0xAFFE, 0x8343, 0xB040, 0x8654, 0xB041, 0x868A, 0xB042, 0x86AA,
+ 0xB043, 0x8693, 0xB044, 0x86A4, 0xB045, 0x86A9, 0xB046, 0x868C,
+ 0xB047, 0x86A3, 0xB048, 0x869C, 0xB049, 0x8870, 0xB04A, 0x8877,
+ 0xB04B, 0x8881, 0xB04C, 0x8882, 0xB04D, 0x887D, 0xB04E, 0x8879,
+ 0xB04F, 0x8A18, 0xB050, 0x8A10, 0xB051, 0x8A0E, 0xB052, 0x8A0C,
+ 0xB053, 0x8A15, 0xB054, 0x8A0A, 0xB055, 0x8A17, 0xB056, 0x8A13,
+ 0xB057, 0x8A16, 0xB058, 0x8A0F, 0xB059, 0x8A11, 0xB05A, 0x8C48,
+ 0xB05B, 0x8C7A, 0xB05C, 0x8C79, 0xB05D, 0x8CA1, 0xB05E, 0x8CA2,
+ 0xB05F, 0x8D77, 0xB060, 0x8EAC, 0xB061, 0x8ED2, 0xB062, 0x8ED4,
+ 0xB063, 0x8ECF, 0xB064, 0x8FB1, 0xB065, 0x9001, 0xB066, 0x9006,
+ 0xB067, 0x8FF7, 0xB068, 0x9000, 0xB069, 0x8FFA, 0xB06A, 0x8FF4,
+ 0xB06B, 0x9003, 0xB06C, 0x8FFD, 0xB06D, 0x9005, 0xB06E, 0x8FF8,
+ 0xB06F, 0x9095, 0xB070, 0x90E1, 0xB071, 0x90DD, 0xB072, 0x90E2,
+ 0xB073, 0x9152, 0xB074, 0x914D, 0xB075, 0x914C, 0xB076, 0x91D8,
+ 0xB077, 0x91DD, 0xB078, 0x91D7, 0xB079, 0x91DC, 0xB07A, 0x91D9,
+ 0xB07B, 0x9583, 0xB07C, 0x9662, 0xB07D, 0x9663, 0xB07E, 0x9661,
+ 0xB0A1, 0x965B, 0xB0A2, 0x965D, 0xB0A3, 0x9664, 0xB0A4, 0x9658,
+ 0xB0A5, 0x965E, 0xB0A6, 0x96BB, 0xB0A7, 0x98E2, 0xB0A8, 0x99AC,
+ 0xB0A9, 0x9AA8, 0xB0AA, 0x9AD8, 0xB0AB, 0x9B25, 0xB0AC, 0x9B32,
+ 0xB0AD, 0x9B3C, 0xB0AE, 0x4E7E, 0xB0AF, 0x507A, 0xB0B0, 0x507D,
+ 0xB0B1, 0x505C, 0xB0B2, 0x5047, 0xB0B3, 0x5043, 0xB0B4, 0x504C,
+ 0xB0B5, 0x505A, 0xB0B6, 0x5049, 0xB0B7, 0x5065, 0xB0B8, 0x5076,
+ 0xB0B9, 0x504E, 0xB0BA, 0x5055, 0xB0BB, 0x5075, 0xB0BC, 0x5074,
+ 0xB0BD, 0x5077, 0xB0BE, 0x504F, 0xB0BF, 0x500F, 0xB0C0, 0x506F,
+ 0xB0C1, 0x506D, 0xB0C2, 0x515C, 0xB0C3, 0x5195, 0xB0C4, 0x51F0,
+ 0xB0C5, 0x526A, 0xB0C6, 0x526F, 0xB0C7, 0x52D2, 0xB0C8, 0x52D9,
+ 0xB0C9, 0x52D8, 0xB0CA, 0x52D5, 0xB0CB, 0x5310, 0xB0CC, 0x530F,
+ 0xB0CD, 0x5319, 0xB0CE, 0x533F, 0xB0CF, 0x5340, 0xB0D0, 0x533E,
+ 0xB0D1, 0x53C3, 0xB0D2, 0x66FC, 0xB0D3, 0x5546, 0xB0D4, 0x556A,
+ 0xB0D5, 0x5566, 0xB0D6, 0x5544, 0xB0D7, 0x555E, 0xB0D8, 0x5561,
+ 0xB0D9, 0x5543, 0xB0DA, 0x554A, 0xB0DB, 0x5531, 0xB0DC, 0x5556,
+ 0xB0DD, 0x554F, 0xB0DE, 0x5555, 0xB0DF, 0x552F, 0xB0E0, 0x5564,
+ 0xB0E1, 0x5538, 0xB0E2, 0x552E, 0xB0E3, 0x555C, 0xB0E4, 0x552C,
+ 0xB0E5, 0x5563, 0xB0E6, 0x5533, 0xB0E7, 0x5541, 0xB0E8, 0x5557,
+ 0xB0E9, 0x5708, 0xB0EA, 0x570B, 0xB0EB, 0x5709, 0xB0EC, 0x57DF,
+ 0xB0ED, 0x5805, 0xB0EE, 0x580A, 0xB0EF, 0x5806, 0xB0F0, 0x57E0,
+ 0xB0F1, 0x57E4, 0xB0F2, 0x57FA, 0xB0F3, 0x5802, 0xB0F4, 0x5835,
+ 0xB0F5, 0x57F7, 0xB0F6, 0x57F9, 0xB0F7, 0x5920, 0xB0F8, 0x5962,
+ 0xB0F9, 0x5A36, 0xB0FA, 0x5A41, 0xB0FB, 0x5A49, 0xB0FC, 0x5A66,
+ 0xB0FD, 0x5A6A, 0xB0FE, 0x5A40, 0xB140, 0x5A3C, 0xB141, 0x5A62,
+ 0xB142, 0x5A5A, 0xB143, 0x5A46, 0xB144, 0x5A4A, 0xB145, 0x5B70,
+ 0xB146, 0x5BC7, 0xB147, 0x5BC5, 0xB148, 0x5BC4, 0xB149, 0x5BC2,
+ 0xB14A, 0x5BBF, 0xB14B, 0x5BC6, 0xB14C, 0x5C09, 0xB14D, 0x5C08,
+ 0xB14E, 0x5C07, 0xB14F, 0x5C60, 0xB150, 0x5C5C, 0xB151, 0x5C5D,
+ 0xB152, 0x5D07, 0xB153, 0x5D06, 0xB154, 0x5D0E, 0xB155, 0x5D1B,
+ 0xB156, 0x5D16, 0xB157, 0x5D22, 0xB158, 0x5D11, 0xB159, 0x5D29,
+ 0xB15A, 0x5D14, 0xB15B, 0x5D19, 0xB15C, 0x5D24, 0xB15D, 0x5D27,
+ 0xB15E, 0x5D17, 0xB15F, 0x5DE2, 0xB160, 0x5E38, 0xB161, 0x5E36,
+ 0xB162, 0x5E33, 0xB163, 0x5E37, 0xB164, 0x5EB7, 0xB165, 0x5EB8,
+ 0xB166, 0x5EB6, 0xB167, 0x5EB5, 0xB168, 0x5EBE, 0xB169, 0x5F35,
+ 0xB16A, 0x5F37, 0xB16B, 0x5F57, 0xB16C, 0x5F6C, 0xB16D, 0x5F69,
+ 0xB16E, 0x5F6B, 0xB16F, 0x5F97, 0xB170, 0x5F99, 0xB171, 0x5F9E,
+ 0xB172, 0x5F98, 0xB173, 0x5FA1, 0xB174, 0x5FA0, 0xB175, 0x5F9C,
+ 0xB176, 0x607F, 0xB177, 0x60A3, 0xB178, 0x6089, 0xB179, 0x60A0,
+ 0xB17A, 0x60A8, 0xB17B, 0x60CB, 0xB17C, 0x60B4, 0xB17D, 0x60E6,
+ 0xB17E, 0x60BD, 0xB1A1, 0x60C5, 0xB1A2, 0x60BB, 0xB1A3, 0x60B5,
+ 0xB1A4, 0x60DC, 0xB1A5, 0x60BC, 0xB1A6, 0x60D8, 0xB1A7, 0x60D5,
+ 0xB1A8, 0x60C6, 0xB1A9, 0x60DF, 0xB1AA, 0x60B8, 0xB1AB, 0x60DA,
+ 0xB1AC, 0x60C7, 0xB1AD, 0x621A, 0xB1AE, 0x621B, 0xB1AF, 0x6248,
+ 0xB1B0, 0x63A0, 0xB1B1, 0x63A7, 0xB1B2, 0x6372, 0xB1B3, 0x6396,
+ 0xB1B4, 0x63A2, 0xB1B5, 0x63A5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, 0xB1FA, 0x689F, 0xB1FB, 0x68A1,
+ 0xB1FC, 0x6882, 0xB1FD, 0x6B32, 0xB1FE, 0x6BBA, 0xB240, 0x6BEB,
+ 0xB241, 0x6BEC, 0xB242, 0x6C2B, 0xB243, 0x6D8E, 0xB244, 0x6DBC,
+ 0xB245, 0x6DF3, 0xB246, 0x6DD9, 0xB247, 0x6DB2, 0xB248, 0x6DE1,
+ 0xB249, 0x6DCC, 0xB24A, 0x6DE4, 0xB24B, 0x6DFB, 0xB24C, 0x6DFA,
+ 0xB24D, 0x6E05, 0xB24E, 0x6DC7, 0xB24F, 0x6DCB, 0xB250, 0x6DAF,
+ 0xB251, 0x6DD1, 0xB252, 0x6DAE, 0xB253, 0x6DDE, 0xB254, 0x6DF9,
+ 0xB255, 0x6DB8, 0xB256, 0x6DF7, 0xB257, 0x6DF5, 0xB258, 0x6DC5,
+ 0xB259, 0x6DD2, 0xB25A, 0x6E1A, 0xB25B, 0x6DB5, 0xB25C, 0x6DDA,
+ 0xB25D, 0x6DEB, 0xB25E, 0x6DD8, 0xB25F, 0x6DEA, 0xB260, 0x6DF1,
+ 0xB261, 0x6DEE, 0xB262, 0x6DE8, 0xB263, 0x6DC6, 0xB264, 0x6DC4,
+ 0xB265, 0x6DAA, 0xB266, 0x6DEC, 0xB267, 0x6DBF, 0xB268, 0x6DE6,
+ 0xB269, 0x70F9, 0xB26A, 0x7109, 0xB26B, 0x710A, 0xB26C, 0x70FD,
+ 0xB26D, 0x70EF, 0xB26E, 0x723D, 0xB26F, 0x727D, 0xB270, 0x7281,
+ 0xB271, 0x731C, 0xB272, 0x731B, 0xB273, 0x7316, 0xB274, 0x7313,
+ 0xB275, 0x7319, 0xB276, 0x7387, 0xB277, 0x7405, 0xB278, 0x740A,
+ 0xB279, 0x7403, 0xB27A, 0x7406, 0xB27B, 0x73FE, 0xB27C, 0x740D,
+ 0xB27D, 0x74E0, 0xB27E, 0x74F6, 0xB2A1, 0x74F7, 0xB2A2, 0x751C,
+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8116, 0xB2E5, 0x8123, 0xB2E6, 0x812B,
+ 0xB2E7, 0x8129, 0xB2E8, 0x8130, 0xB2E9, 0x8124, 0xB2EA, 0x8202,
+ 0xB2EB, 0x8235, 0xB2EC, 0x8237, 0xB2ED, 0x8236, 0xB2EE, 0x8239,
+ 0xB2EF, 0x838E, 0xB2F0, 0x839E, 0xB2F1, 0x8398, 0xB2F2, 0x8378,
+ 0xB2F3, 0x83A2, 0xB2F4, 0x8396, 0xB2F5, 0x83BD, 0xB2F6, 0x83AB,
+ 0xB2F7, 0x8392, 0xB2F8, 0x838A, 0xB2F9, 0x8393, 0xB2FA, 0x8389,
+ 0xB2FB, 0x83A0, 0xB2FC, 0x8377, 0xB2FD, 0x837B, 0xB2FE, 0x837C,
+ 0xB340, 0x8386, 0xB341, 0x83A7, 0xB342, 0x8655, 0xB343, 0x5F6A,
+ 0xB344, 0x86C7, 0xB345, 0x86C0, 0xB346, 0x86B6, 0xB347, 0x86C4,
+ 0xB348, 0x86B5, 0xB349, 0x86C6, 0xB34A, 0x86CB, 0xB34B, 0x86B1,
+ 0xB34C, 0x86AF, 0xB34D, 0x86C9, 0xB34E, 0x8853, 0xB34F, 0x889E,
+ 0xB350, 0x8888, 0xB351, 0x88AB, 0xB352, 0x8892, 0xB353, 0x8896,
+ 0xB354, 0x888D, 0xB355, 0x888B, 0xB356, 0x8993, 0xB357, 0x898F,
+ 0xB358, 0x8A2A, 0xB359, 0x8A1D, 0xB35A, 0x8A23, 0xB35B, 0x8A25,
+ 0xB35C, 0x8A31, 0xB35D, 0x8A2D, 0xB35E, 0x8A1F, 0xB35F, 0x8A1B,
+ 0xB360, 0x8A22, 0xB361, 0x8C49, 0xB362, 0x8C5A, 0xB363, 0x8CA9,
+ 0xB364, 0x8CAC, 0xB365, 0x8CAB, 0xB366, 0x8CA8, 0xB367, 0x8CAA,
+ 0xB368, 0x8CA7, 0xB369, 0x8D67, 0xB36A, 0x8D66, 0xB36B, 0x8DBE,
+ 0xB36C, 0x8DBA, 0xB36D, 0x8EDB, 0xB36E, 0x8EDF, 0xB36F, 0x9019,
+ 0xB370, 0x900D, 0xB371, 0x901A, 0xB372, 0x9017, 0xB373, 0x9023,
+ 0xB374, 0x901F, 0xB375, 0x901D, 0xB376, 0x9010, 0xB377, 0x9015,
+ 0xB378, 0x901E, 0xB379, 0x9020, 0xB37A, 0x900F, 0xB37B, 0x9022,
+ 0xB37C, 0x9016, 0xB37D, 0x901B, 0xB37E, 0x9014, 0xB3A1, 0x90E8,
+ 0xB3A2, 0x90ED, 0xB3A3, 0x90FD, 0xB3A4, 0x9157, 0xB3A5, 0x91CE,
+ 0xB3A6, 0x91F5, 0xB3A7, 0x91E6, 0xB3A8, 0x91E3, 0xB3A9, 0x91E7,
+ 0xB3AA, 0x91ED, 0xB3AB, 0x91E9, 0xB3AC, 0x9589, 0xB3AD, 0x966A,
+ 0xB3AE, 0x9675, 0xB3AF, 0x9673, 0xB3B0, 0x9678, 0xB3B1, 0x9670,
+ 0xB3B2, 0x9674, 0xB3B3, 0x9676, 0xB3B4, 0x9677, 0xB3B5, 0x966C,
+ 0xB3B6, 0x96C0, 0xB3B7, 0x96EA, 0xB3B8, 0x96E9, 0xB3B9, 0x7AE0,
+ 0xB3BA, 0x7ADF, 0xB3BB, 0x9802, 0xB3BC, 0x9803, 0xB3BD, 0x9B5A,
+ 0xB3BE, 0x9CE5, 0xB3BF, 0x9E75, 0xB3C0, 0x9E7F, 0xB3C1, 0x9EA5,
+ 0xB3C2, 0x9EBB, 0xB3C3, 0x50A2, 0xB3C4, 0x508D, 0xB3C5, 0x5085,
+ 0xB3C6, 0x5099, 0xB3C7, 0x5091, 0xB3C8, 0x5080, 0xB3C9, 0x5096,
+ 0xB3CA, 0x5098, 0xB3CB, 0x509A, 0xB3CC, 0x6700, 0xB3CD, 0x51F1,
+ 0xB3CE, 0x5272, 0xB3CF, 0x5274, 0xB3D0, 0x5275, 0xB3D1, 0x5269,
+ 0xB3D2, 0x52DE, 0xB3D3, 0x52DD, 0xB3D4, 0x52DB, 0xB3D5, 0x535A,
+ 0xB3D6, 0x53A5, 0xB3D7, 0x557B, 0xB3D8, 0x5580, 0xB3D9, 0x55A7,
+ 0xB3DA, 0x557C, 0xB3DB, 0x558A, 0xB3DC, 0x559D, 0xB3DD, 0x5598,
+ 0xB3DE, 0x5582, 0xB3DF, 0x559C, 0xB3E0, 0x55AA, 0xB3E1, 0x5594,
+ 0xB3E2, 0x5587, 0xB3E3, 0x558B, 0xB3E4, 0x5583, 0xB3E5, 0x55B3,
+ 0xB3E6, 0x55AE, 0xB3E7, 0x559F, 0xB3E8, 0x553E, 0xB3E9, 0x55B2,
+ 0xB3EA, 0x559A, 0xB3EB, 0x55BB, 0xB3EC, 0x55AC, 0xB3ED, 0x55B1,
+ 0xB3EE, 0x557E, 0xB3EF, 0x5589, 0xB3F0, 0x55AB, 0xB3F1, 0x5599,
+ 0xB3F2, 0x570D, 0xB3F3, 0x582F, 0xB3F4, 0x582A, 0xB3F5, 0x5834,
+ 0xB3F6, 0x5824, 0xB3F7, 0x5830, 0xB3F8, 0x5831, 0xB3F9, 0x5821,
+ 0xB3FA, 0x581D, 0xB3FB, 0x5820, 0xB3FC, 0x58F9, 0xB3FD, 0x58FA,
+ 0xB3FE, 0x5960, 0xB440, 0x5A77, 0xB441, 0x5A9A, 0xB442, 0x5A7F,
+ 0xB443, 0x5A92, 0xB444, 0x5A9B, 0xB445, 0x5AA7, 0xB446, 0x5B73,
+ 0xB447, 0x5B71, 0xB448, 0x5BD2, 0xB449, 0x5BCC, 0xB44A, 0x5BD3,
+ 0xB44B, 0x5BD0, 0xB44C, 0x5C0A, 0xB44D, 0x5C0B, 0xB44E, 0x5C31,
+ 0xB44F, 0x5D4C, 0xB450, 0x5D50, 0xB451, 0x5D34, 0xB452, 0x5D47,
+ 0xB453, 0x5DFD, 0xB454, 0x5E45, 0xB455, 0x5E3D, 0xB456, 0x5E40,
+ 0xB457, 0x5E43, 0xB458, 0x5E7E, 0xB459, 0x5ECA, 0xB45A, 0x5EC1,
+ 0xB45B, 0x5EC2, 0xB45C, 0x5EC4, 0xB45D, 0x5F3C, 0xB45E, 0x5F6D,
+ 0xB45F, 0x5FA9, 0xB460, 0x5FAA, 0xB461, 0x5FA8, 0xB462, 0x60D1,
+ 0xB463, 0x60E1, 0xB464, 0x60B2, 0xB465, 0x60B6, 0xB466, 0x60E0,
+ 0xB467, 0x611C, 0xB468, 0x6123, 0xB469, 0x60FA, 0xB46A, 0x6115,
+ 0xB46B, 0x60F0, 0xB46C, 0x60FB, 0xB46D, 0x60F4, 0xB46E, 0x6168,
+ 0xB46F, 0x60F1, 0xB470, 0x610E, 0xB471, 0x60F6, 0xB472, 0x6109,
+ 0xB473, 0x6100, 0xB474, 0x6112, 0xB475, 0x621F, 0xB476, 0x6249,
+ 0xB477, 0x63A3, 0xB478, 0x638C, 0xB479, 0x63CF, 0xB47A, 0x63C0,
+ 0xB47B, 0x63E9, 0xB47C, 0x63C9, 0xB47D, 0x63C6, 0xB47E, 0x63CD,
+ 0xB4A1, 0x63D2, 0xB4A2, 0x63E3, 0xB4A3, 0x63D0, 0xB4A4, 0x63E1,
+ 0xB4A5, 0x63D6, 0xB4A6, 0x63ED, 0xB4A7, 0x63EE, 0xB4A8, 0x6376,
+ 0xB4A9, 0x63F4, 0xB4AA, 0x63EA, 0xB4AB, 0x63DB, 0xB4AC, 0x6452,
+ 0xB4AD, 0x63DA, 0xB4AE, 0x63F9, 0xB4AF, 0x655E, 0xB4B0, 0x6566,
+ 0xB4B1, 0x6562, 0xB4B2, 0x6563, 0xB4B3, 0x6591, 0xB4B4, 0x6590,
+ 0xB4B5, 0x65AF, 0xB4B6, 0x666E, 0xB4B7, 0x6670, 0xB4B8, 0x6674,
+ 0xB4B9, 0x6676, 0xB4BA, 0x666F, 0xB4BB, 0x6691, 0xB4BC, 0x667A,
+ 0xB4BD, 0x667E, 0xB4BE, 0x6677, 0xB4BF, 0x66FE, 0xB4C0, 0x66FF,
+ 0xB4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4E, 0xB543, 0x6E63, 0xB544, 0x6E44, 0xB545, 0x6E72,
+ 0xB546, 0x6E69, 0xB547, 0x6E5F, 0xB548, 0x7119, 0xB549, 0x711A,
+ 0xB54A, 0x7126, 0xB54B, 0x7130, 0xB54C, 0x7121, 0xB54D, 0x7136,
+ 0xB54E, 0x716E, 0xB54F, 0x711C, 0xB550, 0x724C, 0xB551, 0x7284,
+ 0xB552, 0x7280, 0xB553, 0x7336, 0xB554, 0x7325, 0xB555, 0x7334,
+ 0xB556, 0x7329, 0xB557, 0x743A, 0xB558, 0x742A, 0xB559, 0x7433,
+ 0xB55A, 0x7422, 0xB55B, 0x7425, 0xB55C, 0x7435, 0xB55D, 0x7436,
+ 0xB55E, 0x7434, 0xB55F, 0x742F, 0xB560, 0x741B, 0xB561, 0x7426,
+ 0xB562, 0x7428, 0xB563, 0x7525, 0xB564, 0x7526, 0xB565, 0x756B,
+ 0xB566, 0x756A, 0xB567, 0x75E2, 0xB568, 0x75DB, 0xB569, 0x75E3,
+ 0xB56A, 0x75D9, 0xB56B, 0x75D8, 0xB56C, 0x75DE, 0xB56D, 0x75E0,
+ 0xB56E, 0x767B, 0xB56F, 0x767C, 0xB570, 0x7696, 0xB571, 0x7693,
+ 0xB572, 0x76B4, 0xB573, 0x76DC, 0xB574, 0x774F, 0xB575, 0x77ED,
+ 0xB576, 0x785D, 0xB577, 0x786C, 0xB578, 0x786F, 0xB579, 0x7A0D,
+ 0xB57A, 0x7A08, 0xB57B, 0x7A0B, 0xB57C, 0x7A05, 0xB57D, 0x7A00,
+ 0xB57E, 0x7A98, 0xB5A1, 0x7A97, 0xB5A2, 0x7A96, 0xB5A3, 0x7AE5,
+ 0xB5A4, 0x7AE3, 0xB5A5, 0x7B49, 0xB5A6, 0x7B56, 0xB5A7, 0x7B46,
+ 0xB5A8, 0x7B50, 0xB5A9, 0x7B52, 0xB5AA, 0x7B54, 0xB5AB, 0x7B4D,
+ 0xB5AC, 0x7B4B, 0xB5AD, 0x7B4F,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5F0, 0x86E4, 0xB5F1, 0x86D0, 0xB5F2, 0x86DE, 0xB5F3, 0x8857,
+ 0xB5F4, 0x88C1, 0xB5F5, 0x88C2, 0xB5F6, 0x88B1, 0xB5F7, 0x8983,
+ 0xB5F8, 0x8996, 0xB5F9, 0x8A3B, 0xB5FA, 0x8A60, 0xB5FB, 0x8A55,
+ 0xB5FC, 0x8A5E, 0xB5FD, 0x8A3C, 0xB5FE, 0x8A41, 0xB640, 0x8A54,
+ 0xB641, 0x8A5B, 0xB642, 0x8A50, 0xB643, 0x8A46, 0xB644, 0x8A34,
+ 0xB645, 0x8A3A, 0xB646, 0x8A36, 0xB647, 0x8A56, 0xB648, 0x8C61,
+ 0xB649, 0x8C82, 0xB64A, 0x8CAF, 0xB64B, 0x8CBC, 0xB64C, 0x8CB3,
+ 0xB64D, 0x8CBD, 0xB64E, 0x8CC1, 0xB64F, 0x8CBB, 0xB650, 0x8CC0,
+ 0xB651, 0x8CB4, 0xB652, 0x8CB7, 0xB653, 0x8CB6, 0xB654, 0x8CBF,
+ 0xB655, 0x8CB8, 0xB656, 0x8D8A, 0xB657, 0x8D85, 0xB658, 0x8D81,
+ 0xB659, 0x8DCE, 0xB65A, 0x8DDD, 0xB65B, 0x8DCB, 0xB65C, 0x8DDA,
+ 0xB65D, 0x8DD1, 0xB65E, 0x8DCC, 0xB65F, 0x8DDB, 0xB660, 0x8DC6,
+ 0xB661, 0x8EFB, 0xB662, 0x8EF8, 0xB663, 0x8EFC, 0xB664, 0x8F9C,
+ 0xB665, 0x902E, 0xB666, 0x9035, 0xB667, 0x9031, 0xB668, 0x9038,
+ 0xB669, 0x9032, 0xB66A, 0x9036, 0xB66B, 0x9102, 0xB66C, 0x90F5,
+ 0xB66D, 0x9109, 0xB66E, 0x90FE, 0xB66F, 0x9163, 0xB670, 0x9165,
+ 0xB671, 0x91CF, 0xB672, 0x9214, 0xB673, 0x9215, 0xB674, 0x9223,
+ 0xB675, 0x9209, 0xB676, 0x921E, 0xB677, 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x55CE, 0xB6DD, 0x55DC, 0xB6DE, 0x55C7,
+ 0xB6DF, 0x55D1, 0xB6E0, 0x55E3, 0xB6E1, 0x55E4, 0xB6E2, 0x55EF,
+ 0xB6E3, 0x55DA, 0xB6E4, 0x55E1, 0xB6E5, 0x55C5, 0xB6E6, 0x55C6,
+ 0xB6E7, 0x55E5, 0xB6E8, 0x55C9, 0xB6E9, 0x5712, 0xB6EA, 0x5713,
+ 0xB6EB, 0x585E, 0xB6EC, 0x5851, 0xB6ED, 0x5858, 0xB6EE, 0x5857,
+ 0xB6EF, 0x585A, 0xB6F0, 0x5854, 0xB6F1, 0x586B, 0xB6F2, 0x584C,
+ 0xB6F3, 0x586D, 0xB6F4, 0x584A, 0xB6F5, 0x5862, 0xB6F6, 0x5852,
+ 0xB6F7, 0x584B, 0xB6F8, 0x5967, 0xB6F9, 0x5AC1, 0xB6FA, 0x5AC9,
+ 0xB6FB, 0x5ACC, 0xB6FC, 0x5ABE, 0xB6FD, 0x5ABD, 0xB6FE, 0x5ABC,
+ 0xB740, 0x5AB3, 0xB741, 0x5AC2, 0xB742, 0x5AB2, 0xB743, 0x5D69,
+ 0xB744, 0x5D6F, 0xB745, 0x5E4C, 0xB746, 0x5E79, 0xB747, 0x5EC9,
+ 0xB748, 0x5EC8, 0xB749, 0x5F12, 0xB74A, 0x5F59, 0xB74B, 0x5FAC,
+ 0xB74C, 0x5FAE, 0xB74D, 0x611A, 0xB74E, 0x610F, 0xB74F, 0x6148,
+ 0xB750, 0x611F, 0xB751, 0x60F3, 0xB752, 0x611B, 0xB753, 0x60F9,
+ 0xB754, 0x6101, 0xB755, 0x6108, 0xB756, 0x614E, 0xB757, 0x614C,
+ 0xB758, 0x6144, 0xB759, 0x614D, 0xB75A, 0x613E, 0xB75B, 0x6134,
+ 0xB75C, 0x6127, 0xB75D, 0x610D, 0xB75E, 0x6106, 0xB75F, 0x6137,
+ 0xB760, 0x6221, 0xB761, 0x6222, 0xB762, 0x6413, 0xB763, 0x643E,
+ 0xB764, 0x641E, 0xB765, 0x642A, 0xB766, 0x642D, 0xB767, 0x643D,
+ 0xB768, 0x642C, 0xB769, 0x640F, 0xB76A, 0x641C, 0xB76B, 0x6414,
+ 0xB76C, 0x640D, 0xB76D, 0x6436, 0xB76E, 0x6416, 0xB76F, 0x6417,
+ 0xB770, 0x6406, 0xB771, 0x656C, 0xB772, 0x659F, 0xB773, 0x65B0,
+ 0xB774, 0x6697, 0xB775, 0x6689, 0xB776, 0x6687, 0xB777, 0x6688,
+ 0xB778, 0x6696, 0xB779, 0x6684, 0xB77A, 0x6698, 0xB77B, 0x668D,
+ 0xB77C, 0x6703, 0xB77D, 0x6994, 0xB77E, 0x696D, 0xB7A1, 0x695A,
+ 0xB7A2, 0x6977, 0xB7A3, 0x6960, 0xB7A4, 0x6954, 0xB7A5, 0x6975,
+ 0xB7A6, 0x6930, 0xB7A7, 0x6982, 0xB7A8, 0x694A, 0xB7A9, 0x6968,
+ 0xB7AA, 0x696B, 0xB7AB, 0x695E, 0xB7AC, 0x6953, 0xB7AD, 0x6979,
+ 0xB7AE, 0x6986, 0xB7AF, 0x695D, 0xB7B0, 0x6963, 0xB7B1, 0x695B,
+ 0xB7B2, 0x6B47, 0xB7B3, 0x6B72, 0xB7B4, 0x6BC0, 0xB7B5, 0x6BBF,
+ 0xB7B6, 0x6BD3, 0xB7B7, 0x6BFD, 0xB7B8, 0x6EA2, 0xB7B9, 0x6EAF,
+ 0xB7BA, 0x6ED3, 0xB7BB, 0x6EB6, 0xB7BC, 0x6EC2, 0xB7BD, 0x6E90,
+ 0xB7BE, 0x6E9D, 0xB7BF, 0x6EC7, 0xB7C0, 0x6EC5, 0xB7C1, 0x6EA5,
+ 0xB7C2, 0x6E98, 0xB7C3, 0x6EBC, 0xB7C4, 0x6EBA, 0xB7C5, 0x6EAB,
+ 0xB7C6, 0x6ED1, 0xB7C7, 0x6E96, 0xB7C8, 0x6E9C, 0xB7C9, 0x6EC4,
+ 0xB7CA, 0x6ED4, 0xB7CB, 0x6EAA, 0xB7CC, 0x6EA7, 0xB7CD, 0x6EB4,
+ 0xB7CE, 0x714E, 0xB7CF, 0x7159, 0xB7D0, 0x7169, 0xB7D1, 0x7164,
+ 0xB7D2, 0x7149, 0xB7D3, 0x7167, 0xB7D4, 0x715C, 0xB7D5, 0x716C,
+ 0xB7D6, 0x7166, 0xB7D7, 0x714C, 0xB7D8, 0x7165, 0xB7D9, 0x715E,
+ 0xB7DA, 0x7146, 0xB7DB, 0x7168, 0xB7DC, 0x7156, 0xB7DD, 0x723A,
+ 0xB7DE, 0x7252, 0xB7DF, 0x7337, 0xB7E0, 0x7345, 0xB7E1, 0x733F,
+ 0xB7E2, 0x733E, 0xB7E3, 0x746F, 0xB7E4, 0x745A, 0xB7E5, 0x7455,
+ 0xB7E6, 0x745F, 0xB7E7, 0x745E, 0xB7E8, 0x7441, 0xB7E9, 0x743F,
+ 0xB7EA, 0x7459, 0xB7EB, 0x745B, 0xB7EC, 0x745C, 0xB7ED, 0x7576,
+ 0xB7EE, 0x7578, 0xB7EF, 0x7600, 0xB7F0, 0x75F0, 0xB7F1, 0x7601,
+ 0xB7F2, 0x75F2, 0xB7F3, 0x75F1, 0xB7F4, 0x75FA, 0xB7F5, 0x75FF,
+ 0xB7F6, 0x75F4, 0xB7F7, 0x75F3, 0xB7F8, 0x76DE, 0xB7F9, 0x76DF,
+ 0xB7FA, 0x775B, 0xB7FB, 0x776B, 0xB7FC, 0x7766, 0xB7FD, 0x775E,
+ 0xB7FE, 0x7763, 0xB840, 0x7779, 0xB841, 0x776A, 0xB842, 0x776C,
+ 0xB843, 0x775C, 0xB844, 0x7765, 0xB845, 0x7768, 0xB846, 0x7762,
+ 0xB847, 0x77EE, 0xB848, 0x788E, 0xB849, 0x78B0, 0xB84A, 0x7897,
+ 0xB84B, 0x7898, 0xB84C, 0x788C, 0xB84D, 0x7889, 0xB84E, 0x787C,
+ 0xB84F, 0x7891, 0xB850, 0x7893, 0xB851, 0x787F, 0xB852, 0x797A,
+ 0xB853, 0x797F, 0xB854, 0x7981, 0xB855, 0x842C, 0xB856, 0x79BD,
+ 0xB857, 0x7A1C, 0xB858, 0x7A1A, 0xB859, 0x7A20, 0xB85A, 0x7A14,
+ 0xB85B, 0x7A1F, 0xB85C, 0x7A1E, 0xB85D, 0x7A9F, 0xB85E, 0x7AA0,
+ 0xB85F, 0x7B77, 0xB860, 0x7BC0, 0xB861, 0x7B60, 0xB862, 0x7B6E,
+ 0xB863, 0x7B67, 0xB864, 0x7CB1, 0xB865, 0x7CB3, 0xB866, 0x7CB5,
+ 0xB867, 0x7D93, 0xB868, 0x7D79, 0xB869, 0x7D91, 0xB86A, 0x7D81,
+ 0xB86B, 0x7D8F, 0xB86C, 0x7D5B, 0xB86D, 0x7F6E, 0xB86E, 0x7F69,
+ 0xB86F, 0x7F6A, 0xB870, 0x7F72, 0xB871, 0x7FA9, 0xB872, 0x7FA8,
+ 0xB873, 0x7FA4, 0xB874, 0x8056, 0xB875, 0x8058, 0xB876, 0x8086,
+ 0xB877, 0x8084, 0xB878, 0x8171, 0xB879, 0x8170, 0xB87A, 0x8178,
+ 0xB87B, 0x8165, 0xB87C, 0x816E, 0xB87D, 0x8173, 0xB87E, 0x816B,
+ 0xB8A1, 0x8179, 0xB8A2, 0x817A, 0xB8A3, 0x8166, 0xB8A4, 0x8205,
+ 0xB8A5, 0x8247, 0xB8A6, 0x8482, 0xB8A7, 0x8477, 0xB8A8, 0x843D,
+ 0xB8A9, 0x8431, 0xB8AA, 0x8475, 0xB8AB, 0x8466, 0xB8AC, 0x846B,
+ 0xB8AD, 0x8449, 0xB8AE, 0x846C, 0xB8AF, 0x845B, 0xB8B0, 0x843C,
+ 0xB8B1, 0x8435, 0xB8B2, 0x8461, 0xB8B3, 0x8463, 0xB8B4, 0x8469,
+ 0xB8B5, 0x846D, 0xB8B6, 0x8446, 0xB8B7, 0x865E, 0xB8B8, 0x865C,
+ 0xB8B9, 0x865F, 0xB8BA, 0x86F9, 0xB8BB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B, 0x8F03, 0xB8FC, 0x8F09,
+ 0xB8FD, 0x8EFE, 0xB8FE, 0x8F0A, 0xB940, 0x8F9F, 0xB941, 0x8FB2,
+ 0xB942, 0x904B, 0xB943, 0x904A, 0xB944, 0x9053, 0xB945, 0x9042,
+ 0xB946, 0x9054, 0xB947, 0x903C, 0xB948, 0x9055, 0xB949, 0x9050,
+ 0xB94A, 0x9047, 0xB94B, 0x904F, 0xB94C, 0x904E, 0xB94D, 0x904D,
+ 0xB94E, 0x9051, 0xB94F, 0x903E, 0xB950, 0x9041, 0xB951, 0x9112,
+ 0xB952, 0x9117, 0xB953, 0x916C, 0xB954, 0x916A, 0xB955, 0x9169,
+ 0xB956, 0x91C9, 0xB957, 0x9237, 0xB958, 0x9257, 0xB959, 0x9238,
+ 0xB95A, 0x923D, 0xB95B, 0x9240, 0xB95C, 0x923E, 0xB95D, 0x925B,
+ 0xB95E, 0x924B, 0xB95F, 0x9264, 0xB960, 0x9251, 0xB961, 0x9234,
+ 0xB962, 0x9249, 0xB963, 0x924D, 0xB964, 0x9245, 0xB965, 0x9239,
+ 0xB966, 0x923F, 0xB967, 0x925A, 0xB968, 0x9598, 0xB969, 0x9698,
+ 0xB96A, 0x9694, 0xB96B, 0x9695, 0xB96C, 0x96CD, 0xB96D, 0x96CB,
+ 0xB96E, 0x96C9, 0xB96F, 0x96CA, 0xB970, 0x96F7, 0xB971, 0x96FB,
+ 0xB972, 0x96F9, 0xB973, 0x96F6, 0xB974, 0x9756, 0xB975, 0x9774,
+ 0xB976, 0x9776, 0xB977, 0x9810, 0xB978, 0x9811, 0xB979, 0x9813,
+ 0xB97A, 0x980A, 0xB97B, 0x9812, 0xB97C, 0x980C, 0xB97D, 0x98FC,
+ 0xB97E, 0x98F4, 0xB9A1, 0x98FD, 0xB9A2, 0x98FE, 0xB9A3, 0x99B3,
+ 0xB9A4, 0x99B1, 0xB9A5, 0x99B4, 0xB9A6, 0x9AE1, 0xB9A7, 0x9CE9,
+ 0xB9A8, 0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 0xBC40, 0x5287, 0xBC41, 0x5288, 0xBC42, 0x5289,
+ 0xBC43, 0x528D, 0xBC44, 0x528A, 0xBC45, 0x52F0, 0xBC46, 0x53B2,
+ 0xBC47, 0x562E, 0xBC48, 0x563B, 0xBC49, 0x5639, 0xBC4A, 0x5632,
+ 0xBC4B, 0x563F, 0xBC4C, 0x5634, 0xBC4D, 0x5629, 0xBC4E, 0x5653,
+ 0xBC4F, 0x564E, 0xBC50, 0x5657, 0xBC51, 0x5674, 0xBC52, 0x5636,
+ 0xBC53, 0x562F, 0xBC54, 0x5630, 0xBC55, 0x5880, 0xBC56, 0x589F,
+ 0xBC57, 0x589E, 0xBC58, 0x58B3, 0xBC59, 0x589C, 0xBC5A, 0x58AE,
+ 0xBC5B, 0x58A9, 0xBC5C, 0x58A6, 0xBC5D, 0x596D, 0xBC5E, 0x5B09,
+ 0xBC5F, 0x5AFB, 0xBC60, 0x5B0B, 0xBC61, 0x5AF5, 0xBC62, 0x5B0C,
+ 0xBC63, 0x5B08, 0xBC64, 0x5BEE, 0xBC65, 0x5BEC, 0xBC66, 0x5BE9,
+ 0xBC67, 0x5BEB, 0xBC68, 0x5C64, 0xBC69, 0x5C65, 0xBC6A, 0x5D9D,
+ 0xBC6B, 0x5D94, 0xBC6C, 0x5E62, 0xBC6D, 0x5E5F, 0xBC6E, 0x5E61,
+ 0xBC6F, 0x5EE2, 0xBC70, 0x5EDA, 0xBC71, 0x5EDF, 0xBC72, 0x5EDD,
+ 0xBC73, 0x5EE3, 0xBC74, 0x5EE0, 0xBC75, 0x5F48, 0xBC76, 0x5F71,
+ 0xBC77, 0x5FB7, 0xBC78, 0x5FB5, 0xBC79, 0x6176, 0xBC7A, 0x6167,
+ 0xBC7B, 0x616E, 0xBC7C, 0x615D, 0xBC7D, 0x6155, 0xBC7E, 0x6182,
+ 0xBCA1, 0x617C, 0xBCA2, 0x6170, 0xBCA3, 0x616B, 0xBCA4, 0x617E,
+ 0xBCA5, 0x61A7, 0xBCA6, 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BFE1, 0x8E44,
+ 0xBFE2, 0x8E31, 0xBFE3, 0x8E34, 0xBFE4, 0x8E42, 0xBFE5, 0x8E39,
+ 0xBFE6, 0x8E35, 0xBFE7, 0x8F3B, 0xBFE8, 0x8F2F, 0xBFE9, 0x8F38,
+ 0xBFEA, 0x8F33, 0xBFEB, 0x8FA8, 0xBFEC, 0x8FA6, 0xBFED, 0x9075,
+ 0xBFEE, 0x9074, 0xBFEF, 0x9078, 0xBFF0, 0x9072, 0xBFF1, 0x907C,
+ 0xBFF2, 0x907A, 0xBFF3, 0x9134, 0xBFF4, 0x9192, 0xBFF5, 0x9320,
+ 0xBFF6, 0x9336, 0xBFF7, 0x92F8, 0xBFF8, 0x9333, 0xBFF9, 0x932F,
+ 0xBFFA, 0x9322, 0xBFFB, 0x92FC, 0xBFFC, 0x932B, 0xBFFD, 0x9304,
+ 0xBFFE, 0x931A, 0xC040, 0x9310, 0xC041, 0x9326, 0xC042, 0x9321,
+ 0xC043, 0x9315, 0xC044, 0x932E, 0xC045, 0x9319, 0xC046, 0x95BB,
+ 0xC047, 0x96A7, 0xC048, 0x96A8, 0xC049, 0x96AA, 0xC04A, 0x96D5,
+ 0xC04B, 0x970E, 0xC04C, 0x9711, 0xC04D, 0x9716, 0xC04E, 0x970D,
+ 0xC04F, 0x9713, 0xC050, 0x970F, 0xC051, 0x975B, 0xC052, 0x975C,
+ 0xC053, 0x9766, 0xC054, 0x9798, 0xC055, 0x9830, 0xC056, 0x9838,
+ 0xC057, 0x983B, 0xC058, 0x9837, 0xC059, 0x982D, 0xC05A, 0x9839,
+ 0xC05B, 0x9824, 0xC05C, 0x9910, 0xC05D, 0x9928, 0xC05E, 0x991E,
+ 0xC05F, 0x991B, 0xC060, 0x9921, 0xC061, 0x991A, 0xC062, 0x99ED,
+ 0xC063, 0x99E2, 0xC064, 0x99F1, 0xC065, 0x9AB8, 0xC066, 0x9ABC,
+ 0xC067, 0x9AFB, 0xC068, 0x9AED, 0xC069, 0x9B28, 0xC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0,
+ 0xC152, 0x7CE0, 0xC153, 0x7CDC, 0xC154, 0x7CDE, 0xC155, 0x7CE2,
+ 0xC156, 0x7CDF, 0xC157, 0x7CD9, 0xC158, 0x7CDD, 0xC159, 0x7E2E,
+ 0xC15A, 0x7E3E, 0xC15B, 0x7E46, 0xC15C, 0x7E37, 0xC15D, 0x7E32,
+ 0xC15E, 0x7E43, 0xC15F, 0x7E2B, 0xC160, 0x7E3D, 0xC161, 0x7E31,
+ 0xC162, 0x7E45, 0xC163, 0x7E41, 0xC164, 0x7E34, 0xC165, 0x7E39,
+ 0xC166, 0x7E48, 0xC167, 0x7E35, 0xC168, 0x7E3F, 0xC169, 0x7E2F,
+ 0xC16A, 0x7F44, 0xC16B, 0x7FF3, 0xC16C, 0x7FFC, 0xC16D, 0x8071,
+ 0xC16E, 0x8072, 0xC16F, 0x8070, 0xC170, 0x806F, 0xC171, 0x8073,
+ 0xC172, 0x81C6, 0xC173, 0x81C3, 0xC174, 0x81BA, 0xC175, 0x81C2,
+ 0xC176, 0x81C0, 0xC177, 0x81BF, 0xC178, 0x81BD, 0xC179, 0x81C9,
+ 0xC17A, 0x81BE, 0xC17B, 0x81E8, 0xC17C, 0x8209, 0xC17D, 0x8271,
+ 0xC17E, 0x85AA, 0xC1A1, 0x8584, 0xC1A2, 0x857E, 0xC1A3, 0x859C,
+ 0xC1A4, 0x8591, 0xC1A5, 0x8594, 0xC1A6, 0x85AF, 0xC1A7, 0x859B,
+ 0xC1A8, 0x8587, 0xC1A9, 0x85A8, 0xC1AA, 0x858A, 0xC1AB, 0x8667,
+ 0xC1AC, 0x87C0, 0xC1AD, 0x87D1, 0xC1AE, 0x87B3, 0xC1AF, 0x87D2,
+ 0xC1B0, 0x87C6, 0xC1B1, 0x87AB, 0xC1B2, 0x87BB, 0xC1B3, 0x87BA,
+ 0xC1B4, 0x87C8, 0xC1B5, 0x87CB, 0xC1B6, 0x893B, 0xC1B7, 0x8936,
+ 0xC1B8, 0x8944, 0xC1B9, 0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 0x9846,
+ 0xC1FC, 0x98B6, 0xC1FD, 0x9935, 0xC1FE, 0x9A01, 0xC240, 0x99FF,
+ 0xC241, 0x9BAE, 0xC242, 0x9BAB, 0xC243, 0x9BAA, 0xC244, 0x9BAD,
+ 0xC245, 0x9D3B, 0xC246, 0x9D3F, 0xC247, 0x9E8B, 0xC248, 0x9ECF,
+ 0xC249, 0x9EDE, 0xC24A, 0x9EDC, 0xC24B, 0x9EDD, 0xC24C, 0x9EDB,
+ 0xC24D, 0x9F3E, 0xC24E, 0x9F4B, 0xC24F, 0x53E2, 0xC250, 0x5695,
+ 0xC251, 0x56AE, 0xC252, 0x58D9, 0xC253, 0x58D8, 0xC254, 0x5B38,
+ 0xC255, 0x5F5D, 0xC256, 0x61E3, 0xC257, 0x6233, 0xC258, 0x64F4,
+ 0xC259, 0x64F2, 0xC25A, 0x64FE, 0xC25B, 0x6506, 0xC25C, 0x64FA,
+ 0xC25D, 0x64FB, 0xC25E, 0x64F7, 0xC25F, 0x65B7, 0xC260, 0x66DC,
+ 0xC261, 0x6726, 0xC262, 0x6AB3, 0xC263, 0x6AAC, 0xC264, 0x6AC3,
+ 0xC265, 0x6ABB, 0xC266, 0x6AB8, 0xC267, 0x6AC2, 0xC268, 0x6AAE,
+ 0xC269, 0x6AAF, 0xC26A, 0x6B5F, 0xC26B, 0x6B78, 0xC26C, 0x6BAF,
+ 0xC26D, 0x7009, 0xC26E, 0x700B, 0xC26F, 0x6FFE, 0xC270, 0x7006,
+ 0xC271, 0x6FFA, 0xC272, 0x7011, 0xC273, 0x700F, 0xC274, 0x71FB,
+ 0xC275, 0x71FC, 0xC276, 0x71FE, 0xC277, 0x71F8, 0xC278, 0x7377,
+ 0xC279, 0x7375, 0xC27A, 0x74A7, 0xC27B, 0x74BF, 0xC27C, 0x7515,
+ 0xC27D, 0x7656, 0xC27E, 0x7658, 0xC2A1, 0x7652, 0xC2A2, 0x77BD,
+ 0xC2A3, 0x77BF, 0xC2A4, 0x77BB, 0xC2A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 0xC2E6, 0x91AC,
+ 0xC2E7, 0x91D0, 0xC2E8, 0x9394, 0xC2E9, 0x938A, 0xC2EA, 0x9396,
+ 0xC2EB, 0x93A2, 0xC2EC, 0x93B3, 0xC2ED, 0x93AE, 0xC2EE, 0x93AC,
+ 0xC2EF, 0x93B0, 0xC2F0, 0x9398, 0xC2F1, 0x939A, 0xC2F2, 0x9397,
+ 0xC2F3, 0x95D4, 0xC2F4, 0x95D6, 0xC2F5, 0x95D0, 0xC2F6, 0x95D5,
+ 0xC2F7, 0x96E2, 0xC2F8, 0x96DC, 0xC2F9, 0x96D9, 0xC2FA, 0x96DB,
+ 0xC2FB, 0x96DE, 0xC2FC, 0x9724, 0xC2FD, 0x97A3, 0xC2FE, 0x97A6,
+ 0xC340, 0x97AD, 0xC341, 0x97F9, 0xC342, 0x984D, 0xC343, 0x984F,
+ 0xC344, 0x984C, 0xC345, 0x984E, 0xC346, 0x9853, 0xC347, 0x98BA,
+ 0xC348, 0x993E, 0xC349, 0x993F, 0xC34A, 0x993D, 0xC34B, 0x992E,
+ 0xC34C, 0x99A5, 0xC34D, 0x9A0E, 0xC34E, 0x9AC1, 0xC34F, 0x9B03,
+ 0xC350, 0x9B06, 0xC351, 0x9B4F, 0xC352, 0x9B4E, 0xC353, 0x9B4D,
+ 0xC354, 0x9BCA, 0xC355, 0x9BC9, 0xC356, 0x9BFD, 0xC357, 0x9BC8,
+ 0xC358, 0x9BC0, 0xC359, 0x9D51, 0xC35A, 0x9D5D, 0xC35B, 0x9D60,
+ 0xC35C, 0x9EE0, 0xC35D, 0x9F15, 0xC35E, 0x9F2C, 0xC35F, 0x5133,
+ 0xC360, 0x56A5, 0xC361, 0x58DE, 0xC362, 0x58DF, 0xC363, 0x58E2,
+ 0xC364, 0x5BF5, 0xC365, 0x9F90, 0xC366, 0x5EEC, 0xC367, 0x61F2,
+ 0xC368, 0x61F7, 0xC369, 0x61F6, 0xC36A, 0x61F5, 0xC36B, 0x6500,
+ 0xC36C, 0x650F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, 0x56A8,
+ 0xC457, 0x56B7, 0xC458, 0x56B6, 0xC459, 0x56B4, 0xC45A, 0x56BC,
+ 0xC45B, 0x58E4, 0xC45C, 0x5B40, 0xC45D, 0x5B43, 0xC45E, 0x5B7D,
+ 0xC45F, 0x5BF6, 0xC460, 0x5DC9, 0xC461, 0x61F8, 0xC462, 0x61FA,
+ 0xC463, 0x6518, 0xC464, 0x6514, 0xC465, 0x6519, 0xC466, 0x66E6,
+ 0xC467, 0x6727, 0xC468, 0x6AEC, 0xC469, 0x703E, 0xC46A, 0x7030,
+ 0xC46B, 0x7032, 0xC46C, 0x7210, 0xC46D, 0x737B, 0xC46E, 0x74CF,
+ 0xC46F, 0x7662, 0xC470, 0x7665, 0xC471, 0x7926, 0xC472, 0x792A,
+ 0xC473, 0x792C, 0xC474, 0x792B, 0xC475, 0x7AC7, 0xC476, 0x7AF6,
+ 0xC477, 0x7C4C, 0xC478, 0x7C43, 0xC479, 0x7C4D, 0xC47A, 0x7CEF,
+ 0xC47B, 0x7CF0, 0xC47C, 0x8FAE, 0xC47D, 0x7E7D, 0xC47E, 0x7E7C,
+ 0xC4A1, 0x7E82, 0xC4A2, 0x7F4C, 0xC4A3, 0x8000, 0xC4A4, 0x81DA,
+ 0xC4A5, 0x8266, 0xC4A6, 0x85FB, 0xC4A7, 0x85F9, 0xC4A8, 0x8611,
+ 0xC4A9, 0x85FA, 0xC4AA, 0x8606, 0xC4AB, 0x860B, 0xC4AC, 0x8607,
+ 0xC4AD, 0x860A, 0xC4AE, 0x8814, 0xC4AF, 0x8815, 0xC4B0, 0x8964,
+ 0xC4B1, 0x89BA, 0xC4B2, 0x89F8, 0xC4B3, 0x8B70, 0xC4B4, 0x8B6C,
+ 0xC4B5, 0x8B66, 0xC4B6, 0x8B6F, 0xC4B7, 0x8B5F, 0xC4B8, 0x8B6B,
+ 0xC4B9, 0x8D0F, 0xC4BA, 0x8D0D, 0xC4BB, 0x8E89, 0xC4BC, 0x8E81,
+ 0xC4BD, 0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, 0x8B77, 0xC541, 0x8B7D,
+ 0xC542, 0x8D13, 0xC543, 0x8E8A, 0xC544, 0x8E8D, 0xC545, 0x8E8B,
+ 0xC546, 0x8F5F, 0xC547, 0x8FAF, 0xC548, 0x91BA, 0xC549, 0x942E,
+ 0xC54A, 0x9433, 0xC54B, 0x9435, 0xC54C, 0x943A, 0xC54D, 0x9438,
+ 0xC54E, 0x9432, 0xC54F, 0x942B, 0xC550, 0x95E2, 0xC551, 0x9738,
+ 0xC552, 0x9739, 0xC553, 0x9732, 0xC554, 0x97FF, 0xC555, 0x9867,
+ 0xC556, 0x9865, 0xC557, 0x9957, 0xC558, 0x9A45, 0xC559, 0x9A43,
+ 0xC55A, 0x9A40, 0xC55B, 0x9A3E, 0xC55C, 0x9ACF, 0xC55D, 0x9B54,
+ 0xC55E, 0x9B51, 0xC55F, 0x9C2D, 0xC560, 0x9C25, 0xC561, 0x9DAF,
+ 0xC562, 0x9DB4, 0xC563, 0x9DC2, 0xC564, 0x9DB8, 0xC565, 0x9E9D,
+ 0xC566, 0x9EEF, 0xC567, 0x9F19, 0xC568, 0x9F5C, 0xC569, 0x9F66,
+ 0xC56A, 0x9F67, 0xC56B, 0x513C, 0xC56C, 0x513B, 0xC56D, 0x56C8,
+ 0xC56E, 0x56CA, 0xC56F, 0x56C9, 0xC570, 0x5B7F, 0xC571, 0x5DD4,
+ 0xC572, 0x5DD2, 0xC573, 0x5F4E, 0xC574, 0x61FF, 0xC575, 0x6524,
+ 0xC576, 0x6B0A, 0xC577, 0x6B61, 0xC578, 0x7051, 0xC579, 0x7058,
+ 0xC57A, 0x7380, 0xC57B, 0x74E4, 0xC57C, 0x758A, 0xC57D, 0x766E,
+ 0xC57E, 0x766C, 0xC5A1, 0x79B3, 0xC5A2, 0x7C60, 0xC5A3, 0x7C5F,
+ 0xC5A4, 0x807E, 0xC5A5, 0x807D, 0xC5A6, 0x81DF, 0xC5A7, 0x8972,
+ 0xC5A8, 0x896F, 0xC5A9, 0x89FC, 0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0x9C54,
+ 0xC5EC, 0x9C57, 0xC5ED, 0x9C56, 0xC5EE, 0x9DE5, 0xC5EF, 0x9E9F,
+ 0xC5F0, 0x9EF4, 0xC5F1, 0x56D1, 0xC5F2, 0x58E9, 0xC5F3, 0x652C,
+ 0xC5F4, 0x705E, 0xC5F5, 0x7671, 0xC5F6, 0x7672, 0xC5F7, 0x77D7,
+ 0xC5F8, 0x7F50, 0xC5F9, 0x7F88, 0xC5FA, 0x8836, 0xC5FB, 0x8839,
+ 0xC5FC, 0x8862, 0xC5FD, 0x8B93, 0xC5FE, 0x8B92, 0xC640, 0x8B96,
+ 0xC641, 0x8277, 0xC642, 0x8D1B, 0xC643, 0x91C0, 0xC644, 0x946A,
+ 0xC645, 0x9742, 0xC646, 0x9748, 0xC647, 0x9744, 0xC648, 0x97C6,
+ 0xC649, 0x9870, 0xC64A, 0x9A5F, 0xC64B, 0x9B22, 0xC64C, 0x9B58,
+ 0xC64D, 0x9C5F, 0xC64E, 0x9DF9, 0xC64F, 0x9DFA, 0xC650, 0x9E7C,
+ 0xC651, 0x9E7D, 0xC652, 0x9F07, 0xC653, 0x9F77, 0xC654, 0x9F72,
+ 0xC655, 0x5EF3, 0xC656, 0x6B16, 0xC657, 0x7063, 0xC658, 0x7C6C,
+ 0xC659, 0x7C6E, 0xC65A, 0x883B, 0xC65B, 0x89C0, 0xC65C, 0x8EA1,
+ 0xC65D, 0x91C1, 0xC65E, 0x9472, 0xC65F, 0x9470, 0xC660, 0x9871,
+ 0xC661, 0x995E, 0xC662, 0x9AD6, 0xC663, 0x9B23, 0xC664, 0x9ECC,
+ 0xC665, 0x7064, 0xC666, 0x77DA, 0xC667, 0x8B9A, 0xC668, 0x9477,
+ 0xC669, 0x97C9, 0xC66A, 0x9A62, 0xC66B, 0x9A65, 0xC66C, 0x7E9C,
+ 0xC66D, 0x8B9C, 0xC66E, 0x8EAA, 0xC66F, 0x91C5, 0xC670, 0x947D,
+ 0xC671, 0x947E, 0xC672, 0x947C, 0xC673, 0x9C77, 0xC674, 0x9C78,
+ 0xC675, 0x9EF7, 0xC676, 0x8C54, 0xC677, 0x947F, 0xC678, 0x9E1A,
+ 0xC679, 0x7228, 0xC67A, 0x9A6A, 0xC67B, 0x9B31, 0xC67C, 0x9E1B,
+ 0xC67D, 0x9E1E, 0xC67E, 0x7C72, 0xC940, 0x4E42, 0xC941, 0x4E5C,
+ 0xC942, 0x51F5, 0xC943, 0x531A, 0xC944, 0x5382, 0xC945, 0x4E07,
+ 0xC946, 0x4E0C, 0xC947, 0x4E47, 0xC948, 0x4E8D, 0xC949, 0x56D7,
+ 0xC94A, 0xFA0C, 0xC94B, 0x5C6E, 0xC94C, 0x5F73, 0xC94D, 0x4E0F,
+ 0xC94E, 0x5187, 0xC94F, 0x4E0E, 0xC950, 0x4E2E, 0xC951, 0x4E93,
+ 0xC952, 0x4EC2, 0xC953, 0x4EC9, 0xC954, 0x4EC8, 0xC955, 0x5198,
+ 0xC956, 0x52FC, 0xC957, 0x536C, 0xC958, 0x53B9, 0xC959, 0x5720,
+ 0xC95A, 0x5903, 0xC95B, 0x592C, 0xC95C, 0x5C10, 0xC95D, 0x5DFF,
+ 0xC95E, 0x65E1, 0xC95F, 0x6BB3, 0xC960, 0x6BCC, 0xC961, 0x6C14,
+ 0xC962, 0x723F, 0xC963, 0x4E31, 0xC964, 0x4E3C, 0xC965, 0x4EE8,
+ 0xC966, 0x4EDC, 0xC967, 0x4EE9, 0xC968, 0x4EE1, 0xC969, 0x4EDD,
+ 0xC96A, 0x4EDA, 0xC96B, 0x520C, 0xC96C, 0x531C, 0xC96D, 0x534C,
+ 0xC96E, 0x5722, 0xC96F, 0x5723, 0xC970, 0x5917, 0xC971, 0x592F,
+ 0xC972, 0x5B81, 0xC973, 0x5B84, 0xC974, 0x5C12, 0xC975, 0x5C3B,
+ 0xC976, 0x5C74, 0xC977, 0x5C73, 0xC978, 0x5E04, 0xC979, 0x5E80,
+ 0xC97A, 0x5E82, 0xC97B, 0x5FC9, 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,
+ 0xC9E0, 0x5FD5, 0xC9E1, 0x5FD4, 0xC9E2, 0x5FCF, 0xC9E3, 0x625C,
+ 0xC9E4, 0x625E, 0xC9E5, 0x6264, 0xC9E6, 0x6261, 0xC9E7, 0x6266,
+ 0xC9E8, 0x6262, 0xC9E9, 0x6259, 0xC9EA, 0x6260, 0xC9EB, 0x625A,
+ 0xC9EC, 0x6265, 0xC9ED, 0x65EF, 0xC9EE, 0x65EE, 0xC9EF, 0x673E,
+ 0xC9F0, 0x6739, 0xC9F1, 0x6738, 0xC9F2, 0x673B, 0xC9F3, 0x673A,
+ 0xC9F4, 0x673F, 0xC9F5, 0x673C, 0xC9F6, 0x6733, 0xC9F7, 0x6C18,
+ 0xC9F8, 0x6C46, 0xC9F9, 0x6C52, 0xC9FA, 0x6C5C, 0xC9FB, 0x6C4F,
+ 0xC9FC, 0x6C4A, 0xC9FD, 0x6C54, 0xC9FE, 0x6C4B, 0xCA40, 0x6C4C,
+ 0xCA41, 0x7071, 0xCA42, 0x725E, 0xCA43, 0x72B4, 0xCA44, 0x72B5,
+ 0xCA45, 0x738E, 0xCA46, 0x752A, 0xCA47, 0x767F, 0xCA48, 0x7A75,
+ 0xCA49, 0x7F51, 0xCA4A, 0x8278, 0xCA4B, 0x827C, 0xCA4C, 0x8280,
+ 0xCA4D, 0x827D, 0xCA4E, 0x827F, 0xCA4F, 0x864D, 0xCA50, 0x897E,
+ 0xCA51, 0x9099, 0xCA52, 0x9097, 0xCA53, 0x9098, 0xCA54, 0x909B,
+ 0xCA55, 0x9094, 0xCA56, 0x9622, 0xCA57, 0x9624, 0xCA58, 0x9620,
+ 0xCA59, 0x9623, 0xCA5A, 0x4F56, 0xCA5B, 0x4F3B, 0xCA5C, 0x4F62,
+ 0xCA5D, 0x4F49, 0xCA5E, 0x4F53, 0xCA5F, 0x4F64, 0xCA60, 0x4F3E,
+ 0xCA61, 0x4F67, 0xCA62, 0x4F52, 0xCA63, 0x4F5F, 0xCA64, 0x4F41,
+ 0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B4F, 0x6C8B,
+ 0xCB50, 0x6C8F, 0xCB51, 0x6C71, 0xCB52, 0x6C6F, 0xCB53, 0x6C69,
+ 0xCB54, 0x6C9A, 0xCB55, 0x6C6D, 0xCB56, 0x6C87, 0xCB57, 0x6C95,
+ 0xCB58, 0x6C9C, 0xCB59, 0x6C66, 0xCB5A, 0x6C73, 0xCB5B, 0x6C65,
+ 0xCB5C, 0x6C7B, 0xCB5D, 0x6C8E, 0xCB5E, 0x7074, 0xCB5F, 0x707A,
+ 0xCB60, 0x7263, 0xCB61, 0x72BF, 0xCB62, 0x72BD, 0xCB63, 0x72C3,
+ 0xCB64, 0x72C6, 0xCB65, 0x72C1, 0xCB66, 0x72BA, 0xCB67, 0x72C5,
+ 0xCB68, 0x7395, 0xCB69, 0x7397, 0xCB6A, 0x7393, 0xCB6B, 0x7394,
+ 0xCB6C, 0x7392, 0xCB6D, 0x753A, 0xCB6E, 0x7539, 0xCB6F, 0x7594,
+ 0xCB70, 0x7595, 0xCB71, 0x7681, 0xCB72, 0x793D, 0xCB73, 0x8034,
+ 0xCB74, 0x8095, 0xCB75, 0x8099, 0xCB76, 0x8090, 0xCB77, 0x8092,
+ 0xCB78, 0x809C, 0xCB79, 0x8290, 0xCB7A, 0x828F, 0xCB7B, 0x8285,
+ 0xCB7C, 0x828E, 0xCB7D, 0x8291, 0xCB7E, 0x8293, 0xCBA1, 0x828A,
+ 0xCBA2, 0x8283, 0xCBA3, 0x8284, 0xCBA4, 0x8C78, 0xCBA5, 0x8FC9,
+ 0xCBA6, 0x8FBF, 0xCBA7, 0x909F, 0xCBA8, 0x90A1, 0xCBA9, 0x90A5,
+ 0xCBAA, 0x909E, 0xCBAB, 0x90A7, 0xCBAC, 0x90A0, 0xCBAD, 0x9630,
+ 0xCBAE, 0x9628, 0xCBAF, 0x962F, 0xCBB0, 0x962D, 0xCBB1, 0x4E33,
+ 0xCBB2, 0x4F98, 0xCBB3, 0x4F7C, 0xCBB4, 0x4F85, 0xCBB5, 0x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, 0xCEB1, 0x5E22, 0xCEB2, 0x5E23,
+ 0xCEB3, 0x5E20, 0xCEB4, 0x5E24, 0xCEB5, 0x5EB0, 0xCEB6, 0x5EA4,
+ 0xCEB7, 0x5EA2, 0xCEB8, 0x5E9B, 0xCEB9, 0x5EA3, 0xCEBA, 0x5EA5,
+ 0xCEBB, 0x5F07, 0xCEBC, 0x5F2E, 0xCEBD, 0x5F56, 0xCEBE, 0x5F86,
+ 0xCEBF, 0x6037, 0xCEC0, 0x6039, 0xCEC1, 0x6054, 0xCEC2, 0x6072,
+ 0xCEC3, 0x605E, 0xCEC4, 0x6045, 0xCEC5, 0x6053, 0xCEC6, 0x6047,
+ 0xCEC7, 0x6049, 0xCEC8, 0x605B, 0xCEC9, 0x604C, 0xCECA, 0x6040,
+ 0xCECB, 0x6042, 0xCECC, 0x605F, 0xCECD, 0x6024, 0xCECE, 0x6044,
+ 0xCECF, 0x6058, 0xCED0, 0x6066, 0xCED1, 0x606E, 0xCED2, 0x6242,
+ 0xCED3, 0x6243, 0xCED4, 0x62CF, 0xCED5, 0x630D, 0xCED6, 0x630B,
+ 0xCED7, 0x62F5, 0xCED8, 0x630E, 0xCED9, 0x6303, 0xCEDA, 0x62EB,
+ 0xCEDB, 0x62F9, 0xCEDC, 0x630F, 0xCEDD, 0x630C, 0xCEDE, 0x62F8,
+ 0xCEDF, 0x62F6, 0xCEE0, 0x6300, 0xCEE1, 0x6313, 0xCEE2, 0x6314,
+ 0xCEE3, 0x62FA, 0xCEE4, 0x6315, 0xCEE5, 0x62FB, 0xCEE6, 0x62F0,
+ 0xCEE7, 0x6541, 0xCEE8, 0x6543, 0xCEE9, 0x65AA, 0xCEEA, 0x65BF,
+ 0xCEEB, 0x6636, 0xCEEC, 0x6621, 0xCEED, 0x6632, 0xCEEE, 0x6635,
+ 0xCEEF, 0x661C, 0xCEF0, 0x6626, 0xCEF1, 0x6622, 0xCEF2, 0x6633,
+ 0xCEF3, 0x662B, 0xCEF4, 0x663A, 0xCE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xCFDD, 0x75AA,
+ 0xCFDE, 0x7679, 0xCFDF, 0x76C4, 0xCFE0, 0x7708, 0xCFE1, 0x7703,
+ 0xCFE2, 0x7704, 0xCFE3, 0x7705, 0xCFE4, 0x770A, 0xCFE5, 0x76F7,
+ 0xCFE6, 0x76FB, 0xCFE7, 0x76FA, 0xCFE8, 0x77E7, 0xCFE9, 0x77E8,
+ 0xCFEA, 0x7806, 0xCFEB, 0x7811, 0xCFEC, 0x7812, 0xCFED, 0x7805,
+ 0xCFEE, 0x7810, 0xCFEF, 0x780F, 0xCFF0, 0x780E, 0xCFF1, 0x7809,
+ 0xCFF2, 0x7803, 0xCFF3, 0x7813, 0xCFF4, 0x794A, 0xCFF5, 0x794C,
+ 0xCFF6, 0x794B, 0xCFF7, 0x7945, 0xCFF8, 0x7944, 0xCFF9, 0x79D5,
+ 0xCFFA, 0x79CD, 0xCFFB, 0x79CF, 0xCFFC, 0x79D6, 0xCFFD, 0x79CE,
+ 0xCFFE, 0x7A80, 0xD040, 0x7A7E, 0xD041, 0x7AD1, 0xD042, 0x7B00,
+ 0xD043, 0x7B01, 0xD044, 0x7C7A, 0xD045, 0x7C78, 0xD046, 0x7C79,
+ 0xD047, 0x7C7F, 0xD048, 0x7C80, 0xD049, 0x7C81, 0xD04A, 0x7D03,
+ 0xD04B, 0x7D08, 0xD04C, 0x7D01, 0xD04D, 0x7F58, 0xD04E, 0x7F91,
+ 0xD04F, 0x7F8D, 0xD050, 0x7FBE, 0xD051, 0x8007, 0xD052, 0x800E,
+ 0xD053, 0x800F, 0xD054, 0x8014, 0xD055, 0x8037, 0xD056, 0x80D8,
+ 0xD057, 0x80C7, 0xD058, 0x80E0, 0xD059, 0x80D1, 0xD05A, 0x80C8,
+ 0xD05B, 0x80C2, 0xD05C, 0x80D0, 0xD05D, 0x80C5, 0xD05E, 0x80E3,
+ 0xD05F, 0x80D9, 0xD060, 0x80DC, 0xD061, 0x80CA, 0xD062, 0x80D5,
+ 0xD063, 0x80C9, 0xD064, 0x80CF, 0xD065, 0x80D7, 0xD066, 0x80E6,
+ 0xD067, 0x80CD, 0xD068, 0x81FF, 0xD069, 0x8221, 0xD06A, 0x8294,
+ 0xD06B, 0x82D9, 0xD06C, 0x82FE, 0xD06D, 0x82F9, 0xD06E, 0x8307,
+ 0xD06F, 0x82E8, 0xD070, 0x8300, 0xD071, 0x82D5, 0xD072, 0x833A,
+ 0xD073, 0x82EB, 0xD074, 0x82D6, 0xD075, 0x82F4, 0xD076, 0x82EC,
+ 0xD077, 0x82E1, 0xD078, 0x82F2, 0xD079, 0x82F5, 0xD07A, 0x830C,
+ 0xD07B, 0x82FB, 0xD07C, 0x82F6, 0xD07D, 0x82F0, 0xD07E, 0x82EA,
+ 0xD0A1, 0x82E4, 0xD0A2, 0x82E0, 0xD0A3, 0x82FA, 0xD0A4, 0x82F3,
+ 0xD0A5, 0x82ED, 0xD0A6, 0x8677, 0xD0A7, 0x8674, 0xD0A8, 0x867C,
+ 0xD0A9, 0x8673, 0xD0AA, 0x8841, 0xD0AB, 0x884E, 0xD0AC, 0x8867,
+ 0xD0AD, 0x886A, 0xD0AE, 0x8869, 0xD0AF, 0x89D3, 0xD0B0, 0x8A04,
+ 0xD0B1, 0x8A07, 0xD0B2, 0x8D72, 0xD0B3, 0x8FE3, 0xD0B4, 0x8FE1,
+ 0xD0B5, 0x8FEE, 0xD0B6, 0x8FE0, 0xD0B7, 0x90F1, 0xD0B8, 0x90BD,
+ 0xD0B9, 0x90BF, 0xD0BA, 0x90D5, 0xD0BB, 0x90C5, 0xD0BC, 0x90BE,
+ 0xD0BD, 0x90C7, 0xD0BE, 0x90CB, 0xD0BF, 0x90C8, 0xD0C0, 0x91D4,
+ 0xD0C1, 0x91D3, 0xD0C2, 0x9654, 0xD0C3, 0x964F, 0xD0C4, 0x9651,
+ 0xD0C5, 0x9653, 0xD0C6, 0x964A, 0xD0C7, 0x964E, 0xD0C8, 0x501E,
+ 0xD0C9, 0x5005, 0xD0CA, 0x5007, 0xD0CB, 0x5013, 0xD0CC, 0x5022,
+ 0xD0CD, 0x5030, 0xD0CE, 0x501B, 0xD0CF, 0x4FF5, 0xD0D0, 0x4FF4,
+ 0xD0D1, 0x5033, 0xD0D2, 0x5037, 0xD0D3, 0x502C, 0xD0D4, 0x4FF6,
+ 0xD0D5, 0x4FF7, 0xD0D6, 0x5017, 0xD0D7, 0x501C, 0xD0D8, 0x5020,
+ 0xD0D9, 0x5027, 0xD0DA, 0x5035, 0xD0DB, 0x502F, 0xD0DC, 0x5031,
+ 0xD0DD, 0x500E, 0xD0DE, 0x515A, 0xD0DF, 0x5194, 0xD0E0, 0x5193,
+ 0xD0E1, 0x51CA, 0xD0E2, 0x51C4, 0xD0E3, 0x51C5, 0xD0E4, 0x51C8,
+ 0xD0E5, 0x51CE, 0xD0E6, 0x5261, 0xD0E7, 0x525A, 0xD0E8, 0x5252,
+ 0xD0E9, 0x525E, 0xD0EA, 0x525F, 0xD0EB, 0x5255, 0xD0EC, 0x5262,
+ 0xD0ED, 0x52CD, 0xD0EE, 0x530E, 0xD0EF, 0x539E, 0xD0F0, 0x5526,
+ 0xD0F1, 0x54E2, 0xD0F2, 0x5517, 0xD0F3, 0x5512, 0xD0F4, 0x54E7,
+ 0xD0F5, 0x54F3, 0xD0F6, 0x54E4, 0xD0F7, 0x551A, 0xD0F8, 0x54FF,
+ 0xD0F9, 0x5504, 0xD0FA, 0x5508, 0xD0FB, 0x54EB, 0xD0FC, 0x5511,
+ 0xD0FD, 0x5505, 0xD0FE, 0x54F1, 0xD140, 0x550A, 0xD141, 0x54FB,
+ 0xD142, 0x54F7, 0xD143, 0x54F8, 0xD144, 0x54E0, 0xD145, 0x550E,
+ 0xD146, 0x5503, 0xD147, 0x550B, 0xD148, 0x5701, 0xD149, 0x5702,
+ 0xD14A, 0x57CC, 0xD14B, 0x5832, 0xD14C, 0x57D5, 0xD14D, 0x57D2,
+ 0xD14E, 0x57BA, 0xD14F, 0x57C6, 0xD150, 0x57BD, 0xD151, 0x57BC,
+ 0xD152, 0x57B8, 0xD153, 0x57B6, 0xD154, 0x57BF, 0xD155, 0x57C7,
+ 0xD156, 0x57D0, 0xD157, 0x57B9, 0xD158, 0x57C1, 0xD159, 0x590E,
+ 0xD15A, 0x594A, 0xD15B, 0x5A19, 0xD15C, 0x5A16, 0xD15D, 0x5A2D,
+ 0xD15E, 0x5A2E, 0xD15F, 0x5A15, 0xD160, 0x5A0F, 0xD161, 0x5A17,
+ 0xD162, 0x5A0A, 0xD163, 0x5A1E, 0xD164, 0x5A33, 0xD165, 0x5B6C,
+ 0xD166, 0x5BA7, 0xD167, 0x5BAD, 0xD168, 0x5BAC, 0xD169, 0x5C03,
+ 0xD16A, 0x5C56, 0xD16B, 0x5C54, 0xD16C, 0x5CEC, 0xD16D, 0x5CFF,
+ 0xD16E, 0x5CEE, 0xD16F, 0x5CF1, 0xD170, 0x5CF7, 0xD171, 0x5D00,
+ 0xD172, 0x5CF9, 0xD173, 0x5E29, 0xD174, 0x5E28, 0xD175, 0x5EA8,
+ 0xD176, 0x5EAE, 0xD177, 0x5EAA, 0xD178, 0x5EAC, 0xD179, 0x5F33,
+ 0xD17A, 0x5F30, 0xD17B, 0x5F67, 0xD17C, 0x605D, 0xD17D, 0x605A,
+ 0xD17E, 0x6067, 0xD1A1, 0x6041, 0xD1A2, 0x60A2, 0xD1A3, 0x6088,
+ 0xD1A4, 0x6080, 0xD1A5, 0x6092, 0xD1A6, 0x6081, 0xD1A7, 0x609D,
+ 0xD1A8, 0x6083, 0xD1A9, 0x6095, 0xD1AA, 0x609B, 0xD1AB, 0x6097,
+ 0xD1AC, 0x6087, 0xD1AD, 0x609C, 0xD1AE, 0x608E, 0xD1AF, 0x6219,
+ 0xD1B0, 0x6246, 0xD1B1, 0x62F2, 0xD1B2, 0x6310, 0xD1B3, 0x6356,
+ 0xD1B4, 0x632C, 0xD1B5, 0x6344, 0xD1B6, 0x6345, 0xD1B7, 0x6336,
+ 0xD1B8, 0x6343, 0xD1B9, 0x63E4, 0xD1BA, 0x6339, 0xD1BB, 0x634B,
+ 0xD1BC, 0x634A, 0xD1BD, 0x633C, 0xD1BE, 0x6329, 0xD1BF, 0x6341,
+ 0xD1C0, 0x6334, 0xD1C1, 0x6358, 0xD1C2, 0x6354, 0xD1C3, 0x6359,
+ 0xD1C4, 0x632D, 0xD1C5, 0x6347, 0xD1C6, 0x6333, 0xD1C7, 0x635A,
+ 0xD1C8, 0x6351, 0xD1C9, 0x6338, 0xD1CA, 0x6357, 0xD1CB, 0x6340,
+ 0xD1CC, 0x6348, 0xD1CD, 0x654A, 0xD1CE, 0x6546, 0xD1CF, 0x65C6,
+ 0xD1D0, 0x65C3, 0xD1D1, 0x65C4, 0xD1D2, 0x65C2, 0xD1D3, 0x664A,
+ 0xD1D4, 0x665F, 0xD1D5, 0x6647, 0xD1D6, 0x6651, 0xD1D7, 0x6712,
+ 0xD1D8, 0x6713, 0xD1D9, 0x681F, 0xD1DA, 0x681A, 0xD1DB, 0x6849,
+ 0xD1DC, 0x6832, 0xD1DD, 0x6833, 0xD1DE, 0x683B, 0xD1DF, 0x684B,
+ 0xD1E0, 0x684F, 0xD1E1, 0x6816, 0xD1E2, 0x6831, 0xD1E3, 0x681C,
+ 0xD1E4, 0x6835, 0xD1E5, 0x682B, 0xD1E6, 0x682D, 0xD1E7, 0x682F,
+ 0xD1E8, 0x684E, 0xD1E9, 0x6844, 0xD1EA, 0x6834, 0xD1EB, 0x681D,
+ 0xD1EC, 0x6812, 0xD1ED, 0x6814, 0xD1EE, 0x6826, 0xD1EF, 0x6828,
+ 0xD1F0, 0x682E, 0xD1F1, 0x684D, 0xD1F2, 0x683A, 0xD1F3, 0x6825,
+ 0xD1F4, 0x6820, 0xD1F5, 0x6B2C, 0xD1F6, 0x6B2F, 0xD1F7, 0x6B2D,
+ 0xD1F8, 0x6B31, 0xD1F9, 0x6B34, 0xD1FA, 0x6B6D, 0xD1FB, 0x8082,
+ 0xD1FC, 0x6B88, 0xD1FD, 0x6BE6, 0xD1FE, 0x6BE4, 0xD240, 0x6BE8,
+ 0xD241, 0x6BE3, 0xD242, 0x6BE2, 0xD243, 0x6BE7, 0xD244, 0x6C25,
+ 0xD245, 0x6D7A, 0xD246, 0x6D63, 0xD247, 0x6D64, 0xD248, 0x6D76,
+ 0xD249, 0x6D0D, 0xD24A, 0x6D61, 0xD24B, 0x6D92, 0xD24C, 0x6D58,
+ 0xD24D, 0x6D62, 0xD24E, 0x6D6D, 0xD24F, 0x6D6F, 0xD250, 0x6D91,
+ 0xD251, 0x6D8D, 0xD252, 0x6DEF, 0xD253, 0x6D7F, 0xD254, 0x6D86,
+ 0xD255, 0x6D5E, 0xD256, 0x6D67, 0xD257, 0x6D60, 0xD258, 0x6D97,
+ 0xD259, 0x6D70, 0xD25A, 0x6D7C, 0xD25B, 0x6D5F, 0xD25C, 0x6D82,
+ 0xD25D, 0x6D98, 0xD25E, 0x6D2F, 0xD25F, 0x6D68, 0xD260, 0x6D8B,
+ 0xD261, 0x6D7E, 0xD262, 0x6D80, 0xD263, 0x6D84, 0xD264, 0x6D16,
+ 0xD265, 0x6D83, 0xD266, 0x6D7B, 0xD267, 0x6D7D, 0xD268, 0x6D75,
+ 0xD269, 0x6D90, 0xD26A, 0x70DC, 0xD26B, 0x70D3, 0xD26C, 0x70D1,
+ 0xD26D, 0x70DD, 0xD26E, 0x70CB, 0xD26F, 0x7F39, 0xD270, 0x70E2,
+ 0xD271, 0x70D7, 0xD272, 0x70D2, 0xD273, 0x70DE, 0xD274, 0x70E0,
+ 0xD275, 0x70D4, 0xD276, 0x70CD, 0xD277, 0x70C5, 0xD278, 0x70C6,
+ 0xD279, 0x70C7, 0xD27A, 0x70DA, 0xD27B, 0x70CE, 0xD27C, 0x70E1,
+ 0xD27D, 0x7242, 0xD27E, 0x7278, 0xD2A1, 0x7277, 0xD2A2, 0x7276,
+ 0xD2A3, 0x7300, 0xD2A4, 0x72FA, 0xD2A5, 0x72F4, 0xD2A6, 0x72FE,
+ 0xD2A7,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,
+ 0xD2EB, 0x7952, 0xD2EC, 0x7951, 0xD2ED, 0x79EB, 0xD2EE, 0x79EC,
+ 0xD2EF, 0x79E0, 0xD2F0, 0x79EE, 0xD2F1, 0x79ED, 0xD2F2, 0x79EA,
+ 0xD2F3, 0x79DC, 0xD2F4, 0x79DE, 0xD2F5, 0x79DD, 0xD2F6, 0x7A86,
+ 0xD2F7, 0x7A89, 0xD2F8, 0x7A85, 0xD2F9, 0x7A8B, 0xD2FA, 0x7A8C,
+ 0xD2FB, 0x7A8A, 0xD2FC, 0x7A87, 0xD2FD, 0x7AD8, 0xD2FE, 0x7B10,
+ 0xD340, 0x7B04, 0xD341, 0x7B13, 0xD342, 0x7B05, 0xD343, 0x7B0F,
+ 0xD344, 0x7B08, 0xD345, 0x7B0A, 0xD346, 0x7B0E, 0xD347, 0x7B09,
+ 0xD348, 0x7B12, 0xD349, 0x7C84, 0xD34A, 0x7C91, 0xD34B, 0x7C8A,
+ 0xD34C, 0x7C8C, 0xD34D, 0x7C88, 0xD34E, 0x7C8D, 0xD34F, 0x7C85,
+ 0xD350, 0x7D1E, 0xD351, 0x7D1D, 0xD352, 0x7D11, 0xD353, 0x7D0E,
+ 0xD354, 0x7D18, 0xD355, 0x7D16, 0xD356, 0x7D13, 0xD357, 0x7D1F,
+ 0xD358, 0x7D12, 0xD359, 0x7D0F, 0xD35A, 0x7D0C, 0xD35B, 0x7F5C,
+ 0xD35C, 0x7F61, 0xD35D, 0x7F5E, 0xD35E, 0x7F60, 0xD35F, 0x7F5D,
+ 0xD360, 0x7F5B, 0xD361, 0x7F96, 0xD362, 0x7F92, 0xD363, 0x7FC3,
+ 0xD364, 0x7FC2, 0xD365, 0x7FC0, 0xD366, 0x8016, 0xD367, 0x803E,
+ 0xD368, 0x8039, 0xD369, 0x80FA, 0xD36A, 0x80F2, 0xD36B, 0x80F9,
+ 0xD36C, 0x80F5, 0xD36D, 0x8101, 0xD36E, 0x80FB, 0xD36F, 0x8100,
+ 0xD370, 0x8201, 0xD371, 0x822F, 0xD372, 0x8225, 0xD373, 0x8333,
+ 0xD374, 0x832D, 0xD375, 0x8344, 0xD376, 0x8319, 0xD377, 0x8351,
+ 0xD378, 0x8325, 0xD379, 0x8356, 0xD37A, 0x833F, 0xD37B, 0x8341,
+ 0xD37C, 0x8326, 0xD37D, 0x831C, 0xD37E, 0x8322, 0xD3A1, 0x8342,
+ 0xD3A2, 0x834E, 0xD3A3, 0x831B, 0xD3A4, 0x832A, 0xD3A5, 0x8308,
+ 0xD3A6, 0x833C, 0xD3A7, 0x834D, 0xD3A8, 0x8316, 0xD3A9, 0x8324,
+ 0xD3AA, 0x8320, 0xD3AB, 0x8337, 0xD3AC, 0x832F, 0xD3AD, 0x8329,
+ 0xD3AE, 0x8347, 0xD3AF, 0x8345, 0xD3B0, 0x834C, 0xD3B1, 0x8353,
+ 0xD3B2, 0x831E, 0xD3B3, 0x832C, 0xD3B4, 0x834B, 0xD3B5, 0x8327,
+ 0xD3B6, 0x8348, 0xD3B7, 0x8653, 0xD3B8, 0x8652, 0xD3B9, 0x86A2,
+ 0xD3BA, 0x86A8, 0xD3BB, 0x8696, 0xD3BC, 0x868D, 0xD3BD, 0x8691,
+ 0xD3BE, 0x869E, 0xD3BF, 0x8687, 0xD3C0, 0x8697, 0xD3C1, 0x8686,
+ 0xD3C2, 0x868B, 0xD3C3, 0x869A, 0xD3C4, 0x8685, 0xD3C5, 0x86A5,
+ 0xD3C6, 0x8699, 0xD3C7, 0x86A1, 0xD3C8, 0x86A7, 0xD3C9, 0x8695,
+ 0xD3CA, 0x8698, 0xD3CB, 0x868E, 0xD3CC, 0x869D, 0xD3CD, 0x8690,
+ 0xD3CE, 0x8694, 0xD3CF, 0x8843, 0xD3D0, 0x8844, 0xD3D1, 0x886D,
+ 0xD3D2, 0x8875, 0xD3D3, 0x8876, 0xD3D4, 0x8872, 0xD3D5, 0x8880,
+ 0xD3D6, 0x8871, 0xD3D7, 0x887F, 0xD3D8, 0x886F, 0xD3D9, 0x8883,
+ 0xD3DA, 0x887E, 0xD3DB, 0x8874, 0xD3DC, 0x887C, 0xD3DD, 0x8A12,
+ 0xD3DE, 0x8C47, 0xD3DF, 0x8C57, 0xD3E0, 0x8C7B, 0xD3E1, 0x8CA4,
+ 0xD3E2, 0x8CA3, 0xD3E3, 0x8D76, 0xD3E4, 0x8D78, 0xD3E5, 0x8DB5,
+ 0xD3E6, 0x8DB7, 0xD3E7, 0x8DB6, 0xD3E8, 0x8ED1, 0xD3E9, 0x8ED3,
+ 0xD3EA, 0x8FFE, 0xD3EB, 0x8FF5, 0xD3EC, 0x9002, 0xD3ED, 0x8FFF,
+ 0xD3EE, 0x8FFB, 0xD3EF, 0x9004, 0xD3F0, 0x8FFC, 0xD3F1, 0x8FF6,
+ 0xD3F2, 0x90D6, 0xD3F3, 0x90E0, 0xD3F4, 0x90D9, 0xD3F5, 0x90DA,
+ 0xD3F6, 0x90E3, 0xD3F7, 0x90DF, 0xD3F8, 0x90E5, 0xD3F9, 0x90D8,
+ 0xD3FA, 0x90DB, 0xD3FB, 0x90D7, 0xD3FC, 0x90DC, 0xD3FD, 0x90E4,
+ 0xD3FE, 0x9150, 0xD440, 0x914E, 0xD441, 0x914F, 0xD442, 0x91D5,
+ 0xD443, 0x91E2, 0xD444, 0x91DA, 0xD445, 0x965C, 0xD446, 0x965F,
+ 0xD447, 0x96BC, 0xD448, 0x98E3, 0xD449, 0x9ADF, 0xD44A, 0x9B2F,
+ 0xD44B, 0x4E7F, 0xD44C, 0x5070, 0xD44D, 0x506A, 0xD44E, 0x5061,
+ 0xD44F, 0x505E, 0xD450, 0x5060, 0xD451, 0x5053, 0xD452, 0x504B,
+ 0xD453, 0x505D, 0xD454, 0x5072, 0xD455, 0x5048, 0xD456, 0x504D,
+ 0xD457, 0x5041, 0xD458, 0x505B, 0xD459, 0x504A, 0xD45A, 0x5062,
+ 0xD45B, 0x5015, 0xD45C, 0x5045, 0xD45D, 0x505F, 0xD45E, 0x5069,
+ 0xD45F, 0x506B, 0xD460, 0x5063, 0xD461, 0x5064, 0xD462, 0x5046,
+ 0xD463, 0x5040, 0xD464, 0x506E, 0xD465, 0x5073, 0xD466, 0x5057,
+ 0xD467, 0x5051, 0xD468, 0x51D0, 0xD469, 0x526B, 0xD46A, 0x526D,
+ 0xD46B, 0x526C, 0xD46C, 0x526E, 0xD46D, 0x52D6, 0xD46E, 0x52D3,
+ 0xD46F, 0x532D, 0xD470, 0x539C, 0xD471, 0x5575, 0xD472, 0x5576,
+ 0xD473, 0x553C, 0xD474, 0x554D, 0xD475, 0x5550, 0xD476, 0x5534,
+ 0xD477, 0x552A, 0xD478, 0x5551, 0xD479, 0x5562, 0xD47A, 0x5536,
+ 0xD47B, 0x5535, 0xD47C, 0x5530, 0xD47D, 0x5552, 0xD47E, 0x5545,
+ 0xD4A1, 0x550C, 0xD4A2, 0x5532, 0xD4A3, 0x5565, 0xD4A4, 0x554E,
+ 0xD4A5, 0x5539, 0xD4A6, 0x5548, 0xD4A7, 0x552D, 0xD4A8, 0x553B,
+ 0xD4A9, 0x5540, 0xD4AA, 0x554B, 0xD4AB, 0x570A, 0xD4AC, 0x5707,
+ 0xD4AD, 0x57FB, 0xD4AE, 0x5814, 0xD4AF, 0x57E2, 0xD4B0, 0x57F6,
+ 0xD4B1, 0x57DC, 0xD4B2, 0x57F4, 0xD4B3, 0x5800, 0xD4B4, 0x57ED,
+ 0xD4B5, 0x57FD, 0xD4B6, 0x5808, 0xD4B7, 0x57F8, 0xD4B8, 0x580B,
+ 0xD4B9, 0x57F3, 0xD4BA, 0x57CF, 0xD4BB, 0x5807, 0xD4BC, 0x57EE,
+ 0xD4BD, 0x57E3, 0xD4BE, 0x57F2, 0xD4BF, 0x57E5, 0xD4C0, 0x57EC,
+ 0xD4C1, 0x57E1, 0xD4C2, 0x580E, 0xD4C3, 0x57FC, 0xD4C4, 0x5810,
+ 0xD4C5, 0x57E7, 0xD4C6, 0x5801, 0xD4C7, 0x580C, 0xD4C8, 0x57F1,
+ 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2, 0xD54B, 0x5EB3, 0xD54C, 0x5F36, 0xD54D, 0x5F38,
+ 0xD54E, 0x5F9B, 0xD54F, 0x5F96, 0xD550, 0x5F9F, 0xD551, 0x608A,
+ 0xD552, 0x6090, 0xD553, 0x6086, 0xD554, 0x60BE, 0xD555, 0x60B0,
+ 0xD556, 0x60BA, 0xD557, 0x60D3, 0xD558, 0x60D4, 0xD559, 0x60CF,
+ 0xD55A, 0x60E4, 0xD55B, 0x60D9, 0xD55C, 0x60DD, 0xD55D, 0x60C8,
+ 0xD55E, 0x60B1, 0xD55F, 0x60DB, 0xD560, 0x60B7, 0xD561, 0x60CA,
+ 0xD562, 0x60BF, 0xD563, 0x60C3, 0xD564, 0x60CD, 0xD565, 0x60C0,
+ 0xD566, 0x6332, 0xD567, 0x6365, 0xD568, 0x638A, 0xD569, 0x6382,
+ 0xD56A, 0x637D, 0xD56B, 0x63BD, 0xD56C, 0x639E, 0xD56D, 0x63AD,
+ 0xD56E, 0x639D, 0xD56F, 0x6397, 0xD570, 0x63AB, 0xD571, 0x638E,
+ 0xD572, 0x636F, 0xD573, 0x6387, 0xD574, 0x6390, 0xD575, 0x636E,
+ 0xD576, 0x63AF, 0xD577, 0x6375, 0xD578, 0x639C, 0xD579, 0x636D,
+ 0xD57A, 0x63AE, 0xD57B, 0x637C, 0xD57C, 0x63A4, 0xD57D, 0x633B,
+ 0xD57E, 0x639F, 0xD5A1, 0x6378, 0xD5A2, 0x6385, 0xD5A3, 0x6381,
+ 0xD5A4, 0x6391, 0xD5A5, 0x638D, 0xD5A6, 0x6370, 0xD5A7, 0x6553,
+ 0xD5A8, 0x65CD, 0xD5A9, 0x6665, 0xD5AA, 0x6661, 0xD5AB, 0x665B,
+ 0xD5AC, 0x6659, 0xD5AD, 0x665C, 0xD5AE, 0x6662, 0xD5AF, 0x6718,
+ 0xD5B0, 0x6879, 0xD5B1, 0x6887, 0xD5B2, 0x6890, 0xD5B3, 0x689C,
+ 0xD5B4, 0x686D, 0xD5B5,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 0x6DCA, 0xD5F7, 0x6DBD,
+ 0xD5F8, 0x6DED, 0xD5F9, 0x6DF0, 0xD5FA, 0x6DBA, 0xD5FB, 0x6DD5,
+ 0xD5FC, 0x6DC2, 0xD5FD, 0x6DCF, 0xD5FE, 0x6DC9, 0xD640, 0x6DD0,
+ 0xD641, 0x6DF2, 0xD642, 0x6DD3, 0xD643, 0x6DFD, 0xD644, 0x6DD7,
+ 0xD645, 0x6DCD, 0xD646, 0x6DE3, 0xD647, 0x6DBB, 0xD648, 0x70FA,
+ 0xD649, 0x710D, 0xD64A, 0x70F7, 0xD64B, 0x7117, 0xD64C, 0x70F4,
+ 0xD64D, 0x710C, 0xD64E, 0x70F0, 0xD64F, 0x7104, 0xD650, 0x70F3,
+ 0xD651, 0x7110, 0xD652, 0x70FC, 0xD653, 0x70FF, 0xD654, 0x7106,
+ 0xD655, 0x7113, 0xD656, 0x7100, 0xD657, 0x70F8, 0xD658, 0x70F6,
+ 0xD659, 0x710B, 0xD65A, 0x7102, 0xD65B, 0x710E, 0xD65C, 0x727E,
+ 0xD65D, 0x727B, 0xD65E, 0x727C, 0xD65F, 0x727F, 0xD660, 0x731D,
+ 0xD661, 0x7317, 0xD662, 0x7307, 0xD663, 0x7311, 0xD664, 0x7318,
+ 0xD665, 0x730A, 0xD666, 0x7308, 0xD667, 0x72FF, 0xD668, 0x730F,
+ 0xD669, 0x731E, 0xD66A, 0x7388, 0xD66B, 0x73F6, 0xD66C, 0x73F8,
+ 0xD66D, 0x73F5, 0xD66E, 0x7404, 0xD66F, 0x7401, 0xD670, 0x73FD,
+ 0xD671, 0x7407, 0xD672, 0x7400, 0xD673, 0x73FA, 0xD674, 0x73FC,
+ 0xD675, 0x73FF, 0xD676, 0x740C, 0xD677, 0x740B, 0xD678, 0x73F4,
+ 0xD679, 0x7408, 0xD67A, 0x7564, 0xD67B, 0x7563, 0xD67C, 0x75CE,
+ 0xD67D, 0x75D2, 0xD67E, 0x75CF, 0xD6A1, 0x75CB, 0xD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, 0x7D38, 0xD6E5, 0x7D36, 0xD6E6, 0x7D3A,
+ 0xD6E7, 0x7D45, 0xD6E8, 0x7D2C, 0xD6E9, 0x7D29, 0xD6EA, 0x7D41,
+ 0xD6EB, 0x7D47, 0xD6EC, 0x7D3E, 0xD6ED, 0x7D3F, 0xD6EE, 0x7D4A,
+ 0xD6EF, 0x7D3B, 0xD6F0, 0x7D28, 0xD6F1, 0x7F63, 0xD6F2, 0x7F95,
+ 0xD6F3, 0x7F9C, 0xD6F4, 0x7F9D, 0xD6F5, 0x7F9B, 0xD6F6, 0x7FCA,
+ 0xD6F7, 0x7FCB, 0xD6F8, 0x7FCD, 0xD6F9, 0x7FD0, 0xD6FA, 0x7FD1,
+ 0xD6FB, 0x7FC7, 0xD6FC, 0x7FCF, 0xD6FD, 0x7FC9, 0xD6FE, 0x801F,
+ 0xD740, 0x801E, 0xD741, 0x801B, 0xD742, 0x8047, 0xD743, 0x8043,
+ 0xD744, 0x8048, 0xD745, 0x8118, 0xD746, 0x8125, 0xD747, 0x8119,
+ 0xD748, 0x811B, 0xD749, 0x812D, 0xD74A, 0x811F, 0xD74B, 0x812C,
+ 0xD74C, 0x811E, 0xD74D, 0x8121, 0xD74E, 0x8115, 0xD74F, 0x8127,
+ 0xD750, 0x811D, 0xD751, 0x8122, 0xD752, 0x8211, 0xD753, 0x8238,
+ 0xD754, 0x8233, 0xD755, 0x823A, 0xD756, 0x8234, 0xD757, 0x8232,
+ 0xD758, 0x8274, 0xD759, 0x8390, 0xD75A, 0x83A3, 0xD75B, 0x83A8,
+ 0xD75C, 0x838D, 0xD75D, 0x837A, 0xD75E, 0x8373, 0xD75F, 0x83A4,
+ 0xD760, 0x8374, 0xD761, 0x838F, 0xD762, 0x8381, 0xD763, 0x8395,
+ 0xD764, 0x8399, 0xD765, 0x8375, 0xD766, 0x8394, 0xD767, 0x83A9,
+ 0xD768, 0x837D, 0xD769, 0x8383, 0xD76A, 0x838C, 0xD76B, 0x839D,
+ 0xD76C, 0x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8CA5, 0xD7D3, 0x8D7D, 0xD7D4, 0x8D7B, 0xD7D5, 0x8D79,
+ 0xD7D6, 0x8DBC, 0xD7D7, 0x8DC2, 0xD7D8, 0x8DB9, 0xD7D9, 0x8DBF,
+ 0xD7DA, 0x8DC1, 0xD7DB, 0x8ED8, 0xD7DC, 0x8EDE, 0xD7DD, 0x8EDD,
+ 0xD7DE, 0x8EDC, 0xD7DF, 0x8ED7, 0xD7E0, 0x8EE0, 0xD7E1, 0x8EE1,
+ 0xD7E2, 0x9024, 0xD7E3, 0x900B, 0xD7E4, 0x9011, 0xD7E5, 0x901C,
+ 0xD7E6, 0x900C, 0xD7E7, 0x9021, 0xD7E8, 0x90EF, 0xD7E9, 0x90EA,
+ 0xD7EA, 0x90F0, 0xD7EB, 0x90F4, 0xD7EC, 0x90F2, 0xD7ED, 0x90F3,
+ 0xD7EE, 0x90D4, 0xD7EF, 0x90EB, 0xD7F0, 0x90EC, 0xD7F1, 0x90E9,
+ 0xD7F2, 0x9156, 0xD7F3, 0x9158, 0xD7F4, 0x915A, 0xD7F5, 0x9153,
+ 0xD7F6, 0x9155, 0xD7F7, 0x91EC, 0xD7F8, 0x91F4, 0xD7F9, 0x91F1,
+ 0xD7FA, 0x91F3, 0xD7FB, 0x91F8, 0xD7FC, 0x91E4, 0xD7FD, 0x91F9,
+ 0xD7FE, 0x91EA, 0xD840, 0x91EB, 0xD841, 0x91F7, 0xD842, 0x91E8,
+ 0xD843, 0x91EE, 0xD844, 0x957A, 0xD845, 0x9586, 0xD846, 0x9588,
+ 0xD847, 0x967C, 0xD848, 0x966D, 0xD849, 0x966B, 0xD84A, 0x9671,
+ 0xD84B, 0x966F, 0xD84C, 0x96BF, 0xD84D, 0x976A, 0xD84E, 0x9804,
+ 0xD84F, 0x98E5, 0xD850, 0x9997, 0xD851, 0x509B, 0xD852, 0x5095,
+ 0xD853, 0x5094, 0xD854, 0x509E, 0xD855, 0x508B, 0xD856, 0x50A3,
+ 0xD857, 0x5083, 0xD858, 0x508C, 0xD859, 0x508E, 0xD85A, 0x509D,
+ 0xD85B, 0x5068, 0xD85C, 0x509C, 0xD85D, 0x5092, 0xD85E, 0x5082,
+ 0xD85F, 0x5087, 0xD860, 0x515F, 0xD861, 0x51D4, 0xD862, 0x5312,
+ 0xD863, 0x5311, 0xD864, 0x53A4, 0xD865, 0x53A7, 0xD866, 0x5591,
+ 0xD867, 0x55A8, 0xD868, 0x55A5, 0xD869, 0x55AD, 0xD86A, 0x5577,
+ 0xD86B, 0x5645, 0xD86C, 0x55A2, 0xD86D, 0x5593, 0xD86E, 0x5588,
+ 0xD86F, 0x558F, 0xD870, 0x55B5, 0xD871, 0x5581, 0xD872, 0x55A3,
+ 0xD873, 0x5592, 0xD874, 0x55A4, 0xD875, 0x557D, 0xD876, 0x558C,
+ 0xD877, 0x55A6, 0xD878, 0x557F, 0xD879, 0x5595, 0xD87A, 0x55A1,
+ 0xD87B, 0x558E, 0xD87C, 0x570C, 0xD87D, 0x5829, 0xD87E, 0x5837,
+ 0xD8A1, 0x5819, 0xD8A2, 0x581E, 0xD8A3, 0x5827, 0xD8A4, 0x5823,
+ 0xD8A5, 0x5828, 0xD8A6, 0x57F5, 0xD8A7, 0x5848, 0xD8A8, 0x5825,
+ 0xD8A9, 0x581C, 0xD8AA, 0x581B, 0xD8AB, 0x5833, 0xD8AC, 0x583F,
+ 0xD8AD, 0x5836, 0xD8AE, 0x582E, 0xD8AF, 0x5839, 0xD8B0, 0x5838,
+ 0xD8B1, 0x582D, 0xD8B2, 0x582C, 0xD8B3, 0x583B, 0xD8B4, 0x5961,
+ 0xD8B5, 0x5AAF, 0xD8B6, 0x5A94, 0xD8B7, 0x5A9F, 0xD8B8, 0x5A7A,
+ 0xD8B9, 0x5AA2, 0xD8BA, 0x5A9E, 0xD8BB, 0x5A78, 0xD8BC, 0x5AA6,
+ 0xD8BD, 0x5A7C, 0xD8BE, 0x5AA5, 0xD8BF, 0x5AAC, 0xD8C0, 0x5A95,
+ 0xD8C1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0xD942, 0x6116, 0xD943, 0x6105, 0xD944, 0x60F5, 0xD945, 0x6113,
+ 0xD946, 0x60F8, 0xD947, 0x60FC, 0xD948, 0x60FE, 0xD949, 0x60C1,
+ 0xD94A, 0x6103, 0xD94B, 0x6118, 0xD94C, 0x611D, 0xD94D, 0x6110,
+ 0xD94E, 0x60FF, 0xD94F, 0x6104, 0xD950, 0x610B, 0xD951, 0x624A,
+ 0xD952, 0x6394, 0xD953, 0x63B1, 0xD954, 0x63B0, 0xD955, 0x63CE,
+ 0xD956, 0x63E5, 0xD957, 0x63E8, 0xD958, 0x63EF, 0xD959, 0x63C3,
+ 0xD95A, 0x649D, 0xD95B, 0x63F3, 0xD95C, 0x63CA, 0xD95D, 0x63E0,
+ 0xD95E, 0x63F6, 0xD95F, 0x63D5, 0xD960, 0x63F2, 0xD961, 0x63F5,
+ 0xD962, 0x6461, 0xD963, 0x63DF, 0xD964, 0x63BE, 0xD965, 0x63DD,
+ 0xD966, 0x63DC, 0xD967, 0x63C4, 0xD968, 0x63D8, 0xD969, 0x63D3,
+ 0xD96A, 0x63C2, 0xD96B, 0x63C7, 0xD96C, 0x63CC, 0xD96D, 0x63CB,
+ 0xD96E, 0x63C8, 0xD96F, 0x63F0, 0xD970, 0x63D7, 0xD971, 0x63D9,
+ 0xD972, 0x6532, 0xD973, 0x6567, 0xD974, 0x656A, 0xD975, 0x6564,
+ 0xD976, 0x655C, 0xD977, 0x6568, 0xD978, 0x6565, 0xD979, 0x658C,
+ 0xD97A, 0x659D, 0xD97B, 0x659E, 0xD97C, 0x65AE, 0xD97D, 0x65D0,
+ 0xD97E, 0x65D2, 0xD9A1, 0x667C, 0xD9A2, 0x666C, 0xD9A3, 0x667B,
+ 0xD9A4, 0x6680, 0xD9A5, 0x6671, 0xD9A6, 0x6679, 0xD9A7, 0x666A,
+ 0xD9A8, 0x6672, 0xD9A9, 0x6701, 0xD9AA, 0x690C, 0xD9AB, 0x68D3,
+ 0xD9AC, 0x6904, 0xD9AD, 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xDA74, 0x7332,
+ 0xDA75, 0x732D, 0xDA76, 0x7326, 0xDA77, 0x7323, 0xDA78, 0x7335,
+ 0xDA79, 0x730C, 0xDA7A, 0x742E, 0xDA7B, 0x742C, 0xDA7C, 0x7430,
+ 0xDA7D, 0x742B, 0xDA7E, 0x7416, 0xDAA1, 0x741A, 0xDAA2, 0x7421,
+ 0xDAA3, 0x742D, 0xDAA4, 0x7431, 0xDAA5, 0x7424, 0xDAA6, 0x7423,
+ 0xDAA7, 0x741D, 0xDAA8, 0x7429, 0xDAA9, 0x7420, 0xDAAA, 0x7432,
+ 0xDAAB, 0x74FB, 0xDAAC, 0x752F, 0xDAAD, 0x756F, 0xDAAE, 0x756C,
+ 0xDAAF, 0x75E7, 0xDAB0, 0x75DA, 0xDAB1, 0x75E1, 0xDAB2, 0x75E6,
+ 0xDAB3, 0x75DD, 0xDAB4, 0x75DF, 0xDAB5, 0x75E4, 0xDAB6, 0x75D7,
+ 0xDAB7, 0x7695, 0xDAB8, 0x7692, 0xDAB9, 0x76DA, 0xDABA, 0x7746,
+ 0xDABB, 0x7747, 0xDABC, 0x7744, 0xDABD, 0x774D, 0xDABE, 0x7745,
+ 0xDABF, 0x774A, 0xDAC0, 0x774E, 0xDAC1, 0x774B, 0xDAC2, 0x774C,
+ 0xDAC3, 0x77DE, 0xDAC4, 0x77EC, 0xDAC5, 0x7860, 0xDAC6, 0x7864,
+ 0xDAC7, 0x7865, 0xDAC8, 0x785C, 0xDAC9, 0x786D, 0xDACA, 0x7871,
+ 0xDACB, 0x786A, 0xDACC, 0x786E, 0xDACD, 0x7870, 0xDACE, 0x7869,
+ 0xDACF, 0x7868, 0xDAD0, 0x785E, 0xDAD1, 0x7862, 0xDAD2, 0x7974,
+ 0xDAD3, 0x7973, 0xDAD4, 0x7972, 0xDAD5, 0x7970, 0xDAD6, 0x7A02,
+ 0xDAD7, 0x7A0A, 0xDAD8, 0x7A03, 0xDAD9, 0x7A0C, 0xDADA, 0x7A04,
+ 0xDADB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 0x8EF5, 0xDC45, 0x8EE7, 0xDC46, 0x8EE8,
+ 0xDC47, 0x8EF6, 0xDC48, 0x8EEB, 0xDC49, 0x8EF1, 0xDC4A, 0x8EEC,
+ 0xDC4B, 0x8EF4, 0xDC4C, 0x8EE9, 0xDC4D, 0x902D, 0xDC4E, 0x9034,
+ 0xDC4F, 0x902F, 0xDC50, 0x9106, 0xDC51, 0x912C, 0xDC52, 0x9104,
+ 0xDC53, 0x90FF, 0xDC54, 0x90FC, 0xDC55, 0x9108, 0xDC56, 0x90F9,
+ 0xDC57, 0x90FB, 0xDC58, 0x9101, 0xDC59, 0x9100, 0xDC5A, 0x9107,
+ 0xDC5B, 0x9105, 0xDC5C, 0x9103, 0xDC5D, 0x9161, 0xDC5E, 0x9164,
+ 0xDC5F, 0x915F, 0xDC60, 0x9162, 0xDC61, 0x9160, 0xDC62, 0x9201,
+ 0xDC63, 0x920A, 0xDC64, 0x9225, 0xDC65, 0x9203, 0xDC66, 0x921A,
+ 0xDC67, 0x9226, 0xDC68, 0x920F, 0xDC69, 0x920C, 0xDC6A, 0x9200,
+ 0xDC6B, 0x9212, 0xDC6C, 0x91FF, 0xDC6D, 0x91FD, 0xDC6E, 0x9206,
+ 0xDC6F, 0x9204, 0xDC70, 0x9227, 0xDC71, 0x9202, 0xDC72, 0x921C,
+ 0xDC73, 0x9224, 0xDC74, 0x9219, 0xDC75, 0x9217, 0xDC76, 0x9205,
+ 0xDC77, 0x9216, 0xDC78, 0x957B, 0xDC79, 0x958D, 0xDC7A, 0x958C,
+ 0xDC7B, 0x9590, 0xDC7C, 0x9687, 0xDC7D, 0x967E, 0xDC7E, 0x9688,
+ 0xDCA1, 0x9689, 0xDCA2, 0x9683, 0xDCA3, 0x9680, 0xDCA4, 0x96C2,
+ 0xDCA5, 0x96C8, 0xDCA6, 0x96C3, 0xDCA7, 0x96F1, 0xDCA8, 0x96F0,
+ 0xDCA9, 0x976C, 0xDCAA, 0x9770, 0xDCAB, 0x976E, 0xDCAC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 0xDD71, 0x6140,
+ 0xDD72, 0x6220, 0xDD73, 0x9168, 0xDD74, 0x6223, 0xDD75, 0x6225,
+ 0xDD76, 0x6224, 0xDD77, 0x63C5, 0xDD78, 0x63F1, 0xDD79, 0x63EB,
+ 0xDD7A, 0x6410, 0xDD7B, 0x6412, 0xDD7C, 0x6409, 0xDD7D, 0x6420,
+ 0xDD7E, 0x6424, 0xDDA1, 0x6433, 0xDDA2, 0x6443, 0xDDA3, 0x641F,
+ 0xDDA4, 0x6415, 0xDDA5, 0x6418, 0xDDA6, 0x6439, 0xDDA7, 0x6437,
+ 0xDDA8, 0x6422, 0xDDA9, 0x6423, 0xDDAA, 0x640C, 0xDDAB, 0x6426,
+ 0xDDAC, 0x6430, 0xDDAD, 0x6428, 0xDDAE, 0x6441, 0xDDAF, 0x6435,
+ 0xDDB0, 0x642F, 0xDDB1, 0x640A, 0xDDB2, 0x641A, 0xDDB3, 0x6440,
+ 0xDDB4, 0x6425, 0xDDB5, 0x6427, 0xDDB6, 0x640B, 0xDDB7, 0x63E7,
+ 0xDDB8, 0x641B, 0xDDB9, 0x642E, 0xDDBA, 0x6421, 0xDDBB, 0x640E,
+ 0xDDBC, 0x656F, 0xDDBD, 0x6592, 0xDDBE, 0x65D3, 0xDDBF, 0x6686,
+ 0xDDC0, 0x668C, 0xDDC1, 0x6695, 0xDDC2, 0x6690, 0xDDC3, 0x668B,
+ 0xDDC4, 0x668A, 0xDDC5, 0x6699, 0xDDC6, 0x6694, 0xDDC7, 0x6678,
+ 0xDDC8, 0x6720, 0xDDC9, 0x6966, 0xDDCA, 0x695F, 0xDDCB, 0x6938,
+ 0xDDCC, 0x694E, 0xDDCD, 0x6962, 0xDDCE, 0x6971, 0xDDCF, 0x693F,
+ 0xDDD0, 0x6945, 0xDDD1, 0x696A, 0xDDD2, 0x6939, 0xDDD3, 0x6942,
+ 0xDDD4, 0x6957, 0xDDD5, 0x6959, 0xDDD6, 0x697A, 0xDDD7, 0x6948,
+ 0xDDD8,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3, 0xDE5C, 0x6EDC,
+ 0xDE5D, 0x6ED8, 0xDE5E, 0x6E99, 0xDE5F, 0x6E92, 0xDE60, 0x6E8E,
+ 0xDE61, 0x6E8D, 0xDE62, 0x6EA4, 0xDE63, 0x6EA1, 0xDE64, 0x6EBF,
+ 0xDE65, 0x6EB3, 0xDE66, 0x6ED0, 0xDE67, 0x6ECA, 0xDE68, 0x6E97,
+ 0xDE69, 0x6EAE, 0xDE6A, 0x6EA3, 0xDE6B, 0x7147, 0xDE6C, 0x7154,
+ 0xDE6D, 0x7152, 0xDE6E, 0x7163, 0xDE6F, 0x7160, 0xDE70, 0x7141,
+ 0xDE71, 0x715D, 0xDE72, 0x7162, 0xDE73, 0x7172, 0xDE74, 0x7178,
+ 0xDE75, 0x716A, 0xDE76, 0x7161, 0xDE77, 0x7142, 0xDE78, 0x7158,
+ 0xDE79, 0x7143, 0xDE7A, 0x714B, 0xDE7B, 0x7170, 0xDE7C, 0x715F,
+ 0xDE7D, 0x7150, 0xDE7E, 0x7153, 0xDEA1, 0x7144, 0xDEA2, 0x714D,
+ 0xDEA3, 0x715A, 0xDEA4, 0x724F, 0xDEA5, 0x728D, 0xDEA6, 0x728C,
+ 0xDEA7, 0x7291, 0xDEA8, 0x7290, 0xDEA9, 0x728E, 0xDEAA, 0x733C,
+ 0xDEAB, 0x7342, 0xDEAC, 0x733B, 0xDEAD, 0x733A, 0xDEAE, 0x7340,
+ 0xDEAF, 0x734A, 0xDEB0, 0x7349, 0xDEB1, 0x7444, 0xDEB2, 0x744A,
+ 0xDEB3, 0x744B, 0xDEB4, 0x7452, 0xDEB5, 0x7451, 0xDEB6, 0x7457,
+ 0xDEB7, 0x7440, 0xDEB8, 0x744F, 0xDEB9, 0x7450, 0xDEBA, 0x744E,
+ 0xDEBB, 0x7442, 0xDEBC, 0x7446, 0xDEBD, 0x744D, 0xDEBE, 0x7454,
+ 0xDEBF, 0x74E1, 0xDEC0, 0x74FF, 0xDEC1, 0x74FE, 0xDEC2, 0x74FD,
+ 0xDEC3, 0x751D, 0xDEC4, 0x7579, 0xDEC5, 0x7577, 0xDEC6, 0x6983,
+ 0xDEC7, 0x75EF, 0xDEC8, 0x760F, 0xDEC9, 0x7603, 0xDECA, 0x75F7,
+ 0xDECB, 0x75FE, 0xDECC, 0x75FC, 0xDECD, 0x75F9, 0xDECE, 0x75F8,
+ 0xDECF, 0x7610, 0xDED0, 0x75FB, 0xDED1, 0x75F6, 0xDED2, 0x75ED,
+ 0xDED3, 0x75F5, 0xDED4, 0x75FD, 0xDED5, 0x7699, 0xDED6, 0x76B5,
+ 0xDED7, 0x76DD, 0xDED8, 0x7755, 0xDED9, 0x775F, 0xDEDA, 0x7760,
+ 0xDEDB, 0x7752, 0xDEDC, 0x7756, 0xDEDD, 0x775A, 0xDEDE, 0x7769,
+ 0xDEDF, 0x7767, 0xDEE0, 0x7754, 0xDEE1, 0x7759, 0xDEE2, 0x776D,
+ 0xDEE3, 0x77E0, 0xDEE4, 0x7887, 0xDEE5, 0x789A, 0xDEE6, 0x7894,
+ 0xDEE7, 0x788F, 0xDEE8, 0x7884, 0xDEE9, 0x7895, 0xDEEA, 0x7885,
+ 0xDEEB, 0x7886, 0xDEEC, 0x78A1, 0xDEED, 0x7883, 0xDEEE, 0x7879,
+ 0xDEEF, 0x7899, 0xDEF0, 0x7880, 0xDEF1, 0x7896, 0xDEF2, 0x787B,
+ 0xDEF3, 0x797C, 0xDEF4, 0x7982, 0xDEF5, 0x797D, 0xDEF6, 0x7979,
+ 0xDEF7, 0x7A11, 0xDEF8, 0x7A18, 0xDEF9, 0x7A19, 0xDEFA, 0x7A12,
+ 0xDEFB, 0x7A17, 0xDEFC, 0x7A15, 0xDEFD, 0x7A22, 0xDEFE, 0x7A13,
+ 0xDF40, 0x7A1B, 0xDF41, 0x7A10, 0xDF42, 0x7AA3, 0xDF43, 0x7AA2,
+ 0xDF44, 0x7A9E, 0xDF45, 0x7AEB, 0xDF46, 0x7B66, 0xDF47, 0x7B64,
+ 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0x8479,
+ 0xDFAE, 0x848F, 0xDFAF, 0x848D, 0xDFB0, 0x8465, 0xDFB1, 0x8451,
+ 0xDFB2, 0x8440, 0xDFB3, 0x8486, 0xDFB4, 0x8467, 0xDFB5, 0x8430,
+ 0xDFB6, 0x844D, 0xDFB7, 0x847D, 0xDFB8, 0x845A, 0xDFB9, 0x8459,
+ 0xDFBA, 0x8474, 0xDFBB, 0x8473, 0xDFBC, 0x845D, 0xDFBD, 0x8507,
+ 0xDFBE, 0x845E, 0xDFBF, 0x8437, 0xDFC0, 0x843A, 0xDFC1, 0x8434,
+ 0xDFC2, 0x847A, 0xDFC3, 0x8443, 0xDFC4, 0x8478, 0xDFC5, 0x8432,
+ 0xDFC6, 0x8445, 0xDFC7, 0x8429, 0xDFC8, 0x83D9, 0xDFC9, 0x844B,
+ 0xDFCA, 0x842F, 0xDFCB, 0x8442, 0xDFCC, 0x842D, 0xDFCD, 0x845F,
+ 0xDFCE, 0x8470, 0xDFCF, 0x8439, 0xDFD0, 0x844E, 0xDFD1, 0x844C,
+ 0xDFD2, 0x8452, 0xDFD3, 0x846F, 0xDFD4, 0x84C5, 0xDFD5, 0x848E,
+ 0xDFD6, 0x843B, 0xDFD7, 0x8447, 0xDFD8, 0x8436, 0xDFD9, 0x8433,
+ 0xDFDA, 0x8468, 0xDFDB, 0x847E, 0xDFDC, 0x8444, 0xDFDD, 0x842B,
+ 0xDFDE, 0x8460, 0xDFDF, 0x8454, 0xDFE0, 0x846E, 0xDFE1, 0x8450,
+ 0xDFE2, 0x870B, 0xDFE3, 0x8704, 0xDFE4, 0x86F7, 0xDFE5, 0x870C,
+ 0xDFE6, 0x86FA, 0xDFE7, 0x86D6, 0xDFE8, 0x86F5, 0xDFE9, 0x874D,
+ 0xDFEA, 0x86F8, 0xDFEB, 0x870E, 0xDFEC, 0x8709, 0xDFED, 0x8701,
+ 0xDFEE, 0x86F6, 0xDFEF, 0x870D, 0xDFF0, 0x8705, 0xDFF1, 0x88D6,
+ 0xDFF2, 0x88CB, 0xDFF3, 0x88CD, 0xDFF4, 0x88CE, 0xDFF5, 0x88DE,
+ 0xDFF6, 0x88DB, 0xDFF7, 0x88DA, 0xDFF8, 0x88CC, 0xDFF9, 0x88D0,
+ 0xDFFA, 0x8985, 0xDFFB, 0x899B, 0xDFFC, 0x89DF, 0xDFFD, 0x89E5,
+ 0xDFFE, 0x89E4, 0xE040, 0x89E1, 0xE041, 0x89E0, 0xE042, 0x89E2,
+ 0xE043, 0x89DC, 0xE044, 0x89E6, 0xE045, 0x8A76, 0xE046, 0x8A86,
+ 0xE047, 0x8A7F, 0xE048, 0x8A61, 0xE049, 0x8A3F, 0xE04A, 0x8A77,
+ 0xE04B, 0x8A82, 0xE04C, 0x8A84, 0xE04D, 0x8A75, 0xE04E, 0x8A83,
+ 0xE04F, 0x8A81, 0xE050, 0x8A74, 0xE051, 0x8A7A, 0xE052, 0x8C3C,
+ 0xE053, 0x8C4B, 0xE054, 0x8C4A, 0xE055, 0x8C65, 0xE056, 0x8C64,
+ 0xE057, 0x8C66, 0xE058, 0x8C86, 0xE059, 0x8C84, 0xE05A, 0x8C85,
+ 0xE05B, 0x8CCC, 0xE05C, 0x8D68, 0xE05D, 0x8D69, 0xE05E, 0x8D91,
+ 0xE05F, 0x8D8C, 0xE060, 0x8D8E, 0xE061, 0x8D8F, 0xE062, 0x8D8D,
+ 0xE063, 0x8D93, 0xE064, 0x8D94, 0xE065, 0x8D90, 0xE066, 0x8D92,
+ 0xE067, 0x8DF0, 0xE068, 0x8DE0, 0xE069, 0x8DEC, 0xE06A, 0x8DF1,
+ 0xE06B, 0x8DEE, 0xE06C, 0x8DD0, 0xE06D, 0x8DE9, 0xE06E, 0x8DE3,
+ 0xE06F, 0x8DE2, 0xE070, 0x8DE7, 0xE071, 0x8DF2, 0xE072, 0x8DEB,
+ 0xE073, 0x8DF4, 0xE074, 0x8F06, 0xE075, 0x8EFF, 0xE076, 0x8F01,
+ 0xE077, 0x8F00, 0xE078, 0x8F05, 0xE079, 0x8F07, 0xE07A, 0x8F08,
+ 0xE07B, 0x8F02, 0xE07C, 0x8F0B, 0xE07D, 0x9052, 0xE07E, 0x903F,
+ 0xE0A1, 0x9044, 0xE0A2, 0x9049, 0xE0A3, 0x903D, 0xE0A4, 0x9110,
+ 0xE0A5, 0x910D, 0xE0A6, 0x910F, 0xE0A7, 0x9111, 0xE0A8, 0x9116,
+ 0xE0A9, 0x9114, 0xE0AA, 0x910B, 0xE0AB, 0x910E, 0xE0AC, 0x916E,
+ 0xE0AD, 0x916F, 0xE0AE, 0x9248, 0xE0AF, 0x9252, 0xE0B0, 0x9230,
+ 0xE0B1, 0x923A, 0xE0B2, 0x9266, 0xE0B3, 0x9233, 0xE0B4, 0x9265,
+ 0xE0B5, 0x925E, 0xE0B6, 0x9283, 0xE0B7, 0x922E, 0xE0B8, 0x924A,
+ 0xE0B9, 0x9246, 0xE0BA, 0x926D, 0xE0BB, 0x926C, 0xE0BC, 0x924F,
+ 0xE0BD, 0x9260, 0xE0BE, 0x9267, 0xE0BF, 0x926F, 0xE0C0, 0x9236,
+ 0xE0C1, 0x9261, 0xE0C2, 0x9270, 0xE0C3, 0x9231, 0xE0C4, 0x9254,
+ 0xE0C5, 0x9263, 0xE0C6, 0x9250, 0xE0C7, 0x9272, 0xE0C8, 0x924E,
+ 0xE0C9, 0x9253, 0xE0CA, 0x924C, 0xE0CB, 0x9256, 0xE0CC, 0x9232,
+ 0xE0CD, 0x959F, 0xE0CE, 0x959C, 0xE0CF, 0x959E, 0xE0D0, 0x959B,
+ 0xE0D1, 0x9692, 0xE0D2, 0x9693, 0xE0D3, 0x9691, 0xE0D4, 0x9697,
+ 0xE0D5, 0x96CE, 0xE0D6, 0x96FA, 0xE0D7, 0x96FD, 0xE0D8, 0x96F8,
+ 0xE0D9, 0x96F5, 0xE0DA, 0x9773, 0xE0DB, 0x9777, 0xE0DC, 0x9778,
+ 0xE0DD, 0x9772, 0xE0DE, 0x980F, 0xE0DF, 0x980D, 0xE0E0, 0x980E,
+ 0xE0E1, 0x98AC, 0xE0E2, 0x98F6, 0xE0E3, 0x98F9, 0xE0E4, 0x99AF,
+ 0xE0E5, 0x99B2, 0xE0E6, 0x99B0, 0xE0E7, 0x99B5, 0xE0E8, 0x9AAD,
+ 0xE0E9, 0x9AAB, 0xE0EA, 0x9B5B, 0xE0EB, 0x9CEA, 0xE0EC, 0x9CED,
+ 0xE0ED, 0x9CE7, 0xE0EE, 0x9E80, 0xE0EF, 0x9EFD, 0xE0F0, 0x50E6,
+ 0xE0F1, 0x50D4, 0xE0F2, 0x50D7, 0xE0F3, 0x50E8, 0xE0F4, 0x50F3,
+ 0xE0F5, 0x50DB, 0xE0F6, 0x50EA, 0xE0F7, 0x50DD, 0xE0F8, 0x50E4,
+ 0xE0F9, 0x50D3, 0xE0FA, 0x50EC, 0xE0FB, 0x50F0, 0xE0FC, 0x50EF,
+ 0xE0FD, 0x50E3, 0xE0FE, 0x50E0, 0xE140, 0x51D8, 0xE141, 0x5280,
+ 0xE142, 0x5281, 0xE143, 0x52E9, 0xE144, 0x52EB, 0xE145, 0x5330,
+ 0xE146, 0x53AC, 0xE147, 0x5627, 0xE148, 0x5615, 0xE149, 0x560C,
+ 0xE14A, 0x5612, 0xE14B, 0x55FC, 0xE14C, 0x560F, 0xE14D, 0x561C,
+ 0xE14E, 0x5601, 0xE14F, 0x5613, 0xE150, 0x5602, 0xE151, 0x55FA,
+ 0xE152, 0x561D, 0xE153, 0x5604, 0xE154, 0x55FF, 0xE155, 0x55F9,
+ 0xE156, 0x5889, 0xE157, 0x587C, 0xE158, 0x5890, 0xE159, 0x5898,
+ 0xE15A, 0x5886, 0xE15B, 0x5881, 0xE15C, 0x587F, 0xE15D, 0x5874,
+ 0xE15E, 0x588B, 0xE15F, 0x587A, 0xE160, 0x5887, 0xE161, 0x5891,
+ 0xE162, 0x588E, 0xE163, 0x5876, 0xE164, 0x5882, 0xE165, 0x5888,
+ 0xE166, 0x587B, 0xE167, 0x5894, 0xE168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+ 0xE1CC, 0x6180, 0xE1CD, 0x6174, 0xE1CE, 0x6154, 0xE1CF, 0x617A,
+ 0xE1D0, 0x615B, 0xE1D1, 0x6165, 0xE1D2, 0x613B, 0xE1D3, 0x616A,
+ 0xE1D4, 0x6161, 0xE1D5, 0x6156, 0xE1D6, 0x6229, 0xE1D7, 0x6227,
+ 0xE1D8, 0x622B, 0xE1D9, 0x642B, 0xE1DA, 0x644D, 0xE1DB, 0x645B,
+ 0xE1DC, 0x645D, 0xE1DD, 0x6474, 0xE1DE, 0x6476, 0xE1DF, 0x6472,
+ 0xE1E0, 0x6473, 0xE1E1, 0x647D, 0xE1E2, 0x6475, 0xE1E3, 0x6466,
+ 0xE1E4, 0x64A6, 0xE1E5, 0x644E, 0xE1E6, 0x6482, 0xE1E7, 0x645E,
+ 0xE1E8, 0x645C, 0xE1E9, 0x644B, 0xE1EA, 0x6453, 0xE1EB, 0x6460,
+ 0xE1EC, 0x6450, 0xE1ED, 0x647F, 0xE1EE, 0x643F, 0xE1EF, 0x646C,
+ 0xE1F0, 0x646B, 0xE1F1, 0x6459, 0xE1F2, 0x6465, 0xE1F3, 0x6477,
+ 0xE1F4, 0x6573, 0xE1F5, 0x65A0, 0xE1F6, 0x66A1, 0xE1F7, 0x66A0,
+ 0xE1F8, 0x669F, 0xE1F9, 0x6705, 0xE1FA, 0x6704, 0xE1FB, 0x6722,
+ 0xE1FC, 0x69B1, 0xE1FD, 0x69B6, 0xE1FE, 0x69C9, 0xE240, 0x69A0,
+ 0xE241, 0x69CE, 0xE242, 0x6996, 0xE243, 0x69B0, 0xE244, 0x69AC,
+ 0xE245, 0x69BC, 0xE246, 0x6991, 0xE247, 0x6999, 0xE248, 0x698E,
+ 0xE249, 0x69A7, 0xE24A, 0x698D, 0xE24B, 0x69A9, 0xE24C, 0x69BE,
+ 0xE24D, 0x69AF, 0xE24E, 0x69BF, 0xE24F, 0x69C4, 0xE250, 0x69BD,
+ 0xE251, 0x69A4, 0xE252, 0x69D4, 0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08, 0xE2B9, 0x6F21, 0xE2BA, 0x7187,
+ 0xE2BB, 0x7190, 0xE2BC, 0x7189, 0xE2BD, 0x7180, 0xE2BE, 0x7185,
+ 0xE2BF, 0x7182, 0xE2C0, 0x718F, 0xE2C1, 0x717B, 0xE2C2, 0x7186,
+ 0xE2C3, 0x7181, 0xE2C4, 0x7197, 0xE2C5, 0x7244, 0xE2C6, 0x7253,
+ 0xE2C7, 0x7297, 0xE2C8, 0x7295, 0xE2C9, 0x7293, 0xE2CA, 0x7343,
+ 0xE2CB, 0x734D, 0xE2CC, 0x7351, 0xE2CD, 0x734C, 0xE2CE, 0x7462,
+ 0xE2CF, 0x7473, 0xE2D0, 0x7471, 0xE2D1, 0x7475, 0xE2D2, 0x7472,
+ 0xE2D3, 0x7467, 0xE2D4, 0x746E, 0xE2D5, 0x7500, 0xE2D6, 0x7502,
+ 0xE2D7, 0x7503, 0xE2D8, 0x757D, 0xE2D9, 0x7590, 0xE2DA, 0x7616,
+ 0xE2DB, 0x7608, 0xE2DC, 0x760C, 0xE2DD, 0x7615, 0xE2DE, 0x7611,
+ 0xE2DF, 0x760A, 0xE2E0, 0x7614, 0xE2E1, 0x76B8, 0xE2E2, 0x7781,
+ 0xE2E3, 0x777C, 0xE2E4, 0x7785, 0xE2E5, 0x7782, 0xE2E6, 0x776E,
+ 0xE2E7, 0x7780, 0xE2E8, 0x776F, 0xE2E9, 0x777E, 0xE2EA, 0x7783,
+ 0xE2EB, 0x78B2, 0xE2EC, 0x78AA, 0xE2ED, 0x78B4, 0xE2EE, 0x78AD,
+ 0xE2EF, 0x78A8, 0xE2F0, 0x787E, 0xE2F1, 0x78AB, 0xE2F2, 0x789E,
+ 0xE2F3, 0x78A5, 0xE2F4, 0x78A0, 0xE2F5, 0x78AC, 0xE2F6, 0x78A2,
+ 0xE2F7, 0x78A4, 0xE2F8, 0x7998, 0xE2F9, 0x798A, 0xE2FA, 0x798B,
+ 0xE2FB, 0x7996, 0xE2FC, 0x7995, 0xE2FD, 0x7994, 0xE2FE, 0x7993,
+ 0xE340, 0x7997, 0xE341, 0x7988, 0xE342, 0x7992, 0xE343, 0x7990,
+ 0xE344, 0x7A2B, 0xE345, 0x7A4A, 0xE346, 0x7A30, 0xE347, 0x7A2F,
+ 0xE348, 0x7A28, 0xE349, 0x7A26, 0xE34A, 0x7AA8, 0xE34B, 0x7AAB,
+ 0xE34C, 0x7AAC, 0xE34D, 0x7AEE, 0xE34E, 0x7B88, 0xE34F, 0x7B9C,
+ 0xE350, 0x7B8A, 0xE351, 0x7B91, 0xE352, 0x7B90, 0xE353, 0x7B96,
+ 0xE354, 0x7B8D, 0xE355, 0x7B8C, 0xE356, 0x7B9B, 0xE357, 0x7B8E,
+ 0xE358, 0x7B85, 0xE359, 0x7B98, 0xE35A, 0x5284, 0xE35B, 0x7B99,
+ 0xE35C, 0x7BA4, 0xE35D, 0x7B82, 0xE35E, 0x7CBB, 0xE35F, 0x7CBF,
+ 0xE360, 0x7CBC, 0xE361, 0x7CBA, 0xE362, 0x7DA7, 0xE363, 0x7DB7,
+ 0xE364, 0x7DC2, 0xE365, 0x7DA3, 0xE366, 0x7DAA, 0xE367, 0x7DC1,
+ 0xE368, 0x7DC0, 0xE369, 0x7DC5, 0xE36A, 0x7D9D, 0xE36B, 0x7DCE,
+ 0xE36C, 0x7DC4, 0xE36D, 0x7DC6, 0xE36E, 0x7DCB, 0xE36F, 0x7DCC,
+ 0xE370, 0x7DAF, 0xE371, 0x7DB9, 0xE372, 0x7D96, 0xE373, 0x7DBC,
+ 0xE374, 0x7D9F, 0xE375, 0x7DA6, 0xE376, 0x7DAE, 0xE377, 0x7DA9,
+ 0xE378, 0x7DA1, 0xE379, 0x7DC9, 0xE37A, 0x7F73, 0xE37B, 0x7FE2,
+ 0xE37C, 0x7FE3, 0xE37D, 0x7FE5, 0xE37E, 0x7FDE, 0xE3A1, 0x8024,
+ 0xE3A2, 0x805D, 0xE3A3, 0x805C, 0xE3A4, 0x8189, 0xE3A5, 0x8186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xE3E9, 0x8712,
+ 0xE3EA, 0x873A, 0xE3EB, 0x8731, 0xE3EC, 0x8735, 0xE3ED, 0x8742,
+ 0xE3EE, 0x8726, 0xE3EF, 0x8727, 0xE3F0, 0x8738, 0xE3F1, 0x8724,
+ 0xE3F2, 0x871A, 0xE3F3, 0x8730, 0xE3F4, 0x8711, 0xE3F5, 0x88F7,
+ 0xE3F6, 0x88E7, 0xE3F7, 0x88F1, 0xE3F8, 0x88F2, 0xE3F9, 0x88FA,
+ 0xE3FA, 0x88FE, 0xE3FB, 0x88EE, 0xE3FC, 0x88FC, 0xE3FD, 0x88F6,
+ 0xE3FE, 0x88FB, 0xE440, 0x88F0, 0xE441, 0x88EC, 0xE442, 0x88EB,
+ 0xE443, 0x899D, 0xE444, 0x89A1, 0xE445, 0x899F, 0xE446, 0x899E,
+ 0xE447, 0x89E9, 0xE448, 0x89EB, 0xE449, 0x89E8, 0xE44A, 0x8AAB,
+ 0xE44B, 0x8A99, 0xE44C, 0x8A8B, 0xE44D, 0x8A92, 0xE44E, 0x8A8F,
+ 0xE44F, 0x8A96, 0xE450, 0x8C3D, 0xE451, 0x8C68, 0xE452, 0x8C69,
+ 0xE453, 0x8CD5, 0xE454, 0x8CCF, 0xE455, 0x8CD7, 0xE456, 0x8D96,
+ 0xE457, 0x8E09, 0xE458, 0x8E02, 0xE459, 0x8DFF, 0xE45A, 0x8E0D,
+ 0xE45B, 0x8DFD, 0xE45C, 0x8E0A, 0xE45D, 0x8E03, 0xE45E, 0x8E07,
+ 0xE45F, 0x8E06, 0xE460, 0x8E05, 0xE461, 0x8DFE, 0xE462, 0x8E00,
+ 0xE463, 0x8E04, 0xE464, 0x8F10, 0xE465, 0x8F11, 0xE466, 0x8F0E,
+ 0xE467, 0x8F0D, 0xE468, 0x9123, 0xE469, 0x911C, 0xE46A, 0x9120,
+ 0xE46B, 0x9122, 0xE46C, 0x911F, 0xE46D, 0x911D, 0xE46E, 0x911A,
+ 0xE46F, 0x9124, 0xE470, 0x9121, 0xE471, 0x911B, 0xE472, 0x917A,
+ 0xE473, 0x9172, 0xE474, 0x9179, 0xE475, 0x9173, 0xE476, 0x92A5,
+ 0xE477, 0x92A4, 0xE478, 0x9276, 0xE479, 0x929B, 0xE47A, 0x927A,
+ 0xE47B, 0x92A0, 0xE47C, 0x9294, 0xE47D, 0x92AA, 0xE47E, 0x928D,
+ 0xE4A1, 0x92A6, 0xE4A2, 0x929A, 0xE4A3, 0x92AB, 0xE4A4, 0x9279,
+ 0xE4A5, 0x9297, 0xE4A6, 0x927F, 0xE4A7, 0x92A3, 0xE4A8, 0x92EE,
+ 0xE4A9, 0x928E, 0xE4AA, 0x9282, 0xE4AB, 0x9295, 0xE4AC, 0x92A2,
+ 0xE4AD, 0x927D, 0xE4AE, 0x9288, 0xE4AF, 0x92A1, 0xE4B0, 0x928A,
+ 0xE4B1, 0x9286, 0xE4B2, 0x928C, 0xE4B3, 0x9299, 0xE4B4, 0x92A7,
+ 0xE4B5, 0x927E, 0xE4B6, 0x9287, 0xE4B7, 0x92A9, 0xE4B8, 0x929D,
+ 0xE4B9, 0x928B, 0xE4BA, 0x922D, 0xE4BB, 0x969E, 0xE4BC, 0x96A1,
+ 0xE4BD, 0x96FF, 0xE4BE, 0x9758, 0xE4BF, 0x977D, 0xE4C0, 0x977A,
+ 0xE4C1, 0x977E, 0xE4C2, 0x9783, 0xE4C3, 0x9780, 0xE4C4, 0x9782,
+ 0xE4C5, 0x977B, 0xE4C6, 0x9784, 0xE4C7, 0x9781, 0xE4C8, 0x977F,
+ 0xE4C9, 0x97CE, 0xE4CA, 0x97CD, 0xE4CB, 0x9816, 0xE4CC, 0x98AD,
+ 0xE4CD, 0x98AE, 0xE4CE, 0x9902, 0xE4CF, 0x9900, 0xE4D0, 0x9907,
+ 0xE4D1, 0x999D, 0xE4D2, 0x999C, 0xE4D3, 0x99C3, 0xE4D4, 0x99B9,
+ 0xE4D5, 0x99BB, 0xE4D6, 0x99BA, 0xE4D7, 0x99C2, 0xE4D8, 0x99BD,
+ 0xE4D9, 0x99C7, 0xE4DA, 0x9AB1, 0xE4DB, 0x9AE3, 0xE4DC, 0x9AE7,
+ 0xE4DD, 0x9B3E, 0xE4DE, 0x9B3F, 0xE4DF, 0x9B60, 0xE4E0, 0x9B61,
+ 0xE4E1, 0x9B5F, 0xE4E2, 0x9CF1, 0xE4E3, 0x9CF2, 0xE4E4, 0x9CF5,
+ 0xE4E5, 0x9EA7, 0xE4E6, 0x50FF, 0xE4E7, 0x5103, 0xE4E8, 0x5130,
+ 0xE4E9, 0x50F8, 0xE4EA, 0x5106, 0xE4EB, 0x5107, 0xE4EC, 0x50F6,
+ 0xE4ED, 0x50FE, 0xE4EE, 0x510B, 0xE4EF, 0x510C, 0xE4F0, 0x50FD,
+ 0xE4F1, 0x510A, 0xE4F2, 0x528B, 0xE4F3, 0x528C, 0xE4F4, 0x52F1,
+ 0xE4F5, 0x52EF, 0xE4F6, 0x5648, 0xE4F7, 0x5642, 0xE4F8, 0x564C,
+ 0xE4F9, 0x5635, 0xE4FA, 0x5641, 0xE4FB, 0x564A, 0xE4FC, 0x5649,
+ 0xE4FD, 0x5646, 0xE4FE, 0x5658, 0xE540, 0x565A, 0xE541, 0x5640,
+ 0xE542, 0x5633, 0xE543, 0x563D, 0xE544, 0x562C, 0xE545, 0x563E,
+ 0xE546, 0x5638, 0xE547, 0x562A, 0xE548, 0x563A, 0xE549, 0x571A,
+ 0xE54A, 0x58AB, 0xE54B, 0x589D, 0xE54C, 0x58B1, 0xE54D, 0x58A0,
+ 0xE54E, 0x58A3, 0xE54F, 0x58AF, 0xE550, 0x58AC, 0xE551, 0x58A5,
+ 0xE552, 0x58A1, 0xE553, 0x58FF, 0xE554, 0x5AFF, 0xE555, 0x5AF4,
+ 0xE556, 0x5AFD, 0xE557, 0x5AF7, 0xE558, 0x5AF6, 0xE559, 0x5B03,
+ 0xE55A, 0x5AF8, 0xE55B, 0x5B02, 0xE55C, 0x5AF9, 0xE55D, 0x5B01,
+ 0xE55E, 0x5B07, 0xE55F, 0x5B05, 0xE560, 0x5B0F, 0xE561, 0x5C67,
+ 0xE562, 0x5D99, 0xE563, 0x5D97, 0xE564, 0x5D9F, 0xE565, 0x5D92,
+ 0xE566, 0x5DA2, 0xE567, 0x5D93, 0xE568, 0x5D95, 0xE569, 0x5DA0,
+ 0xE56A, 0x5D9C, 0xE56B, 0x5DA1, 0xE56C, 0x5D9A, 0xE56D, 0x5D9E,
+ 0xE56E, 0x5E69, 0xE56F, 0x5E5D, 0xE570, 0x5E60, 0xE571, 0x5E5C,
+ 0xE572, 0x7DF3, 0xE573, 0x5EDB, 0xE574, 0x5EDE, 0xE575, 0x5EE1,
+ 0xE576, 0x5F49, 0xE577, 0x5FB2, 0xE578, 0x618B, 0xE579, 0x6183,
+ 0xE57A, 0x6179, 0xE57B, 0x61B1, 0xE57C, 0x61B0, 0xE57D, 0x61A2,
+ 0xE57E, 0x6189, 0xE5A1, 0x619B, 0xE5A2, 0x6193, 0xE5A3, 0x61AF,
+ 0xE5A4, 0x61AD, 0xE5A5, 0x619F, 0xE5A6, 0x6192, 0xE5A7, 0x61AA,
+ 0xE5A8, 0x61A1, 0xE5A9, 0x618D, 0xE5AA, 0x6166, 0xE5AB, 0x61B3,
+ 0xE5AC, 0x622D, 0xE5AD, 0x646E, 0xE5AE, 0x6470, 0xE5AF, 0x6496,
+ 0xE5B0, 0x64A0, 0xE5B1, 0x6485, 0xE5B2, 0x6497, 0xE5B3, 0x649C,
+ 0xE5B4, 0x648F, 0xE5B5, 0x648B, 0xE5B6, 0x648A, 0xE5B7, 0x648C,
+ 0xE5B8, 0x64A3, 0xE5B9, 0x649F, 0xE5BA, 0x6468, 0xE5BB, 0x64B1,
+ 0xE5BC, 0x6498, 0xE5BD, 0x6576, 0xE5BE, 0x657A, 0xE5BF, 0x6579,
+ 0xE5C0, 0x657B, 0xE5C1, 0x65B2, 0xE5C2, 0x65B3, 0xE5C3, 0x66B5,
+ 0xE5C4, 0x66B0, 0xE5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, 0x6F96, 0xE648, 0x6F76,
+ 0xE649, 0x6F6C, 0xE64A, 0x6F82, 0xE64B, 0x6F55, 0xE64C, 0x6F72,
+ 0xE64D, 0x6F52, 0xE64E, 0x6F50, 0xE64F, 0x6F57, 0xE650, 0x6F94,
+ 0xE651, 0x6F93, 0xE652, 0x6F5D, 0xE653, 0x6F00, 0xE654, 0x6F61,
+ 0xE655, 0x6F6B, 0xE656, 0x6F7D, 0xE657, 0x6F67, 0xE658, 0x6F90,
+ 0xE659, 0x6F53, 0xE65A, 0x6F8B, 0xE65B, 0x6F69, 0xE65C, 0x6F7F,
+ 0xE65D, 0x6F95, 0xE65E, 0x6F63, 0xE65F, 0x6F77, 0xE660, 0x6F6A,
+ 0xE661, 0x6F7B, 0xE662, 0x71B2, 0xE663, 0x71AF, 0xE664, 0x719B,
+ 0xE665, 0x71B0, 0xE666, 0x71A0, 0xE667, 0x719A, 0xE668, 0x71A9,
+ 0xE669, 0x71B5, 0xE66A, 0x719D, 0xE66B, 0x71A5, 0xE66C, 0x719E,
+ 0xE66D, 0x71A4, 0xE66E, 0x71A1, 0xE66F, 0x71AA, 0xE670, 0x719C,
+ 0xE671, 0x71A7, 0xE672, 0x71B3, 0xE673, 0x7298, 0xE674, 0x729A,
+ 0xE675, 0x7358, 0xE676, 0x7352, 0xE677, 0x735E, 0xE678, 0x735F,
+ 0xE679, 0x7360, 0xE67A, 0x735D, 0xE67B, 0x735B, 0xE67C, 0x7361,
+ 0xE67D, 0x735A, 0xE67E, 0x7359, 0xE6A1, 0x7362, 0xE6A2, 0x7487,
+ 0xE6A3, 0x7489, 0xE6A4, 0x748A, 0xE6A5, 0x7486, 0xE6A6, 0x7481,
+ 0xE6A7, 0x747D, 0xE6A8, 0x7485, 0xE6A9, 0x7488, 0xE6AA, 0x747C,
+ 0xE6AB, 0x7479, 0xE6AC, 0x7508, 0xE6AD, 0x7507, 0xE6AE, 0x757E,
+ 0xE6AF, 0x7625, 0xE6B0, 0x761E, 0xE6B1, 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, 0xE6F2, 0x7FAC,
+ 0xE6F3, 0x7FB0, 0xE6F4, 0x7FAD, 0xE6F5, 0x7FED, 0xE6F6, 0x7FEB,
+ 0xE6F7, 0x7FEA, 0xE6F8, 0x7FEC, 0xE6F9, 0x7FE6, 0xE6FA, 0x7FE8,
+ 0xE6FB, 0x8064, 0xE6FC, 0x8067, 0xE6FD, 0x81A3, 0xE6FE, 0x819F,
+ 0xE740, 0x819E, 0xE741, 0x8195, 0xE742, 0x81A2, 0xE743, 0x8199,
+ 0xE744, 0x8197, 0xE745, 0x8216, 0xE746, 0x824F, 0xE747, 0x8253,
+ 0xE748, 0x8252, 0xE749, 0x8250, 0xE74A, 0x824E, 0xE74B, 0x8251,
+ 0xE74C, 0x8524, 0xE74D, 0x853B, 0xE74E, 0x850F, 0xE74F, 0x8500,
+ 0xE750, 0x8529, 0xE751, 0x850E, 0xE752, 0x8509, 0xE753, 0x850D,
+ 0xE754, 0x851F, 0xE755, 0x850A, 0xE756, 0x8527, 0xE757, 0x851C,
+ 0xE758, 0x84FB, 0xE759, 0x852B, 0xE75A, 0x84FA, 0xE75B, 0x8508,
+ 0xE75C, 0x850C, 0xE75D, 0x84F4, 0xE75E, 0x852A, 0xE75F, 0x84F2,
+ 0xE760, 0x8515, 0xE761, 0x84F7, 0xE762, 0x84EB, 0xE763, 0x84F3,
+ 0xE764, 0x84FC, 0xE765, 0x8512, 0xE766, 0x84EA, 0xE767, 0x84E9,
+ 0xE768, 0x8516, 0xE769, 0x84FE, 0xE76A, 0x8528, 0xE76B, 0x851D,
+ 0xE76C, 0x852E, 0xE76D, 0x8502, 0xE76E, 0x84FD, 0xE76F, 0x851E,
+ 0xE770, 0x84F6, 0xE771, 0x8531, 0xE772, 0x8526, 0xE773, 0x84E7,
+ 0xE774, 0x84E8, 0xE775, 0x84F0, 0xE776, 0x84EF, 0xE777, 0x84F9,
+ 0xE778, 0x8518, 0xE779, 0x8520, 0xE77A, 0x8530, 0xE77B, 0x850B,
+ 0xE77C,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,
+ 0xE7E2, 0x8ABA, 0xE7E3, 0x8ABD, 0xE7E4, 0x8AD9, 0xE7E5, 0x8C3E,
+ 0xE7E6, 0x8C4D, 0xE7E7, 0x8C8F, 0xE7E8, 0x8CE5, 0xE7E9, 0x8CDF,
+ 0xE7EA, 0x8CD9, 0xE7EB, 0x8CE8, 0xE7EC, 0x8CDA, 0xE7ED, 0x8CDD,
+ 0xE7EE, 0x8CE7, 0xE7EF, 0x8DA0, 0xE7F0, 0x8D9C, 0xE7F1, 0x8DA1,
+ 0xE7F2, 0x8D9B, 0xE7F3, 0x8E20, 0xE7F4, 0x8E23, 0xE7F5, 0x8E25,
+ 0xE7F6, 0x8E24, 0xE7F7, 0x8E2E, 0xE7F8, 0x8E15, 0xE7F9, 0x8E1B,
+ 0xE7FA, 0x8E16, 0xE7FB, 0x8E11, 0xE7FC, 0x8E19, 0xE7FD, 0x8E26,
+ 0xE7FE, 0x8E27, 0xE840, 0x8E14, 0xE841, 0x8E12, 0xE842, 0x8E18,
+ 0xE843, 0x8E13, 0xE844, 0x8E1C, 0xE845, 0x8E17, 0xE846, 0x8E1A,
+ 0xE847, 0x8F2C, 0xE848, 0x8F24, 0xE849, 0x8F18, 0xE84A, 0x8F1A,
+ 0xE84B, 0x8F20, 0xE84C, 0x8F23, 0xE84D, 0x8F16, 0xE84E, 0x8F17,
+ 0xE84F, 0x9073, 0xE850, 0x9070, 0xE851, 0x906F, 0xE852, 0x9067,
+ 0xE853, 0x906B, 0xE854, 0x912F, 0xE855, 0x912B, 0xE856, 0x9129,
+ 0xE857, 0x912A, 0xE858, 0x9132, 0xE859, 0x9126, 0xE85A, 0x912E,
+ 0xE85B, 0x9185, 0xE85C, 0x9186, 0xE85D, 0x918A, 0xE85E, 0x9181,
+ 0xE85F, 0x9182, 0xE860, 0x9184, 0xE861, 0x9180, 0xE862, 0x92D0,
+ 0xE863, 0x92C3, 0xE864, 0x92C4, 0xE865, 0x92C0, 0xE866, 0x92D9,
+ 0xE867, 0x92B6, 0xE868, 0x92CF, 0xE869, 0x92F1, 0xE86A, 0x92DF,
+ 0xE86B, 0x92D8, 0xE86C, 0x92E9, 0xE86D, 0x92D7, 0xE86E, 0x92DD,
+ 0xE86F, 0x92CC, 0xE870, 0x92EF, 0xE871, 0x92C2, 0xE872, 0x92E8,
+ 0xE873, 0x92CA, 0xE874, 0x92C8, 0xE875, 0x92CE, 0xE876, 0x92E6,
+ 0xE877, 0x92CD, 0xE878, 0x92D5, 0xE879, 0x92C9, 0xE87A, 0x92E0,
+ 0xE87B, 0x92DE, 0xE87C, 0x92E7, 0xE87D, 0x92D1, 0xE87E, 0x92D3,
+ 0xE8A1, 0x92B5, 0xE8A2, 0x92E1, 0xE8A3, 0x92C6, 0xE8A4, 0x92B4,
+ 0xE8A5, 0x957C, 0xE8A6, 0x95AC, 0xE8A7, 0x95AB, 0xE8A8, 0x95AE,
+ 0xE8A9, 0x95B0, 0xE8AA, 0x96A4, 0xE8AB, 0x96A2, 0xE8AC, 0x96D3,
+ 0xE8AD, 0x9705, 0xE8AE, 0x9708, 0xE8AF, 0x9702, 0xE8B0, 0x975A,
+ 0xE8B1, 0x978A, 0xE8B2, 0x978E, 0xE8B3, 0x9788, 0xE8B4, 0x97D0,
+ 0xE8B5, 0x97CF, 0xE8B6, 0x981E, 0xE8B7, 0x981D, 0xE8B8, 0x9826,
+ 0xE8B9, 0x9829, 0xE8BA, 0x9828, 0xE8BB, 0x9820, 0xE8BC, 0x981B,
+ 0xE8BD, 0x9827, 0xE8BE, 0x98B2, 0xE8BF, 0x9908, 0xE8C0, 0x98FA,
+ 0xE8C1, 0x9911, 0xE8C2, 0x9914, 0xE8C3, 0x9916, 0xE8C4, 0x9917,
+ 0xE8C5, 0x9915, 0xE8C6, 0x99DC, 0xE8C7, 0x99CD, 0xE8C8, 0x99CF,
+ 0xE8C9, 0x99D3, 0xE8CA, 0x99D4, 0xE8CB, 0x99CE, 0xE8CC, 0x99C9,
+ 0xE8CD, 0x99D6, 0xE8CE,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x5B19, 0xE953, 0x5B1B, 0xE954, 0x5B21, 0xE955, 0x5B14,
+ 0xE956, 0x5B13, 0xE957, 0x5B10, 0xE958, 0x5B16, 0xE959, 0x5B28,
+ 0xE95A, 0x5B1A, 0xE95B, 0x5B20, 0xE95C, 0x5B1E, 0xE95D, 0x5BEF,
+ 0xE95E, 0x5DAC, 0xE95F, 0x5DB1, 0xE960, 0x5DA9, 0xE961, 0x5DA7,
+ 0xE962, 0x5DB5, 0xE963, 0x5DB0, 0xE964, 0x5DAE, 0xE965, 0x5DAA,
+ 0xE966, 0x5DA8, 0xE967, 0x5DB2, 0xE968, 0x5DAD, 0xE969, 0x5DAF,
+ 0xE96A, 0x5DB4, 0xE96B, 0x5E67, 0xE96C, 0x5E68, 0xE96D, 0x5E66,
+ 0xE96E, 0x5E6F, 0xE96F, 0x5EE9, 0xE970, 0x5EE7, 0xE971, 0x5EE6,
+ 0xE972, 0x5EE8, 0xE973, 0x5EE5, 0xE974, 0x5F4B, 0xE975, 0x5FBC,
+ 0xE976, 0x619D, 0xE977, 0x61A8, 0xE978, 0x6196, 0xE979, 0x61C5,
+ 0xE97A, 0x61B4, 0xE97B, 0x61C6, 0xE97C, 0x61C1, 0xE97D, 0x61CC,
+ 0xE97E, 0x61BA, 0xE9A1, 0x61BF, 0xE9A2, 0x61B8, 0xE9A3, 0x618C,
+ 0xE9A4, 0x64D7, 0xE9A5, 0x64D6, 0xE9A6, 0x64D0, 0xE9A7, 0x64CF,
+ 0xE9A8, 0x64C9, 0xE9A9, 0x64BD, 0xE9AA, 0x6489, 0xE9AB, 0x64C3,
+ 0xE9AC, 0x64DB, 0xE9AD, 0x64F3, 0xE9AE, 0x64D9, 0xE9AF, 0x6533,
+ 0xE9B0, 0x657F, 0xE9B1, 0x657C, 0xE9B2, 0x65A2, 0xE9B3, 0x66C8,
+ 0xE9B4, 0x66BE, 0xE9B5, 0x66C0, 0xE9B6, 0x66CA, 0xE9B7, 0x66CB,
+ 0xE9B8, 0x66CF, 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0xE9F8, 0x6FAE, 0xE9F9, 0x6FBA, 0xE9FA, 0x6FAC, 0xE9FB, 0x6FAA,
+ 0xE9FC, 0x6FCF, 0xE9FD, 0x6FBF, 0xE9FE, 0x6FB8, 0xEA40, 0x6FA2,
+ 0xEA41, 0x6FC9, 0xEA42, 0x6FAB, 0xEA43, 0x6FCD, 0xEA44, 0x6FAF,
+ 0xEA45, 0x6FB2, 0xEA46, 0x6FB0, 0xEA47, 0x71C5, 0xEA48, 0x71C2,
+ 0xEA49, 0x71BF, 0xEA4A, 0x71B8, 0xEA4B, 0x71D6, 0xEA4C, 0x71C0,
+ 0xEA4D, 0x71C1, 0xEA4E, 0x71CB, 0xEA4F, 0x71D4, 0xEA50, 0x71CA,
+ 0xEA51, 0x71C7, 0xEA52, 0x71CF, 0xEA53, 0x71BD, 0xEA54, 0x71D8,
+ 0xEA55, 0x71BC, 0xEA56, 0x71C6, 0xEA57, 0x71DA, 0xEA58, 0x71DB,
+ 0xEA59, 0x729D, 0xEA5A, 0x729E, 0xEA5B, 0x7369, 0xEA5C, 0x7366,
+ 0xEA5D, 0x7367, 0xEA5E, 0x736C, 0xEA5F, 0x7365, 0xEA60, 0x736B,
+ 0xEA61, 0x736A, 0xEA62, 0x747F, 0xEA63, 0x749A, 0xEA64, 0x74A0,
+ 0xEA65, 0x7494, 0xEA66, 0x7492, 0xEA67, 0x7495, 0xEA68, 0x74A1,
+ 0xEA69, 0x750B, 0xEA6A, 0x7580, 0xEA6B, 0x762F, 0xEA6C, 0x762D,
+ 0xEA6D, 0x7631, 0xEA6E, 0x763D, 0xEA6F, 0x7633, 0xEA70, 0x763C,
+ 0xEA71, 0x7635, 0xEA72, 0x7632, 0xEA73, 0x7630, 0xEA74, 0x76BB,
+ 0xEA75, 0x76E6, 0xEA76, 0x779A, 0xEA77, 0x779D, 0xEA78, 0x77A1,
+ 0xEA79, 0x779C, 0xEA7A, 0x779B, 0xEA7B, 0x77A2, 0xEA7C, 0x77A3,
+ 0xEA7D, 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F43, 0xEAE0, 0x7F7B, 0xEAE1, 0x7F7C, 0xEAE2, 0x7F7A,
+ 0xEAE3, 0x7FB1, 0xEAE4, 0x7FEF, 0xEAE5, 0x802A, 0xEAE6, 0x8029,
+ 0xEAE7, 0x806C, 0xEAE8, 0x81B1, 0xEAE9, 0x81A6, 0xEAEA, 0x81AE,
+ 0xEAEB, 0x81B9, 0xEAEC, 0x81B5, 0xEAED, 0x81AB, 0xEAEE, 0x81B0,
+ 0xEAEF, 0x81AC, 0xEAF0, 0x81B4, 0xEAF1, 0x81B2, 0xEAF2, 0x81B7,
+ 0xEAF3, 0x81A7, 0xEAF4, 0x81F2, 0xEAF5, 0x8255, 0xEAF6, 0x8256,
+ 0xEAF7, 0x8257, 0xEAF8, 0x8556, 0xEAF9, 0x8545, 0xEAFA, 0x856B,
+ 0xEAFB, 0x854D, 0xEAFC, 0x8553, 0xEAFD, 0x8561, 0xEAFE, 0x8558,
+ 0xEB40, 0x8540, 0xEB41, 0x8546, 0xEB42, 0x8564, 0xEB43, 0x8541,
+ 0xEB44, 0x8562, 0xEB45, 0x8544, 0xEB46, 0x8551, 0xEB47, 0x8547,
+ 0xEB48, 0x8563, 0xEB49, 0x853E, 0xEB4A, 0x855B, 0xEB4B, 0x8571,
+ 0xEB4C, 0x854E, 0xEB4D, 0x856E, 0xEB4E, 0x8575, 0xEB4F, 0x8555,
+ 0xEB50, 0x8567, 0xEB51, 0x8560, 0xEB52, 0x858C, 0xEB53, 0x8566,
+ 0xEB54, 0x855D, 0xEB55, 0x8554, 0xEB56, 0x8565, 0xEB57, 0x856C,
+ 0xEB58, 0x8663, 0xEB59, 0x8665, 0xEB5A, 0x8664, 0xEB5B, 0x879B,
+ 0xEB5C, 0x878F, 0xEB5D, 0x8797, 0xEB5E, 0x8793, 0xEB5F, 0x8792,
+ 0xEB60, 0x8788, 0xEB61, 0x8781, 0xEB62, 0x8796, 0xEB63, 0x8798,
+ 0xEB64, 0x8779, 0xEB65, 0x8787, 0xEB66, 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
+ 0xEBCA, 0x8F2E, 0xEBCB, 0x8F35, 0xEBCC, 0x8F32, 0xEBCD, 0x8F39,
+ 0xEBCE, 0x8F37, 0xEBCF, 0x8F34, 0xEBD0, 0x9076, 0xEBD1, 0x9079,
+ 0xEBD2, 0x907B, 0xEBD3, 0x9086, 0xEBD4, 0x90FA, 0xEBD5, 0x9133,
+ 0xEBD6, 0x9135, 0xEBD7, 0x9136, 0xEBD8, 0x9193, 0xEBD9, 0x9190,
+ 0xEBDA, 0x9191, 0xEBDB, 0x918D, 0xEBDC, 0x918F, 0xEBDD, 0x9327,
+ 0xEBDE, 0x931E, 0xEBDF, 0x9308, 0xEBE0, 0x931F, 0xEBE1, 0x9306,
+ 0xEBE2, 0x930F, 0xEBE3, 0x937A, 0xEBE4, 0x9338, 0xEBE5, 0x933C,
+ 0xEBE6, 0x931B, 0xEBE7, 0x9323, 0xEBE8, 0x9312, 0xEBE9, 0x9301,
+ 0xEBEA, 0x9346, 0xEBEB, 0x932D, 0xEBEC, 0x930E, 0xEBED, 0x930D,
+ 0xEBEE, 0x92CB, 0xEBEF, 0x931D, 0xEBF0, 0x92FA, 0xEBF1, 0x9325,
+ 0xEBF2, 0x9313, 0xEBF3, 0x92F9, 0xEBF4, 0x92F7, 0xEBF5, 0x9334,
+ 0xEBF6, 0x9302, 0xEBF7, 0x9324, 0xEBF8, 0x92FF, 0xEBF9, 0x9329,
+ 0xEBFA, 0x9339, 0xEBFB, 0x9335, 0xEBFC, 0x932A, 0xEBFD, 0x9314,
+ 0xEBFE, 0x930C, 0xEC40, 0x930B, 0xEC41, 0x92FE, 0xEC42, 0x9309,
+ 0xEC43, 0x9300, 0xEC44, 0x92FB, 0xEC45, 0x9316, 0xEC46, 0x95BC,
+ 0xEC47, 0x95CD, 0xEC48, 0x95BE, 0xEC49, 0x95B9, 0xEC4A, 0x95BA,
+ 0xEC4B, 0x95B6, 0xEC4C, 0x95BF, 0xEC4D, 0x95B5, 0xEC4E, 0x95BD,
+ 0xEC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ECB5, 0x9ED6, 0xECB6, 0x9EFA, 0xECB7, 0x9F12, 0xECB8, 0x9F3D,
+ 0xECB9, 0x5126, 0xECBA, 0x5125, 0xECBB, 0x5122, 0xECBC, 0x5124,
+ 0xECBD, 0x5120, 0xECBE, 0x5129, 0xECBF, 0x52F4, 0xECC0, 0x5693,
+ 0xECC1, 0x568C, 0xECC2, 0x568D, 0xECC3, 0x5686, 0xECC4, 0x5684,
+ 0xECC5, 0x5683, 0xECC6, 0x567E, 0xECC7, 0x5682, 0xECC8, 0x567F,
+ 0xECC9, 0x5681, 0xECCA, 0x58D6, 0xECCB, 0x58D4, 0xECCC, 0x58CF,
+ 0xECCD, 0x58D2, 0xECCE, 0x5B2D, 0xECCF, 0x5B25, 0xECD0, 0x5B32,
+ 0xECD1, 0x5B23, 0xECD2, 0x5B2C, 0xECD3, 0x5B27, 0xECD4, 0x5B26,
+ 0xECD5, 0x5B2F, 0xECD6, 0x5B2E, 0xECD7, 0x5B7B, 0xECD8, 0x5BF1,
+ 0xECD9, 0x5BF2, 0xECDA, 0x5DB7, 0xECDB, 0x5E6C, 0xECDC, 0x5E6A,
+ 0xECDD, 0x5FBE, 0xECDE, 0x5FBB, 0xECDF, 0x61C3, 0xECE0, 0x61B5,
+ 0xECE1, 0x61BC, 0xECE2, 0x61E7, 0xECE3, 0x61E0, 0xECE4, 0x61E5,
+ 0xECE5, 0x61E4, 0xECE6, 0x61E8, 0xECE7, 0x61DE, 0xECE8, 0x64EF,
+ 0xECE9, 0x64E9, 0xECEA, 0x64E3, 0xECEB, 0x64EB, 0xECEC, 0x64E4,
+ 0xECED, 0x64E8, 0xECEE, 0x6581, 0xECEF, 0x6580, 0xECF0, 0x65B6,
+ 0xECF1, 0x65DA, 0xECF2, 0x66D2, 0xECF3, 0x6A8D, 0xECF4, 0x6A96,
+ 0xECF5, 0x6A81, 0xECF6, 0x6AA5, 0xECF7, 0x6A89, 0xECF8, 0x6A9F,
+ 0xECF9, 0x6A9B, 0xECFA, 0x6AA1, 0xECFB, 0x6A9E, 0xECFC, 0x6A87,
+ 0xECFD, 0x6A93, 0xECFE, 0x6A8E, 0xED40, 0x6A95, 0xED41, 0x6A83,
+ 0xED42, 0x6AA8, 0xED43, 0x6AA4, 0xED44, 0x6A91, 0xED45, 0x6A7F,
+ 0xED46, 0x6AA6, 0xED47, 0x6A9A, 0xED48, 0x6A85, 0xED49, 0x6A8C,
+ 0xED4A, 0x6A92, 0xED4B, 0x6B5B, 0xED4C, 0x6BAD, 0xED4D, 0x6C09,
+ 0xED4E, 0x6FCC, 0xED4F, 0x6FA9, 0xED50, 0x6FF4, 0xED51, 0x6FD4,
+ 0xED52, 0x6FE3, 0xED53, 0x6FDC, 0xED54, 0x6FED, 0xED55, 0x6FE7,
+ 0xED56, 0x6FE6, 0xED57, 0x6FDE, 0xED58, 0x6FF2, 0xED59, 0x6FDD,
+ 0xED5A, 0x6FE2, 0xED5B, 0x6FE8, 0xED5C, 0x71E1, 0xED5D, 0x71F1,
+ 0xED5E, 0x71E8, 0xED5F, 0x71F2, 0xED60, 0x71E4, 0xED61, 0x71F0,
+ 0xED62, 0x71E2, 0xED63, 0x7373, 0xED64, 0x736E, 0xED65, 0x736F,
+ 0xED66, 0x7497, 0xED67, 0x74B2, 0xED68, 0x74AB, 0xED69, 0x7490,
+ 0xED6A, 0x74AA, 0xED6B, 0x74AD, 0xED6C, 0x74B1, 0xED6D, 0x74A5,
+ 0xED6E, 0x74AF, 0xED6F, 0x7510, 0xED70, 0x7511, 0xED71, 0x7512,
+ 0xED72, 0x750F, 0xED73, 0x7584, 0xED74, 0x7643, 0xED75, 0x7648,
+ 0xED76, 0x7649, 0xED77, 0x7647, 0xED78, 0x76A4, 0xED79, 0x76E9,
+ 0xED7A, 0x77B5, 0xED7B, 0x77AB, 0xED7C, 0x77B2, 0xED7D, 0x77B7,
+ 0xED7E, 0x77B6, 0xEDA1, 0x77B4, 0xEDA2, 0x77B1, 0xEDA3, 0x77A8,
+ 0xEDA4, 0x77F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E4, 0x7F7D, 0xEDE5, 0x7FF4, 0xEDE6, 0x7FF2, 0xEDE7, 0x802C,
+ 0xEDE8, 0x81BB, 0xEDE9, 0x81C4, 0xEDEA, 0x81CC, 0xEDEB, 0x81CA,
+ 0xEDEC, 0x81C5, 0xEDED, 0x81C7, 0xEDEE, 0x81BC, 0xEDEF, 0x81E9,
+ 0xEDF0, 0x825B, 0xEDF1, 0x825A, 0xEDF2, 0x825C, 0xEDF3, 0x8583,
+ 0xEDF4, 0x8580, 0xEDF5, 0x858F, 0xEDF6, 0x85A7, 0xEDF7, 0x8595,
+ 0xEDF8, 0x85A0, 0xEDF9, 0x858B, 0xEDFA, 0x85A3, 0xEDFB, 0x857B,
+ 0xEDFC, 0x85A4, 0xEDFD, 0x859A, 0xEDFE, 0x859E, 0xEE40, 0x8577,
+ 0xEE41, 0x857C, 0xEE42, 0x8589, 0xEE43, 0x85A1, 0xEE44, 0x857A,
+ 0xEE45, 0x8578, 0xEE46, 0x8557, 0xEE47, 0x858E, 0xEE48, 0x8596,
+ 0xEE49, 0x8586, 0xEE4A, 0x858D, 0xEE4B, 0x8599, 0xEE4C, 0x859D,
+ 0xEE4D, 0x8581, 0xEE4E, 0x85A2, 0xEE4F, 0x8582, 0xEE50, 0x8588,
+ 0xEE51, 0x8585, 0xEE52, 0x8579, 0xEE53, 0x8576, 0xEE54, 0x8598,
+ 0xEE55, 0x8590, 0xEE56, 0x859F, 0xEE57, 0x8668, 0xEE58, 0x87BE,
+ 0xEE59, 0x87AA, 0xEE5A, 0x87AD, 0xEE5B, 0x87C5, 0xEE5C, 0x87B0,
+ 0xEE5D, 0x87AC, 0xEE5E, 0x87B9, 0xEE5F, 0x87B5, 0xEE60, 0x87BC,
+ 0xEE61, 0x87AE, 0xEE62, 0x87C9, 0xEE63, 0x87C3, 0xEE64, 0x87C2,
+ 0xEE65, 0x87CC, 0xEE66, 0x87B7, 0xEE67, 0x87AF, 0xEE68, 0x87C4,
+ 0xEE69, 0x87CA, 0xEE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0x9383,
+ 0xEECF, 0x93AF, 0xEED0, 0x9364, 0xEED1, 0x9356, 0xEED2, 0x9347,
+ 0xEED3, 0x937C, 0xEED4, 0x9358, 0xEED5, 0x935C, 0xEED6, 0x9376,
+ 0xEED7, 0x9349, 0xEED8, 0x9350, 0xEED9, 0x9351, 0xEEDA, 0x9360,
+ 0xEEDB, 0x936D, 0xEEDC, 0x938F, 0xEEDD, 0x934C, 0xEEDE, 0x936A,
+ 0xEEDF, 0x9379, 0xEEE0, 0x9357, 0xEEE1, 0x9355, 0xEEE2, 0x9352,
+ 0xEEE3, 0x934F, 0xEEE4, 0x9371, 0xEEE5, 0x9377, 0xEEE6, 0x937B,
+ 0xEEE7, 0x9361, 0xEEE8, 0x935E, 0xEEE9, 0x9363, 0xEEEA, 0x9367,
+ 0xEEEB, 0x9380, 0xEEEC, 0x934E, 0xEEED, 0x9359, 0xEEEE, 0x95C7,
+ 0xEEEF, 0x95C0, 0xEEF0, 0x95C9, 0xEEF1, 0x95C3, 0xEEF2, 0x95C5,
+ 0xEEF3, 0x95B7, 0xEEF4, 0x96AE, 0xEEF5, 0x96B0, 0xEEF6, 0x96AC,
+ 0xEEF7, 0x9720, 0xEEF8, 0x971F, 0xEEF9, 0x9718, 0xEEFA, 0x971D,
+ 0xEEFB, 0x9719, 0xEEFC, 0x979A, 0xEEFD, 0x97A1, 0xEEFE, 0x979C,
+ 0xEF40, 0x979E, 0xEF41, 0x979D, 0xEF42, 0x97D5, 0xEF43, 0x97D4,
+ 0xEF44, 0x97F1, 0xEF45, 0x9841, 0xEF46, 0x9844, 0xEF47, 0x984A,
+ 0xEF48, 0x9849, 0xEF49, 0x9845, 0xEF4A, 0x9843, 0xEF4B, 0x9925,
+ 0xEF4C, 0x992B, 0xEF4D, 0x992C, 0xEF4E, 0x992A, 0xEF4F, 0x9933,
+ 0xEF50, 0x9932, 0xEF51, 0x992F, 0xEF52, 0x992D, 0xEF53, 0x9931,
+ 0xEF54, 0x9930, 0xEF55, 0x9998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,
+ 0xEFFA, 0x71FF, 0xEFFB, 0x71F9, 0xEFFC, 0x7203, 0xEFFD, 0x71FD,
+ 0xEFFE, 0x7376, 0xF040, 0x74B8, 0xF041, 0x74C0, 0xF042, 0x74B5,
+ 0xF043, 0x74C1, 0xF044, 0x74BE, 0xF045, 0x74B6, 0xF046, 0x74BB,
+ 0xF047, 0x74C2, 0xF048, 0x7514, 0xF049, 0x7513, 0xF04A, 0x765C,
+ 0xF04B, 0x7664, 0xF04C, 0x7659, 0xF04D, 0x7650, 0xF04E, 0x7653,
+ 0xF04F, 0x7657, 0xF050, 0x765A, 0xF051, 0x76A6, 0xF052, 0x76BD,
+ 0xF053, 0x76EC, 0xF054, 0x77C2, 0xF055, 0x77BA, 0xF056, 0x78FF,
+ 0xF057, 0x790C, 0xF058, 0x7913, 0xF059, 0x7914, 0xF05A, 0x7909,
+ 0xF05B, 0x7910, 0xF05C, 0x7912, 0xF05D, 0x7911, 0xF05E, 0x79AD,
+ 0xF05F, 0x79AC, 0xF060, 0x7A5F, 0xF061, 0x7C1C, 0xF062, 0x7C29,
+ 0xF063, 0x7C19, 0xF064, 0x7C20, 0xF065, 0x7C1F, 0xF066, 0x7C2D,
+ 0xF067, 0x7C1D, 0xF068, 0x7C26, 0xF069, 0x7C28, 0xF06A, 0x7C22,
+ 0xF06B, 0x7C25, 0xF06C, 0x7C30, 0xF06D, 0x7E5C, 0xF06E, 0x7E50,
+ 0xF06F, 0x7E56, 0xF070, 0x7E63, 0xF071, 0x7E58, 0xF072, 0x7E62,
+ 0xF073, 0x7E5F, 0xF074, 0x7E51, 0xF075, 0x7E60, 0xF076, 0x7E57,
+ 0xF077, 0x7E53, 0xF078, 0x7FB5, 0xF079, 0x7FB3, 0xF07A, 0x7FF7,
+ 0xF07B, 0x7FF8, 0xF07C, 0x8075, 0xF07D, 0x81D1, 0xF07E, 0x81D2,
+ 0xF0A1, 0x81D0, 0xF0A2, 0x825F, 0xF0A3, 0x825E, 0xF0A4, 0x85B4,
+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, 0x8B37, 0xF0E7, 0x8B26, 0xF0E8, 0x8B36,
+ 0xF0E9, 0x8B2E, 0xF0EA, 0x8B24, 0xF0EB, 0x8B3B, 0xF0EC, 0x8B3D,
+ 0xF0ED, 0x8B3A, 0xF0EE, 0x8C42, 0xF0EF, 0x8C75, 0xF0F0, 0x8C99,
+ 0xF0F1, 0x8C98, 0xF0F2, 0x8C97, 0xF0F3, 0x8CFE, 0xF0F4, 0x8D04,
+ 0xF0F5, 0x8D02, 0xF0F6, 0x8D00, 0xF0F7, 0x8E5C, 0xF0F8, 0x8E62,
+ 0xF0F9, 0x8E60, 0xF0FA, 0x8E57, 0xF0FB, 0x8E56, 0xF0FC, 0x8E5E,
+ 0xF0FD, 0x8E65, 0xF0FE, 0x8E67, 0xF140, 0x8E5B, 0xF141, 0x8E5A,
+ 0xF142, 0x8E61, 0xF143, 0x8E5D, 0xF144, 0x8E69, 0xF145, 0x8E54,
+ 0xF146, 0x8F46, 0xF147, 0x8F47, 0xF148, 0x8F48, 0xF149, 0x8F4B,
+ 0xF14A, 0x9128, 0xF14B, 0x913A, 0xF14C, 0x913B, 0xF14D, 0x913E,
+ 0xF14E, 0x91A8, 0xF14F, 0x91A5, 0xF150, 0x91A7, 0xF151, 0x91AF,
+ 0xF152, 0x91AA, 0xF153, 0x93B5, 0xF154, 0x938C, 0xF155, 0x9392,
+ 0xF156, 0x93B7, 0xF157, 0x939B, 0xF158, 0x939D, 0xF159, 0x9389,
+ 0xF15A, 0x93A7, 0xF15B, 0x938E, 0xF15C, 0x93AA, 0xF15D, 0x939E,
+ 0xF15E, 0x93A6, 0xF15F, 0x9395, 0xF160, 0x9388, 0xF161, 0x9399,
+ 0xF162, 0x939F, 0xF163, 0x938D, 0xF164, 0x93B1, 0xF165, 0x9391,
+ 0xF166, 0x93B2, 0xF167, 0x93A4, 0xF168, 0x93A8, 0xF169, 0x93B4,
+ 0xF16A, 0x93A3, 0xF16B, 0x93A5, 0xF16C, 0x95D2, 0xF16D, 0x95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,
+ 0xF255, 0x6AEB, 0xF256, 0x6ACF, 0xF257, 0x6ACD, 0xF258, 0x6ADE,
+ 0xF259, 0x6B60, 0xF25A, 0x6BB0, 0xF25B, 0x6C0C, 0xF25C, 0x7019,
+ 0xF25D, 0x7027, 0xF25E, 0x7020, 0xF25F, 0x7016, 0xF260, 0x702B,
+ 0xF261, 0x7021, 0xF262, 0x7022, 0xF263, 0x7023, 0xF264, 0x7029,
+ 0xF265, 0x7017, 0xF266, 0x7024, 0xF267, 0x701C, 0xF268, 0x702A,
+ 0xF269, 0x720C, 0xF26A, 0x720A, 0xF26B, 0x7207, 0xF26C, 0x7202,
+ 0xF26D, 0x7205, 0xF26E, 0x72A5, 0xF26F, 0x72A6, 0xF270, 0x72A4,
+ 0xF271, 0x72A3, 0xF272, 0x72A1, 0xF273, 0x74CB, 0xF274, 0x74C5,
+ 0xF275, 0x74B7, 0xF276, 0x74C3, 0xF277, 0x7516, 0xF278, 0x7660,
+ 0xF279, 0x77C9, 0xF27A, 0x77CA, 0xF27B, 0x77C4, 0xF27C, 0x77F1,
+ 0xF27D, 0x791D, 0xF27E, 0x791B, 0xF2A1, 0x7921, 0xF2A2, 0x791C,
+ 0xF2A3, 0x7917, 0xF2A4, 0x791E, 0xF2A5, 0x79B0, 0xF2A6, 0x7A67,
+ 0xF2A7, 0x7A68, 0xF2A8, 0x7C33, 0xF2A9, 0x7C3C, 0xF2AA, 0x7C39,
+ 0xF2AB, 0x7C2C, 0xF2AC, 0x7C3B, 0xF2AD, 0x7CEC, 0xF2AE, 0x7CEA,
+ 0xF2AF, 0x7E76, 0xF2B0, 0x7E75, 0xF2B1, 0x7E78, 0xF2B2, 0x7E70,
+ 0xF2B3, 0x7E77, 0xF2B4, 0x7E6F, 0xF2B5, 0x7E7A, 0xF2B6, 0x7E72,
+ 0xF2B7, 0x7E74, 0xF2B8, 0x7E68, 0xF2B9, 0x7F4B, 0xF2BA, 0x7F4A,
+ 0xF2BB, 0x7F83, 0xF2BC, 0x7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+ 0xF340, 0x8B51, 0xF341, 0x8B42, 0xF342, 0x8B52, 0xF343, 0x8B57,
+ 0xF344, 0x8C43, 0xF345, 0x8C77, 0xF346, 0x8C76, 0xF347, 0x8C9A,
+ 0xF348, 0x8D06, 0xF349, 0x8D07, 0xF34A, 0x8D09, 0xF34B, 0x8DAC,
+ 0xF34C, 0x8DAA, 0xF34D, 0x8DAD, 0xF34E, 0x8DAB, 0xF34F, 0x8E6D,
+ 0xF350, 0x8E78, 0xF351, 0x8E73, 0xF352, 0x8E6A, 0xF353, 0x8E6F,
+ 0xF354, 0x8E7B, 0xF355, 0x8EC2, 0xF356, 0x8F52, 0xF357, 0x8F51,
+ 0xF358, 0x8F4F, 0xF359, 0x8F50, 0xF35A, 0x8F53, 0xF35B, 0x8FB4,
+ 0xF35C, 0x9140, 0xF35D, 0x913F, 0xF35E, 0x91B0, 0xF35F, 0x91AD,
+ 0xF360, 0x93DE, 0xF361, 0x93C7, 0xF362, 0x93CF, 0xF363, 0x93C2,
+ 0xF364, 0x93DA, 0xF365, 0x93D0, 0xF366, 0x93F9, 0xF367, 0x93EC,
+ 0xF368, 0x93CC, 0xF369, 0x93D9, 0xF36A, 0x93A9, 0xF36B, 0x93E6,
+ 0xF36C, 0x93CA, 0xF36D, 0x93D4, 0xF36E, 0x93EE, 0xF36F, 0x93E3,
+ 0xF370, 0x93D5, 0xF371, 0x93C4, 0xF372, 0x93CE, 0xF373, 0x93C0,
+ 0xF374, 0x93D2, 0xF375, 0x93E7, 0xF376, 0x957D, 0xF377, 0x95DA,
+ 0xF378, 0x95DB, 0xF379, 0x96E1, 0xF37A, 0x9729, 0xF37B, 0x972B,
+ 0xF37C, 0x972C, 0xF37D, 0x9728, 0xF37E, 0x9726, 0xF3A1, 0x97B3,
+ 0xF3A2, 0x97B7, 0xF3A3, 0x97B6, 0xF3A4, 0x97DD, 0xF3A5, 0x97DE,
+ 0xF3A6, 0x97DF, 0xF3A7, 0x985C, 0xF3A8, 0x9859, 0xF3A9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9D69, 0xF3E9, 0x9D85,
+ 0xF3EA, 0x9D73, 0xF3EB, 0x9D7B, 0xF3EC, 0x9D82, 0xF3ED, 0x9D6F,
+ 0xF3EE, 0x9D79, 0xF3EF, 0x9D7F, 0xF3F0, 0x9D87, 0xF3F1, 0x9D68,
+ 0xF3F2, 0x9E94, 0xF3F3, 0x9E91, 0xF3F4, 0x9EC0, 0xF3F5, 0x9EFC,
+ 0xF3F6, 0x9F2D, 0xF3F7, 0x9F40, 0xF3F8, 0x9F41, 0xF3F9, 0x9F4D,
+ 0xF3FA, 0x9F56, 0xF3FB, 0x9F57, 0xF3FC, 0x9F58, 0xF3FD, 0x5337,
+ 0xF3FE, 0x56B2, 0xF440, 0x56B5, 0xF441, 0x56B3, 0xF442, 0x58E3,
+ 0xF443, 0x5B45, 0xF444, 0x5DC6, 0xF445, 0x5DC7, 0xF446, 0x5EEE,
+ 0xF447, 0x5EEF, 0xF448, 0x5FC0, 0xF449, 0x5FC1, 0xF44A, 0x61F9,
+ 0xF44B, 0x6517, 0xF44C, 0x6516, 0xF44D, 0x6515, 0xF44E, 0x6513,
+ 0xF44F, 0x65DF, 0xF450, 0x66E8, 0xF451, 0x66E3, 0xF452, 0x66E4,
+ 0xF453, 0x6AF3, 0xF454, 0x6AF0, 0xF455, 0x6AEA, 0xF456, 0x6AE8,
+ 0xF457, 0x6AF9, 0xF458, 0x6AF1, 0xF459, 0x6AEE, 0xF45A, 0x6AEF,
+ 0xF45B, 0x703C, 0xF45C, 0x7035, 0xF45D, 0x702F, 0xF45E, 0x7037,
+ 0xF45F, 0x7034, 0xF460, 0x7031, 0xF461, 0x7042, 0xF462, 0x7038,
+ 0xF463, 0x703F, 0xF464, 0x703A, 0xF465, 0x7039, 0xF466, 0x7040,
+ 0xF467, 0x703B, 0xF468, 0x7033, 0xF469, 0x7041, 0xF46A, 0x7213,
+ 0xF46B, 0x7214, 0xF46C, 0x72A8, 0xF46D, 0x737D, 0xF46E, 0x737C,
+ 0xF46F, 0x74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4D5, 0x8B6D, 0xF4D6, 0x8DAE, 0xF4D7, 0x8E86, 0xF4D8, 0x8E88,
+ 0xF4D9, 0x8E84, 0xF4DA, 0x8F59, 0xF4DB, 0x8F56, 0xF4DC, 0x8F57,
+ 0xF4DD, 0x8F55, 0xF4DE, 0x8F58, 0xF4DF, 0x8F5A, 0xF4E0, 0x908D,
+ 0xF4E1, 0x9143, 0xF4E2, 0x9141, 0xF4E3, 0x91B7, 0xF4E4, 0x91B5,
+ 0xF4E5, 0x91B2, 0xF4E6, 0x91B3, 0xF4E7, 0x940B, 0xF4E8, 0x9413,
+ 0xF4E9, 0x93FB, 0xF4EA, 0x9420, 0xF4EB, 0x940F, 0xF4EC, 0x9414,
+ 0xF4ED, 0x93FE, 0xF4EE, 0x9415, 0xF4EF, 0x9410, 0xF4F0, 0x9428,
+ 0xF4F1, 0x9419, 0xF4F2, 0x940D, 0xF4F3, 0x93F5, 0xF4F4, 0x9400,
+ 0xF4F5, 0x93F7, 0xF4F6, 0x9407, 0xF4F7, 0x940E, 0xF4F8, 0x9416,
+ 0xF4F9, 0x9412, 0xF4FA, 0x93FA, 0xF4FB, 0x9409, 0xF4FC, 0x93F8,
+ 0xF4FD, 0x940A, 0xF4FE, 0x93FF, 0xF540, 0x93FC, 0xF541, 0x940C,
+ 0xF542, 0x93F6, 0xF543, 0x9411, 0xF544, 0x9406, 0xF545, 0x95DE,
+ 0xF546, 0x95E0, 0xF547, 0x95DF, 0xF548, 0x972E, 0xF549, 0x972F,
+ 0xF54A, 0x97B9, 0xF54B, 0x97BB, 0xF54C, 0x97FD, 0xF54D, 0x97FE,
+ 0xF54E, 0x9860, 0xF54F, 0x9862, 0xF550, 0x9863, 0xF551, 0x985F,
+ 0xF552, 0x98C1, 0xF553, 0x98C2, 0xF554, 0x9950, 0xF555, 0x994E,
+ 0xF556, 0x9959, 0xF557, 0x994C, 0xF558, 0x994B, 0xF559, 0x9953,
+ 0xF55A, 0x9A32, 0xF55B, 0x9A34, 0xF55C,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 0xF645, 0x881C, 0xF646, 0x882B, 0xF647, 0x884A, 0xF648, 0x896D,
+ 0xF649, 0x8969, 0xF64A, 0x896E, 0xF64B, 0x896B, 0xF64C, 0x89FA,
+ 0xF64D, 0x8B79, 0xF64E, 0x8B78, 0xF64F, 0x8B45, 0xF650, 0x8B7A,
+ 0xF651, 0x8B7B, 0xF652, 0x8D10, 0xF653, 0x8D14, 0xF654, 0x8DAF,
+ 0xF655, 0x8E8E, 0xF656, 0x8E8C, 0xF657, 0x8F5E, 0xF658, 0x8F5B,
+ 0xF659, 0x8F5D, 0xF65A, 0x9146, 0xF65B, 0x9144, 0xF65C, 0x9145,
+ 0xF65D, 0x91B9, 0xF65E, 0x943F, 0xF65F, 0x943B, 0xF660, 0x9436,
+ 0xF661, 0x9429, 0xF662, 0x943D, 0xF663, 0x943C, 0xF664, 0x9430,
+ 0xF665, 0x9439, 0xF666, 0x942A, 0xF667, 0x9437, 0xF668, 0x942C,
+ 0xF669, 0x9440, 0xF66A, 0x9431, 0xF66B, 0x95E5, 0xF66C, 0x95E4,
+ 0xF66D, 0x95E3, 0xF66E, 0x9735, 0xF66F, 0x973A, 0xF670, 0x97BF,
+ 0xF671, 0x97E1, 0xF672, 0x9864, 0xF673, 0x98C9, 0xF674, 0x98C6,
+ 0xF675, 0x98C0, 0xF676, 0x9958, 0xF677, 0x9956, 0xF678, 0x9A39,
+ 0xF679, 0x9A3D, 0xF67A, 0x9A46, 0xF67B, 0x9A44, 0xF67C, 0x9A42,
+ 0xF67D, 0x9A41, 0xF67E, 0x9A3A, 0xF6A1, 0x9A3F, 0xF6A2, 0x9ACD,
+ 0xF6A3, 0x9B15, 0xF6A4, 0x9B17, 0xF6A5, 0x9B18, 0xF6A6, 0x9B16,
+ 0xF6A7, 0x9B3A, 0xF6A8, 0x9B52, 0xF6A9, 0x9C2B, 0xF6AA, 0x9C1D,
+ 0xF6AB, 0x9C1C, 0xF6AC, 0x9C2C, 0xF6AD, 0x9C23, 0xF6AE, 0x9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0xF6EE, 0x72A9,
+ 0xF6EF, 0x737F, 0xF6F0, 0x74D8, 0xF6F1, 0x74D5, 0xF6F2, 0x74D9,
+ 0xF6F3, 0x74D7, 0xF6F4, 0x766D, 0xF6F5, 0x76AD, 0xF6F6, 0x7935,
+ 0xF6F7, 0x79B4, 0xF6F8, 0x7A70, 0xF6F9, 0x7A71, 0xF6FA, 0x7C57,
+ 0xF6FB, 0x7C5C, 0xF6FC, 0x7C59, 0xF6FD, 0x7C5B, 0xF6FE, 0x7C5A,
+ 0xF740, 0x7CF4, 0xF741, 0x7CF1, 0xF742, 0x7E91, 0xF743, 0x7F4F,
+ 0xF744, 0x7F87, 0xF745, 0x81DE, 0xF746, 0x826B, 0xF747, 0x8634,
+ 0xF748, 0x8635, 0xF749, 0x8633, 0xF74A, 0x862C, 0xF74B, 0x8632,
+ 0xF74C, 0x8636, 0xF74D, 0x882C, 0xF74E, 0x8828, 0xF74F, 0x8826,
+ 0xF750, 0x882A, 0xF751, 0x8825, 0xF752, 0x8971, 0xF753, 0x89BF,
+ 0xF754, 0x89BE, 0xF755, 0x89FB, 0xF756, 0x8B7E, 0xF757, 0x8B84,
+ 0xF758, 0x8B82, 0xF759, 0x8B86, 0xF75A, 0x8B85, 0xF75B, 0x8B7F,
+ 0xF75C, 0x8D15, 0xF75D, 0x8E95, 0xF75E, 0x8E94, 0xF75F, 0x8E9A,
+ 0xF760, 0x8E92, 0xF761, 0x8E90, 0xF762, 0x8E96, 0xF763, 0x8E97,
+ 0xF764, 0x8F60, 0xF765, 0x8F62, 0xF766, 0x9147, 0xF767, 0x944C,
+ 0xF768, 0x9450, 0xF769, 0x944A, 0xF76A, 0x944B, 0xF76B, 0x944F,
+ 0xF76C, 0x9447, 0xF76D, 0x9445, 0xF76E, 0x9448, 0xF76F, 0x9449,
+ 0xF770, 0x9446, 0xF771, 0x973F, 0xF772, 0x97E3, 0xF773, 0x986A,
+ 0xF774, 0x9869, 0xF775, 0x98CB, 0xF776, 0x9954, 0xF777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7D9, 0x6201,
+ 0xF7DA, 0x6203, 0xF7DB, 0x6204, 0xF7DC, 0x6529, 0xF7DD, 0x6525,
+ 0xF7DE, 0x6596, 0xF7DF, 0x66EB, 0xF7E0, 0x6B11, 0xF7E1, 0x6B12,
+ 0xF7E2, 0x6B0F, 0xF7E3, 0x6BCA, 0xF7E4, 0x705B, 0xF7E5, 0x705A,
+ 0xF7E6, 0x7222, 0xF7E7, 0x7382, 0xF7E8, 0x7381, 0xF7E9, 0x7383,
+ 0xF7EA, 0x7670, 0xF7EB, 0x77D4, 0xF7EC, 0x7C67, 0xF7ED, 0x7C66,
+ 0xF7EE, 0x7E95, 0xF7EF, 0x826C, 0xF7F0, 0x863A, 0xF7F1, 0x8640,
+ 0xF7F2, 0x8639, 0xF7F3, 0x863C, 0xF7F4, 0x8631, 0xF7F5, 0x863B,
+ 0xF7F6, 0x863E, 0xF7F7, 0x8830, 0xF7F8, 0x8832, 0xF7F9, 0x882E,
+ 0xF7FA, 0x8833, 0xF7FB, 0x8976, 0xF7FC, 0x8974, 0xF7FD, 0x8973,
+ 0xF7FE, 0x89FE, 0xF840, 0x8B8C, 0xF841, 0x8B8E, 0xF842, 0x8B8B,
+ 0xF843, 0x8B88, 0xF844, 0x8C45, 0xF845, 0x8D19, 0xF846, 0x8E98,
+ 0xF847, 0x8F64, 0xF848, 0x8F63, 0xF849, 0x91BC, 0xF84A, 0x9462,
+ 0xF84B, 0x9455, 0xF84C, 0x945D, 0xF84D, 0x9457, 0xF84E, 0x945E,
+ 0xF84F, 0x97C4, 0xF850, 0x97C5, 0xF851, 0x9800, 0xF852, 0x9A56,
+ 0xF853, 0x9A59, 0xF854, 0x9B1E, 0xF855, 0x9B1F, 0xF856, 0x9B20,
+ 0xF857, 0x9C52, 0xF858, 0x9C58, 0xF859, 0x9C50, 0xF85A, 0x9C4A,
+ 0xF85B, 0x9C4D, 0xF85C, 0x9C4B, 0xF85D, 0x9C55, 0xF85E, 0x9C59,
+ 0xF85F, 0x9C4C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, 0xF948, 0x8979, 0xF949, 0x897A,
+ 0xF94A, 0x897C, 0xF94B, 0x897B, 0xF94C, 0x89FF, 0xF94D, 0x8B98,
+ 0xF94E, 0x8B99, 0xF94F, 0x8EA5, 0xF950, 0x8EA4, 0xF951, 0x8EA3,
+ 0xF952, 0x946E, 0xF953, 0x946D, 0xF954, 0x946F, 0xF955, 0x9471,
+ 0xF956, 0x9473, 0xF957, 0x9749, 0xF958, 0x9872, 0xF959, 0x995F,
+ 0xF95A, 0x9C68, 0xF95B, 0x9C6E, 0xF95C, 0x9C6D, 0xF95D, 0x9E0B,
+ 0xF95E, 0x9E0D, 0xF95F, 0x9E10, 0xF960, 0x9E0F, 0xF961, 0x9E12,
+ 0xF962, 0x9E11, 0xF963, 0x9EA1, 0xF964, 0x9EF5, 0xF965, 0x9F09,
+ 0xF966, 0x9F47, 0xF967, 0x9F78, 0xF968, 0x9F7B, 0xF969, 0x9F7A,
+ 0xF96A, 0x9F79, 0xF96B, 0x571E, 0xF96C, 0x7066, 0xF96D, 0x7C6F,
+ 0xF96E, 0x883C, 0xF96F, 0x8DB2, 0xF970, 0x8EA6, 0xF971, 0x91C3,
+ 0xF972, 0x9474, 0xF973, 0x9478, 0xF974, 0x9476, 0xF975, 0x9475,
+ 0xF976, 0x9A60, 0xF977, 0x9C74, 0xF978, 0x9C73, 0xF979, 0x9C71,
+ 0xF97A, 0x9C75, 0xF97B, 0x9E14, 0xF97C, 0x9E13, 0xF97D, 0x9EF6,
+ 0xF97E, 0x9F0A, 0xF9A1, 0x9FA4, 0xF9A2, 0x7068, 0xF9A3, 0x7065,
+ 0xF9A4, 0x7CF7, 0xF9A5, 0x866A, 0xF9A6, 0x883E, 0xF9A7, 0x883D,
+ 0xF9A8, 0x883F, 0xF9A9, 0x8B9E, 0xF9AA, 0x8C9C, 0xF9AB, 0x8EA9,
+ 0xF9AC, 0x8EC9, 0xF9AD, 0x974B, 0xF9AE, 0x9873, 0xF9AF, 0x9874,
+ 0xF9B0, 0x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, 0x256B,
+ 0xF9F4, 0x2562, 0xF9F5, 0x2559, 0xF9F6, 0x2568, 0xF9F7, 0x255C,
+ 0xF9F8, 0x2551, 0xF9F9, 0x2550, 0xF9FA, 0x256D, 0xF9FB, 0x256E,
+ 0xF9FC, 0x2570, 0xF9FD, 0x256F, 0xF9FE, 0x2593, 0, 0
+};
+
+
+
+WCHAR ff_convert ( /* Converted code, 0 means conversion error */
+ WCHAR src, /* Character code to be converted */
+ UINT dir /* 0: Unicode to OEMCP, 1: OEMCP to Unicode */
+)
+{
+ const WCHAR *p;
+ WCHAR c;
+ int i, n, li, hi;
+
+
+ if (src < 0x80) { /* ASCII */
+ c = src;
+ } else {
+ if (dir) { /* OEMCP to unicode */
+ p = oem2uni;
+ hi = sizeof(oem2uni) / 4 - 1;
+ } else { /* Unicode to OEMCP */
+ p = uni2oem;
+ hi = sizeof(uni2oem) / 4 - 1;
+ }
+ li = 0;
+ for (n = 16; n; n--) {
+ i = li + (hi - li) / 2;
+ if (src == p[i * 2]) break;
+ if (src > p[i * 2])
+ li = i;
+ else
+ hi = i;
+ }
+ c = n ? p[i * 2 + 1] : 0;
+ }
+
+ return c;
+}
+
+
+
+
+WCHAR ff_wtoupper ( /* Upper converted character */
+ WCHAR chr /* Input character */
+)
+{
+ static const WCHAR tbl_lower[] = { 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0xA1, 0x00A2, 0x00A3, 0x00A5, 0x00AC, 0x00AF, 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0x0FF, 0x101, 0x103, 0x105, 0x107, 0x109, 0x10B, 0x10D, 0x10F, 0x111, 0x113, 0x115, 0x117, 0x119, 0x11B, 0x11D, 0x11F, 0x121, 0x123, 0x125, 0x127, 0x129, 0x12B, 0x12D, 0x12F, 0x131, 0x133, 0x135, 0x137, 0x13A, 0x13C, 0x13E, 0x140, 0x142, 0x144, 0x146, 0x148, 0x14B, 0x14D, 0x14F, 0x151, 0x153, 0x155, 0x157, 0x159, 0x15B, 0x15D, 0x15F, 0x161, 0x163, 0x165, 0x167, 0x169, 0x16B, 0x16D, 0x16F, 0x171, 0x173, 0x175, 0x177, 0x17A, 0x17C, 0x17E, 0x192, 0x3B1, 0x3B2, 0x3B3, 0x3B4, 0x3B5, 0x3B6, 0x3B7, 0x3B8, 0x3B9, 0x3BA, 0x3BB, 0x3BC, 0x3BD, 0x3BE, 0x3BF, 0x3C0, 0x3C1, 0x3C3, 0x3C4, 0x3C5, 0x3C6, 0x3C7, 0x3C8, 0x3C9, 0x3CA, 0x430, 0x431, 0x432, 0x433, 0x434, 0x435, 0x436, 0x437, 0x438, 0x439, 0x43A, 0x43B, 0x43C, 0x43D, 0x43E, 0x43F, 0x440, 0x441, 0x442, 0x443, 0x444, 0x445, 0x446, 0x447, 0x448, 0x449, 0x44A, 0x44B, 0x44C, 0x44D, 0x44E, 0x44F, 0x451, 0x452, 0x453, 0x454, 0x455, 0x456, 0x457, 0x458, 0x459, 0x45A, 0x45B, 0x45C, 0x45E, 0x45F, 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177, 0x2178, 0x2179, 0x217A, 0x217B, 0x217C, 0x217D, 0x217E, 0x217F, 0xFF41, 0xFF42, 0xFF43, 0xFF44, 0xFF45, 0xFF46, 0xFF47, 0xFF48, 0xFF49, 0xFF4A, 0xFF4B, 0xFF4C, 0xFF4D, 0xFF4E, 0xFF4F, 0xFF50, 0xFF51, 0xFF52, 0xFF53, 0xFF54, 0xFF55, 0xFF56, 0xFF57, 0xFF58, 0xFF59, 0xFF5A, 0 };
+ static const WCHAR tbl_upper[] = { 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x21, 0xFFE0, 0xFFE1, 0xFFE5, 0xFFE2, 0xFFE3, 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0x178, 0x100, 0x102, 0x104, 0x106, 0x108, 0x10A, 0x10C, 0x10E, 0x110, 0x112, 0x114, 0x116, 0x118, 0x11A, 0x11C, 0x11E, 0x120, 0x122, 0x124, 0x126, 0x128, 0x12A, 0x12C, 0x12E, 0x130, 0x132, 0x134, 0x136, 0x139, 0x13B, 0x13D, 0x13F, 0x141, 0x143, 0x145, 0x147, 0x14A, 0x14C, 0x14E, 0x150, 0x152, 0x154, 0x156, 0x158, 0x15A, 0x15C, 0x15E, 0x160, 0x162, 0x164, 0x166, 0x168, 0x16A, 0x16C, 0x16E, 0x170, 0x172, 0x174, 0x176, 0x179, 0x17B, 0x17D, 0x191, 0x391, 0x392, 0x393, 0x394, 0x395, 0x396, 0x397, 0x398, 0x399, 0x39A, 0x39B, 0x39C, 0x39D, 0x39E, 0x39F, 0x3A0, 0x3A1, 0x3A3, 0x3A4, 0x3A5, 0x3A6, 0x3A7, 0x3A8, 0x3A9, 0x3AA, 0x410, 0x411, 0x412, 0x413, 0x414, 0x415, 0x416, 0x417, 0x418, 0x419, 0x41A, 0x41B, 0x41C, 0x41D, 0x41E, 0x41F, 0x420, 0x421, 0x422, 0x423, 0x424, 0x425, 0x426, 0x427, 0x428, 0x429, 0x42A, 0x42B, 0x42C, 0x42D, 0x42E, 0x42F, 0x401, 0x402, 0x403, 0x404, 0x405, 0x406, 0x407, 0x408, 0x409, 0x40A, 0x40B, 0x40C, 0x40E, 0x40F, 0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166, 0x2167, 0x2168, 0x2169, 0x216A, 0x216B, 0x216C, 0x216D, 0x216E, 0x216F, 0xFF21, 0xFF22, 0xFF23, 0xFF24, 0xFF25, 0xFF26, 0xFF27, 0xFF28, 0xFF29, 0xFF2A, 0xFF2B, 0xFF2C, 0xFF2D, 0xFF2E, 0xFF2F, 0xFF30, 0xFF31, 0xFF32, 0xFF33, 0xFF34, 0xFF35, 0xFF36, 0xFF37, 0xFF38, 0xFF39, 0xFF3A, 0 };
+ int i;
+
+
+ for (i = 0; tbl_lower[i] && chr != tbl_lower[i]; i++) ;
+
+ return tbl_lower[i] ? tbl_upper[i] : chr;
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/option/ccsbcs.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/option/ccsbcs.c
new file mode 100644
index 0000000..222282e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/option/ccsbcs.c
@@ -0,0 +1,540 @@
+/*------------------------------------------------------------------------*/
+/* Unicode - Local code bidirectional converter (C)ChaN, 2009 */
+/* (SBCS code pages) */
+/*------------------------------------------------------------------------*/
+/* 437 U.S. (OEM)
+/ 720 Arabic (OEM)
+/ 1256 Arabic (Windows)
+/ 737 Greek (OEM)
+/ 1253 Greek (Windows)
+/ 1250 Central Europe (Windows)
+/ 775 Baltic (OEM)
+/ 1257 Baltic (Windows)
+/ 850 Multilingual Latin 1 (OEM)
+/ 852 Latin 2 (OEM)
+/ 1252 Latin 1 (Windows)
+/ 855 Cyrillic (OEM)
+/ 1251 Cyrillic (Windows)
+/ 866 Russian (OEM)
+/ 857 Turkish (OEM)
+/ 1254 Turkish (Windows)
+/ 858 Multilingual Latin 1 + Euro (OEM)
+/ 862 Hebrew (OEM)
+/ 1255 Hebrew (Windows)
+/ 874 Thai (OEM, Windows)
+/ 1258 Vietnam (OEM, Windows)
+*/
+
+#include "../ff.h"
+
+
+#if _CODE_PAGE == 437
+#define _TBLDEF 1
+static
+const WCHAR Tbl[] = { /* CP437(0x80-0xFF) to Unicode conversion table */
+ 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7,
+ 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x00EC, 0x00C4, 0x00C5,
+ 0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9,
+ 0x00FF, 0x00D6, 0x00DC, 0x00A2, 0x00A3, 0x00A5, 0x20A7, 0x0192,
+ 0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x00AA, 0x00BA,
+ 0x00BF, 0x2310, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB,
+ 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556,
+ 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510,
+ 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F,
+ 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567,
+ 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B,
+ 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580,
+ 0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3, 0x00B5, 0x03C4,
+ 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2229,
+ 0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248,
+ 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0
+};
+
+#elif _CODE_PAGE == 720
+#define _TBLDEF 1
+static
+const WCHAR Tbl[] = { /* CP720(0x80-0xFF) to Unicode conversion table */
+ 0x0000, 0x0000, 0x00E9, 0x00E2, 0x0000, 0x00E0, 0x0000, 0x00E7,
+ 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0651, 0x0652, 0x00F4, 0x00A4, 0x0640, 0x00FB, 0x00F9,
+ 0x0621, 0x0622, 0x0623, 0x0624, 0x00A3, 0x0625, 0x0626, 0x0627,
+ 0x0628, 0x0629, 0x062A, 0x062B, 0x062C, 0x062D, 0x062E, 0x062F,
+ 0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x00AB, 0x00BB,
+ 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556,
+ 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510,
+ 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F,
+ 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567,
+ 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B,
+ 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580,
+ 0x0636, 0x0637, 0x0638, 0x0639, 0x063A, 0x0641, 0x00B5, 0x0642,
+ 0x0643, 0x0644, 0x0645, 0x0646, 0x0647, 0x0648, 0x0649, 0x064A,
+ 0x2261, 0x064B, 0x064C, 0x064D, 0x064E, 0x064F, 0xO650, 0x2248,
+ 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0
+};
+
+#elif _CODE_PAGE == 737
+#define _TBLDEF 1
+static
+const WCHAR Tbl[] = { /* CP737(0x80-0xFF) to Unicode conversion table */
+ 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398,
+ 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F, 0x03A0,
+ 0x03A1, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7, 0x03A8, 0x03A9,
+ 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7, 0x03B8,
+ 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF, 0x03C0,
+ 0x03C1, 0x03C3, 0x03C2, 0x03C4, 0x03C5, 0x03C6, 0x03C7, 0x03C8,
+ 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556,
+ 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510,
+ 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F,
+ 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567,
+ 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B,
+ 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580,
+ 0x03C9, 0x03AC, 0x03AD, 0x03AE, 0x03CA, 0x03AF, 0x03CC, 0x03CD,
+ 0x03CB, 0x03CE, 0x0386, 0x0388, 0x0389, 0x038A, 0x038C, 0x038E,
+ 0x038F, 0x00B1, 0x2265, 0x2264, 0x03AA, 0x03AB, 0x00F7, 0x2248,
+ 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0
+};
+
+#elif _CODE_PAGE == 775
+#define _TBLDEF 1
+static
+const WCHAR Tbl[] = { /* CP775(0x80-0xFF) to Unicode conversion table */
+ 0x0106, 0x00FC, 0x00E9, 0x0101, 0x00E4, 0x0123, 0x00E5, 0x0107,
+ 0x0142, 0x0113, 0x0156, 0x0157, 0x012B, 0x0179, 0x00C4, 0x00C5,
+ 0x00C9, 0x00E6, 0x00C6, 0x014D, 0x00F6, 0x0122, 0x00A2, 0x015A,
+ 0x015B, 0x00D6, 0x00DC, 0x00F8, 0x00A3, 0x00D8, 0x00D7, 0x00A4,
+ 0x0100, 0x012A, 0x00F3, 0x017B, 0x017C, 0x017A, 0x201D, 0x00A6,
+ 0x00A9, 0x00AE, 0x00AC, 0x00BD, 0x00BC, 0x0141, 0x00AB, 0x00BB,
+ 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x0104, 0x010C, 0x0118,
+ 0x0116, 0x2563, 0x2551, 0x2557, 0x255D, 0x012E, 0x0160, 0x2510,
+ 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x0172, 0x016A,
+ 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x017D,
+ 0x0105, 0x010D, 0x0119, 0x0117, 0x012F, 0x0161, 0x0173, 0x016B,
+ 0x017E, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580,
+ 0x00D3, 0x00DF, 0x014C, 0x0143, 0x00F5, 0x00D5, 0x00B5, 0x0144,
+ 0x0136, 0x0137, 0x013B, 0x013C, 0x0146, 0x0112, 0x0145, 0x2019,
+ 0x00AD, 0x00B1, 0x201C, 0x00BE, 0x00B6, 0x00A7, 0x00F7, 0x201E,
+ 0x00B0, 0x2219, 0x00B7, 0x00B9, 0x00B3, 0x00B2, 0x25A0, 0x00A0
+};
+
+#elif _CODE_PAGE == 850
+#define _TBLDEF 1
+static
+const WCHAR Tbl[] = { /* CP850(0x80-0xFF) to Unicode conversion table */
+ 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7,
+ 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x00EC, 0x00C4, 0x00C5,
+ 0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9,
+ 0x00FF, 0x00D6, 0x00DC, 0x00F8, 0x00A3, 0x00D8, 0x00D7, 0x0192,
+ 0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x00AA, 0x00BA,
+ 0x00BF, 0x00AE, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB,
+ 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x00C1, 0x00C2, 0x00C0,
+ 0x00A9, 0x2563, 0x2551, 0x2557, 0x255D, 0x00A2, 0x00A5, 0x2510,
+ 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x00E3, 0x00C3,
+ 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x00A4,
+ 0x00F0, 0x00D0, 0x00CA, 0x00CB, 0x00C8, 0x0131, 0x00CD, 0x00CE,
+ 0x00CF, 0x2518, 0x250C, 0x2588, 0x2584, 0x00A6, 0x00CC, 0x2580,
+ 0x00D3, 0x00DF, 0x00D4, 0x00D2, 0x00F5, 0x00D5, 0x00B5, 0x00FE,
+ 0x00DE, 0x00DA, 0x00DB, 0x00D9, 0x00FD, 0x00DD, 0x00AF, 0x00B4,
+ 0x00AD, 0x00B1, 0x2017, 0x00BE, 0x00B6, 0x00A7, 0x00F7, 0x00B8,
+ 0x00B0, 0x00A8, 0x00B7, 0x00B9, 0x00B3, 0x00B2, 0x25A0, 0x00A0
+};
+
+#elif _CODE_PAGE == 852
+#define _TBLDEF 1
+static
+const WCHAR Tbl[] = { /* CP852(0x80-0xFF) to Unicode conversion table */
+ 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x016F, 0x0107, 0x00E7,
+ 0x0142, 0x00EB, 0x0150, 0x0151, 0x00EE, 0x0179, 0x00C4, 0x0106,
+ 0x00C9, 0x0139, 0x013A, 0x00F4, 0x00F6, 0x013D, 0x013E, 0x015A,
+ 0x015B, 0x00D6, 0x00DC, 0x0164, 0x0165, 0x0141, 0x00D7, 0x010D,
+ 0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x0104, 0x0105, 0x017D, 0x017E,
+ 0x0118, 0x0119, 0x00AC, 0x017A, 0x010C, 0x015F, 0x00AB, 0x00BB,
+ 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x00C1, 0x00C2, 0x011A,
+ 0x015E, 0x2563, 0x2551, 0x2557, 0x255D, 0x017B, 0x017C, 0x2510,
+ 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x0102, 0x0103,
+ 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x00A4,
+ 0x0111, 0x0110, 0x010E, 0x00CB, 0x010F, 0x0147, 0x00CD, 0x00CE,
+ 0x011B, 0x2518, 0x250C, 0x2588, 0x2584, 0x0162, 0x016E, 0x2580,
+ 0x00D3, 0x00DF, 0x00D4, 0x0143, 0x0144, 0x0148, 0x0160, 0x0161,
+ 0x0154, 0x00DA, 0x0155, 0x0170, 0x00FD, 0x00DD, 0x0163, 0x00B4,
+ 0x00AD, 0x02DD, 0x02DB, 0x02C7, 0x02D8, 0x00A7, 0x00F7, 0x00B8,
+ 0x00B0, 0x00A8, 0x02D9, 0x0171, 0x0158, 0x0159, 0x25A0, 0x00A0
+};
+
+#elif _CODE_PAGE == 855
+#define _TBLDEF 1
+static
+const WCHAR Tbl[] = { /* CP855(0x80-0xFF) to Unicode conversion table */
+ 0x0452, 0x0402, 0x0453, 0x0403, 0x0451, 0x0401, 0x0454, 0x0404,
+ 0x0455, 0x0405, 0x0456, 0x0406, 0x0457, 0x0407, 0x0458, 0x0408,
+ 0x0459, 0x0409, 0x045A, 0x040A, 0x045B, 0x040B, 0x045C, 0x040C,
+ 0x045E, 0x040E, 0x045F, 0x040F, 0x044E, 0x042E, 0x044A, 0x042A,
+ 0x0430, 0x0410, 0x0431, 0x0411, 0x0446, 0x0426, 0x0434, 0x0414,
+ 0x0435, 0x0415, 0x0444, 0x0424, 0x0433, 0x0413, 0x00AB, 0x00BB,
+ 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x0445, 0x0425, 0x0438,
+ 0x0418, 0x2563, 0x2551, 0x2557, 0x255D, 0x0439, 0x0419, 0x2510,
+ 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x043A, 0x041A,
+ 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x00A4,
+ 0x043B, 0x041B, 0x043C, 0x041C, 0x043D, 0x041D, 0x043E, 0x041E,
+ 0x043F, 0x2518, 0x250C, 0x2588, 0x2584, 0x041F, 0x044F, 0x2580,
+ 0x042F, 0x0440, 0x0420, 0x0441, 0x0421, 0x0442, 0x0422, 0x0443,
+ 0x0423, 0x0436, 0x0416, 0x0432, 0x0412, 0x044C, 0x042C, 0x2116,
+ 0x00AD, 0x044B, 0x042B, 0x0437, 0x0417, 0x0448, 0x0428, 0x044D,
+ 0x042D, 0x0449, 0x0429, 0x0447, 0x0427, 0x00A7, 0x25A0, 0x00A0
+};
+
+#elif _CODE_PAGE == 857
+#define _TBLDEF 1
+static
+const WCHAR Tbl[] = { /* CP857(0x80-0xFF) to Unicode conversion table */
+ 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7,
+ 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x0131, 0x00C4, 0x00C5,
+ 0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9,
+ 0x0130, 0x00D6, 0x00DC, 0x00F8, 0x00A3, 0x00D8, 0x015E, 0x015F,
+ 0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x011E, 0x011F,
+ 0x00BF, 0x00AE, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB,
+ 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x00C1, 0x00C2, 0x00C0,
+ 0x00A9, 0x2563, 0x2551, 0x2557, 0x255D, 0x00A2, 0x00A5, 0x2510,
+ 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x00E3, 0x00C3,
+ 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x00A4,
+ 0x00BA, 0x00AA, 0x00CA, 0x00CB, 0x00C8, 0x0000, 0x00CD, 0x00CE,
+ 0x00CF, 0x2518, 0x250C, 0x2588, 0x2584, 0x00A6, 0x00CC, 0x2580,
+ 0x00D3, 0x00DF, 0x00D4, 0x00D2, 0x00F5, 0x00D5, 0x00B5, 0x0000,
+ 0x00D7, 0x00DA, 0x00DB, 0x00D9, 0x00EC, 0x00FF, 0x00AF, 0x00B4,
+ 0x00AD, 0x00B1, 0x0000, 0x00BE, 0x00B6, 0x00A7, 0x00F7, 0x00B8,
+ 0x00B0, 0x00A8, 0x00B7, 0x00B9, 0x00B3, 0x00B2, 0x25A0, 0x00A0
+};
+
+#elif _CODE_PAGE == 858
+#define _TBLDEF 1
+static
+const WCHAR Tbl[] = { /* CP858(0x80-0xFF) to Unicode conversion table */
+ 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7,
+ 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x00EC, 0x00C4, 0x00C5,
+ 0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9,
+ 0x00FF, 0x00D6, 0x00DC, 0x00F8, 0x00A3, 0x00D8, 0x00D7, 0x0192,
+ 0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x00AA, 0x00BA,
+ 0x00BF, 0x00AE, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB,
+ 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x00C1, 0x00C2, 0x00C0,
+ 0x00A9, 0x2563, 0x2551, 0x2557, 0x2550, 0x00A2, 0x00A5, 0x2510,
+ 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x00E3, 0x00C3,
+ 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x00A4,
+ 0x00F0, 0x00D0, 0x00CA, 0x00CB, 0x00C8, 0x20AC, 0x00CD, 0x00CE,
+ 0x00CF, 0x2518, 0x250C, 0x2588, 0x2584, 0x00C6, 0x00CC, 0x2580,
+ 0x00D3, 0x00DF, 0x00D4, 0x00D2, 0x00F5, 0x00D5, 0x00B5, 0x00FE,
+ 0x00DE, 0x00DA, 0x00DB, 0x00D9, 0x00FD, 0x00DD, 0x00AF, 0x00B4,
+ 0x00AD, 0x00B1, 0x2017, 0x00BE, 0x00B6, 0x00A7, 0x00F7, 0x00B8,
+ 0x00B0, 0x00A8, 0x00B7, 0x00B9, 0x00B3, 0x00B2, 0x25A0, 0x00A0
+};
+
+#elif _CODE_PAGE == 862
+#define _TBLDEF 1
+static
+const WCHAR Tbl[] = { /* CP862(0x80-0xFF) to Unicode conversion table */
+ 0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7,
+ 0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF,
+ 0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7,
+ 0x05E8, 0x05E9, 0x05EA, 0x00A2, 0x00A3, 0x00A5, 0x20A7, 0x0192,
+ 0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x00AA, 0x00BA,
+ 0x00BF, 0x2310, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB,
+ 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556,
+ 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510,
+ 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F,
+ 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567,
+ 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B,
+ 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580,
+ 0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3, 0x00B5, 0x03C4,
+ 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2229,
+ 0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248,
+ 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0
+};
+
+#elif _CODE_PAGE == 866
+#define _TBLDEF 1
+static
+const WCHAR Tbl[] = { /* CP866(0x80-0xFF) to Unicode conversion table */
+ 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
+ 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F,
+ 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427,
+ 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F,
+ 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
+ 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F,
+ 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556,
+ 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510,
+ 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F,
+ 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567,
+ 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B,
+ 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580,
+ 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
+ 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F,
+ 0x0401, 0x0451, 0x0404, 0x0454, 0x0407, 0x0457, 0x040E, 0x045E,
+ 0x00B0, 0x2219, 0x00B7, 0x221A, 0x2116, 0x00A4, 0x25A0, 0x00A0
+};
+
+#elif _CODE_PAGE == 874
+#define _TBLDEF 1
+static
+const WCHAR Tbl[] = { /* CP874(0x80-0xFF) to Unicode conversion table */
+ 0x20AC, 0x0000, 0x0000, 0x0000, 0x0000, 0x2026, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x00A0, 0x0E01, 0x0E02, 0x0E03, 0x0E04, 0x0E05, 0x0E06, 0x0E07,
+ 0x0E08, 0x0E09, 0x0E0A, 0x0E0B, 0x0E0C, 0x0E0D, 0x0E0E, 0x0E0F,
+ 0x0E10, 0x0E11, 0x0E12, 0x0E13, 0x0E14, 0x0E15, 0x0E16, 0x0E17,
+ 0x0E18, 0x0E19, 0x0E1A, 0x0E1B, 0x0E1C, 0x0E1D, 0x0E1E, 0x0E1F,
+ 0x0E20, 0x0E21, 0x0E22, 0x0E23, 0x0E24, 0x0E25, 0x0E26, 0x0E27,
+ 0x0E28, 0x0E29, 0x0E2A, 0x0E2B, 0x0E2C, 0x0E2D, 0x0E2E, 0x0E2F,
+ 0x0E30, 0x0E31, 0x0E32, 0x0E33, 0x0E34, 0x0E35, 0x0E36, 0x0E37,
+ 0x0E38, 0x0E39, 0x0E3A, 0x0000, 0x0000, 0x0000, 0x0000, 0x0E3F,
+ 0x0E40, 0x0E41, 0x0E42, 0x0E43, 0x0E44, 0x0E45, 0x0E46, 0x0E47,
+ 0x0E48, 0x0E49, 0x0E4A, 0x0E4B, 0x0E4C, 0x0E4D, 0x0E4E, 0x0E4F,
+ 0x0E50, 0x0E51, 0x0E52, 0x0E53, 0x0E54, 0x0E55, 0x0E56, 0x0E57,
+ 0x0E58, 0x0E59, 0x0E5A, 0x0E5B, 0x0000, 0x0000, 0x0000, 0x0000
+};
+
+#elif _CODE_PAGE == 1250
+#define _TBLDEF 1
+static
+const WCHAR Tbl[] = { /* CP1250(0x80-0xFF) to Unicode conversion table */
+ 0x20AC, 0x0000, 0x201A, 0x0000, 0x201E, 0x2026, 0x2020, 0x2021,
+ 0x0000, 0x2030, 0x0160, 0x2039, 0x015A, 0x0164, 0x017D, 0x0179,
+ 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
+ 0x0000, 0x2122, 0x0161, 0x203A, 0x015B, 0x0165, 0x017E, 0x017A,
+ 0x00A0, 0x02C7, 0x02D8, 0x0141, 0x00A4, 0x0104, 0x00A6, 0x00A7,
+ 0x00A8, 0x00A9, 0x015E, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x017B,
+ 0x00B0, 0x00B1, 0x02DB, 0x0142, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
+ 0x00B8, 0x0105, 0x015F, 0x00BB, 0x013D, 0x02DD, 0x013E, 0x017C,
+ 0x0154, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x0139, 0x0106, 0x00C7,
+ 0x010C, 0x00C9, 0x0118, 0x00CB, 0x011A, 0x00CD, 0x00CE, 0x010E,
+ 0x0110, 0x0143, 0x0147, 0x00D3, 0x00D4, 0x0150, 0x00D6, 0x00D7,
+ 0x0158, 0x016E, 0x00DA, 0x0170, 0x00DC, 0x00DD, 0x0162, 0x00DF,
+ 0x0155, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x013A, 0x0107, 0x00E7,
+ 0x010D, 0x00E9, 0x0119, 0x00EB, 0x011B, 0x00ED, 0x00EE, 0x010F,
+ 0x0111, 0x0144, 0x0148, 0x00F3, 0x00F4, 0x0151, 0x00F6, 0x00F7,
+ 0x0159, 0x016F, 0x00FA, 0x0171, 0x00FC, 0x00FD, 0x0163, 0x02D9
+};
+
+#elif _CODE_PAGE == 1251
+#define _TBLDEF 1
+static
+const WCHAR Tbl[] = { /* CP1251(0x80-0xFF) to Unicode conversion table */
+ 0x0402, 0x0403, 0x201A, 0x0453, 0x201E, 0x2026, 0x2020, 0x2021,
+ 0x20AC, 0x2030, 0x0409, 0x2039, 0x040A, 0x040C, 0x040B, 0x040F,
+ 0x0452, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
+ 0x0000, 0x2111, 0x0459, 0x203A, 0x045A, 0x045C, 0x045B, 0x045F,
+ 0x00A0, 0x040E, 0x045E, 0x0408, 0x00A4, 0x0490, 0x00A6, 0x00A7,
+ 0x0401, 0x00A9, 0x0404, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x0407,
+ 0x00B0, 0x00B1, 0x0406, 0x0456, 0x0491, 0x00B5, 0x00B6, 0x00B7,
+ 0x0451, 0x2116, 0x0454, 0x00BB, 0x0458, 0x0405, 0x0455, 0x0457,
+ 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
+ 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F,
+ 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427,
+ 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F,
+ 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
+ 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F,
+ 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
+ 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F
+};
+
+#elif _CODE_PAGE == 1252
+#define _TBLDEF 1
+static
+const WCHAR Tbl[] = { /* CP1252(0x80-0xFF) to Unicode conversion table */
+ 0x20AC, 0x0000, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
+ 0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0x0000, 0x017D, 0x0000,
+ 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
+ 0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, 0x0000, 0x017E, 0x0178,
+ 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
+ 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
+ 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
+ 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
+ 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7,
+ 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
+ 0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7,
+ 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF,
+ 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
+ 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
+ 0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
+ 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF
+};
+
+#elif _CODE_PAGE == 1253
+#define _TBLDEF 1
+static
+const WCHAR Tbl[] = { /* CP1253(0x80-0xFF) to Unicode conversion table */
+ 0x20AC, 0x0000, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
+ 0x0000, 0x2030, 0x0000, 0x2039, 0x000C, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
+ 0x0000, 0x2122, 0x0000, 0x203A, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x00A0, 0x0385, 0x0386, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
+ 0x00A8, 0x00A9, 0x0000, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x2015,
+ 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x0384, 0x00B5, 0x00B6, 0x00B7,
+ 0x0388, 0x0389, 0x038A, 0x00BB, 0x038C, 0x00BD, 0x038E, 0x038F,
+ 0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397,
+ 0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F,
+ 0x03A0, 0x03A1, 0x0000, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7,
+ 0x03A8, 0x03A9, 0x03AA, 0x03AD, 0x03AC, 0x03AD, 0x03AE, 0x03AF,
+ 0x03B0, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7,
+ 0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF,
+ 0x03C0, 0x03C1, 0x03C2, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7,
+ 0x03C8, 0x03C9, 0x03CA, 0x03CB, 0x03CC, 0x03CD, 0x03CE, 0x0000
+};
+
+#elif _CODE_PAGE == 1254
+#define _TBLDEF 1
+static
+const WCHAR Tbl[] = { /* CP1254(0x80-0xFF) to Unicode conversion table */
+ 0x20AC, 0x0000, 0x210A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
+ 0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
+ 0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, 0x0000, 0x0000, 0x0178,
+ 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
+ 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
+ 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
+ 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
+ 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7,
+ 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
+ 0x011E, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7,
+ 0x00D8, 0x00D9, 0x00DA, 0x00BD, 0x00DC, 0x0130, 0x015E, 0x00DF,
+ 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
+ 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
+ 0x011F, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
+ 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x0131, 0x015F, 0x00FF
+};
+
+#elif _CODE_PAGE == 1255
+#define _TBLDEF 1
+static
+const WCHAR Tbl[] = { /* CP1255(0x80-0xFF) to Unicode conversion table */
+ 0x20AC, 0x0000, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
+ 0x02C6, 0x2030, 0x0000, 0x2039, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
+ 0x02DC, 0x2122, 0x0000, 0x203A, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
+ 0x00A8, 0x00A9, 0x00D7, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
+ 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
+ 0x00B8, 0x00B9, 0x00F7, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
+ 0x05B0, 0x05B1, 0x05B2, 0x05B3, 0x05B4, 0x05B5, 0x05B6, 0x05B7,
+ 0x05B8, 0x05B9, 0x0000, 0x05BB, 0x05BC, 0x05BD, 0x05BE, 0x05BF,
+ 0x05C0, 0x05C1, 0x05C2, 0x05C3, 0x05F0, 0x05F1, 0x05F2, 0x05F3,
+ 0x05F4, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7,
+ 0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF,
+ 0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7,
+ 0x05E8, 0x05E9, 0x05EA, 0x0000, 0x0000, 0x200E, 0x200F, 0x0000
+};
+
+#elif _CODE_PAGE == 1256
+#define _TBLDEF 1
+static
+const WCHAR Tbl[] = { /* CP1256(0x80-0xFF) to Unicode conversion table */
+ 0x20AC, 0x067E, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
+ 0x02C6, 0x2030, 0x0679, 0x2039, 0x0152, 0x0686, 0x0698, 0x0688,
+ 0x06AF, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
+ 0x06A9, 0x2122, 0x0691, 0x203A, 0x0153, 0x200C, 0x200D, 0x06BA,
+ 0x00A0, 0x060C, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
+ 0x00A8, 0x00A9, 0x06BE, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
+ 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
+ 0x00B8, 0x00B9, 0x061B, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x061F,
+ 0x06C1, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627,
+ 0x0628, 0x0629, 0x062A, 0x062B, 0x062C, 0x062D, 0x062E, 0x062F,
+ 0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x00D7,
+ 0x0637, 0x0638, 0x0639, 0x063A, 0x0640, 0x0640, 0x0642, 0x0643,
+ 0x00E0, 0x0644, 0x00E2, 0x0645, 0x0646, 0x0647, 0x0648, 0x00E7,
+ 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x0649, 0x064A, 0x00EE, 0x00EF,
+ 0x064B, 0x064C, 0x064D, 0x064E, 0x00F4, 0x064F, 0x0650, 0x00F7,
+ 0x0651, 0x00F9, 0x0652, 0x00FB, 0x00FC, 0x200E, 0x200F, 0x06D2
+}
+
+#elif _CODE_PAGE == 1257
+#define _TBLDEF 1
+static
+const WCHAR Tbl[] = { /* CP1257(0x80-0xFF) to Unicode conversion table */
+ 0x20AC, 0x0000, 0x201A, 0x0000, 0x201E, 0x2026, 0x2020, 0x2021,
+ 0x0000, 0x2030, 0x0000, 0x2039, 0x0000, 0x00A8, 0x02C7, 0x00B8,
+ 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
+ 0x0000, 0x2122, 0x0000, 0x203A, 0x0000, 0x00AF, 0x02DB, 0x0000,
+ 0x00A0, 0x0000, 0x00A2, 0x00A3, 0x00A4, 0x0000, 0x00A6, 0x00A7,
+ 0x00D8, 0x00A9, 0x0156, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
+ 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
+ 0x00B8, 0x00B9, 0x0157, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00E6,
+ 0x0104, 0x012E, 0x0100, 0x0106, 0x00C4, 0x00C5, 0x0118, 0x0112,
+ 0x010C, 0x00C9, 0x0179, 0x0116, 0x0122, 0x0136, 0x012A, 0x013B,
+ 0x0160, 0x0143, 0x0145, 0x00D3, 0x014C, 0x00D5, 0x00D6, 0x00D7,
+ 0x0172, 0x0141, 0x015A, 0x016A, 0x00DC, 0x017B, 0x017D, 0x00DF,
+ 0x0105, 0x012F, 0x0101, 0x0107, 0x00E4, 0x00E5, 0x0119, 0x0113,
+ 0x010D, 0x00E9, 0x017A, 0x0117, 0x0123, 0x0137, 0x012B, 0x013C,
+ 0x0161, 0x0144, 0x0146, 0x00F3, 0x014D, 0x00F5, 0x00F6, 0x00F7,
+ 0x0173, 0x014E, 0x015B, 0x016B, 0x00FC, 0x017C, 0x017E, 0x02D9
+};
+
+#elif _CODE_PAGE == 1258
+#define _TBLDEF 1
+static
+const WCHAR Tbl[] = { /* CP1258(0x80-0xFF) to Unicode conversion table */
+ 0x20AC, 0x0000, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
+ 0x02C6, 0x2030, 0x0000, 0x2039, 0x0152, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
+ 0x02DC, 0x2122, 0x0000, 0x203A, 0x0153, 0x0000, 0x0000, 0x0178,
+ 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
+ 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
+ 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
+ 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
+ 0x00C0, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x00C5, 0x00C6, 0x00C7,
+ 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x0300, 0x00CD, 0x00CE, 0x00CF,
+ 0x0110, 0x00D1, 0x0309, 0x00D3, 0x00D4, 0x01A0, 0x00D6, 0x00D7,
+ 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x01AF, 0x0303, 0x00DF,
+ 0x00E0, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
+ 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x0301, 0x00ED, 0x00EE, 0x00EF,
+ 0x0111, 0x00F1, 0x0323, 0x00F3, 0x00F4, 0x01A1, 0x00F6, 0x00F7,
+ 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x01B0, 0x20AB, 0x00FF
+};
+
+#endif
+
+
+#if !_TBLDEF || !_USE_LFN
+#error This file is not needed in current configuration. Remove from the project.
+#endif
+
+
+WCHAR ff_convert ( /* Converted character, Returns zero on error */
+ WCHAR src, /* Character code to be converted */
+ UINT dir /* 0: Unicode to OEMCP, 1: OEMCP to Unicode */
+)
+{
+ WCHAR c;
+
+
+ if (src < 0x80) { /* ASCII */
+ c = src;
+
+ } else {
+ if (dir) { /* OEMCP to Unicode */
+ c = (src >= 0x100) ? 0 : Tbl[src - 0x80];
+
+ } else { /* Unicode to OEMCP */
+ for (c = 0; c < 0x80; c++) {
+ if (src == Tbl[c]) break;
+ }
+ c = (c + 0x80) & 0xFF;
+ }
+ }
+
+ return c;
+}
+
+
+WCHAR ff_wtoupper ( /* Upper converted character */
+ WCHAR chr /* Input character */
+)
+{
+ static const WCHAR tbl_lower[] = { 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0xA1, 0x00A2, 0x00A3, 0x00A5, 0x00AC, 0x00AF, 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0x0FF, 0x101, 0x103, 0x105, 0x107, 0x109, 0x10B, 0x10D, 0x10F, 0x111, 0x113, 0x115, 0x117, 0x119, 0x11B, 0x11D, 0x11F, 0x121, 0x123, 0x125, 0x127, 0x129, 0x12B, 0x12D, 0x12F, 0x131, 0x133, 0x135, 0x137, 0x13A, 0x13C, 0x13E, 0x140, 0x142, 0x144, 0x146, 0x148, 0x14B, 0x14D, 0x14F, 0x151, 0x153, 0x155, 0x157, 0x159, 0x15B, 0x15D, 0x15F, 0x161, 0x163, 0x165, 0x167, 0x169, 0x16B, 0x16D, 0x16F, 0x171, 0x173, 0x175, 0x177, 0x17A, 0x17C, 0x17E, 0x192, 0x3B1, 0x3B2, 0x3B3, 0x3B4, 0x3B5, 0x3B6, 0x3B7, 0x3B8, 0x3B9, 0x3BA, 0x3BB, 0x3BC, 0x3BD, 0x3BE, 0x3BF, 0x3C0, 0x3C1, 0x3C3, 0x3C4, 0x3C5, 0x3C6, 0x3C7, 0x3C8, 0x3C9, 0x3CA, 0x430, 0x431, 0x432, 0x433, 0x434, 0x435, 0x436, 0x437, 0x438, 0x439, 0x43A, 0x43B, 0x43C, 0x43D, 0x43E, 0x43F, 0x440, 0x441, 0x442, 0x443, 0x444, 0x445, 0x446, 0x447, 0x448, 0x449, 0x44A, 0x44B, 0x44C, 0x44D, 0x44E, 0x44F, 0x451, 0x452, 0x453, 0x454, 0x455, 0x456, 0x457, 0x458, 0x459, 0x45A, 0x45B, 0x45C, 0x45E, 0x45F, 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177, 0x2178, 0x2179, 0x217A, 0x217B, 0x217C, 0x217D, 0x217E, 0x217F, 0xFF41, 0xFF42, 0xFF43, 0xFF44, 0xFF45, 0xFF46, 0xFF47, 0xFF48, 0xFF49, 0xFF4A, 0xFF4B, 0xFF4C, 0xFF4D, 0xFF4E, 0xFF4F, 0xFF50, 0xFF51, 0xFF52, 0xFF53, 0xFF54, 0xFF55, 0xFF56, 0xFF57, 0xFF58, 0xFF59, 0xFF5A, 0 };
+ static const WCHAR tbl_upper[] = { 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x21, 0xFFE0, 0xFFE1, 0xFFE5, 0xFFE2, 0xFFE3, 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0x178, 0x100, 0x102, 0x104, 0x106, 0x108, 0x10A, 0x10C, 0x10E, 0x110, 0x112, 0x114, 0x116, 0x118, 0x11A, 0x11C, 0x11E, 0x120, 0x122, 0x124, 0x126, 0x128, 0x12A, 0x12C, 0x12E, 0x130, 0x132, 0x134, 0x136, 0x139, 0x13B, 0x13D, 0x13F, 0x141, 0x143, 0x145, 0x147, 0x14A, 0x14C, 0x14E, 0x150, 0x152, 0x154, 0x156, 0x158, 0x15A, 0x15C, 0x15E, 0x160, 0x162, 0x164, 0x166, 0x168, 0x16A, 0x16C, 0x16E, 0x170, 0x172, 0x174, 0x176, 0x179, 0x17B, 0x17D, 0x191, 0x391, 0x392, 0x393, 0x394, 0x395, 0x396, 0x397, 0x398, 0x399, 0x39A, 0x39B, 0x39C, 0x39D, 0x39E, 0x39F, 0x3A0, 0x3A1, 0x3A3, 0x3A4, 0x3A5, 0x3A6, 0x3A7, 0x3A8, 0x3A9, 0x3AA, 0x410, 0x411, 0x412, 0x413, 0x414, 0x415, 0x416, 0x417, 0x418, 0x419, 0x41A, 0x41B, 0x41C, 0x41D, 0x41E, 0x41F, 0x420, 0x421, 0x422, 0x423, 0x424, 0x425, 0x426, 0x427, 0x428, 0x429, 0x42A, 0x42B, 0x42C, 0x42D, 0x42E, 0x42F, 0x401, 0x402, 0x403, 0x404, 0x405, 0x406, 0x407, 0x408, 0x409, 0x40A, 0x40B, 0x40C, 0x40E, 0x40F, 0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166, 0x2167, 0x2168, 0x2169, 0x216A, 0x216B, 0x216C, 0x216D, 0x216E, 0x216F, 0xFF21, 0xFF22, 0xFF23, 0xFF24, 0xFF25, 0xFF26, 0xFF27, 0xFF28, 0xFF29, 0xFF2A, 0xFF2B, 0xFF2C, 0xFF2D, 0xFF2E, 0xFF2F, 0xFF30, 0xFF31, 0xFF32, 0xFF33, 0xFF34, 0xFF35, 0xFF36, 0xFF37, 0xFF38, 0xFF39, 0xFF3A, 0 };
+ int i;
+
+
+ for (i = 0; tbl_lower[i] && chr != tbl_lower[i]; i++) ;
+
+ return tbl_lower[i] ? tbl_upper[i] : chr;
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/option/syscall.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/option/syscall.c
new file mode 100644
index 0000000..beb7385
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs/src/option/syscall.c
@@ -0,0 +1,151 @@
+/*------------------------------------------------------------------------*/
+/* Sample code of OS dependent controls for FatFs R0.08 */
+/* (C)ChaN, 2010 */
+/*------------------------------------------------------------------------*/
+
+#include <stdlib.h> /* ANSI memory controls */
+#include <malloc.h> /* ANSI memory controls */
+
+#include "../ff.h"
+
+
+#if _FS_REENTRANT
+/*------------------------------------------------------------------------*/
+/* Create a Synchronization Object
+/*------------------------------------------------------------------------*/
+/* This function is called in f_mount function to create a new
+/ synchronization object, such as semaphore and mutex. When a FALSE is
+/ returned, the f_mount function fails with FR_INT_ERR.
+*/
+
+BOOL ff_cre_syncobj ( /* TRUE:Function succeeded, FALSE:Could not create due to any error */
+ BYTE vol, /* Corresponding logical drive being processed */
+ _SYNC_t *sobj /* Pointer to return the created sync object */
+)
+{
+ BOOL ret;
+
+ *sobj = CreateMutex(NULL, FALSE, NULL); /* Win32 */
+ ret = (*sobj != INVALID_HANDLE_VALUE) ? TRUE : FALSE;
+
+// *sobj = SyncObjects[vol]; /* uITRON (give a static created sync object) */
+// ret = TRUE; /* The initial value of the semaphore must be 1. */
+
+// *sobj = OSMutexCreate(0, &err); /* uC/OS-II */
+// ret = (err == OS_NO_ERR) ? TRUE : FALSE;
+
+// *sobj = xSemaphoreCreateMutex(); /* FreeRTOS */
+// ret = (*sobj != NULL) ? TRUE : FALSE;
+
+ return ret;
+}
+
+
+
+/*------------------------------------------------------------------------*/
+/* Delete a Synchronization Object */
+/*------------------------------------------------------------------------*/
+/* This function is called in f_mount function to delete a synchronization
+/ object that created with ff_cre_syncobj function. When a FALSE is
+/ returned, the f_mount function fails with FR_INT_ERR.
+*/
+
+BOOL ff_del_syncobj ( /* TRUE:Function succeeded, FALSE:Could not delete due to any error */
+ _SYNC_t sobj /* Sync object tied to the logical drive to be deleted */
+)
+{
+ BOOL ret;
+
+ ret = CloseHandle(sobj); /* Win32 *
+
+// ret = TRUE; /* uITRON (nothing to do) *
+
+// OSMutexDel(sobj, OS_DEL_ALWAYS, &err); /* uC/OS-II */
+// ret = (err == OS_NO_ERR) ? TRUE : FALSE;
+
+// ret = TRUE; /* FreeRTOS (nothing to do) */
+
+ return ret;
+}
+
+
+
+/*------------------------------------------------------------------------*/
+/* Request Grant to Access the Volume */
+/*------------------------------------------------------------------------*/
+/* This function is called on entering file functions to lock the volume.
+/ When a FALSE is returned, the file function fails with FR_TIMEOUT.
+*/
+
+BOOL ff_req_grant ( /* TRUE:Got a grant to access the volume, FALSE:Could not get a grant */
+ _SYNC_t sobj /* Sync object to wait */
+)
+{
+ BOOL ret;
+
+ ret = (WaitForSingleObject(sobj, _FS_TIMEOUT) == WAIT_OBJECT_0) ? TRUE : FALSE; /* Win32 */
+
+// ret = (wai_sem(sobj) == E_OK) ? TRUE : FALSE; /* uITRON */
+
+// OSMutexPend(sobj, _FS_TIMEOUT, &err)); /* uC/OS-II */
+// ret = (err == OS_NO_ERR) ? TRUE : FALSE;
+
+// ret = (xSemaphoreTake(sobj, _FS_TIMEOUT) == pdTRUE) ? TRUE : FALSE; /* FreeRTOS */
+
+ return ret;
+}
+
+
+
+/*------------------------------------------------------------------------*/
+/* Release Grant to Access the Volume */
+/*------------------------------------------------------------------------*/
+/* This function is called on leaving file functions to unlock the volume.
+*/
+
+void ff_rel_grant (
+ _SYNC_t sobj /* Sync object to be signaled */
+)
+{
+ ReleaseMutex(sobj); /* Win32 */
+
+// sig_sem(sobj); /* uITRON */
+
+// OSMutexPost(sobj); /* uC/OS-II */
+
+// xSemaphoreGive(sobj); /* FreeRTOS */
+
+}
+
+#endif
+
+
+
+
+#if _USE_LFN == 3 /* LFN with a working buffer on the heap */
+/*------------------------------------------------------------------------*/
+/* Allocate a memory block */
+/*------------------------------------------------------------------------*/
+/* If a NULL is returned, the file function fails with FR_NOT_ENOUGH_CORE.
+*/
+
+void* ff_memalloc ( /* Returns pointer to the allocated memory block */
+ UINT size /* Number of bytes to allocate */
+)
+{
+ return malloc(size);
+}
+
+
+/*------------------------------------------------------------------------*/
+/* Free a memory block */
+/*------------------------------------------------------------------------*/
+
+void ff_memfree(
+ void* mblock /* Pointer to the memory block to free */
+)
+{
+ free(mblock);
+}
+
+#endif
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs_config.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs_config.h
new file mode 100644
index 0000000..615b15c
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libfatfs/fatfs_config.h
@@ -0,0 +1,241 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+#ifndef FATFS_CONFIG_H
+#define FATFS_CONFIG_H
+#include "fatfs/src/integer.h"
+
+/*-----------------------------------------------------------------------*/
+/* Correspondence between physical drive number and physical drive. */
+/*-----------------------------------------------------------------------*/
+
+#define DRV_NAND 0
+#define DRV_MMC 1
+#define DRV_ATA 2
+#define DRV_USB 3
+#define DRV_SDRAM 4
+
+
+#define SECTOR_SIZE_DEFAULT 512
+#define SECTOR_SIZE_SDRAM 512
+#define SECTOR_SIZE_SDCARD 512
+
+/*---------------------------------------------------------------------------/
+/ FatFs - FAT file system module configuration file R0.08 (C)ChaN, 2010
+/----------------------------------------------------------------------------*/
+
+/*---------------------------------------------------------------------------/
+/ FatFs Configuration Options
+/
+/ CAUTION! Do not forget to make clean the project after any changes to
+/ the configuration options.
+/
+/----------------------------------------------------------------------------*/
+#define _FFCONF 8237 /* Revision ID */
+
+/*---------------------------------------------------------------------------/
+/ Function and Buffer Configurations
+/----------------------------------------------------------------------------*/
+
+#define _FS_TINY 0 /* 0:Normal or 1:Tiny */
+/* When _FS_TINY is set to 1, FatFs uses the sector buffer in the file system
+/ object instead of the sector buffer in the individual file object for file
+/ data transfer. This reduces memory consumption 512 bytes each file object. */
+
+#if _FS_TINY != 1
+#define _FS_READONLY 0 /* 0:Read/Write or 1:Read only */
+/* Setting _FS_READONLY to 1 defines read only configuration. This removes
+/ writing functions, f_write, f_sync, f_unlink, f_mkdir, f_chmod, f_rename,
+/ f_truncate and useless f_getfree. */
+#else
+#define _FS_READONLY 1
+/* Setting _FS_READONLY to 1 defines read only configuration. This removes
+/ writing functions, f_write, f_sync, f_unlink, f_mkdir, f_chmod, f_rename,
+/ f_truncate and useless f_getfree. */
+#endif
+
+#define _FS_MINIMIZE 0 /* 0, 1, 2 or 3 */
+/* The _FS_MINIMIZE option defines minimization level to remove some functions.
+/
+/ 0: Full function.
+/ 1: f_stat, f_getfree, f_unlink, f_mkdir, f_chmod, f_truncate and f_rename
+/ are removed.
+/ 2: f_opendir and f_readdir are removed in addition to level 1.
+/ 3: f_lseek is removed in addition to level 2. */
+
+
+#define _USE_STRFUNC 0 /* 0:Disable or 1/2:Enable */
+/* To enable string functions, set _USE_STRFUNC to 1 or 2. */
+
+
+#define _USE_MKFS 1 /* 0:Disable or 1:Enable */
+/* To enable f_mkfs function, set _USE_MKFS to 1 and set _FS_READONLY to 0 */
+
+
+#define _USE_FORWARD 0 /* 0:Disable or 1:Enable */
+/* To enable f_forward function, set _USE_FORWARD to 1 and set _FS_TINY to 1. */
+
+
+#define _USE_FASTSEEK 0 /* 0:Disable or 1:Enable */
+/* To enable fast seek feature, set _USE_FASTSEEK to 1. */
+
+
+
+/*---------------------------------------------------------------------------/
+/ Locale and Namespace Configurations
+/----------------------------------------------------------------------------*/
+
+#define _CODE_PAGE 850
+/* The _CODE_PAGE specifies the OEM code page to be used on the target system.
+/ Incorrect setting of the code page can cause a file open failure.
+/
+/ 932 - Japanese Shift-JIS (DBCS, OEM, Windows)
+/ 936 - Simplified Chinese GBK (DBCS, OEM, Windows)
+/ 949 - Korean (DBCS, OEM, Windows)
+/ 950 - Traditional Chinese Big5 (DBCS, OEM, Windows)
+/ 1250 - Central Europe (Windows)
+/ 1251 - Cyrillic (Windows)
+/ 1252 - Latin 1 (Windows)
+/ 1253 - Greek (Windows)
+/ 1254 - Turkish (Windows)
+/ 1255 - Hebrew (Windows)
+/ 1256 - Arabic (Windows)
+/ 1257 - Baltic (Windows)
+/ 1258 - Vietnam (OEM, Windows)
+/ 437 - U.S. (OEM)
+/ 720 - Arabic (OEM)
+/ 737 - Greek (OEM)
+/ 775 - Baltic (OEM)
+/ 850 - Multilingual Latin 1 (OEM)
+/ 858 - Multilingual Latin 1 + Euro (OEM)
+/ 852 - Latin 2 (OEM)
+/ 855 - Cyrillic (OEM)
+/ 866 - Russian (OEM)
+/ 857 - Turkish (OEM)
+/ 862 - Hebrew (OEM)
+/ 874 - Thai (OEM, Windows)
+/ 1 - ASCII only (Valid for non LFN cfg.)
+*/
+
+
+#define _USE_LFN 2 /* 0 to 3 */
+#define _MAX_LFN 255 /* Maximum LFN length to handle (12 to 255) */
+/* The _USE_LFN option switches the LFN support.
+/
+/ 0: Disable LFN. _MAX_LFN and _LFN_UNICODE have no effect.
+/ 1: Enable LFN with static working buffer on the bss. NOT REENTRANT.
+/ 2: Enable LFN with dynamic working buffer on the STACK.
+/ 3: Enable LFN with dynamic working buffer on the HEAP.
+/
+/ The LFN working buffer occupies (_MAX_LFN + 1) * 2 bytes. When enable LFN,
+/ Unicode handling functions ff_convert() and ff_wtoupper() must be added
+/ to the project. When enable to use heap, memory control functions
+/ ff_memalloc() and ff_memfree() must be added to the project. */
+
+
+#define _LFN_UNICODE 0 /* 0:ANSI/OEM or 1:Unicode */
+/* To switch the character code set on FatFs API to Unicode,
+/ enable LFN feature and set _LFN_UNICODE to 1. */
+
+
+#define _FS_RPATH 0 /* 0:Disable or 1:Enable */
+/* When _FS_RPATH is set to 1, relative path feature is enabled and f_chdir,
+/ f_chdrive function are available.
+/ Note that output of the f_readdir fnction is affected by this option. */
+
+
+
+/*---------------------------------------------------------------------------/
+/ Physical Drive Configurations
+/----------------------------------------------------------------------------*/
+
+#define _VOLUMES 2
+/* Number of volumes (logical drives) to be used. */
+
+
+#define _MAX_SS 512 /* 512, 1024, 2048 or 4096 */
+/* Maximum sector size to be handled.
+/ Always set 512 for memory card and hard disk but a larger value may be
+/ required for floppy disk (512/1024) and optical disk (512/2048).
+/ When _MAX_SS is larger than 512, GET_SECTOR_SIZE command must be implememted
+/ to the disk_ioctl function. */
+
+
+#define _MULTI_PARTITION 0 /* 0:Single parition or 1:Multiple partition */
+/* When _MULTI_PARTITION is set to 0, each volume is bound to the same physical
+/ drive number and can mount only first primaly partition. When it is set to 1,
+/ each volume is tied to the partitions listed in Drives[]. */
+
+#define _USE_ERASE 0 /* 0:Disable or 1:Enable */
+/* To enable sector erase feature, set _USE_ERASE to 1. CTRL_ERASE_SECTOR command
+/ should be added to the disk_ioctl functio. */
+
+
+/*---------------------------------------------------------------------------/
+/ System Configurations
+/----------------------------------------------------------------------------*/
+
+#define _WORD_ACCESS 0 /* 0 or 1 */
+/* Set 0 first and it is always compatible with all platforms. The _WORD_ACCESS
+/ option defines which access method is used to the word data on the FAT volume.
+/
+/ 0: Byte-by-byte access.
+/ 1: Word access. Do not choose this unless following condition is met.
+/
+/ When the byte order on the memory is big-endian or address miss-aligned word
+/ access results incorrect behavior, the _WORD_ACCESS must be set to 0.
+/ If it is not the case, the value can also be set to 1 to improve the
+/ performance and code size. */
+
+
+#define _FS_REENTRANT 0 /* 0:Disable or 1:Enable */
+#define _FS_TIMEOUT 1000 /* Timeout period in unit of time ticks */
+#define _SYNC_t HANDLE /* O/S dependent type of sync object. e.g. HANDLE, OS_EVENT*, ID and etc.. */
+/* Include a header file here to define O/S system calls */
+/* #include <windows.h>, <ucos_ii.h.h>, <semphr.h> or ohters. */
+
+/* The _FS_REENTRANT option switches the reentrancy of the FatFs module.
+/
+/ 0: Disable reentrancy. _SYNC_t and _FS_TIMEOUT have no effect.
+/ 1: Enable reentrancy. Also user provided synchronization handlers,
+/ ff_req_grant, ff_rel_grant, ff_del_syncobj and ff_cre_syncobj
+/ function must be added to the project. */
+
+
+#define _FS_SHARE 0 /* 0:Disable or >=1:Enable */
+/* To enable file shareing feature, set _FS_SHARE to >= 1 and also user
+ provided memory handlers, ff_memalloc and ff_memfree function must be
+ added to the project. The value defines number of files can be opened
+ per volume. */
+
+
+#include "fatfs/src/diskio.h"
+#include "fatfs/src/ff.h"
+
+#endif /* FATFS_CONFIG_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/build/gcc/Makefile b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/build/gcc/Makefile
new file mode 100644
index 0000000..9abe9fd
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/build/gcc/Makefile
@@ -0,0 +1,56 @@
+# ----------------------------------------------------------------------------
+# ATMEL Microcontroller Software Support
+# ----------------------------------------------------------------------------
+# Copyright (c) 2010, Atmel Corporation
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# - Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the disclaimer below.
+#
+# Atmel's name may not be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+# DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# ----------------------------------------------------------------------------
+
+# Makefile for compiling liblwip
+
+SERIE = sam3x
+
+SUBMAKE_FILES=debug.mk gcc.mk iar.mk mdk.mk release.mk win.mk linux.mk liblwip.mk
+#SUBMAKE_OPTIONS=--no-builtin-rules --no-builtin-variables -d -p
+SUBMAKE_OPTIONS=--no-builtin-rules --no-builtin-variables
+SUBMAKE_VARS=
+
+#-------------------------------------------------------------------------------
+# Rules
+#-------------------------------------------------------------------------------
+
+all: $(SERIE)
+
+.PHONY: $(SERIE)
+$(SERIE):
+ @echo --- Making $(SERIE)
+ @$(MAKE) DEBUG=1 $(SUBMAKE_OPTIONS) -f liblwip.mk
+ @$(MAKE) $(SUBMAKE_OPTIONS) -f liblwip.mk
+
+.PHONY: clean
+clean:
+ @echo --- Cleaning $(SERIE)
+ @$(MAKE) $(SUBMAKE_OPTIONS) -f liblwip.mk $@
+ @$(MAKE) DEBUG=1 $(SUBMAKE_OPTIONS) -f liblwip.mk $@
+
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/build/gcc/debug.mk b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/build/gcc/debug.mk
new file mode 100644
index 0000000..c7f57b5
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/build/gcc/debug.mk
@@ -0,0 +1,18 @@
+
+# Trace level used for compilation
+# (can be overriden by adding TRACE_LEVEL=#number to the command-line)
+# TRACE_LEVEL_DEBUG 5
+# TRACE_LEVEL_INFO 4
+# TRACE_LEVEL_WARNING 3
+# TRACE_LEVEL_ERROR 2
+# TRACE_LEVEL_FATAL 1
+# TRACE_LEVEL_NO_TRACE 0
+TRACE_LEVEL = 3
+
+# Optimization level
+# -O1 Optimize
+# -O2 Optimize even more
+# -O3 Optimize yet more
+# -O0 Reduce compilation time and make debugging produce the expected results
+# -Os Optimize for size
+OPTIMIZATION = -g -O0 -D DEBUG
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/build/gcc/gcc.mk b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/build/gcc/gcc.mk
new file mode 100644
index 0000000..108f1e8
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/build/gcc/gcc.mk
@@ -0,0 +1,37 @@
+
+# Tool suffix when cross-compiling
+CROSS_COMPILE = arm-none-eabi-
+
+# Compilation tools
+AR = $(CROSS_COMPILE)ar
+CC = $(CROSS_COMPILE)gcc
+AS = $(CROSS_COMPILE)as
+LD = $(CROSS_COMPILE)ld
+SIZE = $(CROSS_COMPILE)size
+NM = $(CROSS_COMPILE)nm
+OBJCOPY = $(CROSS_COMPILE)objcopy
+
+# Flags
+
+CFLAGS += -Wall -Wchar-subscripts -Wcomment -Wformat=2 -Wimplicit-int
+CFLAGS += -Werror-implicit-function-declaration -Wmain -Wparentheses
+CFLAGS += -Wsequence-point -Wreturn-type -Wswitch -Wtrigraphs -Wunused
+CFLAGS += -Wuninitialized -Wunknown-pragmas -Wfloat-equal -Wundef
+CFLAGS += -Wshadow -Wpointer-arith -Wbad-function-cast -Wwrite-strings
+CFLAGS += -Wsign-compare -Waggregate-return -Wstrict-prototypes
+CFLAGS += -Wmissing-prototypes -Wmissing-declarations
+CFLAGS += -Wformat -Wmissing-format-attribute -Wno-deprecated-declarations
+CFLAGS += -Wpacked -Wredundant-decls -Wnested-externs -Winline -Wlong-long
+CFLAGS += -Wunreachable-code
+CFLAGS += -Wcast-align
+#CFLAGS += -Wmissing-noreturn
+#CFLAGS += -Wconversion
+
+CFLAGS += --param max-inline-insns-single=2000 -mcpu=cortex-m3 -mthumb -mlong-calls -ffunction-sections
+CFLAGS += $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -DTRACE_LEVEL=$(TRACE_LEVEL)
+
+# To reduce application size use only integer printf function.
+CFLAGS += -Dprintf=iprintf
+
+ASFLAGS = -mcpu=cortex-m3 -mthumb -Wall -g $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -D__ASSEMBLY__
+LDFLAGS = -g $(OPTIMIZATION) -nostartfiles -mcpu=cortex-m3 -mthumb -Wl,-Map=$(OUTPUT).map,--cref,--gc-sections
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/build/gcc/iar.mk b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/build/gcc/iar.mk
new file mode 100644
index 0000000..cc78e08
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/build/gcc/iar.mk
@@ -0,0 +1,15 @@
+
+# Compilation tools
+AR = iarchive.exe
+CC = iccarm.exe
+LD = ilinkarm.exe
+SIZE =
+OBJCOPY =
+
+# Flags
+
+CFLAGS += $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -DTRACE_LEVEL=$(TRACE_LEVEL)
+
+ASFLAGS = $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -D__ASSEMBLY__
+
+LDFLAGS =
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/build/gcc/liblwip.mk b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/build/gcc/liblwip.mk
new file mode 100644
index 0000000..a479a40
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/build/gcc/liblwip.mk
@@ -0,0 +1,204 @@
+# ----------------------------------------------------------------------------
+# ATMEL Microcontroller Software Support
+# ----------------------------------------------------------------------------
+# Copyright (c) 2010, Atmel Corporation
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# - Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the disclaimer below.
+#
+# Atmel's name may not be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+# DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# ----------------------------------------------------------------------------
+
+# Makefile for compiling liblwip
+.SUFFIXES: .o .a .c .s
+SUB_MAKEFILES=debug.mk gcc.mk iar.mk mdk.mk release.mk win.mk linux.mk
+
+#-------------------------------------------------------------------------------
+# User-modifiable options
+#-------------------------------------------------------------------------------
+SERIE=sam3x
+CHIP=$(SERIE)8
+BOARD=$(SERIE)_ek
+LIBNAME=liblwip
+TOOLCHAIN=gcc
+
+#-------------------------------------------------------------------------------
+# we detect OS (Linux/Windows/Cygwin)
+# not defined for Cygwin
+#ifdef $(OS)
+ifeq ($(OS), Windows_NT)
+include win.mk
+else
+include linux.mk
+endif
+#else
+# Cygwin case
+#include linux.mk
+#endif
+
+#-------------------------------------------------------------------------------
+# Path
+#-------------------------------------------------------------------------------
+
+# Output directories
+OUTPUT_BIN = ../../lib
+
+# Libraries
+PROJECT_BASE_PATH = ../..
+LWIP_BASE_PATH = ../../../../third_party/lwip_1.3.2/src
+#-------------------------------------------------------------------------------
+# Files
+#-------------------------------------------------------------------------------
+vpath %.h $(PROJECT_BASE_PATH) $(PROJECT_BASE_PATH)/sam3-specific $(PROJECT_BASE_PATH)/sam3-specific/arch $(LWIP_BASE_PATH)/include $(LWIP_BASE_PATH)/include/lwip $(LWIP_BASE_PATH)/include/ipv4
+vpath %.c $(PROJECT_BASE_PATH) $(PROJECT_BASE_PATH)/sam3-specific $(PROJECT_BASE_PATH)/sam3-specific/arch $(LWIP_BASE_PATH)/api $(LWIP_BASE_PATH)/core $(LWIP_BASE_PATH)/core/ipv4 $(LWIP_BASE_PATH)/core/snmp $(LWIP_BASE_PATH)/netif $(LWIP_BASE_PATH)/netif/ppp
+
+VPATH+=$(PROJECT_BASE_PATH)
+VPATH+=$(PROJECT_BASE_PATH)/sam3-specific
+VPATH+=$(PROJECT_BASE_PATH)/sam3-specific/arch
+VPATH+=$(LWIP_BASE_PATH)/include/ipv4
+VPATH+=$(LWIP_BASE_PATH)/include
+VPATH+=$(LWIP_BASE_PATH)/api
+VPATH+=$(LWIP_BASE_PATH)/core
+VPATH+=$(LWIP_BASE_PATH)/core/ipv4
+#VPATH+=$(LWIP_BASE_PATH)/core/ipv6
+VPATH+=$(LWIP_BASE_PATH)/core/snmp
+VPATH+=$(LWIP_BASE_PATH)/netif
+VPATH+=$(LWIP_BASE_PATH)/netif/ppp
+
+INCLUDES = -I$(PROJECT_BASE_PATH)/../libboard_$(SERIE)-ek
+INCLUDES += -I$(PROJECT_BASE_PATH)/../libchip_$(SERIE)
+INCLUDES += -I$(PROJECT_BASE_PATH)/sam3-specific
+INCLUDES += -I$(PROJECT_BASE_PATH)/sam3-specific/arch
+INCLUDES += -I$(LWIP_BASE_PATH)/include
+INCLUDES += -I$(LWIP_BASE_PATH)/include/lwip
+INCLUDES += -I$(LWIP_BASE_PATH)/include/ipv4
+#-------------------------------------------------------------------------------
+ifdef DEBUG
+include debug.mk
+else
+include release.mk
+endif
+
+#-------------------------------------------------------------------------------
+# Tools
+#-------------------------------------------------------------------------------
+
+include $(TOOLCHAIN).mk
+
+#-------------------------------------------------------------------------------
+ifdef DEBUG
+OUTPUT_OBJ=debug
+OUTPUT_LIB=$(LIBNAME)_$(SERIE)_$(TOOLCHAIN)_dbg.a
+else
+OUTPUT_OBJ=release
+OUTPUT_LIB=$(LIBNAME)_$(SERIE)_$(TOOLCHAIN)_rel.a
+endif
+
+OUTPUT_PATH=$(OUTPUT_OBJ)_$(LIBNAME)
+
+#-------------------------------------------------------------------------------
+# C source files and objects
+#-------------------------------------------------------------------------------
+C_SRC=$(wildcard $(PROJECT_BASE_PATH)/sam3-specific/*.c)
+C_SRC+=$(wildcard $(PROJECT_BASE_PATH)/sam3-specific/arch/*.c)
+C_SRC+=$(wildcard $(LWIP_BASE_PATH)/api/*.c)
+C_SRC+=$(wildcard $(LWIP_BASE_PATH)/core/*.c)
+C_SRC+=$(wildcard $(LWIP_BASE_PATH)/core/ipv4/*.c)
+#C_SRC+=$(wildcard $(LWIP_BASE_PATH)/core/ipv6/*.c)
+C_SRC+=$(wildcard $(LWIP_BASE_PATH)/core/snmp/*.c)
+C_SRC+=$(wildcard $(LWIP_BASE_PATH)/netif/*.c)
+C_SRC+=$(wildcard $(LWIP_BASE_PATH)/netif/ppp/*.c)
+C_OBJ_TEMP=$(patsubst %.c, %.o, $(notdir $(C_SRC)))
+
+# during development, remove some files
+C_OBJ_FILTER=
+
+ifneq '$(TOOLCHAIN)' 'gcc'
+C_OBJ_FILTER+=syscalls.o board_cstartup_gnu.o
+endif
+
+ifneq '$(TOOLCHAIN)' 'ewarm'
+C_OBJ_FILTER+=board_cstartup_iar.o
+endif
+
+ifneq '$(TOOLCHAIN)' 'mdk'
+C_OBJ_FILTER+=board_cstartup_keil.o
+endif
+
+C_OBJ=$(filter-out $(C_OBJ_FILTER), $(C_OBJ_TEMP))
+
+#-------------------------------------------------------------------------------
+# Assembler source files and objects
+#-------------------------------------------------------------------------------
+A_SRC=$(wildcard $(PROJECT_BASE_PATH)/source/*.s)
+
+A_OBJ_TEMP=$(patsubst %.s, %.o, $(notdir $(A_SRC)))
+
+# during development, remove some files
+A_OBJ_FILTER=
+
+A_OBJ=$(filter-out $(A_OBJ_FILTER), $(A_OBJ_TEMP))
+
+#-------------------------------------------------------------------------------
+# Rules
+#-------------------------------------------------------------------------------
+all: $(BOARD)
+
+$(BOARD): create_output $(OUTPUT_LIB)
+
+debug: create_output $(OUTPUT_LIB)
+
+release: create_output $(OUTPUT_LIB)
+
+.PHONY: create_output
+create_output: $(OUTPUT_PATH) $(subst /,$(SEP),$(OUTPUT_BIN))
+# @echo --- Preparing $(BOARD) files $(OUTPUT_PATH) $(OUTPUT_BIN) $(OS) $(TOOLCHAIN)
+# @echo -------------------------
+# @echo *$(C_SRC)
+# @echo -------------------------
+# @echo *$(C_OBJ)
+# @echo -------------------------
+# @echo *$(addprefix $(OUTPUT_PATH)/, $(C_OBJ))
+# @echo -------------------------
+# @echo *$(A_SRC)
+# @echo -------------------------
+
+$(OUTPUT_PATH) $(subst /,$(SEP),$(OUTPUT_BIN)):
+ mkdir $@
+
+$(addprefix $(OUTPUT_PATH)/,$(C_OBJ)): $(OUTPUT_PATH)/%.o: %.c
+ @$(CC) -c $(CFLAGS) $< -o $@
+
+$(addprefix $(OUTPUT_PATH)/,$(A_OBJ)): $(OUTPUT_PATH)/%.o: %.s
+ @$(AS) -c $(ASFLAGS) $< -o $@
+
+$(OUTPUT_LIB): $(addprefix $(OUTPUT_PATH)/, $(C_OBJ)) $(addprefix $(OUTPUT_PATH)/, $(A_OBJ))
+ @$(AR) -r $(OUTPUT_BIN)/$@ $^
+
+.PHONY: clean
+clean:
+ @echo --- Cleaning $(BOARD) files [$(OUTPUT_PATH)$(SEP)*.o]
+# -cs-rm -fR $(OUTPUT_PATH)
+# -cs-rm $(subst /,$(SEP),$(OUTPUT_BIN)/$(OUTPUT_LIB))
+
+ -@cs-rm -fR $(OUTPUT_PATH) 1>NUL 2>&1
+ -@cs-rm -fR $(OUTPUT_BIN)/$(OUTPUT_LIB) 1>NUL 2>&1
+
+$(addprefix $(OUTPUT_PATH)/,$(C_OBJ)):
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/build/gcc/linux.mk b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/build/gcc/linux.mk
new file mode 100644
index 0000000..08d2f9f
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/build/gcc/linux.mk
@@ -0,0 +1,4 @@
+
+RM=rm -f
+RMDIR=rm -fr
+SEP=/ \ No newline at end of file
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/build/gcc/readme.txt b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/build/gcc/readme.txt
new file mode 100644
index 0000000..88b2497
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/build/gcc/readme.txt
@@ -0,0 +1,6 @@
+This makefile allows build of liblwip_???.a
+
+where
+??? could be dbg and rel (debug, release)
+
+It checks for source files (C and assembler) from folder ../../sam3-specific and ../../../../third_party/lwip_1.3.2/src then compiles them to build given library
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/build/gcc/release.mk b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/build/gcc/release.mk
new file mode 100644
index 0000000..74b2686
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/build/gcc/release.mk
@@ -0,0 +1,18 @@
+
+# Trace level used for compilation
+# (can be overriden by adding TRACE_LEVEL=#number to the command-line)
+# TRACE_LEVEL_DEBUG 5
+# TRACE_LEVEL_INFO 4
+# TRACE_LEVEL_WARNING 3
+# TRACE_LEVEL_ERROR 2
+# TRACE_LEVEL_FATAL 1
+# TRACE_LEVEL_NO_TRACE 0
+TRACE_LEVEL = 1
+
+# Optimization level
+# -O1 Optimize
+# -O2 Optimize even more
+# -O3 Optimize yet more
+# -O0 Reduce compilation time and make debugging produce the expected results
+# -Os Optimize for size
+OPTIMIZATION = -Os
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/build/gcc/win.mk b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/build/gcc/win.mk
new file mode 100644
index 0000000..67b3fa7
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/build/gcc/win.mk
@@ -0,0 +1,4 @@
+
+RM=del
+RMDIR=rmdir /s /q
+SEP=\ \ No newline at end of file
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/liblwip.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/liblwip.c
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/liblwip.c
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/liblwip.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/liblwip.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/liblwip.h
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/sam3-specific/arch/cc.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/sam3-specific/arch/cc.h
new file mode 100644
index 0000000..edfef7f
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/sam3-specific/arch/cc.h
@@ -0,0 +1,81 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+#ifndef _CC_H
+#define _CC_H
+
+/* Define platform endianness */
+#define BYTE_ORDER LITTLE_ENDIAN
+
+/* The unsigned data types */
+typedef unsigned char u8_t;
+typedef unsigned short u16_t;
+typedef unsigned int u32_t;
+
+/* The signed counterparts */
+typedef signed char s8_t;
+typedef signed short s16_t;
+typedef signed int s32_t;
+
+/* A generic pointer type */
+typedef u32_t mem_ptr_t;
+
+/* Display name of types */
+#define U16_F "hu"
+#define S16_F "hd"
+#define X16_F "hx"
+#define U32_F "u"
+#define S32_F "d"
+#define X32_F "x"
+
+/* Compiler hints for packing lwip's structures */
+#if defined(__CC_ARM)
+ /* Setup PACKing macros for MDK Tools */
+ #define PACK_STRUCT_BEGIN
+ #define PACK_STRUCT_STRUCT __attribute__ ((packed))
+ #define PACK_STRUCT_END
+ #define PACK_STRUCT_FIELD(x) x
+#elif defined (__ICCARM__)
+ /* Setup PACKing macros for EWARM Tools */
+ #define PACK_STRUCT_BEGIN __packed
+ #define PACK_STRUCT_STRUCT
+ #define PACK_STRUCT_END
+ #define PACK_STRUCT_FIELD(x) x
+#elif defined (__GNUC__)
+ /* Setup PACKing macros for GCC Tools */
+ #define PACK_STRUCT_BEGIN
+ #define PACK_STRUCT_STRUCT __attribute__ ((packed))
+ #define PACK_STRUCT_END
+ #define PACK_STRUCT_FIELD(x) x
+#else
+ #error "This compiler does not support."
+#endif
+
+#endif /* _CC_H */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/sam3-specific/arch/perf.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/sam3-specific/arch/perf.h
new file mode 100644
index 0000000..50b06c0
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/sam3-specific/arch/perf.h
@@ -0,0 +1,39 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ *
+ * This file is part of the lwIP TCP/IP stack.
+ *
+ */
+
+#ifndef _PERF_H
+#define _PERF_H
+
+#define PERF_START /* null definition */
+#define PERF_STOP /* null definition */
+
+#endif /* _PERF_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/sam3-specific/arch/sys_arch.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/sam3-specific/arch/sys_arch.c
new file mode 100644
index 0000000..6d2878d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/sam3-specific/arch/sys_arch.c
@@ -0,0 +1,100 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ *
+ * This file is part of the lwIP TCP/IP stack.
+ *
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "board.h"
+#include "sys_arch.h"
+
+/*----------------------------------------------------------------------------
+ * Variables
+ *----------------------------------------------------------------------------*/
+
+/** clock tick count */
+static volatile uint32_t dwClockTick;
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * Interrupt handler for TC0 interrupt.
+ */
+void TC0_IrqHandler( void )
+{
+ volatile uint32_t dwDummy ;
+
+ /* Clear status bit to acknowledge interrupt */
+ dwDummy = TC0->TC_CHANNEL[0].TC_SR ;
+
+ /* Increase tick */
+ dwClockTick ++;
+}
+
+
+/**
+ * Initialize for timing operation
+ */
+void sys_init_timing(void)
+{
+ uint32_t div;
+ uint32_t tcclks;
+
+ /* Clear tick value */
+ dwClockTick = 0;
+
+ /* Enable peripheral clock. */
+ PMC_EnablePeripheral( ID_TC0 ) ;
+
+ /* Configure TC for a CLOCK_CONF_SECOND frequency. */
+ TC_FindMckDivisor( CLOCK_CONF_SECOND, BOARD_MCK, &div, &tcclks, BOARD_MCK ) ;
+ TC_Configure( TC0, 0, tcclks | TC_CMR_CPCTRG ) ;
+ TC0->TC_CHANNEL[0].TC_RC = BOARD_MCK / (CLOCK_CONF_SECOND * div);
+
+ /* Configure and enable interrupt on RC compare */
+ NVIC_EnableIRQ( (IRQn_Type)ID_TC0 ) ;
+ TC0->TC_CHANNEL[ 0 ].TC_IER = TC_IER_CPCS ;
+
+ /* Start timer */
+ TC_Start( TC0, 0 ) ;
+}
+
+/**
+ * Read for clock time (ms)
+ */
+unsigned int sys_get_ms(void)
+{
+ return dwClockTick;
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/sam3-specific/arch/sys_arch.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/sam3-specific/arch/sys_arch.h
new file mode 100644
index 0000000..4a3d95a
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/sam3-specific/arch/sys_arch.h
@@ -0,0 +1,43 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ *
+ * This file is part of the lwIP TCP/IP stack.
+ *
+ */
+
+#ifndef _SYS_ARCH_H
+#define _SYS_ARCH_H
+
+#include <lwip/opt.h>
+
+#define CLOCK_CONF_SECOND 1000
+
+void sys_init_timing(void);
+u32_t sys_get_ms(void);
+
+#endif
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/sam3-specific/emacif.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/sam3-specific/emacif.c
new file mode 100644
index 0000000..2fa1689
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/sam3-specific/emacif.c
@@ -0,0 +1,448 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ *
+ */
+
+/*
+ * This file is a skeleton for developing Ethernet network interface
+ * drivers for lwIP. Add code to the low_level functions and do a
+ * search-and-replace for the word "emacif" to replace it with
+ * something that better describes your network interface.
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "board.h"
+
+#include <string.h>
+
+#include "lwip/opt.h"
+
+#include "emacif.h"
+
+#include "lwip/def.h"
+#include "lwip/mem.h"
+#include "lwip/pbuf.h"
+#include "lwip/sys.h"
+#include "lwip/stats.h"
+#include "netif/etharp.h"
+
+/*----------------------------------------------------------------------------
+ * Definitions
+ *----------------------------------------------------------------------------*/
+
+/* Define those to better describe your network interface. */
+#define IFNAME0 'e'
+#define IFNAME1 'n'
+
+#ifdef __ICCARM__ /* IAR */
+#define __attribute__(...) /* IAR */
+#endif /* IAR */
+
+/* Number of buffer for RX */
+#define RX_BUFFERS 16
+/* Number of buffer for TX */
+#define TX_BUFFERS 8
+
+/*----------------------------------------------------------------------------
+ * Variables
+ *----------------------------------------------------------------------------*/
+
+static struct emacif Emacif_config;
+
+/* The PINs for EMAC */
+static const Pin gEmacPins[] = {BOARD_EMAC_PINS};
+
+/* The EMAC driver instance */
+static sEmacd gEmacd;
+
+/* The MACB driver instance */
+static Macb gMacb;
+
+/* TX descriptors list */
+#ifdef __ICCARM__ /* IAR */
+#pragma data_alignment=8 /* IAR */
+#endif /* IAR */
+static sEmacTxDescriptor gTxDs[TX_BUFFERS];
+/* TX callbacks list */
+static fEmacdTransferCallback gTxCbs[TX_BUFFERS];
+/* RX descriptors list */
+#ifdef __ICCARM__ /* IAR */
+#pragma data_alignment=8 /* IAR */
+#endif /* IAR */
+static sEmacRxDescriptor gRxDs[RX_BUFFERS];
+/* Send Buffer */
+/* Section 3.6 of AMBA 2.0 spec states that burst should not cross 1K Boundaries.
+ Receive buffer manager writes are burst of 2 words => 3 lsb bits of the address
+ shall be set to 0 */
+#ifdef __ICCARM__ /* IAR */
+#pragma data_alignment=8 /* IAR */
+#endif /* IAR */
+static uint8_t gpTxBuffer[TX_BUFFERS * EMAC_TX_UNITSIZE] __attribute__((aligned(8)));
+
+#ifdef __ICCARM__ /* IAR */
+#pragma data_alignment=8 /* IAR */
+#endif /* IAR */
+/* Receive Buffer */
+static uint8_t gpRxBuffer[RX_BUFFERS * EMAC_RX_UNITSIZE] __attribute__((aligned(8)));
+
+/*----------------------------------------------------------------------------
+ * Local functions
+ *----------------------------------------------------------------------------*/
+
+/* Forward declarations. */
+static void emacif_input(struct netif *netif);
+static err_t emacif_output(struct netif *netif, struct pbuf *p,
+ struct ip_addr *ipaddr);
+
+
+static void
+low_level_init(struct netif *netif)
+{
+ struct emacif *emacif = netif->state;
+
+ /* set MAC hardware address length */
+ netif->hwaddr_len = ETHARP_HWADDR_LEN;
+ /* set MAC hardware address */
+ netif->hwaddr[0] = emacif->ethaddr.addr[0];
+ netif->hwaddr[1] = emacif->ethaddr.addr[1];
+ netif->hwaddr[2] = emacif->ethaddr.addr[2];
+ netif->hwaddr[3] = emacif->ethaddr.addr[3];
+ netif->hwaddr[4] = emacif->ethaddr.addr[4];
+ netif->hwaddr[5] = emacif->ethaddr.addr[5];
+ /* maximum transfer unit */
+ netif->mtu = 1500;
+
+ /* device capabilities */
+ netif->flags = NETIF_FLAG_BROADCAST;
+
+ /* Do whatever else is needed to initialize interface. */
+ {
+ sEmacd *pEmacd = &gEmacd;
+ Macb *pMacb = &gMacb;
+ uint32_t dwErrCount = 0 ;
+ volatile uint32_t dwDly;
+
+ /* Reset PHY */
+ RSTC_SetExtResetLength(RSTC, 13); /* (2^(13+1))/32768 */
+ RSTC_ExtReset(RSTC);
+ while(RSTC_GetNrstLevel(RSTC) == 0) {}
+ /* Wait for PHY to be ready (CAT811: Max400ms) */
+ dwDly = BOARD_MCK / 1000 / 3 * 400;
+ while(dwDly--);
+
+ /* Init EMAC driver structure */
+ EMACD_Init(pEmacd, EMAC, ID_EMAC, 0, 0);
+ EMACD_InitTransfer(pEmacd,
+ gpRxBuffer, gRxDs, RX_BUFFERS,
+ gpTxBuffer, gTxDs, gTxCbs, TX_BUFFERS);
+ EMAC_SetAddress(gEmacd.pHw, 0, Emacif_config.ethaddr.addr);
+
+ /* Enable Interrupt */
+ NVIC_EnableIRQ( EMAC_IRQn ) ;
+
+ /* Init MACB driver */
+ MACB_Init(pMacb, pEmacd, BOARD_EMAC_PHY_ADDR);
+
+ /* PHY initialize */
+ if (!MACB_InitPhy(pMacb, BOARD_MCK,
+ gEmacPins, PIO_LISTSIZE(gEmacPins)))
+ {
+ printf( "P: PHY Initialize ERROR!\n\r" ) ;
+ return;
+ }
+
+ /* Auto Negotiate, work in RMII mode */
+ if (!MACB_AutoNegotiate(pMacb, BOARD_EMAC_MODE_RMII))
+ {
+
+ printf( "P: Auto Negotiate ERROR!\n\r" ) ;
+ return;
+ }
+
+ while ( MACB_GetLinkSpeed( pMacb, 1 ) == 0 )
+ {
+ dwErrCount++;
+ }
+ printf( "P: Link detected \n\r" ) ;
+ }
+}
+
+/**
+ * This function should do the actual transmission of the packet. The packet is
+ * contained in the pbuf that is passed to the function. This pbuf
+ * might be chained.
+ *
+ * @param netif the lwip network interface structure for this emacif
+ * @param p the MAC packet to send (e.g. IP packet including MAC addresses and type)
+ * @return ERR_OK if the packet could be sent
+ * an err_t value if the packet couldn't be sent
+ */
+
+static err_t
+low_level_output(struct netif *netif, struct pbuf *p)
+{
+ struct emacif *emacif = netif->state;
+ struct pbuf *q;
+ char buf[1514];
+ char *bufptr = &buf[0];
+ unsigned char rc;
+
+#if ETH_PAD_SIZE
+ pbuf_header(p, -ETH_PAD_SIZE); /* drop the padding word */
+#endif
+
+ for(q = p; q != NULL; q = q->next) {
+ /* Send the data from the pbuf to the interface, one pbuf at a
+ time. The size of the data in each pbuf is kept in the ->len
+ variable. */
+
+ /* send data from(q->payload, q->len); */
+ memcpy(bufptr, q->payload, q->len);
+ bufptr += q->len;
+ }
+
+ /* signal that packet should be sent(); */
+ rc = EMACD_Send(&gEmacd, buf, p->tot_len, NULL);
+ if (rc != EMACD_OK) {
+ return ERR_BUF;
+ }
+
+#if ETH_PAD_SIZE
+ pbuf_header(p, ETH_PAD_SIZE); /* reclaim the padding word */
+#endif
+
+ LINK_STATS_INC(link.xmit);
+
+ return ERR_OK;
+}
+
+/**
+ * Should allocate a pbuf and transfer the bytes of the incoming
+ * packet from the interface into the pbuf.
+ *
+ * @param netif the lwip network interface structure for this emacif
+ * @return a pbuf filled with the received packet (including MAC header)
+ * NULL on memory error
+ */
+static struct pbuf *
+low_level_input(struct netif *netif)
+{
+ struct emacif *emacif = netif->state;
+ struct pbuf *p, *q;
+ u16_t len;
+ unsigned char buf[1514];
+ char *bufptr = &buf[0];
+
+ unsigned int frmlen;
+ unsigned char rc;
+
+ /* Obtain the size of the packet and put it into the "len"
+ variable. */
+ rc = EMACD_Poll(&gEmacd, buf, sizeof(buf), &frmlen);
+ if (rc != EMACD_OK)
+ return NULL;
+
+ len = frmlen;
+
+#if ETH_PAD_SIZE
+ len += ETH_PAD_SIZE; /* allow room for Ethernet padding */
+#endif
+
+ /* We allocate a pbuf chain of pbufs from the pool. */
+ p = pbuf_alloc(PBUF_RAW, len, PBUF_POOL);
+
+ if (p != NULL) {
+
+#if ETH_PAD_SIZE
+ pbuf_header(p, -ETH_PAD_SIZE); /* drop the padding word */
+#endif
+
+ /* We iterate over the pbuf chain until we have read the entire
+ * packet into the pbuf. */
+ for(q = p; q != NULL; q = q->next) {
+ /* Read enough bytes to fill this pbuf in the chain. The
+ * available data in the pbuf is given by the q->len
+ * variable. */
+ /* read data into(q->payload, q->len); */
+ memcpy(q->payload, bufptr, q->len);
+ bufptr += q->len;
+ }
+ /* acknowledge that packet has been read(); */
+
+#if ETH_PAD_SIZE
+ pbuf_header(p, ETH_PAD_SIZE); /* reclaim the padding word */
+#endif
+
+ LINK_STATS_INC(link.recv);
+ } else {
+ /* drop packet(); */
+ LINK_STATS_INC(link.memerr);
+ LINK_STATS_INC(link.drop);
+ }
+
+ return p;
+}
+
+/**
+ * This function is called by the TCP/IP stack when an IP packet
+ * should be sent. It calls the function called low_level_output() to
+ * do the actual transmission of the packet.
+ *
+ */
+
+static err_t
+emacif_output(struct netif *netif, struct pbuf *p,
+ struct ip_addr *ipaddr)
+{
+
+ /* resolve hardware address, then send (or queue) packet */
+ return etharp_output(netif, p, ipaddr);
+}
+
+/**
+ * This function should be called when a packet is ready to be read
+ * from the interface. It uses the function low_level_input() that
+ * should handle the actual reception of bytes from the network
+ * interface. Then the type of the received packet is determined and
+ * the appropriate input function is called.
+ *
+ * @param netif the lwip network interface structure for this emacif
+ */
+
+static void
+emacif_input(struct netif *netif)
+{
+ struct emacif *emacif;
+ struct eth_hdr *ethhdr;
+ struct pbuf *p;
+
+ emacif = netif->state;
+
+ /* move received packet into a new pbuf */
+ p = low_level_input(netif);
+ /* no packet could be read, silently ignore this */
+ if (p == NULL) return;
+ /* points to packet payload, which starts with an Ethernet header */
+ ethhdr = p->payload;
+
+ switch (htons(ethhdr->type)) {
+ /* IP packet? */
+ case ETHTYPE_IP:
+ /* skip Ethernet header */
+ pbuf_header(p, -sizeof(struct eth_hdr));
+ /* pass to network layer */
+ netif->input(p, netif);
+ break;
+
+ case ETHTYPE_ARP:
+ /* pass p to ARP module */
+ etharp_arp_input(netif, &emacif->ethaddr, p);
+ break;
+ default:
+ pbuf_free(p);
+ p = NULL;
+ break;
+ }
+}
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * Emac interrupt handler
+ */
+void EMAC_IrqHandler(void)
+{
+ EMACD_Handler(&gEmacd);
+}
+
+/**
+ * Set the MAC address of the system.
+ * Should only be called before emacif_init is called.
+ * The stack calls emacif_init after the user calls netif_add
+ *
+ */
+
+void
+emacif_setmac(u8_t *addr)
+{
+ Emacif_config.ethaddr.addr[0] = addr[0];
+ Emacif_config.ethaddr.addr[1] = addr[1];
+ Emacif_config.ethaddr.addr[2] = addr[2];
+ Emacif_config.ethaddr.addr[3] = addr[3];
+ Emacif_config.ethaddr.addr[4] = addr[4];
+ Emacif_config.ethaddr.addr[5] = addr[5];
+}
+
+/**
+ * Should be called at the beginning of the program to set up the
+ * network interface. It calls the function low_level_init() to do the
+ * actual setup of the hardware.
+ *
+ */
+
+err_t
+emacif_init(struct netif *netif)
+{
+ struct emacif *emacif;
+
+ emacif = &Emacif_config;
+
+ if (emacif == NULL)
+ {
+ LWIP_DEBUGF(NETIF_DEBUG, ("emacif_init: out of memory\n"));
+ return ERR_MEM;
+ }
+
+ netif->state = emacif;
+ netif->name[0] = IFNAME0;
+ netif->name[1] = IFNAME1;
+ netif->output = emacif_output;
+ netif->linkoutput = low_level_output;
+
+ low_level_init(netif);
+
+ etharp_init();
+
+ return ERR_OK;
+}
+
+/**
+ * Polling task
+ * Should be called periodically
+ *
+ */
+void emacif_poll(struct netif *netif)
+{
+ emacif_input(netif);
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/sam3-specific/emacif.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/sam3-specific/emacif.h
new file mode 100644
index 0000000..f84a3b4
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/sam3-specific/emacif.h
@@ -0,0 +1,63 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ *
+ */
+
+#ifndef _EMACIF_H
+#define _EMACIF_H
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "lwip/netif.h"
+#include "lwip/ip_addr.h"
+#include "lwip/err.h"
+#include "netif/etharp.h"
+
+/*----------------------------------------------------------------------------
+ * Types
+ *----------------------------------------------------------------------------*/
+
+/** Configuration information for emac instance */
+typedef struct emacif {
+
+ struct eth_addr ethaddr;
+
+} Emacif, *PEmacif;
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+void emacif_setmac(u8_t * addr);
+err_t emacif_init(struct netif * netif);
+void emacif_poll(struct netif * netif);
+
+#endif /* _EMACIF_H */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/sam3-specific/lwipopts.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/sam3-specific/lwipopts.h
new file mode 100644
index 0000000..898373a
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/liblwip/sam3-specific/lwipopts.h
@@ -0,0 +1,419 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+#ifndef _LWIPOPTS_H
+#define _LWIPOPTS_H
+
+/*
+ -----------------------------------------------
+ ---------- Platform specific locking ----------
+ -----------------------------------------------
+*/
+
+/**
+ * NO_SYS==1: Provides VERY minimal functionality. Otherwise,
+ * use lwIP facilities.
+ */
+#define NO_SYS 1
+
+
+/*
+ ------------------------------------
+ ---------- Memory options ----------
+ ------------------------------------
+*/
+/**
+ * MEM_LIBC_MALLOC==1: Use malloc/free/realloc provided by your C-library
+ * instead of the lwip internal allocator. Can save code size if you
+ * already use it.
+ */
+#define MEM_LIBC_MALLOC 0
+
+/**
+ * MEM_ALIGNMENT: should be set to the alignment of the CPU
+ * 4 byte alignment -> #define MEM_ALIGNMENT 4
+ * 2 byte alignment -> #define MEM_ALIGNMENT 2
+ */
+#define MEM_ALIGNMENT 4
+
+/**
+ * MEM_SIZE: the size of the heap memory. If the application will send
+ * a lot of data that needs to be copied, this should be set high.
+ */
+#define MEM_SIZE 1600
+
+/**
+ * MEMP_OVERFLOW_CHECK: memp overflow protection reserves a configurable
+ * amount of bytes before and after each memp element in every pool and fills
+ * it with a prominent default value.
+ * MEMP_OVERFLOW_CHECK == 0 no checking
+ * MEMP_OVERFLOW_CHECK == 1 checks each element when it is freed
+ * MEMP_OVERFLOW_CHECK >= 2 checks each element in every pool every time
+ * memp_malloc() or memp_free() is called (useful but slow!)
+ */
+#define MEMP_OVERFLOW_CHECK 0
+
+/**
+ * MEMP_SANITY_CHECK==1: run a sanity check after each memp_free() to make
+ * sure that there are no cycles in the linked lists.
+ */
+#define MEMP_SANITY_CHECK 0
+
+/*
+ ------------------------------------------------
+ ---------- Internal Memory Pool Sizes ----------
+ ------------------------------------------------
+*/
+/**
+ * MEMP_NUM_PBUF: the number of memp struct pbufs (used for PBUF_ROM and PBUF_REF).
+ * If the application sends a lot of data out of ROM (or other static memory),
+ * this should be set high.
+ */
+#define MEMP_NUM_PBUF 4
+
+/**
+ * MEMP_NUM_RAW_PCB: Number of raw connection PCBs
+ * (requires the LWIP_RAW option)
+ */
+#define MEMP_NUM_RAW_PCB 0
+
+/**
+ * MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One
+ * per active UDP "connection".
+ * (requires the LWIP_UDP option)
+ */
+#define MEMP_NUM_UDP_PCB 1
+
+/**
+ * MEMP_NUM_TCP_PCB: the number of simulatenously active TCP connections.
+ * (requires the LWIP_TCP option)
+ */
+#define MEMP_NUM_TCP_PCB 2
+
+/**
+ * MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP connections.
+ * (requires the LWIP_TCP option)
+ */
+#define MEMP_NUM_TCP_PCB_LISTEN 2
+
+/**
+ * MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP segments.
+ * (requires the LWIP_TCP option)
+ */
+#define MEMP_NUM_TCP_SEG 5
+
+/**
+ * MEMP_NUM_SYS_TIMEOUT: the number of simulateously active timeouts.
+ * (requires NO_SYS==0)
+ */
+#define MEMP_NUM_SYS_TIMEOUT 0
+
+/**
+ * MEMP_NUM_NETBUF: the number of struct netbufs.
+ * (only needed if you use the sequential API, like api_lib.c)
+ */
+#define MEMP_NUM_NETBUF 0
+/**
+ * MEMP_NUM_NETCONN: the number of struct netconns.
+ * (only needed if you use the sequential API, like api_lib.c)
+ */
+#define MEMP_NUM_NETCONN 0
+
+/**
+ * PBUF_POOL_SIZE: the number of buffers in the pbuf pool.
+ */
+#define PBUF_POOL_SIZE 6
+
+/* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. */
+#define PBUF_POOL_BUFSIZE 256
+
+/*
+ ---------------------------------
+ ---------- ARP options ----------
+ ---------------------------------
+*/
+/**
+ * LWIP_ARP==1: Enable ARP functionality.
+ */
+#define LWIP_ARP 1
+
+/**
+ * ARP_TABLE_SIZE: Number of active MAC-IP address pairs cached.
+ */
+#define ARP_TABLE_SIZE 2
+
+/**
+ * ARP_QUEUEING==1: Outgoing packets are queued during hardware address
+ * resolution.
+ */
+#define ARP_QUEUEING 0
+
+/*
+ --------------------------------
+ ---------- IP options ----------
+ --------------------------------
+*/
+/**
+ * IP_FORWARD==1: Enables the ability to forward IP packets across network
+ * interfaces. If you are going to run lwIP on a device with only one network
+ * interface, define this to 0.
+ */
+#define IP_FORWARD 0
+
+/**
+ * IP_OPTIONS_ALLOWED: Defines the behavior for IP options.
+ * IP_OPTIONS_ALLOWED==0: All packets with IP options are dropped.
+ * IP_OPTIONS_ALLOWED==1: IP options are allowed (but not parsed).
+ */
+#define IP_OPTIONS_ALLOWED 0
+
+/**
+ * IP_REASSEMBLY==1: Reassemble incoming fragmented IP packets. Note that
+ * this option does not affect outgoing packet sizes, which can be controlled
+ * via IP_FRAG.
+ */
+#define IP_REASSEMBLY 0
+
+/**
+ * IP_FRAG==1: Fragment outgoing IP packets if their size exceeds MTU. Note
+ * that this option does not affect incoming packet sizes, which can be
+ * controlled via IP_REASSEMBLY.
+ */
+#define IP_FRAG 0
+
+/**
+ * IP_REASS_MAXAGE: Maximum time (in multiples of IP_TMR_INTERVAL - so seconds, normally)
+ * a fragmented IP packet waits for all fragments to arrive. If not all fragments arrived
+ * in this time, the whole packet is discarded.
+ */
+#define IP_REASS_MAXAGE 3
+
+/**
+ * IP_REASS_MAX_PBUFS: Total maximum amount of pbufs waiting to be reassembled.
+ * Since the received pbufs are enqueued, be sure to configure
+ * PBUF_POOL_SIZE > IP_REASS_MAX_PBUFS so that the stack is still able to receive
+ * packets even if the maximum amount of fragments is enqueued for reassembly!
+ */
+#define IP_REASS_BUFSIZE 2048
+
+/**
+ * IP_FRAG_MAX_MTU: Assumed max MTU on any interface for IP frag buffer
+ * (requires IP_FRAG_USES_STATIC_BUF==1)
+ */
+#define IP_FRAG_MAX_MTU 1500
+
+/*
+ ----------------------------------
+ ---------- ICMP options ----------
+ ----------------------------------
+*/
+/**
+ * LWIP_ICMP==1: Enable ICMP module inside the IP stack.
+ * Be careful, disable that make your product non-compliant to RFC1122
+ */
+#define LWIP_ICMP 1
+
+/**
+ * ICMP_TTL: Default value for Time-To-Live used by ICMP packets.
+ */
+#define ICMP_TTL (IP_DEFAULT_TTL)
+
+
+/*
+ ---------------------------------
+ ---------- RAW options ----------
+ ---------------------------------
+*/
+/**
+ * LWIP_RAW==1: Enable application layer to hook into the IP layer itself.
+ */
+#define LWIP_RAW 0
+
+/*
+ ----------------------------------
+ ---------- DHCP options ----------
+ ----------------------------------
+*/
+/**
+ * LWIP_DHCP==1: Enable DHCP module.
+ */
+#define LWIP_DHCP 0
+
+/*
+ ----------------------------------
+ ---------- SNMP options ----------
+ ----------------------------------
+*/
+/**
+ * LWIP_SNMP==1: Turn on SNMP module. UDP must be available for SNMP
+ * transport.
+ */
+#define LWIP_SNMP 0
+
+/*
+ ---------------------------------
+ ---------- UDP options ----------
+ ---------------------------------
+*/
+/**
+ * LWIP_UDP==1: Turn on UDP.
+ */
+#define LWIP_UDP 0
+
+/*
+ ---------------------------------
+ ---------- TCP options ----------
+ ---------------------------------
+*/
+/**
+ * LWIP_TCP==1: Turn on TCP.
+ */
+#define LWIP_TCP 1
+
+
+/**
+ * TCP_WND: The size of a TCP window. This must be at least
+ * (2 * TCP_MSS) for things to work well
+ */
+#define TCP_WND 1024
+
+/**
+ * TCP_SYNMAXRTX: Maximum number of retransmissions of SYN segments.
+ */
+#define TCP_SYNMAXRTX 2
+
+/**
+ * TCP_QUEUE_OOSEQ==1: TCP will queue segments that arrive out of order.
+ * Define to 0 if your device is low on memory.
+ */
+#define TCP_QUEUE_OOSEQ 0
+
+/**
+ * TCP_MSS: TCP Maximum segment size. (default is 536, a conservative default,
+ * you might want to increase this.)
+ * For the receive side, this MSS is advertised to the remote side
+ * when opening a connection. For the transmit size, this MSS sets
+ * an upper limit on the MSS advertised by the remote host.
+ */
+#define TCP_MSS 128
+
+/**
+ * TCP_SND_BUF: TCP sender buffer space (bytes).
+ */
+#define TCP_SND_BUF 1536
+
+/**
+ * TCP_SND_QUEUELEN: TCP sender buffer space (pbufs). This must be at least
+ * as much as (2 * TCP_SND_BUF/TCP_MSS) for things to work.
+ */
+#define TCP_SND_QUEUELEN 2 * TCP_SND_BUF/TCP_MSS
+
+/*
+ ------------------------------------
+ ---------- LOOPIF options ----------
+ ------------------------------------
+*/
+/**
+ * LWIP_HAVE_LOOPIF==1: Support loop interface (127.0.0.1) and loopif.c
+ */
+#define LWIP_HAVE_LOOPIF 0
+
+/*
+ ----------------------------------------------
+ ---------- Sequential layer options ----------
+ ----------------------------------------------
+*/
+
+/**
+ * LWIP_NETCONN==1: Enable Netconn API (require to use api_lib.c)
+ */
+#define LWIP_NETCONN 0
+
+/*
+ ------------------------------------
+ ---------- Socket options ----------
+ ------------------------------------
+*/
+/**
+ * LWIP_SOCKET==1: Enable Socket API (require to use sockets.c)
+ */
+#define LWIP_SOCKET 0
+
+
+/*
+ ----------------------------------------
+ ---------- Statistics options ----------
+ ----------------------------------------
+*/
+/**
+ * LWIP_STATS==1: Enable statistics collection in lwip_stats.
+ */
+#define LWIP_STATS 0
+
+/*
+ ---------------------------------------
+ ---------- Debugging options ----------
+ ---------------------------------------
+*/
+
+/**
+ * LWIP_DBG_TYPES_ON: A mask that can be used to globally enable/disable
+ * debug messages of certain types.
+ */
+#define LWIP_DBG_TYPES_ON LWIP_DBG_OFF
+
+/**
+ * TCP_DEBUG: Enable debugging for TCP.
+ */
+#define TCP_DEBUG LWIP_DBG_ON
+
+/**
+ * TCP_INPUT_DEBUG: Enable debugging in tcp_in.c for incoming debug.
+ */
+#define TCP_INPUT_DEBUG LWIP_DBG_ON
+
+/**
+ * TCP_OUTPUT_DEBUG: Enable debugging in tcp_out.c output functions.
+ */
+#define TCP_OUTPUT_DEBUG LWIP_DBG_ON
+
+/*
+ ---------------------------------------
+ ---------- Misc ----------
+ ---------------------------------------
+*/
+
+/* No assert */
+#define LWIP_NOASSERT
+
+/* No error output */
+#define LWIP_ERROR(message, expression, handler)
+
+#endif /* #ifndef _LWIPOPTS_H */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libqtouch/License.txt b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libqtouch/License.txt
new file mode 100644
index 0000000..388494e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libqtouch/License.txt
@@ -0,0 +1,30 @@
+LIMITED LICENSE AGREEMENT
+
+You ("Customer" or "You") must read this Limited License Agreement (this "Agreement") carefully and thoroughly before downloading, installing, and/or using any software or content ("Software") provided herewith. BY DOWNLOADING, INSTALLING AND/OR USING ANY SOFTWARE, YOU ARE CONFIRMING YOUR ACCEPTANCE OF THE TERMS OF THIS AGREEMENT. IF YOU DO NOT AGREE TO BE BOUND BY THE TERMS OF THIS AGREEMENT, THEN DO NOT DOWNLOAD, INSTALL/COMPLETE INSTALLATION OF, OR USE THE SOFTWARE.
+
+1. Grant of License. Subject to the terms and conditions of this Agreement, Atmel grants Customer a non-exclusive, nontransferable, non-sublicensable, limited license: (a) to internally use the Software as a development platform for Company’s own software and/or hardware product ("Customer Product") solely in connection with an Atmel microcontroller product ("Atmel Product"), (b) to reproduce the Software only as necessary to implement such Software in Customer Product that incorporates or is bundled with an Atmel Product ("Integrated Product"); and (c) to distribute the Software (in object code version only) solely as part of the Integrated Product. Any and all distribution of the Software by Customer permitted under this Agreement shall be pursuant to a binding end user agreement no less protective of Atmel than this Agreement. Customer shall not use the Software for any purpose other than as specifically authorized herein. Except as specifically authorized herein, Customer shall take all necessary steps to protect the Software against disclosure to third parties. The Software may contain the copyrighted information of Atmel. Customer may not reproduce, transmit or otherwise copy the Software by any means for any purpose not set forth in this Agreement, without the prior written permission of Atmel. All rights not expressly granted to Customer herein are reserved to Atmel.
+
+2. Title. As between the parties, Atmel retains full rights, title, and ownership including all patents, copyrights, trade secrets, trade names, trademarks, and other intellectual property rights in and to the Software. Customer agrees to take all reasonable steps to prevent unauthorized disclosure of the Software.
+
+3. No Other Rights. Except as expressly stated herein, this Agreement does not grant Customer, by implication, estoppels or otherwise, any rights to patents, copyrights, trade secrets, trade names, trademarks (whether registered or unregistered), or any other rights, franchises, or licenses in respect of the Software. Customer may not modify, translate, disassemble, reverse engineer or decompile the Software or any copy, in whole or in part. Atmel will not provide any support or maintenance for the Software. Company will be solely responsible for supporting its customers, including resellers and end users
+
+4. Warranty Disclaimer and No Support. ATMEL IS PROVIDING THE SOFTWARE TO CUSTOMER "AS IS", "WITH ALL FAULTS", AND WITH NO WARRANTY WHATSOEVER. ATMEL MAKES NO WARRANTY THAT THE DELIVERY OF SOFTWARE IS COMPLETE, VERIFIED, OR VALIDATED. ATMEL IS MAKING NO REPRESENTATION THAT THE SOFTWARE IS FREE FROM ANY CLAIMS OF INFRINGEMENT, AND CUSTOMER IS RESPONSIBLE FOR OBTAINING ANY RIGHTS CUSTOMER MAY REQUIRE FOR CUSTOMER’S IMPLEMENTATION. ATMEL MAKES NO WARRANTY WHATSOEVER, EXPRESS, IMPLIED, STATUTORY, CONTRACTUAL OR OTHERWISE WITH RESPECT TO THE SOFTWARE, AND EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE OR NON-INFRINGEMENT AND ANY WARRANTIES ARISING BY VIRTUE OF CUSTOM OF TRADE OR COURSE OF DEALING. Atmel is not obligated to furnish or make available to Customer any further information, software, technical information, know-how, show-how, bug-fixes, or support. Atmel reserves the right to make changes to the Software without further notice.
+
+5. Notice and Protection. Customer shall not remove or destroy any trademark, copyright markings, legends or notices placed upon or contained within the Software or any related documentation.
+
+6. Export. Customer acknowledges that the certain laws and regulations may restrict the export and re-export of the Software. Customer will not export or re-export any Software (including the diskettes, related documentation and/or any hardware peripherals) in any form without the appropriate United States and foreign governmental approval.
+
+7. Termination. The license will automatically terminate if Customer fails to comply with any of the terms and conditions of the license. Upon termination for any reason, Customer will immediately destroy or return to Atmel the Software, including all documentation and all whole or partial copies of the Software.
+
+8. LIMITATION OF LIABILITY. IN NO EVENT SHALL ATMEL BE LIABLE TO CUSTOMER OR ANY THIRD PARTY FOR ANY CONSEQUENTIAL, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES ARISING OUT OF OR RELATING TO THE SOFTWARE OR ANY OTHER ASPECT OF THIS AGREEMENT, EVEN IF ATMEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. IN NO EVENT SHALL THE LIABILITY OF ATMEL ARISING OUT OF OR RELATING TO THIS AGREEMENT EXCEED THE GREATER OF ONE THOUSAND U.S. DOLLARS (US$1,000) OR THE PRICE PAID BY COMPANY TO ATMEL FOR THE SOFTWARE.
+
+9. General. Customer will indemnify, defend and otherwise hold Atmel harmless against any third party claims, losses, damages, liability or expenses (including attorneys’ and other professionals’ fees) incurred by Atmel arising out of or relating to Customer’s use of the Software. This Agreement and all transactions concluded hereunder shall be governed by the laws of the State of California, as such laws are applied to contracts entered into and performed entirely in California by California residents. Any litigation relating to this Agreement shall be subject to the exclusive jurisdiction of the state courts located in Santa Clara County, California, or the federal courts located in the Northern District of California. If any provision of this Agreement is held to be invalid, illegal or unenforceable, that provision shall be construed in such a manner that it becomes valid and enforceable and so as to reflect most closely the intent of the parties in agreeing upon the provision in the first place, and the remaining provisions of this Agreement shall continue in full force and effect and shall not in any way be affected or impaired by any such determination of invalidity, illegality or unenforceability.
+
+THIS AGREEMENT IS THE ENTIRE AND EXCLUSIVE AGREEMENT BETWEEN ATMEL AND CUSTOMER AND SUPERSEDES ALL PRIOR ORAL AND WRITTEN AGREEMENTS AND COMMUNICATIONS BETWEEN THE PARTIES PERTAINING TO THE SUBJECT MATTER OF THIS AGREEMENT. NO DIFFERENT OR ADDITIONAL TERMS WILL BE ENFORCEABLE AGAINST ATMEL UNLESS ATMEL GIVES ITS EXPRESS WRITTEN CONSENT, INCLUDING AN EXPRESS WAIVER OF THE TERMS OF THIS AGREEMENT.
+
+
+Atmel Corporation and its subsidiaries
+2325 Orchard Parkway
+San Jose, CA 95131
+http://www.atmel.com
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libqtouch/include/touch_api.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libqtouch/include/touch_api.h
new file mode 100644
index 0000000..414816f
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libqtouch/include/touch_api.h
@@ -0,0 +1,1057 @@
+/*******************************************************************************
+* Atmel Corporation: http://www.atmel.com
+* Support email: touch@atmel.com
+******************************************************************************/
+/* License
+* Copyright (c) 2010, Atmel Corporation All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* 1. Redistributions of source code must retain the above copyright notice,
+* this list of conditions and the following disclaimer.
+*
+* 2. Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following disclaimer in the documentation
+* and/or other materials provided with the distribution.
+*
+* 3. The name of ATMEL may not be used to endorse or promote products derived
+* from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND
+* SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,
+* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+
+#ifndef TOUCH_API_H
+#define TOUCH_API_H
+
+/*----------------------------------------------------------------------------
+ nested include files
+----------------------------------------------------------------------------*/
+#if defined (__GNUC__) || defined (__ICCARM__) ||defined (__CC_ARM)
+ #include <stdint.h>
+#endif
+
+#if !defined (__CC_ARM)
+ #include <stdbool.h>
+#endif
+#include <stdlib.h>
+#ifndef MAKE_BUILD
+ #ifdef _QMATRIX_
+ #include "touch_qm_config.h"
+ #elif defined _QTOUCH_
+ #if !(defined(__AVR32__) || defined(__ICCAVR32__))
+ #include "touch_qt_config.h"
+ #endif
+ #else
+ #error /* please provide any one of the acquisition methods*/
+ #endif
+#endif
+
+#ifdef __ICCAVR__
+ #include <intrinsics.h>
+#endif /* (__ICCAVR__) */
+
+
+/*----------------------------------------------------------------------------
+ Note: choice of library version
+------------------------------------------------------------------------------
+QTouch libraries are supplied built with a range of charge times.
+Charge time is the duration in which charge is transferred from the AVR onto
+the measurement capacitor. Shorter charge times result in faster measurements,
+but may be too fast to completely transfer charge onto the measurement
+capacitor.
+
+The range of charge times lets the user choose a suitable version for the clock
+rate their chip is running at.
+
+To make capacitive measurements, a charge time on the order of 0.25us to 2.5us
+is typically required. The following table shows the charge times corresponding
+to a range of clock speeds.
+
+Clock speed (MHz) Cycle time (us) Suitable charge times
+----------------- --------------- ---------------------
+ 1 1 1~2 cycles (1us to 2us)
+ 2 0.5 1~5 cycles (0.5us to 2.5us)
+ 4 0.25 1~10 cycles (0.25us to 2.5us)
+ 8 0.125 2~10 cycles (0.25us to 1.25us)
+ 10 0.1 3~25 cycles (0.3us to 2.5us)
+ 16 0.0625 4~25 cycles (0.25us to 1.5625s)
+ 20 0.05 5~50 cycles (0.25us to 2.5us)
+
+----------------------------------------------------------------------------*/
+
+/* *********Error Checking For the User Configuration Options Start********** */
+#ifdef _QMATRIX_
+
+/*
+* Info stored for each x line.
+*
+* For each X line, enter the port and pin it is on.
+* For instance, if X3 is on PB1, the 4th entry would be
+* FILL_OUT_X_LINE_INFO( 1,1 ), and PORT_X_1 is B
+*/
+#define FILL_OUT_X_LINE_INFO( port_num,x_bit ) {JOIN(burst_qm_, port_num) ,(uint8_t)( 1u << x_bit ), BURST_MASK_X_PORT_ ## port_num }
+
+/*
+* Info stored for each y line.
+*
+* For each Y line, enter the pin it is on.
+* For instance, if Y2 is on PA5 and PF5, the 3th entry would be
+* FILL_OUT_Y_LINE_INFO( 5 )
+* NOTE: 1. The PORTs for YA and YB on which Y lines are going to
+* be needs to be defined as PORT_YA and PORT_YB.
+*
+* Example: PORT_YA=A and PORT_YB=F in the case above.
+*/
+#define FILL_OUT_Y_LINE_INFO( bit ) { bit, (uint8_t)(1u<<bit) }
+
+//FWRAP: #define FILL_OUT_YA_LINE_INFO( bit ) { bit, (uint8_t)(1u<<bit) }
+//FWRAP: #define FILL_OUT_YB_LINE_INFO( bit ) { bit, (uint8_t)(1u<<bit) }
+
+
+#ifndef MAKE_BUILD
+
+/* Check necessary definitions */
+#if (NUM_X_PORTS==1)
+ #if !defined(PORT_X_1) || !defined(PORT_YA) || !defined(PORT_YB) || !defined(QT_DELAY_CYCLES) || !defined(PORT_SMP) || !defined(SMP_BIT)
+ #error Need to define PORT_X_1, PORT_YA,PORT_YB,PORT_SMP,SMP_BIT and QT_DELAY_CYCLES before including the header file.
+ #endif
+#elif(NUM_X_PORTS==2)
+ #if !defined(PORT_X_1)||!defined(PORT_X_2) || !defined(PORT_YA) || !defined(PORT_YB) || !defined(QT_DELAY_CYCLES) || !defined(PORT_SMP) || !defined(SMP_BIT)
+ #error Need to define PORT_X_1,PORT_X_2, PORT_YA,PORT_YB,PORT_SMP,SMP_BIT and QT_DELAY_CYCLES before including the header file.
+ #endif
+#elif(NUM_X_PORTS==3)
+ #if !defined(PORT_X_1)||!defined(PORT_X_2) ||!defined(PORT_X_3)|| !defined(PORT_YA) || !defined(PORT_YB) || !defined(QT_DELAY_CYCLES) || !defined(PORT_SMP) || !defined(SMP_BIT)
+ #error Need to define PORT_X_1,PORT_X_2,PORT_X_3, PORT_YA,PORT_YB,PORT_SMP,SMP_BIT and QT_DELAY_CYCLES before including the header file.
+ #endif
+#endif
+ #ifdef _ROTOR_SLIDER_
+ #if (QT_NUM_CHANNELS == 4u)
+ #if !(QT_MAX_NUM_ROTORS_SLIDERS == 1u)
+ #error QT_MAX_NUM_ROTORS_SLIDERS should be define as 1
+ #endif
+ #elif (QT_NUM_CHANNELS == 8u)
+ #if !(QT_MAX_NUM_ROTORS_SLIDERS == 2u)
+ #error QT_MAX_NUM_ROTORS_SLIDERS should be define as 2
+ #endif
+ #elif (QT_NUM_CHANNELS == 16u)
+ #if !((QT_MAX_NUM_ROTORS_SLIDERS == 2u) || (QT_MAX_NUM_ROTORS_SLIDERS == 4u))
+ #error QT_MAX_NUM_ROTORS_SLIDERS should be define as 2 or 4 based on library selected
+ #endif
+ #elif (QT_NUM_CHANNELS == 32u)
+ #if !(QT_MAX_NUM_ROTORS_SLIDERS == 4u)
+ #error QT_MAX_NUM_ROTORS_SLIDERS should be define as 4 based on library selected
+ #endif
+ #elif (QT_NUM_CHANNELS == 64u)
+ #if !((QT_MAX_NUM_ROTORS_SLIDERS == 4u) || (QT_MAX_NUM_ROTORS_SLIDERS == 8u))
+ #error QT_MAX_NUM_ROTORS_SLIDERS should be define as 4 or 8 based on library selected
+ #endif
+ #endif
+ #else
+ #if !(QT_MAX_NUM_ROTORS_SLIDERS == 0u)
+ #error QT_MAX_NUM_ROTORS_SLIDERS should be define as 0 Or _ROTOR_SLIDER_ Macro Needs to be define
+ #endif
+ #endif
+
+#endif /*MAKE_BUILD*/
+
+#endif/*_QMATRIX_*/
+/* ******************************Error Checking For the User Configuration Options End ***************** */
+
+/* Total ticks per msec. */
+/*
+* TICKS_PER_MS = (CLK_FREQ/TIMER_PRESCALER)*(1/1000)
+*
+*/
+
+#define TICKS_PER_MS 500u
+
+/* Initialization values for the Qtouch library parameters. */
+/*
+* Sensor detect integration (DI) limit.
+* Default value: 4.
+*/
+#define DEF_QT_DI 4u
+
+/*
+* Sensor negative drift rate.
+*
+* Units: 200ms
+* Default value: 20 (4 seconds per LSB).
+*/
+#define DEF_QT_NEG_DRIFT_RATE 20 /* 4s per LSB */
+
+/*
+* Sensor positive drift rate.
+*
+* Units: 200ms
+* Default value: 5 (1 second per LSB).
+*/
+#define DEF_QT_POS_DRIFT_RATE 5 /* 1s per LSB */
+
+/*
+* Sensor drift hold time.
+*
+* Units: 200ms
+* Default value: 20 (hold off drifting for 4 seconds after leaving detect).
+*/
+#define DEF_QT_DRIFT_HOLD_TIME 20 /* 4s */
+
+/*
+* Sensor maximum on duration.
+*
+* Units: 200ms (e.g., 150 = recalibrate after 30s). 0 = no recalibration.
+* Default value: 0 (recalibration disabled).
+*/
+#define DEF_QT_MAX_ON_DURATION 0 /* disabled */
+
+/*
+* Sensor recalibration threshold.
+*
+* Default: RECAL_50 (recalibration threshold = 50% of detection threshold).
+*/
+#define DEF_QT_RECAL_THRESHOLD RECAL_50 /* recal threshold = 50% of detect */
+
+/*
+* Positive recalibration delay.
+*
+* Default: 3
+*/
+#define DEF_QT_POS_RECAL_DELAY 3u
+
+/*--------------------------------------------------------------------------
+----------------------------------------------------------------------------
+----------------------------------------------------------------------------
+ WARNING! Do not edit below this line.
+----------------------------------------------------------------------------
+----------------------------------------------------------------------------
+----------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------
+ macros
+----------------------------------------------------------------------------*/
+/* utility macro for expanding port registers */
+#define JOIN( x, y ) x ## y
+#define JOIN1( A, B, C ) A ## B ## C
+
+/* Macro to build register writes for controlling ports. The intermediate
+* JOIN macro is required for correct expansion of the args. */
+#define REG( REGISTER, SIDE ) JOIN( REGISTER, SIDE )
+#define CONCAT( A, B, C ) JOIN1( A, B, C )
+
+/* The number of bytes required to report the maximum possible number of
+* sensors. */
+#define QT_NUM_SENSOR_STATE_BYTES ( ( QT_NUM_CHANNELS + 7u ) / 8u )
+
+/* Status flags used with debug */
+/* indicating no activity */
+#define QTLIB_NO_ACTIVITY (uint16_t) 0x0000
+/* indicating that at least one sensor is in detect */
+#define QTLIB_IN_DETECT (uint16_t) 0x0001
+/* indicating that at least one sensor haschanged ON/OFF state since last call to measure_sensors */
+#define QTLIB_STATUS_CHANGE (uint16_t) 0x0002
+/* indicating that at least one rotor slider has changed position since last call to measure_sensors */
+#define QTLIB_ROTOR_SLIDER_POS_CHANGE (uint16_t) 0x0004
+/* indicating that at least one reference value has changed since last call to measure_sensors */
+#define QTLIB_CHANNEL_REF_CHANGE (uint16_t) 0x0008
+/* indicating that reburst is needed to resolve in FILTERIN or FILTEROUT or RECALIBRATE state. */
+#define QTLIB_BURST_AGAIN (uint16_t) 0x0100
+/* indicating that reburst is needed to resolve in CALIBRATION */
+#define QTLIB_RESOLVE_CAL (uint16_t) 0x0200
+/* indicating that reburst is needed to resolve in FILTERING */
+#define QTLIB_RESOLVE_FILTERIN (uint16_t) 0x0400
+/* indicating that reburst is needed to resolve in RECAL */
+#define QTLIB_RESOLVE_DI (uint16_t) 0x0800
+/* indicating that reburst is needed to resolve in RECAL */
+#define QTLIB_RESOLVE_POS_RECAL (uint16_t) 0x1000
+
+/*----------------------------------------------------------------------------
+ type definitions
+----------------------------------------------------------------------------*/
+#if defined (__ICCAVR__) || defined (__ICCAVR32__)
+ /* An signed 8-bit value. */
+ typedef signed char int8_t;
+ /* An unsigned 8-bit value. */
+ typedef unsigned char uint8_t;
+ /* An unsigned 16-bit value. */
+ typedef unsigned short uint16_t;
+ /* A signed 16-bit value. */
+ typedef short int16_t;
+ /* An unsigned 32-bit value. */
+ typedef unsigned long uint32_t;
+#endif
+
+/* This part of the code below is used for library selection. This code will not be documented. */
+/****************************************************************************************************/
+#ifdef _QTOUCH_
+
+
+ #ifdef QTOUCH_STUDIO_MASKS
+ #define CALCULATE_MASKS NULL
+ #else
+ #define CALCULATE_MASKS calc_masks
+ #endif
+
+ #if defined (__AVR32__) || defined (__ICCAVR32__) || defined (_TOUCH_ARM_)
+
+ #if (QT_NUM_CHANNELS <= 8u && QT_NUM_CHANNELS != 0u)
+ #define TOUCH_DATA_T uint8_t
+ #elif (QT_NUM_CHANNELS > 8u && QT_NUM_CHANNELS <= 16u)
+ #define TOUCH_DATA_T uint16_t
+ #elif (QT_NUM_CHANNELS > 16u && QT_NUM_CHANNELS <= 32u)
+ #define TOUCH_DATA_T uint32_t
+ #else
+ #error 'The number of channels specified is not supported.'
+ #endif
+ #else
+ #define TOUCH_DATA_T uint8_t
+ #endif
+
+ #ifndef MAKE_BUILD
+ #if !(defined(__AVR32__) || defined(__ICCAVR32__)) || defined(_TOUCH_ARM_)
+ #if (QT_NUM_CHANNELS == 16u)
+ #ifndef _STATIC_PORT_PIN_CONF_
+ #define _STATIC_PORT_PIN_CONF_
+ #define QTOUCH_SNS_PORT_COUNT 2u
+ #endif
+ #else
+ #ifdef INTRABURST_1
+ #ifndef _STATIC_PORT_PIN_CONF_
+ #define _STATIC_PORT_PIN_CONF_
+ #define QTOUCH_SNS_PORT_COUNT 1u
+ #endif
+ #endif
+ #ifndef SNS1
+ #define SNS1 SNS
+ #endif
+ #ifndef SNSK1
+ #define SNSK1 SNSK
+ #endif
+ #endif
+ #else
+ #ifdef INTRABURST_1
+ #ifndef _STATIC_PORT_PIN_CONF_
+ #define _STATIC_PORT_PIN_CONF_
+ #define QTOUCH_SNS_PORT_COUNT 1u
+ #endif
+ #define SNS1 SNS
+ #define SNSK1 SNSK
+ #endif
+ #endif
+ #ifdef _ROTOR_SLIDER_
+ #if !defined(QT_MAX_NUM_ROTORS_SLIDERS)
+ #if (QT_NUM_CHANNELS == 4)
+ #define QT_MAX_NUM_ROTORS_SLIDERS 1
+ #elif (QT_NUM_CHANNELS == 8)
+ #define QT_MAX_NUM_ROTORS_SLIDERS 2
+ #elif (QT_NUM_CHANNELS == 12)
+ #define QT_MAX_NUM_ROTORS_SLIDERS 3
+ #elif (QT_NUM_CHANNELS == 16)
+ #define QT_MAX_NUM_ROTORS_SLIDERS 4
+ #elif (QT_NUM_CHANNELS == 32)
+ #define QT_MAX_NUM_ROTORS_SLIDERS 8
+ #endif
+ #endif
+ #else
+ #define QT_MAX_NUM_ROTORS_SLIDERS 0
+ #endif
+ #endif
+
+ #if !(defined(__AVR32__) || defined(__ICCAVR32__) || defined(_TOUCH_ARM_))
+ /* Macros for string concatenation. */
+ //#define JOIN3( a, b, c, d, e ) burst_ ## a ## _ ## b ## _ ## c ## d ## _ ## e
+ #define JOIN4( a, b, c, d, e , f ) burst_ ## a ## _ ## b ## _ ## c ## d ## _ ## e ##_ ## f
+ //#define BURST_JOIN( static_flag, num_ports, intra1, intra2, pow_opt ) JOIN3( static_flag, num_ports, intra1, intra2, pow_opt )
+ #define BURST_JOIN( static_flag, num_ports, intra1, intra2, pow_opt, qtouch_pin_conf ) JOIN4( static_flag, num_ports, intra1, intra2, pow_opt, qtouch_pin_conf )
+
+ /* Build pointer to correct burst function */
+ #define BURST_FUNC_NAME BURST_JOIN( _STATIC_PORT_PIN_CONF_, QTOUCH_SNS_PORT_COUNT, INTRABURST_1, INTRABURST_2, _POWER_OPTIMIZATION_, QTOUCH_PIN_CONF )
+ //#define BURST_FUNC_NAME BURST_JOIN( _STATIC_PORT_PIN_CONF_, QTOUCH_SNS_PORT_COUNT, INTRABURST_1, INTRABURST_2, _POWER_OPTIMIZATION_ )
+
+
+ /* Burst function prototype. The code itself is stored in the touch library */
+ extern void BURST_FUNC_NAME( TOUCH_DATA_T mask_index );
+
+ /* Function pointer used for bursting */
+ extern void (*burst_proc)( TOUCH_DATA_T mask_index );
+
+ #else
+ #ifndef _STATIC_PORT_PIN_CONF_
+
+ /* Select SNS and SNSK port. Choosing the same port for both will
+ configure intra-port bursting. Options are B,C, and D. */
+ #define QT_SNS_PORT SNS
+ #define QT_SNSK_PORT SNSK
+
+ /* Check necessary definitions */
+ #if !defined(QT_SNS_PORT) || !defined(QT_SNSK_PORT) || !defined(QT_DELAY_CYCLES)
+ #error Need to define QT_SNS_PORT, QT_SNSK_PORT, and QT_DELAY_CYCLES before including this header file.
+ #endif
+
+ /* Macros for string concatenation. */
+ #define JOIN3( a, b, c ) burst_ ## a ## _ ## b ## c
+ #define BURST_JOIN( cycles, snsk, sns ) JOIN3( cycles, snsk, sns )
+
+ /* Build pointer to correct burst function */
+ #define BURST_FUNC_NAME BURST_JOIN( QT_DELAY_CYCLES, QT_SNSK_PORT , QT_SNS_PORT)
+
+ #else
+
+ /* static port pin configurability declarations */
+
+ #if (QTOUCH_SNS_PORT_COUNT > 0u)
+ /* first SNS - SNSK port pin pairing. */
+ #define QT_SNS1_PORT SNS1
+ #define QT_SNSK1_PORT SNSK1
+
+ #if !defined(QT_SNS1_PORT) || !defined(QT_SNSK1_PORT) || !defined(QT_DELAY_CYCLES) || !defined(QT_NUM_CHANNELS) || \
+ !defined(QT_MAX_NUM_ROTORS_SLIDERS)
+ #error Need to define QT_SNS1_PORT, QT_SNSK1_PORT, QT_DELAY_CYCLES, QT_NUM_CHANNELS and QT_MAX_NUM_ROTORS_SLIDERS before including this header file.
+ #endif
+ #endif
+
+ #if (QTOUCH_SNS_PORT_COUNT > 1u) && !defined(_TOUCH_ARM_)
+ #error 'Maximum of only 1 SNS-SNSK port pairings are supported by the UC3 libraries.'
+ #elif (QTOUCH_SNS_PORT_COUNT == 0u)
+ #error 'Invalid QTOUCH_SNS_PORT_COUNT value.'
+ #endif /* QTOUCH_SNS_PORT_COUNT */
+
+ #if (QTOUCH_SNS_PORT_COUNT > 1u)
+ /* second SNS - SNSK port pin pairing. */
+ #define QT_SNS2_PORT SNS2
+ #define QT_SNSK2_PORT SNSK2
+
+ #if !defined(QT_SNS2_PORT) || !defined(QT_SNSK2_PORT) || !defined(QT_DELAY_CYCLES) || !defined(QT_NUM_CHANNELS) || \
+ !defined(QT_MAX_NUM_ROTORS_SLIDERS)
+ #error Need to define QT_SNS2_PORT, QT_SNSK2_PORT, QT_DELAY_CYCLES, QT_NUM_CHANNELS and QT_MAX_NUM_ROTORS_SLIDERS before including this header file.
+ #endif
+ #endif
+
+ #if (QTOUCH_SNS_PORT_COUNT == 1u)
+
+ /* Macros for string concatenation */
+ #define JOIN3( a, b, c, d, z ) burst_ ## a ## _ ## b ## c
+ #define BURST_JOIN( cycles, snsk1, sns1, ch, rs ) JOIN3( cycles, snsk1, sns1, ch, rs )
+
+ /* Build pointer to correct burst function */
+ #define BURST_FUNC_NAME BURST_JOIN( QT_DELAY_CYCLES, QT_SNSK1_PORT , QT_SNS1_PORT, QT_NUM_CHANNELS, \
+ QT_MAX_NUM_ROTORS_SLIDERS)
+
+ #elif (QTOUCH_SNS_PORT_COUNT == 2u)
+#if defined(_TOUCH_ARM_)
+ /* Macros for string concatenation. */
+ #define JOIN3( a, b, c, e, f, d, z ) burst_ ## a ## _ ## b ## c ## _ ## e ## f
+ #define BURST_JOIN( cycles, snsk1, sns1, snsk2, sns2, ch, rs ) JOIN3( cycles, snsk1, sns1, snsk2, sns2, ch, rs )
+
+ /* Build pointer to correct burst function */
+ #define BURST_FUNC_NAME BURST_JOIN( QT_DELAY_CYCLES, QT_SNSK1_PORT , QT_SNS1_PORT, QT_SNSK2_PORT , QT_SNS2_PORT, QT_NUM_CHANNELS, \
+ QT_MAX_NUM_ROTORS_SLIDERS)
+#endif
+ #else
+ #error 'Invalid QTOUCH_SNS_PORT_COUNT value.'
+ #endif
+
+ #endif
+
+ /* Burst function prototype. The code itself is stored in the touch library */
+ extern void BURST_FUNC_NAME( TOUCH_DATA_T mask_index );
+
+ /* Function pointer used for bursting */
+ extern void (*burst_proc)( TOUCH_DATA_T mask_index);
+ #endif
+
+#endif
+
+/****************************************************************************************************/
+
+/********************************************QMATRIX Start*************************************************/
+
+#ifdef _QMATRIX_
+
+ #ifdef __AVR32__
+ #define TOUCH_DATA_T uint32_t
+ #else
+ #define TOUCH_DATA_T uint8_t
+ #endif
+
+ /* Macros for string concatenation. */
+ #define BURST_JOIN(A,B) JOIN(A,B)
+ #if (NUM_X_PORTS ==1)
+ #define BURST_FUNC_1 BURST_JOIN(burst_qm_,PORT_NUM_1)
+ extern void BURST_FUNC_1 (uint8_t channel, TOUCH_DATA_T x_mask);
+ #elif (NUM_X_PORTS ==2)
+ #define BURST_FUNC_1 BURST_JOIN(burst_qm_,PORT_NUM_1)
+ extern void BURST_FUNC_1 (uint8_t channel, TOUCH_DATA_T x_mask);
+ #define BURST_FUNC_2 BURST_JOIN(burst_qm_,PORT_NUM_2)
+ extern void BURST_FUNC_2 (uint8_t channel, TOUCH_DATA_T x_mask);
+ #elif (NUM_X_PORTS ==3)
+ #define BURST_FUNC_1 BURST_JOIN(burst_qm_,PORT_NUM_1)
+ extern void BURST_FUNC_1(uint8_t channel, TOUCH_DATA_T x_mask);
+ #define BURST_FUNC_2 BURST_JOIN(burst_qm_,PORT_NUM_2)
+ extern void BURST_FUNC_2(uint8_t channel, TOUCH_DATA_T x_mask);
+ #define BURST_FUNC_3 BURST_JOIN(burst_qm_,PORT_NUM_3)
+ extern void BURST_FUNC_3(uint8_t channel, TOUCH_DATA_T x_mask);
+ #endif
+
+ /* Function pointer used for bursting */
+ extern void (*burst_proc_qm)( uint8_t channel, TOUCH_DATA_T drive_mask );
+
+ /* pointer to function to be called for a channel */
+ typedef void (*PF_CHANNEL)( uint8_t channel );
+
+ /* pointer to function returning void */
+ typedef void (*PFV)( uint8_t channel, uint8_t line_mask );
+
+ /* info stored for each x line */
+ typedef struct tag_x_line_info_t
+ {
+ /* ptr to function to burst on this line */
+ PFV p_burst_function;
+
+ /* bit mask for driving/clamping this x line */
+ uint8_t mask;
+
+ /* index into array of burst masks */
+ uint8_t burst_mask_array_index;
+
+ } x_line_info_t;
+
+ /* info stored for each y line */
+ typedef struct tag_y_line_info_t
+ {
+ /* which bit this y line is on */
+ uint8_t bit;
+ /* mask for y line*/
+ uint8_t mask;
+
+ } y_line_info_t;
+
+ /* enumeration of recognised burst masks */
+ typedef enum tag_burst_mask_t
+ {
+ BURST_MASK_YA, /*mask for ya lines*/
+ BURST_MASK_YB, /*mask for yb lines*/
+ BURST_MASK_X_PORT_1, /*mask for x lines on port1*/
+ BURST_MASK_X_PORT_2, /*mask for x lines on port2*/
+ BURST_MASK_X_PORT_3, /*mask for x lines on port3*/
+ NUM_BURST_MASKS /*Total number of masks*/
+
+ } burst_mask_t;
+
+ /*
+ * The burst length on each QMatrix channel.
+ *
+ * Units: pulses
+ * Default value: 64 pulses
+ */
+ extern uint8_t qt_burst_lengths[QT_NUM_CHANNELS];
+
+#endif /* _QMATRIX_ */
+
+/********************************************QMATRIX End **************************************************/
+
+/* An unsigned 8-bit number setting a sensor detection threshold. */
+typedef uint8_t threshold_t;
+
+/* Options for the sensor types available. */
+typedef enum tag_sensor_type_t
+{
+ SENSOR_TYPE_UNASSIGNED,
+ SENSOR_TYPE_KEY,
+ SENSOR_TYPE_ROTOR,
+ SENSOR_TYPE_SLIDER
+} sensor_type_t;
+
+/* Which AKS group, if any, a sensor is in.
+*
+* NO_AKS_GROUP = sensor is not in an AKS group, and cannot be suppressed.
+* AKS_GROUP_x = sensor is in AKS group x. */
+typedef enum tag_aks_group_t
+{
+ NO_AKS_GROUP,
+ AKS_GROUP_1,
+ AKS_GROUP_2,
+ AKS_GROUP_3,
+ AKS_GROUP_4,
+ AKS_GROUP_5,
+ AKS_GROUP_6,
+ AKS_GROUP_7
+} aks_group_t;
+
+/* The channel(s) in a sensor. */
+typedef enum tag_channel_t
+{
+#if (QT_NUM_CHANNELS > 0u)
+ CHANNEL_0,
+ CHANNEL_1,
+ CHANNEL_2,
+ CHANNEL_3
+#endif
+#if (QT_NUM_CHANNELS > 4u)
+ ,CHANNEL_4,
+ CHANNEL_5,
+ CHANNEL_6,
+ CHANNEL_7
+#endif
+#if (QT_NUM_CHANNELS > 8u)
+ ,CHANNEL_8,
+ CHANNEL_9,
+ CHANNEL_10,
+ CHANNEL_11
+#endif
+#if (QT_NUM_CHANNELS > 12u)
+ ,CHANNEL_12,
+ CHANNEL_13,
+ CHANNEL_14,
+ CHANNEL_15
+#endif
+#if (QT_NUM_CHANNELS > 16u)
+ ,CHANNEL_16,
+ CHANNEL_17,
+ CHANNEL_18,
+ CHANNEL_19,
+ CHANNEL_20,
+ CHANNEL_21,
+ CHANNEL_22,
+ CHANNEL_23
+#endif
+#if (QT_NUM_CHANNELS > 24u)
+ ,CHANNEL_24,
+ CHANNEL_25,
+ CHANNEL_26,
+ CHANNEL_27,
+ CHANNEL_28,
+ CHANNEL_29,
+ CHANNEL_30,
+ CHANNEL_31
+#endif
+#if (QT_NUM_CHANNELS > 32u)
+ ,CHANNEL_32,
+ CHANNEL_33,
+ CHANNEL_34,
+ CHANNEL_35,
+ CHANNEL_36,
+ CHANNEL_37,
+ CHANNEL_38,
+ CHANNEL_39,
+ CHANNEL_40,
+ CHANNEL_41,
+ CHANNEL_42,
+ CHANNEL_43,
+ CHANNEL_44,
+ CHANNEL_45,
+ CHANNEL_46,
+ CHANNEL_47,
+ CHANNEL_48,
+ CHANNEL_49,
+ CHANNEL_50,
+ CHANNEL_51,
+ CHANNEL_52,
+ CHANNEL_53,
+ CHANNEL_54,
+ CHANNEL_55
+#endif
+#if (QT_NUM_CHANNELS > 56u)
+ ,CHANNEL_56,
+ CHANNEL_57,
+ CHANNEL_58,
+ CHANNEL_59,
+ CHANNEL_60,
+ CHANNEL_61,
+ CHANNEL_62,
+ CHANNEL_63
+#endif
+} channel_t;
+
+/* A sensor detection hysteresis value. This is expressed as a percentage of
+* the sensor detection threshold.
+*
+* HYST_x = hysteresis value is x% of detection threshold value (rounded down).
+* NB: a minimum value of 2 is used.
+*
+* Example: if detection threshold = 20, then:
+* HYST_50 = 10 (50% of 20)
+* HYST_25 = 5 (25% of 20)
+* HYST_12_5 = 2 (12.5% of 20)
+* HYST_6_25 = 2 (6.25% of 20 = 1, but value is hardlimited to 2) */
+typedef enum tag_hysteresis_t
+{
+ HYST_50,
+ HYST_25,
+ HYST_12_5,
+ HYST_6_25
+} hysteresis_t;
+
+/* For rotors and sliders, the resolution of the reported angle or position.
+*
+* RES_x_BIT = rotor/slider reports x-bit values.
+*
+* Example: if slider resolution is RES_7_BIT, then reported positions are in
+* the range 0..127. */
+typedef enum tag_resolution_t
+{
+ RES_1_BIT,
+ RES_2_BIT,
+ RES_3_BIT,
+ RES_4_BIT,
+ RES_5_BIT,
+ RES_6_BIT,
+ RES_7_BIT,
+ RES_8_BIT
+} resolution_t;
+
+/* A sensor recalibration threshold. This is expressed as a percentage of the
+* sensor detection threshold.
+*
+* RECAL_x = recalibration threshold is x% of detection threshold value
+* (rounded down).
+* NB: a minimum value of 4 is used.
+*
+* Example: if detection threshold = 40, then:
+* RECAL_100 = 40 (100% of 40)
+* RECAL_50 = 20 (50% of 40)
+* RECAL_25 = 10 (25% of 40)
+* RECAL_12_5 = 5 (12.5% of 40)
+* RECAL_6_25 = 4 (6.25% of 40 = 2, but value is hardlimited to 4) */
+typedef enum tag_recal_threshold_t
+{
+ RECAL_100,
+ RECAL_50,
+ RECAL_25,
+ RECAL_12_5,
+ RECAL_6_25
+} recal_threshold_t;
+
+/* The state of the library sensors. */
+typedef struct tag_qt_touch_status_t
+{
+ /* The state (on/off) of the library sensors.
+ * Bit 'n' = state of sensor 'n'.
+ * Bit 0 = sensor_states[0] bit 0
+ * Bit 1 = sensor_states[0] bit 1
+ * ...
+ * Bit 7 = sensor_states[0] bit 7
+ * Bit 8 = sensor_states[1] bit 0
+ * Bit 9 = sensor_states[1] bit 1
+ * ... etc
+ * 0 = not in detect, 1 = in detect.*/
+ uint8_t sensor_states[QT_NUM_SENSOR_STATE_BYTES];
+ /* Rotor angles or slider positions.
+ * These values are valid when sensor_states shows that the corresponding
+ * rotor or slider sensor is in detect.*/
+ uint8_t rotor_slider_values[QT_MAX_NUM_ROTORS_SLIDERS];
+} qt_touch_status_t;
+
+
+/* post processing configuration data that is received from the debug interface. */
+typedef struct tag_qt_touch_lib_config_data_t
+{
+ /* Sensor recalibration threshold. */
+ recal_threshold_t qt_recal_threshold;
+ /* Sensor detect integration (DI) limit. */
+ uint8_t qt_di;
+ /* Sensor drift hold time. */
+ uint8_t qt_drift_hold_time;
+ /* Sensor maximum on duration. */
+ uint8_t qt_max_on_duration;
+ /* Sensor negative drift rate. */
+ uint8_t qt_neg_drift_rate;
+ /* Sensor positive drift rate. */
+ uint8_t qt_pos_drift_rate;
+ /* Positive recalibration delay. */
+ uint8_t qt_pos_recal_delay;
+} qt_touch_lib_config_data_t;
+
+/* measured touch data that is sent for the debugging and fine tunning. */
+typedef struct tag_qt_touch_lib_measure_data_t
+{
+ /* measured signal on each channel */
+ uint16_t channel_signals[QT_NUM_CHANNELS];
+ /* reference signal for each channel */
+ uint16_t channel_references[QT_NUM_CHANNELS];
+ /* state of sensors */
+ qt_touch_status_t qt_touch_status;
+} qt_touch_lib_measure_data_t;
+
+/* This will be used to get the library information from the library */
+typedef struct qt_lib_sig_info_t
+{
+ uint16_t lib_sig_lword;
+ uint16_t lib_sig_hword;
+ uint16_t library_version;
+}qt_lib_siginfo_t;
+
+
+typedef struct tag_sensor_t
+{
+ /* sensor state (calibrating, on, ...) */
+ uint8_t state;
+
+ /* general purpose ctr: used for calibration, drifting, etc */
+ uint8_t general_counter;
+
+ /* DI ctr */
+ uint8_t ndil_counter;
+
+ /* sensor detection threshold */
+ uint8_t threshold;
+
+ /*
+ * sensor type, AKS group, positive recal flag, and hysteresis value
+ * bits 7..6: sensor type: 00: key
+ * 01: rotor
+ * 10: slider
+ * 11: reserved
+ * bits 5..3: AKS group (0..7): 0 = no AKS group
+ * bit 2 : positive recal flag
+ * bits 1..0: hysteresis
+ */
+ uint8_t type_aks_pos_hyst;
+
+ /*
+ * sensor from and to channels
+ * keys: from channel = to channel
+ * rotors/sliders run between the from and to channels
+ * NB: only need to_channel for keys in rotors/sliders build
+ */
+ uint8_t from_channel;
+
+#ifdef _ROTOR_SLIDER_
+ uint8_t to_channel;
+
+ /* index into array of rotor/slider values */
+ uint8_t index;
+#endif /* _ROTOR_SLIDER_ */
+
+} sensor_t;
+
+/*----------------------------------------------------------------------------
+ extern variables
+----------------------------------------------------------------------------*/
+/* This configuration data structure parameters if needs to be changed will be
+ changed in the qt_set_parameters function */
+extern qt_touch_lib_config_data_t qt_config_data;
+/* measurement data */
+extern qt_touch_lib_measure_data_t qt_measure_data;
+/* Get sensor delta values */
+extern int16_t qt_get_sensor_delta( uint8_t sensor);
+/* variable holding the status flags */
+extern uint16_t lib_status_flags;
+/* the library sensors */
+extern sensor_t sensors[QT_NUM_CHANNELS];
+/* timer period in msec */
+extern uint16_t qt_measurement_period_msec;
+
+
+/*This function is called after the library has made capacitive measurements,
+* but before it has processed them. The user can use this hook to apply filter
+* functions to the measured signal values. */
+extern void (*qt_filter_callback)( void );
+
+/*============================================================================
+Name : qt_get_library_sig
+------------------------------------------------------------------------------
+Purpose : Get the library signature
+Input : qt_lib_siginfo_t * lib_sig_ptr=Pointer to the library signature structure
+Output : n/a
+Notes : This API would provide the information of the
+ library and fill into the structure
+============================================================================*/
+
+extern void qt_get_library_sig(qt_lib_siginfo_t * lib_sig_ptr);
+
+/*============================================================================
+Name : qt_enable_key
+------------------------------------------------------------------------------
+Purpose : enable a key sensor
+Input : channel = which touch channel the key sensor uses
+ aks_group = which AKS group (if any) the sensor is in
+ detect_threshold = the sensor detection threshold
+ detect_hysteresis = the sensor detection hysteresis value
+Output : n/a
+Notes : The sensor number corresponding to the key depends on the order in
+ which sensors are enabled. The first sensor enabled is sensor 0, the
+ second is sensor 1, and so on.
+
+ The current state of the key (on or off) can be checked in
+ qt_touch_status.sensor_states.
+============================================================================*/
+extern void qt_enable_key( channel_t channel,
+ aks_group_t aks_group,
+ threshold_t detect_threshold,
+ hysteresis_t detect_hysteresis );
+
+/*============================================================================
+Name : qt_init_sensing
+------------------------------------------------------------------------------
+Purpose : initialise touch sensing
+Input : n/a
+Output : n/a
+Notes : Any sensors required must be enabled (using qt_enable_xxx()) before
+ calling this function.
+
+ This function calculates internal library variables and configures
+ the touch channels, and must be called before qt_measure_sensors().
+============================================================================*/
+#if defined( _QTOUCH_ )
+
+ #define qt_init_sensing( ) qt_init_sensing_with_burst( BURST_FUNC_NAME ,CALCULATE_MASKS)
+ extern void qt_init_sensing_with_burst(void (*burst_function)(TOUCH_DATA_T mask_index), void (*calculate_masks)(void));
+ extern void calc_masks(void);
+#elif defined( _QMATRIX_ )
+
+ #define qt_init_sensing( ) qt_init_sensing_with_burst( )
+ extern void qt_init_sensing_with_burst( );
+
+#endif
+
+
+/*============================================================================
+Name : qt_measure_sensors
+------------------------------------------------------------------------------
+Purpose : measure touch sensors
+Input : current_time_ms = the current time, in ms
+Output : outputs the library status bits
+Notes : This function performs a capacitive measurement on all enabled
+ sensors. The measured signals for each sensor are then processed to
+ check for user touches, releases, changes in rotor angle, changes in
+ slider position, etc.
+
+ The current state of all enabled sensors is reported in the
+ qt_touch_status struct.
+
+ Before calling this function, one or more sensors must have been
+ enabled (using qt_enable_xxx()), and qt_init_sensing() must
+ have been called.
+============================================================================*/
+extern uint16_t qt_measure_sensors( uint16_t current_time_ms );
+
+
+/*============================================================================
+Name : qt_calibrate_sensing
+------------------------------------------------------------------------------
+Purpose : calibrate touch sensing
+Input : n/a
+Output : n/a
+Notes : This function forces a calibration of all enabled sensors.
+
+ This may be useful if, for instance, it is desired to globally
+ recalibrate all sensors on a change in application operating mode.
+============================================================================*/
+extern void qt_calibrate_sensing( void );
+
+
+/*============================================================================
+Name : qt_reset_sensing
+------------------------------------------------------------------------------
+Purpose : reset touch sensing
+Input : n/a
+Output : n/a
+Notes : This function disables all enabled sensors, and returns all library
+ variables (e.g., qt_di) to their default values.
+
+ This may be useful if it is desired to dynamically reconfigure
+ sensing. After calling this function, any required sensors must be
+ re-enabled, and qt_init_sensing() must be called before
+ qt_measure_channels() is called again.
+============================================================================*/
+extern void qt_reset_sensing( void );
+
+/*============================================================================
+Name : qt_get_sensor_delta
+------------------------------------------------------------------------------
+Purpose : get the current delta on the specified sensor
+Input : sensor = sensor number for which to get the delta
+Output : returns the delta on the specified sensor
+Notes : This function is supplied as a functional replacement for the
+ sensor_deltas[] array provided in earlier library versions.
+============================================================================*/
+extern int16_t qt_get_sensor_delta( uint8_t sensor );
+
+#ifdef _ROTOR_SLIDER_
+
+/*============================================================================
+Name : qt_enable_rotor
+------------------------------------------------------------------------------
+Purpose : enable a rotor sensor
+Input : from_channel = the first channel in the rotor sensor
+ to_channel = the last channel in the rotor sensor
+ aks_group = which AKS group (if any) the sensor is in
+ detect_threshold = the sensor detection threshold
+ detect_hysteresis = the sensor detection hysteresis value
+ angle_resolution = the resolution of the reported angle value
+ angle_hysteresis = the hysteresis of the reported angle value
+Output : n/a
+Notes : The sensor number corresponding to the rotor depends on the order in
+ which sensors are enabled. The first sensor enabled is sensor 0, the
+ second is sensor 1, and so on.
+
+ The current state of the rotor (on or off) can be checked in
+ qt_touch_status.sensor_states.
+
+ The rotor value is in qt_touch_status.rotor_slider_values[]. Which
+ array element is used depends on the order in which sensors are
+ enabled. The first rotor or slider enabled will use
+ rotor_slider_values[0], the second will use rotor_slider_values[1],
+ and so on.
+
+ The reported rotor value is valid when the rotor is on.
+============================================================================*/
+extern void qt_enable_rotor( channel_t from_channel,
+ channel_t to_channel,
+ aks_group_t aks_group,
+ threshold_t detect_threshold,
+ hysteresis_t detect_hysteresis,
+ resolution_t angle_resolution,
+ uint8_t angle_hysteresis );
+
+/*============================================================================
+Name : qt_enable_slider
+------------------------------------------------------------------------------
+Purpose : enable a slider sensor
+Input : from_channel = the first channel in the slider sensor
+ to_channel = the last channel in the slider sensor
+ aks_group = which AKS group (if any) the sensor is in
+ detect_threshold = the sensor detection threshold
+ detect_hysteresis = the sensor detection hysteresis value
+ position_resolution = the resolution of the reported position value
+ position_hysteresis = the hysteresis of the reported position value
+Output : n/a
+Notes : The sensor number corresponding to the slider depends on the order in
+ which sensors are enabled. The first sensor enabled is sensor 0, the
+ second is sensor 1, and so on.
+
+ The current state of the slider (on or off) can be checked in
+ qt_touch_status.sensor_states.
+
+ The slider value is in qt_touch_status.rotor_slider_values[]. Which
+ array element is used depends on the order in which sensors are
+ enabled. The first rotor or slider enabled will use
+ rotor_slider_values[0], the second will use rotor_slider_values[1],
+ and so on.
+
+ The reported slider value is valid when the rotor is on.
+============================================================================*/
+extern void qt_enable_slider( channel_t from_channel,
+ channel_t to_channel,
+ aks_group_t aks_group,
+ threshold_t detect_threshold,
+ hysteresis_t detect_hysteresis,
+ resolution_t position_resolution,
+ uint8_t position_hysteresis );
+
+#endif
+
+
+#endif /* TOUCH_API_H */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libqtouch/include/touch_qt_config.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libqtouch/include/touch_qt_config.h
new file mode 100644
index 0000000..5589738
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libqtouch/include/touch_qt_config.h
@@ -0,0 +1,124 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+#ifndef _TOUCH_QT_CONFIG_ARM_H_
+#define _TOUCH_QT_CONFIG_ARM_H_
+
+/*
+ * Default configuration for SAM3S-EK board
+ */
+
+#define _TOUCH_ARM_
+
+/*
+* Number of Channels(dependent on the library used).Please refer to the user guide
+* more information on selecting the number of channels.
+*
+* Possible values: 32.
+*/
+#ifndef QT_NUM_CHANNELS
+ #define QT_NUM_CHANNELS 32
+#endif
+
+/*
+* Delay cycles that determine the capacitance charge pulse width.
+*
+* Possible values: 3,4,5,10,25,50
+*/
+#ifndef QT_DELAY_CYCLES
+ #define QT_DELAY_CYCLES 3
+#endif
+
+/*
+* Enabling the _ROTOR_SLIDER_ constant will link the library need for using rotors
+* and sliders.
+*
+* Possible values: comment/uncomment the define
+*/
+#ifndef _ROTOR_SLIDER_
+ #define _ROTOR_SLIDER_
+#endif
+
+/*
+* Define the ports to be used for SNS1 and SNSK1 pins. SNS1 and SNSK1 port pins
+* can be available on the same port or on different ports
+*
+* Possible values: refer to the device data sheet and QTouch libraries user guide.
+*/
+#ifndef SNS1
+ #error SNS1 should be defined
+#endif
+#ifndef SNSK1
+ #error SNSK1 should be defined
+#endif
+
+/*
+* Define the ports to be used for SNS2 and SNSK2 pins. SNS2 and SNSK2 port pins
+* can be available on the same port or on different ports
+*
+* Possible values: refer to the device data sheet and QTouch libraries user guide.
+*/
+/* Should be defined if required */
+
+/**************************************************************/
+/* Please do not change any part of the code below this line. */
+/**************************************************************/
+#if (QT_DELAY_CYCLES == 0)
+#error 'QT_DELAY_CYCLES can only have values in the range 1-255.'
+#endif
+
+#define _STATIC_PORT_PIN_CONF_ 1
+
+#ifdef _SNS2_SNSK2_SAME_PORT_
+ #define QTOUCH_SNS_PORT_COUNT 2
+#else
+ #define QTOUCH_SNS_PORT_COUNT 1
+#endif
+
+#ifdef _SNS1_SNSK1_SAME_PORT_
+ #define INTRABURST_1 1
+#else
+ #define INTRABURST_1 0
+#endif
+
+#ifdef _SNS2_SNSK2_SAME_PORT_
+ #define INTRABURST_2 1
+#else
+ #define INTRABURST_2 0
+#endif
+
+
+#ifndef _DEBUG_INTERFACE_
+ //#define _DEBUG_INTERFACE_
+#endif
+#ifndef _QTOUCH_
+ #define _QTOUCH_
+#endif
+
+#endif //_TOUCH_QT_CONFIG_ARM_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libqtouch/libqtouch.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libqtouch/libqtouch.h
new file mode 100644
index 0000000..e726699
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libqtouch/libqtouch.h
@@ -0,0 +1,46 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+#ifndef _LIB_QTOUCH_
+#define _LIB_QTOUCH_
+
+
+#define _QTOUCH_
+#define SNS1 F
+#define SNSK1 F
+#define SNS2 E
+#define SNSK2 E
+#define _SNS1_SNSK1_SAME_PORT_
+#define _SNS2_SNSK2_SAME_PORT_
+
+
+
+#include "include/touch_api.h"
+
+#endif // _LIB_QTOUCH_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libuip/sam3-specific/clock-arch.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libuip/sam3-specific/clock-arch.c
new file mode 100644
index 0000000..7cfd66d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libuip/sam3-specific/clock-arch.c
@@ -0,0 +1,99 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "board.h"
+#include "clock-arch.h"
+
+/*----------------------------------------------------------------------------
+ * Variables
+ *----------------------------------------------------------------------------*/
+
+/** clock tick count */
+static volatile uint32_t dwClockTick;
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+void clock_init(void);
+clock_time_t clock_time( void );
+
+/**
+ * Interrupt handler for TC0 interrupt.
+ */
+void TC0_IrqHandler( void )
+{
+ volatile uint32_t dwDummy ;
+
+ /* Clear status bit to acknowledge interrupt */
+ dwDummy = TC0->TC_CHANNEL[0].TC_SR ;
+
+ /* Increase tick */
+ dwClockTick ++;
+}
+
+
+/**
+ * Initialize for timing operation
+ */
+void clock_init(void)
+{
+ uint32_t div;
+ uint32_t tcclks;
+
+ /* Clear tick value */
+ dwClockTick = 0;
+
+ /* Enable peripheral clock. */
+ PMC_EnablePeripheral( ID_TC0 ) ;
+
+ /* Configure TC for a CLOCK_CONF_SECOND frequency. */
+ TC_FindMckDivisor( CLOCK_CONF_SECOND, BOARD_MCK, &div, &tcclks, BOARD_MCK ) ;
+ TC_Configure( TC0, 0, tcclks | TC_CMR_CPCTRG ) ;
+ TC0->TC_CHANNEL[0].TC_RC = BOARD_MCK / (CLOCK_CONF_SECOND * div);
+
+ /* Configure and enable interrupt on RC compare */
+ NVIC_EnableIRQ( (IRQn_Type)ID_TC0 ) ;
+ TC0->TC_CHANNEL[ 0 ].TC_IER = TC_IER_CPCS ;
+
+ /* Start timer */
+ TC_Start( TC0, 0 ) ;
+}
+
+/**
+ * Read for clock time (ms)
+ */
+clock_time_t clock_time( void )
+{
+ return dwClockTick;
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libuip/sam3-specific/clock-arch.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libuip/sam3-specific/clock-arch.h
new file mode 100644
index 0000000..5e76500
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libuip/sam3-specific/clock-arch.h
@@ -0,0 +1,36 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+#ifndef __CLOCK_ARCH_H__
+#define __CLOCK_ARCH_H__
+
+typedef int clock_time_t;
+#define CLOCK_CONF_SECOND 1000
+
+#endif /* __CLOCK_ARCH_H__ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libuip/sam3-specific/tapdev.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libuip/sam3-specific/tapdev.c
new file mode 100644
index 0000000..140561d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libuip/sam3-specific/tapdev.c
@@ -0,0 +1,208 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "board.h"
+
+#include "uip.h"
+#include "uip_arp.h"
+
+#include "tapdev.h"
+
+/*----------------------------------------------------------------------------
+ * Definitions
+ *----------------------------------------------------------------------------*/
+
+#ifdef __ICCARM__ /* IAR */
+#define __attribute__(...) /* IAR */
+#endif /* IAR */
+
+/* Number of buffer for RX */
+#define RX_BUFFERS 16
+/* Number of buffer for TX */
+#define TX_BUFFERS 8
+
+/*----------------------------------------------------------------------------
+ * Variables
+ *----------------------------------------------------------------------------*/
+
+/* The PINs for EMAC */
+static const Pin gEmacPins[] = {BOARD_EMAC_PINS};
+
+/* The EMAC driver instance */
+static sEmacd gEmacd;
+
+/* The MACB driver instance */
+static Macb gMacb;
+
+/* TX descriptors list */
+#ifdef __ICCARM__ /* IAR */
+#pragma data_alignment=8 /* IAR */
+#endif /* IAR */
+static sEmacTxDescriptor gTxDs[TX_BUFFERS];
+/* TX callbacks list */
+static fEmacdTransferCallback gTxCbs[TX_BUFFERS];
+/* RX descriptors list */
+#ifdef __ICCARM__ /* IAR */
+#pragma data_alignment=8 /* IAR */
+#endif /* IAR */
+static sEmacRxDescriptor gRxDs[RX_BUFFERS];
+/* Send Buffer */
+/* Section 3.6 of AMBA 2.0 spec states that burst should not cross 1K Boundaries.
+ Receive buffer manager writes are burst of 2 words => 3 lsb bits of the address
+ shall be set to 0 */
+#ifdef __ICCARM__ /* IAR */
+#pragma data_alignment=8 /* IAR */
+#endif /* IAR */
+static uint8_t gpTxBuffer[TX_BUFFERS * EMAC_TX_UNITSIZE] __attribute__((aligned(8)));
+
+#ifdef __ICCARM__ /* IAR */
+#pragma data_alignment=8 /* IAR */
+#endif /* IAR */
+/* Receive Buffer */
+static uint8_t gpRxBuffer[RX_BUFFERS * EMAC_RX_UNITSIZE] __attribute__((aligned(8)));
+
+/* MAC address used for demo */
+uint8_t gMacAddress[6] = {0x00, 0x45, 0x56, 0x78, 0x9a, 0xbc};
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * Emac interrupt handler
+ */
+void EMAC_IrqHandler(void)
+{
+ EMACD_Handler(&gEmacd);
+}
+
+/**
+ * Set the MAC address of the system.
+ * Should only be called before tapdev_init is called.
+ */
+void tapdev_setmac(u8_t *addr)
+{
+ gMacAddress[0] = addr[0];
+ gMacAddress[1] = addr[1];
+ gMacAddress[2] = addr[2];
+ gMacAddress[3] = addr[3];
+ gMacAddress[4] = addr[4];
+ gMacAddress[5] = addr[5];
+}
+
+/**
+ * Initialization for EMAC device.
+ * Should be called at the beginning of the program to set up the
+ * network interface.
+ */
+void tapdev_init(void)
+{
+ sEmacd *pEmacd = &gEmacd;
+ Macb *pMacb = &gMacb;
+ uint32_t dwErrCount = 0 ;
+ volatile uint32_t dwDly;
+
+ /* Reset PHY */
+ RSTC_SetExtResetLength(RSTC, 13); /* (2^(13+1))/32768 */
+ RSTC_ExtReset(RSTC);
+ while(RSTC_GetNrstLevel(RSTC) == 0) {}
+ /* Wait for PHY to be ready (CAT811: Max400ms) */
+ dwDly = BOARD_MCK / 1000 / 3 * 400;
+ while(dwDly--);
+
+ /* Init EMAC driver structure */
+ EMACD_Init(pEmacd, EMAC, ID_EMAC, 0, 0);
+ EMACD_InitTransfer(pEmacd,
+ gpRxBuffer, gRxDs, RX_BUFFERS,
+ gpTxBuffer, gTxDs, gTxCbs, TX_BUFFERS);
+ EMAC_SetAddress(gEmacd.pHw, 0, gMacAddress);
+
+ /* Enable Interrupt */
+ NVIC_EnableIRQ( EMAC_IRQn ) ;
+
+ /* Init MACB driver */
+ MACB_Init(pMacb, pEmacd, BOARD_EMAC_PHY_ADDR);
+
+ /* PHY initialize */
+ if (!MACB_InitPhy(pMacb, BOARD_MCK,
+ gEmacPins, PIO_LISTSIZE(gEmacPins)))
+ {
+ printf( "P: PHY Initialize ERROR!\n\r" ) ;
+ return;
+ }
+
+ /* Auto Negotiate, work in RMII mode */
+ if (!MACB_AutoNegotiate(pMacb, BOARD_EMAC_MODE_RMII))
+ {
+
+ printf( "P: Auto Negotiate ERROR!\n\r" ) ;
+ return;
+ }
+
+ while ( MACB_GetLinkSpeed( pMacb, 1 ) == 0 )
+ {
+ dwErrCount++;
+ }
+ printf( "P: Link detected \n\r" ) ;
+}
+
+/**
+ * Read for EMAC device.
+ */
+unsigned int tapdev_read( void )
+{
+ unsigned int pkt_len = 0 ;
+
+ if ( EMACD_OK != EMACD_Poll( &gEmacd, (unsigned char*)uip_buf, UIP_CONF_BUFFER_SIZE, &pkt_len) )
+ {
+ pkt_len = 0 ;
+ }
+
+ return pkt_len ;
+}
+
+/**
+ * Send to EMAC device
+ */
+void tapdev_send( void )
+{
+ unsigned char emac_rc ;
+
+ emac_rc = EMACD_Send( &gEmacd, (void*)uip_buf, uip_len, NULL) ;
+
+ if ( emac_rc != EMACD_OK )
+ {
+ TRACE_ERROR( "E: Send, rc 0x%x\n\r", emac_rc ) ;
+ }
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libuip/sam3-specific/tapdev.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libuip/sam3-specific/tapdev.h
new file mode 100644
index 0000000..f69f516
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/libuip/sam3-specific/tapdev.h
@@ -0,0 +1,38 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+#ifndef __TAPDEV_H__
+#define __TAPDEV_H__
+
+void tapdev_setmac(u8_t *addr);
+void tapdev_init(void);
+unsigned int tapdev_read(void);
+void tapdev_send(void);
+
+#endif /* __TAPDEV_H__ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/MEDDdram.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/MEDDdram.c
new file mode 100644
index 0000000..33109f0
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/MEDDdram.c
@@ -0,0 +1,290 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+ * \file
+ *
+ * Implementation of media layer for the DDRAM.
+ *
+ */
+
+/*------------------------------------------------------------------------------
+ * Headers
+ *-----------------------------------------------------------------------------*/
+
+#include "memories.h"
+
+#if defined(AT91C_BASE_DDR2C) || defined(AT91C_BASE_SDDRC)
+
+#if defined(AT91C_DDR2)
+#define AT91C_BASE_ADDRESS_DDR AT91C_DDR2
+#endif
+
+#if defined(AT91C_EBI_DDRAM)
+#define AT91C_BASE_ADDRESS_DDR AT91C_EBI_DDRAM
+#endif
+
+/*------------------------------------------------------------------------------
+ * Types
+ *------------------------------------------------------------------------------*/
+
+/// Do copy and modify pointer
+typedef void copyFunction(uint8_t **, uint8_t **, uint32_t);
+
+/*------------------------------------------------------------------------------
+ * Internal Functions
+ *------------------------------------------------------------------------------*/
+
+/**
+ * Do copy for 8-byte aligned data
+ */
+static void AlignedCopy(uint8_t * *src,
+ uint8_t * *dst,
+ uint32_t len)
+{
+ uint32_t *src32, *dst32;
+ src32 = (uint32_t*)*src;
+ dst32 = (uint32_t*)*dst;
+ for (;len > 0; len -= 8) {
+ *dst32 ++ = *src32 ++;
+ *dst32 ++ = *src32 ++;
+ }
+ *src = (uint8_t*)src32;
+ *dst = (uint8_t*)dst32;
+}
+
+/**
+ * Do copy for byte-aligned data
+ */
+static void UnalignedCopy(uint8_t * *src,
+ uint8_t * *dst,
+ uint32_t len)
+{
+ for (;len > 0; len --) {
+ *(*dst) ++ = *(*src) ++;
+ }
+}
+
+/**
+ * \brief Reads a specified amount of data from a DDRAM memory
+ * \param media Pointer to a Media instance
+ * \param address Address of the data to read
+ * \param data Pointer to the buffer in which to store the retrieved
+ * data
+ * \param length Length of the buffer
+ * \param callback Optional pointer to a callback function to invoke when
+ * the operation is finished
+ * \param argument Optional pointer to an argument for the callback
+ * \return Operation result code
+ */
+static uint8_t MEDDdram_Read(Media *media,
+ uint32_t address,
+ void *data,
+ uint32_t length,
+ MediaCallback callback,
+ void *argument)
+{
+ uint8_t *source;
+ uint8_t *dest;
+ copyFunction *pCpy;
+
+ // Check that the media is ready
+ if (media->state != MED_STATE_READY) {
+
+ TRACE_INFO("Media busy\n\r");
+ return MED_STATUS_BUSY;
+ }
+
+ // Check that the data to read is not too big
+ if ((length + address) > media->size) {
+
+ TRACE_WARNING("MEDDdram_Read: Data too big: %u, 0x%08X\n\r",
+ length, address);
+ return MED_STATUS_ERROR;
+ }
+
+ // Enter Busy state
+ media->state = MED_STATE_BUSY;
+
+ // Source & Destination
+ source = (uint8_t *)(media->blockSize
+ * (address + media->baseAddress));
+ dest = (uint8_t *)data;
+
+ // Align/Unaligned copy
+ pCpy = (((uint32_t)source%4) == 0 && (media->blockSize%8) == 0)
+ ? AlignedCopy : UnalignedCopy;
+
+ for (; length > 0; length --) {
+ pCpy(&source, &dest, media->blockSize);
+ }
+
+ // Leave the Busy state
+ media->state = MED_STATE_READY;
+
+ // Invoke callback
+ if (callback != 0) {
+
+ callback(argument, MED_STATUS_SUCCESS, 0, 0);
+ }
+
+ return MED_STATUS_SUCCESS;
+}
+
+/*------------------------------------------------------------------------------
+ * \brief Writes data on a DDRAM media
+ * \param media Pointer to a Media instance
+ * \param address Address at which to write
+ * \param data Pointer to the data to write
+ * \param length Size of the data buffer
+ * \param callback Optional pointer to a callback function to invoke when
+ * the write operation terminates
+ * \param argument Optional argument for the callback function
+ * \return Operation result code
+ * \see Media
+ * \see MediaCallback
+ */
+static uint8_t MEDDdram_Write(Media *media,
+ uint32_t address,
+ void *data,
+ uint32_t length,
+ MediaCallback callback,
+ void *argument)
+{
+ uint8_t *source;
+ uint8_t *dest;
+ copyFunction *pCpy;
+
+ //TRACE_DEBUG("MEDDdram_Write\n\r");
+
+ // Check that the media if ready
+ if (media->state != MED_STATE_READY) {
+
+ TRACE_INFO("MEDDdram_Write: Busy\n\r");
+ return MED_STATUS_BUSY;
+ }
+
+ // Check that the data to write is not too big
+ if ((length + address) > media->size) {
+
+ TRACE_WARNING("MEDDdram_Write: Data too big\n\r");
+ return MED_STATUS_ERROR;
+ }
+
+ // Put the media in Busy state
+ media->state = MED_STATE_BUSY;
+
+ // Compute function parameters
+ source = (uint8_t *) data;
+ dest = (uint8_t *) (media->blockSize *
+ (media->baseAddress + address));
+
+ // Align/Unaligned copy
+ pCpy = (((uint32_t)source%4) == 0 && (media->blockSize%8) == 0)
+ ? AlignedCopy : UnalignedCopy;
+
+ for (; length > 0; length --) {
+ pCpy(&source, &dest, media->blockSize);
+ }
+
+ // Leave the Busy state
+ media->state = MED_STATE_READY;
+
+ // Invoke the callback if it exists
+ if (callback != 0) {
+
+ callback(argument, MED_STATUS_SUCCESS, 0, 0);
+ }
+
+ return MED_STATUS_SUCCESS;
+}
+
+/*------------------------------------------------------------------------------
+ * Exported Functions
+ *------------------------------------------------------------------------------*/
+/**
+ *\brief Initializes a Media instance and the associated physical interface
+ *\param media Pointer to the Media instance to initialize
+ *\param blockSize Block size of the media, in bytes.
+ * \param baseAddress Basic address of the media, in number of blocks.
+ * \param size Size of the media, in number of blocks.
+ * \see Media
+ */
+void MEDDdram_Initialize(Media *media,
+ uint32_t blockSize,
+ uint32_t baseAddress,
+ uint32_t size)
+{
+ uint32_t value;
+
+ TRACE_INFO("MEDDdram init\n\r");
+
+ // Initialize DDRAM if not already done
+ //--------------------------------------------------------------------------
+ value = *((volatile uint32_t *) AT91C_BASE_ADDRESS_DDR);
+ *((volatile uint32_t *) AT91C_BASE_ADDRESS_DDR) = 0xDEADBEEF;
+
+ if (*((volatile uint32_t *) AT91C_BASE_ADDRESS_DDR) == 0xDEADBEEF) {
+
+ *((volatile uint32_t *) AT91C_BASE_ADDRESS_DDR) = value;
+ TRACE_INFO("DDRAM initialized\n\r");
+ }
+ else {
+
+ *((volatile uint32_t *) AT91C_BASE_ADDRESS_DDR) = value;
+ TRACE_INFO("Initialize DDRAM ...\n\r");
+ BOARD_ConfigureDdram(0, BOARD_DDRAM_BUSWIDTH);
+ }
+
+ // Initialize media fields
+ //--------------------------------------------------------------------------
+ media->write = MEDDdram_Write;
+ media->read = MEDDdram_Read;
+ media->lock = 0;
+ media->unlock = 0;
+ media->handler = 0;
+ media->flush = 0;
+
+ media->blockSize = blockSize;
+ media->baseAddress = baseAddress;
+ media->size = size;
+
+ media->mappedRD = 1;
+ media->mappedWR = 1;
+ media->protected = 0;
+ media->removable = 0;
+ media->state = MED_STATE_READY;
+
+ media->transfer.data = 0;
+ media->transfer.address = 0;
+ media->transfer.length = 0;
+ media->transfer.callback = 0;
+ media->transfer.argument = 0;
+}
+#endif //#if defined(AT91C_BASE_DDR2C)
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/MEDFlash.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/MEDFlash.c
new file mode 100644
index 0000000..1c970fb
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/MEDFlash.c
@@ -0,0 +1,276 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+ * \file
+ *
+ * Implementation of media layer for the flash.
+ *
+ */
+
+/*------------------------------------------------------------------------------
+ * Includes
+ *------------------------------------------------------------------------------*/
+
+#include "memories.h"
+#include <assert.h>
+
+/*------------------------------------------------------------------------------
+ * Internal Functions
+ *------------------------------------------------------------------------------*/
+
+/**
+ * \brief Reads a specified amount of data from a flash memory
+ * \param media Pointer to a Media instance
+ * \param address Address of the data to read
+ * \param data Pointer to the buffer in which to store the retrieved
+ * data
+ * \param length Length of the buffer
+ * \param callback Optional pointer to a callback function to invoke when
+ * the operation is finished
+ * \param argument Optional pointer to an argument for the callback
+ * \return Operation result code
+*/
+static uint8_t FLA_Read(Media *media,
+ uint32_t address,
+ void *data,
+ uint32_t length,
+ MediaCallback callback,
+ void *argument)
+{
+ uint8_t *source = (uint8_t *) address;
+ uint8_t *dest = (uint8_t *) data;
+
+ // Check that the media is ready
+ if (media->state != MED_STATE_READY) {
+
+ TRACE_INFO("Media busy\n\r");
+ return MED_STATUS_BUSY;
+ }
+
+ // Check that the data to read is not too big
+ if ((length + address) > media->size) {
+
+ TRACE_WARNING("FLA_Read: Data too big\n\r");
+ return MED_STATUS_ERROR;
+ }
+
+ // Enter Busy state
+ media->state = MED_STATE_BUSY;
+
+ // Read data
+ while (length > 0) {
+
+ *dest = *source;
+
+ dest++;
+ source++;
+ length--;
+ }
+
+ // Leave the Busy state
+ media->state = MED_STATE_READY;
+
+ // Invoke callback
+ if (callback != 0) {
+
+ callback(argument, MED_STATUS_SUCCESS, 0, 0);
+ }
+
+ return MED_STATUS_SUCCESS;
+}
+
+/**
+ * \brief Writes data on a flash media
+ * \param media Pointer to a Media instance
+ * \param address Address at which to write
+ * \param data Pointer to the data to write
+ * \param length Size of the data buffer
+ * \param callback Optional pointer to a callback function to invoke when
+ * the write operation terminates
+ * \param argument Optional argument for the callback function
+ * \return Operation result code
+ * \see Media
+ * \see Callback_f
+ */
+static uint8_t FLA_Write(Media *media,
+ uint32_t address,
+ void *data,
+ uint32_t length,
+ MediaCallback callback,
+ void *argument)
+{
+ uint8_t error;
+
+ // Check that the media if ready
+ if (media->state != MED_STATE_READY) {
+
+ TRACE_WARNING("FLA_Write: Media is busy\n\r");
+ return MED_STATUS_BUSY;
+ }
+
+ // Check that address is dword-aligned
+ if (address%4 != 0)
+ {
+ TRACE_DEBUG("address = 0x%X\n\r", address);
+ TRACE_WARNING("FLA_Write: Address must be dword-aligned\n\r");
+ return MED_STATUS_ERROR;
+ }
+
+ // Check that length is a multiple of 4
+ if (length%4 != 0) {
+
+ TRACE_WARNING("FLA_Write: Data length must be a multiple of 4 bytes\n\r");
+ return MED_STATUS_ERROR;
+ }
+
+ // Check that the data to write is not too big
+ if ((length + address) > media->size) {
+
+ TRACE_WARNING("FLA_Write: Data too big\n\r");
+ return MED_STATUS_ERROR;
+ }
+
+ // Put the media in Busy state
+ media->state = MED_STATE_BUSY;
+
+ // Initialize the transfer descriptor
+ media->transfer.data = data;
+ media->transfer.address = address;
+ media->transfer.length = length;
+ media->transfer.callback = callback;
+ media->transfer.argument = argument;
+
+ // Start the write operation
+ error = FLASHD_Write( address, data, length);
+ if( error )
+ {
+ TRACE_ERROR("-F- Error when trying to write page (0x%02X)\n\r", error);
+ return MED_STATUS_ERROR;
+ }
+ // End of transfer
+ // Put the media in Ready state
+ media->state = MED_STATE_READY;
+
+ // Invoke the callback if it exists
+ if (media->transfer.callback != 0) {
+
+ media->transfer.callback(media->transfer.argument, 0, 0, 0);
+ }
+
+ return MED_STATUS_SUCCESS;
+}
+
+/**
+ * \brief Lock all the regions in the given address range. The actual unlock
+ * range is reported through two output parameters.
+ * \param media Pointer to Media instance.
+ * \param start Start address of unlock range.
+ * \param end End address of unlock range.
+ * \param pActualStart Start address of the actual unlock range (optional).
+ * \param pActualEnd End address of the actual unlock range (optional).
+ * \return 0 if successful; otherwise returns an error code.
+ */
+static uint8_t FLA_Lock( Media* media, uint32_t start, uint32_t end, uint32_t *pActualStart, uint32_t *pActualEnd )
+{
+ media = media;
+
+ if ( FLASHD_Lock( start, end, pActualStart, pActualEnd ) )
+ {
+ return MED_STATUS_ERROR ;
+ }
+
+ return MED_STATUS_SUCCESS ;
+}
+
+/**
+ * \brief Unlock all the regions in the given address range. The actual unlock
+ * range is reported through two output parameters.
+ * \param media Pointer to Media instance.
+ * \param start Start address of unlock range.
+ * \param end End address of unlock range.
+ * \param pActualStart Start address of the actual unlock range (optional).
+ * \param pActualEnd End address of the actual unlock range (optional).
+ * \return 0 if successful; otherwise returns an error code.
+ */
+static uint8_t FLA_Unlock( Media* media, uint32_t start, uint32_t end, uint32_t *pActualStart, uint32_t *pActualEnd )
+{
+ media = media;
+
+ if ( FLASHD_Unlock( start, end, pActualStart, pActualEnd ) )
+ {
+ return MED_STATUS_ERROR ;
+ }
+
+ return MED_STATUS_SUCCESS ;
+}
+
+/*------------------------------------------------------------------------------
+ * Exported Functions
+ *------------------------------------------------------------------------------*/
+/**
+ * \brief Initializes a Media instance and the associated physical interface
+ * \param media Pointer to the Media instance to initialize
+ * \param efc Pointer to AT91S_EFC interface.
+ * \see Media
+ */
+void FLA_Initialize( Media *media, Efc *efc )
+{
+ TRACE_INFO("Flash init\n\r");
+
+ // Initialize media fields
+ media->write = FLA_Write;
+ media->read = FLA_Read;
+ media->lock = FLA_Lock;
+ media->unlock = FLA_Unlock;
+ media->flush = 0;
+ media->handler = 0;
+
+ media->blockSize = 1;
+ media->baseAddress = 0; // Address based on whole memory space
+ media->size = IFLASH_SIZE;
+ media->interface = efc;
+
+ media->mappedRD = 0;
+ media->mappedWR = 0;
+ media->protected = 0;
+ media->removable = 0;
+ media->state = MED_STATE_READY;
+
+ media->transfer.data = 0;
+ media->transfer.address = 0;
+ media->transfer.length = 0;
+ media->transfer.callback = 0;
+ media->transfer.argument = 0;
+
+ // Initialize low-level interface
+ // Configure Flash Mode register
+ efc->EEFC_FMR |= (BOARD_MCK / 666666) << 16;
+}
+
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/MEDNandFlash.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/MEDNandFlash.c
new file mode 100644
index 0000000..f2940ba
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/MEDNandFlash.c
@@ -0,0 +1,495 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+ * \file
+ *
+ * Implementation of media layer for the NAND flash.
+ *
+ */
+
+/*------------------------------------------------------------------------------
+ * Headers
+ *------------------------------------------------------------------------------*/
+
+#include "memories.h"
+
+#include <string.h>
+#include <assert.h>
+
+/*------------------------------------------------------------------------------
+ * Definitions
+ *------------------------------------------------------------------------------*/
+/// Casts
+#define MODEL(interface) ((struct NandFlashModel *) interface)
+#define TRANSLATED(interface) ((struct TranslatedNandFlash *) interface)
+
+/*----------------------------------------------------------------------------
+ * Local macros
+ *----------------------------------------------------------------------------*/
+#define min( a, b ) (((a) < (b)) ? (a) : (b))
+
+/*-----------------------------------------------------------------------------
+ * Internal variables
+ *------------------------------------------------------------------------------*/
+static uint8_t pageWriteBuffer[NandCommon_MAXPAGEDATASIZE];
+static int16_t currentWriteBlock;
+static int16_t currentWritePage;
+
+static uint8_t pageReadBuffer[NandCommon_MAXPAGEDATASIZE];
+static int16_t currentReadBlock;
+static int16_t currentReadPage;
+/*------------------------------------------------------------------------------
+ * Internal functions
+ *------------------------------------------------------------------------------*/
+/**
+ * \brief Writes the current page of data on the NandFlash.
+ * Returns 0 if successful; otherwise returns 1.
+ * \param tnf Pointer to a TranslatedNandFlash instance.
+*/
+static uint8_t FlushCurrentPage( Media *media )
+{
+ // Make sure there is a page to flush
+ if ( currentWritePage == -1 )
+ {
+ return 0 ;
+ }
+
+ TRACE_DEBUG("FlushCurrentPage(B#%d:P#%d)\n\r",
+ currentWriteBlock, currentWritePage);
+
+ // Write page
+ if (TranslatedNandFlash_WritePage(TRANSLATED(media->interface),
+ currentWriteBlock,
+ currentWritePage,
+ pageWriteBuffer,
+ 0)) {
+
+ TRACE_ERROR("FlushCurrentPage: Failed to write page.\n\r");
+ return 1;
+ }
+
+ // No current write page & block
+ currentWriteBlock = -1;
+ currentWritePage = -1;
+
+ return 0;
+}
+
+/**
+ * \brief Writes data at an unaligned (page-wise) address and size. The address is
+ * provided as the block & page number plus an offset. The data to write MUST
+ * NOT span more than one page.
+ * Returns 0 if the data has been written; 1 otherwise.
+ * \param media Pointer to a nandflash Media instance.
+ * \param block Number of the block to write.
+ * \param page Number of the page to write.
+ * \param offset Write offset.
+ * \param buffer Data buffer.
+ * \param size Number of bytes to write.
+*/
+static uint8_t UnalignedWritePage(
+ Media *media,
+ uint16_t block,
+ uint16_t page,
+ uint16_t offset,
+ uint8_t *buffer,
+ uint32_t size)
+{
+ uint8_t error;
+ uint16_t pageDataSize = NandFlashModel_GetPageDataSize(MODEL(media->interface));
+ uint8_t writePage = ((size + offset) == pageDataSize);
+
+ TRACE_DEBUG( "UnalignedWritePage(B%d:P%d@%d, %d)\n\r", (int)block, (int)page, (int)offset, (int)size ) ;
+ assert( (size + offset) <= pageDataSize ) ; /* "UnalignedWrite: Write size and offset exceed page data size\n\r" */
+
+ // If size is 0, return immediately
+ if ( size == 0 )
+ {
+ return 0 ;
+ }
+
+ // If this is not the current page, flush the previous one
+ if ((currentWriteBlock != block) || (currentWritePage != page))
+ {
+ // Flush and make page the new current page
+ FlushCurrentPage(media);
+ TRACE_DEBUG("Current write page: B#%d:P#%d\n\r", block, page);
+ currentWriteBlock = block;
+ currentWritePage = page;
+
+ // Read existing page data in a temporary buffer if the page is not
+ // entirely written
+ if (size != pageDataSize) {
+
+ error = TranslatedNandFlash_ReadPage(TRANSLATED(media->interface),
+ block,
+ page,
+ pageWriteBuffer,
+ 0);
+ if (error) {
+
+ TRACE_ERROR(
+ "UnalignedWrite: Could not read existing page data\n\r");
+ return 1;
+ }
+ }
+ }
+
+ // Copy data in temporary buffer
+ memcpy(&(pageWriteBuffer[offset]), buffer, size);
+ // Update read buffer if necessary
+ if ((currentReadPage == currentWritePage)
+ && (currentReadBlock == currentWriteBlock)) {
+
+ TRACE_DEBUG("Updating current read buffer\n\r");
+ memcpy(&(pageReadBuffer[offset]), buffer, size);
+ }
+
+ // Flush page if it is complete
+ if (writePage) {
+
+ FlushCurrentPage(media);
+ }
+
+ return 0;
+}
+
+/**
+ * \brief Writes a data buffer at the specified address on a NandFlash media. An
+ * optional callback can be triggered after the transfer is completed.
+ * Returns MED_STATUS_SUCCESS if the transfer has been started successfully;
+ * otherwise returns MED_STATUS_ERROR.
+ * \param media Pointer to the NandFlash Media instance.
+ * \param address Address where the data shall be written.
+ * \param data Data buffer.
+ * \param length Number of bytes to write.
+ * \param callback Optional callback to call when the write is finished.
+ * \param argument Optional argument to the callback function.
+*/
+static uint8_t MEDNandFlash_Write(
+ Media *media,
+ uint32_t address,
+ void *data,
+ uint32_t length,
+ MediaCallback callback,
+ void *argument)
+{
+ uint16_t pageDataSize =
+ NandFlashModel_GetPageDataSize(MODEL(media->interface));
+ uint16_t blockSize =
+ NandFlashModel_GetBlockSizeInPages(MODEL(media->interface));
+ uint16_t block, page, offset;
+ uint32_t writeSize;
+ uint8_t *buffer = (uint8_t *) data;
+ uint32_t remainingLength;
+ uint8_t status;
+
+ TRACE_INFO("MEDNandFlash_Write(0x%08X, %d)\n\r", address, (int)length);
+
+ // Translate access
+ if (NandFlashModel_TranslateAccess(MODEL(media->interface),
+ address,
+ length,
+ &block,
+ &page,
+ &offset)) {
+
+ TRACE_ERROR("MEDNandFlash_Write: Could not start write.\n\r");
+ return MED_STATUS_ERROR;
+ }
+
+ TRACE_DEBUG("MEDNandFlash_Write(B#%d:P#%d@%d, %d)\n\r",
+ block, page, offset, (int)length);
+
+ // Write pages
+ remainingLength = length;
+ status = MED_STATUS_SUCCESS;
+ while ((status == MED_STATUS_SUCCESS) && (remainingLength > 0)) {
+
+ // Write one page
+ writeSize = min((uint32_t)(pageDataSize-offset), remainingLength);
+ if (UnalignedWritePage(media, block, page, offset, buffer, writeSize)) {
+
+ TRACE_ERROR("MEDNandFlash_Write: Failed to write page\n\r");
+ status = MED_STATUS_ERROR;
+ }
+ else {
+
+ // Update addresses
+ remainingLength -= writeSize;
+ buffer += writeSize;
+ offset = 0;
+ page++;
+ if (page == blockSize) {
+
+ page = 0;
+ block++;
+ }
+ }
+ }
+
+ // Trigger callback
+ if (callback) {
+
+ callback(argument, status, length - remainingLength, remainingLength);
+ }
+
+ return status;
+
+}
+
+/**
+ * \brief Reads data at an unaligned address and/or size. The address is provided as
+ * the block & page numbers plus an offset.
+ * Returns 0 if the data has been read; otherwise returns 1.
+ * \param media Pointer to a nandflash Media instance.
+ * \param block Number of the block to read.
+ * \param page Number of the page to read.
+ * \param offset Read offset.
+ * \param buffer Buffer for storing data.
+ * \param size Number of bytes to read.
+*/
+static uint8_t UnalignedReadPage(
+ Media *media,
+ uint16_t block,
+ uint16_t page,
+ uint16_t offset,
+ uint8_t *buffer,
+ uint32_t size)
+{
+ uint8_t error;
+ uint16_t pageDataSize = NandFlashModel_GetPageDataSize(MODEL(media->interface));
+
+ TRACE_DEBUG("UnalignedReadPage(B%d:P%d@%d, %d)\n\r", (int)block, (int)page, (int)offset, (int)size);
+
+ // Check that one page is read at most
+ if( (size + offset) > pageDataSize )
+ {
+ TRACE_ERROR("UnalignedReadPage: Read size & offset exceed page data size\n\r");
+ return 1;
+ }
+ // Check if this is not the current read page
+ if ((block != currentReadBlock) || (page != currentReadPage))
+ {
+ TRACE_DEBUG("Current read page: B#%d:P#%d\n\r", block, page);
+ currentReadBlock = block;
+ currentReadPage = page;
+
+ // Check if this is the current write page
+ if ((currentReadBlock == currentWriteBlock)
+ && (currentReadPage == currentWritePage)) {
+
+ TRACE_DEBUG("Reading current write page\n\r");
+ memcpy(pageReadBuffer, pageWriteBuffer, NandCommon_MAXPAGEDATASIZE);
+ }
+ else {
+
+ // Read whole page into a temporary buffer
+ error = TranslatedNandFlash_ReadPage(TRANSLATED(media->interface),
+ block,
+ page,
+ pageReadBuffer,
+ 0);
+ if (error) {
+
+ TRACE_ERROR("UnalignedRead: Could not read page\n\r");
+ return 1;
+ }
+ }
+ }
+
+ // Copy data into buffer
+ memcpy(buffer, &(pageReadBuffer[offset]), size);
+
+ return 0;
+}
+
+/**
+ * \brief Reads data at the specified address of a NandFlash media. An optional
+ * callback is invoked when the transfer completes.
+ * Returns 1 if the transfer has been started; otherwise returns 0.
+ * \param media Pointer to the NandFlash Media to read.
+ * \param address Address at which the data shall be read.
+ * \param data Data buffer.
+ * \param length Number of bytes to read.
+ * \param callback Optional callback function.
+ * \param argument Optional argument to the callback function.
+*/
+static uint8_t MEDNandFlash_Read(
+ Media *media,
+ uint32_t address,
+ void *data,
+ uint32_t length,
+ MediaCallback callback,
+ void *argument)
+{
+ uint16_t block, page, offset;
+ uint16_t pageDataSize = NandFlashModel_GetPageDataSize(MODEL(media->interface));
+ uint16_t blockSizeInPages = NandFlashModel_GetBlockSizeInPages(MODEL(media->interface));
+ uint32_t remainingLength;
+ uint32_t readSize;
+ uint8_t *buffer = (uint8_t *) data;
+ uint8_t status;
+
+ TRACE_INFO("MEDNandFlash_Read(0x%08X, %d)\n\r", address, (int)length);
+
+ // Translate access into block, page and offset
+ if (NandFlashModel_TranslateAccess(MODEL(media->interface),
+ address,
+ length,
+ &block,
+ &page,
+ &offset)) {
+
+ TRACE_ERROR("MEDNandFlash_Read: Cannot perform access\n\r");
+ return MED_STATUS_ERROR;
+ }
+
+ // Read
+ remainingLength = length;
+ status = MED_STATUS_SUCCESS;
+ while ((status == MED_STATUS_SUCCESS) && (remainingLength > 0)) {
+
+ // Read page
+ readSize = min((uint32_t)(pageDataSize-offset), remainingLength);
+ if (UnalignedReadPage(media, block, page, offset, buffer, readSize)) {
+
+ TRACE_ERROR("MEDNandFlash_Read: Could not read page\n\r");
+ status = MED_STATUS_ERROR;
+ }
+ else {
+
+ // Update values
+ remainingLength -= readSize;
+ buffer += readSize;
+ offset = 0;
+ page++;
+ if (page == blockSizeInPages) {
+
+ page = 0;
+ block++;
+ }
+ }
+ }
+
+ // Trigger callback
+ if (callback) {
+
+ callback(argument, status, length - remainingLength, remainingLength);
+ }
+
+ return status;
+}
+
+/**
+ * \brief Carries out all pending operations. Returns MED_STATUS_SUCCESS if
+ * succesful; otherwise, returns MED_STATUS_ERROR.
+ * \param media Pointer to a NandFlash Media instance.
+*/
+static uint8_t MEDNandFlash_Flush(Media *media)
+{
+ TRACE_INFO("MEDNandFlash_Flush()\n\r");
+
+ if (FlushCurrentPage(media)) {
+
+ TRACE_ERROR("MEDNandFlash_Flush: Could not flush current page\n\r");
+ return MED_STATUS_ERROR;
+ }
+
+ if (TranslatedNandFlash_Flush(TRANSLATED(media->interface))) {
+
+ TRACE_ERROR("MEDNandFlash_Flush: Could not flush translated nand\n\r");
+ return MED_STATUS_ERROR;
+ }
+
+ if (TranslatedNandFlash_SaveLogicalMapping(TRANSLATED(media->interface))) {
+
+ TRACE_ERROR("MEDNandFlash_Flush: Could not save the logical mapping\n\r");
+ return MED_STATUS_ERROR;
+ }
+
+ return MED_STATUS_SUCCESS;
+}
+
+/**
+ * \brief Interrupt handler for the nandflash media. Triggered when the flush timer
+ * expires, initiating a MEDNandFlash_Flush().
+ * \param media Pointer to a nandflash Media instance.
+*/
+static void MEDNandFlash_InterruptHandler(Media *media)
+{
+ //volatile uint32_t dummy;
+
+ TRACE_DEBUG("Flush timer expired\n\r");
+ MEDNandFlash_Flush(media);
+
+ // Acknowledge interrupt
+ //dummy = AT91C_BASE_NANDFLUSHTIMER->TC_SR;
+}
+
+/*------------------------------------------------------------------------------
+ * Exported functions
+ *------------------------------------------------------------------------------*/
+/**
+ * \brief Initializes a media instance to operate on the given NandFlash device.
+ * \param media Pointer to a Media instance.
+ * \param tnf Pointer to the TranslatedNandFlash to use.
+*/
+void MEDNandFlash_Initialize( Media* pMedia, struct TranslatedNandFlash *translated )
+{
+ TRACE_INFO( "MEDNandFlash_Initialize()\n\r" ) ;
+
+ pMedia->write = (Media_write)MEDNandFlash_Write;
+ pMedia->read = (Media_read)MEDNandFlash_Read;
+ pMedia->lock = 0;
+ pMedia->unlock = 0;
+ pMedia->flush = MEDNandFlash_Flush;
+ pMedia->handler = MEDNandFlash_InterruptHandler;
+
+ pMedia->interface = translated;
+
+ pMedia->baseAddress = 0;
+ pMedia->blockSize = 1;
+ pMedia->size = TranslatedNandFlash_GetDeviceSizeInBytes( translated ) ;
+
+ TRACE_INFO( "NF Size: %d\n\r", (int)pMedia->size ) ;
+
+ pMedia->mappedRD = 0;
+ pMedia->mappedWR = 0;
+ pMedia->protected = 0;
+ pMedia->removable = 0;
+ pMedia->state = MED_STATE_READY;
+
+ currentWriteBlock = -1;
+ currentWritePage = -1;
+ currentReadBlock = -1;
+ currentReadPage = -1;
+
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/MEDRamDisk.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/MEDRamDisk.c
new file mode 100644
index 0000000..be96cf2
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/MEDRamDisk.c
@@ -0,0 +1,285 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+ * \file
+ *
+ * Implementation of media layer for the RamDisk.
+ *
+ */
+
+/*------------------------------------------------------------------------------
+ * Headers
+ *------------------------------------------------------------------------------*/
+
+#include "memories.h"
+
+/*------------------------------------------------------------------------------
+ * Types
+ *------------------------------------------------------------------------------*/
+/** Do copy and modify pointer */
+typedef void copyFunction(uint8_t **, uint8_t **, uint32_t);
+
+/*------------------------------------------------------------------------------
+ * Internal Functions
+ *------------------------------------------------------------------------------*/
+/**
+ * \brief Do copy for 8-byte aligned data
+ */
+static void AlignedCopy(uint8_t * *src,
+ uint8_t * *dst,
+ uint32_t len)
+{
+ uint32_t *src32, *dst32;
+ src32 = (uint32_t*)(void *)(*src);
+ dst32 = (uint32_t*)(void *)(*dst);
+ for (;len > 0; len -= 8) {
+ *dst32 ++ = *src32 ++;
+ *dst32 ++ = *src32 ++;
+ }
+ *src = (uint8_t*)src32;
+ *dst = (uint8_t*)dst32;
+}
+/**
+ * \brief Do copy for byte-aligned data
+ */
+static void UnalignedCopy(uint8_t * *src,
+ uint8_t * *dst,
+ uint32_t len)
+{
+ for (;len > 0; len --) {
+ *(*dst) ++ = *(*src) ++;
+ }
+}
+
+/**
+ * \brief Reads a specified amount of data from a RAM Disk memory
+ * \param media Pointer to a Media instance
+ * \param address Address of the data to read
+ * \param data Pointer to the buffer in which to store the retrieved
+ * data
+ * \param length Length of the buffer
+ * \param callback Optional pointer to a callback function to invoke when
+ * the operation is finished
+ * \param argument Optional pointer to an argument for the callback
+ * \return Operation result code
+ */
+static uint8_t MEDRamDisk_Read(Media *media,
+ uint32_t address,
+ void *data,
+ uint32_t length,
+ MediaCallback callback,
+ void *argument)
+{
+ uint8_t *source;
+ uint8_t *dest;
+ copyFunction *pCpy;
+
+ // Check that the media is ready
+ if (media->state != MED_STATE_READY) {
+
+ TRACE_INFO("Media busy\n\r");
+ return MED_STATUS_BUSY;
+ }
+
+ // Check that the data to read is not too big
+ if ((length + address) > media->size) {
+
+ TRACE_WARNING("RamDisk_Read: Data too big: %u, 0x%08X\n\r",
+ length, address);
+ return MED_STATUS_ERROR;
+ }
+
+ // Enter Busy state
+ media->state = MED_STATE_BUSY;
+
+ // Source & Destination
+ source = (uint8_t *)(media->blockSize
+ * (address + media->baseAddress));
+ dest = (uint8_t *)data;
+
+ // Align/Unaligned copy
+ pCpy = (((uint32_t)source%4) == 0 && (media->blockSize%8) == 0)
+ ? AlignedCopy : UnalignedCopy;
+
+ for (; length > 0; length --) {
+ pCpy(&source, &dest, media->blockSize);
+ }
+
+ // Leave the Busy state
+ media->state = MED_STATE_READY;
+
+ // Invoke callback
+ if (callback != 0) {
+
+ callback(argument, MED_STATUS_SUCCESS, 0, 0);
+ }
+
+ return MED_STATUS_SUCCESS;
+}
+
+/**
+ * \brief Writes data on a Ram Disk media
+ * \param media Pointer to a Media instance
+ * \param address Address at which to write
+ * \param data Pointer to the data to write
+ * \param length Size of the data buffer
+ * \param callback Optional pointer to a callback function to invoke when
+ * the write operation terminates
+ * \param argument Optional argument for the callback function
+ * \return Operation result code
+ * \see Media
+ * \see MediaCallback
+ */
+static uint8_t MEDRamDisk_Write(Media *media,
+ uint32_t address,
+ void *data,
+ uint32_t length,
+ MediaCallback callback,
+ void *argument)
+{
+ uint8_t *source;
+ uint8_t *dest;
+ copyFunction *pCpy;
+
+ //TRACE_DEBUG("RamDisk_Write\n\r");
+
+ // Check that the media if ready
+ if (media->state != MED_STATE_READY) {
+
+ TRACE_WARNING("RamDisk_Write: busy\n\r");
+ return MED_STATUS_BUSY;
+ }
+
+ // Check that the data to write is not too big
+ if ((length + address) > media->size) {
+
+ TRACE_WARNING("RamDisk_Write: Data too big\n\r");
+ return MED_STATUS_ERROR;
+ }
+
+ // Put the media in Busy state
+ media->state = MED_STATE_BUSY;
+
+ // Compute function parameters
+ source = (uint8_t *) data;
+ dest = (uint8_t *) (media->blockSize *
+ (media->baseAddress + address));
+
+ // Align/Unaligned copy
+ pCpy = (((uint32_t)source%4) == 0 && (media->blockSize%8) == 0)
+ ? AlignedCopy : UnalignedCopy;
+
+ for (; length > 0; length --) {
+ pCpy(&source, &dest, media->blockSize);
+ }
+
+ // Leave the Busy state
+ media->state = MED_STATE_READY;
+
+ // Invoke the callback if it exists
+ if (callback != 0) {
+
+ callback(argument, MED_STATUS_SUCCESS, 0, 0);
+ }
+
+ return MED_STATUS_SUCCESS;
+}
+
+/*------------------------------------------------------------------------------
+ * Exported Functions
+ *------------------------------------------------------------------------------*/
+/**
+ * \brief Initializes a Media instance and the associated physical interface
+ * \param media Pointer to the Media instance to initialize
+ * \return 1 if initialize sucessfully, 0 if any error.
+ * \see Media
+ */
+uint8_t MEDRamDisk_Initialize(Media *media,
+ uint32_t blockSize,
+ uint32_t baseAddress,
+ uint32_t size)
+{
+ uint32_t bak_val;
+ uint32_t baseInBytes = baseAddress * blockSize;
+ uint32_t sizeInBytes = size * blockSize;
+
+ TRACE_INFO("RAM Disk init\n\r");
+
+ // If the address Initialized ?
+ bak_val = *((volatile uint32_t *) (baseInBytes));
+ *((volatile uint32_t *) (baseInBytes)) = 0xDEADBEEF;
+ if (*((volatile uint32_t *) baseInBytes) == 0xDEADBEEF) {
+
+ *((volatile uint32_t *) baseInBytes) = bak_val;
+ }
+ else {
+
+ TRACE_ERROR("Un-configured memory area %x ...\n\r", baseInBytes);
+ return 0;
+ }
+
+ baseInBytes += sizeInBytes - 4;
+ bak_val = *((volatile uint32_t *) (baseInBytes));
+ *((volatile uint32_t *) (baseInBytes)) = 0xAECDBE9F;
+ if (*((volatile uint32_t *)(baseInBytes)) == 0xAECDBE9F) {
+
+ *((volatile uint32_t *)(baseInBytes)) = bak_val;
+ }
+ else {
+
+ TRACE_ERROR("Un-configured memory area %x ...\n\r", baseInBytes);
+ return 0;
+ }
+
+ // Initialize media fields
+ media->write = (Media_write)MEDRamDisk_Write;
+ media->read = (Media_read)MEDRamDisk_Read;
+ media->lock = 0;
+ media->unlock = 0;
+ media->handler = 0;
+ media->flush = 0;
+
+ media->blockSize = blockSize;
+ media->baseAddress = baseAddress;
+ media->size = size;
+
+ media->mappedRD = 1;
+ media->mappedWR = 1;
+ media->protected = 0;
+ media->removable = 0;
+ media->state = MED_STATE_READY;
+
+ media->transfer.data = 0;
+ media->transfer.address = 0;
+ media->transfer.length = 0;
+ media->transfer.callback = 0;
+ media->transfer.argument = 0;
+
+ return 1;
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/MEDSdcard.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/MEDSdcard.c
new file mode 100644
index 0000000..625b7a1
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/MEDSdcard.c
@@ -0,0 +1,447 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+ * \file
+ *
+ * Implementation of media layer for the SdCard.
+ *
+ */
+
+/*------------------------------------------------------------------------------
+ * Headers
+ *------------------------------------------------------------------------------*/
+#include "board.h"
+#include "memories.h"
+#include <assert.h>
+#include <string.h>
+/*------------------------------------------------------------------------------
+ * Constants
+ *------------------------------------------------------------------------------*/
+
+/** Number of SD Slots */
+#define NUM_SD_SLOTS 1
+/** Default block size for SD/MMC card access */
+#define SD_BLOCK_SIZE 512
+/**
+ * \brief Reads a specified amount of data from a SDCARD memory
+ * \param media Pointer to a Media instance
+ * \param address Address of the data to read
+ * \param data Pointer to the buffer in which to store the retrieved
+ * data
+ * \param length Length of the buffer
+ * \param callback Optional pointer to a callback function to invoke when
+ * the operation is finished
+ * \param argument Optional pointer to an argument for the callback
+ * \return Operation result code
+ */
+static uint8_t MEDSdcard_Read(Media *media,
+ uint32_t address,
+ void *data,
+ uint32_t length,
+ MediaCallback callback,
+ void *argument)
+{
+ uint8_t error;
+
+ // Check that the media is ready
+ if (media->state != MED_STATE_READY) {
+
+ TRACE_INFO("Media busy\n\r");
+ return MED_STATUS_BUSY;
+ }
+
+ // Check that the data to read is not too big
+ if ((length + address) > media->size) {
+
+ TRACE_WARNING("MEDSdcard_Read: Data too big: %d, %d\n\r",
+ (int)length, (int)address);
+ return MED_STATUS_ERROR;
+ }
+
+ // Enter Busy state
+ media->state = MED_STATE_BUSY;
+
+ //error = SD_Read((sSdCard*)media->interface, address, data,length,NULL,NULL);
+ error = SD_ReadBlocks((sSdCard*)media->interface, address,data,length);
+
+ // Leave the Busy state
+ media->state = MED_STATE_READY;
+
+ // Invoke callback
+ if (callback != 0) {
+
+ callback(argument, error, 0, 0);
+ }
+
+ return error;
+}
+
+/**
+ * \brief Writes data on a SDRAM media
+ * \param media Pointer to a Media instance
+ * \param address Address at which to write
+ * \param data Pointer to the data to write
+ * \param length Size of the data buffer
+ * \param callback Optional pointer to a callback function to invoke when
+ * the write operation terminates
+ * \param argument Optional argument for the callback function
+ * \return Operation result code
+ * \see Media
+ * \see MediaCallback
+ */
+static uint8_t MEDSdcard_Write(Media *media,
+ uint32_t address,
+ void *data,
+ uint32_t length,
+ MediaCallback callback,
+ void *argument)
+{
+ uint8_t error;
+
+ // Check that the media if ready
+ if (media->state != MED_STATE_READY) {
+
+ TRACE_WARNING("MEDSdcard_Write: Media is busy\n\r");
+ return MED_STATUS_BUSY;
+ }
+
+ // Check that the data to write is not too big
+ if ((length + address) > media->size) {
+
+ TRACE_WARNING("MEDSdcard_Write: Data too big\n\r");
+ return MED_STATUS_ERROR;
+ }
+
+ // Put the media in Busy state
+ media->state = MED_STATE_BUSY;
+
+ //error = SD_Write((sSdCard*)media->interface, address,data,length,NULL,NULL);
+ error = SD_WriteBlocks((sSdCard*)media->interface, address,data,length);
+
+ // Leave the Busy state
+ media->state = MED_STATE_READY;
+
+ // Invoke the callback if it exists
+ if (callback != 0) {
+
+ callback(argument, error, 0, 0);
+ }
+
+ return error;
+}
+#if 0
+//------------------------------------------------------------------------------
+ * \brief Callback invoked when SD/MMC transfer done
+//------------------------------------------------------------------------------
+static void SdMmcCallback( uint32_t status, Media *pMed )
+{
+ MEDTransfer * pXfr = &pMed->transfer;
+
+ TRACE_INFO_WP("SDCb ");
+
+ if (status == SDMMC_ERROR_BUSY) {
+ status = MED_STATUS_BUSY;
+ }
+ else if (status) {
+ status = MED_STATUS_ERROR;
+ }
+
+ pMed->state = MED_STATE_READY;
+ if (pXfr->callback) {
+ pXfr->callback(pXfr->argument,
+ status,
+ pXfr->length * pMed->blockSize,
+ 0);
+ }
+}
+#endif
+/**
+ * \brief Reads a specified amount of data from a SDCARD memory
+ * \param media Pointer to a Media instance
+ * \param address Address of the data to read
+ * \param data Pointer to the buffer in which to store the retrieved
+ * data
+ * \param length Length of the buffer
+ * \param callback Optional pointer to a callback function to invoke when
+ * the operation is finished
+ * \param argument Optional pointer to an argument for the callback
+ * \return Operation result code
+ */
+static uint8_t MEDSdusb_Read(Media *media,
+ uint32_t address,
+ void *data,
+ uint32_t length,
+ MediaCallback callback,
+ void *argument)
+{
+ uint8_t error;
+
+ TRACE_INFO_WP("SDuRd(%d,%d) ", (int)address, (int)length);
+
+ // Check that the media is ready
+ if (media->state != MED_STATE_READY) {
+ TRACE_INFO("MEDSdusb_Read: Busy\n\r");
+ return MED_STATUS_BUSY;
+ }
+ // Check that the data to read is not too big
+ if ((length + address) > media->size) {
+ TRACE_WARNING("MEDSdusb_Read: Data too big: %d, %d\n\r",
+ (int)length, (int)address);
+ return MED_STATUS_ERROR;
+ }
+ // Enter Busy state
+ media->state = MED_STATE_BUSY;
+ #if 1
+ error = SD_Read((sSdCard*)media->interface,
+ address,data,length,
+ NULL,NULL);
+ error = (error ? MED_STATUS_ERROR : MED_STATUS_SUCCESS);
+ media->state = MED_STATE_READY;
+ if (callback) callback(argument, error, 0, 0);
+ return error;
+ #else
+ MEDTransfer * pXfr;
+ // Start media transfer
+ pXfr = &media->transfer;
+ pXfr->data = data;
+ pXfr->address = address;
+ pXfr->length = length;
+ pXfr->callback = callback;
+ pXfr->argument = argument;
+
+ error = SD_Read((sSdCard*)media->interface,
+ address,
+ data,
+ length,
+ (fSdmmcCallback)SdMmcCallback,
+ media);
+ return (error ? MED_STATUS_ERROR : MED_STATUS_SUCCESS);
+ #endif
+}
+
+/**
+ * \brief Writes data on a SDRAM media
+ * \param media Pointer to a Media instance
+ * \param address Address at which to write
+ * \param data Pointer to the data to write
+ * \param length Size of the data buffer
+ * \param callback Optional pointer to a callback function to invoke when
+ * the write operation terminates
+ * \param argument Optional argument for the callback function
+ * \return Operation result code
+ * \see Media
+ * \see MediaCallback
+ */
+static uint8_t MEDSdusb_Write(Media *media,
+ uint32_t address,
+ void *data,
+ uint32_t length,
+ MediaCallback callback,
+ void *argument)
+{
+ uint8_t error;
+ TRACE_INFO_WP("SDuWr(%d,%d) ", (int)address, (int)length);
+
+ // Check that the media if ready
+ if (media->state != MED_STATE_READY)
+ {
+ TRACE_INFO("MEDSdusb_Write: Busy\n\r");
+ return MED_STATUS_BUSY;
+ }
+
+ // Check that the data to write is not too big
+ if ((length + address) > media->size)
+ {
+ TRACE_WARNING("MEDSdcard_Write: Data too big\n\r");
+ return MED_STATUS_ERROR;
+ }
+ // Put the media in Busy state
+ media->state = MED_STATE_BUSY;
+
+ #if 1
+ error = SD_Write((sSdCard*)media->interface,
+ address,data,length,
+ NULL,NULL);
+ error = (error ? MED_STATUS_ERROR : MED_STATUS_SUCCESS);
+ media->state = MED_STATE_READY;
+ if (callback) callback(argument, error, 0, 0);
+ return error;
+ #else
+ MEDTransfer * pXfr;
+ // Start media transfer
+ pXfr = &media->transfer;
+ pXfr->data = data;
+ pXfr->address = address;
+ pXfr->length = length;
+ pXfr->callback = callback;
+ pXfr->argument = argument;
+
+ error = SD_Write((sSdCard*)media->interface,
+ address,
+ data,
+ length,
+ (fSdmmcCallback)SdMmcCallback,
+ media);
+ return (error ? MED_STATUS_ERROR : MED_STATUS_SUCCESS);
+ #endif
+}
+
+/**
+ * \brief Initializes a Media instance
+ * \param media Pointer to the Media instance to initialize
+ * \return 1 if success.
+ */
+uint8_t MEDSdcard_Initialize(Media *media, sSdCard *pSdDrv)
+{
+ TRACE_INFO("MEDSdcard init\n\r");
+ // Initialize media fields
+ media->interface = pSdDrv;
+ #if !defined(OP_BOOTSTRAP_MCI_on)
+ media->write = MEDSdcard_Write;
+ #else
+ media->write = 0;
+ #endif
+ media->read = MEDSdcard_Read;
+ media->lock = 0;
+ media->unlock = 0;
+ media->handler = 0;
+ media->flush = 0;
+
+ media->blockSize = SD_BLOCK_SIZE;
+ media->baseAddress = 0;
+ media->size = pSdDrv->dwNbBlocks;
+
+ media->mappedRD = 0;
+ media->mappedWR = 0;
+ media->removable = 1;
+
+ media->state = MED_STATE_READY;
+
+ media->transfer.data = 0;
+ media->transfer.address = 0;
+ media->transfer.length = 0;
+ media->transfer.callback = 0;
+ media->transfer.argument = 0;
+
+ return 1;
+}
+
+/**
+ * \brief Initializes a Media instance
+ * \param media Pointer to the Media instance to initialize
+ * \return 1 if success.
+ */
+uint8_t MEDSdusb_Initialize(Media *media, sSdCard *pSdDrv)
+{
+ TRACE_INFO("MEDSdusb init\n\r");
+
+ // Initialize media fields
+ media->interface = pSdDrv;
+ media->write = MEDSdusb_Write;
+ media->read = MEDSdusb_Read;
+ media->lock = 0;
+ media->unlock = 0;
+ media->handler = 0;
+ media->flush = 0;
+
+ media->blockSize = SD_BLOCK_SIZE;
+ media->baseAddress = 0;
+ media->size = pSdDrv->dwNbBlocks;
+
+ media->mappedRD = 0;
+ media->mappedWR = 0;
+ media->protected = 0;
+ media->removable = 1;
+
+ media->state = MED_STATE_READY;
+
+ media->transfer.data = 0;
+ media->transfer.address = 0;
+ media->transfer.length = 0;
+ media->transfer.callback = 0;
+ media->transfer.argument = 0;
+
+ return 1;
+}
+
+/**
+ * \brief erase all the Sdcard
+ * \param media Pointer to the Media instance to initialize
+ */
+
+void MEDSdcard_EraseAll(Media *media)
+{
+ uint8_t buffer[SD_BLOCK_SIZE];
+ uint32_t block;
+ uint32_t multiBlock = 1; // change buffer size for multiblocks
+ uint8_t error;
+
+ TRACE_INFO("MEDSdcard Erase All ...\n\r");
+
+ // Clear the block buffer
+ memset(buffer, 0, media->blockSize * multiBlock);
+
+ for (block=0;
+ block < (media->size-multiBlock);
+ block += multiBlock)
+ {
+ error = SD_WriteBlocks((sSdCard*)media->interface, block,buffer,multiBlock);
+ if( error )
+ {
+ TRACE_ERROR("\n\r-F- Failed to erase block (%d) #%u\n\r", error, block);
+
+ /* Wait for watchdog reset or freeze the program */
+ while (1);
+ }
+ }
+}
+
+/**
+ * \brief erase block
+ * \param media Pointer to the Media instance to initialize
+ * \param block to erase
+ */
+void MEDSdcard_EraseBlock(Media *media, uint32_t block)
+{
+ uint8_t buffer[SD_BLOCK_SIZE];
+ uint8_t error;
+
+ // Clear the block buffer
+ memset(buffer, 0, media->blockSize);
+
+ error = SD_WriteBlocks((sSdCard*)media->interface, block,buffer,1);
+ if( error )
+ {
+ TRACE_ERROR("\n\r-F- Failed to write block (%d) #%u\n\r", error, block);
+
+ /* Wait for watchdog reset or freeze the program */
+ while (1);
+ }
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/MEDSdram.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/MEDSdram.c
new file mode 100644
index 0000000..62fc289
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/MEDSdram.c
@@ -0,0 +1,273 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+ * \file
+ *
+ * Implementation of media layer for the Sdram.
+ *
+ */
+
+/*------------------------------------------------------------------------------
+ * Headers
+ *------------------------------------------------------------------------------*/
+
+#include "memories.h"
+
+#if defined(AT91C_EBI_SDRAM)
+
+/*------------------------------------------------------------------------------
+ * Types
+ *------------------------------------------------------------------------------*/
+
+/** Do copy and modify pointer */
+typedef void copyFunction(uint8_t **, uint8_t **, uint32_t);
+
+/*------------------------------------------------------------------------------
+ * Internal Functions
+ *------------------------------------------------------------------------------*/
+
+/**
+ * Do copy for 8-byte aligned data
+ */
+static void AlignedCopy(uint8_t * *src,
+ uint8_t * *dst,
+ uint32_t len)
+{
+ uint32_t *src32, *dst32;
+ src32 = (uint32_t*)*src;
+ dst32 = (uint32_t*)*dst;
+ for (;len > 0; len -= 8) {
+ *dst32 ++ = *src32 ++;
+ *dst32 ++ = *src32 ++;
+ }
+ *src = (uint8_t*)src32;
+ *dst = (uint8_t*)dst32;
+}
+
+/**
+ * Do copy for byte-aligned data
+ */
+static void UnalignedCopy(uint8_t * *src,
+ uint8_t * *dst,
+ uint32_t len)
+{
+ for (;len > 0; len --) {
+ *(*dst) ++ = *(*src) ++;
+ }
+}
+
+/**
+ * \brief Reads a specified amount of data from a SDRAM memory
+ * \param media Pointer to a Media instance
+ * \param address Address of the data to read
+ * \param data Pointer to the buffer in which to store the retrieved
+ * data
+ * \param length Length of the buffer
+ * \param callback Optional pointer to a callback function to invoke when
+ * the operation is finished
+ * \param argument Optional pointer to an argument for the callback
+ * \return Operation result code
+*/
+static uint8_t MEDSdram_Read(Media *media,
+ uint32_t address,
+ void *data,
+ uint32_t length,
+ MediaCallback callback,
+ void *argument)
+{
+ uint8_t *source;
+ uint8_t *dest;
+ copyFunction *pCpy;
+
+ // Check that the media is ready
+ if (media->state != MED_STATE_READY) {
+
+ TRACE_INFO("SDRAM busy\n\r");
+ return MED_STATUS_BUSY;
+ }
+
+ // Check that the data to read is not too big
+ if ((length + address) > media->size) {
+
+ TRACE_WARNING("SdRamD_Read: Data too big: %u, 0x%08X\n\r",
+ length, address);
+ return MED_STATUS_ERROR;
+ }
+
+ // Enter Busy state
+ media->state = MED_STATE_BUSY;
+
+ // Source & Destination
+ source = (uint8_t *)(media->blockSize
+ * (address + media->baseAddress));
+ dest = (uint8_t *)data;
+
+ // Align/Unaligned copy
+ pCpy = (((uint32_t)source%4) == 0 && (media->blockSize%8) == 0)
+ ? AlignedCopy : UnalignedCopy;
+
+ for (; length > 0; length --) {
+ pCpy(&source, &dest, media->blockSize);
+ }
+
+ // Leave the Busy state
+ media->state = MED_STATE_READY;
+
+ // Invoke callback
+ if (callback != 0) {
+
+ callback(argument, MED_STATUS_SUCCESS, 0, 0);
+ }
+
+ return MED_STATUS_SUCCESS;
+}
+
+/**
+ * \brief Writes data on a SDRAM media
+ * \param media Pointer to a Media instance
+ * \param address Address at which to write
+ * \param data Pointer to the data to write
+ * \param length Size of the data buffer
+ * \param callback Optional pointer to a callback function to invoke when
+ * the write operation terminates
+ * \param argument Optional argument for the callback function
+ * \return Operation result code
+ * \see Media
+ * \see MediaCallback
+ */
+static uint8_t MEDSdram_Write(Media *media,
+ uint32_t address,
+ void *data,
+ uint32_t length,
+ MediaCallback callback,
+ void *argument)
+{
+ uint8_t *source;
+ uint8_t *dest;
+ copyFunction *pCpy;
+
+ //TRACE_DEBUG("SdRamD_Write\n\r");
+
+ // Check that the media if ready
+ if (media->state != MED_STATE_READY) {
+
+ TRACE_WARNING("SdRamD_Write: Media is busy\n\r");
+ return MED_STATUS_BUSY;
+ }
+
+ // Check that the data to write is not too big
+ if ((length + address) > media->size) {
+
+ TRACE_WARNING("SdRamD_Write: Data too big\n\r");
+ return MED_STATUS_ERROR;
+ }
+
+ // Compute function parameters
+ source = (uint8_t *) data;
+ dest = (uint8_t *) (media->blockSize *
+ (media->baseAddress + address));
+
+ // Align/Unaligned copy
+ pCpy = (((uint32_t)source%4) == 0 && (media->blockSize%8) == 0)
+ ? AlignedCopy : UnalignedCopy;
+
+ for (; length > 0; length --) {
+ pCpy(&source, &dest, media->blockSize);
+ }
+
+ // Leave the Busy state
+ media->state = MED_STATE_READY;
+
+ // Invoke the callback if it exists
+ if (callback != 0) {
+
+ callback(argument, MED_STATUS_SUCCESS, 0, 0);
+ }
+
+ return MED_STATUS_SUCCESS;
+}
+
+/*------------------------------------------------------------------------------
+ * Exported Functions
+ *------------------------------------------------------------------------------*/
+/**
+ * \brief Initializes a Media instance and the associated physical interface
+ * \param media Pointer to the Media instance to initialize
+ * \see Media
+ */
+void MEDSdram_Initialize(Media *media,
+ uint32_t blockSize,
+ uint32_t baseAddress,
+ uint32_t size)
+{
+ uint32_t value;
+
+ TRACE_INFO("MEDSdram init\n\r");
+
+ // Initialize SDRAM if not already done
+ value = *((volatile uint32_t *) AT91C_EBI_SDRAM);
+ *((volatile uint32_t *) AT91C_EBI_SDRAM) = 0xDEADBEEF;
+
+ if (*((volatile uint32_t *) AT91C_EBI_SDRAM) == 0xDEADBEEF) {
+
+ *((volatile uint32_t *) AT91C_EBI_SDRAM) = value;
+ TRACE_INFO("SDRAM already initialized\n\r");
+ }
+ else {
+
+ TRACE_INFO("Initializing the SDRAM ...\n\r");
+ BOARD_ConfigureSdram(BOARD_SDRAM_BUSWIDTH);
+ }
+
+ // Initialize media fields
+ media->write = MEDSdram_Write;
+ media->read = MEDSdram_Read;
+ media->lock = 0;
+ media->unlock = 0;
+ media->handler = 0;
+ media->flush = 0;
+
+ media->blockSize = blockSize;
+ media->baseAddress = baseAddress;
+ media->size = size;
+
+ media->mappedRD = 1;
+ media->mappedWR = 1;
+ media->protected = 0;
+ media->removable = 0;
+ media->state = MED_STATE_READY;
+
+ media->transfer.data = 0;
+ media->transfer.address = 0;
+ media->transfer.length = 0;
+ media->transfer.callback = 0;
+ media->transfer.argument = 0;
+}
+#endif //#if defined(AT91C_EBI_SDRAM)
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/Media.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/Media.c
new file mode 100644
index 0000000..0f16dd3
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/Media.c
@@ -0,0 +1,191 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+ * \file
+ *
+ * Implementation of media layer.
+ *
+ */
+
+/*------------------------------------------------------------------------------
+ * Headers
+ *------------------------------------------------------------------------------*/
+
+#include "memories.h"
+
+/*------------------------------------------------------------------------------
+ * Inline Functions
+ *------------------------------------------------------------------------------*/
+/**
+ * \brief Writes data on a media
+ * \param media Pointer to a Media instance
+ * \param address Address at which to write
+ * \param data Pointer to the data to write
+ * \param length Size of the data buffer
+ * \param callback Optional pointer to a callback function to invoke when
+ * the write operation terminates
+ * \param argument Optional argument for the callback function
+ * \return Operation result code
+ * \see TransferCallback
+ */
+extern uint32_t MED_Write( Media* pMedia, uint32_t address, void* data, uint32_t length, MediaCallback callback, void* argument )
+{
+ return pMedia->write( pMedia, address, data, length, callback, argument ) ;
+}
+
+/**
+ * \brief Reads a specified amount of data from a media
+ *
+ * \param media Pointer to a Media instance
+ * \param address Address of the data to read
+ * \param data Pointer to the buffer in which to store the retrieved
+ * data
+ * \param length Length of the buffer
+ * \param callback Optional pointer to a callback function to invoke when
+ * the operation is finished
+ * \param argument Optional pointer to an argument for the callback
+ * \return Operation result code
+ * \see TransferCallback
+ */
+extern uint32_t MED_Read( Media* pMedia, uint32_t address, void* data, uint32_t length, MediaCallback callback, void* argument )
+{
+ return pMedia->read( pMedia, address, data, length, callback, argument ) ;
+}
+
+/**
+ * \brief Locks all the regions in the given address range.
+ * \param media Pointer to a Media instance
+ * \param start Start address of lock range.
+ * \param end End address of lock range.
+ * \param pActualStart Start address of the actual lock range (optional).
+ * \param pActualEnd End address of the actual lock range (optional).
+ * \return 0 if successful; otherwise returns an error code.
+ */
+extern inline uint32_t MED_Lock( Media* pMedia, uint32_t start, uint32_t end, uint32_t *pActualStart, uint32_t *pActualEnd )
+{
+ if ( pMedia->lock )
+ {
+ return pMedia->lock( pMedia, start, end, pActualStart, pActualEnd ) ;
+ }
+ else
+ {
+ return MED_STATUS_SUCCESS ;
+ }
+}
+
+/**
+ * \brief Unlocks all the regions in the given address range
+ * \param media Pointer to a Media instance
+ * \param start Start address of unlock range.
+ * \param end End address of unlock range.
+ * \param pActualStart Start address of the actual unlock range (optional).
+ * \param pActualEnd End address of the actual unlock range (optional).
+ * \return 0 if successful; otherwise returns an error code.
+ */
+extern inline uint32_t MED_Unlock( Media* pMedia, uint32_t start, uint32_t end, uint32_t *pActualStart, uint32_t *pActualEnd )
+{
+ if ( pMedia->unlock )
+ {
+ return pMedia->unlock( pMedia, start, end, pActualStart, pActualEnd ) ;
+ }
+ else
+ {
+ return MED_STATUS_SUCCESS ;
+ }
+}
+
+/**
+ * \brief
+ * \param media Pointer to the Media instance to use
+ */
+extern uint32_t MED_Flush( Media* pMedia )
+{
+ if ( pMedia->flush )
+ {
+ return pMedia->flush( pMedia ) ;
+ }
+ else {
+
+ return MED_STATUS_SUCCESS ;
+ }
+}
+
+/**
+ * \brief Invokes the interrupt handler of the specified media
+ * \param media Pointer to the Media instance to use
+ */
+extern inline void MED_Handler( Media* pMedia )
+{
+ if ( pMedia->handler )
+ {
+ pMedia->handler( pMedia ) ;
+ }
+}
+
+/**
+ * \brief Reset the media interface to un-configured state.
+ * \param media Pointer to the Media instance to use
+ */
+extern inline void MED_DeInit( Media* pMedia )
+{
+ pMedia->state = MED_STATE_NOT_READY ;
+}
+
+/*
+ * \brief Check if the Media instance is ready to use.
+ * \param media Pointer to the Media instance to use
+ */
+extern inline uint32_t MED_IsInitialized( Media* pMedia )
+{
+ return (pMedia->state != MED_STATE_NOT_READY) ;
+}
+
+/*------------------------------------------------------------------------------
+ * Exported functions
+ *------------------------------------------------------------------------------*/
+
+/// Number of medias which are effectively used.
+uint32_t numMedias =0 ;
+
+/**
+ * \brief Handle interrupts on specified media
+ * \param pMedia List of media
+ * \param bNumMedia Number of media in list
+ * \see S_media
+ */
+extern void MED_HandleAll( Media* pMedia, uint8_t bNumMedia )
+{
+ // Check each media for interrupts to handle
+ uint32_t i ;
+
+ for ( i = 0 ; i < bNumMedia ; i++ )
+ {
+ MED_Handler( &(pMedia[i]) ) ;
+ }
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/build/gcc/Makefile b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/build/gcc/Makefile
new file mode 100644
index 0000000..8255bf3
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/build/gcc/Makefile
@@ -0,0 +1,56 @@
+# ----------------------------------------------------------------------------
+# ATMEL Microcontroller Software Support
+# ----------------------------------------------------------------------------
+# Copyright (c) 2010, Atmel Corporation
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# - Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the disclaimer below.
+#
+# Atmel's name may not be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+# DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# ----------------------------------------------------------------------------
+
+# Makefile for compiling libmemories
+
+SERIE = sam3x
+
+SUBMAKE_FILES=debug.mk gcc.mk iar.mk mdk.mk release.mk win.mk linux.mk libmemories.mk
+#SUBMAKE_OPTIONS=--no-builtin-rules --no-builtin-variables -d -p
+SUBMAKE_OPTIONS=--no-builtin-rules --no-builtin-variables
+SUBMAKE_VARS=
+
+#-------------------------------------------------------------------------------
+# Rules
+#-------------------------------------------------------------------------------
+
+all: $(SERIE)
+
+.PHONY: $(SERIE)
+$(SERIE):
+ @echo --- Making $(SERIE)
+ @$(MAKE) DEBUG=1 $(SUBMAKE_OPTIONS) -f libmemories.mk
+ @$(MAKE) $(SUBMAKE_OPTIONS) -f libmemories.mk
+
+.PHONY: clean
+clean:
+ @echo --- Cleaning $(SERIE)
+ @$(MAKE) $(SUBMAKE_OPTIONS) -f libmemories.mk $@
+ @$(MAKE) DEBUG=1 $(SUBMAKE_OPTIONS) -f libmemories.mk $@
+
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/build/gcc/debug.mk b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/build/gcc/debug.mk
new file mode 100644
index 0000000..c7f57b5
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/build/gcc/debug.mk
@@ -0,0 +1,18 @@
+
+# Trace level used for compilation
+# (can be overriden by adding TRACE_LEVEL=#number to the command-line)
+# TRACE_LEVEL_DEBUG 5
+# TRACE_LEVEL_INFO 4
+# TRACE_LEVEL_WARNING 3
+# TRACE_LEVEL_ERROR 2
+# TRACE_LEVEL_FATAL 1
+# TRACE_LEVEL_NO_TRACE 0
+TRACE_LEVEL = 3
+
+# Optimization level
+# -O1 Optimize
+# -O2 Optimize even more
+# -O3 Optimize yet more
+# -O0 Reduce compilation time and make debugging produce the expected results
+# -Os Optimize for size
+OPTIMIZATION = -g -O0 -D DEBUG
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/build/gcc/gcc.mk b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/build/gcc/gcc.mk
new file mode 100644
index 0000000..108f1e8
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/build/gcc/gcc.mk
@@ -0,0 +1,37 @@
+
+# Tool suffix when cross-compiling
+CROSS_COMPILE = arm-none-eabi-
+
+# Compilation tools
+AR = $(CROSS_COMPILE)ar
+CC = $(CROSS_COMPILE)gcc
+AS = $(CROSS_COMPILE)as
+LD = $(CROSS_COMPILE)ld
+SIZE = $(CROSS_COMPILE)size
+NM = $(CROSS_COMPILE)nm
+OBJCOPY = $(CROSS_COMPILE)objcopy
+
+# Flags
+
+CFLAGS += -Wall -Wchar-subscripts -Wcomment -Wformat=2 -Wimplicit-int
+CFLAGS += -Werror-implicit-function-declaration -Wmain -Wparentheses
+CFLAGS += -Wsequence-point -Wreturn-type -Wswitch -Wtrigraphs -Wunused
+CFLAGS += -Wuninitialized -Wunknown-pragmas -Wfloat-equal -Wundef
+CFLAGS += -Wshadow -Wpointer-arith -Wbad-function-cast -Wwrite-strings
+CFLAGS += -Wsign-compare -Waggregate-return -Wstrict-prototypes
+CFLAGS += -Wmissing-prototypes -Wmissing-declarations
+CFLAGS += -Wformat -Wmissing-format-attribute -Wno-deprecated-declarations
+CFLAGS += -Wpacked -Wredundant-decls -Wnested-externs -Winline -Wlong-long
+CFLAGS += -Wunreachable-code
+CFLAGS += -Wcast-align
+#CFLAGS += -Wmissing-noreturn
+#CFLAGS += -Wconversion
+
+CFLAGS += --param max-inline-insns-single=2000 -mcpu=cortex-m3 -mthumb -mlong-calls -ffunction-sections
+CFLAGS += $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -DTRACE_LEVEL=$(TRACE_LEVEL)
+
+# To reduce application size use only integer printf function.
+CFLAGS += -Dprintf=iprintf
+
+ASFLAGS = -mcpu=cortex-m3 -mthumb -Wall -g $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -D__ASSEMBLY__
+LDFLAGS = -g $(OPTIMIZATION) -nostartfiles -mcpu=cortex-m3 -mthumb -Wl,-Map=$(OUTPUT).map,--cref,--gc-sections
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/build/gcc/iar.mk b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/build/gcc/iar.mk
new file mode 100644
index 0000000..cc78e08
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/build/gcc/iar.mk
@@ -0,0 +1,15 @@
+
+# Compilation tools
+AR = iarchive.exe
+CC = iccarm.exe
+LD = ilinkarm.exe
+SIZE =
+OBJCOPY =
+
+# Flags
+
+CFLAGS += $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -DTRACE_LEVEL=$(TRACE_LEVEL)
+
+ASFLAGS = $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -D__ASSEMBLY__
+
+LDFLAGS =
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/build/gcc/libmemories.mk b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/build/gcc/libmemories.mk
new file mode 100644
index 0000000..8fb231f
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/build/gcc/libmemories.mk
@@ -0,0 +1,207 @@
+# ----------------------------------------------------------------------------
+# ATMEL Microcontroller Software Support
+# ----------------------------------------------------------------------------
+# Copyright (c) 2010, Atmel Corporation
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# - Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the disclaimer below.
+#
+# Atmel's name may not be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+# DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# ----------------------------------------------------------------------------
+
+# Makefile for compiling libmemories
+.SUFFIXES: .o .a .c .s
+SUB_MAKEFILES=debug.mk gcc.mk iar.mk mdk.mk release.mk win.mk linux.mk
+
+#-------------------------------------------------------------------------------
+# User-modifiable options
+#-------------------------------------------------------------------------------
+SERIE=sam3x
+CHIP=$(SERIE)8
+BOARD=$(SERIE)_ek
+LIBNAME=libmemories
+TOOLCHAIN=gcc
+
+#-------------------------------------------------------------------------------
+# we detect OS (Linux/Windows/Cygwin)
+# not defined for Cygwin
+#ifdef $(OS)
+ifeq ($(OS), Windows_NT)
+include win.mk
+else
+include linux.mk
+endif
+#else
+# Cygwin case
+#include linux.mk
+#endif
+
+#-------------------------------------------------------------------------------
+# Path
+#-------------------------------------------------------------------------------
+
+# Output directories
+OUTPUT_BIN = ../../lib
+
+# Libraries
+PROJECT_BASE_PATH = ../..
+
+#-------------------------------------------------------------------------------
+# Files
+#-------------------------------------------------------------------------------
+
+vpath %.h $(PROJECT_BASE_PATH)/include
+vpath %.c $(PROJECT_BASE_PATH)
+vpath %.c $(PROJECT_BASE_PATH)/nandflash
+vpath %.c $(PROJECT_BASE_PATH)/norflash
+vpath %.c $(PROJECT_BASE_PATH)/sdmmc
+vpath %.c $(PROJECT_BASE_PATH)/spi-flash
+
+VPATH+=$(PROJECT_BASE_PATH)
+VPATH+=$(PROJECT_BASE_PATH)/nandflash
+VPATH+=$(PROJECT_BASE_PATH)/norflash
+VPATH+=$(PROJECT_BASE_PATH)/sdmmc
+VPATH+=$(PROJECT_BASE_PATH)/spi-flash
+
+INCLUDES = -I$(PROJECT_BASE_PATH)
+INCLUDES += -I$(PROJECT_BASE_PATH)/include
+INCLUDES += -I$(PROJECT_BASE_PATH)/../libboard_$(SERIE)-ek
+INCLUDES += -I$(PROJECT_BASE_PATH)/../libchip_$(SERIE)
+
+#-------------------------------------------------------------------------------
+ifdef DEBUG
+include debug.mk
+else
+include release.mk
+endif
+
+#-------------------------------------------------------------------------------
+# Tools
+#-------------------------------------------------------------------------------
+
+include $(TOOLCHAIN).mk
+
+#-------------------------------------------------------------------------------
+ifdef DEBUG
+OUTPUT_OBJ=debug
+OUTPUT_LIB=$(LIBNAME)_$(SERIE)_$(TOOLCHAIN)_dbg.a
+else
+OUTPUT_OBJ=release
+OUTPUT_LIB=$(LIBNAME)_$(SERIE)_$(TOOLCHAIN)_rel.a
+endif
+
+OUTPUT_PATH=$(OUTPUT_OBJ)_$(BOARD)
+
+#-------------------------------------------------------------------------------
+# C source files and objects
+#-------------------------------------------------------------------------------
+C_SRC=$(wildcard $(PROJECT_BASE_PATH)/*.c)
+C_SRC+=$(wildcard $(PROJECT_BASE_PATH)/nandflash/*.c)
+C_SRC+=$(wildcard $(PROJECT_BASE_PATH)/norflash/*.c)
+C_SRC+=$(wildcard $(PROJECT_BASE_PATH)/sdmmc/*.c)
+C_SRC+=$(wildcard $(PROJECT_BASE_PATH)/spi-flash/*.c)
+
+C_OBJ_TEMP=$(patsubst %.c, %.o, $(notdir $(C_SRC)))
+
+# during development, remove some files
+C_OBJ_FILTER=at26.o
+C_OBJ_FILTER+=at26d.o
+C_OBJ_FILTER+=at45.o
+C_OBJ_FILTER+=at45d.o
+C_OBJ_FILTER+=spid.o
+C_OBJ_FILTER+=spid_dma.o
+C_OBJ_FILTER+=MEDSdcard.o
+C_OBJ_FILTER+=MEDSdmmc.o
+C_OBJ_FILTER+=sdcard.o
+C_OBJ_FILTER+=mci_cmd.o
+C_OBJ_FILTER+=mci_cmd_pdc.o
+
+ifneq '$(TOOLCHAIN)' 'gcc'
+C_OBJ_FILTER+=syscalls.o board_cstartup_gnu.o
+endif
+
+ifneq '$(TOOLCHAIN)' 'ewarm'
+C_OBJ_FILTER+=board_cstartup_iar.o
+endif
+
+ifneq '$(TOOLCHAIN)' 'mdk'
+C_OBJ_FILTER+=board_cstartup_keil.o
+endif
+
+C_OBJ=$(filter-out $(C_OBJ_FILTER), $(C_OBJ_TEMP))
+
+#-------------------------------------------------------------------------------
+# Assembler source files and objects
+#-------------------------------------------------------------------------------
+A_SRC=$(wildcard $(PROJECT_BASE_PATH)/source/*.s)
+
+A_OBJ_TEMP=$(patsubst %.s, %.o, $(notdir $(A_SRC)))
+
+# during development, remove some files
+A_OBJ_FILTER=
+
+A_OBJ=$(filter-out $(A_OBJ_FILTER), $(A_OBJ_TEMP))
+
+#-------------------------------------------------------------------------------
+# Rules
+#-------------------------------------------------------------------------------
+all: $(BOARD)
+
+$(BOARD): create_output $(OUTPUT_LIB)
+
+debug: create_output $(OUTPUT_LIB)
+
+release: create_output $(OUTPUT_LIB)
+
+.PHONY: create_output
+create_output: $(OUTPUT_PATH) $(subst /,$(SEP),$(OUTPUT_BIN))
+# @echo --- Preparing $(BOARD) files $(OUTPUT_PATH) $(OUTPUT_BIN) $(OS) $(TOOLCHAIN)
+# @echo -------------------------
+# @echo *$(C_SRC)
+# @echo -------------------------
+# @echo *$(C_OBJ)
+# @echo -------------------------
+# @echo *$(addprefix $(OUTPUT_PATH)/, $(C_OBJ))
+# @echo -------------------------
+# @echo *$(A_SRC)
+# @echo -------------------------
+
+$(OUTPUT_PATH) $(subst /,$(SEP),$(OUTPUT_BIN)):
+ mkdir $@
+
+$(addprefix $(OUTPUT_PATH)/,$(C_OBJ)): $(OUTPUT_PATH)/%.o: %.c
+ @$(CC) -c $(CFLAGS) $< -o $@
+
+$(addprefix $(OUTPUT_PATH)/,$(A_OBJ)): $(OUTPUT_PATH)/%.o: %.s
+ @$(AS) -c $(ASFLAGS) $< -o $@
+
+$(OUTPUT_LIB): $(addprefix $(OUTPUT_PATH)/, $(C_OBJ)) $(addprefix $(OUTPUT_PATH)/, $(A_OBJ))
+ @$(AR) -r $(OUTPUT_BIN)/$@ $^
+
+.PHONY: clean
+clean:
+ @echo --- Cleaning $(BOARD) files [$(OUTPUT_PATH)$(SEP)*.o]
+# -cs-rm -fR $(OUTPUT_PATH)
+# -cs-rm $(subst /,$(SEP),$(OUTPUT_BIN)/$(OUTPUT_LIB))
+
+ -@cs-rm -fR $(OUTPUT_PATH) 1>NUL 2>&1
+ -@cs-rm -fR $(OUTPUT_BIN)/$(OUTPUT_LIB) 1>NUL 2>&1
+
+$(addprefix $(OUTPUT_PATH)/,$(C_OBJ)):
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/build/gcc/linux.mk b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/build/gcc/linux.mk
new file mode 100644
index 0000000..08d2f9f
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/build/gcc/linux.mk
@@ -0,0 +1,4 @@
+
+RM=rm -f
+RMDIR=rm -fr
+SEP=/ \ No newline at end of file
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/build/gcc/readme.txt b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/build/gcc/readme.txt
new file mode 100644
index 0000000..ca8d397
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/build/gcc/readme.txt
@@ -0,0 +1,6 @@
+This makefile allows build of libmemories_???.a
+
+where
+??? could be dbg and rel (debug, release)
+
+It checks for source files (C and assembler) from folder ../../source then compiles them to build given library
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/build/gcc/release.mk b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/build/gcc/release.mk
new file mode 100644
index 0000000..74b2686
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/build/gcc/release.mk
@@ -0,0 +1,18 @@
+
+# Trace level used for compilation
+# (can be overriden by adding TRACE_LEVEL=#number to the command-line)
+# TRACE_LEVEL_DEBUG 5
+# TRACE_LEVEL_INFO 4
+# TRACE_LEVEL_WARNING 3
+# TRACE_LEVEL_ERROR 2
+# TRACE_LEVEL_FATAL 1
+# TRACE_LEVEL_NO_TRACE 0
+TRACE_LEVEL = 1
+
+# Optimization level
+# -O1 Optimize
+# -O2 Optimize even more
+# -O3 Optimize yet more
+# -O0 Reduce compilation time and make debugging produce the expected results
+# -Os Optimize for size
+OPTIMIZATION = -Os
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/build/gcc/win.mk b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/build/gcc/win.mk
new file mode 100644
index 0000000..67b3fa7
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/build/gcc/win.mk
@@ -0,0 +1,4 @@
+
+RM=del
+RMDIR=rmdir /s /q
+SEP=\ \ No newline at end of file
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/EccNandFlash.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/EccNandFlash.h
new file mode 100644
index 0000000..2c4a2e9
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/EccNandFlash.h
@@ -0,0 +1,83 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * EccNandFlash layer is called by SkipBlockNandFlash driver, it will call the bl driver (RawNandFlash)
+ * to do write/read operations, and do ECC check to the write/read result, it then will feedback the
+ * ecc check result to the upper SkipBlockNandFlash layer driver.
+ */
+
+#ifndef ECCNANDFLASH_H
+#define ECCNANDFLASH_H
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "RawNandFlash.h"
+
+/*----------------------------------------------------------------------------
+ * Types
+ *----------------------------------------------------------------------------*/
+
+struct EccNandFlash {
+
+ struct RawNandFlash raw;
+};
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+extern unsigned char EccNandFlash_Initialize(
+ struct EccNandFlash *ecc,
+ const struct NandFlashModel *model,
+ unsigned int commandAddress,
+ unsigned int addressAddress,
+ unsigned int dataAddress,
+ const Pin pinChipEnable,
+ const Pin pinReadyBusy);
+
+extern unsigned char EccNandFlash_ReadPage(
+ const struct EccNandFlash *ecc,
+ unsigned short block,
+ unsigned short page,
+ void *data,
+ void *spare);
+
+extern unsigned char EccNandFlash_WritePage(
+ const struct EccNandFlash *ecc,
+ unsigned short block,
+ unsigned short page,
+ void *data,
+ void *spare);
+
+#endif /*#ifndef ECCNANDFLASH_H */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/MEDDdram.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/MEDDdram.h
new file mode 100644
index 0000000..b6bea8e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/MEDDdram.h
@@ -0,0 +1,52 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+ * \file
+ *
+ * Include Defines & macros for the media layer interface for DDRAM.
+ */
+
+#ifndef MEDDDRAM_H
+#define MEDDDRAM_H
+
+/*------------------------------------------------------------------------------
+ * Headers
+ *------------------------------------------------------------------------------*/
+
+#include "Media.h"
+
+/*------------------------------------------------------------------------------
+ * Exported functions
+ *------------------------------------------------------------------------------*/
+extern void MEDDdram_Initialize(Media *media,
+ uint32_t blockSize,
+ uint32_t baseAddress,
+ uint32_t size);
+
+#endif //#ifndef MEDSDRAM_H
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/MEDFlash.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/MEDFlash.h
new file mode 100644
index 0000000..1069542
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/MEDFlash.h
@@ -0,0 +1,56 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ * \section Purpose
+ *
+ * Specialization of the Media class for interfacing with the internal Flash.
+ *
+ * \section Usage
+ *
+ */
+
+#ifndef _MEDFLASH_
+#define _MEDFLASH_
+
+/*------------------------------------------------------------------------------
+ * Headers
+ *------------------------------------------------------------------------------*/
+
+#include "Media.h"
+
+/*------------------------------------------------------------------------------
+ * Exported functions
+ *------------------------------------------------------------------------------*/
+
+extern void FLA_Initialize( Media* media, Efc* efc ) ;
+
+#endif /* #ifndef _MEDFLASH_ */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/MEDNandFlash.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/MEDNandFlash.h
new file mode 100644
index 0000000..ef385de
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/MEDNandFlash.h
@@ -0,0 +1,59 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+ * \file
+ *
+ * Include Defines & macros for the media layer interface for nand flash.
+ */
+
+#ifndef MEDNANDFLASH_H
+#define MEDNANDFLASH_H
+
+/*------------------------------------------------------------------------------
+ * Headers
+ *------------------------------------------------------------------------------*/
+
+#include "Media.h"
+
+/*------------------------------------------------------------------------------
+ * Forward declarations
+ *------------------------------------------------------------------------------*/
+
+struct TranslatedNandFlash;
+
+/*------------------------------------------------------------------------------
+ * Exported functions
+ *------------------------------------------------------------------------------*/
+
+extern void MEDNandFlash_Initialize(
+ Media *media,
+ struct TranslatedNandFlash *tnf);
+
+#endif //#ifndef MEDNANDFLASH_H
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/MEDRamDisk.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/MEDRamDisk.h
new file mode 100644
index 0000000..e39c8a5
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/MEDRamDisk.h
@@ -0,0 +1,53 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+ * \file
+ *
+ * Include Defines & macros for the media layer interface for RamDisk.
+ */
+
+#ifndef MEDRAMDISK_H
+#define MEDRAMDISK_H
+
+/*------------------------------------------------------------------------------
+ * Headers
+ *------------------------------------------------------------------------------*/
+
+#include <include/Media.h>
+
+/*------------------------------------------------------------------------------
+ * Exported functions
+ *------------------------------------------------------------------------------*/
+
+extern unsigned char MEDRamDisk_Initialize(Media *media,
+ uint32_t blockSize,
+ uint32_t baseAddress,
+ uint32_t size);
+
+#endif //#ifndef MEDRAMDISK_H
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/MEDSdcard.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/MEDSdcard.h
new file mode 100644
index 0000000..13aa721
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/MEDSdcard.h
@@ -0,0 +1,55 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+ * \file
+ *
+ * Include Defines & macros for the media layer interface for SdCard.
+ */
+
+#ifndef _MEDSDCARD_
+#define _MEDSDCARD_
+
+/*------------------------------------ ------------------------------------------
+ * Headers
+ *------------------------------------------------------------------------------*/
+
+#include "Media.h"
+#include "sdmmc.h"
+#include "sdmmc_cmd.h"
+/*------------------------------------------------------------------------------
+ * Exported functions
+ *------------------------------------------------------------------------------*/
+
+extern uint8_t MEDSdcard_Detect( Media *media, uint8_t mciID ) ;
+extern uint8_t MEDSdcard_Initialize( Media *media, sSdCard *pSdDrv) ;
+extern uint8_t MEDSdusb_Initialize( Media *media, sSdCard *pSdDrv) ;
+extern void MEDSdcard_EraseAll( Media *media ) ;
+extern void MEDSdcard_EraseBlock( Media *media, uint32_t block ) ;
+
+#endif /* #ifndef _MEDSDCARD_ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/MEDSdram.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/MEDSdram.h
new file mode 100644
index 0000000..fb60d4d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/MEDSdram.h
@@ -0,0 +1,52 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+ * \file
+ *
+ * Include Defines & macros for the media layer interface for Sdram.
+ */
+
+#ifndef MEDSDRAM_H
+#define MEDSDRAM_H
+
+/*------------------------------------------------------------------------------
+ * Headers
+ *------------------------------------------------------------------------------*/
+
+#include "Media.h"
+
+/*------------------------------------------------------------------------------
+ * Exported functions
+ *------------------------------------------------------------------------------*/
+
+extern void MEDSdram_Initialize(Media *media,
+ uint32_t blockSize,
+ uint32_t baseAddress,
+ uint32_t size);
+#endif //#ifndef MEDSDRAM_H
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/ManagedNandFlash.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/ManagedNandFlash.h
new file mode 100644
index 0000000..4f8a6b1
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/ManagedNandFlash.h
@@ -0,0 +1,152 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+ * \file
+ *
+ * Include Defines & macros for the managered nand flash layer.
+ */
+
+#ifndef MANAGEDNANDFLASH_H
+#define MANAGEDNANDFLASH_H
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "NandCommon.h"
+#include "EccNandFlash.h"
+
+/*----------------------------------------------------------------------------
+ * Definitions
+ *----------------------------------------------------------------------------*/
+
+#define NandBlockStatus_DEFAULT 0xF
+#define NandBlockStatus_FREE 0xE
+#define NandBlockStatus_LIVE 0xC
+#define NandBlockStatus_DIRTY 0x8
+#define NandBlockStatus_BAD 0x0
+
+/** Erase dirty blocks only*/
+#define NandEraseDIRTY 0
+/** Erase all data, calculate count*/
+#define NandEraseDATA 1
+/** Erase all, reset erase count */
+#define NandEraseFULL 2
+
+/*----------------------------------------------------------------------------
+ * Types
+ *----------------------------------------------------------------------------*/
+struct NandBlockStatus {
+
+ uint32_t status:4,
+ eraseCount:28;
+};
+
+struct ManagedNandFlash {
+
+ struct EccNandFlash ecc;
+ struct NandBlockStatus blockStatuses[NandCommon_MAXNUMBLOCKS];
+ uint16_t baseBlock;
+ uint16_t sizeInBlocks;
+};
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+extern uint8_t ManagedNandFlash_Initialize(
+ struct ManagedNandFlash *managed,
+ const struct NandFlashModel *model,
+ uint32_t commandAddress,
+ uint32_t addressAddress,
+ uint32_t dataAddress,
+ const Pin pinChipEnable,
+ const Pin pinReadyBusy,
+ uint16_t baseBlock,
+ uint16_t sizeInBlocks);
+
+extern uint8_t ManagedNandFlash_AllocateBlock(
+ struct ManagedNandFlash *managed,
+ uint16_t block);
+
+extern uint8_t ManagedNandFlash_ReleaseBlock(
+ struct ManagedNandFlash *managed,
+ uint16_t block);
+
+extern uint8_t ManagedNandFlash_EraseBlock(
+ struct ManagedNandFlash *managed,
+ uint16_t block);
+
+extern uint8_t ManagedNandFlash_ReadPage(
+ const struct ManagedNandFlash *managed,
+ uint16_t block,
+ uint16_t page,
+ void *data,
+ void *spare);
+
+extern uint8_t ManagedNandFlash_WritePage(
+ const struct ManagedNandFlash *managed,
+ uint16_t block,
+ uint16_t page,
+ void *data,
+ void *spare);
+
+extern uint8_t ManagedNandFlash_CopyPage(
+ const struct ManagedNandFlash *managed,
+ uint16_t sourceBlock,
+ uint16_t sourcePage,
+ uint16_t destBlock,
+ uint16_t destPage);
+
+extern uint8_t ManagedNandFlash_CopyBlock(
+ const struct ManagedNandFlash *managed,
+ uint16_t sourceBlock,
+ uint16_t destBlock);
+
+extern uint8_t ManagedNandFlash_EraseDirtyBlocks(
+ struct ManagedNandFlash *managed);
+
+extern uint8_t ManagedNandFlash_FindYoungestBlock(
+ const struct ManagedNandFlash *managed,
+ uint8_t status,
+ uint16_t *block);
+
+extern uint16_t ManagedNandFlash_CountBlocks(
+ const struct ManagedNandFlash *managed,
+ uint8_t status);
+
+extern uint16_t ManagedNandFlash_GetDeviceSizeInBlocks(
+ const struct ManagedNandFlash *managed);
+
+extern uint8_t ManagedNandFlash_EraseAll(
+ struct ManagedNandFlash *managed,
+ uint8_t level);
+
+#endif /*#ifndef MANAGEDNANDFLASH_H*/
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/MappedNandFlash.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/MappedNandFlash.h
new file mode 100644
index 0000000..6c7eb9e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/MappedNandFlash.h
@@ -0,0 +1,112 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+ * \file
+ *
+ * Include Defines & macros for the mapped nand flash layer.
+ */
+
+#ifndef MAPPEDNANDFLASH_H
+#define MAPPEDNANDFLASH_H
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "ManagedNandFlash.h"
+
+/*----------------------------------------------------------------------------
+ * Type
+ *----------------------------------------------------------------------------*/
+
+struct MappedNandFlash {
+
+ struct ManagedNandFlash managed;
+ int16_t logicalMapping[NandCommon_MAXNUMBLOCKS];
+ int16_t logicalMappingBlock;
+ uint8_t mappingModified;
+ uint8_t reserved;
+};
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+extern uint8_t MappedNandFlash_Initialize(
+ struct MappedNandFlash *mapped,
+ const struct NandFlashModel *model,
+ uint32_t commandAddress,
+ uint32_t addressAddress,
+ uint32_t dataAddress,
+ const Pin pinChipEnable,
+ const Pin pinReadyBusy,
+ uint16_t baseBlock,
+ uint16_t sizeInBlocks);
+
+extern uint8_t MappedNandFlash_ReadPage(
+ const struct MappedNandFlash *mapped,
+ uint16_t block,
+ uint16_t page,
+ void *data,
+ void *spare);
+
+extern uint8_t MappedNandFlash_WritePage(
+ const struct MappedNandFlash *mapped,
+ uint16_t block,
+ uint16_t page,
+ void *data,
+ void *spare);
+
+extern uint8_t MappedNandFlash_Map(
+ struct MappedNandFlash *mapped,
+ uint16_t logicalBlock,
+ uint16_t physicalBlock);
+
+extern uint8_t MappedNandFlash_Unmap(
+ struct MappedNandFlash *mapped,
+ uint16_t logicalBlock);
+
+extern int16_t MappedNandFlash_LogicalToPhysical(
+ const struct MappedNandFlash *mapped,
+ uint16_t logicalBlock);
+
+extern int16_t MappedNandFlash_PhysicalToLogical(
+ const struct MappedNandFlash *mapped,
+ uint16_t physicalBlock);
+
+extern uint8_t MappedNandFlash_SaveLogicalMapping(
+ struct MappedNandFlash *mapped,
+ uint16_t physicalBlock);
+
+extern uint8_t MappedNandFlash_EraseAll(
+ struct MappedNandFlash *mapped,
+ uint8_t level);
+
+#endif /* #ifndef MAPPEDNANDFLASH_H*/
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/Media.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/Media.h
new file mode 100644
index 0000000..648e262
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/Media.h
@@ -0,0 +1,163 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * \unit
+ * \section Purpose
+ *
+ * Generic Media type, which provides transparent access to all types of
+ * memories.
+ *
+ * \note The physical or HW related media operations (physical device
+ * connection & protection detecting, PIO configurations and interface
+ * driver initialization) are excluded.
+ *
+ * \section Usage
+ * -# Do PIO initialization for peripheral interfaces.
+ * -# Initialize peripheral interface driver & device driver.
+ * -# Initialize specific media interface and link to this initialized driver.
+ *
+ */
+
+#ifndef _MEDIA_
+#define _MEDIA_
+
+#include <stdint.h>
+
+/*------------------------------------------------------------------------------
+ * Definitions
+ *------------------------------------------------------------------------------*/
+
+/**
+ * \brief Operation result code returned by media methods
+ */
+#define MED_STATUS_SUCCESS 0x00
+#define MED_STATUS_ERROR 0x01
+#define MED_STATUS_BUSY 0x02
+#define MED_STATUS_PROTECTED 0x04
+
+/**
+ * \brief Media statuses
+ */
+#define MED_STATE_NOT_READY 0xFF /* Media is not connected */
+#define MED_STATE_READY 0x00 /* Media is ready for access */
+#define MED_STATE_BUSY 0x01 /* Media is busy */
+
+/*------------------------------------------------------------------------------
+// Types
+ *------------------------------------------------------------------------------*/
+typedef struct _Media Media ;
+
+typedef void (*MediaCallback)( void *argument, uint8_t status, uint32_t transferred, uint32_t remaining ) ;
+
+typedef uint8_t (*Media_write)( Media* pMedia, uint32_t address, void *data, uint32_t length, MediaCallback callback, void *argument ) ;
+
+typedef uint8_t (*Media_read)( Media* pMedia, uint32_t address, void *data, uint32_t length, MediaCallback callback, void *argument ) ;
+
+typedef uint8_t (*Media_cancelIo)( Media* pMedia ) ;
+
+typedef uint8_t (*Media_lock)( Media* pMedia, uint32_t start, uint32_t end, uint32_t *pActualStart, uint32_t *pActualEnd ) ;
+
+typedef uint8_t (*Media_unlock)( Media* pMedia, uint32_t start, uint32_t end, uint32_t *pActualStart, uint32_t *pActualEnd ) ;
+
+typedef uint8_t (*Media_ioctl)( Media* pMedia, uint8_t ctrl, void *buff ) ;
+
+typedef uint8_t (*Media_flush)( Media* pMedia ) ;
+
+typedef void (*Media_handler)( Media* pMedia ) ;
+
+/**
+ * \brief Media transfer
+ * \see TransferCallback
+ */
+typedef struct
+{
+ void* data ; /* < Pointer to the data buffer */
+ uint32_t address ; /* < Address where to read/write the data */
+ uint32_t length ; /* < Size of the data to read/write */
+ MediaCallback callback; /* < Callback to invoke when the transfer done */
+ void* argument ; /* < Callback argument */
+} MEDTransfer ;
+
+/**
+ * \brief Media object
+ * \see MEDTransfer
+ */
+struct _Media
+{
+ Media_write write; /* < Write method */
+ Media_read read; /* < Read method */
+ Media_cancelIo cancelIo; /* < Cancel pending IO method */
+ Media_lock lock; /* < lock method if possible */
+ Media_unlock unlock; /* < unlock method if possible */
+ Media_flush flush; /* < Flush method */
+ Media_handler handler; /* < Interrupt handler */
+
+ uint32_t blockSize; /* < Block size in bytes (1, 512, 1K, 2K ...) */
+ uint32_t baseAddress; /* < Base address of media in number of blocks */
+ uint32_t size; /* < Size of media in number of blocks */
+ MEDTransfer transfer; /* < Current transfer operation */
+ void *interface; /* < Pointer to the physical interface used */
+ uint8_t bReserved:4,
+ mappedRD:1, /* < Mapped to memory space to read */
+ mappedWR:1, /* < Mapped to memory space to write */
+ protected:1, /* < Protected media? */
+ removable:1; /* < Removable/Fixed media? */
+
+ uint8_t state; /* < Status of media */
+ uint16_t reserved ;
+} ;
+
+/* Available medias. */
+//extern Media medias[] ;
+
+/*
+ * Number of medias which are effectively used.
+ * Defined by Media, shared usage by USB MSD & FS ...
+ */
+extern uint32_t numMedias ;
+
+/*------------------------------------------------------------------------------
+ * Exported functions
+ *------------------------------------------------------------------------------*/
+extern uint32_t MED_Write( Media* pMedia, uint32_t address, void* data, uint32_t length, MediaCallback callback, void* argument ) ;
+extern uint32_t MED_Read( Media* pMedia, uint32_t address, void* data, uint32_t length, MediaCallback callback, void* argument ) ;
+extern uint32_t MED_Lock( Media* pMedia, uint32_t start, uint32_t end, uint32_t *pActualStart, uint32_t *pActualEnd ) ;
+extern uint32_t MED_Unlock( Media* pMedia, uint32_t start, uint32_t end, uint32_t *pActualStart, uint32_t *pActualEnd ) ;
+extern uint32_t MED_Flush( Media* pMedia ) ;
+extern void MED_Handler( Media* pMedia ) ;
+extern void MED_DeInit( Media* pMedia ) ;
+extern uint32_t MED_IsInitialized( Media* pMedia ) ;
+
+extern void MED_HandleAll( Media *medias, uint8_t numMedias ) ;
+
+#endif /* _MEDIA_ */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/NandCommon.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/NandCommon.h
new file mode 100644
index 0000000..e41f5f1
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/NandCommon.h
@@ -0,0 +1,133 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+#ifndef NANDCOMMON_H
+#define NANDCOMMON_H
+
+/*----------------------------------------------------------------------------
+ * Definitions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \file
+ * NandFlash Maximum Supported Values
+ * Since no memory allocation is available, limits have been set on various
+ * characteristics of a NandFlash chip:
+ *
+ * Maximums
+ * - NandCommon_MAXNUMBLOCKS
+ * - NandCommon_MAXNUMPAGESPERBLOCK
+ * - NandCommon_MAXPAGESIZE
+ */
+
+/** Maximum number of blocks in a device */
+#define NandCommon_MAXNUMBLOCKS 1024 //2048
+
+/** Maximum number of pages in one block*/
+#define NandCommon_MAXNUMPAGESPERBLOCK 256 //64
+
+/** Maximum size of the data area of one page, in bytes.*/
+#if !defined(NF_MAXPAGESIZE_SUPPORT_2K)
+#define NandCommon_MAXPAGEDATASIZE 4096 //2048
+#else
+#define NandCommon_MAXPAGEDATASIZE 2048
+#endif
+
+/** Maximum size of the spare area of one page, in bytes.*/
+#define NandCommon_MAXPAGESPARESIZE 128 //64
+
+/** Maximum number of ecc bytes stored in the spare for one single page.*/
+#define NandCommon_MAXSPAREECCBYTES 48 //24
+
+/** Maximum number of extra free bytes inside the spare area of a page.*/
+#define NandCommon_MAXSPAREEXTRABYTES 78 //38
+
+
+/**
+ * NandFlash Error Codes
+ * NandFlash API methods return either 0 (indicating that there was no error),
+ * or one of the following error codes:
+ *
+ * - NandCommon_ERROR_NOMOREBLOCKS
+ * - NandCommon_ERROR_BLOCKNOTMAPPED
+ * - NandCommon_ERROR_OUTOFBOUNDS
+ *- NandCommon_ERROR_MAPPINGNOTFOUND
+ * - NandCommon_ERROR_CANNOTREAD
+ */
+
+/** No more blocks can be allocated for a write operation.*/
+#define NandCommon_ERROR_NOMOREBLOCKS 1
+
+/** The desired logical block has no current physical mapping.*/
+#define NandCommon_ERROR_BLOCKNOTMAPPED 2
+
+/** Access if out-of-bounds.*/
+#define NandCommon_ERROR_OUTOFBOUNDS 3
+
+/** There are no block having the desired property.*/
+#define NandCommon_ERROR_NOBLOCKFOUND 4
+
+/** The nandflash device has no logical mapping information on it.*/
+#define NandCommon_ERROR_MAPPINGNOTFOUND 5
+
+/** A read operation cannot be carried out.*/
+#define NandCommon_ERROR_CANNOTREAD 6
+
+/** A write operation cannot be carried out.*/
+#define NandCommon_ERROR_CANNOTWRITE 7
+
+/** NandFlash chip model cannot be recognized.*/
+#define NandCommon_ERROR_UNKNOWNMODEL 8
+
+/** Page data is corrupted according to ECC*/
+#define NandCommon_ERROR_CORRUPTEDDATA 9
+
+/** Block is not in the required status.*/
+#define NandCommon_ERROR_WRONGSTATUS 10
+
+/** Device has no logical mapping stored in it*/
+#define NandCommon_ERROR_NOMAPPING 11
+
+/** The block being accessed is bad and must be replaced*/
+#define NandCommon_ERROR_BADBLOCK 12
+
+/** Failed to perform an erase operation*/
+#define NandCommon_ERROR_CANNOTERASE 13
+
+/** A hardware copyback operation failed.*/
+#define NandCommon_ERROR_CANNOTCOPY 14
+
+/** HW Ecc Not compatible with the Nand Model*/
+#define NandCommon_ERROR_ECC_NOT_COMPATIBLE 15
+
+/** DMA failed. */
+#define NandCommon_ERROR_DMA 16
+
+#endif /*#ifndef NANDCOMMON_H */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/NandFlashDma.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/NandFlashDma.h
new file mode 100644
index 0000000..ffe9171
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/NandFlashDma.h
@@ -0,0 +1,55 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+ * \file
+ *
+ * Include function prototype for the nand flash dma driver.
+ */
+
+#ifndef NANDDMA_H
+#define NANDDMA_H
+#include "NandCommon.h"
+
+/*------------------------------------------------------------------------------
+ * Exported functions
+ *------------------------------------------------------------------------------ */
+extern uint8_t NandFlashConfigureDmaChannels( sDmad *pDmad );
+extern uint8_t NandFlashDmaTransferRam2Nand(
+ uint32_t dwNfcAddr,
+ uint32_t dwRamAddr,
+ uint32_t dwSize );
+extern uint8_t NandFlashDmaTransferNand2Ram(
+ uint32_t dwNfcAddr,
+ uint32_t dwRamAddr,
+ uint32_t dwSize );
+extern uint8_t NandFlashIsDmaActived( void );
+extern void NandFlashFreeDma( void );
+
+#endif /*#ifndef NANDDMA_H */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/NandFlashModel.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/NandFlashModel.h
new file mode 100644
index 0000000..fabe30f
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/NandFlashModel.h
@@ -0,0 +1,158 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * Type and methods for manipulating NandFlash models.
+ *
+ * -# Find the model of a NandFlash using its device ID with the NandFlashModel_Find function.
+ *
+ * -# Retrieve parameters of a NandFlash model using the following functions:
+ * - NandFlashModel_GetDeviceId
+ * - NandFlashModel_GetDeviceSizeInBlocks
+ * - NandFlashModel_GetDeviceSizeInPages
+ * - NandFlashModel_GetDeviceSizeInBytes
+ * - NandFlashModel_GetBlockSizeInPages
+ * - NandFlashModel_GetBlockSizeInBytes
+ * - NandFlashModel_GetPageDataSize
+ * - NandFlashModel_GetPageSpareSize
+ * - NandFlashModel_GetDataBusWidth
+ * - NandFlashModel_UsesSmallBlocksRead
+ * - NandFlashModel_UsesSmallBlocksWrite
+ */
+
+#ifndef NANDFLASHMODEL_H
+#define NANDFLASHMODEL_H
+
+/*----------------------------------------------------------------------------
+ * Forward declarations
+ *----------------------------------------------------------------------------*/
+struct NandSpareScheme;
+
+/*----------------------------------------------------------------------------
+ * Definitions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * NandFlashModel_opts NandFlashModel options
+ * - NandFlashModel_DATABUS8
+ * - NandFlashModel_DATABUS16
+ * - NandFlashModel_COPYBACK
+*/
+
+/** Indicates the Nand uses an 8-bit databus. */
+#define NandFlashModel_DATABUS8 (0 << 0)
+
+/** Indicates the Nand uses a 16-bit databus.*/
+#define NandFlashModel_DATABUS16 (1 << 0)
+
+/** The Nand supports the copy-back function (internal page-to-page copy).*/
+#define NandFlashModel_COPYBACK (1 << 1)
+
+
+/*----------------------------------------------------------------------------
+ * Types
+ *----------------------------------------------------------------------------*/
+
+/** \brief Describes a particular model of NandFlash device.*/
+struct NandFlashModel {
+
+ /** Identifier for the device.*/
+ uint8_t deviceId;
+ /** Special options for the NandFlash.*/
+ uint8_t options;
+ /** Size of the data area of a page, in bytes.*/
+ uint16_t pageSizeInBytes;
+ /** Size of the device in MB.*/
+ uint16_t deviceSizeInMegaBytes;
+ /** Size of one block in kilobytes.*/
+ uint16_t blockSizeInKBytes;
+ /** Spare area placement scheme*/
+ const struct NandSpareScheme *scheme;
+};
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+extern uint8_t NandFlashModel_Find(
+ const struct NandFlashModel *modelList,
+ uint32_t size,
+ uint32_t id,
+ struct NandFlashModel *model);
+
+extern uint8_t NandFlashModel_TranslateAccess(
+ const struct NandFlashModel *model,
+ uint32_t address,
+ uint32_t size,
+ uint16_t *block,
+ uint16_t *page,
+ uint16_t *offset);
+
+extern const struct NandSpareScheme * NandFlashModel_GetScheme(
+ const struct NandFlashModel *model);
+
+extern uint8_t NandFlashModel_GetDeviceId(
+ const struct NandFlashModel *model);
+
+extern uint16_t NandFlashModel_GetDeviceSizeInBlocks(
+ const struct NandFlashModel *model);
+
+extern uint32_t NandFlashModel_GetDeviceSizeInPages(
+ const struct NandFlashModel *model);
+
+extern unsigned long long NandFlashModel_GetDeviceSizeInBytes(
+ const struct NandFlashModel *model);
+
+extern uint32_t NandFlashModel_GetDeviceSizeInMBytes(
+ const struct NandFlashModel *model);
+
+extern uint16_t NandFlashModel_GetBlockSizeInPages(
+ const struct NandFlashModel *model);
+
+extern uint32_t NandFlashModel_GetBlockSizeInBytes(
+ const struct NandFlashModel *model);
+
+extern uint16_t NandFlashModel_GetPageDataSize(
+ const struct NandFlashModel *model);
+
+extern uint8_t NandFlashModel_GetPageSpareSize(
+ const struct NandFlashModel *model);
+
+extern uint8_t NandFlashModel_GetDataBusWidth(
+ const struct NandFlashModel *model);
+
+extern uint8_t NandFlashModel_HasSmallBlocks(
+ const struct NandFlashModel *model);
+
+extern uint8_t NandFlashModel_SupportsCopyBack(
+ const struct NandFlashModel *model);
+
+#endif /*#ifndef NANDFLASHMODEL_H*/
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/NandFlashModelList.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/NandFlashModelList.h
new file mode 100644
index 0000000..2bde91a
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/NandFlashModelList.h
@@ -0,0 +1,62 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * Static array of the various NandFlashModels which are supported.
+ *
+ * -# Uses the NandFlashModel_Find function to look for a particular model in
+ * the nandFlashModelList array.
+ */
+
+#ifndef NANDFLASHMODELLIST_H
+#define NANDFLASHMODELLIST_H
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "NandFlashModel.h"
+
+/*----------------------------------------------------------------------------
+ * Definitions
+ *----------------------------------------------------------------------------*/
+
+/** Number of NandFlash models inside the list. */
+#define NandFlashModelList_SIZE 58
+
+/*----------------------------------------------------------------------------
+ * Exported variables
+ *----------------------------------------------------------------------------*/
+
+extern const struct NandFlashModel nandFlashModelList[NandFlashModelList_SIZE];
+
+#endif /*#ifndef NANDFLASHMODELLIST_H */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/NandSpareScheme.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/NandSpareScheme.h
new file mode 100644
index 0000000..4621359
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/NandSpareScheme.h
@@ -0,0 +1,105 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * Include Defines & macros for the nand flash spare scheme.
+ */
+
+#ifndef NANDSPARESCHEME_H
+#define NANDSPARESCHEME_H
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "NandCommon.h"
+
+/*----------------------------------------------------------------------------
+ * Type
+ *----------------------------------------------------------------------------*/
+
+struct NandSpareScheme {
+
+ uint8_t badBlockMarkerPosition;
+ uint8_t numEccBytes;
+ uint8_t eccBytesPositions[NandCommon_MAXSPAREECCBYTES];
+ uint8_t numExtraBytes;
+ uint8_t extraBytesPositions[NandCommon_MAXSPAREEXTRABYTES];
+};
+
+/*----------------------------------------------------------------------------
+ * Exported variables
+ *----------------------------------------------------------------------------*/
+extern const struct NandSpareScheme nandSpareScheme256;
+extern const struct NandSpareScheme nandSpareScheme512;
+extern const struct NandSpareScheme nandSpareScheme2048;
+extern const struct NandSpareScheme nandSpareScheme4096;
+
+/*----------------------------------------------------------------------------
+ * Exported function
+ *----------------------------------------------------------------------------*/
+
+extern void NandSpareScheme_ReadBadBlockMarker(
+ const struct NandSpareScheme *scheme,
+ const uint8_t *spare,
+ uint8_t *marker);
+
+extern void NandSpareScheme_WriteBadBlockMarker(
+ const struct NandSpareScheme *scheme,
+ uint8_t *spare,
+ uint8_t marker);
+
+extern void NandSpareScheme_ReadEcc(
+ const struct NandSpareScheme *scheme,
+ const uint8_t *spare,
+ uint8_t *ecc);
+
+extern void NandSpareScheme_WriteEcc(
+ const struct NandSpareScheme *scheme,
+ uint8_t *spare,
+ const uint8_t *ecc);
+
+extern void NandSpareScheme_ReadExtra(
+ const struct NandSpareScheme *scheme,
+ const uint8_t *spare,
+ void *extra,
+ uint8_t size,
+ uint8_t offset);
+
+extern void NandSpareScheme_WriteExtra(
+ const struct NandSpareScheme *scheme,
+ uint8_t *spare,
+ const void *extra,
+ uint8_t size,
+ uint8_t offset);
+
+#endif /*#ifndef NANDSPARESCHEME_H*/
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/NorFlashAmd.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/NorFlashAmd.h
new file mode 100644
index 0000000..5082a54
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/NorFlashAmd.h
@@ -0,0 +1,92 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * \section Purpose
+ *
+ * The AMD %norflash Low-level driver code implement procedures to program
+ * basic operations described AMD-specified command set flash devices.
+ * The various commands recognized by the devices are listed in the Commands
+ * Tables provided in the corresponding AMD command set compatible flash
+ * datasheets. All operation functions are blocked, they wait for the
+ * completion of an operation by polling the status register.
+ *
+ * \section Usage
+ * -# Flash program using AMD_Write_Data().
+ * - The Program command is used to modify the data stored at the
+ * specified device address. Programming can only change bits
+ * from ¡®1¡¯ to ¡®0¡¯. It may be necessary to erase the block before
+ * programming to addresses within it. Programming modifies a single
+ * Word at a time using static function amd_Program(). Programming
+ * larger amounts of data must be done in one Word at a time by
+ * giving a Program command, waiting for the command to complete,
+ * giving the next Program command and so on.
+ * -# erase a block within the flash using AMD_EraseSector().
+ * - Flash erase is performed on a block basis. An entire block is
+ * erased each time an erase command sequence is given.
+ * -# erase whole blocks within the flash using AMD_EraseChip().
+ * -# AMD_Reset() function can be issued, between Bus Write cycles
+ * before the start of a program or erase operation, to return the
+ * device to read mode.
+ * -# AMD_ReadDeviceID() is used to retrieve information
+ * about the Flash Device type.
+ * -# AMD_ReadManufactoryId() is used to retrieve information
+ * about the Flash Device Manufactory ID.
+ */
+
+#ifndef _NORFLASH_AMD_
+#define _NORFLASH_AMD_
+
+#include "NorFlashApi.h"
+
+#include <stdint.h>
+
+/*----------------------------------------------------------------------------
+ * Local functions
+ *----------------------------------------------------------------------------*/
+
+void AMD_Reset( NorFlashInfo *pNorFlashInfo, uint32_t address);
+
+uint32_t AMD_ReadManufactoryId( NorFlashInfo *pNorFlashInfo);
+
+uint32_t AMD_ReadDeviceID( NorFlashInfo *pNorFlashInfo);
+
+uint8_t AMD_EraseSector( NorFlashInfo *pNorFlashInfo, uint32_t sectorAddr);
+
+uint8_t AMD_EraseChip( NorFlashInfo *pNorFlashInfo);
+
+uint8_t AMD_Write_Data( NorFlashInfo *pNorFlashInfo, uint32_t address, uint8_t *buffer, uint32_t size ) ;
+
+void AMD_UnlockSector( NorFlashInfo *pNorFlashInfo, uint32_t address );
+
+extern const NorFlashOperations amdOperations ;
+
+#endif /* #ifndef _NORFLASH_AMD_ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/NorFlashApi.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/NorFlashApi.h
new file mode 100644
index 0000000..c7bd91b
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/NorFlashApi.h
@@ -0,0 +1,95 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * \section Purpose
+ *
+ * The API layer consists of several functions that allow user to do
+ * operations with flash in a unified way. As a result, future device changes
+ * will not necessarily lead to the code changes in the application environments.
+ * In this %norflash library we support AMD and INTEL command set.
+ * The API layar code accesses the Flash memory by calling the low-level code,
+ * so users do not have to concern themselves with the details of the special
+ * command sequences.
+ *
+ * \section Usage
+ *
+ * -# Flash program using NORFLASH_WriteData().
+ * - The Program command is used to modify the data stored at the
+ * specified device address.
+ * -# erase a block within the flash using NORFLASH_EraseSector().
+ * - Flash erase is performed on a block basis. An entire block is
+ * erased each time an erase command sequence is given.
+ * -# erase whole blocks within the flash using NORFLASH_EraseChip().
+ * -# NORFLASH_Reset() function can be issued, between Bus Write cycles
+ * before the start of a program or erase operation, to return the
+ * device to read mode.
+ * -# NORFLASH_ReadDeviceID() is used to retrieve information
+ * about the Flash Device type.
+ * -# NORFLASH_ReadManufactoryID() is used to retrieve information
+ * about the Flash Device Manufactory ID.
+ */
+
+#ifndef _NORFLASH_API_
+#define _NORFLASH_API_
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "NorFlashCFI.h"
+
+/*----------------------------------------------------------------------------
+ * Types
+ *----------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+extern void NORFLASH_Reset( NorFlash *norFlash, uint32_t address ) ;
+
+extern uint32_t NORFLASH_ReadManufactoryID( NorFlash *norFlash ) ;
+
+extern uint32_t NORFLASH_ReadDeviceID( NorFlash *norFlash ) ;
+
+extern uint8_t NORFLASH_EraseSector( NorFlash *norFlash, uint32_t sectorAddr ) ;
+
+extern uint8_t NORFLASH_EraseChip( NorFlash *norFlash ) ;
+
+extern void NORFLASH_UnlockSector( NorFlash *pNorFlash, uint32_t address);
+
+extern uint8_t NORFLASH_WriteData( NorFlash *norFlash, uint32_t address, uint8_t *buffer, uint32_t size ) ;
+
+extern uint8_t NORFLASH_ReadData( NorFlash *norFlash, uint32_t address, uint8_t *buffer, uint32_t size ) ;
+
+#endif /* #ifndef _NORFLASH_API_ */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/NorFlashCFI.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/NorFlashCFI.h
new file mode 100644
index 0000000..28b7d7b
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/NorFlashCFI.h
@@ -0,0 +1,239 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+ * \file
+ *
+ * Include Defines & macros for the nor flash Common Flash Interface layer.
+ */
+
+#ifndef _NORFLASHCFI_
+#define _NORFLASHCFI_
+
+#include <stdint.h>
+
+/*----------------------------------------------------------------------------
+ * Definitions
+ *----------------------------------------------------------------------------*/
+
+#define CFI_MAX_ERASE_REGION 4
+
+/** Common flash interface query command. */
+#define CFI_QUERY_COMMAND 0x98
+#define CFI_QUERY_ADDRESS 0x55
+#define CFI_QUERY_OFFSET 0x10
+
+/** Vendor command set control interface ID code . */
+#define CMD_SET_NULL 0x0000
+#define CMD_SET_INTEL_EXT 0x0001
+#define CMD_SET_AMD 0x0002
+#define CMD_SET_INTEL 0x0003
+#define CMD_SET_AMD_EXT 0x0004
+#define CMD_SET_MISUBISHI 0x0100
+#define CMD_SET_MISUBISHI_EXT 0x0101
+#define CMD_SET_SST 0x0102
+
+/** Indicates the maximum region for norflash device. */
+#define NORFLASH_MAXNUMRIGONS 4
+/** Indicates the NorFlash uses an 8-bit address bus. */
+#define FLASH_CHIP_WIDTH_8BITS 0x01
+/** Indicates the NorFlash uses an 16-bit address bus. */
+#define FLASH_CHIP_WIDTH_16BITS 0x02
+/** Indicates the NorFlash uses an 32-bit address bus. */
+#define FLASH_CHIP_WIDTH_32BITS 0x04
+/** Indicates the NorFlash uses an 64-bit address bus. */
+#define FLASH_CHIP_WIDTH_64BITS 0x08
+
+/*----------------------------------------------------------------------------
+ * Types
+ *----------------------------------------------------------------------------*/
+
+/** \brief Describes a Norflash CFI query system interface information. */
+#ifdef __ICCARM__ /* IAR */
+#pragma pack(1) /* IAR */
+#define __attribute__(...) /* IAR */
+#endif /* IAR */
+
+typedef struct _NorFlashCfiQueryInfo
+{
+ /** Query Unique String "QRY". */
+ uint8_t queryUniqueString[3];
+ /** Primary vendor command set and control interface ID . */
+ uint16_t primaryCode;
+ /** Address for primary extended query table. */
+ uint16_t primaryAddr;
+ /** Alternate vendor command set and control interface ID . */
+ uint16_t alternateCode;
+ /** Address for alternate extended query table. */
+ uint16_t alternateAddr;
+ /** Vcc logic supply minimum write/erase voltage. */
+ uint8_t minVcc;
+ /** Vcc logic supply maximum write/erase voltage. */
+ uint8_t maxVcc;
+ /** Vpp logic supply minimum write/erase voltage. */
+ uint8_t minVpp;
+ /** Vpp logic supply maximum write/erase voltage. */
+ uint8_t maxVpp;
+ /** Timeout per single write (2<<n) in microsecond. */
+ uint8_t minTimeOutWrite;
+ /** Timeout for minimum-size buffer write (2<<n) in microsecond. */
+ uint8_t minTimeOutBuffer;
+ /** Timeout for block erase (2<<n) in microsecond. */
+ uint8_t minTimeOutBlockErase;
+ /** Timeout for chip erase (2<<n) in microsecond. */
+ uint8_t minTimeOutChipErase;
+ /** Maximum timeout per write (2<<n) in microsecond. */
+ uint8_t maxTimeOutWrite;
+ /** Maximum timeout for buffer write (2<<n) in microsecond. */
+ uint8_t maxTimeOutBuffer;
+ /** Maximum timeout for block erase (2<<n) in microsecond. */
+ uint8_t maxTimeOutBlockErase;
+ /** Maximum timeout for chip erase (2<<n) in microsecond. */
+ uint8_t maxTimeOutChipErase;
+} __attribute__ ((packed)) NorFlashCfiQueryInfo;
+
+/** \brief Describes a Norflash CFI Erase block Region information. */
+typedef struct _EraseRegionInfo
+{
+ /** Number of erase blocks within the region. */
+ uint16_t Y;
+ /** Size within the region. */
+ uint16_t Z;
+} __attribute__ ((packed)) EraseRegionInfo;
+
+/**\brief Describes a Norflash CFI critical details of device geometry. */
+typedef struct _NorFlashCfiDeviceGeometry
+{
+ /** Size of Device (2<<n) in number of bytes. */
+ uint8_t deviceSize;
+ /** Flash device interface description. */
+ uint16_t deviceInterface;
+ /** Maximum number of bytes in multi-byte write (2<<n). */
+ uint16_t numMultiWrite;
+ /** Number of erase block regions. */
+ uint8_t numEraseRegion;
+ /** Erase block Region information. */
+ EraseRegionInfo eraseRegionInfo[16];
+} __attribute__ ((packed)) NorFlashCfiDeviceGeometry;
+
+#ifdef __ICCARM__ /* IAR */
+#pragma pack() /* IAR */
+#endif /* IAR */
+
+/** \brief Describes a Norflash Common Flash Interface information. */
+typedef struct _NorFlashCFI
+{
+ /**CFI query system interface information. */
+ NorFlashCfiQueryInfo norFlashCfiQueryInfo;
+ /** CFI critical details of device geometry. */
+ NorFlashCfiDeviceGeometry norFlashCfiDeviceGeometry;
+} NorFlashCFI ;
+
+/** \brief Describes a particular model of NandFlash device. */
+typedef struct _NorFlashInfo
+{
+ /** Base address. */
+ uint32_t baseAddress;
+ /** Address bus using giving by CFI detection. */
+ /** It can not retrieve info directly from the NorFlashCFI, it depend on hardware connection. */
+ uint8_t deviceChipWidth;
+ /** Indicate the decive CFI is compatible */
+ uint8_t cfiCompatible;
+ /** Norflash Common Flash Interface information. */
+ NorFlashCFI cfiDescription;
+} NorFlashInfo ;
+
+///** Reset or exit CFI query mode function. */
+//typedef void (*fReset) ( NorFlashInfo *, uint32_t ) ;
+///** Write buffer to pNorFlash function. */
+//typedef uint8_t (*fWriteData)( NorFlashInfo *, uint32_t , uint8_t *, uint32_t ) ;
+///** Read manufactory function. */
+//typedef uint32_t (*fReadManufactoryID)( NorFlashInfo * ) ;
+///** Read device ID code function. */
+//typedef uint32_t (*fReadDeviceID)( NorFlashInfo * ) ;
+///** Full erase chip function. */
+//typedef uint8_t (*fEraseChip) ( NorFlashInfo * ) ;
+///** Erase single sector function. */
+//typedef uint8_t (*fEraseSector)( NorFlashInfo *, uint32_t ) ;
+//
+
+typedef struct _NorFlashOperations
+{
+ /** Reset or exit CFI query mode function. */
+ void (*_fReset)( NorFlashInfo *pNorFlashInfo, uint32_t address ) ;
+ /** Write buffer to norflash function. */
+ uint8_t (*_fWriteData)( NorFlashInfo *pNorFlashInfo, uint32_t address, uint8_t *buffer, uint32_t size ) ;
+ /** Read manufactory function. */
+ uint32_t (*_fReadManufactoryID)( NorFlashInfo *pNorFlashInfo ) ;
+ /** Read device ID code function. */
+ uint32_t (*_fReadDeviceID)( NorFlashInfo *pNorFlashInfo ) ;
+ /** Full erase chip function. */
+ uint8_t (*_fEraseChip) ( NorFlashInfo *pNorFlashInfo ) ;
+ /** Erase single sector function. */
+ uint8_t (*_fEraseSector)( NorFlashInfo *pNorFlashInfo, uint32_t address ) ;
+ /** Unlock single sector function. */
+ void (*_fUnlockSector)( NorFlashInfo *pNorFlashInfo, uint32_t address ) ;
+} NorFlashOperations ;
+
+/** \brief Describes a particular model of NandFlash device. */
+typedef struct _NorFlash
+{
+ const NorFlashOperations *pOperations;
+ NorFlashInfo norFlashInfo;
+} NorFlash ;
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+extern uint8_t NorFlash_CFI_Detect( NorFlash *norFlash, uint8_t hardwareBusWidth ) ;
+
+extern uint32_t NorFlash_GetDeviceNumOfBlocks( NorFlashInfo *pNorFlashInfo);
+
+extern uint32_t NorFlash_GetDeviceMinBlockSize(NorFlashInfo *pNorFlashInfo);
+
+extern uint32_t NorFlash_GetDeviceMaxBlockSize( NorFlashInfo *pNorFlashInfo ) ;
+
+extern uint32_t NorFlash_GetDeviceBlockSize( NorFlashInfo *pNorFlashInfo, uint32_t sector ) ;
+
+extern uint16_t NorFlash_GetDeviceSectorInRegion( NorFlashInfo *pNorFlashInfo, uint32_t memoryOffset ) ;
+
+extern uint32_t NorFlash_GetDeviceSectorAddress( NorFlashInfo *pNorFlashInfo, uint32_t sector ) ;
+
+extern uint32_t NorFlash_GetByteAddress( NorFlashInfo *pNorFlashInfo, uint32_t offset ) ;
+
+extern uint32_t NorFlash_GetByteAddressInChip( NorFlashInfo *pNorFlashInfo, uint32_t offset ) ;
+
+extern uint32_t NorFlash_GetAddressInChip( NorFlashInfo *pNorFlashInfo, uint32_t offset ) ;
+
+extern uint8_t NorFlash_GetDataBusWidth( NorFlashInfo *pNorFlashInfo ) ;
+
+extern uint32_t NorFlash_GetDeviceSizeInBytes( NorFlashInfo *pNorFlashInfo ) ;
+
+#endif /* #ifndef _NORFLASHCFI_ */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/NorFlashCommon.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/NorFlashCommon.h
new file mode 100644
index 0000000..749485f
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/NorFlashCommon.h
@@ -0,0 +1,103 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * \section Purpose
+ *
+ * The Hardware Adaptation Layer manages the hardware functions of the %NORFLASH
+ * %Flash. It implements a low level driver to manage the hardware functionality
+ * of %NORFLASH.
+ *
+ * \section Usage
+ *
+ * -# WriteRawData() is used to write data to the %NorFlash device.
+ * -# ReadRawData() is used to read data from the %NorFlash device.
+ * -# The specified address for read/write opertion is an linear byte
+ * address of targer application byte address space represented by
+ * WORD((8-bit, 16-bit, 32-bit). The start (base) address of the
+ * flash memory in this address space is defined in board.h file
+ * as BOARD_NORFLASH_ADDR and users might need to change it.
+ * -# WriteCommand() is used to write a command to specified command
+ * address.
+ *
+ * \section NorFlash_Error_Codes
+ *
+ * It provides detailed error codes to describe the various errors
+ * that may occur during the operation. Some functions return an error
+ * number directly as the function value. These functions return a value
+ * of zero (NorCommon_ERROR_NONE) to indicate a success.
+ */
+
+#ifndef NORFLASHCOMMON_H
+#define NORFLASHCOMMON_H
+
+/*----------------------------------------------------------------------------
+ * Definitions
+ *----------------------------------------------------------------------------*/
+
+/** The function completed successfully. */
+#define NorCommon_ERROR_NONE 0
+
+/** Can not detect common flash infterface. */
+#define NorCommon_ERROR_UNKNOWNMODEL 1
+
+/** A read operation cannot be carried out. */
+#define NorCommon_ERROR_CANNOTREAD 2
+
+/** A write operation cannot be carried out. */
+#define NorCommon_ERROR_CANNOTWRITE 3
+
+/** A erase operation cannot be carried out. */
+#define NorCommon_ERROR_CANNOTERASE 4
+
+/** A locked operation cannot be carried out. */
+#define NorCommon_ERROR_PROTECT 5
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+extern unsigned char WriteCommand(
+ unsigned char portWidth,
+ unsigned int commandAddress,
+ unsigned int command);
+
+extern void ReadRawData(
+ unsigned char portWidth,
+ unsigned int dataAddress,
+ unsigned char *buffer);
+
+extern void WriteRawData(
+ unsigned char portWidth,
+ unsigned int dataAddress,
+ unsigned char *buffer);
+
+#endif /* #ifndef NORFLASHCOMMON_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/NorFlashIntel.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/NorFlashIntel.h
new file mode 100644
index 0000000..3df6fa3
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/NorFlashIntel.h
@@ -0,0 +1,91 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * \section Purpose
+ *
+ * The INTERL %norflash Low-level driver code implement procedures to program
+ * basic operations described INTEL-specified command set flash devices.
+ * The various commands recognized by the devices are listed in the Commands
+ * Tables provided in the corresponding INTEL command set compatible flash
+ * datasheets. All operation functions are blocked, they wait for the
+ * completion of an operation by polling the status register.
+ *
+ * \section Usage
+ * -# Flash program using INTEL_Write_Data().
+ * - The Program command is used to modify the data stored at the
+ * specified device address. Programming can only change bits
+ * from ¡®1¡¯ to ¡®0¡¯. It may be necessary to erase the block before
+ * programming to addresses within it. Programming modifies a single
+ * Word at a time using static function intel_Program(). Programming
+ * larger amounts of data must be done in one Word at a time by
+ * giving a Program command, waiting for the command to complete,
+ * giving the next Program command and so on.
+ * -# erase a block within the flash using INTEL_EraseSector().
+ * - Flash erase is performed on a block basis. An entire block is
+ * erased each time an erase command sequence is given.
+ * -# erase whole blocks within the flash using INTEL_EraseChip().
+ * -# INTEL_Reset() function can be issued, between Bus Write cycles
+ * before the start of a program or erase operation, to return the
+ * device to read mode.
+ * -# INTEL_ReadDeviceID() is used to retrieve information
+ * about the Flash Device type.
+ * -# INTEL_ReadManufactoryId() is used to retrieve information
+ * about the Flash Device Manufactory ID.
+ */
+
+#ifndef _NORFLASH_INTEL_
+#define _NORFLASH_INTEL_
+
+#include "NorFlashApi.h"
+
+#include <stdint.h>
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+extern void INTEL_Reset( NorFlashInfo *pNorFlashInfo, uint32_t address ) ;
+
+extern uint32_t INTEL_ReadManufactoryId( NorFlashInfo *NorFlashInfo ) ;
+
+extern uint32_t INTEL_ReadDeviceID( NorFlashInfo *pNorFlashInfo ) ;
+
+extern uint8_t INTEL_EraseSector( NorFlashInfo *NorFlashInfo, uint32_t sectorAddr ) ;
+
+extern uint8_t INTEL_EraseChip( NorFlashInfo *NorFlashInfo ) ;
+
+extern uint8_t INTEL_Write_Data( NorFlashInfo *NorFlashInfo, uint32_t address, uint8_t *buffer, uint32_t size ) ;
+
+extern const NorFlashOperations intelOperations ;
+
+#endif /* #ifndef _NORFLASH_INTEL_ */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/RawNandFlash.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/RawNandFlash.h
new file mode 100644
index 0000000..0b49aaa
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/RawNandFlash.h
@@ -0,0 +1,115 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+ * \file
+ *
+ * Include Defines & macros for the raw nand flash layer.
+ */
+
+#ifndef RAWNANDFLASH_H
+#define RAWNANDFLASH_H
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+#include <stdint.h>
+
+#include "NandFlashModel.h"
+#include "NandFlashDma.h"
+/*----------------------------------------------------------------------------
+ * Types
+ *----------------------------------------------------------------------------*/
+
+
+/** Describes a physical NandFlash chip connected to the SAM microcontroller.*/
+struct RawNandFlash {
+
+ /** Model describing this NandFlash characteristics.*/
+ struct NandFlashModel model;
+ /** Address for sending commands to the NandFlash.*/
+ uint32_t commandAddress;
+ /** Address for sending addresses to the NandFlash.*/
+ uint32_t addressAddress;
+ /** Address for sending data to the NandFlash.*/
+ uint32_t dataAddress;
+ /** Pin used to enable the NandFlash chip.*/
+ Pin pinChipEnable;
+ /** Pin used to monitor the ready/busy signal from the NandFlash.*/
+ Pin pinReadyBusy;
+};
+
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+extern uint8_t RawNandFlash_Initialize(
+ struct RawNandFlash *raw,
+ const struct NandFlashModel *model,
+ uint32_t commandAddress,
+ uint32_t addressAddress,
+ uint32_t dataAddress,
+ const Pin pinChipEnable,
+ const Pin pinReadyBusy);
+
+extern void RawNandFlash_Reset(const struct RawNandFlash *raw);
+
+extern uint32_t RawNandFlash_ReadId(const struct RawNandFlash *raw);
+
+extern uint8_t RawNandFlash_EraseBlock(
+ const struct RawNandFlash *raw,
+ uint16_t block);
+
+extern uint8_t RawNandFlash_ReadPage(
+ const struct RawNandFlash *raw,
+ uint16_t block,
+ uint16_t page,
+ void *data,
+ void *spare);
+
+extern uint8_t RawNandFlash_WritePage(
+ const struct RawNandFlash *raw,
+ uint16_t block,
+ uint16_t page,
+ void *data,
+ void *spare);
+
+extern uint8_t RawNandFlash_CopyPage(
+ const struct RawNandFlash *raw,
+ uint16_t sourceBlock,
+ uint16_t sourcePage,
+ uint16_t destBlock,
+ uint16_t destPage);
+
+extern uint8_t RawNandFlash_CopyBlock(
+ const struct RawNandFlash *raw,
+ uint16_t sourceBlock,
+ uint16_t destBlock);
+
+#endif /*#ifndef RAWNANDFLASH_H*/
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/SkipBlockNandFlash.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/SkipBlockNandFlash.h
new file mode 100644
index 0000000..ce1ed23
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/SkipBlockNandFlash.h
@@ -0,0 +1,132 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+ * \file
+ *
+ * Include Defines & macros for the skipblock nand flash layer.
+ */
+
+#ifndef SKIPBLOCKNANDFLASH_H
+#define SKIPBLOCKNANDFLASH_H
+
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "NandCommon.h"
+#include "EccNandFlash.h"
+
+
+/*----------------------------------------------------------------------------
+ * Definitions
+ *----------------------------------------------------------------------------*/
+#define NandBlockStatus_BAD_skip 0xBA
+
+/** Erase types */
+/** Check block before erase */
+#define NORMAL_ERASE 0x00000000
+/** Do NOT check the block status before erasing it */
+#define SCRUB_ERASE 0x0000EA11
+/** Values returned by the CheckBlock() function */
+#define BADBLOCK 255
+#define GOODBLOCK 254
+
+/*----------------------------------------------------------------------------
+ * Types
+ *----------------------------------------------------------------------------*/
+struct SkipBlockNandFlash {
+ struct EccNandFlash ecc;
+};
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+extern uint8_t SkipBlockNandFlash_CheckBlock(
+ const struct SkipBlockNandFlash *skipBlock,
+ uint16_t block);
+
+extern uint8_t SkipBlockNandFlash_Initialize(
+ struct SkipBlockNandFlash *skipBlock,
+ const struct NandFlashModel *model,
+ uint32_t commandAddress,
+ uint32_t addressAddress,
+ uint32_t dataAddress,
+ const Pin pinChipEnable,
+ const Pin pinReadyBusy);
+
+extern uint8_t SkipBlockNandFlash_EraseBlock(
+ struct SkipBlockNandFlash *skipBlock,
+ uint16_t block,
+ uint32_t eraseType);
+
+extern uint8_t SkipBlockNandFlash_ReadPage(
+ const struct SkipBlockNandFlash *skipBlock,
+ uint16_t block,
+ uint16_t page,
+ void *data,
+ void *spare);
+
+uint8_t SkipBlockNandFlash_ReadBlock(
+ const struct SkipBlockNandFlash *skipBlock,
+ uint16_t block,
+ void *data);
+
+extern uint8_t SkipBlockNandFlash_WritePage(
+ const struct SkipBlockNandFlash *skipBlock,
+ uint16_t block,
+ uint16_t page,
+ void *data,
+ void *spare);
+
+extern uint8_t SkipBlockNandFlash_WriteBlockUnaligned(
+ const struct SkipBlockNandFlash *skipBlock,
+ uint16_t block,
+ uint16_t pageOffsetInBlock,
+ uint16_t numPages,
+ void *data
+ );
+
+extern uint8_t SkipBlockNandFlash_ReadBlockUnaligned(
+ const struct SkipBlockNandFlash *skipBlock,
+ uint16_t block,
+ uint16_t pageOffsetInBlock,
+ uint16_t numPages,
+ void *data
+ );
+
+uint8_t SkipBlockNandFlash_WriteBlock(
+ const struct SkipBlockNandFlash *skipBlock,
+ uint16_t block,
+ void *data);
+
+
+#endif /*#ifndef SKIPBLOCKNANDFLASH_H */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/TranslatedNandFlash.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/TranslatedNandFlash.h
new file mode 100644
index 0000000..8ce50d5
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/TranslatedNandFlash.h
@@ -0,0 +1,99 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+#ifndef TRANSLATEDNANDFLASH_H
+#define TRANSLATEDNANDFLASH_H
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "MappedNandFlash.h"
+
+/*----------------------------------------------------------------------------
+ * Type
+ *----------------------------------------------------------------------------*/
+struct TranslatedNandFlash {
+
+ struct MappedNandFlash mapped;
+ int16_t currentLogicalBlock;
+ int16_t previousPhysicalBlock;
+ uint8_t currentBlockPageStatuses[NandCommon_MAXNUMPAGESPERBLOCK / 8];
+};
+
+/*----------------------------------------------------------------------------
+ * Exportd functions
+ *----------------------------------------------------------------------------*/
+
+extern uint8_t TranslatedNandFlash_Initialize(
+ struct TranslatedNandFlash *translated,
+ const struct NandFlashModel *model,
+ uint32_t commandAddress,
+ uint32_t addressAddress,
+ uint32_t dataAddress,
+ const Pin pinChipEnable,
+ const Pin pinReadyBusy,
+ uint16_t baseBlock,
+ uint16_t sizeInBlocks);
+
+extern uint8_t TranslatedNandFlash_ReadPage(
+ const struct TranslatedNandFlash *translated,
+ uint16_t block,
+ uint16_t page,
+ void *data,
+ void *spare);
+
+extern uint8_t TranslatedNandFlash_WritePage(
+ struct TranslatedNandFlash *translated,
+ uint16_t block,
+ uint16_t page,
+ void *data,
+ void *spare);
+
+extern uint8_t TranslatedNandFlash_Flush(
+ struct TranslatedNandFlash *translated);
+
+extern uint8_t TranslatedNandFlash_EraseAll(
+ struct TranslatedNandFlash *translated,
+ uint8_t level);
+
+extern uint8_t TranslatedNandFlash_SaveLogicalMapping(
+ struct TranslatedNandFlash *translated);
+
+extern uint16_t TranslatedNandFlash_GetDeviceSizeInBlocks(
+ const struct TranslatedNandFlash *translated);
+
+extern uint32_t TranslatedNandFlash_GetDeviceSizeInPages(
+ const struct TranslatedNandFlash *translated);
+
+extern unsigned long long TranslatedNandFlash_GetDeviceSizeInBytes(
+ const struct TranslatedNandFlash *translated);
+
+#endif /*#ifndef TRANSLATEDNANDFLASH_H */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/at26.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/at26.h
new file mode 100644
index 0000000..6d4ce95
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/at26.h
@@ -0,0 +1,252 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+//------------------------------------------------------------------------------
+/// \unit
+///
+/// !Purpose
+///
+/// The AT26 serial firmware Dataflash driver is based on top of the
+/// corresponding Spi driver. A Dataflash structure instance has to be
+/// initialized using the DF_Init function. Then basic dataflash
+/// operations can be launched using macros such as DF_continuous_read.
+/// These macros invoke the DF_Command() function which invokes the
+/// DPI low driver using the SPI_SendCommand() function.
+/// Beware to compute the dataflash internal address, the dataflash sector
+/// description must be known (DataflashDesc). Dataflash can be automatically
+/// detected using the DF_Scan() function.
+///
+/// !Usage
+///
+/// -# Initializes an AT26 instance and configures SPI chip select pin
+/// using AT26_Configure().
+/// -# Detect DF and returns DF description corresponding to the device
+/// connected using AT26_FindDevice().This function shall be called by
+/// the application before AT26_SendCommand().
+/// -# Sends a command to the DF through the SPI using AT26_SendCommand().
+/// The command is identified by its command code and the number of
+/// bytes to transfer.
+/// -# Example code for sending command to write a page to DF.
+/// \code
+/// // Program page
+/// error = AT26_SendCommand(pAt26, AT26_BYTE_PAGE_PROGRAM, 4,
+/// pData, writeSize, address, 0, 0);
+/// \endcode
+/// -# Example code for sending command to read a page from DF.
+/// If data needs to be received, then a data buffer must be
+/// provided.
+/// \code
+/// // Start a read operation
+/// error = AT26_SendCommand(pAt26, AT26_READ_ARRAY_LF,
+/// 4, pData, size, address, 0, 0);
+/// \endcode
+/// -# This function does not block; its optional callback will
+/// be invoked when the transfer completes.
+/// -# Check the AT26 driver is ready or not by polling AT26_IsBusy().
+///
+//------------------------------------------------------------------------------
+#ifndef AT26_H
+#define AT26_H
+
+//------------------------------------------------------------------------------
+// Headers
+//------------------------------------------------------------------------------
+
+//#include "chip.h"
+
+//------------------------------------------------------------------------------
+// Macros
+//------------------------------------------------------------------------------
+
+#define AT26_Size(pAt26) ((pAt26)->pDesc->size)
+#define AT26_PageSize(pAt26) ((pAt26)->pDesc->pageSize)
+#define AT26_BlockSize(pAt26) ((pAt26)->pDesc->blockSize)
+#define AT26_Name(pAt26) ((pAt26)->pDesc->name)
+#define AT26_PageNumber(pAt26) (AT26_Size(pAt26) / AT26_PageSize(pAt26))
+#define AT26_BlockNumber(pAt26) (AT26_Size(pAt26) / AT26_BlockSize(pAt26))
+#define AT26_PagePerBlock(pAt26) (AT26_BlockSize(pAt26) / AT26_PageSize(pAt26))
+#define AT26_BlockEraseCmd(pAt26) ((pAt26)->pDesc->blockEraseCmd)
+
+//------------------------------------------------------------------------------
+// Definitions
+//------------------------------------------------------------------------------
+
+/// Device is protected, operation cannot be carried out.
+#define AT26_ERROR_PROTECTED 1
+/// Device is busy executing a command.
+#define AT26_ERROR_BUSY 2
+/// There was a problem while trying to program page data.
+#define AT26_ERROR_PROGRAM 3
+/// There was an SPI communication error.
+#define AT26_ERROR_SPI 4
+
+/// Device ready/busy status bit.
+#define AT26_STATUS_RDYBSY (1 << 0)
+/// Device is ready.
+#define AT26_STATUS_RDYBSY_READY (0 << 0)
+/// Device is busy with internal operations.
+#define AT26_STATUS_RDYBSY_BUSY (1 << 0)
+/// Write enable latch status bit.
+#define AT26_STATUS_WEL (1 << 1)
+/// Device is not write enabled.
+#define AT26_STATUS_WEL_DISABLED (0 << 1)
+/// Device is write enabled.
+#define AT26_STATUS_WEL_ENABLED (1 << 1)
+/// Software protection status bitfield.
+#define AT26_STATUS_SWP (3 << 2)
+/// All sectors are software protected.
+#define AT26_STATUS_SWP_PROTALL (3 << 2)
+/// Some sectors are software protected.
+#define AT26_STATUS_SWP_PROTSOME (1 << 2)
+/// No sector is software protected.
+#define AT26_STATUS_SWP_PROTNONE (0 << 2)
+/// Write protect pin status bit.
+#define AT26_STATUS_WPP (1 << 4)
+/// Write protect signal is not asserted.
+#define AT26_STATUS_WPP_NOTASSERTED (0 << 4)
+/// Write protect signal is asserted.
+#define AT26_STATUS_WPP_ASSERTED (1 << 4)
+/// Erase/program error bit.
+#define AT26_STATUS_EPE (1 << 5)
+/// Erase or program operation was successful.
+#define AT26_STATUS_EPE_SUCCESS (0 << 5)
+/// Erase or program error detected.
+#define AT26_STATUS_EPE_ERROR (1 << 5)
+/// Sector protection registers locked bit.
+#define AT26_STATUS_SPRL (1 << 7)
+/// Sector protection registers are unlocked.
+#define AT26_STATUS_SPRL_UNLOCKED (0 << 7)
+/// Sector protection registers are locked.
+#define AT26_STATUS_SPRL_LOCKED (1 << 7)
+
+/// Read array command code.
+#define AT26_READ_ARRAY 0x0B
+/// Read array (low frequency) command code.
+#define AT26_READ_ARRAY_LF 0x03
+/// Block erase command code (4K block).
+#define AT26_BLOCK_ERASE_4K 0x20
+/// Block erase command code (32K block).
+#define AT26_BLOCK_ERASE_32K 0x52
+/// Block erase command code (64K block).
+#define AT26_BLOCK_ERASE_64K 0xD8
+/// Chip erase command code 1.
+#define AT26_CHIP_ERASE_1 0x60
+/// Chip erase command code 2.
+#define AT26_CHIP_ERASE_2 0xC7
+/// Byte/page program command code.
+#define AT26_BYTE_PAGE_PROGRAM 0x02
+/// Sequential program mode command code 1.
+#define AT26_SEQUENTIAL_PROGRAM_1 0xAD
+/// Sequential program mode command code 2.
+#define AT26_SEQUENTIAL_PROGRAM_2 0xAF
+/// Write enable command code.
+#define AT26_WRITE_ENABLE 0x06
+/// Write disable command code.
+#define AT26_WRITE_DISABLE 0x04
+/// Protect sector command code.
+#define AT26_PROTECT_SECTOR 0x36
+/// Unprotect sector command code.
+#define AT26_UNPROTECT_SECTOR 0x39
+/// Read sector protection registers command code.
+#define AT26_READ_SECTOR_PROT 0x3C
+/// Read status register command code.
+#define AT26_READ_STATUS 0x05
+/// Write status register command code.
+#define AT26_WRITE_STATUS 0x01
+/// Read manufacturer and device ID command code.
+#define AT26_READ_JEDEC_ID 0x9F
+/// Deep power-down command code.
+#define AT26_DEEP_PDOWN 0xB9
+/// Resume from deep power-down command code.
+#define AT26_RES_DEEP_PDOWN 0xAB
+
+//------------------------------------------------------------------------------
+// Types
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+/// Describes a serial firmware flash device parameters.
+//------------------------------------------------------------------------------
+typedef struct _At26Desc {
+
+ /// Device string name.
+ const char *name;
+ /// JEDEC ID of device.
+ unsigned int jedecId;
+ /// Size of device in bytes.
+ unsigned int size;
+ /// Size of one page in bytes.
+ unsigned int pageSize;
+ /// Block erase size in bytes.
+ unsigned int blockSize;
+ /// Block erase command.
+ unsigned int blockEraseCmd;
+
+} At26Desc;
+
+//------------------------------------------------------------------------------
+/// Serial flash driver structure. Holds the current state of the driver,
+/// including the current command and the descriptor for the underlying device.
+//------------------------------------------------------------------------------
+typedef struct _At26 {
+
+ /// Pointer to the underlying SPI driver.
+ Spid *pSpid;
+ /// Current SPI command sent to the SPI driver.
+ SpidCmd command;
+ /// Pointer to a descriptor for the serial firmware flash device.
+ const At26Desc *pDesc;
+ /// Command buffer.
+ unsigned int pCmdBuffer[2];
+
+} At26;
+
+//------------------------------------------------------------------------------
+// Exported functions
+//------------------------------------------------------------------------------
+
+extern void AT26_Configure(At26 *pAt26, Spid *pSpid, unsigned char cs);
+
+extern unsigned char AT26_SendCommand(
+ At26 *pAt26,
+ unsigned char cmd,
+ unsigned char cmdSize,
+ unsigned char *pData,
+ unsigned int dataSize,
+ unsigned int address,
+ SpidCallback callback,
+ void *pArgument);
+
+extern unsigned char AT26_IsBusy(At26 *pAt26);
+
+extern const At26Desc * AT26_FindDevice(
+ At26 *pAt26,
+ unsigned int jedecId);
+
+#endif //#ifndef AT26_H
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/at26d.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/at26d.h
new file mode 100644
index 0000000..9bed206
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/at26d.h
@@ -0,0 +1,79 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+//------------------------------------------------------------------------------
+/// \unit
+/// !Purpose
+///
+/// The AT26 Serialflash driver.
+///
+/// !Usage
+//------------------------------------------------------------------------------
+
+#ifndef AT26D_H
+#define AT26D_H
+
+//------------------------------------------------------------------------------
+// Headers
+//------------------------------------------------------------------------------
+
+#include "at26.h"
+
+
+//------------------------------------------------------------------------------
+// Macros
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+// Exported functions
+//------------------------------------------------------------------------------
+extern void AT26D_WaitReady(At26 *pAt26);
+
+extern unsigned int AT26D_ReadJedecId(At26 *pAt26);
+
+extern unsigned char AT26D_Unprotect(At26 *pAt26);
+
+extern unsigned char AT26D_EraseChip(At26 *pAt26);
+
+extern unsigned char AT26D_EraseBlock(At26 *pAt26, unsigned int address);
+
+extern unsigned char AT26D_Write(
+ At26 *pAt26,
+ unsigned char *pData,
+ unsigned int size,
+ unsigned int address);
+
+extern unsigned char AT26D_Read(
+ At26 *pAt26,
+ unsigned char *pData,
+ unsigned int size,
+ unsigned int address);
+
+#endif // #ifndef AT26D_H
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/mcid.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/mcid.h
new file mode 100644
index 0000000..c7614e9
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/mcid.h
@@ -0,0 +1,170 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/** \file */
+
+/**
+ * \ingroup sdmmc_hal
+ * \addtogroup mcid_module MCI Driver (HAL for SD/MMC Lib)
+ *
+ * \section Purpose
+ *
+ * This driver implements SD(IO)/MMC command operations and MCI configuration
+ * routines to perform SD(IO)/MMC access. It's used for upper layer
+ * (\ref libsdmmc_module "SD/MMC driver") to perform SD/MMC operations.
+ *
+ * \section Usage
+ *
+ * -# MCID_Init(): Initializes a MCI driver instance and the underlying
+ * peripheral.
+ * -# MCID_SendCmd(): Starts a MCI transfer which described by
+ * \ref sSdmmcCommand.
+ * -# MCID_CancelCmd(): Cancel a pending command.
+ * -# MCID_IsCmdCompleted(): Check if MCI transfer is finished.
+ * -# MCID_Handler(): Interrupt handler which is called by ISR handler.
+ * -# MCID_IOCtrl(): IO control function to report HW attributes to upper
+ * layer driver and modify HW settings (such as clock
+ * frequency, High-speed support, etc. See
+ * \ref sdmmc_ioctrls).
+ *
+ * \sa \ref dmad_module "DMA Driver", \ref hsmci_module "HSMCI",
+ * \ref libsdmmc_module "SD/MMC Library"
+ *
+ * Related files:\n
+ * \ref mcid.h\n
+ * \ref mcid_dma.c.\n
+ */
+
+#ifndef MCID_H
+#define MCID_H
+/** \addtogroup mcid_module
+ *@{
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "chip.h"
+#include "include/dmad.h"
+#include "include/dma_hardware_interface.h"
+#include <stdint.h>
+#include <stdio.h>
+
+/** \addtogroup mcid_defines MCI Driver Defines
+ * @{*/
+
+/*----------------------------------------------------------------------------
+ * Constants
+ *----------------------------------------------------------------------------*/
+
+/** MCI States */
+#define MCID_IDLE 0 /**< Idle */
+#define MCID_LOCKED 1 /**< Locked for specific slot */
+#define MCID_CMD 2 /**< Processing the command */
+#define MCID_ERROR 3 /**< Command error */
+
+/** MCI Initialize clock 400K Hz */
+#define MCI_INITIAL_SPEED 400000
+
+/** @}*/
+
+/*----------------------------------------------------------------------------
+ * Types
+ *----------------------------------------------------------------------------*/
+/** \addtogroup mcid_structs MCI Driver Data Structs
+ * @{
+ */
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/**
+ * \brief MCI Driver
+ */
+typedef struct _Mcid
+{
+ /** Pointer to a MCI peripheral. */
+ Hsmci *pMciHw;
+ /** Pointer to a DMA driver */
+ sDmad *pDmad;
+ /** Pointer to currently executing command. */
+ void *pCmd;
+ /** MCK source, Hz */
+ uint32_t dwMck;
+ /** DMA transfer channel */
+ uint32_t dwDmaCh;
+ /** DMA transferred data index (bytes) */
+ uint32_t dwXfrNdx;
+ /** DMA transfer size (bytes) */
+ uint32_t dwXSize;
+ /** MCI peripheral identifier. */
+ uint8_t bID;
+ /** Polling mode */
+ uint8_t bPolling;
+ /** Reserved */
+ uint8_t reserved;
+ /** state. */
+ volatile uint8_t bState;
+} sMcid;
+
+/** @}*/
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+/** \addtogroup mcid_functions MCI Driver Functions
+ @{*/
+extern void MCID_Init(sMcid * pMcid,
+ Hsmci * pMci, uint8_t bID, uint32_t dwMck,
+ sDmad * pDmad,
+ uint8_t bPolling);
+
+extern uint32_t MCID_Lock(sMcid * pMcid, uint8_t bSlot);
+
+extern uint32_t MCID_Release(sMcid * pMcid);
+
+extern void MCID_Handler(sMcid * pMcid);
+
+extern uint32_t MCID_SendCmd(sMcid * pMcid, void * pCmd);
+
+extern uint32_t MCID_CancelCmd(sMcid * pMcid);
+
+extern void MCID_Reset(sMcid * pMcid);
+
+extern uint32_t MCID_IsCmdCompleted(sMcid * pMcid);
+
+extern uint32_t MCID_IOCtrl(sMcid * pMcid,uint32_t bCtl,uint32_t param);
+
+#ifdef __cplusplus
+}
+#endif
+/** @}*/
+/**@}*/
+#endif //#ifndef HSMCID_H
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/sdio.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/sdio.h
new file mode 100644
index 0000000..ecf5d52
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/sdio.h
@@ -0,0 +1,312 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/** \file */
+
+#ifndef _SDIO_H
+#define _SDIO_H
+
+/** \addtogroup sdio_api
+ * @{
+ */
+
+/*----------------------------------------------------------------------------
+ * Constants
+ *----------------------------------------------------------------------------*/
+
+/** \addtogroup sdio_status SDIO Status bits
+ * @{
+ */
+#define SDIO_R1_IDLE (1ul << 0) /**< in idle state */
+#define SDIO_R1_ILLEGAL_COMMAND (1ul << 2) /**< illegal command */
+#define SDIO_R1_COM_CRC_ERROR (1ul << 3) /**< COM CRC error */
+#define SDIO_R1_FUNCN_ERROR (1ul << 4) /**< Function number error */
+#define SDIO_R1_PARAM_ERROR (1ul << 6) /**< Parameter error */
+
+#define SDIO_R6_COM_CRC_ERROR (1ul << 15) /**< CRC check of command fails */
+#define SDIO_R6_ILLEGAL_COMMAND (1ul << 14) /**< Command not legal for the state */
+#define SDIO_R6_ERROR (1ul << 13) /**< General or unknown error */
+
+#define SDIO_R5_Pos (8) /**< R5 starting position */
+#define SDIO_R5_COM_CRC_ERROR (1ul << 15)
+#define SDIO_R5_ILLEGAL_COMMAND (1ul << 14)
+#define SDIO_R5_IO_STATE (3ul << 12) /**< DIS/CMD/TRN/RFU */
+#define SDIO_R5_STATE_DIS (0ul << 12)
+#define SDIO_R5_STATE_CMD (1ul << 12)
+#define SDIO_R5_STATE_TRN (2ul << 12)
+#define SDIO_R5_STATE_RFU (3ul << 12)
+#define SDIO_R5_ERROR (1ul << 11)
+#define SDIO_R5_FUNCN_ERROR (1ul << 9)
+#define SDIO_R5_OUT_OF_RANGE (1ul << 8)
+
+#define SDIO_R4_OCR (0xF << 0) /**< OCR */
+#define SDIO_R4_MP (1ul << 27) /**< Memory Present */
+#define SDIO_R4_NF (3ul << 28) /**< Number of Functions */
+/** @}*/
+
+
+/** \addtogroup sdio_fun_def SDIO Functions
+ * Here lists SDIO functions definitions
+ * - \ref SDIO_CIA or \ref SDIO_FN0
+ * - \ref SDIO_FN1
+ * - \ref SDIO_FN2
+ * - \ref SDIO_FN3
+ * - \ref SDIO_FN4
+ * - \ref SDIO_FN5
+ * - \ref SDIO_FN6
+ * - \ref SDIO_FN7
+ * @{*/
+#define SDIO_CIA 0 /**< SDIO Function 0 (CIA) */
+#define SDIO_FN0 0 /**< SDIO Function 0 */
+#define SDIO_FN1 1 /**< SDIO Function 1 */
+#define SDIO_FN2 2 /**< SDIO Function 2 */
+#define SDIO_FN3 3 /**< SDIO Function 3 */
+#define SDIO_FN4 4 /**< SDIO Function 4 */
+#define SDIO_FN5 5 /**< SDIO Function 5 */
+#define SDIO_FN6 6 /**< SDIO Function 6 */
+#define SDIO_FN7 7 /**< SDIO Function 7 */
+/** @}*/
+
+/** \addtogroup sdio_cccr_def SDIO Card Common Control Registers (CCCR)
+ * Here lists SDIO CCCR definitions
+ * -# \ref SDIO_CCCR_REG
+ * -# \ref SDIO_SD_REV_REG
+ * -# \ref SDIO_IOE_REG
+ * -# \ref SDIO_IOR_REG
+ * -# \ref SDIO_IEN_REG
+ * -# \ref SDIO_INT_REG
+ * -# \ref SDIO_IOA_REG
+ * -# \ref SDIO_BUS_CTRL_REG
+ * -# \ref SDIO_CAP_REG
+ * -# \ref SDIO_CIS_PTR_REG
+ * -# .
+ * -# .
+ * -# \ref SDIO_BUS_SUSP_REG
+ * -# \ref SDIO_FUN_SEL_REG
+ * -# \ref SDIO_EXEC_REG
+ * -# \ref SDIO_READY_REG
+ * -# \ref SDIO_FN0_BLKSIZ_REG
+ * -# .
+ * -# \ref SDIO_POWER_REG
+ * -# \ref SDIO_HS_REG
+ * @{*/
+#define SDIO_CCCR_REG 0x00 /**< CCCR/SDIO revision (RO) */
+#define SDIO_CCCR (0xFUL << 0)/**< CCCR Format Version number */
+#define SDIO_CCCR_1_00 (0x0UL << 0)/**< CCCR/FBR Version 1.00 */
+#define SDIO_CCCR_1_10 (0x1UL << 0)/**< CCCR/FBR Version 1.10 */
+#define SDIO_CCCR_1_20 (0x2UL << 0)/**< CCCR/FBR Version 1.20 */
+#define SDIO_SDIO (0xFUL << 4)/**< SDIO Specification */
+#define SDIO_SDIO_1_00 (0x0UL << 4)/**< SDIO Specification 1.00 */
+#define SDIO_SDIO_1_10 (0x1UL << 4)/**< SDIO Specification 1.10 */
+#define SDIO_SDIO_1_20 (0x2UL << 4)/**< SDIO Specification 1.20(unreleased) */
+#define SDIO_SDIO_2_00 (0x3UL << 4)/**< SDIO Specification Version 2.00 */
+#define SDIO_SD_REV_REG 0x01 /**< SD Specification Revision (RO) */
+#define SDIO_SD (0xFUL << 0)/**< SD Physical Specification */
+#define SDIO_SD_1_01 (0x0UL << 0)/**< SD 1.01 (Mar 2000) */
+#define SDIO_SD_1_10 (0x1UL << 0)/**< SD 1.10 (Oct 2004) */
+#define SDIO_SD_2_00 (0x2UL << 0)/**< SD 2.00 (May 2006) */
+#define SDIO_IOE_REG 0x02 /**< I/O Enable (R/W) */
+#define SDIO_IOE 0xFEUL /**< Enable/Disable Function */
+#define SDIO_IOE_FN1 (0x1UL << 1)/**< Function 1 Enable/Disable */
+#define SDIO_IOE_FN2 (0x1UL << 2)/**< Function 2 Enable/Disable */
+#define SDIO_IOE_FN3 (0x1UL << 3)/**< Function 3 Enable/Disable */
+#define SDIO_IOE_FN4 (0x1UL << 4)/**< Function 4 Enable/Disable */
+#define SDIO_IOE_FN5 (0x1UL << 5)/**< Function 5 Enable/Disable */
+#define SDIO_IOE_FN6 (0x1UL << 6)/**< Function 6 Enable/Disable */
+#define SDIO_IOE_FN7 (0x1UL << 7)/**< Function 7 Enable/Disable */
+#define SDIO_IOR_REG 0x03 /**< I/O Ready (RO) */
+#define SDIO_IOR 0xFEUL /**< I/O Function Ready */
+#define SDIO_IOR_FN1 (0x1UL << 1)/**< Function 1 ready */
+#define SDIO_IOR_FN2 (0x1UL << 2)/**< Function 2 ready */
+#define SDIO_IOR_FN3 (0x1UL << 3)/**< Function 3 ready */
+#define SDIO_IOR_FN4 (0x1UL << 4)/**< Function 4 ready */
+#define SDIO_IOR_FN5 (0x1UL << 5)/**< Function 5 ready */
+#define SDIO_IOR_FN6 (0x1UL << 6)/**< Function 6 ready */
+#define SDIO_IOR_FN7 (0x1UL << 7)/**< Function 7 ready */
+#define SDIO_IEN_REG 0x04 /**< Int Enable */
+#define SDIO_IENM 0x01UL /**< Int Enable Master (R/W) */
+#define SDIO_IEN 0xFEUL /**< Int Enable for function (R/W) */
+#define SDIO_IEN_FN1 (0x1UL << 1)/**< Function 1 Int Enable */
+#define SDIO_IEN_FN2 (0x1UL << 2)/**< Function 2 Int Enable */
+#define SDIO_IEN_FN3 (0x1UL << 3)/**< Function 3 Int Enable */
+#define SDIO_IEN_FN4 (0x1UL << 4)/**< Function 4 Int Enable */
+#define SDIO_IEN_FN5 (0x1UL << 5)/**< Function 5 Int Enable */
+#define SDIO_IEN_FN6 (0x1UL << 6)/**< Function 6 Int Enable */
+#define SDIO_IEN_FN7 (0x1UL << 7)/**< Function 7 Int Enable */
+#define SDIO_INT_REG 0x05 /**< Int Pending */
+#define SDIO_INT 0xFE /**< Int Pending for functions (RO) */
+#define SDIO_INT_FN1 (0x1UL << 1)/**< Function 1 Int pending */
+#define SDIO_INT_FN2 (0x1UL << 2)/**< Function 2 Int pending */
+#define SDIO_INT_FN3 (0x1UL << 3)/**< Function 3 Int pending */
+#define SDIO_INT_FN4 (0x1UL << 4)/**< Function 4 Int pending */
+#define SDIO_INT_FN5 (0x1UL << 5)/**< Function 5 Int pending */
+#define SDIO_INT_FN6 (0x1UL << 6)/**< Function 6 Int pending */
+#define SDIO_INT_FN7 (0x1UL << 7)/**< Function 7 Int pending */
+#define SDIO_IOA_REG 0x06 /**< I/O Abort */
+#define SDIO_AS (0x7UL << 0)/**< Abort Select In Order (WO) */
+#define SDIO_AS_FN1 (0x1UL << 0)/**< Abort function 1 IO */
+#define SDIO_AS_FN2 (0x2UL << 0)/**< Abort function 2 IO */
+#define SDIO_AS_FN3 (0x3UL << 0)/**< Abort function 3 IO */
+#define SDIO_AS_FN4 (0x4UL << 0)/**< Abort function 4 IO */
+#define SDIO_AS_FN5 (0x5UL << 0)/**< Abort function 5 IO */
+#define SDIO_AS_FN6 (0x6UL << 0)/**< Abort function 6 IO */
+#define SDIO_AS_FN7 (0x7UL << 0)/**< Abort function 7 IO */
+#define SDIO_RES (0x1UL << 3)/**< IO CARD RESET (WO) */
+#define SDIO_BUS_CTRL_REG 0x07 /**< Bus Interface Control */
+#define SDIO_BUSWIDTH (0x3UL << 0)/**< Data bus width (R/W) */
+#define SDIO_BUSWIDTH_1B (0x0UL << 0)/**< 1-bit data bus */
+#define SDIO_BUSWIDTH_4B (0x2UL << 0)/**< 4-bit data bus */
+#define SDIO_ECSI (0x1UL << 5)/**< Enable Continuous SPI interrupt (R/W) */
+#define SDIO_SCSI (0x1UL << 6)/**< Support Continuous SPI interrupt (RO) */
+#define SDIO_CD (0x1UL << 7)/**< Connect(0)/Disconnect(1) pull-up on CD/DAT[3] (R/W) */
+#define SDIO_CAP_REG 0x08 /**< Card Capability */
+#define SDIO_SDC (0x1UL << 0)/**< Support Direct Commands during data transfer (RO) */
+#define SDIO_SMB (0x1UL << 1)/**< Support Multi-Block (RO) */
+#define SDIO_SRW (0x1UL << 2)/**< Support Read Wait (RO) */
+#define SDIO_SBS (0x1UL << 3)/**< Support Suspend/Resume (RO) */
+#define SDIO_S4MI (0x1UL << 4)/**< Support interrupt between blocks of data in 4-bit SD mode (RO) */
+#define SDIO_E4MI (0x1UL << 5)/**< Enable interrupt between blocks of data in 4-bit SD mode (R/W) */
+#define SDIO_LSC (0x1UL << 6)/**< Low-Speed Card (RO) */
+#define SDIO_4BLS (0x1UL << 7)/**< 4-bit support for Low-Speed Card (RO) */
+#define SDIO_CIS_PTR_REG 0x09 /**< Pointer to CIS (3B, LSB first) */
+#define SDIO_BUS_SUSP_REG 0x0C /**< Bus Suspend */
+#define SDIO_BS (0x1UL << 0)/**< Bus Status (transfer on DAT[x] lines) (RO) */
+#define SDIO_BR (0x1UL << 1)/**< Bus Release Request/Status (R/W) */
+#define SDIO_FUN_SEL_REG 0x0D /**< Function select */
+#define SDIO_DF (0x1UL << 7)/**< Resume Data Flag (RO) */
+#define SDIO_FS (0xFUL << 0)/**< Select Function (R/W) */
+#define SDIO_FS_CIA (0x0UL << 0)/**< Select CIA (function 0) */
+#define SDIO_FS_FN1 (0x1UL << 0)/**< Select Function 1 */
+#define SDIO_FS_FN2 (0x2UL << 0)/**< Select Function 2 */
+#define SDIO_FS_FN3 (0x3UL << 0)/**< Select Function 3 */
+#define SDIO_FS_FN4 (0x4UL << 0)/**< Select Function 4 */
+#define SDIO_FS_FN5 (0x5UL << 0)/**< Select Function 5 */
+#define SDIO_FS_FN6 (0x6UL << 0)/**< Select Function 6 */
+#define SDIO_FS_FN7 (0x7UL << 0)/**< Select Function 7 */
+#define SDIO_FS_MEM (0x8UL << 0)/**< Select memory in combo card */
+#define SDIO_EXEC_REG 0x0E /**< Exec Flags (RO) */
+#define SDIO_EXM (0x1UL << 0)/**< Executing status of memory */
+#define SDIO_EX (0xFEUL) /**< Executing status of functions */
+#define SDIO_EX_FN1 (0x1UL << 1)/**< Executing status of function 1 */
+#define SDIO_EX_FN2 (0x1UL << 2)/**< Executing status of function 2 */
+#define SDIO_EX_FN3 (0x1UL << 3)/**< Executing status of function 3 */
+#define SDIO_EX_FN4 (0x1UL << 4)/**< Executing status of function 4 */
+#define SDIO_EX_FN5 (0x1UL << 5)/**< Executing status of function 5 */
+#define SDIO_EX_FN6 (0x1UL << 6)/**< Executing status of function 6 */
+#define SDIO_EX_FN7 (0x1UL << 7)/**< Executing status of function 7 */
+#define SDIO_READY_REG 0x0F /**< Ready Flags (RO) */
+#define SDIO_RFM (0x1UL << 0)/**< Ready Flag for memory */
+#define SDIO_RF (0xFEUL) /**< Ready Flag for functions */
+#define SDIO_RF_FN1 (0x1UL << 1)/**< Ready Flag for function 1 */
+#define SDIO_RF_FN2 (0x1UL << 2)/**< Ready Flag for function 2 */
+#define SDIO_RF_FN3 (0x1UL << 3)/**< Ready Flag for function 3 */
+#define SDIO_RF_FN4 (0x1UL << 4)/**< Ready Flag for function 4 */
+#define SDIO_RF_FN5 (0x1UL << 5)/**< Ready Flag for function 5 */
+#define SDIO_RF_FN6 (0x1UL << 6)/**< Ready Flag for function 6 */
+#define SDIO_RF_FN7 (0x1UL << 7)/**< Ready Flag for function 7 */
+#define SDIO_FN0_BLKSIZ_REG 0x10 /**< FN0 Block Size (2B, LSB first) (R/W) */
+#define SDIO_POWER_REG 0x12 /**< Power Control */
+#define SDIO_SMPC (0x1UL << 0)/**< Support Master Power Control (RO) */
+#define SDIO_EMPC (0x1UL << 1)/**< Enable Master Power Control (R/W) */
+#define SDIO_HS_REG 0x13 /**< High-Speed */
+#define SDIO_SHS (0x1UL << 0)/**< Support High-Speed (RO) */
+#define SDIO_EHS (0x1UL << 1)/**< Enable High-Speed (R/W) */
+/** @}*/
+
+/** \addtogroup sdio_fbr_def SDIO Function Basic Registers (FBR)
+ * Here lists SDIO Function Basic Register definitions.
+ * - SDIO_FBR_ADDR()
+ * -# \ref SDIO_FBR_CSA_IF
+ * -# \ref SDIO_FBR_EXT_IF
+ * -# \ref SDIO_FBR_PWR
+ * -# \ref SDIO_FBR_CIS_PTR
+ * -# .
+ * -# .
+ * -# \ref SDIO_FBR_CSA_PTR
+ * -# .
+ * -# .
+ * -# \ref SDIO_FBR_CSA_DATA
+ * -# \ref SDIO_FBR_BLK_SIZ
+ * -# .
+ * @{*/
+#define SDIO_FBR_ADDR(fn, x) (0x100*(fn) + (x))
+#define SDIO_FBR_CSA_IF 0x0 /**< CSA and function interface code (RO) */
+#define SDIO_IFC (0xFUL << 0)/**< Standard SDIO Fun Interface Code */
+#define SDIO_IFC_NO_IF (0x0UL << 0)/**< No SDIO standard interface */
+#define SDIO_IFC_UART (0x1UL << 0)/**< UART */
+#define SDIO_IFC_TA_BT (0x2UL << 0)/**< Type-A Bluetooth */
+#define SDIO_IFC_TB_BT (0x3UL << 0)/**< Type-B Bluetooth */
+#define SDIO_IFC_GPS (0x4UL << 0)/**< GPS */
+#define SDIO_IFC_CAMERA (0x5UL << 0)/**< Camera */
+#define SDIO_IFC_PHS (0x6UL << 0)/**< PHS */
+#define SDIO_IFC_WLAN (0x7UL << 0)/**< WLAN */
+#define SDIO_IFC_ATA (0x8UL << 0)/**< Embedded SDIO-ATA */
+#define SDIO_IFC_EXT (0xFUL << 0)/**< Check EXT interface code */
+#define SDIO_SCSA (0x1UL << 6)/**< Function supports Code Storage Area (CSA) */
+#define SDIO_FBR_CSA (0x1UL << 7)/**< Function CSA enable */
+#define SDIO_FBR_EXT_IF 0x1 /**< Extended function interface code (RO) */
+#define SDIO_FBR_PWR 0x2 /**< function power control */
+#define SDIO_SPS (0x1UL << 0)/**< function support power selection (RO) */
+#define SDIO_EPS (0x1UL << 1)/**< Low Current Mode/High Current Mode (R/W) */
+#define SDIO_FBR_CIS_PTR 0x9 /**< Address pointer to function CIS (3B, LSB first) (RO) */
+#define SDIO_FBR_CSA_PTR 0xC /**< Address pointer to CSA (3B, LSB first) (R/W) */
+#define SDIO_FBR_CSA_DATA 0xF /**< Read/Write fifo to CSA (R/W) */
+#define SDIO_FBR_BLK_SIZ 0x10 /**< Block size (2B, LSB first) (R/W) */
+/** @}*/
+
+/** \addtogroup sdio_meta_def SDIO Card Metaformat
+ * Here lists definitions for SDIO metaformats.
+ * - \ref CISTPL_NULL
+ * - \ref CISTPL_DEVICE
+ * - \ref CISTPL_CHECKSUM
+ * - \ref CISTPL_VERS_1
+ * - \ref CISTPL_ALTSTR
+ * - \ref CISTPL_MANFID
+ * - \ref CISTPL_FUNCID
+ * - \ref CISTPL_FUNCE
+ * - \ref CISTPL_SDIO_STD
+ * - \ref CISTPL_SDIO_EXT
+ * - \ref CISTPL_END
+ * @{*/
+#define CISTPL_NULL 0x00 /**< Null tuple (PCMCIA 3.1.9) */
+#define CISTPL_DEVICE 0x01 /**< Device tuple (PCMCIA 3.2.2) */
+#define CISTPL_CHECKSUM 0x10 /**< Checksum control (PCMCIA 3.1.1) */
+#define CISTPL_VERS_1 0x15 /**< Level 1 version (PCMCIA 3.2.10) */
+#define CISTPL_ALTSTR 0x16 /**< Alternate Language String (PCMCIA 3.2.1) */
+#define CISTPL_MANFID 0x20 /**< Manufacturer Identification String (PCMCIA 3.2.9) */
+#define CISTPL_FUNCID 0x21 /**< Function Identification (PCMCIA 3.2.7) */
+#define CISTPL_FUNCE 0x22 /**< Function Extensions (PCMCIA 3.2.6) */
+#define CISTPL_SDIO_STD 0x91 /**< Additional information for SDIO (PCMCIA 6.1.2) */
+#define CISTPL_SDIO_EXT 0x92 /**< Reserved for future SDIO (PCMCIA 6.1.3) */
+#define CISTPL_END 0xFF /**< The End-of-chain Tuple (PCMCIA 3.1.2) */
+/** @}*/
+
+/**@}*/
+#endif /* #define _SDIO_H */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/sdmmc.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/sdmmc.h
new file mode 100644
index 0000000..28cd374
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/sdmmc.h
@@ -0,0 +1,608 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/** \file */
+
+/** \page sdmmc_drv SD/MMC Driver Interface
+ *
+ * Implementation for SD/MMC card SD/MMC mode physical layer driver.
+ * Supply a set of SD/MMC card SD/MMC mode's interface.
+ *
+ * \section sdmmcd_usage Usage
+ * - Instant SD/MMC struct and uses SD/MMC definitions in application
+ * (see \subpage sdmmc_lib_cmd) for SD/MMC management:
+ * -# \ref sSdCard : Struct that defined by application for SD/MMC management.
+ * -# \ref sdmmc_cardtype : SD/SDIO/MMC card type definitions.
+ * -# \ref sdmmc_rc : Return codes for SD/MMC operation (functions).
+ * - General Card Support: Initialize card with SD_Init() and then you can
+ * read/write on card.
+ * -# SD_Init(): Run the SDcard initialization sequence
+ * -# SD_GetCardType() : Return SD/MMC reported card type.
+ * - SD/MMC Memory Card Operations
+ * -# SD_ReadBlocks() : Read blocks of data
+ * -# SD_WriteBlocks() : Write blocks of data
+ * -# SD_Read() : Read blocks of data with multi-access command
+ * (Optimized read, see \ref sdmmc_read_op).
+ * -# SD_Write() : Read blocks of data with multi-access command
+ * (Optimized write, see \ref sdmmc_write_op).
+ * -# SD_GetNumberBlocks() : Return SD/MMC card reported number of blocks.
+ * -# SD_GetBlockSize() : Return SD/MMC card reported block size.
+ * -# SD_GetTotalSizeKB() : Return size of SD/MMC card in KBytes.
+ * - SDIO Card Operations: SD_Init() also detects SDIO card and then SDIO
+ * read/write functions can be used.
+ * -# SDIO_ReadDirect() : Read bytes from registers.
+ * -# SDIO_WriteDirect() : Write one byte to register.
+ * -# SDIO_ReadBytes() : Read 1 ~ 512 bytes from card.
+ * -# SDIO_WriteBytes() : Write 1 ~ 512 bytes to card.
+ */
+/** \addtogroup libsdmmc_module
+ *
+ * \copydoc sdmmc_drv
+ *
+ * For more details, see \ref sdmmc_drv.
+ *
+ * Related Files:\n
+ * sdmmc.h,\n
+ * sdio.h,\n
+ * sdmmc_cmd.h,\n
+ * sdmmc_hal.h,\n
+ * sdmmc.c.\n
+ *
+ * \sa \ref sdmmc_lib
+ *
+ *@{
+ * \defgroup sdmmc_api SD/MMC APIs
+ * @{
+ * Definitions and functions for SD/MMC card access.
+ * \defgroup sdmmc_spec_defines SD/MMC Spec. definitions
+ * \defgroup sdio_api SDIO APIs
+ * \defgroup sdmmc_cmd SD/MMC Lib Commands Definitions
+ * @}
+ */
+
+#ifndef _SDMMC_H
+#define _SDMMC_H
+
+/*------------------------------------------------------------------------------
+ * Includes
+ *----------------------------------------------------------------------------*/
+/** \addtogroup sdmmc_spec_defines
+ * @{
+ */
+
+#include <stdint.h>
+#include "sdmmc_hal.h"
+#include "sdio.h"
+
+/*------------------------------------------------------------------------------
+ * Definitions
+ *----------------------------------------------------------------------------*/
+
+/** Default block size for SD/MMC card access */
+#define SD_BLOCK_SIZE 512
+
+/*----------------------------------------------------------------------------
+ * Macros
+ *----------------------------------------------------------------------------*/
+
+/** \addtogroup sdmmc_stream_acc SD/MMC bits/bytes fields access
+ * @{
+ */
+/** Get bits from a 32-b pointed data (total n bits) */
+#define SD_BITS32(pDw, nbits, ibit, bits) \
+ ( (((uint32_t*)(pDw))[(nbits)/32-(ibit)/32-1] >> ((ibit)%32)) & ((uint32_t)(1ull << (bits)) - 1 ) )
+/** Get bits from a 8-b pointed data (total n bits) */
+#define SD_BITS8(pB, nbits, ibit, bits) \
+ ( (((uint8_t*)(pB))[(nbits)/8-(ibit)/8-1] >> ((ibit)%8)) & ((1 << (bits)) - 1) )
+/** Get u8 from byte pointed data area */
+#define SD_U8(pD, nBytes, iByte) ( ((uint8_t*)(pD))[(nBytes) - (iByte) - 1] )
+/** Get u16 from data area */
+#define SD_U16(pD, nBytes, iByte) \
+ ( (((uint8_t*)(pD))[(nBytes) - (iByte) - 1 ] << 0) +\
+ (((uint8_t*)(pD))[(nBytes) - (iByte) - 1 + 1] << 8) )
+/**Get u32 from data area */
+#define SD_U32(pD, nBytes, iByte) \
+ ( (((uint8_t*)(pD))[(nBytes) - (iByte) - 1 ] << 0) +\
+ (((uint8_t*)(pD))[(nBytes) - (iByte) - 1 + 1] << 8) +\
+ (((uint8_t*)(pD))[(nBytes) - (iByte) - 1 + 2] << 16) +\
+ (((uint8_t*)(pD))[(nBytes) - (iByte) - 1 + 3] << 24) )
+/** @} */
+
+/** \addtogroup sdmmc_ocr_acc SD/MMC OCR register fields (SD 2.0 & MMC 4.3)
+ * @{
+ */
+#define SD_OCR_VDD_LOW (1ul << 7) /**< SD: Reserved for Low Voltage Range */
+#define MMC_OCR_VDD_170_195 (1ul << 7) /**< MMC: 1.7 ~ 1.95V, Dual vol and eMMC is 1 */
+#define MMC_OCR_VDD_200_260 (0x3Ful << 8) /**< MMC: 2.0 ~ 2.6 V */
+#define SD_OCR_VDD_20_21 (1ul << 8)
+#define SD_OCR_VDD_21_22 (1ul << 9)
+#define SD_OCR_VDD_22_23 (1ul << 10)
+#define SD_OCR_VDD_23_24 (1ul << 11)
+#define SD_OCR_VDD_24_25 (1ul << 12)
+#define SD_OCR_VDD_25_26 (1ul << 13)
+#define SD_OCR_VDD_26_27 (1ul << 14)
+#define SD_OCR_VDD_27_28 (1ul << 15)
+#define SD_OCR_VDD_28_29 (1ul << 16)
+#define SD_OCR_VDD_29_30 (1ul << 17)
+#define SD_OCR_VDD_30_31 (1ul << 18)
+#define SD_OCR_VDD_31_32 (1ul << 19)
+#define SD_OCR_VDD_32_33 (1ul << 20)
+#define SD_OCR_VDD_33_34 (1ul << 21)
+#define SD_OCR_VDD_34_35 (1ul << 22)
+#define SD_OCR_VDD_35_36 (1ul << 23)
+
+#define SDIO_OCR_MP (0x1ul << 27) /**< SDIO: Memory present */
+#define SDIO_OCR_NF (0x3ul << 28) /**< SDIO: Number of functions */
+#define MMC_OCR_ACCESS_MODE (0x3ul << 29) /**< MMC: Access mode, 0x2 is sector mode */
+#define MMC_OCR_ACCESS_BYTE (0x0 << 29) /**< MMC: Byte access mode */
+#define MMC_OCR_ACCESS_SECTOR (0x2 << 29) /**< MMC: Sector access mode */
+#define SD_OCR_CCS (1ul << 30) /**< SD Card Capacity Status (CCS) */
+#define SD_OCR_BUSY (1ul << 31) /**< SD/MMC Card power up status bit (busy) */
+
+/** We support 2.7 ~ 3.3V cards */
+#define SD_HOST_VOLTAGE_RANGE (SD_OCR_VDD_27_28 +\
+ SD_OCR_VDD_28_29 +\
+ SD_OCR_VDD_29_30 +\
+ SD_OCR_VDD_30_31 +\
+ SD_OCR_VDD_31_32 +\
+ SD_OCR_VDD_32_33)
+/** @}*/
+
+/** \addtogroup sdmmc_cid_acc SD/MMC CID register fields
+ * @{
+ */
+/** CID register access (128 bits, 16 * 8 bits, 4 * 32 bits) */
+#define SD_CID(pCid, field, bits) SD_BITS32(pCid, 128, field, bits)
+#define SD_CID_MID(pCid) SD_CID(pCid, 120, 8) /**< Manufacture ID */
+#define eMMC_CID_CBX(pCid) SD_CID(pCid, 112, 2) /**< eMMC BGA(01)/CARD(00) */
+#define SD_CID_OID1(pCid) SD_CID(pCid, 112, 8) /**< OEM/App ID Byte 1 */
+#define SD_CID_OID0(pCid) SD_CID(pCid, 104, 8) /**< OEM/App ID Byte 0 */
+#define eMMC_CID_OID(pCid) SD_CID(pCid, 104, 8) /**< eMMC OEM/App ID */
+#define SD_CID_PNM4(pCid) SD_CID(pCid, 96, 8) /**< Product name byte 4 */
+#define SD_CID_PNM3(pCid) SD_CID(pCid, 88, 8) /**< Product name byte 3 */
+#define SD_CID_PNM2(pCid) SD_CID(pCid, 80, 8) /**< Product name byte 2 */
+#define SD_CID_PNM1(pCid) SD_CID(pCid, 72, 8) /**< Product name byte 1 */
+#define SD_CID_PNM0(pCid) SD_CID(pCid, 64, 8) /**< Product name byte 0 */
+#define MMC_CID_PNM5(pCid) SD_CID(pCid, 96, 8) /**< Product name byte 5 */
+#define MMC_CID_PNM4(pCid) SD_CID(pCid, 88, 8) /**< Product name byte 4 */
+#define MMC_CID_PNM3(pCid) SD_CID(pCid, 80, 8) /**< Product name byte 3 */
+#define MMC_CID_PNM2(pCid) SD_CID(pCid, 72, 8) /**< Product name byte 2 */
+#define MMC_CID_PNM1(pCid) SD_CID(pCid, 64, 8) /**< Product name byte 1 */
+#define MMC_CID_PNM0(pCid) SD_CID(pCid, 56, 8) /**< Product name byte 0 */
+
+#define SD_CID_PRV(pCid) SD_CID(pCid, 56, 8) /**< Product Revision */
+#define MMC_CID_PRV(pCid) SD_CID(pCid, 48, 8) /**< Product Revision */
+
+#define SD_CID_PSN3(pCid) SD_CID(pCid, 48, 8) /**< Product serial 3 */
+#define SD_CID_PSN2(pCid) SD_CID(pCid, 40, 8) /**< Product serial 2 */
+#define SD_CID_PSN1(pCid) SD_CID(pCid, 32, 8) /**< Product serial 1 */
+#define SD_CID_PSN0(pCid) SD_CID(pCid, 24, 8) /**< Product serial 0 */
+#define MMC_CID_PSN3(pCid) SD_CID(pCid, 40, 8) /**< Product serial 3 */
+#define MMC_CID_PSN2(pCid) SD_CID(pCid, 32, 8) /**< Product serial 2 */
+#define MMC_CID_PSN1(pCid) SD_CID(pCid, 24, 8) /**< Product serial 1 */
+#define MMC_CID_PSN0(pCid) SD_CID(pCid, 16, 8) /**< Product serial 0 */
+
+#define SD_CID_MDT_Y(pCid) SD_CID(pCid, 12, 8) /**< Manufacturing Year (0=2000) */
+#define MMC_CID_MDT_Y(pCid) SD_CID(pCid, 12, 4) /**< Manufacturing Year (0=1997) */
+#define SD_CID_MDT_M(pCid) SD_CID(pCid, 8, 4) /**< Manufacturing month */
+#define SD_CID_CRC(pCid) SD_CID(pCid, 1, 7) /**< CRC7 checksum */
+/** @}*/
+
+/** \addtogroup sdmmc_csd_acc SD/MMC CSD register fields
+ * @{
+ */
+/** CSD register access macroes (128 bits, 16 * 8 bits, 4 * 32 bits */
+#define SD_CSD(pCsd, field, bits) SD_BITS32(pCsd, 128, field, bits)
+#define SD_CSD_STRUCTURE(pCsd) SD_CSD(pCsd, 126, 2) /**< CSD structure */
+#define SD_CSD_STRUCTURE_1_0 0 /**< SD v1.01~1.10, v2.0/Std Capacity */
+#define SD_CSD_STRUCTURE_2_0 1 /**< SD v2.0/HC */
+#define MMC_CSD_STRUCTURE_1_0 0 /**< MMC v1.0~1.2 */
+#define MMC_CSD_STRUCTURE_1_1 1 /**< MMC v1.4~2.2 */
+#define MMC_CSD_STRUCTURE_1_2 2 /**< MMC v3.1~3.31(v4.0), v4.1~(>v4.1) */
+#define MMC_CSD_SPEC_VERS(pCsd) SD_CSD(pCsd, 122, 4) /**< System spec version */
+#define MMC_CSD_SPEC_VERS_1_0 0 /**< MMC v1.0~1.2 */
+#define MMC_CSD_SPEC_VERS_1_4 1 /**< MMC v1.4 */
+#define MMC_CSD_SPEC_VERS_2_0 2 /**< MMC v2.0~2.2 */
+#define MMC_CSD_SPEC_VERS_3_1 3 /**< MMC v3.1~3.31 */
+#define MMC_CSD_SPEC_VERS_4_0 4 /**< MMC v4.0(v4.0), v4.1~(>v4.1) */
+#define SD_CSD_TAAC(pCsd) SD_CSD(pCsd, 112, 8) /**< Data read-access-time-1 */
+#define SD_CSD_NSAC(pCsd) SD_CSD(pCsd, 104, 8) /**< Data read access-time-2 in CLK cycles */
+#define SD_CSD_TRAN_SPEED(pCsd) SD_CSD(pCsd, 96, 8) /**< Max. data transfer rate */
+#define SD_CSD_CCC(pCsd) SD_CSD(pCsd, 84, 12) /**< Card command class */
+#define SD_CSD_READ_BL_LEN(pCsd) SD_CSD(pCsd, 80, 4) /**< Max. read data block length */
+#define SD_CSD_READ_BL_PARTIAL(pCsd) SD_CSD(pCsd, 79, 1) /**< Bartial blocks for read allowed */
+#define SD_CSD_WRITE_BLK_MISALIGN(pCsd) SD_CSD(pCsd, 78, 1) /**< Write block misalignment */
+#define SD_CSD_READ_BLK_MISALIGN(pCsd) SD_CSD(pCsd, 77, 1) /**< Read block misalignment */
+#define SD_CSD_DSR_IMP(pCsd) SD_CSD(pCsd, 76, 1) /**< DSP implemented */
+#define SD_CSD_C_SIZE(pCsd) ((SD_CSD(pCsd, 72, 2) << 10) + \
+ (SD_CSD(pCsd, 64, 8) << 2) + \
+ SD_CSD(pCsd, 62, 2)) /**< Device size */
+#define SD2_CSD_C_SIZE(pCsd) ((SD_CSD(pCsd, 64, 6) << 16) + \
+ (SD_CSD(pCsd, 56, 8) << 8) + \
+ SD_CSD(pCsd, 48, 8)) /**< Device size v2.0 */
+#define SD_CSD_VDD_R_CURR_MIN(pCsd) SD_CSD(pCsd, 59, 3) /**< Max. read current VDD min */
+#define SD_CSD_VDD_R_CURR_MAX(pCsd) SD_CSD(pCsd, 56, 3) /**< Max. read current VDD max */
+#define SD_CSD_VDD_W_CURR_MIN(pCsd) SD_CSD(pCsd, 53, 3) /**< Max. write current VDD min */
+#define SD_CSD_VDD_W_CURR_MAX(pCsd) SD_CSD(pCsd, 50, 3) /**< Max. write current VDD max */
+#define SD_CSD_C_SIZE_MULT(pCsd) SD_CSD(pCsd, 47, 3) /**< Device size multiplier */
+#define SD_CSD_ERASE_BLK_EN(pCsd) SD_CSD(pCsd, 46, 1) /**< Erase single block enable */
+#define MMC_CSD_ERASE_BLK_EN(pCsd) SD_CSD(pCsd, 46, 1) /**< Erase single block enable */
+#define MMC_CSD_ERASE_GRP_SIZE(pCsd) SD_CSD(pCsd, 42, 4) /**< Erase group size */
+#define SD_CSD_ERASE_GRP_MULT(pCsd) SD_CSD(pCsd, 37, 4) /**< Erase group size multiplier */
+#define SD_CSD_SECTOR_SIZE(pCsd) ((SD_CSD(pCsd, 40, 6) << 1) \
+ + SD_CSD(pCsd, 39, 1)) /**< Erase sector size*/
+#define SD_CSD_WP_GRP_SIZE(pCsd) SD_CSD(pCsd, 32, 7) /**< Write protect group size*/
+#define SD_CSD_WP_GRP_ENABLE(pCsd) SD_CSD(pCsd, 31, 1) /**< write protect group enable*/
+#define SD_CSD_R2W_FACTOR(pCsd) SD_CSD(pCsd, 26, 3) /**< Write speed factor*/
+#define SD_CSD_WRITE_BL_LEN(pCsd) ((SD_CSD(pCsd, 24, 2) << 2) \
+ + SD_CSD(pCsd, 22, 2)) /**< Max write block length*/
+#define SD_CSD_WRITE_BL_PARTIAL(pCsd) SD_CSD(pCsd, 21, 1) /**< Partial blocks for write allowed*/
+#define SD_CSD_CONTENT_PROT_APP(pCsd) SD_CSD(pCsd, 16, 1) /**< File format group*/
+#define SD_CSD_FILE_FORMAT_GRP(pCsd) SD_CSD(pCsd, 15, 1) /**< File format group*/
+#define SD_CSD_COPY(pCsd) SD_CSD(pCsd, 14, 1) /**< Copy flag (OTP)*/
+#define SD_CSD_PERM_WRITE_PROTECT(pCsd) SD_CSD(pCsd, 13, 1) /**< Permanent write protect*/
+#define SD_CSD_TMP_WRITE_PROTECT(pCsd) SD_CSD(pCsd, 12, 1) /**< Temporary write protection*/
+#define SD_CSD_FILE_FORMAT(pCsd) SD_CSD(pCsd, 10, 2) /**< File format*/
+#define MMC_CSD_ECC(pCsd) SD_CSD(pCsd, 8, 2) /**< ECC */
+#define MMC_CSD_ECC_NONE 0 /**< none */
+#define MMC_CSD_ECC_BCH 1 /**< BCH, 3 correctable bits per block */
+#define SD_CSD_CRC(pCsd) SD_CSD(pCsd, 1, 7) /**< CRC*/
+
+#define SD_CSD_MULT(pCsd) (1 << (SD_CSD_C_SIZE_MULT(pCsd) + 2))
+#define SD_CSD_BLOCKNR(pCsd) ((SD_CSD_C_SIZE(pCsd) + 1) * SD_CSD_MULT(pCsd))
+#define SD_CSD_BLOCKNR_HC(pCsd) ((SD2_CSD_C_SIZE(pCsd) + 1) * 1024)
+#define SD_CSD_BLOCK_LEN(pCsd) (1 << SD_CSD_READ_BL_LEN(pCsd))
+#define SD_CSD_TOTAL_SIZE(pCsd) (SD_CSD_BLOCKNR(pCsd) * SD_CSD_BLOCK_LEN(pCsd))
+#define SD_CSD_TOTAL_SIZE_HC(pCsd) ((SD2_CSD_C_SIZE(pCsd) + 1) * 512* 1024)
+/** @}*/
+
+/** \addtogroup sd_scr_acc SD SCR register fields
+ * @{
+ */
+/** SCR (Configuration register) access macros (64 bits, 2 * 32 bits, 8 * 8 bits). */
+#define SD_SCR(pScr, field, bits) SD_BITS32(pScr, 64, field, bits)
+#define SD_SCR_STRUCTURE(pScr) SD_SCR(pScr, 60, 4)
+#define SD_SCR_STRUCTURE_1_0 0 /**< SD v1.01~2.00 */
+#define SD_SCR_SD_SPEC(pScr) SD_SCR(pScr, 56, 4)
+#define SD_SCR_SD_SPEC_1_0 0 /**< SD v1.0~1.01 */
+#define SD_SCR_SD_SPEC_1_10 1 /**< SD v1.10 */
+#define SD_SCR_SD_SPEC_2_00 2 /**< SD v2.00 */
+#define SD_SCR_DATA_STAT_AFTER_ERASE(pScr) SD_SCR(pScr, 55, 1)
+#define SD_SCR_SD_SECURITY(pScr) SD_SCR(pScr, 52, 3)
+#define SD_SCR_SD_SECURITY_NO 0 /**< No security */
+#define SD_SCR_SD_SECURITY_NOTUSED 1 /**< Not used */
+#define SD_SCR_SD_SECURITY_1_01 2 /**< Version 1.01 */
+#define SD_SCR_SD_SECURITY_2_00 3 /**< Version 2.00 */
+#define SD_SCR_SD_BUS_WIDTHS(pScr) SD_SCR(pScr, 48, 4)
+#define SD_SCR_SD_BUS_WIDTH_1BITS (1 << 0) /**< 1 bit (DAT0) */
+#define SD_SCR_SD_BUS_WIDTH_4BITS (1 << 2) /**< 4 bit (DAT0~3) */
+/** @}*/
+
+/** \addtogroup sd_card_status_acc SD Card Status fields
+ * @{
+ */
+/** SD/MMC Card STatus bits */
+#define SD_CST_OUT_OF_RANGE (1UL << 31) /**< Arg out of allowed range */
+#define SD_CST_ADDRESS_ERROR (1UL << 30) /**< Misaligned address not match the block length */
+#define SD_CST_BLOCK_LEN_ERROR (1UL << 29) /**< Block length invalid or not match */
+#define SD_CST_ERASE_SEQ_ERROR (1UL << 28) /**< An error in the sequence of erase command */
+#define SD_CST_ERASE_PARAM (1UL << 27) /**< An invalid selection of write-blocks for erase */
+#define SD_CST_WP_VIOLATION (1UL << 26) /**< Write to a protected block or card */
+#define SD_CST_CARD_IS_LOCKED (1UL << 25) /**< Card is locked by the host */
+#define SD_CST_LOCK_UNLOCK_FAILED (1UL << 24) /**< sequence or password error in lock/unlock */
+#define SD_CST_COM_CRC_ERROR (1UL << 23) /**< CRC of the command failed */
+#define SD_CST_ILLEGAL_COMMAND (1UL << 22) /**< Command not legal for the card state */
+#define SD_CST_CARD_ECC_FAILED (1UL << 21) /**< Card internal ECC applied but failed to correct */
+#define SD_CST_CC_ERROR (1UL << 20) /**< Internal card controller error */
+#define SD_CST_ERROR (1UL << 19) /**< General or unknow error */
+#define MMC_CST_UNDERRUN (1UL << 18) /**< Card could not sustain data transfer in stream read mode */
+#define MMC_CST_OVERRUN (1UL << 17) /**< Card could not sustain data programming in stream write mode */
+#define SD_CST_CSD_OVERWRITE (1UL << 16) /**< RO section of CSD not match or attempt to reverse the copy or permanent WP bits */
+#define SD_CST_WP_ERASE_SKIP (1UL << 15) /**< Only partial address space was erased */
+#define SD_CST_ECC_DISABLED (1UL << 14) /**< Command executed without using the internal ECC */
+#define SD_CST_ERASE_RESET (1UL << 13) /**< Erase sequence was cleared before executing because an out of erase sequence command was received */
+#define SD_CST_CURRENT_STATE (0xFUL << 9) /**< Card state mask */
+#define SD_STATE_IDLE 0
+#define SD_STATE_READY 1
+#define SD_STATE_IDENT 2
+#define SD_STATE_STBY 3
+#define SD_STATE_TRAN 4
+#define SD_STATE_DATA 5
+#define SD_STATE_RCV 6
+#define SD_STATE_PRG 7
+#define SD_STATE_DIS 8
+#define MMC_STATE_BTST 9
+#define MMC_STATE_SLP 10
+#define SD_CST_STATE_IDLE (0x0UL << 9) /**< Card IDLE */
+#define SD_CST_STATE_READY (0x1UL << 9) /**< Card READY */
+#define SD_CST_STATE_IDENT (0x2UL << 9) /**< Card Identify state */
+#define SD_CST_STATE_STBY (0x3UL << 9) /**< Card STBY */
+#define SD_CST_STATE_TRAN (0x4UL << 9) /**< Card TRAN */
+#define SD_CST_STATE_DATA (0x5UL << 9) /**< Card DATA */
+#define SD_CST_STATE_RCV (0x6UL << 9) /**< Card RCV */
+#define SD_CST_STATE_PRG (0x7UL << 9) /**< Card PRG */
+#define SD_CST_STATE_DIS (0x8UL << 9) /**< Card DIS */
+#define SD_CST_STATE_BTST (0x9UL << 9) /**< MMC BTSR */
+#define SD_CST_STATE_SLP (0xAUL << 9) /**< MMC SLP */
+#define SD_CST_READY_FOR_DATA (1UL << 8) /**< buffer empty */
+#define MMC_CST_SWITCH_ERROR (1UL << 7) /**< SWITCH command error */
+#define SD_CST_APP_CMD (1UL << 5) /**< The card will expect ACMD */
+#define SD_CST_AKE_SEQ_ERROR (1UL << 3) /**< Error in authentication */
+/** @}*/
+
+/** \addtogroup sdmmc_sd_status SD/MMC status fields
+ * @{
+ */
+/** SD Status access macros (512 bits, 16 * 32 bits, 64 * 8 bits). */
+#define SD_ST(pSt, field, bits) SD_BITS32(pSt, 512, field, bits)
+#define SD_ST_DAT_BUS_WIDTH(pSt) SD_ST(pSt, 510, 2) /**< Bus width, 00: default, 10:4-bit */
+#define SD_ST_DATA_BUS_WIDTH_1BIT 0x0 /**< 1-bit bus width */
+#define SD_ST_DATA_BUS_WIDTH_4BIT 0x2 /**< 4-bit bus width */
+#define SD_ST_SECURED_MODE(pSt) SD_ST(pSt, 509, 1) /**< Secured Mode */
+#define SD_ST_CARD_TYPE(pSt) SD_ST(pSt, 480, 16)
+#define SD_ST_CARD_TYPE_RW 0x0000 /**< Regular SD R/W Card */
+#define SD_ST_CARD_TYPE_ROM 0x0001 /**< SD ROM Card */
+#define SD_ST_SIZE_OF_PROTECTED_AREA(pSt) SD_ST(pSt, 448, 32) /**< STD: ThisSize*Multi*BlockLen, HC: Size in bytes */
+#define SD_ST_SPEED_CLASS(pSt) SD_ST(pSt, 440, 8) /** Speed Class, value can be calculated by Pw/2 */
+#define SD_ST_SPEED_CLASS_0 0
+#define SD_ST_SPEED_CLASS_2 1 // >= 2MB/s
+#define SD_ST_SPEED_CLASS_4 2 // >= 4MB/s
+#define SD_ST_SPEED_CLASS_6 3 // >= 6MB/s
+#define SD_ST_PERFORMANCE_MOVE(pSt) SD_ST(pSt, 432, 8) /**< 8-bit, by 1MB/s step. */
+#define SD_ST_AU_SIZE(pSt) SD_ST(pSt, 428, 4) /**< AU Size, in power of 2 from 16KB */
+#define SD_ST_AU_SIZE_16K 1
+#define SD_ST_AU_SIZE_32K 2
+#define SD_ST_AU_SIZE_64K 3
+#define SD_ST_AU_SIZE_128K 4
+#define SD_ST_AU_SIZE_256K 5
+#define SD_ST_AU_SIZE_512K 6
+#define SD_ST_AU_SIZE_1M 7
+#define SD_ST_AU_SIZE_2M 8
+#define SD_ST_AU_SIZE_4M 9
+#define SD_ST_ERASE_SIZE(pSt) SD_ST(pSt, 408, 16) /**< 16-bit, number of AUs erased. */
+#define SD_ST_ERASE_TIMEOUT(pSt) SD_ST(pSt, 402, 6) /**< Timeout value for erasing areas */
+#define SD_ST_ERASE_OFFSET(pSt) SD_ST(pSt, 400, 2) /**< Fixed offset value added to erase time */
+/** @}*/
+
+/** \addtogroup sd_switch_status SD Switch Status fields
+ * @{
+ */
+/** SD Switch Status access macros (512 bits, 16 * 32 bits, 64 * 8 bits). */
+#define SD_SWITCH_ST(p, field, bits) SD_BITS32(p, 512, field, bits)
+#define SD_SWITCH_ST_MAX_CURRENT_CONSUMPTION(p) SD_SWITCH_ST(p, 496, 16)
+#define SD_SWITCH_ST_FUN_GRP6_INFO(p) SD_SWITCH_ST(p, 480, 16)
+#define SD_SWITCH_ST_FUN_GRP5_INFO(p) SD_SWITCH_ST(p, 464, 16)
+#define SD_SWITCH_ST_FUN_GRP4_INFO(p) SD_SWITCH_ST(p, 448, 16)
+#define SD_SWITCH_ST_FUN_GRP3_INFO(p) SD_SWITCH_ST(p, 432, 16)
+#define SD_SWITCH_ST_FUN_GRP2_INFO(p) SD_SWITCH_ST(p, 416, 16)
+#define SD_SWITCH_ST_FUN_GRP1_INFO(p) SD_SWITCH_ST(p, 400, 16)
+#define SD_SWITCH_ST_FUN_GRP6_RC(p) SD_SWITCH_ST(p, 396, 4)
+#define SD_SWITCH_ST_FUN_GRP5_RC(p) SD_SWITCH_ST(p, 392, 4)
+#define SD_SWITCH_ST_FUN_GRP4_RC(p) SD_SWITCH_ST(p, 388, 4)
+#define SD_SWITCH_ST_FUN_GRP3_RC(p) SD_SWITCH_ST(p, 384, 4)
+#define SD_SWITCH_ST_FUN_GRP2_RC(p) SD_SWITCH_ST(p, 380, 4)
+#define SD_SWITCH_ST_FUN_GRP1_RC(p) SD_SWITCH_ST(p, 376, 4)
+#define SD_SWITCH_ST_FUN_GRP_RC_ERROR 0xF
+#define SD_SWITCH_ST_DATA_STRUCT_VER(p) SD_SWITCH_ST(p, 368, 8)
+#define SD_SWITCH_ST_FUN_GRP6_BUSY(p) SD_SWITCH_ST(p, 352, 16)
+#define SD_SWITCH_ST_FUN_GRP5_BUSY(p) SD_SWITCH_ST(p, 336, 16)
+#define SD_SWITCH_ST_FUN_GRP4_BUSY(p) SD_SWITCH_ST(p, 320, 16)
+#define SD_SWITCH_ST_FUN_GRP3_BUSY(p) SD_SWITCH_ST(p, 304, 16)
+#define SD_SWITCH_ST_FUN_GRP2_BUSY(p) SD_SWITCH_ST(p, 288, 16)
+#define SD_SWITCH_ST_FUN_GRP1_BUSY(p) SD_SWITCH_ST(p, 272, 16)
+#define SD_SWITCH_ST_FUN_GRP_FUN_BUSY(funNdx) (1 << (funNdx))
+/** @}*/
+
+/** \addtogroup mmc_ext_csd MMC Extended CSD byte fields
+ * @{
+ */
+/** MMC Extended CSD access macro: get one byte (512 bytes). */
+#define MMC_EXT8(p, i) SD_U8(p, 512, i)
+/** MMC Extended CSD access macro: get one word (512 bytes). */
+#define MMC_EXT32(p, i) SD_U32(p, 512, i)
+#define MMC_EXT_S_CMD_SET_I 504 /**< Supported Command Sets slice */
+#define MMC_EXT_S_CMD_SET(p) MMC_EXT8(p, MMC_EXT_S_CMD_SET_I)
+#define MMC_EXT_BOOT_INFO_I 228 /**< Boot information slice */
+#define MMC_EXT_BOOT_INFO(p) MMC_EXT8(p, MMC_EXT_BOOT_INFO_I)
+#define MMC_EXT_BOOT_SIZE_MULTI_I 226 /**< Boot partition size slice */
+#define MMC_EXT_BOOT_SIZE_MULTI(p) MMC_EXT8(p, MMC_EXT_BOOT_SIZE_MULTI_I)
+#define MMC_EXT_ACC_SIZE_I 225 /**< Access size slice */
+#define MMC_EXT_ACC_SIZE(p) MMC_EXT8(p, MMC_EXT_ACC_SIZE_I)
+#define MMC_EXT_HC_ERASE_GRP_SIZE_I 224 /**< High-capacity erase time unit size slice */
+#define MMC_EXT_HC_ERASE_GRP_SIZE(p) MMC_EXT8(p, MMC_EXT_HC_ERASE_GRP_SIZE_I)
+#define MMC_EXT_ERASE_TIMEOUT_MULT_I 223 /**< High-capacity erase timeout slice */
+#define MMC_EXT_ERASE_TIMEOUT_MULT(p) MMC_EXT8(p, MMC_EXT_ERASE_TIMEOUT_MULT_I)
+#define MMC_EXT_REL_WR_SEC_C_I 222 /**< Reliable write sector count slice */
+#define MMC_EXT_REL_WR_SEC_C(p) MMC_EXT8(p, MMC_EXT_REL_WR_SEC_C_I)
+#define MMC_EXT_HC_WP_GRP_SIZE_I 221 /**< High-capacity write protect group size slice */
+#define MMC_EXT_HC_WP_GRP_SIZE(p) MMC_EXT8(p, MMC_EXT_HC_WP_GRP_SIZE_I)
+#define MMC_EXT_S_C_VCC_I 220 /**< Sleep current (VCC) */
+#define MMC_EXT_S_C_VCC(p) MMC_EXT8(p, MMC_EXT_S_C_VCC_I)
+#define MMC_EXT_S_C_VCCQ_I 219 /**< Sleep current (VCC) */
+#define MMC_EXT_S_C_VCCQ(p) MMC_EXT8(p, MMC_EXT_S_C_VCCQ_I)
+#define MMC_EXT_S_A_TIMEOUT_I 217 /**< Sleep current (VCCQ) */
+#define MMC_EXT_S_A_TIMEOUT(p) MMC_EXT8(p, MMC_EXT_S_A_TIMEOUT_I)
+#define MMC_EXT_SEC_COUNT_I 212 /**< Sector Count slice */
+#define MMC_EXT_SEC_COUNT(p) MMC_EXT32(p, MMC_EXT_SEC_COUNT_I)
+#define MMC_EXT_MIN_PERF_W_8_52_I 210 /**< Minimum Write Performance for 8bit @52MHz */
+#define MMC_EXT_MIN_PERF_W_8_52(p) MMC_EXT8(p, MMC_EXT_MIN_PERF_W_8_52_I)
+#define MMC_EXT_MIN_PERF_R_8_52_I 209 /**< Minimum Read Performance for 8bit @52MHz */
+#define MMC_EXT_MIN_PERF_R_8_52(p) MMC_EXT8(p, MMC_EXT_MIN_PERF_R_8_52_I)
+#define MMC_EXT_MIN_PERF_W_8_26_4_52_I 208 /**< Minimum Write Performance for 8bit @26MHz or 4bit @52MHz */
+#define MMC_EXT_MIN_PERF_W_8_26_4_52(p) MMC_EXT8(p, MMC_EXT_MIN_PERF_W_8_26_4_52_I)
+#define MMC_EXT_MIN_PERF_R_8_26_4_52_I 207 /**< Minimum Read Performance for 8bit @26MHz or 4bit @52MHz */
+#define MMC_EXT_MIN_PERF_R_8_26_4_52(p) MMC_EXT8(p, MMC_EXT_MIN_PERF_R_8_26_4_52_I)
+#define MMC_EXT_MIN_PERF_W_4_26_I 206 /**< Minimum Write Performance for 4bit @26MHz */
+#define MMC_EXT_MIN_PERF_W_4_26(p) MMC_EXT8(p, MMC_EXT_MIN_PERF_W_4_26_I)
+#define MMC_EXT_MIN_PERF_R_4_26_I 205 /**< Minimum Read Performance for 4bit @26MHz */
+#define MMC_EXT_MIN_PERF_R_4_26(p) MMC_EXT8(p, MMC_EXT_MIN_PERF_R_4_26_I)
+#define MMC_EXT_PWR_CL_26_360_I 203 /**< Power Class for 26MHz @ 3.6V */
+#define MMC_EXT_PWR_CL_26_360(p) MMC_EXT8(p, MMC_EXT_PWR_CL_26_360_I)
+#define MMC_EXT_PWR_CL_52_360_I 202 /**< Power Class for 52MHz @ 3.6V */
+#define MMC_EXT_PWR_CL_52_360(p) MMC_EXT8(p, MMC_EXT_PWR_CL_52_360_I)
+#define MMC_EXT_PWR_CL_26_195_I 201 /**< Power Class for 26MHz @ 1.95V */
+#define MMC_EXT_PWR_CL_26_195(p) MMC_EXT8(p, MMC_EXT_PWR_CL_26_195_I)
+#define MMC_EXT_PWR_CL_52_195_I 200 /**< Power Class for 52MHz @ 1.95V */
+#define MMC_EXT_PWR_CL_52_195(p) MMC_EXT8(p, MMC_EXT_PWR_CL_52_195_I)
+#define MMC_EXT_CARD_TYPE_I 196 /**< Card Type */
+#define MMC_EXT_CARD_TYPE(p) MMC_EXT8(p, MMC_EXT_CARD_TYPE_I)
+#define MMC_EXT_CSD_STRUCTURE_I 194 /**< CSD Structure Version */
+#define MMC_EXT_CSD_STRUCTURE(p) MMC_EXT8(p, MMC_EXT_CSD_STRUCTURE_I)
+#define MMC_EXT_EXT_CSD_REV_I 192 /**< Extended CSD Revision */
+#define MMC_EXT_EXT_CSD_REV(p) MMC_EXT8(p, MMC_EXT_EXT_CSD_REV_I)
+#define MMC_EXT_CMD_SET_I 191 /**< Command Set */
+#define MMC_EXT_CMD_SET(p) MMC_EXT8(p, MMC_EXT_CMD_SET_I)
+#define MMC_EXT_CMD_SET_REV_I 189 /**< Command Set Revision */
+#define MMC_EXT_CMD_SET_REV(p) MMC_EXT8(p, MMC_EXT_CMD_SET_REV_I)
+#define MMC_EXT_POWER_CLASS_I 187 /**< Power Class */
+#define MMC_EXT_POWER_CLASS(p) MMC_EXT8(p, MMC_EXT_POWER_CLASS_I)
+#define MMC_EXT_HS_TIMING_I 185 /**< High Speed Interface Timing */
+#define MMC_EXT_HS_TIMING(p) MMC_EXT8(p, MMC_EXT_HS_TIMING_I)
+#define MMC_EXT_HS_TIMING_EN 1
+#define MMC_EXT_HS_TIMING_DIS 0
+#define MMC_EXT_BUS_WIDTH_I 183 /**< Bus Width Mode */
+#define MMC_EXT_BUS_WIDTH(p) MMC_EXT8(p, MMC_EXT_BUS_WIDTH_I)
+#define MMC_EXT_BUS_WIDTH_1BIT 0
+#define MMC_EXT_BUS_WIDTH_4BITS 1
+#define MMC_EXT_BUS_WIDTH_8BUTS 2
+#define MMC_EXT_ERASED_MEM_CONT_I 181 /**< Erased Memory Content */
+#define MMC_EXT_ERASED_MEM_CONT(p) MMC_EXT8(p, MMC_EXT_ERASED_MEM_CONT_I)
+#define MMC_EXT_BOOT_CONFIG_I 179 /**< Boot configuration slice */
+#define MMC_EXT_BOOT_CONFIG(p) MMC_EXT8(p, MMC_EXT_BOOT_CONFIG_I)
+#define MMC_EXT_BOOT_BUS_WIDTH_I 177 /**< Boot bus width slice */
+#define MMC_EXT_BOOT_BUS_WIDTH(p) MMC_EXT8(p, MMC_EXT_BOOT_BUS_WIDTH_I)
+#define MMC_EXT_ERASE_GROUP_DEF_I 175 /**< High-density erase group definition */
+#define MMC_EXT_ERASE_GROUP_DEF(p) MMC_EXT8(p, MMC_EXT_ERASE_GROUP_DEF_I)
+/** @}*/
+
+/** \addtogroup sd_cmd8 SD CMD8 arguments
+ * @{
+ */
+#define SD_CMD8_VHS (0xFul << 8) /**< Voltage supplied */
+#define SD_CMD8_VHS_27_36 (0x1ul << 8) /**< 2.7 ~ 3.6V */
+#define SD_CMD8_VHS_LOW_VOL (0x2ul << 8) /**< Reserved for Low Voltage Range */
+#define SD_CMD8_CHECK_PATTERN (0xAA << 0) /**< Recommended check pattern */
+/** @}*/
+/** @}*/
+
+/*----------------------------------------------------------------------------
+ * Types
+ *----------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------
+ * Functions
+ *----------------------------------------------------------------------------*/
+/** \addtogroup sdmmc_api
+ @{*/
+
+extern uint8_t SD_Init(sSdCard *pSd);
+extern void SD_DeInit(sSdCard *pSd);
+
+extern uint8_t SD_SetupBusMode(sSdCard *pSd, uint8_t bMode);
+extern uint8_t SD_SetupHSMode(sSdCard *pSd, uint8_t bMode);
+
+extern uint8_t SD_GetCardType(sSdCard *pSd);
+extern uint32_t SD_GetNumberBlocks(sSdCard *pSd);
+extern uint32_t SD_GetBlockSize(sSdCard *pSd);
+extern uint32_t SD_GetTotalSizeKB(sSdCard *pSd);
+
+extern uint8_t SD_ReadBlocks(sSdCard *pSd,
+ uint32_t dwAddr,
+ void *pData,
+ uint32_t dwNbBlocks);
+extern uint8_t SD_WriteBlocks(sSdCard *pSd,
+ uint32_t dwAddr,
+ const void *pData,
+ uint32_t dwNbBlocks);
+
+extern uint8_t SD_Read(sSdCard *pSd,
+ uint32_t dwAddr,
+ void *pData,
+ uint32_t dwNbBlocks,
+ fSdmmcCallback fCallback,
+ void *pArg);
+extern uint8_t SD_Write(sSdCard *pSd,
+ uint32_t dwAddr,
+ const void *pData,
+ uint32_t dwNbBlocks,
+ fSdmmcCallback fCallback,
+ void *pArg);
+
+extern uint8_t SDIO_ReadDirect(
+ sSdCard * pSd,
+ uint8_t bFunctionNum,
+ uint32_t dwAddress,
+ uint8_t * pData,
+ uint32_t dwSize);
+
+extern uint8_t SDIO_WriteDirect(
+ sSdCard * pSd,
+ uint8_t bFunctionNum,
+ uint32_t dwAddress,
+ uint8_t bDataByte);
+
+extern uint8_t SDIO_ReadBytes(
+ sSdCard * pSd,
+ uint8_t bFunctionNum,
+ uint32_t dwAddress,
+ uint8_t bIsFixedAddress,
+ uint8_t * pData,
+ uint16_t wSize,
+ fSdmmcCallback fCallback,
+ void * pArg);
+
+extern uint8_t SDIO_WriteBytes(
+ sSdCard * pSd,
+ uint8_t bFunctionNum,
+ uint32_t dwAddress,
+ uint8_t bIsFixedAddress,
+ uint8_t * pData,
+ uint16_t wSize,
+ fSdmmcCallback fCallback,
+ void * pArg);
+
+
+
+extern void SDIO_DumpCardInformation(sSdCard * pSd);
+
+extern void SD_DumpCID(void * pCID);
+
+extern void SD_DumpCSD(void * pCSD);
+
+extern void SD_DumpExtCSD(void * pExtCSD);
+
+extern void SD_DumpSCR(void * pSCR);
+
+extern void SD_DumpSdStatus(void * pSdST);
+
+/** @}*/
+/** @}*/
+/**@}*/
+#endif /* #define _SDMMC_H */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/sdmmc_cmd.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/sdmmc_cmd.h
new file mode 100644
index 0000000..af0c583
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/sdmmc_cmd.h
@@ -0,0 +1,555 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/** \file */
+
+/**
+ * \page sdmmc_lib_cmd SD/MMC Lib Commands
+ *
+ * Implementation for SD/MMC low level driver. Supply a set of SD/MMC mode's
+ * interface.
+ *
+ * \section Usage
+ *
+ * - Uses following Library definitions in HAL or application:
+ * -# \ref sdmmc_cardtype : SD/SDIO/MMC card type definitions.
+ * -# \ref sdmmc_rc : Return codes for SD/MMC operation (functions).
+ * -# \ref sSdCard : Struct that defined by application for SD/MMC management.
+ * - Uses following Low Level Definitions in HAL:
+ * -# \ref sdmmc_ioctrls : IO control code for HAL implement.
+ * -# \ref sdmmc_cmd_op : Command operation code for HAL to implement.
+ * -# \ref sSdHalFunctions : HAL functions to implement.
+ */
+
+ #ifndef _SDMMC_CMD_H
+ #define _SDMMC_CMD_H
+/** \addtogroup sdmmc_cmd
+ *
+ * \copydoc sdmmc_lib_cmd
+ *
+ * See \ref sdmmc_lib_cmd for more details.
+ *@{
+ */
+
+/*------------------------------------------------------------------------------
+ * Includes
+ *----------------------------------------------------------------------------*/
+
+#include <stdint.h>
+
+/*------------------------------------------------------------------------------
+ * Definitions
+ *----------------------------------------------------------------------------*/
+/** \addtogroup sdmmc_cmd_defines SD/MMC General defines
+ @{*/
+
+/**
+ * \addtogroup sdmmc_cardtype SD/MMC Card Types
+ * Here lists the SD/MMC card types.
+ * - Card Type Category Bitmap
+ * - \ref CARD_TYPE_bmHC
+ * - \ref CARD_TYPE_bmSDMMC
+ * - \ref CARD_TYPE_bmUNKNOWN
+ * - \ref CARD_TYPE_bmSD
+ * - \ref CARD_TYPE_bmMMC
+ * - \ref CARD_TYPE_bmSDIO
+ * - Card Types
+ * - \ref CARD_UNKNOWN
+ * - \ref CARD_SD
+ * - \ref CARD_SDHC
+ * - \ref CARD_MMC
+ * - \ref CARD_MMCHD
+ * - \ref CARD_SDIO
+ * - \ref CARD_SDCOMBO
+ * - \ref CARD_SDHCCOMBO
+ * @{*/
+#define CARD_TYPE_bmHC (1 << 0) /**< Bit for High-Capacity(Density) */
+#define CARD_TYPE_bmSDMMC (0x3 << 1) /**< Bits mask for SD/MMC */
+#define CARD_TYPE_bmUNKNOWN (0x0 << 1) /**< Bits for Unknown card */
+#define CARD_TYPE_bmSD (0x1 << 1) /**< Bits for SD */
+#define CARD_TYPE_bmMMC (0x2 << 1) /**< Bits for MMC */
+#define CARD_TYPE_bmSDIO (1 << 3) /**< Bit for SDIO */
+/** Card can not be identified */
+#define CARD_UNKNOWN (0)
+/** SD Card (0x2) */
+#define CARD_SD (CARD_TYPE_bmSD)
+/** SD High Capacity Card (0x3) */
+#define CARD_SDHC (CARD_TYPE_bmSD|CARD_TYPE_bmHC)
+/** MMC Card (0x4) */
+#define CARD_MMC (CARD_TYPE_bmMMC)
+/** MMC High-Density Card (0x5) */
+#define CARD_MMCHD (CARD_TYPE_bmMMC|CARD_TYPE_bmHC)
+/** SDIO only card (0x8) */
+#define CARD_SDIO (CARD_TYPE_bmSDIO)
+/** SDIO Combo, with SD embedded (0xA) */
+#define CARD_SDCOMBO (CARD_TYPE_bmSDIO|CARD_SD)
+/** SDIO Combo, with SDHC embedded (0xB) */
+#define CARD_SDHCCOMBO (CARD_TYPE_bmSDIO|CARD_SDHC)
+/** @}*/
+
+/**
+ * \addtogroup sdmmc_rc SD/MMC Return Codes
+ * Here lists the SD/MMC driver return codes.
+ * - \ref SDMMC_ERROR
+ * - \ref SDMMC_ERROR_NORESPONSE
+ * - \ref SDMMC_ERROR_NOT_INITIALIZED
+ * - \ref SDMMC_ERROR_BUSY
+ * - \ref SDMMC_ERROR_PARAM
+ * - \ref SDMMC_ERROR_NOT_SUPPORT
+ * - \ref SDMMC_OK
+ * - \ref SDMMC_ERROR_LOCKED
+ * @{*/
+
+/** SD/MMC Return codes */
+typedef enum {
+ SDMMC_OK = 0, /**< Operation OK */
+ SDMMC_LOCKED = 1, /**< Failed because driver locked */
+ SDMMC_BUSY = 2, /**< Failed because driver busy */
+ SDMMC_NO_RESPONSE = 3, /**< Failed because card not respond */
+ SDMMC_CHANGED, /**< Setting param changed due to limitation */
+ SDMMC_ERR, /**< Failed with general error */
+ SDMMC_ERR_IO, /**< Failed because of IO error */
+ SDMMC_ERR_RESP, /**< Error reported in response code */
+ SDMMC_NOT_INITIALIZED, /**< Fail to initialize */
+ SDMMC_PARAM, /**< Parameter error */
+ SDMMC_STATE, /**< State error */
+ SDMMC_USER_CANCEL, /**< Canceled by user */
+ SDMMC_NOT_SUPPORTED /**< Command(Operation) not supported */
+} eSDMMC_RC;
+
+/** No error */
+#define SDMMC_SUCCESS SDMMC_OK
+/** The driver is locked. */
+#define SDMMC_ERROR_LOCKED SDMMC_LOCKED
+/** There was an error with the SD driver. */
+#define SDMMC_ERROR SDMMC_ERR
+/** The SD card did not answer the command. */
+#define SDMMC_ERROR_NORESPONSE SDMMC_NO_RESPONSE
+/** The SD card is not initialized. */
+#define SDMMC_ERROR_NOT_INITIALIZED SDMMC_NOT_INITIALIZED
+/** The SD card is busy. */
+#define SDMMC_ERROR_BUSY SDMMC_BUSY
+/** The input parameter error */
+#define SDMMC_ERROR_PARAM SDMMC_PARAM
+/** Invalid state */
+#define SDMMC_ERROR_STATE SDMMC_STATE
+/** User canceled */
+#define SDMMC_ERROR_USER_CANCEL SDMMC_USER_CANCEL
+/** The operation is not supported. */
+#define SDMMC_ERROR_NOT_SUPPORT SDMMC_NOT_SUPPORTED
+/** @}*/
+
+/**
+ * \addtogroup sdmmc_states SD/MMC Card States
+ * @{
+ */
+#define SDMMC_STATE_OFF 0x0 /**< Power OFF */
+#define SDMMC_STATE_ON 0x1 /**< Power ON */
+#define SDMMC_STATE_IDENT 0x2 /**< Card Identification (IDLE,READY,IDENT) */
+#define SDMMC_STATE_INACTIVE 0x3 /**< Inactive */
+#define SDMMC_STATE_IRQ 0x4 /**< Wait-IRQ, interrupt mode */
+#define SDMMC_STATE_STBY 0x5 /**< Addressed */
+#define SDMMC_STATE_TRAN 0x6 /**< Ready for transfer */
+#define SDMMC_STATE_DATA_WR 0x7 /**< Data TX in progress */
+#define SDMMC_STATE_DATA_RD 0x8 /**< Data RX in progress */
+/** @}*/
+
+/** \ingroup sdmmc_hal_def
+ * \addtogroup sdmmc_ioctrls SD/MMC IO Control Codes
+ * Here lists the control codes for SD/MMC low level driver to support lib.
+ * - \ref SDMMC_IOCTL_POWER: Power ON/OFF control.
+ * - \ref SDMMC_IOCTL_SET_CLOCK: Set clock and return actual clock.
+ * - \ref SDMMC_IOCTL_GET_BUSMODE: Return max supported bus mode.
+ * - \ref SDMMC_IOCTL_GET_HSMODE: Return if HS mode is supported.
+ * - \ref SDMMC_IOCTL_GET_BOOTMODE: Return if Boot mode is supported.
+ * @{*/
+/** SD/MMC Low Level IO Control: Check busy.
+ Must implement for low level driver busy check.
+ IOCtrl(pSd, SDMMC_IOCTL_BUSY_CHECK, (uint32_t)pBusyFlag) */
+#define SDMMC_IOCTL_BUSY_CHECK 0x0
+/** SD/MMC Low Level IO Control: Power control.
+ Recomended for SD/MMC/SDIO power control.
+ IOCtrl(pSd, SDMMC_IOCTL_POWER, (uint32_t)ON/OFF) */
+#define SDMMC_IOCTL_POWER 0x1
+/** SD/MMC Low Level IO Control: Cancel command.
+ IOCtrl(pSd, SDMMC_IOCTL_CANCEL_CMD, NULL) */
+#define SDMMC_IOCTL_CANCEL_CMD 0x2
+/** SD/MMC Low Level IO Control: Reset & disable HW.
+ IOCtrl(pSd, SDMMC_IOCTL_RESET, NULL) */
+#define SDMMC_IOCTL_RESET 0x3
+/** SD/MMC Low Level IO Control: Set clock frequency, return applied frequency
+ Recomended for clock selection
+ IOCtrl(pSd, SDMMC_IOCTL_SET_CLOCK, (uint32_t*)pIoFreq) */
+#define SDMMC_IOCTL_SET_CLOCK 0x11
+/** SD/MMC Low Level IO Control: Set bus mode, return applied mode
+ Recomended for bus mode selection
+ IOCtrl(pSd, SDMMC_IOCTL_SET_BUSMODE, (uint32_t*)pIoBusMode) */
+#define SDMMC_IOCTL_SET_BUSMODE 0x12
+/** SD/MMC Low Level IO Control: Set HS mode, return applied mode
+ Recommended for HS mode enable
+ IOCtrl(pSd, SDMMC_IOCTL_SET_BUSMODE, (uint32_t*)pIoHsMode) */
+#define SDMMC_IOCTL_SET_HSMODE 0x13
+/** SD/MMC Low Level IO Control: Set Boot mode */
+#define SDMMC_IOCTL_SET_BOOTMODE 0x14
+/** SD/MMC Low Level IO Control: Get clock frequency */
+#define SDMMC_IOCTL_GET_CLOCK 0x21
+/** SD/MMC Low Level IO Control: Bus mode */
+#define SDMMC_IOCTL_GET_BUSMODE 0x22
+/** SD/MMC Low Level IO Control: High-speed mode */
+#define SDMMC_IOCTL_GET_HSMODE 0x23
+/** SD/MMC Low Level IO Control: Boot mode */
+#define SDMMC_IOCTL_GET_BOOTMODE 0x24
+/** @}*/
+
+/** \ingroup sdmmc_hal_def
+ * \addtogroup sdmmc_cmd_op SD/MMC Command Operations
+ * @{
+ */
+#define SDMMC_CMD_bmPOWERON (0x1 ) /**< Do Power ON sequence */
+#define SDMMC_CMD_bmCOMMAND (0x1 << 1) /**< Send command */
+#define SDMMC_CMD_bmDATAMASK (0x3 << 2) /**< Data operation mask */
+#define SDMMC_CMD_bmNODATA (0x0 << 2) /**< No data transfer */
+#define SDMMC_CMD_RX 0x1 /**< data RX */
+#define SDMMC_CMD_bmDATARX (0x1 << 2) /**< Bits for data RX */
+#define SDMMC_CMD_TX 0x2 /**< data TX */
+#define SDMMC_CMD_bmDATATX (0x2 << 2) /**< Bits for data TX */
+#define SDMMC_CMD_STOPXFR 0x3 /**< data stop */
+#define SDMMC_CMD_bmSTOPXFR (0x3 << 2) /**< Bits for transfer stop */
+#define SDMMC_CMD_bmRESPMASK (0x7 << 4) /**< Bits masks response option */
+#define SDMMC_CMD_bmRESP(R) (((R)&0x7) << 4) /**< Bits setup response */
+
+#define SDMMC_CMD_bmCRC (0x1 << 7) /**< CRC is enabled (SPI only) */
+#define SDMMC_CMD_bmOD (0x1 << 8) /**< Open-Drain is enabled (MMC) */
+#define SDMMC_CMD_bmIO (0x1 << 9) /**< IO function */
+#define SDMMC_CMD_bmBUSY (0x1 << 10) /**< Do busy check */
+/** Cmd: Do power on initialize */
+#define SDMMC_CMD_POWERONINIT (SDMMC_CMD_bmPOWERON)
+/** Cmd: Data only, read */
+#define SDMMC_CMD_DATARX (SDMMC_CMD_bmDATARX)
+/** Cmd: Data only, write */
+#define SDMMC_CMD_DATATX (SDMMC_CMD_bmDATATX)
+/** Cmd: Command without data */
+#define SDMMC_CMD_CNODATA(R) ( SDMMC_CMD_bmCOMMAND \
+ | SDMMC_CMD_bmRESP(R) )
+/** Cmd: Command with data, read */
+#define SDMMC_CMD_CDATARX(R) ( SDMMC_CMD_bmCOMMAND \
+ | SDMMC_CMD_bmDATARX \
+ | SDMMC_CMD_bmRESP(R) )
+/** Cmd: Command with data, write */
+#define SDMMC_CMD_CDATATX(R) ( SDMMC_CMD_bmCOMMAND \
+ | SDMMC_CMD_bmDATATX \
+ | SDMMC_CMD_bmRESP(R) )
+/** Cmd: Send Stop command */
+#define SDMMC_CMD_CSTOP ( SDMMC_CMD_bmCOMMAND \
+ | SDMMC_CMD_bmSTOPXFR \
+ | SDMMC_CMD_bmRESP(1) )
+/** Cmd: Send Stop token for SPI */
+#define SDMMC_CMD_STOPTOKEN (SDMMC_CMD_bmSTOPXFR)
+/** @}*/
+
+/** Default block size for SD/MMC access */
+#define SDMMC_BLOCK_SIZE 512
+
+/** @}*/
+/*------------------------------------------------------------------------------
+ * Types
+ *----------------------------------------------------------------------------*/
+/** \addtogroup sdmmc_cmd_types SD/MMC General Types
+ @{*/
+
+/** SD/MMC end-of-command callback function. */
+typedef void (*fSdmmcCallback)(uint32_t status, void *pArg);
+
+/**
+ * Sdmmc command operation settings union.
+ */
+typedef union _SdmmcCmdOperation {
+ uint16_t wVal;
+ struct _SdmmcOpBm {
+ uint16_t powerON:1, /**< Do power on initialize */
+ sendCmd:1, /**< Send SD/MMC command */
+ xfrData:2, /**< Send/Stop data transfer */
+ respType:3,/**< Response type (1~7) */
+ crcON:1, /**< CRC is used (SPI) */
+ odON:1, /**< Open-Drain is ON (MMC) */
+ ioCmd:1, /**< SDIO command */
+ checkBsy:1;/**< Busy check is ON */
+ } bmBits;
+} uSdmmcCmdOp;
+
+/**
+ * Sdmmc command instance.
+ */
+typedef struct _SdmmcCommand {
+
+ /** Optional user-provided callback function. */
+ fSdmmcCallback fCallback;
+ /** Optional argument to the callback function. */
+ void *pArg;
+
+ /** Data buffer, with MCI_DMA_ENABLE defined 1, the buffer can be
+ * 1, 2 or 4 bytes aligned. It has to be 4 byte aligned if no DMA.
+ */
+ uint8_t *pData;
+ /** Size of data block in bytes. */
+ uint16_t wBlockSize;
+ /** Number of blocks to be transfered */
+ uint16_t wNbBlocks;
+ /** Response buffer. */
+ uint32_t *pResp;
+
+ /** Command argument. */
+ uint32_t dwArg;
+ /** Command operation settings */
+ uSdmmcCmdOp cmdOp;
+ /** Command index */
+ uint8_t bCmd;
+ /** Command return status */
+ uint8_t bStatus;
+} sSdmmcCommand;
+
+/**
+ * \ingroup sdmmc_hal_def
+ * SD/MMC Lock device function type */
+typedef uint32_t (*fSdmmcLock)(void* pDrv, uint8_t bSlot);
+/**
+ * \ingroup sdmmc_hal_def
+ * SD/MMC Release device function type */
+typedef uint32_t (*fSdmmcRelease)(void* pDrv);
+/**
+ * \ingroup sdmmc_hal_def
+ * SD/MMC Send Command function type */
+typedef uint32_t (*fSdmmcSendCommand)(void* pDrv, sSdmmcCommand *pCmd);
+/**
+ * \ingroup sdmmc_hal_def
+ * SD/MMC IO Control function type */
+typedef uint32_t (*fSdmmcIOCtrl)(void* pDrv, uint32_t dwCtrl, uint32_t param);
+
+/**
+ * \ingroup sdmmc_hal_def
+ * \brief SD/MMC card HAL functions.
+ */
+typedef struct _SdHalFunctions {
+
+ fSdmmcLock fLock; /**< Pointer to lock funtion */
+ fSdmmcRelease fRelease; /**< Pointer to release function */
+ fSdmmcSendCommand fCommand; /**< Pointer to command function */
+ fSdmmcIOCtrl fIOCtrl; /**< Pointer to IO control function */
+} sSdHalFunctions;
+
+/**
+ * \brief SD/MMC card driver structure.
+ * It holds the current command being processed and the SD/MMC card address.
+ */
+typedef struct _SdCard
+{
+ void *pDrv; /**< Pointer to unnderlying driver */
+ sSdHalFunctions *pHalf; /**< Pointer to underlying functions */
+ void *pExt; /**< Pointer to extension data for SD/MMC/SDIO */
+
+ sSdmmcCommand sdCmd; /**< Command instance for underlying driver */
+
+ uint32_t CID[128/8/4]; /**< Card Identification (CID register) */
+ uint32_t CSD[128/8/4]; /**< Card-specific data (CSD register) */
+ uint32_t EXT[512/4]; /**< Extended information */
+
+ uint32_t dwTranSpeed; /**< Max supported transfer speed */
+ uint32_t dwTotalSize; /**< Card total size
+ (0xffffffff to see number of blocks */
+ uint32_t dwNbBlocks; /**< Card total number of blocks */
+ uint16_t wBlockSize; /**< Card block size reported */
+
+ uint16_t wCurrBlockLen; /**< Block length used */
+ uint32_t dwCurrSpeed; /**< Transfer speed used */
+ uint32_t dwPrevBlk; /**< Previous accessed block for memory */
+ uint16_t wAddress; /**< Current card address */
+ uint8_t bCardType; /**< SD/MMC/SDIO card type \sa sdmmc_cardtype */
+ uint8_t bBusMode; /**< 1/4/8 bit bus mode */
+ uint8_t bSlot; /**< Card access slot */
+ uint8_t bState; /**< Card state */
+ uint8_t bStatus; /**< Card status */
+ uint8_t reserve;
+} sSdCard;
+
+
+/** \addtogroup sdmmc_struct_cmdarg SD/MMC command arguments
+ * Here lists the command arguments for SD/MMC.
+ * - CMD6 Argument
+ * - \ref _MmcCmd6Arg "MMC CMD6"
+ * - \ref _SdCmd6Arg "SD CMD6"
+ * - \ref _SdioCmd52Arg CMD52
+ * - \ref _SdioCmd53Arg CMD53
+ * @{*/
+/**
+ * \typedef MmcCmd6Arg
+ * Argument for MMC CMD6
+ */
+typedef struct _MmcCmd6Arg
+{
+ uint8_t access;
+ uint8_t index;
+ uint8_t value;
+ uint8_t cmdSet;
+} MmcCmd6Arg, MmcSwitchArg;
+
+/**
+ * \typedef SdCmd6Arg
+ * Argument for SD CMD6
+ */
+typedef struct _SdCmd6Arg
+{
+ uint32_t accessMode:4, /**< [ 3: 0] function group 1, access mode */
+ command:4, /**< [ 7: 4] function group 2, command system */
+ reserveFG3:4, /**< [11: 8] function group 3, 0xF or 0x0 */
+ reserveFG4:4, /**< [15:12] function group 4, 0xF or 0x0 */
+ reserveFG5:4, /**< [19:16] function group 5, 0xF or 0x0 */
+ reserveFG6:4, /**< [23:20] function group 6, 0xF or 0x0 */
+ reserved:7, /**< [30:24] reserved 0 */
+ mode:1; /**< [31 ] Mode, 0: Check, 1: Switch */
+} SdCmd6Arg, SdSwitchArg;
+
+/**
+ * \typedef SdioCmd52Arg
+ * Argument for SDIO CMD52
+ */
+typedef struct _SdioCmd52Arg
+{
+ uint32_t data:8, /**< [ 7: 0] data for writing */
+ stuff0:1, /**< [ 8] reserved */
+ regAddress:17, /**< [25: 9] register address */
+ stuff1:1, /**< [ 26] reserved */
+ rawFlag:1, /**< [ 27] Read after Write flag */
+ functionNum:3, /**< [30:28] Number of the function */
+ rwFlag:1; /**< [ 31] Direction, 1:write, 0:read. */
+} SdioCmd52Arg, SdioRwDirectArg;
+/**
+ * \typedef SdioCmd53Arg
+ * Argument for SDIO CMD53
+ */
+typedef struct _SdioCmd53Arg {
+ uint32_t count:9, /**< [ 8: 0] Byte mode: number of bytes to transfer,
+ 0 cause 512 bytes transfer.
+ Block mode: number of blocks to transfer,
+ 0 set count to infinite. */
+ regAddress:17, /**< [25: 9] Start Address I/O register */
+ opCode:1, /**< [ 26] 1:Incrementing address, 0: fixed */
+ blockMode:1, /**< [ 27] (Optional) 1:block mode */
+ functionNum:3, /**< [30:28] Number of the function */
+ rwFlag:1; /**< [ 31] Direction, 1:WR, 0:RD */
+} SdioCmd53Arg, SdioRwExtArg;
+/** @}*/
+
+
+/** \addtogroup sdmmc_resp_struct SD/MMC Responses Structs
+ * Here lists the command responses for SD/MMC.
+ * - \ref _SdmmcR1 "R1"
+ * - \ref _SdmmcR3 "R3"
+ * - \ref _MmcR4 "MMC R4", \ref _SdioR4 "SDIO R4"
+ * - \ref _SdmmcR5 "R5"
+ * - \ref _SdR6 "R6"
+ * - \ref _SdR7 "R7"
+ * @{*/
+/**
+ * Response R1 (normal response command)
+ */
+typedef struct _SdmmcR1
+{
+ uint32_t cardStatus; /**< [32: 0] Response card status flags */
+} SdmmcR1, SdmmcR1b;
+
+/**
+ * Response R3 (OCR)
+ */
+typedef struct _SdmmcR3
+{
+ uint32_t OCR; /**< [32: 0] OCR register */
+} SdmmcR3;
+
+/**
+ * Response R4 (MMC Fast I/O CMD39)
+ */
+typedef struct _MmcR4
+{
+ uint32_t regData:8, /**< [ 7: 0] Read register contents */
+ regAddr:7, /**< [14: 8] Register address */
+ status:1, /**< [ 15] Status */
+ RCA:16; /**< [31:16] RCA */
+} MmcR4;
+
+/**
+ * Response R4 (SDIO), no CRC.
+ */
+typedef struct _SdioR4
+{
+ uint32_t OCR:24, /**< [23: 0] Operation Conditions Register */
+ reserved:3, /**< [26:24] Reserved */
+ memoryPresent:1, /**< [ 27] MP Set to 1 if contains
+ SD memory */
+ nbIoFunction:3, /**< [30:28] NF Total number of I/O functions
+ supported */
+ C:1; /**< [ 31] IORDY Set to 1 if card is ready */
+} SdioR4;
+
+/**
+ * Response R5 (MMC Interrupt request CMD40 / SDIO CMD52)
+ */
+typedef struct _SdmmcR5
+{
+ uint32_t data:8, /**< [ 7: 0] Response data */
+ response:8, /**< [15: 8] Response status flags */
+ RCA:16; /**< [31:16] (MMC) Winning card RCA */
+} SdmmcR5;
+
+/**
+ * Response R6 (SD RCA)
+ */
+typedef struct _SdR6
+{
+ uint32_t status:16, /**< [15: 0] Response status */
+ RCA:16; /**< [31:16] New published RCA */
+} SdR6;
+/**
+ * Response R7 (Card interface condition)
+ */
+typedef struct _SdR7 {
+ uint32_t checkPatten:8, /**< [ 7: 0] Echo-back of check pattern */
+ voltage:4, /**< [11: 8] Voltage accepted */
+ reserved:20; /**< [31:12] reserved bits */
+} SdR7;
+
+/** @}*/
+
+/** @}*/
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**@}*/
+#endif /* #define _SDMMC_CMD_H */
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/sdmmc_dbg.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/sdmmc_dbg.h
new file mode 100644
index 0000000..a110356
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/sdmmc_dbg.h
@@ -0,0 +1,78 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/** \file */
+
+ #ifndef _SDMMC_HAL_H
+ #define _SDMMC_HAL_H
+
+/*------------------------------------------------------------------------------
+ * Includes
+ *----------------------------------------------------------------------------*/
+
+#include <stdint.h>
+#include "sdmmc_cmd.h"
+
+/*------------------------------------------------------------------------------
+ * Definitions
+ *----------------------------------------------------------------------------*/
+
+/* Define WEAK attribute */
+#ifndef WEAK
+#if defined ( __CC_ARM )
+ #define WEAK __attribute__ ((weak))
+#elif defined ( __ICCARM__ )
+ #define WEAK __weak
+#elif defined ( __GNUC__ )
+ #define WEAK __attribute__ ((weak))
+#endif
+#endif
+
+/*----------------------------------------------------------------------------
+ * Functions
+ *----------------------------------------------------------------------------*/
+
+/** Initialize the SD/MMC card driver struct */
+extern void SDD_Initialize(sSdCard *pSd,
+ const void* pDrv, uint8_t bSlot,
+ const sSdHalFunctions *pHalFunctions);
+
+/** Initialize the SD/MMC card driver struct for SD/MMC bus mode
+ * \note defined in SD/MMC bus mode low level
+ */
+extern WEAK void SDD_InitializeSdmmcMode(sSdCard *pSd,
+ void* pDrv, uint8_t bSlot);
+
+/** Initialize the SD/MMC card driver struct for SPI bus mode
+ * \note defined in SD/MMC SPI bus mode low level
+ */
+extern WEAK void SDD_InitializeSpiMode(sSdCard *pSd,
+ void* pDrv, uint8_t bSlot);
+
+ #endif /* #define _SDMMC_HAL_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/sdmmc_hal.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/sdmmc_hal.h
new file mode 100644
index 0000000..eb9c715
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/sdmmc_hal.h
@@ -0,0 +1,99 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/** \file */
+
+#ifndef _SDMMC_HAL_H
+#define _SDMMC_HAL_H
+/** \addtogroup libsdmmc_module
+ *@{
+ * \defgroup sdmmc_hal SD/MMC Lib HardwareAccessLayer(HAL) Interface
+ * Defines the HAL interface for lower layer to support SD/MMC library.
+ *
+ * \section Usage
+ * -# Implement HAL functions as and \ref sSdHalFunctions instance.
+ * -# Invoke SDD_Initialize() to initialize \ref sSdCard instance with
+ * implemented HAL functions.
+ * -# The default SD/MMC bus HAL initialize function name is
+ * SDD_InitializeSdmmcMode(), which invokes SDD_Initialize()
+ * -# The default SPI bus HAL initialize function name is
+ * SDD_InitializeSpiMode(), which invokes SDD_Initialize()
+ *
+ * @{
+ * \defgroup sdmmc_hal_def SD/MMC Low Level Definitions
+ * @{
+ * Defines structs, functions and constants for SD/MMC lower layer
+ * implement, to support SD/MMC library.
+ * @}
+ */
+
+/*------------------------------------------------------------------------------
+ * Includes
+ *----------------------------------------------------------------------------*/
+
+#include <stdint.h>
+#include "sdmmc_cmd.h"
+
+/*------------------------------------------------------------------------------
+ * Definitions
+ *----------------------------------------------------------------------------*/
+
+/* Define WEAK attribute */
+#ifndef WEAK
+#if defined ( __CC_ARM )
+ #define WEAK __attribute__ ((weak))
+#elif defined ( __ICCARM__ )
+ #define WEAK __weak
+#elif defined ( __GNUC__ )
+ #define WEAK __attribute__ ((weak))
+#endif
+#endif
+
+/*----------------------------------------------------------------------------
+ * Functions
+ *----------------------------------------------------------------------------*/
+
+extern void SDD_Initialize(sSdCard *pSd,
+ const void* pDrv, uint8_t bSlot,
+ const sSdHalFunctions *pHalFunctions);
+
+/** Initialize the SD/MMC card driver struct for SD/MMC bus mode
+ * \note defined in SD/MMC bus mode low level
+ */
+extern void SDD_InitializeSdmmcMode(sSdCard *pSd,
+ void* pDrv, uint8_t bSlot);
+
+/** Initialize the SD/MMC card driver struct for SPI bus mode
+ * \note defined in SD/MMC SPI bus mode low level
+ */
+extern void SDD_InitializeSpiMode(sSdCard *pSd,
+ void* pDrv, uint8_t bSlot);
+/** @}*/
+/**@}*/
+#endif /* #define _SDMMC_HAL_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/sdmmc_trace.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/sdmmc_trace.h
new file mode 100644
index 0000000..494f31b
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/include/sdmmc_trace.h
@@ -0,0 +1,208 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * \par Purpose
+ *
+ * Standard output methods for reporting debug information, warnings and
+ * errors, which can be easily be turned on/off by external value
+ * \ref dwTraceLevel.
+ *
+ * \par Usage
+ * -# Initialize the debug message port in application, for stdio printf().
+ * -# Uses the TRACE_DEBUG(), TRACE_INFO(), TRACE_WARNING(), TRACE_ERROR()
+ * TRACE_FATAL() macros to output traces throughout the program.
+ * -# Each type of trace has a level : Debug 5, Info 4, Warning 3, Error 2
+ * and Fatal 1. Disable a group of traces by changing the value of
+ * TRACE_LEVEL during compilation; traces with a level bigger than TRACE_LEVEL
+ * are not generated. To generate no trace, use the reserved value 0.
+ * -# Trace disabling can be static or dynamic. If dynamic disabling is selected
+ * the trace level can be modified in runtime. If static disabling is selected
+ * the disabled traces are not compiled.
+ *
+ * \par traceLevels Trace level description
+ * -# TRACE_DEBUG (5): Traces whose only purpose is for debugging the program,
+ * and which do not produce meaningful information otherwise.
+ * -# TRACE_INFO (4): Informational trace about the program execution. Should
+ * enable the user to see the execution flow.
+ * -# TRACE_WARNING (3): Indicates that a minor error has happened. In most case
+ * it can be discarded safely; it may even be expected.
+ * -# TRACE_ERROR (2): Indicates an error which may not stop the program execution,
+ * but which indicates there is a problem with the code.
+ * -# TRACE_FATAL (1): Indicates a major error which prevents the program from going
+ * any further.
+ */
+
+ #ifndef _SDMMC_TRACE_H
+ #define _SDMMC_TRACE_H
+
+/*
+ * Headers
+ */
+
+#include <stdio.h>
+
+/*
+ * Global Definitions
+ */
+
+/** Softpack Version */
+#define USBLIB_VERSION "0.1"
+
+#define TRACE_LEVEL_DEBUG 5
+#define TRACE_LEVEL_INFO 4
+#define TRACE_LEVEL_WARNING 3
+#define TRACE_LEVEL_ERROR 2
+#define TRACE_LEVEL_FATAL 1
+#define TRACE_LEVEL_NO_TRACE 0
+
+/* By default, all traces are output except the debug one. */
+#if !defined(TRACE_LEVEL)
+#define TRACE_LEVEL TRACE_LEVEL_INFO
+#endif
+
+/* By default, trace level is static (not dynamic) */
+#if !defined(DYN_TRACES)
+#define DYN_TRACES 0
+#endif
+
+#if defined(NOTRACE)
+#define TRACE_LEVEL TRACE_LEVEL_NO_TRACE
+#endif
+
+#undef NOTRACE
+#if (DYN_TRACES==0)
+ #if (TRACE_LEVEL == TRACE_LEVEL_NO_TRACE)
+ #define NOTRACE
+ #endif
+#endif
+
+
+
+/*
+ * Global Macros
+ */
+
+#ifndef DYNTRACE
+#define DYNTRACE 0
+#endif
+
+
+/**
+ * Outputs a formatted string using 'printf' if the log level is high
+ * enough. Can be disabled by defining TRACE_LEVEL=0 during compilation.
+ * \param ... Additional parameters depending on formatted string.
+ */
+#if defined(NOTRACE)
+
+/* Empty macro */
+#define TRACE_DEBUG(...) { }
+#define TRACE_INFO(...) { }
+#define TRACE_WARNING(...) { }
+#define TRACE_ERROR(...) { }
+#define TRACE_FATAL(...) { while(1); }
+
+#define TRACE_DEBUG_WP(...) { }
+#define TRACE_INFO_WP(...) { }
+#define TRACE_WARNING_WP(...) { }
+#define TRACE_ERROR_WP(...) { }
+#define TRACE_FATAL_WP(...) { while(1); }
+
+#elif (DYN_TRACES == 1)
+
+/* Trace output depends on dwTraceLevel value */
+#define TRACE_DEBUG(...) { if (dwTraceLevel >= TRACE_LEVEL_DEBUG) { printf("-D- " __VA_ARGS__); } }
+#define TRACE_INFO(...) { if (dwTraceLevel >= TRACE_LEVEL_INFO) { printf("-I- " __VA_ARGS__); } }
+#define TRACE_WARNING(...) { if (dwTraceLevel >= TRACE_LEVEL_WARNING) { printf("-W- " __VA_ARGS__); } }
+#define TRACE_ERROR(...) { if (dwTraceLevel >= TRACE_LEVEL_ERROR) { printf("-E- " __VA_ARGS__); } }
+#define TRACE_FATAL(...) { if (dwTraceLevel >= TRACE_LEVEL_FATAL) { printf("-F- " __VA_ARGS__); while(1); } }
+
+#define TRACE_DEBUG_WP(...) { if (dwTraceLevel >= TRACE_LEVEL_DEBUG) { printf(__VA_ARGS__); } }
+#define TRACE_INFO_WP(...) { if (dwTraceLevel >= TRACE_LEVEL_INFO) { printf(__VA_ARGS__); } }
+#define TRACE_WARNING_WP(...) { if (dwTraceLevel >= TRACE_LEVEL_WARNING) { printf(__VA_ARGS__); } }
+#define TRACE_ERROR_WP(...) { if (dwTraceLevel >= TRACE_LEVEL_ERROR) { printf(__VA_ARGS__); } }
+#define TRACE_FATAL_WP(...) { if (dwTraceLevel >= TRACE_LEVEL_FATAL) { printf(__VA_ARGS__); while(1); } }
+
+#else
+
+/* Trace compilation depends on TRACE_LEVEL value */
+#if (TRACE_LEVEL >= TRACE_LEVEL_DEBUG)
+#define TRACE_DEBUG(...) { printf("-D- " __VA_ARGS__); }
+#define TRACE_DEBUG_WP(...) { printf(__VA_ARGS__); }
+#else
+#define TRACE_DEBUG(...) { }
+#define TRACE_DEBUG_WP(...) { }
+#endif
+
+#if (TRACE_LEVEL >= TRACE_LEVEL_INFO)
+#define TRACE_INFO(...) { printf("-I- " __VA_ARGS__); }
+#define TRACE_INFO_WP(...) { printf(__VA_ARGS__); }
+#else
+#define TRACE_INFO(...) { }
+#define TRACE_INFO_WP(...) { }
+#endif
+
+#if (TRACE_LEVEL >= TRACE_LEVEL_WARNING)
+#define TRACE_WARNING(...) { printf("-W- " __VA_ARGS__); }
+#define TRACE_WARNING_WP(...) { printf(__VA_ARGS__); }
+#else
+#define TRACE_WARNING(...) { }
+#define TRACE_WARNING_WP(...) { }
+#endif
+
+#if (TRACE_LEVEL >= TRACE_LEVEL_ERROR)
+#define TRACE_ERROR(...) { printf("-E- " __VA_ARGS__); }
+#define TRACE_ERROR_WP(...) { printf(__VA_ARGS__); }
+#else
+#define TRACE_ERROR(...) { }
+#define TRACE_ERROR_WP(...) { }
+#endif
+
+#if (TRACE_LEVEL >= TRACE_LEVEL_FATAL)
+#define TRACE_FATAL(...) { printf("-F- " __VA_ARGS__); while(1); }
+#define TRACE_FATAL_WP(...) { printf(__VA_ARGS__); while(1); }
+#else
+#define TRACE_FATAL(...) { while(1); }
+#define TRACE_FATAL_WP(...) { while(1); }
+#endif
+
+#endif
+
+
+/**
+ * Exported variables
+ */
+/** Depending on DYN_TRACES, dwTraceLevel is a modifable runtime variable or a define */
+#if !defined(NOTRACE) && (DYN_TRACES == 1)
+ extern uint32_t dwTraceLevel ;
+#endif
+
+#endif /* #define _SDMMC_TRACE_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/memories.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/memories.h
new file mode 100644
index 0000000..74bfd77
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/memories.h
@@ -0,0 +1,76 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file memories.h
+ *
+ * Definition of SAM3X-EK memories library
+ *
+ */
+
+#ifndef _MEMORIES_
+#define _MEMORIES_
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+#include "board.h"
+
+//#include "include/at26.h"
+//#include "include/at26d.h"
+#include "include/EccNandFlash.h"
+#include "include/ManagedNandFlash.h"
+#include "include/MappedNandFlash.h"
+#include "include/MEDDdram.h"
+#include "include/MEDFlash.h"
+#include "include/Media.h"
+#include "include/MEDNandFlash.h"
+#include "include/MEDRamDisk.h"
+#include "include/MEDSdcard.h"
+#include "include/MEDSdram.h"
+#include "include/NandCommon.h"
+#include "include/NandFlashModel.h"
+#include "include/NandFlashDma.h"
+#include "include/NandFlashModelList.h"
+#include "include/NandSpareScheme.h"
+#include "include/NorFlashAmd.h"
+#include "include/NorFlashApi.h"
+#include "include/NorFlashCFI.h"
+#include "include/NorFlashCommon.h"
+#include "include/NorFlashIntel.h"
+#include "include/sdio.h"
+#include "include/sdmmc.h"
+#include "include/sdmmc_cmd.h"
+#include "include/sdmmc_hal.h"
+#include "include/sdmmc_trace.h"
+#include "include/mcid.h"
+#include "include/SkipBlockNandFlash.h"
+#include "include/TranslatedNandFlash.h"
+
+#endif /* #ifndef _MEMORIES_ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/EccNandFlash.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/EccNandFlash.c
new file mode 100644
index 0000000..c9433ac
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/EccNandFlash.c
@@ -0,0 +1,298 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * EccNandFlash layer is called by SkipBlockNandFlash driver, it will call the bl driver (RawNandFlash)
+ * to do write/read operations, and do ECC check to the write/read result, it then will feedback the
+ * ecc check result to the upper SkipBlockNandFlash layer driver.
+ *
+ * -# EccNandFlash_Initialize is used to initializes an EccNandFlash instance.
+ * -# EccNandFlash_WritePage is used to write a Nandflash page with ecc result, the function
+ * will calculate ecc for the data that is going to be written, and write data and spare(with
+ * calculated ecc) to Nandflash device.
+ * -# EccNandFlash_ReadPage is uese to read a Nandflash page with ecc check, the function
+ * will read out data and spare first, then it calculates ecc with data and then compare with
+ * the readout ecc, and feedback the ecc check result to dl driver.
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include <stdint.h>
+#include "memories.h"
+
+#include <string.h>
+#include <assert.h>
+
+/*----------------------------------------------------------------------------
+ * Internal definitions
+ *----------------------------------------------------------------------------*/
+
+/** Casts */
+#define MODEL(ecc) ((struct NandFlashModel *) ecc)
+#define RAW(ecc) ((struct RawNandFlash *) ecc)
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+/**
+ * \brief Initializes an EccNandFlash instance.
+ *
+ * \param ecc Pointer to an EccNandFlash instance.
+ * \param model Pointer to the underlying nand chip model. Can be 0.
+ * \param commandAddress Address at which commands are sent.
+ * \param addressAddress Address at which addresses are sent.
+ * \param dataAddress Address at which data is sent.
+ * \param pinChipEnable Pin controlling the CE signal of the NandFlash.
+ * \param pinReadyBusy Pin used to monitor the ready/busy signal of the Nand.
+ * \return 0 if the initialization is done; or returns a error code.
+ */
+unsigned char EccNandFlash_Initialize(
+ struct EccNandFlash *ecc,
+ const struct NandFlashModel *model,
+ unsigned int commandAddress,
+ unsigned int addressAddress,
+ unsigned int dataAddress,
+ const Pin pinChipEnable,
+ const Pin pinReadyBusy)
+{
+ unsigned char rc;
+ rc = RawNandFlash_Initialize(RAW(ecc),
+ model,
+ commandAddress,
+ addressAddress,
+ dataAddress,
+ pinChipEnable,
+ pinReadyBusy);
+#if defined(HARDWARE_ECC)
+ {
+ unsigned int ecc_page;
+ switch(NandFlashModel_GetPageDataSize(MODEL(ecc))) {
+ case 512: ecc_page = SMC_CFG_PAGESIZE_PS512_16; break;
+ case 1024: ecc_page = SMC_CFG_PAGESIZE_PS1024_32; break;
+ case 2048: ecc_page = SMC_CFG_PAGESIZE_PS2048_64; break;
+ case 4096: ecc_page = SMC_CFG_PAGESIZE_PS4096_128; break;
+ default:
+ TRACE_ERROR("PageSize %d not compatible with ECC\n\r",
+ NandFlashModel_GetPageDataSize(MODEL(ecc)));
+ return NandCommon_ERROR_ECC_NOT_COMPATIBLE;
+ }
+ SMC_ECC_Configure(SMC, SMC_ECC_MD_TYPCORREC_C256B,
+ ecc_page);
+ }
+#endif
+ return rc;
+}
+
+/**
+ * \brief Reads the data and/or spare of a page of a nandflash chip, and verify that
+ * the data is valid using the ECC information contained in the spare. If one
+ * buffer pointer is 0, the corresponding area is not saved.
+ * \param ecc Pointer to an EccNandFlash instance.
+ * \param block Number of block to read from.
+ * \param page Number of page to read inside given block.
+ * \param data Data area buffer.
+ * \param spare Spare area buffer.
+ * \return 0 if the data has been read and is valid; otherwise returns either
+ * NandCommon_ERROR_CORRUPTEDDATA or ...
+ */
+unsigned char EccNandFlash_ReadPage(
+ const struct EccNandFlash *ecc,
+ unsigned short block,
+ unsigned short page,
+ void *data,
+ void *spare)
+{
+ unsigned char tmpSpare[NandCommon_MAXPAGESPARESIZE];
+ unsigned char error;
+#ifndef HARDWARE_ECC
+ unsigned char tmpData[NandCommon_MAXPAGEDATASIZE];
+ unsigned char hamming[NandCommon_MAXSPAREECCBYTES];
+#else
+ unsigned char hsiaoInSpare[NandCommon_MAXSPAREECCBYTES];
+ unsigned char hsiao[NandCommon_MAXSPAREECCBYTES];
+#endif
+
+ unsigned short pageDataSize = NandFlashModel_GetPageDataSize(MODEL(ecc));
+ unsigned char pageSpareSize = NandFlashModel_GetPageSpareSize(MODEL(ecc));
+
+ TRACE_DEBUG("EccNandFlash_ReadPage(B#%d:P#%d)\n\r", block, page);
+#ifndef HARDWARE_ECC
+ /* Start by reading the spare and the data */
+ error = RawNandFlash_ReadPage(RAW(ecc), block, page, tmpData, tmpSpare);
+ if (error) {
+
+ TRACE_ERROR("EccNandFlash_ReadPage: Failed to read page\n\r");
+ return error;
+ }
+
+ /* Retrieve ECC information from page and verify the data */
+ NandSpareScheme_ReadEcc(NandFlashModel_GetScheme(MODEL(ecc)), tmpSpare, hamming);
+ error = Hamming_Verify256x(tmpData, pageDataSize, hamming);
+#else
+ /* Start by reading the spare area */
+ /* Note: Can't read data and spare at the same time, otherwise, the ECC parity generation will be incorrect. */
+ error = RawNandFlash_ReadPage(RAW(ecc), block, page, 0, tmpSpare);
+ if (error) {
+
+ TRACE_ERROR("EccNandFlash_ReadPage: $page %d.%d\n\r",
+ block, page);
+ return error;
+ }
+ /* Retrieve ECC information from page and verify the data */
+ NandSpareScheme_ReadEcc(NandFlashModel_GetScheme(MODEL(ecc)), tmpSpare, hsiaoInSpare);
+
+ /* Reading the main data area */
+ error = RawNandFlash_ReadPage(RAW(ecc), block, page, (unsigned char*)data, 0);
+ if (error) {
+
+ TRACE_ERROR("EccNandFlash_ReadPage: $page %d.%d\n\r",
+ block, page);
+ return error;
+ }
+ SMC_ECC_GetEccParity(pageDataSize, hsiao, NandFlashModel_GetDataBusWidth(MODEL(ecc)));
+ /* Verify the data */
+ error = SMC_ECC_VerifyHsiao((unsigned char*) data,
+ pageDataSize,
+ hsiaoInSpare,
+ hsiao,
+ NandFlashModel_GetDataBusWidth(MODEL(ecc)));
+#endif
+ if (error && (error != Hamming_ERROR_SINGLEBIT)) {
+
+ TRACE_ERROR("EccNandFlash_ReadPage: at B%d.P%d Unrecoverable data\n\r",
+ block, page);
+ return NandCommon_ERROR_CORRUPTEDDATA;
+ }
+#ifndef HARDWARE_ECC
+ /* Copy data and/or spare into final buffers */
+ if (data) {
+
+ memcpy(data, tmpData, pageDataSize);
+ }
+ if (spare) {
+
+ memcpy(spare, tmpSpare, pageSpareSize);
+ }
+#else
+ if (spare) {
+
+ memcpy(spare, tmpSpare, pageSpareSize);
+ }
+#endif
+ return 0;
+}
+
+/**
+ * \brief Writes the data and/or spare area of a nandflash page, after calculating an
+ * ECC for the data area and storing it in the spare. If no data buffer is
+ * provided, the ECC is read from the existing page spare. If no spare buffer
+ * is provided, the spare area is still written with the ECC information
+ * calculated on the data buffer.
+ * \param ecc Pointer to an EccNandFlash instance.
+ * \param block Number of block to read from.
+ * \param page Number of page to read inside given block.
+ * \param data Data area buffer.
+ * \param spare Spare area buffer.
+ * \return 0 if successful; otherwise returns an error code.
+ */
+unsigned char EccNandFlash_WritePage(
+ const struct EccNandFlash *ecc,
+ unsigned short block,
+ unsigned short page,
+ void *data,
+ void *spare)
+{
+ unsigned char error;
+ unsigned char tmpSpare[NandCommon_MAXPAGESPARESIZE];
+ unsigned short pageDataSize = NandFlashModel_GetPageDataSize(MODEL(ecc));
+ unsigned short pageSpareSize = NandFlashModel_GetPageSpareSize(MODEL(ecc));
+#ifndef HARDWARE_ECC
+ unsigned char hamming[NandCommon_MAXSPAREECCBYTES];
+#else
+ unsigned char hsiao[NandCommon_MAXSPAREECCBYTES];
+#endif
+
+ assert( (data != NULL) || (spare != NULL) ) ;
+// TRACE_DEBUG( "EccNandFlash_WritePage: At least one area must be written\n\r" ) ;
+ TRACE_DEBUG("EccNandFlash_WritePage(B#%d:P#%d)\n\r", block, page);
+#ifndef HARDWARE_ECC
+ /* Compute ECC on the new data, if provided */
+ /* If not provided, hamming code set to 0xFFFF.. to keep existing bytes */
+ memset(hamming, 0xFF, NandCommon_MAXSPAREECCBYTES);
+ if (data) {
+
+ /* Compute hamming code on data */
+ Hamming_Compute256x(data, pageDataSize, hamming);
+ }
+
+ /* Store code in spare buffer (if no buffer provided, use a temp. one) */
+ if (!spare) {
+
+ spare = tmpSpare;
+ memset(spare, 0xFF, pageSpareSize);
+ }
+ NandSpareScheme_WriteEcc(NandFlashModel_GetScheme(MODEL(ecc)), spare, hamming);
+
+ /* Perform write operation */
+ error = RawNandFlash_WritePage(RAW(ecc), block, page, data, spare);
+ if (error) {
+
+ TRACE_ERROR("EccNandFlash_WritePage: Failed to write page\n\r");
+ return error;
+ }
+
+#else
+ /* Store code in spare buffer (if no buffer provided, use a temp. one) */
+ if (!spare) {
+ spare = tmpSpare;
+ memset(spare, 0xFF, pageSpareSize);
+ }
+ /* Perform write operation */
+ error = RawNandFlash_WritePage(RAW(ecc), block, page, data, spare);
+ if (error) {
+
+ TRACE_ERROR("EccNandFlash_WritePage: Failed to write page\n\r");
+ return error;
+ }
+ SMC_ECC_GetEccParity(pageDataSize, hsiao, NandFlashModel_GetDataBusWidth(MODEL(ecc)));
+ /* Perform write operation */
+ NandSpareScheme_WriteEcc(NandFlashModel_GetScheme(MODEL(ecc)), spare, hsiao);
+ error = RawNandFlash_WritePage(RAW(ecc), block, page, 0, spare);
+ if (error) {
+ TRACE_ERROR("EccNandFlash_WritePage: Failed to write page\n\r");
+ return error;
+ }
+#endif
+ return 0;
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/ManagedNandFlash.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/ManagedNandFlash.c
new file mode 100644
index 0000000..fd28fd3
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/ManagedNandFlash.c
@@ -0,0 +1,887 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * The lower layer of nandflash block management, it is called by MappedNandFlash layer, and
+ * it will call EccNandFlash layer.
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+#include "memories.h"
+
+#include <string.h>
+#include <assert.h>
+
+/*----------------------------------------------------------------------------
+ * Local definitions
+ *----------------------------------------------------------------------------*/
+
+/** Casts */
+#define ECC(managed) ((struct EccNandFlash *) managed)
+#define RAW(managed) ((struct RawNandFlash *) managed)
+#define MODEL(managed) ((struct NandFlashModel *) managed)
+
+/** Values returned by the CheckBlock() function */
+#define BADBLOCK 255
+#define GOODBLOCK 254
+
+/*----------------------------------------------------------------------------
+ * Local functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Check if the device is virgin.
+ *
+ * \param managed Pointer to a ManagedNandFlash instance.
+ * \param spare Pointer to allocated spare area (must be assigned)
+ * \return 1 if a nandflash device is virgin (i.e. has never been used as a
+ * managed nandflash); otherwise return 0.
+ */
+static uint8_t IsDeviceVirgin( const struct ManagedNandFlash *managed, uint8_t* spare )
+{
+ struct NandBlockStatus blockStatus;
+ const struct NandSpareScheme *scheme =
+ NandFlashModel_GetScheme(MODEL(managed));
+ uint16_t baseBlock = managed->baseBlock;
+ uint8_t badBlockMarker;
+
+ uint8_t error;
+
+ /* Read spare area of page #0. */
+ error = RawNandFlash_ReadPage(RAW(managed), baseBlock, 0, 0, spare);
+
+ if( error )
+ {
+ TRACE_ERROR("ManagedNandFlash_IsDeviceVirgin: Failed to read page #0\n\r");\
+ return 0;
+ }
+ /* Retrieve bad block marker and block status from spare area*/
+ NandSpareScheme_ReadBadBlockMarker(scheme, spare, &badBlockMarker);
+ NandSpareScheme_ReadExtra(scheme, spare, &blockStatus, 4, 0);
+
+ /* Check if block is marked as bad*/
+ if ( badBlockMarker != 0xFF )
+ {
+ /* Device is not virgin, since page #0 is guaranteed to be good*/
+ return 0 ;
+ }
+ /* If device is not virgin, then block status will be set to either
+ FREE, DIRTY or LIVE */
+ else
+ {
+ if ( blockStatus.status != NandBlockStatus_DEFAULT )
+ {
+ /* Device is not virgin */
+ return 0 ;
+ }
+ }
+
+ return 1 ;
+}
+
+/**
+ * \brief Check if the given block is bad.
+ *
+ * \param managed Pointer to a ManagedNandFlash instance.
+ * \param block Raw block to check.
+ * \param spare Pointer to allocated spare area (must be assigned)
+ * \return 1 if a nandflash device is virgin (i.e. has never been used as a
+ * managed nandflash); otherwise return 0.
+ */
+static uint8_t CheckBlock( const struct ManagedNandFlash *managed, uint16_t block, uint8_t* spare )
+{
+ uint8_t error ;
+ uint32_t i ;
+ uint8_t pageSpareSize = NandFlashModel_GetPageSpareSize( MODEL( managed ) ) ;
+
+ /* Read spare area of first page of block */
+ error = RawNandFlash_ReadPage( RAW( managed ), block, 0, 0, spare ) ;
+ if ( error )
+ {
+ TRACE_ERROR( "CheckBlock: Cannot read page #0 of block #%d\n\r", block ) ;
+ return error ;
+ }
+
+ /* Make sure it is all 0xFF */
+ for ( i=0 ; i < pageSpareSize ; i++ )
+ {
+ if ( spare[i] != 0xFF )
+ {
+ return BADBLOCK ;
+ }
+ }
+
+ /* Read spare area of second page of block */
+ error = RawNandFlash_ReadPage( RAW( managed ), block, 1, 0, spare ) ;
+ if ( error )
+ {
+ TRACE_ERROR( "CheckBlock: Cannot read page #1 of block #%d\n\r", block ) ;
+ return error ;
+ }
+
+ /* Make sure it is all 0xFF */
+ for ( i=0 ; i < pageSpareSize ; i++ )
+ {
+ if ( spare[i] != 0xFF )
+ {
+ return BADBLOCK ;
+ }
+ }
+
+ return GOODBLOCK ;
+}
+
+/**
+ * \brief Physically writes the status of a block inside its first page spare area.
+ *
+ * \param managed Pointer to a ManagedNandFlash instance.
+ * \param block Raw block to check.
+ * \param pStatus Pointer to status data.
+ * \param spare Pointer to allocated spare area (must be assigned)
+ * \return 0 if successful; otherwise returns a NandCommon_ERROR_xx code.
+ */
+static uint8_t WriteBlockStatus( const struct ManagedNandFlash *managed, uint16_t block, struct NandBlockStatus *pStatus, uint8_t *spare )
+{
+ assert( spare != NULL ) ; /* "ManagedNandFlash_WriteBlockStatus: spare\n\r" */
+
+ memset( spare, 0xFF, NandCommon_MAXPAGESPARESIZE ) ;
+ NandSpareScheme_WriteExtra( NandFlashModel_GetScheme( MODEL( managed ) ), spare, pStatus, 4, 0 ) ;
+
+ return RawNandFlash_WritePage( RAW( managed ), block, 0, 0, spare ) ;
+}
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Initializes a ManagedNandFlash instance. Scans the device to retrieve or
+ * create block status information.
+ *
+ * \param managed Pointer to a ManagedNandFlash instance.
+ * \param model Pointer to the underlying nand chip model. Can be 0.
+ * \param commandAddress Address at which commands are sent.
+ * \param addressAddress Address at which addresses are sent.
+ * \param dataAddress Address at which data is sent.
+ * \param pinChipEnable Pin controlling the CE signal of the NandFlash.
+ * \param pinReadyBusy Pin used to monitor the ready/busy signal of the Nand.
+ * \param baseBlock Base physical block address of managed area, managed 0.
+ * \param sizeInBlocks Number of blocks that is managed.
+ * \return 0 if the initialization is done; or returns a error code.
+ */
+uint8_t ManagedNandFlash_Initialize(
+ struct ManagedNandFlash *managed,
+ const struct NandFlashModel *model,
+ uint32_t commandAddress,
+ uint32_t addressAddress,
+ uint32_t dataAddress,
+ const Pin pinChipEnable,
+ const Pin pinReadyBusy,
+ uint16_t baseBlock,
+ uint16_t sizeInBlocks)
+{
+ uint8_t error;
+ uint8_t spare[NandCommon_MAXPAGESPARESIZE];
+ uint32_t numBlocks;
+ //uint32_t pageSpareSize;
+ const struct NandSpareScheme *scheme;
+ int32_t block, phyBlock;
+ struct NandBlockStatus blockStatus;
+ uint8_t badBlockMarker;
+ uint32_t eraseCount, minEraseCount, maxEraseCount;
+
+ TRACE_DEBUG("ManagedNandFlash_Initialize()\n\r");
+
+ /* Initialize EccNandFlash */
+ error = EccNandFlash_Initialize(ECC(managed),
+ model,
+ commandAddress,
+ addressAddress,
+ dataAddress,
+ pinChipEnable,
+ pinReadyBusy);
+ if (error) {
+
+ return error;
+ }
+
+ /* Retrieve model information */
+ numBlocks = NandFlashModel_GetDeviceSizeInBlocks(MODEL(managed));
+ //pageSpareSize = NandFlashModel_GetPageSpareSize(MODEL(managed));
+ scheme = NandFlashModel_GetScheme(MODEL(managed));
+
+ /* Initialize base & size */
+ if (sizeInBlocks == 0) sizeInBlocks = numBlocks;
+ if (baseBlock > numBlocks) {
+ baseBlock = 0;
+ }
+ else if (baseBlock + sizeInBlocks > numBlocks) {
+ sizeInBlocks = numBlocks - baseBlock;
+ }
+ TRACE_INFO("Managed NF area: %d + %d\n\r", baseBlock, sizeInBlocks);
+
+ if (sizeInBlocks > NandCommon_MAXNUMBLOCKS) {
+ TRACE_ERROR("Out of Maxmized Managed Size: %d > %d\n\r",
+ sizeInBlocks, NandCommon_MAXNUMBLOCKS);
+ TRACE_INFO("Change NandCommon_MAXNUMBLOCKS or sizeInBlocks\n\r");
+ return NandCommon_ERROR_OUTOFBOUNDS;
+ }
+
+ managed->baseBlock = baseBlock;
+ managed->sizeInBlocks = sizeInBlocks;
+
+ /* Initialize block statuses */
+ /* First, check if device is virgin*/
+ if (IsDeviceVirgin(managed, spare)) {
+
+ TRACE_WARNING("Device is virgin, doing initial block scanning ...\n\r");
+
+ /* Perform initial scan of the device area */
+ for (block=0; block < sizeInBlocks; block++) {
+
+ phyBlock = baseBlock + block;
+
+ /* Check if physical block is bad */
+ error = CheckBlock(managed, phyBlock, spare);
+ if (error == BADBLOCK) {
+
+ /* Mark block as bad */
+ TRACE_DEBUG("Block #%d is bad\n\r", block);
+ managed->blockStatuses[block].status = NandBlockStatus_BAD;
+ }
+ else if (error == GOODBLOCK) {
+
+ /* Mark block as free with erase count 0 */
+ TRACE_DEBUG("Block #%d is free\n\r", block);
+ managed->blockStatuses[block].status = NandBlockStatus_FREE;
+ managed->blockStatuses[block].eraseCount = 0;
+
+ /* Write status in spare of block first page */
+ error = WriteBlockStatus(managed,
+ phyBlock,
+ &(managed->blockStatuses[block]),
+ spare);
+ if (error) {
+
+ TRACE_ERROR("ManagedNandFlash_Initialize: WR spare\n\r");
+ return error;
+ }
+ }
+ else {
+
+ TRACE_ERROR("ManagedNandFlash_Initialize: Scan device\n\r");
+ return error;
+ }
+ }
+ }
+ else {
+
+ TRACE_INFO("Managed, retrieving information ...\n\r");
+
+ /* Retrieve block statuses from their first page spare area
+ (find maximum and minimum wear at the same time) */
+ minEraseCount = 0xFFFFFFFF;
+ maxEraseCount = 0;
+ for ( block=0 ; block < sizeInBlocks; block++ )
+ {
+ phyBlock = baseBlock + block;
+
+ /* Read spare of first page */
+ error = RawNandFlash_ReadPage(RAW(managed), phyBlock, 0, 0, spare);
+ if ( error )
+ {
+
+ TRACE_ERROR("ManagedNandFlash_Initialize: Read block #%d(%d)\n\r",
+ block, phyBlock);
+ }
+
+ /* Retrieve bad block marker and block status */
+ NandSpareScheme_ReadBadBlockMarker(scheme, spare, &badBlockMarker);
+ NandSpareScheme_ReadExtra(scheme, spare, &blockStatus, 4, 0);
+
+ /* If they do not match, block must be bad */
+ if ( (badBlockMarker != 0xFF) && (blockStatus.status != NandBlockStatus_BAD) )
+ {
+ TRACE_DEBUG("Block #%d(%d) is bad\n\r", block, phyBlock);
+ managed->blockStatuses[block].status = NandBlockStatus_BAD;
+ }
+ /* Check that block status is not default (meaning block is not managed) */
+ else
+ {
+ if ( blockStatus.status == NandBlockStatus_DEFAULT )
+ {
+ assert( 0 ) ; /* "Block #%d(%d) is not managed\n\r", block, phyBlock */
+ }
+ /* Otherwise block status is accurate */
+ else
+ {
+ TRACE_DEBUG("Block #%03d(%d) : status = %2d | eraseCount = %d\n\r",
+ block, phyBlock,
+ blockStatus.status, blockStatus.eraseCount);
+ managed->blockStatuses[block] = blockStatus;
+
+ /* Check for min/max erase counts */
+ if ( blockStatus.eraseCount < minEraseCount )
+ {
+ minEraseCount = blockStatus.eraseCount;
+ }
+ if ( blockStatus.eraseCount > maxEraseCount )
+ {
+ maxEraseCount = blockStatus.eraseCount;
+ }
+
+ /* Clean block*/
+ /*Release LIVE blocks */
+ /*
+ if (managed->blockStatuses[block].status == NandBlockStatus_LIVE) {
+
+ ManagedNandFlash_ReleaseBlock(managed, block);
+ }
+ Erase DIRTY blocks
+ if (managed->blockStatuses[block].status == NandBlockStatus_DIRTY) {
+
+ ManagedNandFlash_EraseBlock(managed, block);
+ }*/
+ }
+ }
+ }
+
+ /* Display erase count information*/
+ TRACE_ERROR_WP("|--------|------------|--------|--------|--------|\n\r");
+ TRACE_ERROR_WP("| Wear | Count | Free | Live | Dirty |\n\r");
+ TRACE_ERROR_WP("|--------|------------|--------|--------|--------|\n\r");
+
+ for ( eraseCount=minEraseCount ; eraseCount <= maxEraseCount ; eraseCount++ )
+ {
+ uint32_t count = 0 ;
+ uint32_t live = 0 ;
+ uint32_t dirty = 0 ;
+ uint32_t free = 0 ;
+
+ for ( block=0 ; block < sizeInBlocks ; block++ )
+ {
+ if ( (managed->blockStatuses[block].eraseCount == eraseCount) && (managed->blockStatuses[block].status != NandBlockStatus_BAD) )
+ {
+ count++ ;
+
+ switch ( managed->blockStatuses[block].status )
+ {
+ case NandBlockStatus_LIVE:
+ live++ ;
+ break ;
+
+ case NandBlockStatus_DIRTY:
+ dirty++ ;
+ break ;
+
+ case NandBlockStatus_FREE:
+ free++ ;
+ break ;
+ }
+ }
+ }
+
+ if ( count > 0 )
+ {
+ TRACE_ERROR_WP( "| %4u | %8u | %4u | %4u | %4u |\n\r",
+ eraseCount, count, free, live, dirty);
+ }
+ }
+ TRACE_ERROR_WP("|--------|------------|--------|--------|--------|\n\r");
+ }
+
+ return 0;
+}
+
+/**
+ * \brief Allocates a FREE block of a managed nandflash and marks it as LIVE.
+ * create block status information.
+ *
+ * \param managed Pointer to a ManagedNandFlash instance.
+ * \param block Block to allocate, in managed area.
+ * \return 0 if successful; otherwise returns NandCommon_ERROR_WRONGSTATUS if
+ * the block is not FREE.
+ */
+uint8_t ManagedNandFlash_AllocateBlock(
+ struct ManagedNandFlash *managed,
+ uint16_t block)
+{
+ uint8_t spare[NandCommon_MAXPAGESPARESIZE];
+ TRACE_INFO("ManagedNandFlash_AllocateBlock(%d)\n\r", block);
+
+ /* Check that block is FREE*/
+ if (managed->blockStatuses[block].status != NandBlockStatus_FREE) {
+
+ TRACE_ERROR("ManagedNandFlash_AllocateBlock: Block must be FREE\n\r");
+ return NandCommon_ERROR_WRONGSTATUS;
+ }
+
+ /* Change block status to LIVE*/
+ managed->blockStatuses[block].status = NandBlockStatus_LIVE;
+ return WriteBlockStatus(managed,
+ managed->baseBlock + block,
+ &(managed->blockStatuses[block]),
+ spare);
+}
+
+/**
+ * \brief Releases a LIVE block of a nandflash and marks it as DIRTY.
+ * create block status information.
+ *
+ * \param managed Pointer to a ManagedNandFlash instance.
+ * \param block Block to release, based on managed area.
+ * \return 0 if successful; otherwise returns NandCommon_ERROR_WRONGSTATUS if
+ * the block is not LIVE, or a RawNandFlash_WritePage error.
+ */
+uint8_t ManagedNandFlash_ReleaseBlock(
+ struct ManagedNandFlash *managed,
+ uint16_t block)
+{
+ uint8_t spare[NandCommon_MAXPAGESPARESIZE];
+ TRACE_INFO("ManagedNandFlash_ReleaseBlock(%d)\n\r", block);
+
+ /* Check that block is LIVE*/
+ if (managed->blockStatuses[block].status != NandBlockStatus_LIVE) {
+
+ TRACE_ERROR("ManagedNandFlash_ReleaseBlock: Block must be LIVE\n\r");
+ return NandCommon_ERROR_WRONGSTATUS;
+ }
+
+ /* Change block status to DIRTY*/
+ managed->blockStatuses[block].status = NandBlockStatus_DIRTY;
+ return WriteBlockStatus(managed,
+ managed->baseBlock + block,
+ &(managed->blockStatuses[block]),
+ spare);
+}
+
+/**
+ * \brief Erases a DIRTY block of a managed NandFlash.
+ * create block status information.
+ *
+ * \param managed Pointer to a ManagedNandFlash instance.
+ * \param block Block to erase, in managed area.
+ * \return the RawNandFlash_EraseBlock code or NandCommon_ERROR_WRONGSTATUS.
+ */
+uint8_t ManagedNandFlash_EraseBlock(
+ struct ManagedNandFlash *managed,
+ uint16_t block)
+{
+ uint32_t phyBlock = managed->baseBlock + block;
+ uint8_t spare[NandCommon_MAXPAGESPARESIZE];
+ uint8_t error;
+ TRACE_INFO("ManagedNandFlash_EraseBlock(%d)\n\r", block);
+
+ /* Check block status*/
+ if (managed->blockStatuses[block].status != NandBlockStatus_DIRTY) {
+
+ TRACE_ERROR("ManagedNandFlash_EraseBlock: Block must be DIRTY\n\r");
+ return NandCommon_ERROR_WRONGSTATUS;
+ }
+
+ /* Erase block*/
+ error = RawNandFlash_EraseBlock(RAW(managed), phyBlock);
+ if (error) {
+
+ return error;
+ }
+
+ /* Update block status*/
+ managed->blockStatuses[block].status = NandBlockStatus_FREE;
+ managed->blockStatuses[block].eraseCount++;
+ return WriteBlockStatus(managed,
+ phyBlock,
+ &(managed->blockStatuses[block]),
+ spare);
+}
+
+/**
+ * \brief Reads the data and/or the spare area of a page on a managed nandflash. If
+ * the data pointer is not 0, then the block MUST be LIVE.
+ * \param managed Pointer to a ManagedNandFlash instance.
+ * \param block Number of block to read from.
+ * \param page Number of page to read inside given block.
+ * \param data Data area buffer, can be 0.
+ * \param spare Spare area buffer, can be 0.
+ * \return NandCommon_ERROR_WRONGSTATUS if the block is not LIVE and the data
+ * pointer is not null; Otherwise, returns EccNandFlash_ReadPage().
+ */
+uint8_t ManagedNandFlash_ReadPage(
+ const struct ManagedNandFlash *managed,
+ uint16_t block,
+ uint16_t page,
+ void *data,
+ void *spare)
+{
+ /* Check that the block is LIVE if data is requested*/
+ if ((managed->blockStatuses[block].status != NandBlockStatus_LIVE)
+ && (managed->blockStatuses[block].status != NandBlockStatus_DIRTY)) {
+
+ TRACE_ERROR("ManagedNandFlash_ReadPage: Block must be LIVE or DIRTY.\n\r");
+ return NandCommon_ERROR_WRONGSTATUS;
+ }
+
+ /* Read data with ECC verification*/
+ return EccNandFlash_ReadPage(ECC(managed),
+ managed->baseBlock + block,
+ page, data, spare);
+}
+
+/**
+ * \brief Writes the data and/or spare area of a LIVE page on a managed NandFlash.
+ * ECC for the data area and storing it in the spare. If no data buffer is
+ * provided, the ECC is read from the existing page spare. If no spare buffer
+ * is provided, the spare area is still written with the ECC information
+ * calculated on the data buffer.
+ * \param managed Pointer to a ManagedNandFlash instance.
+ * \param block Number of block to read from.
+ * \param page Number of page to read inside given block.
+ * \param data Data area buffer.
+ * \param spare Spare area buffer.
+ * \return NandCommon_ERROR_WRONGSTATUS if the page is not LIVE; otherwise,
+ * returns EccNandFlash_WritePage().
+ */
+uint8_t ManagedNandFlash_WritePage(
+ const struct ManagedNandFlash *managed,
+ uint16_t block,
+ uint16_t page,
+ void *data,
+ void *spare)
+{
+ /* Check that the block is LIVE*/
+ if (managed->blockStatuses[block].status != NandBlockStatus_LIVE) {
+
+ TRACE_ERROR("ManagedNandFlash_WritePage: Block must be LIVE.\n\r");
+ return NandCommon_ERROR_WRONGSTATUS;
+ }
+
+ /* Write data with ECC calculation*/
+ return EccNandFlash_WritePage(ECC(managed),
+ managed->baseBlock + block,
+ page, data, spare);
+}
+
+/**
+ * \brief Copy the data & spare area of one page to another page. The source block
+ * can be either LIVE or DIRTY, and the destination block must be LIVE; they
+ * must both have the same parity.
+ * \param managed Pointer to a ManagedNandFlash instance.
+ * \param sourceBlock Source block number based on managed area.
+ * \param sourcePage Number of source page inside the source block.
+ * \param destBlock Destination block number based on managed area.
+ * \param destPage Number of destination page inside the dest block.
+ * \return 0 if successful; NandCommon_ERROR_WRONGSTATUS if one or more page
+ * is not live; otherwise returns an NandCommon_ERROR_xxx code.
+ */
+uint8_t ManagedNandFlash_CopyPage(
+ const struct ManagedNandFlash *managed,
+ uint16_t sourceBlock,
+ uint16_t sourcePage,
+ uint16_t destBlock,
+ uint16_t destPage)
+{
+ uint8_t error;
+
+ assert( (sourcePage & 1) == (destPage & 1) ) ; /* "ManagedNandFlash_CopyPage: source & dest pages must have the same parity\n\r" */
+
+ TRACE_INFO("ManagedNandFlash_CopyPage(B#%d:P#%d -> B#%d:P#%d)\n\r",
+ sourceBlock, sourcePage, destBlock, destPage);
+
+ /* Check block statuses */
+ if ((managed->blockStatuses[sourceBlock].status != NandBlockStatus_LIVE)
+ && (managed->blockStatuses[sourceBlock].status != NandBlockStatus_DIRTY)) {
+
+ TRACE_ERROR("ManagedNandFlash_CopyPage: Source block must be LIVE or DIRTY.\n\r");
+ return NandCommon_ERROR_WRONGSTATUS;
+ }
+ if (managed->blockStatuses[destBlock].status != NandBlockStatus_LIVE) {
+
+ TRACE_ERROR("ManagedNandFlash_CopyPage: Destination block must be LIVE.\n\r");
+ return NandCommon_ERROR_WRONGSTATUS;
+ }
+
+ /* If destination page is page #0, block status information must not be
+ overwritten*/
+ if (destPage == 0) {
+
+ uint8_t data[NandCommon_MAXPAGEDATASIZE];
+ uint8_t spare[NandCommon_MAXPAGESPARESIZE];
+
+ /* Read data & spare to copy*/
+ error = EccNandFlash_ReadPage(ECC(managed),
+ managed->baseBlock + sourceBlock,
+ sourcePage,
+ data, spare);
+ if (error) {
+
+ return error;
+ }
+
+ /* Write destination block status information in spare*/
+ NandSpareScheme_WriteExtra(NandFlashModel_GetScheme(MODEL(managed)),
+ spare,
+ &(managed->blockStatuses[destBlock]),
+ 4,
+ 0);
+
+ /* Write page*/
+ error = RawNandFlash_WritePage(RAW(managed),
+ managed->baseBlock + destBlock,
+ destPage,
+ data, spare);
+ if (error) {
+
+ return error;
+ }
+ }
+ /* Otherwise, a normal copy can be done*/
+ else {
+
+ return RawNandFlash_CopyPage(RAW(managed),
+ managed->baseBlock + sourceBlock,
+ sourcePage,
+ managed->baseBlock + destBlock,
+ destPage);
+ }
+
+ return 0;
+}
+
+/**
+ * \brief Copies the data from a whole block to another block on a nandflash. Both
+ * blocks must be LIVE.
+ * \param managed Pointer to a ManagedNandFlash instance.
+ * \param sourceBlock Source block number.
+ * \param destBlock Destination block number.
+ * \return 0 if successful; NandCommon_ERROR_WRONGSTATUS if one or more page
+ * is not live; otherwise returns an NandCommon_ERROR_xxx code.
+ */
+uint8_t ManagedNandFlash_CopyBlock(
+ const struct ManagedNandFlash *managed,
+ uint16_t sourceBlock,
+ uint16_t destBlock)
+{
+ uint16_t numPages = NandFlashModel_GetBlockSizeInPages(MODEL(managed));
+ uint8_t error;
+ uint16_t page;
+
+ assert( sourceBlock != destBlock ) ; /* "ManagedNandFlash_CopyBlock: Source block must be different from dest. block\n\r" */
+
+ TRACE_INFO( "ManagedNandFlash_CopyBlock(B#%d->B#%d)\n\r", sourceBlock, destBlock ) ;
+
+ /* Copy all pages*/
+ for ( page=0 ; page < numPages ; page++ )
+ {
+ error = ManagedNandFlash_CopyPage( managed, sourceBlock, page, destBlock, page ) ;
+ if ( error )
+ {
+ TRACE_ERROR( "ManagedNandFlash_CopyPage: Failed to copy page %d\n\r", page ) ;
+
+ return error ;
+ }
+ }
+
+ return 0;
+}
+
+/**
+ * \brief Erases all the blocks which are currently marked as DIRTY.
+ * \param managed Pointer to a ManagedNandFlash instance.
+ * \return 0 if successful; otherwise, returns a NandCommon_ERROR code.
+ * is not live; otherwise returns an NandCommon_ERROR_xxx code.
+ */
+uint8_t ManagedNandFlash_EraseDirtyBlocks( struct ManagedNandFlash *managed )
+{
+ uint32_t i ;
+ uint8_t error ;
+
+ /* Erase all dirty blocks*/
+ for ( i=0 ; i < managed->sizeInBlocks ; i++ )
+ {
+ if ( managed->blockStatuses[i].status == NandBlockStatus_DIRTY )
+ {
+ error = ManagedNandFlash_EraseBlock( managed, i ) ;
+
+ if ( error )
+ {
+ return error ;
+ }
+ }
+ }
+
+ return 0 ;
+}
+
+/**
+ * \brief Looks for the youngest block having the desired status among the blocks
+ * of a managed nandflash. If a block is found, its index is stored inside
+ * the provided variable (if pointer is not 0).
+ *
+ * \param managed Pointer to a ManagedNandFlash instance.
+ * \param block Pointer to the block number variable, based on managed area.
+ * \return 0 if a block has been found; otherwise returns either status.
+ */
+uint8_t ManagedNandFlash_FindYoungestBlock( const struct ManagedNandFlash *managed, uint8_t status, uint16_t *block )
+{
+ uint8_t found = 0;
+ uint16_t bestBlock = 0;
+ uint32_t i;
+
+ /* Go through the block array*/
+ for ( i=0 ; i < managed->sizeInBlocks ; i++ )
+ {
+ /* Check status*/
+ if ( managed->blockStatuses[i].status == status )
+ {
+ /* If no block was found, i becomes the best block*/
+ if ( !found )
+ {
+ found = 1;
+ bestBlock = i;
+ }
+ /* Compare the erase counts otherwise*/
+ else
+ {
+ if ( managed->blockStatuses[i].eraseCount < managed->blockStatuses[bestBlock].eraseCount )
+ {
+ bestBlock = i;
+ }
+ }
+ }
+ }
+
+ if ( found )
+ {
+ if ( block )
+ {
+ *block = bestBlock ;
+ }
+ return 0 ;
+ }
+ else
+ {
+ return NandCommon_ERROR_NOBLOCKFOUND ;
+ }
+}
+
+/**
+ * \brief Counts and returns the number of blocks having the given status in a
+ * managed nandflash.
+ *
+ * \param managed Pointer to a ManagedNandFlash instance.
+ * \param status Desired block status.
+ * \return the number of blocks.
+ */
+uint16_t ManagedNandFlash_CountBlocks(
+ const struct ManagedNandFlash *managed,
+ uint8_t status)
+{
+ uint32_t i;
+ uint16_t count = 0;
+
+ /* Examine each block*/
+ for (i=0; i < managed->sizeInBlocks; i++) {
+
+ if (managed->blockStatuses[i].status == status) {
+
+ count++;
+ }
+ }
+
+ return count;
+}
+
+/**
+ * \brief Returns the number of available blocks in a managed nandflash.
+ *
+ * \param managed Pointer to a ManagedNandFlash instance.
+ * \return the number of blocks.
+ */
+uint16_t ManagedNandFlash_GetDeviceSizeInBlocks(
+ const struct ManagedNandFlash *managed)
+{
+ return managed->sizeInBlocks;
+}
+
+
+/**
+ * \brief Erase all blocks in the managed area of nand flash.
+ *
+ * \param managed Pointer to a ManagedNandFlash instance.
+ * \param level Erase level.
+ * \return the RawNandFlash_EraseBlock code or NandCommon_ERROR_WRONGSTATUS.
+ */
+uint8_t ManagedNandFlash_EraseAll(struct ManagedNandFlash *managed,
+ uint8_t level)
+{
+ uint32_t i;
+ uint8_t error = 0;
+
+ if (level == NandEraseFULL) {
+ for (i=0; i < managed->sizeInBlocks; i++) {
+ error = RawNandFlash_EraseBlock(RAW(managed),
+ managed->baseBlock + i);
+ /* Reset block status*/
+ managed->blockStatuses[i].eraseCount = 0;
+ if (error) {
+ TRACE_WARNING("Managed_FullErase: %u(%u)\n\r",
+ i, managed->baseBlock + i);
+ managed->blockStatuses[i].status = NandBlockStatus_BAD;
+ continue;
+ }
+ managed->blockStatuses[i].status = NandBlockStatus_FREE;
+ }
+ }
+ else if (level == NandEraseDATA) {
+ for (i=0; i < managed->sizeInBlocks; i++) {
+ error = ManagedNandFlash_EraseBlock(managed, i);
+ if (error) {
+ TRACE_WARNING("Managed_DataErase: %u(%u)\n\r",
+ i, managed->baseBlock + i);
+ }
+ }
+ }
+ else {
+ for (i=0; i < managed->sizeInBlocks; i++) {
+ if (managed->blockStatuses[i].status == NandBlockStatus_DIRTY) {
+ error = ManagedNandFlash_EraseBlock(managed, i);
+ if (error) {
+ TRACE_WARNING("Managed_DirtyErase: %u(%u)\n\r",
+ i, managed->baseBlock + i);
+ }
+ }
+ }
+ }
+
+ return error;
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/MappedNandFlash.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/MappedNandFlash.c
new file mode 100644
index 0000000..1f194c0
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/MappedNandFlash.c
@@ -0,0 +1,668 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * MappedNandFlash layer will do operations on logical blocks of nandflash, it is called by
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "memories.h"
+
+#include <string.h>
+#include <assert.h>
+
+
+/*----------------------------------------------------------------------------
+ * Local macros
+ *----------------------------------------------------------------------------*/
+
+#define min( a, b ) (((a) < (b)) ? (a) : (b))
+
+/*----------------------------------------------------------------------------
+ * Internal definitions
+ *----------------------------------------------------------------------------*/
+
+/** Casts */
+#define MANAGED(mapped) ((struct ManagedNandFlash *) mapped)
+#define ECC(mapped) ((struct EccNandFlash *) mapped)
+#define RAW(mapped) ((struct RawNandFlash *) mapped)
+#define MODEL(mapped) ((struct NandFlashModel *) mapped)
+
+/** Logical block mapping pattern */
+#define PATTERN(i) ((i << 1) & 0x73)
+
+/*----------------------------------------------------------------------------
+ * Local functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Scans a mapped nandflash to find an existing logical block mapping. If a
+ * block contains the mapping, its index is stored in the provided variable (if
+ * pointer is not 0).
+ *
+ * \param mapped Pointer to a MappedNandFlash instance.
+ * \param logicalMappingBlock Pointer to a variable for storing the block number.
+ * \return 0 if mapping has been found; otherwise returns
+ * NandCommon_ERROR_NOMAPPING if no mapping exists, or another NandCommon_ERROR_xxx code.
+ */
+static uint8_t FindLogicalMappingBlock(
+ const struct MappedNandFlash *mapped,
+ int16_t *logicalMappingBlock)
+{
+ uint16_t block;
+ uint8_t found;
+ uint16_t numBlocks = ManagedNandFlash_GetDeviceSizeInBlocks(MANAGED(mapped));
+ uint16_t pageDataSize = NandFlashModel_GetPageDataSize(MODEL(mapped));
+ uint8_t error;
+ uint8_t data[NandCommon_MAXPAGEDATASIZE];
+ uint32_t i;
+
+ TRACE_INFO("FindLogicalMappingBlock()~%d\n\r", numBlocks);
+
+ /* Search each LIVE block */
+ found = 0;
+ block = 0;
+ while (!found && (block < numBlocks)) {
+
+ /* Check that block is LIVE*/
+ if (MANAGED(mapped)->blockStatuses[block].status == NandBlockStatus_LIVE) {
+
+ /* Read block*/
+ TRACE_INFO("Checking LIVE block #%d\n\r", block);
+ error = ManagedNandFlash_ReadPage(MANAGED(mapped), block, 0, data, 0);
+ if (!error) {
+
+ /* Compare data with logical mapping pattern*/
+ i = 0;
+ found = 1;
+ while ((i < pageDataSize) && found) {
+
+ if (data[i] != PATTERN(i)) {
+
+ found = 0;
+ }
+ i++;
+ }
+
+ /* If this is the mapping, stop looking*/
+ if (found) {
+
+ TRACE_WARNING_WP("-I- Logical mapping in block #%d\n\r",
+ block);
+ if (logicalMappingBlock) {
+
+ *logicalMappingBlock = block;
+ }
+ return 0;
+ }
+ }
+ else if (error != NandCommon_ERROR_WRONGSTATUS) {
+
+ TRACE_ERROR(
+ "FindLogicalMappingBlock: Failed to scan block #%d\n\r",
+ block);
+ return error;
+ }
+ }
+
+ block++;
+ }
+
+ TRACE_WARNING("No logical mapping found in device\n\r");
+ return NandCommon_ERROR_NOMAPPING;
+}
+
+/**
+ * \brief Loads the logical mapping contained in the given physical block.
+ * block contains the mapping, its index is stored in the provided variable (if
+ * pointer is not 0).
+ *
+ * \param mapped Pointer to a MappedNandFlash instance.
+ * \param physicalBlock Physical block number.
+ * \return 0 if successful; otherwise, returns a NandCommon_ERROR code.
+ */
+static uint8_t LoadLogicalMapping(
+ struct MappedNandFlash *mapped,
+ uint16_t physicalBlock)
+{
+ uint8_t error;
+ uint8_t data[NandCommon_MAXPAGEDATASIZE];
+ uint16_t pageDataSize =
+ NandFlashModel_GetPageDataSize(MODEL(mapped));
+ uint16_t numBlocks =
+ ManagedNandFlash_GetDeviceSizeInBlocks(MANAGED(mapped));
+ uint32_t remainingSize;
+ uint8_t *currentBuffer;
+ uint16_t currentPage;
+ uint32_t readSize;
+ uint32_t i;
+ uint8_t status;
+ int16_t logicalBlock;
+ /*int16_t firstBlock, lastBlock;*/
+
+ TRACE_INFO("LoadLogicalMapping(B#%d)\n\r", physicalBlock);
+
+ /* Load mapping from pages #1 - #XXX of block*/
+ currentBuffer = (uint8_t *) mapped->logicalMapping;
+ remainingSize = sizeof(mapped->logicalMapping);
+ currentPage = 1;
+ while (remainingSize > 0) {
+
+ /* Read page*/
+ readSize = min(remainingSize, pageDataSize);
+ error = ManagedNandFlash_ReadPage(MANAGED(mapped),
+ physicalBlock,
+ currentPage,
+ data,
+ 0);
+ if (error) {
+
+ TRACE_ERROR(
+ "LoadLogicalMapping: Failed to load mapping\n\r");
+ return error;
+ }
+
+ /* Copy page info*/
+ memcpy(currentBuffer, data, readSize);
+
+ currentBuffer += readSize;
+ remainingSize -= readSize;
+ currentPage++;
+ }
+
+ /* Store mapping block index*/
+ mapped->logicalMappingBlock = physicalBlock;
+
+ /* Power-loss recovery*/
+ for (i=0; i < numBlocks; i++) {
+
+ /* Check that this is not the logical mapping block*/
+ if (i != physicalBlock) {
+
+ status = mapped->managed.blockStatuses[i].status;
+ logicalBlock = MappedNandFlash_PhysicalToLogical(mapped, i);
+
+ /* Block is LIVE*/
+ if (status == NandBlockStatus_LIVE) {
+
+ /* Block is not mapped -> release it*/
+ if (logicalBlock == -1) {
+
+ TRACE_WARNING_WP("-I- Release unmapped LIVE #%u\n\r",
+ i);
+ ManagedNandFlash_ReleaseBlock(MANAGED(mapped), i);
+ }
+ }
+ /* Block is DIRTY*/
+ else if (status == NandBlockStatus_DIRTY) {
+
+ /* Block is mapped -> fake it as live*/
+ if (logicalBlock != -1) {
+
+ TRACE_WARNING_WP("-I- Mark mapped DIRTY #%u -> LIVE\n\r",
+ i);
+ mapped->managed.blockStatuses[i].status =
+ NandBlockStatus_LIVE;
+ }
+ }
+ /* Block is FREE or BAD*/
+ else {
+
+ /* Block is mapped -> remove it from mapping*/
+ if (logicalBlock != -1) {
+
+ TRACE_WARNING_WP("-I- Unmap FREE or BAD #%u\n\r", i);
+ mapped->logicalMapping[logicalBlock] = -1;
+ }
+ }
+ }
+ }
+
+ TRACE_WARNING_WP("-I- Mapping loaded from block #%d\n\r", physicalBlock);
+
+ return 0;
+}
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+/**
+ * \brief Initializes a MappedNandFlash instance. Scans the device to look for and
+ * existing logical block mapping; otherwise starts from scratch (no block
+ * mapped).
+ *
+ * \param mapped Pointer to a MappedNandFlash instance.
+ * \param model Pointer to the underlying nand chip model. Can be 0.
+ * \param commandAddress Address at which commands are sent.
+ * \param addressAddress Address at which addresses are sent.
+ * \param dataAddress Address at which data is sent.
+ * \param pinChipEnable Pin controlling the CE signal of the NandFlash.
+ * \param pinReadyBusy Pin used to monitor the ready/busy signal of the Nand.
+ * \return 0 if successful; otherwise returns a NandCommon_ERROR_xxx code.
+ */
+uint8_t MappedNandFlash_Initialize(
+ struct MappedNandFlash *mapped,
+ const struct NandFlashModel *model,
+ uint32_t commandAddress,
+ uint32_t addressAddress,
+ uint32_t dataAddress,
+ const Pin pinChipEnable,
+ const Pin pinReadyBusy,
+ uint16_t baseBlock,
+ uint16_t sizeInBlocks)
+{
+ uint8_t error;
+ uint16_t numBlocks;
+ uint16_t block;
+ int16_t logicalMappingBlock = 0;
+
+ TRACE_INFO("MappedNandFlash_Initialize()\n\r");
+
+ /* Initialize ManagedNandFlash*/
+ error = ManagedNandFlash_Initialize(MANAGED(mapped),
+ model,
+ commandAddress,
+ addressAddress,
+ dataAddress,
+ pinChipEnable,
+ pinReadyBusy,
+ baseBlock,
+ sizeInBlocks);
+ if (error) {
+
+ return error;
+ }
+
+ /* Scan to find logical mapping*/
+ mapped->mappingModified = 0;
+ error = FindLogicalMappingBlock(mapped, &logicalMappingBlock);
+ if (!error) {
+
+ /* Extract mapping from block*/
+ mapped->logicalMappingBlock = logicalMappingBlock;
+ return LoadLogicalMapping(mapped, logicalMappingBlock);
+ }
+ else if (error == NandCommon_ERROR_NOMAPPING) {
+
+ /* Start with no block mapped*/
+ mapped->logicalMappingBlock = -1;
+ numBlocks = ManagedNandFlash_GetDeviceSizeInBlocks(MANAGED(mapped));
+ for (block=0; block < numBlocks; block++) {
+
+ mapped->logicalMapping[block] = -1;
+ }
+ }
+ else {
+
+ TRACE_ERROR("MappedNandFlash_Initialize: Initialize device\n\r");
+ return error;
+ }
+
+ return 0;
+}
+
+/**
+ * \brief Reads the data and/or spare area of a page in a mapped logical block.
+ * the data is valid using the ECC information contained in the spare. If one
+ * buffer pointer is 0, the corresponding area is not saved.
+ * \param mapped Pointer to a MappedNandFlash instance.
+ * \param block Number of block to read from.
+ * \param page Number of page to read inside given block.
+ * \param data Data area buffer, can be 0.
+ * \param spare Spare area buffer, can be 0.
+ * \return 0 if successful; otherwise, returns NandCommon_ERROR_BLOCKNOTMAPPED
+ * if the block is not mapped, or a NandCommon_ERROR_xxx code.
+ */
+uint8_t MappedNandFlash_ReadPage(
+ const struct MappedNandFlash *mapped,
+ uint16_t block,
+ uint16_t page,
+ void *data,
+ void *spare)
+{
+ int16_t physicalBlock;
+
+ TRACE_INFO("MappedNandFlash_ReadPage(LB#%d:P#%d)\n\r", block, page);
+
+ /* Check if block is mapped*/
+ physicalBlock = mapped->logicalMapping[block];
+ if (physicalBlock == -1) {
+
+ TRACE_INFO( "MappedNandFlash_ReadPage: Block %d not mapped\n\r", block);
+ return NandCommon_ERROR_BLOCKNOTMAPPED;
+ }
+
+ /* Read page from corresponding physical block*/
+ return ManagedNandFlash_ReadPage(MANAGED(mapped),
+ physicalBlock,
+ page,
+ data,
+ spare);
+}
+
+/**
+ * \brief Writes the data and/or spare area of a page in a mapped logical block.
+ * the data is valid using the ECC information contained in the spare. If one
+ * buffer pointer is 0, the corresponding area is not saved.
+ * \param mapped Pointer to a MappedNandFlash instance.
+ * \param block Number of block to read from.
+ * \param page Number of page to write inside given block.
+ * \param data Data area buffer, can be 0.
+ * \param spare Spare area buffer, can be 0.
+ * \return 0 if successful; otherwise, returns NandCommon_ERROR_BLOCKNOTMAPPED
+ * if the block is not mapped, or a NandCommon_ERROR_xxx code.
+ */
+uint8_t MappedNandFlash_WritePage(
+ const struct MappedNandFlash *mapped,
+ uint16_t block,
+ uint16_t page,
+ void *data,
+ void *spare)
+{
+ int16_t physicalBlock;
+
+ TRACE_INFO("MappedNandFlash_WritePage(LB#%d:P#%d)\n\r", block, page);
+
+ /* Check if block is mapped*/
+ physicalBlock = mapped->logicalMapping[block];
+ if (physicalBlock == -1) {
+
+ TRACE_ERROR("MappedNandFlash_WritePage: Block must be mapped\n\r");
+ return NandCommon_ERROR_BLOCKNOTMAPPED;
+ }
+
+ /* Write page on physical block*/
+ return ManagedNandFlash_WritePage(MANAGED(mapped),
+ physicalBlock,
+ page,
+ data,
+ spare);
+}
+
+/**
+ * \brief Maps a logical block number to an actual physical block. This allocates
+ * the physical block (meaning it must be FREE), and releases the previous
+ * block being replaced (if any).
+ * \param mapped Pointer to a MappedNandFlash instance.
+ * \param logicalBlock Logical block number to map.
+ * \param physicalBlock Physical block to map to the logical one.
+ * \return 0 if successful; otherwise returns a NandCommon_ERROR_xxx code.
+ */
+uint8_t MappedNandFlash_Map(
+ struct MappedNandFlash *mapped,
+ uint16_t logicalBlock,
+ uint16_t physicalBlock)
+{
+ uint8_t error;
+ int16_t oldPhysicalBlock;
+
+ TRACE_INFO("MappedNandFlash_Map(LB#%d -> PB#%d)\n\r",
+ logicalBlock, physicalBlock);
+ assert( logicalBlock < ManagedNandFlash_GetDeviceSizeInBlocks(MANAGED(mapped)) ) ; /* "MappedNandFlash_Map: logicalBlock out-of-range\n\r" */
+ assert( physicalBlock < ManagedNandFlash_GetDeviceSizeInBlocks(MANAGED(mapped)) ) ; /* "MappedNandFlash_Map: physicalBlock out-of-range\n\r" */
+
+ /* Allocate physical block*/
+ error = ManagedNandFlash_AllocateBlock(MANAGED(mapped), physicalBlock);
+ if ( error )
+ {
+ return error;
+ }
+
+ /* Release currently mapped block (if any)*/
+ oldPhysicalBlock = mapped->logicalMapping[logicalBlock];
+ if (oldPhysicalBlock != -1)
+ {
+ error = ManagedNandFlash_ReleaseBlock(MANAGED(mapped), oldPhysicalBlock);
+ if ( error )
+ {
+ return error;
+ }
+ }
+
+ /* Set mapping*/
+ mapped->logicalMapping[logicalBlock] = physicalBlock;
+ mapped->mappingModified = 1;
+
+ return 0;
+}
+
+/**
+ * \brief Unmaps a logical block by releasing the corresponding physical block (if
+ * any).
+ * \param mapped Pointer to a MappedNandFlash instance.
+ * \param logicalBlock Number of logical block to unmap.
+ * \return 0 if successful; otherwise returns a NandCommon_ERROR_xxx code.
+ */
+uint8_t MappedNandFlash_Unmap(
+ struct MappedNandFlash *mapped,
+ uint16_t logicalBlock)
+{
+ int16_t physicalBlock = mapped->logicalMapping[logicalBlock];
+ uint8_t error;
+
+ TRACE_INFO("MappedNandFlash_Unmap(LB#%d)\n\r", logicalBlock);
+ assert( logicalBlock < ManagedNandFlash_GetDeviceSizeInBlocks(MANAGED(mapped)) ) ; /* "MappedNandFlash_Unmap: logicalBlock out-of-range\n\r" */
+
+ if (physicalBlock != -1) {
+
+ error = ManagedNandFlash_ReleaseBlock(MANAGED(mapped), physicalBlock);
+ if (error) {
+
+ return error;
+ }
+ }
+ mapped->logicalMapping[logicalBlock] = -1;
+ mapped->mappingModified = 1;
+
+ return 0;
+}
+
+/**
+ * \brief Returns the physical block mapped with the given logical block, or -1 if it
+ * is not mapped.
+ * \param mapped Pointer to a MappedNandFlash instance.
+ * \param logicalBlock Logical block number.
+ * \return the physical block, or -1 if it is not mapped.
+ */
+int16_t MappedNandFlash_LogicalToPhysical(
+ const struct MappedNandFlash *mapped,
+ uint16_t logicalBlock)
+{
+ assert( logicalBlock < ManagedNandFlash_GetDeviceSizeInBlocks(MANAGED(mapped)) ) ; /* "MappedNandFlash_LogicalToPhysical: logicalBlock out-of-range\n\r" */
+
+ return mapped->logicalMapping[logicalBlock];
+}
+
+/**
+ * \brief Returns the logical block mapped with the given logical block, or -1 if it
+ * is not mapped.
+ * \param mapped Pointer to a MappedNandFlash instance.
+ * \param physicalBlock Physical block number.
+ * \return the logical block, or -1 if it is not mapped.
+ */
+int16_t MappedNandFlash_PhysicalToLogical(
+ const struct MappedNandFlash *mapped,
+ uint16_t physicalBlock)
+{
+ uint16_t numBlocks =
+ ManagedNandFlash_GetDeviceSizeInBlocks(MANAGED(mapped));
+ int16_t logicalBlock;
+
+ assert( physicalBlock < ManagedNandFlash_GetDeviceSizeInBlocks(MANAGED(mapped)) ) ; /* "MappedNandFlash_PhysicalToLogical: physicalBlock out-of-range\n\r" */
+
+ /* Search the mapping for the desired physical block*/
+ for ( logicalBlock=0; logicalBlock < numBlocks; logicalBlock++ )
+ {
+ if ( mapped->logicalMapping[logicalBlock] == physicalBlock )
+ {
+ return logicalBlock ;
+ }
+ }
+
+ return -1;
+}
+
+/**
+ * \brief Saves the logical mapping on a FREE, unmapped physical block. Allocates the
+ * new block, releases the previous one (if any) and save the mapping.
+ *
+ * \param mapped Pointer to a MappedNandFlash instance.
+ * \param physicalBlock Physical block number.
+ * \return 0 if successful; otherwise, returns NandCommon_ERROR_WRONGSTATUS
+ * if the block is not LIVE, or a NandCommon_ERROR code.
+ */
+uint8_t MappedNandFlash_SaveLogicalMapping(
+ struct MappedNandFlash *mapped,
+ uint16_t physicalBlock)
+{
+ uint8_t error;
+ uint8_t data[NandCommon_MAXPAGEDATASIZE];
+ uint16_t pageDataSize =
+ NandFlashModel_GetPageDataSize(MODEL(mapped));
+ /*uint16_t numBlocks =
+ ManagedNandFlash_GetDeviceSizeInBlocks(MANAGED(mapped));*/
+ uint32_t i;
+ uint32_t remainingSize;
+ uint8_t *currentBuffer;
+ uint16_t currentPage;
+ uint32_t writeSize;
+ int16_t previousPhysicalBlock;
+
+ TRACE_INFO("MappedNandFlash_SaveLogicalMapping(B#%d)\n\r", physicalBlock);
+
+ /* If mapping has not been modified, do nothing*/
+ if (!mapped->mappingModified) {
+
+ return 0;
+ }
+
+ /* Allocate new block*/
+ error = ManagedNandFlash_AllocateBlock(MANAGED(mapped), physicalBlock);
+ if (error) {
+
+ return error;
+ }
+
+ /* Save mapping*/
+ previousPhysicalBlock = mapped->logicalMappingBlock;
+ mapped->logicalMappingBlock = physicalBlock;
+
+ /* Save actual mapping in pages #1-#XXX*/
+ currentBuffer = (uint8_t *) mapped->logicalMapping;
+ remainingSize = sizeof(mapped->logicalMapping);
+ currentPage = 1;
+ while (remainingSize > 0) {
+
+ writeSize = min(remainingSize, pageDataSize);
+ memset(data, 0xFF, pageDataSize);
+ memcpy(data, currentBuffer, writeSize);
+ error = ManagedNandFlash_WritePage(MANAGED(mapped),
+ physicalBlock,
+ currentPage,
+ data,
+ 0);
+ if (error) {
+
+ TRACE_ERROR(
+ "MappedNandFlash_SaveLogicalMapping: Failed to write mapping\n\r");
+ return error;
+ }
+
+ currentBuffer += writeSize;
+ remainingSize -= writeSize;
+ currentPage++;
+ }
+
+ /* Mark page #0 of block with a distinguishible pattern, so the mapping can
+ be retrieved at startup*/
+ for (i=0; i < pageDataSize; i++) {
+
+ data[i] = PATTERN(i);
+ }
+ error = ManagedNandFlash_WritePage(MANAGED(mapped),
+ physicalBlock, 0,
+ data, 0);
+ if (error) {
+
+ TRACE_ERROR(
+ "MappedNandFlash_SaveLogicalMapping: Failed to write pattern\n\r");
+ return error;
+ }
+
+ /* Mapping is not modified anymore*/
+ mapped->mappingModified = 0;
+
+ /* Release previous block (if any)*/
+ if (previousPhysicalBlock != -1) {
+
+ TRACE_DEBUG("Previous physical block was #%d\n\r",
+ previousPhysicalBlock);
+ error = ManagedNandFlash_ReleaseBlock(MANAGED(mapped),
+ previousPhysicalBlock);
+ if (error) {
+
+ return error;
+ }
+ }
+
+ TRACE_INFO("Mapping saved on block #%d\n\r", physicalBlock);
+
+ return 0;
+}
+
+/**
+ * \brief Erase all blocks in the mapped area of nand flash.
+ *
+ * \param mapped Pointer to a MappedNandFlash instance.
+ * \param level Erase level.
+ * \return 0.
+ */
+uint8_t MappedNandFlash_EraseAll(
+ struct MappedNandFlash *mapped,
+ uint8_t level)
+{
+ uint32_t block;
+ ManagedNandFlash_EraseAll(MANAGED(mapped), level);
+ /* Reset to no block mapped*/
+ if (level > NandEraseDIRTY) {
+ mapped->logicalMappingBlock = -1;
+ mapped->mappingModified = 0;
+ for (block=0;
+ block < ManagedNandFlash_GetDeviceSizeInBlocks(MANAGED(mapped));
+ block++) {
+ mapped->logicalMapping[block] = -1;
+ }
+ }
+ return 0;
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/NandFlashDma.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/NandFlashDma.c
new file mode 100644
index 0000000..3f237fb
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/NandFlashDma.c
@@ -0,0 +1,190 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2011, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+ * \file
+ *
+ * Implementation of Nandflash dma driver.
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "memories.h"
+
+#include "NandFlashDma.h"
+/*----------------------------------------------------------------------------
+ * Local Variables
+ *----------------------------------------------------------------------------*/
+
+/** Current initialized sDmad instance*/
+static sDmad *pCurrentDma = 0;
+
+/* DMA driver instance */
+static uint32_t nandDmaRxChannel;
+static uint32_t nandDmaTxChannel;
+
+/* Linked lists for single transfer buffer chaining structure instance. */
+static sDmaTransferDescriptor dmaNandRxDesc;
+static sDmaTransferDescriptor dmaNandTxDesc;
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+/**
+ * \brief Configure the DMA Channels.
+ * Channels are disabled after configure.
+ * \returns 0 if the dma channel configuration successfully; otherwise returns
+ * NandCommon_ERROR_XXX.
+ */
+uint8_t NandFlashConfigureDmaChannels( sDmad *pDmad )
+{
+ uint32_t dwCfg;
+ /* Configure the allocated DMA channel. */
+ dwCfg = 0
+ | DMAC_CFG_SRC_PER( 0 )
+ | DMAC_CFG_DST_PER( 0 )
+ | DMAC_CFG_FIFOCFG_HALF_CFG;
+
+ /* Allocate a DMA channel for NAND RX. */
+ nandDmaRxChannel = DMAD_AllocateChannel( pDmad, DMA_TRANSFER_MEMORY, DMA_TRANSFER_MEMORY);
+ {
+ if ( nandDmaRxChannel == DMA_ALLOC_FAILED )
+ {
+ return NandCommon_ERROR_DMA;
+ }
+ }
+
+ if (DMAD_PrepareChannel( pDmad, nandDmaRxChannel, dwCfg )) return NandCommon_ERROR_DMA;
+ dmaNandRxDesc.dwSrcAddr = 0;
+ dmaNandRxDesc.dwDstAddr = 0;
+ dmaNandRxDesc.dwCtrlA = 0;
+ dmaNandRxDesc.dwCtrlB = DMAC_CTRLB_SRC_DSCR | DMAC_CTRLB_DST_DSCR
+ | DMAC_CTRLB_FC_MEM2MEM_DMA_FC
+ | DMAC_CTRLB_DST_INCR_INCREMENTING | DMAC_CTRLB_DST_INCR_INCREMENTING;
+ if (DMAD_PrepareSingleTransfer( pDmad, nandDmaRxChannel, &dmaNandRxDesc )) return NandCommon_ERROR_DMA;
+
+
+ /* Allocate a DMA channel for NAND TX. */
+ nandDmaTxChannel = DMAD_AllocateChannel( pDmad, DMA_TRANSFER_MEMORY, DMA_TRANSFER_MEMORY);
+ {
+ if ( nandDmaTxChannel == DMA_ALLOC_FAILED )
+ {
+ return NandCommon_ERROR_DMA;
+ }
+ }
+ if (DMAD_PrepareChannel( pDmad, nandDmaTxChannel, dwCfg )) return NandCommon_ERROR_DMA;
+ dmaNandTxDesc.dwSrcAddr = 0;
+ dmaNandTxDesc.dwDstAddr = 0;
+ dmaNandTxDesc.dwCtrlA = 0;
+ dmaNandTxDesc.dwCtrlB = DMAC_CTRLB_SRC_DSCR | DMAC_CTRLB_DST_DSCR
+ | DMAC_CTRLB_FC_MEM2MEM_DMA_FC
+ | DMAC_CTRLB_SRC_INCR_INCREMENTING | DMAC_CTRLB_SRC_INCR_INCREMENTING;
+ if (DMAD_PrepareSingleTransfer( pDmad, nandDmaTxChannel, &dmaNandTxDesc )) return NandCommon_ERROR_DMA;
+ pCurrentDma = pDmad;
+ return 0;
+}
+
+/**
+ * \brief Configure the DMA Channels for Tx.
+ * \param dwNfcAddr Destination nand flash controller address.
+ * \param dwRamAddr Source address to be transfered.
+ * \param dwSize Transfer size in byte.
+ * \returns 0 if the dma channel configuration and transfer successfully; otherwise returns
+ * NandCommon_ERROR_XXX.
+ */
+uint8_t NandFlashDmaTransferRam2Nand( uint32_t dwNfcAddr,uint32_t dwRamAddr, uint32_t dwSize )
+{
+ if (!pCurrentDma)
+ return NandCommon_ERROR_DMA;
+
+ dmaNandTxDesc.dwSrcAddr = dwRamAddr;
+ dmaNandTxDesc.dwDstAddr = (uint32_t) dwNfcAddr;
+ dmaNandTxDesc.dwCtrlA = ((dwSize + 3) >> 2) | DMAC_CTRLA_SRC_WIDTH_WORD | DMAC_CTRLA_DST_WIDTH_WORD;
+
+ if (DMAD_PrepareSingleTransfer( pCurrentDma, nandDmaTxChannel, &dmaNandTxDesc ))
+ return NandCommon_ERROR_DMA;
+
+ if (DMAD_StartTransfer( pCurrentDma, nandDmaTxChannel ))
+ return NandCommon_ERROR_DMA;
+
+ while (DMAD_IsTransferDone( pCurrentDma, nandDmaTxChannel ));
+
+ return 0;
+}
+
+/**
+ * \brief Configure the DMA Channels for Rx.
+ * \param dwNfcAddr Source nandflash controller address.
+ * \param dwRamAddr Destination address to be transfered.
+ * \param dwSize Transfer size in byte.
+ * \returns 0 if the dma channel configuration and transfer successfully; otherwise returns
+ * NandCommon_ERROR_XXX.
+ */
+uint8_t NandFlashDmaTransferNand2Ram( uint32_t dwNfcAddr, uint32_t dwRamAddr, uint32_t dwSize )
+{
+ if (!pCurrentDma)
+ return NandCommon_ERROR_DMA;
+
+ dmaNandRxDesc.dwSrcAddr = dwNfcAddr;
+ dmaNandRxDesc.dwDstAddr = dwRamAddr;
+ dmaNandRxDesc.dwCtrlA = ((dwSize + 3) >> 2) | DMAC_CTRLA_SRC_WIDTH_WORD | DMAC_CTRLA_DST_WIDTH_WORD;
+
+ if (DMAD_PrepareSingleTransfer( pCurrentDma, nandDmaRxChannel, &dmaNandRxDesc ))
+ return NandCommon_ERROR_DMA;
+
+ if (DMAD_StartTransfer( pCurrentDma, nandDmaRxChannel ))
+ return NandCommon_ERROR_DMA;
+
+ while (DMAD_IsTransferDone( pCurrentDma, nandDmaRxChannel ));
+
+ return 0;
+}
+
+/**
+ * \brief Return DMA flag: 1: Actived 0: inactive.
+ */
+uint8_t NandFlashIsDmaActived( void )
+{
+ if (pCurrentDma) return 1;
+ return 0;
+}
+
+/**
+ * \brief Free the nand DMA Rx and Tx channel.
+ * \param pDmad Pointer to a Dmad instance.
+ */
+void NandFlashFreeDma( void )
+{
+ if (!pCurrentDma) return; /* already free */
+ while(DMAD_FreeChannel( pCurrentDma, nandDmaRxChannel ));
+ while(DMAD_FreeChannel( pCurrentDma, nandDmaTxChannel ));
+ pCurrentDma = 0;
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/NandFlashModel.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/NandFlashModel.c
new file mode 100644
index 0000000..14b79d1
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/NandFlashModel.c
@@ -0,0 +1,418 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+ * \file
+ *
+ * Implementation of Nand flash model related functions.
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "memories.h"
+
+#include <string.h>
+
+/*----------------------------------------------------------------------------
+ * Local funtion
+ *----------------------------------------------------------------------------*/
+/**
+ * \brief Get the power of input, given a certain result, i.e. input^(power) = result.
+ *
+ * \param result a certain output we want to calculate.
+ * \param input the input of the power.
+ * \return the value of "power" if succesfully find the power.
+ */
+#if defined(OP_BOOTSTRAP_on)
+uint32_t CALPOW(uint32_t result, uint32_t input)
+{
+ uint32_t i=0;
+
+ while(i<32)
+ {
+ if(result == (input << i))
+ return i;
+ i++;
+ }
+
+ return 0;
+}
+#endif
+
+/**
+ * \brief Get the interger part of input, given a certain result, i.e. return = result / input.
+ *
+ * \param result a certain output we want to calculate.
+ * \param input the input of the division.
+ * \return the value of interger part of the result/input.
+ */
+#if defined(OP_BOOTSTRAP_on)
+uint32_t CALINT(uint32_t result, uint32_t input)
+{
+ uint32_t i=0;
+ uint32_t tmpInput=0;
+
+ while(1)
+ {
+ tmpInput +=input;
+ i++;
+ if(tmpInput == result)
+ return i;
+ else if (tmpInput > result)
+ return (i-1);
+ }
+
+}
+#endif
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Looks for a NandFlashModel corresponding to the given ID inside a list of
+ * model. If found, the model variable is filled with the correct values.
+ *
+ * \param modelList List of NandFlashModel instances.
+ * \param size Number of models in list.
+ * \param chipId Identifier returned by the Nand(id1|(id2<<8)|(id3<<16)|(id4<<24)).
+ * \param model NandFlashModel instance to update with the model parameters.
+ * \return 0 if a matching model has been found; otherwise returns NandCommon_ERROR_UNKNOWNMODEL.
+ */
+uint8_t NandFlashModel_Find(
+ const struct NandFlashModel *modelList,
+ uint32_t size,
+ uint32_t chipId,
+ struct NandFlashModel *model)
+{
+ uint8_t found = 0, id2, id4;
+ uint32_t i;
+ #if defined(CHIP_NAND_CTRL)
+ uint8_t pageSize = 0;
+ #endif
+ id2 = (uint8_t)(chipId>>8);
+ id4 = (uint8_t)(chipId>>24);
+
+ TRACE_INFO("Nandflash ID is 0x%08X\n\r", chipId);
+
+ for(i=0; i<size; i++) {
+ if(modelList[i].deviceId == id2) {
+ found = 1;
+
+ if(model) {
+
+ memcpy(model, &modelList[i], sizeof(struct NandFlashModel));
+
+ if(model->blockSizeInKBytes == 0 || model->pageSizeInBytes == 0) {
+ TRACE_DEBUG("Fetch from ID4(0x%.2x):\r\n", id4);
+ /* Fetch from the extended ID4
+ ID4 D5 D4 BlockSize || D1 D0 PageSize
+ 0 0 64K || 0 0 1K
+ 0 1 128K || 0 1 2K
+ 1 0 256K || 1 0 4K
+ 1 1 512K || 1 1 8k */
+ #if !defined(OP_BOOTSTRAP_on)
+ switch(id4 & 0x03) {
+ case 0x00: model->pageSizeInBytes = 1024; break;
+ case 0x01: model->pageSizeInBytes = 2048; break;
+ case 0x02: model->pageSizeInBytes = 4096; break;
+ case 0x03: model->pageSizeInBytes = 8192; break;
+ }
+ switch(id4 & 0x30) {
+ case 0x00: model->blockSizeInKBytes = 64; break;
+ case 0x10: model->blockSizeInKBytes = 128; break;
+ case 0x20: model->blockSizeInKBytes = 256; break;
+ case 0x30: model->blockSizeInKBytes = 512; break;
+ }
+ #else
+ model->pageSizeInBytes = 1024 << (id4 & 0x03);
+ model->blockSizeInKBytes = (64) << ((id4 & 0x30) >>4);
+ #endif
+ }
+ #if defined(CHIP_NAND_CTRL)
+ switch(model->pageSizeInBytes) {
+ case 512: pageSize = SMC_CFG_PAGESIZE_PS512_16; break;
+ case 1024: pageSize = SMC_CFG_PAGESIZE_PS1024_32; break;
+ case 2048: pageSize = SMC_CFG_PAGESIZE_PS2048_64; break;
+ case 4096: pageSize = SMC_CFG_PAGESIZE_PS4096_128; break;
+ default: TRACE_ERROR("Unsupportted page size for NAND Flash Controller\n\r");
+ }
+ SMC_NFC_Configure(SMC, pageSize | SMC_CFG_DTOMUL_X1048576 | SMC_CFG_EDGECTRL |
+ SMC_CFG_DTOCYC(0xF) | SMC_CFG_RSPARE);
+ #endif
+ }
+ TRACE_DEBUG("NAND Model found:\r\n");
+ TRACE_DEBUG(" * deviceId = 0x%02X\r\n", model->deviceId);
+ TRACE_DEBUG(" * deviceSizeInMegaBytes = %d\r\n", model->deviceSizeInMegaBytes);
+ TRACE_DEBUG(" * blockSizeInkBytes = %d\r\n", model->blockSizeInKBytes);
+ TRACE_DEBUG(" * pageSizeInBytes = %d\r\n", model->pageSizeInBytes);
+ TRACE_DEBUG(" * options = 0x%02X\r\n", model->options);
+ break;
+ }
+ }
+
+ /* Check if chip has been detected */
+ if (found) {
+
+ return 0;
+ }
+ else {
+
+ return NandCommon_ERROR_UNKNOWNMODEL;
+ }
+}
+
+/**
+ * \brief Translates address/size access of a NandFlashModel to block, page and offset values.
+ *
+ * \param modelList List of NandFlashModel instances.
+ * \param address Access address.
+ * \param size Access size in bytes.
+ * \param block Stores the first accessed block number.
+ * \param page Stores the first accessed page number inside the first block.
+ * \param offset Stores the byte offset inside the first accessed page.
+ * \return 0 if the access is correct; otherwise returns NandCommon_ERROR_OUTOFBOUNDS.
+ * \note The values are stored in the provided variables if their pointer is not 0.
+ */
+uint8_t NandFlashModel_TranslateAccess(
+ const struct NandFlashModel *model,
+ uint32_t address,
+ uint32_t size,
+ uint16_t *block,
+ uint16_t *page,
+ uint16_t *offset)
+{
+ /* Check that access is not too big */
+ #if !defined(OP_BOOTSTRAP_on)
+ if ((address + size) > NandFlashModel_GetDeviceSizeInBytes(model)) {
+
+ TRACE_DEBUG("NandFlashModel_TranslateAccess: out-of-bounds access.\n\r");
+ return NandCommon_ERROR_OUTOFBOUNDS;
+ }
+ #endif
+
+ /* Get Nand info */
+ uint32_t blockSize = NandFlashModel_GetBlockSizeInBytes(model);
+ uint32_t pageSize = NandFlashModel_GetPageDataSize(model);
+
+ /* Translate address*/
+ #if !defined(OP_BOOTSTRAP_on)
+ uint16_t tmpBlock = address / blockSize;
+ address -= tmpBlock * blockSize;
+ uint16_t tmpPage = address / pageSize;
+ address -= tmpPage * pageSize;
+ uint16_t tmpOffset = address;
+ #else
+ uint16_t tmpBlock = CALINT(address, blockSize);
+ address -= tmpBlock * blockSize;
+ uint16_t tmpPage = CALINT(address, pageSize);
+ address -= tmpPage * pageSize;
+ uint16_t tmpOffset= address;
+ #endif
+
+ /* Save results */
+ if (block) {
+
+ *block = tmpBlock;
+ }
+ if (page) {
+
+ *page = tmpPage;
+ }
+ if (offset) {
+
+ *offset = tmpOffset;
+ }
+
+ return 0;
+}
+
+
+/**
+ * \brief Returns the spare area placement scheme used by a particular nandflash model.
+ *
+ * \param model Pointer to a NandFlashModel instance.
+ */
+const struct NandSpareScheme * NandFlashModel_GetScheme(
+ const struct NandFlashModel *model)
+{
+ return model->scheme;
+}
+
+/**
+ * \brief Returns the device ID of a particular NandFlash model.
+ *
+ * \param model Pointer to a NandFlashModel instance.
+ */
+uint8_t NandFlashModel_GetDeviceId(
+ const struct NandFlashModel *model)
+{
+ return model->deviceId;
+}
+
+/**
+ * \brief Returns the number of blocks in the entire device.
+ *
+ * \param model Pointer to a NandFlashModel instance.
+ */
+uint16_t NandFlashModel_GetDeviceSizeInBlocks(
+ const struct NandFlashModel *model)
+{
+ #if !defined(OP_BOOTSTRAP_on)
+ return ((1024) / model->blockSizeInKBytes) * model->deviceSizeInMegaBytes;
+ #else
+ uint32_t pow;
+ pow = CALPOW((1024 * model->deviceSizeInMegaBytes), model->blockSizeInKBytes);
+ return (0x1 << pow);
+ #endif
+}
+
+/**
+ * \brief Returns the number of pages in the entire device.
+ *
+ * \param model Pointer to a NandFlashModel instance.
+ */
+uint32_t NandFlashModel_GetDeviceSizeInPages(
+ const struct NandFlashModel *model)
+{
+ return (uint32_t) NandFlashModel_GetDeviceSizeInBlocks(model) //* 8 // HACK
+ * NandFlashModel_GetBlockSizeInPages(model);
+}
+
+/**
+ * \brief Returns the size of the whole device in bytes (this does not include the
+ * size of the spare zones).
+ *
+ * \param model Pointer to a NandFlashModel instance.
+ */
+unsigned long long NandFlashModel_GetDeviceSizeInBytes(
+ const struct NandFlashModel *model)
+{
+ return ((unsigned long long) model->deviceSizeInMegaBytes) << 20;
+}
+
+/**
+ * \brief Returns the size of the whole device in Mega bytes (this does not include the
+ * size of the spare zones).
+ *
+ * \param model Pointer to a NandFlashModel instance.
+ */
+uint32_t NandFlashModel_GetDeviceSizeInMBytes(
+ const struct NandFlashModel *model)
+{
+ return ((uint32_t) model->deviceSizeInMegaBytes);
+}
+
+/**
+ * \brief Returns the number of pages in one single block of a device.
+ *
+ * \param model Pointer to a NandFlashModel instance.
+ */
+uint16_t NandFlashModel_GetBlockSizeInPages(
+ const struct NandFlashModel *model)
+{
+ #if !defined(OP_BOOTSTRAP_on)
+ return model->blockSizeInKBytes * 1024 / model->pageSizeInBytes;
+ #else
+ uint32_t pow;
+ pow = CALPOW((model->blockSizeInKBytes * 1024), model->pageSizeInBytes);
+ return (0x1 << pow);
+ #endif
+}
+
+/**
+ * \brief Returns the size in bytes of one single block of a device. This does not
+ * take into account the spare zones size.
+ *
+ * \param model Pointer to a NandFlashModel instance.
+ */
+uint32_t NandFlashModel_GetBlockSizeInBytes(
+ const struct NandFlashModel *model)
+{
+ return (model->blockSizeInKBytes *1024);
+}
+
+/**
+ * \brief Returns the size of the data area of a page in bytes.
+ * take into account the spare zones size.
+ *
+ * \param model Pointer to a NandFlashModel instance.
+ */
+uint16_t NandFlashModel_GetPageDataSize(
+ const struct NandFlashModel *model)
+{
+ return model->pageSizeInBytes;
+}
+
+/**
+ * \brief Returns the size of the spare area of a page in bytes.
+ *
+ * \param model Pointer to a NandFlashModel instance.
+ */
+uint8_t NandFlashModel_GetPageSpareSize(
+ const struct NandFlashModel *model)
+{
+ return (model->pageSizeInBytes>>5); /* Spare size is 16/512 of data size */
+}
+
+/**
+ * \brief Returns the number of bits used by the data bus of a NandFlash device.
+ *
+ * \param model Pointer to a NandFlashModel instance.
+ */
+uint8_t NandFlashModel_GetDataBusWidth(
+ const struct NandFlashModel *model)
+{
+ return (model->options&NandFlashModel_DATABUS16)? 16: 8;
+}
+
+/**
+ * \brief Check if the given NandFlash model uses the "small blocks/pages"
+ *
+ * \param model Pointer to a NandFlashModel instance.
+ * \return 1 if the model uses the "small blocks/pages"; otherwise return 0.
+ */
+uint8_t NandFlashModel_HasSmallBlocks(
+ const struct NandFlashModel *model)
+{
+ return (model->pageSizeInBytes <= 512 )? 1: 0;
+}
+
+/**
+ * \brief Check if if the device supports the copy-back operation.
+ *
+ * \param model Pointer to a NandFlashModel instance.
+ * \return 1 if the model supports the copy-back operation; otherwise return 0.
+ */
+uint8_t NandFlashModel_SupportsCopyBack(
+ const struct NandFlashModel *model)
+{
+ return ((model->options & NandFlashModel_COPYBACK) != 0);
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/NandFlashModelList.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/NandFlashModelList.c
new file mode 100644
index 0000000..f2ffe81
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/NandFlashModelList.c
@@ -0,0 +1,124 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * Static array of the various NandFlashModels which are supported.
+ *
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "memories.h"
+
+/*----------------------------------------------------------------------------
+ * Exported variables
+ *----------------------------------------------------------------------------*/
+
+/** List of NandFlash models which can be recognized by the software.*/
+const struct NandFlashModel nandFlashModelList[NandFlashModelList_SIZE] = {
+
+/* | ID | Options | Page | Mo | Block |BlkPg |DevBlk */
+ {0x6e, NandFlashModel_DATABUS8, 256, 1, 4, &nandSpareScheme256},
+ {0x64, NandFlashModel_DATABUS8, 256, 2, 4, &nandSpareScheme256},
+ {0x6b, NandFlashModel_DATABUS8, 512, 4, 8, &nandSpareScheme512},
+ {0xe8, NandFlashModel_DATABUS8, 256, 1, 4, &nandSpareScheme256},
+ {0xec, NandFlashModel_DATABUS8, 256, 1, 4, &nandSpareScheme256},
+ {0xea, NandFlashModel_DATABUS8, 256, 2, 4, &nandSpareScheme256},
+ {0xd5, NandFlashModel_DATABUS8, 512, 4, 8, &nandSpareScheme512},
+ {0xe3, NandFlashModel_DATABUS8, 512, 4, 8, &nandSpareScheme512},
+ {0xe5, NandFlashModel_DATABUS8, 512, 4, 8, &nandSpareScheme512},
+ {0xd6, NandFlashModel_DATABUS8, 512, 8, 8, &nandSpareScheme512},
+
+ {0x39, NandFlashModel_DATABUS8, 512, 8, 8, &nandSpareScheme512},
+ {0xe6, NandFlashModel_DATABUS8, 512, 8, 8, &nandSpareScheme512},
+ {0x49, NandFlashModel_DATABUS16, 512, 8, 8, &nandSpareScheme512},
+ {0x59, NandFlashModel_DATABUS16, 512, 8, 8, &nandSpareScheme512},
+
+ {0x33, NandFlashModel_DATABUS8, 512, 16, 16, &nandSpareScheme512},
+ {0x73, NandFlashModel_DATABUS8, 512, 16, 16, &nandSpareScheme512},
+ {0x43, NandFlashModel_DATABUS16, 512, 16, 16, &nandSpareScheme512},
+ {0x53, NandFlashModel_DATABUS16, 512, 16, 16, &nandSpareScheme512},
+
+ {0x35, NandFlashModel_DATABUS8, 512, 32, 16, &nandSpareScheme512},
+ {0x75, NandFlashModel_DATABUS8, 512, 32, 16, &nandSpareScheme512},
+ {0x45, NandFlashModel_DATABUS16, 512, 32, 16, &nandSpareScheme512},
+ {0x55, NandFlashModel_DATABUS16, 512, 32, 16, &nandSpareScheme512},
+
+ {0x36, NandFlashModel_DATABUS8, 512, 64, 16, &nandSpareScheme512},
+ {0x76, NandFlashModel_DATABUS8, 512, 64, 16, &nandSpareScheme512},
+ {0x46, NandFlashModel_DATABUS16, 512, 64, 16, &nandSpareScheme512},
+ {0x56, NandFlashModel_DATABUS16, 512, 64, 16, &nandSpareScheme512},
+
+ {0x78, NandFlashModel_DATABUS8, 512, 128, 16, &nandSpareScheme512},
+ {0x39, NandFlashModel_DATABUS8, 512, 128, 16, &nandSpareScheme512},
+ {0x79, NandFlashModel_DATABUS8, 512, 128, 16, &nandSpareScheme512},
+ {0x72, NandFlashModel_DATABUS16, 512, 128, 16, &nandSpareScheme512},
+ {0x49, NandFlashModel_DATABUS16, 512, 128, 16, &nandSpareScheme512},
+ {0x74, NandFlashModel_DATABUS16, 512, 128, 16, &nandSpareScheme512},
+ {0x59, NandFlashModel_DATABUS16, 512, 128, 16, &nandSpareScheme512},
+
+ {0x71, NandFlashModel_DATABUS8, 512, 256, 16, &nandSpareScheme512},
+
+/* Large blocks devices. Parameters must be fetched from the extended I */
+#define OPTIONS NandFlashModel_COPYBACK
+
+ {0xA2, NandFlashModel_DATABUS8 | OPTIONS, 0, 64, 0, &nandSpareScheme2048},
+ {0xF2, NandFlashModel_DATABUS8 | OPTIONS, 0, 64, 0, &nandSpareScheme2048},
+ {0xB2, NandFlashModel_DATABUS16 | OPTIONS, 0, 64, 0, &nandSpareScheme2048},
+ {0xC2, NandFlashModel_DATABUS16 | OPTIONS, 0, 64, 0, &nandSpareScheme2048},
+
+ {0xA1, NandFlashModel_DATABUS8 | OPTIONS, 0, 128, 0, &nandSpareScheme2048},
+ {0xF1, NandFlashModel_DATABUS8 | OPTIONS, 0, 128, 0, &nandSpareScheme2048},
+ {0xB1, NandFlashModel_DATABUS16 | OPTIONS, 0, 128, 0, &nandSpareScheme2048},
+ {0xC1, NandFlashModel_DATABUS16 | OPTIONS, 0, 128, 0, &nandSpareScheme2048},
+
+ {0xAA, NandFlashModel_DATABUS8 | OPTIONS, 0, 256, 0, &nandSpareScheme2048},
+ {0xDA, NandFlashModel_DATABUS8 | OPTIONS, 0, 256, 0, &nandSpareScheme2048},
+ {0xBA, NandFlashModel_DATABUS16 | OPTIONS, 0, 256, 0, &nandSpareScheme2048},
+ {0xCA, NandFlashModel_DATABUS16 | OPTIONS, 0, 256, 0, &nandSpareScheme2048},
+
+ {0xAC, NandFlashModel_DATABUS8 | OPTIONS, 0, 512, 0, &nandSpareScheme2048},
+ {0xDC, NandFlashModel_DATABUS8 | OPTIONS, 0, 512, 0, &nandSpareScheme2048},
+ {0xBC, NandFlashModel_DATABUS16 | OPTIONS, 0, 512, 0, &nandSpareScheme2048},
+ {0xCC, NandFlashModel_DATABUS16 | OPTIONS, 0, 512, 0, &nandSpareScheme2048},
+
+ {0xA3, NandFlashModel_DATABUS8 | OPTIONS, 0, 1024, 0, &nandSpareScheme2048},
+ {0xD3, NandFlashModel_DATABUS8 | OPTIONS, 0, 1024, 0, &nandSpareScheme2048},
+ {0xB3, NandFlashModel_DATABUS16 | OPTIONS, 0, 1024, 0, &nandSpareScheme2048},
+ {0xC3, NandFlashModel_DATABUS16 | OPTIONS, 0, 1024, 0, &nandSpareScheme2048},
+
+ {0xA5, NandFlashModel_DATABUS8 | OPTIONS, 0, 2048, 0, &nandSpareScheme2048},
+ {0xD5, NandFlashModel_DATABUS8 | OPTIONS, 0, 2048, 0, &nandSpareScheme2048},
+ {0xB5, NandFlashModel_DATABUS16 | OPTIONS, 0, 2048, 0, &nandSpareScheme2048},
+ {0xC5, NandFlashModel_DATABUS16 | OPTIONS, 0, 2048, 0, &nandSpareScheme2048},
+};
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/NandSpareScheme.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/NandSpareScheme.c
new file mode 100644
index 0000000..4c167cd
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/NandSpareScheme.c
@@ -0,0 +1,249 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * NandSpareScheme layer is used to do Nandflash device's spare area operations.
+ * It is called by upper layer drivers, such as SkipBlockNandFlash layer.
+ *
+ * -# NandSpareScheme_WriteBadBlockMarker is used to mark a badblock marker inside a spare
+ * area.
+ * -# NandSpareScheme_ReadBadBlockMarker is used to readout the marker.
+ * -# NandSpareScheme_ReadEcc is used to read out ecc from spare area using the provided
+ * spare scheme.
+ * -# NandSpareScheme_WriteEcc is used to write ecc to spare area using the provided
+ * spare scheme.
+ * -# NandSpareScheme_ReadExtra is used to read extra bytes from spare area using the provided
+ * spare scheme.
+ * -# NandSpareScheme_WriteExtra is used to write extra bytes to spare area using the provided
+ * spare scheme.
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "memories.h"
+#include <assert.h>
+
+/*----------------------------------------------------------------------------
+ * Exported variables
+ *----------------------------------------------------------------------------*/
+
+/** Spare area placement scheme for 256 byte pages.*/
+const struct NandSpareScheme nandSpareScheme256 = {
+
+ /* Bad block marker is at position #5*/
+ 5,
+ /* 3 ecc bytes*/
+ 3,
+ /* Ecc bytes positions*/
+ {0, 1, 2},
+ /* 4 extra bytes*/
+ 4,
+ /* Extra bytes positions*/
+ {3, 4, 6, 7}
+};
+
+/** Spare area placement scheme for 512 byte pages.*/
+const struct NandSpareScheme nandSpareScheme512 = {
+
+ /* Bad block marker is at position #5*/
+ 5,
+ /* 6 ecc bytes*/
+ 6,
+ /* Ecc bytes positions*/
+ {0, 1, 2, 3, 6, 7},
+ /* 8 extra bytes*/
+ 8,
+ /* Extra bytes positions*/
+ {8, 9, 10, 11, 12, 13, 14, 15}
+};
+
+/** Spare area placement scheme for 2048 byte pages.*/
+const struct NandSpareScheme nandSpareScheme2048 = {
+
+ /* Bad block marker is at position #0*/
+ 0,
+ /* 24 ecc bytes*/
+ 24,
+ /* Ecc bytes positions*/
+ {40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
+ 58, 59, 60, 61, 62, 63},
+ /* 38 extra bytes*/
+ 38,
+ /* Extra bytes positions*/
+ { 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
+ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39}
+};
+
+/** Spare area placement scheme for 4096 byte pages.*/
+const struct NandSpareScheme nandSpareScheme4096 = {
+
+ /* Bad block marker is at position #0*/
+ 0,
+ /* 48 ecc bytes*/
+ 48,
+ /* Ecc bytes positions*/
+ { 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
+ 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
+ 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, 126, 127},
+ /* 78 extra bytes*/
+ 78,
+ /* Extra bytes positions*/
+ { 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
+ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
+ 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
+ 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
+ 78, 79}
+};
+
+
+/*----------------------------------------------------------------------------
+ * Exported fumction
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Reads the bad block marker inside a spare area buffer using the provided
+ *
+ * \param scheme Pointer to a NandSpareScheme instance.
+ * \param spare Spare area buffer.
+ * \param marker Pointer to the variable to store the bad block marker.
+ */
+void NandSpareScheme_ReadBadBlockMarker(
+ const struct NandSpareScheme *scheme,
+ const uint8_t *spare,
+ uint8_t *marker)
+{
+ *marker = spare[scheme->badBlockMarkerPosition];
+}
+
+/**
+ * \brief Modifies the bad block marker inside a spare area, using the given scheme.
+ *
+ * \param scheme Pointer to a NandSpareScheme instance.
+ * \param spare Spare area buffer.
+ * \param marker Bad block marker to write.
+ */
+void NandSpareScheme_WriteBadBlockMarker(
+ const struct NandSpareScheme *scheme,
+ uint8_t *spare,
+ uint8_t marker)
+{
+ spare[scheme->badBlockMarkerPosition] = marker;
+}
+
+/**
+ * \brief Reads ECC information from a spare area using the provided scheme.
+ *
+ * \param scheme Pointer to a NandSpareScheme instance.
+ * \param spare Spare area buffer.
+ * \param ecc ECC buffer.
+ */
+void NandSpareScheme_ReadEcc(
+ const struct NandSpareScheme *scheme,
+ const uint8_t *spare,
+ uint8_t *ecc)
+{
+ uint32_t i;
+ for (i=0; i < scheme->numEccBytes; i++) {
+
+ ecc[i] = spare[scheme->eccBytesPositions[i]];
+ }
+}
+
+/**
+ * \brief Writes ECC information in a spare area, using a particular scheme.
+ *
+ * \param scheme Pointer to a NandSpareScheme instance.
+ * \param spare Spare area buffer.
+ * \param ecc ECC buffer.
+ */
+void NandSpareScheme_WriteEcc(
+ const struct NandSpareScheme *scheme,
+ uint8_t *spare,
+ const uint8_t *ecc)
+{
+ uint32_t i;
+ for (i=0; i < scheme->numEccBytes; i++) {
+
+ spare[scheme->eccBytesPositions[i]] = ecc[i];
+ }
+}
+/**
+ * \brief Reads extra bytes of information from a spare area, using the provided
+ * scheme.
+ * \param scheme Pointer to a NandSpareScheme instance.
+ * \param spare Spare area buffer.
+ * \param extra Extra bytes buffer.
+ * \param size Number of extra bytes to read.
+ * \param offset Index where to read the first extra byte.
+ */
+void NandSpareScheme_ReadExtra(
+ const struct NandSpareScheme *scheme,
+ const uint8_t *spare,
+ void *extra,
+ uint8_t size,
+ uint8_t offset)
+{
+ assert( (size + offset) < scheme->numExtraBytes ) ; /* "NandSpareScheme_ReadExtra: Too many bytes\n\r" */
+
+ uint32_t i;
+ for (i=0; i < size; i++) {
+
+ ((uint8_t *) extra)[i] = spare[scheme->extraBytesPositions[i+offset]];
+ }
+}
+/**
+ * \brief Write extra bytes of information from a spare area, using the provided
+ * scheme.
+ * \param scheme Pointer to a NandSpareScheme instance.
+ * \param spare Spare area buffer.
+ * \param extra Extra bytes buffer to write.
+ * \param size Number of extra bytes to write.
+ * \param offset Index where to read the first extra byte.
+ */
+void NandSpareScheme_WriteExtra(
+ const struct NandSpareScheme *scheme,
+ uint8_t *spare,
+ const void *extra,
+ uint8_t size,
+ uint8_t offset)
+{
+ assert( (size + offset) < scheme->numExtraBytes ) ; /* "NandSpareScheme_WriteExtra: Too many bytes\n\r" */
+
+ uint32_t i;
+ for (i=0; i < size; i++) {
+
+ spare[scheme->extraBytesPositions[i+offset]] = ((uint8_t *) extra)[i];
+ }
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/NfcRawNandFlash.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/NfcRawNandFlash.c
new file mode 100644
index 0000000..9df65ef
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/NfcRawNandFlash.c
@@ -0,0 +1,876 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * Hardware low level layer Nandflash driver with NFC.
+ *
+ */
+
+#define DMA_TRANSFER
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "memories.h"
+
+#include <assert.h>
+#include <string.h>
+
+#if defined(CHIP_NAND_CTRL)
+
+/*----------------------------------------------------------------------------
+ * Internal definitions
+ *----------------------------------------------------------------------------*/
+
+#ifndef BOARD_NF_CSID
+/** NFC chip select ID definition */
+#define BOARD_NF_CSID NFCADDR_CMD_CSID_0
+#endif
+
+/** Nand flash chip status codes */
+#define STATUS_READY (1 << 6)
+#define STATUS_ERROR (1 << 0)
+
+/** Nand flash commands*/
+#define COMMAND_READ_1 0x00
+#define COMMAND_READ_2 0x30
+#define COMMAND_COPYBACK_READ_1 0x00
+#define COMMAND_COPYBACK_READ_2 0x35
+#define COMMAND_COPYBACK_PROGRAM_1 0x85
+#define COMMAND_COPYBACK_PROGRAM_2 0x10
+#define COMMAND_RANDOM_OUT 0x05
+#define COMMAND_RANDOM_OUT_2 0xE0
+#define COMMAND_RANDOM_IN 0x85
+#define COMMAND_READID 0x90
+#define COMMAND_WRITE_1 0x80
+#define COMMAND_WRITE_2 0x10
+#define COMMAND_ERASE_1 0x60
+#define COMMAND_ERASE_2 0xD0
+#define COMMAND_STATUS 0x70
+#define COMMAND_RESET 0xFF
+
+
+/** Nand flash commands (small blocks)*/
+#define COMMAND_READ_A 0x00
+#define COMMAND_READ_C 0x50
+
+
+/*----------------------------------------------------------------------------
+ * Internal Macros
+ *----------------------------------------------------------------------------*/
+#define READ_DATA8(raw) \
+ (*((volatile uint8_t *) raw->dataAddress))
+#define READ_DATA16(raw) \
+ (*((volatile uint16_t *) raw->dataAddress))
+
+/** Internal cast macros*/
+#define MODEL(raw) ((struct NandFlashModel *) raw)
+
+/** Number of tries for erasing a block*/
+#define NUMERASETRIES 2
+/** Number of tries for writing a block*/
+#define NUMWRITETRIES 2
+/** Number of tries for copying a block*/
+#define NUMCOPYTRIES 2
+
+
+/*----------------------------------------------------------------------------
+ * Internal functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Translates the given column and row address into first and other (1-4) address
+ * cycles. The resulting values are stored in the provided variables if they are not null.
+ * \param columnAddress Column address to translate.
+ * \param rowAddress Row address to translate.
+ * \param pAddressCycle0 First address cycle.
+ * \param pAddressCycle1234 four address cycles.
+ */
+static void NFC_TranslateAddress(
+ const struct RawNandFlash *raw,
+ uint16_t columnAddress,
+ uint32_t rowAddress,
+ uint32_t *pAddressCycle0,
+ uint32_t *pAddressCycle1234,
+ uint8_t useFiveAddress)
+{
+ uint16_t pageDataSize = NandFlashModel_GetPageDataSize(MODEL(raw));
+ uint32_t numPages = NandFlashModel_GetDeviceSizeInPages(MODEL(raw));
+ uint8_t numAddressCycles = 0;
+ uint32_t addressCycle0 = 0;
+ uint32_t addressCycle1234 = 0;
+
+ /* Check the data bus width of the NandFlash */
+ if (NandFlashModel_GetDataBusWidth(MODEL(raw)) == 16) {
+ /* Div 2 is because we address in word and not in byte */
+ columnAddress >>= 1;
+ }
+ /* When 5 address cycle are used.*/
+ if (useFiveAddress) {
+
+ while (pageDataSize > 0) {
+ if (numAddressCycles == 0) {
+ addressCycle0 = (columnAddress & 0xFF);
+ }
+ else {
+ addressCycle1234 |= (columnAddress & 0xFF) << ((numAddressCycles - 1) * 8);
+ }
+ pageDataSize >>= 8;
+ columnAddress >>= 8;
+ numAddressCycles ++;
+ }
+ while (numPages > 0) {
+ if (numAddressCycles == 0) {
+ addressCycle0 = (rowAddress & 0xFF);
+ }
+ else {
+ addressCycle1234 |= (rowAddress & 0xFF) << ((numAddressCycles - 1) * 8);
+ }
+ numPages >>= 8;
+ rowAddress >>= 8;
+ numAddressCycles ++;
+ }
+ }
+ /* When less than 5 address cycle are used.*/
+ else {
+ while (numPages > 0) {
+ addressCycle1234 |= (rowAddress & 0xFF) << ((numAddressCycles) * 8);
+ numPages >>= 8;
+ rowAddress >>= 8;
+ numAddressCycles ++;
+ }
+ }
+ /* Store values*/
+ if (pAddressCycle0) {
+ *pAddressCycle0 = addressCycle0;
+ }
+ if (pAddressCycle1234) {
+ *pAddressCycle1234 = addressCycle1234;
+ }
+ return;
+}
+
+/**
+ * \brief Check if program or erase operation is completed in current operation.
+ * \param columnAddress Column address to translate.
+ * \param raw Pointer to a RawNandFlash instance.
+ */
+static uint8_t IsOperationComplete(const struct RawNandFlash *raw)
+{
+ uint8_t status;
+
+ SMC_NFC_SendCommand(SMC,
+ NFCADDR_CMD_NFCCMD | /* Command.*/
+ 0 | /* NFC read data.*/
+ 0 | /* NFC auto R/W is disabled.*/
+ BOARD_NF_CSID | /* CSID.*/
+ NFCADDR_CMD_ACYCLE_NONE | /* No address cycle.*/
+ (COMMAND_STATUS << 2), /* CMD1 (COMMAND_STATUS).*/
+ 0, /* Dummy address cylce 1,2,3,4.*/
+ 0 /* Dummy address cylce 0.*/
+ );
+ status = READ_DATA8(raw);
+ if (((status & STATUS_READY) != STATUS_READY) || ((status & STATUS_ERROR) != 0)) {
+ return 0;
+ }
+ return 1;
+}
+
+/**
+ * \brief Sends data to the NandFlash chip from the provided buffer.
+ * \param raw Pointer to a RawNandFlash instance.
+ * \param buffer Buffer where the data area will be stored.
+ * \param sramOffset NFC internal sram start offset.
+ * \param size Number of data bytes to send.
+ */
+static void CopyDataToNfcInternalSram(
+ const struct RawNandFlash *raw,
+ uint8_t *data,
+ uint16_t sramOffset,
+ uint16_t size)
+{
+#ifdef DMA_TRANSFER
+ if (NandFlashIsDmaActived())
+ {
+ /* Check the data bus width of the NandFlash */
+ if (NandFlashModel_GetDataBusWidth(MODEL(raw)) == 16)
+ {
+ size >>= 1;
+ NandFlashDmaTransferRam2Nand( (uint32_t )(NFC_SRAM_BASE_ADDRESS + sramOffset),(uint32_t)data, size );
+ }
+ else
+ {
+ NandFlashDmaTransferRam2Nand( (uint32_t )(NFC_SRAM_BASE_ADDRESS + sramOffset),(uint32_t)data, size );
+ }
+ }
+#else
+ uint8_t * pBuffer;
+ uint32_t i;
+ pBuffer = (uint8_t *)(NFC_SRAM_BASE_ADDRESS + sramOffset);
+ for (i = 0; i < size; i++) {
+ *pBuffer++ = *data++;
+ }
+#endif
+}
+
+/**
+ * \brief Sends data to the NandFlash chip from the provided buffer.
+ * \param raw Pointer to a RawNandFlash instance.
+ * \param data Buffer where the data area will be stored.
+ * \param sramOffset NFC internal sram start offset.
+ * \param size Number of data bytes to receive.
+ */
+static void CopyDataFromNfcInternalSram(
+ const struct RawNandFlash *raw,
+ uint8_t *data,
+ uint16_t sramOffset,
+ uint16_t size)
+{
+
+#ifdef DMA_TRANSFER
+if (NandFlashIsDmaActived())
+{
+ /* Check the data bus width of the NandFlash */
+ if (NandFlashModel_GetDataBusWidth(MODEL(raw)) == 16)
+ {
+ size = (size + 1)>> 1;
+ NandFlashDmaTransferNand2Ram( (uint32_t )(NFC_SRAM_BASE_ADDRESS + sramOffset),(uint32_t)data, size );
+ }
+ else
+ {
+ NandFlashDmaTransferNand2Ram( (uint32_t )(NFC_SRAM_BASE_ADDRESS + sramOffset), (uint32_t)data, size );
+ }
+}
+#else
+ uint8_t * pBuffer;
+ uint32_t i;
+ pBuffer = (uint8_t *)(NFC_SRAM_BASE_ADDRESS + sramOffset);
+ for (i = 0; i < size; i++) {
+ *data++ = *pBuffer++;
+ }
+#endif
+}
+
+/**
+ * \brief Erases the specified block of the device.
+ *
+ * \param raw Pointer to a RawNandFlash instance.
+ * \param block Number of the physical block to erase.
+ * \return 0 if successful; otherwise returns an error code.
+ */
+static uint8_t EraseBlock(
+ const struct RawNandFlash *raw,
+ uint16_t block)
+{
+ uint8_t error = 0;
+ uint32_t rowAddress;
+ uint32_t addressCycle1234;
+
+ TRACE_DEBUG("EraseBlock(%d)\r\n", block);
+
+ /* Calculate address used for erase*/
+ rowAddress = block * NandFlashModel_GetBlockSizeInPages(MODEL(raw));
+
+ NFC_TranslateAddress(raw, 0, rowAddress, 0, &addressCycle1234, 0);
+
+ /* Start erase*/
+ SMC_NFC_SendCommand(SMC,
+ NFCADDR_CMD_NFCCMD | /* Command.*/
+ 0 | /* NFC read data.*/
+ 0 | /* NFC auto R/W is disabled.*/
+ BOARD_NF_CSID | /* CSID.*/
+ NFCADDR_CMD_ACYCLE_THREE | /* Number of address cycle.*/
+ NFCADDR_CMD_VCMD2 | /* CMD2 enabled.*/
+ (COMMAND_ERASE_2 << 10) | /* CMD2 (ERASE CONFIRME).*/
+ (COMMAND_ERASE_1 << 2), /* CMD1 (ERASE).*/
+ addressCycle1234, /* Address cylce 1, 2, 3, 4.*/
+ 0 /* Dummy address cylce 0.*/
+ );
+
+ while( !SMC_NFC_isReadyBusy(SMC) );
+ #if !defined (OP_BOOTSTRAP_on)
+ if (!IsOperationComplete(raw)) {
+ TRACE_ERROR(
+ "EraseBlock: Could not erase block %d.\n\r",
+ block);
+ error = NandCommon_ERROR_CANNOTERASE;
+ }
+ #endif
+ return error;
+}
+
+/**
+ * \brief Writes the data and/or the spare area of a page on a NandFlash chip.
+ *
+ * \param raw Pointer to a RawNandFlash instance.
+ * \param block Number of the physical block to erase.
+ * \param page Number of the page to write inside the given block.
+ * \param data Buffer containing the data area.
+ * \param spare Buffer containing the spare area.
+ * \return 0 if successful; otherwise returns an error code.
+ * \note If one of the buffer pointer is 0, the corresponding area is not written.
+ */
+static uint8_t WritePage(
+ const struct RawNandFlash *raw,
+ uint16_t block,
+ uint16_t page,
+ void *data,
+ void *spare)
+{
+
+ uint8_t error = 0;
+ uint32_t pageDataSize = NandFlashModel_GetPageDataSize(MODEL(raw));
+ uint32_t spareDataSize = NandFlashModel_GetPageSpareSize(MODEL(raw));
+ uint32_t rowAddress;
+ uint32_t addressCycle0;
+ uint32_t addressCycle1234;
+
+ TRACE_DEBUG("WritePage(B#%d:P#%d)\r\n", block, page);
+
+ /* Calculate physical address of the page*/
+ rowAddress = block * NandFlashModel_GetBlockSizeInPages(MODEL(raw)) + page;
+ /*
+ if (spare){
+ SMC_NFC_EnableSpareWrite(SMC);
+ }
+ else {
+ SMC_NFC_DisableSpareWrite(SMC);
+ }
+ */
+ /*Note: special case when ECC parity generation.
+ ECC results are available as soon as the counter reaches the end of the main area.
+ But when reach PageSize for an example, it could not generate last ECC_PR, The
+ workaround enable SPARE_WRITE, whatever real spare area write or not.*/
+ SMC_NFC_EnableSpareWrite(SMC);
+
+ /* Write data area if needed*/
+ if (data) {
+ CopyDataToNfcInternalSram(raw, (uint8_t *) data, 0, pageDataSize);
+ if (spare) {
+ CopyDataToNfcInternalSram(raw, (uint8_t *) spare, pageDataSize, spareDataSize);
+ }
+ NFC_TranslateAddress(raw, 0, rowAddress, &addressCycle0, &addressCycle1234, 1);
+ }
+ if (spare && !data) {
+ CopyDataToNfcInternalSram(raw, (uint8_t *) spare, 0, spareDataSize);
+ NFC_TranslateAddress(raw, pageDataSize, rowAddress, &addressCycle0, &addressCycle1234, 1);
+ }
+
+ if (data || spare) {
+ /* Start write operation*/
+ SMC_NFC_SendCommand(SMC,
+ NFCADDR_CMD_NFCCMD | /* Command.*/
+ NFCADDR_CMD_NFCWR | /* NFC write data.*/
+ NFCADDR_CMD_NFCEN | /* NFC auto R/W is enabled.*/
+ BOARD_NF_CSID | /* CSID.*/
+ NFCADDR_CMD_ACYCLE_FIVE | /* Number of address cycle.*/
+ 0 | /* CMD2 disabled.*/
+ 0 | /* CMD2.*/
+ (COMMAND_WRITE_1 << 2), /* CMD1.*/
+ addressCycle1234, /* Address cylce 1, 2, 3, 4.*/
+ addressCycle0 /* Address cylce 0.*/
+ );
+ while( !SMC_NFC_isTransferComplete(SMC));
+
+ SMC_NFC_SendCommand(SMC,
+ NFCADDR_CMD_NFCCMD | /* Command.*/
+ 0 | /* No data Transfer.*/
+ 0 | /* NFC auto R/W is disabled.*/
+ BOARD_NF_CSID | /* CSID.*/
+ NFCADDR_CMD_ACYCLE_NONE | /* No address cycle.*/
+ 0 | /* CMD2 disabled.*/
+ 0 | /* CMD2.*/
+ (COMMAND_WRITE_2 << 2), /* CMD1.*/
+ 0, /* Dummy address cylce 1, 2, 3, 4.*/
+ 0 /* Dummy address cylce 0.*/
+ );
+ while( !SMC_NFC_isReadyBusy(SMC));
+ if (!IsOperationComplete(raw)) {
+ TRACE_ERROR("WritePage: Failed writing data area.\n\r");
+ error = NandCommon_ERROR_CANNOTWRITE;
+ }
+ }
+ SMC_NFC_DisableSpareWrite(SMC);
+ return error;
+}
+
+
+/**
+ * \brief Copies the data in a page of the NandFlash device to an other page on that same chip.
+ *
+ * \param raw Pointer to a RawNandFlash instance.
+ * \param sourceBlock Source block number.
+ * \param sourcePage Source page number inside the source block.
+ * \param destBlock Destination block number.
+ * \param destPage Destination page number inside the destination block.
+ * \return 0 if successful; otherwise returns an error code.
+ * \note Both pages must have be even or odd; it is not possible to copy
+ * and even page to an odd page and vice-versa.
+ */
+static uint8_t CopyPage(
+ const struct RawNandFlash *raw,
+ uint16_t sourceBlock,
+ uint16_t sourcePage,
+ uint16_t destBlock,
+ uint16_t destPage)
+{
+ uint16_t numPages = NandFlashModel_GetBlockSizeInPages(MODEL(raw));
+ uint32_t sourceRow = sourceBlock * numPages + sourcePage;
+ uint32_t destRow = destBlock * numPages + destPage;
+ uint8_t error = 0;
+ uint32_t addressCycle0;
+ uint32_t addressCycle1234;
+
+ /* Check: Source and destination page must have the same parity */
+ assert((sourcePage & 1) == (destPage & 1));
+
+ TRACE_DEBUG("CopyPage(B#%d:P#%d -> B#%d:P#%d)\n\r",
+ sourceBlock, sourcePage, destBlock, destPage);
+
+ /* Use the copy-back facility if available*/
+ if (NandFlashModel_SupportsCopyBack(MODEL(raw))) {
+
+ /* Start operation*/
+ NFC_TranslateAddress(raw, 0, sourceRow, &addressCycle0, &addressCycle1234, 1);
+ /* Start copy-back read*/
+ SMC_NFC_SendCommand(SMC,
+ NFCADDR_CMD_NFCCMD | /* Command.*/
+ 0 | /* NFC read data.*/
+ 0 | /* NFC auto R/W is disabled.*/
+ BOARD_NF_CSID | /* CSID.*/
+ NFCADDR_CMD_ACYCLE_FIVE | /* Number of address cycle.*/
+ NFCADDR_CMD_VCMD2 | /* CMD2 enabled.*/
+ (COMMAND_COPYBACK_READ_2 << 10)| /* CMD2.*/
+ (COMMAND_COPYBACK_READ_1 << 2), /* CMD1.*/
+ addressCycle1234, /* Address cylce 1, 2, 3, 4.*/
+ addressCycle0 /* Address cylce 0.*/
+ );
+ while( !SMC_NFC_isReadyBusy(SMC) );
+
+ /* Start copy-back write*/
+ NFC_TranslateAddress(raw, 0, destRow, &addressCycle0, &addressCycle1234, 1);
+ SMC_NFC_SendCommand(SMC,
+ NFCADDR_CMD_NFCCMD | /* Command.*/
+ 0 | /* No data transfer.*/
+ 0 | /* NFC auto R/W is disabled. */
+ BOARD_NF_CSID | /* CSID.*/
+ NFCADDR_CMD_ACYCLE_FIVE | /* Number of address cycle.*/
+ NFCADDR_CMD_VCMD2 | /* CMD2 enabled.*/
+ (COMMAND_COPYBACK_PROGRAM_2 << 10)| /* CMD2.*/
+ (COMMAND_COPYBACK_PROGRAM_1 << 2), /* CMD1.*/
+ addressCycle1234, /* Address cylce 1, 2, 3, 4.*/
+ addressCycle0 /* Address cylce 0.*/
+ );
+ while( !SMC_NFC_isReadyBusy(SMC) );
+
+ /* Check status*/
+ if (!IsOperationComplete(raw)) {
+ TRACE_ERROR("CopyPage: Failed to copy page.\n\r");
+ error = NandCommon_ERROR_CANNOTCOPY;
+ }
+ }
+ else {
+
+ /* Software copy*/
+ uint8_t data[NandCommon_MAXPAGEDATASIZE];
+ uint8_t spare[NandCommon_MAXPAGESPARESIZE];
+ if (RawNandFlash_ReadPage(raw, sourceBlock, sourcePage, data, spare)) {
+
+ TRACE_ERROR("CopyPage: Failed to read page to copy\n\r");
+ error = NandCommon_ERROR_CANNOTREAD;
+ }
+ else if (RawNandFlash_WritePage(raw, destBlock, destPage, data, spare)) {
+
+ TRACE_ERROR("CopyPage: Failed to write dest. page\n\r");
+ error = NandCommon_ERROR_CANNOTWRITE;
+ }
+ }
+
+ return error;
+}
+
+/*------------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Initializes a RawNandFlash instance based on the given model and physical interface.
+ *
+ * \param raw Pointer to a RawNandFlash instance.
+ * \param model Pointer to the underlying nand chip model. Can be 0.
+ * \param commandAddress Address at which commands are sent.
+ * \param addressAddress Address at which addresses are sent.
+ * \param dataAddress Address at which data is sent.
+ * \param pinChipEnable Pin controlling the CE signal of the NandFlash.
+ * \param pinReadyBusy Pin used to monitor the ready/busy signal of the Nand.
+ * \return 0 if successful; otherwise returns NandCommon_ERROR_UNKNOWNMODEL.
+ */
+uint8_t RawNandFlash_Initialize(
+ struct RawNandFlash *raw,
+ const struct NandFlashModel *model,
+ uint32_t commandAddress,
+ uint32_t addressAddress,
+ uint32_t dataAddress,
+ const Pin pinChipEnable,
+ const Pin pinReadyBusy)
+{
+ TRACE_DEBUG("RawNandFlash_Initialize()\r\n");
+
+ /* Initialize NFC controller */
+ SMC_NFC_Reset(SMC);
+ SMC_NFC_EnableNfc(SMC);
+
+ /* Initialize fields*/
+ raw->commandAddress = commandAddress;
+ raw->addressAddress = addressAddress;
+ raw->dataAddress = dataAddress;
+ raw->pinChipEnable = pinChipEnable;
+ raw->pinReadyBusy = pinReadyBusy;
+
+ /* Reset*/
+ RawNandFlash_Reset(raw);
+
+ /* If model is not provided, autodetect it*/
+ if (!model) {
+
+ TRACE_DEBUG("No model provided, trying autodetection ...\n\r");
+ if (NandFlashModel_Find(nandFlashModelList,
+ NandFlashModelList_SIZE,
+ RawNandFlash_ReadId(raw),
+ &(raw->model))) {
+
+ TRACE_ERROR(
+ "RawNandFlash_Initialize: Could not autodetect chip.\n\r");
+ return NandCommon_ERROR_UNKNOWNMODEL;
+ }
+ }
+ else {
+
+ /* Copy provided model*/
+ raw->model = *model;
+ }
+
+ return 0;
+}
+
+/**
+ * \brief Resets a NandFlash device.
+ *
+ * \param raw Pointer to a RawNandFlash instance.
+ */
+void RawNandFlash_Reset(const struct RawNandFlash *raw)
+{
+ TRACE_DEBUG("RawNandFlash_Reset()\n\r");
+
+ /* Remove warnings */
+ raw = raw;
+
+ SMC_NFC_SendCommand(SMC,
+ NFCADDR_CMD_NFCCMD | /* Command.*/
+ 0 | /* NFC read data.*/
+ 0 | /* NFC auto R/W is disabled.*/
+ BOARD_NF_CSID | /* CSID.*/
+ NFCADDR_CMD_ACYCLE_NONE | /* No address Cycle.*/
+ (COMMAND_RESET << 2), /* CMD1 (COMMAND_RESET).*/
+ 0, /* Dummy address cylce 1,2,3,4.*/
+ 0 /* Dummy address cylce 0.*/
+ );
+ while( !SMC_NFC_isReadyBusy(SMC) );
+}
+
+/**
+ * \brief Reads and returns the identifiers of a NandFlash chip.
+ *
+ * \param raw Pointer to a RawNandFlash instance.
+ * \return id1|(id2<<8)|(id3<<16)|(id4<<24)
+ */
+uint32_t RawNandFlash_ReadId(const struct RawNandFlash *raw)
+{
+ uint32_t chipId;
+
+ TRACE_DEBUG("RawNandFlash_ReadId()\n\r");
+ SMC_NFC_SendCommand(SMC,
+ NFCADDR_CMD_NFCCMD | /* Command.*/
+ 0 | /* NFC read Data.*/
+ 0 | /* NFC auto R/W is disabled.*/
+ BOARD_NF_CSID | /* CSID.*/
+ NFCADDR_CMD_ACYCLE_ONE | /* One address Cycle.*/
+ (COMMAND_READID << 2), /* CMD1 (COMMAND_READID).*/
+ 0, /* Dummy address cylce 1,2,3,4.*/
+ 0 /* Dummy address cylce 0.*/
+ );
+ chipId = READ_DATA8(raw);
+ chipId |= READ_DATA8(raw) << 8;
+ chipId |= READ_DATA8(raw) << 16;
+ chipId |= READ_DATA8(raw) << 24;
+ return chipId;
+}
+
+/**
+ * \brief Erases the specified block of the device, retrying several time if it fails.
+ *
+ * \param raw Pointer to a RawNandFlash instance.
+ * \param block Number of the physical block to erase.
+ * \return 0 if successful; otherwise returns NandCommon_ERROR_UNKNOWNMODEL.
+ */
+uint8_t RawNandFlash_EraseBlock(
+ const struct RawNandFlash *raw,
+ uint16_t block)
+{
+ #if !defined(OP_BOOTSTRAP_on)
+ uint8_t numTries = NUMERASETRIES;
+
+ TRACE_DEBUG("RawNandFlash_EraseBlock(B#%d)\n\r", block);
+
+ while (numTries > 0) {
+
+ if (!EraseBlock(raw, block)) {
+
+ return 0;
+ }
+ numTries--;
+ }
+
+ TRACE_ERROR("RawNandFlash_EraseBlock: Failed to erase block after %d tries\n\r", NUMERASETRIES);
+ return NandCommon_ERROR_BADBLOCK;
+ #else
+ return EraseBlock(raw, block);
+ #endif
+}
+
+/**
+ * \brief Reads the data and/or the spare areas of a page of a NandFlash into the provided buffers.
+ *
+ * \param raw Pointer to a RawNandFlash instance.
+ * \param block Number of the physical block to read.
+ * \param page Number of the page to read inside the given block.
+ * \param data Buffer where the data area will be read.
+ * \param spare Buffer where the spare area will be read.
+ * \return 0 if successful; otherwise returns 1.
+ * \note If one of the buffer pointer is 0, the corresponding area is not read.
+ */
+uint8_t RawNandFlash_ReadPage(
+ const struct RawNandFlash *raw,
+ uint16_t block,
+ uint16_t page,
+ void *data,
+ void *spare)
+{
+ volatile uint32_t cntTry = 0;
+
+ uint8_t hasSmallBlocks = NandFlashModel_HasSmallBlocks(MODEL(raw));
+ uint32_t pageDataSize = NandFlashModel_GetPageDataSize(MODEL(raw));
+ uint32_t pageSpareSize = NandFlashModel_GetPageSpareSize(MODEL(raw));
+ uint32_t colAddress;
+ uint32_t rowAddress;
+ uint32_t addressCycle0;
+ uint32_t addressCycle1234;
+
+ /* Check: At least one area must be read */
+ assert(data || spare);
+ TRACE_DEBUG("RawNandFlash_ReadPage(B#%d:P#%d)\r\n", block, page);
+
+ /* Calculate actual address of the page*/
+ rowAddress = block * NandFlashModel_GetBlockSizeInPages(MODEL(raw)) + page;
+ /* Start operation*/
+ if (data) {
+ colAddress = 0;
+ }
+ else {
+ /* to read spare area in sequential access*/
+ colAddress = pageDataSize;
+ }
+
+ if (spare) {
+ SMC_NFC_EnableSpareRead(SMC);
+ }
+ else {
+ SMC_NFC_DisableSpareRead(SMC);
+ }
+ NFC_TranslateAddress(raw, colAddress, rowAddress, &addressCycle0, &addressCycle1234, 1);
+ /* Use either small blocks or large blocks data area read*/
+ if (hasSmallBlocks) {
+ SMC_NFC_SendCommand(SMC,
+ NFCADDR_CMD_NFCCMD | /* Command.*/
+ 0 | /* NFC read data.*/
+ NFCADDR_CMD_NFCEN | /* NFC auto R/W is enable.*/
+ BOARD_NF_CSID | /* CSID.*/
+ NFCADDR_CMD_ACYCLE_FIVE | /* Number of address cycle.*/
+ 0 | /* CMD2 disabled.*/
+ 0 | /* CMD2.*/
+ (COMMAND_READ_A << 2), /* CMD1.*/
+ addressCycle1234, /* Address cylce 1, 2, 3, 4.*/
+ addressCycle0 /* Address cylce 0.*/
+ );
+ }
+ else {
+ SMC_NFC_SendCommand(SMC,
+ NFCADDR_CMD_NFCCMD | /* Command.*/
+ 0 | /* NFC read data.*/
+ NFCADDR_CMD_NFCEN | /* NFC auto R/W is enabled.*/
+ BOARD_NF_CSID | /* CSID.*/
+ NFCADDR_CMD_ACYCLE_FIVE | /* Number of address cycle.*/
+ NFCADDR_CMD_VCMD2 | /* CMD2 enabled.*/
+ (COMMAND_READ_2 << 10)| /* CMD2.*/
+ (COMMAND_READ_1 << 2), /* CMD1.*/
+ addressCycle1234, /* Address cylce 1, 2, 3, 4.*/
+ addressCycle0 /* Address cylce 0.*/
+ );
+ }
+ /* Wait for the nand to be ready*/
+ cntTry = 0;
+ while( !SMC_NFC_isReadyBusy(SMC) && (cntTry++) < 1000000);
+ cntTry = 0;
+ while( !SMC_NFC_isTransferComplete(SMC) && (cntTry++) < 1000000);
+ /* Read data area if needed*/
+ if (data) {
+ CopyDataFromNfcInternalSram(raw, (uint8_t *) data, 0, pageDataSize);
+ if (spare) {
+ CopyDataFromNfcInternalSram(raw, (uint8_t *) spare, pageDataSize, pageSpareSize);
+ }
+ }
+ else {
+ /* Read spare area only*/
+ CopyDataFromNfcInternalSram(raw, (uint8_t *) spare, 0, pageSpareSize);
+ }
+ return 0;
+}
+
+/**
+ * \brief Writes the data and/or the spare areas of a page of a NandFlash into the provided buffers.
+ *
+ * \param raw Pointer to a RawNandFlash instance.
+ * \param block Number of the physical block to write resides.
+ * \param page Number of the page to write inside the given block.
+ * \param data Buffer where the data area will be stored.
+ * \param spare Buffer where the spare area will be stored.
+ * \return 0 if successful; otherwise returns NandCommon_ERROR_BADBLOCK.
+ * \note If one of the buffer pointer is 0, the corresponding area is not written.
+ */
+uint8_t RawNandFlash_WritePage(
+ const struct RawNandFlash *raw,
+ uint16_t block,
+ uint16_t page,
+ void *data,
+ void *spare)
+{
+ uint8_t numTries = NUMWRITETRIES;
+
+ TRACE_DEBUG("RawNandFlash_WritePage(B#%d:P#%d)\r\n", block, page);
+
+ while (numTries > 0) {
+
+ if (!WritePage(raw, block, page, data, spare)) {
+
+ return 0;
+ }
+ numTries--;
+ }
+
+ TRACE_ERROR("RawNandFlash_WritePage: Failed to write page after %d tries\n\r", NUMWRITETRIES);
+ return NandCommon_ERROR_BADBLOCK;
+}
+
+/**
+ * \brief Copy the data in a page of the NandFlash device to an other page on that same chip.
+ *
+ * \param raw Pointer to a RawNandFlash instance.
+ * \param sourceBlock Source block number.
+ * \param sourcePage Source page number inside the source block.
+ * \param destBlock Destination block number.
+ * \param destPage Destination page number inside the destination block.
+ * \return 0 if successful; otherwise returns an NandCommon_ERROR_BADBLOCK.
+ * \note Both pages must have be even or odd; it is not possible to copy
+ * and even page to an odd page and vice-versa.
+ */
+uint8_t RawNandFlash_CopyPage(
+ const struct RawNandFlash *raw,
+ uint16_t sourceBlock,
+ uint16_t sourcePage,
+ uint16_t destBlock,
+ uint16_t destPage)
+{
+ uint8_t numTries = NUMCOPYTRIES;
+
+ TRACE_DEBUG("RawNandFlash_CopyPage(B#%d:P#%d -> B#%d:P#%d)\n\r",
+ sourceBlock, sourcePage, destBlock, destPage);
+
+ while (numTries) {
+
+ if (!CopyPage(raw, sourceBlock, sourcePage, destBlock, destPage)) {
+
+ return 0;
+ }
+ numTries--;
+ }
+
+ TRACE_ERROR("RawNandFlash_CopyPage: Failed to copy page after %d tries\n\r", NUMCOPYTRIES);
+ return NandCommon_ERROR_BADBLOCK;
+}
+
+/**
+ * \brief Copies the data of one whole block of a NandFlash device to another block.
+ *
+ * \param raw Pointer to a RawNandFlash instance.
+ * \param sourceBlock Source block number.
+ * \param destBlock Destination block number.
+ * \return 0 if successful; otherwise returns an NandCommon_ERROR_BADBLOCK.
+ */
+uint8_t RawNandFlash_CopyBlock(
+ const struct RawNandFlash *raw,
+ uint16_t sourceBlock,
+ uint16_t destBlock)
+{
+ uint16_t numPages = NandFlashModel_GetBlockSizeInPages(MODEL(raw));
+ uint32_t i;
+
+ /* Check: Source block must be different from dest block */
+ assert(sourceBlock != destBlock);
+ TRACE_DEBUG("RawNandFlash_CopyBlock(B#%d->B#%d)\n\r",
+ sourceBlock, destBlock);
+
+ /* Copy all pages*/
+ for (i=0; i < numPages; i++) {
+
+ if (RawNandFlash_CopyPage(raw, sourceBlock, i, destBlock, i)) {
+
+ TRACE_ERROR(
+ "RawNandFlash_CopyBlock: Failed to copy page %u\n\r",
+ i);
+ return NandCommon_ERROR_BADBLOCK;
+ }
+ }
+ return 0;
+}
+
+#endif
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/RawNandFlash.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/RawNandFlash.c
new file mode 100644
index 0000000..6319611
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/RawNandFlash.c
@@ -0,0 +1,804 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * The RawNandFlash layer drives hardware-specific Bus Read and Bus Write operations to
+ * communicate with the NAND Flash device. It directly interacts with hardware's register to
+ * operate NAND Flash interface.The RawNandFlash layer code implement procedures to program
+ * basic NAND Flash operations. It takes care of issuing the correct sequences of write/read
+ * operations for each command. All functions in the layer are blocked i.e. they wait for
+ * the completion of an operation. RawNandFlash layer access NAND Flash device by SMC.
+ *
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "memories.h"
+
+#include <string.h>
+#include <assert.h>
+
+#if !defined(CHIP_NAND_CTRL)
+/*----------------------------------------------------------------------------
+ * Internal definitions
+ *----------------------------------------------------------------------------*/
+
+/** Nand flash chip status codes*/
+#define STATUS_READY (1 << 6)
+#define STATUS_ERROR (1 << 0)
+
+/** Nand flash commands*/
+#define COMMAND_READ_1 0x00
+#define COMMAND_READ_2 0x30
+#define COMMAND_COPYBACK_READ_1 0x00
+#define COMMAND_COPYBACK_READ_2 0x35
+#define COMMAND_COPYBACK_PROGRAM_1 0x85
+#define COMMAND_COPYBACK_PROGRAM_2 0x10
+#define COMMAND_RANDOM_OUT 0x05
+#define COMMAND_RANDOM_OUT_2 0xE0
+#define COMMAND_RANDOM_IN 0x85
+#define COMMAND_READID 0x90
+#define COMMAND_WRITE_1 0x80
+#define COMMAND_WRITE_2 0x10
+#define COMMAND_ERASE_1 0x60
+#define COMMAND_ERASE_2 0xD0
+#define COMMAND_STATUS 0x70
+#define COMMAND_RESET 0xFF
+
+
+/** Nand flash commands (small blocks)*/
+#define COMMAND_READ_A 0x00
+#define COMMAND_READ_C 0x50
+
+/*----------------------------------------------------------------------------
+ * Internal Macros
+ *----------------------------------------------------------------------------*/
+
+#define ENABLE_CE(raw) PIO_Clear(&(raw->pinChipEnable))
+#define DISABLE_CE(raw) PIO_Set(&(raw->pinChipEnable))
+
+#define WRITE_COMMAND(raw, command) \
+ {*((volatile uint8_t *) raw->commandAddress) = (uint8_t) command;}
+#define WRITE_COMMAND16(raw, command) \
+ {*((volatile uint16_t *) raw->commandAddress) = (uint16_t) command;}
+#define WRITE_ADDRESS(raw, address) \
+ {*((volatile uint8_t *) raw->addressAddress) = (uint8_t) address;}
+#define WRITE_ADDRESS16(raw, address) \
+ {*((volatile uint16_t *) raw->addressAddress) = (uint16_t) address;}
+#define WRITE_DATA8(raw, data) \
+ {*((volatile uint8_t *) raw->dataAddress) = (uint8_t) data;}
+#define READ_DATA8(raw) \
+ (*((volatile uint8_t *) raw->dataAddress))
+#define WRITE_DATA16(raw, data) \
+ {*((volatile uint16_t *) raw->dataAddress) = (uint16_t) data;}
+#define READ_DATA16(raw) \
+ (*((volatile uint16_t *) raw->dataAddress))
+
+/** Internal cast macros*/
+#define MODEL(raw) ((struct NandFlashModel *) raw)
+
+/** Number of tries for erasing a block*/
+#define NUMERASETRIES 2
+/** Number of tries for writing a block*/
+#define NUMWRITETRIES 2
+/** Number of tries for copying a block*/
+#define NUMCOPYTRIES 2
+
+/*----------------------------------------------------------------------------
+ * Internal functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Sends the column address to the NandFlash chip.
+ *
+ * \param raw Pointer to a RawNandFlash instance.
+ * \param columnAddress Column address to send.
+ */
+static void WriteColumnAddress(
+ const struct RawNandFlash *raw,
+ uint16_t columnAddress)
+{
+ uint16_t pageDataSize = NandFlashModel_GetPageDataSize(MODEL(raw));
+
+ /* Check the data bus width of the NandFlash */
+ if (NandFlashModel_GetDataBusWidth(MODEL(raw)) == 16) {
+ /* Div 2 is because we address in word and not in byte */
+ columnAddress >>= 1;
+ }
+ /* Send single column address byte for small block devices, or two column address bytes for large block devices*/
+ while (pageDataSize > 2) {
+
+ if (NandFlashModel_GetDataBusWidth(MODEL(raw)) == 16) {
+ WRITE_ADDRESS16(raw, columnAddress & 0xFF);
+ }
+ else {
+ WRITE_ADDRESS(raw, columnAddress & 0xFF);
+ }
+ pageDataSize >>= 8;
+ columnAddress >>= 8;
+ }
+}
+
+/**
+ * \brief Sends the row address to the NandFlash chip.
+ *
+ * \param raw Pointer to a RawNandFlash instance.
+ * \param rowAddress Row address to send.
+ */
+static void WriteRowAddress(
+ const struct RawNandFlash *raw,
+ uint32_t rowAddress)
+{
+ uint32_t numPages = NandFlashModel_GetDeviceSizeInPages(MODEL(raw));
+
+ while (numPages > 0) {
+
+ if (NandFlashModel_GetDataBusWidth(MODEL(raw)) == 16) {
+ WRITE_ADDRESS16(raw, rowAddress & 0xFF);
+ }
+ else {
+ WRITE_ADDRESS(raw, rowAddress & 0xFF);
+ }
+ numPages >>= 8;
+ rowAddress >>= 8;
+ }
+}
+
+/**
+ * \brief Waiting for the completion of a page program, erase and random read completion.
+ *
+ * \param raw Pointer to a RawNandFlash instance.
+ */
+static void WaitReady(const struct RawNandFlash *raw)
+{
+ if (raw->pinReadyBusy.mask) {
+ while (!PIO_Get(&(raw->pinReadyBusy)));
+ }
+ else {
+ WRITE_COMMAND(raw, COMMAND_STATUS);
+ while ((READ_DATA8(raw) & STATUS_READY) != STATUS_READY);
+ }
+}
+
+/**
+ * \brief Check for program or erase operation is completed.
+ *
+ * \param raw Pointer to a RawNandFlash instance.
+ * \return 1 operation is completed; otherwise, return 0.
+ */
+static uint8_t IsOperationComplete(const struct RawNandFlash *raw)
+{
+ uint8_t status;
+
+ WRITE_COMMAND(raw, COMMAND_STATUS);
+
+ status = READ_DATA8(raw);
+
+ if (((status & STATUS_READY) != STATUS_READY) || ((status & STATUS_ERROR) != 0)) {
+ return 0;
+ }
+ return 1;
+}
+
+/**
+ * \brief Sends data to the NandFlash chip from the provided buffer.
+ *
+ * \param raw Pointer to a RawNandFlash instance.
+ * \param size Number of bytes that will be written.
+ */
+static void WriteData(
+ const struct RawNandFlash *raw,
+ uint8_t *buffer,
+ uint32_t size)
+{
+ uint32_t i;
+
+ /* Check the data bus width of the NandFlash */
+ if (NandFlashModel_GetDataBusWidth(MODEL(raw)) == 16) {
+
+ uint16_t *buffer16 = (uint16_t *) buffer;
+ size >>= 1;
+
+ for(i=0; i < size; i++) {
+
+ WRITE_DATA16(raw, buffer16[i]);
+ }
+ }
+ else {
+
+ for(i=0; i < size; i++) {
+
+ WRITE_DATA8(raw, buffer[i]);
+ }
+ }
+}
+
+/**
+ * \brief Reads data from the NandFlash chip into the provided buffer.
+ *
+ * \param raw Pointer to a RawNandFlash instance.
+ * \param buffer Buffer where the data will be stored.
+ * \param size Number of bytes that will be written.
+ */
+static void ReadData(
+ const struct RawNandFlash *raw,
+ uint8_t *buffer,
+ uint32_t size)
+{
+ uint32_t i;
+
+ /* Check the chip data bus width*/
+ if (NandFlashModel_GetDataBusWidth(MODEL(raw)) == 16) {
+
+ uint16_t *buffer16 = (uint16_t *) buffer;
+ size >>= 1;
+
+ for (i=0; i < size; i++) {
+
+ buffer16[i] = READ_DATA16(raw);
+ }
+ }
+ else {
+
+ for (i=0; i < size; i++) {
+
+ buffer[i] = READ_DATA8(raw);
+ }
+ }
+}
+
+/**
+ * \brief Erases the specified block of the device.
+ *
+ * \param raw Pointer to a RawNandFlash instance.
+ * \param block Number of the physical block to erase.
+ * \return 0 if successful; otherwise returns an error code.
+ */
+static uint8_t EraseBlock(
+ const struct RawNandFlash *raw,
+ uint16_t block)
+{
+ uint8_t error = 0;
+ uint32_t rowAddress;
+
+ TRACE_DEBUG("EraseBlock(%d)\r\n", block);
+
+ /* Calculate address used for erase */
+ rowAddress = block * NandFlashModel_GetBlockSizeInPages(MODEL(raw));
+
+ /* Start erase*/
+ ENABLE_CE(raw);
+ WRITE_COMMAND(raw, COMMAND_ERASE_1);
+ WriteRowAddress(raw, rowAddress);
+ WRITE_COMMAND(raw, COMMAND_ERASE_2);
+
+ WaitReady(raw);
+ #if !defined (OP_BOOTSTRAP_on)
+ if (!IsOperationComplete(raw)) {
+ TRACE_ERROR(
+ "EraseBlock: Could not erase block %d.\n\r",
+ block);
+ error = NandCommon_ERROR_CANNOTERASE;
+ }
+ #endif
+
+ DISABLE_CE(raw);
+
+ return error;
+}
+
+/**
+ * \brief Writes the data and/or the spare area of a page on a NandFlash chip.
+ *
+ * \param raw Pointer to a RawNandFlash instance.
+ * \param block Number of the physical block to erase.
+ * \param page Number of the page to write inside the given block.
+ * \param data Buffer containing the data area.
+ * \param spare Buffer containing the spare area.
+ * \return 0 if successful; otherwise returns an error code.
+ * \note If one of the buffer pointer is 0, the corresponding area is not written.
+ */
+static uint8_t WritePage(
+ const struct RawNandFlash *raw,
+ uint16_t block,
+ uint16_t page,
+ void *data,
+ void *spare)
+{
+ uint8_t error = 0;
+ uint32_t pageDataSize = NandFlashModel_GetPageDataSize(MODEL(raw));
+ uint32_t spareDataSize = NandFlashModel_GetPageSpareSize(MODEL(raw));
+ uint16_t dummyByte;
+ uint32_t rowAddress;
+
+ TRACE_DEBUG("WritePage(B#%d:P#%d)\r\n", block, page);
+ /* Calculate physical address of the page*/
+ rowAddress = block * NandFlashModel_GetBlockSizeInPages(MODEL(raw)) + page;
+
+ /* Start write operation*/
+ ENABLE_CE(raw);
+
+ /* Write data area if needed*/
+ if (data) {
+
+ WRITE_COMMAND(raw, COMMAND_WRITE_1);
+ WriteColumnAddress(raw, 0);
+ WriteRowAddress(raw, rowAddress);
+ WriteData(raw, (uint8_t *) data, pageDataSize);
+
+ /* Spare is written here as well since it is more efficient*/
+ if (spare) {
+
+ WriteData(raw, (uint8_t *) spare, spareDataSize);
+ }
+ else {
+ /* Note: special case when ECC parity generation.
+ ECC results are available as soon as the counter reaches the end of the main area.
+ But when reach PageSize for an example, it could not generate last ECC_PR, The
+ workaround is to receive PageSize+1 word.*/
+ ReadData(raw, (uint8_t *) (&dummyByte), 2);
+ }
+ WRITE_COMMAND(raw, COMMAND_WRITE_2);
+
+ WaitReady(raw);
+ if (!IsOperationComplete(raw)) {
+ TRACE_ERROR("WritePage: Failed writing data area.\n\r");
+ error = NandCommon_ERROR_CANNOTWRITE;
+ }
+ }
+
+ /* Write spare area alone if needed*/
+ if (spare && !data) {
+
+ WRITE_COMMAND(raw, COMMAND_WRITE_1);
+ WriteColumnAddress(raw, pageDataSize);
+ WriteRowAddress(raw, rowAddress);
+ WriteData(raw, (uint8_t *) spare, spareDataSize);
+ WRITE_COMMAND(raw, COMMAND_WRITE_2);
+
+ WaitReady(raw);
+ if (!IsOperationComplete(raw)) {
+ TRACE_ERROR("WritePage: Failed writing data area.\n\r");
+ error = NandCommon_ERROR_CANNOTWRITE;
+ }
+ }
+
+ /* Disable chip*/
+ DISABLE_CE(raw);
+
+ return error;
+}
+
+/**
+ * \brief Copies the data in a page of the NandFlash device to an other page on that same chip.
+ *
+ * \param raw Pointer to a RawNandFlash instance.
+ * \param sourceBlock Source block number.
+ * \param sourcePage Source page number inside the source block.
+ * \param destBlock Destination block number.
+ * \param destPage Destination page number inside the destination block.
+ * \return 0 if successful; otherwise returns an error code.
+ * \note Both pages must have be even or odd; it is not possible to copy
+ * and even page to an odd page and vice-versa.
+ */
+static uint8_t CopyPage(
+ const struct RawNandFlash *raw,
+ uint16_t sourceBlock,
+ uint16_t sourcePage,
+ uint16_t destBlock,
+ uint16_t destPage)
+{
+ uint16_t numPages = NandFlashModel_GetBlockSizeInPages(MODEL(raw));
+ uint32_t sourceRow = sourceBlock * numPages + sourcePage;
+ uint32_t destRow = destBlock * numPages + destPage;
+ uint8_t error = 0;
+
+ assert((sourcePage & 1) == (destPage & 1) );
+
+ TRACE_DEBUG("CopyPage(B#%d:P#%d -> B#%d:P#%d)\n\r",
+ sourceBlock, sourcePage, destBlock, destPage);
+
+ /* Use the copy-back facility if available*/
+ if (NandFlashModel_SupportsCopyBack(MODEL(raw))) {
+
+ /* Start operation*/
+ ENABLE_CE(raw);
+
+ /* Start copy-back read*/
+ WRITE_COMMAND(raw, COMMAND_COPYBACK_READ_1);
+ WriteColumnAddress(raw, 0);
+ WriteRowAddress(raw, sourceRow);
+ WRITE_COMMAND(raw, COMMAND_COPYBACK_READ_2);
+ WaitReady(raw);
+
+ /* Start copy-back write*/
+ WRITE_COMMAND(raw, COMMAND_COPYBACK_PROGRAM_1);
+ WriteColumnAddress(raw, 0);
+ WriteRowAddress(raw, destRow);
+ WRITE_COMMAND(raw, COMMAND_COPYBACK_PROGRAM_2);
+ WaitReady(raw);
+
+ /* Check status*/
+ if (!IsOperationComplete(raw)) {
+ TRACE_ERROR("CopyPage: Failed to copy page.\n\r");
+ error = NandCommon_ERROR_CANNOTCOPY;
+ }
+
+ /* Finish operation*/
+ DISABLE_CE(raw);
+ }
+ else {
+
+ /* Software copy*/
+ uint8_t data[NandCommon_MAXPAGEDATASIZE];
+ uint8_t spare[NandCommon_MAXPAGESPARESIZE];
+ if (RawNandFlash_ReadPage(raw, sourceBlock, sourcePage, data, spare)) {
+
+ TRACE_ERROR("CopyPage: Failed to read page to copy\n\r");
+ error = NandCommon_ERROR_CANNOTREAD;
+ }
+ else if (RawNandFlash_WritePage(raw, destBlock, destPage, data, spare)) {
+
+ TRACE_ERROR("CopyPage: Failed to write dest. page\n\r");
+ error = NandCommon_ERROR_CANNOTWRITE;
+ }
+ }
+
+ return error;
+}
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Initializes a RawNandFlash instance based on the given model and physical interface.
+ *
+ * \param raw Pointer to a RawNandFlash instance.
+ * \param model Pointer to the underlying nand chip model. Can be 0.
+ * \param commandAddress Address at which commands are sent.
+ * \param addressAddress Address at which addresses are sent.
+ * \param dataAddress Address at which data is sent.
+ * \param pinChipEnable Pin controlling the CE signal of the NandFlash.
+ * \param pinReadyBusy Pin used to monitor the ready/busy signal of the Nand.
+ * \return 0 if successful; otherwise returns NandCommon_ERROR_UNKNOWNMODEL.
+ */
+uint8_t RawNandFlash_Initialize(
+ struct RawNandFlash *raw,
+ const struct NandFlashModel *model,
+ uint32_t commandAddress,
+ uint32_t addressAddress,
+ uint32_t dataAddress,
+ const Pin pinChipEnable,
+ const Pin pinReadyBusy)
+{
+ TRACE_DEBUG("RawNandFlash_Initialize()\r\n");
+
+ /* Initialize fields*/
+ raw->commandAddress = commandAddress;
+ raw->addressAddress = addressAddress;
+ raw->dataAddress = dataAddress;
+ raw->pinChipEnable = pinChipEnable;
+ raw->pinReadyBusy = pinReadyBusy;
+
+ /* Reset*/
+ RawNandFlash_Reset(raw);
+
+ /* If model is not provided, autodetect it*/
+ if (!model) {
+
+ TRACE_DEBUG("No model provided, trying autodetection ...\n\r");
+ if (NandFlashModel_Find(nandFlashModelList,
+ NandFlashModelList_SIZE,
+ RawNandFlash_ReadId(raw),
+ &(raw->model))) {
+
+ TRACE_ERROR(
+ "RawNandFlash_Initialize: Could not autodetect chip.\n\r");
+ return NandCommon_ERROR_UNKNOWNMODEL;
+ }
+ }
+ else {
+
+ /* Copy provided model*/
+ raw->model = *model;
+ }
+
+ return 0;
+}
+
+/**
+ * \brief Resets a NandFlash device.
+ *
+ * \param raw Pointer to a RawNandFlash instance.
+ */
+void RawNandFlash_Reset(const struct RawNandFlash *raw)
+{
+ TRACE_DEBUG("RawNandFlash_Reset()\n\r");
+
+ ENABLE_CE(raw);
+ WRITE_COMMAND(raw, COMMAND_RESET);
+ /*WRITE_COMMAND16(raw, COMMAND_RESET);*/
+ WaitReady(raw);
+ DISABLE_CE(raw);
+}
+
+/**
+ * \brief Reads and returns the identifiers of a NandFlash chip.
+ *
+ * \param raw Pointer to a RawNandFlash instance.
+ * \return id1|(id2<<8)|(id3<<16)|(id4<<24)
+ */
+uint32_t RawNandFlash_ReadId(const struct RawNandFlash *raw)
+{
+ uint32_t chipId;
+
+ TRACE_DEBUG("RawNandFlash_ReadId()\n\r");
+
+ ENABLE_CE(raw);
+ /*WRITE_COMMAND16(raw, COMMAND_READID);*/
+ WRITE_COMMAND(raw, COMMAND_READID);
+ WRITE_ADDRESS(raw, 0);
+ chipId = READ_DATA8(raw);
+ chipId |= READ_DATA8(raw) << 8;
+ chipId |= READ_DATA8(raw) << 16;
+ chipId |= READ_DATA8(raw) << 24;
+ DISABLE_CE(raw);
+
+ return chipId;
+}
+
+
+/**
+ * \brief Erases the specified block of the device, retrying several time if it fails.
+ *
+ * \param raw Pointer to a RawNandFlash instance.
+ * \param block Number of the physical block to erase.
+ * \return 0 if successful; otherwise returns NandCommon_ERROR_UNKNOWNMODEL.
+ */
+uint8_t RawNandFlash_EraseBlock(
+ const struct RawNandFlash *raw,
+ uint16_t block)
+{
+ #if !defined(OP_BOOTSTRAP_on)
+ uint8_t numTries = NUMERASETRIES;
+
+ TRACE_DEBUG("RawNandFlash_EraseBlock(B#%d)\n\r", block);
+
+ while (numTries > 0) {
+
+ if (!EraseBlock(raw, block)) {
+
+ return 0;
+ }
+ numTries--;
+ }
+
+ TRACE_ERROR("RawNandFlash_EraseBlock: Failed to erase %d after %d tries\n\r",
+ block, NUMERASETRIES);
+ return NandCommon_ERROR_BADBLOCK;
+ #else
+ return EraseBlock(raw, block);
+ #endif
+}
+
+/**
+ * \brief Reads the data and/or the spare areas of a page of a NandFlash into the provided buffers.
+ *
+ * \param raw Pointer to a RawNandFlash instance.
+ * \param block Number of the physical block to read.
+ * \param page Number of the page to read inside the given block.
+ * \param data Buffer where the data area will be read.
+ * \param spare Buffer where the spare area will be read.
+ * \return 0 if successful; otherwise returns 1.
+ * \note If one of the buffer pointer is 0, the corresponding area is not read.
+ */
+uint8_t RawNandFlash_ReadPage(
+ const struct RawNandFlash *raw,
+ uint16_t block,
+ uint16_t page,
+ void *data,
+ void *spare)
+{
+ uint8_t hasSmallBlocks = NandFlashModel_HasSmallBlocks(MODEL(raw));
+ uint32_t pageDataSize = NandFlashModel_GetPageDataSize(MODEL(raw));
+ uint32_t pageSpareSize = NandFlashModel_GetPageSpareSize(MODEL(raw));
+ uint32_t colAddress;
+ uint32_t rowAddress;
+
+ assert( data || spare ) ; /* "RawNandFlash_ReadPage: At least one area must be read\n\r" */
+ TRACE_DEBUG("RawNandFlash_ReadPage(B#%d:P#%d)\r\n", block, page);
+
+ /* Calculate actual address of the page*/
+ rowAddress = block * NandFlashModel_GetBlockSizeInPages(MODEL(raw)) + page;
+
+ /* Start operation*/
+ ENABLE_CE(raw);
+
+ if (data) {
+ colAddress = 0;
+ }
+ else {
+ /* to read spare area in sequential access*/
+ colAddress = pageDataSize;
+ }
+
+ /* Use either small blocks or large blocks data area read*/
+ if (hasSmallBlocks) {
+ if(colAddress == 0) {
+
+ WRITE_COMMAND(raw, COMMAND_READ_A);
+ }
+ else if(colAddress == pageDataSize) {
+ WRITE_COMMAND(raw, COMMAND_READ_C);
+ }
+ WriteColumnAddress(raw, colAddress);
+ WriteRowAddress(raw, rowAddress);
+ }
+ else {
+
+ WRITE_COMMAND(raw, COMMAND_READ_1);
+ WriteColumnAddress(raw, colAddress);
+ WriteRowAddress(raw, rowAddress);
+ WRITE_COMMAND(raw, COMMAND_READ_2);
+ }
+
+ /* Wait for the nand to be ready*/
+ WaitReady(raw);
+
+ /* Read data area if needed*/
+ if (data) {
+ WRITE_COMMAND(raw, COMMAND_READ_1);
+ ReadData(raw, (uint8_t *) data, pageDataSize);
+
+ if (spare) {
+ ReadData(raw, (uint8_t *) spare, pageSpareSize);
+ }
+ }
+ else {
+ /* Read spare area only*/
+ WRITE_COMMAND(raw, COMMAND_READ_1);
+ ReadData(raw, (uint8_t *) spare, pageSpareSize);
+ }
+
+ /* Disable CE*/
+ DISABLE_CE(raw);
+
+ return 0;
+}
+
+/**
+ * \brief Writes the data and/or the spare areas of a page of a NandFlash into the provided buffers.
+ *
+ * \param raw Pointer to a RawNandFlash instance.
+ * \param block Number of the physical block to write resides.
+ * \param page Number of the page to write inside the given block.
+ * \param data Buffer where the data area will be stored.
+ * \param spare Buffer where the spare area will be stored.
+ * \return 0 if successful; otherwise returns NandCommon_ERROR_BADBLOCK.
+ * \note If one of the buffer pointer is 0, the corresponding area is not written.
+ */
+uint8_t RawNandFlash_WritePage(
+ const struct RawNandFlash *raw,
+ uint16_t block,
+ uint16_t page,
+ void *data,
+ void *spare)
+{
+ uint8_t numTries = NUMWRITETRIES;
+
+ TRACE_DEBUG("RawNandFlash_WritePage(B#%d:P#%d)\r\n", block, page);
+
+ while (numTries > 0) {
+
+ if (!WritePage(raw, block, page, data, spare)) {
+
+ return 0;
+ }
+ numTries--;
+ }
+
+ TRACE_ERROR("RawNandFlash_WritePage: Failed to write page after %d tries\n\r", NUMWRITETRIES);
+ return NandCommon_ERROR_BADBLOCK;
+}
+
+/**
+ * \brief Copy the data in a page of the NandFlash device to an other page on that same chip.
+ *
+ * \param raw Pointer to a RawNandFlash instance.
+ * \param sourceBlock Source block number.
+ * \param sourcePage Source page number inside the source block.
+ * \param destBlock Destination block number.
+ * \param destPage Destination page number inside the destination block.
+ * \return 0 if successful; otherwise returns an NandCommon_ERROR_BADBLOCK.
+ * \note Both pages must have be even or odd; it is not possible to copy
+ * and even page to an odd page and vice-versa.
+ */
+uint8_t RawNandFlash_CopyPage(
+ const struct RawNandFlash *raw,
+ uint16_t sourceBlock,
+ uint16_t sourcePage,
+ uint16_t destBlock,
+ uint16_t destPage)
+{
+ uint8_t numTries = NUMCOPYTRIES;
+
+ TRACE_DEBUG("RawNandFlash_CopyPage(B#%d:P#%d -> B#%d:P#%d)\n\r",
+ sourceBlock, sourcePage, destBlock, destPage);
+
+ while (numTries) {
+
+ if (!CopyPage(raw, sourceBlock, sourcePage, destBlock, destPage)) {
+
+ return 0;
+ }
+ numTries--;
+ }
+
+ TRACE_ERROR("RawNandFlash_CopyPage: Failed to copy page after %d tries\n\r", NUMCOPYTRIES);
+ return NandCommon_ERROR_BADBLOCK;
+}
+
+/**
+ * \brief Copies the data of one whole block of a NandFlash device to another block.
+ *
+ * \param raw Pointer to a RawNandFlash instance.
+ * \param sourceBlock Source block number.
+ * \param destBlock Destination block number.
+ * \return 0 if successful; otherwise returns an NandCommon_ERROR_BADBLOCK.
+ */
+uint8_t RawNandFlash_CopyBlock(
+ const struct RawNandFlash *raw,
+ uint16_t sourceBlock,
+ uint16_t destBlock)
+{
+ uint16_t numPages = NandFlashModel_GetBlockSizeInPages(MODEL(raw));
+ uint32_t i;
+
+ assert( sourceBlock != destBlock ) ; /* "RawNandFlash_CopyBlock: Source block must be different from dest block\n\r" */
+ TRACE_DEBUG("RawNandFlash_CopyBlock(B#%d->B#%d)\n\r", sourceBlock, destBlock);
+
+ /* Copy all pages*/
+ for (i=0; i < numPages; i++)
+ {
+ if (RawNandFlash_CopyPage(raw, sourceBlock, i, destBlock, i) )
+ {
+ TRACE_ERROR( "RawNandFlash_CopyBlock: Failed to copy page %u\n\r", i ) ;
+ return NandCommon_ERROR_BADBLOCK;
+ }
+ }
+
+ return 0;
+}
+
+#endif
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/SkipBlockNandFlash.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/SkipBlockNandFlash.c
new file mode 100644
index 0000000..f954b80
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/SkipBlockNandFlash.c
@@ -0,0 +1,495 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * SkipBlockNandFlash layer supplies application a set of interface to operate nandflash.
+ * which include initialize, block erase, block write/read, page write/read. \n
+ * This layer is to just skip over the bad blocks and place the data in the known good blocks.
+ * The algorithm starts by reading the entire spare area of the entire memory. The addresses
+ * of the factory-marked bad blocks are then collected in the programmer RAM. Next, the image is
+ * sequentially programmed (page by page) into the target device. When the target address
+ * corresponds to a bad block address, these pages are stored in the next good block, skipping
+ * the bad block.
+ * The SkipBlocks method is a very generic and well-performing strategy. When a bad block is
+ * encountered, the algorithm simply skips ahead to the next good block.
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "memories.h"
+
+#include <assert.h>
+#include <string.h>
+
+/*----------------------------------------------------------------------------
+ * Internal definitions
+ *----------------------------------------------------------------------------*/
+/** Casts */
+#define ECC(skipBlock) ((struct EccNandFlash *) skipBlock)
+#define RAW(skipBlock) ((struct RawNandFlash *) skipBlock)
+#define MODEL(skipBlock) ((struct NandFlashModel *) skipBlock)
+
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Check if the given block of a nandflash device is bad.
+ *
+ * \param skipBlock Pointer to a SkipBlockNandFlash instance.
+ * \param block Number of block to check.
+ * \return GOODBLOCK if the block is good; or returns a NandCommon_ERROR code.
+ */
+uint8_t SkipBlockNandFlash_CheckBlock(
+ const struct SkipBlockNandFlash *skipBlock,
+ uint16_t block)
+{
+ #if !defined (OP_BOOTSTRAP_on)
+ uint8_t spare[NandCommon_MAXPAGESPARESIZE];
+ uint8_t error;
+ uint8_t badBlockMarker;
+ const struct NandSpareScheme *scheme;
+
+
+ /* Retrieve model scheme */
+ scheme = NandFlashModel_GetScheme(MODEL(skipBlock));
+
+ /* Read spare area of first page of block */
+ error = RawNandFlash_ReadPage(RAW(skipBlock), block, 0, 0, spare);
+ if (error) {
+
+ TRACE_ERROR("CheckBlock: Cannot read page #0 of block #%d\n\r", block);
+ return error;
+ }
+
+ NandSpareScheme_ReadBadBlockMarker(scheme, spare, &badBlockMarker);
+ if (badBlockMarker != 0xFF) {
+
+ return BADBLOCK;
+ }
+
+ /* Read spare area of second page of block */
+ error = RawNandFlash_ReadPage(RAW(skipBlock), block, 1, 0, spare);
+ if (error) {
+
+ TRACE_ERROR("CheckBlock: Cannot read page #1 of block #%d\n\r", block);
+ return error;
+ }
+
+ NandSpareScheme_ReadBadBlockMarker(scheme, spare, &badBlockMarker);
+ if (badBlockMarker != 0xFF) {
+
+ return BADBLOCK;
+ }
+ #endif
+
+ return GOODBLOCK;
+}
+
+/**
+ * \brief Initializes a SkipBlockNandFlash instance. Scans the device to retrieve or
+ * create block status information.
+ *
+ * \param skipBlock Pointer to a SkipBlockNandFlash instance.
+ * \param model Pointer to the underlying nand chip model. Can be 0.
+ * \param commandAddress Address at which commands are sent.
+ * \param addressAddress Address at which addresses are sent.
+ * \param dataAddress Address at which data is sent.
+ * \param pinChipEnable Pin controlling the CE signal of the NandFlash.
+ * \param pinReadyBusy Pin used to monitor the ready/busy signal of the Nand.
+ */
+uint8_t SkipBlockNandFlash_Initialize(
+ struct SkipBlockNandFlash *skipBlock,
+ const struct NandFlashModel *model,
+ uint32_t commandAddress,
+ uint32_t addressAddress,
+ uint32_t dataAddress,
+ const Pin pinChipEnable,
+ const Pin pinReadyBusy)
+{
+ uint8_t error;
+ #if !defined(OP_BOOTSTRAP_on)
+ uint32_t numBlocks;
+ uint32_t block;
+ #endif
+
+ TRACE_DEBUG("SkipBlockNandFlash_Initialize()\n\r");
+
+ /* Initialize SkipBlockNandFlash */
+ #if !defined(OP_BOOTSTRAP_on)
+ error = EccNandFlash_Initialize(ECC(skipBlock),
+ model,
+ commandAddress,
+ addressAddress,
+ dataAddress,
+ pinChipEnable,
+ pinReadyBusy);
+ #else
+ error = RawNandFlash_Initialize(RAW(skipBlock),
+ model,
+ commandAddress,
+ addressAddress,
+ dataAddress,
+ pinChipEnable,
+ pinReadyBusy);
+ #endif
+
+ #if !defined(OP_BOOTSTRAP_on)
+ if (error) {
+
+ return error;
+ }
+
+ /* Retrieve model information */
+ numBlocks = NandFlashModel_GetDeviceSizeInBlocks(MODEL(skipBlock));
+
+ /* Initialize block statuses */
+ TRACE_DEBUG("Retrieving bad block information ...\n\r");
+
+ /* Retrieve block status from their first page spare area */
+ for (block = 0; block < numBlocks; block++) {
+
+ /* Read spare of first page */
+ error = SkipBlockNandFlash_CheckBlock(skipBlock, block);
+
+ if (error != GOODBLOCK) {
+
+ if (error == BADBLOCK) {
+
+ TRACE_DEBUG("Block #%d is bad\n\r", block);
+ }
+ else {
+
+ TRACE_ERROR(
+ "SkipBlockNandFlash_Initialize: Cannot retrieve info from block #%u\n\r", block);
+ }
+ }
+ }
+ #endif
+
+ return 0;
+}
+
+/**
+ * \brief Erases a block of a SkipBlock NandFlash.
+ *
+ * \param skipBlock Pointer to a SkipBlockNandFlash instance.
+ * \param block Number of block to erase.
+ * \return the RawNandFlash_EraseBlock code or NandCommon_ERROR_WRONGSTATUS.
+ */
+uint8_t SkipBlockNandFlash_EraseBlock(
+ struct SkipBlockNandFlash *skipBlock,
+ uint16_t block,
+ uint32_t eraseType)
+{
+ uint8_t error;
+ const struct NandSpareScheme *scheme;
+ uint8_t spare[NandCommon_MAXPAGESPARESIZE];
+
+ // TRACE_INFO("SkipBlockNandFlash_EraseBlock(%d)\n\r", block);
+
+ if (eraseType != SCRUB_ERASE) {
+ /* Check block status */
+ if (SkipBlockNandFlash_CheckBlock(skipBlock, block) != GOODBLOCK) {
+
+ TRACE_INFO("SkipBlockNandFlash_EraseBlock: Block is BAD\n\r");
+ return NandCommon_ERROR_BADBLOCK;
+ }
+ }
+
+ /* Erase block */
+ error = RawNandFlash_EraseBlock(RAW(skipBlock), block);
+ if (error) {
+
+ /* Try to mark the block as BAD */
+ TRACE_ERROR("SkipBlockNandFlash_EraseBlock: Cannot erase block, try to mark it BAD\n\r");
+
+ /* Retrieve model scheme */
+ scheme = NandFlashModel_GetScheme(MODEL(skipBlock));
+
+ memset(spare, 0xFF, NandCommon_MAXPAGESPARESIZE);
+ NandSpareScheme_WriteBadBlockMarker(scheme, spare, NandBlockStatus_BAD_skip);
+ return RawNandFlash_WritePage(RAW(skipBlock), block, 0, 0, spare);
+ }
+
+ return 0;
+}
+
+
+/**
+ * \brief Reads the data and/or the spare area of a page on a SkipBlock nandflash.
+ *
+ * \param skipBlock Pointer to a SkipBlockNandFlash instance.
+ * \param block Number of block to read page from.
+ * \param page Number of page to read inside the given block.
+ * \param data Data area buffer, can be 0.
+ * \param spare Spare area buffer, can be 0.
+ * \note If one of the buffer pointer is 0, then the block MUST not be BAD.
+ * \return NandCommon_ERROR_BADBLOCK if the block is BAD; Otherwise, returns EccNandFlash_ReadPage().
+ */
+uint8_t SkipBlockNandFlash_ReadPage(
+ const struct SkipBlockNandFlash *skipBlock,
+ uint16_t block,
+ uint16_t page,
+ void *data,
+ void *spare)
+{
+ #if !defined(OP_BOOTSTRAP_on)
+ /* Check that the block is not BAD if data is requested */
+ if (SkipBlockNandFlash_CheckBlock(skipBlock, block) != GOODBLOCK) {
+
+ TRACE_ERROR("SkipBlockNandFlash_ReadPage: Block is BAD.\n\r");
+ return NandCommon_ERROR_BADBLOCK;
+ }
+
+ /* Read data with ECC verification */
+ return EccNandFlash_ReadPage(ECC(skipBlock), block, page, data, spare);
+ #else
+ return RawNandFlash_ReadPage(RAW(skipBlock), block, page, data, spare);
+ #endif
+}
+
+/**
+ * \brief Reads the data of a whole block on a SkipBlock nandflash.
+ *
+ * \param skipBlock Pointer to a SkipBlockNandFlash instance.
+ * \param block Number of block to read page from.
+ * \param page Number of page to read inside the given block.
+ * \param data Data area buffer, can be 0.
+ * \param spare Spare area buffer, can be 0.
+ * \return NandCommon_ERROR_BADBLOCK if the block is BAD; Otherwise, returns EccNandFlash_ReadPage().
+ */
+uint8_t SkipBlockNandFlash_ReadBlock(
+ const struct SkipBlockNandFlash *skipBlock,
+ uint16_t block,
+ void *data)
+{
+ /* Number of pages per block */
+ uint32_t numPagesPerBlock, pageSize;
+ /* Page index */
+ uint16_t i;
+ /* Error returned by SkipBlockNandFlash_WritePage */
+ uint8_t error = 0;
+
+ /* Retrieve model information */
+ pageSize = NandFlashModel_GetPageDataSize(MODEL(skipBlock));
+ numPagesPerBlock = NandFlashModel_GetBlockSizeInPages(MODEL(skipBlock));
+
+ /* Check that the block is not BAD if data is requested */
+ if (SkipBlockNandFlash_CheckBlock(skipBlock, block) != GOODBLOCK) {
+
+ TRACE_ERROR("SkipBlockNandFlash_ReadBlock: Block is BAD.\n\r");
+ return NandCommon_ERROR_BADBLOCK;
+ }
+
+ /* Read all the pages of the block */
+ for (i = 0; i < numPagesPerBlock; i++) {
+ error = EccNandFlash_ReadPage(ECC(skipBlock), block, i, data, 0);
+ if (error) {
+
+ TRACE_ERROR("SkipBlockNandFlash_ReadBlock: Cannot read page %d of block %d.\n\r", i, block);
+ return error;
+ }
+ data = (void *) ((uint8_t *) data + pageSize);
+ }
+
+ return 0;
+}
+
+/**
+ * \brief Writes the data and/or spare area of a page on a SkipBlock NandFlash.
+ *
+ * \param skipBlock Pointer to a SkipBlockNandFlash instance.
+ * \param block Number of the block to write.
+ * \param page Number of the page to write inside the given block.
+ * \param data Data area buffer.
+ * \param spare Spare area buffer.
+ * \return NandCommon_ERROR_BADBLOCK if the block is BAD; Otherwise, returns EccNandFlash_WritePage().
+ */
+uint8_t SkipBlockNandFlash_WritePage(
+ const struct SkipBlockNandFlash *skipBlock,
+ uint16_t block,
+ uint16_t page,
+ void *data,
+ void *spare)
+{
+ /* Check that the block is LIVE */
+ if (SkipBlockNandFlash_CheckBlock(skipBlock, block) != GOODBLOCK) {
+
+ TRACE_ERROR("SkipBlockNandFlash_WritePage: Block is BAD.\n\r");
+ return NandCommon_ERROR_BADBLOCK;
+ }
+
+ /* Write data with ECC calculation */
+ return EccNandFlash_WritePage(ECC(skipBlock), block, page, data, spare);
+}
+
+/**
+ * \brief Writes the data of a whole block on a SkipBlock nandflash.
+ *
+ * \param skipBlock Pointer to a SkipBlockNandFlash instance.
+ * \param block Number of the block to write.
+ * \param data Data area buffer.
+ * \return NandCommon_ERROR_BADBLOCK if the block is BAD; Otherwise, returns EccNandFlash_WritePage().
+ */
+uint8_t SkipBlockNandFlash_WriteBlock(
+ const struct SkipBlockNandFlash *skipBlock,
+ uint16_t block,
+ void *data)
+{
+ /* Number of pages per block */
+ uint32_t numPagesPerBlock;
+ /* Page size */
+ uint32_t pageSize;
+ /* Page index*/
+ uint16_t i;
+ /* Error returned by SkipBlockNandFlash_WritePage*/
+ uint8_t error = 0;
+
+ /* Retrieve model information*/
+ pageSize = NandFlashModel_GetPageDataSize(MODEL(skipBlock));
+ numPagesPerBlock = NandFlashModel_GetBlockSizeInPages(MODEL(skipBlock));
+
+ /* Check that the block is LIVE*/
+ if (SkipBlockNandFlash_CheckBlock(skipBlock, block) != GOODBLOCK) {
+
+ TRACE_ERROR("SkipBlockNandFlash_WriteBlock: Block is BAD.\n\r");
+ return NandCommon_ERROR_BADBLOCK;
+ }
+
+ for (i = 0; i < numPagesPerBlock; i++) {
+ error = EccNandFlash_WritePage(ECC(skipBlock), block, i, data, 0);
+ if (error) {
+
+ TRACE_ERROR("SkipBlockNandFlash_WriteBlock: Cannot write page %d of block %d.\n\r", i, block);
+ return NandCommon_ERROR_CANNOTWRITE;
+ }
+ data = (void *) ((uint8_t *) data + pageSize);
+ }
+
+ return 0;
+}
+
+/**
+ * \brief Writes the data of a whole block on a SkipBlock nandflash.
+ *
+ * \param skipBlock Pointer to a SkipBlockNandFlash instance.
+ * \param block Number of the block to write.
+ * \param pageOffsetInBlock Number of the page to write inside the given block.
+ * \param data Data area buffer.
+ * \param numPages number of pages to write.
+ * \return NandCommon_ERROR_BADBLOCK if the block is BAD; Otherwise, returns EccNandFlash_WritePage().
+ */
+uint8_t SkipBlockNandFlash_WriteBlockUnaligned(
+ const struct SkipBlockNandFlash *skipBlock,
+ uint16_t block,
+ uint16_t pageOffsetInBlock,
+ uint16_t numPages,
+ void *data
+ )
+{
+ /* Page size*/
+ uint32_t pageSize;
+ /* Page index */
+ uint16_t i;
+ /* Error returned by SkipBlockNandFlash_WritePage */
+ uint8_t error = 0;
+
+ /* Retrieve model information */
+ pageSize = NandFlashModel_GetPageDataSize(MODEL(skipBlock));
+
+ for (i = pageOffsetInBlock; i < pageOffsetInBlock + numPages; i++) {
+ error = SkipBlockNandFlash_WritePage(skipBlock, block, i, data, 0);
+ if (error == NandCommon_ERROR_BADBLOCK) {
+
+ TRACE_ERROR("SkipBlockNandFlash_WriteBlock: Block is BAD.\n\r");
+ return NandCommon_ERROR_BADBLOCK;
+ }
+ else if (error) {
+
+ TRACE_ERROR("SkipBlockNandFlash_WriteBlock: Cannot write page %d of block %d.\n\r", i, block);
+ return NandCommon_ERROR_CANNOTWRITE;
+ }
+ data = (void *) ((uint8_t *) data + pageSize);
+ }
+
+ return 0;
+}
+
+/**
+ * \brief Read the data of a whole block on a SkipBlock nandflash.
+ *
+ * \param skipBlock Pointer to a SkipBlockNandFlash instance.
+ * \param block Number of the block to read.
+ * \param pageOffsetInBlock Number of the page to read inside the given block.
+ * \param data Data area buffer.
+ * \param numPages number of pages to read.
+ * \return NandCommon_ERROR_BADBLOCK if the block is BAD; Otherwise, returns EccNandFlash_WritePage().
+ */
+uint8_t SkipBlockNandFlash_ReadBlockUnaligned(
+ const struct SkipBlockNandFlash *skipBlock,
+ uint16_t block,
+ uint16_t pageOffsetInBlock,
+ uint16_t numPages,
+ void *data
+ )
+{
+ /* Page size*/
+ uint32_t pageSize;
+ /* Page index*/
+ uint16_t i;
+ /* Error returned by SkipBlockNandFlash_ReadPage*/
+ uint8_t error = 0;
+
+ /* Retrieve model information*/
+ pageSize = NandFlashModel_GetPageDataSize(MODEL(skipBlock));
+
+ for (i = pageOffsetInBlock; i < pageOffsetInBlock + numPages; i++) {
+ error = SkipBlockNandFlash_ReadPage(skipBlock, block, i, data, 0);
+ if (error == NandCommon_ERROR_BADBLOCK) {
+
+ TRACE_ERROR("SkipBlockNandFlash_ReadBlock: Block is BAD.\n\r");
+ return NandCommon_ERROR_BADBLOCK;
+ }
+ else if (error) {
+
+ TRACE_ERROR("SkipBlockNandFlash_ReadBlock: Cannot read page %d of block %d.\n\r", i, block);
+ return NandCommon_ERROR_CANNOTREAD;
+ }
+ data = (void *) ((uint8_t *) data + pageSize);
+ }
+
+ return 0;
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/TranslatedNandFlash.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/TranslatedNandFlash.c
new file mode 100644
index 0000000..e3b627d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/nandflash/TranslatedNandFlash.c
@@ -0,0 +1,598 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2010, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * \file
+ *
+ * Translate a nandflash physical block to logical block, it will call lower layer such as MappedNandFlash.
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "memories.h"
+
+#include <assert.h>
+#include <string.h>
+
+/*----------------------------------------------------------------------------
+ * Local definitions
+ *----------------------------------------------------------------------------*/
+
+/** Casts */
+#define MAPPED(translated) ((struct MappedNandFlash *) translated)
+#define MANAGED(translated) ((struct ManagedNandFlash *) translated)
+#define ECC(translated) ((struct EccNandFlash *) translated)
+#define RAW(translated) ((struct RawNandFlash *) translated)
+#define MODEL(translated) ((struct NandFlashModel *) translated)
+
+/** Minimum number of blocks that should be kept unallocated*/
+#define MINNUMUNALLOCATEDBLOCKS 32
+
+/** Maximum allowed erase count difference*/
+#define MAXERASEDIFFERENCE 5
+
+/*----------------------------------------------------------------------------
+ * Local functions
+ *----------------------------------------------------------------------------*/
+/**
+ * \brief Check is there are enough free block could be allocated.
+ *
+ * \param translated Pointer to a TranslatedNandFlash instance.
+ * \return 1 if there are enough free blocks to perform a single block
+ * allocation; otherwise returns 0.
+ */
+
+static uint8_t BlockCanBeAllocated(
+ const struct TranslatedNandFlash *translated)
+{
+ uint16_t count;
+
+ /* Count number of free and dirty blocks (unallocated blocks)*/
+ count = ManagedNandFlash_CountBlocks(MANAGED(translated), NandBlockStatus_DIRTY)
+ + ManagedNandFlash_CountBlocks(MANAGED(translated), NandBlockStatus_FREE);
+
+ /* Check that count is greater than minimum number of unallocated blocks*/
+ if (count > MINNUMUNALLOCATEDBLOCKS) {
+
+ return 1;
+ }
+ else {
+
+ return 0;
+ }
+}
+
+/**
+ * \brief Check the given page inside the currently written block is clean or not.
+ *
+ * \param translated Pointer to a TranslatedNandFlash instance.
+ * \param page Page number.
+ * \return 1 if the given page inside the currently written block is clean (has
+ * not been written yet); otherwise returns 0.
+ */
+static uint8_t PageIsClean(
+ const struct TranslatedNandFlash *translated,
+ uint16_t page)
+{
+ assert( page < NandFlashModel_GetBlockSizeInPages(MODEL(translated)) ) ; /* "PageIsClean: Page out-of-bounds\n\r" */
+
+ return ((translated->currentBlockPageStatuses[page / 8] >> (page % 8)) & 1) == 0;
+}
+
+/**
+ * \brief Marks the given page as being dirty (i.e. written).
+ *
+ * \param translated Pointer to a TranslatedNandFlash instance.
+ * \param page Page number.
+ */
+static void MarkPageDirty(
+ struct TranslatedNandFlash *translated,
+ uint16_t page)
+{
+ assert( page < NandFlashModel_GetBlockSizeInPages(MODEL(translated)) ) ; /* "PageIsClean: Page out-of-bounds\n\r" */
+
+ translated->currentBlockPageStatuses[page / 8] |= 1 << (page % 8);
+}
+
+/**
+ * \brief Marks all pages as being clean.
+ *
+ * \param translated Pointer to a TranslatedNandFlash instance.
+ */
+static void MarkAllPagesClean( struct TranslatedNandFlash *translated )
+{
+ memset( translated->currentBlockPageStatuses, 0, sizeof( translated->currentBlockPageStatuses ) ) ;
+}
+
+/**
+ * \brief Allocates the best-fitting physical block for the given logical block.
+ *
+ * \param translated Pointer to a TranslatedNandFlash instance.
+ * \param block Logical block number.
+ * \return 0 if successful; otherwise returns NandCommon_ERROR_NOBLOCKFOUND if
+ * there are no more free blocks, or a NandCommon_ERROR code.
+ */
+static uint8_t AllocateBlock(
+ struct TranslatedNandFlash *translated,
+ uint16_t block)
+{
+ uint16_t freeBlock, liveBlock;
+ uint8_t error;
+ int32_t eraseDifference;
+
+ TRACE_DEBUG("Allocating a new block\n\r");
+
+ /* Find youngest free block and youngest live block*/
+ if (ManagedNandFlash_FindYoungestBlock(MANAGED(translated),
+ NandBlockStatus_FREE,
+ &freeBlock)) {
+
+ TRACE_ERROR("AllocateBlock: Could not find a free block\n\r");
+ return NandCommon_ERROR_NOBLOCKFOUND;
+ }
+
+ /* If this is the last free block, save the logical mapping in it and clean dirty blocks */
+ TRACE_DEBUG("Number of FREE blocks: %d\n\r",
+ ManagedNandFlash_CountBlocks(MANAGED(translated), NandBlockStatus_FREE));
+ if (ManagedNandFlash_CountBlocks(MANAGED(translated),
+ NandBlockStatus_FREE) == 1) {
+
+ /* Save mapping and clean dirty blocks*/
+ TRACE_DEBUG("Last FREE block, cleaning up ...\n\r");
+
+ error = MappedNandFlash_SaveLogicalMapping(MAPPED(translated), freeBlock);
+ if (error)
+ {
+ TRACE_ERROR("AllocateBlock: Failed to save mapping\n\r");
+ return error;
+ }
+ error = ManagedNandFlash_EraseDirtyBlocks(MANAGED(translated));
+ if (error)
+ {
+ TRACE_ERROR("AllocatedBlock: Failed to erase dirty blocks\n\r");
+ return error;
+ }
+
+ /* Allocate new block*/
+ return AllocateBlock(translated, block);
+ }
+
+ /* Find youngest LIVE block to check the erase count difference*/
+ if (!ManagedNandFlash_FindYoungestBlock(MANAGED(translated),
+ NandBlockStatus_LIVE,
+ &liveBlock))
+ {
+ /* Calculate erase count difference*/
+ TRACE_DEBUG("Free block erase count = %d\n\r", MANAGED(translated)->blockStatuses[freeBlock].eraseCount);
+ TRACE_DEBUG("Live block erase count = %d\n\r", MANAGED(translated)->blockStatuses[liveBlock].eraseCount);
+ eraseDifference = absv(MANAGED(translated)->blockStatuses[freeBlock].eraseCount
+ - MANAGED(translated)->blockStatuses[liveBlock].eraseCount);
+
+ /* Check if it is too big*/
+ if (eraseDifference > MAXERASEDIFFERENCE)
+ {
+ TRACE_WARNING("Erase difference too big, switching blocks\n\r");
+ MappedNandFlash_Map(
+ MAPPED(translated),
+ MappedNandFlash_PhysicalToLogical(
+ MAPPED(translated),
+ liveBlock),
+ freeBlock);
+ ManagedNandFlash_CopyBlock(MANAGED(translated),
+ liveBlock,
+ freeBlock);
+
+ /* Allocate a new block*/
+ return AllocateBlock(translated, block);
+ }
+ }
+
+ /* Map block*/
+ TRACE_DEBUG("Allocating PB#%d for LB#%d\n\r", freeBlock, block);
+ MappedNandFlash_Map(MAPPED(translated), block, freeBlock);
+
+ return 0;
+}
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Initializes a TranslatedNandFlash instance.
+ *
+ * \param translated Pointer to a TranslatedNandFlash instance.
+ * \param model Pointer to the underlying nand chip model. Can be 0.
+ * \param commandAddress Address at which commands are sent.
+ * \param addressAddress Address at which addresses are sent.
+ * \param dataAddress Address at which data is sent.
+ * \param pinChipEnable Pin controlling the CE signal of the NandFlash.
+ * \param pinReadyBusy Pin used to monitor the ready/busy signal of the Nand.
+ * \param baseBlock Basic physical block address of mapped area.
+ * \param sizeInBlocks Number of blocks that is mapped.
+ * \return 0 if successful; otherwise returns a NandCommon_ERROR_xxx code.
+ */
+uint8_t TranslatedNandFlash_Initialize(
+ struct TranslatedNandFlash *translated,
+ const struct NandFlashModel *model,
+ uint32_t commandAddress,
+ uint32_t addressAddress,
+ uint32_t dataAddress,
+ const Pin pinChipEnable,
+ const Pin pinReadyBusy,
+ uint16_t baseBlock,
+ uint16_t sizeInBlocks)
+{
+ translated->currentLogicalBlock = -1;
+ translated->previousPhysicalBlock = -1;
+ MarkAllPagesClean(translated);
+
+ /* Initialize MappedNandFlash*/
+ return MappedNandFlash_Initialize(MAPPED(translated),
+ model,
+ commandAddress,
+ addressAddress,
+ dataAddress,
+ pinChipEnable,
+ pinReadyBusy,
+ baseBlock,
+ sizeInBlocks);
+}
+
+/**
+ * \brief Reads the data and/or the spare area of a page on a translated nandflash.
+ * If the block is not currently mapped but could be (i.e. there are available
+ * physical blocks), then the data/spare is filled with 0xFF.
+ *
+ * \param translated Pointer to a TranslatedNandFlash instance.
+ * \param block Logical block number.
+ * \param page Number of page to read inside logical block.
+ * \param data Data area buffer, can be 0.
+ * \param spare Spare area buffer, can be 0.
+ * \return 0 if successful; otherwise returns NandCommon_ERROR_NOMOREBLOCKS
+ */
+uint8_t TranslatedNandFlash_ReadPage( const struct TranslatedNandFlash *translated, uint16_t block,
+ uint16_t page, void *data, void *spare )
+{
+ uint8_t error ;
+
+ TRACE_INFO("TranslatedNandFlash_ReadPage(B#%d:P#%d)\n\r", block, page);
+
+ /* If the page to read is in the current block, there is a previous physical
+ block and the page is clean -> read the page in the old block since the
+ new one does not contain meaningful data*/
+ if ( (block == translated->currentLogicalBlock) && (translated->previousPhysicalBlock != -1)
+ && (PageIsClean(translated, page)) )
+ {
+ TRACE_DEBUG("Reading page from current block\n\r");
+ return ManagedNandFlash_ReadPage( MANAGED( translated ), translated->previousPhysicalBlock,
+ page, data, spare ) ;
+ }
+ else
+ {
+ /* Try to read the page from the logical block*/
+ error = MappedNandFlash_ReadPage(MAPPED(translated), block, page, data, spare);
+
+ /* Block was not mapped*/
+ if ( error == NandCommon_ERROR_BLOCKNOTMAPPED )
+ {
+ assert( !spare ) ; /* "Cannot read the spare information of an unmapped block\n\r" */
+
+ /* Check if a block can be allocated*/
+ if ( BlockCanBeAllocated( translated ) )
+ {
+ /* Return 0xFF in buffers with no error*/
+ TRACE_DEBUG("Block #%d is not mapped but can be allocated, filling buffer with 0xFF\n\r", block);
+ if (data)
+ {
+ memset(data, 0xFF, NandFlashModel_GetPageDataSize(MODEL(translated)));
+ }
+ if (spare)
+ {
+ memset(spare, 0xFF, NandFlashModel_GetPageSpareSize(MODEL(translated)));
+ }
+ }
+ else
+ {
+ TRACE_ERROR("Block #%d is not mapped and there are no more blocks available\n\r", block);
+ return NandCommon_ERROR_NOMOREBLOCKS;
+ }
+ }
+ /* Error*/
+ else
+ {
+ if (error)
+ {
+ return error;
+ }
+ }
+ }
+
+ return 0;
+}
+
+/**
+ * \brief Writes the data and/or spare area of a page on a translated nandflash.
+ * Allocates block has needed to keep the wear even between all blocks.
+ *
+ * \param translated Pointer to a TranslatedNandFlash instance.
+ * \param block Logical block number.
+ * \param page Number of page to read inside logical block.
+ * \param data Data area buffer, can be 0.
+ * \param spare Spare area buffer, can be 0.
+ * \return 0 if successful; otherwise returns error code
+ */
+uint8_t TranslatedNandFlash_WritePage( struct TranslatedNandFlash *translated, uint16_t block,
+ uint16_t page, void *data, void *spare )
+{
+ uint8_t allocate = 1;
+ uint8_t error;
+
+ TRACE_INFO("TranslatedNandFlash_WritePage(B#%d:P#%d)\n\r", block, page);
+
+ /* A new block must be allocated unless:*/
+ /* 1. the block is not mapped and there are no more blocks to allocate*/
+ if (MappedNandFlash_LogicalToPhysical(MAPPED(translated), block) == -1)
+ {
+ /* Block is not mapped, check if it can be*/
+ if (!BlockCanBeAllocated(translated))
+ {
+ TRACE_ERROR("TranslatedNandFlash_WritePage: Not enough free blocks\n\r");
+ return NandCommon_ERROR_NOMOREBLOCKS;
+ }
+ TRACE_DEBUG("Allocate because block not mapped\n\r");
+ }
+ /* or 2. the block to write is the current one and the page to write is clean*/
+ else
+ {
+ if (translated->currentLogicalBlock == block)
+ {
+ if (PageIsClean(translated, page))
+ {
+ TRACE_DEBUG("NO allocate because write in current block\n\r");
+ allocate = 0;
+ }
+ else
+ {
+ TRACE_DEBUG("Allocate because page DIRTY in current block\n\r");
+ }
+ }
+ else
+ {
+ TRACE_DEBUG("Allocate because block is mapped and different from current block\n\r");
+ }
+ }
+
+ /* Allocate block if needed*/
+ if ( allocate )
+ {
+ /* Flush current block write (if any) and then allocate block*/
+ error = TranslatedNandFlash_Flush(translated);
+ if (error)
+ {
+ return error;
+ }
+ translated->previousPhysicalBlock = MappedNandFlash_LogicalToPhysical( MAPPED(translated), block ) ;
+ TRACE_DEBUG("Previous physical block is now #%d\n\r", translated->previousPhysicalBlock ) ;
+ error = AllocateBlock( translated, block ) ;
+ if ( error )
+ {
+ return error;
+ }
+
+ /* Block becomes the current block with all pages clean*/
+ translated->currentLogicalBlock = block;
+ MarkAllPagesClean(translated);
+ }
+
+ /* Start writing page*/
+ error = MappedNandFlash_WritePage(MAPPED(translated),
+ block,
+ page,
+ data,
+ spare);
+ if ( error )
+ {
+ return error;
+ }
+
+ /* If write went through, mark page as written*/
+ MarkPageDirty(translated, page);
+
+ return 0;
+}
+
+/**
+ * \brief Terminates the current write operation by copying all the missing pages from
+ * the previous physical block.
+ *
+ * \param translated Pointer to a TranslatedNandFlash instance.
+ * \return 0 if successful; otherwise returns error code
+ */
+uint8_t TranslatedNandFlash_Flush(struct TranslatedNandFlash *translated)
+{
+ uint32_t i;
+ uint8_t error;
+ uint32_t currentPhysicalBlock;
+
+ /* Check if there is a current block and a previous block*/
+ if ((translated->currentLogicalBlock == -1)
+ || (translated->previousPhysicalBlock == -1))
+ {
+ return 0;
+ }
+
+ TRACE_INFO("TranslatedNandFlash_Flush(PB#%d -> LB#%d)\n\r",
+ translated->previousPhysicalBlock, translated->currentLogicalBlock);
+
+ /* Copy missing pages in the current block*/
+ currentPhysicalBlock = MappedNandFlash_LogicalToPhysical(
+ MAPPED(translated),
+ translated->currentLogicalBlock);
+
+ for (i=0; i < NandFlashModel_GetBlockSizeInPages(MODEL(translated)); i++)
+ {
+ if (PageIsClean(translated, i))
+ {
+ TRACE_DEBUG("Copying back page #%d of block #%d\n\r", i, translated->previousPhysicalBlock);
+
+ /* Copy page*/
+ error = ManagedNandFlash_CopyPage(MANAGED(translated),
+ translated->previousPhysicalBlock,
+ i,
+ currentPhysicalBlock,
+ i);
+ if (error)
+ {
+ TRACE_ERROR("FinishCurrentWrite: copy page #%u\n\r", i);
+ return error;
+ }
+ }
+ }
+
+ translated->currentLogicalBlock = -1;
+ translated->previousPhysicalBlock = -1;
+ return 0;
+}
+
+/**
+ * \brief Erase all blocks in the tranalated area of nand flash.
+ *
+ * \param managed Pointer to a TranslatedNandFlash instance.
+ * \param level Erase level.
+ * \return 0 if successful; otherwise returns error code
+ */
+uint8_t TranslatedNandFlash_EraseAll(
+ struct TranslatedNandFlash *translated,
+ uint8_t level)
+{
+ MappedNandFlash_EraseAll(MAPPED(translated), level);
+
+ if (level > NandEraseDIRTY)
+ {
+ translated->currentLogicalBlock = -1;
+ translated->previousPhysicalBlock = -1;
+ MarkAllPagesClean(translated);
+ }
+ return 0;
+}
+
+/**
+ * \brief Allocates a free block to save the current logical mapping on it.
+ *
+ * \param translated Pointer to a TranslatedNandFlash instance.
+ * \return 0 if successful; otherwise returns a NandCommon_ERROR code.
+ */
+uint8_t TranslatedNandFlash_SaveLogicalMapping(
+ struct TranslatedNandFlash *translated)
+{
+ uint8_t error;
+ uint16_t freeBlock;
+
+ TRACE_INFO("TranslatedNandFlash_SaveLogicalMapping()\n\r");
+
+ /* Save logical mapping in the youngest free block*/
+ /* Find the youngest block*/
+ error = ManagedNandFlash_FindYoungestBlock(MANAGED(translated),
+ NandBlockStatus_FREE,
+ &freeBlock);
+ if (error)
+ {
+ TRACE_ERROR("TranNF_SaveLogicalMapping: No free block\n\r");
+ return error;
+ }
+
+ /* Check if this is the last free block, in which case dirty blocks are wiped
+ prior to saving the mapping */
+ if (ManagedNandFlash_CountBlocks(MANAGED(translated),
+ NandBlockStatus_FREE) == 1)
+ {
+ TranslatedNandFlash_Flush(translated);
+ error = ManagedNandFlash_EraseDirtyBlocks(MANAGED(translated));
+ if (error)
+ {
+ TRACE_ERROR("TranNF_Flush: Could not erase dirty blocks\n\r");
+ return error;
+ }
+ }
+
+ /* Save the mapping*/
+ error = MappedNandFlash_SaveLogicalMapping(MAPPED(translated), freeBlock);
+ if (error)
+ {
+ TRACE_ERROR("TranNF_Flush: Failed to save mapping in #%d\n\r", freeBlock);
+ return error;
+ }
+
+ return 0;
+}
+
+/**
+ * \brief Returns the number of available blocks in a translated nandflash.
+ *
+ * \param translated Pointer to a TranslatedNandFlash instance.
+ * \return the number of available blocks in a translated nandflash.
+ */
+uint16_t TranslatedNandFlash_GetDeviceSizeInBlocks( const struct TranslatedNandFlash *translated)
+{
+ return ManagedNandFlash_GetDeviceSizeInBlocks(MANAGED(translated))
+ - MINNUMUNALLOCATEDBLOCKS
+ - ManagedNandFlash_CountBlocks(MANAGED(translated),
+ NandBlockStatus_BAD)
+ - 1; /* Logical mapping block*/
+}
+
+/**
+ * \brief Returns the number of available pages in a translated nandflash.
+ *
+ * \param translated Pointer to a TranslatedNandFlash instance.
+ * \return the number of available pages in a translated nandflash.
+ */
+uint32_t TranslatedNandFlash_GetDeviceSizeInPages(
+ const struct TranslatedNandFlash *translated)
+{
+ return TranslatedNandFlash_GetDeviceSizeInBlocks(translated)
+ * NandFlashModel_GetBlockSizeInPages(MODEL(translated));
+}
+
+/**
+ * \brief Returns the number of available data bytes in a translated nandflash.
+ *
+ * \param translated Pointer to a TranslatedNandFlash instance.
+ * \return the number of available data bytes in a translated nandflash.
+ */
+unsigned long long TranslatedNandFlash_GetDeviceSizeInBytes(
+ const struct TranslatedNandFlash *translated)
+{
+ return TranslatedNandFlash_GetDeviceSizeInPages(translated)
+ * NandFlashModel_GetPageDataSize(MODEL(translated));
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/norflash/NorFlashAmd.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/norflash/NorFlashAmd.c
new file mode 100644
index 0000000..a90d65f
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/norflash/NorFlashAmd.c
@@ -0,0 +1,475 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+ * \file
+ *
+ * Implementation of norflash driver for AMD type.
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+#include "memories.h"
+
+#include <string.h>
+
+/*----------------------------------------------------------------------------
+ * Local definitions
+ *----------------------------------------------------------------------------*/
+
+/** Command for vendor command set CMD_SET_AMD. */
+#define AMD_CMD_IDOUT 0x00F0
+#define AMD_CMD_CFI 0x0098
+#define AMD_CMD_IDIN 0x0090
+#define AMD_CMD_UNLOCK_1 0x00AA
+#define AMD_CMD_UNLOCK_2 0x0055
+#define AMD_CMD_ERASE_SETUP 0x0080
+#define AMD_CMD_ERASE_RESUME 0x0030
+#define AMD_CMD_ERASE_CHIP 0x0010
+#define AMD_CMD_ERASE_SECTOR 0x0030
+#define AMD_CMD_PROGRAM 0x00A0
+#define AMD_CMD_UNLOCK_BYPASS 0x0020
+#define AMD_CMD_SECTOR_UNLOCK 0x0070
+
+/** Command offset for vendor command set CMD_SET_AMD */
+#define AMD_OFFSET_UNLOCK_1 0x05555
+#define AMD_OFFSET_UNLOCK_2 0x0AAAA
+/** Query command address. */
+#define FLASH_ADDRESS_CFI 0x0055
+
+/** AMD norflash device Identifier infomation address offset. */
+#define AMD_MANU_ID 0x00
+#define AMD_DEVIDE_ID 0x01
+
+/** Data polling mask for vendor command set CMD_SET_AMD */
+#define AMD_POLLING_DQ7 0x80
+#define AMD_POLLING_DQ6 0x60
+#define AMD_POLLING_DQ5 0x20
+#define AMD_POLLING_DQ3 0x08
+
+/*----------------------------------------------------------------------------
+ * Local functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief It implements a RESET command.
+ *
+ * \param pNorFlashInfo Pointer to an NorFlashInfo instance.
+ * \param address Dummy data for AMD.
+ */
+static void amd_Reset( NorFlashInfo *pNorFlashInfo, uint32_t address )
+{
+ uint8_t busWidth ;
+
+ /* remove warnings */
+ address = address;
+ busWidth = NorFlash_GetDataBusWidth( pNorFlashInfo ) ;
+
+ WriteCommand( busWidth, NorFlash_GetByteAddressInChip(pNorFlashInfo, AMD_OFFSET_UNLOCK_1), AMD_CMD_UNLOCK_1 ) ;
+
+ WriteCommand( busWidth, NorFlash_GetByteAddressInChip(pNorFlashInfo, AMD_OFFSET_UNLOCK_2), AMD_CMD_UNLOCK_2 ) ;
+
+ WriteCommand( busWidth, NorFlash_GetByteAddressInChip(pNorFlashInfo, AMD_OFFSET_UNLOCK_1), AMD_CMD_IDOUT ) ;
+}
+
+
+/**
+ * \brief Read specified manufactory id or device id.
+ *
+ * \param pNorFlashInfo Pointer to an NorFlashInfo instance.
+ * \param index_ 0: manufactorid 1: device id.
+ */
+static uint32_t amd_ReadIdentification( NorFlashInfo *pNorFlashInfo, uint8_t index_ )
+{
+ uint32_t id;
+ uint8_t busWidth;
+ uint32_t address;
+
+ busWidth = NorFlash_GetDataBusWidth( pNorFlashInfo ) ;
+
+ /* The amd_Read identification command sequence is initiated by first */
+ /* writing two unlock cycles. */
+ WriteCommand( busWidth, NorFlash_GetByteAddressInChip(pNorFlashInfo, AMD_OFFSET_UNLOCK_1), AMD_CMD_UNLOCK_1 ) ;
+ WriteCommand( busWidth, NorFlash_GetByteAddressInChip(pNorFlashInfo, AMD_OFFSET_UNLOCK_2), AMD_CMD_UNLOCK_2 ) ;
+
+ /* Followed by a third write cycle that contains the autoselect command. */
+ WriteCommand( busWidth, NorFlash_GetByteAddressInChip(pNorFlashInfo, AMD_OFFSET_UNLOCK_1), AMD_CMD_IDIN);
+
+ /* The device then enters the autoselect mode. It may read at any address any */
+ /* number of times without initiating another autoselect command sequence. */
+ address = NorFlash_GetByteAddressInChip(pNorFlashInfo, index_);
+ ReadRawData( busWidth, address, (uint8_t*)&id ) ;
+
+ /* The system must write the exit command to return to the read mode */
+ WriteCommand( busWidth, NorFlash_GetByteAddressInChip(pNorFlashInfo, AMD_OFFSET_UNLOCK_1), AMD_CMD_UNLOCK_1 ) ;
+ WriteCommand( busWidth, NorFlash_GetByteAddressInChip(pNorFlashInfo, AMD_OFFSET_UNLOCK_2), AMD_CMD_UNLOCK_2 ) ;
+ WriteCommand( busWidth, NorFlash_GetByteAddressInChip(pNorFlashInfo, AMD_OFFSET_UNLOCK_1), AMD_CMD_IDOUT ) ;
+
+ return id;
+}
+
+/**
+ * \brief It implement a program word command. Returns 0 if the operation was
+ * successful; otherwise returns an error code.
+ *
+ * \param pNorFlashInfo Pointer to an NorFlashInfo instance.
+ * \param address Start address offset to be wrote.
+ * \param data word to be written.
+ */
+static uint8_t amd_Program( NorFlashInfo *pNorFlashInfo, uint32_t address, uint32_t data )
+{
+ uint32_t pollingData;
+ uint32_t busAddress;
+ uint8_t done = 0;
+ uint8_t busWidth;
+
+ busWidth = NorFlash_GetDataBusWidth(pNorFlashInfo);
+
+ /* The program command sequence is initiated by writing two unlock write cycles. */
+ WriteCommand(busWidth,
+ NorFlash_GetByteAddressInChip(pNorFlashInfo, AMD_OFFSET_UNLOCK_1),
+ AMD_CMD_UNLOCK_1);
+ WriteCommand(busWidth,
+ NorFlash_GetByteAddressInChip(pNorFlashInfo, AMD_OFFSET_UNLOCK_2),
+ AMD_CMD_UNLOCK_2);
+ /* Followed by the program set-up command. */
+ WriteCommand(busWidth,
+ NorFlash_GetByteAddressInChip(pNorFlashInfo, AMD_OFFSET_UNLOCK_1),
+ AMD_CMD_PROGRAM);
+
+ /* The program address and data are written next, */
+ /* which in turn initiate the Embedded Program algorithm. */
+ busAddress = NorFlash_GetAddressInChip(pNorFlashInfo, address);
+ WriteRawData(busWidth, busAddress, (uint8_t*)&data);
+
+ /* Data polling */
+ do
+ {
+ ReadRawData(busWidth, busAddress, (uint8_t *)&pollingData);
+ /* Check if the chip program algorithm is completed. */
+ if ((pollingData & AMD_POLLING_DQ7) == (data & AMD_POLLING_DQ7))
+ {
+ /* Program operation successful. Device in read mode. */
+ done = 1;
+ }
+ else
+ {
+ /* check if chip Program algrithm exceeded timing limits */
+ if (pollingData & AMD_POLLING_DQ5 )
+ {
+ /* I/O should be rechecked. */
+ ReadRawData(busWidth, busAddress, (uint8_t *)&pollingData);
+
+ if ((pollingData & AMD_POLLING_DQ7) == (data & AMD_POLLING_DQ7))
+ {
+ /* Program operation successful. Device in read mode. */
+ done = 1;
+ }
+ else
+ {
+ /* Program operation not successful, write reset command. */
+ amd_Reset(pNorFlashInfo, 0);
+
+ return NorCommon_ERROR_CANNOTWRITE;
+ }
+ }
+ }
+ } while (!done);
+ return 0;
+}
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief It implements a RESET command.
+ *
+ * \param pNorFlashInfo Pointer to an NorFlashInfo instance.
+ * \param address Dummy data for AMD.
+ */
+void AMD_Reset( NorFlashInfo *pNorFlashInfo, uint32_t address )
+{
+ amd_Reset( pNorFlashInfo, address ) ;
+}
+
+/**
+ * \brief The Read Device Identifier command instructs the device to output
+ * manufacturer code.
+ *
+ * \param pNorFlashInfo Pointer to an NorFlashInfo instance.
+ */
+uint32_t AMD_ReadManufactoryId( NorFlashInfo *pNorFlashInfo )
+{
+ return amd_ReadIdentification(pNorFlashInfo, AMD_MANU_ID);
+}
+
+/**
+ * \brief The Read Device Identifier command instructs the device to output device id.
+ *
+ * \param pNorFlashInfo Pointer to an NorFlashInfo instance.
+ */
+uint32_t AMD_ReadDeviceID( NorFlashInfo *pNorFlashInfo )
+{
+ return amd_ReadIdentification(pNorFlashInfo, AMD_DEVIDE_ID);
+}
+
+/**
+ * \brief Erases the specified block of the device. Returns 0 if the operation was
+ * successful; otherwise returns an error code.
+ *
+ * \param pNorFlashInfo Pointer to an NorFlashInfo instance.
+ * \param address Address offset to be erase.
+ */
+uint8_t AMD_EraseSector( NorFlashInfo *pNorFlashInfo, uint32_t address )
+{
+ uint32_t pollingData;
+ uint32_t busAddress;
+ uint8_t busWidth;
+ uint8_t done = 0;
+
+ busWidth = NorFlash_GetDataBusWidth(pNorFlashInfo);
+
+ /*Programming is a six-bus-cycle operation. */
+ /* The erase command sequence is initiated by writing two unlock write cycles. */
+ WriteCommand( busWidth, NorFlash_GetByteAddressInChip(pNorFlashInfo, AMD_OFFSET_UNLOCK_1), AMD_CMD_UNLOCK_1);
+ WriteCommand( busWidth, NorFlash_GetByteAddressInChip(pNorFlashInfo, AMD_OFFSET_UNLOCK_2), AMD_CMD_UNLOCK_2);
+
+ /* Followed by the program set-up command. */
+ WriteCommand( busWidth, NorFlash_GetByteAddressInChip(pNorFlashInfo, AMD_OFFSET_UNLOCK_1), AMD_CMD_ERASE_SETUP);
+
+ /* Two additional unlock cycles are written. */
+ WriteCommand( busWidth, NorFlash_GetByteAddressInChip(pNorFlashInfo, AMD_OFFSET_UNLOCK_1), AMD_CMD_UNLOCK_1);
+ WriteCommand( busWidth, NorFlash_GetByteAddressInChip(pNorFlashInfo, AMD_OFFSET_UNLOCK_2), AMD_CMD_UNLOCK_2);
+
+ /* Followed by the address of the sector to be erased, and the sector erase command. */
+ busAddress = NorFlash_GetAddressInChip(pNorFlashInfo,address);
+ WriteCommand(busWidth, busAddress, AMD_CMD_ERASE_SECTOR);
+
+
+ /* Data polling */
+ do
+ {
+ ReadRawData(busWidth, busAddress, (uint8_t *)&pollingData);
+ /* Check if the chip erase algorithm is completed. */
+ if ((pollingData & AMD_POLLING_DQ7) == AMD_POLLING_DQ7 )
+ {
+ /* Erase operation successful. Device in read mode. */
+ done = 1;
+ }
+ else
+ {
+ /* check if sector earse algrithm exceeded timing limits */
+ if (pollingData & AMD_POLLING_DQ5 )
+ {
+ /* I/O should be rechecked. */
+ ReadRawData(busWidth, busAddress, (uint8_t *)&pollingData);
+ if ((pollingData & AMD_POLLING_DQ7) == AMD_POLLING_DQ7 )
+ {
+ /* Erase operation successful. Device in read mode. */
+ done = 1;
+ }
+ else
+ {
+ /* Erase operation not successful, write reset command. */
+ amd_Reset(pNorFlashInfo, 0);
+ return NorCommon_ERROR_CANNOTERASE;
+ }
+ }
+ }
+ } while (!done);
+
+ return 0;
+}
+
+/**
+ * \brief Erases all the block of the device. Returns 0 if the operation was successful;
+ * otherwise returns an error code.
+ *
+ * \param pNorFlashInfo Pointer to an NorFlashInfo instance.
+ */
+uint8_t AMD_EraseChip( NorFlashInfo *pNorFlashInfo )
+{
+ uint32_t pollingData;
+ uint8_t busWidth;
+ uint32_t address;
+ uint8_t done = 0;
+
+ busWidth = NorFlash_GetDataBusWidth(pNorFlashInfo);
+
+ /*Programming is a six-bus-cycle operation. */
+ /* The erase command sequence is initiated by writing two unlock write cycles. */
+ WriteCommand( busWidth, NorFlash_GetByteAddressInChip(pNorFlashInfo, AMD_OFFSET_UNLOCK_1), AMD_CMD_UNLOCK_1 ) ;
+ WriteCommand( busWidth, NorFlash_GetByteAddressInChip(pNorFlashInfo, AMD_OFFSET_UNLOCK_2), AMD_CMD_UNLOCK_2 ) ;
+
+ /* Followed by the program set-up command. */
+ WriteCommand( busWidth, NorFlash_GetByteAddressInChip(pNorFlashInfo, AMD_OFFSET_UNLOCK_1), AMD_CMD_ERASE_SETUP);
+
+ /* Two additional unlock cycles are written. */
+ WriteCommand( busWidth, NorFlash_GetByteAddressInChip(pNorFlashInfo, AMD_OFFSET_UNLOCK_1), AMD_CMD_UNLOCK_1);
+ WriteCommand( busWidth, NorFlash_GetByteAddressInChip(pNorFlashInfo, AMD_OFFSET_UNLOCK_2), AMD_CMD_UNLOCK_2 ) ;
+
+ /* Then followed by the chip erase command. */
+ WriteCommand( busWidth, NorFlash_GetByteAddressInChip(pNorFlashInfo, AMD_OFFSET_UNLOCK_1), AMD_CMD_ERASE_CHIP ) ;
+
+ address = NorFlash_GetByteAddressInChip(pNorFlashInfo, 0);
+
+ /* Data polling */
+ do
+ {
+ ReadRawData(busWidth , address, (uint8_t*)&pollingData);
+ /* Check if the chip erase algorithm is completed. */
+ if ((pollingData & AMD_POLLING_DQ7) == AMD_POLLING_DQ7 )
+ {
+ /* Erase operation successful. Device in read mode. */
+ done = 1;
+ }
+ else
+ {
+ /* When the time-out period is complete, DQ3 switches from a ¡°0¡± to a ¡°1.¡± */
+ if (pollingData & AMD_POLLING_DQ3 )
+ {
+ return NorCommon_ERROR_CANNOTERASE;
+ }
+
+ /* check if chip earse algrithm exceeded timing limits */
+ if (pollingData & AMD_POLLING_DQ5 )
+ {
+
+ /* I/O should be rechecked. */
+ ReadRawData(busWidth , address, (uint8_t*)&pollingData);
+ if ((pollingData & AMD_POLLING_DQ7) == AMD_POLLING_DQ7 )
+ {
+ /* Erase operation successful. Device in read mode. */
+ done = 1;
+ }
+ else
+ {
+ /* Erase operation not successful, write reset command. */
+ amd_Reset(pNorFlashInfo, 0);
+ return NorCommon_ERROR_CANNOTERASE;
+ }
+ }
+ }
+ } while (!done);
+
+ return 0;
+}
+
+/**
+ * \brief Unlock the specified block of the device.
+ *
+ * \param pNorFlashInfo Pointer to an NorFlashInfo instance.
+ * \param address Address offset to be unlock.
+ */
+void AMD_UnlockSector( NorFlashInfo *pNorFlashInfo, uint32_t address )
+{
+ uint32_t busAddress;
+ uint8_t busWidth;
+
+ busWidth = NorFlash_GetDataBusWidth(pNorFlashInfo);
+ busAddress = NorFlash_GetAddressInChip(pNorFlashInfo,address);
+ WriteCommand( busWidth, NorFlash_GetByteAddressInChip(pNorFlashInfo, AMD_OFFSET_UNLOCK_1), AMD_CMD_UNLOCK_1);
+ WriteCommand( busWidth,busAddress, AMD_CMD_SECTOR_UNLOCK);
+}
+/**
+ * \brief Sends data to the NorFlashInfo chip from the provided buffer.
+ *
+ * \param pNorFlashInfo Pointer to an NorFlashInfo instance.
+ * \param address Start address offset to be wrote.
+ * \param buffer Buffer where the data is stored.
+ * \param size Number of bytes that will be written.
+ */
+uint8_t AMD_Write_Data( NorFlashInfo *pNorFlashInfo, uint32_t address, uint8_t *buffer, uint32_t size )
+{
+ uint32_t i;
+ uint8_t busWidth;
+ busWidth = pNorFlashInfo->deviceChipWidth;
+
+ if (busWidth == FLASH_CHIP_WIDTH_8BITS )
+ {
+ for(i=0; i < size; i++)
+ {
+ if(amd_Program(pNorFlashInfo, address, buffer[i]))
+ {
+ return NorCommon_ERROR_CANNOTWRITE;
+ }
+ address ++;
+ }
+ }
+ else
+ {
+ if( busWidth == FLASH_CHIP_WIDTH_16BITS )
+ {
+ uint16_t *buffer16 = (uint16_t *) (void *)buffer;
+
+ size = (size + 1) >> 1;
+
+ for(i=0; i < size; i++)
+ {
+ if(amd_Program(pNorFlashInfo, address, buffer16[i]))
+ {
+ return NorCommon_ERROR_CANNOTWRITE;
+ }
+ address+= 2;
+ }
+ }
+ else
+ {
+ if(busWidth == FLASH_CHIP_WIDTH_32BITS )
+ {
+ uint32_t *buffer32 = (uint32_t *)(void *) buffer;
+
+ size = (size + 3) >> 2;
+
+ for(i=0; i < size; i++)
+ {
+ if(amd_Program(pNorFlashInfo, address, buffer32[i]))
+ {
+ return NorCommon_ERROR_CANNOTWRITE;
+ }
+ address+= 4;
+ }
+ }
+ }
+ }
+
+ return 0;
+}
+
+const NorFlashOperations amdOperations =
+{
+ AMD_Reset,
+ AMD_Write_Data,
+ AMD_ReadManufactoryId,
+ AMD_ReadDeviceID,
+ AMD_EraseChip,
+ AMD_EraseSector,
+ AMD_UnlockSector
+} ;
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/norflash/NorFlashApi.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/norflash/NorFlashApi.c
new file mode 100644
index 0000000..d2e07c4
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/norflash/NorFlashApi.c
@@ -0,0 +1,160 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+ * \file
+ *
+ * Implementation of nor flash api interface.
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "memories.h"
+
+#include <string.h>
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief It will invokes different associate function to implement a RESET command.
+ *
+ * \param pNorFlash Pointer to a NorFlash instance.
+ * \param address Address offset.
+ */
+void NORFLASH_Reset( NorFlash *pNorFlash, uint32_t address)
+{
+ ((pNorFlash->pOperations)->_fReset)(&(pNorFlash->norFlashInfo), address);
+}
+
+/**
+ * \brief It will invokes associate function to implement a read manufactory ID command.
+ *
+ * \param pNorFlash Pointer to a NorFlash instance.
+ */
+uint32_t NORFLASH_ReadManufactoryID( NorFlash *pNorFlash)
+{
+ return ((pNorFlash->pOperations)->_fReadManufactoryID)(&(pNorFlash->norFlashInfo));
+}
+
+/**
+ * \brief It will invokes associate function to implement a read device ID command.
+ * ID command.
+ *
+ * \param pNorFlash Pointer to a NorFlash instance.
+ */
+uint32_t NORFLASH_ReadDeviceID( NorFlash *pNorFlash)
+{
+ return ((pNorFlash->pOperations)->_fReadDeviceID)(&(pNorFlash->norFlashInfo));
+}
+
+/**
+ * \brief Erases the specified block of the device. Returns 0 if the operation was
+ * successful; otherwise returns an error code.
+ *
+ * \param pNorFlash Pointer to a NorFlash instance.
+ * \param address Address offset to be erase.
+ */
+uint8_t NORFLASH_EraseSector( NorFlash *pNorFlash, uint32_t address)
+{
+ return ((pNorFlash->pOperations)->_fEraseSector)(&(pNorFlash->norFlashInfo), address);
+}
+
+/**
+ * \brief Erases all the block of the device. Returns 0 if the operation was successful;
+ * otherwise returns an error code.
+ *
+ * \param pNorFlash Pointer to a NorFlash instance.
+ */
+uint8_t NORFLASH_EraseChip( NorFlash *pNorFlash )
+{
+ return ((pNorFlash->pOperations)->_fEraseChip)(&(pNorFlash->norFlashInfo));
+}
+/**
+ * \brief Unlock the specified block of the device.
+ *
+ * \param pNorFlash Pointer to a NorFlash instance.
+ * \param address Address offset to be unlock.
+ */
+void NORFLASH_UnlockSector( NorFlash *pNorFlash, uint32_t address)
+{
+ ((pNorFlash->pOperations)->_fUnlockSector)(&(pNorFlash->norFlashInfo), address);
+}
+/**
+ * \brief Sends data to the pNorFlash chip from the provided buffer.
+ *
+ * \param pNorFlash Pointer to a NorFlash instance.
+ * \param address Start address offset to be wrote.
+ * \param buffer Buffer where the data is stored.
+ * \param size Number of bytes that will be written.
+ */
+uint8_t NORFLASH_WriteData( NorFlash *pNorFlash, uint32_t address, uint8_t *buffer, uint32_t size)
+{
+ return ((pNorFlash->pOperations)->_fWriteData)(&(pNorFlash->norFlashInfo), address, buffer, size);
+}
+
+/**
+ * \brief Reads data from the NandFlash chip into the provided buffer.
+ *
+ * \param pNorFlash Pointer to a NorFlash instance.
+ * \param address Start address offset to be wrote.
+ * \param buffer Buffer where the data will be stored.
+ * \param size Number of bytes that will be read.
+ */
+uint8_t NORFLASH_ReadData( NorFlash *pNorFlash, uint32_t address, uint8_t *buffer, uint32_t size)
+{
+ uint32_t busAddress;
+ uint8_t busWidth;
+ uint32_t i;
+
+ busWidth = NorFlash_GetDataBusWidth(&(pNorFlash->norFlashInfo));
+ busAddress = NorFlash_GetAddressInChip(&(pNorFlash->norFlashInfo), address);
+
+ if ((busWidth / 8 ) == FLASH_CHIP_WIDTH_16BITS )
+ {
+ size = (size + 1) >> 1;
+ }
+
+ if ((busWidth/8) == FLASH_CHIP_WIDTH_32BITS )
+ {
+ size = (size + 3) >> 2;
+ }
+
+ for(i = 0; i < size; i++)
+ {
+ ReadRawData(busWidth, busAddress, buffer);
+ buffer+= (busWidth / 8);
+ busAddress+= (busWidth / 8);
+
+ }
+
+ return 0;
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/norflash/NorFlashCFI.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/norflash/NorFlashCFI.c
new file mode 100644
index 0000000..e60fe07
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/norflash/NorFlashCFI.c
@@ -0,0 +1,415 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+ * \file
+ *
+ * Implementation of norflash common flash interface functions.
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "memories.h"
+
+#include <string.h>
+
+/*----------------------------------------------------------------------------
+ * Local definitions
+ *----------------------------------------------------------------------------*/
+
+#define DUMP_CFI
+
+/*----------------------------------------------------------------------------
+ * Local functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Dump the Common Flash Interface Definition Table.
+ *
+ * \param pNorFlashCFI Pointer to an NorFlashCFI instance.
+ */
+static void NorFlash_CFI_DumpConfiguration( NorFlashCFI *pNorFlashCFI )
+{
+ uint8_t i ;
+
+ TRACE_DEBUG("Common Flash Interface Definition Table\n\r");
+ TRACE_DEBUG("Addr. Data Description \n\r");
+ TRACE_DEBUG("0x10 %04Xh Query Unique ASCII string\n\r",
+ pNorFlashCFI->norFlashCfiQueryInfo.queryUniqueString[0]);
+ TRACE_DEBUG("0x11 %04Xh \n\r",
+ pNorFlashCFI->norFlashCfiQueryInfo.queryUniqueString[1]);
+ TRACE_DEBUG("0x12 %04Xh \n\r",
+ pNorFlashCFI->norFlashCfiQueryInfo.queryUniqueString[2]);
+ TRACE_DEBUG("0x13 %04Xh Primary OEM Command Set\n\r",
+ pNorFlashCFI->norFlashCfiQueryInfo.primaryCode);
+ TRACE_DEBUG("0x15 %04Xh Address for Primary Extended Table\n\r",
+ pNorFlashCFI->norFlashCfiQueryInfo.primaryAddr);
+ TRACE_DEBUG("0x17 %04Xh Alternate OEM Command Set\n\r",
+ pNorFlashCFI->norFlashCfiQueryInfo.alternateCode);
+ TRACE_DEBUG("0x19 %04Xh Address for Alternate OEM Extended Table\n\r",
+ pNorFlashCFI->norFlashCfiQueryInfo.alternateAddr);
+ TRACE_DEBUG("0x1B %04Xh VCC min write/erase\n\r",
+ pNorFlashCFI->norFlashCfiQueryInfo.minVcc);
+ TRACE_DEBUG("0x1C %04Xh VCC max write/erase\n\r",
+ pNorFlashCFI->norFlashCfiQueryInfo.maxVcc);
+ TRACE_DEBUG("0x1D %04Xh VPP min voltage\n\r",
+ pNorFlashCFI->norFlashCfiQueryInfo.minVpp);
+ TRACE_DEBUG("0x1E %04Xh VPP max voltage\n\r",
+ pNorFlashCFI->norFlashCfiQueryInfo.maxVpp);
+ TRACE_DEBUG("0x1F %04Xh Typical timeout per single word write\n\r",
+ pNorFlashCFI->norFlashCfiQueryInfo.minTimeOutWrite);
+ TRACE_DEBUG("0x20 %04Xh Typical timeout for Min. size buffer write\n\r",
+ pNorFlashCFI->norFlashCfiQueryInfo.minTimeOutBuffer);
+ TRACE_DEBUG("0x21 %04Xh Typical timeout per individual block erase\n\r",
+ pNorFlashCFI->norFlashCfiQueryInfo.minTimeOutBlockErase);
+ TRACE_DEBUG("0x22 %04Xh Typical timeout for full chip erase\n\r",
+ pNorFlashCFI->norFlashCfiQueryInfo.minTimeOutChipErase);
+ TRACE_DEBUG("0x23 %04Xh Max. timeout for word write\n\r",
+ pNorFlashCFI->norFlashCfiQueryInfo.maxTimeOutWrite);
+ TRACE_DEBUG("0x24 %04Xh Max. timeout for buffer write\n\r",
+ pNorFlashCFI->norFlashCfiQueryInfo.maxTimeOutBuffer);
+ TRACE_DEBUG("0x25 %04Xh Max. timeout per individual block erase\n\r",
+ pNorFlashCFI->norFlashCfiQueryInfo.maxTimeOutBlockErase);
+ TRACE_DEBUG("0x26 %04Xh Max. timeout for full chip erase\n\r",
+ pNorFlashCFI->norFlashCfiQueryInfo.maxTimeOutChipErase);
+
+ TRACE_DEBUG("0x27 %04Xh Device Size = 2N byte\n\r",
+ pNorFlashCFI->norFlashCfiDeviceGeometry.deviceSize);
+ TRACE_DEBUG("0x28 %04Xh Flash Device Interface description\n\r",
+ pNorFlashCFI->norFlashCfiDeviceGeometry.deviceInterface);
+ TRACE_DEBUG("0x2A %04Xh Max. number of byte in multi-byte write\n\r",
+ pNorFlashCFI->norFlashCfiDeviceGeometry.numMultiWrite);
+ TRACE_DEBUG("0x2C %04Xh Number of Erase Block Regions within device\n\r",
+ pNorFlashCFI->norFlashCfiDeviceGeometry.numEraseRegion);
+
+ for(i = 0; i < pNorFlashCFI->norFlashCfiDeviceGeometry.numEraseRegion; i++)
+ {
+ TRACE_DEBUG("0x%2X %04Xh Number of Erase Blocks of identical size within region %x \n\r",
+ 0x2D + i * 4, pNorFlashCFI->norFlashCfiDeviceGeometry.eraseRegionInfo[i].Y, i );
+ TRACE_DEBUG("0x%2X %04Xh (z) times 256 bytes within region %x \n\r",
+ 0x2E + i * 4, pNorFlashCFI->norFlashCfiDeviceGeometry.eraseRegionInfo[i].Z, i );
+ }
+}
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Returns the numbers of block in all Norflash regions.
+ *
+ * \param pNorFlashInfo Pointer to a NorFlashInfo instance.
+ */
+uint32_t NorFlash_GetDeviceNumOfBlocks( NorFlashInfo *pNorFlashInfo )
+{
+ uint8_t i;
+ uint32_t blocks = 0;
+ uint16_t numBlockRegion;
+
+ numBlockRegion = pNorFlashInfo->cfiDescription.norFlashCfiDeviceGeometry.numEraseRegion;
+
+ for (i = 0; i < numBlockRegion; i++)
+ {
+ blocks += (pNorFlashInfo->cfiDescription.norFlashCfiDeviceGeometry.eraseRegionInfo[i]).Y + 1;
+ }
+
+ return blocks;
+}
+
+/**
+ * \brief Returns the minimun block size in all Norflash regions.
+ *
+ * \param pNorFlashInfo Pointer to a NorFlashInfo instance.
+ */
+uint32_t NorFlash_GetDeviceMinBlockSize( NorFlashInfo *pNorFlashInfo )
+{
+ uint8_t i;
+ uint16_t numBlockRegion;
+ uint32_t size ;
+ uint32_t dwTemp ;
+
+ numBlockRegion = pNorFlashInfo->cfiDescription.norFlashCfiDeviceGeometry.numEraseRegion;
+
+ size = (pNorFlashInfo->cfiDescription.norFlashCfiDeviceGeometry.eraseRegionInfo[0].Z) * 256;
+
+ for ( i = 1; i < numBlockRegion; i++ )
+ {
+ dwTemp=(pNorFlashInfo->cfiDescription.norFlashCfiDeviceGeometry.eraseRegionInfo[i].Z) * 256 ;
+
+ if (size > dwTemp )
+ {
+ size = dwTemp ;
+ }
+ }
+
+ return size;
+}
+
+/**
+ * \brief Returns the maximun block size in all Norflash regions.
+ *
+ * \param pNorFlashInfo Pointer to a NorFlashInfo instance.
+ */
+uint32_t NorFlash_GetDeviceMaxBlockSize( NorFlashInfo* pNorFlashInfo )
+{
+ uint8_t i;
+ uint16_t numBlockRegion;
+ uint32_t size ;
+ uint32_t dwTemp ;
+
+ numBlockRegion = pNorFlashInfo->cfiDescription.norFlashCfiDeviceGeometry.numEraseRegion;
+
+ size = (pNorFlashInfo->cfiDescription.norFlashCfiDeviceGeometry.eraseRegionInfo[0].Z) * 256;
+
+ for (i = 1; i < numBlockRegion; i++)
+ {
+ dwTemp=(pNorFlashInfo->cfiDescription.norFlashCfiDeviceGeometry.eraseRegionInfo[i].Z) * 256 ;
+
+ if (size < dwTemp )
+ {
+ size = dwTemp ;
+ }
+ }
+ return size;
+}
+
+/**
+ * \brief Returns the block size in giving block number.
+ *
+ * \param pNorFlashInfo Pointer to a NorFlashInfo instance.
+ * \param sector Sector number.
+ */
+uint32_t NorFlash_GetDeviceBlockSize( NorFlashInfo* pNorFlashInfo, uint32_t sector )
+{
+ uint16_t i;
+ uint16_t j;
+ uint16_t numBlockRegion ;
+ uint16_t numBlockPerRegion ;
+ uint32_t block = 0;
+
+ numBlockRegion = pNorFlashInfo->cfiDescription.norFlashCfiDeviceGeometry.numEraseRegion;
+
+ for (i = 0; i < numBlockRegion; i++)
+ {
+ numBlockPerRegion = (pNorFlashInfo->cfiDescription.norFlashCfiDeviceGeometry.eraseRegionInfo[i]).Y + 1;
+
+ for (j = 0; j < numBlockPerRegion; j++)
+ {
+ if (block == sector)
+ {
+ return (pNorFlashInfo->cfiDescription.norFlashCfiDeviceGeometry.eraseRegionInfo[i].Z) * 256 ;
+ }
+ block++;
+ }
+ }
+ return 0;
+}
+
+/**
+ * \brief Returns secort number on specified memory offset.
+ *
+ * \param pNorFlashInfo Pointer to a NorFlashInfo instance.
+ * \param memoryOffset Memory offset.
+ */
+uint16_t NorFlash_GetDeviceSectorInRegion( NorFlashInfo *pNorFlashInfo, uint32_t memoryOffset )
+{
+ uint16_t numBlockRegion,numBlockPerRegion;
+ uint16_t sectorId = 0;
+ uint32_t size = 0;
+ uint8_t done = 0;
+ uint16_t i , j;
+
+ numBlockRegion = pNorFlashInfo->cfiDescription.norFlashCfiDeviceGeometry.numEraseRegion;
+
+ for ( i=0 ; (i < numBlockRegion) && (done == 0) ; i++ )
+ {
+ numBlockPerRegion = (pNorFlashInfo->cfiDescription.norFlashCfiDeviceGeometry.eraseRegionInfo[i]).Y + 1;
+
+ for (j = 0; j < numBlockPerRegion; j++)
+ {
+ size+= (pNorFlashInfo->cfiDescription.norFlashCfiDeviceGeometry.eraseRegionInfo[i].Z) * 256 ;
+
+ if ( size > memoryOffset )
+ {
+ done = 1;
+ break;
+ }
+ sectorId++;
+ }
+ }
+
+ return sectorId;
+}
+
+/**
+ * \brief Returns start address of specified sector number.
+ *
+ * \param pNorFlashInfo Pointer to a NorFlashInfo instance.
+ * \param sector Sector number.
+ */
+uint32_t NorFlash_GetDeviceSectorAddress( NorFlashInfo *pNorFlashInfo, uint32_t sector )
+{
+ uint16_t numBlockRegion,numBlockPerRegion;
+ uint16_t sectorId = 0;
+ uint32_t address = 0;
+ uint8_t done = 0;
+ uint16_t i , j;
+
+ numBlockRegion = pNorFlashInfo->cfiDescription.norFlashCfiDeviceGeometry.numEraseRegion;
+
+ for ( i = 0 ; (i < numBlockRegion) && (done == 0) ; i++ )
+ {
+ numBlockPerRegion = (pNorFlashInfo->cfiDescription.norFlashCfiDeviceGeometry.eraseRegionInfo[i]).Y + 1;
+
+ for ( j = 0; j < numBlockPerRegion; j++ )
+ {
+ if (sector == sectorId)
+ {
+ done = 1;
+ break;
+ }
+
+ address+= (pNorFlashInfo->cfiDescription.norFlashCfiDeviceGeometry.eraseRegionInfo[i].Z) * 256 ;
+ sectorId++;
+ }
+ }
+
+ return address;
+}
+
+/**
+ * \brief Convert address to byte addressing.
+ *
+ * \param pNorFlashInfo Pointer to a NorFlashInfo instance.
+ * \Param offset Address offset
+ */
+uint32_t NorFlash_GetByteAddress( NorFlashInfo *pNorFlashInfo, uint32_t offset )
+{
+ return (offset * pNorFlashInfo-> deviceChipWidth);
+}
+
+/**
+ * \brief Convert address to byte addressing and return the address in chip.
+ *
+ * \param pNorFlashInfo Pointer to a NorFlashInfo instance.
+ * \Param offset Address offset
+ */
+uint32_t NorFlash_GetByteAddressInChip( NorFlashInfo *pNorFlashInfo, uint32_t offset )
+{
+ return (pNorFlashInfo->baseAddress + (offset * pNorFlashInfo-> deviceChipWidth));
+}
+
+/**
+ * \brief Returns the address in chip.
+ *
+ * \param pNorFlashInfo Pointer to a NorFlashInfo instance.
+ * \Param offset Address offset
+ */
+uint32_t NorFlash_GetAddressInChip( NorFlashInfo *pNorFlashInfo, uint32_t offset )
+{
+ return (pNorFlashInfo->baseAddress + offset);
+}
+
+/**
+ * \brief Returns bus width in bits of giving device.
+ *
+ * \param pNorFlashInfo Pointer to a NorFlashInfo instance.
+ */
+uint8_t NorFlash_GetDataBusWidth( NorFlashInfo *pNorFlashInfo )
+{
+ return (pNorFlashInfo->deviceChipWidth * 8);
+}
+
+/**
+ * \brief Returns the size of the whole device in bytes.
+ *
+ * \param pNorFlashInfo Pointer to a NorFlashInfo instance.
+ */
+uint32_t NorFlash_GetDeviceSizeInBytes( NorFlashInfo *pNorFlashInfo )
+{
+ return ((uint32_t) 2 << ((pNorFlashInfo->cfiDescription.norFlashCfiDeviceGeometry.deviceSize) - 1));
+}
+
+/**
+ * \brief Looks for query struct in Norflash common flash interface.
+ * If found, the model variable is filled with the correct values.
+ * This function returns 0 if a matching model has been found; otherwise it
+ * returns NorCommon_ERROR_UNKNOWNMODEL.
+ */
+uint8_t NorFlash_CFI_Detect( NorFlash *pNorFlash, uint8_t hardwareBusWidth )
+{
+ uint8_t i;
+ uint8_t *pCfi = (uint8_t*)(&(pNorFlash->norFlashInfo.cfiDescription));
+ uint32_t address;
+
+ pNorFlash->norFlashInfo.cfiCompatible = 0;
+ pNorFlash->norFlashInfo.deviceChipWidth = hardwareBusWidth;
+ address = CFI_QUERY_OFFSET;
+
+ for ( i = 0; i< sizeof( NorFlashInfo) ; i++)
+ {
+ WriteCommand(8, NorFlash_GetByteAddressInChip(&(pNorFlash->norFlashInfo), CFI_QUERY_ADDRESS), CFI_QUERY_COMMAND);
+ ReadRawData(8, NorFlash_GetByteAddressInChip(&(pNorFlash->norFlashInfo), address), pCfi);
+ address++;
+ pCfi++;
+ }
+
+ /* Check the query-unique ASCII string "QRY" */
+ if ( (pNorFlash->norFlashInfo.cfiDescription.norFlashCfiQueryInfo.queryUniqueString[0] != 'Q' )
+ || (pNorFlash->norFlashInfo.cfiDescription.norFlashCfiQueryInfo.queryUniqueString[1] != 'R')
+ || (pNorFlash->norFlashInfo.cfiDescription.norFlashCfiQueryInfo.queryUniqueString[2] != 'Y') )
+ {
+ return NorCommon_ERROR_UNKNOWNMODEL;
+ }
+
+#ifdef DUMP_CFI
+ NorFlash_CFI_DumpConfiguration( &(pNorFlash->norFlashInfo.cfiDescription) ) ;
+#endif
+
+ if (pNorFlash->norFlashInfo.cfiDescription.norFlashCfiQueryInfo.primaryCode == CMD_SET_AMD)
+ {
+ pNorFlash->pOperations = &amdOperations;
+ }
+ else if ((pNorFlash->norFlashInfo.cfiDescription.norFlashCfiQueryInfo.primaryCode == CMD_SET_INTEL_EXT)
+ || (pNorFlash->norFlashInfo.cfiDescription.norFlashCfiQueryInfo.primaryCode == CMD_SET_INTEL))
+ {
+ pNorFlash->pOperations = &intelOperations;
+ }
+ else
+ {
+ return NorCommon_ERROR_UNKNOWNMODEL;
+ }
+
+ pNorFlash->norFlashInfo.cfiCompatible = 1;
+ NORFLASH_Reset(pNorFlash, 0);
+
+ return 0;
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/norflash/NorFlashCommon.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/norflash/NorFlashCommon.c
new file mode 100644
index 0000000..709eaf9
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/norflash/NorFlashCommon.c
@@ -0,0 +1,148 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+ * \file
+ *
+ * Implementation of norflash common functions.
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "memories.h"
+
+#include <string.h>
+
+/*----------------------------------------------------------------------------
+ * Macros
+ *----------------------------------------------------------------------------*/
+
+#define WRITE_COMMAND8(commandAddress, command) \
+ {*(volatile unsigned char *)(commandAddress) = (unsigned char) command;}
+#define WRITE_COMMAND16(commandAddress, command) \
+ {*(volatile unsigned short *)(commandAddress) = (unsigned short) command;}
+#define WRITE_COMMAND32(commandAddress, command) \
+ {*(volatile unsigned int *)(commandAddress) = (unsigned int) command;}
+
+#define WRITE_DATA8(dataAddress, data) \
+ {(*((volatile unsigned char *) dataAddress)) = (unsigned char) data;}
+#define WRITE_DATA16(dataAddress, data) \
+ {(*((volatile unsigned short *) dataAddress)) = (unsigned short) data;}
+#define WRITE_DATA32(dataAddress, data) \
+ {(*((volatile unsigned int *) dataAddress)) = (unsigned int) data;}
+
+#define READ_DATA8(dataAddress) \
+ (*((volatile unsigned char *) dataAddress))
+#define READ_DATA16(dataAddress) \
+ (*((volatile unsigned short *) dataAddress))
+#define READ_DATA32(dataAddress) \
+ (*((volatile unsigned int *) dataAddress))
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief Write a command to address.
+ *
+ * \param busWidth Bus width in device.
+ * \param commandAddress Command address offset.
+ * \param command Command to be send.
+ */
+unsigned char WriteCommand(
+ unsigned char busWidth,
+ unsigned int commandAddress,
+ unsigned int command)
+{
+ if (busWidth == 8 ){
+ WRITE_COMMAND8(commandAddress, command);
+ }
+ else if( busWidth == 16 ){
+ WRITE_COMMAND16(commandAddress, command);
+ }
+ else if(busWidth == 32 ){
+ WRITE_COMMAND32(commandAddress, command);
+ }
+ return 0;
+}
+
+
+/**
+ * \brief Reads data from the NorFlash chip into the provided buffer.
+ *
+ * \param busWidth Bus width in device.
+ * \param address Address of data.
+ * \param buffer Buffer where the data will be stored.
+ */
+void ReadRawData(
+ unsigned char busWidth,
+ unsigned int address,
+ unsigned char *buffer)
+{
+ if (busWidth == 8 ){
+ *buffer = READ_DATA8(address);
+ }
+ else if( busWidth == 16 ){
+
+ unsigned short *buffer16 = (unsigned short *)(void *) buffer;
+ *buffer16 = READ_DATA16(address);
+ }
+ else if(busWidth == 32 ){
+ unsigned int *buffer32 = (unsigned int *) (void *)buffer;
+ *buffer32 = READ_DATA32(address);
+ }
+}
+
+/**
+ * \brief Writes data to the NorFlash chip from the provided buffer.
+ *
+ * \param busWidth Bus width in device.
+ * \param address Address of data.
+ * \param buffer Buffer where the data will be stored.
+ */
+void WriteRawData(
+ unsigned char busWidth,
+ unsigned int address,
+ unsigned char *buffer)
+
+{
+ if (busWidth == 8 ){
+ WRITE_DATA8(address, *buffer);
+ }
+ else if( busWidth == 16 ){
+ unsigned short *buffer16 = (unsigned short *)(void *) buffer;
+ WRITE_DATA16(address, *buffer16);
+ }
+ else if(busWidth == 32 ){
+ unsigned int *buffer32 = (unsigned int *)(void *) buffer;
+ WRITE_DATA32(address, *buffer32);
+ }
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/norflash/NorFlashIntel.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/norflash/NorFlashIntel.c
new file mode 100644
index 0000000..f467645
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/norflash/NorFlashIntel.c
@@ -0,0 +1,477 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2009, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+/**
+ * \file
+ *
+ * Implementation of nor flash low level driver of intel instruction type.
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "memories.h"
+
+#include <string.h>
+
+/*----------------------------------------------------------------------------
+ * Local definitions
+ *----------------------------------------------------------------------------*/
+
+/** Command for vendor command set CMD_SET_INTEL. Device commands are written
+ * to the Command User Interface (CUI) to control all flash memory device operations. */
+#define INTEL_CMD_IDIN 0x0090
+#define INTEL_CMD_BLOCK_ERASE_1 0x0020
+#define INTEL_CMD_BLOCK_ERASE_2 0x00D0
+#define INTEL_CMD_READ_STATUS 0x0070
+#define INTEL_CMD_CLEAR_STATUS 0x0050
+#define INTEL_CMD_BLOCK_LOCKSTART 0x0060
+#define INTEL_CMD_BLOCK_LOCK 0x0001
+#define INTEL_CMD_BLOCK_UNLOCK 0x00D0
+#define INTEL_CMD_BLOCK_LOCKDOWN 0x002F
+#define INTEL_CMD_PROGRAM_WORD 0x0010
+#define INTEL_CMD_RESET 0x00FF
+
+/** Intel norflash status resgister */
+#define INTEL_STATUS_DWS 0x80
+#define INTEL_STATUS_ESS 0x40
+#define INTEL_STATUS_ES 0x20
+#define INTEL_STATUS_PS 0x10
+#define INTEL_STATUS_VPPS 0x08
+#define INTEL_STATUS_PSS 0x04
+#define INTEL_STATUS_BLS 0x02
+#define INTEL_STATUS_BWS 0x01
+
+/** Intel norflash device Identifier infomation address offset. */
+#define INTEL_MANU_ID 0x00
+#define INTEL_DEVIDE_ID 0x01
+#define INTEL_LOCKSTATUS 0x02
+
+/** Intel norflash device lock status. */
+#define INTEL_LOCKSTATUS_LOCKED 0x01
+#define INTEL_LOCKSTATUS_LOCKDOWNED 0x02
+
+/*----------------------------------------------------------------------------
+ * Local functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief It implements a RESET command.
+ *
+ * \param pNorFlashInfo Pointer to an struct NorFlashInfo instance.
+ */
+static void intel_Reset( NorFlashInfo *pNorFlashInfo, uint32_t address )
+{
+ uint32_t busAddress ;
+ uint32_t busWidth ;
+
+ busWidth = NorFlash_GetDataBusWidth(pNorFlashInfo);
+ busAddress = NorFlash_GetAddressInChip(pNorFlashInfo, address);
+ WriteCommand(busWidth, busAddress, INTEL_CMD_RESET);
+}
+
+/**
+ * \brief The Read Device Identifier command instructs the device to output manufacturer
+ * code, device identifier code, block-lock status, protection register data,
+ * or configuration register data by giving offset.
+ *
+ * \param pNorFlashInfo Pointer to an struct NorFlashInfo instance.
+ * \param offset 0: Identifier address offset.
+ */
+static uint32_t intel_ReadIdentification( NorFlashInfo *pNorFlashInfo, uint32_t offset )
+{
+ uint32_t data;
+ uint8_t busWidth;
+ uint32_t address;
+
+ /* Issue Read Array Command - just in case that the flash is not in Read Array mode */
+ intel_Reset(pNorFlashInfo, 0);
+ busWidth = NorFlash_GetDataBusWidth(pNorFlashInfo);
+ address = NorFlash_GetAddressInChip(pNorFlashInfo, offset);
+ /* Issue the Read Device Identifier command at specified address. */
+ WriteCommand(busWidth, address, INTEL_CMD_IDIN);
+ ReadRawData(busWidth, address, (uint8_t*)&data);
+
+ intel_Reset(pNorFlashInfo, 0);
+ return data;
+}
+
+/**
+ * \brief Return the status register value.
+ *
+ * \param pNorFlashInfo Pointer to an struct NorFlashInfo instance.
+ */
+static uint8_t intel_ReadStatus( NorFlashInfo *pNorFlashInfo, uint32_t address)
+{
+ uint32_t status;
+ uint8_t busWidth;
+ uint32_t budAddress;
+
+ busWidth = NorFlash_GetDataBusWidth(pNorFlashInfo);
+
+ /* Issue the Read Status Register command at any address. */
+ budAddress = NorFlash_GetAddressInChip(pNorFlashInfo, address),
+ WriteCommand(busWidth, budAddress, INTEL_CMD_READ_STATUS);
+ ReadRawData(busWidth, budAddress, (uint8_t*)&status);
+ return status;
+}
+
+/**
+ * \brief Clear the status register.
+ *
+ * \param pNorFlashInfo Pointer to an struct NorFlashInfo instance.
+ */
+static void intel_ClearStatus( NorFlashInfo *pNorFlashInfo )
+{
+ uint8_t busWidth;
+ uint32_t address;
+ busWidth = NorFlash_GetDataBusWidth(pNorFlashInfo);
+
+ /* Issue the Clear Status Register command at any address */
+ address = NorFlash_GetAddressInChip(pNorFlashInfo, 0),
+ WriteCommand(busWidth, address, INTEL_CMD_CLEAR_STATUS);
+}
+
+/**
+ * \brief Unlocks the specified block of the device.
+ *
+ * \param pNorFlashInfo Pointer to an struct NorFlashInfo instance.
+ * \param address Address in sector.
+ */
+static void intel_UnlockSector( NorFlashInfo *pNorFlashInfo, uint32_t address )
+{
+ uint32_t busAddress;
+ uint8_t busWidth;
+
+ /* Issue Read Array Command - just in case that the flash is not in Read Array mode */
+ intel_Reset(pNorFlashInfo, 0);
+ /* Clear the status register first. */
+
+ busWidth = NorFlash_GetDataBusWidth(pNorFlashInfo);
+ busAddress = NorFlash_GetAddressInChip(pNorFlashInfo,address);
+
+ WriteCommand(busWidth, busAddress, INTEL_CMD_BLOCK_LOCKSTART);
+ WriteCommand(busWidth, busAddress, INTEL_CMD_BLOCK_UNLOCK);
+ intel_Reset(pNorFlashInfo, 0);
+}
+
+/**
+ * \brief The Read Device Identifier command instructs the device to output block-lock
+ * status.
+ *
+ * \param pNorFlashInfo Pointer to an struct NorFlashInfo instance.
+ * \param address 0: Address in sector/block.
+ */
+static uint32_t intel_GetBlockLockStatus( NorFlashInfo *pNorFlashInfo, uint32_t address)
+{
+ return intel_ReadIdentification(pNorFlashInfo, (address + NorFlash_GetByteAddress(pNorFlashInfo ,INTEL_LOCKSTATUS)));
+}
+
+/**
+ * \brief It implement a program word command. Returns 0 if the operation was
+ * successful; otherwise returns an error code.
+ *
+ * \param pNorFlashInfo Pointer to an struct NorFlashInfo instance.
+ * \param address Start address offset to be wrote.
+ * \param data word to be written.
+ */
+static uint8_t intel_Program( NorFlashInfo *pNorFlashInfo, uint32_t address, uint32_t data )
+{
+ uint32_t status;
+ /* uint32_t datain; */
+ volatile uint32_t busAddress;
+ uint8_t done = 0;
+ uint8_t busWidth;
+
+ busWidth = NorFlash_GetDataBusWidth(pNorFlashInfo);
+ /* Issue Read Array Command - just in case that the flash is not in Read Array mode */
+ intel_Reset(pNorFlashInfo, address);
+
+ busAddress = NorFlash_GetAddressInChip(pNorFlashInfo, address);
+ /* Word programming operations are initiated by writing the Word Program Setup command to the device. */
+ WriteCommand(busWidth, busAddress, INTEL_CMD_PROGRAM_WORD);
+ /* This is followed by a second write to the device with the address and data to be programmed. */
+ WriteRawData(busWidth, busAddress, (uint8_t*)&data);
+
+ /* Status register polling */
+ do
+ {
+ status = intel_ReadStatus(pNorFlashInfo,address);
+ /* Check if the device is ready. */
+ if ((status & INTEL_STATUS_DWS) == INTEL_STATUS_DWS )
+ {
+ /* check if VPP within acceptable limits during program or erase operation. */
+ if ((status & INTEL_STATUS_VPPS) == INTEL_STATUS_VPPS )
+ {
+ return NorCommon_ERROR_CANNOTWRITE;
+ }
+
+ /* Check if the erase block operation is completed. */
+ if ((status & INTEL_STATUS_PS) == INTEL_STATUS_PS )
+ {
+ return NorCommon_ERROR_CANNOTWRITE;
+ }
+ /* check if Block locked during program or erase, operation aborted. */
+ else
+ {
+ if ((status & INTEL_STATUS_BLS) == INTEL_STATUS_BLS )
+ {
+ return NorCommon_ERROR_CANNOTWRITE;
+ }
+ else
+ {
+ done = 1;
+ }
+ }
+ }
+ } while ( !done ) ;
+
+ intel_ClearStatus(pNorFlashInfo);
+ intel_Reset(pNorFlashInfo, address);
+
+ return 0;
+}
+
+/*----------------------------------------------------------------------------
+ * Exported functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * \brief It implements a RESET command.
+ *
+ * \param pNorFlashInfo Pointer to an struct NorFlashInfo instance.
+ * \param address Address offset to be erase.
+ */
+extern void INTEL_Reset( NorFlashInfo *pNorFlashInfo, uint32_t address)
+{
+ intel_Reset(pNorFlashInfo, address);
+}
+
+/**
+ * \brief The Read Device Identifier command instructs the device to output manufacturer
+ * code.
+ *
+ * \param pNorFlashInfo Pointer to an struct NorFlashInfo instance.
+ */
+extern uint32_t INTEL_ReadManufactoryId( NorFlashInfo *pNorFlashInfo)
+{
+ return intel_ReadIdentification(pNorFlashInfo, INTEL_MANU_ID);
+}
+
+/**
+ * \brief The Read Device Identifier command instructs the device to output device id.
+ *
+ * \param pNorFlashInfo Pointer to an struct NorFlashInfo instance.
+ */
+extern uint32_t INTEL_ReadDeviceID( NorFlashInfo *pNorFlashInfo )
+{
+ return intel_ReadIdentification(pNorFlashInfo, INTEL_DEVIDE_ID);
+}
+
+/**
+ * \brief Erases the specified block of the device. Returns 0 if the operation was
+ * successful; otherwise returns an error code.
+ *
+ * \param pNorFlashInfo Pointer to an struct NorFlashInfo instance.
+ * \param address Address offset to be erase.
+ */
+extern uint8_t INTEL_EraseSector( NorFlashInfo *pNorFlashInfo, uint32_t address )
+{
+ uint32_t status;
+ uint32_t busAddress;
+ uint8_t busWidth;
+ uint8_t done = 0;
+
+ busWidth = NorFlash_GetDataBusWidth(pNorFlashInfo);
+ /* Issue Read Array Command - just in case that the flash is not in Read Array mode */
+ intel_Reset(pNorFlashInfo, address);
+
+ /* Check the lock status is locked. */
+ status = intel_GetBlockLockStatus(pNorFlashInfo, address);
+ if(( status & INTEL_LOCKSTATUS_LOCKED ) == INTEL_LOCKSTATUS_LOCKED)
+ {
+ intel_UnlockSector(pNorFlashInfo, address);
+ }
+
+ /* Clear the status register first. */
+ intel_ClearStatus(pNorFlashInfo);
+ busAddress = NorFlash_GetAddressInChip(pNorFlashInfo,address);
+ /* Block erase operations are initiated by writing the Block Erase Setup command to the address of the block to be erased. */
+ WriteCommand(busWidth, busAddress, INTEL_CMD_BLOCK_ERASE_1);
+ /* Next, the Block Erase Confirm command is written to the address of the block to be erased. */
+ WriteCommand(busWidth, busAddress, INTEL_CMD_BLOCK_ERASE_2);
+
+ /* Status register polling */
+ do
+ {
+ status = intel_ReadStatus(pNorFlashInfo,address);
+ /* Check if the device is ready. */
+ if ((status & INTEL_STATUS_DWS) == INTEL_STATUS_DWS )
+ {
+ /* check if VPP within acceptable limits during program or erase operation. */
+ if ((status & INTEL_STATUS_VPPS) == INTEL_STATUS_VPPS )
+ {
+ intel_Reset(pNorFlashInfo, 0);
+ return NorCommon_ERROR_CANNOTWRITE;
+ }
+
+ /* Check if the erase block operation is completed. */
+ if ( (status & INTEL_STATUS_PS) == INTEL_STATUS_PS )
+ {
+ intel_Reset(pNorFlashInfo, 0);
+ return NorCommon_ERROR_CANNOTWRITE;
+ }
+
+ /* Check if the erase block operation is completed. */
+ if ( (status & INTEL_STATUS_ES) == INTEL_STATUS_ES )
+ {
+ intel_Reset(pNorFlashInfo, 0);
+ return NorCommon_ERROR_CANNOTWRITE;
+ }
+ /* check if Block locked during program or erase, operation aborted. */
+ else
+ {
+ if ((status & INTEL_STATUS_BLS) == INTEL_STATUS_BLS )
+ {
+ intel_Reset(pNorFlashInfo, 0);
+ return NorCommon_ERROR_CANNOTWRITE;
+ }
+ else
+ {
+ done = 1;
+ }
+ }
+ }
+ } while ( !done ) ;
+
+ intel_Reset( pNorFlashInfo, address ) ;
+
+ return 0;
+}
+
+/**
+ * \brief Erases all the block of the device. Returns 0 if the operation was successful;
+ * otherwise returns an error code.
+ *
+ * \param pNorFlashInfo Pointer to an struct NorFlashInfo instance.
+ */
+extern uint8_t INTEL_EraseChip( NorFlashInfo* pNorFlashInfo )
+{
+ /* Interl flash have no independent Chip-erase command. */
+ uint32_t i;
+ uint32_t sectors;
+
+ sectors = NorFlash_GetDeviceNumOfBlocks( pNorFlashInfo ) ;
+
+ for ( i = 0 ; i < sectors ; i++ )
+ {
+ if ( INTEL_EraseSector( pNorFlashInfo, NorFlash_GetDeviceSectorAddress( pNorFlashInfo, i )) )
+ {
+ return NorCommon_ERROR_CANNOTERASE;
+ }
+ }
+
+ return 0;
+}
+
+/**
+ * \brief Sends data to the struct NorFlashInfo chip from the provided buffer.
+ *
+ * \param pNorFlashInfo Pointer to an struct NorFlashInfo instance.
+ * \param address Start address offset to be wrote.
+ * \param buffer Buffer where the data is stored.
+ * \param size Number of bytes that will be written.
+ */
+uint8_t INTEL_Write_Data( NorFlashInfo *pNorFlashInfo, uint32_t address, uint8_t *buffer, uint32_t size)
+{
+ uint32_t i;
+ uint8_t busWidth;
+
+ busWidth = pNorFlashInfo->deviceChipWidth ;
+
+ if (busWidth == FLASH_CHIP_WIDTH_8BITS )
+ {
+ for(i=0; i < size; i++)
+ {
+ if(intel_Program(pNorFlashInfo, address, buffer[i]))
+ {
+ return NorCommon_ERROR_CANNOTWRITE ;
+ }
+ address ++ ;
+ }
+ }
+ else
+ {
+ if ( busWidth == FLASH_CHIP_WIDTH_16BITS )
+ {
+ uint16_t *buffer16 = (uint16_t *)(void *) buffer;
+
+ size = (size + 1) >> 1;
+
+ for ( i=0 ; i < size ; i++ )
+ {
+
+ if ( intel_Program( pNorFlashInfo, address, buffer16[i] ) )
+ {
+ return NorCommon_ERROR_CANNOTWRITE;
+ }
+ address+= 2;
+ }
+ }
+ else
+ {
+ if ( busWidth == FLASH_CHIP_WIDTH_32BITS )
+ {
+ uint32_t *buffer32 = (uint32_t *)(void *) buffer;
+ size = (size + 3) >> 2;
+
+ for ( i=0 ; i < size ; i++ )
+ {
+ if ( intel_Program( pNorFlashInfo, address, buffer32[i] ) )
+ {
+ return NorCommon_ERROR_CANNOTWRITE ;
+ }
+ address+= 4;
+ }
+ }
+ }
+ }
+
+ return 0 ;
+}
+
+const NorFlashOperations intelOperations =
+{
+ INTEL_Reset,
+ INTEL_Write_Data,
+ INTEL_ReadManufactoryId,
+ INTEL_ReadDeviceID,
+ INTEL_EraseChip,
+ INTEL_EraseSector
+} ;
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/sdmmc/mcid_dma.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/sdmmc/mcid_dma.c
new file mode 100644
index 0000000..2a69f20
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/sdmmc/mcid_dma.c
@@ -0,0 +1,1057 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/** \file
+ *
+ * Implement for SD/MMC low level commands.
+ *
+ * \sa \ref hsmci_module, \ref sdmmc_module
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include "memories.h"
+#include <assert.h>
+
+/* ---- Compile options ---- */
+
+/*----------------------------------------------------------------------------
+ * Local constants
+ *----------------------------------------------------------------------------*/
+/** \addtorgoup mcid_defines
+ * @{*/
+
+/** Enable MCI */
+#define MCI_ENABLE(pMciHw) HSMCI_Enable(pMciHw)
+/** Disable MCI */
+#define MCI_DISABLE(pMciHw) HSMCI_Disable(pMciHw)
+/** Reset MCI */
+#define MCI_RESET(pMciHw) HSMCI_Reset(pMciHw, 0)
+
+/** Return halfword(16-bit) count from byte count */
+#define toHWCOUNT(byteCnt) (((byteCnt)&0x1) ? (((byteCnt)/2)+1) : ((byteCnt)/2))
+/** Return word(32-bit) count from byte count */
+#define toWCOUNT(byteCnt) (((byteCnt)&0x3) ? (((byteCnt)/4)+1) : ((byteCnt)/4))
+
+
+/** Bit mask for status register errors. */
+#define STATUS_ERRORS ((uint32_t)(HSMCI_SR_UNRE \
+ | HSMCI_SR_OVRE \
+ | HSMCI_SR_ACKRCVE \
+ /*| HSMCI_SR_BLKOVRE*/ \
+ | HSMCI_SR_CSTOE \
+ | HSMCI_SR_DTOE \
+ | HSMCI_SR_DCRCE \
+ | HSMCI_SR_RTOE \
+ | HSMCI_SR_RENDE \
+ | HSMCI_SR_RCRCE \
+ | HSMCI_SR_RDIRE \
+ | HSMCI_SR_RINDE))
+
+/** Bit mask for response errors */
+#define STATUS_ERRORS_RESP ((uint32_t)(HSMCI_SR_CSTOE \
+ | HSMCI_SR_RTOE \
+ | HSMCI_SR_RENDE \
+ | HSMCI_SR_RCRCE \
+ | HSMCI_SR_RDIRE \
+ | HSMCI_SR_RINDE))
+
+/** Bit mask for data errors */
+#define STATUS_ERRORS_DATA ((uint32_t)(HSMCI_SR_UNRE \
+ | HSMCI_SR_OVRE \
+ /*| HSMCI_SR_BLKOVRE*/ \
+ /*| HSMCI_SR_CSTOE*/ \
+ | HSMCI_SR_DTOE \
+ | HSMCI_SR_DCRCE))
+
+/** Max DMA size in a single transfer */
+#define MAX_DMA_SIZE (DMAC_MAX_BT_SIZE & 0xFFFFFF00)
+
+/** SD/MMC memory Single block */
+#define _CMDR_SDMEM_SINGLE \
+ (HSMCI_CMDR_TRCMD_START_DATA | HSMCI_CMDR_TRTYP_SINGLE)
+/** SD/MMC memory Multi block */
+#define _CMDR_SDMEM_MULTI \
+ (HSMCI_CMDR_TRCMD_START_DATA | HSMCI_CMDR_TRTYP_MULTIPLE)
+/** SDIO byte transfer */
+#define _CMDR_SDIO_BYTE \
+ (HSMCI_CMDR_TRCMD_START_DATA | HSMCI_CMDR_TRTYP_BYTE)
+/** SDIO block transfer */
+#define _CMDR_SDIO_BLOCK \
+ (HSMCI_CMDR_TRCMD_START_DATA | HSMCI_CMDR_TRTYP_BLOCK)
+
+/** @}*/
+/*---------------------------------------------------------------------------
+ * Local types
+ *---------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------
+ * Local variable
+ *----------------------------------------------------------------------------*/
+
+//#define MCID_DBG 0
+//static uint8_t bMcidDBG = 0;
+
+/** HAL for SD/MMC bus mode (MCI interface) */
+static sSdHalFunctions sdHal = {
+ (fSdmmcLock)MCID_Lock,
+ (fSdmmcRelease)MCID_Release,
+ (fSdmmcSendCommand)MCID_SendCmd,
+ (fSdmmcIOCtrl)MCID_IOCtrl
+};
+
+/*---------------------------------------------------------------------------
+ * Internal functions
+ *---------------------------------------------------------------------------*/
+
+/** \addtogroup mcid_functions
+ *@{
+ */
+
+/**
+ * Enable MCI peripheral access clock
+ */
+static uint8_t _PeripheralEnable(uint32_t id)
+{
+ if (PMC_IsPeriphEnabled(id)) return 0;
+ PMC_EnablePeripheral(id);
+ return 1;
+}
+
+/**
+ * Disable MCI peripheral access clock
+ */
+static inline void _PeripheralDisable(uint32_t id)
+{
+ PMC_DisablePeripheral(id);
+}
+
+/**
+ * \brief Start DMA transfer for HSMCI.
+ * Replace DMAD driver start function since there is DMADONE handler in HSMCI.
+ * \param pDmad Pointer to DMA driver instance.
+ * \param dwCh ControllerNumber << 8 | ChannelNumber.
+ */
+static void _MciDMAStart( sDmad *pDmad, uint32_t dwCh)
+{
+ uint8_t iController = (dwCh >> 8);
+ uint8_t iChannel = (dwCh) & 0xFF;
+ Dmac *pDmac = pDmad->pDmacs[iController];
+
+ DMAC_EnableChannel(pDmac, iChannel);
+ if ( pDmad->ucPollingModes == 0 )
+ {
+ /* Monitor error status in interrupt handler */
+ DMAC_EnableIt(pDmac, (DMAC_EBCIDR_ERR0 << iChannel) );
+ }
+}
+
+/**
+ * HSMCI DMA R/W prepare
+ */
+static uint32_t _MciDMAPrepare(sMcid *pMcid, uint8_t bRd)
+{
+ sDmad *pDmad = pMcid->pDmad;
+ //sSdmmcCommand *pCmd = pMcid->pCmd;
+ uint8_t iController, iChNb;
+
+ /* Allocate a channel */
+ pMcid->dwDmaCh = DMAD_AllocateChannel(pDmad, pMcid->bID, DMA_TRANSFER_MEMORY);
+ if (pMcid->dwDmaCh == DMA_ALLOC_FAILED)
+ {
+ return SDMMC_ERROR_BUSY;
+ }
+ //printf("Dma%c %x\n\r", bRd ? 'R' : 'T', pMcid->dwDmaCh);
+ DMAD_SetCallback(pDmad, pMcid->dwDmaCh,
+ (DmadTransferCallback)NULL,
+ NULL);
+ iController = pMcid->dwDmaCh >> 8;
+ if (bRd)
+ {
+ iChNb = DMAIF_GetChannelNumber(iController, pMcid->bID, DMA_TRANSFER_RX);
+ DMAD_PrepareChannel( pDmad, pMcid->dwDmaCh, DMAC_CFG_SRC_PER(iChNb)
+ |DMAC_CFG_SRC_H2SEL
+ |DMAC_CFG_SOD
+ |DMAC_CFG_FIFOCFG_ALAP_CFG );
+ }
+ else
+ {
+ iChNb = DMAIF_GetChannelNumber(iController, pMcid->bID, DMA_TRANSFER_TX);
+ DMAD_PrepareChannel( pDmad, pMcid->dwDmaCh, DMAC_CFG_DST_PER(iChNb)
+ |DMAC_CFG_DST_H2SEL
+ |DMAC_CFG_SOD
+ |DMAC_CFG_FIFOCFG_ALAP_CFG );
+ }
+ return SDMMC_SUCCESS;
+}
+
+/**
+ * HSMCI DMA R/W
+ * \return 1 if DMA started.
+ */
+static uint32_t _MciDMA(sMcid *pMcid, uint8_t bFByte, uint8_t bRd)
+{
+ Hsmci *pHw = pMcid->pMciHw;
+ sDmad *pDmad = pMcid->pDmad;
+ sSdmmcCommand *pCmd = pMcid->pCmd;
+ sDmaTransferDescriptor td;
+ uint32_t totalSize = pCmd->wNbBlocks * pCmd->wBlockSize;
+ uint32_t maxXSize;
+ uint32_t memAddress;
+ uint8_t bMByte;
+
+ /* All transfer finished */
+ if (pMcid->dwXfrNdx >= totalSize)
+ {
+ return 0;
+ }
+ /* Memory address and alignment */
+ memAddress = (uint32_t)&pCmd->pData[pMcid->dwXfrNdx];
+ bMByte = ((memAddress & 0x3) || (totalSize & 0x3));
+ /* P to M: Max size is P size */
+ if (bRd)
+ {
+ maxXSize = bFByte ? MAX_DMA_SIZE : (MAX_DMA_SIZE * 4);
+ }
+ /* M to P: Max size is M size */
+ else
+ {
+ maxXSize = bMByte ? MAX_DMA_SIZE : (MAX_DMA_SIZE * 4);
+ }
+ /* Update index */
+ pMcid->dwXSize = totalSize - pMcid->dwXfrNdx;
+ if (pMcid->dwXSize > maxXSize)
+ {
+ pMcid->dwXSize = maxXSize;
+ }
+ /* Prepare DMA transfer */
+ if (bRd)
+ {
+ /* RX: bytes or words */
+ uint32_t btR = DMAC_CTRLA_BTSIZE(bFByte ? pMcid->dwXSize :
+ toWCOUNT(pMcid->dwXSize));
+ td.dwSrcAddr = (uint32_t)&(pHw->HSMCI_RDR);
+ td.dwDstAddr = memAddress;
+ td.dwCtrlA = btR
+ | (bFByte ? DMAC_CTRLA_SRC_WIDTH_BYTE
+ : DMAC_CTRLA_SRC_WIDTH_WORD)
+ | (bMByte ? DMAC_CTRLA_DST_WIDTH_BYTE
+ : DMAC_CTRLA_DST_WIDTH_WORD)
+ ;
+ td.dwCtrlB = DMAC_CTRLB_SRC_DSCR | DMAC_CTRLB_DST_DSCR
+ | DMAC_CTRLB_FC_PER2MEM_DMA_FC
+ | DMAC_CTRLB_SRC_INCR_FIXED
+ | DMAC_CTRLB_DST_INCR_INCREMENTING
+ | DMAC_CTRLB_IEN
+ ;
+ td.dwDscAddr = 0;
+ }
+ else
+ {
+ /* TX: Always words */
+ uint32_t btW = DMAC_CTRLA_BTSIZE(toWCOUNT(pMcid->dwXSize));
+ td.dwSrcAddr = memAddress;
+ td.dwDstAddr = (uint32_t)&(pHw->HSMCI_TDR);
+ td.dwCtrlA = btW
+ | (bMByte ? DMAC_CTRLA_SRC_WIDTH_BYTE
+ : DMAC_CTRLA_SRC_WIDTH_WORD)
+ | (bFByte ? DMAC_CTRLA_DST_WIDTH_BYTE
+ : DMAC_CTRLA_DST_WIDTH_WORD)
+ ;
+ td.dwCtrlB = DMAC_CTRLB_SRC_DSCR | DMAC_CTRLB_DST_DSCR
+ | DMAC_CTRLB_FC_MEM2PER_DMA_FC
+ | DMAC_CTRLB_SRC_INCR_INCREMENTING
+ | DMAC_CTRLB_DST_INCR_FIXED
+ | DMAC_CTRLB_IEN
+ ;
+ td.dwDscAddr = 0;
+ }
+ DMAD_PrepareSingleTransfer(pDmad, pMcid->dwDmaCh, &td);
+ _MciDMAStart(pDmad, pMcid->dwDmaCh);
+
+ return 1;
+}
+
+/*----------------------------------------------------------------------------
+ * Local functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * Reset MCI HW interface and disable it.
+ * \param keepSettings Keep old register settings, including
+ * _MR, _SDCR, _DTOR, _CSTOR, _DMA and _CFG.
+ */
+static void MCI_Reset(sMcid *pMci, uint8_t keepSettings)
+{
+ Hsmci *pMciHw = pMci->pMciHw;
+
+ assert(pMci->pMciHw);
+
+ HSMCI_Reset( pMciHw, keepSettings );
+}
+
+/**
+ * Configure the MCI CLKDIV in the MCI_MR register. The max. for MCI clock is
+ * MCK/2 and corresponds to CLKDIV = 0
+ * \param pMci Pointer to the low level MCI driver.
+ * \param mciSpeed MCI clock speed in Hz, 0 will not change current speed.
+ * \param mck MCK to generate MCI Clock, in Hz
+ * \return The actual speed used, 0 for fail.
+ */
+static uint32_t MCI_SetSpeed( sMcid* pMci, uint32_t mciSpeed, uint32_t mck )
+{
+ Hsmci *pMciHw = pMci->pMciHw;
+ uint32_t clkdiv;
+
+ assert(pMciHw);
+
+ /* Multimedia Card Interface clock (MCCK or MCI_CK) is Master Clock (MCK)
+ * divided by (2*(CLKDIV+1))
+ * mciSpeed = MCK / (2*(CLKDIV+1)) */
+ if (mciSpeed > 0) {
+ clkdiv = (mck / 2 / mciSpeed);
+ /* Speed should not bigger than expired one */
+ if (mciSpeed < mck/2/clkdiv)
+ {
+ clkdiv ++;
+ }
+ if ( clkdiv > 0 )
+ {
+ clkdiv -= 1;
+ }
+ assert( (clkdiv & 0xFFFFFF00) == 0 ) ; /* "mciSpeed too small" */
+ }
+ else
+ {
+ clkdiv = 0 ;
+ }
+ /* Actual MCI speed */
+ mciSpeed = mck / 2 / (clkdiv + 1);
+
+ /* Modify MR */
+ HSMCI_DivCtrl( pMciHw, clkdiv, HSMCI_MR_CLKDIV(0x7) );
+ return (mciSpeed);
+}
+
+/**
+ */
+static void _FinishCmd( sMcid* pMcid, uint8_t bStatus )
+{
+ sSdmmcCommand *pCmd = pMcid->pCmd;
+ sDmad *pDmad = pMcid->pDmad;
+
+ /* Release DMA channel (if used) */
+ if (pMcid->dwDmaCh != DMA_ALLOC_FAILED)
+ {
+ DMAD_FreeChannel(pDmad, pMcid->dwDmaCh);
+ pMcid->dwDmaCh = DMA_ALLOC_FAILED;
+ }
+
+ /* Release command */
+ pMcid->pCmd = NULL;
+ pMcid->bState = MCID_LOCKED;
+ pCmd->bStatus = bStatus;
+ /* Invoke callback */
+ if (pCmd->fCallback)
+ {
+ (pCmd->fCallback)(pCmd->bStatus, pCmd->pArg);
+ }
+}
+
+/*---------------------------------------------------------------------------
+ * Exported functions
+ *---------------------------------------------------------------------------*/
+
+/**
+ * Initialize MCI driver.
+ */
+void MCID_Init(sMcid *pMcid,
+ Hsmci *pMci, uint8_t bID, uint32_t dwMck,
+ sDmad *pDmad,
+ uint8_t bPolling)
+{
+ uint16_t clkDiv;
+
+ assert(pMcid);
+ assert(pMci);
+
+ /* Initialize driver struct */
+ pMcid->pMciHw = pMci;
+ pMcid->pCmd = NULL;
+
+ pMcid->pDmad = pDmad;
+ pMcid->dwDmaCh = DMA_ALLOC_FAILED;
+ pMcid->dwXfrNdx = 0;
+
+ pMcid->dwMck = dwMck;
+
+ pMcid->bID = bID;
+ pMcid->bPolling = bPolling;
+ pMcid->bState = MCID_IDLE;
+
+ _PeripheralEnable( bID );
+
+ MCI_RESET( pMci );
+ MCI_DISABLE ( pMci );
+ HSMCI_DisableIt( pMci, 0xFFFFFFFF );
+
+ HSMCI_ConfigureDataTO( pMci, HSMCI_DTOR_DTOCYC(0xFF)
+ |HSMCI_DTOR_DTOMUL_1048576 );
+ HSMCI_ConfigureCompletionTO( pMci , HSMCI_CSTOR_CSTOCYC(0xFF)
+ |HSMCI_CSTOR_CSTOMUL_1048576 );
+
+ /* Set the Mode Register: 400KHz */
+ clkDiv = (dwMck / (MCI_INITIAL_SPEED << 1)) - 1;
+ HSMCI_ConfigureMode( pMci, (clkDiv | HSMCI_MR_PWSDIV(0x7)) );
+
+ HSMCI_Enable( pMci );
+ HSMCI_Configure( pMci, HSMCI_CFG_FIFOMODE | HSMCI_CFG_FERRCTRL );
+
+ /* Enable DMA */
+ HSMCI_EnableDma( pMci, 1 );
+
+ _PeripheralDisable( bID );
+}
+
+/**
+ * Lock the MCI driver for slot N access
+ */
+uint32_t MCID_Lock(sMcid *pMcid, uint8_t bSlot)
+{
+ Hsmci *pHw = pMcid->pMciHw;
+ uint32_t sdcr;
+
+ assert(pMcid->pMciHw);
+
+ if (bSlot > 0)
+ {
+ return SDMMC_ERROR_PARAM;
+ }
+ if (pMcid->bState >= MCID_LOCKED)
+ {
+ return SDMMC_ERROR_LOCKED;
+ }
+ pMcid->bState = MCID_LOCKED;
+ sdcr = pHw->HSMCI_SDCR & ~(uint32_t)HSMCI_SDCR_SDCSEL_Msk;
+ pHw->HSMCI_SDCR = sdcr | (bSlot << HSMCI_SDCR_SDCSEL_Pos);
+ return SDMMC_OK;
+}
+
+/**
+ * Release the driver.
+ */
+uint32_t MCID_Release(sMcid *pMcid)
+{
+ assert(pMcid);
+
+ if (pMcid->bState >= MCID_CMD)
+ {
+ return SDMMC_ERROR_BUSY;
+ }
+ pMcid->bState = MCID_IDLE;
+ return SDMMC_OK;
+}
+
+/**
+ * SD/MMC command.
+ */
+//static uint32_t cmdr;
+uint32_t MCID_SendCmd(sMcid *pMcid, void *pCommand)
+{
+ Hsmci *pHw = pMcid->pMciHw;
+ sSdmmcCommand *pCmd = pCommand;
+ uint32_t mr, ier;
+ uint32_t cmdr;
+
+ assert(pMcid->pMciHw);
+ assert(pCmd);
+
+ if (!MCID_IsCmdCompleted(pMcid))
+ {
+ return SDMMC_ERROR_BUSY;
+ }
+
+ pMcid->bState = MCID_CMD;
+ pMcid->pCmd = pCmd;
+
+ _PeripheralEnable(pMcid->bID);
+
+ /* Not busy check for continuous R/W */
+ if (pCmd->cmdOp.bmBits.xfrData == SDMMC_CMD_STOPXFR
+ || pCmd->cmdOp.bmBits.xfrData == SDMMC_CMD_RX
+ || pCmd->cmdOp.bmBits.xfrData == SDMMC_CMD_TX
+ )
+ {
+ volatile uint32_t busyWait = 0x0001000;
+ while(busyWait --)
+ {
+ uint32_t sr = HSMCI_GetStatus(pHw);
+ if ((sr & HSMCI_SR_NOTBUSY) && ((sr & HSMCI_SR_DTIP) == 0))
+ {
+ break;
+ }
+ }
+ if (busyWait == 0) printf("-W- SD Busy!\n\r");
+ }
+ MCI_DISABLE(pHw);
+ mr = HSMCI_GetMode(pHw) & (~(uint32_t)(HSMCI_MR_WRPROOF
+ |HSMCI_MR_RDPROOF
+ |HSMCI_MR_FBYTE));
+
+ //printf("* Cmd%2d, op %08x: ", pCmd->bCmd, pCmd->cmdOp.wVal);
+
+ /* Normal command: idle the bus */
+ if ( pCmd->cmdOp.bmBits.xfrData == SDMMC_CMD_STOPXFR
+ || pCmd->cmdOp.wVal == SDMMC_CMD_POWERONINIT)
+ {
+ //printf("S ");
+
+ HSMCI_ConfigureMode(pHw, mr);
+ ier = HSMCI_IER_XFRDONE | STATUS_ERRORS_RESP;
+ }
+ /* No data transfer */
+ else if ((pCmd->cmdOp.wVal & SDMMC_CMD_CNODATA(0xF)) == SDMMC_CMD_CNODATA(0))
+ {
+ //printf("C ");
+
+ ier = HSMCI_IER_XFRDONE | STATUS_ERRORS_RESP;
+ /* R3 response, no CRC */
+ if (pCmd->cmdOp.bmBits.respType == 3)
+ {
+ ier &= ~(uint32_t)HSMCI_IER_RCRCE;
+ }
+ }
+ /* Data command but no following: infinite block xfr */
+ else if (pCmd->wNbBlocks == 0)
+ {
+ //printf("CZ ");
+
+ /* Data length 0, no PDC */
+ HSMCI_ConfigureMode(pHw, mr | HSMCI_MR_WRPROOF
+ | HSMCI_MR_RDPROOF);
+ /* Block size 0 */
+ HSMCI_ConfigureTransfer(pHw, pCmd->wBlockSize, pCmd->wNbBlocks);
+ ier = HSMCI_IER_CMDRDY | STATUS_ERRORS_RESP;
+ }
+ /* Command with data */
+ else
+ {
+ //printf("CD %dx%d ", pCmd->wNbBlocks, pCmd->wBlockSize);
+
+ /* Setup block size */
+ if (pCmd->cmdOp.bmBits.sendCmd)
+ {
+ HSMCI_ConfigureTransfer(pHw, pCmd->wBlockSize, pCmd->wNbBlocks);
+ }
+
+ /* Force byte transfer */
+ if (pCmd->wBlockSize & 0x3)
+ {
+ mr |= HSMCI_MR_FBYTE;
+ }
+
+ /* Set block size & MR */
+ HSMCI_ConfigureMode(pHw, mr | HSMCI_MR_WRPROOF
+ | HSMCI_MR_RDPROOF
+ | (pCmd->wBlockSize << 16));
+ /* Reset transferred number of blocks */
+ pMcid->dwXfrNdx = 0;
+ /* DMA write */
+ if (pCmd->cmdOp.bmBits.xfrData == SDMMC_CMD_TX)
+ {
+ if (_MciDMAPrepare(pMcid, 0))
+ {
+ _FinishCmd(pMcid, SDMMC_ERROR_BUSY);
+ return SDMMC_ERROR_BUSY;
+ }
+ _MciDMA(pMcid, (mr & HSMCI_MR_FBYTE) > 0, 0);
+ }
+ else
+ {
+ if (_MciDMAPrepare(pMcid, 1))
+ {
+ _FinishCmd(pMcid, SDMMC_ERROR_BUSY);
+ return SDMMC_ERROR_BUSY;
+ }
+ _MciDMA(pMcid, (mr & HSMCI_MR_FBYTE) > 0, 1);
+ }
+ ier = HSMCI_IER_DMADONE | STATUS_ERRORS_DATA;
+ }
+
+ MCI_ENABLE(pHw);
+ if (pCmd->cmdOp.wVal & (SDMMC_CMD_bmPOWERON | SDMMC_CMD_bmCOMMAND))
+ {
+ //uint32_t cmdr;
+ cmdr = pCmd->bCmd;
+
+ if (pCmd->cmdOp.bmBits.powerON)
+ {
+ cmdr |= (HSMCI_CMDR_OPDCMD | HSMCI_CMDR_SPCMD_INIT);
+ }
+ if (pCmd->cmdOp.bmBits.odON)
+ {
+ cmdr |= HSMCI_CMDR_OPDCMD;
+ }
+ if (pCmd->cmdOp.bmBits.sendCmd)
+ {
+ cmdr |= HSMCI_CMDR_MAXLAT;
+ }
+ switch(pCmd->cmdOp.bmBits.xfrData)
+ {
+ case SDMMC_CMD_TX:
+ if (pCmd->cmdOp.bmBits.ioCmd)
+ {
+ cmdr |= (pCmd->wBlockSize == 1) ?
+ _CMDR_SDIO_BYTE :
+ _CMDR_SDIO_BLOCK;
+ }
+ else
+ {
+ cmdr |= (pCmd->wNbBlocks == 1) ?
+ _CMDR_SDMEM_SINGLE :
+ _CMDR_SDMEM_MULTI;
+ }
+ break;
+
+ case SDMMC_CMD_RX:
+ if (pCmd->cmdOp.bmBits.ioCmd)
+ {
+ cmdr |= HSMCI_CMDR_TRDIR_READ
+ |((pCmd->wBlockSize == 1) ?
+ _CMDR_SDIO_BYTE :
+ _CMDR_SDIO_BLOCK)
+ ;
+ }
+ else
+ {
+ cmdr |= HSMCI_CMDR_TRDIR_READ
+ |((pCmd->wNbBlocks == 1) ?
+ _CMDR_SDMEM_SINGLE :
+ _CMDR_SDMEM_MULTI)
+ ;
+ }
+ break;
+
+ case SDMMC_CMD_STOPXFR:
+ cmdr |= HSMCI_CMDR_TRCMD_STOP_DATA;
+ break;
+ }
+ switch(pCmd->cmdOp.bmBits.respType)
+ {
+ case 3: case 4:
+ /* ignore CRC error */
+ ier &= ~(uint32_t)HSMCI_IER_RCRCE;
+ case 1: case 5: case 6: case 7:
+ cmdr |= HSMCI_CMDR_RSPTYP_48_BIT;
+ break;
+ case 2:
+ cmdr |= HSMCI_CMDR_RSPTYP_136_BIT;
+ break;
+ /* No response, ignore RTOE */
+ default:
+ ier &= ~(uint32_t)HSMCI_IER_RTOE;
+ }
+
+ pHw->HSMCI_ARGR = pCmd->dwArg;
+ pHw->HSMCI_CMDR = cmdr;
+ }
+
+ //printf("\n\r");
+
+ /* Start sending DMA */
+ //if ( pCmd->wNbBlocks
+ // && pCmd->cmdOp.bmBits.xfrData == SDMMC_CMD_TX )
+ //{
+ //_MciDMA(pMcid, (mr & HSMCI_MR_FBYTE) > 0, 0);
+ //}
+ /* Ignore CRC error for R3 & R4 */
+ /* Ignore data error on stop command */
+ if (pCmd->cmdOp.bmBits.xfrData == SDMMC_CMD_STOPXFR)
+ {
+ ier &= ~STATUS_ERRORS_DATA;
+ }
+
+ /* Enable status flags */
+ HSMCI_EnableIt(pHw, ier);
+
+ return SDMMC_OK;
+}
+
+/**
+ * Process pending events on the given MCI driver.
+ */
+void MCID_Handler(sMcid *pMcid)
+{
+ Hsmci *pHw = pMcid->pMciHw;
+ sSdmmcCommand *pCmd = pMcid->pCmd;
+ uint32_t dwSr, dwMsk, dwMaskedSr;
+
+ assert(pMcid->pMciHw);
+
+ /* Do nothing if no pending command */
+ if (pCmd == NULL)
+ {
+ if (pMcid->bState >= MCID_CMD)
+ {
+ pMcid->bState = MCID_LOCKED;
+ }
+ return;
+ }
+
+ /* Read status */
+ dwSr = HSMCI_GetStatus(pHw);
+ dwMsk = HSMCI_GetItMask(pHw);
+ dwMaskedSr = dwSr & dwMsk;
+
+ #if 0
+ if ( MCID_DBG &&
+ (0
+ //|| pCmd->bCmd == 25
+ //|| pCmd->bCmd == 24
+ //|| pCmd->bCmd == 17
+ //|| pCmd->bCmd == 18
+ || 1
+ //|| pCmd->bCmd == 0
+ //|| pCmd->bCmd == 13
+ )
+ )
+ {
+ //printf("%2d: s%08x m%08x -> %08x\n\r", pCmd->bCmd, dwSr, dwMsk, dwMaskedSr);
+ printf("i%x\n\r", dwMaskedSr);
+ }
+ #endif
+
+ /* Check errors */
+ if (dwMaskedSr & STATUS_ERRORS)
+ {
+ if (dwMaskedSr & HSMCI_SR_RTOE)
+ {
+ pCmd->bStatus = SDMMC_ERROR_NORESPONSE;
+ }
+ else
+ {
+ TRACE_INFO("iErr %x: C%d, R%d\n\r",
+ dwSr, pCmd->bCmd, pCmd->cmdOp.bmBits.respType);
+ pCmd->bStatus = SDMMC_ERROR;
+ }
+ pMcid->bState = MCID_ERROR;
+ }
+ dwMsk &= ~STATUS_ERRORS;
+
+ /* Check command complete */
+ if (dwMaskedSr & HSMCI_SR_CMDRDY)
+ {
+ HSMCI_DisableIt(pHw, HSMCI_IDR_CMDRDY);
+ dwMsk &= ~(uint32_t)HSMCI_IMR_CMDRDY;
+ }
+ /* Check transfer done */
+ if (dwMaskedSr & HSMCI_SR_XFRDONE)
+ {
+ dwMsk &= ~(uint32_t)HSMCI_IMR_XFRDONE;
+ }
+ /* Check if not busy */
+ if (dwMaskedSr & HSMCI_SR_NOTBUSY)
+ {
+ dwMsk &= ~(uint32_t)HSMCI_IMR_NOTBUSY;
+ }
+ /* Check if TX ready */
+ if (dwMaskedSr & HSMCI_SR_TXRDY)
+ {
+ dwMsk &= ~(uint32_t)HSMCI_IMR_TXRDY;
+ }
+ /* Check if DMA finished */
+ if (dwMaskedSr & HSMCI_SR_DMADONE)
+ {
+ uint8_t bGoon, bFByte = HSMCI_IsFByteEnabled(pHw);
+
+ //printf(pCmd->cmdOp.bmBits.xfrData == SDMMC_CMD_TX ? "t" : "r");
+
+ /* Increase data index */
+ pMcid->dwXfrNdx += pMcid->dwXSize;
+ /* Next transfer */
+ bGoon = _MciDMA(pMcid,
+ bFByte,
+ (pCmd->cmdOp.bmBits.xfrData == SDMMC_CMD_RX));
+ if (bGoon)
+ {
+ /* Go on: Waiting DMADONE */
+ //if (MCID_DBG) printf("+");
+ }
+ else
+ {
+ /* Disable DMA done */
+ HSMCI_DisableIt(pHw, HSMCI_IDR_DMADONE);
+ /* For TX, check FIFOEMPTY - BLKE - TXRDY */
+ if (pCmd->cmdOp.bmBits.xfrData == SDMMC_CMD_TX)
+ {
+ HSMCI_EnableIt(pHw, HSMCI_IER_FIFOEMPTY);
+ }
+ else
+ {
+ dwMsk &= ~(uint32_t)HSMCI_IMR_DMADONE;
+ }
+ }
+ }
+ /* Check if FIFO empty (all data sent) */
+ if (dwMaskedSr & HSMCI_SR_FIFOEMPTY)
+ {
+ /* Disable FIFO empty */
+ HSMCI_DisableIt(pHw, HSMCI_IDR_FIFOEMPTY);
+ /* Byte transfer no BLKE check */
+ if (HSMCI_IsFByteEnabled(pHw))
+ {
+ dwMsk &= ~(uint32_t)HSMCI_IMR_FIFOEMPTY;
+ }
+ /* Continuous R/W */
+ else if (pCmd->bCmd == 0)
+ {
+ /* Check _NOTBUSY */
+ //if (dwSr & HSMCI_SR_NOTBUSY)
+ {
+ dwMsk &= ~(uint32_t)HSMCI_IMR_FIFOEMPTY;
+ }
+ //else
+ //{
+ // HSMCI_EnableIt(pHw, HSMCI_IER_NOTBUSY);
+ //}
+ }
+ /* Single block R/W */
+ else
+ {
+ /* Check _NOTBUSY */
+ if (dwSr & HSMCI_SR_NOTBUSY)
+ {
+ dwMsk &= ~(uint32_t)HSMCI_IMR_FIFOEMPTY;
+ }
+ else
+ {
+ HSMCI_EnableIt(pHw, HSMCI_IER_NOTBUSY);
+ }
+ }
+ }
+ /* All none error mask done, complete the command */
+ if (0 == dwMsk || pMcid->bState == MCID_ERROR)
+ {
+ #if 0
+ if (pCmd->bCmd == 12)
+ printf("%2d: %x\n\r", pCmd->bCmd, dwSr);
+ #endif
+
+ /* Error reset */
+ if (pMcid->bState == MCID_ERROR)
+ {
+ MCI_Reset(pMcid, 1);
+ }
+ else
+ {
+ pCmd->bStatus = SDMMC_SUCCESS;
+
+ if (pCmd->pResp)
+ {
+ uint8_t bRspSize, i;
+ switch(pCmd->cmdOp.bmBits.respType)
+ {
+ case 1: case 3: case 4: case 5: case 6: case 7:
+ bRspSize = 1;
+ break;
+
+ case 2:
+ bRspSize = 4;
+ break;
+
+ default:
+ bRspSize = 0;
+ }
+ for (i = 0; i < bRspSize; i ++)
+ {
+ pCmd->pResp[i] = HSMCI_GetResponse(pHw);
+ }
+ }
+ }
+ /* Disable interrupts */
+ HSMCI_DisableIt(pHw, HSMCI_GetItMask(pHw));
+ /* Disable peripheral */
+ _PeripheralDisable(pMcid->bID);
+
+ /* Command is finished */
+ _FinishCmd(pMcid, pCmd->bStatus);
+ }
+}
+
+/**
+ * Cancel pending SD/MMC command.
+ */
+uint32_t MCID_CancelCmd(sMcid *pMcid)
+{
+ if (pMcid->bState == MCID_IDLE)
+ {
+ return SDMMC_ERROR_STATE;
+ }
+ if (pMcid->bState == MCID_CMD)
+ {
+ /* Cancel ... */
+ MCI_Reset(pMcid, 1);
+ /* Command is finished */
+ _FinishCmd(pMcid, SDMMC_ERROR_USER_CANCEL);
+ }
+ return SDMMC_OK;
+}
+
+/**
+ * Reset MCID and disable HW
+ */
+void MCID_Reset(sMcid * pMcid)
+{
+ Hsmci *pHw = pMcid->pMciHw;
+
+ MCID_CancelCmd(pMcid);
+
+ _PeripheralEnable(pMcid->bID);
+
+ /* Disable */
+ MCI_DISABLE(pHw);
+ /* MR reset */
+ HSMCI_ConfigureMode(pHw, HSMCI_GetMode(pHw) & (HSMCI_MR_CLKDIV_Msk
+ | HSMCI_MR_PWSDIV_Msk));
+ /* BLKR reset */
+ HSMCI_ConfigureTransfer(pHw, 0, 0);
+
+ /* Cancel ... */
+ MCI_Reset(pMcid, 1);
+ _PeripheralDisable(pMcid->bID);
+
+ if (pMcid->bState == MCID_CMD)
+ {
+ /* Command is finished */
+ _FinishCmd(pMcid, SDMMC_ERROR_USER_CANCEL);
+ }
+}
+
+/**
+ * Check if the command is finished
+ */
+uint32_t MCID_IsCmdCompleted(sMcid *pMcid)
+{
+ sSdmmcCommand *pCmd = pMcid->pCmd;
+
+ if (pMcid->bPolling)
+ {
+ MCID_Handler(pMcid);
+ }
+ if (pMcid->bState == MCID_CMD)
+ {
+ return 0;
+ }
+ if (pCmd)
+ {
+ return 0;
+ }
+ return 1;
+}
+
+/**
+ * IO control functions
+ */
+uint32_t MCID_IOCtrl(sMcid *pMcid, uint32_t bCtl, uint32_t param)
+{
+ Hsmci *pMciHw = pMcid->pMciHw;
+ uint8_t mciDis;
+
+ assert(pMcid->pMciHw);
+
+ mciDis = _PeripheralEnable(pMcid->bID);
+
+ switch (bCtl)
+ {
+ case SDMMC_IOCTL_BUSY_CHECK:
+ *(uint32_t*)param = !MCID_IsCmdCompleted(pMcid);
+ break;
+
+ case SDMMC_IOCTL_POWER:
+ return SDMMC_ERROR_NOT_SUPPORT;
+
+ case SDMMC_IOCTL_RESET:
+ MCID_Reset(pMcid);
+ return SDMMC_SUCCESS;
+
+ case SDMMC_IOCTL_CANCEL_CMD:
+ return MCID_CancelCmd(pMcid);
+
+ case SDMMC_IOCTL_SET_CLOCK:
+ *(uint32_t*)param = MCI_SetSpeed(pMcid,
+ *(uint32_t*)param,
+ pMcid->dwMck);
+ break;
+
+ case SDMMC_IOCTL_SET_HSMODE:
+ HSMCI_HsEnable( pMciHw, *(uint32_t*)param );
+ *(uint32_t*)param = HSMCI_IsHsEnabled( pMciHw );
+ break;
+
+ case SDMMC_IOCTL_SET_BUSMODE:
+ if (*(uint32_t*)param > 4)
+ {
+ *(uint32_t*)param = 4;
+ }
+ HSMCI_SetBusWidth( pMciHw, *(uint32_t*)param );
+ break;
+
+ case SDMMC_IOCTL_GET_BUSMODE:
+ *(uint32_t*)param = 4; /* Max 4-bit bus */
+ break;
+
+ case SDMMC_IOCTL_GET_HSMODE:
+ *(uint32_t*)param = 1; /* Supported */
+ break;
+
+ default:
+ return SDMMC_ERROR_NOT_SUPPORT;
+
+ }
+
+ if (mciDis)
+ {
+ _PeripheralDisable(pMcid->bID);
+ }
+ return SDMMC_OK;
+}
+
+/**
+ * Initialize the SD/MMC card driver struct for SD/MMC bus mode
+ * \note defined in SD/MMC bus mode low level (Here uses MCI interface)
+ */
+void SDD_InitializeSdmmcMode(sSdCard * pSd,void * pDrv,uint8_t bSlot)
+{
+ SDD_Initialize(pSd, pDrv, bSlot, &sdHal);
+}
+
+/**@}*/
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/sdmmc/sdmmc.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/sdmmc/sdmmc.c
new file mode 100644
index 0000000..1e86ea4
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/sdmmc/sdmmc.c
@@ -0,0 +1,3219 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+/** \addtogroup sdmmc_api
+ * @{
+ */
+/**
+ * \file
+ *
+ * Implementation of SD low level drivers.
+ */
+
+/*----------------------------------------------------------------------------
+ * Headers
+ *----------------------------------------------------------------------------*/
+
+#include <assert.h>
+#include <string.h>
+#include <stdint.h>
+#include "memories.h"
+/*----------------------------------------------------------------------------
+ * Global variables
+ *----------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------
+ * Local constants
+ *----------------------------------------------------------------------------*/
+
+/** \addtogroup sdmmc_status_bm SD/MMC Status register constants
+ * @{*/
+#define STATUS_APP_CMD (1UL << 5)
+#define STATUS_SWITCH_ERROR (1UL << 7)
+#define STATUS_READY_FOR_DATA (1UL << 8)
+#define STATUS_IDLE (0UL << 9)
+#define STATUS_READY (1UL << 9)
+#define STATUS_IDENT (2UL << 9)
+#define STATUS_STBY (3UL << 9)
+#define STATUS_TRAN (4UL << 9)
+#define STATUS_DATA (5UL << 9)
+#define STATUS_RCV (6UL << 9)
+#define STATUS_PRG (7UL << 9)
+#define STATUS_DIS (8UL << 9)
+#define STATUS_STATE (0xFUL << 9)
+#define STATUS_ERASE_RESET (1UL << 13)
+#define STATUS_WP_ERASE_SKIP (1UL << 15)
+#define STATUS_CIDCSD_OVERWRITE (1UL << 16)
+#define STATUS_OVERRUN (1UL << 17)
+#define STATUS_UNERRUN (1UL << 18)
+#define STATUS_ERROR (1UL << 19)
+#define STATUS_CC_ERROR (1UL << 20)
+#define STATUS_CARD_ECC_FAILED (1UL << 21)
+#define STATUS_ILLEGAL_COMMAND (1UL << 22)
+#define STATUS_COM_CRC_ERROR (1UL << 23)
+#define STATUS_UN_LOCK_FAILED (1UL << 24)
+#define STATUS_CARD_IS_LOCKED (1UL << 25)
+#define STATUS_WP_VIOLATION (1UL << 26)
+#define STATUS_ERASE_PARAM (1UL << 27)
+#define STATUS_ERASE_SEQ_ERROR (1UL << 28)
+#define STATUS_BLOCK_LEN_ERROR (1UL << 29)
+#define STATUS_ADDRESS_MISALIGN (1UL << 30)
+#define STATUS_ADDR_OUT_OR_RANGE (1UL << 31)
+
+#define STATUS_STOP ((uint32_t)( STATUS_CARD_IS_LOCKED \
+ | STATUS_COM_CRC_ERROR \
+ | STATUS_ILLEGAL_COMMAND \
+ | STATUS_CC_ERROR \
+ | STATUS_ERROR \
+ | STATUS_STATE \
+ | STATUS_READY_FOR_DATA ))
+
+#define STATUS_WRITE ((uint32_t)( STATUS_ADDR_OUT_OR_RANGE \
+ | STATUS_ADDRESS_MISALIGN \
+ | STATUS_BLOCK_LEN_ERROR \
+ | STATUS_WP_VIOLATION \
+ | STATUS_CARD_IS_LOCKED \
+ | STATUS_COM_CRC_ERROR \
+ | STATUS_ILLEGAL_COMMAND \
+ | STATUS_CC_ERROR \
+ | STATUS_ERROR \
+ | STATUS_ERASE_RESET \
+ | STATUS_STATE \
+ | STATUS_READY_FOR_DATA ))
+
+#define STATUS_READ ((uint32_t)( STATUS_ADDR_OUT_OR_RANGE \
+ | STATUS_ADDRESS_MISALIGN \
+ | STATUS_BLOCK_LEN_ERROR \
+ | STATUS_CARD_IS_LOCKED \
+ | STATUS_COM_CRC_ERROR \
+ | STATUS_ILLEGAL_COMMAND \
+ | STATUS_CARD_ECC_FAILED \
+ | STATUS_CC_ERROR \
+ | STATUS_ERROR \
+ | STATUS_ERASE_RESET \
+ | STATUS_STATE \
+ | STATUS_READY_FOR_DATA ))
+
+#define STATUS_SD_SWITCH ((uint32_t)( STATUS_ADDR_OUT_OR_RANGE \
+ | STATUS_CARD_IS_LOCKED \
+ | STATUS_COM_CRC_ERROR \
+ | STATUS_ILLEGAL_COMMAND \
+ | STATUS_CARD_ECC_FAILED \
+ | STATUS_CC_ERROR \
+ | STATUS_ERROR \
+ | STATUS_UNERRUN \
+ | STATUS_OVERRUN \
+ /*| STATUS_STATE*/))
+
+#define STATUS_MMC_SWITCH ((uint32_t)( STATUS_CARD_IS_LOCKED \
+ | STATUS_COM_CRC_ERROR \
+ | STATUS_ILLEGAL_COMMAND \
+ | STATUS_CC_ERROR \
+ | STATUS_ERROR \
+ | STATUS_ERASE_RESET \
+ /*| STATUS_STATE*/ \
+ /*| STATUS_READY_FOR_DATA*/ \
+ | STATUS_SWITCH_ERROR ))
+/** @}*/
+
+/** \addtogroup sdio_status_bm SDIO Status definitions
+ * @{*/
+/** The CRC check of the previous command failed. */
+#define SDIO_COM_CRC_ERROR (1UL << 15)
+/** Command not legal for the card state. */
+#define SDIO_ILLEGAL_COMMAND (1UL << 14)
+
+/** Status bits mask for SDIO R6 */
+#define STATUS_SDIO_R6 (SDIO_COM_CRC_ERROR \
+ | SDIO_ILLEGAL_COMMAND \
+ | SDIO_R6_ERROR)
+/** Status bits mask for SDIO R5 */
+#define STATUS_SDIO_R5 (0/*SDIO_R5_STATE*/ \
+ | SDIO_R5_ERROR \
+ | SDIO_R5_FUNCN_ERROR \
+ | SDIO_R5_OUT_OF_RANGE)
+/** @}*/
+
+/*----------------------------------------------------------------------------
+ * Macros
+ *----------------------------------------------------------------------------*/
+
+/** Return SD/MMC card address */
+#define CARD_ADDR(pSd) (pSd->wAddress)
+
+/** Return SD/MMC card block size (Default size now, 512B) */
+#define BLOCK_SIZE(pSd) (pSd->wCurrBlockLen)
+
+/** Convert block address to SD/MMC command parameter */
+#define SD_ADDRESS(pSd, address) \
+ ( ((pSd)->dwTotalSize == 0xFFFFFFFF) ? \
+ (address):((address) << 9) )
+
+/** Check if SD Spec version 1.10 or later */
+#define SD_IsVer1_10(pSd) \
+ ( SD_SCR_SD_SPEC(pSd->SCR) >= SD_SCR_SD_SPEC_1_10 )
+
+/** Check if SD card support HS mode (1.10 or later) */
+#define SD_IsHsModeSupported(pSd) \
+ ( /*SD_IsVer1_10(pSd)||*/(SD_CSD_STRUCTURE(pSd->CSD)>=1) )
+
+/** Check if SD card support 4-bit mode (All SD card) */
+#define SD_IsBusModeSupported(pSd) (1)
+
+/** Check if MMC Spec version 4 */
+#define MMC_IsVer4(pSd) ( MMC_CSD_SPEC_VERS(pSd->CSD) >= 4 )
+
+/** Check if MMC CSD structure is 1.2 (3.1 or later) */
+#define MMC_IsCSDVer1_2(pSd) \
+ ( (SD_CSD_STRUCTURE(pSd->CSD)==2) \
+ ||(SD_CSD_STRUCTURE(pSd->CSD)>2&&MMC_EXT_CSD_STRUCTURE(pSd->EXT)>=2) )
+
+/** Check if MMC card support boot mode (4.3 or later) */
+#define MMC_IsBootModeSupported(pSd) \
+ ( (MMC_IsVer4(pSd)&&(eMMC_CID_CBX(pSd->CID)==0x01) )
+
+/** Check if MMC card support 8-bit mode (4.0 or later) */
+#define MMC_IsBusModeSupported(pSd) (MMC_IsVer4(pSd))
+
+/** Check if MMC card support HS mode (4.0 or later) */
+#define MMC_IsHsModeSupported(pSd) \
+ (MMC_IsCSDVer1_2(pSd)&&(MMC_EXT_CARD_TYPE(pSd->EXT)&0x2))
+
+/*----------------------------------------------------------------------------
+ * Local variables
+ *----------------------------------------------------------------------------*/
+
+/** SD/MMC transfer rate unit codes (10K) list */
+static const uint32_t sdmmcTransUnits[7] = {
+ 10, 100, 1000, 10000,
+ 0, 0, 0
+};
+
+/** SD transfer multiplier factor codes (1/10) list */
+static const uint32_t sdTransMultipliers[16] = {
+ 0, 10, 12, 13, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 70, 80
+};
+
+/** MMC transfer multiplier factor codes (1/10) list */
+static const uint32_t mmcTransMultipliers[16] = {
+ 0, 10, 12, 13, 15, 20, 26, 30, 35, 40, 45, 52, 55, 60, 70, 80
+};
+
+/*----------------------------------------------------------------------------
+ * Local functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ * Delay some loop
+ */
+static void Delay(volatile unsigned int loop)
+{
+ for(;loop > 0; loop --);
+}
+
+/**
+ */
+static void _ResetCmd(sSdmmcCommand *pCmd)
+{
+ memset(pCmd, 0, sizeof(sSdmmcCommand));
+}
+
+/**
+ */
+static uint8_t _SendCmd(sSdCard *pSd, fSdmmcCallback fCallback, void* pCbArg)
+{
+ sSdmmcCommand *pCmd = &pSd->sdCmd;
+ sSdHalFunctions *pHal = pSd->pHalf;
+ void *pDrv = pSd->pDrv;
+ uint8_t bRc;
+
+ pCmd->fCallback = fCallback;
+ pCmd->pArg = pCbArg;
+ bRc = pHal->fCommand(pSd->pDrv, pCmd);
+
+ if (fCallback == NULL)
+ {
+ uint32_t busy = 1;
+ for (; busy;)
+ {
+ pHal->fIOCtrl(pDrv, SDMMC_IOCTL_BUSY_CHECK, (uint32_t)&busy);
+ }
+ return pCmd->bStatus;
+ }
+
+ return bRc;
+}
+
+/**
+ */
+static uint8_t _HwGetBusWidth(sSdCard *pSd)
+{
+ sSdHalFunctions *pHal = pSd->pHalf;
+ void *pDrv = pSd->pDrv;
+ uint32_t busWidth = 1;
+ pHal->fIOCtrl(pDrv, SDMMC_IOCTL_GET_BUSMODE, (uint32_t)&busWidth);
+ return busWidth;
+}
+
+/**
+ */
+static uint8_t _HwSetBusWidth(sSdCard *pSd, uint8_t newWidth)
+{
+ sSdHalFunctions *pHal = pSd->pHalf;
+ void *pDrv = pSd->pDrv;
+ uint32_t busWidth = newWidth;
+ uint32_t rc;
+
+ rc = pHal->fIOCtrl(pDrv, SDMMC_IOCTL_SET_BUSMODE, (uint32_t)&busWidth);
+ return rc;
+}
+
+/**
+ */
+static uint8_t _HwGetHsMode(sSdCard *pSd)
+{
+ sSdHalFunctions *pHal = pSd->pHalf;
+ void *pDrv = pSd->pDrv;
+ uint32_t hsMode = 0;
+ pHal->fIOCtrl(pDrv, SDMMC_IOCTL_GET_HSMODE, (uint32_t)&hsMode);
+ return hsMode;
+}
+
+/**
+ */
+static uint8_t _HwSetHsMode(sSdCard *pSd, uint8_t newHsMode)
+{
+ sSdHalFunctions *pHal = pSd->pHalf;
+ void *pDrv = pSd->pDrv;
+ uint32_t hsMode = newHsMode;
+ uint32_t rc;
+ rc = pHal->fIOCtrl(pDrv, SDMMC_IOCTL_SET_HSMODE, (uint32_t)&hsMode);
+ return rc;
+}
+
+/**
+ */
+static uint8_t _HwSetClock(sSdCard *pSd, uint32_t *pIoValClk)
+{
+ sSdHalFunctions *pHal = pSd->pHalf;
+ void *pDrv = pSd->pDrv;
+ uint32_t dwClock = *pIoValClk;
+ uint32_t rc;
+ rc = pHal->fIOCtrl(pDrv, SDMMC_IOCTL_SET_CLOCK, (uint32_t)&dwClock);
+ if (rc == SDMMC_SUCCESS || rc == SDMMC_CHANGED)
+ {
+ *pIoValClk = dwClock;
+ }
+ return rc;
+}
+
+/**
+ */
+static uint8_t _HwReset(sSdCard *pSd)
+{
+ sSdHalFunctions *pHal = pSd->pHalf;
+ void *pDrv = pSd->pDrv;
+ uint32_t rc;
+ rc = pHal->fIOCtrl(pDrv, SDMMC_IOCTL_RESET, 0);
+ return rc;
+}
+
+/**
+ * Find SDIO ManfID, Fun0 tuple.
+ * \param pSd Pointer to \ref sSdCard instance.
+ * \param address Search area start address.
+ * \param size Search area size.
+ * \param pAddrManfID Pointer to ManfID address value buffer.
+ * \param pAddrFunc0 Pointer to Func0 address value buffer.
+ */
+static uint8_t SdioFindTuples(sSdCard *pSd,
+ uint32_t address, uint32_t size,
+ uint32_t *pAddrManfID,
+ uint32_t *pAddrFunc0)
+{
+ uint8_t error, tmp[3];
+ uint32_t addr = address;
+ uint8_t flagFound = 0; /* 1:Manf, 2:Func0 */
+ uint32_t addManfID = 0, addFunc0 = 0;
+ for(;flagFound != 3;) {
+ error = SDIO_ReadDirect(pSd, SDIO_CIA, addr, tmp, 3);
+ if (error) {
+ TRACE_ERROR("SdioFindTuples.RdDirect: %d\n\r", error);
+ return error;
+ }
+ /* End */
+ if (tmp[0] == CISTPL_END) break;
+ /* ManfID */
+ else if (tmp[0] == CISTPL_MANFID) {
+ flagFound |= 1; addManfID = addr;
+ }
+ /* Func0 */
+ else if (tmp[0] == CISTPL_FUNCE && tmp[2] == 0x00) {
+ flagFound |= 2; addFunc0 = addr;
+ }
+ /* Tuple error ? */
+ if (tmp[1] == 0) break;
+ /* Next address */
+ addr += (tmp[1] + 2);
+ if (addr > (address + size)) break;
+ }
+ if (pAddrManfID) *pAddrManfID = addManfID;
+ if (pAddrFunc0) *pAddrFunc0 = addFunc0;
+ return 0;
+}
+
+/**
+ * \brief Decode Trans Speed Value
+ * \param code The trans speed code value.
+ * \param unitCodes Unit list in 10K, 0 as unused value.
+ * \param multiCodes Multiplier list in 1/10, index 1 ~ 15 is valid.
+ */
+static uint32_t SdmmcDecodeTransSpeed(uint32_t code,
+ const uint32_t *unitCodes,
+ const uint32_t *multiCodes)
+{
+ uint32_t speed;
+ uint8_t unitI, mulI;
+
+ /* Unit code is valid ? */
+ unitI = (code & 0x7);
+ if (unitCodes[unitI] == 0) return 0;
+
+ /* Multi code is valid ? */
+ mulI = (code >> 3) & 0xF;
+ if (multiCodes[mulI] == 0) return 0;
+
+ speed = unitCodes[unitI] * multiCodes[mulI];
+ return speed;
+}
+
+/**
+ * Initialization delay: The maximum of 1 msec, 74 clock cycles and supply ramp
+ * up time.
+ * Returns the command transfer result (see SendMciCommand).
+ * \param pSd Pointer to \ref sSdCard instance.
+ */
+static inline uint8_t Pon(sSdCard *pSd)
+{
+ sSdmmcCommand *pCmd = &pSd->sdCmd;
+ uint8_t bRc;
+
+ TRACE_DEBUG("PwrOn()\n\r");
+ _ResetCmd(pCmd);
+
+ /* Fill command */
+ pCmd->cmdOp.wVal = SDMMC_CMD_POWERONINIT;
+
+ /* Send command */
+ bRc = _SendCmd(pSd, NULL, NULL);
+ return bRc;
+}
+
+/**
+ * Resets all cards to idle state
+ * \param pSd Pointer to \ref sSdCard instance.
+ * \param arg Argument used.
+ * \return the command transfer result (see SendMciCommand).
+ */
+static inline uint8_t Cmd0(sSdCard *pSd, uint8_t arg)
+{
+ sSdmmcCommand *pCmd = &pSd->sdCmd;
+ uint8_t bRc;
+
+ TRACE_DEBUG("Cmd0()\n\r");
+ _ResetCmd(pCmd);
+
+ /* Fill command */
+ pCmd->cmdOp.wVal = SDMMC_CMD_CNODATA(0);
+ pCmd->dwArg = arg;
+ /* Send command */
+ bRc = _SendCmd(pSd, NULL, NULL);
+ return bRc;
+}
+
+/**
+ * MMC send operation condition command.
+ * Sends host capacity support information and activates the card's
+ * initialization process.
+ * Returns the command transfer result (see SendMciCommand).
+ * \param pSd Pointer to \ref sSdCard instance.
+ * \param pOCR Pointer to fill OCR value to send and get.
+ */
+static inline uint8_t Cmd1(sSdCard *pSd, uint8_t* pHd)
+{
+ sSdmmcCommand *pCmd = &pSd->sdCmd;
+ uint8_t bRc;
+ uint32_t dwArg;
+
+ TRACE_DEBUG("Cmd1()\n\r");
+ _ResetCmd(pCmd);
+
+ dwArg = SD_HOST_VOLTAGE_RANGE | MMC_OCR_ACCESS_SECTOR;
+
+ /* Fill command */
+ pCmd->cmdOp.wVal = SDMMC_CMD_CNODATA(3)
+ | SDMMC_CMD_bmOD;
+ pCmd->bCmd = 1;
+ pCmd->dwArg = dwArg;
+ pCmd->pResp = &dwArg;
+
+ /* Send command */
+ bRc = _SendCmd(pSd, NULL, NULL);
+
+ /* Check result */
+ if (bRc) return bRc;
+
+ if (dwArg & SD_OCR_BUSY)
+ {
+ *pHd = 0;
+ if ((dwArg & MMC_OCR_ACCESS_MODE) == MMC_OCR_ACCESS_SECTOR)
+ {
+ *pHd = 1;
+ }
+ return 0;
+ }
+ return SDMMC_ERROR_NOT_INITIALIZED;
+}
+
+/**
+ * Asks any card to send the CID numbers
+ * on the CMD line (any card that is
+ * connected to the host will respond)
+ * Returns the command transfer result (see SendMciCommand).
+ * \param pSd Pointer to a SD card driver instance.
+ * \param pCID Pointer to buffer for storing the CID numbers.
+ */
+static inline uint8_t Cmd2(sSdCard *pSd)
+{
+ sSdmmcCommand *pCmd = &pSd->sdCmd;
+ uint8_t bRc;
+
+ TRACE_DEBUG("Cmd2()\n\r");
+ _ResetCmd(pCmd);
+
+ /* Fill command */
+ pCmd->cmdOp.wVal = SDMMC_CMD_CNODATA(2)
+ | SDMMC_CMD_bmOD;
+ pCmd->bCmd = 2;
+ pCmd->pResp = pSd->CID;
+
+ /* Send command */
+ bRc = _SendCmd(pSd, NULL, NULL);
+ return bRc;
+}
+
+/**
+ * Ask the SD card to publish a new relative address (RCA)
+ * or
+ * Assign relative address to the MMC card
+ * Returns the command transfer result (see SendMciCommand).
+ * \param pSd Pointer to a SD card driver instance.
+ * \param pRsp Pointer to buffer to fill response (address on 31:16).
+ */
+static uint8_t Cmd3(sSdCard *pSd)
+{
+ sSdmmcCommand *pCmd = &pSd->sdCmd;
+ uint32_t dwResp;
+ uint8_t bRc;
+
+ TRACE_DEBUG("Cmd3()\n\r");
+ _ResetCmd(pCmd);
+
+ /* Fill command */
+ pCmd->cmdOp.wVal = SDMMC_CMD_CNODATA(6)
+ | SDMMC_CMD_bmOD;
+ pCmd->bCmd = 3;
+ pCmd->pResp = &dwResp;
+
+ if (pSd->bCardType == CARD_MMC || pSd->bCardType == CARD_MMCHD)
+ {
+ uint16_t wNewAddr = CARD_ADDR(pSd) + 1;
+ if (wNewAddr == 0) wNewAddr ++;
+ pCmd->dwArg = wNewAddr << 16;
+
+ bRc = _SendCmd(pSd, NULL, NULL);
+ if (bRc == SDMMC_OK)
+ {
+ CARD_ADDR(pSd) = wNewAddr;
+ }
+ }
+ else
+ {
+ bRc = _SendCmd(pSd, NULL, NULL);
+ if (bRc == SDMMC_OK)
+ {
+ CARD_ADDR(pSd) = dwResp >> 16;
+ }
+ }
+ return bRc;
+}
+
+/**
+ * SDIO SEND OPERATION CONDITION (OCR) command.
+ * Sends host capacity support information and acrivates the card's
+ * initialization process.
+ * \return The command transfer result (see SendMciCommand).
+ * \param pSd Pointer to a SD/MMC card driver instance.
+ * \param pIo Pointer to data sent as well as response buffer (32bit).
+ */
+static uint8_t Cmd5(sSdCard *pSd, uint32_t *pIo)
+{
+ sSdmmcCommand *pCmd = &pSd->sdCmd;
+ uint8_t bRc;
+
+ TRACE_DEBUG("Cmd5()\n\r");
+ _ResetCmd(pCmd);
+
+ /* Fill command */
+ pCmd->cmdOp.wVal = SDMMC_CMD_CNODATA(4)
+ | SDMMC_CMD_bmOD;
+ pCmd->bCmd = 5;
+ pCmd->dwArg = *pIo;
+ pCmd->pResp = pIo;
+
+ /* Send command */
+ bRc = _SendCmd(pSd, NULL, NULL);
+ return bRc;
+}
+
+/**
+ * Switches the mode of operation of the selected card.
+ * CMD6 is valid under the "trans" state.
+ * \return The command transfer result (see SendMciCommand).
+ * \param pSd Pointer to a SD/MMC card driver instance.
+ * \param pSwitchArg Pointer to a MmcCmd6Arg instance.
+ * \param pStatus Pointer to where the 512bit status is returned.
+ * \param pResp Pointer to where the response is returned.
+ */
+static uint8_t SdCmd6(sSdCard *pSd,
+ const void * pSwitchArg,
+ uint32_t * pStatus,
+ uint32_t * pResp)
+{
+ sSdmmcCommand *pCmd = &pSd->sdCmd;
+ uint8_t bRc;
+ SdCmd6Arg * pSdSwitch;
+
+ TRACE_DEBUG("Cmd6()\n\r");
+ _ResetCmd(pCmd);
+
+ pSdSwitch = (SdCmd6Arg*)pSwitchArg;
+ pCmd->bCmd = 6;
+ pCmd->cmdOp.wVal = SDMMC_CMD_CDATARX(1);
+ pCmd->dwArg = (pSdSwitch->mode << 31)
+ | (pSdSwitch->reserved << 30)
+ | (pSdSwitch->reserveFG6 << 20)
+ | (pSdSwitch->reserveFG5 << 16)
+ | (pSdSwitch->reserveFG4 << 12)
+ | (pSdSwitch->reserveFG3 << 8)
+ | (pSdSwitch->command << 4)
+ | (pSdSwitch->accessMode << 0);
+ if (pStatus) {
+ pCmd->wBlockSize = 512/8;
+ pCmd->wNbBlocks = 1;
+ pCmd->pData = (uint8_t*)pStatus;
+ }
+ pCmd->pResp = pResp;
+
+ bRc = _SendCmd(pSd, NULL, NULL);
+ return bRc;
+}
+
+/**
+ * Switches the mode of operation of the selected card or
+ * Modifies the EXT_CSD registers.
+ * CMD6 is valid under the "trans" state.
+ * \return The command transfer result (see SendMciCommand).
+ * \param pSd Pointer to a SD/MMC card driver instance.
+ * \param pSwitchArg Pointer to a MmcCmd6Arg instance.
+ * \param pResp Pointer to where the response is returned.
+ */
+static uint8_t MmcCmd6(sSdCard *pSd,
+ const void * pSwitchArg,
+ uint32_t * pResp)
+{
+ sSdmmcCommand *pCmd = &pSd->sdCmd;
+ uint8_t bRc;
+ MmcCmd6Arg * pMmcSwitch;
+
+ TRACE_DEBUG("Cmd6()\n\r");
+ _ResetCmd(pCmd);
+
+ pMmcSwitch = (MmcCmd6Arg*)pSwitchArg;
+ pCmd->bCmd = 6;
+ pCmd->cmdOp.wVal = SDMMC_CMD_CNODATA(1);
+ pCmd->dwArg = (pMmcSwitch->access << 24)
+ | (pMmcSwitch->index << 16)
+ | (pMmcSwitch->value << 8)
+ | (pMmcSwitch->cmdSet << 0);
+ pCmd->pResp = pResp;
+
+ bRc = _SendCmd(pSd, NULL, NULL);
+ return bRc;
+}
+
+/**
+ * Command toggles a card between the
+ * stand-by and transfer states or between
+ * the programming and disconnect states.
+ * Returns the command transfer result (see SendMciCommand).
+ * \param pSd Pointer to a SD card driver instance.
+ * \param cardAddr Relative Card Address (0 deselects all).
+ */
+static uint8_t Cmd7(sSdCard *pSd, uint16_t address)
+{
+ sSdmmcCommand *pCmd = &pSd->sdCmd;
+ uint8_t bRc;
+
+ TRACE_DEBUG("Cmd7()\n\r");
+ _ResetCmd(pCmd);
+
+ /* Fill command */
+ pCmd->cmdOp.wVal = SDMMC_CMD_CNODATA(address ? 1 : 0);
+ pCmd->bCmd = 7;
+ pCmd->dwArg = address << 16;
+
+ /* Send command */
+ bRc = _SendCmd(pSd, NULL, NULL);
+ return bRc;
+}
+
+/**
+ * Sends SD Memory Card interface condition, which includes host supply
+ * voltage information and asks the card whether card supports voltage.
+ * Should be performed at initialization time to detect the card type.
+ * \param pSd Pointer to a SD card driver instance.
+ * \param supplyVoltage Expected supply voltage(SD).
+ * \return 0 if successful;
+ * otherwise returns SD_ERROR_NORESPONSE if the card did not answer
+ * the command, or SDMMC_ERROR.
+ */
+static uint8_t SdCmd8(sSdCard *pSd,
+ uint8_t supplyVoltage)
+{
+ sSdmmcCommand *pCmd = &pSd->sdCmd;
+ uint32_t dwResp;
+ uint8_t bRc;
+
+ TRACE_DEBUG("Cmd8()\n\r");
+ _ResetCmd(pCmd);
+
+ /* Fill command information */
+ pCmd->bCmd = 8;
+ pCmd->cmdOp.wVal = SDMMC_CMD_CNODATA(7)
+ | SDMMC_CMD_bmOD;
+ pCmd->dwArg = (supplyVoltage << 8) | (0xAA);
+ pCmd->pResp = &dwResp;
+
+ /* Send command */
+ bRc = _SendCmd(pSd, NULL, NULL);
+
+ /* Check result */
+ if (bRc == SDMMC_ERROR_NORESPONSE) {
+ return SDMMC_ERROR_NORESPONSE;
+ }
+ /* SD_R7
+ * Bit 0 - 7: check pattern (echo-back)
+ * Bit 8 -11: voltage accepted
+ */
+ else if (!bRc &&
+ ((dwResp & 0x00000FFF) == ((uint32_t)(supplyVoltage << 8) | 0xAA))) {
+ return 0;
+ }
+ else {
+ return SDMMC_ERROR;
+ }
+}
+
+/**
+ * SEND_EXT_CSD, to get EXT_CSD register as a block of data.
+ * Valid under "trans" state.
+ * \param pSd Pointer to a SD card driver instance.
+ * \param pEXT 512 byte buffer pointer for EXT_CSD data.
+ * \return 0 if successful;
+ * otherwise returns SD_ERROR_NORESPONSE if the card did not answer
+ * the command, or SDMMC_ERROR.
+ */
+static uint8_t MmcCmd8(sSdCard *pSd,
+ uint8_t* pEXT)
+{
+ sSdmmcCommand *pCmd = &pSd->sdCmd;
+ uint8_t bRc;
+
+ TRACE_DEBUG("Cmd8()\n\r");
+ _ResetCmd(pCmd);
+
+ /* Fill command */
+ pCmd->bCmd = 8;
+ pCmd->cmdOp.wVal = SDMMC_CMD_CDATARX(1);
+ pCmd->wBlockSize = 512;
+ pCmd->wNbBlocks = 1;
+ pCmd->pData = pEXT;
+
+ /* Send command */
+ bRc = _SendCmd(pSd, NULL, NULL);
+ return bRc;
+}
+
+/**
+ * Addressed card sends its card-specific
+ * data (CSD) on the CMD line.
+ * Returns the command transfer result (see SendMciCommand).
+ * \param pSd Pointer to a SD card driver instance.
+ * \param cardAddr Card Relative Address.
+ * \param pCSD Pointer to buffer for CSD data.
+ */
+static uint8_t Cmd9(sSdCard *pSd)
+{
+ sSdmmcCommand *pCmd = &pSd->sdCmd;
+ uint8_t bRc;
+
+ TRACE_DEBUG("Cmd9()\n\r");
+ _ResetCmd(pCmd);
+
+ /* Fill command */
+ pCmd->cmdOp.wVal = SDMMC_CMD_CNODATA(2);
+ pCmd->bCmd = 9;
+ pCmd->dwArg = CARD_ADDR(pSd) << 16;
+ pCmd->pResp = pSd->CSD;
+
+ /* Send command */
+ bRc = _SendCmd(pSd, NULL, NULL);
+ return bRc;
+}
+
+/**
+ * Forces the card to stop transmission
+ * \param pSd Pointer to a SD card driver instance.
+ * \param pStatus Pointer to a status variable.
+ */
+static uint8_t Cmd12(sSdCard *pSd, uint32_t *pStatus)
+{
+ sSdmmcCommand *pCmd = &pSd->sdCmd;
+ uint8_t bRc;
+
+ TRACE_DEBUG("Cmd12()\n\r");
+ _ResetCmd(pCmd);
+
+ /* Fill command */
+ pCmd->bCmd = 12;
+ pCmd->cmdOp.wVal = SDMMC_CMD_CSTOP
+ | SDMMC_CMD_bmBUSY;
+ pCmd->pResp = pStatus;
+
+ /* Send command */
+ bRc = _SendCmd(pSd, NULL, NULL);
+ return bRc;
+}
+
+/**
+ * Addressed card sends its status register.
+ * Returns the command transfer result (see SendMciCommand).
+ * \param pSd Pointer to a SD card driver instance.
+ * \param pStatus Pointer to a status variable.
+ */
+static uint8_t Cmd13(sSdCard *pSd, uint32_t *pStatus)
+{
+ sSdmmcCommand *pCmd = &pSd->sdCmd;
+ uint8_t bRc;
+
+ TRACE_DEBUG("Cmd13()\n\r");
+ _ResetCmd(pCmd);
+
+ /* Fill command */
+ pCmd->bCmd = 13;
+ pCmd->cmdOp.wVal = SDMMC_CMD_CNODATA(1);
+ pCmd->dwArg = CARD_ADDR(pSd) << 16;
+ pCmd->pResp = pStatus;
+
+ /* Send command */
+ bRc = _SendCmd(pSd, NULL, NULL);
+ return bRc;
+}
+
+/**
+ * In the case of a Standard Capacity SD Memory Card, this command sets the
+ * block length (in bytes) for all following block commands
+ * (read, write, lock).
+ * Default block length is fixed to 512 Bytes.
+ * Set length is valid for memory access commands only if partial block read
+ * operation are allowed in CSD.
+ * In the case of a High Capacity SD Memory Card, block length set by CMD16
+ * command does not affect the memory read and write commands. Always 512
+ * Bytes fixed block length is used. This command is effective for LOCK_UNLOCK
+ * command. In both cases, if block length is set larger than 512Bytes, the
+ * card sets the BLOCK_LEN_ERROR bit.
+ * \param pSd Pointer to a SD card driver instance.
+ * \param blockLength Block length in bytes.
+ */
+static uint8_t Cmd16(sSdCard *pSd, uint16_t blkLen)
+{
+ sSdmmcCommand *pCmd = &pSd->sdCmd;
+ uint8_t bRc;
+
+ TRACE_DEBUG("Cmd16()\n\r");
+ _ResetCmd(pCmd);
+
+ /* Fill command */
+ pCmd->cmdOp.wVal = SDMMC_CMD_CNODATA(1);
+ pCmd->bCmd = 16;
+ pCmd->dwArg = blkLen;
+
+ /* Send command */
+ bRc = _SendCmd(pSd, NULL, NULL);
+ return bRc;
+}
+
+/**
+ * Read single block command
+ * \param pSd Pointer to a SD card driver instance.
+ * \param pData Pointer to the DW aligned buffer to be filled.
+ * \param address Data Address on SD/MMC card.
+ * \param pStatus Pointer response buffer as status return.
+ * \param fCallback Pointer to optional callback invoked on command end.
+ * NULL: Function return until command finished.
+ * Pointer: Return immediately and invoke callback at end.
+ * Callback argument is fixed to a pointer to sSdCard instance.
+ */
+static uint8_t Cmd17(sSdCard *pSd,
+ uint8_t *pData,
+ uint32_t address,
+ uint32_t *pStatus,
+ fSdmmcCallback callback)
+{
+ sSdmmcCommand *pCmd = &pSd->sdCmd;
+ uint8_t bRc;
+
+ TRACE_DEBUG("Cmd17()\n\r");
+ _ResetCmd(pCmd);
+
+ /* Fill command */
+ pCmd->cmdOp.wVal = SDMMC_CMD_CDATARX(1);
+ pCmd->bCmd = 17;
+ pCmd->dwArg = address;
+ pCmd->pResp = pStatus;
+ pCmd->wBlockSize = BLOCK_SIZE(pSd);
+ pCmd->wNbBlocks = 1;
+ pCmd->pData = pData;
+ pCmd->fCallback = callback;
+
+ /* Send command */
+ bRc = _SendCmd(pSd, NULL, NULL);
+ return bRc;
+}
+
+/**
+ * Continously transfers datablocks from card to host until interrupted by a
+ * STOP_TRANSMISSION command.
+ * \param pSd Pointer to a SD card driver instance.
+ * \param nbBlocks Number of blocks to send.
+ * \param pData Pointer to the DW aligned buffer to be filled.
+ * \param address Data Address on SD/MMC card.
+ * \param pStatus Pointer to the response status.
+ * \param fCallback Pointer to optional callback invoked on command end.
+ * NULL: Function return until command finished.
+ * Pointer: Return immediately and invoke callback at end.
+ * Callback argument is fixed to a pointer to sSdCard instance.
+ */
+static uint8_t Cmd18(sSdCard *pSd,
+ uint16_t nbBlock,
+ uint8_t *pData,
+ uint32_t address,
+ uint32_t *pStatus,
+ fSdmmcCallback callback)
+{
+ sSdmmcCommand *pCmd = &pSd->sdCmd;
+ uint8_t bRc;
+
+ TRACE_DEBUG("Cmd18()\n\r");
+ _ResetCmd(pCmd);
+
+ /* Fill command */
+ pCmd->cmdOp.wVal = SDMMC_CMD_CDATARX(1);
+ pCmd->bCmd = 18;
+ pCmd->dwArg = address;
+ pCmd->pResp = pStatus;
+ pCmd->wBlockSize = BLOCK_SIZE(pSd);
+ pCmd->wNbBlocks = nbBlock;
+ pCmd->pData = pData;
+ pCmd->fCallback = callback;
+ /* Send command */
+ bRc = _SendCmd(pSd, NULL, NULL);
+ return bRc;
+}
+
+/**
+ * Write single block command
+ * \param pSd Pointer to a SD card driver instance.
+ * \param blockSize Block size (shall be set to 512 in case of high capacity).
+ * \param pData Pointer to the DW aligned buffer to be filled.
+ * \param address Data Address on SD/MMC card.
+ * \param pStatus Pointer to response buffer as status.
+ * \param fCallback Pointer to optional callback invoked on command end.
+ * NULL: Function return until command finished.
+ * Pointer: Return immediately and invoke callback at end.
+ * Callback argument is fixed to a pointer to sSdCard instance.
+ */
+static inline uint8_t Cmd24(sSdCard *pSd,
+ uint8_t *pData,
+ uint32_t address,
+ uint32_t *pStatus,
+ fSdmmcCallback callback)
+{
+ sSdmmcCommand *pCmd = &pSd->sdCmd;
+ uint8_t bRc;
+
+ TRACE_DEBUG("Cmd24()\n\r");
+ _ResetCmd(pCmd);
+
+ /* Fill command */
+ pCmd->cmdOp.wVal = SDMMC_CMD_CDATATX(1);
+ pCmd->bCmd = 24;
+ pCmd->dwArg = address;
+ pCmd->pResp = pStatus;
+ pCmd->wBlockSize = BLOCK_SIZE(pSd);
+ pCmd->wNbBlocks = 1;
+ pCmd->pData = pData;
+ pCmd->fCallback = callback;
+ /* Send command */
+ bRc = _SendCmd(pSd, NULL, NULL);
+ return bRc;
+}
+
+/**
+ * Write multiple block command
+ * \param pSd Pointer to a SD card driver instance.
+ * \param blockSize Block size (shall be set to 512 in case of high capacity).
+ * \param nbBlock Number of blocks to send.
+ * \param pData Pointer to the DW aligned buffer to be filled.
+ * \param address Data Address on SD/MMC card.
+ * \param pStatus Pointer to the response buffer as status.
+ * \param fCallback Pointer to optional callback invoked on command end.
+ * NULL: Function return until command finished.
+ * Pointer: Return immediately and invoke callback at end.
+ * Callback argument is fixed to a pointer to sSdCard instance.
+ */
+static uint8_t Cmd25(sSdCard *pSd,
+ uint16_t nbBlock,
+ uint8_t *pData,
+ uint32_t address,
+ uint32_t *pStatus,
+ fSdmmcCallback callback)
+{
+ sSdmmcCommand *pCmd = &pSd->sdCmd;
+ uint8_t bRc;
+
+ TRACE_DEBUG("Cmd25()\n\r");
+ _ResetCmd(pCmd);
+
+ /* Fill command */
+ pCmd->cmdOp.wVal = SDMMC_CMD_CDATATX(1);
+ pCmd->bCmd = 25;
+ pCmd->dwArg = address;
+ pCmd->pResp = pStatus;
+ pCmd->wBlockSize = BLOCK_SIZE(pSd);
+ pCmd->wNbBlocks = nbBlock;
+ pCmd->pData = pData;
+ pCmd->fCallback = callback;
+ /* Send command */
+ bRc = _SendCmd(pSd, NULL, NULL);
+ return bRc;
+}
+
+/**
+ * SDIO IO_RW_DIRECT command, response R5.
+ * \return the command transfer result (see SendMciCommand).
+ * \param pSd Pointer to a SD card driver instance.
+ * \param pIoData Pointer to input argument (\ref SdioRwDirectArg) and
+ * response (\ref SdmmcR5) buffer.
+ * \param fCallback Pointer to optional callback invoked on command end.
+ * NULL: Function return until command finished.
+ * Pointer: Return immediately and invoke callback at end.
+ * Callback argument is fixed to a pointer to sSdCard instance.
+ */
+static uint8_t Cmd52(sSdCard *pSd,
+ uint8_t wrFlag,
+ uint8_t funcNb,
+ uint8_t rdAfterWr,
+ uint32_t addr,
+ uint32_t *pIoData)
+{
+ SdioCmd52Arg *pArg52 = (SdioCmd52Arg*)pIoData;
+ sSdmmcCommand *pCmd = &pSd->sdCmd;
+ uint8_t bRc;
+
+ pArg52->rwFlag = wrFlag;
+ pArg52->functionNum = funcNb;
+ pArg52->rawFlag = rdAfterWr;
+ pArg52->regAddress = addr;
+
+ TRACE_DEBUG("Cmd52()\n\r");
+ _ResetCmd(pCmd);
+
+ /* Fill command */
+ pCmd->cmdOp.wVal = SDMMC_CMD_CNODATA(5);
+ pCmd->bCmd = 52;
+ pCmd->dwArg = *pIoData;
+ pCmd->pResp = pIoData;
+
+ /* Send command */
+ bRc = _SendCmd(pSd, NULL, NULL);
+ return bRc;
+}
+
+/**
+ * SDIO IO_RW_EXTENDED command, response R5.
+ * \param pSd Pointer to a SD card driver instance.
+ * \param pArgResp Pointer to input argument (\ref SdioRwExtArg)
+ * and response (\ref SdmmcR5) buffer.
+ * \param pData Pointer to data buffer to transfer.
+ * \param size Transfer data size.
+ * \param fCallback Pointer to optional callback invoked on command end.
+ * NULL: Function return until command finished.
+ * Pointer: Return immediately and invoke callback at end.
+ * Callback argument is fixed to a pointer to sSdCard instance.
+ * \param pArg Callback argument.
+ */
+static uint8_t Cmd53(sSdCard *pSd,
+ uint8_t wrFlag,
+ uint8_t funcNb,
+ uint8_t blockMode,
+ uint8_t incAddr,
+ uint32_t addr,
+ uint8_t *pIoData,
+ uint16_t len,
+ uint32_t *pArgResp,
+ fSdmmcCallback fCallback,
+ void* pCbArg)
+{
+ sSdmmcCommand *pCmd = &pSd->sdCmd;
+ uint8_t bRc;
+
+ SdioCmd53Arg* pArg53;
+ pArg53 = (SdioCmd53Arg*)pArgResp;
+ pArg53->rwFlag = wrFlag;
+ pArg53->functionNum = funcNb;
+ pArg53->blockMode = blockMode;
+ pArg53->opCode = incAddr;
+ pArg53->regAddress = addr;
+ pArg53->count = len;
+
+ /* Fill command */
+ pCmd->bCmd = 53;
+ pCmd->cmdOp.wVal = SDMMC_CMD_CNODATA(5)
+ | SDMMC_CMD_bmIO;
+ if (wrFlag)
+ {
+ pCmd->cmdOp.wVal |= SDMMC_CMD_bmDATATX;
+ }
+ else
+ {
+ pCmd->cmdOp.wVal |= SDMMC_CMD_bmDATARX;
+ }
+ if (blockMode)
+ {
+ pCmd->wBlockSize = pSd->wCurrBlockLen;
+ }
+ else
+ {
+ pCmd->wBlockSize = 1;
+ }
+ pCmd->dwArg = *pArgResp;
+ pCmd->pResp = pArgResp;
+ pCmd->pData = pIoData;
+ pCmd->wNbBlocks = len;
+ pCmd->fCallback = fCallback;
+ pCmd->pArg = pCbArg;
+
+ bRc = _SendCmd(pSd, NULL, NULL);
+ return bRc;
+}
+
+/**
+ * Indicates to the card that the next command is an application specific
+ * command rather than a standard command.
+ * \return the command transfer result (see SendMciCommand).
+ * \param pSd Pointer to a SD card driver instance.
+ * \param cardAddr Card Relative Address.
+ */
+static uint8_t Cmd55(sSdCard *pSd, uint16_t cardAddr)
+{
+ sSdmmcCommand *pCmd = &pSd->sdCmd;
+ uint32_t dwResp;
+ uint8_t bRc;
+
+ TRACE_DEBUG( "Cmd55()\n\r" ) ;
+ _ResetCmd(pCmd);
+
+ /* Fill command information */
+ pCmd->bCmd = 55;
+ pCmd->cmdOp.wVal = SDMMC_CMD_CNODATA(1)
+ | (cardAddr ? 0 : SDMMC_CMD_bmOD);
+ pCmd->dwArg = cardAddr << 16;
+ pCmd->pResp = &dwResp;
+
+ /* Send command */
+ bRc = _SendCmd(pSd, NULL, NULL);
+ return bRc;
+}
+
+/**
+ * Defines the data bus width (00=1bit or 10=4 bits bus) to be used for data
+ * transfer.
+ * The allowed data bus widths are given in SCR register.
+ * Should be invoked after SdmmcCmd55().
+ * \param pSd Pointer to a SD card driver instance.
+ * \param arg Argument for this command.
+ * \param pStatus Pointer to buffer for command response as status.
+ * \return the command transfer result (see SendMciCommand).
+ */
+static uint8_t SdAcmd6(sSdCard *pSd,
+ uint32_t arg,
+ uint32_t *pStatus)
+{
+ sSdmmcCommand *pCmd = &pSd->sdCmd;
+ uint8_t bRc;
+
+ TRACE_DEBUG( "Acmd6()\n\r" ) ;
+ _ResetCmd(pCmd);
+
+ /* Fill command information */
+ pCmd->bCmd = 6;
+ pCmd->cmdOp.wVal = SDMMC_CMD_CNODATA(1);
+ pCmd->pResp = pStatus;
+ pCmd->dwArg = arg;
+
+ /* Send command */
+ bRc = _SendCmd(pSd, NULL, NULL);
+ return bRc;
+}
+
+/**
+ * Defines the data bus width (00=1bit or 10=4 bits bus) to be used for data
+ * transfer.
+ * The allowed data bus widths are given in SCR register.
+ * \param pSd Pointer to a SD card driver instance.
+ * \param busWidth Bus width in bits (4 or 1).
+ * \return the command transfer result (see SendCommand).
+ */
+static uint8_t Acmd6(sSdCard *pSd, uint8_t busWidth)
+{
+ uint8_t error;
+ uint32_t arg;
+ error = Cmd55(pSd, CARD_ADDR(pSd));
+ if (error)
+ {
+ TRACE_ERROR("Acmd6.cmd55:%d\n\r", error);
+ return error;
+ }
+ arg = (busWidth == 4)
+ ? SD_ST_DATA_BUS_WIDTH_4BIT : SD_ST_DATA_BUS_WIDTH_1BIT;
+ return SdAcmd6(pSd, arg, NULL);
+}
+#ifdef SDCMD13
+/**
+ * The SD Status contains status bits that are related to the SD memory Card
+ * proprietary features and may be used for future application-specific usage.
+ * Can be sent to a card only in 'tran_state'.
+ * Should be invoked after SdmmcCmd55().
+ * \param pSd Pointer to a SD card driver instance.
+ * \param pSdSTAT Pointer to buffer for SD STATUS data.
+ * \return the command transfer result (see SendMciCommand).
+ */
+static uint8_t SdAcmd13(sSdCard *pSd,
+ uint32_t * pSdSTAT)
+{
+ sSdmmcCommand *pCmd = &pSd->sdCmd;
+ uint32_t dwResp;
+ uint8_t bRc;
+
+ TRACE_DEBUG( "Acmd13()\n\r" ) ;
+ _ResetCmd(pCmd);
+
+ /* Fill command information */
+ pCmd->bCmd = 13;
+ pCmd->cmdOp.wVal = SDMMC_CMD_CDATARX(1);
+ pCmd->pResp = &dwResp;
+ pCmd->pData = (uint8_t*)pSdSTAT;
+ pCmd->wBlockSize = 512/8;
+ pCmd->wNbBlocks = 1;
+
+ /* Send command */
+ bRc = _SendCmd(pSd, NULL, NULL);
+ return bRc;
+}
+
+/**
+ * The SD Status contains status bits that are related to the SD memory Card
+ * proprietary features and may be used for future application-specific usage.
+ * Can be sent to a card only in 'tran_state'.
+ */
+static uint8_t Acmd13(sSdCard *pSd, uint32_t *pSdSTAT)
+{
+ uint8_t error;
+ error = Cmd55(pSd, CARD_ADDR(pSd));
+ if (error) {
+ TRACE_ERROR("Acmd13.cmd55:%d\n\r", error);
+ return error;
+ }
+ return SdAcmd13(pSd, pSdSTAT);
+}
+#endif
+/**
+ * Asks to all cards to send their operations conditions.
+ * Returns the command transfer result (see SendMciCommand).
+ * Should be invoked after SdmmcCmd55().
+ * \param pSd Pointer to a SD card driver instance.
+ * \param pOpIo Pointer to argument that should be sent and OCR content.
+ */
+static uint8_t SdAcmd41(sSdCard *pSd, uint32_t* pOpIo)
+{
+ sSdmmcCommand *pCmd = &pSd->sdCmd;
+ uint8_t bRc;
+
+ TRACE_DEBUG( "Acmd41()\n\r" ) ;
+ _ResetCmd(pCmd);
+
+ /* Fill command information */
+ pCmd->bCmd = 41;
+ pCmd->cmdOp.wVal = SDMMC_CMD_CNODATA(3);
+ pCmd->dwArg = *pOpIo;
+ pCmd->pResp = pOpIo;
+
+ /* Send command */
+ bRc = _SendCmd(pSd, NULL, NULL);
+ return bRc;
+}
+
+/**
+ * Asks to all cards to send their operations conditions.
+ * Returns the command transfer result (see SendCommand).
+ * \param pSd Pointer to a SD card driver instance.
+ * \param hcs Shall be true if Host support High capacity.
+ * \param pCCS Set the pointed flag to 1 if hcs != 0 and SD OCR CCS flag is set.
+ */
+static uint8_t Acmd41(sSdCard *pSd, uint8_t hcs, uint8_t *pCCS)
+{
+ uint8_t error;
+ uint32_t arg;
+ do {
+ error = Cmd55(pSd, 0);
+ if (error) {
+ TRACE_ERROR("Acmd41.cmd55:%d\n\r", error);
+ return error;
+ }
+ arg = SD_HOST_VOLTAGE_RANGE;
+ if (hcs) arg |= SD_OCR_CCS;
+ error = SdAcmd41(pSd, &arg);
+ if (error) {
+ TRACE_ERROR("Acmd41.cmd41:%d\n\r", error);
+ return error;
+ }
+ *pCCS = ((arg & SD_OCR_CCS)!=0);
+ } while ((arg & SD_OCR_BUSY) != SD_OCR_BUSY);
+ return 0;
+}
+
+/**
+ * Continue to transfer datablocks from card to host until interrupted by a
+ * STOP_TRANSMISSION command.
+ * \param pSd Pointer to a SD card driver instance.
+ * \param blockSize Block size (shall be set to 512 in case of high capacity).
+ * \param nbBlock Number of blocks to send.
+ * \param pData Pointer to the application buffer to be filled.
+ * \param fCallback Pointer to optional callback invoked on command end.
+ * NULL: Function return until command finished.
+ * Pointer: Return immediately and invoke callback at end.
+ * \param pArg Callback argument.
+ */
+static uint8_t SdmmcRead(sSdCard *pSd,
+ uint16_t blockSize,
+ uint16_t nbBlock,
+ uint8_t *pData,
+ fSdmmcCallback fCallback,
+ void* pArg)
+{
+ sSdmmcCommand *pCmd = &pSd->sdCmd;
+ uint8_t bRc;
+
+ TRACE_DEBUG( "Read()\n\r" ) ;
+ _ResetCmd(pCmd);
+
+ /* Fill command information */
+ pCmd->cmdOp.wVal = SDMMC_CMD_DATARX;
+ pCmd->wBlockSize = blockSize;
+ pCmd->wNbBlocks = nbBlock;
+ pCmd->pData = pData;
+
+ /* Send command */
+ bRc = _SendCmd(pSd, fCallback, pArg);
+ return bRc;
+}
+
+/**
+ * Continue to transfer datablocks from host to card until interrupted by a
+ * STOP_TRANSMISSION command.
+ * \param pSd Pointer to a SD card driver instance.
+ * \param blockSize Block size (shall be set to 512 in case of high capacity).
+ * \param nbBlock Number of blocks to send.
+ * \param pData Pointer to the application buffer to be filled.
+ * \param fCallback Pointer to optional callback invoked on command end.
+ * NULL: Function return until command finished.
+ * Pointer: Return immediately and invoke callback at end.
+ * \param pArg Callback argument.
+ */
+static uint8_t SdmmcWrite(sSdCard *pSd,
+ uint16_t blockSize,
+ uint16_t nbBlock,
+ const uint8_t *pData,
+ fSdmmcCallback fCallback,
+ void* pArg)
+{
+ sSdmmcCommand *pCmd = &pSd->sdCmd;
+ uint8_t bRc;
+
+ TRACE_DEBUG( "Write()\n\r" ) ;
+ _ResetCmd(pCmd);
+
+ /* Fill command information */
+ pCmd->cmdOp.wVal = SDMMC_CMD_DATATX;
+ pCmd->wBlockSize = blockSize;
+ pCmd->wNbBlocks = nbBlock;
+ pCmd->pData = (uint8_t*)pData;
+
+ /* Send command */
+ bRc = _SendCmd(pSd, fCallback, pArg);
+ return bRc;
+}
+
+/**
+ * Try SW Reset several times (CMD0 with ARG 0)
+ * \param pSd Pointer to a SD card driver instance.
+ * \param retry Retry times.
+ * \return 0 or MCI error code.
+ */
+static uint8_t SwReset(sSdCard *pSd, uint32_t retry)
+{
+ uint32_t i;
+ uint8_t error = 0;
+
+ for (i = 0; i < retry; i ++) {
+ error = Cmd0(pSd, 0);
+ if (error != SDMMC_ERROR_NORESPONSE)
+ break;
+ }
+ return error;
+}
+#if 1
+#if 1
+/**
+ * Stop TX/RX
+ */
+static uint8_t _StopCmd(sSdCard *pSd)
+{
+ uint32_t status, state;
+ uint32_t i, j;
+ uint8_t error = 0;
+ /* Retry stop for 9 times */
+ for (i = 0; i < 9; i ++)
+ {
+ error = Cmd12(pSd, &status);
+ if (error)
+ {
+ TRACE_ERROR("_StopC.Cmd12: st%x, er%d\n\r", pSd->bState, error);
+ return error;
+ }
+ /* Check status for 299 times */
+ for (j = 0; j < 299; j ++)
+ {
+ error = Cmd13(pSd, &status);
+ if (error)
+ {
+ TRACE_ERROR("_StopC.Cmd13: st%x, er%d\n\r", pSd->bState, error);
+ return error;
+ }
+ state = status & STATUS_STATE;
+
+ /* Invalid state */
+ if( state == STATUS_IDLE
+ || state == STATUS_READY
+ || state == STATUS_IDENT
+ || state == STATUS_STBY
+ || state == STATUS_DIS )
+ {
+ TRACE_ERROR("_StopC.state\n\r");
+ return SDMMC_ERROR_NOT_INITIALIZED;
+ }
+
+ /* Ready? */
+ if ( (status & STATUS_READY_FOR_DATA) == STATUS_READY_FOR_DATA
+ && state == STATUS_TRAN )
+ return SDMMC_SUCCESS;
+
+ }
+ /* For write, try stop command again */
+ if (state != STATUS_RCV)
+ break;
+ }
+ return SDMMC_ERROR_STATE;
+}
+#else
+/**
+ * Wait for TX ready
+ */
+static uint8_t _WaitTxReady(sSdCard *pSd)
+{
+ uint8_t error;
+ uint32_t status;
+
+ do
+ {
+ error = Cmd13(pSd, &status);
+ if (error)
+ {
+ TRACE_ERROR("SingleTx.WR.Cmd13: %d\n\r", error);
+ return error;
+ }
+ }
+ while ((status & STATUS_READY_FOR_DATA) == 0);
+
+ return SDMMC_SUCCESS;
+}
+/**
+ * Wait for RX ready
+ */
+static uint8_t _WaitRxReady(sSdCard *pSd)
+{
+ uint32_t status;
+ uint8_t error;
+
+ /* Wait for card to be ready for data transfers */
+ do
+ {
+ error = Cmd13(pSd, &status);
+ if (error)
+ {
+ TRACE_ERROR("SingleTx.RD.Cmd13: %d\n\r", error);
+
+ return error;
+ }
+
+ if( ((status & STATUS_STATE) == STATUS_IDLE)
+ ||((status & STATUS_STATE) == STATUS_READY)
+ ||((status & STATUS_STATE) == STATUS_IDENT))
+ {
+ TRACE_ERROR("SingleTx.mode\n\r");
+
+ return SDMMC_ERROR_NOT_INITIALIZED;
+ }
+
+ /* If the card is in sending data state or
+ in receivce data state */
+ if ( ((status & STATUS_STATE) == STATUS_RCV) ||((status & STATUS_STATE) == STATUS_DATA) )
+ {
+
+ TRACE_DEBUG("SingleTx.state = 0x%X\n\r",
+ (status & STATUS_STATE) >> 9);
+ }
+ }
+ while ( ((status & STATUS_READY_FOR_DATA) == 0) || ((status & STATUS_STATE) != STATUS_TRAN) ) ;
+
+ return SDMMC_SUCCESS;
+}
+#endif
+#endif
+/**
+ * Perform sligle block transfer
+ */
+static uint8_t PerformSingleTransfer(sSdCard *pSd,
+ uint32_t address,
+ uint8_t *pData,
+ uint8_t isRead)
+{
+ uint32_t status;
+ uint8_t error = 0;
+ /* Reset transfer state if previous in multi- mode */
+ if( (pSd->bState == SDMMC_STATE_DATA_RD)
+ || (pSd->bState == SDMMC_STATE_DATA_WR)) {
+ /* Stop transfer */
+ #if 1
+ error = _StopCmd(pSd);
+ if (error) return error;
+ #else
+ error = Cmd12(pSd, &status);
+ if (error)
+ {
+ TRACE_ERROR("SingleTx.Cmd12: st%x, er%d\n\r", pSd->bState, error);
+ }
+ #if 0
+ else if (pSd->bState == SDMMC_STATE_DATA_WR)
+ {
+ if (isRead) _WaitRxReady(pSd);
+ else _WaitTxReady(pSd);
+ }
+ #endif
+ #endif
+ pSd->bState = SDMMC_STATE_TRAN;
+ pSd->dwPrevBlk = 0xFFFFFFFF;
+ }
+
+ if ( isRead )
+ {
+ /* Read single block */
+ error = Cmd17( pSd, pData, SD_ADDRESS(pSd,address), &status, NULL ) ;
+
+ if ( error )
+ {
+ TRACE_ERROR("SingleTx.Cmd17: %d\n\r", error);
+ return error;
+ }
+
+ if (status & ~(STATUS_READY_FOR_DATA | STATUS_STATE))
+ {
+ TRACE_ERROR("CMD17.stat: %lx\n\r",
+ status & ~(STATUS_READY_FOR_DATA | STATUS_STATE));
+ return SDMMC_ERROR;
+ }
+ return error;
+ }
+ /* Write */
+ {
+ /* Move to Sending data state */
+ error = Cmd24(pSd,
+ pData, SD_ADDRESS(pSd,address),
+ &status,
+ NULL);
+ if (error)
+ {
+ TRACE_DEBUG("SingleTx.Cmd24: %d\n\r", error);
+ return error;
+ }
+
+ if (status & (STATUS_WRITE & ~(STATUS_READY_FOR_DATA | STATUS_STATE)))
+ {
+ TRACE_ERROR("CMD24(0x%x).stat: %lx\n\r",
+ SD_ADDRESS(pSd,address),
+ status & (STATUS_WRITE
+ & ~(STATUS_READY_FOR_DATA | STATUS_STATE)));
+ return SDMMC_ERROR;
+ }
+ }
+
+ return error;
+}
+
+/**
+ * Move SD card to transfer state. The buffer size must be at
+ * least 512 byte long. This function checks the SD card status register and
+ * address the card if required before sending the transfer command.
+ * Returns 0 if successful; otherwise returns an code describing the error.
+ * \param pSd Pointer to a SD card driver instance.
+ * \param address Address of the block to transfer.
+ * \param nbBlocks Number of blocks to be transfer, 0 for infinite transfer.
+ * \param pData Data buffer whose size is at least the block size.
+ * \param isRead 1 for read data and 0 for write data.
+ */
+static uint8_t MoveToTransferState(sSdCard *pSd,
+ uint32_t address,
+ uint16_t nbBlocks,
+ uint8_t *pData,
+ uint8_t isRead)
+{
+ uint32_t status;
+ uint8_t error;
+
+ if ( (pSd->bState == SDMMC_STATE_DATA_RD) || (pSd->bState == SDMMC_STATE_DATA_WR) )
+ {
+ #if 1
+ error = _StopCmd(pSd);
+ if (error) return error;
+ #else
+ /* Stop transfer */
+ error = Cmd12(pSd, &status);
+ if (error)
+ {
+ TRACE_ERROR("MTTranState.Cmd12: st%x, er%d\n\r", pSd->bState, error);
+ return error;
+ }
+ #if 1
+ else if (pSd->bState == SDMMC_STATE_DATA_WR)
+ {
+ if (isRead) _WaitRxReady(pSd);
+ else _WaitTxReady(pSd);
+ }
+ #endif
+ #endif
+ }
+
+ if ( isRead )
+ {
+ //_WaitRxReady(pSd);
+
+ /* Move to Receiving data state */
+ error = Cmd18(pSd, nbBlocks, pData, SD_ADDRESS(pSd,address), &status, NULL);
+
+ //Cmd13(pSd, &status); //status -> 0xB00
+ if (error)
+ {
+ TRACE_ERROR("MTTranState.Cmd18: %d\n\r", error);
+ return error;
+ }
+ if (status & ~(STATUS_READY_FOR_DATA | STATUS_STATE)) {
+ TRACE_ERROR("CMD18.stat: %lx\n\r",
+ status & ~(STATUS_READY_FOR_DATA | STATUS_STATE));
+ return SDMMC_ERROR;
+ }
+ }
+ else
+ {
+ //_WaitTxReady(pSd);
+
+ /* Move to Sending data state */
+ error = Cmd25(pSd,
+ nbBlocks,
+ pData, SD_ADDRESS(pSd,address),
+ &status,
+ NULL);
+ if (error) {
+ TRACE_DEBUG("MoveToTransferState.Cmd25: %d\n\r", error);
+ return error;
+ }
+ if (status & (STATUS_WRITE & ~(STATUS_READY_FOR_DATA | STATUS_STATE))) {
+ TRACE_ERROR("CMD25(0x%x, %d).stat: %lx\n\r",
+ SD_ADDRESS(pSd,address), nbBlocks,
+ status & (STATUS_WRITE
+ & ~(STATUS_READY_FOR_DATA | STATUS_STATE)));
+ return SDMMC_ERROR;
+ }
+ }
+
+ if (!error) pSd->dwPrevBlk = address + (nbBlocks-1);
+ return error;
+}
+
+/**
+ * Switch card state between STBY and TRAN (or CMD and TRAN)
+ * \param pSd Pointer to a SD card driver instance.
+ * \param address Card address to TRAN, 0 to STBY
+ * \param statCheck Whether to check the status before CMD7.
+ */
+static uint8_t MmcSelectCard(sSdCard *pSd, uint16_t address, uint8_t statCheck)
+{
+ uint8_t error;
+ uint32_t status;
+ uint32_t targetState = address ? STATUS_TRAN : STATUS_STBY;
+ uint32_t srcState = address ? STATUS_STBY : STATUS_TRAN;
+
+ /* At this stage the Initialization and identification process is achieved
+ * The SD card is supposed to be in Stand-by State */
+ while(statCheck) {
+ error = Cmd13(pSd, &status);
+ if (error) {
+ TRACE_ERROR("MmcSelectCard.Cmd13 (%d)\n\r", error);
+ return error;
+ }
+ if ((status & STATUS_READY_FOR_DATA)) {
+ uint32_t currState = status & STATUS_STATE;
+ if (currState == targetState) return 0;
+ if (currState != srcState) {
+ TRACE_ERROR("MmcSelectCard, wrong state %x\n\r", currState);
+ return SDMMC_ERROR;
+ }
+ break;
+ }
+ }
+
+ /* witch to TRAN mode to Select the current SD/MMC
+ * so that SD ACMD6 can process or EXT_CSD can read. */
+ error = Cmd7(pSd, address);
+ if (error == SDMMC_ERROR_NOT_INITIALIZED && address == 0) {}
+ else if (error) {
+ TRACE_ERROR("MmcSelectCard.Cmd7 (%d)\n\r", error);
+ }
+
+ return error;
+}
+
+/**
+ * Get MMC EXT_CSD information
+ * \param pSd Pointer to a SD card driver instance.
+ */
+static void MmcGetExtInformation(sSdCard *pSd)
+{
+ uint8_t error;
+ /* MMC 4.0 Higher version */
+ if(SD_CSD_STRUCTURE(pSd->CSD) >= 2 && MMC_IsVer4(pSd)) {
+
+ error = MmcCmd8(pSd, (uint8_t*)pSd->EXT);
+ if (error) {
+ TRACE_ERROR("MmcGetExt.Cmd8: %d\n\r", error);
+ }
+ }
+}
+
+/**
+ * Get SD/MMC memory max transfer speed in K.
+ * \param pSd Pointer to a SD card driver instance.
+ */
+static uint32_t SdmmcGetMaxSpeed(sSdCard *pSd)
+{
+ uint32_t speed = 0;
+ if (pSd->bCardType & CARD_TYPE_bmSDMMC) {
+ speed = SdmmcDecodeTransSpeed(SD_CSD_TRAN_SPEED(pSd->CSD),
+ sdmmcTransUnits,
+ ((pSd->bCardType & CARD_TYPE_bmSDMMC) == CARD_TYPE_bmSD) ?
+ sdTransMultipliers : mmcTransMultipliers);
+ }
+ return speed;
+}
+
+/**
+ * Get SDIO max transfer speed, in K.
+ * \param pSd Pointer to a SD card driver instance.
+ */
+static uint32_t SdioGetMaxSpeed(sSdCard *pSd)
+{
+ uint8_t error;
+ uint32_t speed = 0;
+ uint32_t addr = 0;
+ uint8_t buf[6];
+ if (pSd->bCardType & CARD_TYPE_bmSDIO) {
+ /* Check Func0 tuple in CIS area */
+ error = SDIO_ReadDirect(pSd,
+ SDIO_CIA, SDIO_CIS_PTR_REG,
+ (uint8_t*)&addr, 3);
+ if (error) {
+ TRACE_ERROR("SdioUpdateCardInformation.RdDirect: %d\n\r", error);
+ return error;
+ }
+ error = SdioFindTuples(pSd, addr, 256, NULL, &addr);
+ if (error) {
+ TRACE_ERROR("SdioUpdateCardInformation.FindTuple: %d\n\r", error);
+ return error;
+ }
+ if (addr) {
+ /* Fun0 tuple: fn0_blk_siz & max_tran_speed */
+ SDIO_ReadDirect(pSd, SDIO_CIA, addr, buf, 6);
+ speed = SdmmcDecodeTransSpeed(buf[5],
+ sdmmcTransUnits,
+ sdTransMultipliers);
+ }
+ }
+ return speed;
+}
+
+/**
+ * Get SCR and SD Status information
+ * \param pSd Pointer to a SD card driver instance.
+ */
+static void SdGetExtInformation(sSdCard *pSd)
+{
+ pSd = pSd;
+}
+
+/**
+ * Update SD/MMC information.
+ * Update CSD for card speed switch.
+ * Update ExtDATA for any card function switch.
+ * \param pSd Pointer to a SD card driver instance.
+ * \return error code when update CSD error.
+ */
+static void SdMmcUpdateInformation(sSdCard *pSd,
+ uint8_t csd,
+ uint8_t extData)
+{
+ uint8_t error;
+
+ /* Update CSD for new TRAN_SPEED value */
+ if (csd) {
+ MmcSelectCard(pSd, 0, 1);
+ Delay(800);
+ error = Cmd9(pSd);
+ if (error ) {
+ TRACE_ERROR("SdMmcUpdateInfo.Cmd9 (%d)\n\r", error);
+ return;
+ }
+ error = MmcSelectCard(pSd, pSd->wAddress, 1);
+ }
+ if (extData) {
+ switch(pSd->bCardType & CARD_TYPE_bmSDMMC) {
+ case CARD_TYPE_bmSD: SdGetExtInformation(pSd); break;
+ case CARD_TYPE_bmMMC: MmcGetExtInformation(pSd); break;
+ default: break;
+ }
+ }
+}
+
+/**
+ * \brief Check HS capability and enable it
+ * \param pSd Pointer to sSdCard instance.
+ */
+static uint8_t SdMmcEnableHighSpeed(sSdCard *pSd)
+{
+ uint8_t error;
+ uint32_t status;
+ uint8_t io, sd, mmc;
+
+ io = ((pSd->bCardType & CARD_TYPE_bmSDIO) > 0);
+ sd = ((pSd->bCardType & CARD_TYPE_bmSDMMC) == CARD_TYPE_bmSD);
+ mmc = ((pSd->bCardType & CARD_TYPE_bmSDMMC) == CARD_TYPE_bmMMC);
+
+ /* Check host driver capability */
+ if (_HwGetHsMode(pSd) == 0) {
+ TRACE_INFO("HS Mode not supported by Host\n\r");
+ return SDMMC_ERROR_NOT_SUPPORT;
+ }
+ /* Check MMC */
+ if (mmc) {
+ /* MMC card type 3 (HS) */
+ //if (SD_CSD_STRUCTURE(pSd) >= 2 && (MMC_EXT_CARD_TYPE(pSd) & 0x2)) {
+ if (MMC_IsHsModeSupported(pSd)) {
+ /* Try switch to HS mode */
+ MmcCmd6Arg cmd6Arg = {
+ 0x3,
+ MMC_EXT_HS_TIMING_I,
+ MMC_EXT_HS_TIMING_EN,
+ 0};
+ error = MmcCmd6(pSd, &cmd6Arg, &status);
+ if (error) {
+ TRACE_ERROR("SdMmcEnableHS.Cmd6: %d\n\r", error);
+ return SDMMC_ERROR;
+ }
+ else if (status & STATUS_MMC_SWITCH) {
+ TRACE_ERROR("Mmc Switch HS: %x\n\r", status);
+ return SDMMC_ERROR_NOT_SUPPORT;
+ }
+ }
+ else {
+ TRACE_INFO("MMC without HS support\n\r");
+ return SDMMC_ERROR_NOT_SUPPORT;
+ }
+ TRACE_WARNING("MMC HS Enabled\n\r");
+ }
+ /* SD (+IO) */
+ else {
+ if (io) {
+ /* Check CIA.HS */
+ status = 0;
+ error = Cmd52(pSd, 0, SDIO_CIA, 0, SDIO_HS_REG, &status);
+ if (error) {
+ TRACE_ERROR("SdMmcEnableHS.Cmd52: %d\n\r", error);
+ return SDMMC_ERROR;
+ }
+ if ((status & SDIO_SHS) == 0) {
+ TRACE_INFO("HS Mode not supported by SDIO\n\r");
+ return SDMMC_ERROR_NOT_SUPPORT;
+ }
+ /* Enable HS mode */
+ else {
+ status = SDIO_EHS;
+ error = Cmd52(pSd, 1, SDIO_CIA, 1, SDIO_HS_REG, &status);
+ if (error) {
+ TRACE_ERROR("SdMmcEnableHS.Cmd52 H: %d\n\r", error);
+ return SDMMC_ERROR;
+ }
+ if (status & SDIO_EHS) {
+ TRACE_WARNING("SDIO HS Enabled\n\r");
+ }
+ }
+ }
+ if (sd) {
+ /* Check version */
+ if (SD_IsHsModeSupported(pSd)) {
+ /* Try enable HS mode */
+ SdCmd6Arg cmd6Arg = {
+ 1, 0, 0xF, 0xF, 0xF, 0xF, 0, 1
+ };
+ uint32_t switchStatus[512/32];
+ error = SdCmd6(pSd, &cmd6Arg, switchStatus, &status);
+ if (error || (status & STATUS_SWITCH_ERROR)) {
+ TRACE_INFO("SD HS Fail\n\r");
+ return SDMMC_ERROR;
+ }
+ else if (SD_SWITCH_ST_FUN_GRP1_RC(switchStatus)
+ == SD_SWITCH_ST_FUN_GRP_RC_ERROR) {
+ TRACE_INFO("SD HS Not Supported\n\r");
+ return SDMMC_ERROR_NOT_SUPPORT;
+ }
+ else if (SD_SWITCH_ST_FUN_GRP1_BUSY(switchStatus)) {
+ TRACE_INFO("SD HS Locked\n\r");
+ return SDMMC_ERROR_BUSY;
+ }
+ else {
+ TRACE_WARNING("SD HS Enabled\n\r");
+ }
+ }
+ else {
+ TRACE_INFO("HS Not Supported in SD Rev 0x%x\n\r",
+ SD_SCR_SD_SPEC(pSd));
+ return SDMMC_ERROR_NOT_SUPPORT;
+ }
+ }
+ }
+
+ /* Enable Host HS mode */
+ _HwSetHsMode(pSd, 1);
+ return 0;
+}
+
+/**
+ * \brief Check bus width capability and enable it
+ */
+static uint8_t SdMmcDesideBuswidth(sSdCard *pSd)
+{
+ uint8_t error, busWidth;
+ uint32_t status;
+ uint8_t mmc;
+
+ /* Best width that the card support */
+ busWidth = _HwGetBusWidth(pSd);
+ mmc = ((pSd->bCardType & CARD_TYPE_bmSDMMC) == CARD_TYPE_bmMMC);
+
+ if (mmc) {
+ /* Check MMC revision 4 or later (1/4/8 bit mode) */
+ if (MMC_CSD_SPEC_VERS(pSd->CSD) >= 4) {
+ /* Select what's HC supported */
+ MmcCmd6Arg cmd6Arg = {
+ 0x1, MMC_EXT_BUS_WIDTH_I, MMC_EXT_BUS_WIDTH_1BIT, 0
+ };
+ switch(busWidth) {
+ case 4:
+ cmd6Arg.value = MMC_EXT_BUS_WIDTH_4BITS;
+ break;
+ case 8:
+ cmd6Arg.value = MMC_EXT_BUS_WIDTH_8BUTS;
+ break;
+ case 1:
+ break;
+ }
+ error = MmcCmd6(pSd, &cmd6Arg, &status);
+ if (error) {
+ TRACE_ERROR("SdMmcSetBuswidth.Cmd6: %d\n\r", error);
+ return SDMMC_ERROR;
+ }
+ else {
+ if (status & STATUS_MMC_SWITCH) {
+ TRACE_ERROR("MMC Bus Switch error %x\n\r", status);
+ return SDMMC_ERROR_NOT_SUPPORT;
+ }
+ TRACE_WARNING("MMC Bus mode %x\n\r", busWidth);
+ }
+ }
+ else {
+ TRACE_WARNING("MMC 1-bit only\n\r");
+ return SDMMC_ERROR_NOT_SUPPORT;
+ }
+ }
+ else {
+ /* SD(IO): switch to 4-bit mode ? */
+ uint8_t io = ((pSd->bCardType & CARD_TYPE_bmSDIO) > 0);
+ uint8_t sd = ((pSd->bCardType & CARD_TYPE_bmSDMMC) == CARD_TYPE_bmSD);
+ if (busWidth == 1)
+ return SDMMC_ERROR_NOT_SUPPORT;
+ /* No 8-bit mode, default to 4-bit mode */
+ busWidth = 4;
+
+ /* SDIO */
+ if (io) {
+ /* SDIO 1 bit only */
+ busWidth = 1;
+ }
+
+ /* SD */
+ if (sd) {
+ error = Acmd6(pSd, busWidth);
+ if (error) {
+ TRACE_ERROR("SdMmcSetBusWidth.Acmd6: %d\n\r", error);
+ return SDMMC_ERROR;
+ }
+ TRACE_WARNING("SD 4-bit mode\n\r");
+ }
+ }
+
+ /* Switch to selected bus mode */
+ pSd->bBusMode = busWidth;
+ _HwSetBusWidth(pSd, busWidth);
+ return 0;
+}
+
+/**
+ * \brief Run the SD/MMC/SDIO Mode initialization sequence.
+ * This function runs the initialization procedure and the identification
+ * process. Then it leaves the card in ready state. The following procedure must
+ * check the card type and continue to put the card into tran(for memory card)
+ * or cmd(for io card) state for data exchange.
+ * \param pSd Pointer to a SD card driver instance.
+ * \return 0 if successful; otherwise returns an \ref sdmmc_rc "SD_ERROR code".
+ */
+static uint8_t SdMmcIdentify(sSdCard *pSd)
+{
+ uint8_t mem = 0, io = 0, f8 = 0, mp = 1, ccs = 0;
+ uint32_t status;
+ uint8_t error;
+ /* Reset HC to default HS and BusMode */
+ _HwSetHsMode(pSd, 0);
+ _HwSetBusWidth(pSd, 1);
+ /* Reset SDIO: CMD52, write 1 to RES bit in CCCR (bit 3 of register 6) */
+ status = SDIO_RES;
+ error = Cmd52(pSd, 1, SDIO_CIA, 0, SDIO_IOA_REG, &status);
+ if (!error && ((status & STATUS_SDIO_R5)==0)){}
+ else if (error == SDMMC_ERROR_NORESPONSE){}
+ else {
+ TRACE_DEBUG("SdMmcIdentify.Cmd52 fail: %u, %x\n\r", error, status);
+ }
+ /* Reset MEM: CMD0 */
+ error = SwReset(pSd, 1);
+ if (error) {
+ TRACE_DEBUG("SdMmcIdentify.SwReset fail: %u\n\r", error);
+ }
+
+ /* CMD8 is newly added in the Physical Layer Specification Version 2.00 to
+ * support multiple voltage ranges and used to check whether the card
+ * supports supplied voltage. The version 2.00 host shall issue CMD8 and
+ * verify voltage before card initialization.
+ * The host that does not support CMD8 shall supply high voltage range... */
+ error = SdCmd8(pSd, 1);
+ if (error == 0) f8 = 1;
+ else if (error != SDMMC_ERROR_NORESPONSE) {
+ TRACE_ERROR("SdMmcIdentify.Cmd8: %d\n\r", error);
+ return SDMMC_ERROR;
+ }
+ /* Delay after "no response" */
+ else Delay(8000);
+
+ /* CMD5 is newly added for SDIO initialize & power on */
+ status = 0;
+ error = Cmd5(pSd, &status);
+ if (error) {
+ TRACE_INFO("SdMmcIdentify.Cmd5: %d\n\r", error)
+ }
+ /* Card has SDIO function */
+ else if ((status & SDIO_OCR_NF) > 0) {
+ unsigned int cmd5Retries = 10000;
+ do {
+ status &= SD_HOST_VOLTAGE_RANGE;
+ error = Cmd5(pSd, &status);
+ if (status & SD_OCR_BUSY) break;
+ } while(!error && cmd5Retries --);
+ if (error) {
+ TRACE_ERROR("SdMmcIdentify.Cmd5 V: %d\n\r", error);
+ return SDMMC_ERROR;
+ }
+ io = 1;
+ TRACE_INFO("SDIO\n\r");
+ /* IO only ?*/
+ mp = ((status & SDIO_OCR_MP) > 0);
+ }
+ /* Has memory: SD/MMC/COMBO */
+ if (mp) {
+ /* Try SD memory initialize */
+ error = Acmd41(pSd, f8, &ccs);
+ if (error) {
+ unsigned int cmd1Retries = 10000;
+ TRACE_DEBUG("SdMmcIdentify.Acmd41: %u, try MMC\n\r", error);
+ /* Try MMC initialize */
+ error = SwReset(pSd, 10);
+ if (error) {
+ TRACE_ERROR("SdMmcIdentify.Mmc.SwReset: %d\n\r", error);
+ return SDMMC_ERROR;
+ }
+ ccs = 1;
+ do { error = Cmd1(pSd, &ccs); }while(error && cmd1Retries -- > 0);
+ if (error) {
+ TRACE_ERROR("SdMmcIdentify.Cmd1: %d\n\r", error);
+ return SDMMC_ERROR;
+ }
+ else if (ccs) pSd->bCardType = CARD_MMCHD;
+ else pSd->bCardType = CARD_MMC;
+ /* MMC card identification OK */
+ TRACE_INFO("MMC Card\n\r");
+ return 0;
+ }
+ else if (ccs) { TRACE_INFO("SDHC MEM\n\r");}
+ else { TRACE_INFO("SD MEM\n\r");}
+ mem = 1;
+ }
+ /* SD(IO) + MEM ? */
+ if (!mem) {
+ if (io) pSd->bCardType = CARD_SDIO;
+ else {
+ TRACE_ERROR("Unknown card\n\r");
+ return SDMMC_ERROR;
+ }
+ }
+ /* SD(HC) combo */
+ else if (io)
+ pSd->bCardType = ccs ? CARD_SDHCCOMBO : CARD_SDCOMBO;
+ /* SD(HC) */
+ else
+ pSd->bCardType = ccs ? CARD_SDHC : CARD_SD;
+
+ return 0;
+}
+
+/**
+ * \brief Run the SD/MMC/SDIO enumeration sequence.
+ * This function runs after the initialization and identification procedure. It
+ * gets all necessary information from the card and deside transfer block size,
+ * clock speed and bus width. It sets the SD/MMC/SDIO card in transfer
+ * (or command) state.
+ * \param pSd Pointer to a SD card driver instance.
+ * \return 0 if successful; otherwise returns an \ref sdmmc_rc "SD_ERROR code".
+ */
+static uint8_t SdMmcEnum(sSdCard *pSd)
+{
+ uint8_t mem , io;
+ uint8_t error;
+ uint32_t ioSpeed = 0, memSpeed = 0;
+ uint8_t hsExec = 0, bwExec = 0;
+
+ /* - has Memory/IO/High-Capacigy - */
+ mem = ((pSd->bCardType & CARD_TYPE_bmSDMMC) > 0);
+ io = ((pSd->bCardType & CARD_TYPE_bmSDIO) > 0);
+
+ /* For MEMORY cards:
+ * The host then issues the command ALL_SEND_CID (CMD2) to the card to get
+ * its unique card identification (CID) number.
+ * Card that is unidentified (i.e. which is in Ready State) sends its CID
+ * number as the response (on the CMD line). */
+ if (mem) {
+ error = Cmd2(pSd);
+ if (error) {
+ TRACE_ERROR("SdMmcInit.cmd2(%d)\n\r", error);
+ return error;
+ }
+ }
+
+ /* For MEMORY and SDIO cards:
+ * Thereafter, the host issues CMD3 (SEND_RELATIVE_ADDR) asks the
+ * card to publish a new relative card address (RCA), which is shorter than
+ * CID and which is used to address the card in the future data transfer
+ * mode. Once the RCA is received the card state changes to the Stand-by
+ * State. At this point, if the host wants to assign another RCA number, it
+ * can ask the card to publish a new number by sending another CMD3 command
+ * to the card. The last published RCA is the actual RCA number of the
+ * card. */
+ error = Cmd3(pSd);
+ if (error) {
+ TRACE_ERROR("SdMmcInit.cmd3(%d)\n\r", error);
+ return error;
+ }
+
+ /* For MEMORY cards:
+ * SEND_CSD (CMD9) to obtain the Card Specific Data (CSD register),
+ * e.g. block length, card storage capacity, etc... */
+ if (mem) {
+ error = Cmd9(pSd);
+ if (error) {
+ TRACE_ERROR("SdMmcInit.cmd9(%d)\n\r", error);
+ return error;
+ }
+ }
+
+ /* Now select the card, to TRAN state */
+ error = MmcSelectCard(pSd, CARD_ADDR(pSd), 0);
+ if (error) {
+ TRACE_ERROR("SdMmcInit.SelCard(%d)\n\r", error);
+ return error;
+ }
+
+ /* - Now in TRAN, obtain extended setup information - */
+
+ /* If the card support EXT_CSD, read it! */
+ TRACE_INFO("Card Type %d, CSD_STRUCTURE %u\n\r",
+ pSd->bCardType, SD_CSD_STRUCTURE(pSd));
+
+ /* Get extended information of the card */
+ SdMmcUpdateInformation(pSd, 0, 1);
+
+ /* Calculate transfer speed */
+ if (io) ioSpeed = SdioGetMaxSpeed(pSd);
+ if (mem) memSpeed = SdmmcGetMaxSpeed(pSd);
+ /* Combo, min speed */
+ if (io && mem) {
+ pSd->dwTranSpeed = (ioSpeed > memSpeed) ? memSpeed : ioSpeed;
+ }
+ /* SDIO only */
+ else if (io) {
+ pSd->dwTranSpeed = ioSpeed;
+ }
+ /* Memory card only */
+ else if (mem) {
+ pSd->dwTranSpeed = memSpeed;
+ }
+ pSd->dwTranSpeed *= 1000;
+
+ /* Enable more bus width Mode */
+ error = SdMmcDesideBuswidth(pSd);
+ if (!error) bwExec = 1;
+ else if (error != SDMMC_ERROR_NOT_SUPPORT) {
+ TRACE_ERROR("SdmmcEnum.DesideBusWidth: %d\n\r", error);
+ return SDMMC_ERROR;
+ }
+
+ /* Enable High-Speed Mode */
+ error = SdMmcEnableHighSpeed(pSd);
+ if (!error) hsExec = 1;
+ else if (error != SDMMC_ERROR_NOT_SUPPORT) {
+ TRACE_ERROR("SdmmcEnum.EnableHS: %d\n\r", error);
+ return SDMMC_ERROR;
+ }
+
+ /* In HS mode transfer speed *2 */
+ if (hsExec) pSd->dwTranSpeed *= 2;
+
+ /* Update card information since status changed */
+ if (bwExec || hsExec) SdMmcUpdateInformation(pSd, hsExec, 1);
+
+ return 0;
+}
+
+/*----------------------------------------------------------------------------
+ * Global functions
+ *----------------------------------------------------------------------------*/
+
+/**
+ */
+
+/**
+ * Read Blocks of data in a buffer pointed by pData. The buffer size must be at
+ * least 512 byte long. This function checks the SD card status register and
+ * address the card if required before sending the read command.
+ * \return 0 if successful; otherwise returns an \ref sdmmc_rc "error code".
+ * \param pSd Pointer to a SD card driver instance.
+ * \param address Address of the block to read.
+ * \param pData Data buffer whose size is at least the block size, it can
+ * be 1,2 or 4-bytes aligned when used with DMA.
+ * \param length Number of blocks to be read.
+ * \param pCallback Pointer to callback function that invoked when read done.
+ * 0 to start a blocked read.
+ * \param pArgs Pointer to callback function arguments.
+ */
+uint8_t SD_Read(sSdCard *pSd,
+ uint32_t address,
+ void *pData,
+ uint32_t length,
+ fSdmmcCallback pCallback,
+ void *pArgs)
+{
+ uint8_t error;
+
+ assert( pSd != NULL ) ;
+ assert( pData != NULL ) ;
+
+ if ( pSd->bState != SDMMC_STATE_DATA_RD
+ || pSd->dwPrevBlk + 1 != address ) {
+ /* Start infinite block reading */
+ error = MoveToTransferState(pSd, address, 0, 0, 1);
+ }
+ else error = 0;
+ if (!error) {
+ pSd->bState = SDMMC_STATE_DATA_RD;
+ pSd->dwPrevBlk = address + (length - 1);
+ error = SdmmcRead(pSd, BLOCK_SIZE(pSd), length, pData,
+ pCallback, pArgs);
+ }
+ TRACE_DEBUG("SDrd(%u,%u):%u\n\r", address, length, error);
+
+ return 0;
+}
+
+/**
+ * Write Blocks of data in a buffer pointed by pData. The buffer size must be at
+ * least 512 byte long. This function checks the SD card status register and
+ * address the card if required before sending the read command.
+ * \return 0 if successful; otherwise returns an \ref sdmmc_rc "error code".
+ * \param pSd Pointer to a SD card driver instance.
+ * \param address Address of the block to read.
+ * \param pData Data buffer whose size is at least the block size, it can
+ * be 1,2 or 4-bytes aligned when used with DMA.
+ * \param length Number of blocks to be read.
+ * \param pCallback Pointer to callback function that invoked when read done.
+ * 0 to start a blocked read.
+ * \param pArgs Pointer to callback function arguments.
+ */
+uint8_t SD_Write(sSdCard *pSd,
+ uint32_t address,
+ const void *pData,
+ uint32_t length,
+ fSdmmcCallback pCallback,
+ void *pArgs)
+{
+ uint8_t error = 0;
+
+ assert( pSd != NULL ) ;
+ #if 0
+ if ( pSd->bState != SDMMC_STATE_DATA_WR
+ || pSd->dwPrevBlk + 1 != address ) {
+ /* Start block writing */
+ error = MoveToTransferState(pSd, address, length, (uint8_t*)pData, 0);
+ }
+ else {
+ error = SdmmcWrite(pSd, BLOCK_SIZE(pSd), length, pData,
+ pCallback, pArgs);
+ }
+ if (!error) {
+ pSd->bState = SDMMC_STATE_DATA_WR;
+ pSd->dwPrevBlk = address + (length - 1);
+ }
+ #else
+ if ( pSd->bState != SDMMC_STATE_DATA_WR
+ || pSd->dwPrevBlk + 1 != address ) {
+ /* Start infinite block writing */
+ error = MoveToTransferState(pSd, address, 0, 0, 0);
+ }
+ if (!error) {
+ pSd->bState = SDMMC_STATE_DATA_WR;
+ error = SdmmcWrite(pSd, BLOCK_SIZE(pSd), length, pData,
+ pCallback, pArgs);
+ pSd->dwPrevBlk = address + (length - 1);
+ }
+ #endif
+ TRACE_DEBUG("SDwr(%u,%u):%u\n\r", address, length, error);
+
+ return 0;
+}
+
+/**
+ * Read Blocks of data in a buffer pointed by pData. The buffer size must be at
+ * least 512 byte long. This function checks the SD card status register and
+ * address the card if required before sending the read command.
+ * \return 0 if successful; otherwise returns an \ref sdmmc_rc "error code".
+ * \param pSd Pointer to a SD card driver instance.
+ * \param address Address of the block to read.
+ * \param nbBlocks Number of blocks to be read.
+ * \param pData Data buffer whose size is at least the block size, it can
+ * be 1,2 or 4-bytes aligned when used with DMA.
+ */
+uint8_t SD_ReadBlocks(sSdCard *pSd,
+ uint32_t address,
+ void *pData,
+ uint32_t nbBlocks)
+{
+ uint8_t error = 0;
+ uint8_t *pBytes = (uint8_t*)pData;
+
+ assert( pSd != NULL ) ;
+ assert( pData != NULL ) ;
+ assert( nbBlocks != 0 ) ;
+
+ TRACE_DEBUG("RdBlks(%d,%d)\n\r", address, nbBlocks);
+ while(nbBlocks --) {
+ error = PerformSingleTransfer(pSd, address, pBytes, 1);
+ if (error)
+ break;
+ address += 1;
+ pBytes = &pBytes[512];
+ }
+ return error;
+}
+
+/**
+ * Write Block of data pointed by pData. The buffer size must be at
+ * least 512 byte long. This function checks the SD card status register and
+ * address the card if required before sending the read command.
+ * \return 0 if successful; otherwise returns an \ref sdmmc_rc "error code".
+ * \param pSd Pointer to a SD card driver instance.
+ * \param address Address of block to write.
+ * \param nbBlocks Number of blocks to be read
+ * \param pData Data buffer whose size is at least the block size, it can
+ * be 1,2 or 4-bytes aligned when used with DMA.
+ */
+uint8_t SD_WriteBlocks(sSdCard *pSd,
+ uint32_t address,
+ const void *pData,
+ uint32_t nbBlocks)
+{
+ uint8_t error = 0;
+ uint8_t *pB = (uint8_t*)pData;
+
+ assert( pSd != NULL ) ;
+ assert( pData != NULL ) ;
+ assert( nbBlocks != 0 ) ;
+
+ TRACE_DEBUG("WrBlks(%d,%d)\n\r", address, nbBlocks);
+
+ while(nbBlocks --) {
+ error = PerformSingleTransfer(pSd, address, pB, 0);
+ if (error)
+ break;
+ address += 1;
+ pB = &pB[512];
+ }
+ return error;
+}
+
+/**
+ * Reset SD/MMC driver runtime parameters.
+ */
+static void _SdParamReset(sSdCard *pSd)
+{
+ uint32_t i;
+
+ pSd->dwTranSpeed = 0;
+ pSd->dwTotalSize = 0;
+ pSd->dwNbBlocks = 0;
+ pSd->wBlockSize = 0;
+
+ pSd->wCurrBlockLen = 0;
+ pSd->dwCurrSpeed = 0;
+ pSd->dwPrevBlk = 0xFFFFFFFF;
+ pSd->wAddress = 0;
+
+ pSd->bCardType = 0;
+ pSd->bStatus = 0;
+ pSd->bState = SDMMC_STATE_IDENT;
+
+
+ /* Clear CID, CSD, EXT_CSD data */
+ for (i = 0; i < 128/8/4; i ++) pSd->CID[i] = 0;
+ for (i = 0; i < 128/8/4; i ++) pSd->CSD[i] = 0;
+ for (i = 0; i < 512/4; i ++) pSd->EXT[i] = 0;
+
+}
+
+/**
+ * Initialize SD/MMC driver struct.
+ * \param pSd Pointer to a SD card driver instance.
+ * \param pDrv Pointer to low level driver instance.
+ * \param bSlot Slot number.
+ * \param pHalf Pointer to hardware access functions.
+ */
+void SDD_Initialize(sSdCard * pSd,
+ const void * pDrv, uint8_t bSlot,
+ const sSdHalFunctions * pHalf)
+{
+ pSd->pDrv = (void *)pDrv;
+ pSd->pHalf = (sSdHalFunctions *)pHalf;
+ pSd->pExt = NULL;
+ pSd->bSlot = bSlot;
+
+ _SdParamReset(pSd);
+}
+
+/**
+ * Run the SDcard initialization sequence. This function runs the
+ * initialisation procedure and the identification process, then it sets the
+ * SD card in transfer state to set the block length and the bus width.
+ * \return 0 if successful; otherwise returns an \ref sdmmc_rc "error code".
+ * \param pSd Pointer to a SD card driver instance.
+ */
+uint8_t SD_Init(sSdCard *pSd)
+{
+ uint8_t error;
+ uint32_t dwClock;
+
+ _SdParamReset(pSd);
+
+ /* Set low speed for device identification (LS device max speed) */
+ dwClock = 400000;
+ _HwSetClock(pSd, &dwClock);
+
+ /* Initialization delay: The maximum of 1 msec, 74 clock cycles and supply
+ * ramp up time. Supply ramp up time provides the time that the power is
+ * built up to the operating level (the bus master supply voltage) and the
+ * time to wait until the SD card can accept the first command. */
+ /* Power On Init Special Command */
+ error = Pon(pSd);
+ if (error) {
+ TRACE_ERROR("SD_Init.PowON:%d\n\r", error);
+ return error;
+ }
+
+ /* After power-on or CMD0, all cards?
+ * CMD lines are in input mode, waiting for start bit of the next command.
+ * The cards are initialized with a default relative card address
+ * (RCA=0x0000) and with a default driver stage register setting
+ * (lowest speed, highest driving current capability). */
+ error = SdMmcIdentify(pSd);
+ if (error) {
+ TRACE_ERROR("SD_Init.Identify: %d\n\r", error);
+ return error;
+ }
+ error = SdMmcEnum(pSd);
+ if (error) {
+ TRACE_ERROR("SD_Init.Enum: %d\n\r", error);
+ return error;
+ }
+
+ /* In the case of a Standard Capacity SD Memory Card, this command sets the
+ * block length (in bytes) for all following block commands
+ * (read, write, lock).
+ * Default block length is fixed to 512 Bytes.
+ * Set length is valid for memory access commands only if partial block read
+ * operation are allowed in CSD.
+ * In the case of a High Capacity SD Memory Card, block length set by CMD16
+ * command does not affect the memory read and write commands. Always 512
+ * Bytes fixed block length is used. This command is effective for
+ * LOCK_UNLOCK command.
+ * In both cases, if block length is set larger than 512Bytes, the card sets
+ * the BLOCK_LEN_ERROR bit. */
+ if (pSd->bCardType == CARD_SD) {
+ error = Cmd16(pSd, SDMMC_BLOCK_SIZE);
+ }
+ pSd->wCurrBlockLen = SDMMC_BLOCK_SIZE;
+
+ /* Reset status for R/W */
+ pSd->bState = SDMMC_STATE_TRAN;
+
+ /* If MMC Card & get size from EXT_CSD */
+ if ((pSd->bCardType & CARD_TYPE_bmSDMMC) == CARD_TYPE_bmMMC
+ && SD_CSD_C_SIZE(pSd->CSD) == 0xFFF) {
+ pSd->dwNbBlocks = MMC_EXT_SEC_COUNT(pSd->EXT);
+ /* Block number less than 0x100000000/512 */
+ if (pSd->dwNbBlocks > 0x800000)
+ pSd->dwTotalSize = 0xFFFFFFFF;
+ else
+ pSd->dwTotalSize = MMC_EXT_SEC_COUNT(pSd->EXT)*512;
+ }
+ /* If SD CSD v2.0 */
+ else if((pSd->bCardType & CARD_TYPE_bmSDMMC) == CARD_TYPE_bmSD
+ && SD_CSD_STRUCTURE(pSd->CSD) >= 1) {
+ pSd->wBlockSize = 512;
+ pSd->dwNbBlocks = SD_CSD_BLOCKNR_HC(pSd->CSD);
+ pSd->dwTotalSize = 0xFFFFFFFF;
+ }
+ /* Normal SD/MMC card */
+ else if (pSd->bCardType & CARD_TYPE_bmSDMMC) {
+ pSd->wBlockSize = SD_CSD_BLOCK_LEN(pSd->CSD);
+ pSd->dwTotalSize = SD_CSD_TOTAL_SIZE(pSd->CSD);
+ pSd->dwNbBlocks = SD_CSD_BLOCKNR(pSd->CSD);
+ }
+
+ if (pSd->bCardType == CARD_UNKNOWN) {
+ return SDMMC_ERROR_NOT_INITIALIZED;
+ }
+ /* Automatically select the max clock */
+ dwClock = pSd->dwTranSpeed;
+ _HwSetClock(pSd, &dwClock);
+ TRACE_WARNING_WP("-I- Set SD/MMC clock to %uK\n\r", dwClock/1000);
+ pSd->dwCurrSpeed = dwClock;
+ return 0;
+}
+
+/**
+ * De-initialize the driver. Invoked when SD card disconnected.
+ * \param pSd Pointer to a SD card driver instance.
+ */
+void SD_DeInit(sSdCard *pSd)
+{
+ if (pSd->pDrv)
+ {
+ _HwReset(pSd);
+ _SdParamReset(pSd);
+ }
+}
+
+/**
+ * Return type of the card.
+ * \param pSd Pointer to \ref sSdCard instance.
+ * \sa sdmmc_cardtype
+ */
+uint8_t SD_GetCardType(sSdCard *pSd)
+{
+ assert( pSd != NULL ) ;
+
+ return pSd->bCardType;
+}
+
+/**
+ * Return size of the SD/MMC card, in KB.
+ * \param pSd Pointer to \ref sSdCard instance.
+ */
+uint32_t SD_GetTotalSizeKB(sSdCard *pSd)
+{
+ assert( pSd != NULL ) ;
+
+ if (pSd->dwTotalSize == 0xFFFFFFFF) {
+
+ return pSd->dwNbBlocks / 2;
+ }
+
+ return pSd->dwTotalSize / 1024;
+}
+
+/**
+ * Return reported block size of the SD/MMC card.
+ * (SD/MMC access block size is always 512B for R/W).
+ * \param pSd Pointer to \ref sSdCard instance.
+ */
+uint32_t SD_GetBlockSize( sSdCard *pSd )
+{
+ assert( pSd != NULL ) ;
+
+ return pSd->wBlockSize;
+}
+
+/**
+ * Return reported number of blocks for the SD/MMC card.
+ * \param pSd Pointer to \ref sSdCard instance.
+ */
+uint32_t SD_GetNumberBlocks( sSdCard *pSd )
+{
+ assert( pSd != NULL ) ;
+
+ return pSd->dwNbBlocks ;
+}
+
+/**
+ * Read one or more bytes from SDIO card, using RW_DIRECT command.
+ * \param pSd Pointer to SdCard instance.
+ * \param functionNum Function number.
+ * \param address First register address to read from.
+ * \param pData Pointer to data buffer.
+ * \param size Buffer size, number of bytes to read.
+ * \return 0 if successful; otherwise returns an \ref sdmmc_rc "error code".
+ */
+uint8_t SDIO_ReadDirect(sSdCard *pSd,
+ uint8_t functionNum,
+ uint32_t address,
+ uint8_t *pData,
+ uint32_t size)
+{
+ uint8_t error;
+ uint32_t status;
+
+ assert( pSd != NULL ) ;
+
+ if (pSd->bCardType & CARD_TYPE_bmSDIO) {
+ if (size == 0) return SDMMC_ERROR_PARAM;
+ while(size --) {
+ status = 0;
+ error = Cmd52(pSd, 0, functionNum, 0, address ++, &status);
+ if (pData) *pData ++ = (uint8_t)status;
+ if (error) {
+ TRACE_ERROR("IO_RdDirect.Cmd52: %d\n\r", error);
+ return SDMMC_ERROR;
+ }
+ else if (status & STATUS_SDIO_R5) {
+ TRACE_ERROR("RD_DIRECT(%u, %u) st %x\n\r",
+ address, size, status);
+ return SDMMC_ERROR;
+ }
+ }
+ }
+ else {
+ return SDMMC_ERROR_NOT_SUPPORT;
+ }
+ return 0;
+}
+
+/**
+ * Write one byte to SDIO card, using RW_DIRECT command.
+ * \param pSd Pointer to SdCard instance.
+ * \param functionNum Function number.
+ * \param address Register address to write to.
+ * \param dataByte Data to write.
+ * \return 0 if successful; otherwise returns an \ref sdmmc_rc "error code".
+ */
+uint8_t SDIO_WriteDirect(sSdCard *pSd,
+ uint8_t functionNum,
+ uint32_t address,
+ uint8_t dataByte)
+{
+ uint8_t error;
+ uint32_t status;
+
+ assert( pSd != NULL ) ;
+
+ if (pSd->bCardType & CARD_TYPE_bmSDIO) {
+ status = dataByte;
+ error = Cmd52(pSd, 1, functionNum, 0, address, &status);
+ if (error) {
+ TRACE_ERROR("SDIO_WrDirect.Cmd52: %d\n\r", error);
+ return SDMMC_ERROR;
+ }
+ else if (status & STATUS_SDIO_R5) {
+ TRACE_ERROR("WR_DIRECT(%u) st %x\n\r",
+ address, status);
+ return SDMMC_ERROR;
+ }
+ }
+ else {
+ return SDMMC_ERROR_NOT_SUPPORT;
+ }
+ return 0;
+}
+
+/**
+ * Read byte by byte from SDIO card, using RW_EXTENDED command.
+ * \param pSd Pointer to SdCard instance.
+ * \param functionNum Function number.
+ * \param address First byte address of data in SDIO card.
+ * \param isFixedAddress During transfer the data address is never increased.
+ * \param pData Pointer to data buffer.
+ * \param size Size of data to read (1 ~ 512).
+ * \param fCallback Callback function invoked when transfer finished.
+ * \param pArg Pointer to callback argument.
+ * \return 0 if successful; otherwise returns an \ref sdmmc_rc "error code".
+ */
+uint8_t SDIO_ReadBytes(sSdCard *pSd,
+ uint8_t functionNum,
+ uint32_t address,
+ uint8_t isFixedAddress,
+ uint8_t *pData,
+ uint16_t size,
+ fSdmmcCallback fCallback,
+ void* pArg)
+{
+ uint8_t error;
+ uint32_t status;
+ uint8_t ucBlockMode = 0;
+
+ assert( pSd != NULL ) ;
+
+ if (pSd->bCardType & CARD_TYPE_bmSDIO) {
+ if (size == 0) return SDMMC_ERROR_PARAM;
+ error = Cmd53(pSd,
+ 0, functionNum, ucBlockMode, !isFixedAddress,
+ address, pData, size,
+ &status,
+ fCallback, pArg);
+ if (error) {
+ TRACE_ERROR("IO_RdBytes.Cmd53: %d\n\r", error);
+ return SDMMC_ERROR;
+ }
+ else if (status & STATUS_SDIO_R5) {
+ TRACE_ERROR("RD_EXT st %x\n\r", status);
+ return SDMMC_ERROR;
+ }
+ }
+ else {
+ return SDMMC_ERROR_NOT_SUPPORT;
+ }
+ return 0;
+}
+
+/**
+ * Write byte by byte to SDIO card, using RW_EXTENDED command.
+ * \param pSd Pointer to SdCard instance.
+ * \param functionNum Function number.
+ * \param address First byte address of data in SDIO card.
+ * \param isFixedAddress During transfer the data address is never increased.
+ * \param pData Pointer to data buffer.
+ * \param size Size of data to write (1 ~ 512).
+ * \param fCallback Callback function invoked when transfer finished.
+ * \param pArg Pointer to callback argument.
+ * \return 0 if successful; otherwise returns an \ref sdmmc_rc "error code".
+ */
+uint8_t SDIO_WriteBytes(sSdCard *pSd,
+ uint8_t functionNum,
+ uint32_t address,
+ uint8_t isFixedAddress,
+ uint8_t *pData,
+ uint16_t size,
+ fSdmmcCallback fCallback,
+ void* pArg)
+{
+ uint8_t error;
+ uint32_t status;
+
+ assert( pSd != NULL ) ;
+
+ if (pSd->bCardType & CARD_TYPE_bmSDIO) {
+ if (size == 0) return SDMMC_ERROR_PARAM;
+ error = Cmd53(pSd,
+ 1, functionNum, 0, !isFixedAddress,
+ address, pData, size,
+ (uint32_t*)&status,
+ fCallback, pArg);
+ Delay(100);
+ if (error) {
+ TRACE_ERROR("IO_WrBytes.Cmd53: %d\n\r", error);
+ return SDMMC_ERROR;
+ }
+ else if (status & STATUS_SDIO_R5) {
+ TRACE_ERROR("WR_EXT st %x\n\r", status);
+ return SDMMC_ERROR;
+ }
+ }
+ else {
+ return SDMMC_ERROR_NOT_SUPPORT;
+ }
+ return 0;
+}
+
+
+
+/**
+ * Display SDIO card informations (CIS, tuple ...)
+ * \param pSd Pointer to \ref sSdCard instance.
+ */
+void SDIO_DumpCardInformation(sSdCard * pSd)
+{
+ uint32_t tmp = 0, addrCIS = 0, addrManfID = 0, addrFunc0 = 0;
+ uint8_t *p = (uint8_t*)&tmp;
+ uint8_t buf[8];
+
+ switch(pSd->bCardType)
+ {
+ case CARD_SDIO:
+ TRACE_INFO("** SDIO ONLY card\n\r");
+ break;
+ case CARD_SDCOMBO: case CARD_SDHCCOMBO:
+ TRACE_INFO("** SDIO Combo card\n\r");
+ break;
+ default:
+ TRACE_INFO("** NO SDIO\n\r");
+ return;
+ }
+ /* CCCR */
+ TRACE_INFO("====== CCCR ======\n\r");
+ SDIO_ReadDirect(pSd, SDIO_CIA, SDIO_CCCR_REG, p, 1);
+ TRACE_INFO(".SDIO %02lX\n\r", (tmp & SDIO_SDIO) >> 4);
+ TRACE_INFO(".CCCR %02lX\n\r", (tmp & SDIO_CCCR) >> 0);
+ SDIO_ReadDirect(pSd, SDIO_CIA, SDIO_SD_REV_REG, p, 1);
+ TRACE_INFO(".SD %02lX\n\r", (tmp & SDIO_SD) >> 0);
+ SDIO_ReadDirect(pSd, SDIO_CIA, SDIO_IOE_REG, p, 1);
+ TRACE_INFO(".IOE %02lX\n\r", (tmp & SDIO_IOE) >> 0);
+ SDIO_ReadDirect(pSd, SDIO_CIA, SDIO_IOR_REG, p, 1);
+ TRACE_INFO(".IOR %02lX\n\r", (tmp & SDIO_IOR) >> 0);
+ SDIO_ReadDirect(pSd, SDIO_CIA, SDIO_IEN_REG, p, 1);
+ TRACE_INFO(".IEN %02lX\n\r", (tmp & SDIO_IEN) >> 0);
+ SDIO_ReadDirect(pSd, SDIO_CIA, SDIO_INT_REG, p, 1);
+ TRACE_INFO(".INT %u\n\r", (tmp & SDIO_INT));
+ SDIO_ReadDirect(pSd, SDIO_CIA, SDIO_BUS_CTRL_REG, p, 1);
+ TRACE_INFO(".CD %lx\n\r", (tmp & SDIO_CD) >> 7);
+ TRACE_INFO(".SCSI %lx\n\r", (tmp & SDIO_SCSI) >> 6);
+ TRACE_INFO(".ECSI %lx\n\r", (tmp & SDIO_ECSI) >> 5);
+ TRACE_INFO(".BUS_WIDTH %lx\n\r", (tmp & SDIO_BUSWIDTH) >> 0);
+ SDIO_ReadDirect(pSd, SDIO_CIA, SDIO_CAP_REG, p, 1);
+ TRACE_INFO(".4BLS %lx\n\r", (tmp & SDIO_4BLS) >> 7);
+ TRACE_INFO(".LSC %lx\n\r", (tmp & SDIO_LSC) >> 6);
+ TRACE_INFO(".E4MI %lx\n\r", (tmp & SDIO_E4MI) >> 5);
+ TRACE_INFO(".S4MI %lx\n\r", (tmp & SDIO_S4MI) >> 4);
+ TRACE_INFO(".SBS %lx\n\r", (tmp & SDIO_SBS) >> 3);
+ TRACE_INFO(".SRW %lx\n\r", (tmp & SDIO_SRW) >> 2);
+ TRACE_INFO(".SMB %lx\n\r", (tmp & SDIO_SMB) >> 1);
+ TRACE_INFO(".SDC %lx\n\r", (tmp & SDIO_SDC) >> 0);
+ SDIO_ReadDirect(pSd, SDIO_CIA, SDIO_CIS_PTR_REG, p, 3);
+ TRACE_INFO(".CIS_PTR %06X\n\r", tmp);
+ addrCIS = tmp; tmp = 0;
+ SDIO_ReadDirect(pSd, SDIO_CIA, SDIO_BUS_SUSP_REG, p, 1);
+ TRACE_INFO(".BR %lx\n\r", (tmp & SDIO_BR) >> 1);
+ TRACE_INFO(".BS %lx\n\r", (tmp & SDIO_BS) >> 0);
+ SDIO_ReadDirect(pSd, SDIO_CIA, SDIO_FUN_SEL_REG, p, 1);
+ TRACE_INFO(".DF %lx\n\r", (tmp & SDIO_DF) >> 7);
+ TRACE_INFO(".FS %lx\n\r", (tmp & SDIO_FS) >> 0);
+ SDIO_ReadDirect(pSd, SDIO_CIA, SDIO_EXEC_REG, p, 1);
+ TRACE_INFO(".EX %lx\n\r", (tmp & SDIO_EX));
+ TRACE_INFO(".EXM %lx\n\r", (tmp & SDIO_EXM) >> 0);
+ SDIO_ReadDirect(pSd, SDIO_CIA, SDIO_READY_REG, p, 1);
+ TRACE_INFO(".RF %lx\n\r", (tmp & SDIO_RF));
+ TRACE_INFO(".RFM %lx\n\r", (tmp & SDIO_RFM) >> 0);
+ SDIO_ReadDirect(pSd, SDIO_CIA, SDIO_FN0_BLKSIZ_REG, p, 2);
+ TRACE_INFO(".FN0_SIZE %u(%04X)\n\r", tmp, tmp);
+ tmp = 0;
+ SDIO_ReadDirect(pSd, SDIO_CIA, SDIO_POWER_REG, p, 1);
+ TRACE_INFO(".EMPC %lx\n\r", (tmp & SDIO_EMPC) >> 1);
+ TRACE_INFO(".SMPC %lx\n\r", (tmp & SDIO_SMPC) >> 0);
+ SDIO_ReadDirect(pSd, SDIO_CIA, SDIO_HS_REG, p, 1);
+ TRACE_INFO(".EHS %lx\n\r", (tmp & SDIO_EHS) >> 1);
+ TRACE_INFO(".SHS %lx\n\r", (tmp & SDIO_SHS) >> 0);
+ /* Metaformat */
+ SdioFindTuples(pSd, addrCIS, 128, &addrManfID, &addrFunc0);
+ if (addrManfID != 0) {
+ SDIO_ReadDirect(pSd, SDIO_CIA, addrManfID, buf, 6);
+ TRACE_INFO("==== CISTPL_MANFID ====\n\r");
+ TRACE_INFO("._MANF %04X\n\r", buf[2] + (buf[3] << 8));
+ TRACE_INFO("._CARD %04X\n\r", buf[4] + (buf[5] << 8));
+ }
+ if (addrFunc0 != 0) {
+ SDIO_ReadDirect(pSd, SDIO_CIA, addrFunc0, buf, 6);
+ TRACE_INFO("== CISTPL_FUNCE Fun0 ==\n\r");
+ TRACE_INFO("._FN0_BLK_SIZE %d(0x%04X)\n\r",
+ buf[3] + (buf[4] << 8), buf[3] + (buf[4] << 8));
+ TRACE_INFO("._MAX_TRAN_SPEED %02X\n\r", buf[5]);
+ }
+}
+
+/**
+ */
+static void _DumpREG(void* pREG, uint32_t dwSize)
+{
+ uint8_t *p = (uint8_t*)pREG;
+ uint32_t i;
+ for (i = 0; i < dwSize; i ++)
+ {
+ if ((i % 16) == 0) printf("\n\r [%04X]", i);
+ printf(" %02X", p[i]);
+ }
+ printf("\n\r");
+}
+
+/**
+ * Display the content of the CID register
+ * \param pCID Pointer to CID data.
+ */
+void SD_DumpCID(void* pCID)
+{
+ TRACE_INFO("======= CID =======");
+ _DumpREG(pCID, 128/8);
+ TRACE_INFO("===================\n\r");
+ TRACE_INFO(" .MID Manufacturer ID %02X\n\r",
+ SD_CID_MID(pCID));
+
+ TRACE_INFO(" .CBX Card/BGA (eMMC) %X\n\r",
+ eMMC_CID_CBX(pCID));
+
+ TRACE_INFO(" .OID OEM/Application ID (SD) %c%c\n\r",
+ (char)SD_CID_OID1(pCID),
+ (char)SD_CID_OID0(pCID));
+ TRACE_INFO(" .OID OEM/Application ID (MMC) %x\n\r",
+ eMMC_CID_OID(pCID));
+
+ TRACE_INFO(" .PNM Product name (SD) %c%c%c%c%c\n\r",
+ (char)SD_CID_PNM4(pCID),
+ (char)SD_CID_PNM3(pCID),
+ (char)SD_CID_PNM2(pCID),
+ (char)SD_CID_PNM1(pCID),
+ (char)SD_CID_PNM0(pCID));
+ TRACE_INFO(" .PNM Product name (MMC) %c%c%c%c%c%c\n\r",
+ (char)MMC_CID_PNM5(pCID),
+ (char)MMC_CID_PNM4(pCID),
+ (char)MMC_CID_PNM3(pCID),
+ (char)MMC_CID_PNM2(pCID),
+ (char)MMC_CID_PNM1(pCID),
+ (char)MMC_CID_PNM0(pCID));
+
+ TRACE_INFO(" .PRV Product revision (SD) %x\n\r",
+ SD_CID_PRV(pCID));
+ TRACE_INFO(" .PRV Product revision (MMC) %x\n\r",
+ MMC_CID_PRV(pCID));
+
+ TRACE_INFO(" .PSN Product serial number (SD) %02X%02X%02X%02X\n\r",
+ SD_CID_PSN3(pCID),
+ SD_CID_PSN2(pCID),
+ SD_CID_PSN1(pCID),
+ SD_CID_PSN0(pCID));
+ TRACE_INFO(" .PSN Product serial number (MMC) %02X%02X%02X%02X\n\r",
+ MMC_CID_PSN3(pCID),
+ MMC_CID_PSN2(pCID),
+ MMC_CID_PSN1(pCID),
+ MMC_CID_PSN0(pCID));
+
+ TRACE_INFO(" .MDT Manufacturing date (SD) %04d/%02d\n\r",
+ (uint16_t)(SD_CID_MDT_Y(pCID) + 2000),
+ (uint8_t)SD_CID_MDT_M(pCID));
+ TRACE_INFO(" .MDT Manufacturing date (MMC) %04d/%02d\n\r",
+ (uint16_t)(MMC_CID_MDT_Y(pCID) + 1997),
+ (uint8_t)SD_CID_MDT_M(pCID));
+
+ TRACE_INFO(" .CRC checksum %02X\n\r",
+ SD_CID_CRC(pCID));
+}
+
+/**
+ * Display the content of the CSD register
+ * \param pSd Pointer to \ref sSdCard instance.
+ */
+void SD_DumpCSD(void* pCSD)
+{
+ TRACE_INFO("======== CSD ========");
+ _DumpREG(pCSD, 128/8);
+ TRACE_INFO("===================\n\r");
+ TRACE_INFO(" .CSD_STRUCTURE 0x%x\r\n", SD_CSD_STRUCTURE(pCSD));
+ TRACE_INFO(" .SPEC_VERS (eMMC) 0x%x\r\n", MMC_CSD_SPEC_VERS(pCSD));
+ TRACE_INFO(" .TAAC 0x%X\r\n", SD_CSD_TAAC(pCSD) );
+ TRACE_INFO(" .NSAC 0x%X\r\n", SD_CSD_NSAC(pCSD) );
+ TRACE_INFO(" .TRAN_SPEED 0x%X\r\n", SD_CSD_TRAN_SPEED(pCSD) );
+ TRACE_INFO(" .CCC 0x%X\r\n", SD_CSD_CCC(pCSD) );
+ TRACE_INFO(" .READ_BL_LEN 0x%X\r\n", SD_CSD_READ_BL_LEN(pCSD) );
+ TRACE_INFO(" .READ_BL_PARTIAL 0x%X\r\n", SD_CSD_READ_BL_PARTIAL(pCSD) );
+ TRACE_INFO(" .WRITE_BLK_MISALIGN 0x%X\r\n", SD_CSD_WRITE_BLK_MISALIGN(pCSD));
+ TRACE_INFO(" .READ_BLK_MISALIGN 0x%X\r\n", SD_CSD_READ_BLK_MISALIGN(pCSD) );
+ TRACE_INFO(" .DSR_IMP 0x%X\r\n", SD_CSD_DSR_IMP(pCSD) );
+ TRACE_INFO(" .C_SIZE 0x%X\r\n", SD_CSD_C_SIZE(pCSD) );
+ TRACE_INFO(" .C_SIZE_HC 0x%X\r\n", SD2_CSD_C_SIZE(pCSD) );
+ TRACE_INFO(" .VDD_R_CURR_MIN 0x%X\r\n", SD_CSD_VDD_R_CURR_MIN(pCSD) );
+ TRACE_INFO(" .VDD_R_CURR_MAX 0x%X\r\n", SD_CSD_VDD_R_CURR_MAX(pCSD) );
+ TRACE_INFO(" .VDD_W_CURR_MIN 0x%X\r\n", SD_CSD_VDD_W_CURR_MIN(pCSD) );
+ TRACE_INFO(" .VDD_W_CURR_MAX 0x%X\r\n", SD_CSD_VDD_W_CURR_MAX(pCSD) );
+ TRACE_INFO(" .C_SIZE_MULT 0x%X\r\n", SD_CSD_C_SIZE_MULT(pCSD) );
+ TRACE_INFO(" .ERASE_BLK_EN 0x%X\r\n", SD_CSD_ERASE_BLK_EN(pCSD) );
+ TRACE_INFO(" .SECTOR_SIZE 0x%X\r\n", SD_CSD_SECTOR_SIZE(pCSD) );
+ TRACE_INFO(" .WP_GRP_SIZE 0x%X\r\n", SD_CSD_WP_GRP_SIZE(pCSD) );
+ TRACE_INFO(" .WP_GRP_ENABLE 0x%X\r\n", SD_CSD_WP_GRP_ENABLE(pCSD) );
+ TRACE_INFO(" .R2W_FACTOR 0x%X\r\n", SD_CSD_R2W_FACTOR(pCSD) );
+ TRACE_INFO(" .WRITE_BL_LEN 0x%X\r\n", SD_CSD_WRITE_BL_LEN(pCSD) );
+ TRACE_INFO(" .WRITE_BL_PARTIAL 0x%X\r\n", SD_CSD_WRITE_BL_PARTIAL(pCSD) );
+ TRACE_INFO(" .FILE_FORMAT_GRP 0x%X\r\n", SD_CSD_FILE_FORMAT_GRP(pCSD) );
+ TRACE_INFO(" .COPY 0x%X\r\n", SD_CSD_COPY(pCSD) );
+ TRACE_INFO(" .PERM_WRITE_PROTECT 0x%X\r\n", SD_CSD_PERM_WRITE_PROTECT(pCSD));
+ TRACE_INFO(" .TMP_WRITE_PROTECT 0x%X\r\n", SD_CSD_TMP_WRITE_PROTECT(pCSD) );
+ TRACE_INFO(" .FILE_FORMAT 0x%X\r\n", SD_CSD_FILE_FORMAT(pCSD) );
+ TRACE_INFO(" .ECC (MMC) 0x%X\r\n", MMC_CSD_ECC(pCSD) );
+ TRACE_INFO(" .CRC 0x%X\r\n", SD_CSD_CRC(pCSD) );
+ TRACE_INFO(" .MULT 0x%X\r\n", SD_CSD_MULT(pCSD) );
+ TRACE_INFO(" .BLOCKNR 0x%X\r\n", SD_CSD_BLOCKNR(pCSD) );
+ TRACE_INFO(" .BLOCKNR_HC 0x%X\r\n", SD_CSD_BLOCKNR_HC(pCSD) );
+ TRACE_INFO(" .BLOCK_LEN 0x%X\r\n", SD_CSD_BLOCK_LEN(pCSD) );
+ TRACE_INFO(" -TOTAL_SIZE 0x%X\r\n", SD_CSD_TOTAL_SIZE(pCSD) );
+ TRACE_INFO(" -TOTAL_SIZE_HC 0x%X\r\n", SD_CSD_TOTAL_SIZE_HC(pCSD) );
+}
+
+/**
+ * Display the content of the EXT_CSD register
+ * \param pExtCSD Pointer to extended CSD data.
+ */
+void SD_DumpExtCSD(void* pExtCSD)
+{
+ /* Remove warnings */
+ pExtCSD = pExtCSD;
+
+ TRACE_INFO("======= EXT_CSD =======");
+ TRACE_INFO_WP("\n\r");
+ TRACE_INFO(" .S_CMD_SET : 0x%X\n\r",
+ MMC_EXT_S_CMD_SET(pExtCSD));
+ TRACE_INFO(" .BOOT_INFO : 0x%X\n\r",
+ MMC_EXT_BOOT_INFO(pExtCSD));
+ TRACE_INFO(" .BOOT_SIZE_MULTI : 0x%X\n\r",
+ MMC_EXT_BOOT_SIZE_MULTI(pExtCSD));
+ TRACE_INFO(" .ACC_SIZE : 0x%X\n\r",
+ MMC_EXT_ACC_SIZE(pExtCSD));
+ TRACE_INFO(" .HC_ERASE_GRP_SIZE : 0x%X\n\r",
+ MMC_EXT_HC_ERASE_GRP_SIZE(pExtCSD));
+ TRACE_INFO(" .ERASE_TIMEOUT_MULT : 0x%X\n\r",
+ MMC_EXT_ERASE_TIMEOUT_MULT(pExtCSD));
+ TRACE_INFO(" .REL_WR_SEC_C : 0x%X\n\r",
+ MMC_EXT_REL_WR_SEC_C(pExtCSD));
+ TRACE_INFO(" .HC_WP_GRP_SIZE : 0x%X\n\r",
+ MMC_EXT_HC_WP_GRP_SIZE(pExtCSD));
+ TRACE_INFO(" .S_C_VCC : 0x%X\n\r",
+ MMC_EXT_S_C_VCC(pExtCSD));
+ TRACE_INFO(" .S_C_VCCQ : 0x%X\n\r",
+ MMC_EXT_S_C_VCCQ(pExtCSD));
+ TRACE_INFO(" .S_A_TIMEOUT : 0x%X\n\r",
+ MMC_EXT_S_A_TIMEOUT(pExtCSD));
+ TRACE_INFO(" .SEC_COUNT : 0x%X\n\r",
+ MMC_EXT_SEC_COUNT(pExtCSD));
+ TRACE_INFO(" .MIN_PERF_W_8_52 : 0x%X\n\r",
+ MMC_EXT_MIN_PERF_W_8_52(pExtCSD));
+ TRACE_INFO(" .MIN_PERF_R_8_52 : 0x%X\n\r",
+ MMC_EXT_MIN_PERF_R_8_52(pExtCSD));
+ TRACE_INFO(" .MIN_PERF_W_8_26_4_52 : 0x%X\n\r",
+ MMC_EXT_MIN_PERF_W_8_26_4_52(pExtCSD));
+ TRACE_INFO(" .MIN_PERF_R_8_26_4_52 : 0x%X\n\r",
+ MMC_EXT_MIN_PERF_R_8_26_4_52(pExtCSD));
+ TRACE_INFO(" .MIN_PERF_W_4_26 : 0x%X\n\r",
+ MMC_EXT_MIN_PERF_W_4_26(pExtCSD));
+ TRACE_INFO(" .MIN_PERF_R_4_26 : 0x%X\n\r",
+ MMC_EXT_MIN_PERF_R_4_26(pExtCSD));
+ TRACE_INFO(" .PWR_CL_26_360 : 0x%X\n\r",
+ MMC_EXT_PWR_CL_26_360(pExtCSD));
+ TRACE_INFO(" .PWR_CL_52_360 : 0x%X\n\r",
+ MMC_EXT_PWR_CL_52_360(pExtCSD));
+ TRACE_INFO(" .PWR_CL_26_195 : 0x%X\n\r",
+ MMC_EXT_PWR_CL_26_195(pExtCSD));
+ TRACE_INFO(" .PWR_CL_52_195 : 0x%X\n\r",
+ MMC_EXT_PWR_CL_52_195(pExtCSD));
+ TRACE_INFO(" .CARD_TYPE : 0x%X\n\r",
+ MMC_EXT_CARD_TYPE(pExtCSD));
+ TRACE_INFO(" .CSD_STRUCTURE : 0x%X\n\r",
+ MMC_EXT_CSD_STRUCTURE(pExtCSD));
+ TRACE_INFO(" .EXT_CSD_REV : 0x%X\n\r",
+ MMC_EXT_EXT_CSD_REV(pExtCSD));
+ TRACE_INFO(" .CMD_SET : 0x%X\n\r",
+ MMC_EXT_CMD_SET(pExtCSD));
+ TRACE_INFO(" .CMD_SET_REV : 0x%X\n\r",
+ MMC_EXT_CMD_SET_REV(pExtCSD));
+ TRACE_INFO(" .POWER_CLASS : 0x%X\n\r",
+ MMC_EXT_POWER_CLASS(pExtCSD));
+ TRACE_INFO(" .HS_TIMING : 0x%X\n\r",
+ MMC_EXT_HS_TIMING(pExtCSD));
+ TRACE_INFO(" .BUS_WIDTH : 0x%X\n\r",
+ MMC_EXT_BUS_WIDTH(pExtCSD));
+ TRACE_INFO(" .ERASED_MEM_CONT : 0x%X\n\r",
+ MMC_EXT_ERASED_MEM_CONT(pExtCSD));
+ TRACE_INFO(" .BOOT_CONFIG : 0x%X\n\r",
+ MMC_EXT_BOOT_CONFIG(pExtCSD));
+ TRACE_INFO(" .BOOT_BUS_WIDTH : 0x%X\n\r",
+ MMC_EXT_BOOT_BUS_WIDTH(pExtCSD));
+ TRACE_INFO(" .ERASE_GROUP_DEF : 0x%X\n\r",
+ MMC_EXT_ERASE_GROUP_DEF(pExtCSD));
+}
+
+/**
+ * Display the content of the SCR register
+ * \param pSCR Pointer to SCR data.
+ */
+void SD_DumpSCR(void *pSCR)
+{
+ /* Remove warnings */
+ pSCR = pSCR;
+
+ TRACE_INFO("========== SCR ==========");
+ TRACE_INFO_WP("\n\r");
+
+ TRACE_INFO(" .SCR_STRUCTURE :0x%X\n\r",
+ SD_SCR_STRUCTURE(pSCR));
+ TRACE_INFO(" .SD_SPEC :0x%X\n\r",
+ SD_SCR_SD_SPEC(pSCR));
+ TRACE_INFO(" .DATA_STAT_AFTER_ERASE :0x%X\n\r",
+ SD_SCR_DATA_STAT_AFTER_ERASE(pSCR));
+ TRACE_INFO(" .SD_SECURITY :0x%X\n\r",
+ SD_SCR_SD_SECURITY(pSCR));
+ TRACE_INFO(" .SD_BUS_WIDTHS :0x%X\n\r",
+ SD_SCR_SD_BUS_WIDTHS(pSCR));
+}
+
+/**
+ * Display the content of the SD Status
+ * \param pSdST Pointer to SD card status data.
+ */
+void SD_DumpSdStatus(void* pSdST)
+{
+ /* Remove warnings */
+ pSdST = pSdST;
+
+ TRACE_INFO("=========== STAT ============");
+ TRACE_INFO_WP("\n\r");
+
+ TRACE_INFO(" .DAT_BUS_WIDTH :0x%X\n\r",
+ SD_ST_DAT_BUS_WIDTH(pSdST));
+ TRACE_INFO(" .SECURED_MODE :0x%X\n\r",
+ SD_ST_SECURED_MODE(pSdST));
+ TRACE_INFO(" .SD_CARD_TYPE :0x%X\n\r",
+ SD_ST_CARD_TYPE(pSdST));
+ TRACE_INFO(" .SIZE_OF_PROTECTED_AREA :0x%X\n\r",
+ SD_ST_SIZE_OF_PROTECTED_AREA(pSdST));
+ TRACE_INFO(" .SPEED_CLASS :0x%X\n\r",
+ SD_ST_SPEED_CLASS(pSdST));
+ TRACE_INFO(" .PERFORMANCE_MOVE :0x%X\n\r",
+ SD_ST_PERFORMANCE_MOVE(pSdST));
+ TRACE_INFO(" .AU_SIZE :0x%X\n\r",
+ SD_ST_AU_SIZE(pSdST));
+ TRACE_INFO(" .ERASE_SIZE :0x%X\n\r",
+ SD_ST_ERASE_SIZE(pSdST));
+ TRACE_INFO(" .ERASE_TIMEOUT :0x%X\n\r",
+ SD_ST_ERASE_TIMEOUT(pSdST));
+ TRACE_INFO(" .ERASE_OFFSET :0x%X\n\r",
+ SD_ST_ERASE_OFFSET(pSdST));
+}
+/**@}*/
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/spi-flash/at26.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/spi-flash/at26.c
new file mode 100644
index 0000000..099aaef
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/spi-flash/at26.c
@@ -0,0 +1,226 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+//------------------------------------------------------------------------------
+// Headers
+//------------------------------------------------------------------------------
+
+#include "at26.h"
+#include "board.h"
+#include <assert.h>
+
+//------------------------------------------------------------------------------
+// Internal definitions
+//------------------------------------------------------------------------------
+
+/// SPI clock frequency used in Hz.
+#define SPCK 1000000
+
+/// SPI chip select configuration value.
+#define CSR (SPI_CSR_NCPHA | \
+ SPID_CSR_DLYBCT(BOARD_MCK, 100) | \
+ SPID_CSR_DLYBS(BOARD_MCK, 5) | \
+ SPID_CSR_SCBR(BOARD_MCK, SPCK))
+
+/// Number of recognized dataflash.
+#define NUMDATAFLASH (sizeof(at26Devices) / sizeof(At26Desc))
+
+//------------------------------------------------------------------------------
+// Internal variables
+//------------------------------------------------------------------------------
+
+/// Array of recognized serial firmware dataflash chips.
+static const At26Desc at26Devices[] = {
+ // name, Jedec ID, size, page size, block size, block erase command
+ {"AT25DF041A" , 0x0001441F, 512 * 1024 , 256, 64 * 1024, AT26_BLOCK_ERASE_64K},
+ {"AT25DF161" , 0x0002461F, 2 * 1024 * 1024, 256, 64 * 1024, AT26_BLOCK_ERASE_64K},
+ {"AT26DF081A" , 0x0001451F, 1 * 1024 * 1024, 256, 64 * 1024, AT26_BLOCK_ERASE_64K},
+ {"AT26DF0161" , 0x0000461F, 2 * 1024 * 1024, 256, 64 * 1024, AT26_BLOCK_ERASE_64K},
+ {"AT26DF161A" , 0x0001461F, 2 * 1024 * 1024, 256, 64 * 1024, AT26_BLOCK_ERASE_64K},
+ {"AT26DF321" , 0x0000471F, 4 * 1024 * 1024, 256, 64 * 1024, AT26_BLOCK_ERASE_64K},
+ {"AT25DF512B" , 0x0001651F, 64 * 1024, 256, 32 * 1024, AT26_BLOCK_ERASE_32K},
+ {"AT25DF512B" , 0x0000651F, 64 * 1024, 256, 32 * 1024, AT26_BLOCK_ERASE_32K},
+ {"AT25DF021" , 0x0000431F, 256 * 1024, 256, 64 * 1024, AT26_BLOCK_ERASE_64K},
+ {"AT26DF641" , 0x0000481F, 8 * 1024 * 1024, 256, 64 * 1024, AT26_BLOCK_ERASE_64K},
+ // Manufacturer: ST
+ {"M25P05" , 0x00102020, 64 * 1024, 256, 32 * 1024, AT26_BLOCK_ERASE_64K},
+ {"M25P10" , 0x00112020, 128 * 1024, 256, 32 * 1024, AT26_BLOCK_ERASE_64K},
+ {"M25P20" , 0x00122020, 256 * 1024, 256, 64 * 1024, AT26_BLOCK_ERASE_64K},
+ {"M25P40" , 0x00132020, 512 * 1024, 256, 64 * 1024, AT26_BLOCK_ERASE_64K},
+ {"M25P80" , 0x00142020, 1 * 1024 * 1024, 256, 64 * 1024, AT26_BLOCK_ERASE_64K},
+ {"M25P16" , 0x00152020, 2 * 1024 * 1024, 256, 64 * 1024, AT26_BLOCK_ERASE_64K},
+ {"M25P32" , 0x00162020, 4 * 1024 * 1024, 256, 64 * 1024, AT26_BLOCK_ERASE_64K},
+ {"M25P64" , 0x00172020, 8 * 1024 * 1024, 256, 64 * 1024, AT26_BLOCK_ERASE_64K},
+ // Manufacturer: Windbond
+ {"W25X10" , 0x001130EF, 128 * 1024, 256, 64 * 1024, AT26_BLOCK_ERASE_64K},
+ {"W25X20" , 0x001230EF, 256 * 1024, 256, 64 * 1024, AT26_BLOCK_ERASE_64K},
+ {"W25X40" , 0x001330EF, 512 * 1024, 256, 64 * 1024, AT26_BLOCK_ERASE_64K},
+ {"W25X80" , 0x001430EF, 1 * 1024 * 1024, 256, 64 * 1024, AT26_BLOCK_ERASE_64K},
+ // Manufacturer: Macronix
+ {"MX25L512" , 0x001020C2, 64 * 1024, 256, 64 * 1024, AT26_BLOCK_ERASE_64K},
+ {"MX25L3205" , 0x001620C2, 4 * 1024 * 1024, 256, 64 * 1024, AT26_BLOCK_ERASE_64K},
+ {"MX25L6405" , 0x001720C2, 8 * 1024 * 1024, 256, 64 * 1024, AT26_BLOCK_ERASE_64K},
+ // Other
+ {"SST25VF512" , 0x000048BF, 64 * 1024, 256, 32 * 1024, AT26_BLOCK_ERASE_32K}
+};
+
+//------------------------------------------------------------------------------
+// Exported functions
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+/// Initializes an AT26 driver instance with the given SPI driver and chip
+/// select value.
+/// \param pAt26 Pointer to an AT26 driver instance.
+/// \param pSpid Pointer to an SPI driver instance.
+/// \param cs Chip select value to communicate with the serial flash.
+//------------------------------------------------------------------------------
+void AT26_Configure(At26 *pAt26, Spid *pSpid, unsigned char cs)
+{
+ SpidCmd *pCommand;
+
+ assert(pAt26 != NULL);
+ assert(pSpid != NULL);
+ assert(cs < 4);
+
+ // Configure the SPI chip select for the serial flash
+ SPID_ConfigureCS(pSpid, cs, CSR);
+
+ // Initialize the AT26 fields
+ pAt26->pSpid = pSpid;
+ pAt26->pDesc = 0;
+
+ // Initialize the command structure
+ pCommand = &(pAt26->command);
+ pCommand->pCmd = (unsigned char *) pAt26->pCmdBuffer;
+ pCommand->callback = 0;
+ pCommand->pArgument = 0;
+ pCommand->spiCs = cs;
+}
+
+//------------------------------------------------------------------------------
+/// Returns 1 if the serial flash driver is currently busy executing a command;
+/// otherwise returns 0.
+/// \param pAt26 Pointer to an At26 driver instance.
+//------------------------------------------------------------------------------
+unsigned char AT26_IsBusy(At26 *pAt26)
+{
+ return SPID_IsBusy(pAt26->pSpid);
+}
+
+//------------------------------------------------------------------------------
+/// Sends a command to the serial flash through the SPI. The command is made up
+/// of two parts: the first is used to transmit the command byte and optionally,
+/// address and dummy bytes. The second part is the data to send or receive.
+/// This function does not block: it returns as soon as the transfer has been
+/// started. An optional callback can be invoked to notify the end of transfer.
+/// Return 0 if successful; otherwise, returns AT26_ERROR_BUSY if the AT26
+/// driver is currently executing a command, or AT26_ERROR_SPI if the command
+/// cannot be sent because of a SPI error.
+/// \param pAt26 Pointer to an At26 driver instance.
+/// \param cmd Command byte.
+/// \param cmdSize Size of command (command byte + address bytes + dummy bytes).
+/// \param pData Data buffer.
+/// \param dataSize Number of bytes to send/receive.
+/// \param address Address to transmit.
+/// \param callback Optional user-provided callback to invoke at end of transfer.
+/// \param pArgument Optional argument to the callback function.
+//------------------------------------------------------------------------------
+unsigned char AT26_SendCommand(
+ At26 *pAt26,
+ unsigned char cmd,
+ unsigned char cmdSize,
+ unsigned char *pData,
+ unsigned int dataSize,
+ unsigned int address,
+ SpidCallback callback,
+ void *pArgument)
+
+{
+ SpidCmd *pCommand;
+
+ assert(pAt26 != NULL);
+
+ // Check if the SPI driver is available
+ if (AT26_IsBusy(pAt26)) {
+
+ return AT26_ERROR_BUSY;
+ }
+
+ // Store command and address in command buffer
+ pAt26->pCmdBuffer[0] = (cmd & 0x000000FF)
+ | ((address & 0x0000FF) << 24)
+ | ((address & 0x00FF00) << 8)
+ | ((address & 0xFF0000) >> 8);
+
+ // Update the SPI transfer descriptor
+ pCommand = &(pAt26->command);
+ pCommand->cmdSize = cmdSize;
+ pCommand->pData = pData;
+ pCommand->dataSize = dataSize;
+ pCommand->callback = callback;
+ pCommand->pArgument = pArgument;
+
+ // Start the SPI transfer
+ if (SPID_SendCommand(pAt26->pSpid, pCommand)) {
+
+ return AT26_ERROR_SPI;
+ }
+
+ return 0;
+}
+
+//------------------------------------------------------------------------------
+/// Tries to detect a serial firmware flash device given its JEDEC identifier.
+/// The JEDEC id can be retrieved by sending the correct command to the device.
+/// Returns the corresponding AT26 descriptor if found; otherwise returns 0.
+/// \param pAt26 Pointer to an AT26 driver instance.
+/// \param jedecId JEDEC identifier of device.
+//------------------------------------------------------------------------------
+const At26Desc * AT26_FindDevice(At26 *pAt26, unsigned int jedecId)
+{
+ unsigned int i = 0;
+
+ assert(pAt26 != NULL);
+
+ // Search if device is recognized
+ pAt26->pDesc = 0;
+ while ((i < NUMDATAFLASH) && !(pAt26->pDesc)) {
+
+ if (jedecId == at26Devices[i].jedecId) {
+
+ pAt26->pDesc = &(at26Devices[i]);
+ }
+
+ i++;
+ }
+
+ return( pAt26->pDesc );
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/spi-flash/at26d.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/spi-flash/at26d.c
new file mode 100644
index 0000000..9a40abc
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/spi-flash/at26d.c
@@ -0,0 +1,353 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+//------------------------------------------------------------------------------
+// Headers
+//------------------------------------------------------------------------------
+
+#include "at26.h"
+#include "at26d.h"
+#include "board.h"
+#include <math.h>
+#include <assert.h>
+
+//------------------------------------------------------------------------------
+// Local functions
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+/// Wait for transfer to finish calling the SPI driver ISR. (interrupts are disabled)
+/// \param pAt26 Pointer to an AT26 driver instance.
+//------------------------------------------------------------------------------
+static void AT26D_Wait(At26 *pAt26)
+{
+ // Wait for transfer to finish
+ while (AT26_IsBusy(pAt26))
+ {
+ SPID_Handler(pAt26->pSpid);
+ }
+}
+
+//------------------------------------------------------------------------------
+/// Reads and returns the status register of the serial flash.
+/// \param pAt26 Pointer to an AT26 driver instance.
+//------------------------------------------------------------------------------
+static unsigned char AT26D_ReadStatus(At26 *pAt26)
+{
+ unsigned char error, status;
+
+ assert(pAt26 != NULL);
+
+ // Issue a status read command
+ error = AT26_SendCommand(pAt26, AT26_READ_STATUS, 1, &status, 1, 0, 0, 0);
+ assert(!error); //, "-F- AT26_GetStatus: Failed to issue command.\n\r");
+
+ // Wait for transfer to finish
+ AT26D_Wait(pAt26);
+
+ return status;
+}
+
+//------------------------------------------------------------------------------
+/// Writes the given value in the status register of the serial flash device.
+/// \param pAt26 Pointer to an AT26 driver instance.
+/// \param status Status to write.
+//------------------------------------------------------------------------------
+static void AT26D_WriteStatus(At26 *pAt26, unsigned char status)
+{
+ unsigned char error;
+
+ assert(pAt26 != NULL);
+
+ // Issue a write status command
+ error = AT26_SendCommand(pAt26, AT26_WRITE_STATUS, 1, &status, 1, 0, 0, 0);
+ assert(!error); //, "-F- AT26_WriteStatus: Failed to issue command.\n\r");
+ // Wait for transfer to finish
+ AT26D_Wait(pAt26);
+}
+
+
+//------------------------------------------------------------------------------
+// Global functions
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+/// Waits for the serial flash device to become ready to accept new commands.
+/// \param pAt26 Pointer to an AT26 driver instance.
+//------------------------------------------------------------------------------
+void AT26D_WaitReady(At26 *pAt26)
+{
+ unsigned char ready = 0;
+
+ assert(pAt26 != NULL);
+
+ // Read status register and check busy bit
+ while (!ready) {
+
+ ready = ((AT26D_ReadStatus(pAt26) & AT26_STATUS_RDYBSY) == AT26_STATUS_RDYBSY_READY);
+ }
+}
+
+//------------------------------------------------------------------------------
+/// Reads and returns the serial flash device ID.
+/// \param pAt26 Pointer to an AT26 driver instance.
+//------------------------------------------------------------------------------
+unsigned int AT26D_ReadJedecId(At26 *pAt26)
+{
+ unsigned char error;
+ unsigned int id = 0;
+
+ assert(pAt26 != NULL);
+
+ // Issue a read ID command
+ error = AT26_SendCommand(pAt26, AT26_READ_JEDEC_ID, 1,
+ (unsigned char *) &id, 3, 0, 0, 0);
+ assert(!error); //, "-F- AT26_GetJedecId: Could not issue command.\n\r");
+
+ // Wait for transfer to finish
+ AT26D_Wait(pAt26);
+
+ return id;
+}
+
+//------------------------------------------------------------------------------
+/// Enables critical writes operation on a serial flash device, such as sector
+/// protection, status register, etc.
+/// \para pAt26 Pointer to an AT26 driver instance.
+//------------------------------------------------------------------------------
+void AT26D_EnableWrite(At26 *pAt26)
+{
+ unsigned char error;
+
+ assert(pAt26 != NULL);
+
+ // Issue a write enable command
+ error = AT26_SendCommand(pAt26, AT26_WRITE_ENABLE, 1, 0, 0, 0, 0, 0);
+ assert(!error); //, "-F- AT26_EnableWrite: Could not issue command.\n\r");
+
+ // Wait for transfer to finish
+ AT26D_Wait(pAt26);
+}
+
+//------------------------------------------------------------------------------
+/// Unprotects the contents of the serial flash device.
+/// Returns 0 if the device has been unprotected; otherwise returns
+/// SF_PROTECTED.
+/// \param pAt26 Pointer to an AT26 driver instance.
+//------------------------------------------------------------------------------
+unsigned char AT26D_Unprotect(At26 *pAt26)
+{
+ unsigned char status;
+
+ assert(pAt26 != NULL);
+
+ // Get the status register value to check the current protection
+ status = AT26D_ReadStatus(pAt26);
+ if ((status & AT26_STATUS_SWP) == AT26_STATUS_SWP_PROTNONE) {
+
+ // Protection already disabled
+ return 0;
+ }
+
+ // Check if sector protection registers are locked
+ if ((status & AT26_STATUS_SPRL) == AT26_STATUS_SPRL_LOCKED) {
+
+ // Unprotect sector protection registers by writing the status reg.
+ AT26D_EnableWrite(pAt26);
+ AT26D_WriteStatus(pAt26, 0);
+ }
+
+ // Perform a global unprotect command
+ AT26D_EnableWrite(pAt26);
+ AT26D_WriteStatus(pAt26, 0);
+
+ // Check the new status
+ status = AT26D_ReadStatus(pAt26);
+ if ((status & (AT26_STATUS_SPRL | AT26_STATUS_SWP)) != 0) {
+
+ return AT26_ERROR_PROTECTED;
+ }
+ else {
+
+ return 0;
+ }
+}
+
+//------------------------------------------------------------------------------
+/// Erases all the content of the memory chip.
+/// \param pAt26 Pointer to an AT26 driver instance.
+//------------------------------------------------------------------------------
+unsigned char AT26D_EraseChip(At26 *pAt26)
+{
+ unsigned char status;
+ unsigned char error;
+
+ assert(pAt26 != NULL);
+
+ // Check that the flash is unprotected
+ status = AT26D_ReadStatus(pAt26);
+ if ((status & AT26_STATUS_SWP) != AT26_STATUS_SWP_PROTNONE) {
+ return AT26_ERROR_PROTECTED;
+ }
+
+ // Enable critical write operation
+ AT26D_EnableWrite(pAt26);
+
+ // Erase the chip
+ error = AT26_SendCommand(pAt26, AT26_CHIP_ERASE_2, 1, 0, 0, 0, 0, 0);
+ assert(!error); //, "-F- AT26_ChipErase: Could not issue command.\n\r");
+ // Wait for transfer to finish
+ AT26D_Wait(pAt26);
+ // Poll the Serial flash status register until the operation is achieved
+ AT26D_WaitReady(pAt26);
+
+ return 0;
+}
+
+//------------------------------------------------------------------------------
+/// Erases the specified 64KB block of the serial firmware dataflash.
+/// Returns 0 if successful; otherwise returns AT26_ERROR_PROTECTED if the
+/// device is protected or AT26_ERROR_BUSY if it is busy executing a command.
+/// \param pAt26 Pointer to an AT26 driver instance.
+/// \param address Address of the block to erase.
+//------------------------------------------------------------------------------
+unsigned char AT26D_EraseBlock(At26 *pAt26, unsigned int address)
+{
+ unsigned char status;
+ unsigned char error;
+
+ assert(pAt26 != NULL);
+
+ // Check that the flash is ready and unprotected
+ status = AT26D_ReadStatus(pAt26);
+ if ((status & AT26_STATUS_RDYBSY) != AT26_STATUS_RDYBSY_READY) {
+ TRACE_ERROR("AT26D_EraseBlock : Flash busy\n\r");
+ return AT26_ERROR_BUSY;
+ }
+ else if ((status & AT26_STATUS_SWP) != AT26_STATUS_SWP_PROTNONE) {
+ TRACE_ERROR("AT26D_EraseBlock : Flash protected\n\r");
+ return AT26_ERROR_PROTECTED;
+ }
+
+ // Enable critical write operation
+ AT26D_EnableWrite(pAt26);
+
+ // Start the block erase command
+ error = AT26_SendCommand(pAt26, AT26_BlockEraseCmd(pAt26), 4, 0, 0, address, 0, 0);
+ assert(!error); //, "-F- AT26_EraseBlock: Could not issue command.\n\r");
+ // Wait for transfer to finish
+ AT26D_Wait(pAt26);
+ // Poll the Serial flash status register until the operation is achieved
+ AT26D_WaitReady(pAt26);
+
+ return 0;
+}
+
+//------------------------------------------------------------------------------
+/// Writes data at the specified address on the serial firmware dataflash. The
+/// page(s) to program must have been erased prior to writing. This function
+/// handles page boundary crossing automatically.
+/// Returns 0 if successful; otherwise, returns AT26_ERROR_PROGRAM is there has
+/// been an error during the data programming.
+/// \param pAt26 Pointer to an AT26 driver instance.
+/// \param pData Data buffer.
+/// \param size Number of bytes in buffer.
+/// \param address Write address.
+//------------------------------------------------------------------------------
+unsigned char AT26D_Write(
+ At26 *pAt26,
+ unsigned char *pData,
+ unsigned int size,
+ unsigned int address)
+{
+ unsigned int pageSize;
+ unsigned int writeSize;
+ unsigned char error;
+ unsigned char status;
+
+ assert(pAt26 != NULL);
+ assert(pData != NULL);
+
+ // Retrieve device page size
+ pageSize = AT26_PageSize(pAt26);
+
+ // Program one page after the other
+ while (size > 0) {
+ // Compute number of bytes to program in page
+ writeSize = min(size, pageSize - (address % pageSize));
+
+ // Enable critical write operation
+ AT26D_EnableWrite(pAt26);
+
+ // Program page
+ error = AT26_SendCommand(pAt26, AT26_BYTE_PAGE_PROGRAM, 4,
+ pData, writeSize, address, 0, 0);
+ assert(!error); //, "-F- AT26_WritePage: Failed to issue command.\n\r");
+ // Wait for transfer to finish
+ AT26D_Wait(pAt26);
+ // Poll the Serial flash status register until the operation is achieved
+ AT26D_WaitReady(pAt26);
+
+ // Make sure that write was without error
+ status = AT26D_ReadStatus(pAt26);
+ if ((status & AT26_STATUS_EPE) == AT26_STATUS_EPE_ERROR) {
+
+ return AT26_ERROR_PROGRAM;
+ }
+ pData += writeSize;
+ size -= writeSize;
+ address += writeSize;
+ }
+
+ return 0;
+}
+
+//------------------------------------------------------------------------------
+/// Reads data from the specified address on the serial flash.
+/// \param pAt26 Pointer to an AT26 driver instance.
+/// \param pData Data buffer.
+/// \param size Number of bytes to read.
+/// \param address Read address.
+//------------------------------------------------------------------------------
+unsigned char AT26D_Read(
+ At26 *pAt26,
+ unsigned char *pData,
+ unsigned int size,
+ unsigned int address)
+{
+ unsigned char error;
+
+ // Start a read operation
+ error = AT26_SendCommand(pAt26, AT26_READ_ARRAY_LF, 4, pData, size, address, 0, 0);
+ assert(!error); //, "-F- AT26_Read: Could not issue command.\n\r");
+ // Wait for transfer to finish
+ AT26D_Wait(pAt26);
+
+ return error;
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/spi-flash/at45.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/spi-flash/at45.c
new file mode 100644
index 0000000..22c3bba
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/spi-flash/at45.c
@@ -0,0 +1,257 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+//------------------------------------------------------------------------------
+// Headers
+//------------------------------------------------------------------------------
+
+#include "at45.h"
+#include "board.h"
+#include <assert.h>
+
+#include <string.h>
+
+//------------------------------------------------------------------------------
+// Internal definitions
+//------------------------------------------------------------------------------
+
+/// Number of dataflash which can be recognized.
+#define NUMDATAFLASH (sizeof(at45Devices) / sizeof(At45Desc))
+
+//------------------------------------------------------------------------------
+// Local variables
+//------------------------------------------------------------------------------
+
+/// indicate if the device is configured as binary page or not.
+static unsigned char configuredBinaryPage;
+
+//------------------------------------------------------------------------------
+// Internal variables
+//------------------------------------------------------------------------------
+
+static const At45Desc at45Devices[] = {
+ { 512, 1, 264, 9, 0x0C, "AT45DB011D"},
+ { 1024, 1, 264, 9, 0x14, "AT45DB021D"},
+ { 2048, 1, 264, 9, 0x1C, "AT45DB041D"},
+ { 4096, 1, 264, 9, 0x24, "AT45DB081D"},
+ { 4096, 1, 528, 10, 0x2C, "AT45DB161D"},
+ { 8192, 1, 528, 10, 0x34, "AT45DB321D"},
+ { 8192, 1, 1056, 11, 0x3C, "AT45DB642D"},
+ {16384, 1, 1056, 11, 0x10, "AT45DB1282"},
+ {16384, 1, 2112, 12, 0x18, "AT45DB2562"},
+ {32768, 1, 2112, 12, 0x20, "AT45DB5122"}
+};
+
+//------------------------------------------------------------------------------
+// Exported functions
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+/// Initializes an AT45 instance and configures SPI chip select register.
+/// Always returns 0.
+/// \param pAt45 Pointer to the At45 instance to initialize.
+/// \param pSpid Pointer to the underlying SPI driver.
+/// \param spiCs Chip select value to connect to the At45.
+//------------------------------------------------------------------------------
+unsigned char AT45_Configure(At45 *pAt45, Spid *pSpid, unsigned char spiCs)
+{
+ SpidCmd *pCommand;
+
+ // Sanity checks
+ ASSERT(pSpid, "AT45_Configure: pSpid is 0.\n\r");
+ ASSERT(pAt45, "AT45_Configure: pAt45 is 0.\n\r");
+
+ // Initialize the At45 instance
+ pAt45->pSpid = pSpid;
+ pAt45->pDesc = 0;
+ memset(pAt45->pCmdBuffer, 0, 8);
+
+ // Initialize the spidCmd structure
+ pCommand = &(pAt45->command);
+ pCommand->pCmd = pAt45->pCmdBuffer;
+ pCommand->callback = 0;
+ pCommand->pArgument = 0;
+ pCommand->spiCs = spiCs;
+
+ return 0;
+}
+
+//------------------------------------------------------------------------------
+/// This function returns 1 if the At45 driver is not executing any command;
+/// otherwise it returns 0.
+/// \param pAt45 Pointer to an At45 instance.
+//------------------------------------------------------------------------------
+unsigned char AT45_IsBusy(At45 *pAt45)
+{
+ return SPID_IsBusy(pAt45->pSpid);
+}
+
+//------------------------------------------------------------------------------
+/// Sends a command to the dataflash through the SPI. The command is identified
+/// by its command code and the number of bytes to transfer (1 + number of
+/// address bytes + number of dummy bytes). If data needs to be received, then
+/// a data buffer must be provided.
+/// This function does not block; its optional callback will be invoked when
+/// the transfer completes.
+/// \param pAt45 Pointer to an At45 driver instance.
+/// \param cmd Command code.
+/// \param cmdSize Size of command code + address bytes + dummy bytes.
+/// \param pData Data buffer.
+/// \param dataSize Number of data bytes to send/receive.
+/// \param address Address at which the command is performed if meaningful.
+/// \param callback Optional callback to invoke at end of transfer.
+/// \param pArgument Optional parameter to the callback function.
+//------------------------------------------------------------------------------
+unsigned char AT45_SendCommand(
+ At45 *pAt45,
+ unsigned char cmd,
+ unsigned char cmdSize,
+ unsigned char *pData,
+ unsigned int dataSize,
+ unsigned int address,
+ SpidCallback callback,
+ void *pArgument)
+{
+ SpidCmd *pCommand;
+ const At45Desc *pDesc = pAt45->pDesc;
+ unsigned int dfAddress = 0;
+
+ // Sanity checks
+ ASSERT(pAt45, "AT45_Command: pAt45 is 0.\n\r");
+ ASSERT(pDesc || (cmd == AT45_STATUS_READ),
+ "AT45_Command: Device has no descriptor, only STATUS_READ command allowed\n\r");
+
+ // Check if the SPI driver is available
+ if (AT45_IsBusy(pAt45)) {
+
+ return AT45_ERROR_LOCK;
+ }
+
+ // Compute command pattern
+ pAt45->pCmdBuffer[0] = cmd;
+
+ // Add address bytes if necessary
+ if (cmdSize > 1) {
+
+ ASSERT(pDesc, "AT45_Command: No descriptor for dataflash.\n\r");
+ if (!configuredBinaryPage) {
+ dfAddress =
+ ((address / (pDesc->pageSize)) << pDesc->pageOffset)
+ + (address % (pDesc->pageSize));
+ }
+ else {
+ dfAddress = address;
+ }
+ // Write address bytes
+ if (pDesc->pageNumber >= 16384) {
+
+ pAt45->pCmdBuffer[1] = ((dfAddress & 0x0F000000) >> 24);
+ pAt45->pCmdBuffer[2] = ((dfAddress & 0x00FF0000) >> 16);
+ pAt45->pCmdBuffer[3] = ((dfAddress & 0x0000FF00) >> 8);
+ pAt45->pCmdBuffer[4] = ((dfAddress & 0x000000FF) >> 0);
+
+ if ((cmd != AT45_CONTINUOUS_READ) && (cmd != AT45_PAGE_READ)) {
+
+ cmdSize++;
+ }
+ }
+ else {
+
+ pAt45->pCmdBuffer[1] = ((dfAddress & 0x00FF0000) >> 16);
+ pAt45->pCmdBuffer[2] = ((dfAddress & 0x0000FF00) >> 8);
+ pAt45->pCmdBuffer[3] = ((dfAddress & 0x000000FF) >> 0);
+ }
+ }
+
+ // Update the SPI Transfer descriptors
+ pCommand = &(pAt45->command);
+ pCommand->cmdSize = cmdSize;
+ pCommand->pData = pData;
+ pCommand->dataSize = dataSize;
+ pCommand->callback = callback;
+ pCommand->pArgument = pArgument;
+
+ // Send Command and data through the SPI
+ if (SPID_SendCommand(pAt45->pSpid, pCommand)) {
+
+ return AT45_ERROR_SPI;
+ }
+
+ return 0;
+}
+
+//------------------------------------------------------------------------------
+/// This function returns the At45Desc structure corresponding to the device
+/// connected
+/// It automatically initializes pAt45->pDesc field structure.
+/// This function shall be called by the application before AT45_SendCommand.
+/// Returns 0 if successful; Otherwise, returns AT45_ERROR_LOCK if the At45
+/// driver is in use or AT45_ERROR_SPI if there was an error with the SPI driver.
+/// \param pAt45 Pointer to an AT45 driver instance.
+/// \param status Device status register value.
+//------------------------------------------------------------------------------
+const At45Desc * AT45_FindDevice(At45 *pAt45, unsigned char status)
+{
+ unsigned int i;
+ unsigned char id = AT45_STATUS_ID(status);
+
+ // Check if status is all one; in which case, it is assumed that no device
+ // is connected
+ if (status == 0xFF) {
+
+ return 0;
+ }
+
+ // Look in device array
+ i = 0;
+ pAt45->pDesc = 0;
+ while ((i < NUMDATAFLASH) && !(pAt45->pDesc)) {
+
+ if (at45Devices[i].id == id) {
+
+ pAt45->pDesc = &(at45Devices[i]);
+ }
+ i++;
+ }
+ configuredBinaryPage = AT45_STATUS_BINARY(status);
+ return pAt45->pDesc;
+}
+
+//------------------------------------------------------------------------------
+/// This function returns the pagesize corresponding to the device connected
+/// \param pAt45 Pointer to an AT45 driver instance.
+//------------------------------------------------------------------------------
+unsigned int AT45_PageSize(At45 *pAt45)
+{
+ unsigned int pagesize = pAt45->pDesc->pageSize;
+ if(((pAt45->pDesc->hasBinaryPage) == 0) || !configuredBinaryPage){
+ return pagesize;
+ }
+ return ((pagesize >> 8) << 8);
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/spi-flash/at45d.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/spi-flash/at45d.c
new file mode 100644
index 0000000..9f2e472
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/spi-flash/at45d.c
@@ -0,0 +1,223 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+//------------------------------------------------------------------------------
+// Headers
+//------------------------------------------------------------------------------
+
+#include "at45.h"
+#include "at45d.h"
+#include "board.h"
+#include <assert.h>
+
+//------------------------------------------------------------------------------
+// Local functions
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+/// Wait for transfer to finish calling the SPI driver ISR (interrupts are
+/// disabled).
+/// \param pAt45 Pointer to an AT45 driver instance.
+//------------------------------------------------------------------------------
+static void AT45D_Wait(At45 *pAt45)
+{
+ SANITY_CHECK(pAt45);
+
+ // Wait for transfer to finish
+ while (AT45_IsBusy(pAt45)) {
+
+ SPID_Handler(pAt45->pSpid);
+ }
+}
+
+
+//------------------------------------------------------------------------------
+// Global functions
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+/// Waits for the At45 to be ready to accept new commands.
+/// \param pAt45 Pointer to a At45 driver instance.
+//------------------------------------------------------------------------------
+void AT45D_WaitReady(At45 *pAt45)
+{
+ unsigned char ready = 0;
+
+ SANITY_CHECK(pAt45);
+
+ // Poll device until it is ready
+ while (!ready) {
+
+ ready = AT45_STATUS_READY(AT45D_GetStatus(pAt45));
+ }
+}
+
+//------------------------------------------------------------------------------
+/// Retrieves and returns the At45 current status, or 0 if an error
+/// happened.
+/// \param pAt45 Pointer to a At45 driver instance.
+//------------------------------------------------------------------------------
+unsigned char AT45D_GetStatus(At45 *pAt45)
+{
+ unsigned char error;
+ unsigned char status;
+
+ SANITY_CHECK(pAt45);
+
+ // Issue a status register read command
+ error = AT45_SendCommand(pAt45, AT45_STATUS_READ, 1, &status, 1, 0, 0, 0);
+ ASSERT(!error, "-F- AT45_GetStatus: Failed to issue command.\n\r");
+
+ // Wait for command to terminate
+ while (AT45_IsBusy(pAt45)) {
+
+ AT45D_Wait(pAt45);
+ }
+
+ return status;
+}
+
+//------------------------------------------------------------------------------
+/// Reads data from the At45 inside the provided buffer. Since a continuous
+/// read command is used, there is no restriction on the buffer size and read
+/// address.
+/// \param pAt45 Pointer to a At45 driver instance.
+/// \param pBuffer Data buffer.
+/// \param size Number of bytes to read.
+/// \param address Address at which data shall be read.
+//------------------------------------------------------------------------------
+void AT45D_Read(
+ At45 *pAt45,
+ unsigned char *pBuffer,
+ unsigned int size,
+ unsigned int address)
+{
+ unsigned char error;
+
+ SANITY_CHECK(pAt45);
+ SANITY_CHECK(pBuffer);
+
+ // Issue a continuous read array command
+ error = AT45_SendCommand(pAt45, AT45_CONTINUOUS_READ_LEG, 8, pBuffer, size, address, 0, 0);
+ ASSERT(!error, "-F- AT45_Read: Failed to issue command\n\r");
+
+ // Wait for the read command to execute
+ while (AT45_IsBusy(pAt45)) {
+
+ AT45D_Wait(pAt45);
+ }
+}
+
+//------------------------------------------------------------------------------
+/// Writes data on the At45 at the specified address. Only one page of
+/// data is written that way; if the address is not at the beginning of the
+/// page, the data is written starting from this address and wraps around to
+/// the beginning of the page.
+/// \param pAt45 Pointer to a At45 driver instance.
+/// \param pBuffer Buffer containing the data to write.
+/// \param size Number of bytes to write.
+/// \param address Destination address on the At45.
+//------------------------------------------------------------------------------
+void AT45D_Write(
+ At45 *pAt45,
+ unsigned char *pBuffer,
+ unsigned int size,
+ unsigned int address)
+{
+ unsigned char error;
+
+ SANITY_CHECK(pAt45);
+ SANITY_CHECK(pBuffer);
+ SANITY_CHECK(size <= pAt45->pDesc->pageSize);
+
+ // Issue a page write through buffer 1 command
+ error = AT45_SendCommand(pAt45, AT45_PAGE_WRITE_BUF1, 4, pBuffer, size, address, 0, 0);
+ ASSERT(!error, "-F- AT45_Write: Could not issue command.\n\r");
+
+ // Wait until the command is sent
+ while (AT45_IsBusy(pAt45)) {
+
+ AT45D_Wait(pAt45);
+ }
+
+ // Wait until the At45 becomes ready again
+ AT45D_WaitReady(pAt45);
+}
+
+//------------------------------------------------------------------------------
+/// Erases a page of data at the given address in the At45.
+/// \param pAt45 Pointer to a At45 driver instance.
+/// \param address Address of page to erase.
+//------------------------------------------------------------------------------
+void AT45D_Erase(At45 *pAt45, unsigned int address)
+{
+ unsigned char error;
+
+ SANITY_CHECK(pAt45);
+
+ // Issue a page erase command.
+ error = AT45_SendCommand(pAt45, AT45_PAGE_ERASE, 4, 0, 0, address, 0, 0);
+ ASSERT(!error, "-F- AT45_Erase: Could not issue command.\n\r");
+
+ // Wait for end of transfer
+ while (AT45_IsBusy(pAt45)) {
+
+ AT45D_Wait(pAt45);
+ }
+
+ // Poll until the At45 has completed the erase operation
+ AT45D_WaitReady(pAt45);
+}
+
+//------------------------------------------------------------------------------
+/// Configure power-of-2 binary page size in the At45.
+/// \param pAt45 Pointer to a At45 driver instance.
+//------------------------------------------------------------------------------
+
+void AT45D_BinaryPage(At45 *pAt45)
+{
+ unsigned char error;
+ unsigned char opcode[3]= {AT45_BINARY_PAGE};
+ SANITY_CHECK(pAt45);
+
+ // Issue a binary page command.
+
+ error = AT45_SendCommand(pAt45, AT45_BINARY_PAGE_FIRST_OPCODE, 1, opcode, 3, 0, 0, 0);
+
+ ASSERT(!error, "-F- AT45_Erase: Could not issue command.\n\r");
+
+ // Wait for end of transfer
+ while (AT45_IsBusy(pAt45)) {
+
+ AT45D_Wait(pAt45);
+ }
+
+ // Wait until the At45 becomes ready again
+ AT45D_WaitReady(pAt45);
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/spi-flash/spid.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/spi-flash/spid.c
new file mode 100644
index 0000000..15e87ce
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/spi-flash/spid.c
@@ -0,0 +1,215 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+//------------------------------------------------------------------------------
+// Headers
+//------------------------------------------------------------------------------
+
+#include "spid.h"
+#include "board.h"
+
+//------------------------------------------------------------------------------
+// Macros
+//------------------------------------------------------------------------------
+
+/// Write PMC register
+#define WRITE_PMC(pPmc, regName, value) pPmc->regName = (value)
+
+/// Write SPI register
+#define WRITE_SPI(pSpi, regName, value) pSpi->regName = (value)
+
+/// Read SPI registers
+#define READ_SPI(pSpi, regName) (pSpi->regName)
+
+//------------------------------------------------------------------------------
+// Exported functions
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+/// Initializes the Spid structure and the corresponding SPI hardware.
+/// Always returns 0.
+/// \param pSpid Pointer to a Spid instance.
+/// \param pSpiHw Associated SPI peripheral.
+/// \param spiId SPI peripheral identifier.
+//------------------------------------------------------------------------------
+unsigned char SPID_Configure(Spid *pSpid, AT91S_SPI *pSpiHw, unsigned char spiId)
+{
+ // Initialize the SPI structure
+ pSpid->pSpiHw = pSpiHw;
+ pSpid->spiId = spiId;
+ pSpid->semaphore = 1;
+ pSpid->pCurrentCommand = 0;
+
+ // Enable the SPI clock
+ WRITE_PMC(AT91C_BASE_PMC, PMC_PCER, (1 << pSpid->spiId));
+
+ // Execute a software reset of the SPI twice
+ WRITE_SPI(pSpiHw, SPI_CR, AT91C_SPI_SWRST);
+ WRITE_SPI(pSpiHw, SPI_CR, AT91C_SPI_SWRST);
+
+ // Configure SPI in Master Mode with No CS selected !!!
+ WRITE_SPI(pSpiHw, SPI_MR, AT91C_SPI_MSTR | AT91C_SPI_MODFDIS | AT91C_SPI_PCS);
+
+ // Disable the PDC transfer
+ WRITE_SPI(pSpiHw, SPI_PTCR, AT91C_PDC_RXTDIS | AT91C_PDC_TXTDIS);
+
+ // Enable the SPI
+ WRITE_SPI(pSpiHw, SPI_CR, AT91C_SPI_SPIEN);
+
+ // Enable the SPI clock
+ WRITE_PMC(AT91C_BASE_PMC, PMC_PCDR, (1 << pSpid->spiId));
+
+ return 0;
+}
+
+//------------------------------------------------------------------------------
+/// Configures the parameters for the device corresponding to the cs.
+/// \param pSpid Pointer to a Spid instance.
+/// \param cs number corresponding to the SPI chip select.
+/// \param csr SPI_CSR value to setup.
+//------------------------------------------------------------------------------
+void SPID_ConfigureCS(Spid *pSpid, unsigned char cs, unsigned int csr)
+{
+ AT91S_SPI *pSpiHw = pSpid->pSpiHw;
+ WRITE_SPI(pSpiHw, SPI_CSR[cs], csr);
+}
+
+//------------------------------------------------------------------------------
+/// Starts a SPI master transfer. This is a non blocking function. It will
+/// return as soon as the transfer is started.
+/// Returns 0 if the transfer has been started successfully; otherwise returns
+/// SPID_ERROR_LOCK is the driver is in use, or SPID_ERROR if the command is not
+/// valid.
+/// \param pSpid Pointer to a Spid instance.
+/// \param pCommand Pointer to the SPI command to execute.
+//------------------------------------------------------------------------------
+unsigned char SPID_SendCommand(Spid *pSpid, SpidCmd *pCommand)
+{
+ AT91S_SPI *pSpiHw = pSpid->pSpiHw;
+ unsigned int spiMr;
+
+ // Try to get the dataflash semaphore
+ if (pSpid->semaphore == 0) {
+
+ return SPID_ERROR_LOCK;
+ }
+ pSpid->semaphore--;
+
+ // Enable the SPI clock
+ WRITE_PMC(AT91C_BASE_PMC, PMC_PCER, (1 << pSpid->spiId));
+
+ // Disable transmitter and receiver
+ WRITE_SPI(pSpiHw, SPI_PTCR, AT91C_PDC_RXTDIS | AT91C_PDC_TXTDIS);
+
+ // Write to the MR register
+ spiMr = READ_SPI(pSpiHw, SPI_MR);
+ spiMr |= AT91C_SPI_PCS;
+ spiMr &= ~((1 << pCommand->spiCs) << 16);
+ WRITE_SPI(pSpiHw, SPI_MR, spiMr);
+
+ // Initialize the two SPI PDC buffer
+ WRITE_SPI(pSpiHw, SPI_RPR, (int) pCommand->pCmd);
+ WRITE_SPI(pSpiHw, SPI_RCR, pCommand->cmdSize);
+ WRITE_SPI(pSpiHw, SPI_TPR, (int) pCommand->pCmd);
+ WRITE_SPI(pSpiHw, SPI_TCR, pCommand->cmdSize);
+
+ WRITE_SPI(pSpiHw, SPI_RNPR, (int) pCommand->pData);
+ WRITE_SPI(pSpiHw, SPI_RNCR, pCommand->dataSize);
+ WRITE_SPI(pSpiHw, SPI_TNPR, (int) pCommand->pData);
+ WRITE_SPI(pSpiHw, SPI_TNCR, pCommand->dataSize);
+
+ // Initialize the callback
+ pSpid->pCurrentCommand = pCommand;
+
+ // Enable transmitter and receiver
+ WRITE_SPI(pSpiHw, SPI_PTCR, AT91C_PDC_RXTEN | AT91C_PDC_TXTEN);
+
+ // Enable buffer complete interrupt
+ WRITE_SPI(pSpiHw, SPI_IER, AT91C_SPI_RXBUFF);
+
+ return 0;
+}
+
+//------------------------------------------------------------------------------
+/// The SPI_Handler must be called by the SPI Interrupt Service Routine with the
+/// corresponding Spi instance.
+/// The SPI_Handler will unlock the Spi semaphore and invoke the upper application
+/// callback.
+/// \param pSpid Pointer to a Spid instance.
+//------------------------------------------------------------------------------
+void SPID_Handler(Spid *pSpid)
+{
+ SpidCmd *pSpidCmd = pSpid->pCurrentCommand;
+ AT91S_SPI *pSpiHw = pSpid->pSpiHw;
+ volatile unsigned int spiSr;
+
+ // Read the status register
+ spiSr = READ_SPI(pSpiHw, SPI_SR);
+ if (spiSr & AT91C_SPI_RXBUFF) {
+
+ // Disable transmitter and receiver
+ WRITE_SPI(pSpiHw, SPI_PTCR, AT91C_PDC_RXTDIS | AT91C_PDC_TXTDIS);
+
+ // Disable the SPI clock
+ WRITE_PMC(AT91C_BASE_PMC, PMC_PCDR, (1 << pSpid->spiId));
+
+ // Disable buffer complete interrupt
+ WRITE_SPI(pSpiHw, SPI_IDR, AT91C_SPI_RXBUFF);
+
+ // Release the dataflash semaphore
+ pSpid->semaphore++;
+
+ // Invoke the callback associated with the current command
+ if (pSpidCmd && pSpidCmd->callback) {
+
+ pSpidCmd->callback(0, pSpidCmd->pArgument);
+ }
+
+ // Nothing must be done after. A new DF operation may have been started
+ // in the callback function.
+ }
+}
+
+//------------------------------------------------------------------------------
+/// Returns 1 if the SPI driver is currently busy executing a command; otherwise
+/// returns 0.
+/// \param pSpid Pointer to a SPI driver instance.
+//------------------------------------------------------------------------------
+unsigned char SPID_IsBusy(const Spid *pSpid)
+{
+ if (pSpid->semaphore == 0) {
+
+ return 1;
+ }
+ else {
+
+ return 0;
+ }
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/spi-flash/spid_dma.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/spi-flash/spid_dma.c
new file mode 100644
index 0000000..f100fff
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/memories/spi-flash/spid_dma.c
@@ -0,0 +1,384 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+//------------------------------------------------------------------------------
+// Headers
+//------------------------------------------------------------------------------
+
+#include "spid.h"
+#include "board.h"
+#include <dma/dma.h>
+#include <drivers/dmad/dmad.h>
+#include <irq/irq.h>
+
+//------------------------------------------------------------------------------
+// Defines
+//------------------------------------------------------------------------------
+
+/// DMA Link List size
+#define SIZE_LL 2
+
+/// DMA Width BYTE
+#define DMA_WIDTH 0
+
+//------------------------------------------------------------------------------
+// Macros
+//------------------------------------------------------------------------------
+
+/// Write PMC register
+#define WRITE_PMC(pPmc, regName, value) pPmc->regName = (value)
+
+/// Write SPI register
+#define WRITE_SPI(pSpi, regName, value) pSpi->regName = (value)
+
+/// Read SPI registers
+#define READ_SPI(pSpi, regName) (pSpi->regName)
+
+/// Enable Peripheral
+#define PERIPH_ENABLE(id) \
+ WRITE_PMC(AT91C_BASE_PMC, PMC_PCER, (1 << (id)))
+/// Disable Peripheral
+#define PERIPH_DISABLE(id) \
+ WRITE_PMC(AT91C_BASE_PMC, PMC_PCDR, (1 << (id)))
+
+
+//------------------------------------------------------------------------------
+// Local Variables
+//------------------------------------------------------------------------------
+
+/// Linked lists for multi transfer buffer chaining structure instance.
+static DmaLinkList dmaTxLinkList[SIZE_LL];
+static DmaLinkList dmaRxLinkList[SIZE_LL];
+
+//------------------------------------------------------------------------------
+// Local functions
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+/// Configure the DMA Channels: 0 RX, 1 TX.
+/// Channels are disabled after configure.
+//------------------------------------------------------------------------------
+static void configureDmaChannels(void)
+{
+ // Enable DMA Peripheral
+ PERIPH_ENABLE(AT91C_ID_HDMA);
+ // Enable DMA
+ DMA_Enable();
+
+ // Free status
+ DMA_DisableIt(0xFFFFFFFF);
+ DMA_GetChannelStatus();
+ DMA_GetStatus();
+ DMA_DisableChannels((1 << DMA_CHANNEL_0) | (1 << DMA_CHANNEL_1));
+ // RX channel 0
+ DMA_SetConfiguration(DMA_CHANNEL_0,
+ AT91C_HDMA_SRC_PER_2
+ | AT91C_HDMA_DST_PER_2
+ | AT91C_HDMA_SRC_H2SEL_HW
+ | AT91C_HDMA_DST_H2SEL_SW
+ | AT91C_HDMA_SOD_ENABLE
+ | AT91C_HDMA_FIFOCFG_LARGESTBURST
+ );
+
+ // TX channel 1
+ DMA_SetConfiguration(DMA_CHANNEL_1,
+ AT91C_HDMA_SRC_PER_1
+ | AT91C_HDMA_DST_PER_1
+ | AT91C_HDMA_SRC_H2SEL_SW
+ | AT91C_HDMA_DST_H2SEL_HW
+ | AT91C_HDMA_SOD_ENABLE
+ | AT91C_HDMA_FIFOCFG_LARGESTBURST
+ );
+}
+
+//------------------------------------------------------------------------------
+/// Configure the DMA source and destination with Linker List mode.
+/// \param pCommand Pointer to command
+//------------------------------------------------------------------------------
+static void configureLinkList(AT91S_SPI *pSpiHw,
+ SpidCmd *pCommand)
+{
+ // Setup RX Link List
+ dmaRxLinkList[0].sourceAddress = (unsigned int)&pSpiHw->SPI_RDR;
+ dmaRxLinkList[0].destAddress = (unsigned int)pCommand->pCmd;
+ dmaRxLinkList[0].controlA = pCommand->cmdSize
+ | AT91C_HDMA_SRC_WIDTH_BYTE
+ | AT91C_HDMA_DST_WIDTH_BYTE
+ ;
+ dmaRxLinkList[0].controlB = AT91C_HDMA_SIF_0
+ | AT91C_HDMA_DIF_0
+ | AT91C_HDMA_SRC_DSCR_FETCH_FROM_MEM
+ | AT91C_HDMA_DST_DSCR_FETCH_FROM_MEM
+ | AT91C_HDMA_FC_PER2MEM
+ | AT91C_HDMA_SRC_ADDRESS_MODE_FIXED
+ | AT91C_HDMA_DST_ADDRESS_MODE_INCR
+ ;
+ dmaTxLinkList[0].sourceAddress = (unsigned int)pCommand->pCmd;
+ dmaTxLinkList[0].destAddress = (unsigned int)&pSpiHw->SPI_TDR;
+ dmaTxLinkList[0].controlA = pCommand->cmdSize
+ | AT91C_HDMA_SRC_WIDTH_BYTE
+ | AT91C_HDMA_DST_WIDTH_BYTE
+ ;
+ dmaTxLinkList[0].controlB = AT91C_HDMA_SIF_0
+ | AT91C_HDMA_DIF_0
+ | AT91C_HDMA_SRC_DSCR_FETCH_FROM_MEM
+ | AT91C_HDMA_DST_DSCR_FETCH_FROM_MEM
+ | AT91C_HDMA_FC_MEM2PER
+ | AT91C_HDMA_SRC_ADDRESS_MODE_INCR
+ | AT91C_HDMA_DST_ADDRESS_MODE_FIXED
+ ;
+ // Only command
+ if (pCommand->pData == 0) {
+
+ dmaRxLinkList[0].descriptor = 0;
+ dmaTxLinkList[0].descriptor = 0;
+ }
+ // Command & Data
+ else {
+
+ dmaRxLinkList[0].descriptor = (unsigned int)&dmaRxLinkList[1];
+ dmaRxLinkList[1].sourceAddress = (unsigned int)&pSpiHw->SPI_RDR;
+ dmaRxLinkList[1].destAddress = (unsigned int)pCommand->pData;
+ dmaRxLinkList[1].controlA = pCommand->dataSize
+ | AT91C_HDMA_SRC_WIDTH_BYTE
+ | AT91C_HDMA_DST_WIDTH_BYTE
+ ;
+ dmaRxLinkList[1].controlB = AT91C_HDMA_SIF_0
+ | AT91C_HDMA_DIF_0
+ | AT91C_HDMA_SRC_DSCR_FETCH_DISABLE
+ | AT91C_HDMA_DST_DSCR_FETCH_DISABLE
+ | AT91C_HDMA_FC_PER2MEM
+ | AT91C_HDMA_SRC_ADDRESS_MODE_FIXED
+ | AT91C_HDMA_DST_ADDRESS_MODE_INCR
+ ;
+ dmaRxLinkList[1].descriptor = 0;
+
+ dmaTxLinkList[0].descriptor = (unsigned int)&dmaTxLinkList[1];
+ dmaTxLinkList[1].sourceAddress = (unsigned int)pCommand->pData;
+ dmaTxLinkList[1].destAddress = (unsigned int)&pSpiHw->SPI_TDR;
+ dmaTxLinkList[1].controlA = pCommand->dataSize
+ | AT91C_HDMA_SRC_WIDTH_BYTE
+ | AT91C_HDMA_DST_WIDTH_BYTE
+ ;
+ dmaTxLinkList[1].controlB = AT91C_HDMA_SIF_0
+ | AT91C_HDMA_DIF_0
+ | AT91C_HDMA_SRC_DSCR_FETCH_DISABLE
+ | AT91C_HDMA_DST_DSCR_FETCH_DISABLE
+ | AT91C_HDMA_FC_MEM2PER
+ | AT91C_HDMA_SRC_ADDRESS_MODE_INCR
+ | AT91C_HDMA_DST_ADDRESS_MODE_FIXED
+ ;
+ dmaTxLinkList[1].descriptor = 0;
+ }
+
+
+ // Setup registers
+ DMA_SetDescriptorAddr(DMA_CHANNEL_0, (unsigned int)&dmaRxLinkList[0]);
+ DMA_SetDescriptorAddr(DMA_CHANNEL_1, (unsigned int)&dmaTxLinkList[0]);
+ AT91C_BASE_HDMA->HDMA_CH[DMA_CHANNEL_0].HDMA_CTRLB = 0
+ | AT91C_HDMA_SRC_DSCR_FETCH_FROM_MEM
+ | AT91C_HDMA_DST_DSCR_FETCH_FROM_MEM
+ ;
+ AT91C_BASE_HDMA->HDMA_CH[DMA_CHANNEL_1].HDMA_CTRLB = 0
+ | AT91C_HDMA_SRC_DSCR_FETCH_FROM_MEM
+ | AT91C_HDMA_DST_DSCR_FETCH_FROM_MEM
+ ;
+}
+
+//------------------------------------------------------------------------------
+// Exported functions
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+/// Initializes the Spid structure and the corresponding SPI & DMA hardware.
+/// The driver will uses DMA channel 0 for RX and DMA channel 1 for TX.
+/// The DMA channels are freed automatically when no SPI command processing.
+/// \param pSpid Pointer to a Spid instance.
+/// \param pSpiHw Associated SPI peripheral.
+/// \param spiId SPI peripheral identifier.
+/// \return Always 0.
+//------------------------------------------------------------------------------
+unsigned char SPID_Configure(Spid *pSpid, AT91S_SPI *pSpiHw, unsigned char spiId)
+{
+ // Initialize the SPI structure
+ pSpid->pSpiHw = pSpiHw;
+ pSpid->spiId = spiId;
+ pSpid->semaphore = 1;
+ pSpid->pCurrentCommand = 0;
+
+ // Enable the SPI Peripheral
+ PERIPH_ENABLE(pSpid->spiId);
+
+ // Execute a software reset of the SPI twice
+ WRITE_SPI(pSpiHw, SPI_CR, AT91C_SPI_SWRST);
+ WRITE_SPI(pSpiHw, SPI_CR, AT91C_SPI_SWRST);
+
+ // Configure SPI in Master Mode with No CS selected !!!
+ WRITE_SPI(pSpiHw, SPI_MR, AT91C_SPI_MSTR | AT91C_SPI_MODFDIS | AT91C_SPI_PCS);
+
+ // Disable the PDC transfer
+ WRITE_SPI(pSpiHw, SPI_PTCR, AT91C_PDC_RXTDIS | AT91C_PDC_TXTDIS);
+
+ // Disable the SPI TX & RX
+ WRITE_SPI(pSpiHw, SPI_CR, AT91C_SPI_SPIDIS);
+
+ // Disable the SPI Peripheral
+ PERIPH_DISABLE(pSpid->spiId);
+
+ return 0;
+}
+
+//------------------------------------------------------------------------------
+/// Configures the parameters for the device corresponding to the cs.
+/// \param pSpid Pointer to a Spid instance.
+/// \param cs number corresponding to the SPI chip select.
+/// \param csr SPI_CSR value to setup.
+//------------------------------------------------------------------------------
+void SPID_ConfigureCS(Spid *pSpid, unsigned char cs, unsigned int csr)
+{
+ AT91S_SPI *pSpiHw = pSpid->pSpiHw;
+
+ // Enable the SPI Peripheral
+ PERIPH_ENABLE(pSpid->spiId);
+
+ // Write CS
+ WRITE_SPI(pSpiHw, SPI_CSR[cs], csr);
+
+ // Disable the SPI Peripheral
+ PERIPH_DISABLE(pSpid->spiId);
+}
+
+//------------------------------------------------------------------------------
+/// Starts a SPI master transfer. This is a non blocking function. It will
+/// return as soon as the transfer is started.
+/// Returns 0 if the transfer has been started successfully; otherwise returns
+/// SPID_ERROR_LOCK is the driver is in use, or SPID_ERROR if the command is not
+/// valid.
+/// \param pSpid Pointer to a Spid instance.
+/// \param pCommand Pointer to the SPI command to execute.
+//------------------------------------------------------------------------------
+unsigned char SPID_SendCommand(Spid *pSpid, SpidCmd *pCommand)
+{
+ AT91S_SPI *pSpiHw = pSpid->pSpiHw;
+ unsigned int spiMr;
+
+ // Try to get the dataflash semaphore
+ if (pSpid->semaphore == 0) {
+
+ return SPID_ERROR_LOCK;
+ }
+ pSpid->semaphore--;
+
+ // Enable the SPI Peripheral
+ PERIPH_ENABLE(pSpid->spiId);
+
+ // Disable PDC transmitter and receiver
+ WRITE_SPI(pSpiHw, SPI_PTCR, AT91C_PDC_RXTDIS | AT91C_PDC_TXTDIS);
+
+ // Write to the MR register
+ spiMr = READ_SPI(pSpiHw, SPI_MR);
+ spiMr |= AT91C_SPI_PCS;
+ spiMr &= ~((1 << pCommand->spiCs) << 16);
+ WRITE_SPI(pSpiHw, SPI_MR, spiMr);
+
+ // Initialize DMA controller using channel 0 for RX, 1 for TX.
+ configureDmaChannels();
+ configureLinkList(pSpiHw, pCommand);
+
+ // Initialize the callback
+ pSpid->pCurrentCommand = pCommand;
+
+ // Enable the SPI TX & RX
+ WRITE_SPI(pSpiHw, SPI_CR, AT91C_SPI_SPIEN);
+
+ // Start DMA 0(RX) && 1(TX)
+ DMA_EnableChannels((1 << DMA_CHANNEL_0) | (1 << DMA_CHANNEL_1));
+
+ // Enable DMA Interrupts
+ DMA_EnableIt( (DMA_CBTC << DMA_CHANNEL_0)
+ | (DMA_CBTC << DMA_CHANNEL_1));
+
+ return 0;
+}
+
+//------------------------------------------------------------------------------
+/// SPI DMA transfer ISR, Handle RX complete
+//------------------------------------------------------------------------------
+void SPID_Handler(Spid *pSpid)
+{
+ unsigned int dmaStatus;
+ SpidCmd *pSpidCmd = pSpid->pCurrentCommand;
+ AT91S_SPI *pSpiHw = pSpid->pSpiHw;
+
+ dmaStatus = DMA_GetStatus();
+
+ if ((dmaStatus & AT91C_CBTC) == 0)
+ return;
+
+ if ((dmaStatus & (DMA_CBTC << DMA_CHANNEL_0)) == 0)
+ return;
+
+ // Disable the SPI TX & RX
+ WRITE_SPI(pSpiHw, SPI_CR, AT91C_SPI_SPIDIS);
+ // Disable the SPI Peripheral
+ PERIPH_DISABLE(pSpid->spiId);
+
+ // Disable DMA
+ DMA_Disable();
+ // Disable DMA Peripheral
+ PERIPH_DISABLE(AT91C_ID_HDMA);
+
+ // Release the dataflash semaphore
+ pSpid->semaphore++;
+
+ // Invoke the callback associated with the current command
+ if (pSpidCmd && pSpidCmd->callback) {
+
+ pSpidCmd->callback(0, pSpidCmd->pArgument);
+ }
+
+}
+
+//------------------------------------------------------------------------------
+/// Returns 1 if the SPI driver is currently busy executing a command; otherwise
+/// returns 0.
+/// \param pSpid Pointer to a SPI driver instance.
+//------------------------------------------------------------------------------
+unsigned char SPID_IsBusy(const Spid *pSpid)
+{
+ if (pSpid->semaphore == 0) {
+
+ return 1;
+ }
+ else {
+
+ return 0;
+ }
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/atxmega128a1u_xplain_a1_mkii/conf_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/atxmega128a1u_xplain_a1_mkii/conf_board.h
new file mode 100644
index 0000000..a59fc85
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/atxmega128a1u_xplain_a1_mkii/conf_board.h
@@ -0,0 +1,43 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Board configuration for spi example
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H_INCLUDED
+#define CONF_BOARD_H_INCLUDED
+
+#define CONF_BOARD_ENABLE_SPEAKER
+
+#endif /* CONF_BOARD_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/atxmega128a1u_xplain_a1_mkii/conf_clock.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/atxmega128a1u_xplain_a1_mkii/conf_clock.h
new file mode 100644
index 0000000..7aa6a26
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/atxmega128a1u_xplain_a1_mkii/conf_clock.h
@@ -0,0 +1,73 @@
+/**
+ * \file
+ *
+ * \brief Clock system configuration for clock example 1
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_CLOCK_H_INCLUDED
+#define CONF_CLOCK_H_INCLUDED
+
+//! Configuration using On-Chip RC oscillator at 48MHz
+//! The RC oscillator is calibrated via USB Start Of Frame
+//! Clk USB = 48MHz (used by USB)
+//! Clk sys = 48MHz
+//! Clk cpu/per = 24MHz
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_RCOSC
+#define CONFIG_OSC_RC32_CAL 48000000UL
+
+#define CONFIG_OSC_AUTOCAL OSC_ID_RC32MHZ
+#define CONFIG_OSC_AUTOCAL_REF_OSC OSC_ID_USBSOF
+
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_RC32MHZ
+#define CONFIG_SYSCLK_PSADIV SYSCLK_PSADIV_2
+#define CONFIG_SYSCLK_PSBCDIV SYSCLK_PSBCDIV_1_1
+
+/*
+//! Use external board OSC (8MHz)
+//! Clk pll = 48MHz (used by USB)
+//! Clk sys = 48MHz
+//! Clk cpu/per = 24MHz
+
+#define CONFIG_PLL0_SOURCE PLL_SRC_XOSC
+#define CONFIG_PLL0_MUL 6
+#define CONFIG_PLL0_DIV 1
+
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL
+
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL
+#define CONFIG_SYSCLK_PSADIV SYSCLK_PSADIV_2
+#define CONFIG_SYSCLK_PSBCDIV SYSCLK_PSBCDIV_1_1
+*/
+
+#endif /* CONF_CLOCK_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/atxmega128a1u_xplain_a1_mkii/conf_example.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/atxmega128a1u_xplain_a1_mkii/conf_example.h
new file mode 100644
index 0000000..782a60b
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/atxmega128a1u_xplain_a1_mkii/conf_example.h
@@ -0,0 +1,52 @@
+/**
+ * \file
+ *
+ * \brief Board- and chip-specific example configuration
+ *
+ * Copyright (C) 2011 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H
+#define CONF_BOARD_H
+
+#include <compiler.h>
+#include <dac.h>
+
+// Refer to example documentation for details.
+
+//! \note This DAC is connected to Xplain's on-board amplifier and speaker.
+#define SPEAKER_DAC DACB
+
+//! \note This is the left channel of Xplain's on-board amplifier.
+#define SPEAKER_DAC_CHANNEL DAC_CH0
+
+#endif /* CONF_BOARD_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/atxmega128a1u_xplain_a1_mkii/conf_sleepmgr.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/atxmega128a1u_xplain_a1_mkii/conf_sleepmgr.h
new file mode 100644
index 0000000..699010d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/atxmega128a1u_xplain_a1_mkii/conf_sleepmgr.h
@@ -0,0 +1,43 @@
+/**
+ * \file
+ *
+ * \brief Sleep manager configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SLEEPMGR_H
+#define CONF_SLEEPMGR_H
+
+#define CONFIG_SLEEPMGR_ENABLE
+
+#endif /* CONF_SLEEPMGR_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/atxmega128a1u_xplain_a1_mkii/sample_processor.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/atxmega128a1u_xplain_a1_mkii/sample_processor.c
new file mode 100644
index 0000000..8c8e623
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/atxmega128a1u_xplain_a1_mkii/sample_processor.c
@@ -0,0 +1,96 @@
+/**
+ * \file
+ *
+ * \brief Audio sample processing functions
+ *
+ * Copyright (C) 2011 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "preprocessor.h"
+#include "board.h"
+#include "conf_example.h"
+#include "conf_usb.h"
+#include "gpio.h"
+#include "sample_processor.h"
+#include "dac.h"
+
+void sample_processor_init(void)
+{
+ /* Create DAC configuration:
+ * - 1V from bandgap as reference, left adjusted channel value
+ * - one active DAC channel, no internal output
+ * - conversions triggered by event channel 0
+ * - 1 us conversion intervals
+ */
+ struct dac_config dac_conf;
+ dac_set_conversion_parameters(&dac_conf, DAC_REF_BANDGAP, DAC_ADJ_LEFT);
+ dac_set_active_channel(&dac_conf, SPEAKER_DAC_CHANNEL, 0);
+ dac_set_conversion_trigger(&dac_conf, SPEAKER_DAC_CHANNEL, 0);
+ dac_set_conversion_interval(&dac_conf, 1);
+
+ dac_write_configuration(&SPEAKER_DAC, &dac_conf);
+ dac_enable(&SPEAKER_DAC);
+
+ // Configure timer/counter to generate events at sample rate.
+ sysclk_enable_module(SYSCLK_PORT_C, SYSCLK_TC0);
+ TCC0.PER = (sysclk_get_per_hz() / UDI_AUDIO_SAMPLE_RATE) - 1;
+
+ // Configure event channel 0 to generate events upon T/C overflow.
+ sysclk_enable_module(SYSCLK_PORT_GEN, SYSCLK_EVSYS);
+ EVSYS.CH0MUX = EVSYS_CHMUX_TCC0_OVF_gc;
+
+ // Start the timer/counter.
+ TCC0.CTRLA = TC_CLKSEL_DIV1_gc;
+}
+
+void sample_processor_output_samples(uint16_t *samples, uint8_t count)
+{
+ // Process each sample in the datastream
+ for (uint8_t i = 0; i < count; i += 2)
+ {
+ // Two channels (left and right) are encoded together to form a sample pair
+ int16_t sample_left = le16_to_cpu(samples[i]);
+ int16_t sample_right = le16_to_cpu(samples[i + 1]);
+
+ // Perform simple mono mixing of the two channels
+ int16_t sample_mono = ((sample_left >> 1) + (sample_right >> 1));
+
+ // Wait for the DAC to become ready to accept the next sample
+ dac_wait_for_channel_ready(&SPEAKER_DAC, SPEAKER_DAC_CHANNEL);
+
+ // Output mixed sample - output should be unsigned, so we have to offset half the
+ // total range (flip highest bit) to get the correct sample value for the DAC
+ dac_set_channel_value(&SPEAKER_DAC, SPEAKER_DAC_CHANNEL, sample_mono ^ (1 << 15));
+ }
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/atxmega128a1u_xplain_a1_mkii/ui.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/atxmega128a1u_xplain_a1_mkii/ui.c
new file mode 100644
index 0000000..b27ae63
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/atxmega128a1u_xplain_a1_mkii/ui.c
@@ -0,0 +1,84 @@
+/**
+ * \file
+ *
+ * \brief User Interface
+ *
+ * Copyright (C) 2011 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "udi_audio.h"
+#include "board.h"
+#include "led.h"
+#include "ui.h"
+
+void ui_init(void)
+{
+ LED_Off(LEDUSB_GPIO);
+}
+
+void ui_powerdown(void)
+{
+
+}
+
+void ui_wakeup(void)
+{
+
+}
+
+void ui_stream_enabled(void)
+{
+ LED_On(LEDUSB_GPIO);
+}
+
+void ui_stream_disabled(void)
+{
+ LED_Off(LEDUSB_GPIO);
+}
+
+void ui_process(uint16_t framenumber)
+{
+
+}
+
+/**
+ * \defgroup UI User Interface
+ *
+ * Human interface on Xplain-A1-MKII:
+ * - RED led close to USB connector is on when host has selected enabled the audio stream
+ * - Leds on left side of board show magnitude of left channel audio
+ * - Leds on right side of board show magnitude of right channel audio
+ *
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/conf_usb.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/conf_usb.h
new file mode 100644
index 0000000..6523bbb
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/conf_usb.h
@@ -0,0 +1,129 @@
+/**
+ * \file
+ *
+ * \brief USB configuration file
+ *
+ * Copyright (C) 2011 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _CONF_USB_H_
+#define _CONF_USB_H_
+
+#define _ASSERT_ENABLE_
+
+#include "compiler.h"
+
+
+/**
+ * USB Device Configuration
+ * @{
+ */
+
+//! Device definition (mandatory)
+#define USB_DEVICE_VENDOR_ID USB_VID_ATMEL
+#define USB_DEVICE_PRODUCT_ID USB_PID_ATMEL_AVR_AUDIO_SPEAKER
+#define USB_DEVICE_MAJOR_VERSION 1
+#define USB_DEVICE_MINOR_VERSION 6
+#define USB_DEVICE_POWER 100 // Consumption on Vbus line (mA)
+#define USB_DEVICE_ATTR \
+ (USB_CONFIG_ATTR_SELF_POWERED)
+// (USB_CONFIG_ATTR_BUS_POWERED)
+// (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_SELF_POWERED)
+// (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_BUS_POWERED)
+
+//! USB Device string definitions (Optional)
+#define USB_DEVICE_MANUFACTURE_NAME "ATMEL AVR"
+#define USB_DEVICE_PRODUCT_NAME "Audio 1.0 Device"
+// #define USB_DEVICE_SERIAL_NAME "12...EF"
+
+/**
+ * Device speeds support
+ * Low speed not supported by Audio 1.0
+ * @{
+ */
+//! To authorize the High speed
+#if (UC3A3||UC3A4)
+ #define USB_DEVICE_HS_SUPPORT
+#endif
+//@}
+
+
+/**
+ * USB Device Callbacks definitions (Optional)
+ * @{
+ */
+#define UDC_VBUS_EVENT(b_vbus_high) main_vbus_action(b_vbus_high)
+#define UDC_SOF_EVENT() main_sof_action()
+#define UDC_SUSPEND_EVENT() main_suspend_action()
+#define UDC_RESUME_EVENT() main_resume_action()
+//! Mandatory when USB_DEVICE_ATTR authorizes remote wakeup feature
+// #define UDC_REMOTEWAKEUP_ENABLE() user_callback_remotewakeup_enable()
+// #define UDC_REMOTEWAKEUP_DISABLE() user_callback_remotewakeup_disable()
+//! When a extra string descriptor must be supported
+//! other than manufacturer, product and serial string
+// #define UDC_GET_EXTRA_STRING()
+//@}
+
+//@}
+
+
+/**
+ * USB Interface Configuration
+ * @{
+ */
+
+/**
+ * Configuration of Audio interface
+ * @{
+ */
+
+//! Interface callback definition
+#define UDI_AUDIO_ENABLE_EXT() main_audio_enable()
+#define UDI_AUDIO_DISABLE_EXT() main_audio_disable()
+#define UDI_AUDIO_PROCESS_EXT(data, len) main_audio_out_process(data, len)
+//@}
+
+//@}
+
+
+/**
+ * USB Device Driver Configuration
+ * @{
+ */
+//@}
+
+//! The includes of classes and other headers must be done at the end of this file to avoid compile error
+#include "udi_audio_conf.h"
+#include "main.h"
+
+#endif // _CONF_USB_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/main.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/main.c
new file mode 100644
index 0000000..990a90d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/main.c
@@ -0,0 +1,183 @@
+/**
+ * \file
+ *
+ * \brief Main functions for Audio example
+ *
+ * Copyright (C) 2011 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "preprocessor.h"
+#include "board.h"
+#include "gpio.h"
+#include "sysclk.h"
+#include "sleepmgr.h"
+#include "conf_usb.h"
+#include "conf_example.h"
+#include "udd.h"
+#include "udc.h"
+#include "udi_audio.h"
+#include "ui.h"
+#include "sample_processor.h"
+
+static bool main_b_audio_enable = false;
+
+
+/*! \brief Main function. Execution starts here.
+ */
+int main(void)
+{
+ irq_initialize_vectors();
+ cpu_irq_enable();
+
+ // Initialize the sleep manager
+ sleepmgr_init();
+
+ sysclk_init();
+ board_init();
+ ui_init();
+ ui_powerdown();
+
+ // Initialize the sample processor module ready to receive samples
+ sample_processor_init();
+
+ // Start USB stack to authorize VBus monitoring
+ udc_start();
+
+ if (!udc_include_vbus_monitoring()) {
+ // VBUS monitoring is not available on this product
+ // thereby VBUS has to be considered as present
+ main_vbus_action(true);
+ }
+ // The main loop manages only the power mode
+ // because the USB management is done by interrupt
+ while (true) {
+ sleepmgr_enter_sleep();
+ if (main_b_audio_enable
+ && udi_audio_stream_get_feature_cur(AUDIO_FEATURE_MUTE) == false) {
+ udi_audio_process();
+ }
+ }
+}
+
+
+void main_vbus_action(bool b_high)
+{
+ if (b_high) {
+ // Attach USB Device
+ udc_attach();
+ } else {
+ // VBUS not present
+ udc_detach();
+ }
+}
+
+void main_suspend_action(void)
+{
+ ui_powerdown();
+}
+
+void main_resume_action(void)
+{
+ ui_wakeup();
+}
+
+void main_sof_action(void)
+{
+ if (!main_b_audio_enable)
+ return;
+ ui_process(udd_get_frame_number());
+}
+
+bool main_audio_enable(void)
+{
+ main_b_audio_enable = true;
+ ui_stream_enabled();
+ return true;
+}
+
+void main_audio_disable(void)
+{
+ main_b_audio_enable = false;
+ ui_stream_disabled();
+}
+
+void main_audio_out_process(uint8_t *data, uint16_t count)
+{
+ // Samples are encoded as 16-bit signed values in the datastream
+ uint16_t *samples = (uint16_t*)data;
+
+ // Since each sample is 16-bit, need to halve length to get sample count
+ uint8_t sample_count = count / 2;
+
+ // Hand off received samples to the board sample processor
+ sample_processor_output_samples(samples, sample_count);
+}
+
+/**
+ * \mainpage ASF USB Device Audio 1.0
+ *
+ * \section intro Introduction
+ * This example shows how to implement a USB Device Audio 1.0
+ * on AVR products with USB module.
+ *
+ * \section startup Startup
+ * The example uses the speaker and amplifier available on the board.
+ * After loading firmware, connect hardware board to the USB Host.
+ * When connected to a USB host system this application provides an audio output
+ * device in the Unix/Mac/Windows operating systems.
+ *
+ * \note
+ * This example uses the native Audio driver on Unix/Mac/Windows OS.
+ *
+ * \copydoc UI
+ *
+ * \section example About example
+ *
+ * The example uses the following module groups:
+ * - Basic modules:
+ * Startup, board, clock, interrupt, power management
+ * - USB Device stack and Audio modules:
+ * <br>services/usb/
+ * <br>services/usb/udc/
+ * <br>services/usb/class/audio/
+ * - Specific implementation:
+ * - main.c,
+ * <br>initializes clock
+ * <br>initializes interrupt
+ * <br>\subpage power_management
+ * <br>manages UI
+ * - specific implementation for each target "./examples/product_board/":
+ * - conf_foo.h configuration of each module
+ * - ui.c implement of user's interface (leds)
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/main.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/main.h
new file mode 100644
index 0000000..094d0ad
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/main.h
@@ -0,0 +1,86 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief Declaration of main function used by Audio example
+ *
+ * - Compiler: IAR EWAVR and GNU GCC for AVR
+ * - Supported devices: All AVR devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2011 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _MAIN_H_
+#define _MAIN_H_
+
+/*! \brief Called by Audio interface
+ * Callback running when USB Host enable Audio interface
+ *
+ * \retval true if Audio startup is ok
+ */
+bool main_audio_enable(void);
+
+/*! \brief Called by Audio interface
+ * Callback running when USB Host disable Audio interface
+ */
+void main_audio_disable(void);
+
+/*! \brief Called by Audio Interface
+ * Callback running when USB Host sends audio samples to the device
+ *
+ * \param data Sample data received from the host
+ * \param count Length of sample data, in bytes
+ */
+void main_audio_out_process(uint8_t *data, uint16_t count);
+
+/*! \brief Called when Vbus line state change
+ */
+void main_vbus_action(bool b_high);
+
+/*! \brief Called when a start of frame is received on USB line
+ */
+void main_sof_action(void);
+
+/*! \brief Called by UDD when a suspend is received
+ * Callback running when USB Host set USB line in suspend state
+ */
+void main_suspend_action(void);
+
+/*! \brief Called by UDD when the USB line exit of suspend state
+ */
+void main_resume_action(void);
+
+#endif // _MAIN_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/sample_processor.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/sample_processor.h
new file mode 100644
index 0000000..3ce5691
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/sample_processor.h
@@ -0,0 +1,56 @@
+/**
+ * \file
+ *
+ * \brief Audio sample processing functions
+ *
+ * Copyright (C) 2011 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef _SAMPLE_PROCESSOR_
+#define _SAMPLE_PROCESSOR_
+
+/*! \brief Called by main to initialize sample processor
+ * Function to initialize the sample processor unit, ready to receive and
+ * process/output incomming audio samples from a USB host.
+ */
+void sample_processor_init(void);
+
+/*! \brief Called by main to process new sample data
+ * Function to process received audio samples, outputting them to the desired
+ * output device (such as a DAC connected to a speaker).
+ *
+ * \param sample Received sample data for the audio stream
+ * \param count Number of samples stored in the buffer to be processed
+ */
+void sample_processor_output_samples(uint16_t *samples, uint8_t count);
+
+#endif // _SAMPLE_PROCESSOR_ \ No newline at end of file
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/udi_audio_conf.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/udi_audio_conf.h
new file mode 100644
index 0000000..ce8351b
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/udi_audio_conf.h
@@ -0,0 +1,90 @@
+/**
+ * \file
+ *
+ * \brief Default Audio 1.0 configuration for a USB Device
+ * with a single interface MSC
+ *
+ * Copyright (C) 2011 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _UDI_AUDIO_CONF_H_
+#define _UDI_AUDIO_CONF_H_
+
+/**
+ * \ingroup udi_audio_group
+ * \defgroup udi_audio_group_conf Default Audio 1.0 configuration for a USB Device
+ *
+ * @{
+ */
+
+//! Control endpoint size
+#define USB_DEVICE_EP_CTRL_SIZE 64
+
+//! Audio stream direction configuration
+//#define UDI_AUDIO_ENABLE_AUDIO_IN
+#define UDI_AUDIO_ENABLE_AUDIO_OUT
+
+//! Audio stream format configuration
+//@{
+#define UDI_AUDIO_SAMPLE_RATE 44000
+#define UDI_AUDIO_SAMPLE_BITS 16
+#define UDI_AUDIO_SAMPLE_SIZE_BYTES 2
+#define UDI_AUDIO_SAMPLE_CHANNELS 2
+//@}
+
+//! Audio stream feature configuration
+#define UDI_AUDIO_FEATURES AUDIO_FEATURE_MUTE
+#define UDI_AUDIO_MUTE_FEATURE_DEFAULT false
+#define UDI_AUDIO_VOLUME_FEATURE_MIN 0
+#define UDI_AUDIO_VOLUME_FEATURE_MAX 0
+#define UDI_AUDIO_VOLUME_FEATURE_DEFAULT 0
+
+//! Endpoint numbers used by Audio interface
+#define UDI_AUDIO_EP_IN (5 | USB_EP_DIR_IN)
+#define UDI_AUDIO_EP_OUT (6 | USB_EP_DIR_OUT)
+
+#define UDI_AUDIO_IFACE_CONTROL_NUMBER 0
+#define UDI_AUDIO_IFACE_DATA_NUMBER 1
+
+/**
+ * \name UDD Configuration
+ */
+//@{
+#define USB_DEVICE_MAX_EP 6
+//@}
+
+//@}
+
+#include "udi_audio.h"
+
+#endif // _UDI_AUDIO_CONF_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/ui.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/ui.h
new file mode 100644
index 0000000..2e4b783
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/example/ui.h
@@ -0,0 +1,59 @@
+/**
+ * \file
+ *
+ * \brief Common User Interface for Audio application
+ *
+ * Copyright (C) 2011 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _UI_H_
+#define _UI_H_
+
+void ui_init(void);
+void ui_powerdown(void);
+void ui_wakeup(void);
+
+//! Called by the Audio driver when the audio stream is enabled by the host.
+void ui_stream_enabled(void);
+
+//! Called by the Audio driver when the audio stream is disabled by the host.
+void ui_stream_disabled(void);
+
+//! This process is called called each 1ms
+//! It is called only if Audio interface is enable.
+//! It is called by SOF interrupt.
+//!
+//!
+void ui_process(uint16_t framenumber);
+
+#endif // _UI_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/module_config/conf_usb.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/module_config/conf_usb.h
new file mode 100644
index 0000000..c3a8249
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/module_config/conf_usb.h
@@ -0,0 +1,127 @@
+/**
+ * \file
+ *
+ * \brief USB configuration file
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _CONF_USB_H_
+#define _CONF_USB_H_
+
+#include "compiler.h"
+
+
+/**
+ * USB Device Configuration
+ * @{
+ */
+
+//! Device definition (mandatory)
+#define USB_DEVICE_VENDOR_ID USB_VID_ATMEL
+#define USB_DEVICE_PRODUCT_ID USB_PID_ATMEL_AVR_AUDIO_SPEAKER
+#define USB_DEVICE_MAJOR_VERSION 1
+#define USB_DEVICE_MINOR_VERSION 0
+#define USB_DEVICE_POWER 100 // Consumption on Vbus line (mA)
+#define USB_DEVICE_ATTR \
+ (USB_CONFIG_ATTR_SELF_POWERED)
+// (USB_CONFIG_ATTR_BUS_POWERED)
+// (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_SELF_POWERED)
+// (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_BUS_POWERED)
+
+//! USB Device string definitions (Optional)
+// #define USB_DEVICE_MANUFACTURE_NAME "Manufacture name"
+// #define USB_DEVICE_PRODUCT_NAME "Product name"
+// #define USB_DEVICE_SERIAL_NAME "12...EF"
+
+/**
+ * Device speeds support
+ * Low speed not supported by Audio 1.0
+ * @{
+ */
+//! To authorize the High speed
+#if (UC3A3||UC3A4)
+ #define USB_DEVICE_HS_SUPPORT
+#endif
+//@}
+
+
+/**
+ * USB Device Callbacks definitions (Optional)
+ * @{
+ */
+// #define UDC_VBUS_EVENT(b_vbus_high) user_callback_vbus_action(b_vbus_high)
+// #define UDC_SOF_EVENT() user_callback_sof_action()
+// #define UDC_SUSPEND_EVENT() user_callback_suspend_action()
+// #define UDC_RESUME_EVENT() user_callback_resume_action()
+//! Mandatory when USB_DEVICE_ATTR authorizes remote wakeup feature
+// #define UDC_REMOTEWAKEUP_ENABLE() user_callback_remotewakeup_enable()
+// #define UDC_REMOTEWAKEUP_DISABLE() user_callback_remotewakeup_disable()
+//! When a extra string descriptor must be supported
+//! other than manufacturer, product and serial string
+// #define UDC_GET_EXTRA_STRING()
+//@}
+
+//@}
+
+
+/**
+ * USB Interface Configuration
+ * @{
+ */
+
+/**
+ * Configuration of Audio interface
+ * @{
+ */
+
+//! Interface callback definition
+#define UDI_AUDIO_ENABLE_EXT() true
+#define UDI_AUDIO_DISABLE_EXT()
+#define UDI_AUDIO_PROCESS_EXT(data, len)
+//@}
+
+//@}
+
+
+/**
+ * USB Device Driver Configuration
+ * @{
+ */
+//@}
+
+//! The includes of classes and other headers must be done at the end of this file to avoid compile error
+#include "udi_audio_conf.h"
+#include "main.h"
+
+#endif // _CONF_USB_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/udi_audio.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/udi_audio.c
new file mode 100644
index 0000000..1db889c
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/udi_audio.c
@@ -0,0 +1,507 @@
+/**
+ * \file
+ *
+ * \brief USB Device Audio 1.0 interface.
+ *
+ * Copyright (C) 2011 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "conf_usb.h"
+#include "usb_protocol.h"
+#include "usb_protocol_audio.h"
+#include "udd.h"
+#include "udc.h"
+#include "udi_audio.h"
+#include <string.h>
+
+#define UDI_AUDIO_NUM_BUFFERS 4
+
+/**
+ * \addtogroup udi_audio_group
+ *
+ * @{
+ */
+
+/**
+ * \name Interface for UDC
+ */
+//@{
+
+bool udi_audio_control_enable(void);
+void udi_audio_control_disable(void);
+bool udi_audio_control_setup(void);
+bool udi_audio_stream_enable(void);
+void udi_audio_stream_disable(void);
+bool udi_audio_stream_setup(void);
+uint8_t udi_audio_control_getsetting(void);
+uint8_t udi_audio_stream_getsetting(void);
+static void udi_audio_stream_feature_changed(void);
+#ifdef UDI_AUDIO_ENABLE_AUDIO_OUT
+static bool udi_audio_stream_out_start(void);
+static void udi_audio_stream_out_stop(void);
+static void udi_audio_stream_samples_received(udd_ep_status_t status, iram_size_t n);
+#endif
+#ifdef UDI_AUDIO_ENABLE_AUDIO_IN
+static bool udi_audio_stream_in_start(void);
+static void udi_audio_stream_in_stop(void);
+static void udi_audio_stream_samples_sent(udd_ep_status_t status, iram_size_t n);
+#endif
+
+static uint8_t udi_audio_stream_buf_state[UDI_AUDIO_NUM_BUFFERS];
+static uint8_t udi_audio_stream_buf[UDI_AUDIO_NUM_BUFFERS][UDI_AUDIO_EPS_SIZE];
+static uint16_t udi_audio_stream_buf_len[UDI_AUDIO_NUM_BUFFERS];
+static uint8_t udi_audio_buf_write_index = 0;
+static uint8_t udi_audio_buf_read_index = 0;
+#if UDI_AUDIO_FEATURES & AUDIO_FEATURE_VOLUME
+static int16_t udi_audio_cur_volume = 0x0000;
+static int16_t udi_audio_min_volume = 0x0000;
+static int16_t udi_audio_max_volume = 0x7FFF;
+static int16_t udi_audio_res_volume = 0x0001;
+#endif
+#if UDI_AUDIO_FEATURES & AUDIO_FEATURE_MUTE
+static uint8_t udi_audio_cur_mute = false;
+#endif
+
+//! Global structure which contains standard UDI API for UDC
+UDC_DESC_STORAGE udi_api_t udi_api_audio_control = {
+ .enable = udi_audio_control_enable,
+ .disable = udi_audio_control_disable,
+ .setup = udi_audio_control_setup,
+ .getsetting = udi_audio_control_getsetting,
+};
+
+UDC_DESC_STORAGE udi_api_t udi_api_audio_data = {
+ .enable = udi_audio_stream_enable,
+ .disable = udi_audio_stream_disable,
+ .setup = udi_audio_stream_setup,
+ .getsetting = udi_audio_stream_getsetting,
+};
+
+//@}
+
+static uint8_t udi_audio_data_alt_setting = 0;
+
+/**
+ * \name Internal routines
+ */
+//@{
+
+bool udi_audio_control_enable(void)
+{
+ return true;
+}
+
+void udi_audio_control_disable(void)
+{
+ // Do nothing - control interface has no endpoints to manage
+}
+
+bool udi_audio_control_setup(void)
+{
+ if (Udd_setup_is_in()) {
+ // GET Interface Requests
+ if (Udd_setup_type() == USB_REQ_TYPE_CLASS) {
+ // Requests Class Interface Get
+ switch (udd_g_ctrlreq.req.bRequest) {
+ case USB_REQ_AUDIO_GET_MIN:
+ switch (udd_g_ctrlreq.req.wValue >> 8) {
+#if UDI_AUDIO_FEATURES & AUDIO_FEATURE_VOLUME
+ case AUDIO_CONTROL_VOLUME:
+ udd_g_ctrlreq.payload =
+ (uint8_t *) &
+ udi_audio_min_volume;
+ udd_g_ctrlreq.payload_size =
+ sizeof(udi_audio_min_volume);
+ return true;
+#endif
+ }
+ break;
+ case USB_REQ_AUDIO_GET_MAX:
+ switch (udd_g_ctrlreq.req.wValue >> 8) {
+#if UDI_AUDIO_FEATURES & AUDIO_FEATURE_VOLUME
+ case AUDIO_CONTROL_VOLUME:
+ udd_g_ctrlreq.payload =
+ (uint8_t *) &
+ udi_audio_max_volume;
+ udd_g_ctrlreq.payload_size =
+ sizeof(udi_audio_max_volume);
+ return true;
+#endif
+ }
+ break;
+ case USB_REQ_AUDIO_GET_CUR:
+ switch (udd_g_ctrlreq.req.wValue >> 8) {
+#if UDI_AUDIO_FEATURES & AUDIO_FEATURE_VOLUME
+ case AUDIO_CONTROL_VOLUME:
+ udd_g_ctrlreq.payload =
+ (uint8_t *) &
+ udi_audio_cur_volume;
+ udd_g_ctrlreq.payload_size =
+ sizeof(udi_audio_cur_volume);
+ return true;
+#endif
+#if UDI_AUDIO_FEATURES & AUDIO_FEATURE_MUTE
+ case AUDIO_CONTROL_MUTE:
+ udd_g_ctrlreq.payload =
+ (uint8_t *) &
+ udi_audio_cur_mute;
+ udd_g_ctrlreq.payload_size =
+ sizeof(udi_audio_cur_mute);
+ return true;
+#endif
+ }
+ break;
+ case USB_REQ_AUDIO_GET_RES:
+ switch (udd_g_ctrlreq.req.wValue >> 8) {
+#if UDI_AUDIO_FEATURES & AUDIO_FEATURE_VOLUME
+ case AUDIO_CONTROL_VOLUME:
+ udd_g_ctrlreq.payload =
+ (uint8_t *) &
+ udi_audio_res_volume;
+ udd_g_ctrlreq.payload_size =
+ sizeof(udi_audio_res_volume);
+ return true;
+#endif
+ }
+ break;
+ }
+ }
+ }
+ if (Udd_setup_is_out()) {
+ // SET Interface Requests
+ if (Udd_setup_type() == USB_REQ_TYPE_CLASS) {
+ // Requests Class Interface Set
+ switch (udd_g_ctrlreq.req.bRequest) {
+ case USB_REQ_AUDIO_SET_CUR:
+ switch (udd_g_ctrlreq.req.wValue >> 8) {
+#if UDI_AUDIO_FEATURES & AUDIO_FEATURE_VOLUME
+ case AUDIO_CONTROL_VOLUME:
+ udd_g_ctrlreq.payload =
+ (uint8_t *) &
+ udi_audio_cur_volume;
+ udd_g_ctrlreq.payload_size =
+ sizeof(udi_audio_cur_volume);
+ udd_g_ctrlreq.callback = udi_audio_stream_feature_changed;
+ return true;
+#endif
+#if UDI_AUDIO_FEATURES & AUDIO_FEATURE_MUTE
+ case AUDIO_CONTROL_MUTE:
+ udd_g_ctrlreq.payload =
+ (uint8_t *) &
+ udi_audio_cur_mute;
+ udd_g_ctrlreq.payload_size =
+ sizeof(udi_audio_cur_mute);
+ udd_g_ctrlreq.callback = udi_audio_stream_feature_changed;
+ return true;
+#endif
+ }
+ break;
+ }
+ }
+ }
+
+ return false;
+}
+
+bool udi_audio_stream_enable(void)
+{
+ usb_iface_desc_t *current_interface_selected;
+ current_interface_selected = udc_get_interface_desc();
+
+ udi_audio_data_alt_setting = current_interface_selected->bAlternateSetting;
+
+ udi_audio_buf_read_index = 0;
+ udi_audio_buf_write_index = 0;
+
+#ifdef UDI_AUDIO_ENABLE_AUDIO_IN
+ if (udi_audio_data_alt_setting) {
+ if (!udi_audio_stream_in_start())
+ return false;
+
+ UDI_AUDIO_ENABLE_EXT();
+ }
+ else {
+ udi_audio_stream_in_stop();
+
+ UDI_AUDIO_DISABLE_EXT();
+ }
+#endif
+
+#ifdef UDI_AUDIO_ENABLE_AUDIO_OUT
+ if (udi_audio_data_alt_setting) {
+ if (!udi_audio_stream_out_start())
+ return false;
+
+ UDI_AUDIO_ENABLE_EXT();
+ }
+ else {
+ udi_audio_stream_out_stop();
+
+ UDI_AUDIO_DISABLE_EXT();
+ }
+#endif
+
+ return true;
+}
+
+void udi_audio_stream_disable(void)
+{
+ udi_audio_data_alt_setting = 0;
+ UDI_AUDIO_DISABLE_EXT();
+}
+
+bool udi_audio_stream_setup(void)
+{
+ return false;
+}
+
+uint8_t udi_audio_control_getsetting(void)
+{
+ // No alternative setting for the Audio control interface
+ return 0;
+}
+
+uint8_t udi_audio_stream_getsetting(void)
+{
+ // Return if the audio stream is enabled or not (enabled when alt setting != 0)
+ return udi_audio_data_alt_setting;
+}
+
+void udi_audio_process(void)
+{
+#ifdef UDI_AUDIO_ENABLE_AUDIO_OUT
+ if (udi_audio_stream_buf_state[udi_audio_buf_write_index] == AUDIO_BUFFER_IDLE) {
+ udi_audio_stream_out_start();
+ }
+
+ if (udi_audio_stream_buf_state[udi_audio_buf_read_index] == AUDIO_BUFFER_FULL) {
+ UDI_AUDIO_PROCESS_EXT(udi_audio_stream_buf[udi_audio_buf_read_index],
+ udi_audio_stream_buf_len[udi_audio_buf_read_index]);
+
+ udi_audio_stream_buf_state[udi_audio_buf_read_index] = AUDIO_BUFFER_IDLE;
+ udi_audio_stream_buf_len[udi_audio_buf_read_index] = 0;
+ udi_audio_buf_read_index = (udi_audio_buf_read_index + 1) % UDI_AUDIO_NUM_BUFFERS;
+ }
+#endif
+
+#ifdef UDI_AUDIO_ENABLE_AUDIO_IN
+ if (udi_audio_stream_buf_state[udi_audio_buf_read_index] == AUDIO_BUFFER_FULL) {
+ udi_audio_stream_in_start();
+ }
+#endif
+}
+
+void udi_audio_stream_set_feature_min(uint16_t feature, uint16_t value)
+{
+ switch (feature)
+ {
+#if UDI_AUDIO_FEATURES & AUDIO_FEATURE_VOLUME
+ case AUDIO_CONTROL_VOLUME:
+ udi_audio_min_volume = value;
+ break;
+#endif
+ }
+
+ udi_audio_stream_feature_changed();
+}
+
+void udi_audio_stream_set_feature_max(uint16_t feature, uint16_t value)
+{
+ switch (feature)
+ {
+#if UDI_AUDIO_FEATURES & AUDIO_FEATURE_VOLUME
+ case AUDIO_CONTROL_VOLUME:
+ udi_audio_max_volume = value;
+ break;
+#endif
+ }
+
+ udi_audio_stream_feature_changed();
+}
+
+void udi_audio_stream_set_feature_res(uint16_t feature, uint16_t value)
+{
+ switch (feature)
+ {
+#if UDI_AUDIO_FEATURES & AUDIO_FEATURE_VOLUME
+ case AUDIO_CONTROL_VOLUME:
+ udi_audio_res_volume = value;
+ break;
+#endif
+ }
+
+ udi_audio_stream_feature_changed();
+}
+
+void udi_audio_stream_set_feature_cur(uint16_t feature, uint16_t value)
+{
+ switch (feature)
+ {
+#if UDI_AUDIO_FEATURES & AUDIO_FEATURE_VOLUME
+ case AUDIO_CONTROL_VOLUME:
+ udi_audio_cur_volume = value;
+ break;
+#endif
+ }
+
+ udi_audio_stream_feature_changed();
+}
+
+uint16_t udi_audio_stream_get_feature_cur(uint16_t feature)
+{
+ switch (feature)
+ {
+#if UDI_AUDIO_FEATURES & AUDIO_FEATURE_VOLUME
+ case AUDIO_CONTROL_VOLUME:
+ return udi_audio_cur_volume;
+#endif
+#if UDI_AUDIO_FEATURES & AUDIO_FEATURE_MUTE
+ case AUDIO_CONTROL_MUTE:
+ return udi_audio_cur_mute;
+#endif
+ }
+
+ return 0;
+}
+
+#ifdef UDI_AUDIO_ENABLE_AUDIO_IN
+bool udi_audio_stream_samples_send(uint8_t* buffer, uint8_t length)
+{
+ while (!(udi_audio_stream_buf_state[udi_audio_buf_write_index] == AUDIO_BUFFER_IDLE)) {};
+
+ memcpy(udi_audio_stream_buf[udi_audio_buf_write_index], buffer, length);
+
+ udi_audio_stream_buf_len[udi_audio_buf_write_index] = length;
+ udi_audio_stream_buf_state[udi_audio_buf_write_index] = AUDIO_BUFFER_FULL;
+ udi_audio_buf_write_index = (udi_audio_buf_write_index + 1) % UDI_AUDIO_NUM_BUFFERS;
+
+ if (udi_audio_stream_buf_state[udi_audio_buf_read_index] == AUDIO_BUFFER_FULL) {
+ udi_audio_stream_in_start();
+ }
+
+ return true;
+}
+#endif
+
+//-------------------------------------------------
+//------- Internal routines to process data transfer
+
+static void udi_audio_stream_feature_changed(void)
+{
+#if UDI_AUDIO_FEATURES & AUDIO_FEATURE_VOLUME
+ if (udi_audio_curr_volume < udi_audio_min_volume) {
+ udi_audio_curr_volume = udi_audio_min_volume;
+ }
+ else if (udi_audio_curr_volume > udi_audio_max_volume) {
+ udi_audio_curr_volume = udi_audio_max_volume;
+ }
+#endif
+}
+
+#ifdef UDI_AUDIO_ENABLE_AUDIO_IN
+static void udi_audio_stream_samples_sent(udd_ep_status_t status, iram_size_t n)
+{
+ if (UDD_EP_TRANSFER_OK != status) {
+ // Abort reception
+ udi_audio_stream_buf_state[udi_audio_buf_read_index] = AUDIO_BUFFER_IDLE;
+ return;
+ }
+
+ udi_audio_stream_buf_state[udi_audio_buf_read_index] = AUDIO_BUFFER_IDLE;
+ udi_audio_stream_buf_len[udi_audio_buf_read_index] = n;
+ udi_audio_buf_read_index = (udi_audio_buf_read_index + 1) % UDI_AUDIO_NUM_BUFFERS;
+
+ if (udi_audio_stream_buf_state[udi_audio_buf_read_index] == AUDIO_BUFFER_FULL) {
+ udi_audio_stream_in_start();
+ }
+}
+
+static bool udi_audio_stream_in_start(void)
+{
+ if (!udd_ep_run(UDI_AUDIO_EP_IN,
+ true,
+ udi_audio_stream_buf[udi_audio_buf_read_index],
+ udi_audio_stream_buf_len[udi_audio_buf_read_index],
+ udi_audio_stream_samples_sent)) {
+ return false;
+ }
+
+ udi_audio_stream_buf_state[udi_audio_buf_read_index] = AUDIO_BUFFER_BUSY;
+ return true;
+}
+
+static void udi_audio_stream_in_stop(void)
+{
+ udd_ep_abort(UDI_AUDIO_EP_IN);
+}
+#endif
+
+#ifdef UDI_AUDIO_ENABLE_AUDIO_OUT
+static void udi_audio_stream_samples_received(udd_ep_status_t status, iram_size_t n)
+{
+ if (UDD_EP_TRANSFER_OK != status) {
+ // Abort reception
+ udi_audio_stream_buf_state[udi_audio_buf_write_index] = AUDIO_BUFFER_IDLE;
+ return;
+ }
+
+ udi_audio_stream_buf_state[udi_audio_buf_write_index] = AUDIO_BUFFER_FULL;
+ udi_audio_stream_buf_len[udi_audio_buf_write_index] = n;
+ udi_audio_buf_write_index = (udi_audio_buf_write_index + 1) % UDI_AUDIO_NUM_BUFFERS;
+
+ if (udi_audio_stream_buf_state[udi_audio_buf_write_index] == AUDIO_BUFFER_IDLE) {
+ udi_audio_stream_out_start();
+ }
+}
+
+static bool udi_audio_stream_out_start(void)
+{
+ if (!udd_ep_run(UDI_AUDIO_EP_OUT,
+ true,
+ udi_audio_stream_buf[udi_audio_buf_write_index],
+ UDI_AUDIO_EPS_SIZE,
+ udi_audio_stream_samples_received)) {
+ return false;
+ }
+
+ udi_audio_stream_buf_state[udi_audio_buf_write_index] = AUDIO_BUFFER_BUSY;
+ return true;
+}
+
+static void udi_audio_stream_out_stop(void)
+{
+ udd_ep_abort(UDI_AUDIO_EP_OUT);
+}
+#endif
+
+//@}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/udi_audio.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/udi_audio.h
new file mode 100644
index 0000000..8218dc0
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/udi_audio.h
@@ -0,0 +1,422 @@
+/**
+ * \file
+ *
+ * \brief USB Device Audio 1.0 Class interface definitions.
+ *
+ * Copyright (C) 2011 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _UDI_AUDIO_H_
+#define _UDI_AUDIO_H_
+
+#include "conf_usb.h"
+#include "usb_protocol.h"
+#include "usb_protocol_audio.h"
+#include "udd.h"
+#include "udc_desc.h"
+#include "udi.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * \ingroup udi_group
+ * \defgroup udi_msc_group UDI for Audio 1.0 Class
+ *
+ * @{
+ */
+
+//! Internal Audio driver buffer states
+enum udi_audio_buff_states {
+ AUDIO_BUFFER_IDLE,
+ AUDIO_BUFFER_BUSY,
+ AUDIO_BUFFER_FULL
+};
+
+/**
+ * \name Interface Descriptor
+ *
+ * The following structures provide the interface descriptor.
+ * It must be implemented in USB configuration descriptor.
+ */
+//@{
+
+//! Interface descriptor struture for Audio control
+typedef struct {
+ usb_iface_desc_t iface;
+ usb_audio_ifacecspc_desc_t iface_spc;
+#ifdef UDI_AUDIO_ENABLE_AUDIO_IN
+ usb_audio_input_terminal_desc_t interm_audio_in;
+ usb_audio_feature_desc_t feature_unit;
+ usb_audio_output_terminal_desc_t outterm_audio_in;
+#endif
+#ifdef UDI_AUDIO_ENABLE_AUDIO_OUT
+ usb_audio_input_terminal_desc_t interm_audio_out;
+ usb_audio_feature_desc_t feature_unit;
+ usb_audio_output_terminal_desc_t outterm_audio_out;
+#endif
+} udi_audio_control_desc_t;
+
+//! Interface descriptor struture for Audio streaming data
+typedef struct {
+ usb_iface_desc_t iface_alt0;
+ usb_iface_desc_t iface_alt1;
+ usb_audio_ifacedspc_desc_t iface_spc;
+ usb_audio_format_desc_t audioformat;
+#if defined(UDI_AUDIO_ENABLE_AUDIO_IN)
+ usb_audio_ep_desc_t ep_audio_in;
+ usb_audio_epspc_desc_t ep_audio_in_spc;
+#endif
+#if defined(UDI_AUDIO_ENABLE_AUDIO_OUT)
+ usb_audio_ep_desc_t ep_audio_out;
+ usb_audio_epspc_desc_t ep_audio_out_spc;
+#endif
+} udi_audio_data_desc_t;
+
+//! By default no string associated to this interface
+#ifndef UDI_AUDIO_STRING_ID
+#define UDI_AUDIO_STRING_ID 0
+#endif
+
+#define UDI_AUDIO_ENDPOINTS 1
+
+//! Audio Streaming enpoints size for full speed
+#define UDI_AUDIO_EPS_SIZE_FS 256
+//! Audio enpoints size for high speed
+#define UDI_AUDIO_EPS_SIZE_HS 256
+
+#ifdef USB_DEVICE_HS_SUPPORT
+ #define UDI_AUDIO_EPS_SIZE UDI_AUDIO_EPS_SIZE_HS
+#else
+ #define UDI_AUDIO_EPS_SIZE UDI_AUDIO_EPS_SIZE_FS
+#endif
+
+#if defined(UDI_AUDIO_ENABLE_AUDIO_IN) && defined(UDI_AUDIO_ENABLE_AUDIO_OUT)
+ #error Audio driver must be configured with either UDI_AUDIO_ENABLE_AUDIO_IN or UDI_AUDIO_ENABLE_AUDIO_OUT, not both.
+#else
+ #define AUDIO_IN_TERMINAL_IN_ID 1
+ #define AUDIO_IN_FEATURE_UNIT_ID 2
+ #define AUDIO_IN_TERMINAL_OUT_ID 3
+ #define AUDIO_OUT_TERMINAL_IN_ID 1
+ #define AUDIO_OUT_FEATURE_UNIT_ID 2
+ #define AUDIO_OUT_TERMINAL_OUT_ID 3
+#endif
+
+
+#ifdef UDI_AUDIO_ENABLE_AUDIO_IN
+ #define UDI_AUDIO_CONTROL_IN_TERMINAL_DESC \
+ .interm_audio_in.bLength = sizeof(usb_audio_input_terminal_desc_t),\
+ .interm_audio_in.bDescriptorType = AUDIO_CS_INTERFACE,\
+ .interm_audio_in.bDescriptorSubtype = AUDIO_CS_INTERFACE_TERMINAL_IN,\
+ .interm_audio_in.bTerminalID = AUDIO_IN_TERMINAL_IN_ID,\
+ .interm_audio_in.wTerminalType = LE16(AUDIO_TERMINAL_STREAMING),\
+ .interm_audio_in.bAssocTerminal = 0,\
+ .interm_audio_in.bNrChannels = UDI_AUDIO_SAMPLE_CHANNELS,\
+ .interm_audio_in.wChannelConfig = LE16(AUDIO_CHANNEL_CENTER_FRONT),\
+ .interm_audio_in.iChannelNames = 0,\
+ .interm_audio_in.iTerminal = 0,\
+ .feature_unit.bLength = sizeof(usb_audio_feature_desc_t),\
+ .feature_unit.bDescriptorType = AUDIO_CS_INTERFACE,\
+ .feature_unit.bDescriptorSubtype = AUDIO_CS_INTERFACE_FEATURE,\
+ .feature_unit.bUnitID = AUDIO_IN_FEATURE_UNIT_ID,\
+ .feature_unit.bSourceID = AUDIO_IN_TERMINAL_IN_ID,\
+ .feature_unit.bControlSize = 2,\
+ .feature_unit.bmaControls = {LE16(UDI_AUDIO_FEATURES)},\
+ .feature_unit.iFeature = 0,\
+ .outterm_audio_in.bLength = sizeof(usb_audio_output_terminal_desc_t),\
+ .outterm_audio_in.bDescriptorType = AUDIO_CS_INTERFACE,\
+ .outterm_audio_in.bDescriptorSubtype = AUDIO_CS_INTERFACE_TERMINAL_OUT,\
+ .outterm_audio_in.bTerminalID = AUDIO_IN_TERMINAL_OUT_ID,\
+ .outterm_audio_in.wTerminalType = LE16(AUDIO_TERMINAL_IN_MIC),\
+ .outterm_audio_in.bAssocTerminal = 0,\
+ .outterm_audio_in.bSourceID = AUDIO_IN_TERMINAL_IN_ID,\
+ .outterm_audio_in.iTerminal = 0,
+
+ #define UDI_AUDIO_CONTROL_IN_EP_DESC(interval) \
+ .ep_audio_in.ep.bLength = sizeof(usb_audio_ep_desc_t),\
+ .ep_audio_in.ep.bDescriptorType = USB_DT_ENDPOINT,\
+ .ep_audio_in.ep.bEndpointAddress = UDI_AUDIO_EP_IN,\
+ .ep_audio_in.ep.bmAttributes = (USB_EP_TYPE_ISOCHRONOUS | ENDPOINT_ATTR_SYNCHRONOUS),\
+ .ep_audio_in.ep.bInterval = interval,\
+ .ep_audio_in.bRefresh = 0,\
+ .ep_audio_in.bSynchAddress = 0,\
+ .ep_audio_in_spc.bLength = sizeof(usb_audio_epspc_desc_t),\
+ .ep_audio_in_spc.bDescriptorType = AUDIO_CS_ENDPOINT,\
+ .ep_audio_in_spc.bDescriptorSubtype = AUDIO_CS_INTERFACE_GENERAL,\
+ .ep_audio_in_spc.bmAttributes = 0,\
+ .ep_audio_in_spc.bLockDelayUnits = 0,\
+ .ep_audio_in_spc.wLockDelay = LE16(0),
+
+ #define UDI_AUDIO_CONTROL_IN_EP_FS_DESC \
+ UDI_AUDIO_CONTROL_IN_EP_DESC(1)\
+ .ep_audio_in.ep.wMaxPacketSize = LE16(UDI_AUDIO_EPS_SIZE_FS),
+
+ #define UDI_AUDIO_CONTROL_IN_EP_HS_DESC \
+ UDI_AUDIO_CONTROL_IN_EP_DESC(4)\
+ .ep_audio_in.ep.wMaxPacketSize = LE16(UDI_AUDIO_EPS_SIZE_HS),
+#else
+ #define UDI_AUDIO_CONTROL_IN_TERMINAL_DESC
+ #define UDI_AUDIO_CONTROL_IN_EP_FS_DESC
+ #define UDI_AUDIO_CONTROL_IN_EP_HS_DESC
+#endif
+
+#ifdef UDI_AUDIO_ENABLE_AUDIO_OUT
+ #define UDI_AUDIO_CONTROL_OUT_TERMINAL_DESC \
+ .interm_audio_out.bLength = sizeof(usb_audio_input_terminal_desc_t),\
+ .interm_audio_out.bDescriptorType = AUDIO_CS_INTERFACE,\
+ .interm_audio_out.bDescriptorSubtype = AUDIO_CS_INTERFACE_TERMINAL_IN,\
+ .interm_audio_out.bTerminalID = AUDIO_OUT_TERMINAL_IN_ID,\
+ .interm_audio_out.wTerminalType = LE16(AUDIO_TERMINAL_STREAMING),\
+ .interm_audio_out.bAssocTerminal = 0,\
+ .interm_audio_out.bNrChannels = UDI_AUDIO_SAMPLE_CHANNELS,\
+ .interm_audio_out.wChannelConfig = LE16(AUDIO_CHANNEL_LEFT_FRONT | AUDIO_CHANNEL_RIGHT_FRONT),\
+ .interm_audio_out.iChannelNames = 0,\
+ .interm_audio_out.iTerminal = 0,\
+ .feature_unit.bLength = sizeof(usb_audio_feature_desc_t),\
+ .feature_unit.bDescriptorType = AUDIO_CS_INTERFACE,\
+ .feature_unit.bDescriptorSubtype = AUDIO_CS_INTERFACE_FEATURE,\
+ .feature_unit.bUnitID = AUDIO_OUT_FEATURE_UNIT_ID,\
+ .feature_unit.bSourceID = AUDIO_OUT_TERMINAL_IN_ID,\
+ .feature_unit.bControlSize = 2,\
+ .feature_unit.bmaControls = {LE16(UDI_AUDIO_FEATURES)},\
+ .feature_unit.iFeature = 0,\
+ .outterm_audio_out.bLength = sizeof(usb_audio_output_terminal_desc_t),\
+ .outterm_audio_out.bDescriptorType = AUDIO_CS_INTERFACE,\
+ .outterm_audio_out.bDescriptorSubtype = AUDIO_CS_INTERFACE_TERMINAL_OUT,\
+ .outterm_audio_out.bTerminalID = AUDIO_OUT_TERMINAL_OUT_ID,\
+ .outterm_audio_out.wTerminalType = LE16(AUDIO_TERMINAL_OUT_SPEAKER),\
+ .outterm_audio_out.bAssocTerminal = 0,\
+ .outterm_audio_out.bSourceID = AUDIO_OUT_FEATURE_UNIT_ID,\
+ .outterm_audio_out.iTerminal = 0,
+
+ #define UDI_AUDIO_CONTROL_OUT_EP_DESC(interval) \
+ .ep_audio_out.ep.bLength = sizeof(usb_audio_ep_desc_t),\
+ .ep_audio_out.ep.bDescriptorType = USB_DT_ENDPOINT,\
+ .ep_audio_out.ep.bEndpointAddress = UDI_AUDIO_EP_OUT,\
+ .ep_audio_out.ep.bmAttributes = (USB_EP_TYPE_ISOCHRONOUS | ENDPOINT_ATTR_SYNCHRONOUS),\
+ .ep_audio_out.ep.bInterval = interval,\
+ .ep_audio_out.bRefresh = 0,\
+ .ep_audio_out.bSynchAddress = 0,\
+ .ep_audio_out_spc.bLength = sizeof(usb_audio_epspc_desc_t),\
+ .ep_audio_out_spc.bDescriptorType = AUDIO_CS_ENDPOINT,\
+ .ep_audio_out_spc.bDescriptorSubtype = AUDIO_CS_INTERFACE_GENERAL,\
+ .ep_audio_out_spc.bmAttributes = 0,\
+ .ep_audio_out_spc.bLockDelayUnits = 0,\
+ .ep_audio_out_spc.wLockDelay = LE16(0),
+
+ #define UDI_AUDIO_CONTROL_OUT_EP_FS_DESC \
+ UDI_AUDIO_CONTROL_OUT_EP_DESC(1) \
+ .ep_audio_out.ep.wMaxPacketSize = LE16(UDI_AUDIO_EPS_SIZE_FS),
+
+ #define UDI_AUDIO_CONTROL_OUT_EP_HS_DESC \
+ UDI_AUDIO_CONTROL_OUT_EP_DESC(4) \
+ .ep_audio_out.ep.wMaxPacketSize = LE16(UDI_AUDIO_EPS_SIZE_HS),
+#else
+ #define UDI_AUDIO_CONTROL_OUT_TERMINAL_DESC
+ #define UDI_AUDIO_CONTROL_OUT_EP_FS_DESC
+ #define UDI_AUDIO_CONTROL_OUT_EP_HS_DESC
+#endif
+
+//! Content of Audio Control interface descriptor for all speeds
+#define UDI_AUDIO_CONTROL_DESC {\
+ .iface.bLength = sizeof(usb_iface_desc_t),\
+ .iface.bDescriptorType = USB_DT_INTERFACE,\
+ .iface.bInterfaceNumber = UDI_AUDIO_IFACE_CONTROL_NUMBER,\
+ .iface.bAlternateSetting = 0,\
+ .iface.bNumEndpoints = 0,\
+ .iface.bInterfaceClass = AUDIO_CLASS,\
+ .iface.bInterfaceSubClass = AUDIO_SUBCLASS_CONTROL,\
+ .iface.bInterfaceProtocol = 0,\
+ .iface.iInterface = UDI_AUDIO_STRING_ID,\
+ .iface_spc.bLength = sizeof(usb_audio_ifacecspc_desc_t),\
+ .iface_spc.bDescriptorType = AUDIO_CS_INTERFACE,\
+ .iface_spc.bDescriptorSubtype = AUDIO_CS_INTERFACE_HEADER,\
+ .iface_spc.bcdADC = LE16(0x0100),\
+ .iface_spc.wTotalLength = LE16(sizeof(udi_audio_control_desc_t) - sizeof(usb_iface_desc_t)),\
+ .iface_spc.bInCollection = 1,\
+ .iface_spc.bInterfaceNumbers = UDI_AUDIO_IFACE_DATA_NUMBER,\
+ UDI_AUDIO_CONTROL_IN_TERMINAL_DESC \
+ UDI_AUDIO_CONTROL_OUT_TERMINAL_DESC \
+ }
+
+//! Content of Audio Control interface descriptor for full speed
+#define UDI_AUDIO_DATA_DESC_FS {\
+ .iface_alt0.bLength = sizeof(usb_iface_desc_t),\
+ .iface_alt0.bDescriptorType = USB_DT_INTERFACE,\
+ .iface_alt0.bInterfaceNumber = UDI_AUDIO_IFACE_DATA_NUMBER,\
+ .iface_alt0.bAlternateSetting = 0,\
+ .iface_alt0.bNumEndpoints = 0,\
+ .iface_alt0.bInterfaceClass = AUDIO_CLASS,\
+ .iface_alt0.bInterfaceSubClass = AUDIO_SUBCLASS_STREAMING,\
+ .iface_alt0.bInterfaceProtocol = 0,\
+ .iface_alt0.iInterface = 0,\
+ .iface_alt1.bLength = sizeof(usb_iface_desc_t),\
+ .iface_alt1.bDescriptorType = USB_DT_INTERFACE,\
+ .iface_alt1.bInterfaceNumber = UDI_AUDIO_IFACE_DATA_NUMBER,\
+ .iface_alt1.bAlternateSetting = 1,\
+ .iface_alt1.bNumEndpoints = UDI_AUDIO_ENDPOINTS,\
+ .iface_alt1.bInterfaceClass = AUDIO_CLASS,\
+ .iface_alt1.bInterfaceSubClass = AUDIO_SUBCLASS_STREAMING,\
+ .iface_alt1.bInterfaceProtocol = 0,\
+ .iface_alt1.iInterface = 0,\
+ .iface_spc.bLength = sizeof(usb_audio_ifacedspc_desc_t),\
+ .iface_spc.bDescriptorType = AUDIO_CS_INTERFACE,\
+ .iface_spc.bDescriptorSubtype = AUDIO_CS_INTERFACE_GENERAL,\
+ .iface_spc.bTerminalLink = 0x01,\
+ .iface_spc.bDelay = 1,\
+ .iface_spc.wFormatTag = LE16(0x0001),\
+ .audioformat.bLength = sizeof(usb_audio_format_desc_t),\
+ .audioformat.bDescriptorType = AUDIO_CS_INTERFACE,\
+ .audioformat.bDescriptorSubtype = AUDIO_CS_INTERFACE_FORMAT,\
+ .audioformat.bFormatType = 0x01,\
+ .audioformat.bNrChannels = UDI_AUDIO_SAMPLE_CHANNELS,\
+ .audioformat.bSubFrameSize = UDI_AUDIO_SAMPLE_SIZE_BYTES,\
+ .audioformat.bBitResolution = UDI_AUDIO_SAMPLE_BITS,\
+ .audioformat.bSampleFrequencyType = 1,\
+ .audioformat.SampleFrequencies = {UDI_AUDIO_SAMPLE_RATE & 0xFF, UDI_AUDIO_SAMPLE_RATE >> 8, UDI_AUDIO_SAMPLE_RATE >> 16},\
+ UDI_AUDIO_CONTROL_IN_EP_FS_DESC \
+ UDI_AUDIO_CONTROL_OUT_EP_FS_DESC \
+ }
+
+//! Content of Audio Control interface descriptor for high speed
+#define UDI_AUDIO_DATA_DESC_HS {\
+ .iface_alt0.bLength = sizeof(usb_iface_desc_t),\
+ .iface_alt0.bDescriptorType = USB_DT_INTERFACE,\
+ .iface_alt0.bInterfaceNumber = UDI_AUDIO_IFACE_DATA_NUMBER,\
+ .iface_alt0.bAlternateSetting = 0,\
+ .iface_alt0.bNumEndpoints = 0,\
+ .iface_alt0.bInterfaceClass = AUDIO_CLASS,\
+ .iface_alt0.bInterfaceSubClass = AUDIO_SUBCLASS_STREAMING,\
+ .iface_alt0.bInterfaceProtocol = 0,\
+ .iface_alt0.iInterface = 0,\
+ .iface_alt1.bLength = sizeof(usb_iface_desc_t),\
+ .iface_alt1.bDescriptorType = USB_DT_INTERFACE,\
+ .iface_alt1.bInterfaceNumber = UDI_AUDIO_IFACE_DATA_NUMBER,\
+ .iface_alt1.bAlternateSetting = 1,\
+ .iface_alt1.bNumEndpoints = UDI_AUDIO_ENDPOINTS,\
+ .iface_alt1.bInterfaceClass = AUDIO_CLASS,\
+ .iface_alt1.bInterfaceSubClass = AUDIO_SUBCLASS_STREAMING,\
+ .iface_alt1.bInterfaceProtocol = 0,\
+ .iface_alt1.iInterface = 0,\
+ .iface_spc.bLength = sizeof(usb_audio_ifacedspc_desc_t),\
+ .iface_spc.bDescriptorType = AUDIO_CS_INTERFACE,\
+ .iface_spc.bDescriptorSubtype = AUDIO_CS_INTERFACE_GENERAL,\
+ .iface_spc.bTerminalLink = 0x01,\
+ .iface_spc.bDelay = 1,\
+ .iface_spc.wFormatTag = LE16(0x0001),\
+ .audioformat.bLength = sizeof(usb_audio_format_desc_t),\
+ .audioformat.bDescriptorType = AUDIO_CS_INTERFACE,\
+ .audioformat.bDescriptorSubtype = AUDIO_CS_INTERFACE_FORMAT,\
+ .audioformat.bFormatType = 0x01,\
+ .audioformat.bNrChannels = 2,\
+ .audioformat.bSubFrameSize = 2,\
+ .audioformat.bBitResolution = 16,\
+ .audioformat.bSampleFrequencyType = 1,\
+ .audioformat.SampleFrequencies = {48000 & 0xFF, 48000 >> 8, 48000 >> 16},\
+ UDI_AUDIO_CONTROL_IN_EP_HS_DESC \
+ UDI_AUDIO_CONTROL_OUT_EP_HS_DESC \
+ }
+
+//! Global struture which contains standard UDI interface for UDC
+extern UDC_DESC_STORAGE udi_api_t udi_api_audio_control;
+
+//! Global struture which contains standard UDI interface for UDC
+extern UDC_DESC_STORAGE udi_api_t udi_api_audio_data;
+
+/**
+ * \brief Transfers sample data to the USB Audio IN endpoint
+ *
+ *
+ * \param buffer Buffer of stored samples to send to the host
+ * \param length Length of the sample buffer to send
+ *
+ * \return \c 1 if function was successfully done, otherwise \c 0.
+ */
+bool udi_audio_stream_samples_send(uint8_t* buffer, uint8_t length);
+
+/**
+ * \brief Processes any pending audio sample buffers.
+ * Processes pending sample buffers, sending/receiving data between the USB
+ * host and the device, and executing the user callback for filled sample
+ * buffers when in audio output mode.
+ */
+void udi_audio_process(void);
+
+/**
+ * \brief Sets the minimum value for a given feature.
+ *
+ * \param feature Feature to alter, an AUDIO_FEATURE_* mask
+ * \param value Minuimum allowable value for the given feature
+ */
+void udi_audio_stream_set_feature_min(uint16_t feature, uint16_t value);
+
+/**
+ * \brief Sets the maximum value for a given feature.
+ *
+ * \param feature Feature to alter, an AUDIO_FEATURE_* mask
+ * \param value Maximum allowable value for the given feature
+ */
+void udi_audio_stream_set_feature_max(uint16_t feature, uint16_t value);
+
+/**
+ * \brief Sets the resolution value for a given feature.
+ *
+ * \param feature Feature to alter, an AUDIO_FEATURE_* mask
+ * \param value New resolution value for the given feature
+ */
+void udi_audio_stream_set_feature_res(uint16_t feature, uint16_t value);
+
+/**
+ * \brief Sets the current value for a given feature.
+ *
+ * \param feature Feature to alter, an AUDIO_FEATURE_* mask
+ * \param value New current value for the given feature
+ */
+void udi_audio_stream_set_feature_cur(uint16_t feature, uint16_t value);
+
+/**
+ * \brief Gets the currently set value for a given feature.
+ *
+ * \param feature Feature to retrieve, an AUDIO_FEATURE_* mask
+ *
+ * \retval Current value for the given feature
+ */
+uint16_t udi_audio_stream_get_feature_cur(uint16_t feature);
+
+//@}
+
+#ifdef __cplusplus
+}
+#endif
+#endif // _UDI_AUDIO_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/udi_audio_conf.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/udi_audio_conf.h
new file mode 100644
index 0000000..c0cd951
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/udi_audio_conf.h
@@ -0,0 +1,90 @@
+/**
+ * \file
+ *
+ * \brief Default Audio 1.0 configuration for a USB Device
+ * with a single interface MSC
+ *
+ * Copyright (C) 2011 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _UDI_AUDIO_CONF_H_
+#define _UDI_AUDIO_CONF_H_
+
+/**
+ * \ingroup udi_audio_group
+ * \defgroup udi_audio_group_conf Default Audio 1.0 configuration for a USB Device
+ *
+ * @{
+ */
+
+//! Control endpoint size
+#define USB_DEVICE_EP_CTRL_SIZE 64
+
+//! Audio stream direction configuration
+//#define UDI_AUDIO_ENABLE_AUDIO_IN
+#define UDI_AUDIO_ENABLE_AUDIO_OUT
+
+//! Audio stream format configuration
+//@{
+#define UDI_AUDIO_SAMPLE_RATE 48000
+#define UDI_AUDIO_SAMPLE_BITS 16
+#define UDI_AUDIO_SAMPLE_SIZE_BYTES 2
+#define UDI_AUDIO_SAMPLE_CHANNELS 2
+//@}
+
+//! Audio stream feature configuration
+#define UDI_AUDIO_FEATURES AUDIO_FEATURE_VOLUME | AUDIO_FEATURE_MUTE
+#define UDI_AUDIO_MUTE_FEATURE_DEFAULT false
+#define UDI_AUDIO_VOLUME_FEATURE_MIN 0x0000
+#define UDI_AUDIO_VOLUME_FEATURE_MAX 0x7FFF
+#define UDI_AUDIO_VOLUME_FEATURE_DEFAULT 0x7FFF
+
+//! Endpoint numbers used by Audio interface
+#define UDI_AUDIO_EP_IN (5 | USB_EP_DIR_IN)
+#define UDI_AUDIO_EP_OUT (6 | USB_EP_DIR_OUT)
+
+#define UDI_AUDIO_IFACE_CONTROL_NUMBER 0
+#define UDI_AUDIO_IFACE_DATA_NUMBER 1
+
+/**
+ * \name UDD Configuration
+ */
+//@{
+#define USB_DEVICE_MAX_EP 6
+//@}
+
+//@}
+
+#include "udi_audio.h"
+
+#endif // _UDI_AUDIO_CONF_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/udi_audio_desc.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/udi_audio_desc.c
new file mode 100644
index 0000000..b8f20bb
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/device/udi_audio_desc.c
@@ -0,0 +1,185 @@
+/**
+ * \file
+ *
+ * \brief Default descriptors for a USB Device with a single interface Audio 1.0
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "conf_usb.h"
+#include "udd.h"
+#include "udc_desc.h"
+#include "udi_audio.h"
+
+
+/**
+ * \ingroup udi_audio_group
+ * \defgroup udi_audio_group_desc Default descriptors for a USB Device
+ *
+ * @{
+ */
+
+//! Two interfaces for this device
+#define USB_DEVICE_NB_INTERFACE 2
+
+/**INDENT-OFF**/
+
+//! USB Device Descriptor
+COMPILER_WORD_ALIGNED
+UDC_DESC_STORAGE usb_dev_desc_t udc_device_desc = {
+ .bLength = sizeof(usb_dev_desc_t),
+ .bDescriptorType = USB_DT_DEVICE,
+ .bcdUSB = LE16(USB_V2_0),
+ .bDeviceClass = 0,
+ .bDeviceSubClass = 0,
+ .bDeviceProtocol = 0,
+ .bMaxPacketSize0 = USB_DEVICE_EP_CTRL_SIZE,
+ .idVendor = LE16(USB_DEVICE_VENDOR_ID),
+ .idProduct = LE16(USB_DEVICE_PRODUCT_ID),
+ .bcdDevice = LE16((USB_DEVICE_MAJOR_VERSION << 8)
+ | USB_DEVICE_MINOR_VERSION),
+#ifdef USB_DEVICE_MANUFACTURE_NAME
+ .iManufacturer = 1,
+#else
+ .iManufacturer = 0, // No manufacture string
+#endif
+#ifdef USB_DEVICE_PRODUCT_NAME
+ .iProduct = 2,
+#else
+ .iProduct = 0, // No product string
+#endif
+#ifdef USB_DEVICE_SERIAL_NAME
+ .iSerialNumber = 3,
+#else
+ .iSerialNumber = 0, // No serial string
+#endif
+ .bNumConfigurations = 1
+};
+
+
+#ifdef USB_DEVICE_HS_SUPPORT
+//! USB Device Qualifier Descriptor for HS
+COMPILER_WORD_ALIGNED
+UDC_DESC_STORAGE usb_dev_qual_desc_t udc_device_qual = {
+ .bLength = sizeof(usb_dev_qual_desc_t),
+ .bDescriptorType = USB_DT_DEVICE_QUALIFIER,
+ .bcdUSB = LE16(USB_V2_0),
+ .bDeviceClass = 0,
+ .bDeviceSubClass = 0,
+ .bDeviceProtocol = 0,
+ .bMaxPacketSize0 = USB_DEVICE_EP_CTRL_SIZE,
+ .bNumConfigurations = 1
+};
+#endif
+
+//! Structure for USB Device Configuration Descriptor
+COMPILER_PACK_SET(1);
+typedef struct {
+ usb_conf_desc_t conf;
+ udi_audio_control_desc_t udi_audio_control;
+ udi_audio_data_desc_t udi_audio_data;
+} udc_desc_t;
+COMPILER_PACK_RESET();
+
+//! USB Device Configuration Descriptor filled for FS
+COMPILER_WORD_ALIGNED
+UDC_DESC_STORAGE udc_desc_t udc_desc_fs = {
+ .conf.bLength = sizeof(usb_conf_desc_t),
+ .conf.bDescriptorType = USB_DT_CONFIGURATION,
+ .conf.wTotalLength = LE16(sizeof(udc_desc_t)),
+ .conf.bNumInterfaces = USB_DEVICE_NB_INTERFACE,
+ .conf.bConfigurationValue = 1,
+ .conf.iConfiguration = 0,
+ .conf.bmAttributes = USB_CONFIG_ATTR_MUST_SET | USB_DEVICE_ATTR,
+ .conf.bMaxPower = USB_CONFIG_MAX_POWER(USB_DEVICE_POWER),
+ .udi_audio_control = UDI_AUDIO_CONTROL_DESC,
+ .udi_audio_data = UDI_AUDIO_DATA_DESC_FS,
+};
+
+#ifdef USB_DEVICE_HS_SUPPORT
+//! USB Device Configuration Descriptor filled for HS
+COMPILER_WORD_ALIGNED
+UDC_DESC_STORAGE udc_desc_t udc_desc_hs = {
+ .conf.bLength = sizeof(usb_conf_desc_t),
+ .conf.bDescriptorType = USB_DT_CONFIGURATION,
+ .conf.wTotalLength = LE16(sizeof(udc_desc_t)),
+ .conf.bNumInterfaces = USB_DEVICE_NB_INTERFACE,
+ .conf.bConfigurationValue = 1,
+ .conf.iConfiguration = 0,
+ .conf.bmAttributes = USB_CONFIG_ATTR_MUST_SET | USB_DEVICE_ATTR,
+ .conf.bMaxPower = USB_CONFIG_MAX_POWER(USB_DEVICE_POWER),
+ .udi_audio_control = UDI_AUDIO_CONTROL_DESC,
+ .udi_audio_data = UDI_AUDIO_DATA_DESC_HS,
+};
+#endif
+
+
+/**
+ * \name UDC structures which contain all USB Device definitions
+ */
+//@{
+
+//! Associate an UDI for each USB interface
+UDC_DESC_STORAGE udi_api_t *udi_apis[USB_DEVICE_NB_INTERFACE] = {
+ &udi_api_audio_control,
+ &udi_api_audio_data,
+};
+
+//! Add UDI with USB Descriptors FS
+UDC_DESC_STORAGE udc_config_speed_t udc_config_lsfs[1] = {{
+ .desc = (usb_conf_desc_t UDC_DESC_STORAGE*)&udc_desc_fs,
+ .udi_apis = udi_apis,
+}};
+
+#ifdef USB_DEVICE_HS_SUPPORT
+//! Add UDI with USB Descriptors HS
+UDC_DESC_STORAGE udc_config_speed_t udc_config_hs[1] = {{
+ .desc = (usb_conf_desc_t UDC_DESC_STORAGE*)&udc_desc_hs,
+ .udi_apis = udi_apis,
+}};
+#endif
+
+//! Add all information about USB Device in global structure for UDC
+UDC_DESC_STORAGE udc_config_t udc_config = {
+ .confdev_lsfs = &udc_device_desc,
+ .conf_lsfs = udc_config_lsfs,
+#ifdef USB_DEVICE_HS_SUPPORT
+ .confdev_hs = &udc_device_desc,
+ .qualifier = &udc_device_qual,
+ .conf_hs = udc_config_hs,
+#endif
+};
+
+//@}
+/**INDENT-ON**/
+//@}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/usb_protocol_audio.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/usb_protocol_audio.h
new file mode 100644
index 0000000..ce01034
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/audio/usb_protocol_audio.h
@@ -0,0 +1,280 @@
+/**
+ * \file
+ *
+ * \brief USB Audio Class 1.0 protocol definitions.
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _USB_PROTOCOL_AUDIO_H_
+#define _USB_PROTOCOL_AUDIO_H_
+
+/**
+ * \ingroup usb_protocol_group
+ * \defgroup usb_audio_protocol USB Audio Class protocol definitions
+ *
+ * @{
+ */
+
+/**
+ * \name Possible Class value
+ */
+//@{
+#define AUDIO_CLASS 0x01
+//@}
+
+//! \name USB Audio Subclass IDs
+//@{
+#define AUDIO_SUBCLASS_CONTROL 0x01
+#define AUDIO_SUBCLASS_STREAMING 0x02
+//@}
+
+//! \name USB Audio Functional Descriptor Types
+//@{
+#define AUDIO_CS_INTERFACE 0x24 //!< Interface Functional Descriptor
+#define AUDIO_CS_ENDPOINT 0x25 //!< Endpoint Functional Descriptor
+//@}
+
+//! \name USB Audio Control Functional Descriptor Subtypes
+//@{
+#define AUDIO_CS_INTERFACE_HEADER 0x01
+#define AUDIO_CS_INTERFACE_TERMINAL_IN 0x02
+#define AUDIO_CS_INTERFACE_TERMINAL_OUT 0x03
+#define AUDIO_CS_INTERFACE_MIXER 0x04
+#define AUDIO_CS_INTERFACE_SELECTER 0x05
+#define AUDIO_CS_INTERFACE_FEATURE 0x06
+#define AUDIO_CS_INTERFACE_PROCESSING 0x07
+#define AUDIO_CS_INTERFACE_EXTENSION 0x08
+#define AUDIO_CS_INTERFACE_FORMAT 0x02
+//@}
+
+//! \name USB Audio Streaming Functional Descriptor Subtypes
+//@{
+#define AUDIO_CS_INTERFACE_GENERAL 0x01
+#define AUDIO_CS_INTERFACE_FORMATSPECIFIC 0x03
+//@}
+
+//! \name USB Audio Terminal Descriptor Types
+//@{
+#define AUDIO_TERMINAL_UNDEFINED 0x0100
+#define AUDIO_TERMINAL_STREAMING 0x0101
+#define AUDIO_TERMINAL_VENDOR 0x01FF
+#define AUDIO_TERMINAL_IN_UNDEFINED 0x0200
+#define AUDIO_TERMINAL_IN_MIC 0x0201
+#define AUDIO_TERMINAL_IN_DESKTOP_MIC 0x0202
+#define AUDIO_TERMINAL_IN_PERSONAL_MIC 0x0203
+#define AUDIO_TERMINAL_IN_OMNIDIR_MIC 0x0204
+#define AUDIO_TERMINAL_IN_MIC_ARRAY 0x0205
+#define AUDIO_TERMINAL_IN_PROCESSING_MIC 0x0206
+#define AUDIO_TERMINAL_IN_OUT_UNDEFINED 0x0300
+#define AUDIO_TERMINAL_OUT_SPEAKER 0x0301
+#define AUDIO_TERMINAL_OUT_HEADPHONES 0x0302
+#define AUDIO_TERMINAL_OUT_HEAD_MOUNTED 0x0303
+#define AUDIO_TERMINAL_OUT_DESKTOP 0x0304
+#define AUDIO_TERMINAL_OUT_ROOM 0x0305
+#define AUDIO_TERMINAL_OUT_COMMUNICATION 0x0306
+#define AUDIO_TERMINAL_OUT_LOWFREQ 0x0307
+//@}
+
+//! \name USB Audio Channel Types
+//@{
+#define AUDIO_CHANNEL_LEFT_FRONT (1 << 0)
+#define AUDIO_CHANNEL_RIGHT_FRONT (1 << 1)
+#define AUDIO_CHANNEL_CENTER_FRONT (1 << 2)
+#define AUDIO_CHANNEL_LOW_FREQ_ENHANCE (1 << 3)
+#define AUDIO_CHANNEL_LEFT_SURROUND (1 << 4)
+#define AUDIO_CHANNEL_RIGHT_SURROUND (1 << 5)
+#define AUDIO_CHANNEL_LEFT_OF_CENTER (1 << 6)
+#define AUDIO_CHANNEL_RIGHT_OF_CENTER (1 << 7)
+#define AUDIO_CHANNEL_SURROUND (1 << 8)
+#define AUDIO_CHANNEL_SIDE_LEFT (1 << 9)
+#define AUDIO_CHANNEL_SIDE_RIGHT (1 << 10)
+#define AUDIO_CHANNEL_TOP (1 << 11)
+//@}
+
+//! \name Audio Feature Unit Control Indexes
+//@{
+#define AUDIO_CONTROL_MUTE 1
+#define AUDIO_CONTROL_VOLUME 2
+#define AUDIO_CONTROL_BASS 3
+#define AUDIO_CONTROL_MID 4
+#define AUDIO_CONTROL_TREBLE 5
+#define AUDIO_CONTROL_GRAPHIC_EQ 6
+#define AUDIO_CONTROL_AUTO_GAIN 7
+#define AUDIO_CONTROL_DELAY 8
+#define AUDIO_CONTROL_BASS_BOOST 9
+#define AUDIO_CONTROL_LOUDNESS A
+//@}
+
+//! \name Audio Feature Unit Control Masks
+//@{
+#define AUDIO_FEATURE_MUTE (1 << 0)
+#define AUDIO_FEATURE_VOLUME (1 << 1)
+#define AUDIO_FEATURE_BASS (1 << 2)
+#define AUDIO_FEATURE_MID (1 << 3)
+#define AUDIO_FEATURE_TREBLE (1 << 4)
+#define AUDIO_FEATURE_GRAPHIC_EQ (1 << 5)
+#define AUDIO_FEATURE_AUTO_GAIN (1 << 6)
+#define AUDIO_FEATURE_DELAY (1 << 7)
+#define AUDIO_FEATURE_BASS_BOOST (1 << 8)
+#define AUDIO_FEATURE_LOUDNESS (1 << 9)
+//@}
+
+//! \name Standard Endpoint Descriptor Types
+//@{
+#define ENDPOINT_ATTR_NO_SYNC (0x00 << 2)
+#define ENDPOINT_ATTR_ASYNCHRONOUS (0x01 << 2)
+#define ENDPOINT_ATTR_ADAPTIVE (0x02 << 2)
+#define ENDPOINT_ATTR_SYNCHRONOUS (0x03 << 2)
+//@}
+
+//! \name USB CDC Request IDs
+//@{
+#define USB_REQ_AUDIO_SET_CUR 0x01
+#define USB_REQ_AUDIO_SET_MIN 0x02
+#define USB_REQ_AUDIO_SET_MAX 0x03
+#define USB_REQ_AUDIO_SET_RES 0x04
+#define USB_REQ_AUDIO_SET_MEM 0x05
+#define USB_REQ_AUDIO_GET_CUR 0x81
+#define USB_REQ_AUDIO_GET_MIN 0x82
+#define USB_REQ_AUDIO_GET_MAX 0x83
+#define USB_REQ_AUDIO_GET_RES 0x84
+#define USB_REQ_AUDIO_GET_MEM 0x85
+//@}
+
+
+/*
+ * Need to pack structures tightly, or the compiler might insert padding
+ * and violate the spec-mandated layout.
+ */
+COMPILER_PACK_SET(1);
+
+//! \name USB CDC Descriptors
+//@{
+
+//! Audio Header Class Specific Control Interface Descriptor
+typedef struct {
+ uint8_t bLength;
+ uint8_t bDescriptorType;
+ uint8_t bDescriptorSubtype;
+ uint16_t bcdADC;
+ uint16_t wTotalLength;
+ uint8_t bInCollection;
+ uint8_t bInterfaceNumbers;
+} usb_audio_ifacecspc_desc_t;
+
+//! Audio Header Class Specific Feature Unit Descriptor
+typedef struct {
+ uint8_t bLength;
+ uint8_t bDescriptorType;
+ uint8_t bDescriptorSubtype;
+ uint8_t bUnitID;
+ uint8_t bSourceID;
+ uint8_t bControlSize;
+ uint16_t bmaControls[1];
+ uint8_t iFeature;
+} usb_audio_feature_desc_t;
+
+//! Audio Header Class Specific Input Terminal Descriptor
+typedef struct {
+ uint8_t bLength;
+ uint8_t bDescriptorType;
+ uint8_t bDescriptorSubtype;
+ uint8_t bTerminalID;
+ uint16_t wTerminalType;
+ uint8_t bAssocTerminal;
+ uint8_t bNrChannels;
+ uint16_t wChannelConfig;
+ uint8_t iChannelNames;
+ uint8_t iTerminal;
+} usb_audio_input_terminal_desc_t;
+
+//! Audio Header Class Specific Output Terminal Descriptor
+typedef struct {
+ uint8_t bLength;
+ uint8_t bDescriptorType;
+ uint8_t bDescriptorSubtype;
+ uint8_t bTerminalID;
+ uint16_t wTerminalType;
+ uint8_t bAssocTerminal;
+ uint8_t bSourceID;
+ uint8_t iTerminal;
+} usb_audio_output_terminal_desc_t;
+
+//! Audio Header Class Specific Streaming Interface Descriptor
+typedef struct {
+ uint8_t bLength;
+ uint8_t bDescriptorType;
+ uint8_t bDescriptorSubtype;
+ uint8_t bTerminalLink;
+ uint8_t bDelay;
+ uint16_t wFormatTag;
+} usb_audio_ifacedspc_desc_t;
+
+//! Audio Header Class Specific Audio Format Descriptor
+typedef struct {
+ uint8_t bLength;
+ uint8_t bDescriptorType;
+ uint8_t bDescriptorSubtype;
+ uint8_t bFormatType;
+ uint8_t bNrChannels;
+ uint8_t bSubFrameSize;
+ uint8_t bBitResolution;
+ uint8_t bSampleFrequencyType;
+ uint8_t SampleFrequencies[1 * 3];
+} usb_audio_format_desc_t;
+
+//! Audio Header Class Specific Extended Endpoint Descriptor
+typedef struct {
+ usb_ep_desc_t ep;
+ uint8_t bRefresh;
+ uint8_t bSynchAddress;
+} usb_audio_ep_desc_t;
+
+//! Audio Header Class Specific Endpoint Descriptor
+typedef struct {
+ uint8_t bLength;
+ uint8_t bDescriptorType;
+ uint8_t bDescriptorSubtype;
+ uint8_t bmAttributes;
+ uint8_t bLockDelayUnits;
+ uint16_t wLockDelay;
+} usb_audio_epspc_desc_t;
+
+//@}
+
+COMPILER_PACK_RESET();
+
+//@}
+
+#endif // _USB_PROTOCOL_AUDIO_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/at32uc3a0512_evk1100/conf_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/at32uc3a0512_evk1100/conf_board.h
new file mode 100644
index 0000000..e69060e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/at32uc3a0512_evk1100/conf_board.h
@@ -0,0 +1,44 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Board configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H_INCLUDED
+#define CONF_BOARD_H_INCLUDED
+
+// Enable AT45DBX Component.
+#define CONF_BOARD_AT45DBX
+
+#endif /* CONF_BOARD_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/at32uc3a0512_evk1100/conf_clock.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/at32uc3a0512_evk1100/conf_clock.h
new file mode 100644
index 0000000..3059cef
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/at32uc3a0512_evk1100/conf_clock.h
@@ -0,0 +1,75 @@
+/**
+ * \file
+ *
+ * \brief Chip-specific system clock manager configuration
+ *
+ * Copyright (C) 2011 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_CLOCK_H_INCLUDED
+#define CONF_CLOCK_H_INCLUDED
+
+// ===== System Clock Source Options
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_RCSYS
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_OSC0
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL0
+
+// ===== PLL0 Options
+//#define CONFIG_PLL0_SOURCE PLL_SRC_OSC0
+//#define CONFIG_PLL0_SOURCE PLL_SRC_OSC1
+//#define CONFIG_PLL0_MUL 4 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+//#define CONFIG_PLL0_DIV 1 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+
+// ===== PLL1 Options
+#define CONFIG_PLL1_SOURCE PLL_SRC_OSC0
+//#define CONFIG_PLL1_SOURCE PLL_SRC_OSC1
+#define CONFIG_PLL1_MUL 8 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+#define CONFIG_PLL1_DIV 2 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+
+// ===== System Clock Bus Division Options
+//#define CONFIG_SYSCLK_CPU_DIV 0 /* Fcpu = Fsys/(2 ^ CPU_div) */
+//#define CONFIG_SYSCLK_PBA_DIV 0 /* Fpba = Fsys/(2 ^ PBA_div) */
+//#define CONFIG_SYSCLK_PBB_DIV 0 /* Fpbb = Fsys/(2 ^ PBB_div) */
+
+// ===== Peripheral Clock Management Options
+//#define CONFIG_SYSCLK_INIT_CPUMASK ((1 << SYSCLK_SYSTIMER) | (1 << SYSCLK_OCD))
+//#define CONFIG_SYSCLK_INIT_PBAMASK (1 << SYSCLK_USART0)
+//#define CONFIG_SYSCLK_INIT_PBBMASK (1 << SYSCLK_HMATRIX)
+//#define CONFIG_SYSCLK_INIT_HSBMASK (1 << SYSCLK_MDMA_HSB)
+
+// ===== USB Clock Source Options
+//#define CONFIG_USBCLK_SOURCE USBCLK_SRC_OSC0
+//#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL0
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL1
+#define CONFIG_USBCLK_DIV 1 /* Fusb = Fsys/(2 ^ USB_div) */
+
+#endif /* CONF_CLOCK_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/at32uc3a0512_evk1100/conf_sleepmgr.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/at32uc3a0512_evk1100/conf_sleepmgr.h
new file mode 100644
index 0000000..699010d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/at32uc3a0512_evk1100/conf_sleepmgr.h
@@ -0,0 +1,43 @@
+/**
+ * \file
+ *
+ * \brief Sleep manager configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SLEEPMGR_H
+#define CONF_SLEEPMGR_H
+
+#define CONFIG_SLEEPMGR_ENABLE
+
+#endif /* CONF_SLEEPMGR_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/at32uc3a0512_evk1100/uart.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/at32uc3a0512_evk1100/uart.c
new file mode 100644
index 0000000..e542f27
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/at32uc3a0512_evk1100/uart.c
@@ -0,0 +1,162 @@
+/**
+ * \file
+ *
+ * \brief UART functions
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "usb_protocol_cdc.h"
+#include "sysclk.h"
+#include "uart.h"
+#include "usart.h"
+#include "gpio.h"
+#include "main.h"
+
+static usart_options_t usart_options;
+
+ISR(usart_interrupt, AVR32_USART1_IRQ_GROUP, 3)
+{
+ if (AVR32_USART1.csr & AVR32_USART_CSR_RXRDY_MASK) {
+ // Data received
+ int value;
+ bool b_error = (USART_SUCCESS != usart_read_char(&AVR32_USART1,
+ &value));
+ if (b_error) {
+ usart_reset_status(&AVR32_USART1);
+ }
+ main_uart_rx_occur(b_error, value);
+ return;
+ }
+
+ if (AVR32_USART1.csr & AVR32_USART_CSR_TXRDY_MASK) {
+ uint8_t value_tx;
+ if (main_uart_tx_free(&value_tx)) {
+ // Transmit next data
+ usart_write_char(&AVR32_USART1, value_tx);
+ } else {
+ // Fifo empty then Stop UART transmission
+ AVR32_USART1.idr = AVR32_USART_IER_TXRDY_MASK;
+ }
+ }
+}
+
+
+void uart_config(usb_cdc_line_coding_t * cfg)
+{
+ uint32_t stopbits, parity;
+ uint32_t ier;
+
+ switch (cfg->bCharFormat) {
+ case CDC_STOP_BITS_2:
+ stopbits = USART_2_STOPBITS;
+ break;
+ case CDC_STOP_BITS_1_5:
+ stopbits = USART_1_5_STOPBITS;
+ break;
+ case CDC_STOP_BITS_1:
+ default:
+ // Default stop bit = 1 stop bit
+ stopbits = USART_1_STOPBIT;
+ break;
+ }
+
+ switch (cfg->bParityType) {
+ case CDC_PAR_EVEN:
+ parity = USART_EVEN_PARITY;
+ break;
+ case CDC_PAR_ODD:
+ parity = USART_ODD_PARITY;
+ break;
+ case CDC_PAR_MARK:
+ parity = USART_MARK_PARITY;
+ break;
+ case CDC_PAR_SPACE:
+ parity = USART_SPACE_PARITY;
+ break;
+ default:
+ case CDC_PAR_NONE:
+ parity = USART_NO_PARITY;
+ break;
+ }
+
+ // Options for USART.
+ usart_options.baudrate = LE32_TO_CPU(cfg->dwDTERate);
+ usart_options.charlength = cfg->bDataBits;
+ usart_options.paritytype = parity;
+ usart_options.stopbits = stopbits;
+ usart_options.channelmode = USART_NORMAL_CHMODE;
+ ier = AVR32_USART1.ier ;
+ usart_init_rs232(&AVR32_USART1, &usart_options, sysclk_get_pba_hz());
+ // Restore both RX and TX
+ AVR32_USART1.ier = ier;
+}
+
+void uart_open(void)
+{
+ static const gpio_map_t USART_GPIO_MAP = {
+ {AVR32_USART1_RXD_0_0_PIN, AVR32_USART1_RXD_0_0_FUNCTION},
+ {AVR32_USART1_TXD_0_0_PIN, AVR32_USART1_TXD_0_0_FUNCTION}
+ };
+
+ // Setup GPIO for USART.
+ gpio_enable_module(USART_GPIO_MAP,
+ sizeof(USART_GPIO_MAP) / sizeof(USART_GPIO_MAP[0]));
+ // Enable interrupt with priority higher than USB
+ irq_register_handler(usart_interrupt, AVR32_USART1_IRQ, 3);
+
+ // Initialize it in RS232 mode.
+ sysclk_enable_pba_module(SYSCLK_USART1);
+ if (USART_SUCCESS != usart_init_rs232(&AVR32_USART1, &usart_options,
+ sysclk_get_pba_hz())) {
+ return;
+ }
+ // Enable both RX and TX
+ AVR32_USART1.ier =
+ AVR32_USART_IER_TXRDY_MASK | AVR32_USART_IER_RXRDY_MASK;
+}
+
+void uart_close(void)
+{
+ // Disable interrupts
+ AVR32_USART1.ier = 0;
+ // Close RS232 communication
+}
+
+void uart_enable_tx(void)
+{
+ // Enable UART TX interrupt to send values
+ AVR32_USART1.ier = AVR32_USART_IER_TXRDY_MASK;
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/at32uc3a0512_evk1100/uart.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/at32uc3a0512_evk1100/uart.h
new file mode 100644
index 0000000..60e8ca4
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/at32uc3a0512_evk1100/uart.h
@@ -0,0 +1,50 @@
+/**
+ * \file
+ *
+ * \brief UART functions
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _UART_H_
+#define _UART_H_
+
+void uart_config(usb_cdc_line_coding_t * cfg);
+
+void uart_open(void);
+
+void uart_close(void);
+
+void uart_enable_tx(void);
+
+#endif // _UART_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/at32uc3a0512_evk1100/ui.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/at32uc3a0512_evk1100/ui.c
new file mode 100644
index 0000000..1ade5d4
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/at32uc3a0512_evk1100/ui.c
@@ -0,0 +1,138 @@
+/**
+ * \file
+ *
+ * \brief User Interface
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "board.h"
+#include "gpio.h"
+#include "ui.h"
+
+void ui_init(void)
+{
+ LED_On(LED0);
+ LED_Off(LED1);
+ LED_Off(LED2);
+ LED_Off(LED3);
+ LED_Off(LED_BI0_GREEN);
+ LED_Off(LED_BI0_RED);
+}
+
+void ui_powerdown(void)
+{
+ LED_Off(LED0);
+ LED_Off(LED1);
+ LED_Off(LED2);
+ LED_Off(LED_BI0_GREEN);
+ LED_Off(LED_BI0_RED);
+ LED_Off(LED_BI1_GREEN);
+ LED_Off(LED_BI1_RED);
+}
+
+void ui_wakeup(void)
+{
+ LED_On(LED0);
+}
+
+void ui_com_open(void)
+{
+ LED_On(LED2);
+}
+
+void ui_com_close(void)
+{
+ LED_Off(LED2);
+ LED_Off(LED_BI0_GREEN);
+ LED_Off(LED_BI0_RED);
+ LED_Off(LED_BI1_GREEN);
+ LED_Off(LED_BI1_RED);
+}
+
+void ui_com_rx_start(void)
+{
+ LED_On(LED_BI0_GREEN);
+}
+
+void ui_com_rx_stop(void)
+{
+ LED_Off(LED_BI0_GREEN);
+}
+
+void ui_com_tx_start(void)
+{
+ LED_On(LED_BI1_GREEN);
+}
+
+void ui_com_tx_stop(void)
+{
+ LED_Off(LED_BI1_GREEN);
+}
+
+void ui_com_error(void)
+{
+ LED_On(LED_BI0_RED);
+}
+
+void ui_com_overflow(void)
+{
+ LED_On(LED_BI1_RED);
+}
+
+
+void ui_process(uint16_t framenumber)
+{
+ if ((framenumber % 1000) == 0) {
+ LED_On(LED1);
+ }
+ if ((framenumber % 1000) == 500) {
+ LED_Off(LED1);
+ }
+}
+
+
+/**
+ * \defgroup UI User Interface
+ *
+ * Human interface on EVK1100:
+ * - Led 1 is on when CPU is not in power down mode, and the power down mode
+ * is enabled when a suspend mode is detected on USB line
+ * - Led 2 blinks when USB Host have checked and enabled CDC interface
+ * - Led 5 green is on during data transfer from CDC to UART
+ * - Led 6 green is on during data transfer from UART to CDC
+ * - Led 5 red means an frame error on UART
+ * - Led 6 red means an overflow
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128a1u_xplain_a1_mkii/conf_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128a1u_xplain_a1_mkii/conf_board.h
new file mode 100644
index 0000000..2d2aa79
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128a1u_xplain_a1_mkii/conf_board.h
@@ -0,0 +1,44 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Board configuration for spi example
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H_INCLUDED
+#define CONF_BOARD_H_INCLUDED
+
+// Enable AT45DBX Component.
+#define CONF_BOARD_AT45DBX
+
+#endif /* CONF_BOARD_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128a1u_xplain_a1_mkii/conf_clock.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128a1u_xplain_a1_mkii/conf_clock.h
new file mode 100644
index 0000000..844c93d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128a1u_xplain_a1_mkii/conf_clock.h
@@ -0,0 +1,74 @@
+/**
+ * \file
+ *
+ * \brief Clock system configuration for clock example 1
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_CLOCK_H_INCLUDED
+#define CONF_CLOCK_H_INCLUDED
+
+//! Configuration using On-Chip RC oscillator at 48MHz
+//! The RC oscillator is calibrated via USB Start Of Frame
+//! Clk USB = 48MHz (used by USB)
+//! Clk sys = 48MHz
+//! Clk cpu/per = 12MHz
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_RCOSC
+#define CONFIG_OSC_RC32_CAL 48000000UL
+
+#define CONFIG_OSC_AUTOCAL OSC_ID_RC32MHZ
+#define CONFIG_OSC_AUTOCAL_REF_OSC OSC_ID_USBSOF
+
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_RC32MHZ
+#define CONFIG_SYSCLK_PSADIV SYSCLK_PSADIV_2
+#define CONFIG_SYSCLK_PSBCDIV SYSCLK_PSBCDIV_1_2
+
+/*
+//! Use external board OSC (8MHz)
+//! Clk pll = 48MHz (used by USB)
+//! Clk sys = 48MHz
+//! Clk cpu/per = 12MHz
+
+#define CONFIG_PLL0_SOURCE PLL_SRC_XOSC
+#define CONFIG_PLL0_MUL 6
+#define CONFIG_PLL0_DIV 1
+
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL
+
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL
+#define CONFIG_SYSCLK_PSADIV SYSCLK_PSADIV_2
+#define CONFIG_SYSCLK_PSBCDIV SYSCLK_PSBCDIV_1_2
+*/
+
+
+#endif /* CONF_CLOCK_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128a1u_xplain_a1_mkii/conf_sleepmgr.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128a1u_xplain_a1_mkii/conf_sleepmgr.h
new file mode 100644
index 0000000..699010d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128a1u_xplain_a1_mkii/conf_sleepmgr.h
@@ -0,0 +1,43 @@
+/**
+ * \file
+ *
+ * \brief Sleep manager configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SLEEPMGR_H
+#define CONF_SLEEPMGR_H
+
+#define CONFIG_SLEEPMGR_ENABLE
+
+#endif /* CONF_SLEEPMGR_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128a1u_xplain_a1_mkii/uart.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128a1u_xplain_a1_mkii/uart.c
new file mode 100644
index 0000000..7c29ef0
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128a1u_xplain_a1_mkii/uart.c
@@ -0,0 +1,153 @@
+/**
+ * \file
+ *
+ * \brief User Interface from EVK1100
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "usb_protocol_cdc.h"
+#include "sysclk.h"
+#include "uart.h"
+#include "main.h"
+
+#define USART USARTC0
+
+void uart_config(usb_cdc_line_coding_t * cfg)
+{
+ uint8_t reg_ctrlc;
+
+ reg_ctrlc = USART_CMODE_ASYNCHRONOUS_gc;
+
+ switch (cfg->bCharFormat) {
+ case CDC_STOP_BITS_2:
+ reg_ctrlc |= USART_SBMODE_bm;
+ break;
+ case CDC_STOP_BITS_1:
+ default:
+ // Default stop bit = 1 stop bit
+ break;
+ }
+
+ switch (cfg->bParityType) {
+ case CDC_PAR_EVEN:
+ reg_ctrlc |= USART_PMODE_EVEN_gc;
+ break;
+ case CDC_PAR_ODD:
+ reg_ctrlc |= USART_PMODE_ODD_gc;
+ break;
+ default:
+ case CDC_PAR_NONE:
+ reg_ctrlc |= USART_PMODE_DISABLED_gc;
+ break;
+ }
+
+ switch (cfg->bDataBits) {
+ case 5:
+ reg_ctrlc |= USART_CHSIZE_5BIT_gc;
+ break;
+ case 6:
+ reg_ctrlc |= USART_CHSIZE_6BIT_gc;
+ break;
+ case 7:
+ reg_ctrlc |= USART_CHSIZE_7BIT_gc;
+ break;
+ default:
+ case 8:
+ reg_ctrlc |= USART_CHSIZE_8BIT_gc;
+ break;
+ case 9:
+ reg_ctrlc |= USART_CHSIZE_9BIT_gc;
+ break;
+ }
+
+ sysclk_enable_module(SYSCLK_PORT_C, SYSCLK_USART0);
+ // Set configuration
+ USART.CTRLC = reg_ctrlc;
+ // Update baudrate
+ USART.BAUDCTRLA = (uint16_t) (((((((uint32_t) sysclk_get_cpu_hz()) << 1)
+ /
+ ((uint32_t) le32_to_cpu(cfg->dwDTERate) * 8)) + 1) >> 1) - 1);
+}
+
+void uart_open(void)
+{
+ sysclk_enable_module(SYSCLK_PORT_C, SYSCLK_USART0);
+ // Open UART communication
+ PORTC.DIRSET = 0x08; // PC3 (TXC0) as output.
+ PORTC.DIRCLR = 0x04; // PC2 (RXC0) as input.
+ // Enable both RX and TX
+ USART.CTRLB = USART_RXEN_bm | USART_TXEN_bm | USART_CLK2X_bm;
+ // Enable interrupt with priority higher than USB
+ USART.CTRLA = (register8_t) USART_RXCINTLVL_HI_gc | (register8_t)
+ USART_DREINTLVL_OFF_gc;
+}
+
+void uart_close(void)
+{
+ sysclk_disable_module(SYSCLK_PORT_C, SYSCLK_USART0);
+ // Disable interrupts
+ USART.CTRLA = 0;
+ // Close RS232 communication
+ USART.CTRLB = 0;
+}
+
+void uart_enable_tx(void)
+{
+ // Enable UART TX interrupt to send values
+ USART.CTRLA = (register8_t) USART_RXCINTLVL_HI_gc | (register8_t)
+ USART_DREINTLVL_HI_gc;
+}
+
+
+ISR(USARTC0_RXC_vect)
+{
+ bool b_error = (0 !=
+ (USART.STATUS & (USART_FERR_bm | USART_BUFOVF_bm)));
+ main_uart_rx_occur(b_error, USART.DATA);
+}
+
+ISR(USARTC0_DRE_vect)
+{
+ uint8_t value_tx;
+ if (main_uart_tx_free(&value_tx)) {
+ // Transmit next data
+ USART.DATA = value_tx;
+ } else {
+ // Fifo empty then Stop UART transmission
+ USART.CTRLA = (register8_t) USART_RXCINTLVL_HI_gc |
+ (register8_t) USART_DREINTLVL_OFF_gc;
+ }
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128a1u_xplain_a1_mkii/uart.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128a1u_xplain_a1_mkii/uart.h
new file mode 100644
index 0000000..3e7bf98
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128a1u_xplain_a1_mkii/uart.h
@@ -0,0 +1,50 @@
+/**
+ * \file
+ *
+ * \brief User Interface from EVK1100
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _UART_H_
+#define _UART_H_
+
+void uart_config(usb_cdc_line_coding_t * cfg);
+
+void uart_open(void);
+
+void uart_close(void);
+
+void uart_enable_tx(void);
+
+#endif // _UART_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128a1u_xplain_a1_mkii/ui.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128a1u_xplain_a1_mkii/ui.c
new file mode 100644
index 0000000..6eaf6b9
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128a1u_xplain_a1_mkii/ui.c
@@ -0,0 +1,141 @@
+/**
+ * \file
+ *
+ * \brief User Interface
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "board.h"
+#include "led.h"
+#include "ui.h"
+
+void ui_init(void)
+{
+ LED_On(LEDUSB_GPIO);
+ LED_On(LED0_GPIO);
+ LED_Off(LED1_GPIO);
+ LED_Off(LED2_GPIO);
+ LED_Off(LED4_GPIO);
+ LED_Off(LED5_GPIO);
+ LED_Off(LED6_GPIO);
+ LED_Off(LED7_GPIO);
+}
+
+void ui_powerdown(void)
+{
+ LED_Off(LED0_GPIO);
+ LED_Off(LED1_GPIO);
+ LED_Off(LED2_GPIO);
+ LED_Off(LED4_GPIO);
+ LED_Off(LED5_GPIO);
+ LED_Off(LED6_GPIO);
+ LED_Off(LED7_GPIO);
+}
+
+void ui_wakeup(void)
+{
+ LED_On(LED0_GPIO);
+}
+
+void ui_com_open(void)
+{
+ LED_On(LED2_GPIO);
+}
+
+void ui_com_close(void)
+{
+ LED_Off(LED2_GPIO);
+ LED_Off(LED4_GPIO);
+ LED_Off(LED5_GPIO);
+ LED_Off(LED6_GPIO);
+ LED_Off(LED7_GPIO);
+}
+
+void ui_com_rx_start(void)
+{
+ LED_On(LED4_GPIO);
+}
+
+void ui_com_rx_stop(void)
+{
+ LED_Off(LED4_GPIO);
+}
+
+void ui_com_tx_start(void)
+{
+ LED_On(LED5_GPIO);
+}
+
+void ui_com_tx_stop(void)
+{
+ LED_Off(LED5_GPIO);
+}
+
+void ui_com_error(void)
+{
+ LED_On(LED6_GPIO);
+}
+
+void ui_com_overflow(void)
+{
+ LED_On(LED7_GPIO);
+}
+
+
+void ui_process(uint16_t framenumber)
+{
+ if (0 == framenumber) {
+ LED_On(LED1_GPIO);
+ }
+ if (1000 == framenumber) {
+ LED_Off(LED1_GPIO);
+ }
+}
+
+/**
+ * \defgroup UI User Interface
+ *
+ * Human interface on Xplain-A1:
+ * - RED led close to USB connector is always on after firmware startup
+ * - The led 0 is on when CPU is not in power down mode,
+ * and the power down mode is enabled when a suspend mode is detected on USB line
+ * - The led 1 blinks when USB Host have checked and enabled CDC interface
+ * - The led 2 is on when CDC port is open
+ * - The led 4 is on during data transfer from CDC to UART
+ * - The led 5 is on during data transfer from UART to CDC
+ * - The led 6 signals an frame error on UART
+ * - The led 7 signals an overflow
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128b1_xmega_b1_xplained/conf_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128b1_xmega_b1_xplained/conf_board.h
new file mode 100644
index 0000000..2d2aa79
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128b1_xmega_b1_xplained/conf_board.h
@@ -0,0 +1,44 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Board configuration for spi example
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H_INCLUDED
+#define CONF_BOARD_H_INCLUDED
+
+// Enable AT45DBX Component.
+#define CONF_BOARD_AT45DBX
+
+#endif /* CONF_BOARD_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128b1_xmega_b1_xplained/conf_clock.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128b1_xmega_b1_xplained/conf_clock.h
new file mode 100644
index 0000000..7980d17
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128b1_xmega_b1_xplained/conf_clock.h
@@ -0,0 +1,56 @@
+/**
+ * \file
+ *
+ * \brief Clock system configuration for clock example 1
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_CLOCK_H_INCLUDED
+#define CONF_CLOCK_H_INCLUDED
+
+//! Use external board OSC (8MHz)
+//! Clk pll = 48MHz (used by USB)
+//! Clk sys = 48MHz
+//! Clk cpu/per = 12MHz
+
+#define CONFIG_PLL0_SOURCE PLL_SRC_XOSC
+#define CONFIG_PLL0_MUL 6
+#define CONFIG_PLL0_DIV 1
+
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL
+
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL
+#define CONFIG_SYSCLK_PSADIV SYSCLK_PSADIV_2
+#define CONFIG_SYSCLK_PSBCDIV SYSCLK_PSBCDIV_1_2
+
+#endif /* CONF_CLOCK_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128b1_xmega_b1_xplained/conf_sleepmgr.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128b1_xmega_b1_xplained/conf_sleepmgr.h
new file mode 100644
index 0000000..699010d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128b1_xmega_b1_xplained/conf_sleepmgr.h
@@ -0,0 +1,43 @@
+/**
+ * \file
+ *
+ * \brief Sleep manager configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SLEEPMGR_H
+#define CONF_SLEEPMGR_H
+
+#define CONFIG_SLEEPMGR_ENABLE
+
+#endif /* CONF_SLEEPMGR_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128b1_xmega_b1_xplained/uart.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128b1_xmega_b1_xplained/uart.c
new file mode 100644
index 0000000..7c29ef0
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128b1_xmega_b1_xplained/uart.c
@@ -0,0 +1,153 @@
+/**
+ * \file
+ *
+ * \brief User Interface from EVK1100
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "usb_protocol_cdc.h"
+#include "sysclk.h"
+#include "uart.h"
+#include "main.h"
+
+#define USART USARTC0
+
+void uart_config(usb_cdc_line_coding_t * cfg)
+{
+ uint8_t reg_ctrlc;
+
+ reg_ctrlc = USART_CMODE_ASYNCHRONOUS_gc;
+
+ switch (cfg->bCharFormat) {
+ case CDC_STOP_BITS_2:
+ reg_ctrlc |= USART_SBMODE_bm;
+ break;
+ case CDC_STOP_BITS_1:
+ default:
+ // Default stop bit = 1 stop bit
+ break;
+ }
+
+ switch (cfg->bParityType) {
+ case CDC_PAR_EVEN:
+ reg_ctrlc |= USART_PMODE_EVEN_gc;
+ break;
+ case CDC_PAR_ODD:
+ reg_ctrlc |= USART_PMODE_ODD_gc;
+ break;
+ default:
+ case CDC_PAR_NONE:
+ reg_ctrlc |= USART_PMODE_DISABLED_gc;
+ break;
+ }
+
+ switch (cfg->bDataBits) {
+ case 5:
+ reg_ctrlc |= USART_CHSIZE_5BIT_gc;
+ break;
+ case 6:
+ reg_ctrlc |= USART_CHSIZE_6BIT_gc;
+ break;
+ case 7:
+ reg_ctrlc |= USART_CHSIZE_7BIT_gc;
+ break;
+ default:
+ case 8:
+ reg_ctrlc |= USART_CHSIZE_8BIT_gc;
+ break;
+ case 9:
+ reg_ctrlc |= USART_CHSIZE_9BIT_gc;
+ break;
+ }
+
+ sysclk_enable_module(SYSCLK_PORT_C, SYSCLK_USART0);
+ // Set configuration
+ USART.CTRLC = reg_ctrlc;
+ // Update baudrate
+ USART.BAUDCTRLA = (uint16_t) (((((((uint32_t) sysclk_get_cpu_hz()) << 1)
+ /
+ ((uint32_t) le32_to_cpu(cfg->dwDTERate) * 8)) + 1) >> 1) - 1);
+}
+
+void uart_open(void)
+{
+ sysclk_enable_module(SYSCLK_PORT_C, SYSCLK_USART0);
+ // Open UART communication
+ PORTC.DIRSET = 0x08; // PC3 (TXC0) as output.
+ PORTC.DIRCLR = 0x04; // PC2 (RXC0) as input.
+ // Enable both RX and TX
+ USART.CTRLB = USART_RXEN_bm | USART_TXEN_bm | USART_CLK2X_bm;
+ // Enable interrupt with priority higher than USB
+ USART.CTRLA = (register8_t) USART_RXCINTLVL_HI_gc | (register8_t)
+ USART_DREINTLVL_OFF_gc;
+}
+
+void uart_close(void)
+{
+ sysclk_disable_module(SYSCLK_PORT_C, SYSCLK_USART0);
+ // Disable interrupts
+ USART.CTRLA = 0;
+ // Close RS232 communication
+ USART.CTRLB = 0;
+}
+
+void uart_enable_tx(void)
+{
+ // Enable UART TX interrupt to send values
+ USART.CTRLA = (register8_t) USART_RXCINTLVL_HI_gc | (register8_t)
+ USART_DREINTLVL_HI_gc;
+}
+
+
+ISR(USARTC0_RXC_vect)
+{
+ bool b_error = (0 !=
+ (USART.STATUS & (USART_FERR_bm | USART_BUFOVF_bm)));
+ main_uart_rx_occur(b_error, USART.DATA);
+}
+
+ISR(USARTC0_DRE_vect)
+{
+ uint8_t value_tx;
+ if (main_uart_tx_free(&value_tx)) {
+ // Transmit next data
+ USART.DATA = value_tx;
+ } else {
+ // Fifo empty then Stop UART transmission
+ USART.CTRLA = (register8_t) USART_RXCINTLVL_HI_gc |
+ (register8_t) USART_DREINTLVL_OFF_gc;
+ }
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128b1_xmega_b1_xplained/uart.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128b1_xmega_b1_xplained/uart.h
new file mode 100644
index 0000000..3e7bf98
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128b1_xmega_b1_xplained/uart.h
@@ -0,0 +1,50 @@
+/**
+ * \file
+ *
+ * \brief User Interface from EVK1100
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _UART_H_
+#define _UART_H_
+
+void uart_config(usb_cdc_line_coding_t * cfg);
+
+void uart_open(void);
+
+void uart_close(void);
+
+void uart_enable_tx(void);
+
+#endif // _UART_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128b1_xmega_b1_xplained/ui.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128b1_xmega_b1_xplained/ui.c
new file mode 100644
index 0000000..a417a0d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega128b1_xmega_b1_xplained/ui.c
@@ -0,0 +1,134 @@
+/**
+ * \file
+ *
+ * \brief User Interface
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "board.h"
+#include "led.h"
+#include "ui.h"
+
+void ui_init(void)
+{
+
+ LED_Off(LED0_GPIO);
+ LED_Off(LED1_GPIO);
+ LED_Off(LED2_GPIO);
+ LED_Off(LED3_GPIO);
+}
+
+void ui_powerdown(void)
+{
+
+ LED_Off(LED0_GPIO);
+ LED_Off(LED1_GPIO);
+ LED_Off(LED2_GPIO);
+ LED_Off(LED3_GPIO);
+
+}
+
+void ui_wakeup(void)
+{
+
+}
+
+void ui_com_open(void)
+{
+ LED_On(LED1_GPIO);
+}
+
+void ui_com_close(void)
+{
+ LED_Off(LED1_GPIO);
+ LED_Off(LED2_GPIO);
+ LED_Off(LED3_GPIO);
+}
+
+void ui_com_rx_start(void)
+{
+ LED_On(LED2_GPIO);
+}
+
+void ui_com_rx_stop(void)
+{
+ LED_Off(LED2_GPIO);
+}
+
+void ui_com_tx_start(void)
+{
+ LED_On(LED3_GPIO);
+}
+
+void ui_com_tx_stop(void)
+{
+ LED_Off(LED3_GPIO);
+}
+
+void ui_com_error(void)
+{
+
+}
+
+void ui_com_overflow(void)
+{
+
+}
+
+
+void ui_process(uint16_t framenumber)
+{
+ if (0 == framenumber) {
+ LED_On(LED0_GPIO);
+ }
+ if (1000 == framenumber) {
+ LED_Off(LED0_GPIO);
+ }
+}
+
+/**
+ * \defgroup UI User Interface
+ *
+ * Human interface on Xplain-A1:
+ * - RED led close to USB connector is always on after firmware startup
+ * - Led 0 is on when CPU is not in power down mode,
+ * and the power down mode is enabled when a suspend mode is detected on USB line
+ * - Led 1 blinks when USB Host have checked and enabled CDC interface
+ * - Led 2 is on during data transfer from CDC to UART
+ * - Led 3 is on during data transfer from UART to CDC
+ * - Led 4 signals an frame error on UART
+ * - Led 5 signals an overflow
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega256a3bu_stk600-rc064x/conf_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega256a3bu_stk600-rc064x/conf_board.h
new file mode 100644
index 0000000..2d2aa79
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega256a3bu_stk600-rc064x/conf_board.h
@@ -0,0 +1,44 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Board configuration for spi example
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H_INCLUDED
+#define CONF_BOARD_H_INCLUDED
+
+// Enable AT45DBX Component.
+#define CONF_BOARD_AT45DBX
+
+#endif /* CONF_BOARD_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega256a3bu_stk600-rc064x/conf_clock.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega256a3bu_stk600-rc064x/conf_clock.h
new file mode 100644
index 0000000..290cf30
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega256a3bu_stk600-rc064x/conf_clock.h
@@ -0,0 +1,56 @@
+/**
+ * \file
+ *
+ * \brief Clock system configuration for clock example 1
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_CLOCK_H_INCLUDED
+#define CONF_CLOCK_H_INCLUDED
+
+// Use internal 32MRC @48MHz
+// Clk cpu/per = 12MHz
+
+
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_RCOSC
+#define CONFIG_OSC_RC32_CAL 48000000UL
+
+#define CONFIG_SYSCLK_SOURCE CLK_SCLKSEL_RC32M_gc
+#define CONFIG_SYSCLK_PSADIV SYSCLK_PSADIV_2
+#define CONFIG_SYSCLK_PSBCDIV SYSCLK_PSBCDIV_1_2
+
+#define CONFIG_OSC_AUTOCAL OSC_ID_RC32MHZ
+#define CONFIG_OSC_AUTOCAL_REF_OSC OSC_ID_USBSOF
+
+
+#endif /* CONF_CLOCK_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega256a3bu_stk600-rc064x/conf_sleepmgr.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega256a3bu_stk600-rc064x/conf_sleepmgr.h
new file mode 100644
index 0000000..699010d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega256a3bu_stk600-rc064x/conf_sleepmgr.h
@@ -0,0 +1,43 @@
+/**
+ * \file
+ *
+ * \brief Sleep manager configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SLEEPMGR_H
+#define CONF_SLEEPMGR_H
+
+#define CONFIG_SLEEPMGR_ENABLE
+
+#endif /* CONF_SLEEPMGR_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega256a3bu_stk600-rc064x/uart.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega256a3bu_stk600-rc064x/uart.c
new file mode 100644
index 0000000..7c29ef0
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega256a3bu_stk600-rc064x/uart.c
@@ -0,0 +1,153 @@
+/**
+ * \file
+ *
+ * \brief User Interface from EVK1100
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "usb_protocol_cdc.h"
+#include "sysclk.h"
+#include "uart.h"
+#include "main.h"
+
+#define USART USARTC0
+
+void uart_config(usb_cdc_line_coding_t * cfg)
+{
+ uint8_t reg_ctrlc;
+
+ reg_ctrlc = USART_CMODE_ASYNCHRONOUS_gc;
+
+ switch (cfg->bCharFormat) {
+ case CDC_STOP_BITS_2:
+ reg_ctrlc |= USART_SBMODE_bm;
+ break;
+ case CDC_STOP_BITS_1:
+ default:
+ // Default stop bit = 1 stop bit
+ break;
+ }
+
+ switch (cfg->bParityType) {
+ case CDC_PAR_EVEN:
+ reg_ctrlc |= USART_PMODE_EVEN_gc;
+ break;
+ case CDC_PAR_ODD:
+ reg_ctrlc |= USART_PMODE_ODD_gc;
+ break;
+ default:
+ case CDC_PAR_NONE:
+ reg_ctrlc |= USART_PMODE_DISABLED_gc;
+ break;
+ }
+
+ switch (cfg->bDataBits) {
+ case 5:
+ reg_ctrlc |= USART_CHSIZE_5BIT_gc;
+ break;
+ case 6:
+ reg_ctrlc |= USART_CHSIZE_6BIT_gc;
+ break;
+ case 7:
+ reg_ctrlc |= USART_CHSIZE_7BIT_gc;
+ break;
+ default:
+ case 8:
+ reg_ctrlc |= USART_CHSIZE_8BIT_gc;
+ break;
+ case 9:
+ reg_ctrlc |= USART_CHSIZE_9BIT_gc;
+ break;
+ }
+
+ sysclk_enable_module(SYSCLK_PORT_C, SYSCLK_USART0);
+ // Set configuration
+ USART.CTRLC = reg_ctrlc;
+ // Update baudrate
+ USART.BAUDCTRLA = (uint16_t) (((((((uint32_t) sysclk_get_cpu_hz()) << 1)
+ /
+ ((uint32_t) le32_to_cpu(cfg->dwDTERate) * 8)) + 1) >> 1) - 1);
+}
+
+void uart_open(void)
+{
+ sysclk_enable_module(SYSCLK_PORT_C, SYSCLK_USART0);
+ // Open UART communication
+ PORTC.DIRSET = 0x08; // PC3 (TXC0) as output.
+ PORTC.DIRCLR = 0x04; // PC2 (RXC0) as input.
+ // Enable both RX and TX
+ USART.CTRLB = USART_RXEN_bm | USART_TXEN_bm | USART_CLK2X_bm;
+ // Enable interrupt with priority higher than USB
+ USART.CTRLA = (register8_t) USART_RXCINTLVL_HI_gc | (register8_t)
+ USART_DREINTLVL_OFF_gc;
+}
+
+void uart_close(void)
+{
+ sysclk_disable_module(SYSCLK_PORT_C, SYSCLK_USART0);
+ // Disable interrupts
+ USART.CTRLA = 0;
+ // Close RS232 communication
+ USART.CTRLB = 0;
+}
+
+void uart_enable_tx(void)
+{
+ // Enable UART TX interrupt to send values
+ USART.CTRLA = (register8_t) USART_RXCINTLVL_HI_gc | (register8_t)
+ USART_DREINTLVL_HI_gc;
+}
+
+
+ISR(USARTC0_RXC_vect)
+{
+ bool b_error = (0 !=
+ (USART.STATUS & (USART_FERR_bm | USART_BUFOVF_bm)));
+ main_uart_rx_occur(b_error, USART.DATA);
+}
+
+ISR(USARTC0_DRE_vect)
+{
+ uint8_t value_tx;
+ if (main_uart_tx_free(&value_tx)) {
+ // Transmit next data
+ USART.DATA = value_tx;
+ } else {
+ // Fifo empty then Stop UART transmission
+ USART.CTRLA = (register8_t) USART_RXCINTLVL_HI_gc |
+ (register8_t) USART_DREINTLVL_OFF_gc;
+ }
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega256a3bu_stk600-rc064x/uart.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega256a3bu_stk600-rc064x/uart.h
new file mode 100644
index 0000000..3e7bf98
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega256a3bu_stk600-rc064x/uart.h
@@ -0,0 +1,50 @@
+/**
+ * \file
+ *
+ * \brief User Interface from EVK1100
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _UART_H_
+#define _UART_H_
+
+void uart_config(usb_cdc_line_coding_t * cfg);
+
+void uart_open(void);
+
+void uart_close(void);
+
+void uart_enable_tx(void);
+
+#endif // _UART_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega256a3bu_stk600-rc064x/ui.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega256a3bu_stk600-rc064x/ui.c
new file mode 100644
index 0000000..ad719d1
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/atxmega256a3bu_stk600-rc064x/ui.c
@@ -0,0 +1,136 @@
+/**
+ * \file
+ *
+ * \brief User Interface
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "board.h"
+#include "led.h"
+#include "ui.h"
+
+void ui_init(void)
+{
+ LED_Off(LED0_GPIO);
+ LED_Off(LED1_GPIO);
+ LED_Off(LED2_GPIO);
+ LED_Off(LED3_GPIO);
+ LED_Off(LED4_GPIO);
+ LED_Off(LED5_GPIO);
+}
+
+void ui_powerdown(void)
+{
+ LED_Off(LED0_GPIO);
+ LED_Off(LED1_GPIO);
+ LED_Off(LED2_GPIO);
+ LED_Off(LED3_GPIO);
+ LED_Off(LED4_GPIO);
+ LED_Off(LED5_GPIO);
+}
+
+void ui_wakeup(void)
+{
+}
+
+void ui_com_open(void)
+{
+ LED_On(LED1_GPIO);
+}
+
+void ui_com_close(void)
+{
+ LED_Off(LED1_GPIO);
+ LED_Off(LED2_GPIO);
+ LED_Off(LED3_GPIO);
+ LED_Off(LED4_GPIO);
+ LED_Off(LED5_GPIO);
+}
+
+void ui_com_rx_start(void)
+{
+ LED_On(LED2_GPIO);
+}
+
+void ui_com_rx_stop(void)
+{
+ LED_Off(LED2_GPIO);
+}
+
+void ui_com_tx_start(void)
+{
+ LED_On(LED3_GPIO);
+}
+
+void ui_com_tx_stop(void)
+{
+ LED_Off(LED3_GPIO);
+}
+
+void ui_com_error(void)
+{
+ LED_On(LED4_GPIO);
+}
+
+void ui_com_overflow(void)
+{
+ LED_On(LED5_GPIO);
+}
+
+
+void ui_process(uint16_t framenumber)
+{
+ if (0 == framenumber) {
+ LED_On(LED0_GPIO);
+ }
+ if (1000 == framenumber) {
+ LED_Off(LED0_GPIO);
+ }
+}
+
+/**
+ * \defgroup UI User Interface
+ *
+ * Human interface on Xplain-A1:
+ * - RED led close to USB connector is always on after firmware startup
+ * - Led 0 is on when CPU is not in power down mode,
+ * and the power down mode is enabled when a suspend mode is detected on USB line
+ * - Led 1 blinks when USB Host have checked and enabled CDC interface
+ * - Led 2 is on during data transfer from CDC to UART
+ * - Led 3 is on during data transfer from UART to CDC
+ * - Led 4 signals an frame error on UART
+ * - Led 5 signals an overflow
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/avr_cdc.inf b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/avr_cdc.inf
new file mode 100644
index 0000000..523404e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/avr_cdc.inf
@@ -0,0 +1,97 @@
+; Windows 2000, XP & Vista setup File for AVR CDC Device
+
+; Copyright (c) 2000 Microsoft Corporation
+; Copyright (C) 2007 ATMEL, Inc.
+
+[Version]
+Signature="$Windows NT$"
+Class=Ports
+ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
+
+Provider=%ATMEL%
+DriverVer=10/15/1999,5.0.2153.1
+
+;----------------------------------------------------------
+; Targets
+;----------------------------------------------------------
+[Manufacturer]
+%ATMEL%=ATMEL, NTamd64
+
+[ATMEL]
+%ATMEL_CDC%=Reader, USB\VID_03EB&PID_2404
+
+[ATMEL.NTamd64]
+%ATMEL_CDC%=DriverInstall, USB\VID_03EB&PID_2404
+
+
+;----------------------------------------------------------
+; Windows 2K, XP, and Vista32
+;----------------------------------------------------------
+[Reader_Install.NTx86]
+
+
+[DestinationDirs]
+DefaultDestDir=12
+Reader.NT.Copy=12
+
+[Reader.NT]
+include=mdmcpq.inf
+CopyFiles=Reader.NT.Copy
+AddReg=Reader.NT.AddReg
+
+[Reader.NT.Copy]
+usbser.sys
+
+[Reader.NT.AddReg]
+HKR,,DevLoader,,*ntkern
+HKR,,NTMPDriver,,usbser.sys
+HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
+
+[Reader.NT.Services]
+AddService = usbser, 0x00000002, Service_Inst
+
+[Service_Inst]
+DisplayName = %Serial.SvcDesc%
+ServiceType = 1 ; SERVICE_KERNEL_DRIVER
+StartType = 3 ; SERVICE_DEMAND_START
+ErrorControl = 1 ; SERVICE_ERROR_NORMAL
+ServiceBinary = %12%\usbser.sys
+LoadOrderGroup = Base
+
+
+;----------------------------------------------------------
+; Vista64
+;----------------------------------------------------------
+
+[DriverInstall.NTamd64]
+include=mdmcpq.inf
+CopyFiles=DriverCopyFiles.NTamd64
+AddReg=DriverInstall.NTamd64.AddReg
+
+[DriverCopyFiles.NTamd64]
+usbser.sys,,,0x20
+
+[DriverInstall.NTamd64.AddReg]
+HKR,,DevLoader,,*ntkern
+HKR,,NTMPDriver,,usbser.sys
+HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
+
+[DriverInstall.NTamd64.Services]
+AddService=usbser, 0x00000002, DriverService.NTamd64
+
+[DriverService.NTamd64]
+DisplayName=%Serial.SvcDesc%
+ServiceType=1
+StartType=3
+ErrorControl=1
+ServiceBinary=%12%\usbser.sys
+
+;----------------------------------------------------------
+; String
+;----------------------------------------------------------
+
+[Strings]
+ATMEL = "ATMEL, Inc."
+ATMEL_CDC = "AVR Communication Device Class"
+Serial.SvcDesc = "USB Serial emulation driver"
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/conf_usb.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/conf_usb.h
new file mode 100644
index 0000000..94a1b2c
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/conf_usb.h
@@ -0,0 +1,132 @@
+/**
+ * \file
+ *
+ * \brief USB configuration file for CDC application
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _CONF_USB_H_
+#define _CONF_USB_H_
+
+#include "compiler.h"
+
+/**
+ * USB Device Configuration
+ * @{
+ */
+
+//! Device definition (mandatory)
+#define USB_DEVICE_VENDOR_ID USB_VID_ATMEL
+#define USB_DEVICE_PRODUCT_ID USB_PID_ATMEL_AVR_CDC
+#define USB_DEVICE_MAJOR_VERSION 1
+#define USB_DEVICE_MINOR_VERSION 0
+#define USB_DEVICE_POWER 100 // Consumption on Vbus line (mA)
+#define USB_DEVICE_ATTR \
+ (USB_CONFIG_ATTR_SELF_POWERED)
+// (USB_CONFIG_ATTR_BUS_POWERED)
+// (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_SELF_POWERED)
+// (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_BUS_POWERED)
+
+//! USB Device string definitions (Optional)
+#define USB_DEVICE_MANUFACTURE_NAME "ATMEL AVR"
+#define USB_DEVICE_PRODUCT_NAME "CDC"
+// #define USB_DEVICE_SERIAL_NAME "12...EF"
+
+
+/**
+ * Device speeds support
+ * Low speed not supported by CDC
+ * @{
+ */
+//! To authorize the High speed
+#if (UC3A3||UC3A4)
+//#define USB_DEVICE_HS_SUPPORT
+#endif
+//@}
+
+
+/**
+ * USB Device Callbacks definitions (Optional)
+ * @{
+ */
+#define UDC_VBUS_EVENT(b_vbus_high) main_vbus_action(b_vbus_high)
+#define UDC_SOF_EVENT() main_sof_action()
+#define UDC_SUSPEND_EVENT() main_suspend_action()
+#define UDC_RESUME_EVENT() main_resume_action()
+//! Mandatory when USB_DEVICE_ATTR authorizes remote wakeup feature
+// #define UDC_REMOTEWAKEUP_ENABLE() user_callback_remotewakeup_enable()
+// #define UDC_REMOTEWAKEUP_DISABLE() user_callback_remotewakeup_disable()
+//! When a extra string descriptor must be supported
+//! other than manufacturer, product and serial string
+// #define UDC_GET_EXTRA_STRING()
+//@}
+
+//@}
+
+
+/**
+ * USB Interface Configuration
+ * @{
+ */
+/**
+ * Configuration of CDC interface
+ * @{
+ */
+//! Interface callback definition
+#define UDI_CDC_ENABLE_EXT() main_cdc_enable()
+#define UDI_CDC_DISABLE_EXT() main_cdc_disable()
+#define UDI_CDC_SET_CODING_EXT(cfg) main_cdc_config_uart(cfg)
+#define UDI_CDC_SET_DTR_EXT(set) main_cdc_set_dtr(set)
+#define UDI_CDC_SET_RTS_EXT(set)
+
+//! Default configuration of communication port
+#define UDI_CDC_DEFAULT_RATE 115200
+#define UDI_CDC_DEFAULT_STOPBITS CDC_STOP_BITS_1
+#define UDI_CDC_DEFAULT_PARITY CDC_PAR_NONE
+#define UDI_CDC_DEFAULT_DATABITS 8
+//@}
+//@}
+
+
+/**
+ * USB Device Driver Configuration
+ * @{
+ */
+//@}
+
+//! The includes of classes and other headers must be done at the end of this file to avoid compile error
+#include "udi_cdc_conf.h"
+#include "main.h"
+
+#endif // _CONF_USB_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/main.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/main.c
new file mode 100644
index 0000000..2b29ed4
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/main.c
@@ -0,0 +1,314 @@
+/**
+ * \file
+ *
+ * \brief CDC Application Main functions
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "preprocessor.h"
+#include "board.h"
+#include "gpio.h"
+#include "sysclk.h"
+#include "sleepmgr.h"
+#include "conf_usb.h"
+#include "udd.h"
+#include "udc.h"
+#include "udi_cdc.h"
+#include "ui.h"
+#include "uart.h"
+#include "fifo.h"
+#include <stdio.h> // printf redirection
+
+
+#define MAIN_CDC_FIFO_SIZE 32 // Must be a power of 2
+
+static bool main_b_cdc_enable = false;
+static bool main_b_com_startup = false;
+static bool main_b_com_open = false;
+
+static uint8_t fifo_rx[MAIN_CDC_FIFO_SIZE];
+static uint8_t fifo_tx[MAIN_CDC_FIFO_SIZE];
+
+static fifo_desc_t fifo_desc_rx;
+static fifo_desc_t fifo_desc_tx;
+
+const char main_msg_welcome[] = "\x0C"
+ "--------------------------\r\n"
+ " ATMEL CDC UART bridge \r\n"
+ "--------------------------\r\n";
+
+static void main_cdc_open(bool b_enable);
+
+/*! \brief Main function. Execution starts here.
+ */
+int main(void)
+{
+ irq_initialize_vectors();
+ cpu_irq_enable();
+
+ // Initialize the sleep manager
+ sleepmgr_init();
+
+ sysclk_init();
+ board_init();
+ ui_init();
+ ui_powerdown();
+
+ // Initialize the FIFOs
+ fifo_init(&fifo_desc_rx, &fifo_rx, MAIN_CDC_FIFO_SIZE);
+ fifo_init(&fifo_desc_tx, &fifo_tx, MAIN_CDC_FIFO_SIZE);
+
+ // Start USB stack to authorize VBus monitoring
+ udc_start();
+
+ if (!udc_include_vbus_monitoring()) {
+ // VBUS monitoring is not available on this product
+ // thereby VBUS has to be considered as present
+ main_vbus_action(true);
+ }
+ // The main loop manages only the power mode
+ // because the USB management is done by interrupt
+ while (true) {
+
+ sleepmgr_enter_sleep();
+
+ if (main_b_com_open) {
+ // To display a message when the port is open
+ if (main_b_com_startup) {
+ udi_cdc_ctrl_signal_dsr(true);
+ udi_cdc_ctrl_signal_dsr(false);
+ main_b_com_startup = false;
+ }
+ //** The transfer fifo<->CDC is done in the main loop
+ // to reduce process time in TX/RX UART interrupts
+ // Transfer CDC RX to UART TX fifo
+ while (udi_cdc_is_rx_ready()) {
+ if (fifo_get_free_size(&fifo_desc_tx) == 0)
+ break; // Fifo full then transmission
+ ui_com_rx_start();
+ fifo_push_byte(&fifo_desc_tx, udi_cdc_getc());
+ uart_enable_tx();
+ }
+ // Transfer UART RX fifo to CDC TX
+ while (udi_cdc_is_tx_ready()) {
+ uint8_t value_pull;
+ if (fifo_pull_byte(&fifo_desc_rx, &value_pull) !=
+ FIFO_OK) {
+ // No data then end of loop
+ ui_com_tx_stop();
+ break;
+ }
+ udi_cdc_putc(value_pull);
+ }
+ }
+ }
+}
+
+void main_vbus_action(bool b_high)
+{
+ if (b_high) {
+ // Attach USB Device
+ udc_attach();
+ } else {
+ // VBUS not present
+ udc_detach();
+ }
+}
+
+void main_suspend_action(void)
+{
+ ui_powerdown();
+}
+
+void main_resume_action(void)
+{
+ ui_wakeup();
+}
+
+void main_sof_action(void)
+{
+ if (!main_b_cdc_enable)
+ return;
+ ui_process(udd_get_frame_number());
+}
+
+bool main_cdc_enable(void)
+{
+ main_b_cdc_enable = true;
+
+#ifdef UDI_CDC_DONT_USE_DTR_SIGNAL_TO_OPEN_COM
+ // Open port
+ main_cdc_open(true);
+#else
+ // Nothing, wait open port with DTR signal
+#endif
+ return true;
+}
+
+void main_cdc_disable(void)
+{
+ main_b_cdc_enable = false;
+ // Close communication
+ main_cdc_open(false);
+}
+
+void main_cdc_config_uart(usb_cdc_line_coding_t * cfg)
+{
+ uart_config(cfg);
+}
+
+
+void main_cdc_set_dtr(bool b_enable)
+{
+#ifndef UDI_CDC_DONT_USE_DTR_SIGNAL_TO_OPEN_COM
+ main_cdc_open(b_enable);
+#endif
+}
+
+static void main_cdc_open(bool b_enable)
+{
+ if (b_enable) {
+ // Open communication
+ fifo_flush(&fifo_desc_rx);
+ fifo_flush(&fifo_desc_tx);
+ uart_open();
+ ui_com_open();
+ main_b_com_startup = true;
+ main_b_com_open = true;
+ } else {
+ // Close communication
+ uart_close();
+ ui_com_close();
+ main_b_com_startup = false;
+ main_b_com_open = false;
+ }
+}
+
+void main_uart_rx_occur(bool b_error, uint8_t value_rx)
+{
+ if (b_error) {
+ udi_cdc_signal_framing_error();
+ ui_com_error();
+ }
+ if (fifo_push_byte(&fifo_desc_rx, value_rx) != FIFO_OK) {
+ // Fifo full
+ udi_cdc_signal_overrun();
+ ui_com_overflow();
+ }
+ ui_com_tx_start();
+}
+
+bool main_uart_tx_free(uint8_t * value_rx)
+{
+ if (fifo_pull_byte(&fifo_desc_tx, value_rx) == FIFO_OK) {
+ return true;
+ }
+ // Fifo empty then Stop UART transmission
+ ui_com_rx_stop();
+ return false;
+}
+
+
+/**
+ * \mainpage ASF USB Device CDC
+ *
+ * \section intro Introduction
+ * This example shows how to implement a USB Device CDC
+ * on AVR products with USB module.
+ * The application note AVR4907 provides more information
+ * about this implementation.
+ *
+ * \section desc Description of the Communication Device Class (CDC)
+ * The Communication Device Class (CDC) is a general-purpose way to enable all
+ * types of communications on the Universal Serial Bus (USB).
+ * This class makes it possible to connect communication devices such as
+ * digital telephones or analog modems, as well as networking devices
+ * like ADSL or Cable modems.
+ * While a CDC device enables the implementation of quite complex devices,
+ * it can also be used as a very simple method for communication on the USB.
+ * For example, a CDC device can appear as a virtual COM port, which greatly
+ * simplifies application development on the host side.
+ *
+ * \section startup Startup
+ * The example is a bridge between a USART from the main MCU
+ * and the USB CDC interface.
+ *
+ * For our example, we will only use a PC as a host for the demonstration:
+ * it will connect to the USB and to the USART board connector.
+ * - Connect the USART peripheral to the USART interface of the board.
+ * - Connect the application to a USB host (e.g. a PC)
+ * with a mini-B (embedded side) to A (PC host side) cable.
+ * The application will behave as a virtual COM (see Windows Hardware Manager).
+ * - Open a hyperterminal on both COM ports (RS232 and Virtual COM)
+ * - Select the same configuration for both COM ports up to 115200 baud.
+ * - Type a character in one hyperterminal and see it in the other.
+ *
+ * \note
+ * On the first connection of the board on the PC,
+ * the operating system will detect a new peripheral:
+ * - This will open a new hardware installation window.
+ * - Choose "No, not this time" to connect to Windows Update for this installation
+ * - click "Next"
+ * - At the request to search the INF file, give the "./cdc/example/" folder
+ * - click "Next"
+ *
+ * \copydoc UI
+ *
+ * \section example About example
+ *
+ * The example uses the following module groups:
+ * - Basic modules:
+ * Startup, board, clock, interrupt, power management
+ * - USB Device stack and CDC modules:
+ * <br>services/usb/
+ * <br>services/usb/udc/
+ * <br>services/usb/class/cdc/
+ * - Specific implementation:
+ * - main.c,
+ * <br>initializes clock
+ * <br>initializes interrupt
+ * <br>\subpage power_management
+ * <br>manages UI
+ * - specific implementation for each target "./examples/product_board/":
+ * - conf_foo.h configuration of each module
+ * - ui.c implement of user's interface (leds,buttons...)
+ * - uart.c implement of RS232 bridge
+ *
+ * <SUP>1</SUP>Simple FIFOs are implemented between UART and CDC interfaces.
+ * The CDC I/O routines are called directly in UART RX/TX interrupts
+ * to avoid data being lost.
+ * In this case, the CDC I/O routines are called in the main loop to fill
+ * or read FIFOs. The redirection of printf to CDC is supported for GCC only.
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/main.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/main.h
new file mode 100644
index 0000000..2d850b2
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/main.h
@@ -0,0 +1,97 @@
+/**
+ * \file
+ *
+ * \brief Main functions
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _MAIN_H_
+#define _MAIN_H_
+
+#include "usb_protocol_cdc.h"
+
+/*! \brief Called by CDC interface
+ * Callback running when USB Host enable CDC interface
+ *
+ * \retval true if cdc startup is successfully done
+ */
+bool main_cdc_enable(void);
+
+/*! \brief Called by CDC interface
+ * Callback running when USB Host disable cdc interface
+ */
+void main_cdc_disable(void);
+
+/*! \brief Called when Vbus line state changes
+ */
+void main_vbus_action(bool b_high);
+
+/*! \brief Called when a start of frame is received on USB line
+ */
+void main_sof_action(void);
+
+/*! \brief Called by UDD when a suspend is received
+ * Callback running when USB Host set USB line in suspend state
+ */
+void main_suspend_action(void);
+
+/*! \brief Called by UDD when the USB line resume from the suspend state
+ */
+void main_resume_action(void);
+
+/*! \brief Called by UDC when USB Host requests to enable remote wakeup
+ */
+void main_remotewakeup_enable(void);
+
+/*! \brief Called by UDC when USB Host requests to disable remote wakeup
+ */
+void main_remotewakeup_disable(void);
+
+/*! \brief Called by CDC interface to config port
+ */
+void main_cdc_config_uart(usb_cdc_line_coding_t * cfg);
+
+/*! \brief Called by CDC interface to open/close port communication
+ */
+void main_cdc_set_dtr(bool b_enable);
+
+/*! \brief Called by UART interrupt when a data is received
+ */
+void main_uart_rx_occur(bool b_error, uint8_t value_rx);
+
+/*! \brief Called by UART interrupt when it is ready to send next data
+ */
+bool main_uart_tx_free(uint8_t * value_rx);
+
+#endif // _MAIN_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/ui.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/ui.h
new file mode 100644
index 0000000..186c16c
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/example/ui.h
@@ -0,0 +1,91 @@
+/**
+ * \file
+ *
+ * \brief Common User Interface for CDC application
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _UI_H_
+#define _UI_H_
+
+/*! \brief Called at firmware startup
+ */
+void ui_init(void);
+
+/*! \brief Called before enter in powerdown mode
+ */
+void ui_powerdown(void);
+
+/*! \brief Called when CPU exit of powerdown mode
+ */
+void ui_wakeup(void);
+
+/*! \brief Called when communication port is opened
+ */
+void ui_com_open(void);
+
+/*! \brief Called when communication port is closed
+ */
+void ui_com_close(void);
+
+/*! \brief Called when a data is received on CDC
+ */
+void ui_com_rx_start(void);
+
+/*! \brief Called when a data is received on port com
+ */
+void ui_com_tx_start(void);
+
+/*! \brief Called when all data pending are sent on port com
+ */
+void ui_com_rx_stop(void);
+
+/*! \brief Called when all data pending are sent on CDC
+ */
+void ui_com_tx_stop(void);
+
+/*! \brief Called when a communication error occur
+ */
+void ui_com_error(void);
+
+/*! \brief Called when a overflow occur
+ */
+void ui_com_overflow(void);
+
+/*! \brief This process is called each 1ms
+ * It is called only if CDC interface is enable.
+ */
+void ui_process(uint16_t framenumber);
+
+#endif // _UI_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/module_config/conf_usb.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/module_config/conf_usb.h
new file mode 100644
index 0000000..7e4d8d5
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/module_config/conf_usb.h
@@ -0,0 +1,133 @@
+/**
+ * \file
+ *
+ * \brief USB configuration file for CDC application
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _CONF_USB_H_
+#define _CONF_USB_H_
+
+#include "compiler.h"
+
+#warning You must refill the following definitions with a correct values
+
+/**
+ * USB Device Configuration
+ * @{
+ */
+
+//! Device definition (mandatory)
+#define USB_DEVICE_VENDOR_ID 0x0000
+#define USB_DEVICE_PRODUCT_ID 0x0000
+#define USB_DEVICE_MAJOR_VERSION 1
+#define USB_DEVICE_MINOR_VERSION 0
+#define USB_DEVICE_POWER 100 // Consumption on Vbus line (mA) // Consumption on Vbus line (mA)
+#define USB_DEVICE_ATTR \
+ (USB_CONFIG_ATTR_SELF_POWERED)
+// (USB_CONFIG_ATTR_BUS_POWERED)
+// (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_SELF_POWERED)
+// (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_BUS_POWERED)
+
+//! USB Device string definitions (Optional)
+// #define USB_DEVICE_MANUFACTURE_NAME "Manufacture name"
+// #define USB_DEVICE_PRODUCT_NAME "Product name"
+// #define USB_DEVICE_SERIAL_NAME "12...EF"
+
+
+/**
+ * Device speeds support
+ * Low speed not supported by CDC
+ * @{
+ */
+//! To authorize the High speed
+#if (UC3A3||UC3A4)
+//#define USB_DEVICE_HS_SUPPORT
+#endif
+//@}
+
+
+/**
+ * USB Device Callbacks definitions (Optional)
+ * @{
+ */
+// #define UDC_VBUS_EVENT(b_vbus_high) user_callback_vbus_action(b_vbus_high)
+// #define UDC_SOF_EVENT() user_callback_sof_action()
+// #define UDC_SUSPEND_EVENT() user_callback_suspend_action()
+// #define UDC_RESUME_EVENT() user_callback_resume_action()
+//! Mandatory when USB_DEVICE_ATTR authorizes remote wakeup feature
+// #define UDC_REMOTEWAKEUP_ENABLE() user_callback_remotewakeup_enable()
+// #define UDC_REMOTEWAKEUP_DISABLE() user_callback_remotewakeup_disable()
+//! When a extra string descriptor must be supported
+//! other than manufacturer, product and serial string
+// #define UDC_GET_EXTRA_STRING()
+//@}
+
+//@}
+
+
+/**
+ * USB Interface Configuration
+ * @{
+ */
+/**
+ * Configuration of CDC interface
+ * @{
+ */
+//! Interface callback definition
+#define UDI_CDC_ENABLE_EXT() true
+#define UDI_CDC_DISABLE_EXT()
+#define UDI_CDC_SET_CODING_EXT(cfg)
+#define UDI_CDC_SET_DTR_EXT(set)
+#define UDI_CDC_SET_RTS_EXT(set)
+
+//! Default configuration of communication port
+#define UDI_CDC_DEFAULT_RATE 115200
+#define UDI_CDC_DEFAULT_STOPBITS CDC_STOP_BITS_1
+#define UDI_CDC_DEFAULT_PARITY CDC_PAR_NONE
+#define UDI_CDC_DEFAULT_DATABITS 8
+//@}
+//@}
+
+
+/**
+ * USB Device Driver Configuration
+ * @{
+ */
+//@}
+
+//! The includes of classes and other headers must be done at the end of this file to avoid compile error
+#include "udi_cdc_conf.h"
+
+#endif // _CONF_USB_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/udi_cdc.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/udi_cdc.c
new file mode 100644
index 0000000..5ca367e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/udi_cdc.c
@@ -0,0 +1,581 @@
+/**
+ * \file
+ *
+ * \brief USB Device Communication Device Class (CDC) interface.
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "conf_usb.h"
+#include "usb_protocol.h"
+#include "usb_protocol_cdc.h"
+#include "udd.h"
+#include "udc.h"
+#include "udi_cdc.h"
+
+
+/**
+ * \addtogroup udi_cdc_group
+ *
+ * @{
+ */
+
+/**
+ * \name Interface for UDC
+ */
+//@{
+
+bool udi_cdc_comm_enable(void);
+void udi_cdc_comm_disable(void);
+bool udi_cdc_comm_setup(void);
+bool udi_cdc_data_enable(void);
+void udi_cdc_data_disable(void);
+bool udi_cdc_data_setup(void);
+uint8_t udi_cdc_getsetting(void);
+
+//! Global structure which contains standard UDI API for UDC
+UDC_DESC_STORAGE udi_api_t udi_api_cdc_comm = {
+ .enable = udi_cdc_comm_enable,
+ .disable = udi_cdc_comm_disable,
+ .setup = udi_cdc_comm_setup,
+ .getsetting = udi_cdc_getsetting,
+};
+
+UDC_DESC_STORAGE udi_api_t udi_api_cdc_data = {
+ .enable = udi_cdc_data_enable,
+ .disable = udi_cdc_data_disable,
+ .setup = udi_cdc_data_setup,
+ .getsetting = udi_cdc_getsetting,
+};
+
+//@}
+
+//! Information about configuration of communication line
+usb_cdc_line_coding_t udi_cdc_line_coding;
+bool udi_cdc_serial_state_msg_ongoing;
+static le16_t udi_cdc_state;
+static usb_cdc_notify_serial_state_t uid_cdc_state_msg = {
+ .header.bmRequestType =
+ USB_REQ_DIR_IN | USB_REQ_TYPE_CLASS |
+ USB_REQ_RECIP_INTERFACE,
+ .header.bNotification = USB_REQ_CDC_NOTIFY_SERIAL_STATE,
+ .header.wValue = LE16(0),
+ .header.wIndex = LE16(UDI_CDC_COMM_IFACE_NUMBER),
+ .header.wLength = LE16(2),
+};
+
+/**
+ * \name Variables to manage RX/TX transfer requests
+ * Two buffers for each sense are used to optimize the speed.
+ */
+//@{
+
+//! Buffer to receive data
+COMPILER_WORD_ALIGNED static uint8_t udi_cdc_rx_buf[2][UDI_CDC_DATA_EPS_SIZE];
+//! Data available in RX buffers
+static volatile uint8_t udi_cdc_rx_buf_nb[2];
+//! Read position in current RX buffer
+static uint8_t udi_cdc_rx_pos;
+//! Give the current RX buffer used (rx0 if 0, rx1 if 1)
+static uint8_t udi_cdc_rx_buf_sel;
+//! Give current RX buffer used by the transfer
+//! (rx0 if 0, rx1 if 1, no trans if UDI_CDC_TRANS_HALTED)
+static volatile uint8_t udi_cdc_rx_trans_sel;
+
+//! Buffer to send data
+COMPILER_WORD_ALIGNED static uint8_t udi_cdc_tx_buf[2][UDI_CDC_DATA_EPS_SIZE];
+//! Data available in TX buffers
+static uint8_t udi_cdc_tx_buf_nb[2];
+//! Give current TX buffer used (tx0 if 0, tx1 if 1)
+static volatile uint8_t udi_cdc_tx_buf_sel;
+//! Give current TX buffer used by the transfer
+//! (tx0 if 0, tx1 if 1, no trans if UDI_CDC_TRANS_HALTED)
+static volatile uint8_t udi_cdc_tx_trans_sel;
+//! To enable/disable the automatic send of next TX buffer
+//! after current sent finish
+static volatile bool udi_cdc_tx_b_trans_reload;
+
+//! Define a transfer halted
+#define UDI_CDC_TRANS_HALTED 2
+
+//@}
+
+
+/**
+ * \name Internal routines
+ */
+//@{
+
+/**
+ * \name Routines to control serial line
+ */
+//@{
+
+/**
+ * \brief Sends lien coding to application
+ *
+ * Called after SETUP request when line coding data is received.
+ */
+void udi_cdc_line_coding_received(void);
+
+/**
+ * \brief Records new state and eventually notify the USB host
+ *
+ * \param b_set State is enabled if true, else disabled
+ * \param bit_mask Field to process (see CDC_SERIAL_STATE_ defines)
+ */
+static void udi_cdc_ctrl_state_change(bool b_set, le16_t bit_mask);
+
+/**
+ * \brief Ack sent of serial state message
+ * Callback called after serial state message sent
+ *
+ * \param status UDD_EP_TRANSFER_OK, if transfer finished
+ * \param status UDD_EP_TRANSFER_ABORT, if transfer aborted
+ * \param n number of data transfered
+ */
+void udi_cdc_serial_state_msg_sent(udd_ep_status_t status, iram_size_t n);
+
+//@}
+
+/**
+ * \name Routines to process data transfer
+ */
+//@{
+
+/**
+ * \brief Enable the reception of data from the USB host
+ *
+ * The value udi_cdc_rx_trans_sel indicate the RX buffer to fill.
+ *
+ * \return \c 1 if function was successfully done, otherwise \c 0.
+ */
+static bool udi_cdc_rx_start(void);
+
+/**
+ * \brief Update RX buffer management with a new data
+ * Callback called after data reception on USB line
+ *
+ * \param status UDD_EP_TRANSFER_OK, if transfer finish
+ * \param status UDD_EP_TRANSFER_ABORT, if transfer aborted
+ * \param n number of data received
+ */
+void udi_cdc_data_recevied(udd_ep_status_t status, iram_size_t n);
+
+/**
+ * \brief Sends a TX buffer to the USB host
+ *
+ * The value udi_cdc_tx_trans_sel indicates the TX buffer's content to send.
+ *
+ * \return \c 1 if function was successfully done, otherwise \c 0.
+ */
+static bool udi_cdc_tx_start(void);
+
+/**
+ * \brief Valid TX buffer sent
+ * Callback called after data transfer on USB line
+ *
+ * \param status UDD_EP_TRANSFER_OK, if transfer finished
+ * \param status UDD_EP_TRANSFER_ABORT, if transfer aborted
+ * \param n number of data transfered
+ */
+void udi_cdc_data_sent(udd_ep_status_t status, iram_size_t n);
+//@}
+
+//@}
+
+
+bool udi_cdc_comm_enable(void)
+{
+ // Initialize control signal management
+ udi_cdc_state = CPU_TO_LE16(0);
+ uid_cdc_state_msg.value = CPU_TO_LE16(0);
+
+ udi_cdc_line_coding.dwDTERate = CPU_TO_LE32(UDI_CDC_DEFAULT_RATE);
+ udi_cdc_line_coding.bCharFormat = UDI_CDC_DEFAULT_STOPBITS;
+ udi_cdc_line_coding.bParityType = UDI_CDC_DEFAULT_PARITY;
+ udi_cdc_line_coding.bDataBits = UDI_CDC_DEFAULT_DATABITS;
+ UDI_CDC_SET_CODING_EXT((&udi_cdc_line_coding));
+
+ // Call application callback
+ // to initialize memories or indicate that interface is enabled
+ return UDI_CDC_ENABLE_EXT();
+}
+
+bool udi_cdc_data_enable(void)
+{
+ // Initialize control signal management
+ udi_cdc_state = CPU_TO_LE16(0);
+ uid_cdc_state_msg.value = CPU_TO_LE16(0);
+
+
+ // Initialize TX management
+ udi_cdc_tx_buf_nb[0] = 0;
+ udi_cdc_tx_buf_nb[1] = 0;
+ udi_cdc_tx_buf_sel = 0;
+ udi_cdc_tx_trans_sel = UDI_CDC_TRANS_HALTED;
+
+ // Initialize RX management
+ udi_cdc_rx_buf_nb[0] = 0;
+ udi_cdc_rx_buf_nb[1] = 0;
+ udi_cdc_rx_pos = 0;
+ udi_cdc_rx_buf_sel = 0;
+ udi_cdc_rx_trans_sel = 0;
+ return udi_cdc_rx_start();
+}
+
+
+void udi_cdc_comm_disable(void)
+{
+ UDI_CDC_DISABLE_EXT();
+}
+
+void udi_cdc_data_disable(void)
+{
+}
+
+
+bool udi_cdc_comm_setup(void)
+{
+ if (Udd_setup_is_in()) {
+ // GET Interface Requests
+ if (Udd_setup_type() == USB_REQ_TYPE_CLASS) {
+ // Requests Class Interface Get
+ switch (udd_g_ctrlreq.req.bRequest) {
+ case USB_REQ_CDC_GET_LINE_CODING:
+ // Get configuration of CDC line
+ if (sizeof(usb_cdc_line_coding_t) !=
+ udd_g_ctrlreq.req.wLength)
+ return false; // Error for USB host
+ udd_g_ctrlreq.payload =
+ (uint8_t *) &
+ udi_cdc_line_coding;
+ udd_g_ctrlreq.payload_size =
+ sizeof(udi_cdc_line_coding);
+ return true;
+ }
+ }
+ }
+ if (Udd_setup_is_out()) {
+ // SET Interface Requests
+ if (Udd_setup_type() == USB_REQ_TYPE_CLASS) {
+ // Requests Class Interface Set
+ switch (udd_g_ctrlreq.req.bRequest) {
+ case USB_REQ_CDC_SET_LINE_CODING:
+ // Change configuration of CDC line
+ if (sizeof(usb_cdc_line_coding_t) !=
+ udd_g_ctrlreq.req.wLength)
+ return false; // Error for USB host
+ udd_g_ctrlreq.callback =
+ udi_cdc_line_coding_received;
+ udd_g_ctrlreq.payload =
+ (uint8_t *) &
+ udi_cdc_line_coding;
+ udd_g_ctrlreq.payload_size =
+ sizeof(udi_cdc_line_coding);
+ return true;
+ case USB_REQ_CDC_SET_CONTROL_LINE_STATE:
+ // According cdc spec 1.1 chapter 6.2.14
+ UDI_CDC_SET_DTR_EXT(
+ (0 != (udd_g_ctrlreq.req.wValue & CDC_CTRL_SIGNAL_DTE_PRESENT)));
+ UDI_CDC_SET_RTS_EXT(
+ (0 != (udd_g_ctrlreq.req.wValue & CDC_CTRL_SIGNAL_ACTIVATE_CARRIER)));
+ return true;
+ }
+ }
+ }
+ return false; // request Not supported
+}
+
+bool udi_cdc_data_setup(void)
+{
+ return false; // request Not supported
+}
+
+uint8_t udi_cdc_getsetting(void)
+{
+ return 0; // CDC don't have multiple alternate setting
+}
+
+
+//-------------------------------------------------
+//------- Internal routines to control serial line
+
+
+void udi_cdc_line_coding_received(void)
+{
+ // Send line coding to component associated to CDC
+ UDI_CDC_SET_CODING_EXT((&udi_cdc_line_coding));
+}
+
+
+static void udi_cdc_ctrl_state_change(bool b_set, le16_t bit_mask)
+{
+ // Update state
+ if (b_set) {
+ udi_cdc_state |= bit_mask;
+ } else {
+ udi_cdc_state &= ~bit_mask;
+ }
+
+ // Send it if possible and state changed
+ if ((!udi_cdc_serial_state_msg_ongoing)
+ && (udi_cdc_state != uid_cdc_state_msg.value)) {
+ // Fill notification message
+ uid_cdc_state_msg.value = udi_cdc_state;
+ // Send notification message
+ udi_cdc_serial_state_msg_ongoing =
+ udd_ep_run(UDI_CDC_COMM_EP,
+ false,
+ (uint8_t *) & uid_cdc_state_msg,
+ sizeof(uid_cdc_state_msg),
+ udi_cdc_serial_state_msg_sent);
+ }
+}
+
+
+void udi_cdc_serial_state_msg_sent(udd_ep_status_t status, iram_size_t n)
+{
+ // For the irregular signals like break, the incoming ring signal,
+ // or the overrun error state, this will reset their values to zero
+ // and again will not send another notification until their state changes.
+ uid_cdc_state_msg.value &= ~(CDC_SERIAL_STATE_BREAK |
+ CDC_SERIAL_STATE_RING |
+ CDC_SERIAL_STATE_FRAMING |
+ CDC_SERIAL_STATE_PARITY | CDC_SERIAL_STATE_OVERRUN);
+ udi_cdc_serial_state_msg_ongoing = false;
+}
+
+
+//-------------------------------------------------
+//------- Internal routines to process data transfer
+
+
+static bool udi_cdc_rx_start(void)
+{
+ if (!udd_ep_run(UDI_CDC_DATA_EP_OUT,
+ true,
+ udi_cdc_rx_buf[udi_cdc_rx_trans_sel],
+ UDI_CDC_DATA_EPS_SIZE,
+ udi_cdc_data_recevied)) {
+ udi_cdc_rx_trans_sel = UDI_CDC_TRANS_HALTED;
+ return false;
+ }
+ return true;
+}
+
+
+void udi_cdc_data_recevied(udd_ep_status_t status, iram_size_t n)
+{
+ if (UDD_EP_TRANSFER_OK != status) {
+ // Abort reception
+ return;
+ }
+ if (0 == n) {
+ // Empty packet then restart reception on same buffer
+ udi_cdc_rx_start();
+ return;
+ }
+ // Update the buffer's number
+ udi_cdc_rx_buf_nb[udi_cdc_rx_trans_sel] = n;
+
+ // Go to next buffer
+ udi_cdc_rx_trans_sel = (udi_cdc_rx_trans_sel + 1) % 2;
+ // Check if next buffer is free
+ if (udi_cdc_rx_trans_sel == udi_cdc_rx_buf_sel) {
+ // No buffer free; stop reception
+ udi_cdc_rx_trans_sel = UDI_CDC_TRANS_HALTED;
+ } else {
+ // Restart reception on next buffer
+ udi_cdc_rx_start();
+ }
+}
+
+
+static bool udi_cdc_tx_start(void)
+{
+ uint8_t tx_trans_sel = udi_cdc_tx_trans_sel;
+ // Switch current buffer
+ udi_cdc_tx_buf_sel = (udi_cdc_tx_trans_sel + 1) % 2;
+ udi_cdc_tx_buf_nb[udi_cdc_tx_buf_sel] = 0;
+ // Send the other buffer
+ if (!udd_ep_run(UDI_CDC_DATA_EP_IN,
+ true,
+ udi_cdc_tx_buf[tx_trans_sel],
+ udi_cdc_tx_buf_nb[tx_trans_sel],
+ udi_cdc_data_sent)) {
+ udi_cdc_tx_trans_sel = UDI_CDC_TRANS_HALTED;
+ return false;
+ }
+ return true;
+}
+
+
+void udi_cdc_data_sent(udd_ep_status_t status, iram_size_t n)
+{
+ status = status; n = n;
+ if (!udi_cdc_tx_b_trans_reload) {
+ // Automatic reload stopped (case of putc on going)
+ udi_cdc_tx_trans_sel = UDI_CDC_TRANS_HALTED;
+ return;
+ }
+ // Go to next buffer
+ udi_cdc_tx_trans_sel = (udi_cdc_tx_trans_sel + 1) % 2;
+ // Check, if next buffer is not empty
+ if (0 == udi_cdc_tx_buf_nb[udi_cdc_tx_trans_sel]) {
+ // No data available; stop sending data
+ udi_cdc_tx_trans_sel = UDI_CDC_TRANS_HALTED;
+ } else {
+ // Send next buffer
+ udi_cdc_tx_start();
+ }
+}
+
+
+//---------------------------------------------
+//------- Application interface
+
+
+void udi_cdc_ctrl_signal_dcd(bool b_set)
+{
+ udi_cdc_ctrl_state_change(b_set, CDC_SERIAL_STATE_DCD);
+}
+
+void udi_cdc_ctrl_signal_dsr(bool b_set)
+{
+ udi_cdc_ctrl_state_change(b_set, CDC_SERIAL_STATE_DSR);
+}
+
+void udi_cdc_signal_framing_error(void)
+{
+ udi_cdc_ctrl_state_change(true, CDC_SERIAL_STATE_FRAMING);
+}
+
+void udi_cdc_signal_parity_error(void)
+{
+ udi_cdc_ctrl_state_change(true, CDC_SERIAL_STATE_PARITY);
+}
+
+void udi_cdc_signal_overrun(void)
+{
+ udi_cdc_ctrl_state_change(true, CDC_SERIAL_STATE_OVERRUN);
+}
+
+bool udi_cdc_is_rx_ready(void)
+{
+ return (0 != udi_cdc_rx_buf_nb[udi_cdc_rx_buf_sel]);
+}
+
+
+int udi_cdc_getc(void)
+{
+ int rx_data = 0;
+ bool b_databit_9;
+
+ b_databit_9 = (9 == udi_cdc_line_coding.bDataBits);
+
+udi_cdc_getc_process_one_byte:
+ // Waiting for data
+ while (!udi_cdc_is_rx_ready()) {
+ if (UDI_CDC_TRANS_HALTED == udi_cdc_rx_trans_sel)
+ return 0; // Error system
+ }
+
+ // Read data
+ rx_data |= udi_cdc_rx_buf[udi_cdc_rx_buf_sel][udi_cdc_rx_pos];
+ udi_cdc_rx_pos++;
+
+ // Check if buffer empty
+ if (udi_cdc_rx_pos == udi_cdc_rx_buf_nb[udi_cdc_rx_buf_sel]) {
+ // Initialize again current buffer
+ udi_cdc_rx_buf_nb[udi_cdc_rx_buf_sel] = 0;
+ // Switch to next buffer
+ udi_cdc_rx_pos = 0;
+ udi_cdc_rx_buf_sel = (udi_cdc_rx_buf_sel + 1) % 2;
+ // Check if reception is halted
+ if (UDI_CDC_TRANS_HALTED == udi_cdc_rx_trans_sel) {
+ // Restart RX reception
+ udi_cdc_rx_trans_sel = (udi_cdc_rx_buf_sel + 1) % 2;
+ udi_cdc_rx_start();
+ }
+ }
+ if (b_databit_9) {
+ // Receive MSB
+ b_databit_9 = false;
+ rx_data = rx_data << 8;
+ goto udi_cdc_getc_process_one_byte;
+ }
+ return rx_data;
+}
+
+
+bool udi_cdc_is_tx_ready(void)
+{
+ return (UDI_CDC_DATA_EPS_SIZE != udi_cdc_tx_buf_nb[udi_cdc_tx_buf_sel]);
+}
+
+
+int udi_cdc_putc(int value)
+{
+ uint8_t buf_sel;
+ bool b_databit_9;
+
+ b_databit_9 = (9 == udi_cdc_line_coding.bDataBits);
+
+udi_cdc_putc_process_one_byte:
+ while (UDI_CDC_DATA_EPS_SIZE == udi_cdc_tx_buf_nb[udi_cdc_tx_buf_sel]);
+
+ // Stop automatic transfer reload
+ udi_cdc_tx_b_trans_reload = false;
+ // Store volatile to no volatile to save code
+ buf_sel = udi_cdc_tx_buf_sel;
+ udi_cdc_tx_buf[buf_sel][udi_cdc_tx_buf_nb[buf_sel]] = value & 0xFF;
+ udi_cdc_tx_buf_nb[buf_sel]++;
+ // Restart automatic transfer reload
+ udi_cdc_tx_b_trans_reload = true;
+ if (UDI_CDC_TRANS_HALTED == udi_cdc_tx_trans_sel) {
+ // Transfer is halted --> restart it with current buffer
+ udi_cdc_tx_trans_sel = buf_sel;
+ if (!udi_cdc_tx_start())
+ return false;
+ }
+ if (b_databit_9) {
+ // Send MSB
+ b_databit_9 = false;
+ value = value >> 8;
+ goto udi_cdc_putc_process_one_byte;
+ }
+ return true;
+}
+
+//@}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/udi_cdc.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/udi_cdc.h
new file mode 100644
index 0000000..250bada
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/udi_cdc.h
@@ -0,0 +1,291 @@
+/**
+ * \file
+ *
+ * \brief USB Device Communication Device Class (CDC) interface definitions.
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _UDI_CDC_H_
+#define _UDI_CDC_H_
+
+#include "conf_usb.h"
+#include "usb_protocol.h"
+#include "usb_protocol_cdc.h"
+#include "udd.h"
+#include "udc_desc.h"
+#include "udi.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * \ingroup udi_group
+ * \defgroup udi_cdc_group UDI for Communication Device Class
+ *
+ * @{
+ */
+
+/**
+ * \name Interface Descriptor
+ *
+ * The following structures provide the interface descriptor.
+ * It must be implemented in USB configuration descriptor.
+ */
+//@{
+
+
+/**
+ * \brief Communication Class interface descriptor
+ *
+ * Interface descriptor with associated functional and endpoint
+ * descriptors for the CDC Communication Class interface.
+ */
+typedef struct {
+ //! Standard interface descriptor
+ usb_iface_desc_t iface;
+ //! CDC Header functional descriptor
+ usb_cdc_hdr_desc_t header;
+ //! CDC Abstract Control Model functional descriptor
+ usb_cdc_acm_desc_t acm;
+ //! CDC Union functional descriptor
+ usb_cdc_union_desc_t union_desc;
+ //! CDC Call Management functional descriptor
+ usb_cdc_call_mgmt_desc_t call_mgmt;
+ //! Notification endpoint descriptor
+ usb_ep_desc_t ep_notify;
+} udi_cdc_comm_desc_t;
+
+
+/**
+ * \brief Data Class interface descriptor
+ *
+ * Interface descriptor with associated endpoint descriptors for the
+ * CDC Data Class interface.
+ */
+typedef struct {
+ //! Standard interface descriptor
+ usb_iface_desc_t iface;
+ //! Data IN/OUT endpoint descriptors
+ usb_ep_desc_t ep_in;
+ usb_ep_desc_t ep_out;
+} udi_cdc_data_desc_t;
+
+
+//! By default no string associated to these interfaces
+#ifndef UDI_CDC_IAD_STRING_ID
+#define UDI_CDC_IAD_STRING_ID 0
+#endif
+#ifndef UDI_CDC_COMM_STRING_ID
+#define UDI_CDC_COMM_STRING_ID 0
+#endif
+#ifndef UDI_CDC_DATA_STRING_ID
+#define UDI_CDC_DATA_STRING_ID 0
+#endif
+
+//! CDC communication enpoints size for all speed
+#define UDI_CDC_COMM_EP_SIZE 64
+//! CDC data enpoints size for all speed (no need to use 512B for HS)
+#define UDI_CDC_DATA_EPS_SIZE 64
+
+#ifndef UDI_CDC_MULTIPLE
+//! Fill field including interface numbers
+# define UDI_CDC_COMM_DESC_IFACE \
+ .iface.bInterfaceNumber = UDI_CDC_COMM_IFACE_NUMBER,\
+ .call_mgmt.bDataInterface = UDI_CDC_DATA_IFACE_NUMBER,\
+ .union_desc.bMasterInterface = UDI_CDC_COMM_IFACE_NUMBER,\
+ .union_desc.bSlaveInterface0 = UDI_CDC_DATA_IFACE_NUMBER,
+# define UDI_CDC_DATA_DESC_IFACE \
+ .iface.bInterfaceNumber = UDI_CDC_DATA_IFACE_NUMBER,
+#else
+//! TODO for multiple CDC interface
+# define UDI_CDC_COMM_DESC_IFACE
+# define UDI_CDC_DATA_DESC_IFACE
+#endif
+
+#define UDI_CDC_IAD_DESC {\
+ .bLength = sizeof(usb_iad_desc_t),\
+ .bDescriptorType = USB_DT_IAD,\
+ .bFirstInterface = UDI_CDC_COMM_IFACE_NUMBER,\
+ .bInterfaceCount = 2,\
+ .bFunctionClass = CDC_CLASS_COMM,\
+ .bFunctionSubClass = CDC_SUBCLASS_ACM,\
+ .bFunctionProtocol = CDC_PROTOCOL_V25TER,\
+ .iFunction = UDI_CDC_IAD_STRING_ID,\
+ }
+
+//! Content of CDC COMM interface descriptor for all speed
+#define UDI_CDC_COMM_DESC {\
+ UDI_CDC_COMM_DESC_IFACE \
+ .iface.bLength = sizeof(usb_iface_desc_t),\
+ .iface.bDescriptorType = USB_DT_INTERFACE,\
+ .iface.bAlternateSetting = 0,\
+ .iface.bNumEndpoints = 1,\
+ .iface.bInterfaceClass = CDC_CLASS_COMM,\
+ .iface.bInterfaceSubClass = CDC_SUBCLASS_ACM,\
+ .iface.bInterfaceProtocol = CDC_PROTOCOL_V25TER,\
+ .iface.iInterface = UDI_CDC_COMM_STRING_ID,\
+ .header.bFunctionLength = sizeof(usb_cdc_hdr_desc_t),\
+ .header.bDescriptorType = CDC_CS_INTERFACE,\
+ .header.bDescriptorSubtype = CDC_SCS_HEADER,\
+ .header.bcdCDC = LE16(0x0110),\
+ .call_mgmt.bFunctionLength = sizeof(usb_cdc_call_mgmt_desc_t),\
+ .call_mgmt.bDescriptorType = CDC_CS_INTERFACE,\
+ .call_mgmt.bDescriptorSubtype = CDC_SCS_CALL_MGMT,\
+ .call_mgmt.bmCapabilities = \
+ CDC_CALL_MGMT_SUPPORTED | CDC_CALL_MGMT_OVER_DCI,\
+ .acm.bFunctionLength = sizeof(usb_cdc_acm_desc_t),\
+ .acm.bDescriptorType = CDC_CS_INTERFACE,\
+ .acm.bDescriptorSubtype = CDC_SCS_ACM,\
+ .acm.bmCapabilities = CDC_ACM_SUPPORT_LINE_REQUESTS,\
+ .union_desc.bFunctionLength = sizeof(usb_cdc_union_desc_t),\
+ .union_desc.bDescriptorType = CDC_CS_INTERFACE,\
+ .union_desc.bDescriptorSubtype= CDC_SCS_UNION,\
+ .ep_notify.bLength = sizeof(usb_ep_desc_t),\
+ .ep_notify.bDescriptorType = USB_DT_ENDPOINT,\
+ .ep_notify.bEndpointAddress = UDI_CDC_COMM_EP,\
+ .ep_notify.bmAttributes = USB_EP_TYPE_INTERRUPT,\
+ .ep_notify.wMaxPacketSize = LE16(UDI_CDC_COMM_EP_SIZE),\
+ .ep_notify.bInterval = 0xFF,\
+ }
+
+
+//! Content of CDC DATA interface descriptor for all speed
+#define UDI_CDC_DATA_DESC {\
+ UDI_CDC_DATA_DESC_IFACE \
+ .iface.bLength = sizeof(usb_iface_desc_t),\
+ .iface.bDescriptorType = USB_DT_INTERFACE,\
+ .iface.bAlternateSetting = 0,\
+ .iface.bNumEndpoints = 2,\
+ .iface.bInterfaceClass = CDC_CLASS_DATA,\
+ .iface.bInterfaceSubClass = 0,\
+ .iface.bInterfaceProtocol = 0,\
+ .iface.iInterface = UDI_CDC_DATA_STRING_ID,\
+ .ep_in.bLength = sizeof(usb_ep_desc_t),\
+ .ep_in.bDescriptorType = USB_DT_ENDPOINT,\
+ .ep_in.bEndpointAddress = UDI_CDC_DATA_EP_IN,\
+ .ep_in.wMaxPacketSize = LE16(UDI_CDC_DATA_EPS_SIZE),\
+ .ep_in.bmAttributes = USB_EP_TYPE_BULK,\
+ .ep_in.bInterval = 0,\
+ .ep_out.bLength = sizeof(usb_ep_desc_t),\
+ .ep_out.bDescriptorType = USB_DT_ENDPOINT,\
+ .ep_out.bEndpointAddress = UDI_CDC_DATA_EP_OUT,\
+ .ep_out.wMaxPacketSize = LE16(UDI_CDC_DATA_EPS_SIZE),\
+ .ep_out.bmAttributes = USB_EP_TYPE_BULK,\
+ .ep_out.bInterval = 0,\
+ }
+//@}
+
+
+//! Global struture which contains standard UDI API for UDC
+extern UDC_DESC_STORAGE udi_api_t udi_api_cdc_comm;
+extern UDC_DESC_STORAGE udi_api_t udi_api_cdc_data;
+
+/**
+ * \name Interface for application
+ *
+ * These routines are used by memory to transfer its data
+ * to/from USB CDC endpoint.
+ */
+//@{
+
+/**
+ * \brief Notify a state change of DCD signal
+ *
+ * \param b_set DCD is enabled if true, else disabled
+ */
+void udi_cdc_ctrl_signal_dcd(bool b_set);
+
+/**
+ * \brief Notify a state change of DSR signal
+ *
+ * \param b_set DSR is enabled if true, else disabled
+ */
+void udi_cdc_ctrl_signal_dsr(bool b_set);
+
+/**
+ * \brief Notify a framing error
+ */
+void udi_cdc_signal_framing_error(void);
+
+/**
+ * \brief Notify a parity error
+ */
+void udi_cdc_signal_parity_error(void);
+
+/**
+ * \brief Notify a overrun
+ */
+void udi_cdc_signal_overrun(void);
+
+/**
+ * \brief This function checks if a character has been received on the CDC line
+ *
+ * \return \c 1 if a byte is ready to be read.
+ */
+bool udi_cdc_is_rx_ready(void);
+
+/**
+ * \brief Waits and gets a value on CDC line
+ *
+ * \return value read on CDC line
+ */
+int udi_cdc_getc(void);
+
+/**
+ * \brief This function checks if a new character sent is possible
+ * The type int is used to support scanf redirection from compiler LIB.
+ *
+ * \return \c 1 if a new chracter can be sent
+ */
+bool udi_cdc_is_tx_ready(void);
+
+/**
+ * \brief Puts a byte on CDC line
+ * The type int is used to support printf redirection from compiler LIB.
+ *
+ * \param value Value to put
+ *
+ * \return \c 1 if function was successfully done, otherwise \c 0.
+ */
+int udi_cdc_putc(int value);
+
+//@}
+
+//@}
+
+#ifdef __cplusplus
+}
+#endif
+#endif // _UDI_CDC_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/udi_cdc_conf.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/udi_cdc_conf.h
new file mode 100644
index 0000000..825a2ce
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/udi_cdc_conf.h
@@ -0,0 +1,81 @@
+/**
+ * \file
+ *
+ * \brief Default CDC configuration for a USB Device with a single interface
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _UDI_CDC_CONF_H_
+#define _UDI_CDC_CONF_H_
+
+#include "usb_protocol_cdc.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * \ingroup udi_cdc_group
+ * \defgroup udi_cdc_group_conf Default CDC configuration for a USB Device
+ * with a single interface CDC
+ *
+ * @{
+ */
+
+//! Control endpoint size (Endpoint 0)
+#define USB_DEVICE_EP_CTRL_SIZE 64
+
+//! Endpoints' numbers used by single CDC interface
+#define UDI_CDC_DATA_EP_IN (1 | USB_EP_DIR_IN) // TX
+#define UDI_CDC_DATA_EP_OUT (2 | USB_EP_DIR_OUT) // RX
+#define UDI_CDC_COMM_EP (3 | USB_EP_DIR_IN) // Notify endpoint
+
+//! Interface numbers
+#define UDI_CDC_COMM_IFACE_NUMBER 0
+#define UDI_CDC_DATA_IFACE_NUMBER 1
+
+/**
+ * \name UDD Configuration
+ */
+//@{
+//! 3 endpoints used by single CDC interface
+#define USB_DEVICE_MAX_EP 3
+//@}
+
+//@}
+
+#ifdef __cplusplus
+}
+#endif
+#endif // _UDI_CDC_CONF_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/udi_cdc_desc.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/udi_cdc_desc.c
new file mode 100644
index 0000000..1e9e803
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/device/udi_cdc_desc.c
@@ -0,0 +1,175 @@
+/**
+ * \file
+ *
+ * \brief Default descriptors for a USB Device with a single interface CDC
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "conf_usb.h"
+#include "udd.h"
+#include "udc_desc.h"
+#include "udi_cdc.h"
+
+
+/**
+ * \ingroup udi_cdc_group
+ * \defgroup udi_cdc_group_desc Default descriptors for a USB Device
+ * with a single interface CDC
+ *
+ * @{
+ */
+
+//! Two interfaces for a CDC device
+#define USB_DEVICE_NB_INTERFACE 2
+
+/**INDENT-OFF**/
+
+//! USB Device Descriptor
+COMPILER_WORD_ALIGNED
+UDC_DESC_STORAGE usb_dev_desc_t udc_device_desc = {
+ .bLength = sizeof(usb_dev_desc_t),
+ .bDescriptorType = USB_DT_DEVICE,
+ .bcdUSB = LE16(USB_V2_0),
+#ifdef UDI_CDC_IAD
+ .bDeviceClass = 0,
+#else
+ .bDeviceClass = CDC_CLASS_DEVICE,
+#endif
+ .bDeviceSubClass = 0,
+ .bDeviceProtocol = 0,
+ .bMaxPacketSize0 = USB_DEVICE_EP_CTRL_SIZE,
+ .idVendor = LE16(USB_DEVICE_VENDOR_ID),
+ .idProduct = LE16(USB_DEVICE_PRODUCT_ID),
+ .bcdDevice = LE16((USB_DEVICE_MAJOR_VERSION << 8)
+ | USB_DEVICE_MINOR_VERSION),
+#ifdef USB_DEVICE_MANUFACTURE_NAME
+ .iManufacturer = 1,
+#else
+ .iManufacturer = 0, // No manufacture string
+#endif
+#ifdef USB_DEVICE_PRODUCT_NAME
+ .iProduct = 2,
+#else
+ .iProduct = 0, // No product string
+#endif
+#ifdef USB_DEVICE_SERIAL_NAME
+ .iSerialNumber = 3,
+#else
+ .iSerialNumber = 0, // No serial string
+#endif
+ .bNumConfigurations = 1
+};
+
+
+#ifdef USB_DEVICE_HS_SUPPORT
+//! USB Device Qualifier Descriptor for HS
+COMPILER_WORD_ALIGNED
+UDC_DESC_STORAGE usb_dev_qual_desc_t udc_device_qual = {
+ .bLength = sizeof(usb_dev_qual_desc_t),
+ .bDescriptorType = USB_DT_DEVICE_QUALIFIER,
+ .bcdUSB = LE16(USB_V2_0),
+#ifdef UDI_CDC_IAD
+ .bDeviceClass = 0,
+#else
+ .bDeviceClass = CDC_CLASS_DEVICE,
+#endif
+ .bDeviceSubClass = 0,
+ .bDeviceProtocol = 0,
+ .bMaxPacketSize0 = USB_DEVICE_EP_CTRL_SIZE,
+ .bNumConfigurations = 1
+};
+#endif
+
+//! Structure for USB Device Configuration Descriptor
+COMPILER_PACK_SET(1);
+typedef struct {
+ usb_conf_desc_t conf;
+#ifdef UDI_CDC_IAD
+ usb_iad_desc_t udi_cdc_iad;
+#endif
+ udi_cdc_comm_desc_t udi_cdc_comm;
+ udi_cdc_data_desc_t udi_cdc_data;
+} udc_desc_t;
+COMPILER_PACK_RESET();
+
+//! USB Device Configuration Descriptor filled for full and high speed
+COMPILER_WORD_ALIGNED
+UDC_DESC_STORAGE udc_desc_t udc_desc = {
+ .conf.bLength = sizeof(usb_conf_desc_t),
+ .conf.bDescriptorType = USB_DT_CONFIGURATION,
+ .conf.wTotalLength = LE16(sizeof(udc_desc_t)),
+ .conf.bNumInterfaces = USB_DEVICE_NB_INTERFACE,
+ .conf.bConfigurationValue = 1,
+ .conf.iConfiguration = 0,
+ .conf.bmAttributes = USB_CONFIG_ATTR_MUST_SET | USB_DEVICE_ATTR,
+ .conf.bMaxPower = USB_CONFIG_MAX_POWER(USB_DEVICE_POWER),
+#ifdef UDI_CDC_IAD
+ .udi_cdc_iad = UDI_CDC_IAD_DESC,
+#endif
+ .udi_cdc_comm = UDI_CDC_COMM_DESC,
+ .udi_cdc_data = UDI_CDC_DATA_DESC,
+};
+
+
+/**
+ * \name UDC structures which content all USB Device definitions
+ */
+//@{
+
+//! Associate an UDI for each USB interface
+UDC_DESC_STORAGE udi_api_t *udi_apis[USB_DEVICE_NB_INTERFACE] = {
+ &udi_api_cdc_comm,
+ &udi_api_cdc_data,
+};
+
+//! Add UDI with USB Descriptors FS & HS
+UDC_DESC_STORAGE udc_config_speed_t udc_config_fshs[1] = { {
+ .desc = (usb_conf_desc_t UDC_DESC_STORAGE*)&udc_desc,
+ .udi_apis = udi_apis,
+}};
+
+//! Add all information about USB Device in global structure for UDC
+UDC_DESC_STORAGE udc_config_t udc_config = {
+ .confdev_lsfs = &udc_device_desc,
+ .conf_lsfs = udc_config_fshs,
+#ifdef USB_DEVICE_HS_SUPPORT
+ .confdev_hs = &udc_device_desc,
+ .qualifier = &udc_device_qual,
+ .conf_hs = udc_config_fshs,
+#endif
+};
+
+//@}
+/**INDENT-ON**/
+//@}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/usb_protocol_cdc.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/usb_protocol_cdc.h
new file mode 100644
index 0000000..8ac937b
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/cdc/usb_protocol_cdc.h
@@ -0,0 +1,308 @@
+/**
+ * \file
+ *
+ * \brief USB Communication Device Class (CDC) protocol definitions
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef _USB_PROTOCOL_CDC_H_
+#define _USB_PROTOCOL_CDC_H_
+
+/**
+ * \ingroup usb_protocol_group
+ * \defgroup cdc_protocol_group Communication Device Class Definitions
+ * @{
+ */
+
+/**
+ * \name Possible values of class
+ */
+//@{
+#define CDC_CLASS_DEVICE 0x02 //!< USB Communication Device Class
+#define CDC_CLASS_COMM 0x02 //!< CDC Communication Class Interface
+#define CDC_CLASS_DATA 0x0A //!< CDC Data Class Interface
+//@}
+
+//! \name USB CDC Subclass IDs
+//@{
+#define CDC_SUBCLASS_DLCM 0x01 //!< Direct Line Control Model
+#define CDC_SUBCLASS_ACM 0x02 //!< Abstract Control Model
+#define CDC_SUBCLASS_TCM 0x03 //!< Telephone Control Model
+#define CDC_SUBCLASS_MCCM 0x04 //!< Multi-Channel Control Model
+#define CDC_SUBCLASS_CCM 0x05 //!< CAPI Control Model
+#define CDC_SUBCLASS_ETH 0x06 //!< Ethernet Networking Control Model
+#define CDC_SUBCLASS_ATM 0x07 //!< ATM Networking Control Model
+//@}
+
+//! \name USB CDC Communication Interface Protocol IDs
+//@{
+#define CDC_PROTOCOL_V25TER 0x01 //!< Common AT commands
+//@}
+
+//! \name USB CDC Data Interface Protocol IDs
+//@{
+#define CDC_PROTOCOL_I430 0x30 //!< ISDN BRI
+#define CDC_PROTOCOL_HDLC 0x31 //!< HDLC
+#define CDC_PROTOCOL_TRANS 0x32 //!< Transparent
+#define CDC_PROTOCOL_Q921M 0x50 //!< Q.921 management protocol
+#define CDC_PROTOCOL_Q921 0x51 //!< Q.931 [sic] Data link protocol
+#define CDC_PROTOCOL_Q921TM 0x52 //!< Q.921 TEI-multiplexor
+#define CDC_PROTOCOL_V42BIS 0x90 //!< Data compression procedures
+#define CDC_PROTOCOL_Q931 0x91 //!< Euro-ISDN protocol control
+#define CDC_PROTOCOL_V120 0x92 //!< V.24 rate adaption to ISDN
+#define CDC_PROTOCOL_CAPI20 0x93 //!< CAPI Commands
+#define CDC_PROTOCOL_HOST 0xFD //!< Host based driver
+/**
+ * \brief Describes the Protocol Unit Functional Descriptors [sic]
+ * on Communication Class Interface
+ */
+#define CDC_PROTOCOL_PUFD 0xFE
+//@}
+
+//! \name USB CDC Functional Descriptor Types
+//@{
+#define CDC_CS_INTERFACE 0x24 //!< Interface Functional Descriptor
+#define CDC_CS_ENDPOINT 0x25 //!< Endpoint Functional Descriptor
+//@}
+
+//! \name USB CDC Functional Descriptor Subtypes
+//@{
+#define CDC_SCS_HEADER 0x00 //!< Header Functional Descriptor
+#define CDC_SCS_CALL_MGMT 0x01 //!< Call Management
+#define CDC_SCS_ACM 0x02 //!< Abstract Control Management
+#define CDC_SCS_UNION 0x06 //!< Union Functional Descriptor
+//@}
+
+//! \name USB CDC Request IDs
+//@{
+#define USB_REQ_CDC_SEND_ENCAPSULATED_COMMAND 0x00
+#define USB_REQ_CDC_GET_ENCAPSULATED_RESPONSE 0x01
+#define USB_REQ_CDC_SET_COMM_FEATURE 0x02
+#define USB_REQ_CDC_GET_COMM_FEATURE 0x03
+#define USB_REQ_CDC_CLEAR_COMM_FEATURE 0x04
+#define USB_REQ_CDC_SET_AUX_LINE_STATE 0x10
+#define USB_REQ_CDC_SET_HOOK_STATE 0x11
+#define USB_REQ_CDC_PULSE_SETUP 0x12
+#define USB_REQ_CDC_SEND_PULSE 0x13
+#define USB_REQ_CDC_SET_PULSE_TIME 0x14
+#define USB_REQ_CDC_RING_AUX_JACK 0x15
+#define USB_REQ_CDC_SET_LINE_CODING 0x20
+#define USB_REQ_CDC_GET_LINE_CODING 0x21
+#define USB_REQ_CDC_SET_CONTROL_LINE_STATE 0x22
+#define USB_REQ_CDC_SEND_BREAK 0x23
+#define USB_REQ_CDC_SET_RINGER_PARMS 0x30
+#define USB_REQ_CDC_GET_RINGER_PARMS 0x31
+#define USB_REQ_CDC_SET_OPERATION_PARMS 0x32
+#define USB_REQ_CDC_GET_OPERATION_PARMS 0x33
+#define USB_REQ_CDC_SET_LINE_PARMS 0x34
+#define USB_REQ_CDC_GET_LINE_PARMS 0x35
+#define USB_REQ_CDC_DIAL_DIGITS 0x36
+#define USB_REQ_CDC_SET_UNIT_PARAMETER 0x37
+#define USB_REQ_CDC_GET_UNIT_PARAMETER 0x38
+#define USB_REQ_CDC_CLEAR_UNIT_PARAMETER 0x39
+#define USB_REQ_CDC_GET_PROFILE 0x3A
+#define USB_REQ_CDC_SET_ETHERNET_MULTICAST_FILTERS 0x40
+#define USB_REQ_CDC_SET_ETHERNET_POWER_MANAGEMENT_PATTERNFILTER 0x41
+#define USB_REQ_CDC_GET_ETHERNET_POWER_MANAGEMENT_PATTERNFILTER 0x42
+#define USB_REQ_CDC_SET_ETHERNET_PACKET_FILTER 0x43
+#define USB_REQ_CDC_GET_ETHERNET_STATISTIC 0x44
+#define USB_REQ_CDC_SET_ATM_DATA_FORMAT 0x50
+#define USB_REQ_CDC_GET_ATM_DEVICE_STATISTICS 0x51
+#define USB_REQ_CDC_SET_ATM_DEFAULT_VC 0x52
+#define USB_REQ_CDC_GET_ATM_VC_STATISTICS 0x53
+// Added bNotification codes according cdc spec 1.1 chapter 6.3
+#define USB_REQ_CDC_NOTIFY_RING_DETECT 0x09
+#define USB_REQ_CDC_NOTIFY_SERIAL_STATE 0x20
+#define USB_REQ_CDC_NOTIFY_CALL_STATE_CHANGE 0x28
+#define USB_REQ_CDC_NOTIFY_LINE_STATE_CHANGE 0x29
+//@}
+
+/*
+ * Need to pack structures tightly, or the compiler might insert padding
+ * and violate the spec-mandated layout.
+ */
+COMPILER_PACK_SET(1);
+
+//! \name USB CDC Descriptors
+//@{
+
+
+//! CDC Header Functional Descriptor
+typedef struct {
+ uint8_t bFunctionLength;
+ uint8_t bDescriptorType;
+ uint8_t bDescriptorSubtype;
+ le16_t bcdCDC;
+} usb_cdc_hdr_desc_t;
+
+//! CDC Call Management Functional Descriptor
+typedef struct {
+ uint8_t bFunctionLength;
+ uint8_t bDescriptorType;
+ uint8_t bDescriptorSubtype;
+ uint8_t bmCapabilities;
+ uint8_t bDataInterface;
+} usb_cdc_call_mgmt_desc_t;
+
+//! CDC ACM Functional Descriptor
+typedef struct {
+ uint8_t bFunctionLength;
+ uint8_t bDescriptorType;
+ uint8_t bDescriptorSubtype;
+ uint8_t bmCapabilities;
+} usb_cdc_acm_desc_t;
+
+//! CDC Union Functional Descriptor
+typedef struct {
+ uint8_t bFunctionLength;
+ uint8_t bDescriptorType;
+ uint8_t bDescriptorSubtype;
+ uint8_t bMasterInterface;
+ uint8_t bSlaveInterface0;
+} usb_cdc_union_desc_t;
+
+
+//! \name USB CDC Call Management Capabilities
+//@{
+//! Device handles call management itself
+#define CDC_CALL_MGMT_SUPPORTED (1 << 0)
+//! Device can send/receive call management info over a Data Class interface
+#define CDC_CALL_MGMT_OVER_DCI (1 << 1)
+//@}
+
+//! \name USB CDC ACM Capabilities
+//@{
+//! Device supports the request combination of
+//! Set_Comm_Feature, Clear_Comm_Feature, and Get_Comm_Feature.
+#define CDC_ACM_SUPPORT_FEATURE_REQUESTS (1 << 0)
+//! Device supports the request combination of
+//! Set_Line_Coding, Set_Control_Line_State, Get_Line_Coding,
+//! and the notification Serial_State.
+#define CDC_ACM_SUPPORT_LINE_REQUESTS (1 << 1)
+//! Device supports the request Send_Break
+#define CDC_ACM_SUPPORT_SENDBREAK_REQUESTS (1 << 2)
+//! Device supports the notification Network_Connection.
+#define CDC_ACM_SUPPORT_NOTIFY_REQUESTS (1 << 3)
+//@}
+//@}
+
+//! \name USB CDC line control
+//@{
+
+//! \name USB CDC line coding
+//@{
+//! Line Coding structure
+typedef struct {
+ le32_t dwDTERate;
+ uint8_t bCharFormat;
+ uint8_t bParityType;
+ uint8_t bDataBits;
+} usb_cdc_line_coding_t;
+//! Possible values of bCharFormat
+enum cdc_char_format {
+ CDC_STOP_BITS_1 = 0, //!< 1 stop bit
+ CDC_STOP_BITS_1_5 = 1, //!< 1.5 stop bits
+ CDC_STOP_BITS_2 = 2 //!< 2 stop bits
+};
+//! Possible values of bParityType
+enum cdc_parity {
+ CDC_PAR_NONE = 0, //!< No parity
+ CDC_PAR_ODD = 1, //!< Odd parity
+ CDC_PAR_EVEN = 2, //!< Even parity
+ CDC_PAR_MARK = 3, //!< Parity forced to 0 (space)
+ CDC_PAR_SPACE = 4 //!< Parity forced to 1 (mark)
+};
+//@}
+
+//! \name USB CDC control signals
+//! spec 1.1 chapter 6.2.14
+//@{
+
+//! Control signal structure
+typedef struct {
+ uint16_t value;
+} usb_cdc_control_signal_t;
+
+//! \name Possible values in usb_cdc_control_signal_t
+//@{
+//! Carrier control for half duplex modems.
+//! This signal corresponds to V.24 signal 105 and RS-232 signal RTS.
+//! The device ignores the value of this bit
+//! when operating in full duplex mode.
+#define CDC_CTRL_SIGNAL_ACTIVATE_CARRIER (1 << 1)
+//! Indicates to DCE if DTE is present or not.
+//! This signal corresponds to V.24 signal 108/2 and RS-232 signal DTR.
+#define CDC_CTRL_SIGNAL_DTE_PRESENT (1 << 0)
+//@}
+//@}
+
+
+//! \name USB CDC notification message
+//@{
+
+typedef struct {
+ uint8_t bmRequestType;
+ uint8_t bNotification;
+ le16_t wValue;
+ le16_t wIndex;
+ le16_t wLength;
+} usb_cdc_notify_msg_t;
+
+//! \name USB CDC serial state
+//@{*
+
+//! Hardware handshake support (cdc spec 1.1 chapter 6.3.5)
+typedef struct {
+ usb_cdc_notify_msg_t header;
+ le16_t value;
+} usb_cdc_notify_serial_state_t;
+
+//! \name Possible values in usb_cdc_notify_serial_state_t
+//@{
+#define CDC_SERIAL_STATE_DCD CPU_TO_LE16((1<<0))
+#define CDC_SERIAL_STATE_DSR CPU_TO_LE16((1<<1))
+#define CDC_SERIAL_STATE_BREAK CPU_TO_LE16((1<<2))
+#define CDC_SERIAL_STATE_RING CPU_TO_LE16((1<<3))
+#define CDC_SERIAL_STATE_FRAMING CPU_TO_LE16((1<<4))
+#define CDC_SERIAL_STATE_PARITY CPU_TO_LE16((1<<5))
+#define CDC_SERIAL_STATE_OVERRUN CPU_TO_LE16((1<<6))
+//@}
+//! @}
+
+//! @}
+
+COMPILER_PACK_RESET();
+
+//! @}
+
+#endif // _USB_PROTOCOL_CDC_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/at32uc3a0512_evk1100/conf_access.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/at32uc3a0512_evk1100/conf_access.h
new file mode 100644
index 0000000..2d3abd1
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/at32uc3a0512_evk1100/conf_access.h
@@ -0,0 +1,186 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Memory access control configuration file.
+ *
+ * This file contains the possible external configuration of the memory access
+ * control.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_ACCESS_H_
+#define _CONF_ACCESS_H_
+
+#include "compiler.h"
+#include "board.h"
+
+
+/*! \name Activation of Logical Unit Numbers
+ */
+//! @{
+#define LUN_0 ENABLE //!< On-Chip Virtual Memory.
+#define LUN_1 ENABLE //!< AT45DBX Data Flash.
+#define LUN_2 DISABLE //!< SD/MMC Card over SPI.
+#define LUN_3 DISABLE //!< SD/MMC Card over MCI Slot 0.
+#define LUN_4 DISABLE
+#define LUN_5 DISABLE
+#define LUN_6 DISABLE
+#define LUN_7 DISABLE
+#define LUN_USB DISABLE //!< Host Mass-Storage Memory.
+//! @}
+
+/*! \name LUN 0 Definitions
+ */
+//! @{
+#define VIRTUAL_MEM LUN_0
+#define LUN_ID_VIRTUAL_MEM LUN_ID_0
+#define LUN_0_INCLUDE "virtual_mem.h"
+#define Lun_0_test_unit_ready virtual_test_unit_ready
+#define Lun_0_read_capacity virtual_read_capacity
+#define Lun_0_wr_protect virtual_wr_protect
+#define Lun_0_removal virtual_removal
+#define Lun_0_usb_read_10 virtual_usb_read_10
+#define Lun_0_usb_write_10 virtual_usb_write_10
+#define Lun_0_mem_2_ram virtual_mem_2_ram
+#define Lun_0_ram_2_mem virtual_ram_2_mem
+#define LUN_0_NAME "\"On-Chip Virtual Memory\""
+//! @}
+
+/*! \name LUN 1 Definitions
+ */
+//! @{
+#define AT45DBX_MEM LUN_1
+#define LUN_ID_AT45DBX_MEM LUN_ID_1
+#define LUN_1_INCLUDE "at45dbx_mem.h"
+#define Lun_1_test_unit_ready at45dbx_test_unit_ready
+#define Lun_1_read_capacity at45dbx_read_capacity
+#define Lun_1_wr_protect at45dbx_wr_protect
+#define Lun_1_removal at45dbx_removal
+#define Lun_1_usb_read_10 at45dbx_usb_read_10
+#define Lun_1_usb_write_10 at45dbx_usb_write_10
+#define Lun_1_mem_2_ram at45dbx_df_2_ram
+#define Lun_1_ram_2_mem at45dbx_ram_2_df
+#define LUN_1_NAME "\"AT45DBX Data Flash\""
+//! @}
+
+/*! \name LUN 2 Definitions
+ */
+//! @{
+#define SD_MMC_SPI_MEM LUN_2
+#define LUN_ID_SD_MMC_SPI_MEM LUN_ID_2
+#define LUN_2_INCLUDE "sd_mmc_spi_mem.h"
+#define Lun_2_test_unit_ready sd_mmc_spi_test_unit_ready
+#define Lun_2_read_capacity sd_mmc_spi_read_capacity
+#define Lun_2_wr_protect sd_mmc_spi_wr_protect
+#define Lun_2_removal sd_mmc_spi_removal
+#define Lun_2_usb_read_10 sd_mmc_spi_usb_read_10
+#define Lun_2_usb_write_10 sd_mmc_spi_usb_write_10
+#define Lun_2_mem_2_ram sd_mmc_spi_mem_2_ram
+#define Lun_2_ram_2_mem sd_mmc_spi_ram_2_mem
+#define LUN_2_NAME "\"SD/MMC Card over SPI\""
+//! @}
+
+/*! \name LUN 3 Definitions
+ */
+//! @{
+#define SD_MMC_MCI_0_MEM LUN_3
+#define LUN_ID_SD_MMC_MCI_0_MEM LUN_ID_3
+#define LUN_3_INCLUDE "sd_mmc_mci_mem.h"
+#define Lun_3_test_unit_ready sd_mmc_mci_test_unit_ready_0
+#define Lun_3_read_capacity sd_mmc_mci_read_capacity_0
+#define Lun_3_wr_protect sd_mmc_mci_wr_protect_0
+#define Lun_3_removal sd_mmc_mci_removal_0
+#define Lun_3_usb_read_10 sd_mmc_mci_usb_read_10_0
+#define Lun_3_usb_write_10 sd_mmc_mci_usb_write_10_0
+#define Lun_3_mem_2_ram sd_mmc_mci_mem_2_ram_0
+#define Lun_3_ram_2_mem sd_mmc_mci_ram_2_mem_0
+#define LUN_3_NAME "\"SD/MMC Card over MCI Slot 0\""
+//! @}
+
+/*! \name USB LUNs Definitions
+ */
+//! @{
+#define MEM_USB LUN_USB
+#define LUN_ID_MEM_USB LUN_ID_USB
+#define LUN_USB_INCLUDE "host_mem.h"
+#define Lun_usb_test_unit_ready(lun) host_test_unit_ready(lun)
+#define Lun_usb_read_capacity(lun, nb_sect) host_read_capacity(lun, nb_sect)
+#define Lun_usb_read_sector_size(lun) host_read_sector_size(lun)
+#define Lun_usb_wr_protect(lun) host_wr_protect(lun)
+#define Lun_usb_removal() host_removal()
+#define Lun_usb_mem_2_ram(addr, ram) host_read_10_ram(addr, ram)
+#define Lun_usb_ram_2_mem(addr, ram) host_write_10_ram(addr, ram)
+#define LUN_USB_NAME "\"Host Mass-Storage Memory\""
+//! @}
+
+/*! \name Actions Associated with Memory Accesses
+ *
+ * Write here the action to associate with each memory access.
+ *
+ * \warning Be careful not to waste time in order not to disturb the functions.
+ */
+//! @{
+#define memory_start_read_action(nb_sectors) ui_start_read()
+#define memory_stop_read_action() ui_stop_read()
+#define memory_start_write_action(nb_sectors) ui_start_write()
+#define memory_stop_write_action() ui_stop_write()
+#include "ui.h"
+//! @}
+
+/*! \name Activation of Interface Features
+ */
+//! @{
+#define ACCESS_USB ENABLED //!< MEM <-> USB interface.
+#define ACCESS_MEM_TO_RAM DISABLED //!< MEM <-> RAM interface.
+#define ACCESS_STREAM DISABLED //!< Streaming MEM <-> MEM interface.
+#define ACCESS_STREAM_RECORD DISABLED //!< Streaming MEM <-> MEM interface in record mode.
+#define ACCESS_MEM_TO_MEM DISABLED //!< MEM <-> MEM interface.
+#define ACCESS_CODEC DISABLED //!< Codec interface.
+//! @}
+
+/*! \name Specific Options for Access Control
+ */
+//! @{
+#define GLOBAL_WR_PROTECT DISABLED //!< Management of a global write protection.
+//! @}
+
+
+#endif // _CONF_ACCESS_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/at32uc3a0512_evk1100/conf_at45dbx.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/at32uc3a0512_evk1100/conf_at45dbx.h
new file mode 100644
index 0000000..b7dc2c0
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/at32uc3a0512_evk1100/conf_at45dbx.h
@@ -0,0 +1,73 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief AT45DBX configuration file.
+ *
+ * This file contains the possible external configuration of the AT45DBX.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with an SPI module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_AT45DBX_H_
+#define _CONF_AT45DBX_H_
+
+#include "board.h"
+
+//_____ D E F I N I T I O N S ______________________________________________
+
+//! Connect AT45DBx driver to spi master service
+#define AT45DBX_USES_SPI_MASTER_SERVICE
+
+//! Select the SPI module AT45DBX is connected to
+#define AT45DBX_SPI_MODULE AT45DBX_SPI
+
+//! Size of AT45DBX data flash memories to manage.
+#define AT45DBX_MEM_SIZE AT45DBX_8MB
+
+//! Number of AT45DBX components to manage.
+#define AT45DBX_MEM_CNT 1
+
+//! SPI master speed in Hz.
+#define AT45DBX_SPI_MASTER_SPEED 12000000
+
+//! First chip select used by AT45DBX components on the SPI module instance.
+#define AT45DBX_CS AT45DBX_SPI_NPCS
+
+#endif // _CONF_AT45DBX_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/at32uc3a0512_evk1100/conf_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/at32uc3a0512_evk1100/conf_board.h
new file mode 100644
index 0000000..e69060e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/at32uc3a0512_evk1100/conf_board.h
@@ -0,0 +1,44 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Board configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H_INCLUDED
+#define CONF_BOARD_H_INCLUDED
+
+// Enable AT45DBX Component.
+#define CONF_BOARD_AT45DBX
+
+#endif /* CONF_BOARD_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/at32uc3a0512_evk1100/conf_clock.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/at32uc3a0512_evk1100/conf_clock.h
new file mode 100644
index 0000000..3059cef
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/at32uc3a0512_evk1100/conf_clock.h
@@ -0,0 +1,75 @@
+/**
+ * \file
+ *
+ * \brief Chip-specific system clock manager configuration
+ *
+ * Copyright (C) 2011 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_CLOCK_H_INCLUDED
+#define CONF_CLOCK_H_INCLUDED
+
+// ===== System Clock Source Options
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_RCSYS
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_OSC0
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL0
+
+// ===== PLL0 Options
+//#define CONFIG_PLL0_SOURCE PLL_SRC_OSC0
+//#define CONFIG_PLL0_SOURCE PLL_SRC_OSC1
+//#define CONFIG_PLL0_MUL 4 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+//#define CONFIG_PLL0_DIV 1 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+
+// ===== PLL1 Options
+#define CONFIG_PLL1_SOURCE PLL_SRC_OSC0
+//#define CONFIG_PLL1_SOURCE PLL_SRC_OSC1
+#define CONFIG_PLL1_MUL 8 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+#define CONFIG_PLL1_DIV 2 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+
+// ===== System Clock Bus Division Options
+//#define CONFIG_SYSCLK_CPU_DIV 0 /* Fcpu = Fsys/(2 ^ CPU_div) */
+//#define CONFIG_SYSCLK_PBA_DIV 0 /* Fpba = Fsys/(2 ^ PBA_div) */
+//#define CONFIG_SYSCLK_PBB_DIV 0 /* Fpbb = Fsys/(2 ^ PBB_div) */
+
+// ===== Peripheral Clock Management Options
+//#define CONFIG_SYSCLK_INIT_CPUMASK ((1 << SYSCLK_SYSTIMER) | (1 << SYSCLK_OCD))
+//#define CONFIG_SYSCLK_INIT_PBAMASK (1 << SYSCLK_USART0)
+//#define CONFIG_SYSCLK_INIT_PBBMASK (1 << SYSCLK_HMATRIX)
+//#define CONFIG_SYSCLK_INIT_HSBMASK (1 << SYSCLK_MDMA_HSB)
+
+// ===== USB Clock Source Options
+//#define CONFIG_USBCLK_SOURCE USBCLK_SRC_OSC0
+//#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL0
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL1
+#define CONFIG_USBCLK_DIV 1 /* Fusb = Fsys/(2 ^ USB_div) */
+
+#endif /* CONF_CLOCK_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/at32uc3a0512_evk1100/conf_sd_mmc_spi.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/at32uc3a0512_evk1100/conf_sd_mmc_spi.h
new file mode 100644
index 0000000..9a2ae9c
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/at32uc3a0512_evk1100/conf_sd_mmc_spi.h
@@ -0,0 +1,71 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief SD/MMC configuration file.
+ *
+ * This file contains the possible external configuration of the SD/MMC.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with an SPI module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_SD_MMC_SPI_H_
+#define _CONF_SD_MMC_SPI_H_
+
+
+#include "conf_access.h"
+
+#if SD_MMC_SPI_MEM == DISABLE
+#error conf_sd_mmc_spi.h is #included although SD_MMC_SPI_MEM is disabled
+#endif
+
+
+#include "sd_mmc_spi.h"
+
+
+//_____ D E F I N I T I O N S ______________________________________________
+
+//! SPI master speed in Hz.
+#define SD_MMC_SPI_MASTER_SPEED 20000000
+
+//! Number of bits in each SPI transfer.
+#define SD_MMC_SPI_BITS 8
+
+
+#endif // _CONF_SD_MMC_SPI_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/at32uc3a0512_evk1100/conf_sleepmgr.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/at32uc3a0512_evk1100/conf_sleepmgr.h
new file mode 100644
index 0000000..699010d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/at32uc3a0512_evk1100/conf_sleepmgr.h
@@ -0,0 +1,43 @@
+/**
+ * \file
+ *
+ * \brief Sleep manager configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SLEEPMGR_H
+#define CONF_SLEEPMGR_H
+
+#define CONFIG_SLEEPMGR_ENABLE
+
+#endif /* CONF_SLEEPMGR_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/at32uc3a0512_evk1100/conf_spi_master.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/at32uc3a0512_evk1100/conf_spi_master.h
new file mode 100644
index 0000000..7d17e60
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/at32uc3a0512_evk1100/conf_spi_master.h
@@ -0,0 +1,58 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Spi Master configuration for spi example
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SPI_MASTER_H_INCLUDED
+#define CONF_SPI_MASTER_H_INCLUDED
+
+/* Possibility to change low-level configurations here */
+
+//! Default Config Spi Master Delay BCS
+// #define CONFIG_SPI_MASTER_DELAY_BCS 0
+
+//! Default Config Spi Master Bits per Transfer Definition
+// #define CONFIG_SPI_MASTER_BITS_PER_TRANSFER 8
+
+//! Default Config Spi Master Delay BCT
+// #define CONFIG_SPI_MASTER_DELAY_BCT 0
+
+//! Default Config Spi Master Delay BS
+// #define CONFIG_SPI_MASTER_DELAY_BS 0
+
+//! Default Config Spi Master Dummy Field
+// #define CONFIG_SPI_MASTER_DUMMY 0xFF
+
+#endif /* CONF_SPI_MASTER_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/at32uc3a0512_evk1100/conf_virtual_mem.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/at32uc3a0512_evk1100/conf_virtual_mem.h
new file mode 100644
index 0000000..e08e62b
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/at32uc3a0512_evk1100/conf_virtual_mem.h
@@ -0,0 +1,54 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Virtual memory configuration file.
+ *
+ * This file contains the possible external configuration of the AT45DBX.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with an SPI module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_VIRTUAL_MEM_H_
+#define _CONF_VIRTUAL_MEM_H_
+
+//! Size of Virtual Memory on internal RAM (unit 512B)
+#define VMEM_NB_SECTOR 48 // 24KB
+
+#endif // _CONF_VIRTUAL_MEM_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/at32uc3a0512_evk1100/ui.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/at32uc3a0512_evk1100/ui.c
new file mode 100644
index 0000000..e0960e3
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/at32uc3a0512_evk1100/ui.c
@@ -0,0 +1,227 @@
+/**
+ * \file
+ *
+ * \brief User Interface
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "udi_msc.h"
+#include "udc.h"
+#include "udi_hid_mouse.h"
+#include "board.h"
+#include "gpio.h"
+#include "joystick.h"
+#include "eic.h"
+#include "ui.h"
+
+#define MOUSE_MOVE_RANGE 3
+
+// Interrupt on "pin change" from switch to do wakeup on USB
+// Note:
+// This interrupt is enable when the USB host enable remotewakeup feature
+// This interrupt wakeup the CPU if this one is in idle mode
+ISR(ui_wakeup_isr, AVR32_GPIO0_IRQ_GROUP, 0)
+{
+ // Clear GPIO interrupt.
+ gpio_clear_pin_interrupt_flag(GPIO_JOYSTICK_PUSH);
+ // Clear External Interrupt Line else Wakeup event always enabled
+ eic_clear_interrupt_line(&AVR32_EIC, EXT_NMI);
+ // It is a wakeup then send wakeup USB
+ udc_wakeup();
+}
+
+
+void ui_init(void)
+{
+ /* register joystick handler on level 0 */
+ irqflags_t flags = cpu_irq_save();
+ irq_register_handler(ui_wakeup_isr,
+ AVR32_GPIO_IRQ_0 + (GPIO_JOYSTICK_PUSH / 8), 0);
+ cpu_irq_restore(flags);
+
+ LED_On(LED0);
+ LED_Off(LED1);
+}
+
+void ui_powerdown(void)
+{
+ LED_Off(LED0);
+ LED_Off(LED1);
+}
+
+
+//! Structure holding the configuration parameters of the EIC low level driver.
+static const eic_options_t eic_options = {
+ // Choose External Interrupt Controller Line
+ .eic_line = EXT_NMI,
+ // Enable level-triggered interrupt.
+ .eic_mode = EIC_MODE_LEVEL_TRIGGERED,
+ // Don't care value because the chosen eic mode is level-triggered.
+ .eic_edge = 0,
+ // Interrupt will trigger on low-level.
+ .eic_level = EIC_LEVEL_LOW_LEVEL,
+ // Enable filter.
+ .eic_filter = EIC_FILTER_ENABLED,
+ // For Wake Up mode, initialize in asynchronous mode
+ .eic_async = EIC_ASYNCH_MODE
+};
+
+
+void ui_wakeup_enable(void)
+{
+ /* configure joystick to produce IT on all state change */
+ gpio_enable_pin_interrupt(GPIO_JOYSTICK_PUSH, GPIO_PIN_CHANGE);
+ /*
+ * Configure pin change interrupt for asynchronous wake-up (required to
+ * wake up from the STATIC sleep mode).
+ *
+ * First, map the interrupt line to the GPIO pin with the right
+ * peripheral function.
+ */
+ gpio_enable_module_pin(GPIO_JOYSTICK_PUSH, AVR32_EIC_EXTINT_8_FUNCTION);
+
+ /*
+ * Enable the internal pull-up resistor on that pin (because the EIC is
+ * configured such that the interrupt will trigger on low-level, see
+ * eic_options.eic_level).
+ */
+ gpio_enable_pin_pull_up(GPIO_JOYSTICK_PUSH);
+
+ // Init the EIC controller with the set options.
+ eic_init(&AVR32_EIC, &eic_options, sizeof(eic_options) /
+ sizeof(eic_options_t));
+
+ // Enable External Interrupt Controller Line
+ eic_enable_line(&AVR32_EIC, EXT_NMI);
+}
+
+void ui_wakeup_disable(void)
+{
+ eic_disable_line(&AVR32_EIC, EXT_NMI);
+ /* Disable joystick input change ITs. */
+ gpio_disable_pin_interrupt(GPIO_JOYSTICK_PUSH);
+}
+
+
+void ui_wakeup(void)
+{
+ LED_On(LED0);
+}
+
+void ui_start_read(void)
+{
+ LED_On(LED_BI0_GREEN);
+}
+
+void ui_stop_read(void)
+{
+ LED_Off(LED_BI0_GREEN);
+}
+
+void ui_start_write(void)
+{
+ LED_On(LED_BI0_RED);
+}
+
+void ui_stop_write(void)
+{
+ LED_Off(LED_BI0_RED);
+}
+
+void ui_process(uint16_t framenumber)
+{
+ bool b_btn_state;
+ static bool btn_left_last_state = HID_MOUSE_BTN_UP;
+ static bool btn_right_last_state = HID_MOUSE_BTN_UP;
+ static bool btn_middle_last_state = HID_MOUSE_BTN_UP;
+ static uint8_t cpt_sof = 0;
+
+ if ((framenumber % 1000) == 0) {
+ LED_On(LED1);
+ }
+ if ((framenumber % 1000) == 500) {
+ LED_Off(LED1);
+ }
+ // Scan process running each 2ms
+ cpt_sof++;
+ if (2 > cpt_sof)
+ return;
+ cpt_sof = 0;
+
+ // Scan buttons on switch 0 (left), 1 (middle), 2 (right)
+ b_btn_state = (!gpio_get_pin_value(GPIO_PUSH_BUTTON_0)) ?
+ HID_MOUSE_BTN_DOWN : HID_MOUSE_BTN_UP;
+ if (b_btn_state != btn_left_last_state) {
+ udi_hid_mouse_btnleft(b_btn_state);
+ btn_left_last_state = b_btn_state;
+ }
+ b_btn_state = (!gpio_get_pin_value(GPIO_PUSH_BUTTON_1)) ?
+ HID_MOUSE_BTN_DOWN : HID_MOUSE_BTN_UP;
+ if (b_btn_state != btn_middle_last_state) {
+ udi_hid_mouse_btnmiddle(b_btn_state);
+ btn_middle_last_state = b_btn_state;
+ }
+ b_btn_state = (!gpio_get_pin_value(GPIO_PUSH_BUTTON_2)) ?
+ HID_MOUSE_BTN_DOWN : HID_MOUSE_BTN_UP;
+ if (b_btn_state != btn_right_last_state) {
+ udi_hid_mouse_btnright(b_btn_state);
+ btn_right_last_state = b_btn_state;
+ }
+ // Joystick used to move mouse
+ if (is_joystick_right())
+ udi_hid_mouse_moveX(MOUSE_MOVE_RANGE);
+ if (is_joystick_left())
+ udi_hid_mouse_moveX(-MOUSE_MOVE_RANGE);
+ if (is_joystick_up())
+ udi_hid_mouse_moveY(-MOUSE_MOVE_RANGE);
+ if (is_joystick_down())
+ udi_hid_mouse_moveY(MOUSE_MOVE_RANGE);
+}
+
+/**
+ * \defgroup UI User Interface
+ *
+ * Human interface on EVK1100 :
+ * - PWR led is on when power present
+ * - Led 0 is on when USB line is in IDLE mode, and off in SUSPEND mode
+ * - Led 1 blinks when USB Host have checked and enabled HID and MSC interfaces
+ * - Led 4 green is on during read operation
+ * - Led 4 red is on during write operation
+ * - Mouse buttons are linked to switch PB0 (left), PB1 (middle), PB2 (right)
+ * - Joystick are used to move mouse
+ * - Only Push joystick button can be used to wakeup USB Host in remote wakeup mode.
+ *
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/atxmega128a1u_xplain_a1_mkii/conf_access.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/atxmega128a1u_xplain_a1_mkii/conf_access.h
new file mode 100644
index 0000000..ae9bb6c
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/atxmega128a1u_xplain_a1_mkii/conf_access.h
@@ -0,0 +1,186 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Memory access control configuration file.
+ *
+ * This file contains the possible external configuration of the memory access
+ * control.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_ACCESS_H_
+#define _CONF_ACCESS_H_
+
+#include "compiler.h"
+#include "board.h"
+
+
+/*! \name Activation of Logical Unit Numbers
+ */
+//! @{
+#define LUN_0 DISABLE //!< On-Chip Virtual Memory.
+#define LUN_1 ENABLE //!< AT45DBX Data Flash.
+#define LUN_2 DISABLE //!< SD/MMC Card over SPI.
+#define LUN_3 DISABLE //!< SD/MMC Card over MCI Slot 0.
+#define LUN_4 DISABLE
+#define LUN_5 DISABLE
+#define LUN_6 DISABLE
+#define LUN_7 DISABLE
+#define LUN_USB DISABLE //!< Host Mass-Storage Memory.
+//! @}
+
+/*! \name LUN 0 Definitions
+ */
+//! @{
+#define VIRTUAL_MEM LUN_0
+#define LUN_ID_VIRTUAL_MEM LUN_ID_0
+#define LUN_0_INCLUDE "virtual_mem.h"
+#define Lun_0_test_unit_ready virtual_test_unit_ready
+#define Lun_0_read_capacity virtual_read_capacity
+#define Lun_0_wr_protect virtual_wr_protect
+#define Lun_0_removal virtual_removal
+#define Lun_0_usb_read_10 virtual_usb_read_10
+#define Lun_0_usb_write_10 virtual_usb_write_10
+#define Lun_0_mem_2_ram virtual_mem_2_ram
+#define Lun_0_ram_2_mem virtual_ram_2_mem
+#define LUN_0_NAME "\"On-Chip Virtual Memory\""
+//! @}
+
+/*! \name LUN 1 Definitions
+ */
+//! @{
+#define AT45DBX_MEM LUN_1
+#define LUN_ID_AT45DBX_MEM LUN_ID_1
+#define LUN_1_INCLUDE "at45dbx_mem.h"
+#define Lun_1_test_unit_ready at45dbx_test_unit_ready
+#define Lun_1_read_capacity at45dbx_read_capacity
+#define Lun_1_wr_protect at45dbx_wr_protect
+#define Lun_1_removal at45dbx_removal
+#define Lun_1_usb_read_10 at45dbx_usb_read_10
+#define Lun_1_usb_write_10 at45dbx_usb_write_10
+#define Lun_1_mem_2_ram at45dbx_df_2_ram
+#define Lun_1_ram_2_mem at45dbx_ram_2_df
+#define LUN_1_NAME "\"AT45DBX Data Flash\""
+//! @}
+
+/*! \name LUN 2 Definitions
+ */
+//! @{
+#define SD_MMC_SPI_MEM LUN_2
+#define LUN_ID_SD_MMC_SPI_MEM LUN_ID_2
+#define LUN_2_INCLUDE "sd_mmc_spi_mem.h"
+#define Lun_2_test_unit_ready sd_mmc_spi_test_unit_ready
+#define Lun_2_read_capacity sd_mmc_spi_read_capacity
+#define Lun_2_wr_protect sd_mmc_spi_wr_protect
+#define Lun_2_removal sd_mmc_spi_removal
+#define Lun_2_usb_read_10 sd_mmc_spi_usb_read_10
+#define Lun_2_usb_write_10 sd_mmc_spi_usb_write_10
+#define Lun_2_mem_2_ram sd_mmc_spi_mem_2_ram
+#define Lun_2_ram_2_mem sd_mmc_spi_ram_2_mem
+#define LUN_2_NAME "\"SD/MMC Card over SPI\""
+//! @}
+
+/*! \name LUN 3 Definitions
+ */
+//! @{
+#define SD_MMC_MCI_0_MEM LUN_3
+#define LUN_ID_SD_MMC_MCI_0_MEM LUN_ID_3
+#define LUN_3_INCLUDE "sd_mmc_mci_mem.h"
+#define Lun_3_test_unit_ready sd_mmc_mci_test_unit_ready_0
+#define Lun_3_read_capacity sd_mmc_mci_read_capacity_0
+#define Lun_3_wr_protect sd_mmc_mci_wr_protect_0
+#define Lun_3_removal sd_mmc_mci_removal_0
+#define Lun_3_usb_read_10 sd_mmc_mci_usb_read_10_0
+#define Lun_3_usb_write_10 sd_mmc_mci_usb_write_10_0
+#define Lun_3_mem_2_ram sd_mmc_mci_mem_2_ram_0
+#define Lun_3_ram_2_mem sd_mmc_mci_ram_2_mem_0
+#define LUN_3_NAME "\"SD/MMC Card over MCI Slot 0\""
+//! @}
+
+/*! \name USB LUNs Definitions
+ */
+//! @{
+#define MEM_USB LUN_USB
+#define LUN_ID_MEM_USB LUN_ID_USB
+#define LUN_USB_INCLUDE "host_mem.h"
+#define Lun_usb_test_unit_ready(lun) host_test_unit_ready(lun)
+#define Lun_usb_read_capacity(lun, nb_sect) host_read_capacity(lun, nb_sect)
+#define Lun_usb_read_sector_size(lun) host_read_sector_size(lun)
+#define Lun_usb_wr_protect(lun) host_wr_protect(lun)
+#define Lun_usb_removal() host_removal()
+#define Lun_usb_mem_2_ram(addr, ram) host_read_10_ram(addr, ram)
+#define Lun_usb_ram_2_mem(addr, ram) host_write_10_ram(addr, ram)
+#define LUN_USB_NAME "\"Host Mass-Storage Memory\""
+//! @}
+
+/*! \name Actions Associated with Memory Accesses
+ *
+ * Write here the action to associate with each memory access.
+ *
+ * \warning Be careful not to waste time in order not to disturb the functions.
+ */
+//! @{
+#define memory_start_read_action(nb_sectors) ui_start_read()
+#define memory_stop_read_action() ui_stop_read()
+#define memory_start_write_action(nb_sectors) ui_start_write()
+#define memory_stop_write_action() ui_stop_write()
+#include "ui.h"
+//! @}
+
+/*! \name Activation of Interface Features
+ */
+//! @{
+#define ACCESS_USB ENABLED //!< MEM <-> USB interface.
+#define ACCESS_MEM_TO_RAM DISABLED //!< MEM <-> RAM interface.
+#define ACCESS_STREAM DISABLED //!< Streaming MEM <-> MEM interface.
+#define ACCESS_STREAM_RECORD DISABLED //!< Streaming MEM <-> MEM interface in record mode.
+#define ACCESS_MEM_TO_MEM DISABLED //!< MEM <-> MEM interface.
+#define ACCESS_CODEC DISABLED //!< Codec interface.
+//! @}
+
+/*! \name Specific Options for Access Control
+ */
+//! @{
+#define GLOBAL_WR_PROTECT DISABLED //!< Management of a global write protection.
+//! @}
+
+
+#endif // _CONF_ACCESS_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/atxmega128a1u_xplain_a1_mkii/conf_at45dbx.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/atxmega128a1u_xplain_a1_mkii/conf_at45dbx.h
new file mode 100644
index 0000000..84fcfb5
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/atxmega128a1u_xplain_a1_mkii/conf_at45dbx.h
@@ -0,0 +1,78 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief AT45DBX configuration file.
+ *
+ * This file contains the possible external configuration of the AT45DBX.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with an SPI module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_AT45DBX_H_
+#define _CONF_AT45DBX_H_
+
+#include "board.h"
+
+//_____ D E F I N I T I O N S ______________________________________________
+
+//! Connect AT45DBx driver to spi master service
+#define AT45DBX_USES_USART_SPI_SERVICE
+
+//! Size of AT45DBX data flash memories to manage.
+#define AT45DBX_MEM_SIZE AT45DBX_8MB
+
+//! Number of AT45DBX components to manage.
+#define AT45DBX_MEM_CNT 1
+
+//! Select the SPI module AT45DBX is conntected to
+#define AT45DBX_SPI_MODULE AT45DBX_SPI
+
+//! First chip select used by AT45DBX components on the SPI module instance.
+//! AT45DBX_SPI_NPCS0_PIN always corresponds to this first NPCS, whatever it is.
+#define AT45DBX_SPI_FIRST_NPCS AT45DBX_SPI_NPCS
+
+//! SPI master speed in Hz.
+#define AT45DBX_SPI_MASTER_SPEED 12000000
+
+//! Number of bits in each SPI transfer.
+#define AT45DBX_SPI_BITS 8
+
+
+#endif // _CONF_AT45DBX_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/atxmega128a1u_xplain_a1_mkii/conf_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/atxmega128a1u_xplain_a1_mkii/conf_board.h
new file mode 100644
index 0000000..2d2aa79
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/atxmega128a1u_xplain_a1_mkii/conf_board.h
@@ -0,0 +1,44 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Board configuration for spi example
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H_INCLUDED
+#define CONF_BOARD_H_INCLUDED
+
+// Enable AT45DBX Component.
+#define CONF_BOARD_AT45DBX
+
+#endif /* CONF_BOARD_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/atxmega128a1u_xplain_a1_mkii/conf_clock.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/atxmega128a1u_xplain_a1_mkii/conf_clock.h
new file mode 100644
index 0000000..1f92af9
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/atxmega128a1u_xplain_a1_mkii/conf_clock.h
@@ -0,0 +1,74 @@
+/**
+ * \file
+ *
+ * \brief Clock system configuration for clock example 1
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_CLOCK_H_INCLUDED
+#define CONF_CLOCK_H_INCLUDED
+
+//! Configuration using On-Chip RC oscillator at 48MHz
+//! The RC oscillator is calibrated via USB Start Of Frame
+//! Clk USB = 48MHz (used by USB)
+//! Clk sys = 48MHz
+//! Clk cpu/per = 24MHz
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_RCOSC
+#define CONFIG_OSC_RC32_CAL 48000000UL
+
+#define CONFIG_OSC_AUTOCAL OSC_ID_RC32MHZ
+#define CONFIG_OSC_AUTOCAL_REF_OSC OSC_ID_USBSOF
+
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_RC32MHZ
+#define CONFIG_SYSCLK_PSADIV SYSCLK_PSADIV_2
+#define CONFIG_SYSCLK_PSBCDIV SYSCLK_PSBCDIV_1_1
+
+/*
+//! Use external board OSC (8MHz)
+//! Clk pll = 48MHz (used by USB)
+//! Clk sys = 48MHz
+//! Clk cpu/per = 24MHz
+
+#define CONFIG_PLL0_SOURCE PLL_SRC_XOSC
+#define CONFIG_PLL0_MUL 6
+#define CONFIG_PLL0_DIV 1
+
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL
+
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL
+#define CONFIG_SYSCLK_PSADIV SYSCLK_PSADIV_2
+#define CONFIG_SYSCLK_PSBCDIV SYSCLK_PSBCDIV_1_1
+*/
+
+
+#endif /* CONF_CLOCK_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/atxmega128a1u_xplain_a1_mkii/conf_sd_mmc_spi.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/atxmega128a1u_xplain_a1_mkii/conf_sd_mmc_spi.h
new file mode 100644
index 0000000..9a2ae9c
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/atxmega128a1u_xplain_a1_mkii/conf_sd_mmc_spi.h
@@ -0,0 +1,71 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief SD/MMC configuration file.
+ *
+ * This file contains the possible external configuration of the SD/MMC.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with an SPI module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_SD_MMC_SPI_H_
+#define _CONF_SD_MMC_SPI_H_
+
+
+#include "conf_access.h"
+
+#if SD_MMC_SPI_MEM == DISABLE
+#error conf_sd_mmc_spi.h is #included although SD_MMC_SPI_MEM is disabled
+#endif
+
+
+#include "sd_mmc_spi.h"
+
+
+//_____ D E F I N I T I O N S ______________________________________________
+
+//! SPI master speed in Hz.
+#define SD_MMC_SPI_MASTER_SPEED 20000000
+
+//! Number of bits in each SPI transfer.
+#define SD_MMC_SPI_BITS 8
+
+
+#endif // _CONF_SD_MMC_SPI_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/atxmega128a1u_xplain_a1_mkii/conf_sleepmgr.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/atxmega128a1u_xplain_a1_mkii/conf_sleepmgr.h
new file mode 100644
index 0000000..699010d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/atxmega128a1u_xplain_a1_mkii/conf_sleepmgr.h
@@ -0,0 +1,43 @@
+/**
+ * \file
+ *
+ * \brief Sleep manager configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SLEEPMGR_H
+#define CONF_SLEEPMGR_H
+
+#define CONFIG_SLEEPMGR_ENABLE
+
+#endif /* CONF_SLEEPMGR_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/atxmega128a1u_xplain_a1_mkii/conf_spi_master.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/atxmega128a1u_xplain_a1_mkii/conf_spi_master.h
new file mode 100644
index 0000000..ed506f8
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/atxmega128a1u_xplain_a1_mkii/conf_spi_master.h
@@ -0,0 +1,41 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Spi Master configuration for spi example
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SPI_MASTER_H_INCLUDED
+#define CONF_SPI_MASTER_H_INCLUDED
+
+#endif /* CONF_SPI_MASTER_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/atxmega128a1u_xplain_a1_mkii/conf_usart_spi.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/atxmega128a1u_xplain_a1_mkii/conf_usart_spi.h
new file mode 100644
index 0000000..56fa5de
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/atxmega128a1u_xplain_a1_mkii/conf_usart_spi.h
@@ -0,0 +1,41 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Spi Master configuration for spi example
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_USART_SPI_H_INCLUDED
+#define CONF_USART_SPI_H_INCLUDED
+
+#endif /* CONF_SPI_MASTER_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/atxmega128a1u_xplain_a1_mkii/conf_virtual_mem.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/atxmega128a1u_xplain_a1_mkii/conf_virtual_mem.h
new file mode 100644
index 0000000..a9faf2e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/atxmega128a1u_xplain_a1_mkii/conf_virtual_mem.h
@@ -0,0 +1,54 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Virtual memory configuration file.
+ *
+ * This file contains the possible external configuration of the AT45DBX.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with an SPI module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_VIRTUAL_MEM_H_
+#define _CONF_VIRTUAL_MEM_H_
+
+//! Size of Virtual Memory on internal RAM (unit 512B)
+#define VMEM_NB_SECTOR 8 // 4KB
+
+#endif // _CONF_VIRTUAL_MEM_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/atxmega128a1u_xplain_a1_mkii/ui.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/atxmega128a1u_xplain_a1_mkii/ui.c
new file mode 100644
index 0000000..c947edd
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/atxmega128a1u_xplain_a1_mkii/ui.c
@@ -0,0 +1,197 @@
+/**
+ * \file
+ *
+ * \brief User Interface
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "udi_msc.h"
+#include "udc.h"
+#include "udi_hid_mouse.h"
+#include "board.h"
+#include "led.h"
+#include "ui.h"
+
+#define MOUSE_MOVE_RANGE 3
+
+void ui_init(void)
+{
+ LED_On(LEDUSB_GPIO);
+ LED_On(LED0_GPIO);
+ LED_Off(LED1_GPIO);
+}
+
+void ui_powerdown(void)
+{
+ LED_Off(LED0_GPIO);
+ LED_Off(LED1_GPIO);
+}
+
+void ui_wakeup_enable(void)
+{
+ PORT_t *port;
+ // Configure pin change interrupt for asynch. wake-up on button pin.
+ ioport_configure_pin(GPIO_PUSH_BUTTON_0,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ ioport_configure_pin(GPIO_PUSH_BUTTON_1,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ ioport_configure_pin(GPIO_PUSH_BUTTON_2,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ ioport_configure_pin(GPIO_PUSH_BUTTON_3,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ ioport_configure_pin(GPIO_PUSH_BUTTON_4,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ ioport_configure_pin(GPIO_PUSH_BUTTON_5,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ ioport_configure_pin(GPIO_PUSH_BUTTON_6,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ ioport_configure_pin(GPIO_PUSH_BUTTON_7,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ port = ioport_pin_to_port(GPIO_PUSH_BUTTON_0);
+ port->INT0MASK = 0xFF;
+ port->INTCTRL = PORT_INT0LVL_LO_gc;
+}
+
+void ui_wakeup_disable(void)
+{
+ PORT_t *port;
+ port = ioport_pin_to_port(GPIO_PUSH_BUTTON_0);
+ port->INT0MASK = 0x00;
+}
+
+// Interrupt on "pin change" from switch to do wakeup on USB
+// Note:
+// This interrupt is enable when the USB host enable remotewakeup feature
+// This interrupt wakeup the CPU if this one is in idle mode
+ISR(PORTF_INT0_vect)
+{
+ PORT_t *port;
+ port = ioport_pin_to_port(GPIO_PUSH_BUTTON_0);
+ port->INTFLAGS = 0x01; // Ack interrupt
+ // It is a wakeup then send wakeup USB
+ udc_wakeup();
+}
+
+void ui_wakeup(void)
+{
+ LED_On(LED0_GPIO);
+}
+
+
+void ui_start_read(void)
+{
+ LED_On(LED2_GPIO);
+}
+
+void ui_stop_read(void)
+{
+ LED_Off(LED2_GPIO);
+}
+
+void ui_start_write(void)
+{
+ LED_On(LED3_GPIO);
+}
+
+void ui_stop_write(void)
+{
+ LED_Off(LED3_GPIO);
+}
+
+void ui_process(uint16_t framenumber)
+{
+ bool b_btn_state;
+ static bool btn_left_last_state = HID_MOUSE_BTN_UP;
+ static bool btn_right_last_state = HID_MOUSE_BTN_UP;
+ static bool btn_middle_last_state = HID_MOUSE_BTN_UP;
+ static uint8_t cpt_sof = 0;
+
+ if ((framenumber % 1000) == 0) {
+ LED_On(LED1_GPIO);
+ }
+ if ((framenumber % 1000) == 500) {
+ LED_Off(LED1_GPIO);
+ }
+ // Scan process running each 2ms
+ cpt_sof++;
+ if (2 > cpt_sof)
+ return;
+ cpt_sof = 0;
+
+ // Scan buttons on switch 0 (left), 1 (middle), 2 (right)
+ b_btn_state = (gpio_pin_is_low(GPIO_PUSH_BUTTON_0)) ? HID_MOUSE_BTN_DOWN
+ : HID_MOUSE_BTN_UP;
+ if (b_btn_state != btn_left_last_state) {
+ udi_hid_mouse_btnleft(b_btn_state);
+ btn_left_last_state = b_btn_state;
+ }
+ b_btn_state = (gpio_pin_is_low(GPIO_PUSH_BUTTON_1)) ? HID_MOUSE_BTN_DOWN
+ : HID_MOUSE_BTN_UP;
+ if (b_btn_state != btn_middle_last_state) {
+ udi_hid_mouse_btnmiddle(b_btn_state);
+ btn_middle_last_state = b_btn_state;
+ }
+ b_btn_state = (gpio_pin_is_low(GPIO_PUSH_BUTTON_2)) ? HID_MOUSE_BTN_DOWN
+ : HID_MOUSE_BTN_UP;
+ if (b_btn_state != btn_right_last_state) {
+ udi_hid_mouse_btnright(b_btn_state);
+ btn_right_last_state = b_btn_state;
+ }
+ // Scan move on switch 4 (right), 5 (left), 6 (down), 7 (up)
+ if (gpio_pin_is_low(GPIO_PUSH_BUTTON_4))
+ udi_hid_mouse_moveX(MOUSE_MOVE_RANGE);
+ if (gpio_pin_is_low(GPIO_PUSH_BUTTON_5))
+ udi_hid_mouse_moveX(-MOUSE_MOVE_RANGE);
+ if (gpio_pin_is_low(GPIO_PUSH_BUTTON_6))
+ udi_hid_mouse_moveY(MOUSE_MOVE_RANGE);
+ if (gpio_pin_is_low(GPIO_PUSH_BUTTON_7))
+ udi_hid_mouse_moveY(-MOUSE_MOVE_RANGE);
+}
+
+/**
+ * \defgroup UI User Interface
+ *
+ * Human interface on Xplain-A1:
+ * - RED led close to USB connector is always on after firmware startup
+ * - Led 0 is on when USB line is in IDLE mode, and off in SUSPEND mode
+ * - Led 1 blinks when USB Host have checked and enabled HID and MSC interfaces
+ * - Led 2 is on during read operation
+ * - Led 3 is on during write operation
+ * - Mouse buttons are linked at switches 0 (left), 1 (middle), 2 (right)
+ * - Mouse move are linked at switches 4 (right), 5 (left), 6 (down), 7 (up)
+ * - All switches can be used to wakeup USB Host in remote wakeup mode.
+ *
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/conf_usb.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/conf_usb.h
new file mode 100644
index 0000000..5cf09e9
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/conf_usb.h
@@ -0,0 +1,213 @@
+/**
+ * \file
+ *
+ * \brief USB configuration file
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _CONF_USB_H_
+#define _CONF_USB_H_
+
+#include "compiler.h"
+
+/**
+ * USB Device Configuration
+ * @{
+ */
+
+//! Device definition (mandatory)
+#define USB_DEVICE_VENDOR_ID USB_VID_ATMEL
+#define USB_DEVICE_PRODUCT_ID USB_PID_ATMEL_AVR_MSC_HIDMOUSE
+#define USB_DEVICE_MAJOR_VERSION 1
+#define USB_DEVICE_MINOR_VERSION 0
+#define USB_DEVICE_POWER 100 // Consumption on Vbus line (mA)
+#define USB_DEVICE_ATTR \
+ (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_SELF_POWERED)
+// (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_BUS_POWERED)
+// (USB_CONFIG_ATTR_SELF_POWERED)
+// (USB_CONFIG_ATTR_BUS_POWERED)
+
+//! USB Device string definitions (Optional)
+#define USB_DEVICE_MANUFACTURE_NAME "ATMEL AVR"
+#define USB_DEVICE_PRODUCT_NAME "HID Mouse and MSC"
+#define USB_DEVICE_SERIAL_NAME "123123123123" // Disk SN for MSC
+
+/**
+ * Device speeds support
+ * @{
+ */
+
+//! To define a Low speed device
+//#define USB_DEVICE_LOW_SPEED
+
+//! To authorize the High speed
+#if (UC3A3||UC3A4)
+#define USB_DEVICE_HS_SUPPORT
+#endif
+//@}
+
+/**
+ * USB Device Callbacks definitions (Optional)
+ * @{
+ */
+#define UDC_VBUS_EVENT(b_vbus_high) main_vbus_action(b_vbus_high)
+#define UDC_SOF_EVENT() main_sof_action()
+#define UDC_SUSPEND_EVENT() main_suspend_action()
+#define UDC_RESUME_EVENT() main_resume_action()
+//! Mandatory when USB_DEVICE_ATTR authorizes remote wakeup feature
+#define UDC_REMOTEWAKEUP_ENABLE() main_remotewakeup_enable()
+#define UDC_REMOTEWAKEUP_DISABLE() main_remotewakeup_disable()
+//! When a extra string descriptor must be supported
+//! other than manufacturer, product and serial string
+// #define UDC_GET_EXTRA_STRING()
+//@}
+
+/**
+ * USB Device low level configuration
+ * When only one interface is used, these configurations are defined by the class module.
+ * For composite device, these configuration must be defined here
+ * @{
+ */
+//! Control endpoint size
+#define USB_DEVICE_EP_CTRL_SIZE 64
+
+//! Two interfaces for this device (MSC + HID mouse)
+#define USB_DEVICE_NB_INTERFACE 2
+
+//! 3 endpoints used by HID mouse and MSC interfaces
+#define USB_DEVICE_MAX_EP 3
+//@}
+
+//@}
+
+
+/**
+ * USB Interface Configuration
+ * @{
+ */
+
+/**
+ * Configuration of MSC interface
+ * @{
+ */
+//! Vendor name and Product version of MSC interface
+#define UDI_MSC_GLOBAL_VENDOR_ID \
+ 'A', 'T', 'M', 'E', 'L', ' ', ' ', ' '
+#define UDI_MSC_GLOBAL_PRODUCT_VERSION \
+ '1', '.', '0', '0'
+
+//! Interface callback definition
+#define UDI_MSC_ENABLE_EXT() main_msc_enable()
+#define UDI_MSC_DISABLE_EXT() main_msc_disable()
+
+/**
+ * USB MSC low level configuration
+ * In standalone these configurations are defined by the MSC module.
+ * For composite device, these configuration must be defined here
+ * @{
+ */
+//! Endpoint numbers definition
+#define UDI_MSC_EP_IN (1 | USB_EP_DIR_IN)
+#define UDI_MSC_EP_OUT (2 | USB_EP_DIR_OUT)
+
+//! Interface number
+#define UDI_MSC_IFACE_NUMBER 0
+//@}
+//@}
+
+
+/**
+ * Configuration of HID Mouse interface
+ * @{
+ */
+//! Interface callback definition
+#define UDI_HID_MOUSE_ENABLE_EXT() main_mouse_enable()
+#define UDI_HID_MOUSE_DISABLE_EXT() main_mouse_disable()
+
+/**
+ * USB HID Mouse low level configuration
+ * In standalone these configurations are defined by the HID Mouse module.
+ * For composite device, these configuration must be defined here
+ * @{
+ */
+//! Endpoint numbers definition
+#define UDI_HID_MOUSE_EP_IN (3 | USB_EP_DIR_IN)
+
+//! Interface number
+#define UDI_HID_MOUSE_IFACE_NUMBER 1
+//@}
+//@}
+
+//@}
+
+
+/**
+ * Description of Composite Device
+ * @{
+ */
+//! USB Interfaces descriptor structure
+#define UDI_COMPOSITE_DESC_T \
+ udi_msc_desc_t udi_msc; \
+ udi_hid_mouse_desc_t hid_mouse
+
+//! USB Interfaces descriptor value for Full Speed
+#define UDI_COMPOSITE_DESC_FS \
+ .udi_msc = UDI_MSC_DESC_FS, \
+ .hid_mouse = UDI_HID_MOUSE_DESC
+
+//! USB Interfaces descriptor value for High Speed
+#define UDI_COMPOSITE_DESC_HS \
+ .udi_msc = UDI_MSC_DESC_HS, \
+ .hid_mouse = UDI_HID_MOUSE_DESC
+
+//! USB Interface APIs
+#define UDI_COMPOSITE_API \
+ &udi_api_msc, \
+ &udi_api_hid_mouse
+//@}
+
+
+/**
+ * USB Device Driver Configuration
+ * @{
+ */
+//@}
+
+//! The includes of classes and other headers must be done at the end of this file to avoid compile error
+#include "udi_hid_mouse.h"
+#include "udi_msc.h"
+#include "main.h"
+
+
+#endif // _CONF_USB_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/main.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/main.c
new file mode 100644
index 0000000..d98d27a
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/main.c
@@ -0,0 +1,291 @@
+/**
+ * \file
+ *
+ * \brief Main functions for USB composite example
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "preprocessor.h"
+#include "board.h"
+#include "gpio.h"
+#include "sysclk.h"
+#include "sleepmgr.h"
+#include "conf_usb.h"
+#include "udd.h"
+#include "udc.h"
+#include "udi_msc.h"
+#include "udi_hid.h"
+#include "ui.h"
+#include "conf_access.h"
+#include "at45dbx.h"
+
+static bool main_b_mouse_enable = false;
+static bool main_b_msc_enable = false;
+
+
+
+#if UC3A3
+//! \brief Init HMatrix
+static void init_hmatrix(void);
+#endif
+#if ((defined SD_MMC_MCI_0_MEM) && (SD_MMC_MCI_0_MEM == ENABLE)) \
+ || ((defined SD_MMC_MCI_1_MEM) && (SD_MMC_MCI_1_MEM == ENABLE))
+//! \brief Initializes SD/MMC resources: GPIO, MCI and SD/MMC.
+static void sd_mmc_mci_resources_init(void);
+#endif
+
+/*! \brief Main function. Execution starts here.
+ */
+int main(void)
+{
+ irq_initialize_vectors();
+ cpu_irq_enable();
+
+ // Initialize the sleep manager
+ sleepmgr_init();
+
+ sysclk_init();
+ board_init();
+ ui_init();
+ ui_powerdown();
+
+#if UC3A3
+ // Init Hmatrix bus
+ sysclk_enable_pbb_module(SYSCLK_HMATRIX);
+ init_hmatrix();
+#endif
+#if (defined AT45DBX_MEM) && (AT45DBX_MEM == ENABLE)
+ at45dbx_init();
+#endif
+#if ((defined SD_MMC_MCI_0_MEM) && (SD_MMC_MCI_0_MEM == ENABLE)) \
+ || ((defined SD_MMC_MCI_1_MEM) && (SD_MMC_MCI_1_MEM == ENABLE))
+ // Initialize SD/MMC with MCI PB clock.
+ sysclk_enable_pbb_module(SYSCLK_MCI);
+ sysclk_enable_hsb_module(SYSCLK_DMACA);
+ sd_mmc_mci_resources_init();
+#endif
+
+ // Start USB stack to authorize VBus monitoring
+ udc_start();
+
+ if (!udc_include_vbus_monitoring()) {
+ // VBUS monitoring is not available on this product
+ // thereby VBUS has to be considered as present
+ main_vbus_action(true);
+ }
+
+ // The main loop manages only the power mode
+ // because the USB management is done by interrupt
+ while (true) {
+
+ sleepmgr_enter_sleep();
+ if (main_b_msc_enable) {
+ udi_msc_process_trans();
+ }
+ }
+}
+
+void main_vbus_action(bool b_high)
+{
+ if (b_high) {
+ // Attach USB Device
+ udc_attach();
+ } else {
+ // VBUS not present
+ udc_detach();
+ }
+}
+
+void main_suspend_action(void)
+{
+ ui_powerdown();
+}
+
+void main_resume_action(void)
+{
+ ui_wakeup();
+}
+
+void main_sof_action(void)
+{
+ if ((!main_b_mouse_enable) || (!main_b_msc_enable))
+ return;
+ ui_process(udd_get_frame_number());
+}
+
+void main_remotewakeup_enable(void)
+{
+ ui_wakeup_enable();
+}
+
+void main_remotewakeup_disable(void)
+{
+ ui_wakeup_disable();
+}
+
+bool main_mouse_enable(void)
+{
+ main_b_mouse_enable = true;
+ return true;
+}
+
+void main_mouse_disable(void)
+{
+ main_b_mouse_enable = false;
+}
+
+bool main_msc_enable(void)
+{
+ main_b_msc_enable = true;
+ return true;
+}
+
+void main_msc_disable(void)
+{
+ main_b_msc_enable = false;
+}
+
+
+#if UC3A3
+/*! \name Hmatrix bus configuration
+ */
+static void init_hmatrix(void)
+{
+ union {
+ unsigned long scfg;
+ avr32_hmatrix_scfg_t SCFG;
+ } u_avr32_hmatrix_scfg;
+
+ // For the internal-flash HMATRIX slave, use last master as default.
+ u_avr32_hmatrix_scfg.scfg =
+ AVR32_HMATRIX.scfg[AVR32_HMATRIX_SLAVE_FLASH];
+ u_avr32_hmatrix_scfg.SCFG.defmstr_type =
+ AVR32_HMATRIX_DEFMSTR_TYPE_LAST_DEFAULT;
+ AVR32_HMATRIX.scfg[AVR32_HMATRIX_SLAVE_FLASH] =
+ u_avr32_hmatrix_scfg.scfg;
+}
+#endif
+
+
+#if ((defined SD_MMC_MCI_0_MEM) && (SD_MMC_MCI_0_MEM == ENABLE)) \
+ || ((defined SD_MMC_MCI_1_MEM) && (SD_MMC_MCI_1_MEM == ENABLE))
+#include "mci.h"
+#include "conf_sd_mmc_mci.h"
+
+/*! \brief Initializes SD/MMC resources: GPIO, MCI and SD/MMC.
+ */
+static void sd_mmc_mci_resources_init(void)
+{
+ static const gpio_map_t SD_MMC_MCI_GPIO_MAP = {
+ {SD_SLOT_8BITS_CLK_PIN, SD_SLOT_8BITS_CLK_FUNCTION}, // SD CLK.
+ {SD_SLOT_8BITS_CMD_PIN, SD_SLOT_8BITS_CMD_FUNCTION}, // SD CMD.
+ {SD_SLOT_8BITS_DATA0_PIN, SD_SLOT_8BITS_DATA0_FUNCTION}, // SD DAT[0].
+ {SD_SLOT_8BITS_DATA1_PIN, SD_SLOT_8BITS_DATA1_FUNCTION}, // DATA Pin.
+ {SD_SLOT_8BITS_DATA2_PIN, SD_SLOT_8BITS_DATA2_FUNCTION}, // DATA Pin.
+ {SD_SLOT_8BITS_DATA3_PIN, SD_SLOT_8BITS_DATA3_FUNCTION}, // DATA Pin.
+ {SD_SLOT_8BITS_DATA4_PIN, SD_SLOT_8BITS_DATA4_FUNCTION}, // DATA Pin.
+ {SD_SLOT_8BITS_DATA5_PIN, SD_SLOT_8BITS_DATA5_FUNCTION}, // DATA Pin.
+ {SD_SLOT_8BITS_DATA6_PIN, SD_SLOT_8BITS_DATA6_FUNCTION}, // DATA Pin.
+ {SD_SLOT_8BITS_DATA7_PIN, SD_SLOT_8BITS_DATA7_FUNCTION} // DATA Pin.
+ };
+
+ // MCI options.
+ static const mci_options_t MCI_OPTIONS = {
+ .card_speed = 400000,
+ .card_slot = SD_SLOT_8BITS, // Default card initialization.
+ };
+
+ // Assign I/Os to MCI.
+ gpio_enable_module(SD_MMC_MCI_GPIO_MAP,
+ sizeof(SD_MMC_MCI_GPIO_MAP) /
+ sizeof(SD_MMC_MCI_GPIO_MAP[0]));
+
+ // Enable pull-up for Card Detect.
+ gpio_enable_pin_pull_up(SD_SLOT_8BITS_CARD_DETECT);
+
+ // Enable pull-up for Write Protect.
+ gpio_enable_pin_pull_up(SD_SLOT_8BITS_WRITE_PROTECT);
+
+ sd_mmc_mci_init(&MCI_OPTIONS, sysclk_get_pbb_hz(), sysclk_get_cpu_hz());
+}
+#endif // SD_MMC_MCI_0_MEM == ENABLE || SD_MMC_MCI_1_MEM == ENABLE
+
+/**
+ * \mainpage ASF USB Device Composite
+ *
+ * \section intro Introduction
+ * This example shows how to implement a USB Device Composite with HID mouse and
+ * Mass Storage interfaces on AVR products with USB module.
+ *
+ * \section startup Startup
+ * The example uses all memories available on the board and connects these to
+ * USB Device Mass Storage stack.
+ * Also, the example uses the buttons or sensors available on the board
+ * to simulate a standard mouse.
+ * After loading firmware, connect hardware board (EVKxx,XPlain,...) to the USB Host.
+ * When connected to a USB host system this application allows to display
+ * all available memories as a removable disks and provides a mouse in
+ * the Unix/Mac/Windows operating systems.
+ * \note
+ * This example uses the native MSC and HID drivers on Unix/Mac/Windows OS, except for Win98.
+ *
+ * \copydoc UI
+ *
+ * \section example About example
+ *
+ * The example uses the following module groups:
+ * - Basic modules:
+ * Startup, board, clock, interrupt, power management
+ * - USB Device stack and HID & MSC modules:
+ * <br>services/usb/
+ * <br>services/usb/udc/
+ * <br>services/usb/class/msc/
+ * <br>services/usb/class/hid/
+ * <br>services/usb/class/hid/mouse/
+ * - Specific implementation:
+ * - main.c,
+ * <br>initializes clock
+ * <br>initializes interrupt
+ * <br>\subpage power_management
+ * <br>manages UI
+ * - udi_composite_desc.c,udi_composite_conf.h,
+ * <br>USB Device composite definition
+ * - specific implementation for each target "./examples/product_board/":
+ * - conf_foo.h configuration of each module
+ * - ui.c implement of user's interface (buttons, leds)
+ *
+ * <SUP>1</SUP> The memory data transfers are done outside USB interrupt routine.
+ * This is done in the MSC process ("udi_msc_process_trans()") called by main loop.
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/main.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/main.h
new file mode 100644
index 0000000..c842d23
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/main.h
@@ -0,0 +1,98 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief Declaration of main function used by Composite example 1
+ *
+ * - Compiler: IAR EWAVR and GNU GCC for AVR
+ * - Supported devices: All AVR devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#ifndef _MAIN_H_
+#define _MAIN_H_
+
+/*! \brief Called by MSC interface
+ * Callback running when USB Host enable MSC interface
+ *
+ * \retval true if MSC startup is ok
+ */
+bool main_msc_enable(void);
+
+/*! \brief Called by MSC interface
+ * Callback running when USB Host disable MSC interface
+ */
+void main_msc_disable(void);
+
+/*! \brief Called by HID interface
+ * Callback running when USB Host enable mouse interface
+ *
+ * \retval true if mouse startup is ok
+ */
+bool main_mouse_enable(void);
+
+/*! \brief Called by HID interface
+ * Callback running when USB Host disable mouse interface
+ */
+void main_mouse_disable(void);
+
+/*! \brief Called when Vbus line state change
+ */
+void main_vbus_action(bool b_high);
+
+/*! \brief Called when a start of frame is received on USB line
+ */
+void main_sof_action(void);
+
+/*! \brief Called by UDD when a suspend is received
+ * Callback running when USB Host set USB line in suspend state
+ */
+void main_suspend_action(void);
+
+/*! \brief Called by UDD when the USB line exit of suspend state
+ */
+void main_resume_action(void);
+
+/*! \brief Called by UDC when USB Host request to enable remote wakeup
+ */
+void main_remotewakeup_enable(void);
+
+/*! \brief Called by UDC when USB Host request to disable remote wakeup
+ */
+void main_remotewakeup_disable(void);
+
+#endif // _MAIN_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/ui.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/ui.h
new file mode 100644
index 0000000..e92d7a4
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example1/ui.h
@@ -0,0 +1,61 @@
+/**
+ * \file
+ *
+ * \brief Common User Interface for USB application
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _UI_H_
+#define _UI_H_
+
+void ui_init(void);
+void ui_powerdown(void);
+
+void ui_wakeup_enable(void);
+void ui_wakeup_disable(void);
+void ui_wakeup(void);
+
+void ui_start_read(void);
+void ui_stop_read(void);
+void ui_start_write(void);
+void ui_stop_write(void);
+
+//! This process is called called each 1ms
+//! It is called only if the interfaces are enable.
+//! It is called by SOF interrupt.
+//!
+//!
+void ui_process(uint16_t framenumber);
+
+#endif // _UI_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/conf_access.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/conf_access.h
new file mode 100644
index 0000000..ae9bb6c
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/conf_access.h
@@ -0,0 +1,186 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Memory access control configuration file.
+ *
+ * This file contains the possible external configuration of the memory access
+ * control.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_ACCESS_H_
+#define _CONF_ACCESS_H_
+
+#include "compiler.h"
+#include "board.h"
+
+
+/*! \name Activation of Logical Unit Numbers
+ */
+//! @{
+#define LUN_0 DISABLE //!< On-Chip Virtual Memory.
+#define LUN_1 ENABLE //!< AT45DBX Data Flash.
+#define LUN_2 DISABLE //!< SD/MMC Card over SPI.
+#define LUN_3 DISABLE //!< SD/MMC Card over MCI Slot 0.
+#define LUN_4 DISABLE
+#define LUN_5 DISABLE
+#define LUN_6 DISABLE
+#define LUN_7 DISABLE
+#define LUN_USB DISABLE //!< Host Mass-Storage Memory.
+//! @}
+
+/*! \name LUN 0 Definitions
+ */
+//! @{
+#define VIRTUAL_MEM LUN_0
+#define LUN_ID_VIRTUAL_MEM LUN_ID_0
+#define LUN_0_INCLUDE "virtual_mem.h"
+#define Lun_0_test_unit_ready virtual_test_unit_ready
+#define Lun_0_read_capacity virtual_read_capacity
+#define Lun_0_wr_protect virtual_wr_protect
+#define Lun_0_removal virtual_removal
+#define Lun_0_usb_read_10 virtual_usb_read_10
+#define Lun_0_usb_write_10 virtual_usb_write_10
+#define Lun_0_mem_2_ram virtual_mem_2_ram
+#define Lun_0_ram_2_mem virtual_ram_2_mem
+#define LUN_0_NAME "\"On-Chip Virtual Memory\""
+//! @}
+
+/*! \name LUN 1 Definitions
+ */
+//! @{
+#define AT45DBX_MEM LUN_1
+#define LUN_ID_AT45DBX_MEM LUN_ID_1
+#define LUN_1_INCLUDE "at45dbx_mem.h"
+#define Lun_1_test_unit_ready at45dbx_test_unit_ready
+#define Lun_1_read_capacity at45dbx_read_capacity
+#define Lun_1_wr_protect at45dbx_wr_protect
+#define Lun_1_removal at45dbx_removal
+#define Lun_1_usb_read_10 at45dbx_usb_read_10
+#define Lun_1_usb_write_10 at45dbx_usb_write_10
+#define Lun_1_mem_2_ram at45dbx_df_2_ram
+#define Lun_1_ram_2_mem at45dbx_ram_2_df
+#define LUN_1_NAME "\"AT45DBX Data Flash\""
+//! @}
+
+/*! \name LUN 2 Definitions
+ */
+//! @{
+#define SD_MMC_SPI_MEM LUN_2
+#define LUN_ID_SD_MMC_SPI_MEM LUN_ID_2
+#define LUN_2_INCLUDE "sd_mmc_spi_mem.h"
+#define Lun_2_test_unit_ready sd_mmc_spi_test_unit_ready
+#define Lun_2_read_capacity sd_mmc_spi_read_capacity
+#define Lun_2_wr_protect sd_mmc_spi_wr_protect
+#define Lun_2_removal sd_mmc_spi_removal
+#define Lun_2_usb_read_10 sd_mmc_spi_usb_read_10
+#define Lun_2_usb_write_10 sd_mmc_spi_usb_write_10
+#define Lun_2_mem_2_ram sd_mmc_spi_mem_2_ram
+#define Lun_2_ram_2_mem sd_mmc_spi_ram_2_mem
+#define LUN_2_NAME "\"SD/MMC Card over SPI\""
+//! @}
+
+/*! \name LUN 3 Definitions
+ */
+//! @{
+#define SD_MMC_MCI_0_MEM LUN_3
+#define LUN_ID_SD_MMC_MCI_0_MEM LUN_ID_3
+#define LUN_3_INCLUDE "sd_mmc_mci_mem.h"
+#define Lun_3_test_unit_ready sd_mmc_mci_test_unit_ready_0
+#define Lun_3_read_capacity sd_mmc_mci_read_capacity_0
+#define Lun_3_wr_protect sd_mmc_mci_wr_protect_0
+#define Lun_3_removal sd_mmc_mci_removal_0
+#define Lun_3_usb_read_10 sd_mmc_mci_usb_read_10_0
+#define Lun_3_usb_write_10 sd_mmc_mci_usb_write_10_0
+#define Lun_3_mem_2_ram sd_mmc_mci_mem_2_ram_0
+#define Lun_3_ram_2_mem sd_mmc_mci_ram_2_mem_0
+#define LUN_3_NAME "\"SD/MMC Card over MCI Slot 0\""
+//! @}
+
+/*! \name USB LUNs Definitions
+ */
+//! @{
+#define MEM_USB LUN_USB
+#define LUN_ID_MEM_USB LUN_ID_USB
+#define LUN_USB_INCLUDE "host_mem.h"
+#define Lun_usb_test_unit_ready(lun) host_test_unit_ready(lun)
+#define Lun_usb_read_capacity(lun, nb_sect) host_read_capacity(lun, nb_sect)
+#define Lun_usb_read_sector_size(lun) host_read_sector_size(lun)
+#define Lun_usb_wr_protect(lun) host_wr_protect(lun)
+#define Lun_usb_removal() host_removal()
+#define Lun_usb_mem_2_ram(addr, ram) host_read_10_ram(addr, ram)
+#define Lun_usb_ram_2_mem(addr, ram) host_write_10_ram(addr, ram)
+#define LUN_USB_NAME "\"Host Mass-Storage Memory\""
+//! @}
+
+/*! \name Actions Associated with Memory Accesses
+ *
+ * Write here the action to associate with each memory access.
+ *
+ * \warning Be careful not to waste time in order not to disturb the functions.
+ */
+//! @{
+#define memory_start_read_action(nb_sectors) ui_start_read()
+#define memory_stop_read_action() ui_stop_read()
+#define memory_start_write_action(nb_sectors) ui_start_write()
+#define memory_stop_write_action() ui_stop_write()
+#include "ui.h"
+//! @}
+
+/*! \name Activation of Interface Features
+ */
+//! @{
+#define ACCESS_USB ENABLED //!< MEM <-> USB interface.
+#define ACCESS_MEM_TO_RAM DISABLED //!< MEM <-> RAM interface.
+#define ACCESS_STREAM DISABLED //!< Streaming MEM <-> MEM interface.
+#define ACCESS_STREAM_RECORD DISABLED //!< Streaming MEM <-> MEM interface in record mode.
+#define ACCESS_MEM_TO_MEM DISABLED //!< MEM <-> MEM interface.
+#define ACCESS_CODEC DISABLED //!< Codec interface.
+//! @}
+
+/*! \name Specific Options for Access Control
+ */
+//! @{
+#define GLOBAL_WR_PROTECT DISABLED //!< Management of a global write protection.
+//! @}
+
+
+#endif // _CONF_ACCESS_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/conf_at45dbx.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/conf_at45dbx.h
new file mode 100644
index 0000000..9f17a76
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/conf_at45dbx.h
@@ -0,0 +1,78 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief AT45DBX configuration file.
+ *
+ * This file contains the possible external configuration of the AT45DBX.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with an SPI module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_AT45DBX_H_
+#define _CONF_AT45DBX_H_
+
+#include "board.h"
+
+//_____ D E F I N I T I O N S ______________________________________________
+
+//! Connect AT45DBx driver to spi master service
+#define AT45DBX_USES_USART_SPI_SERVICE
+
+//! Size of AT45DBX data flash memories to manage.
+#define AT45DBX_MEM_SIZE AT45DBX_8MB
+
+//! Number of AT45DBX components to manage.
+#define AT45DBX_MEM_CNT 1
+
+//! Select the SPI module AT45DBX is connected to
+#define AT45DBX_SPI_MODULE AT45DBX_SPI
+
+//! First chip select used by AT45DBX components on the SPI module instance.
+//! AT45DBX_SPI_NPCS0_PIN always corresponds to this first NPCS, whatever it is.
+#define AT45DBX_SPI_FIRST_NPCS AT45DBX_SPI_NPCS
+
+//! SPI master speed in Hz.
+#define AT45DBX_SPI_MASTER_SPEED 12000000
+
+//! Number of bits in each SPI transfer.
+#define AT45DBX_SPI_BITS 8
+
+
+#endif // _CONF_AT45DBX_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/conf_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/conf_board.h
new file mode 100644
index 0000000..2d2aa79
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/conf_board.h
@@ -0,0 +1,44 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Board configuration for spi example
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H_INCLUDED
+#define CONF_BOARD_H_INCLUDED
+
+// Enable AT45DBX Component.
+#define CONF_BOARD_AT45DBX
+
+#endif /* CONF_BOARD_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/conf_clock.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/conf_clock.h
new file mode 100644
index 0000000..1f92af9
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/conf_clock.h
@@ -0,0 +1,74 @@
+/**
+ * \file
+ *
+ * \brief Clock system configuration for clock example 1
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_CLOCK_H_INCLUDED
+#define CONF_CLOCK_H_INCLUDED
+
+//! Configuration using On-Chip RC oscillator at 48MHz
+//! The RC oscillator is calibrated via USB Start Of Frame
+//! Clk USB = 48MHz (used by USB)
+//! Clk sys = 48MHz
+//! Clk cpu/per = 24MHz
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_RCOSC
+#define CONFIG_OSC_RC32_CAL 48000000UL
+
+#define CONFIG_OSC_AUTOCAL OSC_ID_RC32MHZ
+#define CONFIG_OSC_AUTOCAL_REF_OSC OSC_ID_USBSOF
+
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_RC32MHZ
+#define CONFIG_SYSCLK_PSADIV SYSCLK_PSADIV_2
+#define CONFIG_SYSCLK_PSBCDIV SYSCLK_PSBCDIV_1_1
+
+/*
+//! Use external board OSC (8MHz)
+//! Clk pll = 48MHz (used by USB)
+//! Clk sys = 48MHz
+//! Clk cpu/per = 24MHz
+
+#define CONFIG_PLL0_SOURCE PLL_SRC_XOSC
+#define CONFIG_PLL0_MUL 6
+#define CONFIG_PLL0_DIV 1
+
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL
+
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL
+#define CONFIG_SYSCLK_PSADIV SYSCLK_PSADIV_2
+#define CONFIG_SYSCLK_PSBCDIV SYSCLK_PSBCDIV_1_1
+*/
+
+
+#endif /* CONF_CLOCK_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/conf_sd_mmc_spi.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/conf_sd_mmc_spi.h
new file mode 100644
index 0000000..9a2ae9c
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/conf_sd_mmc_spi.h
@@ -0,0 +1,71 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief SD/MMC configuration file.
+ *
+ * This file contains the possible external configuration of the SD/MMC.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with an SPI module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_SD_MMC_SPI_H_
+#define _CONF_SD_MMC_SPI_H_
+
+
+#include "conf_access.h"
+
+#if SD_MMC_SPI_MEM == DISABLE
+#error conf_sd_mmc_spi.h is #included although SD_MMC_SPI_MEM is disabled
+#endif
+
+
+#include "sd_mmc_spi.h"
+
+
+//_____ D E F I N I T I O N S ______________________________________________
+
+//! SPI master speed in Hz.
+#define SD_MMC_SPI_MASTER_SPEED 20000000
+
+//! Number of bits in each SPI transfer.
+#define SD_MMC_SPI_BITS 8
+
+
+#endif // _CONF_SD_MMC_SPI_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/conf_sleepmgr.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/conf_sleepmgr.h
new file mode 100644
index 0000000..699010d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/conf_sleepmgr.h
@@ -0,0 +1,43 @@
+/**
+ * \file
+ *
+ * \brief Sleep manager configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SLEEPMGR_H
+#define CONF_SLEEPMGR_H
+
+#define CONFIG_SLEEPMGR_ENABLE
+
+#endif /* CONF_SLEEPMGR_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/conf_spi_master.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/conf_spi_master.h
new file mode 100644
index 0000000..ed506f8
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/conf_spi_master.h
@@ -0,0 +1,41 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Spi Master configuration for spi example
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SPI_MASTER_H_INCLUDED
+#define CONF_SPI_MASTER_H_INCLUDED
+
+#endif /* CONF_SPI_MASTER_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/conf_usart_spi.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/conf_usart_spi.h
new file mode 100644
index 0000000..56fa5de
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/conf_usart_spi.h
@@ -0,0 +1,41 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Spi Master configuration for spi example
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_USART_SPI_H_INCLUDED
+#define CONF_USART_SPI_H_INCLUDED
+
+#endif /* CONF_SPI_MASTER_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/conf_virtual_mem.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/conf_virtual_mem.h
new file mode 100644
index 0000000..a9faf2e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/conf_virtual_mem.h
@@ -0,0 +1,54 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Virtual memory configuration file.
+ *
+ * This file contains the possible external configuration of the AT45DBX.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with an SPI module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_VIRTUAL_MEM_H_
+#define _CONF_VIRTUAL_MEM_H_
+
+//! Size of Virtual Memory on internal RAM (unit 512B)
+#define VMEM_NB_SECTOR 8 // 4KB
+
+#endif // _CONF_VIRTUAL_MEM_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/uart.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/uart.c
new file mode 100644
index 0000000..7c29ef0
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/uart.c
@@ -0,0 +1,153 @@
+/**
+ * \file
+ *
+ * \brief User Interface from EVK1100
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "usb_protocol_cdc.h"
+#include "sysclk.h"
+#include "uart.h"
+#include "main.h"
+
+#define USART USARTC0
+
+void uart_config(usb_cdc_line_coding_t * cfg)
+{
+ uint8_t reg_ctrlc;
+
+ reg_ctrlc = USART_CMODE_ASYNCHRONOUS_gc;
+
+ switch (cfg->bCharFormat) {
+ case CDC_STOP_BITS_2:
+ reg_ctrlc |= USART_SBMODE_bm;
+ break;
+ case CDC_STOP_BITS_1:
+ default:
+ // Default stop bit = 1 stop bit
+ break;
+ }
+
+ switch (cfg->bParityType) {
+ case CDC_PAR_EVEN:
+ reg_ctrlc |= USART_PMODE_EVEN_gc;
+ break;
+ case CDC_PAR_ODD:
+ reg_ctrlc |= USART_PMODE_ODD_gc;
+ break;
+ default:
+ case CDC_PAR_NONE:
+ reg_ctrlc |= USART_PMODE_DISABLED_gc;
+ break;
+ }
+
+ switch (cfg->bDataBits) {
+ case 5:
+ reg_ctrlc |= USART_CHSIZE_5BIT_gc;
+ break;
+ case 6:
+ reg_ctrlc |= USART_CHSIZE_6BIT_gc;
+ break;
+ case 7:
+ reg_ctrlc |= USART_CHSIZE_7BIT_gc;
+ break;
+ default:
+ case 8:
+ reg_ctrlc |= USART_CHSIZE_8BIT_gc;
+ break;
+ case 9:
+ reg_ctrlc |= USART_CHSIZE_9BIT_gc;
+ break;
+ }
+
+ sysclk_enable_module(SYSCLK_PORT_C, SYSCLK_USART0);
+ // Set configuration
+ USART.CTRLC = reg_ctrlc;
+ // Update baudrate
+ USART.BAUDCTRLA = (uint16_t) (((((((uint32_t) sysclk_get_cpu_hz()) << 1)
+ /
+ ((uint32_t) le32_to_cpu(cfg->dwDTERate) * 8)) + 1) >> 1) - 1);
+}
+
+void uart_open(void)
+{
+ sysclk_enable_module(SYSCLK_PORT_C, SYSCLK_USART0);
+ // Open UART communication
+ PORTC.DIRSET = 0x08; // PC3 (TXC0) as output.
+ PORTC.DIRCLR = 0x04; // PC2 (RXC0) as input.
+ // Enable both RX and TX
+ USART.CTRLB = USART_RXEN_bm | USART_TXEN_bm | USART_CLK2X_bm;
+ // Enable interrupt with priority higher than USB
+ USART.CTRLA = (register8_t) USART_RXCINTLVL_HI_gc | (register8_t)
+ USART_DREINTLVL_OFF_gc;
+}
+
+void uart_close(void)
+{
+ sysclk_disable_module(SYSCLK_PORT_C, SYSCLK_USART0);
+ // Disable interrupts
+ USART.CTRLA = 0;
+ // Close RS232 communication
+ USART.CTRLB = 0;
+}
+
+void uart_enable_tx(void)
+{
+ // Enable UART TX interrupt to send values
+ USART.CTRLA = (register8_t) USART_RXCINTLVL_HI_gc | (register8_t)
+ USART_DREINTLVL_HI_gc;
+}
+
+
+ISR(USARTC0_RXC_vect)
+{
+ bool b_error = (0 !=
+ (USART.STATUS & (USART_FERR_bm | USART_BUFOVF_bm)));
+ main_uart_rx_occur(b_error, USART.DATA);
+}
+
+ISR(USARTC0_DRE_vect)
+{
+ uint8_t value_tx;
+ if (main_uart_tx_free(&value_tx)) {
+ // Transmit next data
+ USART.DATA = value_tx;
+ } else {
+ // Fifo empty then Stop UART transmission
+ USART.CTRLA = (register8_t) USART_RXCINTLVL_HI_gc |
+ (register8_t) USART_DREINTLVL_OFF_gc;
+ }
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/uart.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/uart.h
new file mode 100644
index 0000000..3e7bf98
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/uart.h
@@ -0,0 +1,50 @@
+/**
+ * \file
+ *
+ * \brief User Interface from EVK1100
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _UART_H_
+#define _UART_H_
+
+void uart_config(usb_cdc_line_coding_t * cfg);
+
+void uart_open(void);
+
+void uart_close(void);
+
+void uart_enable_tx(void);
+
+#endif // _UART_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/ui.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/ui.c
new file mode 100644
index 0000000..d7d77fa
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/atxmega128a1u_xplain_a1_mkii/ui.c
@@ -0,0 +1,371 @@
+/**
+ * \file
+ *
+ * \brief User Interface
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "udc.h"
+#include "udi_msc.h"
+#include "udi_hid_mouse.h"
+#include "udi_hid_kbd.h"
+#include "board.h"
+#include "led.h"
+#include "ui.h"
+
+#define MOUSE_MOVE_RANGE 3
+
+static struct{
+bool b_modifier;
+bool b_down;
+uint8_t u8_value;
+} ui_sequence[] = {
+ // Display windows menu
+ {true,true,HID_MODIFIER_LEFT_UI},
+ {true,false,HID_MODIFIER_LEFT_UI},
+ // Launch Windows Command line
+ {false,true,HID_R},
+ {false,false,HID_R},
+ // Tape sequence "notepad" + return
+ {false,true,HID_N},
+ {false,false,HID_N},
+ {false,true,HID_O},
+ {false,false,HID_O},
+ {false,true,HID_T},
+ {false,false,HID_T},
+ {false,true,HID_E},
+ {false,false,HID_E},
+ {false,true,HID_P},
+ {false,false,HID_P},
+ {false,true,HID_A},
+ {false,false,HID_A},
+ {false,true,HID_D},
+ {false,false,HID_D},
+ {false,true,HID_ENTER},
+ {false,false,HID_ENTER},
+ // Display "Atmel "
+ {true,true,HID_MODIFIER_RIGHT_SHIFT}, // Enable Maj
+ {false,true,HID_A},
+ {false,false,HID_A},
+ {true,false,HID_MODIFIER_RIGHT_SHIFT}, // Disable Maj
+ {false,true,HID_T},
+ {false,false,HID_T},
+ {false,true,HID_M},
+ {false,false,HID_M},
+ {false,true,HID_E},
+ {false,false,HID_E},
+ {false,true,HID_L},
+ {false,false,HID_L},
+ {false,true,HID_SPACEBAR},
+ {false,false,HID_SPACEBAR},
+ // Display "AVR "
+ {false,true,HID_CAPS_LOCK}, // Enable caps lock
+ {false,false,HID_CAPS_LOCK},
+ {false,true,HID_A},
+ {false,false,HID_A},
+ {false,true,HID_V},
+ {false,false,HID_V},
+ {false,true,HID_R},
+ {false,false,HID_R},
+ {false,true,HID_CAPS_LOCK}, // Disable caps lock
+ {false,false,HID_CAPS_LOCK},
+};
+
+
+void ui_init(void)
+{
+ LED_On(LEDUSB_GPIO);
+ LED_On(LED0_GPIO);
+ LED_Off(LED1_GPIO);
+ LED_Off(LED2_GPIO);
+ LED_Off(LED3_GPIO);
+ LED_Off(LED4_GPIO);
+ LED_Off(LED5_GPIO);
+ LED_Off(LED6_GPIO);
+ LED_Off(LED7_GPIO);
+}
+
+void ui_powerdown(void)
+{
+ LED_Off(LED0_GPIO);
+ LED_Off(LED1_GPIO);
+ LED_Off(LED2_GPIO);
+ LED_Off(LED3_GPIO);
+ LED_Off(LED4_GPIO);
+ LED_Off(LED5_GPIO);
+ LED_Off(LED6_GPIO);
+ LED_Off(LED7_GPIO);
+}
+
+void ui_wakeup_enable(void)
+{
+ PORT_t *port;
+ // Configure pin change interrupt for asynch. wake-up on button pin.
+ ioport_configure_pin(GPIO_PUSH_BUTTON_0,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ ioport_configure_pin(GPIO_PUSH_BUTTON_1,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ ioport_configure_pin(GPIO_PUSH_BUTTON_2,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ ioport_configure_pin(GPIO_PUSH_BUTTON_3,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ ioport_configure_pin(GPIO_PUSH_BUTTON_4,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ ioport_configure_pin(GPIO_PUSH_BUTTON_5,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ ioport_configure_pin(GPIO_PUSH_BUTTON_6,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ ioport_configure_pin(GPIO_PUSH_BUTTON_7,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ port = ioport_pin_to_port(GPIO_PUSH_BUTTON_0);
+ port->INT0MASK = 0xFF;
+ port->INTCTRL = PORT_INT0LVL_LO_gc;
+}
+
+void ui_wakeup_disable(void)
+{
+ PORT_t *port;
+ port = ioport_pin_to_port(GPIO_PUSH_BUTTON_0);
+ port->INT0MASK = 0x00;
+}
+
+// Interrupt on "pin change" from switch to do wakeup on USB
+// Note:
+// This interrupt is enable when the USB host enable remotewakeup feature
+// This interrupt wakeup the CPU if this one is in idle mode
+ISR(PORTF_INT0_vect)
+{
+ PORT_t *port;
+ port = ioport_pin_to_port(GPIO_PUSH_BUTTON_0);
+ port->INTFLAGS = 0x01; // Ack interrupt
+ // It is a wakeup then send wakeup USB
+ udc_wakeup();
+}
+
+
+void ui_wakeup(void)
+{
+ LED_On(LED0_GPIO);
+}
+
+
+void ui_start_read(void)
+{
+ LED_On(LED4_GPIO);
+}
+
+void ui_stop_read(void)
+{
+ LED_Off(LED4_GPIO);
+}
+
+void ui_start_write(void)
+{
+ LED_On(LED5_GPIO);
+}
+
+void ui_stop_write(void)
+{
+ LED_Off(LED5_GPIO);
+}
+
+void ui_process(uint16_t framenumber)
+{
+ bool b_btn_state;
+ static bool btn_left_last_state = HID_MOUSE_BTN_UP;
+ static bool btn_right_last_state = HID_MOUSE_BTN_UP;
+ static bool btn_middle_last_state = HID_MOUSE_BTN_UP;
+ static bool btn_keyboard_last_state = false;
+ static uint8_t cpt_sof = 0;
+
+ bool sucess;
+ static bool sequence_running = false;
+ static uint8_t u8_sequence_pos = 0;
+ uint8_t u8_value;
+
+ if ((framenumber % 1000) == 0) {
+ LED_On(LED1_GPIO);
+ }
+ if ((framenumber % 1000) == 500) {
+ LED_Off(LED1_GPIO);
+ }
+ // Scan process running each 2ms
+ cpt_sof++;
+ if (0 == (cpt_sof%2))
+ return;
+
+ // Scan buttons on switch 0 (left), 1 (middle), 2 (right)
+ b_btn_state = (gpio_pin_is_low(GPIO_PUSH_BUTTON_0)) ? HID_MOUSE_BTN_DOWN
+ : HID_MOUSE_BTN_UP;
+ if (b_btn_state != btn_left_last_state) {
+ udi_hid_mouse_btnleft(b_btn_state);
+ btn_left_last_state = b_btn_state;
+ }
+ b_btn_state = (gpio_pin_is_low(GPIO_PUSH_BUTTON_1)) ? HID_MOUSE_BTN_DOWN
+ : HID_MOUSE_BTN_UP;
+ if (b_btn_state != btn_middle_last_state) {
+ udi_hid_mouse_btnmiddle(b_btn_state);
+ btn_middle_last_state = b_btn_state;
+ }
+ b_btn_state = (gpio_pin_is_low(GPIO_PUSH_BUTTON_2)) ? HID_MOUSE_BTN_DOWN
+ : HID_MOUSE_BTN_UP;
+ if (b_btn_state != btn_right_last_state) {
+ udi_hid_mouse_btnright(b_btn_state);
+ btn_right_last_state = b_btn_state;
+ }
+ // Scan move on switch 4 (right), 5 (left), 6 (down), 7 (up)
+ if (gpio_pin_is_low(GPIO_PUSH_BUTTON_4))
+ udi_hid_mouse_moveX(MOUSE_MOVE_RANGE);
+ if (gpio_pin_is_low(GPIO_PUSH_BUTTON_5))
+ udi_hid_mouse_moveX(-MOUSE_MOVE_RANGE);
+ if (gpio_pin_is_low(GPIO_PUSH_BUTTON_6))
+ udi_hid_mouse_moveY(MOUSE_MOVE_RANGE);
+ if (gpio_pin_is_low(GPIO_PUSH_BUTTON_7))
+ udi_hid_mouse_moveY(-MOUSE_MOVE_RANGE);
+
+ // Scan buttons on switch 3 to send keys sequence
+ b_btn_state = (gpio_pin_is_low(GPIO_PUSH_BUTTON_3)) ? true : false;
+ if (b_btn_state != btn_keyboard_last_state) {
+ btn_keyboard_last_state = b_btn_state;
+ sequence_running = true;
+ }
+
+ // Sequence process running each 200ms
+ if (200 > cpt_sof)
+ return;
+ cpt_sof = 0;
+
+ if (sequence_running) {
+ // Send next key
+ u8_value = ui_sequence[u8_sequence_pos].u8_value;
+ if (ui_sequence[u8_sequence_pos].b_modifier) {
+ if (ui_sequence[u8_sequence_pos].b_down) {
+ sucess = udi_hid_kbd_modifier_down(u8_value);
+ }else{
+ sucess = udi_hid_kbd_modifier_up(u8_value);
+ }
+ }else{
+ if (ui_sequence[u8_sequence_pos].b_down) {
+ sucess = udi_hid_kbd_down(u8_value);
+ }else{
+ sucess = udi_hid_kbd_up(u8_value);
+ }
+ }
+ if (!sucess)
+ return; // Retry it on next schedule
+
+ // Valid sequence position
+ u8_sequence_pos++;
+ if (u8_sequence_pos>=sizeof(ui_sequence)/sizeof(ui_sequence[0])) {
+ u8_sequence_pos=0;
+ sequence_running=false;
+ }
+ }
+
+}
+
+void ui_kbd_led(uint8_t value)
+{
+ if (value&HID_LED_NUM_LOCK) {
+ LED_On(LED2_GPIO);
+ }else{
+ LED_Off(LED2_GPIO);
+ }
+ if (value&HID_LED_CAPS_LOCK) {
+ LED_On(LED3_GPIO);
+ }else{
+ LED_Off(LED3_GPIO);
+ }
+}
+
+void ui_com_open(void)
+{
+}
+
+void ui_com_close(void)
+{
+ LED_Off(LED6_GPIO);
+ LED_Off(LED7_GPIO);
+}
+
+void ui_com_rx_start(void)
+{
+ LED_On(LED6_GPIO);
+}
+
+void ui_com_rx_stop(void)
+{
+ LED_Off(LED6_GPIO);
+}
+
+void ui_com_tx_start(void)
+{
+ LED_On(LED7_GPIO);
+}
+
+void ui_com_tx_stop(void)
+{
+ LED_Off(LED7_GPIO);
+}
+
+void ui_com_error(void)
+{
+}
+
+void ui_com_overflow(void)
+{
+}
+
+
+/**
+ * \defgroup UI User Interface
+ *
+ * Human interface on Xplain-A1:
+ * - RED led close to USB connector is always on after firmware startup
+ * - Led 0 is on when USB line is in IDLE mode, and off in SUSPEND mode
+ * - The led 1 blinks when USB Host have checked and enabled all interfaces
+ * - Mouse buttons are linked at switches 0 (left), 1 (middle), 2 (right)
+ * - Mouse move are linked at switches 4 (right), 5 (left), 6 (down), 7 (up)
+ * - The switches 3 open a note pad and send key sequence "Atmel AVR USB Keyboard"
+ * - The led 2 displays numeric lock status.
+ * - The led 3 displays caps lock status.
+ * - The led 4 is on during read operation
+ * - The led 5 is on during write operation
+ * - The led 6 is on during data transfer from CDC to UART
+ * - The led 7 is on during data transfer from UART to CDC
+ * - All switches can be used to wakeup USB Host in remote wakeup mode.
+ *
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/avr_cdc_composite.inf b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/avr_cdc_composite.inf
new file mode 100644
index 0000000..1bfdd92
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/avr_cdc_composite.inf
@@ -0,0 +1,97 @@
+; Windows 2000, XP & Vista setup File for AVR CDC Device
+
+; Copyright (c) 2000 Microsoft Corporation
+; Copyright (C) 2007 ATMEL, Inc.
+
+[Version]
+Signature="$Windows NT$"
+Class=Ports
+ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
+
+Provider=%ATMEL%
+DriverVer=10/15/1999,5.0.2153.1
+
+;----------------------------------------------------------
+; Targets
+;----------------------------------------------------------
+[Manufacturer]
+%ATMEL%=ATMEL, NTamd64
+
+[ATMEL]
+%ATMEL_CDC%=Reader, USB\VID_03EB&PID_2421
+
+[ATMEL.NTamd64]
+%ATMEL_CDC%=DriverInstall, USB\VID_03EB&PID_2421
+
+
+;----------------------------------------------------------
+; Windows 2K, XP, and Vista32
+;----------------------------------------------------------
+[Reader_Install.NTx86]
+
+
+[DestinationDirs]
+DefaultDestDir=12
+Reader.NT.Copy=12
+
+[Reader.NT]
+include=mdmcpq.inf
+CopyFiles=Reader.NT.Copy
+AddReg=Reader.NT.AddReg
+
+[Reader.NT.Copy]
+usbser.sys
+
+[Reader.NT.AddReg]
+HKR,,DevLoader,,*ntkern
+HKR,,NTMPDriver,,usbser.sys
+HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
+
+[Reader.NT.Services]
+AddService = usbser, 0x00000002, Service_Inst
+
+[Service_Inst]
+DisplayName = %Serial.SvcDesc%
+ServiceType = 1 ; SERVICE_KERNEL_DRIVER
+StartType = 3 ; SERVICE_DEMAND_START
+ErrorControl = 1 ; SERVICE_ERROR_NORMAL
+ServiceBinary = %12%\usbser.sys
+LoadOrderGroup = Base
+
+
+;----------------------------------------------------------
+; Vista64
+;----------------------------------------------------------
+
+[DriverInstall.NTamd64]
+include=mdmcpq.inf
+CopyFiles=DriverCopyFiles.NTamd64
+AddReg=DriverInstall.NTamd64.AddReg
+
+[DriverCopyFiles.NTamd64]
+usbser.sys,,,0x20
+
+[DriverInstall.NTamd64.AddReg]
+HKR,,DevLoader,,*ntkern
+HKR,,NTMPDriver,,usbser.sys
+HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
+
+[DriverInstall.NTamd64.Services]
+AddService=usbser, 0x00000002, DriverService.NTamd64
+
+[DriverService.NTamd64]
+DisplayName=%Serial.SvcDesc%
+ServiceType=1
+StartType=3
+ErrorControl=1
+ServiceBinary=%12%\usbser.sys
+
+;----------------------------------------------------------
+; String
+;----------------------------------------------------------
+
+[Strings]
+ATMEL = "ATMEL, Inc."
+ATMEL_CDC = "AVR Communication Device Class"
+Serial.SvcDesc = "USB Serial emulation driver"
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/conf_usb.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/conf_usb.h
new file mode 100644
index 0000000..97599a6
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/conf_usb.h
@@ -0,0 +1,308 @@
+/**
+ * \file
+ *
+ * \brief USB configuration file
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _CONF_USB_H_
+#define _CONF_USB_H_
+
+#include "compiler.h"
+
+/**
+ * USB Device Configuration
+ * @{
+ */
+
+//! Device definition (mandatory)
+#define USB_DEVICE_VENDOR_ID USB_VID_ATMEL
+#define USB_DEVICE_PRODUCT_ID USB_PID_ATMEL_AVR_MSC_HIDS_CDC
+#define USB_DEVICE_MAJOR_VERSION 1
+#define USB_DEVICE_MINOR_VERSION 0
+#define USB_DEVICE_POWER 100 // Consumption on Vbus line (mA)
+#define USB_DEVICE_ATTR \
+ (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_SELF_POWERED)
+// (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_BUS_POWERED)
+// (USB_CONFIG_ATTR_SELF_POWERED)
+// (USB_CONFIG_ATTR_BUS_POWERED)
+
+//! USB Device string definitions (Optional)
+#define USB_DEVICE_MANUFACTURE_NAME "ATMEL AVR"
+#define USB_DEVICE_PRODUCT_NAME "HID Mouse, keyboard, CDC and MSC"
+#define USB_DEVICE_SERIAL_NAME "123123123123" // Disk SN for MSC
+
+/**
+ * Device speeds support
+ * @{
+ */
+
+//! To define a Low speed device
+//#define USB_DEVICE_LOW_SPEED
+
+//! To authorize the High speed
+#if (UC3A3||UC3A4)
+#define USB_DEVICE_HS_SUPPORT
+#endif
+//@}
+
+/**
+ * USB Device Callbacks definitions (Optional)
+ * @{
+ */
+#define UDC_VBUS_EVENT(b_vbus_high) main_vbus_action(b_vbus_high)
+#define UDC_SOF_EVENT() main_sof_action()
+#define UDC_SUSPEND_EVENT() main_suspend_action()
+#define UDC_RESUME_EVENT() main_resume_action()
+//! Mandatory when USB_DEVICE_ATTR authorizes remote wakeup feature
+#define UDC_REMOTEWAKEUP_ENABLE() main_remotewakeup_enable()
+#define UDC_REMOTEWAKEUP_DISABLE() main_remotewakeup_disable()
+//! When a extra string descriptor must be supported
+//! other than manufacturer, product and serial string
+#define UDC_GET_EXTRA_STRING() main_extra_string()
+//@}
+
+/**
+ * USB Device low level configuration
+ * When only one interface is used, these configurations are defined by the class module.
+ * For composite device, these configuration must be defined here
+ * @{
+ */
+//! Control endpoint size
+#define USB_DEVICE_EP_CTRL_SIZE 64
+
+//! Two interfaces for this device (CDC + MSC + HID mouse + HID keyboard)
+#define USB_DEVICE_NB_INTERFACE 5
+
+//! 7 endpoints used by HID mouse, HID keyboard, CDC and MSC interfaces
+//! but an IN and OUT endpoints can be defined with the same number on xmega, thus 5
+// (1 | USB_EP_DIR_IN) // CDC Notify endpoint
+// (2 | USB_EP_DIR_IN) // CDC TX
+// (2 | USB_EP_DIR_OUT) // CDC RX
+// (3 | USB_EP_DIR_IN) // MSC IN
+// (3 | USB_EP_DIR_OUT) // MSC OUT
+// (4 | USB_EP_DIR_IN) // HID mouse report
+// (5 | USB_EP_DIR_IN) // HID keyboard report
+#define USB_DEVICE_MAX_EP 5
+//@}
+
+//@}
+
+
+/**
+ * USB Interface Configuration
+ * @{
+ */
+
+/**
+ * Configuration of CDC interface
+ * @{
+ */
+//! Interface callback definition
+#define UDI_CDC_ENABLE_EXT() main_cdc_enable()
+#define UDI_CDC_DISABLE_EXT() main_cdc_disable()
+#define UDI_CDC_SET_CODING_EXT(cfg) main_cdc_config_uart(cfg)
+#define UDI_CDC_SET_DTR_EXT(set) main_cdc_set_dtr(set)
+#define UDI_CDC_SET_RTS_EXT(set)
+
+//! Default configuration of communication port
+#define UDI_CDC_DEFAULT_RATE 115200
+#define UDI_CDC_DEFAULT_STOPBITS CDC_STOP_BITS_1
+#define UDI_CDC_DEFAULT_PARITY CDC_PAR_NONE
+#define UDI_CDC_DEFAULT_DATABITS 8
+
+//! Enable id string of interface to add an extra USB string
+#define UDI_CDC_IAD_STRING_ID 4
+
+/**
+ * USB CDC low level configuration
+ * In standalone these configurations are defined by the CDC module.
+ * For composite device, these configuration must be defined here
+ * @{
+ */
+//! Endpoint numbers definition
+#define UDI_CDC_COMM_EP (1 | USB_EP_DIR_IN) // Notify endpoint
+#define UDI_CDC_DATA_EP_IN (2 | USB_EP_DIR_IN) // TX
+#define UDI_CDC_DATA_EP_OUT (2 | USB_EP_DIR_OUT) // RX
+
+//! Interface numbers
+#define UDI_CDC_COMM_IFACE_NUMBER 0
+#define UDI_CDC_DATA_IFACE_NUMBER 1
+//@}
+//@}
+
+
+/**
+ * Configuration of MSC interface
+ * @{
+ */
+//! Vendor name and Product version of MSC interface
+#define UDI_MSC_GLOBAL_VENDOR_ID \
+ 'A', 'T', 'M', 'E', 'L', ' ', ' ', ' '
+#define UDI_MSC_GLOBAL_PRODUCT_VERSION \
+ '1', '.', '0', '0'
+
+//! Interface callback definition
+#define UDI_MSC_ENABLE_EXT() main_msc_enable()
+#define UDI_MSC_DISABLE_EXT() main_msc_disable()
+
+//! Enable id string of interface to add an extra USB string
+#define UDI_MSC_STRING_ID 5
+
+/**
+ * USB MSC low level configuration
+ * In standalone these configurations are defined by the MSC module.
+ * For composite device, these configuration must be defined here
+ * @{
+ */
+//! Endpoint numbers definition
+#define UDI_MSC_EP_IN (3 | USB_EP_DIR_IN)
+#define UDI_MSC_EP_OUT (3 | USB_EP_DIR_OUT)
+
+//! Interface number
+#define UDI_MSC_IFACE_NUMBER 2
+//@}
+//@}
+
+
+/**
+ * Configuration of HID Mouse interface
+ * @{
+ */
+//! Interface callback definition
+#define UDI_HID_MOUSE_ENABLE_EXT() main_mouse_enable()
+#define UDI_HID_MOUSE_DISABLE_EXT() main_mouse_disable()
+
+//! Enable id string of interface to add an extra USB string
+#define UDI_HID_MOUSE_STRING_ID 6
+
+/**
+ * USB HID Mouse low level configuration
+ * In standalone these configurations are defined by the HID Mouse module.
+ * For composite device, these configuration must be defined here
+ * @{
+ */
+//! Endpoint numbers definition
+#define UDI_HID_MOUSE_EP_IN (4 | USB_EP_DIR_IN)
+
+//! Interface number
+#define UDI_HID_MOUSE_IFACE_NUMBER 3
+//@}
+//@}
+
+/**
+ * Configuration of HID Keyboard interface
+ * @{
+ */
+//! Interface callback definition
+#define UDI_HID_KBD_ENABLE_EXT() main_kbd_enable()
+#define UDI_HID_KBD_DISABLE_EXT() main_kbd_disable()
+#define UDI_HID_KBD_CHANGE_LED(value) ui_kbd_led(value)
+
+//! Enable id string of interface to add an extra USB string
+#define UDI_HID_KBD_STRING_ID 7
+
+/**
+ * USB HID Keyboard low level configuration
+ * In standalone these configurations are defined by the HID Keyboard module.
+ * For composite device, these configuration must be defined here
+ * @{
+ */
+//! Endpoint numbers definition
+#define UDI_HID_KBD_EP_IN (5 | USB_EP_DIR_IN)
+
+//! Interface number
+#define UDI_HID_KBD_IFACE_NUMBER 4
+//@}
+//@}
+
+//@}
+
+
+/**
+ * Description of Composite Device
+ * @{
+ */
+//! USB Interfaces descriptor structure
+#define UDI_COMPOSITE_DESC_T \
+ usb_iad_desc_t udi_cdc_iad; \
+ udi_cdc_comm_desc_t udi_cdc_comm; \
+ udi_cdc_data_desc_t udi_cdc_data; \
+ udi_msc_desc_t udi_msc; \
+ udi_hid_mouse_desc_t udi_hid_mouse; \
+ udi_hid_kbd_desc_t udi_hid_kbd
+
+//! USB Interfaces descriptor value for Full Speed
+#define UDI_COMPOSITE_DESC_FS \
+ .udi_cdc_iad = UDI_CDC_IAD_DESC, \
+ .udi_cdc_comm = UDI_CDC_COMM_DESC, \
+ .udi_cdc_data = UDI_CDC_DATA_DESC, \
+ .udi_msc = UDI_MSC_DESC_FS, \
+ .udi_hid_mouse = UDI_HID_MOUSE_DESC,\
+ .udi_hid_kbd = UDI_HID_KBD_DESC
+
+//! USB Interfaces descriptor value for High Speed
+#define UDI_COMPOSITE_DESC_HS \
+ .udi_cdc_iad = UDI_CDC_IAD_DESC, \
+ .udi_cdc_comm = UDI_CDC_COMM_DESC, \
+ .udi_cdc_data = UDI_CDC_DATA_DESC, \
+ .udi_msc = UDI_MSC_DESC_HS, \
+ .udi_hid_mouse = UDI_HID_MOUSE_DESC,\
+ .udi_hid_kbd = UDI_HID_KBD_DESC
+
+//! USB Interface APIs
+#define UDI_COMPOSITE_API \
+ &udi_api_cdc_comm, \
+ &udi_api_cdc_data, \
+ &udi_api_msc, \
+ &udi_api_hid_mouse, \
+ &udi_api_hid_kbd
+//@}
+
+
+/**
+ * USB Device Driver Configuration
+ * @{
+ */
+//@}
+
+//! The includes of classes and other headers must be done at the end of this file to avoid compile error
+#include "udi_cdc.h"
+#include "udi_msc.h"
+#include "udi_hid_mouse.h"
+#include "udi_hid_kbd.h"
+#include "main.h"
+#include "ui.h"
+
+#endif // _CONF_USB_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/driver/avr_cdc_iad.inf b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/driver/avr_cdc_iad.inf
new file mode 100644
index 0000000..dd213c3
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/driver/avr_cdc_iad.inf
@@ -0,0 +1,98 @@
+; Windows 2000, XP & Vista setup File for AVR composite Device with CDC
+
+; Copyright (c) 2000 Microsoft Corporation
+; Copyright (C) 2007 ATMEL, Inc.
+
+[Version]
+Signature="$Windows NT$"
+Class=Ports
+ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
+
+Provider=%ATMEL%
+LayoutFile=layout.inf
+DriverVer=10/15/1999,5.0.2153.1
+
+;----------------------------------------------------------
+; Targets
+;----------------------------------------------------------
+[Manufacturer]
+%ATMEL%=ATMEL, NTamd64
+
+[ATMEL]
+%ATMEL_CDC%=Reader, USB\VID_03EB&PID_2421&MI_00
+
+[ATMEL.NTamd64]
+%ATMEL_CDC%=DriverInstall, USB\VID_03EB&PID_2421&MI_00
+
+
+;----------------------------------------------------------
+; Windows 2K, XP, and Vista32
+;----------------------------------------------------------
+[Reader_Install.NTx86]
+
+
+[DestinationDirs]
+DefaultDestDir=12
+Reader.NT.Copy=12
+
+[Reader.NT]
+include=mdmcpq.inf
+CopyFiles=Reader.NT.Copy
+AddReg=Reader.NT.AddReg
+
+[Reader.NT.Copy]
+usbser.sys
+
+[Reader.NT.AddReg]
+HKR,,DevLoader,,*ntkern
+HKR,,NTMPDriver,,usbser.sys
+HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
+
+[Reader.NT.Services]
+AddService = usbser, 0x00000002, Service_Inst
+
+[Service_Inst]
+DisplayName = %Serial.SvcDesc%
+ServiceType = 1 ; SERVICE_KERNEL_DRIVER
+StartType = 3 ; SERVICE_DEMAND_START
+ErrorControl = 1 ; SERVICE_ERROR_NORMAL
+ServiceBinary = %12%\usbser.sys
+LoadOrderGroup = Base
+
+
+;----------------------------------------------------------
+; Vista64
+;----------------------------------------------------------
+
+[DriverInstall.NTamd64]
+include=mdmcpq.inf
+CopyFiles=DriverCopyFiles.NTamd64
+AddReg=DriverInstall.NTamd64.AddReg
+
+[DriverCopyFiles.NTamd64]
+usbser.sys,,,0x20
+
+[DriverInstall.NTamd64.AddReg]
+HKR,,DevLoader,,*ntkern
+HKR,,NTMPDriver,,usbser.sys
+HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
+
+[DriverInstall.NTamd64.Services]
+AddService=usbser, 0x00000002, DriverService.NTamd64
+
+[DriverService.NTamd64]
+DisplayName=%Serial.SvcDesc%
+ServiceType=1
+StartType=3
+ErrorControl=1
+ServiceBinary=%12%\usbser.sys
+
+;----------------------------------------------------------
+; String
+;----------------------------------------------------------
+
+[Strings]
+ATMEL = "ATMEL, Inc."
+ATMEL_CDC = "AVR Communication Device Class"
+Serial.SvcDesc = "USB Serial emulation driver"
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/main.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/main.c
new file mode 100644
index 0000000..7a3e79d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/main.c
@@ -0,0 +1,516 @@
+/**
+ * \file
+ *
+ * \brief Main functions for USB composite example
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "preprocessor.h"
+#include "board.h"
+#include "gpio.h"
+#include "sysclk.h"
+#include "sleepmgr.h"
+#include "conf_usb.h"
+#include "udd.h"
+#include "udc.h"
+#include "udi_msc.h"
+#include "udi_hid.h"
+#include "udi_cdc.h"
+#include "ui.h"
+#include "conf_access.h"
+#include "at45dbx.h"
+#include "uart.h"
+#include "fifo.h"
+#include <stdio.h> // printf redirection
+
+static bool main_b_mouse_enable = false;
+static bool main_b_msc_enable = false;
+static bool main_b_kbd_enable = false;
+static bool main_b_cdc_enable = false;
+
+
+#if UC3A3
+//! \brief Init HMatrix
+static void init_hmatrix(void);
+#endif
+#if ((defined SD_MMC_MCI_0_MEM) && (SD_MMC_MCI_0_MEM == ENABLE)) \
+ || ((defined SD_MMC_MCI_1_MEM) && (SD_MMC_MCI_1_MEM == ENABLE))
+//! \brief Initializes SD/MMC resources: GPIO, MCI and SD/MMC.
+static void sd_mmc_mci_resources_init(void);
+#endif
+
+/*! \brief Function for CDC interface
+ */
+#define MAIN_CDC_FIFO_SIZE 32 // Must be a power of 2
+static bool main_b_com_startup = false;
+static bool main_b_com_open = false;
+static uint8_t fifo_rx[MAIN_CDC_FIFO_SIZE];
+static uint8_t fifo_tx[MAIN_CDC_FIFO_SIZE];
+static fifo_desc_t fifo_desc_rx;
+static fifo_desc_t fifo_desc_tx;
+const char main_msg_welcome[] = "\x0C"
+ "--------------------------\r\n"
+ " ATMEL CDC UART bridge \r\n"
+ "--------------------------\r\n";
+static void main_cdc_open(bool b_enable);
+
+
+/*! \brief Main function. Execution starts here.
+ */
+int main(void)
+{
+ irq_initialize_vectors();
+ cpu_irq_enable();
+
+ // Initialize the sleep manager
+ sleepmgr_init();
+
+ sysclk_init();
+ board_init();
+ ui_init();
+ ui_powerdown();
+
+#if UC3A3
+ // Init Hmatrix bus
+ sysclk_enable_pbb_module(SYSCLK_HMATRIX);
+ init_hmatrix();
+#endif
+#if (defined AT45DBX_MEM) && (AT45DBX_MEM == ENABLE)
+ at45dbx_init();
+#endif
+#if ((defined SD_MMC_MCI_0_MEM) && (SD_MMC_MCI_0_MEM == ENABLE)) \
+ || ((defined SD_MMC_MCI_1_MEM) && (SD_MMC_MCI_1_MEM == ENABLE))
+ // Initialize SD/MMC with MCI PB clock.
+ sysclk_enable_pbb_module(SYSCLK_MCI);
+ sysclk_enable_hsb_module(SYSCLK_DMACA);
+ sd_mmc_mci_resources_init();
+#endif
+
+ // Initialize the FIFOs
+ fifo_init(&fifo_desc_rx, &fifo_rx, MAIN_CDC_FIFO_SIZE);
+ fifo_init(&fifo_desc_tx, &fifo_tx, MAIN_CDC_FIFO_SIZE);
+
+ // Start USB stack to authorize VBus monitoring
+ udc_start();
+
+ if (!udc_include_vbus_monitoring()) {
+ // VBUS monitoring is not available on this product
+ // thereby VBUS has to be considered as present
+ main_vbus_action(true);
+ }
+
+ // The main loop manages only the power mode
+ // because the USB management is done by interrupt
+ while (true) {
+ sleepmgr_enter_sleep();
+ if (main_b_msc_enable) {
+ udi_msc_process_trans();
+ }
+
+ if (main_b_com_open) {
+ // To display a message when the port is open
+ if (main_b_com_startup) {
+ udi_cdc_ctrl_signal_dsr(true);
+ udi_cdc_ctrl_signal_dsr(false);
+ main_b_com_startup = false;
+ }
+ //** The transfer fifo<->CDC is done in the main loop
+ // to reduce process time in TX/RX UART interrupts
+ // Transfer CDC RX to UART TX fifo
+ while (udi_cdc_is_rx_ready()) {
+ if (fifo_get_free_size(&fifo_desc_tx) == 0)
+ break; // Fifo full then transmission
+ ui_com_rx_start();
+ fifo_push_byte(&fifo_desc_tx, udi_cdc_getc());
+ uart_enable_tx();
+ }
+ // Transfer UART RX fifo to CDC TX
+ while (udi_cdc_is_tx_ready()) {
+ uint8_t value_pull;
+ if (fifo_pull_byte(&fifo_desc_rx, &value_pull) !=
+ FIFO_OK) {
+ // No data then end of loop
+ ui_com_tx_stop();
+ break;
+ }
+ udi_cdc_putc(value_pull);
+ }
+ }
+ }
+}
+
+void main_vbus_action(bool b_high)
+{
+ if (b_high) {
+ // Attach USB Device
+ udc_attach();
+ } else {
+ // VBUS not present
+ udc_detach();
+ }
+}
+
+void main_suspend_action(void)
+{
+ ui_powerdown();
+}
+
+void main_resume_action(void)
+{
+ ui_wakeup();
+}
+
+void main_sof_action(void)
+{
+ if ((!main_b_mouse_enable) ||
+ (!main_b_msc_enable) ||
+ (!main_b_kbd_enable) ||
+ (!main_b_cdc_enable))
+ return;
+ ui_process(udd_get_frame_number());
+}
+
+void main_remotewakeup_enable(void)
+{
+ ui_wakeup_enable();
+}
+
+void main_remotewakeup_disable(void)
+{
+ ui_wakeup_disable();
+}
+
+bool main_extra_string(void)
+{
+ static uint8_t udi_cdc_name[] = "CDC interface";
+ static uint8_t udi_msc_name[] = "MSC interface";
+ static uint8_t udi_hid_mouse_name[] = "HID mouse interface";
+ static uint8_t udi_hid_kbd_name[] = "HID keyboard interface";
+
+ struct extra_strings_desc_t{
+ usb_str_desc_t header;
+ le16_t string[Max(Max(Max( \
+ sizeof(udi_cdc_name)-1, sizeof(udi_msc_name)-1),\
+ sizeof(udi_hid_mouse_name)-1), sizeof(udi_hid_kbd_name)-1)];
+ };
+ static UDC_DESC_STORAGE struct extra_strings_desc_t extra_strings_desc = {
+ .header.bDescriptorType = USB_DT_STRING
+ };
+
+ uint8_t i;
+ uint8_t *str;
+ uint8_t str_lgt=0;
+
+ // Link payload pointer to the string corresponding at request
+ switch (udd_g_ctrlreq.req.wValue & 0xff) {
+ case UDI_CDC_IAD_STRING_ID:
+ str_lgt = sizeof(udi_cdc_name)-1;
+ str = udi_cdc_name;
+ break;
+ case UDI_MSC_STRING_ID:
+ str_lgt = sizeof(udi_msc_name)-1;
+ str = udi_msc_name;
+ break;
+ case UDI_HID_MOUSE_STRING_ID:
+ str_lgt = sizeof(udi_hid_mouse_name)-1;
+ str = udi_hid_mouse_name;
+ break;
+ case UDI_HID_KBD_STRING_ID:
+ str_lgt = sizeof(udi_hid_kbd_name)-1;
+ str = udi_hid_kbd_name;
+ break;
+ default:
+ return false;
+ }
+
+ if (str_lgt!=0) {
+ for( i=0; i<str_lgt; i++) {
+ extra_strings_desc.string[i] = cpu_to_le16((le16_t)str[i]);
+ }
+ extra_strings_desc.header.bLength = 2+ (str_lgt)*2;
+ udd_g_ctrlreq.payload_size = extra_strings_desc.header.bLength;
+ udd_g_ctrlreq.payload = (uint8_t *) &extra_strings_desc;
+ }
+
+ // if the string is larger than request length, then cut it
+ if (udd_g_ctrlreq.payload_size > udd_g_ctrlreq.req.wLength) {
+ udd_g_ctrlreq.payload_size = udd_g_ctrlreq.req.wLength;
+ }
+ return true;
+}
+
+bool main_msc_enable(void)
+{
+ main_b_msc_enable = true;
+ return true;
+}
+
+void main_msc_disable(void)
+{
+ main_b_msc_enable = false;
+}
+
+bool main_mouse_enable(void)
+{
+ main_b_mouse_enable = true;
+ return true;
+}
+
+void main_mouse_disable(void)
+{
+ main_b_mouse_enable = false;
+}
+
+bool main_kbd_enable(void)
+{
+ main_b_kbd_enable = true;
+ return true;
+}
+
+void main_kbd_disable(void)
+{
+ main_b_kbd_enable = false;
+}
+
+bool main_cdc_enable(void)
+{
+ main_b_cdc_enable = true;
+ return true;
+}
+
+void main_cdc_disable(void)
+{
+ main_b_cdc_enable = false;
+ // Close communication
+ main_cdc_open(false);
+}
+
+#if UC3A3
+/*! \name Hmatrix bus configuration
+ */
+static void init_hmatrix(void)
+{
+ union {
+ unsigned long scfg;
+ avr32_hmatrix_scfg_t SCFG;
+ } u_avr32_hmatrix_scfg;
+
+ // For the internal-flash HMATRIX slave, use last master as default.
+ u_avr32_hmatrix_scfg.scfg =
+ AVR32_HMATRIX.scfg[AVR32_HMATRIX_SLAVE_FLASH];
+ u_avr32_hmatrix_scfg.SCFG.defmstr_type =
+ AVR32_HMATRIX_DEFMSTR_TYPE_LAST_DEFAULT;
+ AVR32_HMATRIX.scfg[AVR32_HMATRIX_SLAVE_FLASH] =
+ u_avr32_hmatrix_scfg.scfg;
+}
+#endif
+
+
+#if ((defined SD_MMC_MCI_0_MEM) && (SD_MMC_MCI_0_MEM == ENABLE)) \
+ || ((defined SD_MMC_MCI_1_MEM) && (SD_MMC_MCI_1_MEM == ENABLE))
+#include "mci.h"
+#include "conf_sd_mmc_mci.h"
+
+/*! \brief Initializes SD/MMC resources: GPIO, MCI and SD/MMC.
+ */
+static void sd_mmc_mci_resources_init(void)
+{
+ static const gpio_map_t SD_MMC_MCI_GPIO_MAP = {
+ {SD_SLOT_8BITS_CLK_PIN, SD_SLOT_8BITS_CLK_FUNCTION}, // SD CLK.
+ {SD_SLOT_8BITS_CMD_PIN, SD_SLOT_8BITS_CMD_FUNCTION}, // SD CMD.
+ {SD_SLOT_8BITS_DATA0_PIN, SD_SLOT_8BITS_DATA0_FUNCTION}, // SD DAT[0].
+ {SD_SLOT_8BITS_DATA1_PIN, SD_SLOT_8BITS_DATA1_FUNCTION}, // DATA Pin.
+ {SD_SLOT_8BITS_DATA2_PIN, SD_SLOT_8BITS_DATA2_FUNCTION}, // DATA Pin.
+ {SD_SLOT_8BITS_DATA3_PIN, SD_SLOT_8BITS_DATA3_FUNCTION}, // DATA Pin.
+ {SD_SLOT_8BITS_DATA4_PIN, SD_SLOT_8BITS_DATA4_FUNCTION}, // DATA Pin.
+ {SD_SLOT_8BITS_DATA5_PIN, SD_SLOT_8BITS_DATA5_FUNCTION}, // DATA Pin.
+ {SD_SLOT_8BITS_DATA6_PIN, SD_SLOT_8BITS_DATA6_FUNCTION}, // DATA Pin.
+ {SD_SLOT_8BITS_DATA7_PIN, SD_SLOT_8BITS_DATA7_FUNCTION} // DATA Pin.
+ };
+
+ // MCI options.
+ static const mci_options_t MCI_OPTIONS = {
+ .card_speed = 400000,
+ .card_slot = SD_SLOT_8BITS, // Default card initialization.
+ };
+
+ // Assign I/Os to MCI.
+ gpio_enable_module(SD_MMC_MCI_GPIO_MAP,
+ sizeof(SD_MMC_MCI_GPIO_MAP) /
+ sizeof(SD_MMC_MCI_GPIO_MAP[0]));
+
+ // Enable pull-up for Card Detect.
+ gpio_enable_pin_pull_up(SD_SLOT_8BITS_CARD_DETECT);
+
+ // Enable pull-up for Write Protect.
+ gpio_enable_pin_pull_up(SD_SLOT_8BITS_WRITE_PROTECT);
+
+ sd_mmc_mci_init(&MCI_OPTIONS, sysclk_get_pbb_hz(), sysclk_get_cpu_hz());
+}
+#endif // SD_MMC_MCI_0_MEM == ENABLE || SD_MMC_MCI_1_MEM == ENABLE
+
+
+void main_cdc_config_uart(usb_cdc_line_coding_t * cfg)
+{
+ uart_config(cfg);
+}
+
+
+void main_cdc_set_dtr(bool b_enable)
+{
+ main_cdc_open(b_enable);
+}
+
+static void main_cdc_open(bool b_enable)
+{
+ if (b_enable) {
+ // Open communication
+ fifo_flush(&fifo_desc_rx);
+ fifo_flush(&fifo_desc_tx);
+ uart_open();
+ ui_com_open();
+ main_b_com_startup = true;
+ main_b_com_open = true;
+ } else {
+ // Close communication
+ uart_close();
+ ui_com_close();
+ main_b_com_startup = false;
+ main_b_com_open = false;
+ }
+}
+
+void main_uart_rx_occur(bool b_error, uint8_t value_rx)
+{
+ if (b_error) {
+ udi_cdc_signal_framing_error();
+ ui_com_error();
+ }
+ if (fifo_push_byte(&fifo_desc_rx, value_rx) != FIFO_OK) {
+ // Fifo full
+ udi_cdc_signal_overrun();
+ ui_com_overflow();
+ }
+ ui_com_tx_start();
+}
+
+bool main_uart_tx_free(uint8_t * value_rx)
+{
+ if (fifo_pull_byte(&fifo_desc_tx, value_rx) == FIFO_OK) {
+ return true;
+ }
+ // Fifo empty then Stop UART transmission
+ ui_com_rx_stop();
+ return false;
+}
+
+
+/**
+ * \mainpage ASF USB Device Composite
+ *
+ * \section intro Introduction
+ * This example shows how to implement a USB Device Composite with HID mouse, keyboard, CDC and
+ * Mass Storage interfaces on AVR products with USB module.
+ *
+ * \section desc Description of the Communication Device Class (CDC)
+ * The Communication Device Class (CDC) is a general-purpose way to enable all
+ * types of communications on the Universal Serial Bus (USB).
+ * This class makes it possible to connect communication devices such as
+ * digital telephones or analog modems, as well as networking devices
+ * like ADSL or Cable modems.
+ * While a CDC device enables the implementation of quite complex devices,
+ * it can also be used as a very simple method for communication on the USB.
+ * For example, a CDC device can appear as a virtual COM port, which greatly
+ * simplifies application development on the host side.
+ *
+ *
+ * \section startup Startup
+ * The example uses all memories available on the board and connects these to
+ * USB Device Mass Storage stack.
+ * Also, the example uses the buttons or sensors available on the board
+ * to simulate a standard mouse, keyboard.
+ * After loading firmware, connect hardware board (EVKxx,XPlain,...) to the USB Host.
+ * When connected to a USB host system this application allows to display
+ * all available memories as a removable disks and provides a mouse in
+ * the Unix/Mac/Windows operating systems.
+ *
+ * For USB to UART bridge:
+ * - Connect the USART peripheral to the USART interface of the board.
+ * - Connect the application to a USB host (e.g. a PC)
+ * with a mini-B (embedded side) to A (PC host side) cable.
+ * The application will behave as a virtual COM (see Windows Hardware Manager).
+ * - Open a hyperterminal on both COM ports (RS232 and Virtual COM)
+ * - Select the same configuration for both COM ports up to 115200 baud.
+ * - Type a character in one hyperterminal and see it in the other.
+ *
+ * \note
+ * This example uses the native MSC and HID drivers on Unix/Mac/Windows OS, except for Win98.
+ *
+ * \copydoc UI
+ *
+ * \section example About example
+ *
+ * The example uses the following module groups:
+ * - Basic modules:
+ * Startup, board, clock, interrupt, power management
+ * - USB Device stack and HID, CDC and MSC modules:
+ * <br>services/usb/
+ * <br>services/usb/udc/
+ * <br>services/usb/class/msc/
+ * <br>services/usb/class/cdc/
+ * <br>services/usb/class/hid/
+ * <br>services/usb/class/hid/mouse/
+ * <br>services/usb/class/hid/keyboard/
+ * - Specific implementation:
+ * - main.c,
+ * <br>initializes clock
+ * <br>initializes interrupt
+ * <br>\subpage power_management
+ * <br>manages UI
+ * - udi_composite_desc.c,udi_composite_conf.h,
+ * <br>USB Device composite definition
+ * - specific implementation for each target "./examples/product_board/":
+ * - conf_foo.h configuration of each module
+ * - ui.c implement of user's interface (buttons, leds)
+ * - uart.c implement of RS232 bridge
+ *
+ * <SUP>1</SUP> The memory data transfers are done outside USB interrupt routine.
+ * This is done in the MSC process ("udi_msc_process_trans()") called by main loop.
+ * <SUP>1</SUP>Simple FIFOs are implemented between UART and CDC interfaces.
+ * The CDC I/O routines are called directly in UART RX/TX interrupts
+ * to avoid data being lost.
+ * In this case, the CDC I/O routines are called in the main loop to fill
+ * or read FIFOs. The redirection of printf to CDC is supported for GCC only.
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/main.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/main.h
new file mode 100644
index 0000000..9420ebb
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/main.h
@@ -0,0 +1,143 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief Declaration of main function used by Composite example 1
+ *
+ * - Compiler: IAR EWAVR and GNU GCC for AVR
+ * - Supported devices: All AVR devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#ifndef _MAIN_H_
+#define _MAIN_H_
+
+/*! \brief Called by MSC interface
+ * Callback running when USB Host enable MSC interface
+ *
+ * \retval true if MSC startup is ok
+ */
+bool main_msc_enable(void);
+
+/*! \brief Called by MSC interface
+ * Callback running when USB Host disable MSC interface
+ */
+void main_msc_disable(void);
+
+/*! \brief Called by HID interface
+ * Callback running when USB Host enable mouse interface
+ *
+ * \retval true if mouse startup is ok
+ */
+bool main_mouse_enable(void);
+
+/*! \brief Called by HID interface
+ * Callback running when USB Host disable mouse interface
+ */
+void main_mouse_disable(void);
+
+/*! \brief Called by HID interface
+ * Callback running when USB Host enable keyboard interface
+ *
+ * \retval true if keyboard startup is ok
+ */
+bool main_kbd_enable(void);
+
+/*! \brief Called by HID interface
+ * Callback running when USB Host disable keyboard interface
+ */
+void main_kbd_disable(void);
+
+/*! \brief Called by CDC interface
+ * Callback running when USB Host enable CDC interface
+ *
+ * \retval true if cdc startup is successfully done
+ */
+bool main_cdc_enable(void);
+
+/*! \brief Called by CDC interface
+ * Callback running when USB Host disable cdc interface
+ */
+void main_cdc_disable(void);
+
+/*! \brief Called when Vbus line state change
+ */
+void main_vbus_action(bool b_high);
+
+/*! \brief Called when a start of frame is received on USB line
+ */
+void main_sof_action(void);
+
+/*! \brief Called by UDD when a suspend is received
+ * Callback running when USB Host set USB line in suspend state
+ */
+void main_suspend_action(void);
+
+/*! \brief Called by UDD when the USB line exit of suspend state
+ */
+void main_resume_action(void);
+
+/*! \brief Called by UDC when USB Host request to enable remote wakeup
+ */
+void main_remotewakeup_enable(void);
+
+/*! \brief Called by UDC when USB Host request to disable remote wakeup
+ */
+void main_remotewakeup_disable(void);
+
+/*! \brief Called by UDC when USB Host request a extra string different
+ * of this specified in USB device descriptor
+ */
+bool main_extra_string(void);
+
+/*! \brief Called by CDC interface to config port
+ */
+void main_cdc_config_uart(usb_cdc_line_coding_t * cfg);
+
+/*! \brief Called by CDC interface to open/close port communication
+ */
+void main_cdc_set_dtr(bool b_enable);
+
+/*! \brief Called by UART interrupt when a data is received
+ */
+void main_uart_rx_occur(bool b_error, uint8_t value_rx);
+
+/*! \brief Called by UART interrupt when it is ready to send next data
+ */
+bool main_uart_tx_free(uint8_t * value_rx);
+
+#endif // _MAIN_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/ui.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/ui.h
new file mode 100644
index 0000000..69ebf11
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/example2/ui.h
@@ -0,0 +1,103 @@
+/**
+ * \file
+ *
+ * \brief Common User Interface for USB application
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _UI_H_
+#define _UI_H_
+
+/*! \brief Called at firmware startup
+ */
+void ui_init(void);
+
+/*! \brief Called before enter in powerdown mode
+ */
+void ui_powerdown(void);
+
+void ui_wakeup_enable(void);
+void ui_wakeup_disable(void);
+
+/*! \brief Called when CPU exit of powerdown mode
+ */
+void ui_wakeup(void);
+
+void ui_start_read(void);
+void ui_stop_read(void);
+void ui_start_write(void);
+void ui_stop_write(void);
+
+/*! \brief Called when communication port is opened
+ */
+void ui_com_open(void);
+
+/*! \brief Called when communication port is closed
+ */
+void ui_com_close(void);
+
+/*! \brief Called when a data is received on CDC
+ */
+void ui_com_rx_start(void);
+
+/*! \brief Called when a data is received on port com
+ */
+void ui_com_tx_start(void);
+
+/*! \brief Called when all data pending are sent on port com
+ */
+void ui_com_rx_stop(void);
+
+/*! \brief Called when all data pending are sent on CDC
+ */
+void ui_com_tx_stop(void);
+
+/*! \brief Called when a communication error occur
+ */
+void ui_com_error(void);
+
+/*! \brief Called when a overflow occur
+ */
+void ui_com_overflow(void);
+
+//! This process is called called each 1ms
+//! It is called only if the interfaces are enable.
+//! It is called by SOF interrupt.
+//!
+//!
+void ui_process(uint16_t framenumber);
+
+void ui_kbd_led(uint8_t value);
+
+#endif // _UI_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/module_config/conf_usb.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/module_config/conf_usb.h
new file mode 100644
index 0000000..b3aafc5
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/module_config/conf_usb.h
@@ -0,0 +1,387 @@
+/**
+ * \file
+ *
+ * \brief USB configuration file
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _CONF_USB_H_
+#define _CONF_USB_H_
+
+#include "compiler.h"
+
+#warning You must refill the following definitions with a correct values
+
+/**
+ * USB Device Configuration
+ * @{
+ */
+
+//! Device definition (mandatory)
+#define USB_DEVICE_VENDOR_ID 0x0000
+#define USB_DEVICE_PRODUCT_ID 0x0000
+#define USB_DEVICE_MAJOR_VERSION 1
+#define USB_DEVICE_MINOR_VERSION 0
+#define USB_DEVICE_POWER 100 // Consumption on Vbus line (mA)
+#define USB_DEVICE_ATTR \
+ (USB_CONFIG_ATTR_SELF_POWERED)
+// (USB_CONFIG_ATTR_BUS_POWERED)
+// (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_SELF_POWERED)
+// (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_BUS_POWERED)
+
+//! USB Device string definitions (Optional)
+// #define USB_DEVICE_MANUFACTURE_NAME "Manufacture name"
+// #define USB_DEVICE_PRODUCT_NAME "Product name"
+// #define USB_DEVICE_SERIAL_NAME "12...EF" // Disk SN for MSC
+
+/**
+ * Device speeds support
+ * @{
+ */
+//! To define a Low speed device
+//#define USB_DEVICE_LOW_SPEED
+
+//! To authorize the High speed
+#if (UC3A3||UC3A4)
+//#define USB_DEVICE_HS_SUPPORT
+#endif
+//@}
+
+/**
+ * USB Device Callbacks definitions (Optional)
+ * @{
+ */
+// #define UDC_VBUS_EVENT(b_vbus_high) user_callback_vbus_action(b_vbus_high)
+// #define UDC_SOF_EVENT() user_callback_sof_action()
+// #define UDC_SUSPEND_EVENT() user_callback_suspend_action()
+// #define UDC_RESUME_EVENT() user_callback_resume_action()
+//! Mandatory when USB_DEVICE_ATTR authorizes remote wakeup feature
+// #define UDC_REMOTEWAKEUP_ENABLE() user_callback_remotewakeup_enable()
+// #define UDC_REMOTEWAKEUP_DISABLE() user_callback_remotewakeup_disable()
+//! When a extra string descriptor must be supported
+//! other than manufacturer, product and serial string
+// #define UDC_GET_EXTRA_STRING()
+//@}
+
+/**
+ * USB Device low level configuration
+ * When only one interface is used, these configurations are defined by the class module.
+ * For composite device, these configuration must be defined here
+ * @{
+ */
+//! Control endpoint size
+#define USB_DEVICE_EP_CTRL_SIZE 64
+
+//! Number of interfaces for this device
+#define USB_DEVICE_NB_INTERFACE 1 // 1 or more
+
+//! Total endpoint used by all interfaces
+//! Note:
+//! It is possible to define an IN and OUT endpoints with the same number on xmega product only
+//! E.g. MSC class can be have IN endpoint 0x81 and OUT endpoint 0x01
+#define USB_DEVICE_MAX_EP 0 // 0 to max endpoint requested by interfaces
+//@}
+
+//@}
+
+
+/**
+ * USB Interface Configuration
+ * @{
+ */
+
+/**
+ * Configuration of CDC interface (if used)
+ * @{
+ */
+//! Interface callback definition
+#define UDI_CDC_ENABLE_EXT() true
+#define UDI_CDC_DISABLE_EXT()
+#define UDI_CDC_SET_CODING_EXT(cfg)
+#define UDI_CDC_SET_DTR_EXT(set)
+#define UDI_CDC_SET_RTS_EXT(set)
+
+//! Default configuration of communication port
+#define UDI_CDC_DEFAULT_RATE 115200
+#define UDI_CDC_DEFAULT_STOPBITS CDC_STOP_BITS_1
+#define UDI_CDC_DEFAULT_PARITY CDC_PAR_NONE
+#define UDI_CDC_DEFAULT_DATABITS 8
+
+/**
+ * USB CDC low level configuration
+ * In standalone these configurations are defined by the CDC module.
+ * For composite device, these configuration must be defined here
+ * @{
+ */
+//! Endpoint numbers definition
+#define UDI_CDC_DATA_EP_IN (1 | USB_EP_DIR_IN) // TX
+#define UDI_CDC_DATA_EP_OUT (2 | USB_EP_DIR_OUT) // RX
+#define UDI_CDC_COMM_EP (3 | USB_EP_DIR_IN) // Notify endpoint
+
+//! Interface numbers
+#define UDI_CDC_COMM_IFACE_NUMBER 0
+#define UDI_CDC_DATA_IFACE_NUMBER 1
+//@}
+//@}
+
+
+/**
+ * Configuration of MSC interface (if used)
+ * @{
+ */
+//! Vendor name and Product version of MSC interface
+#define UDI_MSC_GLOBAL_VENDOR_ID \
+ 'A', 'T', 'M', 'E', 'L', ' ', ' ', ' '
+#define UDI_MSC_GLOBAL_PRODUCT_VERSION \
+ '1', '.', '0', '0'
+
+//! Interface callback definition
+#define UDI_MSC_ENABLE_EXT() true
+#define UDI_MSC_DISABLE_EXT()
+
+/**
+ * USB MSC low level configuration
+ * In standalone these configurations are defined by the MSC module.
+ * For composite device, these configuration must be defined here
+ * @{
+ */
+//! Endpoint numbers definition
+#define UDI_MSC_EP_IN (1 | USB_EP_DIR_IN)
+#define UDI_MSC_EP_OUT (2 | USB_EP_DIR_OUT)
+
+//! Interface number
+#define UDI_MSC_IFACE_NUMBER 0
+//@}
+//@}
+
+
+/**
+ * Configuration of HID Mouse interface (if used)
+ * @{
+ */
+//! Interface callback definition
+#define UDI_HID_MOUSE_ENABLE_EXT() true
+#define UDI_HID_MOUSE_DISABLE_EXT()
+
+/**
+ * USB HID Mouse low level configuration
+ * In standalone these configurations are defined by the HID Mouse module.
+ * For composite device, these configuration must be defined here
+ * @{
+ */
+//! Endpoint numbers definition
+#define UDI_HID_MOUSE_EP_IN (1 | USB_EP_DIR_IN)
+
+//! Interface number
+#define UDI_HID_MOUSE_IFACE_NUMBER 0
+//@}
+//@}
+
+
+/**
+ * Configuration of HID Keyboard interface (if used)
+ * @{
+ */
+//! Interface callback definition
+#define UDI_HID_KBD_ENABLE_EXT() true
+#define UDI_HID_KBD_DISABLE_EXT()
+#define UDI_HID_KBD_CHANGE_LED(value)
+
+/**
+ * USB HID Keyboard low level configuration
+ * In standalone these configurations are defined by the HID Keyboard module.
+ * For composite device, these configuration must be defined here
+ * @{
+ */
+//! Endpoint numbers definition
+#define UDI_HID_KBD_EP_IN (1 | USB_EP_DIR_IN)
+
+//! Interface number
+#define UDI_HID_KBD_IFACE_NUMBER 0
+//@}
+//@}
+
+
+/**
+ * Configuration of HID Generic interface (if used)
+ * @{
+ */
+//! Interface callback definition
+#define UDI_HID_GENERIC_ENABLE_EXT() true
+#define UDI_HID_GENERIC_DISABLE_EXT()
+#define UDI_HID_GENERIC_REPORT_OUT(ptr)
+#define UDI_HID_GENERIC_SET_FEATURE(f)
+
+#define UDI_HID_REPORT_IN_SIZE 64
+#define UDI_HID_REPORT_OUT_SIZE 64
+#define UDI_HID_REPORT_FEATURE_SIZE 4
+#define UDI_HID_GENERIC_EP_SIZE 64
+
+/**
+ * USB HID Generic low level configuration
+ * In standalone these configurations are defined by the HID generic module.
+ * For composite device, these configuration must be defined here
+ * @{
+ */
+//! Endpoint numbers definition
+#define UDI_HID_GENERIC_EP_OUT (2 | USB_EP_DIR_OUT)
+#define UDI_HID_GENERIC_EP_IN (1 | USB_EP_DIR_IN)
+
+//! Interface number
+#define UDI_HID_GENERIC_IFACE_NUMBER 0
+//@}
+//@}
+
+
+/**
+ * Configuration of PHDC interface (if used)
+ * @{
+ */
+
+//! Interface callback definition
+#define UDI_PHDC_ENABLE_EXT() true
+#define UDI_PHDC_DISABLE_EXT()
+
+//! Select data format of application
+//! USB_PHDC_DATAMSG_FORMAT_VENDOR or USB_PHDC_DATAMSG_FORMAT_11073_20601
+#define UDI_PHDC_DATAMSG_FORMAT USB_PHDC_DATAMSG_FORMAT_11073_20601
+//! If USB_PHDC_DATAMSG_FORMAT_11073_20601 then define specialization(s)
+#define UDI_PHDC_SPECIALIZATION {0x2345} // Define in 11073_20601
+
+//! Defines the QOS need for each transfer direction
+#define UDI_PHDC_QOS_OUT \
+ (USB_PHDC_QOS_MEDIUM_BETTER|USB_PHDC_QOS_HIGH_BEST)
+#define UDI_PHDC_QOS_IN \
+ (USB_PHDC_QOS_LOW_GOOD|USB_PHDC_QOS_MEDIUM_BETTER|USB_PHDC_QOS_MEDIUM_BEST)
+
+//! The following METADATAs can be send during USB enumeration
+//! for each endpoints (optional).
+//! It can define the Opaque data format of each endpoints
+//! These must be up to 253 and recommended <30
+#define UDI_PHDC_METADATA_DESC_BULK_IN {0x01,0x02,0x03}
+#define UDI_PHDC_METADATA_DESC_BULK_OUT {0x01,0x02,0x03}
+#define UDI_PHDC_METADATA_DESC_INT_IN {0x01,0x02,0x03}
+
+/**
+ * USB PHDC low level configuration
+ * In standalone these configurations are defined by the PHDC module.
+ * For composite device, these configuration must be defined here
+ * @{
+ */
+//! Endpoint numbers definition
+#define UDI_PHDC_EP_BULK_OUT (1 | USB_EP_DIR_OUT)
+#define UDI_PHDC_EP_BULK_IN (2 | USB_EP_DIR_IN)
+#define UDI_PHDC_EP_INTERRUPT_IN (3 | USB_EP_DIR_IN) // Only if UDI_PHDC_QOS_IN include USB_PHDC_QOS_LOW_GOOD
+
+//! Interface number
+#define UDI_PHDC_IFACE_NUMBER 0
+//@}
+//@}
+
+//... Eventually add other Interface Configuration
+
+//@}
+
+
+/**
+ * Description of Composite Device
+ * @{
+ */
+//! USB Interfaces descriptor structure
+#define UDI_COMPOSITE_DESC_T
+
+//! USB Interfaces descriptor value for Full Speed
+#define UDI_COMPOSITE_DESC_FS
+
+//! USB Interfaces descriptor value for High Speed
+#define UDI_COMPOSITE_DESC_HS
+
+//! USB Interface APIs
+#define UDI_COMPOSITE_API
+
+/* Example for device with cdc, msc and hid mouse interface
+#define UDI_COMPOSITE_DESC_T \
+ usb_iad_desc_t udi_cdc_iad; \
+ udi_cdc_comm_desc_t udi_cdc_comm; \
+ udi_cdc_data_desc_t udi_cdc_data; \
+ udi_msc_desc_t udi_msc; \
+ udi_hid_mouse_desc_t udi_hid_mouse
+
+//! USB Interfaces descriptor value for Full Speed
+#define UDI_COMPOSITE_DESC_FS \
+ .udi_cdc_iad = UDI_CDC_IAD_DESC, \
+ .udi_cdc_comm = UDI_CDC_COMM_DESC, \
+ .udi_cdc_data = UDI_CDC_DATA_DESC, \
+ .udi_msc = UDI_MSC_DESC_FS, \
+ .udi_hid_mouse = UDI_HID_MOUSE_DESC
+
+//! USB Interfaces descriptor value for High Speed
+#define UDI_COMPOSITE_DESC_HS \
+ .udi_cdc_iad = UDI_CDC_IAD_DESC, \
+ .udi_cdc_comm = UDI_CDC_COMM_DESC, \
+ .udi_cdc_data = UDI_CDC_DATA_DESC, \
+ .udi_msc = UDI_MSC_DESC_HS, \
+ .udi_hid_mouse = UDI_HID_MOUSE_DESC
+
+//! USB Interface APIs
+#define UDI_COMPOSITE_API \
+ &udi_api_cdc_comm, \
+ &udi_api_cdc_data, \
+ &udi_api_msc, \
+ &udi_api_hid_mouse
+*/
+
+//@}
+
+
+/**
+ * USB Device Driver Configuration
+ * @{
+ */
+//@}
+
+//! The includes of classes and other headers must be done at the end of this file to avoid compile error
+
+/* Example of include for interface
+#include "udi_msc.h"
+#include "udi_hid_kbd.h"
+#include "udi_hid_mouse.h"
+#include "udi_cdc_conf.h"
+#include "udi_phdc.h"
+*/
+/* Declaration of callbacks used by USB
+#include "callback_def.h"
+*/
+
+#endif // _CONF_USB_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/udi_composite_conf.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/udi_composite_conf.h
new file mode 100644
index 0000000..b69424d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/udi_composite_conf.h
@@ -0,0 +1,42 @@
+/**
+ * \file
+ *
+ * \brief Descriptors for an USB Device composite MSC and HID mouse
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _UDI_COMPOSITE_CONF_H_
+#define _UDI_COMPOSITE_CONF_H_
+
+#endif // _UDI_COMPOSITE_CONF_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/udi_composite_desc.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/udi_composite_desc.c
new file mode 100644
index 0000000..887d421
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/composite/device/udi_composite_desc.c
@@ -0,0 +1,176 @@
+/**
+ * \file
+ *
+ * \brief Descriptors for an USB Device composite
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "conf_usb.h"
+#include "udd.h"
+#include "udc_desc.h"
+
+/**
+ * \defgroup udi_group_desc Descriptors for a USB Device
+ * composite
+ *
+ * @{
+ */
+
+/**INDENT-OFF**/
+
+//! USB Device Descriptor
+COMPILER_WORD_ALIGNED
+UDC_DESC_STORAGE usb_dev_desc_t udc_device_desc = {
+ .bLength = sizeof(usb_dev_desc_t),
+ .bDescriptorType = USB_DT_DEVICE,
+ .bcdUSB = LE16(USB_V2_0),
+ .bDeviceClass = 0,
+ .bDeviceSubClass = 0,
+ .bDeviceProtocol = 0,
+ .bMaxPacketSize0 = USB_DEVICE_EP_CTRL_SIZE,
+ .idVendor = LE16(USB_DEVICE_VENDOR_ID),
+ .idProduct = LE16(USB_DEVICE_PRODUCT_ID),
+ .bcdDevice = LE16((USB_DEVICE_MAJOR_VERSION << 8)
+ | USB_DEVICE_MINOR_VERSION),
+#ifdef USB_DEVICE_MANUFACTURE_NAME
+ .iManufacturer = 1,
+#else
+ .iManufacturer = 0, // No manufacture string
+#endif
+#ifdef USB_DEVICE_PRODUCT_NAME
+ .iProduct = 2,
+#else
+ .iProduct = 0, // No product string
+#endif
+#ifdef USB_DEVICE_SERIAL_NAME
+ .iSerialNumber = 3,
+#else
+ .iSerialNumber = 0, // No serial string
+#endif
+ .bNumConfigurations = 1
+};
+
+
+#ifdef USB_DEVICE_HS_SUPPORT
+//! USB Device Qualifier Descriptor for HS
+COMPILER_WORD_ALIGNED
+UDC_DESC_STORAGE usb_dev_qual_desc_t udc_device_qual = {
+ .bLength = sizeof(usb_dev_qual_desc_t),
+ .bDescriptorType = USB_DT_DEVICE_QUALIFIER,
+ .bcdUSB = LE16(USB_V2_0),
+ .bDeviceClass = 0,
+ .bDeviceSubClass = 0,
+ .bDeviceProtocol = 0,
+ .bMaxPacketSize0 = USB_DEVICE_EP_CTRL_SIZE,
+ .bNumConfigurations = 1
+};
+#endif
+
+//! Structure for USB Device Configuration Descriptor
+COMPILER_PACK_SET(1);
+typedef struct {
+ usb_conf_desc_t conf;
+ UDI_COMPOSITE_DESC_T;
+} udc_desc_t;
+COMPILER_PACK_RESET();
+
+//! USB Device Configuration Descriptor filled for FS
+COMPILER_WORD_ALIGNED
+UDC_DESC_STORAGE udc_desc_t udc_desc_fs = {
+ .conf.bLength = sizeof(usb_conf_desc_t),
+ .conf.bDescriptorType = USB_DT_CONFIGURATION,
+ .conf.wTotalLength = LE16(sizeof(udc_desc_t)),
+ .conf.bNumInterfaces = USB_DEVICE_NB_INTERFACE,
+ .conf.bConfigurationValue = 1,
+ .conf.iConfiguration = 0,
+ .conf.bmAttributes = USB_CONFIG_ATTR_MUST_SET | USB_DEVICE_ATTR,
+ .conf.bMaxPower = USB_CONFIG_MAX_POWER(USB_DEVICE_POWER),
+ UDI_COMPOSITE_DESC_FS,
+};
+
+#ifdef USB_DEVICE_HS_SUPPORT
+//! USB Device Configuration Descriptor filled for HS
+COMPILER_WORD_ALIGNED
+UDC_DESC_STORAGE udc_desc_t udc_desc_hs = {
+ .conf.bLength = sizeof(usb_conf_desc_t),
+ .conf.bDescriptorType = USB_DT_CONFIGURATION,
+ .conf.wTotalLength = LE16(sizeof(udc_desc_t)),
+ .conf.bNumInterfaces = USB_DEVICE_NB_INTERFACE,
+ .conf.bConfigurationValue = 1,
+ .conf.iConfiguration = 0,
+ .conf.bmAttributes = USB_CONFIG_ATTR_MUST_SET | USB_DEVICE_ATTR,
+ .conf.bMaxPower = USB_CONFIG_MAX_POWER(USB_DEVICE_POWER),
+ UDI_COMPOSITE_DESC_HS,
+};
+#endif
+
+
+/**
+ * \name UDC structures which contain all USB Device definitions
+ */
+//@{
+
+//! Associate an UDI for each USB interface
+UDC_DESC_STORAGE udi_api_t *udi_apis[USB_DEVICE_NB_INTERFACE] = {
+ UDI_COMPOSITE_API,
+};
+
+//! Add UDI with USB Descriptors FS
+UDC_DESC_STORAGE udc_config_speed_t udc_config_lsfs[1] = {{
+ .desc = (usb_conf_desc_t UDC_DESC_STORAGE*)&udc_desc_fs,
+ .udi_apis = udi_apis,
+}};
+
+#ifdef USB_DEVICE_HS_SUPPORT
+//! Add UDI with USB Descriptors HS
+UDC_DESC_STORAGE udc_config_speed_t udc_config_hs[1] = {{
+ .desc = (usb_conf_desc_t UDC_DESC_STORAGE*)&udc_desc_hs,
+ .udi_apis = udi_apis,
+}};
+#endif
+
+//! Add all information about USB Device in global structure for UDC
+UDC_DESC_STORAGE udc_config_t udc_config = {
+ .confdev_lsfs = &udc_device_desc,
+ .conf_lsfs = udc_config_lsfs,
+#ifdef USB_DEVICE_HS_SUPPORT
+ .confdev_hs = &udc_device_desc,
+ .qualifier = &udc_device_qual,
+ .conf_hs = udc_config_hs,
+#endif
+};
+
+//@}
+/**INDENT-ON**/
+//@}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp.h
new file mode 100644
index 0000000..43ac72a
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp.h
@@ -0,0 +1,166 @@
+/**
+ * \file
+ *
+ * \brief In system programming API to manage security, memories and fuses
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _ISP_H_
+#define _ISP_H_
+
+#include "conf_isp.h"
+#include "conf_usb.h"
+#include "usb_atmel_dfu.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Data type for holding flash memory addresses.
+ */
+#ifdef ISP_SMALL_MEMORY_SIZE
+typedef uint16_t isp_addr_t;
+#else
+typedef uint32_t isp_addr_t;
+#endif
+
+/**
+ * \name In system programming API to manage security, memories and fuses
+ */
+//@{
+
+/**
+ * \name Interfaces to control chip
+ */
+//@{
+extern void isp_init(void);
+extern bool isp_is_security(void);
+extern void isp_force_isp(bool force);
+extern bool isp_erase_chip(void);
+#ifdef UDI_DFU_ATMEL_FIX_ERASE_CHIP_PROTOCOL
+extern bool isp_start_erase_chip(void);
+#endif
+extern void isp_start_appli_rst(void);
+extern void isp_start_appli_norst(void);
+//@}
+
+//! Memory API definition
+typedef struct {
+ uint32_t size;
+ void (*fnct_read) (void *dst, isp_addr_t src, uint16_t nbytes);
+ void (*fnct_write) (isp_addr_t dst, const void *src, uint16_t nbytes);
+} isp_mem_t;
+
+//! \name Memories list
+#if (UDI_DFU_ATMEL_PROTOCOL_VERSION == DFU_ATMEL_PROTOCOL_VERSION_1)
+typedef union {
+ isp_mem_t const *mem[DFU_ATMEL_V1_MEM_COUNT];
+ struct {
+ isp_mem_t const *flash;
+ isp_mem_t const *eeprom;
+ isp_mem_t const *bootloader;
+ isp_mem_t const *signature;
+ isp_mem_t const *user;
+ };
+} isp_mems_t;
+#endif
+
+#if (UDI_DFU_ATMEL_PROTOCOL_VERSION == DFU_ATMEL_PROTOCOL_VERSION_2)
+typedef union {
+ isp_mem_t const *mem[DFU_ATMEL_V2_MEM_COUNT];
+ struct {
+ isp_mem_t const *flash;
+ isp_mem_t const *eeprom;
+ isp_mem_t const *security;
+ isp_mem_t const *conf;
+ isp_mem_t const *bootloader;
+ isp_mem_t const *signature;
+ isp_mem_t const *user;
+ isp_mem_t const *int_ram;
+ isp_mem_t const *ext_mem_cs0;
+ isp_mem_t const *ext_mem_cs1;
+ isp_mem_t const *ext_mem_cs2;
+ isp_mem_t const *ext_mem_cs3;
+ isp_mem_t const *ext_mem_cs4;
+ isp_mem_t const *ext_mem_cs5;
+ isp_mem_t const *ext_mem_cs6;
+ isp_mem_t const *ext_mem_cs7;
+ isp_mem_t const *ext_mem_df;
+ };
+} isp_mems_t;
+#endif
+
+extern const isp_mems_t isp_memories;
+
+
+
+/*
+ * alignment requested to simulate a memory
+ */
+COMPILER_PACK_SET(1);
+
+//! \name Memory signature structure
+typedef union {
+ uint8_t mem[4];
+ struct {
+ uint8_t manufacture;
+ uint8_t product_number_msb;
+ uint8_t product_number_lsb;
+ uint8_t product_revision;
+ };
+} isp_mem_signature_t;
+
+
+//! \name Memory bootloader structure
+// It is used to store medium and minor bootloader versions
+// Example: Version 0x00 give 1.0.0 on batchisp log
+// Example: Version 0x03 give 1.0.3 on batchisp log
+// Example: Version 0x25 give 1.2.5 on batchisp log
+// id1 & id2 is not used and must be always at 0.
+typedef struct {
+ uint8_t version;
+ uint8_t id1;
+ uint8_t id2;
+} isp_mem_bootloader_t;
+
+COMPILER_PACK_RESET();
+
+
+//@}
+
+#ifdef __cplusplus
+}
+#endif
+#endif // _ISP_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3a0_a1/iar/at32uc3a-isp.hex b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3a0_a1/iar/at32uc3a-isp.hex
new file mode 100644
index 0000000..7d1f8e6
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3a0_a1/iar/at32uc3a-isp.hex
@@ -0,0 +1,478 @@
+:0200000480007A
+:10000000E1B80000F1D8C2C35818C090FEC8FFF094
+:10001000FC190061E06D0D1CD041D6033008FE795B
+:100020000D30E06A01FCEA1A8080FE7B0C00700053
+:10003000E061504BEA1149537402E06301070494F4
+:10004000C76CC141E7D2C210E043E11EC0F1EDB27E
+:100050000009C0C3F6F30140E06403150873C13121
+:10006000EDB30003C3830230C3C1C53C9101E06D11
+:100070000D34D353FEC00074E3B00001E0A00C3E89
+:10008000E0A00D20EDB20008C262E06A01F8EA1AB1
+:1000900080807402E06301070494C49CCE71E7D2AF
+:1000A000C22FE043494FCE21E7D2C108E043006EA2
+:1000B000CDD2FE7A1000E6041605A964080A7584FC
+:1000C000E013001FE8030A44E7D2C2010654EDB46E
+:1000D0000000CCC20230C051C1CC300830009100C9
+:1000E000FC100061E3B0000030003001300230034A
+:1000F000300430053006300730083009300A300B44
+:10010000300C300D300EE3B00001E3B0004248BFC8
+:10011000FC1255009302EE12FF0093021C9FE805AB
+:100120001200EA051117E60509450A54E04400FFEC
+:10013000FE9BFFF758045EF480002000D021304B76
+:10014000FE6C0000784AA39AC062781AA39AC03263
+:10015000992BCC68308A310CFE6900007218AD987A
+:10016000C213FE6B00007619A589C673FE6B0800EA
+:10017000301AFE6900007248A198E082009272185D
+:10018000A198E082008E7609AFC99709FE69000048
+:10019000935A936C760CA1DC970C760CAFAC970C51
+:1001A000C9F8FE690220930C930AFE690160FE689B
+:1001B000010070CEA39EC062340C930CE0A004D862
+:1001C000C8F870CEA38EC042E0A00594C89870CE47
+:1001D000A19EC092FE6801C0700EA19EC042E0A028
+:1001E0000529C7E8E0680910EA180000706EFE678C
+:1001F00001006EC6A586C102930A6EC7A197C70308
+:10020000582EC071916B930CFE6B01C097CCC688C1
+:10021000583EC661C0F86EC8A598CA42930C6ECB12
+:10022000A38BC5E3581EC041E0A005CEC598584E2B
+:10023000C571E86C0000CE9B972AE0A002FBFE6C23
+:100240000000780BE01BFF80990B780BA7BB990B84
+:10025000787BA1AB997BFE6C0100780BE069040010
+:10026000308A3408F00A0C4AF4090D4AE01BE68390
+:100270003FF9F20A001AF4091200F3D9C005F20A94
+:10028000111CA56AE21A197C144B990B780BA1BBBF
+:10029000990B78CBB39BCFE2E0A00454C21872480C
+:1002A000A598C0E27218A598C0B27609AFC997099F
+:1002B000FE690000935C936A760CA1BCC71B761A9A
+:1002C000A38AC0E2760CAFCC970C302C972C760C1E
+:1002D000AFAC970C761CF9DCC161E0A00C05D02214
+:1002E000D603D70380000B6C80000CF080000C302C
+:1002F00080000DC48000083080000B4080001AE4AC
+:10030000E06B1C5CEA1B8000FE6C1408780AF5DACE
+:10031000C1A3F60A032C5EFCFE6A14007409A7C987
+:10032000340BF7EC006C124C950C5EFDFE6B140860
+:10033000760CA19CCFC25EFDD42118951697E0667D
+:100340000008EA160000F0160000FE6C1404780B9A
+:10035000E01BFFC0EBD5C00616455807C0A6E01548
+:1003600000FFE415FF000A9BEBD7C010F7E51085EE
+:10037000EBD5C018EA15A5009905781CE21C000C05
+:100380008D1CF0160000D82AFE6B1408760CF9DCE0
+:10039000C0815EFCD4013FFB309CCCFFD80A00003A
+:1003A000D401F60A1518304AF9BA0005189B149CB6
+:1003B000CC4FD80AD42118961697CA3F0E9BAD9CF5
+:1003C000B9360C9CCEEFD82AD421189730063105C7
+:1003D00020150E9B0A9CCEFFE06B0008EA1B000074
+:1003E000761C18465805CF519716D82AFE6B140C68
+:1003F0007618760A30091449F9DCC006EDBC000510
+:10040000F2081730F00C0A48A1985F3C5EFC00002F
+:10041000D42118971696F7DCC006308CC8EFEC0C88
+:100420001518C0400E9CCE3FD822DA2AD401F60A15
+:100430001518C061F9DCC006189B307CC7EFD80ADC
+:10044000D401F60A1518300BC030CE3FD80ACEFFC3
+:10045000D80A0000D4013FFB303CFEB0FF6FD80A41
+:10046000D401189B30CCFEB0FF69FE6B1408760CEB
+:10047000F9DCC0A1D8020000D42116973016189BD1
+:10048000302CFEB0FF5BEE0C1518C0C0E067000812
+:10049000EA1700006E153FFCCE4F18966E1C1845EB
+:1004A0008F150C9CD8220000D431189730163005D7
+:1004B000FEB0FF28F8041609C09820140E9B089C73
+:1004C000CDCF18665C56661C1845E0630008EA1339
+:1004D00000005804CF3187150C9CD832D4013FFB63
+:1004E00030FCFEB0FF2BFE6B1408760CF9DCC0A1CB
+:1004F000D8020000D42118973FFB30ECFEB0FF1E5D
+:10050000EE0C1518F9BC0001C020CE9FD8220000C7
+:10051000D4013FFB30DCFEB0FF11D80AD671204D6C
+:100520001697149530013003FC168000FEB0FEEAE9
+:100530001806502640560C05FC1C80001836C08258
+:100540005C360E0618060C97FC168000C0E8402B9F
+:100550001636C0B3FC1C80801836C0725C360E069E
+:1005600018060C97FC168080E06C0201EA1C808063
+:100570001835C063E0650200EA158080C0A8301C11
+:10058000EA1C80801835C052402B0A3BFBF5300234
+:100590000A9CA1CCE01CFFFCE01CFFF8503CE5D518
+:1005A000C003C0E8580BC050300CCA5F681C184329
+:1005B0003FFB30DCFEB0FEC2069C68131843E064CB
+:1005C0000008EA1400000A36E08200AA3FFB303C33
+:1005D000FEB0FEB4681C18430C99E019FE00F2CC82
+:1005E000FE00403AF40C0D4E0A9CE01CFE00183947
+:1005F0005F2CF7D6C009C2200C90E010FFF8C0387D
+:10060000B30AB32A0039CFD3F7D6C003C17030087C
+:10061000133AFA080B0A2FF81638CFB35888C0627D
+:100620000F3BFA080B0B2FF8CFAB0096403A143073
+:10063000C042BB0AAD2AC0283011A39EEC0B1603A2
+:10064000161E1C98303B0E6B167BC040202BC080C2
+:10065000C1E85808C1E0AF0BAD2A2018CFBB58083D
+:10066000C180300B0F2AFA0B0A1A2FFB584BCFB35D
+:10067000BB0AAD2A2018CF4B300B0F3AFA0B0B0AEE
+:100680002FFB588BCFB3BB0AAD2A20185808CF5187
+:10069000F80B1518C200E20C1518C0300498C09869
+:1006A0003008C0580F3CFA080B0C2FF80438CFB3B1
+:1006B0000A995802C061C0C8133CFA080B0C2FF805
+:1006C0005888CFB3BB0AAD2AC038B30AB32AF9D9C8
+:1006D000C009CFC1301CEA1C80801836FB3B001BD0
+:1006E000FE92FF62580BC070300B3FFCFEB0FEC69E
+:1006F000681C18433FFB301CFEB0FE20069C6813AC
+:100700001843402B1636FE93FF5C5C360E06FC1C2D
+:10071000808018060C97FC168080C52B8913405CDE
+:100720002FCDDC72E06C00A0EA1C0000782B760A6A
+:1007300015BC2FEAF5DC50005CCCE06B00A0EA1B96
+:100740000000762A740B5C7C160C5EFCD421189693
+:100750001697CE9F0D8B16061836C0920D9B584BE0
+:10076000C060F6071800CF710C9CD822D82A000070
+:10077000D42118961697E06C00B0EA1C0000198B83
+:10078000580BC021D82AE06500A0EA1500006A2BAA
+:10079000760C19CBF6061800CF628B3CCC4FC048C4
+:1007A000178A140B8B3B6A3B183BCED2179A584AD8
+:1007B000CF8117AAF4061800CF4117BAF407180022
+:1007C000CF01DA2AD4211897E0660770EA16800074
+:1007D000300B5D16C021D82AE06500A0EA150000A4
+:1007E0006A2C781BF6070F84683C5D1C189B0E9CD6
+:1007F0005D16CF206A3C305BCAAFCFE1681C5D1C40
+:10080000DA2A0000D4211897CB4FC021D82AE066FD
+:1008100000A0EA160000305B6C3CC99FCF816C2CB5
+:10082000781BF6070F8CF01C00005F1CD82200001C
+:10083000D421E06700A0EA170000E06600B0EA16E5
+:1008400000000D8C580CC0C03005C0580A9CCBBFAE
+:100850002FF55C556E2C780B17CC1835CF85300CE6
+:10086000AC8CAE1CD82A0000D401E06B0910EA1B46
+:100870000000969C5C5CE0A0096DD80A80001B50CB
+:10088000E06B0910EA1B0000969AF3DAC008E068F2
+:10089000008CEA180000F40C1608201CC060201C14
+:1008A000C080201CC1805EFD700C972C198AC21874
+:1008B000700CF93A00111439C0255EFD701CF8095E
+:1008C000033A972AF809033C19BA2FECF9DA5000D9
+:1008D0005CCAC0F8E06C0014EA1C00005C5A147A90
+:1008E000C060201AC0D0201AC0E05EFD304A972CAC
+:1008F00096BCF40C1900F80A1730B66A5EFF2FCCCC
+:1009000030CACF6B2F0C308ACF3B0000D431E06669
+:100910000910EA1600000D8BE06400B0EA14000034
+:10092000098CE06700A0EA170000EDBB0007C502D4
+:100930008CBAF4091510C021D83AF7DBC00530296C
+:100940003015C1810D9C187CC060206CC0B0202C7B
+:10095000C0B0D83A582AC020D83A2FE78D27AC69C2
+:10096000DA3AC8FFD832581AC020D83A8D24AC657C
+:10097000DA3A581BC1F10D9B58ABCDF1581AC02083
+:10098000D83AF80B1518CFD08CA45C546E2C780B89
+:1009900017CC1834CF64300B089CCEBECF206E2C01
+:1009A000781BF604032C783B5D1BAE8C8D27AC6561
+:1009B000DA3A582BCC210D9C580CCBF1582AC02088
+:1009C000D83A300CAE2C2FC78D27AC69DA3AF7DB5A
+:1009D000C005E0650804EA158000580BC4F10D9CC1
+:1009E000201CC140202CCA90202CC060202CCA5052
+:1009F000202CC180D83A8CBC580CC020D83AE06C6E
+:100A00000868EA1C80008D4CDA3A8CBC580CC02077
+:100A1000D83A8C9C581CCFD18E9CE21CFDFFAE1C9A
+:100A2000DA3A8CBC580CC020D83AE0A008EBCFD002
+:100A3000E063008CEA130000660CF93B00118C9C0B
+:100A4000F80B1800CF23CF5E8C9CA88C5C5CF80B55
+:100A50001518C021DA3A661BF60C003B208B8F2B51
+:100A600030066E2C780B17CC1836CF54300B0C9CFC
+:100A70005D15CDB02FF65C56CF5B581BFE91FF5E27
+:100A80000D9B58BBFE91FF5A8CBB580BC030300CED
+:100A9000C0E8F80B1518CFC08CA45C548C975C5739
+:100AA000089CC91ECF500E9B089C5D155C5CD8321B
+:100AB00080001C00D421300CE0670910EA17000008
+:100AC000AE6C8F4C8F5C0F8CEDBC0007C0528EBBA0
+:100AD000580BC021D82AE21C0060C041C18FC02041
+:100AE000DA2A0F8CF9DCC005581CCF51E06C00B03D
+:100AF000EA1C0000198B580BCEE08EA65C56E0670E
+:100B000000A0EA1700006E2C780B17CC1836CE34F4
+:100B1000E0650770EA158000300B0C9C5D15CDB0C8
+:100B20006E2C781BF60603276E3C5D1CF7DCC008B4
+:100B30000C9C5D15CD006E2C5D1CCD31D82A0000BB
+:100B4000FE6C01F0304B990B302B990BE06C1000D0
+:100B5000FE6B0018970C300CE06B0910EA1B0000CC
+:100B6000974C975CB66C976C5EFD0000D421E067F3
+:100B70000910EA1700006E6C580CC070583CC03069
+:100B8000584CC021C32DCDDF3046FE6C0130780BB0
+:100B9000E61B7FF0FC1C0080183BC1D1FC1CE00070
+:100BA000300B193AEE0B0B0A2FFB588BCFB58E9CEE
+:100BB0005CCCAE1C8EAC5CCCAE2C8EBC5CCCAE3CAB
+:100BC000FE6501F0FEB0FF78C0A1305C8F6CE86C70
+:100BD00000008B0CFE6C013099C6D82AFE6C0130E7
+:100BE00099C68EECF9DCC006F80B15105F0CE06BB3
+:100BF000092CEA1B0000B68C300C0F8AA98AC0723F
+:100C0000B61CB62C302C8F6CC14CD82A8EBA580A20
+:100C1000C031CD9CD82AB61CB62C301C8F6C310C40
+:100C2000FE6B013097CC8B0CD82AD70380000AB416
+:100C3000D4313017FE6C01F099C7E0660910EA164E
+:100C400000006C6CE0650B40EA158000583CC04128
+:100C5000CCCC5D15D83A582CC0305D15D83A8CEB09
+:100C6000E065092CEA1500008AAC162C5C7CFE6459
+:100C70000160FE6301F0C2310B8C580CC071304C26
+:100C80008D6C310C890C870CD83A30028A9C180B79
+:100C90008CBC183BC0656C5C580CC0305D1CC0310E
+:100CA000AA82C2188AAC8A9B180BAA1BAA228CECB7
+:100CB000F7DCC006F60A15105F0BAA8BE04C00416A
+:100CC000F9BC0440FC1BE0006C298AAA120A300916
+:100CD000C058153816C82FF95C591839CFB58AABEA
+:100CE000180BAA2B87078907308C890C870CD83AF8
+:100CF000D421E0670910EA1700006E6C3026584CCA
+:100D0000C071FE6C013099C6C70CC1BFD82AFE6500
+:100D100001F0581CC0A0305C8F6CE86C00008B0C9C
+:100D2000FE6C013099C6D82AFE6B0130760CF9DCD6
+:100D3000C28BE064092CEA14000088AB169A8EE995
+:100D4000F60C00081039C044F20B010C5C7CFC1B53
+:100D5000E0006E29120A3009C058173814C82FF95C
+:100D60005C591839CFB588AB180BA82BE04C004064
+:100D7000C081F9DBC010889B180B8EBA143BC0B53C
+:100D80006E5C580CC0305D1CCC70FE6C013099C696
+:100D9000C1ACD82A8EEBF80B1900C0C16E5C580CA0
+:100DA000CBB05D1CCB9088AC889B180BA81B300C7B
+:100DB000A82CFE6C013099C6310CFE6B013097CC2B
+:100DC0008B0CD82A303CE06B0910EA1B0000976CB2
+:100DD000FE6C01F0301B990BFE6A0160950B308BA5
+:100DE000950B990B5EFD0000D401E06B0910EA1B26
+:100DF0000000764C580CC0205D1CD80AEC5BBBA0F0
+:100E0000C032304BC118E06AC6C0EA1A002D143B4C
+:100E1000C032305BC098E06A1200EA1A007A143BD4
+:100E2000306BF9BB020778AAE01AFFF8F7DBC003C2
+:100E3000144B99AB5EFD0000D4211897C0AC6F5CD9
+:100E4000A98CCFE2D82A0000780BA3CB990B5EFDCA
+:100E500078AAE01AF8FFA96BE21B0700144B99ABC4
+:100E6000780BA3AB990B5EFD78CBE01BF8FFA9AB29
+:100E700099CB5EFDD4211897C06C6F5CAB8CCFE230
+:100E8000D82A000078C9E419FFF8E67A0000F5EBEB
+:100E9000010B124BA1AB99CB5EFD0000D421189E33
+:100EA00040574066E06C1D00EA1C80007805E015A4
+:100EB0007878E4157878F9D6C0031845EE0C150754
+:100EC000E21C00801845A966E21607000A46AF77C3
+:100ED000E21780000C47E67C0000F9EA010A0E4A9E
+:100EE000B77BE61B0080144BB968E6180700104B6F
+:100EF000F7E911FB9D1B7D5CA78CCFE2D82A00008F
+:100F0000D421E0671CF8EA1780006E0EE01E00ECAA
+:100F1000F3D9C0011C49302EFDEA001A124A3109EA
+:100F2000F3E80048104A4058A968E218FF00104A48
+:100F3000F80B002CF94A0060D82A0000F80B002CAE
+:100F4000798BA3ABF94B00605EFD0000F80B002C21
+:100F5000798BA3CBF94B00605EFD0000D421E06EDD
+:100F60001CFCEA1E80007C07E017F0FDE417C0F0CF
+:100F7000302EFDE800180E48A969E2190F0010494B
+:100F8000EE780000F1EA010A124A4058B968E61802
+:100F90003F00104AF80B002C998AD82AD401F80B8C
+:100FA000002C788EE01EFFE3F5E9101AF5E8102A10
+:100FB00031CBF7EA002A1C4A998AD80AF80B002C90
+:100FC000788BA1AB998B5EFDF80B002C788BA1CBB5
+:100FD000998B5EFD795BA19BCFE25EFD780AE01AFA
+:100FE000FFFCF7DBC002144B990B5EFDD421189671
+:100FF0001497C05F0E9B0C9CC20F301B0C9CCEFF45
+:10100000D82A0000D431201D3007E06608FCEA161B
+:1010100000008D27E0650910EA1500008B578B470B
+:10102000E06400B4EA140000A887302CA8CCE06388
+:1010300000BCEA13000007AC0DCBE06A19C0EA1A45
+:10104000800030A207892019C0802029C1F0201912
+:10105000C4A02029C680C3E8F60C1518C3E1E6CC6D
+:10106000FFFE5D1AC370079C580CC341E06C00FC86
+:10107000EA1C00008B2CE06C0800AA6CE06C18885D
+:10108000EA1C80008B5C301CC2C8F60C1518C251DB
+:10109000E6CCFFFE5D1AC1E0E06C003CEA1C0000FB
+:1010A0000DDBF80B0F8A741C580CC031303CC16842
+:1010B000079C187CC040201CC080C0C8E06C1A1C73
+:1010C000EA1C80008D2CCE0BE06C17FCEA1C800023
+:1010D000CFAB098C580CC04130FCA88CA8C2300C96
+:1010E0002FFDD832079B167BC040203BC0C0CF5B92
+:1010F000E04C00FFCF21E0A00559C030ACC7CC4B7D
+:10110000304CCECB187CC040201CC080CE6BE06C35
+:101110001604EA1C80008D3CCB7BE06C1628EA1C90
+:101120008000CFABF60A1518CD81079B583BCD51F7
+:1011300007BB189A187CC040201AC090CCEB587C92
+:10114000C044ACDB8D07CA0B308CCC8B300C500C00
+:10115000BA8B07CCBA9C400BE06C003CEA1C000048
+:101160000DDAF80A0F89720C183BCEF28D0BC8CB42
+:1011700080001BA8D421202D306AE06B2400EA1BDC
+:1011800000F4FE7C0C00FEB0FF33300A300BFE7C16
+:101190000D00E0A002EFFE7C0D00E0A0031FE0A028
+:1011A00001BD33FC500C30083009303A300BFE7C66
+:1011B0000C00FEB0FED530083019301A300BFE7C22
+:1011C0000C00FEB0FEED300BFE7C0C00FEB0FEF815
+:1011D000FE7C0C00FEB0FF00E0660318EA168000FB
+:1011E000301C5D16302BFE7C0C00FEB0FEF9301A70
+:1011F000301BBB1B30183019FE7C0C00FEB0FE50BB
+:10120000300C5D162FEDD82A80000FEC800017708F
+:10121000800017D88000151880000FBC80000FD404
+:10122000D421202DE0670318EA178000301C5D17D9
+:10123000300A300BBB1B30083009FE7C0C00FEB0BE
+:10124000FE2F300BFE7C0C00FEB0FECA300C5D178A
+:10125000300BFE7C0C00FEB0FEB930083009300ABD
+:10126000300BFE7C0C00FEB0FE9B300C500C3008A6
+:101270003009300A300BFE7C0C00FEB0FE71300BE2
+:10128000FE7C0C00FEB0FDE6FE7C0C00FEB0FDDE38
+:10129000FE7C0C00E0A004D42FEDD82A80000E9C28
+:1012A00080000FDC80000FC880000F9C80000F5C66
+:1012B00080000E5080000E4880001C3CD401300994
+:1012C000FC188000100CFEB0F92BD80AD421189716
+:1012D000F40C1510C040FEB0F859AE8CD82AD703D4
+:1012E00080000388D401F40C1510C060178C580CD2
+:1012F000C030FEB0F851D80A80000394D42118956C
+:1013000016971496C0680E9CFEB0F8722FF70ACCA0
+:101310000C9CFE360001F80B1510CF61D82AD703BC
+:10132000800003ECD421189616951497C0680B3BE7
+:101330000C9CFEB0F8872FF60E9CFE370001F80BD0
+:101340001510CF61D82AD70380000440E06900104F
+:10135000EA190000F60B001B16091898580A5E0DD2
+:10136000133B201A10CBCFD15EFD0000E06900983E
+:10137000EA190000F20B00291898580A5E0D133B79
+:10138000201A10CBCFD15EFDFC198080120B18986B
+:10139000580A5E0D1739201A10C9CFD15EFD000022
+:1013A000D4013019FC188080100CFEB0F8B9D80AAE
+:1013B0008000051CE06C0098EA1C0000358BB88B9F
+:1013C000320BB89BE1BB0040B98BB8ABE1BB00402E
+:1013D000F7DBC204B8BB5EFDD401201D301A300B10
+:1013E0001A9CC75F1B8B580B5F1C2FFDD802000097
+:1013F000D401C81CFEB0FFE0FEB0FFF0E06B08FCBB
+:10140000EA1B0000B6CCDA0A800013B4800013D8BF
+:101410005EFD0000D401E06C0910EA1C0000198A8E
+:10142000149BE21B0060E04B0020C020D80A1999F1
+:10143000E06808FCEA180000E06B00B4EA1B00005A
+:10144000A98AC2522029C1B02019C0402029C0C099
+:10145000C4B8989A580AC48198BA586AC451992B4A
+:10146000306BB86BDA0A989A580AC3E198BA581ADE
+:10147000C3B12FCB992B301BB86BDA0A17CC58AC01
+:10148000C330702C580CC3005D1CD8022019C10059
+:101490002039C0602029C28117CA58AAC250989A20
+:1014A000580AC22198BA580AC1F1C25CDA0A17CAAE
+:1014B00058AAC1A0703A580AC070E06B1B90EA1B92
+:1014C0008000994BDA0A98BA580AC0E0E06B00BC79
+:1014D000EA1B0000992B340BB86BE06B1004EA1B7D
+:1014E0008000995BDA0A30FCB68C30ACB6CCD80AF6
+:1014F0005EFD0000300CE06B00B4EA1B0000B68C0F
+:10150000302AB6CAE06B08FCEA1B0000B6DC970C78
+:10151000972C973C5EFD0000D431205DFACCFFF89B
+:10152000E06B1CECEA1B8000B709B928170818A863
+:101530003FF73FF4E0661BECEA1680005D16E0A082
+:10154000034D501CE0651C48EA1580005D15E0A0C5
+:10155000038118905D165D15300330053006C21802
+:101560001830C1F4401B0A3BC1C41615F80001062F
+:10157000EC0B141FE072C138EC020648F602034976
+:10158000109A129B0A98EA09141FE0A002B714935C
+:10159000580AC070400C141C5C4CE04C2711C1254B
+:1015A00050030A920C91E0A003191895E0A0035291
+:1015B00018960435C035023CCD445803C031300C78
+:1015C000C198300CFACAFFF8F40C032B062B083B29
+:1015D000F6041730F80717302FFC583CCF435BF761
+:1015E000C041F9D3C008C068FACBFFF8F607032C56
+:1015F0005C5C2FBDD832D70380001AF880001BD85E
+:1016000080001C50D401300CC24CD303FE7C0D3042
+:10161000E06B0A01EA1B5500990BE06B0A01EA1B1B
+:10162000AA00990BC0080000D401300CC12CFEB0F8
+:10163000FDF9300CE3BC0042E1BC0042E04C048008
+:10164000CFC3FEB0F54CD80A80001220800000DA2B
+:10165000D4211897300CE06B01FCEA1B8080EE0A65
+:101660001518C040760AAB8AC373760AA9DAF5E783
+:101670001097318BEE0B0A4A5C5A145CA96C5C7CA7
+:10168000308AEDBC000FC042EC1C83805C7CA17CE6
+:101690005C7C201ACF71A98C208BCED1E017FF0083
+:1016A0001847FC168080FEB0F6D737FC6C0B0CABED
+:1016B000201CCFD1E06B01FC169C6C0A163CEE0A94
+:1016C00017000CAA2FCCE04C0200CF85300CFEB0E6
+:1016D000F713FEB0F71FD82A80000454800004F4EA
+:1016E00080000510D421E0A0013FE1B70000D30342
+:1016F000FE6608006C0CAFDC8D0C6C0C300AE06BE5
+:101700000220E06C013CEA1C8000E0A002336C0C7B
+:10171000B9BC8D0C6C0CB9CC8D0C6C0CADCC8D0C9B
+:101720006C0CADAC8D0C6C0CAFBC8D0C6C0CAFCCE0
+:101730008D0C6C0C6C1BAF9BCFE2FE6C0000780B29
+:10174000ADCB990B780BE81B0C00990B6C0CA1BC72
+:101750008D0C6C0CAFAC8D0CFE7C0D44780BA1ABEA
+:10176000990BE3B70000D82A8000196480001B7031
+:10177000D421189616951497582BC034590AC025B1
+:10178000D82A581BC0A1FE7C0C00FEB0FB6F300BAA
+:10179000FE7C0C00FEB0FB706C0CA59CCFE3A37527
+:1017A000EBE71085B1A58D056C0CA59CCFE3300B44
+:1017B0000C9CC09C3FFB0C9CC1ACDA2A80000E68DC
+:1017C00080000E74780AA59ACFE3991B780BA59B2D
+:1017D000CFE35EFD781B5EFB780BA59BCFE3780B18
+:1017E000A1AB990B780BA59BCFE35EFD780AA59A78
+:1017F000CFE3992B780BA59BCFE35EFDD431E06757
+:1018000008FCEA170000E066003CEA1600000FDC66
+:10181000EC0C0F8BF735000CE06300FCEA130000C2
+:101820006E4C580CC250E06B0800F80B0D445C7411
+:10183000081C8F4C089A6E0B069C0FD9EC090F8878
+:1018400070195D19069CC0486E0B2FFB8F0B089B0F
+:10185000FE3400015C74F60A1510CE30193B0A3BC9
+:10186000CF40305CE06B00B4EA1B0000B68C0FACDC
+:10187000A68C0FBCA69CE06C0910EA1C0000992302
+:10188000302BB86BDA3A0000D421E06508FCEA1589
+:1018900000006A0BF7DBC0066A4C160C8B4CE06745
+:1018A0000800F8070D4C5C7CF80B01045C746A4A74
+:1018B000181A8B4AE06600FCEA160000580CC100BA
+:1018C000089A0C0B6A0CE069003CEA1900000BD87E
+:1018D000F2080F8E7C295D196A0C080C8B0CE06CE9
+:1018E0000910EA1C00009926B867E06B1888EA1B0B
+:1018F0008000995BDA2A0000EBCD40FEE06C1D040D
+:10190000EA1C8000E06E1D1CEA1E8000300A300BCD
+:10191000190719061905EFE61003E7D3C002C1C184
+:10192000EA041603C1900C37C090AF092014AD280B
+:10193000CFD1EBD5C003C121C0B82014AD2ACFE16F
+:10194000EBD5C003C050300220150CC2CFD11C3CD7
+:10195000CE03E3CF80FE0C37CF700F3120150CC1C2
+:10196000CEBB0000D421201D300C500C30083009B3
+:10197000301A304BFE7C0C00FEB0FAC4304BFE7CBB
+:101980000C00FEB0FADD2FFDD82AD70380000F3CF3
+:10199000D421201D304BFE7C0C00FEB0FAD9300C57
+:1019A000500C30083009300A304BFE7C0C00FEB081
+:1019B000FAA92FFDD82AD70380000F4C80000F0012
+:1019C000D401201DE06B08FCEA1B0000760A500AD7
+:1019D000198AB6AA199AB6BA19AABAAA19BABABA73
+:1019E000760C1B091839C0B3E06A003CEA1A000003
+:1019F00017D8F4080F8E7C0A1439C0B3E06C00B419
+:101A0000EA1C0000308BB88B30ABB8CB300CD8025E
+:101A1000122C2FFC974C301CD8020000D421E06718
+:101A200008FCEA170000E06C08006E4BF60C0D464F
+:101A30005C76F606010C8F4CE06500FCEA150000B0
+:101A40000C9A6E0B0A9CE069003CEA1900000FD862
+:101A5000F2080F8E7C195D196E0C0C0C8F0CE06C6B
+:101A60000910EA1C00009925B866E06B1A1CEA1BF5
+:101A70008000995BDA2A0000D421E1BC0000D30386
+:101A8000FE6B0800760AAFCA970A308AFE6900002A
+:101A9000932A3049FE6800009129301991293108B4
+:101AA000FE6E00009D287C07A9C79D079D6A9D6961
+:101AB0009D68760AAFAA970AE3BC0000D82A000006
+:101AC000D401D503FEB0FB58E0A000A8E0A000A020
+:101AD000C031E0A000A9C0088000117480001C186B
+:101AE00080001C0CD401F80B1518C030E0A0009C3D
+:101AF000D80AD70380001C24EBCD4080340C30077B
+:101B0000300EA17A5CFB5CFE5CF7103EF20713001E
+:101B1000C053101EEE090147A1AA201CCF310E9917
+:101B20001C98E3CD80800000D401E1BC0000D30309
+:101B3000FE6B0800760AAFDA970A760AADCA970AF2
+:101B4000E3BC0000FEB0FF26D80AD703800019903E
+:101B5000FE6B0000760AA7DA970A760AE01AFF8081
+:101B6000F9DCC007144C970C760CA7BC970C5EFDF3
+:101B7000E0690000EA198000121CF9DCC00EF9EAE5
+:101B800011ECFE7A0800A59BF40B092C5EFD000009
+:101B9000D401E0A0004FE06C08FCEA1C0000783B98
+:101BA0005D1BD80A80001C30D401300CFEB0F40E4E
+:101BB000300CFEB0F47BDA0A800003C8800004A871
+:101BC000FC198000120B1898580A5E0D1739201A5C
+:101BD00010C9CFD15EFD0000D401FE7C0D00FEB027
+:101BE000FDFBA17CD802D703800017D4D401300BB1
+:101BF000FE7C0D00FEB0FDE8D80AD703800017C4B4
+:101C0000FE6B0000760CF9DCC0075EFCD401E0A09E
+:101C10000025D80280001C58D401FEB0FD65D80A0A
+:101C2000800016E4D401FEB0FF29D80A80001A789B
+:101C3000D401FEB0FF7BD80A80001B2878ABE01BE4
+:101C4000FFF899AB5EFD0000300CE3BC00425EFD86
+:0A1C5000E1BC00425EFC00005EFFF4
+:101C5C0000008000000100000002000000040000F1
+:101C6C000006000000080000000C0000001000003E
+:101C7C000000020080001388800013A0FF00000009
+:101C8C000008000080001BC0800012BCFF00000098
+:101C9C000000000000000000000000000000000038
+:101CAC0000000001800012CC800012E40000000053
+:101CBC0000000020800012FC8000132401000000B2
+:101CCC00000000038000134C000000000000000026
+:101CDC00000000048000136C0000000000000000F5
+:101CEC00007A120000B71B0000F424000000000072
+:101CFC00000000000000000080001D200000000813
+:101D0C000000008C00000098000000980000089A69
+:101D20008000032C000000001000000004030904E0
+:101D30000C03410054004D0045004C0008034400D2
+:101D400046005500800013F0800014108000141429
+:101D5000800014F080001C8C80001C9C80001CAC57
+:101D600080001CBC80001CCC80001CDC80001C7C23
+:101D70001201000200000040EB03F82F00010102F5
+:101D800000010000090212000101008002090400A4
+:101D900000000000000000000000002C0000006CAB
+:0C1DA000000000800000005800000084DB
+:040000058000000077
+:00000001FF
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3a0_a1/iar/lnkat32uc3a-isp.xcl b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3a0_a1/iar/lnkat32uc3a-isp.xcl
new file mode 100644
index 0000000..2cbf9df
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3a0_a1/iar/lnkat32uc3a-isp.xcl
@@ -0,0 +1,150 @@
+/******************************************************************************
+ * AVR32 AT32UC3A ISP XLINK command file for AVR32 IAR C/C++ Compiler.
+ *
+ * The assumed memory layout is the one of the AT32UC3A0512:
+ *
+ * Start Stop Name Type
+ * ---------- ---------- ----- --------------
+ * 0x00000000 0x0000FFFF SRAM RAM
+ * 0x80000000 0x8007FFFF FLASH FLASH
+ * 0x80800000 0x808001FF USER FLASH
+ *
+ * Usage: xlink your_file(s) -f xcl-file libraries
+ *
+ * - Compiler: IAR EWAVR32
+ * - Supported devices: AVR32 AT32UC3A
+ *
+ * - author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+/************************************************************************/
+/* The following segments are defined in this link file: */
+/* */
+/* Code segments */
+/* CODE32 -- Program code used by __code32 functions. */
+/* RESET -- Reset code. */
+/* EVSEG -- Exception vector handlers. */
+/* */
+/* Constant segments */
+/* INITTAB -- Segment initializer table. */
+/* DIFUNCT -- Dynamic initialization vector used by C++. */
+/* SWITCH -- Switch tables. */
+/* ACTAB -- Table of pointers to acall functions. */
+/* */
+/* DATA21_ID -- Initialization data for DATA21_I. */
+/* DATA32_ID -- Initialization data for DATA32_I. */
+/* DATA32_C -- Constant __data32 data. */
+/* */
+/* CHECKSUM -- Checksum segment. */
+/* */
+/* Data segments */
+/* DATA21_I -- Initialized __data21 data with non-zero */
+/* initial value. */
+/* DATA32_I -- Initialized __data32 data with non-zero */
+/* initial value. */
+/* DATA21_Z -- Initialized __data21 data with zero initial value. */
+/* DATA32_Z -- Initialized __data32 data with zero initial value. */
+/* DATA21_N -- Non-initialized __data21. */
+/* DATA32_N -- Non-initialized __data32. */
+/* SSTACK -- The system stack. */
+/* CSTACK -- The application stack. */
+/* HEAP -- The heap used by malloc and free. */
+/* */
+/************************************************************************/
+
+/************************************************************************/
+/* Define CPU */
+/************************************************************************/
+
+-cavr32
+
+/************************************************************************/
+/* Reset code is located at address 0x80000000 and up. */
+/************************************************************************/
+
+-Z(CODE)RESET=80000000-8007FFFF
+
+/************************************************************************/
+/* The exception handler code is located at address 0x80000000 */
+/* and up. Make sure that the exception table gets properly */
+/* allocated. By using the special -Z@ allocation primitive, the */
+/* placement is guaranteed to be at _EVBASE and onwards. */
+/************************************************************************/
+
+-Z@(CODE)EVTAB=80000000-8007FFFF
+-Z@(CODE)EV100=80000100-8007FFFF
+-P(CODE)EVSEG=80000000-8007FFFF
+
+/************************************************************************/
+/* Allocate code and const segments. */
+/************************************************************************/
+
+-P(CODE)CODE32=80000000-8007FFFF
+-P(CONST)DATA32_C=80000000-8007FFFF
+-P(CONST)USERDATA32_C=80800000-808001FF
+
+// Initializers
+-Z(CONST)INITTAB,DIFUNCT=80000000-8007FFFF
+-Z(CONST)CHECKSUM,SWITCH=80000000-8007FFFF
+-Z(CONST)DATA21_ID,DATA32_ID=80000000-8007FFFF
+-Z(CONST)RAMCODE21_ID,RAMCODE32_ID=80000000-8007FFFF
+
+-Z(CONST)ACTAB,HTAB=80000000-8007FFFF
+
+/************************************************************************/
+/* Allocate the read/write segments that are mapped to RAM. */
+/************************************************************************/
+
+-Z(CODE)RAMCODE21=00000004-0000FFFF
+-Z(DATA)DATA21_I,DATA21_Z,DATA21_N=00000004-0000FFFF
+-Z(CODE)RAMCODE32=00000004-0000FFFF
+-Z(DATA)DATA32_I,DATA32_Z,DATA32_N=00000004-0000FFFF
+-Z(DATA)TRACEBUFFER=00000004-0000FFFF
+
+-Z(DATA)HEAP+_HEAP_SIZE=00000004-0000FFFF
+-Z(DATA)CSTACK+_CSTACK_SIZE=00000004-0000FFFF
+-Z(DATA)SSTACK+_SSTACK_SIZE=00000004-0000FFFF
+
+/************************************************************************/
+/* Copy the RAMCODE bytes to the initializer segments. */
+/************************************************************************/
+
+-QRAMCODE21=RAMCODE21_ID
+-QRAMCODE32=RAMCODE32_ID
+
+/************************************************************************/
+/* End of File */
+/************************************************************************/
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3a0_a1/iar/usb_device_dfu_isp.ewp b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3a0_a1/iar/usb_device_dfu_isp.ewp
new file mode 100644
index 0000000..64839c6
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3a0_a1/iar/usb_device_dfu_isp.ewp
@@ -0,0 +1,934 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+
+<project>
+ <fileVersion>2</fileVersion>
+ <configuration>
+ <name>Release</name>
+ <toolchain>
+ <name>AVR32</name>
+ </toolchain>
+ <debug>0</debug>
+ <settings>
+ <name>General</name>
+ <archiveVersion>4</archiveVersion>
+ <data>
+ <version>6</version>
+ <wantNonLocal>1</wantNonLocal>
+ <debug>0</debug>
+ <option>
+ <name>CoreRevisionSlave</name>
+ <version>1</version>
+ <state>1</state>
+ </option>
+ <option>
+ <name>ProcessorCoreDyn</name>
+ <state>at32uc3a0512</state>
+ </option>
+ <option>
+ <name>ProcessorCoreSlave</name>
+ <state>at32uc3a0512</state>
+ </option>
+ <option>
+ <name>CodeModel</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>DataModel</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>EnableSimdInstructions</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>EnableDspInstructions</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>EnableRmwInstructions</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>GAllowUnaligned</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>GOutputBinary</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>ExePath</name>
+ <state></state>
+ </option>
+ <option>
+ <name>ObjPath</name>
+ <state>Release\Obj</state>
+ </option>
+ <option>
+ <name>ListPath</name>
+ <state>Release\List</state>
+ </option>
+ <option>
+ <name>GRuntimeLibSelect</name>
+ <version>0</version>
+ <state>2</state>
+ </option>
+ <option>
+ <name>GRuntimeLibSelectSlave</name>
+ <version>0</version>
+ <state>2</state>
+ </option>
+ <option>
+ <name>RTDescription</name>
+ <state>Use the full configuration of the C/EC++ runtime library. Full locale interface, C locale, file descriptor support, multibytes in printf and scanf, and hex floats in strtod.</state>
+ </option>
+ <option>
+ <name>RTLibraryPath</name>
+ <state>$TOOLKIT_DIR$\lib\dlavr32allasf.r82</state>
+ </option>
+ <option>
+ <name>RTConfigPath</name>
+ <state>$TOOLKIT_DIR$\lib\dlavr32allasf.h</state>
+ </option>
+ <option>
+ <name>Input variant</name>
+ <version>0</version>
+ <state>1</state>
+ </option>
+ <option>
+ <name>Input description</name>
+ <state>No specifier n, no float.</state>
+ </option>
+ <option>
+ <name>Output variant</name>
+ <version>0</version>
+ <state>1</state>
+ </option>
+ <option>
+ <name>Output description</name>
+ <state>No specifier a or A.</state>
+ </option>
+ <option>
+ <name>GUnhandledInterrupts</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>GUnhandledExceptions</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>GTraceBufferSize</name>
+ <version>0</version>
+ <state>0</state>
+ </option>
+ <option>
+ <name>GSStackSize</name>
+ <state>0x0400</state>
+ </option>
+ <option>
+ <name>GCStackSize</name>
+ <state>0x0000</state>
+ </option>
+ <option>
+ <name>GHeapSize</name>
+ <state>0x0004</state>
+ </option>
+ <option>
+ <name>GeneralEnableMisra</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>GeneralMisraVerbose</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CoreRevision</name>
+ <version>1</version>
+ <state>1</state>
+ </option>
+ <option>
+ <name>GTraceSelect</name>
+ <version>0</version>
+ <state>0</state>
+ </option>
+ <option>
+ <name>GTraceBufferFull</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>GeneralMisraVer</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>GeneralMisraRules04</name>
+ <version>0</version>
+ <state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
+ </option>
+ <option>
+ <name>GeneralMisraRules98</name>
+ <version>0</version>
+ <state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
+ </option>
+ <option>
+ <name>GEnableNanoTrace</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>EnableFpuInstructions</name>
+ <state>0</state>
+ </option>
+ </data>
+ </settings>
+ <settings>
+ <name>ICCAVR32</name>
+ <archiveVersion>7</archiveVersion>
+ <data>
+ <version>8</version>
+ <wantNonLocal>1</wantNonLocal>
+ <debug>0</debug>
+ <option>
+ <name>CCDefines</name>
+ <state>BOARD=DUMMY_BOARD</state>
+ </option>
+ <option>
+ <name>CCPreprocFile</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCPreprocComments</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCPreprocLine</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCListCFile</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCListCMnemonics</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCListCMessages</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCListAssFile</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCListAssSource</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCEnableRemarks</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCDiagSuppress</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CCDiagRemark</name>
+ <state>Pa082</state>
+ </option>
+ <option>
+ <name>CCDiagWarning</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CCDiagError</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CCCore</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCCodeModel</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCDataModel</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCObjPrefix</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCRequirePrototypes</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCMultibyteSupport</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCMigrationPreprocExtentions</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCExt</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCCharIs</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCAllowList</name>
+ <version>0</version>
+ <state>1111111</state>
+ </option>
+ <option>
+ <name>CCObjUseModuleName</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCObjModuleName</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CCDebugInfo</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCDiagWarnAreErr</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCCompilerRuntimeInfo</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>OutputFile</name>
+ <state>$FILE_BNAME$.r82</state>
+ </option>
+ <option>
+ <name>CCLangSelect</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCLibConfigHeader</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>PreInclude</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CompilerMisraOverride</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCIncludePath2</name>
+ <state>$PROJ_DIR$\..\</state>
+ <state>$PROJ_DIR$\..\..\</state>
+ <state>$PROJ_DIR$\..\..\..\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\common\utils\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\common\boards\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\utils\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\utils\preprocessor\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\boards\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\drivers\gpio\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\drivers\pm\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\drivers\flashc\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\drivers\rtc\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\drivers\cpu\cycle_counter\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\drivers\usbb\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\services\basic\freq_detect\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\common\services\basic\clock\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\common\services\usb\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\common\services\usb\udc\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\common\services\usb\class\dfu\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\common\services\usb\class\dfu\device\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\common\services\usb\class\dfu\device\atmel\</state>
+ </option>
+ <option>
+ <name>CCStdIncCheck</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCStdIncludePath</name>
+ <state>$TOOLKIT_DIR$\INC\</state>
+ </option>
+ <option>
+ <name>IExtraOptionsCheck</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>IExtraOptions</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CCModuleTypeOverride</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCModuleType</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCOptLevel</name>
+ <state>3</state>
+ </option>
+ <option>
+ <name>CCOptStrategy</name>
+ <version>0</version>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCOptLevelSlave</name>
+ <state>3</state>
+ </option>
+ <option>
+ <name>CompilerMisraRules04</name>
+ <version>0</version>
+ <state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
+ </option>
+ <option>
+ <name>CompilerMisraRules98</name>
+ <version>0</version>
+ <state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
+ </option>
+ <option>
+ <name>CCFPIMPLLIST</name>
+ <version>0</version>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCFPIMPL description</name>
+ <state>Use the space efficient but slower implementation unless another module uses the fast implementation.</state>
+ </option>
+ </data>
+ </settings>
+ <settings>
+ <name>AAVR32</name>
+ <archiveVersion>2</archiveVersion>
+ <data>
+ <version>0</version>
+ <wantNonLocal>1</wantNonLocal>
+ <debug>0</debug>
+ <option>
+ <name>AObjPrefix</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>ACore</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AEnableRemarks</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>ADiagSuppress</name>
+ <state></state>
+ </option>
+ <option>
+ <name>ADiagRemark</name>
+ <state></state>
+ </option>
+ <option>
+ <name>ADiagWarning</name>
+ <state></state>
+ </option>
+ <option>
+ <name>ADiagError</name>
+ <state></state>
+ </option>
+ <option>
+ <name>ADiagWarnAreErr</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>APreprocFile</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>APreprocComments</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>APreprocLine</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>ADefines</name>
+ <state>BOARD=DUMMY_BOARD</state>
+ </option>
+ <option>
+ <name>AIncludePaths</name>
+ <state>$PROJ_DIR$\..\</state>
+ <state>$PROJ_DIR$\..\..\</state>
+ <state>$PROJ_DIR$\..\..\..\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\utils\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\utils\preprocessor\</state>
+ </option>
+ <option>
+ <name>AListFile</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>ACrossReference</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>AMacDefs</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>AMacExps</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AOnlyAsmed</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>ANoDiagnostics</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AListOptions</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AMnemonicFirst</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>ADirectiveFirst</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>ACaseSensitivity</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>ADebug</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>AMacroChars</name>
+ <version>0</version>
+ <state>0</state>
+ </option>
+ <option>
+ <name>OutputFile</name>
+ <state>$FILE_BNAME$.r82</state>
+ </option>
+ <option>
+ <name>ATruncateLine</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>IExtraOptionsCheck</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>IExtraOptions</name>
+ <state></state>
+ </option>
+ <option>
+ <name>AModel</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AMultibyteSupport</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AOverrideStandardPaths</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AStandardIncludePaths</name>
+ <state>$TOOLKIT_DIR$\INC\</state>
+ </option>
+ </data>
+ </settings>
+ <settings>
+ <name>JAVATOC</name>
+ <archiveVersion>0</archiveVersion>
+ <data/>
+ </settings>
+ <settings>
+ <name>CUSTOM</name>
+ <archiveVersion>3</archiveVersion>
+ <data>
+ <extensions></extensions>
+ <cmdline></cmdline>
+ </data>
+ </settings>
+ <settings>
+ <name>BICOMP</name>
+ <archiveVersion>0</archiveVersion>
+ <data/>
+ </settings>
+ <settings>
+ <name>BUILDACTION</name>
+ <archiveVersion>1</archiveVersion>
+ <data>
+ <prebuild></prebuild>
+ <postbuild></postbuild>
+ </data>
+ </settings>
+ <settings>
+ <name>XLINK</name>
+ <archiveVersion>2</archiveVersion>
+ <data>
+ <version>14</version>
+ <wantNonLocal>1</wantNonLocal>
+ <debug>0</debug>
+ <option>
+ <name>XOutOverride</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>OutputFile</name>
+ <state>usb_device_dfu_isp.d82</state>
+ </option>
+ <option>
+ <name>OutputFormat</name>
+ <version>11</version>
+ <state>16</state>
+ </option>
+ <option>
+ <name>FormatVariant</name>
+ <version>8</version>
+ <state>2</state>
+ </option>
+ <option>
+ <name>SecondaryOutputFile</name>
+ <state>(None for the selected format)</state>
+ </option>
+ <option>
+ <name>XDefines</name>
+ <state></state>
+ </option>
+ <option>
+ <name>AlwaysOutput</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>OverlapWarnings</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>NoGlobalCheck</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>XList</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>SegmentMap</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>ListSymbols</name>
+ <state>2</state>
+ </option>
+ <option>
+ <name>PageLengthCheck</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>PageLength</name>
+ <state>80</state>
+ </option>
+ <option>
+ <name>XIncludes</name>
+ <state>$TOOLKIT_DIR$\LIB\</state>
+ </option>
+ <option>
+ <name>ModuleStatus</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>XclOverride</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>XclFile</name>
+ <state>$PROJ_DIR$\lnkat32uc3a-isp.xcl</state>
+ </option>
+ <option>
+ <name>XclFileSlave</name>
+ <state></state>
+ </option>
+ <option>
+ <name>DoFill</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>FillerByte</name>
+ <state>0xFF</state>
+ </option>
+ <option>
+ <name>DoCrc</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CrcSize</name>
+ <version>0</version>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CrcAlgo</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CrcPoly</name>
+ <state>0x11021</state>
+ </option>
+ <option>
+ <name>CrcCompl</name>
+ <version>0</version>
+ <state>0</state>
+ </option>
+ <option>
+ <name>OXLibIOConfig</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>XRTSegmentSizes</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>RangeCheckAlternatives</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>SuppressAllWarn</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>SuppressDiags</name>
+ <state></state>
+ </option>
+ <option>
+ <name>TreatAsWarn</name>
+ <state></state>
+ </option>
+ <option>
+ <name>TreatAsErr</name>
+ <state></state>
+ </option>
+ <option>
+ <name>ModuleLocalSym</name>
+ <version>0</version>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CrcBitOrder</name>
+ <version>0</version>
+ <state>0</state>
+ </option>
+ <option>
+ <name>IncludeSuppressed</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>ModuleSummary</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>xcProgramEntryLabel</name>
+ <state>__program_start</state>
+ </option>
+ <option>
+ <name>DebugInformation</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>RuntimeControl</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>IoEmulation</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>AllowExtraOutput</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>GenerateExtraOutput</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>XExtraOutOverride</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>ExtraOutputFile</name>
+ <state>at32uc3a-isp.hex</state>
+ </option>
+ <option>
+ <name>ExtraOutputFormat</name>
+ <version>11</version>
+ <state>23</state>
+ </option>
+ <option>
+ <name>ExtraFormatVariant</name>
+ <version>8</version>
+ <state>2</state>
+ </option>
+ <option>
+ <name>xcOverrideProgramEntryLabel</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>xcProgramEntryLabelSelect</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>ListOutputFormat</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>BufferedTermOutput</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>OXImportSlaves</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>OverlaySystemMap</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>RawBinaryFile</name>
+ <state></state>
+ </option>
+ <option>
+ <name>RawBinarySymbol</name>
+ <state></state>
+ </option>
+ <option>
+ <name>RawBinarySegment</name>
+ <state></state>
+ </option>
+ <option>
+ <name>RawBinaryAlign</name>
+ <state></state>
+ </option>
+ <option>
+ <name>XLinkMisraHandler</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CrcAlign</name>
+ <state>4</state>
+ </option>
+ <option>
+ <name>CrcInitialValue</name>
+ <state>0x0</state>
+ </option>
+ <option>
+ <name>OXExtraOptionsCheck</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>OXExtraOptions</name>
+ <state></state>
+ </option>
+ </data>
+ </settings>
+ <settings>
+ <name>XAR</name>
+ <archiveVersion>2</archiveVersion>
+ <data>
+ <version>0</version>
+ <wantNonLocal>1</wantNonLocal>
+ <debug>0</debug>
+ <option>
+ <name>XAROutOverride</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>XARInputs</name>
+ <state></state>
+ </option>
+ <option>
+ <name>OutputFile</name>
+ <state></state>
+ </option>
+ </data>
+ </settings>
+ <settings>
+ <name>BILINK</name>
+ <archiveVersion>0</archiveVersion>
+ <data/>
+ </settings>
+ </configuration>
+ <group>
+ <name>drivers</name>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\drivers\flashc\flashc.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\drivers\pm\pm.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\drivers\rtc\rtc.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\drivers\usbb\usbb_device.c</name>
+ </file>
+ </group>
+ <group>
+ <name>services</name>
+ <group>
+ <name>basic</name>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\services\basic\freq_detect\freq_detect.c</name>
+ </file>
+ </group>
+ <group>
+ <name>usb</name>
+ <group>
+ <name>class</name>
+ <group>
+ <name>dfu</name>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\udi_dfu_atmel.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\udi_dfu_atmel_desc.c</name>
+ </file>
+ </group>
+ </group>
+ <group>
+ <name>udc</name>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\..\..\..\..\udc\udc.c</name>
+ </file>
+ </group>
+ </group>
+ </group>
+ <file>
+ <name>$PROJ_DIR$\..\..\boot.s82</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\intc.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\isp.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\main.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\sysclk.c</name>
+ </file>
+</project>
+
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3a0_a1/sysclk.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3a0_a1/sysclk.c
new file mode 100644
index 0000000..f46e1b1
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3a0_a1/sysclk.c
@@ -0,0 +1,187 @@
+/**
+ * \file
+ *
+ * \brief Part-specific system clock management
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "preprocessor.h"
+#include "compiler.h"
+#include "board.h"
+#include "pm.h"
+#if UC3C
+#include "ast.h"
+#else
+#include "rtc.h"
+#endif
+#include "cycle_counter.h"
+#include "flashc.h"
+#include "freq_detect.h"
+
+/*!
+ * Detects extern OSC frequency and enable USB clock
+ */
+void sysclk_init(void)
+{
+ int mul;
+
+ // Switch to OSC ISP
+ // Set max startup time to make sure any crystal will be supported
+ // We cannot use a TC to measure this OSC frequency
+ // because the master clock must be faster than the clock selected by the TC
+ pm_switch_to_osc0(&AVR32_PM, 16000000,
+ AVR32_PM_OSCCTRL0_STARTUP_16384_RCOSC);
+ // Initialize the RTC with the internal RC oscillator
+ // RTC will count at the frequency of 115KHz/2
+ rtc_init(&AVR32_RTC, RTC_OSC_RC, 0);
+ rtc_enable(&AVR32_RTC);
+
+ // Detect the frequency
+ // mul = (((96000000 / freq_detect_start())/2)-1)
+ switch (freq_detect_start()) {
+ case 8000000:
+ mul = 5;
+ break;
+ case 16000000:
+ mul = 2;
+ break;
+ case 12000000:
+ default:
+ mul = 3;
+ break;
+ }
+
+ // Set PLL0 VCO @ 96 MHz
+ pm_pll_setup(&AVR32_PM, 0, // pll
+ mul, // mul
+ 0, // div
+ 0, // osc
+ 63); // lockcount
+
+ // Set PLL0 @ 48 MHz
+ pm_pll_set_option(&AVR32_PM, 0, // pll
+ 1, // pll_freq
+ 1, // pll_div2
+ 0); // pll_wbwdisable
+
+ // Enable PLL0
+ pm_pll_enable(&AVR32_PM, 0);
+
+ // Wait for PLL0 locked with a 10-ms time-out
+ pm_wait_for_pll0_locked(&AVR32_PM);
+
+ // Use 1 flash wait state
+ flashc_set_wait_state(1);
+
+ // Switch the main clock to PLL0
+ pm_switch_to_clock(&AVR32_PM, AVR32_PM_MCCTRL_MCSEL_PLL0);
+
+ // fPBA: 12 MHz
+ // fPBB: 12 MHz
+ // fHSB: 12 MHz
+ pm_cksel(&AVR32_PM, 1, // pbadiv
+ 1, // pbasel
+ 1, // pbbdiv
+ 1, // pbbsel
+ 1, // hsbdiv
+ 1); // hsbsel
+
+ // Use 0 flash wait state
+ flashc_set_wait_state(0);
+}
+
+
+/*!
+ * Reset the generation of system clocks and switch to RCOsc
+ */
+void sysclk_reset(void)
+{
+ flashc_set_wait_state(1);
+ pm_cksel(&AVR32_PM, 0, 0, 0, 0, 0, 0);
+ pm_switch_to_clock(&AVR32_PM, AVR32_PM_MCCTRL_MCSEL_SLOW);
+ flashc_set_wait_state(0);
+ pm_pll_disable(&AVR32_PM, 0);
+ pm_pll_set_option(&AVR32_PM, 0, 0, 0, 0);
+ pm_pll_setup(&AVR32_PM, 0, 0, 0, 0, 0);
+ pm_enable_clk0_no_wait(&AVR32_PM, AVR32_PM_OSCCTRL0_STARTUP_0_RCOSC);
+ pm_disable_clk0(&AVR32_PM);
+ pm_enable_osc0_ext_clock(&AVR32_PM);
+}
+
+
+void sysclk_enable_usb(void)
+{
+ // Setup USB GCLK
+ pm_gc_setup(&AVR32_PM, AVR32_PM_GCLK_USBB, // gc
+ 1, // osc_or_pll: use Osc (if 0) or PLL (if 1)
+ 0, // pll_osc: select Osc0/PLL0 or Osc1/PLL1
+#if UC3A3
+ 1, // diven
+ 1); // div
+#else
+ 0, // diven
+ 0); // div
+#endif
+
+ // Enable USB GCLK
+ pm_gc_enable(&AVR32_PM, AVR32_PM_GCLK_USBB);
+}
+
+
+void sysclk_disable_usb(void)
+{
+ pm_gc_disable(&AVR32_PM, AVR32_PM_GCLK_USBB);
+ pm_gc_setup(&AVR32_PM, AVR32_PM_GCLK_USBB, 0, 0, 0, 0);
+}
+
+
+void freq_detect_iface_ref_cnt_reset(void)
+{
+ rtc_set_value(&AVR32_RTC, 0);
+}
+
+int freq_detect_iface_ref_cnt_value(void)
+{
+ return rtc_get_value(&AVR32_RTC) * 2;
+}
+
+void freq_detect_iface_target_cnt_reset(void)
+{
+ Set_sys_count(0);
+}
+
+int freq_detetc_iface_target_cnt_value(void)
+{
+ return Get_sys_count();
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/iar/at32uc3c-isp.hex b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/iar/at32uc3c-isp.hex
new file mode 100644
index 0000000..ecd19b0
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/iar/at32uc3c-isp.hex
@@ -0,0 +1,504 @@
+:0200000480007A
+:10000000E1B80000F1D8C2C35818C090FEC8FFF094
+:10001000FC190061E06D0DF4D041D6033008FE7983
+:100020001000E06A01FCEA1A8080FE7B0400700088
+:10003000E061504BEA1149537402E06301070494F4
+:10004000C76CC141E7D2C210E043E11EC0F1EDB27E
+:100050000009C0C3F6F30180E06423170873C131BF
+:10006000EDB30003C3830230C3C1C53C9101E06D11
+:100070000E0CD353FEC00074E3B00001E0A00CF8F6
+:10008000E0A00D98EDB20008C262E06A01F8EA1A39
+:1000900080807402E06301070494C49CCE71E7D2AF
+:1000A000C22FE043494FCE21E7D2C108E043007C94
+:1000B000CDD2FE7A2000E6041605A974080A7584DC
+:1000C000E013001FE8030A44E7D2C2010654EDB46E
+:1000D0000000CCC20230C051C1CC300830009100C9
+:1000E000FC100061E3B0000030003001300230034A
+:1000F000300430053006300730083009300A300B44
+:10010000300C300D300EE3B00001E3B0004248BFC8
+:10011000FC1255009302EE12FF0093021C9FE805AB
+:100120001200EA051117E60509450A54E04400FFEC
+:10013000FE9BFFF758045EF480002000308A310CEB
+:10014000FE6B10047609AD99C1837609A589C55364
+:10015000FE6A18003019763EA19EC5727608A198F5
+:10016000C542740BAFCB950BFE6B10049749975C9F
+:10017000740CAFAC950CC6D8FE691220930C930A90
+:10018000FE6911307208A398C042E0A0019DC61814
+:100190007208A388C042E0A0025FC5B87208A198A7
+:1001A000C092FE6811C0700EA19EC042E0A001E4A2
+:1001B000C508E06E0980EA1E00007D08720EA58E5B
+:1001C000C08293CA720CA19CC4435838C421C0F8A1
+:1001D000720EA59ECBB293CC720CA38CC3A35818FD
+:1001E000C041E0A002A5C3585848C331E86C0000E4
+:1001F000FE6B11C097CCC2D8971AE0A00521E0A0F1
+:100200000107E0A0014DC258763EA59EC1227608A6
+:10021000A598C0F27408AFC89508FE6A1800741853
+:10022000AF98C043760AA19ACF92974C9759C118BC
+:10023000741BA38BC0E2740CAFCC950C302C952CA6
+:10024000740CAFAC950C741CF9DCC161E0A00CC45B
+:10025000FE6C1800786BD603800004C4800006543E
+:10026000800005748000072C80000C3C8000040C8A
+:100270008000049C80001BD4E1BC0000D3035EFC22
+:100280005EFF0000D421E0A00CB5CF7F1897FE667A
+:1002900018006C0CAFDC8D0C6C0C300AE06B0100AC
+:1002A000E06C013CEA1C8000E0A00CF06C0CB9BCD6
+:1002B0008D0C6C0CB9CC8D0C6C0CADCC8D0C6C0C0D
+:1002C000ADAC8D0C6C0CAFBC8D0C6C0CAFCC8D0C34
+:1002D0006C0C6C1BAF9BCFE2E0690980EA1900004F
+:1002E000300A300BF2EB0020F2EB0028F2EB00308A
+:1002F000F2EB00386CCB2E098DC9FE6C1000780B28
+:10030000ADCB990B780BE81B0C00990B6C0CA1BCC6
+:100310008D0C6C0CAFAC8D0CFE7C0588780BA1AB02
+:10032000990BB197C023D503D82AD70380001BF0BF
+:1003300080001C88D421CA1F1897FE6C1800780B07
+:10034000AFDB990B780BADCB990BE0A00C61B197AB
+:10035000C023D503D82AD70380001C0CD421C8DFC2
+:100360001897FE6618006C0CAFCC8D0C6C1BAF9B05
+:10037000CFE2FE6C1000780BA9CB990BE0A00460D3
+:10038000C46CC8DC308CFE6B1000976C301BFE6AAE
+:100390001000956B310AFE691000936A932C304C63
+:1003A000932C933B932A6C0CAFAC8D0CB197C0236C
+:1003B000D503D82A80000C3CFE6C1800780BAFCB1C
+:1003C000990BFE6C1000780BA9AB990B5EFD000039
+:1003D000FE6B1000760AA7DA970A760AE01AFF8009
+:1003E000F9DCC007144C970C760CA7BC970C5EFD8B
+:1003F000FE6B1000760CF9DCC0075EFCE06A098039
+:10040000EA1A0000952CB46B5EFD0000D401FE6C6E
+:100410001000780BE01BFF80990B780BA7BB990BA2
+:10042000FE6C1100780B308A3409F20A0C4AE0693C
+:100430000400F4090D4AE01BE68B3FF9F20A001AAA
+:10044000F4091200F20A111CA56AE21A1974144B7D
+:10045000990BE06C0980EA1C0000F8CBFFBC998B7B
+:10046000789BE41B8000999BFE6C1000787BA1AB0D
+:10047000997BFC1C0100FE6B11F097CCCFEEFE6B5C
+:1004800011F0304A970A302A970AE06B1000FE6A92
+:100490001000956BB19CC023D503D80A301CFE6BAD
+:1004A0001220970C302CFE6B1160970C300CE06B17
+:1004B0000980EA1B0000974C975CB66CF74C004033
+:1004C0005EFD0000D421E0670980EA1700006F0C90
+:1004D000580CC030C5EDCE3FFE6611F0FE651160D0
+:1004E00030446E9CF9DCC00F588CC090305CEF4CEF
+:1004F0000040E86C00008D0C8B04D82AEEEA004422
+:10050000AF1BF9DBC0105CCCAE1C8EAC5CCCAE2C4F
+:10051000F9DAC0105CCCAE3CE0A004E8CE808B04DD
+:10052000E06C0A04EA1C0000300B0F8AA98AC0F2B2
+:100530008EEAF5DAC006F40915105F0AB88AB81B0E
+:10054000B82B302CEF4C0040C16CD82A8EBA580A18
+:10055000C031CEDCD82AB81BB82B301CEF4C004081
+:1005600031078B07C8AE8D07B19CC023D503D82AAD
+:1005700080000EE8D431E0630278EA1380005D1356
+:100580003017FE6B11F097C7B19CC023D503E0660E
+:100590000980EA1600006D0C583CC041CFACC7FF83
+:1005A000D83A8CECE0650A04EA1500008AA4182405
+:1005B0005C74C1F10B8B580BC031CD5CD83A300262
+:1005C0008A9B160C8CBB163CC0656C5C580CC0300A
+:1005D0005D1CC031AA82C1188AAC8A9B180BAA1B69
+:1005E000AA228CE4F9D4C006F80B15105F0CAA8C73
+:1005F000E0440041F9B404405D13FE6B1130760A0B
+:10060000A38AC082B19CC023D503304CED4C00407E
+:10061000D83A6C298AAB1609089BECCEFFBC58046B
+:10062000C0501338201B1CC8CFD18AAB080BAA2B93
+:100630006C9BE01B8000E9D4C00F16448D94FE6BC8
+:10064000113097C7FE6B11F09707B19CC023D503FB
+:10065000D83A0000D431E0670980EA1700006F0C37
+:10066000FE6611F0E86500003054581CC0C0582CDC
+:10067000C030584CC031C8DCC048EF4400408D0544
+:10068000C0EFD83A6E9BF7DBC00FE0630A04EA13B1
+:10069000000086AC189A8EE9F80B00081039C044A7
+:1006A000F20C010B5C7BEEC9FFBC6E2C180A169C89
+:1006B000149E580BC0501338201C1CC8CFD186ACD8
+:1006C000160CA62C5C7CFE6211603021E04B0040D1
+:1006D000C061869B180B8EBA143BC0F5AE6C6E5C85
+:1006E000580CC0805D1CC061EF4400408D05850141
+:1006F000D83A8501C1CCD83A8EEBF80B1900C0C1AD
+:100700006E5C580CCF205D1CCF0086AC869B180B0E
+:10071000A61B300CA62C850131078507FEB0FDAE67
+:100720008D07B19CC023D503D83A0000D401E06CFA
+:100730000980EA1C0000303BF94B0040789BE01B2D
+:100740008000999BFEB0FD9AFE6B1160301A970AEB
+:10075000FE6911F0930A308A970A930AB19CC0236C
+:10076000D503D80AD401304CE06B0980EA1B0000A5
+:10077000F74C0040FEB0FD82310BFE6A1160950B14
+:10078000FE6A11F0950BB19CC023D503D80A000076
+:10079000D401E06B0980EA1B0000764C580CC020A5
+:1007A0005D1CD80AFE6C000C780BE06A1D34EA1A56
+:1007B0008000F7DBC004F40B032CA99C5EFC000056
+:1007C000FE6A00007409A7C9340BF7EC006C124CE8
+:1007D000950C5EFDFE6B0008760CA19CCFC25EFD01
+:1007E000D42118951697E0660008EA160000F01666
+:1007F0000000FE6C0004780BE01BFFC0EBD5C006C8
+:1008000016455807C0A6E01500FFE415FF000A9B37
+:10081000EBD7C010F7E51085EBD5C018EA15A50099
+:100820009905781CE21C000C8D1CF0160000D82ADB
+:10083000FE6B0008760CF9DCC0815EFCD4013FFB46
+:10084000309CCCFFD80A0000D401F60A1518304AB3
+:10085000F9BA0005189B149CCC4FD80AD4211896DD
+:100860001697CA1F0E9BA58CB9360C9CCEEFD82AC2
+:10087000D42118973006310520150E9B0A9CCEFF17
+:10088000E06B0008EA1B0000761C18465805CF51A3
+:100890009716D82AFE6B00147618760A3009144988
+:1008A000F9DCC006EDBC0005F2081730F00C0A4870
+:1008B000A1985F3C5EFC0000D42118971696F7DCE7
+:1008C000C006308CC8EFEC0C1518C0400E9CCE3F13
+:1008D000D822DA2AD401F60A1518C061F9DCC0065C
+:1008E000189B307CC7EFD80AD401F60A1518300BD4
+:1008F000C030CE3FD80ACEFFD80A0000D401189BE2
+:1009000030CCFEB0FF6FFE6B0008760CF9DCC0A1A6
+:10091000D8020000D42116973016189B302CFEB058
+:10092000FF61EE0C1518C0C0E0670008EA17000070
+:100930006E153FFCCE4F18966E1C18458F150C9CFB
+:10094000D8220000D4013FFB30FCFEB0FF4BFE6B11
+:100950000008760CF9DCC0A1D8020000D421189759
+:100960003FFB30ECFEB0FF3EEE0C1518F9BC000169
+:10097000C020CE9FD8220000D671204D3001300318
+:10098000FE6C000C7809FC188000E06E1D34EA1E35
+:100990008000F3D9C004FC09032C180850284056E5
+:1009A00016970C0A1495FC1C80001836C0825C3621
+:1009B000160618060C97FC168000C0D81036C0B377
+:1009C000FC1C80801836C0725C36160618060C9720
+:1009D000FC168080E06C0201EA1C8080183AC0633B
+:1009E000E0650200EA158080C098301CEA1C808017
+:1009F000183AC0421438FBF530020A9CA1CCE01C26
+:100A0000FFFCE01CFFF8503CE5D5C003C0E8580BE4
+:100A1000C050300CCA4F681C18433FFB30DCFEB09E
+:100A2000FEE1069C68131843E0640008EA14000025
+:100A30000A36E08200AA3FFB303CFEB0FED3681CC1
+:100A400018430C99E019FE00F2CCFE00403AF40C79
+:100A50000D4E0A9CE01CFE0018395F2CF7D6C00929
+:100A6000C2200C90E010FFF8C038B30AB32A003956
+:100A7000CFD3F7D6C003C1703008133AFA080B0A77
+:100A80002FF81638CFB35888C0620F3BFA080B0B0B
+:100A90002FF8CFAB0096403A1430C042BB0AAD2AC3
+:100AA000C0283011A39EEC0B1603161E1C98303B79
+:100AB0000E6B167BC040202BC080C1E85808C1E0F7
+:100AC000AF0BAD2A2018CFBB5808C180300B0F2ABE
+:100AD000FA0B0A1A2FFB584BCFB3BB0AAD2A2018CA
+:100AE000CF4B300B0F3AFA0B0B0A2FFB588BCFB3BF
+:100AF000BB0AAD2A20185808CF51F80B1518C200B0
+:100B0000E20C1518C0300498C0983008C0580F3C4B
+:100B1000FA080B0C2FF80438CFB30A995802C061B9
+:100B2000C0C8133CFA080B0C2FF85888CFB3BB0A87
+:100B3000AD2AC038B30AB32AF9D9C009CFC1301CD5
+:100B4000EA1C80801836FB3B001BFE92FF62580BAC
+:100B5000C070300B3FFCFEB0FEDF681C18433FFB4B
+:100B6000301CFEB0FE3F069C68131843402B16361F
+:100B7000FE93FF5C5C360E06FC1C808018060C970A
+:100B8000FC168080C52B8913405C2FCDDC720000E1
+:100B9000D401E06A00F4EA1A000015895809C0215E
+:100BA000D80AE06A00E8EA1A00007418700913C84D
+:100BB000F00C1800CF6295297418700E1DB92FEE35
+:100BC000FDD950005CC9202E5C791C09C048118EEB
+:100BD0001C08952874281238CE42119E584ECF8199
+:100BE00011AEFC0C1800CF4111BEFC0B1800CF0158
+:100BF000DA0A0000D4211897300BCCBFC021D82AC4
+:100C0000E06C00E8EA1C0000781B761CF8070F8BEC
+:100C1000761C5D1CDA2A0000D4211897CBAFC021C6
+:100C2000D82AE06C00E8EA1C0000781B761CF80764
+:100C30000F8BF01B00005F1CD8220000D421E0675E
+:100C400000E8EA170000E06600F4EA1600000D8CE8
+:100C5000580CC0C03005C0580A9CCCDF2FF55C553D
+:100C60006E1C780B17CC1835CF85300CAC8CE06C33
+:100C70000100AE1CD82A0000D401E06B0980EA1BF9
+:100C80000000969CF9DCC007FEB0FBA4D80AD7038D
+:100C9000800003D0D421E0670980EA1700008E9B12
+:100CA000F3DBC008E06800D4EA180000E06A03FC47
+:100CB000EA1A8000F60C1608201CC060201CC0E058
+:100CC000201CC210D82A700C198B5D1A8EBC8EEBBA
+:100CD000F60C1900EFFC3C06DA2A700CF93B001107
+:100CE0001639C025D82A701BF609033C19BB2FEC16
+:100CF000F9DB50005CCB5C7B202C5D1A302C6E2B1A
+:100D0000B69CCE5BE06C0014EA1C00005C5B167BBA
+:100D1000C060201BC070201BC180D82A304B2E4CD5
+:100D2000CD5B305BF8C9FFE03008F208070E5CCEFF
+:100D3000F8080016AC1E2FF81638CF853029F20BB4
+:100D4000001BB88B5C5BCC2B30CBF8C9FFD8CEDB5B
+:100D5000D431E0660980EA1600000D8CE06500F4ED
+:100D6000EA1500000B8BE06700E8EA170000EDBC15
+:100D70000007C4828CBAF4091510C021D83AF9DCF6
+:100D8000C005E06403FCEA148000580CC1A10D9C6E
+:100D9000187CC060206CC0C0202CC0C0D83A582A33
+:100DA000C020D83A302BEECCFFFE5D14DA3AC73FB4
+:100DB000D832581AC020D83A301B0A9C5D14DA3A4F
+:100DC000581CCDD10D9C58ACCDA1581AC020D83A92
+:100DD000F60C1518CFD08CA55C556E1C780B17CC73
+:100DE0001835CF64300B0A9CCD4ECF206E1C781B7B
+:100DF000F605032C783B5D1BAE8C301B0E9C5D14FE
+:100E0000DA3AF9DCC005E0640C18EA148000580CEA
+:100E1000C4F10D9C201CC140202CCB10202CC060A4
+:100E2000202CCAD0202CC180D83A8CBC580CC020B1
+:100E3000D83AE06C0C78EA1C80008D4CDA3A8CBC15
+:100E4000580CC020D83A8C9C581CCFD18E9CE21CE8
+:100E5000FDFFAE1CDA3A8CBC580CC020D83AFEB06C
+:100E6000FAC9CFD0E06300D4EA130000660CF93B66
+:100E700000118C9CF80B1800CF23CE1E8C9CAA8CE2
+:100E80005C5CF80B1518C021DA3A661BF60C003BC7
+:100E9000208B8F1B30066E1C780B17CC1836CF5466
+:100EA000300B0C9C5D14CDB02FF65C56CF5B581CFC
+:100EB000FE91FF660D9C58BCFE91FF628CBC580CE5
+:100EC000C030300CC0E8F60C1518CFC08CA55C55AE
+:100ED0008C975C570A9CC8FECF500E9B0A9C5D14F1
+:100EE0005C5CD832800003F0D421300CE0670980CC
+:100EF000EA170000AE6C8F4C8F5C0F8CEDBC0007C6
+:100F0000C0528EBB580BC021D82AE21C0060C041E1
+:100F1000C20FC020DA2A0F8CF9DCC005581CCF5153
+:100F2000E06C00F4EA1C0000198B580BCEE08EA692
+:100F30005C56E06700E8EA1700006E1C780B17CCDF
+:100F40001836CE34E0650B90EA158000300B0C9C0F
+:100F50005D15CDB06E1C781BF60603276E3C5D1C3C
+:100F6000F7DCC0080C9C5D15CD006E2C5D1CCD31EE
+:100F7000D82A0000D401C65CE0A003B2E0A003C2FE
+:100F8000E06B00F8EA1B0000F76C0008DA0AD703F0
+:100F9000800016DC800017005EFD0000D421E065B3
+:100FA0000980EA1500000B8C189BE21B0060E04BE7
+:100FB0000020C020D82A0B9BE06603FCEA168000C4
+:100FC000E06700F8EA170000A98CC162202BC0F08E
+:100FD000201BC301E06C0120EA1C0000198B580B98
+:100FE000C020C33D306B0E9C5D16DA2A6E6C580C27
+:100FF000C2105D1CD822201BC050203BC1B1C21CB6
+:10100000DA2A6E7C580CC0A0300CE0A003CBE06C58
+:101010001060EA1C80008B4CDA2A340BE06C01244F
+:10102000EA1C00005D16E06C1070EA1C80008B5C0E
+:10103000DA2A30FCAE8C30ACAECCD82A5EFD000093
+:10104000300CE06B00F8EA1B0000B68C302AB6CA00
+:10105000E06A0980EA1A0000955C954C977C5EFD79
+:10106000D401E06C00F8EA1C0000787B5D1BD80A14
+:10107000D431201DCE6FE06700F8EA1700000E960D
+:1010800030048F64301CE0A0038DE06A0964EA1A22
+:101090000000EF3C000815831863E06C0124EA1C93
+:1010A000000019A9E0650164EA150000E0681294E7
+:1010B000EA188000E06000FF30A23031198E199BE1
+:1010C000F7EE108EE02E0100C0F0E02E0200C2D03C
+:1010D000201EC430E02E00FFC6F0203EC710E02ED8
+:1010E0000200C7E0CAC8E60B1518C050AE81302C0C
+:1010F000AECCCA586E5B580BC041AE81AEC2C9F8C7
+:101100002FEC5D18E080009CE06B08000A9CFEB0AC
+:10111000F977E06C1C28EA1C8000E06B0980EA1B70
+:101120000000975C301CC8C82FEC5D18E080008878
+:101130006E4C580CC041AE81AEC2C818E60C1518F2
+:10114000C060E06C1280EA1C8000C058E06C12D8CD
+:10115000EA1C80008F6CCE7B2FEC5D18C7006E4CB4
+:10116000580CC041AE81AEC2C6A86E9C580CCDB022
+:10117000E06B0800F80B0D445C74081C8F9C089A07
+:101180006E8B0A9C6E495D190A9CC0486E8B2FFBC2
+:101190008F8B089BFE3400015C74F60A1510CE603C
+:1011A000193B003BCF40305CAE8CE06C1304EA1C72
+:1011B00080008F6CCB8B0039C421C47CC418127999
+:1011C000C0402019C070CAFBE06C1768EA1C8000A0
+:1011D000C058E06C1784EA1C80008F7CCA4B19BB96
+:1011E0001279C0402019C200C9EB591BC055308C80
+:1011F000AE8CAEC2C248583BC080582BC060584B22
+:10120000C040585B5F1CC028300CB48C2F47E06C8A
+:10121000005CEA1C0000F80B0F8AB509AF2815081E
+:101220000EA88D84C80B300A500ABA8B19CBBA9B12
+:10123000400B6E3C183BCDC28F8BC75B300C2FFD33
+:10124000D832D703800017A0D421E06700F8EA174E
+:101250000000E0A00263C070300CEF6C0008300B9F
+:10126000302AC048301C309B304AAECAAE8BE06B8F
+:101270000120EA1B0000B68CDA2AD7038000171879
+:10128000E06C00F8EA1C0000303BB88B302BB8CB88
+:101290005EFD0000E06B00F8EA1B00007689E619AD
+:1012A000FFFF198AA96A1409199A120A978A1498D1
+:1012B000E618FFFF19A9A969120819B91009763CA7
+:1012C0001839C063308CB68C30ACB6CC5EFD122AB7
+:1012D0002FFA979A5EFF0000D421E0670164EA17B5
+:1012E0000000E06600F8EA1600006C9A5C7A6C8BED
+:1012F0000E9C6C495D196C9B5C7B0E9CFEB0F8806B
+:10130000DA2A0000D401E06C00F8EA1C0000788BB7
+:10131000E06C0164EA1C0000F60A1608B88AB89B63
+:10132000302BFEB0F86DDA0A800003FCE07B86A06B
+:10133000FE7A0814740918695E1D201BCFA15EFE99
+:10134000D421FE780818E06E1200EA1E007AE067E9
+:10135000C6C0EA17002DEC76BBA0580CC2414A3536
+:101360006A0CA1AC0C3BC0323009C0980E3BC032B5
+:101370003019C0581C3B3029F9B90203189EE01EF1
+:10138000FFF9306CF9E900191C49129BE1BC00001F
+:10139000D3033249EA19AA0091098B0BB19CC243CD
+:1013A000D503D82A49256A0C1895A1A50C3BC03253
+:1013B0003009C0980E3BC0323019C0581C3B302950
+:1013C000F9B90203E015FFF9306CF9E9001912458B
+:1013D000E1BC0000D3033289EA19AA009109484907
+:1013E0009305B19CCDE2D82AFFFF0824FFFF08280F
+:1013F000D401202DA36CFE790824F20C0308FA0C0A
+:101400000908109EE01EF0FFA96BE21B0F001C4BA9
+:10141000B1ABFA0C090BE1BB0000D303F8C8FFDC49
+:10142000EA18AA00FE7E08189D08FA0C030EF20CBA
+:10143000090EB19BC023D503F40C1518C060301CF5
+:10144000C76FC0303FFCC028300C2FEDD802000021
+:10145000D401202DA36CFE7A081CF40C030BFA0CAB
+:10146000090B1699E019F0C1E419C0F0FB38001C13
+:10147000306BF7E800181049FB38000CFB3E000EFB
+:10148000F1EE1018FB3E000DF1EE1028338BF7E85B
+:10149000003810494058A968E2180F001049404828
+:1014A000EE7B0000F7E8010810494068B968E618CB
+:1014B0003F001049FA0C0909E1BB0000D303F8C949
+:1014C000FFE4EA19AA00FE7808189109FA0C03084B
+:1014D000F40C0908B19BC023D5032FEDD80A0000F6
+:1014E000202DA36CFE7B081CF60C030AFA0C090ADB
+:1014F0001499A1A9FA0C0909E1BA0000D303F8C9AB
+:10150000FFE4EA19AA00FE7808189109FA0C03080A
+:10151000F60C0908B19AC023D5032FED5EFD00003B
+:10152000202DA36CFE7B081CF60C030AFA0C090A9A
+:101530001499A1C9FA0C0909E1BA0000D303F8C94A
+:10154000FFE4EA19AA00FE7808189109FA0C0308CA
+:10155000F60C0908B19AC023D5032FED5EFD0000FB
+:10156000FE7B0814580CC051760CA59C5E3DCFDB69
+:10157000760CA78CCFE25EFDE07B86A0FE7A086445
+:10158000F40C002A740CA1CC950C740CA19C5E2D5B
+:10159000201BCFC15EFE0000D43116971495300396
+:1015A000F20616012016FE740864E80C0024680B8D
+:1015B000A19BC0623013CE1FC0373FFCD832B1664A
+:1015C000E61600FF302CF9E500150C45A967E21777
+:1015D0000F000A4789075813C041680CA1AC890C59
+:1015E000D83A0000D4013009FC188000100CFEB07D
+:1015F000F9C5D80AD4211897F40C1510C040FEB0D4
+:10160000F919AE8CD82AD70380000830D401F40C25
+:101610001510C060178C580CC030FEB0F911D80AF4
+:101620008000083CD421189516971496C0680E9C2B
+:10163000FEB0F9322FF70ACC0C9CFE360001F80BF5
+:101640001510CF61D82AD70380000894D4211896AA
+:1016500016951497C0680B3B0C9CFEB0F9472FF60B
+:101660000E9CFE370001F80B1510CF61D82AD70366
+:10167000800008E8E0690010EA190000F60B001B82
+:1016800016091898580A5E0D133B201A10CBCFD1BB
+:101690005EFD0000E06900E0EA190000F20B00299D
+:1016A0001898580A5E0D133B201A10CBCFD15EFD5F
+:1016B000FC198080120B1898580A5E0D1739201AF1
+:1016C00010C9CFD15EFD0000D4013019FC18808014
+:1016D000100CFEB0F953D80A80000978E5BC000070
+:1016E000E06B00E0EA1B0000F80A1601B68AF80A6F
+:1016F0001614B69AF80A160CB6AABD8CB6BC5EFDD6
+:10170000D401201D301A300B1A9CC75F1B8B580B5D
+:101710005F1C2FFDD8020000D421E06700E4EA1727
+:1017200000008E8C580CC071FEB0F83EAE0C300C30
+:10173000FEB0F8A0E0660080C0D85806C0F0FE3CBD
+:101740000001AE0C300B5C7CFEB0F8E6FE36FF010B
+:101750005C568E8C580CCF21DA2AD82A800007A438
+:101760008000087080000914D303FE7C1000E06B39
+:101770000A03EA1B5501990BE06B0A03EA1BAA0155
+:10178000990BC008D401FEB0F5D7E0A000BBFEB0B5
+:10179000F4A6D80A8000033480001900800000DA23
+:1017A000D401201D300BE06A01FCEA1A8080740924
+:1017B000A9D9F3EC109C500C318C4009F20C0A4A68
+:1017C0005C5A145BA96B5C7B308AEDBB000FC04296
+:1017D000EC1B83805C7BA17B5C7B201ACF71A98B87
+:1017E000208CCEC1129AE01AFF00144B500B304AE5
+:1017F0001A9BE06C01FCC69F2FFDD80AD42120ADB6
+:10180000E0672400EA1700F40E9B300CFEB0FD9A4E
+:10181000301A306B300CFEB0FDED0E9CE0A0015E86
+:10182000E0671CA8EA178000301C5D173009300AF9
+:10183000300BFE7C0C00E0A0019BC021C008FE7CA8
+:101840000C00E0A001A5E0A0009F4ABB161CC04010
+:10185000161CC040C058305CC048302CC028303CFA
+:10186000300BFB6B002433FA508A507B506C301CD9
+:10187000FB6C0016FB6B0015FB6C0014FACCFFEC44
+:101880001A9B3149190A16AA2049CFD1300CFEB053
+:10189000FDE1300CFEB0FE26300CFEB0FE63E066CB
+:1018A00007C0EA168000301C5D16303C5D17E0670B
+:1018B0001B24EA178000301B300C5D17301B301CD6
+:1018C0005D17301B303C5D17301B302C5D17301B13
+:1018D000304C5D17300C5D162F6DD82A80001340F8
+:1018E000800013F080001AD880001B6C80001B8CD5
+:1018F00080001984007A1200800014E080001560D6
+:10190000D42120ADE06707C0EA178000301C5D17C6
+:10191000E0661B24EA168000300B300C5D16300B9D
+:10192000301C5D16300B303C5D16300B302C5D16D4
+:10193000300B304C5D16300CE0A001B8300C5D1758
+:10194000300CFEB0FDEF300CFB6C0024508C507C52
+:10195000506CFB6C0016FB6C0015FB6C0014FACC91
+:10196000FFEC1A9B3149190A16AA2049CFD1300C35
+:10197000FEB0FD702F6DD82A80001CA880001520B5
+:1019800080001450D431205DFACCFFF8E06B1D7C50
+:10199000EA1B8000B709B928170818A83FF73FF4D9
+:1019A000E0661D0CEA1680005D16E0A001A7501C41
+:1019B000E0651D20EA1580005D15E0A001B71890D4
+:1019C0005D165D15300330053006C2181830C1F4BD
+:1019D000401B0A3BC1C41615F8000106EC0B141F8E
+:1019E000E072D330EC020648F6020349109A129BCB
+:1019F0000A98EA09141FE0A001311493580AC07034
+:101A0000400C141C5C4CE04C2711C12550030A9279
+:101A10000C91E0A001731895E0A001881896043598
+:101A2000C035023CCD445803C031300CC178300C75
+:101A3000FACAFFF8F40C032B062B083BF604173008
+:101A4000F80717302FFC583CCF435BF7E60C170024
+:101A5000C050FACBFFF8F607032C2FBDD832D703BE
+:101A600080001C5880001CF880001D28EBCD40FE33
+:101A7000E06C1E54EA1C8000E06E1E6CEA1E8000C2
+:101A8000300A300B190719061905EFE61003E7D3E2
+:101A9000C002C1C1EA041603C1900C37C090AF095F
+:101AA0002014AD28CFD1EBD5C003C121C0B820147C
+:101AB000AD2ACFE1EBD5C003C050300220150CC2D7
+:101AC000CFD11C3CCE03E3CF80FE0C37CF700F315B
+:101AD00020150CC1CEBB0000D4211897E06607E0AA
+:101AE000EA168000E06B07C0EA1B8000E06C8A41C8
+:101AF000EA1C01F71837C103301C5D1BE06C148130
+:101B0000EA1C03EF18373FFBC042311C5D16D82A90
+:101B1000310C5D16D82A300C5D1B3FFB311C5D1665
+:101B2000D82A0000D401FE790404720AFE7904D494
+:101B30007208A788C0333FFCD802E1B90000D30384
+:101B40003048F00C0028EA18AA00FE7E04589D08D0
+:101B5000E01AFFF8F7DBC003144BA7BBFE7A0404BE
+:101B6000F40C092BB199C023D503D80AD4017828E5
+:101B7000BD98CFE3A96BA1ABF94B0040B16A990ABC
+:101B8000782BB99BCFE3129BC0CCDA0A782BB99B98
+:101B9000CFE3780BA1AB990B782BB99BCFE35EFD1C
+:101BA000782AB99ACFE3991B782BB99BCFE35EFDD6
+:101BB000D401D503FEB0FE24FEB0F366FEB0F3629E
+:101BC000C031FEB0F3CDC008800017FC8000028455
+:101BD00080000280D401F80B1518C040FEB0F3C09D
+:101BE000D80AFEB0F3EBD80A8000035C800003B88B
+:101BF000D4013009300A305B300CFEB0FCCF300C21
+:101C0000E0A00070D80AD70380001CE0D401300C9B
+:101C1000FE7B0864970C3009300A305BFEB0FCBED6
+:101C2000D80AD70380001598D401E06900F8EA19B2
+:101C30000000728C729A5C7AE06B0164EA1B00000F
+:101C4000F1DCC006100B72585D18300CE06B098097
+:101C5000EA1B0000975CDA0AEBCD4080340C3007B9
+:101C6000300EA17A5CFB5CFE5CF7103EF2071300BD
+:101C7000C053101EEE090147A1AA201CCF310E99B6
+:101C80001C98E3CD80800000E0690000EA19800024
+:101C9000121CF9DCC00EF9EA11ECFE7A0000A59BDB
+:101CA000F40B092C5EFD0000E1BB0000D303FC1A1D
+:101CB000AA00FE790458930AFE7A0400950CB19BA1
+:101CC0005E3DD5035EFD0000FC198000120B1898E4
+:101CD000580A5E0D1739201A10C9CFD15EFD0000D9
+:101CE000FE7B0864F60C002B760CA19C5E3D760C06
+:101CF000A1AC970C5EFD0000D401FE7C0C00E0A0BE
+:101D00000019A17CD802D70380001D30D401300B0C
+:101D1000FE7C0C00FEB0FF46D80AD70380001BA053
+:101D2000300CE3BC00425EFDE1BC00425EFC000002
+:101D3000781B5EFB00001000000020000000400047
+:101D4000000080000000C0000001000000018000D1
+:101D50000002000000030000000400000006000074
+:101D600000080000000C000000100000002000002F
+:101D7000000000000000000000000000007A1200D7
+:101D800000B71B0000F424000008000080001CC8FD
+:101D9000800015E4000000000000000000000000CA
+:101DA00000000001800015F48000160C00000020E7
+:101DB000800016248000164C00000003800016747A
+:101DC00000000000000000048000169400000000E5
+:101DD00000000200800016B0800016C8000000005D
+:101DE00000000000000000000000000000000000F3
+:101DF00000000000000000000000000000000000E3
+:101E000000000000000000000000000000000000D2
+:101E100000000000000000000000000000000000C2
+:101E200000000000000000000000000000000000B2
+:101E300000000000000000000000000000000000A2
+:101E40000000000000000000000000000000000092
+:101E50000000000080001E7000000008000000D498
+:0C1E6000000000E0000000E00000092A83
+:101E7000800007D4000000001200000000030000F2
+:101E80000000000000000000000000000000000052
+:101E900000000000000000000403090441544D4507
+:101EA0004C000000444655204154333255433343DF
+:101EB0000000000080000F7480000F9880000F9CCD
+:101EC0008000103C80001D8880001D9480001DA0B3
+:101ED00080001DAC80001DB880001DC480001DD096
+:101EE00080001DDC80001DE880001DF480001E00C5
+:101EF00080001E0C80001E1880001E2480001E30F2
+:101F000080001E3C80001E481201000200000040BC
+:101F1000EB03EB2F02010102000100000902120095
+:101F2000010100C0320904000000000000000000B0
+:101F30000000004C000000B4000000C8000000A039
+:041F4000000000CCD1
+:040000058000000077
+:00000001FF
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/iar/lnkat32uc3c-isp.xcl b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/iar/lnkat32uc3c-isp.xcl
new file mode 100644
index 0000000..e0e450b
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/iar/lnkat32uc3c-isp.xcl
@@ -0,0 +1,150 @@
+/******************************************************************************
+ * AVR32 AT32UC3C ISP XLINK command file for AVR32 IAR C/C++ Compiler.
+ *
+ * The assumed memory layout is the one of the AT32UC3C0512:
+ *
+ * Start Stop Name Type
+ * ---------- ---------- ----- --------------
+ * 0x00000000 0x0000FFFF SRAM RAM
+ * 0x80000000 0x8007FFFF FLASH FLASH
+ * 0x80800000 0x808001FF USER FLASH
+ *
+ * Usage: xlink your_file(s) -f xcl-file libraries
+ *
+ * - Compiler: IAR EWAVR32
+ * - Supported devices: AVR32 AT32UC3C
+ *
+ * - author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+/************************************************************************/
+/* The following segments are defined in this link file: */
+/* */
+/* Code segments */
+/* CODE32 -- Program code used by __code32 functions. */
+/* RESET -- Reset code. */
+/* EVSEG -- Exception vector handlers. */
+/* */
+/* Constant segments */
+/* INITTAB -- Segment initializer table. */
+/* DIFUNCT -- Dynamic initialization vector used by C++. */
+/* SWITCH -- Switch tables. */
+/* ACTAB -- Table of pointers to acall functions. */
+/* */
+/* DATA21_ID -- Initialization data for DATA21_I. */
+/* DATA32_ID -- Initialization data for DATA32_I. */
+/* DATA32_C -- Constant __data32 data. */
+/* */
+/* CHECKSUM -- Checksum segment. */
+/* */
+/* Data segments */
+/* DATA21_I -- Initialized __data21 data with non-zero */
+/* initial value. */
+/* DATA32_I -- Initialized __data32 data with non-zero */
+/* initial value. */
+/* DATA21_Z -- Initialized __data21 data with zero initial value. */
+/* DATA32_Z -- Initialized __data32 data with zero initial value. */
+/* DATA21_N -- Non-initialized __data21. */
+/* DATA32_N -- Non-initialized __data32. */
+/* SSTACK -- The system stack. */
+/* CSTACK -- The application stack. */
+/* HEAP -- The heap used by malloc and free. */
+/* */
+/************************************************************************/
+
+/************************************************************************/
+/* Define CPU */
+/************************************************************************/
+
+-cavr32
+
+/************************************************************************/
+/* Reset code is located at address 0x80000000 and up. */
+/************************************************************************/
+
+-Z(CODE)RESET=80000000-8007FFFF
+
+/************************************************************************/
+/* The exception handler code is located at address 0x80000000 */
+/* and up. Make sure that the exception table gets properly */
+/* allocated. By using the special -Z@ allocation primitive, the */
+/* placement is guaranteed to be at _EVBASE and onwards. */
+/************************************************************************/
+
+-Z@(CODE)EVTAB=80000000-8007FFFF
+-Z@(CODE)EV100=80000100-8007FFFF
+-P(CODE)EVSEG=80000000-8007FFFF
+
+/************************************************************************/
+/* Allocate code and const segments. */
+/************************************************************************/
+
+-P(CODE)CODE32=80000000-8007FFFF
+-P(CONST)DATA32_C=80000000-8007FFFF
+-P(CONST)USERDATA32_C=80800000-808001FF
+
+// Initializers
+-Z(CONST)INITTAB,DIFUNCT=80000000-8007FFFF
+-Z(CONST)CHECKSUM,SWITCH=80000000-8007FFFF
+-Z(CONST)DATA21_ID,DATA32_ID=80000000-8007FFFF
+-Z(CONST)RAMCODE21_ID,RAMCODE32_ID=80000000-8007FFFF
+
+-Z(CONST)ACTAB,HTAB=80000000-8007FFFF
+
+/************************************************************************/
+/* Allocate the read/write segments that are mapped to RAM. */
+/************************************************************************/
+
+-Z(CODE)RAMCODE21=00000004-0000FFFF
+-Z(DATA)DATA21_I,DATA21_Z,DATA21_N=00000004-0000FFFF
+-Z(CODE)RAMCODE32=00000004-0000FFFF
+-Z(DATA)DATA32_I,DATA32_Z,DATA32_N=00000004-0000FFFF
+-Z(DATA)TRACEBUFFER=00000004-0000FFFF
+
+-Z(DATA)HEAP+_HEAP_SIZE=00000004-0000FFFF
+-Z(DATA)CSTACK+_CSTACK_SIZE=00000004-0000FFFF
+-Z(DATA)SSTACK+_SSTACK_SIZE=00000004-0000FFFF
+
+/************************************************************************/
+/* Copy the RAMCODE bytes to the initializer segments. */
+/************************************************************************/
+
+-QRAMCODE21=RAMCODE21_ID
+-QRAMCODE32=RAMCODE32_ID
+
+/************************************************************************/
+/* End of File */
+/************************************************************************/
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/iar/usb_device_dfu_isp.ewp b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/iar/usb_device_dfu_isp.ewp
new file mode 100644
index 0000000..4a03442
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/iar/usb_device_dfu_isp.ewp
@@ -0,0 +1,940 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+
+<project>
+ <fileVersion>2</fileVersion>
+ <configuration>
+ <name>Release</name>
+ <toolchain>
+ <name>AVR32</name>
+ </toolchain>
+ <debug>0</debug>
+ <settings>
+ <name>General</name>
+ <archiveVersion>4</archiveVersion>
+ <data>
+ <version>6</version>
+ <wantNonLocal>1</wantNonLocal>
+ <debug>0</debug>
+ <option>
+ <name>CoreRevisionSlave</name>
+ <version>1</version>
+ <state>2</state>
+ </option>
+ <option>
+ <name>ProcessorCoreDyn</name>
+ <state>at32uc3c0512c</state>
+ </option>
+ <option>
+ <name>ProcessorCoreSlave</name>
+ <state>at32uc3c0512c</state>
+ </option>
+ <option>
+ <name>CodeModel</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>DataModel</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>EnableSimdInstructions</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>EnableDspInstructions</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>EnableRmwInstructions</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>GAllowUnaligned</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>GOutputBinary</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>ExePath</name>
+ <state></state>
+ </option>
+ <option>
+ <name>ObjPath</name>
+ <state>Release\Obj</state>
+ </option>
+ <option>
+ <name>ListPath</name>
+ <state>Release\List</state>
+ </option>
+ <option>
+ <name>GRuntimeLibSelect</name>
+ <version>0</version>
+ <state>2</state>
+ </option>
+ <option>
+ <name>GRuntimeLibSelectSlave</name>
+ <version>0</version>
+ <state>2</state>
+ </option>
+ <option>
+ <name>RTDescription</name>
+ <state>Use the full configuration of the C/EC++ runtime library. Full locale interface, C locale, file descriptor support, multibytes in printf and scanf, and hex floats in strtod.</state>
+ </option>
+ <option>
+ <name>RTLibraryPath</name>
+ <state>$TOOLKIT_DIR$\lib\dlavr32allahf.r82</state>
+ </option>
+ <option>
+ <name>RTConfigPath</name>
+ <state>$TOOLKIT_DIR$\lib\dlavr32allahf.h</state>
+ </option>
+ <option>
+ <name>Input variant</name>
+ <version>0</version>
+ <state>1</state>
+ </option>
+ <option>
+ <name>Input description</name>
+ <state>No specifier n, no float.</state>
+ </option>
+ <option>
+ <name>Output variant</name>
+ <version>0</version>
+ <state>1</state>
+ </option>
+ <option>
+ <name>Output description</name>
+ <state>No specifier a or A.</state>
+ </option>
+ <option>
+ <name>GUnhandledInterrupts</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>GUnhandledExceptions</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>GTraceBufferSize</name>
+ <version>0</version>
+ <state>0</state>
+ </option>
+ <option>
+ <name>GSStackSize</name>
+ <state>0x0400</state>
+ </option>
+ <option>
+ <name>GCStackSize</name>
+ <state>0x0000</state>
+ </option>
+ <option>
+ <name>GHeapSize</name>
+ <state>0x1000</state>
+ </option>
+ <option>
+ <name>GeneralEnableMisra</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>GeneralMisraVerbose</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CoreRevision</name>
+ <version>1</version>
+ <state>2</state>
+ </option>
+ <option>
+ <name>GTraceSelect</name>
+ <version>0</version>
+ <state>0</state>
+ </option>
+ <option>
+ <name>GTraceBufferFull</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>GeneralMisraVer</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>GeneralMisraRules04</name>
+ <version>0</version>
+ <state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
+ </option>
+ <option>
+ <name>GeneralMisraRules98</name>
+ <version>0</version>
+ <state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
+ </option>
+ <option>
+ <name>GEnableNanoTrace</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>EnableFpuInstructions</name>
+ <state>1</state>
+ </option>
+ </data>
+ </settings>
+ <settings>
+ <name>ICCAVR32</name>
+ <archiveVersion>7</archiveVersion>
+ <data>
+ <version>8</version>
+ <wantNonLocal>1</wantNonLocal>
+ <debug>0</debug>
+ <option>
+ <name>CCDefines</name>
+ <state>BOARD=DUMMY_BOARD</state>
+ </option>
+ <option>
+ <name>CCPreprocFile</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCPreprocComments</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCPreprocLine</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCListCFile</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCListCMnemonics</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCListCMessages</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCListAssFile</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCListAssSource</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCEnableRemarks</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCDiagSuppress</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CCDiagRemark</name>
+ <state>Pa082</state>
+ </option>
+ <option>
+ <name>CCDiagWarning</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CCDiagError</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CCCore</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCCodeModel</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCDataModel</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCObjPrefix</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCRequirePrototypes</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCMultibyteSupport</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCMigrationPreprocExtentions</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCExt</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCCharIs</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCAllowList</name>
+ <version>0</version>
+ <state>1111111</state>
+ </option>
+ <option>
+ <name>CCObjUseModuleName</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCObjModuleName</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CCDebugInfo</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCDiagWarnAreErr</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCCompilerRuntimeInfo</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>OutputFile</name>
+ <state>$FILE_BNAME$.r82</state>
+ </option>
+ <option>
+ <name>CCLangSelect</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCLibConfigHeader</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>PreInclude</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CompilerMisraOverride</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCIncludePath2</name>
+ <state>$PROJ_DIR$\..\</state>
+ <state>$PROJ_DIR$\..\..\</state>
+ <state>$PROJ_DIR$\..\..\..\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\utils\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\utils\preprocessor\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\common\utils\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\common\boards\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\boards\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\drivers\gpio\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\drivers\pm\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\drivers\scif\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\drivers\ast\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\drivers\flashc\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\drivers\rtc\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\drivers\cpu\cycle_counter\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\drivers\usbc\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\common\services\basic\clock\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\services\basic\freq_detect\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\common\services\usb\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\common\services\usb\udc\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\common\services\usb\class\dfu\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\common\services\usb\class\dfu\device\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\common\services\usb\class\dfu\device\atmel\</state>
+ </option>
+ <option>
+ <name>CCStdIncCheck</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCStdIncludePath</name>
+ <state>$TOOLKIT_DIR$\INC\</state>
+ </option>
+ <option>
+ <name>IExtraOptionsCheck</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>IExtraOptions</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CCModuleTypeOverride</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCModuleType</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCOptLevel</name>
+ <state>3</state>
+ </option>
+ <option>
+ <name>CCOptStrategy</name>
+ <version>0</version>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCOptLevelSlave</name>
+ <state>3</state>
+ </option>
+ <option>
+ <name>CompilerMisraRules04</name>
+ <version>0</version>
+ <state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
+ </option>
+ <option>
+ <name>CompilerMisraRules98</name>
+ <version>0</version>
+ <state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
+ </option>
+ <option>
+ <name>CCFPIMPLLIST</name>
+ <version>0</version>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCFPIMPL description</name>
+ <state>Use the space efficient but slower implementation unless another module uses the fast implementation.</state>
+ </option>
+ </data>
+ </settings>
+ <settings>
+ <name>AAVR32</name>
+ <archiveVersion>2</archiveVersion>
+ <data>
+ <version>0</version>
+ <wantNonLocal>1</wantNonLocal>
+ <debug>0</debug>
+ <option>
+ <name>AObjPrefix</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>ACore</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AEnableRemarks</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>ADiagSuppress</name>
+ <state></state>
+ </option>
+ <option>
+ <name>ADiagRemark</name>
+ <state></state>
+ </option>
+ <option>
+ <name>ADiagWarning</name>
+ <state></state>
+ </option>
+ <option>
+ <name>ADiagError</name>
+ <state></state>
+ </option>
+ <option>
+ <name>ADiagWarnAreErr</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>APreprocFile</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>APreprocComments</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>APreprocLine</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>ADefines</name>
+ <state>BOARD=DUMMY_BOARD</state>
+ </option>
+ <option>
+ <name>AIncludePaths</name>
+ <state>$PROJ_DIR$\..\</state>
+ <state>$PROJ_DIR$\..\..\</state>
+ <state>$PROJ_DIR$\..\..\..\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\utils\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\utils\preprocessor\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\common\utils\</state>
+ </option>
+ <option>
+ <name>AListFile</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>ACrossReference</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>AMacDefs</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>AMacExps</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AOnlyAsmed</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>ANoDiagnostics</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AListOptions</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AMnemonicFirst</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>ADirectiveFirst</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>ACaseSensitivity</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>ADebug</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>AMacroChars</name>
+ <version>0</version>
+ <state>0</state>
+ </option>
+ <option>
+ <name>OutputFile</name>
+ <state>$FILE_BNAME$.r82</state>
+ </option>
+ <option>
+ <name>ATruncateLine</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>IExtraOptionsCheck</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>IExtraOptions</name>
+ <state></state>
+ </option>
+ <option>
+ <name>AModel</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AMultibyteSupport</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AOverrideStandardPaths</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AStandardIncludePaths</name>
+ <state>$TOOLKIT_DIR$\INC\</state>
+ </option>
+ </data>
+ </settings>
+ <settings>
+ <name>JAVATOC</name>
+ <archiveVersion>0</archiveVersion>
+ <data/>
+ </settings>
+ <settings>
+ <name>CUSTOM</name>
+ <archiveVersion>3</archiveVersion>
+ <data>
+ <extensions></extensions>
+ <cmdline></cmdline>
+ </data>
+ </settings>
+ <settings>
+ <name>BICOMP</name>
+ <archiveVersion>0</archiveVersion>
+ <data/>
+ </settings>
+ <settings>
+ <name>BUILDACTION</name>
+ <archiveVersion>1</archiveVersion>
+ <data>
+ <prebuild></prebuild>
+ <postbuild></postbuild>
+ </data>
+ </settings>
+ <settings>
+ <name>XLINK</name>
+ <archiveVersion>2</archiveVersion>
+ <data>
+ <version>14</version>
+ <wantNonLocal>1</wantNonLocal>
+ <debug>0</debug>
+ <option>
+ <name>XOutOverride</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>OutputFile</name>
+ <state>usb_device_dfu_isp.d82</state>
+ </option>
+ <option>
+ <name>OutputFormat</name>
+ <version>11</version>
+ <state>16</state>
+ </option>
+ <option>
+ <name>FormatVariant</name>
+ <version>8</version>
+ <state>2</state>
+ </option>
+ <option>
+ <name>SecondaryOutputFile</name>
+ <state>(None for the selected format)</state>
+ </option>
+ <option>
+ <name>XDefines</name>
+ <state></state>
+ </option>
+ <option>
+ <name>AlwaysOutput</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>OverlapWarnings</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>NoGlobalCheck</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>XList</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>SegmentMap</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>ListSymbols</name>
+ <state>2</state>
+ </option>
+ <option>
+ <name>PageLengthCheck</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>PageLength</name>
+ <state>80</state>
+ </option>
+ <option>
+ <name>XIncludes</name>
+ <state>$TOOLKIT_DIR$\LIB\</state>
+ </option>
+ <option>
+ <name>ModuleStatus</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>XclOverride</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>XclFile</name>
+ <state>$PROJ_DIR$\lnkat32uc3c-isp.xcl</state>
+ </option>
+ <option>
+ <name>XclFileSlave</name>
+ <state></state>
+ </option>
+ <option>
+ <name>DoFill</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>FillerByte</name>
+ <state>0xFF</state>
+ </option>
+ <option>
+ <name>DoCrc</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CrcSize</name>
+ <version>0</version>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CrcAlgo</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CrcPoly</name>
+ <state>0x11021</state>
+ </option>
+ <option>
+ <name>CrcCompl</name>
+ <version>0</version>
+ <state>0</state>
+ </option>
+ <option>
+ <name>OXLibIOConfig</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>XRTSegmentSizes</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>RangeCheckAlternatives</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>SuppressAllWarn</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>SuppressDiags</name>
+ <state></state>
+ </option>
+ <option>
+ <name>TreatAsWarn</name>
+ <state></state>
+ </option>
+ <option>
+ <name>TreatAsErr</name>
+ <state></state>
+ </option>
+ <option>
+ <name>ModuleLocalSym</name>
+ <version>0</version>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CrcBitOrder</name>
+ <version>0</version>
+ <state>0</state>
+ </option>
+ <option>
+ <name>IncludeSuppressed</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>ModuleSummary</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>xcProgramEntryLabel</name>
+ <state>__program_start</state>
+ </option>
+ <option>
+ <name>DebugInformation</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>RuntimeControl</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>IoEmulation</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>AllowExtraOutput</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>GenerateExtraOutput</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>XExtraOutOverride</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>ExtraOutputFile</name>
+ <state>at32uc3c-isp.hex</state>
+ </option>
+ <option>
+ <name>ExtraOutputFormat</name>
+ <version>11</version>
+ <state>23</state>
+ </option>
+ <option>
+ <name>ExtraFormatVariant</name>
+ <version>8</version>
+ <state>2</state>
+ </option>
+ <option>
+ <name>xcOverrideProgramEntryLabel</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>xcProgramEntryLabelSelect</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>ListOutputFormat</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>BufferedTermOutput</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>OXImportSlaves</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>OverlaySystemMap</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>RawBinaryFile</name>
+ <state></state>
+ </option>
+ <option>
+ <name>RawBinarySymbol</name>
+ <state></state>
+ </option>
+ <option>
+ <name>RawBinarySegment</name>
+ <state></state>
+ </option>
+ <option>
+ <name>RawBinaryAlign</name>
+ <state></state>
+ </option>
+ <option>
+ <name>XLinkMisraHandler</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CrcAlign</name>
+ <state>4</state>
+ </option>
+ <option>
+ <name>CrcInitialValue</name>
+ <state>0x0</state>
+ </option>
+ <option>
+ <name>OXExtraOptionsCheck</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>OXExtraOptions</name>
+ <state></state>
+ </option>
+ </data>
+ </settings>
+ <settings>
+ <name>XAR</name>
+ <archiveVersion>2</archiveVersion>
+ <data>
+ <version>0</version>
+ <wantNonLocal>1</wantNonLocal>
+ <debug>0</debug>
+ <option>
+ <name>XAROutOverride</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>XARInputs</name>
+ <state></state>
+ </option>
+ <option>
+ <name>OutputFile</name>
+ <state></state>
+ </option>
+ </data>
+ </settings>
+ <settings>
+ <name>BILINK</name>
+ <archiveVersion>0</archiveVersion>
+ <data/>
+ </settings>
+ </configuration>
+ <group>
+ <name>drivers</name>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\drivers\ast\ast.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\drivers\flashc\flashc.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\drivers\pm\pm_uc3c.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\drivers\scif\scif_uc3c.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\drivers\usbc\usbc_device.c</name>
+ </file>
+ </group>
+ <group>
+ <name>services</name>
+ <group>
+ <name>basic</name>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\services\basic\freq_detect\freq_detect.c</name>
+ </file>
+ </group>
+ <group>
+ <name>usb</name>
+ <group>
+ <name>class</name>
+ <group>
+ <name>dfu</name>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\udi_dfu_atmel.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\udi_dfu_atmel_desc.c</name>
+ </file>
+ </group>
+ </group>
+ <group>
+ <name>udc</name>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\..\..\..\..\udc\udc.c</name>
+ </file>
+ </group>
+ </group>
+ </group>
+ <file>
+ <name>$PROJ_DIR$\..\..\boot.s82</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\intc.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\isp.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\main.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\sysclk_uc3c.c</name>
+ </file>
+</project>
+
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.0/at32uc3c-isp-1.1.0.bin b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.0/at32uc3c-isp-1.1.0.bin
new file mode 100644
index 0000000..1b1a17d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.0/at32uc3c-isp-1.1.0.bin
Binary files differ
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.0/at32uc3c-isp-1.1.0.hex b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.0/at32uc3c-isp-1.1.0.hex
new file mode 100644
index 0000000..cf9c9d3
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.0/at32uc3c-isp-1.1.0.hex
@@ -0,0 +1,515 @@
+:0200000480007A
+:10000000E1B80000F1D8C2C35818C090FEC8FFF094
+:10001000FC190061E06D0D5CD041D6033008FE791B
+:100020001000E06A01FCEA1A8080FE7B0400700088
+:10003000E061504BEA1149537402E06301070494F4
+:10004000C76CC141E7D2C210E043E11EC0F1EDB27E
+:100050000009C0C3F6F30180E06421170873C131C1
+:10006000EDB30003C3830230C3C1C53C9101E06D11
+:100070000D74D353FEC00074E3B00001E0A00D384E
+:10008000E0A00E50EDB20008C262E06A01F8EA1A80
+:1000900080807402E06301070494C49CCE71E7D2AF
+:1000A000C22FE043494FCE21E7D2C108E043007C94
+:1000B000CDD2FE7A2000E6041605A964080A7584EC
+:1000C000E013001FE8030A44E7D2C2010654EDB46E
+:1000D0000000CCC20230C051C1CC300830009100C9
+:1000E000FC100061E3B0000030003001300230034A
+:1000F000300430053006300730083009300A300B44
+:10010000300C300D300EE3B00001E3B0004248BFC8
+:10011000FC1255009302EE12FF0093021C9FE805AB
+:100120001200EA051117E60509450A54E04400FFEC
+:10013000FE9BFFF758045EF480002000D02130873A
+:10014000FE6C1000784BA39BC102781BA39BC0D20E
+:10015000304CFE6B1000972C767AA19AF7F72A03A1
+:10016000F7FC3A05C783C778E0A002D4C741FE6C0C
+:100170001000781BA58BC3529927E0A005BFFE6C29
+:100180001000780BE01BFF80990B780BA7BB990B35
+:10019000FE6C1100780BE0690400308A3408F00A24
+:1001A0000C4AF4090D4AE01BE68B3FF9F20A001AEB
+:1001B000F4091200F3D9C005F20A111CA56AE21A6B
+:1001C0001974144B990BE0A000FBFE6C1000787BB7
+:1001D000A1AB997BFC1C0100FE6B1220970CC3B8ED
+:1001E000310BFE6C1800301AFE6910007248A1989D
+:1001F000C1227218A198C0F27809AFC99909FE69A5
+:100200001000935A936B780BA1DB990B780BAFAB73
+:10021000990BC2187248A598C0E27218A598C0B28E
+:100220007809AFC99909FE691000935B936A780B4E
+:10023000A1BBCEFB781AA38AC0E2780BAFCB990B97
+:10024000302B992B780BAFAB990B781CF9DCC16183
+:10025000E0A00D7AFE6C1800786BD022D603D7038D
+:100260008000071080000CF8800003BC80001D4453
+:10027000E1BC0000D3035EFC5EFF0000D421E0A0DF
+:100280000D35CF7F1897FE6618006C0CAFDC8D0C17
+:100290006C0C300AE06B0100E06C013CEA1C800051
+:1002A000E0A00D746C0CB9BC8D0C6C0CB9CC8D0C31
+:1002B0006C0CADCC8D0C6C0CADAC8D0C6C0CAFBC67
+:1002C0008D0C6C0CAFCC8D0C6C0C6C1BAF9BCFE20F
+:1002D000E06C1000300A300BB91BF8EB0008F8EBAB
+:1002E0000010F8EB00186CCA8DCCFE6C1000780B77
+:1002F000ADCB990B780BE81B0C00990B6C0CA1BCD7
+:100300008D0C6C0CAFAC8D0CFE7C0588780BA1AB12
+:10031000990BE3B70000D82A80001CE880001D88F4
+:10032000D421CA7F1897FE6C1800780BAFDB990BAD
+:10033000780BADCB990BE0A00CE7E3B70000D82A0F
+:1003400080001D04D421C95FFE6B1800760AAFCA75
+:10035000970AFE6A10007409A9C99509308AFE69D6
+:100360001000936A3019FE68100091693108FE6E22
+:1003700010009D68304EFE6710008F6E8F2A8F2E02
+:100380008F298F28760AAFAA970AE3BC0000D82AE3
+:10039000FE6B1000760AA7DA970A760AE01AFF8049
+:1003A000F9DCC007144C970C760CA7BC970C5EFDCB
+:1003B000FE6B1000760CF9DCC0075EFCD421E06C0B
+:1003C0001000E0670910EA170000EECBFFE4990B7C
+:1003D000781BE41B8000B7AB991B781BE01B8000E7
+:1003E000991BC47FFE6B11F0304A970A302A970A96
+:1003F000E06B1000FE6A1018950BE3BC0000300C97
+:100400008F4C8F5CAE6C8F6CD82A0000D421E067D3
+:100410000910EA1700006E6C580CC090585CC07050
+:10042000583CC030584CC021C6ADCC9FFE66116010
+:10043000E06C10003044781BF7DBC00F588BC070A5
+:10044000781BE01B8000991B8D04D82AEEE8001C65
+:10045000AF19781BE01B8000991B8E9C5CCCAE1CF6
+:100460008EAC5CCCAE2C8EBC5CCCAE3CFE6511F090
+:10047000E0A00590C081305C8F6CE86C00008B0CB4
+:100480008D04D82A8D048EECF9DCC006F80B15100B
+:100490005F0CE06B096CEA1B0000B68C300C0F8A15
+:1004A000A98AC072B61CB62C302C8F6CC14CD82ACD
+:1004B0008EBA580AC031CE3CD82AB61CB62C301C95
+:1004C0008F6C31078D07CD5E8B07E3BC0000D82A07
+:1004D00080000F90D431E0670270EA1780005D174A
+:1004E0003016FE6B11F097C6E3BC0000E064091003
+:1004F000EA140000686CE06503BCEA158000583C13
+:10050000C041CFDC5D15D83A582CC0305D15D83AC3
+:1005100088ECE065096CEA1500008AAB182B5C7B5F
+:10052000C1F10B8B580BC031CCACD83A30038A9B4D
+:10053000160C88BB163CC065685C580CC0305D1C4E
+:10054000C031AA83C2588AAC8A9B180BAA1BAA2363
+:1005500088EBF9DBC006F80A15105F0CAA8CE04B9B
+:100560000041F9BB0440E06A10007419E0198000F2
+:10057000F9DBC00F18499519741CE41C8000951C08
+:1005800068298AAC180995098AAC160CAA2C5D1743
+:10059000FE6B11F09706FE6A116095063089950989
+:1005A0009709E3BC0000D83AD431E0670910EA1794
+:1005B00000006E6CFE6611603025584CC0518D05F0
+:1005C000C9ECCFDED83AFE6411F0581CC080305C14
+:1005D0008F6CE86C0000890C8D05D83AE06B100038
+:1005E000761AF5DAC00FE063096CEA13000086ACF6
+:1005F00018998EE8F80A000E1C38C044F00C010A65
+:100600005C7AEEC8FFE46E2C1809149C1292580A0A
+:10061000C050113E201C04CECFD1761CE01C8000BF
+:10062000971C86AC140CA62CE04A0040C0715C7C80
+:10063000869B180B8EBA143BC0956E5C580CC0306C
+:100640005D1CCC608D05C1BCD83A8EEBF80B19004F
+:10065000C0C16E5C580CCBC05D1CCBA086AC869B29
+:10066000180BA61B300CA62C8D0531078D07FEB08C
+:10067000FE018907E3BC0000D83A0000D401303CF9
+:10068000E06B0910EA1B0000976CE06C1000781B0F
+:10069000E41B8000991B781BE01B8000991BFEB0B7
+:1006A000FDE9FE6B1160301A970AFE6911F0930A9A
+:1006B000308A970A930AE3BC0000D80AD401E06CA0
+:1006C0000910EA1C0000304B996BE06B10002E4CB7
+:1006D000970C761CE41C8000B7AC971C761CE01CC1
+:1006E0008000971CFEB0FDC6310BFE6A1160950BB1
+:1006F000FE6A11F0950BE3BC0000D80AD401E06B50
+:100700000910EA1B0000764C580CC0205D1CD80A6A
+:10071000D401FE6C1004780BAD9BC023D80AFEB048
+:10072000FDA9FE6A1220310B950B30899509E3BCB7
+:100730000000FE6C1130780AA39AC072340CFE6B74
+:10074000113097CCC64EDA0A780AA38AC032C2DFCB
+:10075000DA0A780AA19AC082FE6A11C07408A198C8
+:10076000C032CB9EDA0AE0680910EA180000706A0D
+:100770007808A588C0C299C9780BA19BC1A3582A43
+:10078000C031C9DFDA0A583AC141C0E87809A599F1
+:10079000CC6299CB780BA38BC0C3581AC031C6FF6B
+:1007A000DA0A584AC061E86C0000FE6B11C097CCB1
+:1007B000DA0A0000FE6C000C780BE06A1E94EA1A5C
+:1007C0008000F7DBC004F40B032CA99C5EFC000046
+:1007D000FE6A00007409A7C9340BF7EC006C124CD8
+:1007E000950C5EFDFE6B0008760CA19CCFC25EFDF1
+:1007F000D42118951697E0660008EA160000F01656
+:100800000000FE6C0004780BE01BFFC0EBD5C006B7
+:1008100016455807C0A6E01500FFE415FF000A9B27
+:10082000EBD7C010F7E51085EBD5C018EA15A50089
+:100830009905781CE21C000C8D1CF0160000D82ACB
+:10084000FE6B0008760CF9DCC0815EFCD4013FFB36
+:10085000309CCCFFD80A0000D401F60A1518304AA3
+:10086000F9BA0005189B149CCC4FD80AD4211896CD
+:100870001697CA1F0E9BA58CB9360C9CCEEFD82AB2
+:10088000D42118973006310520150E9B0A9CCEFF07
+:10089000E06B0008EA1B0000761C18465805CF5193
+:1008A0009716D82AFE6B00147618760A3009144978
+:1008B000F9DCC006EDBC0005F2081730F00C0A4860
+:1008C000A1985F3C5EFC0000D42118971696F7DCD7
+:1008D000C006308CC8EFEC0C1518C0400E9CCE3F03
+:1008E000D822DA2AD401F60A1518C061F9DCC0064C
+:1008F000189B307CC7EFD80AD401F60A1518300BC4
+:10090000C030CE3FD80ACEFFD80A0000D4013FFB4A
+:10091000303CFEB0FF6FD80AD401189B30CCFEB03B
+:10092000FF69FE6B0008760CF9DCC0A1D80200005C
+:10093000D42116973016189B302CFEB0FF5BEE0CBE
+:100940001518C0C0E0670008EA1700006E153FFCEC
+:10095000CE4F18966E1C18458F150C9CD82200009F
+:10096000D431189730163005FEB0FF261894C09881
+:1009700020140E9B089CCDDF18665C56661C18453B
+:10098000E0630008EA1300005804CF3187150C9C7F
+:10099000D8320000D4013FFB30FCFEB0FF2BFE6BD1
+:1009A0000008760CF9DCC0A1D8020000D421189709
+:1009B0003FFB30ECFEB0FF1EEE0C1518F9BC000139
+:1009C000C020CE9FD8220000D4013FFB30DCFEB017
+:1009D000FF11D80AD671204D30013003FE6C000C97
+:1009E0007809FC188000E06E1E94EA1E8000F3D99E
+:1009F000C004FC09032C18085028405616970C0A0E
+:100A00001495FC1C80001836C0825C361606180649
+:100A10000C97FC168000C0D81036C0B3FC1C808038
+:100A20001836C0725C36160618060C97FC168080C5
+:100A3000E06C0201EA1C8080183AC063E0650200A5
+:100A4000EA158080C098301CEA1C8080183AC042A9
+:100A50001438FBF530020A9CA1CCE01CFFFCE01C22
+:100A6000FFF8503CE5D5C003C0E8580BC050300C2F
+:100A7000C9EF681C18433FFB30DCFEB0FEBB069C90
+:100A800068131843E0640008EA1400000A36E082A4
+:100A900000AA3FFB303CFEB0FEAD681C18430C9929
+:100AA000E019FE00F2CCFE00403AF40C0D4E0A9C18
+:100AB000E01CFE0018395F2CF7D6C009C2200C904C
+:100AC000E010FFF8C038B30AB32A0039CFD3F7D605
+:100AD000C003C1703008133AFA080B0A2FF8163811
+:100AE000CFB35888C0620F3BFA080B0B2FF8CFAB7F
+:100AF0000096403A1430C042BB0AAD2AC0283011DB
+:100B0000A39EEC0B1603161E1C98303B0E6B167B37
+:100B1000C040202BC080C1E85808C1E0AF0BAD2A0F
+:100B20002018CFBB5808C180300B0F2AFA0B0A1AC5
+:100B30002FFB584BCFB3BB0AAD2A2018CF4B300B3D
+:100B40000F3AFA0B0B0A2FFB588BCFB3BB0AAD2A17
+:100B500020185808CF51F80B1518C200E20C1518D0
+:100B6000C0300498C0983008C0580F3CFA080B0CED
+:100B70002FF80438CFB30A995802C061C0C8133C9B
+:100B8000FA080B0C2FF85888CFB3BB0AAD2AC0382F
+:100B9000B30AB32AF9D9C009CFC1301CEA1C80803E
+:100BA0001836FB3B001BFE92FF62580BC070300BE7
+:100BB0003FFCFEB0FEBF681C18433FFB301CFEB07C
+:100BC000FE19069C68131843402B1636FE93FF5CF3
+:100BD0005C360E06FC1C808018060C97FC16808084
+:100BE000C52B8913405C2FCDDC720000E06C00A0A7
+:100BF000EA1C0000782B760A15BC2FEAF5DC5000C1
+:100C00005CCCE06B00A0EA1B0000762A740B5C7CD5
+:100C1000160C5EFCD42118961697CE9F0D8B1606E7
+:100C20001836C0920D9B584BC060F6071800CF7164
+:100C30000C9CD822D82A0000D42118961697E06C74
+:100C400000B0EA1C0000198B580BC021D82AE065BF
+:100C500000A0EA1500006A2B760C19CBF6061800E6
+:100C6000CF628B3CCC4FC048178A140B8B3B6A3B3E
+:100C7000183BCED2179A584ACF8117AAF40618000B
+:100C8000CF4117BAF4071800CF01DA2AD4211897F8
+:100C9000E0660C38EA168000300B5D16C021D82AB9
+:100CA000E06500A0EA1500006A2C781BF6070F84A7
+:100CB000683C5D1C189B0E9C5D16CF206A3C305B27
+:100CC000CAAFCFE1681C5D1CDA2A0000D421189756
+:100CD000CB4FC021D82AE06600A0EA160000305BA6
+:100CE0006C3CC99FCF816C2C781BF6070F8CF01CD5
+:100CF00000005F1CD8220000D421E06700A0EA17A2
+:100D00000000E06600B0EA1600000D8C580CC0C070
+:100D10003005C0580A9CCBBF2FF55C556E2C780B64
+:100D200017CC1835CF85300CAC8CAE1CD82A0000FF
+:100D3000D401E06B0910EA1B0000969C5C5CFEB0DD
+:100D4000FB29D80A80000390E06B0910EA1B000021
+:100D5000969AF3DAC008E068008CEA180000F40CF8
+:100D60001608201CC060201CC0F0201CC2205EFDA4
+:100D7000700C972C198AB66A96BC96EAF40C190086
+:100D8000F7FC3C065EFF700CF93A00111439C025DF
+:100D90005EFD701CF809033A972AF809033811BC64
+:100DA0002FE8F1DC50005CCCB66C302CB49CCE5BF0
+:100DB000E06C0014EA1C00005C5A147AC060201A2F
+:100DC000C0D0201AC0E05EFD304A972C96BCF40CCF
+:100DD0001900F80A1730B66A5EFF2FCC30CACF6B05
+:100DE0002F0C308ACF3B0000D431E0660910EA16A0
+:100DF00000000D8BE06400B0EA140000098CE0678D
+:100E000000A0EA170000EDBB0007C5028CBAF40988
+:100E10001510C021D83AF7DBC00530293015C18143
+:100E20000D9C187CC060206CC0B0202CC0B0D83A9B
+:100E3000582AC020D83A2FE78D27AC69DA3AC85F24
+:100E4000D832581AC020D83A8D24AC65DA3A581BEB
+:100E5000C1F10D9B58ABCDF1581AC020D83AF80B10
+:100E60001518CFD08CA45C546E2C780B17CC18348A
+:100E7000CF64300B089CCE1ECF206E2C781BF6045E
+:100E8000032C783B5D1BAE8C8D27AC65DA3A582B72
+:100E9000CC210D9C580CCBF1582AC020D83A300CEC
+:100EA000AE2C2FC78D27AC69DA3AF7DBC005E065B9
+:100EB0000CCCEA158000580BC4F10D9C201CC140DD
+:100EC000202CCA90202CC060202CCA50202CC1801D
+:100ED000D83A8CBC580CC020D83AE06C0D30EA1CD3
+:100EE00080008D4CDA3A8CBC580CC020D83A8C9CCF
+:100EF000581CCFD18E9CE21CFDFFAE1CDA3A8CBC94
+:100F0000580CC020D83AFEB0FA55CFD0E063008C20
+:100F1000EA130000660CF93B00118C9CF80B1800DA
+:100F2000CF23CEBE8C9CA88C5C5CF80B1518C0211E
+:100F3000DA3A661BF60C003B208B8F2B30066E2CAA
+:100F4000780B17CC1836CF54300B0C9C5D15CDB0F8
+:100F50002FF65C56CF5B581BFE91FF5E0D9B58BB76
+:100F6000FE91FF5A8CBB580BC030300CC0E8F80B18
+:100F70001518CFC08CA45C548C975C57089CC87E15
+:100F8000CF500E9B089C5D155C5CD832800003B08E
+:100F9000D421300CE0670910EA170000AE6C8F4CCA
+:100FA0008F5C0F8CEDBC0007C0528EBB580BC0216C
+:100FB000D82AE21C0060C041C18FC020DA2A0F8C01
+:100FC000F9DCC005581CCF51E06C00B0EA1C0000F1
+:100FD000198B580BCEE08EA65C56E06700A0EA178E
+:100FE00000006E2C780B17CC1836CE34E0650C3828
+:100FF000EA158000300B0C9C5D15CDB06E2C781B73
+:10100000F60603276E3C5D1CF7DCC0080C9C5D15E2
+:10101000CD006E2C5D1CCD31D82A0000E07B86A06F
+:10102000FE7A0814740918695E1D201BCFA15EFEAC
+:10103000D421FE780818E06E1200EA1E007AE067FC
+:10104000C6C0EA17002DEC76BBA0580CC2414A3549
+:101050006A0CA1AC0C3BC0323009C0980E3BC032C8
+:101060003019C0581C3B3029F9B90203189EE01E04
+:10107000FFF9306CF9E900191C49129BE1BC000032
+:10108000D3033249EA19AA0091098B0BB19CC243E0
+:10109000D503D82A49256A0C1895A1A50C3BC03266
+:1010A0003009C0980E3BC0323019C0581C3B302963
+:1010B000F9B90203E015FFF9306CF9E9001912459E
+:1010C000E1BC0000D3033289EA19AA00910948491A
+:1010D0009305B19CCDE2D82AFFFF0824FFFF082822
+:1010E000D401202DA36CFE790824F20C0308FA0C1D
+:1010F0000908109EE01EF0FFA96BE21B0F001C4BBD
+:10110000B1ABFA0C090BE1BB0000D303F8C8FFDC5C
+:10111000EA18AA00FE7E08189D08FA0C030EF20CCD
+:10112000090EB19BC023D503F40C1518C060301C08
+:10113000C76FC0303FFCC028300C2FEDD802000034
+:10114000D401202DA36CFE7A081CF40C030BFA0CBE
+:10115000090B1699E019F0C1E419C0F0FB38001C26
+:10116000306BF7E800181049FB38000CFB3E000E0E
+:10117000F1EE1018FB3E000DF1EE1028338BF7E86E
+:10118000003810494058A968E2180F00104940483B
+:10119000EE7B0000F7E8010810494068B968E618DE
+:1011A0003F001049FA0C0909E1BB0000D303F8C95C
+:1011B000FFE4EA19AA00FE7808189109FA0C03085E
+:1011C000F40C0908B19BC023D5032FEDD80A000009
+:1011D000202DA36CFE7B081CF60C030AFA0C090AEE
+:1011E0001499A1A9FA0C0909E1BA0000D303F8C9BE
+:1011F000FFE4EA19AA00FE7808189109FA0C03081E
+:10120000F60C0908B19AC023D5032FED5EFD00004E
+:10121000202DA36CFE7B081CF60C030AFA0C090AAD
+:101220001499A1C9FA0C0909E1BA0000D303F8C95D
+:10123000FFE4EA19AA00FE7808189109FA0C0308DD
+:10124000F60C0908B19AC023D5032FED5EFD00000E
+:10125000FE7B0814580CC051760CA59C5E3DCFDB7C
+:10126000760CA78CCFE25EFDE07B86A0FE7A086458
+:10127000F40C002A740CA1CC950C740CA19C5E2D6E
+:10128000201BCFC15EFE0000D431169714953003A9
+:10129000F20616012016FE740864E80C0024680BA0
+:1012A000A19BC0623013CE1FC0373FFCD832B1665D
+:1012B000E61600FF302CF9E500150C45A967E2178A
+:1012C0000F000A4789075813C041680CA1AC890C6C
+:1012D000D83A0000D42120ADE0672400EA1700F4DA
+:1012E0000E9B300CFEB0FEA6301A306B300CFEB0F8
+:1012F000FEF90E9CE0A0048EE0671DA8EA178000AE
+:10130000301C5D173009300A300BFE7C0C00E0A069
+:1013100004CBC021C008FE7C0C00E0A004D5E0A0F6
+:1013200002854ABB161CC040161CC040C058305C29
+:10133000C048302CC028303C300BFB6B002433FA03
+:10134000508A507B506C301CFB6C0016FB6B0015F8
+:10135000FB6C0014FACCFFEC1A9B3149190A16AA4F
+:101360002049CFD1300CFEB0FEED300CFEB0FF3284
+:10137000300CFEB0FF6FE06607D0EA168000301C2C
+:101380005D16303C5D17E0671C5CEA178000301B7F
+:10139000300C5D17301B301C5D17301B303C5D1767
+:1013A000301B302C5D17301B304C5D17300C5D1638
+:1013B0002F6DD82A80001030800010E080001C10B3
+:1013C00080001CA480001CC480001828007A120031
+:1013D000800011D080001250D42120ADE06707D0EA
+:1013E000EA178000301C5D17E0661C5CEA1680007E
+:1013F000300B300C5D16300B301C5D16300B303C62
+:101400005D16300B302C5D16300B304C5D16300CF9
+:10141000E0A004CC300C5D17300CFEB0FEFB300CAD
+:10142000FB6C0024508C507C506CFB6C0016FB6CE9
+:101430000015FB6C0014FACCFFEC1A9B3149190A19
+:1014400016AA2049CFD1300CFEB0FE7C2F6DD82AD1
+:1014500080001DA88000121080001140D431201D92
+:101460003007E06608FCEA1600008D27E0650910E9
+:10147000EA1500008B578B47E06400B4EA140000C3
+:10148000A887302CA8CCE06300BCEA13000007ACAE
+:101490000DCBE06A1B58EA1A800030A20789201998
+:1014A000C0802029C1F02019C4A02029C680C3E82B
+:1014B000F60C1518C3E1E6CCFFFE5D1AC370079C5D
+:1014C000580CC341E06C00FCEA1C00008B2CE06C63
+:1014D0000800AA6CE06C1A7CEA1C80008B5C301C53
+:1014E000C2C8F60C1518C251E6CCFFFE5D1AC1E069
+:1014F000E06C003CEA1C00000DDBF80B0F8A741C4A
+:10150000580CC031303CC168079C187CC040201C7E
+:10151000C080C0C8E06C1BB4EA1C80008D2CCE0BD0
+:10152000E06C19F0EA1C8000CFAB098C580CC0416C
+:1015300030FCA88CA8C2300C2FFDD832079B167B3C
+:10154000C040203BC0C0CF5BE04C00FFCF21E0A0FB
+:10155000043DC030ACC7CC4B304CCECB187CC04027
+:10156000201CC080CE6BE06C1910EA1C80008D3C02
+:10157000CB7BE06C1934EA1C8000CFABF60A15185F
+:10158000CD81079B583BCD5107BB189A187CC040B2
+:10159000201AC090CCEB587CC044ACDB8D07CA0B42
+:1015A000308CCC8B300C500CBA8B07CCBA9C400BD7
+:1015B000E06C003CEA1C00000DDAF80A0F89720C9E
+:1015C000183BCEF28D0BC8CB80001DC8D40130096A
+:1015D000FC188000100CFEB0F9FFD80AD42118972F
+:1015E000F40C1510C040FEB0F92DAE8CD82AD703EC
+:1015F00080000840D401F40C1510C060178C580C02
+:10160000C030FEB0F925D80A8000084CD4211895C6
+:1016100016971496C0680E9CFEB0F9462FF70ACCB8
+:101620000C9CFE360001F80B1510CF61D82AD703A9
+:10163000800008A4D421189616951497C0680B3B17
+:101640000C9CFEB0F95B2FF60E9CFE370001F80BE8
+:101650001510CF61D82AD703800008F8E069001080
+:10166000EA190000F60B001B16091898580A5E0DBF
+:10167000133B201A10CBCFD15EFD0000E06900982B
+:10168000EA190000F20B00291898580A5E0D133B66
+:10169000201A10CBCFD15EFDFC198080120B189858
+:1016A000580A5E0D1739201A10C9CFD15EFD00000F
+:1016B000D4013019FC188080100CFEB0F98DD80AC6
+:1016C000800009D4E06C0098EA1C0000358BB88BD0
+:1016D000320BB89BE1BB0040B98BB8ABE1BB00401B
+:1016E000B18BB8BB5EFD0000D401201D301A300B59
+:1016F0001A9CC75F1B8B580B5F1C2FFDD802000084
+:10170000D401C81CFEB0FFE0FEB0FFF0E06B08FCA7
+:10171000EA1B0000B6CCDA0A800016C4800016E886
+:101720005EFD0000D401E06C0910EA1C0000198A7B
+:10173000149BE21B0060E04B0020C020D80A1999DE
+:10174000E06808FCEA180000E06B00B4EA1B000047
+:10175000A98AC2522029C1B02019C0402029C0C086
+:10176000C4B8989A580AC48198BA586AC451992B37
+:10177000306BB86BDA0A989A580AC3E198BA581ACB
+:10178000C3B12FCB992B301BB86BDA0A17CC58ACEE
+:10179000C330702C580CC3005D1CD8022019C10046
+:1017A0002039C0602029C28117CA58AAC250989A0D
+:1017B000580AC22198BA580AC1F1C25CDA0A17CA9B
+:1017C00058AAC1A0703A580AC070E06B1DE0EA1B2D
+:1017D0008000994BDA0A98BA580AC0E0E06B00BC66
+:1017E000EA1B0000992B340BB86BE06B145CEA1B0E
+:1017F0008000995BDA0A30FCB68C30ACB6CCD80AE3
+:101800005EFD0000300CE06B00B4EA1B0000B68CFB
+:10181000302AB6CAE06B08FCEA1B0000B6DC970C65
+:10182000972C973C5EFD0000D431205DFACCFFF888
+:10183000E06B1F4CEA1B8000B709B928170818A8ED
+:101840003FF73FF4E0661E28EA1680005D16E0A030
+:1018500002F7501CE0651E80EA1580005D15E0A0CF
+:10186000031518905D165D15300330053006C2185B
+:101870001830C1F4401B0A3BC1C41615F80001061C
+:10188000EC0B141FE072C200EC020648F60203499A
+:10189000109A129B0A98EA09141FE0A0025F1493A1
+:1018A000580AC070400C141C5C4CE04C2711C12538
+:1018B00050030A920C91E0A002C31895E0A002E642
+:1018C00018960435C035023CCD445803C031300C65
+:1018D000C178300CFACAFFF8F40C032B062B083B36
+:1018E000F6041730F80717302FFC583CCF435BF74E
+:1018F000E60C1700C050FACBFFF8F607032C2FBDFB
+:10190000D832D70380001D5880001E3C80001E88FE
+:10191000D401300CC24CD303FE7C1000E06B0A03F0
+:10192000EA1B5501990BE06B0A03EA1BAA01990B0C
+:10193000C0080000D401300CC12CFEB0FD4F300CAB
+:10194000E3BC0042E1BC0042E04C0480CFC3FEB0E7
+:10195000F3C6D80A800013D8800000DAD421189783
+:10196000300CE06B01FCEA1B8080EE0A1518C040C9
+:10197000760AAB8AC373760AA9DAF5E71097318B3A
+:10198000EE0B0A4A5C5A145CA96C5C7C308AEDBC94
+:10199000000FC042EC1C83805C7CA17C5C7C201A24
+:1019A000CF71A98C208BCED1E017FF001847FC1611
+:1019B0008080FEB0F7AD37FC6C0B0CAB201CCFD198
+:1019C000E06B01FC169C6C0A163CEE0A17000CAA90
+:1019D0002FCCE04C0200CF85300CFEB0F7E9FEB012
+:1019E000F7F5D82A8000090C800009AC800009C8EE
+:1019F000D431E06708FCEA170000E066003CEA1614
+:101A000000000FDCEC0C0F8BF735000CE06300FCE2
+:101A1000EA1300006E4C580CC250E06B0800F80B43
+:101A20000D445C74081C8F4C089A6E0B069C0FD9F1
+:101A3000EC090F8870195D19069CC0486E0B2FFBCE
+:101A40008F0B089BFE3400015C74F60A1510CE3033
+:101A5000193B0A3BCF40305CE06B00B4EA1B00004E
+:101A6000B68C0FACA68C0FBCA69CE06C0910EA1CCF
+:101A700000009923302BB86BDA3A0000D421E065DE
+:101A800008FCEA1500006A0BF7DBC0066A4C160C6E
+:101A90008B4CE0670800F8070D4C5C7CF80B0104E8
+:101AA0005C746A4A181A8B4AE06600FCEA16000069
+:101AB000580CC100089A0C0B6A0CE069003CEA194A
+:101AC00000000BD8F2080F8E7C295D196A0C080CF7
+:101AD0008B0CE06C0910EA1C00009926B867E06BDB
+:101AE0001A7CEA1B8000995BDA2A0000EBCD40FEED
+:101AF000E06C1F58EA1C8000E06E1F70EA1E800038
+:101B0000300A300B190719061905EFE61003E7D361
+:101B1000C002C1C1EA041603C1900C37C090AF09DE
+:101B20002014AD28CFD1EBD5C003C121C0B82014FB
+:101B3000AD2ACFE1EBD5C003C050300220150CC256
+:101B4000CFD11C3CCE03E3CF80FE0C37CF700F31DA
+:101B500020150CC1CEBB0000D401201DE06B08FC99
+:101B6000EA1B0000760A500A198AB6AA199AB6BA70
+:101B700019AABAAA19BABABA760C1B091839C0B38D
+:101B8000E06A003CEA1A000017D8F4080F8E7C0ABD
+:101B90001439C0B3E06C00B4EA1C0000308BB88B81
+:101BA00030ABB8CB300CD802122C2FFC974C301C29
+:101BB000D8020000D421E06708FCEA170000E06CBE
+:101BC00008006E4BF60C0D465C76F606010C8F4C49
+:101BD000E06500FCEA1500000C9A6E0B0A9CE069B7
+:101BE000003CEA1900000FD8F2080F8E7C195D192D
+:101BF0006E0C0C0C8F0CE06C0910EA1C000099258F
+:101C0000B866E06B1BB4EA1B8000995BDA2A00001F
+:101C1000D4211897E06607F0EA168000E06B07D041
+:101C2000EA1B8000E06C8A41EA1C01F71837C10307
+:101C3000301C5D1BE06C1481EA1C03EF18373FFB7E
+:101C4000C042311C5D16D82A310C5D16D82A300CE2
+:101C50005D1B3FFB311C5D16D82A0000D401FE79C4
+:101C60000404720AFE7904D47208A788C0333FFCCA
+:101C7000D802E1B90000D3033048F00C0028EA187C
+:101C8000AA00FE7E04589D08E01AFFF8F7DBC003A7
+:101C9000144BA7BBFE7A0404F40C092BB199C023A2
+:101CA000D503D80AD4017828BD98CFE3A96BA1AB9E
+:101CB000F94B0040B16A990A782BB99BCFE3129B8C
+:101CC000C0CCDA0A782BB99BCFE3780BA1AB990B88
+:101CD000782BB99BCFE35EFD782AB99ACFE3991BA5
+:101CE000782BB99BCFE35EFDD4013009300A305B1D
+:101CF000300CFEB0FACB300CE0A00080D80AD7033D
+:101D000080001DF8D401300CFE7B0864970C30096C
+:101D1000300A305BFEB0FABAD80AD70380001288C6
+:101D2000D401D503FEB0FAD8E0A000A6E0A000924E
+:101D3000C031E0A00095C008800012D480001E745D
+:101D400080001E50D401F80B1518C030E0A00088A8
+:101D5000D80AD70380001E5CEBCD4080340C3007DE
+:101D6000300EA17A5CFB5CFE5CF7103EF2071300BC
+:101D7000C053101EEE090147A1AA201CCF310E99B5
+:101D80001C98E3CD80800000E0690000EA19800023
+:101D9000121CF9DCC00EF9EA11ECFE7A0000A59BDA
+:101DA000F40B092C5EFD0000E1BB0000D303FC1A1C
+:101DB000AA00FE790458930AFE7A0400950CB19BA0
+:101DC0005E3DD5035EFD0000D401300CFEB0F55A37
+:101DD000300CFEB0F5C7DA0A800008808000096088
+:101DE000D401E0A00043E06C08FCEA1C0000783B52
+:101DF0005D1BD80A80001E68FE7B0864F60C002B71
+:101E0000760CA19C5E3D760CA1AC970C5EFD0000AB
+:101E1000FC198000120B1898580A5E0D1739201A09
+:101E200010C9CFD15EFD0000D401300BFE7C0C0048
+:101E3000FEB0FF54D80AD70380001CD8D401FE7C22
+:101E40000C00E0A00027A17CD802D70380001E90E0
+:101E5000D401FEB0F213D80280000278D401FEB0A3
+:101E6000F273D80A80000344D401FEB0F25BD80AB2
+:101E700080000320D401FEB0F203D80A8000027C67
+:101E8000300CE3BC00425EFDE1BC00425EFC0000A1
+:101E9000781B5EFB000010000000200000004000E6
+:101EA000000080000000C000000100000001800070
+:101EB0000002000000030000000400000006000013
+:101EC00000080000000C00000010000000200000CE
+:101ED00000000000000000000000000000000004FE
+:101EE0008000167C000000000000000000080000D8
+:101EF00080001E10800015CCFF00000000000000D4
+:101F000000000000000000000000000000000001D0
+:101F1000800015DC800015F40000000000000020A7
+:101F20008000160C80001634010000000000000341
+:101F30008000165C000000000000000000000200AD
+:101F400080001698800016B0FF000000007A120092
+:101F500000B71B0000F4240080001F700000000880
+:101F60000000008C0000009800000098000008DAD3
+:101F7000800007E4000000001000000004030904D2
+:101F80000C03410054004D0045004C000803440080
+:101F9000460055008000170080001720800017249D
+:101FA0008000180080001EEC80001EFC80001F0CCA
+:101FB00080001F1C80001F2C80001EDC80001F3C46
+:101FC0001201000200000040EB03EB2F00010102B0
+:101FD0000001000009021200010100800209040052
+:101FE00000000000000000000000002C0000006C59
+:0C1FF00000000080000000580000008489
+:040000058000000077
+:00000001FF
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.0/at32uc3c-isp_cfg-1.1.0.dat b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.0/at32uc3c-isp_cfg-1.1.0.dat
new file mode 100644
index 0000000..76f0ab2
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.0/at32uc3c-isp_cfg-1.1.0.dat
@@ -0,0 +1 @@
+’žbáÿ× \ No newline at end of file
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.0/program_at32uc3c-isp-1.1.0.cmd b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.0/program_at32uc3c-isp-1.1.0.cmd
new file mode 100644
index 0000000..3bf47f7
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.0/program_at32uc3c-isp-1.1.0.cmd
@@ -0,0 +1,56 @@
+@echo off
+setlocal enableextensions enabledelayedexpansion
+
+: This command script programs the ISP (flash array), the ISP
+: configuration word (User page) and the general-purpose fuse bits.
+
+: Copyright (C) 2006-2008, Atmel Corporation All rights reserved.
+:
+: Redistribution and use in source and binary forms, with or without
+: modification, are permitted provided that the following conditions are met:
+:
+: 1. Redistributions of source code must retain the above copyright notice, this
+: list of conditions and the following disclaimer.
+:
+: 2. Redistributions in binary form must reproduce the above copyright notice,
+: this list of conditions and the following disclaimer in the documentation and/
+: or other materials provided with the distribution.
+:
+: 3. The name of ATMEL may not be used to endorse or promote products derived
+: from this software without specific prior written permission.
+:
+: THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED
+: WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND
+: SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,
+: INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+: BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+: DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+: OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+: NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+: EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+echo.
+echo Performing a JTAG Chip Erase command.
+avr32program chiperase
+
+echo.
+echo Programming MCU memory from `at32uc3c-isp-1.1.0.hex'.
+avr32-objcopy -I ihex -O binary at32uc3c-isp-1.1.0.hex at32uc3c-isp-1.1.0.bin
+avr32program program -finternal@0x80000000 -cint -e -v -O0x80000000 -Fbin at32uc3c-isp-1.1.0.bin
+del at32uc3c-isp-1.1.0.bin
+
+echo.
+echo Programming ISP configuration word \(default for EVK1100 i.e. Word2 == 0x929E1424 and Word1 == 0xE11EFFD7\)
+avr32program program -finternal@0x80000000 -cint -e -v -O0x808001F8 -Fbin at32uc3c-isp_cfg-1.1.0.dat
+
+echo.
+echo Programming general-purpose fuse bits.
+avr32program writefuses -finternal@0x80000000 gp=0xFFF7FFFF
+
+echo.
+echo Resetting MCU.
+avr32program run -R
+
+pause
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.0/program_at32uc3c-isp-1.1.0.sh b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.0/program_at32uc3c-isp-1.1.0.sh
new file mode 100644
index 0000000..de04095
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.0/program_at32uc3c-isp-1.1.0.sh
@@ -0,0 +1,59 @@
+#!/bin/sh
+
+# This shell script programs the ISP (flash array), the ISP configuration words
+# (User page) and the general-purpose fuse bits.
+
+# Copyright (c) 2009 Atmel Corporation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice, this
+# list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# 3. The name of Atmel may not be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# 4. This software may only be redistributed and used in connection with an Atmel
+# AVR product.
+#
+# THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+# EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+#
+
+
+echo
+echo Performing a JTAG Chip Erase command.
+avr32program chiperase
+
+echo
+echo Programming MCU memory from \`at32uc3c-isp-H.hex\'.
+avr32-objcopy -I ihex -O binary at32uc3c-isp-1.1.0.hex at32uc3c-isp-1.1.0.bin
+avr32program program -finternal@0x80000000,512Kb -cint -e -v -O0x80000000 -Fbin at32uc3c-isp-1.1.0.bin
+rm -f at32uc3c-isp-1.1.0.bin
+
+echo
+echo Programming ISP configuration words \(default for EVK1100 i.e. Word2 == 0x929E1424 and Word1 == 0xE11EFFD7\)
+avr32program program -finternal@0x80000000 -cint -e -v -O0x808001F8 -Fbin at32uc3c-isp_cfg-1.1.0.dat
+
+echo
+echo Programming general-purpose fuse bits.
+avr32program writefuses -finternal@0x80000000 gp=0xFFF7FFFF
+
+echo
+echo Resetting MCU.
+avr32program reset
+
+pause
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.0/readme.txt b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.0/readme.txt
new file mode 100644
index 0000000..7b4d631
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.0/readme.txt
@@ -0,0 +1,4 @@
+Header files package: SVN revision 10251.
+
+
+IAR version : 3.31 \ No newline at end of file
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.1/at32uc3c-isp-1.1.1.hex b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.1/at32uc3c-isp-1.1.1.hex
new file mode 100644
index 0000000..cd7f4ee
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.1/at32uc3c-isp-1.1.1.hex
@@ -0,0 +1,504 @@
+:0200000480007A
+:10000000E1B80000F1D8C2C35818C090FEC8FFF094
+:10001000FC190061E06D0DF4D041D6033008FE7983
+:100020001000E06A01FCEA1A8080FE7B0400700088
+:10003000E061504BEA1149537402E06301070494F4
+:10004000C76CC141E7D2C210E043E11EC0F1EDB27E
+:100050000009C0C3F6F30180E06423170873C131BF
+:10006000EDB30003C3830230C3C1C53C9101E06D11
+:100070000E0CD353FEC00074E3B00001E0A00CF8F6
+:10008000E0A00D98EDB20008C262E06A01F8EA1A39
+:1000900080807402E06301070494C49CCE71E7D2AF
+:1000A000C22FE043494FCE21E7D2C108E043007C94
+:1000B000CDD2FE7A2000E6041605A974080A7584DC
+:1000C000E013001FE8030A44E7D2C2010654EDB46E
+:1000D0000000CCC20230C051C1CC300830009100C9
+:1000E000FC100061E3B0000030003001300230034A
+:1000F000300430053006300730083009300A300B44
+:10010000300C300D300EE3B00001E3B0004248BFC8
+:10011000FC1255009302EE12FF0093021C9FE805AB
+:100120001200EA051117E60509450A54E04400FFEC
+:10013000FE9BFFF758045EF480002000308A310CEB
+:10014000FE6B10047609AD99C1837609A589C55364
+:10015000FE6A18003019763EA19EC5727608A198F5
+:10016000C542740BAFCB950BFE6B10049749975C9F
+:10017000740CAFAC950CC6D8FE691220930C930A90
+:10018000FE6911307208A398C042E0A0019DC61814
+:100190007208A388C042E0A0025FC5B87208A198A7
+:1001A000C092FE6811C0700EA19EC042E0A001E4A2
+:1001B000C508E06E0980EA1E00007D08720EA58E5B
+:1001C000C08293CA720CA19CC4435838C421C0F8A1
+:1001D000720EA59ECBB293CC720CA38CC3A35818FD
+:1001E000C041E0A002A5C3585848C331E86C0000E4
+:1001F000FE6B11C097CCC2D8971AE0A00521E0A0F1
+:100200000107E0A0014DC258763EA59EC1227608A6
+:10021000A598C0F27408AFC89508FE6A1800741853
+:10022000AF98C043760AA19ACF92974C9759C118BC
+:10023000741BA38BC0E2740CAFCC950C302C952CA6
+:10024000740CAFAC950C741CF9DCC161E0A00CC45B
+:10025000FE6C1800786BD603800004C4800006543E
+:10026000800005748000072C80000C3C8000040C8A
+:100270008000049C80001BD4E1BC0000D3035EFC22
+:100280005EFF0000D421E0A00CB5CF7F1897FE667A
+:1002900018006C0CAFDC8D0C6C0C300AE06B0100AC
+:1002A000E06C013CEA1C8000E0A00CF06C0CB9BCD6
+:1002B0008D0C6C0CB9CC8D0C6C0CADCC8D0C6C0C0D
+:1002C000ADAC8D0C6C0CAFBC8D0C6C0CAFCC8D0C34
+:1002D0006C0C6C1BAF9BCFE2E0690980EA1900004F
+:1002E000300A300BF2EB0020F2EB0028F2EB00308A
+:1002F000F2EB00386CCB2E098DC9FE6C1000780B28
+:10030000ADCB990B780BE81B0C00990B6C0CA1BCC6
+:100310008D0C6C0CAFAC8D0CFE7C0588780BA1AB02
+:10032000990BB197C023D503D82AD70380001BF0BF
+:1003300080001C88D421CA1F1897FE6C1800780B07
+:10034000AFDB990B780BADCB990BE0A00C61B197AB
+:10035000C023D503D82AD70380001C0CD421C8DFC2
+:100360001897FE6618006C0CAFCC8D0C6C1BAF9B05
+:10037000CFE2FE6C1000780BA9CB990BE0A00460D3
+:10038000C46CC8DC308CFE6B1000976C301BFE6AAE
+:100390001000956B310AFE691000936A932C304C63
+:1003A000932C933B932A6C0CAFAC8D0CB197C0236C
+:1003B000D503D82A80000C3CFE6C1800780BAFCB1C
+:1003C000990BFE6C1000780BA9AB990B5EFD000039
+:1003D000FE6B1000760AA7DA970A760AE01AFF8009
+:1003E000F9DCC007144C970C760CA7BC970C5EFD8B
+:1003F000FE6B1000760CF9DCC0075EFCE06A098039
+:10040000EA1A0000952CB46B5EFD0000D401FE6C6E
+:100410001000780BE01BFF80990B780BA7BB990BA2
+:10042000FE6C1100780B308A3409F20A0C4AE0693C
+:100430000400F4090D4AE01BE68B3FF9F20A001AAA
+:10044000F4091200F20A111CA56AE21A1974144B7D
+:10045000990BE06C0980EA1C0000F8CBFFBC998B7B
+:10046000789BE41B8000999BFE6C1000787BA1AB0D
+:10047000997BFC1C0100FE6B11F097CCCFEEFE6B5C
+:1004800011F0304A970A302A970AE06B1000FE6A92
+:100490001000956BB19CC023D503D80A301CFE6BAD
+:1004A0001220970C302CFE6B1160970C300CE06B17
+:1004B0000980EA1B0000974C975CB66CF74C004033
+:1004C0005EFD0000D421E0670980EA1700006F0C90
+:1004D000580CC030C5EDCE3FFE6611F0FE651160D0
+:1004E00030446E9CF9DCC00F588CC090305CEF4CEF
+:1004F0000040E86C00008D0C8B04D82AEEEA004422
+:10050000AF1BF9DBC0105CCCAE1C8EAC5CCCAE2C4F
+:10051000F9DAC0105CCCAE3CE0A004E8CE808B04DD
+:10052000E06C0A04EA1C0000300B0F8AA98AC0F2B2
+:100530008EEAF5DAC006F40915105F0AB88AB81B0E
+:10054000B82B302CEF4C0040C16CD82A8EBA580A18
+:10055000C031CEDCD82AB81BB82B301CEF4C004081
+:1005600031078B07C8AE8D07B19CC023D503D82AAD
+:1005700080000EE8D431E0630278EA1380005D1356
+:100580003017FE6B11F097C7B19CC023D503E0660E
+:100590000980EA1600006D0C583CC041CFACC7FF83
+:1005A000D83A8CECE0650A04EA1500008AA4182405
+:1005B0005C74C1F10B8B580BC031CD5CD83A300262
+:1005C0008A9B160C8CBB163CC0656C5C580CC0300A
+:1005D0005D1CC031AA82C1188AAC8A9B180BAA1B69
+:1005E000AA228CE4F9D4C006F80B15105F0CAA8C73
+:1005F000E0440041F9B404405D13FE6B1130760A0B
+:10060000A38AC082B19CC023D503304CED4C00407E
+:10061000D83A6C298AAB1609089BECCEFFBC58046B
+:10062000C0501338201B1CC8CFD18AAB080BAA2B93
+:100630006C9BE01B8000E9D4C00F16448D94FE6BC8
+:10064000113097C7FE6B11F09707B19CC023D503FB
+:10065000D83A0000D431E0670980EA1700006F0C37
+:10066000FE6611F0E86500003054581CC0C0582CDC
+:10067000C030584CC031C8DCC048EF4400408D0544
+:10068000C0EFD83A6E9BF7DBC00FE0630A04EA13B1
+:10069000000086AC189A8EE9F80B00081039C044A7
+:1006A000F20C010B5C7BEEC9FFBC6E2C180A169C89
+:1006B000149E580BC0501338201C1CC8CFD186ACD8
+:1006C000160CA62C5C7CFE6211603021E04B0040D1
+:1006D000C061869B180B8EBA143BC0F5AE6C6E5C85
+:1006E000580CC0805D1CC061EF4400408D05850141
+:1006F000D83A8501C1CCD83A8EEBF80B1900C0C1AD
+:100700006E5C580CCF205D1CCF0086AC869B180B0E
+:10071000A61B300CA62C850131078507FEB0FDAE67
+:100720008D07B19CC023D503D83A0000D401E06CFA
+:100730000980EA1C0000303BF94B0040789BE01B2D
+:100740008000999BFEB0FD9AFE6B1160301A970AEB
+:10075000FE6911F0930A308A970A930AB19CC0236C
+:10076000D503D80AD401304CE06B0980EA1B0000A5
+:10077000F74C0040FEB0FD82310BFE6A1160950B14
+:10078000FE6A11F0950BB19CC023D503D80A000076
+:10079000D401E06B0980EA1B0000764C580CC020A5
+:1007A0005D1CD80AFE6C000C780BE06A1D34EA1A56
+:1007B0008000F7DBC004F40B032CA99C5EFC000056
+:1007C000FE6A00007409A7C9340BF7EC006C124CE8
+:1007D000950C5EFDFE6B0008760CA19CCFC25EFD01
+:1007E000D42118951697E0660008EA160000F01666
+:1007F0000000FE6C0004780BE01BFFC0EBD5C006C8
+:1008000016455807C0A6E01500FFE415FF000A9B37
+:10081000EBD7C010F7E51085EBD5C018EA15A50099
+:100820009905781CE21C000C8D1CF0160000D82ADB
+:10083000FE6B0008760CF9DCC0815EFCD4013FFB46
+:10084000309CCCFFD80A0000D401F60A1518304AB3
+:10085000F9BA0005189B149CCC4FD80AD4211896DD
+:100860001697CA1F0E9BA58CB9360C9CCEEFD82AC2
+:10087000D42118973006310520150E9B0A9CCEFF17
+:10088000E06B0008EA1B0000761C18465805CF51A3
+:100890009716D82AFE6B00147618760A3009144988
+:1008A000F9DCC006EDBC0005F2081730F00C0A4870
+:1008B000A1985F3C5EFC0000D42118971696F7DCE7
+:1008C000C006308CC8EFEC0C1518C0400E9CCE3F13
+:1008D000D822DA2AD401F60A1518C061F9DCC0065C
+:1008E000189B307CC7EFD80AD401F60A1518300BD4
+:1008F000C030CE3FD80ACEFFD80A0000D401189BE2
+:1009000030CCFEB0FF6FFE6B0008760CF9DCC0A1A6
+:10091000D8020000D42116973016189B302CFEB058
+:10092000FF61EE0C1518C0C0E0670008EA17000070
+:100930006E153FFCCE4F18966E1C18458F150C9CFB
+:10094000D8220000D4013FFB30FCFEB0FF4BFE6B11
+:100950000008760CF9DCC0A1D8020000D421189759
+:100960003FFB30ECFEB0FF3EEE0C1518F9BC000169
+:10097000C020CE9FD8220000D671204D3001300318
+:10098000FE6C000C7809FC188000E06E1D34EA1E35
+:100990008000F3D9C004FC09032C180850284056E5
+:1009A00016970C0A1495FC1C80001836C0825C3621
+:1009B000160618060C97FC168000C0D81036C0B377
+:1009C000FC1C80801836C0725C36160618060C9720
+:1009D000FC168080E06C0201EA1C8080183AC0633B
+:1009E000E0650200EA158080C098301CEA1C808017
+:1009F000183AC0421438FBF530020A9CA1CCE01C26
+:100A0000FFFCE01CFFF8503CE5D5C003C0E8580BE4
+:100A1000C050300CCA4F681C18433FFB30DCFEB09E
+:100A2000FEE1069C68131843E0640008EA14000025
+:100A30000A36E08200AA3FFB303CFEB0FED3681CC1
+:100A400018430C99E019FE00F2CCFE00403AF40C79
+:100A50000D4E0A9CE01CFE0018395F2CF7D6C00929
+:100A6000C2200C90E010FFF8C038B30AB32A003956
+:100A7000CFD3F7D6C003C1703008133AFA080B0A77
+:100A80002FF81638CFB35888C0620F3BFA080B0B0B
+:100A90002FF8CFAB0096403A1430C042BB0AAD2AC3
+:100AA000C0283011A39EEC0B1603161E1C98303B79
+:100AB0000E6B167BC040202BC080C1E85808C1E0F7
+:100AC000AF0BAD2A2018CFBB5808C180300B0F2ABE
+:100AD000FA0B0A1A2FFB584BCFB3BB0AAD2A2018CA
+:100AE000CF4B300B0F3AFA0B0B0A2FFB588BCFB3BF
+:100AF000BB0AAD2A20185808CF51F80B1518C200B0
+:100B0000E20C1518C0300498C0983008C0580F3C4B
+:100B1000FA080B0C2FF80438CFB30A995802C061B9
+:100B2000C0C8133CFA080B0C2FF85888CFB3BB0A87
+:100B3000AD2AC038B30AB32AF9D9C009CFC1301CD5
+:100B4000EA1C80801836FB3B001BFE92FF62580BAC
+:100B5000C070300B3FFCFEB0FEDF681C18433FFB4B
+:100B6000301CFEB0FE3F069C68131843402B16361F
+:100B7000FE93FF5C5C360E06FC1C808018060C970A
+:100B8000FC168080C52B8913405C2FCDDC720000E1
+:100B9000D401E06A00F4EA1A000015895809C0215E
+:100BA000D80AE06A00E8EA1A00007418700913C84D
+:100BB000F00C1800CF6295297418700E1DB92FEE35
+:100BC000FDD950005CC9202E5C791C09C048118EEB
+:100BD0001C08952874281238CE42119E584ECF8199
+:100BE00011AEFC0C1800CF4111BEFC0B1800CF0158
+:100BF000DA0A0000D4211897300BCCBFC021D82AC4
+:100C0000E06C00E8EA1C0000781B761CF8070F8BEC
+:100C1000761C5D1CDA2A0000D4211897CBAFC021C6
+:100C2000D82AE06C00E8EA1C0000781B761CF80764
+:100C30000F8BF01B00005F1CD8220000D421E0675E
+:100C400000E8EA170000E06600F4EA1600000D8CE8
+:100C5000580CC0C03005C0580A9CCCDF2FF55C553D
+:100C60006E1C780B17CC1835CF85300CAC8CE06C33
+:100C70000100AE1CD82A0000D401E06B0980EA1BF9
+:100C80000000969CF9DCC007FEB0FBA4D80AD7038D
+:100C9000800003D0D421E0670980EA1700008E9B12
+:100CA000F3DBC008E06800D4EA180000E06A03FC47
+:100CB000EA1A8000F60C1608201CC060201CC0E058
+:100CC000201CC210D82A700C198B5D1A8EBC8EEBBA
+:100CD000F60C1900EFFC3C06DA2A700CF93B001107
+:100CE0001639C025D82A701BF609033C19BB2FEC16
+:100CF000F9DB50005CCB5C7B202C5D1A302C6E2B1A
+:100D0000B69CCE5BE06C0014EA1C00005C5B167BBA
+:100D1000C060201BC070201BC180D82A304B2E4CD5
+:100D2000CD5B305BF8C9FFE03008F208070E5CCEFF
+:100D3000F8080016AC1E2FF81638CF853029F20BB4
+:100D4000001BB88B5C5BCC2B30CBF8C9FFD8CEDB5B
+:100D5000D431E0660980EA1600000D8CE06500F4ED
+:100D6000EA1500000B8BE06700E8EA170000EDBC15
+:100D70000007C4828CBAF4091510C021D83AF9DCF6
+:100D8000C005E06403FCEA148000580CC1A10D9C6E
+:100D9000187CC060206CC0C0202CC0C0D83A582A33
+:100DA000C020D83A302BEECCFFFE5D14DA3AC73FB4
+:100DB000D832581AC020D83A301B0A9C5D14DA3A4F
+:100DC000581CCDD10D9C58ACCDA1581AC020D83A92
+:100DD000F60C1518CFD08CA55C556E1C780B17CC73
+:100DE0001835CF64300B0A9CCD4ECF206E1C781B7B
+:100DF000F605032C783B5D1BAE8C301B0E9C5D14FE
+:100E0000DA3AF9DCC005E0640C18EA148000580CEA
+:100E1000C4F10D9C201CC140202CCB10202CC060A4
+:100E2000202CCAD0202CC180D83A8CBC580CC020B1
+:100E3000D83AE06C0C78EA1C80008D4CDA3A8CBC15
+:100E4000580CC020D83A8C9C581CCFD18E9CE21CE8
+:100E5000FDFFAE1CDA3A8CBC580CC020D83AFEB06C
+:100E6000FAC9CFD0E06300D4EA130000660CF93B66
+:100E700000118C9CF80B1800CF23CE1E8C9CAA8CE2
+:100E80005C5CF80B1518C021DA3A661BF60C003BC7
+:100E9000208B8F1B30066E1C780B17CC1836CF5466
+:100EA000300B0C9C5D14CDB02FF65C56CF5B581CFC
+:100EB000FE91FF660D9C58BCFE91FF628CBC580CE5
+:100EC000C030300CC0E8F60C1518CFC08CA55C55AE
+:100ED0008C975C570A9CC8FECF500E9B0A9C5D14F1
+:100EE0005C5CD832800003F0D421300CE0670980CC
+:100EF000EA170000AE6C8F4C8F5C0F8CEDBC0007C6
+:100F0000C0528EBB580BC021D82AE21C0060C041E1
+:100F1000C20FC020DA2A0F8CF9DCC005581CCF5153
+:100F2000E06C00F4EA1C0000198B580BCEE08EA692
+:100F30005C56E06700E8EA1700006E1C780B17CCDF
+:100F40001836CE34E0650B90EA158000300B0C9C0F
+:100F50005D15CDB06E1C781BF60603276E3C5D1C3C
+:100F6000F7DCC0080C9C5D15CD006E2C5D1CCD31EE
+:100F7000D82A0000D401C65CE0A003B2E0A003C2FE
+:100F8000E06B00F8EA1B0000F76C0008DA0AD703F0
+:100F9000800016DC800017005EFD0000D421E065B3
+:100FA0000980EA1500000B8C189BE21B0060E04BE7
+:100FB0000020C020D82A0B9BE06603FCEA168000C4
+:100FC000E06700F8EA170000A98CC162202BC0F08E
+:100FD000201BC301E06C0120EA1C0000198B580B98
+:100FE000C020C33D306B0E9C5D16DA2A6E6C580C27
+:100FF000C2105D1CD822201BC050203BC1B1C21CB6
+:10100000DA2A6E7C580CC0A0300CE0A003CBE06C58
+:101010001060EA1C80008B4CDA2A340BE06C01244F
+:10102000EA1C00005D16E06C1070EA1C80008B5C0E
+:10103000DA2A30FCAE8C30ACAECCD82A5EFD000093
+:10104000300CE06B00F8EA1B0000B68C302AB6CA00
+:10105000E06A0980EA1A0000955C954C977C5EFD79
+:10106000D401E06C00F8EA1C0000787B5D1BD80A14
+:10107000D431201DCE6FE06700F8EA1700000E960D
+:1010800030048F64301CE0A0038DE06A0964EA1A22
+:101090000000EF3C000815831863E06C0124EA1C93
+:1010A000000019A9E0650164EA150000E0681294E7
+:1010B000EA188000E06000FF30A23031198E199BE1
+:1010C000F7EE108EE02E0100C0F0E02E0200C2D03C
+:1010D000201EC430E02E00FFC6F0203EC710E02ED8
+:1010E0000200C7E0CAC8E60B1518C050AE81302C0C
+:1010F000AECCCA586E5B580BC041AE81AEC2C9F8C7
+:101100002FEC5D18E080009CE06B08000A9CFEB0AC
+:10111000F977E06C1C28EA1C8000E06B0980EA1B70
+:101120000000975C301CC8C82FEC5D18E080008878
+:101130006E4C580CC041AE81AEC2C818E60C1518F2
+:10114000C060E06C1280EA1C8000C058E06C12D8CD
+:10115000EA1C80008F6CCE7B2FEC5D18C7006E4CB4
+:10116000580CC041AE81AEC2C6A86E9C580CCDB022
+:10117000E06B0800F80B0D445C74081C8F9C089A07
+:101180006E8B0A9C6E495D190A9CC0486E8B2FFBC2
+:101190008F8B089BFE3400015C74F60A1510CE603C
+:1011A000193B003BCF40305CAE8CE06C1304EA1C72
+:1011B00080008F6CCB8B0039C421C47CC418127999
+:1011C000C0402019C070CAFBE06C1768EA1C8000A0
+:1011D000C058E06C1784EA1C80008F7CCA4B19BB96
+:1011E0001279C0402019C200C9EB591BC055308C80
+:1011F000AE8CAEC2C248583BC080582BC060584B22
+:10120000C040585B5F1CC028300CB48C2F47E06C8A
+:10121000005CEA1C0000F80B0F8AB509AF2815081E
+:101220000EA88D84C80B300A500ABA8B19CBBA9B12
+:10123000400B6E3C183BCDC28F8BC75B300C2FFD33
+:10124000D832D703800017A0D421E06700F8EA174E
+:101250000000E0A00263C070300CEF6C0008300B9F
+:10126000302AC048301C309B304AAECAAE8BE06B8F
+:101270000120EA1B0000B68CDA2AD7038000171879
+:10128000E06C00F8EA1C0000303BB88B302BB8CB88
+:101290005EFD0000E06B00F8EA1B00007689E619AD
+:1012A000FFFF198AA96A1409199A120A978A1498D1
+:1012B000E618FFFF19A9A969120819B91009763CA7
+:1012C0001839C063308CB68C30ACB6CC5EFD122AB7
+:1012D0002FFA979A5EFF0000D421E0670164EA17B5
+:1012E0000000E06600F8EA1600006C9A5C7A6C8BED
+:1012F0000E9C6C495D196C9B5C7B0E9CFEB0F8806B
+:10130000DA2A0000D401E06C00F8EA1C0000788BB7
+:10131000E06C0164EA1C0000F60A1608B88AB89B63
+:10132000302BFEB0F86DDA0A800003FCE07B86A06B
+:10133000FE7A0814740918695E1D201BCFA15EFE99
+:10134000D421FE780818E06E1200EA1E007AE067E9
+:10135000C6C0EA17002DEC76BBA0580CC2414A3536
+:101360006A0CA1AC0C3BC0323009C0980E3BC032B5
+:101370003019C0581C3B3029F9B90203189EE01EF1
+:10138000FFF9306CF9E900191C49129BE1BC00001F
+:10139000D3033249EA19AA0091098B0BB19CC243CD
+:1013A000D503D82A49256A0C1895A1A50C3BC03253
+:1013B0003009C0980E3BC0323019C0581C3B302950
+:1013C000F9B90203E015FFF9306CF9E9001912458B
+:1013D000E1BC0000D3033289EA19AA009109484907
+:1013E0009305B19CCDE2D82AFFFF0824FFFF08280F
+:1013F000D401202DA36CFE790824F20C0308FA0C0A
+:101400000908109EE01EF0FFA96BE21B0F001C4BA9
+:10141000B1ABFA0C090BE1BB0000D303F8C8FFDC49
+:10142000EA18AA00FE7E08189D08FA0C030EF20CBA
+:10143000090EB19BC023D503F40C1518C060301CF5
+:10144000C76FC0303FFCC028300C2FEDD802000021
+:10145000D401202DA36CFE7A081CF40C030BFA0CAB
+:10146000090B1699E019F0C1E419C0F0FB38001C13
+:10147000306BF7E800181049FB38000CFB3E000EFB
+:10148000F1EE1018FB3E000DF1EE1028338BF7E85B
+:10149000003810494058A968E2180F001049404828
+:1014A000EE7B0000F7E8010810494068B968E618CB
+:1014B0003F001049FA0C0909E1BB0000D303F8C949
+:1014C000FFE4EA19AA00FE7808189109FA0C03084B
+:1014D000F40C0908B19BC023D5032FEDD80A0000F6
+:1014E000202DA36CFE7B081CF60C030AFA0C090ADB
+:1014F0001499A1A9FA0C0909E1BA0000D303F8C9AB
+:10150000FFE4EA19AA00FE7808189109FA0C03080A
+:10151000F60C0908B19AC023D5032FED5EFD00003B
+:10152000202DA36CFE7B081CF60C030AFA0C090A9A
+:101530001499A1C9FA0C0909E1BA0000D303F8C94A
+:10154000FFE4EA19AA00FE7808189109FA0C0308CA
+:10155000F60C0908B19AC023D5032FED5EFD0000FB
+:10156000FE7B0814580CC051760CA59C5E3DCFDB69
+:10157000760CA78CCFE25EFDE07B86A0FE7A086445
+:10158000F40C002A740CA1CC950C740CA19C5E2D5B
+:10159000201BCFC15EFE0000D43116971495300396
+:1015A000F20616012016FE740864E80C0024680B8D
+:1015B000A19BC0623013CE1FC0373FFCD832B1664A
+:1015C000E61600FF302CF9E500150C45A967E21777
+:1015D0000F000A4789075813C041680CA1AC890C59
+:1015E000D83A0000D4013009FC188000100CFEB07D
+:1015F000F9C5D80AD4211897F40C1510C040FEB0D4
+:10160000F919AE8CD82AD70380000830D401F40C25
+:101610001510C060178C580CC030FEB0F911D80AF4
+:101620008000083CD421189516971496C0680E9C2B
+:10163000FEB0F9322FF70ACC0C9CFE360001F80BF5
+:101640001510CF61D82AD70380000894D4211896AA
+:1016500016951497C0680B3B0C9CFEB0F9472FF60B
+:101660000E9CFE370001F80B1510CF61D82AD70366
+:10167000800008E8E0690010EA190000F60B001B82
+:1016800016091898580A5E0D133B201A10CBCFD1BB
+:101690005EFD0000E06900E0EA190000F20B00299D
+:1016A0001898580A5E0D133B201A10CBCFD15EFD5F
+:1016B000FC198080120B1898580A5E0D1739201AF1
+:1016C00010C9CFD15EFD0000D4013019FC18808014
+:1016D000100CFEB0F953D80A80000978E5BC000070
+:1016E000E06B00E0EA1B0000F80A1601B68AF80A6F
+:1016F0001614B69AF80A160CB6AABD8CB6BC5EFDD6
+:10170000D401201D301A300B1A9CC75F1B8B580B5D
+:101710005F1C2FFDD8020000D421E06700E4EA1727
+:1017200000008E8C580CC071FEB0F83EAE0C300C30
+:10173000FEB0F8A0E0660080C0D85806C0F0FE3CBD
+:101740000001AE0C300B5C7CFEB0F8E6FE36FF010B
+:101750005C568E8C580CCF21DA2AD82A800007A438
+:101760008000087080000914D303FE7C1000E06B39
+:101770000A03EA1B5501990BE06B0A03EA1BAA0155
+:10178000990BC008D401FEB0F5D7E0A000BBFEB0B5
+:10179000F4A6D80A8000033480001900800000DA23
+:1017A000D401201D300BE06A01FCEA1A8080740924
+:1017B000A9D9F3EC109C500C318C4009F20C0A4A68
+:1017C0005C5A145BA96B5C7B308AEDBB000FC04296
+:1017D000EC1B83805C7BA17B5C7B201ACF71A98B87
+:1017E000208CCEC1129AE01AFF00144B500B304AE5
+:1017F0001A9BE06C01FCC69F2FFDD80AD42120ADB6
+:10180000E0672400EA1700F40E9B300CFEB0FD9A4E
+:10181000301A306B300CFEB0FDED0E9CE0A0015E86
+:10182000E0671CA8EA178000301C5D173009300AF9
+:10183000300BFE7C0C00E0A0019BC021C008FE7CA8
+:101840000C00E0A001A5E0A0009F4ABB161CC04010
+:10185000161CC040C058305CC048302CC028303CFA
+:10186000300BFB6B002433FA508A507B506C301CD9
+:10187000FB6C0016FB6B0015FB6C0014FACCFFEC44
+:101880001A9B3149190A16AA2049CFD1300CFEB053
+:10189000FDE1300CFEB0FE26300CFEB0FE63E066CB
+:1018A00007C0EA168000301C5D16303C5D17E0670B
+:1018B0001B24EA178000301B300C5D17301B301CD6
+:1018C0005D17301B303C5D17301B302C5D17301B13
+:1018D000304C5D17300C5D162F6DD82A80001340F8
+:1018E000800013F080001AD880001B6C80001B8CD5
+:1018F00080001984007A1200800014E080001560D6
+:10190000D42120ADE06707C0EA178000301C5D17C6
+:10191000E0661B24EA168000300B300C5D16300B9D
+:10192000301C5D16300B303C5D16300B302C5D16D4
+:10193000300B304C5D16300CE0A001B8300C5D1758
+:10194000300CFEB0FDEF300CFB6C0024508C507C52
+:10195000506CFB6C0016FB6C0015FB6C0014FACC91
+:10196000FFEC1A9B3149190A16AA2049CFD1300C35
+:10197000FEB0FD702F6DD82A80001CA880001520B5
+:1019800080001450D431205DFACCFFF8E06B1D7C50
+:10199000EA1B8000B709B928170818A83FF73FF4D9
+:1019A000E0661D0CEA1680005D16E0A001A7501C41
+:1019B000E0651D20EA1580005D15E0A001B71890D4
+:1019C0005D165D15300330053006C2181830C1F4BD
+:1019D000401B0A3BC1C41615F8000106EC0B141F8E
+:1019E000E072C200EC020648F6020349109A129B0C
+:1019F0000A98EA09141FE0A001311493580AC07034
+:101A0000400C141C5C4CE04C2711C12550030A9279
+:101A10000C91E0A001731895E0A001881896043598
+:101A2000C035023CCD445803C031300CC178300C75
+:101A3000FACAFFF8F40C032B062B083BF604173008
+:101A4000F80717302FFC583CCF435BF7E60C170024
+:101A5000C050FACBFFF8F607032C2FBDD832D703BE
+:101A600080001C5880001CF880001D28EBCD40FE33
+:101A7000E06C1E54EA1C8000E06E1E6CEA1E8000C2
+:101A8000300A300B190719061905EFE61003E7D3E2
+:101A9000C002C1C1EA041603C1900C37C090AF095F
+:101AA0002014AD28CFD1EBD5C003C121C0B820147C
+:101AB000AD2ACFE1EBD5C003C050300220150CC2D7
+:101AC000CFD11C3CCE03E3CF80FE0C37CF700F315B
+:101AD00020150CC1CEBB0000D4211897E06607E0AA
+:101AE000EA168000E06B07C0EA1B8000E06C8A41C8
+:101AF000EA1C01F71837C103301C5D1BE06C148130
+:101B0000EA1C03EF18373FFBC042311C5D16D82A90
+:101B1000310C5D16D82A300C5D1B3FFB311C5D1665
+:101B2000D82A0000D401FE790404720AFE7904D494
+:101B30007208A788C0333FFCD802E1B90000D30384
+:101B40003048F00C0028EA18AA00FE7E04589D08D0
+:101B5000E01AFFF8F7DBC003144BA7BBFE7A0404BE
+:101B6000F40C092BB199C023D503D80AD4017828E5
+:101B7000BD98CFE3A96BA1ABF94B0040B16A990ABC
+:101B8000782BB99BCFE3129BC0CCDA0A782BB99B98
+:101B9000CFE3780BA1AB990B782BB99BCFE35EFD1C
+:101BA000782AB99ACFE3991B782BB99BCFE35EFDD6
+:101BB000D401D503FEB0FE24FEB0F366FEB0F3629E
+:101BC000C031FEB0F3CDC008800017FC8000028455
+:101BD00080000280D401F80B1518C040FEB0F3C09D
+:101BE000D80AFEB0F3EBD80A8000035C800003B88B
+:101BF000D4013009300A305B300CFEB0FCCF300C21
+:101C0000E0A00070D80AD70380001CE0D401300C9B
+:101C1000FE7B0864970C3009300A305BFEB0FCBED6
+:101C2000D80AD70380001598D401E06900F8EA19B2
+:101C30000000728C729A5C7AE06B0164EA1B00000F
+:101C4000F1DCC006100B72585D18300CE06B098097
+:101C5000EA1B0000975CDA0AEBCD4080340C3007B9
+:101C6000300EA17A5CFB5CFE5CF7103EF2071300BD
+:101C7000C053101EEE090147A1AA201CCF310E99B6
+:101C80001C98E3CD80800000E0690000EA19800024
+:101C9000121CF9DCC00EF9EA11ECFE7A0000A59BDB
+:101CA000F40B092C5EFD0000E1BB0000D303FC1A1D
+:101CB000AA00FE790458930AFE7A0400950CB19BA1
+:101CC0005E3DD5035EFD0000FC198000120B1898E4
+:101CD000580A5E0D1739201A10C9CFD15EFD0000D9
+:101CE000FE7B0864F60C002B760CA19C5E3D760C06
+:101CF000A1AC970C5EFD0000D401FE7C0C00E0A0BE
+:101D00000019A17CD802D70380001D30D401300B0C
+:101D1000FE7C0C00FEB0FF46D80AD70380001BA053
+:101D2000300CE3BC00425EFDE1BC00425EFC000002
+:101D3000781B5EFB00001000000020000000400047
+:101D4000000080000000C0000001000000018000D1
+:101D50000002000000030000000400000006000074
+:101D600000080000000C000000100000002000002F
+:101D7000000000000000000000000000007A1200D7
+:101D800000B71B0000F424000008000080001CC8FD
+:101D9000800015E4000000000000000000000000CA
+:101DA00000000001800015F48000160C00000020E7
+:101DB000800016248000164C00000003800016747A
+:101DC00000000000000000048000169400000000E5
+:101DD00000000200800016B0800016C8000000005D
+:101DE00000000000000000000000000000000000F3
+:101DF00000000000000000000000000000000000E3
+:101E000000000000000000000000000000000000D2
+:101E100000000000000000000000000000000000C2
+:101E200000000000000000000000000000000000B2
+:101E300000000000000000000000000000000000A2
+:101E40000000000000000000000000000000000092
+:101E50000000000080001E7000000008000000D498
+:0C1E6000000000E0000000E00000092A83
+:101E7000800007D4000000001100000000030000F3
+:101E80000000000000000000000000000000000052
+:101E900000000000000000000403090441544D4507
+:101EA0004C000000444655204154333255433343DF
+:101EB0000000000080000F7480000F9880000F9CCD
+:101EC0008000103C80001D8880001D9480001DA0B3
+:101ED00080001DAC80001DB880001DC480001DD096
+:101EE00080001DDC80001DE880001DF480001E00C5
+:101EF00080001E0C80001E1880001E2480001E30F2
+:101F000080001E3C80001E481201000200000040BC
+:101F1000EB03EB2F01010102000100000902120096
+:101F2000010100C0320904000000000000000000B0
+:101F30000000004C000000B4000000C8000000A039
+:041F4000000000CCD1
+:040000058000000077
+:00000001FF
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.1/at32uc3c-isp_cfg-1.1.1.dat b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.1/at32uc3c-isp_cfg-1.1.1.dat
new file mode 100644
index 0000000..76f0ab2
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.1/at32uc3c-isp_cfg-1.1.1.dat
@@ -0,0 +1 @@
+’žbáÿ× \ No newline at end of file
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.1/program_at32uc3c-isp-1.1.1.cmd b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.1/program_at32uc3c-isp-1.1.1.cmd
new file mode 100644
index 0000000..67539b0
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.1/program_at32uc3c-isp-1.1.1.cmd
@@ -0,0 +1,82 @@
+@echo off
+setlocal enableextensions enabledelayedexpansion
+
+: This command script programs the ISP (flash array), the ISP
+: configuration word (User page) and the general-purpose fuse bits.
+
+: Copyright (C) 2006-2008, Atmel Corporation All rights reserved.
+:
+: Redistribution and use in source and binary forms, with or without
+: modification, are permitted provided that the following conditions are met:
+:
+: 1. Redistributions of source code must retain the above copyright notice, this
+: list of conditions and the following disclaimer.
+:
+: 2. Redistributions in binary form must reproduce the above copyright notice,
+: this list of conditions and the following disclaimer in the documentation and/
+: or other materials provided with the distribution.
+:
+: 3. The name of ATMEL may not be used to endorse or promote products derived
+: from this software without specific prior written permission.
+:
+: THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED
+: WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND
+: SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,
+: INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+: BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+: DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+: OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+: NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+: EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+echo.
+echo Performing a JTAG Chip Erase command.
+avr32program -p AVRONE chiperase -F
+if ERRORLEVEL 1 (
+ color 47
+ pause
+ exit
+)
+
+echo.
+echo Programming MCU memory from `at32uc3c-isp-1.1.1.hex'.
+avr32-objcopy -I ihex -O binary at32uc3c-isp-1.1.1.hex at32uc3c-isp-1.1.1.bin
+avr32program -p AVRONE program -finternal@0x80000000 -cint -e -v -O0x80000000 -Fbin at32uc3c-isp-1.1.1.bin
+if ERRORLEVEL 1 (
+ color 47
+ pause
+ exit
+)
+del at32uc3c-isp-1.1.1.bin
+
+echo.
+echo Programming ISP configuration word \(default for UC3C_EK i.e. Word2 == 0x929E0E62 and Word1 == 0xE11EFFD7\)
+avr32program -p AVRONE program -finternal@0x80000000 -cint -e -v -O0x808001F8 -Fbin at32uc3c-isp_cfg-1.1.1.dat
+if ERRORLEVEL 1 (
+ color 47
+ pause
+ exit
+)
+
+echo.
+echo Programming general-purpose fuse bits.
+avr32program -p AVRONE writefuses -finternal@0x80000000 gp=0xFFF7FFFF
+if ERRORLEVEL 1 (
+ color 47
+ pause
+ exit
+)
+
+echo.
+echo Resetting MCU.
+avr32program -p AVRONE run -R
+if ERRORLEVEL 1 (
+ color 47
+ pause
+ exit
+)
+
+color 27
+pause
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.1/program_at32uc3c-isp-1.1.1.sh b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.1/program_at32uc3c-isp-1.1.1.sh
new file mode 100644
index 0000000..edcf00a
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.1/program_at32uc3c-isp-1.1.1.sh
@@ -0,0 +1,59 @@
+#!/bin/sh
+
+# This shell script programs the ISP (flash array), the ISP configuration words
+# (User page) and the general-purpose fuse bits.
+
+# Copyright (c) 2009 Atmel Corporation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice, this
+# list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# 3. The name of Atmel may not be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# 4. This software may only be redistributed and used in connection with an Atmel
+# AVR product.
+#
+# THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+# EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+#
+
+
+echo
+echo Performing a JTAG Chip Erase command.
+avr32program chiperase
+
+echo
+echo Programming MCU memory from \`at32uc3c-isp-H.hex\'.
+avr32-objcopy -I ihex -O binary at32uc3c-isp-1.1.1.hex at32uc3c-isp-1.1.1.bin
+avr32program program -finternal@0x80000000,512Kb -cint -e -v -O0x80000000 -Fbin at32uc3c-isp-1.1.1.bin
+rm -f at32uc3c-isp-1.1.1.bin
+
+echo
+echo Programming ISP configuration words \(default for EVK1100 i.e. Word2 == 0x929E1424 and Word1 == 0xE11EFFD7\)
+avr32program program -finternal@0x80000000 -cint -e -v -O0x808001F8 -Fbin at32uc3c-isp_cfg-1.1.1.dat
+
+echo
+echo Programming general-purpose fuse bits.
+avr32program writefuses -finternal@0x80000000 gp=0xFFF7FFFF
+
+echo
+echo Resetting MCU.
+avr32program reset
+
+pause
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.1/report_111.txt b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.1/report_111.txt
new file mode 100644
index 0000000..b47b53e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.1/report_111.txt
@@ -0,0 +1,1037 @@
+Tests for DFU bootloader
+
+Device information:
+ Device Name UC3C0512C
+ Device Revision D
+ JTAG ID 0x3200003f
+ SRAM size 64 kB
+ Flash size 512 kB
+batchisp version: 1.2.5
+= SETUP OK
+Connected to AVR ONE! 000000000274 version 4.16.
+Querying file system information.
+FPGA file avr32 version 4.0 loaded.
+JTAG clock is configured at 32.014 MHz.
+Connected to STK600 (rev C). Firmware version 0x0206.
+Connected to STK600 (rev C). Firmware version 0x0206.
+Reading frequencies.
+Connected to AVR ONE! 000000000274 version 4.16.
+Querying file system information.
+FPGA file avr32 version 4.0 loaded.
+JTAG clock is configured at 32.014 MHz.
+CPU resumes execution at 0x80000000.
+Running batchisp 1.2.5 on Wed Jan 26 17:56:19 2011
+
+
+
+AT32UC3C0512C - USB - USB/DFU
+
+
+Device selection....................... PASS
+Hardware selection..................... PASS
+Opening port........................... PASS
+Reading Bootloader version............. PASS 1.1.1
+Selecting BOOT......................... PASS
+Setting Address Range.................. PASS 0x00000 0x00000
+Reading memory......................... PASS 0x00000 0x00000
+
+Summary: Total 7 Passed 7 Failed 0
+= TEST 1-1 - PASS
+Connected to AVR ONE! 000000000274 version 4.16.
+Querying file system information.
+FPGA file avr32 version 4.0 loaded.
+JTAG clock is configured at 32.014 MHz.
+Connected to STK600 (rev C). Firmware version 0x0206.
+Connected to STK600 (rev C). Firmware version 0x0206.
+Reading frequencies.
+Connected to AVR ONE! 000000000274 version 4.16.
+Querying file system information.
+FPGA file avr32 version 4.0 loaded.
+JTAG clock is configured at 32.014 MHz.
+CPU resumes execution at 0x80000000.
+Running batchisp 1.2.5 on Wed Jan 26 17:56:29 2011
+
+
+
+AT32UC3C0512C - USB - USB/DFU
+
+
+Device selection....................... PASS
+Hardware selection..................... PASS
+Opening port........................... PASS
+Reading Bootloader version............. PASS 1.1.1
+Selecting BOOT......................... PASS
+Setting Address Range.................. PASS 0x00000 0x00000
+Reading memory......................... PASS 0x00000 0x00000
+
+Summary: Total 7 Passed 7 Failed 0
+= TEST 1-2 - PASS
+Connected to AVR ONE! 000000000274 version 4.16.
+Querying file system information.
+FPGA file avr32 version 4.0 loaded.
+JTAG clock is configured at 32.014 MHz.
+Connected to STK600 (rev C). Firmware version 0x0206.
+Connected to STK600 (rev C). Firmware version 0x0206.
+Reading frequencies.
+Connected to AVR ONE! 000000000274 version 4.16.
+Querying file system information.
+FPGA file avr32 version 4.0 loaded.
+JTAG clock is configured at 32.014 MHz.
+CPU resumes execution at 0x80000000.
+Running batchisp 1.2.5 on Wed Jan 26 17:56:39 2011
+
+
+
+AT32UC3C0512C - USB - USB/DFU
+
+
+Device selection....................... PASS
+Hardware selection..................... PASS
+Opening port........................... PASS
+Reading Bootloader version............. PASS 1.1.1
+Selecting BOOT......................... PASS
+Setting Address Range.................. PASS 0x00000 0x00000
+Reading memory......................... PASS 0x00000 0x00000
+
+Summary: Total 7 Passed 7 Failed 0
+= TEST 1-3 - PASS
+Running batchisp 1.2.5 on Wed Jan 26 17:56:41 2011
+
+
+
+AT32UC3C0512C - USB - USB/DFU
+
+
+Device selection....................... PASS
+Hardware selection..................... PASS
+Opening port........................... PASS
+Reading Bootloader version............. PASS 1.1.1
+Verify defaut ISP configuration in Word 1 and Word 2 from UC3C
+Selecting USER......................... PASS
+Setting Address Range.................. PASS 0x001f8 0x001f8
+Filling buffer......................... PASS 0x001f8 0x001f8 0X92
+Setting Address Range.................. PASS 0x001f9 0x001f9
+Filling buffer......................... PASS 0x001f9 0x001f9 0X9E
+Setting Address Range.................. PASS 0x001fa 0x001fa
+Filling buffer......................... PASS 0x001fa 0x001fa 0X0E
+Setting Address Range.................. PASS 0x001fb 0x001fb
+Filling buffer......................... PASS 0x001fb 0x001fb 0X62
+Setting Address Range.................. PASS 0x001fc 0x001fc
+Filling buffer......................... PASS 0x001fc 0x001fc 0XE1
+Setting Address Range.................. PASS 0x001fd 0x001fd
+Filling buffer......................... PASS 0x001fd 0x001fd 0X1E
+Setting Address Range.................. PASS 0x001fe 0x001fe
+Filling buffer......................... PASS 0x001fe 0x001fe 0XFF
+Setting Address Range.................. PASS 0x001ff 0x001ff
+Filling buffer......................... PASS 0x001ff 0x001ff 0XD7
+Setting Address Range.................. PASS 0x001f8 0x001ff
+Verifying memory....................... PASS 0x001f8 0x001ff
+
+Summary: Total 23 Passed 23 Failed 0
+= TEST 2-1 - PASS
+Running batchisp 1.2.5 on Wed Jan 26 17:56:44 2011
+
+
+
+AT32UC3C0512C - USB - USB/DFU
+
+
+Device selection....................... PASS
+Hardware selection..................... PASS
+Opening port........................... PASS
+Reading Bootloader version............. PASS 1.1.1
+Verify default configuration of GP fuses bits from UC3C
+Selecting CONFIGURATION................ PASS
+Setting Address Range.................. PASS 0x00000 0x0001f
+Filling buffer......................... PASS 0x00000 0x0001f 0X1
+Setting Address Range.................. PASS 0x00013 0x00013
+Filling buffer......................... PASS 0x00013 0x00013 0X0
+Setting Address Range.................. PASS 0x00000 0x0001f
+Verifying memory....................... PASS 0x00000 0x0001f
+
+Summary: Total 11 Passed 11 Failed 0
+= TEST 2-2 - PASS
+Running batchisp 1.2.5 on Wed Jan 26 17:56:46 2011
+
+
+
+AT32UC3C0512C - USB - USB/DFU
+
+
+Device selection....................... PASS
+Hardware selection..................... PASS
+Opening port........................... PASS
+Reading Bootloader version............. PASS 1.1.1
+The security bit must be disabled
+Selecting SECURITY..................... PASS
+Setting Address Range.................. PASS 0x00000 0x00000
+Filling buffer......................... PASS 0x00000 0x00000 0
+Verifying memory....................... PASS 0x00000 0x00000
+
+Summary: Total 8 Passed 8 Failed 0
+= TEST 2-3 - PASS
+Running batchisp 1.2.5 on Wed Jan 26 17:56:49 2011
+
+
+
+AT32UC3C0512C - USB - USB/DFU
+
+
+Device selection....................... PASS
+Hardware selection..................... PASS
+Opening port........................... PASS
+Reading Bootloader version............. PASS 1.1.1
+Verify Signature from UC3C
+Selecting SIGNATURE.................... PASS
+Setting Address Range.................. PASS 0x00000 0x00000
+Filling buffer......................... PASS 0x00000 0x00000 0X1F
+Setting Address Range.................. PASS 0x00001 0x00001
+Filling buffer......................... PASS 0x00001 0x00001 0X20
+Setting Address Range.................. PASS 0x00002 0x00002
+Filling buffer......................... PASS 0x00002 0x00002 0X00
+Setting Address Range.................. PASS 0x00003 0x00003
+Filling buffer......................... PASS 0x00003 0x00003 0X03
+Setting Address Range.................. PASS 0x00000 0x00003
+Verifying memory....................... PASS 0x00000 0x00003
+
+Summary: Total 15 Passed 15 Failed 0
+= TEST 2-4 - PASS
+Running batchisp 1.2.5 on Wed Jan 26 17:56:51 2011
+
+
+
+AT32UC3C0512C - USB - USB/DFU
+
+
+Device selection....................... PASS
+Hardware selection..................... PASS
+Opening port........................... PASS
+Reading Bootloader version............. PASS 1.1.1
+Verify Bootloader Version 1.1.1 (0x11) from UC3C
+Selecting BOOT......................... PASS
+Setting Address Range.................. PASS 0x00000 0x00000
+Filling buffer......................... PASS 0x00000 0x00000 0X11
+Setting Address Range.................. PASS 0x00001 0x00002
+Filling buffer......................... PASS 0x00001 0x00002 0X00
+Setting Address Range.................. PASS 0x00000 0x00002
+Verifying memory....................... PASS 0x00000 0x00002
+
+Summary: Total 11 Passed 11 Failed 0
+= TEST 2-5 - PASS
+Running batchisp 1.2.5 on Wed Jan 26 17:56:54 2011
+
+
+
+AT32UC3C0512C - USB - USB/DFU
+
+
+Device selection....................... PASS
+Hardware selection..................... PASS
+Opening port........................... PASS
+Reading Bootloader version............. PASS 1.1.1
+Load a HEX file in application section which blink LED0 of STK600 on PB0 (part pin PA08)
+Erasing................................ PASS
+Selecting FLASH........................ PASS
+Parsing HEX file....................... PASS app.hex
+Programming memory
+WARNING: The user program and the bootloader overlap!
+Programming memory..................... PASS 0x00000 0x02577
+Verifying memory....................... PASS 0x00000 0x02577
+
+Summary: Total 9 Passed 9 Failed 0
+Connected to AVR ONE! 000000000274 version 4.16.
+Querying file system information.
+FPGA file avr32 version 4.0 loaded.
+JTAG clock is configured at 32.014 MHz.
+CPU resumes execution at 0x80000000.
+Running batchisp 1.2.5 on Wed Jan 26 17:57:19 2011
+
+
+
+AT32UC3C0512C - USB - USB/DFU
+
+
+Device selection....................... PASS
+Hardware selection..................... PASS
+Opening port........................... PASS
+Reading Bootloader version............. PASS 1.1.1
+Selecting BOOT......................... PASS
+Setting Address Range.................. PASS 0x00000 0x00000
+Reading memory......................... PASS 0x00000 0x00000
+
+Summary: Total 7 Passed 7 Failed 0
+= TEST 3-1 - PASS
+Running batchisp 1.2.5 on Wed Jan 26 17:57:22 2011
+
+
+
+AT32UC3C0512C - USB - USB/DFU
+
+
+Device selection....................... PASS
+Hardware selection..................... PASS
+Opening port........................... PASS
+Reading Bootloader version............. PASS 1.1.1
+Launch start command with hardware reset
+Starting Application................... PASS RESET 1
+
+Summary: Total 5 Passed 5 Failed 0
+Connected to AVR ONE! 000000000274 version 4.16.
+Querying file system information.
+FPGA file avr32 version 4.0 loaded.
+JTAG clock is configured at 32.014 MHz.
+CPU resumes execution at 0x80000000.
+Test PASS
+= TEST 3-2 - PASS
+Running batchisp 1.2.5 on Wed Jan 26 17:57:50 2011
+
+
+
+AT32UC3C0512C - USB - USB/DFU
+
+
+Device selection....................... PASS
+Hardware selection..................... PASS
+Opening port........................... PASS
+Reading Bootloader version............. PASS 1.1.1
+Selecting BOOT......................... PASS
+Setting Address Range.................. PASS 0x00000 0x00000
+Reading memory......................... PASS 0x00000 0x00000
+
+Summary: Total 7 Passed 7 Failed 0
+= TEST 3-3 - PASS
+Running batchisp 1.2.5 on Wed Jan 26 17:57:52 2011
+
+
+
+AT32UC3C0512C - USB - USB/DFU
+
+
+Device selection....................... PASS
+Hardware selection..................... PASS
+Opening port........................... PASS
+Reading Bootloader version............. PASS 1.1.1
+Disable ISP_IO_COND_END bit
+Selecting USER......................... PASS
+Setting Address Range.................. PASS 0x001fc 0x001fc
+Filling buffer......................... PASS 0x001fc 0x001fc 0XE1
+Setting Address Range.................. PASS 0x001fd 0x001fd
+Filling buffer......................... PASS 0x001fd 0x001fd 0X1E
+Setting Address Range.................. PASS 0x001fe 0x001fe
+Filling buffer......................... PASS 0x001fe 0x001fe 0XFE
+Setting Address Range.................. PASS 0x001ff 0x001ff
+Filling buffer......................... PASS 0x001ff 0x001ff 0XD0
+Setting Address Range.................. PASS 0x001fc 0x001ff
+Programming memory..................... PASS 0x001fc 0x001ff
+Verifying memory....................... PASS 0x001fc 0x001ff
+
+Summary: Total 16 Passed 16 Failed 0
+Running batchisp 1.2.5 on Wed Jan 26 17:57:55 2011
+
+
+
+AT32UC3C0512C - USB - USB/DFU
+
+
+Device selection....................... PASS
+Hardware selection..................... PASS
+Opening port........................... PASS
+Reading Bootloader version............. PASS 1.1.1
+Launch start command with hardware reset
+Starting Application................... PASS RESET 1
+
+Summary: Total 5 Passed 5 Failed 0
+Test PASS
+= TEST 3-4 - PASS
+Connected to AVR ONE! 000000000274 version 4.16.
+Querying file system information.
+FPGA file avr32 version 4.0 loaded.
+JTAG clock is configured at 32.014 MHz.
+ Unlocking flash: ================================================== 100.0%
+
+ Erasing flash: \
+ Erasing flash: done
+Programming 8 bytes in 1 segment.
+ Programming flash: ========================= 50.0%
+ Verifying flash: ================================================== 100.0%
+
+Connected to AVR ONE! 000000000274 version 4.16.
+Querying file system information.
+FPGA file avr32 version 4.0 loaded.
+JTAG clock is configured at 32.014 MHz.
+CPU resumes execution at 0x80000000.
+Running batchisp 1.2.5 on Wed Jan 26 17:58:10 2011
+
+
+
+AT32UC3C0512C - USB - USB/DFU
+
+
+Device selection....................... PASS
+Hardware selection..................... PASS
+Opening port........................... PASS
+Reading Bootloader version............. PASS 1.1.1
+Selecting BOOT......................... PASS
+Setting Address Range.................. PASS 0x00000 0x00000
+Reading memory......................... PASS 0x00000 0x00000
+
+Summary: Total 7 Passed 7 Failed 0
+Connected to AVR ONE! 000000000274 version 4.16.
+Querying file system information.
+FPGA file avr32 version 4.0 loaded.
+JTAG clock is configured at 32.014 MHz.
+ Unlocking flash: ================================================== 100.0%
+
+ Erasing flash: \
+ Erasing flash: done
+Programming 8 bytes in 1 segment.
+ Programming flash: ========================= 50.0%
+ Verifying flash: ================================================== 100.0%
+
+Connected to AVR ONE! 000000000274 version 4.16.
+Querying file system information.
+FPGA file avr32 version 4.0 loaded.
+JTAG clock is configured at 32.014 MHz.
+CPU resumes execution at 0x80000000.
+Running batchisp 1.2.5 on Wed Jan 26 17:58:19 2011
+
+
+
+AT32UC3C0512C - USB - USB/DFU
+
+
+Device selection....................... PASS
+Hardware selection..................... PASS
+Opening port........................... PASS
+Reading Bootloader version............. PASS 1.1.1
+Selecting BOOT......................... PASS
+Setting Address Range.................. PASS 0x00000 0x00000
+Reading memory......................... PASS 0x00000 0x00000
+
+Summary: Total 7 Passed 7 Failed 0
+= TEST 3-5 - PASS
+Running batchisp 1.2.5 on Wed Jan 26 17:58:22 2011
+
+
+
+AT32UC3C0512C - USB - USB/DFU
+
+
+Device selection....................... PASS
+Hardware selection..................... PASS
+Opening port........................... PASS
+Reading Bootloader version............. PASS 1.1.1
+Write ISP_IO_COND_PIN = PA14, ISP_IO_COND_LEVEL=0
+Selecting USER......................... PASS
+Setting Address Range.................. PASS 0x001f8 0x001f8
+Filling buffer......................... PASS 0x001f8 0x001f8 0X92
+Setting Address Range.................. PASS 0x001f9 0x001f9
+Filling buffer......................... PASS 0x001f9 0x001f9 0X9F
+Setting Address Range.................. PASS 0x001fa 0x001fa
+Filling buffer......................... PASS 0x001fa 0x001fa 0X0E
+Setting Address Range.................. PASS 0x001fb 0x001fb
+Filling buffer......................... PASS 0x001fb 0x001fb 0X77
+Setting Address Range.................. PASS 0x001f8 0x001fb
+Programming memory..................... PASS 0x001f8 0x001fb
+Verifying memory....................... PASS 0x001f8 0x001fb
+
+Summary: Total 16 Passed 16 Failed 0
+Running batchisp 1.2.5 on Wed Jan 26 17:58:24 2011
+
+
+
+AT32UC3C0512C - USB - USB/DFU
+
+
+Device selection....................... PASS
+Hardware selection..................... PASS
+Opening port........................... PASS
+Reading Bootloader version............. PASS 1.1.1
+Launch start command with hardware reset
+Starting Application................... PASS RESET 1
+
+Summary: Total 5 Passed 5 Failed 0
+Test PASS
+Running batchisp 1.2.5 on Wed Jan 26 17:58:45 2011
+
+
+
+AT32UC3C0512C - USB - USB/DFU
+
+
+Device selection....................... PASS
+Hardware selection..................... PASS
+Opening port........................... PASS
+Reading Bootloader version............. PASS 1.1.1
+Selecting BOOT......................... PASS
+Setting Address Range.................. PASS 0x00000 0x00000
+Reading memory......................... PASS 0x00000 0x00000
+
+Summary: Total 7 Passed 7 Failed 0
+= TEST 4-1 - PASS
+Running batchisp 1.2.5 on Wed Jan 26 17:58:48 2011
+
+
+
+AT32UC3C0512C - USB - USB/DFU
+
+
+Device selection....................... PASS
+Hardware selection..................... PASS
+Opening port........................... PASS
+Reading Bootloader version............. PASS 1.1.1
+Write ISP_IO_COND_PIN = PB00, ISP_IO_COND_LEVEL=1
+Selecting USER......................... PASS
+Setting Address Range.................. PASS 0x001f8 0x001f8
+Filling buffer......................... PASS 0x001f8 0x001f8 0X92
+Setting Address Range.................. PASS 0x001f9 0x001f9
+Filling buffer......................... PASS 0x001f9 0x001f9 0X9E
+Setting Address Range.................. PASS 0x001fa 0x001fa
+Filling buffer......................... PASS 0x001fa 0x001fa 0X20
+Setting Address Range.................. PASS 0x001fb 0x001fb
+Filling buffer......................... PASS 0x001fb 0x001fb 0XA8
+Setting Address Range.................. PASS 0x001f8 0x001fb
+Programming memory..................... PASS 0x001f8 0x001fb
+Verifying memory....................... PASS 0x001f8 0x001fb
+
+Summary: Total 16 Passed 16 Failed 0
+Running batchisp 1.2.5 on Wed Jan 26 17:58:50 2011
+
+
+
+AT32UC3C0512C - USB - USB/DFU
+
+
+Device selection....................... PASS
+Hardware selection..................... PASS
+Opening port........................... PASS
+Reading Bootloader version............. PASS 1.1.1
+Launch start command with hardware reset
+Starting Application................... PASS RESET 1
+
+Summary: Total 5 Passed 5 Failed 0
+Running batchisp 1.2.5 on Wed Jan 26 17:58:58 2011
+
+
+
+AT32UC3C0512C - USB - USB/DFU
+
+
+Device selection....................... PASS
+Hardware selection..................... PASS
+Opening port........................... PASS
+Reading Bootloader version............. PASS 1.1.1
+Selecting BOOT......................... PASS
+Setting Address Range.................. PASS 0x00000 0x00000
+Reading memory......................... PASS 0x00000 0x00000
+
+Summary: Total 7 Passed 7 Failed 0
+= TEST 4-2 - PASS
+Running batchisp 1.2.5 on Wed Jan 26 17:59:00 2011
+
+
+
+AT32UC3C0512C - USB - USB/DFU
+
+
+Device selection....................... PASS
+Hardware selection..................... PASS
+Opening port........................... PASS
+Reading Bootloader version............. PASS 1.1.1
+Write ISP_IO_COND_PIN = PC30, ISP_IO_COND_LEVEL=1
+Selecting USER......................... PASS
+Setting Address Range.................. PASS 0x001f8 0x001f8
+Filling buffer......................... PASS 0x001f8 0x001f8 0X92
+Setting Address Range.................. PASS 0x001f9 0x001f9
+Filling buffer......................... PASS 0x001f9 0x001f9 0X9E
+Setting Address Range.................. PASS 0x001fa 0x001fa
+Filling buffer......................... PASS 0x001fa 0x001fa 0X5E
+Setting Address Range.................. PASS 0x001fb 0x001fb
+Filling buffer......................... PASS 0x001fb 0x001fb 0XD5
+Setting Address Range.................. PASS 0x001f8 0x001fb
+Programming memory..................... PASS 0x001f8 0x001fb
+Verifying memory....................... PASS 0x001f8 0x001fb
+
+Summary: Total 16 Passed 16 Failed 0
+Running batchisp 1.2.5 on Wed Jan 26 17:59:03 2011
+
+
+
+AT32UC3C0512C - USB - USB/DFU
+
+
+Device selection....................... PASS
+Hardware selection..................... PASS
+Opening port........................... PASS
+Reading Bootloader version............. PASS 1.1.1
+Launch start command with hardware reset
+Starting Application................... PASS RESET 1
+
+Summary: Total 5 Passed 5 Failed 0
+Running batchisp 1.2.5 on Wed Jan 26 17:59:09 2011
+
+
+
+AT32UC3C0512C - USB - USB/DFU
+
+
+Device selection....................... PASS
+Hardware selection..................... PASS
+Opening port........................... PASS
+Reading Bootloader version............. PASS 1.1.1
+Selecting BOOT......................... PASS
+Setting Address Range.................. PASS 0x00000 0x00000
+Reading memory......................... PASS 0x00000 0x00000
+
+Summary: Total 7 Passed 7 Failed 0
+= TEST 4-3 - PASS
+Running batchisp 1.2.5 on Wed Jan 26 17:59:12 2011
+
+
+
+AT32UC3C0512C - USB - USB/DFU
+
+
+Device selection....................... PASS
+Hardware selection..................... PASS
+Opening port........................... PASS
+Reading Bootloader version............. PASS 1.1.1
+Write ISP_IO_COND_PIN = PD09, ISP_IO_COND_LEVEL=1
+Selecting USER......................... PASS
+Setting Address Range.................. PASS 0x001f8 0x001f8
+Filling buffer......................... PASS 0x001f8 0x001f8 0X92
+Setting Address Range.................. PASS 0x001f9 0x001f9
+Filling buffer......................... PASS 0x001f9 0x001f9 0X9E
+Setting Address Range.................. PASS 0x001fa 0x001fa
+Filling buffer......................... PASS 0x001fa 0x001fa 0X69
+Setting Address Range.................. PASS 0x001fb 0x001fb
+Filling buffer......................... PASS 0x001fb 0x001fb 0X50
+Setting Address Range.................. PASS 0x001f8 0x001fb
+Programming memory..................... PASS 0x001f8 0x001fb
+Verifying memory....................... PASS 0x001f8 0x001fb
+
+Summary: Total 16 Passed 16 Failed 0
+Running batchisp 1.2.5 on Wed Jan 26 17:59:14 2011
+
+
+
+AT32UC3C0512C - USB - USB/DFU
+
+
+Device selection....................... PASS
+Hardware selection..................... PASS
+Opening port........................... PASS
+Reading Bootloader version............. PASS 1.1.1
+Launch start command with hardware reset
+Starting Application................... PASS RESET 1
+
+Summary: Total 5 Passed 5 Failed 0
+Running batchisp 1.2.5 on Wed Jan 26 17:59:18 2011
+
+
+
+AT32UC3C0512C - USB - USB/DFU
+
+
+Device selection....................... PASS
+Hardware selection..................... PASS
+Opening port........................... PASS
+Reading Bootloader version............. PASS 1.1.1
+Selecting BOOT......................... PASS
+Setting Address Range.................. PASS 0x00000 0x00000
+Reading memory......................... PASS 0x00000 0x00000
+
+Summary: Total 7 Passed 7 Failed 0
+= TEST 4-4 - PASS
+Running batchisp 1.2.5 on Wed Jan 26 17:59:21 2011
+
+
+
+AT32UC3C0512C - USB - USB/DFU
+
+
+Device selection....................... PASS
+Hardware selection..................... PASS
+Opening port........................... PASS
+Reading Bootloader version............. PASS 1.1.1
+Set a bad CRC in ISP configuration word 2
+Selecting USER......................... PASS
+Setting Address Range.................. PASS 0x001f8 0x001f8
+Filling buffer......................... PASS 0x001f8 0x001f8 0X92
+Setting Address Range.................. PASS 0x001f9 0x001f9
+Filling buffer......................... PASS 0x001f9 0x001f9 0X9E
+Setting Address Range.................. PASS 0x001fa 0x001fa
+Filling buffer......................... PASS 0x001fa 0x001fa 0X0E
+Setting Address Range.................. PASS 0x001fb 0x001fb
+Filling buffer......................... PASS 0x001fb 0x001fb 0X61
+Setting Address Range.................. PASS 0x001f8 0x001fb
+Programming memory..................... PASS 0x001f8 0x001fb
+Verifying memory....................... PASS 0x001f8 0x001fb
+
+Summary: Total 16 Passed 16 Failed 0
+Running batchisp 1.2.5 on Wed Jan 26 17:59:24 2011
+
+
+
+AT32UC3C0512C - USB - USB/DFU
+
+
+Device selection....................... PASS
+Hardware selection..................... PASS
+Opening port........................... PASS
+Reading Bootloader version............. PASS 1.1.1
+Launch start command with hardware reset
+Starting Application................... PASS RESET 1
+
+Summary: Total 5 Passed 5 Failed 0
+Connected to AVR ONE! 000000000274 version 4.16.
+Querying file system information.
+FPGA file avr32 version 4.0 loaded.
+JTAG clock is configured at 32.014 MHz.
+CPU resumes execution at 0x80000000.
+Running batchisp 1.2.5 on Wed Jan 26 17:59:31 2011
+
+
+
+AT32UC3C0512C - USB - USB/DFU
+
+
+Device selection....................... PASS
+Hardware selection..................... PASS
+Opening port........................... PASS
+Reading Bootloader version............. PASS 1.1.1
+Selecting BOOT......................... PASS
+Setting Address Range.................. PASS 0x00000 0x00000
+Reading memory......................... PASS 0x00000 0x00000
+
+Summary: Total 7 Passed 7 Failed 0
+Running batchisp 1.2.5 on Wed Jan 26 17:59:34 2011
+
+
+
+AT32UC3C0512C - USB - USB/DFU
+
+
+Device selection....................... PASS
+Hardware selection..................... PASS
+Opening port........................... PASS
+Reading Bootloader version............. PASS 1.1.1
+Program default configuration Word 2 from UC3C
+Selecting USER......................... PASS
+Setting Address Range.................. PASS 0x001f8 0x001f8
+Filling buffer......................... PASS 0x001f8 0x001f8 0X92
+Setting Address Range.................. PASS 0x001f9 0x001f9
+Filling buffer......................... PASS 0x001f9 0x001f9 0X9E
+Setting Address Range.................. PASS 0x001fa 0x001fa
+Filling buffer......................... PASS 0x001fa 0x001fa 0X0E
+Setting Address Range.................. PASS 0x001fb 0x001fb
+Filling buffer......................... PASS 0x001fb 0x001fb 0X62
+Setting Address Range.................. PASS 0x001f8 0x001fb
+Programming memory..................... PASS 0x001f8 0x001fb
+Verifying memory....................... PASS 0x001f8 0x001fb
+
+Summary: Total 16 Passed 16 Failed 0
+= TEST 4-5 - PASS
+Running batchisp 1.2.5 on Wed Jan 26 17:59:36 2011
+
+
+
+AT32UC3C0512C - USB - USB/DFU
+
+
+Device selection....................... PASS
+Hardware selection..................... PASS
+Opening port........................... PASS
+Reading Bootloader version............. PASS 1.1.1
+Enable security bit
+Selecting SECURITY..................... PASS
+Setting Address Range.................. PASS 0x00000 0x00000
+Filling buffer......................... PASS 0x00000 0x00000 0
+Verifying memory....................... PASS 0x00000 0x00000
+Filling buffer......................... PASS 0x00000 0x00000 1
+Programming memory..................... PASS 0x00000 0x00000
+Verifying memory....................... PASS 0x00000 0x00000
+
+Summary: Total 11 Passed 11 Failed 0
+Running batchisp 1.2.5 on Wed Jan 26 17:59:44 2011
+
+
+
+AT32UC3C0512C - USB - USB/DFU
+
+
+Device selection....................... PASS
+Hardware selection..................... PASS
+Opening port........................... PASS
+Reading Bootloader version............. PASS 1.1.1
+Check access on all memories available
+Selecting SECURITY..................... PASS
+Reading memory......................... PASS 0x00000 0x00000
+Selecting CONFIGURATION................ PASS
+Reading memory......................... PASS 0x00000 0x0001f
+Selecting BOOT......................... PASS
+Reading memory......................... PASS 0x00000 0x00002
+Selecting SIGNATURE.................... PASS
+Reading memory......................... PASS 0x00000 0x00003
+Selecting FLASH........................ PASS
+Setting Address Range.................. PASS 0x00000 0x00000
+Reading memory......................... PASS* Device protection is set.
+Selecting USER......................... PASS
+Setting Address Range.................. PASS 0x00000 0x00000
+Reading memory......................... PASS* Device protection is set.
+
+Summary: Total 18 Passed 18 Failed 0
+= TEST 5-1 - PASS
+Running batchisp 1.2.5 on Wed Jan 26 18:00:34 2011
+
+
+
+AT32UC3C0512C - USB - USB/DFU
+
+
+Device selection....................... PASS
+Hardware selection..................... PASS
+Opening port........................... PASS
+Reading Bootloader version............. PASS 1.1.1
+Selecting CONFIGURATION................ PASS
+Verify default configuration of GP fuses bits from UC3C
+Setting Address Range.................. PASS 0x00000 0x0001f
+Filling buffer......................... PASS 0x00000 0x0001f 0X1
+Setting Address Range.................. PASS 0x00013 0x00013
+Filling buffer......................... PASS 0x00013 0x00013 0X0
+Setting Address Range.................. PASS 0x00000 0x0001f
+Verifying memory....................... PASS 0x00000 0x0001f
+Modify a byte of fuse bit
+Setting Address Range.................. PASS 0x00000 0x00007
+Filling buffer......................... PASS 0x00000 0x00007 0
+Programming memory..................... PASS 0x00000 0x00007
+Setting Address Range.................. PASS 0x00000 0x0001f
+Verifying memory....................... PASS 0x00000 0x0001f
+Setting Address Range.................. PASS 0x00000 0x00007
+Filling buffer......................... PASS 0x00000 0x00007 1
+Programming memory..................... PASS 0x00000 0x00007
+Setting Address Range.................. PASS 0x00000 0x0001f
+Verifying memory....................... PASS 0x00000 0x0001f
+Modify one fuse bit
+Setting Address Range.................. PASS 0x0001e 0x0001e
+Filling buffer......................... PASS 0x0001e 0x0001e 0
+Programming memory..................... PASS 0x0001e 0x0001e
+Setting Address Range.................. PASS 0x00000 0x0001f
+Verifying memory....................... PASS 0x00000 0x0001f
+Setting Address Range.................. PASS 0x0001f 0x0001f
+Filling buffer......................... PASS 0x0001f 0x0001f 0
+Programming memory..................... PASS 0x0001f 0x0001f
+Setting Address Range.................. PASS 0x00000 0x0001f
+Verifying memory....................... PASS 0x00000 0x0001f
+Write default configuration of GP fuses bits from UC3C
+Setting Address Range.................. PASS 0x00000 0x0001f
+Filling buffer......................... PASS 0x00000 0x0001f 0X1
+Setting Address Range.................. PASS 0x00013 0x00013
+Filling buffer......................... PASS 0x00013 0x00013 0X0
+Setting Address Range.................. PASS 0x00000 0x0001f
+Programming memory..................... PASS 0x00000 0x0001f
+Verifying memory....................... PASS 0x00000 0x0001f
+
+Summary: Total 38 Passed 38 Failed 0
+= TEST 6-1 - PASS
+Running batchisp 1.2.5 on Wed Jan 26 18:00:38 2011
+
+
+
+AT32UC3C0512C - USB - USB/DFU
+
+
+Device selection....................... PASS
+Hardware selection..................... PASS
+Opening port........................... PASS
+Reading Bootloader version............. PASS 1.1.1
+Tests erase F and blankcheck commands
+Erasing................................ PASS
+Selecting FLASH........................ PASS
+Setting Address Range.................. PASS 0x02000 0x7ffff
+Blank checking......................... PASS 0x02000 0x7ffff
+Filling buffer......................... PASS 0x02000 0x7ffff 0XFF
+Verifying memory....................... PASS 0x02000 0x7ffff
+Filling buffer......................... PASS 0x02000 0x7ffff 0X55
+Programming memory..................... PASS 0x02000 0x7ffff
+Verifying memory....................... PASS 0x02000 0x7ffff
+Blank checking......................... PASS* Blank check fail at 0x02000
+Erasing................................ PASS
+Selecting FLASH........................ PASS
+Setting Address Range.................. PASS 0x02000 0x7ffff
+Blank checking......................... PASS 0x02000 0x7ffff
+
+Summary: Total 18 Passed 18 Failed 0
+= TEST 7-1 - PASS
+Running batchisp 1.2.5 on Wed Jan 26 18:03:07 2011
+
+
+
+AT32UC3C0512C - USB - USB/DFU
+
+
+Device selection....................... PASS
+Hardware selection..................... PASS
+Opening port........................... PASS
+Reading Bootloader version............. PASS 1.1.1
+run Read/Write flash sequences
+Selecting FLASH........................ PASS
+Setting Address Range.................. PASS 0x02000 0x7ffff
+Filling buffer......................... PASS 0x02000 0x7ffff 0XFF
+Setting Address Range.................. PASS 0x02001 0x02002
+Filling buffer......................... PASS 0x02001 0x02002 0X11
+Programming memory..................... PASS 0x02001 0x02002
+Setting Address Range.................. PASS 0x021fe 0x0221e
+Filling buffer......................... PASS 0x021fe 0x0221e 0X22
+Programming memory..................... PASS 0x021fe 0x0221e
+Setting Address Range.................. PASS 0x04000 0x04fff
+Filling buffer......................... PASS 0x04000 0x04fff 0X33
+Programming memory..................... PASS 0x04000 0x04fff
+Setting Address Range.................. PASS 0x0fffc 0x10000
+Filling buffer......................... PASS 0x0fffc 0x10000 0X44
+Programming memory..................... PASS 0x0fffc 0x10000
+Setting Address Range.................. PASS 0x3fffe 0x40001
+Filling buffer......................... PASS 0x3fffe 0x40001 0X55
+Programming memory..................... PASS 0x3fffe 0x40001
+Setting Address Range.................. PASS 0x40200 0x4ffff
+Filling buffer......................... PASS 0x40200 0x4ffff 0X66
+Programming memory..................... PASS 0x40200 0x4ffff
+Setting Address Range.................. PASS 0x7ffff 0x7ffff
+Filling buffer......................... PASS 0x7ffff 0x7ffff 0X77
+Programming memory..................... PASS 0x7ffff 0x7ffff
+Setting Address Range.................. PASS 0x10001 0x1f5ff
+Filling buffer......................... PASS 0x10001 0x1f5ff 0X88
+Programming memory..................... PASS 0x10001 0x1f5ff
+Setting Address Range.................. PASS 0x02000 0x7ffff
+Verifying memory....................... PASS 0x02000 0x7ffff
+
+Summary: Total 33 Passed 33 Failed 0
+= TEST 7-2 - PASS
+Running batchisp 1.2.5 on Wed Jan 26 18:03:54 2011
+
+
+
+AT32UC3C0512C - USB - USB/DFU
+
+
+Device selection....................... PASS
+Hardware selection..................... PASS
+Opening port........................... PASS
+Reading Bootloader version............. PASS 1.1.1
+Load a HEX file in application section which blink LED0 of STK600 on PB0 (part pin PA08)
+Erasing................................ PASS
+Selecting FLASH........................ PASS
+Parsing HEX file....................... PASS app.hex
+Programming memory
+WARNING: The user program and the bootloader overlap!
+Programming memory..................... PASS 0x00000 0x02577
+Verifying memory....................... PASS 0x00000 0x02577
+
+Summary: Total 9 Passed 9 Failed 0
+= TEST 7-3 - PASS
+Running batchisp 1.2.5 on Wed Jan 26 18:04:15 2011
+
+
+
+AT32UC3C0512C - USB - USB/DFU
+
+
+Device selection....................... PASS
+Hardware selection..................... PASS
+Opening port........................... PASS
+Reading Bootloader version............. PASS 1.1.1
+Verify blankcheck command on User flash page 512B
+Selecting USER......................... PASS
+Setting Address Range.................. PASS 0x00000 0x001f7
+Blank checking......................... PASS 0x00000 0x001f7
+Setting Address Range.................. PASS 0x00100 0x00100
+Filling buffer......................... PASS 0x00100 0x00100 0X55
+Programming memory..................... PASS 0x00100 0x00100
+Setting Address Range.................. PASS 0x00000 0x001f7
+Blank checking......................... PASS* Blank check fail at 0x00100
+Setting Address Range.................. PASS 0x00100 0x00100
+Filling buffer......................... PASS 0x00100 0x00100 0XFF
+Programming memory..................... PASS 0x00100 0x00100
+Setting Address Range.................. PASS 0x00000 0x001f7
+Blank checking......................... PASS 0x00000 0x001f7
+
+Summary: Total 17 Passed 17 Failed 0
+= TEST 8-1 - PASS
+Running batchisp 1.2.5 on Wed Jan 26 18:04:18 2011
+
+
+
+AT32UC3C0512C - USB - USB/DFU
+
+
+Device selection....................... PASS
+Hardware selection..................... PASS
+Opening port........................... PASS
+Reading Bootloader version............. PASS 1.1.1
+Verify Read/Write access on user flash 512B
+Selecting USER......................... PASS
+Setting Address Range.................. PASS 0x00000 0x001f7
+Filling buffer......................... PASS 0x00000 0x001f7 0X55
+Programming memory..................... PASS 0x00000 0x001f7
+Verifying memory....................... PASS 0x00000 0x001f7
+Filling buffer......................... PASS 0x00000 0x001f7 0XFF
+Programming memory..................... PASS 0x00000 0x001f7
+Verifying memory....................... PASS 0x00000 0x001f7
+Setting Address Range.................. PASS 0x00000 0x00000
+Filling buffer......................... PASS 0x00000 0x00000 0X11
+Programming memory..................... PASS 0x00000 0x00000
+Setting Address Range.................. PASS 0x0007f 0x00081
+Filling buffer......................... PASS 0x0007f 0x00081 0X22
+Programming memory..................... PASS 0x0007f 0x00081
+Setting Address Range.................. PASS 0x00081 0x000f0
+Filling buffer......................... PASS 0x00081 0x000f0 0X33
+Programming memory..................... PASS 0x00081 0x000f0
+Setting Address Range.................. PASS 0x000fb 0x00110
+Filling buffer......................... PASS 0x000fb 0x00110 0X44
+Programming memory..................... PASS 0x000fb 0x00110
+Setting Address Range.................. PASS 0x00150 0x001f7
+Filling buffer......................... PASS 0x00150 0x001f7 0X55
+Programming memory..................... PASS 0x00150 0x001f7
+Setting Address Range.................. PASS 0x00000 0x001f7
+Verifying memory....................... PASS 0x00000 0x001f7
+Filling buffer......................... PASS 0x00000 0x001f7 0XFF
+Programming memory..................... PASS 0x00000 0x001f7
+Blank checking......................... PASS 0x00000 0x001f7
+
+Summary: Total 32 Passed 32 Failed 0
+= TEST 8-2 - PASS
+Running batchisp 1.2.5 on Wed Jan 26 18:04:22 2011
+
+
+
+AT32UC3C0512C - USB - USB/DFU
+
+
+Device selection....................... PASS
+Hardware selection..................... PASS
+Opening port........................... PASS
+Reading Bootloader version............. PASS 1.1.1
+Launch start command with hardware reset
+Starting Application................... PASS RESET 1
+
+Summary: Total 5 Passed 5 Failed 0
+Test PASS
+= TEST 9-1 - PASS
+Running batchisp 1.2.5 on Wed Jan 26 18:05:52 2011
+
+
+
+AT32UC3C0512C - USB - USB/DFU
+
+
+Device selection....................... PASS
+Hardware selection..................... PASS
+Opening port........................... PASS
+Reading Bootloader version............. PASS 1.1.1
+Launch start command with software reset
+Starting Application................... PASS NORESET 0
+
+Summary: Total 5 Passed 5 Failed 0
+Test PASS
+= TEST 9-2 - PASS
+==== All tests PASS ====
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.2/at32uc3c-isp-1.1.2.hex b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.2/at32uc3c-isp-1.1.2.hex
new file mode 100644
index 0000000..ecd19b0
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.2/at32uc3c-isp-1.1.2.hex
@@ -0,0 +1,504 @@
+:0200000480007A
+:10000000E1B80000F1D8C2C35818C090FEC8FFF094
+:10001000FC190061E06D0DF4D041D6033008FE7983
+:100020001000E06A01FCEA1A8080FE7B0400700088
+:10003000E061504BEA1149537402E06301070494F4
+:10004000C76CC141E7D2C210E043E11EC0F1EDB27E
+:100050000009C0C3F6F30180E06423170873C131BF
+:10006000EDB30003C3830230C3C1C53C9101E06D11
+:100070000E0CD353FEC00074E3B00001E0A00CF8F6
+:10008000E0A00D98EDB20008C262E06A01F8EA1A39
+:1000900080807402E06301070494C49CCE71E7D2AF
+:1000A000C22FE043494FCE21E7D2C108E043007C94
+:1000B000CDD2FE7A2000E6041605A974080A7584DC
+:1000C000E013001FE8030A44E7D2C2010654EDB46E
+:1000D0000000CCC20230C051C1CC300830009100C9
+:1000E000FC100061E3B0000030003001300230034A
+:1000F000300430053006300730083009300A300B44
+:10010000300C300D300EE3B00001E3B0004248BFC8
+:10011000FC1255009302EE12FF0093021C9FE805AB
+:100120001200EA051117E60509450A54E04400FFEC
+:10013000FE9BFFF758045EF480002000308A310CEB
+:10014000FE6B10047609AD99C1837609A589C55364
+:10015000FE6A18003019763EA19EC5727608A198F5
+:10016000C542740BAFCB950BFE6B10049749975C9F
+:10017000740CAFAC950CC6D8FE691220930C930A90
+:10018000FE6911307208A398C042E0A0019DC61814
+:100190007208A388C042E0A0025FC5B87208A198A7
+:1001A000C092FE6811C0700EA19EC042E0A001E4A2
+:1001B000C508E06E0980EA1E00007D08720EA58E5B
+:1001C000C08293CA720CA19CC4435838C421C0F8A1
+:1001D000720EA59ECBB293CC720CA38CC3A35818FD
+:1001E000C041E0A002A5C3585848C331E86C0000E4
+:1001F000FE6B11C097CCC2D8971AE0A00521E0A0F1
+:100200000107E0A0014DC258763EA59EC1227608A6
+:10021000A598C0F27408AFC89508FE6A1800741853
+:10022000AF98C043760AA19ACF92974C9759C118BC
+:10023000741BA38BC0E2740CAFCC950C302C952CA6
+:10024000740CAFAC950C741CF9DCC161E0A00CC45B
+:10025000FE6C1800786BD603800004C4800006543E
+:10026000800005748000072C80000C3C8000040C8A
+:100270008000049C80001BD4E1BC0000D3035EFC22
+:100280005EFF0000D421E0A00CB5CF7F1897FE667A
+:1002900018006C0CAFDC8D0C6C0C300AE06B0100AC
+:1002A000E06C013CEA1C8000E0A00CF06C0CB9BCD6
+:1002B0008D0C6C0CB9CC8D0C6C0CADCC8D0C6C0C0D
+:1002C000ADAC8D0C6C0CAFBC8D0C6C0CAFCC8D0C34
+:1002D0006C0C6C1BAF9BCFE2E0690980EA1900004F
+:1002E000300A300BF2EB0020F2EB0028F2EB00308A
+:1002F000F2EB00386CCB2E098DC9FE6C1000780B28
+:10030000ADCB990B780BE81B0C00990B6C0CA1BCC6
+:100310008D0C6C0CAFAC8D0CFE7C0588780BA1AB02
+:10032000990BB197C023D503D82AD70380001BF0BF
+:1003300080001C88D421CA1F1897FE6C1800780B07
+:10034000AFDB990B780BADCB990BE0A00C61B197AB
+:10035000C023D503D82AD70380001C0CD421C8DFC2
+:100360001897FE6618006C0CAFCC8D0C6C1BAF9B05
+:10037000CFE2FE6C1000780BA9CB990BE0A00460D3
+:10038000C46CC8DC308CFE6B1000976C301BFE6AAE
+:100390001000956B310AFE691000936A932C304C63
+:1003A000932C933B932A6C0CAFAC8D0CB197C0236C
+:1003B000D503D82A80000C3CFE6C1800780BAFCB1C
+:1003C000990BFE6C1000780BA9AB990B5EFD000039
+:1003D000FE6B1000760AA7DA970A760AE01AFF8009
+:1003E000F9DCC007144C970C760CA7BC970C5EFD8B
+:1003F000FE6B1000760CF9DCC0075EFCE06A098039
+:10040000EA1A0000952CB46B5EFD0000D401FE6C6E
+:100410001000780BE01BFF80990B780BA7BB990BA2
+:10042000FE6C1100780B308A3409F20A0C4AE0693C
+:100430000400F4090D4AE01BE68B3FF9F20A001AAA
+:10044000F4091200F20A111CA56AE21A1974144B7D
+:10045000990BE06C0980EA1C0000F8CBFFBC998B7B
+:10046000789BE41B8000999BFE6C1000787BA1AB0D
+:10047000997BFC1C0100FE6B11F097CCCFEEFE6B5C
+:1004800011F0304A970A302A970AE06B1000FE6A92
+:100490001000956BB19CC023D503D80A301CFE6BAD
+:1004A0001220970C302CFE6B1160970C300CE06B17
+:1004B0000980EA1B0000974C975CB66CF74C004033
+:1004C0005EFD0000D421E0670980EA1700006F0C90
+:1004D000580CC030C5EDCE3FFE6611F0FE651160D0
+:1004E00030446E9CF9DCC00F588CC090305CEF4CEF
+:1004F0000040E86C00008D0C8B04D82AEEEA004422
+:10050000AF1BF9DBC0105CCCAE1C8EAC5CCCAE2C4F
+:10051000F9DAC0105CCCAE3CE0A004E8CE808B04DD
+:10052000E06C0A04EA1C0000300B0F8AA98AC0F2B2
+:100530008EEAF5DAC006F40915105F0AB88AB81B0E
+:10054000B82B302CEF4C0040C16CD82A8EBA580A18
+:10055000C031CEDCD82AB81BB82B301CEF4C004081
+:1005600031078B07C8AE8D07B19CC023D503D82AAD
+:1005700080000EE8D431E0630278EA1380005D1356
+:100580003017FE6B11F097C7B19CC023D503E0660E
+:100590000980EA1600006D0C583CC041CFACC7FF83
+:1005A000D83A8CECE0650A04EA1500008AA4182405
+:1005B0005C74C1F10B8B580BC031CD5CD83A300262
+:1005C0008A9B160C8CBB163CC0656C5C580CC0300A
+:1005D0005D1CC031AA82C1188AAC8A9B180BAA1B69
+:1005E000AA228CE4F9D4C006F80B15105F0CAA8C73
+:1005F000E0440041F9B404405D13FE6B1130760A0B
+:10060000A38AC082B19CC023D503304CED4C00407E
+:10061000D83A6C298AAB1609089BECCEFFBC58046B
+:10062000C0501338201B1CC8CFD18AAB080BAA2B93
+:100630006C9BE01B8000E9D4C00F16448D94FE6BC8
+:10064000113097C7FE6B11F09707B19CC023D503FB
+:10065000D83A0000D431E0670980EA1700006F0C37
+:10066000FE6611F0E86500003054581CC0C0582CDC
+:10067000C030584CC031C8DCC048EF4400408D0544
+:10068000C0EFD83A6E9BF7DBC00FE0630A04EA13B1
+:10069000000086AC189A8EE9F80B00081039C044A7
+:1006A000F20C010B5C7BEEC9FFBC6E2C180A169C89
+:1006B000149E580BC0501338201C1CC8CFD186ACD8
+:1006C000160CA62C5C7CFE6211603021E04B0040D1
+:1006D000C061869B180B8EBA143BC0F5AE6C6E5C85
+:1006E000580CC0805D1CC061EF4400408D05850141
+:1006F000D83A8501C1CCD83A8EEBF80B1900C0C1AD
+:100700006E5C580CCF205D1CCF0086AC869B180B0E
+:10071000A61B300CA62C850131078507FEB0FDAE67
+:100720008D07B19CC023D503D83A0000D401E06CFA
+:100730000980EA1C0000303BF94B0040789BE01B2D
+:100740008000999BFEB0FD9AFE6B1160301A970AEB
+:10075000FE6911F0930A308A970A930AB19CC0236C
+:10076000D503D80AD401304CE06B0980EA1B0000A5
+:10077000F74C0040FEB0FD82310BFE6A1160950B14
+:10078000FE6A11F0950BB19CC023D503D80A000076
+:10079000D401E06B0980EA1B0000764C580CC020A5
+:1007A0005D1CD80AFE6C000C780BE06A1D34EA1A56
+:1007B0008000F7DBC004F40B032CA99C5EFC000056
+:1007C000FE6A00007409A7C9340BF7EC006C124CE8
+:1007D000950C5EFDFE6B0008760CA19CCFC25EFD01
+:1007E000D42118951697E0660008EA160000F01666
+:1007F0000000FE6C0004780BE01BFFC0EBD5C006C8
+:1008000016455807C0A6E01500FFE415FF000A9B37
+:10081000EBD7C010F7E51085EBD5C018EA15A50099
+:100820009905781CE21C000C8D1CF0160000D82ADB
+:10083000FE6B0008760CF9DCC0815EFCD4013FFB46
+:10084000309CCCFFD80A0000D401F60A1518304AB3
+:10085000F9BA0005189B149CCC4FD80AD4211896DD
+:100860001697CA1F0E9BA58CB9360C9CCEEFD82AC2
+:10087000D42118973006310520150E9B0A9CCEFF17
+:10088000E06B0008EA1B0000761C18465805CF51A3
+:100890009716D82AFE6B00147618760A3009144988
+:1008A000F9DCC006EDBC0005F2081730F00C0A4870
+:1008B000A1985F3C5EFC0000D42118971696F7DCE7
+:1008C000C006308CC8EFEC0C1518C0400E9CCE3F13
+:1008D000D822DA2AD401F60A1518C061F9DCC0065C
+:1008E000189B307CC7EFD80AD401F60A1518300BD4
+:1008F000C030CE3FD80ACEFFD80A0000D401189BE2
+:1009000030CCFEB0FF6FFE6B0008760CF9DCC0A1A6
+:10091000D8020000D42116973016189B302CFEB058
+:10092000FF61EE0C1518C0C0E0670008EA17000070
+:100930006E153FFCCE4F18966E1C18458F150C9CFB
+:10094000D8220000D4013FFB30FCFEB0FF4BFE6B11
+:100950000008760CF9DCC0A1D8020000D421189759
+:100960003FFB30ECFEB0FF3EEE0C1518F9BC000169
+:10097000C020CE9FD8220000D671204D3001300318
+:10098000FE6C000C7809FC188000E06E1D34EA1E35
+:100990008000F3D9C004FC09032C180850284056E5
+:1009A00016970C0A1495FC1C80001836C0825C3621
+:1009B000160618060C97FC168000C0D81036C0B377
+:1009C000FC1C80801836C0725C36160618060C9720
+:1009D000FC168080E06C0201EA1C8080183AC0633B
+:1009E000E0650200EA158080C098301CEA1C808017
+:1009F000183AC0421438FBF530020A9CA1CCE01C26
+:100A0000FFFCE01CFFF8503CE5D5C003C0E8580BE4
+:100A1000C050300CCA4F681C18433FFB30DCFEB09E
+:100A2000FEE1069C68131843E0640008EA14000025
+:100A30000A36E08200AA3FFB303CFEB0FED3681CC1
+:100A400018430C99E019FE00F2CCFE00403AF40C79
+:100A50000D4E0A9CE01CFE0018395F2CF7D6C00929
+:100A6000C2200C90E010FFF8C038B30AB32A003956
+:100A7000CFD3F7D6C003C1703008133AFA080B0A77
+:100A80002FF81638CFB35888C0620F3BFA080B0B0B
+:100A90002FF8CFAB0096403A1430C042BB0AAD2AC3
+:100AA000C0283011A39EEC0B1603161E1C98303B79
+:100AB0000E6B167BC040202BC080C1E85808C1E0F7
+:100AC000AF0BAD2A2018CFBB5808C180300B0F2ABE
+:100AD000FA0B0A1A2FFB584BCFB3BB0AAD2A2018CA
+:100AE000CF4B300B0F3AFA0B0B0A2FFB588BCFB3BF
+:100AF000BB0AAD2A20185808CF51F80B1518C200B0
+:100B0000E20C1518C0300498C0983008C0580F3C4B
+:100B1000FA080B0C2FF80438CFB30A995802C061B9
+:100B2000C0C8133CFA080B0C2FF85888CFB3BB0A87
+:100B3000AD2AC038B30AB32AF9D9C009CFC1301CD5
+:100B4000EA1C80801836FB3B001BFE92FF62580BAC
+:100B5000C070300B3FFCFEB0FEDF681C18433FFB4B
+:100B6000301CFEB0FE3F069C68131843402B16361F
+:100B7000FE93FF5C5C360E06FC1C808018060C970A
+:100B8000FC168080C52B8913405C2FCDDC720000E1
+:100B9000D401E06A00F4EA1A000015895809C0215E
+:100BA000D80AE06A00E8EA1A00007418700913C84D
+:100BB000F00C1800CF6295297418700E1DB92FEE35
+:100BC000FDD950005CC9202E5C791C09C048118EEB
+:100BD0001C08952874281238CE42119E584ECF8199
+:100BE00011AEFC0C1800CF4111BEFC0B1800CF0158
+:100BF000DA0A0000D4211897300BCCBFC021D82AC4
+:100C0000E06C00E8EA1C0000781B761CF8070F8BEC
+:100C1000761C5D1CDA2A0000D4211897CBAFC021C6
+:100C2000D82AE06C00E8EA1C0000781B761CF80764
+:100C30000F8BF01B00005F1CD8220000D421E0675E
+:100C400000E8EA170000E06600F4EA1600000D8CE8
+:100C5000580CC0C03005C0580A9CCCDF2FF55C553D
+:100C60006E1C780B17CC1835CF85300CAC8CE06C33
+:100C70000100AE1CD82A0000D401E06B0980EA1BF9
+:100C80000000969CF9DCC007FEB0FBA4D80AD7038D
+:100C9000800003D0D421E0670980EA1700008E9B12
+:100CA000F3DBC008E06800D4EA180000E06A03FC47
+:100CB000EA1A8000F60C1608201CC060201CC0E058
+:100CC000201CC210D82A700C198B5D1A8EBC8EEBBA
+:100CD000F60C1900EFFC3C06DA2A700CF93B001107
+:100CE0001639C025D82A701BF609033C19BB2FEC16
+:100CF000F9DB50005CCB5C7B202C5D1A302C6E2B1A
+:100D0000B69CCE5BE06C0014EA1C00005C5B167BBA
+:100D1000C060201BC070201BC180D82A304B2E4CD5
+:100D2000CD5B305BF8C9FFE03008F208070E5CCEFF
+:100D3000F8080016AC1E2FF81638CF853029F20BB4
+:100D4000001BB88B5C5BCC2B30CBF8C9FFD8CEDB5B
+:100D5000D431E0660980EA1600000D8CE06500F4ED
+:100D6000EA1500000B8BE06700E8EA170000EDBC15
+:100D70000007C4828CBAF4091510C021D83AF9DCF6
+:100D8000C005E06403FCEA148000580CC1A10D9C6E
+:100D9000187CC060206CC0C0202CC0C0D83A582A33
+:100DA000C020D83A302BEECCFFFE5D14DA3AC73FB4
+:100DB000D832581AC020D83A301B0A9C5D14DA3A4F
+:100DC000581CCDD10D9C58ACCDA1581AC020D83A92
+:100DD000F60C1518CFD08CA55C556E1C780B17CC73
+:100DE0001835CF64300B0A9CCD4ECF206E1C781B7B
+:100DF000F605032C783B5D1BAE8C301B0E9C5D14FE
+:100E0000DA3AF9DCC005E0640C18EA148000580CEA
+:100E1000C4F10D9C201CC140202CCB10202CC060A4
+:100E2000202CCAD0202CC180D83A8CBC580CC020B1
+:100E3000D83AE06C0C78EA1C80008D4CDA3A8CBC15
+:100E4000580CC020D83A8C9C581CCFD18E9CE21CE8
+:100E5000FDFFAE1CDA3A8CBC580CC020D83AFEB06C
+:100E6000FAC9CFD0E06300D4EA130000660CF93B66
+:100E700000118C9CF80B1800CF23CE1E8C9CAA8CE2
+:100E80005C5CF80B1518C021DA3A661BF60C003BC7
+:100E9000208B8F1B30066E1C780B17CC1836CF5466
+:100EA000300B0C9C5D14CDB02FF65C56CF5B581CFC
+:100EB000FE91FF660D9C58BCFE91FF628CBC580CE5
+:100EC000C030300CC0E8F60C1518CFC08CA55C55AE
+:100ED0008C975C570A9CC8FECF500E9B0A9C5D14F1
+:100EE0005C5CD832800003F0D421300CE0670980CC
+:100EF000EA170000AE6C8F4C8F5C0F8CEDBC0007C6
+:100F0000C0528EBB580BC021D82AE21C0060C041E1
+:100F1000C20FC020DA2A0F8CF9DCC005581CCF5153
+:100F2000E06C00F4EA1C0000198B580BCEE08EA692
+:100F30005C56E06700E8EA1700006E1C780B17CCDF
+:100F40001836CE34E0650B90EA158000300B0C9C0F
+:100F50005D15CDB06E1C781BF60603276E3C5D1C3C
+:100F6000F7DCC0080C9C5D15CD006E2C5D1CCD31EE
+:100F7000D82A0000D401C65CE0A003B2E0A003C2FE
+:100F8000E06B00F8EA1B0000F76C0008DA0AD703F0
+:100F9000800016DC800017005EFD0000D421E065B3
+:100FA0000980EA1500000B8C189BE21B0060E04BE7
+:100FB0000020C020D82A0B9BE06603FCEA168000C4
+:100FC000E06700F8EA170000A98CC162202BC0F08E
+:100FD000201BC301E06C0120EA1C0000198B580B98
+:100FE000C020C33D306B0E9C5D16DA2A6E6C580C27
+:100FF000C2105D1CD822201BC050203BC1B1C21CB6
+:10100000DA2A6E7C580CC0A0300CE0A003CBE06C58
+:101010001060EA1C80008B4CDA2A340BE06C01244F
+:10102000EA1C00005D16E06C1070EA1C80008B5C0E
+:10103000DA2A30FCAE8C30ACAECCD82A5EFD000093
+:10104000300CE06B00F8EA1B0000B68C302AB6CA00
+:10105000E06A0980EA1A0000955C954C977C5EFD79
+:10106000D401E06C00F8EA1C0000787B5D1BD80A14
+:10107000D431201DCE6FE06700F8EA1700000E960D
+:1010800030048F64301CE0A0038DE06A0964EA1A22
+:101090000000EF3C000815831863E06C0124EA1C93
+:1010A000000019A9E0650164EA150000E0681294E7
+:1010B000EA188000E06000FF30A23031198E199BE1
+:1010C000F7EE108EE02E0100C0F0E02E0200C2D03C
+:1010D000201EC430E02E00FFC6F0203EC710E02ED8
+:1010E0000200C7E0CAC8E60B1518C050AE81302C0C
+:1010F000AECCCA586E5B580BC041AE81AEC2C9F8C7
+:101100002FEC5D18E080009CE06B08000A9CFEB0AC
+:10111000F977E06C1C28EA1C8000E06B0980EA1B70
+:101120000000975C301CC8C82FEC5D18E080008878
+:101130006E4C580CC041AE81AEC2C818E60C1518F2
+:10114000C060E06C1280EA1C8000C058E06C12D8CD
+:10115000EA1C80008F6CCE7B2FEC5D18C7006E4CB4
+:10116000580CC041AE81AEC2C6A86E9C580CCDB022
+:10117000E06B0800F80B0D445C74081C8F9C089A07
+:101180006E8B0A9C6E495D190A9CC0486E8B2FFBC2
+:101190008F8B089BFE3400015C74F60A1510CE603C
+:1011A000193B003BCF40305CAE8CE06C1304EA1C72
+:1011B00080008F6CCB8B0039C421C47CC418127999
+:1011C000C0402019C070CAFBE06C1768EA1C8000A0
+:1011D000C058E06C1784EA1C80008F7CCA4B19BB96
+:1011E0001279C0402019C200C9EB591BC055308C80
+:1011F000AE8CAEC2C248583BC080582BC060584B22
+:10120000C040585B5F1CC028300CB48C2F47E06C8A
+:10121000005CEA1C0000F80B0F8AB509AF2815081E
+:101220000EA88D84C80B300A500ABA8B19CBBA9B12
+:10123000400B6E3C183BCDC28F8BC75B300C2FFD33
+:10124000D832D703800017A0D421E06700F8EA174E
+:101250000000E0A00263C070300CEF6C0008300B9F
+:10126000302AC048301C309B304AAECAAE8BE06B8F
+:101270000120EA1B0000B68CDA2AD7038000171879
+:10128000E06C00F8EA1C0000303BB88B302BB8CB88
+:101290005EFD0000E06B00F8EA1B00007689E619AD
+:1012A000FFFF198AA96A1409199A120A978A1498D1
+:1012B000E618FFFF19A9A969120819B91009763CA7
+:1012C0001839C063308CB68C30ACB6CC5EFD122AB7
+:1012D0002FFA979A5EFF0000D421E0670164EA17B5
+:1012E0000000E06600F8EA1600006C9A5C7A6C8BED
+:1012F0000E9C6C495D196C9B5C7B0E9CFEB0F8806B
+:10130000DA2A0000D401E06C00F8EA1C0000788BB7
+:10131000E06C0164EA1C0000F60A1608B88AB89B63
+:10132000302BFEB0F86DDA0A800003FCE07B86A06B
+:10133000FE7A0814740918695E1D201BCFA15EFE99
+:10134000D421FE780818E06E1200EA1E007AE067E9
+:10135000C6C0EA17002DEC76BBA0580CC2414A3536
+:101360006A0CA1AC0C3BC0323009C0980E3BC032B5
+:101370003019C0581C3B3029F9B90203189EE01EF1
+:10138000FFF9306CF9E900191C49129BE1BC00001F
+:10139000D3033249EA19AA0091098B0BB19CC243CD
+:1013A000D503D82A49256A0C1895A1A50C3BC03253
+:1013B0003009C0980E3BC0323019C0581C3B302950
+:1013C000F9B90203E015FFF9306CF9E9001912458B
+:1013D000E1BC0000D3033289EA19AA009109484907
+:1013E0009305B19CCDE2D82AFFFF0824FFFF08280F
+:1013F000D401202DA36CFE790824F20C0308FA0C0A
+:101400000908109EE01EF0FFA96BE21B0F001C4BA9
+:10141000B1ABFA0C090BE1BB0000D303F8C8FFDC49
+:10142000EA18AA00FE7E08189D08FA0C030EF20CBA
+:10143000090EB19BC023D503F40C1518C060301CF5
+:10144000C76FC0303FFCC028300C2FEDD802000021
+:10145000D401202DA36CFE7A081CF40C030BFA0CAB
+:10146000090B1699E019F0C1E419C0F0FB38001C13
+:10147000306BF7E800181049FB38000CFB3E000EFB
+:10148000F1EE1018FB3E000DF1EE1028338BF7E85B
+:10149000003810494058A968E2180F001049404828
+:1014A000EE7B0000F7E8010810494068B968E618CB
+:1014B0003F001049FA0C0909E1BB0000D303F8C949
+:1014C000FFE4EA19AA00FE7808189109FA0C03084B
+:1014D000F40C0908B19BC023D5032FEDD80A0000F6
+:1014E000202DA36CFE7B081CF60C030AFA0C090ADB
+:1014F0001499A1A9FA0C0909E1BA0000D303F8C9AB
+:10150000FFE4EA19AA00FE7808189109FA0C03080A
+:10151000F60C0908B19AC023D5032FED5EFD00003B
+:10152000202DA36CFE7B081CF60C030AFA0C090A9A
+:101530001499A1C9FA0C0909E1BA0000D303F8C94A
+:10154000FFE4EA19AA00FE7808189109FA0C0308CA
+:10155000F60C0908B19AC023D5032FED5EFD0000FB
+:10156000FE7B0814580CC051760CA59C5E3DCFDB69
+:10157000760CA78CCFE25EFDE07B86A0FE7A086445
+:10158000F40C002A740CA1CC950C740CA19C5E2D5B
+:10159000201BCFC15EFE0000D43116971495300396
+:1015A000F20616012016FE740864E80C0024680B8D
+:1015B000A19BC0623013CE1FC0373FFCD832B1664A
+:1015C000E61600FF302CF9E500150C45A967E21777
+:1015D0000F000A4789075813C041680CA1AC890C59
+:1015E000D83A0000D4013009FC188000100CFEB07D
+:1015F000F9C5D80AD4211897F40C1510C040FEB0D4
+:10160000F919AE8CD82AD70380000830D401F40C25
+:101610001510C060178C580CC030FEB0F911D80AF4
+:101620008000083CD421189516971496C0680E9C2B
+:10163000FEB0F9322FF70ACC0C9CFE360001F80BF5
+:101640001510CF61D82AD70380000894D4211896AA
+:1016500016951497C0680B3B0C9CFEB0F9472FF60B
+:101660000E9CFE370001F80B1510CF61D82AD70366
+:10167000800008E8E0690010EA190000F60B001B82
+:1016800016091898580A5E0D133B201A10CBCFD1BB
+:101690005EFD0000E06900E0EA190000F20B00299D
+:1016A0001898580A5E0D133B201A10CBCFD15EFD5F
+:1016B000FC198080120B1898580A5E0D1739201AF1
+:1016C00010C9CFD15EFD0000D4013019FC18808014
+:1016D000100CFEB0F953D80A80000978E5BC000070
+:1016E000E06B00E0EA1B0000F80A1601B68AF80A6F
+:1016F0001614B69AF80A160CB6AABD8CB6BC5EFDD6
+:10170000D401201D301A300B1A9CC75F1B8B580B5D
+:101710005F1C2FFDD8020000D421E06700E4EA1727
+:1017200000008E8C580CC071FEB0F83EAE0C300C30
+:10173000FEB0F8A0E0660080C0D85806C0F0FE3CBD
+:101740000001AE0C300B5C7CFEB0F8E6FE36FF010B
+:101750005C568E8C580CCF21DA2AD82A800007A438
+:101760008000087080000914D303FE7C1000E06B39
+:101770000A03EA1B5501990BE06B0A03EA1BAA0155
+:10178000990BC008D401FEB0F5D7E0A000BBFEB0B5
+:10179000F4A6D80A8000033480001900800000DA23
+:1017A000D401201D300BE06A01FCEA1A8080740924
+:1017B000A9D9F3EC109C500C318C4009F20C0A4A68
+:1017C0005C5A145BA96B5C7B308AEDBB000FC04296
+:1017D000EC1B83805C7BA17B5C7B201ACF71A98B87
+:1017E000208CCEC1129AE01AFF00144B500B304AE5
+:1017F0001A9BE06C01FCC69F2FFDD80AD42120ADB6
+:10180000E0672400EA1700F40E9B300CFEB0FD9A4E
+:10181000301A306B300CFEB0FDED0E9CE0A0015E86
+:10182000E0671CA8EA178000301C5D173009300AF9
+:10183000300BFE7C0C00E0A0019BC021C008FE7CA8
+:101840000C00E0A001A5E0A0009F4ABB161CC04010
+:10185000161CC040C058305CC048302CC028303CFA
+:10186000300BFB6B002433FA508A507B506C301CD9
+:10187000FB6C0016FB6B0015FB6C0014FACCFFEC44
+:101880001A9B3149190A16AA2049CFD1300CFEB053
+:10189000FDE1300CFEB0FE26300CFEB0FE63E066CB
+:1018A00007C0EA168000301C5D16303C5D17E0670B
+:1018B0001B24EA178000301B300C5D17301B301CD6
+:1018C0005D17301B303C5D17301B302C5D17301B13
+:1018D000304C5D17300C5D162F6DD82A80001340F8
+:1018E000800013F080001AD880001B6C80001B8CD5
+:1018F00080001984007A1200800014E080001560D6
+:10190000D42120ADE06707C0EA178000301C5D17C6
+:10191000E0661B24EA168000300B300C5D16300B9D
+:10192000301C5D16300B303C5D16300B302C5D16D4
+:10193000300B304C5D16300CE0A001B8300C5D1758
+:10194000300CFEB0FDEF300CFB6C0024508C507C52
+:10195000506CFB6C0016FB6C0015FB6C0014FACC91
+:10196000FFEC1A9B3149190A16AA2049CFD1300C35
+:10197000FEB0FD702F6DD82A80001CA880001520B5
+:1019800080001450D431205DFACCFFF8E06B1D7C50
+:10199000EA1B8000B709B928170818A83FF73FF4D9
+:1019A000E0661D0CEA1680005D16E0A001A7501C41
+:1019B000E0651D20EA1580005D15E0A001B71890D4
+:1019C0005D165D15300330053006C2181830C1F4BD
+:1019D000401B0A3BC1C41615F8000106EC0B141F8E
+:1019E000E072D330EC020648F6020349109A129BCB
+:1019F0000A98EA09141FE0A001311493580AC07034
+:101A0000400C141C5C4CE04C2711C12550030A9279
+:101A10000C91E0A001731895E0A001881896043598
+:101A2000C035023CCD445803C031300CC178300C75
+:101A3000FACAFFF8F40C032B062B083BF604173008
+:101A4000F80717302FFC583CCF435BF7E60C170024
+:101A5000C050FACBFFF8F607032C2FBDD832D703BE
+:101A600080001C5880001CF880001D28EBCD40FE33
+:101A7000E06C1E54EA1C8000E06E1E6CEA1E8000C2
+:101A8000300A300B190719061905EFE61003E7D3E2
+:101A9000C002C1C1EA041603C1900C37C090AF095F
+:101AA0002014AD28CFD1EBD5C003C121C0B820147C
+:101AB000AD2ACFE1EBD5C003C050300220150CC2D7
+:101AC000CFD11C3CCE03E3CF80FE0C37CF700F315B
+:101AD00020150CC1CEBB0000D4211897E06607E0AA
+:101AE000EA168000E06B07C0EA1B8000E06C8A41C8
+:101AF000EA1C01F71837C103301C5D1BE06C148130
+:101B0000EA1C03EF18373FFBC042311C5D16D82A90
+:101B1000310C5D16D82A300C5D1B3FFB311C5D1665
+:101B2000D82A0000D401FE790404720AFE7904D494
+:101B30007208A788C0333FFCD802E1B90000D30384
+:101B40003048F00C0028EA18AA00FE7E04589D08D0
+:101B5000E01AFFF8F7DBC003144BA7BBFE7A0404BE
+:101B6000F40C092BB199C023D503D80AD4017828E5
+:101B7000BD98CFE3A96BA1ABF94B0040B16A990ABC
+:101B8000782BB99BCFE3129BC0CCDA0A782BB99B98
+:101B9000CFE3780BA1AB990B782BB99BCFE35EFD1C
+:101BA000782AB99ACFE3991B782BB99BCFE35EFDD6
+:101BB000D401D503FEB0FE24FEB0F366FEB0F3629E
+:101BC000C031FEB0F3CDC008800017FC8000028455
+:101BD00080000280D401F80B1518C040FEB0F3C09D
+:101BE000D80AFEB0F3EBD80A8000035C800003B88B
+:101BF000D4013009300A305B300CFEB0FCCF300C21
+:101C0000E0A00070D80AD70380001CE0D401300C9B
+:101C1000FE7B0864970C3009300A305BFEB0FCBED6
+:101C2000D80AD70380001598D401E06900F8EA19B2
+:101C30000000728C729A5C7AE06B0164EA1B00000F
+:101C4000F1DCC006100B72585D18300CE06B098097
+:101C5000EA1B0000975CDA0AEBCD4080340C3007B9
+:101C6000300EA17A5CFB5CFE5CF7103EF2071300BD
+:101C7000C053101EEE090147A1AA201CCF310E99B6
+:101C80001C98E3CD80800000E0690000EA19800024
+:101C9000121CF9DCC00EF9EA11ECFE7A0000A59BDB
+:101CA000F40B092C5EFD0000E1BB0000D303FC1A1D
+:101CB000AA00FE790458930AFE7A0400950CB19BA1
+:101CC0005E3DD5035EFD0000FC198000120B1898E4
+:101CD000580A5E0D1739201A10C9CFD15EFD0000D9
+:101CE000FE7B0864F60C002B760CA19C5E3D760C06
+:101CF000A1AC970C5EFD0000D401FE7C0C00E0A0BE
+:101D00000019A17CD802D70380001D30D401300B0C
+:101D1000FE7C0C00FEB0FF46D80AD70380001BA053
+:101D2000300CE3BC00425EFDE1BC00425EFC000002
+:101D3000781B5EFB00001000000020000000400047
+:101D4000000080000000C0000001000000018000D1
+:101D50000002000000030000000400000006000074
+:101D600000080000000C000000100000002000002F
+:101D7000000000000000000000000000007A1200D7
+:101D800000B71B0000F424000008000080001CC8FD
+:101D9000800015E4000000000000000000000000CA
+:101DA00000000001800015F48000160C00000020E7
+:101DB000800016248000164C00000003800016747A
+:101DC00000000000000000048000169400000000E5
+:101DD00000000200800016B0800016C8000000005D
+:101DE00000000000000000000000000000000000F3
+:101DF00000000000000000000000000000000000E3
+:101E000000000000000000000000000000000000D2
+:101E100000000000000000000000000000000000C2
+:101E200000000000000000000000000000000000B2
+:101E300000000000000000000000000000000000A2
+:101E40000000000000000000000000000000000092
+:101E50000000000080001E7000000008000000D498
+:0C1E6000000000E0000000E00000092A83
+:101E7000800007D4000000001200000000030000F2
+:101E80000000000000000000000000000000000052
+:101E900000000000000000000403090441544D4507
+:101EA0004C000000444655204154333255433343DF
+:101EB0000000000080000F7480000F9880000F9CCD
+:101EC0008000103C80001D8880001D9480001DA0B3
+:101ED00080001DAC80001DB880001DC480001DD096
+:101EE00080001DDC80001DE880001DF480001E00C5
+:101EF00080001E0C80001E1880001E2480001E30F2
+:101F000080001E3C80001E481201000200000040BC
+:101F1000EB03EB2F02010102000100000902120095
+:101F2000010100C0320904000000000000000000B0
+:101F30000000004C000000B4000000C8000000A039
+:041F4000000000CCD1
+:040000058000000077
+:00000001FF
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.2/at32uc3c-isp_cfg-1.1.2.dat b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.2/at32uc3c-isp_cfg-1.1.2.dat
new file mode 100644
index 0000000..76f0ab2
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.2/at32uc3c-isp_cfg-1.1.2.dat
@@ -0,0 +1 @@
+’žbáÿ× \ No newline at end of file
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.2/program_at32uc3c-isp-1.1.2.cmd b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.2/program_at32uc3c-isp-1.1.2.cmd
new file mode 100644
index 0000000..3b9c850
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.2/program_at32uc3c-isp-1.1.2.cmd
@@ -0,0 +1,82 @@
+@echo off
+setlocal enableextensions enabledelayedexpansion
+
+: This command script programs the ISP (flash array), the ISP
+: configuration word (User page) and the general-purpose fuse bits.
+
+: Copyright (C) 2006-2008, Atmel Corporation All rights reserved.
+:
+: Redistribution and use in source and binary forms, with or without
+: modification, are permitted provided that the following conditions are met:
+:
+: 1. Redistributions of source code must retain the above copyright notice, this
+: list of conditions and the following disclaimer.
+:
+: 2. Redistributions in binary form must reproduce the above copyright notice,
+: this list of conditions and the following disclaimer in the documentation and/
+: or other materials provided with the distribution.
+:
+: 3. The name of ATMEL may not be used to endorse or promote products derived
+: from this software without specific prior written permission.
+:
+: THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED
+: WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND
+: SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,
+: INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+: BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+: DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+: OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+: NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+: EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+echo.
+echo Performing a JTAG Chip Erase command.
+avr32program -p AVRONE chiperase -F
+if ERRORLEVEL 1 (
+ color 47
+ pause
+ exit
+)
+
+echo.
+echo Programming MCU memory from `at32uc3c-isp-1.1.2.hex'.
+avr32-objcopy -I ihex -O binary at32uc3c-isp-1.1.2.hex at32uc3c-isp-1.1.2.bin
+avr32program -p AVRONE program -finternal@0x80000000 -cint -e -v -O0x80000000 -Fbin at32uc3c-isp-1.1.2.bin
+if ERRORLEVEL 1 (
+ color 47
+ pause
+ exit
+)
+del at32uc3c-isp-1.1.2.bin
+
+echo.
+echo Programming ISP configuration word \(default for UC3C_EK i.e. Word2 == 0x929E0E62 and Word1 == 0xE11EFFD7\)
+avr32program -p AVRONE program -finternal@0x80000000 -cint -e -v -O0x808001F8 -Fbin at32uc3c-isp_cfg-1.1.2.dat
+if ERRORLEVEL 1 (
+ color 47
+ pause
+ exit
+)
+
+echo.
+echo Programming general-purpose fuse bits.
+avr32program -p AVRONE writefuses -finternal@0x80000000 gp=0xFFF7FFFF
+if ERRORLEVEL 1 (
+ color 47
+ pause
+ exit
+)
+
+echo.
+echo Resetting MCU.
+avr32program -p AVRONE run -R
+if ERRORLEVEL 1 (
+ color 47
+ pause
+ exit
+)
+
+color 27
+pause
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.2/program_at32uc3c-isp-1.1.2.sh b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.2/program_at32uc3c-isp-1.1.2.sh
new file mode 100644
index 0000000..f78bde8
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/releases/at32uc3c-isp-1.1.2/program_at32uc3c-isp-1.1.2.sh
@@ -0,0 +1,59 @@
+#!/bin/sh
+
+# This shell script programs the ISP (flash array), the ISP configuration words
+# (User page) and the general-purpose fuse bits.
+
+# Copyright (c) 2009 Atmel Corporation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice, this
+# list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# 3. The name of Atmel may not be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# 4. This software may only be redistributed and used in connection with an Atmel
+# AVR product.
+#
+# THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+# EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+#
+
+
+echo
+echo Performing a JTAG Chip Erase command.
+avr32program chiperase
+
+echo
+echo Programming MCU memory from \`at32uc3c-isp-H.hex\'.
+avr32-objcopy -I ihex -O binary at32uc3c-isp-1.1.2.hex at32uc3c-isp-1.1.2.bin
+avr32program program -finternal@0x80000000,512Kb -cint -e -v -O0x80000000 -Fbin at32uc3c-isp-1.1.2.bin
+rm -f at32uc3c-isp-1.1.2.bin
+
+echo
+echo Programming ISP configuration words \(default for EVK1100 i.e. Word2 == 0x929E1424 and Word1 == 0xE11EFFD7\)
+avr32program program -finternal@0x80000000 -cint -e -v -O0x808001F8 -Fbin at32uc3c-isp_cfg-1.1.2.dat
+
+echo
+echo Programming general-purpose fuse bits.
+avr32program writefuses -finternal@0x80000000 gp=0xFFF7FFFF
+
+echo
+echo Resetting MCU.
+avr32program reset
+
+pause
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/sysclk_uc3c.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/sysclk_uc3c.c
new file mode 100644
index 0000000..6ec97a4
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3c/sysclk_uc3c.c
@@ -0,0 +1,233 @@
+/**
+ * \file
+ *
+ * \brief Part-specific system clock management
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "preprocessor.h"
+#include "compiler.h"
+#include "board.h"
+#include "pm_uc3c.h"
+#include "scif_uc3c.h"
+#include "ast.h"
+#include "cycle_counter.h"
+#include "flashc.h"
+
+
+// Use Internal RC8MHz, wait characterization results
+// If it works use this configuration as default.
+//#define INTERNAL_RC8MHZ_USED
+
+#ifndef INTERNAL_RC8MHZ_USED
+#include "freq_detect.h"
+#endif
+
+/*!
+ * Detects extern OSC frequency and enable USB clock
+ */
+void sysclk_init(void)
+{
+
+#ifdef INTERNAL_RC8MHZ_USED
+ // Start the 8Mhz Oscillator
+ scif_start_rc8M();
+ // Set the main clock source as being RC8MHz.
+ pm_set_mclk_source(PM_CLK_SRC_RC8M);
+
+ scif_pll_opt_t opt;
+ opt.osc = 2;
+ opt.lockcount = 63;
+ opt.div = 0;
+ opt.mul = 5;
+ opt.pll_div2 = 1;
+ opt.pll_wbwdisable = 0;
+ opt.pll_freq = 1;
+
+ // lockcount in main clock for the PLL wait lock
+ scif_pll_setup(SCIF_PLL0, opt);
+
+ /* Enable PLL0 */
+ scif_pll_enable(SCIF_PLL0);
+
+ /* Wait for PLL0 locked */
+ scif_wait_for_pll_locked(SCIF_PLL0);
+#else
+ int mul;
+
+ // Switch to OSC ISP
+ // Set max startup time to make sure any crystal will be supported
+ // We cannot use a TC to measure this OSC frequency
+ // because the master clock must be faster than the clock selected by the TC
+
+ // Configure OSC0 in crystal mode, external crystal
+ // with a fcrystal Hz frequency.
+ scif_configure_osc_crystalmode(SCIF_OSC0, 16000000);
+ // Enable the OSC0
+ scif_enable_osc(SCIF_OSC0, AVR32_SCIF_OSCCTRL0_STARTUP_16384_RCOSC,
+ true);
+ flashc_set_flash_waitstate_and_readmode(16000000);
+ pm_set_mclk_source(PM_CLK_SRC_OSC0);
+
+ // Initialize the AST with the internal RC oscillator
+ // AST will count at the frequency of 115KHz/2
+ if (!ast_init_counter(&AVR32_AST, AST_OSC_RC, 0, 0)) {
+ while (1);
+ }
+ // Enable the AST
+ ast_enable(&AVR32_AST);
+
+ // Detect the frequency
+ // mul = (((96000000 / freq_detect_start())/2)-1)
+ switch (freq_detect_start()) {
+ case 8000000:
+ mul = 5;
+ break;
+ case 16000000:
+ mul = 2;
+ break;
+ case 12000000:
+ default:
+ mul = 3;
+ break;
+ }
+
+ scif_pll_opt_t opt;
+
+ // Set PLL0 VCO @ 96 MHz
+ // Set PLL0 @ 48 MHz
+ opt.osc = SCIF_OSC0;
+ opt.lockcount = 63;
+ opt.div = 0;
+ opt.mul = mul;
+ opt.pll_div2 = 1;
+ opt.pll_wbwdisable = 0;
+ opt.pll_freq = 1;
+
+ // lockcount in main clock for the PLL wait lock
+ scif_pll_setup(SCIF_PLL0, opt);
+
+ /* Enable PLL0 */
+ scif_pll_enable(SCIF_PLL0);
+
+ /* Wait for PLL0 locked */
+ scif_wait_for_pll_locked(SCIF_PLL0);
+
+ // Use 1 flash wait state
+ flashc_set_wait_state(1);
+
+ // Switch the main clock to PLL0
+ pm_set_mclk_source(PM_CLK_SRC_PLL0);
+
+ // fPBA: 12 MHz
+ // fPBB: 12 MHz
+ // fHSB: 12 MHz
+ pm_set_clk_domain_div(PM_CLK_DOMAIN_0, PM_CKSEL_DIVRATIO_4); // CPU
+ pm_set_clk_domain_div(PM_CLK_DOMAIN_1, PM_CKSEL_DIVRATIO_4); // HSB
+ pm_set_clk_domain_div(PM_CLK_DOMAIN_3, PM_CKSEL_DIVRATIO_4); // PBB
+ pm_set_clk_domain_div(PM_CLK_DOMAIN_2, PM_CKSEL_DIVRATIO_4); // PBA
+ pm_set_clk_domain_div(PM_CLK_DOMAIN_4, PM_CKSEL_DIVRATIO_4); // PBC
+
+ // Use 0 flash wait state
+ flashc_set_wait_state(0);
+#endif
+}
+
+
+/*!
+ * Reset the generation of system clocks and switch to RCOsc
+ */
+void sysclk_reset(void)
+{
+ flashc_set_wait_state(1);
+ pm_set_clk_domain_div(PM_CLK_DOMAIN_0, PM_CKSEL_DIVRATIO_2); // CPU
+ pm_set_clk_domain_div(PM_CLK_DOMAIN_1, PM_CKSEL_DIVRATIO_2); // HSB
+ pm_set_clk_domain_div(PM_CLK_DOMAIN_3, PM_CKSEL_DIVRATIO_2); // PBB
+ pm_set_clk_domain_div(PM_CLK_DOMAIN_2, PM_CKSEL_DIVRATIO_2); // PBA
+ pm_set_clk_domain_div(PM_CLK_DOMAIN_4, PM_CKSEL_DIVRATIO_2); // PBC
+
+ pm_set_mclk_source(PM_CLK_SRC_SLOW);
+
+ flashc_set_wait_state(0);
+ scif_pll_disable(SCIF_PLL0);
+
+ scif_pll_opt_t opt;
+ opt.osc = 0;
+ opt.lockcount = 0;
+ opt.div = 0;
+ opt.mul = 0;
+ opt.pll_div2 = 0;
+ opt.pll_wbwdisable = 0;
+ opt.pll_freq = 0;
+ scif_pll_setup(SCIF_PLL0, opt); // lockcount in main clock for the PLL wait lock
+}
+
+
+void sysclk_enable_usb(void)
+{
+ // Setup USB GCLK
+ scif_gc_setup(AVR32_SCIF_GCLK_USBC,
+ SCIF_GCCTRL_PLL0, AVR32_SCIF_GC_NO_DIV_CLOCK, 0);
+ // Enable USB GCLK
+ scif_gc_enable(AVR32_SCIF_GCLK_USBC);
+}
+
+
+void sysclk_disable_usb(void)
+{
+ AVR32_SCIF.gcctrl[AVR32_SCIF_GCLK_USBC] = 0;
+ scif_gc_setup(AVR32_SCIF_GCLK_USBC,
+ SCIF_GCCTRL_PLL0, AVR32_SCIF_GC_NO_DIV_CLOCK, 0);
+}
+
+
+void freq_detect_iface_ref_cnt_reset(void)
+{
+ ast_set_counter_value(&AVR32_AST, 0);
+}
+
+int freq_detect_iface_ref_cnt_value(void)
+{
+ return ast_get_counter_value(&AVR32_AST) * 2;
+}
+
+void freq_detect_iface_target_cnt_reset(void)
+{
+ Set_sys_count(0);
+}
+
+int freq_detetc_iface_target_cnt_value(void)
+{
+ return Get_sys_count();
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/iar/at32uc3d-isp.hex b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/iar/at32uc3d-isp.hex
new file mode 100644
index 0000000..3929490
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/iar/at32uc3d-isp.hex
@@ -0,0 +1,503 @@
+:0200000480007A
+:10000000E1B80000F1D8C2C35818C0A0FEC8FFEE86
+:100010003009EA190061E06D0DB4D041D603300813
+:10002000FE791C00E06A00FCEA1A8080FE7B140066
+:100030007000E061504BEA1149537402E06301071C
+:100040000494C78CC141E7D2C210E043E11EC0F165
+:10005000EDB20009C0C3F6F30180E0642317087312
+:10006000C131EDB30003C3830230C3C1C54C91015C
+:10007000E06D0DCCD353FEC00076E3B00001E0A0EC
+:100080000D4BE0A00D7FEDB20008C262E06A00F8FF
+:10009000EA1A80807402E06301070494C4BCCE7144
+:1000A000E7D2C22FE043494FCE21E7D2C108E04357
+:1000B0000033CDD2FE7A2800E6041605A974080A9A
+:1000C0007584E013001FE8030A44E7D2C201065416
+:1000D000EDB40000CCC20230C051C1DC30083000A9
+:1000E00091003000EA100061E3B000003000300100
+:1000F0003002300330043005300630073008300954
+:10010000300A300B300C300D300EE3B00001E3B09C
+:10011000004248CF3002EA1255009302EE12FF006F
+:1001200093021C9FE8051200EA051117E605094530
+:100130000A54E04400FFFE9BFFF758045EF4000001
+:1001400080002000308A310CFE6B00047609AD99E6
+:10015000C1837609A589C553FE6A08003019763E29
+:10016000A19EC5727608A198C542740BAFCB950BC2
+:10017000FE6B00049749975C740CAFAC950CC6D825
+:10018000FE690220930C930AFE6901307208A3985D
+:10019000C042E0A0019FC6187208A388C042E0A038
+:1001A0000261C5B87208A198C092FE6801C0700EC5
+:1001B000A19EC042E0A001E6C508E06E0940EA1E2B
+:1001C00000007D08720EA58EC08293CA720CA19C9D
+:1001D000C4435838C421C0F8720EA59ECBB293CC4C
+:1001E000720CA38CC3A35818C041E0A002A7C35847
+:1001F0005848C331E86C0000FE6B01C097CCC2D8F0
+:10020000971AE0A00555E0A00107E0A0014FC258F1
+:10021000763EA59EC1227608A598C0F27408AFC8A4
+:100220009508FE6A08007418AF98C043760AA19A30
+:10023000CF92974C9759C118741BA38BC0E2740CD2
+:10024000AFCC950C302C952C740CAFAC950C741C69
+:10025000F9DCC161E0A00CB2FE6C0800786BD6033B
+:10026000800004D080000660800005808000073890
+:1002700080000CAC80000414800004A880001BB82F
+:10028000E1BC0000D3035EFC5EFF0000D421E0A0CF
+:100290000CE7CF7F1897FE6608006C0CAFDC8D0C66
+:1002A0006C0C300AE06B0220E06C0144EA1C800018
+:1002B000E0A00D326C0CB9BC8D0C6C0CB9CC8D0C63
+:1002C0006C0CADCC8D0C6C0CADAC8D0C6C0CAFBC57
+:1002D0008D0C6C0CAFCC8D0C6C0C6C1BAF9BCFE2FF
+:1002E000E0690940EA190000300A300BF2EB002007
+:1002F000F2EB0028F2EB0030F2EB00386CCB2E0969
+:100300008DC9FE6C0000780BADCB990B780BE81B08
+:100310000C00990B6C0CA1BC8D0C6C0CAFAC8D0C53
+:10032000FE7C1588780BA1AB990BB197C023D50340
+:10033000D82AD70380001C5C80001D14D421CA1F5A
+:100340001897FE6C0800780BAFDB990B780BADCBE0
+:10035000990BE0A00C93B197C023D503D82AD703FB
+:1003600080001C78D421C8DF1897FE6608006C0C4A
+:10037000AFCC8D0C6C1BAF9BCFE2FE6C0000780BFA
+:10038000A9CB990BE0A00494C46CC8FC308CFE6B24
+:100390000000976C301BFE6A0000956B310AFE6905
+:1003A0000000936A932C304C932C933B932A6C0C53
+:1003B000AFAC8D0CB197C023D503D82A80000CAC0C
+:1003C000FE6C0800780BAFCB990BFE6C0000780B2D
+:1003D000A9AB990B5EFD0000FE6B0000760AA7DA60
+:1003E000970A760AE01AFF80F9DCC007144C970CD4
+:1003F000760CA7BC970C5EFDFE6B0000760CF9DC5A
+:10040000C0075EFCE06A0940EA1A0000952CB46B54
+:100410005EFD0000D401FE6C0000780BE01BFF8045
+:10042000990B780BA7BB990BFE6C0100780B308AF7
+:100430003409F20A0C4AE0690400F4090D4AE01B91
+:10044000E68B3FF9F20A001AF4091200F20A111CB5
+:10045000A56AE21A1974144B990BE06C0940EA1C66
+:100460000000F8CBFFBC998B789BE41B8000999B24
+:10047000FE6C0000787BA1AB997B300CEA1C01007C
+:10048000FE6B01F097CCCFDEFE6B01F0304A970A8D
+:10049000302A970AE06B1000FE6A0000956BB19C51
+:1004A000C023D503D80A0000301CFE6B0220970C35
+:1004B000302CFE6B0160970C300CE06B0940EA1B9E
+:1004C0000000974C975CB66CF74C00405EFD000056
+:1004D000D421E0670940EA1700006F0C580CC030C7
+:1004E000C5EDCE3FFE6601F0FE65016030446E9CB6
+:1004F000F9DCC00F588CC090305CEF4C0040E86CC9
+:1005000000008D0C8B04D82AEEEA0044AF1BF9DB07
+:10051000C0105CCCAE1C8EAC5CCCAE2CF9DAC0103A
+:100520005CCCAE3CE0A0051ACE808B04E06C09C424
+:10053000EA1C0000300B0F8AA98AC0F28EEAF5DAB5
+:10054000C006F40915105F0AB88AB81BB82B302C06
+:10055000EF4C0040C16CD82A8EBA580AC031CEDCAC
+:10056000D82AB81BB82B301CEF4C004031078B0742
+:10057000C88E8D07B19CC023D503D82A80000F58A0
+:10058000D431E0630280EA1380005D133017FE6B04
+:1005900001F097C7B19CC023D503E0660940EA1675
+:1005A00000006D0C583CC041CFACC7FFD83A8CEC72
+:1005B000E06509C4EA1500008AA418245C74C1F13E
+:1005C0000B8B580BC031CD5CD83A30028A9B160C8D
+:1005D0008CBB163CC0656C5C580CC0305D1CC031D7
+:1005E000AA82C1188AAC8A9B180BAA1BAA228CE487
+:1005F000F9D4C006F80B15105F0CAA8CE04400413A
+:10060000F9B404405D13FE6B0130760AA38AC08200
+:10061000B19CC023D503304CED4C0040D83A6C2936
+:100620008AAB1609089BECCEFFBC5804C0501338A7
+:10063000201B1CC8CFD18AAB080BAA2B6C9BE01BDC
+:100640008000E9D4C00F16448D94FE6B013097C72B
+:10065000FE6B01F09707B19CC023D503D83A000088
+:10066000D431E0670940EA1700006F0CFE6601F024
+:10067000E86500003054581CC0C0582CC030584C9D
+:10068000C031C8DCC048EF4400408D05C0EFD83A07
+:100690006E9BF7DBC00FE06309C4EA13000086AC71
+:1006A000189A8EE9F80B00081039C044F20C010BBF
+:1006B0005C7BEEC9FFBC6E2C180A169C149E580B6E
+:1006C000C0501338201C1CC8CFD186AC160CA62CE9
+:1006D0005C7CFE6201603021E04B0040C061869B83
+:1006E000180B8EBA143BC0F5AE6C6E5C580CC08013
+:1006F0005D1CC061EF4400408D058501D83A85013D
+:10070000C1CCD83A8EEBF80B1900C0C16E5C580C06
+:10071000CF205D1CCF0086AC869B180BA61B300C2F
+:10072000A62C850131078507FEB0FDAC8D07B19C75
+:10073000C023D503D83A0000D401E06C0940EA1C7C
+:100740000000303BF94B0040789BE01B8000999BF8
+:10075000FEB0FD98FE6B0160301A970AFE6901F049
+:10076000930A308A970A930AB19CC023D503D80A0A
+:10077000D401304CE06B0940EA1B0000F74C00400C
+:10078000FEB0FD80310BFE6A0160950BFE6A01F040
+:10079000950BB19CC023D503D80A0000D401E06BAF
+:1007A0000940EA1B0000764C580CC0205D1CD80A9A
+:1007B000FE6C140C780BE06A1DA0EA1A8000F7DBCF
+:1007C000C004F40B032CA98C5EFC0000FE6A14002C
+:1007D0007409A7C9340BF7EC006C124C950C5EFD44
+:1007E000D421E0670838EA178000E06B07CCEA1BE9
+:1007F0008000E06AE1C1EA1A00E4143CC123E06A27
+:10080000C381EA1A01C9143C301CC0625D1B3FFB66
+:10081000311C5D17D82A5D1B3FFB310C5D17D82AB0
+:10082000300C5D1B3FFB311C5D17D82AFE6B140892
+:10083000760CA19CCFC25EFDD42118951697E06678
+:100840000008EA160000F0160000FE6C1404780B95
+:10085000E01BFFC0EBD5C00616455807C0A6E01543
+:1008600000FFE415FF000A9BEBD7C010F7E51085E9
+:10087000EBD5C018EA15A5009905781CE21C000C00
+:100880008D1CF0160000D82AFE6B1408760CF9DCDB
+:10089000C0815EFCD4013FFB309CCCFFD80A000035
+:1008A000D401F60A1518304AF9BA0005189B149CB1
+:1008B000CC4FD80AD42118961697C7BF0E9BA39C7D
+:1008C000B9360C9CCEEFD82AD42118973006308543
+:1008D00020150E9B0A9CCEFFE06B0008EA1B00006F
+:1008E000761C18465805CF519716D82AFE6B14145B
+:1008F0007618760A30091449F9DCC006EDBC00050B
+:10090000F2081730F00C0A48A1985F3C5EFC00002A
+:10091000D42118971696F7DCC006308CC8EFEC0C83
+:100920001518C0400E9CCE3FD822DA2AD401F60A10
+:100930001518C061F9DCC006189B307CC7EFD80AD7
+:10094000D401F60A1518300BC030CE3FD80ACEFFBE
+:10095000D80A0000D401189B30CCFEB0FF6FFE6BAC
+:100960001408760CF9DCC0A1D8020000D421169737
+:100970003016189B302CFEB0FF61EE0C1518C0C06D
+:10098000E0670008EA1700006E153FFCCE4F18968E
+:100990006E1C18458F150C9CD8220000D4013FFB1B
+:1009A00030FCFEB0FF4BFE6B1408760CF9DCC0A1E6
+:1009B000D8020000D42118973FFB30ECFEB0FF3E78
+:1009C000EE0C1518F9BC0001C020CE9FD822000003
+:1009D000D671204D30013002FE6C140C78093008BD
+:1009E000EA188000E06E1DA0EA1E8000F3D9C00462
+:1009F000FC09032C18085028405616970C0A149529
+:100A0000300CEA1C80001836C0831036C0B3300C9E
+:100A1000EA1C80801836C0625C36160618060C97F1
+:100A20001896E06C0101EA1C8080183AC063E0650A
+:100A30000100EA158080C098301CEA1C8080183ABA
+:100A4000C0421438F00517300A9CA1CCE01CFFFC12
+:100A5000E01CFFF8503CE9D5C003C0E8580BC0507B
+:100A6000300CCA9F661C18423FFB30DCFEB0FEE62D
+:100A7000049C66121842E0630008EA1300000A367C
+:100A8000E08200BB3FFB303CFEB0FED8661C184243
+:100A90000C99E019FF00F2CCFF00403AF40C0D4B2A
+:100AA0000A9CE01CFF0018395F2AF9D6C008C26012
+:100AB0000C98E018FFF8C058720C12AC720C12AC13
+:100AC0001039CFB3FDD6C003C190300C1336FA0CE9
+:100AD0000B062FFC1C3CCFB3588CC0620F39FA0CAC
+:100AE0000B092FFCCFAB109640391238C062400979
+:100AF0000CA940190CA9C0283011A39BEC0C1603BB
+:100B0000181B303C0E6C187CC040202CC0B0C1A813
+:100B1000169C580CC2700F0B0CAB0F0B0CAB201CAF
+:100B2000CF9B169C580CC1E0300B0F29FA0B0A1909
+:100B30002FFB584BCFB340090CA940190CA9201C1E
+:100B4000CF2B169CC0D8300B0F39FA0B0B092FFB9B
+:100B5000588BCFB340090CA940190CA9201C580C84
+:100B6000CF31F40C1518C240E20C1518C030089CA7
+:100B7000C098300CC0580F3BFA0C0B0B2FFC083CF4
+:100B8000CFB30A995804C061C108133BFA0C0B0B90
+:100B90002FFC588CCFB3400B0CAB401B0CABC05898
+:100BA000720C12AC720C12ACF9D9C008CFA1301C77
+:100BB000EA1C80801836FB3B001BFE92FF51580B4D
+:100BC000C070300B3FFCFEB0FED3661C18423FFBEA
+:100BD000301CFEB0FE33049C66121842402B1636C1
+:100BE000FE93FF4B5C360E06300CEA1C8080180624
+:100BF0000C971896C41B8712405C2FCDDC72000046
+:100C0000D401E06A00B4EA1A000015895809C0212D
+:100C1000D80AE06A00A8EA1A00007418700913C81C
+:100C2000F00C1800CF6295297418700E1DB92FEEC4
+:100C3000FDD950005CC9202E5C791C09C048118E7A
+:100C40001C08952874281238CE42119E584ECF8128
+:100C500011AEFC0C1800CF4111BEFC0B1800CF01E7
+:100C6000DA0A0000D4211897300BCCBFC021D82A53
+:100C7000E06C00A8EA1C0000781B761CF8070F8BBC
+:100C8000761C5D1CDA2A0000D4211897CBAFC02156
+:100C9000D82AE06C00A8EA1C0000781B761CF80734
+:100CA0000F8BF01B00005F1CD8220000D421E067EE
+:100CB00000A8EA170000E06600B4EA1600000D8CF8
+:100CC000580CC0C03005C0580A9CCCDF2FF55C55CD
+:100CD0006E1C780B17CC1835CF85300CAC8CE06CC3
+:100CE0000100AE1CD82A0000D401E06B0940EA1BC9
+:100CF0000000969CF9DCC007FEB0FB70D80AD70351
+:100D0000800003D8D421E0670940EA1700008E9BD9
+:100D1000F3DBC008E0680090EA180000E06A040411
+:100D2000EA1A8000F60C1608201CC060201CC0E0E7
+:100D3000201CC210D82A700C198B5D1A8EBC8EEB49
+:100D4000F60C1900C022AE6CDA2A700CF93B0011C7
+:100D50001639C025D82A701BF609033C19BB2FECA5
+:100D6000F9DB50005CCB5C7B202C5D1A302C6E2BA9
+:100D7000B69CCE5BE06C0014EA1C00005C5B167B4A
+:100D8000C060201BC070201BC180D82A304B2E4C65
+:100D9000CD5B305BF8C9FFE03008F208070E5CCE8F
+:100DA000F8080016AC1E2FF81638CF853029F20B44
+:100DB000001BB88B5C5BCC2B30CBF8C9FFD8CEDBEB
+:100DC000D431E0660940EA1600000D8CE06500B4FD
+:100DD000EA1500000B8BE06700A8EA170000EDBCE5
+:100DE0000007C4828CBAF4091510C021D83AF9DC86
+:100DF000C005E0640404EA148000580CC1A10D9CF5
+:100E0000187CC060206CC0C0202CC0C0D83A582AC2
+:100E1000C020D83A302BEECCFFFE5D14DA3AC73F43
+:100E2000D832581AC020D83A301B0A9C5D14DA3ADE
+:100E3000581CCDD10D9C58ACCDA1581AC020D83A21
+:100E4000F60C1518CFD08CA55C556E1C780B17CC02
+:100E50001835CF64300B0A9CCD4ECF206E1C781B0A
+:100E6000F605032C783B5D1BAE8C301B0E9C5D148D
+:100E7000DA3AF9DCC005E0640C88EA148000580C0A
+:100E8000C4F10D9C201CC140202CCB10202CC06034
+:100E9000202CCAD0202CC180D83A8CBC580CC02041
+:100EA000D83AE06C0CE8EA1C80008D4CDA3A8CBC35
+:100EB000580CC020D83A8C9C581CCFD18E9CE21C78
+:100EC000FDFFAE1CDA3A8CBC580CC020D83AFEB0FC
+:100ED000FA95CFD0E0630090EA130000660CF93B6E
+:100EE00000118C9CF80B1800CF23CE1E8C9CAA8C72
+:100EF0005C5CF80B1518C021DA3A661BF60C003B57
+:100F0000208B8F1B30066E1C780B17CC1836CF54F5
+:100F1000300B0C9C5D14CDB02FF65C56CF5B581C8B
+:100F2000FE91FF660D9C58BCFE91FF628CBC580C74
+:100F3000C030300CC0E8F60C1518CFC08CA55C553D
+:100F40008C975C570A9CC8FECF500E9B0A9C5D1480
+:100F50005C5CD832800003F8D421300CE067094093
+:100F6000EA170000AE6C8F4C8F5C0F8CEDBC000755
+:100F7000C0528EBB580BC021D82AE21C0060C04171
+:100F8000C20FC020DA2A0F8CF9DCC005581CCF51E3
+:100F9000E06C00B4EA1C0000198B580BCEE08EA662
+:100FA0005C56E06700A8EA1700006E1C780B17CCAF
+:100FB0001836CE34E0650C00EA158000300B0C9C2E
+:100FC0005D15CDB06E1C781BF60603276E3C5D1CCC
+:100FD000F7DCC0080C9C5D15CD006E2C5D1CCD317E
+:100FE000D82A0000D401C65CE0A0038CE0A0039CDA
+:100FF000E06B00B8EA1B0000F76C0008DA0AD703C0
+:1010000080001700800017245EFD0000D421E065F9
+:101010000940EA1500000B8C189BE21B0060E04BB6
+:101020000020C020D82A0B9BE0660404EA1680004A
+:10103000E06700B8EA170000A98CC162202BC0F05D
+:10104000201BC301E06C00E0EA1C0000198B580B68
+:10105000C020C2DD306B0E9C5D16DA2A6E6C580C17
+:10106000C2105D1CD822201BC050203BC1B1C21C45
+:10107000DA2A6E7C580CC0A0300CE0A003A5E06C0E
+:1010800010D0EA1C80008B4CDA2A340BE06C00E4B0
+:10109000EA1C00005D16E06C10E0EA1C80008B5C2E
+:1010A000DA2A30FCAE8C30ACAECCD82A5EFD000023
+:1010B000300CE06B00B8EA1B0000B68C302AB6CAD0
+:1010C000E06A0940EA1A0000955C954C977C5EFD49
+:1010D000D401E06C00B8EA1C0000787B5D1BD80AE4
+:1010E000D431201DCE6FE06700B8EA1700000E96DD
+:1010F00030048F64301CE0A00367E06A0924EA1A18
+:101100000000EF3C000815831863E06C00E4EA1C63
+:10111000000019A9E0650124EA150000E06008005C
+:10112000E06812F8EA18800030A23031198E199B5D
+:10113000F7EE108EE02E0100C0F0E02E0200C2C0DB
+:10114000201EC420E02E00FFC6D0203EC6D0E02ED8
+:101150000200C780CA68E60B1518C050AE81302C5B
+:10116000AECCC9F86E5B580BC041AE81AEC2C99817
+:101170002FEC5D18E0800096009B0A9CFEB0F944BD
+:10118000E06C1C94EA1C8000E06B0940EA1B000044
+:10119000975C301CC8782FEC5D18E08000836E4CA3
+:1011A000580CC041AE81AEC2C7C8E60C1518C0606D
+:1011B000E06C12E4EA1C8000C058E06C133CEA1CAE
+:1011C00080008F6CCE7B2FEC5D18C6B06E4C580C37
+:1011D000C041AE81AEC2C6586E9C580CCDB0F8006E
+:1011E0000D445C74081C8F9C089A6E8B0A9C6E4997
+:1011F0005D190A9CC0486E8B2FFB8F8B089BFE34B9
+:1012000000015C74F60A1510CE80193BE04B00FF1C
+:10121000CF30305CAE8CE06C1368EA1C80008F6CC1
+:10122000CB9BC45CC3F8F20C1518C061E06C178C42
+:10123000EA1C8000C058E06C17A8EA1C80008F7C74
+:10124000CA9B19BB1279C0402019C200CA3B591B66
+:10125000C055308CAE8CAEC2C248583BC080582BB3
+:10126000C060584BC040585B5F1CC028300CB48C29
+:101270002F47E06C1DE8EA1C8000F80B0F8AB509C7
+:10128000AF2815080EA88D84C85B300A500ABA8BA7
+:1012900019CBBA9B400B6E3C183BCDC28F8BC7ABB2
+:1012A000300C2FFDD832D703800017C4D421E0675B
+:1012B00000B8EA170000E0A00243C070300CEF6CE9
+:1012C0000008300B302AC048301C309B304AAECA70
+:1012D000AE8BE06B00E0EA1B0000B68CDA2AD70385
+:1012E0008000173CE06C00B8EA1C0000303BB88B73
+:1012F000302BB8CB5EFD0000E06B00B8EA1B0000AD
+:101300007689E619FFFF198AA96A1409199A120A3F
+:10131000978A1498E618FFFF19A9A969120819B944
+:101320001009763C1839C063308CB68C30ACB6CC22
+:101330005EFD122A2FFA979A5EFF0000D421E06723
+:101340000124EA170000E06600B8EA1600006C9A73
+:101350005C7A6C8B0E9C6C495D196C9B5C7B0E9C63
+:10136000FEB0F852DA2A0000D401E06C00B8EA1CA2
+:101370000000788BE06C0124EA1C0000F60A1608D5
+:10138000B88AB89B302BFEB0F83FDA0A800004041C
+:10139000E07B86A0FE7A5814740918695E1D201B34
+:1013A000CFA15EFE580C5E1F498C780AA1AAEC5BA7
+:1013B000BBA0C032300CC118E06CC6C0EA1C002DC6
+:1013C000183BC032301CC098E06C1200EA1C007A56
+:1013D000183B302CF9BC0203E01AFFF9149B189A51
+:1013E000306CF9EA001A164AE1BC0000D303324B14
+:1013F000EA1BAA00FE795818930B484B970AB19C38
+:101400005E3DD5035EFDD703FFFF5824D401201DA8
+:10141000A36CFE795824F20C0308FA0C0908109EFC
+:10142000E01EF0FFA96BE21B0F001C4BB1ABFA0CE6
+:10143000090BE1BB0000D303F8C8FFDCEA18AA00DF
+:10144000FE7E58189D08FA0C030EF20C090EB19B93
+:10145000C023D503F40C1518C060301CC9AFC030D0
+:101460003FFCC028300C2FFDD8020000D401202DF5
+:10147000A36CFE7A581CF40C030BFA0C090B16999A
+:10148000E019F0C5E419C0F0FB38001C302BF7E878
+:1014900000181049FB38000CFB3E000EF1EE10184E
+:1014A000FB3E000DF1EE1028338BF7E800381049B1
+:1014B0004058A968E2180F0010494048EE7B000030
+:1014C000F7E8010810494068B968E6183F0010497C
+:1014D000FA0C0909E1BB0000D303F8C9FFE4EA19DB
+:1014E000AA00FE7858189109FA0C0308F40C0908B0
+:1014F000B19BC023D5032FEDD80A0000202DA36C8B
+:10150000FE7B581CF60C030AFA0C090A1499A1A9CF
+:10151000FA0C0909E1BA0000D303F8C9FFE4EA199B
+:10152000AA00FE7858189109FA0C0308F60C09086D
+:10153000B19AC023D5032FED5EFD0000202DA36CD2
+:10154000FE7B581CF60C030AFA0C090A1499A1C96F
+:10155000FA0C0909E1BA0000D303F8C9FFE4EA195B
+:10156000AA00FE7858189109FA0C0308F60C09082D
+:10157000B19AC023D5032FED5EFD0000FE7B581409
+:10158000580CC051760CA39C5E3DCFDB760CA58C2D
+:10159000CFE25EFDE07B86A0FE7A5860F40C002A64
+:1015A000740CA1CC950C740CA19C5E2D201BCFC19A
+:1015B0005EFE0000D431169714953003F206160132
+:1015C0002016FE745860E80C0024680BA19BC062D2
+:1015D0003013CE1FC0373FFCD832B166E61600FF8D
+:1015E000302CF9E500150C45A967E2170F000A47F2
+:1015F00089075813C041680CA1AC890CD83A000087
+:10160000D40130093008EA188000100CFEB0F9E26D
+:10161000D80A0000D4211897F40C1510C040FEB071
+:10162000F935AE8CD82AD70380000888D401F40C91
+:101630001510C060178C580CC030FEB0F92DD80AB8
+:1016400080000894D421189516971496C0680E9CB3
+:10165000FEB0F94E2FF70ACC0C9CFE360001F80BB9
+:101660001510CF61D82AD703800008ECD421189632
+:1016700016951497C0680B3B0C9CFEB0F9632FF6CF
+:101680000E9CFE370001F80B1510CF61D82AD70346
+:1016900080000940E0690010EA190000F60B001B09
+:1016A00016091898580A5E0D133B201A10CBCFD19B
+:1016B0005EFD0000E06900A0EA190000F20B0029BD
+:1016C0001898580A5E0D133B201A10CBCFD15EFD3F
+:1016D0003009EA198080120B1898580A5E0D1739E4
+:1016E000201A10C9CFD15EFDD40130193008EA1894
+:1016F0008080100CFEB0F96ED80AD703800009D0A4
+:10170000E5BC0000E06B00A0EA1B0000F80A16012F
+:10171000B68AF80A1614B69AF80A160CB6AABD8C40
+:10172000B6BC5EFDD401201D301A300B1A9CC73F99
+:101730001B8B580B5F1C2FFDD8020000D421E067E3
+:1017400000A4EA1700008E8C580CC071FEB0F8326D
+:10175000AE0C300CFEB0F8BAE0660080C0D8580677
+:10176000C0F0FE3C0001AE0C300B5C7CFEB0F9001A
+:10177000FE36FF015C568E8C580CCF21DA2AD82A0F
+:10178000800007B0800008C88000096CD303FE7C8D
+:101790001C00E06B0A03EA1B5501990BE06B0A037E
+:1017A000EA1BAA01990BC008D401FEB0F5C9E0A05C
+:1017B00000B9FEB0F495D80A8000033C80001920DF
+:1017C000800000DCD401201D300BE06A00FCEA1A26
+:1017D00080807409A9D9F3EC109C500C318C40091D
+:1017E000F20C0A4A5C5A145BA96B5C7B308AEDBB35
+:1017F000000FC042EC1B83805C7BA17B5C7B201ACA
+:10180000CF71A98B208CCEC1129AE01AFF00144B25
+:10181000500B304A1A9BE06C00FCC67F2FFDD80AA3
+:10182000D42120ADE0671B00EA1700B70E9B300CF7
+:10183000FEB0FDBA301A306B300CFEB0FDE90E9CE4
+:10184000FEB0F7D0E0671CF4EA178000301C5D178B
+:101850003009300A300BFE7C1800E0A001BDC02129
+:10186000C008FE7C1800E0A001C7E0A0009B4AABC6
+:10187000161CC040161CC040C058305CC048302CFC
+:10188000C028303C300BFB6B002433FA508A507B6D
+:10189000506C301CFB6C0016FB6B0015FB6C0014CD
+:1018A000FACCFFEC1A9B3149190A16AA2049CFD16C
+:1018B000300CFEB0FDDD300CFEB0FE22300CFEB070
+:1018C000FE5FE06607CCEA168000301C5D16302C07
+:1018D0005D17E0671C18EA178000301B300C5D179D
+:1018E000301B301C5D17301B303C5D17301B302C1B
+:1018F0005D17300C5D162F6DD82AD703800013A416
+:101900008000140C800007E080001BD480001BF4D2
+:10191000800019A0007A1200800014FC8000157C61
+:10192000D42120ADE06707CCEA178000301C5D179A
+:10193000E0661C18EA168000300B300C5D16300B88
+:10194000301C5D16300B303C5D16300B302C5D16B4
+:10195000300CE0A001D1300C5D17300CFEB0FDF072
+:10196000300CFB6C0024508C507C506CFB6C0016CF
+:10197000FB6C0015FB6C0014FACCFFEC1A9B314990
+:10198000190A16AA2049CFD1300CFEB0FD712F6D77
+:10199000D82AD70380001CF48000153C8000146C0A
+:1019A000D431205DFACCFFF8E06B1E44EA1B8000C6
+:1019B000B709B928170818A83FF73FF4E0661D7863
+:1019C000EA1680005D16E0A001CF501CE0651D8C7A
+:1019D000EA1580005D15E0A001DF18905D165D1529
+:1019E000300330053006C2181830C1F4401B0A3BE2
+:1019F000C1C41615F8000106EC0B141FE072D330B9
+:101A0000EC020648F6020349109A129B0A98EA096A
+:101A1000141FE0A001591493580AC070400C141C04
+:101A20005C4CE04C2711C12550030A920C91E0A0B8
+:101A3000019B1895E0A001B018960435C035023C12
+:101A4000CD445803C031300CC178300CFACAFFF8CD
+:101A5000F40C032B062B083BF6041730F80717305D
+:101A60002FFC583CCF435BF7E60C1700C050FACB75
+:101A7000FFF8F607032C2FBDD832D70380001CC413
+:101A800080001D6480001D94D4211897169630059F
+:101A90003004C0780F9B0F8CC08C18452FE72FF4B3
+:101AA0000C34CF930A9CD822FE792800F80A160538
+:101AB000A97A120A3019F9DCC005F20C0949167B23
+:101AC000C100201BC130201BC130201BC140201B86
+:101AD000C150201BC170201BC170201BC1905EFF34
+:101AE000956995A995E995295EFD9559CFBB9569AD
+:101AF0009599CF9B95599599CF6B956995A995D94E
+:101B0000CF3B9559CFCB9569959995D9CEDB955912
+:101B10009599CF6BEBCD40FEE06C1E94EA1C8000E3
+:101B2000E06E1EACEA1E8000300A300B1907190661
+:101B30001905EFE61003E7D3C002C1C1EA0416039A
+:101B4000C1900C37C090AF092014AD28CFD1EBD590
+:101B5000C003C121C0B82014AD2ACFE1EBD5C0032A
+:101B6000C050300220150CC2CFD11C3CCE03E3CFB5
+:101B700080FE0C37CF700F3120150CC1CEBB00009A
+:101B8000D401303BE06C1E8CEA1C8000FEB0FF7E6E
+:101B9000D503FEB0FE47FEB0F37BFEB0F377C03155
+:101BA000FEB0F3E2C008D70380001A888000182036
+:101BB0008000028C80000288D401F80B1518C04008
+:101BC000FEB0F3D2D80AFEB0F3FDD80A8000036459
+:101BD000800003C0D4017828BD98CFE3A96BA1ABE6
+:101BE000F94B0040B16A990A782BB99BCFE3129B5D
+:101BF000C0CCDA0A782BB99BCFE3780BA1AB990B59
+:101C0000782BB99BCFE35EFD782AB99ACFE3991B75
+:101C1000782BB99BCFE35EFDD401FE791404720AE0
+:101C2000FE7914D47208A788CFC2E1B90000D303AB
+:101C30003048F00C0028EA18AA00FE7E14589D08CF
+:101C4000E01AFFF8F7DBC003144BA7BBFE7A1404BD
+:101C5000F40C092BB199C023D503D80AD40130095B
+:101C6000300A303B303CFEB0FCA7303CE0A00070B6
+:101C7000D80AD70380001D4CD401300CFE7B586C71
+:101C8000970C3009300A303B303CFEB0FC95D80A46
+:101C9000800015B4D401E06900B8EA190000728C24
+:101CA000729A5C7AE06B0124EA1B0000F1DCC0064A
+:101CB000100B72585D18300CE06B0940EA1B0000F5
+:101CC000975CDA0AEBCD4080340C3007300EA17AF5
+:101CD0005CFB5CFE5CF7103EF2071300C053101E65
+:101CE000EE090147A1AA201CCF310E991C98E3CD23
+:101CF00080800000E1BB0000D303300AEA1AAA008A
+:101D0000FE791458930AFE7A1400950CB19B5E3D3F
+:101D1000D5035EFDE0690000EA198000121CF9DCC1
+:101D2000C00EF9EA11ECFE7A1000A59BF40B092C09
+:101D30005EFD00003009EA198000120B1898580A5D
+:101D40005E0D1739201A10C9CFD15EFDFE7B586099
+:101D5000F60C002B760CA19C5E3D760CA1AC970C8A
+:101D60005EFD0000D401FE7C1800E0A00019A17CFB
+:101D7000D802D70380001D9CD401300BFE7C1800D4
+:101D8000FEB0FF44D80AD70380001C08300CE3BC27
+:101D900000425EFDE1BC00425EFC0000781B5EFB81
+:101DA0000000100000002000000040000000800043
+:101DB0000000C000000100000001800000020000DF
+:101DC00000030000000400000006000000080000FE
+:101DD000000C0000001000000020000000000000C7
+:101DE000000000000000000080001E8080001E68CF
+:101DF00080001E2C80001E3880001E7480001E5043
+:101E000080001E5C80001E6880001E6880001E68C6
+:101E100080001E6880001E6880001E6880001E68AA
+:101E200080001E6880001E6880001E68000000019F
+:101E3000800016148000162C00000020800016443C
+:101E40008000166C007A120000B71B0000F424001A
+:101E500000000004800016B4000000000000010033
+:101E6000800016D0800016E800000000000000008E
+:101E70000000000000000003800016940000000035
+:101E80000002000080001D34800016002E002F008C
+:101E90003000000080001EB000000008000000902C
+:0C1EA000000000A0000000A00000092AC3
+:101EB0008000082C00000000120000000003000059
+:101EC0000000000000000000000000000000000012
+:101ED00000000000000000000403090441544D45C7
+:101EE0004C0000004446552041543332554333449E
+:101EF0000000000080000FE4800010088000100C3B
+:101F0000800010AC1201000200000040EB03E92F3A
+:101F1000020101020001000009021200010100C0DB
+:101F20003209040000000000000000000000004C26
+:101F300000000070000000840000005C00000088C9
+:040000058000000077
+:00000001FF
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/iar/lnkat32uc3d-isp.xcl b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/iar/lnkat32uc3d-isp.xcl
new file mode 100644
index 0000000..9ef7a62
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/iar/lnkat32uc3d-isp.xcl
@@ -0,0 +1,150 @@
+/******************************************************************************
+ * AVR32 AT32UC3C ISP XLINK command file for AVR32 IAR C/C++ Compiler.
+ *
+ * The assumed memory layout is the one of the AT32UC3C0512:
+ *
+ * Start Stop Name Type
+ * ---------- ---------- ----- --------------
+ * 0x00000000 0x0000FFFF SRAM RAM
+ * 0x80000000 0x8007FFFF FLASH FLASH
+ * 0x80800000 0x808001FF USER FLASH
+ *
+ * Usage: xlink your_file(s) -f xcl-file libraries
+ *
+ * - Compiler: IAR EWAVR32
+ * - Supported devices: AVR32 AT32UC3C
+ *
+ * - author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+/************************************************************************/
+/* The following segments are defined in this link file: */
+/* */
+/* Code segments */
+/* CODE32 -- Program code used by __code32 functions. */
+/* RESET -- Reset code. */
+/* EVSEG -- Exception vector handlers. */
+/* */
+/* Constant segments */
+/* INITTAB -- Segment initializer table. */
+/* DIFUNCT -- Dynamic initialization vector used by C++. */
+/* SWITCH -- Switch tables. */
+/* ACTAB -- Table of pointers to acall functions. */
+/* */
+/* DATA21_ID -- Initialization data for DATA21_I. */
+/* DATA32_ID -- Initialization data for DATA32_I. */
+/* DATA32_C -- Constant __data32 data. */
+/* */
+/* CHECKSUM -- Checksum segment. */
+/* */
+/* Data segments */
+/* DATA21_I -- Initialized __data21 data with non-zero */
+/* initial value. */
+/* DATA32_I -- Initialized __data32 data with non-zero */
+/* initial value. */
+/* DATA21_Z -- Initialized __data21 data with zero initial value. */
+/* DATA32_Z -- Initialized __data32 data with zero initial value. */
+/* DATA21_N -- Non-initialized __data21. */
+/* DATA32_N -- Non-initialized __data32. */
+/* SSTACK -- The system stack. */
+/* CSTACK -- The application stack. */
+/* HEAP -- The heap used by malloc and free. */
+/* */
+/************************************************************************/
+
+/************************************************************************/
+/* Define CPU */
+/************************************************************************/
+
+-cavr32
+
+/************************************************************************/
+/* Reset code is located at address 0x80000000 and up. */
+/************************************************************************/
+
+-Z(CODE)RESET=80000000-8001FFFF
+
+/************************************************************************/
+/* The exception handler code is located at address 0x80000000 */
+/* and up. Make sure that the exception table gets properly */
+/* allocated. By using the special -Z@ allocation primitive, the */
+/* placement is guaranteed to be at _EVBASE and onwards. */
+/************************************************************************/
+
+-Z@(CODE)EVTAB=80000000-8001FFFF
+-Z@(CODE)EV100=80000100-8001FFFF
+-P(CODE)EVSEG=80000000-8001FFFF
+
+/************************************************************************/
+/* Allocate code and const segments. */
+/************************************************************************/
+
+-P(CODE)CODE32=80000000-8001FFFF
+-P(CONST)DATA32_C=80000000-8001FFFF
+-P(CONST)USERDATA32_C=80800000-808001FF
+
+// Initializers
+-Z(CONST)INITTAB,DIFUNCT=80000000-8001FFFF
+-Z(CONST)CHECKSUM,SWITCH=80000000-8001FFFF
+-Z(CONST)DATA21_ID,DATA32_ID=80000000-8001FFFF
+-Z(CONST)RAMCODE21_ID,RAMCODE32_ID=80000000-8001FFFF
+
+-Z(CONST)ACTAB,HTAB=80000000-8001FFFF
+
+/************************************************************************/
+/* Allocate the read/write segments that are mapped to RAM. */
+/************************************************************************/
+
+-Z(CODE)RAMCODE21=00000004-0000FFFF
+-Z(DATA)DATA21_I,DATA21_Z,DATA21_N=00000004-0000FFFF
+-Z(CODE)RAMCODE32=00000004-0000FFFF
+-Z(DATA)DATA32_I,DATA32_Z,DATA32_N=00000004-0000FFFF
+-Z(DATA)TRACEBUFFER=00000004-0000FFFF
+
+-Z(DATA)HEAP+_HEAP_SIZE=00000004-0000FFFF
+-Z(DATA)CSTACK+_CSTACK_SIZE=00000004-0000FFFF
+-Z(DATA)SSTACK+_SSTACK_SIZE=00000004-0000FFFF
+
+/************************************************************************/
+/* Copy the RAMCODE bytes to the initializer segments. */
+/************************************************************************/
+
+-QRAMCODE21=RAMCODE21_ID
+-QRAMCODE32=RAMCODE32_ID
+
+/************************************************************************/
+/* End of File */
+/************************************************************************/
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/iar/usb_device_dfu_isp.ewp b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/iar/usb_device_dfu_isp.ewp
new file mode 100644
index 0000000..415ab34
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/iar/usb_device_dfu_isp.ewp
@@ -0,0 +1,942 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+
+<project>
+ <fileVersion>2</fileVersion>
+ <configuration>
+ <name>Release</name>
+ <toolchain>
+ <name>AVR32</name>
+ </toolchain>
+ <debug>0</debug>
+ <settings>
+ <name>General</name>
+ <archiveVersion>4</archiveVersion>
+ <data>
+ <version>6</version>
+ <wantNonLocal>1</wantNonLocal>
+ <debug>0</debug>
+ <option>
+ <name>CoreRevisionSlave</name>
+ <version>1</version>
+ <state>0</state>
+ </option>
+ <option>
+ <name>ProcessorCoreDyn</name>
+ <state>avr32a</state>
+ </option>
+ <option>
+ <name>ProcessorCoreSlave</name>
+ <state>avr32a</state>
+ </option>
+ <option>
+ <name>CodeModel</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>DataModel</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>EnableSimdInstructions</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>EnableDspInstructions</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>EnableRmwInstructions</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>GAllowUnaligned</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>GOutputBinary</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>ExePath</name>
+ <state></state>
+ </option>
+ <option>
+ <name>ObjPath</name>
+ <state>Release\Obj</state>
+ </option>
+ <option>
+ <name>ListPath</name>
+ <state>Release\List</state>
+ </option>
+ <option>
+ <name>GRuntimeLibSelect</name>
+ <version>0</version>
+ <state>2</state>
+ </option>
+ <option>
+ <name>GRuntimeLibSelectSlave</name>
+ <version>0</version>
+ <state>2</state>
+ </option>
+ <option>
+ <name>RTDescription</name>
+ <state>Use the full configuration of the C/EC++ runtime library. Full locale interface, C locale, file descriptor support, multibytes in printf and scanf, and hex floats in strtod.</state>
+ </option>
+ <option>
+ <name>RTLibraryPath</name>
+ <state>$TOOLKIT_DIR$\lib\dlavr32allasf.r82</state>
+ </option>
+ <option>
+ <name>RTConfigPath</name>
+ <state>$TOOLKIT_DIR$\lib\dlavr32allasf.h</state>
+ </option>
+ <option>
+ <name>Input variant</name>
+ <version>0</version>
+ <state>1</state>
+ </option>
+ <option>
+ <name>Input description</name>
+ <state>No specifier n, no float.</state>
+ </option>
+ <option>
+ <name>Output variant</name>
+ <version>0</version>
+ <state>1</state>
+ </option>
+ <option>
+ <name>Output description</name>
+ <state>No specifier a or A.</state>
+ </option>
+ <option>
+ <name>GUnhandledInterrupts</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>GUnhandledExceptions</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>GTraceBufferSize</name>
+ <version>0</version>
+ <state>0</state>
+ </option>
+ <option>
+ <name>GSStackSize</name>
+ <state>0x0400</state>
+ </option>
+ <option>
+ <name>GCStackSize</name>
+ <state>0x0000</state>
+ </option>
+ <option>
+ <name>GHeapSize</name>
+ <state>0x1000</state>
+ </option>
+ <option>
+ <name>GeneralEnableMisra</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>GeneralMisraVerbose</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CoreRevision</name>
+ <version>1</version>
+ <state>0</state>
+ </option>
+ <option>
+ <name>GTraceSelect</name>
+ <version>0</version>
+ <state>0</state>
+ </option>
+ <option>
+ <name>GTraceBufferFull</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>GeneralMisraVer</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>GeneralMisraRules04</name>
+ <version>0</version>
+ <state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
+ </option>
+ <option>
+ <name>GeneralMisraRules98</name>
+ <version>0</version>
+ <state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
+ </option>
+ <option>
+ <name>GEnableNanoTrace</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>EnableFpuInstructions</name>
+ <state>0</state>
+ </option>
+ </data>
+ </settings>
+ <settings>
+ <name>ICCAVR32</name>
+ <archiveVersion>7</archiveVersion>
+ <data>
+ <version>8</version>
+ <wantNonLocal>1</wantNonLocal>
+ <debug>0</debug>
+ <option>
+ <name>CCDefines</name>
+ <state>BOARD=DUMMY_BOARD</state>
+ <state>__ATUC128D3__</state>
+ </option>
+ <option>
+ <name>CCPreprocFile</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCPreprocComments</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCPreprocLine</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCListCFile</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCListCMnemonics</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCListCMessages</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCListAssFile</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCListAssSource</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCEnableRemarks</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCDiagSuppress</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CCDiagRemark</name>
+ <state>Pa082</state>
+ </option>
+ <option>
+ <name>CCDiagWarning</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CCDiagError</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CCCore</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCCodeModel</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCDataModel</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCObjPrefix</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCRequirePrototypes</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCMultibyteSupport</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCMigrationPreprocExtentions</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCExt</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCCharIs</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCAllowList</name>
+ <version>0</version>
+ <state>1111111</state>
+ </option>
+ <option>
+ <name>CCObjUseModuleName</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCObjModuleName</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CCDebugInfo</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCDiagWarnAreErr</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCCompilerRuntimeInfo</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>OutputFile</name>
+ <state>$FILE_BNAME$.r82</state>
+ </option>
+ <option>
+ <name>CCLangSelect</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCLibConfigHeader</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>PreInclude</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CompilerMisraOverride</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCIncludePath2</name>
+ <state>$PROJ_DIR$\..\</state>
+ <state>$PROJ_DIR$\..\..\</state>
+ <state>$PROJ_DIR$\..\..\..\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\utils\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\utils\preprocessor\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\common\utils\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\common\boards\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\boards\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\drivers\gpio\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\drivers\pm\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\drivers\scif\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\drivers\ast\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\drivers\flashcdw\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\drivers\rtc\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\drivers\cpu\cycle_counter\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\drivers\usbc\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\common\services\clock\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\services\freq_detect\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\common\services\usb\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\common\services\usb\udc\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\common\services\usb\class\dfu\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\common\services\usb\class\dfu\device\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\common\services\usb\class\dfu\device\atmel\</state>
+ </option>
+ <option>
+ <name>CCStdIncCheck</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCStdIncludePath</name>
+ <state>$TOOLKIT_DIR$\INC\</state>
+ </option>
+ <option>
+ <name>IExtraOptionsCheck</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>IExtraOptions</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CCModuleTypeOverride</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCModuleType</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCOptLevel</name>
+ <state>3</state>
+ </option>
+ <option>
+ <name>CCOptStrategy</name>
+ <version>0</version>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCOptLevelSlave</name>
+ <state>3</state>
+ </option>
+ <option>
+ <name>CompilerMisraRules04</name>
+ <version>0</version>
+ <state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
+ </option>
+ <option>
+ <name>CompilerMisraRules98</name>
+ <version>0</version>
+ <state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
+ </option>
+ <option>
+ <name>CCFPIMPLLIST</name>
+ <version>0</version>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCFPIMPL description</name>
+ <state>Use the space efficient but slower implementation unless another module uses the fast implementation.</state>
+ </option>
+ </data>
+ </settings>
+ <settings>
+ <name>AAVR32</name>
+ <archiveVersion>2</archiveVersion>
+ <data>
+ <version>0</version>
+ <wantNonLocal>1</wantNonLocal>
+ <debug>0</debug>
+ <option>
+ <name>AObjPrefix</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>ACore</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AEnableRemarks</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>ADiagSuppress</name>
+ <state></state>
+ </option>
+ <option>
+ <name>ADiagRemark</name>
+ <state></state>
+ </option>
+ <option>
+ <name>ADiagWarning</name>
+ <state></state>
+ </option>
+ <option>
+ <name>ADiagError</name>
+ <state></state>
+ </option>
+ <option>
+ <name>ADiagWarnAreErr</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>APreprocFile</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>APreprocComments</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>APreprocLine</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>ADefines</name>
+ <state>BOARD=DUMMY_BOARD</state>
+ <state>__ATUC128D3__</state>
+ </option>
+ <option>
+ <name>AIncludePaths</name>
+ <state>$PROJ_DIR$\..\</state>
+ <state>$PROJ_DIR$\..\..\</state>
+ <state>$PROJ_DIR$\..\..\..\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\utils\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\utils\preprocessor\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\common\utils\</state>
+ </option>
+ <option>
+ <name>AListFile</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>ACrossReference</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>AMacDefs</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>AMacExps</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AOnlyAsmed</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>ANoDiagnostics</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AListOptions</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AMnemonicFirst</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>ADirectiveFirst</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>ACaseSensitivity</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>ADebug</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>AMacroChars</name>
+ <version>0</version>
+ <state>0</state>
+ </option>
+ <option>
+ <name>OutputFile</name>
+ <state>$FILE_BNAME$.r82</state>
+ </option>
+ <option>
+ <name>ATruncateLine</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>IExtraOptionsCheck</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>IExtraOptions</name>
+ <state></state>
+ </option>
+ <option>
+ <name>AModel</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AMultibyteSupport</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AOverrideStandardPaths</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AStandardIncludePaths</name>
+ <state>$TOOLKIT_DIR$\INC\</state>
+ </option>
+ </data>
+ </settings>
+ <settings>
+ <name>JAVATOC</name>
+ <archiveVersion>0</archiveVersion>
+ <data/>
+ </settings>
+ <settings>
+ <name>CUSTOM</name>
+ <archiveVersion>3</archiveVersion>
+ <data>
+ <extensions></extensions>
+ <cmdline></cmdline>
+ </data>
+ </settings>
+ <settings>
+ <name>BICOMP</name>
+ <archiveVersion>0</archiveVersion>
+ <data/>
+ </settings>
+ <settings>
+ <name>BUILDACTION</name>
+ <archiveVersion>1</archiveVersion>
+ <data>
+ <prebuild></prebuild>
+ <postbuild></postbuild>
+ </data>
+ </settings>
+ <settings>
+ <name>XLINK</name>
+ <archiveVersion>2</archiveVersion>
+ <data>
+ <version>14</version>
+ <wantNonLocal>1</wantNonLocal>
+ <debug>0</debug>
+ <option>
+ <name>XOutOverride</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>OutputFile</name>
+ <state>usb_device_dfu_isp.d82</state>
+ </option>
+ <option>
+ <name>OutputFormat</name>
+ <version>11</version>
+ <state>16</state>
+ </option>
+ <option>
+ <name>FormatVariant</name>
+ <version>8</version>
+ <state>2</state>
+ </option>
+ <option>
+ <name>SecondaryOutputFile</name>
+ <state>(None for the selected format)</state>
+ </option>
+ <option>
+ <name>XDefines</name>
+ <state></state>
+ </option>
+ <option>
+ <name>AlwaysOutput</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>OverlapWarnings</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>NoGlobalCheck</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>XList</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>SegmentMap</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>ListSymbols</name>
+ <state>2</state>
+ </option>
+ <option>
+ <name>PageLengthCheck</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>PageLength</name>
+ <state>80</state>
+ </option>
+ <option>
+ <name>XIncludes</name>
+ <state>$TOOLKIT_DIR$\LIB\</state>
+ </option>
+ <option>
+ <name>ModuleStatus</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>XclOverride</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>XclFile</name>
+ <state>$PROJ_DIR$\lnkat32uc3d-isp.xcl</state>
+ </option>
+ <option>
+ <name>XclFileSlave</name>
+ <state></state>
+ </option>
+ <option>
+ <name>DoFill</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>FillerByte</name>
+ <state>0xFF</state>
+ </option>
+ <option>
+ <name>DoCrc</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CrcSize</name>
+ <version>0</version>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CrcAlgo</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CrcPoly</name>
+ <state>0x11021</state>
+ </option>
+ <option>
+ <name>CrcCompl</name>
+ <version>0</version>
+ <state>0</state>
+ </option>
+ <option>
+ <name>OXLibIOConfig</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>XRTSegmentSizes</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>RangeCheckAlternatives</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>SuppressAllWarn</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>SuppressDiags</name>
+ <state></state>
+ </option>
+ <option>
+ <name>TreatAsWarn</name>
+ <state></state>
+ </option>
+ <option>
+ <name>TreatAsErr</name>
+ <state></state>
+ </option>
+ <option>
+ <name>ModuleLocalSym</name>
+ <version>0</version>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CrcBitOrder</name>
+ <version>0</version>
+ <state>0</state>
+ </option>
+ <option>
+ <name>IncludeSuppressed</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>ModuleSummary</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>xcProgramEntryLabel</name>
+ <state>__program_start</state>
+ </option>
+ <option>
+ <name>DebugInformation</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>RuntimeControl</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>IoEmulation</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>AllowExtraOutput</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>GenerateExtraOutput</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>XExtraOutOverride</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>ExtraOutputFile</name>
+ <state>at32uc3d-isp.hex</state>
+ </option>
+ <option>
+ <name>ExtraOutputFormat</name>
+ <version>11</version>
+ <state>23</state>
+ </option>
+ <option>
+ <name>ExtraFormatVariant</name>
+ <version>8</version>
+ <state>2</state>
+ </option>
+ <option>
+ <name>xcOverrideProgramEntryLabel</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>xcProgramEntryLabelSelect</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>ListOutputFormat</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>BufferedTermOutput</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>OXImportSlaves</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>OverlaySystemMap</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>RawBinaryFile</name>
+ <state></state>
+ </option>
+ <option>
+ <name>RawBinarySymbol</name>
+ <state></state>
+ </option>
+ <option>
+ <name>RawBinarySegment</name>
+ <state></state>
+ </option>
+ <option>
+ <name>RawBinaryAlign</name>
+ <state></state>
+ </option>
+ <option>
+ <name>XLinkMisraHandler</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CrcAlign</name>
+ <state>4</state>
+ </option>
+ <option>
+ <name>CrcInitialValue</name>
+ <state>0x0</state>
+ </option>
+ <option>
+ <name>OXExtraOptionsCheck</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>OXExtraOptions</name>
+ <state></state>
+ </option>
+ </data>
+ </settings>
+ <settings>
+ <name>XAR</name>
+ <archiveVersion>2</archiveVersion>
+ <data>
+ <version>0</version>
+ <wantNonLocal>1</wantNonLocal>
+ <debug>0</debug>
+ <option>
+ <name>XAROutOverride</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>XARInputs</name>
+ <state></state>
+ </option>
+ <option>
+ <name>OutputFile</name>
+ <state></state>
+ </option>
+ </data>
+ </settings>
+ <settings>
+ <name>BILINK</name>
+ <archiveVersion>0</archiveVersion>
+ <data/>
+ </settings>
+ </configuration>
+ <group>
+ <name>drivers</name>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\drivers\ast\ast.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\drivers\flashcdw\flashcdw.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\drivers\gpio\gpio.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\drivers\pm\pm_uc3d.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\drivers\scif\scif_uc3d.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\drivers\usbc\usbc_device.c</name>
+ </file>
+ </group>
+ <group>
+ <name>services</name>
+ <group>
+ <name>usb</name>
+ <group>
+ <name>class</name>
+ <group>
+ <name>dfu</name>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\udi_dfu_atmel.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\udi_dfu_atmel_desc.c</name>
+ </file>
+ </group>
+ </group>
+ <group>
+ <name>udc</name>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\..\..\..\..\udc\udc.c</name>
+ </file>
+ </group>
+ </group>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\avr32\services\freq_detect\freq_detect.c</name>
+ </file>
+ </group>
+ <file>
+ <name>$PROJ_DIR$\..\..\boot.s82</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\intc.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\isp.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\main.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\sysclk_uc3d.c</name>
+ </file>
+</project>
+
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.0/at32uc3d-isp-1.1.0.hex b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.0/at32uc3d-isp-1.1.0.hex
new file mode 100644
index 0000000..7be0aa7
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.0/at32uc3d-isp-1.1.0.hex
@@ -0,0 +1,508 @@
+:0200000480007A
+:10000000E1B80000F1D8C2C35818C0A0FEC8FFEE86
+:100010003009EA190061E06D0DB4D041D603300813
+:10002000FE791C00E06A01FCEA1A8080FE7B140065
+:100030007000E061504BEA1149537402E06301071C
+:100040000494C78CC141E7D2C210E043E11EC0F165
+:10005000EDB20009C0C3F6F30180E0642117087314
+:10006000C131EDB30003C3830230C3C1C54C91015C
+:10007000E06D0DCCD353FEC00076E3B00001E0A0EC
+:100080000D23E0A00DB3EDB20008C262E06A01F8F2
+:10009000EA1A80807402E06301070494C4BCCE7144
+:1000A000E7D2C22FE043494FCE21E7D2C108E04357
+:1000B0000033CDD2FE7A2800E6041605A964080AAA
+:1000C0007584E013001FE8030A44E7D2C201065416
+:1000D000EDB40000CCC20230C051C1DC30083000A9
+:1000E00091003000EA100061E3B000003000300100
+:1000F0003002300330043005300630073008300954
+:10010000300A300B300C300D300EE3B00001E3B09C
+:10011000004248CF3002EA1255009302EE12FF006F
+:1001200093021C9FE8051200EA051117E605094530
+:100130000A54E04400FFFE9BFFF758045EF4000001
+:1001400080002000308A310CFE6B00047609AD99E6
+:10015000C1837609A589C553FE6A08003019763E29
+:10016000A19EC5727608A198C542740BAFCB950BC2
+:10017000FE6B00049749975C740CAFAC950CC6D825
+:10018000FE690220930C930AFE6901307208A3985D
+:10019000C042E0A00197C6187208A388C042E0A040
+:1001A0000259C5B87208A198C092FE6801C0700ECD
+:1001B000A19EC042E0A001DEC508E06E0940EA1E33
+:1001C00000007D08720EA58EC08293CA720CA19C9D
+:1001D000C4435838C421C0F8720EA59ECBB293CC4C
+:1001E000720CA38CC3A35818C041E0A0029DC35851
+:1001F0005848C331E86C0000FE6B01C097CCC2D8F0
+:10020000971AE0A0055FE0A000FFE0A00147C258F8
+:10021000763EA59EC1227608A598C0F27408AFC8A4
+:100220009508FE6A08007418AF98C043760AA19A30
+:10023000CF92974C9759C118741BA38BC0E2740CD2
+:10024000AFCC950C302C952C740CAFAC950C741C69
+:10025000F9DCC161E0A00CE6FE6C0800786BD60307
+:10026000800004C0800006508000057080000724D4
+:1002700080000CC0800004048000049880001C20D2
+:10028000E1BC0000D3035EFC5EFF0000D421E0A0CF
+:100290000D1BCF7F1897FE6608006C0CAFDC8D0C31
+:1002A0006C0C300AE06B0220E06C0144EA1C800018
+:1002B000E0A00D4E6C0CB9BC8D0C6C0CB9CC8D0C47
+:1002C0006C0CADCC8D0C6C0CADAC8D0C6C0CAFBC57
+:1002D0008D0C6C0CAFCC8D0C6C0C6C1BAF9BCFE2FF
+:1002E000E0690940EA190000300A300BF2EB002007
+:1002F000F2EB0028F2EB0030F2EB00386CCB2E0969
+:100300008DC9FE6C0000780BADCB990B780BE81B08
+:100310000C00990B6C0CA1BC8D0C6C0CAFAC8D0C53
+:10032000FE7C1588780BA1AB990BB197C023D50340
+:10033000D82AD70380001CC480001D4CD421CA1FBA
+:100340001897FE6C0800780BAFDB990B780BADCBE0
+:10035000990BE0A00CC7B197C023D503D82AD703C7
+:1003600080001CE0D421C8DF1897FE6608006C0CE2
+:10037000AFCC8D0C6C1BAF9BCFE2FE6C0000780BFA
+:10038000A9CB990BE0A0049EC3ECC87C308CFE6B1B
+:100390000000976C301BFE6A0000956B310AFE6905
+:1003A0000000936A932C304C932C933B932A6C0C53
+:1003B000AFAC8D0CB197C023D503D82A80000CC0F8
+:1003C000FE6C0800780BAFCB990BFE6C0000780B2D
+:1003D000A9AB990B5EFD0000FE6B0000760AA7DA60
+:1003E000970A760AE01AFF80F9DCC007144C970CD4
+:1003F000760CA7BC970C5EFDFE6B0000760CF9DC5A
+:10040000C0075EFCD401FE6C0000780BE01BFF808F
+:10041000990B780BA7BB990BFE6C0100780B308A07
+:100420003409F20A0C4AE0690400F4090D4AE01BA1
+:10043000E68B3FF9F20A001AF4091200F20A111CC5
+:10044000A56AE21A1974144B990BE06C0940EA1C76
+:100450000000F8CBFFBC998B789BE41B8000999B34
+:10046000FE6C0000787BA1AB997B300CEA1C01008C
+:10047000FE6B01F097CCC05FFE6B01F0304A970A2B
+:10048000302A970AE06B1000FE6A0000956BB19C61
+:10049000C023D503D80A0000301CFE6B0220970C45
+:1004A000302CFE6B0160970C300CE06B0940EA1BAE
+:1004B0000000974C975CB66CF74C00405EFD000066
+:1004C000D421E0670940EA1700006F0C580CC030D7
+:1004D000C5CDCE3FFE6601F0FE65016030446E9CE6
+:1004E000F9DCC00F588CC090305CEF4C0040E86CD9
+:1004F00000008D0C8B04D82AEEEA0044AF1BF9DB18
+:10050000C0105CCCAE1C8EAC5CCCAE2CF9DAC0104A
+:100510005CCCAE3CE0A0052ACE808B04E06C09C424
+:10052000EA1C0000300B0F8AA98AC0F28EEAF5DAC5
+:10053000C006F40915105F0AB88AB81BB82B302C16
+:10054000EF4C0040C16CD82A8EBA580AC031CEBCDC
+:10055000D82AB81BB82B301CEF4C004031078B0752
+:10056000C90E8D07B19CC023D503D82A80000F681F
+:10057000D431E0630280EA1380005D133017FE6B14
+:1005800001F097C7B19CC023D503E0660940EA1685
+:1005900000006D0C583CC041CF8CC7FFD83A8CECA2
+:1005A000E06509C4EA1500008AA418245C74C1F14E
+:1005B0000B8B580BC031CD3CD83A30028A9B160CBD
+:1005C0008CBB163CC0656C5C580CC0305D1CC031E7
+:1005D000AA82C1188AAC8A9B180BAA1BAA228CE497
+:1005E000F9D4C006F80B15105F0CAA8CE04400414A
+:1005F000F9B404405D13FE6B0130760AA38AC08211
+:10060000B19CC023D503304CED4C0040D83A6C2946
+:100610008AAB1609089BECCEFFBC5804C0501338B7
+:10062000201B1CC8CFD18AAB080BAA2B6C9BE01BEC
+:100630008000E9D4C00F16448D94FE6B013097C73B
+:10064000FE6B01F09707B19CC023D503D83A000098
+:10065000D431E0670940EA1700006F0CFE6601F034
+:10066000E86500003054581CC0C0582CC030584CAD
+:10067000C031C8BCC048EF4400408D05C0EFD83A37
+:100680006E9BF7DBC00FE06309C4EA13000086AC81
+:10069000189A8EE9F80B00081039C044F20C010BCF
+:1006A0005C7BEEC9FFBC6E2C180A169C149E580B7E
+:1006B000C0501338201C1CC8CFD186AC160CA62CF9
+:1006C000FE6201603021E04B0040C0715C7C869B83
+:1006D000180B8EBA143BC0E56E5C580CC0805D1CD4
+:1006E000C061EF4400408D058501D83A8501C1BC49
+:1006F000D83A8EEBF80B1900C0C16E5C580CCF20B5
+:100700005D1CCF0086AC869B180BA61B300CA62C5C
+:10071000850131078507FEB0FDB58D07B19CC0236B
+:10072000D503D83AD401E06C0940EA1C0000303B04
+:10073000F94B0040789BE01B8000999BFEB0FDA226
+:10074000FE6B0160301A970AFE6901F0930A308A45
+:10075000970A930AB19CC023D503D80AD401304C20
+:10076000E06B0940EA1B0000F74C0040FEB0FD8A38
+:10077000310BFE6A0160950BFE6A01F0950BB19C8E
+:10078000C023D503D80A0000D401E06B0940EA1B5E
+:100790000000764C580CC0205D1CD80AFE6C140C6E
+:1007A000780BE06A1E08EA1A8000F7DBC004F40B3D
+:1007B000032CA98C5EFC0000FE6A14007409A7C912
+:1007C000340BF7EC006C124C950C5EFDD421E06705
+:1007D0000824EA178000E06B07B8EA1B8000E06A93
+:1007E000E1C1EA1A00E4143CC123E06AC381EA1AB9
+:1007F00001C9143C301CC0625D1B3FFB311C5D17FE
+:10080000D82A5D1B3FFB310C5D17D82A300C5D1BCD
+:100810003FFB311C5D17D82AFE6B1408760CA19C97
+:10082000CFC25EFDD42118951697E0660008EA163F
+:100830000000F0160000FE6C1404780BE01BFFC0F3
+:10084000EBD5C00616455807C0A6E01500FFE41515
+:10085000FF000A9BEBD7C010F7E51085EBD5C01859
+:10086000EA15A5009905781CE21C000C8D1CF016F9
+:100870000000D82AFE6B1408760CF9DCC0815EFCFF
+:10088000D4013FFB309CCCFFD80A0000D401F60A0B
+:100890001518304AF9BA0005189B149CCC4FD80A99
+:1008A000D42118961697C7BF0E9BA39CB9360C9CF3
+:1008B000CEEFD82AD42118973006308520150E9B0C
+:1008C0000A9CCEFFE06B0008EA1B0000761C18466D
+:1008D0005805CF519716D82AFE6B14147618760A4D
+:1008E00030091449F9DCC006EDBC0005F2081730E8
+:1008F000F00C0A48A1985F3C5EFC0000D4211897D8
+:100900001696F7DCC006308CC8EFEC0C1518C0400A
+:100910000E9CCE3FD822DA2AD401F60A1518C061FF
+:10092000F9DCC006189B307CC7EFD80AD401F60A60
+:100930001518300BC030CE3FD80ACEFFD80A0000C1
+:10094000D4013FFB303CFEB0FF6FD80AD401189BA6
+:1009500030CCFEB0FF69FE6B1408760CF9DCC0A148
+:10096000D8020000D42116973016189B302CFEB008
+:10097000FF5BEE0C1518C0C0E0670008EA17000026
+:100980006E153FFCCE4F18966E1C18458F150C9CAB
+:10099000D8220000D431189730163005FEB0FF0081
+:1009A0001894C09820140E9B089CCDDF18665C56E6
+:1009B000661C1845E0630008EA1300005804CF31B4
+:1009C00087150C9CD8320000D4013FFB30FCFEB0F0
+:1009D000FF2BFE6B1408760CF9DCC0A1D8020000D6
+:1009E000D42118973FFB30ECFEB0FF1EEE0C15181B
+:1009F000F9BC0001C020CE9FD8220000D4013FFBEB
+:100A000030DCFEB0FF11D80AD671204D3001300223
+:100A1000FE6C140C78093008EA188000E06E1E089D
+:100A2000EA1E8000F3D9C004FC09032C18085028E2
+:100A3000405616970C0A1495300CEA1C80001836A4
+:100A4000C0831036C0B3300CEA1C80801836C062F8
+:100A50005C36160618060C971896E06C0101EA1C25
+:100A60008080183AC063E0650100EA158080C09874
+:100A7000301CEA1C8080183AC0421438F005173048
+:100A80000A9CA1CCE01CFFFCE01CFFF8503CE9D51F
+:100A9000C003C0E8580BC050300CCA3F661C184257
+:100AA0003FFB30DCFEB0FEC0049C66121842E063DF
+:100AB0000008EA1300000A36E08200BB3FFB303C2E
+:100AC000FEB0FEB2661C18420C99E019FF00F2CC91
+:100AD000FF00403AF40C0D4B0A9CE01CFF00183953
+:100AE0005F2AF9D6C008C2600C98E018FFF8C05819
+:100AF000720C12AC720C12AC1039CFB3FDD6C0031D
+:100B0000C190300C1336FA0C0B062FFC1C3CCFB3F3
+:100B1000588CC0620F39FA0C0B092FFCCFAB109622
+:100B200040391238C06240090CA940190CA9C028EC
+:100B30003011A39BEC0C1603181B303C0E6C187C78
+:100B4000C040202CC0B0C1A8169C580CC2700F0B1E
+:100B50000CAB0F0B0CAB201CCF9B169C580CC1E0B0
+:100B6000300B0F29FA0B0A192FFB584BCFB3400952
+:100B70000CA940190CA9201CCF2B169CC0D8300BF7
+:100B80000F39FA0B0B092FFB588BCFB340090CA977
+:100B900040190CA9201C580CCF31F40C1518C24078
+:100BA000E20C1518C030089CC098300CC0580F3BA0
+:100BB000FA0C0B0B2FFC083CCFB30A995804C06108
+:100BC000C108133BFA0C0B0B2FFC588CCFB3400B16
+:100BD0000CAB401B0CABC058720C12AC720C12ACBC
+:100BE000F9D9C008CFA1301CEA1C80801836FB3B25
+:100BF000001BFE92FF51580BC070300B3FFCFEB043
+:100C0000FEB3661C18423FFB301CFEB0FE0D049C78
+:100C100066121842402B1636FE93FF4B5C360E06CA
+:100C2000300CEA1C808018060C971896C41B87129B
+:100C3000405C2FCDDC720000D401E06A00D4EA1AD7
+:100C4000000015895809C021D80AE06A00C8EA1ACC
+:100C500000007418700913C8F00C1800CF629529B1
+:100C60007418700E1DB92FEEFDD950005CC9202EEE
+:100C70005C791C09C048118E1C089528742812380C
+:100C8000CE42119E584ECF8111AEFC0C1800CF41C0
+:100C900011BEFC0B1800CF01DA0A0000D42118970E
+:100CA000300BCCBFC021D82AE06C00C8EA1C000081
+:100CB000781B761CF8070F8B761C5D1CDA2A000067
+:100CC000D421E06700C8EA170000E06600D4EA1605
+:100CD00000000D8C580CC0C03005C0580A9CCDFFD8
+:100CE0002FF55C556E1C780B17CC1835CF85300C62
+:100CF000AC8CAE1CD82A0000D401E06B0940EA1B82
+:100D00000000969C5C5CFEB0FB69D80A800003D8AA
+:100D1000D421E06B0940EA1B0000969AF3DAC00880
+:100D2000E068009CEA180000F40C1608201CC06063
+:100D3000201CC0F0201CC220D82A700C972C198AC5
+:100D4000B66A96BC96EAF40C1900C022B66CDA2A90
+:100D5000700CF93A00111439C025D82A701CF80912
+:100D6000033A972AF809033811BC2FE8F1DC500048
+:100D70005CCCB66C302CB49CCE5BE06C0014EA1CEE
+:100D800000005C5A147AC060201AC090201AC22059
+:100D9000D82A2ECC972C304CB66CC158309AF8C952
+:100DA000FFE83008F208070E5CCEF8080017AE1E08
+:100DB0002FF81438CF853029F20A001AB88A5C5A05
+:100DC000B66A972C96BC96EAF40C1900C022B66C51
+:100DD000DA2A303AF8C9FFDCCE5B0000D421E066A5
+:100DE0000940EA1600000D8CE06400D4EA1400000B
+:100DF000098BE06700C8EA170000EDBC0007C422B9
+:100E00008CBAF4091510C021D82AF9DCC0053015B8
+:100E1000C1910D9C187CC060206CC0C0202CC0C04B
+:100E2000D82A582AC020D82A2FE78D27302CAC6C1E
+:100E3000DA2AC6FFD822581AC020D82A8D24AC65D9
+:100E4000DA2A581CCE210D9C58ACCDF1581AC0207E
+:100E5000D82AF60C1518CFD08CA45C546E1C780BD5
+:100E600017CC1834CF64300B089CCE7ECF206E1C7C
+:100E7000781BF604032C783B5D1BAE8C8D27AC658C
+:100E8000DA2AF9DCC005C5410D9C201CC140202C8C
+:100E9000CBC0202CC060202CCB80202CC180D82A35
+:100EA0008CBC580CC020D82AE06C0CF8EA1C8000DE
+:100EB0008D4CDA2A8CBC580CC020D82A8C9C581C2B
+:100EC000CFD18E9CE21CFDFFAE1CDA2A8CBC580CE4
+:100ED000C020D82AFEB0FA92CFD0E065009CEA1577
+:100EE00000006A0CF93B00118C9CF80B1800CF2312
+:100EF000CE8E8C9CA88C5C5CF80B1518C021DA2A6D
+:100F00006A1BF60C003B208B8F1B30066E1C780B87
+:100F100017CA1436CF54781BF606032CF01C0000B9
+:100F20005F1CF80B1518CD602FF65C56CF0B581CC4
+:100F3000FE91FF6C0D9C58BCFE91FF688CBC580C58
+:100F4000C020D82AF60C1518CFD08CA55C550A9C69
+:100F5000CA6ECF806E1C781BF605032CF01C0000B7
+:100F60005F1CD822800003F8D421300CE0670940D0
+:100F7000EA170000AE6C8F4C8F5C0F8CEDBC000745
+:100F8000C0528EBB580BC021D82AE21C0060C04161
+:100F9000C26FC020DA2A0F8CF9DCC005581CCF5173
+:100FA000E06C00D4EA1C0000198B580BCEE08EA632
+:100FB0005C56E06700C8EA1700006E1C780B17CC7F
+:100FC0001836CE34E0650C38EA158000300B0C9CE6
+:100FD0005D15CDB06E1C781BF60603276E3C5D1CBC
+:100FE000F7DCC0080C9C5D15CD006E2C5D1CCD316E
+:100FF000D82A0000E07B86A0FE7A5814740918698C
+:101000005E1D201BCFA15EFE580C5E1F498C780A26
+:10101000A1AAEC5BBBA0C032300CC118E06CC6C00A
+:10102000EA1C002D183BC032301CC098E06C120046
+:10103000EA1C007A183B302CF9BC0203E01AFFF9D5
+:10104000149B189A306CF9EA001A164AE1BC0000A9
+:10105000D303324BEA1BAA00FE795818930B484B76
+:10106000970AB19C5E3DD5035EFDD703FFFF582470
+:10107000D401201DA36CFE795824F20C0308FA0C4D
+:101080000908109EE01EF0FFA96BE21B0F001C4B2D
+:10109000B1ABFA0C090BE1BB0000D303F8C8FFDCCD
+:1010A000EA18AA00FE7E58189D08FA0C030EF20CEE
+:1010B000090EB19BC023D503F40C1518C060301C79
+:1010C000C9AFC0303FFCC028300C2FFDD802000053
+:1010D000D401202DA36CFE7A581CF40C030BFA0CDF
+:1010E000090B1699E019F0C5E419C0F0FB38001C93
+:1010F000302BF7E800181049FB38000CFB3E000EBF
+:10110000F1EE1018FB3E000DF1EE1028338BF7E8DE
+:10111000003810494058A968E2180F0010494048AB
+:10112000EE7B0000F7E8010810494068B968E6184E
+:101130003F001049FA0C0909E1BB0000D303F8C9CC
+:10114000FFE4EA19AA00FE7858189109FA0C03087E
+:10115000F40C0908B19BC023D5032FEDD80A000079
+:10116000202DA36CFE7B581CF60C030AFA0C090A0E
+:101170001499A1A9FA0C0909E1BA0000D303F8C92E
+:10118000FFE4EA19AA00FE7858189109FA0C03083E
+:10119000F60C0908B19AC023D5032FED5EFD0000BF
+:1011A000202DA36CFE7B581CF60C030AFA0C090ACE
+:1011B0001499A1C9FA0C0909E1BA0000D303F8C9CE
+:1011C000FFE4EA19AA00FE7858189109FA0C0308FE
+:1011D000F60C0908B19AC023D5032FED5EFD00007F
+:1011E000FE7B5814580CC051760CA39C5E3DCFDB9F
+:1011F000760CA58CCFE25EFDE07B86A0FE7A58607F
+:10120000F40C002A740CA1CC950C740CA19C5E2DDE
+:10121000201BCFC15EFE0000D43116971495300319
+:10122000F20616012016FE745860E80C0024680BC4
+:10123000A19BC0623013CE1FC0373FFCD832B166CD
+:10124000E61600FF302CF9E500150C45A967E217FA
+:101250000F000A4789075813C041680CA1AC890CDC
+:10126000D83A0000D42120ADE0671B00EA1700B790
+:101270000E9B300CFEB0FECA301A306B300CFEB044
+:10128000FEF90E9CFEB0FAA4E0671D2CEA17800060
+:10129000301C5D173009300A300BFE7C1800E0A0CE
+:1012A00004F1C021C008FE7C1800E0A004FBE0A00F
+:1012B000028B4AAB161CC040161CC040C058305CA4
+:1012C000C048302CC028303C300BFB6B002433FA74
+:1012D000508A507B506C301CFB6C0016FB6B001569
+:1012E000FB6C0014FACCFFEC1A9B3149190A16AAC0
+:1012F0002049CFD1300CFEB0FEED300CFEB0FF32F5
+:10130000300CFEB0FF6FE06607B8EA168000301CB4
+:101310005D16302C5D17E0671C3CEA178000301B1F
+:10132000300C5D17301B301C5D17301B303C5D17D7
+:10133000301B302C5D17300C5D162F6DD82AD7036B
+:101340008000100880001070800007CC80001C8096
+:1013500080001CA0800017C4007A12008000116079
+:10136000800011E0D42120ADE06707B8EA178000C3
+:10137000301C5D17E0661C3CEA168000300B300C18
+:101380005D16300B301C5D16300B303C5D16300B9B
+:10139000302C5D16300CE0A004CB300C5D17300C07
+:1013A000FEB0FF00300CFB6C0024508C507C506C65
+:1013B000FB6C0016FB6C0015FB6C0014FACCFFEC08
+:1013C0001A9B3149190A16AA2049CFD1300CFEB018
+:1013D000FE812F6DD82AD70380001D2C800011A01C
+:1013E000800010D0D431201D3007E0660920EA16B5
+:1013F00000008D27E0650940EA1500008B578B47F8
+:10140000E06400D8EA140000A887302CA8CCE06380
+:1014100000E0EA13000007AC0DCBE06A1B30EA1ACB
+:10142000800030A207892019C0802029C1F020192E
+:10143000C4A02029C680C3E8F60C1518C3E1E6CC89
+:10144000FFFE5D1AC370079C580CC341E06C01207D
+:10145000EA1C00008B2CE06C0800AA6CE06C1A54AB
+:10146000EA1C80008B5C301CC2C8F60C1518C251F7
+:10147000E6CCFFFE5D1AC1E0E06C004CEA1C000007
+:101480000DDBF80B0F8A741C580CC031303CC1685E
+:10149000079C187CC040201CC080C0C8E06C1B8C1E
+:1014A000EA1C80008D2CCE0BE06C19C8EA1C800071
+:1014B000CFAB098C580CC04130FCA88CA8C2300CB2
+:1014C0002FFDD832079B167BC040203BC0C0CF5BAE
+:1014D000E04C00FFCF21E0A00463C030ACC7CC4B90
+:1014E000304CCECB187CC040201CC080CE6BE06C52
+:1014F00018ACEA1C80008D3CCB7BE06C18D0EA1C59
+:101500008000CFABF60A1518CD81079B583BCD5113
+:1015100007BB189A187CC040201AC090CCEB587CAE
+:10152000C044ACDB8D07CA0B308CCC8B300C500C1C
+:10153000BA8B07CCBA9C400BE06C004CEA1C000054
+:101540000DDAF80A0F89720C183BCEF28D0BC8CB5E
+:1015500080001D9CD40130093008EA188000100C6E
+:10156000FEB0FA54D80A0000D4211897F40C1510D4
+:10157000C040FEB0F981AE8CD82AD7038000087431
+:10158000D401F40C1510C060178C580CC030FEB09C
+:10159000F979D80A80000880D421189516971496F6
+:1015A000C0680E9CFEB0F99A2FF70ACC0C9CFE3650
+:1015B0000001F80B1510CF61D82AD703800008D896
+:1015C000D421189616951497C0680B3B0C9CFEB05E
+:1015D000F9AF2FF60E9CFE370001F80B1510CF6106
+:1015E000D82AD7038000092CE0690010EA1900000E
+:1015F000F60B001B16091898580A5E0D133B201AAB
+:1016000010CBCFD15EFD0000E06900C0EA190000F8
+:10161000F20B00291898580A5E0D133B201A10CBC4
+:10162000CFD15EFD3009EA198080120B1898580A54
+:101630005E0D1739201A10C9CFD15EFDD4013019C3
+:101640003008EA188080100CFEB0F9E0D80AD70301
+:1016500080000A08E06C00C0EA1C0000358BB88BE3
+:10166000320BB89BE1BB0040B98BB8ABE1BB00408B
+:10167000B18BB8BB5EFD0000D401201D301A300BC9
+:101680001A9CC73F1B8B580B5F1C2FFDD802000014
+:10169000D401C87CFEB0FFE0FEB0FFF0E06B092093
+:1016A000EA1B0000B6CCDA0A8000165480001678D7
+:1016B0005EFD0000D421E0670940EA1700000F8CAE
+:1016C000189BE21B0060E04B0020C020D82A0F9B33
+:1016D000E0650920EA150000E06600D8EA1600007F
+:1016E000A98CC252202BC1B0201BC040202BC0C0EF
+:1016F000C4E88E9C580CC4B18EBC586CC4818F2633
+:10170000306CAE6CDA2A8E9C580CC4118EBC581CFE
+:10171000C3E12FC68F26301CAE6CDA2A0DCC58AC34
+:10172000C3606A2C580CC3305D1CD822201BC1003A
+:10173000203BC060202BC2B10DCC58ACC2808E9C27
+:10174000580CC2518EBC580CC221C2BCDA2A301CC3
+:10175000E0A000D40DCC58ACC1A06A3C580CC070BD
+:10176000E06C1D84EA1C80008F4CDA2A8EBC580C79
+:10177000C0E0E06C00E0EA1C00008F2C340CAE6C82
+:10178000E06C13E4EA1C80008F5CDA2A30FCAC8C3D
+:1017900030ACACCCD82AD703800018F85EFD00002E
+:1017A000300CE06B00D8EA1B0000B68C302AB6CAB9
+:1017B000E06B0920EA1B0000B6DC970C972C973CE5
+:1017C0005EFD0000D431205DFACCFFF8E06B1EC056
+:1017D000EA1B8000B709B928170818A83FF73FF49B
+:1017E000E0661DE0EA1680005D16E0A002F1501CE4
+:1017F000E0651DF4EA1580005D15E0A00301189076
+:101800005D165D15300330053006C2181830C1F47E
+:10181000401B0A3BC1C41615F8000106EC0B141F4F
+:10182000E072C200EC020648F6020349109A129BCD
+:101830000A98EA09141FE0A002631493580AC070C2
+:10184000400C141C5C4CE04C2711C12550030A923B
+:101850000C91E0A002BD1895E0A002D218960435C4
+:10186000C035023CCD445803C031300CC178300C37
+:10187000FACAFFF8F40C032B062B083BF6041730CA
+:10188000F80717302FFC583CCF435BF7E60C1700E6
+:10189000C050FACBFFF8F607032C2FBDD832D70380
+:1018A00080001CFC80001DCC80001DFCD401300C8D
+:1018B000C24CD303FE7C1C00E06B0A03EA1B5501FB
+:1018C000990BE06B0A03EA1BAA01990BC008000000
+:1018D000D401300CC12CFEB0FD47300CE3BC0042FB
+:1018E000E1BC0042E04C0480CFC3FEB0F3F9D80A5B
+:1018F00080001364800000DCD421E06B01FCEA1B53
+:101900008080F80A1518C040760CAB8CC113760C99
+:101910003007EA178080FEB0F815340C6E0B0EAB62
+:10192000201CCFD1300CFEB0F85DFEB0F869D82A8B
+:1019300080000940800009E0800009FCD42118974C
+:10194000169630053004C0780F9B0F8CC08C18455C
+:101950002FE72FF40C34CF930A9CD822FE7928006D
+:10196000F80A1605A97A120A3019F9DCC005F20C3A
+:101970000949167BC100201BC130201BC130201B30
+:10198000C140201BC150201BC170201BC170201BF7
+:10199000C1905EFF956995A995E995295EFD9559D8
+:1019A000CFBB95699599CF9B95599599CF6B9569C3
+:1019B00095A995D9CF3B9559CFCB9569959995D94F
+:1019C000CEDB95599599CF6BD431E0670920EA17A2
+:1019D0000000E066004CEA1600000FDCEC0C0F8BF8
+:1019E000F735000CE0630120EA1300006E4C580C40
+:1019F000C250E06B0800F80B0D445C74081C8F4C5F
+:101A0000089A6E0B069C0FD9EC090F8870195D19A6
+:101A1000069CC0486E0B2FFB8F0B089BFE34000109
+:101A20005C74F60A1510CE30193B0A3BCF40305C8F
+:101A3000E06B00D8EA1B0000B68C0FACA68C0FBC84
+:101A4000A69CE06C0940EA1C00009923302BB86B7F
+:101A5000DA3A0000D421E0650920EA1500006A0B9B
+:101A6000F7DBC0066A4C160C8B4CE0670800F807E1
+:101A70000D4C5C7CF80B01045C746A4A181A8B4AA2
+:101A8000E0660120EA160000580CC100089A0C0B11
+:101A90006A0CE069004CEA1900000BD8F2080F8EBE
+:101AA0007C295D196A0C080C8B0CE06C0940EA1C5F
+:101AB00000009926B867E06B1A54EA1B8000995B16
+:101AC000DA2A0000EBCD40FEE06C1ED4EA1C800058
+:101AD000E06E1EECEA1E8000300A300B1907190672
+:101AE0001905EFE61003E7D3C002C1C1EA041603EB
+:101AF000C1900C37C090AF092014AD28CFD1EBD5E1
+:101B0000C003C121C0B82014AD2ACFE1EBD5C0037A
+:101B1000C050300220150CC2CFD11C3CCE03E3CF05
+:101B200080FE0C37CF700F3120150CC1CEBB0000EA
+:101B3000D401201DE06B0920EA1B0000760A500A40
+:101B4000198AB6AA199AB6BA19AABAAA19BABABA01
+:101B5000760C1B091839C0B3E06A004CEA1A000081
+:101B600017D8F4080F8E7C0A1439C0B3E06C00D883
+:101B7000EA1C0000308BB88B30ABB8CB300CD802ED
+:101B8000122C2FFC974C301CD8020000D421E067A7
+:101B90000920EA170000E06C08006E4BF60C0D46B9
+:101BA0005C76F606010C8F4CE0650120EA1500001A
+:101BB0000C9A6E0B0A9CE069004CEA1900000FD8E1
+:101BC000F2080F8E7C195D196E0C0C0C8F0CE06CFA
+:101BD0000940EA1C00009925B866E06B1B8CEA1BE3
+:101BE0008000995BDA2A0000D401303BE06C1ECC07
+:101BF000EA1C8000FEB0FEA4D503FEB0FB35FEB0AB
+:101C0000F347FEB0F343C031FEB0F3AEC008D703D4
+:101C10008000193C800012648000028C80000288E1
+:101C2000D401F80B1518C040FEB0F39ED80AFEB0E0
+:101C3000F3C9D80A80000364800003C0D401FE7990
+:101C40001404720AFE7914D47208A788CFC2E1B9CD
+:101C50000000D3033048F00C0028EA18AA00FE7EEA
+:101C600014589D08E01AFFF8F7DBC003144BA7BB1C
+:101C7000FE7A1404F40C092BB199C023D503D80AB9
+:101C8000D4017828BD98CFE3A96BA1ABF94B0040F4
+:101C9000B16A990A782BB99BCFE3129BC0CCDA0AC0
+:101CA000782BB99BCFE3780BA1AB990B782BB99B21
+:101CB000CFE35EFD782AB99ACFE3991B782BB99BC5
+:101CC000CFE35EFDD4013009300A303B303CFEB03A
+:101CD000FAA5303CE0A00070D80AD70380001DB4FC
+:101CE000D401300CFE7B586C970C3009300A303B25
+:101CF000303CFEB0FA93D80A80001218EBCD408039
+:101D0000340C3007300EA17A5CFB5CFE5CF7103EB1
+:101D1000F2071300C053101EEE090147A1AA201CB0
+:101D2000CF310E991C98E3CD80800000E1BB00000C
+:101D3000D303300AEA1AAA00FE791458930AFE7AED
+:101D40001400950CB19B5E3DD5035EFDE06900007B
+:101D5000EA198000121CF9DCC00EF9EA11ECFE7AD7
+:101D60001000A59BF40B092C5EFD00003009EA1958
+:101D70008000120B1898580A5E0D1739201A10C9E6
+:101D8000CFD15EFDD401FEB0F2DBE06C0920EA1C8D
+:101D90000000783B5D1BD80A8000033CD401300C66
+:101DA000FEB0F58A300CFEB0F5F7DA0A800008B410
+:101DB00080000994FE7B5860F60C002B760CA19CE9
+:101DC0005E3D760CA1AC970C5EFD0000D401FE7C5C
+:101DD0001800E0A00019A17CD802D70380001E04DF
+:101DE000D401300BFE7C1800FEB0FF66D80AD70382
+:101DF00080001CB4300CE3BC00425EFDE1BC00423C
+:101E00005EFC0000781B5EFB00001000000020005C
+:101E100000004000000080000000C0000001000041
+:101E20000001800000020000000300000004000028
+:101E30000006000000080000000C00000010000078
+:101E40000020000000000000000000000000000072
+:101E500000000100800016248000163CFF000000F6
+:101E60000002000080001D6C80001554FF0000007F
+:101E70000000000000000000000000000000000062
+:101E8000000000018000156880001580000000003F
+:101E90000000002080001598800015C0010000009F
+:101EA00000000003800015E80000000000000000B2
+:101EB0000000000480001608000000000000000080
+:101EC000007A120000B71B0000F424002E002F003F
+:101ED0003000000080001EF0000000080000009CA0
+:0C1EE000000000C0000000C00000090A63
+:101EF000800008180000000010000000000300002F
+:101F000000000000000000000000000000000000D1
+:101F10000403090441544D454C2041565200000031
+:101F20004446550080001690800016B0800016B41C
+:101F30008000179C80001E6080001E7080001E8044
+:101F400080001E9080001EA080001EB080001E50E9
+:101F50001201000200000040EB03E92F0001010222
+:101F600000010000090212000101008002090400C2
+:101F700000000000000000000000003C0000007CA9
+:0C1F8000000000900000006800000094C9
+:040000058000000077
+:00000001FF
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.0/at32uc3d-isp_cfg-1.1.0.dat b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.0/at32uc3d-isp_cfg-1.1.0.dat
new file mode 100644
index 0000000..a6f8083
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.0/at32uc3d-isp_cfg-1.1.0.dat
@@ -0,0 +1 @@
+’ž"íáÿ× \ No newline at end of file
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.0/flip/ATUC128D3.xml b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.0/flip/ATUC128D3.xml
new file mode 100644
index 0000000..e644ff7
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.0/flip/ATUC128D3.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<!DOCTYPE Part SYSTEM "part.dtd">
+<Part NAME="ATUC128D3">
+ <USB_PID VALUE="2FE9" />
+
+ <PageSize SIZE="256" />
+
+ <Memory NAME="FLASH" SIZE="131072" ADDR="80000000" />
+
+ <Memory NAME="BOOTLOADER" SIZE="3" INDEX="3"/>
+
+ <Memory NAME="SIGNATURE" SIZE="4" INDEX="6"/>
+
+ <Memory NAME="SECURITY" SIZE="1" />
+
+ <Memory NAME="CONFIGURATION" SIZE="32" />
+
+ <Memory NAME="USER" SIZE="256" ADDR="80800000" INDEX="11" />
+
+ <Memory NAME="INT_RAM" SIZE="16384" ADDR="0" INDEX="20" />
+
+ <!-- EXT_RAM memories are too large (>= 16Mbyte) to create a buffer; we declare a 0-byte size for them.
+ We program them during the ELF parsing process. -->
+
+ <Memory NAME="EXT_MEM_CS0" SIZE="0" ADDR="C0000000" />
+
+ <Memory NAME="EXT_MEM_CS1" SIZE="0" ADDR="D0000000" />
+
+ <Memory NAME="EXT_MEM_CS2" SIZE="0" ADDR="C8000000" />
+
+ <Memory NAME="EXT_MEM_CS3" SIZE="0" ADDR="CC000000" />
+
+ <Memory NAME="EXT_MEM_DF" SIZE="8388608" ADDR="0" INDEX="30" />
+
+ <Protocol FILE="USB_DFU_02.xml" />
+
+ <Protocol FILE="RS232_I02.xml" />
+</Part>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.0/flip/atmel_usb_dfu.inf b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.0/flip/atmel_usb_dfu.inf
new file mode 100644
index 0000000..17af506
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.0/flip/atmel_usb_dfu.inf
@@ -0,0 +1,192 @@
+[Version]
+Signature = "$Chicago$"
+provider = %manufacturer%
+DriverVer = 07/07/2009,1.12.0.1
+CatalogFile = atmel_usb_dfu.cat
+CatalogFile.NT = atmel_usb_dfu.cat
+CatalogFile.NTAMD64 = atmel_usb_dfu_x64.cat
+
+Class = LibusbDevices
+ClassGUID = {2BF3BE07-AA90-44E9-8CB0-13E9F76527DA}
+
+[ClassInstall]
+AddReg=libusb_class_install_add_reg
+
+[ClassInstall32]
+AddReg=libusb_class_install_add_reg
+
+[libusb_class_install_add_reg]
+HKR,,,,"Atmel USB Devices"
+HKR,,Icon,,"-20"
+
+[Manufacturer]
+%manufacturer%=Devices,NT,NTAMD64
+
+;--------------------------------------------------------------------------
+; Files
+;--------------------------------------------------------------------------
+
+[SourceDisksNames]
+1 = "Libusb-Win32 Driver Installation Disk",,
+
+[SourceDisksFiles]
+libusb0.sys = 1,,
+libusb0.dll = 1,,
+libusb0_x64.sys = 1,,
+libusb0_x64.dll = 1,,
+
+[DestinationDirs]
+libusb_files_sys = 10,system32\drivers
+libusb_files_sys_x64 = 10,system32\drivers
+libusb_files_dll = 10,system32
+libusb_files_dll_wow64 = 10,syswow64
+libusb_files_dll_x64 = 10,system32
+
+[libusb_files_sys]
+libusb0.sys
+
+[libusb_files_sys_x64]
+libusb0.sys,libusb0_x64.sys
+
+[libusb_files_dll]
+libusb0.dll
+
+[libusb_files_dll_wow64]
+libusb0.dll
+
+[libusb_files_dll_x64]
+libusb0.sys,libusb0_x64.dll
+
+;--------------------------------------------------------------------------
+; Device driver
+;--------------------------------------------------------------------------
+
+[libusb_DEV]
+CopyFiles = libusb_files_sys, libusb_files_dll
+AddReg = libusb_add_reg
+
+[libusb_DEV.NT]
+CopyFiles = libusb_files_sys, libusb_files_dll
+AddReg = libusb_add_reg
+
+[libusb_DEV.NTAMD64]
+CopyFiles = libusb_files_sys, libusb_files_dll, libusb_files_sys_x64, libusb_files_dll_wow64, libusb_files_dll_x64
+AddReg = libusb_add_reg
+
+;[libusb_DEV.HW]
+;DelReg = libusb_del_reg_hw
+;AddReg = libusb_add_reg_hw
+
+[libusb_DEV.NT.HW]
+DelReg = libusb_del_reg_hw
+AddReg = libusb_add_reg_hw
+
+[libusb_DEV.NTAMD64.HW]
+DelReg = libusb_del_reg_hw
+AddReg = libusb_add_reg_hw
+
+[libusb_DEV.NT.Services]
+AddService = libusb0, 0x00000002, libusb_add_service
+
+[libusb_DEV.NTAMD64.Services]
+AddService = libusb0, 0x00000002, libusb_add_service
+
+[libusb_add_reg]
+HKR,,DevLoader,,*ntkern
+HKR,,NTMPDriver,,libusb0.sys
+
+; Older versions of this .inf file installed filter drivers. They are not
+; needed any more and must be removed
+[libusb_del_reg_hw]
+HKR,,LowerFilters
+HKR,,UpperFilters
+
+; Device properties
+[libusb_add_reg_hw]
+HKR,,SurpriseRemovalOK, 0x00010001, 1
+
+;--------------------------------------------------------------------------
+; Services
+;--------------------------------------------------------------------------
+
+[libusb_add_service]
+DisplayName = "Atmel - LibUsb Kernel Driver 07/07/2009, 1.12.0.1"
+ServiceType = 1
+StartType = 3
+ErrorControl = 0
+ServiceBinary = %12%\libusb0.sys
+
+;--------------------------------------------------------------------------
+; Devices
+;--------------------------------------------------------------------------
+
+[Devices]
+"AT32UC3C"=LIBUSB_DEV, USB\VID_03EB&PID_2FEB
+"ATUC3D"=LIBUSB_DEV, USB\VID_03EB&PID_2FE9
+"ATxmega128A1U"=LIBUSB_DEV, USB\VID_03EB&PID_2FED
+"ATmega8U2"=LIBUSB_DEV, USB\VID_03EB&PID_2FEE
+"ATmega16U2"=LIBUSB_DEV, USB\VID_03EB&PID_2FEF
+"ATmega32U2"=LIBUSB_DEV, USB\VID_03EB&PID_2FF0
+"AT32UC3A3"=LIBUSB_DEV, USB\VID_03EB&PID_2FF1
+"ATmega32U6"=LIBUSB_DEV, USB\VID_03EB&PID_2FF2
+"ATmega16U4"=LIBUSB_DEV, USB\VID_03EB&PID_2FF3
+"ATmega32U4"=LIBUSB_DEV, USB\VID_03EB&PID_2FF4
+"AT32UC3B"=LIBUSB_DEV, USB\VID_03EB&PID_2FF6
+"AT90USB82"=LIBUSB_DEV, USB\VID_03EB&PID_2FF7
+"AT32UC3A"=LIBUSB_DEV, USB\VID_03EB&PID_2FF8
+"AT90USB64"=LIBUSB_DEV, USB\VID_03EB&PID_2FF9
+"AT90USB162"=LIBUSB_DEV, USB\VID_03EB&PID_2FFA
+"AT90USB128"=LIBUSB_DEV, USB\VID_03EB&PID_2FFB
+"AT89C5130/AT89C5131"=LIBUSB_DEV, USB\VID_03EB&PID_2FFD
+"AT8XC5122"=LIBUSB_DEV, USB\VID_03EB&PID_2FFE
+"AT89C5132/AT89C51SND1/AT89C51SND2"=LIBUSB_DEV, USB\VID_03EB&PID_2FFF
+
+[Devices.NT]
+"AT32UC3C"=LIBUSB_DEV, USB\VID_03EB&PID_2FEB
+"ATUC3D"=LIBUSB_DEV, USB\VID_03EB&PID_2FE9
+"ATxmega128A1U"=LIBUSB_DEV, USB\VID_03EB&PID_2FED
+"ATmega8U2"=LIBUSB_DEV, USB\VID_03EB&PID_2FEE
+"ATmega16U2"=LIBUSB_DEV, USB\VID_03EB&PID_2FEF
+"ATmega32U2"=LIBUSB_DEV, USB\VID_03EB&PID_2FF0
+"AT32UC3A3"=LIBUSB_DEV, USB\VID_03EB&PID_2FF1
+"ATmega32U6"=LIBUSB_DEV, USB\VID_03EB&PID_2FF2
+"ATmega16U4"=LIBUSB_DEV, USB\VID_03EB&PID_2FF3
+"ATmega32U4"=LIBUSB_DEV, USB\VID_03EB&PID_2FF4
+"AT32UC3B"=LIBUSB_DEV, USB\VID_03EB&PID_2FF6
+"AT90USB82"=LIBUSB_DEV, USB\VID_03EB&PID_2FF7
+"AT32UC3A"=LIBUSB_DEV, USB\VID_03EB&PID_2FF8
+"AT90USB64"=LIBUSB_DEV, USB\VID_03EB&PID_2FF9
+"AT90USB162"=LIBUSB_DEV, USB\VID_03EB&PID_2FFA
+"AT90USB128"=LIBUSB_DEV, USB\VID_03EB&PID_2FFB
+"AT89C5130/AT89C5131"=LIBUSB_DEV, USB\VID_03EB&PID_2FFD
+"AT8XC5122"=LIBUSB_DEV, USB\VID_03EB&PID_2FFE
+"AT89C5132/AT89C51SND1/AT89C51SND2"=LIBUSB_DEV, USB\VID_03EB&PID_2FFF
+
+[Devices.NTAMD64]
+"AT32UC3C"=LIBUSB_DEV, USB\VID_03EB&PID_2FEB
+"ATUC3D"=LIBUSB_DEV, USB\VID_03EB&PID_2FE9
+"ATxmega128A1U"=LIBUSB_DEV, USB\VID_03EB&PID_2FED
+"ATmega8U2"=LIBUSB_DEV, USB\VID_03EB&PID_2FEE
+"ATmega16U2"=LIBUSB_DEV, USB\VID_03EB&PID_2FEF
+"ATmega32U2"=LIBUSB_DEV, USB\VID_03EB&PID_2FF0
+"AT32UC3A3"=LIBUSB_DEV, USB\VID_03EB&PID_2FF1
+"ATmega32U6"=LIBUSB_DEV, USB\VID_03EB&PID_2FF2
+"ATmega16U4"=LIBUSB_DEV, USB\VID_03EB&PID_2FF3
+"ATmega32U4"=LIBUSB_DEV, USB\VID_03EB&PID_2FF4
+"AT32UC3B"=LIBUSB_DEV, USB\VID_03EB&PID_2FF6
+"AT90USB82"=LIBUSB_DEV, USB\VID_03EB&PID_2FF7
+"AT32UC3A"=LIBUSB_DEV, USB\VID_03EB&PID_2FF8
+"AT90USB64"=LIBUSB_DEV, USB\VID_03EB&PID_2FF9
+"AT90USB162"=LIBUSB_DEV, USB\VID_03EB&PID_2FFA
+"AT90USB128"=LIBUSB_DEV, USB\VID_03EB&PID_2FFB
+"AT89C5130/AT89C5131"=LIBUSB_DEV, USB\VID_03EB&PID_2FFD
+"AT8XC5122"=LIBUSB_DEV, USB\VID_03EB&PID_2FFE
+"AT89C5132/AT89C51SND1/AT89C51SND2"=LIBUSB_DEV, USB\VID_03EB&PID_2FFF
+
+
+;--------------------------------------------------------------------------
+; Strings
+;--------------------------------------------------------------------------
+
+[Strings]
+manufacturer = "Atmel Corporation"
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.0/program_at32uc3d-isp-1.1.0.cmd b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.0/program_at32uc3d-isp-1.1.0.cmd
new file mode 100644
index 0000000..63da3f9
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.0/program_at32uc3d-isp-1.1.0.cmd
@@ -0,0 +1,56 @@
+@echo off
+setlocal enableextensions enabledelayedexpansion
+
+: This command script programs the ISP (flash array), the ISP
+: configuration word (User page) and the general-purpose fuse bits.
+
+: Copyright (C) 2006-2008, Atmel Corporation All rights reserved.
+:
+: Redistribution and use in source and binary forms, with or without
+: modification, are permitted provided that the following conditions are met:
+:
+: 1. Redistributions of source code must retain the above copyright notice, this
+: list of conditions and the following disclaimer.
+:
+: 2. Redistributions in binary form must reproduce the above copyright notice,
+: this list of conditions and the following disclaimer in the documentation and/
+: or other materials provided with the distribution.
+:
+: 3. The name of ATMEL may not be used to endorse or promote products derived
+: from this software without specific prior written permission.
+:
+: THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED
+: WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND
+: SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,
+: INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+: BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+: DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+: OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+: NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+: EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+echo.
+echo Performing a JTAG Chip Erase command.
+avr32program chiperase
+
+echo.
+echo Programming MCU memory from `at32uc3c-isp-1.1.0.hex'.
+avr32-objcopy -I ihex -O binary at32uc3d-isp-1.1.0.hex at32uc3d-isp-1.1.0.bin
+avr32program program -finternal@0x80000000 -cint -e -v -O0x80000000 -Fbin at32uc3d-isp-1.1.0.bin
+del at32uc3d-isp-1.1.0.bin
+
+echo.
+echo Programming ISP configuration word \(default for EVK1100 i.e. Word2 == 0x929E1424 and Word1 == 0xE11EFFD7\)
+avr32program program -finternal@0x80000000 -cint -e -v -O0x808000F8 -Fbin at32uc3d-isp_cfg-1.1.0.dat
+
+echo.
+echo Programming general-purpose fuse bits.
+avr32program writefuses -finternal@0x80000000 gp=0xFFF5FFFF
+
+echo.
+echo Resetting MCU.
+avr32program run -R
+
+pause
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.0/program_at32uc3d-isp-1.1.0.sh b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.0/program_at32uc3d-isp-1.1.0.sh
new file mode 100644
index 0000000..1637990
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.0/program_at32uc3d-isp-1.1.0.sh
@@ -0,0 +1,59 @@
+#!/bin/sh
+
+# This shell script programs the ISP (flash array), the ISP configuration words
+# (User page) and the general-purpose fuse bits.
+
+# Copyright (c) 2009 Atmel Corporation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice, this
+# list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# 3. The name of Atmel may not be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# 4. This software may only be redistributed and used in connection with an Atmel
+# AVR product.
+#
+# THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+# EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+#
+
+
+echo
+echo Performing a JTAG Chip Erase command.
+avr32program chiperase
+
+echo
+echo Programming MCU memory from \`at32uc3c-isp-H.hex\'.
+avr32-objcopy -I ihex -O binary at32uc3d-isp-1.1.0.hex at32uc3d-isp-1.1.0.bin
+avr32program program -finternal@0x80000000,512Kb -cint -e -v -O0x80000000 -Fbin at32uc3d-isp-1.1.0.bin
+rm -f at32uc3d-isp-1.1.0.bin
+
+echo
+echo Programming ISP configuration words \(default for EVK1100 i.e. Word2 == 0x929E1424 and Word1 == 0xE11EFFD7\)
+avr32program program -finternal@0x80000000 -cint -e -v -O0x808000F8 -Fbin at32uc3d-isp_cfg-1.1.0.dat
+
+echo
+echo Programming general-purpose fuse bits.
+avr32program writefuses -finternal@0x80000000 gp=0xFFF7FFFF
+
+echo
+echo Resetting MCU.
+avr32program reset
+
+pause
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.1/Readme.txt b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.1/Readme.txt
new file mode 100644
index 0000000..7f2a638
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.1/Readme.txt
@@ -0,0 +1,595 @@
+avr32.7z is header package used to compile at32uc3d-isp-1.1.1.hex project on IAR
+
+IAR Assembler for Atmel AVR32
+3.31.1 (3.31.1.40059)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\bin\aavr32.exe
+05/11/2010 10:20:02, 4440064 bytes
+
+IAR C/C++ Compiler for Atmel AVR32
+3.31.1 (3.31.1.40059)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\bin\iccavr32.exe
+05/11/2010 10:22:16, 9531392 bytes
+
+IAR Java to C converter for Atmel AVR32
+3.31.1 (3.31.1.40059)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\bin\javatoc.exe
+05/11/2010 10:19:04, 163840 bytes
+
+IAR Library Builder
+4.61S (4.61.19.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\bin\xar.exe
+08/12/2009 17:48:46, 163840 bytes
+
+IAR XLIB
+4.61S/386 (4.61.19.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\bin\xlib.exe
+08/12/2009 17:49:48, 532480 bytes
+
+IAR XLINK
+4.61S (4.61.19.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\bin\xlink.exe
+08/12/2009 19:05:14, 2326528 bytes
+
+WDREG Installation Utility 10.10
+10.10 (10.1.0.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\drivers\Jungo\win32\wdreg.exe
+04/11/2010 18:09:20, 286720 bytes
+
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\drivers\Jungo\wow64\system64.exe
+04/11/2010 18:09:20, 45568 bytes
+
+WDREG Installation Utility 10.10
+10.10 (10.1.0.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\drivers\Jungo\wow64\wdreg.exe
+04/11/2010 18:09:20, 145920 bytes
+
+IAR CSpyBat
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\CSpyBat.exe
+14/09/2010 01:34:10, 757760 bytes
+
+IAR Build Utility
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\IarBuild.exe
+14/09/2010 01:32:54, 106496 bytes
+
+IAR Embedded Workbench IDE
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\IarIdePm.exe
+14/09/2010 01:32:34, 487424 bytes
+
+IAR C-SPY AVR ONE! Driver for Atmel AVR32
+3.30.2/W32 [Beta] [Beta] (3.30.2.9999)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\bin\avr32avrone.dll
+14/10/2010 13:04:46, 2965504 bytes
+
+IAR C-SPY Batch Library Support Plug-in for Atmel AVR32
+3.31.1 (3.31.1.40059)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\bin\avr32bat.dll
+05/11/2010 10:18:14, 503808 bytes
+
+IAR C-SPY JTAGICE mkII Driver for Atmel AVR32
+3.30.2/W32 [Beta] [Beta] (3.30.2.9999)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\bin\avr32jtagicemkII.dll
+14/10/2010 13:02:48, 2945024 bytes
+
+IAR C-SPY Library Support Plug-in for Atmel AVR32
+3.31.1 (3.31.1.40059)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\bin\avr32LibSupport.dll
+05/11/2010 10:20:06, 602112 bytes
+
+IAR LibSupport Plug-in Language Specific Resources
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\bin\avr32LibSupport.ENU.dll
+14/09/2010 01:26:30, 10240 bytes
+
+IAR C-SPY Processor Descriptor for Atmel AVR32
+3.31.1 (3.31.1.40059)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\bin\avr32proc.dll
+05/11/2010 10:18:02, 1814528 bytes
+
+IAR C-SPY Simulator Driver for Atmel AVR32
+3.31.1 (3.31.1.40059)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\bin\avr32sim.dll
+05/11/2010 10:21:10, 2678784 bytes
+
+IAR Workbench Target Descriptor for Atmel AVR32
+3.31.1 (3.31.1.40059)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\bin\swtdavr32.dll
+05/11/2010 10:17:40, 933888 bytes
+
+IAR Workbench Target Descriptor, AVR ONE!, for Atmel AVR32
+3.31.1 (3.31.1.40059)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\bin\swtdavr32avrone.dll
+05/11/2010 10:17:32, 671744 bytes
+
+IAR Workbench Target Descriptor, JTAGICE mkII, for Atmel AVR32
+3.31.1 (3.31.1.40059)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\bin\swtdavr32jtagicemkII.dll
+05/11/2010 10:18:12, 675840 bytes
+
+IAR Workbench Target Descriptor, Simulator for Atmel AVR32
+3.31.1 (3.31.1.40059)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\bin\swtdavr32sim.dll
+05/11/2010 10:19:00, 434176 bytes
+
+wdapi 10.10
+10.10 (10.1.0.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\bin\win32\wdapi1010.dll
+04/11/2010 18:09:20, 143360 bytes
+
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\bin\win32\WinDriverStub.dll
+04/11/2010 18:09:20, 8192 bytes
+
+wdapi 10.10
+10.10 (10.1.0.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\bin\wow64\wdapi1010.dll
+04/11/2010 18:09:20, 143360 bytes
+
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\bin\wow64\WinDriverStub.dll
+04/11/2010 18:09:20, 8192 bytes
+
+Driver Install Frameworks for API library module
+2.1 (2.1.0.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\drivers\Jungo\win32\difxapi.dll
+04/11/2010 18:09:20, 319456 bytes
+
+µC/OS-II KA Plug-in for C-SPY DLL
+2.50 2007-09-10 (2.5.0.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.dll
+05/11/2010 09:34:42, 471040 bytes
+
+IAR STK600 Plug-in
+1.0.3.0 (1.0.3.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\plugins\Stk600Plugin\Stk600Plugin.dll
+04/11/2010 18:09:34, 471040 bytes
+
+IAR CSpyBat Language Specific Resources
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\CSpyBat.ENU.dll
+14/09/2010 01:26:24, 5632 bytes
+
+IAR C-SPY Debugger GUI
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\DebuggerGui.dll
+14/09/2010 01:40:00, 1937408 bytes
+
+IAR C-SPY Debugger GUI Language Specific Resources
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\DebuggerGui.ENU.dll
+14/09/2010 01:26:28, 69632 bytes
+
+IAR Find In Files
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\FindInFiles.dll
+14/09/2010 01:31:08, 352256 bytes
+
+IAR Find In Files Language Specific Resources
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\FindInFiles.ENU.dll
+14/09/2010 01:26:28, 4608 bytes
+
+IAR Build Utility Language Specific Resources
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\IarBuild.ENU.dll
+14/09/2010 01:26:28, 3072 bytes
+
+IAR Embedded Workbench IDE Language Specific Resources
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\IarIdePm.ENU.dll
+14/09/2010 01:26:26, 479232 bytes
+
+IAR IDE Framework
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\IdeFramework.dll
+14/09/2010 01:27:02, 1056768 bytes
+
+IAR IDE Framework Language Specific Resources
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\IdeFramework.ENU.dll
+14/09/2010 01:26:32, 4096 bytes
+
+IAR C-SPY Debugger Kernel
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\kernel.dll
+14/09/2010 01:35:32, 2580480 bytes
+
+IAR C-SPY Debugger Kernel Language Specific Resources
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\kernel.ENU.dll
+14/09/2010 01:26:32, 13824 bytes
+
+IAR Log Window
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\LogWindow.dll
+14/09/2010 01:30:24, 274432 bytes
+
+IAR Log Window Language Specific Resources
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\LogWindow.ENU.dll
+14/09/2010 01:26:26, 10240 bytes
+
+IAR Project Manager Engine
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\ProjectManagerEngine.dll
+14/09/2010 01:31:36, 1355776 bytes
+
+IAR Project Manager Engine Language Specific Resources
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\ProjectManagerEngine.ENU.dll
+14/09/2010 01:26:22, 12800 bytes
+
+IAR Project Manager Gui
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\ProjectManagerGui.dll
+14/09/2010 01:38:56, 872448 bytes
+
+IAR Project Manager Gui Language Specific Resources
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\ProjectManagerGui.ENU.dll
+14/09/2010 01:26:20, 163840 bytes
+
+IAR Text Editor
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\TextEditor.dll
+14/09/2010 01:33:00, 806912 bytes
+
+IAR Text Editor Language Specific Resources
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\TextEditor.ENU.dll
+14/09/2010 01:26:14, 32768 bytes
+
+Shared Library for Xerces-C Version 1.5.1
+1, 5, 1 (1.5.1.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\xerces-c_1_5_1.dll
+14/09/2010 00:37:18, 1257472 bytes
+
+IAR XmlLib
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\XmlLib.dll
+14/09/2010 01:23:06, 102400 bytes
+
+IAR Code Coverage Plug-in
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\plugins\CodeCoverage\CodeCoverage.dll
+14/09/2010 01:33:46, 507904 bytes
+
+IAR Code Coverage Plug-in Language Specific Resources
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\plugins\CodeCoverage\CodeCoverage.ENU.dll
+14/09/2010 01:26:30, 10752 bytes
+
+IAR ORTI RTOS Plug-in
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\plugins\Orti\Orti.dll
+14/09/2010 01:36:12, 647168 bytes
+
+IAR ORTI RTOS Plug-in Language Specific Resources
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\plugins\Orti\Orti.ENU.dll
+14/09/2010 01:26:24, 8704 bytes
+
+IAR Profiling Plug-in
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\plugins\Profiling\Profiling.dll
+14/09/2010 01:30:04, 507904 bytes
+
+IAR Profiling Plug-in Language Specific Resources
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\plugins\Profiling\Profiling.ENU.dll
+14/09/2010 01:26:22, 9728 bytes
+
+IAR Stack Plug-in
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\plugins\Stack\Stack.dll
+14/09/2010 01:29:08, 536576 bytes
+
+IAR Stack Plug-in Language Specific Resources
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\plugins\Stack\Stack.ENU.dll
+14/09/2010 01:26:18, 7680 bytes
+
+IAR Symbols Plug-in
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\plugins\SymList\SymList.dll
+14/09/2010 01:28:54, 487424 bytes
+
+IAR Symbols Plug-in Language Specific Resources
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\plugins\SymList\SymList.ENU.dll
+14/09/2010 01:26:16, 3072 bytes
+
+Metadata dll for package 'avr32_asm_lib_all'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_asm_lib_all.dll
+09/11/2010 09:37:26, 94208 bytes
+
+Metadata dll for package 'avr32_asm_lib_src'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_asm_lib_src.dll
+09/11/2010 09:37:34, 94208 bytes
+
+Metadata dll for package 'avr32_atmel_include_files_generated_all'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_atmel_include_files_generated_all.dll
+09/11/2010 09:37:46, 118784 bytes
+
+Metadata dll for package 'avr32_autorun_release'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_autorun_release.dll
+09/11/2010 09:37:30, 90112 bytes
+
+Metadata dll for package 'avr32_bin_release'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_bin_release.dll
+09/11/2010 09:37:14, 94208 bytes
+
+Metadata dll for package 'avr32_bin_release_cs'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_bin_release_cs.dll
+09/11/2010 09:37:34, 90112 bytes
+
+Metadata dll for package 'avr32_compiler_support_all'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_compiler_support_all.dll
+09/11/2010 09:37:40, 90112 bytes
+
+Metadata dll for package 'avr32_created_infocenter_enu_all'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_created_infocenter_enu_all.dll
+09/11/2010 09:37:16, 94208 bytes
+
+Metadata dll for package 'avr32_cspy_release'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_cspy_release.dll
+09/11/2010 09:37:24, 90112 bytes
+
+Metadata dll for package 'avr32_devices_all'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_devices_all.dll
+09/11/2010 09:37:46, 94208 bytes
+
+Metadata dll for package 'avr32_dlib_extra_all'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_dlib_extra_all.dll
+09/11/2010 09:37:30, 98304 bytes
+
+Metadata dll for package 'avr32_dlib_extra_src'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_dlib_extra_src.dll
+09/11/2010 09:37:36, 98304 bytes
+
+Metadata dll for package 'avr32_dlib_generated_all'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_dlib_generated_all.dll
+09/11/2010 09:37:26, 102400 bytes
+
+Metadata dll for package 'avr32_dlib_generated_src'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_dlib_generated_src.dll
+09/11/2010 09:37:32, 159744 bytes
+
+Metadata dll for package 'avr32_doc_all'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_doc_all.dll
+09/11/2010 09:37:16, 94208 bytes
+
+Metadata dll for package 'avr32_ew_release'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_ew_release.dll
+09/11/2010 09:37:36, 90112 bytes
+
+Metadata dll for package 'avr32_hlp_all'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_hlp_all.dll
+09/11/2010 09:37:26, 90112 bytes
+
+Metadata dll for package 'avr32_iar_device_files_generated_all'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_iar_device_files_generated_all.dll
+09/11/2010 09:37:38, 110592 bytes
+
+Metadata dll for package 'avr32_infocenter_templates_all'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_infocenter_templates_all.dll
+09/11/2010 09:37:20, 98304 bytes
+
+Metadata dll for package 'avr32_installer_release'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_installer_release.dll
+09/11/2010 09:37:22, 90112 bytes
+
+Metadata dll for package 'avr32_lib_tools_src'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_lib_tools_src.dll
+09/11/2010 09:37:22, 98304 bytes
+
+Metadata dll for package 'avr32_qscards_all'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_qscards_all.dll
+09/11/2010 09:37:12, 90112 bytes
+
+Metadata dll for package 'avr32_rtlib_release'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_rtlib_release.dll
+09/11/2010 09:37:16, 102400 bytes
+
+Metadata dll for package 'avr32_send_all'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_send_all.dll
+09/11/2010 09:37:20, 102400 bytes
+
+Metadata dll for package 'avr32_stk600_driver_release'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_stk600_driver_release.dll
+09/11/2010 09:37:24, 90112 bytes
+
+Metadata dll for package 'avr32_stk600_plugin_release'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_stk600_plugin_release.dll
+09/11/2010 09:37:10, 90112 bytes
+
+Metadata dll for package 'avr32_windriver_all'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_windriver_all.dll
+09/11/2010 09:37:34, 94208 bytes
+
+Metadata dll for package 'avr32_xlink_all'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_xlink_all.dll
+09/11/2010 09:37:44, 94208 bytes
+
+Metadata dll for package 'common_vcredistx86_2005_sp1_atl_all'
+6.0.2900.2180 (6.0.2900.2180)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\common_vcredistx86_2005_sp1_atl_all.dll
+09/11/2010 09:37:12, 90112 bytes
+
+Metadata dll for package 'common_vcredistx86_2008_sp1_atl_all'
+9.0.30729.4148 (9.0.30729.4148)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\common_vcredistx86_2008_sp1_atl_all.dll
+09/11/2010 09:37:36, 90112 bytes
+
+Metadata dll for package 'common_vcredistx86_export_all'
+1.0.0.0 (1.0.0.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\common_vcredistx86_export_all.dll
+09/11/2010 09:37:22, 90112 bytes
+
+Metadata dll for package 'IDE_CodeCoverageRelease_plugin'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_CodeCoverageRelease_plugin.dll
+09/11/2010 09:37:48, 90112 bytes
+
+Metadata dll for package 'IDE_CSpyBatRelease_exe_langdll'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_CSpyBatRelease_exe_langdll.dll
+09/11/2010 09:37:24, 90112 bytes
+
+Metadata dll for package 'IDE_DebuggerGuiRelease_dll_langdll'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_DebuggerGuiRelease_dll_langdll.dll
+09/11/2010 09:37:40, 90112 bytes
+
+Metadata dll for package 'IDE_FindInFilesRelease_dll_langdll'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_FindInFilesRelease_dll_langdll.dll
+09/11/2010 09:37:44, 90112 bytes
+
+Metadata dll for package 'IDE_IarBuildRelease_exe_langdll'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_IarBuildRelease_exe_langdll.dll
+09/11/2010 09:37:38, 90112 bytes
+
+Metadata dll for package 'IDE_IarIdePmRelease_exe_langdll'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_IarIdePmRelease_exe_langdll.dll
+09/11/2010 09:37:26, 90112 bytes
+
+Metadata dll for package 'IDE_IdeFrameworkRelease_dll_langdll'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_IdeFrameworkRelease_dll_langdll.dll
+09/11/2010 09:37:28, 90112 bytes
+
+Metadata dll for package 'IDE_kernelRelease_dll_langdll'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_kernelRelease_dll_langdll.dll
+09/11/2010 09:37:48, 90112 bytes
+
+Metadata dll for package 'IDE_LibSupportRelease_dll_langdll'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_LibSupportRelease_dll_langdll.dll
+09/11/2010 09:37:28, 90112 bytes
+
+Metadata dll for package 'IDE_LogWindowRelease_dll_langdll'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_LogWindowRelease_dll_langdll.dll
+09/11/2010 09:37:28, 90112 bytes
+
+Metadata dll for package 'IDE_MiscRelease_misc'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_MiscRelease_misc.dll
+09/11/2010 09:37:40, 90112 bytes
+
+Metadata dll for package 'IDE_OrtiRelease_plugin'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_OrtiRelease_plugin.dll
+09/11/2010 09:37:20, 90112 bytes
+
+Metadata dll for package 'IDE_PlatformPackagesRelease_delivery'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_PlatformPackagesRelease_delivery.dll
+09/11/2010 09:37:18, 90112 bytes
+
+Metadata dll for package 'IDE_Platform_release'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_Platform_release.dll
+09/11/2010 09:37:30, 90112 bytes
+
+Metadata dll for package 'IDE_ProfilingRelease_plugin'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_ProfilingRelease_plugin.dll
+09/11/2010 09:37:48, 90112 bytes
+
+Metadata dll for package 'IDE_ProjectManagerEngineRelease_dll_langdll'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_ProjectManagerEngineRelease_dll_langdll.dll
+09/11/2010 09:37:32, 90112 bytes
+
+Metadata dll for package 'IDE_ProjectManagerGuiRelease_dll_langdll'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_ProjectManagerGuiRelease_dll_langdll.dll
+09/11/2010 09:37:32, 90112 bytes
+
+Metadata dll for package 'IDE_SelfTestRelease_dll_langdll'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_SelfTestRelease_dll_langdll.dll
+09/11/2010 09:37:42, 90112 bytes
+
+Metadata dll for package 'IDE_StackRelease_plugin'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_StackRelease_plugin.dll
+09/11/2010 09:37:18, 90112 bytes
+
+Metadata dll for package 'IDE_SymListRelease_plugin'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_SymListRelease_plugin.dll
+09/11/2010 09:37:42, 90112 bytes
+
+Metadata dll for package 'IDE_TextEditorRelease_dll_langdll'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_TextEditorRelease_dll_langdll.dll
+09/11/2010 09:37:44, 90112 bytes
+
+Metadata dll for package 'IDE_XercesXMLRelease_dll_langdll'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_XercesXMLRelease_dll_langdll.dll
+09/11/2010 09:37:22, 90112 bytes
+
+Metadata dll for package 'IDE_XmlLibRelease_dll'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_XmlLibRelease_dll.dll
+09/11/2010 09:37:42, 90112 bytes
+
+Metadata dll for package 'lms_init_media'
+1.0.0 (1.0.0.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\lms_init_media.dll
+09/11/2010 09:37:18, 90112 bytes
+
+Metadata dll for package 'lms_init_release'
+1.0.0 (1.0.0.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\lms_init_release.dll
+09/11/2010 09:37:30, 90112 bytes
+
+Metadata dll for package 'lms_license_support_release'
+1.0.1 (1.0.1.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\lms_license_support_release.dll
+09/11/2010 09:37:12, 90112 bytes
+
+Metadata dll for package 'lms_safenet_dongle_drivers_media'
+7.5.0 (7.5.0.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\lms_safenet_dongle_drivers_media.dll
+09/11/2010 09:37:44, 90112 bytes
+
+Metadata dll for package 'lms_utilities_release'
+1.1.1 (1.1.1.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\lms_utilities_release.dll
+09/11/2010 09:37:40, 94208 bytes \ No newline at end of file
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.1/at32uc3d-isp-1.1.1.bin b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.1/at32uc3d-isp-1.1.1.bin
new file mode 100644
index 0000000..eb0d28e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.1/at32uc3d-isp-1.1.1.bin
Binary files differ
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.1/at32uc3d-isp-1.1.1.hex b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.1/at32uc3d-isp-1.1.1.hex
new file mode 100644
index 0000000..2bed70a
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.1/at32uc3d-isp-1.1.1.hex
@@ -0,0 +1,512 @@
+:0200000480007A
+:10000000E1B80000F1D8C2C35818C0A0FEC8FFEE86
+:100010003009EA190061E06D0E14D041D6033008B2
+:10002000FE791C00E06A00FCEA1A8080FE7B140066
+:100030007000E061504BEA1149537402E06301071C
+:100040000494C78CC141E7D2C210E043E11EC0F165
+:10005000EDB20009C0C3F6F30180E0642317087312
+:10006000C131EDB30003C3830230C3C1C54C91015C
+:10007000E06D0E2CD353FEC00076E3B00001E0A08B
+:100080000D51E0A00D85EDB20008C262E06A00F8F3
+:10009000EA1A80807402E06301070494C4BCCE7144
+:1000A000E7D2C22FE043494FCE21E7D2C108E04357
+:1000B0000033CDD2FE7A2800E6041605A974080A9A
+:1000C0007584E013001FE8030A44E7D2C201065416
+:1000D000EDB40000CCC20230C051C1DC30083000A9
+:1000E00091003000EA100061E3B000003000300100
+:1000F0003002300330043005300630073008300954
+:10010000300A300B300C300D300EE3B00001E3B09C
+:10011000004248CF3002EA1255009302EE12FF006F
+:1001200093021C9FE8051200EA051117E605094530
+:100130000A54E04400FFFE9BFFF758045EF4000001
+:1001400080002000308A310CFE6B00047609AD99E6
+:10015000C1837609A589C553FE6A08003019763E29
+:10016000A19EC5727608A198C542740BAFCB950BC2
+:10017000FE6B00049749975C740CAFAC950CC6D825
+:10018000FE690220930C930AFE6901307208A3985D
+:10019000C042E0A0019FC6187208A388C042E0A038
+:1001A0000261C5B87208A198C092FE6801C0700EC5
+:1001B000A19EC042E0A001E6C508E06E09A0EA1ECB
+:1001C00000007D08720EA58EC08293CA720CA19C9D
+:1001D000C4435838C421C0F8720EA59ECBB293CC4C
+:1001E000720CA38CC3A35818C041E0A002A7C35847
+:1001F0005848C331E86C0000FE6B01C097CCC2D8F0
+:10020000971AE0A00555E0A00107E0A0014FC258F1
+:10021000763EA59EC1227608A598C0F27408AFC8A4
+:100220009508FE6A08007418AF98C043760AA19A30
+:10023000CF92974C9759C118741BA38BC0E2740CD2
+:10024000AFCC950C302C952C740CAFAC950C741C69
+:10025000F9DCC161E0A00CB8FE6C0800786BD60335
+:10026000800004D080000660800005808000073890
+:1002700080000CAC80000414800004A880001BC423
+:10028000E1BC0000D3035EFC5EFF0000D421E0A0CF
+:100290000CEDCF7F1897FE6608006C0CAFDC8D0C60
+:1002A0006C0C300AE06B0220E06C0144EA1C800018
+:1002B000E0A00D386C0CB9BC8D0C6C0CB9CC8D0C5D
+:1002C0006C0CADCC8D0C6C0CADAC8D0C6C0CAFBC57
+:1002D0008D0C6C0CAFCC8D0C6C0C6C1BAF9BCFE2FF
+:1002E000E06909A0EA190000300A300BF2EB0020A7
+:1002F000F2EB0028F2EB0030F2EB00386CCB2E0969
+:100300008DC9FE6C0000780BADCB990B780BE81B08
+:100310000C00990B6C0CA1BC8D0C6C0CAFAC8D0C53
+:10032000FE7C1588780BA1AB990BB197C023D50340
+:10033000D82AD70380001C6880001D20D421CA1F42
+:100340001897FE6C0800780BAFDB990B780BADCBE0
+:10035000990BE0A00C99B197C023D503D82AD703F5
+:1003600080001C84D421C8DF1897FE6608006C0C3E
+:10037000AFCC8D0C6C1BAF9BCFE2FE6C0000780BFA
+:10038000A9CB990BE0A00494C46CC8FC308CFE6B24
+:100390000000976C301BFE6A0000956B310AFE6905
+:1003A0000000936A932C304C932C933B932A6C0C53
+:1003B000AFAC8D0CB197C023D503D82A80000CAC0C
+:1003C000FE6C0800780BAFCB990BFE6C0000780B2D
+:1003D000A9AB990B5EFD0000FE6B0000760AA7DA60
+:1003E000970A760AE01AFF80F9DCC007144C970CD4
+:1003F000760CA7BC970C5EFDFE6B0000760CF9DC5A
+:10040000C0075EFCE06A09A0EA1A0000952CB46BF4
+:100410005EFD0000D401FE6C0000780BE01BFF8045
+:10042000990B780BA7BB990BFE6C0100780B308AF7
+:100430003409F20A0C4AE0690400F4090D4AE01B91
+:10044000E68B3FF9F20A001AF4091200F20A111CB5
+:10045000A56AE21A1974144B990BE06C09A0EA1C06
+:100460000000F8CBFFBC998B789BE41B8000999B24
+:10047000FE6C0000787BA1AB997B300CEA1C01007C
+:10048000FE6B01F097CCCFDEFE6B01F0304A970A8D
+:10049000302A970AE06B1000FE6A0000956BB19C51
+:1004A000C023D503D80A0000301CFE6B0220970C35
+:1004B000302CFE6B0160970C300CE06B09A0EA1B3E
+:1004C0000000974C975CB66CF74C00405EFD000056
+:1004D000D421E06709A0EA1700006F0C580CC03067
+:1004E000C5EDCE3FFE6601F0FE65016030446E9CB6
+:1004F000F9DCC00F588CC090305CEF4C0040E86CC9
+:1005000000008D0C8B04D82AEEEA0044AF1BF9DB07
+:10051000C0105CCCAE1C8EAC5CCCAE2CF9DAC0103A
+:100520005CCCAE3CE0A0051ACE808B04E06C0A24C3
+:10053000EA1C0000300B0F8AA98AC0F28EEAF5DAB5
+:10054000C006F40915105F0AB88AB81BB82B302C06
+:10055000EF4C0040C16CD82A8EBA580AC031CEDCAC
+:10056000D82AB81BB82B301CEF4C004031078B0742
+:10057000C88E8D07B19CC023D503D82A80000F58A0
+:10058000D431E0630280EA1380005D133017FE6B04
+:1005900001F097C7B19CC023D503E06609A0EA1615
+:1005A00000006D0C583CC041CFACC7FFD83A8CEC72
+:1005B000E0650A24EA1500008AA418245C74C1F1DD
+:1005C0000B8B580BC031CD5CD83A30028A9B160C8D
+:1005D0008CBB163CC0656C5C580CC0305D1CC031D7
+:1005E000AA82C1188AAC8A9B180BAA1BAA228CE487
+:1005F000F9D4C006F80B15105F0CAA8CE04400413A
+:10060000F9B404405D13FE6B0130760AA38AC08200
+:10061000B19CC023D503304CED4C0040D83A6C2936
+:100620008AAB1609089BECCEFFBC5804C0501338A7
+:10063000201B1CC8CFD18AAB080BAA2B6C9BE01BDC
+:100640008000E9D4C00F16448D94FE6B013097C72B
+:10065000FE6B01F09707B19CC023D503D83A000088
+:10066000D431E06709A0EA1700006F0CFE6601F0C4
+:10067000E86500003054581CC0C0582CC030584C9D
+:10068000C031C8DCC048EF4400408D05C0EFD83A07
+:100690006E9BF7DBC00FE0630A24EA13000086AC10
+:1006A000189A8EE9F80B00081039C044F20C010BBF
+:1006B0005C7BEEC9FFBC6E2C180A169C149E580B6E
+:1006C000C0501338201C1CC8CFD186AC160CA62CE9
+:1006D0005C7CFE6201603021E04B0040C061869B83
+:1006E000180B8EBA143BC0F5AE6C6E5C580CC08013
+:1006F0005D1CC061EF4400408D058501D83A85013D
+:10070000C1CCD83A8EEBF80B1900C0C16E5C580C06
+:10071000CF205D1CCF0086AC869B180BA61B300C2F
+:10072000A62C850131078507FEB0FDAC8D07B19C75
+:10073000C023D503D83A0000D401E06C09A0EA1C1C
+:100740000000303BF94B0040789BE01B8000999BF8
+:10075000FEB0FD98FE6B0160301A970AFE6901F049
+:10076000930A308A970A930AB19CC023D503D80A0A
+:10077000D401304CE06B09A0EA1B0000F74C0040AC
+:10078000FEB0FD80310BFE6A0160950BFE6A01F040
+:10079000950BB19CC023D503D80A0000D401E06BAF
+:1007A00009A0EA1B0000764C580CC0205D1CD80A3A
+:1007B000FE6C140C780BE06A1DACEA1A8000F7DBC3
+:1007C000C004F40B032CA98C5EFC0000FE6A14002C
+:1007D0007409A7C9340BF7EC006C124C950C5EFD44
+:1007E000D421E0670838EA178000E06B07CCEA1BE9
+:1007F0008000E06AE1C1EA1A00E4143CC123E06A27
+:10080000C381EA1A01C9143C301CC0625D1B3FFB66
+:10081000311C5D17D82A5D1B3FFB310C5D17D82AB0
+:10082000300C5D1B3FFB311C5D17D82AFE6B140892
+:10083000760CA19CCFC25EFDD42118951697E06678
+:100840000008EA160000F0160000FE6C1404780B95
+:10085000E01BFFC0EBD5C00616455807C0A6E01543
+:1008600000FFE415FF000A9BEBD7C010F7E51085E9
+:10087000EBD5C018EA15A5009905781CE21C000C00
+:100880008D1CF0160000D82AFE6B1408760CF9DCDB
+:10089000C0815EFCD4013FFB309CCCFFD80A000035
+:1008A000D401F60A1518304AF9BA0005189B149CB1
+:1008B000CC4FD80AD42118961697C7BF0E9BA39C7D
+:1008C000B9360C9CCEEFD82AD42118973006308543
+:1008D00020150E9B0A9CCEFFE06B0008EA1B00006F
+:1008E000761C18465805CF519716D82AFE6B14145B
+:1008F0007618760A30091449F9DCC006EDBC00050B
+:10090000F2081730F00C0A48A1985F3C5EFC00002A
+:10091000D42118971696F7DCC006308CC8EFEC0C83
+:100920001518C0400E9CCE3FD822DA2AD401F60A10
+:100930001518C061F9DCC006189B307CC7EFD80AD7
+:10094000D401F60A1518300BC030CE3FD80ACEFFBE
+:10095000D80A0000D401189B30CCFEB0FF6FFE6BAC
+:100960001408760CF9DCC0A1D8020000D421169737
+:100970003016189B302CFEB0FF61EE0C1518C0C06D
+:10098000E0670008EA1700006E153FFCCE4F18968E
+:100990006E1C18458F150C9CD8220000D4013FFB1B
+:1009A00030FCFEB0FF4BFE6B1408760CF9DCC0A1E6
+:1009B000D8020000D42118973FFB30ECFEB0FF3E78
+:1009C000EE0C1518F9BC0001C020CE9FD822000003
+:1009D000D671204D30013002FE6C140C78093008BD
+:1009E000EA188000E06E1DACEA1E8000F3D9C00456
+:1009F000FC09032C18085028405616970C0A149529
+:100A0000300CEA1C80001836C0831036C0B3300C9E
+:100A1000EA1C80801836C0625C36160618060C97F1
+:100A20001896E06C0101EA1C8080183AC063E0650A
+:100A30000100EA158080C098301CEA1C8080183ABA
+:100A4000C0421438F00517300A9CA1CCE01CFFFC12
+:100A5000E01CFFF8503CE9D5C003C0E8580BC0507B
+:100A6000300CCA9F661C18423FFB30DCFEB0FEE62D
+:100A7000049C66121842E0630008EA1300000A367C
+:100A8000E08200BB3FFB303CFEB0FED8661C184243
+:100A90000C99E019FF00F2CCFF00403AF40C0D4B2A
+:100AA0000A9CE01CFF0018395F2AF9D6C008C26012
+:100AB0000C98E018FFF8C058720C12AC720C12AC13
+:100AC0001039CFB3FDD6C003C190300C1336FA0CE9
+:100AD0000B062FFC1C3CCFB3588CC0620F39FA0CAC
+:100AE0000B092FFCCFAB109640391238C062400979
+:100AF0000CA940190CA9C0283011A39BEC0C1603BB
+:100B0000181B303C0E6C187CC040202CC0B0C1A813
+:100B1000169C580CC2700F0B0CAB0F0B0CAB201CAF
+:100B2000CF9B169C580CC1E0300B0F29FA0B0A1909
+:100B30002FFB584BCFB340090CA940190CA9201C1E
+:100B4000CF2B169CC0D8300B0F39FA0B0B092FFB9B
+:100B5000588BCFB340090CA940190CA9201C580C84
+:100B6000CF31F40C1518C240E20C1518C030089CA7
+:100B7000C098300CC0580F3BFA0C0B0B2FFC083CF4
+:100B8000CFB30A995804C061C108133BFA0C0B0B90
+:100B90002FFC588CCFB3400B0CAB401B0CABC05898
+:100BA000720C12AC720C12ACF9D9C008CFA1301C77
+:100BB000EA1C80801836FB3B001BFE92FF51580B4D
+:100BC000C070300B3FFCFEB0FED3661C18423FFBEA
+:100BD000301CFEB0FE33049C66121842402B1636C1
+:100BE000FE93FF4B5C360E06300CEA1C8080180624
+:100BF0000C971896C41B8712405C2FCDDC72000046
+:100C0000D401E06A0114EA1A000015895809C021CC
+:100C1000D80AE06A0108EA1A00007418700913C8BB
+:100C2000F00C1800CF6295297418700E1DB92FEEC4
+:100C3000FDD950005CC9202E5C791C09C048118E7A
+:100C40001C08952874281238CE42119E584ECF8128
+:100C500011AEFC0C1800CF4111BEFC0B1800CF01E7
+:100C6000DA0A0000D4211897300BCCBFC021D82A53
+:100C7000E06C0108EA1C0000781B761CF8070F8B5B
+:100C8000761C5D1CDA2A0000D4211897CBAFC02156
+:100C9000D82AE06C0108EA1C0000781B761CF807D3
+:100CA0000F8BF01B00005F1CD8220000D421E067EE
+:100CB0000108EA170000E0660114EA1600000D8C36
+:100CC000580CC0C03005C0580A9CCCDF2FF55C55CD
+:100CD0006E1C780B17CC1835CF85300CAC8CE06CC3
+:100CE0000100AE1CD82A0000D401E06B09A0EA1B69
+:100CF0000000969CF9DCC007FEB0FB70D80AD70351
+:100D0000800003D8D421E06709A0EA1700008E9B79
+:100D1000F3DBC008E06800DCEA180000E06A0404C5
+:100D2000EA1A8000F60C1608201CC060201CC0E0E7
+:100D3000201CC210D82A700C198B5D1A8EBC8EEB49
+:100D4000F60C1900C022AE6CDA2A700CF93B0011C7
+:100D50001639C025D82A701BF609033C19BB2FECA5
+:100D6000F9DB50005CCB5C7B202C5D1A302C6E2BA9
+:100D7000B69CCE5BE06C001CEA1C00005C5B167B42
+:100D8000C060201BC070201BC180D82A304B2E4C65
+:100D9000CD5B305BF8C9FFE03008F208070E5CCE8F
+:100DA000F8080016AC1E2FF81638CF853029F20B44
+:100DB000001BB88B5C5BCC2B30CBF8C9FFD8CEDBEB
+:100DC000D431E06609A0EA1600000D8CE06501143C
+:100DD000EA1500000B8BE0670108EA170000EDBC84
+:100DE0000007C4828CBAF4091510C021D83AF9DC86
+:100DF000C005E0640404EA148000580CC1A10D9CF5
+:100E0000187CC060206CC0C0202CC0C0D83A582AC2
+:100E1000C020D83A302BEECCFFFE5D14DA3AC73F43
+:100E2000D832581AC020D83A301B0A9C5D14DA3ADE
+:100E3000581CCDD10D9C58ACCDA1581AC020D83A21
+:100E4000F60C1518CFD08CA55C556E1C780B17CC02
+:100E50001835CF64300B0A9CCD4ECF206E1C781B0A
+:100E6000F605032C783B5D1BAE8C301B0E9C5D148D
+:100E7000DA3AF9DCC005E0640C88EA148000580C0A
+:100E8000C4F10D9C201CC140202CCB10202CC06034
+:100E9000202CCAD0202CC180D83A8CBC580CC02041
+:100EA000D83AE06C0CE8EA1C80008D4CDA3A8CBC35
+:100EB000580CC020D83A8C9C581CCFD18E9CE21C78
+:100EC000FDFFAE1CDA3A8CBC580CC020D83AFEB0FC
+:100ED000FA95CFD0E06300DCEA130000660CF93B22
+:100EE00000118C9CF80B1800CF23CE1E8C9CAA8C72
+:100EF0005C5CF80B1518C021DA3A661BF60C003B57
+:100F0000208B8F1B30066E1C780B17CC1836CF54F5
+:100F1000300B0C9C5D14CDB02FF65C56CF5B581C8B
+:100F2000FE91FF660D9C58BCFE91FF628CBC580C74
+:100F3000C030300CC0E8F60C1518CFC08CA55C553D
+:100F40008C975C570A9CC8FECF500E9B0A9C5D1480
+:100F50005C5CD832800003F8D421300CE06709A033
+:100F6000EA170000AE6C8F4C8F5C0F8CEDBC000755
+:100F7000C0528EBB580BC021D82AE21C0060C04171
+:100F8000C20FC020DA2A0F8CF9DCC005581CCF51E3
+:100F9000E06C0114EA1C0000198B580BCEE08EA601
+:100FA0005C56E0670108EA1700006E1C780B17CC4E
+:100FB0001836CE34E0650C00EA158000300B0C9C2E
+:100FC0005D15CDB06E1C781BF60603276E3C5D1CCC
+:100FD000F7DCC0080C9C5D15CD006E2C5D1CCD317E
+:100FE000D82A0000D401C65CE0A00392E0A003A2CE
+:100FF000E06B0118EA1B0000F76C0008DA0AD7035F
+:101000008000170C800017305EFD0000D421E065E1
+:1010100009A0EA1500000B8C189BE21B0060E04B56
+:101020000020C020D82A0B9BE0660404EA1680004A
+:10103000E0670118EA170000A98CC162202BC0F0FC
+:10104000201BC301E06C0140EA1C0000198B580B07
+:10105000C020C33D306B0E9C5D16DA2A6E6C580CB6
+:10106000C2105D1CD822201BC050203BC1B1C21C45
+:10107000DA2A6E7C580CC0A0300CE0A003ABE06C08
+:1010800010D0EA1C80008B4CDA2A340BE06C01444F
+:10109000EA1C00005D16E06C10E0EA1C80008B5C2E
+:1010A000DA2A30FCAE8C30ACAECCD82A5EFD000023
+:1010B000300CE06B0118EA1B0000B68C302AB6CA6F
+:1010C000E06A09A0EA1A0000955C954C977C5EFDE9
+:1010D000D401E06C0118EA1C0000787B5D1BD80A83
+:1010E000D431201DCE6FE0670118EA1700000E967C
+:1010F00030048F64301CE0A0036DE06A0984EA1AB2
+:101100000000EF3C000815831863E06C0144EA1C02
+:10111000000019A9E0650184EA150000E0681304E5
+:10112000EA188000E06000FF30A23031198E199B70
+:10113000F7EE108EE02E0100C0F0E02E0200C2D0CB
+:10114000201EC430E02E00FFC6F0203EC710E02E67
+:101150000200C7E0CAC8E60B1518C050AE81302C9B
+:10116000AECCCA586E5B580BC041AE81AEC2C9F856
+:101170002FEC5D18E080009CE06B08000A9CFEB03C
+:10118000F943E06C1CA0EA1C8000E06B09A0EA1B9C
+:101190000000975C301CC8C82FEC5D18E080008808
+:1011A0006E4C580CC041AE81AEC2C818E60C151882
+:1011B000C060E06C12F0EA1C8000C058E06C13487C
+:1011C000EA1C80008F6CCE7B2FEC5D18C7006E4C44
+:1011D000580CC041AE81AEC2C6A86E9C580CCDB0B2
+:1011E000E06B0800F80B0D445C74081C8F9C089A97
+:1011F0006E8B0A9C6E495D190A9CC0486E8B2FFB52
+:101200008F8B089BFE3400015C74F60A1510CE60CB
+:10121000193B003BCF40305CAE8CE06C1374EA1C91
+:1012200080008F6CCB8B0039C421C47CC418127928
+:10123000C0402019C070CAFBE06C1798EA1C8000FF
+:10124000C058E06C17B4EA1C80008F7CCA4B19BBF5
+:101250001279C0402019C200C9EB591BC055308C0F
+:10126000AE8CAEC2C248583BC080582BC060584BB1
+:10127000C040585B5F1CC028300CB48C2F47E06C1A
+:101280000064EA1C0000F80B0F8AB509AF281508A6
+:101290000EA88D84C80B300A500ABA8B19CBBA9BA2
+:1012A000400B6E3C183BCDC28F8BC75B300C2FFDC3
+:1012B000D832D703800017D0D421E0670118EA178D
+:1012C0000000E0A00243C070300CEF6C0008300B4F
+:1012D000302AC048301C309B304AAECAAE8BE06B1F
+:1012E0000140EA1B0000B68CDA2AD70380001748B9
+:1012F000E06C0118EA1C0000303BB88B302BB8CBF7
+:101300005EFD0000E06B0118EA1B00007689E6191B
+:10131000FFFF198AA96A1409199A120A978A149860
+:10132000E618FFFF19A9A969120819B91009763C36
+:101330001839C063308CB68C30ACB6CC5EFD122A46
+:101340002FFA979A5EFF0000D421E0670184EA1724
+:101350000000E0660118EA1600006C9A5C7A6C8B5B
+:101360000E9C6C495D196C9B5C7B0E9CFEB0F84C2E
+:10137000DA2A0000D401E06C0118EA1C0000788B26
+:10138000E06C0184EA1C0000F60A1608B88AB89BD3
+:10139000302BFEB0F839DA0A80000404E07B86A026
+:1013A000FE7A5814740918695E1D201BCFA15EFED9
+:1013B000580C5E1F498C780AA1AAEC5BBBA0C03216
+:1013C000300CC118E06CC6C0EA1C002D183BC032BE
+:1013D000301CC098E06C1200EA1C007A183B302CDC
+:1013E000F9BC0203E01AFFF9149B189A306CF9EA71
+:1013F000001A164AE1BC0000D303324BEA1BAA00D4
+:10140000FE795818930B484B970AB19C5E3DD50363
+:101410005EFDD703FFFF5824D401201DA36CFE7985
+:101420005824F20C0308FA0C0908109EE01EF0FF85
+:10143000A96BE21B0F001C4BB1ABFA0C090BE1BB13
+:101440000000D303F8C8FFDCEA18AA00FE7E581893
+:101450009D08FA0C030EF20C090EB19BC023D503B4
+:10146000F40C1518C060301CC9AFC0303FFCC02858
+:10147000300C2FFDD8020000D401202DA36CFE7A81
+:10148000581CF40C030BFA0C090B1699E019F0C563
+:10149000E419C0F0FB38001C302BF7E800181049A5
+:1014A000FB38000CFB3E000EF1EE1018FB3E000D69
+:1014B000F1EE1028338BF7E8003810494058A9683E
+:1014C000E2180F0010494048EE7B0000F7E80108E1
+:1014D00010494068B968E6183F001049FA0C09093C
+:1014E000E1BB0000D303F8C9FFE4EA19AA00FE78C3
+:1014F00058189109FA0C0308F40C0908B19BC02391
+:10150000D5032FEDD80A0000202DA36CFE7B581CBC
+:10151000F60C030AFA0C090A1499A1A9FA0C090994
+:10152000E1BA0000D303F8C9FFE4EA19AA00FE7883
+:1015300058189109FA0C0308F60C0908B19AC0234F
+:10154000D5032FED5EFD0000202DA36CFE7B581C03
+:10155000F60C030AFA0C090A1499A1C9FA0C090934
+:10156000E1BA0000D303F8C9FFE4EA19AA00FE7843
+:1015700058189109FA0C0308F60C0908B19AC0230F
+:10158000D5032FED5EFD0000FE7B5814580CC051B2
+:10159000760CA39C5E3DCFDB760CA58CCFE25EFD86
+:1015A000E07B86A0FE7A5860F40C002A740CA1CC73
+:1015B000950C740CA19C5E2D201BCFC15EFE00001B
+:1015C000D431169714953003F20616012016FE74D6
+:1015D0005860E80C0024680BA19BC0623013CE1F3A
+:1015E000C0373FFCD832B166E61600FF302CF9E573
+:1015F00000150C45A967E2170F000A478907581321
+:10160000C041680CA1AC890CD83A0000D401300963
+:101610003008EA188000100CFEB0F9DCD80A00008F
+:10162000D4211897F40C1510C040FEB0F92FAE8CE1
+:10163000D82AD70380000888D401F40C1510C060A4
+:10164000178C580CC030FEB0F927D80A80000894D7
+:10165000D421189516971496C0680E9CFEB0F948D0
+:101660002FF70ACC0C9CFE360001F80B1510CF6149
+:10167000D82AD703800008ECD42118961695149721
+:10168000C0680B3B0C9CFEB0F95D2FF60E9CFE373C
+:101690000001F80B1510CF61D82AD703800009404C
+:1016A000E0690018EA190000F60B001B16091898EB
+:1016B000580A5E0D133B201A10CBCFD15EFD0000FF
+:1016C000E0690100EA190000F20B00291898580A95
+:1016D0005E0D133B201A10CBCFD15EFD3009EA1905
+:1016E0008080120B1898580A5E0D1739201A10C9FD
+:1016F000CFD15EFDD40130193008EA188080100C7B
+:10170000FEB0F968D80AD703800009D0E5BC000014
+:10171000E06B0100EA1B0000F80A1601B68AF80A1D
+:101720001614B69AF80A160CB6AABD8CB6BC5EFDA5
+:10173000D401201D301A300B1A9CC73F1B8B580B4D
+:101740005F1C2FFDD8020000D421E0670104EA17D6
+:1017500000008E8C580CC071FEB0F82CAE0C300C12
+:10176000FEB0F8B4E0660080C0D85806C0F0FE3C79
+:101770000001AE0C300B5C7CFEB0F8FAFE36FF01C7
+:101780005C568E8C580CCF21DA2AD82A800007B0FC
+:10179000800008C88000096CD303FE7C1C00E06B4D
+:1017A0000A03EA1B5501990BE06B0A03EA1BAA0125
+:1017B000990BC008D401FEB0F5C3E0A000B9FEB09B
+:1017C000F48FD80A8000033C8000192C800000DCD4
+:1017D000D401201D300BE06A00FCEA1A80807409F5
+:1017E000A9D9F3EC109C500C318C4009F20C0A4A38
+:1017F0005C5A145BA96B5C7B308AEDBB000FC04266
+:10180000EC1B83805C7BA17B5C7B201ACF71A98B56
+:10181000208CCEC1129AE01AFF00144B500B304AB4
+:101820001A9BE06C00FCC67F2FFDD80AD42120ADA6
+:10183000E0671B00EA1700B70E9B300CFEB0FDBA44
+:10184000301A306B300CFEB0FDE90E9CFEB0F7CACA
+:10185000E0671D00EA178000301C5D173009300A70
+:10186000300BFE7C1800E0A001BDC021C008FE7C4A
+:101870001800E0A001C7E0A0009B4AAB161CC040C6
+:10188000161CC040C058305CC048302CC028303CCA
+:10189000300BFB6B002433FA508A507B506C301CA9
+:1018A000FB6C0016FB6B0015FB6C0014FACCFFEC14
+:1018B0001A9B3149190A16AA2049CFD1300CFEB023
+:1018C000FDDD300CFEB0FE22300CFEB0FE5FE066A7
+:1018D00007CCEA168000301C5D16302C5D17E067DF
+:1018E0001C24EA178000301B300C5D17301B301CA5
+:1018F0005D17301B303C5D17301B302C5D17300CF2
+:101900005D162F6DD82AD703800013B080001418FD
+:10191000800007E080001BE080001C00800019AC04
+:10192000007A12008000150880001588D42120ADAF
+:10193000E06707CCEA178000301C5D17E0661C24C6
+:10194000EA168000300B300C5D16300B301C5D1633
+:10195000300B303C5D16300B302C5D16300CE0A0A7
+:1019600001D1300C5D17300CFEB0FDF0300CFB6C7B
+:101970000024508C507C506CFB6C0016FB6C0015E6
+:10198000FB6C0014FACCFFEC1A9B3149190A16AA19
+:101990002049CFD1300CFEB0FD712F6DD82AD7036E
+:1019A00080001D008000154880001478D431205D2F
+:1019B000FACCFFF8E06B1DF4EA1B8000B709B928E8
+:1019C000170818A83FF73FF4E0661D84EA16800068
+:1019D0005D16E0A001CF501CE0651D98EA1580005F
+:1019E0005D15E0A001DF18905D165D153003300530
+:1019F0003006C2181830C1F4401B0A3BC1C416158A
+:101A0000F8000106EC0B141FE072D330EC0206481C
+:101A1000F6020349109A129B0A98EA09141FE0A0E3
+:101A200001591493580AC070400C141C5C4CE04CD3
+:101A30002711C12550030A920C91E0A0019B189533
+:101A4000E0A001B018960435C035023CCD445803DF
+:101A5000C031300CC178300CFACAFFF8F40C032BFB
+:101A6000062B083BF6041730F80717302FFC583CBC
+:101A7000CF435BF7E60C1700C050FACBFFF8F60730
+:101A8000032C2FBDD832D70380001CD080001D70DE
+:101A900080001DA0D4211897169630053004C07818
+:101AA0000F9B0F8CC08C18452FE72FF40C34CF936D
+:101AB0000A9CD822FE792800F80A1605A97A120A8B
+:101AC0003019F9DCC005F20C0949167BC100201B56
+:101AD000C130201BC130201BC140201BC150201B26
+:101AE000C170201BC170201BC1905EFF956995A934
+:101AF00095E995295EFD9559CFBB95699599CF9B41
+:101B000095599599CF6B956995A995D9CF3B9559DD
+:101B1000CFCB9569959995D9CEDB95599599CF6B92
+:101B2000EBCD40FEE06C1ED4EA1C8000E06E1EECA3
+:101B3000EA1E8000300A300B190719061905EFE676
+:101B40001003E7D3C002C1C1EA041603C1900C37E9
+:101B5000C090AF092014AD28CFD1EBD5C003C1216F
+:101B6000C0B82014AD2ACFE1EBD5C003C05030027D
+:101B700020150CC2CFD11C3CCE03E3CF80FE0C3726
+:101B8000CF700F3120150CC1CEBB0000D401303B0B
+:101B9000E06C1ECCEA1C8000FEB0FF7ED503FEB0D8
+:101BA000FE47FEB0F375FEB0F371C031FEB0F3DC5A
+:101BB000C008D70380001A948000182C8000028C83
+:101BC00080000288D401F80B1518C040FEB0F3CC99
+:101BD000D80AFEB0F3F7D80A80000364800003C07F
+:101BE000D4017828BD98CFE3A96BA1ABF94B004095
+:101BF000B16A990A782BB99BCFE3129BC0CCDA0A61
+:101C0000782BB99BCFE3780BA1AB990B782BB99BC1
+:101C1000CFE35EFD782AB99ACFE3991B782BB99B65
+:101C2000CFE35EFDD401FE791404720AFE7914D468
+:101C30007208A788CFC2E1B90000D3033048F00C86
+:101C40000028EA18AA00FE7E14589D08E01AFFF842
+:101C5000F7DBC003144BA7BBFE7A1404F40C092B6A
+:101C6000B199C023D503D80AD4013009300A303BDA
+:101C7000303CFEB0FCA7303CE0A00070D80AD7038F
+:101C800080001D58D401300CFE7B586C970C300935
+:101C9000300A303B303CFEB0FC95D80A800015C0BD
+:101CA000D401E0690118EA190000728C729A5C7A1A
+:101CB000E06B0184EA1B0000F1DCC006100B7258D7
+:101CC0005D18300CE06B09A0EA1B0000975CDA0A93
+:101CD000EBCD4080340C3007300EA17A5CFB5CFE0B
+:101CE0005CF7103EF2071300C053101EEE090147C7
+:101CF000A1AA201CCF310E991C98E3CD8080000052
+:101D0000E1BB0000D303300AEA1AAA00FE79145896
+:101D1000930AFE7A1400950CB19B5E3DD5035EFDDF
+:101D2000E0690000EA198000121CF9DCC00EF9EA33
+:101D300011ECFE7A1000A59BF40B092C5EFD00004F
+:101D40003009EA198000120B1898580A5E0D1739ED
+:101D5000201A10C9CFD15EFDFE7B5860F60C002B17
+:101D6000760CA19C5E3D760CA1AC970C5EFD00004C
+:101D7000D401FE7C1800E0A00019A17CD802D70392
+:101D800080001DA8D401300BFE7C1800FEB0FF447B
+:101D9000D80AD70380001C14300CE3BC00425EFD5F
+:101DA000E1BC00425EFC0000781B5EFB00001000FE
+:101DB0000000200000004000000080000000C00083
+:101DC000000100000001800000020000000300008C
+:101DD000000400000006000000080000000C0000E5
+:101DE00000100000002000000000000000000000C3
+:101DF00000000000007A120000B71B0000F424006D
+:101E00000002000080001D408000160C0000000051
+:101E1000000000000000000000000001800016200B
+:101E200080001638000000208000165080001678D0
+:101E300000000003800016A0000000000000000465
+:101E4000800016C00000000000000100800016DCC9
+:101E5000800016F4000000000000000000000000F8
+:101E60000000000000000000000000000000000072
+:101E70000000000000000000000000000000000062
+:101E80000000000000000000000000000000000052
+:101E90000000000000000000000000000000000042
+:101EA0000000000000000000000000000000000032
+:101EB0000000000000000000000000000000000022
+:101EC0000000000000000000000000002E002F00B5
+:101ED0003000000080001EF000000008000000DC60
+:0C1EE00000000100000001000000092AC1
+:101EF0008000082C0000000000000001000000002D
+:101F000011000000000300000000000000000000BD
+:101F100000000000000000000000000000000000C1
+:101F20000403090441544D454C000000444655202B
+:101F300041543332554333440000000080000FE425
+:101F4000800010088000100C800010AC80001E0083
+:101F500080001E0C80001E1880001E2480001E3091
+:101F600080001E3C80001E4880001E5480001E60C1
+:101F700080001E6C80001E7880001E8480001E90F1
+:101F800080001E9C80001EA880001EB480001EC021
+:101F90001201000200000040EB03E92F01010102E1
+:101FA0000001000009021200010100C03209040012
+:101FB000000000000000000000000054000000BC11
+:0C1FC000000000D0000000A8000000D4C9
+:040000058000000077
+:00000001FF
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.1/at32uc3d-isp_cfg-1.1.1.dat b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.1/at32uc3d-isp_cfg-1.1.1.dat
new file mode 100644
index 0000000..34a3dba
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.1/at32uc3d-isp_cfg-1.1.1.dat
@@ -0,0 +1 @@
+’ž káÿ× \ No newline at end of file
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.1/avr32.7z b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.1/avr32.7z
new file mode 100644
index 0000000..25113a9
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.1/avr32.7z
Binary files differ
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.1/program_at32uc3d-isp-1.1.1.cmd b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.1/program_at32uc3d-isp-1.1.1.cmd
new file mode 100644
index 0000000..77f7e00
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.1/program_at32uc3d-isp-1.1.1.cmd
@@ -0,0 +1,82 @@
+@echo off
+setlocal enableextensions enabledelayedexpansion
+
+: This command script programs the ISP (flash array), the ISP
+: configuration word (User page) and the general-purpose fuse bits.
+
+: Copyright (C) 2006-2008, Atmel Corporation All rights reserved.
+:
+: Redistribution and use in source and binary forms, with or without
+: modification, are permitted provided that the following conditions are met:
+:
+: 1. Redistributions of source code must retain the above copyright notice, this
+: list of conditions and the following disclaimer.
+:
+: 2. Redistributions in binary form must reproduce the above copyright notice,
+: this list of conditions and the following disclaimer in the documentation and/
+: or other materials provided with the distribution.
+:
+: 3. The name of ATMEL may not be used to endorse or promote products derived
+: from this software without specific prior written permission.
+:
+: THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED
+: WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND
+: SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,
+: INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+: BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+: DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+: OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+: NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+: EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+echo.
+echo Performing a JTAG Chip Erase command.
+avr32program -p AVRONE chiperase -F
+if ERRORLEVEL 1 (
+ color 47
+ pause
+ exit
+)
+
+echo.
+echo Programming MCU memory from `at32uc3d-isp-1.1.1.hex'.
+avr32-objcopy -I ihex -O binary at32uc3d-isp-1.1.1.hex at32uc3d-isp-1.1.1.bin
+avr32program -p AVRONE program -finternal@0x80000000 -cint -e -v -O0x80000000 -Fbin at32uc3d-isp-1.1.1.bin
+if ERRORLEVEL 1 (
+ color 47
+ pause
+ exit
+)
+del at32uc3d-isp-1.1.1.bin
+
+echo.
+echo Programming ISP configuration word \(default for UC3D_EK i.e. Word2 == 0x929E0D6B and Word1 == 0xE11EFFD7\)
+avr32program -p AVRONE program -finternal@0x80000000 -cint -e -v -O0x808000F8 -Fbin at32uc3d-isp_cfg-1.1.1.dat
+if ERRORLEVEL 1 (
+ color 47
+ pause
+ exit
+)
+
+echo.
+echo Programming general-purpose fuse bits.
+avr32program -p AVRONE writefuses -finternal@0x80000000 gp=0xFFF5FFFF
+if ERRORLEVEL 1 (
+ color 47
+ pause
+ exit
+)
+
+echo.
+echo Resetting MCU.
+avr32program -p AVRONE run -R
+if ERRORLEVEL 1 (
+ color 47
+ pause
+ exit
+)
+
+color 27
+pause
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.1/program_at32uc3d-isp-1.1.1.sh b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.1/program_at32uc3d-isp-1.1.1.sh
new file mode 100644
index 0000000..811afdc
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.1/program_at32uc3d-isp-1.1.1.sh
@@ -0,0 +1,59 @@
+#!/bin/sh
+
+# This shell script programs the ISP (flash array), the ISP configuration words
+# (User page) and the general-purpose fuse bits.
+
+# Copyright (c) 2009 Atmel Corporation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice, this
+# list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# 3. The name of Atmel may not be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# 4. This software may only be redistributed and used in connection with an Atmel
+# AVR product.
+#
+# THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+# EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+#
+
+
+echo
+echo Performing a JTAG Chip Erase command.
+avr32program chiperase
+
+echo
+echo Programming MCU memory from \`at32uc3c-isp-H.hex\'.
+avr32-objcopy -I ihex -O binary at32uc3d-isp-1.1.1.hex at32uc3d-isp-1.1.1.bin
+avr32program program -finternal@0x80000000,128Kb -cint -e -v -O0x80000000 -Fbin at32uc3d-isp-1.1.1.bin
+rm -f at32uc3d-isp-1.1.1.bin
+
+echo
+echo Programming ISP configuration words \(default for EVK1101 i.e. Word2 == 0x929E0D6b and Word1 == 0xE11EFFD7\)
+avr32program program -finternal@0x80000000 -cint -e -v -O0x808000F8 -Fbin at32uc3d-isp_cfg-1.1.1.dat
+
+echo
+echo Programming general-purpose fuse bits.
+avr32program writefuses -finternal@0x80000000 gp=0xFFF7FFFF
+
+echo
+echo Resetting MCU.
+avr32program reset
+
+pause
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.2/Readme.txt b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.2/Readme.txt
new file mode 100644
index 0000000..c46cc52
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.2/Readme.txt
@@ -0,0 +1,595 @@
+avr32.7z is header package used to compile at32uc3d-isp-1.1.2.hex project on IAR
+
+IAR Assembler for Atmel AVR32
+3.31.1 (3.31.1.40059)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\bin\aavr32.exe
+05/11/2010 10:20:02, 4440064 bytes
+
+IAR C/C++ Compiler for Atmel AVR32
+3.31.1 (3.31.1.40059)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\bin\iccavr32.exe
+05/11/2010 10:22:16, 9531392 bytes
+
+IAR Java to C converter for Atmel AVR32
+3.31.1 (3.31.1.40059)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\bin\javatoc.exe
+05/11/2010 10:19:04, 163840 bytes
+
+IAR Library Builder
+4.61S (4.61.19.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\bin\xar.exe
+08/12/2009 17:48:46, 163840 bytes
+
+IAR XLIB
+4.61S/386 (4.61.19.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\bin\xlib.exe
+08/12/2009 17:49:48, 532480 bytes
+
+IAR XLINK
+4.61S (4.61.19.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\bin\xlink.exe
+08/12/2009 19:05:14, 2326528 bytes
+
+WDREG Installation Utility 10.10
+10.10 (10.1.0.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\drivers\Jungo\win32\wdreg.exe
+04/11/2010 18:09:20, 286720 bytes
+
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\drivers\Jungo\wow64\system64.exe
+04/11/2010 18:09:20, 45568 bytes
+
+WDREG Installation Utility 10.10
+10.10 (10.1.0.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\drivers\Jungo\wow64\wdreg.exe
+04/11/2010 18:09:20, 145920 bytes
+
+IAR CSpyBat
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\CSpyBat.exe
+14/09/2010 01:34:10, 757760 bytes
+
+IAR Build Utility
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\IarBuild.exe
+14/09/2010 01:32:54, 106496 bytes
+
+IAR Embedded Workbench IDE
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\IarIdePm.exe
+14/09/2010 01:32:34, 487424 bytes
+
+IAR C-SPY AVR ONE! Driver for Atmel AVR32
+3.30.2/W32 [Beta] [Beta] (3.30.2.9999)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\bin\avr32avrone.dll
+14/10/2010 13:04:46, 2965504 bytes
+
+IAR C-SPY Batch Library Support Plug-in for Atmel AVR32
+3.31.1 (3.31.1.40059)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\bin\avr32bat.dll
+05/11/2010 10:18:14, 503808 bytes
+
+IAR C-SPY JTAGICE mkII Driver for Atmel AVR32
+3.30.2/W32 [Beta] [Beta] (3.30.2.9999)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\bin\avr32jtagicemkII.dll
+14/10/2010 13:02:48, 2945024 bytes
+
+IAR C-SPY Library Support Plug-in for Atmel AVR32
+3.31.1 (3.31.1.40059)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\bin\avr32LibSupport.dll
+05/11/2010 10:20:06, 602112 bytes
+
+IAR LibSupport Plug-in Language Specific Resources
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\bin\avr32LibSupport.ENU.dll
+14/09/2010 01:26:30, 10240 bytes
+
+IAR C-SPY Processor Descriptor for Atmel AVR32
+3.31.1 (3.31.1.40059)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\bin\avr32proc.dll
+05/11/2010 10:18:02, 1814528 bytes
+
+IAR C-SPY Simulator Driver for Atmel AVR32
+3.31.1 (3.31.1.40059)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\bin\avr32sim.dll
+05/11/2010 10:21:10, 2678784 bytes
+
+IAR Workbench Target Descriptor for Atmel AVR32
+3.31.1 (3.31.1.40059)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\bin\swtdavr32.dll
+05/11/2010 10:17:40, 933888 bytes
+
+IAR Workbench Target Descriptor, AVR ONE!, for Atmel AVR32
+3.31.1 (3.31.1.40059)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\bin\swtdavr32avrone.dll
+05/11/2010 10:17:32, 671744 bytes
+
+IAR Workbench Target Descriptor, JTAGICE mkII, for Atmel AVR32
+3.31.1 (3.31.1.40059)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\bin\swtdavr32jtagicemkII.dll
+05/11/2010 10:18:12, 675840 bytes
+
+IAR Workbench Target Descriptor, Simulator for Atmel AVR32
+3.31.1 (3.31.1.40059)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\bin\swtdavr32sim.dll
+05/11/2010 10:19:00, 434176 bytes
+
+wdapi 10.10
+10.10 (10.1.0.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\bin\win32\wdapi1010.dll
+04/11/2010 18:09:20, 143360 bytes
+
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\bin\win32\WinDriverStub.dll
+04/11/2010 18:09:20, 8192 bytes
+
+wdapi 10.10
+10.10 (10.1.0.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\bin\wow64\wdapi1010.dll
+04/11/2010 18:09:20, 143360 bytes
+
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\bin\wow64\WinDriverStub.dll
+04/11/2010 18:09:20, 8192 bytes
+
+Driver Install Frameworks for API library module
+2.1 (2.1.0.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\drivers\Jungo\win32\difxapi.dll
+04/11/2010 18:09:20, 319456 bytes
+
+µC/OS-II KA Plug-in for C-SPY DLL
+2.50 2007-09-10 (2.5.0.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.dll
+05/11/2010 09:34:42, 471040 bytes
+
+IAR STK600 Plug-in
+1.0.3.0 (1.0.3.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\avr32\plugins\Stk600Plugin\Stk600Plugin.dll
+04/11/2010 18:09:34, 471040 bytes
+
+IAR CSpyBat Language Specific Resources
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\CSpyBat.ENU.dll
+14/09/2010 01:26:24, 5632 bytes
+
+IAR C-SPY Debugger GUI
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\DebuggerGui.dll
+14/09/2010 01:40:00, 1937408 bytes
+
+IAR C-SPY Debugger GUI Language Specific Resources
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\DebuggerGui.ENU.dll
+14/09/2010 01:26:28, 69632 bytes
+
+IAR Find In Files
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\FindInFiles.dll
+14/09/2010 01:31:08, 352256 bytes
+
+IAR Find In Files Language Specific Resources
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\FindInFiles.ENU.dll
+14/09/2010 01:26:28, 4608 bytes
+
+IAR Build Utility Language Specific Resources
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\IarBuild.ENU.dll
+14/09/2010 01:26:28, 3072 bytes
+
+IAR Embedded Workbench IDE Language Specific Resources
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\IarIdePm.ENU.dll
+14/09/2010 01:26:26, 479232 bytes
+
+IAR IDE Framework
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\IdeFramework.dll
+14/09/2010 01:27:02, 1056768 bytes
+
+IAR IDE Framework Language Specific Resources
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\IdeFramework.ENU.dll
+14/09/2010 01:26:32, 4096 bytes
+
+IAR C-SPY Debugger Kernel
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\kernel.dll
+14/09/2010 01:35:32, 2580480 bytes
+
+IAR C-SPY Debugger Kernel Language Specific Resources
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\kernel.ENU.dll
+14/09/2010 01:26:32, 13824 bytes
+
+IAR Log Window
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\LogWindow.dll
+14/09/2010 01:30:24, 274432 bytes
+
+IAR Log Window Language Specific Resources
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\LogWindow.ENU.dll
+14/09/2010 01:26:26, 10240 bytes
+
+IAR Project Manager Engine
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\ProjectManagerEngine.dll
+14/09/2010 01:31:36, 1355776 bytes
+
+IAR Project Manager Engine Language Specific Resources
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\ProjectManagerEngine.ENU.dll
+14/09/2010 01:26:22, 12800 bytes
+
+IAR Project Manager Gui
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\ProjectManagerGui.dll
+14/09/2010 01:38:56, 872448 bytes
+
+IAR Project Manager Gui Language Specific Resources
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\ProjectManagerGui.ENU.dll
+14/09/2010 01:26:20, 163840 bytes
+
+IAR Text Editor
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\TextEditor.dll
+14/09/2010 01:33:00, 806912 bytes
+
+IAR Text Editor Language Specific Resources
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\TextEditor.ENU.dll
+14/09/2010 01:26:14, 32768 bytes
+
+Shared Library for Xerces-C Version 1.5.1
+1, 5, 1 (1.5.1.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\xerces-c_1_5_1.dll
+14/09/2010 00:37:18, 1257472 bytes
+
+IAR XmlLib
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\bin\XmlLib.dll
+14/09/2010 01:23:06, 102400 bytes
+
+IAR Code Coverage Plug-in
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\plugins\CodeCoverage\CodeCoverage.dll
+14/09/2010 01:33:46, 507904 bytes
+
+IAR Code Coverage Plug-in Language Specific Resources
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\plugins\CodeCoverage\CodeCoverage.ENU.dll
+14/09/2010 01:26:30, 10752 bytes
+
+IAR ORTI RTOS Plug-in
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\plugins\Orti\Orti.dll
+14/09/2010 01:36:12, 647168 bytes
+
+IAR ORTI RTOS Plug-in Language Specific Resources
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\plugins\Orti\Orti.ENU.dll
+14/09/2010 01:26:24, 8704 bytes
+
+IAR Profiling Plug-in
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\plugins\Profiling\Profiling.dll
+14/09/2010 01:30:04, 507904 bytes
+
+IAR Profiling Plug-in Language Specific Resources
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\plugins\Profiling\Profiling.ENU.dll
+14/09/2010 01:26:22, 9728 bytes
+
+IAR Stack Plug-in
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\plugins\Stack\Stack.dll
+14/09/2010 01:29:08, 536576 bytes
+
+IAR Stack Plug-in Language Specific Resources
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\plugins\Stack\Stack.ENU.dll
+14/09/2010 01:26:18, 7680 bytes
+
+IAR Symbols Plug-in
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\plugins\SymList\SymList.dll
+14/09/2010 01:28:54, 487424 bytes
+
+IAR Symbols Plug-in Language Specific Resources
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\common\plugins\SymList\SymList.ENU.dll
+14/09/2010 01:26:16, 3072 bytes
+
+Metadata dll for package 'avr32_asm_lib_all'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_asm_lib_all.dll
+09/11/2010 09:37:26, 94208 bytes
+
+Metadata dll for package 'avr32_asm_lib_src'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_asm_lib_src.dll
+09/11/2010 09:37:34, 94208 bytes
+
+Metadata dll for package 'avr32_atmel_include_files_generated_all'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_atmel_include_files_generated_all.dll
+09/11/2010 09:37:46, 118784 bytes
+
+Metadata dll for package 'avr32_autorun_release'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_autorun_release.dll
+09/11/2010 09:37:30, 90112 bytes
+
+Metadata dll for package 'avr32_bin_release'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_bin_release.dll
+09/11/2010 09:37:14, 94208 bytes
+
+Metadata dll for package 'avr32_bin_release_cs'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_bin_release_cs.dll
+09/11/2010 09:37:34, 90112 bytes
+
+Metadata dll for package 'avr32_compiler_support_all'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_compiler_support_all.dll
+09/11/2010 09:37:40, 90112 bytes
+
+Metadata dll for package 'avr32_created_infocenter_enu_all'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_created_infocenter_enu_all.dll
+09/11/2010 09:37:16, 94208 bytes
+
+Metadata dll for package 'avr32_cspy_release'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_cspy_release.dll
+09/11/2010 09:37:24, 90112 bytes
+
+Metadata dll for package 'avr32_devices_all'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_devices_all.dll
+09/11/2010 09:37:46, 94208 bytes
+
+Metadata dll for package 'avr32_dlib_extra_all'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_dlib_extra_all.dll
+09/11/2010 09:37:30, 98304 bytes
+
+Metadata dll for package 'avr32_dlib_extra_src'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_dlib_extra_src.dll
+09/11/2010 09:37:36, 98304 bytes
+
+Metadata dll for package 'avr32_dlib_generated_all'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_dlib_generated_all.dll
+09/11/2010 09:37:26, 102400 bytes
+
+Metadata dll for package 'avr32_dlib_generated_src'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_dlib_generated_src.dll
+09/11/2010 09:37:32, 159744 bytes
+
+Metadata dll for package 'avr32_doc_all'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_doc_all.dll
+09/11/2010 09:37:16, 94208 bytes
+
+Metadata dll for package 'avr32_ew_release'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_ew_release.dll
+09/11/2010 09:37:36, 90112 bytes
+
+Metadata dll for package 'avr32_hlp_all'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_hlp_all.dll
+09/11/2010 09:37:26, 90112 bytes
+
+Metadata dll for package 'avr32_iar_device_files_generated_all'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_iar_device_files_generated_all.dll
+09/11/2010 09:37:38, 110592 bytes
+
+Metadata dll for package 'avr32_infocenter_templates_all'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_infocenter_templates_all.dll
+09/11/2010 09:37:20, 98304 bytes
+
+Metadata dll for package 'avr32_installer_release'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_installer_release.dll
+09/11/2010 09:37:22, 90112 bytes
+
+Metadata dll for package 'avr32_lib_tools_src'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_lib_tools_src.dll
+09/11/2010 09:37:22, 98304 bytes
+
+Metadata dll for package 'avr32_qscards_all'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_qscards_all.dll
+09/11/2010 09:37:12, 90112 bytes
+
+Metadata dll for package 'avr32_rtlib_release'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_rtlib_release.dll
+09/11/2010 09:37:16, 102400 bytes
+
+Metadata dll for package 'avr32_send_all'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_send_all.dll
+09/11/2010 09:37:20, 102400 bytes
+
+Metadata dll for package 'avr32_stk600_driver_release'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_stk600_driver_release.dll
+09/11/2010 09:37:24, 90112 bytes
+
+Metadata dll for package 'avr32_stk600_plugin_release'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_stk600_plugin_release.dll
+09/11/2010 09:37:10, 90112 bytes
+
+Metadata dll for package 'avr32_windriver_all'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_windriver_all.dll
+09/11/2010 09:37:34, 94208 bytes
+
+Metadata dll for package 'avr32_xlink_all'
+3.31.2 (3.31.2.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\avr32_xlink_all.dll
+09/11/2010 09:37:44, 94208 bytes
+
+Metadata dll for package 'common_vcredistx86_2005_sp1_atl_all'
+6.0.2900.2180 (6.0.2900.2180)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\common_vcredistx86_2005_sp1_atl_all.dll
+09/11/2010 09:37:12, 90112 bytes
+
+Metadata dll for package 'common_vcredistx86_2008_sp1_atl_all'
+9.0.30729.4148 (9.0.30729.4148)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\common_vcredistx86_2008_sp1_atl_all.dll
+09/11/2010 09:37:36, 90112 bytes
+
+Metadata dll for package 'common_vcredistx86_export_all'
+1.0.0.0 (1.0.0.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\common_vcredistx86_export_all.dll
+09/11/2010 09:37:22, 90112 bytes
+
+Metadata dll for package 'IDE_CodeCoverageRelease_plugin'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_CodeCoverageRelease_plugin.dll
+09/11/2010 09:37:48, 90112 bytes
+
+Metadata dll for package 'IDE_CSpyBatRelease_exe_langdll'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_CSpyBatRelease_exe_langdll.dll
+09/11/2010 09:37:24, 90112 bytes
+
+Metadata dll for package 'IDE_DebuggerGuiRelease_dll_langdll'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_DebuggerGuiRelease_dll_langdll.dll
+09/11/2010 09:37:40, 90112 bytes
+
+Metadata dll for package 'IDE_FindInFilesRelease_dll_langdll'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_FindInFilesRelease_dll_langdll.dll
+09/11/2010 09:37:44, 90112 bytes
+
+Metadata dll for package 'IDE_IarBuildRelease_exe_langdll'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_IarBuildRelease_exe_langdll.dll
+09/11/2010 09:37:38, 90112 bytes
+
+Metadata dll for package 'IDE_IarIdePmRelease_exe_langdll'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_IarIdePmRelease_exe_langdll.dll
+09/11/2010 09:37:26, 90112 bytes
+
+Metadata dll for package 'IDE_IdeFrameworkRelease_dll_langdll'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_IdeFrameworkRelease_dll_langdll.dll
+09/11/2010 09:37:28, 90112 bytes
+
+Metadata dll for package 'IDE_kernelRelease_dll_langdll'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_kernelRelease_dll_langdll.dll
+09/11/2010 09:37:48, 90112 bytes
+
+Metadata dll for package 'IDE_LibSupportRelease_dll_langdll'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_LibSupportRelease_dll_langdll.dll
+09/11/2010 09:37:28, 90112 bytes
+
+Metadata dll for package 'IDE_LogWindowRelease_dll_langdll'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_LogWindowRelease_dll_langdll.dll
+09/11/2010 09:37:28, 90112 bytes
+
+Metadata dll for package 'IDE_MiscRelease_misc'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_MiscRelease_misc.dll
+09/11/2010 09:37:40, 90112 bytes
+
+Metadata dll for package 'IDE_OrtiRelease_plugin'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_OrtiRelease_plugin.dll
+09/11/2010 09:37:20, 90112 bytes
+
+Metadata dll for package 'IDE_PlatformPackagesRelease_delivery'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_PlatformPackagesRelease_delivery.dll
+09/11/2010 09:37:18, 90112 bytes
+
+Metadata dll for package 'IDE_Platform_release'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_Platform_release.dll
+09/11/2010 09:37:30, 90112 bytes
+
+Metadata dll for package 'IDE_ProfilingRelease_plugin'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_ProfilingRelease_plugin.dll
+09/11/2010 09:37:48, 90112 bytes
+
+Metadata dll for package 'IDE_ProjectManagerEngineRelease_dll_langdll'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_ProjectManagerEngineRelease_dll_langdll.dll
+09/11/2010 09:37:32, 90112 bytes
+
+Metadata dll for package 'IDE_ProjectManagerGuiRelease_dll_langdll'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_ProjectManagerGuiRelease_dll_langdll.dll
+09/11/2010 09:37:32, 90112 bytes
+
+Metadata dll for package 'IDE_SelfTestRelease_dll_langdll'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_SelfTestRelease_dll_langdll.dll
+09/11/2010 09:37:42, 90112 bytes
+
+Metadata dll for package 'IDE_StackRelease_plugin'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_StackRelease_plugin.dll
+09/11/2010 09:37:18, 90112 bytes
+
+Metadata dll for package 'IDE_SymListRelease_plugin'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_SymListRelease_plugin.dll
+09/11/2010 09:37:42, 90112 bytes
+
+Metadata dll for package 'IDE_TextEditorRelease_dll_langdll'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_TextEditorRelease_dll_langdll.dll
+09/11/2010 09:37:44, 90112 bytes
+
+Metadata dll for package 'IDE_XercesXMLRelease_dll_langdll'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_XercesXMLRelease_dll_langdll.dll
+09/11/2010 09:37:22, 90112 bytes
+
+Metadata dll for package 'IDE_XmlLibRelease_dll'
+5.6.4.1675 (5.6.4.1675)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\IDE_XmlLibRelease_dll.dll
+09/11/2010 09:37:42, 90112 bytes
+
+Metadata dll for package 'lms_init_media'
+1.0.0 (1.0.0.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\lms_init_media.dll
+09/11/2010 09:37:18, 90112 bytes
+
+Metadata dll for package 'lms_init_release'
+1.0.0 (1.0.0.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\lms_init_release.dll
+09/11/2010 09:37:30, 90112 bytes
+
+Metadata dll for package 'lms_license_support_release'
+1.0.1 (1.0.1.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\lms_license_support_release.dll
+09/11/2010 09:37:12, 90112 bytes
+
+Metadata dll for package 'lms_safenet_dongle_drivers_media'
+7.5.0 (7.5.0.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\lms_safenet_dongle_drivers_media.dll
+09/11/2010 09:37:44, 90112 bytes
+
+Metadata dll for package 'lms_utilities_release'
+1.1.1 (1.1.1.0)
+C:\Program Files\IAR Systems\Embedded Workbench 5.6\install-info\lms_utilities_release.dll
+09/11/2010 09:37:40, 94208 bytes \ No newline at end of file
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.2/at32uc3d-isp-1.1.2.bin b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.2/at32uc3d-isp-1.1.2.bin
new file mode 100644
index 0000000..6c52313
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.2/at32uc3d-isp-1.1.2.bin
Binary files differ
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.2/at32uc3d-isp-1.1.2.hex b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.2/at32uc3d-isp-1.1.2.hex
new file mode 100644
index 0000000..3929490
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.2/at32uc3d-isp-1.1.2.hex
@@ -0,0 +1,503 @@
+:0200000480007A
+:10000000E1B80000F1D8C2C35818C0A0FEC8FFEE86
+:100010003009EA190061E06D0DB4D041D603300813
+:10002000FE791C00E06A00FCEA1A8080FE7B140066
+:100030007000E061504BEA1149537402E06301071C
+:100040000494C78CC141E7D2C210E043E11EC0F165
+:10005000EDB20009C0C3F6F30180E0642317087312
+:10006000C131EDB30003C3830230C3C1C54C91015C
+:10007000E06D0DCCD353FEC00076E3B00001E0A0EC
+:100080000D4BE0A00D7FEDB20008C262E06A00F8FF
+:10009000EA1A80807402E06301070494C4BCCE7144
+:1000A000E7D2C22FE043494FCE21E7D2C108E04357
+:1000B0000033CDD2FE7A2800E6041605A974080A9A
+:1000C0007584E013001FE8030A44E7D2C201065416
+:1000D000EDB40000CCC20230C051C1DC30083000A9
+:1000E00091003000EA100061E3B000003000300100
+:1000F0003002300330043005300630073008300954
+:10010000300A300B300C300D300EE3B00001E3B09C
+:10011000004248CF3002EA1255009302EE12FF006F
+:1001200093021C9FE8051200EA051117E605094530
+:100130000A54E04400FFFE9BFFF758045EF4000001
+:1001400080002000308A310CFE6B00047609AD99E6
+:10015000C1837609A589C553FE6A08003019763E29
+:10016000A19EC5727608A198C542740BAFCB950BC2
+:10017000FE6B00049749975C740CAFAC950CC6D825
+:10018000FE690220930C930AFE6901307208A3985D
+:10019000C042E0A0019FC6187208A388C042E0A038
+:1001A0000261C5B87208A198C092FE6801C0700EC5
+:1001B000A19EC042E0A001E6C508E06E0940EA1E2B
+:1001C00000007D08720EA58EC08293CA720CA19C9D
+:1001D000C4435838C421C0F8720EA59ECBB293CC4C
+:1001E000720CA38CC3A35818C041E0A002A7C35847
+:1001F0005848C331E86C0000FE6B01C097CCC2D8F0
+:10020000971AE0A00555E0A00107E0A0014FC258F1
+:10021000763EA59EC1227608A598C0F27408AFC8A4
+:100220009508FE6A08007418AF98C043760AA19A30
+:10023000CF92974C9759C118741BA38BC0E2740CD2
+:10024000AFCC950C302C952C740CAFAC950C741C69
+:10025000F9DCC161E0A00CB2FE6C0800786BD6033B
+:10026000800004D080000660800005808000073890
+:1002700080000CAC80000414800004A880001BB82F
+:10028000E1BC0000D3035EFC5EFF0000D421E0A0CF
+:100290000CE7CF7F1897FE6608006C0CAFDC8D0C66
+:1002A0006C0C300AE06B0220E06C0144EA1C800018
+:1002B000E0A00D326C0CB9BC8D0C6C0CB9CC8D0C63
+:1002C0006C0CADCC8D0C6C0CADAC8D0C6C0CAFBC57
+:1002D0008D0C6C0CAFCC8D0C6C0C6C1BAF9BCFE2FF
+:1002E000E0690940EA190000300A300BF2EB002007
+:1002F000F2EB0028F2EB0030F2EB00386CCB2E0969
+:100300008DC9FE6C0000780BADCB990B780BE81B08
+:100310000C00990B6C0CA1BC8D0C6C0CAFAC8D0C53
+:10032000FE7C1588780BA1AB990BB197C023D50340
+:10033000D82AD70380001C5C80001D14D421CA1F5A
+:100340001897FE6C0800780BAFDB990B780BADCBE0
+:10035000990BE0A00C93B197C023D503D82AD703FB
+:1003600080001C78D421C8DF1897FE6608006C0C4A
+:10037000AFCC8D0C6C1BAF9BCFE2FE6C0000780BFA
+:10038000A9CB990BE0A00494C46CC8FC308CFE6B24
+:100390000000976C301BFE6A0000956B310AFE6905
+:1003A0000000936A932C304C932C933B932A6C0C53
+:1003B000AFAC8D0CB197C023D503D82A80000CAC0C
+:1003C000FE6C0800780BAFCB990BFE6C0000780B2D
+:1003D000A9AB990B5EFD0000FE6B0000760AA7DA60
+:1003E000970A760AE01AFF80F9DCC007144C970CD4
+:1003F000760CA7BC970C5EFDFE6B0000760CF9DC5A
+:10040000C0075EFCE06A0940EA1A0000952CB46B54
+:100410005EFD0000D401FE6C0000780BE01BFF8045
+:10042000990B780BA7BB990BFE6C0100780B308AF7
+:100430003409F20A0C4AE0690400F4090D4AE01B91
+:10044000E68B3FF9F20A001AF4091200F20A111CB5
+:10045000A56AE21A1974144B990BE06C0940EA1C66
+:100460000000F8CBFFBC998B789BE41B8000999B24
+:10047000FE6C0000787BA1AB997B300CEA1C01007C
+:10048000FE6B01F097CCCFDEFE6B01F0304A970A8D
+:10049000302A970AE06B1000FE6A0000956BB19C51
+:1004A000C023D503D80A0000301CFE6B0220970C35
+:1004B000302CFE6B0160970C300CE06B0940EA1B9E
+:1004C0000000974C975CB66CF74C00405EFD000056
+:1004D000D421E0670940EA1700006F0C580CC030C7
+:1004E000C5EDCE3FFE6601F0FE65016030446E9CB6
+:1004F000F9DCC00F588CC090305CEF4C0040E86CC9
+:1005000000008D0C8B04D82AEEEA0044AF1BF9DB07
+:10051000C0105CCCAE1C8EAC5CCCAE2CF9DAC0103A
+:100520005CCCAE3CE0A0051ACE808B04E06C09C424
+:10053000EA1C0000300B0F8AA98AC0F28EEAF5DAB5
+:10054000C006F40915105F0AB88AB81BB82B302C06
+:10055000EF4C0040C16CD82A8EBA580AC031CEDCAC
+:10056000D82AB81BB82B301CEF4C004031078B0742
+:10057000C88E8D07B19CC023D503D82A80000F58A0
+:10058000D431E0630280EA1380005D133017FE6B04
+:1005900001F097C7B19CC023D503E0660940EA1675
+:1005A00000006D0C583CC041CFACC7FFD83A8CEC72
+:1005B000E06509C4EA1500008AA418245C74C1F13E
+:1005C0000B8B580BC031CD5CD83A30028A9B160C8D
+:1005D0008CBB163CC0656C5C580CC0305D1CC031D7
+:1005E000AA82C1188AAC8A9B180BAA1BAA228CE487
+:1005F000F9D4C006F80B15105F0CAA8CE04400413A
+:10060000F9B404405D13FE6B0130760AA38AC08200
+:10061000B19CC023D503304CED4C0040D83A6C2936
+:100620008AAB1609089BECCEFFBC5804C0501338A7
+:10063000201B1CC8CFD18AAB080BAA2B6C9BE01BDC
+:100640008000E9D4C00F16448D94FE6B013097C72B
+:10065000FE6B01F09707B19CC023D503D83A000088
+:10066000D431E0670940EA1700006F0CFE6601F024
+:10067000E86500003054581CC0C0582CC030584C9D
+:10068000C031C8DCC048EF4400408D05C0EFD83A07
+:100690006E9BF7DBC00FE06309C4EA13000086AC71
+:1006A000189A8EE9F80B00081039C044F20C010BBF
+:1006B0005C7BEEC9FFBC6E2C180A169C149E580B6E
+:1006C000C0501338201C1CC8CFD186AC160CA62CE9
+:1006D0005C7CFE6201603021E04B0040C061869B83
+:1006E000180B8EBA143BC0F5AE6C6E5C580CC08013
+:1006F0005D1CC061EF4400408D058501D83A85013D
+:10070000C1CCD83A8EEBF80B1900C0C16E5C580C06
+:10071000CF205D1CCF0086AC869B180BA61B300C2F
+:10072000A62C850131078507FEB0FDAC8D07B19C75
+:10073000C023D503D83A0000D401E06C0940EA1C7C
+:100740000000303BF94B0040789BE01B8000999BF8
+:10075000FEB0FD98FE6B0160301A970AFE6901F049
+:10076000930A308A970A930AB19CC023D503D80A0A
+:10077000D401304CE06B0940EA1B0000F74C00400C
+:10078000FEB0FD80310BFE6A0160950BFE6A01F040
+:10079000950BB19CC023D503D80A0000D401E06BAF
+:1007A0000940EA1B0000764C580CC0205D1CD80A9A
+:1007B000FE6C140C780BE06A1DA0EA1A8000F7DBCF
+:1007C000C004F40B032CA98C5EFC0000FE6A14002C
+:1007D0007409A7C9340BF7EC006C124C950C5EFD44
+:1007E000D421E0670838EA178000E06B07CCEA1BE9
+:1007F0008000E06AE1C1EA1A00E4143CC123E06A27
+:10080000C381EA1A01C9143C301CC0625D1B3FFB66
+:10081000311C5D17D82A5D1B3FFB310C5D17D82AB0
+:10082000300C5D1B3FFB311C5D17D82AFE6B140892
+:10083000760CA19CCFC25EFDD42118951697E06678
+:100840000008EA160000F0160000FE6C1404780B95
+:10085000E01BFFC0EBD5C00616455807C0A6E01543
+:1008600000FFE415FF000A9BEBD7C010F7E51085E9
+:10087000EBD5C018EA15A5009905781CE21C000C00
+:100880008D1CF0160000D82AFE6B1408760CF9DCDB
+:10089000C0815EFCD4013FFB309CCCFFD80A000035
+:1008A000D401F60A1518304AF9BA0005189B149CB1
+:1008B000CC4FD80AD42118961697C7BF0E9BA39C7D
+:1008C000B9360C9CCEEFD82AD42118973006308543
+:1008D00020150E9B0A9CCEFFE06B0008EA1B00006F
+:1008E000761C18465805CF519716D82AFE6B14145B
+:1008F0007618760A30091449F9DCC006EDBC00050B
+:10090000F2081730F00C0A48A1985F3C5EFC00002A
+:10091000D42118971696F7DCC006308CC8EFEC0C83
+:100920001518C0400E9CCE3FD822DA2AD401F60A10
+:100930001518C061F9DCC006189B307CC7EFD80AD7
+:10094000D401F60A1518300BC030CE3FD80ACEFFBE
+:10095000D80A0000D401189B30CCFEB0FF6FFE6BAC
+:100960001408760CF9DCC0A1D8020000D421169737
+:100970003016189B302CFEB0FF61EE0C1518C0C06D
+:10098000E0670008EA1700006E153FFCCE4F18968E
+:100990006E1C18458F150C9CD8220000D4013FFB1B
+:1009A00030FCFEB0FF4BFE6B1408760CF9DCC0A1E6
+:1009B000D8020000D42118973FFB30ECFEB0FF3E78
+:1009C000EE0C1518F9BC0001C020CE9FD822000003
+:1009D000D671204D30013002FE6C140C78093008BD
+:1009E000EA188000E06E1DA0EA1E8000F3D9C00462
+:1009F000FC09032C18085028405616970C0A149529
+:100A0000300CEA1C80001836C0831036C0B3300C9E
+:100A1000EA1C80801836C0625C36160618060C97F1
+:100A20001896E06C0101EA1C8080183AC063E0650A
+:100A30000100EA158080C098301CEA1C8080183ABA
+:100A4000C0421438F00517300A9CA1CCE01CFFFC12
+:100A5000E01CFFF8503CE9D5C003C0E8580BC0507B
+:100A6000300CCA9F661C18423FFB30DCFEB0FEE62D
+:100A7000049C66121842E0630008EA1300000A367C
+:100A8000E08200BB3FFB303CFEB0FED8661C184243
+:100A90000C99E019FF00F2CCFF00403AF40C0D4B2A
+:100AA0000A9CE01CFF0018395F2AF9D6C008C26012
+:100AB0000C98E018FFF8C058720C12AC720C12AC13
+:100AC0001039CFB3FDD6C003C190300C1336FA0CE9
+:100AD0000B062FFC1C3CCFB3588CC0620F39FA0CAC
+:100AE0000B092FFCCFAB109640391238C062400979
+:100AF0000CA940190CA9C0283011A39BEC0C1603BB
+:100B0000181B303C0E6C187CC040202CC0B0C1A813
+:100B1000169C580CC2700F0B0CAB0F0B0CAB201CAF
+:100B2000CF9B169C580CC1E0300B0F29FA0B0A1909
+:100B30002FFB584BCFB340090CA940190CA9201C1E
+:100B4000CF2B169CC0D8300B0F39FA0B0B092FFB9B
+:100B5000588BCFB340090CA940190CA9201C580C84
+:100B6000CF31F40C1518C240E20C1518C030089CA7
+:100B7000C098300CC0580F3BFA0C0B0B2FFC083CF4
+:100B8000CFB30A995804C061C108133BFA0C0B0B90
+:100B90002FFC588CCFB3400B0CAB401B0CABC05898
+:100BA000720C12AC720C12ACF9D9C008CFA1301C77
+:100BB000EA1C80801836FB3B001BFE92FF51580B4D
+:100BC000C070300B3FFCFEB0FED3661C18423FFBEA
+:100BD000301CFEB0FE33049C66121842402B1636C1
+:100BE000FE93FF4B5C360E06300CEA1C8080180624
+:100BF0000C971896C41B8712405C2FCDDC72000046
+:100C0000D401E06A00B4EA1A000015895809C0212D
+:100C1000D80AE06A00A8EA1A00007418700913C81C
+:100C2000F00C1800CF6295297418700E1DB92FEEC4
+:100C3000FDD950005CC9202E5C791C09C048118E7A
+:100C40001C08952874281238CE42119E584ECF8128
+:100C500011AEFC0C1800CF4111BEFC0B1800CF01E7
+:100C6000DA0A0000D4211897300BCCBFC021D82A53
+:100C7000E06C00A8EA1C0000781B761CF8070F8BBC
+:100C8000761C5D1CDA2A0000D4211897CBAFC02156
+:100C9000D82AE06C00A8EA1C0000781B761CF80734
+:100CA0000F8BF01B00005F1CD8220000D421E067EE
+:100CB00000A8EA170000E06600B4EA1600000D8CF8
+:100CC000580CC0C03005C0580A9CCCDF2FF55C55CD
+:100CD0006E1C780B17CC1835CF85300CAC8CE06CC3
+:100CE0000100AE1CD82A0000D401E06B0940EA1BC9
+:100CF0000000969CF9DCC007FEB0FB70D80AD70351
+:100D0000800003D8D421E0670940EA1700008E9BD9
+:100D1000F3DBC008E0680090EA180000E06A040411
+:100D2000EA1A8000F60C1608201CC060201CC0E0E7
+:100D3000201CC210D82A700C198B5D1A8EBC8EEB49
+:100D4000F60C1900C022AE6CDA2A700CF93B0011C7
+:100D50001639C025D82A701BF609033C19BB2FECA5
+:100D6000F9DB50005CCB5C7B202C5D1A302C6E2BA9
+:100D7000B69CCE5BE06C0014EA1C00005C5B167B4A
+:100D8000C060201BC070201BC180D82A304B2E4C65
+:100D9000CD5B305BF8C9FFE03008F208070E5CCE8F
+:100DA000F8080016AC1E2FF81638CF853029F20B44
+:100DB000001BB88B5C5BCC2B30CBF8C9FFD8CEDBEB
+:100DC000D431E0660940EA1600000D8CE06500B4FD
+:100DD000EA1500000B8BE06700A8EA170000EDBCE5
+:100DE0000007C4828CBAF4091510C021D83AF9DC86
+:100DF000C005E0640404EA148000580CC1A10D9CF5
+:100E0000187CC060206CC0C0202CC0C0D83A582AC2
+:100E1000C020D83A302BEECCFFFE5D14DA3AC73F43
+:100E2000D832581AC020D83A301B0A9C5D14DA3ADE
+:100E3000581CCDD10D9C58ACCDA1581AC020D83A21
+:100E4000F60C1518CFD08CA55C556E1C780B17CC02
+:100E50001835CF64300B0A9CCD4ECF206E1C781B0A
+:100E6000F605032C783B5D1BAE8C301B0E9C5D148D
+:100E7000DA3AF9DCC005E0640C88EA148000580C0A
+:100E8000C4F10D9C201CC140202CCB10202CC06034
+:100E9000202CCAD0202CC180D83A8CBC580CC02041
+:100EA000D83AE06C0CE8EA1C80008D4CDA3A8CBC35
+:100EB000580CC020D83A8C9C581CCFD18E9CE21C78
+:100EC000FDFFAE1CDA3A8CBC580CC020D83AFEB0FC
+:100ED000FA95CFD0E0630090EA130000660CF93B6E
+:100EE00000118C9CF80B1800CF23CE1E8C9CAA8C72
+:100EF0005C5CF80B1518C021DA3A661BF60C003B57
+:100F0000208B8F1B30066E1C780B17CC1836CF54F5
+:100F1000300B0C9C5D14CDB02FF65C56CF5B581C8B
+:100F2000FE91FF660D9C58BCFE91FF628CBC580C74
+:100F3000C030300CC0E8F60C1518CFC08CA55C553D
+:100F40008C975C570A9CC8FECF500E9B0A9C5D1480
+:100F50005C5CD832800003F8D421300CE067094093
+:100F6000EA170000AE6C8F4C8F5C0F8CEDBC000755
+:100F7000C0528EBB580BC021D82AE21C0060C04171
+:100F8000C20FC020DA2A0F8CF9DCC005581CCF51E3
+:100F9000E06C00B4EA1C0000198B580BCEE08EA662
+:100FA0005C56E06700A8EA1700006E1C780B17CCAF
+:100FB0001836CE34E0650C00EA158000300B0C9C2E
+:100FC0005D15CDB06E1C781BF60603276E3C5D1CCC
+:100FD000F7DCC0080C9C5D15CD006E2C5D1CCD317E
+:100FE000D82A0000D401C65CE0A0038CE0A0039CDA
+:100FF000E06B00B8EA1B0000F76C0008DA0AD703C0
+:1010000080001700800017245EFD0000D421E065F9
+:101010000940EA1500000B8C189BE21B0060E04BB6
+:101020000020C020D82A0B9BE0660404EA1680004A
+:10103000E06700B8EA170000A98CC162202BC0F05D
+:10104000201BC301E06C00E0EA1C0000198B580B68
+:10105000C020C2DD306B0E9C5D16DA2A6E6C580C17
+:10106000C2105D1CD822201BC050203BC1B1C21C45
+:10107000DA2A6E7C580CC0A0300CE0A003A5E06C0E
+:1010800010D0EA1C80008B4CDA2A340BE06C00E4B0
+:10109000EA1C00005D16E06C10E0EA1C80008B5C2E
+:1010A000DA2A30FCAE8C30ACAECCD82A5EFD000023
+:1010B000300CE06B00B8EA1B0000B68C302AB6CAD0
+:1010C000E06A0940EA1A0000955C954C977C5EFD49
+:1010D000D401E06C00B8EA1C0000787B5D1BD80AE4
+:1010E000D431201DCE6FE06700B8EA1700000E96DD
+:1010F00030048F64301CE0A00367E06A0924EA1A18
+:101100000000EF3C000815831863E06C00E4EA1C63
+:10111000000019A9E0650124EA150000E06008005C
+:10112000E06812F8EA18800030A23031198E199B5D
+:10113000F7EE108EE02E0100C0F0E02E0200C2C0DB
+:10114000201EC420E02E00FFC6D0203EC6D0E02ED8
+:101150000200C780CA68E60B1518C050AE81302C5B
+:10116000AECCC9F86E5B580BC041AE81AEC2C99817
+:101170002FEC5D18E0800096009B0A9CFEB0F944BD
+:10118000E06C1C94EA1C8000E06B0940EA1B000044
+:10119000975C301CC8782FEC5D18E08000836E4CA3
+:1011A000580CC041AE81AEC2C7C8E60C1518C0606D
+:1011B000E06C12E4EA1C8000C058E06C133CEA1CAE
+:1011C00080008F6CCE7B2FEC5D18C6B06E4C580C37
+:1011D000C041AE81AEC2C6586E9C580CCDB0F8006E
+:1011E0000D445C74081C8F9C089A6E8B0A9C6E4997
+:1011F0005D190A9CC0486E8B2FFB8F8B089BFE34B9
+:1012000000015C74F60A1510CE80193BE04B00FF1C
+:10121000CF30305CAE8CE06C1368EA1C80008F6CC1
+:10122000CB9BC45CC3F8F20C1518C061E06C178C42
+:10123000EA1C8000C058E06C17A8EA1C80008F7C74
+:10124000CA9B19BB1279C0402019C200CA3B591B66
+:10125000C055308CAE8CAEC2C248583BC080582BB3
+:10126000C060584BC040585B5F1CC028300CB48C29
+:101270002F47E06C1DE8EA1C8000F80B0F8AB509C7
+:10128000AF2815080EA88D84C85B300A500ABA8BA7
+:1012900019CBBA9B400B6E3C183BCDC28F8BC7ABB2
+:1012A000300C2FFDD832D703800017C4D421E0675B
+:1012B00000B8EA170000E0A00243C070300CEF6CE9
+:1012C0000008300B302AC048301C309B304AAECA70
+:1012D000AE8BE06B00E0EA1B0000B68CDA2AD70385
+:1012E0008000173CE06C00B8EA1C0000303BB88B73
+:1012F000302BB8CB5EFD0000E06B00B8EA1B0000AD
+:101300007689E619FFFF198AA96A1409199A120A3F
+:10131000978A1498E618FFFF19A9A969120819B944
+:101320001009763C1839C063308CB68C30ACB6CC22
+:101330005EFD122A2FFA979A5EFF0000D421E06723
+:101340000124EA170000E06600B8EA1600006C9A73
+:101350005C7A6C8B0E9C6C495D196C9B5C7B0E9C63
+:10136000FEB0F852DA2A0000D401E06C00B8EA1CA2
+:101370000000788BE06C0124EA1C0000F60A1608D5
+:10138000B88AB89B302BFEB0F83FDA0A800004041C
+:10139000E07B86A0FE7A5814740918695E1D201B34
+:1013A000CFA15EFE580C5E1F498C780AA1AAEC5BA7
+:1013B000BBA0C032300CC118E06CC6C0EA1C002DC6
+:1013C000183BC032301CC098E06C1200EA1C007A56
+:1013D000183B302CF9BC0203E01AFFF9149B189A51
+:1013E000306CF9EA001A164AE1BC0000D303324B14
+:1013F000EA1BAA00FE795818930B484B970AB19C38
+:101400005E3DD5035EFDD703FFFF5824D401201DA8
+:10141000A36CFE795824F20C0308FA0C0908109EFC
+:10142000E01EF0FFA96BE21B0F001C4BB1ABFA0CE6
+:10143000090BE1BB0000D303F8C8FFDCEA18AA00DF
+:10144000FE7E58189D08FA0C030EF20C090EB19B93
+:10145000C023D503F40C1518C060301CC9AFC030D0
+:101460003FFCC028300C2FFDD8020000D401202DF5
+:10147000A36CFE7A581CF40C030BFA0C090B16999A
+:10148000E019F0C5E419C0F0FB38001C302BF7E878
+:1014900000181049FB38000CFB3E000EF1EE10184E
+:1014A000FB3E000DF1EE1028338BF7E800381049B1
+:1014B0004058A968E2180F0010494048EE7B000030
+:1014C000F7E8010810494068B968E6183F0010497C
+:1014D000FA0C0909E1BB0000D303F8C9FFE4EA19DB
+:1014E000AA00FE7858189109FA0C0308F40C0908B0
+:1014F000B19BC023D5032FEDD80A0000202DA36C8B
+:10150000FE7B581CF60C030AFA0C090A1499A1A9CF
+:10151000FA0C0909E1BA0000D303F8C9FFE4EA199B
+:10152000AA00FE7858189109FA0C0308F60C09086D
+:10153000B19AC023D5032FED5EFD0000202DA36CD2
+:10154000FE7B581CF60C030AFA0C090A1499A1C96F
+:10155000FA0C0909E1BA0000D303F8C9FFE4EA195B
+:10156000AA00FE7858189109FA0C0308F60C09082D
+:10157000B19AC023D5032FED5EFD0000FE7B581409
+:10158000580CC051760CA39C5E3DCFDB760CA58C2D
+:10159000CFE25EFDE07B86A0FE7A5860F40C002A64
+:1015A000740CA1CC950C740CA19C5E2D201BCFC19A
+:1015B0005EFE0000D431169714953003F206160132
+:1015C0002016FE745860E80C0024680BA19BC062D2
+:1015D0003013CE1FC0373FFCD832B166E61600FF8D
+:1015E000302CF9E500150C45A967E2170F000A47F2
+:1015F00089075813C041680CA1AC890CD83A000087
+:10160000D40130093008EA188000100CFEB0F9E26D
+:10161000D80A0000D4211897F40C1510C040FEB071
+:10162000F935AE8CD82AD70380000888D401F40C91
+:101630001510C060178C580CC030FEB0F92DD80AB8
+:1016400080000894D421189516971496C0680E9CB3
+:10165000FEB0F94E2FF70ACC0C9CFE360001F80BB9
+:101660001510CF61D82AD703800008ECD421189632
+:1016700016951497C0680B3B0C9CFEB0F9632FF6CF
+:101680000E9CFE370001F80B1510CF61D82AD70346
+:1016900080000940E0690010EA190000F60B001B09
+:1016A00016091898580A5E0D133B201A10CBCFD19B
+:1016B0005EFD0000E06900A0EA190000F20B0029BD
+:1016C0001898580A5E0D133B201A10CBCFD15EFD3F
+:1016D0003009EA198080120B1898580A5E0D1739E4
+:1016E000201A10C9CFD15EFDD40130193008EA1894
+:1016F0008080100CFEB0F96ED80AD703800009D0A4
+:10170000E5BC0000E06B00A0EA1B0000F80A16012F
+:10171000B68AF80A1614B69AF80A160CB6AABD8C40
+:10172000B6BC5EFDD401201D301A300B1A9CC73F99
+:101730001B8B580B5F1C2FFDD8020000D421E067E3
+:1017400000A4EA1700008E8C580CC071FEB0F8326D
+:10175000AE0C300CFEB0F8BAE0660080C0D8580677
+:10176000C0F0FE3C0001AE0C300B5C7CFEB0F9001A
+:10177000FE36FF015C568E8C580CCF21DA2AD82A0F
+:10178000800007B0800008C88000096CD303FE7C8D
+:101790001C00E06B0A03EA1B5501990BE06B0A037E
+:1017A000EA1BAA01990BC008D401FEB0F5C9E0A05C
+:1017B00000B9FEB0F495D80A8000033C80001920DF
+:1017C000800000DCD401201D300BE06A00FCEA1A26
+:1017D00080807409A9D9F3EC109C500C318C40091D
+:1017E000F20C0A4A5C5A145BA96B5C7B308AEDBB35
+:1017F000000FC042EC1B83805C7BA17B5C7B201ACA
+:10180000CF71A98B208CCEC1129AE01AFF00144B25
+:10181000500B304A1A9BE06C00FCC67F2FFDD80AA3
+:10182000D42120ADE0671B00EA1700B70E9B300CF7
+:10183000FEB0FDBA301A306B300CFEB0FDE90E9CE4
+:10184000FEB0F7D0E0671CF4EA178000301C5D178B
+:101850003009300A300BFE7C1800E0A001BDC02129
+:10186000C008FE7C1800E0A001C7E0A0009B4AABC6
+:10187000161CC040161CC040C058305CC048302CFC
+:10188000C028303C300BFB6B002433FA508A507B6D
+:10189000506C301CFB6C0016FB6B0015FB6C0014CD
+:1018A000FACCFFEC1A9B3149190A16AA2049CFD16C
+:1018B000300CFEB0FDDD300CFEB0FE22300CFEB070
+:1018C000FE5FE06607CCEA168000301C5D16302C07
+:1018D0005D17E0671C18EA178000301B300C5D179D
+:1018E000301B301C5D17301B303C5D17301B302C1B
+:1018F0005D17300C5D162F6DD82AD703800013A416
+:101900008000140C800007E080001BD480001BF4D2
+:10191000800019A0007A1200800014FC8000157C61
+:10192000D42120ADE06707CCEA178000301C5D179A
+:10193000E0661C18EA168000300B300C5D16300B88
+:10194000301C5D16300B303C5D16300B302C5D16B4
+:10195000300CE0A001D1300C5D17300CFEB0FDF072
+:10196000300CFB6C0024508C507C506CFB6C0016CF
+:10197000FB6C0015FB6C0014FACCFFEC1A9B314990
+:10198000190A16AA2049CFD1300CFEB0FD712F6D77
+:10199000D82AD70380001CF48000153C8000146C0A
+:1019A000D431205DFACCFFF8E06B1E44EA1B8000C6
+:1019B000B709B928170818A83FF73FF4E0661D7863
+:1019C000EA1680005D16E0A001CF501CE0651D8C7A
+:1019D000EA1580005D15E0A001DF18905D165D1529
+:1019E000300330053006C2181830C1F4401B0A3BE2
+:1019F000C1C41615F8000106EC0B141FE072D330B9
+:101A0000EC020648F6020349109A129B0A98EA096A
+:101A1000141FE0A001591493580AC070400C141C04
+:101A20005C4CE04C2711C12550030A920C91E0A0B8
+:101A3000019B1895E0A001B018960435C035023C12
+:101A4000CD445803C031300CC178300CFACAFFF8CD
+:101A5000F40C032B062B083BF6041730F80717305D
+:101A60002FFC583CCF435BF7E60C1700C050FACB75
+:101A7000FFF8F607032C2FBDD832D70380001CC413
+:101A800080001D6480001D94D4211897169630059F
+:101A90003004C0780F9B0F8CC08C18452FE72FF4B3
+:101AA0000C34CF930A9CD822FE792800F80A160538
+:101AB000A97A120A3019F9DCC005F20C0949167B23
+:101AC000C100201BC130201BC130201BC140201B86
+:101AD000C150201BC170201BC170201BC1905EFF34
+:101AE000956995A995E995295EFD9559CFBB9569AD
+:101AF0009599CF9B95599599CF6B956995A995D94E
+:101B0000CF3B9559CFCB9569959995D9CEDB955912
+:101B10009599CF6BEBCD40FEE06C1E94EA1C8000E3
+:101B2000E06E1EACEA1E8000300A300B1907190661
+:101B30001905EFE61003E7D3C002C1C1EA0416039A
+:101B4000C1900C37C090AF092014AD28CFD1EBD590
+:101B5000C003C121C0B82014AD2ACFE1EBD5C0032A
+:101B6000C050300220150CC2CFD11C3CCE03E3CFB5
+:101B700080FE0C37CF700F3120150CC1CEBB00009A
+:101B8000D401303BE06C1E8CEA1C8000FEB0FF7E6E
+:101B9000D503FEB0FE47FEB0F37BFEB0F377C03155
+:101BA000FEB0F3E2C008D70380001A888000182036
+:101BB0008000028C80000288D401F80B1518C04008
+:101BC000FEB0F3D2D80AFEB0F3FDD80A8000036459
+:101BD000800003C0D4017828BD98CFE3A96BA1ABE6
+:101BE000F94B0040B16A990A782BB99BCFE3129B5D
+:101BF000C0CCDA0A782BB99BCFE3780BA1AB990B59
+:101C0000782BB99BCFE35EFD782AB99ACFE3991B75
+:101C1000782BB99BCFE35EFDD401FE791404720AE0
+:101C2000FE7914D47208A788CFC2E1B90000D303AB
+:101C30003048F00C0028EA18AA00FE7E14589D08CF
+:101C4000E01AFFF8F7DBC003144BA7BBFE7A1404BD
+:101C5000F40C092BB199C023D503D80AD40130095B
+:101C6000300A303B303CFEB0FCA7303CE0A00070B6
+:101C7000D80AD70380001D4CD401300CFE7B586C71
+:101C8000970C3009300A303B303CFEB0FC95D80A46
+:101C9000800015B4D401E06900B8EA190000728C24
+:101CA000729A5C7AE06B0124EA1B0000F1DCC0064A
+:101CB000100B72585D18300CE06B0940EA1B0000F5
+:101CC000975CDA0AEBCD4080340C3007300EA17AF5
+:101CD0005CFB5CFE5CF7103EF2071300C053101E65
+:101CE000EE090147A1AA201CCF310E991C98E3CD23
+:101CF00080800000E1BB0000D303300AEA1AAA008A
+:101D0000FE791458930AFE7A1400950CB19B5E3D3F
+:101D1000D5035EFDE0690000EA198000121CF9DCC1
+:101D2000C00EF9EA11ECFE7A1000A59BF40B092C09
+:101D30005EFD00003009EA198000120B1898580A5D
+:101D40005E0D1739201A10C9CFD15EFDFE7B586099
+:101D5000F60C002B760CA19C5E3D760CA1AC970C8A
+:101D60005EFD0000D401FE7C1800E0A00019A17CFB
+:101D7000D802D70380001D9CD401300BFE7C1800D4
+:101D8000FEB0FF44D80AD70380001C08300CE3BC27
+:101D900000425EFDE1BC00425EFC0000781B5EFB81
+:101DA0000000100000002000000040000000800043
+:101DB0000000C000000100000001800000020000DF
+:101DC00000030000000400000006000000080000FE
+:101DD000000C0000001000000020000000000000C7
+:101DE000000000000000000080001E8080001E68CF
+:101DF00080001E2C80001E3880001E7480001E5043
+:101E000080001E5C80001E6880001E6880001E68C6
+:101E100080001E6880001E6880001E6880001E68AA
+:101E200080001E6880001E6880001E68000000019F
+:101E3000800016148000162C00000020800016443C
+:101E40008000166C007A120000B71B0000F424001A
+:101E500000000004800016B4000000000000010033
+:101E6000800016D0800016E800000000000000008E
+:101E70000000000000000003800016940000000035
+:101E80000002000080001D34800016002E002F008C
+:101E90003000000080001EB000000008000000902C
+:0C1EA000000000A0000000A00000092AC3
+:101EB0008000082C00000000120000000003000059
+:101EC0000000000000000000000000000000000012
+:101ED00000000000000000000403090441544D45C7
+:101EE0004C0000004446552041543332554333449E
+:101EF0000000000080000FE4800010088000100C3B
+:101F0000800010AC1201000200000040EB03E92F3A
+:101F1000020101020001000009021200010100C0DB
+:101F20003209040000000000000000000000004C26
+:101F300000000070000000840000005C00000088C9
+:040000058000000077
+:00000001FF
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.2/at32uc3d-isp_cfg-1.1.2.dat b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.2/at32uc3d-isp_cfg-1.1.2.dat
new file mode 100644
index 0000000..34a3dba
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.2/at32uc3d-isp_cfg-1.1.2.dat
@@ -0,0 +1 @@
+’ž káÿ× \ No newline at end of file
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.2/avr32.7z b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.2/avr32.7z
new file mode 100644
index 0000000..2674715
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.2/avr32.7z
Binary files differ
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.2/program_at32uc3d-isp-1.1.2.cmd b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.2/program_at32uc3d-isp-1.1.2.cmd
new file mode 100644
index 0000000..832b0f1
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.2/program_at32uc3d-isp-1.1.2.cmd
@@ -0,0 +1,82 @@
+@echo off
+setlocal enableextensions enabledelayedexpansion
+
+: This command script programs the ISP (flash array), the ISP
+: configuration word (User page) and the general-purpose fuse bits.
+
+: Copyright (C) 2006-2008, Atmel Corporation All rights reserved.
+:
+: Redistribution and use in source and binary forms, with or without
+: modification, are permitted provided that the following conditions are met:
+:
+: 1. Redistributions of source code must retain the above copyright notice, this
+: list of conditions and the following disclaimer.
+:
+: 2. Redistributions in binary form must reproduce the above copyright notice,
+: this list of conditions and the following disclaimer in the documentation and/
+: or other materials provided with the distribution.
+:
+: 3. The name of ATMEL may not be used to endorse or promote products derived
+: from this software without specific prior written permission.
+:
+: THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED
+: WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND
+: SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,
+: INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+: BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+: DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+: OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+: NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+: EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+echo.
+echo Performing a JTAG Chip Erase command.
+avr32program -p AVRONE chiperase -F
+if ERRORLEVEL 1 (
+ color 47
+ pause
+ exit
+)
+
+echo.
+echo Programming MCU memory from `at32uc3d-isp-1.1.2.hex'.
+avr32-objcopy -I ihex -O binary at32uc3d-isp-1.1.2.hex at32uc3d-isp-1.1.2.bin
+avr32program -p AVRONE program -finternal@0x80000000 -cint -e -v -O0x80000000 -Fbin at32uc3d-isp-1.1.2.bin
+if ERRORLEVEL 1 (
+ color 47
+ pause
+ exit
+)
+del at32uc3d-isp-1.1.2.bin
+
+echo.
+echo Programming ISP configuration word \(default for UC3D_EK i.e. Word2 == 0x929E0D6B and Word1 == 0xE11EFFD7\)
+avr32program -p AVRONE program -finternal@0x80000000 -cint -e -v -O0x808000F8 -Fbin at32uc3d-isp_cfg-1.1.2.dat
+if ERRORLEVEL 1 (
+ color 47
+ pause
+ exit
+)
+
+echo.
+echo Programming general-purpose fuse bits.
+avr32program -p AVRONE writefuses -finternal@0x80000000 gp=0xFFF5FFFF
+if ERRORLEVEL 1 (
+ color 47
+ pause
+ exit
+)
+
+echo.
+echo Resetting MCU.
+avr32program -p AVRONE run -R
+if ERRORLEVEL 1 (
+ color 47
+ pause
+ exit
+)
+
+color 27
+pause
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.2/program_at32uc3d-isp-1.1.2.sh b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.2/program_at32uc3d-isp-1.1.2.sh
new file mode 100644
index 0000000..65e0dac
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/releases/at32uc3d-isp-1.1.2/program_at32uc3d-isp-1.1.2.sh
@@ -0,0 +1,59 @@
+#!/bin/sh
+
+# This shell script programs the ISP (flash array), the ISP configuration words
+# (User page) and the general-purpose fuse bits.
+
+# Copyright (c) 2009 Atmel Corporation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice, this
+# list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# 3. The name of Atmel may not be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# 4. This software may only be redistributed and used in connection with an Atmel
+# AVR product.
+#
+# THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+# EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+#
+
+
+echo
+echo Performing a JTAG Chip Erase command.
+avr32program chiperase
+
+echo
+echo Programming MCU memory from \`at32uc3c-isp-H.hex\'.
+avr32-objcopy -I ihex -O binary at32uc3d-isp-1.1.2.hex at32uc3d-isp-1.1.2.bin
+avr32program program -finternal@0x80000000,128Kb -cint -e -v -O0x80000000 -Fbin at32uc3d-isp-1.1.2.bin
+rm -f at32uc3d-isp-1.1.2.bin
+
+echo
+echo Programming ISP configuration words \(default for EVK1101 i.e. Word2 == 0x929E0D6b and Word1 == 0xE11EFFD7\)
+avr32program program -finternal@0x80000000 -cint -e -v -O0x808000F8 -Fbin at32uc3d-isp_cfg-1.1.2.dat
+
+echo
+echo Programming general-purpose fuse bits.
+avr32program writefuses -finternal@0x80000000 gp=0xFFF7FFFF
+
+echo
+echo Resetting MCU.
+avr32program reset
+
+pause
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/sysclk_uc3d.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/sysclk_uc3d.c
new file mode 100644
index 0000000..05e4edf
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/at32uc3d/sysclk_uc3d.c
@@ -0,0 +1,196 @@
+/**
+ * \file
+ *
+ * \brief Part-specific system clock management
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "preprocessor.h"
+#include "compiler.h"
+#include "board.h"
+#include "pm_uc3d.h"
+#include "scif_uc3d.h"
+#include "ast.h"
+#include "cycle_counter.h"
+#include "flashcdw.h"
+#include "freq_detect.h"
+
+/*!
+ * Detects extern OSC frequency and enable USB clock
+ */
+void sysclk_init(void)
+{
+ int mul;
+
+ // Switch to OSC ISP
+ // Set max startup time to make sure any crystal will be supported
+ // We cannot use a TC to measure this OSC frequency
+ // because the master clock must be faster than the clock selected by the TC
+
+ // Configure OSC0 in crystal mode, external crystal
+ // with a fcrystal Hz frequency.
+ scif_configure_osc_crystalmode(SCIF_OSC0, 12000000);
+ // Enable the OSC0
+ scif_enable_osc(SCIF_OSC0, AVR32_SCIF_OSCCTRL0_STARTUP_16384_RCOSC,
+ true);
+ flashcdw_set_flash_waitstate_and_readmode(12000000);
+ pm_set_mclk_source(PM_CLK_SRC_OSC0);
+
+ // Initialize the AST with the internal RC oscillator
+ // AST will count at the frequency of 115KHz/2
+ if (!ast_init_counter(&AVR32_AST, AST_OSC_RC, 0, 0)) {
+ while (1);
+ }
+ // Enable the AST
+ ast_enable(&AVR32_AST);
+
+ // Detect the frequency
+ // mul = (((96000000 / freq_detect_start())/2)-1)
+ switch (freq_detect_start()) {
+ case 8000000:
+ mul = 5;
+ break;
+ case 16000000:
+ mul = 2;
+ break;
+ case 12000000:
+ default:
+ mul = 3;
+ break;
+ }
+
+ scif_pll_opt_t opt;
+ // Set PLL0 VCO @ 96 MHz
+ // Set PLL0 @ 48 MHz
+ opt.osc = SCIF_OSC0;
+ opt.lockcount = 63;
+ opt.div = 0;
+ opt.mul = mul;
+ opt.pll_div2 = 1;
+ opt.pll_wbwdisable = 0;
+ opt.pll_freq = 1;
+
+ // lockcount in main clock for the PLL wait lock
+ scif_pll_setup(SCIF_PLL0, opt);
+
+ /* Enable PLL0 */
+ scif_pll_enable(SCIF_PLL0);
+
+ /* Wait for PLL0 locked */
+ scif_wait_for_pll_locked(SCIF_PLL0);
+
+ // Use 1 flash wait state
+ flashcdw_set_wait_state(1);
+
+ // Switch the main clock to PLL0
+ pm_set_mclk_source(PM_CLK_SRC_PLL0);
+
+ // fPBA: 12 MHz
+ // fPBB: 12 MHz
+ // fHSB: 12 MHz
+ pm_set_clk_domain_div(PM_CLK_DOMAIN_0, PM_CKSEL_DIVRATIO_4); // CPU
+ pm_set_clk_domain_div(PM_CLK_DOMAIN_1, PM_CKSEL_DIVRATIO_4); // HSB
+ pm_set_clk_domain_div(PM_CLK_DOMAIN_3, PM_CKSEL_DIVRATIO_4); // PBB
+ pm_set_clk_domain_div(PM_CLK_DOMAIN_2, PM_CKSEL_DIVRATIO_4); // PBA
+
+ // Use 0 flash wait state
+ flashcdw_set_wait_state(0);
+}
+
+
+/*!
+ * Reset the generation of system clocks and switch to RCOsc
+ */
+void sysclk_reset(void)
+{
+ flashcdw_set_wait_state(1);
+ pm_set_clk_domain_div(PM_CLK_DOMAIN_0, PM_CKSEL_DIVRATIO_2); // CPU
+ pm_set_clk_domain_div(PM_CLK_DOMAIN_1, PM_CKSEL_DIVRATIO_2); // HSB
+ pm_set_clk_domain_div(PM_CLK_DOMAIN_3, PM_CKSEL_DIVRATIO_2); // PBB
+ pm_set_clk_domain_div(PM_CLK_DOMAIN_2, PM_CKSEL_DIVRATIO_2); // PBA
+
+ pm_set_mclk_source(PM_CLK_SRC_SLOW);
+
+ flashcdw_set_wait_state(0);
+ scif_pll_disable(SCIF_PLL0);
+
+ scif_pll_opt_t opt;
+ opt.osc = 0;
+ opt.lockcount = 0;
+ opt.div = 0;
+ opt.mul = 0;
+ opt.pll_div2 = 0;
+ opt.pll_wbwdisable = 0;
+ opt.pll_freq = 0;
+ scif_pll_setup(SCIF_PLL0, opt); // lockcount in main clock for the PLL wait lock
+}
+
+
+void sysclk_enable_usb(void)
+{
+ // Setup USB GCLK
+ scif_gc_setup(AVR32_SCIF_GCLK_USBC,
+ SCIF_GCCTRL_PLL0, AVR32_SCIF_GC_NO_DIV_CLOCK, 0);
+ // Enable USB GCLK
+ scif_gc_enable(AVR32_SCIF_GCLK_USBC);
+}
+
+
+void sysclk_disable_usb(void)
+{
+ AVR32_SCIF.gcctrl[AVR32_SCIF_GCLK_USBC] = 0;
+ scif_gc_setup(AVR32_SCIF_GCLK_USBC,
+ SCIF_GCCTRL_PLL0, AVR32_SCIF_GC_NO_DIV_CLOCK, 0);
+}
+
+
+void freq_detect_iface_ref_cnt_reset(void)
+{
+ ast_set_counter_value(&AVR32_AST, 0);
+}
+
+int freq_detect_iface_ref_cnt_value(void)
+{
+ return ast_get_counter_value(&AVR32_AST) * 2;
+}
+
+void freq_detect_iface_target_cnt_reset(void)
+{
+ Set_sys_count(0);
+}
+
+int freq_detetc_iface_target_cnt_value(void)
+{
+ return Get_sys_count();
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/boot.S b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/boot.S
new file mode 100644
index 0000000..2a42400
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/boot.S
@@ -0,0 +1,322 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief AVR32 UC3 ISP boot.
+ *
+ * - Compiler: GNU GCC for AVR32
+ * - Supported devices: All AVR32UC devices with an INTC module can be used.
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#include <avr32/io.h>
+#include "conf_isp.h"
+#include "parts.h"
+
+#if UC3C
+// These defines are missing from or wrong in the toolchain header file ip_xxx.h or part.h
+#ifndef AVR32_WDT_KEY_VALUE
+#define AVR32_WDT_KEY_VALUE 0x00000055
+#endif
+#define AVR32_SR_M_SUP 0x00000001
+#define AVR32_SR_M_SIZE 3
+#define AVR32_SR_M_OFFSET 22
+#define AVR32_SRAM_ADDRESS 0x00000000
+#endif
+
+//! @{
+//! \verbatim
+
+
+ // Performs efficiently a bitwise logical Exclusive-OR between the specified
+ // register and an immediate value of up to 32 bits. The result is stored in
+ // the destination register.
+ .macro eor.w rd, imm
+ .if \imm & 0x0000FFFF
+ eorl \rd, LO(\imm)
+ .endif
+ .if \imm & 0xFFFF0000
+ eorh \rd, HI(\imm)
+ .endif
+ .endm
+
+ // Moves efficiently an immediate value of up to 32 bits into a register.
+ .macro mov.w rd, imm
+ .if ((-(1 << (21 - 1))) <= \imm) && (\imm <= ((1 << (21 - 1)) - 1))
+ mov \rd, \imm
+#if __AVR32_UC__ >= 2
+ .elseif !(\imm & 0x0000FFFF)
+ movh \rd, HI(\imm)
+#endif
+ .else
+ mov \rd, LO(\imm)
+ orh \rd, HI(\imm)
+ .endif
+ .endm
+
+ // Performs efficiently a bitwise logical OR between the specified register
+ // and an immediate value of up to 32 bits. The result is stored in the
+ // destination register.
+ .macro or.w rd, imm
+ .if \imm & 0x0000FFFF
+ orl \rd, LO(\imm)
+ .endif
+ .if \imm & 0xFFFF0000
+ orh \rd, HI(\imm)
+ .endif
+ .endm
+
+
+ .section .reset, "ax", @progbits
+
+
+ .balign 2
+
+ // Reset vector: This must be linked @ 0x80000000.
+ .global _start
+ .type _start, @function
+_start:
+ mov.w r8, ISP_KEY_ADDRESS // r8 = &ISP_KEY
+ mov.w r9, AVR32_WDT_ADDRESS // r9 = &AVR32_WDT
+ mov.w r10, ISP_CFG1_ADDRESS // r10 = &ISP_CFG1
+ mov.w r11, AVR32_PM_ADDRESS // r11 = &AVR32_PM
+ ld.w r0, r8[0] // r0 = ISP_KEY[0]
+ mov.w r1, ISP_KEY_VALUE // r1 = ISP_KEY_VALUE
+
+ // Check CRC8 validity of the user page configuration word1.
+ ld.w r2, r10[0] // r2 = config_word1
+ mov.w r3, ISP_CFG1_CRC8_POLYNOMIAL // r3 = crc8_polynomial
+ mov r4, r2 // r4 = config_word1_tempo
+ rcall test_crc8_end
+ brne start_loader // The config word1 CRC8 is invalid: launch the ISP process.
+
+ // Check the magic key of the user page configuration word1.
+ bfextu r3, r2, ISP_CFG1_BOOT_KEY1_OFFSET, ISP_CFG1_BOOT_KEY1_SIZE // r3 = ISP_BOOT_KEY1
+ cp.w r3, ISP_CFG1_BOOT_KEY1_VALUE
+ brne start_loader // The config word1 magic key is incorrect: launch the ISP process
+
+ // Test the value of the ISP_FORCE bit.
+test_isp_force:
+ bld r2, ISP_CFG1_FORCE_OFFSET
+ brcs start_loader // The ISP_FORCE bit is set: launch the ISP process.
+
+ // Test the reset cause.
+ ld.w r3, r11[AVR32_PM_RCAUSE] // r3 = AVR32_PM.RCAUSE
+#if (UC3A || UC3B)
+ mov.w r4, AVR32_PM_RCAUSE_POR_MASK |\
+ AVR32_PM_RCAUSE_EXT_MASK |\
+ AVR32_PM_RCAUSE_JTAG_MASK |\
+ AVR32_PM_RCAUSE_OCDRST_MASK |\
+ AVR32_PM_RCAUSE_JTAGHARD_MASK // r4 = POR|EXT|OCD|JTAG
+#elif UC3C
+ mov.w r4, AVR32_PM_RCAUSE_POR_MASK |\
+ AVR32_PM_RCAUSE_EXT_MASK |\
+ AVR32_PM_RCAUSE_JTAG_MASK |\
+ AVR32_PM_RCAUSE_OCDRST_MASK |\
+ AVR32_PM_RCAUSE_BOD33_MASK |\
+ AVR32_PM_RCAUSE_BOD_MASK // r4 = POR|EXT|OCD|JTAG|BOD33|BOD
+#else
+#error 'Part configuration is missing'
+#endif
+ tst r3, r4
+ brne manage_io_cond // The reset cause was one of POR|EXT|OCD|JTAG|JTAGHARD: check the IO conditions that control the ISP activation.
+
+ // Was the reset cause a WDT reset?
+ bld r3, AVR32_PM_RCAUSE_WDT_OFFSET
+ brcs start_program // The reset cause was a WDT reset: start the application
+
+ // ISP RAM Key set?
+ cp.w r0, r1
+ brne start_program_no_isp_key // Start the application
+
+ // Start of the ISP process
+start_loader:
+ rcall disable_wdt // Disable the WDT
+ st.w r8[0], r1 // Set ISP RAM Key
+
+ // Set initial stack pointer.
+ mov sp, _estack
+
+ // Disable the exception processing.
+ ssrf AVR32_SR_EM_OFFSET
+
+ // Set up EVBA so interrupts can be enabled.
+ mov r0, _evba
+ mtsr AVR32_EVBA, r0
+
+ // Load initialized data having a global lifetime from the data LMA.
+ mov r0, _data
+ mov r1, _edata
+ sub r2, pc, $ - _data_lma
+ rcall load_idata
+
+ // Clear uninitialized data having a global lifetime in the blank static storage section.
+ mov r0, __bss_start
+ mov r1, _end
+ mov.w r2, 0
+ mov.w r3, 0
+ rjmp clear_udata
+clear_udata_loop:
+ st.d r0++, r2
+clear_udata:
+ cp.w r0, r1
+ brlo clear_udata_loop
+
+ // Load constant data and code from the const LMA.
+ mov r0, _const
+ mov r1, _econst
+ sub r2, pc, $ - _const_lma
+ rcall load_idata
+
+ // Call the ISP main function, which must not return.
+ call main
+
+ // Check of the IO conditions that control the ISP activation.
+manage_io_cond:
+ // Test the ISP_IO_COND_EN bit.
+ bld r2, ISP_CFG1_IO_COND_EN_OFFSET
+ brcc start_program // ISP_IO_COND_EN is 0: start the application.
+
+ // Check CRC8 validity of the user page configuration word2.
+ mov.w r10, ISP_CFG2_ADDRESS
+ ld.w r2, r10[0] // r2 = config_word2
+ mov.w r3, ISP_CFG2_CRC8_POLYNOMIAL // r3 = crc8_polynomial
+ mov r4, r2 // r4 = config_word2_tempo
+ rcall test_crc8_end
+ brne start_loader // The config word2 CRC8 is invalid: launch the ISP process.
+
+ // Check the magic key of the user page configuration word2
+ bfextu r3, r2, ISP_CFG2_BOOT_KEY_OFFSET, ISP_CFG2_BOOT_KEY_SIZE
+ cp.w r3, ISP_CFG2_BOOT_KEY_VALUE
+ brne start_loader // The config word2 magic key is incorrect: launch the ISP process
+
+ // ISP IO Condition active?
+ bfextu r3, r2, ISP_CFG2_IO_COND_PIN_OFFSET, ISP_CFG2_IO_COND_PIN_SIZE // r3 = IO_COND_PIN
+ cp.w r3, AVR32_GPIO_NUMBER_OF_PINS
+ brhs start_loader // The IO pin is invalid: launch the ISP process
+
+ // Check the IO condition
+ mov.w r10, AVR32_GPIO_ADDRESS
+ lsr r4, r3, 5 // r4 = IO_COND_PIN/32 = GPIO_port_IO_COND_PIN
+ lsl r4, 8 // r4 = offset to the port of the IO_COND_PIN
+ add r10, r4 // r10 = &(AVR32_GPIO[port of the IO_COND_PIN].GPER)
+ ld.w r4, r10[AVR32_GPIO_PVR] // r4 = AVR32_GPIO[port of the IO_COND_PIN].PVR
+ andl r3, 0x1F // r3 = pin&0x1F
+ lsr r4, r4, r3 // r4 = gpio_port->pvr >> (pin & 0x1F)
+ bfextu r3, r2, ISP_CFG2_IO_COND_LEVEL_OFFSET, ISP_CFG2_IO_COND_LEVEL_SIZE // r3 = IO_COND_LEVEL
+ eor r4, r3
+ bld r4, 0
+ brcc start_loader // The ISP IO Condition is not active: launch the ISP process
+
+start_program:
+ cp.w r0, r1
+ brne start_program_no_isp_key
+ rcall disable_wdt
+ .global boot_program
+ .type boot_program, @function
+boot_program:
+ // Clear ISP RAM Key
+ mov.w r8, ISP_KEY_ADDRESS
+ mov.w r0, 0
+ st.w r8[0], r0
+start_program_no_isp_key:
+ mov.w r0, AVR32_SR_GM_MASK | AVR32_SR_EM_MASK | (AVR32_SR_M_SUP << AVR32_SR_M_OFFSET)
+ mtsr AVR32_SR, r0
+ .irp rd, r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, sp, lr
+ mov.w \rd, 0
+ .endr
+ mtsr AVR32_EVBA, r0
+ mtsr AVR32_COUNT, r0
+ lddpc pc, program_start_address
+
+disable_wdt:
+ mov.w r2, AVR32_WDT_KEY_VALUE << AVR32_WDT_CTRL_KEY_OFFSET
+ st.w r9[AVR32_WDT_CTRL], r2
+ eor.w r2, AVR32_WDT_CTRL_KEY_MASK
+ st.w r9[AVR32_WDT_CTRL], r2
+ mov pc, lr
+
+load_idata_loop:
+ ld.d r4, r2++
+ st.d r0++, r4
+load_idata:
+ cp.w r0, r1
+ brlo load_idata_loop
+ mov pc, lr
+
+ // Common CRC8 function
+crc8:
+ clz r5, r4
+ rsub r5, r5, 32 - 9
+ lsl r5, r3, r5
+ eor r4, r5
+#if 0
+ .global test_crc8_end
+ .type test_crc8_end, @function
+#endif
+test_crc8_end:
+ cp.w r4, 0xFF
+ brhi crc8
+ cp.w r4, 0
+ retal r4
+
+
+// Constant data area.
+
+ .balign 4
+
+program_start_address:
+ .word PROGRAM_START_ADDRESS
+
+
+ .section .evba, "ax", @progbits
+
+
+ .balign 2
+
+ // Start of exception vector table: Unrecoverable exception.
+ .global _evba
+ .type _evba, @function
+_evba:
+ lda.w r8, _start
+ mov.w r9, AVR32_SR_GM_MASK | AVR32_SR_EM_MASK | (AVR32_SR_M_SUP << AVR32_SR_M_OFFSET)
+ mov sp, _estack - 6 * 4
+ pushm r8-r9
+ rete
+
+
+//! \endverbatim
+//! @}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/boot.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/boot.h
new file mode 100644
index 0000000..72199a9
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/boot.h
@@ -0,0 +1,65 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief AVR32 UC3 ISP boot.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32UC devices with an INTC module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#ifndef _BOOT_H_
+#define _BOOT_H_
+
+
+//_____ I N C L U D E S ____________________________________________________
+
+
+//_____ M A C R O S ________________________________________________________
+
+
+//_____ D E C L A R A T I O N S ____________________________________________
+
+/*! \brief Boots the program.
+ *
+ * \warning It may only be called from the CPU supervisor mode.
+ */
+extern void boot_program(void);
+
+
+#endif // _BOOT_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/boot.s82 b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/boot.s82
new file mode 100644
index 0000000..7068db1
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/boot.s82
@@ -0,0 +1,304 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief AVR32 UC3 ISP boot.
+ *
+ * - Compiler: IAR EWAVR32
+ * - Supported devices: All AVR32UC devices with an INTC module can be used.
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#include <avr32/io.h>
+#include "conf_isp.h"
+#include "parts.h"
+
+#if UC3C
+// These defines are missing from or wrong in the toolchain header file ip_xxx.h or part.h
+#ifndef AVR32_WDT_KEY_VALUE
+#define AVR32_WDT_KEY_VALUE 0x00000055
+#endif
+#define AVR32_SR_M_SUP 0x00000001
+#define AVR32_SR_M_SIZE 3
+#define AVR32_SR_M_OFFSET 22
+#define AVR32_SRAM_ADDRESS 0x00000000
+#endif
+
+//! @{
+//! \verbatim
+
+
+ // Performs efficiently a bitwise logical Exclusive-OR between the specified
+ // register and an immediate value of up to 32 bits. The result is stored in
+ // the destination register.
+eor_w\
+ MACRO rd, imm
+ IF (imm) & 0x0000FFFF
+ eorl rd, LWRD(imm)
+ ENDIF
+ IF (imm) & 0xFFFF0000
+ eorh rd, HWRD(imm)
+ ENDIF
+ ENDM
+
+ // Moves efficiently an immediate value of up to 32 bits into a register.
+mov_w\
+ MACRO rd, imm
+ IF (((-(1 << (21 - 1))) <= (imm)) && ((imm) <= ((1 << (21 - 1)) - 1))) ||\
+ (((1 << 32) - (1 << (21 - 1))) <= (imm))
+ mov rd, imm
+#if __CORE_REVISION__ >= 2
+ ELSEIF !((imm) & 0x0000FFFF)
+ movh rd, HWRD(imm)
+#endif
+ ELSE
+ mov rd, LWRD(imm)
+ orh rd, HWRD(imm)
+ ENDIF
+ ENDM
+
+ // Performs efficiently a bitwise logical OR between the specified register
+ // and an immediate value of up to 32 bits. The result is stored in the
+ // destination register.
+or_w\
+ MACRO rd, imm
+ IF (imm) & 0x0000FFFF
+ orl rd, LWRD(imm)
+ ENDIF
+ IF (imm) & 0xFFFF0000
+ orh rd, HWRD(imm)
+ ENDIF
+ ENDM
+
+
+ RSEG SSTACK:DATA:NOROOT(2)
+
+
+ RSEG RESET:CODE:NOROOT(1)
+
+
+ ALIGN 1
+
+ // Reset vector: This must be linked @ 0x80000000.
+ PUBLIC __program_start
+__program_start:
+
+ // Start of exception vector table: Unrecoverable exception.
+ PUBLIC _evba
+_evba:
+ mfsr r8, AVR32_SR
+ bfextu r8, r8, AVR32_SR_M_OFFSET, AVR32_SR_M_SIZE
+ cp.w r8, 001b
+ breq boot_supervisor_mode
+ sub r8, pc, $ - boot_supervisor_mode
+ mov_w r9, AVR32_SR_GM_MASK | AVR32_SR_EM_MASK | (AVR32_SR_M_SUP << AVR32_SR_M_OFFSET)
+ mov sp, SFE(SSTACK) - 6 * 4
+ pushm r8-r9
+ rete
+
+boot_supervisor_mode:
+ mov_w r8, ISP_KEY_ADDRESS
+ mov_w r9, AVR32_WDT_ADDRESS
+ mov_w r10, ISP_CFG1_ADDRESS
+ mov_w r11, AVR32_PM_ADDRESS
+ ld.w r0, r8[0]
+ mov_w r1, ISP_KEY_VALUE
+
+ // Check CRC8 validity of the user page configuration word1.
+ ld.w r2, r10[0] // r2 = config_word1
+ mov_w r3, ISP_CFG1_CRC8_POLYNOMIAL // r3 = crc8_polynomial
+ mov r4, r2 // r4 = config_word1_tempo
+ rcall test_crc8_end
+ brne start_loader // The config word1 CRC8 is invalid: launch the ISP process.
+
+ // Check the magic key of the user page configuration word1.
+ bfextu r3, r2, ISP_CFG1_BOOT_KEY1_OFFSET, ISP_CFG1_BOOT_KEY1_SIZE // r3 = ISP_BOOT_KEY1
+ cp.w r3, ISP_CFG1_BOOT_KEY1_VALUE
+ brne start_loader // The config word1 magic key is incorrect: launch the ISP process
+
+ // Test the value of the ISP_FORCE bit.
+test_isp_force:
+ bld r2, ISP_CFG1_FORCE_OFFSET
+ brcs start_loader // The ISP_FORCE bit is set: launch the ISP process.
+
+ // Test the reset cause.
+ ld.w r3, r11[AVR32_PM_RCAUSE]
+#if (UC3A || UC3B)
+ mov_w r4, AVR32_PM_RCAUSE_POR_MASK |\
+ AVR32_PM_RCAUSE_EXT_MASK |\
+ AVR32_PM_RCAUSE_JTAG_MASK |\
+ AVR32_PM_RCAUSE_OCDRST_MASK |\
+ AVR32_PM_RCAUSE_JTAGHARD_MASK
+#elif ( UC3C || UC3D )
+ mov_w r4, AVR32_PM_RCAUSE_POR_MASK |\
+ AVR32_PM_RCAUSE_EXT_MASK |\
+ AVR32_PM_RCAUSE_JTAG_MASK |\
+ AVR32_PM_RCAUSE_OCDRST_MASK |\
+ AVR32_PM_RCAUSE_JTAGHARD_MASK|\
+ AVR32_PM_RCAUSE_BOD33_MASK |\
+ AVR32_PM_RCAUSE_BOD_MASK // r4 = POR|EXT|OCD|JTAG|BOD33|BOD
+#else
+#error 'Part configuration is missing'
+#endif
+ tst r3, r4
+ brne manage_io_cond // The reset cause was one of POR|EXT|OCD|JTAG|JTAGHARD: check the IO conditions that control the ISP activation.
+
+ // Was the reset cause a WDT reset?
+ bld r3, AVR32_PM_RCAUSE_WDT_OFFSET
+ brcs start_program // The reset cause was a WDT reset: start the application
+
+ // ISP RAM Key set?
+ cp.w r0, r1
+ brne start_program_no_isp_key // Start the application
+
+ // Start of the ISP process
+start_loader:
+ rcall disable_wdt
+ st.w r8[0], r1 // Set ISP RAM Key
+
+ // Set initial stack pointer.
+ mov sp, SFE(SSTACK)
+
+ // Disable the exception processing.
+ ssrf AVR32_SR_EM_OFFSET
+
+ // Set up EVBA so interrupts can be enabled.
+ sub r0, pc, $ - _evba
+ mtsr AVR32_EVBA, r0
+
+ // Initialize segments.
+ PUBLIC ?need_segment_init
+?need_segment_init:
+ EXTERN __segment_init
+ rcall __segment_init
+
+ // Call the ISP main function, which must not return.
+ EXTERN main
+ rcall main
+
+ // Check of the IO conditions that control the ISP activation.
+manage_io_cond:
+ // Test the ISP_IO_COND_EN bit.
+ bld r2, ISP_CFG1_IO_COND_EN_OFFSET
+ brcc start_program // ISP_IO_COND_EN is 0: start the application.
+
+ // Check CRC8 validity of the user page configuration word2.
+ mov_w r10, ISP_CFG2_ADDRESS
+ ld.w r2, r10[0] // r2 = config_word2
+ mov_w r3, ISP_CFG2_CRC8_POLYNOMIAL // r3 = crc8_polynomial
+ mov r4, r2 // r4 = config_word2_tempo
+ rcall test_crc8_end
+ brne start_loader // The config word2 CRC8 is invalid: launch the ISP process.
+
+ // Check the magic key of the user page configuration word2
+ bfextu r3, r2, ISP_CFG2_BOOT_KEY_OFFSET, ISP_CFG2_BOOT_KEY_SIZE
+ cp.w r3, ISP_CFG2_BOOT_KEY_VALUE
+ brne start_loader // The config word2 magic key is incorrect: launch the ISP process
+
+ // ISP IO Condition active?
+ bfextu r3, r2, ISP_CFG2_IO_COND_PIN_OFFSET, ISP_CFG2_IO_COND_PIN_SIZE // r3 = IO_COND_PIN
+ cp.w r3, AVR32_GPIO_NUMBER_OF_PINS
+ brhs start_loader // The IO pin is invalid: launch the ISP process
+
+ // Check the IO condition
+ mov_w r10, AVR32_GPIO_ADDRESS
+ lsr r4, r3, 5
+#if (UC3A || UC3B)
+ lsl r4, 8
+#elif (UC3C || UC3L || UC3D)
+ lsl r4, 9
+#endif
+ add r10, r4
+ ld.w r4, r10[AVR32_GPIO_PVR]
+ andl r3, 0x1F
+ lsr r4, r4, r3
+ bfextu r3, r2, ISP_CFG2_IO_COND_LEVEL_OFFSET, ISP_CFG2_IO_COND_LEVEL_SIZE
+ eor r4, r3
+ bld r4, 0
+ brcc start_loader // The ISP IO Condition is not active: launch the ISP process
+
+start_program:
+ cp.w r0, r1
+ brne start_program_no_isp_key
+ rcall disable_wdt
+ PUBLIC boot_program
+boot_program:
+ mov_w r8, ISP_KEY_ADDRESS
+ mov_w r0, 0
+ st.w r8[0], r0
+start_program_no_isp_key:
+ mov_w r0, AVR32_SR_GM_MASK | AVR32_SR_EM_MASK | (AVR32_SR_M_SUP << AVR32_SR_M_OFFSET)
+ mtsr AVR32_SR, r0
+ REPTI rd, r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, sp, lr
+ mov_w rd, 0
+ ENDR
+ mtsr AVR32_EVBA, r0
+ mtsr AVR32_COUNT, r0
+ lddpc pc, program_start_address
+
+disable_wdt:
+ mov_w r2, AVR32_WDT_KEY_VALUE << AVR32_WDT_CTRL_KEY_OFFSET
+ st.w r9[AVR32_WDT_CTRL], r2
+ eor_w r2, AVR32_WDT_CTRL_KEY_MASK
+ st.w r9[AVR32_WDT_CTRL], r2
+ mov pc, lr
+
+ // Common CRC8 function
+crc8:
+ clz r5, r4
+ rsub r5, r5, 32 - 9
+ lsl r5, r3, r5
+ eor r4, r5
+test_crc8_end:
+ cp.w r4, 0xFF
+ brhi crc8
+ cp.w r4, 0
+ retal r4
+
+
+// Constant data area.
+
+ ALIGN 2
+
+program_start_address:
+ DC32 PROGRAM_START_ADDRESS
+
+
+ END
+
+
+//! \endverbatim
+//! @}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/conf_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/conf_board.h
new file mode 100644
index 0000000..fd0efa2
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/conf_board.h
@@ -0,0 +1,41 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Board configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H_INCLUDED
+#define CONF_BOARD_H_INCLUDED
+
+#endif /* CONF_BOARD_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/conf_clock.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/conf_clock.h
new file mode 100644
index 0000000..ac58200
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/conf_clock.h
@@ -0,0 +1,45 @@
+/**
+ * \file
+ *
+ * \brief Clock system configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_CLOCK_H_INCLUDED
+#define CONF_CLOCK_H_INCLUDED
+
+// USB Generic clock used but not defined.
+// It is only to provide USB routines header.
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL0
+
+#endif /* CONF_CLOCK_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/conf_freq_detect.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/conf_freq_detect.h
new file mode 100644
index 0000000..710da9e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/conf_freq_detect.h
@@ -0,0 +1,62 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief Frequency detection configuration file.
+ *
+ * This file contains the possible external configuration of the ISP.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#ifndef _CONF_FREQ_DETECT_H_
+#define _CONF_FREQ_DETECT_H_
+
+//! The reference's frequency.
+#define FREQ_DETECT_REF_HZ 119600
+
+//! A coefficient that defines the accuracy of the detection.
+ //! The highest it is, the less accurate the result will be but the fastest it
+//! will be generated.
+#define FREQ_DETECT_CONV_RATE 10000
+
+#define FREQ_DETECT_FREQ_AVALAIBLE \
+ { 8000000, 12000000, 16000000 }
+
+#endif // _CONF_FREQ_DETECT_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/conf_isp.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/conf_isp.h
new file mode 100644
index 0000000..8015d73
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/conf_isp.h
@@ -0,0 +1,138 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief ISP configuration file.
+ *
+ * This file contains the possible external configuration of the ISP.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_ISP_H_
+#define _CONF_ISP_H_
+
+#include "compiler.h"
+#include "flash_api.h"
+
+// Bootloader Versions
+// Example: Version 0x00 give 1.0.0 on batchisp log
+// Example: Version 0x03 give 1.0.3 on batchisp log
+// Example: Version 0x25 give 1.2.5 on batchisp log
+// The UC3 rule is :
+// - 1.0.X for bootloader which follow specification AVR32784 (doc7745)
+// - 1.1.X for bootloader which follow specification AVR32806
+#if UC3C
+#define BOOTLOADER_VERSION 0x12 // Third version is 12 (1.1.2)
+#elif UC3D
+#define BOOTLOADER_VERSION 0x12 // Third version is 12 (1.1.2)
+#else
+#error A new version of bootloader must be define for this new part (start to at 0)
+#endif
+
+#define ISP_CFG1 (*(volatile U32 *)ISP_CFG1_ADDRESS)
+#define ISP_CFG1_ADDRESS \
+ (FLASH_API_USER_PAGE_ADDRESS + ISP_CFG1_OFFSET)
+#define ISP_CFG1_OFFSET \
+ (FLASH_API_USER_PAGE_SIZE - ISP_CFG1_SIZE)
+#define ISP_CFG1_SIZE 4
+
+#define ISP_CFG1_BOOT_KEY1 16
+#define ISP_CFG1_BOOT_KEY1_MASK 0xFFFF0000
+#define ISP_CFG1_BOOT_KEY1_OFFSET 16
+#define ISP_CFG1_BOOT_KEY1_SIZE 16
+#define ISP_CFG1_BOOT_KEY1_VALUE 0xE11E
+
+#define ISP_CFG1_FORCE 9
+#define ISP_CFG1_FORCE_MASK 0x00000200
+#define ISP_CFG1_FORCE_OFFSET 9
+#define ISP_CFG1_FORCE_SIZE 1
+
+#define ISP_CFG1_IO_COND_EN 8
+#define ISP_CFG1_IO_COND_EN_MASK 0x00000100
+#define ISP_CFG1_IO_COND_EN_OFFSET 8
+#define ISP_CFG1_IO_COND_EN_SIZE 1
+
+#define ISP_CFG1_CRC8 0
+#define ISP_CFG1_CRC8_MASK 0x000000FF
+#define ISP_CFG1_CRC8_OFFSET 0
+#define ISP_CFG1_CRC8_SIZE 8
+#define ISP_CFG1_CRC8_POLYNOMIAL 0x107
+
+#define ISP_CFG2 (*(volatile U32 *)ISP_CFG2_ADDRESS)
+#define ISP_CFG2_ADDRESS \
+ (FLASH_API_USER_PAGE_ADDRESS + ISP_CFG2_OFFSET)
+#define ISP_CFG2_OFFSET \
+ (FLASH_API_USER_PAGE_SIZE - ISP_CFG1_SIZE - ISP_CFG2_SIZE)
+#define ISP_CFG2_SIZE 4
+
+#define ISP_CFG2_BOOT_KEY 17
+#define ISP_CFG2_BOOT_KEY_MASK 0xFFFE0000
+#define ISP_CFG2_BOOT_KEY_OFFSET 17
+#define ISP_CFG2_BOOT_KEY_SIZE 15
+#define ISP_CFG2_BOOT_KEY_VALUE 0x494F
+
+#define ISP_CFG2_IO_COND_LEVEL 16
+#define ISP_CFG2_IO_COND_LEVEL_MASK 0x00010000
+#define ISP_CFG2_IO_COND_LEVEL_OFFSET 16
+#define ISP_CFG2_IO_COND_LEVEL_SIZE 1
+
+#define ISP_CFG2_IO_COND_PIN 8
+#define ISP_CFG2_IO_COND_PIN_MASK 0x0000FF00
+#define ISP_CFG2_IO_COND_PIN_OFFSET 8
+#define ISP_CFG2_IO_COND_PIN_SIZE 8
+
+#define ISP_CFG2_CRC8 0
+#define ISP_CFG2_CRC8_MASK 0x000000FF
+#define ISP_CFG2_CRC8_OFFSET 0
+#define ISP_CFG2_CRC8_SIZE 8
+#define ISP_CFG2_CRC8_POLYNOMIAL 0x107
+
+#define ISP_KEY (*(volatile U32 *)ISP_KEY_ADDRESS)
+#define ISP_KEY_ADDRESS (AVR32_SRAM_ADDRESS + ISP_KEY_OFFSET)
+#define ISP_KEY_OFFSET 0x00000000
+#define ISP_KEY_SIZE 4
+#define ISP_KEY_VALUE ('I' << 24 | 'S' << 16 | 'P' << 8 | 'K')
+
+#define PROGRAM_START_ADDRESS \
+ (AVR32_FLASH_ADDRESS + PROGRAM_START_OFFSET)
+#define PROGRAM_START_OFFSET 0x00002000
+
+
+#endif // _CONF_ISP_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/conf_usb.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/conf_usb.h
new file mode 100644
index 0000000..5433422
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/conf_usb.h
@@ -0,0 +1,143 @@
+/**
+ * \file
+ *
+ * \brief USB configuration file
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _CONF_USB_H_
+#define _CONF_USB_H_
+
+#include "compiler.h"
+
+//! To reduce the code size, the interrupt register management from IAR is not used
+#if defined(__ICCAVR32__)
+# include "intc.h"
+# undef irq_register_handler
+# define irq_register_handler(func, int_num, int_lvl) \
+ INTC_register_interrupt(&func, int_num, \
+ TPASTE2(AVR32_INTC_INT, int_lvl))
+# undef ISR
+# define ISR(func, int_grp, int_lvl) \
+ __interrupt static void func (void)
+#endif
+
+/**
+ * USB Device Configuration
+ * @{
+ */
+
+//! Device definition (mandatory)
+#define USB_DEVICE_VENDOR_ID USB_VID_ATMEL
+#if UC3A0 || UC3A1
+#define USB_DEVICE_PRODUCT_ID USB_PID_ATMEL_DFU_AT32UC3A
+#define USB_DEVICE_PRODUCT_NAME "DFU AT32UC3A"
+#elif UC3B
+#define USB_DEVICE_PRODUCT_ID USB_PID_ATMEL_DFU_AT32UC3B
+#define USB_DEVICE_PRODUCT_NAME "DFU AT32UC3B"
+#elif UC3A3
+#define USB_DEVICE_PRODUCT_ID USB_PID_ATMEL_DFU_AT32UC3A3
+#define USB_DEVICE_PRODUCT_NAME "DFU AT32UC3A3"
+#elif UC3C
+#define USB_DEVICE_PRODUCT_ID USB_PID_ATMEL_DFU_AT32UC3C
+#define USB_DEVICE_PRODUCT_NAME "DFU AT32UC3C"
+#elif UC3D
+#define USB_DEVICE_PRODUCT_ID USB_PID_ATMEL_DFU_ATUC3D
+#define USB_DEVICE_PRODUCT_NAME "DFU AT32UC3D"
+#else
+#error Unknow DFU PID for this AVR part
+#endif
+
+#define USB_DEVICE_MAJOR_VERSION (BOOTLOADER_VERSION>>4)
+#define USB_DEVICE_MINOR_VERSION (BOOTLOADER_VERSION&0x0F)
+#define USB_DEVICE_POWER 100 // Consumption on Vbus line (mA)
+#define USB_DEVICE_MANUFACTURE_NAME "ATMEL"
+#define USB_DEVICE_ATTR USB_CONFIG_ATTR_SELF_POWERED
+
+/**
+ * Device speeds support
+ * Only Full speed is authorized on DFU ATMEL
+ * Because FLIP supports only full speed
+ * Also:
+ * - low speed is too slow (endpoint 8 Bytes)
+ * - high speed does not increase flash program speed
+ * - high speed is not supported on custom board with bad USB layout
+ * @{
+ */
+// No speed change possible
+//@}
+
+/**
+ * USB Device Callbacks definitions (Optional)
+ * @{
+ */
+#define UDC_VBUS_EVENT(b_vbus_high) main_vbus_action(b_vbus_high)
+//@}
+
+//@}
+
+
+/**
+ * USB Interface Configuration
+ * @{
+ */
+/**
+ * Configuration of DFU interface
+ * @{
+ */
+//! Interface callback definition
+#define UDI_DFU_ENABLE_EXT() true
+#define UDI_DFU_DISABLE_EXT()
+
+//! Version of ATMEL protocol used
+#define UDI_DFU_ATMEL_PROTOCOL_VERSION DFU_ATMEL_PROTOCOL_VERSION_2
+// Split erase is avaliable since batchisp 1.2.5 to avoid USB protocol 2 error
+#define UDI_DFU_ATMEL_PROTOCOL_2_SPLIT_ERASE_CHIP
+//@}
+//@}
+
+
+/**
+ * USB Device Driver Configuration
+ * @{
+ */
+#define UDD_NO_SLEEP_MGR
+//@}
+
+//! The includes of classes and other headers must be done at the end of this file to avoid compile error
+#include "udi_dfu_atmel_conf.h"
+#include "main.h"
+#include "conf_isp.h" // Need to put bootloader version at USB device version
+
+#endif // _CONF_USB_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/flash_api.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/flash_api.h
new file mode 100644
index 0000000..0c3c352
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/flash_api.h
@@ -0,0 +1,1996 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief API for AVR UC3 internal FLASH software drivers.
+ *
+ * AVR UC3 Flash Controller software driver module.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR UC3 devices
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (C) 2006-2008, Atmel Corporation All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of ATMEL may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND
+ * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+#ifndef _FLASH_API_H_
+#define _FLASH_API_H_
+
+#include <avr32/io.h>
+#include "compiler.h"
+
+
+#if defined(AVR32_FLASHC)
+
+//! Flash Base Address
+#define FLASH_API_BASE_ADDRESS AVR32_FLASH
+
+#define FLASH_API_SIZE AVR32_FLASH_SIZE
+
+//! Flash size.
+#define FLASH_API_FLASH_SIZE AVR32_FLASHC_FLASH_SIZE
+
+//! Flash page size.
+#define FLASH_API_PAGE_SIZE AVR32_FLASHC_PAGE_SIZE
+
+//! Number of flash regions defined by the FLASHC.
+#define FLASH_API_REGIONS AVR32_FLASHC_REGIONS
+
+//! User page size
+#define FLASH_API_USER_PAGE_SIZE AVR32_FLASHC_USER_PAGE_SIZE
+
+//! User page
+#define FLASH_API_USER_PAGE AVR32_FLASHC_USER_PAGE
+
+//! User page address
+#define FLASH_API_USER_PAGE_ADDRESS AVR32_FLASHC_USER_PAGE_ADDRESS
+
+//! Number of GP fuses
+#define FLASH_API_GPF_NUM AVR32_FLASHC_GPF_NUM
+
+/*! \name Flash commands
+ */
+//! @{
+// Note: all commands supported by the flashc driver should be abstracted here.
+#define FLASH_API_FCMD_CMD_EP AVR32_FLASHC_FCMD_CMD_EP
+#define FLASH_API_FCMD_CMD_EUP AVR32_FLASHC_FCMD_CMD_EUP
+
+//! @}
+
+#ifdef __AVR32_ABI_COMPILER__ // Automatically defined when compiling for AVR32, not when assembling.
+
+#include "flashc.h"
+
+/*! \name Flash Properties
+ */
+//! @{
+
+/*! \brief Gets the size of the whole flash array.
+ *
+ * \return The size of the whole flash array in bytes.
+ */
+#define flash_api_get_flash_size flashc_get_flash_size
+
+/*! \brief Gets the total number of pages in the flash array.
+ *
+ * \return The total number of pages in the flash array.
+ */
+#define flash_api_get_page_count flashc_get_page_count
+
+/*! \brief Gets the number of pages in each flash region.
+ *
+ * \return The number of pages in each flash region.
+ */
+#define flash_api_get_page_count_per_region flashc_get_page_count_per_region
+
+/*! \brief Gets the region number of a page.
+ *
+ * \param page_number The page number:
+ * \arg \c 0 to <tt>(flash_api_get_page_count() - 1)</tt>: a page number within
+ * the flash array;
+ * \arg <tt>< 0</tt>: the current page number.
+ *
+ * \return The region number of the specified page.
+ */
+#define flash_api_get_page_region flashc_get_page_region
+
+/*! \brief Gets the number of the first page of a region.
+ *
+ * \param region The region number: \c 0 to <tt>(AVR32_FLASHC_REGIONS - 1)</tt>.
+ *
+ * \return The number of the first page of the specified region.
+ */
+#define flash_api_get_region_first_page_number flashc_get_region_first_page_number
+
+//! @}
+
+
+/*! \name FLASHC Control
+ */
+//! @{
+
+/*! \brief Gets the number of wait states of flash read accesses.
+ *
+ * \return The number of wait states of flash read accesses.
+ */
+#define flash_api_get_wait_state flashc_get_wait_state
+
+/*! \brief Sets the number of wait states of flash read accesses.
+ *
+ * \param wait_state The number of wait states of flash read accesses: \c 0 to
+ * \c 1.
+ */
+#define flash_api_set_wait_state flashc_set_wait_state
+
+/*! \brief Tells whether the Flash Ready interrupt is enabled.
+ *
+ * \return Whether the Flash Ready interrupt is enabled.
+ */
+#define flash_api_is_ready_int_enabled flashc_is_ready_int_enabled
+
+/*! \brief Enables or disables the Flash Ready interrupt.
+ *
+ * \param enable Whether to enable the Flash Ready interrupt: \c TRUE or
+ * \c FALSE.
+ */
+#define flash_api_enable_ready_int flashc_enable_ready_int
+
+/*! \brief Tells whether the Lock Error interrupt is enabled.
+ *
+ * \return Whether the Lock Error interrupt is enabled.
+ */
+#define flash_api_is_lock_error_int_enabled flashc_is_lock_error_int_enabled
+
+/*! \brief Enables or disables the Lock Error interrupt.
+ *
+ * \param enable Whether to enable the Lock Error interrupt: \c TRUE or
+ * \c FALSE.
+ */
+#define flash_api_enable_lock_error_int flashc_enable_lock_error_int
+
+/*! \brief Tells whether the Programming Error interrupt is enabled.
+ *
+ * \return Whether the Programming Error interrupt is enabled.
+ */
+#define flash_api_is_prog_error_int_enabled flashc_is_prog_error_int_enabled
+
+/*! \brief Enables or disables the Programming Error interrupt.
+ *
+ * \param enable Whether to enable the Programming Error interrupt: \c TRUE or
+ * \c FALSE.
+ */
+#define flash_api_enable_prog_error_int flashc_enable_prog_error_int
+
+//! @}
+
+
+/*! \name FLASHC Status
+ */
+//! @{
+
+/*! \brief Tells whether the FLASHC is ready to run a new command.
+ *
+ * \return Whether the FLASHC is ready to run a new command.
+ */
+#define flash_api_is_ready flashc_is_ready
+
+/*! \brief Waits actively until the FLASHC is ready to run a new command.
+ *
+ * This is the default function assigned to \ref flash_api_wait_until_ready.
+ */
+#define flash_api_default_wait_until_ready flashc_default_wait_until_ready
+
+//! Pointer to the function used by the driver when it needs to wait until the
+//! FLASHC is ready to run a new command.
+//! The default function is \ref flash_api_default_wait_until_ready.
+//! The user may change this pointer to use another implementation.
+#define flash_api_wait_until_ready flashc_wait_until_ready
+
+/*! \brief Tells whether a Lock Error has occurred during the last function
+ * called that issued one or more FLASHC commands.
+ *
+ * \return Whether a Lock Error has occurred during the last function called
+ * that issued one or more FLASHC commands.
+ */
+#define flash_api_is_lock_error flashc_is_lock_error
+
+/*! \brief Tells whether a Programming Error has occurred during the last
+ * function called that issued one or more FLASHC commands.
+ *
+ * \return Whether a Programming Error has occurred during the last function
+ * called that issued one or more FLASHC commands.
+*/
+#define flash_api_is_programming_error flashc_is_programming_error
+
+//! @}
+
+
+/*! \name FLASHC Command Control
+ */
+//! @{
+
+/*! \brief Gets the last issued FLASHC command.
+ *
+ * \return The last issued FLASHC command.
+ */
+#define flash_api_get_command flashc_get_command
+
+/*! \brief Gets the current FLASHC page number.
+ *
+ * \return The current FLASHC page number.
+ */
+#define flash_api_get_page_number flashc_get_page_number
+
+/*! \brief Issues a FLASHC command.
+ *
+ * \param command The command: \c AVR32_FLASHC_FCMD_CMD_x.
+ * \param page_number The page number to apply the command to:
+ * \arg \c 0 to <tt>(flash_api_get_page_count() - 1)</tt>: a page number within
+ * the flash array;
+ * \arg <tt>< 0</tt>: use this to apply the command to the current page number
+ * or if the command does not apply to any page number;
+ * \arg this argument may have other meanings according to the command. See
+ * the FLASHC chapter of the MCU datasheet.
+ *
+ * \warning A Lock Error is issued if the command violates the protection
+ * mechanism.
+ *
+ * \warning A Programming Error is issued if the command is invalid.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ */
+#define flash_api_issue_command flashc_issue_command
+
+//! @}
+
+
+/*! \name FLASHC Global Commands
+ */
+//! @{
+
+/*! \brief Issues a No Operation command to the FLASHC.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ */
+#define flash_api_no_operation flashc_no_operation
+
+/*! \brief Issues an Erase All command to the FLASHC.
+ *
+ * This command erases all bits in the flash array, the general-purpose fuse
+ * bits and the Security bit. The User page is not erased.
+ *
+ * This command also ensures that all volatile memories, such as register file
+ * and RAMs, are erased before the Security bit is erased, i.e. deactivated.
+ *
+ * \warning A Lock Error is issued if at least one region is locked or the
+ * bootloader protection is active.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ *
+ * \note An erase operation can only set bits.
+ */
+#define flash_api_erase_all flashc_erase_all
+
+//! @}
+
+
+/*! \name FLASHC Protection Mechanisms
+ */
+//! @{
+
+/*! \brief Tells whether the Security bit is active.
+ *
+ * \return Whether the Security bit is active.
+ */
+#define flash_api_is_security_bit_active flashc_is_security_bit_active
+
+/*! \brief Activates the Security bit.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ */
+#define flash_api_activate_security_bit flashc_activate_security_bit
+
+/*! \brief Gets the bootloader protected size.
+ *
+ * \return The bootloader protected size in bytes.
+ */
+#define flash_api_get_bootloader_protected_size flashc_get_bootloader_protected_size
+
+/*! \brief Sets the bootloader protected size.
+ *
+ * \param bootprot_size The wanted bootloader protected size in bytes. If this
+ * size is not supported, the actual size will be the
+ * nearest greater available size or the maximal possible
+ * size if the requested size is too large.
+ *
+ * \return The actual bootloader protected size in bytes.
+ *
+ * \warning A Lock Error is issued if the Security bit is active.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ */
+#define flash_api_set_bootloader_protected_size flashc_set_bootloader_protected_size
+
+/*! \brief Tells whether external privileged fetch is locked.
+ *
+ * \return Whether external privileged fetch is locked.
+ */
+#define flash_api_is_external_privileged_fetch_locked flashc_is_external_privileged_fetch_locked
+
+/*! \brief Locks or unlocks external privileged fetch.
+ *
+ * \param lock Whether to lock external privileged fetch: \c TRUE or \c FALSE.
+ *
+ * \warning A Lock Error is issued if the Security bit is active.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ */
+#define flash_api_lock_external_privileged_fetch flashc_lock_external_privileged_fetch
+
+/*! \brief Tells whether the region of a page is locked.
+ *
+ * \param page_number The page number:
+ * \arg \c 0 to <tt>(flash_api_get_page_count() - 1)</tt>: a page number within
+ * the flash array;
+ * \arg <tt>< 0</tt>: the current page number.
+ *
+ * \return Whether the region of the specified page is locked.
+ */
+#define flash_api_is_page_region_locked flashc_is_page_region_locked
+
+/*! \brief Tells whether a region is locked.
+ *
+ * \param region The region number: \c 0 to <tt>(AVR32_FLASHC_REGIONS - 1)</tt>.
+ *
+ * \return Whether the specified region is locked.
+ */
+#define flash_api_is_region_locked flashc_is_region_locked
+
+/*! \brief Locks or unlocks the region of a page.
+ *
+ * \param page_number The page number:
+ * \arg \c 0 to <tt>(flash_api_get_page_count() - 1)</tt>: a page number within
+ * the flash array;
+ * \arg <tt>< 0</tt>: the current page number.
+ * \param lock Whether to lock the region of the specified page: \c TRUE or
+ * \c FALSE.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ */
+#define flash_api_lock_page_region flashc_lock_page_region
+
+/*! \brief Locks or unlocks a region.
+ *
+ * \param region The region number: \c 0 to <tt>(AVR32_FLASHC_REGIONS - 1)</tt>.
+ * \param lock Whether to lock the specified region: \c TRUE or \c FALSE.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ */
+#define flash_api_lock_region flashc_lock_region
+
+/*! \brief Locks or unlocks all regions.
+ *
+ * \param lock Whether to lock the regions: \c TRUE or \c FALSE.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ */
+#define flash_api_lock_all_regions flashc_lock_all_regions
+
+//! @}
+
+
+/*! \name Access to General-Purpose Fuses
+ */
+//! @{
+
+/*! \brief Reads a general-purpose fuse bit.
+ *
+ * \param gp_fuse_bit The general-purpose fuse bit: \c 0 to \c 63.
+ *
+ * \return The value of the specified general-purpose fuse bit.
+ *
+ * \note The actual number of general-purpose fuse bits implemented by hardware
+ * is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
+ * fixed at 1 by hardware.
+ */
+#define flash_api_read_gp_fuse_bit flashc_read_gp_fuse_bit
+
+/*! \brief Reads a general-purpose fuse bit-field.
+ *
+ * \param pos The bit-position of the general-purpose fuse bit-field: \c 0 to
+ * \c 63.
+ * \param width The bit-width of the general-purpose fuse bit-field: \c 0 to
+ * \c 64.
+ *
+ * \return The value of the specified general-purpose fuse bit-field.
+ *
+ * \note The actual number of general-purpose fuse bits implemented by hardware
+ * is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
+ * fixed at 1 by hardware.
+ */
+#define flash_api_read_gp_fuse_bitfield flashc_read_gp_fuse_bitfield
+
+/*! \brief Reads a general-purpose fuse byte.
+ *
+ * \param gp_fuse_byte The general-purpose fuse byte: \c 0 to \c 7.
+ *
+ * \return The value of the specified general-purpose fuse byte.
+ *
+ * \note The actual number of general-purpose fuse bits implemented by hardware
+ * is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
+ * fixed at 1 by hardware.
+ */
+#define flash_api_read_gp_fuse_byte flashc_read_gp_fuse_byte
+
+/*! \brief Reads all general-purpose fuses.
+ *
+ * \return The value of all general-purpose fuses as a word.
+ *
+ * \note The actual number of general-purpose fuse bits implemented by hardware
+ * is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
+ * fixed at 1 by hardware.
+ */
+#define flash_api_read_all_gp_fuses flashc_read_all_gp_fuses
+
+/*! \brief Erases a general-purpose fuse bit.
+ *
+ * \param gp_fuse_bit The general-purpose fuse bit: \c 0 to \c 63.
+ * \param check Whether to check erase: \c TRUE or \c FALSE.
+ *
+ * \return Whether the erase succeeded or always \c TRUE if erase check was not
+ * requested.
+ *
+ * \warning A Lock Error is issued if the Security bit is active and the command
+ * is applied to BOOTPROT or EPFL fuses.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ *
+ * \note An erase operation can only set bits.
+ *
+ * \note The actual number of general-purpose fuse bits implemented by hardware
+ * is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
+ * fixed at 1 by hardware.
+ */
+#define flash_api_erase_gp_fuse_bit flashc_erase_gp_fuse_bit
+
+/*! \brief Erases a general-purpose fuse bit-field.
+ *
+ * \param pos The bit-position of the general-purpose fuse bit-field: \c 0 to
+ * \c 63.
+ * \param width The bit-width of the general-purpose fuse bit-field: \c 0 to
+ * \c 64.
+ * \param check Whether to check erase: \c TRUE or \c FALSE.
+ *
+ * \return Whether the erase succeeded or always \c TRUE if erase check was not
+ * requested.
+ *
+ * \warning A Lock Error is issued if the Security bit is active and the command
+ * is applied to BOOTPROT or EPFL fuses.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ *
+ * \note An erase operation can only set bits.
+ *
+ * \note The actual number of general-purpose fuse bits implemented by hardware
+ * is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
+ * fixed at 1 by hardware.
+ */
+#define flash_api_erase_gp_fuse_bitfield flashc_erase_gp_fuse_bitfield
+
+/*! \brief Erases a general-purpose fuse byte.
+ *
+ * \param gp_fuse_byte The general-purpose fuse byte: \c 0 to \c 7.
+ * \param check Whether to check erase: \c TRUE or \c FALSE.
+ *
+ * \return Whether the erase succeeded or always \c TRUE if erase check was not
+ * requested.
+ *
+ * \warning A Lock Error is issued if the Security bit is active.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ *
+ * \note An erase operation can only set bits.
+ *
+ * \note The actual number of general-purpose fuse bits implemented by hardware
+ * is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
+ * fixed at 1 by hardware.
+ */
+#define flash_api_erase_gp_fuse_byte flashc_erase_gp_fuse_byte
+
+/*! \brief Erases all general-purpose fuses.
+ *
+ * \param check Whether to check erase: \c TRUE or \c FALSE.
+ *
+ * \return Whether the erase succeeded or always \c TRUE if erase check was not
+ * requested.
+ *
+ * \warning A Lock Error is issued if the Security bit is active.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ *
+ * \note An erase operation can only set bits.
+ *
+ * \note The actual number of general-purpose fuse bits implemented by hardware
+ * is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
+ * fixed at 1 by hardware.
+ */
+#define flash_api_erase_all_gp_fuses flashc_erase_all_gp_fuses
+
+/*! \brief Writes a general-purpose fuse bit.
+ *
+ * \param gp_fuse_bit The general-purpose fuse bit: \c 0 to \c 63.
+ * \param value The value of the specified general-purpose fuse bit.
+ *
+ * \warning A Lock Error is issued if the Security bit is active and the command
+ * is applied to BOOTPROT or EPFL fuses.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ *
+ * \note A write operation can only clear bits.
+ *
+ * \note The actual number of general-purpose fuse bits implemented by hardware
+ * is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
+ * fixed at 1 by hardware.
+ */
+#define flash_api_write_gp_fuse_bit flashc_write_gp_fuse_bit
+
+/*! \brief Writes a general-purpose fuse bit-field.
+ *
+ * \param pos The bit-position of the general-purpose fuse bit-field: \c 0 to
+ * \c 63.
+ * \param width The bit-width of the general-purpose fuse bit-field: \c 0 to
+ * \c 64.
+ * \param value The value of the specified general-purpose fuse bit-field.
+ *
+ * \warning A Lock Error is issued if the Security bit is active and the command
+ * is applied to BOOTPROT or EPFL fuses.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ *
+ * \note A write operation can only clear bits.
+ *
+ * \note The actual number of general-purpose fuse bits implemented by hardware
+ * is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
+ * fixed at 1 by hardware.
+ */
+#define flash_api_write_gp_fuse_bitfield flashc_write_gp_fuse_bitfield
+
+/*! \brief Writes a general-purpose fuse byte.
+ *
+ * \param gp_fuse_byte The general-purpose fuse byte: \c 0 to \c 7.
+ * \param value The value of the specified general-purpose fuse byte.
+ *
+ * \warning A Lock Error is issued if the Security bit is active.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ *
+ * \note A write operation can only clear bits.
+ *
+ * \note The actual number of general-purpose fuse bits implemented by hardware
+ * is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
+ * fixed at 1 by hardware.
+ */
+#define flash_api_write_gp_fuse_byte flashc_write_gp_fuse_byte
+
+/*! \brief Writes all general-purpose fuses.
+ *
+ * \param value The value of all general-purpose fuses as a word.
+ *
+ * \warning A Lock Error is issued if the Security bit is active.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ *
+ * \note A write operation can only clear bits.
+ *
+ * \note The actual number of general-purpose fuse bits implemented by hardware
+ * is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
+ * fixed at 1 by hardware.
+ */
+#define flash_api_write_all_gp_fuses flashc_write_all_gp_fuses
+
+/*! \brief Sets a general-purpose fuse bit with the appropriate erase and write
+ * operations.
+ *
+ * \param gp_fuse_bit The general-purpose fuse bit: \c 0 to \c 63.
+ * \param value The value of the specified general-purpose fuse bit.
+ *
+ * \warning A Lock Error is issued if the Security bit is active and the command
+ * is applied to BOOTPROT or EPFL fuses.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ *
+ * \note The actual number of general-purpose fuse bits implemented by hardware
+ * is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
+ * fixed at 1 by hardware.
+ */
+#define flash_api_set_gp_fuse_bit flashc_set_gp_fuse_bit
+
+/*! \brief Sets a general-purpose fuse bit-field with the appropriate erase and
+ * write operations.
+ *
+ * \param pos The bit-position of the general-purpose fuse bit-field: \c 0 to
+ * \c 63.
+ * \param width The bit-width of the general-purpose fuse bit-field: \c 0 to
+ * \c 64.
+ * \param value The value of the specified general-purpose fuse bit-field.
+ *
+ * \warning A Lock Error is issued if the Security bit is active and the command
+ * is applied to BOOTPROT or EPFL fuses.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ *
+ * \note The actual number of general-purpose fuse bits implemented by hardware
+ * is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
+ * fixed at 1 by hardware.
+ */
+#define flash_api_set_gp_fuse_bitfield flashc_set_gp_fuse_bitfield
+
+/*! \brief Sets a general-purpose fuse byte with the appropriate erase and write
+ * operations.
+ *
+ * \param gp_fuse_byte The general-purpose fuse byte: \c 0 to \c 7.
+ * \param value The value of the specified general-purpose fuse byte.
+ *
+ * \warning A Lock Error is issued if the Security bit is active.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ *
+ * \note The actual number of general-purpose fuse bits implemented by hardware
+ * is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
+ * fixed at 1 by hardware.
+ */
+#define flash_api_set_gp_fuse_byte flashc_set_gp_fuse_byte
+
+/*! \brief Sets all general-purpose fuses with the appropriate erase and write
+ * operations.
+ *
+ * \param value The value of all general-purpose fuses as a word.
+ *
+ * \warning A Lock Error is issued if the Security bit is active.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ *
+ * \note The actual number of general-purpose fuse bits implemented by hardware
+ * is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
+ * fixed at 1 by hardware.
+ */
+#define flash_api_set_all_gp_fuses flashc_set_all_gp_fuses
+
+//! @}
+
+
+/*! \name Access to Flash Pages
+ */
+//! @{
+
+/*! \brief Clears the page buffer.
+ *
+ * This command resets all bits in the page buffer to one. Write accesses to the
+ * page buffer can only change page buffer bits from one to zero.
+ *
+ * \warning The page buffer is not automatically reset after a page write.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ */
+#define flash_api_clear_page_buffer flashc_clear_page_buffer
+
+/*! \brief Tells whether the page to which the last Quick Page Read or Quick
+ * Page Read User Page command was applied was erased.
+ *
+ * \return Whether the page to which the last Quick Page Read or Quick Page Read
+ * User Page command was applied was erased.
+ */
+#define flash_api_is_page_erased flashc_is_page_erased
+
+/*! \brief Applies the Quick Page Read command to a page.
+ *
+ * \param page_number The page number:
+ * \arg \c 0 to <tt>(flash_api_get_page_count() - 1)</tt>: a page number within
+ * the flash array;
+ * \arg <tt>< 0</tt>: the current page number.
+ *
+ * \return Whether the specified page is erased.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ */
+#define flash_api_quick_page_read flashc_quick_page_read
+
+/*! \brief Erases a page.
+ *
+ * \param page_number The page number:
+ * \arg \c 0 to <tt>(flash_api_get_page_count() - 1)</tt>: a page number within
+ * the flash array;
+ * \arg <tt>< 0</tt>: the current page number.
+ * \param check Whether to check erase: \c TRUE or \c FALSE.
+ *
+ * \return Whether the erase succeeded or always \c TRUE if erase check was not
+ * requested.
+ *
+ * \warning A Lock Error is issued if the command is applied to a page belonging
+ * to a locked region or to the bootloader protected area.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ *
+ * \note An erase operation can only set bits.
+ */
+#define flash_api_erase_page flashc_erase_page
+
+/*! \brief Erases all pages within the flash array.
+ *
+ * \param check Whether to check erase: \c TRUE or \c FALSE.
+ *
+ * \return Whether the erase succeeded or always \c TRUE if erase check was not
+ * requested.
+ *
+ * \warning A Lock Error is issued if at least one region is locked or the
+ * bootloader protection is active.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ *
+ * \note An erase operation can only set bits.
+ */
+#define flash_api_erase_all_pages flashc_erase_all_pages
+
+/*! \brief Writes a page from the page buffer.
+ *
+ * \param page_number The page number:
+ * \arg \c 0 to <tt>(flash_api_get_page_count() - 1)</tt>: a page number within
+ * the flash array;
+ * \arg <tt>< 0</tt>: the current page number.
+ *
+ * \warning A Lock Error is issued if the command is applied to a page belonging
+ * to a locked region or to the bootloader protected area.
+ *
+ * \warning The page buffer is not automatically reset after a page write.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ *
+ * \note A write operation can only clear bits.
+ */
+#define flash_api_write_page flashc_write_page
+
+/*! \brief Issues a Quick Page Read User Page command to the FLASHC.
+ *
+ * \return Whether the User page is erased.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ */
+#define flash_api_quick_user_page_read flashc_quick_user_page_read
+
+/*! \brief Erases the User page.
+ *
+ * \param check Whether to check erase: \c TRUE or \c FALSE.
+ *
+ * \return Whether the erase succeeded or always \c TRUE if erase check was not
+ * requested.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ *
+ * \note An erase operation can only set bits.
+ */
+#define flash_api_erase_user_page flashc_erase_user_page
+
+/*! \brief Writes the User page from the page buffer.
+ *
+ * \warning The page buffer is not automatically reset after a page write.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ *
+ * \note A write operation can only clear bits.
+ */
+#define flash_api_write_user_page flashc_write_user_page
+
+/*! \brief Copies \a nbytes bytes to the flash destination pointed to by \a dst
+ * from the repeated \a src source byte.
+ *
+ * The destination areas that are not within the flash array or the User page
+ * are ignored.
+ *
+ * All pointer and size alignments are supported.
+ *
+ * \param dst Pointer to flash destination.
+ * \param src Source byte.
+ * \param nbytes Number of bytes to set.
+ * \param erase Whether to erase before writing: \c TRUE or \c FALSE.
+ *
+ * \return The value of \a dst.
+ *
+ * \warning This function may be called with \a erase set to \c FALSE only if
+ * the destination consists only of erased words, i.e. this function
+ * can not be used to write only one bit of a previously written word.
+ * E.g., if \c 0x00000001 then \c 0xFFFFFFFE are written to a word, the
+ * resulting value in flash may be different from \c 0x00000000.
+ *
+ * \warning A Lock Error is issued if the command is applied to pages belonging
+ * to a locked region or to the bootloader protected area.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ */
+#define flash_api_memset8 flashc_memset8
+
+/*! \brief Copies \a nbytes bytes to the flash destination pointed to by \a dst
+ * from the repeated \a src big-endian source half-word.
+ *
+ * The destination areas that are not within the flash array or the User page
+ * are ignored.
+ *
+ * All pointer and size alignments are supported.
+ *
+ * \param dst Pointer to flash destination.
+ * \param src Source half-word.
+ * \param nbytes Number of bytes to set.
+ * \param erase Whether to erase before writing: \c TRUE or \c FALSE.
+ *
+ * \return The value of \a dst.
+ *
+ * \warning This function may be called with \a erase set to \c FALSE only if
+ * the destination consists only of erased words, i.e. this function
+ * can not be used to write only one bit of a previously written word.
+ * E.g., if \c 0x00000001 then \c 0xFFFFFFFE are written to a word, the
+ * resulting value in flash may be different from \c 0x00000000.
+ *
+ * \warning A Lock Error is issued if the command is applied to pages belonging
+ * to a locked region or to the bootloader protected area.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ */
+#define flash_api_memset16 flashc_memset16
+
+/*! \brief Copies \a nbytes bytes to the flash destination pointed to by \a dst
+ * from the repeated \a src big-endian source word.
+ *
+ * The destination areas that are not within the flash array or the User page
+ * are ignored.
+ *
+ * All pointer and size alignments are supported.
+ *
+ * \param dst Pointer to flash destination.
+ * \param src Source word.
+ * \param nbytes Number of bytes to set.
+ * \param erase Whether to erase before writing: \c TRUE or \c FALSE.
+ *
+ * \return The value of \a dst.
+ *
+ * \warning This function may be called with \a erase set to \c FALSE only if
+ * the destination consists only of erased words, i.e. this function
+ * can not be used to write only one bit of a previously written word.
+ * E.g., if \c 0x00000001 then \c 0xFFFFFFFE are written to a word, the
+ * resulting value in flash may be different from \c 0x00000000.
+ *
+ * \warning A Lock Error is issued if the command is applied to pages belonging
+ * to a locked region or to the bootloader protected area.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ */
+#define flash_api_memset32 flashc_memset32
+
+/*! \brief Copies \a nbytes bytes to the flash destination pointed to by \a dst
+ * from the repeated \a src big-endian source double-word.
+ *
+ * The destination areas that are not within the flash array or the User page
+ * are ignored.
+ *
+ * All pointer and size alignments are supported.
+ *
+ * \param dst Pointer to flash destination.
+ * \param src Source double-word.
+ * \param nbytes Number of bytes to set.
+ * \param erase Whether to erase before writing: \c TRUE or \c FALSE.
+ *
+ * \return The value of \a dst.
+ *
+ * \warning This function may be called with \a erase set to \c FALSE only if
+ * the destination consists only of erased words, i.e. this function
+ * can not be used to write only one bit of a previously written word.
+ * E.g., if \c 0x00000001 then \c 0xFFFFFFFE are written to a word, the
+ * resulting value in flash may be different from \c 0x00000000.
+ *
+ * \warning A Lock Error is issued if the command is applied to pages belonging
+ * to a locked region or to the bootloader protected area.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ */
+#define flash_api_memset64 flashc_memset64
+
+/*! \brief Copies \a nbytes bytes to the flash destination pointed to by \a dst
+ * from the repeated \a src big-endian source pattern.
+ *
+ * The destination areas that are not within the flash array or the User page
+ * are ignored.
+ *
+ * All pointer and size alignments are supported.
+ *
+ * \param dst Pointer to flash destination.
+ * \param src Source double-word.
+ * \param src_width \a src width in bits: 8, 16, 32 or 64.
+ * \param nbytes Number of bytes to set.
+ * \param erase Whether to erase before writing: \c TRUE or \c FALSE.
+ *
+ * \return The value of \a dst.
+ *
+ * \warning This function may be called with \a erase set to \c FALSE only if
+ * the destination consists only of erased words, i.e. this function
+ * can not be used to write only one bit of a previously written word.
+ * E.g., if \c 0x00000001 then \c 0xFFFFFFFE are written to a word, the
+ * resulting value in flash may be different from \c 0x00000000.
+ *
+ * \warning A Lock Error is issued if the command is applied to pages belonging
+ * to a locked region or to the bootloader protected area.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ */
+#define flash_api_memset flashc_memset
+
+/*! \brief Copies \a nbytes bytes to the flash destination pointed to by \a dst
+ * from the source pointed to by \a src.
+ *
+ * The destination areas that are not within the flash array or the User page
+ * are ignored.
+ *
+ * All pointer and size alignments are supported.
+ *
+ * \param dst Pointer to flash destination.
+ * \param src Pointer to source data.
+ * \param nbytes Number of bytes to copy.
+ * \param erase Whether to erase before writing: \c TRUE or \c FALSE.
+ *
+ * \return The value of \a dst.
+ *
+ * \warning If copying takes place between areas that overlap, the behavior is
+ * undefined.
+ *
+ * \warning This function may be called with \a erase set to \c FALSE only if
+ * the destination consists only of erased words, i.e. this function
+ * can not be used to write only one bit of a previously written word.
+ * E.g., if \c 0x00000001 then \c 0xFFFFFFFE are written to a word, the
+ * resulting value in flash may be different from \c 0x00000000.
+ *
+ * \warning A Lock Error is issued if the command is applied to pages belonging
+ * to a locked region or to the bootloader protected area.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ */
+#define flash_api_memcpy flashc_memcpy
+
+//! @}
+#endif // __AVR32_ABI_COMPILER__
+
+#elif defined(AVR32_FLASHCDW)
+
+//! Flash Base Address
+#define FLASH_API_BASE_ADDRESS AVR32_FLASHCDW_BASE_ADDRESS
+
+#define FLASH_API_SIZE AVR32_FLASHCDW_FLASH_SIZE
+
+//! Flash size.
+#define FLASH_API_FLASH_SIZE AVR32_FLASHCDW_FLASH_SIZE
+
+//! Flash page size.
+#define FLASH_API_PAGE_SIZE AVR32_FLASHCDW_PAGE_SIZE
+
+//! Number of flash regions defined by the FLASHCDW.
+#define FLASH_API_REGIONS AVR32_FLASHCDW_REGIONS
+
+//! User page size
+#define FLASH_API_USER_PAGE_SIZE AVR32_FLASHCDW_USER_PAGE_SIZE
+
+//! User page
+#define FLASH_API_USER_PAGE AVR32_FLASHCDW_USER_PAGE
+
+//! User page address
+#define FLASH_API_USER_PAGE_ADDRESS AVR32_FLASHCDW_USER_PAGE_ADDRESS
+
+//! Number of GP fuses
+#define FLASH_API_GPF_NUM AVR32_FLASHC_GPF_NUM
+
+/*! \name Flash commands
+ */
+//! @{
+// Note: all commands supported by the flashcdw driver should be abstracted here.
+#define FLASH_API_FCMD_CMD_EP AVR32_FLASHCDW_FCMD_CMD_EP
+#define FLASH_API_FCMD_CMD_EUP AVR32_FLASHCDW_FCMD_CMD_EUP
+
+//! @}
+
+#ifdef __AVR32_ABI_COMPILER__ // Automatically defined when compiling for AVR32, not when assembling.
+
+#include "flashcdw.h"
+
+/*! \name Flash Properties
+ */
+//! @{
+
+/*! \brief Gets the size of the whole flash array.
+ *
+ * \return The size of the whole flash array in bytes.
+ */
+#define flash_api_get_flash_size flashcdw_get_flash_size
+
+/*! \brief Gets the total number of pages in the flash array.
+ *
+ * \return The total number of pages in the flash array.
+ */
+#define flash_api_get_page_count flashcdw_get_page_count
+
+/*! \brief Gets the number of pages in each flash region.
+ *
+ * \return The number of pages in each flash region.
+ */
+#define flash_api_get_page_count_per_region flashcdw_get_page_count_per_region
+
+/*! \brief Gets the region number of a page.
+ *
+ * \param page_number The page number:
+ * \arg \c 0 to <tt>(flash_api_get_page_count() - 1)</tt>: a page number within
+ * the flash array;
+ * \arg <tt>< 0</tt>: the current page number.
+ *
+ * \return The region number of the specified page.
+ */
+#define flash_api_get_page_region flashcdw_get_page_region
+
+/*! \brief Gets the number of the first page of a region.
+ *
+ * \param region The region number: \c 0 to <tt>(AVR32_FLASHC_REGIONS - 1)</tt>.
+ *
+ * \return The number of the first page of the specified region.
+ */
+#define flash_api_get_region_first_page_number flashcdw_get_region_first_page_number
+
+//! @}
+
+
+/*! \name FLASHC Control
+ */
+//! @{
+
+/*! \brief Gets the number of wait states of flash read accesses.
+ *
+ * \return The number of wait states of flash read accesses.
+ */
+#define flash_api_get_wait_state flashcdw_get_wait_state
+
+/*! \brief Sets the number of wait states of flash read accesses.
+ *
+ * \param wait_state The number of wait states of flash read accesses: \c 0 to
+ * \c 1.
+ */
+#define flash_api_set_wait_state flashcdw_set_wait_state
+
+/*! \brief Tells whether the Flash Ready interrupt is enabled.
+ *
+ * \return Whether the Flash Ready interrupt is enabled.
+ */
+#define flash_api_is_ready_int_enabled flashcdw_is_ready_int_enabled
+
+/*! \brief Enables or disables the Flash Ready interrupt.
+ *
+ * \param enable Whether to enable the Flash Ready interrupt: \c TRUE or
+ * \c FALSE.
+ */
+#define flash_api_enable_ready_int flashcdw_enable_ready_int
+
+/*! \brief Tells whether the Lock Error interrupt is enabled.
+ *
+ * \return Whether the Lock Error interrupt is enabled.
+ */
+#define flash_api_is_lock_error_int_enabled flashcdw_is_lock_error_int_enabled
+
+/*! \brief Enables or disables the Lock Error interrupt.
+ *
+ * \param enable Whether to enable the Lock Error interrupt: \c TRUE or
+ * \c FALSE.
+ */
+#define flash_api_enable_lock_error_int flashcdw_enable_lock_error_int
+
+/*! \brief Tells whether the Programming Error interrupt is enabled.
+ *
+ * \return Whether the Programming Error interrupt is enabled.
+ */
+#define flash_api_is_prog_error_int_enabled flashcdw_is_prog_error_int_enabled
+
+/*! \brief Enables or disables the Programming Error interrupt.
+ *
+ * \param enable Whether to enable the Programming Error interrupt: \c TRUE or
+ * \c FALSE.
+ */
+#define flash_api_enable_prog_error_int flashcdw_enable_prog_error_int
+
+//! @}
+
+
+/*! \name FLASHC Status
+ */
+//! @{
+
+/*! \brief Tells whether the FLASHC is ready to run a new command.
+ *
+ * \return Whether the FLASHC is ready to run a new command.
+ */
+#define flash_api_is_ready flashcdw_is_ready
+
+/*! \brief Waits actively until the FLASHC is ready to run a new command.
+ *
+ * This is the default function assigned to \ref flash_api_wait_until_ready.
+ */
+#define flash_api_default_wait_until_ready flashcdw_default_wait_until_ready
+
+//! Pointer to the function used by the driver when it needs to wait until the
+//! FLASHC is ready to run a new command.
+//! The default function is \ref flash_api_default_wait_until_ready.
+//! The user may change this pointer to use another implementation.
+#define flash_api_wait_until_ready flashcdw_wait_until_ready
+
+/*! \brief Tells whether a Lock Error has occurred during the last function
+ * called that issued one or more FLASHC commands.
+ *
+ * \return Whether a Lock Error has occurred during the last function called
+ * that issued one or more FLASHC commands.
+ */
+#define flash_api_is_lock_error flashcdw_is_lock_error
+
+/*! \brief Tells whether a Programming Error has occurred during the last
+ * function called that issued one or more FLASHC commands.
+ *
+ * \return Whether a Programming Error has occurred during the last function
+ * called that issued one or more FLASHC commands.
+*/
+#define flash_api_is_programming_error flashcdw_is_programming_error
+
+//! @}
+
+
+/*! \name FLASHC Command Control
+ */
+//! @{
+
+/*! \brief Gets the last issued FLASHC command.
+ *
+ * \return The last issued FLASHC command.
+ */
+#define flash_api_get_command flashcdw_get_command
+
+/*! \brief Gets the current FLASHC page number.
+ *
+ * \return The current FLASHC page number.
+ */
+#define flash_api_get_page_number flashcdw_get_page_number
+
+/*! \brief Issues a FLASHC command.
+ *
+ * \param command The command: \c AVR32_FLASHC_FCMD_CMD_x.
+ * \param page_number The page number to apply the command to:
+ * \arg \c 0 to <tt>(flash_api_get_page_count() - 1)</tt>: a page number within
+ * the flash array;
+ * \arg <tt>< 0</tt>: use this to apply the command to the current page number
+ * or if the command does not apply to any page number;
+ * \arg this argument may have other meanings according to the command. See
+ * the FLASHC chapter of the MCU datasheet.
+ *
+ * \warning A Lock Error is issued if the command violates the protection
+ * mechanism.
+ *
+ * \warning A Programming Error is issued if the command is invalid.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ */
+#define flash_api_issue_command flashcdw_issue_command
+
+//! @}
+
+
+/*! \name FLASHC Global Commands
+ */
+//! @{
+
+/*! \brief Issues a No Operation command to the FLASHC.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ */
+#define flash_api_no_operation flashcdw_no_operation
+
+/*! \brief Issues an Erase All command to the FLASHC.
+ *
+ * This command erases all bits in the flash array, the general-purpose fuse
+ * bits and the Security bit. The User page is not erased.
+ *
+ * This command also ensures that all volatile memories, such as register file
+ * and RAMs, are erased before the Security bit is erased, i.e. deactivated.
+ *
+ * \warning A Lock Error is issued if at least one region is locked or the
+ * bootloader protection is active.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ *
+ * \note An erase operation can only set bits.
+ */
+#define flash_api_erase_all flashcdw_erase_all
+
+//! @}
+
+
+/*! \name FLASHC Protection Mechanisms
+ */
+//! @{
+
+/*! \brief Tells whether the Security bit is active.
+ *
+ * \return Whether the Security bit is active.
+ */
+#define flash_api_is_security_bit_active flashcdw_is_security_bit_active
+
+/*! \brief Activates the Security bit.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ */
+#define flash_api_activate_security_bit flashcdw_activate_security_bit
+
+/*! \brief Gets the bootloader protected size.
+ *
+ * \return The bootloader protected size in bytes.
+ */
+#define flash_api_get_bootloader_protected_size flashcdw_get_bootloader_protected_size
+
+/*! \brief Sets the bootloader protected size.
+ *
+ * \param bootprot_size The wanted bootloader protected size in bytes. If this
+ * size is not supported, the actual size will be the
+ * nearest greater available size or the maximal possible
+ * size if the requested size is too large.
+ *
+ * \return The actual bootloader protected size in bytes.
+ *
+ * \warning A Lock Error is issued if the Security bit is active.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ */
+#define flash_api_set_bootloader_protected_size flashcdw_set_bootloader_protected_size
+
+/*! \brief Tells whether external privileged fetch is locked.
+ *
+ * \return Whether external privileged fetch is locked.
+ */
+#define flash_api_is_external_privileged_fetch_locked flashcdw_is_external_privileged_fetch_locked
+
+/*! \brief Locks or unlocks external privileged fetch.
+ *
+ * \param lock Whether to lock external privileged fetch: \c TRUE or \c FALSE.
+ *
+ * \warning A Lock Error is issued if the Security bit is active.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ */
+#define flash_api_lock_external_privileged_fetch flashcdw_lock_external_privileged_fetch
+
+/*! \brief Tells whether the region of a page is locked.
+ *
+ * \param page_number The page number:
+ * \arg \c 0 to <tt>(flash_api_get_page_count() - 1)</tt>: a page number within
+ * the flash array;
+ * \arg <tt>< 0</tt>: the current page number.
+ *
+ * \return Whether the region of the specified page is locked.
+ */
+#define flash_api_is_page_region_locked flashcdw_is_page_region_locked
+
+/*! \brief Tells whether a region is locked.
+ *
+ * \param region The region number: \c 0 to <tt>(AVR32_FLASHC_REGIONS - 1)</tt>.
+ *
+ * \return Whether the specified region is locked.
+ */
+#define flash_api_is_region_locked flashcdw_is_region_locked
+
+/*! \brief Locks or unlocks the region of a page.
+ *
+ * \param page_number The page number:
+ * \arg \c 0 to <tt>(flash_api_get_page_count() - 1)</tt>: a page number within
+ * the flash array;
+ * \arg <tt>< 0</tt>: the current page number.
+ * \param lock Whether to lock the region of the specified page: \c TRUE or
+ * \c FALSE.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ */
+#define flash_api_lock_page_region flashcdw_lock_page_region
+
+/*! \brief Locks or unlocks a region.
+ *
+ * \param region The region number: \c 0 to <tt>(AVR32_FLASHC_REGIONS - 1)</tt>.
+ * \param lock Whether to lock the specified region: \c TRUE or \c FALSE.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ */
+#define flash_api_lock_region flashcdw_lock_region
+
+/*! \brief Locks or unlocks all regions.
+ *
+ * \param lock Whether to lock the regions: \c TRUE or \c FALSE.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ */
+#define flash_api_lock_all_regions flashcdw_lock_all_regions
+
+//! @}
+
+
+/*! \name Access to General-Purpose Fuses
+ */
+//! @{
+
+/*! \brief Reads a general-purpose fuse bit.
+ *
+ * \param gp_fuse_bit The general-purpose fuse bit: \c 0 to \c 63.
+ *
+ * \return The value of the specified general-purpose fuse bit.
+ *
+ * \note The actual number of general-purpose fuse bits implemented by hardware
+ * is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
+ * fixed at 1 by hardware.
+ */
+#define flash_api_read_gp_fuse_bit flashcdw_read_gp_fuse_bit
+
+/*! \brief Reads a general-purpose fuse bit-field.
+ *
+ * \param pos The bit-position of the general-purpose fuse bit-field: \c 0 to
+ * \c 63.
+ * \param width The bit-width of the general-purpose fuse bit-field: \c 0 to
+ * \c 64.
+ *
+ * \return The value of the specified general-purpose fuse bit-field.
+ *
+ * \note The actual number of general-purpose fuse bits implemented by hardware
+ * is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
+ * fixed at 1 by hardware.
+ */
+#define flash_api_read_gp_fuse_bitfield flashcdw_read_gp_fuse_bitfield
+
+/*! \brief Reads a general-purpose fuse byte.
+ *
+ * \param gp_fuse_byte The general-purpose fuse byte: \c 0 to \c 7.
+ *
+ * \return The value of the specified general-purpose fuse byte.
+ *
+ * \note The actual number of general-purpose fuse bits implemented by hardware
+ * is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
+ * fixed at 1 by hardware.
+ */
+#define flash_api_read_gp_fuse_byte flashcdw_read_gp_fuse_byte
+
+/*! \brief Reads all general-purpose fuses.
+ *
+ * \return The value of all general-purpose fuses as a word.
+ *
+ * \note The actual number of general-purpose fuse bits implemented by hardware
+ * is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
+ * fixed at 1 by hardware.
+ */
+#define flash_api_read_all_gp_fuses flashcdw_read_all_gp_fuses
+
+/*! \brief Erases a general-purpose fuse bit.
+ *
+ * \param gp_fuse_bit The general-purpose fuse bit: \c 0 to \c 63.
+ * \param check Whether to check erase: \c TRUE or \c FALSE.
+ *
+ * \return Whether the erase succeeded or always \c TRUE if erase check was not
+ * requested.
+ *
+ * \warning A Lock Error is issued if the Security bit is active and the command
+ * is applied to BOOTPROT or EPFL fuses.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ *
+ * \note An erase operation can only set bits.
+ *
+ * \note The actual number of general-purpose fuse bits implemented by hardware
+ * is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
+ * fixed at 1 by hardware.
+ */
+#define flash_api_erase_gp_fuse_bit flashcdw_erase_gp_fuse_bit
+
+/*! \brief Erases a general-purpose fuse bit-field.
+ *
+ * \param pos The bit-position of the general-purpose fuse bit-field: \c 0 to
+ * \c 63.
+ * \param width The bit-width of the general-purpose fuse bit-field: \c 0 to
+ * \c 64.
+ * \param check Whether to check erase: \c TRUE or \c FALSE.
+ *
+ * \return Whether the erase succeeded or always \c TRUE if erase check was not
+ * requested.
+ *
+ * \warning A Lock Error is issued if the Security bit is active and the command
+ * is applied to BOOTPROT or EPFL fuses.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ *
+ * \note An erase operation can only set bits.
+ *
+ * \note The actual number of general-purpose fuse bits implemented by hardware
+ * is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
+ * fixed at 1 by hardware.
+ */
+#define flash_api_erase_gp_fuse_bitfield flashcdw_erase_gp_fuse_bitfield
+
+/*! \brief Erases a general-purpose fuse byte.
+ *
+ * \param gp_fuse_byte The general-purpose fuse byte: \c 0 to \c 7.
+ * \param check Whether to check erase: \c TRUE or \c FALSE.
+ *
+ * \return Whether the erase succeeded or always \c TRUE if erase check was not
+ * requested.
+ *
+ * \warning A Lock Error is issued if the Security bit is active.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ *
+ * \note An erase operation can only set bits.
+ *
+ * \note The actual number of general-purpose fuse bits implemented by hardware
+ * is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
+ * fixed at 1 by hardware.
+ */
+#define flash_api_erase_gp_fuse_byte flashcdw_erase_gp_fuse_byte
+
+/*! \brief Erases all general-purpose fuses.
+ *
+ * \param check Whether to check erase: \c TRUE or \c FALSE.
+ *
+ * \return Whether the erase succeeded or always \c TRUE if erase check was not
+ * requested.
+ *
+ * \warning A Lock Error is issued if the Security bit is active.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ *
+ * \note An erase operation can only set bits.
+ *
+ * \note The actual number of general-purpose fuse bits implemented by hardware
+ * is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
+ * fixed at 1 by hardware.
+ */
+#define flash_api_erase_all_gp_fuses flashcdw_erase_all_gp_fuses
+
+/*! \brief Writes a general-purpose fuse bit.
+ *
+ * \param gp_fuse_bit The general-purpose fuse bit: \c 0 to \c 63.
+ * \param value The value of the specified general-purpose fuse bit.
+ *
+ * \warning A Lock Error is issued if the Security bit is active and the command
+ * is applied to BOOTPROT or EPFL fuses.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ *
+ * \note A write operation can only clear bits.
+ *
+ * \note The actual number of general-purpose fuse bits implemented by hardware
+ * is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
+ * fixed at 1 by hardware.
+ */
+#define flash_api_write_gp_fuse_bit flashcdw_write_gp_fuse_bit
+
+/*! \brief Writes a general-purpose fuse bit-field.
+ *
+ * \param pos The bit-position of the general-purpose fuse bit-field: \c 0 to
+ * \c 63.
+ * \param width The bit-width of the general-purpose fuse bit-field: \c 0 to
+ * \c 64.
+ * \param value The value of the specified general-purpose fuse bit-field.
+ *
+ * \warning A Lock Error is issued if the Security bit is active and the command
+ * is applied to BOOTPROT or EPFL fuses.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ *
+ * \note A write operation can only clear bits.
+ *
+ * \note The actual number of general-purpose fuse bits implemented by hardware
+ * is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
+ * fixed at 1 by hardware.
+ */
+#define flash_api_write_gp_fuse_bitfield flashcdw_write_gp_fuse_bitfield
+
+/*! \brief Writes a general-purpose fuse byte.
+ *
+ * \param gp_fuse_byte The general-purpose fuse byte: \c 0 to \c 7.
+ * \param value The value of the specified general-purpose fuse byte.
+ *
+ * \warning A Lock Error is issued if the Security bit is active.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ *
+ * \note A write operation can only clear bits.
+ *
+ * \note The actual number of general-purpose fuse bits implemented by hardware
+ * is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
+ * fixed at 1 by hardware.
+ */
+#define flash_api_write_gp_fuse_byte flashcdw_write_gp_fuse_byte
+
+/*! \brief Writes all general-purpose fuses.
+ *
+ * \param value The value of all general-purpose fuses as a word.
+ *
+ * \warning A Lock Error is issued if the Security bit is active.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ *
+ * \note A write operation can only clear bits.
+ *
+ * \note The actual number of general-purpose fuse bits implemented by hardware
+ * is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
+ * fixed at 1 by hardware.
+ */
+#define flash_api_write_all_gp_fuses flashcdw_write_all_gp_fuses
+
+/*! \brief Sets a general-purpose fuse bit with the appropriate erase and write
+ * operations.
+ *
+ * \param gp_fuse_bit The general-purpose fuse bit: \c 0 to \c 63.
+ * \param value The value of the specified general-purpose fuse bit.
+ *
+ * \warning A Lock Error is issued if the Security bit is active and the command
+ * is applied to BOOTPROT or EPFL fuses.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ *
+ * \note The actual number of general-purpose fuse bits implemented by hardware
+ * is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
+ * fixed at 1 by hardware.
+ */
+#define flash_api_set_gp_fuse_bit flashcdw_set_gp_fuse_bit
+
+/*! \brief Sets a general-purpose fuse bit-field with the appropriate erase and
+ * write operations.
+ *
+ * \param pos The bit-position of the general-purpose fuse bit-field: \c 0 to
+ * \c 63.
+ * \param width The bit-width of the general-purpose fuse bit-field: \c 0 to
+ * \c 64.
+ * \param value The value of the specified general-purpose fuse bit-field.
+ *
+ * \warning A Lock Error is issued if the Security bit is active and the command
+ * is applied to BOOTPROT or EPFL fuses.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ *
+ * \note The actual number of general-purpose fuse bits implemented by hardware
+ * is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
+ * fixed at 1 by hardware.
+ */
+#define flash_api_set_gp_fuse_bitfield flashcdw_set_gp_fuse_bitfield
+
+/*! \brief Sets a general-purpose fuse byte with the appropriate erase and write
+ * operations.
+ *
+ * \param gp_fuse_byte The general-purpose fuse byte: \c 0 to \c 7.
+ * \param value The value of the specified general-purpose fuse byte.
+ *
+ * \warning A Lock Error is issued if the Security bit is active.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ *
+ * \note The actual number of general-purpose fuse bits implemented by hardware
+ * is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
+ * fixed at 1 by hardware.
+ */
+#define flash_api_set_gp_fuse_byte flashcdw_set_gp_fuse_byte
+
+/*! \brief Sets all general-purpose fuses with the appropriate erase and write
+ * operations.
+ *
+ * \param value The value of all general-purpose fuses as a word.
+ *
+ * \warning A Lock Error is issued if the Security bit is active.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ *
+ * \note The actual number of general-purpose fuse bits implemented by hardware
+ * is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
+ * fixed at 1 by hardware.
+ */
+#define flash_api_set_all_gp_fuses flashcdw_set_all_gp_fuses
+
+//! @}
+
+
+/*! \name Access to Flash Pages
+ */
+//! @{
+
+/*! \brief Clears the page buffer.
+ *
+ * This command resets all bits in the page buffer to one. Write accesses to the
+ * page buffer can only change page buffer bits from one to zero.
+ *
+ * \warning The page buffer is not automatically reset after a page write.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ */
+#define flash_api_clear_page_buffer flashcdw_clear_page_buffer
+
+/*! \brief Tells whether the page to which the last Quick Page Read or Quick
+ * Page Read User Page command was applied was erased.
+ *
+ * \return Whether the page to which the last Quick Page Read or Quick Page Read
+ * User Page command was applied was erased.
+ */
+#define flash_api_is_page_erased flashcdw_is_page_erased
+
+/*! \brief Applies the Quick Page Read command to a page.
+ *
+ * \param page_number The page number:
+ * \arg \c 0 to <tt>(flash_api_get_page_count() - 1)</tt>: a page number within
+ * the flash array;
+ * \arg <tt>< 0</tt>: the current page number.
+ *
+ * \return Whether the specified page is erased.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ */
+#define flash_api_quick_page_read flashcdw_quick_page_read
+
+/*! \brief Erases a page.
+ *
+ * \param page_number The page number:
+ * \arg \c 0 to <tt>(flash_api_get_page_count() - 1)</tt>: a page number within
+ * the flash array;
+ * \arg <tt>< 0</tt>: the current page number.
+ * \param check Whether to check erase: \c TRUE or \c FALSE.
+ *
+ * \return Whether the erase succeeded or always \c TRUE if erase check was not
+ * requested.
+ *
+ * \warning A Lock Error is issued if the command is applied to a page belonging
+ * to a locked region or to the bootloader protected area.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ *
+ * \note An erase operation can only set bits.
+ */
+#define flash_api_erase_page flashcdw_erase_page
+
+/*! \brief Erases all pages within the flash array.
+ *
+ * \param check Whether to check erase: \c TRUE or \c FALSE.
+ *
+ * \return Whether the erase succeeded or always \c TRUE if erase check was not
+ * requested.
+ *
+ * \warning A Lock Error is issued if at least one region is locked or the
+ * bootloader protection is active.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ *
+ * \note An erase operation can only set bits.
+ */
+#define flash_api_erase_all_pages flashcdw_erase_all_pages
+
+/*! \brief Writes a page from the page buffer.
+ *
+ * \param page_number The page number:
+ * \arg \c 0 to <tt>(flash_api_get_page_count() - 1)</tt>: a page number within
+ * the flash array;
+ * \arg <tt>< 0</tt>: the current page number.
+ *
+ * \warning A Lock Error is issued if the command is applied to a page belonging
+ * to a locked region or to the bootloader protected area.
+ *
+ * \warning The page buffer is not automatically reset after a page write.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ *
+ * \note A write operation can only clear bits.
+ */
+#define flash_api_write_page flashcdw_write_page
+
+/*! \brief Issues a Quick Page Read User Page command to the FLASHC.
+ *
+ * \return Whether the User page is erased.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ */
+#define flash_api_quick_user_page_read flashcdw_quick_user_page_read
+
+/*! \brief Erases the User page.
+ *
+ * \param check Whether to check erase: \c TRUE or \c FALSE.
+ *
+ * \return Whether the erase succeeded or always \c TRUE if erase check was not
+ * requested.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ *
+ * \note An erase operation can only set bits.
+ */
+#define flash_api_erase_user_page flashcdw_erase_user_page
+
+/*! \brief Writes the User page from the page buffer.
+ *
+ * \warning The page buffer is not automatically reset after a page write.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ *
+ * \note A write operation can only clear bits.
+ */
+#define flash_api_write_user_page flashcdw_write_user_page
+
+/*! \brief Copies \a nbytes bytes to the flash destination pointed to by \a dst
+ * from the repeated \a src source byte.
+ *
+ * The destination areas that are not within the flash array or the User page
+ * are ignored.
+ *
+ * All pointer and size alignments are supported.
+ *
+ * \param dst Pointer to flash destination.
+ * \param src Source byte.
+ * \param nbytes Number of bytes to set.
+ * \param erase Whether to erase before writing: \c TRUE or \c FALSE.
+ *
+ * \return The value of \a dst.
+ *
+ * \warning This function may be called with \a erase set to \c FALSE only if
+ * the destination consists only of erased words, i.e. this function
+ * can not be used to write only one bit of a previously written word.
+ * E.g., if \c 0x00000001 then \c 0xFFFFFFFE are written to a word, the
+ * resulting value in flash may be different from \c 0x00000000.
+ *
+ * \warning A Lock Error is issued if the command is applied to pages belonging
+ * to a locked region or to the bootloader protected area.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ */
+#define flash_api_memset8 flashcdw_memset8
+
+/*! \brief Copies \a nbytes bytes to the flash destination pointed to by \a dst
+ * from the repeated \a src big-endian source half-word.
+ *
+ * The destination areas that are not within the flash array or the User page
+ * are ignored.
+ *
+ * All pointer and size alignments are supported.
+ *
+ * \param dst Pointer to flash destination.
+ * \param src Source half-word.
+ * \param nbytes Number of bytes to set.
+ * \param erase Whether to erase before writing: \c TRUE or \c FALSE.
+ *
+ * \return The value of \a dst.
+ *
+ * \warning This function may be called with \a erase set to \c FALSE only if
+ * the destination consists only of erased words, i.e. this function
+ * can not be used to write only one bit of a previously written word.
+ * E.g., if \c 0x00000001 then \c 0xFFFFFFFE are written to a word, the
+ * resulting value in flash may be different from \c 0x00000000.
+ *
+ * \warning A Lock Error is issued if the command is applied to pages belonging
+ * to a locked region or to the bootloader protected area.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ */
+#define flash_api_memset16 flashcdw_memset16
+
+/*! \brief Copies \a nbytes bytes to the flash destination pointed to by \a dst
+ * from the repeated \a src big-endian source word.
+ *
+ * The destination areas that are not within the flash array or the User page
+ * are ignored.
+ *
+ * All pointer and size alignments are supported.
+ *
+ * \param dst Pointer to flash destination.
+ * \param src Source word.
+ * \param nbytes Number of bytes to set.
+ * \param erase Whether to erase before writing: \c TRUE or \c FALSE.
+ *
+ * \return The value of \a dst.
+ *
+ * \warning This function may be called with \a erase set to \c FALSE only if
+ * the destination consists only of erased words, i.e. this function
+ * can not be used to write only one bit of a previously written word.
+ * E.g., if \c 0x00000001 then \c 0xFFFFFFFE are written to a word, the
+ * resulting value in flash may be different from \c 0x00000000.
+ *
+ * \warning A Lock Error is issued if the command is applied to pages belonging
+ * to a locked region or to the bootloader protected area.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ */
+#define flash_api_memset32 flashcdw_memset32
+
+/*! \brief Copies \a nbytes bytes to the flash destination pointed to by \a dst
+ * from the repeated \a src big-endian source double-word.
+ *
+ * The destination areas that are not within the flash array or the User page
+ * are ignored.
+ *
+ * All pointer and size alignments are supported.
+ *
+ * \param dst Pointer to flash destination.
+ * \param src Source double-word.
+ * \param nbytes Number of bytes to set.
+ * \param erase Whether to erase before writing: \c TRUE or \c FALSE.
+ *
+ * \return The value of \a dst.
+ *
+ * \warning This function may be called with \a erase set to \c FALSE only if
+ * the destination consists only of erased words, i.e. this function
+ * can not be used to write only one bit of a previously written word.
+ * E.g., if \c 0x00000001 then \c 0xFFFFFFFE are written to a word, the
+ * resulting value in flash may be different from \c 0x00000000.
+ *
+ * \warning A Lock Error is issued if the command is applied to pages belonging
+ * to a locked region or to the bootloader protected area.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ */
+#define flash_api_memset64 flashcdw_memset64
+
+/*! \brief Copies \a nbytes bytes to the flash destination pointed to by \a dst
+ * from the repeated \a src big-endian source pattern.
+ *
+ * The destination areas that are not within the flash array or the User page
+ * are ignored.
+ *
+ * All pointer and size alignments are supported.
+ *
+ * \param dst Pointer to flash destination.
+ * \param src Source double-word.
+ * \param src_width \a src width in bits: 8, 16, 32 or 64.
+ * \param nbytes Number of bytes to set.
+ * \param erase Whether to erase before writing: \c TRUE or \c FALSE.
+ *
+ * \return The value of \a dst.
+ *
+ * \warning This function may be called with \a erase set to \c FALSE only if
+ * the destination consists only of erased words, i.e. this function
+ * can not be used to write only one bit of a previously written word.
+ * E.g., if \c 0x00000001 then \c 0xFFFFFFFE are written to a word, the
+ * resulting value in flash may be different from \c 0x00000000.
+ *
+ * \warning A Lock Error is issued if the command is applied to pages belonging
+ * to a locked region or to the bootloader protected area.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ */
+#define flash_api_memset flashcdw_memset
+
+/*! \brief Copies \a nbytes bytes to the flash destination pointed to by \a dst
+ * from the source pointed to by \a src.
+ *
+ * The destination areas that are not within the flash array or the User page
+ * are ignored.
+ *
+ * All pointer and size alignments are supported.
+ *
+ * \param dst Pointer to flash destination.
+ * \param src Pointer to source data.
+ * \param nbytes Number of bytes to copy.
+ * \param erase Whether to erase before writing: \c TRUE or \c FALSE.
+ *
+ * \return The value of \a dst.
+ *
+ * \warning If copying takes place between areas that overlap, the behavior is
+ * undefined.
+ *
+ * \warning This function may be called with \a erase set to \c FALSE only if
+ * the destination consists only of erased words, i.e. this function
+ * can not be used to write only one bit of a previously written word.
+ * E.g., if \c 0x00000001 then \c 0xFFFFFFFE are written to a word, the
+ * resulting value in flash may be different from \c 0x00000000.
+ *
+ * \warning A Lock Error is issued if the command is applied to pages belonging
+ * to a locked region or to the bootloader protected area.
+ *
+ * \note The FLASHC error status returned by \ref flash_api_is_lock_error and
+ * \ref flash_api_is_programming_error is updated.
+ */
+#define flash_api_memcpy flashcdw_memcpy
+
+//! @}
+#endif // __AVR32_ABI_COMPILER__
+
+#else
+#error "Unsupported flash controller"
+#endif
+
+#endif // _FLASH_API_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/intc.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/intc.c
new file mode 100644
index 0000000..3acef88
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/intc.c
@@ -0,0 +1,69 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief INTC driver for AVR32 UC3.
+ *
+ * AVR32 Interrupt Controller driver module.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with an INTC module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#include <avr32/io.h>
+#include "compiler.h"
+#include "intc.h"
+
+
+//! Exception Vector Base Address.
+extern void _evba;
+
+
+void INTC_register_interrupt(__int_handler handler, unsigned int irq,
+ unsigned int int_level)
+{
+ // Program the IPRX register of the IRQ group to set the interrupt priority
+ // level and the interrupt vector offset that will be fetched by the core
+ // interrupt system.
+ AVR32_INTC.ipr[irq / AVR32_INTC_MAX_NUM_IRQS_PER_GRP] =
+ ((((U32) handler - (U32) & _evba) <<
+ AVR32_INTC_IPR_AUTOVECTOR_OFFSET) &
+ AVR32_INTC_IPR_AUTOVECTOR_MASK) | ((int_level <<
+ AVR32_INTC_IPR_INTLEVEL_OFFSET) &
+ AVR32_INTC_IPR_INTLEVEL_MASK);
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/intc.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/intc.h
new file mode 100644
index 0000000..81a8ac3
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/intc.h
@@ -0,0 +1,94 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief INTC driver for AVR32 UC3.
+ *
+ * AVR32 Interrupt Controller driver module.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with an INTC module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#ifndef _INTC_H_
+#define _INTC_H_
+
+#include "compiler.h"
+
+
+//! Maximal number of interrupt request lines per group.
+#define AVR32_INTC_MAX_NUM_IRQS_PER_GRP 32
+
+//! Number of interrupt priority levels.
+#define AVR32_INTC_NUM_INT_LEVELS (1 << AVR32_INTC_IPR_INTLEVEL_SIZE)
+
+
+#ifdef __AVR32_ABI_COMPILER__ // Automatically defined when compiling for AVR32, not when assembling.
+
+//! Pointer to interrupt handler.
+#if (defined __GNUC__)
+typedef void (*__int_handler) (void);
+#elif (defined __ICCAVR32__)
+typedef void (__interrupt * __int_handler) (void);
+#endif
+
+
+/*! \brief Registers an interrupt handler.
+ *
+ * \param handler Interrupt handler to register.
+ * \param irq IRQ of the interrupt handler to register.
+ * \param int_level Interrupt priority level to assign to the group of this IRQ.
+ *
+ * \warning The interrupt handler must manage the `rete' instruction, what can
+ * be done thanks to pure assembly, inline assembly or the
+ * `__attribute__((__interrupt__))' C function attribute.
+ *
+ * \warning If several interrupt handlers of a same group are registered, all
+ * interrupts of this group will fetch the last interrupt handler
+ * registered for this group with the last registered interrupt
+ * priority level.
+ *
+ * \note Taken and adapted from Newlib.
+ */
+extern void INTC_register_interrupt(__int_handler handler, unsigned int irq,
+ unsigned int int_level);
+
+#endif // __AVR32_ABI_COMPILER__
+
+
+#endif // _INTC_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/isp.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/isp.c
new file mode 100644
index 0000000..35b7ca3
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/isp.c
@@ -0,0 +1,331 @@
+/**
+ * \file
+ *
+ * \brief In system programming to control security, memories and fuses
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "conf_isp.h"
+#include "board.h"
+#include "isp.h"
+#include "boot.h"
+#include "string.h"
+#include "flash_api.h"
+#include "udc.h"
+
+#if UC3C || UC3D
+// These defines are missing from or wrong
+// in the toolchain header file ip_xxx.h or part.h
+#ifndef AVR32_WDT_KEY_VALUE
+ #define AVR32_WDT_KEY_VALUE 0x00000055
+#endif
+// These defines are missing from or wrong
+// in the toolchain header file ip_xxx.h or part.h
+#ifndef AVR32_SCIF_RCOSC_FREQUENCY
+ #define AVR32_SCIF_RCOSC_FREQUENCY 115200
+#endif
+#endif
+
+extern void sysclk_reset(void);
+
+/**
+ * \name Memory APIs
+ */
+//@{
+
+//! Memory signature which store information about device
+static isp_mem_signature_t mem_signature;
+
+//! Memory bootloader which store information about bootloader
+static isp_mem_bootloader_t mem_bootloader = {
+ .version = BOOTLOADER_VERSION,
+ .id1 = 0,
+ .id2 = 0,
+};
+
+
+void mem_flash_read(void *dst, uint32_t src, uint16_t nbytes)
+{
+ memcpy(dst, FLASH_API_BASE_ADDRESS + src, nbytes);
+}
+
+void mem_flash_write(uint32_t dst, const void *src, uint16_t nbytes)
+{
+ flash_api_memcpy(FLASH_API_BASE_ADDRESS + dst, src, nbytes, FALSE);
+}
+
+void mem_security_read(void *dst, uint32_t src, uint16_t nbytes)
+{
+ if (nbytes) {
+ *(U8 *) dst = flash_api_is_security_bit_active();
+ }
+}
+
+void mem_security_write(uint32_t dst, const void *src, uint16_t nbytes)
+{
+ if (nbytes && *(U8 *) src) {
+ flash_api_activate_security_bit();
+ }
+}
+
+void mem_configuration_read(void *dst, uint32_t src, uint16_t nbytes)
+{
+ U8 *dest = dst;
+ while (nbytes--) {
+ *dest++ = flash_api_read_gp_fuse_bit(src++);
+ }
+}
+
+void mem_configuration_write(uint32_t dst, const void *src, uint16_t nbytes)
+{
+ const U8 *source = src;
+ while (nbytes--) {
+ flash_api_set_gp_fuse_bit(dst++, *source++);
+ }
+}
+
+static void mem_bootloader_read(void *dst, uint32_t src, uint16_t nbytes)
+{
+ memcpy(dst, &mem_bootloader + src, nbytes);
+}
+
+void mem_signature_read(void *dst, uint32_t src, uint16_t nbytes)
+{
+ memcpy(dst, &mem_signature + src, nbytes);
+}
+
+void mem_user_read(void *dst, uint32_t src, uint16_t nbytes)
+{
+ memcpy(dst, (U8 *) FLASH_API_USER_PAGE + src, nbytes);
+}
+
+
+void mem_user_write(uint32_t dst, const void *src, uint16_t nbytes)
+{
+ flash_api_memcpy(FLASH_API_USER_PAGE + dst, src, nbytes, TRUE);
+}
+
+//! Interface for memory flash
+const isp_mem_t isp_flash = {
+ .size = FLASH_API_SIZE,
+ .fnct_read = mem_flash_read,
+ .fnct_write = mem_flash_write,
+};
+
+//! Interface for bit security
+const isp_mem_t isp_security = {
+ .size = 1,
+ .fnct_read = mem_security_read,
+ .fnct_write = mem_security_write,
+};
+
+//! Interface for memory configuration
+const isp_mem_t isp_conf = {
+ .size = FLASH_API_GPF_NUM,
+ .fnct_read = mem_configuration_read,
+ .fnct_write = mem_configuration_write,
+};
+
+//! Interface for memory bootloader
+const isp_mem_t isp_bootloader = {
+ .size = sizeof(mem_bootloader),
+ .fnct_read = mem_bootloader_read,
+ .fnct_write = NULL,
+};
+
+//! Interface for memory signature
+const isp_mem_t isp_signature = {
+ .size = sizeof(mem_signature),
+ .fnct_read = mem_signature_read,
+ .fnct_write = NULL,
+};
+
+//! Interface for memory user
+const isp_mem_t isp_user = {
+ .size = FLASH_API_USER_PAGE_SIZE,
+ .fnct_read = mem_user_read,
+ .fnct_write = mem_user_write,
+};
+
+//! Interface for memory no available
+const isp_mem_t isp_no_available = {
+ .size = 0,
+ .fnct_read = NULL,
+ .fnct_write = NULL,
+};
+
+const isp_mems_t isp_memories = {
+ .flash = &isp_flash,
+ .eeprom = &isp_no_available,
+ .security = &isp_security,
+ .conf = &isp_conf,
+ .bootloader = &isp_bootloader,
+ .signature = &isp_signature,
+ .user = &isp_user,
+ .int_ram = &isp_no_available,
+ .ext_mem_cs0 = &isp_no_available,
+ .ext_mem_cs1 = &isp_no_available,
+ .ext_mem_cs2 = &isp_no_available,
+ .ext_mem_cs3 = &isp_no_available,
+ .ext_mem_cs4 = &isp_no_available,
+ .ext_mem_cs5 = &isp_no_available,
+ .ext_mem_cs6 = &isp_no_available,
+ .ext_mem_cs7 = &isp_no_available,
+ .ext_mem_df = &isp_no_available,
+};
+
+//@}
+
+
+void isp_init(void)
+{
+ uint32_t did_reg = Get_debug_register(AVR32_DID);
+ mem_signature.manufacture =
+ Rd_bitfield(did_reg, AVR32_DID_MID_MASK);
+ mem_signature.product_number_msb =
+ Rd_bitfield(did_reg, AVR32_DID_PN_MASK)>>8;
+ mem_signature.product_number_lsb =
+ Rd_bitfield(did_reg, AVR32_DID_PN_MASK);
+ mem_signature.product_revision =
+ Rd_bitfield(did_reg, AVR32_DID_RN_MASK);
+}
+
+bool isp_is_security(void)
+{
+ uint8_t value;
+ isp_security.fnct_read(&value, 0, 1);
+ return value;
+}
+
+#ifdef UDI_DFU_ATMEL_PROTOCOL_2_SPLIT_ERASE_CHIP
+bool isp_erase_chip(void)
+{
+ static uint16_t isp_page_number=0;
+ uint8_t isp_page_number_split;
+
+ if (isp_page_number==0) {
+ isp_page_number = flash_api_get_page_count();
+ flash_api_lock_all_regions(FALSE);
+ }
+ isp_page_number_split = 128;
+ while (isp_page_number && isp_page_number_split) {
+ flash_api_erase_page(--isp_page_number, FALSE);
+ isp_page_number_split--;
+ }
+ return (isp_page_number==0);
+}
+#else
+bool isp_erase_chip(void)
+{
+ flash_api_lock_all_regions(FALSE);
+ flash_api_erase_all_pages(FALSE);
+ return true;
+}
+#endif
+
+void isp_start_appli_rst(void)
+{
+ cpu_irq_disable();
+ AVR32_WDT.ctrl = AVR32_WDT_CTRL_EN_MASK |
+ (10 << AVR32_WDT_CTRL_PSEL_OFFSET) |
+#if (UC3C || UC3D)
+ AVR32_WDT_CTRL_CEN_MASK | AVR32_WDT_CTRL_DAR_MASK |
+#endif
+ (AVR32_WDT_KEY_VALUE << AVR32_WDT_CTRL_KEY_OFFSET);
+ AVR32_WDT.ctrl = AVR32_WDT_CTRL_EN_MASK |
+ (10 << AVR32_WDT_CTRL_PSEL_OFFSET) |
+#if (UC3C || UC3D)
+ AVR32_WDT_CTRL_CEN_MASK | AVR32_WDT_CTRL_DAR_MASK |
+#endif
+ ((~AVR32_WDT_KEY_VALUE << AVR32_WDT_CTRL_KEY_OFFSET) &
+ AVR32_WDT_CTRL_KEY_MASK);
+ while (1);
+}
+
+void isp_start_appli_norst(void)
+{
+ udc_stop(); // Stop USB device
+ sysclk_reset(); // Reset system clock
+
+ boot_program();
+}
+
+/**
+* Calculates the CRC-8-CCITT.
+*
+* CRC-8-CCITT is defined to be x^8 + x^2 + x + 1
+*
+* To use this function use the following template:
+*
+* crc = Crc8( crc, data );
+*/
+#define POLYNOMIAL (ISP_CFG1_CRC8_POLYNOMIAL << 7)
+static U8 Crc8(U8 inCrc, U8 inData)
+{
+ int i;
+ U16 data;
+
+ data = inCrc ^ inData;
+ data <<= 8;
+
+ for (i = 0; i < 8; i++) {
+ if ((data & 0x8000) != 0) {
+ data = data ^ POLYNOMIAL;
+ }
+ data = data << 1;
+ }
+ return (unsigned char)(data >> 8);
+}
+
+
+void isp_force_isp(bool force)
+{
+ uint32_t tempo;
+ U8 crc8 = 0;
+ int i;
+
+ // 1) Read the config word1 and set the ISP_FORCE bit to force.
+ tempo = (ISP_CFG1 & ~ISP_CFG1_FORCE_MASK)
+ | ((force << ISP_CFG1_FORCE_OFFSET) & ISP_CFG1_FORCE_MASK);
+
+ // 2) Compute the CRC8 and update the config word1
+ for (i = 24; i; i -= 8) // Compute the CRC8 on the 3 upper Bytes of the word.
+ crc8 = Crc8(crc8, tempo >> i);
+ tempo = (tempo & ~ISP_CFG1_CRC8_MASK)
+ | ((crc8 << ISP_CFG1_CRC8_OFFSET) & ISP_CFG1_CRC8_MASK);
+
+ // 3) Write the config word1
+ mem_user_write(ISP_CFG1_OFFSET, &tempo, 4);
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/main.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/main.c
new file mode 100644
index 0000000..fad56e0
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/main.c
@@ -0,0 +1,101 @@
+/**
+ * \file
+ *
+ * \brief Main functions
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "preprocessor.h"
+#include "board.h"
+#include "sysclk.h"
+#include "conf_usb.h"
+#include "udd.h"
+#include "udc.h"
+#include "udi_dfu_atmel.h"
+#include "isp.h"
+#if UC3D
+#include "gpio.h"
+#endif
+
+/*! \brief Main function. Execution starts here.
+ */
+int main(void)
+{
+#if UC3D
+ static const gpio_map_t USB_GPIO_MAP =
+ {
+ {AVR32_USBC_DP_PIN, AVR32_USBC_DP_FUNCTION},
+ {AVR32_USBC_DM_PIN, AVR32_USBC_DM_FUNCTION},
+ {AVR32_USBC_VBUS_PIN, AVR32_USBC_VBUS_FUNCTION}
+ };
+
+ // Assign GPIO pins to USB.
+ gpio_enable_module(USB_GPIO_MAP,
+ sizeof(USB_GPIO_MAP) / sizeof(USB_GPIO_MAP[0]));
+#endif
+ cpu_irq_enable();
+
+ sysclk_init();
+
+ // Start USB stack to authorize VBus monitoring
+ udc_start();
+
+ if (!udc_include_vbus_monitoring()) {
+ // VBUS monitoring is not available on this product
+ // thereby VBUS has to be considered as present
+ main_vbus_action(true);
+ }
+
+ while (true) {
+ }
+}
+
+void main_vbus_action(bool b_high)
+{
+ if (b_high) {
+ // Attach USB Device
+ udc_attach();
+ }else{
+ // Detach USB Device
+ udc_detach();
+ }
+}
+
+
+/**
+ * \mainpage ASF USB Device DFU
+ *
+ * TODO
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/main.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/main.h
new file mode 100644
index 0000000..5c191e8
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/avr32/main.h
@@ -0,0 +1,46 @@
+/**
+ * \file
+ *
+ * \brief Main functions
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _MAIN_H_
+#define _MAIN_H_
+
+/*! \brief Called when Vbus line state change
+ */
+void main_vbus_action(bool b_high);
+
+#endif // _MAIN_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128a1u/conf_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128a1u/conf_board.h
new file mode 100644
index 0000000..6825b7b
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128a1u/conf_board.h
@@ -0,0 +1,41 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Board configuration for spi example
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H_INCLUDED
+#define CONF_BOARD_H_INCLUDED
+
+#endif /* CONF_BOARD_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128a1u/conf_clock.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128a1u/conf_clock.h
new file mode 100644
index 0000000..3fb0b8c
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128a1u/conf_clock.h
@@ -0,0 +1,57 @@
+/**
+ * \file
+ *
+ * \brief Clock system configuration for clock example 1
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_CLOCK_H_INCLUDED
+#define CONF_CLOCK_H_INCLUDED
+
+//! Configuration using On-Chip RC oscillator
+//! Use external board OSC (8MHz)
+//! Clk USB = 48MHz (used by USB)
+//! Clk sys = 48MHz
+//! Clk cpu/per = 12MHz
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_RCOSC
+#define CONFIG_OSC_RC32_CAL 48000000UL
+
+#define CONFIG_OSC_AUTOCAL OSC_ID_RC32MHZ
+#define CONFIG_OSC_AUTOCAL_REF_OSC OSC_ID_USBSOF
+
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_RC32MHZ
+#define CONFIG_SYSCLK_PSADIV SYSCLK_PSADIV_2
+#define CONFIG_SYSCLK_PSBCDIV SYSCLK_PSBCDIV_1_2
+
+
+#endif /* CONF_CLOCK_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128a1u/conf_isp.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128a1u/conf_isp.h
new file mode 100644
index 0000000..f4f1219
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128a1u/conf_isp.h
@@ -0,0 +1,67 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief ISP configuration file.
+ *
+ * This file contains the possible external configuration of the ISP.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_ISP_H_
+#define _CONF_ISP_H_
+
+#include "compiler.h"
+#include "nvm.h"
+
+// Version of bootloader
+// Note: It is display in second and last position by FLIP "1.V.V"
+// Example: Verison 0x00 give 1.0.0
+// Example: Verison 0x03 give 1.0.3
+// Example: Verison 0x25 give 1.2.5
+#define BOOTLOADER_VERSION 0x01
+
+#if (FLASH_SIZE<=0x10000)
+// FLASH < 64KB, then bootloader 4KB and ISP is optimized
+// All memories (flash,eeprom,...) do not exced 64KB.
+#define ISP_SMALL_MEMORY_SIZE
+#endif
+
+#endif // _CONF_ISP_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128a1u/iar/atxmega128a1u_boot.xcl b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128a1u/iar/atxmega128a1u_boot.xcl
new file mode 100644
index 0000000..15386ba
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128a1u/iar/atxmega128a1u_boot.xcl
@@ -0,0 +1,71 @@
+
+
+
+
+// N O T E :
+// This is an experimental file autogenerated by an XSL transformation.
+// Read more about the purpose of this file and how it was generated here:
+// http://avrtools.norway.atmel.com/pmwiki/pmwiki.php?n=Software.XmegaFiles
+//////////////////////////////////////////////////////////////////////////////
+
+// Set up XLINK
+-ca90
+-w29
+
+// Memory size definitions for convenience
+// The '_..X_' prefix is used by C-SPY as an indication that the label should
+// not be displayed in the dissassembly window.
+
+-D_..X_FLASH_BASE=20002
+-D_..X_CODE_END=21FFF
+-D_..X_INTVEC_END=201FB
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Code (flash) segments
+-Z(CODE)INTVEC=201F4-201FF
+-Z(CODE)CODE,BOOT=201FC-_..X_CODE_END
+-Z(CODE)FARCODE=201FC-_..X_CODE_END
+-Z(CODE)INITTAB=201FC-_..X_CODE_END
+-Z(CODE)NEAR_ID=201FC-_..X_CODE_END
+
+
+
+
+-D_..X_SRAM_BASE=2040
+-D_..X_SRAM_TINY_END=FF
+-D_..X_SRAM_NEAR_END=FFFF
+-D_..X_SRAM_FAR_END=FFFFFF
+-D_..X_SRAM_HUGE_END=FFFFFF
+
+/*
+ * Modify the lines below to alter the size of the RSTACK, CSTACK and HEAP
+ * segments. These need to be fine tuned to suit your specific application.
+ */
+-D_..X_CSTACK_SIZE=1000 /* 4096 bytes for auto variables and register save. */
+-D_..X_RSTACK_SIZE=100 /* 256 bytes for return addresses, equivalent to */
+ /* 128 levels of calls, including interrupts. */
+-D_..X_NEAR_HEAP_SIZE=1000 /* 4096 bytes of heap. */
+-D_..X_HEAP_SIZE=1000 /* 4096 bytes of heap. */
+-D_..X_FAR_HEAP_SIZE=1000 /* 4096 bytes of heap. */
+-D_..X_HUGE_HEAP_SIZE=1000 /* 4096 bytes of heap. */
+//////////////////////////////////////////////////////////////////////////////
+// Data (SRAM, external ROM or external NV RAM) memory
+-Z(DATA)SRAM_NO_INIT=2000-2001
+-Z(DATA)TINY_I,TINY_Z,TINY_N=_..X_SRAM_BASE-_..X_SRAM_NEAR_END
+-Z(DATA)RSTACK+_..X_RSTACK_SIZE=_..X_SRAM_BASE-_..X_SRAM_NEAR_END
+-Z(DATA)NEAR_I,NEAR_Z,NEAR_N,NEAR_C=_..X_SRAM_BASE-_..X_SRAM_NEAR_END
+-Z(DATA)NEAR_HEAP+_..X_NEAR_HEAP_SIZE=_..X_SRAM_BASE-_..X_SRAM_NEAR_END
+//-Z(DATA)FAR_I=[10000-_..X_SRAM_FAR_END]/10000
+-Z(DATA)CSTACK+_..X_CSTACK_SIZE=[_..X_SRAM_BASE-_..X_SRAM_FAR_END]/10000
+-Z(DATA)HEAP+_..X_HEAP_SIZE=[_..X_SRAM_BASE-_..X_SRAM_FAR_END]/10000
+-Z(DATA)IOSTREAM_N#[_..X_SRAM_BASE-_..X_SRAM_FAR_END]/10000
+-Z(DATA)FAR_Z,FAR_N,FAR_C=[_..X_SRAM_BASE-_..X_SRAM_FAR_END]/10000
+-Z(DATA)FAR_HEAP+_..X_FAR_HEAP_SIZE=_..X_SRAM_BASE-_..X_SRAM_FAR_END
+-Z(DATA)HUGE_I,HUGE_Z,HUGE_N,HUGE_C=_..X_SRAM_BASE-_..X_SRAM_HUGE_END
+-Z(DATA)HUGE_HEAP+_..X_HUGE_HEAP_SIZE=_..X_SRAM_BASE-_..X_SRAM_HUGE_END
+
+
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128a1u/iar/cstartup.s90 b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128a1u/iar/cstartup.s90
new file mode 100644
index 0000000..dbbb984
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128a1u/iar/cstartup.s90
@@ -0,0 +1,195 @@
+;----------------------------------------------------------------------------
+;
+; This module contains the AVR C and EC++ startup
+;
+; File version: $Revision: 6648 $
+;
+;----------------------------------------------------------------------------
+
+
+#include "macros.m90"
+
+#define RST_STATUS 0x0078 ///< Reset Controller status
+#define RST_SRF_bp 5 ///< Software Reset Flag bit position
+#define RST_SRF_bm 0x20 ///< Software Reset Flag bit mask
+
+#define SWITCHPORT PORTF
+#define SWITCHPIN 0
+
+#define PORTF 0x06A0
+#define DIR 0
+#define DIRSET 1
+#define DIRCLR 2
+#define DIRTGL 3
+#define PORT_OUT 4
+#define OUTSET 5
+#define OUTCLR 6
+#define OUTTGL 7
+#define PORT_IN 8
+#define INTCTRL 9
+#define INT0MASK 10
+#define INT1MASK 11
+#define INTFLAGS 12
+#define reserved_0x0D 13
+#define reserved_0x0E 14
+#define reserved_0x0F 15
+#define PIN0CTRL 16
+
+
+;----------------------------------------------------------------------------
+; Set up the RESET segment with a reset vector
+;----------------------------------------------------------------------------
+ MODULE ?RESET
+ EXTERN ?C_STARTUP
+ PUBLIC __program_start
+ PUBLIC ?RESET
+
+ ASEG 0x20000
+__program_start:
+?RESET:
+ RJMP ?C_STARTUP
+
+ ENDMOD
+
+;----------------------------------------------------------------------------
+; Set up the INTVEC segment with a reset vector
+;----------------------------------------------------------------------------
+ MODULE ?VECT
+ COMMON INTVEC:CODE:ROOT(1) ; Align at an even address
+ EXTERN ?C_STARTUP
+ ENDMOD
+
+;----------------------------------------------------------------------------
+; Forward declarations of segments used in initialization
+;----------------------------------------------------------------------------
+ RSEG CSTACK:DATA:NOROOT(0)
+ RSEG RSTACK:DATA:NOROOT(0)
+
+;----------------------------------------------------------------------------
+; Perform C initialization
+;----------------------------------------------------------------------------
+ MODULE ?C_STARTUP
+ EXTERN main
+ EXTERN exit
+ EXTERN _exit
+
+ RSEG CODE:CODE:NOROOT(1)
+ PUBLIC ?C_STARTUP
+ PUBLIC __RESTART
+ EXTERN ?RESET
+
+__RESTART:
+?C_STARTUP:
+
+#if A90_POINTER_REG_SIZE > 2
+ PUBLIC ?zero_reg_initialization
+?zero_reg_initialization:
+ CLR R15
+ OUT RAMPD,R15
+#endif
+
+
+;----------------------------------------------------------------------------
+; Boot Process
+;----------------------------------------------------------------------------
+
+boot_process:
+ // Test Software reset
+ LDS R16,(RST_STATUS)
+ SBRC R16,RST_SRF_bp // Test Software Reset Flag
+ RJMP start_app_jmp
+
+ // Test ISP pin
+ STS (SWITCHPORT+DIR), R15
+ LDI R16,0x18
+ STS (SWITCHPORT+PIN0CTRL+SWITCHPIN), R16
+ LDI R16,0xFF
+tempo:
+ DEC R16
+ TST R16
+ BRNE tempo
+ LDS R16,(SWITCHPORT+PORT_IN)
+ SBRS R16,SWITCHPIN // test ISP pin active
+ RJMP start_boot // pin activated
+
+ // Test beginning of flash blank
+ LDI R30, 0
+ LDI R31, 0
+ ELPM R16, Z+
+ ELPM R17, Z
+ CPI R16, 255
+ BRNE start_app_jmp
+ CPI R17, 255
+ BRNE start_app_jmp
+
+ RJMP start_boot
+start_app_jmp:
+ JMP start_app
+
+;----------------------------------------------------------------------------
+; Call Bootloader
+;----------------------------------------------------------------------------
+ RSEG STARTBOOT:CODE:NOROOT(1), 0x201FC
+ PUBLIC start_boot
+start_boot:
+ RJMP ?SETUP_STACK
+
+;----------------------------------------------------------------------------
+; Set up the CSTACK and RSTACK pointers.
+;----------------------------------------------------------------------------
+ RSEG CODE:CODE:NOROOT(1)
+ EXTERN __segment_init
+ PUBLIC ?need_segment_init
+
+?SETUP_STACK:
+ ;; Return address stack (RSTACK)
+ LDI R16,LOW(SFE(RSTACK)-1)
+ OUT 0x3D,R16
+#if A90_POINTER_REG_SIZE > 1
+ LDI R16,HIGH(SFE(RSTACK)-1)
+ OUT 0x3E,R16
+#endif
+
+ ;; Data stack (CSTACK)
+ LDI Y0,LOW(SFE(CSTACK))
+#if A90_POINTER_REG_SIZE > 1
+#if MEMORY_MODEL == TINY_MEMORY_MODEL
+ LDI Y1,0
+#else
+ LDI Y1,HIGH(SFE(CSTACK))
+#endif
+#if A90_POINTER_REG_SIZE > 2
+ LDI Z0,HWRD(SFB(CSTACK))
+ OUT RAMPY,Z0
+#endif
+#endif
+?need_segment_init:
+ XCALL __segment_init
+ RCALL main
+
+;----------------------------------------------------------------------------
+; Call Application
+;----------------------------------------------------------------------------
+ EXTERN start_app_key
+
+start_app:
+ STS (SWITCHPORT+PIN0CTRL+SWITCHPIN), R15
+ LDS R16, start_app_key
+ LDS R17, (start_app_key + 1)
+ CPI R16, 0xAA
+ SBCI R17, 0x55
+ BREQ clear_rst_flags
+jump_0:
+ JMP 0
+
+// It is a start application launched by a batchisp start command
+// then clear reset flagS
+clear_rst_flags:
+ STS start_app_key, R15
+ STS (start_app_key + 1), R15
+ LDI R16,RST_SRF_bm
+ STS RST_STATUS,R16 // Clear Software Reset Flag
+ RJMP jump_0
+ END
+
+;----------------------------------------------------------------------------
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128a1u/iar/macros.m90 b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128a1u/iar/macros.m90
new file mode 100644
index 0000000..ae18cf3
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128a1u/iar/macros.m90
@@ -0,0 +1,180 @@
+;----------------------------------------------------------------------------
+;
+; MACROS.M90
+;
+; This module contains the A90/AVR C macros
+; used by cstartup.s90 and other assemble source.
+;
+; File version: $Revision: 1.8 $
+;
+;
+;----------------------------------------------------------------------------
+
+#if (((__TID__ >> 8) & 0x7F) != 90)
+#error This file should only be assembled by aa90 or aavr
+#endif
+
+#define A90_PROC_OPTION ((__TID__ >> 4) & 0x0F)
+
+/* Long or relative jumps and calls */
+#if (A90_PROC_OPTION == 0) || (A90_PROC_OPTION == 1)
+#define XCALL RCALL
+#define XJMP RJMP
+#else
+#define XCALL CALL
+#define XJMP JMP
+#endif
+
+/* Length of pointer registers (X/Y/Z) */
+#if (A90_PROC_OPTION == 0) || (A90_PROC_OPTION == 2)
+#define A90_POINTER_REG_SIZE 1
+#define A90_TINY_INDEX
+#else /*!(A90_PROC_OPTION == 0) || (A90_PROC_OPTION == 2)*/
+#if (A90_PROC_OPTION == 1) || (A90_PROC_OPTION == 3) || (A90_PROC_OPTION ==5)
+#define A90_POINTER_REG_SIZE 2
+#else /*!(A90_PROC_OPTION == 1) || (A90_PROC_OPTION == 3) || (A90_PROC_OPTION ==5)*/
+#if (A90_PROC_OPTION == 4) || (A90_PROC_OPTION == 6)
+#define A90_POINTER_REG_SIZE 3
+#define A90_EXTENDED_DATA
+#else /*!(A90_PROC_OPTION == 4) || (A90_PROC_OPTION == 6)*/
+#error Unknown processor option!!
+#endif /*!(A90_PROC_OPTION == 4) || (A90_PROC_OPTION == 6)*/
+#endif /*!(A90_PROC_OPTION == 1) || (A90_PROC_OPTION == 3) || (A90_PROC_OPTION ==5)*/
+#endif /*!(A90_PROC_OPTION == 0) || (A90_PROC_OPTION == 2)*/
+
+#if (A90_PROC_OPTION > 4)
+#define A90_LARGE_CODE
+#endif
+
+#if (A90_PROC_OPTION > 1)
+#define A90_HAS_POSSIBLE_ELPM
+#endif
+
+#ifdef A90_HAS_POSSIBLE_ELPM
+#ifdef __HAS_ELPM__
+#define A90_HAS_ELPM
+#else
+#ifndef SMALL_FLASH
+#define A90_HAS_ELPM
+#endif
+#endif
+#endif
+
+#if A90_PROC_OPTION > 1
+#define A90_24BIT_GENERIC
+#endif
+
+#if A90_PROC_OPTION < 2
+#define A90_16BIT_GENERIC
+#endif
+
+#ifdef __MEMORY_MODEL__
+
+#define TINY_MEMORY_MODEL 0
+#define SMALL_MEMORY_MODEL 1
+#define LARGE_MEMORY_MODEL 2
+#define GENERIC_MEMORY_MODEL 3
+#define HUGE_MEMORY_MODEL 4
+
+#if __MEMORY_MODEL__ == 1
+#undef MEMORY_MODEL
+#define MEMORY_MODEL TINY_MEMORY_MODEL
+#endif
+
+#if __MEMORY_MODEL__ == 2
+#undef MEMORY_MODEL
+#define MEMORY_MODEL SMALL_MEMORY_MODEL
+#endif
+
+#if __MEMORY_MODEL__ == 3
+#undef MEMORY_MODEL
+#define MEMORY_MODEL LARGE_MEMORY_MODEL
+#endif
+
+#if __MEMORY_MODEL__ == 4
+#undef MEMORY_MODEL
+#define MEMORY_MODEL GENERIC_MEMORY_MODEL
+#endif
+
+#if __MEMORY_MODEL__ == 5
+#undef MEMORY_MODEL
+#define MEMORY_MODEL HUGE_MEMORY_MODEL
+#endif
+
+#else
+
+#ifdef MEMORY_MODEL
+#define t 0
+#define s 1
+#define l 2
+#define g 3
+#define h 4
+
+#define TINY_MEMORY_MODEL 0
+#define SMALL_MEMORY_MODEL 1
+#define LARGE_MEMORY_MODEL 2
+#define GENERIC_MEMORY_MODEL 3
+#define HUGE_MEMORY_MODEL 4
+
+#if MEMORY_MODEL == t
+#undef MEMORY_MODEL
+#define MEMORY_MODEL TINY_MEMORY_MODEL
+#endif
+
+#if MEMORY_MODEL == s
+#undef MEMORY_MODEL
+#define MEMORY_MODEL SMALL_MEMORY_MODEL
+#endif
+
+#if MEMORY_MODEL == l
+#undef MEMORY_MODEL
+#define MEMORY_MODEL LARGE_MEMORY_MODEL
+#endif
+
+#if MEMORY_MODEL == g
+#undef MEMORY_MODEL
+#define MEMORY_MODEL GENERIC_MEMORY_MODEL
+#endif
+
+#if MEMORY_MODEL == h
+#undef MEMORY_MODEL
+#define MEMORY_MODEL HUGE_MEMORY_MODEL
+#endif
+
+#undef t
+#undef s
+#undef l
+#undef g
+#undef h
+#endif
+#endif
+
+/* Register nicknames */
+#define T0 R0
+#define T1 R1
+#define T2 R2
+#define T3 R3
+#define P0 R16
+#define P1 R17
+#define P2 R18
+#define P3 R19
+#define Q0 R20
+#define Q1 R21
+#define Q2 R22
+#define Q3 R23
+#define X0 R26
+#define X1 R27
+#define X2 R25
+#define Y0 R28
+#define Y1 R29
+#define Z0 R30
+#define Z1 R31
+#define Z2 R19
+
+/* I/O-Space Register nicknames */
+#define RAMPD 0x38
+#define RAMPX 0x39
+#define RAMPY 0x3A
+#define RAMPZ 0x3B
+#define EIND 0x3C
+#define SREG 0x3F
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128a1u/releases/atxmega128a1u-bootloader-usb-dfu-1.0.1/atxmega128a1u_bootloader_usb_dfu_101.hex b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128a1u/releases/atxmega128a1u-bootloader-usb-dfu-1.0.1/atxmega128a1u_bootloader_usb_dfu_101.hex
new file mode 100644
index 0000000..e26c999
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128a1u/releases/atxmega128a1u-bootloader-usb-dfu-1.0.1/atxmega128a1u_bootloader_usb_dfu_101.hex
@@ -0,0 +1,358 @@
+:020000022000DC
+:0200000005C138
+:1001F4000D94C7080D94F50825C040E04BBFF801E5
+:1002040058ED54BF20830895FF24F8BE0091780070
+:1002140005FD16C0F092A00608E10093B0060FEFAA
+:100224000A950023E9F70091A80600FFE5CFE0E076
+:10023400F0E0079116910F3F19F41F3F09F4DCCF4A
+:100244000D942F010FE30DBF01E20EBFCAE0DBE303
+:10025400E0E0EABF0F945F0BC1D0F092B0060C94BB
+:1002640000004091CA01E12FFF270093CA010491C5
+:100274004093CA0108954A951AF0000F111FFBCF4D
+:100284000895AF93BF93D8013BBF29BF01900D924E
+:10029400415050406040D1F7BF91AF910895FA9218
+:1002A400EA92DA92CA92BA92AA929A928A927A922A
+:1002B4006A925A924A92BA93AA939A938A93089505
+:1002C400FF84EE84DD84CC84BB84AA8499848884EE
+:1002D4007F806E805D804C80BB81AA8199818881FA
+:1002E400F0E0EC0FFD1FEF0108953BB72BBFF801C1
+:1002F4002091CA014093CA013DE930933400E89546
+:100304002093CA013BBF08953091CF0137FDFCCF44
+:100314003BB72BBFF8012091CA0113E21093CA0125
+:100324000A01E8952093CA013BBF08950A011B0105
+:10033400B901A801800191010D948E02E1E0EA93D4
+:100344000D94A5020A01A901980180010D940002EF
+:100354009A01AB010D9434020A01A90120E431E2AF
+:10036400200D311D0D94310B0A01A90120E232E266
+:10037400F7CF009190000093202200919100009308
+:100384002122009192000093222200919300009375
+:1003940023220895E0EDF1E030E03BBF008101FB52
+:1003A40000E000F90F270895089530E00091CF018F
+:1003B40007FDFBCF40E200E010E020E00F9477015E
+:1003C4000F948A0201E00895F89420917900216045
+:1003D40009E710E00F94FF00FFCFF6CF27E402EA0D
+:1003E40010E00F94FF000F945B0378940F946D0852
+:1003F4000F94A108FFCFE4E00D946E01B9010AD077
+:10040400105F98018B010F94310BECEC52D0077FF5
+:1004140000830895ECEC04D02081286020830895A3
+:10042400F1E030E03BBF08950F945D01C801A22FB5
+:10043400B091CA012DD012D007FDFDCF03E3009384
+:10044400CA013093C2019093C1018093C001A0936B
+:10045400C40105E327D0B093CA01CDCF30E00091A9
+:10046400CF0108950F945B01D801C9012A0107C087
+:10047400FC01D7DF2191CF018D01D6DF11968201D6
+:100484002FEF420E521E012B99F7E6E00D946C01FA
+:10049400EFEC0FD007FDFCCF008101FF02C006E3A3
+:1004A40001D008950093CA0121E00BEC11E00D94F2
+:1004B400FF00B6DF008108953093C2013093C1017B
+:1004C40008959A938A93802F9091CA01E1DFC6DF41
+:1004D40007FDFDCF03E30093CA0100E0EDDF0093C5
+:1004E400C0018093C40103950032C8F39093CA01FC
+:1004F400899199910895D6DF8093CA0189910895CD
+:100504008A93ADDF07FDFDCF8091CA0100E3F3CFED
+:1005140001D0F6CF0FEFD5CF1C0108018A01CB0122
+:10052400A001622F0BC0FA016BBF2691F80179DF9D
+:1005340021938F014F5F5F4F6F4F0197282F292B16
+:1005440091F7C10108950F94510122977A014B014B
+:10055400AA88280139011170802F952DD901801B9B
+:10056400910BA040B04007C07ADF07FDFDCF45E204
+:10057400002D0F947701082D092909F450C0BB24DC
+:10058400CC24DD24D394AA2071F0FC01ABBF0791E5
+:100594001691088319834881512F4F3F5F4F31F0E3
+:1005A400BB24B39403C00FEF08830983082D0929E2
+:1005B400B9F0481659066A067B0629F434D0088334
+:1005C400082D092969F08C019D010F5F1F4F2F4FE2
+:1005D4003F4F401651066206730611F424D0098376
+:1005E400488159818C019D010F9486018E5F9F4F34
+:1005F400AF4FBF4F0FEFC00ED01E0C2D0D2919F6B3
+:100604008C019D010050124020403040BB20002E40
+:1006140009F0AACF24DF07FDFDCF44E2A9CF22963B
+:10062400E1E10D9462010FEF800E901E01E0400E97
+:1006340000E0501E601E701EF7010BBF01917F0188
+:1006440008953FB7F8940A9519F00A9559F02AC00D
+:100654001830E6E56ED011F4016001C00E7F00830E
+:10066400E8E61DC0E6E565D0097F0083183021F473
+:1006740000810260008312C01F3F21F415D0008165
+:100684000460F8CF143051F40FD01FB7F894E0E5AC
+:100694000081046000831FBF06810683E0E60081B9
+:1006A400016000833FBF089500E807870BEB008BD0
+:1006B40008952497E0E7F0E007E01FEF30E03BBF48
+:1006C40011930A95D1F725E001E410E051D01CE123
+:1006D4002AD009831DE127D0088319810F3F1F4FBA
+:1006E40021F400E413E208831983088119810A8341
+:1006F4001B830A81009362000B810093630016D070
+:10070400026000831FBFE1E5008101FFFCCF21E00F
+:1007140000E42DD01FEF02E094DF08D00E7F0083A9
+:100724001FBF2496089502E00D9433011FB7F89477
+:10073400E0E5F0E0FBBF008108952FB7F894109531
+:1007440004D0012300832FBF0895F0E0E02FE05987
+:10075400FF4F30E03BBFEFCF063011F428E101C07A
+:1007640020E0236004E403D010E400E0E6CF10E0CE
+:100774000D94FF000F945D013CD12681222311F4D6
+:1007840000E037C042815381DA0190E039BF6D91B6
+:100794007C91DB01149639BF2C91021788F764838E
+:1007A4007583DA014D915C91DA01129639BF2D916E
+:1007B4003C91420F531F07C06C9104801580060EB4
+:1007C400191E04821582A481B581A417B507C0F649
+:1007D400119699BF2C911197243071F712962C9190
+:1007E4001297021749F713962C911397121721F7B2
+:1007F40001E0E4E00D946E018A93802F10E032D181
+:1008040011F400E006C016D0038114812581CFD1F4
+:1008140001E0899108958A93802F24D149F00AD068
+:10082400008111812281C3D1002311F001E001C0B4
+:1008340000E0EFCFE0912622F091272290D18BD1D6
+:1008440022E0829F000D111DF8010081F181E02F4B
+:100854000895AA9320D131F0A0E002C01AD1A39543
+:10086400B1D1E0F300E000932A2201E010E07AD154
+:100874001BBF00831183A99108950091B42A0F77B7
+:100884000D94B8080091B42A002329F00A9541F088
+:100894000A9519F126C024E030E00BEB11E21BC0ED
+:1008A40025E00FEB11E240E050E0F801E40FF51F02
+:1008B4005BBF608132E0439FF001E956FE4D6283E5
+:1008C40053834395421780F3220F2E5F2093972181
+:1008D40030E007E911E2B9D005C021E105EC11E2ED
+:1008E400E2CF02C001E0089500E00895BA93AA930C
+:1008F400A2EBBAE233D1628123810EE012E22A959F
+:1009040029F02A95B9F02A9599F11BC0F801408184
+:100914005181FA0120818A0198D0FD014BD1428591
+:1009240053850417150710F40287138701E0A99172
+:10093400B9910895F8014081F181E42F218962176A
+:1009440010F000E0F4CFF80106D124E0629F7FD0DC
+:100954004081F181E42F22813381F801042F118138
+:1009640074D022E0FBD00085F185E02F2183D5CF20
+:1009740089DF002391F6E5CF9A938A9382EB9AE27A
+:10098400FC018CD021F000E08991999108950F9495
+:10099400BB080023C1F3E0910E22F0910F22DFD0B7
+:1009A4002189FC010281201770F353DFFC01D7D0A9
+:1009B400028100932A2220912A22222311F401E0A9
+:1009C400E3CF009110221091112234E0239F000DF7
+:1009D400111D04501040C6D00283138380E009D057
+:1009E4003AD068F710E0082F16DF002361F28395F0
+:1009F400F6CFE4E2F2E2B3C00F945D010091B82AAD
+:100A04001091B92A013020E0104011F000E01CC020
+:100A1400A4E2B2E240D0D1F38091B62AFD012BBF0B
+:100A24001AD0A0F710E0082F1DD081F3FD01C6D025
+:100A3400829F0DD00ADFB8D000932B2221E030E052
+:100A440017968D0102D001E0D4CE0D94BE08000D9E
+:100A5400111DF80108950281F381E02FB9D08017A8
+:100A640008950A2F87DE00230895AA938A93E2EB60
+:100A7400FAE214D011F000E00AC00DD0E1F3A48131
+:100A8400828107D00023B9F3182F0A2FC4DE89917D
+:100A9400F2CE0A2FB1CE00912A22E5CF8BD0012BC2
+:100AA4000895E2EBFAE25BD0008107FF2AC0468199
+:100AB4005781042F052BA9F100810F71E1F4018105
+:100AC400002329F0065061F0025059F02AC0423048
+:100AD40000E0504009F0089522E004E212E209C067
+:100AE40005CF413000E0504009F0089521E00AE2CA
+:100AF40012E2ABDFF7CE0130A1F401810A3089F4B0
+:100B04007BCF0F7111F501810A9599F0025049F0DC
+:100B1400025029F0025029F00250B1F002C082D0F4
+:100B240009F0E2CE0FE314E021E00487158726875D
+:100B3400E1CF78D0B1F70FD00130104091F712D047
+:100B440000810D7F0083D6CF17CF013051F701818B
+:100B54000B3039F78ACF028113810895FD0130E00B
+:100B64003BBF0895E4E2F2E208950F945E0193DF3F
+:100B740011F400E016C0A091B62A24D0D0F710E0FA
+:100B840070DFB9F3EFDF1AD0A29F61DF808191811A
+:100B9400FC010AD0102F65DF61F3FC010BD0208526
+:100BA40006D0E3E00D946F01018512852385F801D9
+:100BB4002CBF1994D4DF0681178108950CD0CBDFA4
+:100BC40022E00895E4E2F2E206D002D0A0170895EC
+:100BD4003CDE04810895C3DF0281F38138CEE2EB69
+:100BE400FAE200E00BBF02870387048705870687C4
+:100BF4000787008B018B008107FF03C013D009F422
+:100C040073CE0091B22A007621F44BDF002309F061
+:100C140069CE0091B22A0F71013091F7A6DF00234B
+:100C2400B9F7EECF068117813ACF5BD00F94BB01A1
+:100C34000F94CC0100934A22DBC0089510D2A2EB9A
+:100C4400BAE20091B22A0076003209F048C010914D
+:100C5400B32A90E099BF0C9107FF18C0125049F0D5
+:100C64001A95C9F526E030E006E312E298D101E0D6
+:100C740037C04AD09BBF408D518D628D403059079B
+:100C8400690749F1FA016CBF19952AC01A9521F038
+:100C9400135009F526D0EBCFB2D0438D548D658D1A
+:100CA40000E0D5D059F00F94D60109E816E021E010
+:100CB400FD019BBF048715872687D9CF20E40CE468
+:100CC40012E26DD100E916E021E0FD019BBF078728
+:100CD400108B218BCCCF18D00FE09BBF8CD000E0C1
+:100CE400A2C101C01AC100E01AD1E2EBFAE200E0AD
+:100CF4000BBF0787008B018B04870587068704D009
+:100D0400038F048F058F0895ECE2F2E2089577D003
+:100D1400038D148D258DF8012CBF1994BA93AA93D1
+:100D2400E0DFD8D000E0FD010BBF008F018F028F00
+:100D340001E00F94D601F0914C22E0914D22E05055
+:100D4400F14071F0E050F24069F0319769F0EF5FE3
+:100D5400F04061F0339799F0E050F24001F121C086
+:100D640029D020C04ED01EC066D01CC00F94D7011D
+:100D7400002300E0B9F000934A2201E013C000917F
+:100D84004E22002321F406EE11E021E003C00FEE11
+:100D940011E021E00BD0038F148F258FEECF5BD0B1
+:100DA40001C000E0A991B991089594D0FD0130E00B
+:100DB4003BBF089524D0068D178D012309F0ABC0E5
+:100DC40047815085618543D011F414D002C02ED0E0
+:100DD40009F4A3C020E038E0E0D00CE318E021E0FF
+:100DE400E2EBFAE2E4DF0787108B218B01C0D5D058
+:100DF40001E0089503E002870AE00687089584DF8E
+:100E0400D6CF14D019F01FD011F4F4DF86C0068DAC
+:100E1400178D012321F00DE817E021E003C005EC54
+:100E240017E021E0008F118F228FE2CF0EE412E24F
+:100E34007CD000230895FADF19F005D011F4DADF2D
+:100E44006CC0AFD0D5CFDBDF4481558166814030A3
+:100E540050406040089503D1249700914F2210918F
+:100E64004E22112319F01A95A9F031C0013140F036
+:100E740008E0009336220AE000933A2200E028C0FA
+:100E84002CD000E0ACE3B2E209BF0D930D930D93B7
+:100E94000C931DC040E0488349834A834B830B83F2
+:100EA400009150220A8316D048815981602F7B819A
+:100EB40090E099BF0D911D912D913C91139740178E
+:100EC400510762077307A0F6FD019BBFC0D001E084
+:100ED4002496A9C0ACE2B2E20895033041F0023096
+:100EE40031F0043021F0053011F011E001C010E0C0
+:100EF40010934B2212E0019FF001EB58FE4D57DF97
+:100F04000080F1810CE212E220E0E02D4AE050E0A2
+:100F140060E00D94430103E002D000E008950093E3
+:100F2400362202E000933A2208950F9459013DDFDE
+:100F340062897389F8011080512D0180402DFD01D3
+:100F4400008A118A628B738B1B01F8011280038063
+:100F5400FD014080518062807380041415042604CE
+:100F6400370420F008E047DF00E00AC0041A150A3D
+:100F7400260A370A01E0000E131E231E331E56D024
+:100F8400E8E00D946A013BDF2488358954D0222D92
+:100F940063D035DF248935892ACF0CE812E20D9419
+:100FA400BE085DD097DF02DF448955896689778959
+:100FB400042F052B062B072BB1F1403008E0500716
+:100FC4006040704010F4CA0102C080E098E00A0159
+:100FD40026883788081A190A230A330A27D0392F92
+:100FE4002AD0282F39D00CE812E208C0FD013BBFFB
+:100FF40029D04F5F5F4F6F4F7F4F29D09C010197DE
+:10100400232B89F2F801D3DE21918F012F3F71F355
+:1010140005E00093362203E318E021E0FD013BBF25
+:10102400008F118F228FE4E00D946E01048A158ADB
+:10103400268A378A089506D0048115812681F8010D
+:101044002CBF089540895189628973890895408B22
+:10105400518B628B738B08950CE812E219940D94F2
+:101064005D01CDDE4089018900938C2240938D225D
+:1010740022E0BDCEF4DF99DE00881188228933890D
+:1010840064897589002D0F7310E04CE852E2400F1B
+:10109400511F800190E0179699BF0D901D902C90E0
+:1010A400F0012CBE1995E2EBFAE29BBF9787908B77
+:1010B400918B01E0B8CF1AE107D00093FA041BE149
+:1010C40003D00093FB04089502E00F9433010F3F13
+:1010D40009F40FE108958A9300E30F94AE030FB768
+:1010E400F894802F20E050E0022F10E0F9D0F801AE
+:1010F400E057F54D5BBF518B23952230A0F3DBDF26
+:101104000091C0040093C004E0ECA4D20068008302
+:1011140000810061008300EA1AE20683178353D139
+:101124000FEF0583E8EC008101600083E0EC0081AF
+:10113400006400838FBF8991089500E008951FB76C
+:10114400F89400E46FD200E26DD283D20160008390
+:10115400E9EC008102600083E8EC00810064008314
+:10116400E9EC0081016000831FBF08950093C3046C
+:1011740008950091C30408950093BA2A1093BB2ADA
+:101184002093BC2A3093BD2A089567D000E008BF9D
+:1011940032D2002331F5EBEC5DD204FF18C000E13C
+:1011A40041D20F942B0400E00093C30420E430E008
+:1011B40010E06CD020E430E010E000E867D00AECE6
+:1011C4001AE20093A42A1093A52A65D10AC00081CB
+:1011D40006FF02C000E404C0008105FF02C000E273
+:1011E40021D21BD0189539D000E008BF1ED20023AD
+:1011F40099F402E00093CC040091C50400E02CD0E3
+:10120400F801E7D0008105FF04C000E01FD044D1FD
+:1012140003C000E81BD0E0D0E4CF4CBEBBBFA9BFE5
+:1012240098BF8FBF09911991299139914991599189
+:10123400699179910990199029903990E991F991DE
+:1012440089919991A991B9914990089505D0F8018E
+:1012540002D20F7D0083089534C04A92BA93AA93B0
+:101264009A938A93FA93EA933A922A921A920A9256
+:101274007A936A935A934A933A932A931A930A93C2
+:101284008FB798B7A9B7BBB74CB608958A932051C6
+:10129400304041F02051304039F02052304031F09C
+:1012A40080E005C081E003C082E001C083E0D4DFB8
+:1012B40020E0F8012BBF218326E020838064818312
+:1012C4003ACF60EA7AE2202F2F70220F402F440F8A
+:1012D40000E010E0001F020F03D0060F171F08954F
+:1012E40043E00D943D01E8ECF4E0B2DF00810F7DB2
+:1012F4006CD1008D0260008F328F338F008D0F7D93
+:10130400008F008D0F7B008F00890F7D008B00897B
+:101314000F7B008BE2EBFAE2348735873687378719
+:10132400308B318B32873387368B0895ACD00023D2
+:1013340031F0033011F0043009F44ED1ACD00091F7
+:10134400A22A1091A32A083050E01040A1F548E0E9
+:101354002AEC3AE28D010F94310B3AD0008D0160F2
+:10136400008F00890160008BE8ECF4E02CD02BD0D6
+:101374000F94F105002311F411D11DC090E099BF21
+:101384000C91FD019BBF07FF0CC002850F7319F47C
+:1013940001E0078B01C0978B11D002E0068B1CD0B3
+:1013A4000AC006811781012B11F401D104C006D0B3
+:1013B40001E0068BC4D0E4E00D946E01928B938B14
+:1013C400948B958B08950081006244CF0093C82AC2
+:1013D400FDD030E03BBF089556D0033011F45AD00D
+:1013E40051C0FD01F6DF42855385648975898A0100
+:1013F400061B170B80E99AE2202F212B29F5078978
+:10140400002311F4E6D03EC002891389040F151F8E
+:10141400468157810417150720F08AD011F085D032
+:1014240041F400E00093C92AFC010BBF028F038F33
+:1014340025C08AD042851385042F242F2F7311F4DD
+:1014440021E001C020E0278B013420E0120710F0D6
+:1014540000E410E0FC01028F138FFD0140855185EB
+:1014640064897589460F571FFC01448F558FFD0110
+:1014740044895589400F511F448B558BFC01008DC5
+:101484000D7F008F98CF0F945D01A2EBBAE200911B
+:10149400C82A0895A1D027CFF6DF043011F4FADF6B
+:1014A40043C08091A22A9091A32AFD0192DF04886F
+:1014B4001588428553858001080F191F401751076D
+:1014C40018F4CA0180199109AC012AEC3AE20085AA
+:1014D4001185000D111D0F94310BFD017ADF048974
+:1014E4001589080F191F048B158B048980349040CB
+:1014F40031F435D0668177814617570750F002875B
+:10150400138716D021F011D011F448D00DC04FD05C
+:101514000BC0428553854017510729F409D0A9F31C
+:1015240004D099F311D00BD046CF62D00023089594
+:10153400478550896189403053076307089546D031
+:1015440000890D7F008B0895FD0130E03BBF0489C5
+:10155400158905D0428B538B348B358B0895428982
+:101564005389400F511F089533DF008905FD08C0DA
+:101574000091C82A013009F41AC0043009F410D0CB
+:10158400089526DF008D05FD08C00091C82A0230A9
+:1015940009F41FC0033009F403D0089505E016DFF1
+:1015A400018D0460018F01890460018B089503E0BB
+:1015B4000093C82A00E00093AA2A0093AB2A06D01D
+:1015C4000BBF008D0D7F008F08950083E0E9FAE2E0
+:1015D400089504E0FBDEB4CFE2EBFAE2FADE4485E0
+:1015E4005585668540305307630709F001D0089597
+:1015F400FA016CBF1994EBEC2DD002FF07C0F093F5
+:10160400CA040091A82A06FDAFDF21C0008101FFB2
+:1016140008C002E007D00091A02A06FFF6CFB1DF90
+:10162400F4CF8BCD0093CA040895ECEC13D000FFE3
+:1016340084CD01E0CADF00890F77008B008D0F771E
+:10164400008F01E0EFDF00890F7E008B6FDE01E089
+:101654000895E1ECF4E030E03BBF00810895BD0162
+:10166400D801F90107C030E03BBF219139BF2D9368
+:1016740041505040242F252BB1F7DB01089540E061
+:1016840099BF4D9399B70150104020403040402FEE
+:10169400412B422B432B99F708953BBF07913BB74E
+:1016A40099BF0D9399B74150504060407040042F4A
+:1016B400052B062B072B89F7089504E2402E07E13A
+:1016C400502E02E0602EF201362D6BBE47915791E9
+:1016D40067917691F201EC5FFF4F3F4F3BBFA791BB
+:1016E400B7919691F201362DE95FFF4F3F4F3BBF13
+:1016F400079117913691F801012B032B11F0CDDFDF
+:1017040003C08A019B01BBDF0AE0400E00E0501ECB
+:10171400601EA201662D483357416240A0F208952D
+:10172400EA080000202200000000D200000040214E
+:101734000038170201000000000200980101A00116
+:101744000100080000A40101AA010103000000AE89
+:10175400010100000004000000B6010100000000C7
+:1017640000000000000000000043214D216B216BAC
+:1017740021572161216B216B216B216B216B216B23
+:10178400216B216B216B216B216B21000300000075
+:101794000000000000000000000000000000000045
+:1017A4000000000000000000000000000000000431
+:1017B40003090441544D454C0044465520415458B6
+:1017C4004D454741313238413155001706011F0656
+:1017D400012006017406010012010002000000400D
+:1017E400EB03ED2F010001020001090212000101C7
+:1017F40000C032090400000000000000D721F621D7
+:061804000822E4210A2283
+:0400000320000000D9
+:00000001FF
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128b1/conf_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128b1/conf_board.h
new file mode 100644
index 0000000..6825b7b
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128b1/conf_board.h
@@ -0,0 +1,41 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Board configuration for spi example
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H_INCLUDED
+#define CONF_BOARD_H_INCLUDED
+
+#endif /* CONF_BOARD_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128b1/conf_clock.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128b1/conf_clock.h
new file mode 100644
index 0000000..3fb0b8c
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128b1/conf_clock.h
@@ -0,0 +1,57 @@
+/**
+ * \file
+ *
+ * \brief Clock system configuration for clock example 1
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_CLOCK_H_INCLUDED
+#define CONF_CLOCK_H_INCLUDED
+
+//! Configuration using On-Chip RC oscillator
+//! Use external board OSC (8MHz)
+//! Clk USB = 48MHz (used by USB)
+//! Clk sys = 48MHz
+//! Clk cpu/per = 12MHz
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_RCOSC
+#define CONFIG_OSC_RC32_CAL 48000000UL
+
+#define CONFIG_OSC_AUTOCAL OSC_ID_RC32MHZ
+#define CONFIG_OSC_AUTOCAL_REF_OSC OSC_ID_USBSOF
+
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_RC32MHZ
+#define CONFIG_SYSCLK_PSADIV SYSCLK_PSADIV_2
+#define CONFIG_SYSCLK_PSBCDIV SYSCLK_PSBCDIV_1_2
+
+
+#endif /* CONF_CLOCK_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128b1/conf_isp.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128b1/conf_isp.h
new file mode 100644
index 0000000..f4f1219
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128b1/conf_isp.h
@@ -0,0 +1,67 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief ISP configuration file.
+ *
+ * This file contains the possible external configuration of the ISP.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_ISP_H_
+#define _CONF_ISP_H_
+
+#include "compiler.h"
+#include "nvm.h"
+
+// Version of bootloader
+// Note: It is display in second and last position by FLIP "1.V.V"
+// Example: Verison 0x00 give 1.0.0
+// Example: Verison 0x03 give 1.0.3
+// Example: Verison 0x25 give 1.2.5
+#define BOOTLOADER_VERSION 0x01
+
+#if (FLASH_SIZE<=0x10000)
+// FLASH < 64KB, then bootloader 4KB and ISP is optimized
+// All memories (flash,eeprom,...) do not exced 64KB.
+#define ISP_SMALL_MEMORY_SIZE
+#endif
+
+#endif // _CONF_ISP_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128b1/iar/atxmega128b1_boot.xcl b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128b1/iar/atxmega128b1_boot.xcl
new file mode 100644
index 0000000..7667724
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128b1/iar/atxmega128b1_boot.xcl
@@ -0,0 +1,72 @@
+
+
+
+
+// N O T E :
+// This is an experimental file autogenerated by an XSL transformation.
+// Read more about the purpose of this file and how it was generated here:
+// http://avrtools.norway.atmel.com/pmwiki/pmwiki.php?n=Software.XmegaFiles
+//////////////////////////////////////////////////////////////////////////////
+
+// Set up XLINK
+-ca90
+-w29
+
+// Memory size definitions for convenience
+// The '_..X_' prefix is used by C-SPY as an indication that the label should
+// not be displayed in the dissassembly window.
+
+-D_..X_FLASH_BASE=20002
+-D_..X_CODE_END=21FFF
+-D_..X_INTVEC_END=201FB
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Code (flash) segments
+-Z(CODE)INTVEC=2007C-2008C
+-Z(CODE)CODE,BOOT=2008C-_..X_CODE_END
+-Z(CODE)FARCODE=2008C-_..X_CODE_END
+-Z(CODE)INITTAB=2008C-_..X_CODE_END
+-Z(CODE)NEAR_ID=2008C-_..X_CODE_END
+
+
+
+
+-D_..X_SRAM_BASE=2040
+-D_..X_SRAM_TINY_END=FF
+-D_..X_SRAM_NEAR_END=FFFF
+-D_..X_SRAM_FAR_END=FFFFFF
+-D_..X_SRAM_HUGE_END=FFFFFF
+
+/*
+ * Modify the lines below to alter the size of the RSTACK, CSTACK and HEAP
+ * segments. These need to be fine tuned to suit your specific application.
+ */
+-D_..X_CSTACK_SIZE=1000 /* 4096 bytes for auto variables and register save. */
+-D_..X_RSTACK_SIZE=100 /* 256 bytes for return addresses, equivalent to */
+ /* 128 levels of calls, including interrupts. */
+-D_..X_NEAR_HEAP_SIZE=1000 /* 4096 bytes of heap. */
+-D_..X_HEAP_SIZE=1000 /* 4096 bytes of heap. */
+-D_..X_FAR_HEAP_SIZE=1000 /* 4096 bytes of heap. */
+-D_..X_HUGE_HEAP_SIZE=1000 /* 4096 bytes of heap. */
+//////////////////////////////////////////////////////////////////////////////
+// Data (SRAM, external ROM or external NV RAM) memory
+-Z(DATA)SRAM_NO_INIT=2000-2001
+-Z(DATA)TINY_I,TINY_Z,TINY_N=_..X_SRAM_BASE-_..X_SRAM_NEAR_END
+-Z(DATA)RSTACK+_..X_RSTACK_SIZE=_..X_SRAM_BASE-_..X_SRAM_NEAR_END
+-Z(DATA)NEAR_I,NEAR_Z,NEAR_N,NEAR_C=_..X_SRAM_BASE-_..X_SRAM_NEAR_END
+-Z(DATA)NEAR_HEAP+_..X_NEAR_HEAP_SIZE=_..X_SRAM_BASE-_..X_SRAM_NEAR_END
+//-Z(DATA)FAR_I=[10000-_..X_SRAM_FAR_END]/10000
+-Z(DATA)CSTACK+_..X_CSTACK_SIZE=[_..X_SRAM_BASE-_..X_SRAM_FAR_END]/10000
+-Z(DATA)HEAP+_..X_HEAP_SIZE=[_..X_SRAM_BASE-_..X_SRAM_FAR_END]/10000
+-Z(DATA)IOSTREAM_N#[_..X_SRAM_BASE-_..X_SRAM_FAR_END]/10000
+-Z(DATA)FAR_Z,FAR_N,FAR_C=[_..X_SRAM_BASE-_..X_SRAM_FAR_END]/10000
+-Z(DATA)FAR_HEAP+_..X_FAR_HEAP_SIZE=_..X_SRAM_BASE-_..X_SRAM_FAR_END
+-Z(DATA)HUGE_I,HUGE_Z,HUGE_N,HUGE_C=_..X_SRAM_BASE-_..X_SRAM_HUGE_END
+-Z(DATA)HUGE_HEAP+_..X_HUGE_HEAP_SIZE=_..X_SRAM_BASE-_..X_SRAM_HUGE_END
+
+
+
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128b1/iar/cstartup.s90 b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128b1/iar/cstartup.s90
new file mode 100644
index 0000000..dbcfe88
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128b1/iar/cstartup.s90
@@ -0,0 +1,195 @@
+;----------------------------------------------------------------------------
+;
+; This module contains the AVR C and EC++ startup
+;
+; File version: $Revision: 6648 $
+;
+;----------------------------------------------------------------------------
+
+
+#include "macros.m90"
+
+#define RST_STATUS 0x0078 ///< Reset Controller status
+#define RST_SRF_bp 5 ///< Software Reset Flag bit position
+#define RST_SRF_bm 0x20 ///< Software Reset Flag bit mask
+
+#define SWITCHPORT PORTC
+#define SWITCHPIN 6
+
+#define PORTC 0x0640
+#define DIR 0
+#define DIRSET 1
+#define DIRCLR 2
+#define DIRTGL 3
+#define PORT_OUT 4
+#define OUTSET 5
+#define OUTCLR 6
+#define OUTTGL 7
+#define PORT_IN 8
+#define INTCTRL 9
+#define INT0MASK 10
+#define INT1MASK 11
+#define INTFLAGS 12
+#define reserved_0x0D 13
+#define reserved_0x0E 14
+#define reserved_0x0F 15
+#define PIN0CTRL 16
+
+
+;----------------------------------------------------------------------------
+; Set up the RESET segment with a reset vector
+;----------------------------------------------------------------------------
+ MODULE ?RESET
+ EXTERN ?C_STARTUP
+ PUBLIC __program_start
+ PUBLIC ?RESET
+
+ ASEG 0x20000
+__program_start:
+?RESET:
+ RJMP ?C_STARTUP
+
+ ENDMOD
+
+;----------------------------------------------------------------------------
+; Set up the INTVEC segment with a reset vector
+;----------------------------------------------------------------------------
+ MODULE ?VECT
+ COMMON INTVEC:CODE:ROOT(1) ; Align at an even address
+ EXTERN ?C_STARTUP
+ ENDMOD
+
+;----------------------------------------------------------------------------
+; Forward declarations of segments used in initialization
+;----------------------------------------------------------------------------
+ RSEG CSTACK:DATA:NOROOT(0)
+ RSEG RSTACK:DATA:NOROOT(0)
+
+;----------------------------------------------------------------------------
+; Perform C initialization
+;----------------------------------------------------------------------------
+ MODULE ?C_STARTUP
+ EXTERN main
+ EXTERN exit
+ EXTERN _exit
+
+ RSEG CODE:CODE:NOROOT(1)
+ PUBLIC ?C_STARTUP
+ PUBLIC __RESTART
+ EXTERN ?RESET
+
+__RESTART:
+?C_STARTUP:
+
+#if A90_POINTER_REG_SIZE > 2
+ PUBLIC ?zero_reg_initialization
+?zero_reg_initialization:
+ CLR R15
+ OUT RAMPD,R15
+#endif
+
+
+;----------------------------------------------------------------------------
+; Boot Process
+;----------------------------------------------------------------------------
+
+boot_process:
+ // Test Software reset
+ LDS R16,(RST_STATUS)
+ SBRC R16,RST_SRF_bp // Test Software Reset Flag
+ RJMP start_app_jmp
+
+ // Test ISP pin
+ STS (SWITCHPORT+DIR), R15
+ LDI R16,0x18
+ STS (SWITCHPORT+PIN0CTRL+SWITCHPIN), R16
+ LDI R16,0xFF
+tempo:
+ DEC R16
+ TST R16
+ BRNE tempo
+ LDS R16,(SWITCHPORT+PORT_IN)
+ SBRS R16,SWITCHPIN // test ISP pin active
+ RJMP start_boot // pin activated
+
+ // Test beginning of flash blank
+ LDI R30, 0
+ LDI R31, 0
+ ELPM R16, Z+
+ ELPM R17, Z
+ CPI R16, 255
+ BRNE start_app_jmp
+ CPI R17, 255
+ BRNE start_app_jmp
+
+ RJMP start_boot
+start_app_jmp:
+ JMP start_app
+
+;----------------------------------------------------------------------------
+; Call Bootloader
+;----------------------------------------------------------------------------
+ RSEG STARTBOOT:CODE:NOROOT(1), 0x201FC
+ PUBLIC start_boot
+start_boot:
+ RJMP ?SETUP_STACK
+
+;----------------------------------------------------------------------------
+; Set up the CSTACK and RSTACK pointers.
+;----------------------------------------------------------------------------
+ RSEG CODE:CODE:NOROOT(1)
+ EXTERN __segment_init
+ PUBLIC ?need_segment_init
+
+?SETUP_STACK:
+ ;; Return address stack (RSTACK)
+ LDI R16,LOW(SFE(RSTACK)-1)
+ OUT 0x3D,R16
+#if A90_POINTER_REG_SIZE > 1
+ LDI R16,HIGH(SFE(RSTACK)-1)
+ OUT 0x3E,R16
+#endif
+
+ ;; Data stack (CSTACK)
+ LDI Y0,LOW(SFE(CSTACK))
+#if A90_POINTER_REG_SIZE > 1
+#if MEMORY_MODEL == TINY_MEMORY_MODEL
+ LDI Y1,0
+#else
+ LDI Y1,HIGH(SFE(CSTACK))
+#endif
+#if A90_POINTER_REG_SIZE > 2
+ LDI Z0,HWRD(SFB(CSTACK))
+ OUT RAMPY,Z0
+#endif
+#endif
+?need_segment_init:
+ XCALL __segment_init
+ RCALL main
+
+;----------------------------------------------------------------------------
+; Call Application
+;----------------------------------------------------------------------------
+ EXTERN start_app_key
+
+start_app:
+ STS (SWITCHPORT+PIN0CTRL+SWITCHPIN), R15
+ LDS R16, start_app_key
+ LDS R17, (start_app_key + 1)
+ CPI R16, 0xAA
+ SBCI R17, 0x55
+ BREQ clear_rst_flags
+jump_0:
+ JMP 0
+
+// It is a start application launched by a batchisp start command
+// then clear reset flagS
+clear_rst_flags:
+ STS start_app_key, R15
+ STS (start_app_key + 1), R15
+ LDI R16,RST_SRF_bm
+ STS RST_STATUS,R16 // Clear Software Reset Flag
+ RJMP jump_0
+ END
+
+;----------------------------------------------------------------------------
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128b1/iar/macros.m90 b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128b1/iar/macros.m90
new file mode 100644
index 0000000..5d1c46d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128b1/iar/macros.m90
@@ -0,0 +1,181 @@
+;----------------------------------------------------------------------------
+;
+; MACROS.M90
+;
+; This module contains the A90/AVR C macros
+; used by cstartup.s90 and other assemble source.
+;
+; File version: $Revision: 1.8 $
+;
+;
+;----------------------------------------------------------------------------
+
+
+#if (((__TID__ >> 8) & 0x7F) != 90)
+#error This file should only be assembled by aa90 or aavr
+#endif
+
+#define A90_PROC_OPTION ((__TID__ >> 4) & 0x0F)
+
+/* Long or relative jumps and calls */
+#if (A90_PROC_OPTION == 0) || (A90_PROC_OPTION == 1)
+#define XCALL RCALL
+#define XJMP RJMP
+#else
+#define XCALL CALL
+#define XJMP JMP
+#endif
+
+/* Length of pointer registers (X/Y/Z) */
+#if (A90_PROC_OPTION == 0) || (A90_PROC_OPTION == 2)
+#define A90_POINTER_REG_SIZE 1
+#define A90_TINY_INDEX
+#else /*!(A90_PROC_OPTION == 0) || (A90_PROC_OPTION == 2)*/
+#if (A90_PROC_OPTION == 1) || (A90_PROC_OPTION == 3) || (A90_PROC_OPTION ==5)
+#define A90_POINTER_REG_SIZE 2
+#else /*!(A90_PROC_OPTION == 1) || (A90_PROC_OPTION == 3) || (A90_PROC_OPTION ==5)*/
+#if (A90_PROC_OPTION == 4) || (A90_PROC_OPTION == 6)
+#define A90_POINTER_REG_SIZE 3
+#define A90_EXTENDED_DATA
+#else /*!(A90_PROC_OPTION == 4) || (A90_PROC_OPTION == 6)*/
+#error Unknown processor option!!
+#endif /*!(A90_PROC_OPTION == 4) || (A90_PROC_OPTION == 6)*/
+#endif /*!(A90_PROC_OPTION == 1) || (A90_PROC_OPTION == 3) || (A90_PROC_OPTION ==5)*/
+#endif /*!(A90_PROC_OPTION == 0) || (A90_PROC_OPTION == 2)*/
+
+#if (A90_PROC_OPTION > 4)
+#define A90_LARGE_CODE
+#endif
+
+#if (A90_PROC_OPTION > 1)
+#define A90_HAS_POSSIBLE_ELPM
+#endif
+
+#ifdef A90_HAS_POSSIBLE_ELPM
+#ifdef __HAS_ELPM__
+#define A90_HAS_ELPM
+#else
+#ifndef SMALL_FLASH
+#define A90_HAS_ELPM
+#endif
+#endif
+#endif
+
+#if A90_PROC_OPTION > 1
+#define A90_24BIT_GENERIC
+#endif
+
+#if A90_PROC_OPTION < 2
+#define A90_16BIT_GENERIC
+#endif
+
+#ifdef __MEMORY_MODEL__
+
+#define TINY_MEMORY_MODEL 0
+#define SMALL_MEMORY_MODEL 1
+#define LARGE_MEMORY_MODEL 2
+#define GENERIC_MEMORY_MODEL 3
+#define HUGE_MEMORY_MODEL 4
+
+#if __MEMORY_MODEL__ == 1
+#undef MEMORY_MODEL
+#define MEMORY_MODEL TINY_MEMORY_MODEL
+#endif
+
+#if __MEMORY_MODEL__ == 2
+#undef MEMORY_MODEL
+#define MEMORY_MODEL SMALL_MEMORY_MODEL
+#endif
+
+#if __MEMORY_MODEL__ == 3
+#undef MEMORY_MODEL
+#define MEMORY_MODEL LARGE_MEMORY_MODEL
+#endif
+
+#if __MEMORY_MODEL__ == 4
+#undef MEMORY_MODEL
+#define MEMORY_MODEL GENERIC_MEMORY_MODEL
+#endif
+
+#if __MEMORY_MODEL__ == 5
+#undef MEMORY_MODEL
+#define MEMORY_MODEL HUGE_MEMORY_MODEL
+#endif
+
+#else
+
+#ifdef MEMORY_MODEL
+#define t 0
+#define s 1
+#define l 2
+#define g 3
+#define h 4
+
+#define TINY_MEMORY_MODEL 0
+#define SMALL_MEMORY_MODEL 1
+#define LARGE_MEMORY_MODEL 2
+#define GENERIC_MEMORY_MODEL 3
+#define HUGE_MEMORY_MODEL 4
+
+#if MEMORY_MODEL == t
+#undef MEMORY_MODEL
+#define MEMORY_MODEL TINY_MEMORY_MODEL
+#endif
+
+#if MEMORY_MODEL == s
+#undef MEMORY_MODEL
+#define MEMORY_MODEL SMALL_MEMORY_MODEL
+#endif
+
+#if MEMORY_MODEL == l
+#undef MEMORY_MODEL
+#define MEMORY_MODEL LARGE_MEMORY_MODEL
+#endif
+
+#if MEMORY_MODEL == g
+#undef MEMORY_MODEL
+#define MEMORY_MODEL GENERIC_MEMORY_MODEL
+#endif
+
+#if MEMORY_MODEL == h
+#undef MEMORY_MODEL
+#define MEMORY_MODEL HUGE_MEMORY_MODEL
+#endif
+
+#undef t
+#undef s
+#undef l
+#undef g
+#undef h
+#endif
+#endif
+
+/* Register nicknames */
+#define T0 R0
+#define T1 R1
+#define T2 R2
+#define T3 R3
+#define P0 R16
+#define P1 R17
+#define P2 R18
+#define P3 R19
+#define Q0 R20
+#define Q1 R21
+#define Q2 R22
+#define Q3 R23
+#define X0 R26
+#define X1 R27
+#define X2 R25
+#define Y0 R28
+#define Y1 R29
+#define Z0 R30
+#define Z1 R31
+#define Z2 R19
+
+/* I/O-Space Register nicknames */
+#define RAMPD 0x38
+#define RAMPX 0x39
+#define RAMPY 0x3A
+#define RAMPZ 0x3B
+#define EIND 0x3C
+#define SREG 0x3F
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128b1/releases/atxmega128b1-bootloader-usb-dfu-1.0.1/atxmega128b1_bootloader_usb_dfu_101.hex b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128b1/releases/atxmega128b1-bootloader-usb-dfu-1.0.1/atxmega128b1_bootloader_usb_dfu_101.hex
new file mode 100644
index 0000000..ee0371a
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega128b1/releases/atxmega128b1-bootloader-usb-dfu-1.0.1/atxmega128b1_bootloader_usb_dfu_101.hex
@@ -0,0 +1,340 @@
+:020000022000DC
+:020000004CC0F2
+:08007C000D94C8070D94F7076D
+:10008C0040E04BBFF80158ED54BF20830895009118
+:10009C00780005FD16C0F092400608E10093560664
+:1000AC000FEF0A950023E9F70091480606FFA0C060
+:1000BC00E0E0F0E0079116910F3F19F41F3F09F4AF
+:1000CC0097C00D9472000FE30DBF01E20EBFCAEE94
+:1000DC00DAE30F94230A54D0F092560600910020D4
+:1000EC00109101200A3A154511F00C940000F09281
+:1000FC000020F092012000E200937800F6CF4091AE
+:10010C00CA01E12FFF270093CA0104914093CA0151
+:10011C0008954A951AF0000F111FFBCF0895AF9365
+:10012C00BF93D80101900D9241505040D9F7BF9127
+:10013C00AF910895FA92EA92DA92CA92BA92AA927E
+:10014C009A928A927A926A925A924A92BA93AA9301
+:10015C009A938A930895FF84EE84DD84CC84BB84C7
+:10016C00AA84998488847F806E805D804C80BB815A
+:10017C00AA8199818881F0E0EC0FFD1FEF010895B1
+:10018C0027E402EA10E00F9446000F94AC02789436
+:10019C000F9470070F94A207FFCF3BB72BBFF8014A
+:1001AC002091CA014093CA013DE930933400E8958F
+:1001BC002093CA013BBF08953091CF0137FDFCCF8E
+:1001CC003BB72BBFF8012091CA0113E21093CA016F
+:0C01DC000A01E8952093CA013BBF08957A
+:1001FC006ACF0A011B01B901A801800191010D947C
+:10020C00E201E1E0EA930D94FC010A01A9019801D5
+:10021C0080010D9459019A01AB010D9488010A01DA
+:10022C00A90120E431E2200D311D0D94060A0A01CA
+:10023C00A90120E132E2F7CFE0E1F2E20091900077
+:10024C000083009191000183009192000283009140
+:10025C00930003830895E0EDF1E0008101FB00E0E1
+:10026C0000F90F27089508950091CF0107FDFCCFE9
+:10027C0040E200E010E020E030E00F94D3000F9457
+:10028C00DE0101E00895F8940AEA15E5E0E0F0E2F9
+:10029C000083118320917900216009E710E00F940D
+:1002AC004600FFCFF0CFB901EFECF1E0208127FD44
+:1002BC00FBCF0BD0105F98018B010F94060AECEC6E
+:1002CC00F1E00081077F00830895ECEC2081286029
+:1002DC00208308950F94AC00C801A22FB091CA01DD
+:1002EC0026D063D007FDFDCF4CD09093C1018093F5
+:1002FC00C001A093C40105E325D0B093CA01E4E08A
+:10030C000D94BD000F94AA00D801C9012A0106C0A2
+:10031C00FC012191CF018D01DDDF119682012FEFC0
+:10032C00420E521E012BA1F7E6E00D94BB00EFEC40
+:10033C00F1E0008107FDFBCF008101FF02C006E365
+:10034C0001D008950093CA0121E00BEC11E00D944B
+:10035C0046009A938A93802F9091CA01E8DF25D0AA
+:10036C0007FDFDCF0ED00093C1010093C001809317
+:10037C00C40103950032C8F39093CA0189919991F5
+:10038C00089503E30093CA0100E00093C2010895AD
+:10039C00D9DF8093CA01899108958A9306D007FD0D
+:1003AC00FDCF8091CA0100E3F3CF0091CF010895F6
+:1003BC0001D0F3CF0FEFCDCF1C0108018A01CB0187
+:1003CC00A001622F2091CF0127FDFCCF282F292BD4
+:1003DC0059F0FA016BBF2691F80121938F014F5F01
+:1003EC005F4F6F4F0197F2CFC10108950F94A0009A
+:1003FC0022977A014B01AA8828013901912FD90142
+:10040C0080E007C0D2DF07FDFDCF45E2002D0F9441
+:10041C00D300082D092909F44EC0CC24C6DF07FDF2
+:10042C00FDCF00E8B02EAA2071F0FC01ABBF079104
+:10043C001691088319832881312F2F3F3F4F31F0BC
+:10044C00CC24C39403C00FEF08830983082D09291A
+:10045C00B9F0481659066A067B0629F430D0088391
+:10046C00082D092969F08C019D010F5F1F4F2F4F3B
+:10047C003F4F401651066206730611F420D00983D3
+:10048C00488159818C019D010F94E2008E5F9F4F32
+:10049C00AF4FBF4FBA9439F68C019D0100501140FB
+:1004AC0020403040CC20002E09F0ACCF7EDF07FD81
+:1004BC00FDCF44E2ABCF2296E1E10D94B1000FEFFA
+:1004CC00800E901E01E0400E00E0501E601E701E5B
+:1004DC00F70101917F0108953FB7F8940A9519F03F
+:1004EC000A9561F02CC01830E6E5F0E0008111F4BB
+:1004FC00016001C00E7F0083E8E61EC0E6E5F0E077
+:10050C000081097F0083183021F400810260008390
+:10051C0012C01F3F21F415D000810460F8CF1430B5
+:10052C0051F40FD01FB7F894E0E50081046000830C
+:10053C001FBF06810683E0E60081016000833FBF98
+:10054C00089500E807870BEB008B08952497E0E7EC
+:10055C00F0E007E01FEF11930A95E1F725E001E4C5
+:10056C004DD01CE12AD009831DE127D008831981C5
+:10057C000F3F1F4F21F400E413E208831983088115
+:10058C0019810A831B830A81009362000B810093FB
+:10059C00630016D0026000831FBFE1E5008101FFFC
+:1005AC00FCCF21E000E42AD01FEF02E095DF08D059
+:1005BC000E7F00831FBF2496089502E00D948500E2
+:1005CC001FB7F894E0E5F0E0008108954FB7F89478
+:1005DC00109504D0012300834FBF0895F0E0E02F65
+:1005EC00E059FF4FF1CF063011F428E101C020E0B3
+:1005FC00236004E403D010E400E0E8CF10E00D9495
+:10060C0046000D0137D12681222311F400E033C0BE
+:10061C0022813381D9014D915C91DA0114966C9150
+:10062C000617A0F744835583D9012D913C91D9012C
+:10063C0012964D915C91240F351F08C04C9150E0DF
+:10064C0064817581640F751F64837583A481B58182
+:10065C00A217B307D8F611964C911197443071F745
+:10066C0012964C911297041749F713964C911397C5
+:10067C00141721F701E0D001089543D0802F10E02A
+:10068C00C6D111F400E006C015D003811481258178
+:10069C00B9D101E02DC035D0802FB9D149F00AD0A5
+:1006AC00008111812281AED1002311F001E001C043
+:1006BC0000E01EC0A6E1B2E2ED91FC91A281B381F3
+:1006CC0002E0809FA00DB11DED91FC91089519D011
+:1006DC0012D039F080E003C0082FCFDF8395EED025
+:1006EC00D8F300E000931A2201E010E00D931C9364
+:1006FC00E4E00D94BD00A4E1B2E200911A220023C3
+:10070C0008950D94AC000091942A0F770D94BA07BC
+:10071C000091942A002329F00A9541F00A9511F1D1
+:10072C0025C024E030E009EB11E21AC025E00DEB06
+:10073C0011E240E050E0F801E40FF51F608132E077
+:10074C00439FF001E956FE4D628353834395421754
+:10075C0088F3220F2E5F2093972130E007E911E2F6
+:10076C0046D005C020E103EC11E2E3CF02C001E06A
+:10077C00089500E0089575D0FD01428123810AE0BF
+:10078C0012E22A9529F02A9589F02A9531F112C0A6
+:10079C0030D0208130E028D069D0228533850217F3
+:1007AC00130710F40287138701E01BC022D02189A4
+:1007BC00421710F000E0F9CFF801F4D024E0429F8A
+:1007CC00000D111D16D0228133810ED022E0FD01C7
+:1007DC000085F185E02F2183DFCF9ADF0023E1F63E
+:1007EC00E9CFA991B9910895F801008111810D9477
+:1007FC00C207F8012081F181E22F089532D036D062
+:10080C00012B11F000E0EDCF0F94BD070023D1F3C5
+:10081C00EAE0F2E24FD02189FD010281201790F32A
+:10082C0056DFFD01028100931A2220911A22222305
+:10083C0011F401E0E8CFEAE0F2E2B4D034E0239F17
+:10084C00000D111D0450104015D002831383A0E03D
+:10085C00E0D0A01770F710E049D0002399F2A395CF
+:10086C00F7CFBA93AA93A2E9BAE20895FD010681E3
+:10087C0017810895E4E1F2E2089543DF96D00681F2
+:10088C0017810130104011F000E013C034DFE1F3A8
+:10089C00848114D0C8F7B9D0B9F3FD01A6D00AD021
+:1008AC00AED000931B2221E030E017968D019FDF24
+:1008BC0001E01ECF0081F181E02F0895FD01ABD046
+:1008CC0080170895AA938A9370D072D011F000E02B
+:1008DC000AC013DFE1F3A48182810A2FCEDE00234C
+:1008EC00B1F3182F03D08991A99108950A2FD3CE73
+:1008FC005CD0008107FF2CC026813781022F032B8F
+:10090C00B9F100810F71F1F40181002329F0065037
+:10091C0069F0025061F02CC0223000E0304009F048
+:10092C00089522E030E004E112E20AC024CF213025
+:10093C0000E0304009F0089521E030E00AE112E2D5
+:10094C0056DF15CF0130A1F401810A3089F495CF1F
+:10095C000F7111F501810A9599F0025049F002507E
+:10096C0029F0025029F00250B1F002C021D009F058
+:10097C0000CF09E813E021E0048715872687E1CF33
+:10098C0017D0B1F70FD00130104091F773DF008111
+:10099C000D7F0083D6CF32CF013051F701810B3060
+:1009AC0039F790CF028113810895E2E9FAE20895B4
+:1009BC0006811781012B0895A4DE9FDE11F400E05F
+:1009CC0013C08091962A25D08017C8F71ED0B9F392
+:1009DC0051DF0BD0A081B181FD0111D0102F16D0A9
+:1009EC0071F344DF20850ED083CE0281F381E02F9A
+:1009FC00D9DF22E0829F000D111DF80108950185B9
+:100A0C0012852385F8012CBF199410E0082FF9DD0D
+:100A1C0076CEE4E1F2E20281F381E02F4BDF048138
+:100A2C000895C3DF00E002870387048705870687E4
+:100A3C000787008B018B008107FF03C0B9DF09F426
+:100A4C0098CE0091922A007621F452DF002309F00F
+:100A5C008ECE0091922A0F71013091F7ADDF0023F9
+:100A6C00B9F7EECF5AD00F9422010F9431010093B5
+:100A7C003A22D6C00895BA93AA93A2E9BAE2009199
+:100A8C00922A0076003209F044C01091932A0C91FE
+:100A9C0007FF18C0125049F01A95C1F526E030E056
+:100AAC0006E212E284D101E035C01FD1408D518D98
+:100ABC00628D00E040305007600741F1FA016CBFD5
+:100ACC00199528C01A9521F0135001F526D0EBCFBB
+:100ADC000CD1438D548D658D00E0D0D051F00F9426
+:100AEC0039010CEA15E021E0FD0104871587268702
+:100AFC00DACF20E430E00CE312E259D103EB15E03D
+:100B0C0021E0FD010787108B218BCDCFEED00FE0BC
+:100B1C008AD000E0A991B991089501C00AC11B2F98
+:100B2C002A2FE3D000E0028702E00687A1EABAE2AE
+:100B3C0000E00D930D930C9315970D930D930C935F
+:100B4C00038F048F058FA22FB12F0895CED0038D64
+:100B5C00148D258DF8012CBF19940F94AC00DDDF9A
+:100B6C00ACE1B2E200E0FD01008F018F028F01E0E9
+:100B7C000F943901ECE3F2E2908181818050914035
+:100B8C0071F08050924069F0019769F08F5F90404E
+:100B9C0061F0039799F080509240F9F020C023D077
+:100BAC001FC045D01DC05DD01BC00F943A0100235F
+:100BBC0000E0B1F000933A2201E012C00281002360
+:100BCC0021F409E411E021E003C008E511E021E083
+:100BDC00FD01038F148F258FEFCF54D001C000E09F
+:100BEC00E4E00D94BD0081D0068D178D012309F032
+:100BFC009AC047815085618541D011F413D002C051
+:100C0C002BD009F496C020E038E0CFD002E417E0F6
+:100C1C0021E0E2E9FAE20787108B218B01C0C5D0F5
+:100C2C0001E0089503E002870AE00687089514D0D6
+:100C3C0019F01FD011F4F6DF7CC0068D178D01233F
+:100C4C0021F009E916E021E003C001ED16E021E0F6
+:100C5C00008F118F228FE4CF0EE312E26CD00023B1
+:100C6C000895FADF19F005D011F4DCDF62C0A1D0D1
+:100C7C00D7CFECE1F2E2448155816681403050409F
+:100C8C00604008952497ECE3F2E203811281112372
+:100C9C0019F01A9581F026C0013128F026D008E011
+:100CAC00C2DF00E020C024D000E01FD0008B018BFD
+:100CBC00028B038B17C040E0488349834A834B83E4
+:100CCC000B8304810A8311D0088119812A813B810D
+:100CDC0040815181628173810417150726073707FC
+:100CEC00E8F6AED001E024960895ECE1F2E2089526
+:100CFC00033041F0023031F0043021F0053011F0B6
+:100D0C0011E001C010E010933B2212E0019FF001B2
+:100D1C00EB58FE4D6081F1810CE112E2E62F4AE0C6
+:100D2C0050E00D94950003E00093262202E000931E
+:100D3C002A2200E008950F94AB00ACE1B2E2FD0171
+:100D4C0022893389F80150814180FD01408A518B01
+:100D5C00F801128103810D901D902D903C901397FA
+:100D6C00001511052205330540F008E000932622FA
+:100D7C000AE000932A2200E00BC00419150B220B89
+:100D8C00330B59D0FD01048B158B268B378B01E06F
+:100D9C00E5E00D94BC00A9DF2488358959D0222DBB
+:100DAC0054D0A3DF248935893ACF0CE712E20D9495
+:100DBC00C2070F94AC00ACE1B2E2FD0104891589C5
+:100DCC0026893789402F412B422B432B99F1003038
+:100DDC0048E0140780E02040304010F4C80101C006
+:100DEC0098E0A80166897789481B590B60407040D0
+:100DFC00448B558B668B778B392F2AD0282F25D097
+:100E0C004CE752E204C0FD0150D015D019D08C0132
+:100E1C000197012B91F2FA010191AF010F3F99F368
+:100E2C0005E00093262208E317E021E0FD01008F86
+:100E3C00118F228FD5CE0F5F1F4F2F4F3F4F08952D
+:100E4C00008B118B228B338B08950CE712E21994D3
+:100E5C004089518962897389048115812681F80141
+:100E6C002CBF089542DF0089418940937C22009376
+:100E7C007D2222E030E0D3CE38DF17D0648975892B
+:100E8C00402F4F73042E11244CE752E2400D511D9C
+:100E9C00078010842184F0012CBE199500E0E2E952
+:100EAC00FAE20787008B018BBBCE0089118922895E
+:100EBC00338908951AE107D00093FA041BE103D09B
+:100ECC000093FB04089502E00F9485000F3F09F492
+:100EDC000FE108958A9300E30F94F9020FB7F89489
+:100EEC00802F20E030E08901ECD0F801E458F54D7A
+:100EFC00358323952230B0F3DDDF0091C0040093DD
+:100F0C00C004E0EC6BD000680083008100610083BA
+:100F1C0000E81AE2E6EC00831183E0EC44D10FEF19
+:100F2C000583E8EC1ED0E0EC0081006400838FBFE9
+:100F3C008991089500E008951FB7F89400E448D211
+:100F4C0000E246D2E1ECF4E00CD0E9EC0081026066
+:100F5C000083E8EC008100640083E9EC02D01FBF41
+:100F6C0008950081016006C00093C30408950091A8
+:100F7C00C304089500830895E7D1068F178F20A32B
+:100F8C0031A3089560D00ED2002329F526D004FF9A
+:100F9C0018C000E11DD20F946D0300E00093C30450
+:100FAC0020E430E010E064D020E430E010E000E811
+:100FBC005FD00AEA1AE20093842A1093852A43D15F
+:100FCC000AC0008106FF02C000E404C0008105FFD6
+:100FDC0002C000E2FDD11CD01895EBECF4E00081CE
+:100FEC00089531D0F8D1002391F402E00093CC04A1
+:100FFC000091C50400E026D0F801008105FF04C073
+:10100C0000E01BD028D103C000E817D0CFD0E3CF2D
+:10101C00ACBF9BBF8FBF099119912991399149910F
+:10102C005991699179910990199029903990E99188
+:10103C00F99189919991A991089504D0F8010081B1
+:10104C000F7D98CF2FC0AA939A938A93FA93EA9321
+:10105C003A922A921A920A927A936A935A934A93E0
+:10106C003A932A931A930A938FB79BB7ACB7089508
+:10107C008A932051304041F02051304039F02052B9
+:10108C00304031F080E005C081E003C082E001C057
+:10109C0083E0D8DF20E0F801218326E02083806400
+:1010AC00818346CF60E87AE2202F2F70220F402FE9
+:1010BC00440F00E010E0001F020F03D0060F171FB3
+:1010CC00089543E00D948F00E8ECF4E0B8DFB7DF4F
+:1010DC003BD104850260048700E010E00687078797
+:1010EC0004850F7D048704850F7B048704810F7DA5
+:1010FC00048304810F7B048312A313A314A315A3ED
+:10110C0016A317A310A311A314A708959DD0002311
+:10111C0031F0033011F0043009F439D194D0FD01D1
+:10112C0006811781083050E01040A1F548E02AEA0A
+:10113C003AE202E91AE20F94060AFD010485016005
+:10114C000487048101600483E8ECF4E02CD02BD0FC
+:10115C000F941705002311F4FAD01CC0FD01068969
+:10116C0007FF0CC000A10F7311F401E001C000E0F7
+:10117C0005A713D002E004A719D00CC0048D158D5F
+:10118C00012B11F4EFD006C008D001E004A70481B4
+:10119C000D7F0483A991B991089500E000A701A7E0
+:1011AC0002A703A7089500810062E4CE4DD003305E
+:1011BC0011F448D046C0FD0120A131A142A553A590
+:1011CC008901041B150B402F412B19F505A5002394
+:1011DC0011F4D2D036C000A511A5020F131F248D17
+:1011EC00358D0217130720F090D011F07ED039F412
+:1011FC0000E00093A92AFD01068707871FC078D05D
+:10120C0020A111A1022F2F7311F421E001C020E0C5
+:10121C0025A7013420E0120710F000E410E0068747
+:10122C001787268D378D42A553A5240F351F208B8C
+:10123C00318B9A01200F311F22A733A704850D7F14
+:10124C000487A8CFA4D040CFBA93AA93ACE7BAE254
+:10125C000091A82A08950F94AC00F8DF043011F423
+:10126C00F1DF40C0FD018681978162A573A520A1A5
+:10127C0031A18B01080F191F2017310718F4C90170
+:10128C00861B970BAC012AEA3AE2068D178D060FE6
+:10129C00171F0F94060AFD0102A513A5080F191FAD
+:1012AC0002A713A78034904031F42AD0448D558D79
+:1012BC002417350750F000A311A327D021F015D027
+:1012CC0011F445D00FC04ED00DC020A131A1201774
+:1012DC00310729F41AD0A9F308D099F309D0048165
+:1012EC000D7F0483E4E00D94BD0059D000230895D4
+:1012FC00FD0102A513A504D020A731A700E050CF13
+:10130C0020A531A5200F311F089545A156A167A135
+:10131C0000E0403050076007089535D005FD07C048
+:10132C0004A5013009F41EC0043009F414D008954A
+:10133C000BD0048505FD07C004A5023009F41CC0C0
+:10134C00033009F408D00895ECE7FAE2089505E0BB
+:10135C000093A82AF9DF05850460058705810460E0
+:10136C0005830895F1DF03E004A700E006870787F3
+:10137C0004850D7F0487089504E00093A82A03D008
+:10138C000D7F04830895ECE7FAE204810895DCDF15
+:10139C0042A153A164A1BCDF09F001D00895FA0168
+:1013AC006CBF19941ADE02FF07C0F093CA040091B7
+:1013BC00882A06FDB2DF22C0008101FF08C002E0CE
+:1013CC0007D00091802A06FFF6CFB2DFF4CFB2CD62
+:1013DC000093CA0408950091CC0400FFABCD01E04A
+:1013EC000093CC04D0DF0F77048304850F77048738
+:1013FC0001E0EEDF04810F7E048388DE01E00895B6
+:10140C00BD01D801F90104C021912D9341505040E8
+:10141C00242F252BC9F7DB01089520E008D0E9F72C
+:10142C0008953BBF27913BB702D0D9F708952D9370
+:10143C0001501040202F212B089506EA402E04E184
+:10144C00502E02E0602EF201362D6BBE07911691E4
+:10145C00F201EE5FFF4F3F4F3BBFA791B691F201F8
+:10146C00362DEC5FFF4F3F4F3BBF47915791669135
+:10147C00242F252B262B21F0FA01362FD2DF01C089
+:10148C00CCDF07E0400E00E0501E601EA201662D6E
+:10149C00443B54416240B8F20895DA08102200002F
+:1014AC0000CE004021B4140201000000000200FF35
+:1014BC000001070101000800000B010111010103EB
+:1014CC00000000150101000000040000001D0101D6
+:1014DC000000000000000000000000000043214D4F
+:1014EC00216B216B21572161216B216B216B216BAE
+:1014FC00216B216B216B216B216B216B216B2100EB
+:10150C0003000000000000000000000000000000CC
+:10151C0000000000000000000000000000000000BF
+:10152C00000403090441544D454C004446552041E8
+:10153C0054584D454741313238423100380501404D
+:10154C000501410501940501120100020000004053
+:10155C00EB03EA2F01000102000109021200010154
+:10156C0000C032090400000000000000D421F22168
+:06157C000422E02106221A
+:0400000320000000D9
+:00000001FF
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega256a3bu/conf_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega256a3bu/conf_board.h
new file mode 100644
index 0000000..6825b7b
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega256a3bu/conf_board.h
@@ -0,0 +1,41 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Board configuration for spi example
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H_INCLUDED
+#define CONF_BOARD_H_INCLUDED
+
+#endif /* CONF_BOARD_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega256a3bu/conf_clock.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega256a3bu/conf_clock.h
new file mode 100644
index 0000000..3fb0b8c
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega256a3bu/conf_clock.h
@@ -0,0 +1,57 @@
+/**
+ * \file
+ *
+ * \brief Clock system configuration for clock example 1
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_CLOCK_H_INCLUDED
+#define CONF_CLOCK_H_INCLUDED
+
+//! Configuration using On-Chip RC oscillator
+//! Use external board OSC (8MHz)
+//! Clk USB = 48MHz (used by USB)
+//! Clk sys = 48MHz
+//! Clk cpu/per = 12MHz
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_RCOSC
+#define CONFIG_OSC_RC32_CAL 48000000UL
+
+#define CONFIG_OSC_AUTOCAL OSC_ID_RC32MHZ
+#define CONFIG_OSC_AUTOCAL_REF_OSC OSC_ID_USBSOF
+
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_RC32MHZ
+#define CONFIG_SYSCLK_PSADIV SYSCLK_PSADIV_2
+#define CONFIG_SYSCLK_PSBCDIV SYSCLK_PSBCDIV_1_2
+
+
+#endif /* CONF_CLOCK_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega256a3bu/conf_isp.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega256a3bu/conf_isp.h
new file mode 100644
index 0000000..9540b3d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega256a3bu/conf_isp.h
@@ -0,0 +1,67 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief ISP configuration file.
+ *
+ * This file contains the possible external configuration of the ISP.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_ISP_H_
+#define _CONF_ISP_H_
+
+#include "compiler.h"
+#include "nvm.h"
+
+// Version of bootloader
+// Note: It is display in second and last position by FLIP "1.V.V"
+// Example: Verison 0x00 give 1.0.0
+// Example: Verison 0x03 give 1.0.3
+// Example: Verison 0x25 give 1.2.5
+#define BOOTLOADER_VERSION 0x00
+
+#if (FLASH_SIZE<=0x10000)
+// FLASH < 64KB, then bootloader 4KB and ISP is optimized
+// All memories (flash,eeprom,...) do not exced 64KB.
+#define ISP_SMALL_MEMORY_SIZE
+#endif
+
+#endif // _CONF_ISP_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega256a3bu/iar/atxmega256a3bu_boot.xcl b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega256a3bu/iar/atxmega256a3bu_boot.xcl
new file mode 100644
index 0000000..2e1315c
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega256a3bu/iar/atxmega256a3bu_boot.xcl
@@ -0,0 +1,72 @@
+
+
+
+
+// N O T E :
+// This is an experimental file autogenerated by an XSL transformation.
+// Read more about the purpose of this file and how it was generated here:
+// http://avrtools.norway.atmel.com/pmwiki/pmwiki.php?n=Software.XmegaFiles
+//////////////////////////////////////////////////////////////////////////////
+
+// Set up XLINK
+-ca90
+-w29
+
+// Memory size definitions for convenience
+// The '_..X_' prefix is used by C-SPY as an indication that the label should
+// not be displayed in the dissassembly window.
+
+-D_..X_FLASH_BASE=40002
+-D_..X_CODE_END=41FFF
+-D_..X_INTVEC_END=401FB
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Code (flash) segments
+-Z(CODE)INTVEC=401F4-401FF
+-Z(CODE)CODE,BOOT=401FC-_..X_CODE_END
+-Z(CODE)FARCODE=401FC-_..X_CODE_END
+-Z(CODE)INITTAB=401FC-_..X_CODE_END
+-Z(CODE)NEAR_ID=401FC-_..X_CODE_END
+
+
+
+
+-D_..X_SRAM_BASE=2040
+-D_..X_SRAM_TINY_END=FF
+-D_..X_SRAM_NEAR_END=FFFF
+-D_..X_SRAM_FAR_END=FFFFFF
+-D_..X_SRAM_HUGE_END=FFFFFF
+
+/*
+ * Modify the lines below to alter the size of the RSTACK, CSTACK and HEAP
+ * segments. These need to be fine tuned to suit your specific application.
+ */
+-D_..X_CSTACK_SIZE=1000 /* 4096 bytes for auto variables and register save. */
+-D_..X_RSTACK_SIZE=100 /* 256 bytes for return addresses, equivalent to */
+ /* 128 levels of calls, including interrupts. */
+-D_..X_NEAR_HEAP_SIZE=1000 /* 4096 bytes of heap. */
+-D_..X_HEAP_SIZE=1000 /* 4096 bytes of heap. */
+-D_..X_FAR_HEAP_SIZE=1000 /* 4096 bytes of heap. */
+-D_..X_HUGE_HEAP_SIZE=1000 /* 4096 bytes of heap. */
+//////////////////////////////////////////////////////////////////////////////
+// Data (SRAM, external ROM or external NV RAM) memory
+-Z(DATA)SRAM_NO_INIT=2000-2001
+-Z(DATA)TINY_I,TINY_Z,TINY_N=_..X_SRAM_BASE-_..X_SRAM_NEAR_END
+-Z(DATA)RSTACK+_..X_RSTACK_SIZE=_..X_SRAM_BASE-_..X_SRAM_NEAR_END
+-Z(DATA)NEAR_I,NEAR_Z,NEAR_N,NEAR_C=_..X_SRAM_BASE-_..X_SRAM_NEAR_END
+-Z(DATA)NEAR_HEAP+_..X_NEAR_HEAP_SIZE=_..X_SRAM_BASE-_..X_SRAM_NEAR_END
+//-Z(DATA)FAR_I=[10000-_..X_SRAM_FAR_END]/10000
+-Z(DATA)CSTACK+_..X_CSTACK_SIZE=[_..X_SRAM_BASE-_..X_SRAM_FAR_END]/10000
+-Z(DATA)HEAP+_..X_HEAP_SIZE=[_..X_SRAM_BASE-_..X_SRAM_FAR_END]/10000
+-Z(DATA)IOSTREAM_N#[_..X_SRAM_BASE-_..X_SRAM_FAR_END]/10000
+-Z(DATA)FAR_Z,FAR_N,FAR_C=[_..X_SRAM_BASE-_..X_SRAM_FAR_END]/10000
+-Z(DATA)FAR_HEAP+_..X_FAR_HEAP_SIZE=_..X_SRAM_BASE-_..X_SRAM_FAR_END
+-Z(DATA)HUGE_I,HUGE_Z,HUGE_N,HUGE_C=_..X_SRAM_BASE-_..X_SRAM_HUGE_END
+-Z(DATA)HUGE_HEAP+_..X_HUGE_HEAP_SIZE=_..X_SRAM_BASE-_..X_SRAM_HUGE_END
+
+
+
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega256a3bu/iar/cstartup.s90 b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega256a3bu/iar/cstartup.s90
new file mode 100644
index 0000000..c761e36
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega256a3bu/iar/cstartup.s90
@@ -0,0 +1,211 @@
+;----------------------------------------------------------------------------
+;
+; This module contains the AVR C and EC++ startup
+;
+; File version: $Revision: 6648 $
+;
+;----------------------------------------------------------------------------
+
+
+#include "macros.m90"
+
+#define SWITCHPORT PORTF
+#define SWITCHPIN 0
+
+#define PORTF 0x06A0
+#define DIR 0
+#define DIRSET 1
+#define DIRCLR 2
+#define DIRTGL 3
+#define PORT_OUT 4
+#define OUTSET 5
+#define OUTCLR 6
+#define OUTTGL 7
+#define PORT_IN 8
+#define INTCTRL 9
+#define INT0MASK 10
+#define INT1MASK 11
+#define INTFLAGS 12
+#define reserved_0x0D 13
+#define reserved_0x0E 14
+#define reserved_0x0F 15
+#define PIN0CTRL 16
+
+
+
+;----------------------------------------------------------------------------
+; Set up the RESET segment with a reset vector
+;----------------------------------------------------------------------------
+ MODULE ?RESET
+ EXTERN ?C_STARTUP
+ PUBLIC __program_start
+ PUBLIC ?RESET
+
+ ASEG 0x40000
+__program_start:
+?RESET:
+ RJMP ?C_STARTUP
+
+ ENDMOD
+
+;----------------------------------------------------------------------------
+; Set up the INTVEC segment with a reset vector
+;----------------------------------------------------------------------------
+ MODULE ?VECT
+ COMMON INTVEC:CODE:ROOT(1) ; Align at an even address
+ EXTERN ?C_STARTUP
+ ENDMOD
+
+;----------------------------------------------------------------------------
+; Forward declarations of segments used in initialization
+;----------------------------------------------------------------------------
+ RSEG CSTACK:DATA:NOROOT(0)
+ RSEG RSTACK:DATA:NOROOT(0)
+
+;----------------------------------------------------------------------------
+; Perform C initialization
+;----------------------------------------------------------------------------
+ MODULE ?C_STARTUP
+ EXTERN __segment_init
+ EXTERN main
+ EXTERN exit
+ EXTERN _exit
+
+;----------------------------------------------------------------------------
+; If the return address stack is located in external SRAM, make sure that
+; you have uncommented the correct code in __low_level_init!!!
+;----------------------------------------------------------------------------
+ RSEG CODE:CODE:NOROOT(1)
+ PUBLIC ?C_STARTUP
+ PUBLIC __RESTART
+ EXTERN ?RESET
+
+__RESTART:
+?C_STARTUP:
+#if A90_POINTER_REG_SIZE > 2
+ PUBLIC ?zero_reg_initialization
+?zero_reg_initialization:
+ CLR R15
+ OUT RAMPD,R15
+#endif
+ REQUIRE ?SETUP_STACK
+ REQUIRE ?RESET
+ RSEG CODE:CODE:NOROOT(1)
+ PUBLIC __RSTACK_in_external_ram
+__RSTACK_in_external_ram:
+ LDI R16,0xC0
+ OUT 0x35,R16 ;Enable the external SRAM with a wait state
+
+ RSEG CODE:CODE:NOROOT(1)
+ PUBLIC __RSTACK_in_external_ram_new_way
+ EXTERN __?XMCRA
+
+__RSTACK_in_external_ram_new_way:
+ LDI R16,0x8C ;SRE=1,SRL2=0,SRL1=0,SRL0=0,SRW11=1,SRW10=1,SRW01=0,SRW00=0
+ STS __?XMCRA,R16 ;Enable the external SRAM with maximum wait state.
+
+;----------------------------------------------------------------------------
+; Set up the CSTACK and RSTACK pointers.
+;----------------------------------------------------------------------------
+ RSEG CODE:CODE:NOROOT(1)
+?SETUP_STACK:
+ ;; Return address stack (RSTACK)
+ LDI R16,LOW(SFE(RSTACK)-1)
+ OUT 0x3D,R16
+#if A90_POINTER_REG_SIZE > 1
+ LDI R16,HIGH(SFE(RSTACK)-1)
+ OUT 0x3E,R16
+#endif
+
+ ;; Data stack (CSTACK)
+ LDI Y0,LOW(SFE(CSTACK))
+#if A90_POINTER_REG_SIZE > 1
+#if MEMORY_MODEL == TINY_MEMORY_MODEL
+ LDI Y1,0
+#else
+ LDI Y1,HIGH(SFE(CSTACK))
+#endif
+#if A90_POINTER_REG_SIZE > 2
+ LDI Z0,HWRD(SFB(CSTACK))
+ OUT RAMPY,Z0
+#endif
+#endif
+
+#if A90_POINTER_REG_SIZE > 2
+; Nothing here, the things previously here has been done earlier.
+#else
+; REQUIRE ?call_low_level_init
+
+;----------------------------------------------------------------------------
+; Clear R15 so that it can be used as zero register by the code generator.
+; The compiler will emit a "REQUIRE ?zero_reg_initialization" statement if
+; this optimization has been enabled.
+;----------------------------------------------------------------------------
+ RSEG CODE:CODE:NOROOT(1)
+ PUBLIC ?zero_reg_initialization
+
+?zero_reg_initialization:
+ CLR R15
+
+
+;----------------------------------------------------------------------------
+; Call __low_level_init to do low level initializatons. Modify the supplied
+; __low_level_init module to add your own initialization code or to
+; remove segment initialization (by returning 0).
+;----------------------------------------------------------------------------
+ RSEG CODE:CODE:NOROOT(1)
+#endif
+ REQUIRE ?cstartup_call_main
+
+;----------------------------------------------------------------------------
+; Call __segment_init to initialize segments.
+;----------------------------------------------------------------------------
+
+ RSEG CODE:CODE:NOROOT(1)
+ PUBLIC ?need_segment_init
+ EXTERN start_app_key
+ EXTERN nvm_flash_read_byte
+
+ // BOOT PROCESS MANAGEMENT .....
+ STS (SWITCHPORT+DIR), R15
+ LDI R16,0x18
+ STS (SWITCHPORT+PIN0CTRL+SWITCHPIN), R16
+ LDI R16,0xFF
+temp0:
+ DEC R16
+ TST R16
+ BRNE temp0
+ LDS R16,(SWITCHPORT+PORT_IN)
+ SBRS R16,SWITCHPIN // test DFU pin active
+ RJMP start_boot // pin activated
+ //test blank ?
+ LDI R30, 0
+ LDI R31, 0
+ ELPM R16, Z+
+ ELPM R17, Z
+ CPI R16, 255
+ BRNE start0
+ CPI R17, 255
+ BRNE start0
+start_boot:
+?need_segment_init:
+ XCALL __segment_init
+
+
+;----------------------------------------------------------------------------
+; Call main
+;----------------------------------------------------------------------------
+ RSEG CODE:CODE:NOROOT(1)
+
+ PUBLIC ?cstartup_call_main
+
+?cstartup_call_main:
+ RCALL main
+start0:
+ STS (SWITCHPORT+PIN0CTRL+SWITCHPIN), R15
+jump0:
+ JMP 0
+ END
+
+;----------------------------------------------------------------------------
+;
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega256a3bu/iar/macros.m90 b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega256a3bu/iar/macros.m90
new file mode 100644
index 0000000..ae18cf3
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega256a3bu/iar/macros.m90
@@ -0,0 +1,180 @@
+;----------------------------------------------------------------------------
+;
+; MACROS.M90
+;
+; This module contains the A90/AVR C macros
+; used by cstartup.s90 and other assemble source.
+;
+; File version: $Revision: 1.8 $
+;
+;
+;----------------------------------------------------------------------------
+
+#if (((__TID__ >> 8) & 0x7F) != 90)
+#error This file should only be assembled by aa90 or aavr
+#endif
+
+#define A90_PROC_OPTION ((__TID__ >> 4) & 0x0F)
+
+/* Long or relative jumps and calls */
+#if (A90_PROC_OPTION == 0) || (A90_PROC_OPTION == 1)
+#define XCALL RCALL
+#define XJMP RJMP
+#else
+#define XCALL CALL
+#define XJMP JMP
+#endif
+
+/* Length of pointer registers (X/Y/Z) */
+#if (A90_PROC_OPTION == 0) || (A90_PROC_OPTION == 2)
+#define A90_POINTER_REG_SIZE 1
+#define A90_TINY_INDEX
+#else /*!(A90_PROC_OPTION == 0) || (A90_PROC_OPTION == 2)*/
+#if (A90_PROC_OPTION == 1) || (A90_PROC_OPTION == 3) || (A90_PROC_OPTION ==5)
+#define A90_POINTER_REG_SIZE 2
+#else /*!(A90_PROC_OPTION == 1) || (A90_PROC_OPTION == 3) || (A90_PROC_OPTION ==5)*/
+#if (A90_PROC_OPTION == 4) || (A90_PROC_OPTION == 6)
+#define A90_POINTER_REG_SIZE 3
+#define A90_EXTENDED_DATA
+#else /*!(A90_PROC_OPTION == 4) || (A90_PROC_OPTION == 6)*/
+#error Unknown processor option!!
+#endif /*!(A90_PROC_OPTION == 4) || (A90_PROC_OPTION == 6)*/
+#endif /*!(A90_PROC_OPTION == 1) || (A90_PROC_OPTION == 3) || (A90_PROC_OPTION ==5)*/
+#endif /*!(A90_PROC_OPTION == 0) || (A90_PROC_OPTION == 2)*/
+
+#if (A90_PROC_OPTION > 4)
+#define A90_LARGE_CODE
+#endif
+
+#if (A90_PROC_OPTION > 1)
+#define A90_HAS_POSSIBLE_ELPM
+#endif
+
+#ifdef A90_HAS_POSSIBLE_ELPM
+#ifdef __HAS_ELPM__
+#define A90_HAS_ELPM
+#else
+#ifndef SMALL_FLASH
+#define A90_HAS_ELPM
+#endif
+#endif
+#endif
+
+#if A90_PROC_OPTION > 1
+#define A90_24BIT_GENERIC
+#endif
+
+#if A90_PROC_OPTION < 2
+#define A90_16BIT_GENERIC
+#endif
+
+#ifdef __MEMORY_MODEL__
+
+#define TINY_MEMORY_MODEL 0
+#define SMALL_MEMORY_MODEL 1
+#define LARGE_MEMORY_MODEL 2
+#define GENERIC_MEMORY_MODEL 3
+#define HUGE_MEMORY_MODEL 4
+
+#if __MEMORY_MODEL__ == 1
+#undef MEMORY_MODEL
+#define MEMORY_MODEL TINY_MEMORY_MODEL
+#endif
+
+#if __MEMORY_MODEL__ == 2
+#undef MEMORY_MODEL
+#define MEMORY_MODEL SMALL_MEMORY_MODEL
+#endif
+
+#if __MEMORY_MODEL__ == 3
+#undef MEMORY_MODEL
+#define MEMORY_MODEL LARGE_MEMORY_MODEL
+#endif
+
+#if __MEMORY_MODEL__ == 4
+#undef MEMORY_MODEL
+#define MEMORY_MODEL GENERIC_MEMORY_MODEL
+#endif
+
+#if __MEMORY_MODEL__ == 5
+#undef MEMORY_MODEL
+#define MEMORY_MODEL HUGE_MEMORY_MODEL
+#endif
+
+#else
+
+#ifdef MEMORY_MODEL
+#define t 0
+#define s 1
+#define l 2
+#define g 3
+#define h 4
+
+#define TINY_MEMORY_MODEL 0
+#define SMALL_MEMORY_MODEL 1
+#define LARGE_MEMORY_MODEL 2
+#define GENERIC_MEMORY_MODEL 3
+#define HUGE_MEMORY_MODEL 4
+
+#if MEMORY_MODEL == t
+#undef MEMORY_MODEL
+#define MEMORY_MODEL TINY_MEMORY_MODEL
+#endif
+
+#if MEMORY_MODEL == s
+#undef MEMORY_MODEL
+#define MEMORY_MODEL SMALL_MEMORY_MODEL
+#endif
+
+#if MEMORY_MODEL == l
+#undef MEMORY_MODEL
+#define MEMORY_MODEL LARGE_MEMORY_MODEL
+#endif
+
+#if MEMORY_MODEL == g
+#undef MEMORY_MODEL
+#define MEMORY_MODEL GENERIC_MEMORY_MODEL
+#endif
+
+#if MEMORY_MODEL == h
+#undef MEMORY_MODEL
+#define MEMORY_MODEL HUGE_MEMORY_MODEL
+#endif
+
+#undef t
+#undef s
+#undef l
+#undef g
+#undef h
+#endif
+#endif
+
+/* Register nicknames */
+#define T0 R0
+#define T1 R1
+#define T2 R2
+#define T3 R3
+#define P0 R16
+#define P1 R17
+#define P2 R18
+#define P3 R19
+#define Q0 R20
+#define Q1 R21
+#define Q2 R22
+#define Q3 R23
+#define X0 R26
+#define X1 R27
+#define X2 R25
+#define Y0 R28
+#define Y1 R29
+#define Z0 R30
+#define Z1 R31
+#define Z2 R19
+
+/* I/O-Space Register nicknames */
+#define RAMPD 0x38
+#define RAMPX 0x39
+#define RAMPY 0x3A
+#define RAMPZ 0x3B
+#define EIND 0x3C
+#define SREG 0x3F
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega64a1u/conf_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega64a1u/conf_board.h
new file mode 100644
index 0000000..6825b7b
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega64a1u/conf_board.h
@@ -0,0 +1,41 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Board configuration for spi example
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H_INCLUDED
+#define CONF_BOARD_H_INCLUDED
+
+#endif /* CONF_BOARD_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega64a1u/conf_clock.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega64a1u/conf_clock.h
new file mode 100644
index 0000000..79b0180
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega64a1u/conf_clock.h
@@ -0,0 +1,56 @@
+/**
+ * \file
+ *
+ * \brief Clock system configuration for clock example 1
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_CLOCK_H_INCLUDED
+#define CONF_CLOCK_H_INCLUDED
+
+//! Configuration using On-Chip RC oscillator
+//! Use external board OSC (8MHz)
+//! Clk USB = 48MHz (used by USB)
+//! Clk sys = 48MHz
+//! Clk cpu/per = 12MHz
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_RCOSC
+#define CONFIG_OSC_RC32_CAL 48000000UL
+
+#define CONFIG_OSC_AUTOCAL OSC_ID_RC32MHZ
+#define CONFIG_OSC_AUTOCAL_REF_OSC OSC_ID_USBSOF
+
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_RC32MHZ
+#define CONFIG_SYSCLK_PSADIV SYSCLK_PSADIV_2
+#define CONFIG_SYSCLK_PSBCDIV SYSCLK_PSBCDIV_1_2
+
+#endif /* CONF_CLOCK_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega64a1u/conf_isp.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega64a1u/conf_isp.h
new file mode 100644
index 0000000..a3b79fe
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega64a1u/conf_isp.h
@@ -0,0 +1,69 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief ISP configuration file.
+ *
+ * This file contains the possible external configuration of the ISP.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_ISP_H_
+#define _CONF_ISP_H_
+
+#include "compiler.h"
+#include "nvm.h"
+
+// Version of bootloader
+// Note: It is display in second and last position by FLIP "1.V.V"
+// Example: Verison 0x00 give 1.0.0
+// Example: Verison 0x03 give 1.0.3
+// Example: Verison 0x25 give 1.2.5
+#define BOOTLOADER_VERSION 0x00
+
+#if (FLASH_SIZE<=0x10000)
+// FLASH < 64KB, then bootloader 4KB and ISP is optimized
+// All memories (flash,eeprom,...) do not exced 64KB.
+#define ISP_SMALL_MEMORY_SIZE
+#else
+#error Temporary change FLASH_SIZE of ATXMEGA128A1U part to be 64KB
+#endif
+
+#endif // _CONF_ISP_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega64a1u/iar/atxmega64a1_boot.xcl b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega64a1u/iar/atxmega64a1_boot.xcl
new file mode 100644
index 0000000..260b06c
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega64a1u/iar/atxmega64a1_boot.xcl
@@ -0,0 +1,73 @@
+
+
+
+
+// N O T E :
+// This is an experimental file autogenerated by an XSL transformation.
+// Read more about the purpose of this file and how it was generated here:
+// http://avrtools.norway.atmel.com/pmwiki/pmwiki.php?n=Software.XmegaFiles
+//////////////////////////////////////////////////////////////////////////////
+
+// Set up XLINK
+-ca90
+-w29
+
+// Memory size definitions for convenience
+// The '_..X_' prefix is used by C-SPY as an indication that the label should
+// not be displayed in the dissassembly window.
+
+-D_..X_FLASH_BASE=10002
+-D_..X_CODE_END=10FFF
+-D_..X_INTVEC_END=101FB
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Code (flash) segments
+-Z(CODE)INTVEC=101F4-101FF
+-Z(CODE)BOOT=_..X_FLASH_BASE-101F3
+-Z(CODE)CODE=101FC-_..X_CODE_END
+-Z(CODE)FARCODE=101FC-_..X_CODE_END
+-Z(CODE)INITTAB=101FC-_..X_CODE_END
+-Z(CODE)NEAR_ID=101FC-_..X_CODE_END
+
+
+
+
+-D_..X_SRAM_BASE=2040
+-D_..X_SRAM_TINY_END=FF
+-D_..X_SRAM_NEAR_END=FFFF
+-D_..X_SRAM_FAR_END=FFFFFF
+-D_..X_SRAM_HUGE_END=FFFFFF
+
+/*
+ * Modify the lines below to alter the size of the RSTACK, CSTACK and HEAP
+ * segments. These need to be fine tuned to suit your specific application.
+ */
+-D_..X_CSTACK_SIZE=1000 /* 4096 bytes for auto variables and register save. */
+-D_..X_RSTACK_SIZE=100 /* 256 bytes for return addresses, equivalent to */
+ /* 128 levels of calls, including interrupts. */
+-D_..X_NEAR_HEAP_SIZE=1000 /* 4096 bytes of heap. */
+-D_..X_HEAP_SIZE=1000 /* 4096 bytes of heap. */
+-D_..X_FAR_HEAP_SIZE=1000 /* 4096 bytes of heap. */
+-D_..X_HUGE_HEAP_SIZE=1000 /* 4096 bytes of heap. */
+//////////////////////////////////////////////////////////////////////////////
+// Data (SRAM, external ROM or external NV RAM) memory
+-Z(DATA)SRAM_NO_INIT=2000-2001
+-Z(DATA)TINY_I,TINY_Z,TINY_N=_..X_SRAM_BASE-_..X_SRAM_NEAR_END
+-Z(DATA)RSTACK+_..X_RSTACK_SIZE=_..X_SRAM_BASE-_..X_SRAM_NEAR_END
+-Z(DATA)NEAR_I,NEAR_Z,NEAR_N,NEAR_C=_..X_SRAM_BASE-_..X_SRAM_NEAR_END
+-Z(DATA)NEAR_HEAP+_..X_NEAR_HEAP_SIZE=_..X_SRAM_BASE-_..X_SRAM_NEAR_END
+//-Z(DATA)FAR_I=[10000-_..X_SRAM_FAR_END]/10000
+-Z(DATA)CSTACK+_..X_CSTACK_SIZE=[_..X_SRAM_BASE-_..X_SRAM_FAR_END]/10000
+-Z(DATA)HEAP+_..X_HEAP_SIZE=[_..X_SRAM_BASE-_..X_SRAM_FAR_END]/10000
+-Z(DATA)IOSTREAM_N#[_..X_SRAM_BASE-_..X_SRAM_FAR_END]/10000
+-Z(DATA)FAR_Z,FAR_N,FAR_C=[_..X_SRAM_BASE-_..X_SRAM_FAR_END]/10000
+-Z(DATA)FAR_HEAP+_..X_FAR_HEAP_SIZE=_..X_SRAM_BASE-_..X_SRAM_FAR_END
+-Z(DATA)HUGE_I,HUGE_Z,HUGE_N,HUGE_C=_..X_SRAM_BASE-_..X_SRAM_HUGE_END
+-Z(DATA)HUGE_HEAP+_..X_HUGE_HEAP_SIZE=_..X_SRAM_BASE-_..X_SRAM_HUGE_END
+
+
+
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega64a1u/iar/common_services_usb_class_dfu_device_atmel_isp_atxmega64a1u.ewp b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega64a1u/iar/common_services_usb_class_dfu_device_atmel_isp_atxmega64a1u.ewp
new file mode 100644
index 0000000..fa6945a
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega64a1u/iar/common_services_usb_class_dfu_device_atmel_isp_atxmega64a1u.ewp
@@ -0,0 +1,2089 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+
+<project>
+ <fileVersion>2</fileVersion>
+ <configuration>
+ <name>Debug</name>
+ <toolchain>
+ <name>AVR</name>
+ </toolchain>
+ <debug>1</debug>
+ <settings>
+ <name>General</name>
+ <archiveVersion>10</archiveVersion>
+ <data>
+ <version>8</version>
+ <wantNonLocal>1</wantNonLocal>
+ <debug>1</debug>
+ <option>
+ <name>GGEnhancedCore</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>Variant Memory</name>
+ <version>0</version>
+ <state>1</state>
+ </option>
+ <option>
+ <name>ExePath</name>
+ <state>Debug\Exe</state>
+ </option>
+ <option>
+ <name>ObjPath</name>
+ <state>Debug\Obj</state>
+ </option>
+ <option>
+ <name>ListPath</name>
+ <state>Debug\List</state>
+ </option>
+ <option>
+ <name>GGEnableConfig</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>GG64KFlash</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>GG64BitDoubles</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>GGFPSLICCOnfig</name>
+ <version>0</version>
+ <state>3</state>
+ </option>
+ <option>
+ <name>LCEnableBitDefs</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>LCHeapSize</name>
+ <state>0x10</state>
+ </option>
+ <option>
+ <name>SCCStackSize</name>
+ <state>0x100</state>
+ </option>
+ <option>
+ <name>SCExtCStack</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>SCRStackSize</name>
+ <state>0x100</state>
+ </option>
+ <option>
+ <name>SCExtRStack</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>SCEnableBus</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>SCAddWaitstate</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>SCRamBase</name>
+ <state>0x0</state>
+ </option>
+ <option>
+ <name>SCRamSize</name>
+ <state>0x0</state>
+ </option>
+ <option>
+ <name>SCRomBase</name>
+ <state>0x0</state>
+ </option>
+ <option>
+ <name>SCRomSize</name>
+ <state>0x0</state>
+ </option>
+ <option>
+ <name>SCNVBase</name>
+ <state>0x0</state>
+ </option>
+ <option>
+ <name>SCNVSize</name>
+ <state>0x0</state>
+ </option>
+ <option>
+ <name>SCInitWithReti</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>GOutputBinary</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>GGEepromUtil</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>GGEepromUtilSize</name>
+ <state>2048</state>
+ </option>
+ <option>
+ <name>New Variant Processor</name>
+ <version>33</version>
+ <state>190</state>
+ </option>
+ <option>
+ <name>GRuntimeLibSelect</name>
+ <version>0</version>
+ <state>1</state>
+ </option>
+ <option>
+ <name>RTDescription</name>
+ <state>Use the normal configuration of the C/EC++</state>
+ <state>runtime library. No locale interface,</state>
+ <state>C locale, no file descriptor support,</state>
+ <state>no multibytes in printf and scanf, and</state>
+ <state>no hex floats in strtod.</state>
+ </option>
+ <option>
+ <name>RTConfigPath</name>
+ <state>$TOOLKIT_DIR$\LIB\DLIB\dlAVR-6s-xmega-n.h</state>
+ </option>
+ <option>
+ <name>RTLibraryPath</name>
+ <state>$TOOLKIT_DIR$\LIB\DLIB\dlAVR-6s-xmega-n.r90</state>
+ </option>
+ <option>
+ <name>Input variant</name>
+ <version>0</version>
+ <state>1</state>
+ </option>
+ <option>
+ <name>Input description</name>
+ <state> No specifier n, no float or long long.</state>
+ </option>
+ <option>
+ <name>Output variant</name>
+ <version>0</version>
+ <state>3</state>
+ </option>
+ <option>
+ <name>Output description</name>
+ <state> specifier a or A, no specifier n, no float or long long.</state>
+ </option>
+ <option>
+ <name>GRuntimeLibSelectSlave</name>
+ <version>0</version>
+ <state>1</state>
+ </option>
+ <option>
+ <name>GeneralEnableMisra</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>GeneralMisraVerbose</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>LCTinyHeapSize</name>
+ <state>0x10</state>
+ </option>
+ <option>
+ <name>LCNearHeapSize</name>
+ <state>0x20</state>
+ </option>
+ <option>
+ <name>LCFarHeapSize</name>
+ <state>0x1000</state>
+ </option>
+ <option>
+ <name>LCHugeHeapSize</name>
+ <state>0x1000</state>
+ </option>
+ <option>
+ <name>LCsHeapConfigText</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>GGNoMULInstruction</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>GeneralMisraVer</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>GeneralMisraRules04</name>
+ <version>0</version>
+ <state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
+ </option>
+ <option>
+ <name>GeneralMisraRules98</name>
+ <version>0</version>
+ <state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
+ </option>
+ </data>
+ </settings>
+ <settings>
+ <name>ICCAVR</name>
+ <archiveVersion>5</archiveVersion>
+ <data>
+ <version>14</version>
+ <wantNonLocal>1</wantNonLocal>
+ <debug>1</debug>
+ <option>
+ <name>CCVariantProcessor</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCEnhancedCore</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCVariantMemory</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCObjPrefix</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCDefines</name>
+ <state>__ATxmega128A1U__</state>
+ <state>BOARD=DUMMY_BOARD</state>
+ </option>
+ <option>
+ <name>CCPreprocFile</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCPreprocComments</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCPreprocLine</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCListCFile</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCListCMnemonics</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCListCMessages</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCListAssFile</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCListAssSource</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCEnableRemarks</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCDiagSuppress</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CCDiagRemark</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CCDiagWarning</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CCDiagError</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CCWarnAsError</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCConstInRAM</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCInitInFlash</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCForceVariables</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCOldCallConv</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCLockRegs</name>
+ <version>0</version>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCOptSizeSpeed</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCOptimization</name>
+ <version>1</version>
+ <state>4</state>
+ </option>
+ <option>
+ <name>CCAllowList</name>
+ <version>3</version>
+ <state>111111</state>
+ </option>
+ <option>
+ <name>CCCrossCallPassesList</name>
+ <version>8</version>
+ <state>5</state>
+ </option>
+ <option>
+ <name>CCObjUseModuleName</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCObjModuleName</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CCDebugInfo</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCNoErrorMsg</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CC64BitDoubles</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CC64KFlash</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCEnableExtBus</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCEnableBitDefs</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCOptForceCrossCall</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCCharIs</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCExt</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>IExtraOptions</name>
+ <state></state>
+ </option>
+ <option>
+ <name>IExtraOptionsCheck</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCMultibyteSupport</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCRequirePrototypes</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCCompilerRuntimeInfo</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>newCCIncludePaths</name>
+ <state>$TOOLKIT_DIR$\INC\</state>
+ <state>$TOOLKIT_DIR$\INC\DLIB\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\xmega\drivers\cpu</state>
+ <state>$PROJ_DIR$\.</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\xmega\boards\dummy</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\xmega\utils</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\xmega\drivers\nvm</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\xmega\drivers\usb</state>
+ <state>$PROJ_DIR$\..</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\xmega\boards</state>
+ <state>$PROJ_DIR$\..\..\..\..</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\utils</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\clock</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\udc</state>
+ <state>$PROJ_DIR$\..\..</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\boards</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\xmega\utils\preprocessor</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..</state>
+ </option>
+ <option>
+ <name>CCStdIncCheck</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCStdIncludePaths</name>
+ <state>$TOOLKIT_DIR$\INC\</state>
+ <state>$TOOLKIT_DIR$\INC\DLIB\</state>
+ </option>
+ <option>
+ <name>CCEepromSize</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCLockRegsSlave</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCOptSizeSpeedSlave</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCOptimizationSlave</name>
+ <version>1</version>
+ <state>4</state>
+ </option>
+ <option>
+ <name>CCOutputFile</name>
+ <state>$FILE_BNAME$.r90</state>
+ </option>
+ <option>
+ <name>CCLangSelect</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CompilerMisraOverride</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCLibConfigHeader</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>PreInclude</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CCOverrideModuleTypeDefault</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCRadioModuleType</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCRadioModuleTypeSlave</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>OCCAdditionalCommandLineOptionsSlave</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CompilerMisraRules04</name>
+ <version>0</version>
+ <state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
+ </option>
+ <option>
+ <name>CompilerMisraRules98</name>
+ <version>0</version>
+ <state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
+ </option>
+ </data>
+ </settings>
+ <settings>
+ <name>AAVR</name>
+ <archiveVersion>4</archiveVersion>
+ <data>
+ <version>10</version>
+ <wantNonLocal>1</wantNonLocal>
+ <debug>1</debug>
+ <option>
+ <name>IProcessor</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AObjPrefix</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>ACaseSensitivity</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>AWarnEnable</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AWarnWhat</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AWarnOne</name>
+ <state></state>
+ </option>
+ <option>
+ <name>AWarnRange1</name>
+ <state></state>
+ </option>
+ <option>
+ <name>AWarnRange2</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CDebug</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>ADefines</name>
+ <state>BOARD=DUMMY_BOARD</state>
+ </option>
+ <option>
+ <name>MacroChars</name>
+ <version>0</version>
+ <state>0</state>
+ </option>
+ <option>
+ <name>UndefAsm</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>UndefFile</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>UndefLine</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>UndefTime</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>UndefDate</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>UndefTid</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>AList</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AListHeader</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>AListing</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>Includes</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>MacDefs</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>MacExps</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>MacExec</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>OnlyAssed</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>MultiLine</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>PageLengthCheck</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>PageLength</name>
+ <state>80</state>
+ </option>
+ <option>
+ <name>TabSpacing</name>
+ <state>8</state>
+ </option>
+ <option>
+ <name>AXRef</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AXRefDefines</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AXRefInternal</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AXRefDual</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AExtraOptions</name>
+ <state></state>
+ </option>
+ <option>
+ <name>OAEnhancedCore</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>AExtraOptionsCheck</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AMaxErrOn</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AMaxErrNum</name>
+ <state>100</state>
+ </option>
+ <option>
+ <name>ANewIncludes</name>
+ <state>$TOOLKIT_DIR$\INC\</state>
+ <state>$TOOLKIT_DIR$\INC\DLIB\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\xmega\drivers\cpu</state>
+ <state>$PROJ_DIR$\.</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\xmega\boards\dummy</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\xmega\utils</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\xmega\drivers\nvm</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\xmega\drivers\usb</state>
+ <state>$PROJ_DIR$\..</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\xmega\boards</state>
+ <state>$PROJ_DIR$\..\..\..\..</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\utils</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\clock</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\udc</state>
+ <state>$PROJ_DIR$\..\..</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\boards</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\xmega\utils\preprocessor</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..</state>
+ </option>
+ <option>
+ <name>AsmMultiByteSupport</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AavrVariantMemory</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AsmHasElpm</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AsmOutputFile</name>
+ <state>$FILE_BNAME$.r90</state>
+ </option>
+ </data>
+ </settings>
+ <settings>
+ <name>CUSTOM</name>
+ <archiveVersion>3</archiveVersion>
+ <data>
+ <extensions></extensions>
+ <cmdline></cmdline>
+ </data>
+ </settings>
+ <settings>
+ <name>BICOMP</name>
+ <archiveVersion>0</archiveVersion>
+ <data/>
+ </settings>
+ <settings>
+ <name>BUILDACTION</name>
+ <archiveVersion>1</archiveVersion>
+ <data>
+ <prebuild></prebuild>
+ <postbuild></postbuild>
+ </data>
+ </settings>
+ <settings>
+ <name>XLINK</name>
+ <archiveVersion>2</archiveVersion>
+ <data>
+ <version>13</version>
+ <wantNonLocal>1</wantNonLocal>
+ <debug>1</debug>
+ <option>
+ <name>XOutOverride</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>OutputFile</name>
+ <state>common_services_usb_class_dfu_device_atmel_isp_atxmega64a1u.d90</state>
+ </option>
+ <option>
+ <name>OutputFormat</name>
+ <version>11</version>
+ <state>70</state>
+ </option>
+ <option>
+ <name>FormatVariant</name>
+ <version>8</version>
+ <state>2</state>
+ </option>
+ <option>
+ <name>SecondaryOutputFile</name>
+ <state>(None for the selected format)</state>
+ </option>
+ <option>
+ <name>XDefines</name>
+ <state></state>
+ </option>
+ <option>
+ <name>AlwaysOutput</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>OverlapWarnings</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>NoGlobalCheck</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>XList</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>SegmentMap</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>ListSymbols</name>
+ <state>2</state>
+ </option>
+ <option>
+ <name>PageLengthCheck</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>PageLength</name>
+ <state>80</state>
+ </option>
+ <option>
+ <name>XIncludes</name>
+ <state>$TOOLKIT_DIR$\LIB\</state>
+ </option>
+ <option>
+ <name>ModuleStatus</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>XclOverride</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>XclFile</name>
+ <state>$PROJ_DIR$\test_on_atxmega128a1_boot.xcl</state>
+ </option>
+ <option>
+ <name>XclFileSlave</name>
+ <state></state>
+ </option>
+ <option>
+ <name>DoFill</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>FillerByte</name>
+ <state>0xFF</state>
+ </option>
+ <option>
+ <name>DoCrc</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CrcSize</name>
+ <version>0</version>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CrcAlgo</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CrcPoly</name>
+ <state>0x11021</state>
+ </option>
+ <option>
+ <name>CrcCompl</name>
+ <version>0</version>
+ <state>0</state>
+ </option>
+ <option>
+ <name>RangeCheckAlternatives</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>SuppressAllWarn</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>SuppressDiags</name>
+ <state></state>
+ </option>
+ <option>
+ <name>TreatAsWarn</name>
+ <state></state>
+ </option>
+ <option>
+ <name>TreatAsErr</name>
+ <state></state>
+ </option>
+ <option>
+ <name>ModuleLocalSym</name>
+ <version>0</version>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CrcBitOrder</name>
+ <version>0</version>
+ <state>0</state>
+ </option>
+ <option>
+ <name>OXSysConfig</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>XExtraOptionsCheck</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>XExtraOptions</name>
+ <state></state>
+ </option>
+ <option>
+ <name>IncludeSuppressed</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>ModuleSummary</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>xcProgramEntryLabel</name>
+ <state>__program_start</state>
+ </option>
+ <option>
+ <name>DebugInformation</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>RuntimeControl</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>IoEmulation</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>AllowExtraOutput</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>GenerateExtraOutput</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>XExtraOutOverride</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>ExtraOutputFile</name>
+ <state>common_services_usb_class_dfu_device_atmel_isp_atxmega64a1u.a90</state>
+ </option>
+ <option>
+ <name>ExtraOutputFormat</name>
+ <version>11</version>
+ <state>23</state>
+ </option>
+ <option>
+ <name>ExtraFormatVariant</name>
+ <version>8</version>
+ <state>2</state>
+ </option>
+ <option>
+ <name>xcOverrideProgramEntryLabel</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>xcProgramEntryLabelSelect</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>ListOutputFormat</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>BufferedTermOutput</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>XcRTLibraryFile</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>OXLibIOConfig</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>XLinkMisraHandler</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>OverlaySystemMap</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>RawBinaryFile</name>
+ <state></state>
+ </option>
+ <option>
+ <name>RawBinarySymbol</name>
+ <state></state>
+ </option>
+ <option>
+ <name>RawBinarySegment</name>
+ <state></state>
+ </option>
+ <option>
+ <name>RawBinaryAlign</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CrcAlign</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CrcInitialValue</name>
+ <state>0x00</state>
+ </option>
+ </data>
+ </settings>
+ <settings>
+ <name>XAR</name>
+ <archiveVersion>2</archiveVersion>
+ <data>
+ <version>0</version>
+ <wantNonLocal>1</wantNonLocal>
+ <debug>1</debug>
+ <option>
+ <name>XAROutOverride</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>XARInputs</name>
+ <state></state>
+ </option>
+ <option>
+ <name>OutputFile</name>
+ <state></state>
+ </option>
+ </data>
+ </settings>
+ <settings>
+ <name>BILINK</name>
+ <archiveVersion>0</archiveVersion>
+ <data/>
+ </settings>
+ </configuration>
+ <configuration>
+ <name>Release</name>
+ <toolchain>
+ <name>AVR</name>
+ </toolchain>
+ <debug>0</debug>
+ <settings>
+ <name>General</name>
+ <archiveVersion>10</archiveVersion>
+ <data>
+ <version>8</version>
+ <wantNonLocal>1</wantNonLocal>
+ <debug>0</debug>
+ <option>
+ <name>GGEnhancedCore</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>Variant Memory</name>
+ <version>0</version>
+ <state>0</state>
+ </option>
+ <option>
+ <name>ExePath</name>
+ <state>Release\Exe</state>
+ </option>
+ <option>
+ <name>ObjPath</name>
+ <state>Release\Obj</state>
+ </option>
+ <option>
+ <name>ListPath</name>
+ <state>Release\List</state>
+ </option>
+ <option>
+ <name>GGEnableConfig</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>GG64KFlash</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>GG64BitDoubles</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>GGFPSLICCOnfig</name>
+ <version>0</version>
+ <state>3</state>
+ </option>
+ <option>
+ <name>LCEnableBitDefs</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>LCHeapSize</name>
+ <state>0x10</state>
+ </option>
+ <option>
+ <name>SCCStackSize</name>
+ <state>0x100</state>
+ </option>
+ <option>
+ <name>SCExtCStack</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>SCRStackSize</name>
+ <state>0x100</state>
+ </option>
+ <option>
+ <name>SCExtRStack</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>SCEnableBus</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>SCAddWaitstate</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>SCRamBase</name>
+ <state>0x0</state>
+ </option>
+ <option>
+ <name>SCRamSize</name>
+ <state>0x0</state>
+ </option>
+ <option>
+ <name>SCRomBase</name>
+ <state>0x0</state>
+ </option>
+ <option>
+ <name>SCRomSize</name>
+ <state>0x0</state>
+ </option>
+ <option>
+ <name>SCNVBase</name>
+ <state>0x0</state>
+ </option>
+ <option>
+ <name>SCNVSize</name>
+ <state>0x0</state>
+ </option>
+ <option>
+ <name>SCInitWithReti</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>GOutputBinary</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>GGEepromUtil</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>GGEepromUtilSize</name>
+ <state>2048</state>
+ </option>
+ <option>
+ <name>New Variant Processor</name>
+ <version>33</version>
+ <state>190</state>
+ </option>
+ <option>
+ <name>GRuntimeLibSelect</name>
+ <version>0</version>
+ <state>1</state>
+ </option>
+ <option>
+ <name>RTDescription</name>
+ <state>runtime library. No locale interface,</state>
+ <state>C locale, no file descriptor support,</state>
+ <state>no multibytes in printf and scanf, and</state>
+ <state>no hex floats in strtod.</state>
+ <state>Use the normal configuration of the C/EC++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.</state>
+ </option>
+ <option>
+ <name>RTConfigPath</name>
+ <state>$TOOLKIT_DIR$\LIB\DLIB\dlAVR-6s-xmega-n.h</state>
+ </option>
+ <option>
+ <name>RTLibraryPath</name>
+ <state>$TOOLKIT_DIR$\LIB\DLIB\dlAVR-6s-xmega-n.r90</state>
+ </option>
+ <option>
+ <name>Input variant</name>
+ <version>0</version>
+ <state>0</state>
+ </option>
+ <option>
+ <name>Input description</name>
+ <state>Full formatting.</state>
+ </option>
+ <option>
+ <name>Output variant</name>
+ <version>0</version>
+ <state>3</state>
+ </option>
+ <option>
+ <name>Output description</name>
+ <state> specifier a or A, no specifier n, no float or long long.</state>
+ </option>
+ <option>
+ <name>GRuntimeLibSelectSlave</name>
+ <version>0</version>
+ <state>1</state>
+ </option>
+ <option>
+ <name>GeneralEnableMisra</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>GeneralMisraVerbose</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>LCTinyHeapSize</name>
+ <state>0x10</state>
+ </option>
+ <option>
+ <name>LCNearHeapSize</name>
+ <state>0x20</state>
+ </option>
+ <option>
+ <name>LCFarHeapSize</name>
+ <state>0x1000</state>
+ </option>
+ <option>
+ <name>LCHugeHeapSize</name>
+ <state>0x1000</state>
+ </option>
+ <option>
+ <name>LCsHeapConfigText</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>GGNoMULInstruction</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>GeneralMisraVer</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>GeneralMisraRules04</name>
+ <version>0</version>
+ <state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
+ </option>
+ <option>
+ <name>GeneralMisraRules98</name>
+ <version>0</version>
+ <state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
+ </option>
+ </data>
+ </settings>
+ <settings>
+ <name>ICCAVR</name>
+ <archiveVersion>5</archiveVersion>
+ <data>
+ <version>14</version>
+ <wantNonLocal>1</wantNonLocal>
+ <debug>0</debug>
+ <option>
+ <name>CCVariantProcessor</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCEnhancedCore</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCVariantMemory</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCObjPrefix</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCDefines</name>
+ <state>NDEBUG</state>
+ <state>BOARD=DUMMY_BOARD</state>
+ </option>
+ <option>
+ <name>CCPreprocFile</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCPreprocComments</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCPreprocLine</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCListCFile</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCListCMnemonics</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCListCMessages</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCListAssFile</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCListAssSource</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCEnableRemarks</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCDiagSuppress</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CCDiagRemark</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CCDiagWarning</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CCDiagError</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CCWarnAsError</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCConstInRAM</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCInitInFlash</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCForceVariables</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCOldCallConv</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCLockRegs</name>
+ <version>0</version>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCOptSizeSpeed</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCOptimization</name>
+ <version>1</version>
+ <state>4</state>
+ </option>
+ <option>
+ <name>CCAllowList</name>
+ <version>3</version>
+ <state>111111</state>
+ </option>
+ <option>
+ <name>CCCrossCallPassesList</name>
+ <version>8</version>
+ <state>5</state>
+ </option>
+ <option>
+ <name>CCObjUseModuleName</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCObjModuleName</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CCDebugInfo</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCNoErrorMsg</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CC64BitDoubles</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CC64KFlash</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCEnableExtBus</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCEnableBitDefs</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCOptForceCrossCall</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCCharIs</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCExt</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>IExtraOptions</name>
+ <state></state>
+ </option>
+ <option>
+ <name>IExtraOptionsCheck</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCMultibyteSupport</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCRequirePrototypes</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCCompilerRuntimeInfo</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>newCCIncludePaths</name>
+ <state>$TOOLKIT_DIR$\INC\</state>
+ <state>$TOOLKIT_DIR$\INC\DLIB\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\xmega\drivers\cpu</state>
+ <state>$PROJ_DIR$\.</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\xmega\boards\dummy</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\xmega\utils</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\xmega\drivers\nvm</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\xmega\drivers\usb</state>
+ <state>$PROJ_DIR$\..</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\xmega\boards</state>
+ <state>$PROJ_DIR$\..\..\..\..</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\utils</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\clock</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\udc</state>
+ <state>$PROJ_DIR$\..\..</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\boards</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\xmega\utils\preprocessor</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..</state>
+ </option>
+ <option>
+ <name>CCStdIncCheck</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCStdIncludePaths</name>
+ <state>$TOOLKIT_DIR$\INC\</state>
+ <state>$TOOLKIT_DIR$\INC\DLIB\</state>
+ </option>
+ <option>
+ <name>CCEepromSize</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCLockRegsSlave</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCOptSizeSpeedSlave</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCOptimizationSlave</name>
+ <version>1</version>
+ <state>4</state>
+ </option>
+ <option>
+ <name>CCOutputFile</name>
+ <state>$FILE_BNAME$.r90</state>
+ </option>
+ <option>
+ <name>CCLangSelect</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CompilerMisraOverride</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCLibConfigHeader</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>PreInclude</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CCOverrideModuleTypeDefault</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCRadioModuleType</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCRadioModuleTypeSlave</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>OCCAdditionalCommandLineOptionsSlave</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CompilerMisraRules04</name>
+ <version>0</version>
+ <state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
+ </option>
+ <option>
+ <name>CompilerMisraRules98</name>
+ <version>0</version>
+ <state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
+ </option>
+ </data>
+ </settings>
+ <settings>
+ <name>AAVR</name>
+ <archiveVersion>4</archiveVersion>
+ <data>
+ <version>10</version>
+ <wantNonLocal>1</wantNonLocal>
+ <debug>0</debug>
+ <option>
+ <name>IProcessor</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AObjPrefix</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>ACaseSensitivity</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>AWarnEnable</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AWarnWhat</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AWarnOne</name>
+ <state></state>
+ </option>
+ <option>
+ <name>AWarnRange1</name>
+ <state></state>
+ </option>
+ <option>
+ <name>AWarnRange2</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CDebug</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>ADefines</name>
+ <state>BOARD=DUMMY_BOARD</state>
+ </option>
+ <option>
+ <name>MacroChars</name>
+ <version>0</version>
+ <state>0</state>
+ </option>
+ <option>
+ <name>UndefAsm</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>UndefFile</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>UndefLine</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>UndefTime</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>UndefDate</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>UndefTid</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>AList</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AListHeader</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>AListing</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>Includes</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>MacDefs</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>MacExps</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>MacExec</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>OnlyAssed</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>MultiLine</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>PageLengthCheck</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>PageLength</name>
+ <state>80</state>
+ </option>
+ <option>
+ <name>TabSpacing</name>
+ <state>8</state>
+ </option>
+ <option>
+ <name>AXRef</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AXRefDefines</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AXRefInternal</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AXRefDual</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AExtraOptions</name>
+ <state></state>
+ </option>
+ <option>
+ <name>OAEnhancedCore</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>AExtraOptionsCheck</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AMaxErrOn</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AMaxErrNum</name>
+ <state>100</state>
+ </option>
+ <option>
+ <name>ANewIncludes</name>
+ <state>$TOOLKIT_DIR$\INC\</state>
+ <state>$TOOLKIT_DIR$\INC\DLIB\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\xmega\drivers\cpu</state>
+ <state>$PROJ_DIR$\.</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\xmega\boards\dummy</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\xmega\utils</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\xmega\drivers\nvm</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\xmega\drivers\usb</state>
+ <state>$PROJ_DIR$\..</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\xmega\boards</state>
+ <state>$PROJ_DIR$\..\..\..\..</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\utils</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\clock</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\udc</state>
+ <state>$PROJ_DIR$\..\..</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\boards</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\xmega\utils\preprocessor</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..</state>
+ </option>
+ <option>
+ <name>AsmMultiByteSupport</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AavrVariantMemory</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AsmHasElpm</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AsmOutputFile</name>
+ <state></state>
+ </option>
+ </data>
+ </settings>
+ <settings>
+ <name>CUSTOM</name>
+ <archiveVersion>3</archiveVersion>
+ <data>
+ <extensions></extensions>
+ <cmdline></cmdline>
+ </data>
+ </settings>
+ <settings>
+ <name>BICOMP</name>
+ <archiveVersion>0</archiveVersion>
+ <data/>
+ </settings>
+ <settings>
+ <name>BUILDACTION</name>
+ <archiveVersion>1</archiveVersion>
+ <data>
+ <prebuild></prebuild>
+ <postbuild></postbuild>
+ </data>
+ </settings>
+ <settings>
+ <name>XLINK</name>
+ <archiveVersion>2</archiveVersion>
+ <data>
+ <version>13</version>
+ <wantNonLocal>1</wantNonLocal>
+ <debug>0</debug>
+ <option>
+ <name>XOutOverride</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>OutputFile</name>
+ <state></state>
+ </option>
+ <option>
+ <name>OutputFormat</name>
+ <version>11</version>
+ <state>70</state>
+ </option>
+ <option>
+ <name>FormatVariant</name>
+ <version>8</version>
+ <state>2</state>
+ </option>
+ <option>
+ <name>SecondaryOutputFile</name>
+ <state>(None for the selected format)</state>
+ </option>
+ <option>
+ <name>XDefines</name>
+ <state></state>
+ </option>
+ <option>
+ <name>AlwaysOutput</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>OverlapWarnings</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>NoGlobalCheck</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>XList</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>SegmentMap</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>ListSymbols</name>
+ <state>2</state>
+ </option>
+ <option>
+ <name>PageLengthCheck</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>PageLength</name>
+ <state>80</state>
+ </option>
+ <option>
+ <name>XIncludes</name>
+ <state>###Uninitialized###</state>
+ </option>
+ <option>
+ <name>ModuleStatus</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>XclOverride</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>XclFile</name>
+ <state>$PROJ_DIR$\atxmega64a1_boot.xcl</state>
+ </option>
+ <option>
+ <name>XclFileSlave</name>
+ <state></state>
+ </option>
+ <option>
+ <name>DoFill</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>FillerByte</name>
+ <state>0xFF</state>
+ </option>
+ <option>
+ <name>DoCrc</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CrcSize</name>
+ <version>0</version>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CrcAlgo</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CrcPoly</name>
+ <state>0x11021</state>
+ </option>
+ <option>
+ <name>CrcCompl</name>
+ <version>0</version>
+ <state>0</state>
+ </option>
+ <option>
+ <name>RangeCheckAlternatives</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>SuppressAllWarn</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>SuppressDiags</name>
+ <state></state>
+ </option>
+ <option>
+ <name>TreatAsWarn</name>
+ <state></state>
+ </option>
+ <option>
+ <name>TreatAsErr</name>
+ <state></state>
+ </option>
+ <option>
+ <name>ModuleLocalSym</name>
+ <version>0</version>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CrcBitOrder</name>
+ <version>0</version>
+ <state>0</state>
+ </option>
+ <option>
+ <name>OXSysConfig</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>XExtraOptionsCheck</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>XExtraOptions</name>
+ <state></state>
+ </option>
+ <option>
+ <name>IncludeSuppressed</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>ModuleSummary</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>xcProgramEntryLabel</name>
+ <state>__program_start</state>
+ </option>
+ <option>
+ <name>DebugInformation</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>RuntimeControl</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>IoEmulation</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>AllowExtraOutput</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>GenerateExtraOutput</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>XExtraOutOverride</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>ExtraOutputFile</name>
+ <state></state>
+ </option>
+ <option>
+ <name>ExtraOutputFormat</name>
+ <version>11</version>
+ <state>25</state>
+ </option>
+ <option>
+ <name>ExtraFormatVariant</name>
+ <version>8</version>
+ <state>2</state>
+ </option>
+ <option>
+ <name>xcOverrideProgramEntryLabel</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>xcProgramEntryLabelSelect</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>ListOutputFormat</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>BufferedTermOutput</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>XcRTLibraryFile</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>OXLibIOConfig</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>XLinkMisraHandler</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>OverlaySystemMap</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>RawBinaryFile</name>
+ <state></state>
+ </option>
+ <option>
+ <name>RawBinarySymbol</name>
+ <state></state>
+ </option>
+ <option>
+ <name>RawBinarySegment</name>
+ <state></state>
+ </option>
+ <option>
+ <name>RawBinaryAlign</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CrcAlign</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CrcInitialValue</name>
+ <state>0x00</state>
+ </option>
+ </data>
+ </settings>
+ <settings>
+ <name>XAR</name>
+ <archiveVersion>2</archiveVersion>
+ <data>
+ <version>0</version>
+ <wantNonLocal>1</wantNonLocal>
+ <debug>0</debug>
+ <option>
+ <name>XAROutOverride</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>XARInputs</name>
+ <state></state>
+ </option>
+ <option>
+ <name>OutputFile</name>
+ <state></state>
+ </option>
+ </data>
+ </settings>
+ <settings>
+ <name>BILINK</name>
+ <archiveVersion>0</archiveVersion>
+ <data/>
+ </settings>
+ </configuration>
+ <mfc_discard>
+ <configuration>Debug</configuration>
+ </mfc_discard>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\xmega\drivers\cpu\ccp.s</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\cstartup.s90</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\isp.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\main.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\xmega\drivers\nvm\nvm.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\xmega\drivers\nvm\nvm_asm.s</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\clock\xmega\sysclk.c</name>
+ <excluded>
+ <configuration>Debug</configuration>
+ </excluded>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\sysclk_opt.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\..\..\..\..\udc\udc.c</name>
+ <excluded>
+ <configuration>Debug</configuration>
+ </excluded>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\udc_opt.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\udi_dfu_atmel.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\udi_dfu_atmel_desc.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\..\..\..\..\..\..\..\xmega\drivers\usb\usb_device.c</name>
+ </file>
+</project>
+
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega64a1u/iar/cstartup.s90 b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega64a1u/iar/cstartup.s90
new file mode 100644
index 0000000..8546fa6
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega64a1u/iar/cstartup.s90
@@ -0,0 +1,199 @@
+;----------------------------------------------------------------------------
+;
+; This module contains the AVR C and EC++ startup
+;
+; File version: $Revision: 6648 $
+;
+;----------------------------------------------------------------------------
+
+
+#include "macros.m90"
+
+#define RST_STATUS 0x0078 ///< Reset Controller status
+#define RST_SRF_bp 5 ///< Software Reset Flag bit position
+#define RST_SRF_bm 0x20 ///< Software Reset Flag bit mask
+
+#define SWITCHPORT PORTF
+#define SWITCHPIN 0
+
+#define PORTF 0x06A0
+#define DIR 0
+#define DIRSET 1
+#define DIRCLR 2
+#define DIRTGL 3
+#define PORT_OUT 4
+#define OUTSET 5
+#define OUTCLR 6
+#define OUTTGL 7
+#define PORT_IN 8
+#define INTCTRL 9
+#define INT0MASK 10
+#define INT1MASK 11
+#define INTFLAGS 12
+#define reserved_0x0D 13
+#define reserved_0x0E 14
+#define reserved_0x0F 15
+#define PIN0CTRL 16
+
+
+;----------------------------------------------------------------------------
+; Set up the RESET segment with a reset vector
+;----------------------------------------------------------------------------
+ MODULE ?RESET
+ EXTERN ?C_STARTUP
+ PUBLIC __program_start
+ PUBLIC ?RESET
+
+#ifdef __ATxmega128A1U__
+ ASEG 0x20000
+#else // It is ATxmega64A1U
+ ASEG 0x10000
+#endif
+
+__program_start:
+?RESET:
+ RJMP ?C_STARTUP
+
+ ENDMOD
+
+;----------------------------------------------------------------------------
+; Set up the INTVEC segment with a reset vector
+;----------------------------------------------------------------------------
+ MODULE ?VECT
+ COMMON INTVEC:CODE:ROOT(1) ; Align at an even address
+ EXTERN ?C_STARTUP
+ ENDMOD
+
+;----------------------------------------------------------------------------
+; Forward declarations of segments used in initialization
+;----------------------------------------------------------------------------
+ RSEG CSTACK:DATA:NOROOT(0)
+ RSEG RSTACK:DATA:NOROOT(0)
+
+;----------------------------------------------------------------------------
+; Perform C initialization
+;----------------------------------------------------------------------------
+ MODULE ?C_STARTUP
+ EXTERN main
+ EXTERN exit
+ EXTERN _exit
+
+ RSEG BOOT:CODE:NOROOT(1)
+ PUBLIC ?C_STARTUP
+ PUBLIC __RESTART
+ EXTERN ?RESET
+
+__RESTART:
+?C_STARTUP:
+
+#if A90_POINTER_REG_SIZE > 2
+ PUBLIC ?zero_reg_initialization
+?zero_reg_initialization:
+ CLR R15
+ OUT RAMPD,R15
+#endif
+
+
+;----------------------------------------------------------------------------
+; Boot Process
+;----------------------------------------------------------------------------
+
+boot_process:
+ // Test Software reset
+ LDS R16,(RST_STATUS)
+ SBRC R16,RST_SRF_bp // Test Software Reset Flag
+ RJMP start_app
+
+ // Test ISP pin
+ STS (SWITCHPORT+DIR), R15
+ LDI R16,0x18
+ STS (SWITCHPORT+PIN0CTRL+SWITCHPIN), R16
+ LDI R16,0xFF
+tempo:
+ DEC R16
+ TST R16
+ BRNE tempo
+ LDS R16,(SWITCHPORT+PORT_IN)
+ SBRS R16,SWITCHPIN // test ISP pin active
+ RJMP start_boot // pin activated
+
+ // Test beginning of flash blank
+ LDI R30, 0
+ LDI R31, 0
+ ELPM R16, Z+
+ ELPM R17, Z
+ CPI R16, 255
+ BRNE start_app_jmp
+ CPI R17, 255
+ BRNE start_app_jmp
+
+ RJMP start_boot
+start_app_jmp:
+ RJMP start_app
+
+;----------------------------------------------------------------------------
+; Call Bootloader
+;----------------------------------------------------------------------------
+ RSEG STARTBOOT:CODE:NOROOT(1), 0x201FC
+ PUBLIC start_boot
+start_boot:
+ RJMP ?SETUP_STACK
+
+;----------------------------------------------------------------------------
+; Set up the CSTACK and RSTACK pointers.
+;----------------------------------------------------------------------------
+ RSEG BOOT:CODE:NOROOT(1)
+ EXTERN __segment_init
+ PUBLIC ?need_segment_init
+
+?SETUP_STACK:
+ ;; Return address stack (RSTACK)
+ LDI R16,LOW(SFE(RSTACK)-1)
+ OUT 0x3D,R16
+#if A90_POINTER_REG_SIZE > 1
+ LDI R16,HIGH(SFE(RSTACK)-1)
+ OUT 0x3E,R16
+#endif
+ ;; Data stack (CSTACK)
+ LDI Y0,LOW(SFE(CSTACK))
+#if A90_POINTER_REG_SIZE > 1
+#if MEMORY_MODEL == TINY_MEMORY_MODEL
+ LDI Y1,0
+#else
+ LDI Y1,HIGH(SFE(CSTACK))
+#endif
+#if A90_POINTER_REG_SIZE > 2
+ LDI Z0,HWRD(SFB(CSTACK))
+ OUT RAMPY,Z0
+#endif
+#endif
+?need_segment_init:
+ XCALL __segment_init
+ RCALL main
+
+;----------------------------------------------------------------------------
+; Call Application
+;----------------------------------------------------------------------------
+ EXTERN start_app_key
+
+start_app:
+ STS (SWITCHPORT+PIN0CTRL+SWITCHPIN), R15
+ LDS R16, start_app_key
+ LDS R17, (start_app_key + 1)
+ CPI R16, 0xAA
+ SBCI R17, 0x55
+ BREQ clear_rst_flags
+jump_0:
+ JMP 0
+
+// It is a start application launched by a batchisp start command
+// then clear reset flagS
+clear_rst_flags:
+ STS start_app_key, R15
+ STS (start_app_key + 1), R15
+ LDI R16,RST_SRF_bm
+ STS RST_STATUS,R16 // Clear Software Reset Flag
+ RJMP jump_0
+ END
+
+;----------------------------------------------------------------------------
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega64a1u/iar/macros.m90 b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega64a1u/iar/macros.m90
new file mode 100644
index 0000000..ae18cf3
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega64a1u/iar/macros.m90
@@ -0,0 +1,180 @@
+;----------------------------------------------------------------------------
+;
+; MACROS.M90
+;
+; This module contains the A90/AVR C macros
+; used by cstartup.s90 and other assemble source.
+;
+; File version: $Revision: 1.8 $
+;
+;
+;----------------------------------------------------------------------------
+
+#if (((__TID__ >> 8) & 0x7F) != 90)
+#error This file should only be assembled by aa90 or aavr
+#endif
+
+#define A90_PROC_OPTION ((__TID__ >> 4) & 0x0F)
+
+/* Long or relative jumps and calls */
+#if (A90_PROC_OPTION == 0) || (A90_PROC_OPTION == 1)
+#define XCALL RCALL
+#define XJMP RJMP
+#else
+#define XCALL CALL
+#define XJMP JMP
+#endif
+
+/* Length of pointer registers (X/Y/Z) */
+#if (A90_PROC_OPTION == 0) || (A90_PROC_OPTION == 2)
+#define A90_POINTER_REG_SIZE 1
+#define A90_TINY_INDEX
+#else /*!(A90_PROC_OPTION == 0) || (A90_PROC_OPTION == 2)*/
+#if (A90_PROC_OPTION == 1) || (A90_PROC_OPTION == 3) || (A90_PROC_OPTION ==5)
+#define A90_POINTER_REG_SIZE 2
+#else /*!(A90_PROC_OPTION == 1) || (A90_PROC_OPTION == 3) || (A90_PROC_OPTION ==5)*/
+#if (A90_PROC_OPTION == 4) || (A90_PROC_OPTION == 6)
+#define A90_POINTER_REG_SIZE 3
+#define A90_EXTENDED_DATA
+#else /*!(A90_PROC_OPTION == 4) || (A90_PROC_OPTION == 6)*/
+#error Unknown processor option!!
+#endif /*!(A90_PROC_OPTION == 4) || (A90_PROC_OPTION == 6)*/
+#endif /*!(A90_PROC_OPTION == 1) || (A90_PROC_OPTION == 3) || (A90_PROC_OPTION ==5)*/
+#endif /*!(A90_PROC_OPTION == 0) || (A90_PROC_OPTION == 2)*/
+
+#if (A90_PROC_OPTION > 4)
+#define A90_LARGE_CODE
+#endif
+
+#if (A90_PROC_OPTION > 1)
+#define A90_HAS_POSSIBLE_ELPM
+#endif
+
+#ifdef A90_HAS_POSSIBLE_ELPM
+#ifdef __HAS_ELPM__
+#define A90_HAS_ELPM
+#else
+#ifndef SMALL_FLASH
+#define A90_HAS_ELPM
+#endif
+#endif
+#endif
+
+#if A90_PROC_OPTION > 1
+#define A90_24BIT_GENERIC
+#endif
+
+#if A90_PROC_OPTION < 2
+#define A90_16BIT_GENERIC
+#endif
+
+#ifdef __MEMORY_MODEL__
+
+#define TINY_MEMORY_MODEL 0
+#define SMALL_MEMORY_MODEL 1
+#define LARGE_MEMORY_MODEL 2
+#define GENERIC_MEMORY_MODEL 3
+#define HUGE_MEMORY_MODEL 4
+
+#if __MEMORY_MODEL__ == 1
+#undef MEMORY_MODEL
+#define MEMORY_MODEL TINY_MEMORY_MODEL
+#endif
+
+#if __MEMORY_MODEL__ == 2
+#undef MEMORY_MODEL
+#define MEMORY_MODEL SMALL_MEMORY_MODEL
+#endif
+
+#if __MEMORY_MODEL__ == 3
+#undef MEMORY_MODEL
+#define MEMORY_MODEL LARGE_MEMORY_MODEL
+#endif
+
+#if __MEMORY_MODEL__ == 4
+#undef MEMORY_MODEL
+#define MEMORY_MODEL GENERIC_MEMORY_MODEL
+#endif
+
+#if __MEMORY_MODEL__ == 5
+#undef MEMORY_MODEL
+#define MEMORY_MODEL HUGE_MEMORY_MODEL
+#endif
+
+#else
+
+#ifdef MEMORY_MODEL
+#define t 0
+#define s 1
+#define l 2
+#define g 3
+#define h 4
+
+#define TINY_MEMORY_MODEL 0
+#define SMALL_MEMORY_MODEL 1
+#define LARGE_MEMORY_MODEL 2
+#define GENERIC_MEMORY_MODEL 3
+#define HUGE_MEMORY_MODEL 4
+
+#if MEMORY_MODEL == t
+#undef MEMORY_MODEL
+#define MEMORY_MODEL TINY_MEMORY_MODEL
+#endif
+
+#if MEMORY_MODEL == s
+#undef MEMORY_MODEL
+#define MEMORY_MODEL SMALL_MEMORY_MODEL
+#endif
+
+#if MEMORY_MODEL == l
+#undef MEMORY_MODEL
+#define MEMORY_MODEL LARGE_MEMORY_MODEL
+#endif
+
+#if MEMORY_MODEL == g
+#undef MEMORY_MODEL
+#define MEMORY_MODEL GENERIC_MEMORY_MODEL
+#endif
+
+#if MEMORY_MODEL == h
+#undef MEMORY_MODEL
+#define MEMORY_MODEL HUGE_MEMORY_MODEL
+#endif
+
+#undef t
+#undef s
+#undef l
+#undef g
+#undef h
+#endif
+#endif
+
+/* Register nicknames */
+#define T0 R0
+#define T1 R1
+#define T2 R2
+#define T3 R3
+#define P0 R16
+#define P1 R17
+#define P2 R18
+#define P3 R19
+#define Q0 R20
+#define Q1 R21
+#define Q2 R22
+#define Q3 R23
+#define X0 R26
+#define X1 R27
+#define X2 R25
+#define Y0 R28
+#define Y1 R29
+#define Z0 R30
+#define Z1 R31
+#define Z2 R19
+
+/* I/O-Space Register nicknames */
+#define RAMPD 0x38
+#define RAMPX 0x39
+#define RAMPY 0x3A
+#define RAMPZ 0x3B
+#define EIND 0x3C
+#define SREG 0x3F
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega64a1u/iar/test_on_atxmega128a1_boot.xcl b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega64a1u/iar/test_on_atxmega128a1_boot.xcl
new file mode 100644
index 0000000..df200a8
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega64a1u/iar/test_on_atxmega128a1_boot.xcl
@@ -0,0 +1,73 @@
+
+
+
+
+// N O T E :
+// This is an experimental file autogenerated by an XSL transformation.
+// Read more about the purpose of this file and how it was generated here:
+// http://avrtools.norway.atmel.com/pmwiki/pmwiki.php?n=Software.XmegaFiles
+//////////////////////////////////////////////////////////////////////////////
+
+// Set up XLINK
+-ca90
+-w29
+
+// Memory size definitions for convenience
+// The '_..X_' prefix is used by C-SPY as an indication that the label should
+// not be displayed in the dissassembly window.
+
+-D_..X_FLASH_BASE=20002
+-D_..X_CODE_END=20FFF
+-D_..X_INTVEC_END=201FB
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Code (flash) segments
+-Z(CODE)INTVEC=201F4-201FF
+-Z(CODE)BOOT=_..X_FLASH_BASE-201F3
+-Z(CODE)CODE=201FC-_..X_CODE_END
+-Z(CODE)FARCODE=201FC-_..X_CODE_END
+-Z(CODE)INITTAB=201FC-_..X_CODE_END
+-Z(CODE)NEAR_ID=201FC-_..X_CODE_END
+
+
+
+
+-D_..X_SRAM_BASE=2040
+-D_..X_SRAM_TINY_END=FF
+-D_..X_SRAM_NEAR_END=FFFF
+-D_..X_SRAM_FAR_END=FFFFFF
+-D_..X_SRAM_HUGE_END=FFFFFF
+
+/*
+ * Modify the lines below to alter the size of the RSTACK, CSTACK and HEAP
+ * segments. These need to be fine tuned to suit your specific application.
+ */
+-D_..X_CSTACK_SIZE=1000 /* 4096 bytes for auto variables and register save. */
+-D_..X_RSTACK_SIZE=100 /* 256 bytes for return addresses, equivalent to */
+ /* 128 levels of calls, including interrupts. */
+-D_..X_NEAR_HEAP_SIZE=1000 /* 4096 bytes of heap. */
+-D_..X_HEAP_SIZE=1000 /* 4096 bytes of heap. */
+-D_..X_FAR_HEAP_SIZE=1000 /* 4096 bytes of heap. */
+-D_..X_HUGE_HEAP_SIZE=1000 /* 4096 bytes of heap. */
+//////////////////////////////////////////////////////////////////////////////
+// Data (SRAM, external ROM or external NV RAM) memory
+-Z(DATA)SRAM_NO_INIT=2000-2001
+-Z(DATA)TINY_I,TINY_Z,TINY_N=_..X_SRAM_BASE-_..X_SRAM_NEAR_END
+-Z(DATA)RSTACK+_..X_RSTACK_SIZE=_..X_SRAM_BASE-_..X_SRAM_NEAR_END
+-Z(DATA)NEAR_I,NEAR_Z,NEAR_N,NEAR_C=_..X_SRAM_BASE-_..X_SRAM_NEAR_END
+-Z(DATA)NEAR_HEAP+_..X_NEAR_HEAP_SIZE=_..X_SRAM_BASE-_..X_SRAM_NEAR_END
+//-Z(DATA)FAR_I=[10000-_..X_SRAM_FAR_END]/10000
+-Z(DATA)CSTACK+_..X_CSTACK_SIZE=[_..X_SRAM_BASE-_..X_SRAM_FAR_END]/10000
+-Z(DATA)HEAP+_..X_HEAP_SIZE=[_..X_SRAM_BASE-_..X_SRAM_FAR_END]/10000
+-Z(DATA)IOSTREAM_N#[_..X_SRAM_BASE-_..X_SRAM_FAR_END]/10000
+-Z(DATA)FAR_Z,FAR_N,FAR_C=[_..X_SRAM_BASE-_..X_SRAM_FAR_END]/10000
+-Z(DATA)FAR_HEAP+_..X_FAR_HEAP_SIZE=_..X_SRAM_BASE-_..X_SRAM_FAR_END
+-Z(DATA)HUGE_I,HUGE_Z,HUGE_N,HUGE_C=_..X_SRAM_BASE-_..X_SRAM_HUGE_END
+-Z(DATA)HUGE_HEAP+_..X_HUGE_HEAP_SIZE=_..X_SRAM_BASE-_..X_SRAM_HUGE_END
+
+
+
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega64a1u/sysclk_opt.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega64a1u/sysclk_opt.c
new file mode 100644
index 0000000..aebe515
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega64a1u/sysclk_opt.c
@@ -0,0 +1,91 @@
+/**
+ * \file
+ *
+ * \brief Chip-specific system clock management functions
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include <compiler.h>
+
+#include <sysclk.h>
+#include <osc.h>
+#include <pll.h>
+#if (CONFIG_OSC_RC32_CAL==48000000UL)
+#include <nvm.h>
+#endif
+
+void sysclk_init(void)
+{
+ sysclk_set_prescalers(CONFIG_SYSCLK_PSADIV,CONFIG_SYSCLK_PSBCDIV);
+ //* Replace osc_user_calibration(OSC_ID_RC32MHZ,cal);
+ DFLLRC32M.CALA=0x40;
+ DFLLRC32M.CALB=0x23;
+ osc_enable(OSC_ID_RC32MHZ);
+ osc_wait_ready(OSC_ID_RC32MHZ);
+ ccp_write_io((uint8_t *)&CLK.CTRL, CONFIG_SYSCLK_SOURCE);
+ //* Replace osc_enable_autocalibration(CONFIG_OSC_AUTOCAL,CONFIG_OSC_AUTOCAL_REF_OSC);
+ OSC.DFLLCTRL &= ~(OSC_RC32MCREF_gm);
+ // Calibrate 32MRC at 48MHz using USB SOF
+ // 48MHz/1kHz=0xBB80
+ DFLLRC32M.COMP1=0x80;
+ DFLLRC32M.COMP2=0xBB;
+ OSC.DFLLCTRL |= OSC_RC32MCREF_USBSOF_gc;
+ DFLLRC32M.CTRL |= DFLL_ENABLE_bm;
+}
+
+
+/**
+ * \brief Enable clock for the USB module
+ *
+ * \pre CONFIG_USBCLK_SOURCE must be defined.
+ *
+ * \param freq The required USB clock frequency in MHz:
+ * \arg \c 6 for 6 MHz
+ * \arg \c 48 for 48 MHz
+ */
+void sysclk_enable_usb(uint8_t freq)
+{
+ Assert(freq == 48);
+ ccp_write_io((uint8_t *)&CLK.USBCTRL, 0
+ | CLK_USBSRC_RCOSC_gc
+ | CLK_USBSEN_bm);
+}
+
+/**
+ * \brief Disable clock for the USB module
+ */
+void sysclk_disable_usb(void)
+{
+ ccp_write_io((uint8_t *)&CLK.USBCTRL, 0);
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega64a1u/udc_opt.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega64a1u/udc_opt.c
new file mode 100644
index 0000000..8c8cd75
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/atxmega64a1u/udc_opt.c
@@ -0,0 +1,463 @@
+/**
+ * \file
+ *
+ * \brief USB Device Controller (UDC)
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "conf_usb.h"
+#include "usb_protocol.h"
+#include "udd.h"
+#include "udc_desc.h"
+#include "udi.h"
+#include "udc.h"
+#include "udi_dfu_atmel.h"
+
+extern bool udi_dfu_atmel_enable(void);
+extern void udi_dfu_atmel_disable(void);
+extern bool udi_dfu_atmel_setup(void);
+
+/**
+ * \addtogroup udc_group
+ * @{
+ */
+
+//! \name Internal variables to manage the USB device
+//! @{
+
+//! Device status state (see enum usb_device_status in usb_protocol.h)
+static le16_t udc_device_status;
+//! Device Configuration number selected by the USB host
+static uint8_t udc_num_configuration = 0;
+//! Pointer on the selected speed device configuration
+//static udc_config_speed_t UDC_DESC_STORAGE *udc_ptr_conf;
+//! Pointer on interface descriptor used by SETUP request.
+//static usb_iface_desc_t UDC_DESC_STORAGE *udc_ptr_iface;
+extern UDC_DESC_STORAGE usb_dev_desc_t udc_device_desc;
+//! Structure for USB Device Configuration Descriptor
+COMPILER_PACK_SET(1);
+typedef struct {
+ usb_conf_desc_t conf;
+ udi_dfu_atmel_desc_t udi_dfu_atmel;
+} udc_desc_t;
+COMPILER_PACK_RESET();
+extern UDC_DESC_STORAGE udc_desc_t udc_desc_fs;
+
+//! @}
+
+
+//! \name Internal structure to store the USB device main strings
+//! @{
+
+/**
+ * \brief USB device manufacture name storage
+ * String is allocated only if USB_DEVICE_MANUFACTURE_NAME is declared
+ * by usb application configuration
+ */
+#ifdef USB_DEVICE_MANUFACTURE_NAME
+static uint8_t udc_string_manufacturer_name[] = USB_DEVICE_MANUFACTURE_NAME;
+#define USB_DEVICE_MANUFACTURE_NAME_SIZE (sizeof(udc_string_manufacturer_name)-1)
+#else
+#define USB_DEVICE_MANUFACTURE_NAME_SIZE 0
+#endif
+
+
+/**
+ * \brief USB device product name storage
+ * String is allocated only if USB_DEVICE_PRODUCT_NAME is declared
+ * by usb application configuration
+ */
+#ifdef USB_DEVICE_PRODUCT_NAME
+static uint8_t udc_string_product_name[] = USB_DEVICE_PRODUCT_NAME;
+#define USB_DEVICE_PRODUCT_NAME_SIZE (sizeof(udc_string_product_name)-1)
+#else
+#define USB_DEVICE_PRODUCT_NAME_SIZE 0
+#endif
+
+/**
+ * \brief USB device serial number storage
+ * String is allocated only if USB_DEVICE_SERIAL_NAME is declared
+ * by usb application configuration
+ */
+#ifdef USB_DEVICE_SERIAL_NAME
+static uint8_t udc_string_serial_name[] = USB_DEVICE_SERIAL_NAME;
+#define USB_DEVICE_SERIAL_NAME_SIZE (sizeof(udc_string_serial_name)-1)
+#else
+#define USB_DEVICE_SERIAL_NAME_SIZE 0
+#endif
+
+/**
+ * \brief USB device string descriptor
+ * Structure used to transfer ASCII strings to USB String descriptor structure.
+ */
+struct udc_string_desc_t {
+ usb_str_desc_t header;
+ le16_t string[Max(Max(USB_DEVICE_MANUFACTURE_NAME_SIZE, \
+ USB_DEVICE_PRODUCT_NAME_SIZE), USB_DEVICE_SERIAL_NAME_SIZE)];
+};
+static UDC_DESC_STORAGE struct udc_string_desc_t udc_string_desc = {
+ .header.bDescriptorType = USB_DT_STRING
+};
+
+/**
+ * \brief Language ID of USB device (US ID by default)
+ */
+static UDC_DESC_STORAGE usb_str_lgid_desc_t udc_string_desc_languageid = {
+ .desc.bLength = sizeof(usb_str_lgid_desc_t),
+ .desc.bDescriptorType = USB_DT_STRING,
+ .string = {LE16(USB_LANGID_EN_US)}
+};
+
+//! @}
+
+
+
+
+/**
+ * \brief Disables an usb device interface (UDI)
+ * This routine call the UDI corresponding to interface number
+ *
+ * \param iface_num Interface number to disable
+ *
+ * \return 1 if it is done or 0 if interface is not found
+ */
+static bool udc_iface_disable(void) @ "BOOT"
+{
+ // Disable interface
+ udi_dfu_atmel_disable();
+ return true;
+}
+
+
+/**
+ * \brief Enables an usb device interface (UDI)
+ * This routine calls the UDI corresponding
+ * to the interface and setting number.
+ *
+ * \param iface_num Interface number to enable
+ * \param setting_num Setting number to enable
+ *
+ * \return 1 if it is done or 0 if interface is not found
+ */
+static bool udc_iface_enable(void) @ "BOOT"
+{
+ // Enable the interface
+ return udi_dfu_atmel_enable();
+}
+
+
+/**
+ * \brief Reset the current configuration of the USB device,
+ * This routines can be called by UDD when a RESET on the USB line occurs.
+ */
+void udc_reset(void) @ "BOOT"
+{
+ if (udc_num_configuration) {
+ udc_iface_disable();
+ }
+ udc_num_configuration = 0;
+ udc_device_status =
+#if (USB_DEVICE_ATTR & USB_CONFIG_ATTR_SELF_POWERED)
+ CPU_TO_LE16(USB_DEV_STATUS_SELF_POWERED);
+#else
+ CPU_TO_LE16(USB_DEV_STATUS_BUS_POWERED);
+#endif
+}
+
+
+/**
+ * \brief Standard device request to get device status
+ *
+ * \return true if success
+ */
+static bool udc_req_std_dev_get_status(void) @ "BOOT"
+{
+ udd_set_setup_payload(
+ (uint8_t *) &udc_device_status,
+ sizeof(udc_device_status));
+ return true;
+}
+
+
+/**
+ * \brief Change the address of device
+ * Callback called at the end of request set address
+ */
+static void udc_valid_address(void) @ "BOOT"
+{
+ udd_set_address(udd_g_ctrlreq.req.wValue & 0x7F);
+}
+
+
+/**
+ * \brief Standard device request to set device address
+ *
+ * \return true if success
+ */
+static bool udc_req_std_dev_set_address(void) @ "BOOT"
+{
+ // The address must be changed at the end of setup request after the handshake
+ // then we use a callback to change address
+ udd_g_ctrlreq.callback = udc_valid_address;
+ return true;
+}
+
+
+/**
+ * \brief Standard device request to get device string descriptor
+ *
+ * \return true if success
+ */
+static bool udc_req_std_dev_get_str_desc(void) @ "BOOT"
+{
+ uint8_t i;
+ uint8_t *str;
+ uint8_t str_lgt=0;
+
+ // Link payload pointer to the string corresponding at request
+ switch (udd_g_ctrlreq.req.wValue & 0xff) {
+ case 0:
+ udd_set_setup_payload(
+ (uint8_t *) & udc_string_desc_languageid,
+ sizeof(udc_string_desc_languageid));
+ break;
+
+#ifdef USB_DEVICE_MANUFACTURE_NAME
+ case 1:
+ str_lgt = USB_DEVICE_MANUFACTURE_NAME_SIZE;
+ str = udc_string_manufacturer_name;
+ break;
+#endif
+#ifdef USB_DEVICE_PRODUCT_NAME
+ case 2:
+ str_lgt = USB_DEVICE_PRODUCT_NAME_SIZE;
+ str = udc_string_product_name;
+ break;
+#endif
+#ifdef USB_DEVICE_SERIAL_NAME
+ case 3:
+ str_lgt = USB_DEVICE_SERIAL_NAME_SIZE;
+ str = udc_string_serial_name;
+ break;
+#endif
+ default:
+ return false;
+ }
+
+ if (str_lgt != 0) {
+ for(i = 0; i < str_lgt; i++) {
+ udc_string_desc.string[i] = cpu_to_le16((le16_t)str[i]);
+ }
+
+ udc_string_desc.header.bLength = 2 + (str_lgt) * 2;
+ udd_set_setup_payload(
+ (uint8_t *) &udc_string_desc,
+ udc_string_desc.header.bLength);
+ }
+ return true;
+}
+
+
+/**
+ * \brief Standard device request to get descriptors about USB device
+ *
+ * \return true if success
+ */
+static bool udc_req_std_dev_get_descriptor(void) @ "BOOT"
+{
+ // Check descriptor ID
+ switch ((uint8_t) (udd_g_ctrlreq.req.wValue >> 8)) {
+ case USB_DT_DEVICE:
+ // Device descriptor requested
+ udd_set_setup_payload(
+ (uint8_t*)&udc_device_desc,
+ udc_device_desc.bLength);
+ break;
+
+ case USB_DT_CONFIGURATION:
+ // Configuration descriptor requested
+ // FS descriptor
+ udd_set_setup_payload(
+ (uint8_t*)&udc_desc_fs,
+ le16_to_cpu(udc_desc_fs.conf.wTotalLength));
+ break;
+
+ case USB_DT_STRING:
+ // String descriptor requested
+ if (!udc_req_std_dev_get_str_desc()) {
+ return false;
+ }
+ break;
+
+ default:
+ // Unknown descriptor requested
+ return false;
+ }
+ // if the descriptor is larger than length requested, then reduce it
+ if (udd_g_ctrlreq.req.wLength < udd_g_ctrlreq.payload_size)
+ udd_g_ctrlreq.payload_size = udd_g_ctrlreq.req.wLength;
+ return true;
+}
+
+
+/**
+ * \brief Standard device request to get configuration number
+ *
+ * \return true if success
+ */
+static bool udc_req_std_dev_get_configuration(void) @ "BOOT"
+{
+ udd_set_setup_payload(
+ &udc_num_configuration,
+ 1);
+ return true;
+}
+
+
+/**
+ * \brief Standard device request to enable a configuration
+ *
+ * \return true if success
+ */
+static bool udc_req_std_dev_set_configuration(void) @ "BOOT"
+{
+ // Reset current configuration
+ udc_reset();
+
+ // Enable new configuration
+ udc_num_configuration = udd_g_ctrlreq.req.wValue & 0xFF;
+ if (udc_num_configuration == 0) {
+ return true; // Default empty configuration requested
+ }
+ // Pointer of the configuration descriptor always good
+ // Enable all interfaces of the selected configuration
+ if (!udc_iface_enable())
+ return false;
+ return true;
+}
+
+
+/**
+ * \brief Main routine to manage the standard USB SETUP request
+ *
+ * \return true if the request is supported
+ */
+static bool udc_reqstd(void) @ "BOOT"
+{
+ if (USB_REQ_RECIP_DEVICE != Udd_setup_recipient()) {
+ return false;
+ }
+
+ if (Udd_setup_is_in()) {
+ // Standard Get Device request
+ switch (udd_g_ctrlreq.req.bRequest) {
+ case USB_REQ_GET_STATUS:
+ return udc_req_std_dev_get_status();
+ case USB_REQ_GET_DESCRIPTOR:
+ return udc_req_std_dev_get_descriptor();
+ case USB_REQ_GET_CONFIGURATION:
+ return udc_req_std_dev_get_configuration();
+ }
+ } else {
+ // Standard Set Device request
+ switch (udd_g_ctrlreq.req.bRequest) {
+ case USB_REQ_SET_ADDRESS:
+ return udc_req_std_dev_set_address();
+ case USB_REQ_SET_CONFIGURATION:
+ return udc_req_std_dev_set_configuration();
+ }
+ }
+ return false;
+}
+
+
+/**
+ * \brief Send the SETUP interface request to UDI
+ *
+ * \return true if the request is supported
+ */
+static bool udc_req_iface(void) @ "BOOT"
+{
+ // Send the SETUP request to the UDI corresponding to the interface number
+ return udi_dfu_atmel_setup();
+}
+
+
+/**
+ * \brief Main routine to manage the USB SETUP request.
+ *
+ * This function parses a USB SETUP request and submits an appropriate
+ * response back to the host or, in the case of SETUP OUT requests
+ * with data, sets up a buffer for receiving the data payload.
+ *
+ * The main standard requests defined by the USB 2.0 standard are handled
+ * internally. The interface requests are sent to UDI, and the specific request
+ * sent to a specific application callback.
+ *
+ * \return true if the request is supported, else the request is stalled by UDD
+ */
+bool udc_process_setup(void) @ "BOOT"
+{
+ // By default no data (receive/send) and no callbacks registered
+ udd_g_ctrlreq.payload_size = 0;
+ udd_g_ctrlreq.callback = NULL;
+ udd_g_ctrlreq.over_under_run = NULL;
+
+ if (Udd_setup_is_in()) {
+ if (udd_g_ctrlreq.req.wLength == 0)
+ return false; // Error from USB host
+ }
+
+ // If standard request then try to decode it in UDC
+ if (Udd_setup_type() == USB_REQ_TYPE_STANDARD) {
+ if (udc_reqstd())
+ return true;
+ }
+
+ // If interface request then try to decode it in UDI
+ if (Udd_setup_recipient() == USB_REQ_RECIP_INTERFACE) {
+ if (udc_req_iface())
+ return true;
+ }
+
+ // Here SETUP request unknown by UDC and UDIs
+#ifdef USB_DEVICE_SPECIFIC_REQUEST
+ // Try to decode it in specific callback
+ return USB_DEVICE_SPECIFIC_REQUEST(); // Ex: Vendor request,...
+#else
+ return false;
+#endif
+}
+
+//! @}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/conf_usb.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/conf_usb.h
new file mode 100644
index 0000000..3b59682
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/conf_usb.h
@@ -0,0 +1,151 @@
+/**
+ * \file
+ *
+ * \brief USB configuration file
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _CONF_USB_H_
+#define _CONF_USB_H_
+
+#include "compiler.h"
+#include "nvm.h"
+
+/* Redefine USB interrupt vectors base address to safe code space */
+# if defined(__GNUC__)
+# error GCC no supported when interrupt vectors space is optimized
+/*
+# undef USB_BUSEVENT_vect
+# undef USB_TRNCOMPL_vect
+# undef USB_BUSEVENT_vect_num
+# undef USB_TRNCOMPL_vect_num
+# define USB_BUSEVENT_vect_num 1
+# define USB_BUSEVENT_vect _VECTOR(1)
+# define USB_TRNCOMPL_vect_num 2
+# define USB_TRNCOMPL_vect _VECTOR(2)
+*/
+# elif defined(__ICCAVR__)
+# undef USB_BUSEVENT_vect
+# undef USB_TRNCOMPL_vect
+# define USB_BUSEVENT_vect 0x0
+# define USB_TRNCOMPL_vect 0x4
+# endif
+
+
+/**
+ * USB Device Configuration
+ * @{
+ */
+
+//! Device definition (mandatory)
+#define USB_DEVICE_VENDOR_ID USB_VID_ATMEL
+#if part_is_defined(ATxmega128A1U)
+#define USB_DEVICE_PRODUCT_ID USB_PID_ATMEL_DFU_ATXMEGA128A1U
+#if (FLASH_SIZE>0x10000) // Optimize code space (Boot = 4KB) Temporary to support 64A1U
+#define USB_DEVICE_PRODUCT_NAME "DFU ATXMEGA128A1U"
+#endif
+#elif part_is_defined(ATxmega641U)
+#define USB_DEVICE_PRODUCT_ID USB_PID_ATMEL_DFU_ATXMEGA64A1U
+//#define USB_DEVICE_PRODUCT_NAME "DFU ATXMEGA64A1U" // To safe code space
+#elif part_is_defined(ATxmega128B1)
+#define USB_DEVICE_PRODUCT_ID USB_PID_ATMEL_DFU_ATXMEGA128B1
+#define USB_DEVICE_PRODUCT_NAME "DFU ATXMEGA128B1"
+#elif part_is_defined(ATxmega256A3U) || part_is_defined(ATxmega256A3BU)
+#define USB_DEVICE_PRODUCT_ID USB_PID_ATMEL_DFU_ATXMEGA256A3_U_BU
+#define USB_DEVICE_PRODUCT_NAME "DFU ATXMEGA256A3_U_BU"
+#else
+#error Unknow DFU PID for this AVR part
+#endif
+
+#define USB_DEVICE_MAJOR_VERSION (BOOTLOADER_VERSION>>4)
+#define USB_DEVICE_MINOR_VERSION (BOOTLOADER_VERSION&0x0F)
+#define USB_DEVICE_POWER 100 // Consumption on Vbus line (mA)
+#if (FLASH_SIZE>0x10000) // Optimize code space (Boot = 4KB)
+#define USB_DEVICE_MANUFACTURE_NAME "ATMEL"
+#endif
+#define USB_DEVICE_ATTR USB_CONFIG_ATTR_SELF_POWERED
+
+/**
+ * Device speeds support
+ * Only Full speed is authorized on DFU ATMEL
+ * Because FLIP supports only full speed
+ * Also:
+ * - low speed is too slow (endpoint 8 Bytes)
+ * - high speed does not increase flash program speed
+ * - high speed is not supported on custom board with bad USB layout
+ * @{
+ */
+// No speed change possible
+//@}
+
+/**
+ * USB Device Callbacks definitions (Optional)
+ * @{
+ */
+#define UDC_VBUS_EVENT(b_vbus_high) // NO VBUS EVENT on XMEGA
+//@}
+
+//@}
+
+
+/**
+ * USB Interface Configuration
+ * @{
+ */
+/**
+ * Configuration of DFU interface
+ * @{
+ */
+//! Interface callback definition
+#define UDI_DFU_ENABLE_EXT() true
+#define UDI_DFU_DISABLE_EXT()
+
+//! Version of ATMEL protocol used
+#define UDI_DFU_ATMEL_PROTOCOL_VERSION DFU_ATMEL_PROTOCOL_VERSION_2
+//@}
+//@}
+
+
+/**
+ * USB Device Driver Configuration
+ * @{
+ */
+#define UDD_NO_SLEEP_MGR
+//@}
+
+//! The includes of classes and other headers must be done at the end of this file to avoid compile error
+#include "udi_dfu_atmel_conf.h"
+#include "conf_isp.h" // Need to put bootloader version at USB device version
+
+#endif // _CONF_USB_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/isp.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/isp.c
new file mode 100644
index 0000000..b2ad001
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/isp.c
@@ -0,0 +1,203 @@
+/**
+ * \file
+ *
+ * \brief In system programming to control security, memories and fuses
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "conf_isp.h"
+#include "nvm.h"
+#include "isp.h"
+#include "string.h"
+
+
+#ifdef __GNUC__
+ uint16_t start_app_key __attribute__ ((section (".noinit")));
+#else
+ __no_init uint16_t start_app_key @"SRAM_NO_INIT";
+#endif
+
+/**
+ * \name Memory APIs
+ */
+//@{
+
+//! Memory signature which store information about device
+static isp_mem_signature_t mem_signature;
+
+//! Memory bootloader which store information about bootloader
+static isp_mem_bootloader_t mem_bootloader = {
+ .version = BOOTLOADER_VERSION,
+ .id1 = 0,
+ .id2 = 0,
+};
+
+
+void mem_flash_read(void *dst, isp_addr_t src, uint16_t nbytes)
+{
+ nvm_flash_read_buffer(src, dst, nbytes);
+}
+
+void mem_flash_write(isp_addr_t dst, const void *src, uint16_t nbytes)
+{
+ nvm_flash_erase_and_write_buffer(dst, src, nbytes, true);
+}
+
+void mem_eeprom_read(void *dst, isp_addr_t src, uint16_t nbytes)
+{
+ nvm_eeprom_read_buffer( src, dst, nbytes );
+}
+
+void mem_eeprom_write(isp_addr_t dst, const void *src, uint16_t nbytes)
+{
+ nvm_eeprom_erase_and_write_buffer(dst, src, nbytes);
+}
+
+static void mem_bootloader_read(void *dst, isp_addr_t src, uint16_t nbytes)
+{
+ memcpy(dst, (uint8_t*)&mem_bootloader + src, nbytes);
+}
+
+void mem_signature_read(void *dst, isp_addr_t src, uint16_t nbytes)
+{
+ memcpy(dst, (uint8_t*)&mem_signature + src, nbytes);
+}
+
+//! Interface for memory flash
+const isp_mem_t isp_flash = {
+ .size = FLASH_SIZE,
+ .fnct_read = mem_flash_read,
+ .fnct_write = mem_flash_write,
+};
+
+//! Interface for memory eeprom
+const isp_mem_t isp_eeprom = {
+ .size = EEPROM_SIZE,
+ .fnct_read = mem_eeprom_read,
+ .fnct_write = mem_eeprom_write,
+};
+
+//! Interface for memory bootloader
+const isp_mem_t isp_bootloader = {
+ .size = sizeof(mem_bootloader),
+ .fnct_read = mem_bootloader_read,
+ .fnct_write = NULL,
+};
+
+//! Interface for memory signature
+const isp_mem_t isp_signature = {
+ .size = sizeof(mem_signature),
+ .fnct_read = mem_signature_read,
+ .fnct_write = NULL,
+};
+
+//! Interface for memory no available
+const isp_mem_t isp_no_available = {
+ .size = 0,
+ .fnct_read = NULL,
+ .fnct_write = NULL,
+};
+
+#if (UDI_DFU_ATMEL_PROTOCOL_VERSION == DFU_ATMEL_PROTOCOL_VERSION_1)
+const isp_mems_t isp_memories = {
+ .flash = &isp_flash,
+ .eeprom = &isp_eeprom,
+ .bootloader = &isp_bootloader,
+ .signature = &isp_signature,
+ .user = &isp_no_available,
+};
+#endif
+
+#if (UDI_DFU_ATMEL_PROTOCOL_VERSION == DFU_ATMEL_PROTOCOL_VERSION_2)
+const isp_mems_t isp_memories = {
+ .flash = &isp_flash,
+ .eeprom = &isp_eeprom,
+ .security = &isp_no_available,
+ .conf = &isp_no_available,
+ .bootloader = &isp_bootloader,
+ .signature = &isp_signature,
+ .user = &isp_no_available,
+ .int_ram = &isp_no_available,
+ .ext_mem_cs0 = &isp_no_available,
+ .ext_mem_cs1 = &isp_no_available,
+ .ext_mem_cs2 = &isp_no_available,
+ .ext_mem_cs3 = &isp_no_available,
+ .ext_mem_cs4 = &isp_no_available,
+ .ext_mem_cs5 = &isp_no_available,
+ .ext_mem_cs6 = &isp_no_available,
+ .ext_mem_cs7 = &isp_no_available,
+ .ext_mem_df = &isp_no_available,
+};
+#endif
+
+//@}
+
+void isp_init(void)
+{
+ mem_signature.manufacture = MCU.DEVID0;
+ mem_signature.product_number_msb = MCU.DEVID1;
+ mem_signature.product_number_lsb = MCU.DEVID2;
+ mem_signature.product_revision = MCU.REVID;
+}
+
+bool isp_is_security(void)
+{
+ return !(NVM.LOCKBITS&NVM_LOCKBITS_LB1_bm);
+}
+
+void isp_force_isp(bool force)
+{
+}
+
+bool isp_erase_chip(void)
+{
+ nvm_flash_erase_app();
+ nvm_eeprom_erase_all();
+ return true;
+}
+
+void isp_start_appli_rst(void)
+{
+ cpu_irq_disable();
+ // generate soft reset for xmega
+ start_app_key=0x55AA;
+ ccp_write_io((uint8_t *)&RST.CTRL, RST.CTRL | RST_SWRST_bm);
+ while (1);
+}
+
+void isp_start_appli_norst(void)
+{
+ isp_start_appli_rst();
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/main.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/main.c
new file mode 100644
index 0000000..618b05e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/main.c
@@ -0,0 +1,71 @@
+/**
+ * \file
+ *
+ * \brief Main functions
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "preprocessor.h"
+#include "sysclk.h"
+#include "conf_usb.h"
+#include "udd.h"
+#include "udc.h"
+#include "udi_dfu_atmel.h"
+
+
+/*! \brief Main function. Execution starts here.
+ */
+int main(void) @ "BOOT"
+{
+ // Map interrupt vectors table in bootloader section
+ ccp_write_io((uint8_t*)&PMIC.CTRL, PMIC_IVSEL_bm | PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm);
+
+ sysclk_init();
+ cpu_irq_enable();
+
+ // Start USB stack to authorize VBus monitoring
+ udc_start();
+
+ udc_attach();
+ while (true) {
+ }
+}
+
+
+/**
+ * \mainpage ASF USB Device DFU
+ *
+ * TODO
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/main.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/main.h
new file mode 100644
index 0000000..fdadac3
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/isp/xmega/main.h
@@ -0,0 +1,42 @@
+/**
+ * \file
+ *
+ * \brief Main functions
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _MAIN_H_
+#define _MAIN_H_
+
+#endif // _MAIN_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/module_config/conf_usb.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/module_config/conf_usb.h
new file mode 100644
index 0000000..0dff0a1
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/module_config/conf_usb.h
@@ -0,0 +1,127 @@
+/**
+ * \file
+ *
+ * \brief USB configuration file
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _CONF_USB_H_
+#define _CONF_USB_H_
+
+#include "compiler.h"
+
+#warning You must refill the following definitions with a correct values
+
+/**
+ * USB Device Configuration
+ * @{
+ */
+
+//! Device definition (mandatory)
+#define USB_DEVICE_VENDOR_ID 0x0000
+#define USB_DEVICE_PRODUCT_ID 0x0000
+#define USB_DEVICE_MAJOR_VERSION 1
+#define USB_DEVICE_MINOR_VERSION 0
+#define USB_DEVICE_POWER 100 // Consumption on Vbus line (mA)
+#define USB_DEVICE_ATTR \
+ (USB_CONFIG_ATTR_SELF_POWERED)
+// (USB_CONFIG_ATTR_BUS_POWERED)
+// (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_SELF_POWERED)
+// (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_BUS_POWERED)
+
+//! USB Device string definitions (Optional)
+// #define USB_DEVICE_MANUFACTURE_NAME "Manufacture name"
+// #define USB_DEVICE_PRODUCT_NAME "Product name"
+// #define USB_DEVICE_SERIAL_NAME "12...EF"
+
+/**
+ * Device speeds support
+ * Only Full speed is authorized on DFU ATMEL
+ * Because FLIP supports only full speed
+ * Also:
+ * - low speed is too slow (endpoint 8 Bytes)
+ * - high speed does not increase flash program speed
+ * - high speed is not supported on custom board with bad USB layout
+ * @{
+ */
+// No speed change possible
+//@}
+
+/**
+ * USB Device Callbacks definitions (Optional)
+ * @{
+ */
+// #define UDC_VBUS_EVENT(b_vbus_high) user_callback_vbus_action(b_vbus_high)
+// #define UDC_SOF_EVENT() user_callback_sof_action()
+// #define UDC_SUSPEND_EVENT() user_callback_suspend_action()
+// #define UDC_RESUME_EVENT() user_callback_resume_action()
+//! Mandatory when USB_DEVICE_ATTR authorizes remote wakeup feature
+// #define UDC_REMOTEWAKEUP_ENABLE() user_callback_remotewakeup_enable()
+// #define UDC_REMOTEWAKEUP_DISABLE() user_callback_remotewakeup_disable()
+//! When a extra string descriptor must be supported
+//! other than manufacturer, product and serial string
+// #define UDC_GET_EXTRA_STRING()
+//@}
+
+//@}
+
+
+/**
+ * USB Interface Configuration
+ * @{
+ */
+/**
+ * Configuration of DFU interface
+ * @{
+ */
+//! Interface callback definition
+#define UDI_DFU_ENABLE_EXT() true
+#define UDI_DFU_DISABLE_EXT()
+
+//! Version of ATMEL protocol used (V1 for mega/xmega and V2 for UC3)
+#define UDI_DFU_ATMEL_PROTOCOL_VERSION DFU_ATMEL_PROTOCOL_VERSION_1
+//@}
+//@}
+
+
+/**
+ * USB Device Driver Configuration
+ * @{
+ */
+//@}
+
+//! The includes of classes and other headers must be done at the end of this file to avoid compile error
+#include "udi_dfu_atmel_conf.h"
+
+#endif // _CONF_USB_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/udi_dfu_atmel.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/udi_dfu_atmel.c
new file mode 100644
index 0000000..4498e5f
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/udi_dfu_atmel.c
@@ -0,0 +1,815 @@
+/**
+ * \file
+ *
+ * \brief USB Device Firmware Upgrade (DFU) interface definitions.
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "conf_usb.h"
+#include "usb_protocol.h"
+#include "usb_protocol_dfu.h"
+#include "usb_atmel_dfu.h"
+#include "udd.h"
+#include "udc.h"
+#include "udi_dfu_atmel.h"
+#include "isp.h"
+#include "string.h"
+
+
+#ifndef UDI_DFU_ATMEL_PROTOCOL_VERSION
+# error UDI_DFU_ATMEL_PROTOCOL_VERSION must be define in conf_usb.h
+#endif
+#if ((UDI_DFU_ATMEL_PROTOCOL_VERSION != DFU_ATMEL_PROTOCOL_VERSION_2) \
+ && (UDI_DFU_ATMEL_PROTOCOL_VERSION != DFU_ATMEL_PROTOCOL_VERSION_1))
+# error Bootloader protocol not supported (UDI_DFU_ATMEL_PROTOCOL_VERSION)
+#endif
+
+
+/**
+ * \addtogroup udi_dfu_atmel_group
+ * @{
+ */
+
+/**
+ * \name Interface for UDC
+ */
+//@{
+
+bool udi_dfu_atmel_enable(void);
+void udi_dfu_atmel_disable(void);
+bool udi_dfu_atmel_setup(void);
+uint8_t udi_dfu_atmel_getsetting(void);
+
+//! Global structure which contains standard UDI API for UDC
+UDC_DESC_STORAGE udi_api_t udi_api_dfu_atmel = {
+ .enable = udi_dfu_atmel_enable,
+ .disable = udi_dfu_atmel_disable,
+ .setup = udi_dfu_atmel_setup,
+ .getsetting = udi_dfu_atmel_getsetting,
+};
+
+//@}
+
+
+/**
+ * \name Internal routines to manage DFU requests
+ */
+//@{
+static void udi_dfu_atmel_reset_protocol(void);
+static void udi_dfu_atmel_reset_cpu(void);
+
+static bool udi_dfu_atmel_cmd_decode(void);
+static void udi_dfu_atmel_sel_mem( uint8_t mem_num );
+static bool udi_dfu_atmel_mem_protected(void);
+static bool udi_dfu_atmel_mem_getaddr(uint8_t * arg);
+static bool udi_dfu_atmel_mem_read(void);
+static void udi_dfu_atmel_mem_check(void);
+static bool udi_dfu_atmel_mem_send_last_add(void);
+static bool udi_dfu_atmel_mem_write(void);
+
+#if (UDI_DFU_ATMEL_PROTOCOL_VERSION == DFU_ATMEL_PROTOCOL_VERSION_2)
+static bool udi_dfu_atmel_program(void);
+static bool udi_dfu_atmel_read(void);
+static bool udi_dfu_atmel_blankcheck(void);
+static bool udi_dfu_atmel_erase_chip(void);
+static void udi_dfu_atmel_start(void);
+static bool udi_dfu_atmel_select_memory(void);
+#else // V1
+static bool udi_dfu_atmel_progstart(uint8_t mem);
+static bool udi_dfu_atmel_read(uint8_t mem, bool b_check);
+static void udi_dfu_atmel_read_id(uint8_t mem, uint8_t addr);
+static bool udi_dfu_atmel_chip_erase(void);
+static void udi_dfu_atmel_start_app(uint8_t mode);
+#ifndef ISP_SMALL_MEMORY_SIZE
+static bool udi_dfu_atmel_cmd_decode_changeaddr(void);
+#endif
+#endif
+//@}
+
+#define CAT_CMD(val1,val2) (((uint16_t)val1<<8)|(val2<<0))
+
+
+/**
+ * \name Internal variables to manage DFU requests
+ */
+//@{
+
+static dfu_status_t udi_dfu_atmel_status;
+#if (UDI_DFU_ATMEL_PROTOCOL_VERSION == DFU_ATMEL_PROTOCOL_VERSION_2)
+# ifdef UDI_DFU_ATMEL_PROTOCOL_2_SPLIT_ERASE_CHIP
+static bool udi_dfu_atmel_erase_running;
+# endif
+#endif
+
+//! Structure to store the command fields
+#if (UDI_DFU_ATMEL_PROTOCOL_VERSION == DFU_ATMEL_PROTOCOL_VERSION_2)
+static dfu_atmel_v2_cmd_t udi_dfu_atmel_cmd;
+#else // V1
+static dfu_atmel_v1_cmd_t udi_dfu_atmel_cmd;
+#endif
+
+#if (UDI_DFU_ATMEL_PROTOCOL_VERSION == DFU_ATMEL_PROTOCOL_VERSION_2)
+#define DFU_ATMEL_BUF_TRANS_SIZE DFU_ATMEL_V2_BUF_TRANS_SIZE
+#else // V1
+#define DFU_ATMEL_BUF_TRANS_SIZE DFU_ATMEL_V1_BUF_TRANS_SIZE
+#endif
+
+
+//! Buffer to receive or send data
+COMPILER_WORD_ALIGNED
+ static uint8_t
+ udi_dfu_atmel_buf_trans[DFU_ATMEL_BUF_TRANS_SIZE];
+
+//! Callback to use when an upload request is received
+static bool(*udi_dfu_atmel_upload_callback) (void);
+
+//! Notify a reset request to start
+static void (*udi_dfu_atmel_reset_callback) (void);
+
+//! Store the current security level
+static bool udi_dfu_atmel_security;
+
+/**
+ * \name To manage memories
+ */
+//@{
+
+/**
+ * \name To manage memory transfers
+ */
+//@{
+#if (UDI_DFU_ATMEL_PROTOCOL_VERSION == DFU_ATMEL_PROTOCOL_VERSION_2)
+static bool udi_dfu_atmel_mem_b_protected;
+#endif
+static isp_addr_t udi_dfu_atmel_mem_add;
+static isp_addr_t udi_dfu_atmel_mem_nb_data;
+static isp_mem_t udi_dfu_atmel_mem_sel;
+//@}
+
+
+
+//@}
+
+//@}
+
+
+bool udi_dfu_atmel_enable(void)
+{
+ udi_dfu_atmel_reset_protocol();
+ // Load chip information
+ isp_init();
+ udi_dfu_atmel_security = isp_is_security();
+ return UDI_DFU_ENABLE_EXT();
+}
+
+
+void udi_dfu_atmel_disable(void)
+{
+ UDI_DFU_DISABLE_EXT();
+}
+
+
+bool udi_dfu_atmel_setup(void)
+{
+ //** Interface requests
+ if (Udd_setup_type() != USB_REQ_TYPE_CLASS) {
+ return false; // Only class request decoded
+ }
+
+ if (Udd_setup_is_in()) {
+ // Requests Class Interface Get
+ switch (udd_g_ctrlreq.req.bRequest) {
+ case USB_REQ_DFU_GETSTATUS:
+#if (UDI_DFU_ATMEL_PROTOCOL_VERSION == DFU_ATMEL_PROTOCOL_VERSION_2)
+# ifdef UDI_DFU_ATMEL_PROTOCOL_2_SPLIT_ERASE_CHIP
+ if (udi_dfu_atmel_erase_running) {
+ udi_dfu_atmel_erase_chip();
+ }
+# endif
+#endif
+ Assert(udd_g_ctrlreq.req.wValue==0);
+ Assert(sizeof(udi_dfu_atmel_status)==udd_g_ctrlreq.req.wLength);
+ udd_set_setup_payload(
+ (uint8_t *) & udi_dfu_atmel_status,
+ sizeof(udi_dfu_atmel_status));
+ return true;
+
+ // Used to send data to the host
+ // when the previous Atmel command (DNLOAD) request data
+ case USB_REQ_DFU_UPLOAD:
+#if (UDI_DFU_ATMEL_PROTOCOL_VERSION == DFU_ATMEL_PROTOCOL_VERSION_2)
+# ifdef UDI_DFU_ATMEL_PROTOCOL_2_SPLIT_ERASE_CHIP
+ Assert( !udi_dfu_atmel_erase_running );
+# endif
+#endif
+ Assert(DFU_STATE_DFUERROR != udi_dfu_atmel_status.bState);
+ if (NULL != udi_dfu_atmel_upload_callback) {
+ return udi_dfu_atmel_upload_callback();
+ }
+ }
+ }
+
+#if (UDI_DFU_ATMEL_PROTOCOL_VERSION == DFU_ATMEL_PROTOCOL_VERSION_2)
+# ifdef UDI_DFU_ATMEL_PROTOCOL_2_SPLIT_ERASE_CHIP
+ Assert( !udi_dfu_atmel_erase_running );
+# endif
+#endif
+
+ if (Udd_setup_is_out()) {
+ // Requests Class Interface Set
+ switch (udd_g_ctrlreq.req.bRequest) {
+ case USB_REQ_DFU_CLRSTATUS:
+ Assert(udd_g_ctrlreq.req.wValue==0);
+ Assert(udd_g_ctrlreq.req.wLength==0);
+ udi_dfu_atmel_reset_protocol();
+ return true;
+
+ // DNLOAD request including Atmel command fields
+ // and data for write operation.
+ // For read operation, the data are sent in the next UPLOAD request
+ case USB_REQ_DFU_DNLOAD:
+ // Check if a reset has been requested
+ if (NULL != udi_dfu_atmel_reset_callback) {
+ // Remove force ISP before a reset CPU to start Application
+ isp_force_isp(false);
+ // Then this DNLOAD DFU request must be empty (0==wLength)
+ // and valid the reset application command.
+ // Valid SETUP request and reset application via request callback.
+ udd_g_ctrlreq.callback = udi_dfu_atmel_reset_cpu;
+ return true;
+ }
+
+ Assert(DFU_STATE_DFUERROR != udi_dfu_atmel_status.bState);
+ Assert(udd_g_ctrlreq.req.wLength!=0);
+
+ // The first packet contains the command
+ // after this packet the over_under_run callback can be called
+ // if the Host want to send more data to device
+ udd_set_setup_payload(
+ (uint8_t *) & udi_dfu_atmel_cmd,
+ sizeof(udi_dfu_atmel_cmd)),
+ // Called when the first packet is received
+ // before continuing DATA phase or start ZLP phase
+ udd_g_ctrlreq.over_under_run = udi_dfu_atmel_cmd_decode;
+ // Note udd_g_ctrlreq.callback is updated
+ // by udi_dfu_atmel_cmd_decode() before ZLP phase
+ return true;
+ }
+ }
+ // Unknown request
+ udi_dfu_atmel_status.bStatus = DFU_STATUS_ERRSTALLEDPK;
+ udi_dfu_atmel_status.bState = DFU_STATE_DFUERROR;
+ return false;
+}
+
+
+uint8_t udi_dfu_atmel_getsetting(void)
+{
+ return 0;
+}
+
+
+static void udi_dfu_atmel_reset_protocol(void)
+{
+ // Reset DFU status
+ udi_dfu_atmel_status.bStatus = DFU_STATUS_OK;
+ udi_dfu_atmel_status.bState = DFU_STATE_DFUIDLE;
+ // These fields are not used and always set to zero:
+ // bwPollTimeout[3]
+ // iString
+
+ // Reset all callbacks
+ udd_g_ctrlreq.over_under_run = NULL;
+ udd_g_ctrlreq.callback = NULL;
+ udi_dfu_atmel_reset_callback = NULL;
+}
+
+static void udi_dfu_atmel_reset_cpu(void)
+{
+ udi_dfu_atmel_reset_callback();
+}
+
+
+#if (UDI_DFU_ATMEL_PROTOCOL_VERSION == DFU_ATMEL_PROTOCOL_VERSION_2)
+
+//! Called by over_under_run when the first data packet
+//! from a DNLOAD DFU request is received
+static bool udi_dfu_atmel_cmd_decode(void)
+{
+ // By default no callback initialized
+ // By default request states are success and finish
+ udi_dfu_atmel_reset_protocol();
+ udi_dfu_atmel_upload_callback = NULL;
+
+ // To restart ISP in case of USB cable is unplug during program load
+ isp_force_isp(true);
+
+ // Decode Atmel command ID
+ switch (CAT_CMD(udi_dfu_atmel_cmd.group, udi_dfu_atmel_cmd.cmd_id)) {
+
+ case CAT_CMD(DFU_ATMEL_V2_CMD_GRP_DNLOAD,
+ DFU_ATMEL_V2_CMD_PROGRAM_START):
+ return udi_dfu_atmel_program();
+
+ case CAT_CMD(DFU_ATMEL_V2_CMD_GRP_UPLOAD,
+ DFU_ATMEL_V2_CMD_READ_MEMORY):
+ return udi_dfu_atmel_read();
+ case CAT_CMD(DFU_ATMEL_V2_CMD_GRP_UPLOAD,
+ DFU_ATMEL_V2_CMD_BLANK_CHECK):
+ return udi_dfu_atmel_blankcheck();
+
+ case CAT_CMD(DFU_ATMEL_V2_CMD_GRP_EXEC,
+ DFU_ATMEL_V2_CMD_ERASE):
+ return udi_dfu_atmel_erase_chip();
+ case CAT_CMD(DFU_ATMEL_V2_CMD_GRP_EXEC,
+ DFU_ATMEL_V2_CMD_START_APPLI):
+ udi_dfu_atmel_start();
+ return true;
+
+ case CAT_CMD(DFU_ATMEL_V2_CMD_GRP_SELECT,
+ DFU_ATMEL_V2_CMD_SELECT_MEMORY):
+ return udi_dfu_atmel_select_memory();
+ }
+ return false; // Unknow command
+}
+
+static bool udi_dfu_atmel_program(void)
+{
+ // Check list before start memory programmation
+ if (udi_dfu_atmel_security && udi_dfu_atmel_mem_b_protected) {
+ // Security enabled
+ return udi_dfu_atmel_mem_protected();
+ }
+ if (!udi_dfu_atmel_mem_sel.fnct_write) {
+ udi_dfu_atmel_status.bStatus = DFU_STATUS_ERRWRITE;
+ udi_dfu_atmel_status.bState = DFU_STATE_DFUERROR;
+ return false; // Write memory not available
+ }
+ if (!udi_dfu_atmel_mem_getaddr(&udi_dfu_atmel_cmd.arg[0]))
+ return false; // Bad Range
+
+ // Init buffer to fill during next DATA phase of request
+ udd_set_setup_payload(
+ udi_dfu_atmel_buf_trans,
+ DFU_ATMEL_BUF_TRANS_SIZE);
+ // Init callback called after buffer filled
+ udd_g_ctrlreq.over_under_run = udi_dfu_atmel_mem_write;
+ return true;
+}
+
+static bool udi_dfu_atmel_read(void)
+{
+ // Check before decoding the command
+ if (!udi_dfu_atmel_mem_getaddr(&udi_dfu_atmel_cmd.arg[0]))
+ return false; // Range bad
+
+ if (!udi_dfu_atmel_mem_sel.fnct_read) {
+ udi_dfu_atmel_status.bStatus = DFU_STATUS_ERRWRITE;
+ udi_dfu_atmel_status.bState = DFU_STATE_DFUERROR;
+ return false; // Read memory not available
+ }
+
+ if (udi_dfu_atmel_security && udi_dfu_atmel_mem_b_protected) {
+ // Memory security then remove read callback by protected callback
+ udi_dfu_atmel_upload_callback = udi_dfu_atmel_mem_protected;
+ }else{
+ udi_dfu_atmel_upload_callback = udi_dfu_atmel_mem_read;
+ }
+ return true;
+}
+
+static bool udi_dfu_atmel_blankcheck(void)
+{
+ // Check before decoding the command
+ if (!udi_dfu_atmel_mem_getaddr(&udi_dfu_atmel_cmd.arg[0]))
+ return false; // Range bad
+
+ if (!udi_dfu_atmel_mem_sel.fnct_read) {
+ udi_dfu_atmel_status.bStatus = DFU_STATUS_ERRWRITE;
+ udi_dfu_atmel_status.bState = DFU_STATE_DFUERROR;
+ return false; // Read memory not available
+ }
+ udi_dfu_atmel_mem_check();
+ return true;
+}
+
+static bool udi_dfu_atmel_erase_chip(void)
+{
+ Assert(udi_dfu_atmel_cmd.arg[0]==DFU_ATMEL_V2_CMD_ERASE_ARG_CHIP);
+
+#ifdef UDI_DFU_ATMEL_PROTOCOL_2_SPLIT_ERASE_CHIP
+ if (isp_erase_chip()) {
+ // Erase finish
+ udi_dfu_atmel_security = false;
+ udi_dfu_atmel_erase_running = false;
+ udi_dfu_atmel_status.bStatus = DFU_STATUS_OK;
+ udi_dfu_atmel_status.bState = DFU_STATE_DFUIDLE;
+ }else{
+ // Erase on-going
+ udi_dfu_atmel_erase_running = true;
+ udi_dfu_atmel_status.bStatus = DFU_STATUS_ERRNOTDONE;
+ udi_dfu_atmel_status.bState = DFU_STATE_DFUDNBUSY;
+ }
+#else
+ if (!isp_erase_chip()) {
+ return false;
+ }
+ // Erase finish
+ udi_dfu_atmel_security = false;
+#endif
+ return true;
+}
+
+static void udi_dfu_atmel_start(void)
+{
+ // Start application reset after next DNLOAD request
+ if (udi_dfu_atmel_cmd.arg[0] == DFU_ATMEL_V2_CMD_START_APPLI_ARG_RESET) {
+ udi_dfu_atmel_reset_callback = isp_start_appli_rst;
+ }else{
+ Assert(app == DFU_ATMEL_V2_CMD_START_APPLI_ARG_NO_RESET);
+ udi_dfu_atmel_reset_callback = isp_start_appli_norst;
+ }
+}
+
+static bool udi_dfu_atmel_select_memory(void)
+{
+ switch (udi_dfu_atmel_cmd.arg[0]) {
+ case DFU_ATMEL_V2_CMD_SELECT_MEMORY_ARG_UNIT:
+ if (DFU_ATMEL_V2_MEM_COUNT <= udi_dfu_atmel_cmd.arg[1]) {
+ udi_dfu_atmel_status.bStatus = DFU_STATUS_ERRADDRESS;
+ udi_dfu_atmel_status.bState = DFU_STATE_DFUERROR;
+ return false; // Memory id error
+ }
+ udi_dfu_atmel_sel_mem(udi_dfu_atmel_cmd.arg[1]);
+ udi_dfu_atmel_mem_add = 0;
+ break;
+
+#ifndef ISP_SMALL_MEMORY_SIZE
+ case DFU_ATMEL_V2_CMD_SELECT_MEMORY_ARG_PAGE:
+ {
+ uint32_t tmp = 0;
+ MSB0W(tmp) = udi_dfu_atmel_cmd.arg[1];
+ MSB1W(tmp) = udi_dfu_atmel_cmd.arg[2];
+ if (tmp >= udi_dfu_atmel_mem_sel.size) {
+ udi_dfu_atmel_status.bStatus = DFU_STATUS_ERRADDRESS;
+ udi_dfu_atmel_status.bState = DFU_STATE_DFUERROR;
+ return false; // Address error
+ }
+ udi_dfu_atmel_mem_add = tmp;
+ }
+ break;
+#endif
+
+ default:
+ Assert(false); // Bad command
+ break;
+ }
+
+ return true;
+}
+
+
+#else // V1
+
+// Called when a DNLOAD DFU request is received
+// The DFU Atmel command are sending in DNLOAD request
+//
+// Note: An Atmel DFU commands can be stalled in following cases:
+// memory security, bad address or blank check fail
+static bool udi_dfu_atmel_cmd_decode(void)
+{
+ // By default no callback initialized
+ // By default request states are success and finish
+ udi_dfu_atmel_reset_protocol();
+ udi_dfu_atmel_upload_callback = NULL;
+
+ // Decode Atmel command ID
+ switch (CAT_CMD(udi_dfu_atmel_cmd.cmd_id,
+ udi_dfu_atmel_cmd.arg[0])) {
+
+#ifndef ISP_SMALL_MEMORY_SIZE
+ // Command to change high address
+ case CAT_CMD(DFU_ATMEL_V1_CMD_CHANGE_BASE_ADDR,
+ DFU_ATMEL_V1_CMD_CHANGE_BASE_ADDR_ARG0):
+ return udi_dfu_atmel_cmd_decode_changeaddr();
+#endif
+
+ // Commands to program a memory
+ case CAT_CMD(DFU_ATMEL_V1_CMD_PROG_START,
+ DFU_ATMEL_V1_CMD_PROG_START_ARG_FLASH):
+ return udi_dfu_atmel_progstart(DFU_ATMEL_V1_MEM_FLASH);
+ case CAT_CMD(DFU_ATMEL_V1_CMD_PROG_START,
+ DFU_ATMEL_V1_CMD_PROG_START_ARG_EEPROM):
+ return udi_dfu_atmel_progstart(DFU_ATMEL_V1_MEM_EEPROM);
+ case CAT_CMD(DFU_ATMEL_V1_CMD_PROG_START,
+ DFU_ATMEL_V1_CMD_PROG_START_ARG_CUSTOM):
+ return udi_dfu_atmel_progstart(DFU_ATMEL_V1_MEM_CUSTOM);
+
+ // Commands to read a memory
+ case CAT_CMD(DFU_ATMEL_V1_CMD_READ,
+ DFU_ATMEL_V1_CMD_READ_ARG_FLASH):
+ return udi_dfu_atmel_read(DFU_ATMEL_V1_MEM_FLASH,false);
+ case CAT_CMD(DFU_ATMEL_V1_CMD_READ,
+ DFU_ATMEL_V1_CMD_READ_ARG_EEPROM):
+ return udi_dfu_atmel_read(DFU_ATMEL_V1_MEM_EEPROM,false);
+ case CAT_CMD(DFU_ATMEL_V1_CMD_READ,
+ DFU_ATMEL_V1_CMD_READ_ARG_CUSTOM):
+ return udi_dfu_atmel_read(DFU_ATMEL_V1_MEM_CUSTOM,false);
+
+ // Commands to blank check a memory
+ case CAT_CMD(DFU_ATMEL_V1_CMD_READ,
+ DFU_ATMEL_V1_CMD_READ_ARG_FLASHCHECK):
+ return udi_dfu_atmel_read(DFU_ATMEL_V1_MEM_FLASH,true);
+ }
+
+ switch (CAT_CMD(udi_dfu_atmel_cmd.cmd_id,
+ udi_dfu_atmel_cmd.arg[0])) {
+
+ // Commands to erase chip
+ case CAT_CMD(DFU_ATMEL_V1_CMD_WRITE,
+ DFU_ATMEL_V1_CMD_WRITE_ARG_ERASE):
+ return udi_dfu_atmel_chip_erase();
+
+ // Commands to start application
+ case CAT_CMD(DFU_ATMEL_V1_CMD_WRITE,
+ DFU_ATMEL_V1_CMD_WRITE_ARG_RST):
+ udi_dfu_atmel_start_app(udi_dfu_atmel_cmd.arg[1]);
+ return true;
+
+ // Commands to read Bootloader version
+ case CAT_CMD(DFU_ATMEL_V1_CMD_READ_ID,
+ DFU_ATMEL_V1_CMD_READ_ID_ARG_BOOTLOADER):
+ udi_dfu_atmel_read_id(DFU_ATMEL_V1_MEM_BOOTLOADER,
+ udi_dfu_atmel_cmd.arg[1]);
+ return true;
+
+ // Commands to read Chip indentification
+ case CAT_CMD(DFU_ATMEL_V1_CMD_READ_ID,
+ DFU_ATMEL_V1_CMD_READ_ID_ARG_SIGNATURE):
+ switch (udi_dfu_atmel_cmd.arg[1]) {
+ case DFU_ATMEL_V1_CMD_READ_ID_SIGNATURE_ARG_MANUF:
+ udi_dfu_atmel_read_id(DFU_ATMEL_V1_MEM_SIGNATURE,0);
+ break;
+ case DFU_ATMEL_V1_CMD_READ_ID_SIGNATURE_ARG_FAMILY:
+ udi_dfu_atmel_read_id(DFU_ATMEL_V1_MEM_SIGNATURE,1);
+ break;
+ case DFU_ATMEL_V1_CMD_READ_ID_SIGNATURE_ARG_PRODUCT:
+ udi_dfu_atmel_read_id(DFU_ATMEL_V1_MEM_SIGNATURE,2);
+ break;
+ case DFU_ATMEL_V1_CMD_READ_ID_SIGNATURE_ARG_REVISION:
+ udi_dfu_atmel_read_id(DFU_ATMEL_V1_MEM_SIGNATURE,3);
+ break;
+ }
+ return true;
+ }
+
+ return false; // Unknow command
+}
+
+static bool udi_dfu_atmel_progstart(uint8_t mem)
+{
+ udi_dfu_atmel_sel_mem(mem);
+
+ if (udi_dfu_atmel_security) {
+ return udi_dfu_atmel_mem_protected();
+ }
+
+ if (!udi_dfu_atmel_mem_getaddr(&udi_dfu_atmel_cmd.arg[1])) {
+ return false; // Bad Range
+ }
+
+ // Init buffer to fill during next DATA phase of request
+ udd_set_setup_payload(
+ udi_dfu_atmel_buf_trans,
+ DFU_ATMEL_BUF_TRANS_SIZE);
+ // Init callback called after buffer filled
+ udd_g_ctrlreq.over_under_run = udi_dfu_atmel_mem_write;
+ return true;
+}
+
+static bool udi_dfu_atmel_read(uint8_t mem, bool b_check)
+{
+ udi_dfu_atmel_sel_mem( mem );
+
+ if (!udi_dfu_atmel_mem_getaddr(&udi_dfu_atmel_cmd.arg[1]))
+ return false; // Bad Range
+
+ if ((!udi_dfu_atmel_mem_sel.fnct_read) || udi_dfu_atmel_security) {
+ // Read memory not available OR memory protected
+ // then accept request but stall next UPLOAD DFU request
+ udi_dfu_atmel_upload_callback = udi_dfu_atmel_mem_protected;
+ return true;
+ }
+
+ if (b_check) {
+ // It is not a read operation then it is a blanc check, thus do it now
+ udi_dfu_atmel_mem_check();
+ }else{
+ udi_dfu_atmel_upload_callback = udi_dfu_atmel_mem_read;
+ }
+ return true;
+}
+
+
+static bool udi_dfu_atmel_chip_erase(void)
+{
+ Assert(udi_dfu_atmel_cmd.arg[1]==DFU_ATMEL_V1_CMD_WRITE_ARG_ERASE_CHIP);
+ if (!isp_erase_chip()) {
+ return false;
+ }
+ udi_dfu_atmel_security = false;
+ return true;
+}
+
+
+static void udi_dfu_atmel_start_app(uint8_t mode)
+{
+ // Start application reset after next DNLOAD request
+ if (mode == DFU_ATMEL_V1_CMD_WRITE_ARG_RST_HW) {
+ udi_dfu_atmel_reset_callback = isp_start_appli_rst;
+ }else{
+ Assert(app == DFU_ATMEL_V1_CMD_WRITE_ARG_RST_SF);
+ udi_dfu_atmel_reset_callback = isp_start_appli_norst;
+ }
+}
+
+static void udi_dfu_atmel_read_id(uint8_t mem, uint8_t addr)
+{
+ udi_dfu_atmel_sel_mem( mem );
+ udi_dfu_atmel_mem_add = addr;
+ udi_dfu_atmel_mem_nb_data = 1;
+ udi_dfu_atmel_upload_callback = udi_dfu_atmel_mem_read;
+}
+
+#ifndef ISP_SMALL_MEMORY_SIZE
+static bool udi_dfu_atmel_cmd_decode_changeaddr(void)
+{
+ udi_dfu_atmel_mem_add = ((uint32_t)udi_dfu_atmel_cmd.arg[2])<<16;
+ return true;
+}
+#endif
+
+#endif // Protocol V1 or V2
+
+
+static void udi_dfu_atmel_sel_mem( uint8_t mem_num )
+{
+#if (UDI_DFU_ATMEL_PROTOCOL_VERSION == DFU_ATMEL_PROTOCOL_VERSION_2)
+ if((mem_num!=DFU_ATMEL_V2_MEM_CONFIGURATION)
+ &&(mem_num!=DFU_ATMEL_V2_MEM_SECURITY)
+ &&(mem_num!=DFU_ATMEL_V2_MEM_BOOTLOADER)
+ &&(mem_num!=DFU_ATMEL_V2_MEM_SIGNATURE)) {
+ udi_dfu_atmel_mem_b_protected = true;
+ }else{
+ udi_dfu_atmel_mem_b_protected = false;
+ }
+#endif
+ udi_dfu_atmel_mem_sel = *isp_memories.mem[mem_num];
+}
+
+static bool udi_dfu_atmel_mem_protected(void)
+{
+ udi_dfu_atmel_status.bStatus = DFU_STATUS_ERRWRITE;
+ udi_dfu_atmel_status.bState = DFU_STATE_DFUIDLE;
+ return false;
+}
+
+
+static bool udi_dfu_atmel_mem_getaddr(uint8_t * arg)
+{
+ isp_addr_t addr_end;
+
+ // Get address for request argument
+ udi_dfu_atmel_mem_add =
+ (udi_dfu_atmel_mem_add&0xFFFF0000) + ((uint16_t)arg[0]<<8) + (arg[1]<<0);
+ addr_end =
+ (udi_dfu_atmel_mem_add&0xFFFF0000) + ((uint16_t)arg[2]<<8) + (arg[3]<<0);
+
+ Assert(addr_end >= udi_dfu_atmel_mem_add);
+
+ // Check address
+ if (addr_end >= udi_dfu_atmel_mem_sel.size) {
+ udi_dfu_atmel_status.bStatus = DFU_STATUS_ERRADDRESS;
+ udi_dfu_atmel_status.bState = DFU_STATE_DFUERROR;
+ return false;
+ }
+
+ // Compute the number of data to transfer
+ udi_dfu_atmel_mem_nb_data = addr_end - udi_dfu_atmel_mem_add + 1;
+ return true;
+}
+
+
+static bool udi_dfu_atmel_mem_read(void)
+{
+ Assert(udi_dfu_atmel_mem_nb_data <= DFU_ATMEL_BUF_TRANS_SIZE);
+ udi_dfu_atmel_mem_sel.fnct_read(udi_dfu_atmel_buf_trans,
+ udi_dfu_atmel_mem_add, udi_dfu_atmel_mem_nb_data);
+
+ // Init buffer to transfer
+ udd_set_setup_payload( udi_dfu_atmel_buf_trans, udi_dfu_atmel_mem_nb_data);
+ return true;
+}
+
+
+static void udi_dfu_atmel_mem_check(void)
+{
+ uint8_t *ptr_buf;
+ uint16_t packet_size;
+
+ while (udi_dfu_atmel_mem_nb_data) {
+ // Compute buffer to read
+ packet_size = min(udi_dfu_atmel_mem_nb_data,
+ DFU_ATMEL_BUF_TRANS_SIZE);
+ udi_dfu_atmel_mem_nb_data -= packet_size;
+
+ // Fill buffer from memory
+ udi_dfu_atmel_mem_sel.fnct_read(udi_dfu_atmel_buf_trans,
+ udi_dfu_atmel_mem_add, packet_size);
+
+ // Check buffer content
+ ptr_buf = udi_dfu_atmel_buf_trans;
+ while (packet_size--) {
+ if (*ptr_buf++ != 0xFF) {
+ // Error, don't stall request but:
+ // Update DFU status
+ udi_dfu_atmel_status.bStatus = DFU_STATUS_ERRCHECK_ERASED;
+ // Send last address checked in next Upload command
+ udi_dfu_atmel_upload_callback = udi_dfu_atmel_mem_send_last_add;
+ return;
+ }
+ udi_dfu_atmel_mem_add++;
+ }
+ }
+}
+
+
+static bool udi_dfu_atmel_mem_send_last_add(void)
+{
+ // Send last checked address
+ udi_dfu_atmel_buf_trans[0] = (uint8_t)(udi_dfu_atmel_mem_add>>8);
+ udi_dfu_atmel_buf_trans[1] = (uint8_t)udi_dfu_atmel_mem_add;
+ // Init buffer to transfer
+ udd_set_setup_payload( udi_dfu_atmel_buf_trans, 2);
+ return true;
+}
+
+
+static bool udi_dfu_atmel_mem_write(void)
+{
+ uint8_t padding_prefix;
+
+ Assert(udi_dfu_atmel_mem_nb_data <= DFU_ATMEL_BUF_TRANS_SIZE);
+ Assert(udi_dfu_atmel_mem_nb_data == udd_g_ctrlreq.payload_size);
+
+ // In order to be in accordance with the memory write entity (page size),
+ // X non-significant bytes may be added before the first byte to program.
+ // The X number is calculated to align the beginning of the firmware
+ // with the memory write entity.
+ padding_prefix = Get_align(udi_dfu_atmel_mem_add,
+ USB_DEVICE_EP_CTRL_SIZE);
+
+ // Program data in memory
+ udi_dfu_atmel_mem_sel.fnct_write
+ (udi_dfu_atmel_mem_add,
+ udi_dfu_atmel_buf_trans + padding_prefix,
+ udi_dfu_atmel_mem_nb_data);
+
+ // Init callback called after buffer filled
+ udd_g_ctrlreq.over_under_run = NULL;
+ return true;
+}
+
+
+//@}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/udi_dfu_atmel.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/udi_dfu_atmel.h
new file mode 100644
index 0000000..48c0deb
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/udi_dfu_atmel.h
@@ -0,0 +1,104 @@
+/**
+ * \file
+ *
+ * \brief USB Device Firmware Upgrade (DFU) interface definitions.
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _UDI_DFU_ATMEL_H_
+#define _UDI_DFU_ATMEL_H_
+
+#include "conf_usb.h"
+#include "usb_protocol.h"
+#include "usb_protocol_dfu.h"
+#include "usb_atmel_dfu.h"
+#include "udd.h"
+#include "udc_desc.h"
+#include "udi.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * \ingroup udi_group
+ * \defgroup udi_dfu_atmel_group UDI for Device Firmware Upgrade Atmel specific
+ *
+ * The DFU from Atmel is based on DFU specification,
+ * but does not implement all features.
+ * @{
+ */
+
+/**
+ * \name Interface Descriptor
+ *
+ * The following structures provide the interface descriptor.
+ * It must be implemented in USB configuration descriptor.
+ */
+//@{
+
+//! Interface descriptor structure for DFU Atmel
+typedef struct {
+ usb_iface_desc_t iface;
+} udi_dfu_atmel_desc_t;
+
+//! By default no string associated to this interface
+#ifndef UDI_DFU_ATMEL_STRING_ID
+#define UDI_DFU_ATMEL_STRING_ID 0
+#endif
+
+//! Content of DFU interface descriptor for all speeds
+#define UDI_DFU_ATMEL_DESC {\
+ .iface.bLength = sizeof(usb_iface_desc_t),\
+ .iface.bDescriptorType = USB_DT_INTERFACE,\
+ .iface.bInterfaceNumber = UDI_DFU_ATMEL_IFACE_NUMBER,\
+ .iface.bAlternateSetting = 0,\
+ .iface.bNumEndpoints = 0,\
+ .iface.bInterfaceClass = NO_CLASS,\
+ .iface.bInterfaceSubClass = NO_SUBCLASS,\
+ .iface.bInterfaceProtocol = NO_PROTOCOL,\
+ .iface.iInterface = UDI_DFU_ATMEL_STRING_ID,\
+ }
+//@}
+
+
+//! Global structure which contains standard UDI API for UDC
+extern UDC_DESC_STORAGE udi_api_t udi_api_dfu_atmel;
+
+//@}
+
+#ifdef __cplusplus
+}
+#endif
+#endif // _UDI_DFU_ATMEL_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/udi_dfu_atmel_conf.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/udi_dfu_atmel_conf.h
new file mode 100644
index 0000000..fdd7274
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/udi_dfu_atmel_conf.h
@@ -0,0 +1,75 @@
+/**
+ * \file
+ *
+ * \brief Default DFU configuration for a USB Device
+ * with a single interface Atmel DFU
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _UDI_DFU_ATMEL_CONF_H_
+#define _UDI_DFU_ATMEL_CONF_H_
+
+#include "conf_usb.h"
+#include "usb_protocol_dfu.h"
+#include "usb_atmel_dfu.h"
+
+/**
+ * \ingroup udi_dfu_group
+ * \defgroup udi_dfu_group_conf Default DFU configuration for a USB Device
+ * with a single interface DFU
+ *
+ * @{
+ */
+
+//! Control endpoint size
+#if (UDI_DFU_ATMEL_PROTOCOL_VERSION == DFU_ATMEL_PROTOCOL_VERSION_2)
+#define USB_DEVICE_EP_CTRL_SIZE 64
+#else
+#define USB_DEVICE_EP_CTRL_SIZE 32
+#endif
+
+//! Interface number
+#define UDI_DFU_ATMEL_IFACE_NUMBER 0
+
+/**
+ * \name UDD Configuration
+ */
+//@{
+//! 0 endpoints used by DFU interface
+#define USB_DEVICE_MAX_EP 0
+//@}
+
+//@}
+
+#endif // _UDI_DFU_ATMEL_CONF_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/udi_dfu_atmel_desc.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/udi_dfu_atmel_desc.c
new file mode 100644
index 0000000..9da5923
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/atmel/udi_dfu_atmel_desc.c
@@ -0,0 +1,142 @@
+/**
+ * \file
+ *
+ * \brief Default descriptors for a USB Device with a single interface DFU Atmel
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "conf_usb.h"
+#include "udd.h"
+#include "udi.h"
+#include "udc_desc.h"
+#include "udi_dfu_atmel.h"
+
+
+/**
+ * \ingroup udi_dfu_atmel_group
+ * \defgroup udi_dfu_atmel_group_desc Default descriptors for a USB Device
+ * with a single interface DFU Atmel
+ *
+ * @{
+ */
+
+//! Only one interface for this device
+#define USB_DEVICE_NB_INTERFACE 1
+
+/**INDENT-OFF**/
+//! USB Device Descriptor
+COMPILER_WORD_ALIGNED
+UDC_DESC_STORAGE usb_dev_desc_t udc_device_desc = {
+ .bLength = sizeof(usb_dev_desc_t),
+ .bDescriptorType = USB_DT_DEVICE,
+ .bcdUSB = LE16(USB_V2_0),
+ .bDeviceClass = 0,
+ .bDeviceSubClass = 0,
+ .bDeviceProtocol = 0,
+ .bMaxPacketSize0 = USB_DEVICE_EP_CTRL_SIZE,
+ .idVendor = LE16(USB_DEVICE_VENDOR_ID),
+ .idProduct = LE16(USB_DEVICE_PRODUCT_ID),
+ .bcdDevice = LE16((USB_DEVICE_MAJOR_VERSION << 8)
+ | USB_DEVICE_MINOR_VERSION),
+#ifdef USB_DEVICE_MANUFACTURE_NAME
+ .iManufacturer = 1,
+#else
+ .iManufacturer = 0, // No manufacture string
+#endif
+#ifdef USB_DEVICE_PRODUCT_NAME
+ .iProduct = 2,
+#else
+ .iProduct = 0, // No product string
+#endif
+#ifdef USB_DEVICE_SERIAL_NAME
+ .iSerialNumber = 3,
+#else
+ .iSerialNumber = 0, // No serial string
+#endif
+ .bNumConfigurations = 1
+};
+
+
+//! Structure for USB Device Configuration Descriptor
+COMPILER_PACK_SET(1);
+typedef struct {
+ usb_conf_desc_t conf;
+ udi_dfu_atmel_desc_t udi_dfu_atmel;
+} udc_desc_t;
+COMPILER_PACK_RESET();
+
+//! USB Device Configuration Descriptor filled
+COMPILER_WORD_ALIGNED
+UDC_DESC_STORAGE udc_desc_t udc_desc_fs = {
+ .conf.bLength = sizeof(usb_conf_desc_t),
+ .conf.bDescriptorType = USB_DT_CONFIGURATION,
+ .conf.wTotalLength = LE16(sizeof(udc_desc_t)),
+ .conf.bNumInterfaces = USB_DEVICE_NB_INTERFACE,
+ .conf.bConfigurationValue = 1,
+ .conf.iConfiguration = 0,
+ .conf.bmAttributes = USB_CONFIG_ATTR_MUST_SET | USB_DEVICE_ATTR,
+ .conf.bMaxPower = USB_CONFIG_MAX_POWER(USB_DEVICE_POWER),
+ .udi_dfu_atmel = UDI_DFU_ATMEL_DESC,
+};
+
+#ifdef USB_DEVICE_HS_SUPPORT
+# error DFU Atmel for USB High Speed not implemented
+#endif
+
+
+/**
+ * \name UDC structures which content all USB Device definitions
+ */
+//@{
+
+//! Associate an UDI for each USB interface
+UDC_DESC_STORAGE udi_api_t *udi_apis[USB_DEVICE_NB_INTERFACE] = {
+ &udi_api_dfu_atmel,
+};
+
+//! Add UDI with USB Descriptors FS
+UDC_DESC_STORAGE udc_config_speed_t udc_config_lsfs[1] = {{
+ .desc = (usb_conf_desc_t UDC_DESC_STORAGE*)&udc_desc_fs,
+ .udi_apis = udi_apis,
+}};
+
+//! Add all information about USB Device in global structure for UDC
+UDC_DESC_STORAGE udc_config_t udc_config = {
+ .confdev_lsfs = &udc_device_desc,
+ .conf_lsfs = udc_config_lsfs,
+};
+
+//@}
+/**INDENT-ON**/
+//@}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/standard/udi_dfu.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/standard/udi_dfu.c
new file mode 100644
index 0000000..120c0b5
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/standard/udi_dfu.c
@@ -0,0 +1,173 @@
+/**
+ * \file
+ *
+ * \brief USB Device Firmware Upgrade (DFU) interface definitions.
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "conf_usb.h"
+#include "usb_protocol.h"
+#include "usb_protocol_dfu.h"
+#include "udd.h"
+#include "udc.h"
+#include "udi_dfu.h"
+
+/**
+ * \addtogroup udi_dfu_group
+ * @{
+ */
+
+/**
+ * \name Interface for UDC
+ */
+//@{
+
+bool udi_dfu_enable(void);
+void udi_dfu_disable(void);
+bool udi_dfu_setup(void);
+uint8_t udi_dfu_getsetting(void);
+
+//! Global structure which contains standard UDI API for UDC
+UDC_DESC_STORAGE udi_api_t udi_api_dfu = {
+ .enable = udi_dfu_enable,
+ .disable = udi_dfu_disable,
+ .setup = udi_dfu_setup,
+ .getsetting = udi_dfu_getsetting,
+};
+
+//@}
+
+/**
+ * \name Variables to manage DFU status
+ */
+//@{
+static dfu_status_t dfu_status;
+//@}
+
+//@}
+
+
+bool udc_dfu_enable(void)
+{
+ return UDI_DFU_ENABLE_EXT();
+}
+
+
+void udc_dfu_disable(void)
+{
+ UDI_DFU_DISABLE_EXT();
+}
+
+bool udc_dfu_setup(void)
+{
+
+ //** Interface requests
+ if (Udd_setup_type() != USB_REQ_TYPE_CLASS) {
+ return false; // Only class request decoded
+ }
+// TODO: use state of DFU specification
+ if (Udd_setup_is_in()) {
+ // Requests Class Interface Get
+ switch (udd_g_ctrlreq.req.bRequest) {
+ case USB_REQ_DFU_GETSTATUS:
+ if (0 != udd_g_ctrlreq.req.wValue)
+ break;
+ if (sizeof(udi_dfu_status) !=
+ udd_g_ctrlreq.req.wLength)
+ break;
+ udd_g_ctrlreq.payload =
+ (uint8_t *) & udi_dfu_status;
+ udd_g_ctrlreq.payload_size =
+ sizeof(udi_dfu_status);
+ return true;
+
+ case USB_REQ_DFU_GETSTATE:
+ if (0 != udd_g_ctrlreq.req.wValue)
+ break;
+ if (sizeof(udi_dfu_status.bState) !=
+ udd_g_ctrlreq.req.wLength)
+ break;
+ udd_g_ctrlreq.payload =
+ (uint8_t *) &
+ (udi_dfu_status.bState);
+ udd_g_ctrlreq.payload_size =
+ sizeof(udi_dfu_status.bState);
+ return true;
+
+ case USB_REQ_DFU_UPLOAD:
+ break;
+ }
+ }
+
+
+ if (Udd_setup_is_out()) {
+ // Requests Class Interface Set
+ switch (udd_g_ctrlreq.req.bRequest) {
+ case USB_REQ_DFU_ABORT:
+ break;
+ case USB_REQ_DFU_CLRSTATUS:
+ if (0 != udd_g_ctrlreq.req.wValue)
+ break;
+ if (0 != udd_g_ctrlreq.req.wLength)
+ break;
+ udi_dfu_clear_status();
+ return true;
+
+ case USB_REQ_DFU_DNLOAD:
+ break;
+ }
+ }
+ // Unknown request
+ udi_dfu_status.bStatus = DFU_STATUS_ERRSTALLEDPK;
+ udi_dfu_status.bState = DFU_STATE_DFUERROR;
+ return false;
+}
+
+
+uint8_t udi_dfu_getsetting(void)
+{
+ return 0;
+}
+
+
+static void udi_dfu_clear_status(void)
+{
+ // Reset DFU status
+ udi_dfu_status.bStatus = DFU_STATUS_OK;
+ udi_dfu_status.bState = DFU_STATE_DFUIDLE;
+ // These fields are not used and always set to zero:
+ // bwPollTimeout[3]
+ // iString
+}
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/standard/udi_dfu.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/standard/udi_dfu.h
new file mode 100644
index 0000000..363a8ff
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/standard/udi_dfu.h
@@ -0,0 +1,109 @@
+/**
+ * \file
+ *
+ * \brief USB Device Firmware Upgrade (DFU) interface definitions.
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _UDI_DFU_H_
+#define _UDI_DFU_H_
+
+#include "conf_usb.h"
+#include "usb_protocol.h"
+#include "usb_protocol_dfu.h"
+#include "udd.h"
+#include "udc_desc.h"
+#include "udi.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * \ingroup udi_group
+ * \defgroup udi_dfu_group UDI for Device Firmware Upgrade (DFU)
+ *
+ * @{
+ */
+
+/**
+ * \name Interface Descriptor
+ *
+ * The following structures provide the interface descriptor.
+ * It must be implemented in USB configuration descriptor.
+ */
+//@{
+
+//! Interface descriptor structure for DFU
+typedef struct {
+ usb_iface_desc_t iface;
+ usb_dfu_functional_desc_t func;
+} udi_dfu_desc_t;
+
+//! By default no string associated to this interface
+#ifndef UDI_DFU_STRING_ID
+#define UDI_DFU_STRING_ID 0
+#endif
+
+//! Content of DFU interface descriptor for all speeds
+#define UDI_DFU_DESC {\
+ .iface.bLength = sizeof(usb_iface_desc_t),\
+ .iface.bDescriptorType = USB_DT_INTERFACE,\
+ .iface.bInterfaceNumber = UDI_DFU_IFACE_NUMBER,\
+ .iface.bAlternateSetting = 0,\
+ .iface.bNumEndpoints = 0,\
+ .iface.bInterfaceClass = DFU_CLASS,\
+ .iface.bInterfaceSubClass = DFU_SUBCLASS,\
+ .iface.bInterfaceProtocol = DFU_PROTOCOL,\
+ .iface.iInterface = UDI_DFU_STRING_ID,\
+ .func.bLength = sizeof(usb_dfu_functional_desc_t),\
+ .func.bDescriptorType = USB_DT_DFU_FUNCTIONAL,\
+ .func.bmAttributes = \
+ USB_DFU_FONC_CAN_DNLOAD|USB_DFU_FONC_CAN_UPLOAD,\
+ .func.wDetachTimeOut = x,\
+ .func.wTransferSize = x,\
+ .func.bcdDFUVersion = USB_DFU_V1_1,\
+ }
+//@}
+
+
+//! Global structure which contains standard UDI API for UDC
+extern UDC_DESC_STORAGE udi_api_t udi_api_dfu;
+
+//@}
+
+#ifdef __cplusplus
+}
+#endif
+#endif // _UDI_DFU_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/standard/udi_dfu_conf.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/standard/udi_dfu_conf.h
new file mode 100644
index 0000000..4f5db77
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/standard/udi_dfu_conf.h
@@ -0,0 +1,70 @@
+/**
+ * \file
+ *
+ * \brief Default DFU configuration for a USB Device
+ * with a single interface DFU
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _UDI_DFU_CONF_H_
+#define _UDI_DFU_CONF_H_
+
+#include "conf_usb.h"
+#include "usb_protocol_dfu.h"
+
+/**
+ * \ingroup udi_dfu_group
+ * \defgroup udi_dfu_group_conf Default DFU configuration for a USB Device
+ * with a single interface DFU
+ *
+ * @{
+ */
+
+//! Control endpoint size
+#define USB_DEVICE_EP_CTRL_SIZE 32
+
+//! Interface number
+#define UDI_DFU_IFACE_NUMBER 0
+
+/**
+ * \name UDD Configuration
+ */
+//@{
+//! 0 endpoints used by DFU interface
+#define USB_DEVICE_MAX_EP 0
+//@}
+
+//@}
+
+#endif // _UDI_DFU_CONF_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/standard/udi_dfu_desc.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/standard/udi_dfu_desc.c
new file mode 100644
index 0000000..387093b
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/device/standard/udi_dfu_desc.c
@@ -0,0 +1,142 @@
+/**
+ * \file
+ *
+ * \brief Default descriptors for a USB Device with a single interface DFU
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "conf_usb.h"
+#include "udd.h"
+#include "udi.h"
+#include "udc_desc.h"
+#include "udi_dfu.h"
+
+
+/**
+ * \ingroup udi_dfu_group
+ * \defgroup udi_dfu_group_desc Default descriptors for a USB Device
+ * with a single interface DFU
+ *
+ * @{
+ */
+
+//! Only one interface for this device
+#define USB_DEVICE_NB_INTERFACE 1
+
+/**INDENT-OFF**/
+//! USB Device Descriptor
+COMPILER_WORD_ALIGNED
+UDC_DESC_STORAGE usb_dev_desc_t udc_device_desc = {
+ .bLength = sizeof(usb_dev_desc_t),
+ .bDescriptorType = USB_DT_DEVICE,
+ .bcdUSB = LE16(USB_V2_0),
+ .bDeviceClass = 0,
+ .bDeviceSubClass = 0,
+ .bDeviceProtocol = 0,
+ .bMaxPacketSize0 = USB_DEVICE_EP_CTRL_SIZE,
+ .idVendor = LE16(USB_DEVICE_VENDOR_ID),
+ .idProduct = LE16(USB_DEVICE_PRODUCT_ID),
+ .bcdDevice = LE16((USB_DEVICE_MAJOR_VERSION << 8)
+ | USB_DEVICE_MINOR_VERSION),
+#ifdef USB_DEVICE_MANUFACTURE_NAME
+ .iManufacturer = 1,
+#else
+ .iManufacturer = 0, // No manufacture string
+#endif
+#ifdef USB_DEVICE_PRODUCT_NAME
+ .iProduct = 2,
+#else
+ .iProduct = 0, // No product string
+#endif
+#ifdef USB_DEVICE_SERIAL_NAME
+ .iSerialNumber = 3,
+#else
+ .iSerialNumber = 0, // No serial string
+#endif
+ .bNumConfigurations = 1
+};
+
+
+//! Structure for USB Device Configuration Descriptor
+COMPILER_PACK_SET(1);
+typedef struct {
+ usb_conf_desc_t conf;
+ udi_dfu_desc_t udi_dfu;
+} udc_desc_t;
+COMPILER_PACK_RESET();
+
+//! USB Device Configuration Descriptor filled
+COMPILER_WORD_ALIGNED
+UDC_DESC_STORAGE udc_desc_t udc_desc_fs = {
+ .conf.bLength = sizeof(usb_conf_desc_t),
+ .conf.bDescriptorType = USB_DT_CONFIGURATION,
+ .conf.wTotalLength = LE16(sizeof(udc_desc_t)),
+ .conf.bNumInterfaces = USB_DEVICE_NB_INTERFACE,
+ .conf.bConfigurationValue = 1,
+ .conf.iConfiguration = 0,
+ .conf.bmAttributes = USB_CONFIG_ATTR_MUST_SET | USB_DEVICE_ATTR,
+ .conf.bMaxPower = USB_CONFIG_MAX_POWER(USB_DEVICE_POWER),
+ .udi_dfu = UDI_DFU_DESC,
+};
+
+#ifdef USB_DEVICE_HS_SUPPORT
+# error DFU for USB High Speed not implemented
+#endif
+
+
+/**
+ * \name UDC structures which content all USB Device definitions
+ */
+//@{
+
+//! Associate an UDI for each USB interface
+UDC_DESC_STORAGE udi_api_t *udi_apis[USB_DEVICE_NB_INTERFACE] = {
+ &udi_api_dfu,
+};
+
+//! Add UDI with USB Descriptors FS
+UDC_DESC_STORAGE udc_config_speed_t udc_config_lsfs[1] = {{
+ .desc = (usb_conf_desc_t UDC_DESC_STORAGE*)&udc_desc_fs,
+ .udi_apis = udi_apis,
+}};
+
+//! Add all information about USB Device in global structure for UDC
+UDC_DESC_STORAGE udc_config_t udc_config = {
+ .confdev_lsfs = &udc_device_desc,
+ .conf_lsfs = udc_config_lsfs,
+};
+
+//@}
+/**INDENT-ON**/
+//@}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/usb_atmel_dfu.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/usb_atmel_dfu.h
new file mode 100644
index 0000000..c25b05e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/usb_atmel_dfu.h
@@ -0,0 +1,244 @@
+/**
+ * \file
+ *
+ * \brief USB Device Firmware Upgrade (DFU) Atmel definitions.
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _USB_ATMEL_DFU_H_
+#define _USB_ATMEL_DFU_H_
+
+/**
+ * \ingroup usb_atmel_ids_group
+ * \defgroup usb_dfu_atmel USB Device Firmware Upgrade (DFU) Atmel definitions
+ *
+ * @{
+ */
+
+//! \defgroup Atmel DFU Protocol versions
+//@{
+#define DFU_ATMEL_PROTOCOL_VERSION_2 2 // Used by UC3 parts
+#define DFU_ATMEL_PROTOCOL_VERSION_1 1 // Used by Mega and Xmega parts
+#define DFU_ATMEL_PROTOCOL_VERSION_0 0 // Used by C51 parts
+//@}
+
+/**
+ * \defgroup usb_dfu_atmel_pv1 Definitions for Atmel DFU Protocol version 1
+ *
+ * Note: Often used by mega parts.
+ *
+ * @{
+ */
+
+COMPILER_PACK_SET(1);
+/**
+ * \brief DFU Atmel AVR 8-bit command fields
+ */
+typedef struct {
+ uint8_t cmd_id;
+ uint8_t arg[5];
+ //! To do a structure size = control endpoint size = 32
+ uint8_t reserved[32 - 6];
+} dfu_atmel_v1_cmd_t;
+COMPILER_PACK_RESET();
+
+//! Size of buffer used by FLIP to receive or send data
+#define DFU_ATMEL_V1_BUF_TRANS_SIZE 1024
+
+//! \name USB DFU Atmel AVR 8-bit Commands
+//@{
+#define DFU_ATMEL_V1_CMD_PROG_START 0x01
+#define DFU_ATMEL_V1_CMD_READ 0x03
+#define DFU_ATMEL_V1_CMD_WRITE 0x04
+#define DFU_ATMEL_V1_CMD_READ_ID 0x05
+#define DFU_ATMEL_V1_CMD_CHANGE_BASE_ADDR 0x06
+
+//! \name PROG_START arguments
+//@{
+#define DFU_ATMEL_V1_CMD_PROG_START_ARG_FLASH 0x00
+#define DFU_ATMEL_V1_CMD_PROG_START_ARG_EEPROM 0x01
+#define DFU_ATMEL_V1_CMD_PROG_START_ARG_CUSTOM 0x08
+//@}
+
+//! \name READ arguments
+//@{
+#define DFU_ATMEL_V1_CMD_READ_ARG_FLASH 0x00
+#define DFU_ATMEL_V1_CMD_READ_ARG_FLASHCHECK 0x01
+#define DFU_ATMEL_V1_CMD_READ_ARG_EEPROM 0x02
+#define DFU_ATMEL_V1_CMD_READ_ARG_CUSTOM 0x03
+//@}
+
+//! \name DFU_ATMEL_V1_CMD_WRITE arguments
+//@{
+#define DFU_ATMEL_V1_CMD_WRITE_ARG_ERASE 0x00
+#define DFU_ATMEL_V1_CMD_WRITE_ARG_RST 0x03
+//! \name DFU_ATMEL_V1_CMD_WRITE_ARG_ERASE arguments
+//@{
+#define DFU_ATMEL_V1_CMD_WRITE_ARG_ERASE_CHIP 0xFF
+//@}
+//! \name DFU_ATMEL_V1_CMD_WRITE_ARG_RST arguments
+//@{
+#define DFU_ATMEL_V1_CMD_WRITE_ARG_RST_HW 0x00
+#define DFU_ATMEL_V1_CMD_WRITE_ARG_RST_SF 0x01
+//@}
+//@}
+
+//! \name DFU_ATMEL_V1_CMD_READID_ arguments
+//@{
+#define DFU_ATMEL_V1_CMD_READ_ID_ARG_BOOTLOADER 0x00
+#define DFU_ATMEL_V1_CMD_READ_ID_ARG_SIGNATURE 0x01
+//! \name DFU_ATMEL_V1_CMD_READ_ID_ARG_SIGNATURE arguments
+//@{
+#define DFU_ATMEL_V1_CMD_READ_ID_SIGNATURE_ARG_MANUF 0x30
+#define DFU_ATMEL_V1_CMD_READ_ID_SIGNATURE_ARG_FAMILY 0x31
+#define DFU_ATMEL_V1_CMD_READ_ID_SIGNATURE_ARG_PRODUCT 0x60
+#define DFU_ATMEL_V1_CMD_READ_ID_SIGNATURE_ARG_REVISION 0x61
+//@}
+//@}
+
+//! \name DFU_ATMEL_V1_CMD_CHANGE_BASE_ADDR arguments
+//@{
+#define DFU_ATMEL_V1_CMD_CHANGE_BASE_ADDR_ARG0 0x03
+#define DFU_ATMEL_V1_CMD_CHANGE_BASE_ADDR_ARG1 0x00
+//@}
+
+//! \name Memory units available
+//@{
+#define DFU_ATMEL_V1_MEM_FLASH 0x00
+#define DFU_ATMEL_V1_MEM_EEPROM 0x01
+#define DFU_ATMEL_V1_MEM_BOOTLOADER 0x02
+#define DFU_ATMEL_V1_MEM_SIGNATURE 0x03
+#define DFU_ATMEL_V1_MEM_CUSTOM 0x04
+#define DFU_ATMEL_V1_MEM_COUNT 0x05 // Number of memory units
+//@}
+
+//@}
+
+
+/**
+ * \defgroup usb_dfu_atmel_pv2 Definitions for Atmel DFU Protocol version 2
+ *
+ * Note: Often used by uc3.parts
+ *
+ * @{
+ */
+
+COMPILER_PACK_SET(1);
+/**
+ * \brief DFU Atmel command fields
+ */
+typedef struct {
+ uint8_t group;
+ uint8_t cmd_id;
+ uint8_t arg[4];
+ // To do a structure size = control endpoint size = 64
+ uint8_t reserved[64 - 6];
+} dfu_atmel_v2_cmd_t;
+COMPILER_PACK_RESET();
+
+//! Size of buffer used by FLIP to receive or send data
+//! Note: Write uses 2K and Read uses 1KB
+#define DFU_ATMEL_V2_BUF_TRANS_SIZE (2*1024)
+
+//! \name Command Groups
+//@{
+#define DFU_ATMEL_V2_CMD_GRP_DNLOAD 0x01
+#define DFU_ATMEL_V2_CMD_GRP_UPLOAD 0x03
+#define DFU_ATMEL_V2_CMD_GRP_EXEC 0x04
+#define DFU_ATMEL_V2_CMD_GRP_SELECT 0x06
+//@}
+
+//! \name DNLOAD commands
+//@{
+#define DFU_ATMEL_V2_CMD_PROGRAM_START 0x00
+//@}
+
+
+//! \name UPLOAD commands
+//@{
+#define DFU_ATMEL_V2_CMD_READ_MEMORY 0x00
+#define DFU_ATMEL_V2_CMD_BLANK_CHECK 0x01
+//@}
+
+//! \name EXEC commands
+//@{
+#define DFU_ATMEL_V2_CMD_ERASE 0x00
+#define DFU_ATMEL_V2_CMD_START_APPLI 0x03
+//! \name ERASE arguments
+//@{
+#define DFU_ATMEL_V2_CMD_ERASE_ARG_CHIP 0xFF
+//@}
+//! \name START_APPLI arguments
+//@{
+#define DFU_ATMEL_V2_CMD_START_APPLI_ARG_RESET 0x00
+#define DFU_ATMEL_V2_CMD_START_APPLI_ARG_NO_RESET 0x01
+//@}
+//@}
+
+//! \name SELECT commands
+//@{
+#define DFU_ATMEL_V2_CMD_SELECT_MEMORY 0x03
+//! \name SELECT_MEMORY arguments
+//@{
+#define DFU_ATMEL_V2_CMD_SELECT_MEMORY_ARG_UNIT 0x00
+#define DFU_ATMEL_V2_CMD_SELECT_MEMORY_ARG_PAGE 0x01
+//! \name Memory units field
+//@{
+#define DFU_ATMEL_V2_MEM_FLASH 0x00
+#define DFU_ATMEL_V2_MEM_EEPROM 0x01
+#define DFU_ATMEL_V2_MEM_SECURITY 0x02
+#define DFU_ATMEL_V2_MEM_CONFIGURATION 0x03
+#define DFU_ATMEL_V2_MEM_BOOTLOADER 0x04
+#define DFU_ATMEL_V2_MEM_SIGNATURE 0x05
+#define DFU_ATMEL_V2_MEM_USER 0x06
+#define DFU_ATMEL_V2_MEM_INT_RAM 0x07
+#define DFU_ATMEL_V2_MEM_EXT_MEM_CS0 0x08
+#define DFU_ATMEL_V2_MEM_EXT_MEM_CS1 0x09
+#define DFU_ATMEL_V2_MEM_EXT_MEM_CS2 0x0A
+#define DFU_ATMEL_V2_MEM_EXT_MEM_CS3 0x0B
+#define DFU_ATMEL_V2_MEM_EXT_MEM_CS4 0x0C
+#define DFU_ATMEL_V2_MEM_EXT_MEM_CS5 0x0D
+#define DFU_ATMEL_V2_MEM_EXT_MEM_CS6 0x0E
+#define DFU_ATMEL_V2_MEM_EXT_MEM_CS7 0x0F
+#define DFU_ATMEL_V2_MEM_EXT_MEM_DF 0x10
+#define DFU_ATMEL_V2_MEM_COUNT 0x11 // Number of memory units
+//@}
+//@}
+//@}
+
+//@}
+
+//@}
+
+#endif // _USB_ATMEL_DFU_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/usb_protocol_dfu.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/usb_protocol_dfu.h
new file mode 100644
index 0000000..1227e17
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/dfu/usb_protocol_dfu.h
@@ -0,0 +1,186 @@
+/**
+ * \file
+ *
+ * \brief USB Device Firmware Upgrade (DFU) protocol definitions.
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _USB_PROTOCOL_DFU_H_
+#define _USB_PROTOCOL_DFU_H_
+
+/**
+ * \ingroup usb_protocol_group
+ * \defgroup usb_dfu_protocol USB Device Firmware Upgrade (DFU)
+ * protocol definitions
+ *
+ * @{
+ */
+
+/**
+ * \name Class value
+ */
+//@{
+#define DFU_CLASS 0xFE
+//@}
+
+/**
+ * \name SubClass value
+ */
+//@{
+#define DFU_SUBCLASS 0x01
+//@}
+
+/**
+ * \name protocol value
+ */
+//@{
+#define DFU_PROTOCOL 0x01
+//@}
+
+
+/**
+ * \brief DFU USB requests (bRequest)
+ */
+enum usb_reqid_dfu {
+ USB_REQ_DFU_DETACH = 0x00,
+ USB_REQ_DFU_DNLOAD = 0x01,
+ USB_REQ_DFU_UPLOAD = 0x02,
+ USB_REQ_DFU_GETSTATUS = 0x03,
+ USB_REQ_DFU_CLRSTATUS = 0x04,
+ USB_REQ_DFU_GETSTATE = 0x05,
+ USB_REQ_DFU_ABORT = 0x06,
+};
+
+/**
+ * \brief DFU USB descriptor types
+ */
+enum usb_descriptor_type_dfu {
+ USB_DT_DFU_FUNCTIONAL = 0x21,
+};
+
+
+//! \name USB DFU Status IDs
+//@{
+#define DFU_STATUS_OK 0x00
+#define DFU_STATUS_ERRTARGET 0x01
+#define DFU_STATUS_ERRFILE 0x02
+#define DFU_STATUS_ERRWRITE 0x03
+#define DFU_STATUS_ERRERASE 0x04
+#define DFU_STATUS_ERRCHECK_ERASED 0x05
+#define DFU_STATUS_ERRPROG 0x06
+#define DFU_STATUS_ERRVERIFY 0x07
+#define DFU_STATUS_ERRADDRESS 0x08
+#define DFU_STATUS_ERRNOTDONE 0x09
+#define DFU_STATUS_ERRFIRMWARE 0x0A
+#define DFU_STATUS_ERRVENDOR 0x0B
+#define DFU_STATUS_ERRUSBR 0x0C
+#define DFU_STATUS_ERRPOR 0x0D
+#define DFU_STATUS_ERRUNKNOWN 0x0E
+#define DFU_STATUS_ERRSTALLEDPK 0x0F
+//@}
+
+//! \name USB DFU State IDs
+//@{
+#define DFU_STATE_APPIDLE 0x00
+#define DFU_STATE_APPDETACH 0x01
+#define DFU_STATE_DFUIDLE 0x02
+#define DFU_STATE_DFUDNLOAD_SUNC 0x03
+#define DFU_STATE_DFUDNBUSY 0x04
+#define DFU_STATE_DFUDNLOAD_IDLE 0x05
+#define DFU_STATE_DFUMANIFEST_SYNC 0x06
+#define DFU_STATE_DFUMANIFEST 0x07
+#define DFU_STATE_DFUMANIFEST_WAIT_RESET 0x08
+#define DFU_STATE_DFUUPLOAD_IDLE 0x09
+#define DFU_STATE_DFUERROR 0x0A
+//@}
+
+
+/**
+ * \brief DFU Functional attributes
+ */
+enum usb_dfu_functional_attributes {
+ USB_DFU_FONC_CAN_DNLOAD = (1 << 0),
+ USB_DFU_FONC_CAN_UPLOAD = (1 << 1),
+ USB_DFU_FONC_MANIFEST_TOLERANT = (1 << 2),
+ USB_DFU_FONC_WILL_DETACH = (1 << 3),
+};
+
+//! Value for fields bcdDFU(Version)
+#define USB_DFU_V1_0 0x0100 //!< USB DFU Specification version 1.0
+
+COMPILER_PACK_SET(1);
+
+/**
+ * \brief DFU Descriptor
+ */
+typedef struct {
+ uint8_t bLength; //!< Size of this descriptor in bytes
+ uint8_t bDescriptorType; //!< DFU functional descriptor type
+ uint8_t bmAttributes; //!< DFU attributes
+ le16_t wDetachTimeOut; //!< Detach timeout
+ le16_t wTransferSize; //!< Maximum number of bytes that the device can accept
+ le16_t bcdDFUVersion; //!< DFU specification release
+} usb_dfu_functional_desc_t;
+
+/**
+ * \brief DFU Status
+ */
+typedef struct {
+ uint8_t bStatus;
+ uint8_t bwPollTimeout[3];
+ uint8_t bState;
+ uint8_t iString;
+} dfu_status_t;
+
+/**
+ * \brief DFU File Suffix
+ */
+typedef struct {
+ le32_t dwCRC; //!< Number The CRC of the entire file, excluding dwCRC.
+ uint8_t bLength; //!< The length of this DFU suffix including dwCRC.
+ uint8_t ucDfuSignature[3]; //!< The unique DFU signature field.
+ le16_t bcdDFU; //!< DFU specification number.
+ le16_t idVendor; //!< The vendor ID associated with this file.
+ //!< Either FFFFh or must match device's vendor ID.
+ le16_t idProduct; //!< The product ID associated with this file.
+ //!< Either FFFFh or must match device's product ID.
+ le16_t bcdDevice; //!< The release number of the device
+ //!< Either FFFFh or a BCD firmware release or version number.
+} dfu_file_suffix_t;
+
+COMPILER_PACK_RESET();
+
+//@}
+
+#endif // _USB_PROTOCOL_DFU_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega128a1u_xplain_a1_mkii/conf_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega128a1u_xplain_a1_mkii/conf_board.h
new file mode 100644
index 0000000..6825b7b
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega128a1u_xplain_a1_mkii/conf_board.h
@@ -0,0 +1,41 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Board configuration for spi example
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H_INCLUDED
+#define CONF_BOARD_H_INCLUDED
+
+#endif /* CONF_BOARD_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega128a1u_xplain_a1_mkii/conf_clock.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega128a1u_xplain_a1_mkii/conf_clock.h
new file mode 100644
index 0000000..844c93d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega128a1u_xplain_a1_mkii/conf_clock.h
@@ -0,0 +1,74 @@
+/**
+ * \file
+ *
+ * \brief Clock system configuration for clock example 1
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_CLOCK_H_INCLUDED
+#define CONF_CLOCK_H_INCLUDED
+
+//! Configuration using On-Chip RC oscillator at 48MHz
+//! The RC oscillator is calibrated via USB Start Of Frame
+//! Clk USB = 48MHz (used by USB)
+//! Clk sys = 48MHz
+//! Clk cpu/per = 12MHz
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_RCOSC
+#define CONFIG_OSC_RC32_CAL 48000000UL
+
+#define CONFIG_OSC_AUTOCAL OSC_ID_RC32MHZ
+#define CONFIG_OSC_AUTOCAL_REF_OSC OSC_ID_USBSOF
+
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_RC32MHZ
+#define CONFIG_SYSCLK_PSADIV SYSCLK_PSADIV_2
+#define CONFIG_SYSCLK_PSBCDIV SYSCLK_PSBCDIV_1_2
+
+/*
+//! Use external board OSC (8MHz)
+//! Clk pll = 48MHz (used by USB)
+//! Clk sys = 48MHz
+//! Clk cpu/per = 12MHz
+
+#define CONFIG_PLL0_SOURCE PLL_SRC_XOSC
+#define CONFIG_PLL0_MUL 6
+#define CONFIG_PLL0_DIV 1
+
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL
+
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL
+#define CONFIG_SYSCLK_PSADIV SYSCLK_PSADIV_2
+#define CONFIG_SYSCLK_PSBCDIV SYSCLK_PSBCDIV_1_2
+*/
+
+
+#endif /* CONF_CLOCK_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega128a1u_xplain_a1_mkii/conf_sleepmgr.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega128a1u_xplain_a1_mkii/conf_sleepmgr.h
new file mode 100644
index 0000000..699010d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega128a1u_xplain_a1_mkii/conf_sleepmgr.h
@@ -0,0 +1,43 @@
+/**
+ * \file
+ *
+ * \brief Sleep manager configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SLEEPMGR_H
+#define CONF_SLEEPMGR_H
+
+#define CONFIG_SLEEPMGR_ENABLE
+
+#endif /* CONF_SLEEPMGR_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega128a1u_xplain_a1_mkii/ui.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega128a1u_xplain_a1_mkii/ui.c
new file mode 100644
index 0000000..710545e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega128a1u_xplain_a1_mkii/ui.c
@@ -0,0 +1,165 @@
+/**
+ * \file
+ *
+ * \brief User Interface
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "udc.h"
+#include "udi_hid_generic.h"
+#include "board.h"
+#include "led.h"
+#include "ui.h"
+
+void ui_init(void)
+{
+ LED_On(LEDUSB_GPIO);
+ LED_On(LED0_GPIO);
+ LED_Off(LED1_GPIO);
+ LED_Off(LED4_GPIO);
+ LED_Off(LED5_GPIO);
+ LED_Off(LED6_GPIO);
+ LED_Off(LED7_GPIO);
+}
+
+void ui_powerdown(void)
+{
+ LED_Off(LED0_GPIO);
+ LED_Off(LED1_GPIO);
+ LED_Off(LED4_GPIO);
+ LED_Off(LED5_GPIO);
+ LED_Off(LED6_GPIO);
+ LED_Off(LED7_GPIO);
+}
+
+void ui_wakeup_enable(void)
+{
+ PORT_t *port;
+ // Configure pin change interrupt for asynch. wake-up on button pin.
+ ioport_configure_pin(GPIO_PUSH_BUTTON_0,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ port = ioport_pin_to_port(GPIO_PUSH_BUTTON_0);
+ port->INT0MASK = 0xFF;
+ port->INTCTRL = PORT_INT0LVL_LO_gc;
+}
+
+void ui_wakeup_disable(void)
+{
+ PORT_t *port;
+ port = ioport_pin_to_port(GPIO_PUSH_BUTTON_0);
+ port->INT0MASK = 0x00;
+}
+
+// Interrupt on "pin change" from switch to do wakeup on USB
+// Note:
+// This interrupt is enable when the USB host enable remotewakeup feature
+// This interrupt wakeup the CPU if this one is in idle mode
+ISR(PORTF_INT0_vect)
+{
+ PORT_t *port;
+ port = ioport_pin_to_port(GPIO_PUSH_BUTTON_0);
+ port->INTFLAGS = 0x01; // Ack interrupt
+ // It is a wakeup then send wakeup USB
+ udc_wakeup();
+}
+
+void ui_wakeup(void)
+{
+ LED_On(LED0_GPIO);
+}
+
+void ui_process(uint16_t framenumber)
+{
+ if ((framenumber % 1000) == 0) {
+ LED_On(LED1_GPIO);
+ }
+ if ((framenumber % 1000) == 500) {
+ LED_Off(LED1_GPIO);
+ }
+}
+
+void ui_led_on(uint8_t led_num)
+{
+ switch (led_num) {
+ case 1:
+ LED_On(LED4_GPIO);
+ break;
+ case 2:
+ LED_On(LED5_GPIO);
+ break;
+ case 3:
+ LED_On(LED6_GPIO);
+ break;
+ case 4:
+ LED_On(LED7_GPIO);
+ break;
+ }
+}
+
+void ui_led_off(uint8_t led_num)
+{
+ switch (led_num) {
+ case 1:
+ LED_Off(LED4_GPIO);
+ break;
+ case 2:
+ LED_Off(LED5_GPIO);
+ break;
+ case 3:
+ LED_Off(LED6_GPIO);
+ break;
+ case 4:
+ LED_Off(LED7_GPIO);
+ break;
+ }
+}
+
+bool ui_button(void)
+{
+ return gpio_pin_is_low(GPIO_PUSH_BUTTON_0);
+}
+
+/**
+ * \defgroup UI User Interface
+ *
+ * Human interface on Xplain-A1:
+ * - RED led close to USB connector is always on after firmware startup
+ * - Led 0 is on when USB line is in IDLE mode, and off in SUSPEND mode
+ * - Led 1 blinks when USB Host have checked and enabled HID generic interface
+ * - Led 4 to 7 are controlled by USB Host application
+ * - Switch 0 events are reported to USB Host application
+ * - Switch 0 can be used to wakeup USB Host in remote wakeup mode.
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega128b1_xmega_b1_xplained/conf_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega128b1_xmega_b1_xplained/conf_board.h
new file mode 100644
index 0000000..6825b7b
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega128b1_xmega_b1_xplained/conf_board.h
@@ -0,0 +1,41 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Board configuration for spi example
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H_INCLUDED
+#define CONF_BOARD_H_INCLUDED
+
+#endif /* CONF_BOARD_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega128b1_xmega_b1_xplained/conf_clock.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega128b1_xmega_b1_xplained/conf_clock.h
new file mode 100644
index 0000000..c55d8a8
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega128b1_xmega_b1_xplained/conf_clock.h
@@ -0,0 +1,74 @@
+/**
+ * \file
+ *
+ * \brief Clock system configuration for clock example 1
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_CLOCK_H_INCLUDED
+#define CONF_CLOCK_H_INCLUDED
+
+
+//! Configuration using On-Chip RC oscillator
+//! Use external board OSC (8MHz)
+//! Clk USB = 48MHz (used by USB)
+//! Clk sys = 48MHz
+//! Clk cpu/per = 12MHz
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_RCOSC
+#define CONFIG_OSC_RC32_CAL 48000000UL
+
+#define CONFIG_OSC_AUTOCAL OSC_ID_RC32MHZ
+#define CONFIG_OSC_AUTOCAL_REF_OSC OSC_ID_USBSOF
+
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_RC32MHZ
+#define CONFIG_SYSCLK_PSADIV SYSCLK_PSADIV_2
+#define CONFIG_SYSCLK_PSBCDIV SYSCLK_PSBCDIV_1_2
+
+/*
+//! Use external board OSC (8MHz)
+//! Clk pll = 48MHz (used by USB)
+//! Clk sys = 48MHz
+//! Clk cpu/per = 12MHz
+
+#define CONFIG_PLL0_SOURCE PLL_SRC_XOSC
+#define CONFIG_PLL0_MUL 6
+#define CONFIG_PLL0_DIV 1
+
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL
+
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL
+#define CONFIG_SYSCLK_PSADIV SYSCLK_PSADIV_2
+#define CONFIG_SYSCLK_PSBCDIV SYSCLK_PSBCDIV_1_2
+*/
+
+#endif /* CONF_CLOCK_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega128b1_xmega_b1_xplained/conf_sleepmgr.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega128b1_xmega_b1_xplained/conf_sleepmgr.h
new file mode 100644
index 0000000..699010d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega128b1_xmega_b1_xplained/conf_sleepmgr.h
@@ -0,0 +1,43 @@
+/**
+ * \file
+ *
+ * \brief Sleep manager configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SLEEPMGR_H
+#define CONF_SLEEPMGR_H
+
+#define CONFIG_SLEEPMGR_ENABLE
+
+#endif /* CONF_SLEEPMGR_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega128b1_xmega_b1_xplained/ui.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega128b1_xmega_b1_xplained/ui.c
new file mode 100644
index 0000000..c0d18ce
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega128b1_xmega_b1_xplained/ui.c
@@ -0,0 +1,143 @@
+/**
+ * \file
+ *
+ * \brief User Interface
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "udc.h"
+#include "udi_hid_generic.h"
+#include "board.h"
+#include "led.h"
+#include "ui.h"
+
+void ui_init(void)
+{
+}
+
+void ui_powerdown(void)
+{
+}
+
+void ui_wakeup_enable(void)
+{
+ PORT_t *port;
+ // Configure pin change interrupt for asynch. wake-up on button pin.
+ ioport_configure_pin(GPIO_PUSH_BUTTON_0,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ port = ioport_pin_to_port(GPIO_PUSH_BUTTON_0);
+ port->INT0MASK = 0xFF;
+ port->INTCTRL = PORT_INT0LVL_LO_gc;
+}
+
+void ui_wakeup_disable(void)
+{
+ PORT_t *port;
+ port = ioport_pin_to_port(GPIO_PUSH_BUTTON_0);
+ port->INT0MASK = 0x00;
+}
+
+// Interrupt on "pin change" from switch to do wakeup on USB
+// Note:
+// This interrupt is enable when the USB host enable remotewakeup feature
+// This interrupt wakeup the CPU if this one is in idle mode
+ISR(PORTE_INT0_vect)
+{
+ PORT_t *port;
+ port = ioport_pin_to_port(GPIO_PUSH_BUTTON_0);
+ port->INTFLAGS = 0x01; // Ack interrupt
+ // It is a wakeup then send wakeup USB
+ udc_wakeup();
+}
+
+void ui_wakeup(void)
+{
+}
+
+void ui_process(uint16_t framenumber)
+{
+}
+
+void ui_led_on(uint8_t led_num)
+{
+ switch (led_num) {
+ case 1:
+ LED_On(LED0_GPIO);
+ break;
+ case 2:
+ LED_On(LED1_GPIO);
+ break;
+ case 3:
+ LED_On(LED2_GPIO);
+ break;
+ case 4:
+ LED_On(LED3_GPIO);
+ break;
+ }
+}
+
+void ui_led_off(uint8_t led_num)
+{
+ switch (led_num) {
+ case 1:
+ LED_Off(LED0_GPIO);
+ break;
+ case 2:
+ LED_Off(LED1_GPIO);
+ break;
+ case 3:
+ LED_Off(LED2_GPIO);
+ break;
+ case 4:
+ LED_Off(LED3_GPIO);
+ break;
+ }
+}
+
+bool ui_button(void)
+{
+ return gpio_pin_is_low(GPIO_PUSH_BUTTON_0);
+}
+
+/**
+ * \defgroup UI User Interface
+ *
+ * Human interface on XMEGA-B1 Xplain:
+ * - RED led close to USB connector is always on after firmware startup
+ * - Led 0 to 3 are controlled by USB Host application
+ * - Switch 0 events are reported to USB Host application
+ * - Switch 0 can be used to wakeup USB Host in remote wakeup mode.
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega256a3bu_stk600-rc064x/conf_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega256a3bu_stk600-rc064x/conf_board.h
new file mode 100644
index 0000000..6825b7b
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega256a3bu_stk600-rc064x/conf_board.h
@@ -0,0 +1,41 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Board configuration for spi example
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H_INCLUDED
+#define CONF_BOARD_H_INCLUDED
+
+#endif /* CONF_BOARD_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega256a3bu_stk600-rc064x/conf_clock.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega256a3bu_stk600-rc064x/conf_clock.h
new file mode 100644
index 0000000..0475dbb
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega256a3bu_stk600-rc064x/conf_clock.h
@@ -0,0 +1,68 @@
+/**
+ * \file
+ *
+ * \brief Clock system configuration for clock example 1
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_CLOCK_H_INCLUDED
+#define CONF_CLOCK_H_INCLUDED
+
+
+// Use internal 32MRC @48MHz
+// Clk cpu/per = 12MHz
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_RCOSC
+#define CONFIG_OSC_RC32_CAL 48000000UL
+
+#define CONFIG_SYSCLK_SOURCE CLK_SCLKSEL_RC32M_gc
+#define CONFIG_SYSCLK_PSADIV SYSCLK_PSADIV_2
+#define CONFIG_SYSCLK_PSBCDIV SYSCLK_PSBCDIV_1_2
+
+#define CONFIG_OSC_AUTOCAL OSC_ID_RC32MHZ
+#define CONFIG_OSC_AUTOCAL_REF_OSC OSC_ID_USBSOF
+
+/*
+// Use external 8MHz clock and PLL
+// Clk cpu/per = 12MHz
+#define CONFIG_PLL0_SOURCE PLL_SRC_XOSC
+#define CONFIG_PLL0_MUL 6
+#define CONFIG_PLL0_DIV 1
+
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL
+
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL
+#define CONFIG_SYSCLK_PSADIV SYSCLK_PSADIV_2
+#define CONFIG_SYSCLK_PSBCDIV SYSCLK_PSBCDIV_1_2
+*/
+
+#endif /* CONF_CLOCK_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega256a3bu_stk600-rc064x/conf_sleepmgr.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega256a3bu_stk600-rc064x/conf_sleepmgr.h
new file mode 100644
index 0000000..699010d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega256a3bu_stk600-rc064x/conf_sleepmgr.h
@@ -0,0 +1,43 @@
+/**
+ * \file
+ *
+ * \brief Sleep manager configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SLEEPMGR_H
+#define CONF_SLEEPMGR_H
+
+#define CONFIG_SLEEPMGR_ENABLE
+
+#endif /* CONF_SLEEPMGR_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega256a3bu_stk600-rc064x/ui.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega256a3bu_stk600-rc064x/ui.c
new file mode 100644
index 0000000..ff8f12a
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/atxmega256a3bu_stk600-rc064x/ui.c
@@ -0,0 +1,165 @@
+/**
+ * \file
+ *
+ * \brief User Interface
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "udc.h"
+#include "udi_hid_generic.h"
+#include "board.h"
+#include "led.h"
+#include "ui.h"
+
+void ui_init(void)
+{
+ LED_On(LED0_GPIO);
+ LED_Off(LED1_GPIO);
+ LED_Off(LED4_GPIO);
+ LED_Off(LED5_GPIO);
+ LED_Off(LED6_GPIO);
+ LED_Off(LED7_GPIO);
+}
+
+void ui_powerdown(void)
+{
+ LED_Off(LED0_GPIO);
+ LED_Off(LED1_GPIO);
+ LED_Off(LED4_GPIO);
+ LED_Off(LED5_GPIO);
+ LED_Off(LED6_GPIO);
+ LED_Off(LED7_GPIO);
+}
+
+void ui_wakeup_enable(void)
+{
+ PORT_t *port;
+ // Configure pin change interrupt for asynch. wake-up on button pin.
+ ioport_configure_pin(GPIO_PUSH_BUTTON_0,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ port = ioport_pin_to_port(GPIO_PUSH_BUTTON_0);
+ port->INT0MASK = 0xFF;
+ port->INTCTRL = PORT_INT0LVL_LO_gc;
+}
+
+void ui_wakeup_disable(void)
+{
+ PORT_t *port;
+ port = ioport_pin_to_port(GPIO_PUSH_BUTTON_0);
+ port->INT0MASK = 0x00;
+}
+
+// Interrupt on "pin change" from switch to do wakeup on USB
+// Note:
+// This interrupt is enable when the USB host enable remotewakeup feature
+// This interrupt wakeup the CPU if this one is in idle mode
+ISR(PORTF_INT0_vect)
+{
+ PORT_t *port;
+ port = ioport_pin_to_port(GPIO_PUSH_BUTTON_0);
+ port->INTFLAGS = 0x01; // Ack interrupt
+ // It is a wakeup then send wakeup USB
+ udc_wakeup();
+}
+
+void ui_wakeup(void)
+{
+ LED_On(LED0_GPIO);
+}
+
+void ui_process(uint16_t framenumber)
+{
+ if ((framenumber % 1000) == 0) {
+ LED_On(LED1_GPIO);
+ }
+ if ((framenumber % 1000) == 500) {
+ LED_Off(LED1_GPIO);
+ }
+}
+
+void ui_led_on(uint8_t led_num)
+{
+ switch (led_num) {
+ case 1:
+ LED_On(LED4_GPIO);
+ break;
+ case 2:
+ LED_On(LED5_GPIO);
+ break;
+ case 3:
+ LED_On(LED6_GPIO);
+ break;
+ case 4:
+ LED_On(LED7_GPIO);
+ break;
+ }
+}
+
+void ui_led_off(uint8_t led_num)
+{
+ switch (led_num) {
+ case 1:
+ LED_Off(LED4_GPIO);
+ break;
+ case 2:
+ LED_Off(LED5_GPIO);
+ break;
+ case 3:
+ LED_Off(LED6_GPIO);
+ break;
+ case 4:
+ LED_Off(LED7_GPIO);
+ break;
+ }
+}
+
+bool ui_button(void)
+{
+ return gpio_pin_is_low(GPIO_PUSH_BUTTON_0);
+}
+
+/**
+ * \defgroup UI User Interface
+ *
+ * Human interface on STK600:
+ * - RED led close to USB connector is always on after firmware startup
+ * - RED led close to USB connector is always on after firmware startup
+ * - Led 0 is on when USB line is in IDLE mode, and off in SUSPEND mode
+ * - Led 1 blinks when USB Host have checked and enabled HID generic interface
+ * - Led 4 to 7 are controlled by USB Host application
+ * - Switch 0 events are reported to USB Host application
+ * - Switch 0 can be used to wakeup USB Host in remote wakeup mode.
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/conf_usb.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/conf_usb.h
new file mode 100644
index 0000000..c95bbae
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/conf_usb.h
@@ -0,0 +1,134 @@
+/**
+ * \file
+ *
+ * \brief USB configuration file
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _CONF_USB_H_
+#define _CONF_USB_H_
+
+#include "compiler.h"
+
+/**
+ * USB Device Configuration
+ * @{
+ */
+
+//! Device definition (mandatory)
+#define USB_DEVICE_VENDOR_ID USB_VID_ATMEL
+#define USB_DEVICE_PRODUCT_ID USB_PID_ATMEL_AVR_HIDGENERIC
+#define USB_DEVICE_MAJOR_VERSION 1
+#define USB_DEVICE_MINOR_VERSION 0
+#define USB_DEVICE_POWER 100 // Consumption on Vbus line (mA)
+#define USB_DEVICE_ATTR \
+ (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_SELF_POWERED)
+// (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_BUS_POWERED)
+// (USB_CONFIG_ATTR_SELF_POWERED)
+// (USB_CONFIG_ATTR_BUS_POWERED)
+
+//! USB Device string definitions (Optional)
+#define USB_DEVICE_MANUFACTURE_NAME "ATMEL AVR"
+#define USB_DEVICE_PRODUCT_NAME "HID Generic"
+// #define USB_DEVICE_SERIAL_NAME "12...EF"
+
+/**
+ * Device speeds support
+ * @{
+ */
+//! To define a Low speed device
+//#define USB_DEVICE_LOW_SPEED
+
+//! To authorize the High speed
+#if (UC3A3||UC3A4)
+//#define USB_DEVICE_HS_SUPPORT
+#endif
+//@}
+
+/**
+ * USB Device Callbacks definitions (Optional)
+ * @{
+ */
+#define UDC_VBUS_EVENT(b_vbus_high) main_vbus_action(b_vbus_high)
+#define UDC_SOF_EVENT() main_sof_action()
+#define UDC_SUSPEND_EVENT() main_suspend_action()
+#define UDC_RESUME_EVENT() main_resume_action()
+//! Mandatory when USB_DEVICE_ATTR authorizes remote wakeup feature
+#define UDC_REMOTEWAKEUP_ENABLE() main_remotewakeup_enable()
+#define UDC_REMOTEWAKEUP_DISABLE() main_remotewakeup_disable()
+//! When a extra string descriptor must be supported
+//! other than manufacturer, product and serial string
+// #define UDC_GET_EXTRA_STRING()
+//@}
+
+//@}
+
+
+/**
+ * USB Interface Configuration
+ * @{
+ */
+/**
+ * Configuration of HID Generic interface
+ * @{
+ */
+//! Interface callback definition
+#define UDI_HID_GENERIC_ENABLE_EXT() main_generic_enable()
+#define UDI_HID_GENERIC_DISABLE_EXT() main_generic_disable()
+#define UDI_HID_GENERIC_REPORT_OUT(ptr) main_report_out(ptr)
+#define UDI_HID_GENERIC_SET_FEATURE(f) main_set_feature(f)
+
+//! Sizes of I/O reports
+#define UDI_HID_REPORT_IN_SIZE 64
+#define UDI_HID_REPORT_OUT_SIZE 64
+#define UDI_HID_REPORT_FEATURE_SIZE 4
+
+//! Sizes of I/O endpoints
+#define UDI_HID_GENERIC_EP_SIZE 64
+//@}
+//@}
+
+
+/**
+ * USB Device Driver Configuration
+ * @{
+ */
+//@}
+
+//! The includes of classes and other headers must be done at the end of this file to avoid compile error
+#include "udi_hid_generic_conf.h"
+#include "main.h"
+#include "ui.h"
+
+#endif // _CONF_USB_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/main.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/main.c
new file mode 100644
index 0000000..687e53e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/main.c
@@ -0,0 +1,198 @@
+/**
+ * \file
+ *
+ * \brief Main functions for the HID Generic example
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "preprocessor.h"
+#include "board.h"
+#include "gpio.h"
+#include "sysclk.h"
+#include "sleepmgr.h"
+#include "conf_usb.h"
+#include "udc.h"
+#include "udd.h"
+#include "udi_hid_generic.h"
+#include "ui.h"
+
+static bool main_b_generic_enable = false;
+ uint8_t report_to_send[UDI_HID_REPORT_OUT_SIZE];
+
+
+/*! \brief Main function. Execution starts here.
+ */
+int main(void)
+{
+ irq_initialize_vectors();
+ cpu_irq_enable();
+
+ // Initialize the sleep manager
+ sleepmgr_init();
+
+ sysclk_init();
+ board_init();
+ ui_init();
+ ui_powerdown();
+
+ // Start USB stack to authorize VBus monitoring
+ udc_start();
+
+ if (!udc_include_vbus_monitoring()) {
+ // VBUS monitoring is not available on this product
+ // thereby VBUS has to be considered as present
+ main_vbus_action(true);
+ }
+ // The main loop manages only the power mode
+ // because the USB management is done by interrupt
+ while (true) {
+ sleepmgr_enter_sleep();
+ }
+}
+
+void main_vbus_action(bool b_high)
+{
+ if (b_high) {
+ // Attach USB Device
+ udc_attach();
+ } else {
+ // VBUS not present
+ udc_detach();
+ }
+}
+
+void main_suspend_action(void)
+{
+ ui_powerdown();
+}
+
+void main_resume_action(void)
+{
+ ui_wakeup();
+}
+
+void main_sof_action(void)
+{
+ static bool btn_last_state = 0;
+ bool btn_state = ui_button();
+
+ if (!main_b_generic_enable)
+ return;
+ ui_process(udd_get_frame_number());
+ if(btn_state!=btn_last_state) {
+ report_to_send[0]=btn_state;
+ udi_hid_generic_send_report_in(report_to_send);
+ }
+ btn_last_state=btn_state;
+
+}
+
+void main_remotewakeup_enable(void)
+{
+ ui_wakeup_enable();
+}
+
+void main_remotewakeup_disable(void)
+{
+ ui_wakeup_disable();
+}
+
+bool main_generic_enable(void)
+{
+ main_b_generic_enable = true;
+ return true;
+}
+
+void main_generic_disable(void)
+{
+ main_b_generic_enable = false;
+}
+
+void main_generic_run_bootloader(void)
+{
+ // Here reset target in bootloader mode
+ udc_stop();
+}
+
+void main_report_out(uint8_t *data)
+{
+ if (data[0]=='1') {
+ ui_led_on(data[1]-'0');
+ } else ui_led_off(data[1]-'0');
+}
+
+void main_set_feature(uint8_t *data)
+{
+}
+
+
+/**
+ * \mainpage ASF USB Device HID Generic
+ *
+ * \section intro Introduction
+ * This example shows how to implement a USB Device HID Generic
+ * on AVR products with USB module.
+ * The application note AVR4903 provides information about this implementation.
+ *
+ * \section startup Startup
+ * The example uses the buttons or sensors available on the board
+ * as a user interface.
+ * After loading firmware, connect hardware board (EVKxx,XPlain,...) to the USB Host.
+ * When connected to a USB host system this application provides a generic interface
+ * in the Unix/Mac/Windows operating systems.
+ * This example uses the native HID driver for these operating systems.
+ *
+ * \copydoc UI
+ *
+ * \section example About example
+ *
+ * The example uses the following module groups:
+ * - Basic modules:
+ * Startup, board, clock, interrupt, power management
+ * - USB Device stack and HID modules:
+ * <br>services/usb/
+ * <br>services/usb/udc/
+ * <br>services/usb/class/hid/
+ * <br>services/usb/class/hid/generic/
+ * - Specific implementation:
+ * - main.c,
+ * <br>initializes clock
+ * <br>initializes interrupt
+ * <br>\subpage power_management
+ * <br>manages UI
+ * - specific implementation for each target "./examples/product_board/":
+ * - conf_foo.h configuration of each module
+ * - ui.c implement of user's interface (buttons, leds)
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/main.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/main.h
new file mode 100644
index 0000000..5e0e6a8
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/main.h
@@ -0,0 +1,95 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief Declaration of main function used by HID generic example
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _MAIN_H_
+#define _MAIN_H_
+
+/*! \brief Called by HID interface
+ * Callback running when USB Host enable generic interface
+ *
+ * \retval true if generic startup is ok
+ */
+bool main_generic_enable(void);
+
+/*! \brief Called by HID interface
+ * Callback running when USB Host disable generic interface
+ */
+void main_generic_disable(void);
+
+/*! \brief Called when Vbus line state change
+ */
+void main_vbus_action(bool b_high);
+
+/*! \brief Called when a start of frame is received on USB line
+ */
+void main_sof_action(void);
+
+/*! \brief Called by UDD when a suspend is received
+ * Callback running when USB Host set USB line in suspend state
+ */
+void main_suspend_action(void);
+
+/*! \brief Called by UDD when the USB line exit of suspend state
+ */
+void main_resume_action(void);
+
+/*! \brief Called by UDC when USB Host request to enable remote wakeup
+ */
+void main_remotewakeup_enable(void);
+
+/*! \brief Called by UDC when USB Host request to disable remote wakeup
+ */
+void main_remotewakeup_disable(void);
+
+/*! \brief Reset target to jump in bootloader
+ */
+void main_generic_run_bootloader(void);
+
+void main_report_out(uint8_t *data);
+
+void main_set_feature(uint8_t *feature);
+
+
+#endif // _MAIN_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/ui.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/ui.h
new file mode 100644
index 0000000..d52f83d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/example/ui.h
@@ -0,0 +1,61 @@
+/**
+ * \file
+ *
+ * \brief Common User Interface for HID Mouse application
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _UI_H_
+#define _UI_H_
+
+void ui_init(void);
+void ui_powerdown(void);
+
+void ui_wakeup_enable(void);
+void ui_wakeup_disable(void);
+void ui_wakeup(void);
+
+//! This process is called called each 1ms
+//! It is called only if HID mouse interface is enable.
+//! It is called by SOF interrupt.
+//!
+void ui_process(uint16_t framenumber);
+bool ui_button(void);
+
+void ui_led_off(uint8_t led_num);
+void ui_led_on(uint8_t led_num);
+
+
+
+#endif // _UI_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/module_config/conf_usb.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/module_config/conf_usb.h
new file mode 100644
index 0000000..49cc82a
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/module_config/conf_usb.h
@@ -0,0 +1,134 @@
+/**
+ * \file
+ *
+ * \brief USB configuration file
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _CONF_USB_H_
+#define _CONF_USB_H_
+
+#include "compiler.h"
+
+#warning You must refill the following definitions with a correct values
+
+/**
+ * USB Device Configuration
+ * @{
+ */
+
+//! Device definition (mandatory)
+#define USB_DEVICE_VENDOR_ID 0x0000
+#define USB_DEVICE_PRODUCT_ID 0x0000
+#define USB_DEVICE_MAJOR_VERSION 1
+#define USB_DEVICE_MINOR_VERSION 0
+#define USB_DEVICE_POWER 100 // Consumption on Vbus line (mA)
+#define USB_DEVICE_ATTR \
+ (USB_CONFIG_ATTR_SELF_POWERED)
+// (USB_CONFIG_ATTR_BUS_POWERED)
+// (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_SELF_POWERED)
+// (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_BUS_POWERED)
+
+//! USB Device string definitions (Optional)
+// #define USB_DEVICE_MANUFACTURE_NAME "Manufacture name"
+// #define USB_DEVICE_PRODUCT_NAME "Product name"
+// #define USB_DEVICE_SERIAL_NAME "12...EF"
+
+/**
+ * Device speeds support
+ * @{
+ */
+//! To define a Low speed device
+//#define USB_DEVICE_LOW_SPEED
+
+//! To authorize the High speed
+#if (UC3A3||UC3A4)
+//#define USB_DEVICE_HS_SUPPORT
+#endif
+//@}
+
+/**
+ * USB Device Callbacks definitions (Optional)
+ * @{
+ */
+// #define UDC_VBUS_EVENT(b_vbus_high) user_callback_vbus_action(b_vbus_high)
+// #define UDC_SOF_EVENT() user_callback_sof_action()
+// #define UDC_SUSPEND_EVENT() user_callback_suspend_action()
+// #define UDC_RESUME_EVENT() user_callback_resume_action()
+//! Mandatory when USB_DEVICE_ATTR authorizes remote wakeup feature
+// #define UDC_REMOTEWAKEUP_ENABLE() user_callback_remotewakeup_enable()
+// #define UDC_REMOTEWAKEUP_DISABLE() user_callback_remotewakeup_disable()
+//! When a extra string descriptor must be supported
+//! other than manufacturer, product and serial string
+// #define UDC_GET_EXTRA_STRING()
+//@}
+
+//@}
+
+
+/**
+ * USB Interface Configuration
+ * @{
+ */
+/**
+ * Configuration of HID Generic interface
+ * @{
+ */
+//! Interface callback definition
+#define UDI_HID_GENERIC_ENABLE_EXT() true
+#define UDI_HID_GENERIC_DISABLE_EXT()
+#define UDI_HID_GENERIC_REPORT_OUT(ptr)
+#define UDI_HID_GENERIC_SET_FEATURE(f)
+
+//! Sizes of I/O reports
+#define UDI_HID_REPORT_IN_SIZE 64
+#define UDI_HID_REPORT_OUT_SIZE 64
+#define UDI_HID_REPORT_FEATURE_SIZE 4
+
+//! Sizes of I/O endpoints
+#define UDI_HID_GENERIC_EP_SIZE 64
+//@}
+//@}
+
+
+/**
+ * USB Device Driver Configuration
+ * @{
+ */
+//@}
+
+//! The includes of classes and other headers must be done at the end of this file to avoid compile error
+#include "udi_hid_generic_conf.h"
+
+#endif // _CONF_USB_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/udi_hid_generic.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/udi_hid_generic.c
new file mode 100644
index 0000000..6f7c7b8
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/udi_hid_generic.c
@@ -0,0 +1,293 @@
+/**
+ * \file
+ *
+ * \brief USB Device Human Interface Device (HID) generic interface.
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "conf_usb.h"
+#include "usb_protocol.h"
+#include "udd.h"
+#include "udc.h"
+#include "udi_hid.h"
+#include "udi_hid_generic.h"
+#include <string.h>
+
+/**
+ * \addtogroup udi_hid_generic_group
+ * @{
+ */
+
+/**
+ * \name Interface for UDC
+ */
+//@{
+
+bool udi_hid_generic_enable(void);
+void udi_hid_generic_disable(void);
+bool udi_hid_generic_setup(void);
+uint8_t udi_hid_generic_getsetting(void);
+
+//! Global structure which contains standard UDI interface for UDC
+UDC_DESC_STORAGE udi_api_t udi_api_hid_generic = {
+ .enable = (bool(*)(void))udi_hid_generic_enable,
+ .disable = (void (*)(void))udi_hid_generic_disable,
+ .setup = (bool(*)(void))udi_hid_generic_setup,
+ .getsetting = (uint8_t(*)(void))udi_hid_generic_getsetting,
+};
+
+//@}
+
+
+/**
+ * \name Internal defines and variables to manage HID generic
+ */
+//@{
+
+//! To store current rate of HID generic
+static uint8_t udi_hid_generic_rate;
+//! To store current protocol of HID generic
+static uint8_t udi_hid_generic_protocol;
+//! To signal if the report IN buffer is free (no transfer on going)
+static bool udi_hid_generic_b_report_in_free;
+//! Report to send
+COMPILER_WORD_ALIGNED
+ static uint8_t udi_hid_generic_report_in[UDI_HID_REPORT_IN_SIZE];
+//! Report to receive
+COMPILER_WORD_ALIGNED
+ static uint8_t udi_hid_generic_report_out[UDI_HID_REPORT_OUT_SIZE];
+//! Report to receive via SetFeature
+COMPILER_WORD_ALIGNED
+ static uint8_t udi_hid_generic_report_feature[UDI_HID_REPORT_FEATURE_SIZE];
+
+//@}
+
+//! HID report descriptor for standard HID generic
+UDC_DESC_STORAGE udi_hid_generic_report_desc_t udi_hid_generic_report_desc = { {
+ 0x06, 0xFF, 0xFF, // 04|2 , Usage Page (vendor defined?)
+ 0x09, 0x01, // 08|1 , Usage (vendor defined
+ 0xA1, 0x01, // A0|1 , Collection (Application)
+ // IN report
+ 0x09, 0x02, // 08|1 , Usage (vendor defined)
+ 0x09, 0x03, // 08|1 , Usage (vendor defined)
+ 0x15, 0x00, // 14|1 , Logical Minimum(0 for signed byte?)
+ 0x26, 0xFF, 0x00, // 24|1 , Logical Maximum(255 for signed byte?)
+ 0x75, 0x08, // 74|1 , Report Size(8) = field size in bits = 1 byte
+ // 94|1 , ReportCount(size) = repeat count of previous item
+ 0x95, sizeof(udi_hid_generic_report_in),
+ 0x81, 0x02, // 80|1 , IN report (Data,Variable, Absolute)
+ // OUT report
+ 0x09, 0x04, // 08|1 , Usage (vendor defined)
+ 0x09, 0x05, // 08|1 , Usage (vendor defined)
+ 0x15, 0x00, // 14|1 , Logical Minimum(0 for signed byte?)
+ 0x26, 0xFF, 0x00, // 24|1 , Logical Maximum(255 for signed byte?)
+ 0x75, 0x08, // 74|1 , Report Size(8) = field size in bits = 1 byte
+ // 94|1 , ReportCount(size) = repeat count of previous item
+ 0x95, sizeof(udi_hid_generic_report_out),
+ 0x91, 0x02, // 90|1 , OUT report (Data,Variable, Absolute)
+ // Feature report
+ 0x09, 0x06, // 08|1 , Usage (vendor defined)
+ 0x09, 0x07, // 08|1 , Usage (vendor defined)
+ 0x15, 0x00, // 14|1 , LogicalMinimum(0 for signed byte)
+ 0x26, 0xFF, 0x00, // 24|1 , Logical Maximum(255 for signed byte)
+ 0x75, 0x08, // 74|1 , Report Size(8) =field size in bits = 1 byte
+ 0x95, sizeof(udi_hid_generic_report_feature), // 94|x , ReportCount in byte
+ 0xB1, 0x02, // B0|1 , Feature report
+ 0xC0 // C0|0 , End Collection
+ }
+};
+
+/**
+ * \name Internal routines
+ */
+//@{
+
+/**
+ * \brief Send a report to HID interface
+ *
+ */
+static bool udi_hid_generic_setreport(void);
+
+/**
+ * \brief Initialize UDD to receive setfeature data
+ */
+static void udi_hid_generic_setfeature_valid(void);
+
+/**
+ * \brief Callback called when the report is received
+ *
+ * \param status UDD_EP_TRANSFER_OK, if transfer is completed
+ * \param status UDD_EP_TRANSFER_ABORT, if transfer is aborted
+ * \param nb_sent number of data received
+ */
+static void udi_hid_generic_report_out_received(udd_ep_status_t status,
+ iram_size_t nb_received);
+
+/**
+ * \brief Enable reception of out report
+ *
+ * \return \c 1 if function was successfully done, otherwise \c 0.
+ */
+static bool udi_hid_generic_report_out_enable(void);
+
+/**
+ * \brief Callback called when the report is sent
+ *
+ * \param status UDD_EP_TRANSFER_OK, if transfer is completed
+ * \param status UDD_EP_TRANSFER_ABORT, if transfer is aborted
+ * \param nb_sent number of data transfered
+ */
+static void udi_hid_generic_report_in_sent(udd_ep_status_t status,
+ iram_size_t nb_sent);
+
+//@}
+
+
+//--------------------------------------------
+//------ Interface for UDI HID level
+
+bool udi_hid_generic_enable(void)
+{
+ // Initialize internal values
+ udi_hid_generic_rate = 0;
+ udi_hid_generic_protocol = 0;
+ udi_hid_generic_b_report_in_free = true;
+ if (!udi_hid_generic_report_out_enable())
+ return false;
+ return UDI_HID_GENERIC_ENABLE_EXT();
+}
+
+
+void udi_hid_generic_disable(void)
+{
+ UDI_HID_GENERIC_DISABLE_EXT();
+}
+
+
+bool udi_hid_generic_setup(void)
+{
+ return udi_hid_setup(&udi_hid_generic_rate,
+ &udi_hid_generic_protocol,
+ (uint8_t *) &udi_hid_generic_report_desc,
+ udi_hid_generic_setreport);
+}
+
+
+uint8_t udi_hid_generic_getsetting(void)
+{
+ return 0;
+}
+
+
+static bool udi_hid_generic_setreport(void)
+{
+ if ((USB_HID_REPORT_TYPE_FEATURE == (udd_g_ctrlreq.req.wValue >> 8))
+ && (0 == (0xFF & udd_g_ctrlreq.req.wValue))
+ && (sizeof(udi_hid_generic_report_feature) ==
+ udd_g_ctrlreq.req.wLength)) {
+ // Feature type on report ID 0
+ udd_g_ctrlreq.payload =
+ (uint8_t *) & udi_hid_generic_report_feature;
+ udd_g_ctrlreq.callback = udi_hid_generic_setfeature_valid;
+ udd_g_ctrlreq.payload_size =
+ sizeof(udi_hid_generic_report_feature);
+ return true;
+ }
+ return false;
+}
+
+//--------------------------------------------
+//------ Interface for application
+
+bool udi_hid_generic_send_report_in(uint8_t *data)
+{
+ if (!udi_hid_generic_b_report_in_free)
+ return false;
+ irqflags_t flags = cpu_irq_save();
+ // Fill report
+ memset(&udi_hid_generic_report_in, 0,
+ sizeof(udi_hid_generic_report_in));
+ memcpy(&udi_hid_generic_report_in, data,
+ sizeof(udi_hid_generic_report_in));
+ udi_hid_generic_b_report_in_free =
+ !udd_ep_run(UDI_HID_GENERIC_EP_IN,
+ false,
+ (uint8_t *) & udi_hid_generic_report_in,
+ sizeof(udi_hid_generic_report_in),
+ udi_hid_generic_report_in_sent);
+ cpu_irq_restore(flags);
+ return !udi_hid_generic_b_report_in_free;
+
+}
+
+//--------------------------------------------
+//------ Internal routines
+
+static void udi_hid_generic_setfeature_valid(void)
+{
+ if (sizeof(udi_hid_generic_report_feature) != udd_g_ctrlreq.payload_size)
+ return; // Bad data
+ UDI_HID_GENERIC_SET_FEATURE(udi_hid_generic_report_feature);
+}
+
+static void udi_hid_generic_report_out_received(udd_ep_status_t status,
+ iram_size_t nb_received)
+{
+ if (UDD_EP_TRANSFER_OK != status)
+ return; // Abort reception
+
+ if (sizeof(udi_hid_generic_report_out) == nb_received) {
+ UDI_HID_GENERIC_REPORT_OUT(udi_hid_generic_report_out);
+ }
+ udi_hid_generic_report_out_enable();
+}
+
+
+static bool udi_hid_generic_report_out_enable(void)
+{
+ return udd_ep_run(UDI_HID_GENERIC_EP_OUT,
+ false,
+ (uint8_t *) & udi_hid_generic_report_out,
+ sizeof(udi_hid_generic_report_out),
+ udi_hid_generic_report_out_received);
+}
+
+
+static void udi_hid_generic_report_in_sent(udd_ep_status_t status,
+ iram_size_t nb_sent)
+{
+ udi_hid_generic_b_report_in_free = true;
+}
+
+//@}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/udi_hid_generic.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/udi_hid_generic.h
new file mode 100644
index 0000000..0915f54
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/udi_hid_generic.h
@@ -0,0 +1,144 @@
+/**
+ * \file
+ *
+ * \brief USB Device Human Interface Device (HID) generic interface.
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _UDI_HID_GENERIC_H_
+#define _UDI_HID_GENERIC_H_
+
+#include "conf_usb.h"
+#include "usb_protocol.h"
+#include "usb_protocol_hid.h"
+#include "udc_desc.h"
+#include "udi.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * \ingroup udi_hid_group
+ * \defgroup udi_hid_generic_group UDI for Human Interface Device Generic Class
+ * base on UDI HID
+ * @{
+ */
+
+/**
+ * \name Interface Descriptor
+ *
+ * The following structures provide the interface descriptor.
+ * It must be implemented in USB configuration descriptor.
+ */
+//@{
+
+//! Global structure which contains standard UDI API for UDC
+extern UDC_DESC_STORAGE udi_api_t udi_api_hid_generic;
+
+//! Interface descriptor structure for HID generic
+typedef struct {
+ usb_iface_desc_t iface;
+ usb_hid_descriptor_t hid;
+ usb_ep_desc_t ep_in;
+ usb_ep_desc_t ep_out;
+} udi_hid_generic_desc_t;
+
+//! Report descriptor for HID generic
+typedef struct {
+ uint8_t array[53];
+} udi_hid_generic_report_desc_t;
+
+
+//! By default no string associated to this interface
+#ifndef UDI_HID_GENERIC_STRING_ID
+#define UDI_HID_GENERIC_STRING_ID 0
+#endif
+
+//! HID mouse interval
+#ifdef USB_DEVICE_HS_SUPPORT
+#define UDI_HID_GENERIC_EP_INTERVEL 8
+#else
+#define UDI_HID_GENERIC_EP_INTERVEL 20
+#endif
+
+//! Content of HID generic interface descriptor for all speed
+#define UDI_HID_GENERIC_DESC {\
+ .iface.bLength = sizeof(usb_iface_desc_t),\
+ .iface.bDescriptorType = USB_DT_INTERFACE,\
+ .iface.bInterfaceNumber = UDI_HID_GENERIC_IFACE_NUMBER,\
+ .iface.bAlternateSetting = 0,\
+ .iface.bNumEndpoints = 2,\
+ .iface.bInterfaceClass = HID_CLASS,\
+ .iface.bInterfaceSubClass = HID_SUB_CLASS_NOBOOT,\
+ .iface.bInterfaceProtocol = HID_PROTOCOL_GENERIC,\
+ .iface.iInterface = UDI_HID_GENERIC_STRING_ID,\
+ .hid.bLength = sizeof(usb_hid_descriptor_t),\
+ .hid.bDescriptorType = USB_DT_HID,\
+ .hid.bcdHID = LE16(USB_HID_BDC_V1_11),\
+ .hid.bCountryCode = USB_HID_NO_COUNTRY_CODE,\
+ .hid.bNumDescriptors = USB_HID_NUM_DESC,\
+ .hid.bRDescriptorType = USB_DT_HID_REPORT,\
+ .hid.wDescriptorLength = LE16(sizeof(udi_hid_generic_report_desc_t)),\
+ .ep_in.bLength = sizeof(usb_ep_desc_t),\
+ .ep_in.bDescriptorType = USB_DT_ENDPOINT,\
+ .ep_in.bEndpointAddress = UDI_HID_GENERIC_EP_IN,\
+ .ep_in.bmAttributes = USB_EP_TYPE_INTERRUPT,\
+ .ep_in.wMaxPacketSize = LE16(UDI_HID_GENERIC_EP_SIZE),\
+ .ep_in.bInterval = UDI_HID_GENERIC_EP_INTERVEL,\
+ .ep_out.bLength = sizeof(usb_ep_desc_t),\
+ .ep_out.bDescriptorType = USB_DT_ENDPOINT,\
+ .ep_out.bEndpointAddress = UDI_HID_GENERIC_EP_OUT,\
+ .ep_out.bmAttributes = USB_EP_TYPE_INTERRUPT,\
+ .ep_out.wMaxPacketSize = LE16(UDI_HID_GENERIC_EP_SIZE),\
+ .ep_out.bInterval = UDI_HID_GENERIC_EP_INTERVEL,\
+ }
+//@}
+
+
+/**
+ * \name Interface for application
+ *
+ * These routines are used by application to send generic events
+ */
+//@{
+bool udi_hid_generic_send_report_in(uint8_t *data);
+//@}
+
+//@}
+
+#ifdef __cplusplus
+}
+#endif
+#endif // _UDI_HID_GENERIC_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/udi_hid_generic_conf.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/udi_hid_generic_conf.h
new file mode 100644
index 0000000..7b33597
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/udi_hid_generic_conf.h
@@ -0,0 +1,86 @@
+/**
+ * \file
+ *
+ * \brief Default HID generic configuration for a USB Device
+ * with a single interface HID
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _UDI_HID_GENERIC_CONF_H_
+#define _UDI_HID_GENERIC_CONF_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * \ingroup udi_hid_generic_group
+ * \defgroup udi_hid_generic_group_conf Default HID generic configuration
+ * for a USB Device with a single interface HID
+ *
+ * @{
+ */
+
+//! Control endpoint size
+#ifdef USB_DEVICE_HS_SUPPORT
+# define USB_DEVICE_EP_CTRL_SIZE 64
+#else
+# define USB_DEVICE_EP_CTRL_SIZE 8
+#endif
+
+//! Endpoint number used by HID generic interface
+#define UDI_HID_GENERIC_EP_OUT (2 | USB_EP_DIR_OUT)
+#define UDI_HID_GENERIC_EP_IN (1 | USB_EP_DIR_IN)
+
+//! Interface number
+#define UDI_HID_GENERIC_IFACE_NUMBER 0
+
+
+/**
+ * \name UDD Configuration
+ */
+//@{
+//! 2 endpoints used by HID generic standard interface
+#define USB_DEVICE_MAX_EP 2
+//@}
+
+//@}
+
+#ifdef __cplusplus
+}
+#endif
+
+#include "udi_hid_generic.h"
+
+#endif // _UDI_HID_GENERIC_CONF_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/udi_hid_generic_desc.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/udi_hid_generic_desc.c
new file mode 100644
index 0000000..65352e6
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/generic/udi_hid_generic_desc.c
@@ -0,0 +1,158 @@
+/**
+ * \file
+ *
+ * \brief Default descriptors for a USB Device
+ * with a single interface HID generic
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "conf_usb.h"
+#include "udd.h"
+#include "udc_desc.h"
+#include "udi_hid.h"
+#include "udi_hid_generic.h"
+
+/**
+ * \ingroup udi_hid_generic_group
+ * \defgroup udi_hid_generic_group_desc Default descriptors for a USB Device
+ * with a single interface HID generic
+ *
+ * @{
+ */
+
+//! Only one interface for this device
+#define USB_DEVICE_NB_INTERFACE 1
+
+/**INDENT-OFF**/
+//! USB Device Descriptor
+COMPILER_WORD_ALIGNED
+UDC_DESC_STORAGE usb_dev_desc_t udc_device_desc = {
+ .bLength = sizeof(usb_dev_desc_t),
+ .bDescriptorType = USB_DT_DEVICE,
+ .bcdUSB = LE16(USB_V2_0),
+ .bDeviceClass = 0,
+ .bDeviceSubClass = 0,
+ .bDeviceProtocol = 0,
+ .bMaxPacketSize0 = USB_DEVICE_EP_CTRL_SIZE,
+ .idVendor = LE16(USB_DEVICE_VENDOR_ID),
+ .idProduct = LE16(USB_DEVICE_PRODUCT_ID),
+ .bcdDevice = LE16((USB_DEVICE_MAJOR_VERSION << 8)
+ | USB_DEVICE_MINOR_VERSION),
+#ifdef USB_DEVICE_MANUFACTURE_NAME
+ .iManufacturer = 1,
+#else
+ .iManufacturer = 0, // No manufacture string
+#endif
+#ifdef USB_DEVICE_PRODUCT_NAME
+ .iProduct = 2,
+#else
+ .iProduct = 0, // No product string
+#endif
+#ifdef USB_DEVICE_SERIAL_NAME
+ .iSerialNumber = 3,
+#else
+ .iSerialNumber = 0, // No serial string
+#endif
+ .bNumConfigurations = 1
+};
+
+
+#ifdef USB_DEVICE_HS_SUPPORT
+//! USB Device Qualifier Descriptor for HS
+COMPILER_WORD_ALIGNED
+UDC_DESC_STORAGE usb_dev_qual_desc_t udc_device_qual = {
+ .bLength = sizeof(usb_dev_qual_desc_t),
+ .bDescriptorType = USB_DT_DEVICE_QUALIFIER,
+ .bcdUSB = LE16(USB_V2_0),
+ .bDeviceClass = 0,
+ .bDeviceSubClass = 0,
+ .bDeviceProtocol = 0,
+ .bMaxPacketSize0 = USB_DEVICE_EP_CTRL_SIZE,
+ .bNumConfigurations = 1
+};
+#endif
+
+//! Structure for USB Device Configuration Descriptor
+COMPILER_PACK_SET(1);
+typedef struct {
+ usb_conf_desc_t conf;
+ udi_hid_generic_desc_t hid_generic;
+} udc_desc_t;
+COMPILER_PACK_RESET();
+
+//! USB Device Configuration Descriptor filled for FS and HS
+COMPILER_WORD_ALIGNED
+UDC_DESC_STORAGE udc_desc_t udc_desc = {
+ .conf.bLength = sizeof(usb_conf_desc_t),
+ .conf.bDescriptorType = USB_DT_CONFIGURATION,
+ .conf.wTotalLength = LE16(sizeof(udc_desc_t)),
+ .conf.bNumInterfaces = USB_DEVICE_NB_INTERFACE,
+ .conf.bConfigurationValue = 1,
+ .conf.iConfiguration = 0,
+ .conf.bmAttributes = USB_CONFIG_ATTR_MUST_SET | USB_DEVICE_ATTR,
+ .conf.bMaxPower = USB_CONFIG_MAX_POWER(USB_DEVICE_POWER),
+ .hid_generic = UDI_HID_GENERIC_DESC,
+};
+
+
+/**
+ * \name UDC structures which contain all USB Device definitions
+ */
+//@{
+
+//! Associate an UDI for each USB interface
+UDC_DESC_STORAGE udi_api_t *udi_apis[USB_DEVICE_NB_INTERFACE] = {
+ &udi_api_hid_generic,
+};
+
+//! Add UDI with USB Descriptors FS & HS
+UDC_DESC_STORAGE udc_config_speed_t udc_config_fshs[1] = { {
+ .desc = (usb_conf_desc_t UDC_DESC_STORAGE*)&udc_desc,
+ .udi_apis = udi_apis,
+}};
+
+//! Add all information about USB Device in global structure for UDC
+UDC_DESC_STORAGE udc_config_t udc_config = {
+ .confdev_lsfs = &udc_device_desc,
+ .conf_lsfs = udc_config_fshs,
+#ifdef USB_DEVICE_HS_SUPPORT
+ .confdev_hs = &udc_device_desc,
+ .qualifier = &udc_device_qual,
+ .conf_hs = udc_config_fshs,
+#endif
+};
+
+//@}
+/**INDENT-ON**/
+//@}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/at32uc3b0256_evk1101/conf_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/at32uc3b0256_evk1101/conf_board.h
new file mode 100644
index 0000000..6825b7b
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/at32uc3b0256_evk1101/conf_board.h
@@ -0,0 +1,41 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Board configuration for spi example
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H_INCLUDED
+#define CONF_BOARD_H_INCLUDED
+
+#endif /* CONF_BOARD_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/at32uc3b0256_evk1101/conf_clock.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/at32uc3b0256_evk1101/conf_clock.h
new file mode 100644
index 0000000..b75541d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/at32uc3b0256_evk1101/conf_clock.h
@@ -0,0 +1,75 @@
+/**
+ * \file
+ *
+ * \brief Chip-specific system clock manager configuration
+ *
+ * Copyright (C) 2011 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_CLOCK_H_INCLUDED
+#define CONF_CLOCK_H_INCLUDED
+
+// ===== System Clock Source Options
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_RCSYS
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_OSC0
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL0
+
+// ===== PLL0 Options
+#define CONFIG_PLL0_SOURCE PLL_SRC_OSC0
+//#define CONFIG_PLL0_SOURCE PLL_SRC_OSC1
+#define CONFIG_PLL0_MUL 8 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+#define CONFIG_PLL0_DIV 2 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+
+// ===== PLL1 Options
+//#define CONFIG_PLL1_SOURCE PLL_SRC_OSC0
+//#define CONFIG_PLL1_SOURCE PLL_SRC_OSC1
+//#define CONFIG_PLL1_MUL 8 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+//#define CONFIG_PLL1_DIV 2 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+
+// ===== System Clock Bus Division Options
+//#define CONFIG_SYSCLK_CPU_DIV 0 /* Fcpu = Fsys/(2 ^ CPU_div) */
+//#define CONFIG_SYSCLK_PBA_DIV 0 /* Fpba = Fsys/(2 ^ PBA_div) */
+//#define CONFIG_SYSCLK_PBB_DIV 0 /* Fpbb = Fsys/(2 ^ PBB_div) */
+
+// ===== Peripheral Clock Management Options
+//#define CONFIG_SYSCLK_INIT_CPUMASK ((1 << SYSCLK_SYSTIMER) | (1 << SYSCLK_OCD))
+//#define CONFIG_SYSCLK_INIT_PBAMASK (1 << SYSCLK_USART0)
+//#define CONFIG_SYSCLK_INIT_PBBMASK (1 << SYSCLK_HMATRIX)
+//#define CONFIG_SYSCLK_INIT_HSBMASK (1 << SYSCLK_MDMA_HSB)
+
+// ===== USB Clock Source Options
+//#define CONFIG_USBCLK_SOURCE USBCLK_SRC_OSC0
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL0
+//#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL1
+#define CONFIG_USBCLK_DIV 1 /* Fusb = Fsys/(2 ^ USB_div) */
+
+#endif /* CONF_CLOCK_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/at32uc3b0256_evk1101/conf_sleepmgr.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/at32uc3b0256_evk1101/conf_sleepmgr.h
new file mode 100644
index 0000000..699010d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/at32uc3b0256_evk1101/conf_sleepmgr.h
@@ -0,0 +1,43 @@
+/**
+ * \file
+ *
+ * \brief Sleep manager configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SLEEPMGR_H
+#define CONF_SLEEPMGR_H
+
+#define CONFIG_SLEEPMGR_ENABLE
+
+#endif /* CONF_SLEEPMGR_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/at32uc3b0256_evk1101/ui.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/at32uc3b0256_evk1101/ui.c
new file mode 100644
index 0000000..0c854b7
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/at32uc3b0256_evk1101/ui.c
@@ -0,0 +1,213 @@
+/**
+ * \file
+ *
+ * \brief User Interface
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "udi_hid_kbd.h"
+#include "board.h"
+#include "led.h"
+#include "ui.h"
+#include "gpio.h"
+
+static struct{
+bool b_modifier;
+bool b_down;
+uint8_t u8_value;
+} ui_sequence[] = {
+ // Display windows menu
+ {true,true,HID_MODIFIER_LEFT_UI},
+ {true,false,HID_MODIFIER_LEFT_UI},
+ // Launch Windows Command line
+ {false,true,HID_R},
+ {false,false,HID_R},
+ // Tape sequence "notepad" + return
+ {false,true,HID_N},
+ {false,false,HID_N},
+ {false,true,HID_O},
+ {false,false,HID_O},
+ {false,true,HID_T},
+ {false,false,HID_T},
+ {false,true,HID_E},
+ {false,false,HID_E},
+ {false,true,HID_P},
+ {false,false,HID_P},
+ {false,true,HID_A},
+ {false,false,HID_A},
+ {false,true,HID_D},
+ {false,false,HID_D},
+ {false,true,HID_ENTER},
+ {false,false,HID_ENTER},
+ // Display "Atmel "
+ {true,true,HID_MODIFIER_RIGHT_SHIFT}, // Enable Maj
+ {false,true,HID_A},
+ {false,false,HID_A},
+ {true,false,HID_MODIFIER_RIGHT_SHIFT}, // Disable Maj
+ {false,true,HID_T},
+ {false,false,HID_T},
+ {false,true,HID_M},
+ {false,false,HID_M},
+ {false,true,HID_E},
+ {false,false,HID_E},
+ {false,true,HID_L},
+ {false,false,HID_L},
+ {false,true,HID_SPACEBAR},
+ {false,false,HID_SPACEBAR},
+ // Display "AVR "
+ {false,true,HID_CAPS_LOCK}, // Enable caps lock
+ {false,false,HID_CAPS_LOCK},
+ {false,true,HID_A},
+ {false,false,HID_A},
+ {false,true,HID_V},
+ {false,false,HID_V},
+ {false,true,HID_R},
+ {false,false,HID_R},
+ {false,true,HID_CAPS_LOCK}, // Disable caps lock
+ {false,false,HID_CAPS_LOCK},
+};
+
+void ui_init(void)
+{
+ LED_On(LED0_GPIO);
+ LED_Off(LED1_GPIO);
+}
+
+void ui_powerdown(void)
+{
+ LED_Off(LED0_GPIO);
+ LED_Off(LED1_GPIO);
+}
+
+void ui_wakeup_enable(void)
+{
+}
+
+void ui_wakeup_disable(void)
+{
+}
+
+void ui_wakeup(void)
+{
+ LED_On(LED0_GPIO);
+}
+
+void ui_process(uint16_t framenumber)
+{
+ bool b_btn_state, sucess;
+ static bool btn_last_state = false;
+ static bool sequence_running = false;
+ static uint8_t u8_sequence_pos = 0;
+ uint8_t u8_value;
+ static uint16_t cpt_sof = 0;
+
+ if ((framenumber % 1000) == 0) {
+ LED_On(LED1_GPIO);
+ }
+ if ((framenumber % 1000) == 500) {
+ LED_Off(LED1_GPIO);
+ }
+
+ // Scan process running each 2ms
+ cpt_sof++;
+ if ((cpt_sof%2)==0)
+ return;
+
+ // Scan buttons on switch 0 to send keys sequence
+ b_btn_state = (gpio_pin_is_low(GPIO_PUSH_BUTTON_0)) ? true : false;
+ if (b_btn_state != btn_last_state) {
+ btn_last_state = b_btn_state;
+ sequence_running = true;
+ }
+
+ // Sequence process running each 200ms
+ if (200 > cpt_sof)
+ return;
+ cpt_sof = 0;
+
+ if (sequence_running) {
+ // Send next key
+ u8_value = ui_sequence[u8_sequence_pos].u8_value;
+ if (ui_sequence[u8_sequence_pos].b_modifier) {
+ if (ui_sequence[u8_sequence_pos].b_down) {
+ sucess = udi_hid_kbd_modifier_down(u8_value);
+ }else{
+ sucess = udi_hid_kbd_modifier_up(u8_value);
+ }
+ }else{
+ if (ui_sequence[u8_sequence_pos].b_down) {
+ sucess = udi_hid_kbd_down(u8_value);
+ }else{
+ sucess = udi_hid_kbd_up(u8_value);
+ }
+ }
+ if (!sucess)
+ return; // Retry it on next schedule
+
+ // Valid sequence position
+ u8_sequence_pos++;
+ if (u8_sequence_pos>=sizeof(ui_sequence)/sizeof(ui_sequence[0])) {
+ u8_sequence_pos=0;
+ sequence_running=false;
+ }
+ }
+}
+
+void ui_kbd_led(uint8_t value)
+{
+ if (value & HID_LED_NUM_LOCK) {
+ LED_On(LED2_GPIO);
+ }else{
+ LED_Off(LED2_GPIO);
+ }
+ if (value & HID_LED_CAPS_LOCK) {
+ LED_On(LED3_GPIO);
+ }else{
+ LED_Off(LED3_GPIO);
+ }
+}
+
+/**
+ * \defgroup UI User Interface
+ *
+ * Human interface on EVK1100:
+ * - RED led close to USB connector is always on after firmware startup
+ * - Led 0 is on when USB line is in IDLE mode, and off in SUSPEND mode
+ * - Led 1 blinks when USB Host have checked and enabled HID Keyboard interface
+ * - The led 2 displays numeric lock status.
+ * - The led 3 displays caps lock status.
+ * - The switch 0 open a note pad and send key sequence "Atmel AVR USB Keyboard"
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/atxmega128a1u_xplain_a1_mkii/conf_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/atxmega128a1u_xplain_a1_mkii/conf_board.h
new file mode 100644
index 0000000..6825b7b
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/atxmega128a1u_xplain_a1_mkii/conf_board.h
@@ -0,0 +1,41 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Board configuration for spi example
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H_INCLUDED
+#define CONF_BOARD_H_INCLUDED
+
+#endif /* CONF_BOARD_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/atxmega128a1u_xplain_a1_mkii/conf_clock.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/atxmega128a1u_xplain_a1_mkii/conf_clock.h
new file mode 100644
index 0000000..844c93d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/atxmega128a1u_xplain_a1_mkii/conf_clock.h
@@ -0,0 +1,74 @@
+/**
+ * \file
+ *
+ * \brief Clock system configuration for clock example 1
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_CLOCK_H_INCLUDED
+#define CONF_CLOCK_H_INCLUDED
+
+//! Configuration using On-Chip RC oscillator at 48MHz
+//! The RC oscillator is calibrated via USB Start Of Frame
+//! Clk USB = 48MHz (used by USB)
+//! Clk sys = 48MHz
+//! Clk cpu/per = 12MHz
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_RCOSC
+#define CONFIG_OSC_RC32_CAL 48000000UL
+
+#define CONFIG_OSC_AUTOCAL OSC_ID_RC32MHZ
+#define CONFIG_OSC_AUTOCAL_REF_OSC OSC_ID_USBSOF
+
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_RC32MHZ
+#define CONFIG_SYSCLK_PSADIV SYSCLK_PSADIV_2
+#define CONFIG_SYSCLK_PSBCDIV SYSCLK_PSBCDIV_1_2
+
+/*
+//! Use external board OSC (8MHz)
+//! Clk pll = 48MHz (used by USB)
+//! Clk sys = 48MHz
+//! Clk cpu/per = 12MHz
+
+#define CONFIG_PLL0_SOURCE PLL_SRC_XOSC
+#define CONFIG_PLL0_MUL 6
+#define CONFIG_PLL0_DIV 1
+
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL
+
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL
+#define CONFIG_SYSCLK_PSADIV SYSCLK_PSADIV_2
+#define CONFIG_SYSCLK_PSBCDIV SYSCLK_PSBCDIV_1_2
+*/
+
+
+#endif /* CONF_CLOCK_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/atxmega128a1u_xplain_a1_mkii/conf_sleepmgr.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/atxmega128a1u_xplain_a1_mkii/conf_sleepmgr.h
new file mode 100644
index 0000000..699010d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/atxmega128a1u_xplain_a1_mkii/conf_sleepmgr.h
@@ -0,0 +1,43 @@
+/**
+ * \file
+ *
+ * \brief Sleep manager configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SLEEPMGR_H
+#define CONF_SLEEPMGR_H
+
+#define CONFIG_SLEEPMGR_ENABLE
+
+#endif /* CONF_SLEEPMGR_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/atxmega128a1u_xplain_a1_mkii/ui.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/atxmega128a1u_xplain_a1_mkii/ui.c
new file mode 100644
index 0000000..af4393f
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/atxmega128a1u_xplain_a1_mkii/ui.c
@@ -0,0 +1,254 @@
+/**
+ * \file
+ *
+ * \brief User Interface
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "udc.h"
+#include "udi_hid_kbd.h"
+#include "board.h"
+#include "led.h"
+#include "ui.h"
+
+static struct{
+bool b_modifier;
+bool b_down;
+uint8_t u8_value;
+} ui_sequence[] = {
+ // Display windows menu
+ {true,true,HID_MODIFIER_LEFT_UI},
+ // Launch Windows Command line
+ {false,true,HID_R},
+ {false,false,HID_R},
+ // Clear modifier
+ {true,false,HID_MODIFIER_LEFT_UI},
+ // Tape sequence "notepad" + return
+ {false,true,HID_N},
+ {false,false,HID_N},
+ {false,true,HID_O},
+ {false,false,HID_O},
+ {false,true,HID_T},
+ {false,false,HID_T},
+ {false,true,HID_E},
+ {false,false,HID_E},
+ {false,true,HID_P},
+ {false,false,HID_P},
+ {false,true,HID_A},
+ {false,false,HID_A},
+ {false,true,HID_D},
+ {false,false,HID_D},
+ {false,true,HID_ENTER},
+ {false,false,HID_ENTER},
+ // Display "Atmel "
+ {true,true,HID_MODIFIER_RIGHT_SHIFT}, // Enable Maj
+ {false,true,HID_A},
+ {false,false,HID_A},
+ {true,false,HID_MODIFIER_RIGHT_SHIFT}, // Disable Maj
+ {false,true,HID_T},
+ {false,false,HID_T},
+ {false,true,HID_M},
+ {false,false,HID_M},
+ {false,true,HID_E},
+ {false,false,HID_E},
+ {false,true,HID_L},
+ {false,false,HID_L},
+ {false,true,HID_SPACEBAR},
+ {false,false,HID_SPACEBAR},
+ // Display "AVR "
+ {false,true,HID_CAPS_LOCK}, // Enable caps lock
+ {false,false,HID_CAPS_LOCK},
+ {false,true,HID_A},
+ {false,false,HID_A},
+ {false,true,HID_V},
+ {false,false,HID_V},
+ {false,true,HID_R},
+ {false,false,HID_R},
+ {false,true,HID_CAPS_LOCK}, // Disable caps lock
+ {false,false,HID_CAPS_LOCK},
+};
+
+
+void ui_init(void)
+{
+ LED_On(LEDUSB_GPIO);
+ LED_On(LED0_GPIO);
+ LED_Off(LED1_GPIO);
+}
+
+void ui_powerdown(void)
+{
+ LED_Off(LED0_GPIO);
+ LED_Off(LED1_GPIO);
+}
+
+void ui_wakeup_enable(void)
+{
+ PORT_t *port;
+ // Configure pin change interrupt for asynch. wake-up on button pin.
+ ioport_configure_pin(GPIO_PUSH_BUTTON_0,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ ioport_configure_pin(GPIO_PUSH_BUTTON_1,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ ioport_configure_pin(GPIO_PUSH_BUTTON_2,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ ioport_configure_pin(GPIO_PUSH_BUTTON_3,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ ioport_configure_pin(GPIO_PUSH_BUTTON_4,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ ioport_configure_pin(GPIO_PUSH_BUTTON_5,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ ioport_configure_pin(GPIO_PUSH_BUTTON_6,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ ioport_configure_pin(GPIO_PUSH_BUTTON_7,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ port = ioport_pin_to_port(GPIO_PUSH_BUTTON_0);
+ port->INT0MASK = 0xFF;
+ port->INTCTRL = PORT_INT0LVL_LO_gc;
+}
+
+void ui_wakeup_disable(void)
+{
+ PORT_t *port;
+ port = ioport_pin_to_port(GPIO_PUSH_BUTTON_0);
+ port->INT0MASK = 0x00;
+}
+
+// Interrupt on "pin change" from switch to do wakeup on USB
+// Note:
+// This interrupt is enable when the USB host enable remotewakeup feature
+// This interrupt wakeup the CPU if this one is in idle mode
+ISR(PORTF_INT0_vect)
+{
+ PORT_t *port;
+ port = ioport_pin_to_port(GPIO_PUSH_BUTTON_0);
+ port->INTFLAGS = 0x01; // Ack interrupt
+ // It is a wakeup then send wakeup USB
+ udc_wakeup();
+}
+
+void ui_wakeup(void)
+{
+ LED_On(LED0_GPIO);
+}
+
+void ui_process(uint16_t framenumber)
+{
+ bool b_btn_state, sucess;
+ static bool btn_last_state = false;
+ static bool sequence_running = false;
+ static uint8_t u8_sequence_pos = 0;
+ uint8_t u8_value;
+ static uint16_t cpt_sof = 0;
+
+ if ((framenumber % 1000) == 0) {
+ LED_On(LED1_GPIO);
+ }
+ if ((framenumber % 1000) == 500) {
+ LED_Off(LED1_GPIO);
+ }
+ // Scan process running each 2ms
+ cpt_sof++;
+ if ((cpt_sof%2)==0)
+ return;
+
+ // Scan buttons on switch 0 to send keys sequence
+ b_btn_state = (gpio_pin_is_low(GPIO_PUSH_BUTTON_0)) ? true : false;
+ if (b_btn_state != btn_last_state) {
+ btn_last_state = b_btn_state;
+ sequence_running = true;
+ }
+
+ // Sequence process running each 200ms
+ if (200 > cpt_sof)
+ return;
+ cpt_sof = 0;
+
+ if (sequence_running) {
+ // Send next key
+ u8_value = ui_sequence[u8_sequence_pos].u8_value;
+ if (ui_sequence[u8_sequence_pos].b_modifier) {
+ if (ui_sequence[u8_sequence_pos].b_down) {
+ sucess = udi_hid_kbd_modifier_down(u8_value);
+ }else{
+ sucess = udi_hid_kbd_modifier_up(u8_value);
+ }
+ }else{
+ if (ui_sequence[u8_sequence_pos].b_down) {
+ sucess = udi_hid_kbd_down(u8_value);
+ }else{
+ sucess = udi_hid_kbd_up(u8_value);
+ }
+ }
+ if (!sucess)
+ return; // Retry it on next schedule
+
+ // Valid sequence position
+ u8_sequence_pos++;
+ if (u8_sequence_pos>=sizeof(ui_sequence)/sizeof(ui_sequence[0])) {
+ u8_sequence_pos=0;
+ sequence_running=false;
+ }
+ }
+
+}
+
+void ui_kbd_led(uint8_t value)
+{
+ if (value&HID_LED_NUM_LOCK) {
+ LED_On(LED2_GPIO);
+ }else{
+ LED_Off(LED2_GPIO);
+ }
+ if (value&HID_LED_CAPS_LOCK) {
+ LED_On(LED3_GPIO);
+ }else{
+ LED_Off(LED3_GPIO);
+ }
+}
+
+/**
+ * \defgroup UI User Interface
+ *
+ * Human interface on Xplain-A1:
+ * - RED led close to USB connector is always on after firmware startup
+ * - Led 0 is on when USB line is in IDLE mode, and off in SUSPEND mode
+ * - Led 1 blinks when USB Host have checked and enabled HID Keyboard interface
+ * - The led 2 displays numeric lock status.
+ * - The led 3 displays caps lock status.
+ * - The switch 0 open a note pad and send key sequence "Atmel AVR USB Keyboard"
+ * - All switches can be used to wakeup USB Host in remote wakeup mode.
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/atxmega128b1_xmega_b1_xplained/conf_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/atxmega128b1_xmega_b1_xplained/conf_board.h
new file mode 100644
index 0000000..6825b7b
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/atxmega128b1_xmega_b1_xplained/conf_board.h
@@ -0,0 +1,41 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Board configuration for spi example
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H_INCLUDED
+#define CONF_BOARD_H_INCLUDED
+
+#endif /* CONF_BOARD_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/atxmega128b1_xmega_b1_xplained/conf_clock.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/atxmega128b1_xmega_b1_xplained/conf_clock.h
new file mode 100644
index 0000000..c55d8a8
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/atxmega128b1_xmega_b1_xplained/conf_clock.h
@@ -0,0 +1,74 @@
+/**
+ * \file
+ *
+ * \brief Clock system configuration for clock example 1
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_CLOCK_H_INCLUDED
+#define CONF_CLOCK_H_INCLUDED
+
+
+//! Configuration using On-Chip RC oscillator
+//! Use external board OSC (8MHz)
+//! Clk USB = 48MHz (used by USB)
+//! Clk sys = 48MHz
+//! Clk cpu/per = 12MHz
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_RCOSC
+#define CONFIG_OSC_RC32_CAL 48000000UL
+
+#define CONFIG_OSC_AUTOCAL OSC_ID_RC32MHZ
+#define CONFIG_OSC_AUTOCAL_REF_OSC OSC_ID_USBSOF
+
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_RC32MHZ
+#define CONFIG_SYSCLK_PSADIV SYSCLK_PSADIV_2
+#define CONFIG_SYSCLK_PSBCDIV SYSCLK_PSBCDIV_1_2
+
+/*
+//! Use external board OSC (8MHz)
+//! Clk pll = 48MHz (used by USB)
+//! Clk sys = 48MHz
+//! Clk cpu/per = 12MHz
+
+#define CONFIG_PLL0_SOURCE PLL_SRC_XOSC
+#define CONFIG_PLL0_MUL 6
+#define CONFIG_PLL0_DIV 1
+
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL
+
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL
+#define CONFIG_SYSCLK_PSADIV SYSCLK_PSADIV_2
+#define CONFIG_SYSCLK_PSBCDIV SYSCLK_PSBCDIV_1_2
+*/
+
+#endif /* CONF_CLOCK_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/atxmega128b1_xmega_b1_xplained/conf_sleepmgr.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/atxmega128b1_xmega_b1_xplained/conf_sleepmgr.h
new file mode 100644
index 0000000..699010d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/atxmega128b1_xmega_b1_xplained/conf_sleepmgr.h
@@ -0,0 +1,43 @@
+/**
+ * \file
+ *
+ * \brief Sleep manager configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SLEEPMGR_H
+#define CONF_SLEEPMGR_H
+
+#define CONFIG_SLEEPMGR_ENABLE
+
+#endif /* CONF_SLEEPMGR_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/atxmega128b1_xmega_b1_xplained/ui.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/atxmega128b1_xmega_b1_xplained/ui.c
new file mode 100644
index 0000000..c85797d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/atxmega128b1_xmega_b1_xplained/ui.c
@@ -0,0 +1,243 @@
+/**
+ * \file
+ *
+ * \brief User Interface
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "udc.h"
+#include "udi_hid_kbd.h"
+#include "board.h"
+#include "led.h"
+#include "ui.h"
+
+static struct{
+bool b_modifier;
+bool b_down;
+uint8_t u8_value;
+} ui_sequence[] = {
+ // Display windows menu
+ {true,true,HID_MODIFIER_LEFT_UI},
+ // Launch Windows Command line
+ {false,true,HID_R},
+ {false,false,HID_R},
+ // Clear modifier
+ {true,false,HID_MODIFIER_LEFT_UI},
+ // Tape sequence "notepad" + return
+ {false,true,HID_N},
+ {false,false,HID_N},
+ {false,true,HID_O},
+ {false,false,HID_O},
+ {false,true,HID_T},
+ {false,false,HID_T},
+ {false,true,HID_E},
+ {false,false,HID_E},
+ {false,true,HID_P},
+ {false,false,HID_P},
+ {false,true,HID_A},
+ {false,false,HID_A},
+ {false,true,HID_D},
+ {false,false,HID_D},
+ {false,true,HID_ENTER},
+ {false,false,HID_ENTER},
+ // Display "Atmel "
+ {true,true,HID_MODIFIER_RIGHT_SHIFT}, // Enable Maj
+ {false,true,HID_A},
+ {false,false,HID_A},
+ {true,false,HID_MODIFIER_RIGHT_SHIFT}, // Disable Maj
+ {false,true,HID_T},
+ {false,false,HID_T},
+ {false,true,HID_M},
+ {false,false,HID_M},
+ {false,true,HID_E},
+ {false,false,HID_E},
+ {false,true,HID_L},
+ {false,false,HID_L},
+ {false,true,HID_SPACEBAR},
+ {false,false,HID_SPACEBAR},
+ // Display "AVR "
+ {false,true,HID_CAPS_LOCK}, // Enable caps lock
+ {false,false,HID_CAPS_LOCK},
+ {false,true,HID_A},
+ {false,false,HID_A},
+ {false,true,HID_V},
+ {false,false,HID_V},
+ {false,true,HID_R},
+ {false,false,HID_R},
+ {false,true,HID_CAPS_LOCK}, // Disable caps lock
+ {false,false,HID_CAPS_LOCK},
+};
+
+void ui_init(void)
+{
+ LED_On(LED0_GPIO);
+ LED_Off(LED1_GPIO);
+}
+
+void ui_powerdown(void)
+{
+ LED_Off(LED0_GPIO);
+ LED_Off(LED1_GPIO);
+}
+
+void ui_wakeup_enable(void)
+{
+ PORT_t *port;
+ // Configure pin change interrupt for asynch. wake-up on button pin.
+ ioport_configure_pin(GPIO_PUSH_BUTTON_0,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ ioport_configure_pin(GPIO_PUSH_BUTTON_1,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ ioport_configure_pin(GPIO_PUSH_BUTTON_2,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ ioport_configure_pin(GPIO_PUSH_BUTTON_3,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ port = ioport_pin_to_port(GPIO_PUSH_BUTTON_0);
+ port->INT0MASK = 0xFF;
+ port->INTCTRL = PORT_INT0LVL_LO_gc;
+}
+
+void ui_wakeup_disable(void)
+{
+ PORT_t *port;
+ port = ioport_pin_to_port(GPIO_PUSH_BUTTON_0);
+ port->INT0MASK = 0x00;
+}
+
+// Interrupt on "pin change" from switch to do wakeup on USB
+// Note:
+// This interrupt is enable when the USB host enable remotewakeup feature
+// This interrupt wakeup the CPU if this one is in idle mode
+ISR(PORTB_INT0_vect)
+{
+ PORT_t *port;
+ port = ioport_pin_to_port(GPIO_PUSH_BUTTON_0);
+ port->INTFLAGS = 0x01; // Ack interrupt
+ // It is a wakeup then send wakeup USB
+ udc_wakeup();
+}
+
+void ui_wakeup(void)
+{
+ LED_On(LED0_GPIO);
+}
+
+void ui_process(uint16_t framenumber)
+{
+ bool b_btn_state, sucess;
+ static bool btn_last_state = false;
+ static bool sequence_running = false;
+ static uint8_t u8_sequence_pos = 0;
+ uint8_t u8_value;
+ static uint16_t cpt_sof = 0;
+
+ if ((framenumber % 1000) == 0) {
+ LED_On(LED1_GPIO);
+ }
+ if ((framenumber % 1000) == 500) {
+ LED_Off(LED1_GPIO);
+ }
+ // Scan process running each 2ms
+ cpt_sof++;
+ if ((cpt_sof%2)==0)
+ return;
+
+ // Scan buttons on switch 0 to send keys sequence
+ b_btn_state = (gpio_pin_is_low(GPIO_PUSH_BUTTON_0)) ? true : false;
+ if (b_btn_state != btn_last_state) {
+ btn_last_state = b_btn_state;
+ sequence_running = true;
+ }
+
+ // Sequence process running each 200ms
+ if (200 > cpt_sof)
+ return;
+ cpt_sof = 0;
+
+ if (sequence_running) {
+ // Send next key
+ u8_value = ui_sequence[u8_sequence_pos].u8_value;
+ if (ui_sequence[u8_sequence_pos].b_modifier) {
+ if (ui_sequence[u8_sequence_pos].b_down) {
+ sucess = udi_hid_kbd_modifier_down(u8_value);
+ }else{
+ sucess = udi_hid_kbd_modifier_up(u8_value);
+ }
+ }else{
+ if (ui_sequence[u8_sequence_pos].b_down) {
+ sucess = udi_hid_kbd_down(u8_value);
+ }else{
+ sucess = udi_hid_kbd_up(u8_value);
+ }
+ }
+ if (!sucess)
+ return; // Retry it on next schedule
+
+ // Valid sequence position
+ u8_sequence_pos++;
+ if (u8_sequence_pos>=sizeof(ui_sequence)/sizeof(ui_sequence[0])) {
+ u8_sequence_pos=0;
+ sequence_running=false;
+ }
+ }
+}
+
+void ui_kbd_led(uint8_t value)
+{
+ if (value&HID_LED_NUM_LOCK) {
+ LED_On(LED2_GPIO);
+ }else{
+ LED_Off(LED2_GPIO);
+ }
+ if (value&HID_LED_CAPS_LOCK) {
+ LED_On(LED3_GPIO);
+ }else{
+ LED_Off(LED3_GPIO);
+ }
+}
+
+/**
+ * \defgroup UI User Interface
+ *
+ * Human interface on XMEGA-B1 Xplain:
+ * - RED led close to USB connector is always on after firmware startup
+ * - Led 0 is on when USB line is in IDLE mode, and off in SUSPEND mode
+ * - Led 1 blinks when USB Host have checked and enabled HID Keyboard interface
+ * - The led 2 displays numeric lock status.
+ * - The led 3 displays caps lock status.
+ * - The switch 0 open a note pad and send key sequence "Atmel AVR USB Keyboard"
+ * - All switches can be used to wakeup USB Host in remote wakeup mode.
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/conf_usb.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/conf_usb.h
new file mode 100644
index 0000000..290e788
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/conf_usb.h
@@ -0,0 +1,125 @@
+/**
+ * \file
+ *
+ * \brief USB configuration file
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _CONF_USB_H_
+#define _CONF_USB_H_
+
+#include "compiler.h"
+
+/**
+ * USB Device Configuration
+ * @{
+ */
+
+//! Device definition (mandatory)
+#define USB_DEVICE_VENDOR_ID USB_VID_ATMEL
+#define USB_DEVICE_PRODUCT_ID USB_PID_ATMEL_AVR_HIDKEYBOARD
+#define USB_DEVICE_MAJOR_VERSION 1
+#define USB_DEVICE_MINOR_VERSION 0
+#define USB_DEVICE_POWER 100 // Consumption on Vbus line (mA)
+#define USB_DEVICE_ATTR \
+ (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_SELF_POWERED)
+// (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_BUS_POWERED)
+// (USB_CONFIG_ATTR_SELF_POWERED)
+// (USB_CONFIG_ATTR_BUS_POWERED)
+
+//! USB Device string definitions (Optional)
+#define USB_DEVICE_MANUFACTURE_NAME "ATMEL AVR"
+#define USB_DEVICE_PRODUCT_NAME "HID Keyboard"
+// #define USB_DEVICE_SERIAL_NAME "12...EF"
+
+/**
+ * Device speeds support
+ * @{
+ */
+//! To define a Low speed device
+//#define USB_DEVICE_LOW_SPEED
+
+//! To authorize the High speed
+#if (UC3A3||UC3A4)
+//#define USB_DEVICE_HS_SUPPORT
+#endif
+//@}
+
+/**
+ * USB Device Callbacks definitions (Optional)
+ * @{
+ */
+#define UDC_VBUS_EVENT(b_vbus_high) main_vbus_action(b_vbus_high)
+#define UDC_SOF_EVENT() main_sof_action()
+#define UDC_SUSPEND_EVENT() main_suspend_action()
+#define UDC_RESUME_EVENT() main_resume_action()
+//! Mandatory when USB_DEVICE_ATTR authorizes remote wakeup feature
+#define UDC_REMOTEWAKEUP_ENABLE() main_remotewakeup_enable()
+#define UDC_REMOTEWAKEUP_DISABLE() main_remotewakeup_disable()
+//! When a extra string descriptor must be supported
+//! other than manufacturer, product and serial string
+// #define UDC_GET_EXTRA_STRING()
+//@}
+
+//@}
+
+
+/**
+ * USB Interface Configuration
+ * @{
+ */
+/**
+ * Configuration of HID Keyboard interface
+ * @{
+ */
+//! Interface callback definition
+#define UDI_HID_KBD_ENABLE_EXT() main_kbd_enable()
+#define UDI_HID_KBD_DISABLE_EXT() main_kbd_disable()
+#define UDI_HID_KBD_CHANGE_LED(value) ui_kbd_led(value)
+//@}
+//@}
+
+
+/**
+ * USB Device Driver Configuration
+ * @{
+ */
+//@}
+
+//! The includes of classes and other headers must be done at the end of this file to avoid compile error
+#include "udi_hid_kbd_conf.h"
+#include "main.h"
+#include "ui.h"
+
+#endif // _CONF_USB_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/main.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/main.c
new file mode 100644
index 0000000..b990b7b
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/main.c
@@ -0,0 +1,185 @@
+/**
+ * \file
+ *
+ * \brief Main functions for Keyboard example
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "preprocessor.h"
+#include "board.h"
+#include "gpio.h"
+#include "sysclk.h"
+#include "sleepmgr.h"
+#include "conf_usb.h"
+#include "udc.h"
+#include "udd.h"
+#include "ui.h"
+
+static bool main_b_kbd_enable = false;
+
+
+/*! \brief Main function. Execution starts here.
+ */
+int main(void)
+{
+ irq_initialize_vectors();
+ cpu_irq_enable();
+
+ // Initialize the sleep manager
+ sleepmgr_init();
+
+ sysclk_init();
+ board_init();
+ ui_init();
+ ui_powerdown();
+
+ // Start USB stack to authorize VBus monitoring
+ udc_start();
+
+ if (!udc_include_vbus_monitoring()) {
+ // VBUS monitoring is not available on this product
+ // thereby VBUS has to be considered as present
+ main_vbus_action(true);
+ }
+
+ // The main loop manages only the power mode
+ // because the USB management is done by interrupt
+ while (true) {
+
+ sleepmgr_enter_sleep();
+
+#ifdef USB_DEVICE_LOW_SPEED
+ // No USB "Keep a live" interrupt available in low speed
+ // to scan keyboard interface then use main loop
+ if (main_b_kbd_enable) {
+ static uint16_t virtual_sof_sub = 0;
+ static uint16_t virtual_sof = 0;
+ if (700 == virtual_sof_sub++) {
+ virtual_sof_sub = 0;
+ ui_process(virtual_sof++);
+ }
+ }
+#endif
+ }
+}
+
+void main_vbus_action(bool b_high)
+{
+ if (b_high) {
+ // Attach USB Device
+ udc_attach();
+ } else {
+ // VBUS not present
+ udc_detach();
+ }
+}
+
+void main_suspend_action(void)
+{
+ ui_powerdown();
+}
+
+void main_resume_action(void)
+{
+ ui_wakeup();
+}
+
+void main_sof_action(void)
+{
+ if (!main_b_kbd_enable)
+ return;
+ ui_process(udd_get_frame_number());
+}
+
+void main_remotewakeup_enable(void)
+{
+ ui_wakeup_enable();
+}
+
+void main_remotewakeup_disable(void)
+{
+ ui_wakeup_disable();
+}
+
+bool main_kbd_enable(void)
+{
+ main_b_kbd_enable = true;
+ return true;
+}
+
+void main_kbd_disable(void)
+{
+ main_b_kbd_enable = false;
+}
+
+
+/**
+ * \mainpage ASF USB Device HID Keyboard
+ *
+ * \section intro Introduction
+ * This example shows how to implement a USB Device HID Keyboard
+ * on AVR products with USB module.
+ * The application note AVR4903 provides information about this implementation.
+ *
+ * \section startup Startup
+ * The example uses the buttons or sensors available on the board
+ * to simulate a standard keyboard.
+ * After loading firmware, connect hardware board (EVKxx,XPlain,...) to the USB Host.
+ * When connected to a USB host system this application provides a keyboard application
+ * in the Unix/Mac/Windows operating systems.
+ * This example uses the native HID driver for these operating systems.
+ *
+ * \copydoc UI
+ *
+ * \section example About example
+ *
+ * The example uses the following module groups:
+ * - Basic modules:
+ * Startup, board, clock, interrupt, power management
+ * - USB Device stack and HID modules:
+ * <br>services/usb/
+ * <br>services/usb/udc/
+ * <br>services/usb/class/hid/
+ * <br>services/usb/class/hid/keyboard/
+ * - Specific implementation:
+ * - main.c,
+ * <br>initializes clock
+ * <br>initializes interrupt
+ * <br>\subpage power_management
+ * <br>manages UI
+ * - specific implementation for each target "./examples/product_board/":
+ * - conf_foo.h configuration of each module
+ * - ui.c implement of user's interface (buttons, leds)
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/main.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/main.h
new file mode 100644
index 0000000..0ff6585
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/main.h
@@ -0,0 +1,86 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief Declaration of main function used by HID keyboard example
+ *
+ * - Compiler: IAR EWAVR and GNU GCC for AVR
+ * - Supported devices: All AVR devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#ifndef _MAIN_H_
+#define _MAIN_H_
+
+/*! \brief Called by HID interface
+ * Callback running when USB Host enable keyboard interface
+ *
+ * \retval true if keyboard startup is ok
+ */
+bool main_kbd_enable(void);
+
+/*! \brief Called by HID interface
+ * Callback running when USB Host disable keyboard interface
+ */
+void main_kbd_disable(void);
+
+/*! \brief Called when Vbus line state change
+ */
+void main_vbus_action(bool b_high);
+
+/*! \brief Called when a start of frame is received on USB line
+ */
+void main_sof_action(void);
+
+/*! \brief Called by UDD when a suspend is received
+ * Callback running when USB Host set USB line in suspend state
+ */
+void main_suspend_action(void);
+
+/*! \brief Called by UDD when the USB line exit of suspend state
+ */
+void main_resume_action(void);
+
+/*! \brief Called by UDC when USB Host request to enable remote wakeup
+ */
+void main_remotewakeup_enable(void);
+
+/*! \brief Called by UDC when USB Host request to disable remote wakeup
+ */
+void main_remotewakeup_disable(void);
+
+#endif // _MAIN_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/ui.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/ui.h
new file mode 100644
index 0000000..55a85aa
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/example/ui.h
@@ -0,0 +1,58 @@
+/**
+ * \file
+ *
+ * \brief Common User Interface for HID Keyboard application
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _UI_H_
+#define _UI_H_
+
+void ui_init(void);
+void ui_powerdown(void);
+
+void ui_wakeup_enable(void);
+void ui_wakeup_disable(void);
+void ui_wakeup(void);
+
+//! This process is called called each 1ms
+//! It is called only if HID Keyboard interface is enable.
+//! It is called by SOF interrupt.
+//!
+//!
+void ui_process(uint16_t framenumber);
+
+void ui_kbd_led(uint8_t value);
+
+#endif // _UI_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/module_config/conf_usb.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/module_config/conf_usb.h
new file mode 100644
index 0000000..2c30c79
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/module_config/conf_usb.h
@@ -0,0 +1,125 @@
+/**
+ * \file
+ *
+ * \brief USB configuration file
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _CONF_USB_H_
+#define _CONF_USB_H_
+
+#include "compiler.h"
+
+#warning You must refill the following definitions with a correct values
+
+/**
+ * USB Device Configuration
+ * @{
+ */
+
+//! Device definition (mandatory)
+#define USB_DEVICE_VENDOR_ID 0x0000
+#define USB_DEVICE_PRODUCT_ID 0x0000
+#define USB_DEVICE_MAJOR_VERSION 1
+#define USB_DEVICE_MINOR_VERSION 0
+#define USB_DEVICE_POWER 100 // Consumption on Vbus line (mA)
+#define USB_DEVICE_ATTR \
+ (USB_CONFIG_ATTR_SELF_POWERED)
+// (USB_CONFIG_ATTR_BUS_POWERED)
+// (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_SELF_POWERED)
+// (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_BUS_POWERED)
+
+//! USB Device string definitions (Optional)
+// #define USB_DEVICE_MANUFACTURE_NAME "Manufacture name"
+// #define USB_DEVICE_PRODUCT_NAME "Product name"
+// #define USB_DEVICE_SERIAL_NAME "12...EF"
+
+/**
+ * Device speeds support
+ * @{
+ */
+//! To define a Low speed device
+//#define USB_DEVICE_LOW_SPEED
+
+//! To authorize the High speed
+#if (UC3A3||UC3A4)
+//#define USB_DEVICE_HS_SUPPORT
+#endif
+//@}
+
+/**
+ * USB Device Callbacks definitions (Optional)
+ * @{
+ */
+// #define UDC_VBUS_EVENT(b_vbus_high) user_callback_vbus_action(b_vbus_high)
+// #define UDC_SOF_EVENT() user_callback_sof_action()
+// #define UDC_SUSPEND_EVENT() user_callback_suspend_action()
+// #define UDC_RESUME_EVENT() user_callback_resume_action()
+//! Mandatory when USB_DEVICE_ATTR authorizes remote wakeup feature
+// #define UDC_REMOTEWAKEUP_ENABLE() user_callback_remotewakeup_enable()
+// #define UDC_REMOTEWAKEUP_DISABLE() user_callback_remotewakeup_disable()
+//! When a extra string descriptor must be supported
+//! other than manufacturer, product and serial string
+// #define UDC_GET_EXTRA_STRING()
+//@}
+
+//@}
+
+
+/**
+ * USB Interface Configuration
+ * @{
+ */
+/**
+ * Configuration of HID Keyboard interface (if used)
+ * @{
+ */
+//! Interface callback definition
+#define UDI_HID_KBD_ENABLE_EXT() true
+#define UDI_HID_KBD_DISABLE_EXT()
+#define UDI_HID_KBD_CHANGE_LED(value)
+//@}
+//@}
+
+
+/**
+ * USB Device Driver Configuration
+ * @{
+ */
+//@}
+
+//! The includes of classes and other headers must be done at the end of this file to avoid compile error
+#include "udi_hid_kbd_conf.h"
+
+#endif // _CONF_USB_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/udi_hid_kbd.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/udi_hid_kbd.c
new file mode 100644
index 0000000..f8d47d4
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/udi_hid_kbd.c
@@ -0,0 +1,368 @@
+/**
+ * \file
+ *
+ * \brief USB Device Human Interface Device (HID) keyboard interface.
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "conf_usb.h"
+#include "usb_protocol.h"
+#include "udd.h"
+#include "udc.h"
+#include "udi_hid.h"
+#include "udi_hid_kbd.h"
+#include <string.h>
+
+/**
+ * \addtogroup udi_hid_keyboard_group
+ * @{
+ */
+
+/**
+ * \name Interface for UDC
+ */
+//@{
+
+bool udi_hid_kbd_enable(void);
+void udi_hid_kbd_disable(void);
+bool udi_hid_kbd_setup(void);
+uint8_t udi_hid_kbd_getsetting(void);
+
+//! Global structure which contains standard UDI interface for UDC
+UDC_DESC_STORAGE udi_api_t udi_api_hid_kbd = {
+ .enable = (bool(*)(void))udi_hid_kbd_enable,
+ .disable = (void (*)(void))udi_hid_kbd_disable,
+ .setup = (bool(*)(void))udi_hid_kbd_setup,
+ .getsetting = (uint8_t(*)(void))udi_hid_kbd_getsetting,
+};
+
+//@}
+
+
+/**
+ * \name Internal defines and variables to manage HID keyboard
+ */
+//@{
+
+//! Size of report for standard HID keyboard
+#define UDI_HID_KBD_REPORT_SIZE 8
+
+
+//! To store current rate of HID keyboard
+static uint8_t udi_hid_kbd_rate;
+//! To store current protocol of HID keyboard
+static uint8_t udi_hid_kbd_protocol;
+//! To store report feedback from USB host
+static uint8_t udi_hid_kbd_report_set;
+//! To signal if a valid report is ready to send
+static bool udi_hid_kbd_b_report_valid;
+//! Report ready to send
+static uint8_t udi_hid_kbd_report[UDI_HID_KBD_REPORT_SIZE];
+//! Signal if a report transfer is on going
+static bool udi_hid_kbd_b_report_trans_ongoing;
+//! Buffer used to send report
+COMPILER_WORD_ALIGNED
+ static uint8_t
+ udi_hid_kbd_report_trans[UDI_HID_KBD_REPORT_SIZE];
+
+//@}
+
+//! HID report descriptor for standard HID keyboard
+UDC_DESC_STORAGE udi_hid_kbd_report_desc_t udi_hid_kbd_report_desc = {
+ {
+ 0x05, 0x01, /* Usage Page (Generic Desktop) */
+ 0x09, 0x06, /* Usage (Keyboard) */
+ 0xA1, 0x01, /* Collection (Application) */
+ 0x05, 0x07, /* Usage Page (Keyboard) */
+ 0x19, 224, /* Usage Minimum (224) */
+ 0x29, 231, /* Usage Maximum (231) */
+ 0x15, 0x00, /* Logical Minimum (0) */
+ 0x25, 0x01, /* Logical Maximum (1) */
+ 0x75, 0x01, /* Report Size (1) */
+ 0x95, 0x08, /* Report Count (8) */
+ 0x81, 0x02, /* Input (Data, Variable, Absolute) */
+ 0x81, 0x01, /* Input (Constant) */
+ 0x19, 0x00, /* Usage Minimum (0) */
+ 0x29, 101, /* Usage Maximum (101) */
+ 0x15, 0x00, /* Logical Minimum (0) */
+ 0x25, 101, /* Logical Maximum (101) */
+ 0x75, 0x08, /* Report Size (8) */
+ 0x95, 0x06, /* Report Count (6) */
+ 0x81, 0x00, /* Input (Data, Array) */
+ 0x05, 0x08, /* Usage Page (LED) */
+ 0x19, 0x01, /* Usage Minimum (1) */
+ 0x29, 0x05, /* Usage Maximum (5) */
+ 0x15, 0x00, /* Logical Minimum (0) */
+ 0x25, 0x01, /* Logical Maximum (1) */
+ 0x75, 0x01, /* Report Size (1) */
+ 0x95, 0x05, /* Report Count (5) */
+ 0x91, 0x02, /* Output (Data, Variable, Absolute) */
+ 0x95, 0x03, /* Report Count (3) */
+ 0x91, 0x01, /* Output (Constant) */
+ 0xC0 /* End Collection */
+ }
+};
+
+/**
+ * \name Internal routines
+ */
+//@{
+
+/**
+ * \brief Changes keyboard report states (like LEDs)
+ *
+ * \param rate New rate value
+ *
+ */
+static bool udi_hid_kbd_setreport(void);
+
+/**
+ * \brief Send the report
+ *
+ * \return \c 1 if send on going, \c 0 if delay.
+ */
+static bool udi_hid_kbd_send_report(void);
+
+/**
+ * \brief Callback called when the report is sent
+ *
+ * \param status UDD_EP_TRANSFER_OK, if transfer is completed
+ * \param status UDD_EP_TRANSFER_ABORT, if transfer is aborted
+ * \param nb_sent number of data transfered
+ *
+ * \return \c 1 if function was successfully done, otherwise \c 0.
+ */
+void udi_hid_kbd_report_sent(udd_ep_status_t status, iram_size_t nb_sent);
+
+/**
+ * \brief Callback called to update report from USB host
+ * udi_hid_kbd_report_set is updated before callback execution
+ */
+static void udi_hid_kbd_setreport_valid(void);
+
+//@}
+
+
+//--------------------------------------------
+//------ Interface for UDI HID level
+
+bool udi_hid_kbd_enable(void)
+{
+ // Initialize internal values
+ udi_hid_kbd_rate = 0;
+ udi_hid_kbd_protocol = 0;
+ udi_hid_kbd_b_report_trans_ongoing = false;
+ memset(udi_hid_kbd_report, 0, UDI_HID_KBD_REPORT_SIZE);
+ udi_hid_kbd_b_report_valid = false;
+ return UDI_HID_KBD_ENABLE_EXT();
+}
+
+
+void udi_hid_kbd_disable(void)
+{
+ UDI_HID_KBD_DISABLE_EXT();
+}
+
+
+bool udi_hid_kbd_setup(void)
+{
+ return udi_hid_setup(&udi_hid_kbd_rate,
+ &udi_hid_kbd_protocol,
+ (uint8_t *) &udi_hid_kbd_report_desc,
+ udi_hid_kbd_setreport);
+}
+
+
+uint8_t udi_hid_kbd_getsetting(void)
+{
+ return 0;
+}
+
+
+static bool udi_hid_kbd_setreport(void)
+{
+ if ((USB_HID_REPORT_TYPE_OUTPUT == (udd_g_ctrlreq.req.wValue >> 8))
+ && (0 == (0xFF & udd_g_ctrlreq.req.wValue))
+ && (1 == udd_g_ctrlreq.req.wLength)) {
+ // Report OUT type on report ID 0 from USB Host
+ udd_g_ctrlreq.payload = &udi_hid_kbd_report_set;
+ udd_g_ctrlreq.callback = udi_hid_kbd_setreport_valid;
+ udd_g_ctrlreq.payload_size = 1;
+ return true;
+ }
+ return false;
+}
+
+
+//--------------------------------------------
+//------ Interface for application
+
+bool udi_hid_kbd_modifier_up(uint8_t modifier_id)
+{
+ irqflags_t flags = cpu_irq_save();
+
+ // Fill report
+ udi_hid_kbd_report[0] &= ~modifier_id;
+ udi_hid_kbd_b_report_valid = true;
+
+ // Send report
+ udi_hid_kbd_send_report();
+
+ cpu_irq_restore(flags);
+ return true;
+}
+
+
+bool udi_hid_kbd_modifier_down(uint8_t modifier_id)
+{
+ irqflags_t flags = cpu_irq_save();
+
+ // Fill report
+ udi_hid_kbd_report[0] |= modifier_id;
+ udi_hid_kbd_b_report_valid = true;
+
+ // Send report
+ udi_hid_kbd_send_report();
+
+ cpu_irq_restore(flags);
+ return true;
+}
+
+
+bool udi_hid_kbd_up(uint8_t key_id)
+{
+ uint8_t i;
+
+ irqflags_t flags = cpu_irq_save();
+
+ // Fill report
+ for (i = 2; i < UDI_HID_KBD_REPORT_SIZE; i++) {
+ if (0 == udi_hid_kbd_report[i]) {
+ // Already removed
+ cpu_irq_restore(flags);
+ return true;
+ }
+ if (key_id == udi_hid_kbd_report[i])
+ break;
+ }
+ if (UDI_HID_KBD_REPORT_SIZE == i) {
+ // Already removed
+ cpu_irq_restore(flags);
+ return true;
+ }
+ // Remove key and shift
+ while (i < (UDI_HID_KBD_REPORT_SIZE - 1)) {
+ udi_hid_kbd_report[i] = udi_hid_kbd_report[i + 1];
+ i++;
+ }
+ udi_hid_kbd_report[UDI_HID_KBD_REPORT_SIZE - 1] = 0x00;
+ udi_hid_kbd_b_report_valid = true;
+
+ // Send report
+ udi_hid_kbd_send_report();
+
+ cpu_irq_restore(flags);
+ return true;
+}
+
+
+bool udi_hid_kbd_down(uint8_t key_id)
+{
+ uint8_t i;
+
+ irqflags_t flags = cpu_irq_save();
+
+ // Fill report
+ for (i = 2; i < UDI_HID_KBD_REPORT_SIZE; i++) {
+ if (0 == udi_hid_kbd_report[i])
+ break;
+ if (key_id == udi_hid_kbd_report[i]) {
+ // Already in array
+ cpu_irq_restore(flags);
+ return true;
+ }
+ }
+
+ if (UDI_HID_KBD_REPORT_SIZE == i) {
+ // Array full
+ // TODO manage more than UDI_HID_KBD_REPORT_SIZE key pressed in same time
+ cpu_irq_restore(flags);
+ return false;
+ }
+ // Add key at the end of array
+ udi_hid_kbd_report[i] = key_id;
+ udi_hid_kbd_b_report_valid = true;
+
+ // Send report
+ udi_hid_kbd_send_report();
+
+ // Enable IT
+ cpu_irq_restore(flags);
+ return true;
+}
+
+
+//--------------------------------------------
+//------ Internal routines
+
+static bool udi_hid_kbd_send_report(void)
+{
+ if (udi_hid_kbd_b_report_trans_ongoing)
+ return false;
+ memcpy(udi_hid_kbd_report_trans, udi_hid_kbd_report,
+ UDI_HID_KBD_REPORT_SIZE);
+ udi_hid_kbd_b_report_valid = false;
+ udi_hid_kbd_b_report_trans_ongoing =
+ udd_ep_run( UDI_HID_KBD_EP_IN,
+ false,
+ udi_hid_kbd_report_trans,
+ UDI_HID_KBD_REPORT_SIZE,
+ udi_hid_kbd_report_sent);
+ return udi_hid_kbd_b_report_trans_ongoing;
+}
+
+void udi_hid_kbd_report_sent(udd_ep_status_t status, iram_size_t nb_sent)
+{
+ udi_hid_kbd_b_report_trans_ongoing = false;
+ if (udi_hid_kbd_b_report_valid) {
+ udi_hid_kbd_send_report();
+ }
+}
+
+static void udi_hid_kbd_setreport_valid(void)
+{
+ UDI_HID_KBD_CHANGE_LED(udi_hid_kbd_report_set);
+}
+
+//@}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/udi_hid_kbd.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/udi_hid_kbd.h
new file mode 100644
index 0000000..edf5018
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/udi_hid_kbd.h
@@ -0,0 +1,176 @@
+/**
+ * \file
+ *
+ * \brief USB Device Human Interface Device (HID) keyboard interface.
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _UDC_HID_KBD_H_
+#define _UDC_HID_KBD_H_
+
+#include "conf_usb.h"
+#include "usb_protocol.h"
+#include "usb_protocol_hid.h"
+#include "udc_desc.h"
+#include "udi.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * \ingroup udi_hid_group
+ * \defgroup udi_hid_keyboard_group UDI for Human Interface Device keyboard Class
+ * base on UDI HID
+ * @{
+ */
+
+//! Global structure which contains standard UDI API for UDC
+extern UDC_DESC_STORAGE udi_api_t udi_api_hid_kbd;
+
+/**
+ * \name Interface Descriptor
+ *
+ * The following structures provide the interface descriptor.
+ * It must be implemented in USB configuration descriptor.
+ */
+//@{
+
+//! Interface descriptor structure for HID keyboard
+typedef struct {
+ usb_iface_desc_t iface;
+ usb_hid_descriptor_t hid;
+ usb_ep_desc_t ep;
+} udi_hid_kbd_desc_t;
+
+//! Report descriptor for HID keyboard
+typedef struct {
+ uint8_t array[59];
+} udi_hid_kbd_report_desc_t;
+
+
+//! By default no string associated to this interface
+#ifndef UDI_HID_KBD_STRING_ID
+#define UDI_HID_KBD_STRING_ID 0
+#endif
+
+//! HID keyboard endpoints size
+#define UDI_HID_KBD_EP_SIZE 8
+
+//! HID keyboard interval
+#ifdef USB_DEVICE_HS_SUPPORT
+#define UDI_HID_KBD_EP_INTERVEL 8
+#else
+#define UDI_HID_KBD_EP_INTERVEL 16
+#endif
+
+//! Content of HID keyboard interface descriptor for all speed
+#define UDI_HID_KBD_DESC {\
+ .iface.bLength = sizeof(usb_iface_desc_t),\
+ .iface.bDescriptorType = USB_DT_INTERFACE,\
+ .iface.bInterfaceNumber = UDI_HID_KBD_IFACE_NUMBER,\
+ .iface.bAlternateSetting = 0,\
+ .iface.bNumEndpoints = 1,\
+ .iface.bInterfaceClass = HID_CLASS,\
+ .iface.bInterfaceSubClass = HID_SUB_CLASS_NOBOOT,\
+ .iface.bInterfaceProtocol = HID_PROTOCOL_KEYBOARD,\
+ .iface.iInterface = UDI_HID_KBD_STRING_ID,\
+ .hid.bLength = sizeof(usb_hid_descriptor_t),\
+ .hid.bDescriptorType = USB_DT_HID,\
+ .hid.bcdHID = LE16(USB_HID_BDC_V1_11),\
+ .hid.bCountryCode = USB_HID_NO_COUNTRY_CODE,\
+ .hid.bNumDescriptors = USB_HID_NUM_DESC,\
+ .hid.bRDescriptorType = USB_DT_HID_REPORT,\
+ .hid.wDescriptorLength = LE16(sizeof(udi_hid_kbd_report_desc_t)),\
+ .ep.bLength = sizeof(usb_ep_desc_t),\
+ .ep.bDescriptorType = USB_DT_ENDPOINT,\
+ .ep.bEndpointAddress = UDI_HID_KBD_EP_IN,\
+ .ep.bmAttributes = USB_EP_TYPE_INTERRUPT,\
+ .ep.wMaxPacketSize = LE16(UDI_HID_KBD_EP_SIZE),\
+ .ep.bInterval = UDI_HID_KBD_EP_INTERVEL,\
+ }
+//@}
+
+
+
+/**
+ * \name Interface for application
+ *
+ * These routines are used by application to send keyboard events
+ */
+//@{
+
+/**
+ * \brief Send events key modifier released
+ *
+ * \param modifier_id ID of key modifier
+ *
+ * \return \c 1 if function was successfully done, otherwise \c 0.
+ */
+bool udi_hid_kbd_modifier_up(uint8_t modifier_id);
+
+/**
+ * \brief Send events key modifier pressed
+ *
+ * \param modifier_id ID of key modifier
+ *
+ * \return \c 1 if function was successfully done, otherwise \c 0.
+ */
+bool udi_hid_kbd_modifier_down(uint8_t modifier_id);
+
+
+/**
+ * \brief Send events key modifier released
+ *
+ * \param key_id ID of key
+ *
+ * \return \c 1 if function was successfully done, otherwise \c 0.
+ */
+bool udi_hid_kbd_up(uint8_t key_id);
+
+/**
+ * \brief Send events key modifier pressed
+ *
+ * \param key_id ID of key
+ *
+ */
+bool udi_hid_kbd_down(uint8_t key_id);
+//@}
+
+//@}
+
+#ifdef __cplusplus
+}
+#endif
+#endif // _UDC_HID_KBD_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/udi_hid_kbd_conf.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/udi_hid_kbd_conf.h
new file mode 100644
index 0000000..3818785
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/udi_hid_kbd_conf.h
@@ -0,0 +1,72 @@
+/**
+ * \file
+ *
+ * \brief Default HID keyboard configuration for a USB Device
+ * with a single interface HID keyboard
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _UDI_HID_KBD_CONF_H_
+#define _UDI_HID_KBD_CONF_H_
+
+/**
+ * \ingroup udi_hid_keyboard_group
+ * \defgroup udi_hid_keyboard_group_conf Default HID keyboard configuration
+ * for a USB Device with a single interface HID
+ *
+ * @{
+ */
+
+//! Control endpoint size
+#define USB_DEVICE_EP_CTRL_SIZE 8
+
+//! Endpoint number used by HID keyboard interface
+#define UDI_HID_KBD_EP_IN (1 | USB_EP_DIR_IN)
+
+//! Interface number
+#define UDI_HID_KBD_IFACE_NUMBER 0
+
+/**
+ * \name UDD Configuration
+ */
+//@{
+//! 1 endpoint used by HID keyboard standard interface
+#define USB_DEVICE_MAX_EP 1
+//@}
+
+//@}
+
+#include "udi_hid_kbd.h"
+
+#endif // _UDI_HID_KBD_CONF_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/udi_hid_kbd_desc.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/udi_hid_kbd_desc.c
new file mode 100644
index 0000000..3fd2fb4
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/kbd/udi_hid_kbd_desc.c
@@ -0,0 +1,158 @@
+/**
+ * \file
+ *
+ * \brief Default descriptors for a USB Device
+ * with a single interface HID keyboard
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "conf_usb.h"
+#include "udd.h"
+#include "udc_desc.h"
+#include "udi_hid.h"
+#include "udi_hid_kbd.h"
+
+/**
+ * \ingroup udi_hid_keyboard_group
+ * \defgroup udi_hid_keyboard_group_desc Default descriptors for a USB Device
+ * with a single interface HID keyboard
+ *
+ * @{
+ */
+
+//! Only one interface for this device
+#define USB_DEVICE_NB_INTERFACE 1
+
+/**INDENT-OFF**/
+//! USB Device Descriptor
+COMPILER_WORD_ALIGNED
+UDC_DESC_STORAGE usb_dev_desc_t udc_device_desc = {
+ .bLength = sizeof(usb_dev_desc_t),
+ .bDescriptorType = USB_DT_DEVICE,
+ .bcdUSB = LE16(USB_V2_0),
+ .bDeviceClass = 0,
+ .bDeviceSubClass = 0,
+ .bDeviceProtocol = 0,
+ .bMaxPacketSize0 = USB_DEVICE_EP_CTRL_SIZE,
+ .idVendor = LE16(USB_DEVICE_VENDOR_ID),
+ .idProduct = LE16(USB_DEVICE_PRODUCT_ID),
+ .bcdDevice = LE16((USB_DEVICE_MAJOR_VERSION << 8)
+ | USB_DEVICE_MINOR_VERSION),
+#ifdef USB_DEVICE_MANUFACTURE_NAME
+ .iManufacturer = 1,
+#else
+ .iManufacturer = 0, // No manufacture string
+#endif
+#ifdef USB_DEVICE_PRODUCT_NAME
+ .iProduct = 2,
+#else
+ .iProduct = 0, // No product string
+#endif
+#ifdef USB_DEVICE_SERIAL_NAME
+ .iSerialNumber = 3,
+#else
+ .iSerialNumber = 0, // No serial string
+#endif
+ .bNumConfigurations = 1
+};
+
+
+#ifdef USB_DEVICE_HS_SUPPORT
+//! USB Device Qualifier Descriptor for HS
+COMPILER_WORD_ALIGNED
+UDC_DESC_STORAGE usb_dev_qual_desc_t udc_device_qual = {
+ .bLength = sizeof(usb_dev_qual_desc_t),
+ .bDescriptorType = USB_DT_DEVICE_QUALIFIER,
+ .bcdUSB = LE16(USB_V2_0),
+ .bDeviceClass = 0,
+ .bDeviceSubClass = 0,
+ .bDeviceProtocol = 0,
+ .bMaxPacketSize0 = USB_DEVICE_EP_CTRL_SIZE,
+ .bNumConfigurations = 1
+};
+#endif
+
+//! Structure for USB Device Configuration Descriptor
+COMPILER_PACK_SET(1);
+typedef struct {
+ usb_conf_desc_t conf;
+ udi_hid_kbd_desc_t hid_kbd;
+} udc_desc_t;
+COMPILER_PACK_RESET();
+
+//! USB Device Configuration Descriptor filled for FS and HS
+COMPILER_WORD_ALIGNED
+UDC_DESC_STORAGE udc_desc_t udc_desc = {
+ .conf.bLength = sizeof(usb_conf_desc_t),
+ .conf.bDescriptorType = USB_DT_CONFIGURATION,
+ .conf.wTotalLength = LE16(sizeof(udc_desc_t)),
+ .conf.bNumInterfaces = USB_DEVICE_NB_INTERFACE,
+ .conf.bConfigurationValue = 1,
+ .conf.iConfiguration = 0,
+ .conf.bmAttributes = USB_CONFIG_ATTR_MUST_SET | USB_DEVICE_ATTR,
+ .conf.bMaxPower = USB_CONFIG_MAX_POWER(USB_DEVICE_POWER),
+ .hid_kbd = UDI_HID_KBD_DESC,
+};
+
+
+/**
+ * \name UDC structures which contains all USB Device definitions
+ */
+//@{
+
+//! Associate an UDI for each USB interface
+UDC_DESC_STORAGE udi_api_t *udi_apis[USB_DEVICE_NB_INTERFACE] = {
+ &udi_api_hid_kbd,
+};
+
+//! Add UDI with USB Descriptors FS & HS
+UDC_DESC_STORAGE udc_config_speed_t udc_config_fshs[1] = {{
+ .desc = (usb_conf_desc_t UDC_DESC_STORAGE*)&udc_desc,
+ .udi_apis = udi_apis,
+}};
+
+//! Add all information about USB Device in global structure for UDC
+UDC_DESC_STORAGE udc_config_t udc_config = {
+ .confdev_lsfs = &udc_device_desc,
+ .conf_lsfs = udc_config_fshs,
+#ifdef USB_DEVICE_HS_SUPPORT
+ .confdev_hs = &udc_device_desc,
+ .qualifier = &udc_device_qual,
+ .conf_hs = udc_config_fshs,
+#endif
+};
+
+//@}
+/**INDENT-ON**/
+//@}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a0512_evk1100/conf_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a0512_evk1100/conf_board.h
new file mode 100644
index 0000000..4552eb6
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a0512_evk1100/conf_board.h
@@ -0,0 +1,43 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Board configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H_INCLUDED
+#define CONF_BOARD_H_INCLUDED
+
+// Only the default board init (switchs/leds) is necessary for this example
+
+#endif /* CONF_BOARD_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a0512_evk1100/conf_clock.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a0512_evk1100/conf_clock.h
new file mode 100644
index 0000000..3059cef
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a0512_evk1100/conf_clock.h
@@ -0,0 +1,75 @@
+/**
+ * \file
+ *
+ * \brief Chip-specific system clock manager configuration
+ *
+ * Copyright (C) 2011 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_CLOCK_H_INCLUDED
+#define CONF_CLOCK_H_INCLUDED
+
+// ===== System Clock Source Options
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_RCSYS
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_OSC0
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL0
+
+// ===== PLL0 Options
+//#define CONFIG_PLL0_SOURCE PLL_SRC_OSC0
+//#define CONFIG_PLL0_SOURCE PLL_SRC_OSC1
+//#define CONFIG_PLL0_MUL 4 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+//#define CONFIG_PLL0_DIV 1 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+
+// ===== PLL1 Options
+#define CONFIG_PLL1_SOURCE PLL_SRC_OSC0
+//#define CONFIG_PLL1_SOURCE PLL_SRC_OSC1
+#define CONFIG_PLL1_MUL 8 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+#define CONFIG_PLL1_DIV 2 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+
+// ===== System Clock Bus Division Options
+//#define CONFIG_SYSCLK_CPU_DIV 0 /* Fcpu = Fsys/(2 ^ CPU_div) */
+//#define CONFIG_SYSCLK_PBA_DIV 0 /* Fpba = Fsys/(2 ^ PBA_div) */
+//#define CONFIG_SYSCLK_PBB_DIV 0 /* Fpbb = Fsys/(2 ^ PBB_div) */
+
+// ===== Peripheral Clock Management Options
+//#define CONFIG_SYSCLK_INIT_CPUMASK ((1 << SYSCLK_SYSTIMER) | (1 << SYSCLK_OCD))
+//#define CONFIG_SYSCLK_INIT_PBAMASK (1 << SYSCLK_USART0)
+//#define CONFIG_SYSCLK_INIT_PBBMASK (1 << SYSCLK_HMATRIX)
+//#define CONFIG_SYSCLK_INIT_HSBMASK (1 << SYSCLK_MDMA_HSB)
+
+// ===== USB Clock Source Options
+//#define CONFIG_USBCLK_SOURCE USBCLK_SRC_OSC0
+//#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL0
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL1
+#define CONFIG_USBCLK_DIV 1 /* Fusb = Fsys/(2 ^ USB_div) */
+
+#endif /* CONF_CLOCK_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a0512_evk1100/conf_sleepmgr.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a0512_evk1100/conf_sleepmgr.h
new file mode 100644
index 0000000..699010d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a0512_evk1100/conf_sleepmgr.h
@@ -0,0 +1,43 @@
+/**
+ * \file
+ *
+ * \brief Sleep manager configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SLEEPMGR_H
+#define CONF_SLEEPMGR_H
+
+#define CONFIG_SLEEPMGR_ENABLE
+
+#endif /* CONF_SLEEPMGR_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a0512_evk1100/ui.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a0512_evk1100/ui.c
new file mode 100644
index 0000000..94371a6
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a0512_evk1100/ui.c
@@ -0,0 +1,202 @@
+/**
+ * \file
+ *
+ * \brief User Interface
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "udc.h"
+#include "udi_hid_mouse.h"
+#include "board.h"
+#include "gpio.h"
+#include "joystick.h"
+#include "eic.h"
+#include "ui.h"
+
+#define MOUSE_MOVE_RANGE 3
+
+// Interrupt on "pin change" from switch to do wakeup on USB
+// Note:
+// This interrupt is enable when the USB host enable remotewakeup feature
+// This interrupt wakeup the CPU if this one is in idle mode
+ISR(ui_wakeup_isr, AVR32_GPIO0_IRQ_GROUP, 0)
+{
+ // Clear GPIO interrupt.
+ gpio_clear_pin_interrupt_flag(GPIO_JOYSTICK_PUSH);
+ // Clear External Interrupt Line else Wakeup event always enabled
+ eic_clear_interrupt_line(&AVR32_EIC, EXT_NMI);
+ // It is a wakeup then send wakeup USB
+ udc_wakeup();
+}
+
+
+void ui_init(void)
+{
+ /* register joystick handler on level 0 */
+ irqflags_t flags = cpu_irq_save();
+ irq_register_handler(ui_wakeup_isr,
+ AVR32_GPIO_IRQ_0 + (GPIO_JOYSTICK_PUSH / 8), 0);
+ cpu_irq_restore(flags);
+
+ LED_On(LED0);
+ LED_Off(LED1);
+}
+
+void ui_powerdown(void)
+{
+ LED_Off(LED0);
+ LED_Off(LED1);
+}
+
+
+//! Structure holding the configuration parameters of the EIC low level driver.
+static const eic_options_t eic_options = {
+ // Choose External Interrupt Controller Line
+ .eic_line = EXT_NMI,
+ // Enable level-triggered interrupt.
+ .eic_mode = EIC_MODE_LEVEL_TRIGGERED,
+ // Don't care value because the chosen eic mode is level-triggered.
+ .eic_edge = 0,
+ // Interrupt will trigger on low-level.
+ .eic_level = EIC_LEVEL_LOW_LEVEL,
+ // Enable filter.
+ .eic_filter = EIC_FILTER_ENABLED,
+ // For Wake Up mode, initialize in asynchronous mode
+ .eic_async = EIC_ASYNCH_MODE
+};
+
+
+void ui_wakeup_enable(void)
+{
+ /* configure joystick to produce IT on all state change */
+ gpio_enable_pin_interrupt(GPIO_JOYSTICK_PUSH, GPIO_PIN_CHANGE);
+ /*
+ * Configure pin change interrupt for asynchronous wake-up (required to
+ * wake up from the STATIC sleep mode).
+ *
+ * First, map the interrupt line to the GPIO pin with the right
+ * peripheral function.
+ */
+ gpio_enable_module_pin(GPIO_JOYSTICK_PUSH, AVR32_EIC_EXTINT_8_FUNCTION);
+
+ /*
+ * Enable the internal pull-up resistor on that pin (because the EIC is
+ * configured such that the interrupt will trigger on low-level, see
+ * eic_options.eic_level).
+ */
+ gpio_enable_pin_pull_up(GPIO_JOYSTICK_PUSH);
+
+ // Init the EIC controller with the set options.
+ eic_init(&AVR32_EIC, &eic_options, sizeof(eic_options) /
+ sizeof(eic_options_t));
+
+ // Enable External Interrupt Controller Line
+ eic_enable_line(&AVR32_EIC, EXT_NMI);
+}
+
+void ui_wakeup_disable(void)
+{
+ eic_disable_line(&AVR32_EIC, EXT_NMI);
+ /* Disable joystick input change ITs. */
+ gpio_disable_pin_interrupt(GPIO_JOYSTICK_PUSH);
+}
+
+void ui_wakeup(void)
+{
+ LED_On(LED0);
+}
+
+void ui_process(uint16_t framenumber)
+{
+ bool b_btn_state;
+ static bool btn_left_last_state = HID_MOUSE_BTN_UP;
+ static bool btn_right_last_state = HID_MOUSE_BTN_UP;
+ static bool btn_middle_last_state = HID_MOUSE_BTN_UP;
+ static uint8_t cpt_sof = 0;
+
+ if ((framenumber % 1000) == 0) {
+ LED_On(LED1);
+ }
+ if ((framenumber % 1000) == 500) {
+ LED_Off(LED1);
+ }
+ // Scan process running each 2ms
+ cpt_sof++;
+ if (2 > cpt_sof)
+ return;
+ cpt_sof = 0;
+
+ // Scan buttons on switch 0 (left), 1 (middle), 2 (right)
+ b_btn_state = (!gpio_get_pin_value(GPIO_PUSH_BUTTON_0)) ?
+ HID_MOUSE_BTN_DOWN : HID_MOUSE_BTN_UP;
+ if (b_btn_state != btn_left_last_state) {
+ udi_hid_mouse_btnleft(b_btn_state);
+ btn_left_last_state = b_btn_state;
+ }
+ b_btn_state = (!gpio_get_pin_value(GPIO_PUSH_BUTTON_1)) ?
+ HID_MOUSE_BTN_DOWN : HID_MOUSE_BTN_UP;
+ if (b_btn_state != btn_middle_last_state) {
+ udi_hid_mouse_btnmiddle(b_btn_state);
+ btn_middle_last_state = b_btn_state;
+ }
+ b_btn_state = (!gpio_get_pin_value(GPIO_PUSH_BUTTON_2)) ?
+ HID_MOUSE_BTN_DOWN : HID_MOUSE_BTN_UP;
+ if (b_btn_state != btn_right_last_state) {
+ udi_hid_mouse_btnright(b_btn_state);
+ btn_right_last_state = b_btn_state;
+ }
+ // Joystick used to move mouse
+ if (is_joystick_right())
+ udi_hid_mouse_moveX(MOUSE_MOVE_RANGE);
+ if (is_joystick_left())
+ udi_hid_mouse_moveX(-MOUSE_MOVE_RANGE);
+ if (is_joystick_up())
+ udi_hid_mouse_moveY(-MOUSE_MOVE_RANGE);
+ if (is_joystick_down())
+ udi_hid_mouse_moveY(MOUSE_MOVE_RANGE);
+}
+
+/**
+ * \defgroup UI User Interface
+ *
+ * Human interface on EVK1100 :
+ * - PWR led is on when power present
+ * - Led 0 is on when USB line is in IDLE mode, and off in SUSPEND mode
+ * - Led 1 blinks when USB Host have checked and enabled HID mouse interface
+ * - Mouse buttons are linked to switch PB0 (left), PB1 (middle), PB2 (right)
+ * - Joystick are used to move mouse
+ * - Only Push joystick button can be used to wakeup USB Host in remote wakeup mode.
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a0512_evk1105/conf_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a0512_evk1105/conf_board.h
new file mode 100644
index 0000000..4552eb6
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a0512_evk1105/conf_board.h
@@ -0,0 +1,43 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Board configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H_INCLUDED
+#define CONF_BOARD_H_INCLUDED
+
+// Only the default board init (switchs/leds) is necessary for this example
+
+#endif /* CONF_BOARD_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a0512_evk1105/conf_clock.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a0512_evk1105/conf_clock.h
new file mode 100644
index 0000000..4f4aa33
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a0512_evk1105/conf_clock.h
@@ -0,0 +1,75 @@
+/**
+ * \file
+ *
+ * \brief Chip-specific system clock manager configuration
+ *
+ * Copyright (C) 2011 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_CLOCK_H_INCLUDED
+#define CONF_CLOCK_H_INCLUDED
+
+// ===== System Clock Source Options
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_RCSYS
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_OSC0
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL0
+
+// ===== PLL0 Options
+//#define CONFIG_PLL0_SOURCE PLL_SRC_OSC0
+//#define CONFIG_PLL0_SOURCE PLL_SRC_OSC1
+//#define CONFIG_PLL0_MUL 4 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+//#define CONFIG_PLL0_DIV 1 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+
+// ===== PLL1 Options
+#define CONFIG_PLL1_SOURCE PLL_SRC_OSC0
+//#define CONFIG_PLL1_SOURCE PLL_SRC_OSC1
+#define CONFIG_PLL1_MUL 8 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+#define CONFIG_PLL1_DIV 2 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+
+// ===== System Clock Bus Division Options
+//#define CONFIG_SYSCLK_CPU_DIV 0 /* Fcpu = Fsys/(2 ^ CPU_div) */
+//#define CONFIG_SYSCLK_PBA_DIV 0 /* Fpba = Fsys/(2 ^ PBA_div) */
+//#define CONFIG_SYSCLK_PBB_DIV 0 /* Fpbb = Fsys/(2 ^ PBB_div) */
+
+// ===== Peripheral Clock Management Options
+//#define CONFIG_SYSCLK_INIT_CPUMASK ((1 << SYSCLK_SYSTIMER) | (1 << SYSCLK_OCD))
+//#define CONFIG_SYSCLK_INIT_PBAMASK (1 << SYSCLK_USART0)
+//#define CONFIG_SYSCLK_INIT_PBBMASK (1 << SYSCLK_HMATRIX)
+//#define CONFIG_SYSCLK_INIT_HSBMASK (1 << SYSCLK_MDMA_HSB)
+
+// ===== USB Clock Source Options
+//#define CONFIG_USBCLK_SOURCE USBCLK_SRC_OSC0
+//#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL0
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL1
+#define CONFIG_USBCLK_DIV 1 /* Fusb = Fsys/(2 ^ USB_div) */
+
+#endif /* CONF_CLOCK_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a0512_evk1105/conf_sleepmgr.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a0512_evk1105/conf_sleepmgr.h
new file mode 100644
index 0000000..699010d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a0512_evk1105/conf_sleepmgr.h
@@ -0,0 +1,43 @@
+/**
+ * \file
+ *
+ * \brief Sleep manager configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SLEEPMGR_H
+#define CONF_SLEEPMGR_H
+
+#define CONFIG_SLEEPMGR_ENABLE
+
+#endif /* CONF_SLEEPMGR_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a0512_evk1105/ui.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a0512_evk1105/ui.c
new file mode 100644
index 0000000..d269e20
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a0512_evk1105/ui.c
@@ -0,0 +1,117 @@
+/**
+ * \file
+ *
+ * \brief User Interface
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "udi_hid_mouse.h"
+#include "board.h"
+#include "gpio.h"
+#include "qt1081.h"
+#include "ui.h"
+
+#define MOUSE_MOVE_RANGE 3
+
+void ui_init(void)
+{
+ LED_On(LED0);
+ LED_Off(LED1);
+}
+
+void ui_powerdown(void)
+{
+ LED_Off(LED0);
+ LED_Off(LED1);
+}
+
+
+void ui_wakeup_enable(void)
+{
+ // No external interrupt implemented
+}
+
+void ui_wakeup_disable(void)
+{
+ // No external interrupt implemented
+}
+
+void ui_wakeup(void)
+{
+ LED_On(LED0);
+}
+
+
+void ui_process(uint16_t framenumber)
+{
+ static uint8_t cpt_sof = 0;
+
+ if ((framenumber % 1000) == 0) {
+ LED_On(LED1);
+ }
+ if ((framenumber % 1000) == 500) {
+ LED_Off(LED1);
+ }
+ // Scan process running each 2ms
+ cpt_sof++;
+ if (2 > cpt_sof)
+ return;
+ cpt_sof = 0;
+
+ // No Scan buttons
+
+ // Look touch sensor activity for the X and Y events
+ if (is_touch_sensor_2())
+ udi_hid_mouse_moveX(MOUSE_MOVE_RANGE);
+ if (is_touch_sensor_3())
+ udi_hid_mouse_moveX(-MOUSE_MOVE_RANGE);
+ if (is_touch_sensor_1())
+ udi_hid_mouse_moveY(MOUSE_MOVE_RANGE);
+ if (is_touch_sensor_0())
+ udi_hid_mouse_moveY(-MOUSE_MOVE_RANGE);
+}
+
+/**
+ * \defgroup UI User Interface
+ *
+ * Human interface on EVK1105 :
+ * - PWR led is on when power present
+ * - Led 0 is on when USB line is in IDLE mode, and off in SUSPEND mode
+ * - Led 1 blinks when USB Host have checked and enabled HID mouse interface
+ * - Mouse buttons are not linked.
+ * - Touch sensors are used to move mouse
+ * - No button are linked to wakeup USB Host in remote wakeup mode.
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a3256_evk1104/conf_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a3256_evk1104/conf_board.h
new file mode 100644
index 0000000..4552eb6
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a3256_evk1104/conf_board.h
@@ -0,0 +1,43 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Board configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H_INCLUDED
+#define CONF_BOARD_H_INCLUDED
+
+// Only the default board init (switchs/leds) is necessary for this example
+
+#endif /* CONF_BOARD_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a3256_evk1104/conf_clock.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a3256_evk1104/conf_clock.h
new file mode 100644
index 0000000..0d489e5
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a3256_evk1104/conf_clock.h
@@ -0,0 +1,75 @@
+/**
+ * \file
+ *
+ * \brief Chip-specific system clock manager configuration
+ *
+ * Copyright (C) 2011 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_CLOCK_H_INCLUDED
+#define CONF_CLOCK_H_INCLUDED
+
+// ===== System Clock Source Options
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_RCSYS
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_OSC0
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL0
+
+// ===== PLL0 Options
+//#define CONFIG_PLL0_SOURCE PLL_SRC_OSC0
+//#define CONFIG_PLL0_SOURCE PLL_SRC_OSC1
+//#define CONFIG_PLL0_MUL 11 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+//#define CONFIG_PLL0_DIV 2 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+
+// ===== PLL1 Options
+//#define CONFIG_PLL1_SOURCE PLL_SRC_OSC0
+//#define CONFIG_PLL1_SOURCE PLL_SRC_OSC1
+//#define CONFIG_PLL1_MUL 8 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+//#define CONFIG_PLL1_DIV 2 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+
+// ===== System Clock Bus Division Options
+#define CONFIG_SYSCLK_CPU_DIV 0 /* Fcpu = Fsys/(2 ^ CPU_div) */
+#define CONFIG_SYSCLK_PBA_DIV 0 /* Fpba = Fsys/(2 ^ PBA_div) */
+//#define CONFIG_SYSCLK_PBB_DIV 0 /* Fpbb = Fsys/(2 ^ PBB_div) */
+
+// ===== Peripheral Clock Management Options
+//#define CONFIG_SYSCLK_INIT_CPUMASK ((1 << SYSCLK_SYSTIMER) | (1 << SYSCLK_OCD))
+//#define CONFIG_SYSCLK_INIT_PBAMASK (1 << SYSCLK_USART0)
+//#define CONFIG_SYSCLK_INIT_PBBMASK (1 << SYSCLK_HMATRIX)
+//#define CONFIG_SYSCLK_INIT_HSBMASK (1 << SYSCLK_MDMA_HSB)
+
+// ===== USB Clock Source Options
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_OSC0
+//#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL0
+//#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL1
+#define CONFIG_USBCLK_DIV 1 /* Fusb = Fsys/(2 ^ USB_div) */
+
+#endif /* CONF_CLOCK_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a3256_evk1104/conf_sleepmgr.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a3256_evk1104/conf_sleepmgr.h
new file mode 100644
index 0000000..699010d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a3256_evk1104/conf_sleepmgr.h
@@ -0,0 +1,43 @@
+/**
+ * \file
+ *
+ * \brief Sleep manager configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SLEEPMGR_H
+#define CONF_SLEEPMGR_H
+
+#define CONFIG_SLEEPMGR_ENABLE
+
+#endif /* CONF_SLEEPMGR_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a3256_evk1104/ui.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a3256_evk1104/ui.c
new file mode 100644
index 0000000..b717b98
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3a3256_evk1104/ui.c
@@ -0,0 +1,181 @@
+/**
+ * \file
+ *
+ * \brief User Interface
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "udc.h"
+#include "udi_hid_mouse.h"
+#include "board.h"
+#include "gpio.h"
+#include "eic.h"
+#include "ui.h"
+
+#define MOUSE_MOVE_RANGE 3
+
+// Interrupt on "pin change" from switch to do wakeup on USB
+// Note:
+// This interrupt is enable when the USB host enable remotewakeup feature
+// This interrupt wakeup the CPU if this one is in idle mode
+ISR(ui_wakeup_isr, AVR32_GPIO_IRQ_GROUP, 0)
+{
+ // Clear GPIO interrupt.
+ gpio_clear_pin_interrupt_flag(AVR32_PIN_PA20);
+ // Clear External Interrupt Line else Wakeup event always enabled
+ eic_clear_interrupt_line(&AVR32_EIC, EXT_NMI);
+ // It is a wakeup then send wakeup USB
+ udc_wakeup();
+}
+
+
+void ui_init(void)
+{
+ /* register joystick handler on level 0 */
+ irqflags_t flags = cpu_irq_save();
+ irq_register_handler(ui_wakeup_isr,
+ AVR32_GPIO_IRQ_0 + (AVR32_PIN_PA20 / 8), 0);
+ cpu_irq_restore(flags);
+
+ LED_On(LED0);
+ LED_Off(LED1);
+}
+
+void ui_powerdown(void)
+{
+ LED_Off(LED0);
+ LED_Off(LED1);
+}
+
+
+//! Structure holding the configuration parameters of the EIC low level driver.
+static const eic_options_t eic_options = {
+ // Choose External Interrupt Controller Line
+ .eic_line = EXT_NMI,
+ // Enable level-triggered interrupt.
+ .eic_mode = EIC_MODE_LEVEL_TRIGGERED,
+ // Don't care value because the chosen eic mode is level-triggered.
+ .eic_edge = 0,
+ // Interrupt will trigger on low-level.
+ .eic_level = EIC_LEVEL_LOW_LEVEL,
+ // Enable filter.
+ .eic_filter = EIC_FILTER_ENABLED,
+ // For Wake Up mode, initialize in asynchronous mode
+ .eic_async = EIC_ASYNCH_MODE
+};
+
+
+void ui_wakeup_enable(void)
+{
+ // With the UC3A3 datasheet, in section "Peripheral Multiplexing on I/O lines"
+ // in the table "GPIO Controller Function Multiplexing", we see that the NMI is
+ // mapped on GPIO 20 (i.e. PA20). Using the EVK1104 schematics, we see that the
+ // J17.7 pin is connected to PA20. Thus, a low level on J17.7 will generate an
+ // NMI. The External Interrupt number 8 is the NMI.
+
+ /* configure joystick to produce IT on all state change */
+ gpio_enable_pin_interrupt(AVR32_PIN_PA20, GPIO_PIN_CHANGE);
+ /*
+ * Configure pin change interrupt for asynchronous wake-up (required to
+ * wake up from the STATIC sleep mode).
+ *
+ * First, map the interrupt line to the GPIO pin with the right
+ * peripheral function.
+ */
+ gpio_enable_module_pin(AVR32_PIN_PA20, AVR32_EIC_EXTINT_8_FUNCTION);
+
+ /*
+ * Enable the internal pull-up resistor on that pin (because the EIC is
+ * configured such that the interrupt will trigger on low-level, see
+ * eic_options.eic_level).
+ */
+ gpio_enable_pin_pull_up(AVR32_PIN_PA20);
+
+ // Init the EIC controller with the set options.
+ eic_init(&AVR32_EIC, &eic_options, sizeof(eic_options) /
+ sizeof(eic_options_t));
+
+ // Enable External Interrupt Controller Line
+ eic_enable_line(&AVR32_EIC, EXT_NMI);
+}
+
+void ui_wakeup_disable(void)
+{
+ eic_disable_line(&AVR32_EIC, EXT_NMI);
+ /* Disable joystick input change ITs. */
+ gpio_disable_pin_interrupt(AVR32_PIN_PA20);
+}
+
+
+void ui_wakeup(void)
+{
+ LED_On(LED0);
+}
+
+
+void ui_process(uint16_t framenumber)
+{
+ static uint8_t cpt_sof = 0;
+
+ if ((framenumber % 1000) == 0) {
+ LED_On(LED1);
+ }
+ if ((framenumber % 1000) == 500) {
+ LED_Off(LED1);
+ }
+ // Scan process running each 2ms
+ cpt_sof++;
+ if (2 > cpt_sof)
+ return;
+ cpt_sof = 0;
+
+ // Scan move on SW2 (right)
+ if (gpio_get_pin_value(GPIO_PUSH_BUTTON_SW2) ==
+ GPIO_PUSH_BUTTON_SW2_PRESSED)
+ udi_hid_mouse_moveX(MOUSE_MOVE_RANGE);
+}
+
+/**
+ * \defgroup UI User Interface
+ *
+ * Human interface on EVK1104 :
+ * - PWR led is on when power present
+ * - Led 0 is on when USB line is in IDLE mode, and off in SUSPEND mode
+ * - Led 1 blinks when USB Host have checked and enabled HID mouse interface
+ * - Mouse buttons are not linked.
+ * - Only SW2 allows to move mouse on X axe.
+ * - Only a low level on J17.7 will generate a wakeup to USB Host in remote wakeup mode.
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3b0256_evk1101/conf_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3b0256_evk1101/conf_board.h
new file mode 100644
index 0000000..4552eb6
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3b0256_evk1101/conf_board.h
@@ -0,0 +1,43 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Board configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H_INCLUDED
+#define CONF_BOARD_H_INCLUDED
+
+// Only the default board init (switchs/leds) is necessary for this example
+
+#endif /* CONF_BOARD_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3b0256_evk1101/conf_clock.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3b0256_evk1101/conf_clock.h
new file mode 100644
index 0000000..b75541d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3b0256_evk1101/conf_clock.h
@@ -0,0 +1,75 @@
+/**
+ * \file
+ *
+ * \brief Chip-specific system clock manager configuration
+ *
+ * Copyright (C) 2011 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_CLOCK_H_INCLUDED
+#define CONF_CLOCK_H_INCLUDED
+
+// ===== System Clock Source Options
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_RCSYS
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_OSC0
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL0
+
+// ===== PLL0 Options
+#define CONFIG_PLL0_SOURCE PLL_SRC_OSC0
+//#define CONFIG_PLL0_SOURCE PLL_SRC_OSC1
+#define CONFIG_PLL0_MUL 8 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+#define CONFIG_PLL0_DIV 2 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+
+// ===== PLL1 Options
+//#define CONFIG_PLL1_SOURCE PLL_SRC_OSC0
+//#define CONFIG_PLL1_SOURCE PLL_SRC_OSC1
+//#define CONFIG_PLL1_MUL 8 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+//#define CONFIG_PLL1_DIV 2 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+
+// ===== System Clock Bus Division Options
+//#define CONFIG_SYSCLK_CPU_DIV 0 /* Fcpu = Fsys/(2 ^ CPU_div) */
+//#define CONFIG_SYSCLK_PBA_DIV 0 /* Fpba = Fsys/(2 ^ PBA_div) */
+//#define CONFIG_SYSCLK_PBB_DIV 0 /* Fpbb = Fsys/(2 ^ PBB_div) */
+
+// ===== Peripheral Clock Management Options
+//#define CONFIG_SYSCLK_INIT_CPUMASK ((1 << SYSCLK_SYSTIMER) | (1 << SYSCLK_OCD))
+//#define CONFIG_SYSCLK_INIT_PBAMASK (1 << SYSCLK_USART0)
+//#define CONFIG_SYSCLK_INIT_PBBMASK (1 << SYSCLK_HMATRIX)
+//#define CONFIG_SYSCLK_INIT_HSBMASK (1 << SYSCLK_MDMA_HSB)
+
+// ===== USB Clock Source Options
+//#define CONFIG_USBCLK_SOURCE USBCLK_SRC_OSC0
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL0
+//#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL1
+#define CONFIG_USBCLK_DIV 1 /* Fusb = Fsys/(2 ^ USB_div) */
+
+#endif /* CONF_CLOCK_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3b0256_evk1101/conf_sleepmgr.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3b0256_evk1101/conf_sleepmgr.h
new file mode 100644
index 0000000..699010d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3b0256_evk1101/conf_sleepmgr.h
@@ -0,0 +1,43 @@
+/**
+ * \file
+ *
+ * \brief Sleep manager configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SLEEPMGR_H
+#define CONF_SLEEPMGR_H
+
+#define CONFIG_SLEEPMGR_ENABLE
+
+#endif /* CONF_SLEEPMGR_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3b0256_evk1101/ui.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3b0256_evk1101/ui.c
new file mode 100644
index 0000000..eb291f9
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3b0256_evk1101/ui.c
@@ -0,0 +1,249 @@
+/**
+ * \file
+ *
+ * \brief User Interface
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "udc.h"
+#include "udi_hid_mouse.h"
+#include "board.h"
+#include "sysclk.h"
+#include "gpio.h"
+#include "joystick.h"
+#include "lis3l06al.h"
+#include "eic.h"
+#include "ui.h"
+
+#define MOUSE_MOVE_RANGE (3*4)
+
+// Interrupt on "pin change" from switch to do wakeup on USB
+// Note:
+// This interrupt is enable when the USB host enable remotewakeup feature
+// This interrupt wakeup the CPU if this one is in idle mode
+ISR(ui_wakeup_isr, AVR32_GPIO0_IRQ_GROUP, 0)
+{
+ // Clear GPIO interrupts.
+ gpio_clear_pin_interrupt_flag(GPIO_PUSH_BUTTON_0);
+ gpio_clear_pin_interrupt_flag(GPIO_PUSH_BUTTON_1);
+ // Clear External Interrupt Line else Wakeup event always enabled
+ eic_clear_interrupt_line(&AVR32_EIC, EXT_INT6);
+ eic_clear_interrupt_line(&AVR32_EIC, EXT_INT7);
+ // It is a wakeup then send wakeup USB
+ udc_wakeup();
+}
+
+
+void ui_init(void)
+{
+ // Initialize accelerometer driver
+ sysclk_enable_pba_module(SYSCLK_ADC);
+ acc_init();
+
+ /* register joystick handler on level 0 */
+ irqflags_t flags = cpu_irq_save();
+ irq_register_handler(ui_wakeup_isr,
+ AVR32_GPIO_IRQ_0 + (GPIO_PUSH_BUTTON_0 / 8), 0);
+ cpu_irq_restore(flags);
+
+ LED_On(LED0);
+ LED_Off(LED1);
+}
+
+void ui_powerdown(void)
+{
+ LED_Off(LED0);
+ LED_Off(LED1);
+}
+
+
+//! Structure holding the configuration parameters of the EIC low level driver.
+static eic_options_t eic_options = {
+ // Enable level-triggered interrupt.
+ .eic_mode = EIC_MODE_LEVEL_TRIGGERED,
+ // Don't care value because the chosen eic mode is level-triggered.
+ .eic_edge = 0,
+ // Interrupt will trigger on low-level.
+ .eic_level = EIC_LEVEL_LOW_LEVEL,
+ // Enable filter.
+ .eic_filter = EIC_FILTER_ENABLED,
+ // For Wake Up mode, initialize in asynchronous mode
+ .eic_async = EIC_ASYNCH_MODE
+};
+
+
+void ui_wakeup_enable(void)
+{
+ /* configure buttons to produce IT on all state change */
+ gpio_enable_pin_interrupt(GPIO_PUSH_BUTTON_0, GPIO_PIN_CHANGE);
+ gpio_enable_pin_interrupt(GPIO_PUSH_BUTTON_1, GPIO_PIN_CHANGE);
+ /*
+ * Configure pin change interrupt for asynchronous wake-up (required to
+ * wake up from the STATIC sleep mode).
+ *
+ * First, map the interrupt line to the GPIO pin with the right
+ * peripheral function.
+ */
+ gpio_enable_module_pin(GPIO_PUSH_BUTTON_0, AVR32_EIC_EXTINT_6_FUNCTION);
+ gpio_enable_module_pin(GPIO_PUSH_BUTTON_1, AVR32_EIC_EXTINT_7_FUNCTION);
+
+ /*
+ * Enable the internal pull-up resistor on that pin (because the EIC is
+ * configured such that the interrupt will trigger on low-level, see
+ * eic_options.eic_level).
+ */
+ gpio_enable_pin_pull_up(GPIO_PUSH_BUTTON_0);
+ gpio_enable_pin_pull_up(GPIO_PUSH_BUTTON_1);
+
+ // Init the EIC controller with the set options.
+ eic_options.eic_line = EXT_INT6;
+ eic_init(&AVR32_EIC, &eic_options,
+ sizeof(eic_options) / sizeof(eic_options_t));
+ eic_options.eic_line = EXT_INT7;
+ eic_init(&AVR32_EIC, &eic_options,
+ sizeof(eic_options) / sizeof(eic_options_t));
+ // Enable External Interrupt Controller Line
+ eic_enable_line(&AVR32_EIC, EXT_INT6);
+ eic_enable_line(&AVR32_EIC, EXT_INT7);
+}
+
+void ui_wakeup_disable(void)
+{
+ eic_disable_line(&AVR32_EIC, EXT_INT6);
+ eic_disable_line(&AVR32_EIC, EXT_INT7);
+ /* Disable joystick input change ITs. */
+ gpio_disable_pin_interrupt(GPIO_PUSH_BUTTON_0);
+ gpio_disable_pin_interrupt(GPIO_PUSH_BUTTON_1);
+}
+
+void ui_wakeup(void)
+{
+ LED_On(LED0);
+}
+
+void ui_process(uint16_t framenumber)
+{
+ bool b_btn_state;
+ static bool btn_left_last_state = HID_MOUSE_BTN_UP;
+ static bool btn_right_last_state = HID_MOUSE_BTN_UP;
+ static bool btn_middle_last_state = HID_MOUSE_BTN_UP;
+ uint8_t i;
+ signed int val;
+ struct cal_t {
+ uint8_t angle;
+ int8_t move;
+ } calibration_acc[5] = {
+ {
+ 40, 10 * MOUSE_MOVE_RANGE}, {
+ 30, 6 * MOUSE_MOVE_RANGE}, {
+ 20, 4 * MOUSE_MOVE_RANGE}, {
+ 15, 2 * MOUSE_MOVE_RANGE}, {
+ 10, 1 * MOUSE_MOVE_RANGE}};
+ static uint8_t cpt_sof = 0;
+
+ if ((framenumber % 1000) == 0) {
+ LED_On(LED1);
+ }
+ if ((framenumber % 1000) == 500) {
+ LED_Off(LED1);
+ }
+ // Scan process running each 40ms
+ cpt_sof++;
+ if (40 > cpt_sof)
+ return;
+ cpt_sof = 0;
+
+ // Scan buttons on switch 0 (left), 1 (right), joystick_press (middle),
+ b_btn_state = (!gpio_get_pin_value(GPIO_PUSH_BUTTON_0)) ?
+ HID_MOUSE_BTN_DOWN : HID_MOUSE_BTN_UP;
+ if (b_btn_state != btn_left_last_state) {
+ udi_hid_mouse_btnleft(b_btn_state);
+ btn_left_last_state = b_btn_state;
+ }
+ b_btn_state = (is_joystick_pressed())? HID_MOUSE_BTN_DOWN :
+ HID_MOUSE_BTN_UP;
+ if (b_btn_state != btn_middle_last_state) {
+ udi_hid_mouse_btnmiddle(b_btn_state);
+ btn_middle_last_state = b_btn_state;
+ }
+ b_btn_state = (!gpio_get_pin_value(GPIO_PUSH_BUTTON_1)) ?
+ HID_MOUSE_BTN_DOWN : HID_MOUSE_BTN_UP;
+ if (b_btn_state != btn_right_last_state) {
+ udi_hid_mouse_btnright(b_btn_state);
+ btn_right_last_state = b_btn_state;
+ }
+ // Look joystick activity for the Wheel events
+ if (is_joystick_up())
+ udi_hid_mouse_moveScroll(MOUSE_MOVE_RANGE);
+ if (is_joystick_down())
+ udi_hid_mouse_moveScroll(-MOUSE_MOVE_RANGE);
+
+ // Look accelerometer activity for the X and Y events
+ acc_update(); // Get accelerometer acquisition and process data
+ for (i = 0; i < (sizeof(calibration_acc) / sizeof(struct cal_t)); i++) {
+ val = is_acc_abs_angle_x(calibration_acc[i].angle);
+ if (0 == val)
+ continue;
+ if (0 < val)
+ udi_hid_mouse_moveX(0 - calibration_acc[i].move);
+ else
+ udi_hid_mouse_moveX(calibration_acc[i].move);
+ break;
+ }
+ for (i = 0; i < (sizeof(calibration_acc) / sizeof(struct cal_t)); i++) {
+ val = is_acc_abs_angle_y(calibration_acc[i].angle);
+ if (0 == val)
+ continue;
+ if (0 < val)
+ udi_hid_mouse_moveY(0 - calibration_acc[i].move);
+ else
+ udi_hid_mouse_moveY(calibration_acc[i].move);
+ break;
+ }
+}
+
+/**
+ * \defgroup UI User Interface
+ *
+ * Human interface on EVK1101 :
+ * - PWR led is on when power present
+ * - Led 0 is on when USB line is in IDLE mode, and off in SUSPEND mode
+ * - Led 1 blinks when USB Host have checked and enabled HID mouse interface
+ * - Mouse buttons are linked to switch PB0 (left), PB1 (right), joystick press (middle)
+ * - Look accelerometer activity for the X and Y mouse events
+ * - Look joystick activity for the Wheel events
+ * - The PB0 and PB1 can be used to wakeup USB Host in remote wakeup mode.
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3c0512_uc3c_ek/conf_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3c0512_uc3c_ek/conf_board.h
new file mode 100644
index 0000000..4552eb6
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3c0512_uc3c_ek/conf_board.h
@@ -0,0 +1,43 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Board configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H_INCLUDED
+#define CONF_BOARD_H_INCLUDED
+
+// Only the default board init (switchs/leds) is necessary for this example
+
+#endif /* CONF_BOARD_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3c0512_uc3c_ek/conf_clock.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3c0512_uc3c_ek/conf_clock.h
new file mode 100644
index 0000000..6212f66
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3c0512_uc3c_ek/conf_clock.h
@@ -0,0 +1,83 @@
+/**
+ * \file
+ *
+ * \brief Chip-specific system clock manager configuration
+ *
+ * Copyright (C) 2011 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_CLOCK_H_INCLUDED
+#define CONF_CLOCK_H_INCLUDED
+
+// ===== System Clock Source Options
+//! CPU clock need of clock > 25MHz to run with USBC
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_RCSYS
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_OSC0
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_OSC1
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL0
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL1
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_RC8M
+
+// ===== PLL0 Options
+#define CONFIG_PLL0_SOURCE PLL_SRC_OSC0
+//#define CONFIG_PLL0_SOURCE PLL_SRC_OSC1
+//#define CONFIG_PLL0_SOURCE PLL_SRC_RC8M
+#define CONFIG_PLL0_MUL 3 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+#define CONFIG_PLL0_DIV 1 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+
+// ===== PLL1 Options
+//#define CONFIG_PLL1_SOURCE PLL_SRC_OSC0
+//#define CONFIG_PLL1_SOURCE PLL_SRC_OSC1
+//#define CONFIG_PLL1_SOURCE PLL_SRC_RC8M
+//#define CONFIG_PLL1_MUL 3 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+//#define CONFIG_PLL1_DIV 1 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+
+// ===== System Clock Bus Division Options
+//#define CONFIG_SYSCLK_CPU_DIV 0 /* Fcpu = Fsys/(2 ^ CPU_div) */
+//#define CONFIG_SYSCLK_PBA_DIV 0 /* Fpba = Fsys/(2 ^ PBA_div) */
+//#define CONFIG_SYSCLK_PBB_DIV 0 /* Fpbb = Fsys/(2 ^ PBB_div) */
+//#define CONFIG_SYSCLK_PBC_DIV 0 /* Fpbc = Fsys/(2 ^ PBC_div) */
+
+// ===== Peripheral Clock Management Options
+//#define CONFIG_SYSCLK_INIT_CPUMASK ((1 << SYSCLK_SYSTIMER) | (1 << SYSCLK_OCD))
+//#define CONFIG_SYSCLK_INIT_PBAMASK (1 << SYSCLK_USART0)
+//#define CONFIG_SYSCLK_INIT_PBBMASK (1 << SYSCLK_HMATRIX)
+//#define CONFIG_SYSCLK_INIT_HSBMASK (1 << SYSCLK_MDMA_HSB)
+
+// ===== USB Clock Source Options
+//#define CONFIG_USBCLK_SOURCE USBCLK_SRC_OSC0
+//#define CONFIG_USBCLK_SOURCE USBCLK_SRC_OSC1
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL0
+//#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL1
+#define CONFIG_USBCLK_DIV 1 /* Fusb = Fsys/(2 ^ USB_div) */
+
+#endif /* CONF_CLOCK_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3c0512_uc3c_ek/conf_sleepmgr.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3c0512_uc3c_ek/conf_sleepmgr.h
new file mode 100644
index 0000000..699010d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3c0512_uc3c_ek/conf_sleepmgr.h
@@ -0,0 +1,43 @@
+/**
+ * \file
+ *
+ * \brief Sleep manager configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SLEEPMGR_H
+#define CONF_SLEEPMGR_H
+
+#define CONFIG_SLEEPMGR_ENABLE
+
+#endif /* CONF_SLEEPMGR_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3c0512_uc3c_ek/ui.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3c0512_uc3c_ek/ui.c
new file mode 100644
index 0000000..d54af78
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3c0512_uc3c_ek/ui.c
@@ -0,0 +1,188 @@
+/**
+ * \file
+ *
+ * \brief User Interface
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "udc.h"
+#include "udi_hid_mouse.h"
+#include "board.h"
+#include "gpio.h"
+#include "eic.h"
+#include "ui.h"
+
+#define MOUSE_MOVE_RANGE 3
+
+// Interrupt on "pin change" from switch to do wakeup on USB
+// Note:
+// This interrupt is enable when the USB host enable remotewakeup feature
+// This interrupt wakeup the CPU if this one is in idle mode
+ISR(ui_wakeup_isr, AVR32_GPIO_IRQ_GROUP, 0)
+{
+ // Clear GPIO interrupt.
+ gpio_clear_pin_interrupt_flag(GPIO_PUSH_BUTTON_1);
+ // Clear External Interrupt Line else Wakeup event always enabled
+ eic_clear_interrupt_line(&AVR32_EIC, EXT_NMI);
+ // It is a wakeup then send wakeup USB
+ udc_wakeup();
+}
+
+
+void ui_init(void)
+{
+ /* register joystick handler on level 0 */
+ irqflags_t flags = cpu_irq_save();
+ irq_register_handler(ui_wakeup_isr,
+ AVR32_GPIO_IRQ_0 + (GPIO_PUSH_BUTTON_1 / 8), 0);
+ cpu_irq_restore(flags);
+
+ LED_On(LED0);
+ LED_Off(LED1);
+}
+
+void ui_powerdown(void)
+{
+ LED_Off(LED0);
+ LED_Off(LED1);
+}
+
+
+//! Structure holding the configuration parameters of the EIC low level driver.
+static const eic_options_t eic_options = {
+ // Choose External Interrupt Controller Line
+ .eic_line = EXT_NMI,
+ // Enable level-triggered interrupt.
+ .eic_mode = EIC_MODE_LEVEL_TRIGGERED,
+ // Don't care value because the chosen eic mode is level-triggered.
+ .eic_edge = 0,
+ // Interrupt will trigger on low-level.
+ .eic_level = EIC_LEVEL_LOW_LEVEL,
+ // Enable filter.
+ .eic_filter = EIC_FILTER_ENABLED,
+ // For Wake Up mode, initialize in asynchronous mode
+ .eic_async = EIC_ASYNCH_MODE
+};
+
+
+void ui_wakeup_enable(void)
+{
+ /* configure joystick to produce IT on all state change */
+ gpio_enable_pin_interrupt(GPIO_PUSH_BUTTON_1, GPIO_PIN_CHANGE);
+ /*
+ * Configure pin change interrupt for asynchronous wake-up (required to
+ * wake up from the STATIC sleep mode).
+ *
+ * First, map the interrupt line to the GPIO pin with the right
+ * peripheral function.
+ */
+ gpio_enable_module_pin(GPIO_PUSH_BUTTON_1, AVR32_EIC_EXTINT_0_FUNCTION);
+
+ /*
+ * Enable the internal pull-up resistor on that pin (because the EIC is
+ * configured such that the interrupt will trigger on low-level, see
+ * eic_options.eic_level).
+ */
+ gpio_enable_pin_pull_up(GPIO_PUSH_BUTTON_1);
+
+ // Init the EIC controller with the set options.
+ eic_init(&AVR32_EIC, &eic_options, sizeof(eic_options) /
+ sizeof(eic_options_t));
+
+ // Enable External Interrupt Controller Line
+ eic_enable_line(&AVR32_EIC, EXT_NMI);
+}
+
+void ui_wakeup_disable(void)
+{
+ eic_disable_line(&AVR32_EIC, EXT_NMI);
+ /* Disable joystick input change ITs. */
+ gpio_disable_pin_interrupt(GPIO_PUSH_BUTTON_1);
+}
+
+void ui_wakeup(void)
+{
+ LED_On(LED0);
+}
+
+void ui_process(uint16_t framenumber)
+{
+ static uint8_t cpt_sof = 0;
+
+ if ((framenumber % 1000) == 0) {
+ LED_On(LED1);
+ }
+ if ((framenumber % 1000) == 500) {
+ LED_Off(LED1);
+ }
+ // Scan process running each 2ms
+ cpt_sof++;
+ if (2 > cpt_sof)
+ return;
+ cpt_sof = 0;
+
+ // No Scan buttons
+ // Look touch sensor activity for the X and Y events
+ if (!gpio_get_pin_value(GPIO_PUSH_BUTTON_0)) {
+ udi_hid_mouse_moveX(-MOUSE_MOVE_RANGE);
+ }
+ if (!gpio_get_pin_value(GPIO_PUSH_BUTTON_1)) {
+ udi_hid_mouse_moveX(MOUSE_MOVE_RANGE);
+ }
+/*
+ // Look touch sensor activity for the X and Y events
+ if( is_touch_sensor_2() )
+ udi_hid_mouse_moveX( MOUSE_MOVE_RANGE);
+ if( is_touch_sensor_3() )
+ udi_hid_mouse_moveX(-MOUSE_MOVE_RANGE);
+ if( is_touch_sensor_1() )
+ udi_hid_mouse_moveY( MOUSE_MOVE_RANGE);
+ if( is_touch_sensor_0() )
+ udi_hid_mouse_moveY(-MOUSE_MOVE_RANGE);
+*/
+}
+
+/**
+ * \defgroup UI User Interface
+ *
+ * Human interface on UC3C_EK :
+ * - PWR led is on when power present
+ * - Led 0 is on when USB line is in IDLE mode, and off in SUSPEND mode
+ * - Led 1 blinks when USB Host have checked and enabled HID mouse interface
+ * - Mouse buttons are not linked.
+ * - Touch sensors are used to move mouse
+ * - No button are linked to wakeup USB Host in remote wakeup mode.
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3c2512c_uc3_c2_xplained/conf_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3c2512c_uc3_c2_xplained/conf_board.h
new file mode 100644
index 0000000..4552eb6
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3c2512c_uc3_c2_xplained/conf_board.h
@@ -0,0 +1,43 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Board configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H_INCLUDED
+#define CONF_BOARD_H_INCLUDED
+
+// Only the default board init (switchs/leds) is necessary for this example
+
+#endif /* CONF_BOARD_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3c2512c_uc3_c2_xplained/conf_clock.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3c2512c_uc3_c2_xplained/conf_clock.h
new file mode 100644
index 0000000..8944f15
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3c2512c_uc3_c2_xplained/conf_clock.h
@@ -0,0 +1,82 @@
+/**
+ * \file
+ *
+ * \brief Chip-specific system clock manager configuration
+ *
+ * Copyright (C) 2011 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_CLOCK_H_INCLUDED
+#define CONF_CLOCK_H_INCLUDED
+
+// ===== System Clock Source Options
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_RCSYS
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_OSC0
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_OSC1
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL0
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL1
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_RC8M
+
+// ===== PLL0 Options
+#define CONFIG_PLL0_SOURCE PLL_SRC_OSC0
+//#define CONFIG_PLL0_SOURCE PLL_SRC_OSC1
+//#define CONFIG_PLL0_SOURCE PLL_SRC_RC8M
+#define CONFIG_PLL0_MUL 3 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+#define CONFIG_PLL0_DIV 1 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+
+// ===== PLL1 Options
+//#define CONFIG_PLL1_SOURCE PLL_SRC_OSC0
+//#define CONFIG_PLL1_SOURCE PLL_SRC_OSC1
+//#define CONFIG_PLL1_SOURCE PLL_SRC_RC8M
+//#define CONFIG_PLL1_MUL 3 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+//#define CONFIG_PLL1_DIV 1 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+
+// ===== System Clock Bus Division Options
+//#define CONFIG_SYSCLK_CPU_DIV 0 /* Fcpu = Fsys/(2 ^ CPU_div) */
+//#define CONFIG_SYSCLK_PBA_DIV 0 /* Fpba = Fsys/(2 ^ PBA_div) */
+//#define CONFIG_SYSCLK_PBB_DIV 0 /* Fpbb = Fsys/(2 ^ PBB_div) */
+//#define CONFIG_SYSCLK_PBC_DIV 0 /* Fpbc = Fsys/(2 ^ PBC_div) */
+
+// ===== Peripheral Clock Management Options
+//#define CONFIG_SYSCLK_INIT_CPUMASK ((1 << SYSCLK_SYSTIMER) | (1 << SYSCLK_OCD))
+//#define CONFIG_SYSCLK_INIT_PBAMASK (1 << SYSCLK_USART0)
+//#define CONFIG_SYSCLK_INIT_PBBMASK (1 << SYSCLK_HMATRIX)
+//#define CONFIG_SYSCLK_INIT_HSBMASK (1 << SYSCLK_MDMA_HSB)
+
+// ===== USB Clock Source Options
+//#define CONFIG_USBCLK_SOURCE USBCLK_SRC_OSC0
+//#define CONFIG_USBCLK_SOURCE USBCLK_SRC_OSC1
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL0
+//#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL1
+#define CONFIG_USBCLK_DIV 1 /* Fusb = Fsys/(2 ^ USB_div) */
+
+#endif /* CONF_CLOCK_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3c2512c_uc3_c2_xplained/conf_sleepmgr.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3c2512c_uc3_c2_xplained/conf_sleepmgr.h
new file mode 100644
index 0000000..699010d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3c2512c_uc3_c2_xplained/conf_sleepmgr.h
@@ -0,0 +1,43 @@
+/**
+ * \file
+ *
+ * \brief Sleep manager configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SLEEPMGR_H
+#define CONF_SLEEPMGR_H
+
+#define CONFIG_SLEEPMGR_ENABLE
+
+#endif /* CONF_SLEEPMGR_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3c2512c_uc3_c2_xplained/ui.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3c2512c_uc3_c2_xplained/ui.c
new file mode 100644
index 0000000..d1d6fc2
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/at32uc3c2512c_uc3_c2_xplained/ui.c
@@ -0,0 +1,188 @@
+/**
+ * \file
+ *
+ * \brief User Interface
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "udc.h"
+#include "udi_hid_mouse.h"
+#include "board.h"
+#include "gpio.h"
+#include "eic.h"
+#include "ui.h"
+
+#define MOUSE_MOVE_RANGE 3
+
+// Interrupt on "pin change" from switch to do wakeup on USB
+// Note:
+// This interrupt is enable when the USB host enable remotewakeup feature
+// This interrupt wakeup the CPU if this one is in idle mode
+ISR(ui_wakeup_isr, AVR32_GPIO_IRQ_GROUP, 0)
+{
+ // Clear GPIO interrupt.
+ gpio_clear_pin_interrupt_flag(GPIO_PUSH_BUTTON_2);
+ // Clear External Interrupt Line else Wakeup event always enabled
+ eic_clear_interrupt_line(&AVR32_EIC, EXT_NMI);
+ // It is a wakeup then send wakeup USB
+ udc_wakeup();
+}
+
+
+void ui_init(void)
+{
+ /* register joystick handler on level 0 */
+ irqflags_t flags = cpu_irq_save();
+ irq_register_handler(ui_wakeup_isr,
+ AVR32_GPIO_IRQ_0 + (GPIO_PUSH_BUTTON_2 / 8), 0);
+ cpu_irq_restore(flags);
+
+ LED_On(LED0);
+ //LED_Off(LED1);
+}
+
+void ui_powerdown(void)
+{
+ LED_Off(LED0);
+ //LED_Off(LED1);
+}
+
+
+//! Structure holding the configuration parameters of the EIC low level driver.
+static const eic_options_t eic_options = {
+ // Choose External Interrupt Controller Line
+ .eic_line = EXT_NMI,
+ // Enable level-triggered interrupt.
+ .eic_mode = EIC_MODE_LEVEL_TRIGGERED,
+ // Don't care value because the chosen eic mode is level-triggered.
+ .eic_edge = 0,
+ // Interrupt will trigger on low-level.
+ .eic_level = EIC_LEVEL_LOW_LEVEL,
+ // Enable filter.
+ .eic_filter = EIC_FILTER_ENABLED,
+ // For Wake Up mode, initialize in asynchronous mode
+ .eic_async = EIC_ASYNCH_MODE
+};
+
+
+void ui_wakeup_enable(void)
+{
+ /* configure joystick to produce IT on all state change */
+ gpio_enable_pin_interrupt(GPIO_PUSH_BUTTON_2, GPIO_PIN_CHANGE);
+ /*
+ * Configure pin change interrupt for asynchronous wake-up (required to
+ * wake up from the STATIC sleep mode).
+ *
+ * First, map the interrupt line to the GPIO pin with the right
+ * peripheral function.
+ */
+ gpio_enable_module_pin(GPIO_PUSH_BUTTON_2, AVR32_EIC_EXTINT_0_1_FUNCTION);
+
+ /*
+ * Enable the internal pull-up resistor on that pin (because the EIC is
+ * configured such that the interrupt will trigger on low-level, see
+ * eic_options.eic_level).
+ */
+ gpio_enable_pin_pull_up(GPIO_PUSH_BUTTON_2);
+
+ // Init the EIC controller with the set options.
+ eic_init(&AVR32_EIC, &eic_options, sizeof(eic_options) /
+ sizeof(eic_options_t));
+
+ // Enable External Interrupt Controller Line
+ eic_enable_line(&AVR32_EIC, EXT_NMI);
+}
+
+void ui_wakeup_disable(void)
+{
+ eic_disable_line(&AVR32_EIC, EXT_NMI);
+ /* Disable joystick input change ITs. */
+ gpio_disable_pin_interrupt(GPIO_PUSH_BUTTON_2);
+}
+
+void ui_wakeup(void)
+{
+ LED_On(LED0);
+}
+
+void ui_process(uint16_t framenumber)
+{
+ static uint8_t cpt_sof = 0;
+
+ if ((framenumber % 1000) == 0) {
+ LED_On(LED1);
+ }
+ if ((framenumber % 1000) == 500) {
+ //LED_Off(LED1);
+ }
+ // Scan process running each 2ms
+ cpt_sof++;
+ if (2 > cpt_sof)
+ return;
+ cpt_sof = 0;
+
+ // No Scan buttons
+ // Look touch sensor activity for the X and Y events
+ if (!gpio_get_pin_value(GPIO_PUSH_BUTTON_0)) {
+ udi_hid_mouse_moveX(-MOUSE_MOVE_RANGE);
+ }
+ if (!gpio_get_pin_value(GPIO_PUSH_BUTTON_2)) {
+ udi_hid_mouse_moveX(MOUSE_MOVE_RANGE);
+ }
+/*
+ // Look touch sensor activity for the X and Y events
+ if( is_touch_sensor_2() )
+ udi_hid_mouse_moveX( MOUSE_MOVE_RANGE);
+ if( is_touch_sensor_3() )
+ udi_hid_mouse_moveX(-MOUSE_MOVE_RANGE);
+ if( is_touch_sensor_1() )
+ udi_hid_mouse_moveY( MOUSE_MOVE_RANGE);
+ if( is_touch_sensor_0() )
+ udi_hid_mouse_moveY(-MOUSE_MOVE_RANGE);
+*/
+}
+
+/**
+ * \defgroup UI User Interface
+ *
+ * Human interface on UC3C_EK :
+ * - PWR led is on when power present
+ * - Led 0 is on when USB line is in IDLE mode, and off in SUSPEND mode
+ * - Led 1 blinks when USB Host have checked and enabled HID mouse interface
+ * - Mouse buttons are not linked.
+ * - Touch sensors are used to move mouse
+ * - No button are linked to wakeup USB Host in remote wakeup mode.
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atuc128d3_evk1101/conf_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atuc128d3_evk1101/conf_board.h
new file mode 100644
index 0000000..d89a271
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atuc128d3_evk1101/conf_board.h
@@ -0,0 +1,43 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Board configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H_INCLUDED
+#define CONF_BOARD_H_INCLUDED
+
+// Only the default board init (switchs/leds) is necessary for HID mouse example
+
+#endif /* CONF_BOARD_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atuc128d3_evk1101/conf_clock.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atuc128d3_evk1101/conf_clock.h
new file mode 100644
index 0000000..5d352dd
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atuc128d3_evk1101/conf_clock.h
@@ -0,0 +1,75 @@
+/**
+ * \file
+ *
+ * \brief Chip-specific system clock manager configuration
+ *
+ * Copyright (C) 2011 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_CLOCK_H_INCLUDED
+#define CONF_CLOCK_H_INCLUDED
+
+// ===== System Clock Source Options
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_RCSYS
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_OSC0
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL0
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL1
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_RC120M
+
+// ===== PLL0 Options
+//#define CONFIG_PLL0_SOURCE PLL_SRC_OSC0
+//#define CONFIG_PLL0_MUL 4 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+//#define CONFIG_PLL0_DIV 1 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+
+// ===== PLL1 Options
+#define CONFIG_PLL1_SOURCE PLL_SRC_OSC0
+#define CONFIG_PLL1_MUL 8 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+#define CONFIG_PLL1_DIV 2 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+
+// ===== System Clock Bus Division Options
+//#define CONFIG_SYSCLK_CPU_DIV 0 /* Fcpu = Fsys/(2 ^ CPU_div) */
+//#define CONFIG_SYSCLK_PBA_DIV 0 /* Fpba = Fsys/(2 ^ PBA_div) */
+//#define CONFIG_SYSCLK_PBB_DIV 0 /* Fpbb = Fsys/(2 ^ PBB_div) */
+
+// ===== Peripheral Clock Management Options
+//#define CONFIG_SYSCLK_INIT_CPUMASK ((1 << SYSCLK_SYSTIMER) | (1 << SYSCLK_OCD))
+//#define CONFIG_SYSCLK_INIT_PBAMASK (1 << SYSCLK_USART0)
+//#define CONFIG_SYSCLK_INIT_PBBMASK (1 << SYSCLK_HMATRIX)
+//#define CONFIG_SYSCLK_INIT_HSBMASK (1 << SYSCLK_MDMA_HSB)
+
+// ===== USB Clock Source Options
+//#define CONFIG_USBCLK_SOURCE USBCLK_SRC_OSC0
+//#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL0
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL1
+#define CONFIG_USBCLK_DIV 1 /* Fusb = Fsys/(2 ^ USB_div) */
+
+#endif /* CONF_CLOCK_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atuc128d3_evk1101/conf_sleepmgr.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atuc128d3_evk1101/conf_sleepmgr.h
new file mode 100644
index 0000000..341afd2
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atuc128d3_evk1101/conf_sleepmgr.h
@@ -0,0 +1,43 @@
+/**
+ * \file
+ *
+ * \brief Sleep manager configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SLEEPMGR_H
+#define CONF_SLEEPMGR_H
+
+#define CONFIG_SLEEPMGR_ENABLE
+
+#endif /* CONF_SLEEPMGR_H */ \ No newline at end of file
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atuc128d3_evk1101/gcc/Makefile b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atuc128d3_evk1101/gcc/Makefile
new file mode 100644
index 0000000..5f2fb15
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atuc128d3_evk1101/gcc/Makefile
@@ -0,0 +1,598 @@
+# Hey Emacs, this is a -*- makefile -*-
+
+# Goals available on make command line:
+#
+# [all] Default goal: build the project.
+# clean Clean up the project.
+# rebuild Rebuild the project.
+# ccversion Display CC version information.
+# cppfiles file.i Generate preprocessed files from C source files.
+# asfiles file.si Generate preprocessed assembler files from C and assembler source files.
+# objfiles file.o Generate object files from C and assembler source files.
+# a file.a Archive: create A output file from object files.
+# elf file.elf Link: create ELF output file from object files.
+# lss file.lss Create extended listing from target output file.
+# sym file.sym Create symbol table from target output file.
+# hex file.hex Create Intel HEX image from ELF output file.
+# bin file.bin Create binary image from ELF output file.
+# sizes Display target size information.
+# isp Use ISP instead of JTAGICE mkII when programming.
+# cpuinfo Get CPU information.
+# halt Stop CPU execution.
+# chiperase Perform a JTAG Chip Erase command.
+# erase Perform a flash chip erase.
+# program Program MCU memory from ELF output file.
+# secureflash Protect chip by setting security bit.
+# reset Reset MCU.
+# debug Open a debug connection with the MCU.
+# run Start CPU execution.
+# readregs Read CPU registers.
+# doc Build the documentation.
+# cleandoc Clean up the documentation.
+# rebuilddoc Rebuild the documentation.
+# verbose Display main executed commands.
+
+# Copyright (c) 2009 Atmel Corporation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice, this
+# list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# 3. The name of Atmel may not be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# 4. This software may only be redistributed and used in connection with an Atmel
+# AVR product.
+#
+# THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+# EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+#
+
+# ** ** ** *** ** ** ** ** ** ** ** ** ** ** **
+# ENVIRONMENT SETTINGS
+# ** ** ** *** ** ** ** ** ** ** ** ** ** ** **
+
+FirstWord = $(if $(1),$(word 1,$(1)))
+LastWord = $(if $(1),$(word $(words $(1)),$(1)))
+
+MAKE = make
+MAKECFG = config.mk
+TGTTYPE = $(suffix $(TARGET))
+
+RM = rm -Rf
+
+AR = avr32-ar
+ARFLAGS = rcs
+
+CPP = $(CC) -E
+CPPFLAGS = $(ARCH:%=-march=%) $(PART:%=-mpart=%) $(WARNINGS) $(DEFS) \
+ $(PLATFORM_INC_PATH:%=-I%) $(INC_PATH:%=-I%) $(CPP_EXTRA_FLAGS)
+DPNDFILES = $(CSRCS:.c=.d) $(ASSRCS:.S=.d)
+CPPFILES = $(CSRCS:.c=.i)
+
+CC = avr32-gcc
+CFLAGS = $(DEBUG) $(OPTIMIZATION) $(C_EXTRA_FLAGS) \
+ $(PLATFORM_INC_PATH:%=-Wa,-I%) $(INC_PATH:%=-Wa,-I%) $(AS_EXTRA_FLAGS)
+ASFILES = $(CSRCS:.c=.si) $(ASSRCS:.S=.si)
+
+AS = avr32-as
+ASFLAGS = $(DEBUG) $(OPTIMIZATION) \
+ $(PLATFORM_INC_PATH:%=-Wa,-I%) $(INC_PATH:%=-Wa,-I%) $(AS_EXTRA_FLAGS)
+OBJFILES = $(CSRCS:.c=.o) $(ASSRCS:.S=.o)
+
+LD = avr32-ld
+LDFLAGS = $(ARCH:%=-march=%) $(PART:%=-mpart=%) $(OPTIMIZATION) \
+ $(LIB_PATH:%=-L%) $(LINKER_SCRIPT:%=-T%) $(LD_EXTRA_FLAGS)
+LOADLIBES =
+LDLIBS = $(LIBS:%=-l%)
+
+OBJDUMP = avr32-objdump
+LSS = $(TARGET:$(TGTTYPE)=.lss)
+
+NM = avr32-nm
+SYM = $(TARGET:$(TGTTYPE)=.sym)
+
+OBJCOPY = avr32-objcopy
+HEX = $(TARGET:$(TGTTYPE)=.hex)
+BIN = $(TARGET:$(TGTTYPE)=.bin)
+
+SIZE = avr32-size
+
+PROGRAM = avr32program
+
+ISP = batchisp
+ISPFLAGS = -device at32$(PART) -hardware usb -operation
+
+DBGPROXY = avr32gdbproxy
+
+DOCGEN = doxygen
+
+
+# ** ** ** *** ** ** ** ** ** ** ** ** ** ** **
+# MESSAGES
+# ** ** ** *** ** ** ** ** ** ** ** ** ** ** **
+
+ERR_TARGET_TYPE = Target type not supported: `$(TGTTYPE)'
+MSG_CLEANING = Cleaning project.
+MSG_PREPROCESSING = Preprocessing \`$<\' to \`$@\'.
+MSG_COMPILING = Compiling \`$<\' to \`$@\'.
+MSG_ASSEMBLING = Assembling \`$<\' to \`$@\'.
+MSG_ARCHIVING = Archiving to \`$@\'.
+MSG_LINKING = Linking to \`$@\'.
+MSG_EXTENDED_LISTING = Creating extended listing to \`$@\'.
+MSG_SYMBOL_TABLE = Creating symbol table to \`$@\'.
+MSG_IHEX_IMAGE = Creating Intel HEX image to \`$@\'.
+MSG_BINARY_IMAGE = Creating binary image to \`$@\'.
+MSG_GETTING_CPU_INFO = Getting CPU information.
+MSG_HALTING = Stopping CPU execution.
+MSG_ERASING_CHIP = Performing a JTAG Chip Erase command.
+MSG_ERASING = Performing a flash chip erase.
+MSG_PROGRAMMING = Programming MCU memory from \`$(TARGET)\'.
+MSG_SECURING_FLASH = Protecting chip by setting security bit.
+MSG_RESETTING = Resetting MCU.
+MSG_DEBUGGING = Opening debug connection with MCU.
+MSG_RUNNING = Starting CPU execution.
+MSG_READING_CPU_REGS = Reading CPU registers.
+MSG_CLEANING_DOC = Cleaning documentation.
+MSG_GENERATING_DOC = Generating documentation to \`$(DOC_PATH)\'.
+
+
+# ** ** ** *** ** ** ** ** ** ** ** ** ** ** **
+# MAKE RULES
+# ** ** ** *** ** ** ** ** ** ** ** ** ** ** **
+
+# Include the make configuration file.
+include $(MAKECFG)
+
+# ** ** TOP-LEVEL RULES ** **
+
+# Default goal: build the project.
+ifeq ($(TGTTYPE),.a)
+.PHONY: all
+all: ccversion a lss sym sizes
+else
+ifeq ($(TGTTYPE),.elf)
+.PHONY: all
+all: ccversion elf lss sym hex bin sizes
+else
+$(error $(ERR_TARGET_TYPE))
+endif
+endif
+
+# Clean up the project.
+.PHONY: clean
+clean:
+ @echo $(MSG_CLEANING)
+ -$(VERBOSE_CMD)$(RM) $(BIN)
+ -$(VERBOSE_CMD)$(RM) $(HEX)
+ -$(VERBOSE_CMD)$(RM) $(SYM)
+ -$(VERBOSE_CMD)$(RM) $(LSS)
+ -$(VERBOSE_CMD)$(RM) $(TARGET)
+ -$(VERBOSE_CMD)$(RM) $(OBJFILES)
+ -$(VERBOSE_CMD)$(RM) $(ASFILES)
+ -$(VERBOSE_CMD)$(RM) $(CPPFILES)
+ -$(VERBOSE_CMD)$(RM) $(DPNDFILES)
+ $(VERBOSE_NL)
+
+# Rebuild the project.
+.PHONY: rebuild
+rebuild: clean all
+
+# Display CC version information.
+.PHONY: ccversion
+ccversion:
+ @echo
+ @echo
+ @$(CC) --version
+
+# Generate preprocessed files from C source files.
+.PHONY: cppfiles
+cppfiles: $(CPPFILES)
+
+# Generate preprocessed assembler files from C and assembler source files.
+.PHONY: asfiles
+asfiles: $(ASFILES)
+
+# Generate object files from C and assembler source files.
+.PHONY: objfiles
+objfiles: $(OBJFILES)
+
+ifeq ($(TGTTYPE),.a)
+# Archive: create A output file from object files.
+.PHONY: a
+a: $(TARGET)
+else
+ifeq ($(TGTTYPE),.elf)
+# Link: create ELF output file from object files.
+.PHONY: elf
+elf: $(TARGET)
+endif
+endif
+
+# Create extended listing from target output file.
+.PHONY: lss
+lss: $(LSS)
+
+# Create symbol table from target output file.
+.PHONY: sym
+sym: $(SYM)
+
+ifeq ($(TGTTYPE),.elf)
+
+# Create Intel HEX image from ELF output file.
+.PHONY: hex
+hex: $(HEX)
+
+# Create binary image from ELF output file.
+.PHONY: bin
+bin: $(BIN)
+
+endif
+
+# Display target size information.
+.PHONY: sizes
+sizes: $(TARGET)
+ @echo
+ @echo
+ifeq ($(TGTTYPE),.a)
+ @$(SIZE) -Bxt $<
+else
+ifeq ($(TGTTYPE),.elf)
+ @$(SIZE) -Ax $<
+ @$(SIZE) -Bx $<
+endif
+endif
+ @echo
+ @echo
+
+ifeq ($(TGTTYPE),.elf)
+
+# Use ISP instead of JTAGICE mkII when programming.
+.PHONY: isp
+ifeq ($(filter-out isp verbose,$(MAKECMDGOALS)),)
+isp: all
+else
+isp:
+ @:
+endif
+
+ifeq ($(findstring isp,$(MAKECMDGOALS)),)
+
+# Get CPU information.
+.PHONY: cpuinfo
+cpuinfo:
+ @echo
+ @echo $(MSG_GETTING_CPU_INFO)
+ $(VERBOSE_CMD)$(PROGRAM) cpuinfo
+ifeq ($(call LastWord,$(filter cpuinfo chiperase erase program secureflash reset debug run readregs,$(MAKECMDGOALS))),cpuinfo)
+ @echo
+endif
+
+# Stop CPU execution.
+.PHONY: halt
+halt:
+ifeq ($(filter cpuinfo chiperase erase program secureflash reset run readregs,$(MAKECMDGOALS)),)
+ @echo
+ @echo $(MSG_HALTING)
+ $(VERBOSE_CMD)$(PROGRAM) halt
+ifeq ($(call LastWord,$(filter halt debug,$(MAKECMDGOALS))),halt)
+ @echo
+endif
+else
+ @:
+endif
+
+# Perform a JTAG Chip Erase command.
+.PHONY: chiperase
+chiperase:
+ @echo
+ @echo $(MSG_ERASING_CHIP)
+ $(VERBOSE_CMD)$(PROGRAM) chiperase
+ifeq ($(call LastWord,$(filter cpuinfo chiperase program secureflash reset debug run readregs,$(MAKECMDGOALS))),chiperase)
+ @echo
+endif
+
+# Perform a flash chip erase.
+.PHONY: erase
+erase:
+ifeq ($(filter chiperase program,$(MAKECMDGOALS)),)
+ @echo
+ @echo $(MSG_ERASING)
+ $(VERBOSE_CMD)$(PROGRAM) erase $(FLASH:%=-f%)
+ifeq ($(call LastWord,$(filter cpuinfo erase secureflash reset debug run readregs,$(MAKECMDGOALS))),erase)
+ @echo
+endif
+else
+ @:
+endif
+
+# Program MCU memory from ELF output file.
+.PHONY: program
+program: all
+ @echo
+ @echo $(MSG_PROGRAMMING)
+ $(VERBOSE_CMD)$(PROGRAM) program $(FLASH:%=-f%) $(PROG_CLOCK:%=-c%) -e -v -R $(if $(findstring run,$(MAKECMDGOALS)),-r) $(TARGET)
+ifeq ($(call LastWord,$(filter cpuinfo chiperase program secureflash debug readregs,$(MAKECMDGOALS))),program)
+ @echo
+endif
+
+# Protect chip by setting security bit.
+.PHONY: secureflash
+secureflash:
+ @echo
+ @echo $(MSG_SECURING_FLASH)
+ $(VERBOSE_CMD)$(PROGRAM) secureflash
+ifeq ($(call LastWord,$(filter cpuinfo chiperase erase program secureflash reset debug run readregs,$(MAKECMDGOALS))),secureflash)
+ @echo
+endif
+
+# Reset MCU.
+.PHONY: reset
+reset:
+ifeq ($(filter program run,$(MAKECMDGOALS)),)
+ @echo
+ @echo $(MSG_RESETTING)
+ $(VERBOSE_CMD)$(PROGRAM) reset
+ifeq ($(call LastWord,$(filter cpuinfo chiperase erase secureflash reset debug readregs,$(MAKECMDGOALS))),reset)
+ @echo
+endif
+else
+ @:
+endif
+
+# Open a debug connection with the MCU.
+.PHONY: debug
+debug:
+ @echo
+ @echo $(MSG_DEBUGGING)
+ $(VERBOSE_CMD)$(DBGPROXY) $(FLASH:%=-f%)
+ifeq ($(call LastWord,$(filter cpuinfo halt chiperase erase program secureflash reset debug run readregs,$(MAKECMDGOALS))),debug)
+ @echo
+endif
+
+# Start CPU execution.
+.PHONY: run
+run:
+ifeq ($(findstring program,$(MAKECMDGOALS)),)
+ @echo
+ @echo $(MSG_RUNNING)
+ $(VERBOSE_CMD)$(PROGRAM) run $(if $(findstring reset,$(MAKECMDGOALS)),-R)
+ifeq ($(call LastWord,$(filter cpuinfo chiperase erase secureflash debug run readregs,$(MAKECMDGOALS))),run)
+ @echo
+endif
+else
+ @:
+endif
+
+# Read CPU registers.
+.PHONY: readregs
+readregs:
+ @echo
+ @echo $(MSG_READING_CPU_REGS)
+ $(VERBOSE_CMD)$(PROGRAM) readregs
+ifeq ($(call LastWord,$(filter cpuinfo chiperase erase program secureflash reset debug run readregs,$(MAKECMDGOALS))),readregs)
+ @echo
+endif
+
+else
+
+# Perform a flash chip erase.
+.PHONY: erase
+erase:
+ifeq ($(findstring program,$(MAKECMDGOALS)),)
+ @echo
+ @echo $(MSG_ERASING)
+ $(VERBOSE_CMD)$(ISP) $(ISPFLAGS) erase f memory flash blankcheck
+ifeq ($(call LastWord,$(filter erase secureflash debug run,$(MAKECMDGOALS))),erase)
+ @echo
+endif
+else
+ @:
+endif
+
+# Program MCU memory from ELF output file.
+.PHONY: program
+program: all
+ @echo
+ @echo $(MSG_PROGRAMMING)
+ $(VERBOSE_CMD)$(ISP) $(ISPFLAGS) erase f memory flash blankcheck loadbuffer $(TARGET) program verify $(if $(findstring run,$(MAKECMDGOALS)),$(if $(findstring secureflash,$(MAKECMDGOALS)),,start $(if $(findstring reset,$(MAKECMDGOALS)),,no)reset 0))
+ifeq ($(call LastWord,$(filter program secureflash debug,$(MAKECMDGOALS))),program)
+ @echo
+endif
+
+# Protect chip by setting security bit.
+.PHONY: secureflash
+secureflash:
+ @echo
+ @echo $(MSG_SECURING_FLASH)
+ $(VERBOSE_CMD)$(ISP) $(ISPFLAGS) memory security addrange 0x0 0x0 fillbuffer 0x01 program $(if $(findstring run,$(MAKECMDGOALS)),start $(if $(findstring reset,$(MAKECMDGOALS)),,no)reset 0)
+ifeq ($(call LastWord,$(filter erase program secureflash debug,$(MAKECMDGOALS))),secureflash)
+ @echo
+endif
+
+# Reset MCU.
+.PHONY: reset
+reset:
+ @:
+
+# Open a debug connection with the MCU.
+.PHONY: debug
+debug:
+ @echo
+ @echo $(MSG_DEBUGGING)
+ $(VERBOSE_CMD)$(DBGPROXY) $(FLASH:%=-f%)
+ifeq ($(call LastWord,$(filter erase program secureflash debug run,$(MAKECMDGOALS))),debug)
+ @echo
+endif
+
+# Start CPU execution.
+.PHONY: run
+run:
+ifeq ($(filter program secureflash,$(MAKECMDGOALS)),)
+ @echo
+ @echo $(MSG_RUNNING)
+ $(VERBOSE_CMD)$(ISP) $(ISPFLAGS) start $(if $(findstring reset,$(MAKECMDGOALS)),,no)reset 0
+ifeq ($(call LastWord,$(filter erase debug run,$(MAKECMDGOALS))),run)
+ @echo
+endif
+else
+ @:
+endif
+
+endif
+
+endif
+
+# Build the documentation.
+.PHONY: doc
+doc:
+ @echo
+ @echo $(MSG_GENERATING_DOC)
+ $(VERBOSE_CMD)cd $(dir $(DOC_CFG)) && $(DOCGEN) $(notdir $(DOC_CFG))
+ @echo
+
+# Clean up the documentation.
+.PHONY: cleandoc
+cleandoc:
+ @echo $(MSG_CLEANING_DOC)
+ -$(VERBOSE_CMD)$(RM) $(DOC_PATH)
+ $(VERBOSE_NL)
+
+# Rebuild the documentation.
+.PHONY: rebuilddoc
+rebuilddoc: cleandoc doc
+
+# Display main executed commands.
+.PHONY: verbose
+ifeq ($(filter-out isp verbose,$(MAKECMDGOALS)),)
+verbose: all
+else
+verbose:
+ @:
+endif
+ifneq ($(findstring verbose,$(MAKECMDGOALS)),)
+# Prefix displaying the following command if and only if verbose is a goal.
+VERBOSE_CMD =
+# New line displayed if and only if verbose is a goal.
+VERBOSE_NL = @echo
+else
+VERBOSE_CMD = @
+VERBOSE_NL =
+endif
+
+# ** ** COMPILATION RULES ** **
+
+# Include silently the dependency files.
+-include $(DPNDFILES)
+
+# The dependency files are not built alone but along with first generation files.
+$(DPNDFILES):
+
+# First generation files depend on make files.
+$(CPPFILES) $(ASFILES) $(OBJFILES): Makefile $(MAKECFG)
+
+ifeq ($(TGTTYPE),.elf)
+# Files resulting from linking depend on linker script.
+$(TARGET): $(LINKER_SCRIPT)
+endif
+
+# Preprocess: create preprocessed files from C source files.
+%.i: %.c %.d
+ @echo $(MSG_PREPROCESSING)
+ $(VERBOSE_CMD)$(CPP) $(CPPFLAGS) -MD -MP -MT '$*.i $*.si $*.o' -o $@ $<
+ @touch $*.d
+ @touch $@
+ $(VERBOSE_NL)
+
+# Preprocess & compile: create assembler files from C source files.
+%.si: %.c %.d
+ @echo $(MSG_COMPILING)
+ $(VERBOSE_CMD)$(CC) -S $(CPPFLAGS) -MD -MP -MT '$*.i $*.o' $(CFLAGS) -o $@ $<
+ @touch $*.d
+ @touch $@
+ $(VERBOSE_NL)
+
+# Preprocess: create preprocessed files from assembler source files.
+%.si: %.S %.d
+ @echo $(MSG_PREPROCESSING)
+ $(VERBOSE_CMD)$(CPP) $(CPPFLAGS) -MD -MP -MT '$*.si $*.o' -o $@ $<
+ @touch $*.d
+ @touch $@
+ $(VERBOSE_NL)
+
+# Preprocess, compile & assemble: create object files from C source files.
+%.o: %.c %.d
+ @echo $(MSG_COMPILING)
+ $(VERBOSE_CMD)$(CC) -c $(CPPFLAGS) -MD -MP -MT '$*.i $*.si $*.o' $(CFLAGS) -o $@ $<
+ @touch $*.d
+ @touch $@
+ $(VERBOSE_NL)
+
+# Preprocess & assemble: create object files from assembler source files.
+%.o: %.S %.d
+ @echo $(MSG_ASSEMBLING)
+ $(VERBOSE_CMD)$(CC) -c $(CPPFLAGS) -MD -MP -MT '$*.si' $(ASFLAGS) -o $@ $<
+ @touch $*.d
+ @touch $@
+ $(VERBOSE_NL)
+
+.PRECIOUS: $(OBJFILES)
+ifeq ($(TGTTYPE),.a)
+# Archive: create A output file from object files.
+.SECONDARY: $(TARGET)
+$(TARGET): $(OBJFILES)
+ @echo $(MSG_ARCHIVING)
+ $(VERBOSE_CMD)$(AR) $(ARFLAGS) $@ $(filter %.o,$+)
+ $(VERBOSE_NL)
+else
+ifeq ($(TGTTYPE),.elf)
+# Link: create ELF output file from object files.
+.SECONDARY: $(TARGET)
+$(TARGET): $(OBJFILES)
+ @echo $(MSG_LINKING)
+ $(VERBOSE_CMD)$(CC) $(LDFLAGS) $(filter %.o,$+) $(LOADLIBES) $(LDLIBS) -o $@
+ $(VERBOSE_NL)
+endif
+endif
+
+# Create extended listing from target output file.
+$(LSS): $(TARGET)
+ @echo $(MSG_EXTENDED_LISTING)
+ $(VERBOSE_CMD)$(OBJDUMP) -h -S $< > $@
+ $(VERBOSE_NL)
+
+# Create symbol table from target output file.
+$(SYM): $(TARGET)
+ @echo $(MSG_SYMBOL_TABLE)
+ $(VERBOSE_CMD)$(NM) -n $< > $@
+ $(VERBOSE_NL)
+
+ifeq ($(TGTTYPE),.elf)
+
+# Create Intel HEX image from ELF output file.
+$(HEX): $(TARGET)
+ @echo $(MSG_IHEX_IMAGE)
+ $(VERBOSE_CMD)$(OBJCOPY) -O ihex $< $@
+ $(VERBOSE_NL)
+
+# Create binary image from ELF output file.
+$(BIN): $(TARGET)
+ @echo $(MSG_BINARY_IMAGE)
+ $(VERBOSE_CMD)$(OBJCOPY) -O binary $< $@
+ $(VERBOSE_NL)
+
+endif
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atuc128d3_evk1101/gcc/config.mk b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atuc128d3_evk1101/gcc/config.mk
new file mode 100644
index 0000000..338e8c0
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atuc128d3_evk1101/gcc/config.mk
@@ -0,0 +1,173 @@
+# Hey Emacs, this is a -*- makefile -*-
+
+# The purpose of this file is to define the build configuration variables used
+# by the generic Makefile. See Makefile header for further information.
+
+# Copyright (c) 2009 Atmel Corporation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice, this
+# list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# 3. The name of Atmel may not be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# 4. This software may only be redistributed and used in connection with an Atmel
+# AVR product.
+#
+# THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+# EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+#
+
+# Base paths
+PRJ_PATH = ../../../../../../../../../..
+APPS_PATH = $(PRJ_PATH)/common/applications
+BRDS_PATH = $(PRJ_PATH)/avr32/boards
+COMP_PATH = $(PRJ_PATH)/avr32/components
+DRVR_PATH = $(PRJ_PATH)/avr32/drivers
+SERV_PATH = $(PRJ_PATH)/avr32/services
+UTIL_PATH = $(PRJ_PATH)/avr32/utils
+BRDS_COM_PATH = $(PRJ_PATH)/common/boards
+COMP_COM_PATH = $(PRJ_PATH)/common/components
+SERV_COM_PATH = $(PRJ_PATH)/common/services
+UTIL_COM_PATH = $(PRJ_PATH)/common/utils
+
+THRD_PRJ_PATH = $(PRJ_PATH)
+THRD_PATH = $(THRD_PRJ_PATH)/third_party
+THRD_APPS_PATH = $(THRD_PATH)/applications
+THRD_BRDS_PATH = $(THRD_PATH)/boards
+THRD_COMP_PATH = $(THRD_PATH)/components
+THRD_DRVR_PATH = $(THRD_PATH)/drivers
+THRD_SERV_PATH = $(THRD_PATH)/services
+THRD_UTIL_PATH = $(THRD_PATH)/utils
+
+# CPU architecture: {ap|ucr1|ucr2}
+ARCH = ucr3
+
+# Part: {none|ap7xxx|uc3xxxxx}
+PART = uc3b0128
+
+
+# Flash memories: [{cfi|internal}@address,size]...
+FLASH = internal@0x80000000,128Kb
+
+# Clock source to use when programming: [{xtal|extclk|int}]
+PROG_CLOCK = int
+
+# Device/Platform/Board include path
+PLATFORM_INC_PATH = \
+ $(BRDS_PATH)/
+
+# Target name: {*.a|*.elf}
+TARGET = $(PART)-usb_device_mouse.elf
+
+# Definitions: [-D name[=definition]...] [-U name...]
+# Things that might be added to DEFS:
+# BOARD Board used: see $(BRDS_PATH)/board.h
+# EXT_BOARD Extension board used (if any): see $(BRDS_PATH)/board.h
+DEFS = -D BOARD=EVK1101 -D __AVR32_UC128D3__ -U __AVR32_UC3B0128__
+
+# Include path
+INC_PATH = \
+ $(UTIL_PATH)/ \
+ $(UTIL_PATH)/preprocessor/ \
+ $(UTIL_COM_PATH)/ \
+ $(BRDS_COM_PATH)/ \
+ $(DRVR_PATH)/gpio/ \
+ $(DRVR_PATH)/intc/ \
+ $(DRVR_PATH)/eic/ \
+ $(DRVR_PATH)/pm/ \
+ $(DRVR_PATH)/scif/ \
+ $(DRVR_PATH)/flashcdw/ \
+ $(DRVR_PATH)/usbc/ \
+ $(COMP_PATH)/joystick/skrhabe010/ \
+ $(SERV_COM_PATH)/basic/clock/ \
+ $(SERV_COM_PATH)/basic/sleepmgr/ \
+ $(SERV_COM_PATH)/usb/ \
+ $(SERV_COM_PATH)/usb/udc/ \
+ $(SERV_COM_PATH)/usb/class/hid/ \
+ $(SERV_COM_PATH)/usb/class/hid/device/ \
+ $(SERV_COM_PATH)/usb/class/hid/device/mouse/ \
+ ../../ \
+ ../ \
+
+# $(DRVR_PATH)/pm/pm.c \
+# C source files
+CSRCS = \
+ $(DRVR_PATH)/intc/intc.c \
+ $(DRVR_PATH)/flashcdw/flashcdw.c \
+ $(DRVR_PATH)/gpio/gpio.c \
+ $(DRVR_PATH)/eic/eic.c \
+ $(DRVR_PATH)/usbc/usbc_device.c \
+ $(BRDS_PATH)/evk1101/init.c \
+ $(BRDS_PATH)/evk1101/led_uc3d.c \
+ $(SERV_COM_PATH)/basic/clock/uc3d/sysclk.c \
+ $(SERV_COM_PATH)/basic/clock/uc3d/pll.c \
+ $(SERV_COM_PATH)/basic/clock/uc3d/osc.c \
+ $(SERV_COM_PATH)/basic/sleepmgr/uc3/sleepmgr.c \
+ $(SERV_COM_PATH)/usb/udc/udc.c \
+ $(SERV_COM_PATH)/usb/class/hid/device/udi_hid.c \
+ $(SERV_COM_PATH)/usb/class/hid/device/mouse/udi_hid_mouse.c \
+ $(SERV_COM_PATH)/usb/class/hid/device/mouse/udi_hid_mouse_desc.c \
+ ../../main.c \
+ ../ui.c \
+
+# Assembler source files
+ASSRCS = \
+ $(UTIL_PATH)/startup/trampoline_uc3.S \
+ $(DRVR_PATH)/intc/exception.S
+
+# Library path
+LIB_PATH =
+
+# Libraries to link with the project
+LIBS =
+
+# Linker script file if any
+LINKER_SCRIPT = $(UTIL_PATH)/linker_scripts/atuc_d/128/gcc/link_uc128dx.lds
+
+# Options to request or suppress warnings: [-fsyntax-only] [-pedantic[-errors]] [-w] [-Wwarning...]
+# For further details, refer to the chapter "GCC Command Options" of the GCC manual.
+WARNINGS = -Wall
+
+# Options for debugging: [-g]...
+# For further details, refer to the chapter "GCC Command Options" of the GCC manual.
+DEBUG = -g
+
+# Options that control optimization: [-O[0|1|2|3|s]]...
+# For further details, refer to the chapter "GCC Command Options" of the GCC manual.
+OPTIMIZATION = -Os -fsection-anchors -ffunction-sections
+
+# Extra flags to use when preprocessing
+CPP_EXTRA_FLAGS =
+
+# Extra flags to use when compiling
+C_EXTRA_FLAGS =
+
+# Extra flags to use when assembling
+AS_EXTRA_FLAGS =
+
+# Extra flags to use when linking
+LD_EXTRA_FLAGS = -Wl,--direct-data,--gc-sections,-e,_trampoline
+
+# Documentation path
+DOC_PATH = \
+ ../doc/
+
+# Documentation configuration file
+DOC_CFG = \
+ ../doxyfile.doxygen
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atuc128d3_evk1101/ui.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atuc128d3_evk1101/ui.c
new file mode 100644
index 0000000..0f2945b
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atuc128d3_evk1101/ui.c
@@ -0,0 +1,204 @@
+/**
+ * \file
+ *
+ * \brief User Interface
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "udc.h"
+#include "udi_hid_mouse.h"
+#include "board.h"
+#include "gpio.h"
+#include "joystick.h"
+#include "eic.h"
+#include "ui.h"
+
+#define MOUSE_MOVE_RANGE 3
+
+// Interrupt on "pin change" from switch to do wakeup on USB
+// Note:
+// This interrupt is enable when the USB host enable remotewakeup feature
+// This interrupt wakeup the CPU if this one is in idle mode
+ISR(ui_wakeup_isr, AVR32_GPIO_IRQ_GROUP, 0)
+{
+ // Clear GPIO interrupt.
+ gpio_clear_pin_interrupt_flag(GPIO_JOYSTICK_PUSH);
+ // Clear External Interrupt Line else Wakeup event always enabled
+ eic_clear_interrupt_line(&AVR32_EIC, EXT_NMI);
+ // It is a wakeup then send wakeup USB
+ udc_wakeup();
+}
+
+
+void ui_init(void)
+{
+ /* register joystick handler on level 0 */
+ irqflags_t flags = cpu_irq_save();
+ irq_register_handler(ui_wakeup_isr,
+ AVR32_GPIO_IRQ_0 + (GPIO_JOYSTICK_PUSH / 8), 0);
+ cpu_irq_restore(flags);
+
+ LED_On(LED0);
+ LED_Off(LED1);
+}
+
+void ui_powerdown(void)
+{
+ LED_Off(LED0);
+ LED_Off(LED1);
+}
+
+
+//! Structure holding the configuration parameters of the EIC low level driver.
+static const eic_options_t eic_options = {
+ // Choose External Interrupt Controller Line
+ .eic_line = EXT_NMI,
+ // Enable level-triggered interrupt.
+ .eic_mode = EIC_MODE_LEVEL_TRIGGERED,
+ // Don't care value because the chosen eic mode is level-triggered.
+ .eic_edge = 0,
+ // Interrupt will trigger on low-level.
+ .eic_level = EIC_LEVEL_LOW_LEVEL,
+ // Enable filter.
+ .eic_filter = EIC_FILTER_ENABLED,
+ // For Wake Up mode, initialize in asynchronous mode
+ .eic_async = EIC_ASYNCH_MODE
+};
+
+
+void ui_wakeup_enable(void)
+{
+ /* configure joystick to produce IT on all state change */
+ gpio_enable_pin_interrupt(GPIO_JOYSTICK_PUSH, GPIO_PIN_CHANGE);
+ /*
+ * Configure pin change interrupt for asynchronous wake-up (required to
+ * wake up from the STATIC sleep mode).
+ *
+ * First, map the interrupt line to the GPIO pin with the right
+ * peripheral function.
+ */
+ gpio_enable_module_pin(GPIO_JOYSTICK_PUSH, AVR32_EIC_EXTINT_8_FUNCTION);
+
+ /*
+ * Enable the internal pull-up resistor on that pin (because the EIC is
+ * configured such that the interrupt will trigger on low-level, see
+ * eic_options.eic_level).
+ */
+ gpio_enable_pin_pull_up(GPIO_JOYSTICK_PUSH);
+
+ // Init the EIC controller with the set options.
+ eic_init(&AVR32_EIC, &eic_options, sizeof(eic_options) /
+ sizeof(eic_options_t));
+
+ // Enable External Interrupt Controller Line
+ eic_enable_line(&AVR32_EIC, EXT_NMI);
+}
+
+void ui_wakeup_disable(void)
+{
+ eic_disable_line(&AVR32_EIC, EXT_NMI);
+ /* Disable joystick input change ITs. */
+ gpio_disable_pin_interrupt(GPIO_JOYSTICK_PUSH);
+}
+
+void ui_wakeup(void)
+{
+ LED_On(LED0);
+}
+
+void ui_process(uint16_t framenumber)
+{
+ bool b_btn_state;
+ static bool btn_left_last_state = HID_MOUSE_BTN_UP;
+ static bool btn_right_last_state = HID_MOUSE_BTN_UP;
+ static bool btn_middle_last_state = HID_MOUSE_BTN_UP;
+ static uint8_t cpt_sof = 0;
+
+ if ((framenumber % 1000) == 0) {
+ LED_On(LED1);
+ }
+ if ((framenumber % 1000) == 500) {
+ LED_Off(LED1);
+ }
+ // Scan process running each 2ms
+ cpt_sof++;
+ if (2 > cpt_sof)
+ return;
+ cpt_sof = 0;
+
+ // Scan buttons on switch 0 (left), 1 (middle), 2 (right)
+ b_btn_state = (!gpio_get_pin_value(GPIO_PUSH_BUTTON_0)) ?
+ HID_MOUSE_BTN_DOWN : HID_MOUSE_BTN_UP;
+ if (b_btn_state != btn_left_last_state) {
+ udi_hid_mouse_btnleft(b_btn_state);
+ btn_left_last_state = b_btn_state;
+ }
+ /* no Middle Button
+ b_btn_state = (!gpio_get_pin_value(GPIO_PUSH_BUTTON_1)) ?
+ HID_MOUSE_BTN_DOWN : HID_MOUSE_BTN_UP;
+ if (b_btn_state != btn_middle_last_state) {
+ udi_hid_mouse_btnmiddle(b_btn_state);
+ btn_middle_last_state = b_btn_state;
+ }
+ */
+ b_btn_state = (!gpio_get_pin_value(GPIO_PUSH_BUTTON_1)) ?
+ HID_MOUSE_BTN_DOWN : HID_MOUSE_BTN_UP;
+ if (b_btn_state != btn_right_last_state) {
+ udi_hid_mouse_btnright(b_btn_state);
+ btn_right_last_state = b_btn_state;
+ }
+ // Joystick used to move mouse
+ if (is_joystick_right())
+ udi_hid_mouse_moveX(MOUSE_MOVE_RANGE);
+ if (is_joystick_left())
+ udi_hid_mouse_moveX(-MOUSE_MOVE_RANGE);
+ if (is_joystick_up())
+ udi_hid_mouse_moveY(-MOUSE_MOVE_RANGE);
+ if (is_joystick_down())
+ udi_hid_mouse_moveY(MOUSE_MOVE_RANGE);
+}
+
+/**
+ * \defgroup UI User Interface
+ *
+ * Human interface on EVK1100 :
+ * - PWR led is on when power present
+ * - Led 0 is on when USB line is in IDLE mode, and off in SUSPEND mode
+ * - Led 1 blinks when USB Host have checked and enabled HID mouse interface
+ * - Mouse buttons are linked to switch PB0 (left), PB1 (middle), PB2 (right)
+ * - Joystick are used to move mouse
+ * - Only Push joystick button can be used to wakeup USB Host in remote wakeup mode.
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atuc256l3_stk600_rcuc3l3_l4/conf_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atuc256l3_stk600_rcuc3l3_l4/conf_board.h
new file mode 100644
index 0000000..d89a271
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atuc256l3_stk600_rcuc3l3_l4/conf_board.h
@@ -0,0 +1,43 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Board configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H_INCLUDED
+#define CONF_BOARD_H_INCLUDED
+
+// Only the default board init (switchs/leds) is necessary for HID mouse example
+
+#endif /* CONF_BOARD_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atuc256l3_stk600_rcuc3l3_l4/conf_clock.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atuc256l3_stk600_rcuc3l3_l4/conf_clock.h
new file mode 100644
index 0000000..de28dc3
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atuc256l3_stk600_rcuc3l3_l4/conf_clock.h
@@ -0,0 +1,81 @@
+/**
+ * \file
+ *
+ * \brief Chip-specific system clock manager configuration
+ *
+ * Copyright (C) 2011 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_CLOCK_H_INCLUDED
+#define CONF_CLOCK_H_INCLUDED
+
+// ===== System Clock Source Options
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_RCSYS
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_OSC0
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_DFLL
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_RC120M
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL0
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL1
+
+// ===== PLL0 Options
+#define CONFIG_PLL0_SOURCE PLL_SRC_OSC0
+#define CONFIG_PLL0_MUL 4 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+#define CONFIG_PLL0_DIV 1 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+
+// ===== PLL1 Options
+//#define CONFIG_PLL1_SOURCE PLL_SRC_OSC0
+//#define CONFIG_PLL1_MUL 4 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+//#define CONFIG_PLL1_DIV 1 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+
+// ===== DFLL Options
+//#define CONFIG_DFLL0_SOURCE GENCLK_SRC_OSC32K
+//#define CONFIG_DFLL0_MUL 4 /* Fdfll = (Fclk * DFLL_mul) / DFLL_div */
+//#define CONFIG_DFLL0_DIV 1 /* Fdfll = (Fclk * DFLL_mul) / DFLL_div */
+
+// ===== System Clock Bus Division Options
+//#define CONFIG_SYSCLK_CPU_DIV 0 /* Fcpu = Fsys/(2 ^ CPU_div) */
+//#define CONFIG_SYSCLK_PBA_DIV 0 /* Fpba = Fsys/(2 ^ PBA_div) */
+//#define CONFIG_SYSCLK_PBB_DIV 0 /* Fpbb = Fsys/(2 ^ PBB_div) */
+
+// ===== Peripheral Clock Management Options
+//#define CONFIG_SYSCLK_INIT_CPUMASK (1 << SYSCLK_SYSTIMER)
+//#define CONFIG_SYSCLK_INIT_PBAMASK (1 << SYSCLK_USART0)
+//#define CONFIG_SYSCLK_INIT_PBBMASK (1 << SYSCLK_HMATRIX)
+//#define CONFIG_SYSCLK_INIT_HSBMASK (1 << SYSCLK_MDMA_HSB)
+
+// ===== USB Clock Source Options
+//#define CONFIG_USBCLK_SOURCE USBCLK_SRC_OSC0
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL0
+//#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL1
+#define CONFIG_USBCLK_DIV 1 /* Fusb = Fsys/(2 ^ USB_div) */
+
+#endif /* CONF_CLOCK_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atuc256l3_stk600_rcuc3l3_l4/conf_sleepmgr.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atuc256l3_stk600_rcuc3l3_l4/conf_sleepmgr.h
new file mode 100644
index 0000000..341afd2
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atuc256l3_stk600_rcuc3l3_l4/conf_sleepmgr.h
@@ -0,0 +1,43 @@
+/**
+ * \file
+ *
+ * \brief Sleep manager configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SLEEPMGR_H
+#define CONF_SLEEPMGR_H
+
+#define CONFIG_SLEEPMGR_ENABLE
+
+#endif /* CONF_SLEEPMGR_H */ \ No newline at end of file
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atuc256l3_stk600_rcuc3l3_l4/ui.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atuc256l3_stk600_rcuc3l3_l4/ui.c
new file mode 100644
index 0000000..49d10b0
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atuc256l3_stk600_rcuc3l3_l4/ui.c
@@ -0,0 +1,176 @@
+/**
+ * \file
+ *
+ * \brief User Interface
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "udc.h"
+#include "udi_hid_mouse.h"
+#include "board.h"
+#include "gpio.h"
+#include "eic.h"
+#include "ui.h"
+
+#define MOUSE_MOVE_RANGE 3
+
+// Interrupt on "pin change" from switch to do wakeup on USB
+// Note:
+// This interrupt is enable when the USB host enable remotewakeup feature
+// This interrupt wakeup the CPU if this one is in idle mode
+ISR(ui_wakeup_isr, AVR32_GPIO_IRQ_GROUP, 0)
+{
+ // Clear GPIO interrupt.
+ gpio_clear_pin_interrupt_flag(GPIO_PUSH_BUTTON_SW0);
+ // Clear External Interrupt Line else Wakeup event always enabled
+ eic_clear_interrupt_line(&AVR32_EIC, EXT_NMI);
+ // It is a wakeup then send wakeup USB
+ udc_wakeup();
+}
+
+
+void ui_init(void)
+{
+ /* register joystick handler on level 0 */
+ irqflags_t flags = cpu_irq_save();
+ irq_register_handler(ui_wakeup_isr,
+ AVR32_GPIO_IRQ_0 + (GPIO_PUSH_BUTTON_2 / 8), 0);
+ cpu_irq_restore(flags);
+
+ LED_On(LED0);
+ LED_Off(LED1);
+}
+
+void ui_powerdown(void)
+{
+ LED_Off(LED0);
+ LED_Off(LED1);
+}
+
+
+//! Structure holding the configuration parameters of the EIC low level driver.
+static const eic_options_t eic_options = {
+ // Choose External Interrupt Controller Line
+ .eic_line = EXT_NMI,
+ // Enable level-triggered interrupt.
+ .eic_mode = EIC_MODE_LEVEL_TRIGGERED,
+ // Don't care value because the chosen eic mode is level-triggered.
+ .eic_edge = 0,
+ // Interrupt will trigger on low-level.
+ .eic_level = EIC_LEVEL_LOW_LEVEL,
+ // Enable filter.
+ .eic_filter = EIC_FILTER_ENABLED,
+ // For Wake Up mode, initialize in asynchronous mode
+ .eic_async = EIC_ASYNCH_MODE
+};
+
+
+void ui_wakeup_enable(void)
+{
+ /* configure joystick to produce IT on all state change */
+ gpio_enable_pin_interrupt(GPIO_PUSH_BUTTON_SW0, GPIO_PIN_CHANGE);
+ /*
+ * Configure pin change interrupt for asynchronous wake-up (required to
+ * wake up from the STATIC sleep mode).
+ *
+ * First, map the interrupt line to the GPIO pin with the right
+ * peripheral function.
+ */
+ gpio_enable_module_pin(GPIO_PUSH_BUTTON_SW0, 6);
+
+ /*
+ * Enable the internal pull-up resistor on that pin (because the EIC is
+ * configured such that the interrupt will trigger on low-level, see
+ * eic_options.eic_level).
+ */
+ gpio_enable_pin_pull_up(GPIO_PUSH_BUTTON_SW0);
+
+ // Init the EIC controller with the set options.
+ eic_init(&AVR32_EIC, &eic_options, sizeof(eic_options) /
+ sizeof(eic_options_t));
+
+ // Enable External Interrupt Controller Line
+ eic_enable_line(&AVR32_EIC, EXT_NMI);
+}
+
+void ui_wakeup_disable(void)
+{
+ eic_disable_line(&AVR32_EIC, EXT_NMI);
+ /* Disable joystick input change ITs. */
+ gpio_disable_pin_interrupt(GPIO_PUSH_BUTTON_SW0);
+}
+
+void ui_wakeup(void)
+{
+ LED_On(LED0);
+}
+
+void ui_process(uint16_t framenumber)
+{
+ static uint8_t cpt_sof = 0;
+
+ if ((framenumber % 1000) == 0) {
+ LED_On(LED1);
+ }
+ if ((framenumber % 1000) == 500) {
+ LED_Off(LED1);
+ }
+ // Scan process running each 2ms
+ cpt_sof++;
+ if (2 > cpt_sof)
+ return;
+ cpt_sof = 0;
+
+ // No Scan buttons
+ // Look touch sensor activity for the X and Y events
+ if (!gpio_get_pin_value(GPIO_PUSH_BUTTON_SW0)) {
+ udi_hid_mouse_moveX(-MOUSE_MOVE_RANGE);
+ }
+ if (!gpio_get_pin_value(GPIO_PUSH_BUTTON_SW1)) {
+ udi_hid_mouse_moveX(MOUSE_MOVE_RANGE);
+ }
+}
+
+/**
+ * \defgroup UI User Interface
+ *
+ * Human interface on STK600 :
+ * - PWR led is on when power present
+ * - Led 0 is on when USB line is in IDLE mode, and off in SUSPEND mode
+ * - Led 1 blinks when USB Host have checked and enabled HID mouse interface
+ * - Mouse move are linked at switches 0 (left), 1 (right)
+ * - Switch 0 is linked to wakeup USB Host in remote wakeup mode
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega128a1u_xplain_a1_mkii/conf_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega128a1u_xplain_a1_mkii/conf_board.h
new file mode 100644
index 0000000..6825b7b
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega128a1u_xplain_a1_mkii/conf_board.h
@@ -0,0 +1,41 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Board configuration for spi example
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H_INCLUDED
+#define CONF_BOARD_H_INCLUDED
+
+#endif /* CONF_BOARD_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega128a1u_xplain_a1_mkii/conf_clock.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega128a1u_xplain_a1_mkii/conf_clock.h
new file mode 100644
index 0000000..844c93d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega128a1u_xplain_a1_mkii/conf_clock.h
@@ -0,0 +1,74 @@
+/**
+ * \file
+ *
+ * \brief Clock system configuration for clock example 1
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_CLOCK_H_INCLUDED
+#define CONF_CLOCK_H_INCLUDED
+
+//! Configuration using On-Chip RC oscillator at 48MHz
+//! The RC oscillator is calibrated via USB Start Of Frame
+//! Clk USB = 48MHz (used by USB)
+//! Clk sys = 48MHz
+//! Clk cpu/per = 12MHz
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_RCOSC
+#define CONFIG_OSC_RC32_CAL 48000000UL
+
+#define CONFIG_OSC_AUTOCAL OSC_ID_RC32MHZ
+#define CONFIG_OSC_AUTOCAL_REF_OSC OSC_ID_USBSOF
+
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_RC32MHZ
+#define CONFIG_SYSCLK_PSADIV SYSCLK_PSADIV_2
+#define CONFIG_SYSCLK_PSBCDIV SYSCLK_PSBCDIV_1_2
+
+/*
+//! Use external board OSC (8MHz)
+//! Clk pll = 48MHz (used by USB)
+//! Clk sys = 48MHz
+//! Clk cpu/per = 12MHz
+
+#define CONFIG_PLL0_SOURCE PLL_SRC_XOSC
+#define CONFIG_PLL0_MUL 6
+#define CONFIG_PLL0_DIV 1
+
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL
+
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL
+#define CONFIG_SYSCLK_PSADIV SYSCLK_PSADIV_2
+#define CONFIG_SYSCLK_PSBCDIV SYSCLK_PSBCDIV_1_2
+*/
+
+
+#endif /* CONF_CLOCK_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega128a1u_xplain_a1_mkii/conf_sleepmgr.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega128a1u_xplain_a1_mkii/conf_sleepmgr.h
new file mode 100644
index 0000000..699010d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega128a1u_xplain_a1_mkii/conf_sleepmgr.h
@@ -0,0 +1,43 @@
+/**
+ * \file
+ *
+ * \brief Sleep manager configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SLEEPMGR_H
+#define CONF_SLEEPMGR_H
+
+#define CONFIG_SLEEPMGR_ENABLE
+
+#endif /* CONF_SLEEPMGR_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega128a1u_xplain_a1_mkii/ui.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega128a1u_xplain_a1_mkii/ui.c
new file mode 100644
index 0000000..a9c4a1a
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega128a1u_xplain_a1_mkii/ui.c
@@ -0,0 +1,172 @@
+/**
+ * \file
+ *
+ * \brief User Interface
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "udc.h"
+#include "udi_hid_mouse.h"
+#include "board.h"
+#include "led.h"
+#include "ui.h"
+
+#define MOUSE_MOVE_RANGE 3
+
+void ui_init(void)
+{
+ LED_On(LEDUSB_GPIO);
+ LED_On(LED0_GPIO);
+ LED_Off(LED1_GPIO);
+}
+
+void ui_powerdown(void)
+{
+ LED_Off(LED0_GPIO);
+ LED_Off(LED1_GPIO);
+}
+
+void ui_wakeup_enable(void)
+{
+ PORT_t *port;
+ // Configure pin change interrupt for asynch. wake-up on button pin.
+ ioport_configure_pin(GPIO_PUSH_BUTTON_0,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ ioport_configure_pin(GPIO_PUSH_BUTTON_1,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ ioport_configure_pin(GPIO_PUSH_BUTTON_2,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ ioport_configure_pin(GPIO_PUSH_BUTTON_3,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ ioport_configure_pin(GPIO_PUSH_BUTTON_4,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ ioport_configure_pin(GPIO_PUSH_BUTTON_5,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ ioport_configure_pin(GPIO_PUSH_BUTTON_6,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ ioport_configure_pin(GPIO_PUSH_BUTTON_7,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ port = ioport_pin_to_port(GPIO_PUSH_BUTTON_0);
+ port->INT0MASK = 0xFF;
+ port->INTCTRL = PORT_INT0LVL_LO_gc;
+}
+
+void ui_wakeup_disable(void)
+{
+ PORT_t *port;
+ port = ioport_pin_to_port(GPIO_PUSH_BUTTON_0);
+ port->INT0MASK = 0x00;
+}
+
+// Interrupt on "pin change" from switch to do wakeup on USB
+// Note:
+// This interrupt is enable when the USB host enable remotewakeup feature
+// This interrupt wakeup the CPU if this one is in idle mode
+ISR(PORTF_INT0_vect)
+{
+ PORT_t *port;
+ port = ioport_pin_to_port(GPIO_PUSH_BUTTON_0);
+ port->INTFLAGS = 0x01; // Ack interrupt
+ // It is a wakeup then send wakeup USB
+ udc_wakeup();
+}
+
+void ui_wakeup(void)
+{
+ LED_On(LED0_GPIO);
+}
+
+void ui_process(uint16_t framenumber)
+{
+ bool b_btn_state;
+ static bool btn_left_last_state = HID_MOUSE_BTN_UP;
+ static bool btn_right_last_state = HID_MOUSE_BTN_UP;
+ static bool btn_middle_last_state = HID_MOUSE_BTN_UP;
+ static uint8_t cpt_sof = 0;
+
+ if ((framenumber % 1000) == 0) {
+ LED_On(LED1_GPIO);
+ }
+ if ((framenumber % 1000) == 500) {
+ LED_Off(LED1_GPIO);
+ }
+ // Scan process running each 2ms
+ cpt_sof++;
+ if (2 > cpt_sof)
+ return;
+ cpt_sof = 0;
+
+ // Scan buttons on switch 0 (left), 1 (middle), 2 (right)
+ b_btn_state = (gpio_pin_is_low(GPIO_PUSH_BUTTON_0)) ? HID_MOUSE_BTN_DOWN
+ : HID_MOUSE_BTN_UP;
+ if (b_btn_state != btn_left_last_state) {
+ udi_hid_mouse_btnleft(b_btn_state);
+ btn_left_last_state = b_btn_state;
+ }
+ b_btn_state = (gpio_pin_is_low(GPIO_PUSH_BUTTON_1)) ? HID_MOUSE_BTN_DOWN
+ : HID_MOUSE_BTN_UP;
+ if (b_btn_state != btn_middle_last_state) {
+ udi_hid_mouse_btnmiddle(b_btn_state);
+ btn_middle_last_state = b_btn_state;
+ }
+ b_btn_state = (gpio_pin_is_low(GPIO_PUSH_BUTTON_2)) ? HID_MOUSE_BTN_DOWN
+ : HID_MOUSE_BTN_UP;
+ if (b_btn_state != btn_right_last_state) {
+ udi_hid_mouse_btnright(b_btn_state);
+ btn_right_last_state = b_btn_state;
+ }
+ // Scan move on switch 4 (right), 5 (left), 6 (down), 7 (up)
+ if (gpio_pin_is_low(GPIO_PUSH_BUTTON_4))
+ udi_hid_mouse_moveX(MOUSE_MOVE_RANGE);
+ if (gpio_pin_is_low(GPIO_PUSH_BUTTON_5))
+ udi_hid_mouse_moveX(-MOUSE_MOVE_RANGE);
+ if (gpio_pin_is_low(GPIO_PUSH_BUTTON_6))
+ udi_hid_mouse_moveY(MOUSE_MOVE_RANGE);
+ if (gpio_pin_is_low(GPIO_PUSH_BUTTON_7))
+ udi_hid_mouse_moveY(-MOUSE_MOVE_RANGE);
+}
+
+/**
+ * \defgroup UI User Interface
+ *
+ * Human interface on Xplain-A1:
+ * - RED led close to USB connector is always on after firmware startup
+ * - Led 0 is on when USB line is in IDLE mode, and off in SUSPEND mode
+ * - Led 1 blinks when USB Host have checked and enabled HID mouse interface
+ * - Mouse buttons are linked at switches 0 (left), 1 (middle), 2 (right)
+ * - Mouse move are linked at switches 4 (right), 5 (left), 6 (down), 7 (up)
+ * - All switches can be used to wakeup USB Host in remote wakeup mode.
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega128b1_xmega_b1_xplained/conf_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega128b1_xmega_b1_xplained/conf_board.h
new file mode 100644
index 0000000..6825b7b
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega128b1_xmega_b1_xplained/conf_board.h
@@ -0,0 +1,41 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Board configuration for spi example
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H_INCLUDED
+#define CONF_BOARD_H_INCLUDED
+
+#endif /* CONF_BOARD_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega128b1_xmega_b1_xplained/conf_clock.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega128b1_xmega_b1_xplained/conf_clock.h
new file mode 100644
index 0000000..6ccc330
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega128b1_xmega_b1_xplained/conf_clock.h
@@ -0,0 +1,74 @@
+/**
+ * \file
+ *
+ * \brief Clock system configuration for clock example 1
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_CLOCK_H_INCLUDED
+#define CONF_CLOCK_H_INCLUDED
+
+/*
+//! Use external board OSC (8MHz)
+//! Clk pll = 48MHz (used by USB)
+//! Clk sys = 48MHz
+//! Clk cpu/per = 12MHz
+
+#define CONFIG_PLL0_SOURCE PLL_SRC_XOSC
+#define CONFIG_PLL0_MUL 6
+#define CONFIG_PLL0_DIV 1
+
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL
+
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL
+#define CONFIG_SYSCLK_PSADIV SYSCLK_PSADIV_2
+#define CONFIG_SYSCLK_PSBCDIV SYSCLK_PSBCDIV_1_2
+*/
+
+//! Configuration using On-Chip RC oscillator
+//! Use external board OSC (8MHz)
+//! Clk USB = 48MHz (used by USB)
+//! Clk sys = 48MHz
+//! Clk cpu/per = 12MHz
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_RCOSC
+#define CONFIG_OSC_RC32_CAL 48000000UL
+
+#define CONFIG_OSC_AUTOCAL OSC_ID_RC32MHZ
+#define CONFIG_OSC_AUTOCAL_REF_OSC OSC_ID_USBSOF
+
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_RC32MHZ
+#define CONFIG_SYSCLK_PSADIV SYSCLK_PSADIV_2
+#define CONFIG_SYSCLK_PSBCDIV SYSCLK_PSBCDIV_1_2
+
+
+#endif /* CONF_CLOCK_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega128b1_xmega_b1_xplained/conf_sleepmgr.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega128b1_xmega_b1_xplained/conf_sleepmgr.h
new file mode 100644
index 0000000..699010d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega128b1_xmega_b1_xplained/conf_sleepmgr.h
@@ -0,0 +1,43 @@
+/**
+ * \file
+ *
+ * \brief Sleep manager configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SLEEPMGR_H
+#define CONF_SLEEPMGR_H
+
+#define CONFIG_SLEEPMGR_ENABLE
+
+#endif /* CONF_SLEEPMGR_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega128b1_xmega_b1_xplained/ui.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega128b1_xmega_b1_xplained/ui.c
new file mode 100644
index 0000000..98a91dc
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega128b1_xmega_b1_xplained/ui.c
@@ -0,0 +1,145 @@
+/**
+ * \file
+ *
+ * \brief User Interface
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "udc.h"
+#include "udi_hid_mouse.h"
+#include "board.h"
+#include "led.h"
+#include "ui.h"
+
+#define MOUSE_MOVE_RANGE 3
+
+void ui_init(void)
+{
+ LED_On(LED0_GPIO);
+ LED_Off(LED1_GPIO);
+}
+
+void ui_powerdown(void)
+{
+ LED_Off(LED0_GPIO);
+ LED_Off(LED1_GPIO);
+ led_power_off();
+}
+
+void ui_wakeup_enable(void)
+{
+ PORT_t *port;
+ // Configure pin change interrupt for asynch. wake-up on button pin.
+ ioport_configure_pin(GPIO_PUSH_BUTTON_0,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ ioport_configure_pin(GPIO_PUSH_BUTTON_1,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ ioport_configure_pin(GPIO_PUSH_BUTTON_2,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ ioport_configure_pin(GPIO_PUSH_BUTTON_3,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ port = ioport_pin_to_port(GPIO_PUSH_BUTTON_0);
+ port->INT0MASK = 0xFF;
+ port->INTCTRL = PORT_INT0LVL_LO_gc;
+}
+
+void ui_wakeup_disable(void)
+{
+ PORT_t *port;
+ port = ioport_pin_to_port(GPIO_PUSH_BUTTON_0);
+ port->INT0MASK = 0x00;
+}
+
+// Interrupt on "pin change" from switch to do wakeup on USB
+// Note:
+// This interrupt is enable when the USB host enable remotewakeup feature
+// This interrupt wakeup the CPU if this one is in idle mode
+ISR(PORTE_INT0_vect)
+{
+ PORT_t *port;
+ port = ioport_pin_to_port(GPIO_PUSH_BUTTON_0);
+ port->INTFLAGS = 0x01; // Ack interrupt
+ // It is a wakeup then send wakeup USB
+ udc_wakeup();
+}
+
+void ui_wakeup(void)
+{
+ LED_On(LED0_GPIO);
+ led_power_on();
+}
+
+void ui_process(uint16_t framenumber)
+{
+ bool b_btn_state;
+ static bool btn_left_last_state = HID_MOUSE_BTN_UP;
+ static bool btn_right_last_state = HID_MOUSE_BTN_UP;
+ static bool btn_middle_last_state = HID_MOUSE_BTN_UP;
+ static uint8_t cpt_sof = 0;
+
+ if ((framenumber % 1000) == 0) {
+ LED_On(LED1_GPIO);
+ }
+ if ((framenumber % 1000) == 500) {
+ LED_Off(LED1_GPIO);
+ }
+ // Scan process running each 2ms
+ cpt_sof++;
+ if (2 > cpt_sof)
+ return;
+ cpt_sof = 0;
+
+ // Scan move on switch 0 (right), 1 (left), 2 (down), 3 (up)
+ if (gpio_pin_is_low(GPIO_PUSH_BUTTON_0))
+ udi_hid_mouse_moveX(MOUSE_MOVE_RANGE);
+ if (gpio_pin_is_low(GPIO_PUSH_BUTTON_1))
+ udi_hid_mouse_moveX(-MOUSE_MOVE_RANGE);
+ if (gpio_pin_is_low(GPIO_PUSH_BUTTON_2))
+ udi_hid_mouse_moveY(MOUSE_MOVE_RANGE);
+ if (gpio_pin_is_low(GPIO_PUSH_BUTTON_3))
+ udi_hid_mouse_moveY(-MOUSE_MOVE_RANGE);
+}
+
+/**
+ * \defgroup UI User Interface
+ *
+ * Human interface on XMEGA-B1 Xplain:
+ * - RED led close to USB connector is always on after firmware startup
+ * - Led 0 is on when USB line is in IDLE mode, and off in SUSPEND mode
+ * - Led 1 blinks when USB Host have checked and enabled HID mouse interface
+ * - Mouse move are linked at switches 0 (right), 1 (left), 2 (down), 3 (up)
+ * - All switches can be used to wakeup USB Host in remote wakeup mode.
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega256a3bu_stk600-rc064x/conf_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega256a3bu_stk600-rc064x/conf_board.h
new file mode 100644
index 0000000..6825b7b
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega256a3bu_stk600-rc064x/conf_board.h
@@ -0,0 +1,41 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Board configuration for spi example
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H_INCLUDED
+#define CONF_BOARD_H_INCLUDED
+
+#endif /* CONF_BOARD_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega256a3bu_stk600-rc064x/conf_clock.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega256a3bu_stk600-rc064x/conf_clock.h
new file mode 100644
index 0000000..0475dbb
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega256a3bu_stk600-rc064x/conf_clock.h
@@ -0,0 +1,68 @@
+/**
+ * \file
+ *
+ * \brief Clock system configuration for clock example 1
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_CLOCK_H_INCLUDED
+#define CONF_CLOCK_H_INCLUDED
+
+
+// Use internal 32MRC @48MHz
+// Clk cpu/per = 12MHz
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_RCOSC
+#define CONFIG_OSC_RC32_CAL 48000000UL
+
+#define CONFIG_SYSCLK_SOURCE CLK_SCLKSEL_RC32M_gc
+#define CONFIG_SYSCLK_PSADIV SYSCLK_PSADIV_2
+#define CONFIG_SYSCLK_PSBCDIV SYSCLK_PSBCDIV_1_2
+
+#define CONFIG_OSC_AUTOCAL OSC_ID_RC32MHZ
+#define CONFIG_OSC_AUTOCAL_REF_OSC OSC_ID_USBSOF
+
+/*
+// Use external 8MHz clock and PLL
+// Clk cpu/per = 12MHz
+#define CONFIG_PLL0_SOURCE PLL_SRC_XOSC
+#define CONFIG_PLL0_MUL 6
+#define CONFIG_PLL0_DIV 1
+
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL
+
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL
+#define CONFIG_SYSCLK_PSADIV SYSCLK_PSADIV_2
+#define CONFIG_SYSCLK_PSBCDIV SYSCLK_PSBCDIV_1_2
+*/
+
+#endif /* CONF_CLOCK_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega256a3bu_stk600-rc064x/conf_sleepmgr.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega256a3bu_stk600-rc064x/conf_sleepmgr.h
new file mode 100644
index 0000000..699010d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega256a3bu_stk600-rc064x/conf_sleepmgr.h
@@ -0,0 +1,43 @@
+/**
+ * \file
+ *
+ * \brief Sleep manager configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SLEEPMGR_H
+#define CONF_SLEEPMGR_H
+
+#define CONFIG_SLEEPMGR_ENABLE
+
+#endif /* CONF_SLEEPMGR_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega256a3bu_stk600-rc064x/ui.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega256a3bu_stk600-rc064x/ui.c
new file mode 100644
index 0000000..fe5248b
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/atxmega256a3bu_stk600-rc064x/ui.c
@@ -0,0 +1,171 @@
+/**
+ * \file
+ *
+ * \brief User Interface
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "udc.h"
+#include "udi_hid_mouse.h"
+#include "board.h"
+#include "led.h"
+#include "ui.h"
+
+#define MOUSE_MOVE_RANGE 3
+
+void ui_init(void)
+{
+ LED_On(LED0_GPIO);
+ LED_Off(LED1_GPIO);
+}
+
+void ui_powerdown(void)
+{
+ LED_Off(LED0_GPIO);
+ LED_Off(LED1_GPIO);
+}
+
+void ui_wakeup_enable(void)
+{
+ PORT_t *port;
+ // Configure pin change interrupt for asynch. wake-up on button pin.
+ ioport_configure_pin(GPIO_PUSH_BUTTON_0,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ ioport_configure_pin(GPIO_PUSH_BUTTON_1,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ ioport_configure_pin(GPIO_PUSH_BUTTON_2,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ ioport_configure_pin(GPIO_PUSH_BUTTON_3,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ ioport_configure_pin(GPIO_PUSH_BUTTON_4,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ ioport_configure_pin(GPIO_PUSH_BUTTON_5,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ ioport_configure_pin(GPIO_PUSH_BUTTON_6,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ ioport_configure_pin(GPIO_PUSH_BUTTON_7,
+ IOPORT_DIR_INPUT | IOPORT_PULL_UP);
+ port = ioport_pin_to_port(GPIO_PUSH_BUTTON_0);
+ port->INT0MASK = 0xFF;
+ port->INTCTRL = PORT_INT0LVL_LO_gc;
+}
+
+void ui_wakeup_disable(void)
+{
+ PORT_t *port;
+ port = ioport_pin_to_port(GPIO_PUSH_BUTTON_0);
+ port->INT0MASK = 0x00;
+}
+
+// Interrupt on "pin change" from switch to do wakeup on USB
+// Note:
+// This interrupt is enable when the USB host enable remotewakeup feature
+// This interrupt wakeup the CPU if this one is in idle mode
+ISR(PORTF_INT0_vect)
+{
+ PORT_t *port;
+ port = ioport_pin_to_port(GPIO_PUSH_BUTTON_0);
+ port->INTFLAGS = 0x01; // Ack interrupt
+ // It is a wakeup then send wakeup USB
+ udc_wakeup();
+}
+
+void ui_wakeup(void)
+{
+ LED_On(LED0_GPIO);
+}
+
+void ui_process(uint16_t framenumber)
+{
+ bool b_btn_state;
+ static bool btn_left_last_state = HID_MOUSE_BTN_UP;
+ static bool btn_right_last_state = HID_MOUSE_BTN_UP;
+ static bool btn_middle_last_state = HID_MOUSE_BTN_UP;
+ static uint8_t cpt_sof = 0;
+
+ if ((framenumber % 1000) == 0) {
+ LED_On(LED1_GPIO);
+ }
+ if ((framenumber % 1000) == 500) {
+ LED_Off(LED1_GPIO);
+ }
+ // Scan process running each 2ms
+ cpt_sof++;
+ if (2 > cpt_sof)
+ return;
+ cpt_sof = 0;
+
+ // Scan buttons on switch 0 (left), 1 (middle), 2 (right)
+ b_btn_state = (gpio_pin_is_low(GPIO_PUSH_BUTTON_0)) ? HID_MOUSE_BTN_DOWN
+ : HID_MOUSE_BTN_UP;
+ if (b_btn_state != btn_left_last_state) {
+ udi_hid_mouse_btnleft(b_btn_state);
+ btn_left_last_state = b_btn_state;
+ }
+ b_btn_state = (gpio_pin_is_low(GPIO_PUSH_BUTTON_1)) ? HID_MOUSE_BTN_DOWN
+ : HID_MOUSE_BTN_UP;
+ if (b_btn_state != btn_middle_last_state) {
+ udi_hid_mouse_btnmiddle(b_btn_state);
+ btn_middle_last_state = b_btn_state;
+ }
+ b_btn_state = (gpio_pin_is_low(GPIO_PUSH_BUTTON_2)) ? HID_MOUSE_BTN_DOWN
+ : HID_MOUSE_BTN_UP;
+ if (b_btn_state != btn_right_last_state) {
+ udi_hid_mouse_btnright(b_btn_state);
+ btn_right_last_state = b_btn_state;
+ }
+ // Scan move on switch 4 (right), 5 (left), 6 (down), 7 (up)
+ if (gpio_pin_is_low(GPIO_PUSH_BUTTON_4))
+ udi_hid_mouse_moveX(MOUSE_MOVE_RANGE);
+ if (gpio_pin_is_low(GPIO_PUSH_BUTTON_5))
+ udi_hid_mouse_moveX(-MOUSE_MOVE_RANGE);
+ if (gpio_pin_is_low(GPIO_PUSH_BUTTON_6))
+ udi_hid_mouse_moveY(MOUSE_MOVE_RANGE);
+ if (gpio_pin_is_low(GPIO_PUSH_BUTTON_7))
+ udi_hid_mouse_moveY(-MOUSE_MOVE_RANGE);
+}
+
+/**
+ * \defgroup UI User Interface
+ *
+ * Human interface on STK600:
+ * - RED led close to USB connector is always on after firmware startup
+ * - Led 0 is on when USB line is in IDLE mode, and off in SUSPEND mode
+ * - Led 1 blinks when USB Host have checked and enabled HID mouse interface
+ * - Mouse buttons are linked at switches 0 (left), 1 (middle), 2 (right)
+ * - Mouse move are linked at switches 4 (right), 5 (left), 6 (down), 7 (up)
+ * - All switches can be used to wakeup USB Host in remote wakeup mode.
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/conf_usb.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/conf_usb.h
new file mode 100644
index 0000000..253975a
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/conf_usb.h
@@ -0,0 +1,123 @@
+/**
+ * \file
+ *
+ * \brief USB configuration file
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _CONF_USB_H_
+#define _CONF_USB_H_
+
+#include "compiler.h"
+
+/**
+ * USB Device Configuration
+ * @{
+ */
+
+//! Device definition (mandatory)
+#define USB_DEVICE_VENDOR_ID USB_VID_ATMEL
+#define USB_DEVICE_PRODUCT_ID USB_PID_ATMEL_AVR_HIDMOUSE
+#define USB_DEVICE_MAJOR_VERSION 1
+#define USB_DEVICE_MINOR_VERSION 0
+#define USB_DEVICE_POWER 100 // Consumption on Vbus line (mA)
+#define USB_DEVICE_ATTR \
+ (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_SELF_POWERED)
+// (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_BUS_POWERED)
+// (USB_CONFIG_ATTR_SELF_POWERED)
+// (USB_CONFIG_ATTR_BUS_POWERED)
+
+//! USB Device string definitions (Optional)
+#define USB_DEVICE_MANUFACTURE_NAME "ATMEL AVR"
+#define USB_DEVICE_PRODUCT_NAME "HID Mouse"
+// #define USB_DEVICE_SERIAL_NAME "12...EF"
+
+/**
+ * Device speeds support
+ * @{
+ */
+//! To define a Low speed device
+//#define USB_DEVICE_LOW_SPEED
+
+//! To authorize the High speed
+#if (UC3A3||UC3A4)
+//#define USB_DEVICE_HS_SUPPORT
+#endif
+//@}
+
+/**
+ * USB Device Callbacks definitions (Optional)
+ * @{
+ */
+#define UDC_VBUS_EVENT(b_vbus_high) main_vbus_action(b_vbus_high)
+#define UDC_SOF_EVENT() main_sof_action()
+#define UDC_SUSPEND_EVENT() main_suspend_action()
+#define UDC_RESUME_EVENT() main_resume_action()
+//! Mandatory when USB_DEVICE_ATTR authorizes remote wakeup feature
+#define UDC_REMOTEWAKEUP_ENABLE() main_remotewakeup_enable()
+#define UDC_REMOTEWAKEUP_DISABLE() main_remotewakeup_disable()
+//! When a extra string descriptor must be supported
+//! other than manufacturer, product and serial string
+// #define UDC_GET_EXTRA_STRING()
+//@}
+
+//@}
+
+
+/**
+ * USB Interface Configuration
+ * @{
+ */
+/**
+ * Configuration of HID Mouse interface
+ * @{
+ */
+//! Interface callback definition
+#define UDI_HID_MOUSE_ENABLE_EXT() main_mouse_enable()
+#define UDI_HID_MOUSE_DISABLE_EXT() main_mouse_disable()
+//@}
+//@}
+
+
+/**
+ * USB Device Driver Configuration
+ * @{
+ */
+//@}
+
+//! The includes of classes and other headers must be done at the end of this file to avoid compile error
+#include "udi_hid_mouse_conf.h"
+#include "main.h"
+
+#endif // _CONF_USB_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/main.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/main.c
new file mode 100644
index 0000000..599c140
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/main.c
@@ -0,0 +1,186 @@
+/**
+ * \file
+ *
+ * \brief Main functions for Mouse example
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "preprocessor.h"
+#include "board.h"
+#include "gpio.h"
+#include "sysclk.h"
+#include "sleepmgr.h"
+#include "conf_usb.h"
+#include "udc.h"
+#include "udd.h"
+#include "ui.h"
+
+static bool main_b_mouse_enable = false;
+
+
+/*! \brief Main function. Execution starts here.
+ */
+int main(void)
+{
+ irq_initialize_vectors();
+ cpu_irq_enable();
+
+ // Initialize the sleep manager
+ sleepmgr_init();
+
+ sysclk_init();
+ board_init();
+ ui_init();
+ ui_powerdown();
+
+ // Start USB stack to authorize VBus monitoring
+ udc_start();
+
+ if (!udc_include_vbus_monitoring()) {
+ // VBUS monitoring is not available on this product
+ // thereby VBUS has to be considered as present
+ main_vbus_action(true);
+ }
+
+ // The main loop manages only the power mode
+ // because the USB management is done by interrupt
+ while (true) {
+
+ sleepmgr_enter_sleep();
+
+#ifdef USB_DEVICE_LOW_SPEED
+ // No USB "Keep a live" interrupt available in low speed
+ // to scan mouse interface then use main loop
+ if (main_b_mouse_enable) {
+ static uint16_t virtual_sof_sub = 0;
+ static uint16_t virtual_sof = 0;
+ if (700 == virtual_sof_sub++) {
+ virtual_sof_sub = 0;
+ ui_process(virtual_sof++);
+ }
+ }
+#endif
+
+ }
+}
+
+void main_vbus_action(bool b_high)
+{
+ if (b_high) {
+ // Attach USB Device
+ udc_attach();
+ } else {
+ // VBUS not present
+ udc_detach();
+ }
+}
+
+void main_suspend_action(void)
+{
+ ui_powerdown();
+}
+
+void main_resume_action(void)
+{
+ ui_wakeup();
+}
+
+void main_sof_action(void)
+{
+ if (!main_b_mouse_enable)
+ return;
+ ui_process(udd_get_frame_number());
+}
+
+void main_remotewakeup_enable(void)
+{
+ ui_wakeup_enable();
+}
+
+void main_remotewakeup_disable(void)
+{
+ ui_wakeup_disable();
+}
+
+bool main_mouse_enable(void)
+{
+ main_b_mouse_enable = true;
+ return true;
+}
+
+void main_mouse_disable(void)
+{
+ main_b_mouse_enable = false;
+}
+
+
+/**
+ * \mainpage ASF USB Device HID Mouse
+ *
+ * \section intro Introduction
+ * This example shows how to implement a USB Device HID Mouse
+ * on AVR products with USB module.
+ * The application note AVR4903 provides information about this implementation.
+ *
+ * \section startup Startup
+ * The example uses the buttons or sensors available on the board
+ * to simulate a standard mouse.
+ * After loading firmware, connect hardware board (EVKxx,XPlain,...) to the USB Host.
+ * When connected to a USB host system this application provides a mouse application
+ * in the Unix/Mac/Windows operating systems.
+ * This example uses the native HID driver for these operating systems.
+ *
+ * \copydoc UI
+ *
+ * \section example About example
+ *
+ * The example uses the following module groups:
+ * - Basic modules:
+ * Startup, board, clock, interrupt, power management
+ * - USB Device stack and HID modules:
+ * <br>services/usb/
+ * <br>services/usb/udc/
+ * <br>services/usb/class/hid/
+ * <br>services/usb/class/hid/mouse/
+ * - Specific implementation:
+ * - main.c,
+ * <br>initializes clock
+ * <br>initializes interrupt
+ * <br>\subpage power_management
+ * <br>manages UI
+ * - specific implementation for each target "./examples/product_board/":
+ * - conf_foo.h configuration of each module
+ * - ui.c implement of user's interface (buttons, leds)
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/main.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/main.h
new file mode 100644
index 0000000..69286f0
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/main.h
@@ -0,0 +1,86 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief Declaration of main function used by HID mouse example
+ *
+ * - Compiler: IAR EWAVR and GNU GCC for AVR
+ * - Supported devices: All AVR devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#ifndef _MAIN_H_
+#define _MAIN_H_
+
+/*! \brief Called by HID interface
+ * Callback running when USB Host enable mouse interface
+ *
+ * \retval true if mouse startup is ok
+ */
+bool main_mouse_enable(void);
+
+/*! \brief Called by HID interface
+ * Callback running when USB Host disable mouse interface
+ */
+void main_mouse_disable(void);
+
+/*! \brief Called when Vbus line state change
+ */
+void main_vbus_action(bool b_high);
+
+/*! \brief Called when a start of frame is received on USB line
+ */
+void main_sof_action(void);
+
+/*! \brief Called by UDD when a suspend is received
+ * Callback running when USB Host set USB line in suspend state
+ */
+void main_suspend_action(void);
+
+/*! \brief Called by UDD when the USB line exit of suspend state
+ */
+void main_resume_action(void);
+
+/*! \brief Called by UDC when USB Host request to enable remote wakeup
+ */
+void main_remotewakeup_enable(void);
+
+/*! \brief Called by UDC when USB Host request to disable remote wakeup
+ */
+void main_remotewakeup_disable(void);
+
+#endif // _MAIN_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/mxt768e_stk600-rcmxt768e/conf_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/mxt768e_stk600-rcmxt768e/conf_board.h
new file mode 100644
index 0000000..d89a271
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/mxt768e_stk600-rcmxt768e/conf_board.h
@@ -0,0 +1,43 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Board configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H_INCLUDED
+#define CONF_BOARD_H_INCLUDED
+
+// Only the default board init (switchs/leds) is necessary for HID mouse example
+
+#endif /* CONF_BOARD_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/mxt768e_stk600-rcmxt768e/conf_clock.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/mxt768e_stk600-rcmxt768e/conf_clock.h
new file mode 100644
index 0000000..d75f4a4
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/mxt768e_stk600-rcmxt768e/conf_clock.h
@@ -0,0 +1,78 @@
+/**
+ * \file
+ *
+ * \brief Chip-specific system clock manager configuration
+ *
+ * Copyright (C) 2011 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_CLOCK_H_INCLUDED
+#define CONF_CLOCK_H_INCLUDED
+
+// ===== System Clock Source Options
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_RCSYS
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_OSC0
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL0
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL1
+
+// ===== PLL0 Options
+#define CONFIG_PLL0_SOURCE PLL_SRC_OSC0
+#define CONFIG_PLL0_MUL 4 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+#define CONFIG_PLL0_DIV 1 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+
+// ===== PLL1 Options
+//#define CONFIG_PLL1_SOURCE PLL_SRC_OSC0
+//#define CONFIG_PLL1_MUL 4 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+//#define CONFIG_PLL1_DIV 1 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+
+// ===== System Clock Bus Division Options
+#define CONFIG_SYSCLK_CPU_DIV 0 /* Fcpu = Fsys/(2 ^ CPU_div) */
+#define CONFIG_SYSCLK_PBA_DIV 0 /* Fpba = Fsys/(2 ^ PBA_div) */
+#define CONFIG_SYSCLK_PBB_DIV 0 /* Fpbb = Fsys/(2 ^ PBB_div) */
+#define CONFIG_SYSCLK_PBC_DIV 0 /* Fpbc = Fsys/(2 ^ PBC_div) */
+
+// ===== Peripheral Clock Management Options
+//#define CONFIG_SYSCLK_INIT_CPUMASK (1 << AVR32_OCD_CLK_CPU)
+//#define CONFIG_SYSCLK_INIT_PBAMASK (1 << SYSCLK_USART0)
+//#define CONFIG_SYSCLK_INIT_PBBMASK (1 << SYSCLK_HMATRIX)
+
+//#define CONFIG_SYSCLK_INIT_PBAMASK (SYSCLK_USART0)
+//#define CONFIG_SYSCLK_INIT_PBBMASK (SYSCLK_HMATRIX)
+//#define CONFIG_SYSCLK_INIT_HSBMASK (SYSCLK_MDMA_HSB | SYSCLK_PDCA_HSB)
+
+// ===== USB Clock Source Options
+//#define CONFIG_USBCLK_SOURCE USBCLK_SRC_OSC0
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL0
+//#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL1
+#define CONFIG_USBCLK_DIV 1 /* Fusb = Fsys/(2 ^ USB_div) */
+
+#endif /* CONF_CLOCK_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/mxt768e_stk600-rcmxt768e/conf_sleepmgr.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/mxt768e_stk600-rcmxt768e/conf_sleepmgr.h
new file mode 100644
index 0000000..341afd2
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/mxt768e_stk600-rcmxt768e/conf_sleepmgr.h
@@ -0,0 +1,43 @@
+/**
+ * \file
+ *
+ * \brief Sleep manager configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SLEEPMGR_H
+#define CONF_SLEEPMGR_H
+
+#define CONFIG_SLEEPMGR_ENABLE
+
+#endif /* CONF_SLEEPMGR_H */ \ No newline at end of file
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/mxt768e_stk600-rcmxt768e/ui.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/mxt768e_stk600-rcmxt768e/ui.c
new file mode 100644
index 0000000..cdcb57e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/mxt768e_stk600-rcmxt768e/ui.c
@@ -0,0 +1,176 @@
+/**
+ * \file
+ *
+ * \brief User Interface
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "udc.h"
+#include "udi_hid_mouse.h"
+#include "board.h"
+#include "gpio.h"
+#include "eic.h"
+#include "ui.h"
+
+#define MOUSE_MOVE_RANGE 3
+
+// Interrupt on "pin change" from switch to do wakeup on USB
+// Note:
+// This interrupt is enable when the USB host enable remotewakeup feature
+// This interrupt wakeup the CPU if this one is in idle mode
+ISR(ui_wakeup_isr, AVR32_GPIO_IRQ_GROUP, 0)
+{
+ // Clear GPIO interrupt.
+ gpio_clear_pin_interrupt_flag(GPIO_PUSH_BUTTON_SW0);
+ // Clear External Interrupt Line else Wakeup event always enabled
+ eic_clear_interrupt_line(&AVR32_EIC, EXT_NMI);
+ // It is a wakeup then send wakeup USB
+ udc_wakeup();
+}
+
+
+void ui_init(void)
+{
+ /* register joystick handler on level 0 */
+ irqflags_t flags = cpu_irq_save();
+ irq_register_handler(ui_wakeup_isr,
+ AVR32_GPIO_IRQ_0 + (GPIO_PUSH_BUTTON_2 / 8), 0);
+ cpu_irq_restore(flags);
+
+ LED_On(LED0);
+ LED_Off(LED1);
+}
+
+void ui_powerdown(void)
+{
+ LED_Off(LED0);
+ LED_Off(LED1);
+}
+
+
+//! Structure holding the configuration parameters of the EIC low level driver.
+static const eic_options_t eic_options = {
+ // Choose External Interrupt Controller Line
+ .eic_line = EXT_NMI,
+ // Enable level-triggered interrupt.
+ .eic_mode = EIC_MODE_LEVEL_TRIGGERED,
+ // Don't care value because the chosen eic mode is level-triggered.
+ .eic_edge = 0,
+ // Interrupt will trigger on low-level.
+ .eic_level = EIC_LEVEL_LOW_LEVEL,
+ // Enable filter.
+ .eic_filter = EIC_FILTER_ENABLED,
+ // For Wake Up mode, initialize in asynchronous mode
+ .eic_async = EIC_ASYNCH_MODE
+};
+
+
+void ui_wakeup_enable(void)
+{
+ /* configure joystick to produce IT on all state change */
+ gpio_enable_pin_interrupt(GPIO_PUSH_BUTTON_SW0, GPIO_PIN_CHANGE);
+ /*
+ * Configure pin change interrupt for asynchronous wake-up (required to
+ * wake up from the STATIC sleep mode).
+ *
+ * First, map the interrupt line to the GPIO pin with the right
+ * peripheral function.
+ */
+ gpio_enable_module_pin(GPIO_PUSH_BUTTON_SW0, 4);
+
+ /*
+ * Enable the internal pull-up resistor on that pin (because the EIC is
+ * configured such that the interrupt will trigger on low-level, see
+ * eic_options.eic_level).
+ */
+ gpio_enable_pin_pull_up(GPIO_PUSH_BUTTON_SW0);
+
+ // Init the EIC controller with the set options.
+ eic_init(&AVR32_EIC, &eic_options, sizeof(eic_options) /
+ sizeof(eic_options_t));
+
+ // Enable External Interrupt Controller Line
+ eic_enable_line(&AVR32_EIC, EXT_NMI);
+}
+
+void ui_wakeup_disable(void)
+{
+ eic_disable_line(&AVR32_EIC, EXT_NMI);
+ /* Disable joystick input change ITs. */
+ gpio_disable_pin_interrupt(GPIO_PUSH_BUTTON_SW0);
+}
+
+void ui_wakeup(void)
+{
+ LED_On(LED0);
+}
+
+void ui_process(uint16_t framenumber)
+{
+ static uint8_t cpt_sof = 0;
+
+ if ((framenumber % 1000) == 0) {
+ LED_On(LED1);
+ }
+ if ((framenumber % 1000) == 500) {
+ LED_Off(LED1);
+ }
+ // Scan process running each 2ms
+ cpt_sof++;
+ if (2 > cpt_sof)
+ return;
+ cpt_sof = 0;
+
+ // No Scan buttons
+ // Look touch sensor activity for the X and Y events
+ if (!gpio_get_pin_value(GPIO_PUSH_BUTTON_SW0)) {
+ udi_hid_mouse_moveX(-MOUSE_MOVE_RANGE);
+ }
+ if (!gpio_get_pin_value(GPIO_PUSH_BUTTON_SW1)) {
+ udi_hid_mouse_moveX(MOUSE_MOVE_RANGE);
+ }
+}
+
+/**
+ * \defgroup UI User Interface
+ *
+ * Human interface on STK600 :
+ * - PWR led is on when power present
+ * - Led 0 is on when USB line is in IDLE mode, and off in SUSPEND mode
+ * - Led 1 blinks when USB Host have checked and enabled HID mouse interface
+ * - Mouse move are linked at switches 0 (left), 1 (right)
+ * - Switch 0 is linked to wakeup USB Host in remote wakeup mode
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/ui.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/ui.h
new file mode 100644
index 0000000..5275505
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/ui.h
@@ -0,0 +1,56 @@
+/**
+ * \file
+ *
+ * \brief Common User Interface for HID Mouse application
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _UI_H_
+#define _UI_H_
+
+void ui_init(void);
+void ui_powerdown(void);
+
+void ui_wakeup_enable(void);
+void ui_wakeup_disable(void);
+void ui_wakeup(void);
+
+//! This process is called called each 1ms
+//! It is called only if HID mouse interface is enable.
+//! It is called by SOF interrupt.
+//!
+//!
+void ui_process(uint16_t framenumber);
+
+#endif // _UI_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/conf_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/conf_board.h
new file mode 100644
index 0000000..a6a41c4
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/conf_board.h
@@ -0,0 +1,44 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Board configuration for spi example
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H_INCLUDED
+#define CONF_BOARD_H_INCLUDED
+
+// Enable COM port.
+#define CONF_BOARD_COM_PORT
+
+#endif /* CONF_BOARD_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/conf_clock.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/conf_clock.h
new file mode 100644
index 0000000..7cddb6c
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/conf_clock.h
@@ -0,0 +1,50 @@
+/**
+ * \file
+ *
+ * \brief Clock system configuration for clock example 2
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_CLOCK_H_INCLUDED
+#define CONF_CLOCK_H_INCLUDED
+
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_ZEPHYR_CLOCK
+
+// USB Generic clock use a PLL1 at 48MHz
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL1
+#define CONFIG_USBCLK_DIV 1
+#define CONFIG_PLL1_SOURCE PLL_SRC_OSC0
+#define CONFIG_PLL1_DIV 2
+#define CONFIG_PLL1_MUL 8
+
+#endif /* CONF_CLOCK_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/conf_sleepmgr.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/conf_sleepmgr.h
new file mode 100644
index 0000000..2ec122b
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/conf_sleepmgr.h
@@ -0,0 +1,43 @@
+/**
+ * \file
+ *
+ * \brief Sleep manager configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SLEEPMGR_H
+#define CONF_SLEEPMGR_H
+
+//#define CONFIG_SLEEPMGR_ENABLE
+
+#endif /* CONF_SLEEPMGR_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/conf_usart_serial.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/conf_usart_serial.h
new file mode 100644
index 0000000..f06f0d9
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/conf_usart_serial.h
@@ -0,0 +1,46 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Usart Serial configuration for stdio example
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_USART_SERIAL_H_INCLUDED
+#define CONF_USART_SERIAL_H_INCLUDED
+
+/* Possibility to change low-level configurations here */
+
+//! Default Usart Mode
+//#define CONFIG_USART_SERIAL_MODE USART_NORMAL_CHMODE
+
+#endif /* CONF_USART_SERIAL_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/conf_usb.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/conf_usb.h
new file mode 100644
index 0000000..58fc126
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/conf_usb.h
@@ -0,0 +1,77 @@
+/**
+ * \file
+ *
+ * \brief USB configuration file
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _CONF_USB_H_
+#define _CONF_USB_H_
+
+#include "compiler.h"
+#define USB_DEVICE_FEATURE ENABLED
+
+//**** USB Device Configuration
+//** Defines
+#define USB_DEVICE_VENDOR_ID USB_VID_ATMEL
+#define USB_DEVICE_PRODUCT_ID USB_PID_ATMEL_AVR_HIDMOUSE
+#define USB_DEVICE_MAJOR_VERSION 1
+#define USB_DEVICE_MINOR_VERSION 0
+#define USB_DEVICE_POWER 100 // Consumption on Vbus line (mA)
+#define USB_DEVICE_MANUFACTURE_NAME "ATMEL AVR"
+#define USB_DEVICE_PRODUCT_NAME "HID Mouse"
+//#define USB_DEVICE_LOW_SPEED
+#define USB_DEVICE_ATTR \
+ (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_SELF_POWERED)
+//#define USB_DEVICE_ATTR (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_BUS_POWERED)
+
+//** Callbacks link
+#define UDC_VBUS_EVENT(b_vbus_high) main_vbus_action(b_vbus_high)
+#define UDC_SOF_EVENT() main_sof_action()
+#define UDC_SUSPEND_EVENT() main_suspend_action()
+#define UDC_RESUME_EVENT() main_resume_action()
+#define UDC_REMOTEWAKEUP_ENABLE() main_remotewakeup_enable()
+#define UDC_REMOTEWAKEUP_DISABLE() main_remotewakeup_disable()
+#include "main.h"
+
+//*** USB Interface Configuration
+//**
+#define UDI_HID_MOUSE_ENABLE_EXT() main_mouse_enable()
+#define UDI_HID_MOUSE_DISABLE_EXT() main_mouse_disable()
+#include "main.h"
+#include "udi_hid_mouse_conf.h"
+
+//*** USB Device Driver Configuration
+
+#endif // _CONF_USB_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/iar/usb_device_hid_mouse.ewd b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/iar/usb_device_hid_mouse.ewd
new file mode 100644
index 0000000..16bf74b
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/iar/usb_device_hid_mouse.ewd
@@ -0,0 +1,296 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+
+<project>
+ <fileVersion>2</fileVersion>
+ <configuration>
+ <name>Debug</name>
+ <toolchain>
+ <name>AVR32</name>
+ </toolchain>
+ <debug>1</debug>
+ <settings>
+ <name>C-SPY</name>
+ <archiveVersion>2</archiveVersion>
+ <data>
+ <version>0</version>
+ <wantNonLocal>1</wantNonLocal>
+ <debug>1</debug>
+ <option>
+ <name>CMandatory</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CInput</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCore</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CRunToEnable</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CRunToName</name>
+ <state>main</state>
+ </option>
+ <option>
+ <name>CMacOverride</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CMacFile</name>
+ <state></state>
+ </option>
+ <option>
+ <name>DynDriver</name>
+ <state>JTAGICEMKIIAVR32</state>
+ </option>
+ <option>
+ <name>DDFOverride</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>DDFFile</name>
+ <state>$TOOLKIT_DIR$\config\ioAvr32A.ddf</state>
+ </option>
+ <option>
+ <name>DebuggerUseUbrofResetVector</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>IExtraOptionsCheck</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>IExtraOptions</name>
+ <state></state>
+ </option>
+ </data>
+ </settings>
+ <settings>
+ <name>AVRONE</name>
+ <archiveVersion>4</archiveVersion>
+ <data>
+ <version>2</version>
+ <wantNonLocal>1</wantNonLocal>
+ <debug>1</debug>
+ <option>
+ <name>CAvrOneMandatory</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CAvrOnePeripherals</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CAvrOneReset</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CAvrOneSWBreakpoints</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CAvrOneSuppressDownload</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CAvrOneVerifyDownload</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CAvrOneCommunicationLogging</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CAvrOneCommLogFile</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CAvrOneJtagFrequence</name>
+ <version>0</version>
+ <state>24</state>
+ </option>
+ <option>
+ <name>CAvrOneDaisyChainBeforeDevices</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CAvrOneDaisyChainBeforeBits</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CAvrOneDaisyChainAfterDevices</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CAvrOneDaisyChainAfterBits</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>FlashLoaders</name>
+ <state></state>
+ </option>
+ <option>
+ <name>UseFlashLoader</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CAvrOneJtagChainConfig</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CAvrOneEnableFlashVault</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CAvrOneDisableSecuredDebugging</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CAvrOneFlashVaultSlave</name>
+ <state>0</state>
+ </option>
+ </data>
+ </settings>
+ <settings>
+ <name>JTAGICEMKIIAVR32</name>
+ <archiveVersion>4</archiveVersion>
+ <data>
+ <version>2</version>
+ <wantNonLocal>1</wantNonLocal>
+ <debug>1</debug>
+ <option>
+ <name>CJtagIceMkIIMandatory</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CJtagIceMkIIPeripherals</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CJtagIceMkIIReset</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CJtagIceMkIISWBreakpoints</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CJtagIceMkIISuppressDownload</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CJtagIceMkIIVerifyDownload</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CJTagIceMkIICommunicationLogging</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CJtagIceMkIICommLogFile</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CJtagIceMkIIConnectionRage</name>
+ <version>0</version>
+ <state>2</state>
+ </option>
+ <option>
+ <name>CJtagIceMkIIConnectionPort</name>
+ <version>0</version>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CJtagIceMkIIJtagFrequence</name>
+ <version>0</version>
+ <state>8</state>
+ </option>
+ <option>
+ <name>CJtagIceMkIIDaisyChain</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CJtagIceMkIIDaisyChainBeforeDevices</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CJtagIceMkIIDaisyChainBeforeBits</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CJtagIceMkIIDaisyChainAfterDevices</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CJtagIceMkIIDaisyChainAfterBits</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>FlashLoaders</name>
+ <state></state>
+ </option>
+ <option>
+ <name>UseFlashLoader</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CJtagIceMkIIEnableFlashVault</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CJtagIceMkIIDisableSecuredDebugging</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CJtagIceMkIIFlashVaultSlave</name>
+ <state>0</state>
+ </option>
+ </data>
+ </settings>
+ <settings>
+ <name>SIMAVR32</name>
+ <archiveVersion>2</archiveVersion>
+ <data>
+ <version>0</version>
+ <wantNonLocal>1</wantNonLocal>
+ <debug>1</debug>
+ <option>
+ <name>CSimMandatory</name>
+ <state>1</state>
+ </option>
+ </data>
+ </settings>
+ <debuggerPlugins>
+ <plugin>
+ <file>$TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin</file>
+ <loadFlag>0</loadFlag>
+ </plugin>
+ <plugin>
+ <file>$EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin</file>
+ <loadFlag>1</loadFlag>
+ </plugin>
+ <plugin>
+ <file>$EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin</file>
+ <loadFlag>0</loadFlag>
+ </plugin>
+ <plugin>
+ <file>$EW_DIR$\common\plugins\Profiling\Profiling.ENU.ewplugin</file>
+ <loadFlag>1</loadFlag>
+ </plugin>
+ <plugin>
+ <file>$EW_DIR$\common\plugins\Stack\Stack.ENU.ewplugin</file>
+ <loadFlag>1</loadFlag>
+ </plugin>
+ <plugin>
+ <file>$EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin</file>
+ <loadFlag>1</loadFlag>
+ </plugin>
+ </debuggerPlugins>
+ </configuration>
+</project>
+
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/iar/usb_device_hid_mouse.ewp b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/iar/usb_device_hid_mouse.ewp
new file mode 100644
index 0000000..11d1844
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/iar/usb_device_hid_mouse.ewp
@@ -0,0 +1,951 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+
+<project>
+ <fileVersion>2</fileVersion>
+ <configuration>
+ <name>Debug</name>
+ <toolchain>
+ <name>AVR32</name>
+ </toolchain>
+ <debug>1</debug>
+ <settings>
+ <name>General</name>
+ <archiveVersion>4</archiveVersion>
+ <data>
+ <version>6</version>
+ <wantNonLocal>1</wantNonLocal>
+ <debug>1</debug>
+ <option>
+ <name>CoreRevisionSlave</name>
+ <version>1</version>
+ <state>1</state>
+ </option>
+ <option>
+ <name>ProcessorCoreDyn</name>
+ <state>avr32a</state>
+ </option>
+ <option>
+ <name>ProcessorCoreSlave</name>
+ <state>avr32a</state>
+ </option>
+ <option>
+ <name>CodeModel</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>DataModel</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>EnableSimdInstructions</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>EnableDspInstructions</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>EnableRmwInstructions</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>GAllowUnaligned</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>GOutputBinary</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>ExePath</name>
+ <state>Debug\Exe</state>
+ </option>
+ <option>
+ <name>ObjPath</name>
+ <state>Debug\Obj</state>
+ </option>
+ <option>
+ <name>ListPath</name>
+ <state>Debug\List</state>
+ </option>
+ <option>
+ <name>GRuntimeLibSelect</name>
+ <version>0</version>
+ <state>2</state>
+ </option>
+ <option>
+ <name>GRuntimeLibSelectSlave</name>
+ <version>0</version>
+ <state>2</state>
+ </option>
+ <option>
+ <name>RTDescription</name>
+ <state>Use the full configuration of the C/EC++ runtime library. Full locale interface, C locale, file descriptor support, multibytes in printf and scanf, and hex floats in strtod.</state>
+ </option>
+ <option>
+ <name>RTLibraryPath</name>
+ <state>$TOOLKIT_DIR$\lib\dlavr32allasf.r82</state>
+ </option>
+ <option>
+ <name>RTConfigPath</name>
+ <state>$TOOLKIT_DIR$\lib\dlavr32allasf.h</state>
+ </option>
+ <option>
+ <name>Input variant</name>
+ <version>0</version>
+ <state>1</state>
+ </option>
+ <option>
+ <name>Input description</name>
+ <state>No specifier n, no float.</state>
+ </option>
+ <option>
+ <name>Output variant</name>
+ <version>0</version>
+ <state>1</state>
+ </option>
+ <option>
+ <name>Output description</name>
+ <state>No specifier a or A.</state>
+ </option>
+ <option>
+ <name>GUnhandledInterrupts</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>GUnhandledExceptions</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>GTraceBufferSize</name>
+ <version>0</version>
+ <state>0</state>
+ </option>
+ <option>
+ <name>GSStackSize</name>
+ <state>0x4000</state>
+ </option>
+ <option>
+ <name>GCStackSize</name>
+ <state>0x0000</state>
+ </option>
+ <option>
+ <name>GHeapSize</name>
+ <state>0x6000</state>
+ </option>
+ <option>
+ <name>GeneralEnableMisra</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>GeneralMisraVerbose</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CoreRevision</name>
+ <version>1</version>
+ <state>1</state>
+ </option>
+ <option>
+ <name>GTraceSelect</name>
+ <version>0</version>
+ <state>0</state>
+ </option>
+ <option>
+ <name>GTraceBufferFull</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>GeneralMisraVer</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>GeneralMisraRules04</name>
+ <version>0</version>
+ <state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
+ </option>
+ <option>
+ <name>GeneralMisraRules98</name>
+ <version>0</version>
+ <state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
+ </option>
+ <option>
+ <name>GEnableNanoTrace</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>EnableFpuInstructions</name>
+ <state>0</state>
+ </option>
+ </data>
+ </settings>
+ <settings>
+ <name>ICCAVR32</name>
+ <archiveVersion>7</archiveVersion>
+ <data>
+ <version>8</version>
+ <wantNonLocal>1</wantNonLocal>
+ <debug>1</debug>
+ <option>
+ <name>CCDefines</name>
+ <state>__AT32UC3A0512__=1</state>
+ <state>__AVR32_ABI_COMPILER__</state>
+ <state>BOARD=USER_BOARD</state>
+ </option>
+ <option>
+ <name>CCPreprocFile</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCPreprocComments</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCPreprocLine</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCListCFile</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCListCMnemonics</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCListCMessages</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCListAssFile</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCListAssSource</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCEnableRemarks</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCDiagSuppress</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CCDiagRemark</name>
+ <state>Pa082</state>
+ </option>
+ <option>
+ <name>CCDiagWarning</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CCDiagError</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CCCore</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCCodeModel</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCDataModel</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCObjPrefix</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCRequirePrototypes</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCMultibyteSupport</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCMigrationPreprocExtentions</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCExt</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCCharIs</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCAllowList</name>
+ <version>0</version>
+ <state>0000000</state>
+ </option>
+ <option>
+ <name>CCObjUseModuleName</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCObjModuleName</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CCDebugInfo</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCDiagWarnAreErr</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCCompilerRuntimeInfo</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>OutputFile</name>
+ <state>$FILE_BNAME$.r82</state>
+ </option>
+ <option>
+ <name>CCLangSelect</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCLibConfigHeader</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>PreInclude</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CompilerMisraOverride</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCIncludePath2</name>
+ <state>$PROJ_DIR$\..\state>
+ <state>$PROJ_DIR$\..\..\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\utils\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\utils\preprocessor\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\utils\stdio\stdio_serial\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\boards\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\drivers\cpu\cycle_counter\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\drivers\gpio\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\drivers\intc\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\drivers\pm\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\drivers\flashc\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\drivers\usbc\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\drivers\usart\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\services\basic\clock\validation\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\services\basic\sleepmgr\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\services\basic\serial\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\services\usb\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\services\usb\udc\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\services\usb\class\hid\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\services\usb\class\hid\mouse\</state>
+ <state>$PROJ_DIR$\..\</state>
+ </option>
+ <option>
+ <name>CCStdIncCheck</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCStdIncludePath</name>
+ <state>$TOOLKIT_DIR$\INC\</state>
+ </option>
+ <option>
+ <name>IExtraOptionsCheck</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>IExtraOptions</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CCModuleTypeOverride</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCModuleType</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCOptLevel</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCOptStrategy</name>
+ <version>0</version>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCOptLevelSlave</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CompilerMisraRules04</name>
+ <version>0</version>
+ <state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
+ </option>
+ <option>
+ <name>CompilerMisraRules98</name>
+ <version>0</version>
+ <state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
+ </option>
+ <option>
+ <name>CCFPIMPLLIST</name>
+ <version>0</version>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CCFPIMPL description</name>
+ <state>Use the space efficient but slower implementation unless another module uses the fast implementation.</state>
+ </option>
+ </data>
+ </settings>
+ <settings>
+ <name>AAVR32</name>
+ <archiveVersion>2</archiveVersion>
+ <data>
+ <version>0</version>
+ <wantNonLocal>1</wantNonLocal>
+ <debug>1</debug>
+ <option>
+ <name>AObjPrefix</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>ACore</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AEnableRemarks</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>ADiagSuppress</name>
+ <state></state>
+ </option>
+ <option>
+ <name>ADiagRemark</name>
+ <state></state>
+ </option>
+ <option>
+ <name>ADiagWarning</name>
+ <state></state>
+ </option>
+ <option>
+ <name>ADiagError</name>
+ <state></state>
+ </option>
+ <option>
+ <name>ADiagWarnAreErr</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>APreprocFile</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>APreprocComments</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>APreprocLine</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>ADefines</name>
+ <state></state>
+ </option>
+ <option>
+ <name>AIncludePaths</name>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\UTILS\</state>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\UTILS\PREPROCESSOR\</state>
+ </option>
+ <option>
+ <name>AListFile</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>ACrossReference</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AMacDefs</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AMacExps</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AOnlyAsmed</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>ANoDiagnostics</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AListOptions</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AMnemonicFirst</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>ADirectiveFirst</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>ACaseSensitivity</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>ADebug</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>AMacroChars</name>
+ <version>0</version>
+ <state>0</state>
+ </option>
+ <option>
+ <name>OutputFile</name>
+ <state>$FILE_BNAME$.r82</state>
+ </option>
+ <option>
+ <name>ATruncateLine</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>IExtraOptionsCheck</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>IExtraOptions</name>
+ <state></state>
+ </option>
+ <option>
+ <name>AModel</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AMultibyteSupport</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AOverrideStandardPaths</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AStandardIncludePaths</name>
+ <state>$TOOLKIT_DIR$\INC\</state>
+ </option>
+ </data>
+ </settings>
+ <settings>
+ <name>JAVATOC</name>
+ <archiveVersion>0</archiveVersion>
+ <data/>
+ </settings>
+ <settings>
+ <name>CUSTOM</name>
+ <archiveVersion>3</archiveVersion>
+ <data>
+ <extensions></extensions>
+ <cmdline></cmdline>
+ </data>
+ </settings>
+ <settings>
+ <name>BICOMP</name>
+ <archiveVersion>0</archiveVersion>
+ <data/>
+ </settings>
+ <settings>
+ <name>BUILDACTION</name>
+ <archiveVersion>1</archiveVersion>
+ <data>
+ <prebuild></prebuild>
+ <postbuild></postbuild>
+ </data>
+ </settings>
+ <settings>
+ <name>XLINK</name>
+ <archiveVersion>2</archiveVersion>
+ <data>
+ <version>14</version>
+ <wantNonLocal>1</wantNonLocal>
+ <debug>1</debug>
+ <option>
+ <name>XOutOverride</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>OutputFile</name>
+ <state>usb_device_hid_mouse.d82</state>
+ </option>
+ <option>
+ <name>OutputFormat</name>
+ <version>11</version>
+ <state>16</state>
+ </option>
+ <option>
+ <name>FormatVariant</name>
+ <version>8</version>
+ <state>2</state>
+ </option>
+ <option>
+ <name>SecondaryOutputFile</name>
+ <state>(None for the selected format)</state>
+ </option>
+ <option>
+ <name>XDefines</name>
+ <state></state>
+ </option>
+ <option>
+ <name>AlwaysOutput</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>OverlapWarnings</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>NoGlobalCheck</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>XList</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>SegmentMap</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>ListSymbols</name>
+ <state>2</state>
+ </option>
+ <option>
+ <name>PageLengthCheck</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>PageLength</name>
+ <state>80</state>
+ </option>
+ <option>
+ <name>XIncludes</name>
+ <state>$TOOLKIT_DIR$\LIB\</state>
+ </option>
+ <option>
+ <name>ModuleStatus</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>XclOverride</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>XclFile</name>
+ <state>$PROJ_DIR$\..\..\..\..\..\..\..\..\UTILS\LINKER_SCRIPTS\AT32UC3A\0512\IAR\lnkuc3a0512.xcl</state>
+ </option>
+ <option>
+ <name>XclFileSlave</name>
+ <state></state>
+ </option>
+ <option>
+ <name>DoFill</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>FillerByte</name>
+ <state>0xFF</state>
+ </option>
+ <option>
+ <name>DoCrc</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CrcSize</name>
+ <version>0</version>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CrcAlgo</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CrcPoly</name>
+ <state>0x11021</state>
+ </option>
+ <option>
+ <name>CrcCompl</name>
+ <version>0</version>
+ <state>0</state>
+ </option>
+ <option>
+ <name>OXLibIOConfig</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>XRTSegmentSizes</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>RangeCheckAlternatives</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>SuppressAllWarn</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>SuppressDiags</name>
+ <state></state>
+ </option>
+ <option>
+ <name>TreatAsWarn</name>
+ <state></state>
+ </option>
+ <option>
+ <name>TreatAsErr</name>
+ <state></state>
+ </option>
+ <option>
+ <name>ModuleLocalSym</name>
+ <version>0</version>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CrcBitOrder</name>
+ <version>0</version>
+ <state>0</state>
+ </option>
+ <option>
+ <name>IncludeSuppressed</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>ModuleSummary</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>xcProgramEntryLabel</name>
+ <state>__trampoline</state>
+ </option>
+ <option>
+ <name>DebugInformation</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>RuntimeControl</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>IoEmulation</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>AllowExtraOutput</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>GenerateExtraOutput</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>XExtraOutOverride</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>ExtraOutputFile</name>
+ <state>hid_example_standalone.hex</state>
+ </option>
+ <option>
+ <name>ExtraOutputFormat</name>
+ <version>11</version>
+ <state>23</state>
+ </option>
+ <option>
+ <name>ExtraFormatVariant</name>
+ <version>8</version>
+ <state>2</state>
+ </option>
+ <option>
+ <name>xcOverrideProgramEntryLabel</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>xcProgramEntryLabelSelect</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>ListOutputFormat</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>BufferedTermOutput</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>OXImportSlaves</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>OverlaySystemMap</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>RawBinaryFile</name>
+ <state></state>
+ </option>
+ <option>
+ <name>RawBinarySymbol</name>
+ <state></state>
+ </option>
+ <option>
+ <name>RawBinarySegment</name>
+ <state></state>
+ </option>
+ <option>
+ <name>RawBinaryAlign</name>
+ <state></state>
+ </option>
+ <option>
+ <name>XLinkMisraHandler</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CrcAlign</name>
+ <state>4</state>
+ </option>
+ <option>
+ <name>CrcInitialValue</name>
+ <state>0x0</state>
+ </option>
+ <option>
+ <name>OXExtraOptionsCheck</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>OXExtraOptions</name>
+ <state></state>
+ </option>
+ </data>
+ </settings>
+ <settings>
+ <name>XAR</name>
+ <archiveVersion>2</archiveVersion>
+ <data>
+ <version>0</version>
+ <wantNonLocal>1</wantNonLocal>
+ <debug>1</debug>
+ <option>
+ <name>XAROutOverride</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>XARInputs</name>
+ <state></state>
+ </option>
+ <option>
+ <name>OutputFile</name>
+ <state></state>
+ </option>
+ </data>
+ </settings>
+ <settings>
+ <name>BILINK</name>
+ <archiveVersion>0</archiveVersion>
+ <data/>
+ </settings>
+ </configuration>
+ <group>
+ <name>boards</name>
+ <file>
+ <name>$PROJ_DIR$\..\init.c</name>
+ </file>
+ </group>
+ <group>
+ <name>drivers</name>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\..\..\..\..\drivers\gpio\gpio.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\..\..\..\..\drivers\usart\usart.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\..\..\..\..\drivers\usbc\usbc_device.c</name>
+ </file>
+ </group>
+ <group>
+ <name>services</name>
+ <group>
+ <name>basic</name>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\..\..\..\basic\sleepmgr\uc3\sleepmgr.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\..\..\..\basic\clock\validation\zephyr_tripoli\sysclk.c</name>
+ </file>
+ </group>
+ <group>
+ <name>stdio</name>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\..\..\..\basic\serial\serial.h</name>
+ </file>
+ </group>
+ <group>
+ <name>usb</name>
+ <group>
+ <name>class hid</name>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\udi_hid.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\udi_hid_mouse.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\udi_hid_mouse_desc.c</name>
+ </file>
+ </group>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\..\..\udc\udc.c</name>
+ </file>
+ </group>
+ </group>
+ <group>
+ <name>utils</name>
+ <group>
+ <name>stdio</name>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\..\..\..\..\utils\stdio\read.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\..\..\..\..\utils\stdio\write.c</name>
+ </file>
+ </group>
+ </group>
+ <group>
+ <name>utils startup</name>
+ <file>
+ <name>$PROJ_DIR$\..\..\..\..\..\..\..\..\utils\startup\trampoline_uc3.s82</name>
+ </file>
+ </group>
+ <file>
+ <name>$PROJ_DIR$\..\ui.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\..\main.c</name>
+ </file>
+</project>
+
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/init.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/init.c
new file mode 100644
index 0000000..bf87073
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/init.c
@@ -0,0 +1,137 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief EVK1100 board init.
+ *
+ * This file contains board initialization function.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR
+ * - Supported devices: All AVR UC3 devices can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+
+#include "compiler.h"
+#include "user_board.h"
+#include "conf_board.h"
+#include "gpio.h"
+
+#if defined (CONF_BOARD_AT45DBX)
+#define AT45DBX_MEM_CNT 1
+#endif
+
+volatile avr32_fpga_debug_t *debug = &AVR32_FPGA_DEBUG;
+
+void board_init(void)
+{
+ int *ptr_hram = (int *)AVR32_HRAMC_ADDRESS;
+ int ptr_cpuram[20]; // located somewhere in CPU RAM
+
+ debug->seg = 0x0A0A0A0A; // prints AAAA
+ debug->led = 0x55;
+ debug->led = 0xAA;
+
+ ptr_hram[0] = 0x01020304;
+ ptr_hram[1] = 0x05060708;
+ debug->seg = ptr_hram[0]; // prints 1234
+ debug->seg = ptr_hram[1]; // prints 5678
+
+ ptr_cpuram[0] = 0x090A0B0C;
+ ptr_cpuram[1] = 0x0D0E0F00;
+ debug->seg = ptr_cpuram[0]; // prints 9ABC
+ debug->seg = ptr_cpuram[1]; // prints DEF0
+
+ /*
+ gpio_configure_pin(LED0_GPIO,GPIO_DIR_OUTPUT | GPIO_INIT_HIGH);
+ gpio_configure_pin(LED1_GPIO,GPIO_DIR_OUTPUT | GPIO_INIT_HIGH);
+ gpio_configure_pin(LED2_GPIO,GPIO_DIR_OUTPUT | GPIO_INIT_HIGH);
+ gpio_configure_pin(LED3_GPIO,GPIO_DIR_OUTPUT | GPIO_INIT_HIGH);
+ gpio_configure_pin(LED4_GPIO,GPIO_DIR_OUTPUT | GPIO_INIT_HIGH);
+ gpio_configure_pin(LED5_GPIO,GPIO_DIR_OUTPUT | GPIO_INIT_HIGH);
+ gpio_configure_pin(LED6_GPIO,GPIO_DIR_OUTPUT | GPIO_INIT_HIGH);
+ gpio_configure_pin(LED7_GPIO,GPIO_DIR_OUTPUT | GPIO_INIT_HIGH);
+
+ gpio_configure_pin(GPIO_PUSH_BUTTON_0,GPIO_DIR_INPUT);
+ gpio_configure_pin(GPIO_PUSH_BUTTON_1,GPIO_DIR_INPUT);
+ gpio_configure_pin(GPIO_PUSH_BUTTON_2,GPIO_DIR_INPUT);
+ gpio_configure_pin(GPIO_JOYSTICK_PUSH,GPIO_DIR_INPUT);
+ gpio_configure_pin(GPIO_JOYSTICK_LEFT,GPIO_DIR_INPUT);
+ gpio_configure_pin(GPIO_JOYSTICK_UP,GPIO_DIR_INPUT);
+ gpio_configure_pin(GPIO_JOYSTICK_DOWN,GPIO_DIR_INPUT); */
+
+#if defined (CONF_BOARD_AT45DBX)
+ static const gpio_map_t AT45DBX_SPI_GPIO_MAP = {
+ {AT45DBX_SPI_SCK_PIN, AT45DBX_SPI_SCK_FUNCTION}, // SPI Clock.
+ {AT45DBX_SPI_MISO_PIN, AT45DBX_SPI_MISO_FUNCTION}, // MISO.
+ {AT45DBX_SPI_MOSI_PIN, AT45DBX_SPI_MOSI_FUNCTION}, // MOSI.
+#define AT45DBX_ENABLE_NPCS_PIN(NPCS, unused) \
+ {AT45DBX_SPI_NPCS##NPCS##_PIN, AT45DBX_SPI_NPCS##NPCS##_FUNCTION}, // Chip Select NPCS.
+ MREPEAT(AT45DBX_MEM_CNT, AT45DBX_ENABLE_NPCS_PIN, ~)
+#undef AT45DBX_ENABLE_NPCS_PIN
+ };
+
+ // Assign I/Os to SPI.
+ gpio_enable_module(AT45DBX_SPI_GPIO_MAP,
+ sizeof(AT45DBX_SPI_GPIO_MAP) /
+ sizeof(AT45DBX_SPI_GPIO_MAP[0]));
+#endif
+
+
+#if defined (CONF_BOARD_TWI)
+ static const gpio_map_t TWI_GPIO_MAP = {
+ {AVR32_TWI_SDA_0_0_PIN, AVR32_TWI_SDA_0_0_FUNCTION},
+ {AVR32_TWI_SCL_0_0_PIN, AVR32_TWI_SCL_0_0_FUNCTION}
+ };
+
+ // TWI gpio pins configuration
+ gpio_enable_module(TWI_GPIO_MAP,
+ sizeof(TWI_GPIO_MAP) / sizeof(TWI_GPIO_MAP[0]));
+#endif
+
+#if defined (CONF_BOARD_COM_PORT)
+ static const gpio_map_t COMPORT_GPIO_MAP = {
+ {AVR32_USART0_RXD_0_0_PIN, AVR32_USART0_RXD_0_0_FUNCTION},
+ {AVR32_USART0_TXD_0_0_PIN, AVR32_USART0_TXD_0_0_FUNCTION}
+ };
+
+ // Assign I/Os to USART.
+ gpio_enable_module(COMPORT_GPIO_MAP,
+ sizeof(COMPORT_GPIO_MAP) / sizeof(COMPORT_GPIO_MAP[0]));
+#endif
+
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/joystick.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/joystick.h
new file mode 100644
index 0000000..d209b36
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/joystick.h
@@ -0,0 +1,127 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief AT32UC3 SKRHABE010 (Joystick) header file.
+ *
+ * This file contains definitions and services related to the features of the
+ * 4-directional with Center Push SKRHABE010 joystick.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 AT32UC3A devices can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _SKRHABE010_H_
+#define _SKRHABE010_H_
+
+#include "compiler.h"
+#include "board.h"
+#include "gpio.h"
+
+
+/*! \brief This function test it the joystick is on the right.
+ *
+ * \return \c TRUE if the joystick is on the right, otherwise \c 0.
+ */
+#if (defined __GNUC__)
+__attribute__ ((__always_inline__))
+#endif
+static inline int is_joystick_right(void)
+{
+// return (gpio_get_pin_value(GPIO_JOYSTICK_RIGHT)) == GPIO_JOYSTICK_RIGHT_PRESSED;
+ return TRUE;
+}
+
+
+/*! \brief This function test it the joystick is on the left.
+ *
+ * \return \c TRUE if the joystick is on the left, otherwise \c 0.
+ */
+#if (defined __GNUC__)
+__attribute__ ((__always_inline__))
+#endif
+static inline int is_joystick_left(void)
+{
+// return (gpio_get_pin_value(GPIO_JOYSTICK_LEFT)) == GPIO_JOYSTICK_LEFT_PRESSED;
+ return FALSE;
+}
+
+
+/*! \brief This function test it the joystick is up.
+ *
+ * \return \c TRUE if the joystick is up, otherwise \c 0.
+ */
+#if (defined __GNUC__)
+__attribute__ ((__always_inline__))
+#endif
+static inline int is_joystick_up(void)
+{
+// return (gpio_get_pin_value(GPIO_JOYSTICK_UP)) == GPIO_JOYSTICK_UP_PRESSED;
+ return TRUE;
+}
+
+
+/*! \brief This function test it the joystick is down.
+ *
+ * \return \c TRUE if the joystick is down, otherwise \c 0.
+ */
+#if (defined __GNUC__)
+__attribute__ ((__always_inline__))
+#endif
+static inline int is_joystick_down(void)
+{
+ //return (gpio_get_pin_value(GPIO_JOYSTICK_DOWN)) == GPIO_JOYSTICK_DOWN_PRESSED;
+ return FALSE;
+}
+
+
+/*! \brief This function test it the joystick is pressed.
+ *
+ * \return \c TRUE if the joystick is pressed, otherwise \c 0.
+ */
+#if (defined __GNUC__)
+__attribute__ ((__always_inline__))
+#endif
+static inline int is_joystick_pressed(void)
+{
+ //return (gpio_get_pin_value(GPIO_JOYSTICK_PUSH)) == GPIO_JOYSTICK_PUSH_PRESSED;
+ return FALSE;
+}
+
+
+#endif // _SKRHABE010_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/main.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/main.c
new file mode 100644
index 0000000..5686c93
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/main.c
@@ -0,0 +1,234 @@
+/**
+ * \file
+ *
+ * \brief Main functions
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include "compiler.h"
+#include "preprocessor.h"
+#include "board.h"
+#include "gpio.h"
+#include "sysclk.h"
+#include "sleepmgr.h"
+#include "conf_usb.h"
+#include "udc.h"
+#include "udd.h"
+#include "ui.h"
+#include "stdio_serial.h"
+
+static bool main_b_mouse_enable = false;
+
+
+/*! \brief Main function. Execution starts here.
+ */
+#if 0
+*(unsigned int *)0xfffe05C8 /* UPCON2 */
+ * (unsigned int *)0xfffe0508 /* UPCFG2 */
+ * (unsigned int *)0xfffe0538 /* UPSTA2 */
+ * (unsigned int *)0xfffe0830 /* UDESC */
+ * (unsigned int *)0xfffe0004 /* UDINT */
+ * (unsigned int *)0xfffe0010 /* UDINTE */
+ * (unsigned int *)0xfffe0800 /* USBCON */
+ * (unsigned int *)0xfffe0804 /* USBSTA */
+ * (unsigned int *)0xfffe0404 /* UHINT */
+ * (unsigned int *)0xfffe0134 /* USBSTA1 */
+fpga: V: \Users \ PM \ USB_Optimized \ I7256 \ source \ rtl \ synt \ systemAce
+\ rev_USBC_220.a doc: V:\Users \ PM \ USB_Optimized \ I7553 \ version \ 200 \
+ documentation \ I7553 - 200 - 0001 -
+ C_USBC
+#endif
+int main(void)
+{
+ irq_initialize_vectors();
+ cpu_irq_enable();
+
+ // USART options.
+ static usart_serial_options_t USART_SERIAL_OPTIONS = {
+ .baudrate = USART_SERIAL_EXAMPLE_BAUDRATE,
+ .charlength = USART_SERIAL_CHAR_LENGTH,
+ .paritytype = USART_SERIAL_PARITY,
+ .stopbits = USART_SERIAL_STOP_BIT
+ };
+
+ // Clear all leds
+ LED_Off(LED0);
+ LED_Off(LED1);
+ LED_Off(LED2);
+ LED_Off(LED3);
+
+ // Initialize the sleep manager
+ sleepmgr_init();
+
+ sysclk_init();
+ board_init();
+ ui_init();
+ ui_powerdown();
+
+ // Initialize Serial Interface using Stdio Library
+ stdio_serial_init(USART_SERIAL_EXAMPLE, &USART_SERIAL_OPTIONS);
+
+ // Specify that stdout should not be buffered.
+#if (defined(__GNUC__) && defined(__AVR32__))
+ setbuf(stdout, NULL);
+#else // __ICCAVR32__
+ // Already the case in IAR's Normal DLIB default configuration: printf()
+ // emits one character at a time.
+#endif
+
+ // Print welcome message
+ printf("USBC Device (HID Mouse) validation %s\r\n", __TIME__);
+ printf("----------------------------------\r\n");
+
+ // Start USB stack to authorize VBus monitoring
+ udc_start();
+
+ if (!udc_include_vbus_monitoring()) {
+ // VBUS monitoring is not available on this product
+ // thereby VBUS has to be considered as present
+ main_vbus_action(true);
+ }
+
+ // The main loop manages only the power mode
+ // because the USB management is done by interrupt
+ while (true) {
+
+ sleepmgr_enter_sleep();
+
+#ifdef USB_DEVICE_LOW_SPEED
+ // No USB "Keep a live" interrupt available in low speed
+ // to scan mouse interface then use main loop
+ if (main_b_mouse_enable) {
+ static uint16_t virtual_sof_sub = 0;
+ static uint16_t virtual_sof = 0;
+ if (700 == virtual_sof_sub++) {
+ virtual_sof_sub = 0;
+ ui_process(virtual_sof++);
+ }
+ }
+#endif
+
+ }
+}
+
+void main_vbus_action(bool b_high)
+{
+ if (b_high) {
+ // Attach USB Device
+ udc_attach();
+ } else {
+ // VBUS not present
+ udc_detach();
+ }
+}
+
+void main_suspend_action(void)
+{
+ ui_powerdown();
+}
+
+void main_resume_action(void)
+{
+ ui_wakeup();
+}
+
+void main_sof_action(void)
+{
+ if (!main_b_mouse_enable)
+ return;
+ ui_process(udd_get_frame_number());
+}
+
+void main_remotewakeup_enable(void)
+{
+ ui_wakeup_enable();
+}
+
+void main_remotewakeup_disable(void)
+{
+ ui_wakeup_disable();
+}
+
+bool main_mouse_enable(void)
+{
+ main_b_mouse_enable = true;
+ return true;
+}
+
+void main_mouse_disable(void)
+{
+ main_b_mouse_enable = false;
+}
+
+
+/**
+ * \mainpage ASF USB Device HID Mouse
+ *
+ * \section intro Introduction
+ * This example shows how to implement a USB Device HID Mouse
+ * on AVR products with USB module.
+ * The application note AVR4903 provides information about this implementation.
+ *
+ * \section startup Startup
+ * The example uses the buttons or sensors available on the board
+ * to simulate a standard mouse.
+ * After loading firmware, connect hardware board (EVKxx,XPlain,...) to the USB Host.
+ * When connected to a USB host system this application provides a mouse application
+ * in the Unix/Mac/Windows operating systems.
+ * This example uses the native HID driver for these operating systems.
+ *
+ * \copydoc UI
+ *
+ * \section example About example
+ *
+ * The example uses the following module groups:
+ * - Basic modules:
+ * Startup, board, clock, interrupt, power management
+ * - USB Device stack and HID modules:
+ * <br>services/usb/
+ * <br>services/usb/udc/
+ * <br>services/usb/class/hid/
+ * <br>services/usb/class/hid/mouse/
+ * - Specific implementation:
+ * - main.c,
+ * <br>initializes clock
+ * <br>initializes interrupt
+ * <br>\subpage power_management
+ * <br>manages UI
+ * - specific implementation for each target "./examples/product_board/":
+ * - conf_foo.h configuration of each module
+ * - ui.c implement of user's interface (buttons, leds)
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/main.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/main.h
new file mode 100644
index 0000000..74b7391
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/main.h
@@ -0,0 +1,86 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief Declaration of main function used by HID mouse example
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _MAIN_H_
+#define _MAIN_H_
+
+/*! \brief Called by HID interface
+ * Callback running when USB Host enable mouse interface
+ *
+ * \retval true if mouse startup is ok
+ */
+bool main_mouse_enable(void);
+
+/*! \brief Called by HID interface
+ * Callback running when USB Host disable mouse interface
+ */
+void main_mouse_disable(void);
+
+/*! \brief Called when Vbus line state change
+ */
+void main_vbus_action(bool b_high);
+
+/*! \brief Called when a start of frame is received on USB line
+ */
+void main_sof_action(void);
+
+/*! \brief Called by UDD when a suspend is received
+ * Callback running when USB Host set USB line in suspend state
+ */
+void main_suspend_action(void);
+
+/*! \brief Called by UDD when the USB line exit of suspend state
+ */
+void main_resume_action(void);
+
+/*! \brief Called by UDC when USB Host request to enable remote wakeup
+ */
+void main_remotewakeup_enable(void);
+
+/*! \brief Called by UDC when USB Host request to disable remote wakeup
+ */
+void main_remotewakeup_disable(void);
+
+#endif // _MAIN_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/ui.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/ui.c
new file mode 100644
index 0000000..26ad648
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/ui.c
@@ -0,0 +1,135 @@
+/**
+ * \file
+ *
+ * \brief User Interface
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "udi_hid_mouse.h"
+#include "board.h"
+#include "gpio.h"
+#include "sysclk.h"
+#include "cycle_counter.h"
+#include "ui.h"
+
+#define MOUSE_MOVE_RANGE 3
+#define TIMER_UI 100
+
+static t_cpu_time ui_timer;
+static uint8_t state_mouse = 0;
+
+void ui_init(void)
+{
+ LED_On(LED0);
+ LED_Off(LED1);
+ cpu_set_timeout(cpu_ms_2_cy(TIMER_UI, sysclk_get_cpu_hz()), &ui_timer);
+ state_mouse = 0;
+}
+
+void ui_powerdown(void)
+{
+ LED_Off(LED0);
+ LED_Off(LED1);
+}
+
+void ui_wakeup_enable(void)
+{
+}
+
+void ui_wakeup_disable(void)
+{
+}
+
+void ui_wakeup(void)
+{
+ LED_On(LED0);
+}
+
+void ui_process(uint16_t framenumber)
+{
+ bool b_btn_state;
+ static bool btn_left_last_state = HID_MOUSE_BTN_UP;
+ static bool btn_right_last_state = HID_MOUSE_BTN_UP;
+ static bool btn_middle_last_state = HID_MOUSE_BTN_UP;
+ static uint8_t cpt_sof = 0;
+
+ if ((framenumber % 1000) == 0) {
+ LED_On(LED1);
+ }
+ if ((framenumber % 1000) == 500) {
+ LED_Off(LED1);
+ }
+ // Scan process running each 2ms
+ cpt_sof++;
+ if (2 > cpt_sof)
+ return;
+ cpt_sof = 0;
+
+ // Scan buttons on switch 0 (left), 1 (middle), 2 (right)
+ //b_btn_state = (!gpio_get_pin_value(GPIO_PUSH_BUTTON_0))? HID_MOUSE_BTN_DOWN : HID_MOUSE_BTN_UP;
+ b_btn_state = HID_MOUSE_BTN_RELEASED;
+ if (b_btn_state != btn_left_last_state) {
+ udi_hid_mouse_btnleft(b_btn_state);
+ btn_left_last_state = b_btn_state;
+ }
+ //b_btn_state = (!gpio_get_pin_value(GPIO_PUSH_BUTTON_1))? HID_MOUSE_BTN_DOWN : HID_MOUSE_BTN_UP;
+ b_btn_state = HID_MOUSE_BTN_RELEASED;
+ if (b_btn_state != btn_middle_last_state) {
+ udi_hid_mouse_btnmiddle(b_btn_state);
+ btn_middle_last_state = b_btn_state;
+ }
+ //b_btn_state = (!gpio_get_pin_value(GPIO_PUSH_BUTTON_2))? HID_MOUSE_BTN_DOWN : HID_MOUSE_BTN_UP;
+ b_btn_state = HID_MOUSE_BTN_RELEASED;
+ if (b_btn_state != btn_right_last_state) {
+ udi_hid_mouse_btnright(b_btn_state);
+ btn_right_last_state = b_btn_state;
+ }
+ // Scan move on switch 4 (right), 5 (left), 6 (down), 7 (up)
+ if (state_mouse == 0)
+ udi_hid_mouse_moveX(MOUSE_MOVE_RANGE);
+ else if (state_mouse == 2)
+ udi_hid_mouse_moveX(-MOUSE_MOVE_RANGE);
+ else if (state_mouse == 1)
+ udi_hid_mouse_moveY(-MOUSE_MOVE_RANGE);
+ else if (state_mouse == 3)
+ udi_hid_mouse_moveY(MOUSE_MOVE_RANGE);
+
+ if (cpu_is_timeout(&ui_timer)) {
+ cpu_set_timeout(cpu_ms_2_cy(TIMER_UI, sysclk_get_cpu_hz()),
+ &ui_timer);
+ state_mouse = (state_mouse + 1) % 4;
+ }
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/user_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/user_board.h
new file mode 100644
index 0000000..ba40248
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/example/zephyr/user_board.h
@@ -0,0 +1,104 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief User board definitions.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USART module can be used.
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _USER_BOARD_H_
+#define _USER_BOARD_H_
+
+#define LED0 0x01
+#define LED1 0x02
+#define LED2 0x04
+#define LED3 0x08
+#define LED4 0x10
+#define LED5 0x20
+#define LED6 0x40
+#define LED7 0x80
+
+extern volatile avr32_fpga_debug_t *debug;
+
+#if (defined __GNUC__)
+__attribute__ ((__always_inline__))
+#endif
+static inline void LED_On(unsigned int led)
+{
+ debug->led |= led;
+}
+
+#if (defined __GNUC__)
+__attribute__ ((__always_inline__))
+#endif
+static inline void LED_Off(unsigned int led)
+{
+ debug->led &= ~led;
+}
+
+#if (defined __GNUC__)
+__attribute__ ((__always_inline__))
+#endif
+static inline void LED_Toggle(unsigned int led)
+{
+ debug->led ^= led;
+}
+
+/*! \name Configuration
+ */
+//! @{
+#define USART_SERIAL_EXAMPLE &AVR32_USART0
+#define USART_SERIAL_EXAMPLE_BAUDRATE 57600
+#define USART_SERIAL_CHAR_LENGTH 8
+#define USART_SERIAL_PARITY USART_NO_PARITY
+#define USART_SERIAL_STOP_BIT USART_1_STOPBIT
+//! @}
+
+/* These are documented in services/basic/clock/uc3a0_a1/osc.h */
+#define BOARD_OSC0_HZ FCPU_HZ_ZEPHYR
+#define BOARD_OSC0_STARTUP_US 17000
+#define BOARD_OSC0_IS_XTAL true
+//#define BOARD_OSC1_HZ 11289600
+//#define BOARD_OSC1_STARTUP_US 17000
+//#define BOARD_OSC1_IS_XTAL true
+//#define BOARD_OSC32_HZ 32768
+//#define BOARD_OSC32_STARTUP_US 71000
+//#define BOARD_OSC32_IS_XTAL true
+
+#endif // _USER_BOARD_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/module_config/conf_usb.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/module_config/conf_usb.h
new file mode 100644
index 0000000..6c3018d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/module_config/conf_usb.h
@@ -0,0 +1,124 @@
+/**
+ * \file
+ *
+ * \brief USB configuration file
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _CONF_USB_H_
+#define _CONF_USB_H_
+
+#include "compiler.h"
+
+#warning You must refill the following definitions with a correct values
+
+/**
+ * USB Device Configuration
+ * @{
+ */
+
+//! Device definition (mandatory)
+#define USB_DEVICE_VENDOR_ID 0x0000
+#define USB_DEVICE_PRODUCT_ID 0x0000
+#define USB_DEVICE_MAJOR_VERSION 1
+#define USB_DEVICE_MINOR_VERSION 0
+#define USB_DEVICE_POWER 100 // Consumption on Vbus line (mA)
+#define USB_DEVICE_ATTR \
+ (USB_CONFIG_ATTR_SELF_POWERED)
+// (USB_CONFIG_ATTR_BUS_POWERED)
+// (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_SELF_POWERED)
+// (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_BUS_POWERED)
+
+//! USB Device string definitions (Optional)
+// #define USB_DEVICE_MANUFACTURE_NAME "Manufacture name"
+// #define USB_DEVICE_PRODUCT_NAME "Product name"
+// #define USB_DEVICE_SERIAL_NAME "12...EF"
+
+/**
+ * Device speeds support
+ * @{
+ */
+//! To define a Low speed device
+//#define USB_DEVICE_LOW_SPEED
+
+//! To authorize the High speed
+#if (UC3A3||UC3A4)
+//#define USB_DEVICE_HS_SUPPORT
+#endif
+//@}
+
+/**
+ * USB Device Callbacks definitions (Optional)
+ * @{
+ */
+// #define UDC_VBUS_EVENT(b_vbus_high) user_callback_vbus_action(b_vbus_high)
+// #define UDC_SOF_EVENT() user_callback_sof_action()
+// #define UDC_SUSPEND_EVENT() user_callback_suspend_action()
+// #define UDC_RESUME_EVENT() user_callback_resume_action()
+//! Mandatory when USB_DEVICE_ATTR authorizes remote wakeup feature
+// #define UDC_REMOTEWAKEUP_ENABLE() user_callback_remotewakeup_enable()
+// #define UDC_REMOTEWAKEUP_DISABLE() user_callback_remotewakeup_disable()
+//! When a extra string descriptor must be supported
+//! other than manufacturer, product and serial string
+// #define UDC_GET_EXTRA_STRING()
+//@}
+
+//@}
+
+
+/**
+ * USB Interface Configuration
+ * @{
+ */
+/**
+ * Configuration of HID Mouse interface
+ * @{
+ */
+//! Interface callback definition
+#define UDI_HID_MOUSE_ENABLE_EXT() true
+#define UDI_HID_MOUSE_DISABLE_EXT()
+//@}
+//@}
+
+
+/**
+ * USB Device Driver Configuration
+ * @{
+ */
+//@}
+
+//! The includes of classes and other headers must be done at the end of this file to avoid compile error
+#include "udi_hid_mouse_conf.h"
+
+#endif // _CONF_USB_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/udi_hid_mouse.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/udi_hid_mouse.c
new file mode 100644
index 0000000..b45bee9
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/udi_hid_mouse.c
@@ -0,0 +1,332 @@
+/**
+ * \file
+ *
+ * \brief USB Device Human Interface Device (HID) mouse interface.
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "conf_usb.h"
+#include "usb_protocol.h"
+#include "udd.h"
+#include "udc.h"
+#include "udi_hid.h"
+#include "udi_hid_mouse.h"
+#include <string.h>
+
+/**
+ * \addtogroup udi_hid_mouse_group
+ * @{
+ */
+
+/**
+ * \name Interface for UDC
+ */
+//@{
+
+bool udi_hid_mouse_enable(void);
+void udi_hid_mouse_disable(void);
+bool udi_hid_mouse_setup(void);
+uint8_t udi_hid_mouse_getsetting(void);
+
+//! Global structure which contains standard UDI interface for UDC
+UDC_DESC_STORAGE udi_api_t udi_api_hid_mouse = {
+ .enable = (bool(*)(void))udi_hid_mouse_enable,
+ .disable = (void (*)(void))udi_hid_mouse_disable,
+ .setup = (bool(*)(void))udi_hid_mouse_setup,
+ .getsetting = (uint8_t(*)(void))udi_hid_mouse_getsetting,
+};
+
+//@}
+
+
+/**
+ * \name Internal defines and variables to manage HID mouse
+ */
+//@{
+
+//! Size of report for standard HID mouse
+#define UDI_HID_MOUSE_REPORT_SIZE 4
+//! To store current rate of HID mouse
+static uint8_t udi_hid_mouse_rate;
+//! To store current protocol of HID mouse
+static uint8_t udi_hid_mouse_protocol;
+//! To signal if a valid report is ready to send
+static bool udi_hid_mouse_b_report_valid;
+//! Report ready to send
+static uint8_t udi_hid_mouse_report[UDI_HID_MOUSE_REPORT_SIZE];
+//! Signal if a report transfer is on going
+static bool udi_hid_mouse_report_trans_ongoing;
+//! Buffer used to send report
+COMPILER_WORD_ALIGNED
+ static uint8_t
+ udi_hid_mouse_report_trans[UDI_HID_MOUSE_REPORT_SIZE];
+
+
+/**
+ * \brief Callback for set report setup request
+ *
+ * \return \c 1 always, because it is not used on mouse interface
+ */
+static bool udi_hid_mouse_setreport(void);
+
+//@}
+
+//! HID report descriptor for standard HID mouse
+UDC_DESC_STORAGE udi_hid_mouse_report_desc_t udi_hid_mouse_report_desc = {
+ {
+ 0x05, 0x01, /* Usage Page (Generic Desktop), */
+ 0x09, 0x02, /* Usage (Mouse), */
+ 0xA1, 0x01, /* Collection (Application), */
+ 0x09, 0x01, /* Usage (Pointer), */
+ 0xA1, 0x00, /* Collection (Physical), */
+ 0x05, 0x09, /* Usage Page (Buttons), */
+ 0x19, 0x01, /* Usage Minimum (01), */
+ 0x29, 0x03, /* Usage Maximum (03), */
+ 0x15, 0x00, /* Logical Minimum (0), */
+ 0x25, 0x01, /* Logical Maximum (1), */
+ 0x75, 0x01, /* Report Size (1), */
+ 0x95, 0x03, /* Report Count (3), */
+ 0x81, 0x02, /* Input (Data, Variable, Absolute) */
+ 0x75, 0x05, /* Report Size (5), */
+ 0x95, 0x01, /* Report Count (1), */
+ 0x81, 0x01, /* Input (Constant), */
+ 0x05, 0x01, /* Usage Page (Generic Desktop), */
+ 0x09, 0x30, /* Usage (X), */
+ 0x09, 0x31, /* Usage (Y), */
+ 0x09, 0x38, /* Usage (Scroll), */
+ 0x15, 0x81, /* Logical Minimum (-127), */
+ 0x25, 0x7F, /* Logical Maximum (127), */
+ 0x75, 0x08, /* Report Size (8), */
+ 0x95, 0x03, /* Report Count (2), */
+ 0x81, 0x06, /* Input (Data, Variable, Relative) */
+ 0xC0, /* End Collection, */
+ 0xC0, /* End Collection */
+ }
+};
+
+/**
+ * \name Internal routines
+ */
+//@{
+
+/**
+ * \brief Moves an axe
+ *
+ * \param pos Signed value to move
+ * \param index_report Index of report to move
+ * (3=scroll wheel, 2=axe Y, 1=axe X))
+ *
+ * \return \c 1 if function was successfully done, otherwise \c 0.
+ */
+static bool udi_hid_mouse_move(int8_t pos, uint8_t index_report);
+
+/**
+ * \brief Changes a button state
+ *
+ * \param b_state New button state
+ * \param btn Index of button to change (4=middle, 2=right, 1=left)
+ *
+ * \return \c 1 if function was successfully done, otherwise \c 0.
+ */
+static bool udi_hid_mouse_btn(bool b_state, uint8_t btn);
+
+/**
+ * \brief Send the report
+ *
+ * \return \c 1 if send on going, \c 0 if delay.
+ */
+static bool udi_hid_mouse_send_report(void);
+
+/**
+ * \brief Callback called when the report is sent
+ *
+ * \param status UDD_EP_TRANSFER_OK, if transfer finish
+ * \param status UDD_EP_TRANSFER_ABORT, if transfer aborted
+ * \param nb_sent number of data transfered
+ *
+ * \return \c 1 if function was successfully done, otherwise \c 0.
+ */
+void udi_hid_mouse_report_sent(udd_ep_status_t status, iram_size_t nb_sent);
+
+//@}
+
+
+//--------------------------------------------
+//------ Interface for UDI HID level
+
+bool udi_hid_mouse_enable(void)
+{
+ // Initialize internal value
+ udi_hid_mouse_rate = 0;
+ udi_hid_mouse_protocol = 0;
+ udi_hid_mouse_report_trans_ongoing = false;
+ memset(udi_hid_mouse_report, 0, UDI_HID_MOUSE_REPORT_SIZE);
+ udi_hid_mouse_b_report_valid = false;
+ return UDI_HID_MOUSE_ENABLE_EXT();
+}
+
+
+void udi_hid_mouse_disable(void)
+{
+ UDI_HID_MOUSE_DISABLE_EXT();
+}
+
+
+bool udi_hid_mouse_setup(void)
+{
+ return udi_hid_setup(&udi_hid_mouse_rate,
+ &udi_hid_mouse_protocol,
+ (uint8_t *) &udi_hid_mouse_report_desc,
+ udi_hid_mouse_setreport);
+}
+
+
+uint8_t udi_hid_mouse_getsetting(void)
+{
+ return 0;
+}
+
+
+static bool udi_hid_mouse_setreport(void)
+{
+ return false;
+}
+
+
+//--------------------------------------------
+//------ Interface for application
+
+bool udi_hid_mouse_moveScroll(int8_t pos)
+{
+ return udi_hid_mouse_move(pos, 3);
+}
+
+bool udi_hid_mouse_moveY(int8_t pos_y)
+{
+ return udi_hid_mouse_move(pos_y, 2);
+}
+
+bool udi_hid_mouse_moveX(int8_t pos_x)
+{
+ return udi_hid_mouse_move(pos_x, 1);
+}
+
+bool udi_hid_mouse_btnmiddle(bool b_state)
+{
+ return udi_hid_mouse_btn(b_state, 0x04);
+}
+
+bool udi_hid_mouse_btnright(bool b_state)
+{
+ return udi_hid_mouse_btn(b_state, 0x02);
+}
+
+bool udi_hid_mouse_btnleft(bool b_state)
+{
+ return udi_hid_mouse_btn(b_state, 0x01);
+}
+
+
+//--------------------------------------------
+//------ Internal routines
+
+static bool udi_hid_mouse_move(int8_t pos, uint8_t index_report)
+{
+ int16_t s16_newpos;
+
+ irqflags_t flags = cpu_irq_save();
+
+ // Add position in HID mouse report
+ s16_newpos = (int8_t) udi_hid_mouse_report[index_report];
+ s16_newpos += pos;
+ if ((-127 > s16_newpos) || (127 < s16_newpos)) {
+ cpu_irq_restore(flags);
+ return false; // Overflow of report
+ }
+ udi_hid_mouse_report[index_report] = (uint8_t) s16_newpos;
+
+ // Valid and send report
+ udi_hid_mouse_b_report_valid = true;
+ udi_hid_mouse_send_report();
+
+ cpu_irq_restore(flags);
+ return true;
+}
+
+
+static bool udi_hid_mouse_btn(bool b_state, uint8_t btn)
+{
+ // Modify buttons report
+ if (HID_MOUSE_BTN_DOWN == b_state)
+ udi_hid_mouse_report[0] |= btn;
+ else
+ udi_hid_mouse_report[0] &= ~btn;
+ // Use mouse move routine
+ return udi_hid_mouse_move(0, 1);
+}
+
+
+static bool udi_hid_mouse_send_report(void)
+{
+ if (udi_hid_mouse_report_trans_ongoing)
+ return false; // Transfer on going then send this one after transfer complete
+
+ // Copy report on other array used only for transfer
+ memcpy(udi_hid_mouse_report_trans, udi_hid_mouse_report,
+ UDI_HID_MOUSE_REPORT_SIZE);
+ memset(&udi_hid_mouse_report[1], 0, 3); // Keep status of btn for next report
+ udi_hid_mouse_b_report_valid = false;
+
+ // Send report
+ udi_hid_mouse_report_trans_ongoing =
+ udd_ep_run( UDI_HID_MOUSE_EP_IN,
+ false,
+ udi_hid_mouse_report_trans,
+ UDI_HID_MOUSE_REPORT_SIZE,
+ udi_hid_mouse_report_sent);
+ return udi_hid_mouse_report_trans_ongoing;
+}
+
+
+void udi_hid_mouse_report_sent(udd_ep_status_t status, iram_size_t nb_sent)
+{
+ // Valid report sending
+ udi_hid_mouse_report_trans_ongoing = false;
+ if (udi_hid_mouse_b_report_valid) {
+ // Send new valid report
+ udi_hid_mouse_send_report();
+ }
+}
+
+//@}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/udi_hid_mouse.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/udi_hid_mouse.h
new file mode 100644
index 0000000..fe80725
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/udi_hid_mouse.h
@@ -0,0 +1,205 @@
+/**
+ * \file
+ *
+ * \brief USB Device Human Interface Device (HID) mouse interface.
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _UDI_HID_MOUSE_H_
+#define _UDI_HID_MOUSE_H_
+
+#include "conf_usb.h"
+#include "usb_protocol.h"
+#include "usb_protocol_hid.h"
+#include "udc_desc.h"
+#include "udi.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * \ingroup udi_hid_group
+ * \defgroup udi_hid_mouse_group UDI for Human Interface Device Mouse Class
+ * base on UDI HID
+ * @{
+ */
+
+//! Global struture which contains standard UDI API for UDC
+extern UDC_DESC_STORAGE udi_api_t udi_api_hid_mouse;
+
+/**
+ * \name Interface Descriptor
+ *
+ * The following structures provide the interface descriptor.
+ * It must be implemented in USB configuration descriptor.
+ */
+//@{
+
+//! Interface descriptor struture for HID mouse
+typedef struct {
+ usb_iface_desc_t iface;
+ usb_hid_descriptor_t hid;
+ usb_ep_desc_t ep;
+} udi_hid_mouse_desc_t;
+
+//! Report descriptor for HID mouse
+typedef struct {
+ uint8_t array[25 * 2 + 2 * 1];
+} udi_hid_mouse_report_desc_t;
+
+
+//! By default no string associated to this interface
+#ifndef UDI_HID_MOUSE_STRING_ID
+#define UDI_HID_MOUSE_STRING_ID 0
+#endif
+
+//! HID mouse enpoints size
+#define UDI_HID_MOUSE_EP_SIZE 8
+
+//! HID mouse interval
+#ifdef USB_DEVICE_HS_SUPPORT
+#define UDI_HID_MOUSE_EP_INTERVEL 8
+#else
+#define UDI_HID_MOUSE_EP_INTERVEL 16
+#endif
+
+//! Content of HID mouse interface descriptor for all speed
+#define UDI_HID_MOUSE_DESC {\
+ .iface.bLength = sizeof(usb_iface_desc_t),\
+ .iface.bDescriptorType = USB_DT_INTERFACE,\
+ .iface.bInterfaceNumber = UDI_HID_MOUSE_IFACE_NUMBER,\
+ .iface.bAlternateSetting = 0,\
+ .iface.bNumEndpoints = 1,\
+ .iface.bInterfaceClass = HID_CLASS,\
+ .iface.bInterfaceSubClass = HID_SUB_CLASS_BOOT,\
+ .iface.bInterfaceProtocol = HID_PROTOCOL_MOUSE,\
+ .iface.iInterface = UDI_HID_MOUSE_STRING_ID,\
+ .hid.bLength = sizeof(usb_hid_descriptor_t),\
+ .hid.bDescriptorType = USB_DT_HID,\
+ .hid.bcdHID = LE16(USB_HID_BDC_V1_11),\
+ .hid.bCountryCode = USB_HID_NO_COUNTRY_CODE,\
+ .hid.bNumDescriptors = USB_HID_NUM_DESC,\
+ .hid.bRDescriptorType = USB_DT_HID_REPORT,\
+ .hid.wDescriptorLength = LE16(sizeof(udi_hid_mouse_report_desc_t)),\
+ .ep.bLength = sizeof(usb_ep_desc_t),\
+ .ep.bDescriptorType = USB_DT_ENDPOINT,\
+ .ep.bEndpointAddress = UDI_HID_MOUSE_EP_IN,\
+ .ep.bmAttributes = USB_EP_TYPE_INTERRUPT,\
+ .ep.wMaxPacketSize = LE16(UDI_HID_MOUSE_EP_SIZE),\
+ .ep.bInterval = UDI_HID_MOUSE_EP_INTERVEL,\
+ }
+//@}
+
+
+/**
+ * \name Interface for application
+ *
+ * These routines are used by application to send mouse events
+ */
+//@{
+
+/**
+ * \brief Move the scroll wheel
+ *
+ * \param pos Signed value to move
+ *
+ * \return \c 1 if function was successfully done, otherwise \c 0.
+ */
+bool udi_hid_mouse_moveScroll(int8_t pos);
+
+/**
+ * \brief Move the mouse pointer on Y axe
+ *
+ * \param pos_y Signed value to move
+ *
+ * \return \c 1 if function was successfully done, otherwise \c 0.
+ */
+bool udi_hid_mouse_moveY(int8_t pos_y);
+
+/**
+ * \brief Move the mouse pointer on X axe
+ *
+ * \param pos_x Signed value to move
+ *
+ * \return \c 1 if function was successfully done, otherwise \c 0.
+ */
+bool udi_hid_mouse_moveX(int8_t pos_x);
+
+/**
+ * \name Interfaces for buttons events
+ */
+//@{
+
+//! Value to signal a button down (pressed)
+#define HID_MOUSE_BTN_DOWN TRUE
+//! Value to signal a button up (released)
+#define HID_MOUSE_BTN_UP FALSE
+
+/**
+ * \brief Changes middle button state
+ *
+ * \param b_state New button state
+ *
+ * \return \c 1 if function was successfully done, otherwise \c 0.
+ */
+bool udi_hid_mouse_btnmiddle(bool b_state);
+
+/**
+ * \brief Changes right button state
+ *
+ * \param b_state New button state
+ *
+ * \return \c 1 if function was successfully done, otherwise \c 0.
+ */
+bool udi_hid_mouse_btnright(bool b_state);
+
+/**
+ * \brief Changes left button state
+ *
+ * \param b_state New button state
+ *
+ * \return \c 1 if function was successfully done, otherwise \c 0.
+ */
+bool udi_hid_mouse_btnleft(bool b_state);
+//@}
+
+//@}
+
+//@}
+
+#ifdef __cplusplus
+}
+#endif
+#endif // _UDI_HID_MOUSE_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/udi_hid_mouse_conf.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/udi_hid_mouse_conf.h
new file mode 100644
index 0000000..a6568de
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/udi_hid_mouse_conf.h
@@ -0,0 +1,78 @@
+/**
+ * \file
+ *
+ * \brief Default HID mouse configuration for a USB Device
+ * with a single interface HID mouse
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _UDI_HID_MOUSE_CONF_H_
+#define _UDI_HID_MOUSE_CONF_H_
+
+/**
+ * \ingroup udi_hid_mouse_group
+ * \defgroup udi_hid_mouse_group_conf Default HID mouse configuration
+ * for a USB Device with a single interface HID
+ *
+ * @{
+ */
+
+//! Control endpoint size
+#ifdef USB_DEVICE_HS_SUPPORT
+# define USB_DEVICE_EP_CTRL_SIZE 64
+#else
+# define USB_DEVICE_EP_CTRL_SIZE 8
+#endif
+
+
+//! Endpoint number used by HID mouse interface
+#define UDI_HID_MOUSE_EP_IN (1 | USB_EP_DIR_IN)
+
+//! Interface number
+#define UDI_HID_MOUSE_IFACE_NUMBER 0
+
+
+/**
+ * \name UDD Configuration
+ */
+//@{
+//! 1 endpoint used by HID mouse standard interface
+#define USB_DEVICE_MAX_EP 1
+//@}
+
+//@}
+
+#include "udi_hid_mouse.h"
+
+#endif // _UDI_HID_MOUSE_CONF_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/udi_hid_mouse_desc.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/udi_hid_mouse_desc.c
new file mode 100644
index 0000000..3a65264
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/mouse/udi_hid_mouse_desc.c
@@ -0,0 +1,157 @@
+/**
+ * \file
+ *
+ * \brief Default descriptors for a USB Device with a single interface HID mouse
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "conf_usb.h"
+#include "udd.h"
+#include "udc_desc.h"
+#include "udi_hid.h"
+#include "udi_hid_mouse.h"
+
+/**
+ * \ingroup udi_hid_mouse_group
+ * \defgroup udi_hid_mouse_group_desc Default descriptors for a USB Device
+ * with a single interface HID mouse
+ *
+ * @{
+ */
+
+//! Only one interface for this device
+#define USB_DEVICE_NB_INTERFACE 1
+
+/**INDENT-OFF**/
+//! USB Device Descriptor
+COMPILER_WORD_ALIGNED
+UDC_DESC_STORAGE usb_dev_desc_t udc_device_desc = {
+ .bLength = sizeof(usb_dev_desc_t),
+ .bDescriptorType = USB_DT_DEVICE,
+ .bcdUSB = LE16(USB_V2_0),
+ .bDeviceClass = 0,
+ .bDeviceSubClass = 0,
+ .bDeviceProtocol = 0,
+ .bMaxPacketSize0 = USB_DEVICE_EP_CTRL_SIZE,
+ .idVendor = LE16(USB_DEVICE_VENDOR_ID),
+ .idProduct = LE16(USB_DEVICE_PRODUCT_ID),
+ .bcdDevice = LE16((USB_DEVICE_MAJOR_VERSION << 8)
+ | USB_DEVICE_MINOR_VERSION),
+#ifdef USB_DEVICE_MANUFACTURE_NAME
+ .iManufacturer = 1,
+#else
+ .iManufacturer = 0, // No manufacture string
+#endif
+#ifdef USB_DEVICE_PRODUCT_NAME
+ .iProduct = 2,
+#else
+ .iProduct = 0, // No product string
+#endif
+#ifdef USB_DEVICE_SERIAL_NAME
+ .iSerialNumber = 3,
+#else
+ .iSerialNumber = 0, // No serial string
+#endif
+ .bNumConfigurations = 1
+};
+
+
+#ifdef USB_DEVICE_HS_SUPPORT
+//! USB Device Qualifier Descriptor for HS
+COMPILER_WORD_ALIGNED
+UDC_DESC_STORAGE usb_dev_qual_desc_t udc_device_qual = {
+ .bLength = sizeof(usb_dev_qual_desc_t),
+ .bDescriptorType = USB_DT_DEVICE_QUALIFIER,
+ .bcdUSB = LE16(USB_V2_0),
+ .bDeviceClass = 0,
+ .bDeviceSubClass = 0,
+ .bDeviceProtocol = 0,
+ .bMaxPacketSize0 = USB_DEVICE_EP_CTRL_SIZE,
+ .bNumConfigurations = 1
+};
+#endif
+
+//! Structure for USB Device Configuration Descriptor
+COMPILER_PACK_SET(1);
+typedef struct {
+ usb_conf_desc_t conf;
+ udi_hid_mouse_desc_t hid_mouse;
+} udc_desc_t;
+COMPILER_PACK_RESET();
+
+//! USB Device Configuration Descriptor filled for FS and HS
+COMPILER_WORD_ALIGNED
+UDC_DESC_STORAGE udc_desc_t udc_desc = {
+ .conf.bLength = sizeof(usb_conf_desc_t),
+ .conf.bDescriptorType = USB_DT_CONFIGURATION,
+ .conf.wTotalLength = LE16(sizeof(udc_desc_t)),
+ .conf.bNumInterfaces = USB_DEVICE_NB_INTERFACE,
+ .conf.bConfigurationValue = 1,
+ .conf.iConfiguration = 0,
+ .conf.bmAttributes = USB_CONFIG_ATTR_MUST_SET | USB_DEVICE_ATTR,
+ .conf.bMaxPower = USB_CONFIG_MAX_POWER(USB_DEVICE_POWER),
+ .hid_mouse = UDI_HID_MOUSE_DESC,
+};
+
+
+/**
+ * \name UDC structures which contain all USB Device definitions
+ */
+//@{
+
+//! Associate an UDI for each USB interface
+UDC_DESC_STORAGE udi_api_t *udi_apis[USB_DEVICE_NB_INTERFACE] = {
+ &udi_api_hid_mouse,
+};
+
+//! Add UDI with USB Descriptors FS & HS
+UDC_DESC_STORAGE udc_config_speed_t udc_config_fshs[1] = { {
+ .desc = (usb_conf_desc_t UDC_DESC_STORAGE*)&udc_desc,
+ .udi_apis = udi_apis,
+}};
+
+//! Add all information about USB Device in global structure for UDC
+UDC_DESC_STORAGE udc_config_t udc_config = {
+ .confdev_lsfs = &udc_device_desc,
+ .conf_lsfs = udc_config_fshs,
+#ifdef USB_DEVICE_HS_SUPPORT
+ .confdev_hs = &udc_device_desc,
+ .qualifier = &udc_device_qual,
+ .conf_hs = udc_config_fshs,
+#endif
+};
+
+//@}
+/**INDENT-ON**/
+//@}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/udi_hid.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/udi_hid.c
new file mode 100644
index 0000000..3f4c076
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/udi_hid.c
@@ -0,0 +1,162 @@
+/**
+ * \file
+ *
+ * \brief USB Device Human Interface Device (HID) interface.
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "conf_usb.h"
+#include "usb_protocol.h"
+#include "udd.h"
+#include "udc.h"
+#include "udi_hid.h"
+
+
+/**
+ * \addtogroup udi_hid_group
+ * @{
+ */
+
+/**
+ * \name Internal routines
+ */
+//@{
+
+/**
+ * \brief Send the specific descriptors requested by SETUP request
+ *
+ * \retval true if the descriptor is supported
+ */
+static bool udi_hid_reqstdifaceget_descriptor(uint8_t *report_desc);
+
+//@}
+
+bool udi_hid_setup( uint8_t *rate, uint8_t *protocol, uint8_t *report_desc, bool (*set_report)(void) )
+{
+ if (Udd_setup_is_in()) {
+ // Requests Interface GET
+ if (Udd_setup_type() == USB_REQ_TYPE_STANDARD) {
+ // Requests Standard Interface Get
+ switch (udd_g_ctrlreq.req.bRequest) {
+
+ case USB_REQ_GET_DESCRIPTOR:
+ return udi_hid_reqstdifaceget_descriptor(report_desc);
+ }
+ }
+ if (Udd_setup_type() == USB_REQ_TYPE_CLASS) {
+ // Requests Class Interface Get
+ switch (udd_g_ctrlreq.req.bRequest) {
+
+ case USB_REQ_HID_GET_REPORT:
+ // TODO
+ break;
+
+ case USB_REQ_HID_GET_IDLE:
+ udd_g_ctrlreq.payload = rate;
+ udd_g_ctrlreq.payload_size = 1;
+ return true;
+
+ case USB_REQ_HID_GET_PROTOCOL:
+ udd_g_ctrlreq.payload = protocol;
+ udd_g_ctrlreq.payload_size = 1;
+ return true;
+ }
+ }
+ }
+ if (Udd_setup_is_out()) {
+ // Requests Interface SET
+ if (Udd_setup_type() == USB_REQ_TYPE_CLASS) {
+ // Requests Class Interface Set
+ switch (udd_g_ctrlreq.req.bRequest) {
+
+ case USB_REQ_HID_SET_REPORT:
+ return set_report();
+
+ case USB_REQ_HID_SET_IDLE:
+ *rate = udd_g_ctrlreq.req.wValue >> 8;
+ return true;
+
+ case USB_REQ_HID_SET_PROTOCOL:
+ if (0 != udd_g_ctrlreq.req.wLength)
+ return false;
+ *protocol = udd_g_ctrlreq.req.wValue;
+ return true;
+ }
+ }
+ }
+ return false; // Request not supported
+}
+
+
+//---------------------------------------------
+//------- Internal routines
+
+static bool udi_hid_reqstdifaceget_descriptor(uint8_t *report_desc)
+{
+ usb_hid_descriptor_t UDC_DESC_STORAGE *ptr_hid_desc;
+
+ // Get the USB descriptor which is located after the interface descriptor
+ // This descriptor must be the HID descriptor
+ ptr_hid_desc = (usb_hid_descriptor_t UDC_DESC_STORAGE *) ((uint8_t *)
+ udc_get_interface_desc() + sizeof(usb_iface_desc_t));
+ if (USB_DT_HID != ptr_hid_desc->bDescriptorType)
+ return false;
+
+ // The SETUP request can ask for:
+ // - an USB_DT_HID descriptor
+ // - or USB_DT_HID_REPORT descriptor
+ // - or USB_DT_HID_PHYSICAL descriptor
+ if (USB_DT_HID == (uint8_t) (udd_g_ctrlreq.req.wValue >> 8)) {
+ // USB_DT_HID descriptor requested then send it
+ udd_g_ctrlreq.payload = (uint8_t *) ptr_hid_desc;
+ udd_g_ctrlreq.payload_size =
+ min(udd_g_ctrlreq.req.wLength,
+ ptr_hid_desc->bLength);
+ return true;
+ }
+ // The HID_X descriptor requested must correspond to report type
+ // included in the HID descriptor
+ if (ptr_hid_desc->bRDescriptorType ==
+ (uint8_t) (udd_g_ctrlreq.req.wValue >> 8)) {
+ // Send HID Report descriptor given by high level
+ udd_g_ctrlreq.payload = report_desc;
+ udd_g_ctrlreq.payload_size =
+ min(udd_g_ctrlreq.req.wLength,
+ le16_to_cpu(ptr_hid_desc->wDescriptorLength));
+ return true;
+ }
+ return false;
+}
+
+//@}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/udi_hid.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/udi_hid.h
new file mode 100644
index 0000000..d12f8f3
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/device/udi_hid.h
@@ -0,0 +1,82 @@
+/**
+ * \file
+ *
+ * \brief USB Device Human Interface Device (HID) interface definitions.
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _UDI_HID_H_
+#define _UDI_HID_H_
+
+#include "conf_usb.h"
+#include "usb_protocol.h"
+#include "usb_protocol_hid.h"
+#include "udd.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * \ingroup udi_group
+ * \defgroup udi_hid_group UDI for Human Interface Device Class
+ *
+ * @{
+ */
+
+/**
+ * \name Interface for application
+ */
+//@{
+
+/**
+ * \brief Decode HID setup request
+ *
+ * \param rate Pointer on rate of current HID interface
+ * \param protocol Pointer on protocol of current HID interface
+ * \param report_desc Pointer on report descriptor of current HID interface
+ * \param set_report Pointer on set_report callback of current HID interface
+ *
+ * \return \c 1 if function was successfully done, otherwise \c 0.
+ */
+bool udi_hid_setup( uint8_t *rate, uint8_t *protocol, uint8_t *report_desc, bool (*set_report)(void) );
+
+//@}
+
+//@}
+
+#ifdef __cplusplus
+}
+#endif
+#endif // _UDI_HID_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/usb_protocol_hid.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/usb_protocol_hid.h
new file mode 100644
index 0000000..883a6c6
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/hid/usb_protocol_hid.h
@@ -0,0 +1,333 @@
+/**
+ * \file
+ *
+ * \brief USB Human Interface Device (HID) protocol definitions.
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _USB_PROTOCOL_HID_H_
+#define _USB_PROTOCOL_HID_H_
+
+/**
+ * \ingroup usb_protocol_group
+ * \defgroup usb_hid_protocol USB Human Interface Device (HID)
+ * protocol definitions
+ * \brief USB Human Interface Device (HID) protocol definitions
+ *
+ * @{
+ */
+
+/**
+ * \name Possible Class value
+ */
+//@{
+#define HID_CLASS 0x03
+//@}
+
+/**
+ * \name Possible SubClass value
+ */
+//@{
+//! Interface subclass NO support BOOT protocol
+#define HID_SUB_CLASS_NOBOOT 0x00
+//! Interface subclass support BOOT protocol
+#define HID_SUB_CLASS_BOOT 0x01
+//@}
+
+/**
+ * \name Possible protocol value
+ */
+//@{
+//! Protocol generic standard
+#define HID_PROTOCOL_GENERIC 0x00
+//! Protocol keyboard standard
+#define HID_PROTOCOL_KEYBOARD 0x01
+//! Protocol mouse standard
+#define HID_PROTOCOL_MOUSE 0x02
+//@}
+
+
+/**
+ * \brief Hid USB requests (bRequest)
+ */
+enum usb_reqid_hid {
+ USB_REQ_HID_GET_REPORT = 0x01,
+ USB_REQ_HID_GET_IDLE = 0x02,
+ USB_REQ_HID_GET_PROTOCOL = 0x03,
+ USB_REQ_HID_SET_REPORT = 0x09,
+ USB_REQ_HID_SET_IDLE = 0x0A,
+ USB_REQ_HID_SET_PROTOCOL = 0x0B
+};
+
+/**
+ * \brief HID USB descriptor types
+ */
+enum usb_descriptor_type_hid {
+ USB_DT_HID = 0x21,
+ USB_DT_HID_REPORT = 0x22,
+ USB_DT_HID_PHYSICAL = 0x23
+};
+
+/**
+ * \brief HID Type for report descriptor
+ */
+enum usb_hid_item_report_type {
+ USB_HID_ITEM_REPORT_TYPE_MAIN = 0,
+ USB_HID_ITEM_REPORT_TYPE_GLOBAL = 1,
+ USB_HID_ITEM_REPORT_TYPE_LOCAL = 2,
+ USB_HID_ITEM_REPORT_TYPE_LONG = 3
+};
+
+
+/**
+ * \brief HID report type
+ */
+enum usb_hid_report_type {
+ USB_HID_REPORT_TYPE_INPUT = 1,
+ USB_HID_REPORT_TYPE_OUTPUT = 2,
+ USB_HID_REPORT_TYPE_FEATURE = 3
+};
+
+
+/**
+ * \brief HID protocol
+ */
+enum usb_hid_protocol {
+ USB_HID_PROCOTOL_BOOT = 0,
+ USB_HID_PROCOTOL_REPORT = 1
+};
+
+COMPILER_PACK_SET(1);
+
+/**
+ * \brief HID Descriptor
+ */
+typedef struct {
+ uint8_t bLength; //!< Size of this descriptor in bytes
+ uint8_t bDescriptorType; //!< HID descriptor type
+ le16_t bcdHID; //!< Binay Coded Decimal Spec. release
+ uint8_t bCountryCode; //!< Hardware target country
+ uint8_t bNumDescriptors; //!< Number of HID class descriptors to follow
+ uint8_t bRDescriptorType; //!< Report descriptor type
+ le16_t wDescriptorLength; //!< Total length of Report descriptor
+} usb_hid_descriptor_t;
+
+ //! \name Structure for report item
+ //! @{
+
+COMPILER_PACK_RESET();
+
+ //! \name HID Report type
+ //! Used by SETUP_HID_GET_REPORT & SETUP_HID_SET_REPORT
+ //! @{
+#define REPORT_TYPE_INPUT 0x01
+#define REPORT_TYPE_OUTPUT 0x02
+#define REPORT_TYPE_FEATURE 0x03
+ //! @}
+
+ //! \name Constants of field DESCRIPTOR_HID
+ //! @{
+//! Numeric expression identifying the HID Class
+//! Specification release (here V1.11)
+#define USB_HID_BDC_V1_11 0x0111
+//! Numeric expression specifying the number of class descriptors
+//! Note: Always at least one i.e. Report descriptor.
+#define USB_HID_NUM_DESC 0x01
+
+ //! \name Country code
+ //! @{
+#define USB_HID_NO_COUNTRY_CODE 0 // Not Supported
+#define USB_HID_COUNTRY_ARABIC 1 // Arabic
+#define USB_HID_COUNTRY_BELGIAN 2 // Belgian
+#define USB_HID_COUNTRY_CANADIAN_BILINGUAL 3 // Canadian-Bilingual
+#define USB_HID_COUNTRY_CANADIAN_FRENCH 4 // Canadian-French
+#define USB_HID_COUNTRY_CZECH_REPUBLIC 5 // Czech Republic
+#define USB_HID_COUNTRY_DANISH 6 // Danish
+#define USB_HID_COUNTRY_FINNISH 7 // Finnish
+#define USB_HID_COUNTRY_FRENCH 8 // French
+#define USB_HID_COUNTRY_GERMAN 9 // German
+#define USB_HID_COUNTRY_GREEK 10 // Greek
+#define USB_HID_COUNTRY_HEBREW 11 // Hebrew
+#define USB_HID_COUNTRY_HUNGARY 12 // Hungary
+#define USB_HID_COUNTRY_INTERNATIONAL_ISO 13 // International (ISO)
+#define USB_HID_COUNTRY_ITALIAN 14 // Italian
+#define USB_HID_COUNTRY_JAPAN_KATAKANA 15 // Japan (Katakana)
+#define USB_HID_COUNTRY_KOREAN 16 // Korean
+#define USB_HID_COUNTRY_LATIN_AMERICAN 17 // Latin American
+#define USB_HID_COUNTRY_NETHERLANDS_DUTCH 18 // Netherlands/Dutch
+#define USB_HID_COUNTRY_NORWEGIAN 19 // Norwegian
+#define USB_HID_COUNTRY_PERSIAN_FARSI 20 // Persian (Farsi)
+#define USB_HID_COUNTRY_POLAND 21 // Poland
+#define USB_HID_COUNTRY_PORTUGUESE 22 // Portuguese
+#define USB_HID_COUNTRY_RUSSIA 23 // Russia
+#define USB_HID_COUNTRY_SLOVAKIA 24 // Slovakia
+#define USB_HID_COUNTRY_SPANISH 25 // Spanish
+#define USB_HID_COUNTRY_SWEDISH 26 // Swedish
+#define USB_HID_COUNTRY_SWISS_FRENCH 27 // Swiss/French
+#define USB_HID_COUNTRY_SWISS_GERMAN 28 // Swiss/German
+#define USB_HID_COUNTRY_SWITZERLAND 29 // Switzerland
+#define USB_HID_COUNTRY_TAIWAN 30 // Taiwan
+#define USB_HID_COUNTRY_TURKISH_Q 31 // Turkish-Q
+#define USB_HID_COUNTRY_UK 32 // UK
+#define USB_HID_COUNTRY_US 33 // US
+#define USB_HID_COUNTRY_YUGOSLAVIA 34 // Yugoslavia
+#define USB_HID_COUNTRY_TURKISH_F 35 // Turkish-F
+ //! @}
+ //! @}
+//! @}
+
+
+//! \name HID KEYS values
+//! @{
+#define HID_A 0x04
+#define HID_B 0x05
+#define HID_C 0x06
+#define HID_D 0x07
+#define HID_E 0x08
+#define HID_F 0x09
+#define HID_G 0x0A
+#define HID_H 0x0B
+#define HID_I 0x0C
+#define HID_J 0x0D
+#define HID_K 0x0E
+#define HID_L 0x0F
+#define HID_M 0x10
+#define HID_N 0x11
+#define HID_O 0x12
+#define HID_P 0x13
+#define HID_Q 0x14
+#define HID_R 0x15
+#define HID_S 0x16
+#define HID_T 0x17
+#define HID_U 0x18
+#define HID_V 0x19
+#define HID_W 0x1A
+#define HID_X 0x1B
+#define HID_Y 0x1C
+#define HID_Z 0x1D
+#define HID_1 30
+#define HID_2 31
+#define HID_3 32
+#define HID_4 33
+#define HID_5 34
+#define HID_6 35
+#define HID_7 36
+#define HID_8 37
+#define HID_9 38
+#define HID_0 39
+#define HID_ENTER 40
+#define HID_ESCAPE 41
+#define HID_BACKSPACE 42
+#define HID_TAB 43
+#define HID_SPACEBAR 44
+#define HID_UNDERSCORE 45
+#define HID_PLUS 46
+#define HID_OPEN_BRACKET 47 // {
+#define HID_CLOSE_BRACKET 48 // }
+#define HID_BACKSLASH 49
+#define HID_ASH 50 // # ~
+#define HID_COLON 51 // ; :
+#define HID_QUOTE 52 // ' "
+#define HID_TILDE 53
+#define HID_COMMA 54
+#define HID_DOT 55
+#define HID_SLASH 56
+#define HID_CAPS_LOCK 57
+#define HID_F1 58
+#define HID_F2 59
+#define HID_F3 60
+#define HID_F4 61
+#define HID_F5 62
+#define HID_F6 63
+#define HID_F7 64
+#define HID_F8 65
+#define HID_F9 66
+#define HID_F10 67
+#define HID_F11 68
+#define HID_F12 69
+#define HID_PRINTSCREEN 70
+#define HID_SCROLL_LOCK 71
+#define HID_PAUSE 72
+#define HID_INSERT 73
+#define HID_HOME 74
+#define HID_PAGEUP 75
+#define HID_DELETE 76
+#define HID_END 77
+#define HID_PAGEDOWN 78
+#define HID_RIGHT 79
+#define HID_LEFT 80
+#define HID_DOWN 81
+#define HID_UP 82
+#define HID_KEYPAD_NUM_LOCK 83
+#define HID_KEYPAD_DIVIDE 84
+#define HID_KEYPAD_AT 85
+#define HID_KEYPAD_MULTIPLY 85
+#define HID_KEYPAD_MINUS 86
+#define HID_KEYPAD_PLUS 87
+#define HID_KEYPAD_ENTER 88
+#define HID_KEYPAD_1 89
+#define HID_KEYPAD_2 90
+#define HID_KEYPAD_3 91
+#define HID_KEYPAD_4 92
+#define HID_KEYPAD_5 93
+#define HID_KEYPAD_6 94
+#define HID_KEYPAD_7 95
+#define HID_KEYPAD_8 96
+#define HID_KEYPAD_9 97
+#define HID_KEYPAD_0 98
+
+ //! \name HID modifier values
+ //! @{
+#define HID_MODIFIER_NONE 0x00
+#define HID_MODIFIER_LEFT_CTRL 0x01
+#define HID_MODIFIER_LEFT_SHIFT 0x02
+#define HID_MODIFIER_LEFT_ALT 0x04
+#define HID_MODIFIER_LEFT_UI 0x08
+#define HID_MODIFIER_RIGHT_CTRL 0x10
+#define HID_MODIFIER_RIGHT_SHIFT 0x20
+#define HID_MODIFIER_RIGHT_ALT 0x40
+#define HID_MODIFIER_RIGHT_UI 0x80
+ //! @}
+//! @}
+
+//! \name HID KEYS values
+//! @{
+#define HID_LED_NUM_LOCK (1<<0)
+#define HID_LED_CAPS_LOCK (1<<1)
+#define HID_LED_SCROLL_LOCK (1<<2)
+#define HID_LED_COMPOSE (1<<3)
+#define HID_LED_KANA (1<<4)
+//! @}
+
+#endif // _USB_PROTOCOL_HID_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1100/conf_access.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1100/conf_access.h
new file mode 100644
index 0000000..2d3abd1
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1100/conf_access.h
@@ -0,0 +1,186 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Memory access control configuration file.
+ *
+ * This file contains the possible external configuration of the memory access
+ * control.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_ACCESS_H_
+#define _CONF_ACCESS_H_
+
+#include "compiler.h"
+#include "board.h"
+
+
+/*! \name Activation of Logical Unit Numbers
+ */
+//! @{
+#define LUN_0 ENABLE //!< On-Chip Virtual Memory.
+#define LUN_1 ENABLE //!< AT45DBX Data Flash.
+#define LUN_2 DISABLE //!< SD/MMC Card over SPI.
+#define LUN_3 DISABLE //!< SD/MMC Card over MCI Slot 0.
+#define LUN_4 DISABLE
+#define LUN_5 DISABLE
+#define LUN_6 DISABLE
+#define LUN_7 DISABLE
+#define LUN_USB DISABLE //!< Host Mass-Storage Memory.
+//! @}
+
+/*! \name LUN 0 Definitions
+ */
+//! @{
+#define VIRTUAL_MEM LUN_0
+#define LUN_ID_VIRTUAL_MEM LUN_ID_0
+#define LUN_0_INCLUDE "virtual_mem.h"
+#define Lun_0_test_unit_ready virtual_test_unit_ready
+#define Lun_0_read_capacity virtual_read_capacity
+#define Lun_0_wr_protect virtual_wr_protect
+#define Lun_0_removal virtual_removal
+#define Lun_0_usb_read_10 virtual_usb_read_10
+#define Lun_0_usb_write_10 virtual_usb_write_10
+#define Lun_0_mem_2_ram virtual_mem_2_ram
+#define Lun_0_ram_2_mem virtual_ram_2_mem
+#define LUN_0_NAME "\"On-Chip Virtual Memory\""
+//! @}
+
+/*! \name LUN 1 Definitions
+ */
+//! @{
+#define AT45DBX_MEM LUN_1
+#define LUN_ID_AT45DBX_MEM LUN_ID_1
+#define LUN_1_INCLUDE "at45dbx_mem.h"
+#define Lun_1_test_unit_ready at45dbx_test_unit_ready
+#define Lun_1_read_capacity at45dbx_read_capacity
+#define Lun_1_wr_protect at45dbx_wr_protect
+#define Lun_1_removal at45dbx_removal
+#define Lun_1_usb_read_10 at45dbx_usb_read_10
+#define Lun_1_usb_write_10 at45dbx_usb_write_10
+#define Lun_1_mem_2_ram at45dbx_df_2_ram
+#define Lun_1_ram_2_mem at45dbx_ram_2_df
+#define LUN_1_NAME "\"AT45DBX Data Flash\""
+//! @}
+
+/*! \name LUN 2 Definitions
+ */
+//! @{
+#define SD_MMC_SPI_MEM LUN_2
+#define LUN_ID_SD_MMC_SPI_MEM LUN_ID_2
+#define LUN_2_INCLUDE "sd_mmc_spi_mem.h"
+#define Lun_2_test_unit_ready sd_mmc_spi_test_unit_ready
+#define Lun_2_read_capacity sd_mmc_spi_read_capacity
+#define Lun_2_wr_protect sd_mmc_spi_wr_protect
+#define Lun_2_removal sd_mmc_spi_removal
+#define Lun_2_usb_read_10 sd_mmc_spi_usb_read_10
+#define Lun_2_usb_write_10 sd_mmc_spi_usb_write_10
+#define Lun_2_mem_2_ram sd_mmc_spi_mem_2_ram
+#define Lun_2_ram_2_mem sd_mmc_spi_ram_2_mem
+#define LUN_2_NAME "\"SD/MMC Card over SPI\""
+//! @}
+
+/*! \name LUN 3 Definitions
+ */
+//! @{
+#define SD_MMC_MCI_0_MEM LUN_3
+#define LUN_ID_SD_MMC_MCI_0_MEM LUN_ID_3
+#define LUN_3_INCLUDE "sd_mmc_mci_mem.h"
+#define Lun_3_test_unit_ready sd_mmc_mci_test_unit_ready_0
+#define Lun_3_read_capacity sd_mmc_mci_read_capacity_0
+#define Lun_3_wr_protect sd_mmc_mci_wr_protect_0
+#define Lun_3_removal sd_mmc_mci_removal_0
+#define Lun_3_usb_read_10 sd_mmc_mci_usb_read_10_0
+#define Lun_3_usb_write_10 sd_mmc_mci_usb_write_10_0
+#define Lun_3_mem_2_ram sd_mmc_mci_mem_2_ram_0
+#define Lun_3_ram_2_mem sd_mmc_mci_ram_2_mem_0
+#define LUN_3_NAME "\"SD/MMC Card over MCI Slot 0\""
+//! @}
+
+/*! \name USB LUNs Definitions
+ */
+//! @{
+#define MEM_USB LUN_USB
+#define LUN_ID_MEM_USB LUN_ID_USB
+#define LUN_USB_INCLUDE "host_mem.h"
+#define Lun_usb_test_unit_ready(lun) host_test_unit_ready(lun)
+#define Lun_usb_read_capacity(lun, nb_sect) host_read_capacity(lun, nb_sect)
+#define Lun_usb_read_sector_size(lun) host_read_sector_size(lun)
+#define Lun_usb_wr_protect(lun) host_wr_protect(lun)
+#define Lun_usb_removal() host_removal()
+#define Lun_usb_mem_2_ram(addr, ram) host_read_10_ram(addr, ram)
+#define Lun_usb_ram_2_mem(addr, ram) host_write_10_ram(addr, ram)
+#define LUN_USB_NAME "\"Host Mass-Storage Memory\""
+//! @}
+
+/*! \name Actions Associated with Memory Accesses
+ *
+ * Write here the action to associate with each memory access.
+ *
+ * \warning Be careful not to waste time in order not to disturb the functions.
+ */
+//! @{
+#define memory_start_read_action(nb_sectors) ui_start_read()
+#define memory_stop_read_action() ui_stop_read()
+#define memory_start_write_action(nb_sectors) ui_start_write()
+#define memory_stop_write_action() ui_stop_write()
+#include "ui.h"
+//! @}
+
+/*! \name Activation of Interface Features
+ */
+//! @{
+#define ACCESS_USB ENABLED //!< MEM <-> USB interface.
+#define ACCESS_MEM_TO_RAM DISABLED //!< MEM <-> RAM interface.
+#define ACCESS_STREAM DISABLED //!< Streaming MEM <-> MEM interface.
+#define ACCESS_STREAM_RECORD DISABLED //!< Streaming MEM <-> MEM interface in record mode.
+#define ACCESS_MEM_TO_MEM DISABLED //!< MEM <-> MEM interface.
+#define ACCESS_CODEC DISABLED //!< Codec interface.
+//! @}
+
+/*! \name Specific Options for Access Control
+ */
+//! @{
+#define GLOBAL_WR_PROTECT DISABLED //!< Management of a global write protection.
+//! @}
+
+
+#endif // _CONF_ACCESS_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1100/conf_at45dbx.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1100/conf_at45dbx.h
new file mode 100644
index 0000000..c5acf2f
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1100/conf_at45dbx.h
@@ -0,0 +1,73 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief AT45DBX configuration file.
+ *
+ * This file contains the possible external configuration of the AT45DBX.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with an SPI module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_AT45DBX_H_
+#define _CONF_AT45DBX_H_
+
+#include "board.h"
+
+//_____ D E F I N I T I O N S ______________________________________________
+
+//! Connect AT45DBx driver to spi master service
+#define AT45DBX_USES_SPI_MASTER_SERVICE
+
+//! Select the SPI module AT45DBX is conntected to
+#define AT45DBX_SPI_MODULE AT45DBX_SPI
+
+//! Size of AT45DBX data flash memories to manage.
+#define AT45DBX_MEM_SIZE AT45DBX_8MB
+
+//! Number of AT45DBX components to manage.
+#define AT45DBX_MEM_CNT 1
+
+//! SPI master speed in Hz.
+#define AT45DBX_SPI_MASTER_SPEED 12000000
+
+//! First chip select used by AT45DBX components on the SPI module instance.
+#define AT45DBX_CS AT45DBX_SPI_NPCS
+
+#endif // _CONF_AT45DBX_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1100/conf_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1100/conf_board.h
new file mode 100644
index 0000000..e69060e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1100/conf_board.h
@@ -0,0 +1,44 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Board configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H_INCLUDED
+#define CONF_BOARD_H_INCLUDED
+
+// Enable AT45DBX Component.
+#define CONF_BOARD_AT45DBX
+
+#endif /* CONF_BOARD_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1100/conf_clock.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1100/conf_clock.h
new file mode 100644
index 0000000..ff50d03
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1100/conf_clock.h
@@ -0,0 +1,75 @@
+/**
+ * \file
+ *
+ * \brief Chip-specific system clock manager configuration
+ *
+ * Copyright (C) 2011 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_CLOCK_H_INCLUDED
+#define CONF_CLOCK_H_INCLUDED
+
+// ===== System Clock Source Options
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_RCSYS
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_OSC0
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL0
+
+// ===== PLL0 Options
+#define CONFIG_PLL0_SOURCE PLL_SRC_OSC0
+//#define CONFIG_PLL0_SOURCE PLL_SRC_OSC1
+#define CONFIG_PLL0_MUL 8 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+#define CONFIG_PLL0_DIV 2 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+
+// ===== PLL1 Options
+//#define CONFIG_PLL1_SOURCE PLL_SRC_OSC0
+//#define CONFIG_PLL1_SOURCE PLL_SRC_OSC1
+//#define CONFIG_PLL1_MUL 8 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+//#define CONFIG_PLL1_DIV 2 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+
+// ===== System Clock Bus Division Options
+//#define CONFIG_SYSCLK_CPU_DIV 0 /* Fcpu = Fsys/(2 ^ CPU_div) */
+//#define CONFIG_SYSCLK_PBA_DIV 0 /* Fpba = Fsys/(2 ^ PBA_div) */
+//#define CONFIG_SYSCLK_PBB_DIV 0 /* Fpbb = Fsys/(2 ^ PBB_div) */
+
+// ===== Peripheral Clock Management Options
+//#define CONFIG_SYSCLK_INIT_CPUMASK ((1 << SYSCLK_SYSTIMER) | (1 << SYSCLK_OCD))
+//#define CONFIG_SYSCLK_INIT_PBAMASK (1 << SYSCLK_USART0)
+//#define CONFIG_SYSCLK_INIT_PBBMASK (1 << SYSCLK_HMATRIX)
+//#define CONFIG_SYSCLK_INIT_HSBMASK (1 << SYSCLK_MDMA_HSB)
+
+// ===== USB Clock Source Options
+//#define CONFIG_USBCLK_SOURCE USBCLK_SRC_OSC0
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL0
+//#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL1
+#define CONFIG_USBCLK_DIV 1 /* Fusb = Fsys/(2 ^ USB_div) */
+
+#endif /* CONF_CLOCK_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1100/conf_sd_mmc_spi.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1100/conf_sd_mmc_spi.h
new file mode 100644
index 0000000..9a2ae9c
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1100/conf_sd_mmc_spi.h
@@ -0,0 +1,71 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief SD/MMC configuration file.
+ *
+ * This file contains the possible external configuration of the SD/MMC.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with an SPI module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_SD_MMC_SPI_H_
+#define _CONF_SD_MMC_SPI_H_
+
+
+#include "conf_access.h"
+
+#if SD_MMC_SPI_MEM == DISABLE
+#error conf_sd_mmc_spi.h is #included although SD_MMC_SPI_MEM is disabled
+#endif
+
+
+#include "sd_mmc_spi.h"
+
+
+//_____ D E F I N I T I O N S ______________________________________________
+
+//! SPI master speed in Hz.
+#define SD_MMC_SPI_MASTER_SPEED 20000000
+
+//! Number of bits in each SPI transfer.
+#define SD_MMC_SPI_BITS 8
+
+
+#endif // _CONF_SD_MMC_SPI_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1100/conf_sleepmgr.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1100/conf_sleepmgr.h
new file mode 100644
index 0000000..699010d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1100/conf_sleepmgr.h
@@ -0,0 +1,43 @@
+/**
+ * \file
+ *
+ * \brief Sleep manager configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SLEEPMGR_H
+#define CONF_SLEEPMGR_H
+
+#define CONFIG_SLEEPMGR_ENABLE
+
+#endif /* CONF_SLEEPMGR_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1100/conf_spi_master.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1100/conf_spi_master.h
new file mode 100644
index 0000000..7d17e60
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1100/conf_spi_master.h
@@ -0,0 +1,58 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Spi Master configuration for spi example
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SPI_MASTER_H_INCLUDED
+#define CONF_SPI_MASTER_H_INCLUDED
+
+/* Possibility to change low-level configurations here */
+
+//! Default Config Spi Master Delay BCS
+// #define CONFIG_SPI_MASTER_DELAY_BCS 0
+
+//! Default Config Spi Master Bits per Transfer Definition
+// #define CONFIG_SPI_MASTER_BITS_PER_TRANSFER 8
+
+//! Default Config Spi Master Delay BCT
+// #define CONFIG_SPI_MASTER_DELAY_BCT 0
+
+//! Default Config Spi Master Delay BS
+// #define CONFIG_SPI_MASTER_DELAY_BS 0
+
+//! Default Config Spi Master Dummy Field
+// #define CONFIG_SPI_MASTER_DUMMY 0xFF
+
+#endif /* CONF_SPI_MASTER_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1100/conf_virtual_mem.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1100/conf_virtual_mem.h
new file mode 100644
index 0000000..984bc17
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1100/conf_virtual_mem.h
@@ -0,0 +1,54 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Virtual memory configuration file.
+ *
+ * This file contains the possible external configuration of the AT45DBX.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with an SPI module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_VIRTUAL_MEM_H_
+#define _CONF_VIRTUAL_MEM_H_
+
+//! Size of Virtual Memory on internal RAM (unit 512B)
+#define VMEM_NB_SECTOR 64 // 32KB
+
+#endif // _CONF_VIRTUAL_MEM_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1100/ui.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1100/ui.c
new file mode 100644
index 0000000..5ec7be0
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1100/ui.c
@@ -0,0 +1,103 @@
+/**
+ * \file
+ *
+ * \brief User Interface
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "udi_msc.h"
+#include "board.h"
+#include "gpio.h"
+#include "ui.h"
+
+void ui_init(void)
+{
+ LED_On(LED0);
+ LED_Off(LED1);
+}
+
+void ui_powerdown(void)
+{
+ LED_Off(LED0);
+ LED_Off(LED1);
+}
+
+void ui_wakeup(void)
+{
+ LED_On(LED0);
+}
+
+void ui_start_read(void)
+{
+ LED_On(LED_BI0_GREEN);
+}
+
+void ui_stop_read(void)
+{
+ LED_Off(LED_BI0_GREEN);
+}
+
+void ui_start_write(void)
+{
+ LED_On(LED_BI0_RED);
+}
+
+void ui_stop_write(void)
+{
+ LED_Off(LED_BI0_RED);
+}
+
+void ui_process(uint16_t framenumber)
+{
+ if ((framenumber % 1000) == 0) {
+ LED_On(LED1);
+ }
+ if ((framenumber % 1000) == 500) {
+ LED_Off(LED1);
+ }
+}
+
+
+/**
+ * \defgroup UI User Iinterface
+ *
+ * Human interface on EVK1100 :
+ * - Led 0 is on when USB line is in IDLE mode, and off in SUSPEND mode
+ * - Led 1 blinks when USB Host have checked and enabled MSC interface
+ * - Led 4 green is on during read operation
+ * - Led 4 red is on during write operation
+ *
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1105/conf_access.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1105/conf_access.h
new file mode 100644
index 0000000..2d3abd1
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1105/conf_access.h
@@ -0,0 +1,186 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Memory access control configuration file.
+ *
+ * This file contains the possible external configuration of the memory access
+ * control.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_ACCESS_H_
+#define _CONF_ACCESS_H_
+
+#include "compiler.h"
+#include "board.h"
+
+
+/*! \name Activation of Logical Unit Numbers
+ */
+//! @{
+#define LUN_0 ENABLE //!< On-Chip Virtual Memory.
+#define LUN_1 ENABLE //!< AT45DBX Data Flash.
+#define LUN_2 DISABLE //!< SD/MMC Card over SPI.
+#define LUN_3 DISABLE //!< SD/MMC Card over MCI Slot 0.
+#define LUN_4 DISABLE
+#define LUN_5 DISABLE
+#define LUN_6 DISABLE
+#define LUN_7 DISABLE
+#define LUN_USB DISABLE //!< Host Mass-Storage Memory.
+//! @}
+
+/*! \name LUN 0 Definitions
+ */
+//! @{
+#define VIRTUAL_MEM LUN_0
+#define LUN_ID_VIRTUAL_MEM LUN_ID_0
+#define LUN_0_INCLUDE "virtual_mem.h"
+#define Lun_0_test_unit_ready virtual_test_unit_ready
+#define Lun_0_read_capacity virtual_read_capacity
+#define Lun_0_wr_protect virtual_wr_protect
+#define Lun_0_removal virtual_removal
+#define Lun_0_usb_read_10 virtual_usb_read_10
+#define Lun_0_usb_write_10 virtual_usb_write_10
+#define Lun_0_mem_2_ram virtual_mem_2_ram
+#define Lun_0_ram_2_mem virtual_ram_2_mem
+#define LUN_0_NAME "\"On-Chip Virtual Memory\""
+//! @}
+
+/*! \name LUN 1 Definitions
+ */
+//! @{
+#define AT45DBX_MEM LUN_1
+#define LUN_ID_AT45DBX_MEM LUN_ID_1
+#define LUN_1_INCLUDE "at45dbx_mem.h"
+#define Lun_1_test_unit_ready at45dbx_test_unit_ready
+#define Lun_1_read_capacity at45dbx_read_capacity
+#define Lun_1_wr_protect at45dbx_wr_protect
+#define Lun_1_removal at45dbx_removal
+#define Lun_1_usb_read_10 at45dbx_usb_read_10
+#define Lun_1_usb_write_10 at45dbx_usb_write_10
+#define Lun_1_mem_2_ram at45dbx_df_2_ram
+#define Lun_1_ram_2_mem at45dbx_ram_2_df
+#define LUN_1_NAME "\"AT45DBX Data Flash\""
+//! @}
+
+/*! \name LUN 2 Definitions
+ */
+//! @{
+#define SD_MMC_SPI_MEM LUN_2
+#define LUN_ID_SD_MMC_SPI_MEM LUN_ID_2
+#define LUN_2_INCLUDE "sd_mmc_spi_mem.h"
+#define Lun_2_test_unit_ready sd_mmc_spi_test_unit_ready
+#define Lun_2_read_capacity sd_mmc_spi_read_capacity
+#define Lun_2_wr_protect sd_mmc_spi_wr_protect
+#define Lun_2_removal sd_mmc_spi_removal
+#define Lun_2_usb_read_10 sd_mmc_spi_usb_read_10
+#define Lun_2_usb_write_10 sd_mmc_spi_usb_write_10
+#define Lun_2_mem_2_ram sd_mmc_spi_mem_2_ram
+#define Lun_2_ram_2_mem sd_mmc_spi_ram_2_mem
+#define LUN_2_NAME "\"SD/MMC Card over SPI\""
+//! @}
+
+/*! \name LUN 3 Definitions
+ */
+//! @{
+#define SD_MMC_MCI_0_MEM LUN_3
+#define LUN_ID_SD_MMC_MCI_0_MEM LUN_ID_3
+#define LUN_3_INCLUDE "sd_mmc_mci_mem.h"
+#define Lun_3_test_unit_ready sd_mmc_mci_test_unit_ready_0
+#define Lun_3_read_capacity sd_mmc_mci_read_capacity_0
+#define Lun_3_wr_protect sd_mmc_mci_wr_protect_0
+#define Lun_3_removal sd_mmc_mci_removal_0
+#define Lun_3_usb_read_10 sd_mmc_mci_usb_read_10_0
+#define Lun_3_usb_write_10 sd_mmc_mci_usb_write_10_0
+#define Lun_3_mem_2_ram sd_mmc_mci_mem_2_ram_0
+#define Lun_3_ram_2_mem sd_mmc_mci_ram_2_mem_0
+#define LUN_3_NAME "\"SD/MMC Card over MCI Slot 0\""
+//! @}
+
+/*! \name USB LUNs Definitions
+ */
+//! @{
+#define MEM_USB LUN_USB
+#define LUN_ID_MEM_USB LUN_ID_USB
+#define LUN_USB_INCLUDE "host_mem.h"
+#define Lun_usb_test_unit_ready(lun) host_test_unit_ready(lun)
+#define Lun_usb_read_capacity(lun, nb_sect) host_read_capacity(lun, nb_sect)
+#define Lun_usb_read_sector_size(lun) host_read_sector_size(lun)
+#define Lun_usb_wr_protect(lun) host_wr_protect(lun)
+#define Lun_usb_removal() host_removal()
+#define Lun_usb_mem_2_ram(addr, ram) host_read_10_ram(addr, ram)
+#define Lun_usb_ram_2_mem(addr, ram) host_write_10_ram(addr, ram)
+#define LUN_USB_NAME "\"Host Mass-Storage Memory\""
+//! @}
+
+/*! \name Actions Associated with Memory Accesses
+ *
+ * Write here the action to associate with each memory access.
+ *
+ * \warning Be careful not to waste time in order not to disturb the functions.
+ */
+//! @{
+#define memory_start_read_action(nb_sectors) ui_start_read()
+#define memory_stop_read_action() ui_stop_read()
+#define memory_start_write_action(nb_sectors) ui_start_write()
+#define memory_stop_write_action() ui_stop_write()
+#include "ui.h"
+//! @}
+
+/*! \name Activation of Interface Features
+ */
+//! @{
+#define ACCESS_USB ENABLED //!< MEM <-> USB interface.
+#define ACCESS_MEM_TO_RAM DISABLED //!< MEM <-> RAM interface.
+#define ACCESS_STREAM DISABLED //!< Streaming MEM <-> MEM interface.
+#define ACCESS_STREAM_RECORD DISABLED //!< Streaming MEM <-> MEM interface in record mode.
+#define ACCESS_MEM_TO_MEM DISABLED //!< MEM <-> MEM interface.
+#define ACCESS_CODEC DISABLED //!< Codec interface.
+//! @}
+
+/*! \name Specific Options for Access Control
+ */
+//! @{
+#define GLOBAL_WR_PROTECT DISABLED //!< Management of a global write protection.
+//! @}
+
+
+#endif // _CONF_ACCESS_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1105/conf_at45dbx.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1105/conf_at45dbx.h
new file mode 100644
index 0000000..c5acf2f
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1105/conf_at45dbx.h
@@ -0,0 +1,73 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief AT45DBX configuration file.
+ *
+ * This file contains the possible external configuration of the AT45DBX.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with an SPI module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_AT45DBX_H_
+#define _CONF_AT45DBX_H_
+
+#include "board.h"
+
+//_____ D E F I N I T I O N S ______________________________________________
+
+//! Connect AT45DBx driver to spi master service
+#define AT45DBX_USES_SPI_MASTER_SERVICE
+
+//! Select the SPI module AT45DBX is conntected to
+#define AT45DBX_SPI_MODULE AT45DBX_SPI
+
+//! Size of AT45DBX data flash memories to manage.
+#define AT45DBX_MEM_SIZE AT45DBX_8MB
+
+//! Number of AT45DBX components to manage.
+#define AT45DBX_MEM_CNT 1
+
+//! SPI master speed in Hz.
+#define AT45DBX_SPI_MASTER_SPEED 12000000
+
+//! First chip select used by AT45DBX components on the SPI module instance.
+#define AT45DBX_CS AT45DBX_SPI_NPCS
+
+#endif // _CONF_AT45DBX_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1105/conf_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1105/conf_board.h
new file mode 100644
index 0000000..e69060e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1105/conf_board.h
@@ -0,0 +1,44 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Board configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H_INCLUDED
+#define CONF_BOARD_H_INCLUDED
+
+// Enable AT45DBX Component.
+#define CONF_BOARD_AT45DBX
+
+#endif /* CONF_BOARD_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1105/conf_clock.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1105/conf_clock.h
new file mode 100644
index 0000000..c4c1e5d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1105/conf_clock.h
@@ -0,0 +1,75 @@
+/**
+ * \file
+ *
+ * \brief Chip-specific system clock manager configuration
+ *
+ * Copyright (C) 2011 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_CLOCK_H_INCLUDED
+#define CONF_CLOCK_H_INCLUDED
+
+// ===== System Clock Source Options
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_RCSYS
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_OSC0
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL0
+
+// ===== PLL0 Options
+#define CONFIG_PLL0_SOURCE PLL_SRC_OSC0
+//#define CONFIG_PLL0_SOURCE PLL_SRC_OSC1
+#define CONFIG_PLL0_MUL 8 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+#define CONFIG_PLL0_DIV 2 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+
+// ===== PLL1 Options
+//#define CONFIG_PLL1_SOURCE PLL_SRC_OSC0
+//#define CONFIG_PLL1_SOURCE PLL_SRC_OSC1
+//#define CONFIG_PLL1_MUL 8 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+//#define CONFIG_PLL1_DIV 2 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+
+// ===== System Clock Bus Division Options
+//#define CONFIG_SYSCLK_CPU_DIV 0 /* Fcpu = Fsys/(2 ^ CPU_div) */
+//#define CONFIG_SYSCLK_PBA_DIV 0 /* Fpba = Fsys/(2 ^ PBA_div) */
+//#define CONFIG_SYSCLK_PBB_DIV 0 /* Fpbb = Fsys/(2 ^ PBB_div) */
+
+// ===== Peripheral Clock Management Options
+//#define CONFIG_SYSCLK_INIT_CPUMASK ((1 << SYSCLK_SYSTIMER) | (1 << SYSCLK_OCD))
+//#define CONFIG_SYSCLK_INIT_PBAMASK (1 << SYSCLK_USART0)
+//#define CONFIG_SYSCLK_INIT_PBBMASK (1 << SYSCLK_HMATRIX)
+//#define CONFIG_SYSCLK_INIT_HSBMASK (1 << SYSCLK_MDMA_HSB)
+
+// ===== USB Clock Source Options
+//#define CONFIG_USBCLK_SOURCE USBCLK_SRC_OSC0
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL0
+//#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL1
+#define CONFIG_USBCLK_DIV 1 /* Fusb = Fsys/(2 ^ USB_div) */
+
+#endif /* CONF_CLOCK_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1105/conf_sd_mmc_spi.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1105/conf_sd_mmc_spi.h
new file mode 100644
index 0000000..9a2ae9c
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1105/conf_sd_mmc_spi.h
@@ -0,0 +1,71 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief SD/MMC configuration file.
+ *
+ * This file contains the possible external configuration of the SD/MMC.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with an SPI module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_SD_MMC_SPI_H_
+#define _CONF_SD_MMC_SPI_H_
+
+
+#include "conf_access.h"
+
+#if SD_MMC_SPI_MEM == DISABLE
+#error conf_sd_mmc_spi.h is #included although SD_MMC_SPI_MEM is disabled
+#endif
+
+
+#include "sd_mmc_spi.h"
+
+
+//_____ D E F I N I T I O N S ______________________________________________
+
+//! SPI master speed in Hz.
+#define SD_MMC_SPI_MASTER_SPEED 20000000
+
+//! Number of bits in each SPI transfer.
+#define SD_MMC_SPI_BITS 8
+
+
+#endif // _CONF_SD_MMC_SPI_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1105/conf_sleepmgr.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1105/conf_sleepmgr.h
new file mode 100644
index 0000000..699010d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1105/conf_sleepmgr.h
@@ -0,0 +1,43 @@
+/**
+ * \file
+ *
+ * \brief Sleep manager configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SLEEPMGR_H
+#define CONF_SLEEPMGR_H
+
+#define CONFIG_SLEEPMGR_ENABLE
+
+#endif /* CONF_SLEEPMGR_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1105/conf_spi_master.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1105/conf_spi_master.h
new file mode 100644
index 0000000..7d17e60
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1105/conf_spi_master.h
@@ -0,0 +1,58 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Spi Master configuration for spi example
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SPI_MASTER_H_INCLUDED
+#define CONF_SPI_MASTER_H_INCLUDED
+
+/* Possibility to change low-level configurations here */
+
+//! Default Config Spi Master Delay BCS
+// #define CONFIG_SPI_MASTER_DELAY_BCS 0
+
+//! Default Config Spi Master Bits per Transfer Definition
+// #define CONFIG_SPI_MASTER_BITS_PER_TRANSFER 8
+
+//! Default Config Spi Master Delay BCT
+// #define CONFIG_SPI_MASTER_DELAY_BCT 0
+
+//! Default Config Spi Master Delay BS
+// #define CONFIG_SPI_MASTER_DELAY_BS 0
+
+//! Default Config Spi Master Dummy Field
+// #define CONFIG_SPI_MASTER_DUMMY 0xFF
+
+#endif /* CONF_SPI_MASTER_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1105/conf_virtual_mem.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1105/conf_virtual_mem.h
new file mode 100644
index 0000000..984bc17
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1105/conf_virtual_mem.h
@@ -0,0 +1,54 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Virtual memory configuration file.
+ *
+ * This file contains the possible external configuration of the AT45DBX.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with an SPI module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_VIRTUAL_MEM_H_
+#define _CONF_VIRTUAL_MEM_H_
+
+//! Size of Virtual Memory on internal RAM (unit 512B)
+#define VMEM_NB_SECTOR 64 // 32KB
+
+#endif // _CONF_VIRTUAL_MEM_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1105/ui.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1105/ui.c
new file mode 100644
index 0000000..0730b65
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a0512_evk1105/ui.c
@@ -0,0 +1,103 @@
+/**
+ * \file
+ *
+ * \brief User Interface
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "udi_msc.h"
+#include "board.h"
+#include "gpio.h"
+#include "ui.h"
+
+void ui_init(void)
+{
+ LED_On(LED0);
+ LED_Off(LED1);
+}
+
+void ui_powerdown(void)
+{
+ LED_Off(LED0);
+ LED_Off(LED1);
+}
+
+void ui_wakeup(void)
+{
+ LED_On(LED0);
+}
+
+void ui_start_read(void)
+{
+ LED_On(LED2);
+}
+
+void ui_stop_read(void)
+{
+ LED_Off(LED2);
+}
+
+void ui_start_write(void)
+{
+ LED_On(LED3);
+}
+
+void ui_stop_write(void)
+{
+ LED_Off(LED3);
+}
+
+void ui_process(uint16_t framenumber)
+{
+ if ((framenumber % 1000) == 0) {
+ LED_On(LED1);
+ }
+ if ((framenumber % 1000) == 500) {
+ LED_Off(LED1);
+ }
+}
+
+
+/**
+ * \defgroup UI User Iinterface
+ *
+ * Human interface on EVK1105 :
+ * - Led 0 is on when USB line is in IDLE mode, and off in SUSPEND mode
+ * - Led 1 blinks when USB Host have checked and enabled MSC interface
+ * - Led 2 is on during read operation
+ * - Led 3 is on during write operation
+ *
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a3256_evk1104/conf_access.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a3256_evk1104/conf_access.h
new file mode 100644
index 0000000..7fd8bc5
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a3256_evk1104/conf_access.h
@@ -0,0 +1,186 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Memory access control configuration file.
+ *
+ * This file contains the possible external configuration of the memory access
+ * control.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_ACCESS_H_
+#define _CONF_ACCESS_H_
+
+#include "compiler.h"
+#include "board.h"
+
+
+/*! \name Activation of Logical Unit Numbers
+ */
+//! @{
+#define LUN_0 ENABLE //!< On-Chip Virtual Memory.
+#define LUN_1 ENABLE //!< AT45DBX Data Flash.
+#define LUN_2 DISABLE //!< SD/MMC Card over SPI.
+#define LUN_3 ENABLE //!< SD/MMC Card over MCI Slot 0.
+#define LUN_4 DISABLE
+#define LUN_5 DISABLE
+#define LUN_6 DISABLE
+#define LUN_7 DISABLE
+#define LUN_USB DISABLE //!< Host Mass-Storage Memory.
+//! @}
+
+/*! \name LUN 0 Definitions
+ */
+//! @{
+#define VIRTUAL_MEM LUN_0
+#define LUN_ID_VIRTUAL_MEM LUN_ID_0
+#define LUN_0_INCLUDE "virtual_mem.h"
+#define Lun_0_test_unit_ready virtual_test_unit_ready
+#define Lun_0_read_capacity virtual_read_capacity
+#define Lun_0_wr_protect virtual_wr_protect
+#define Lun_0_removal virtual_removal
+#define Lun_0_usb_read_10 virtual_usb_read_10
+#define Lun_0_usb_write_10 virtual_usb_write_10
+#define Lun_0_mem_2_ram virtual_mem_2_ram
+#define Lun_0_ram_2_mem virtual_ram_2_mem
+#define LUN_0_NAME "\"On-Chip Virtual Memory\""
+//! @}
+
+/*! \name LUN 1 Definitions
+ */
+//! @{
+#define AT45DBX_MEM LUN_1
+#define LUN_ID_AT45DBX_MEM LUN_ID_1
+#define LUN_1_INCLUDE "at45dbx_mem.h"
+#define Lun_1_test_unit_ready at45dbx_test_unit_ready
+#define Lun_1_read_capacity at45dbx_read_capacity
+#define Lun_1_wr_protect at45dbx_wr_protect
+#define Lun_1_removal at45dbx_removal
+#define Lun_1_usb_read_10 at45dbx_usb_read_10
+#define Lun_1_usb_write_10 at45dbx_usb_write_10
+#define Lun_1_mem_2_ram at45dbx_df_2_ram
+#define Lun_1_ram_2_mem at45dbx_ram_2_df
+#define LUN_1_NAME "\"AT45DBX Data Flash\""
+//! @}
+
+/*! \name LUN 2 Definitions
+ */
+//! @{
+#define SD_MMC_SPI_MEM LUN_2
+#define LUN_ID_SD_MMC_SPI_MEM LUN_ID_2
+#define LUN_2_INCLUDE "sd_mmc_spi_mem.h"
+#define Lun_2_test_unit_ready sd_mmc_spi_test_unit_ready
+#define Lun_2_read_capacity sd_mmc_spi_read_capacity
+#define Lun_2_wr_protect sd_mmc_spi_wr_protect
+#define Lun_2_removal sd_mmc_spi_removal
+#define Lun_2_usb_read_10 sd_mmc_spi_usb_read_10
+#define Lun_2_usb_write_10 sd_mmc_spi_usb_write_10
+#define Lun_2_mem_2_ram sd_mmc_spi_mem_2_ram
+#define Lun_2_ram_2_mem sd_mmc_spi_ram_2_mem
+#define LUN_2_NAME "\"SD/MMC Card over SPI\""
+//! @}
+
+/*! \name LUN 3 Definitions
+ */
+//! @{
+#define SD_MMC_MCI_0_MEM LUN_3
+#define LUN_ID_SD_MMC_MCI_0_MEM LUN_ID_3
+#define LUN_3_INCLUDE "sd_mmc_mci_mem.h"
+#define Lun_3_test_unit_ready sd_mmc_mci_test_unit_ready_0
+#define Lun_3_read_capacity sd_mmc_mci_read_capacity_0
+#define Lun_3_wr_protect sd_mmc_mci_wr_protect_0
+#define Lun_3_removal sd_mmc_mci_removal_0
+#define Lun_3_usb_read_10 sd_mmc_mci_usb_read_10_0
+#define Lun_3_usb_write_10 sd_mmc_mci_usb_write_10_0
+#define Lun_3_mem_2_ram sd_mmc_mci_mem_2_ram_0
+#define Lun_3_ram_2_mem sd_mmc_mci_ram_2_mem_0
+#define LUN_3_NAME "\"SD/MMC Card over MCI Slot 0\""
+//! @}
+
+/*! \name USB LUNs Definitions
+ */
+//! @{
+#define MEM_USB LUN_USB
+#define LUN_ID_MEM_USB LUN_ID_USB
+#define LUN_USB_INCLUDE "host_mem.h"
+#define Lun_usb_test_unit_ready(lun) host_test_unit_ready(lun)
+#define Lun_usb_read_capacity(lun, nb_sect) host_read_capacity(lun, nb_sect)
+#define Lun_usb_read_sector_size(lun) host_read_sector_size(lun)
+#define Lun_usb_wr_protect(lun) host_wr_protect(lun)
+#define Lun_usb_removal() host_removal()
+#define Lun_usb_mem_2_ram(addr, ram) host_read_10_ram(addr, ram)
+#define Lun_usb_ram_2_mem(addr, ram) host_write_10_ram(addr, ram)
+#define LUN_USB_NAME "\"Host Mass-Storage Memory\""
+//! @}
+
+/*! \name Actions Associated with Memory Accesses
+ *
+ * Write here the action to associate with each memory access.
+ *
+ * \warning Be careful not to waste time in order not to disturb the functions.
+ */
+//! @{
+#define memory_start_read_action(nb_sectors) ui_start_read()
+#define memory_stop_read_action() ui_stop_read()
+#define memory_start_write_action(nb_sectors) ui_start_write()
+#define memory_stop_write_action() ui_stop_write()
+#include "ui.h"
+//! @}
+
+/*! \name Activation of Interface Features
+ */
+//! @{
+#define ACCESS_USB ENABLED //!< MEM <-> USB interface.
+#define ACCESS_MEM_TO_RAM DISABLED //!< MEM <-> RAM interface.
+#define ACCESS_STREAM DISABLED //!< Streaming MEM <-> MEM interface.
+#define ACCESS_STREAM_RECORD DISABLED //!< Streaming MEM <-> MEM interface in record mode.
+#define ACCESS_MEM_TO_MEM DISABLED //!< MEM <-> MEM interface.
+#define ACCESS_CODEC DISABLED //!< Codec interface.
+//! @}
+
+/*! \name Specific Options for Access Control
+ */
+//! @{
+#define GLOBAL_WR_PROTECT DISABLED //!< Management of a global write protection.
+//! @}
+
+
+#endif // _CONF_ACCESS_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a3256_evk1104/conf_at45dbx.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a3256_evk1104/conf_at45dbx.h
new file mode 100644
index 0000000..c5acf2f
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a3256_evk1104/conf_at45dbx.h
@@ -0,0 +1,73 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief AT45DBX configuration file.
+ *
+ * This file contains the possible external configuration of the AT45DBX.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with an SPI module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_AT45DBX_H_
+#define _CONF_AT45DBX_H_
+
+#include "board.h"
+
+//_____ D E F I N I T I O N S ______________________________________________
+
+//! Connect AT45DBx driver to spi master service
+#define AT45DBX_USES_SPI_MASTER_SERVICE
+
+//! Select the SPI module AT45DBX is conntected to
+#define AT45DBX_SPI_MODULE AT45DBX_SPI
+
+//! Size of AT45DBX data flash memories to manage.
+#define AT45DBX_MEM_SIZE AT45DBX_8MB
+
+//! Number of AT45DBX components to manage.
+#define AT45DBX_MEM_CNT 1
+
+//! SPI master speed in Hz.
+#define AT45DBX_SPI_MASTER_SPEED 12000000
+
+//! First chip select used by AT45DBX components on the SPI module instance.
+#define AT45DBX_CS AT45DBX_SPI_NPCS
+
+#endif // _CONF_AT45DBX_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a3256_evk1104/conf_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a3256_evk1104/conf_board.h
new file mode 100644
index 0000000..e69060e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a3256_evk1104/conf_board.h
@@ -0,0 +1,44 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Board configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H_INCLUDED
+#define CONF_BOARD_H_INCLUDED
+
+// Enable AT45DBX Component.
+#define CONF_BOARD_AT45DBX
+
+#endif /* CONF_BOARD_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a3256_evk1104/conf_clock.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a3256_evk1104/conf_clock.h
new file mode 100644
index 0000000..e711d69
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a3256_evk1104/conf_clock.h
@@ -0,0 +1,75 @@
+/**
+ * \file
+ *
+ * \brief Chip-specific system clock manager configuration
+ *
+ * Copyright (C) 2011 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_CLOCK_H_INCLUDED
+#define CONF_CLOCK_H_INCLUDED
+
+// ===== System Clock Source Options
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_RCSYS
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_OSC0
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL0
+
+// ===== PLL0 Options
+#define CONFIG_PLL0_SOURCE PLL_SRC_OSC0
+//#define CONFIG_PLL0_SOURCE PLL_SRC_OSC1
+#define CONFIG_PLL0_MUL 11 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+#define CONFIG_PLL0_DIV 2 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+
+// ===== PLL1 Options
+//#define CONFIG_PLL1_SOURCE PLL_SRC_OSC0
+//#define CONFIG_PLL1_SOURCE PLL_SRC_OSC1
+//#define CONFIG_PLL1_MUL 8 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+//#define CONFIG_PLL1_DIV 2 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+
+// ===== System Clock Bus Division Options
+#define CONFIG_SYSCLK_CPU_DIV 0 /* Fcpu = Fsys/(2 ^ CPU_div) */
+#define CONFIG_SYSCLK_PBA_DIV 0 /* Fpba = Fsys/(2 ^ PBA_div) */
+//#define CONFIG_SYSCLK_PBB_DIV 0 /* Fpbb = Fsys/(2 ^ PBB_div) */
+
+// ===== Peripheral Clock Management Options
+//#define CONFIG_SYSCLK_INIT_CPUMASK ((1 << SYSCLK_SYSTIMER) | (1 << SYSCLK_OCD))
+//#define CONFIG_SYSCLK_INIT_PBAMASK (1 << SYSCLK_USART0)
+//#define CONFIG_SYSCLK_INIT_PBBMASK (1 << SYSCLK_HMATRIX)
+//#define CONFIG_SYSCLK_INIT_HSBMASK (1 << SYSCLK_MDMA_HSB)
+
+// ===== USB Clock Source Options
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_OSC0
+//#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL0
+//#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL1
+#define CONFIG_USBCLK_DIV 1 /* Fusb = Fsys/(2 ^ USB_div) */
+
+#endif /* CONF_CLOCK_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a3256_evk1104/conf_sd_mmc_mci.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a3256_evk1104/conf_sd_mmc_mci.h
new file mode 100644
index 0000000..7b6875d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a3256_evk1104/conf_sd_mmc_mci.h
@@ -0,0 +1,62 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief SD/MMC configuration file.
+ *
+ * This file contains the possible external configuration of the SD/MMC.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with an MCI module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_SD_MMC_MCI_H_
+#define _CONF_SD_MMC_MCI_H_
+
+
+#include "conf_access.h"
+#include "sd_mmc_mci.h"
+
+#define SD_4_BIT ENABLE //!> Enable the SD 4-bit or MMC 8-bit interface
+
+#define MCI_DEFAULT_SPEED_HZ 200000 //!> Default card speed in Hz
+
+#define MCI_DEFAULT_PWSDIV 0x07 //!< Power Saving Divider.
+
+
+#endif // _CONF_SD_MMC_MCI_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a3256_evk1104/conf_sleepmgr.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a3256_evk1104/conf_sleepmgr.h
new file mode 100644
index 0000000..699010d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a3256_evk1104/conf_sleepmgr.h
@@ -0,0 +1,43 @@
+/**
+ * \file
+ *
+ * \brief Sleep manager configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SLEEPMGR_H
+#define CONF_SLEEPMGR_H
+
+#define CONFIG_SLEEPMGR_ENABLE
+
+#endif /* CONF_SLEEPMGR_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a3256_evk1104/conf_spi_master.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a3256_evk1104/conf_spi_master.h
new file mode 100644
index 0000000..7d17e60
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a3256_evk1104/conf_spi_master.h
@@ -0,0 +1,58 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Spi Master configuration for spi example
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SPI_MASTER_H_INCLUDED
+#define CONF_SPI_MASTER_H_INCLUDED
+
+/* Possibility to change low-level configurations here */
+
+//! Default Config Spi Master Delay BCS
+// #define CONFIG_SPI_MASTER_DELAY_BCS 0
+
+//! Default Config Spi Master Bits per Transfer Definition
+// #define CONFIG_SPI_MASTER_BITS_PER_TRANSFER 8
+
+//! Default Config Spi Master Delay BCT
+// #define CONFIG_SPI_MASTER_DELAY_BCT 0
+
+//! Default Config Spi Master Delay BS
+// #define CONFIG_SPI_MASTER_DELAY_BS 0
+
+//! Default Config Spi Master Dummy Field
+// #define CONFIG_SPI_MASTER_DUMMY 0xFF
+
+#endif /* CONF_SPI_MASTER_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a3256_evk1104/conf_virtual_mem.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a3256_evk1104/conf_virtual_mem.h
new file mode 100644
index 0000000..984bc17
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a3256_evk1104/conf_virtual_mem.h
@@ -0,0 +1,54 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Virtual memory configuration file.
+ *
+ * This file contains the possible external configuration of the AT45DBX.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with an SPI module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_VIRTUAL_MEM_H_
+#define _CONF_VIRTUAL_MEM_H_
+
+//! Size of Virtual Memory on internal RAM (unit 512B)
+#define VMEM_NB_SECTOR 64 // 32KB
+
+#endif // _CONF_VIRTUAL_MEM_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a3256_evk1104/ui.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a3256_evk1104/ui.c
new file mode 100644
index 0000000..bc0d4d7
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3a3256_evk1104/ui.c
@@ -0,0 +1,103 @@
+/**
+ * \file
+ *
+ * \brief User Interface
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "udi_msc.h"
+#include "board.h"
+#include "gpio.h"
+#include "ui.h"
+
+void ui_init(void)
+{
+ LED_On(LED0);
+ LED_Off(LED1);
+}
+
+void ui_powerdown(void)
+{
+ LED_Off(LED0);
+ LED_Off(LED1);
+}
+
+void ui_wakeup(void)
+{
+ LED_On(LED0);
+}
+
+void ui_start_read(void)
+{
+ LED_On(LED2);
+}
+
+void ui_stop_read(void)
+{
+ LED_Off(LED2);
+}
+
+void ui_start_write(void)
+{
+ LED_On(LED3);
+}
+
+void ui_stop_write(void)
+{
+ LED_Off(LED3);
+}
+
+void ui_process(uint16_t framenumber)
+{
+ if ((framenumber % 1000) == 0) {
+ LED_On(LED1);
+ }
+ if ((framenumber % 1000) == 500) {
+ LED_Off(LED1);
+ }
+}
+
+
+/**
+ * \defgroup UI User Iinterface
+ *
+ * Human interface on EVK1104 :
+ * - Led 0 is on when USB line is in IDLE mode, and off in SUSPEND mode
+ * - Led 1 blinks when USB Host have checked and enabled MSC interface
+ * - Led 2 is on during read operation
+ * - Led 3 is on during write operation
+ *
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3b0256_evk1101/conf_access.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3b0256_evk1101/conf_access.h
new file mode 100644
index 0000000..2d3abd1
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3b0256_evk1101/conf_access.h
@@ -0,0 +1,186 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Memory access control configuration file.
+ *
+ * This file contains the possible external configuration of the memory access
+ * control.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_ACCESS_H_
+#define _CONF_ACCESS_H_
+
+#include "compiler.h"
+#include "board.h"
+
+
+/*! \name Activation of Logical Unit Numbers
+ */
+//! @{
+#define LUN_0 ENABLE //!< On-Chip Virtual Memory.
+#define LUN_1 ENABLE //!< AT45DBX Data Flash.
+#define LUN_2 DISABLE //!< SD/MMC Card over SPI.
+#define LUN_3 DISABLE //!< SD/MMC Card over MCI Slot 0.
+#define LUN_4 DISABLE
+#define LUN_5 DISABLE
+#define LUN_6 DISABLE
+#define LUN_7 DISABLE
+#define LUN_USB DISABLE //!< Host Mass-Storage Memory.
+//! @}
+
+/*! \name LUN 0 Definitions
+ */
+//! @{
+#define VIRTUAL_MEM LUN_0
+#define LUN_ID_VIRTUAL_MEM LUN_ID_0
+#define LUN_0_INCLUDE "virtual_mem.h"
+#define Lun_0_test_unit_ready virtual_test_unit_ready
+#define Lun_0_read_capacity virtual_read_capacity
+#define Lun_0_wr_protect virtual_wr_protect
+#define Lun_0_removal virtual_removal
+#define Lun_0_usb_read_10 virtual_usb_read_10
+#define Lun_0_usb_write_10 virtual_usb_write_10
+#define Lun_0_mem_2_ram virtual_mem_2_ram
+#define Lun_0_ram_2_mem virtual_ram_2_mem
+#define LUN_0_NAME "\"On-Chip Virtual Memory\""
+//! @}
+
+/*! \name LUN 1 Definitions
+ */
+//! @{
+#define AT45DBX_MEM LUN_1
+#define LUN_ID_AT45DBX_MEM LUN_ID_1
+#define LUN_1_INCLUDE "at45dbx_mem.h"
+#define Lun_1_test_unit_ready at45dbx_test_unit_ready
+#define Lun_1_read_capacity at45dbx_read_capacity
+#define Lun_1_wr_protect at45dbx_wr_protect
+#define Lun_1_removal at45dbx_removal
+#define Lun_1_usb_read_10 at45dbx_usb_read_10
+#define Lun_1_usb_write_10 at45dbx_usb_write_10
+#define Lun_1_mem_2_ram at45dbx_df_2_ram
+#define Lun_1_ram_2_mem at45dbx_ram_2_df
+#define LUN_1_NAME "\"AT45DBX Data Flash\""
+//! @}
+
+/*! \name LUN 2 Definitions
+ */
+//! @{
+#define SD_MMC_SPI_MEM LUN_2
+#define LUN_ID_SD_MMC_SPI_MEM LUN_ID_2
+#define LUN_2_INCLUDE "sd_mmc_spi_mem.h"
+#define Lun_2_test_unit_ready sd_mmc_spi_test_unit_ready
+#define Lun_2_read_capacity sd_mmc_spi_read_capacity
+#define Lun_2_wr_protect sd_mmc_spi_wr_protect
+#define Lun_2_removal sd_mmc_spi_removal
+#define Lun_2_usb_read_10 sd_mmc_spi_usb_read_10
+#define Lun_2_usb_write_10 sd_mmc_spi_usb_write_10
+#define Lun_2_mem_2_ram sd_mmc_spi_mem_2_ram
+#define Lun_2_ram_2_mem sd_mmc_spi_ram_2_mem
+#define LUN_2_NAME "\"SD/MMC Card over SPI\""
+//! @}
+
+/*! \name LUN 3 Definitions
+ */
+//! @{
+#define SD_MMC_MCI_0_MEM LUN_3
+#define LUN_ID_SD_MMC_MCI_0_MEM LUN_ID_3
+#define LUN_3_INCLUDE "sd_mmc_mci_mem.h"
+#define Lun_3_test_unit_ready sd_mmc_mci_test_unit_ready_0
+#define Lun_3_read_capacity sd_mmc_mci_read_capacity_0
+#define Lun_3_wr_protect sd_mmc_mci_wr_protect_0
+#define Lun_3_removal sd_mmc_mci_removal_0
+#define Lun_3_usb_read_10 sd_mmc_mci_usb_read_10_0
+#define Lun_3_usb_write_10 sd_mmc_mci_usb_write_10_0
+#define Lun_3_mem_2_ram sd_mmc_mci_mem_2_ram_0
+#define Lun_3_ram_2_mem sd_mmc_mci_ram_2_mem_0
+#define LUN_3_NAME "\"SD/MMC Card over MCI Slot 0\""
+//! @}
+
+/*! \name USB LUNs Definitions
+ */
+//! @{
+#define MEM_USB LUN_USB
+#define LUN_ID_MEM_USB LUN_ID_USB
+#define LUN_USB_INCLUDE "host_mem.h"
+#define Lun_usb_test_unit_ready(lun) host_test_unit_ready(lun)
+#define Lun_usb_read_capacity(lun, nb_sect) host_read_capacity(lun, nb_sect)
+#define Lun_usb_read_sector_size(lun) host_read_sector_size(lun)
+#define Lun_usb_wr_protect(lun) host_wr_protect(lun)
+#define Lun_usb_removal() host_removal()
+#define Lun_usb_mem_2_ram(addr, ram) host_read_10_ram(addr, ram)
+#define Lun_usb_ram_2_mem(addr, ram) host_write_10_ram(addr, ram)
+#define LUN_USB_NAME "\"Host Mass-Storage Memory\""
+//! @}
+
+/*! \name Actions Associated with Memory Accesses
+ *
+ * Write here the action to associate with each memory access.
+ *
+ * \warning Be careful not to waste time in order not to disturb the functions.
+ */
+//! @{
+#define memory_start_read_action(nb_sectors) ui_start_read()
+#define memory_stop_read_action() ui_stop_read()
+#define memory_start_write_action(nb_sectors) ui_start_write()
+#define memory_stop_write_action() ui_stop_write()
+#include "ui.h"
+//! @}
+
+/*! \name Activation of Interface Features
+ */
+//! @{
+#define ACCESS_USB ENABLED //!< MEM <-> USB interface.
+#define ACCESS_MEM_TO_RAM DISABLED //!< MEM <-> RAM interface.
+#define ACCESS_STREAM DISABLED //!< Streaming MEM <-> MEM interface.
+#define ACCESS_STREAM_RECORD DISABLED //!< Streaming MEM <-> MEM interface in record mode.
+#define ACCESS_MEM_TO_MEM DISABLED //!< MEM <-> MEM interface.
+#define ACCESS_CODEC DISABLED //!< Codec interface.
+//! @}
+
+/*! \name Specific Options for Access Control
+ */
+//! @{
+#define GLOBAL_WR_PROTECT DISABLED //!< Management of a global write protection.
+//! @}
+
+
+#endif // _CONF_ACCESS_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3b0256_evk1101/conf_at45dbx.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3b0256_evk1101/conf_at45dbx.h
new file mode 100644
index 0000000..c5acf2f
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3b0256_evk1101/conf_at45dbx.h
@@ -0,0 +1,73 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief AT45DBX configuration file.
+ *
+ * This file contains the possible external configuration of the AT45DBX.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with an SPI module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_AT45DBX_H_
+#define _CONF_AT45DBX_H_
+
+#include "board.h"
+
+//_____ D E F I N I T I O N S ______________________________________________
+
+//! Connect AT45DBx driver to spi master service
+#define AT45DBX_USES_SPI_MASTER_SERVICE
+
+//! Select the SPI module AT45DBX is conntected to
+#define AT45DBX_SPI_MODULE AT45DBX_SPI
+
+//! Size of AT45DBX data flash memories to manage.
+#define AT45DBX_MEM_SIZE AT45DBX_8MB
+
+//! Number of AT45DBX components to manage.
+#define AT45DBX_MEM_CNT 1
+
+//! SPI master speed in Hz.
+#define AT45DBX_SPI_MASTER_SPEED 12000000
+
+//! First chip select used by AT45DBX components on the SPI module instance.
+#define AT45DBX_CS AT45DBX_SPI_NPCS
+
+#endif // _CONF_AT45DBX_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3b0256_evk1101/conf_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3b0256_evk1101/conf_board.h
new file mode 100644
index 0000000..e69060e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3b0256_evk1101/conf_board.h
@@ -0,0 +1,44 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Board configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H_INCLUDED
+#define CONF_BOARD_H_INCLUDED
+
+// Enable AT45DBX Component.
+#define CONF_BOARD_AT45DBX
+
+#endif /* CONF_BOARD_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3b0256_evk1101/conf_clock.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3b0256_evk1101/conf_clock.h
new file mode 100644
index 0000000..c4c1e5d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3b0256_evk1101/conf_clock.h
@@ -0,0 +1,75 @@
+/**
+ * \file
+ *
+ * \brief Chip-specific system clock manager configuration
+ *
+ * Copyright (C) 2011 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_CLOCK_H_INCLUDED
+#define CONF_CLOCK_H_INCLUDED
+
+// ===== System Clock Source Options
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_RCSYS
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_OSC0
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL0
+
+// ===== PLL0 Options
+#define CONFIG_PLL0_SOURCE PLL_SRC_OSC0
+//#define CONFIG_PLL0_SOURCE PLL_SRC_OSC1
+#define CONFIG_PLL0_MUL 8 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+#define CONFIG_PLL0_DIV 2 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+
+// ===== PLL1 Options
+//#define CONFIG_PLL1_SOURCE PLL_SRC_OSC0
+//#define CONFIG_PLL1_SOURCE PLL_SRC_OSC1
+//#define CONFIG_PLL1_MUL 8 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+//#define CONFIG_PLL1_DIV 2 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+
+// ===== System Clock Bus Division Options
+//#define CONFIG_SYSCLK_CPU_DIV 0 /* Fcpu = Fsys/(2 ^ CPU_div) */
+//#define CONFIG_SYSCLK_PBA_DIV 0 /* Fpba = Fsys/(2 ^ PBA_div) */
+//#define CONFIG_SYSCLK_PBB_DIV 0 /* Fpbb = Fsys/(2 ^ PBB_div) */
+
+// ===== Peripheral Clock Management Options
+//#define CONFIG_SYSCLK_INIT_CPUMASK ((1 << SYSCLK_SYSTIMER) | (1 << SYSCLK_OCD))
+//#define CONFIG_SYSCLK_INIT_PBAMASK (1 << SYSCLK_USART0)
+//#define CONFIG_SYSCLK_INIT_PBBMASK (1 << SYSCLK_HMATRIX)
+//#define CONFIG_SYSCLK_INIT_HSBMASK (1 << SYSCLK_MDMA_HSB)
+
+// ===== USB Clock Source Options
+//#define CONFIG_USBCLK_SOURCE USBCLK_SRC_OSC0
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL0
+//#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL1
+#define CONFIG_USBCLK_DIV 1 /* Fusb = Fsys/(2 ^ USB_div) */
+
+#endif /* CONF_CLOCK_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3b0256_evk1101/conf_sd_mmc_spi.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3b0256_evk1101/conf_sd_mmc_spi.h
new file mode 100644
index 0000000..9a2ae9c
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3b0256_evk1101/conf_sd_mmc_spi.h
@@ -0,0 +1,71 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief SD/MMC configuration file.
+ *
+ * This file contains the possible external configuration of the SD/MMC.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with an SPI module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_SD_MMC_SPI_H_
+#define _CONF_SD_MMC_SPI_H_
+
+
+#include "conf_access.h"
+
+#if SD_MMC_SPI_MEM == DISABLE
+#error conf_sd_mmc_spi.h is #included although SD_MMC_SPI_MEM is disabled
+#endif
+
+
+#include "sd_mmc_spi.h"
+
+
+//_____ D E F I N I T I O N S ______________________________________________
+
+//! SPI master speed in Hz.
+#define SD_MMC_SPI_MASTER_SPEED 20000000
+
+//! Number of bits in each SPI transfer.
+#define SD_MMC_SPI_BITS 8
+
+
+#endif // _CONF_SD_MMC_SPI_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3b0256_evk1101/conf_sleepmgr.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3b0256_evk1101/conf_sleepmgr.h
new file mode 100644
index 0000000..699010d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3b0256_evk1101/conf_sleepmgr.h
@@ -0,0 +1,43 @@
+/**
+ * \file
+ *
+ * \brief Sleep manager configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SLEEPMGR_H
+#define CONF_SLEEPMGR_H
+
+#define CONFIG_SLEEPMGR_ENABLE
+
+#endif /* CONF_SLEEPMGR_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3b0256_evk1101/conf_spi_master.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3b0256_evk1101/conf_spi_master.h
new file mode 100644
index 0000000..7d17e60
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3b0256_evk1101/conf_spi_master.h
@@ -0,0 +1,58 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Spi Master configuration for spi example
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SPI_MASTER_H_INCLUDED
+#define CONF_SPI_MASTER_H_INCLUDED
+
+/* Possibility to change low-level configurations here */
+
+//! Default Config Spi Master Delay BCS
+// #define CONFIG_SPI_MASTER_DELAY_BCS 0
+
+//! Default Config Spi Master Bits per Transfer Definition
+// #define CONFIG_SPI_MASTER_BITS_PER_TRANSFER 8
+
+//! Default Config Spi Master Delay BCT
+// #define CONFIG_SPI_MASTER_DELAY_BCT 0
+
+//! Default Config Spi Master Delay BS
+// #define CONFIG_SPI_MASTER_DELAY_BS 0
+
+//! Default Config Spi Master Dummy Field
+// #define CONFIG_SPI_MASTER_DUMMY 0xFF
+
+#endif /* CONF_SPI_MASTER_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3b0256_evk1101/conf_virtual_mem.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3b0256_evk1101/conf_virtual_mem.h
new file mode 100644
index 0000000..fabcd4a
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3b0256_evk1101/conf_virtual_mem.h
@@ -0,0 +1,54 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Virtual memory configuration file.
+ *
+ * This file contains the possible external configuration of the AT45DBX.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with an SPI module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_VIRTUAL_MEM_H_
+#define _CONF_VIRTUAL_MEM_H_
+
+//! Size of Virtual Memory on internal RAM (unit 512B)
+#define VMEM_NB_SECTOR 32 // 16KB
+
+#endif // _CONF_VIRTUAL_MEM_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3b0256_evk1101/ui.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3b0256_evk1101/ui.c
new file mode 100644
index 0000000..47086a0
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3b0256_evk1101/ui.c
@@ -0,0 +1,103 @@
+/**
+ * \file
+ *
+ * \brief User Interface
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "udi_msc.h"
+#include "board.h"
+#include "gpio.h"
+#include "ui.h"
+
+void ui_init(void)
+{
+ LED_On(LED0);
+ LED_Off(LED1);
+}
+
+void ui_powerdown(void)
+{
+ LED_Off(LED0);
+ LED_Off(LED1);
+}
+
+void ui_wakeup(void)
+{
+ LED_On(LED0);
+}
+
+void ui_start_read(void)
+{
+ LED_On(LED2);
+}
+
+void ui_stop_read(void)
+{
+ LED_Off(LED2);
+}
+
+void ui_start_write(void)
+{
+ LED_On(LED3);
+}
+
+void ui_stop_write(void)
+{
+ LED_Off(LED3);
+}
+
+void ui_process(uint16_t framenumber)
+{
+ if ((framenumber % 1000) == 0) {
+ LED_On(LED1);
+ }
+ if ((framenumber % 1000) == 500) {
+ LED_Off(LED1);
+ }
+}
+
+
+/**
+ * \defgroup UI User Iinterface
+ *
+ * Human interface on EVK1101 :
+ * - Led 0 is on when USB line is in IDLE mode, and off in SUSPEND mode
+ * - Led 1 blinks when USB Host have checked and enabled MSC interface
+ * - Led 2 is on during read operation
+ * - Led 3 is on during write operation
+ *
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3c0512_uc3c_ek/conf_access.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3c0512_uc3c_ek/conf_access.h
new file mode 100644
index 0000000..2d3abd1
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3c0512_uc3c_ek/conf_access.h
@@ -0,0 +1,186 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Memory access control configuration file.
+ *
+ * This file contains the possible external configuration of the memory access
+ * control.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_ACCESS_H_
+#define _CONF_ACCESS_H_
+
+#include "compiler.h"
+#include "board.h"
+
+
+/*! \name Activation of Logical Unit Numbers
+ */
+//! @{
+#define LUN_0 ENABLE //!< On-Chip Virtual Memory.
+#define LUN_1 ENABLE //!< AT45DBX Data Flash.
+#define LUN_2 DISABLE //!< SD/MMC Card over SPI.
+#define LUN_3 DISABLE //!< SD/MMC Card over MCI Slot 0.
+#define LUN_4 DISABLE
+#define LUN_5 DISABLE
+#define LUN_6 DISABLE
+#define LUN_7 DISABLE
+#define LUN_USB DISABLE //!< Host Mass-Storage Memory.
+//! @}
+
+/*! \name LUN 0 Definitions
+ */
+//! @{
+#define VIRTUAL_MEM LUN_0
+#define LUN_ID_VIRTUAL_MEM LUN_ID_0
+#define LUN_0_INCLUDE "virtual_mem.h"
+#define Lun_0_test_unit_ready virtual_test_unit_ready
+#define Lun_0_read_capacity virtual_read_capacity
+#define Lun_0_wr_protect virtual_wr_protect
+#define Lun_0_removal virtual_removal
+#define Lun_0_usb_read_10 virtual_usb_read_10
+#define Lun_0_usb_write_10 virtual_usb_write_10
+#define Lun_0_mem_2_ram virtual_mem_2_ram
+#define Lun_0_ram_2_mem virtual_ram_2_mem
+#define LUN_0_NAME "\"On-Chip Virtual Memory\""
+//! @}
+
+/*! \name LUN 1 Definitions
+ */
+//! @{
+#define AT45DBX_MEM LUN_1
+#define LUN_ID_AT45DBX_MEM LUN_ID_1
+#define LUN_1_INCLUDE "at45dbx_mem.h"
+#define Lun_1_test_unit_ready at45dbx_test_unit_ready
+#define Lun_1_read_capacity at45dbx_read_capacity
+#define Lun_1_wr_protect at45dbx_wr_protect
+#define Lun_1_removal at45dbx_removal
+#define Lun_1_usb_read_10 at45dbx_usb_read_10
+#define Lun_1_usb_write_10 at45dbx_usb_write_10
+#define Lun_1_mem_2_ram at45dbx_df_2_ram
+#define Lun_1_ram_2_mem at45dbx_ram_2_df
+#define LUN_1_NAME "\"AT45DBX Data Flash\""
+//! @}
+
+/*! \name LUN 2 Definitions
+ */
+//! @{
+#define SD_MMC_SPI_MEM LUN_2
+#define LUN_ID_SD_MMC_SPI_MEM LUN_ID_2
+#define LUN_2_INCLUDE "sd_mmc_spi_mem.h"
+#define Lun_2_test_unit_ready sd_mmc_spi_test_unit_ready
+#define Lun_2_read_capacity sd_mmc_spi_read_capacity
+#define Lun_2_wr_protect sd_mmc_spi_wr_protect
+#define Lun_2_removal sd_mmc_spi_removal
+#define Lun_2_usb_read_10 sd_mmc_spi_usb_read_10
+#define Lun_2_usb_write_10 sd_mmc_spi_usb_write_10
+#define Lun_2_mem_2_ram sd_mmc_spi_mem_2_ram
+#define Lun_2_ram_2_mem sd_mmc_spi_ram_2_mem
+#define LUN_2_NAME "\"SD/MMC Card over SPI\""
+//! @}
+
+/*! \name LUN 3 Definitions
+ */
+//! @{
+#define SD_MMC_MCI_0_MEM LUN_3
+#define LUN_ID_SD_MMC_MCI_0_MEM LUN_ID_3
+#define LUN_3_INCLUDE "sd_mmc_mci_mem.h"
+#define Lun_3_test_unit_ready sd_mmc_mci_test_unit_ready_0
+#define Lun_3_read_capacity sd_mmc_mci_read_capacity_0
+#define Lun_3_wr_protect sd_mmc_mci_wr_protect_0
+#define Lun_3_removal sd_mmc_mci_removal_0
+#define Lun_3_usb_read_10 sd_mmc_mci_usb_read_10_0
+#define Lun_3_usb_write_10 sd_mmc_mci_usb_write_10_0
+#define Lun_3_mem_2_ram sd_mmc_mci_mem_2_ram_0
+#define Lun_3_ram_2_mem sd_mmc_mci_ram_2_mem_0
+#define LUN_3_NAME "\"SD/MMC Card over MCI Slot 0\""
+//! @}
+
+/*! \name USB LUNs Definitions
+ */
+//! @{
+#define MEM_USB LUN_USB
+#define LUN_ID_MEM_USB LUN_ID_USB
+#define LUN_USB_INCLUDE "host_mem.h"
+#define Lun_usb_test_unit_ready(lun) host_test_unit_ready(lun)
+#define Lun_usb_read_capacity(lun, nb_sect) host_read_capacity(lun, nb_sect)
+#define Lun_usb_read_sector_size(lun) host_read_sector_size(lun)
+#define Lun_usb_wr_protect(lun) host_wr_protect(lun)
+#define Lun_usb_removal() host_removal()
+#define Lun_usb_mem_2_ram(addr, ram) host_read_10_ram(addr, ram)
+#define Lun_usb_ram_2_mem(addr, ram) host_write_10_ram(addr, ram)
+#define LUN_USB_NAME "\"Host Mass-Storage Memory\""
+//! @}
+
+/*! \name Actions Associated with Memory Accesses
+ *
+ * Write here the action to associate with each memory access.
+ *
+ * \warning Be careful not to waste time in order not to disturb the functions.
+ */
+//! @{
+#define memory_start_read_action(nb_sectors) ui_start_read()
+#define memory_stop_read_action() ui_stop_read()
+#define memory_start_write_action(nb_sectors) ui_start_write()
+#define memory_stop_write_action() ui_stop_write()
+#include "ui.h"
+//! @}
+
+/*! \name Activation of Interface Features
+ */
+//! @{
+#define ACCESS_USB ENABLED //!< MEM <-> USB interface.
+#define ACCESS_MEM_TO_RAM DISABLED //!< MEM <-> RAM interface.
+#define ACCESS_STREAM DISABLED //!< Streaming MEM <-> MEM interface.
+#define ACCESS_STREAM_RECORD DISABLED //!< Streaming MEM <-> MEM interface in record mode.
+#define ACCESS_MEM_TO_MEM DISABLED //!< MEM <-> MEM interface.
+#define ACCESS_CODEC DISABLED //!< Codec interface.
+//! @}
+
+/*! \name Specific Options for Access Control
+ */
+//! @{
+#define GLOBAL_WR_PROTECT DISABLED //!< Management of a global write protection.
+//! @}
+
+
+#endif // _CONF_ACCESS_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3c0512_uc3c_ek/conf_at45dbx.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3c0512_uc3c_ek/conf_at45dbx.h
new file mode 100644
index 0000000..c5acf2f
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3c0512_uc3c_ek/conf_at45dbx.h
@@ -0,0 +1,73 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief AT45DBX configuration file.
+ *
+ * This file contains the possible external configuration of the AT45DBX.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with an SPI module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_AT45DBX_H_
+#define _CONF_AT45DBX_H_
+
+#include "board.h"
+
+//_____ D E F I N I T I O N S ______________________________________________
+
+//! Connect AT45DBx driver to spi master service
+#define AT45DBX_USES_SPI_MASTER_SERVICE
+
+//! Select the SPI module AT45DBX is conntected to
+#define AT45DBX_SPI_MODULE AT45DBX_SPI
+
+//! Size of AT45DBX data flash memories to manage.
+#define AT45DBX_MEM_SIZE AT45DBX_8MB
+
+//! Number of AT45DBX components to manage.
+#define AT45DBX_MEM_CNT 1
+
+//! SPI master speed in Hz.
+#define AT45DBX_SPI_MASTER_SPEED 12000000
+
+//! First chip select used by AT45DBX components on the SPI module instance.
+#define AT45DBX_CS AT45DBX_SPI_NPCS
+
+#endif // _CONF_AT45DBX_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3c0512_uc3c_ek/conf_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3c0512_uc3c_ek/conf_board.h
new file mode 100644
index 0000000..e69060e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3c0512_uc3c_ek/conf_board.h
@@ -0,0 +1,44 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Board configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H_INCLUDED
+#define CONF_BOARD_H_INCLUDED
+
+// Enable AT45DBX Component.
+#define CONF_BOARD_AT45DBX
+
+#endif /* CONF_BOARD_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3c0512_uc3c_ek/conf_clock.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3c0512_uc3c_ek/conf_clock.h
new file mode 100644
index 0000000..74f682a
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3c0512_uc3c_ek/conf_clock.h
@@ -0,0 +1,82 @@
+/**
+ * \file
+ *
+ * \brief Chip-specific system clock manager configuration
+ *
+ * Copyright (C) 2011 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_CLOCK_H_INCLUDED
+#define CONF_CLOCK_H_INCLUDED
+
+// ===== System Clock Source Options
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_RCSYS
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_OSC0
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_OSC1
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL0
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL1
+//#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_RC8M
+
+// ===== PLL0 Options
+#define CONFIG_PLL0_SOURCE PLL_SRC_OSC0
+//#define CONFIG_PLL0_SOURCE PLL_SRC_OSC1
+//#define CONFIG_PLL0_SOURCE PLL_SRC_RC8M
+#define CONFIG_PLL0_MUL 3 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+#define CONFIG_PLL0_DIV 1 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+
+// ===== PLL1 Options
+//#define CONFIG_PLL1_SOURCE PLL_SRC_OSC0
+//#define CONFIG_PLL1_SOURCE PLL_SRC_OSC1
+//#define CONFIG_PLL1_SOURCE PLL_SRC_RC8M
+//#define CONFIG_PLL1_MUL 3 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+//#define CONFIG_PLL1_DIV 1 /* Fpll = (Fclk * PLL_mul) / PLL_div */
+
+// ===== System Clock Bus Division Options
+//#define CONFIG_SYSCLK_CPU_DIV 0 /* Fcpu = Fsys/(2 ^ CPU_div) */
+//#define CONFIG_SYSCLK_PBA_DIV 0 /* Fpba = Fsys/(2 ^ PBA_div) */
+//#define CONFIG_SYSCLK_PBB_DIV 0 /* Fpbb = Fsys/(2 ^ PBB_div) */
+//#define CONFIG_SYSCLK_PBC_DIV 0 /* Fpbc = Fsys/(2 ^ PBC_div) */
+
+// ===== Peripheral Clock Management Options
+//#define CONFIG_SYSCLK_INIT_CPUMASK ((1 << SYSCLK_SYSTIMER) | (1 << SYSCLK_OCD))
+//#define CONFIG_SYSCLK_INIT_PBAMASK (1 << SYSCLK_USART0)
+//#define CONFIG_SYSCLK_INIT_PBBMASK (1 << SYSCLK_HMATRIX)
+//#define CONFIG_SYSCLK_INIT_HSBMASK (1 << SYSCLK_MDMA_HSB)
+
+// ===== USB Clock Source Options
+//#define CONFIG_USBCLK_SOURCE USBCLK_SRC_OSC0
+//#define CONFIG_USBCLK_SOURCE USBCLK_SRC_OSC1
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL0
+//#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL1
+#define CONFIG_USBCLK_DIV 1 /* Fusb = Fsys/(2 ^ USB_div) */
+
+#endif /* CONF_CLOCK_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3c0512_uc3c_ek/conf_sd_mmc_spi.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3c0512_uc3c_ek/conf_sd_mmc_spi.h
new file mode 100644
index 0000000..9a2ae9c
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3c0512_uc3c_ek/conf_sd_mmc_spi.h
@@ -0,0 +1,71 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief SD/MMC configuration file.
+ *
+ * This file contains the possible external configuration of the SD/MMC.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with an SPI module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_SD_MMC_SPI_H_
+#define _CONF_SD_MMC_SPI_H_
+
+
+#include "conf_access.h"
+
+#if SD_MMC_SPI_MEM == DISABLE
+#error conf_sd_mmc_spi.h is #included although SD_MMC_SPI_MEM is disabled
+#endif
+
+
+#include "sd_mmc_spi.h"
+
+
+//_____ D E F I N I T I O N S ______________________________________________
+
+//! SPI master speed in Hz.
+#define SD_MMC_SPI_MASTER_SPEED 20000000
+
+//! Number of bits in each SPI transfer.
+#define SD_MMC_SPI_BITS 8
+
+
+#endif // _CONF_SD_MMC_SPI_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3c0512_uc3c_ek/conf_sleepmgr.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3c0512_uc3c_ek/conf_sleepmgr.h
new file mode 100644
index 0000000..699010d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3c0512_uc3c_ek/conf_sleepmgr.h
@@ -0,0 +1,43 @@
+/**
+ * \file
+ *
+ * \brief Sleep manager configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SLEEPMGR_H
+#define CONF_SLEEPMGR_H
+
+#define CONFIG_SLEEPMGR_ENABLE
+
+#endif /* CONF_SLEEPMGR_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3c0512_uc3c_ek/conf_spi_master.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3c0512_uc3c_ek/conf_spi_master.h
new file mode 100644
index 0000000..7d17e60
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3c0512_uc3c_ek/conf_spi_master.h
@@ -0,0 +1,58 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Spi Master configuration for spi example
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SPI_MASTER_H_INCLUDED
+#define CONF_SPI_MASTER_H_INCLUDED
+
+/* Possibility to change low-level configurations here */
+
+//! Default Config Spi Master Delay BCS
+// #define CONFIG_SPI_MASTER_DELAY_BCS 0
+
+//! Default Config Spi Master Bits per Transfer Definition
+// #define CONFIG_SPI_MASTER_BITS_PER_TRANSFER 8
+
+//! Default Config Spi Master Delay BCT
+// #define CONFIG_SPI_MASTER_DELAY_BCT 0
+
+//! Default Config Spi Master Delay BS
+// #define CONFIG_SPI_MASTER_DELAY_BS 0
+
+//! Default Config Spi Master Dummy Field
+// #define CONFIG_SPI_MASTER_DUMMY 0xFF
+
+#endif /* CONF_SPI_MASTER_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3c0512_uc3c_ek/conf_virtual_mem.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3c0512_uc3c_ek/conf_virtual_mem.h
new file mode 100644
index 0000000..984bc17
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3c0512_uc3c_ek/conf_virtual_mem.h
@@ -0,0 +1,54 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Virtual memory configuration file.
+ *
+ * This file contains the possible external configuration of the AT45DBX.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with an SPI module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_VIRTUAL_MEM_H_
+#define _CONF_VIRTUAL_MEM_H_
+
+//! Size of Virtual Memory on internal RAM (unit 512B)
+#define VMEM_NB_SECTOR 64 // 32KB
+
+#endif // _CONF_VIRTUAL_MEM_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3c0512_uc3c_ek/ui.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3c0512_uc3c_ek/ui.c
new file mode 100644
index 0000000..b4e2743
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/at32uc3c0512_uc3c_ek/ui.c
@@ -0,0 +1,104 @@
+/**
+ * \file
+ *
+ * \brief User Interface
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "udi_msc.h"
+#include "board.h"
+#include "gpio.h"
+#include "ui.h"
+
+void ui_init(void)
+{
+ LED_On(LED0);
+ LED_Off(LED1);
+}
+
+void ui_powerdown(void)
+{
+ LED_Off(LED0);
+ LED_Off(LED1);
+}
+
+void ui_wakeup(void)
+{
+ LED_On(LED0);
+}
+
+void ui_start_read(void)
+{
+ LED_On(LED2);
+}
+
+void ui_stop_read(void)
+{
+ LED_Off(LED2);
+}
+
+void ui_start_write(void)
+{
+ LED_On(LED3);
+}
+
+void ui_stop_write(void)
+{
+ LED_Off(LED3);
+}
+
+
+void ui_process(uint16_t framenumber)
+{
+ if ((framenumber % 1000) == 0) {
+ LED_On(LED1);
+ }
+ if ((framenumber % 1000) == 500) {
+ LED_Off(LED1);
+ }
+}
+
+
+/**
+ * \defgroup UI User Iinterface
+ *
+ * Human interface on UC3C_EVK :
+ * - Led 0 is on when USB line is in IDLE mode, and off in SUSPEND mode
+ * - Led 1 blinks when USB Host have checked and enabled MSC interface
+ * - Led 2 is on during read operation
+ * - Led 3 is on during write operation
+ *
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1_stk600-rc100x/conf_access.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1_stk600-rc100x/conf_access.h
new file mode 100644
index 0000000..ae9bb6c
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1_stk600-rc100x/conf_access.h
@@ -0,0 +1,186 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Memory access control configuration file.
+ *
+ * This file contains the possible external configuration of the memory access
+ * control.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_ACCESS_H_
+#define _CONF_ACCESS_H_
+
+#include "compiler.h"
+#include "board.h"
+
+
+/*! \name Activation of Logical Unit Numbers
+ */
+//! @{
+#define LUN_0 DISABLE //!< On-Chip Virtual Memory.
+#define LUN_1 ENABLE //!< AT45DBX Data Flash.
+#define LUN_2 DISABLE //!< SD/MMC Card over SPI.
+#define LUN_3 DISABLE //!< SD/MMC Card over MCI Slot 0.
+#define LUN_4 DISABLE
+#define LUN_5 DISABLE
+#define LUN_6 DISABLE
+#define LUN_7 DISABLE
+#define LUN_USB DISABLE //!< Host Mass-Storage Memory.
+//! @}
+
+/*! \name LUN 0 Definitions
+ */
+//! @{
+#define VIRTUAL_MEM LUN_0
+#define LUN_ID_VIRTUAL_MEM LUN_ID_0
+#define LUN_0_INCLUDE "virtual_mem.h"
+#define Lun_0_test_unit_ready virtual_test_unit_ready
+#define Lun_0_read_capacity virtual_read_capacity
+#define Lun_0_wr_protect virtual_wr_protect
+#define Lun_0_removal virtual_removal
+#define Lun_0_usb_read_10 virtual_usb_read_10
+#define Lun_0_usb_write_10 virtual_usb_write_10
+#define Lun_0_mem_2_ram virtual_mem_2_ram
+#define Lun_0_ram_2_mem virtual_ram_2_mem
+#define LUN_0_NAME "\"On-Chip Virtual Memory\""
+//! @}
+
+/*! \name LUN 1 Definitions
+ */
+//! @{
+#define AT45DBX_MEM LUN_1
+#define LUN_ID_AT45DBX_MEM LUN_ID_1
+#define LUN_1_INCLUDE "at45dbx_mem.h"
+#define Lun_1_test_unit_ready at45dbx_test_unit_ready
+#define Lun_1_read_capacity at45dbx_read_capacity
+#define Lun_1_wr_protect at45dbx_wr_protect
+#define Lun_1_removal at45dbx_removal
+#define Lun_1_usb_read_10 at45dbx_usb_read_10
+#define Lun_1_usb_write_10 at45dbx_usb_write_10
+#define Lun_1_mem_2_ram at45dbx_df_2_ram
+#define Lun_1_ram_2_mem at45dbx_ram_2_df
+#define LUN_1_NAME "\"AT45DBX Data Flash\""
+//! @}
+
+/*! \name LUN 2 Definitions
+ */
+//! @{
+#define SD_MMC_SPI_MEM LUN_2
+#define LUN_ID_SD_MMC_SPI_MEM LUN_ID_2
+#define LUN_2_INCLUDE "sd_mmc_spi_mem.h"
+#define Lun_2_test_unit_ready sd_mmc_spi_test_unit_ready
+#define Lun_2_read_capacity sd_mmc_spi_read_capacity
+#define Lun_2_wr_protect sd_mmc_spi_wr_protect
+#define Lun_2_removal sd_mmc_spi_removal
+#define Lun_2_usb_read_10 sd_mmc_spi_usb_read_10
+#define Lun_2_usb_write_10 sd_mmc_spi_usb_write_10
+#define Lun_2_mem_2_ram sd_mmc_spi_mem_2_ram
+#define Lun_2_ram_2_mem sd_mmc_spi_ram_2_mem
+#define LUN_2_NAME "\"SD/MMC Card over SPI\""
+//! @}
+
+/*! \name LUN 3 Definitions
+ */
+//! @{
+#define SD_MMC_MCI_0_MEM LUN_3
+#define LUN_ID_SD_MMC_MCI_0_MEM LUN_ID_3
+#define LUN_3_INCLUDE "sd_mmc_mci_mem.h"
+#define Lun_3_test_unit_ready sd_mmc_mci_test_unit_ready_0
+#define Lun_3_read_capacity sd_mmc_mci_read_capacity_0
+#define Lun_3_wr_protect sd_mmc_mci_wr_protect_0
+#define Lun_3_removal sd_mmc_mci_removal_0
+#define Lun_3_usb_read_10 sd_mmc_mci_usb_read_10_0
+#define Lun_3_usb_write_10 sd_mmc_mci_usb_write_10_0
+#define Lun_3_mem_2_ram sd_mmc_mci_mem_2_ram_0
+#define Lun_3_ram_2_mem sd_mmc_mci_ram_2_mem_0
+#define LUN_3_NAME "\"SD/MMC Card over MCI Slot 0\""
+//! @}
+
+/*! \name USB LUNs Definitions
+ */
+//! @{
+#define MEM_USB LUN_USB
+#define LUN_ID_MEM_USB LUN_ID_USB
+#define LUN_USB_INCLUDE "host_mem.h"
+#define Lun_usb_test_unit_ready(lun) host_test_unit_ready(lun)
+#define Lun_usb_read_capacity(lun, nb_sect) host_read_capacity(lun, nb_sect)
+#define Lun_usb_read_sector_size(lun) host_read_sector_size(lun)
+#define Lun_usb_wr_protect(lun) host_wr_protect(lun)
+#define Lun_usb_removal() host_removal()
+#define Lun_usb_mem_2_ram(addr, ram) host_read_10_ram(addr, ram)
+#define Lun_usb_ram_2_mem(addr, ram) host_write_10_ram(addr, ram)
+#define LUN_USB_NAME "\"Host Mass-Storage Memory\""
+//! @}
+
+/*! \name Actions Associated with Memory Accesses
+ *
+ * Write here the action to associate with each memory access.
+ *
+ * \warning Be careful not to waste time in order not to disturb the functions.
+ */
+//! @{
+#define memory_start_read_action(nb_sectors) ui_start_read()
+#define memory_stop_read_action() ui_stop_read()
+#define memory_start_write_action(nb_sectors) ui_start_write()
+#define memory_stop_write_action() ui_stop_write()
+#include "ui.h"
+//! @}
+
+/*! \name Activation of Interface Features
+ */
+//! @{
+#define ACCESS_USB ENABLED //!< MEM <-> USB interface.
+#define ACCESS_MEM_TO_RAM DISABLED //!< MEM <-> RAM interface.
+#define ACCESS_STREAM DISABLED //!< Streaming MEM <-> MEM interface.
+#define ACCESS_STREAM_RECORD DISABLED //!< Streaming MEM <-> MEM interface in record mode.
+#define ACCESS_MEM_TO_MEM DISABLED //!< MEM <-> MEM interface.
+#define ACCESS_CODEC DISABLED //!< Codec interface.
+//! @}
+
+/*! \name Specific Options for Access Control
+ */
+//! @{
+#define GLOBAL_WR_PROTECT DISABLED //!< Management of a global write protection.
+//! @}
+
+
+#endif // _CONF_ACCESS_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1_stk600-rc100x/conf_at45dbx.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1_stk600-rc100x/conf_at45dbx.h
new file mode 100644
index 0000000..35ae2a6
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1_stk600-rc100x/conf_at45dbx.h
@@ -0,0 +1,78 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief AT45DBX configuration file.
+ *
+ * This file contains the possible external configuration of the AT45DBX.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with an SPI module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_AT45DBX_H_
+#define _CONF_AT45DBX_H_
+
+#include "board.h"
+
+//_____ D E F I N I T I O N S ______________________________________________
+
+//! Connect AT45DBx driver to spi master service
+#define AT45DBX_USES_SPI_MASTER_SERVICE
+
+//! Size of AT45DBX data flash memories to manage.
+#define AT45DBX_MEM_SIZE AT45DBX_500KB
+
+//! Number of AT45DBX components to manage.
+#define AT45DBX_MEM_CNT 1
+
+//! Select the SPI module AT45DBX is conntected to
+#define AT45DBX_SPI_MODULE AT45DBX_SPI
+
+//! First chip select used by AT45DBX components on the SPI module instance.
+//! AT45DBX_SPI_NPCS0_PIN always corresponds to this first NPCS, whatever it is.
+#define AT45DBX_SPI_FIRST_NPCS AT45DBX_SPI_NPCS
+
+//! SPI master speed in Hz.
+#define AT45DBX_SPI_MASTER_SPEED 12000000
+
+//! Number of bits in each SPI transfer.
+#define AT45DBX_SPI_BITS 8
+
+
+#endif // _CONF_AT45DBX_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1_stk600-rc100x/conf_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1_stk600-rc100x/conf_board.h
new file mode 100644
index 0000000..2d2aa79
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1_stk600-rc100x/conf_board.h
@@ -0,0 +1,44 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Board configuration for spi example
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H_INCLUDED
+#define CONF_BOARD_H_INCLUDED
+
+// Enable AT45DBX Component.
+#define CONF_BOARD_AT45DBX
+
+#endif /* CONF_BOARD_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1_stk600-rc100x/conf_clock.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1_stk600-rc100x/conf_clock.h
new file mode 100644
index 0000000..844c93d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1_stk600-rc100x/conf_clock.h
@@ -0,0 +1,74 @@
+/**
+ * \file
+ *
+ * \brief Clock system configuration for clock example 1
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_CLOCK_H_INCLUDED
+#define CONF_CLOCK_H_INCLUDED
+
+//! Configuration using On-Chip RC oscillator at 48MHz
+//! The RC oscillator is calibrated via USB Start Of Frame
+//! Clk USB = 48MHz (used by USB)
+//! Clk sys = 48MHz
+//! Clk cpu/per = 12MHz
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_RCOSC
+#define CONFIG_OSC_RC32_CAL 48000000UL
+
+#define CONFIG_OSC_AUTOCAL OSC_ID_RC32MHZ
+#define CONFIG_OSC_AUTOCAL_REF_OSC OSC_ID_USBSOF
+
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_RC32MHZ
+#define CONFIG_SYSCLK_PSADIV SYSCLK_PSADIV_2
+#define CONFIG_SYSCLK_PSBCDIV SYSCLK_PSBCDIV_1_2
+
+/*
+//! Use external board OSC (8MHz)
+//! Clk pll = 48MHz (used by USB)
+//! Clk sys = 48MHz
+//! Clk cpu/per = 12MHz
+
+#define CONFIG_PLL0_SOURCE PLL_SRC_XOSC
+#define CONFIG_PLL0_MUL 6
+#define CONFIG_PLL0_DIV 1
+
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL
+
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL
+#define CONFIG_SYSCLK_PSADIV SYSCLK_PSADIV_2
+#define CONFIG_SYSCLK_PSBCDIV SYSCLK_PSBCDIV_1_2
+*/
+
+
+#endif /* CONF_CLOCK_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1_stk600-rc100x/conf_sleepmgr.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1_stk600-rc100x/conf_sleepmgr.h
new file mode 100644
index 0000000..699010d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1_stk600-rc100x/conf_sleepmgr.h
@@ -0,0 +1,43 @@
+/**
+ * \file
+ *
+ * \brief Sleep manager configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SLEEPMGR_H
+#define CONF_SLEEPMGR_H
+
+#define CONFIG_SLEEPMGR_ENABLE
+
+#endif /* CONF_SLEEPMGR_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1_stk600-rc100x/conf_spi_master.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1_stk600-rc100x/conf_spi_master.h
new file mode 100644
index 0000000..ed506f8
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1_stk600-rc100x/conf_spi_master.h
@@ -0,0 +1,41 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Spi Master configuration for spi example
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SPI_MASTER_H_INCLUDED
+#define CONF_SPI_MASTER_H_INCLUDED
+
+#endif /* CONF_SPI_MASTER_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1_stk600-rc100x/conf_virtual_mem.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1_stk600-rc100x/conf_virtual_mem.h
new file mode 100644
index 0000000..a9faf2e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1_stk600-rc100x/conf_virtual_mem.h
@@ -0,0 +1,54 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Virtual memory configuration file.
+ *
+ * This file contains the possible external configuration of the AT45DBX.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with an SPI module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_VIRTUAL_MEM_H_
+#define _CONF_VIRTUAL_MEM_H_
+
+//! Size of Virtual Memory on internal RAM (unit 512B)
+#define VMEM_NB_SECTOR 8 // 4KB
+
+#endif // _CONF_VIRTUAL_MEM_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1_stk600-rc100x/ui.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1_stk600-rc100x/ui.c
new file mode 100644
index 0000000..a4c4b98
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1_stk600-rc100x/ui.c
@@ -0,0 +1,104 @@
+/**
+ * \file
+ *
+ * \brief User Interface
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "udi_msc.h"
+#include "board.h"
+#include "led.h"
+#include "ui.h"
+
+void ui_init(void)
+{
+ LED_On(LED0_GPIO);
+ LED_Off(LED1_GPIO);
+}
+
+void ui_powerdown(void)
+{
+ LED_Off(LED0_GPIO);
+ LED_Off(LED1_GPIO);
+}
+
+void ui_wakeup(void)
+{
+ LED_On(LED0_GPIO);
+}
+
+void ui_start_read(void)
+{
+ LED_On(LED2_GPIO);
+}
+
+void ui_stop_read(void)
+{
+ LED_Off(LED2_GPIO);
+}
+
+void ui_start_write(void)
+{
+ LED_On(LED3_GPIO);
+}
+
+void ui_stop_write(void)
+{
+ LED_Off(LED3_GPIO);
+}
+
+void ui_process(uint16_t framenumber)
+{
+ if ((framenumber % 1000) == 0) {
+ LED_On(LED1_GPIO);
+ }
+ if ((framenumber % 1000) == 500) {
+ LED_Off(LED1_GPIO);
+ }
+}
+
+
+/**
+ * \defgroup UI User Iinterface
+ *
+ * Human interface on STK600:
+ * - RED led close to USB connector is always on after firmware startup
+ * - Led 0 is on when USB line is in IDLE mode, and off in SUSPEND mode
+ * - Led 1 blinks when USB Host have checked and enabled MSC interface
+ * - Led 2 is on during read operation
+ * - Led 3 is on during write operation
+ *
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1u_xplain_a1_mkii/conf_access.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1u_xplain_a1_mkii/conf_access.h
new file mode 100644
index 0000000..ae9bb6c
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1u_xplain_a1_mkii/conf_access.h
@@ -0,0 +1,186 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Memory access control configuration file.
+ *
+ * This file contains the possible external configuration of the memory access
+ * control.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_ACCESS_H_
+#define _CONF_ACCESS_H_
+
+#include "compiler.h"
+#include "board.h"
+
+
+/*! \name Activation of Logical Unit Numbers
+ */
+//! @{
+#define LUN_0 DISABLE //!< On-Chip Virtual Memory.
+#define LUN_1 ENABLE //!< AT45DBX Data Flash.
+#define LUN_2 DISABLE //!< SD/MMC Card over SPI.
+#define LUN_3 DISABLE //!< SD/MMC Card over MCI Slot 0.
+#define LUN_4 DISABLE
+#define LUN_5 DISABLE
+#define LUN_6 DISABLE
+#define LUN_7 DISABLE
+#define LUN_USB DISABLE //!< Host Mass-Storage Memory.
+//! @}
+
+/*! \name LUN 0 Definitions
+ */
+//! @{
+#define VIRTUAL_MEM LUN_0
+#define LUN_ID_VIRTUAL_MEM LUN_ID_0
+#define LUN_0_INCLUDE "virtual_mem.h"
+#define Lun_0_test_unit_ready virtual_test_unit_ready
+#define Lun_0_read_capacity virtual_read_capacity
+#define Lun_0_wr_protect virtual_wr_protect
+#define Lun_0_removal virtual_removal
+#define Lun_0_usb_read_10 virtual_usb_read_10
+#define Lun_0_usb_write_10 virtual_usb_write_10
+#define Lun_0_mem_2_ram virtual_mem_2_ram
+#define Lun_0_ram_2_mem virtual_ram_2_mem
+#define LUN_0_NAME "\"On-Chip Virtual Memory\""
+//! @}
+
+/*! \name LUN 1 Definitions
+ */
+//! @{
+#define AT45DBX_MEM LUN_1
+#define LUN_ID_AT45DBX_MEM LUN_ID_1
+#define LUN_1_INCLUDE "at45dbx_mem.h"
+#define Lun_1_test_unit_ready at45dbx_test_unit_ready
+#define Lun_1_read_capacity at45dbx_read_capacity
+#define Lun_1_wr_protect at45dbx_wr_protect
+#define Lun_1_removal at45dbx_removal
+#define Lun_1_usb_read_10 at45dbx_usb_read_10
+#define Lun_1_usb_write_10 at45dbx_usb_write_10
+#define Lun_1_mem_2_ram at45dbx_df_2_ram
+#define Lun_1_ram_2_mem at45dbx_ram_2_df
+#define LUN_1_NAME "\"AT45DBX Data Flash\""
+//! @}
+
+/*! \name LUN 2 Definitions
+ */
+//! @{
+#define SD_MMC_SPI_MEM LUN_2
+#define LUN_ID_SD_MMC_SPI_MEM LUN_ID_2
+#define LUN_2_INCLUDE "sd_mmc_spi_mem.h"
+#define Lun_2_test_unit_ready sd_mmc_spi_test_unit_ready
+#define Lun_2_read_capacity sd_mmc_spi_read_capacity
+#define Lun_2_wr_protect sd_mmc_spi_wr_protect
+#define Lun_2_removal sd_mmc_spi_removal
+#define Lun_2_usb_read_10 sd_mmc_spi_usb_read_10
+#define Lun_2_usb_write_10 sd_mmc_spi_usb_write_10
+#define Lun_2_mem_2_ram sd_mmc_spi_mem_2_ram
+#define Lun_2_ram_2_mem sd_mmc_spi_ram_2_mem
+#define LUN_2_NAME "\"SD/MMC Card over SPI\""
+//! @}
+
+/*! \name LUN 3 Definitions
+ */
+//! @{
+#define SD_MMC_MCI_0_MEM LUN_3
+#define LUN_ID_SD_MMC_MCI_0_MEM LUN_ID_3
+#define LUN_3_INCLUDE "sd_mmc_mci_mem.h"
+#define Lun_3_test_unit_ready sd_mmc_mci_test_unit_ready_0
+#define Lun_3_read_capacity sd_mmc_mci_read_capacity_0
+#define Lun_3_wr_protect sd_mmc_mci_wr_protect_0
+#define Lun_3_removal sd_mmc_mci_removal_0
+#define Lun_3_usb_read_10 sd_mmc_mci_usb_read_10_0
+#define Lun_3_usb_write_10 sd_mmc_mci_usb_write_10_0
+#define Lun_3_mem_2_ram sd_mmc_mci_mem_2_ram_0
+#define Lun_3_ram_2_mem sd_mmc_mci_ram_2_mem_0
+#define LUN_3_NAME "\"SD/MMC Card over MCI Slot 0\""
+//! @}
+
+/*! \name USB LUNs Definitions
+ */
+//! @{
+#define MEM_USB LUN_USB
+#define LUN_ID_MEM_USB LUN_ID_USB
+#define LUN_USB_INCLUDE "host_mem.h"
+#define Lun_usb_test_unit_ready(lun) host_test_unit_ready(lun)
+#define Lun_usb_read_capacity(lun, nb_sect) host_read_capacity(lun, nb_sect)
+#define Lun_usb_read_sector_size(lun) host_read_sector_size(lun)
+#define Lun_usb_wr_protect(lun) host_wr_protect(lun)
+#define Lun_usb_removal() host_removal()
+#define Lun_usb_mem_2_ram(addr, ram) host_read_10_ram(addr, ram)
+#define Lun_usb_ram_2_mem(addr, ram) host_write_10_ram(addr, ram)
+#define LUN_USB_NAME "\"Host Mass-Storage Memory\""
+//! @}
+
+/*! \name Actions Associated with Memory Accesses
+ *
+ * Write here the action to associate with each memory access.
+ *
+ * \warning Be careful not to waste time in order not to disturb the functions.
+ */
+//! @{
+#define memory_start_read_action(nb_sectors) ui_start_read()
+#define memory_stop_read_action() ui_stop_read()
+#define memory_start_write_action(nb_sectors) ui_start_write()
+#define memory_stop_write_action() ui_stop_write()
+#include "ui.h"
+//! @}
+
+/*! \name Activation of Interface Features
+ */
+//! @{
+#define ACCESS_USB ENABLED //!< MEM <-> USB interface.
+#define ACCESS_MEM_TO_RAM DISABLED //!< MEM <-> RAM interface.
+#define ACCESS_STREAM DISABLED //!< Streaming MEM <-> MEM interface.
+#define ACCESS_STREAM_RECORD DISABLED //!< Streaming MEM <-> MEM interface in record mode.
+#define ACCESS_MEM_TO_MEM DISABLED //!< MEM <-> MEM interface.
+#define ACCESS_CODEC DISABLED //!< Codec interface.
+//! @}
+
+/*! \name Specific Options for Access Control
+ */
+//! @{
+#define GLOBAL_WR_PROTECT DISABLED //!< Management of a global write protection.
+//! @}
+
+
+#endif // _CONF_ACCESS_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1u_xplain_a1_mkii/conf_at45dbx.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1u_xplain_a1_mkii/conf_at45dbx.h
new file mode 100644
index 0000000..84fcfb5
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1u_xplain_a1_mkii/conf_at45dbx.h
@@ -0,0 +1,78 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief AT45DBX configuration file.
+ *
+ * This file contains the possible external configuration of the AT45DBX.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with an SPI module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_AT45DBX_H_
+#define _CONF_AT45DBX_H_
+
+#include "board.h"
+
+//_____ D E F I N I T I O N S ______________________________________________
+
+//! Connect AT45DBx driver to spi master service
+#define AT45DBX_USES_USART_SPI_SERVICE
+
+//! Size of AT45DBX data flash memories to manage.
+#define AT45DBX_MEM_SIZE AT45DBX_8MB
+
+//! Number of AT45DBX components to manage.
+#define AT45DBX_MEM_CNT 1
+
+//! Select the SPI module AT45DBX is conntected to
+#define AT45DBX_SPI_MODULE AT45DBX_SPI
+
+//! First chip select used by AT45DBX components on the SPI module instance.
+//! AT45DBX_SPI_NPCS0_PIN always corresponds to this first NPCS, whatever it is.
+#define AT45DBX_SPI_FIRST_NPCS AT45DBX_SPI_NPCS
+
+//! SPI master speed in Hz.
+#define AT45DBX_SPI_MASTER_SPEED 12000000
+
+//! Number of bits in each SPI transfer.
+#define AT45DBX_SPI_BITS 8
+
+
+#endif // _CONF_AT45DBX_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1u_xplain_a1_mkii/conf_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1u_xplain_a1_mkii/conf_board.h
new file mode 100644
index 0000000..2d2aa79
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1u_xplain_a1_mkii/conf_board.h
@@ -0,0 +1,44 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Board configuration for spi example
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H_INCLUDED
+#define CONF_BOARD_H_INCLUDED
+
+// Enable AT45DBX Component.
+#define CONF_BOARD_AT45DBX
+
+#endif /* CONF_BOARD_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1u_xplain_a1_mkii/conf_clock.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1u_xplain_a1_mkii/conf_clock.h
new file mode 100644
index 0000000..1f92af9
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1u_xplain_a1_mkii/conf_clock.h
@@ -0,0 +1,74 @@
+/**
+ * \file
+ *
+ * \brief Clock system configuration for clock example 1
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_CLOCK_H_INCLUDED
+#define CONF_CLOCK_H_INCLUDED
+
+//! Configuration using On-Chip RC oscillator at 48MHz
+//! The RC oscillator is calibrated via USB Start Of Frame
+//! Clk USB = 48MHz (used by USB)
+//! Clk sys = 48MHz
+//! Clk cpu/per = 24MHz
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_RCOSC
+#define CONFIG_OSC_RC32_CAL 48000000UL
+
+#define CONFIG_OSC_AUTOCAL OSC_ID_RC32MHZ
+#define CONFIG_OSC_AUTOCAL_REF_OSC OSC_ID_USBSOF
+
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_RC32MHZ
+#define CONFIG_SYSCLK_PSADIV SYSCLK_PSADIV_2
+#define CONFIG_SYSCLK_PSBCDIV SYSCLK_PSBCDIV_1_1
+
+/*
+//! Use external board OSC (8MHz)
+//! Clk pll = 48MHz (used by USB)
+//! Clk sys = 48MHz
+//! Clk cpu/per = 24MHz
+
+#define CONFIG_PLL0_SOURCE PLL_SRC_XOSC
+#define CONFIG_PLL0_MUL 6
+#define CONFIG_PLL0_DIV 1
+
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL
+
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL
+#define CONFIG_SYSCLK_PSADIV SYSCLK_PSADIV_2
+#define CONFIG_SYSCLK_PSBCDIV SYSCLK_PSBCDIV_1_1
+*/
+
+
+#endif /* CONF_CLOCK_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1u_xplain_a1_mkii/conf_sd_mmc_spi.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1u_xplain_a1_mkii/conf_sd_mmc_spi.h
new file mode 100644
index 0000000..9a2ae9c
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1u_xplain_a1_mkii/conf_sd_mmc_spi.h
@@ -0,0 +1,71 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief SD/MMC configuration file.
+ *
+ * This file contains the possible external configuration of the SD/MMC.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with an SPI module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_SD_MMC_SPI_H_
+#define _CONF_SD_MMC_SPI_H_
+
+
+#include "conf_access.h"
+
+#if SD_MMC_SPI_MEM == DISABLE
+#error conf_sd_mmc_spi.h is #included although SD_MMC_SPI_MEM is disabled
+#endif
+
+
+#include "sd_mmc_spi.h"
+
+
+//_____ D E F I N I T I O N S ______________________________________________
+
+//! SPI master speed in Hz.
+#define SD_MMC_SPI_MASTER_SPEED 20000000
+
+//! Number of bits in each SPI transfer.
+#define SD_MMC_SPI_BITS 8
+
+
+#endif // _CONF_SD_MMC_SPI_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1u_xplain_a1_mkii/conf_sleepmgr.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1u_xplain_a1_mkii/conf_sleepmgr.h
new file mode 100644
index 0000000..699010d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1u_xplain_a1_mkii/conf_sleepmgr.h
@@ -0,0 +1,43 @@
+/**
+ * \file
+ *
+ * \brief Sleep manager configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SLEEPMGR_H
+#define CONF_SLEEPMGR_H
+
+#define CONFIG_SLEEPMGR_ENABLE
+
+#endif /* CONF_SLEEPMGR_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1u_xplain_a1_mkii/conf_spi_master.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1u_xplain_a1_mkii/conf_spi_master.h
new file mode 100644
index 0000000..ed506f8
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1u_xplain_a1_mkii/conf_spi_master.h
@@ -0,0 +1,41 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Spi Master configuration for spi example
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SPI_MASTER_H_INCLUDED
+#define CONF_SPI_MASTER_H_INCLUDED
+
+#endif /* CONF_SPI_MASTER_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1u_xplain_a1_mkii/conf_usart_spi.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1u_xplain_a1_mkii/conf_usart_spi.h
new file mode 100644
index 0000000..56fa5de
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1u_xplain_a1_mkii/conf_usart_spi.h
@@ -0,0 +1,41 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Spi Master configuration for spi example
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_USART_SPI_H_INCLUDED
+#define CONF_USART_SPI_H_INCLUDED
+
+#endif /* CONF_SPI_MASTER_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1u_xplain_a1_mkii/conf_virtual_mem.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1u_xplain_a1_mkii/conf_virtual_mem.h
new file mode 100644
index 0000000..a9faf2e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1u_xplain_a1_mkii/conf_virtual_mem.h
@@ -0,0 +1,54 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Virtual memory configuration file.
+ *
+ * This file contains the possible external configuration of the AT45DBX.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with an SPI module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_VIRTUAL_MEM_H_
+#define _CONF_VIRTUAL_MEM_H_
+
+//! Size of Virtual Memory on internal RAM (unit 512B)
+#define VMEM_NB_SECTOR 8 // 4KB
+
+#endif // _CONF_VIRTUAL_MEM_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1u_xplain_a1_mkii/ui.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1u_xplain_a1_mkii/ui.c
new file mode 100644
index 0000000..a2d6835
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega128a1u_xplain_a1_mkii/ui.c
@@ -0,0 +1,105 @@
+/**
+ * \file
+ *
+ * \brief User Interface
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "udi_msc.h"
+#include "board.h"
+#include "led.h"
+#include "ui.h"
+
+void ui_init(void)
+{
+ LED_On(LEDUSB_GPIO);
+ LED_On(LED0_GPIO);
+ LED_Off(LED1_GPIO);
+}
+
+void ui_powerdown(void)
+{
+ LED_Off(LED0_GPIO);
+ LED_Off(LED1_GPIO);
+}
+
+void ui_wakeup(void)
+{
+ LED_On(LED0_GPIO);
+}
+
+void ui_start_read(void)
+{
+ LED_On(LED2_GPIO);
+}
+
+void ui_stop_read(void)
+{
+ LED_Off(LED2_GPIO);
+}
+
+void ui_start_write(void)
+{
+ LED_On(LED3_GPIO);
+}
+
+void ui_stop_write(void)
+{
+ LED_Off(LED3_GPIO);
+}
+
+void ui_process(uint16_t framenumber)
+{
+ if ((framenumber % 1000) == 0) {
+ LED_On(LED1_GPIO);
+ }
+ if ((framenumber % 1000) == 500) {
+ LED_Off(LED1_GPIO);
+ }
+}
+
+
+/**
+ * \defgroup UI User Iinterface
+ *
+ * Human interface on Xplain-A1:
+ * - RED led close to USB connector is always on after firmware startup
+ * - Led 0 is on when USB line is in IDLE mode, and off in SUSPEND mode
+ * - Led 1 blinks when USB Host have checked and enabled MSC interface
+ * - Led 2 is on during read operation
+ * - Led 3 is on during write operation
+ *
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega256a3bu_stk600-rc064x/conf_access.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega256a3bu_stk600-rc064x/conf_access.h
new file mode 100644
index 0000000..ae9bb6c
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega256a3bu_stk600-rc064x/conf_access.h
@@ -0,0 +1,186 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Memory access control configuration file.
+ *
+ * This file contains the possible external configuration of the memory access
+ * control.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_ACCESS_H_
+#define _CONF_ACCESS_H_
+
+#include "compiler.h"
+#include "board.h"
+
+
+/*! \name Activation of Logical Unit Numbers
+ */
+//! @{
+#define LUN_0 DISABLE //!< On-Chip Virtual Memory.
+#define LUN_1 ENABLE //!< AT45DBX Data Flash.
+#define LUN_2 DISABLE //!< SD/MMC Card over SPI.
+#define LUN_3 DISABLE //!< SD/MMC Card over MCI Slot 0.
+#define LUN_4 DISABLE
+#define LUN_5 DISABLE
+#define LUN_6 DISABLE
+#define LUN_7 DISABLE
+#define LUN_USB DISABLE //!< Host Mass-Storage Memory.
+//! @}
+
+/*! \name LUN 0 Definitions
+ */
+//! @{
+#define VIRTUAL_MEM LUN_0
+#define LUN_ID_VIRTUAL_MEM LUN_ID_0
+#define LUN_0_INCLUDE "virtual_mem.h"
+#define Lun_0_test_unit_ready virtual_test_unit_ready
+#define Lun_0_read_capacity virtual_read_capacity
+#define Lun_0_wr_protect virtual_wr_protect
+#define Lun_0_removal virtual_removal
+#define Lun_0_usb_read_10 virtual_usb_read_10
+#define Lun_0_usb_write_10 virtual_usb_write_10
+#define Lun_0_mem_2_ram virtual_mem_2_ram
+#define Lun_0_ram_2_mem virtual_ram_2_mem
+#define LUN_0_NAME "\"On-Chip Virtual Memory\""
+//! @}
+
+/*! \name LUN 1 Definitions
+ */
+//! @{
+#define AT45DBX_MEM LUN_1
+#define LUN_ID_AT45DBX_MEM LUN_ID_1
+#define LUN_1_INCLUDE "at45dbx_mem.h"
+#define Lun_1_test_unit_ready at45dbx_test_unit_ready
+#define Lun_1_read_capacity at45dbx_read_capacity
+#define Lun_1_wr_protect at45dbx_wr_protect
+#define Lun_1_removal at45dbx_removal
+#define Lun_1_usb_read_10 at45dbx_usb_read_10
+#define Lun_1_usb_write_10 at45dbx_usb_write_10
+#define Lun_1_mem_2_ram at45dbx_df_2_ram
+#define Lun_1_ram_2_mem at45dbx_ram_2_df
+#define LUN_1_NAME "\"AT45DBX Data Flash\""
+//! @}
+
+/*! \name LUN 2 Definitions
+ */
+//! @{
+#define SD_MMC_SPI_MEM LUN_2
+#define LUN_ID_SD_MMC_SPI_MEM LUN_ID_2
+#define LUN_2_INCLUDE "sd_mmc_spi_mem.h"
+#define Lun_2_test_unit_ready sd_mmc_spi_test_unit_ready
+#define Lun_2_read_capacity sd_mmc_spi_read_capacity
+#define Lun_2_wr_protect sd_mmc_spi_wr_protect
+#define Lun_2_removal sd_mmc_spi_removal
+#define Lun_2_usb_read_10 sd_mmc_spi_usb_read_10
+#define Lun_2_usb_write_10 sd_mmc_spi_usb_write_10
+#define Lun_2_mem_2_ram sd_mmc_spi_mem_2_ram
+#define Lun_2_ram_2_mem sd_mmc_spi_ram_2_mem
+#define LUN_2_NAME "\"SD/MMC Card over SPI\""
+//! @}
+
+/*! \name LUN 3 Definitions
+ */
+//! @{
+#define SD_MMC_MCI_0_MEM LUN_3
+#define LUN_ID_SD_MMC_MCI_0_MEM LUN_ID_3
+#define LUN_3_INCLUDE "sd_mmc_mci_mem.h"
+#define Lun_3_test_unit_ready sd_mmc_mci_test_unit_ready_0
+#define Lun_3_read_capacity sd_mmc_mci_read_capacity_0
+#define Lun_3_wr_protect sd_mmc_mci_wr_protect_0
+#define Lun_3_removal sd_mmc_mci_removal_0
+#define Lun_3_usb_read_10 sd_mmc_mci_usb_read_10_0
+#define Lun_3_usb_write_10 sd_mmc_mci_usb_write_10_0
+#define Lun_3_mem_2_ram sd_mmc_mci_mem_2_ram_0
+#define Lun_3_ram_2_mem sd_mmc_mci_ram_2_mem_0
+#define LUN_3_NAME "\"SD/MMC Card over MCI Slot 0\""
+//! @}
+
+/*! \name USB LUNs Definitions
+ */
+//! @{
+#define MEM_USB LUN_USB
+#define LUN_ID_MEM_USB LUN_ID_USB
+#define LUN_USB_INCLUDE "host_mem.h"
+#define Lun_usb_test_unit_ready(lun) host_test_unit_ready(lun)
+#define Lun_usb_read_capacity(lun, nb_sect) host_read_capacity(lun, nb_sect)
+#define Lun_usb_read_sector_size(lun) host_read_sector_size(lun)
+#define Lun_usb_wr_protect(lun) host_wr_protect(lun)
+#define Lun_usb_removal() host_removal()
+#define Lun_usb_mem_2_ram(addr, ram) host_read_10_ram(addr, ram)
+#define Lun_usb_ram_2_mem(addr, ram) host_write_10_ram(addr, ram)
+#define LUN_USB_NAME "\"Host Mass-Storage Memory\""
+//! @}
+
+/*! \name Actions Associated with Memory Accesses
+ *
+ * Write here the action to associate with each memory access.
+ *
+ * \warning Be careful not to waste time in order not to disturb the functions.
+ */
+//! @{
+#define memory_start_read_action(nb_sectors) ui_start_read()
+#define memory_stop_read_action() ui_stop_read()
+#define memory_start_write_action(nb_sectors) ui_start_write()
+#define memory_stop_write_action() ui_stop_write()
+#include "ui.h"
+//! @}
+
+/*! \name Activation of Interface Features
+ */
+//! @{
+#define ACCESS_USB ENABLED //!< MEM <-> USB interface.
+#define ACCESS_MEM_TO_RAM DISABLED //!< MEM <-> RAM interface.
+#define ACCESS_STREAM DISABLED //!< Streaming MEM <-> MEM interface.
+#define ACCESS_STREAM_RECORD DISABLED //!< Streaming MEM <-> MEM interface in record mode.
+#define ACCESS_MEM_TO_MEM DISABLED //!< MEM <-> MEM interface.
+#define ACCESS_CODEC DISABLED //!< Codec interface.
+//! @}
+
+/*! \name Specific Options for Access Control
+ */
+//! @{
+#define GLOBAL_WR_PROTECT DISABLED //!< Management of a global write protection.
+//! @}
+
+
+#endif // _CONF_ACCESS_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega256a3bu_stk600-rc064x/conf_at45dbx.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega256a3bu_stk600-rc064x/conf_at45dbx.h
new file mode 100644
index 0000000..35ae2a6
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega256a3bu_stk600-rc064x/conf_at45dbx.h
@@ -0,0 +1,78 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief AT45DBX configuration file.
+ *
+ * This file contains the possible external configuration of the AT45DBX.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with an SPI module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_AT45DBX_H_
+#define _CONF_AT45DBX_H_
+
+#include "board.h"
+
+//_____ D E F I N I T I O N S ______________________________________________
+
+//! Connect AT45DBx driver to spi master service
+#define AT45DBX_USES_SPI_MASTER_SERVICE
+
+//! Size of AT45DBX data flash memories to manage.
+#define AT45DBX_MEM_SIZE AT45DBX_500KB
+
+//! Number of AT45DBX components to manage.
+#define AT45DBX_MEM_CNT 1
+
+//! Select the SPI module AT45DBX is conntected to
+#define AT45DBX_SPI_MODULE AT45DBX_SPI
+
+//! First chip select used by AT45DBX components on the SPI module instance.
+//! AT45DBX_SPI_NPCS0_PIN always corresponds to this first NPCS, whatever it is.
+#define AT45DBX_SPI_FIRST_NPCS AT45DBX_SPI_NPCS
+
+//! SPI master speed in Hz.
+#define AT45DBX_SPI_MASTER_SPEED 12000000
+
+//! Number of bits in each SPI transfer.
+#define AT45DBX_SPI_BITS 8
+
+
+#endif // _CONF_AT45DBX_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega256a3bu_stk600-rc064x/conf_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega256a3bu_stk600-rc064x/conf_board.h
new file mode 100644
index 0000000..2d2aa79
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega256a3bu_stk600-rc064x/conf_board.h
@@ -0,0 +1,44 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Board configuration for spi example
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H_INCLUDED
+#define CONF_BOARD_H_INCLUDED
+
+// Enable AT45DBX Component.
+#define CONF_BOARD_AT45DBX
+
+#endif /* CONF_BOARD_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega256a3bu_stk600-rc064x/conf_clock.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega256a3bu_stk600-rc064x/conf_clock.h
new file mode 100644
index 0000000..0475dbb
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega256a3bu_stk600-rc064x/conf_clock.h
@@ -0,0 +1,68 @@
+/**
+ * \file
+ *
+ * \brief Clock system configuration for clock example 1
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_CLOCK_H_INCLUDED
+#define CONF_CLOCK_H_INCLUDED
+
+
+// Use internal 32MRC @48MHz
+// Clk cpu/per = 12MHz
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_RCOSC
+#define CONFIG_OSC_RC32_CAL 48000000UL
+
+#define CONFIG_SYSCLK_SOURCE CLK_SCLKSEL_RC32M_gc
+#define CONFIG_SYSCLK_PSADIV SYSCLK_PSADIV_2
+#define CONFIG_SYSCLK_PSBCDIV SYSCLK_PSBCDIV_1_2
+
+#define CONFIG_OSC_AUTOCAL OSC_ID_RC32MHZ
+#define CONFIG_OSC_AUTOCAL_REF_OSC OSC_ID_USBSOF
+
+/*
+// Use external 8MHz clock and PLL
+// Clk cpu/per = 12MHz
+#define CONFIG_PLL0_SOURCE PLL_SRC_XOSC
+#define CONFIG_PLL0_MUL 6
+#define CONFIG_PLL0_DIV 1
+
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL
+
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL
+#define CONFIG_SYSCLK_PSADIV SYSCLK_PSADIV_2
+#define CONFIG_SYSCLK_PSBCDIV SYSCLK_PSBCDIV_1_2
+*/
+
+#endif /* CONF_CLOCK_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega256a3bu_stk600-rc064x/conf_sleepmgr.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega256a3bu_stk600-rc064x/conf_sleepmgr.h
new file mode 100644
index 0000000..699010d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega256a3bu_stk600-rc064x/conf_sleepmgr.h
@@ -0,0 +1,43 @@
+/**
+ * \file
+ *
+ * \brief Sleep manager configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SLEEPMGR_H
+#define CONF_SLEEPMGR_H
+
+#define CONFIG_SLEEPMGR_ENABLE
+
+#endif /* CONF_SLEEPMGR_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega256a3bu_stk600-rc064x/conf_spi_master.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega256a3bu_stk600-rc064x/conf_spi_master.h
new file mode 100644
index 0000000..ed506f8
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega256a3bu_stk600-rc064x/conf_spi_master.h
@@ -0,0 +1,41 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Spi Master configuration for spi example
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SPI_MASTER_H_INCLUDED
+#define CONF_SPI_MASTER_H_INCLUDED
+
+#endif /* CONF_SPI_MASTER_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega256a3bu_stk600-rc064x/conf_virtual_mem.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega256a3bu_stk600-rc064x/conf_virtual_mem.h
new file mode 100644
index 0000000..a9faf2e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega256a3bu_stk600-rc064x/conf_virtual_mem.h
@@ -0,0 +1,54 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Virtual memory configuration file.
+ *
+ * This file contains the possible external configuration of the AT45DBX.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with an SPI module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_VIRTUAL_MEM_H_
+#define _CONF_VIRTUAL_MEM_H_
+
+//! Size of Virtual Memory on internal RAM (unit 512B)
+#define VMEM_NB_SECTOR 8 // 4KB
+
+#endif // _CONF_VIRTUAL_MEM_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega256a3bu_stk600-rc064x/ui.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega256a3bu_stk600-rc064x/ui.c
new file mode 100644
index 0000000..a4c4b98
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/atxmega256a3bu_stk600-rc064x/ui.c
@@ -0,0 +1,104 @@
+/**
+ * \file
+ *
+ * \brief User Interface
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "udi_msc.h"
+#include "board.h"
+#include "led.h"
+#include "ui.h"
+
+void ui_init(void)
+{
+ LED_On(LED0_GPIO);
+ LED_Off(LED1_GPIO);
+}
+
+void ui_powerdown(void)
+{
+ LED_Off(LED0_GPIO);
+ LED_Off(LED1_GPIO);
+}
+
+void ui_wakeup(void)
+{
+ LED_On(LED0_GPIO);
+}
+
+void ui_start_read(void)
+{
+ LED_On(LED2_GPIO);
+}
+
+void ui_stop_read(void)
+{
+ LED_Off(LED2_GPIO);
+}
+
+void ui_start_write(void)
+{
+ LED_On(LED3_GPIO);
+}
+
+void ui_stop_write(void)
+{
+ LED_Off(LED3_GPIO);
+}
+
+void ui_process(uint16_t framenumber)
+{
+ if ((framenumber % 1000) == 0) {
+ LED_On(LED1_GPIO);
+ }
+ if ((framenumber % 1000) == 500) {
+ LED_Off(LED1_GPIO);
+ }
+}
+
+
+/**
+ * \defgroup UI User Iinterface
+ *
+ * Human interface on STK600:
+ * - RED led close to USB connector is always on after firmware startup
+ * - Led 0 is on when USB line is in IDLE mode, and off in SUSPEND mode
+ * - Led 1 blinks when USB Host have checked and enabled MSC interface
+ * - Led 2 is on during read operation
+ * - Led 3 is on during write operation
+ *
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/conf_usb.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/conf_usb.h
new file mode 100644
index 0000000..08d16b5
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/conf_usb.h
@@ -0,0 +1,132 @@
+/**
+ * \file
+ *
+ * \brief USB configuration file
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _CONF_USB_H_
+#define _CONF_USB_H_
+
+#include "compiler.h"
+
+
+/**
+ * USB Device Configuration
+ * @{
+ */
+
+//! Device definition (mandatory)
+#define USB_DEVICE_VENDOR_ID USB_VID_ATMEL
+#define USB_DEVICE_PRODUCT_ID USB_PID_ATMEL_AVR_MSC
+#define USB_DEVICE_MAJOR_VERSION 1
+#define USB_DEVICE_MINOR_VERSION 0
+#define USB_DEVICE_POWER 100 // Consumption on Vbus line (mA)
+#define USB_DEVICE_ATTR \
+ (USB_CONFIG_ATTR_SELF_POWERED)
+// (USB_CONFIG_ATTR_BUS_POWERED)
+// (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_SELF_POWERED)
+// (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_BUS_POWERED)
+
+//! USB Device string definitions (Optional)
+#define USB_DEVICE_MANUFACTURE_NAME "ATMEL AVR"
+#define USB_DEVICE_PRODUCT_NAME "MSC"
+#define USB_DEVICE_SERIAL_NAME "123123123123" // Disk SN for MSC
+
+/**
+ * Device speeds support
+ * Low speed not supported by MSC
+ * @{
+ */
+//! To authorize the High speed
+#if (UC3A3||UC3A4)
+ #define USB_DEVICE_HS_SUPPORT
+#endif
+//@}
+
+
+/**
+ * USB Device Callbacks definitions (Optional)
+ * @{
+ */
+#define UDC_VBUS_EVENT(b_vbus_high) main_vbus_action(b_vbus_high)
+#define UDC_SOF_EVENT() main_sof_action()
+#define UDC_SUSPEND_EVENT() main_suspend_action()
+#define UDC_RESUME_EVENT() main_resume_action()
+//! Mandatory when USB_DEVICE_ATTR authorizes remote wakeup feature
+// #define UDC_REMOTEWAKEUP_ENABLE() user_callback_remotewakeup_enable()
+// #define UDC_REMOTEWAKEUP_DISABLE() user_callback_remotewakeup_disable()
+//! When a extra string descriptor must be supported
+//! other than manufacturer, product and serial string
+// #define UDC_GET_EXTRA_STRING()
+//@}
+
+//@}
+
+
+/**
+ * USB Interface Configuration
+ * @{
+ */
+
+/**
+ * Configuration of MSC interface
+ * @{
+ */
+
+//! Vendor name and Product version of MSC interface
+#define UDI_MSC_GLOBAL_VENDOR_ID \
+ 'A', 'T', 'M', 'E', 'L', ' ', ' ', ' '
+#define UDI_MSC_GLOBAL_PRODUCT_VERSION \
+ '1', '.', '0', '0'
+
+//! Interface callback definition
+#define UDI_MSC_ENABLE_EXT() main_msc_enable()
+#define UDI_MSC_DISABLE_EXT() main_msc_disable()
+//@}
+
+//@}
+
+
+/**
+ * USB Device Driver Configuration
+ * @{
+ */
+//@}
+
+//! The includes of classes and other headers must be done at the end of this file to avoid compile error
+#include "udi_msc_conf.h"
+#include "main.h"
+
+#endif // _CONF_USB_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/main.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/main.c
new file mode 100644
index 0000000..b0ec723
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/main.c
@@ -0,0 +1,254 @@
+/**
+ * \file
+ *
+ * \brief Main functions for MSC example
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "preprocessor.h"
+#include "board.h"
+#include "gpio.h"
+#include "sysclk.h"
+#include "sleepmgr.h"
+#include "conf_usb.h"
+#include "udd.h"
+#include "udc.h"
+#include "udi_msc.h"
+#include "ui.h"
+#include "conf_access.h"
+#include "at45dbx.h"
+
+static bool main_b_msc_enable = false;
+
+
+#if UC3A3
+//! \brief Init HMatrix
+static void init_hmatrix(void);
+#endif
+#if ((defined SD_MMC_MCI_0_MEM) && (SD_MMC_MCI_0_MEM == ENABLE)) \
+ || ((defined SD_MMC_MCI_1_MEM) && (SD_MMC_MCI_1_MEM == ENABLE))
+//! \brief Initializes SD/MMC resources: GPIO, MCI and SD/MMC.
+static void sd_mmc_mci_resources_init(void);
+#endif
+
+/*! \brief Main function. Execution starts here.
+ */
+int main(void)
+{
+ irq_initialize_vectors();
+ cpu_irq_enable();
+
+ // Initialize the sleep manager
+ sleepmgr_init();
+
+ sysclk_init();
+ board_init();
+ ui_init();
+ ui_powerdown();
+
+#if UC3A3
+ // Init Hmatrix bus
+ sysclk_enable_pbb_module(SYSCLK_HMATRIX);
+ init_hmatrix();
+#endif
+#if (defined AT45DBX_MEM) && (AT45DBX_MEM == ENABLE)
+ at45dbx_init();
+#endif
+#if ((defined SD_MMC_MCI_0_MEM) && (SD_MMC_MCI_0_MEM == ENABLE)) \
+ || ((defined SD_MMC_MCI_1_MEM) && (SD_MMC_MCI_1_MEM == ENABLE))
+ // Initialize SD/MMC with MCI PB clock.
+ sysclk_enable_pbb_module(SYSCLK_MCI);
+ sysclk_enable_hsb_module(SYSCLK_DMACA);
+ sd_mmc_mci_resources_init();
+#endif
+
+ // Start USB stack to authorize VBus monitoring
+ udc_start();
+
+ if (!udc_include_vbus_monitoring()) {
+ // VBUS monitoring is not available on this product
+ // thereby VBUS has to be considered as present
+ main_vbus_action(true);
+ }
+
+ // The main loop manages only the power mode
+ // because the USB management is done by interrupt
+ while (true) {
+
+ sleepmgr_enter_sleep();
+ if (main_b_msc_enable) {
+ udi_msc_process_trans();
+ }
+ }
+}
+
+void main_vbus_action(bool b_high)
+{
+ if (b_high) {
+ // Attach USB Device
+ udc_attach();
+ } else {
+ // VBUS not present
+ udc_detach();
+ }
+}
+
+void main_suspend_action(void)
+{
+ ui_powerdown();
+}
+
+void main_resume_action(void)
+{
+ ui_wakeup();
+}
+
+void main_sof_action(void)
+{
+ if (!main_b_msc_enable)
+ return;
+ ui_process(udd_get_frame_number());
+}
+
+bool main_msc_enable(void)
+{
+ main_b_msc_enable = true;
+ return true;
+}
+
+void main_msc_disable(void)
+{
+ main_b_msc_enable = false;
+}
+
+
+#if UC3A3
+/*! \name Hmatrix bus configuration
+ */
+static void init_hmatrix(void)
+{
+ union {
+ unsigned long scfg;
+ avr32_hmatrix_scfg_t SCFG;
+ } u_avr32_hmatrix_scfg;
+
+ // For the internal-flash HMATRIX slave, use last master as default.
+ u_avr32_hmatrix_scfg.scfg =
+ AVR32_HMATRIX.scfg[AVR32_HMATRIX_SLAVE_FLASH];
+ u_avr32_hmatrix_scfg.SCFG.defmstr_type =
+ AVR32_HMATRIX_DEFMSTR_TYPE_LAST_DEFAULT;
+ AVR32_HMATRIX.scfg[AVR32_HMATRIX_SLAVE_FLASH] =
+ u_avr32_hmatrix_scfg.scfg;
+}
+#endif
+
+
+#if ((defined SD_MMC_MCI_0_MEM) && (SD_MMC_MCI_0_MEM == ENABLE)) \
+ || ((defined SD_MMC_MCI_1_MEM) && (SD_MMC_MCI_1_MEM == ENABLE))
+#include "conf_sd_mmc_mci.h"
+#include "mci.h"
+
+/*! \brief Initializes SD/MMC resources: GPIO, MCI and SD/MMC.
+ */
+static void sd_mmc_mci_resources_init(void)
+{
+ static const gpio_map_t SD_MMC_MCI_GPIO_MAP = {
+ {SD_SLOT_8BITS_CLK_PIN, SD_SLOT_8BITS_CLK_FUNCTION}, // SD CLK.
+ {SD_SLOT_8BITS_CMD_PIN, SD_SLOT_8BITS_CMD_FUNCTION}, // SD CMD.
+ {SD_SLOT_8BITS_DATA0_PIN, SD_SLOT_8BITS_DATA0_FUNCTION}, // SD DAT[0].
+ {SD_SLOT_8BITS_DATA1_PIN, SD_SLOT_8BITS_DATA1_FUNCTION}, // DATA Pin.
+ {SD_SLOT_8BITS_DATA2_PIN, SD_SLOT_8BITS_DATA2_FUNCTION}, // DATA Pin.
+ {SD_SLOT_8BITS_DATA3_PIN, SD_SLOT_8BITS_DATA3_FUNCTION}, // DATA Pin.
+ {SD_SLOT_8BITS_DATA4_PIN, SD_SLOT_8BITS_DATA4_FUNCTION}, // DATA Pin.
+ {SD_SLOT_8BITS_DATA5_PIN, SD_SLOT_8BITS_DATA5_FUNCTION}, // DATA Pin.
+ {SD_SLOT_8BITS_DATA6_PIN, SD_SLOT_8BITS_DATA6_FUNCTION}, // DATA Pin.
+ {SD_SLOT_8BITS_DATA7_PIN, SD_SLOT_8BITS_DATA7_FUNCTION} // DATA Pin.
+ };
+
+ // Assign I/Os to MCI.
+ gpio_enable_module(SD_MMC_MCI_GPIO_MAP,
+ sizeof(SD_MMC_MCI_GPIO_MAP) /
+ sizeof(SD_MMC_MCI_GPIO_MAP[0]));
+
+ // Enable pull-up for Card Detect.
+ gpio_enable_pin_pull_up(SD_SLOT_8BITS_CARD_DETECT);
+
+ // Enable pull-up for Write Protect.
+ gpio_enable_pin_pull_up(SD_SLOT_8BITS_WRITE_PROTECT);
+
+ sd_mmc_mci_init(SD_SLOT_8BITS, sysclk_get_pbb_hz(), sysclk_get_cpu_hz());
+}
+#endif // SD_MMC_MCI_0_MEM == ENABLE || SD_MMC_MCI_1_MEM == ENABLE
+
+/**
+ * \mainpage ASF USB Device MSC
+ *
+ * \section intro Introduction
+ * This example shows how to implement a USB Device Mass Storage
+ * on AVR products with USB module.
+ *
+ * \section startup Startup
+ * The example uses all memories available on the board and connects these to
+ * USB Device Mass Storage stack. After loading firmware, connect hardware board
+ * (EVKxx,XPlain,...) to the USB Host. When connected to a USB host system
+ * this application allows to display all available memories as a
+ * removable disks in the Unix/Mac/Windows operating systems.
+ * \note
+ * This example uses the native MSC driver on Unix/Mac/Windows OS, except for Win98.
+ *
+ * \copydoc UI
+ *
+ * \section example About example
+ *
+ * The example uses the following module groups:
+ * - Basic modules:
+ * Startup, board, clock, interrupt, power management
+ * - USB Device stack and MSC modules:
+ * <br>services/usb/
+ * <br>services/usb/udc/
+ * <br>services/usb/class/msc/
+ * - Specific implementation:
+ * - main.c,
+ * <br>initializes clock
+ * <br>initializes interrupt
+ * <br>\subpage power_management
+ * <br>manages UI
+ * - specific implementation for each target "./examples/product_board/":
+ * - conf_foo.h configuration of each module
+ * - ui.c implement of user's interface (leds)
+ *
+ * <SUP>1</SUP> The memory data transfers are done outside USB interrupt routine.
+ * This is done in the MSC process ("udi_msc_process_trans()") called by main loop.
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/main.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/main.h
new file mode 100644
index 0000000..1d33902
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/main.h
@@ -0,0 +1,78 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief Declaration of main function used by MSC example
+ *
+ * - Compiler: IAR EWAVR and GNU GCC for AVR
+ * - Supported devices: All AVR devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _MAIN_H_
+#define _MAIN_H_
+
+/*! \brief Called by MSC interface
+ * Callback running when USB Host enable MSC interface
+ *
+ * \retval true if MSC startup is ok
+ */
+bool main_msc_enable(void);
+
+/*! \brief Called by MSC interface
+ * Callback running when USB Host disable MSC interface
+ */
+void main_msc_disable(void);
+
+/*! \brief Called when Vbus line state change
+ */
+void main_vbus_action(bool b_high);
+
+/*! \brief Called when a start of frame is received on USB line
+ */
+void main_sof_action(void);
+
+/*! \brief Called by UDD when a suspend is received
+ * Callback running when USB Host set USB line in suspend state
+ */
+void main_suspend_action(void);
+
+/*! \brief Called by UDD when the USB line exit of suspend state
+ */
+void main_resume_action(void);
+
+#endif // _MAIN_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/ui.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/ui.h
new file mode 100644
index 0000000..27d8ef8
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/example/ui.h
@@ -0,0 +1,58 @@
+/**
+ * \file
+ *
+ * \brief Common User Interface for MSC application
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _UI_H_
+#define _UI_H_
+
+void ui_init(void);
+void ui_powerdown(void);
+void ui_wakeup(void);
+
+void ui_start_read(void);
+void ui_stop_read(void);
+void ui_start_write(void);
+void ui_stop_write(void);
+
+//! This process is called called each 1ms
+//! It is called only if MSC interface is enable.
+//! It is called by SOF interrupt.
+//!
+//!
+void ui_process(uint16_t framenumber);
+
+#endif // _UI_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/module_config/conf_usb.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/module_config/conf_usb.h
new file mode 100644
index 0000000..bf0a9fc
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/module_config/conf_usb.h
@@ -0,0 +1,132 @@
+/**
+ * \file
+ *
+ * \brief USB configuration file
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _CONF_USB_H_
+#define _CONF_USB_H_
+
+#include "compiler.h"
+
+#warning You must refill the following definitions with a correct values
+
+/**
+ * USB Device Configuration
+ * @{
+ */
+
+//! Device definition (mandatory)
+#define USB_DEVICE_VENDOR_ID 0x0000
+#define USB_DEVICE_PRODUCT_ID 0x0000
+#define USB_DEVICE_MAJOR_VERSION 1
+#define USB_DEVICE_MINOR_VERSION 0
+#define USB_DEVICE_POWER 100 // Consumption on Vbus line (mA)
+#define USB_DEVICE_ATTR \
+ (USB_CONFIG_ATTR_SELF_POWERED)
+// (USB_CONFIG_ATTR_BUS_POWERED)
+// (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_SELF_POWERED)
+// (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_BUS_POWERED)
+
+//! USB Device string definitions (Optional)
+// #define USB_DEVICE_MANUFACTURE_NAME "Manufacture name"
+// #define USB_DEVICE_PRODUCT_NAME "Product name"
+#define USB_DEVICE_SERIAL_NAME "12...EF" // Disk SN for MSC
+
+/**
+ * Device speeds support
+ * Low speed not supported by MSC
+ * @{
+ */
+//! To authorize the High speed
+#if (UC3A3||UC3A4)
+//#define USB_DEVICE_HS_SUPPORT
+#endif
+//@}
+
+
+/**
+ * USB Device Callbacks definitions (Optional)
+ * @{
+ */
+// #define UDC_VBUS_EVENT(b_vbus_high) user_callback_vbus_action(b_vbus_high)
+// #define UDC_SOF_EVENT() user_callback_sof_action()
+// #define UDC_SUSPEND_EVENT() user_callback_suspend_action()
+// #define UDC_RESUME_EVENT() user_callback_resume_action()
+//! Mandatory when USB_DEVICE_ATTR authorizes remote wakeup feature
+// #define UDC_REMOTEWAKEUP_ENABLE() user_callback_remotewakeup_enable()
+// #define UDC_REMOTEWAKEUP_DISABLE() user_callback_remotewakeup_disable()
+//! When a extra string descriptor must be supported
+//! other than manufacturer, product and serial string
+// #define UDC_GET_EXTRA_STRING()
+//@}
+
+//@}
+
+
+/**
+ * USB Interface Configuration
+ * @{
+ */
+
+/**
+ * Configuration of MSC interface
+ * @{
+ */
+
+//! Vendor name and Product version of MSC interface
+#define UDI_MSC_GLOBAL_VENDOR_ID \
+ 'A', 'T', 'M', 'E', 'L', ' ', ' ', ' '
+#define UDI_MSC_GLOBAL_PRODUCT_VERSION \
+ '1', '.', '0', '0'
+
+//! Interface callback definition
+#define UDI_MSC_ENABLE_EXT() true
+#define UDI_MSC_DISABLE_EXT()
+//@}
+
+//@}
+
+
+/**
+ * USB Device Driver Configuration
+ * @{
+ */
+//@}
+
+//! The includes of classes and other headers must be done at the end of this file to avoid compile error
+#include "udi_msc_conf.h"
+
+#endif // _CONF_USB_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/udi_msc.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/udi_msc.c
new file mode 100644
index 0000000..ac98f35
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/udi_msc.c
@@ -0,0 +1,1074 @@
+/**
+ * \file
+ *
+ * \brief USB Device Mass Storage Class (MSC) interface.
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "conf_usb.h"
+#include "usb_protocol.h"
+#include "usb_protocol_msc.h"
+#include "spc_protocol.h"
+#include "sbc_protocol.h"
+#include "udd.h"
+#include "udc.h"
+#include "udi_msc.h"
+#include "ctrl_access.h"
+#include <string.h>
+
+
+/**
+ * \addtogroup udi_msc_group
+ * @{
+ */
+
+/**
+ * \name Interface for UDC
+ */
+//@{
+
+bool udi_msc_enable(void);
+void udi_msc_disable(void);
+bool udi_msc_setup(void);
+uint8_t udi_msc_getsetting(void);
+
+//! Global struture which contains standard UDI API for UDC
+UDC_DESC_STORAGE udi_api_t udi_api_msc = {
+ .enable = udi_msc_enable,
+ .disable = udi_msc_disable,
+ .setup = udi_msc_setup,
+ .getsetting = udi_msc_getsetting,
+};
+
+//@}
+
+//! Static block size for all memories
+#define UDI_MSC_BLOCK_SIZE 512L
+
+
+/**
+ * \name Variables to manage SCSI requests
+ */
+//@{
+
+//! Structure to receive a CBW packet
+UDC_BSS(4) static struct usb_msc_cbw udi_msc_cbw;
+//! Structure to send a CSW packet
+UDC_DATA(4) static struct usb_msc_csw udi_msc_csw =
+ {.dCSWSignature = CPU_TO_BE32(USB_CSW_SIGNATURE) };
+//! Number of lun
+UDC_DATA(4) static uint8_t udi_msc_nb_lun = 0;
+//! Structure with current SCSI sense data
+UDC_BSS(4) static uint8_t udi_msc_sense[18];
+
+/**
+ * \name Variables to manage the background read/write SCSI commands
+ */
+//@{
+//! True if an invalid CBW command has been detected
+static bool udi_msc_b_cbw_invalid = false;
+//! True if a transfer command must be processed
+static bool udi_msc_b_trans_req = false;
+//! True if it is a read command, else write command
+static bool udi_msc_b_read;
+//! Memory address to execute the command
+static uint32_t udi_msc_addr;
+//! Number of block to transfer
+static uint16_t udi_msc_nb_block;
+//! Signal end of transfer, if true
+volatile bool udi_msc_b_ack_trans = true;
+//! Status of transfer, aborted if true
+volatile bool udi_msc_b_abort_trans;
+//@}
+
+//@}
+
+
+/**
+ * \name Internal routines
+ */
+//@{
+
+/**
+ * \name Routines to process CBW packet
+ */
+//@{
+
+/**
+ * \brief Stall CBW request
+ */
+static void udi_msc_cbw_invalid(void);
+
+/**
+ * \brief Stall CSW request
+ */
+static void udi_msc_csw_invalid(void);
+
+/**
+ * \brief Links a callback and buffer on endpoint OUT reception
+ *
+ * Called by:
+ * - enable interface
+ * - at the end of previous command after sending the CSW
+ */
+static void udi_msc_cbw_wait(void);
+
+/**
+ * \brief Callback called after CBW reception
+ * Called by UDD when a transfer is finished or aborted
+ *
+ * \param status UDD_EP_TRANSFER_OK, if transfer is finished
+ * \param status UDD_EP_TRANSFER_ABORT, if transfer is aborted
+ * \param nb_received number of data transfered
+ */
+void udi_msc_cbw_received(udd_ep_status_t status, iram_size_t nb_received);
+
+/**
+ * \brief Function to check the CBW length and direction
+ * Call it after SCSI command decode to check integrity of command
+ *
+ * \param alloc_len number of bytes that device want tranfer
+ * \param dir_flag Direction of transfer (USB_CBW_DIRECTION_IN/OUT)
+ *
+ * \retval true if the command can be processed
+ */
+static bool udi_msc_cbw_validate(uint32_t alloc_len, uint8_t dir_flag);
+//@}
+
+
+/**
+ * \name Routines to process small data packet
+ */
+//@{
+
+/**
+ * \brief Sends data on MSC IN endpoint
+ * Called by SCSI command which must send a data to host followed by a CSW
+ *
+ * \param buffer Internal RAM buffer to send
+ * \param buf_size Size of buffer to send
+ */
+static void udi_msc_data_send(uint8_t * buffer, uint8_t buf_size);
+
+/**
+ * \brief Callback called after data sent
+ * It start CSW packet process
+ *
+ * \param status UDD_EP_TRANSFER_OK, if transfer finish
+ * \param status UDD_EP_TRANSFER_ABORT, if transfer aborted
+ * \param nb_sent number of data transfered
+ */
+void udi_msc_data_sent(udd_ep_status_t status, iram_size_t nb_sent);
+//@}
+
+
+/**
+ * \name Routines to process CSW packet
+ */
+//@{
+
+/**
+ * \brief Build CSW packet and send it
+ *
+ * Called at the end of SCSI command
+ */
+static void udi_msc_csw_process(void);
+
+/**
+ * \brief Sends CSW
+ *
+ * Called by #udi_msc_csw_process()
+ * or UDD callback when endpoint halt is cleared
+ */
+void udi_msc_csw_send(void);
+
+/**
+ * \brief Callback called after CSW sent
+ * It restart CBW reception.
+ *
+ * \param status UDD_EP_TRANSFER_OK, if transfer is finished
+ * \param status UDD_EP_TRANSFER_ABORT, if transfer is aborted
+ * \param nb_sent number of data transfered
+ */
+void udi_msc_csw_sent(udd_ep_status_t status, iram_size_t nb_sent);
+//@}
+
+
+/**
+ * \name Routines manage sense data
+ */
+//@{
+
+/**
+ * \brief Reinitialize sense data.
+ */
+static void udi_msc_clear_sense(void);
+
+/**
+ * \brief Update sense data with new value to signal a fail
+ *
+ * \param sense_key Sense key
+ * \param add_sense Additional Sense Code
+ * \param lba LBA corresponding at error
+ */
+static void udi_msc_sense_fail(uint8_t sense_key, uint16_t add_sense,
+ uint32_t lba);
+
+/**
+ * \brief Update sense data with new value to signal success
+ */
+static void udi_msc_sense_pass(void);
+
+/**
+ * \brief Update sense data to signal that memory is not present
+ */
+static void udi_msc_sense_fail_not_present(void);
+
+/**
+ * \brief Update sense data to signal that memory is busy
+ */
+static void udi_msc_sense_fail_busy_or_change(void);
+
+/**
+ * \brief Update sense data to signal a hardware error on memory
+ */
+static void udi_msc_sense_fail_hardware(void);
+
+/**
+ * \brief Update sense data to signal that memory is protected
+ */
+static void udi_msc_sense_fail_protected(void);
+
+/**
+ * \brief Update sense data to signal that CDB fields are not valid
+ */
+static void udi_msc_sense_fail_cdb_invalid(void);
+
+/**
+ * \brief Update sense data to signal that command is not supported
+ */
+static void udi_msc_sense_command_invalid(void);
+//@}
+
+
+/**
+ * \name Routines manage SCSI Commands
+ */
+//@{
+
+/**
+ * \brief Process SPC Request Sense command
+ * Returns error information about last command
+ */
+static void udi_msc_spc_requestsense(void);
+
+/**
+ * \brief Process SPC Inquiry command
+ * Returns information (name,version) about disk
+ */
+static void udi_msc_spc_inquiry(void);
+
+/**
+ * \brief Checks state of disk
+ *
+ * \retval true if disk is ready, otherwise false and updates sense data
+ */
+static bool udi_msc_spc_testunitready_global(void);
+
+/**
+ * \brief Process test unit ready command
+ * Returns state of logical unit
+ */
+static void udi_msc_spc_testunitready(void);
+
+/**
+ * \brief Process mode sense command
+ *
+ * \param b_sense10 Sense10 SCSI command, if true
+ * \param b_sense10 Sense6 SCSI command, if false
+ */
+static void udi_msc_spc_mode_sense(bool b_sense10);
+
+/**
+ * \brief Process read capacity command
+ */
+static void udi_msc_sbc_read_capacity(void);
+
+/**
+ * \brief Process read10 or write10 command
+ *
+ * \param b_read Read transfer, if true,
+ * \param b_read Write transfer, if false
+ */
+static void udi_msc_sbc_trans(bool b_read);
+//@}
+
+//@}
+
+
+bool udi_msc_enable(void)
+{
+ udi_msc_b_trans_req = false;
+ udi_msc_b_cbw_invalid = false;
+ udi_msc_nb_lun = get_nb_lun();
+ if (0 == udi_msc_nb_lun)
+ return false; // No lun available, then not authorize to enable interface
+ udi_msc_nb_lun--;
+ // Call application callback
+ // to initialize memories or signal that interface is enabled
+ if (!UDI_MSC_ENABLE_EXT())
+ return false;
+ // Start MSC process by CBW reception
+ udi_msc_cbw_wait();
+ return true;
+}
+
+
+void udi_msc_disable(void)
+{
+ udi_msc_b_trans_req = false;
+ UDI_MSC_DISABLE_EXT();
+}
+
+
+bool udi_msc_setup(void)
+{
+ if (Udd_setup_is_in()) {
+ // Requests Interface GET
+ if (Udd_setup_type() == USB_REQ_TYPE_CLASS) {
+ // Requests Class Interface Get
+ switch (udd_g_ctrlreq.req.bRequest) {
+ case USB_REQ_MSC_GET_MAX_LUN:
+ // Give the number of memories available
+ if (1 != udd_g_ctrlreq.req.wLength)
+ return false; // Error for USB host
+ if (0 != udd_g_ctrlreq.req.wValue)
+ return false;
+ udd_g_ctrlreq.payload = &udi_msc_nb_lun;
+ udd_g_ctrlreq.payload_size = 1;
+ return true;
+ }
+ }
+ }
+ if (Udd_setup_is_out()) {
+ // Requests Interface SET
+ if (Udd_setup_type() == USB_REQ_TYPE_CLASS) {
+ // Requests Class Interface Set
+ switch (udd_g_ctrlreq.req.bRequest) {
+ case USB_REQ_MSC_BULK_RESET:
+ // Reset MSC interface
+ if (0 != udd_g_ctrlreq.req.wLength)
+ return false;
+ if (0 != udd_g_ctrlreq.req.wValue)
+ return false;
+ udi_msc_b_cbw_invalid = false;
+ udi_msc_b_trans_req = false;
+ // Abort all tasks (transfer or clear stall wait) on endpoints
+ udd_ep_abort(UDI_MSC_EP_OUT);
+ udd_ep_abort(UDI_MSC_EP_IN);
+ // Restart by CBW wait
+ udi_msc_cbw_wait();
+ return true;
+ }
+ }
+ }
+ return false; // Not supported request
+}
+
+uint8_t udi_msc_getsetting(void)
+{
+ return 0; // MSC don't have multiple alternate setting
+}
+
+
+//---------------------------------------------
+//------- Routines to process CBW packet
+
+static void udi_msc_cbw_invalid(void)
+{
+ if (!udi_msc_b_cbw_invalid)
+ return; // Don't restall endpoint if error reseted by setup
+ udd_ep_set_halt(UDI_MSC_EP_OUT);
+ // If stall cleared then restall it. Only Setup MSC Reset can clear it
+ udd_ep_wait_stall_clear(UDI_MSC_EP_OUT, udi_msc_cbw_invalid);
+}
+
+static void udi_msc_csw_invalid(void)
+{
+ if (!udi_msc_b_cbw_invalid)
+ return; // Don't restall endpoint if error reseted by setup
+ udd_ep_set_halt(UDI_MSC_EP_IN);
+ // If stall cleared then restall it. Only Setup MSC Reset can clear it
+ udd_ep_wait_stall_clear(UDI_MSC_EP_IN, udi_msc_csw_invalid);
+}
+
+static void udi_msc_cbw_wait(void)
+{
+ // Register buffer and callback on OUT endpoint
+ if (!udd_ep_run(UDI_MSC_EP_OUT, true,
+ (uint8_t *) & udi_msc_cbw,
+ sizeof(udi_msc_cbw),
+ udi_msc_cbw_received)) {
+ // OUT endpoint not available (halted), then wait a clear of halt.
+ udd_ep_wait_stall_clear(UDI_MSC_EP_OUT, udi_msc_cbw_wait);
+ }
+}
+
+
+void udi_msc_cbw_received(udd_ep_status_t status, iram_size_t nb_received)
+{
+ // Check status of transfer
+ if (UDD_EP_TRANSFER_OK != status) {
+ // Tranfert aborted
+ // Now wait MSC setup reset to relaunch CBW reception
+ return;
+ }
+ // Check CBW integrity:
+ // transfer status/CBW length/CBW signature
+ if ((sizeof(udi_msc_cbw) != nb_received)
+ || (udi_msc_cbw.dCBWSignature !=
+ CPU_TO_BE32(USB_CBW_SIGNATURE))) {
+ // (5.2.1) Devices receiving a CBW with an invalid signature should stall
+ // further traffic on the Bulk In pipe, and either stall further traffic
+ // or accept and discard further traffic on the Bulk Out pipe, until
+ // reset recovery.
+ udi_msc_b_cbw_invalid = true;
+ udi_msc_cbw_invalid();
+ udi_msc_csw_invalid();
+ return;
+ }
+ // Check LUN asked
+ udi_msc_cbw.bCBWLUN &= USB_CBW_LUN_MASK;
+ if (udi_msc_cbw.bCBWLUN > udi_msc_nb_lun) {
+ // Bad LUN, then stop command process
+ udi_msc_sense_fail_cdb_invalid();
+ udi_msc_csw_process();
+ return;
+ }
+ // Prepare CSW residue field with the size requested
+ udi_msc_csw.dCSWDataResidue =
+ le32_to_cpu(udi_msc_cbw.dCBWDataTransferLength);
+
+ // Decode opcode
+ switch (udi_msc_cbw.CDB[0]) {
+ case SPC_REQUEST_SENSE:
+ udi_msc_spc_requestsense();
+ break;
+
+ case SPC_INQUIRY:
+ udi_msc_spc_inquiry();
+ break;
+
+ case SPC_MODE_SENSE6:
+ udi_msc_spc_mode_sense(false);
+ break;
+ case SPC_MODE_SENSE10:
+ udi_msc_spc_mode_sense(true);
+ break;
+
+ case SPC_TEST_UNIT_READY:
+ udi_msc_spc_testunitready();
+ break;
+
+ case SBC_READ_CAPACITY10:
+ udi_msc_sbc_read_capacity();
+ break;
+
+ // Optional but can not reply INVALID COMMAND because
+ // this command is used by the Linux 2.4 kernel.
+ // Otherwise the disk will not mount.
+ case SBC_START_STOP_UNIT:
+ // Accepts request to support plug/plug in case of card reader
+ case SPC_PREVENT_ALLOW_MEDIUM_REMOVAL:
+ // Accepts request to support full format from Windows
+ case SBC_VERIFY10:
+ udi_msc_sense_pass();
+ udi_msc_csw_process();
+ break;
+
+ case SBC_READ10:
+ udi_msc_sbc_trans(true);
+ break;
+
+ case SBC_WRITE10:
+ udi_msc_sbc_trans(false);
+ break;
+
+ default:
+ udi_msc_sense_command_invalid();
+ udi_msc_csw_process();
+ break;
+ }
+}
+
+
+static bool udi_msc_cbw_validate(uint32_t alloc_len, uint8_t dir_flag)
+{
+ /*
+ * The following cases should result in a phase error:
+ * - Case 2: Hn < Di
+ * - Case 3: Hn < Do
+ * - Case 7: Hi < Di
+ * - Case 8: Hi <> Do
+ * - Case 10: Ho <> Di
+ * - Case 13: Ho < Do
+ */
+ if (((udi_msc_cbw.bmCBWFlags ^ dir_flag) & USB_CBW_DIRECTION_IN)
+ || (udi_msc_csw.dCSWDataResidue < alloc_len)) {
+ udi_msc_sense_fail_cdb_invalid();
+ udi_msc_csw_process();
+ return false;
+ }
+
+ /*
+ * The following cases should result in a stall and nonzero
+ * residue:
+ * - Case 4: Hi > Dn
+ * - Case 5: Hi > Di
+ * - Case 9: Ho > Dn
+ * - Case 11: Ho > Do
+ */
+ return true;
+}
+
+
+//---------------------------------------------
+//------- Routines to process small data packet
+
+static void udi_msc_data_send(uint8_t * buffer, uint8_t buf_size)
+{
+ // Sends data on IN endpoint
+ if (!udd_ep_run(UDI_MSC_EP_IN, true,
+ buffer, buf_size, udi_msc_data_sent)) {
+ // If endpoint not available, then exit process command
+ udi_msc_sense_fail_hardware();
+ udi_msc_csw_process();
+ }
+}
+
+
+void udi_msc_data_sent(udd_ep_status_t status, iram_size_t nb_sent)
+{
+ if (UDD_EP_TRANSFER_OK != status) {
+ // Error protocol
+ // Now wait MSC setup reset to relaunch CBW reception
+ return;
+ }
+ // Update sense data
+ udi_msc_sense_pass();
+ // Update CSW
+ udi_msc_csw.dCSWDataResidue -= nb_sent;
+ udi_msc_csw_process();
+}
+
+
+//---------------------------------------------
+//------- Routines to process CSW packet
+
+static void udi_msc_csw_process(void)
+{
+ if (0 != udi_msc_csw.dCSWDataResidue) {
+ // Residue not NULL
+ // then STALL next request from USB host on corresponding endpoint
+ if (udi_msc_cbw.bmCBWFlags & USB_CBW_DIRECTION_IN)
+ udd_ep_set_halt(UDI_MSC_EP_IN);
+ else
+ udd_ep_set_halt(UDI_MSC_EP_OUT);
+ }
+ // Prepare and send CSW
+ udi_msc_csw.dCSWTag = udi_msc_cbw.dCBWTag;
+ udi_msc_csw.dCSWDataResidue = cpu_to_le32(udi_msc_csw.dCSWDataResidue);
+ udi_msc_csw_send();
+}
+
+
+void udi_msc_csw_send(void)
+{
+ // Sends CSW on IN endpoint
+ if (!udd_ep_run(UDI_MSC_EP_IN, false,
+ (uint8_t *) & udi_msc_csw,
+ sizeof(udi_msc_csw),
+ udi_msc_csw_sent)) {
+ // Endpoint not available
+ // then restart CSW sent when endpoint IN STALL will be cleared
+ udd_ep_wait_stall_clear(UDI_MSC_EP_IN, udi_msc_csw_send);
+ }
+}
+
+
+void udi_msc_csw_sent(udd_ep_status_t status, iram_size_t nb_sent)
+{
+ // CSW is sent or not
+ // In all case, restart process and wait CBW
+ udi_msc_cbw_wait();
+}
+
+
+//---------------------------------------------
+//------- Routines manage sense data
+
+static void udi_msc_clear_sense(void)
+{
+ memset(udi_msc_sense, 0, sizeof(udi_msc_sense));
+ udi_msc_sense[0] = SCSI_SENSE_VALID | SCSI_SENSE_CURRENT;
+ udi_msc_sense[7] = SCSI_SENSE_ADDL_LEN(sizeof(udi_msc_sense));
+}
+
+static void udi_msc_sense_fail(uint8_t sense_key, uint16_t add_sense,
+ uint32_t lba)
+{
+ udi_msc_clear_sense();
+ udi_msc_csw.bCSWStatus = USB_CSW_STATUS_FAIL;
+ udi_msc_sense[2] = sense_key;
+ udi_msc_sense[3] = lba >> 24;
+ udi_msc_sense[4] = lba >> 16;
+ udi_msc_sense[5] = lba >> 8;
+ udi_msc_sense[6] = lba;
+ udi_msc_sense[12] = add_sense >> 8;
+ udi_msc_sense[13] = add_sense;
+}
+
+static void udi_msc_sense_pass(void)
+{
+ udi_msc_clear_sense();
+ udi_msc_csw.bCSWStatus = USB_CSW_STATUS_PASS;
+}
+
+
+static void udi_msc_sense_fail_not_present(void)
+{
+ udi_msc_sense_fail(SCSI_SK_NOT_READY, SCSI_ASC_MEDIUM_NOT_PRESENT, 0);
+}
+
+static void udi_msc_sense_fail_busy_or_change(void)
+{
+ udi_msc_sense_fail(SCSI_SK_UNIT_ATTENTION,
+ SCSI_ASC_NOT_READY_TO_READY_CHANGE, 0);
+}
+
+static void udi_msc_sense_fail_hardware(void)
+{
+ udi_msc_sense_fail(SCSI_SK_HARDWARE_ERROR,
+ SCSI_ASC_NO_ADDITIONAL_SENSE_INFO, 0);
+}
+
+static void udi_msc_sense_fail_protected(void)
+{
+ udi_msc_sense_fail(SCSI_SK_DATA_PROTECT, SCSI_ASC_WRITE_PROTECTED, 0);
+}
+
+static void udi_msc_sense_fail_cdb_invalid(void)
+{
+ udi_msc_sense_fail(SCSI_SK_ILLEGAL_REQUEST,
+ SCSI_ASC_INVALID_FIELD_IN_CDB, 0);
+}
+
+static void udi_msc_sense_command_invalid(void)
+{
+ udi_msc_sense_fail(SCSI_SK_ILLEGAL_REQUEST,
+ SCSI_ASC_INVALID_COMMAND_OPERATION_CODE, 0);
+}
+
+
+//---------------------------------------------
+//------- Routines manage SCSI Commands
+
+static void udi_msc_spc_requestsense(void)
+{
+ uint8_t length = udi_msc_cbw.CDB[4];
+
+ // Can't send more than sense data length
+ if (length > sizeof(udi_msc_sense))
+ length = sizeof(udi_msc_sense);
+
+ if (!udi_msc_cbw_validate(length, USB_CBW_DIRECTION_IN))
+ return;
+ // Send sense data
+ udi_msc_data_send(udi_msc_sense, length);
+}
+
+
+static void udi_msc_spc_inquiry(void)
+{
+ uint8_t length, i;
+ UDC_DATA(4)
+ // Constant inquiry data for all LUNs
+ static struct scsi_inquiry_data udi_msc_inquiry_data = {
+ .pq_pdt = SCSI_INQ_PQ_CONNECTED | SCSI_INQ_DT_DIR_ACCESS,
+#ifdef UDI_MSC_NOT_REMOVABLE
+ .flags1 = 0,
+#else
+ .flags1 = SCSI_INQ_RMB,
+#endif
+ .version = SCSI_INQ_VER_SPC,
+ .flags3 = SCSI_INQ_RSP_SPC2,
+ .addl_len = SCSI_INQ_ADDL_LEN(sizeof(struct scsi_inquiry_data)),
+ .vendor_id = {UDI_MSC_GLOBAL_VENDOR_ID},
+ .product_rev = {UDI_MSC_GLOBAL_PRODUCT_VERSION},
+ };
+
+ length = udi_msc_cbw.CDB[4];
+
+ // Can't send more than inquiry data length
+ if (length > sizeof(udi_msc_inquiry_data))
+ length = sizeof(udi_msc_inquiry_data);
+
+ if (!udi_msc_cbw_validate(length, USB_CBW_DIRECTION_IN))
+ return;
+ if ((0 != (udi_msc_cbw.CDB[1] & (SCSI_INQ_REQ_EVPD | SCSI_INQ_REQ_CMDT)))
+ || (0 != udi_msc_cbw.CDB[2])) {
+ // CMDT and EPVD bits are not at 0
+ // PAGE or OPERATION CODE fields are not empty
+ // = No standard inquiry asked
+ udi_msc_sense_fail_cdb_invalid(); // Command is unsupported
+ udi_msc_csw_process();
+ return;
+ }
+ //* Fill product ID field
+ // Copy name in product id field
+ memcpy(udi_msc_inquiry_data.product_id,
+ mem_name(udi_msc_cbw.bCBWLUN),
+ sizeof(udi_msc_inquiry_data.product_id));
+ // Search end of name '/0'
+ i = 0;
+ while (sizeof(udi_msc_inquiry_data.product_id) != i) {
+ if (0 == udi_msc_inquiry_data.product_id[i])
+ break;
+ i++;
+ }
+ // Padding with space char
+ while (sizeof(udi_msc_inquiry_data.product_id) != i) {
+ udi_msc_inquiry_data.product_id[i] = ' ';
+ i++;
+ }
+
+ // Send inquiry data
+ udi_msc_data_send((uint8_t *) & udi_msc_inquiry_data, length);
+}
+
+
+static bool udi_msc_spc_testunitready_global(void)
+{
+ switch (mem_test_unit_ready(udi_msc_cbw.bCBWLUN)) {
+ case CTRL_GOOD:
+ return true; // Don't change sense data
+ case CTRL_BUSY:
+ udi_msc_sense_fail_busy_or_change();
+ break;
+ case CTRL_NO_PRESENT:
+ udi_msc_sense_fail_not_present();
+ break;
+ case CTRL_FAIL:
+ default:
+ udi_msc_sense_fail_hardware();
+ break;
+ }
+ return false;
+}
+
+
+static void udi_msc_spc_testunitready(void)
+{
+ if (udi_msc_spc_testunitready_global()) {
+ // LUN ready, then update sense data with status pass
+ udi_msc_sense_pass();
+ }
+ // Send status in CSW packet
+ udi_msc_csw_process();
+}
+
+
+static void udi_msc_spc_mode_sense(bool b_sense10)
+{
+ // Union of all mode sense structures
+ union sense_6_10 {
+ struct {
+ struct scsi_mode_param_header6 header;
+#ifdef UDI_MSC_RECOVERY_IMPLEMENTATION
+ uint8_t sense_data[sizeof(struct spc_control_page_info_execpt)
+ +
+ sizeof
+ (sbc_rdwr_error_recovery_mode_page)];
+#else
+ uint8_t sense_data[sizeof(struct spc_control_page_info_execpt)];
+#endif
+ } s6;
+ struct {
+ struct scsi_mode_param_header10 header;
+#ifdef UDI_MSC_RECOVERY_IMPLEMENTATION
+ uint8_t sense_data[sizeof(struct spc_control_page_info_execpt)
+ +
+ sizeof
+ (sbc_rdwr_error_recovery_mode_page)];
+#else
+ uint8_t sense_data[sizeof(struct spc_control_page_info_execpt)];
+#endif
+ } s10;
+ };
+
+ uint8_t data_sense_lgt;
+ uint8_t mode;
+ uint8_t request_lgt;
+ uint8_t wp;
+ uint8_t *ptr_mode;
+ UDC_BSS(4) static union sense_6_10 sense;
+
+ // Clear all fields
+ memset(&sense, 0, sizeof(sense));
+
+ // Initialize process
+ if (b_sense10) {
+ request_lgt = udi_msc_cbw.CDB[8];
+ ptr_mode = sense.s10.sense_data;
+ data_sense_lgt = sizeof(struct scsi_mode_param_header10);
+ } else {
+ request_lgt = udi_msc_cbw.CDB[4];
+ ptr_mode = sense.s6.sense_data;
+ data_sense_lgt = sizeof(struct scsi_mode_param_header6);
+ }
+
+ // No Block descriptor
+
+ // Fill page(s)
+ mode = udi_msc_cbw.CDB[2] & SCSI_MS_MODE_ALL;
+ if ((SCSI_MS_MODE_INFEXP == mode)
+ || (SCSI_MS_MODE_ALL == mode)) {
+ // Informational exceptions control page (from SPC)
+ ((struct spc_control_page_info_execpt *)ptr_mode)->page_code =
+ SCSI_MS_MODE_INFEXP;
+ ((struct spc_control_page_info_execpt *)ptr_mode)->page_length =
+ SPC_MP_INFEXP_PAGE_LENGTH;
+ ((struct spc_control_page_info_execpt *)ptr_mode)->mrie =
+ SPC_MP_INFEXP_MRIE_NO_SENSE;
+ ptr_mode += sizeof(struct spc_control_page_info_execpt);
+ data_sense_lgt += sizeof(struct spc_control_page_info_execpt);
+ }
+#ifdef UDI_MSC_RECOVERY_IMPLEMENTATION
+ if ((SCSI_MS_MODE_RW_ERR_RECOV == mode)
+ || (SCSI_MS_PAGECODE_ALL == mode)) {
+ // Read-Write Error Recovery mode page (from SBC)
+ (*sbc_rdwr_error_recovery_mode_page) ptr_mode->page_code =
+ SCSI_MS_MODE_RW_ERR_RECOV;
+ (*sbc_rdwr_error_recovery_mode_page) ptr_mode->page_length =
+ SPC_MP_RW_ERR_RECOV_PAGE_LENGTH;
+ (*sbc_rdwr_error_recovery_mode_page) ptr_mode->flags1 =
+ SBC_MP_RW_ERR_RECOV_AWRE;
+ (*sbc_rdwr_error_recovery_mode_page) ptr_mode->read_retry_count
+ = 3;
+ (*sbc_rdwr_error_recovery_mode_page) ptr_mode->write_retry_count
+ = 0x80;
+ ptr_mode += sizeof(sbc_rdwr_error_recovery_mode_page);
+ length_page += sizeof(sbc_rdwr_error_recovery_mode_page);
+ }
+#endif
+ if (0 == data_sense_lgt) {
+ // No page mode added then exit command
+ udi_msc_sense_fail_cdb_invalid();
+ udi_msc_csw_process();
+ return;
+ }
+ // Can't send more than mode sense data length
+ if (request_lgt > data_sense_lgt)
+ request_lgt = data_sense_lgt;
+ if (!udi_msc_cbw_validate(request_lgt, USB_CBW_DIRECTION_IN))
+ return;
+
+ // Fill mode parameter header length
+ wp = (mem_wr_protect(udi_msc_cbw.bCBWLUN)) ? SCSI_MS_SBC_WP : 0;
+
+ if (b_sense10) {
+ sense.s10.header.mode_data_length =
+ cpu_to_be16((data_sense_lgt - 2));
+ //sense.s10.header.medium_type = 0;
+ sense.s10.header.device_specific_parameter = wp;
+ //sense.s10.header.block_descriptor_length = 0;
+ } else {
+ sense.s6.header.mode_data_length = data_sense_lgt - 1;
+ //sense.s6.header.medium_type = 0;
+ sense.s6.header.device_specific_parameter = wp;
+ //sense.s6.header.block_descriptor_length = 0;
+ }
+
+ // Send mode sense data
+ udi_msc_data_send((uint8_t *) & sense, request_lgt);
+}
+
+
+static void udi_msc_sbc_read_capacity(void)
+{
+ UDC_BSS(4)
+ static struct sbc_read_capacity10_data udi_msc_capacity;
+
+ if (!udi_msc_cbw_validate(sizeof(udi_msc_capacity),
+ USB_CBW_DIRECTION_IN))
+ return;
+
+ // Get capacity of LUN
+ switch (mem_read_capacity(udi_msc_cbw.bCBWLUN,
+ &udi_msc_capacity.max_lba)) {
+ case CTRL_GOOD:
+ break;
+ case CTRL_BUSY:
+ udi_msc_sense_fail_busy_or_change();
+ udi_msc_csw_process();
+ return;
+ case CTRL_NO_PRESENT:
+ udi_msc_sense_fail_not_present();
+ udi_msc_csw_process();
+ return;
+ default:
+ udi_msc_sense_fail_hardware();
+ udi_msc_csw_process();
+ return;
+ }
+
+ // Format capacity data
+ udi_msc_capacity.block_len = CPU_TO_BE32(UDI_MSC_BLOCK_SIZE);
+ udi_msc_capacity.max_lba = cpu_to_be32(udi_msc_capacity.max_lba);
+ // Send the corresponding sense data
+ udi_msc_data_send((uint8_t *) & udi_msc_capacity,
+ sizeof(udi_msc_capacity));
+}
+
+
+static void udi_msc_sbc_trans(bool b_read)
+{
+ uint32_t trans_size;
+
+ if (!b_read) {
+ // Write operation then check Write Protect
+ if (mem_wr_protect(udi_msc_cbw.bCBWLUN)) {
+ // Write not authorized
+ udi_msc_sense_fail_protected();
+ udi_msc_csw_process();
+ return;
+ }
+ }
+ // Read/Write command fields (address and number of block)
+ MSB0(udi_msc_addr) = udi_msc_cbw.CDB[2];
+ MSB1(udi_msc_addr) = udi_msc_cbw.CDB[3];
+ MSB2(udi_msc_addr) = udi_msc_cbw.CDB[4];
+ MSB3(udi_msc_addr) = udi_msc_cbw.CDB[5];
+ MSB(udi_msc_nb_block) = udi_msc_cbw.CDB[7];
+ LSB(udi_msc_nb_block) = udi_msc_cbw.CDB[8];
+
+ // Compute number of byte to transfer and valid it
+ trans_size = (uint32_t) udi_msc_nb_block *UDI_MSC_BLOCK_SIZE;
+ if (!udi_msc_cbw_validate(trans_size,
+ (b_read) ? USB_CBW_DIRECTION_IN :
+ USB_CBW_DIRECTION_OUT))
+ return;
+
+ // Record transfer request to do it in main loop and not under interrupt
+ udi_msc_b_read = b_read;
+ udi_msc_b_trans_req = true;
+}
+
+
+void udi_msc_process_trans(void)
+{
+ Ctrl_status status;
+
+ if (!udi_msc_b_trans_req)
+ return; // No Transfer request to do
+ udi_msc_b_trans_req = false;
+
+ // Start transfer
+ if (udi_msc_b_read) {
+ status = memory_2_usb(udi_msc_cbw.bCBWLUN, udi_msc_addr,
+ udi_msc_nb_block);
+ } else {
+ status = usb_2_memory(udi_msc_cbw.bCBWLUN, udi_msc_addr,
+ udi_msc_nb_block);
+ }
+
+ // Check status of transfer
+ switch (status) {
+ case CTRL_GOOD:
+ udi_msc_sense_pass();
+ break;
+ case CTRL_BUSY:
+ udi_msc_sense_fail_busy_or_change();
+ break;
+ case CTRL_NO_PRESENT:
+ udi_msc_sense_fail_not_present();
+ break;
+ default:
+ case CTRL_FAIL:
+ udi_msc_sense_fail_hardware();
+ break;
+ }
+ // Send status of transfer in CSW packet
+ udi_msc_csw_process();
+}
+
+
+static void udi_msc_trans_ack(udd_ep_status_t status, iram_size_t n)
+{
+ // Update variable to signal the end of transfer
+ udi_msc_b_abort_trans = (UDD_EP_TRANSFER_OK != status) ? true : false;
+ udi_msc_b_ack_trans = true;
+}
+
+
+bool udi_msc_trans_block(bool b_read, uint8_t * block, iram_size_t block_size,
+ void (*callback) (udd_ep_status_t status, iram_size_t n))
+{
+ if (!udi_msc_b_ack_trans)
+ return false; // No possible, transfer on going
+
+ // Start transfer Internal RAM<->USB line
+ udi_msc_b_ack_trans = false;
+ if (!udd_ep_run((b_read) ? UDI_MSC_EP_IN : UDI_MSC_EP_OUT,
+ false,
+ block,
+ block_size,
+ (NULL == callback) ? udi_msc_trans_ack :
+ callback)) {
+ udi_msc_b_ack_trans = true;
+ return false;
+ }
+ if (NULL == callback) {
+ while (!udi_msc_b_ack_trans);
+ if (udi_msc_b_abort_trans) {
+ return false;
+ }
+ udi_msc_csw.dCSWDataResidue -= block_size;
+ return (!udi_msc_b_abort_trans);
+ }
+ udi_msc_csw.dCSWDataResidue -= block_size;
+ return true;
+}
+
+//@}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/udi_msc.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/udi_msc.h
new file mode 100644
index 0000000..e3256f1
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/udi_msc.h
@@ -0,0 +1,163 @@
+/**
+ * \file
+ *
+ * \brief USB Device Mass Storage Class (MSC) interface definitions.
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _UDI_MSC_H_
+#define _UDI_MSC_H_
+
+#include "conf_usb.h"
+#include "usb_protocol.h"
+#include "usb_protocol_msc.h"
+#include "udd.h"
+#include "udc_desc.h"
+#include "udi.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * \ingroup udi_group
+ * \defgroup udi_msc_group UDI for Mass Storage Class
+ *
+ * @{
+ */
+
+/**
+ * \name Interface Descriptor
+ *
+ * The following structures provide the interface descriptor.
+ * It must be implemented in USB configuration descriptor.
+ */
+//@{
+
+//! Interface descriptor struture for MSC
+typedef struct {
+ usb_iface_desc_t iface;
+ usb_ep_desc_t ep_in;
+ usb_ep_desc_t ep_out;
+} udi_msc_desc_t;
+
+//! By default no string associated to this interface
+#ifndef UDI_MSC_STRING_ID
+#define UDI_MSC_STRING_ID 0
+#endif
+
+//! MSC enpoints size for full speed
+#define UDI_MSC_EPS_SIZE_FS 64
+//! MSC enpoints size for high speed
+#define UDI_MSC_EPS_SIZE_HS 512
+
+//! Content of MSC interface descriptor for all speeds
+#define UDI_MSC_DESC \
+ .iface.bLength = sizeof(usb_iface_desc_t),\
+ .iface.bDescriptorType = USB_DT_INTERFACE,\
+ .iface.bInterfaceNumber = UDI_MSC_IFACE_NUMBER,\
+ .iface.bAlternateSetting = 0,\
+ .iface.bNumEndpoints = 2,\
+ .iface.bInterfaceClass = MSC_CLASS,\
+ .iface.bInterfaceSubClass = MSC_SUBCLASS_TRANSPARENT,\
+ .iface.bInterfaceProtocol = MSC_PROTOCOL_BULK,\
+ .iface.iInterface = UDI_MSC_STRING_ID,\
+ .ep_in.bLength = sizeof(usb_ep_desc_t),\
+ .ep_in.bDescriptorType = USB_DT_ENDPOINT,\
+ .ep_in.bEndpointAddress = UDI_MSC_EP_IN,\
+ .ep_in.bmAttributes = USB_EP_TYPE_BULK,\
+ .ep_in.bInterval = 0,\
+ .ep_out.bLength = sizeof(usb_ep_desc_t),\
+ .ep_out.bDescriptorType = USB_DT_ENDPOINT,\
+ .ep_out.bEndpointAddress = UDI_MSC_EP_OUT,\
+ .ep_out.bmAttributes = USB_EP_TYPE_BULK,\
+ .ep_out.bInterval = 0,
+
+//! Content of MSC interface descriptor for full speed only
+#define UDI_MSC_DESC_FS {\
+ UDI_MSC_DESC \
+ .ep_in.wMaxPacketSize = LE16(UDI_MSC_EPS_SIZE_FS),\
+ .ep_out.wMaxPacketSize = LE16(UDI_MSC_EPS_SIZE_FS),\
+ }
+
+//! Content of MSC interface descriptor for high speed only
+#define UDI_MSC_DESC_HS {\
+ UDI_MSC_DESC \
+ .ep_in.wMaxPacketSize = LE16(UDI_MSC_EPS_SIZE_HS),\
+ .ep_out.wMaxPacketSize = LE16(UDI_MSC_EPS_SIZE_HS),\
+ }
+//@}
+
+
+//! Global struture which contains standard UDI interface for UDC
+extern UDC_DESC_STORAGE udi_api_t udi_api_msc;
+
+/**
+ * \name Interface for application
+ *
+ * These routines are used by memory to transfer its data
+ * to/from USB MSC endpoints.
+ */
+//@{
+
+/**
+ * \brief Process the background read/write commands
+ *
+ * Routine called by the main loop
+ */
+void udi_msc_process_trans(void);
+
+/**
+ * \brief Transfers data to/from USB MSC endpoints
+ *
+ *
+ * \param b_read Memory to USB, if true
+ * \param block Buffer on Internal RAM to send or fill
+ * \param block_size Buffer size to send or fill
+ * \param callback Function to call at the end of transfer.
+ * If NULL then the routine exit when transfer is finish.
+ *
+ * \return \c 1 if function was successfully done, otherwise \c 0.
+ */
+bool udi_msc_trans_block(bool b_read, uint8_t * block, iram_size_t block_size,
+ void (*callback) (udd_ep_status_t status, iram_size_t n));
+
+//@}
+
+//@}
+
+#ifdef __cplusplus
+}
+#endif
+#endif // _UDI_MSC_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/udi_msc_conf.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/udi_msc_conf.h
new file mode 100644
index 0000000..97e81a4
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/udi_msc_conf.h
@@ -0,0 +1,73 @@
+/**
+ * \file
+ *
+ * \brief Default MSC configuration for a USB Device
+ * with a single interface MSC
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _UDI_MSC_CONF_H_
+#define _UDI_MSC_CONF_H_
+
+/**
+ * \ingroup udi_msc_group
+ * \defgroup udi_msc_group_conf Default MSC configuration for a USB Device
+ * with a single interface MSC
+ *
+ * @{
+ */
+
+//! Control endpoint size
+#define USB_DEVICE_EP_CTRL_SIZE 64
+
+//! Endpoint numbers used by MSC interface
+#define UDI_MSC_EP_IN (1 | USB_EP_DIR_IN)
+#define UDI_MSC_EP_OUT (2 | USB_EP_DIR_OUT)
+
+//! Interface number is 0 because it is the unique interface
+#define UDI_MSC_IFACE_NUMBER 0
+
+/**
+ * \name UDD Configuration
+ */
+//@{
+//! 2 endpoints used by MSC interface
+#define USB_DEVICE_MAX_EP 2
+//@}
+
+//@}
+
+#include "udi_msc.h"
+
+#endif // _UDI_MSC_CONF_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/udi_msc_desc.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/udi_msc_desc.c
new file mode 100644
index 0000000..683b2f2
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/device/udi_msc_desc.c
@@ -0,0 +1,182 @@
+/**
+ * \file
+ *
+ * \brief Default descriptors for a USB Device with a single interface MSC
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "conf_usb.h"
+#include "udd.h"
+#include "udc_desc.h"
+#include "udi_msc.h"
+
+
+/**
+ * \ingroup udi_msc_group
+ * \defgroup udi_msc_group_desc Default descriptors for a USB Device
+ * with a single interface MSC
+ *
+ * @{
+ */
+
+//! Only one interface for this device
+#define USB_DEVICE_NB_INTERFACE 1
+
+/**INDENT-OFF**/
+
+//! USB Device Descriptor
+UDC_DATA(4)
+UDC_DESC_STORAGE usb_dev_desc_t udc_device_desc = {
+ .bLength = sizeof(usb_dev_desc_t),
+ .bDescriptorType = USB_DT_DEVICE,
+ .bcdUSB = LE16(USB_V2_0),
+ .bDeviceClass = 0,
+ .bDeviceSubClass = 0,
+ .bDeviceProtocol = 0,
+ .bMaxPacketSize0 = USB_DEVICE_EP_CTRL_SIZE,
+ .idVendor = LE16(USB_DEVICE_VENDOR_ID),
+ .idProduct = LE16(USB_DEVICE_PRODUCT_ID),
+ .bcdDevice = LE16((USB_DEVICE_MAJOR_VERSION << 8)
+ | USB_DEVICE_MINOR_VERSION),
+#ifdef USB_DEVICE_MANUFACTURE_NAME
+ .iManufacturer = 1,
+#else
+ .iManufacturer = 0, // No manufacture string
+#endif
+#ifdef USB_DEVICE_PRODUCT_NAME
+ .iProduct = 2,
+#else
+ .iProduct = 0, // No product string
+#endif
+#ifdef USB_DEVICE_SERIAL_NAME
+ .iSerialNumber = 3,
+#else
+ .iSerialNumber = 0, // No serial string
+#endif
+ .bNumConfigurations = 1
+};
+
+
+#ifdef USB_DEVICE_HS_SUPPORT
+//! USB Device Qualifier Descriptor for HS
+UDC_DATA(4)
+UDC_DESC_STORAGE usb_dev_qual_desc_t udc_device_qual = {
+ .bLength = sizeof(usb_dev_qual_desc_t),
+ .bDescriptorType = USB_DT_DEVICE_QUALIFIER,
+ .bcdUSB = LE16(USB_V2_0),
+ .bDeviceClass = 0,
+ .bDeviceSubClass = 0,
+ .bDeviceProtocol = 0,
+ .bMaxPacketSize0 = USB_DEVICE_EP_CTRL_SIZE,
+ .bNumConfigurations = 1
+};
+#endif
+
+//! Structure for USB Device Configuration Descriptor
+COMPILER_PACK_SET(1);
+typedef struct {
+ usb_conf_desc_t conf;
+ udi_msc_desc_t udi_msc;
+} udc_desc_t;
+COMPILER_PACK_RESET();
+
+//! USB Device Configuration Descriptor filled for FS
+UDC_DATA(4)
+UDC_DESC_STORAGE udc_desc_t udc_desc_fs = {
+ .conf.bLength = sizeof(usb_conf_desc_t),
+ .conf.bDescriptorType = USB_DT_CONFIGURATION,
+ .conf.wTotalLength = LE16(sizeof(udc_desc_t)),
+ .conf.bNumInterfaces = USB_DEVICE_NB_INTERFACE,
+ .conf.bConfigurationValue = 1,
+ .conf.iConfiguration = 0,
+ .conf.bmAttributes = USB_CONFIG_ATTR_MUST_SET | USB_DEVICE_ATTR,
+ .conf.bMaxPower = USB_CONFIG_MAX_POWER(USB_DEVICE_POWER),
+ .udi_msc = UDI_MSC_DESC_FS,
+};
+
+#ifdef USB_DEVICE_HS_SUPPORT
+//! USB Device Configuration Descriptor filled for HS
+UDC_DATA(4)
+UDC_DESC_STORAGE udc_desc_t udc_desc_hs = {
+ .conf.bLength = sizeof(usb_conf_desc_t),
+ .conf.bDescriptorType = USB_DT_CONFIGURATION,
+ .conf.wTotalLength = LE16(sizeof(udc_desc_t)),
+ .conf.bNumInterfaces = USB_DEVICE_NB_INTERFACE,
+ .conf.bConfigurationValue = 1,
+ .conf.iConfiguration = 0,
+ .conf.bmAttributes = USB_CONFIG_ATTR_MUST_SET | USB_DEVICE_ATTR,
+ .conf.bMaxPower = USB_CONFIG_MAX_POWER(USB_DEVICE_POWER),
+ .udi_msc = UDI_MSC_DESC_HS,
+};
+#endif
+
+
+/**
+ * \name UDC structures which contain all USB Device definitions
+ */
+//@{
+
+//! Associate an UDI for each USB interface
+UDC_DESC_STORAGE udi_api_t *udi_apis[USB_DEVICE_NB_INTERFACE] = {
+ &udi_api_msc,
+};
+
+//! Add UDI with USB Descriptors FS
+UDC_DESC_STORAGE udc_config_speed_t udc_config_lsfs[1] = {{
+ .desc = (usb_conf_desc_t UDC_DESC_STORAGE*)&udc_desc_fs,
+ .udi_apis = udi_apis,
+}};
+
+#ifdef USB_DEVICE_HS_SUPPORT
+//! Add UDI with USB Descriptors HS
+UDC_DESC_STORAGE udc_config_speed_t udc_config_hs[1] = {{
+ .desc = (usb_conf_desc_t UDC_DESC_STORAGE*)&udc_desc_hs,
+ .udi_apis = udi_apis,
+}};
+#endif
+
+//! Add all information about USB Device in global structure for UDC
+UDC_DESC_STORAGE udc_config_t udc_config = {
+ .confdev_lsfs = &udc_device_desc,
+ .conf_lsfs = udc_config_lsfs,
+#ifdef USB_DEVICE_HS_SUPPORT
+ .confdev_hs = &udc_device_desc,
+ .qualifier = &udc_device_qual,
+ .conf_hs = udc_config_hs,
+#endif
+};
+
+//@}
+/**INDENT-ON**/
+//@}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/sbc_protocol.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/sbc_protocol.h
new file mode 100644
index 0000000..d804fdb
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/sbc_protocol.h
@@ -0,0 +1,165 @@
+/**
+ * \file
+ *
+ * \brief SCSI Block Commands
+ *
+ * This file contains definitions of some of the commands found in the
+ * SCSI SBC-2 standard.
+ *
+ * Note that the SBC specification depends on several commands defined
+ * by the SCSI Primary Commands (SPC) standard. Each version of the SBC
+ * standard is meant to be used in conjunction with a specific version
+ * of the SPC standard, as follows:
+ * - SBC depends on SPC
+ * - SBC-2 depends on SPC-3
+ * - SBC-3 depends on SPC-4
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef _SBC_PROTOCOL_H_
+#define _SBC_PROTOCOL_H_
+
+
+/**
+ * \ingroup usb_msc_protocol
+ * \defgroup usb_sbc_protocol SCSI Block Commands protocol definitions
+ *
+ * @{
+ */
+
+//! \name SCSI commands defined by SBC-2
+//@{
+#define SBC_FORMAT_UNIT 0x04
+#define SBC_READ6 0x08
+#define SBC_WRITE6 0x0A
+#define SBC_START_STOP_UNIT 0x1B
+#define SBC_READ_CAPACITY10 0x25
+#define SBC_READ10 0x28
+#define SBC_WRITE10 0x2A
+#define SBC_VERIFY10 0x2F
+//@}
+
+//! \name SBC-2 Mode page definitions
+//@{
+
+enum scsi_sbc_mode {
+ SCSI_MS_MODE_RW_ERR_RECOV = 0x01, //!< Read-Write Error Recovery mode page
+ SCSI_MS_MODE_FORMAT_DEVICE = 0x03, //!< Format Device mode page
+ SCSI_MS_MODE_FLEXIBLE_DISK = 0x05, //!< Flexible Disk mode page
+ SCSI_MS_MODE_CACHING = 0x08 //!< Caching mode page
+};
+
+
+//! \name SBC-2 Device-Specific Parameter
+//@{
+#define SCSI_MS_SBC_WP 0x80 //!< Write Protected
+#define SCSI_MS_SBC_DPOFUA 0x10 //!< DPO and FUA supported
+//@}
+
+/**
+ * \brief SBC-2 Short LBA mode parameter block descriptor
+ */
+struct sbc_slba_block_desc {
+ be32_t nr_blocks; //!< Number of Blocks
+ be32_t block_len; //!< Block Length
+#define SBC_SLBA_BLOCK_LEN_MASK 0x00FFFFFFU //!< Mask reserved bits
+};
+
+/**
+ * \brief SBC-2 Caching mode page
+ */
+struct sbc_caching_mode_page {
+ uint8_t page_code;
+ uint8_t page_length;
+ uint8_t flags2;
+#define SBC_MP_CACHE_IC (1 << 7) //!< Initiator Control
+#define SBC_MP_CACHE_ABPF (1 << 6) //!< Abort Pre-Fetch
+#define SBC_MP_CACHE_CAP (1 << 5) //!< Catching Analysis Permitted
+#define SBC_MP_CACHE_DISC (1 << 4) //!< Discontinuity
+#define SBC_MP_CACHE_SIZE (1 << 3) //!< Size enable
+#define SBC_MP_CACHE_WCE (1 << 2) //!< Write back Cache Enable
+#define SBC_MP_CACHE_MF (1 << 1) //!< Multiplication Factor
+#define SBC_MP_CACHE_RCD (1 << 0) //!< Read Cache Disable
+ uint8_t retention;
+ be16_t dis_pf_transfer_len;
+ be16_t min_prefetch;
+ be16_t max_prefetch;
+ be16_t max_prefetch_ceil;
+ uint8_t flags12;
+#define SBC_MP_CACHE_FSW (1 << 7) //!< Force Sequential Write
+#define SBC_MP_CACHE_LBCSS (1 << 6) //!< Logical Blk Cache Seg Sz
+#define SBC_MP_CACHE_DRA (1 << 5) //!< Disable Read-Ahead
+#define SBC_MP_CACHE_NV_DIS (1 << 0) //!< Non-Volatile Cache Disable
+ uint8_t nr_cache_segments;
+ be16_t cache_segment_size;
+ uint8_t reserved[4];
+};
+
+/**
+ * \brief SBC-2 Read-Write Error Recovery mode page
+ */
+struct sbc_rdwr_error_recovery_mode_page {
+ uint8_t page_code;
+ uint8_t page_length;
+#define SPC_MP_RW_ERR_RECOV_PAGE_LENGTH 0x0A
+ uint8_t flags1;
+#define SBC_MP_RW_ERR_RECOV_AWRE (1 << 7)
+#define SBC_MP_RW_ERR_RECOV_ARRE (1 << 6)
+#define SBC_MP_RW_ERR_RECOV_TB (1 << 5)
+#define SBC_MP_RW_ERR_RECOV_RC (1 << 4)
+#define SBC_MP_RW_ERR_RECOV_ERR (1 << 3)
+#define SBC_MP_RW_ERR_RECOV_PER (1 << 2)
+#define SBC_MP_RW_ERR_RECOV_DTE (1 << 1)
+#define SBC_MP_RW_ERR_RECOV_DCR (1 << 0)
+ uint8_t read_retry_count;
+ uint8_t correction_span;
+ uint8_t head_offset_count;
+ uint8_t data_strobe_offset_count;
+ uint8_t flags2;
+ uint8_t write_retry_count;
+ uint8_t flags3;
+ be16_t recovery_time_limit;
+};
+//@}
+
+/**
+ * \brief SBC-2 READ CAPACITY (10) parameter data
+ */
+struct sbc_read_capacity10_data {
+ be32_t max_lba; //!< LBA of last logical block
+ be32_t block_len; //!< Number of bytes in the last logical block
+};
+
+//@}
+
+#endif // _SBC_PROTOCOL_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/spc_protocol.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/spc_protocol.h
new file mode 100644
index 0000000..633fa2b
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/spc_protocol.h
@@ -0,0 +1,299 @@
+/**
+ * \file
+ *
+ * \brief SCSI Primary Commands
+ *
+ * This file contains definitions of some of the commands found in the
+ * SPC-2 standard.
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef _SPC_PROTOCOL_H_
+#define _SPC_PROTOCOL_H_
+
+
+/**
+ * \ingroup usb_msc_protocol
+ * \defgroup usb_spc_protocol SCSI Primary Commands protocol definitions
+ *
+ * @{
+ */
+
+//! \name SCSI commands defined by SPC-2
+//@{
+#define SPC_TEST_UNIT_READY 0x00
+#define SPC_REQUEST_SENSE 0x03
+#define SPC_INQUIRY 0x12
+#define SPC_MODE_SELECT6 0x15
+#define SPC_MODE_SENSE6 0x1A
+#define SPC_SEND_DIAGNOSTIC 0x1D
+#define SPC_PREVENT_ALLOW_MEDIUM_REMOVAL 0x1E
+#define SPC_MODE_SENSE10 0x5A
+#define SPC_REPORT_LUNS 0xA0
+//@}
+
+//! \brief May be set in byte 0 of the INQUIRY CDB
+//@{
+//! Enable Vital Product Data
+#define SCSI_INQ_REQ_EVPD 0x01
+//! Command Support Data specified by the PAGE OR OPERATION CODE field
+#define SCSI_INQ_REQ_CMDT 0x02
+//@}
+
+COMPILER_PACK_SET(1);
+
+/**
+ * \brief SCSI Standard Inquiry data structure
+ */
+struct scsi_inquiry_data {
+ uint8_t pq_pdt; //!< Periph Qual / Periph Dev Type
+#define SCSI_INQ_PQ_CONNECTED 0x00 //!< Peripheral connected
+#define SCSI_INQ_PQ_NOT_CONN 0x20 //!< Peripheral not connected
+#define SCSI_INQ_PQ_NOT_SUPP 0x60 //!< Peripheral not supported
+#define SCSI_INQ_DT_DIR_ACCESS 0x00 //!< Direct Access (SBC)
+#define SCSI_INQ_DT_SEQ_ACCESS 0x01 //!< Sequential Access
+#define SCSI_INQ_DT_PRINTER 0x02 //!< Printer
+#define SCSI_INQ_DT_PROCESSOR 0x03 //!< Processor device
+#define SCSI_INQ_DT_WRITE_ONCE 0x04 //!< Write-once device
+#define SCSI_INQ_DT_CD_DVD 0x05 //!< CD/DVD device
+#define SCSI_INQ_DT_OPTICAL 0x07 //!< Optical Memory
+#define SCSI_INQ_DT_MC 0x08 //!< Medium Changer
+#define SCSI_INQ_DT_ARRAY 0x0c //!< Storage Array Controller
+#define SCSI_INQ_DT_ENCLOSURE 0x0d //!< Enclosure Services
+#define SCSI_INQ_DT_RBC 0x0e //!< Simplified Direct Access
+#define SCSI_INQ_DT_OCRW 0x0f //!< Optical card reader/writer
+#define SCSI_INQ_DT_BCC 0x10 //!< Bridge Controller Commands
+#define SCSI_INQ_DT_OSD 0x11 //!< Object-based Storage
+#define SCSI_INQ_DT_NONE 0x1f //!< No Peripheral
+ uint8_t flags1; //!< Flags (byte 1)
+#define SCSI_INQ_RMB 0x80 //!< Removable Medium
+ uint8_t version; //!< Version
+#define SCSI_INQ_VER_NONE 0x00 //!< No standards conformance
+#define SCSI_INQ_VER_SPC 0x03 //!< SCSI Primary Commands (link to SBC)
+#define SCSI_INQ_VER_SPC2 0x04 //!< SCSI Primary Commands - 2 (link to SBC-2)
+#define SCSI_INQ_VER_SPC3 0x05 //!< SCSI Primary Commands - 3 (link to SBC-2)
+#define SCSI_INQ_VER_SPC4 0x06 //!< SCSI Primary Commands - 4 (link to SBC-3)
+ uint8_t flags3; //!< Flags (byte 3)
+#define SCSI_INQ_NORMACA 0x20 //!< Normal ACA Supported
+#define SCSI_INQ_HISUP 0x10 //!< Hierarchial LUN addressing
+#define SCSI_INQ_RSP_SPC2 0x02 //!< SPC-2 / SPC-3 response format
+ uint8_t addl_len; //!< Additional Length (n-4)
+#define SCSI_INQ_ADDL_LEN(tot) ((tot)-5) //!< Total length is \a tot
+ uint8_t flags5; //!< Flags (byte 5)
+#define SCSI_INQ_SCCS 0x80
+ uint8_t flags6; //!< Flags (byte 6)
+#define SCSI_INQ_BQUE 0x80
+#define SCSI_INQ_ENCSERV 0x40
+#define SCSI_INQ_MULTIP 0x10
+#define SCSI_INQ_MCHGR 0x08
+#define SCSI_INQ_ADDR16 0x01
+ uint8_t flags7; //!< Flags (byte 7)
+#define SCSI_INQ_WBUS16 0x20
+#define SCSI_INQ_SYNC 0x10
+#define SCSI_INQ_LINKED 0x08
+#define SCSI_INQ_CMDQUE 0x02
+ uint8_t vendor_id[8]; //!< T10 Vendor Identification
+ uint8_t product_id[16]; //!< Product Identification
+ uint8_t product_rev[4]; //!< Product Revision Level
+};
+
+COMPILER_PACK_RESET();
+
+/* Vital Product Data page codes */
+enum scsi_vpd_page_code {
+ SCSI_VPD_SUPPORTED_PAGES = 0x00,
+ SCSI_VPD_UNIT_SERIAL_NUMBER = 0x80,
+ SCSI_VPD_DEVICE_IDENTIFICATION = 0x83
+};
+#define SCSI_VPD_HEADER_SIZE 4
+
+/* Constants associated with the Device Identification VPD page */
+#define SCSI_VPD_ID_HEADER_SIZE 4
+
+#define SCSI_VPD_CODE_SET_BINARY 1
+#define SCSI_VPD_CODE_SET_ASCII 2
+#define SCSI_VPD_CODE_SET_UTF8 3
+
+#define SCSI_VPD_ID_TYPE_T10 1
+
+/* REQUEST SENSE response flags: 1st byte */
+#define SCSI_SENSE_VALID 0x80
+#define SCSI_SENSE_CURRENT 0x70
+#define SCSI_SENSE_DEFERRED 0x71
+
+/* 3rd byte */
+#define SCSI_SENSE_FILEMARK 0x80
+#define SCSI_SENSE_EOM 0x40
+#define SCSI_SENSE_ILI 0x20
+#define SCSI_SENSE_KEY(x) (x)
+
+/* 8th byte */
+#define SCSI_SENSE_ADDL_LEN(total_len) ((total_len) - 8)
+
+/* 16th byte */
+#define SCSI_SENSE_SKSV 0x80
+
+/* Sense keys */
+enum scsi_sense_key {
+ SCSI_SK_NO_SENSE = 0x0,
+ SCSI_SK_RECOVERED_ERROR = 0x1,
+ SCSI_SK_NOT_READY = 0x2,
+ SCSI_SK_MEDIUM_ERROR = 0x3,
+ SCSI_SK_HARDWARE_ERROR = 0x4,
+ SCSI_SK_ILLEGAL_REQUEST = 0x5,
+ SCSI_SK_UNIT_ATTENTION = 0x6,
+ SCSI_SK_DATA_PROTECT = 0x7,
+ SCSI_SK_BLANK_CHECK = 0x8,
+ SCSI_SK_VENDOR_SPECIFIC = 0x9,
+ SCSI_SK_COPY_ABORTED = 0xa,
+ SCSI_SK_ABORTED_COMMAND = 0xb,
+ SCSI_SK_VOLUME_OVERFLOW = 0xd,
+ SCSI_SK_MISCOMPARE = 0xe
+};
+
+/* Additional Sense Code / Additional Sense Code Qualifier pairs */
+enum scsi_asc_ascq {
+ SCSI_ASC_NO_ADDITIONAL_SENSE_INFO = 0x0000,
+ SCSI_ASC_LU_NOT_READY_REBUILD_IN_PROGRESS = 0x0405,
+ SCSI_ASC_WRITE_ERROR = 0x0c00,
+ SCSI_ASC_UNRECOVERED_READ_ERROR = 0x1100,
+ SCSI_ASC_INVALID_COMMAND_OPERATION_CODE = 0x2000,
+ SCSI_ASC_INVALID_FIELD_IN_CDB = 0x2400,
+ SCSI_ASC_WRITE_PROTECTED = 0x2700,
+ SCSI_ASC_NOT_READY_TO_READY_CHANGE = 0x2800,
+ SCSI_ASC_MEDIUM_NOT_PRESENT = 0x3A00,
+ SCSI_ASC_INTERNAL_TARGET_FAILURE = 0x4400
+};
+
+/**
+ * \brief SPC-2 Mode parameter
+ * This subclause describes the block descriptors and the pages
+ * used with MODE SELECT and MODE SENSE commands
+ * that are applicable to all SCSI devices.
+ */
+enum scsi_spc_mode {
+ SCSI_MS_MODE_VENDOR_SPEC = 0x00,
+ SCSI_MS_MODE_INFEXP = 0x1C, // Informational exceptions control page
+ SCSI_MS_MODE_ALL = 0x3f
+};
+
+/**
+ * \brief SPC-2 Informational exceptions control page
+ * See chapter 8.3.8
+ */
+struct spc_control_page_info_execpt {
+ uint8_t page_code;
+ uint8_t page_length;
+#define SPC_MP_INFEXP_PAGE_LENGTH 0x0A
+ uint8_t flags1;
+#define SPC_MP_INFEXP_PERF (1<<7) //!< Initiator Control
+#define SPC_MP_INFEXP_EBF (1<<5) //!< Caching Analysis Permitted
+#define SPC_MP_INFEXP_EWASC (1<<4) //!< Discontinuity
+#define SPC_MP_INFEXP_DEXCPT (1<<3) //!< Size enable
+#define SPC_MP_INFEXP_TEST (1<<2) //!< Writeback Cache Enable
+#define SPC_MP_INFEXP_LOGERR (1<<0) //!< Log errors bit
+ uint8_t mrie;
+#define SPC_MP_INFEXP_MRIE_NO_REPORT 0x00
+#define SPC_MP_INFEXP_MRIE_ASYNC_EVENT 0x01
+#define SPC_MP_INFEXP_MRIE_GEN_UNIT 0x02
+#define SPC_MP_INFEXP_MRIE_COND_RECOV_ERROR 0x03
+#define SPC_MP_INFEXP_MRIE_UNCOND_RECOV_ERROR 0x04
+#define SPC_MP_INFEXP_MRIE_NO_SENSE 0x05
+#define SPC_MP_INFEXP_MRIE_ONLY_REPORT 0x06
+ be32_t interval_timer;
+ be32_t report_count;
+};
+
+
+enum scsi_spc_mode_sense_pc {
+ SCSI_MS_SENSE_PC_CURRENT = 0,
+ SCSI_MS_SENSE_PC_CHANGEABLE = 1,
+ SCSI_MS_SENSE_PC_DEFAULT = 2,
+ SCSI_MS_SENSE_PC_SAVED = 3
+};
+
+
+
+static inline bool scsi_mode_sense_dbd_is_set(const uint8_t * cdb)
+{
+ return (cdb[1] >> 3) & 1;
+}
+
+static inline uint8_t scsi_mode_sense_get_page_code(const uint8_t * cdb)
+{
+ return cdb[2] & 0x3f;
+}
+
+static inline uint8_t scsi_mode_sense_get_pc(const uint8_t * cdb)
+{
+ return cdb[2] >> 6;
+}
+
+/**
+ * \brief SCSI Mode Parameter Header used by MODE SELECT(6) and MODE
+ * SENSE(6)
+ */
+struct scsi_mode_param_header6 {
+ uint8_t mode_data_length; //!< Number of bytes after this
+ uint8_t medium_type; //!< Medium Type
+ uint8_t device_specific_parameter; //!< Defined by command set
+ uint8_t block_descriptor_length; //!< Length of block descriptors
+};
+
+/**
+ * \brief SCSI Mode Parameter Header used by MODE SELECT(10) and MODE
+ * SENSE(10)
+ */
+struct scsi_mode_param_header10 {
+ be16_t mode_data_length; //!< Number of bytes after this
+ uint8_t medium_type; //!< Medium Type
+ uint8_t device_specific_parameter; //!< Defined by command set
+ uint8_t flags4; //!< LONGLBA in bit 0
+ uint8_t reserved;
+ be16_t block_descriptor_length; //!< Length of block descriptors
+};
+
+/**
+ * \brief SCSI Page_0 Mode Page header (SPF not set)
+ */
+struct scsi_mode_page_0_header {
+ uint8_t page_code;
+#define SCSI_PAGE_CODE_PS (1 << 7) //!< Parameters Saveable
+#define SCSI_PAGE_CODE_SPF (1 << 6) //!< SubPage Format
+ uint8_t page_length; //!< Number of bytes after this
+#define SCSI_MS_PAGE_LEN(total) ((total) - 2)
+};
+
+//@}
+
+#endif // SPC_PROTOCOL_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/usb_protocol_msc.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/usb_protocol_msc.h
new file mode 100644
index 0000000..e5ba2ac
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/msc/usb_protocol_msc.h
@@ -0,0 +1,138 @@
+/**
+ * \file
+ *
+ * \brief USB Mass Storage Class (MSC) protocol definitions.
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _USB_PROTOCOL_MSC_H_
+#define _USB_PROTOCOL_MSC_H_
+
+/**
+ * \ingroup usb_protocol_group
+ * \defgroup usb_msc_protocol USB Mass Storage Class (MSC) protocol definitions
+ *
+ * @{
+ */
+
+/**
+ * \name Possible Class value
+ */
+//@{
+#define MSC_CLASS 0x08
+//@}
+
+/**
+ * \name Possible SubClass value
+ * \note In practice, most devices should use
+ * #MSC_SUBCLASS_TRANSPARENT and specify the actual command set in
+ * the standard INQUIRY data block, even if the MSC spec indicates
+ * otherwise. In particular, RBC is not supported by certain major
+ * operating systems like Windows XP.
+ */
+//@{
+#define MSC_SUBCLASS_RBC 0x01 //!< Reduced Block Commands
+#define MSC_SUBCLASS_ATAPI 0x02 //!< CD/DVD devices
+#define MSC_SUBCLASS_QIC_157 0x03 //!< Tape devices
+#define MSC_SUBCLASS_UFI 0x04 //!< Floppy disk drives
+#define MSC_SUBCLASS_SFF_8070I 0x05 //!< Floppy disk drives
+#define MSC_SUBCLASS_TRANSPARENT 0x06 //!< Determined by INQUIRY
+//@}
+
+/**
+ * \name Possible protocol value
+ * \note Only the BULK protocol should be used in new designs.
+ */
+//@{
+#define MSC_PROTOCOL_CBI 0x00 //!< Command/Bulk/Interrupt
+#define MSC_PROTOCOL_CBI_ALT 0x01 //!< W/o command completion
+#define MSC_PROTOCOL_BULK 0x50 //!< Bulk-only
+//@}
+
+
+/**
+ * \brief MSC USB requests (bRequest)
+ */
+enum usb_reqid_msc {
+ USB_REQ_MSC_BULK_RESET = 0xFF, //!< Mass Storage Reset
+ USB_REQ_MSC_GET_MAX_LUN = 0xFE //!< Get Max LUN
+};
+
+
+COMPILER_PACK_SET(1);
+
+/**
+ * \name A Command Block Wrapper (CBW).
+ */
+//@{
+struct usb_msc_cbw {
+ le32_t dCBWSignature; //!< Must contain 'USBC'
+ le32_t dCBWTag; //!< Unique command ID
+ le32_t dCBWDataTransferLength; //!< Number of bytes to transfer
+ uint8_t bmCBWFlags; //!< Direction in bit 7
+ uint8_t bCBWLUN; //!< Logical Unit Number
+ uint8_t bCBWCBLength; //!< Number of valid CDB bytes
+ uint8_t CDB[16]; //!< SCSI Command Descriptor Block
+};
+
+#define USB_CBW_SIGNATURE 0x55534243 //!< dCBWSignature value
+#define USB_CBW_DIRECTION_IN (1<<7) //!< Data from device to host
+#define USB_CBW_DIRECTION_OUT (0<<7) //!< Data from host to device
+#define USB_CBW_LUN_MASK 0x0F //!< Valid bits in bCBWLUN
+#define USB_CBW_LEN_MASK 0x1F //!< Valid bits in bCBWCBLength
+//@}
+
+
+/**
+ * \name A Command Status Wrapper (CSW).
+ */
+//@{
+struct usb_msc_csw {
+ le32_t dCSWSignature; //!< Must contain 'USBS'
+ le32_t dCSWTag; //!< Same as dCBWTag
+ le32_t dCSWDataResidue; //!< Number of bytes not transfered
+ uint8_t bCSWStatus; //!< Status code
+};
+
+#define USB_CSW_SIGNATURE 0x55534253 //!< dCSWSignature value
+#define USB_CSW_STATUS_PASS 0x00 //!< Command Passed
+#define USB_CSW_STATUS_FAIL 0x01 //!< Command Failed
+#define USB_CSW_STATUS_PE 0x02 //!< Phase Error
+//@}
+
+COMPILER_PACK_RESET();
+
+//@}
+
+#endif // _USB_PROTOCOL_MSC_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/atxmega128a1u_xplain_a1_mkii/conf_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/atxmega128a1u_xplain_a1_mkii/conf_board.h
new file mode 100644
index 0000000..6825b7b
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/atxmega128a1u_xplain_a1_mkii/conf_board.h
@@ -0,0 +1,41 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Board configuration for spi example
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H_INCLUDED
+#define CONF_BOARD_H_INCLUDED
+
+#endif /* CONF_BOARD_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/atxmega128a1u_xplain_a1_mkii/conf_clock.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/atxmega128a1u_xplain_a1_mkii/conf_clock.h
new file mode 100644
index 0000000..844c93d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/atxmega128a1u_xplain_a1_mkii/conf_clock.h
@@ -0,0 +1,74 @@
+/**
+ * \file
+ *
+ * \brief Clock system configuration for clock example 1
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_CLOCK_H_INCLUDED
+#define CONF_CLOCK_H_INCLUDED
+
+//! Configuration using On-Chip RC oscillator at 48MHz
+//! The RC oscillator is calibrated via USB Start Of Frame
+//! Clk USB = 48MHz (used by USB)
+//! Clk sys = 48MHz
+//! Clk cpu/per = 12MHz
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_RCOSC
+#define CONFIG_OSC_RC32_CAL 48000000UL
+
+#define CONFIG_OSC_AUTOCAL OSC_ID_RC32MHZ
+#define CONFIG_OSC_AUTOCAL_REF_OSC OSC_ID_USBSOF
+
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_RC32MHZ
+#define CONFIG_SYSCLK_PSADIV SYSCLK_PSADIV_2
+#define CONFIG_SYSCLK_PSBCDIV SYSCLK_PSBCDIV_1_2
+
+/*
+//! Use external board OSC (8MHz)
+//! Clk pll = 48MHz (used by USB)
+//! Clk sys = 48MHz
+//! Clk cpu/per = 12MHz
+
+#define CONFIG_PLL0_SOURCE PLL_SRC_XOSC
+#define CONFIG_PLL0_MUL 6
+#define CONFIG_PLL0_DIV 1
+
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL
+
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL
+#define CONFIG_SYSCLK_PSADIV SYSCLK_PSADIV_2
+#define CONFIG_SYSCLK_PSBCDIV SYSCLK_PSBCDIV_1_2
+*/
+
+
+#endif /* CONF_CLOCK_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/atxmega128a1u_xplain_a1_mkii/conf_sleepmgr.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/atxmega128a1u_xplain_a1_mkii/conf_sleepmgr.h
new file mode 100644
index 0000000..699010d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/atxmega128a1u_xplain_a1_mkii/conf_sleepmgr.h
@@ -0,0 +1,43 @@
+/**
+ * \file
+ *
+ * \brief Sleep manager configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SLEEPMGR_H
+#define CONF_SLEEPMGR_H
+
+#define CONFIG_SLEEPMGR_ENABLE
+
+#endif /* CONF_SLEEPMGR_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/atxmega128a1u_xplain_a1_mkii/ui.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/atxmega128a1u_xplain_a1_mkii/ui.c
new file mode 100644
index 0000000..4128834
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/atxmega128a1u_xplain_a1_mkii/ui.c
@@ -0,0 +1,119 @@
+/**
+ * \file
+ *
+ * \brief User Interface
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "board.h"
+#include "led.h"
+#include "communication_model.h"
+#include "ui.h"
+
+void ui_init(void)
+{
+ LED_On(LEDUSB_GPIO);
+ LED_Off(LED0_GPIO);
+ LED_Off(LED1_GPIO);
+}
+
+void ui_powerdown(void)
+{
+ LED_Off(LEDUSB_GPIO);
+ LED_Off(LED0_GPIO);
+ LED_Off(LED1_GPIO);
+ LED_Off(LED2_GPIO);
+}
+
+void ui_wakeup(void)
+{
+ LED_On(LEDUSB_GPIO);
+}
+
+void ui_association(bool b_on)
+{
+ if (b_on) {
+ LED_On(LED2_GPIO);
+ } else {
+ LED_Off(LED2_GPIO);
+ }
+}
+
+void ui_process(uint16_t framenumber)
+{
+ bool b_btn_state;
+ static bool btn0_last_state = false;
+ static bool btn1_last_state = false;
+ static uint8_t cpt_sof = 0;
+
+ if (0 == framenumber) {
+ LED_On(LED0_GPIO);
+ }
+ if (1000 == framenumber) {
+ LED_Off(LED0_GPIO);
+ }
+
+ cpt_sof++;
+ if (20 > cpt_sof)
+ return;
+ cpt_sof = 0;
+
+ // Scan buttons on switch 0 (left), 1 (middle), 2 (right)
+ b_btn_state = gpio_pin_is_low(GPIO_PUSH_BUTTON_0);
+ if (b_btn_state != btn0_last_state) {
+ btn0_last_state = b_btn_state;
+ if (b_btn_state) {
+ ieee11073_com_model_send_measure_1();
+ }
+ }
+ b_btn_state = gpio_pin_is_low(GPIO_PUSH_BUTTON_1);
+ if (b_btn_state != btn1_last_state) {
+ btn1_last_state = b_btn_state;
+ if (b_btn_state) {
+ ieee11073_com_model_send_measure_2();
+ }
+ }
+}
+
+/**
+ * \defgroup UI User Iinterface
+ *
+ * Human interface on Xplain-A1:
+ * - RED led close to USB connector is always on after firmware startup
+ * - Led 0 is on when USB line is in IDLE mode, and off in SUSPEND mode
+ * - Led 1 blinks when USB Host have checked and enabled PHDC interface
+ * - Led 2 is on when PHDC has validated association
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/atxmega256a3bu_stk600-rc064x/conf_board.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/atxmega256a3bu_stk600-rc064x/conf_board.h
new file mode 100644
index 0000000..6825b7b
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/atxmega256a3bu_stk600-rc064x/conf_board.h
@@ -0,0 +1,41 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Board configuration for spi example
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_BOARD_H_INCLUDED
+#define CONF_BOARD_H_INCLUDED
+
+#endif /* CONF_BOARD_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/atxmega256a3bu_stk600-rc064x/conf_clock.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/atxmega256a3bu_stk600-rc064x/conf_clock.h
new file mode 100644
index 0000000..0475dbb
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/atxmega256a3bu_stk600-rc064x/conf_clock.h
@@ -0,0 +1,68 @@
+/**
+ * \file
+ *
+ * \brief Clock system configuration for clock example 1
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_CLOCK_H_INCLUDED
+#define CONF_CLOCK_H_INCLUDED
+
+
+// Use internal 32MRC @48MHz
+// Clk cpu/per = 12MHz
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_RCOSC
+#define CONFIG_OSC_RC32_CAL 48000000UL
+
+#define CONFIG_SYSCLK_SOURCE CLK_SCLKSEL_RC32M_gc
+#define CONFIG_SYSCLK_PSADIV SYSCLK_PSADIV_2
+#define CONFIG_SYSCLK_PSBCDIV SYSCLK_PSBCDIV_1_2
+
+#define CONFIG_OSC_AUTOCAL OSC_ID_RC32MHZ
+#define CONFIG_OSC_AUTOCAL_REF_OSC OSC_ID_USBSOF
+
+/*
+// Use external 8MHz clock and PLL
+// Clk cpu/per = 12MHz
+#define CONFIG_PLL0_SOURCE PLL_SRC_XOSC
+#define CONFIG_PLL0_MUL 6
+#define CONFIG_PLL0_DIV 1
+
+#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL
+
+#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL
+#define CONFIG_SYSCLK_PSADIV SYSCLK_PSADIV_2
+#define CONFIG_SYSCLK_PSBCDIV SYSCLK_PSBCDIV_1_2
+*/
+
+#endif /* CONF_CLOCK_H_INCLUDED */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/atxmega256a3bu_stk600-rc064x/conf_sleepmgr.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/atxmega256a3bu_stk600-rc064x/conf_sleepmgr.h
new file mode 100644
index 0000000..699010d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/atxmega256a3bu_stk600-rc064x/conf_sleepmgr.h
@@ -0,0 +1,43 @@
+/**
+ * \file
+ *
+ * \brief Sleep manager configuration
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef CONF_SLEEPMGR_H
+#define CONF_SLEEPMGR_H
+
+#define CONFIG_SLEEPMGR_ENABLE
+
+#endif /* CONF_SLEEPMGR_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/atxmega256a3bu_stk600-rc064x/ui.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/atxmega256a3bu_stk600-rc064x/ui.c
new file mode 100644
index 0000000..be43bb2
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/atxmega256a3bu_stk600-rc064x/ui.c
@@ -0,0 +1,116 @@
+/**
+ * \file
+ *
+ * \brief User Interface
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "board.h"
+#include "led.h"
+#include "communication_model.h"
+#include "ui.h"
+
+void ui_init(void)
+{
+ LED_Off(LED0_GPIO);
+ LED_Off(LED1_GPIO);
+}
+
+void ui_powerdown(void)
+{
+ LED_Off(LED0_GPIO);
+ LED_Off(LED1_GPIO);
+ LED_Off(LED2_GPIO);
+}
+
+void ui_wakeup(void)
+{
+}
+
+void ui_association(bool b_on)
+{
+ if (b_on) {
+ LED_On(LED2_GPIO);
+ } else {
+ LED_Off(LED2_GPIO);
+ }
+}
+
+void ui_process(uint16_t framenumber)
+{
+ bool b_btn_state;
+ static bool btn0_last_state = false;
+ static bool btn1_last_state = false;
+ static uint8_t cpt_sof = 0;
+
+ if (0 == framenumber) {
+ LED_On(LED0_GPIO);
+ }
+ if (1000 == framenumber) {
+ LED_Off(LED0_GPIO);
+ }
+
+ cpt_sof++;
+ if (20 > cpt_sof)
+ return;
+ cpt_sof = 0;
+
+ // Scan buttons on switch 0 (left), 1 (middle), 2 (right)
+ b_btn_state = gpio_pin_is_low(GPIO_PUSH_BUTTON_0);
+ if (b_btn_state != btn0_last_state) {
+ btn0_last_state = b_btn_state;
+ if (b_btn_state) {
+ ieee11073_com_model_send_measure_1();
+ }
+ }
+ b_btn_state = gpio_pin_is_low(GPIO_PUSH_BUTTON_1);
+ if (b_btn_state != btn1_last_state) {
+ btn1_last_state = b_btn_state;
+ if (b_btn_state) {
+ ieee11073_com_model_send_measure_2();
+ }
+ }
+}
+
+/**
+ * \defgroup UI User Iinterface
+ *
+ * Human interface on Xplain-A1:
+ * - RED led close to USB connector is always on after firmware startup
+ * - Led 0 is on when USB line is in IDLE mode, and off in SUSPEND mode
+ * - Led 1 blinks when USB Host have checked and enabled PHDC interface
+ * - Led 2 is on when PHDC has validated association
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/conf_usb.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/conf_usb.h
new file mode 100644
index 0000000..e0856ab
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/conf_usb.h
@@ -0,0 +1,143 @@
+/**
+ * \file
+ *
+ * \brief USB configuration file
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _CONF_USB_H_
+#define _CONF_USB_H_
+
+#include "compiler.h"
+
+/**
+ * USB Device Configuration
+ * @{
+ */
+
+//! Device definition (mandatory)
+#define USB_DEVICE_VENDOR_ID USB_VID_ATMEL
+#define USB_DEVICE_PRODUCT_ID USB_PID_ATMEL_AVR_PHDC
+#define USB_DEVICE_MAJOR_VERSION 1
+#define USB_DEVICE_MINOR_VERSION 0
+#define USB_DEVICE_POWER 100 // Consumption on Vbus line (mA)
+#define USB_DEVICE_ATTR \
+ (USB_CONFIG_ATTR_SELF_POWERED)
+// (USB_CONFIG_ATTR_BUS_POWERED)
+// (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_SELF_POWERED)
+// (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_BUS_POWERED)
+
+//! USB Device string definitions (Optional)
+#define USB_DEVICE_MANUFACTURE_NAME "ATMEL AVR"
+#define USB_DEVICE_PRODUCT_NAME "PHDC"
+// #define USB_DEVICE_SERIAL_NAME "12...EF"
+
+/**
+ * Device speeds support
+ * Low speed is not authorized
+ * @{
+ */
+//! To authorize the High speed
+#if (UC3A3||UC3A4)
+//#define USB_DEVICE_HS_SUPPORT
+#endif
+//@}
+
+/**
+ * USB Device Callbacks definitions (Optional)
+ * @{
+ */
+#define UDC_VBUS_EVENT(b_vbus_high) main_vbus_action(b_vbus_high)
+#define UDC_SOF_EVENT() main_sof_action()
+#define UDC_SUSPEND_EVENT() main_suspend_action()
+#define UDC_RESUME_EVENT() main_resume_action()
+//! Mandatory when USB_DEVICE_ATTR authorizes remote wakeup feature
+// #define UDC_REMOTEWAKEUP_ENABLE() user_callback_remotewakeup_enable()
+// #define UDC_REMOTEWAKEUP_DISABLE() user_callback_remotewakeup_disable()
+//! When a extra string descriptor must be supported
+//! other than manufacturer, product and serial string
+// #define UDC_GET_EXTRA_STRING()
+//@}
+//@}
+
+
+
+/**
+ * USB Interface Configuration
+ * @{
+ */
+
+/**
+ * Configuration of PHDC interface
+ * @{
+ */
+//! Interface callback definition
+#define UDI_PHDC_ENABLE_EXT() main_phdc_enable()
+#define UDI_PHDC_DISABLE_EXT() main_phdc_disable()
+
+//! Select data format of application
+//! USB_PHDC_DATAMSG_FORMAT_VENDOR or USB_PHDC_DATAMSG_FORMAT_11073_20601
+#define UDI_PHDC_DATAMSG_FORMAT USB_PHDC_DATAMSG_FORMAT_11073_20601
+//! If USB_PHDC_DATAMSG_FORMAT_11073_20601 then define specialization(s)
+#define UDI_PHDC_SPECIALIZATION {0x2345} // Define in 11073_20601
+
+//! Defines the QOS need for each transfer direction
+#define UDI_PHDC_QOS_OUT \
+ (USB_PHDC_QOS_MEDIUM_BETTER|USB_PHDC_QOS_HIGH_BEST)
+#define UDI_PHDC_QOS_IN \
+ (USB_PHDC_QOS_LOW_GOOD|USB_PHDC_QOS_MEDIUM_BETTER|USB_PHDC_QOS_MEDIUM_BEST)
+
+//! The following METADATAs can be send during USB enumeration
+//! for each endpoints (optional).
+//! It can define the Opaque data format of each endpoints
+//! These must be upto 253 and recomanded <30
+#define UDI_PHDC_METADATA_DESC_BULK_IN {0x01,0x02,0x03}
+#define UDI_PHDC_METADATA_DESC_BULK_OUT {0x01,0x02,0x03}
+#define UDI_PHDC_METADATA_DESC_INT_IN {0x01,0x02,0x03}
+//@}
+
+//@}
+
+
+/**
+ * USB Device Driver Configuration
+ * @{
+ */
+//@}
+
+//! The includes of classes and other headers must be done at the end of this file to avoid compile error
+#include "udi_phdc_conf.h"
+#include "main.h"
+
+#endif // _CONF_USB_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/main.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/main.c
new file mode 100644
index 0000000..df9bc01
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/main.c
@@ -0,0 +1,143 @@
+/**
+ * \file
+ *
+ * \brief Main functions
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "preprocessor.h"
+#include "board.h"
+#include "gpio.h"
+#include "sysclk.h"
+#include "sleepmgr.h"
+#include "conf_usb.h"
+#include "udd.h"
+#include "udc.h"
+#include "udi_phdc.h"
+#include "ui.h"
+#include "communication_model.h"
+
+static bool main_b_phdc_enable = false;
+
+
+/*! \brief Main function. Execution starts here.
+ */
+int main(void)
+{
+ irq_initialize_vectors();
+ cpu_irq_enable();
+
+ // Initialize the sleep manager
+ sleepmgr_init();
+
+ sysclk_init();
+ board_init();
+ ui_init();
+ ui_powerdown();
+
+ // Start USB stack to authorize VBus monitoring
+ udc_start();
+
+ if (!udc_include_vbus_monitoring()) {
+ // VBUS monitoring is not available on this product
+ // thereby VBUS has to be considered as present
+ main_vbus_action(true);
+ }
+
+ // The main loop manages only the power mode
+ // because the USB management is done by interrupt
+ while (true) {
+ sleepmgr_enter_sleep();
+ if (main_b_phdc_enable) {
+ if (ieee11073_com_model_process()) {
+ ui_association(true); // Association Ok
+ } else {
+ ui_association(false); // No association
+
+
+
+
+
+
+
+ }
+ }
+ }
+}
+
+void main_vbus_action(bool b_high)
+{
+ if (b_high) {
+ // Attach USB Device
+ udc_attach();
+ } else {
+ // VBUS not present
+ udc_detach();
+ }
+}
+
+void main_suspend_action(void)
+{
+ ui_powerdown();
+}
+
+void main_resume_action(void)
+{
+ ui_wakeup();
+}
+
+void main_sof_action(void)
+{
+ if (!main_b_phdc_enable)
+ return;
+ ui_process(udd_get_frame_number());
+}
+
+bool main_phdc_enable(void)
+{
+ main_b_phdc_enable = ieee11073_com_model_enable();
+ return main_b_phdc_enable;
+}
+
+void main_phdc_disable(void)
+{
+ main_b_phdc_enable = false;
+ ieee11073_com_model_disable();
+}
+
+/**
+ * \mainpage ASF USB Device PHDC
+ * TODO
+ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/main.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/main.h
new file mode 100644
index 0000000..f20864a
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/main.h
@@ -0,0 +1,74 @@
+/**
+ * \file
+ *
+ * \brief Main functions for PHDC example
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _MAIN_H_
+#define _MAIN_H_
+
+#include "usb_protocol_phdc.h"
+
+/*! \brief Called by PHDC interface
+ * Callback running when USB Host enable CDC interface
+ *
+ * \retval true if phdc startup is ok
+ */
+bool main_phdc_enable(void);
+
+/*! \brief Called by PHDC interface
+ * Callback running when USB Host disable phdc interface
+ */
+void main_phdc_disable(void);
+
+/*! \brief Called when Vbus line state change
+ */
+void main_vbus_action(bool b_high);
+
+/*! \brief Called when a start of frame is received on USB line
+ */
+void main_sof_action(void);
+
+/*! \brief Called by UDD when a suspend is received
+ * Callback running when USB Host set USB line in suspend state
+ */
+void main_suspend_action(void);
+
+/*! \brief Called by UDD when the USB line exit of suspend state
+ */
+void main_resume_action(void);
+
+
+#endif // _MAIN_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/ui.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/ui.h
new file mode 100644
index 0000000..c448065
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/example/ui.h
@@ -0,0 +1,61 @@
+/**
+ * \file
+ *
+ * \brief Common User Interface for PHDC application
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _UI_H_
+#define _UI_H_
+
+/*! \brief Called at firmware startup
+ */
+void ui_init(void);
+
+/*! \brief Called before enter in powerdown mode
+ */
+void ui_powerdown(void);
+
+/*! \brief Called when CPU exit of powerdown mode
+ */
+void ui_wakeup(void);
+
+void ui_association(bool b_on);
+
+/*! \brief This process is called each 1ms
+ * It is called only if PHDC interface is enable.
+ */
+void ui_process(uint16_t framenumber);
+
+#endif // _UI_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/module_config/conf_usb.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/module_config/conf_usb.h
new file mode 100644
index 0000000..d1accb2
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/module_config/conf_usb.h
@@ -0,0 +1,144 @@
+/**
+ * \file
+ *
+ * \brief USB configuration file
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _CONF_USB_H_
+#define _CONF_USB_H_
+
+#include "compiler.h"
+
+#warning You must refill the following definitions with a correct values
+
+/**
+ * USB Device Configuration
+ * @{
+ */
+
+//! Device definition (mandatory)
+#define USB_DEVICE_VENDOR_ID 0x0000
+#define USB_DEVICE_PRODUCT_ID 0x0000
+#define USB_DEVICE_MAJOR_VERSION 1
+#define USB_DEVICE_MINOR_VERSION 0
+#define USB_DEVICE_POWER 100 // Consumption on Vbus line (mA)
+#define USB_DEVICE_ATTR \
+ (USB_CONFIG_ATTR_SELF_POWERED)
+// (USB_CONFIG_ATTR_BUS_POWERED)
+// (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_SELF_POWERED)
+// (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_BUS_POWERED)
+
+//! USB Device string definitions (Optional)
+// #define USB_DEVICE_MANUFACTURE_NAME "Manufacture name"
+// #define USB_DEVICE_PRODUCT_NAME "Product name"
+// #define USB_DEVICE_SERIAL_NAME "12...EF"
+
+/**
+ * Device speeds support
+ * Low speed is not authorized
+ * @{
+ */
+//! To authorize the High speed
+#if (UC3A3||UC3A4)
+//#define USB_DEVICE_HS_SUPPORT
+#endif
+//@}
+
+/**
+ * USB Device Callbacks definitions (Optional)
+ * @{
+ */
+// #define UDC_VBUS_EVENT(b_vbus_high) user_callback_vbus_action(b_vbus_high)
+// #define UDC_SOF_EVENT() user_callback_sof_action()
+// #define UDC_SUSPEND_EVENT() user_callback_suspend_action()
+// #define UDC_RESUME_EVENT() user_callback_resume_action()
+//! Mandatory when USB_DEVICE_ATTR authorizes remote wakeup feature
+// #define UDC_REMOTEWAKEUP_ENABLE() user_callback_remotewakeup_enable()
+// #define UDC_REMOTEWAKEUP_DISABLE() user_callback_remotewakeup_disable()
+//! When a extra string descriptor must be supported
+//! other than manufacturer, product and serial string
+// #define UDC_GET_EXTRA_STRING()
+//@}
+//@}
+
+
+
+/**
+ * USB Interface Configuration
+ * @{
+ */
+
+/**
+ * Configuration of PHDC interface
+ * @{
+ */
+//! Interface callback definition
+#define UDI_PHDC_ENABLE_EXT() true
+#define UDI_PHDC_DISABLE_EXT()
+
+//! Select data format of application
+//! USB_PHDC_DATAMSG_FORMAT_VENDOR or USB_PHDC_DATAMSG_FORMAT_11073_20601
+#define UDI_PHDC_DATAMSG_FORMAT USB_PHDC_DATAMSG_FORMAT_11073_20601
+//! If USB_PHDC_DATAMSG_FORMAT_11073_20601 then define specialization(s)
+#define UDI_PHDC_SPECIALIZATION {0x2345} // Define in 11073_20601
+
+//! Defines the QOS need for each transfer direction
+#define UDI_PHDC_QOS_OUT \
+ (USB_PHDC_QOS_MEDIUM_BETTER|USB_PHDC_QOS_HIGH_BEST)
+#define UDI_PHDC_QOS_IN \
+ (USB_PHDC_QOS_LOW_GOOD|USB_PHDC_QOS_MEDIUM_BETTER|USB_PHDC_QOS_MEDIUM_BEST)
+
+//! The following METADATAs can be send during USB enumeration
+//! for each endpoints (optional).
+//! It can define the Opaque data format of each endpoints
+//! These must be upto 253 and recomanded <30
+#define UDI_PHDC_METADATA_DESC_BULK_IN {0x01,0x02,0x03}
+#define UDI_PHDC_METADATA_DESC_BULK_OUT {0x01,0x02,0x03}
+#define UDI_PHDC_METADATA_DESC_INT_IN {0x01,0x02,0x03}
+//@}
+
+//@}
+
+
+/**
+ * USB Device Driver Configuration
+ * @{
+ */
+//@}
+
+//! The includes of classes and other headers must be done at the end of this file to avoid compile error
+#include "udi_phdc_conf.h"
+
+#endif // _CONF_USB_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/udi_phdc.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/udi_phdc.c
new file mode 100644
index 0000000..96e8db3
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/udi_phdc.c
@@ -0,0 +1,590 @@
+/**
+ * \file
+ *
+ * \brief USB Device Personal Healthcare Device Class (PHDC) interface.
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "conf_usb.h"
+#include "usb_protocol.h"
+#include "usb_protocol_phdc.h"
+#include "udd.h"
+#include "udc.h"
+#include "udi_phdc.h"
+#include <string.h>
+
+#if ((UDI_PHDC_QOS_OUT&USB_PHDC_QOS_LOW_GOOD)==USB_PHDC_QOS_LOW_GOOD)
+# error LOW-GOOD (latency-reliability) is not authorized on OUT bulk endpoint
+#endif
+
+/**
+ * \addtogroup udi_phdc_group
+ * @{
+ */
+
+/**
+ * \name Interface for UDC
+ */
+//@{
+
+bool udi_phdc_enable(void);
+void udi_phdc_disable(void);
+bool udi_phdc_setup(void);
+uint8_t udi_phdc_getsetting(void);
+
+//! Global struture which contains standard UDI API for UDC
+UDC_DESC_STORAGE udi_api_t udi_api_phdc = {
+ .enable = udi_phdc_enable,
+ .disable = udi_phdc_disable,
+ .setup = udi_phdc_setup,
+ .getsetting = udi_phdc_getsetting,
+};
+
+//@}
+
+
+/**
+ * \name Internal variables to manage PHDC
+ */
+//@{
+
+//! Variable to store the transfer pending flag
+static le16_t udi_phdc_holding_data;
+
+//! Flag to signal the state of preample feature
+static uint8_t udi_phdc_preample_feature;
+
+COMPILER_PACK_SET(1);
+
+//! Structure to manage the transfer on PHDC IN endpoints
+static struct {
+ bool b_run;
+ bool b_preample_run;
+#if (UDI_PHDC_PREAMBLE_FEATURE == TRUE)
+ usb_phdc_metadata_msg_t preample_header;
+ uint8_t preample_opaque_data[UDI_PHDC_EP_SIZE_BULK_IN -
+ sizeof(usb_phdc_metadata_msg_t)];
+#endif
+ udi_phdc_metadata_t *metadata;
+ uint16_t metadata_pos;
+ void (*callback) (uint16_t);
+ void *cntx;
+} udi_phdc_in_trans;
+
+//! Structure to manage the transfer on PHDC OUT endpoint
+static struct {
+ bool b_run;
+ bool b_preample_run;
+#if (UDI_PHDC_PREAMBLE_FEATURE == TRUE)
+ usb_phdc_metadata_msg_t preample_header;
+ uint8_t preample_opaque_data[UDI_PHDC_EP_SIZE_BULK_OUT -
+ sizeof(usb_phdc_metadata_msg_t)];
+#endif
+ udi_phdc_metadata_t *metadata;
+ uint16_t metadata_pos;
+ void (*callback) (uint16_t);
+ void *cntx;
+} udi_phdc_out_trans;
+
+COMPILER_PACK_RESET();
+
+//@}
+
+
+/**
+ * \name Internal routines
+ */
+//@{
+
+/*! \brief This function sends a preample message
+ *
+ * \retval true when success
+ */
+static bool udi_phdc_send_preamplemsg(void);
+
+/*! \brief Callback called when preample message is sent
+ *
+ * \retval status Transfer state (UDD_EP_TRANSFER_ABORT/_OK)
+ * \retval nb_send Number of data sent
+ */
+void udi_phdc_preamplemsg_ack(udd_ep_status_t status, iram_size_t nb_send);
+
+/*! \brief This function sends a metadata
+ *
+ * \retval true when success
+ */
+static bool udi_phdc_send_metadata(void);
+
+/*! \brief Callback called when metadata is sent
+ *
+ * \retval status Transfer state (UDD_EP_TRANSFER_ABORT/_OK)
+ * \retval nb_send Number of data sent
+ */
+void udi_phdc_metadata_ack(udd_ep_status_t status, iram_size_t nb_send);
+
+/*! \brief This function requests a preample message
+ *
+ * \retval true when success
+ */
+static bool udi_phdc_wait_preamplemsg(void);
+
+/*! \brief Callback called when metadata is received
+ *
+ * \retval status Transfer state (UDD_EP_TRANSFER_ABORT/_OK)
+ * \retval nb_received Number of data received
+ */
+void udi_phdc_received_preample(udd_ep_status_t status,
+ iram_size_t nb_received);
+
+/*! \brief This function request metadata
+ *
+ * \retval true when success
+ */
+static bool udi_phdc_wait_metadata(void);
+
+/*! \brief Callback called when metadata is received
+ *
+ * \retval status Transfer state (UDD_EP_TRANSFER_ABORT/_OK)
+ * \retval nb_received Number of data received
+ */
+void udi_phdc_received_metadata(udd_ep_status_t status,
+ iram_size_t nb_received);
+
+//@}
+
+
+//--------------------------------------------
+//------ Interface for UDC
+
+bool udi_phdc_enable(void)
+{
+ uint8_t sig_tmp[] = METADATA_MESSAGE_SIG;
+
+ // Enable external component of PHDC interface
+ udi_phdc_preample_feature = false;
+ udi_phdc_holding_data = 0;
+ udi_phdc_in_trans.b_run = false;
+ udi_phdc_out_trans.b_run = false;
+ // Init struct signature
+ memcpy(udi_phdc_in_trans.preample_header.aSignature, sig_tmp,
+ sizeof(sig_tmp));
+ udi_phdc_in_trans.preample_header.bQoSEncodingVersion =
+ USB_PHDC_QOS_ENCODING_VERSION_1;
+ return UDI_PHDC_ENABLE_EXT();
+}
+
+
+void udi_phdc_disable(void)
+{
+ UDI_PHDC_DISABLE_EXT();
+}
+
+
+bool udi_phdc_setup(void)
+{
+ udd_ep_id_t ep_num;
+
+ //** Interface requests
+ if (Udd_setup_is_in()) {
+ // Requests Interface GET
+ if (udd_g_ctrlreq.req.wLength == 0)
+ return false; // Error for USB host
+
+ if (Udd_setup_type() == USB_REQ_TYPE_CLASS) {
+ // Requests Class Interface Get
+ switch (udd_g_ctrlreq.req.bRequest) {
+ case USB_REQ_GET_STATUS:
+ if (udd_g_ctrlreq.req.wValue != 0)
+ return false;
+ if (udd_g_ctrlreq.req.wLength !=
+ sizeof(udi_phdc_holding_data))
+ return false;
+ udd_g_ctrlreq.payload =
+ (uint8_t *) &
+ udi_phdc_holding_data;
+ udd_g_ctrlreq.payload_size =
+ sizeof(udi_phdc_holding_data);
+ return true;
+ }
+ }
+ }
+ if (Udd_setup_is_out()) {
+ // Requests Interface SET
+ if (Udd_setup_type() == USB_REQ_TYPE_CLASS) {
+ // Requests Class Interface Set
+ switch (udd_g_ctrlreq.req.bRequest) {
+
+#if (UDI_PHDC_PREAMBLE_FEATURE == TRUE)
+ case USB_REQ_CLEAR_FEATURE:
+ if ((udd_g_ctrlreq.req.wValue & 0xFF) !=
+ USB_PHDC_FEATURE_METADATA)
+ return false;
+ if ((udd_g_ctrlreq.req.wValue >> 8) != 0)
+ return false;
+ if (0 != udi_phdc_holding_data) {
+#if ((UDI_PHDC_QOS_IN&USB_PHDC_QOS_LOW_GOOD)==USB_PHDC_QOS_LOW_GOOD)
+ if (USB_PHDC_QOS_LOW_GOOD ==
+ udi_phdc_in_trans.metadata->
+ qos)
+ ep_num = UDI_PHDC_EP_INTERRUPT_IN;
+ else
+#endif
+ ep_num = UDI_PHDC_EP_BULK_IN;
+ udd_ep_abort(ep_num);
+ }
+ udi_phdc_preample_feature = false;
+ if (udi_phdc_out_trans.b_run) {
+ // Kill waiting transfer to start new one
+ udd_ep_abort(UDI_PHDC_EP_BULK_OUT);
+ }
+ return true;
+
+ case USB_REQ_SET_FEATURE:
+ if (udd_g_ctrlreq.req.wLength != 0)
+ return false;
+ if ((udd_g_ctrlreq.req.wValue & 0xFF) !=
+ USB_PHDC_FEATURE_METADATA)
+ return false;
+ if ((udd_g_ctrlreq.req.wValue >> 8) !=
+ USB_PHDC_QOS_ENCODING_VERSION_1)
+ return false;
+ if (0 != udi_phdc_holding_data) {
+#if ((UDI_PHDC_QOS_IN&USB_PHDC_QOS_LOW_GOOD)==USB_PHDC_QOS_LOW_GOOD)
+ if (USB_PHDC_QOS_LOW_GOOD ==
+ udi_phdc_in_trans.metadata->
+ qos)
+ ep_num = UDI_PHDC_EP_INTERRUPT_IN;
+ else
+#endif
+ ep_num = UDI_PHDC_EP_BULK_IN;
+ udd_ep_abort(ep_num);
+ }
+ udi_phdc_preample_feature = true;
+ if (udi_phdc_out_trans.b_run) {
+ // Kill waiting transfer to start new one
+ udd_ep_abort(UDI_PHDC_EP_BULK_OUT);
+ }
+ return true;
+#endif
+ }
+ }
+ }
+ return false; // Not supported request
+}
+
+
+uint8_t udi_phdc_getsetting(void)
+{
+ return 0; // Always 0, no alternate setting on this interface
+}
+
+
+//--------------------------------------------
+//------ Interface for application
+
+bool udi_phdc_senddata(udi_phdc_metadata_t * metadata,
+ void (*callback) (uint16_t))
+{
+ bool b_status;
+ irqflags_t flags;
+ uint8_t qos = metadata->qos;
+
+ // Check qos: Only one bit must be set in qos
+ if ((0 == qos) || (0 != (qos & (qos - 1))))
+ return false; // bad qos value
+
+ // Check if qos is supported
+ if (0 == (qos & UDI_PHDC_QOS_IN))
+ return false; // qos not supported
+
+ if (udi_phdc_in_trans.b_run)
+ return false; // transfer already running
+
+ // Init transfer
+ udi_phdc_in_trans.metadata = metadata;
+ udi_phdc_in_trans.metadata_pos = 0;
+ udi_phdc_in_trans.callback = callback;
+ udi_phdc_in_trans.b_preample_run = false;
+
+ flags = cpu_irq_save();
+#if (UDI_PHDC_PREAMBLE_FEATURE == TRUE)
+ // It is a bulk then check preample feature
+ if ((USB_PHDC_QOS_LOW_GOOD != qos)
+ && (udi_phdc_preample_feature)) {
+ b_status = udi_phdc_send_preamplemsg();
+ } else
+#endif
+ b_status = udi_phdc_send_metadata();
+ cpu_irq_restore(flags);
+ return b_status;
+}
+
+
+bool udi_phdc_waitdata(udi_phdc_metadata_t * metadata,
+ void (*callback) (uint16_t))
+{
+ bool b_status;
+ irqflags_t flags;
+
+ if (udi_phdc_out_trans.b_run)
+ return false; // transfer already running
+
+ // Init transfer
+ udi_phdc_out_trans.metadata = metadata;
+ udi_phdc_out_trans.metadata_pos = 0;
+ udi_phdc_out_trans.callback = callback;
+
+ flags = cpu_irq_save();
+#if (UDI_PHDC_PREAMBLE_FEATURE == TRUE)
+ // It is a bulk then check preample feature
+ if (udi_phdc_preample_feature) {
+ b_status = udi_phdc_wait_preamplemsg();
+ } else
+#endif
+ {
+ // Enable of wait data
+#if (UDI_PHDC_PREAMBLE_FEATURE == TRUE)
+ udi_phdc_out_trans.preample_header.bmLatencyReliability = 0;
+#else
+ udi_phdc_out_trans.preample_header.bmLatencyReliability =
+ UDI_PHDC_QOS_OUT;
+#endif
+ udi_phdc_out_trans.preample_header.bNumTransfers =
+ udi_phdc_out_trans.metadata->metadata_size /
+ UDI_PHDC_EP_SIZE_BULK_OUT;
+ b_status = udi_phdc_wait_metadata();
+ }
+
+ cpu_irq_restore(flags);
+ return b_status;
+}
+
+
+//--------------------------------------------
+//------ Internal routines
+
+static bool udi_phdc_send_preamplemsg(void)
+{
+ if ((UDI_PHDC_EP_SIZE_BULK_IN - 1 - sizeof(usb_phdc_metadata_msg_t))
+ < udi_phdc_in_trans.metadata->opaque_size)
+ return false; // Opaque data too large
+ // Fill preample message
+ udi_phdc_in_trans.preample_header.bNumTransfers =
+ 1 + ((udi_phdc_in_trans.metadata->metadata_size -
+ 1) / UDI_PHDC_EP_SIZE_BULK_IN);
+ udi_phdc_in_trans.preample_header.bmLatencyReliability =
+ udi_phdc_in_trans.metadata->qos;
+ udi_phdc_in_trans.preample_header.bOpaqueDataSize =
+ udi_phdc_in_trans.metadata->opaque_size;
+ memcpy(udi_phdc_in_trans.preample_opaque_data,
+ udi_phdc_in_trans.metadata->opaquedata,
+ udi_phdc_in_trans.metadata->opaque_size);
+ // Send preample message
+ if (!udd_ep_run(UDI_PHDC_EP_BULK_IN,
+ false,
+ (uint8_t *) &
+ udi_phdc_in_trans.preample_header,
+ udi_phdc_in_trans.
+ preample_header.bOpaqueDataSize +
+ sizeof(usb_phdc_metadata_msg_t),
+ udi_phdc_preamplemsg_ack)) {
+ return false;
+ }
+ udi_phdc_in_trans.b_run = true;
+ udi_phdc_in_trans.b_preample_run = true;
+ udi_phdc_holding_data |=
+ 1 << (UDI_PHDC_EP_SIZE_BULK_IN & USB_EP_ADDR_MASK);
+ return true;
+}
+
+
+void udi_phdc_preamplemsg_ack(udd_ep_status_t status, iram_size_t nb_send)
+{
+ // Preample sending
+ udi_phdc_in_trans.b_run = false;
+ udi_phdc_holding_data &=
+ ~(1 << (UDI_PHDC_EP_SIZE_BULK_IN & USB_EP_ADDR_MASK));
+ udi_phdc_in_trans.b_preample_run = false;
+ if (UDD_EP_TRANSFER_ABORT == status) {
+ // Transfer abort
+ udi_phdc_in_trans.callback(0);
+ return;
+ }
+ if (!udi_phdc_send_metadata()) {
+ // Transfer metadata impossible
+ udi_phdc_in_trans.callback(0);
+ }
+}
+
+
+static bool udi_phdc_send_metadata(void)
+{
+ udd_ep_id_t ep_num;
+
+#if ((UDI_PHDC_QOS_IN&USB_PHDC_QOS_LOW_GOOD)==USB_PHDC_QOS_LOW_GOOD)
+ if (USB_PHDC_QOS_LOW_GOOD == udi_phdc_in_trans.metadata->qos)
+ ep_num = UDI_PHDC_EP_INTERRUPT_IN;
+ else
+#endif
+ ep_num = UDI_PHDC_EP_BULK_IN;
+
+ // Send data
+ if (!udd_ep_run(ep_num, false, udi_phdc_in_trans.metadata->metadata,
+ udi_phdc_in_trans.
+ metadata->metadata_size,
+ udi_phdc_metadata_ack)) {
+ // Error then end of transfer
+ return false;
+ }
+ // Uptade struct
+ udi_phdc_holding_data |= 1 << (ep_num & USB_EP_ADDR_MASK);
+ udi_phdc_in_trans.b_run = true;
+ return true;
+}
+
+
+void udi_phdc_metadata_ack(udd_ep_status_t status, iram_size_t nb_send)
+{
+ udd_ep_id_t ep_num;
+
+#if ((UDI_PHDC_QOS_IN&USB_PHDC_QOS_LOW_GOOD)==USB_PHDC_QOS_LOW_GOOD)
+ if (USB_PHDC_QOS_LOW_GOOD == udi_phdc_in_trans.metadata->qos)
+ ep_num = UDI_PHDC_EP_INTERRUPT_IN;
+ else
+#endif
+ ep_num = UDI_PHDC_EP_BULK_IN;
+
+ udi_phdc_in_trans.b_run = false;
+ udi_phdc_holding_data &= ~(1 << (ep_num & USB_EP_ADDR_MASK));
+ udi_phdc_in_trans.callback(nb_send);
+}
+
+#if (UDI_PHDC_PREAMBLE_FEATURE == TRUE)
+static bool udi_phdc_wait_preamplemsg(void)
+{
+ // Enable the reception of preample message
+ if (!udd_ep_run(UDI_PHDC_EP_BULK_OUT,
+ false,
+ (uint8_t *) &
+ udi_phdc_out_trans.preample_header,
+ UDI_PHDC_EP_SIZE_BULK_OUT,
+ udi_phdc_received_preample))
+ return false;
+ udi_phdc_out_trans.b_run = true;
+ udi_phdc_out_trans.b_preample_run = true;
+ return true;
+}
+
+
+void udi_phdc_received_preample(udd_ep_status_t status, iram_size_t nb_received)
+{
+ uint8_t sig_tmp[] = METADATA_MESSAGE_SIG;
+
+ udi_phdc_out_trans.b_preample_run = false;
+
+ // Check preample integrity
+ if (UDD_EP_TRANSFER_ABORT == status)
+ goto udi_phdc_received_preample_abort;
+
+ if (nb_received < sizeof(usb_phdc_metadata_msg_t))
+ goto udi_phdc_received_preample_bad;
+ if (0 != memcmp(udi_phdc_out_trans.preample_header.aSignature, sig_tmp,
+ sizeof(sig_tmp)))
+ goto udi_phdc_received_preample_bad;
+ if (0 == udi_phdc_out_trans.preample_header.bNumTransfers)
+ goto udi_phdc_received_preample_bad;
+ if (USB_PHDC_QOS_ENCODING_VERSION_1 !=
+ udi_phdc_out_trans.preample_header.bQoSEncodingVersion)
+ goto udi_phdc_received_preample_bad;
+ if (0 != (udi_phdc_out_trans.preample_header.bmLatencyReliability
+ & (udi_phdc_out_trans.
+ preample_header.bmLatencyReliability
+ - 1)))
+ goto udi_phdc_received_preample_bad;
+ if (0 == (UDI_PHDC_QOS_OUT & udi_phdc_out_trans.
+ preample_header.bmLatencyReliability))
+ goto udi_phdc_received_preample_bad;
+ if (nb_received !=
+ (udi_phdc_out_trans.preample_header.bOpaqueDataSize +
+ sizeof(usb_phdc_metadata_msg_t)))
+ goto udi_phdc_received_preample_bad;
+
+ udi_phdc_out_trans.metadata->opaque_size =
+ udi_phdc_out_trans.preample_header.bOpaqueDataSize;
+ udi_phdc_out_trans.metadata->opaquedata =
+ udi_phdc_out_trans.preample_opaque_data;
+
+ if (!udi_phdc_wait_metadata())
+ goto udi_phdc_received_preample_bad;
+ return;
+
+udi_phdc_received_preample_bad:
+ // Bad preample message then stall this endpoint
+ udd_ep_set_halt(UDI_PHDC_EP_BULK_OUT);
+udi_phdc_received_preample_abort:
+ udi_phdc_out_trans.b_run = false;
+ udi_phdc_out_trans.callback(0);
+}
+#endif
+
+
+static bool udi_phdc_wait_metadata(void)
+{
+ // Check output buffer size
+ if (udi_phdc_out_trans.metadata->metadata_size
+ <
+ (udi_phdc_out_trans.preample_header.bNumTransfers *
+ UDI_PHDC_EP_SIZE_BULK_OUT))
+ return false;
+
+ // Wait metadata
+ udi_phdc_out_trans.b_run =
+ udd_ep_run(UDI_PHDC_EP_BULK_OUT,
+ false,
+ udi_phdc_out_trans.metadata->metadata,
+ udi_phdc_out_trans.preample_header.bNumTransfers *
+ UDI_PHDC_EP_SIZE_BULK_OUT, udi_phdc_received_metadata);
+ return udi_phdc_out_trans.b_run;
+}
+
+
+void udi_phdc_received_metadata(udd_ep_status_t status, iram_size_t nb_received)
+{
+ if (UDD_EP_TRANSFER_OK == status)
+ udi_phdc_out_trans.b_preample_run = false;
+ udi_phdc_out_trans.b_run = false;
+ udi_phdc_out_trans.callback(nb_received);
+}
+
+//@}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/udi_phdc.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/udi_phdc.h
new file mode 100644
index 0000000..0b1636e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/udi_phdc.h
@@ -0,0 +1,335 @@
+/**
+ * \file
+ *
+ * \brief USB Device Personal Healthcare Device Class (PHDC)
+ * interface definitions.
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _UDI_PHDC_H_
+#define _UDI_PHDC_H_
+
+#include "conf_usb.h"
+#include "usb_protocol.h"
+#include "usb_protocol_phdc.h"
+#include "udd.h"
+#include "udc_desc.h"
+#include "udi.h"
+
+//* Check if preample feature is supported (don't change it)
+#define UDI_PHDC_PREAMBLE_FEATURE FALSE // No preample message by default
+#if (0!=(UDI_PHDC_QOS_OUT&(UDI_PHDC_QOS_OUT-1)))
+ // There are many QOS for OUT then enable preample feature
+#undef UDI_PHDC_PREAMBLE_FEATURE
+#define UDI_PHDC_PREAMBLE_FEATURE TRUE
+#endif
+#if (0!=(UDI_PHDC_QOS_IN&(UDI_PHDC_QOS_IN-1)))
+ // There are many QOS for IN then enable preample feature
+#undef UDI_PHDC_PREAMBLE_FEATURE
+#define UDI_PHDC_PREAMBLE_FEATURE TRUE
+#endif
+// Check QOS value
+#if (0!=(UDI_PHDC_QOS_OUT&USB_PHDC_QOS_LOW_GOOD))
+#error The QOS Low Good is not authorized on OUT transfer
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * \ingroup udi_group
+ * \defgroup udi_phdc_group UDI for Personal Healthcare Device Class
+ *
+ * @{
+ */
+
+/**
+ * \name Interface Descriptor
+ *
+ * The following structures provide the interface descriptor.
+ * It must be implemented in USB configuration descriptor.
+ */
+//@{
+
+COMPILER_PACK_SET(1);
+
+//! Just for compile size but not used and removed by compiler
+static le16_t tmp_wDevSpecializations[] = UDI_PHDC_SPECIALIZATION;
+//! Function specialization descriptor for interface descriptors
+typedef struct {
+ usb_phdc_fnctext_desc_t header;
+ le16_t wDevSpecializations[sizeof(tmp_wDevSpecializations) / 2];
+} udi_phdc_fnctext_desc_t;
+
+#ifdef UDI_PHDC_METADATA_DESC_BULK_IN
+//! Just for compile size but not used and removed by compiler
+static uint8_t tmp_bulk_in[] = UDI_PHDC_METADATA_DESC_BULK_IN;
+//! Metadata descriptor of bulk IN for interface descriptors
+typedef struct {
+ usb_phdc_meta_data_desc_t header;
+ uint8_t bOpaqueData[sizeof(tmp_bulk_in)];
+} udi_phdc_metadata_desc_bulkin_t;
+#endif
+
+#ifdef UDI_PHDC_METADATA_DESC_BULK_OUT
+//! Just for compile size but not used and removed by compiler
+static uint8_t tmp_bulk_out[] = UDI_PHDC_METADATA_DESC_BULK_OUT;
+//! Metadata descriptor of bulk OUT for interface descriptors
+typedef struct {
+ usb_phdc_meta_data_desc_t header;
+ uint8_t bOpaqueData[sizeof(tmp_bulk_out)];
+} udi_phdc_metadata_desc_bulkout_t;
+#endif
+
+#ifdef UDI_PHDC_METADATA_DESC_INT_IN
+//! Just for compile size but not used and removed by compiler
+static uint8_t tmp_int_in[] = UDI_PHDC_METADATA_DESC_INT_IN;
+//! Metadata descriptor of interrupt IN for interface descriptors
+typedef struct {
+ usb_phdc_meta_data_desc_t header;
+ uint8_t bOpaqueData[sizeof(tmp_int_in)];
+} udi_phdc_metadata_desc_intin_t;
+#endif
+
+
+//! Interface descriptor struture for PHDC
+typedef struct {
+ usb_iface_desc_t iface;
+ usb_phdc_classfnct_desc_t classfnct;
+#if (UDI_PHDC_DATAMSG_FORMAT==USB_PHDC_DATAMSG_FORMAT_11073_2060)
+ udi_phdc_fnctext_desc_t fnctext;
+#endif
+
+ usb_ep_desc_t ep_bulk_in;
+ usb_phdc_qos_desc_t qos_bulk_in;
+#ifdef UDI_PHDC_METADATA_DESC_BULK_IN
+ udi_phdc_metadata_desc_bulkin_t metadata_bulk_in;
+#endif
+
+ usb_ep_desc_t ep_bulk_out;
+ usb_phdc_qos_desc_t qos_bulk_out;
+#ifdef UDI_PHDC_METADATA_DESC_BULK_OUT
+ udi_phdc_metadata_desc_bulkout_t metadata_bulk_out;
+#endif
+
+#if ((UDI_PHDC_QOS_IN&USB_PHDC_QOS_LOW_GOOD)==USB_PHDC_QOS_LOW_GOOD)
+ usb_ep_desc_t ep_int_in;
+ usb_phdc_qos_desc_t qos_int_in;
+# ifdef UDI_PHDC_METADATA_DESC_INT_IN
+ udi_phdc_metadata_desc_intin_t metadata_int_in;
+# endif
+#endif
+} udi_phdc_desc_t;
+
+COMPILER_PACK_RESET();
+
+
+//! By default no string associated to this interface
+#ifndef UDI_PHDC_STRING_ID
+#define UDI_PHDC_STRING_ID 0
+#endif
+
+//! Compute the number of endpoints used by the interface
+#if ((UDI_PHDC_QOS_IN&USB_PHDC_QOS_LOW_GOOD)==USB_PHDC_QOS_LOW_GOOD)
+#define UDI_PHDC_NUM_ENDPOINT 3 // Bulk IN, bulk OUT, Interrupt IN
+#else
+#define UDI_PHDC_NUM_ENDPOINT 2 // Bulk IN, bulk OUT
+#endif
+
+//! Value to enable/disable in descriptor the feature metadata preample
+#if (UDI_PHDC_PREAMBLE_FEATURE == TRUE)
+#define UDI_PHDC_BMCAPABILITY USB_PHDC_CAPABILITY_METADATAMSG_PREAMBLE
+#else
+#define UDI_PHDC_BMCAPABILITY 0
+#endif
+
+//! Extension descriptor for optional format 11073 2060
+#if (UDI_PHDC_DATAMSG_FORMAT==USB_PHDC_DATAMSG_FORMAT_11073_2060)
+#define UDI_PHDC_FNCTEXT \
+ .fnctext.header.bLength = sizeof(udi_phdc_fnctext_desc_t), \
+ .fnctext.header.bDescriptorType = USB_DT_PHDC_11073PHD_FUNCTION, \
+ .fnctext.header.bReserved = 0, \
+ .fnctext.header.bNumDevSpecs = sizeof(tmp_wDevSpecializations)/2, \
+ .fnctext.wDevSpecializations = UDI_PHDC_SPECIALIZATION
+#else
+#define UDI_PHDC_FNCTEXT
+#endif
+
+//! Optional metadata descriptor for endpoint bulk IN
+#ifdef UDI_PHDC_METADATA_DESC_BULK_IN
+#define UDI_PHDC_METADATA_BULKIN \
+ .metadata_bulk_in.header.bLength = \
+ sizeof(udi_phdc_metadata_desc_bulkin_t),\
+ .metadata_bulk_in.header.bDescriptorType = USB_DT_PHDC_METADATA,\
+ .metadata_bulk_in.bOpaqueData = UDI_PHDC_METADATA_DESC_BULK_IN
+#else
+#define UDI_PHDC_METADATA_BULKIN
+#endif
+
+//! Optional metadata descriptor for endpoint bulk OUT
+#ifdef UDI_PHDC_METADATA_DESC_BULK_OUT
+#define UDI_PHDC_METADATA_BULKOUT \
+ .metadata_bulk_out.header.bLength = \
+ sizeof(udi_phdc_metadata_desc_bulkout_t),\
+ .metadata_bulk_out.header.bDescriptorType = USB_DT_PHDC_METADATA,\
+ .metadata_bulk_in.bOpaqueData = UDI_PHDC_METADATA_DESC_BULK_OUT
+#else
+#define UDI_PHDC_METADATA_BULKOUT
+#endif
+
+//! Optional metadata descriptor for endpoint interrupt IN
+#ifdef UDI_PHDC_METADATA_DESC_INT_IN
+#define UDI_PHDC_METADATA_INTIN \
+ .metadata_int_in.header.bLength = \
+ sizeof(udi_phdc_metadata_desc_intin_t),\
+ .metadata_int_in.header.bDescriptorType = USB_DT_PHDC_METADATA,\
+ .metadata_int_in.bOpaqueData = UDI_PHDC_METADATA_DESC_INT_IN
+#else
+#define UDI_PHDC_METADATA_INTIN
+#endif
+
+//! Declaration of endpoint interrupt IN in case of QOS low good
+#if ((UDI_PHDC_QOS_IN&USB_PHDC_QOS_LOW_GOOD)==USB_PHDC_QOS_LOW_GOOD)
+#define UDI_PHDC_EP_INTIN \
+ .ep_int_in.bLength = sizeof(usb_ep_desc_t),\
+ .ep_int_in.bDescriptorType = USB_DT_ENDPOINT,\
+ .ep_int_in.bEndpointAddress = UDI_PHDC_EP_INTERRUPT_IN,\
+ .ep_int_in.bmAttributes = USB_EP_TYPE_INTERRUPT,\
+ .ep_int_in.wMaxPacketSize = UDI_PHDC_EP_SIZE_INT_IN,\
+ .ep_int_in.bInterval = 20,\
+ .qos_int_in.bLength = sizeof(usb_phdc_qos_desc_t),\
+ .qos_int_in.bDescriptorType = USB_DT_PHDC_QOS,\
+ .qos_int_in.bQoSEncodingVersion = USB_PHDC_QOS_ENCODING_VERSION_1,\
+ .qos_int_in.bmLatencyReliability = USB_PHDC_QOS_LOW_GOOD,\
+ UDI_PHDC_METADATA_INTIN
+#else
+#define UDI_PHDC_EP_INTIN
+#endif
+
+//! Content of PHDC interface descriptor for all speeds
+#define UDI_PHDC_DESC {\
+ .iface.bLength = sizeof(usb_iface_desc_t),\
+ .iface.bDescriptorType = USB_DT_INTERFACE,\
+ .iface.bInterfaceNumber = UDI_PHDC_IFACE_NUMBER,\
+ .iface.bAlternateSetting = 0,\
+ .iface.bNumEndpoints = UDI_PHDC_NUM_ENDPOINT,\
+ .iface.bInterfaceClass = PHDC_CLASS,\
+ .iface.bInterfaceSubClass = PHDC_SUB_CLASS,\
+ .iface.bInterfaceProtocol = PHDC_PROTOCOL,\
+ .iface.iInterface = UDI_PHDC_STRING_ID,\
+ .classfnct.bLength = sizeof(usb_phdc_classfnct_desc_t),\
+ .classfnct.bDescriptorType = USB_DT_PHDC_CLASSFUNCTION,\
+ .classfnct.bPHDCDataCode = UDI_PHDC_DATAMSG_FORMAT,\
+ .classfnct.bmCapability = UDI_PHDC_BMCAPABILITY,\
+ UDI_PHDC_FNCTEXT,\
+ .ep_bulk_in.bLength = sizeof(usb_ep_desc_t),\
+ .ep_bulk_in.bDescriptorType = USB_DT_ENDPOINT,\
+ .ep_bulk_in.bEndpointAddress = UDI_PHDC_EP_BULK_IN,\
+ .ep_bulk_in.bmAttributes = USB_EP_TYPE_BULK,\
+ .ep_bulk_in.wMaxPacketSize = UDI_PHDC_EP_SIZE_BULK_IN,\
+ .ep_bulk_in.bInterval = 0,\
+ .qos_bulk_in.bLength = sizeof(usb_phdc_qos_desc_t),\
+ .qos_bulk_in.bDescriptorType = USB_DT_PHDC_QOS,\
+ .qos_bulk_in.bQoSEncodingVersion = USB_PHDC_QOS_ENCODING_VERSION_1,\
+ .qos_bulk_in.bmLatencyReliability = \
+ UDI_PHDC_QOS_IN&(~USB_PHDC_QOS_LOW_GOOD),\
+ UDI_PHDC_METADATA_BULKIN,\
+ .ep_bulk_out.bLength = sizeof(usb_ep_desc_t),\
+ .ep_bulk_out.bDescriptorType = USB_DT_ENDPOINT,\
+ .ep_bulk_out.bEndpointAddress = UDI_PHDC_EP_BULK_OUT,\
+ .ep_bulk_out.bmAttributes = USB_EP_TYPE_BULK,\
+ .ep_bulk_out.wMaxPacketSize = UDI_PHDC_EP_SIZE_BULK_OUT,\
+ .ep_bulk_out.bInterval = 0,\
+ .qos_bulk_out.bLength = sizeof(usb_phdc_qos_desc_t),\
+ .qos_bulk_out.bDescriptorType = USB_DT_PHDC_QOS,\
+ .qos_bulk_out.bQoSEncodingVersion = USB_PHDC_QOS_ENCODING_VERSION_1,\
+ .qos_bulk_out.bmLatencyReliability = UDI_PHDC_QOS_OUT,\
+ UDI_PHDC_METADATA_BULKOUT,\
+ UDI_PHDC_EP_INTIN,\
+}
+//@}
+
+
+//! Global struture which contains standard UDI API for UDC
+extern UDC_DESC_STORAGE udi_api_t udi_api_phdc;
+
+/**
+ * \name Interface for application
+ *
+ * These routines are used by memory to transfer his data
+ * to/from USB PHDC endpoints.
+ */
+//@{
+
+//! Structure used in argument for routines
+//! udi_phdc_senddata and udi_phdc_waitdata
+typedef struct {
+ uint8_t qos;
+ uint8_t *opaquedata;
+ uint8_t opaque_size;
+ uint8_t *metadata;
+ uint16_t metadata_size;
+} udi_phdc_metadata_t;
+
+
+/**
+ * \brief Send metadata to USB host
+ *
+ * \param metadata Information about metadata to send
+ * \param callback Function to call at the end of transfer.
+ *
+ * \return \c 1 if function was successfully done, otherwise \c 0.
+ */
+bool udi_phdc_senddata(udi_phdc_metadata_t * metadata,
+ void (*callback) (uint16_t));
+
+/**
+ * \brief Wait metadata from USB host
+ *
+ * \param metadata Information about expected metadata
+ * \param callback Function to call at the end of transfer.
+ *
+ * \return \c 1 if function was successfully done, otherwise \c 0.
+ */
+bool udi_phdc_waitdata(udi_phdc_metadata_t * metadata,
+ void (*callback) (uint16_t));
+
+//! @}
+//! @}
+
+#ifdef __cplusplus
+}
+#endif
+#endif // _UDI_PHDC_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/udi_phdc_conf.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/udi_phdc_conf.h
new file mode 100644
index 0000000..563e750
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/udi_phdc_conf.h
@@ -0,0 +1,82 @@
+/**
+ * \file
+ *
+ * \brief Default PHDC configuration for a USB Device with a single interface
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _UDI_PHDC_CONF_H_
+#define _UDI_PHDC_CONF_H_
+
+/**
+ * \ingroup udi_phdc_group
+ * \defgroup udi_phdc_group_conf Default PHDC configuration for a USB Device
+ * with a single interface PHDC
+ *
+ * @{
+ */
+
+//! Control endpoint size
+#define USB_DEVICE_EP_CTRL_SIZE 32 // 8 is not supported by PHDC
+
+//! Endpoint numbers used by PHDC interface
+#define UDI_PHDC_EP_BULK_OUT (1 | USB_EP_DIR_OUT)
+#define UDI_PHDC_EP_BULK_IN (2 | USB_EP_DIR_IN)
+#define UDI_PHDC_EP_INTERRUPT_IN (3 | USB_EP_DIR_IN)
+
+//! Endpoint sizes used by PHDC interface
+#define UDI_PHDC_EP_SIZE_BULK_OUT 32
+#define UDI_PHDC_EP_SIZE_BULK_IN 32
+#define UDI_PHDC_EP_SIZE_INT_IN 8
+
+//! Interface number
+#define UDI_PHDC_IFACE_NUMBER 0
+
+/**
+ * \name UDD Configuration
+ */
+//@{
+//! 2 or 3 endpoints used by PHDC interface
+#if ((UDI_PHDC_QOS_IN&USB_PHDC_QOS_LOW_GOOD)==USB_PHDC_QOS_LOW_GOOD)
+#define USB_DEVICE_MAX_EP 3
+#else
+#define USB_DEVICE_MAX_EP 2
+#endif
+//@}
+
+//@}
+
+#include "udi_phdc.h"
+
+#endif // _UDI_PHDC_CONF_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/udi_phdc_desc.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/udi_phdc_desc.c
new file mode 100644
index 0000000..8e912c6
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/device/udi_phdc_desc.c
@@ -0,0 +1,153 @@
+/**
+ * \file
+ *
+ * \brief Default descriptors for a USB Device with a single interface PHDC
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "conf_usb.h"
+#include "udd.h"
+#include "udc_desc.h"
+#include "udi_phdc.h"
+
+
+/**
+ * \ingroup udi_phdc_group
+ * \defgroup udi_phdc_group_desc Default descriptors for a USB Device
+ * with a single interface PHDC
+ *
+ * @{
+ */
+
+//! Only one interface for this device
+#define USB_DEVICE_NB_INTERFACE 1
+
+/**INDENT-OFF**/
+//! USB Device Descriptor
+COMPILER_WORD_ALIGNED UDC_DESC_STORAGE usb_dev_desc_t udc_device_desc = {
+ .bLength = sizeof(usb_dev_desc_t),
+ .bDescriptorType = USB_DT_DEVICE,
+ .bcdUSB = LE16(USB_V2_0),
+ .bDeviceClass = 0,
+ .bDeviceSubClass = 0,
+ .bDeviceProtocol =0,
+ .bMaxPacketSize0 = USB_DEVICE_EP_CTRL_SIZE,
+ .idVendor = LE16(USB_DEVICE_VENDOR_ID),
+ .idProduct = LE16(USB_DEVICE_PRODUCT_ID),
+ .bcdDevice = LE16((USB_DEVICE_MAJOR_VERSION << 8)
+ | USB_DEVICE_MINOR_VERSION),
+#ifdef USB_DEVICE_MANUFACTURE_NAME
+ .iManufacturer = 1,
+#else
+ .iManufacturer = 0, // No manufacture string
+#endif
+#ifdef USB_DEVICE_PRODUCT_NAME
+ .iProduct = 2,
+#else
+ .iProduct = 0, // No product string
+#endif
+#ifdef USB_DEVICE_SERIAL_NAME
+ .iSerialNumber = 3,
+#else
+ .iSerialNumber = 0, // No serial string
+#endif
+ .bNumConfigurations = 1
+};
+
+#ifdef USB_DEVICE_HS_SUPPORT
+//! USB Device Qualifier Descriptor for HS
+COMPILER_WORD_ALIGNED UDC_DESC_STORAGE usb_dev_qual_desc_t udc_device_qual = {
+ .bLength = sizeof(usb_dev_qual_desc_t),
+ .bDescriptorType = USB_DT_DEVICE_QUALIFIER,
+ .bcdUSB = LE16(USB_V2_0),
+ .bDeviceClass = 0,
+ .bDeviceSubClass = 0,
+ .bDeviceProtocol =0,
+ .bMaxPacketSize0 = USB_DEVICE_EP_CTRL_SIZE,
+ .bNumConfigurations = 1
+};
+#endif
+
+//! Structure for USB Device Configuration Descriptor
+COMPILER_PACK_SET(1);
+typedef struct {
+ usb_conf_desc_t conf;
+ udi_phdc_desc_t udi_phdc;
+} udc_desc_t;
+COMPILER_PACK_RESET();
+
+//! USB Device Configuration Descriptor filled for FS and HS
+COMPILER_WORD_ALIGNED UDC_DESC_STORAGE udc_desc_t udc_desc = {
+ .conf.bLength = sizeof(usb_conf_desc_t),
+ .conf.bDescriptorType = USB_DT_CONFIGURATION,
+ .conf.wTotalLength = LE16(sizeof(udc_desc_t)),
+ .conf.bNumInterfaces = USB_DEVICE_NB_INTERFACE,
+ .conf.bConfigurationValue = 1,
+ .conf.iConfiguration = 0,
+ .conf.bmAttributes = USB_CONFIG_ATTR_MUST_SET | USB_DEVICE_ATTR,
+ .conf.bMaxPower = USB_CONFIG_MAX_POWER(USB_DEVICE_POWER),
+ .udi_phdc = UDI_PHDC_DESC
+};
+
+/**
+ * \name UDC structures which contain all USB Device definitions
+ */
+//@{
+
+//! Associate an UDI for each USB interface
+UDC_DESC_STORAGE udi_api_t *udi_apis[USB_DEVICE_NB_INTERFACE] = {
+ &udi_api_phdc,
+};
+
+//! Add UDI with USB Descriptors FS and HS
+UDC_DESC_STORAGE udc_config_speed_t udc_config_fshs[1] = { {
+ .desc = (usb_conf_desc_t UDC_DESC_STORAGE *)
+ & udc_desc,
+ .udi_apis = udi_apis,
+}};
+
+//! Add all information about USB Device in global structure for UDC
+UDC_DESC_STORAGE udc_config_t udc_config = {
+ .confdev_lsfs = &udc_device_desc,
+ .conf_lsfs = udc_config_fshs,
+#ifdef USB_DEVICE_HS_SUPPORT
+ .confdev_hs = &udc_device_desc,
+ .qualifier = &udc_device_qual,
+ .conf_hs = udc_config_fshs,
+#endif
+};
+
+//@}
+/**INDENT-ON**/
+//@}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/ieee11073-personal_health_devices/communication_model.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/ieee11073-personal_health_devices/communication_model.c
new file mode 100644
index 0000000..8e93c5b
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/ieee11073-personal_health_devices/communication_model.c
@@ -0,0 +1,384 @@
+/**
+ * \file
+ *
+ * \brief Sample of IEE11073 Communication Model
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "compiler.h"
+#include "conf_usb.h"
+#include "udi_phdc.h"
+#include "communication_model.h"
+
+//! @defgroup IEEE11073_COM_MODEL_PHDC Structure used by Communication Model
+//! to connect a USB PHDC Device
+//! @{
+#define IEEE11073_LGT_OPAQUEDATA_IN 10
+#define IEEE11073_LGT_OPAQUEDATA_OUT 10
+#define IEEE11073_LGT_METADATA_IN 80
+#define IEEE11073_LGT_METADATA_OUT 80
+udi_phdc_metadata_t ieee11073_g_phdc_metadata_in;
+udi_phdc_metadata_t ieee11073_g_phdc_metadata_out;
+uint8_t ieee11073_g_opaquedata_in[IEEE11073_LGT_OPAQUEDATA_IN];
+uint8_t ieee11073_g_opaquedata_out[IEEE11073_LGT_OPAQUEDATA_OUT];
+uint8_t ieee11073_g_metadata_in[IEEE11073_LGT_METADATA_IN];
+uint8_t ieee11073_g_metadata_out[IEEE11073_LGT_METADATA_OUT];
+//! @}
+
+
+//! @defgroup IEEE11073_COM_MODEL_STATE Communication model processus states
+//! @{
+#define IEEE11073_STATE_DISABLE 0
+#define IEEE11073_STATE_WAIT_ASSOC 1
+#define IEEE11073_STATE_RUNNING 2
+uint8_t ieee11073_g_state = IEEE11073_STATE_DISABLE;
+//! @}
+
+
+//! @defgroup IEEE11073_COM_MODEL_EVENT Internal events
+//! for communication model processus
+//! @{
+#define IEEE11073_EVENT_NONE 0
+#define IEEE11073_EVENT_ENABLE 1
+#define IEEE11073_EVENT_RECEIVED 3
+#define IEEE11073_EVENT_RETRY_RECEP 4
+#define IEEE11073_EVENT_SENDING 5
+#define IEEE11073_EVENT_SEND_ABORT 6
+#define IEEE11073_EVENT_MEASURE_1 7
+#define IEEE11073_EVENT_MEASURE_2 8
+uint8_t ieee11073_g_event;
+//! @}
+
+
+//! @defgroup PHD_DATA Array with IEEE11073 data
+//! @{
+//! Association Data Request
+uint8_t phd_assoc_req[] = {
+ 0xE2, 0x00, 0x00, 0x32, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x2A,
+ 0x50, 0x79,
+ 0x00, 0x26, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x08,
+ 0x4C, 0x4E, 0x49, 0x41, 0x47, 0x45, 0x4E, 0x54, 0x40, 0x00,
+ 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+//! Sample of measure
+uint8_t phd_measure[] = {
+ 0xE7, 0x00, 0x00, 0x5A, 0x00, 0x58, 0x12, 0x36, 0x01, 0x01, 0x00, 0x52,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0D, 0x1D, 0x00, 0x48, 0xF0, 0x00, 0x00, 0x00,
+ 0x00, 0x04,
+ 0x00, 0x40, 0x00, 0x01, 0x00, 0x0C, 0xFF, 0x00, 0x02, 0xFA, 0x20, 0x07,
+ 0x12, 0x06,
+ 0x12, 0x10, 0x00, 0x00, 0x00, 0x03, 0x00, 0x0C, 0xFF, 0x00, 0x00, 0xF3,
+ 0x20, 0x09, 0x06, 0x12,
+ 0x12, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0C, 0xFF, 0x00, 0x02, 0xF8,
+ 0x20, 0x09, 0x06, 0x12,
+ 0x20, 0x05, 0x00, 0x00, 0x00, 0x03, 0x00, 0x0C, 0xFF, 0x00, 0x00, 0xF2,
+ 0x20, 0x09, 0x06, 0x12,
+ 0x20, 0x05, 0x00, 0x00
+};
+
+//! Device Attributes
+uint8_t phd_attr[] = {
+ 0xE7, 0x00, 0x00, 0x6E, 0x00, 0x6C, 0x00, 0x02, 0x02, 0x03, 0x00, 0x66,
+ 0x00, 0x00, 0x00, 0x06,
+ 0x00, 0x60, 0x0A, 0x5A, 0x00, 0x08, 0x00, 0x01, 0x00, 0x04, 0x10, 0x0F,
+ 0x00, 0x01, 0x09, 0x28,
+ 0x00, 0x1A, 0x00, 0x0A, 0x46, 0x72, 0x65, 0x65, 0x73, 0x63, 0x61, 0x6C,
+ 0x65, 0x20, 0x00, 0x0C, 0x4D, 0x65,
+ 0x64, 0x69, 0x63, 0x61, 0x6C, 0x20, 0x43, 0x46, 0x56, 0x31, 0x09, 0x84,
+ 0x00, 0x0A,
+ 0x00, 0x08, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x0a, 0x44,
+ 0x00, 0x02, 0x40, 0x00,
+ 0x09, 0x2D, 0x00, 0x12, 0x00, 0x01, 0x00, 0x0E, 0x00, 0x01, 0x00, 0x00,
+ 0x00, 0x08, 0x44, 0x45,
+ 0x31, 0x32, 0x34, 0x35, 0x36, 0x37, 0x09, 0x87, 0x00, 0x08, 0x20, 0x09,
+ 0x06, 0x12,
+ 0x12, 0x05, 0x00, 0x00
+};
+
+//! @}
+
+
+//! Internal routines
+static bool ieee11073_enable_reception(void);
+static bool ieee11073_decode_metadata(void);
+void ieee11073_received(uint16_t nb_received);
+void ieee11073_sent(uint16_t nb_send);
+
+
+/*! \brief Enable the communication model processus
+ *
+ * \retval TRUE
+ */
+bool ieee11073_com_model_enable(void)
+{
+ ieee11073_g_event = IEEE11073_EVENT_ENABLE;
+ return TRUE;
+}
+
+/*! \brief Disable the communication model processus
+ */
+void ieee11073_com_model_disable(void)
+{
+ ieee11073_g_event = IEEE11073_EVENT_NONE;
+ ieee11073_g_state = IEEE11073_STATE_DISABLE;
+}
+
+/*! \brief Send a measure on communication line
+ */
+void ieee11073_com_model_send_measure_1(void)
+{
+ if (IEEE11073_EVENT_NONE != ieee11073_g_event)
+ return;
+ ieee11073_g_event = IEEE11073_EVENT_MEASURE_1;
+}
+
+/*! \brief Send a measure on communication line
+ */
+void ieee11073_com_model_send_measure_2(void)
+{
+ if (IEEE11073_EVENT_NONE != ieee11073_g_event)
+ return;
+ ieee11073_g_event = IEEE11073_EVENT_MEASURE_2;
+}
+
+/*! \brief Callback called when a data is received
+ *
+ * \param nb_received Number of data received
+ */
+void ieee11073_received(uint16_t nb_received)
+{
+ ieee11073_g_phdc_metadata_out.metadata_size = nb_received;
+ ieee11073_g_event = IEEE11073_EVENT_RECEIVED;
+}
+
+/*! \brief Callback called when a data is sent
+ *
+ * \param nb_send Number of data sent
+ */
+void ieee11073_sent(uint16_t nb_send)
+{
+ if (0 == nb_send) {
+ ieee11073_g_event = IEEE11073_EVENT_SEND_ABORT;
+ return;
+ }
+ ieee11073_g_phdc_metadata_in.metadata_size = nb_send;
+ ieee11073_g_event = IEEE11073_EVENT_SENDING;
+}
+
+/*! \brief Function to process communication model
+ * Must be scheduled by other process
+ */
+bool ieee11073_com_model_process(void)
+{
+ if (IEEE11073_EVENT_NONE == ieee11073_g_event)
+ goto ieee11073_com_model_process_end;
+
+ if (IEEE11073_EVENT_RETRY_RECEP == ieee11073_g_event) {
+ ieee11073_g_event = IEEE11073_EVENT_NONE;
+ ieee11073_enable_reception();
+ goto ieee11073_com_model_process_end;
+ }
+
+ switch (ieee11073_g_state) {
+
+ case IEEE11073_STATE_DISABLE:
+ if (IEEE11073_EVENT_ENABLE != ieee11073_g_event)
+ break;
+ ieee11073_g_phdc_metadata_in.qos = USB_PHDC_QOS_MEDIUM_BEST;
+ ieee11073_g_phdc_metadata_in.opaque_size = 0;
+ ieee11073_g_phdc_metadata_in.metadata = phd_assoc_req;
+ ieee11073_g_phdc_metadata_in.metadata_size =
+ sizeof(phd_assoc_req);
+ if (!udi_phdc_senddata(&ieee11073_g_phdc_metadata_in,
+ ieee11073_sent)) {
+ break;
+ }
+ ieee11073_g_state = IEEE11073_STATE_WAIT_ASSOC;
+ break;
+
+
+ case IEEE11073_STATE_WAIT_ASSOC:
+ switch (ieee11073_g_event) {
+ case IEEE11073_EVENT_SEND_ABORT:
+ // Descriptor abort then resend it
+ ieee11073_g_phdc_metadata_in.qos =
+ USB_PHDC_QOS_MEDIUM_BEST;
+ ieee11073_g_phdc_metadata_in.opaque_size = 0;
+ ieee11073_g_phdc_metadata_in.metadata = phd_assoc_req;
+ ieee11073_g_phdc_metadata_in.metadata_size =
+ sizeof(phd_assoc_req);
+ if (!udi_phdc_senddata(&ieee11073_g_phdc_metadata_in,
+ ieee11073_sent)) {
+ break;
+ }
+ break;
+ case IEEE11073_EVENT_SENDING:
+ // Descriptor sending, OK
+ // Now wait for association to be accepted
+ if (!ieee11073_enable_reception())
+ goto ieee11073_com_model_process_end;
+ break;
+ case IEEE11073_EVENT_RECEIVED:
+ ieee11073_decode_metadata();
+ if (!ieee11073_enable_reception())
+ goto ieee11073_com_model_process_end;
+ break;
+ }
+ break;
+
+
+ case IEEE11073_STATE_RUNNING:
+ switch (ieee11073_g_event) {
+ case IEEE11073_EVENT_RECEIVED:
+ ieee11073_decode_metadata();
+ // Restart recption
+ if (!ieee11073_enable_reception())
+ goto ieee11073_com_model_process_end;
+ break;
+
+ case IEEE11073_EVENT_MEASURE_1:
+ case IEEE11073_EVENT_MEASURE_2:
+ ieee11073_g_phdc_metadata_in.opaque_size = 0;
+ ieee11073_g_phdc_metadata_in.metadata = phd_measure;
+ ieee11073_g_phdc_metadata_in.metadata_size =
+ sizeof(phd_measure);
+ if (IEEE11073_EVENT_MEASURE_1 == ieee11073_g_event)
+ ieee11073_g_phdc_metadata_in.qos =
+ USB_PHDC_QOS_LOW_GOOD;
+ else
+ ieee11073_g_phdc_metadata_in.qos =
+ USB_PHDC_QOS_MEDIUM_BETTER;
+ if (!udi_phdc_senddata(&ieee11073_g_phdc_metadata_in,
+ ieee11073_sent))
+ break;
+ }
+ }
+
+ ieee11073_g_event = IEEE11073_EVENT_NONE;
+
+ieee11073_com_model_process_end:
+ return (ieee11073_g_state == IEEE11073_STATE_RUNNING);
+}
+
+/*! \brief Start the reception of data on communication line
+ *
+ * \retval TRUE Reception started
+ * \retval FALSE Impossible to start reception
+ */
+static bool ieee11073_enable_reception(void)
+{
+ ieee11073_g_phdc_metadata_out.opaquedata = ieee11073_g_opaquedata_out;
+ ieee11073_g_phdc_metadata_out.opaque_size =
+ IEEE11073_LGT_OPAQUEDATA_OUT;
+ ieee11073_g_phdc_metadata_out.metadata = ieee11073_g_metadata_out;
+ ieee11073_g_phdc_metadata_out.metadata_size =
+ IEEE11073_LGT_METADATA_OUT;
+ if (!udi_phdc_waitdata(&ieee11073_g_phdc_metadata_out,
+ ieee11073_received)) {
+ ieee11073_g_event = IEEE11073_EVENT_RETRY_RECEP;
+ return FALSE;
+ }
+ return TRUE;
+}
+
+
+/*! \brief Start the data reception on communication line
+ *
+ * \retval TRUE Metadata correct
+ * \retval FALSE Metadata unknow
+ */
+static bool ieee11073_decode_metadata(void)
+{
+ typedef struct {
+ uint16_t choice;
+ uint16_t length;
+ uint8_t values[1];
+ } Phd_t;
+
+ Phd_t *phd = (Phd_t *) ieee11073_g_phdc_metadata_out.metadata;
+
+ if (0 == ieee11073_g_phdc_metadata_out.metadata_size)
+ return FALSE; // Error reception
+ if (ieee11073_g_phdc_metadata_out.metadata_size !=
+ (4 + be16_to_cpu(phd->length)))
+ return FALSE; // Error on length
+
+ switch (be16_to_cpu(phd->choice)) {
+
+ case 0xE300:
+ if (0 == be16_to_cpu(*((uint16_t *) & phd->values[0]))) {
+ ieee11073_g_state = IEEE11073_STATE_RUNNING;
+ return TRUE;
+ }
+ break;
+
+ case 0xE700:
+ {
+ uint16_t invoke_id;
+ uint16_t choice;
+
+ if (ieee11073_g_phdc_metadata_out.metadata_size !=
+ (6 + be16_to_cpu(*((uint16_t *) & phd->values[0]))))
+ return FALSE; // Error on length
+
+ invoke_id = *((uint16_t *) & phd->values[2]);
+ choice = *((uint16_t *) & phd->values[4]);
+
+ if (be16_to_cpu(choice) == 0x0103) {
+ invoke_id = be16_to_cpu(invoke_id);
+ phd_attr[6] = (uint8_t) (invoke_id >> 8);
+ phd_attr[7] = (uint8_t) (invoke_id & 0xFF);
+ ieee11073_g_phdc_metadata_in.qos =
+ USB_PHDC_QOS_MEDIUM_BEST;
+ ieee11073_g_phdc_metadata_in.opaque_size = 0;
+ ieee11073_g_phdc_metadata_in.metadata =
+ phd_attr;
+ ieee11073_g_phdc_metadata_in.metadata_size =
+ sizeof(phd_attr);
+ if (!udi_phdc_senddata
+ (&ieee11073_g_phdc_metadata_in,
+ ieee11073_sent))
+ {
+ break;
+ }
+ return TRUE;
+ }
+ }
+ break;
+ }
+ return FALSE;
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/ieee11073-personal_health_devices/communication_model.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/ieee11073-personal_health_devices/communication_model.h
new file mode 100644
index 0000000..00fd5b6
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/ieee11073-personal_health_devices/communication_model.h
@@ -0,0 +1,48 @@
+/**
+ * \file
+ *
+ * \brief Sample of IEE11073 Communication Model
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _COMMUNICATION_MODEL_H_
+#define _COMMUNICATION_MODEL_H_
+
+bool ieee11073_com_model_enable(void);
+void ieee11073_com_model_disable(void);
+bool ieee11073_com_model_process(void);
+void ieee11073_com_model_send_measure_1(void);
+void ieee11073_com_model_send_measure_2(void);
+
+#endif // _COMMUNICATION_MODEL_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/ieee11073-personal_health_devices/readme.txt b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/ieee11073-personal_health_devices/readme.txt
new file mode 100644
index 0000000..8f93e92
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/ieee11073-personal_health_devices/readme.txt
@@ -0,0 +1,15 @@
+Stack to support ISO/IEEE 11073 Personal Health Devices.
+
+Base class:
+ -20601TM
+
+Specialization:
+ -10404TM Pulse Oximeter
+ -10406TM Pulse
+ -10407TM blood pressure
+ -10408TM Thermo Meter
+ -10415TM Weight Scale
+ -10417TM Glucose Meter
+ -104xxTM Living Hub
+...
+
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/usb_protocol_phdc.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/usb_protocol_phdc.h
new file mode 100644
index 0000000..cdb59e4
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/class/phdc/usb_protocol_phdc.h
@@ -0,0 +1,201 @@
+/**
+ * \file
+ *
+ * \brief USB Personal Healthcare Device Class (PHDC) protocol definitions.
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _USB_PROTOCOL_PHDC_H_
+#define _USB_PROTOCOL_PHDC_H_
+
+
+/**
+ * \ingroup usb_protocol_group
+ * \defgroup usb_phdc_protocol USB Personal Healthcare Device Class (PHDC)
+ * protocol definitions
+ *
+ * @{
+ */
+
+/**
+ * \name Possible Class value
+ */
+//@{
+#define PHDC_CLASS 0x0F
+//@}
+
+/**
+ * \name Possible SubClass value
+ */
+//@{
+#define PHDC_SUB_CLASS 0x00
+//@}
+
+/**
+ * \name Possible protocol value
+ * \note Only the BULK protocol should be used in new designs.
+ */
+//@{
+#define PHDC_PROTOCOL 0x00
+//@}
+
+
+/**
+ * \brief Standard USB PHDC interface feature flags
+ *
+ * \note valid for SetFeature and ClearFeature requests.
+ */
+enum usb_phdc_feature {
+ USB_PHDC_FEATURE_METADATA = 0x01,
+};
+
+/**
+ * \brief PHDC USB descriptor types
+ */
+enum usb_descriptor_type_phdc {
+ USB_DT_PHDC_CLASSFUNCTION = 0x20,
+ USB_DT_PHDC_QOS = 0x21,
+ USB_DT_PHDC_METADATA = 0x22,
+ USB_DT_PHDC_11073PHD_FUNCTION = 0x30,
+};
+
+/**
+ * \brief PHDC Data/Messaging format code
+ */
+enum usb_phdc_data_msg_format_code {
+ USB_PHDC_DATAMSG_FORMAT_VENDOR = 0x01,
+ //! refer to the section ISO/IEEE AA073-20601 protocol for further information
+ USB_PHDC_DATAMSG_FORMAT_11073_20601 = 0x02,
+};
+
+/**
+ * \brief PHDC interface capability
+ */
+enum usb_phdc_capability {
+ //! If Meta_Data Message Preamble is implemented
+ USB_PHDC_CAPABILITY_METADATAMSG_PREAMBLE = (1 << 0),
+};
+
+/**
+ * \brief QoS Encoding Version
+ */
+enum usb_phdc_qos_encoding_version {
+ USB_PHDC_QOS_ENCODING_VERSION_1 = 0x01,
+};
+
+//! \name latency/reliability bin for the QoS data
+//! @{
+#define USB_PHDC_QOS_VERYHIGH_BEST (1<<5)
+#define USB_PHDC_QOS_HIGH_BEST (1<<4)
+#define USB_PHDC_QOS_MEDIUM_BEST (1<<3)
+#define USB_PHDC_QOS_MEDIUM_BETTER (1<<2)
+#define USB_PHDC_QOS_MEDIUM_GOOD (1<<1)
+#define USB_PHDC_QOS_LOW_GOOD (1<<0)
+//! @}
+
+//! String use by meta-data message to verify it
+#define METADATA_MESSAGE_SIG \
+ {'P','h','d','c','Q','o','S','S','i','g','n','a','t','u','r','e'}
+
+COMPILER_PACK_SET(1);
+
+//! PHDC Class Function Descriptor
+typedef struct {
+ uint8_t bLength; //!< Size of this descriptor in bytes
+ uint8_t bDescriptorType; //!< PHDC descriptor type
+ uint8_t bPHDCDataCode; //!< Data/Messaging format code
+ uint8_t bmCapability; //!< Features available in the interface
+} usb_phdc_classfnct_desc_t;
+
+//! PHDC Function Extension Descriptor
+//! Note: The wDevSpecializations fields must follow this struct
+typedef struct {
+ uint8_t bLength; //!< Size of this descriptor in bytes
+ uint8_t bDescriptorType; //!< PHDC descriptor type
+ uint8_t bReserved; //!< Reserved for future use, must be zero
+ uint8_t bNumDevSpecs; //!< Number of wDevSpecializations below
+} usb_phdc_fnctext_desc_t;
+
+//! PHDC Function Extension Descriptor with single specification
+typedef struct {
+ uint8_t bLength; //!< Size of this descriptor in bytes
+ uint8_t bDescriptorType; //!< PHDC descriptor type
+ uint8_t bReserved; //!< Reserved for future use, must be zero
+ uint8_t bNumDevSpecs; //!< Number of wDevSpecializations below
+ le16_t wDevSpecializations; //!< list that defines the device specialization
+} usb_phdc_fnctext_singlespec_desc_t;
+
+//! PHDC QoS Descriptor
+typedef struct {
+ uint8_t bLength; //!< Size of this descriptor in bytes
+ uint8_t bDescriptorType; //!< PHDC descriptor type
+ uint8_t bQoSEncodingVersion; //!< 01h = version 1 QoS information encoding
+ uint8_t bmLatencyReliability; //!< If bQoSEncodingVersion = 01h,
+ //!< then this bitmap refers to the latency/reliability bin for the QoS data
+} usb_phdc_qos_desc_t;
+
+//! PHDC Meta-Data Descriptor
+//! Note: The optional meta-data field (0 to 253B) can follow this struct
+typedef struct {
+ uint8_t bLength; //!< Size of this descriptor in bytes
+ uint8_t bDescriptorType; //!< PHDC descriptor type
+} usb_phdc_meta_data_desc_t;
+
+typedef struct {
+ usb_phdc_meta_data_desc_t header;
+ uint8_t bOpaqueData[1]; //!< Opaque meta-data (size=1)
+} usb_phdc_meta_data_1_desc_t;
+
+//! PHDC Meta-Data Message
+//! Note: The optional meta-data field (0 to EPx_size-21) can follow this struct
+typedef struct {
+ uint8_t aSignature[16]; //!< Constant used to give preamble verifiability.
+ uint8_t bNumTransfers; //!< Count of following transfers
+ uint8_t bQoSEncodingVersion; //!< 01h = version 1 QoS information encoding
+ uint8_t bmLatencyReliability; //!< If bQoSEncodingVersion = 01h,
+ //!< then this bitmap refers to the latency/reliability bin for the QoS data
+ uint8_t bOpaqueDataSize; //!< Size, in bytes, of opaque QoS data or meta-data
+ //!< if bQoSEncodingVersion = 01h
+} usb_phdc_metadata_msg_t;
+
+typedef struct {
+ usb_phdc_metadata_msg_t header;
+ uint8_t bOpaqueData[1]; //!< Opaque meta-data (size=1)
+} usb_phdc_metadata_msg_1_t;
+
+COMPILER_PACK_RESET();
+
+//@}
+
+#endif // _USB_PROTOCOL_PHDC_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/drivers/usbb/asf.xml b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/drivers/usbb/asf.xml
new file mode 100644
index 0000000..6711a22
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/drivers/usbb/asf.xml
@@ -0,0 +1,48 @@
+<asf xmlversion="1.0">
+ <select-by-config id="avr32.drivers.usbb.device" name="config.avr32.drivers.usbb.device.sleepmgr" caption="USB - Universial Serial Bus stack" default="yes">
+ <module type="driver" id="avr32.drivers.usbb.device#yes" caption="USB - Universial Serial Bus Stack">
+ <info type="description" value="summary">
+ USB stack for USB device and OTG. Provides functions for configuring and managing end-points, and for OTG host operation.
+ </info>
+ <info type="gui-flag" value="hidden"/>
+ <info type="status" value="stable"/>
+ <info type="distribution" value="public"/>
+ <info type="keyword" value="technology">
+ <keyword value="USB"/>
+ </info>
+ <build type="c-source" value="usbb_device.c"/>
+ <build type="header-file" value="usbb_device.h"/>
+ <build type="header-file" value="usbb_otg.h"/>
+ <build type="include-path" value="."/>
+ <build type="module-config" subtype="required-header-file" value="conf_usb.h"/>
+ <device-support value="uc3a"/>
+ <device-support value="uc3a3_a4"/>
+ <device-support value="uc3b"/>
+ <require idref="common.services.basic.clock"/>
+ <require idref="common.services.basic.sleepmgr"/>
+ <require idref="avr32.utils"/>
+ <generator value="doxygen-module" default-mcu="unspecified-uc3a"/>
+ </module>
+ <module type="driver" id="avr32.drivers.usbb.device#no" caption="USB - Universial Serial Bus stack">
+ <info type="description" value="summary">
+ USB stack for USB device and OTG. Provides functions for configuring and managing end-points, and for OTG host operation.
+ </info>
+ <info type="gui-flag" value="hidden"/>
+ <info type="status" value="stable"/>
+ <info type="distribution" value="public"/>
+ <info type="keyword" value="technology">
+ <keyword value="USB"/>
+ </info>
+ <build type="c-source" value="usbb_device.c"/>
+ <build type="header-file" value="usbb_device.h"/>
+ <build type="header-file" value="usbb_otg.h"/>
+ <build type="include-path" value="."/>
+ <device-support value="uc3a"/>
+ <device-support value="uc3a3_a4"/>
+ <device-support value="uc3b"/>
+ <require idref="common.services.basic.clock"/>
+ <require idref="avr32.utils"/>
+ <generator value="doxygen-module" default-mcu="unspecified-uc3a"/>
+ </module>
+ </select-by-config>
+</asf>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/drivers/usbb/usbb_device.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/drivers/usbb/usbb_device.c
new file mode 100644
index 0000000..15d184c
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/drivers/usbb/usbb_device.c
@@ -0,0 +1,1695 @@
+/**
+ * \file
+ *
+ * \brief USB Device drivers
+ * Compliance with common driver UDD
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "board.h"
+#include "conf_usb.h"
+//#include "sysclk.h"
+#include "udd.h"
+#include "usbb_otg.h"
+#include "usbb_device.h"
+#include <string.h>
+
+#ifndef UDD_NO_SLEEP_MGR
+//#include "sleepmgr.h"
+#endif
+
+#ifndef UDD_USB_INT_LEVEL
+# define UDD_USB_INT_LEVEL 0 // By default USB interrupt have low priority
+#endif
+
+#define UDD_EP_DMA_SUPPORTED // Not used now (always support DMA)
+//#define UDD_EP_FIFO_SUPPORTED
+
+/**
+ * \ingroup usb_device_group
+ * \defgroup udd_group USB Device Driver (UDD)
+ *
+ * \section USBB_CONF USBB Custom configuration
+ * The following USBB driver configuration must be included in the conf_usb.h
+ * file of the application.
+ *
+ * UDD_USB_INT_LEVEL<br>
+ * Option to change the interrupt priority (0 to 3) by default 0 (recommended).
+ *
+ * UDD_ISOCHRONOUS_NB_BANK<br>
+ * Feature to reduce or increase isochronous endpoints buffering (1 to 2).
+ * Default value 2.
+ *
+ * UDD_BULK_NB_BANK<br>
+ * Feature to reduce or increase bulk endpoints buffering (1 to 2).
+ * Default value 2.
+ *
+ * UDD_INTERRUPT_NB_BANK<br>
+ * Feature to reduce or increase interrupt endpoints buffering (1 to 2).
+ * Default value 1.
+ *
+ * \section Callbacks management
+ * The USB driver is fully managed by interrupt and does not request periodique
+ * task. Thereby, the USB events use callbacks to transfer the information.
+ * The callbacks are declared in static during compilation or in variable during
+ * code execution.
+ *
+ * Static declarations defined in conf_usb.h:
+ * - UDC_VBUS_EVENT(bool b_present)<br>
+ * To signal Vbus level change
+ * - UDC_SUSPEND_EVENT()<br>
+ * Called when USB bus enter in suspend mode
+ * - UDC_RESUME_EVENT()<br>
+ * Called when USB bus is wakeup
+ * - UDC_SOF_EVENT()<br>
+ * Called for each received SOF, Note: Each 1ms in HS/FS mode only.
+ *
+ * Dynamic callbacks, called "endpoint job" , are registered
+ * in udd_ep_job_t structure via the following functions:
+ * - udd_ep_run()<br>
+ * To call it when a transfer is finish
+ * - udd_ep_wait_stall_clear()<br>
+ * To call it when a endpoint halt is disabled
+ *
+ * \section Power mode management
+ * The Sleep modes authorized :
+ * - in USB IDLE state, the USBB needs of USB clock and authorizes up to IDLE mode
+ * - in USB SUSPEND state, the USBB no needs USB clock but requests a minimum
+ * clock restart timing. Thus, it authorizes up to STATIC or STANDBY mode.
+ * - VBUS monitoring used in USB Self-Power mode authorizes up to STOP mode
+ *
+ * The USBB_SLEEP_MODE_USB_IDLE equals SLEEPMGR_IDLE.
+ *
+ * The USBB_SLEEP_MODE_USB_SUSPEND depends on USB Power mode,
+ * USB clock startup timing and USB Speed mode:
+ * | Power Mode | Speed mode | Clock Startup | Sleep mode authorized |
+ * | Self-Power | LS, FS, HS | X | SLEEPMGR_STOP |
+ * | Bus-Power | LS, FS | >10ms | SLEEPMGR_STDBY |
+ * | Bus-Power | LS, FS | <=10ms | SLEEPMGR_STATIC |
+ * | Bus-Power | HS | >3ms | SLEEPMGR_STDBY |
+ * | Bus-Power | HS | <=3ms | SLEEPMGR_STATIC |
+ *
+ * @{
+ */
+
+
+// Check USB Device configuration
+#ifndef USB_DEVICE_EP_CTRL_SIZE
+# error USB_DEVICE_EP_CTRL_SIZE not defined
+#endif
+#ifndef USB_DEVICE_MAX_EP
+# error USB_DEVICE_MAX_EP not defined
+#endif
+//#if (UC3A0 || UC3A1 || UC3B)
+//# ifdef USB_DEVICE_HS_SUPPORT
+//# error The High speed mode is not supported on this part, please remove USB_DEVICE_HS_SUPPORT in conf_usb.h
+//# endif
+//#endif
+
+#ifndef UDD_ISOCHRONOUS_NB_BANK
+ #define UDD_ISOCHRONOUS_NB_BANK 2
+#else
+ #if (UDD_ISOCHRONOUS_NB_BANK<1) || (UDD_ISOCHRONOUS_NB_BANK>2)
+ #error UDD_ISOCHRONOUS_NB_BANK must be define with 1 or 2.
+ #endif
+#endif
+#ifndef UDD_BULK_NB_BANK
+ #define UDD_BULK_NB_BANK 2
+#else
+ #if (UDD_BULK_NB_BANK<1) || (UDD_BULK_NB_BANK>2)
+ #error UDD_BULK_NB_BANK must be define with 1 or 2.
+ #endif
+#endif
+#ifndef UDD_INTERRUPT_NB_BANK
+ #define UDD_INTERRUPT_NB_BANK 1
+#else
+ #if (UDD_INTERRUPT_NB_BANK<1) || (UDD_INTERRUPT_NB_BANK>2)
+ #error UDD_INTERRUPT_NB_BANK must be define with 1 or 2.
+ #endif
+#endif
+
+
+/**
+ * \name Power management routine.
+ */
+//@{
+
+#ifndef UDD_NO_SLEEP_MGR
+
+//! Definition of sleep levels
+#if (USB_DEVICE_ATTR & USB_CONFIG_ATTR_SELF_POWERED)
+# define USBB_SLEEP_MODE_USB_SUSPEND SLEEPMGR_STOP
+#else
+# if ((defined USB_DEVICE_HS_SUPPORT) && (USBCLK_STARTUP_TIMEOUT>3000)) \
+ || ((!defined USB_DEVICE_HS_SUPPORT) && (USBCLK_STARTUP_TIMEOUT>10000))
+# define USBB_SLEEP_MODE_USB_SUSPEND SLEEPMGR_STDBY
+# else
+# define USBB_SLEEP_MODE_USB_SUSPEND SLEEPMGR_STATIC
+# endif
+#endif
+#define USBB_SLEEP_MODE_USB_IDLE SLEEPMGR_IDLE
+
+//! State of USB line
+static bool udd_b_idle;
+
+
+/*! \brief Authorize or not the CPU powerdown mode
+ *
+ * \param b_enable true to authorize powerdown mode
+ */
+static void udd_sleep_mode(bool b_idle)
+{
+ if (!b_idle && udd_b_idle) {
+ sleepmgr_lock_mode(USBB_SLEEP_MODE_USB_IDLE);
+ }
+ if (b_idle && !udd_b_idle) {
+ sleepmgr_unlock_mode(USBB_SLEEP_MODE_USB_IDLE);
+ }
+ udd_b_idle = b_idle;
+}
+#else
+
+static void udd_sleep_mode(bool b_idle) {
+ b_idle = b_idle;
+}
+
+#endif // UDD_NO_SLEEP_MGR
+
+//@}
+
+
+/**
+ * \name Control endpoint low level management routine.
+ *
+ * This function performs control endpoint mangement.
+ * It handle the SETUP/DATA/HANDSHAKE phases of a control transaction.
+ */
+//@{
+
+//! Global variable to give and record information about setup request management
+COMPILER_WORD_ALIGNED udd_ctrl_request_t udd_g_ctrlreq;
+
+//! Bit definitions about endpoint control state machine for udd_ep_control_state
+typedef enum {
+ UDD_EPCTRL_SETUP = 0, //!< Wait a SETUP packet
+ UDD_EPCTRL_DATA_OUT = 1, //!< Wait a OUT data packet
+ UDD_EPCTRL_DATA_IN = 2, //!< Wait a IN data packet
+ UDD_EPCTRL_HANDSHAKE_WAIT_IN_ZLP = 3, //!< Wait a IN ZLP packet
+ UDD_EPCTRL_HANDSHAKE_WAIT_OUT_ZLP = 4, //!< Wait a OUT ZLP packet
+ UDD_EPCTRL_STALL_REQ = 5 //!< STALL enabled on IN & OUT packet
+} udd_ctrl_ep_state_t;
+
+//! State of the endpoint control management
+static udd_ctrl_ep_state_t udd_ep_control_state;
+//! Total number of data received/sent during data packet phase with previous payload buffers
+static uint16_t udd_ctrl_prev_payload_nb_trans;
+//! Number of data received/sent to/from udd_g_ctrlreq.payload buffer
+static uint16_t udd_ctrl_payload_nb_trans;
+//! Signal if the udd_g_ctrlreq.payload buffer is modulo endpoint control and need of data ZLP
+static bool udd_ctrl_payload_need_in_zlp;
+
+/**
+ * \brief Reset control endpoint
+ *
+ * Called after a USB line reset or when UDD is enabled
+ */
+static void udd_reset_ep_ctrl(void);
+
+/**
+ * \brief Reset control endpoint management
+ *
+ * Called after a USB line reset or at the end of SETUP request (after ZLP)
+ */
+static void udd_ctrl_init(void);
+
+//! \brief Managed reception of SETUP packet on control enpoint
+static void udd_ctrl_setup_received(void);
+
+//! \brief Managed reception of IN packet on control enpoint
+static void udd_ctrl_in_sent(void);
+
+//! \brief Managed reception of OUT packet on control enpoint
+static void udd_ctrl_out_received(void);
+
+//! \brief Managed underflow event of IN packet on control enpoint
+static void udd_ctrl_underflow(void);
+
+//! \brief Managed overflow event of OUT packet on control enpoint
+static void udd_ctrl_overflow(void);
+
+//! \brief Managed stall event of IN/OUT packet on control enpoint
+static void udd_ctrl_stall_data(void);
+
+//! \brief Send a ZLP IN on control endpoint
+static void udd_ctrl_send_zlp_in(void);
+
+//! \brief Send a ZLP OUT on control endpoint
+static void udd_ctrl_send_zlp_out(void);
+
+//! \brief Call callback associated to setup request
+static void udd_ctrl_endofrequest(void);
+
+/**
+ * \brief Main interrupt routine for control endpoint
+ *
+ * This switchs control endpoint events to correct sub function.
+ *
+ * \return \c 1 if an event about control endpoint is occured, otherwise \c 0.
+ */
+static bool udd_ctrl_interrupt(void);
+
+//@}
+
+
+/**
+ * \name Management of bulk/interrupt/isochronous endpoints
+ *
+ * The UDD manages the data transfer on endpoints:
+ * - Start data tranfer on endpoint with USB Device DMA
+ * - Send a ZLP packet if requested
+ * - Call callback registered to signal end of transfer
+ * The transfer abort and stall feature are supported.
+ */
+//@{
+#if (0!=USB_DEVICE_MAX_EP)
+
+//! Structure definition about job registered on an endpoint
+typedef struct {
+ uint8_t busy:1; //!< A job is registered on this endpoint
+ uint8_t stall_requested:1; //!< A stall has been requested but not executed
+ uint8_t need_zlp:1; //!< ZLP is need to finish this IN transfer
+ uint8_t *buf; //!< Buffer located in internal RAM to send or fill during job
+ iram_size_t buf_size; //!< Size of buffer to send or fill
+ iram_size_t buf_cnt; //!< Size of data transfered
+ union {
+ udd_callback_trans_t call_trans; //!< Callback to call at the end of transfer
+ udd_callback_halt_cleared_t call_nohalt; //!< Callback to call when the endpoint halt is cleared
+ };
+} udd_ep_job_t;
+
+
+//! Array to register a job on bulk/interrupt/isochronous endpoint
+static udd_ep_job_t udd_ep_job[USB_DEVICE_MAX_EP];
+
+//! \brief Reset all job table
+static void udd_ep_job_table_reset(void);
+
+//! \brief Abort all endpoint jobs on going
+static void udd_ep_job_table_kill(void);
+
+#ifdef UDD_EP_FIFO_SUPPORTED
+//! \brief Kill last data in bank
+//! \return Number of busy banks
+static uint32_t udd_ep_kill_last(udd_ep_id_t ep);
+
+//! \brief Fill banks and send them
+static void udd_ep_in_sent(udd_ep_id_t ep);
+
+//! \brief Store received banks
+static void udd_ep_out_received(udd_ep_id_t ep);
+#endif
+
+/**
+ * \brief Abort endpoint job on going
+ *
+ * \param ep endpoint number of job to abort
+ */
+static void udd_ep_abort_job(udd_ep_id_t ep);
+
+/**
+ * \brief Call the callback associated to the job which is finished
+ *
+ * \param ptr_job job to complete
+ * \param b_abort if true then the job has been aborted
+ */
+static void udd_ep_finish_job(udd_ep_job_t * ptr_job, bool b_abort);
+
+/**
+ * \brief Main interrupt routine for bulk/interrupt/isochronous endpoints
+ *
+ * This switchs endpoint events to correct sub function.
+ *
+ * \return \c 1 if an event about bulk/interrupt/isochronous endpoints has occured, otherwise \c 0.
+ */
+static bool udd_ep_interrupt(void);
+
+#endif // (0!=USB_DEVICE_MAX_EP)
+//@}
+
+
+//--------------------------------------------------------
+//--- INTERNAL ROUTINES TO MANAGED GLOBAL EVENTS
+
+#define udd_interrupt UOTGHS_IrqHandler
+/**
+ * \internal
+ * \brief Function called by USBB interrupt to manage USB Device interrupts
+ *
+ * USB Device interrupt events are splited in three parts:
+ * - USB line events (SOF, reset, suspend, resume, wakeup)
+ * - control endpoint events (setup reception, end of data transfer, underflow, overflow, stall)
+ * - bulk/interrupt/isochronous endpoints events (end of data transfer)
+ *
+ * Note:
+ * Here, the global interrupt mask is not clear when an USB interrupt is enabled
+ * because this one can not be occured during the USB ISR (=during INTX is masked).
+ * See Technical reference $3.8.3 Masking interrupt requests in peripheral modules.
+ */
+#ifdef OTG
+static void udd_interrupt(void)
+#else
+// Fix the fact that, for some IAR header files, the AVR32_USBB_IRQ_GROUP define
+// has been defined as AVR32_USB_IRQ_GROUP instead.
+#ifdef __ICCAVR32__
+#if __ICCAVR32__
+#if !defined(AVR32_USBB_IRQ_GROUP)
+#define AVR32_USBB_IRQ_GROUP AVR32_USB_IRQ_GROUP
+#endif
+#endif
+#endif
+ISR(udd_interrupt, AVR32_USBB_IRQ_GROUP, UDD_USB_INT_LEVEL)
+#endif
+{
+#ifdef UDC_SOF_EVENT
+ if (Is_udd_sof()) {
+ udd_ack_sof();
+ UDC_SOF_EVENT();
+ goto udd_interrupt_end;
+ }
+#endif
+
+ if (udd_ctrl_interrupt())
+ goto udd_interrupt_end; // Interrupt acked by control endpoint managed
+
+#if (0!=USB_DEVICE_MAX_EP)
+ if (udd_ep_interrupt())
+ goto udd_interrupt_end; // Interrupt acked by bulk/interrupt/isochronous endpoint managed
+#endif
+
+ // USB bus reset detection
+ if (Is_udd_reset()) {
+ udd_ack_reset();
+ // Abort all jobs on-going
+#if (0!=USB_DEVICE_MAX_EP)
+ udd_ep_job_table_kill();
+#endif
+ // Reset USB Device Stack Core
+ udc_reset();
+ // Reset endpoint control
+ udd_reset_ep_ctrl();
+ // Reset endpoint control management
+ udd_ctrl_init();
+ goto udd_interrupt_end;
+ }
+
+ if (Is_udd_suspend_interrupt_enabled() && Is_udd_suspend()) {
+ otg_unfreeze_clock();
+ // The suspend interrupt is automatic acked when a wakeup occur
+ udd_disable_suspend_interrupt();
+ udd_enable_wake_up_interrupt();
+ otg_freeze_clock(); // Mandatory to exit of sleep mode after a wakeup event
+ udd_sleep_mode(false); // Enter in SUSPEND mode
+#ifdef UDC_SUSPEND_EVENT
+ UDC_SUSPEND_EVENT();
+#endif
+ goto udd_interrupt_end;
+ }
+
+ if (Is_udd_wake_up_interrupt_enabled() && Is_udd_wake_up()) {
+ // Ack wakeup interrupt and enable suspend interrupt
+ otg_unfreeze_clock();
+ // Check USB clock ready after suspend and eventually sleep USB clock
+ while( !Is_clock_usable() ) {
+ if(Is_udd_suspend()) break; // In case of USB state change in HS
+ };
+ // The wakeup interrupt is automatic acked when a suspend occur
+ udd_disable_wake_up_interrupt();
+ udd_enable_suspend_interrupt();
+ udd_sleep_mode(true); // Enter in IDLE mode
+#ifdef UDC_RESUME_EVENT
+ UDC_RESUME_EVENT();
+#endif
+ goto udd_interrupt_end;
+ }
+
+ if (Is_udd_vbus_transition()) {
+ // Ack VBus transition and send status to high level
+ otg_unfreeze_clock();
+ udd_ack_vbus_transition();
+ otg_freeze_clock();
+#ifdef UDC_VBUS_EVENT
+ UDC_VBUS_EVENT(Is_udd_vbus_high());
+#endif
+ goto udd_interrupt_end;
+ }
+udd_interrupt_end:
+ otg_data_memory_barrier();
+ return;
+}
+
+
+bool udd_include_vbus_monitoring(void)
+{
+ return false; // Since VBus detection has pb.
+ //return true;
+}
+
+
+void udd_enable(void)
+{
+ irqflags_t flags;
+ sysclk_enable_usb();
+
+ flags = cpu_irq_save();
+
+ //** Enable USB hardware
+ otg_disable();
+ (void)Is_otg_enabled();
+#ifdef OTG
+ // Check UID pin state before enter in USB device mode
+ if (!Is_otg_id_device())
+ return FALSE;
+#else
+ // Here, only the Device mode is possible, then link USBB interrupt to UDD interrupt
+ //irq_register_handler(udd_interrupt, AVR32_USBB_IRQ, UDD_USB_INT_LEVEL);
+ irq_register_handler(udd_interrupt, ID_UOTGHS, UDD_USB_INT_LEVEL);
+
+ otg_force_device_mode();
+#endif
+ otg_disable_pad();
+ otg_enable_pad();
+ otg_enable();
+ otg_unfreeze_clock();
+ (void)Is_otg_clock_frozen();
+//#if UC3A3
+ // For parts with high speed feature, the "USABLE" clock is the UTMI clock,
+ // and the UTMI clock is disabled in suspend mode. Thereby, the utmi clock
+ // can't be checked when USB line is not attached or in suspend mode
+//#else
+ // Check USB clock
+ while( !Is_clock_usable() );
+//#endif
+
+ // Reset internal variables
+#if (0!=USB_DEVICE_MAX_EP)
+ udd_ep_job_table_reset();
+#endif
+
+ // Set the USB speed requested by configuration file
+#ifdef USB_DEVICE_LOW_SPEED
+ udd_low_speed_enable();
+#else
+ udd_low_speed_disable();
+# ifdef USB_DEVICE_HS_SUPPORT
+ udd_high_speed_enable();
+# else
+ udd_high_speed_disable();
+# endif
+#endif
+ udd_enable_vbus_interrupt();
+ otg_freeze_clock();
+ // Always authorize asynchrone USB interrupts to exit of sleep mode
+ //??AVR32_PM.AWEN.usb_waken = 1;
+
+#ifndef UDD_NO_SLEEP_MGR
+ // Initialize the sleep mode authorized for the USB suspend mode
+ udd_b_idle = false;
+ sleepmgr_lock_mode(USBB_SLEEP_MODE_USB_SUSPEND);
+#endif
+
+ cpu_irq_restore(flags);
+}
+
+
+void udd_disable(void)
+{
+ irqflags_t flags;
+ flags = cpu_irq_save();
+ // Disable USB pad
+ otg_disable();
+ otg_disable_pad();
+ sysclk_disable_usb();
+ udd_sleep_mode(false);
+#ifndef UDD_NO_SLEEP_MGR
+ sleepmgr_unlock_mode(USBB_SLEEP_MODE_USB_SUSPEND);
+#endif
+ cpu_irq_restore(flags);
+}
+
+
+void udd_attach(void)
+{
+ irqflags_t flags;
+ flags = cpu_irq_save();
+
+ // At startup the USB bus state is unknown,
+ // therefore the state is considered IDLE to not miss any USB event
+ udd_sleep_mode(true);
+ otg_unfreeze_clock();
+
+ // This section of clock check can be improved with a chek of
+ // USB clock source via sysclk()
+#if 0//UC3A3
+ // For parts with high speed feature, the "USABLE" clock is the UTMI clock,
+ // and the UTMI clock is disabled in suspend mode. Thereby, the utmi clock
+ // can't be checked when USB line is not attached or in suspend mode
+ // But it is not a issue, because the clock source is the OSC
+#else
+ // Check USB clock because the source can be a PLL
+ while( !Is_clock_usable() );
+#endif
+ // Authorize attach if VBus is present
+ udd_attach_device();
+
+ // (RESET_AND_WAKEUP)
+ // After the attach and the first USB suspend, the following USB Reset time can be inferior to CPU restart clock time.
+ // Thus, the USB Reset state is not detected and endpoint control is not allocated
+ // In this case, a Reset is do automatically after attach.
+ udc_reset(); // Reset USB Device Stack Core
+ udd_reset_ep_ctrl(); // Reset endpoint control
+ udd_ctrl_init(); // Reset endpoint control management
+
+ // Enable USB line events
+ udd_enable_reset_interrupt();
+ udd_enable_suspend_interrupt();
+ udd_enable_wake_up_interrupt();
+#ifdef UDC_SOF_EVENT
+ udd_enable_sof_interrupt();
+#endif
+ // Reset following interupts flag
+ udd_ack_reset();
+ udd_ack_sof();
+
+ // The first suspend interrupt must be forced
+#if 0//UC3A3
+ // With UTMI, the first suspend is detected but must be cleared to reoccur interrupt
+ udd_ack_suspend();
+#else
+ // The first suspend interrupt is not detected else raise it
+ udd_raise_suspend();
+#endif
+ udd_ack_wake_up();
+ otg_freeze_clock();
+ cpu_irq_restore(flags);
+}
+
+
+void udd_detach(void)
+{
+ otg_unfreeze_clock();
+ // Detach device from the bus
+ udd_detach_device();
+ udd_sleep_mode(false);
+}
+
+
+bool udd_is_high_speed(void)
+{
+#ifdef USB_DEVICE_HS_SUPPORT
+ return !Is_udd_full_speed_mode();
+#else
+ return false;
+#endif
+}
+
+
+void udd_set_address(uint8_t address)
+{
+ udd_disable_address();
+ udd_configure_address(address);
+ udd_enable_address();
+}
+
+
+uint8_t udd_getaddress(void)
+{
+ return udd_get_configured_address();
+}
+
+
+uint16_t udd_get_frame_number(void)
+{
+ return udd_frame_number();
+}
+
+
+void udd_send_wake_up(void)
+{
+#ifndef UDD_NO_SLEEP_MGR
+ if (!udd_b_idle)
+#endif
+ {
+ udd_sleep_mode(true); // Enter in IDLE mode
+ otg_unfreeze_clock();
+ udd_initiate_remote_wake_up();
+ }
+}
+
+
+void udd_set_setup_payload( uint8_t *payload, uint16_t payload_size )
+{
+ udd_g_ctrlreq.payload = payload;
+ udd_g_ctrlreq.payload_size = payload_size;
+}
+
+
+#if (0!=USB_DEVICE_MAX_EP)
+bool udd_ep_alloc(udd_ep_id_t ep, uint8_t bmAttributes,
+ uint16_t MaxEndpointSize)
+{
+ bool b_dir_in;
+ uint16_t ep_allocated;
+ uint8_t nb_bank, bank, i;
+
+ b_dir_in = ep & USB_EP_DIR_IN;
+ ep = ep & USB_EP_ADDR_MASK;
+
+ if (ep > USB_DEVICE_MAX_EP)
+ return false;
+ if (Is_udd_endpoint_enabled(ep))
+ return false;
+
+ // Bank choise
+ switch(bmAttributes&USB_EP_TYPE_MASK) {
+ case USB_EP_TYPE_ISOCHRONOUS:
+ nb_bank = UDD_ISOCHRONOUS_NB_BANK;
+ break;
+ case USB_EP_TYPE_INTERRUPT:
+ nb_bank = UDD_INTERRUPT_NB_BANK;
+ break;
+ case USB_EP_TYPE_BULK:
+ nb_bank = UDD_BULK_NB_BANK;
+ break;
+ default:
+ Assert(false);
+ return false;
+ }
+ switch(nb_bank) {
+ case 1:
+ bank = UOTGHS_DEVEPTCFG_EPBK_1_BANK >> UOTGHS_DEVEPTCFG_EPBK_Pos;
+ break;
+ case 2:
+ bank = UOTGHS_DEVEPTCFG_EPBK_2_BANK >> UOTGHS_DEVEPTCFG_EPBK_Pos;
+ break;
+ case 3:
+ bank = UOTGHS_DEVEPTCFG_EPBK_3_BANK >> UOTGHS_DEVEPTCFG_EPBK_Pos;
+ break;
+ }
+
+ // Check if endpoint size is 8,16,32,64,128,256,512 or 1023
+ Assert(MaxEndpointSize < 1024);
+ Assert((MaxEndpointSize == 1023) || !(MaxEndpointSize & (MaxEndpointSize - 1)));
+ Assert(MaxEndpointSize >= 8);
+
+ // Set configuration of new endpoint
+ udd_configure_endpoint(ep, bmAttributes, (b_dir_in ? 1 : 0),
+ MaxEndpointSize, bank);
+ ep_allocated = 1 << ep;
+
+ // Unalloc endpoints superior
+ for (i = USB_DEVICE_MAX_EP; i > ep; i--) {
+ if (Is_udd_endpoint_enabled(i)) {
+ ep_allocated |= 1 << i;
+ udd_disable_endpoint(i);
+ udd_unallocate_memory(i);
+ }
+ }
+
+ // Realloc/Enable endpoints
+ for (i = ep; i <= USB_DEVICE_MAX_EP; i++) {
+ if (ep_allocated & (1 << i)) {
+ udd_allocate_memory(i);
+ udd_enable_endpoint(i);
+ if (!Is_udd_endpoint_configured(i))
+ return false;
+ }
+ }
+ return true;
+}
+
+
+void udd_ep_free(udd_ep_id_t ep)
+{
+ udd_disable_endpoint(ep & USB_EP_ADDR_MASK);
+ udd_unallocate_memory(ep & USB_EP_ADDR_MASK);
+ udd_ep_abort_job(ep);
+}
+
+
+bool udd_ep_is_halted(udd_ep_id_t ep)
+{
+ return Is_udd_endpoint_stall_requested(ep & USB_EP_ADDR_MASK);
+}
+
+
+bool udd_ep_set_halt(udd_ep_id_t ep)
+{
+ uint8_t index = ep & USB_EP_ADDR_MASK;
+
+ if (USB_DEVICE_MAX_EP < index)
+ return false;
+ if (Is_udd_bank_interrupt_enabled(index)) {
+ // Wait end of transfer (= no busy bank) before stall endpoint
+ udd_ep_job[index - 1].stall_requested = true;
+ } else {
+ // Stall endpoint
+ udd_enable_stall_handshake(index);
+ udd_reset_data_toggle(index);
+ }
+ udd_ep_abort_job(ep);
+ return true;
+}
+
+
+bool udd_ep_clear_halt(udd_ep_id_t ep)
+{
+ udd_ep_job_t *ptr_job;
+
+ ep &= USB_EP_ADDR_MASK;
+ if (USB_DEVICE_MAX_EP < ep)
+ return false;
+ ptr_job = &udd_ep_job[ep - 1];
+
+ if (Is_udd_endpoint_stall_requested(ep) // Endpoint stalled
+ || ptr_job->stall_requested) { // Endpoint stall is requested
+ // Remove request to stall
+ ptr_job->stall_requested = false;
+ // Remove stall
+ udd_disable_stall_handshake(ep);
+ // If a job is register on clear halt action
+ // then execute callback
+ if (ptr_job->busy == true) {
+ ptr_job->busy = false;
+ ptr_job->call_nohalt();
+ }
+ }
+ return true;
+}
+
+
+bool udd_ep_run(udd_ep_id_t ep, bool b_shortpacket,
+ uint8_t * buf, iram_size_t buf_size,
+ udd_callback_trans_t callback)
+{
+ bool b_dir_in;
+ uint32_t udd_dma_ctrl = 0;
+ udd_ep_job_t *ptr_job;
+ irqflags_t flags;
+
+ b_dir_in = (USB_EP_DIR_IN == (ep & USB_EP_DIR_IN));
+ ep &= USB_EP_ADDR_MASK;
+ if (USB_DEVICE_MAX_EP < ep)
+ return false;
+
+ // Get job about endpoint
+ ptr_job = &udd_ep_job[ep - 1];
+
+ if ((!Is_udd_endpoint_enabled(ep))
+ || Is_udd_endpoint_stall_requested(ep)
+ || ptr_job->stall_requested)
+ return false; // Endpoint is halted
+
+ flags = cpu_irq_save();
+ if (ptr_job->busy == true) {
+ cpu_irq_restore(flags);
+ return false; // Job already on going
+ }
+ ptr_job->busy = true;
+ cpu_irq_restore(flags);
+
+ // The USBB supports a maximum transfer size of 64KB
+ if (0x10000 <= buf_size) {
+ // Transfer size = 64KB
+ ptr_job->buf_size = 0x10000;
+ buf_size = 0;
+ } else {
+ ptr_job->buf_size = buf_size;
+ if (b_dir_in && (0 != buf_size % udd_get_endpoint_size(ep))) {
+ // Force short packet option to send a shortpacket on IN,
+ // else the DMA transfer is accepted and interrupt DMA valid but nothing is sent.
+ b_shortpacket = true;
+ }
+ }
+ ptr_job->buf = buf;
+ ptr_job->call_trans = callback;
+
+ #ifdef UDD_EP_FIFO_SUPPORTED
+ // No DMA support
+ if (!Is_udd_endpoint_dma_supported(ep)) {
+ //printf("fifoEP%d.%c\n\r", ep, b_dir_in ? 'i':'o');
+ ptr_job->buf_cnt = 0;
+ //ptr_job->need_zlp = b_shortpacket;
+ if (b_dir_in && buf_size == 0 && buf == NULL)
+ ptr_job->need_zlp = true; // Only accept a forced ZLP
+ flags = cpu_irq_save();
+ udd_enable_endpoint_interrupt(ep);
+ if (b_dir_in) {
+ udd_ep_in_sent(ep);
+ udd_enable_in_send_interrupt(ep);
+ }
+ else {
+ udd_enable_out_received_interrupt(ep);
+ }
+ cpu_irq_restore(flags);
+ return true;
+ }
+ #endif
+
+ // Start USB DMA to fill or read fifo of the selected endpoint
+ udd_endpoint_dma_set_addr(ep, (U32) buf);
+ if (b_shortpacket) {
+ if (b_dir_in) {
+ udd_dma_ctrl = UOTGHS_DEVDMACONTROL_END_B_EN;
+ } else {
+ udd_dma_ctrl = UOTGHS_DEVDMACONTROL_END_TR_IT
+ |
+ UOTGHS_DEVDMACONTROL_END_TR_EN;
+ }
+ }
+ udd_dma_ctrl |= (buf_size <<
+ UOTGHS_DEVDMACONTROL_BUFF_LENGTH_Pos)
+ & UOTGHS_DEVDMACONTROL_BUFF_LENGTH_Msk;
+ udd_dma_ctrl |= UOTGHS_DEVDMACONTROL_END_BUFFIT |
+ UOTGHS_DEVDMACONTROL_CHANN_ENB;
+ udd_enable_endpoint_bank_autoswitch(ep);
+ udd_endpoint_dma_set_control(ep, udd_dma_ctrl);
+ flags = cpu_irq_save();
+ udd_enable_endpoint_dma_interrupt(ep);
+ cpu_irq_restore(flags);
+
+ return true;
+}
+
+
+void udd_ep_abort(udd_ep_id_t ep)
+{
+ #ifdef UDD_EP_FIFO_SUPPORTED
+ if (!Is_udd_endpoint_dma_supported(ep)) {
+ // Disable interrupts
+ udd_disable_endpoint_interrupt(ep);
+ udd_disable_out_received_interrupt(ep);
+ udd_disable_in_send_interrupt(ep);
+ // Kill all banks
+ while(udd_ep_kill_last(ep) > 0);
+ }
+ else
+ #endif
+ {
+ // Stop DMA transfer
+ udd_endpoint_dma_set_control((ep & USB_EP_ADDR_MASK), 0);
+ }
+ udd_ep_abort_job(ep);
+}
+
+
+bool udd_ep_wait_stall_clear(udd_ep_id_t ep,
+ udd_callback_halt_cleared_t callback)
+{
+ udd_ep_job_t *ptr_job;
+
+ ep &= USB_EP_ADDR_MASK;
+ if (USB_DEVICE_MAX_EP < ep)
+ return false;
+ ptr_job = &udd_ep_job[ep - 1];
+
+ if (!Is_udd_endpoint_enabled(ep))
+ return false; // Endpoint not enabled
+
+ // Wait clear halt endpoint
+ if (ptr_job->busy == true)
+ return false; // Job already on going
+
+ if (Is_udd_endpoint_stall_requested(ep)
+ || ptr_job->stall_requested) {
+ // Endpoint halted then registes the callback
+ ptr_job->busy = true;
+ ptr_job->call_nohalt = callback;
+ } else {
+ // Enpoint not halted then call directly callback
+ callback();
+ }
+ return true;
+}
+#endif // (0!=USB_DEVICE_MAX_EP)
+
+
+#ifdef USB_DEVICE_HS_SUPPORT
+
+void udd_test_mode_j(void)
+{
+ udd_enable_hs_test_mode();
+ udd_enable_hs_test_mode_j();
+}
+
+
+void udd_test_mode_k(void)
+{
+ udd_enable_hs_test_mode();
+ udd_enable_hs_test_mode_k();
+}
+
+
+void udd_test_mode_se0_nak(void)
+{
+ udd_enable_hs_test_mode();
+}
+
+
+void udd_test_mode_packet(void)
+{
+ uint8_t i;
+ uint8_t *ptr_dest;
+ const uint8_t *ptr_src;
+ irqflags_t flags;
+
+ const uint8_t test_packet[] = {
+ // 00000000 * 9
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ // 01010101 * 8
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ // 01110111 * 8
+ 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE,
+ // 0, {111111S * 15}, 111111
+ 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xFF,
+ // S, 111111S, {0111111S * 7}
+ 0x7F, 0xBF, 0xDF, 0xEF, 0xF7, 0xFB, 0xFD,
+ // 00111111, {S0111111 * 9}, S0
+ 0xFC, 0x7E, 0xBF, 0xDF, 0xEF, 0xF7, 0xFB, 0xFD, 0x7E
+ };
+
+ // Reconfigure control endpoint to bulk IN endpoint
+ udd_disable_endpoint(0);
+ udd_configure_endpoint(0, USB_EP_TYPE_BULK, 1, // IN
+ 64, UOTGHS_DEVEPTCFG_EPBK_1_BANK);
+ udd_allocate_memory(0);
+ udd_enable_endpoint(0);
+
+ udd_enable_hs_test_mode();
+ udd_enable_hs_test_mode_packet();
+
+ // Send packet on endpoint 0
+ ptr_dest = (uint8_t *) & udd_get_endpoint_fifo_access(0, 8);
+ ptr_src = test_packet;
+ for (i = 0; i < sizeof(test_packet); i++) {
+ *ptr_dest++ = *ptr_src++;
+ }
+ flags = cpu_irq_save();
+ udd_enable_in_send_interrupt(0);
+ cpu_irq_restore(flags);
+ udd_ack_in_send(0);
+}
+#endif // USB_DEVICE_HS_SUPPORT
+
+
+
+//--------------------------------------------------------
+//--- INTERNAL ROUTINES TO MANAGED THE CONTROL ENDPOINT
+
+static void udd_reset_ep_ctrl(void)
+{
+ irqflags_t flags;
+ // Reset USB address to 0
+ udd_configure_address(0);
+ udd_enable_address();
+ // Alloc and configure control endpoint
+ //udd_configure_endpoint(0,
+ // USB_EP_TYPE_CONTROL,
+ // 0,
+ // USB_DEVICE_EP_CTRL_SIZE, AVR32_USBB_UECFG0_EPBK_SINGLE);
+ udd_configure_endpoint(0,
+ USB_EP_TYPE_CONTROL,
+ 0,
+ USB_DEVICE_EP_CTRL_SIZE, UOTGHS_DEVEPTCFG_EPBK_1_BANK);
+
+ udd_allocate_memory(0);
+ udd_enable_endpoint(0);
+ flags = cpu_irq_save();
+ udd_enable_setup_received_interrupt(0);
+ udd_enable_out_received_interrupt(0);
+ udd_enable_endpoint_interrupt(0);
+ cpu_irq_restore(flags);
+}
+
+static void udd_ctrl_init(void)
+{
+ irqflags_t flags;
+ flags = cpu_irq_save();
+ // In case of abort of IN Data Phase:
+ // No need to abort IN transfer (rise TXINI),
+ // because it is automatically done by hardware when a Setup packet is received.
+ // But the interrupt must be disabled to don't generate interrupt TXINI
+ // after SETUP reception.
+ udd_disable_in_send_interrupt(0);
+ cpu_irq_restore(flags);
+ // In case of OUT ZLP event is no processed before Setup event occurs
+ udd_ack_out_received(0);
+
+ udd_g_ctrlreq.callback = NULL;
+ udd_g_ctrlreq.over_under_run = NULL;
+ udd_g_ctrlreq.payload_size = 0;
+ udd_ep_control_state = UDD_EPCTRL_SETUP;
+}
+
+
+static void udd_ctrl_setup_received(void)
+{
+ irqflags_t flags;
+ uint8_t i;
+
+ if (UDD_EPCTRL_SETUP != udd_ep_control_state) {
+ // May be a hidden DATA or ZLP phase
+ // or protocol abort
+ udd_ctrl_endofrequest();
+ // Reinitializes control endpoint management
+ udd_ctrl_init();
+ }
+ // Fill setup request structure
+ if (8 != udd_byte_count(0)) {
+ udd_ctrl_stall_data();
+ udd_ack_setup_received(0);
+ return; // Error data number doesn't correspond to SETUP packet
+ }
+ uint32_t *ptr = (uint32_t *) & udd_get_endpoint_fifo_access(0, 32);
+ for (i = 0; i < 8 / 4; i++) {
+ ((uint32_t *) & udd_g_ctrlreq.req)[i] = *ptr++;
+ }
+ // Manage LSB/MSB to fit with CPU usage
+ udd_g_ctrlreq.req.wValue = le16_to_cpu(udd_g_ctrlreq.req.wValue);
+ udd_g_ctrlreq.req.wIndex = le16_to_cpu(udd_g_ctrlreq.req.wIndex);
+ udd_g_ctrlreq.req.wLength = le16_to_cpu(udd_g_ctrlreq.req.wLength);
+
+ // Decode setup request
+ if (udc_process_setup() == false) {
+ // Setup request unknow then stall it
+ udd_ctrl_stall_data();
+ udd_ack_setup_received(0);
+ return;
+ }
+ udd_ack_setup_received(0);
+
+ if (Udd_setup_is_in()) {
+ // Compute if an IN ZLP must be send after IN data
+ udd_ctrl_payload_need_in_zlp =
+ ((udd_g_ctrlreq.payload_size %
+ USB_DEVICE_EP_CTRL_SIZE) == 0);
+ // IN data phase requested
+ udd_ctrl_prev_payload_nb_trans = 0;
+ udd_ctrl_payload_nb_trans = 0;
+ udd_ep_control_state = UDD_EPCTRL_DATA_IN;
+ udd_ctrl_in_sent(); // Send first data transfer
+ } else {
+ if (0 == udd_g_ctrlreq.req.wLength) {
+ // No data phase requested
+ // Send IN ZLP to ACK setup request
+ udd_ctrl_send_zlp_in();
+ return;
+ }
+ // OUT data phase requested
+ udd_ctrl_prev_payload_nb_trans = 0;
+ udd_ctrl_payload_nb_trans = 0;
+ udd_ep_control_state = UDD_EPCTRL_DATA_OUT;
+ // To detect a protocol error, enable nak interrupt on data IN phase
+ udd_ack_nak_in(0);
+ flags = cpu_irq_save();
+ udd_enable_nak_in_interrupt(0);
+ cpu_irq_restore(flags);
+ }
+}
+
+
+static void udd_ctrl_in_sent(void)
+{
+ uint16_t nb_remain;
+ uint8_t i;
+ uint8_t *ptr_dest, *ptr_src;
+ irqflags_t flags;
+
+ flags = cpu_irq_save();
+ udd_disable_in_send_interrupt(0);
+ cpu_irq_restore(flags);
+
+ if (UDD_EPCTRL_HANDSHAKE_WAIT_IN_ZLP == udd_ep_control_state) {
+ // ZLP on IN is sent, then valid end of setup request
+ udd_ctrl_endofrequest();
+ // Reinitializes control endpoint management
+ udd_ctrl_init();
+ return;
+ }
+ Assert(udd_ep_control_state == UDD_EPCTRL_DATA_IN);
+
+ nb_remain = udd_g_ctrlreq.payload_size - udd_ctrl_payload_nb_trans;
+ if (0 == nb_remain) {
+ // All content of current buffer payload are sent
+ if (!udd_ctrl_payload_need_in_zlp) {
+ // It is the end of data phase, because the last data packet is a short packet
+ // then generate an OUT ZLP for handshake phase.
+ udd_ctrl_send_zlp_out();
+ return;
+ }
+ if ((udd_g_ctrlreq.req.wLength > (udd_ctrl_prev_payload_nb_trans
+ +
+ udd_g_ctrlreq.
+ payload_size))
+ || (!udd_g_ctrlreq.over_under_run)
+ || (!udd_g_ctrlreq.over_under_run())) {
+ // Underrun or data packet complette than send zlp on IN (note don't change DataToggle)
+ udd_ctrl_payload_need_in_zlp = false;
+ // nb_remain==0 allows to send a IN ZLP
+ } else {
+ // A new payload buffer is given
+ // Update number of total data sending by previous playlaod buffer
+ udd_ctrl_prev_payload_nb_trans +=
+ udd_ctrl_payload_nb_trans;
+ // Update maangement of current playoad transfer
+ udd_ctrl_payload_nb_trans = 0;
+ nb_remain = udd_g_ctrlreq.payload_size;
+ // Compute if an IN ZLP must be send after IN data
+ udd_ctrl_payload_need_in_zlp =
+ ((udd_g_ctrlreq.payload_size %
+ USB_DEVICE_EP_CTRL_SIZE)
+ == 0);
+ }
+ }
+ // Continue transfer and send next data
+ if (nb_remain > USB_DEVICE_EP_CTRL_SIZE) {
+ nb_remain = USB_DEVICE_EP_CTRL_SIZE;
+ }
+ // Fill buffer of endpoint control
+ ptr_dest = (uint8_t *) & udd_get_endpoint_fifo_access(0, 8);
+ ptr_src = udd_g_ctrlreq.payload + udd_ctrl_payload_nb_trans;
+ //** Critical section
+ // Only in case of DATA IN phase abort without USB Reset signal after.
+ // The IN data don't must be writed in endpoint 0 DPRAM during
+ // a next setup reception in same endpoint 0 DPRAM.
+ // Thereby, an OUT ZLP reception must check before IN data write
+ // and if no OUT ZLP is recevied the data must be written quickly (800us)
+ // before an eventually ZLP OUT and SETUP reception
+ flags = cpu_irq_save();
+ if (Is_udd_out_received(0)) {
+ // IN DATA phase aborted by OUT ZLP
+ cpu_irq_restore(flags);
+ udd_ep_control_state = UDD_EPCTRL_HANDSHAKE_WAIT_OUT_ZLP;
+ return; // Exit of IN DATA phase
+ }
+ // Write quickly the IN data
+ for (i = 0; i < nb_remain; i++) {
+ *ptr_dest++ = *ptr_src++;
+ }
+ udd_ctrl_payload_nb_trans += nb_remain;
+
+ // Validate and send the data available in the control endpoint buffer
+ udd_ack_in_send(0);
+ udd_enable_in_send_interrupt(0);
+ // In case of abort of DATA IN phase, no need to enable nak OUT interrupt
+ // because OUT endpoint is already free and ZLP OUT accepted.
+ cpu_irq_restore(flags);
+}
+
+
+static void udd_ctrl_out_received(void)
+{
+ irqflags_t flags;
+ uint8_t i;
+ uint16_t nb_data;
+
+ if (UDD_EPCTRL_DATA_OUT != udd_ep_control_state) {
+ if ((UDD_EPCTRL_DATA_IN == udd_ep_control_state)
+ || (UDD_EPCTRL_HANDSHAKE_WAIT_OUT_ZLP ==
+ udd_ep_control_state)) {
+ // End of SETUP request:
+ // - Data IN Phase aborted,
+ // - or last Data IN Phase hidden by ZLP OUT sending quiclky,
+ // - or ZLP OUT received normaly.
+ udd_ctrl_endofrequest();
+ } else {
+ // Protocol error during SETUP request
+ udd_ctrl_stall_data();
+ }
+ // Reinitializes control endpoint management
+ udd_ctrl_init();
+ return;
+ }
+ // Read data received during OUT phase
+ nb_data = udd_byte_count(0);
+ if (udd_g_ctrlreq.payload_size < (udd_ctrl_payload_nb_trans + nb_data)) {
+ // Payload buffer too small
+ nb_data = udd_g_ctrlreq.payload_size -
+ udd_ctrl_payload_nb_trans;
+ }
+ uint8_t *ptr_src = (uint8_t *) & udd_get_endpoint_fifo_access(0, 8);
+ uint8_t *ptr_dest = udd_g_ctrlreq.payload + udd_ctrl_payload_nb_trans;
+ for (i = 0; i < nb_data; i++) {
+ *ptr_dest++ = *ptr_src++;
+ }
+ udd_ctrl_payload_nb_trans += nb_data;
+
+ if ((USB_DEVICE_EP_CTRL_SIZE != nb_data)
+ || (udd_g_ctrlreq.req.wLength <=
+ (udd_ctrl_prev_payload_nb_trans +
+ udd_ctrl_payload_nb_trans)))
+ {
+ // End of reception because it is a short packet
+ // Before send ZLP, call intermediat calback
+ // in case of data receiv generate a stall
+ udd_g_ctrlreq.payload_size = udd_ctrl_payload_nb_trans;
+ if (NULL != udd_g_ctrlreq.over_under_run) {
+ if (!udd_g_ctrlreq.over_under_run()) {
+ // Stall ZLP
+ udd_ctrl_stall_data();
+ // Ack reception of OUT to replace NAK by a STALL
+ udd_ack_out_received(0);
+ return;
+ }
+ }
+ // Send IN ZLP to ACK setup request
+ udd_ack_out_received(0);
+ udd_ctrl_send_zlp_in();
+ return;
+ }
+
+ if (udd_g_ctrlreq.payload_size == udd_ctrl_payload_nb_trans) {
+ // Overrun then request a new payload buffer
+ if (!udd_g_ctrlreq.over_under_run) {
+ // No callback availabled to request a new payload buffer
+ udd_ctrl_stall_data();
+ // Ack reception of OUT to replace NAK by a STALL
+ udd_ack_out_received(0);
+ return;
+ }
+ if (!udd_g_ctrlreq.over_under_run()) {
+ // No new payload buffer delivered
+ udd_ctrl_stall_data();
+ // Ack reception of OUT to replace NAK by a STALL
+ udd_ack_out_received(0);
+ return;
+ }
+ // New payload buffer available
+ // Update number of total data received
+ udd_ctrl_prev_payload_nb_trans += udd_ctrl_payload_nb_trans;
+ // Reinit reception on payload buffer
+ udd_ctrl_payload_nb_trans = 0;
+ }
+ // Free buffer of control endpoint to authorize next reception
+ udd_ack_out_received(0);
+ // To detect a protocol error, enable nak interrupt on data IN phase
+ udd_ack_nak_in(0);
+ flags = cpu_irq_save();
+ udd_enable_nak_in_interrupt(0);
+ cpu_irq_restore(flags);
+}
+
+
+static void udd_ctrl_underflow(void)
+{
+ if (Is_udd_out_received(0))
+ return; // underflow ignored if OUT data is received
+
+ if (UDD_EPCTRL_DATA_OUT == udd_ep_control_state) {
+ // Host want to stop OUT transaction
+ // then stop to wait OUT data phase and wait IN ZLP handshake
+ udd_ctrl_send_zlp_in();
+ } else if (UDD_EPCTRL_HANDSHAKE_WAIT_OUT_ZLP == udd_ep_control_state) {
+ // A OUT handshake is waiting by device,
+ // but host want extra IN data then stall extra IN data
+ udd_enable_stall_handshake(0);
+ }
+}
+
+
+static void udd_ctrl_overflow(void)
+{
+ if (Is_udd_in_send(0))
+ return; // overflow ignored if IN data is received
+
+ // The case of UDD_EPCTRL_DATA_IN is not managed
+ // because the OUT endpoint is already free and OUT ZLP accepted
+
+ if (UDD_EPCTRL_HANDSHAKE_WAIT_IN_ZLP == udd_ep_control_state) {
+ // A IN handshake is waiting by device,
+ // but host want extra OUT data then stall extra OUT data
+ udd_enable_stall_handshake(0);
+ }
+}
+
+
+static void udd_ctrl_stall_data(void)
+{
+ // Stall all packets on IN & OUT control endpoint
+ udd_ep_control_state = UDD_EPCTRL_STALL_REQ;
+ udd_enable_stall_handshake(0);
+}
+
+
+static void udd_ctrl_send_zlp_in(void)
+{
+ irqflags_t flags;
+
+ udd_ep_control_state = UDD_EPCTRL_HANDSHAKE_WAIT_IN_ZLP;
+ // Validate and send empty IN packet on control endpoint
+ flags = cpu_irq_save();
+ // Send ZLP on IN endpoint
+ udd_ack_in_send(0);
+ udd_enable_in_send_interrupt(0);
+ // To detect a protocol error, enable nak interrupt on data OUT phase
+ udd_ack_nak_out(0);
+ udd_enable_nak_out_interrupt(0);
+ cpu_irq_restore(flags);
+}
+
+
+static void udd_ctrl_send_zlp_out(void)
+{
+ irqflags_t flags;
+
+ udd_ep_control_state = UDD_EPCTRL_HANDSHAKE_WAIT_OUT_ZLP;
+ // No action is necessary to accept OUT ZLP
+ // because the buffer of control endpoint is already free
+
+ // To detect a protocol error, enable nak interrupt on data IN phase
+ flags = cpu_irq_save();
+ udd_ack_nak_in(0);
+ udd_enable_nak_in_interrupt(0);
+ cpu_irq_restore(flags);
+}
+
+
+static void udd_ctrl_endofrequest(void)
+{
+ // If a callback is registered then call it
+ if (udd_g_ctrlreq.callback) {
+ udd_g_ctrlreq.callback();
+ }
+}
+
+
+static bool udd_ctrl_interrupt(void)
+{
+
+ if (!Is_udd_endpoint_interrupt(0))
+ return false; // No interrupt events on control endpoint
+
+ // By default disable overflow and underflow interrupt
+ udd_disable_nak_in_interrupt(0);
+ udd_disable_nak_out_interrupt(0);
+
+
+ // Search event on control endpoint
+ if (Is_udd_setup_received(0)) {
+ // SETUP packet received
+ udd_ctrl_setup_received();
+ return true;
+ }
+ if (Is_udd_in_send(0) && Is_udd_in_send_interrupt_enabled(0)) {
+ // IN packet sent
+ udd_ctrl_in_sent();
+ return true;
+ }
+ if (Is_udd_out_received(0)) {
+ // OUT packet received
+ udd_ctrl_out_received();
+ return true;
+ }
+ if (Is_udd_nak_out(0)) {
+ // Overflow on OUT packet
+ udd_ack_nak_out(0);
+ udd_ctrl_overflow();
+ return true;
+ }
+ if (Is_udd_nak_in(0)) {
+ // Underflow on IN packet
+ udd_ack_nak_in(0);
+ udd_ctrl_underflow();
+ return true;
+ }
+ return false;
+}
+
+
+//--------------------------------------------------------
+//--- INTERNAL ROUTINES TO MANAGED THE BULK/INTERRUPT/ISOCHRONOUS ENDPOINTS
+
+#if (0!=USB_DEVICE_MAX_EP)
+
+static void udd_ep_job_table_reset(void)
+{
+ uint8_t i;
+ for (i = 0; i < USB_DEVICE_MAX_EP; i++) {
+ udd_ep_job[i].busy = false;
+ udd_ep_job[i].stall_requested = false;
+ }
+}
+
+
+static void udd_ep_job_table_kill(void)
+{
+ uint8_t i;
+ // For each endpoint, kill job
+ for (i = 0; i < USB_DEVICE_MAX_EP; i++) {
+ udd_ep_finish_job(&udd_ep_job[i], true);
+ }
+}
+
+
+static void udd_ep_abort_job(udd_ep_id_t ep)
+{
+ ep &= USB_EP_ADDR_MASK;
+ // Abort job on endpoint
+ udd_ep_finish_job(&udd_ep_job[ep - 1], true);
+}
+
+
+static void udd_ep_finish_job(udd_ep_job_t * ptr_job, bool b_abort)
+{
+ if (ptr_job->busy == false)
+ return; // No on-going job
+ ptr_job->busy = false;
+ if (NULL == ptr_job->call_trans)
+ return; // No callback linked to job
+ ptr_job->call_trans((b_abort) ? UDD_EP_TRANSFER_ABORT :
+ UDD_EP_TRANSFER_OK, ptr_job->buf_size);
+}
+
+#ifdef UDD_EP_FIFO_SUPPORTED
+static uint32_t udd_ep_kill_last(udd_ep_id_t ep)
+{
+ udd_kill_last_in_bank(ep);
+ while(Is_udd_last_in_bank_killed(ep));
+ return udd_nb_busy_bank(ep);
+}
+
+static void udd_ep_in_sent(udd_ep_id_t ep)
+{
+ udd_ep_job_t *ptr_job = &udd_ep_job[ep - 1];
+ uint8_t *ptr_src = &ptr_job->buf[ptr_job->buf_cnt];
+ uint8_t *ptr_dst = (uint8_t*) &udd_get_endpoint_fifo_access(ep, 8);
+ uint8_t nb_bank = udd_get_endpoint_bank(ep);
+ uint32_t pkt_size = udd_get_endpoint_size(ep);
+ uint32_t nb_data = 0, i;
+ uint32_t nb_remain;
+ //printf("i%d.%d ", ep, nb_bank);
+ // All transfer done, including ZLP, Finish Job
+ if (ptr_job->buf_cnt >= ptr_job->buf_size && !ptr_job->need_zlp) {
+ udd_disable_in_send_interrupt(ep);
+ udd_disable_endpoint_interrupt(ep);
+ udd_ack_in_send(ep); // Clear IN Sent
+ //printf("EoI%d\n\r", ep);
+ ptr_job->buf_size = ptr_job->buf_cnt; // buf_size is passed to callback as XFR count
+ udd_ep_finish_job(ptr_job, false);
+ return;
+ }
+ // There is data to send
+ if (udd_nb_busy_bank(ep)) {
+ udd_ack_in_send(ep);
+ }
+ // Fill FIFOs
+ while (true) {
+ // All data sent
+ if (ptr_job->buf_cnt >= ptr_job->buf_size && !ptr_job->need_zlp) {
+ break;
+ }
+ ptr_dst = (uint8_t*) &udd_get_endpoint_fifo_access(ep, 8);
+ ptr_src = &ptr_job->buf[ptr_job->buf_cnt];
+ nb_remain = ptr_job->buf_size - ptr_job->buf_cnt;
+ // Fill a bank even if no data (ZLP)
+ nb_data = min(nb_remain, pkt_size);
+ // Modify job information
+ ptr_job->buf_cnt += nb_data;
+ // Copy buffer to FIFO
+ for (i = 0; i < nb_data; i ++) {
+ *ptr_dst ++ = *ptr_src ++;
+ }
+ // Switch to next bank
+ udd_ack_fifocon(ep);
+ //printf("%d,%d ", nb_data, udd_nb_busy_bank(ep));
+ // ZLP?
+ if (nb_data < pkt_size)
+ ptr_job->need_zlp = false;
+ // All banks filled
+ if (udd_nb_busy_bank(ep) >= nb_bank)
+ break;
+ // Short packet is processed!
+ if (nb_data < pkt_size) {
+ ptr_job->need_zlp = false;
+ break;
+ }
+ }
+}
+
+static void udd_ep_out_received(udd_ep_id_t ep)
+{
+ udd_ep_job_t *ptr_job = &udd_ep_job[ep - 1];
+ uint32_t nb_data = 0, i;
+ uint32_t nb_remain = ptr_job->buf_size - ptr_job->buf_cnt;
+ uint32_t pkt_size = udd_get_endpoint_size(ep);
+ uint8_t *ptr_src = (uint8_t*) &udd_get_endpoint_fifo_access(ep, 8);
+ uint8_t *ptr_dst = &ptr_job->buf[ptr_job->buf_cnt];
+ bool b_full = false, b_short = false;
+ // Clear RX OUT
+ udd_ack_out_received(ep);
+ // Read byte count
+ nb_data = udd_byte_count(ep);
+ if (nb_data < pkt_size)
+ b_short = true;
+ //printf("o%d ", ep);
+ //printf("%d ", nb_data);
+ // Copy data if there is
+ if (nb_data > 0) {
+ if (nb_data >= nb_remain) {
+ nb_data = nb_remain;
+ b_full = true;
+ }
+ // Modify job information
+ ptr_job->buf_cnt += nb_data;
+ // Copy FIFO to buffer
+ for (i = 0; i < nb_data; i ++) {
+ *ptr_dst ++ = *ptr_src ++;
+ }
+ }
+ // Clear FIFO Status
+ udd_ack_fifocon(ep);
+ // Finish job on error or short packet
+ if (b_full || b_short) {
+ //printf("EoO%d\n\r", ep);
+ udd_disable_out_received_interrupt(ep);
+ udd_disable_endpoint_interrupt(ep);
+ ptr_job->buf_size = ptr_job->buf_cnt; // buf_size is passed to callback as XFR count
+ udd_ep_finish_job(ptr_job, false);
+ }
+}
+#endif // #ifdef UDD_EP_FIFO_SUPPORTED
+
+static bool udd_ep_interrupt(void)
+{
+ udd_ep_id_t ep;
+ udd_ep_job_t *ptr_job;
+
+ // For each endpoint different of control endpoint (0)
+ for (ep = 1; ep <= USB_DEVICE_MAX_EP; ep++) {
+ // Check DMA event
+ if (Is_udd_endpoint_dma_interrupt_enabled(ep)
+ && Is_udd_endpoint_dma_interrupt(ep)) {
+ uint32_t nb_remaining;
+ udd_disable_endpoint_dma_interrupt(ep);
+ // Save number of data no transfered
+ nb_remaining = (udd_endpoint_dma_get_status(ep) &
+ UOTGHS_DEVDMASTATUS_BUFF_COUNT_Msk)
+ >>
+ UOTGHS_DEVDMASTATUS_BUFF_COUNT_Pos;
+ // Get job corresponding at endpoint
+ ptr_job = &udd_ep_job[ep - 1];
+ // Update number of data transfered
+ ptr_job->buf_size -= nb_remaining;
+
+ if (!Is_udd_endpoint_in(ep)) {
+ // Disable autoswitch bank on OUT
+ udd_disable_endpoint_bank_autoswitch(ep);
+ } else {
+ // Wait end of background transfer on IN endpoint before disabled autoswitch bank
+ udd_enable_endpoint_interrupt(ep);
+ udd_enable_bank_interrupt(ep);
+ }
+ // Call callback to signal end of transfer
+ udd_ep_finish_job(&udd_ep_job[ep - 1], false);
+ return true;
+ }
+ #ifdef UDD_EP_FIFO_SUPPORTED
+ // Check RXRDY and TXEMPTY event for none DMA endpoints
+ if (!Is_udd_endpoint_dma_supported(ep)
+ && Is_udd_endpoint_interrupt_enabled(ep)) {
+ //printf("%x ", USBB_ARRAY(UOTGHS_DEVEPTISR[0],ep));
+ // RXOUT: Full packet received
+ if (Is_udd_out_received(ep)
+ && Is_udd_out_received_interrupt_enabled(ep)) {
+ udd_ep_out_received(ep);
+ return true;
+ }
+ // TXIN: packet sent
+ if (Is_udd_in_send(ep)
+ && Is_udd_in_send_interrupt_enabled(ep)) {
+ udd_ep_in_sent(ep);
+ return true;
+ }
+ // Errors: Abort?
+ if (Is_udd_overflow(ep) || Is_udd_underflow(ep) || Is_udd_crc_error(ep)) {
+ udd_ep_abort(ep);
+ return true;
+ }
+ }
+ #endif
+ // Check empty bank interrupt event
+ if (Is_udd_endpoint_interrupt_enabled(ep)
+ && Is_udd_endpoint_dma_supported(ep)
+ && (0 == udd_nb_busy_bank(ep))) {
+ // End of background transfer on IN endpoint
+ udd_disable_bank_interrupt(ep);
+ udd_disable_endpoint_interrupt(ep);
+ // If no new transfer running then disable autoswitch bank
+ if (!udd_ep_job[ep - 1].busy) {
+ udd_disable_endpoint_bank_autoswitch(ep);
+ }
+ // If a stall has been requested during backgound transfer then execute it
+ if (udd_ep_job[ep - 1].stall_requested) {
+ udd_ep_job[ep - 1].stall_requested = false;
+ udd_enable_stall_handshake(ep);
+ udd_reset_data_toggle(ep);
+ }
+ return true;
+ }
+ }
+ return false;
+}
+#endif // (0!=USB_DEVICE_MAX_EP)
+
+//@}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/drivers/usbb/usbb_device.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/drivers/usbb/usbb_device.h
new file mode 100644
index 0000000..e8e88dc
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/drivers/usbb/usbb_device.h
@@ -0,0 +1,575 @@
+/**
+ * \file
+ *
+ * \brief USBB Device Driver header file.
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _USBB_DEVICE_H_
+#define _USBB_DEVICE_H_
+
+#include "compiler.h"
+//#include "preprocessor.h"
+
+//! \ingroup usb_device_group
+//! \defgroup udd_group USB Device Driver (UDD)
+//! USBB low-level driver for USB device mode
+//!
+//! @warning Bit-masks are used instead of bit-fields because PB registers
+//! require 32-bit write accesses while AVR32-GCC 4.0.2 builds 8-bit
+//! accesses even when volatile unsigned int bit-fields are specified.
+//! @{
+
+//! @name USBB Device IP properties
+//! These macros give access to IP properties
+//! @{
+ //! Get maximal number of endpoints
+#define UDD_get_endpoint_max_nbr() (6) // ep without dma not implemented
+//#define UDD_get_endpoint_max_nbr() (9)
+ //! Get maximal number of banks of endpoints
+#define UDD_get_endpoint_bank_max_nbr(ep) ((ep==0)?1:((ep<=2)?3:2))
+ //! Get DMA support of endpoints (always)
+//#define Is_udd_endpoint_dma_supported(ep) (false) // ep with dma not implemented
+//#define Is_udd_endpoint_dma_supported(ep) (true) // ep without dma not implemented
+#define Is_udd_endpoint_dma_supported(ep) ((((ep)>=1)&&((ep)<=6))?true:false)
+ //! Get High Band Width support of endpoints
+#define Is_udd_endpoint_high_bw_supported(ep) (((ep)>=2)?true:false)
+//! @}
+
+//! @name USBB Device speeds management
+//! @{
+ //! Enable/disable device low-speed mode
+#define udd_low_speed_enable() (Set_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_LS))
+#define udd_low_speed_disable() (Clr_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_LS))
+ //! Test if device low-speed mode is forced
+#define Is_udd_low_speed_enable() (Tst_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_LS))
+
+#ifdef UOTGHS_DEVCTRL_SPDCONF_HIGH_SPEED
+ //! Enable high speed mode
+# define udd_high_speed_enable() (Wr_bitfield(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_SPDCONF_Msk, 0))
+ //! Disable high speed mode
+# define udd_high_speed_disable() (Wr_bitfield(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_SPDCONF_Msk, 3))
+ //! Test if controller is in full speed mode
+# define Is_udd_full_speed_mode() (Rd_bitfield(UOTGHS->UOTGHS_SR, UOTGHS_SR_SPEED_Msk) == UOTGHS_SR_SPEED_FULL_SPEED)
+#else
+# define udd_high_speed_enable() do { } while (0)
+# define udd_high_speed_disable() do { } while (0)
+# define Is_udd_full_speed_mode() TRUE
+#endif
+//! @}
+
+//! @name USBB Device HS test mode management
+//! @{
+#ifdef UOTGHS_DEVCTRL_SPDCONF_HIGH_SPEED
+ //! Enable high speed test mode
+# define udd_enable_hs_test_mode() (Wr_bitfield(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_SPDCONF_Msk, 2))
+# define udd_enable_hs_test_mode_j() (Set_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_TSTJ))
+# define udd_enable_hs_test_mode_k() (Set_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_TSTK))
+# define udd_enable_hs_test_mode_packet() (Set_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_TSTPCKT))
+#endif
+//! @}
+
+//! @name USBB Device vbus management
+//! @{
+#define udd_enable_vbus_interrupt() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_VBUSTE))
+#define udd_disable_vbus_interrupt() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_VBUSTE))
+#define Is_udd_vbus_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_VBUSTE))
+#define Is_udd_vbus_high() (Tst_bits(UOTGHS->UOTGHS_SR, UOTGHS_SR_VBUS))
+#define Is_udd_vbus_low() (!Is_udd_vbus_high())
+#define udd_ack_vbus_transition() (UOTGHS->UOTGHS_SCR = UOTGHS_SCR_VBUSTIC)
+#define udd_raise_vbus_transition() (UOTGHS->UOTGHS_SFR = UOTGHS_SFR_VBUSTIS)
+#define Is_udd_vbus_transition() (Tst_bits(UOTGHS->UOTGHS_SR, UOTGHS_SR_VBUSTI))
+//! @}
+
+
+//! @name USBB device attach control
+//! These macros manage the USBB Device attach.
+//! @{
+ //! detaches from USB bus
+#define udd_detach_device() (Set_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_DETACH))
+ //! attaches to USB bus
+#define udd_attach_device() (Clr_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_DETACH))
+ //! test if the device is detached
+#define Is_udd_detached() (Tst_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_DETACH))
+//! @}
+
+
+//! @name USBB device bus events control
+//! These macros manage the USBB Device bus events.
+//! @{
+
+//! Initiates a remote wake-up event
+//! @{
+#define udd_initiate_remote_wake_up() (Set_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_RMWKUP))
+#define Is_udd_pending_remote_wake_up() (Tst_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_RMWKUP))
+//! @}
+
+//! Manage upstream resume event (=remote wakeup)
+//! The USB driver sends a resume signal called "Upstream Resume"
+//! @{
+#define udd_enable_remote_wake_up_interrupt() (UOTGHS->UOTGHS_DEVIER = UOTGHS_DEVIER_UPRSMES)
+#define udd_disable_remote_wake_up_interrupt() (UOTGHS->UOTGHS_DEVIDR = UOTGHS_DEVIDR_UPRSMEC)
+#define Is_udd_remote_wake_up_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_DEVIMR, UOTGHS_DEVIMR_UPRSME))
+#define udd_ack_remote_wake_up_start() (UOTGHS->UOTGHS_DEVICR = UOTGHS_DEVICR_UPRSMC)
+#define udd_raise_remote_wake_up_start() (UOTGHS->UOTGHS_DEVIFR = UOTGHS_DEVIFR_UPRSMS)
+#define Is_udd_remote_wake_up_start() (Tst_bits(UOTGHS->UOTGHS_DEVISR, UOTGHS_DEVISR_UPRSM))
+//! @}
+
+//! Manage end of resume event (=remote wakeup)
+//! The USB controller detects a valid "End of Resume" signal initiated by the host
+//! @{
+#define udd_enable_resume_interrupt() (UOTGHS->UOTGHS_DEVIER = UOTGHS_DEVIER_EORSMES)
+#define udd_disable_resume_interrupt() (UOTGHS->UOTGHS_DEVIDR = UOTGHS_DEVIDR_EORSMEC)
+#define Is_udd_resume_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_DEVIMR, UOTGHS_DEVIMR_EORSME))
+#define udd_ack_resume() (UOTGHS->UOTGHS_DEVICR = UOTGHS_DEVICR_EORSMC)
+#define udd_raise_resume() (UOTGHS->UOTGHS_DEVIFR = UOTGHS_DEVIFR_EORSMS)
+#define Is_udd_resume() (Tst_bits(UOTGHS->UOTGHS_DEVISR, UOTGHS_DEVISR_EORSM))
+//! @}
+
+//! Manage wake-up event (=usb line activity)
+//! The USB controller is reactivated by a filtered non-idle signal from the lines
+//! @{
+#define udd_enable_wake_up_interrupt() (UOTGHS->UOTGHS_DEVIER = UOTGHS_DEVIER_WAKEUPES)
+#define udd_disable_wake_up_interrupt() (UOTGHS->UOTGHS_DEVIDR = UOTGHS_DEVIDR_WAKEUPEC)
+#define Is_udd_wake_up_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_DEVIMR, UOTGHS_DEVIMR_WAKEUPE))
+#define udd_ack_wake_up() (UOTGHS->UOTGHS_DEVICR = UOTGHS_DEVICR_WAKEUPC)
+#define udd_raise_wake_up() (UOTGHS->UOTGHS_DEVIFR = UOTGHS_DEVIFR_WAKEUPS)
+#define Is_udd_wake_up() (Tst_bits(UOTGHS->UOTGHS_DEVISR, UOTGHS_DEVISR_WAKEUP))
+//! @}
+
+//! Manage reset event
+//! Set when a USB "End of Reset" has been detected
+//! @{
+#define udd_enable_reset_interrupt() (UOTGHS->UOTGHS_DEVIER = UOTGHS_DEVIER_EORSTES)
+#define udd_disable_reset_interrupt() (UOTGHS->UOTGHS_DEVIDR = UOTGHS_DEVIDR_EORSTEC)
+#define Is_udd_reset_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_DEVIMR, UOTGHS_DEVIMR_EORSTE))
+#define udd_ack_reset() (UOTGHS->UOTGHS_DEVICR = UOTGHS_DEVICR_EORSTC)
+#define udd_raise_reset() (UOTGHS->UOTGHS_DEVIFR = UOTGHS_DEVIFR_EORSTS)
+#define Is_udd_reset() (Tst_bits(UOTGHS->UOTGHS_DEVISR, UOTGHS_DEVISR_EORST))
+//! @}
+
+//! Manage sart of frame event
+//! @{
+#define udd_enable_sof_interrupt() (UOTGHS->UOTGHS_DEVIER = UOTGHS_DEVIER_SOFES)
+#define udd_disable_sof_interrupt() (UOTGHS->UOTGHS_DEVIDR = UOTGHS_DEVIDR_SOFEC)
+#define Is_udd_sof_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_DEVIMR, UOTGHS_DEVIMR_SOFE))
+#define udd_ack_sof() (UOTGHS->UOTGHS_DEVICR = UOTGHS_DEVICR_SOFC)
+#define udd_raise_sof() (UOTGHS->UOTGHS_DEVIFR = UOTGHS_DEVIFR_SOFS)
+#define Is_udd_sof() (Tst_bits(UOTGHS->UOTGHS_DEVISR, UOTGHS_DEVISR_SOF))
+#define udd_frame_number() (Rd_bitfield(UOTGHS->UOTGHS_DEVFNUM, UOTGHS_DEVFNUM_FNUM_Msk))
+#define Is_udd_frame_number_crc_error() (Tst_bits(UOTGHS->UOTGHS_DEVFNUM, UOTGHS_DEVFNUM_FNCERR))
+//! @}
+
+//! Manage suspend event
+//! @{
+#define udd_enable_suspend_interrupt() (UOTGHS->UOTGHS_DEVIER = UOTGHS_DEVIER_SUSPES)
+#define udd_disable_suspend_interrupt() (UOTGHS->UOTGHS_DEVIDR = UOTGHS_DEVIDR_SUSPEC)
+#define Is_udd_suspend_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_DEVIMR, UOTGHS_DEVIMR_SUSPE))
+#define udd_ack_suspend() (UOTGHS->UOTGHS_DEVICR = UOTGHS_DEVICR_SUSPC)
+#define udd_raise_suspend() (UOTGHS->UOTGHS_DEVIFR = UOTGHS_DEVIFR_SUSPS)
+#define Is_udd_suspend() (Tst_bits(UOTGHS->UOTGHS_DEVISR, UOTGHS_DEVISR_SUSP))
+//! @}
+
+//! @}
+
+//! @name USBB device address control
+//! These macros manage the USBB Device address.
+//! @{
+ //! enables USB device address
+#define udd_enable_address() (Set_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_ADDEN))
+ //! disables USB device address
+#define udd_disable_address() (Clr_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_ADDEN))
+#define Is_udd_address_enabled() (Tst_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_ADDEN))
+ //! configures the USB device address
+#define udd_configure_address(addr) (Wr_bitfield(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_UADD_Msk, addr))
+ //! gets the currently configured USB device address
+#define udd_get_configured_address() (Rd_bitfield(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_UADD_Msk))
+//! @}
+
+
+//! @name USBB Device endpoint drivers
+//! These macros manage the common features of the endpoints.
+//! @{
+
+//! Generic macro for USBB registers that can be arrayed
+//! @{
+#define USBB_ARRAY(reg,index) ((&(UOTGHS->reg))[(index)])
+//! @}
+
+//! @name USBB Device endpoint configguration
+//! @{
+ //! enables the selected endpoint
+#define udd_enable_endpoint(ep) (Set_bits(UOTGHS->UOTGHS_DEVEPT, UOTGHS_DEVEPT_EPEN0 << (ep)))
+ //! disables the selected endpoint
+#define udd_disable_endpoint(ep) (Clr_bits(UOTGHS->UOTGHS_DEVEPT, UOTGHS_DEVEPT_EPEN0 << (ep)))
+ //! tests if the selected endpoint is enabled
+#define Is_udd_endpoint_enabled(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPT, UOTGHS_DEVEPT_EPEN0 << (ep)))
+ //! resets the selected endpoint
+#define udd_reset_endpoint(ep) (Set_bits(UOTGHS->UOTGHS_DEVEPT, UOTGHS_DEVEPT_EPRST0 << (ep)),\
+ Clr_bits(UOTGHS->UOTGHS_DEVEPT, UOTGHS_DEVEPT_EPRST0 << (ep)))
+ //! tests if the selected endpoint is being reset
+#define Is_udd_resetting_endpoint(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPT, UOTGHS_DEVEPT_EPRST0 << (ep)))
+
+ //! configures the selected endpoint type
+#define udd_configure_endpoint_type(ep, type) (Wr_bitfield(USBB_ARRAY(UOTGHS_DEVEPTCFG[0],ep), UOTGHS_DEVEPTCFG_EPTYPE_Msk, type))
+ //! gets the configured selected endpoint type
+#define udd_get_endpoint_type(ep) (Rd_bitfield(USBB_ARRAY(UOTGHS_DEVEPTCFG[0],ep), UOTGHS_DEVEPTCFG_EPTYPE_Msk))
+ //! enables the bank autoswitch for the selected endpoint
+#define udd_enable_endpoint_bank_autoswitch(ep) (Set_bits(USBB_ARRAY(UOTGHS_DEVEPTCFG[0],ep), UOTGHS_DEVEPTCFG_AUTOSW))
+ //! disables the bank autoswitch for the selected endpoint
+#define udd_disable_endpoint_bank_autoswitch(ep) (Clr_bits(USBB_ARRAY(UOTGHS_DEVEPTCFG[0],ep), UOTGHS_DEVEPTCFG_AUTOSW))
+#define Is_udd_endpoint_bank_autoswitch_enabled(ep) (Tst_bits(USBB_ARRAY(UOTGHS_DEVEPTCFG[0],ep), UOTGHS_DEVEPTCFG_AUTOSW))
+ //! configures the selected endpoint direction
+#define udd_configure_endpoint_direction(ep, dir) (Wr_bitfield(USBB_ARRAY(UOTGHS_DEVEPTCFG[0],ep), UOTGHS_DEVEPTCFG_EPDIR, dir))
+ //! gets the configured selected endpoint direction
+#define udd_get_endpoint_direction(ep) (Rd_bitfield(USBB_ARRAY(UOTGHS_DEVEPTCFG[0],ep), UOTGHS_DEVEPTCFG_EPDIR))
+#define Is_udd_endpoint_in(ep) (Tst_bits(USBB_ARRAY(UOTGHS_DEVEPTCFG[0],ep), UOTGHS_DEVEPTCFG_EPDIR))
+ //! Bounds given integer size to allowed range and rounds it up to the nearest
+ //! available greater size, then applies register format of USBB controller
+ //! for endpoint size bit-field.
+#define udd_format_endpoint_size(size) (32 - clz(((U32)min(max(size, 8), 1024) << 1) - 1) - 1 - 3)
+ //! configures the selected endpoint size
+#define udd_configure_endpoint_size(ep, size) (Wr_bitfield(USBB_ARRAY(UOTGHS_DEVEPTCFG[0],ep), UOTGHS_DEVEPTCFG_EPSIZE_Msk, udd_format_endpoint_size(size)))
+ //! gets the configured selected endpoint size
+#define udd_get_endpoint_size(ep) (8 << Rd_bitfield(USBB_ARRAY(UOTGHS_DEVEPTCFG[0],ep), UOTGHS_DEVEPTCFG_EPSIZE_Msk))
+ //! configures the selected endpoint number of banks
+#define udd_configure_endpoint_bank(ep, bank) (Wr_bitfield(USBB_ARRAY(UOTGHS_DEVEPTCFG[0],ep), UOTGHS_DEVEPTCFG_EPBK_Msk, bank))
+ //! gets the configured selected endpoint number of banks
+#define udd_get_endpoint_bank(ep) (Rd_bitfield(USBB_ARRAY(UOTGHS_DEVEPTCFG[0],ep), UOTGHS_DEVEPTCFG_EPBK_Msk)+1)
+ //! allocates the configuration selected endpoint in DPRAM memory
+#define udd_allocate_memory(ep) (Set_bits(USBB_ARRAY(UOTGHS_DEVEPTCFG[0],ep), UOTGHS_DEVEPTCFG_ALLOC))
+ //! un-allocates the configuration selected endpoint in DPRAM memory
+#define udd_unallocate_memory(ep) (Clr_bits(USBB_ARRAY(UOTGHS_DEVEPTCFG[0],ep), UOTGHS_DEVEPTCFG_ALLOC))
+#define Is_udd_memory_allocated(ep) (Tst_bits(USBB_ARRAY(UOTGHS_DEVEPTCFG[0],ep), UOTGHS_DEVEPTCFG_ALLOC))
+
+ //! configures selected endpoint in one step
+#define udd_configure_endpoint(ep, type, dir, size, bank) \
+(\
+ Wr_bits(USBB_ARRAY(UOTGHS_DEVEPTCFG[0],ep), UOTGHS_DEVEPTCFG_EPTYPE_Msk |\
+ UOTGHS_DEVEPTCFG_EPDIR |\
+ UOTGHS_DEVEPTCFG_EPSIZE_Msk |\
+ UOTGHS_DEVEPTCFG_EPBK_Msk , \
+ (((U32)(type) << UOTGHS_DEVEPTCFG_EPTYPE_Pos) & UOTGHS_DEVEPTCFG_EPTYPE_Msk) |\
+ (((U32)(dir ) << UOTGHS_DEVEPTCFG_EPDIR_Pos ) & UOTGHS_DEVEPTCFG_EPDIR) |\
+ ( (U32)udd_format_endpoint_size(size) << UOTGHS_DEVEPTCFG_EPSIZE_Pos) |\
+ (((U32)(bank) << UOTGHS_DEVEPTCFG_EPBK_Pos) & UOTGHS_DEVEPTCFG_EPBK_Msk))\
+)
+#define UOTGHS_DEVEPTCFG_EPDIR_Pos 8
+ //! tests if current endpoint is configured
+#define Is_udd_endpoint_configured(ep) (Tst_bits(USBB_ARRAY(UOTGHS_DEVEPTISR[0],ep), UOTGHS_DEVEPTISR_CFGOK))
+ //! returns the control direction
+#define udd_control_direction() (Rd_bitfield(USBB_ARRAY(UOTGHS_DEVEPTISR[0], EP_CONTROL), UOTGHS_DEVEPTISR_CTRLDIR))
+
+ //! resets the data toggle sequence
+#define udd_reset_data_toggle(ep) (USBB_ARRAY(UOTGHS_DEVEPTIER[0],ep) = UOTGHS_DEVEPTIER_RSTDTS)
+ //! tests if the data toggle sequence is being reset
+#define Is_udd_data_toggle_reset(ep) (Tst_bits(USBB_ARRAY(UOTGHS_DEVEPTIMR[0],ep), UOTGHS_DEVEPTIMR_RSTDT))
+ //! returns data toggle
+#define udd_data_toggle(ep) (Rd_bitfield(USBB_ARRAY(UOTGHS_DEVEPTISR[0],ep), UOTGHS_DEVEPTISR_DTSEQ_Msk))
+//! @}
+
+
+//! @name USBB Device control endpoint
+//! These macros contorl the endpoints.
+//! @{
+
+//! @name USBB Device control endpoint interrupts
+//! These macros control the endpoints interrupts.
+//! @{
+ //! enables the selected endpoint interrupt
+#define udd_enable_endpoint_interrupt(ep) (UOTGHS->UOTGHS_DEVIER = UOTGHS_DEVIER_PEP_0 << (ep))
+ //! disables the selected endpoint interrupt
+#define udd_disable_endpoint_interrupt(ep) (UOTGHS->UOTGHS_DEVIDR = UOTGHS_DEVIDR_PEP_0 << (ep))
+ //! tests if the selected endpoint interrupt is enabled
+#define Is_udd_endpoint_interrupt_enabled(ep) (Tst_bits(UOTGHS->UOTGHS_DEVIMR, UOTGHS_DEVIMR_PEP_0 << (ep)))
+ //! tests if an interrupt is triggered by the selected endpoint
+#define Is_udd_endpoint_interrupt(ep) (Tst_bits(UOTGHS->UOTGHS_DEVISR, UOTGHS_DEVISR_PEP_0 << (ep)))
+ //! returns the lowest endpoint number generating an endpoint interrupt or MAX_PEP_NB if none
+#define udd_get_interrupt_endpoint_number() (ctz(((UOTGHS->UOTGHS_DEVISR >> UOTGHS_DEVISR_PEP_Pos) &\
+ (UOTGHS->UOTGHS_DEVIMR >> UOTGHS_DEVIMR_PEP_Pos)) |\
+ (1 << MAX_PEP_NB)))
+#define UOTGHS_DEVISR_PEP_Pos 12
+#define UOTGHS_DEVIMR_PEP_Pos 12
+//! @}
+
+//! @name USBB Device control endpoint errors
+//! These macros control the endpoint errors.
+//! @{
+ //! enables the STALL handshake
+#define udd_enable_stall_handshake(ep) (USBB_ARRAY(UOTGHS_DEVEPTIER[0],ep) = UOTGHS_DEVEPTIER_STALLRQS)
+ //! disables the STALL handshake
+#define udd_disable_stall_handshake(ep) (USBB_ARRAY(UOTGHS_DEVEPTIDR[0],ep) = UOTGHS_DEVEPTIDR_STALLRQC)
+ //! tests if STALL handshake request is running
+#define Is_udd_endpoint_stall_requested(ep) (Tst_bits(USBB_ARRAY(UOTGHS_DEVEPTIMR[0],ep), UOTGHS_DEVEPTIMR_STALLRQ))
+ //! tests if STALL sent
+#define Is_udd_stall(ep) (Tst_bits(USBB_ARRAY(UOTGHS_DEVEPTISR[0],ep), UOTGHS_DEVEPTISR_STALLEDI))
+ //! acks STALL sent
+#define udd_ack_stall(ep) (USBB_ARRAY(UOTGHS_DEVEPTICR[0],ep) = UOTGHS_DEVEPTICR_STALLEDIC)
+ //! raises STALL sent
+#define udd_raise_stall(ep) (USBB_ARRAY(UOTGHS_DEVEPTIFR[0],ep) = UOTGHS_DEVEPTIFR_STALLEDIS)
+ //! enables STALL sent interrupt
+#define udd_enable_stall_interrupt(ep) (USBB_ARRAY(UOTGHS_DEVEPTIER[0],ep) = UOTGHS_DEVEPTIER_STALLEDES)
+ //! disables STALL sent interrupt
+#define udd_disable_stall_interrupt(ep) (USBB_ARRAY(UOTGHS_DEVEPTIDR[0],ep) = UOTGHS_DEVEPTIDR_STALLEDEC)
+ //! tests if STALL sent interrupt is enabled
+#define Is_udd_stall_interrupt_enabled(ep) (Tst_bits(USBB_ARRAY(UOTGHS_DEVEPTIMR[0],ep), UOTGHS_DEVEPTIMR_STALLEDE))
+
+ //! tests if NAK OUT received
+#define Is_udd_nak_out(ep) (Tst_bits(USBB_ARRAY(UOTGHS_DEVEPTISR[0],ep), UOTGHS_DEVEPTISR_NAKOUTI))
+ //! acks NAK OUT received
+#define udd_ack_nak_out(ep) (USBB_ARRAY(UOTGHS_DEVEPTICR[0],ep) = UOTGHS_DEVEPTICR_NAKOUTIC)
+ //! raises NAK OUT received
+#define udd_raise_nak_out(ep) (USBB_ARRAY(UOTGHS_DEVEPTIFR[0],ep) = UOTGHS_DEVEPTIFR_NAKOUTIS)
+ //! enables NAK OUT interrupt
+#define udd_enable_nak_out_interrupt(ep) (USBB_ARRAY(UOTGHS_DEVEPTIER[0],ep) = UOTGHS_DEVEPTIER_NAKOUTES)
+ //! disables NAK OUT interrupt
+#define udd_disable_nak_out_interrupt(ep) (USBB_ARRAY(UOTGHS_DEVEPTIDR[0],ep) = UOTGHS_DEVEPTIDR_NAKOUTEC)
+ //! tests if NAK OUT interrupt is enabled
+#define Is_udd_nak_out_interrupt_enabled(ep) (Tst_bits(USBB_ARRAY(UOTGHS_DEVEPTIMR[0],ep), UOTGHS_DEVEPTIMR_NAKOUTE))
+
+ //! tests if NAK IN received
+#define Is_udd_nak_in(ep) (Tst_bits(USBB_ARRAY(UOTGHS_DEVEPTISR[0],ep), UOTGHS_DEVEPTISR_NAKINI))
+ //! acks NAK IN received
+#define udd_ack_nak_in(ep) (USBB_ARRAY(UOTGHS_DEVEPTICR[0],ep) = UOTGHS_DEVEPTICR_NAKINIC)
+ //! raises NAK IN received
+#define udd_raise_nak_in(ep) (USBB_ARRAY(UOTGHS_DEVEPTIFR[0],ep) = UOTGHS_DEVEPTIFR_NAKINIS)
+ //! enables NAK IN interrupt
+#define udd_enable_nak_in_interrupt(ep) (USBB_ARRAY(UOTGHS_DEVEPTIER[0],ep) = UOTGHS_DEVEPTIER_NAKINES)
+ //! disables NAK IN interrupt
+#define udd_disable_nak_in_interrupt(ep) (USBB_ARRAY(UOTGHS_DEVEPTIDR[0],ep) = UOTGHS_DEVEPTIDR_NAKINEC)
+ //! tests if NAK IN interrupt is enabled
+#define Is_udd_nak_in_interrupt_enabled(ep) (Tst_bits(USBB_ARRAY(UOTGHS_DEVEPTIMR[0],ep), UOTGHS_DEVEPTIMR_NAKINE))
+
+ //! acks endpoint isochronous overflow interrupt
+#define udd_ack_overflow_interrupt(ep) (USBB_ARRAY(UOTGHS_DEVEPTICR[0],ep) = UOTGHS_DEVEPTICR_OVERFIC)
+ //! raises endpoint isochronous overflow interrupt
+#define udd_raise_overflow_interrupt(ep) (USBB_ARRAY(UOTGHS_DEVEPTIFR[0],ep) = UOTGHS_DEVEPTIFR_OVERFIS)
+ //! tests if an overflow occurs
+#define Is_udd_overflow(ep) (Tst_bits(USBB_ARRAY(UOTGHS_DEVEPTISR[0],ep), UOTGHS_DEVEPTISR_OVERFI))
+ //! enables overflow interrupt
+#define udd_enable_overflow_interrupt(ep) (USBB_ARRAY(UOTGHS_DEVEPTIER[0],ep) = UOTGHS_DEVEPTIER_OVERFES)
+ //! disables overflow interrupt
+#define udd_disable_overflow_interrupt(ep) (USBB_ARRAY(UOTGHS_DEVEPTIDR[0],ep) = UOTGHS_DEVEPTIDR_OVERFEC)
+ //! tests if overflow interrupt is enabled
+#define Is_udd_overflow_interrupt_enabled(ep) (Tst_bits(USBB_ARRAY(UOTGHS_DEVEPTIMR[0],ep), UOTGHS_DEVEPTIMR_OVERFE))
+
+ //! acks endpoint isochronous underflow interrupt
+#define udd_ack_underflow_interrupt(ep) (USBB_ARRAY(UOTGHS_DEVEPTICR[0],ep) = UOTGHS_DEVEPTICR_UNDERFIC)
+ //! raises endpoint isochronous underflow interrupt
+#define udd_raise_underflow_interrupt(ep) (USBB_ARRAY(UOTGHS_DEVEPTIFR[0],ep) = UOTGHS_DEVEPTIFR_UNDERFIS)
+ //! tests if an underflow occurs
+#define Is_udd_underflow(ep) (Tst_bits(USBB_ARRAY(UOTGHS_DEVEPTISR[0],ep), UOTGHS_DEVEPTISR_UNDERFI))
+ //! enables underflow interrupt
+#define udd_enable_underflow_interrupt(ep) (USBB_ARRAY(UOTGHS_DEVEPTIER[0],ep) = UOTGHS_DEVEPTIER_UNDERFES)
+ //! disables underflow interrupt
+#define udd_disable_underflow_interrupt(ep) (USBB_ARRAY(UOTGHS_DEVEPTIDR[0],ep) = UOTGHS_DEVEPTIDR_UNDERFEC)
+ //! tests if underflow interrupt is enabled
+#define Is_udd_underflow_interrupt_enabled(ep) (Tst_bits(USBB_ARRAY(UOTGHS_DEVEPTIMR[0],ep), UOTGHS_DEVEPTIMR_UNDERFE))
+
+ //! tests if CRC ERROR ISO OUT detected
+#define Is_udd_crc_error(ep) (Tst_bits(USBB_ARRAY(UOTGHS_DEVEPTISR[0],ep), UOTGHS_DEVEPTISR_CRCERRI))
+ //! acks CRC ERROR ISO OUT detected
+#define udd_ack_crc_error(ep) (USBB_ARRAY(UOTGHS_DEVEPTICR[0],ep) = UOTGHS_DEVEPTICR_CRCERRIC)
+ //! raises CRC ERROR ISO OUT detected
+#define udd_raise_crc_error(ep) (USBB_ARRAY(UOTGHS_DEVEPTIFR[0],ep) = UOTGHS_DEVEPTIFR_CRCERRIS)
+ //! enables CRC ERROR ISO OUT detected interrupt
+#define udd_enable_crc_error_interrupt(ep) (USBB_ARRAY(UOTGHS_DEVEPTIER[0],ep) = UOTGHS_DEVEPTIER_CRCERRES)
+ //! disables CRC ERROR ISO OUT detected interrupt
+#define udd_disable_crc_error_interrupt(ep) (USBB_ARRAY(UOTGHS_DEVEPTIDR[0],ep) = UOTGHS_DEVEPTIDR_CRCERREC)
+ //! tests if CRC ERROR ISO OUT detected interrupt is enabled
+#define Is_udd_crc_error_interrupt_enabled(ep) (Tst_bits(USBB_ARRAY(UOTGHS_DEVEPTIMR[0],ep), UOTGHS_DEVEPTIMR_CRCERRE))
+//! @}
+
+//! @name USBB Device control endpoint errors
+//! These macros control the endpoint errors.
+//! @{
+
+ //! tests if endpoint read allowed
+#define Is_udd_read_enabled(ep) (Tst_bits(USBB_ARRAY(UOTGHS_DEVEPTISR[0],ep), UOTGHS_DEVEPTISR_RWALL))
+ //! tests if endpoint write allowed
+#define Is_udd_write_enabled(ep) (Tst_bits(USBB_ARRAY(UOTGHS_DEVEPTISR[0],ep), UOTGHS_DEVEPTISR_RWALL))
+
+ //! returns the byte count
+#define udd_byte_count(ep) (Rd_bitfield(USBB_ARRAY(UOTGHS_DEVEPTISR[0],ep), UOTGHS_DEVEPTISR_BYCT_Msk))
+ //! clears FIFOCON bit
+#define udd_ack_fifocon(ep) (USBB_ARRAY(UOTGHS_DEVEPTIDR[0],ep) = UOTGHS_DEVEPTIDR_FIFOCONC)
+ //! tests if FIFOCON bit set
+#define Is_udd_fifocon(ep) (Tst_bits(USBB_ARRAY(UOTGHS_DEVEPTIMR[0],ep), UOTGHS_DEVEPTIMR_FIFOCON))
+
+ //! returns the number of busy banks
+#define udd_nb_busy_bank(ep) (Rd_bitfield(USBB_ARRAY(UOTGHS_DEVEPTISR[0],ep), UOTGHS_DEVEPTISR_NBUSYBK_Msk))
+ //! returns the number of the current bank
+#define udd_current_bank(ep) (Rd_bitfield(USBB_ARRAY(UOTGHS_DEVEPTISR[0],ep), UOTGHS_DEVEPTISR_CURRBK_Msk))
+ //! kills last bank
+#define udd_kill_last_in_bank(ep) (USBB_ARRAY(UOTGHS_DEVEPTIER[0],ep) = UOTGHS_DEVEPTIER_KILLBKS)
+ //! tests if last bank killed
+#define Is_udd_last_in_bank_killed(ep) (Tst_bits(USBB_ARRAY(UOTGHS_DEVEPTIMR[0],ep), UOTGHS_DEVEPTIMR_KILLBK))
+ //! forces all banks full (OUT) or free (IN) interrupt
+#define udd_force_bank_interrupt(ep) (USBB_ARRAY(UOTGHS_DEVEPTIFR[0],ep) = UOTGHS_DEVEPTIFR_NBUSYBKS)
+ //! unforces all banks full (OUT) or free (IN) interrupt
+#define udd_unforce_bank_interrupt(ep) (USBB_ARRAY(UOTGHS_DEVEPTIFR[0],ep) = UOTGHS_DEVEPTIFR_NBUSYBKS)
+ //! enables all banks full (OUT) or free (IN) interrupt
+#define udd_enable_bank_interrupt(ep) (USBB_ARRAY(UOTGHS_DEVEPTIER[0],ep) = UOTGHS_DEVEPTIER_NBUSYBKES)
+ //! disables all banks full (OUT) or free (IN) interrupt
+#define udd_disable_bank_interrupt(ep) (USBB_ARRAY(UOTGHS_DEVEPTIDR[0],ep) = UOTGHS_DEVEPTIDR_NBUSYBKEC)
+ //! tests if all banks full (OUT) or free (IN) interrupt enabled
+#define Is_udd_bank_interrupt_enabled(ep) (Tst_bits(USBB_ARRAY(UOTGHS_DEVEPTIMR[0],ep), UOTGHS_DEVEPTIMR_NBUSYBKE))
+
+ //! tests if SHORT PACKET received
+#define Is_udd_short_packet(ep) (Tst_bits(USBB_ARRAY(UOTGHS_DEVEPTISR[0],ep), UOTGHS_DEVEPTISR_SHORTPACKET))
+ //! acks SHORT PACKET received
+#define udd_ack_short_packet(ep) (USBB_ARRAY(UOTGHS_DEVEPTICR[0],ep) = UOTGHS_DEVEPTICR_SHORTPACKETC)
+ //! raises SHORT PACKET received
+#define udd_raise_short_packet(ep) (USBB_ARRAY(UOTGHS_DEVEPTIFR[0],ep) = UOTGHS_DEVEPTIFR_SHORTPACKETS)
+ //! enables SHORT PACKET received interrupt
+#define udd_enable_short_packet_interrupt(ep) (USBB_ARRAY(UOTGHS_DEVEPTIER[0],ep) = UOTGHS_DEVEPTIER_SHORTPACKETES)
+ //! disables SHORT PACKET received interrupt
+#define udd_disable_short_packet_interrupt(ep) (USBB_ARRAY(UOTGHS_DEVEPTIDR[0],ep) = UOTGHS_DEVEPTIDR_SHORTPACKETEC)
+ //! tests if SHORT PACKET received interrupt is enabled
+#define Is_udd_short_packet_interrupt_enabled(ep) (Tst_bits(USBB_ARRAY(UOTGHS_DEVEPTIMR[0],ep), UOTGHS_DEVEPTIMR_SHORTPACKETE))
+
+ //! Get 64-, 32-, 16- or 8-bit access to FIFO data register of selected endpoint.
+ //! @param ep Endpoint of which to access FIFO data register
+ //! @param scale Data scale in bits: 64, 32, 16 or 8
+ //! @return Volatile 64-, 32-, 16- or 8-bit data pointer to FIFO data register
+ //! @warning It is up to the user of this macro to make sure that all accesses
+ //! are aligned with their natural boundaries except 64-bit accesses which
+ //! require only 32-bit alignment.
+ //! @warning It is up to the user of this macro to make sure that used HSB
+ //! addresses are identical to the DPRAM internal pointer modulo 32 bits.
+#define udd_get_endpoint_fifo_access(ep, scale) \
+ (((volatile TPASTE2(U, scale) (*)[0x8000 / ((scale) / 8)])UOTGHS_RAM_ADDR)[(ep)])
+
+//! @name USBB endpoint DMA drivers
+//! These macros manage the common features of the endpoint DMA channels.
+//! @{
+ //! enables the disabling of HDMA requests by endpoint interrupts
+#define udd_enable_endpoint_int_dis_hdma_req(ep) (USBB_ARRAY(UOTGHS_DEVEPTIER[0](ep) = UOTGHS_DEVEPTIER_EPDISHDMAS)
+ //! disables the disabling of HDMA requests by endpoint interrupts
+#define udd_disable_endpoint_int_dis_hdma_req(ep) (USBB_ARRAY(UOTGHS_DEVEPTIDR[0](ep) = UOTGHS_DEVEPTIDR_EPDISHDMAC)
+ //! tests if the disabling of HDMA requests by endpoint interrupts is enabled
+#define Is_udd_endpoint_int_dis_hdma_req_enabled(ep) (Tst_bits(USBB_ARRAY(UOTGHS_DEVEPTIMR[0](ep), UOTGHS_DEVEPTIMR_EPDISHDMA))
+
+ //! raises the selected endpoint DMA channel interrupt
+#define udd_raise_endpoint_dma_interrupt(ep) (UOTGHS->UOTGHS_DEVIFR = UOTGHS_DEVIFR_DMA_1 << ((ep) - 1))
+ //! tests if an interrupt is triggered by the selected endpoint DMA channel
+#define Is_udd_endpoint_dma_interrupt(ep) (Tst_bits(UOTGHS->UOTGHS_DEVISR, UOTGHS_DEVISR_DMA_1 << ((ep) - 1)))
+ //! enables the selected endpoint DMA channel interrupt
+#define udd_enable_endpoint_dma_interrupt(ep) (UOTGHS->UOTGHS_DEVIER = UOTGHS_DEVIER_DMA_1 << ((ep) - 1))
+ //! disables the selected endpoint DMA channel interrupt
+#define udd_disable_endpoint_dma_interrupt(ep) (UOTGHS->UOTGHS_DEVIDR = UOTGHS_DEVIDR_DMA_1 << ((ep) - 1))
+ //! tests if the selected endpoint DMA channel interrupt is enabled
+#define Is_udd_endpoint_dma_interrupt_enabled(ep) (Tst_bits(UOTGHS->UOTGHS_DEVIMR, UOTGHS_DEVIMR_DMA_1 << ((ep) - 1)))
+
+ //! Access points to the USBB device DMA memory map with arrayed registers
+ //! @{
+ //! Structure for DMA registers
+typedef struct {
+ union {
+ unsigned long nextdesc;
+ //usbb_uddma1_nextdesc_t NEXTDESC;
+ };
+ unsigned long addr;
+ union {
+ unsigned long control;
+ //usbb_uddma1_control_t CONTROL;
+ };
+ union {
+ unsigned long status;
+ //usbb_uddma1_status_t STATUS;
+ };
+} avr32_usbb_uxdmax_t, usbb_uxdmax_t;
+ //! Structure for DMA registers
+#define USBB_UDDMA_ARRAY(ep) (((volatile usbb_uxdmax_t *)UOTGHS->UOTGHS_DEVDMA)[(ep) - 1])
+
+ //! Set control desc to selected endpoint DMA channel
+#define udd_endpoint_dma_set_control(ep,desc) (USBB_UDDMA_ARRAY(ep).control=desc)
+ //! Get control desc to selected endpoint DMA channel
+#define udd_endpoint_dma_get_control(ep) (USBB_UDDMA_ARRAY(ep).control)
+ //! Set RAM address to selected endpoint DMA channel
+#define udd_endpoint_dma_set_addr(ep,add) (USBB_UDDMA_ARRAY(ep).addr=add)
+ //! Get status to selected endpoint DMA channel
+#define udd_endpoint_dma_get_status(ep) (USBB_UDDMA_ARRAY(ep).status)
+ //! @}
+//! @}
+
+//! @}
+
+//! @name USBB Device control endpoint errors
+//! These macros control the endpoint errors.
+//! @{
+
+ //! tests if SETUP received
+#define Is_udd_setup_received(ep) (Tst_bits(USBB_ARRAY(UOTGHS_DEVEPTISR[0],ep), UOTGHS_DEVEPTISR_RXSTPI))
+ //! acks SETUP received
+#define udd_ack_setup_received(ep) (USBB_ARRAY(UOTGHS_DEVEPTICR[0],ep) = UOTGHS_DEVEPTICR_RXSTPIC)
+ //! raises SETUP received
+#define udd_raise_setup_received(ep) (USBB_ARRAY(UOTGHS_DEVEPTIFR[0],ep) = UOTGHS_DEVEPTIFR_RXSTPIS)
+ //! enables SETUP received interrupt
+#define udd_enable_setup_received_interrupt(ep) (USBB_ARRAY(UOTGHS_DEVEPTIER[0],ep) = UOTGHS_DEVEPTIER_RXSTPES)
+ //! disables SETUP received interrupt
+#define udd_disable_setup_received_interrupt() (USBB_ARRAY(UOTGHS_DEVEPTIDR[0],EP_CONTROL) = UOTGHS_DEVEPTIDR_RXSTPEC)
+ //! tests if SETUP received interrupt is enabled
+#define Is_udd_setup_received_interrupt_enabled(ep) (Tst_bits(USBB_ARRAY(UOTGHS_DEVEPTIMR[0],ep), UOTGHS_DEVEPTIMR_RXSTPE))
+
+ //! tests if OUT received
+#define Is_udd_out_received(ep) (Tst_bits(USBB_ARRAY(UOTGHS_DEVEPTISR[0],ep), UOTGHS_DEVEPTISR_RXOUTI))
+ //! acks OUT received
+#define udd_ack_out_received(ep) (USBB_ARRAY(UOTGHS_DEVEPTICR[0],ep) = UOTGHS_DEVEPTICR_RXOUTIC)
+ //! raises OUT received
+#define udd_raise_out_received(ep) (USBB_ARRAY(UOTGHS_DEVEPTIFR[0],ep) = UOTGHS_DEVEPTIFR_RXOUTIS)
+ //! enables OUT received interrupt
+#define udd_enable_out_received_interrupt(ep) (USBB_ARRAY(UOTGHS_DEVEPTIER[0],ep) = UOTGHS_DEVEPTIER_RXOUTES)
+ //! disables OUT received interrupt
+#define udd_disable_out_received_interrupt(ep) (USBB_ARRAY(UOTGHS_DEVEPTIDR[0],ep) = UOTGHS_DEVEPTIDR_RXOUTEC)
+ //! tests if OUT received interrupt is enabled
+#define Is_udd_out_received_interrupt_enabled(ep) (Tst_bits(USBB_ARRAY(UOTGHS_DEVEPTIMR[0],ep), UOTGHS_DEVEPTIMR_RXOUTE))
+
+ //! tests if IN sending
+#define Is_udd_in_send(ep) (Tst_bits(USBB_ARRAY(UOTGHS_DEVEPTISR[0],ep), UOTGHS_DEVEPTISR_TXINI))
+ //! acks IN sending
+#define udd_ack_in_send(ep) (USBB_ARRAY(UOTGHS_DEVEPTICR[0],ep) = UOTGHS_DEVEPTICR_TXINIC)
+ //! raises IN sending
+#define udd_raise_in_send(ep) (USBB_ARRAY(UOTGHS_DEVEPTIFR[0],ep) = UOTGHS_DEVEPTIFR_TXINIS)
+ //! enables IN sending interrupt
+#define udd_enable_in_send_interrupt(ep) (USBB_ARRAY(UOTGHS_DEVEPTIER[0],ep) = UOTGHS_DEVEPTIER_TXINES)
+ //! disables IN sending interrupt
+#define udd_disable_in_send_interrupt(ep) (USBB_ARRAY(UOTGHS_DEVEPTIDR[0],ep) = UOTGHS_DEVEPTIDR_TXINEC)
+ //! tests if IN sending interrupt is enabled
+#define Is_udd_in_send_interrupt_enabled(ep) (Tst_bits(USBB_ARRAY(UOTGHS_DEVEPTIMR[0],ep), UOTGHS_DEVEPTIMR_TXINE))
+//! @}
+
+//! @}
+
+#endif // _USBB_DEVICE_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/drivers/usbb/usbb_otg.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/drivers/usbb/usbb_otg.c
new file mode 100644
index 0000000..340c9b3
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/drivers/usbb/usbb_otg.c
@@ -0,0 +1,99 @@
+/**
+ * \file
+ *
+ * \brief USB Otg drivers
+ * Compliance with common driver OTG
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "conf_usb.h"
+#include "sysclk.h"
+#include "udd.h"
+#include "usbb_otg.h"
+#include <string.h>
+
+#ifndef UDD_USB_INT_LEVEL
+# define UDD_USB_INT_LEVEL 0 // By default USB interrupt have low priority
+#endif
+
+#ifdef OTG
+
+/**
+ * \ingroup usb_group
+ * \defgroup otg_group USB OTG Driver (OTG)
+ * @{
+ */
+
+//! Check that multiplexed pin used for USB_ID is defined
+#ifndef OTG_ID
+#error YOU MUST define in your board header file the multiplexed pin used for OTG_ID as AVR32_USBB_USB_ID_x_x
+#endif
+
+/**
+ * \internal
+ * \brief The USBB ISR is managed by OTG layer which call the USB mode actived (device/host).
+ */
+ISR(otg_interrupt, AVR32_USBB_IRQ_GROUP, UDD_USB_INT_LEVEL)
+{
+ if (Is_otg_id_transition() && Is_otg_id_interrupt_enabled()) {
+ // UID pin change
+ otg_ack_id_transition();
+ USB_UID_EVENT(Is_otg_id_device());
+ return;
+ }
+ // Call sub interrrupt routine correesponding at current mode
+ if (Is_otg_id_device())
+ udd_interrupt();
+ else
+ uhd_interrupt();
+
+ otg_data_memory_barrier();
+}
+
+//@}
+
+void otg_enable(void)
+{
+ // Link the USBB interrupt on otg_interrupt()
+ irq_register_handler(otg_interrupt, AVR32_USBB_IRQ, UDD_USB_INT_LEVEL);
+ // Enable UID control
+ otg_input_id_pin();
+ otg_enable_id_pin();
+ otg_raise_id_transition(); // Check no ID transition has been missed during initialization
+ otg_enable_id_interrupt();
+}
+
+#endif // define OTG
+
+//@}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/drivers/usbb/usbb_otg.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/drivers/usbb/usbb_otg.h
new file mode 100644
index 0000000..67d1001
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/drivers/usbb/usbb_otg.h
@@ -0,0 +1,245 @@
+/**
+ * \file
+ *
+ * \brief USBB OTG Driver header file.
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _USBB_OTG_H_
+#define _USBB_OTG_H_
+
+#include "compiler.h"
+//#include "preprocessor.h"
+
+//! \ingroup usb_group
+//! \defgroup otg_group USB OTG Driver (OTG)
+//! USBB low-level driver for OTG features
+//!
+//! @warning Bit-masks are used instead of bit-fields because PB registers
+//! require 32-bit write accesses while AVR32-GCC 4.0.2 builds 8-bit
+//! accesses even when volatile unsigned int bit-fields are specified.
+//! @{
+
+//! @name USBB IP properties
+//! These macros give access to IP properties
+//! @{
+ //! Get IP name part 1 or 2
+#define otg_get_ip_name() (((uint64_t)AVR32_USBB.uname2<<32)|(uint64_t)AVR32_USBB.uname1)
+ //! Instruction to access at a peripheral register after interrupt clear, see AVR32002 - AVR32UC Technical reference $6.6 Memory barriers
+#define otg_data_memory_barrier()
+ //! Get IP version
+#define otg_get_ip_version() (Rd_bitfield(AVR32_USBB.uvers, AVR32_USBB_UVERS_VERSION_NUM_MASK))
+ //! Get number of metal fixes
+#define otg_get_metal_fix_nbr() (Rd_bitfield(AVR32_USBB.uvers, AVR32_USBB_UVERS_METAL_FIX_NUM_MASK))
+ //! Get number of hardware-implemented DMA channels
+#define otg_get_dma_channel_nbr() (Rd_bitfield(AVR32_USBB.ufeatures, AVR32_USBB_UFEATURES_DMA_CHANNEL_NBR_MASK))
+ //! Get DMA buffer size
+#define otg_get_dma_buffer_size() (Rd_bitfield(AVR32_USBB.ufeatures, AVR32_USBB_UFEATURES_DMA_BUFFER_SIZE_MASK))
+ //! Get DMA FIFO depth in words
+#define otg_get_dma_fifo_word_depth() (((Rd_bitfield(AVR32_USBB.ufeatures, AVR32_USBB_UFEATURES_DMA_FIFO_WORD_DEPTH_MASK) - 1) & ((1 << AVR32_USBB_UFEATURES_DMA_FIFO_WORD_DEPTH_SIZE) - 1)) + 1)
+ //! Get DPRAM size (FIFO maximal size) in bytes
+#define otg_get_dpram_size() (128 << Rd_bitfield(AVR32_USBB.ufeatures, AVR32_USBB_UFEATURES_FIFO_MAX_SIZE_MASK))
+ //! Test if DPRAM is natively byte write capable
+#define Is_otg_dpram_byte_write_capable() (Tst_bits(AVR32_USBB.ufeatures, AVR32_USBB_UFEATURES_BYTE_WRITE_DPRAM_MASK))
+ //! Get size of USBB PB address space
+#define otg_get_ip_paddress_size() (AVR32_USBB.uaddrsize)
+//! @}
+
+//! @name USBB OTG ID pin management
+//! These macros manage the ID pin use or not to switch between Host or Device mode
+//! @{
+ //! Pin and function for USB_ID according to configuration from OTG_ID
+//#define OTG_ID_PIN ATPASTE2(OTG_ID, _PIN)
+//#define OTG_ID_FUNCTION ATPASTE2(OTG_ID, _FUNCTION)
+
+ //! Input OTG_ID from its pin
+#if 0
+#define otg_input_id_pin() \
+{\
+ (Tst_bits(OTG_ID_FUNCTION, 0x01)) ?\
+ (AVR32_GPIO.port[OTG_ID_PIN >> 5].pmr0s = 1 << (OTG_ID_PIN & 0x1F)) :\
+ (AVR32_GPIO.port[OTG_ID_PIN >> 5].pmr0c = 1 << (OTG_ID_PIN & 0x1F)); \
+ (Tst_bits(OTG_ID_FUNCTION, 0x02)) ?\
+ (AVR32_GPIO.port[OTG_ID_PIN >> 5].pmr1s = 1 << (OTG_ID_PIN & 0x1F)) :\
+ (AVR32_GPIO.port[OTG_ID_PIN >> 5].pmr1c = 1 << (OTG_ID_PIN & 0x1F)); \
+ AVR32_GPIO.port[OTG_ID_PIN >> 5].gperc = 1 << (OTG_ID_PIN & 0x1F);\
+ AVR32_GPIO.port[OTG_ID_PIN >> 5].puers = 1 << (OTG_ID_PIN & 0x1F);\
+}
+#endif
+#define otg_input_id_pin() \
+{\
+ static const uotgIdPin = {PIN_UOTGHS_ID};\
+ PIO_PinConfigure(&uotgIdPin, 1);\
+}
+ //! Test if OTG_ID is input from its pin
+#if 0
+#define Is_otg_id_pin_input() \
+ ( !Tst_bits(AVR32_GPIO.port[OTG_ID_PIN >> 5].gper, 1 << (OTG_ID_PIN & 0x1F)) &&\
+ Tst_bits(AVR32_GPIO.port[OTG_ID_PIN >> 5].pmr0, 1 << (OTG_ID_PIN & 0x1F)) == Tst_bits(OTG_ID_PIN, 0x01) &&\
+ Tst_bits(AVR32_GPIO.port[OTG_ID_PIN >> 5].pmr1, 1 << (OTG_ID_PIN & 0x1F)) == Tst_bits(OTG_ID_PIN, 0x02))
+#endif
+#define Is_otg_id_pin_input() \
+ ( Tst_bits(PIOB->PIO_PDSR, PIO_PB11) )
+
+ //! Enable external OTG_ID pin (listened to by USB)
+#define otg_enable_id_pin() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_UIDE))
+ //! Disable external OTG_ID pin (ignored by USB)
+#define otg_disable_id_pin() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_UIDE))
+ //! Test if external OTG_ID pin enabled (listened to by USB)
+#define Is_otg_id_pin_enabled() (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_UIDE))
+ //! Disable external OTG_ID pin and force device mode
+#define otg_force_device_mode() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_UIMOD), otg_disable_id_pin())
+ //! Test if device mode is forced
+#define Is_otg_device_mode_forced() (!Is_otg_id_pin_enabled() && Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_UIMOD))
+ //! Disable external OTG_ID pin and force host mode
+#define otg_force_host_mode() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_UIMOD), otg_disable_id_pin())
+ //! Test if host mode is forced
+#define Is_otg_host_mode_forced() (!Is_otg_id_pin_enabled() && !Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_UIMOD))
+
+//! @name USBB OTG ID pin interrupt management
+//! These macros manage the ID pin interrupt
+//! @{
+#define otg_enable_id_interrupt() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_IDTE))
+#define otg_disable_id_interrupt() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_IDTE))
+#define Is_otg_id_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_IDTE))
+#define Is_otg_id_device() (Tst_bits(UOTGHS->UOTGHS_SR, UOTGHS_SR_ID))
+#define otg_ack_id_transition() (UOTGHS->UOTGHS_SCR = UOTGHS_SCR_IDTIC)
+#define otg_raise_id_transition() (UOTGHS->UOTGHS_SFR = UOTGHS_SFR_IDTIS)
+#define Is_otg_id_transition() (Tst_bits(UOTGHS->UOTGHS_SR, UOTGHS_SR_IDTI))
+//! @}
+
+//! @}
+
+//! @name USBB OTG main management
+//! These macros allows to enable/disable pad and USBB hardware
+//! @{
+ //! Enable USB macro
+#define otg_enable() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_USBE))
+ //! Disable USB macro
+#define otg_disable() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_USBE))
+#define Is_otg_enabled() (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_USBE))
+
+ //! Enable OTG pad
+#define otg_enable_pad() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_OTGPADE))
+ //! Disable OTG pad
+#define otg_disable_pad() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_OTGPADE))
+#define Is_otg_pad_enabled() (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_OTGPADE))
+
+ //! Check Clock Usable
+ //! For parts with HS feature, this one corresponding at UTMI clock
+#define Is_clock_usable() (Tst_bits(UOTGHS->UOTGHS_SR, UOTGHS_SR_CLKUSABLE))
+
+ //! Stop (freeze) internal USB clock
+#define otg_freeze_clock() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_FRZCLK))
+#define otg_unfreeze_clock() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_FRZCLK))
+#define Is_otg_clock_frozen() (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_FRZCLK))
+
+ //! Configure time-out of specified OTG timer
+#define otg_configure_timeout(timer, timeout) (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_UNLOCK),\
+ Wr_bitfield(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_TIMPAGE_Msk, timer),\
+ Wr_bitfield(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_TIMVALUE_Msk, timeout),\
+ Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_UNLOCK))
+ //! Get configured time-out of specified OTG timer
+#define otg_get_timeout(timer) (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_UNLOCK),\
+ Wr_bitfield(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_TIMPAGE_Msk, timer),\
+ Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_UNLOCK),\
+ Rd_bitfield(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_TIMVALUE_Msk))
+
+
+ //! Get the dual-role device state of the internal USB finite state machine of the USBB controller
+#define otg_get_fsm_drd_state() (Rd_bitfield(UOTGHS->UOTGHS_FSM, UOTGHS_FSM_DRDSTATE_Msk))
+//! @}
+
+//! @name USBB OTG hardware protocol
+//! These macros manages the hardware OTG protocol
+//! @{
+ //! initiates a Host Negociation Protocol
+#define otg_device_initiate_hnp() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_HNPREQ))
+ //! accepts a Host Negociation Protocol
+#define otg_host_accept_hnp() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_HNPREQ))
+ //! rejects a Host Negociation Protocol
+#define otg_host_reject_hnp() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_HNPREQ))
+ //! initiates a Session Request Protocol
+#define otg_device_initiate_srp() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_SRPREQ))
+ //! selects VBus as SRP method
+#define otg_select_vbus_srp_method() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_SRPSEL))
+#define Is_otg_vbus_srp_method_selected() (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_SRPSEL))
+ //! selects data line as SRP method
+#define otg_select_data_srp_method() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_SRPSEL))
+#define Is_otg_data_srp_method_selected() (!Is_otg_vbus_srp_method_selected())
+ //! tests if a HNP occurs
+#define Is_otg_hnp() (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_HNPREQ))
+ //! tests if a SRP from device occurs
+#define Is_otg_device_srp() (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_SRPREQ))
+
+ //! enables HNP error interrupt
+#define otg_enable_hnp_error_interrupt() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_HNPERRE))
+ //! disables HNP error interrupt
+#define otg_disable_hnp_error_interrupt() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_HNPERRE))
+#define Is_otg_hnp_error_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_HNPERRE))
+ //! acks HNP error interrupt
+#define otg_ack_hnp_error_interrupt() (UOTGHS->UOTGHS_SCR = UOTGHS_SCR_HNPERRIC)
+ //! raises HNP error interrupt
+#define otg_raise_hnp_error_interrupt() (UOTGHS->UOTGHS_SFR = UOTGHS_SFR_HNPERRIS)
+ //! tests if a HNP error occurs
+#define Is_otg_hnp_error_interrupt() (Tst_bits(UOTGHS->UOTGHS_SR, UOTGHS_SR_HNPERRI))
+
+ //! enables role exchange interrupt
+#define otg_enable_role_exchange_interrupt() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_ROLEEXE))
+ //! disables role exchange interrupt
+#define otg_disable_role_exchange_interrupt() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_ROLEEXE))
+#define Is_otg_role_exchange_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_ROLEEXE))
+ //! acks role exchange interrupt
+#define otg_ack_role_exchange_interrupt() (UOTGHS->UOTGHS_SCR = UOTGHS_SCR_ROLEEXIC)
+ //! raises role exchange interrupt
+#define otg_raise_role_exchange_interrupt() (UOTGHS->UOTGHS_SFR = UOTGHS_SFR_ROLEEXIS)
+ //! tests if a role exchange occurs
+#define Is_otg_role_exchange_interrupt() (Tst_bits(UOTGHS->UOTGHS_SR, UOTGHS_SR_ROLEEXI))
+
+ //! enables SRP interrupt
+#define otg_enable_srp_interrupt() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_SRPE))
+ //! disables SRP interrupt
+#define otg_disable_srp_interrupt() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_SRPE))
+#define Is_otg_srp_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_SRPE))
+ //! acks SRP interrupt
+#define otg_ack_srp_interrupt() (UOTGHS->UOTGHS_SCR = UOTGHS_SCR_SRPIC)
+ //! raises SRP interrupt
+#define otg_raise_srp_interrupt() (UOTGHS->UOTGHS_SFR = UOTGHS_SFR_SRPIS)
+ //! tests if a SRP occurs
+#define Is_otg_srp_interrupt() (Tst_bits(UOTGHS->UOTGHS_SR, UOTGHS_SR_SRPI))
+//! @}
+
+//! @}
+
+#endif // _USBB_OTG_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/drivers/usbc/asf.xml b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/drivers/usbc/asf.xml
new file mode 100644
index 0000000..f2238c0
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/drivers/usbc/asf.xml
@@ -0,0 +1,51 @@
+<asf xmlversion="1.0">
+ <select-by-config id="avr32.drivers.usbc.device" name="config.avr32.drivers.usbc.device.sleepmgr" caption="USB - Universial Serial Bus stack" default="yes">
+ <module type="driver" id="avr32.drivers.usbc.device#yes" caption="USB - Universial Serial Bus stack">
+ <info type="description" value="summary">
+ USB stack for USB device and OTG. Provides functions for configuring and managing end-points, and for OTG host operation.
+ </info>
+ <info type="gui-flag" value="hidden"/>
+ <info type="status" value="stable"/>
+ <info type="distribution" value="public"/>
+ <info type="keyword" value="technology">
+ <keyword value="USB"/>
+ </info>
+ <build type="c-source" value="usbc_device.c"/>
+ <build type="header-file" subtype="api" value="usbc_device.h"/>
+ <build type="header-file" value="usbc_otg.h"/>
+ <build type="include-path" value="."/>
+ <device-support value="uc3c"/>
+ <device-support value="uc3d"/>
+ <device-support value="mxt768e"/>
+ <device-support value="uc3l3"/>
+ <device-support value="uc3l4"/>
+ <require idref="common.services.basic.clock"/>
+ <require idref="common.services.basic.sleepmgr"/>
+ <require idref="avr32.utils"/>
+ <generator value="doxygen-module" default-mcu="unspecified-uc3c"/>
+ </module>
+ <module type="driver" id="avr32.drivers.usbc.device#no" caption="USB - Universial Serial Bus stack">
+ <info type="description" value="summary">
+ USB stack for USB device and OTG. Provides functions for configuring and managing end-points, and for OTG host operation.
+ </info>
+ <info type="gui-flag" value="hidden"/>
+ <info type="status" value="stable"/>
+ <info type="distribution" value="public"/>
+ <info type="keyword" value="technology">
+ <keyword value="USB"/>
+ </info>
+ <build type="c-source" value="usbc_device.c"/>
+ <build type="header-file" subtype="api" value="usbc_device.h"/>
+ <build type="header-file" value="usbc_otg.h"/>
+ <build type="include-path" value="."/>
+ <device-support value="uc3c"/>
+ <device-support value="uc3d"/>
+ <device-support value="mxt768e"/>
+ <device-support value="uc3l3"/>
+ <device-support value="uc3l4"/>
+ <require idref="common.services.basic.clock"/>
+ <require idref="avr32.utils"/>
+ <generator value="doxygen-module" default-mcu="unspecified-uc3c"/>
+ </module>
+ </select-by-config>
+</asf>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/drivers/usbc/usbc_device.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/drivers/usbc/usbc_device.c
new file mode 100644
index 0000000..8255df0
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/drivers/usbc/usbc_device.c
@@ -0,0 +1,1467 @@
+/**
+ * \file
+ *
+ * \brief USB Device driver
+ * Compliance with common driver UDD
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "conf_usb.h"
+#include "sysclk.h"
+#include "udd.h"
+#include "usbc_otg.h"
+#include "usbc_device.h"
+#include <string.h>
+
+#ifndef UDD_NO_SLEEP_MGR
+#include "sleepmgr.h"
+#endif
+
+#ifndef UDD_USB_INT_LEVEL
+# define UDD_USB_INT_LEVEL 0 // By default USB interrupt have low priority
+#endif
+
+// These defines are missing from or wrong in the toolchain header file
+#ifndef AVR32_PM_AWEN_USBCWEN_MASK
+// Optionnal #undef AVR32_PM_AWEN_USBCWEN_MASK if the define values is wrong.
+#define AVR32_PM_AWEN_USBCWEN_MASK 0x01
+#endif
+
+/**
+ * \ingroup usb_device_group
+ * \defgroup udd_group USB Device Driver (UDD)
+ *
+ * \section USBC_CONF USBC Custom configuration
+ * The following USBC driver configuration must be included in the conf_usb.h
+ * file of the application.
+ *
+ * UDD_USB_INT_LEVEL<br>
+ * Option to change the interrupt priority (0 to 3) by default 0 (recommended).
+ *
+ * \section Callbacks management
+ * The USB driver is fully managed by interrupt and does not request periodique
+ * task. Thereby, the USB events use callbacks to transfer the information.
+ * The callbacks are declared in static during compilation or in variable during
+ * code execution.
+ *
+ * Static declarations defined in conf_usb.h:
+ * - UDC_VBUS_EVENT(bool b_present)<br>
+ * To signal Vbus level change
+ * - UDC_SUSPEND_EVENT()<br>
+ * Called when USB bus enter in suspend mode
+ * - UDC_RESUME_EVENT()<br>
+ * Called when USB bus is wakeup
+ * - UDC_SOF_EVENT()<br>
+ * Called for each received SOF, Note: Each 1ms in HS/FS mode only.
+ *
+ * Dynamic callbacks, called "endpoint job" , are registered
+ * in udd_ep_job_t structure via the following functions:
+ * - udd_ep_run()<br>
+ * To call it when a transfer is finish
+ * - udd_ep_wait_stall_clear()<br>
+ * To call it when a endpoint halt is disabled
+ *
+ * \section Power mode management
+ * The Sleep modes authorized :
+ * - in USB IDLE state, the USBC needs of USB clock and authorizes up to IDLE mode
+ * - in USB SUSPEND state, the USBC no needs USB clock but requests a minimum
+ * clock restart timing. Thus, it authorizes up to STATIC or STANDBY mode.
+ * - VBUS monitoring used in USB Self-Power mode authorizes up to STOP mode
+ *
+ * The USBC_SLEEP_MODE_USB_IDLE equals SLEEPMGR_IDLE.
+ *
+ * The USBC_SLEEP_MODE_USB_SUSPEND depends on USB Power mode,
+ * USB clock startup timing and USB Speed mode:
+ * | Power Mode | Speed mode | Clock Startup | Sleep mode authorized |
+ * | Self-Power | LS, FS, HS | X | SLEEPMGR_STOP |
+ * | Bus-Power | LS, FS | >10ms | SLEEPMGR_STDBY |
+ * | Bus-Power | LS, FS | <=10ms | SLEEPMGR_STATIC |
+ * | Bus-Power | HS | >3ms | SLEEPMGR_STDBY |
+ * | Bus-Power | HS | <=3ms | SLEEPMGR_STATIC |
+ *
+ * @{
+ */
+
+
+// Check USB Device configuration
+#ifndef USB_DEVICE_EP_CTRL_SIZE
+# error USB_DEVICE_EP_CTRL_SIZE not defined
+#endif
+#ifndef USB_DEVICE_MAX_EP
+# error USB_DEVICE_MAX_EP not defined
+#endif
+#if (UC3C)
+# ifdef USB_DEVICE_HS_SUPPORT
+# error The High speed mode is not supported on this part, please remove USB_DEVICE_HS_SUPPORT in conf_usb.h
+# endif
+#endif
+
+
+/**
+ * \name Power management routine.
+ */
+//@{
+
+#ifndef UDD_NO_SLEEP_MGR
+
+//! Definition of sleep levels
+#if (USB_DEVICE_ATTR & USB_CONFIG_ATTR_SELF_POWERED)
+# define USBC_SLEEP_MODE_USB_SUSPEND SLEEPMGR_STOP
+#else
+# if ((defined USB_DEVICE_HS_SUPPORT) && (USBCLK_STARTUP_TIMEOUT>3000)) \
+ || ((!defined USB_DEVICE_HS_SUPPORT) && (USBCLK_STARTUP_TIMEOUT>10000))
+# define USBC_SLEEP_MODE_USB_SUSPEND SLEEPMGR_STDBY
+# else
+# define USBC_SLEEP_MODE_USB_SUSPEND SLEEPMGR_STATIC
+# endif
+#endif
+#define USBC_SLEEP_MODE_USB_IDLE SLEEPMGR_IDLE
+
+//! State of USB line
+static bool udd_b_idle;
+
+
+/*! \brief Authorize or not the CPU powerdown mode
+ *
+ * \param b_enable true to authorize powerdown mode
+ */
+static void udd_sleep_mode(bool b_idle)
+{
+ if (!b_idle && udd_b_idle) {
+ sleepmgr_lock_mode(USBC_SLEEP_MODE_USB_IDLE);
+ }
+ if (b_idle && !udd_b_idle) {
+ sleepmgr_unlock_mode(USBC_SLEEP_MODE_USB_IDLE);
+ }
+ udd_b_idle = b_idle;
+}
+#else
+
+static void udd_sleep_mode(bool b_idle) {
+}
+#endif // UDD_NO_SLEEP_MGR
+
+//@}
+
+/**
+ * @brief USB SRAM data about endpoint descriptor table
+ * The content of the USB SRAM can be :
+ * - modified by USB hardware by interface to signal endpoint status.
+ * Thereby, it is read by software.
+ * - modified by USB software to control endpoint.
+ * Thereby, it is read by hardware.
+ * This data section is volatile.
+ *
+ * @{
+ */
+UDC_BSS(32)
+static volatile usb_desc_table_t udd_g_ep_table[2 * (USB_DEVICE_MAX_EP + 1)];
+
+/**
+ * \name Control endpoint low level management routine.
+ *
+ * This function performs control endpoint mangement.
+ * It handle the SETUP/DATA/HANDSHAKE phases of a control transaction.
+ */
+//@{
+
+//! Global variable to give and record information about setup request management
+COMPILER_WORD_ALIGNED udd_ctrl_request_t udd_g_ctrlreq;
+
+//! Bit definitions about endpoint control state machine for udd_ep_control_state
+typedef enum {
+ UDD_EPCTRL_SETUP = 0, //!< Wait a SETUP packet
+ UDD_EPCTRL_DATA_OUT = 1, //!< Wait a OUT data packet
+ UDD_EPCTRL_DATA_IN = 2, //!< Wait a IN data packet
+ UDD_EPCTRL_HANDSHAKE_WAIT_IN_ZLP = 3, //!< Wait a IN ZLP packet
+ UDD_EPCTRL_HANDSHAKE_WAIT_OUT_ZLP = 4, //!< Wait a OUT ZLP packet
+ UDD_EPCTRL_STALL_REQ = 5, //!< STALL enabled on IN & OUT packet
+} udd_ctrl_ep_state_t;
+
+//! State of the endpoint control management
+static udd_ctrl_ep_state_t udd_ep_control_state;
+//! Total number of data received/sent during data packet phase with previous payload buffers
+static uint16_t udd_ctrl_prev_payload_nb_trans;
+//! Number of data received/sent to/from udd_g_ctrlreq.payload buffer
+static uint16_t udd_ctrl_payload_nb_trans;
+//! Signal if the udd_g_ctrlreq.payload buffer is modulo endpoint control and need of data ZLP
+static bool udd_ctrl_payload_need_in_zlp;
+
+/**
+ * \brief Buffer to store the data received on control endpoint (SETUP/OUT endpoint 0)
+ *
+ * Used to avoid a RAM buffer overflow in case of the payload buffer
+ * is smaller than control endpoint size
+ */
+UDC_BSS(4) uint8_t udd_ctrl_buffer[USB_DEVICE_EP_CTRL_SIZE];
+
+/**
+ * \brief Reset control endpoint
+ *
+ * Called after a USB line reset or when UDD is enabled
+ */
+static void udd_reset_ep_ctrl(void);
+
+/**
+ * \brief Reset control endpoint management
+ *
+ * Called after a USB line reset or at the end of SETUP request (after ZLP)
+ */
+static void udd_ctrl_init(void);
+
+//! \brief Managed reception of SETUP packet on control enpoint
+static void udd_ctrl_setup_received(void);
+
+//! \brief Managed reception of IN packet on control enpoint
+static void udd_ctrl_in_sent(void);
+
+//! \brief Managed reception of OUT packet on control enpoint
+static void udd_ctrl_out_received(void);
+
+//! \brief Managed underflow event of IN packet on control enpoint
+static void udd_ctrl_underflow(void);
+
+//! \brief Managed overflow event of OUT packet on control enpoint
+static void udd_ctrl_overflow(void);
+
+//! \brief Managed stall event of IN/OUT packet on control enpoint
+static void udd_ctrl_stall_data(void);
+
+//! \brief Send a ZLP IN on control endpoint
+static void udd_ctrl_send_zlp_in(void);
+
+//! \brief Send a ZLP OUT on control endpoint
+static void udd_ctrl_send_zlp_out(void);
+
+//! \brief Call callback associated to setup request
+static void udd_ctrl_endofrequest(void);
+
+
+/**
+ * \brief Main interrupt routine for control endpoint
+ *
+ * This switchs control endpoint events to correct sub function.
+ *
+ * \return \c 1 if an event about control endpoint is occured, otherwise \c 0.
+ */
+static bool udd_ctrl_interrupt(void);
+
+//@}
+
+
+/**
+ * \name Management of bulk/interrupt/isochronous endpoints
+ *
+ * The UDD manages the data transfer on endpoints:
+ * - Start data tranfer on endpoint with USB Device DMA
+ * - Send a ZLP packet if requested
+ * - Call callback registered to signal end of transfer
+ * The transfer abort and stall feature are supported.
+ */
+//@{
+#if (0!=USB_DEVICE_MAX_EP)
+
+//! Structure definition about job registered on an endpoint
+typedef struct {
+ uint8_t busy:1; //!< A job is registered on this endpoint
+ uint8_t b_use_out_cache_buffer:1; //!< The cache buffer is currently used on endpoint OUT
+ uint8_t *buf; //!< Buffer located in internal RAM to send or fill during job
+ iram_size_t buf_size; //!< Size of buffer to send or fill
+ iram_size_t nb_trans; //!< Total number of data transfered on enpoint
+ union {
+ udd_callback_trans_t call_trans; //!< Callback to call at the end of transfer
+ udd_callback_halt_cleared_t call_nohalt; //!< Callback to call when the endpoint halt is cleared
+ };
+} udd_ep_job_t;
+
+//! Array to register a job on bulk/interrupt/isochronous endpoint
+static udd_ep_job_t udd_ep_job[USB_DEVICE_MAX_EP];
+
+/**
+ * \brief Buffer to store the data received on bulk/interrupt endpoints
+ *
+ * Used to avoid a RAM buffer overflow in case of the user buffer
+ * is smaller than endpoint size
+ *
+ * \warning The isochronous endpoint is not protected by this system
+ * and the user must always use a buffer corresponding at endpoint size
+ */
+#if (defined USB_DEVICE_LOW_SPEED)
+UDC_BSS(4) uint8_t udd_ep_out_cache_buffer[USB_DEVICE_MAX_EP][8];
+#elif (defined USB_DEVICE_HS_SUPPORT)
+UDC_BSS(4) uint8_t udd_ep_out_cache_buffer[USB_DEVICE_MAX_EP][512];
+#else
+UDC_BSS(4) uint8_t udd_ep_out_cache_buffer[USB_DEVICE_MAX_EP][64];
+#endif
+
+/**
+ * \brief Call the callback associated to the job which is finished
+ *
+ * \param ep endpoint number of job to abort
+ * \param b_abort if true then the job has been aborted
+ */
+static void udd_ep_finish_job(udd_ep_id_t ep, bool b_abort);
+
+/**
+ * \brief Main interrupt routine for bulk/interrupt/isochronous endpoints
+ *
+ * This switchs endpoint events to correct sub function.
+ *
+ * \return \c 1 if an event about bulk/interrupt/isochronous endpoints has occured, otherwise \c 0.
+ */
+static bool udd_ep_interrupt(void);
+
+#endif // (0!=USB_DEVICE_MAX_EP)
+//@}
+
+
+//--------------------------------------------------------
+//--- INTERNAL ROUTINES TO MANAGED GLOBAL EVENTS
+
+
+/**
+ * \internal
+ * \brief Function called by USBC interrupt to manage USB Device interrupts
+ *
+ * USB Device interrupt events are splited in three parts:
+ * - USB line events (SOF, reset, suspend, resume, wakeup)
+ * - control endpoint events (setup reception, end of data transfer, underflow, overflow, stall)
+ * - bulk/interrupt/isochronous endpoints events (end of data transfer)
+ *
+ * Note:
+ * Here, the global interrupt mask is not clear when an USB interrupt is enabled
+ * because this one can not be occured during the USB ISR (=during INTX is masked).
+ * See Technical reference $3.8.3 Masking interrupt requests in peripheral modules.
+ */
+#ifdef OTG
+static void udd_interrupt(void)
+#else
+ISR(udd_interrupt, AVR32_USBC_IRQ_GROUP, UDD_USB_INT_LEVEL)
+#endif
+{
+#ifdef UDC_SOF_EVENT
+ if (Is_udd_sof()) {
+ udd_ack_sof();
+ UDC_SOF_EVENT();
+ goto udd_interrupt_end;
+ }
+#endif
+
+ if (udd_ctrl_interrupt())
+ goto udd_interrupt_end; // Interrupt acked by control endpoint managed
+
+#if (0!=USB_DEVICE_MAX_EP)
+ if (udd_ep_interrupt())
+ goto udd_interrupt_end; // Interrupt acked by bulk/interrupt/isochronous endpoint managed
+#endif
+
+ // USB bus reset detection
+ if (Is_udd_reset()) {
+ udd_ack_reset();
+ // Abort all jobs on-going
+#if (0!=USB_DEVICE_MAX_EP)
+ // For each endpoint, kill job
+ {
+ uint8_t i;
+ for (i = 1; i <= USB_DEVICE_MAX_EP; i++) {
+ udd_ep_abort(i);
+ }
+ }
+#endif
+ // Reset USB Device Stack Core
+ udc_reset();
+ // Reset endpoint control
+ udd_reset_ep_ctrl();
+ // Reset endpoint control management
+ udd_ctrl_init();
+ goto udd_interrupt_end;
+ }
+
+ if (Is_udd_suspend_interrupt_enabled() && Is_udd_suspend()) {
+ otg_unfreeze_clock();
+ // The suspend interrupt is automatic acked when a wakeup occur
+ udd_disable_suspend_interrupt();
+ udd_enable_wake_up_interrupt();
+ otg_freeze_clock(); // Mandatory to exit of sleep mode after a wakeup event
+ udd_sleep_mode(false); // Enter in SUSPEND mode
+#ifdef UDC_SUSPEND_EVENT
+ UDC_SUSPEND_EVENT();
+#endif
+ goto udd_interrupt_end;
+ }
+
+ if (Is_udd_wake_up_interrupt_enabled() && Is_udd_wake_up()) {
+ // Ack wakeup interrupt and enable suspend interrupt
+ otg_unfreeze_clock();
+ // Check USB clock ready after suspend and eventually sleep USB clock
+ while( !Is_clock_usable() ) {
+ if(Is_udd_suspend()) break; // In case of USB state change in HS
+ };
+ // The wakeup interrupt is automatic acked when a suspend occur
+ udd_disable_wake_up_interrupt();
+ udd_enable_suspend_interrupt();
+ udd_sleep_mode(true); // Enter in IDLE mode
+#ifdef UDC_RESUME_EVENT
+ UDC_RESUME_EVENT();
+#endif
+ goto udd_interrupt_end;
+ }
+
+ if (Is_udd_vbus_transition()) {
+ // Ack VBus transition and send status to high level
+ otg_unfreeze_clock();
+ udd_ack_vbus_transition();
+ otg_freeze_clock();
+#ifdef UDC_VBUS_EVENT
+ UDC_VBUS_EVENT(Is_udd_vbus_high());
+#endif
+ goto udd_interrupt_end;
+ }
+udd_interrupt_end:
+ otg_data_memory_barrier();
+ return;
+}
+
+
+bool udd_include_vbus_monitoring(void)
+{
+#if ( MXT768E || UC3L3_L4 )
+ return false;
+#else
+ return true;
+#endif
+}
+
+
+void udd_enable(void)
+{
+ irqflags_t flags;
+ sysclk_enable_usb();
+
+ flags = cpu_irq_save();
+
+ //** Enable USB hardware
+ otg_disable();
+ (void)Is_otg_enabled();
+#ifdef OTG
+ // Check UID pin state before enter in USB device mode
+ if (!Is_otg_id_device())
+#warning returning bool but the function is void
+ return FALSE;
+#else
+ // Here, only the Device mode is possible, then link USBC interrupt to UDD interrupt
+ irq_register_handler(udd_interrupt, AVR32_USBC_IRQ, UDD_USB_INT_LEVEL);
+ otg_force_device_mode();
+#endif
+ otg_disable_pad();
+ otg_enable_pad();
+ otg_enable();
+ otg_unfreeze_clock();
+ (void)Is_otg_clock_frozen();
+#if 0
+ // For parts with high speed feature, the "USABLE" clock is the UTMI clock,
+ // and the UTMI clock is disabled in suspend mode. Thereby, the utmi clock
+ // can't be checked when USB line is not attached or in suspend mode
+#else
+ // Check USB clock
+ while( !Is_clock_usable() );
+#endif
+ memset((uint8_t *) udd_g_ep_table, 0, sizeof(udd_g_ep_table));
+ Usb_set_desc_tab_addr_reg(udd_g_ep_table);
+
+ // Reset internal variables
+#if (0!=USB_DEVICE_MAX_EP)
+ {
+ uint8_t i;
+ for (i = 0; i < USB_DEVICE_MAX_EP; i++) {
+ udd_ep_job[i].busy = false;
+ }
+ }
+#endif
+
+ // Set the USB speed requested by configuration file
+#ifdef USB_DEVICE_LOW_SPEED
+ udd_low_speed_enable();
+#else
+ udd_low_speed_disable();
+#endif
+# ifdef USB_DEVICE_HS_SUPPORT
+ udd_high_speed_enable();
+# else
+ udd_high_speed_disable();
+# endif
+ udd_enable_vbus_interrupt();
+ otg_freeze_clock();
+ // Always authorize asynchronous USB interrupts to exit from sleep mode
+#if(!defined AVR32_PM_WITHOUT_AWEN)
+ AVR32_PM.awen |= AVR32_PM_AWEN_USBCWEN_MASK;
+#endif
+
+#ifndef UDD_NO_SLEEP_MGR
+ // Initialize the sleep mode authorized for the USB suspend mode
+ udd_b_idle = false;
+ sleepmgr_lock_mode(USBC_SLEEP_MODE_USB_SUSPEND);
+#endif
+
+ cpu_irq_restore(flags);
+}
+
+
+void udd_disable(void)
+{
+ irqflags_t flags;
+ flags = cpu_irq_save();
+ // Disable USB pad
+ otg_disable();
+ otg_disable_pad();
+ sysclk_disable_usb();
+ udd_sleep_mode(false);
+#ifndef UDD_NO_SLEEP_MGR
+ sleepmgr_unlock_mode(USBC_SLEEP_MODE_USB_SUSPEND);
+#endif
+ cpu_irq_restore(flags);
+}
+
+
+void udd_attach(void)
+{
+ irqflags_t flags;
+ flags = cpu_irq_save();
+
+ // At startup the USB bus state is unknown,
+ // therefore the state is considered IDLE to not miss any USB event
+ udd_sleep_mode(true);
+ otg_unfreeze_clock();
+
+ // This section of clock check can be improved with a chek of
+ // USB clock source via sysclk()
+#if 0
+ // For parts with high speed feature, the "USABLE" clock is the UTMI clock,
+ // and the UTMI clock is disabled in suspend mode. Thereby, the utmi clock
+ // can't be checked when USB line is not attached or in suspend mode
+ // But it is not a issue, because the clock source is the OSC
+#else
+ // Check USB clock because the source can be a PLL
+ while( !Is_clock_usable() );
+#endif
+ // Authorize attach if VBus is present
+ udd_attach_device();
+
+ // (RESET_AND_WAKEUP)
+ // After the attach and the first USB suspend, the following USB Reset time can be inferior to CPU restart clock time.
+ // Thus, the USB Reset state is not detected and endpoint control is not allocated
+ // In this case, a Reset is do automatically after attach.
+ udc_reset(); // Reset USB Device Stack Core
+ udd_reset_ep_ctrl(); // Reset endpoint control
+ udd_ctrl_init(); // Reset endpoint control management
+
+ // Enable USB line events
+ udd_enable_reset_interrupt();
+ udd_enable_suspend_interrupt();
+ udd_enable_wake_up_interrupt();
+#ifdef UDC_SOF_EVENT
+ udd_enable_sof_interrupt();
+#endif
+ // Reset following interupts flag
+ udd_ack_reset();
+ udd_ack_sof();
+
+ // The first suspend interrupt must be forced
+#if 0
+ // With UTMI, the first suspend is detected but must be cleared to reoccur interrupt
+ udd_ack_suspend();
+#else
+ // The first suspend interrupt is not detected else raise it
+ udd_raise_suspend();
+#endif
+ udd_ack_wake_up();
+ otg_freeze_clock();
+ cpu_irq_restore(flags);
+}
+
+
+void udd_detach(void)
+{
+ otg_unfreeze_clock();
+ // Detach device from the bus
+ udd_detach_device();
+ udd_sleep_mode(false);
+}
+
+
+bool udd_is_high_speed(void)
+{
+#ifdef USB_DEVICE_HS_SUPPORT
+ return !Is_udd_full_speed_mode();
+#else
+ return false;
+#endif
+}
+
+
+void udd_set_address(uint8_t address)
+{
+ udd_disable_address();
+ udd_configure_address(address);
+ udd_enable_address();
+}
+
+
+uint8_t udd_getaddress(void)
+{
+ return udd_get_configured_address();
+}
+
+
+uint16_t udd_get_frame_number(void)
+{
+ return udd_frame_number();
+}
+
+
+void udd_send_wake_up(void)
+{
+#ifndef UDD_NO_SLEEP_MGR
+ if (!udd_b_idle)
+#endif
+ {
+ udd_sleep_mode(true); // Enter in IDLE mode
+ otg_unfreeze_clock();
+ udd_initiate_remote_wake_up();
+ }
+}
+
+
+void udd_set_setup_payload( uint8_t *payload, uint16_t payload_size )
+{
+ udd_g_ctrlreq.payload = payload;
+ udd_g_ctrlreq.payload_size = payload_size;
+}
+
+
+#if (0!=USB_DEVICE_MAX_EP)
+bool udd_ep_alloc(udd_ep_id_t ep, uint8_t bmAttributes,
+ uint16_t MaxEndpointSize)
+{
+ uint8_t ep_addr = ep & USB_EP_ADDR_MASK;
+ if (Is_udd_endpoint_enabled(ep_addr))
+ return FALSE;
+
+ // Check if endpoint size is 8,16,32,64,128,256,512 or 1023
+ Assert(MaxEndpointSize < 1024);
+ Assert((MaxEndpointSize == 1023) || !(MaxEndpointSize & (MaxEndpointSize - 1)));
+ Assert(MaxEndpointSize >= 8);
+
+ // Check endpoint type
+ Assert(((bmAttributes & USB_EP_TYPE_MASK) == USB_EP_TYPE_ISOCHRONOUS)
+ || ((bmAttributes & USB_EP_TYPE_MASK) ==
+ USB_EP_TYPE_BULK)
+ || ((bmAttributes & USB_EP_TYPE_MASK) ==
+ USB_EP_TYPE_INTERRUPT));
+
+ udd_configure_endpoint(ep_addr, bmAttributes,
+ ((ep & USB_EP_DIR_IN) ? 1 : 0), MaxEndpointSize,
+ AVR32_USBC_UECFG0_EPBK_SINGLE);
+
+ udd_enable_busy_bank0(ep_addr);
+ udd_enable_endpoint(ep_addr);
+
+#if (defined USB_DISABLE_NYET_FOR_OUT_ENDPOINT)
+ // Disable the NYET feature for OUT endpoint. Using OUT multipacket, each
+ // OUT packet are always NYET.
+ if (!(ep & USB_EP_DIR_IN)) {
+ udd_disable_nyet(ep_addr);
+ }
+#endif
+ return true;
+}
+
+
+void udd_ep_free(udd_ep_id_t ep)
+{
+ udd_ep_abort(ep);
+#if( defined UDC_RAM_ACCESS_ERROR_EVENT )
+ if( Is_udd_ram_access_error(ep & 0x7F) ){
+ UDC_RAM_ACCESS_ERROR_EVENT();
+ }
+#endif
+ udd_disable_endpoint(ep & 0x7F);
+}
+
+
+bool udd_ep_is_halted(udd_ep_id_t ep)
+{
+ return Is_udd_endpoint_stall_requested(ep & USB_EP_ADDR_MASK);
+}
+
+
+bool udd_ep_set_halt(udd_ep_id_t ep)
+{
+ uint8_t index = ep & USB_EP_ADDR_MASK;
+
+ if (USB_DEVICE_MAX_EP < index)
+ return false;
+ // Stall endpoint
+ udd_enable_stall_handshake(index);
+ udd_reset_data_toggle(index);
+ udd_ep_abort(ep);
+ return true;
+}
+
+
+bool udd_ep_clear_halt(udd_ep_id_t ep)
+{
+ udd_ep_job_t *ptr_job;
+
+ ep &= USB_EP_ADDR_MASK;
+ if (USB_DEVICE_MAX_EP < ep)
+ return false;
+ ptr_job = &udd_ep_job[ep - 1];
+
+ if (Is_udd_endpoint_stall_requested(ep)) { // Endpoint stalled
+ // Remove stall
+ udd_disable_stall_handshake(ep);
+ // If a job is register on clear halt action
+ // then execute callback
+ if (ptr_job->busy == true) {
+ ptr_job->busy = false;
+ ptr_job->call_nohalt();
+ }
+ }
+ return true;
+}
+
+
+bool udd_ep_run(udd_ep_id_t ep, bool b_shortpacket,
+ uint8_t * buf, iram_size_t buf_size,
+ udd_callback_trans_t callback)
+{
+ uint16_t ep_size, trans_size, short_packet;
+ bool b_dir_in;
+ udd_ep_job_t *ptr_job;
+ irqflags_t flags;
+
+ b_dir_in = (USB_EP_DIR_IN == (ep & USB_EP_DIR_IN));
+ ep &= USB_EP_ADDR_MASK;
+ if (USB_DEVICE_MAX_EP < ep)
+ return false;
+
+ // Get job about endpoint
+ ptr_job = &udd_ep_job[ep - 1];
+
+ if ((!Is_udd_endpoint_enabled(ep))
+ || Is_udd_endpoint_stall_requested(ep))
+ return false; // Endpoint is halted
+
+ flags = cpu_irq_save();
+ if (ptr_job->busy == true) {
+ cpu_irq_restore(flags);
+ return false; // Job already on going
+ }
+ ptr_job->busy = true;
+ cpu_irq_restore(flags);
+
+ // No job running. Let's setup a new one.
+ //
+ // The USB hardware support a maximum transfer size of 0x7FFF Bytes
+ ep_size = udd_get_endpoint_size(ep);
+ if (0x7FFF < buf_size) {
+ trans_size = 0x7FFF - (0x7FFF % ep_size);
+ short_packet = 0;
+ } else {
+ trans_size = buf_size;
+ short_packet = trans_size % ep_size;
+ }
+
+ if (b_dir_in) {
+ // Need ZLP, if requested and last packet is not a short packet
+ udd_udesc_set_buf0_autozlp(ep, b_shortpacket);
+ udd_udesc_set_buf0_ctn(ep, trans_size);
+ udd_udesc_rst_buf0_size(ep);
+ // Link the user buffer directly on USB hardware DMA
+ udd_udesc_set_buf0_addr(ep, buf);
+ } else {
+ udd_udesc_rst_buf0_ctn(ep);
+ ptr_job->nb_trans = 0;
+ if (trans_size < ep_size) {
+ // The user buffer is smaller than endpoint size
+ if (AVR32_USBC_PTYPE_ISOCHRONOUS ==
+ udd_get_endpoint_type(ep)) {
+ ptr_job->busy = false;
+ return false; // The user must use a buffer corresponding at isochrnous endpoint size
+ }
+ // Use the cache buffer for Bulk or Interrupt size endpoint
+ ptr_job->b_use_out_cache_buffer = true;
+ udd_udesc_set_buf0_addr(ep,
+ udd_ep_out_cache_buffer[ep - 1]);
+ udd_udesc_set_buf0_size(ep, ep_size);
+ } else {
+ // Link the user buffer directly on USB hardware DMA
+ ptr_job->b_use_out_cache_buffer = false;
+ udd_udesc_set_buf0_addr(ep, buf);
+ udd_udesc_set_buf0_size(ep, trans_size - short_packet);
+ }
+ }
+
+ // Update Job information
+ ptr_job->buf = buf;
+ ptr_job->buf_size = trans_size;
+ ptr_job->call_trans = callback;
+ ptr_job->busy = true;
+
+
+ // Start transfer
+ udd_disable_busy_bank0(ep);
+
+ // Enable interrupt
+ flags = cpu_irq_save();
+ if (b_dir_in) {
+ udd_ack_fifocon(ep);
+ udd_ack_in_send(ep);
+ udd_enable_in_send_interrupt(ep);
+ } else {
+ udd_enable_out_received_interrupt(ep);
+ }
+ udd_enable_endpoint_interrupt(ep);
+ cpu_irq_restore(flags);
+
+ return true;
+}
+
+
+void udd_ep_abort(udd_ep_id_t ep)
+{
+ ep &= USB_EP_ADDR_MASK;
+ // Stop transfer
+ udd_enable_busy_bank0(ep);
+ // Abort job on endpoint
+ udd_ep_finish_job(ep, true);
+}
+
+
+bool udd_ep_wait_stall_clear(udd_ep_id_t ep,
+ udd_callback_halt_cleared_t callback)
+{
+ udd_ep_job_t *ptr_job;
+
+ ep &= USB_EP_ADDR_MASK;
+ if (USB_DEVICE_MAX_EP < ep)
+ return false;
+ ptr_job = &udd_ep_job[ep - 1];
+
+ if (!Is_udd_endpoint_enabled(ep))
+ return false; // Endpoint not enabled
+
+ // Wait clear halt endpoint
+ if (ptr_job->busy == true)
+ return false; // Job already on going
+
+ if (Is_udd_endpoint_stall_requested(ep)) {
+ // Endpoint halted then registes the callback
+ ptr_job->busy = true;
+ ptr_job->call_nohalt = callback;
+ } else {
+ // Enpoint not halted then call directly callback
+ callback();
+ }
+ return true;
+}
+#endif // (0!=USB_DEVICE_MAX_EP)
+
+
+#ifdef USB_DEVICE_HS_SUPPORT
+
+void udd_test_mode_j(void)
+{
+ udd_enable_hs_test_mode();
+ udd_enable_hs_test_mode_j();
+}
+
+
+void udd_test_mode_k(void)
+{
+ udd_enable_hs_test_mode();
+ udd_enable_hs_test_mode_k();
+}
+
+
+void udd_test_mode_se0_nak(void)
+{
+ udd_enable_hs_test_mode();
+}
+
+
+void udd_test_mode_packet(void)
+{
+ irqflags_t flags;
+ const uint8_t test_packet[] = {
+ // 00000000 * 9
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ // 01010101 * 8
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ // 01110111 * 8
+ 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE,
+ // 0, {111111S * 15}, 111111
+ 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xFF,
+ // S, 111111S, {0111111S * 7}
+ 0x7F, 0xBF, 0xDF, 0xEF, 0xF7, 0xFB, 0xFD,
+ // 00111111, {S0111111 * 9}, S0
+ 0xFC, 0x7E, 0xBF, 0xDF, 0xEF, 0xF7, 0xFB, 0xFD, 0x7E
+ };
+
+ // Reconfigure control endpoint to bulk IN endpoint
+ udd_disable_endpoint(0);
+ udd_configure_endpoint(0, USB_EP_TYPE_BULK, 1, // IN
+ 64, AVR32_USBC_UECFG0_EPBK_SINGLE);
+
+ udd_enable_hs_test_mode();
+ udd_enable_hs_test_mode_packet();
+
+ // Send packet on endpoint 0
+ udd_udesc_set_buf0_addr(0, (uint8_t *) test_packet);
+ flags = cpu_irq_save();
+ udd_enable_in_send_interrupt(0);
+ cpu_irq_restore(flags);
+
+ udd_ack_in_send(0);
+}
+#endif // USB_DEVICE_HS_SUPPORT
+
+
+
+//--------------------------------------------------------
+//--- INTERNAL ROUTINES TO MANAGED THE CONTROL ENDPOINT
+
+static void udd_reset_ep_ctrl(void)
+{
+ irqflags_t flags;
+ // Reset USB address to 0
+ udd_configure_address(0);
+ udd_enable_address();
+ // Alloc and configure control endpoint
+ udd_configure_endpoint(0,
+ USB_EP_TYPE_CONTROL,
+ 0,
+ USB_DEVICE_EP_CTRL_SIZE, AVR32_USBC_UECFG0_EPBK_SINGLE);
+ // Use internal buffer for endpoint control
+ udd_udesc_set_buf0_addr(0, udd_ctrl_buffer);
+ // don't use multipacket on endpoint control
+ udd_udesc_rst_buf0_size(0);
+ udd_enable_endpoint(0);
+ udd_disable_busy_bank0(0);
+ flags = cpu_irq_save();
+ udd_enable_setup_received_interrupt(0);
+ udd_enable_out_received_interrupt(0);
+ udd_enable_endpoint_interrupt(0);
+ cpu_irq_restore(flags);
+}
+
+static void udd_ctrl_init(void)
+{
+ // In case of abort of IN Data Phase:
+ // No need to abort IN transfer (rise TXINI),
+ // because it is automatically done by hardware when a Setup packet is received.
+ // But the interrupt must be disabled to don't generate interrupt TXINI
+ // after SETUP reception.
+ udd_disable_in_send_interrupt(0);
+ // In case of OUT ZLP event is no processed before Setup event occurs
+ udd_ack_out_received(0);
+
+ udd_g_ctrlreq.callback = NULL;
+ udd_g_ctrlreq.over_under_run = NULL;
+ udd_g_ctrlreq.payload_size = 0;
+ udd_ep_control_state = UDD_EPCTRL_SETUP;
+}
+
+
+static void udd_ctrl_setup_received(void)
+{
+ irqflags_t flags;
+
+ if (UDD_EPCTRL_SETUP != udd_ep_control_state) {
+ // May be a hidden DATA or ZLP phase
+ // or protocol abort
+ udd_ctrl_endofrequest();
+ // Reinitializes control endpoint management
+ udd_ctrl_init();
+ }
+ // Fill setup request structure
+ if (8 != udd_udesc_get_buf0_ctn(0)) {
+ udd_ctrl_stall_data();
+ udd_ack_setup_received(0);
+ return; // Error data number doesn't correspond to SETUP packet
+ }
+ memcpy((uint8_t *) & udd_g_ctrlreq.req, udd_ctrl_buffer, 8);
+
+ // Manage LSB/MSB to fit with CPU usage
+ udd_g_ctrlreq.req.wValue = le16_to_cpu(udd_g_ctrlreq.req.wValue);
+ udd_g_ctrlreq.req.wIndex = le16_to_cpu(udd_g_ctrlreq.req.wIndex);
+ udd_g_ctrlreq.req.wLength = le16_to_cpu(udd_g_ctrlreq.req.wLength);
+
+ // Decode setup request
+ if (udc_process_setup() == false) {
+ // Setup request unknow then stall it
+ udd_ctrl_stall_data();
+ udd_ack_setup_received(0);
+ return;
+ }
+ udd_ack_setup_received(0);
+
+ if (Udd_setup_is_in()) {
+ // Compute if an IN ZLP must be send after IN data
+ udd_ctrl_payload_need_in_zlp =
+ ((udd_g_ctrlreq.payload_size %
+ USB_DEVICE_EP_CTRL_SIZE) == 0);
+ // IN data phase requested
+ udd_ctrl_prev_payload_nb_trans = 0;
+ udd_ctrl_payload_nb_trans = 0;
+ udd_ep_control_state = UDD_EPCTRL_DATA_IN;
+ udd_ctrl_in_sent(); // Send first data transfer
+ } else {
+ if (0 == udd_g_ctrlreq.req.wLength) {
+ // No data phase requested
+ // Send IN ZLP to ACK setup request
+ udd_ctrl_send_zlp_in();
+ return;
+ }
+ // OUT data phase requested
+ udd_ctrl_prev_payload_nb_trans = 0;
+ udd_ctrl_payload_nb_trans = 0;
+ udd_ep_control_state = UDD_EPCTRL_DATA_OUT;
+ // To detect a protocol error, enable nak interrupt on data IN phase
+ udd_ack_nak_in(0);
+ flags = cpu_irq_save();
+ udd_enable_nak_in_interrupt(0);
+ cpu_irq_restore(flags);
+ }
+}
+
+
+static void udd_ctrl_in_sent(void)
+{
+ uint16_t nb_remain;
+ irqflags_t flags;
+
+ flags = cpu_irq_save();
+ udd_disable_in_send_interrupt(0);
+ cpu_irq_restore(flags);
+
+ if (UDD_EPCTRL_HANDSHAKE_WAIT_IN_ZLP == udd_ep_control_state) {
+ // ZLP on IN is sent, then valid end of setup request
+ udd_ctrl_endofrequest();
+ // Reinitializes control endpoint management
+ udd_ctrl_init();
+ return;
+ }
+ Assert(udd_ep_control_state == UDD_EPCTRL_DATA_IN);
+
+ nb_remain = udd_g_ctrlreq.payload_size - udd_ctrl_payload_nb_trans;
+ if (0 == nb_remain) {
+ // All content of current buffer payload are sent
+ if (!udd_ctrl_payload_need_in_zlp) {
+ // It is the end of data phase, because the last data packet is a short packet
+ // then generate an OUT ZLP for handshake phase.
+ udd_ctrl_send_zlp_out();
+ return;
+ }
+ if ((udd_g_ctrlreq.req.wLength > (udd_ctrl_prev_payload_nb_trans
+ +
+ udd_g_ctrlreq.
+ payload_size))
+ || (!udd_g_ctrlreq.over_under_run)
+ || (!udd_g_ctrlreq.over_under_run())) {
+ // Underrun or data packet complette than send zlp on IN (note don't change DataToggle)
+ udd_ctrl_payload_need_in_zlp = false;
+ // nb_remain==0 allows to send a IN ZLP
+ } else {
+ // A new payload buffer is given
+ // Update number of total data sending by previous playlaod buffer
+ udd_ctrl_prev_payload_nb_trans +=
+ udd_ctrl_payload_nb_trans;
+ // Update maangement of current playoad transfer
+ udd_ctrl_payload_nb_trans = 0;
+ nb_remain = udd_g_ctrlreq.payload_size;
+ // Compute if an IN ZLP must be send after IN data
+ udd_ctrl_payload_need_in_zlp =
+ ((udd_g_ctrlreq.payload_size %
+ USB_DEVICE_EP_CTRL_SIZE)
+ == 0);
+ }
+ }
+ // Continue transfer and send next data
+ if (nb_remain > USB_DEVICE_EP_CTRL_SIZE) {
+ nb_remain = USB_DEVICE_EP_CTRL_SIZE;
+ }
+ //** Critical section
+ // Only in case of DATA IN phase abort without USB Reset signal after.
+ // The IN data don't must be writed in endpoint 0 DPRAM during
+ // a next setup reception in same endpoint 0 DPRAM.
+ // Thereby, an OUT ZLP reception must check before IN data write
+ // and if no OUT ZLP is recevied the data must be written quickly (800us)
+ // before an eventually ZLP OUT and SETUP reception
+ flags = cpu_irq_save();
+ if (Is_udd_out_received(0)) {
+ // IN DATA phase aborted by OUT ZLP
+ cpu_irq_restore(flags);
+ udd_ep_control_state = UDD_EPCTRL_HANDSHAKE_WAIT_OUT_ZLP;
+ return; // Exit of IN DATA phase
+ }
+ // Write quickly the IN data
+ memcpy(udd_ctrl_buffer,
+ udd_g_ctrlreq.payload + udd_ctrl_payload_nb_trans,
+ nb_remain);
+ udd_ctrl_payload_nb_trans += nb_remain;
+ udd_udesc_set_buf0_ctn(0, nb_remain);
+
+ // Validate and send the data available in the control endpoint buffer
+ udd_ack_in_send(0);
+ udd_enable_in_send_interrupt(0);
+ // In case of abort of DATA IN phase, no need to enable nak OUT interrupt
+ // because OUT endpoint is already free and ZLP OUT accepted.
+ cpu_irq_restore(flags);
+}
+
+
+static void udd_ctrl_out_received(void)
+{
+ irqflags_t flags;
+ uint16_t nb_data;
+
+ if (UDD_EPCTRL_DATA_OUT != udd_ep_control_state) {
+ if ((UDD_EPCTRL_DATA_IN == udd_ep_control_state)
+ || (UDD_EPCTRL_HANDSHAKE_WAIT_OUT_ZLP ==
+ udd_ep_control_state)) {
+ // End of SETUP request:
+ // - Data IN Phase aborted,
+ // - or last Data IN Phase hidden by ZLP OUT sending quiclky,
+ // - or ZLP OUT received normaly.
+ udd_ctrl_endofrequest();
+ } else {
+ // Protocol error during SETUP request
+ udd_ctrl_stall_data();
+ }
+ // Reinitializes control endpoint management
+ udd_ctrl_init();
+ return;
+ }
+ // Read data received during OUT phase
+ nb_data = udd_udesc_get_buf0_ctn(0);
+ if (udd_g_ctrlreq.payload_size < (udd_ctrl_payload_nb_trans + nb_data)) {
+ // Payload buffer too small
+ nb_data = udd_g_ctrlreq.payload_size -
+ udd_ctrl_payload_nb_trans;
+ }
+
+ memcpy((uint8_t *) (udd_g_ctrlreq.payload + udd_ctrl_payload_nb_trans),
+ udd_ctrl_buffer, nb_data);
+ udd_ctrl_payload_nb_trans += nb_data;
+
+ if ((USB_DEVICE_EP_CTRL_SIZE != nb_data)
+ || (udd_g_ctrlreq.req.wLength <=
+ (udd_ctrl_prev_payload_nb_trans +
+ udd_ctrl_payload_nb_trans)))
+ {
+ // End of reception because it is a short packet
+ // Before send ZLP, call intermediat calback
+ // in case of data receiv generate a stall
+ udd_g_ctrlreq.payload_size = udd_ctrl_payload_nb_trans;
+ if (NULL != udd_g_ctrlreq.over_under_run) {
+ if (!udd_g_ctrlreq.over_under_run()) {
+ // Stall ZLP
+ udd_ctrl_stall_data();
+ // Ack reception of OUT to replace NAK by a STALL
+ udd_ack_out_received(0);
+ return;
+ }
+ }
+ // Send IN ZLP to ACK setup request
+ udd_ack_out_received(0);
+ udd_ctrl_send_zlp_in();
+ return;
+ }
+
+ if (udd_g_ctrlreq.payload_size == udd_ctrl_payload_nb_trans) {
+ // Overrun then request a new payload buffer
+ if (!udd_g_ctrlreq.over_under_run) {
+ // No callback availabled to request a new payload buffer
+ udd_ctrl_stall_data();
+ // Ack reception of OUT to replace NAK by a STALL
+ udd_ack_out_received(0);
+ return;
+ }
+ if (!udd_g_ctrlreq.over_under_run()) {
+ // No new payload buffer delivered
+ udd_ctrl_stall_data();
+ // Ack reception of OUT to replace NAK by a STALL
+ udd_ack_out_received(0);
+ return;
+ }
+ // New payload buffer available
+ // Update number of total data received
+ udd_ctrl_prev_payload_nb_trans += udd_ctrl_payload_nb_trans;
+ // Reinit reception on payload buffer
+ udd_ctrl_payload_nb_trans = 0;
+ }
+ // Free buffer of control endpoint to authorize next reception
+ udd_ack_out_received(0);
+ // To detect a protocol error, enable nak interrupt on data IN phase
+ udd_ack_nak_in(0);
+ flags = cpu_irq_save();
+ udd_enable_nak_in_interrupt(0);
+ cpu_irq_restore(flags);
+}
+
+
+static void udd_ctrl_underflow(void)
+{
+ if (Is_udd_out_received(0))
+ return; // underflow ignored if OUT data is received
+
+ if (UDD_EPCTRL_DATA_OUT == udd_ep_control_state) {
+ // Host want to stop OUT transaction
+ // then stop to wait OUT data phase and wait IN ZLP handshake
+ udd_ctrl_send_zlp_in();
+ } else if (UDD_EPCTRL_HANDSHAKE_WAIT_OUT_ZLP == udd_ep_control_state) {
+ // A OUT handshake is waiting by device,
+ // but host want extra IN data then stall extra IN data
+ udd_enable_stall_handshake(0);
+ }
+}
+
+
+static void udd_ctrl_overflow(void)
+{
+ if (Is_udd_in_send(0))
+ return; // overflow ignored if IN data is received
+
+ // The case of UDD_EPCTRL_DATA_IN is not managed
+ // because the OUT endpoint is already free and OUT ZLP accepted
+
+ if (UDD_EPCTRL_HANDSHAKE_WAIT_IN_ZLP == udd_ep_control_state) {
+ // A IN handshake is waiting by device,
+ // but host want extra OUT data then stall extra OUT data
+ udd_enable_stall_handshake(0);
+ }
+}
+
+
+static void udd_ctrl_stall_data(void)
+{
+ // Stall all packets on IN & OUT control endpoint
+ udd_ep_control_state = UDD_EPCTRL_STALL_REQ;
+ udd_enable_stall_handshake(0);
+}
+
+
+static void udd_ctrl_send_zlp_in(void)
+{
+ irqflags_t flags;
+
+ udd_ep_control_state = UDD_EPCTRL_HANDSHAKE_WAIT_IN_ZLP;
+ // Validate and send empty IN packet on control endpoint
+ udd_udesc_rst_buf0_ctn(0);
+
+ flags = cpu_irq_save();
+ // Send ZLP on IN endpoint
+ udd_ack_in_send(0);
+ udd_enable_in_send_interrupt(0);
+ // To detect a protocol error, enable nak interrupt on data OUT phase
+ udd_ack_nak_out(0);
+ udd_enable_nak_out_interrupt(0);
+ cpu_irq_restore(flags);
+}
+
+
+static void udd_ctrl_send_zlp_out(void)
+{
+ irqflags_t flags;
+
+ udd_ep_control_state = UDD_EPCTRL_HANDSHAKE_WAIT_OUT_ZLP;
+
+ // To detect a protocol error, enable nak interrupt on data IN phase
+ flags = cpu_irq_save();
+ udd_ack_nak_in(0);
+ udd_enable_nak_in_interrupt(0);
+ cpu_irq_restore(flags);
+}
+
+
+static void udd_ctrl_endofrequest(void)
+{
+ // If a callback is registered then call it
+ if (udd_g_ctrlreq.callback) {
+ udd_g_ctrlreq.callback();
+ }
+}
+
+
+static bool udd_ctrl_interrupt(void)
+{
+ if (!Is_udd_endpoint_interrupt(0))
+ return false; // No interrupt events on control endpoint
+
+ // By default disable overflow and underflow interrupt
+ udd_disable_nak_in_interrupt(0);
+ udd_disable_nak_out_interrupt(0);
+
+ // Search event on control endpoint
+ if (Is_udd_setup_received(0)) {
+ // SETUP packet received
+ udd_ctrl_setup_received();
+ return true;
+ }
+ if (Is_udd_out_received(0)) {
+ // OUT packet received
+ udd_ctrl_out_received();
+ return true;
+ }
+ if (Is_udd_in_send(0) && Is_udd_in_send_interrupt_enabled(0)) {
+ // IN packet sent
+ udd_ctrl_in_sent();
+ return true;
+ }
+ if (Is_udd_nak_out(0)) {
+ // Overflow on OUT packet
+ udd_ack_nak_out(0);
+ udd_ctrl_overflow();
+ return true;
+ }
+ if (Is_udd_nak_in(0)) {
+ // Underflow on IN packet
+ udd_ack_nak_in(0);
+ udd_ctrl_underflow();
+ return true;
+ }
+ return false;
+}
+
+
+//--------------------------------------------------------
+//--- INTERNAL ROUTINES TO MANAGED THE BULK/INTERRUPT/ISOCHRONOUS ENDPOINTS
+
+#if (0!=USB_DEVICE_MAX_EP)
+
+static void udd_ep_finish_job(udd_ep_id_t ep, bool b_abort)
+{
+ udd_ep_job_t *ptr_job;
+ uint16_t ep_size;
+ irqflags_t flags;
+
+ // Get job corresponding at endpoint
+ ptr_job = &udd_ep_job[ep - 1];
+
+ // Test if a pending transfer is running. If not, disabled interrupt.
+ if (!ptr_job->busy) {
+ flags = cpu_irq_save();
+ udd_disable_endpoint_interrupt(ep);
+ cpu_irq_restore(flags);
+ return;
+ }
+
+ if (Is_udd_endpoint_in(ep)) {
+ // Update number of data transfered
+ ptr_job->nb_trans = udd_udesc_get_buf0_size(ep);
+ if (0 == ptr_job->nb_trans) {
+ if (0 == udd_nb_busy_bank(ep)) {
+ // All byte are transfered than take nb byte requested
+ ptr_job->nb_trans = udd_udesc_get_buf0_ctn(ep);
+ }
+ }
+ } else {
+ // Transfer complete on OUT
+ ep_size = udd_format_endpoint_size(ep);
+ if (ptr_job->b_use_out_cache_buffer) {
+ // Copy data receiv from cache buffer to user buffer
+ memcpy(&ptr_job->buf[ptr_job->nb_trans],
+ udd_ep_out_cache_buffer[ep - 1],
+ ptr_job->buf_size % ep_size);
+ ptr_job->nb_trans += udd_udesc_get_buf0_ctn(ep);
+ } else {
+ ptr_job->nb_trans = udd_udesc_get_buf0_ctn(ep);
+ // If all previous data requested are received
+ // and user buffer not full
+ if ((ptr_job->nb_trans == udd_udesc_get_buf0_size(ep))
+ && (ptr_job->nb_trans !=
+ ptr_job->buf_size)) {
+ // Use the cache buffer to receiv last data
+ // which can be more larger than user buffer remaining
+ ptr_job->b_use_out_cache_buffer = true;
+ udd_udesc_rst_buf0_ctn(ep);
+ udd_udesc_set_buf0_addr(ep,
+ udd_ep_out_cache_buffer[ep -
+ 1]);
+ udd_udesc_set_buf0_size(ep, ep_size);
+ // Free buffer to accept another data to reception
+ udd_ack_out_received(ep);
+ udd_ack_fifocon(ep);
+ return;
+ }
+ }
+ // Free buffer but not accept another data to reception
+ udd_ack_out_received(ep);
+ udd_enable_busy_bank0(ep);
+ udd_ack_fifocon(ep);
+ }
+
+ // Call callback to signal end of transfer
+ flags = cpu_irq_save();
+ udd_disable_endpoint_interrupt(ep);
+ cpu_irq_restore(flags);
+
+ ptr_job->busy = false;
+ if (NULL == ptr_job->call_trans)
+ return; // No callback linked to job
+ ptr_job->call_trans((b_abort) ? UDD_EP_TRANSFER_ABORT :
+ UDD_EP_TRANSFER_OK, ptr_job->nb_trans);
+}
+
+
+static bool udd_ep_interrupt(void)
+{
+ udd_ep_id_t ep;
+
+ // For each endpoint different of control endpoint (0)
+ for (ep = 1; ep <= USB_DEVICE_MAX_EP; ep++) {
+ if (!Is_udd_endpoint_interrupt_enabled(ep) || !Is_udd_endpoint_interrupt(ep)) {
+ continue;
+ }
+ udd_ep_finish_job(ep, false);
+ return true;
+ }
+ return false;
+}
+#endif // (0!=USB_DEVICE_MAX_EP)
+
+//@}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/drivers/usbc/usbc_device.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/drivers/usbc/usbc_device.h
new file mode 100644
index 0000000..9f348f3
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/drivers/usbc/usbc_device.h
@@ -0,0 +1,577 @@
+/**
+ * \file
+ *
+ * \brief USBC Device Driver header file.
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _USBC_DEVICE_H_
+#define _USBC_DEVICE_H_
+
+#include "compiler.h"
+#include "preprocessor.h"
+
+
+//! \ingroup usb_device_group
+//! \defgroup udd_group USB Device Driver (UDD)
+//! USBC low-level driver for USB Device mode
+//!
+//! @warning Bit-masks are used instead of bit-fields because PB registers
+//! require 32-bit write accesses while AVR32-GCC 4.0.2 builds 8-bit
+//! accesses even when volatile unsigned int bit-fields are specified.
+//! @{
+
+//! @name USBC Device IP properties
+//! These macros give access to IP properties
+//! @{
+ //! Get maximal number of endpoints
+#define UDD_get_endpoint_max_nbr() (((Rd_bitfield(AVR32_USBC_ufeatures, AVR32_USBC_UFEATURES_EPT_NBR_MAX_MASK) - 1) & ((1 << AVR32_USBC_UFEATURES_EPT_NBR_MAX_SIZE) - 1)) + 1)
+//! @}
+
+//! @name USBC Device speeds management
+//! @{
+ //! Enable/disable device low-speed mode
+#define udd_low_speed_enable() (Set_bits(AVR32_USBC.udcon, AVR32_USBC_UDCON_LS_MASK))
+#define udd_low_speed_disable() (Clr_bits(AVR32_USBC.udcon, AVR32_USBC_UDCON_LS_MASK))
+ //! Test if device low-speed mode is forced
+#define Is_udd_low_speed_enable() (Tst_bits(AVR32_USBC.udcon, AVR32_USBC_UDCON_LS_MASK))
+
+#ifdef AVR32_USBC_UDCON_SPDCONF
+ //! Enable high speed mode
+# define udd_high_speed_enable() (Wr_bitfield(AVR32_USBC.udcon, AVR32_USBC_UDCON_SPDCONF_MASK, 0))
+ //! Disable high speed mode
+# define udd_high_speed_disable() (Wr_bitfield(AVR32_USBC.udcon, AVR32_USBC_UDCON_SPDCONF_MASK, 3))
+ //! Test if controller is in full speed mode
+# define Is_udd_full_speed_mode() (Rd_bitfield(AVR32_USBC.usbsta, AVR32_USBC_USBSTA_SPEED_MASK) == AVR32_USBC_USBSTA_SPEED_FULL)
+#else
+# define udd_high_speed_enable() do { } while (0)
+# define udd_high_speed_disable() do { } while (0)
+# define Is_udd_full_speed_mode() TRUE
+#endif
+//! @}
+
+//! @name USBC Device HS test mode management
+//! @{
+#ifdef AVR32_USBC_UDCON_SPDCONF
+ //! Enable high speed test mode
+# define udd_enable_hs_test_mode() (Wr_bitfield(AVR32_USBC.udcon, AVR32_USBC_UDCON_SPDCONF_MASK, 2))
+# define udd_enable_hs_test_mode_j() (Set_bits(AVR32_USBC.udcon, AVR32_USBC_UDCON_TSTJ_MASK))
+# define udd_enable_hs_test_mode_k() (Set_bits(AVR32_USBC.udcon, AVR32_USBC_UDCON_TSTK_MASK))
+# define udd_enable_hs_test_mode_packet() (Set_bits(AVR32_USBC.udcon, AVR32_USBC_UDCON_TSTPCKT_MASK))
+#endif
+//! @}
+
+//! @name USBC Device vbus management
+//! @{
+#define udd_enable_vbus_interrupt() (Set_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_VBUSTE_MASK))
+#define udd_disable_vbus_interrupt() (Clr_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_VBUSTE_MASK))
+#define Is_udd_vbus_interrupt_enabled() (Tst_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_VBUSTE_MASK))
+#define Is_udd_vbus_high() (Tst_bits(AVR32_USBC.usbsta, AVR32_USBC_USBSTA_VBUS_MASK))
+#define Is_udd_vbus_low() (!Is_udd_vbus_high())
+#define udd_ack_vbus_transition() (AVR32_USBC.usbstaclr = AVR32_USBC_USBSTACLR_VBUSTIC_MASK)
+#define udd_raise_vbus_transition() (AVR32_USBC.usbstaset = AVR32_USBC_USBSTASET_VBUSTIS_MASK)
+#define Is_udd_vbus_transition() (Tst_bits(AVR32_USBC.usbsta, AVR32_USBC_USBSTA_VBUSTI_MASK))
+//! @}
+
+
+//! @name USBC device attach control
+//! These macros manage the USBC Device attach.
+//! @{
+ //! detaches from USB bus
+#define udd_detach_device() (Set_bits(AVR32_USBC.udcon, AVR32_USBC_UDCON_DETACH_MASK))
+ //! attaches to USB bus
+#define udd_attach_device() (Clr_bits(AVR32_USBC.udcon, AVR32_USBC_UDCON_DETACH_MASK))
+ //! test if the device is detached
+#define Is_udd_detached() (Tst_bits(AVR32_USBC.udcon, AVR32_USBC_UDCON_DETACH_MASK))
+//! @}
+
+
+//! @name USBC device bus events control
+//! These macros manage the USBC Device bus events.
+//! @{
+
+//! Initiates a remote wake-up event
+//! @{
+#define udd_initiate_remote_wake_up() (Set_bits(AVR32_USBC.udcon, AVR32_USBC_UDCON_RMWKUP_MASK))
+#define Is_udd_pending_remote_wake_up() (Tst_bits(AVR32_USBC.udcon, AVR32_USBC_UDCON_RMWKUP_MASK))
+//! @}
+
+//! Manage upstream resume event (=remote wakeup)
+//! The USB driver sends a resume signal called "Upstream Resume"
+//! @{
+#define udd_enable_remote_wake_up_interrupt() (AVR32_USBC.udinteset = AVR32_USBC_UDINTESET_UPRSMES_MASK)
+#define udd_disable_remote_wake_up_interrupt() (AVR32_USBC.udinteclr = AVR32_USBC_UDINTECLR_UPRSMEC_MASK)
+#define Is_udd_remote_wake_up_interrupt_enabled() (Tst_bits(AVR32_USBC.udinte, AVR32_USBC_UDINTE_UPRSME_MASK))
+#define udd_ack_remote_wake_up_start() (AVR32_USBC.udintclr = AVR32_USBC_UDINTCLR_UPRSMC_MASK)
+#define udd_raise_remote_wake_up_start() (AVR32_USBC.udintset = AVR32_USBC_UDINTSET_UPRSMS_MASK)
+#define Is_udd_remote_wake_up_start() (Tst_bits(AVR32_USBC.udint, AVR32_USBC_UDINT_UPRSM_MASK))
+//! @}
+
+//! Manage end of resume event (=remote wakeup)
+//! The USB controller detects a valid "End of Resume" signal initiated by the host
+//! @{
+#define udd_enable_resume_interrupt() (AVR32_USBC.udinteset = AVR32_USBC_UDINTESET_EORSMES_MASK)
+#define udd_disable_resume_interrupt() (AVR32_USBC.udinteclr = AVR32_USBC_UDINTECLR_EORSMEC_MASK)
+#define Is_udd_resume_interrupt_enabled() (Tst_bits(AVR32_USBC.udinte, AVR32_USBC_UDINTE_EORSME_MASK))
+#define udd_ack_resume() (AVR32_USBC.udintclr = AVR32_USBC_UDINTCLR_EORSMC_MASK)
+#define udd_raise_resume() (AVR32_USBC.udintset = AVR32_USBC_UDINTSET_EORSMS_MASK)
+#define Is_udd_resume() (Tst_bits(AVR32_USBC.udint, AVR32_USBC_UDINT_EORSM_MASK))
+//! @}
+
+//! Manage wake-up event (=usb line activity)
+//! The USB controller is reactivated by a filtered non-idle signal from the lines
+//! @{
+#define udd_enable_wake_up_interrupt() (AVR32_USBC.udinteset = AVR32_USBC_UDINTESET_WAKEUPES_MASK)
+#define udd_disable_wake_up_interrupt() (AVR32_USBC.udinteclr = AVR32_USBC_UDINTECLR_WAKEUPEC_MASK)
+#define Is_udd_wake_up_interrupt_enabled() (Tst_bits(AVR32_USBC.udinte, AVR32_USBC_UDINTE_WAKEUPE_MASK))
+#define udd_ack_wake_up() (AVR32_USBC.udintclr = AVR32_USBC_UDINTCLR_WAKEUPC_MASK)
+#define udd_raise_wake_up() (AVR32_USBC.udintset = AVR32_USBC_UDINTSET_WAKEUPS_MASK)
+#define Is_udd_wake_up() (Tst_bits(AVR32_USBC.udint, AVR32_USBC_UDINT_WAKEUP_MASK))
+//! @}
+
+//! Manage reset event
+//! Set when a USB "End of Reset" has been detected
+//! @{
+#define udd_enable_reset_interrupt() (AVR32_USBC.udinteset = AVR32_USBC_UDINTESET_EORSTES_MASK)
+#define udd_disable_reset_interrupt() (AVR32_USBC.udinteclr = AVR32_USBC_UDINTECLR_EORSTEC_MASK)
+#define Is_udd_reset_interrupt_enabled() (Tst_bits(AVR32_USBC.udinte, AVR32_USBC_UDINTE_EORSTE_MASK))
+#define udd_ack_reset() (AVR32_USBC.udintclr = AVR32_USBC_UDINTCLR_EORSTC_MASK)
+#define udd_raise_reset() (AVR32_USBC.udintset = AVR32_USBC_UDINTSET_EORSTS_MASK)
+#define Is_udd_reset() (Tst_bits(AVR32_USBC.udint, AVR32_USBC_UDINT_EORST_MASK))
+//! @}
+
+//! Manage sart of frame event
+//! @{
+#define udd_enable_sof_interrupt() (AVR32_USBC.udinteset = AVR32_USBC_UDINTESET_SOFES_MASK)
+#define udd_disable_sof_interrupt() (AVR32_USBC.udinteclr = AVR32_USBC_UDINTECLR_SOFEC_MASK)
+#define Is_udd_sof_interrupt_enabled() (Tst_bits(AVR32_USBC.udinte, AVR32_USBC_UDINTE_SOFE_MASK))
+#define udd_ack_sof() (AVR32_USBC.udintclr = AVR32_USBC_UDINTCLR_SOFC_MASK)
+#define udd_raise_sof() (AVR32_USBC.udintset = AVR32_USBC_UDINTSET_SOFS_MASK)
+#define Is_udd_sof() (Tst_bits(AVR32_USBC.udint, AVR32_USBC_UDINT_SOF_MASK))
+#define udd_frame_number() (Rd_bitfield(AVR32_USBC.udfnum, AVR32_USBC_UDFNUM_FNUM_MASK))
+#define Is_udd_frame_number_crc_error() (Tst_bits(AVR32_USBC.udfnum, AVR32_USBC_UDFNUM_FNCERR_MASK))
+//! @}
+
+//! Manage suspend event
+//! @{
+#define udd_enable_suspend_interrupt() (AVR32_USBC.udinteset = AVR32_USBC_UDINTESET_SUSPES_MASK)
+#define udd_disable_suspend_interrupt() (AVR32_USBC.udinteclr = AVR32_USBC_UDINTECLR_SUSPEC_MASK)
+#define Is_udd_suspend_interrupt_enabled() (Tst_bits(AVR32_USBC.udinte, AVR32_USBC_UDINTE_SUSPE_MASK))
+#define udd_ack_suspend() (AVR32_USBC.udintclr = AVR32_USBC_UDINTCLR_SUSPC_MASK)
+#define udd_raise_suspend() (AVR32_USBC.udintset = AVR32_USBC_UDINTSET_SUSPS_MASK)
+#define Is_udd_suspend() (Tst_bits(AVR32_USBC.udint, AVR32_USBC_UDINT_SUSP_MASK))
+//! @}
+
+//! @}
+
+//! @name USBC device address control
+//! These macros manage the USBC Device address.
+//! @{
+ //! enables USB device address
+#define udd_enable_address() (Set_bits(AVR32_USBC.udcon, AVR32_USBC_UDCON_ADDEN_MASK))
+ //! disables USB device address
+#define udd_disable_address() (Clr_bits(AVR32_USBC.udcon, AVR32_USBC_UDCON_ADDEN_MASK))
+#define Is_udd_address_enabled() (Tst_bits(AVR32_USBC.udcon, AVR32_USBC_UDCON_ADDEN_MASK))
+ //! configures the USB device address
+#define udd_configure_address(addr) (Wr_bitfield(AVR32_USBC.udcon, AVR32_USBC_UDCON_UADD_MASK, addr))
+ //! gets the currently configured USB device address
+#define udd_get_configured_address() (Rd_bitfield(AVR32_USBC.udcon, AVR32_USBC_UDCON_UADD_MASK))
+//! @}
+
+
+//! @name USBC Device endpoint drivers
+//! These macros manage the common features of the endpoints.
+//! @{
+
+//! Generic macro for USBC registers that can be arrayed
+//! @{
+#define USBC_ARRAY(reg,index) ((&AVR32_USBC.reg)[(index)])
+//! @}
+
+//! @name USBC Devcice endpoint configguration
+//! @{
+ //! enables the selected endpoint
+#define udd_enable_endpoint(ep) (Set_bits(AVR32_USBC.uerst, AVR32_USBC_UERST_EPEN0_MASK << (ep)))
+ //! disables the selected endpoint
+#define udd_disable_endpoint(ep) (Clr_bits(AVR32_USBC.uerst, AVR32_USBC_UERST_EPEN0_MASK << (ep)))
+ //! tests if the selected endpoint is enabled
+#define Is_udd_endpoint_enabled(ep) (Tst_bits(AVR32_USBC.uerst, AVR32_USBC_UERST_EPEN0_MASK << (ep)))
+ //! resets the selected endpoint
+#define udd_reset_endpoint(ep) (Set_bits(AVR32_USBC.uerst, AVR32_USBC_UERST_EPRST0_MASK << (ep)),\
+ Clr_bits(AVR32_USBC.uerst, AVR32_USBC_UERST_EPRST0_MASK << (ep)))
+ //! tests if the selected endpoint is being reset
+#define Is_udd_resetting_endpoint(ep) (Tst_bits(AVR32_USBC.uerst, AVR32_USBC_UERST_EPRST0_MASK << (ep)))
+
+ //! configures the selected endpoint type
+#define udd_configure_endpoint_type(ep, type) (Wr_bitfield(USBC_ARRAY(uecfg0,ep), AVR32_USBC_UECFG0_EPTYPE_MASK, type))
+ //! gets the configured selected endpoint type
+#define udd_get_endpoint_type(ep) ((Rd_bitfield(USBC_ARRAY(uecfg0,ep), AVR32_USBC_UECFG0_EPTYPE_MASK))>>AVR32_USBC_UECFG0_EPTYPE_OFFSET)
+ //! enables the bank autoswitch for the selected endpoint
+//#define udd_enable_endpoint_bank_autoswitch(ep) (Set_bits(USBC_ARRAY(uecfg0,ep), AVR32_USBC_UECFG0_AUTOSW_MASK))
+ //! disables the bank autoswitch for the selected endpoint
+//#define udd_disable_endpoint_bank_autoswitch(ep) (Clr_bits(USBC_ARRAY(uecfg0,ep), AVR32_USBC_UECFG0_AUTOSW_MASK))
+//#define Is_udd_endpoint_bank_autoswitch_enabled(ep) (Tst_bits(USBC_ARRAY(uecfg0,ep), AVR32_USBC_UECFG0_AUTOSW_MASK))
+ //! configures the selected endpoint direction
+#define udd_configure_endpoint_direction(ep, dir) (Wr_bitfield(USBC_ARRAY(uecfg0,ep), AVR32_USBC_UECFG0_EPDIR_MASK, dir))
+ //! gets the configured selected endpoint direction
+#define udd_get_endpoint_direction(ep) (Rd_bitfield(USBC_ARRAY(uecfg0,ep), AVR32_USBC_UECFG0_EPDIR_MASK))
+#define Is_udd_endpoint_in(ep) (Tst_bits(USBC_ARRAY(uecfg0,ep), AVR32_USBC_UECFG0_EPDIR_MASK))
+ //! Bounds given integer size to allowed range and rounds it up to the nearest
+ //! available greater size, then applies register format of USBC controller
+ //! for endpoint size bit-field.
+#define udd_format_endpoint_size(size) (32 - clz(((uint32_t)min(max(size, 8), 1024) << 1) - 1) - 1 - 3)
+ //! configures the selected endpoint size
+#define udd_configure_endpoint_size(ep, size) (Wr_bitfield(USBC_ARRAY(uecfg0,ep), AVR32_USBC_UECFG0_EPSIZE_MASK, udd_format_endpoint_size(size)))
+ //! gets the configured selected endpoint size
+#define udd_get_endpoint_size(ep) (8 << Rd_bitfield(USBC_ARRAY(uecfg0,ep), AVR32_USBC_UECFG0_EPSIZE_MASK))
+ //! configures the selected endpoint number of banks
+#define udd_configure_endpoint_bank(ep, bank) (Wr_bitfield(USBC_ARRAY(uecfg0,ep), AVR32_USBC_UECFG0_EPBK_MASK, bank))
+ //! gets the configured selected endpoint number of banks
+#define udd_get_endpoint_bank(ep) (Rd_bitfield(USBC_ARRAY(uecfg0,ep), AVR32_USBC_UECFG0_EPBK_MASK))
+
+ //! configures selected endpoint in one step
+#define udd_configure_endpoint(ep, type, dir, size, bank) \
+(\
+ Wr_bits(USBC_ARRAY(uecfg0,ep), AVR32_USBC_UECFG0_EPTYPE_MASK |\
+ AVR32_USBC_UECFG0_EPDIR_MASK |\
+ AVR32_USBC_UECFG0_EPSIZE_MASK |\
+ AVR32_USBC_UECFG0_EPBK_MASK, \
+ (((uint32_t)(type) << AVR32_USBC_UECFG0_EPTYPE_OFFSET) & AVR32_USBC_UECFG0_EPTYPE_MASK) |\
+ (((uint32_t)(dir ) << AVR32_USBC_UECFG0_EPDIR_OFFSET ) & AVR32_USBC_UECFG0_EPDIR_MASK ) |\
+ ( (uint32_t)udd_format_endpoint_size(size) << AVR32_USBC_UECFG0_EPSIZE_OFFSET ) |\
+ (((uint32_t)(bank) << AVR32_USBC_UECFG0_EPBK_OFFSET ) & AVR32_USBC_UECFG0_EPBK_MASK ))\
+)
+//! returns the control direction
+#define udd_control_direction() (Rd_bitfield(USBC_ARRAY(uesta0(EP_CONTROL), AVR32_USBC_UESTA0_CTRLDIR_MASK))
+
+ //! resets the data toggle sequence
+#define udd_reset_data_toggle(ep) (USBC_ARRAY(uecon0set,ep) = AVR32_USBC_UECON0SET_RSTDTS_MASK)
+ //! tests if the data toggle sequence is being reset
+#define Is_udd_data_toggle_reset(ep) (Tst_bits(USBC_ARRAY(uecon0,ep), AVR32_USBC_UECON0_RSTDT_MASK))
+ //! returns data toggle
+#define udd_data_toggle(ep) (Rd_bitfield(USBC_ARRAY(uesta0,ep), AVR32_USBC_UESTA0_DTSEQ_MASK))
+//! @}
+
+
+//! @name USBC Device control endpoint
+//! These macros contorl the endpoints.
+//! @{
+
+//! @name USBC Device control endpoint interrupts
+//! These macros control the endpoints interrupts.
+//! @{
+ //! enables the selected endpoint interrupt
+#define udd_enable_endpoint_interrupt(ep) (AVR32_USBC.udinteset = AVR32_USBC_UDINTESET_EP0INTES_MASK << (ep))
+ //! disables the selected endpoint interrupt
+#define udd_disable_endpoint_interrupt(ep) (AVR32_USBC.udinteclr = AVR32_USBC_UDINTECLR_EP0INTEC_MASK << (ep))
+ //! tests if the selected endpoint interrupt is enabled
+#define Is_udd_endpoint_interrupt_enabled(ep) (Tst_bits(AVR32_USBC.udinte, AVR32_USBC_UDINTE_EP0INTE_MASK << (ep)))
+ //! tests if an interrupt is triggered by the selected endpoint
+#define Is_udd_endpoint_interrupt(ep) (Tst_bits(AVR32_USBC.udint, AVR32_USBC_UDINT_EP0INT_MASK << (ep)))
+ //! returns the lowest endpoint number generating an endpoint interrupt or MAX_PEP_NB if none
+#define udd_get_interrupt_endpoint_number() (ctz(((AVR32_USBC.udint >> AVR32_USBC_UDINT_EP0INT_OFFSET) &\
+ (AVR32_USBC.udinte >> AVR32_USBC_UDINTE_EP0INTE_OFFSET)) |\
+ (1 << MAX_PEP_NB)))
+//! @}
+
+//! @name USBC Device control endpoint errors
+//! These macros control the endpoint errors.
+//! @{
+ //! enables the STALL handshake
+#define udd_enable_stall_handshake(ep) (USBC_ARRAY(uecon0set,ep) = AVR32_USBC_UECON0SET_STALLRQS_MASK)
+ //! disables the STALL handshake
+#define udd_disable_stall_handshake(ep) (USBC_ARRAY(uecon0clr,ep) = AVR32_USBC_UECON0CLR_STALLRQC_MASK)
+ //! tests if STALL handshake request is running
+#define Is_udd_endpoint_stall_requested(ep) (Tst_bits(USBC_ARRAY(uecon0,ep), AVR32_USBC_UECON0_STALLRQ_MASK))
+ //! tests if STALL sent
+#define Is_udd_stall(ep) (Tst_bits(USBC_ARRAY(uesta0,ep), AVR32_USBC_UESTA0_STALLEDI_MASK))
+ //! acks STALL sent
+#define udd_ack_stall(ep) (USBC_ARRAY(uesta0clr,ep) = AVR32_USBC_UESTA0CLR_STALLEDIC_MASK)
+ //! raises STALL sent
+#define udd_raise_stall(ep) (USBC_ARRAY(uesta0set,ep) = AVR32_USBC_UESTA0SET_STALLEDIS_MASK)
+ //! enables STALL sent interrupt
+#define udd_enable_stall_interrupt(ep) (USBC_ARRAY(uecon0set,ep) = AVR32_USBC_UECON0SET_STALLEDES_MASK)
+ //! disables STALL sent interrupt
+#define udd_disable_stall_interrupt(ep) (USBC_ARRAY(uecon0clr,ep) = AVR32_USBC_UECON0CLR_STALLEDEC_MASK)
+ //! tests if STALL sent interrupt is enabled
+#define Is_udd_stall_interrupt_enabled(ep) (Tst_bits(USBC_ARRAY(uecon0,ep), AVR32_USBC_UECON0_STALLEDE_MASK))
+
+ //! tests if a RAM access error occur
+#define Is_udd_ram_access_error(ep) (Tst_bits(USBC_ARRAY(uesta0,ep), AVR32_USBC_UESTA0_RAMACCERI_MASK))
+
+ //! tests if NAK OUT received
+#define Is_udd_nak_out(ep) (Tst_bits(USBC_ARRAY(uesta0,ep), AVR32_USBC_UESTA0_NAKOUTI_MASK))
+ //! acks NAK OUT received
+#define udd_ack_nak_out(ep) (USBC_ARRAY(uesta0clr,ep) = AVR32_USBC_UESTA0CLR_NAKOUTIC_MASK)
+ //! raises NAK OUT received
+#define udd_raise_nak_out(ep) (USBC_ARRAY(uesta0set,ep) = AVR32_USBC_UESTA0SET_NAKOUTIS_MASK)
+ //! enables NAK OUT interrupt
+#define udd_enable_nak_out_interrupt(ep) (USBC_ARRAY(uecon0set,ep) = AVR32_USBC_UECON0SET_NAKOUTES_MASK)
+ //! disables NAK OUT interrupt
+#define udd_disable_nak_out_interrupt(ep) (USBC_ARRAY(uecon0clr,ep) = AVR32_USBC_UECON0CLR_NAKOUTEC_MASK)
+ //! tests if NAK OUT interrupt is enabled
+#define Is_udd_nak_out_interrupt_enabled(ep) (Tst_bits(USBC_ARRAY(uecon0,ep), AVR32_USBC_UECON0_NAKOUTE_MASK))
+
+ //! tests if NAK IN received
+#define Is_udd_nak_in(ep) (Tst_bits(USBC_ARRAY(uesta0,ep), AVR32_USBC_UESTA0_NAKINI_MASK))
+ //! acks NAK IN received
+#define udd_ack_nak_in(ep) (USBC_ARRAY(uesta0clr,ep) = AVR32_USBC_UESTA0CLR_NAKINIC_MASK)
+ //! raises NAK IN received
+#define udd_raise_nak_in(ep) (USBC_ARRAY(uesta0set,ep) = AVR32_USBC_UESTA0SET_NAKINIS_MASK)
+ //! enables NAK IN interrupt
+#define udd_enable_nak_in_interrupt(ep) (USBC_ARRAY(uecon0set,ep) = AVR32_USBC_UECON0SET_NAKINES_MASK)
+ //! disables NAK IN interrupt
+#define udd_disable_nak_in_interrupt(ep) (USBC_ARRAY(uecon0clr,ep) = AVR32_USBC_UECON0CLR_NAKINEC_MASK)
+ //! tests if NAK IN interrupt is enabled
+#define Is_udd_nak_in_interrupt_enabled(ep) (Tst_bits(USBC_ARRAY(uecon0,ep), AVR32_USBC_UECON0_NAKINE_MASK))
+
+ //! acks endpoint isochronous overflow interrupt
+#define udd_ack_overflow_interrupt(ep) (USBC_ARRAY(uesta0clr,ep) = AVR32_USBC_UESTA0CLR_OVERFIC_MASK)
+ //! raises endpoint isochronous overflow interrupt
+#define udd_raise_overflow_interrupt(ep) (USBC_ARRAY(uesta0set,ep) = AVR32_USBC_UESTA0SET_OVERFIS_MASK)
+ //! tests if an overflow occurs
+#define Is_udd_overflow(ep) (Tst_bits(USBC_ARRAY(uesta0,ep), AVR32_USBC_UESTA0_OVERFI_MASK))
+ //! enables overflow interrupt
+#define udd_enable_overflow_interrupt(ep) (USBC_ARRAY(uecon0set,ep) = AVR32_USBC_UECON0SET_OVERFES_MASK)
+ //! disables overflow interrupt
+#define udd_disable_overflow_interrupt(ep) (USBC_ARRAY(uecon0clr,ep) = AVR32_USBC_UECON0CLR_OVERFEC_MASK)
+ //! tests if overflow interrupt is enabled
+#define Is_udd_overflow_interrupt_enabled(ep) (Tst_bits(USBC_ARRAY(uecon0,ep), AVR32_USBC_UECON0_OVERFE_MASK))
+
+ //! acks endpoint isochronous underflow interrupt
+#define udd_ack_underflow_interrupt(ep) (USBC_ARRAY(uesta0clr,ep) = AVR32_USBC_UESTA0CLR_UNDERFIC_MASK)
+ //! raises endpoint isochronous underflow interrupt
+#define udd_raise_underflow_interrupt(ep) (USBC_ARRAY(uesta0set,ep) = AVR32_USBC_UESTA0SET_UNDERFIS_MASK)
+ //! tests if an underflow occurs
+#define Is_udd_underflow(ep) (Tst_bits(USBC_ARRAY(uesta0,ep), AVR32_USBC_UESTA0_UNDERFI_MASK))
+ //! enables underflow interrupt
+#define udd_enable_underflow_interrupt(ep) (USBC_ARRAY(uecon0set,ep) = AVR32_USBC_UECON0SET_RXSTPES_MASK)
+ //! disables underflow interrupt
+#define udd_disable_underflow_interrupt(ep) (USBC_ARRAY(uecon0clr,ep) = AVR32_USBC_UECON0CLR_RXSTPEC_MASK)
+ //! tests if underflow interrupt is enabled
+#define Is_udd_underflow_interrupt_enabled(ep) (Tst_bits(USBC_ARRAY(uecon0,ep), AVR32_USBC_UECON0_RXSTPE_MASK))
+
+ //! tests if CRC ERROR ISO OUT detected
+#define Is_udd_crc_error(ep) (Tst_bits(USBC_ARRAY(uesta0,ep), AVR32_USBC_UESTA0_STALLEDI_MASK))
+ //! acks CRC ERROR ISO OUT detected
+#define udd_ack_crc_error(ep) (USBC_ARRAY(uesta0clr,ep) = AVR32_USBC_UESTA0CLR_STALLEDIC_MASK)
+ //! raises CRC ERROR ISO OUT detected
+#define udd_raise_crc_error(ep) (USBC_ARRAY(uesta0set,ep) = AVR32_USBC_UESTA0SET_STALLEDIS_MASK)
+ //! enables CRC ERROR ISO OUT detected interrupt
+#define udd_enable_crc_error_interrupt(ep) (USBC_ARRAY(uecon0set,ep) = AVR32_USBC_UECON0SET_STALLEDES_MASK)
+ //! disables CRC ERROR ISO OUT detected interrupt
+#define udd_disable_crc_error_interrupt(ep) (USBC_ARRAY(uecon0clr,ep) = AVR32_USBC_UECON0CLR_STALLEDEC_MASK)
+ //! tests if CRC ERROR ISO OUT detected interrupt is enabled
+#define Is_udd_crc_error_interrupt_enabled(ep) (Tst_bits(USBC_ARRAY(uecon0,ep), AVR32_USBC_UECON0_STALLEDE_MASK))
+//! @}
+
+//! @name USBC Device control endpoint banks
+//! These macros control the endpoint banks.
+//! @{
+
+ //! tests if endpoint read allowed
+//#define Is_udd_read_enabled(ep) (Tst_bits(USBC_ARRAY(uesta0,ep), AVR32_USBC_UESTA0_RWALL_MASK))
+ //! tests if endpoint write allowed
+//#define Is_udd_write_enabled(ep) (Tst_bits(USBC_ARRAY(uesta0,ep), AVR32_USBC_UESTA0_RWALL_MASK))
+
+ //! clears FIFOCON bit
+#define udd_ack_fifocon(ep) (USBC_ARRAY(uecon0clr,ep) = AVR32_USBC_UECON0CLR_FIFOCONC_MASK)
+ //! tests if FIFOCON bit set
+#define Is_udd_fifocon(ep) (Tst_bits(USBC_ARRAY(uecon0,ep), AVR32_USBC_UECON0_FIFOCON_MASK))
+
+ //! Enable NYET
+#define udd_disable_nyet(ep) (USBC_ARRAY(uecon0set,ep) = AVR32_USBC_UECON0SET_NYETDISS_MASK)
+ //! Disable NYET
+#define udd_enable_nyet(ep) (USBC_ARRAY(uecon0clr,ep) = AVR32_USBC_UECON0CLR_NYETDISC_MASK)
+
+//! Enable busy on bank0
+#define udd_enable_busy_bank0(ep) (USBC_ARRAY(uecon0set,ep) = AVR32_USBC_UECON0SET_BUSY0S_MASK)
+ //! Disable busy on bank0
+#define udd_disable_busy_bank0(ep) (USBC_ARRAY(uecon0clr,ep) = AVR32_USBC_UECON0CLR_BUSY0C_MASK)
+ //! Enable busy on bank1
+#define udd_enable_busy_bank1(ep) (USBC_ARRAY(uecon0set,ep) = AVR32_USBC_UECON0SET_BUSY1S_MASK)
+ //! Disable busy on bank1
+#define udd_disable_busy_bank1(ep) (USBC_ARRAY(uecon0clr,ep) = AVR32_USBC_UECON0CLR_BUSY1C_MASK)
+
+ //! returns the number of busy banks
+#define udd_nb_busy_bank(ep) (Rd_bitfield(USBC_ARRAY(uesta0,ep), AVR32_USBC_UESTA0_NBUSYBK_MASK))
+ //! returns the number of the current bank
+#define udd_current_bank(ep) (Rd_bitfield(USBC_ARRAY(uesta0,ep), AVR32_USBC_UESTA0_CURRBK_MASK))
+
+ //! kills last bank
+#define udd_kill_last_in_bank(ep) (USBC_ARRAY(uecon0set,ep) = AVR32_USBC_UECON0SET_KILLBKS_MASK)
+ //! tests if last bank killed
+#define Is_udd_last_in_bank_killed(ep) (Tst_bits(USBC_ARRAY(uecon0,ep), AVR32_USBC_UECON0_KILLBK_MASK))
+ //! forces all banks full (OUT) or free (IN) interrupt
+#define udd_force_bank_interrupt(ep) (USBC_ARRAY(uesta0set,ep) = AVR32_USBC_UESTA0SET_NBUSYBKS_MASK)
+ //! unforces all banks full (OUT) or free (IN) interrupt
+#define udd_unforce_bank_interrupt(ep) (USBC_ARRAY(uesta0set,ep) = AVR32_USBC_UESTA0SET_NBUSYBKS_MASK)
+ //! enables all banks full (OUT) or free (IN) interrupt
+#define udd_enable_bank_interrupt(ep) (USBC_ARRAY(uecon0set,ep) = AVR32_USBC_UECON0SET_NBUSYBKES_MASK)
+ //! disables all banks full (OUT) or free (IN) interrupt
+#define udd_disable_bank_interrupt(ep) (USBC_ARRAY(uecon0clr,ep) = AVR32_USBC_UECON0CLR_NBUSYBKEC_MASK)
+ //! tests if all banks full (OUT) or free (IN) interrupt enabled
+#define Is_udd_bank_interrupt_enabled(ep) (Tst_bits(USBC_ARRAY(uecon0,ep), AVR32_USBC_UECON0_NBUSYBKE_MASK))
+
+ //! tests if SHORT PACKET received
+#define Is_udd_short_packet(ep) (Tst_bits(USBC_ARRAY(uesta0,ep), AVR32_USBC_UESTA0_SHORTPACKETI_MASK))
+ //! acks SHORT PACKET received
+#define udd_ack_short_packet(ep) (USBC_ARRAY(uesta0clr,ep) = AVR32_USBC_UESTA0CLR_SHORTPACKETIC_MASK)
+ //! raises SHORT PACKET received
+#define udd_raise_short_packet(ep) (USBC_ARRAY(uesta0set,ep) = AVR32_USBC_UESTA0SET_SHORTPACKETIS_MASK)
+ //! enables SHORT PACKET received interrupt
+#define udd_enable_short_packet_interrupt(ep) (USBC_ARRAY(uecon0set,ep) = AVR32_USBC_UECON0SET_SHORTPACKETES_MASK)
+ //! disables SHORT PACKET received interrupt
+#define udd_disable_short_packet_interrupt(ep) (USBC_ARRAY(uecon0clr,ep) = AVR32_USBC_UECON0CLR_SHORTPACKETEC_MASK)
+ //! tests if SHORT PACKET received interrupt is enabled
+#define Is_udd_short_packet_interrupt_enabled(ep) (Tst_bits(USBC_ARRAY(uecon0,ep), AVR32_USBC_UECON0_SHORTPACKETE_MASK))
+
+//! @}
+
+//! @name USBC Device control endpoint transfer
+//! These macros control the endpoint transfers.
+//! @{
+
+ //! tests if SETUP received
+#define Is_udd_setup_received(ep) (Tst_bits(USBC_ARRAY(uesta0,ep), AVR32_USBC_UESTA0_RXSTPI_MASK))
+ //! acks SETUP received
+#define udd_ack_setup_received(ep) ((USBC_ARRAY(uesta0clr,ep) = AVR32_USBC_UESTA0CLR_RXSTPIC_MASK))
+ //! raises SETUP received
+#define udd_raise_setup_received(ep) (USBC_ARRAY(uesta0set,ep) = AVR32_USBC_UESTA0SET_RXSTPIS_MASK)
+ //! enables SETUP received interrupt
+#define udd_enable_setup_received_interrupt(ep) (USBC_ARRAY(uecon0set,ep) = AVR32_USBC_UECON0SET_RXSTPES_MASK)
+ //! disables SETUP received interrupt
+#define udd_disable_setup_received_interrupt() (USBC_ARRAY(uecon0clr(EP_CONTROL) = AVR32_USBC_UECON0CLR_RXSTPEC_MASK)
+ //! tests if SETUP received interrupt is enabled
+#define Is_udd_setup_received_interrupt_enabled(ep) (Tst_bits(USBC_ARRAY(uecon0,ep), AVR32_USBC_UECON0_RXSTPE_MASK))
+
+ //! tests if OUT received
+#define Is_udd_out_received(ep) (Tst_bits(USBC_ARRAY(uesta0,ep), AVR32_USBC_UESTA0_RXOUTI_MASK))
+ //! acks OUT received
+#define udd_ack_out_received(ep) ((USBC_ARRAY(uesta0clr,ep) = AVR32_USBC_UESTA0CLR_RXOUTIC_MASK))
+ //! raises OUT received
+#define udd_raise_out_received(ep) (USBC_ARRAY(uesta0set,ep) = AVR32_USBC_UESTA0SET_RXOUTIS_MASK)
+ //! enables OUT received interrupt
+#define udd_enable_out_received_interrupt(ep) (USBC_ARRAY(uecon0set,ep) = AVR32_USBC_UECON0SET_RXOUTES_MASK)
+ //! disables OUT received interrupt
+#define udd_disable_out_received_interrupt(ep) (USBC_ARRAY(uecon0clr,ep) = AVR32_USBC_UECON0CLR_RXOUTEC_MASK)
+ //! tests if OUT received interrupt is enabled
+#define Is_udd_out_received_interrupt_enabled(ep) (Tst_bits(USBC_ARRAY(uecon0,ep), AVR32_USBC_UECON0_RXOUTE_MASK))
+
+ //! tests if IN sending
+#define Is_udd_in_send(ep) (Tst_bits(USBC_ARRAY(uesta0,ep), AVR32_USBC_UESTA0_TXINI_MASK))
+ //! acks IN sending
+//#define udd_ack_in_send(ep) ((USBC_ARRAY(uesta0clr,ep) = AVR32_USBC_UESTA0CLR_TXINIC_MASK), Usb_set_desc_tab_ept_byte_cnt(ep, udd_current_bank(ep), 0))
+#define udd_ack_in_send(ep) (USBC_ARRAY(uesta0clr,ep) = AVR32_USBC_UESTA0CLR_TXINIC_MASK)
+ //! raises IN sending
+#define udd_raise_in_send(ep) (USBC_ARRAY(uesta0set,ep) = AVR32_USBC_UESTA0SET_TXINIS_MASK)
+ //! enables IN sending interrupt
+#define udd_enable_in_send_interrupt(ep) (USBC_ARRAY(uecon0set,ep) = AVR32_USBC_UECON0SET_TXINES_MASK)
+ //! disables IN sending interrupt
+#define udd_disable_in_send_interrupt(ep) (USBC_ARRAY(uecon0clr,ep) = AVR32_USBC_UECON0CLR_TXINEC_MASK)
+ //! tests if IN sending interrupt is enabled
+#define Is_udd_in_send_interrupt_enabled(ep) (Tst_bits(USBC_ARRAY(uecon0,ep), AVR32_USBC_UECON0_TXINE_MASK))
+//! @}
+
+
+//! @name USB Device endpoints descriptor table management
+//! @{
+
+#define udd_udesc_set_buf0_addr(ep,buf) \
+ udd_g_ep_table[ep*2].endpoint_pipe_address = buf
+#define udd_udesc_rst_buf0_size(ep) \
+ udd_g_ep_table[ep*2].SIZES.multi_packet_size = 0
+#define udd_udesc_get_buf0_size(ep) \
+ udd_g_ep_table[ep*2].SIZES.multi_packet_size
+#define udd_udesc_set_buf0_size(ep,size) \
+ udd_g_ep_table[ep*2].SIZES.multi_packet_size = size
+#define udd_udesc_rst_buf0_ctn(ep) \
+ udd_g_ep_table[ep*2].SIZES.byte_count = 0
+#define udd_udesc_get_buf0_ctn(ep) \
+ udd_g_ep_table[ep*2].SIZES.byte_count
+#define udd_udesc_set_buf0_ctn(ep,size) \
+ udd_g_ep_table[ep*2].SIZES.byte_count = size
+#define udd_udesc_set_buf0_autozlp(ep,val) \
+ udd_g_ep_table[ep*2].SIZES.auto_zlp = val
+
+
+#define Usb_set_desc_tab_addr_reg(addr) (Wr_bitfield(AVR32_USBC.udesc, AVR32_USBC_UDESC_MASK, addr))
+
+struct avr32_usbc_udesc_sizes_t {
+ unsigned int auto_zlp:1;
+ unsigned int multi_packet_size:15;
+ unsigned int res:1;
+ unsigned int byte_count:15;
+};
+
+struct avr32_usbc_udesc_bk_ctrl_stat_t {
+ unsigned int res:13;
+ unsigned int underfi:1;
+ unsigned int overfi:1;
+ unsigned int crc:1;
+ unsigned int res2:16;
+};
+
+struct avr32_usbc_udesc_ep_ctrl_stat_t {
+ unsigned int res:8;
+ unsigned int pipe_error_status:8;
+ unsigned int pipe_error_number_max:4;
+ unsigned int pep_num:4;
+ unsigned int res2:1;
+ unsigned int uhaddr:7;
+};
+
+typedef struct {
+ uint8_t *endpoint_pipe_address;
+ union {
+ unsigned long sizes;
+ struct avr32_usbc_udesc_sizes_t SIZES;
+ };
+ union {
+ unsigned long bk_ctrl_stat;
+ struct avr32_usbc_udesc_bk_ctrl_stat_t BK_CTRL_STAT;
+ };
+ union {
+ unsigned long ep_ctrl_stat;
+ struct avr32_usbc_udesc_ep_ctrl_stat_t EP_CTRL_STAT;
+ };
+} usb_desc_table_t;
+
+//! @}
+
+//! @}
+//! @}
+//! @}
+
+#endif // _USBC_DEVICE_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/drivers/usbc/usbc_otg.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/drivers/usbc/usbc_otg.c
new file mode 100644
index 0000000..2dd0f17
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/drivers/usbc/usbc_otg.c
@@ -0,0 +1,96 @@
+/**
+ * \file
+ *
+ * \brief USB Otg drivers
+ * Compliance with common driver OTG.
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "conf_usb.h"
+#include "sysclk.h"
+#include "udd.h"
+#include "usbc_otg.h"
+#include <string.h>
+
+#ifndef UDD_USB_INT_LEVEL
+# define UDD_USB_INT_LEVEL 0 // By default USB interrupt have low priority
+#endif
+
+#ifdef OTG
+/**
+ * \ingroup usb_group
+ * \defgroup otg_group USB OTG Driver (OTG)
+ * @{
+ */
+
+//! Check that multiplexed pin used for USB_ID is defined
+#ifndef OTG_ID
+#error YOU MUST define in your board header file the multiplexed pin used for OTG_ID as AVR32_USBC_USB_ID_x_x
+#endif
+
+/**
+ * \internal
+ * \brief The USBC ISR is managed by OTG layer which call the USB mode actived (device/host).
+ */
+ISR(otg_interrupt, AVR32_USBC_IRQ_GROUP, USB_INT_LEVEL)
+{
+ if (Is_otg_id_transition() && Is_otg_id_interrupt_enabled()) {
+ // UID pin change
+ otg_ack_id_transition();
+ USB_UID_EVENT(Is_otg_id_device());
+ return;
+ }
+ // Call sub interrrupt routine correesponding at current mode
+ if (Is_otg_id_device())
+ udd_interrupt();
+ else
+ uhd_interrupt();
+}
+
+//@}
+
+void otg_enable(void)
+{
+ // Link the USBC interrupt on otg_interrupt()
+ irq_register_handler(otg_interrupt, AVR32_USBC_IRQ, UDD_USB_INT_LEVEL);
+ // Enable UID control
+ otg_input_id_pin();
+ otg_enable_id_pin();
+ otg_raise_id_transition(); // Check no ID transition has been missed during initialization
+ otg_enable_id_interrupt();
+}
+
+//@}
+
+#endif // define OTG
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/drivers/usbc/usbc_otg.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/drivers/usbc/usbc_otg.h
new file mode 100644
index 0000000..379fb23
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/drivers/usbc/usbc_otg.h
@@ -0,0 +1,228 @@
+/**
+ * \file
+ *
+ * \brief USBC OTG Driver header file.
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _USBC_OTG_H_
+#define _USBC_OTG_H_
+
+#include "compiler.h"
+#include "preprocessor.h"
+
+//! \ingroup usb_group
+//! \defgroup otg_group USB OTG Driver (OTG)
+//! USBC low-level driver for OTG features
+//!
+//! @warning Bit-masks are used instead of bit-fields because PB registers
+//! require 32-bit write accesses while AVR32-GCC 4.0.2 builds 8-bit
+//! accesses even when volatile unsigned int bit-fields are specified.
+//! @{
+
+//! @name USBC IP properties
+//! These macros give access to IP properties
+//! @{
+ //! Get IP name part 1 or 2
+#define otg_get_ip_name() (((uint64_t)AVR32_USBC.uname2<<32)|(uint64_t)AVR32_USBC.uname1)
+ //! Instruction to access at a peripheral register after interrupt clear, see AVR32002 - AVR32UC Technical reference $6.6 Memory barriers
+#define otg_data_memory_barrier() (AVR32_USBC.uvers)
+ //! Get IP version
+#define otg_get_ip_version() (Rd_bitfield(AVR32_USBC.uvers, AVR32_USBC_UVERS_VERSION_NUM_MASK))
+ //! Get number of metal fixes
+#define otg_get_metal_fix_nbr() (Rd_bitfield(AVR32_USBC.uvers, AVR32_USBC_UVERS_METAL_FIX_NUM_MASK))
+ //! Get DPRAM size (FIFO maximal size) in bytes
+#define otg_get_dpram_size() (128 << Rd_bitfield(AVR32_USBC.ufeatures, AVR32_USBC_UFEATURES_FIFO_MAX_SIZE_MASK))
+ //! Test if DPRAM is natively byte write capable
+#define Is_otg_dpram_byte_write_capable() (Tst_bits(AVR32_USBC.ufeatures, AVR32_USBC_UFEATURES_BYTE_WRITE_DPRAM_MASK))
+ //! Get size of USBC PB address space
+#define otg_get_ip_paddress_size() (AVR32_USBC.uaddrsize)
+//! @}
+
+//! @name USBC OTG ID pin management
+//! These macros manage the ID pin use or not to switch between Host or Device mode
+//! @{
+ //! Pin and function for USB_ID according to configuration from OTG_ID
+#define OTG_ID_PIN ATPASTE2(OTG_ID, _PIN)
+#define OTG_ID_FUNCTION ATPASTE2(OTG_ID, _FUNCTION)
+
+ //! Input OTG_ID from its pin
+#define otg_input_id_pin() \
+{\
+ (Tst_bits(OTG_ID_FUNCTION, 0x01)) ?\
+ (AVR32_GPIO.port[OTG_ID_PIN >> 5].pmr0s = 1 << (OTG_ID_PIN & 0x1F)) :\
+ (AVR32_GPIO.port[OTG_ID_PIN >> 5].pmr0c = 1 << (OTG_ID_PIN & 0x1F)); \
+ (Tst_bits(OTG_ID_FUNCTION, 0x02)) ?\
+ (AVR32_GPIO.port[OTG_ID_PIN >> 5].pmr1s = 1 << (OTG_ID_PIN & 0x1F)) :\
+ (AVR32_GPIO.port[OTG_ID_PIN >> 5].pmr1c = 1 << (OTG_ID_PIN & 0x1F)); \
+ AVR32_GPIO.port[OTG_ID_PIN >> 5].gperc = 1 << (OTG_ID_PIN & 0x1F);\
+ AVR32_GPIO.port[OTG_ID_PIN >> 5].puers = 1 << (OTG_ID_PIN & 0x1F);\
+}
+ //! Test if OTG_ID is input from its pin
+#define Is_otg_id_pin_input() \
+ ( !Tst_bits(AVR32_GPIO.port[OTG_ID_PIN >> 5].gper, 1 << (OTG_ID_PIN & 0x1F)) &&\
+ Tst_bits(AVR32_GPIO.port[OTG_ID_PIN >> 5].pmr0, 1 << (OTG_ID_PIN & 0x1F)) == Tst_bits(OTG_ID_PIN, 0x01) &&\
+ Tst_bits(AVR32_GPIO.port[OTG_ID_PIN >> 5].pmr1, 1 << (OTG_ID_PIN & 0x1F)) == Tst_bits(OTG_ID_PIN, 0x02))
+
+ //! Enable external OTG_ID pin (listened to by USB)
+#define otg_enable_id_pin() (Set_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_UIDE_MASK))
+ //! Disable external OTG_ID pin (ignored by USB)
+#define otg_disable_id_pin() (Clr_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_UIDE_MASK))
+ //! Test if external OTG_ID pin enabled (listened to by USB)
+#define Is_otg_id_pin_enabled() (Tst_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_UIDE_MASK))
+ //! Disable external OTG_ID pin and force device mode
+#define otg_force_device_mode() (Set_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_UIMOD_MASK), otg_disable_id_pin())
+ //! Test if device mode is forced
+#define Is_otg_device_mode_forced() (!Is_otg_id_pin_enabled() && Tst_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_UIMOD_MASK))
+ //! Disable external OTG_ID pin and force host mode
+#define otg_force_host_mode() (Clr_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_UIMOD_MASK), otg_disable_id_pin())
+ //! Test if host mode is forced
+#define Is_otg_host_mode_forced() (!Is_otg_id_pin_enabled() && !Tst_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_UIMOD_MASK))
+
+//! @name USBC OTG ID pin interrupt management
+//! These macros manage the ID pin interrupt
+//! @{
+#define otg_enable_id_interrupt() (Set_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_IDTE_MASK))
+#define otg_disable_id_interrupt() (Clr_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_IDTE_MASK))
+#define Is_otg_id_interrupt_enabled() (Tst_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_IDTE_MASK))
+#define Is_otg_id_device() (Tst_bits(AVR32_USBC.usbsta, AVR32_USBC_USBSTA_ID_MASK))
+#define otg_ack_id_transition() (AVR32_USBC.usbstaclr = AVR32_USBC_USBSTACLR_IDTIC_MASK)
+#define otg_raise_id_transition() (AVR32_USBC.usbstaset = AVR32_USBC_USBSTASET_IDTIS_MASK)
+#define Is_otg_id_transition() (Tst_bits(AVR32_USBC.usbsta, AVR32_USBC_USBSTA_IDTI_MASK))
+//! @}
+
+//! @}
+
+//! @name USBC OTG main management
+//! These macros allows to enable/disable pad and USBC hardware
+//! @{
+ //! Enable USB macro
+#define otg_enable() (Set_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_USBE_MASK))
+ //! Disable USB macro
+#define otg_disable() (Clr_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_USBE_MASK))
+#define Is_otg_enabled() (Tst_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_USBE_MASK))
+
+ //! Enable OTG pad
+#define otg_enable_pad() (Set_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_OTGPADE_MASK))
+ //! Disable OTG pad
+#define otg_disable_pad() (Clr_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_OTGPADE_MASK))
+#define Is_otg_pad_enabled() (Tst_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_OTGPADE_MASK))
+
+ //! Check Clock Usable
+ //! For parts with HS feature, this one corresponding at UTMI clock
+#define Is_clock_usable() (Tst_bits(AVR32_USBC.usbsta, AVR32_USBC_USBSTA_CLKUSABLE_MASK))
+
+ //! Stop (freeze) internal USB clock
+#define otg_freeze_clock() (Set_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_FRZCLK_MASK))
+#define otg_unfreeze_clock() (Clr_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_FRZCLK_MASK))
+#define Is_otg_clock_frozen() (Tst_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_FRZCLK_MASK))
+
+ //! Configure time-out of specified OTG timer
+#define otg_configure_timeout(timer, timeout) (Set_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_UNLOCK_MASK),\
+ Wr_bitfield(AVR32_USBC.usbcon, AVR32_USBC_USBCON_TIMPAGE_MASK, timer),\
+ Wr_bitfield(AVR32_USBC.usbcon, AVR32_USBC_USBCON_TIMVALUE_MASK, timeout),\
+ Clr_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_UNLOCK_MASK))
+ //! Get configured time-out of specified OTG timer
+#define otg_get_timeout(timer) (Set_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_UNLOCK_MASK),\
+ Wr_bitfield(AVR32_USBC.usbcon, AVR32_USBC_USBCON_TIMPAGE_MASK, timer),\
+ Clr_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_UNLOCK_MASK),\
+ Rd_bitfield(AVR32_USBC.usbcon, AVR32_USBC_USBCON_TIMVALUE_MASK))
+
+
+ //! Get the dual-role device state of the internal USB finite state machine of the USBC controller
+#define otg_get_fsm_drd_state() (Rd_bitfield(AVR32_USBC.usbfsm, AVR32_USBC_USBFSM_DRDSTATE_MASK))
+//! @}
+
+//! @name USBC OTG hardware protocol
+//! These macros manages the hardware OTG protocol
+//! @{
+ //! initiates a Host Negociation Protocol
+#define otg_device_initiate_hnp() (Set_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_HNPREQ_MASK))
+ //! accepts a Host Negociation Protocol
+#define otg_host_accept_hnp() (Set_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_HNPREQ_MASK))
+ //! rejects a Host Negociation Protocol
+#define otg_host_reject_hnp() (Clr_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_HNPREQ_MASK))
+ //! initiates a Session Request Protocol
+#define otg_device_initiate_srp() (Set_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_SRPREQ_MASK))
+ //! selects VBus as SRP method
+#define otg_select_vbus_srp_method() (Set_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_SRPSEL_MASK))
+#define Is_otg_vbus_srp_method_selected() (Tst_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_SRPSEL_MASK))
+ //! selects data line as SRP method
+#define otg_select_data_srp_method() (Clr_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_SRPSEL_MASK))
+#define Is_otg_data_srp_method_selected() (!Is_otg_vbus_srp_method_selected())
+ //! tests if a HNP occurs
+#define Is_otg_hnp() (Tst_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_HNPREQ_MASK))
+ //! tests if a SRP from device occurs
+#define Is_otg_device_srp() (Tst_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_SRPREQ_MASK))
+
+ //! enables HNP error interrupt
+#define otg_enable_hnp_error_interrupt() (Set_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_HNPERRE_MASK))
+ //! disables HNP error interrupt
+#define otg_disable_hnp_error_interrupt() (Clr_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_HNPERRE_MASK))
+#define Is_otg_hnp_error_interrupt_enabled() (Tst_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_HNPERRE_MASK))
+ //! acks HNP error interrupt
+#define otg_ack_hnp_error_interrupt() (AVR32_USBC.usbstaclr = AVR32_USBC_USBSTACLR_HNPERRIC_MASK)
+ //! raises HNP error interrupt
+#define otg_raise_hnp_error_interrupt() (AVR32_USBC.usbstaset = AVR32_USBC_USBSTASET_HNPERRIS_MASK)
+ //! tests if a HNP error occurs
+#define Is_otg_hnp_error_interrupt() (Tst_bits(AVR32_USBC.usbsta, AVR32_USBC_USBSTA_HNPERRI_MASK))
+
+ //! enables role exchange interrupt
+#define otg_enable_role_exchange_interrupt() (Set_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_ROLEEXE_MASK))
+ //! disables role exchange interrupt
+#define otg_disable_role_exchange_interrupt() (Clr_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_ROLEEXE_MASK))
+#define Is_otg_role_exchange_interrupt_enabled() (Tst_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_ROLEEXE_MASK))
+ //! acks role exchange interrupt
+#define otg_ack_role_exchange_interrupt() (AVR32_USBC.usbstaclr = AVR32_USBC_USBSTACLR_ROLEEXIC_MASK)
+ //! raises role exchange interrupt
+#define otg_raise_role_exchange_interrupt() (AVR32_USBC.usbstaset = AVR32_USBC_USBSTASET_ROLEEXIS_MASK)
+ //! tests if a role exchange occurs
+#define Is_otg_role_exchange_interrupt() (Tst_bits(AVR32_USBC.usbsta, AVR32_USBC_USBSTA_ROLEEXI_MASK))
+
+ //! enables SRP interrupt
+#define otg_enable_srp_interrupt() (Set_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_SRPE_MASK))
+ //! disables SRP interrupt
+#define otg_disable_srp_interrupt() (Clr_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_SRPE_MASK))
+#define Is_otg_srp_interrupt_enabled() (Tst_bits(AVR32_USBC.usbcon, AVR32_USBC_USBCON_SRPE_MASK))
+ //! acks SRP interrupt
+#define otg_ack_srp_interrupt() (AVR32_USBC.usbstaclr = AVR32_USBC_USBSTACLR_SRPIC_MASK)
+ //! raises SRP interrupt
+#define otg_raise_srp_interrupt() (AVR32_USBC.usbstaset = AVR32_USBC_USBSTASET_SRPIS_MASK)
+ //! tests if a SRP occurs
+#define Is_otg_srp_interrupt() (Tst_bits(AVR32_USBC.usbsta, AVR32_USBC_USBSTA_SRPI_MASK))
+//! @}
+
+//! @}
+
+#endif // _USBC_OTG_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/media_mem/media_mem.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/media_mem/media_mem.c
new file mode 100644
index 0000000..3ed8b14
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/media_mem/media_mem.c
@@ -0,0 +1,1165 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief Management of the media memory.
+ *
+ * This file manages the media memory.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+//_____ I N C L U D E S ___________________________________________________
+
+#include "board.h"
+#include "conf_access.h"
+#include "conf_media_mem.h"
+
+
+#if (MEDIA_0_MEM == ENABLE) || (MEDIA_1_MEM == ENABLE) || (MEDIA_2_MEM == ENABLE)
+
+#include "media_mem.h"
+#include <string.h>
+
+//_____ M A C R O S ________________________________________________________
+
+#ifndef media_access_signal_on
+#define media_access_signal_on()
+#endif
+#ifndef media_access_signal_off
+#define media_access_signal_off()
+#endif
+
+//_____ P R I V A T E D E C L A R A T I O N S ____________________________
+
+// USB FIFO mode
+//#define USB_FIFO_MODE
+#ifdef USB_FIFO_MODE
+#define MED_FIFO
+#define USB_FIFO
+#endif
+
+//! buffer block size in number of sectors
+#define FIFO_BLOCK_NB_SECTORS 8
+//! Number of buffer blocks
+#define FIFO_NB_BLOCKS 2
+
+#define BLOCK_IDLE 0
+#define BLOCK_RD 1
+#define BLOCK_RD_WAIT 2
+#define BLOCK_RD_NEXT 3
+#define BLOCK_WR 4
+#define BLOCK_WR_WAIT 5
+#define BLOCK_WR_NEXT 6
+
+#define BLOCK_RX 1
+#define BLOCK_RX_WAIT 2
+#define BLOCK_RX_NEXT 3
+#define BLOCK_TX 4
+#define BLOCK_TX_WAIT 5
+#define BLOCK_TX_NEXT 6
+
+//! buffer block size in number of bytes
+#define FIFO_BLOCK_NB_BYTES() (media_mem_block_nb_sectors*MEDIA_SECTOR_SIZE)
+//! Buffer size in number of sectors.
+#define MEDIA_BUFFER_NB_SECTORS() \
+ (media_mem_buffer_nb_blocks*media_mem_block_nb_sectors)
+//! Buffer size in number of bytes.
+#define MEDIA_BUFFER_NB_BYTES() (MEDIA_BUFFER_NB_SECTORS()*MEDIA_SECTOR_SIZE)
+
+//_____ D E F I N I T I O N S ______________________________________________
+
+//! Media Presence status per media.
+static U8 media_presence_status[MEDIA_NB_IDS] =
+{MEDIA_INSERTED, MEDIA_INSERTED, MEDIA_INSERTED};
+
+//! Default Media memory access buffer (8K bytes)
+static U32 media_mem_buffer_space[FIFO_BLOCK_NB_SECTORS * FIFO_NB_BLOCKS * MEDIA_SECTOR_SIZE / 4];
+//! Media memory access buffer pointer
+static U8 *media_mem_buffer;
+//! Media memory access buffer size in number of sectors
+static U32 media_mem_buffer_nb_blocks;
+//! Media memory access block size
+static U16 media_mem_block_nb_sectors;
+
+//_____ D E C L A R A T I O N S ____________________________________________
+
+//! This function initialize media access buffer by default (2*8*512 bytes)
+void media_access_init_default(void)
+{
+ media_mem_buffer = (U8*)media_mem_buffer_space;
+ media_mem_buffer_nb_blocks = FIFO_NB_BLOCKS;
+ media_mem_block_nb_sectors = FIFO_BLOCK_NB_SECTORS;
+}
+
+//! This function initialize media access buffer customized:
+//! Total buffer size is (wNbParts*dwPartSiz*MEDIA_SECTOR_SIZE).
+//! In FIFO access, the buffer is splited to parts to access.
+//! @param pBuffer Pointer to customized buffer space
+//! @param wNbParts Buffer size in number of blocks
+//! @param dwPartSiz Block size in number of sectors
+void media_access_init_customize(void* pBuffer, U16 wNbParts, U32 dwPartSiz)
+{
+ media_mem_buffer = (U8*)pBuffer;
+ if (wNbParts > 0)
+ media_mem_buffer_nb_blocks = wNbParts;
+ else
+ media_mem_buffer_nb_blocks = FIFO_NB_BLOCKS;
+ if (dwPartSiz > 0)
+ media_mem_block_nb_sectors = dwPartSiz;
+ else
+ media_mem_block_nb_sectors = FIFO_BLOCK_NB_SECTORS;
+}
+
+//! This function tests memory state, and starts memory initialization
+//! @param media Media ID to access.
+//! @return Ctrl_status
+//! It is ready -> CTRL_GOOD
+//! Memory unplug -> CTRL_NO_PRESENT
+//! Not initialized or changed -> CTRL_BUSY
+//! An error occurred -> CTRL_FAIL
+Ctrl_status media_test_unit_ready(U8 media)
+{
+ if (media > MEDIA_LAST_ID) return CTRL_FAIL;
+
+ media_access_signal_on();
+ switch (media_presence_status[media])
+ {
+ case MEDIA_REMOVED:
+ if (OK == media_mem_check(media))
+ {
+ media_presence_status[media] = MEDIA_INSERTED;
+ media_access_signal_off();
+ return CTRL_BUSY;
+ }
+ media_access_signal_off();
+ return CTRL_NO_PRESENT;
+
+ case MEDIA_INSERTED:
+ if (OK != media_mem_check(media))
+ {
+ media_presence_status[media] = MEDIA_REMOVING;
+ media_access_signal_off();
+ return CTRL_BUSY;
+ }
+ media_access_signal_off();
+ return CTRL_GOOD;
+
+ case MEDIA_REMOVING:
+ media_presence_status[media] = MEDIA_REMOVED;
+ media_access_signal_off();
+ return CTRL_NO_PRESENT;
+
+ default:
+ media_presence_status[media] = MEDIA_REMOVED;
+ media_access_signal_off();
+ return CTRL_BUSY;
+ }
+}
+
+//! This function tests memory state, and starts memory initialization
+//! @return Ctrl_status
+//! It is ready -> CTRL_GOOD
+//! Memory unplug -> CTRL_NO_PRESENT
+//! Not initialized or changed -> CTRL_BUSY
+//! An error occurred -> CTRL_FAIL
+Ctrl_status media_test_unit_ready_0(void)
+{
+ return media_test_unit_ready(0);
+}
+
+//! This function tests memory state, and starts memory initialization
+//! @return Ctrl_status
+//! It is ready -> CTRL_GOOD
+//! Memory unplug -> CTRL_NO_PRESENT
+//! Not initialized or changed -> CTRL_BUSY
+//! An error occurred -> CTRL_FAIL
+Ctrl_status media_test_unit_ready_1(void)
+{
+ return media_test_unit_ready(1);
+}
+
+//! This function tests memory state, and starts memory initialization
+//! @return Ctrl_status
+//! It is ready -> CTRL_GOOD
+//! Memory unplug -> CTRL_NO_PRESENT
+//! Not initialized or changed -> CTRL_BUSY
+//! An error occurred -> CTRL_FAIL
+Ctrl_status media_test_unit_ready_2(void)
+{
+ return media_test_unit_ready(2);
+}
+
+
+//! This function returns the address of the last valid sector
+//! @param media Media ID to access.
+//! @param u32_nb_sector Pointer to number of sectors (sector = 512 bytes)
+//! @return Ctrl_status
+//! It is ready -> CTRL_GOOD
+//! Memory unplug -> CTRL_NO_PRESENT
+//! Not initialized or changed -> CTRL_BUSY
+//! An error occurred -> CTRL_FAIL
+Ctrl_status media_read_capacity(U8 media, U32 *u32_nb_sector)
+{
+ Media *pMed = &medias[media];
+ media_access_signal_on();
+
+ if ( !media_mem_check(media) )
+ {
+ media_access_signal_off();
+ return CTRL_NO_PRESENT;
+ }
+ if (pMed->blockSize >= MEDIA_SECTOR_SIZE)
+ *u32_nb_sector = pMed->size*(pMed->blockSize/MEDIA_SECTOR_SIZE) - 1;
+ else
+ *u32_nb_sector = pMed->size* pMed->blockSize/MEDIA_SECTOR_SIZE - 1;
+ media_access_signal_off();
+ return CTRL_GOOD;
+}
+
+//! This function returns the address of the last valid sector
+//! @param u32_nb_sector Pointer to number of sectors (sector = 512 bytes)
+//! @return Ctrl_status
+//! It is ready -> CTRL_GOOD
+//! Memory unplug -> CTRL_NO_PRESENT
+//! Not initialized or changed -> CTRL_BUSY
+//! An error occurred -> CTRL_FAIL
+Ctrl_status media_read_capacity_0(U32 *u32_nb_sector)
+{
+ return media_read_capacity(0, u32_nb_sector);
+}
+
+//! This function returns the address of the last valid sector
+//! @param u32_nb_sector Pointer to number of sectors (sector = 512 bytes)
+//! @return Ctrl_status
+//! It is ready -> CTRL_GOOD
+//! Memory unplug -> CTRL_NO_PRESENT
+//! Not initialized or changed -> CTRL_BUSY
+//! An error occurred -> CTRL_FAIL
+Ctrl_status media_read_capacity_1(U32 *u32_nb_sector)
+{
+ return media_read_capacity(1, u32_nb_sector);
+}
+
+//! This function returns the address of the last valid sector
+//! @param u32_nb_sector Pointer to number of sectors (sector = 512 bytes)
+//! @return Ctrl_status
+//! It is ready -> CTRL_GOOD
+//! Memory unplug -> CTRL_NO_PRESENT
+//! Not initialized or changed -> CTRL_BUSY
+//! An error occurred -> CTRL_FAIL
+Ctrl_status media_read_capacity_2(U32 *u32_nb_sector)
+{
+ return media_read_capacity(2, u32_nb_sector);
+}
+
+
+//! This function returns the write-protected mode
+//! Only used by memory removal with a HARDWARE-SPECIFIC write-protected detection
+//! @param media Media ID to access.
+//! @warning The customer must unplug the memory to change this write-protected mode.
+//! @return TRUE if the memory is protected
+Bool media_wr_protect(U8 media)
+{
+ Media *pMed = &medias[media];
+ return pMed->protected;
+}
+
+//! This function returns the write-protected mode
+//! Only used by memory removal with a HARDWARE-SPECIFIC write-protected detection
+//! @warning The customer must unplug the memory to change this write-protected mode.
+//! @return TRUE if the memory is protected
+Bool media_wr_protect_0(void)
+{
+ return media_wr_protect(0);
+}
+
+//! This function returns the write-protected mode
+//! Only used by memory removal with a HARDWARE-SPECIFIC write-protected detection
+//! @warning The customer must unplug the memory to change this write-protected mode.
+//! @return TRUE if the memory is protected
+Bool media_wr_protect_1(void)
+{
+ return media_wr_protect(1);
+}
+
+//! This function returns the write-protected mode
+//! Only used by memory removal with a HARDWARE-SPECIFIC write-protected detection
+//! @warning The customer must unplug the memory to change this write-protected mode.
+//! @return TRUE if the memory is protected
+Bool media_wr_protect_2(void)
+{
+ return media_wr_protect(2);
+}
+
+
+//! This function informs about the memory type
+//! @param media Media ID to access.
+//! @return TRUE if the memory is removable
+Bool media_removal(U8 media)
+{
+ Media *pMed = &medias[media];
+ return pMed->removable;
+}
+
+//! This function informs about the memory type
+//! @return TRUE if the memory is removable
+Bool media_removal_0(void)
+{
+ return media_removal(0);
+}
+
+//! This function informs about the memory type
+//! @return TRUE if the memory is removable
+Bool media_removal_1(void)
+{
+ return media_removal(1);
+}
+
+//! This function informs about the memory type
+//! @return TRUE if the memory is removable
+Bool media_removal_2(void)
+{
+ return media_removal(2);
+}
+
+
+//------------ SPECIFIC FUNCTIONS FOR TRANSFER BY USB --------------------------
+
+#if ACCESS_USB == ENABLED
+
+#include "udi_msc.h"
+
+#ifdef MED_FIFO
+
+static Bool med_access_done[MEDIA_NB_IDS] = {false, false, false};
+static void med_trans_callback(Bool* pDone)
+{
+ *pDone = true;
+}
+#define MED_RD(pMed, medAddr, ioBuffer, rdSize, done) \
+ MED_Read(pMed, medAddr, ioBuffer, rdSize, (MediaCallback)med_trans_callback, &done)
+#define MED_WR(pMed, medAddr, ioBuffer, wrSize, done) \
+ MED_Write(pMed, medAddr, ioBuffer, wrSize, (MediaCallback)med_trans_callback, &done)
+#else
+
+#define MED_RD(pMed, medAddr, ioBuffer, rdSize) \
+ MED_Read(pMed, medAddr, ioBuffer, rdSize, NULL, NULL)
+
+#define MED_WR(pMed, medAddr, ioBuffer, wrSize) \
+ MED_Write(pMed, medAddr, ioBuffer, wrSize, NULL, NULL)
+
+#endif
+#ifdef USB_FIFO
+
+static Bool udi_access_done[MEDIA_NB_IDS] = {false, false, false};
+typedef void (*udi_trans_callback)(udd_ep_status_t status, iram_size_t n);
+extern bool udi_msc_b_ack_trans;
+extern bool udi_msc_b_abort_trans;
+static void udi_trans_callback_0(udd_ep_status_t status)
+{
+ udi_msc_b_abort_trans = (UDD_EP_TRANSFER_OK != status) ? true : false;
+ udi_msc_b_ack_trans = true;
+ udi_access_done[0] = true;
+}
+static void udi_trans_callback_1(udd_ep_status_t status)
+{
+ udi_msc_b_abort_trans = (UDD_EP_TRANSFER_OK != status) ? true : false;
+ udi_msc_b_ack_trans = true;
+ udi_access_done[1] = true;
+}
+static void udi_trans_callback_2(udd_ep_status_t status)
+{
+ udi_msc_b_abort_trans = (UDD_EP_TRANSFER_OK != status) ? true : false;
+ udi_msc_b_ack_trans = true;
+ udi_access_done[2] = true;
+}
+static udi_trans_callback udi_trans_callbacks[] =
+{
+ (udi_trans_callback)udi_trans_callback_0,
+ (udi_trans_callback)udi_trans_callback_1,
+ (udi_trans_callback)udi_trans_callback_2
+};
+/// USB to memory transfer with callback
+#define USB_RX(media, ioBuffer, rxSize) \
+ udi_msc_trans_block( false, ioBuffer, rxSize, udi_trans_callbacks[media])
+/// Memory to USB transfer with callback
+#define USB_TX(media, ioBuffer, txSize) \
+ udi_msc_trans_block( true, ioBuffer, txSize, udi_trans_callbacks[media])
+#else
+
+/// USB to memory transfer without callback
+#define USB_RX(ioBuffer, rxSize) \
+ udi_msc_trans_block( false, ioBuffer, rxSize, NULL)
+/// Memory to USB transfer without callback
+#define USB_TX(ioBuffer, txSize) \
+ udi_msc_trans_block( true, ioBuffer, txSize, NULL)
+
+#endif
+
+//! This function transfers the memory data (programmed in sbc_read_10) directly to the USB interface
+//! sector = 512 bytes
+//! @param media Media ID to read.
+//! @param addr Sector address to start read
+//! @param nb_sector Number of sectors to transfer
+//! @return Ctrl_status
+//! It is ready -> CTRL_GOOD
+//! Memory unplug -> CTRL_NO_PRESENT
+//! Not initialized or changed -> CTRL_BUSY
+//! An error occurred -> CTRL_FAIL
+Ctrl_status media_usb_read_10(U8 media, U32 addr, U16 nb_sector)
+{
+ Media *pMed = &medias[media];
+ U32 medAddr, medLen;
+ //printf("M%dR.%x ", media, addr);
+ if (pMed->blockSize < MEDIA_SECTOR_SIZE)
+ {
+ medAddr = addr * (MEDIA_SECTOR_SIZE/pMed->blockSize);
+ medLen = nb_sector * (MEDIA_SECTOR_SIZE/pMed->blockSize);
+ }
+ else
+ {
+ medAddr = addr * MEDIA_SECTOR_SIZE / pMed->blockSize;
+ medLen = nb_sector * MEDIA_SECTOR_SIZE / pMed->blockSize;
+ }
+ if ((medAddr > pMed->size)
+ || (medAddr + medLen > pMed->size))
+ return CTRL_FAIL;
+
+ media_access_signal_on();
+
+ if ( !media_mem_check(media) )
+ {
+ media_access_signal_off();
+ return CTRL_NO_PRESENT;
+ }
+ /* Flush before read */
+ MED_Flush(pMed);
+ /* Read */
+ if ( pMed->mappedRD )
+ {
+ U8 *ptr_cram = (U8*)((pMed->baseAddress + medAddr) * pMed->blockSize);
+ if (!udi_msc_trans_block( true, ptr_cram, medLen * pMed->blockSize, NULL))
+ {
+ media_access_signal_off();
+ return CTRL_FAIL;
+ }
+ }
+ else
+ {
+#ifndef USB_FIFO_MODE
+ while(medLen)
+ {
+ U32 rdSize = min(medLen, MEDIA_BUFFER_NB_BYTES()/pMed->blockSize);
+ //printf("%d*%d ", rdSize, pMed->blockSize);
+ //printf("m ", rdSize);
+ /* Read media */
+ if (MED_STATUS_SUCCESS != MED_Read(pMed, medAddr, media_mem_buffer, rdSize, NULL, NULL))
+ {
+ media_access_signal_off();
+ return CTRL_FAIL; // transfer aborted
+ }
+ //printf("u ");
+ /* Write to USB */
+ if (!udi_msc_trans_block( true, (uint8_t*)media_mem_buffer, rdSize * pMed->blockSize, NULL))
+ {
+ media_access_signal_off();
+ return CTRL_FAIL; // transfert aborted
+ }
+ //printf("n ");
+ /* Next */
+ medLen -= rdSize;
+ medAddr += rdSize;
+ }
+#else
+ U32 medBlkSiz = FIFO_BLOCK_NB_BYTES()/pMed->blockSize;
+ U8 medSta = BLOCK_RD, usbSta = BLOCK_IDLE;
+ U8 *pBuffer = (U8*)media_mem_buffer, *ioBuffer = NULL;
+ U32 medIndex = 0, usbIndex = 0; // buffer byte index
+ U32 medTotal = 0, usbTotal = 0;
+ U32 medRSize = 0, usbTSize = 0;
+ Bool fifoFull = false, fifoNull = true;
+ while(usbTotal < medLen)
+ {
+ /* Media reading */
+ switch(medSta)
+ {
+ /* Start media reading */
+ case BLOCK_RD:
+ //printf("mRD ");
+ ioBuffer = &pBuffer[medIndex];
+ medRSize = min(medLen - medTotal, medBlkSiz);
+ #ifdef MED_FIFO
+ med_access_done[media] = false;
+ if (MED_STATUS_SUCCESS != MED_RD(pMed, medAddr, ioBuffer, medRSize, med_access_done[media]))
+ {
+ media_access_signal_off();
+ return CTRL_FAIL; // transfer aborted
+ }
+ medSta = BLOCK_RD_WAIT;
+ #else
+ if (MED_STATUS_SUCCESS != MED_RD(pMed, medAddr, ioBuffer, medRSize))
+ {
+ media_access_signal_off();
+ return CTRL_FAIL; // transfer aborted
+ }
+ medSta = BLOCK_RD_NEXT;
+ #endif
+ break;
+
+ #ifdef MED_FIFO
+ case BLOCK_RD_WAIT:
+ if (med_access_done[media])
+ {
+ //printf("mRN ");
+ medSta = BLOCK_RD_NEXT;
+ }
+ break;
+ #endif
+
+ case BLOCK_RD_NEXT:
+ fifoNull = false;
+ medTotal += medRSize;
+ medAddr += medRSize;
+ medIndex = (medIndex + medRSize * pMed->blockSize) % MEDIA_BUFFER_NB_BYTES();
+ /* Loading finished */
+ if (medTotal >= medLen)
+ {
+ //printf("mRE ");
+ medSta = BLOCK_IDLE;
+ }
+ /* FIFO full */
+ else if (medIndex == usbIndex)
+ {
+ //printf("mRP ");
+ fifoFull = true;
+ medSta = BLOCK_IDLE;
+ }
+ else
+ {
+ //printf("mRC ");
+ medSta = BLOCK_RD;
+ }
+ break;
+
+ case BLOCK_IDLE:
+ if (medTotal < medLen && !fifoFull)
+ {
+ //printf("mRS ");
+ medSta = BLOCK_RD;
+ }
+ default:
+ break;
+ }
+ /* USB transfer */
+ switch(usbSta)
+ {
+ case BLOCK_TX:
+ //printf("uTX ");
+ ioBuffer = &pBuffer[usbIndex];
+ usbTSize = min(medLen - usbTotal, medBlkSiz);
+ #ifdef USB_FIFO
+ udi_access_done[media] = false;
+ if (!USB_TX(media, ioBuffer, usbTSize * pMed->blockSize))
+ {
+ media_access_signal_off();
+ return CTRL_FAIL; // transfer aborted
+ }
+ usbSta = BLOCK_TX_WAIT;
+ #else
+ if (!USB_TX(ioBuffer, usbTSize * pMed->blockSize))
+ {
+ media_access_signal_off();
+ return CTRL_FAIL; // transfer aborted
+ }
+ usbSta = BLOCK_TX_NEXT;
+ #endif
+ break;
+
+ #ifdef USB_FIFO
+ case BLOCK_TX_WAIT:
+ if (udi_access_done[media])
+ {
+ //printf("uTN ");
+ usbSta = BLOCK_TX_NEXT;
+ }
+ break;
+ #endif
+
+ case BLOCK_TX_NEXT:
+ fifoFull = false;
+ usbTotal += usbTSize;
+ usbIndex = (usbIndex + usbTSize * pMed->blockSize) % MEDIA_BUFFER_NB_BYTES();
+ /* FIFO null */
+ if (medIndex == usbIndex)
+ {
+ //printf("uTP ");
+ fifoNull = true;
+ usbSta = BLOCK_IDLE;
+ }
+ else
+ {
+ //printf("uTC ");
+ usbSta = BLOCK_TX;
+ }
+ break;
+
+ case BLOCK_IDLE:
+ if (medTotal > usbTotal)
+ {
+ //printf("uTS ");
+ usbSta = BLOCK_TX;
+ }
+ default:
+ break;
+ }
+ }
+ //printf("\n\r");
+#endif
+ }
+ media_access_signal_off();
+ //printf("r ");
+ return CTRL_GOOD;
+}
+
+//! This function transfers the memory data (programmed in sbc_read_10) directly to the USB interface
+//! sector = 512 bytes
+//! @param addr Sector address to start read
+//! @param nb_sector Number of sectors to transfer
+//! @return Ctrl_status
+//! It is ready -> CTRL_GOOD
+//! Memory unplug -> CTRL_NO_PRESENT
+//! Not initialized or changed -> CTRL_BUSY
+//! An error occurred -> CTRL_FAIL
+Ctrl_status media_usb_read_10_0(U32 addr, U16 nb_sector)
+{
+ return media_usb_read_10(0, addr, nb_sector);
+}
+
+//! This function transfers the memory data (programmed in sbc_read_10) directly to the USB interface
+//! sector = 512 bytes
+//! @param addr Sector address to start read
+//! @param nb_sector Number of sectors to transfer
+//! @return Ctrl_status
+//! It is ready -> CTRL_GOOD
+//! Memory unplug -> CTRL_NO_PRESENT
+//! Not initialized or changed -> CTRL_BUSY
+//! An error occurred -> CTRL_FAIL
+Ctrl_status media_usb_read_10_1(U32 addr, U16 nb_sector)
+{
+ return media_usb_read_10(1, addr, nb_sector);
+}
+
+//! This function transfers the memory data (programmed in sbc_read_10) directly to the USB interface
+//! sector = 512 bytes
+//! @param addr Sector address to start read
+//! @param nb_sector Number of sectors to transfer
+//! @return Ctrl_status
+//! It is ready -> CTRL_GOOD
+//! Memory unplug -> CTRL_NO_PRESENT
+//! Not initialized or changed -> CTRL_BUSY
+//! An error occurred -> CTRL_FAIL
+Ctrl_status media_usb_read_10_2(U32 addr, U16 nb_sector)
+{
+ return media_usb_read_10(2, addr, nb_sector);
+}
+
+
+//! This function transfers the USB data (programmed in sbc_write_10) directly to the memory interface
+//! sector = 512 bytes
+//! @param media Media ID to write.
+//! @param addr Sector address to start write
+//! @param nb_sector Number of sectors to transfer
+//! @return Ctrl_status
+//! It is ready -> CTRL_GOOD
+//! Memory unplug -> CTRL_NO_PRESENT
+//! Not initialized or changed -> CTRL_BUSY
+//! An error occurred -> CTRL_FAIL
+Ctrl_status media_usb_write_10(U8 media, U32 addr, U16 nb_sector)
+{
+ Media *pMed = &medias[media];
+ U32 medAddr, medLen;
+ //printf("M%dW.%x ", media, addr);
+ if (pMed->blockSize < MEDIA_SECTOR_SIZE)
+ {
+ medAddr = addr * (MEDIA_SECTOR_SIZE/pMed->blockSize);
+ medLen = nb_sector * (MEDIA_SECTOR_SIZE/pMed->blockSize);
+ }
+ else
+ {
+ medAddr = addr * MEDIA_SECTOR_SIZE / pMed->blockSize;
+ medLen = nb_sector * MEDIA_SECTOR_SIZE / pMed->blockSize;
+ }
+ if ((medAddr > pMed->size)
+ || (medAddr + medLen > pMed->size))
+ return CTRL_FAIL;
+
+ media_access_signal_on();
+
+ if ( !media_mem_check(media) )
+ {
+ media_access_signal_off();
+ return CTRL_NO_PRESENT;
+ }
+ if ( pMed->mappedRD )
+ {
+ U8 *ptr_cram = (U8*)((pMed->baseAddress + medAddr) * pMed->blockSize);
+ if (!udi_msc_trans_block( false, ptr_cram, medLen * pMed->blockSize, NULL))
+ {
+ media_access_signal_off();
+ return CTRL_FAIL;
+ }
+ }
+ else
+ {
+#ifndef USB_FIFO_MODE
+ while(medLen)
+ {
+ U32 wrSize = min(medLen, MEDIA_BUFFER_NB_BYTES()/pMed->blockSize);
+ //printf("%d*%d ", wrSize, pMed->blockSize);
+ //printf("u ");
+ /* Read USB */
+ if (!udi_msc_trans_block( false, (uint8_t*)media_mem_buffer, wrSize * pMed->blockSize, NULL))
+ {
+ media_access_signal_off();
+ return CTRL_FAIL; // transfert aborted
+ }
+ //printf("m ");
+ /* Write media */
+ if (MED_STATUS_SUCCESS != MED_Write(pMed, medAddr, media_mem_buffer, wrSize, NULL, NULL))
+ {
+ //MED_Flush(pMed);
+ media_access_signal_off();
+ return CTRL_FAIL; // transfer aborted
+ }
+ //printf("n ");
+ /* Next */
+ medLen -= wrSize;
+ medAddr += wrSize;
+ }
+#else
+ U32 medBlkSiz = FIFO_BLOCK_NB_BYTES()/pMed->blockSize;
+ U8 medSta = BLOCK_IDLE, usbSta = BLOCK_RX;
+ U8 *pBuffer = (U8*)media_mem_buffer, *ioBuffer = NULL;
+ U32 medIndex = 0, usbIndex = 0; // buffer byte index
+ U32 medTotal = 0, usbTotal = 0;
+ U32 medWSize = 0, usbRSize = 0;
+ Bool fifoFull = false, fifoNull = true;
+ while(medTotal < medLen)
+ {
+ /* USB receive */
+ switch(usbSta)
+ {
+ case BLOCK_RX:
+ //printf("uRX ");
+ ioBuffer = &pBuffer[usbIndex];
+ usbRSize = min(medLen - usbTotal, medBlkSiz);
+ #ifdef USB_FIFO
+ udi_access_done[media] = false;
+ if (!USB_RX(media, ioBuffer, usbRSize * pMed->blockSize))
+ {
+ media_access_signal_off();
+ return CTRL_FAIL; // transfer aborted
+ }
+ usbSta = BLOCK_RX_WAIT;
+ #else
+ if (!USB_RX(ioBuffer, usbRSize * pMed->blockSize))
+ {
+ media_access_signal_off();
+ return CTRL_FAIL; // transfer aborted
+ }
+ usbSta = BLOCK_RX_NEXT;
+ #endif
+ break;
+
+ #ifdef USB_FIFO
+ case BLOCK_RX_WAIT:
+ if (udi_access_done[media])
+ usbSta = BLOCK_RX_NEXT;
+ break;
+ #endif
+
+ case BLOCK_RX_NEXT:
+ fifoNull = false;
+ usbTotal += usbRSize;
+ usbIndex = (usbIndex + usbRSize * pMed->blockSize) % MEDIA_BUFFER_NB_BYTES();
+ if (usbTotal >= medTotal)
+ {
+ //printf("uRE ");
+ usbSta = BLOCK_IDLE;
+ }
+ else if (usbIndex == medIndex)
+ {
+ //printf("uPR ");
+ fifoFull = true;
+ usbSta = BLOCK_IDLE;
+ }
+ else
+ {
+ //printf("uNR ");
+ usbSta = BLOCK_RX;
+ }
+ break;
+
+ case BLOCK_IDLE:
+ if (usbTotal < medLen && !fifoFull)
+ {
+ //printf("uSR ");
+ usbSta = BLOCK_RX;
+ }
+ default:
+ break;
+ }
+ /* Media write */
+ switch(medSta)
+ {
+ case BLOCK_WR:
+ //printf("mWR ");
+ ioBuffer = &pBuffer[medIndex];
+ medWSize = min(medLen - medTotal, medBlkSiz);
+ #ifdef MED_FIFO
+ med_access_done[media] = false;
+ if (MED_STATUS_SUCCESS != MED_WR(pMed, medAddr, ioBuffer, medWSize, med_access_done[media]))
+ {
+ media_access_signal_off();
+ return CTRL_FAIL; // transfer aborted
+ }
+ medSta = BLOCK_WR_WAIT;
+ #else
+ if (MED_STATUS_SUCCESS != MED_WR(pMed, medAddr, ioBuffer, medWSize))
+ {
+ media_access_signal_off();
+ return CTRL_FAIL; // transfer aborted
+ }
+ medSta = BLOCK_WR_NEXT;
+ #endif
+ break;
+
+ #ifdef MED_FIFO
+ case BLOCK_WR_WAIT:
+ if (med_access_done[media])
+ medSta = BLOCK_WR_NEXT;
+ break;
+ #endif
+
+ case BLOCK_WR_NEXT:
+ fifoFull = false;
+ medAddr += medWSize;
+ medTotal += medWSize;
+ medIndex = (medIndex + medWSize * pMed->blockSize) % MEDIA_BUFFER_NB_BYTES();
+ if (medIndex == usbIndex)
+ {
+ //printf("mPW ");
+ fifoNull = true;
+ medSta = BLOCK_IDLE;
+ }
+ else
+ {
+ //printf("mNW ");
+ medSta = BLOCK_WR;
+ }
+ break;
+
+ case BLOCK_IDLE:
+ if (medTotal < usbTotal)
+ {
+ //printf("mWS ");
+ medSta = BLOCK_WR;
+ }
+ default:
+ break;
+ }
+ }
+#endif
+ }
+ //MED_Flush(pMed);
+ //printf("w ");
+ media_access_signal_off();
+ return CTRL_GOOD;
+}
+
+//! This function transfers the USB data (programmed in sbc_write_10) directly to the memory interface
+//! sector = 512 bytes
+//! @param addr Sector address to start write
+//! @param nb_sector Number of sectors to transfer
+//! @return Ctrl_status
+//! It is ready -> CTRL_GOOD
+//! Memory unplug -> CTRL_NO_PRESENT
+//! Not initialized or changed -> CTRL_BUSY
+//! An error occurred -> CTRL_FAIL
+Ctrl_status media_usb_write_10_0(U32 addr, U16 nb_sector)
+{
+ return media_usb_write_10(0, addr, nb_sector);
+}
+
+//! This function transfers the USB data (programmed in sbc_write_10) directly to the memory interface
+//! sector = 512 bytes
+//! @param addr Sector address to start write
+//! @param nb_sector Number of sectors to transfer
+//! @return Ctrl_status
+//! It is ready -> CTRL_GOOD
+//! Memory unplug -> CTRL_NO_PRESENT
+//! Not initialized or changed -> CTRL_BUSY
+//! An error occurred -> CTRL_FAIL
+Ctrl_status media_usb_write_10_1(U32 addr, U16 nb_sector)
+{
+ return media_usb_write_10(1, addr, nb_sector);
+}
+
+//! This function transfers the USB data (programmed in sbc_write_10) directly to the memory interface
+//! sector = 512 bytes
+//! @param addr Sector address to start write
+//! @param nb_sector Number of sectors to transfer
+//! @return Ctrl_status
+//! It is ready -> CTRL_GOOD
+//! Memory unplug -> CTRL_NO_PRESENT
+//! Not initialized or changed -> CTRL_BUSY
+//! An error occurred -> CTRL_FAIL
+Ctrl_status media_usb_write_10_2(U32 addr, U16 nb_sector)
+{
+ return media_usb_write_10(2, addr, nb_sector);
+}
+
+
+#endif // ACCESS_USB == ENABLED
+
+
+//------------ SPECIFIC FUNCTIONS FOR TRANSFER BY RAM --------------------------
+
+#if ACCESS_MEM_TO_RAM == ENABLED
+
+#include <string.h>
+
+//! This function tranfers 1 data sector from memory to RAM
+//! sector = 512 bytes
+//! @param media Media ID to access.
+//! @param addr Sector address to start read
+//! @param ram Address of RAM buffer
+//! @return Ctrl_status
+//! It is ready -> CTRL_GOOD
+//! Memory unplug -> CTRL_NO_PRESENT
+//! Not initialized or changed -> CTRL_BUSY
+//! An error occurred -> CTRL_FAIL
+Ctrl_status media_mem_2_ram(U8 media, U32 addr, void *ram)
+{
+ Media *pMed = &medias[media];
+ U32 medAddr, medLen, nb_sector = 1;
+ if (pMed->blockSize < MEDIA_SECTOR_SIZE)
+ {
+ medAddr = addr * (MEDIA_SECTOR_SIZE/pMed->blockSize);
+ medLen = nb_sector * (MEDIA_SECTOR_SIZE/pMed->blockSize);
+ }
+ else
+ {
+ medAddr = addr * MEDIA_SECTOR_SIZE / pMed->blockSize;
+ medLen = nb_sector * MEDIA_SECTOR_SIZE / pMed->blockSize;
+ }
+ if ((medAddr > pMed->size)
+ || (medAddr + medLen > pMed->size))
+ return CTRL_FAIL;
+
+ media_access_signal_on();
+
+ if ( !media_mem_check(media) )
+ {
+ media_access_signal_off();
+ return CTRL_NO_PRESENT;
+ }
+ MED_Flush(pMed);
+ if ( pMed->mappedRD )
+ {
+ U8 *ptr_cram = (U8*)((pMed->baseAddress + medAddr) * pMed->blockSize);
+ memcpy(ram, ptr_cram, medLen * pMed->blockSize);
+ }
+ else
+ {
+ if (MED_STATUS_SUCCESS != MED_Read(pMed, medAddr, ram, medLen, NULL, NULL))
+ {
+ media_access_signal_off();
+ return CTRL_FAIL;
+ }
+ }
+ media_access_signal_off();
+ return CTRL_GOOD;
+}
+
+//! This function tranfers 1 data sector from memory to RAM
+//! sector = 512 bytes
+//! @param addr Sector address to start read
+//! @param ram Address of RAM buffer
+//! @return Ctrl_status
+//! It is ready -> CTRL_GOOD
+//! Memory unplug -> CTRL_NO_PRESENT
+//! Not initialized or changed -> CTRL_BUSY
+//! An error occurred -> CTRL_FAIL
+Ctrl_status media_mem_2_ram_0(U32 addr, void *ram)
+{
+ return media_mem_2_ram(0, addr, ram);
+}
+
+//! This function tranfers 1 data sector from memory to RAM
+//! sector = 512 bytes
+//! @param addr Sector address to start read
+//! @param ram Address of RAM buffer
+//! @return Ctrl_status
+//! It is ready -> CTRL_GOOD
+//! Memory unplug -> CTRL_NO_PRESENT
+//! Not initialized or changed -> CTRL_BUSY
+//! An error occurred -> CTRL_FAIL
+Ctrl_status media_mem_2_ram_1(U32 addr, void *ram)
+{
+ return media_mem_2_ram(1, addr, ram);
+}
+
+//! This function tranfers 1 data sector from memory to RAM
+//! sector = 512 bytes
+//! @param addr Sector address to start read
+//! @param ram Address of RAM buffer
+//! @return Ctrl_status
+//! It is ready -> CTRL_GOOD
+//! Memory unplug -> CTRL_NO_PRESENT
+//! Not initialized or changed -> CTRL_BUSY
+//! An error occurred -> CTRL_FAIL
+Ctrl_status media_mem_2_ram_2(U32 addr, void *ram)
+{
+ return media_mem_2_ram(2, addr, ram);
+}
+
+
+//! This function tranfers 1 data sector from memory to RAM
+//! sector = 512 bytes
+//! @param media Media ID to access.
+//! @param addr Sector address to start write
+//! @param ram Address of RAM buffer
+//! @return Ctrl_status
+//! It is ready -> CTRL_GOOD
+//! Memory unplug -> CTRL_NO_PRESENT
+//! Not initialized or changed -> CTRL_BUSY
+//! An error occurred -> CTRL_FAIL
+Ctrl_status media_ram_2_mem(U8 media, U32 addr, const void *ram)
+{
+ Media *pMed = &medias[media];
+ U32 medAddr, medLen, nb_sector = 1;
+ if (pMed->blockSize < MEDIA_SECTOR_SIZE)
+ {
+ medAddr = addr * (MEDIA_SECTOR_SIZE/pMed->blockSize);
+ medLen = nb_sector * (MEDIA_SECTOR_SIZE/pMed->blockSize);
+ }
+ else
+ {
+ medAddr = addr * MEDIA_SECTOR_SIZE / pMed->blockSize;
+ medLen = nb_sector * MEDIA_SECTOR_SIZE / pMed->blockSize;
+ }
+ if ((medAddr > pMed->size)
+ || (medAddr + medLen > pMed->size))
+ return CTRL_FAIL;
+
+ media_access_signal_on();
+
+ if ( !media_mem_check(media) )
+ {
+ media_access_signal_off();
+ return CTRL_NO_PRESENT;
+ }
+ if ( pMed->mappedRD )
+ {
+ U8 *ptr_cram = (U8*)((pMed->baseAddress + medAddr) * pMed->blockSize);
+ memcpy(ptr_cram, ram, medLen * pMed->blockSize);
+ }
+ else
+ {
+ if (MED_STATUS_SUCCESS != MED_Write(pMed, medAddr, ram, medLen, NULL, NULL))
+ {
+ //MED_Flush(pMed);
+ media_access_signal_off();
+ return CTRL_FAIL;
+ }
+ }
+ //MED_Flush(pMed);
+ media_access_signal_off();
+ return CTRL_GOOD;
+}
+
+//! This function tranfers 1 data sector from memory to RAM
+//! sector = 512 bytes
+//! @param addr Sector address to start write
+//! @param ram Address of RAM buffer
+//! @return Ctrl_status
+//! It is ready -> CTRL_GOOD
+//! Memory unplug -> CTRL_NO_PRESENT
+//! Not initialized or changed -> CTRL_BUSY
+//! An error occurred -> CTRL_FAIL
+Ctrl_status media_ram_2_mem_0(U32 addr, const void *ram)
+{
+ return media_ram_2_mem(0, addr, ram);
+}
+
+//! This function tranfers 1 data sector from memory to RAM
+//! sector = 512 bytes
+//! @param addr Sector address to start write
+//! @param ram Address of RAM buffer
+//! @return Ctrl_status
+//! It is ready -> CTRL_GOOD
+//! Memory unplug -> CTRL_NO_PRESENT
+//! Not initialized or changed -> CTRL_BUSY
+//! An error occurred -> CTRL_FAIL
+Ctrl_status media_ram_2_mem_1(U32 addr, const void *ram)
+{
+ return media_ram_2_mem(1, addr, ram);
+}
+
+//! This function tranfers 1 data sector from memory to RAM
+//! sector = 512 bytes
+//! @param addr Sector address to start write
+//! @param ram Address of RAM buffer
+//! @return Ctrl_status
+//! It is ready -> CTRL_GOOD
+//! Memory unplug -> CTRL_NO_PRESENT
+//! Not initialized or changed -> CTRL_BUSY
+//! An error occurred -> CTRL_FAIL
+Ctrl_status media_ram_2_mem_2(U32 addr, const void *ram)
+{
+ return media_ram_2_mem(2, addr, ram);
+}
+
+
+#endif // ACCESS_MEM_TO_RAM == ENABLED
+
+
+#endif // MEDIA_MEM == ENABLE
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/media_mem/media_mem.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/media_mem/media_mem.h
new file mode 100644
index 0000000..9949d89
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/media_mem/media_mem.h
@@ -0,0 +1,142 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief Management of the virtual memory.
+ *
+ * This file manages the virtual memory.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _MEDIA_MEM_H_
+#define _MEDIA_MEM_H_
+
+#include "board.h"
+#include "memories.h"
+#include "conf_access.h"
+
+#if (MEDIA_0_MEM == ENABLE) || (MEDIA_1_MEM == ENABLE) || (MEDIA_2_MEM == ENABLE)
+
+#include "ctrl_access.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+//_____ D E F I N I T I O N S ______________________________________________
+
+/*! \name Media Status
+ *
+ * Status List for the Storage Media
+ *
+ */
+//! @{
+#define MEDIA_REMOVED 0
+#define MEDIA_INSERTED 1
+#define MEDIA_REMOVING 2
+//! @}
+
+#define MEDIA_SECTOR_SIZE 512
+
+extern Media medias[];
+extern uint32_t numMedias;
+
+//---- CONTROL FUNCTIONS ----
+
+extern Ctrl_status media_test_unit_ready (U8 media);
+extern Ctrl_status media_test_unit_ready_0(void);
+extern Ctrl_status media_test_unit_ready_1(void);
+extern Ctrl_status media_test_unit_ready_2(void);
+
+extern Ctrl_status media_read_capacity (U8 media, U32 *u32_nb_sector);
+extern Ctrl_status media_read_capacity_0(U32 *u32_nb_sector);
+extern Ctrl_status media_read_capacity_1(U32 *u32_nb_sector);
+extern Ctrl_status media_read_capacity_2(U32 *u32_nb_sector);
+
+extern Bool media_wr_protect (U8 media);
+extern Bool media_wr_protect_0(void);
+extern Bool media_wr_protect_1(void);
+extern Bool media_wr_protect_2(void);
+
+extern Bool media_removal (U8 media);
+extern Bool media_removal_0(void);
+extern Bool media_removal_1(void);
+extern Bool media_removal_2(void);
+
+//---- ACCESS DATA Setting FUNCTIONS ----
+
+extern void media_access_init_default(void);
+extern void media_access_init_customize(void* pBuffer, U16 wNbParts, U32 dwPartSiz);
+
+//---- ACCESS DATA FUNCTIONS ----
+
+// USB interface
+#if ACCESS_USB == ENABLED
+extern Ctrl_status media_usb_read_10 (U8 media, U32 addr, U16 nb_sector);
+extern Ctrl_status media_usb_read_10_0 ( U32 addr, U16 nb_sector);
+extern Ctrl_status media_usb_read_10_1 ( U32 addr, U16 nb_sector);
+extern Ctrl_status media_usb_read_10_2 ( U32 addr, U16 nb_sector);
+
+extern Ctrl_status media_usb_write_10 (U8 media, U32 addr, U16 nb_sector);
+extern Ctrl_status media_usb_write_10_0( U32 addr, U16 nb_sector);
+extern Ctrl_status media_usb_write_10_1( U32 addr, U16 nb_sector);
+extern Ctrl_status media_usb_write_10_2( U32 addr, U16 nb_sector);
+#endif
+
+// RAM interface
+#if ACCESS_MEM_TO_RAM == ENABLED
+extern Ctrl_status media_mem_2_ram (U8 media, U32 addr, void *ram);
+extern Ctrl_status media_mem_2_ram_0( U32 addr, void *ram);
+extern Ctrl_status media_mem_2_ram_1( U32 addr, void *ram);
+extern Ctrl_status media_mem_2_ram_2( U32 addr, void *ram);
+
+extern Ctrl_status media_ram_2_mem (U8 media, U32 addr, const void *ram);
+extern Ctrl_status media_ram_2_mem_0( U32 addr, const void *ram);
+extern Ctrl_status media_ram_2_mem_1( U32 addr, const void *ram);
+extern Ctrl_status media_ram_2_mem_2( U32 addr, const void *ram);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+#endif // _MEDIA_MEM_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/nandflash/nandflash_mem.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/nandflash/nandflash_mem.c
new file mode 100644
index 0000000..8e143ff
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/nandflash/nandflash_mem.c
@@ -0,0 +1,248 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief Management of the nandflash memory.
+ *
+ * This file manages the nandflash memory.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+//_____ I N C L U D E S ___________________________________________________
+
+#include "board.h"
+#include "conf_access.h"
+#include "conf_nandflash_mem.h"
+
+
+#if NANDFLASH_MEM == ENABLE
+
+#include "nandflash_mem.h"
+#include <string.h>
+
+
+#ifndef NANDFLASH_NB_SECTOR
+# error Define NANDFLASH_NB_SECTOR in conf_nandflash_mem.h file
+#endif
+
+//_____ M A C R O S ________________________________________________________
+
+#define VIRTUAL_MEM_TEST_CHANGE_STATE DISABLED//ENABLED
+
+
+//_____ P R I V A T E D E C L A R A T I O N S ____________________________
+
+
+//_____ D E F I N I T I O N S ______________________________________________
+
+
+//_____ D E C L A R A T I O N S ____________________________________________
+
+//! This function tests memory state, and starts memory initialization
+//! @return Ctrl_status
+//! It is ready -> CTRL_GOOD
+//! Memory unplug -> CTRL_NO_PRESENT
+//! Not initialized or changed -> CTRL_BUSY
+//! An error occurred -> CTRL_FAIL
+Ctrl_status nandflash_test_unit_ready(void)
+{
+ return CTRL_NO_PRESENT;
+ //return CTRL_GOOD;
+}
+
+
+//! This function returns the address of the last valid sector
+//! @param u32_nb_sector Pointer to number of sectors (sector = 512 bytes)
+//! @return Ctrl_status
+//! It is ready -> CTRL_GOOD
+//! Memory unplug -> CTRL_NO_PRESENT
+//! Not initialized or changed -> CTRL_BUSY
+//! An error occurred -> CTRL_FAIL
+Ctrl_status nandflash_read_capacity(U32 *u32_nb_sector)
+{
+// if (NANDFLASH_NB_SECTOR<8)
+// *u32_nb_sector = 8-1;
+// else
+// *u32_nb_sector = NANDFLASH_NB_SECTOR- 1;
+ return CTRL_GOOD;
+}
+
+
+//! This function returns the write-protected mode
+//! Only used by memory removal with a HARDWARE-SPECIFIC write-protected detection
+//! @warning The customer must unplug the memory to change this write-protected mode.
+//! @return TRUE if the memory is protected
+Bool nandflash_wr_protect(void)
+{
+ return FALSE;
+}
+
+
+//! This function informs about the memory type
+//! @return TRUE if the memory is removable
+Bool nandflash_removal(void)
+{
+ return FALSE;
+}
+
+
+//------------ SPECIFIC FUNCTIONS FOR TRANSFER BY USB --------------------------
+
+#if ACCESS_USB == ENABLED
+
+#include "udi_msc.h"
+
+//! This function transfers the memory data (programmed in sbc_read_10) directly to the USB interface
+//! sector = 512 bytes
+//! @param addr Sector address to start read
+//! @param nb_sector Number of sectors to transfer
+//! @return Ctrl_status
+//! It is ready -> CTRL_GOOD
+//! Memory unplug -> CTRL_NO_PRESENT
+//! Not initialized or changed -> CTRL_BUSY
+//! An error occurred -> CTRL_FAIL
+Ctrl_status nandflash_usb_read_10(U32 addr, U16 nb_sector)
+{
+ U8 *ptr_cram;
+
+ if ((addr > NANDFLASH_NB_SECTOR)
+ || (addr + nb_sector > NANDFLASH_NB_SECTOR))
+ return CTRL_FAIL;
+
+// while (nb_sector--)
+// {
+// // If overflow (possible with size nandflash mem < 8 sectors) then read the last sector
+// addr = min(addr, NANDFLASH_NB_SECTOR - 1);
+// ptr_cram = &vmem_data[addr++ * VMEM_SECTOR_SIZE];
+// if (!udi_msc_trans_block( true, ptr_cram, VMEM_SECTOR_SIZE, NULL))
+// return CTRL_FAIL; // transfert aborted
+// }
+
+ return CTRL_GOOD;
+}
+
+
+//! This function transfers the USB data (programmed in sbc_write_10) directly to the memory interface
+//! sector = 512 bytes
+//! @param addr Sector address to start write
+//! @param nb_sector Number of sectors to transfer
+//! @return Ctrl_status
+//! It is ready -> CTRL_GOOD
+//! Memory unplug -> CTRL_NO_PRESENT
+//! Not initialized or changed -> CTRL_BUSY
+//! An error occurred -> CTRL_FAIL
+Ctrl_status nandflash_usb_write_10(U32 addr, U16 nb_sector)
+{
+ U8 *ptr_cram;
+
+ if ((addr > NANDFLASH_NB_SECTOR)
+ || (addr + nb_sector > NANDFLASH_NB_SECTOR))
+ return CTRL_FAIL;
+
+// while (nb_sector--)
+// {
+// // If overflow (possible with size nandflash mem < 8 sectors) then read the last sector
+// addr = min(addr, NANDFLASH_NB_SECTOR - 1);
+// ptr_cram = &vmem_data[addr++ * VMEM_SECTOR_SIZE];
+// if (!udi_msc_trans_block( false, ptr_cram, VMEM_SECTOR_SIZE, NULL))
+// return CTRL_FAIL; // transfert aborted
+// }
+
+ return CTRL_GOOD;
+}
+
+#endif // ACCESS_USB == ENABLED
+
+
+//------------ SPECIFIC FUNCTIONS FOR TRANSFER BY RAM --------------------------
+
+#if ACCESS_MEM_TO_RAM == ENABLED
+
+#include <string.h>
+
+//! This function tranfers 1 data sector from memory to RAM
+//! sector = 512 bytes
+//! @param addr Sector address to start read
+//! @param ram Address of RAM buffer
+//! @return Ctrl_status
+//! It is ready -> CTRL_GOOD
+//! Memory unplug -> CTRL_NO_PRESENT
+//! Not initialized or changed -> CTRL_BUSY
+//! An error occurred -> CTRL_FAIL
+Ctrl_status nandflash_mem_2_ram(U32 addr, void *ram)
+{
+ if (addr + 1 > Max(NANDFLASH_NB_SECTOR, 8)) return CTRL_FAIL;
+
+ // If overflow (possible with size nandflash mem < 8 sectors) then read the last sector
+// addr = min(addr, NANDFLASH_NB_SECTOR - 1);
+//
+// memcpy(ram, &vmem_data[addr * VMEM_SECTOR_SIZE], VMEM_SECTOR_SIZE);
+
+ return CTRL_GOOD;
+}
+
+
+//! This function tranfers 1 data sector from memory to RAM
+//! sector = 512 bytes
+//! @param addr Sector address to start write
+//! @param ram Address of RAM buffer
+//! @return Ctrl_status
+//! It is ready -> CTRL_GOOD
+//! Memory unplug -> CTRL_NO_PRESENT
+//! Not initialized or changed -> CTRL_BUSY
+//! An error occurred -> CTRL_FAIL
+Ctrl_status nandflash_ram_2_mem(U32 addr, const void *ram)
+{
+ if (addr + 1 > NANDFLASH_NB_SECTOR) return CTRL_FAIL;
+
+//#if VIRTUAL_MEM_TEST_CHANGE_STATE == ENABLED
+// if (addr + 1 > FILE_SECTOR && addr <= FILE_SECTOR)
+// s_b_data_modify = TRUE;
+//#endif
+//
+// memcpy(&vmem_data[addr * VMEM_SECTOR_SIZE], ram, VMEM_SECTOR_SIZE);
+
+ return CTRL_GOOD;
+}
+
+#endif // ACCESS_MEM_TO_RAM == ENABLED
+
+
+#endif // nandflash_MEM == ENABLE
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/nandflash/nandflash_mem.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/nandflash/nandflash_mem.h
new file mode 100644
index 0000000..4f6fede
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/nandflash/nandflash_mem.h
@@ -0,0 +1,95 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief Management of the virtual memory.
+ *
+ * This file manages the virtual memory.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _NANDFLASH_MEM_H_
+#define _NANDFLASH_MEM_H_
+
+
+#include "conf_access.h"
+
+#if NANDFLASH_MEM == ENABLE
+
+#include "ctrl_access.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+//_____ D E F I N I T I O N S ______________________________________________
+
+#define NAND_SECTOR_SIZE 512
+
+
+//---- CONTROL FUNCTIONS ----
+
+extern Ctrl_status nandflash_test_unit_ready(void);
+extern Ctrl_status nandflash_read_capacity(U32 *u32_nb_sector);
+extern Bool nandflash_wr_protect(void);
+extern Bool nandflash_removal(void);
+
+
+//---- ACCESS DATA FUNCTIONS ----
+
+// USB interface
+#if ACCESS_USB == ENABLED
+extern Ctrl_status nandflash_usb_read_10 (U32 addr, U16 nb_sector);
+extern Ctrl_status nandflash_usb_write_10(U32 addr, U16 nb_sector);
+#endif
+
+// RAM interface
+#if ACCESS_MEM_TO_RAM == ENABLED
+extern Ctrl_status nandflash_mem_2_ram(U32 addr, void *ram);
+extern Ctrl_status nandflash_ram_2_mem(U32 addr, const void *ram);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+#endif // _VIRTUAL_MEM_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/sdmmc/sdmmc_mci/sd_mmc_cmd.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/sdmmc/sdmmc_mci/sd_mmc_cmd.h
new file mode 100644
index 0000000..a1aec51
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/sdmmc/sdmmc_mci/sd_mmc_cmd.h
@@ -0,0 +1,160 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief SD/MMC card command list.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with an MCI module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _SD_MMC_CMD_H_
+#define _SD_MMC_CMD_H_
+
+/*_____ I N C L U D E S ____________________________________________________*/
+#include "compiler.h"
+#include "mci.h"
+
+//-- Class 0 & 1 commands: Basic commands and Read Stream commands
+#define SD_MMC_GO_IDLE_STATE_CMD (0 | MCI_TRCMD_NO | MCI_SPCMD_NONE )
+#define SD_MMC_INIT_STATE_CMD (0 | MCI_TRCMD_NO | MCI_SPCMD_INIT )
+#define SD_MMC_MMC_GO_IDLE_STATE_CMD (0 | MCI_TRCMD_NO | MCI_SPCMD_NONE | MCI_OPDCMD)
+#define SD_MMC_MMC_SEND_OP_COND_CMD (1 | MCI_TRCMD_NO | MCI_SPCMD_NONE | MCI_RSPTYP_48 | MCI_OPDCMD)
+#define SD_MMC_ALL_SEND_CID_CMD (2 | MCI_TRCMD_NO | MCI_SPCMD_NONE | MCI_RSPTYP_136 )
+#define SD_MMC_MMC_ALL_SEND_CID_CMD (2 | MCI_TRCMD_NO | MCI_SPCMD_NONE | MCI_RSPTYP_136| MCI_OPDCMD)
+#define SD_MMC_SET_RELATIVE_ADDR_CMD (3 | MCI_TRCMD_NO | MCI_SPCMD_NONE | MCI_RSPTYP_48 | MCI_MAXLAT )
+#define SD_MMC_MMC_SET_RELATIVE_ADDR_CMD (3 | MCI_TRCMD_NO | MCI_SPCMD_NONE | MCI_RSPTYP_48 | MCI_MAXLAT | MCI_OPDCMD)
+
+#define MCI_SET_DSR_CMD (4 | MCI_TRCMD_NO | SPCMD_NONE | MCI_RSPTYP_NO | MCI_MAXLAT )
+
+#define SD_MMC_SEL_DESEL_CARD_CMD (7 | MCI_TRCMD_NO | MCI_SPCMD_NONE | MCI_RSPTYP_48B | MCI_MAXLAT )
+#define SD_MMC_SEND_EXT_CSD_CMD (8 | MCI_TRCMD_START | MCI_SPCMD_NONE | MCI_RSPTYP_48 | MCI_TRDIR | MCI_MAXLAT )
+#define SD_MMC_SEND_CSD_CMD (9 | MCI_TRCMD_NO | MCI_SPCMD_NONE | MCI_RSPTYP_136 | MCI_MAXLAT )
+#define SD_MMC_SEND_CID_CMD (10| MCI_TRCMD_NO | MCI_SPCMD_NONE | MCI_RSPTYP_136 | MCI_MAXLAT )
+#define SD_MMC_MMC_READ_DAT_UNTIL_STOP_CMD (11| MCI_TRTYP_STREAM | MCI_SPCMD_NONE | MCI_RSPTYP_48 | MCI_TRDIR | MCI_TRCMD_START | MCI_MAXLAT )
+
+#define SD_MMC_STOP_READ_TRANSMISSION_CMD (12| MCI_TRCMD_STOP | MCI_SPCMD_NONE | MCI_RSPTYP_48 | MCI_MAXLAT )
+#define SD_MMC_STOP_WRITE_TRANSMISSION_CMD (12| MCI_TRCMD_STOP | MCI_SPCMD_NONE | MCI_RSPTYP_48B | MCI_MAXLAT )
+
+#define SD_MMC_STOP_TRANSMISSION_SYNC_CMD (12| MCI_TRCMD_STOP | MCI_SPCMD_SYNC | MCI_RSPTYP_48 | MCI_MAXLAT )
+#define SD_MMC_SEND_STATUS_CMD (13| MCI_TRCMD_NO | MCI_SPCMD_NONE | MCI_RSPTYP_48 | MCI_MAXLAT )
+#define SD_MMC_GO_INACTIVE_STATE_CMD (15| MCI_RSPTYP_NO )
+
+//*------------------------------------------------
+//* Class 2 commands: Block oriented Read commands
+//*------------------------------------------------
+
+#define SD_MMC_SET_BLOCKLEN_CMD (16 | MCI_TRCMD_NO | MCI_SPCMD_NONE | MCI_RSPTYP_48 | MCI_MAXLAT )
+#define SD_MMC_READ_SINGLE_BLOCK_CMD (17 | MCI_SPCMD_NONE | MCI_RSPTYP_48 | MCI_TRCMD_START | MCI_TRTYP_BLOCK | MCI_TRDIR | MCI_MAXLAT)
+#define SD_MMC_READ_MULTIPLE_BLOCK_CMD (18 | MCI_SPCMD_NONE | MCI_RSPTYP_48 | MCI_TRCMD_START | MCI_TRTYP_MULTIPLE | MCI_TRDIR | MCI_MAXLAT)
+
+//*--------------------------------------------
+//* Class 3 commands: Sequential write commands
+//*--------------------------------------------
+
+#define SD_MMC_MMC_WRITE_DAT_UNTIL_STOP_CMD (20 | MCI_TRTYP_STREAM | MCI_SPCMD_NONE | MCI_RSPTYP_48 & ~(MCI_TRDIR) | MCI_TRCMD_START | MCI_MAXLAT ) // MMC
+
+//*------------------------------------------------
+//* Class 4 commands: Block oriented write commands
+//*------------------------------------------------
+
+#define SD_MMC_WRITE_BLOCK_CMD (24 | MCI_SPCMD_NONE | MCI_RSPTYP_48 | MCI_TRCMD_START | (MCI_TRTYP_BLOCK & ~(MCI_TRDIR)) | MCI_MAXLAT)
+#define SD_MMC_WRITE_MULTIPLE_BLOCK_CMD (25 | MCI_SPCMD_NONE | MCI_RSPTYP_48 | MCI_TRCMD_START | (MCI_TRTYP_MULTIPLE & ~(MCI_TRDIR)) | MCI_MAXLAT)
+#define SD_MMC_PROGRAM_CSD_CMD (27 | MCI_RSPTYP_48 )
+
+
+//*----------------------------------------
+//* Class 6 commands: Group Write protect
+//*----------------------------------------
+
+#define SD_MMC_SET_WRITE_PROT_CMD (28 | MCI_RSPTYP_48)
+#define SD_MMC_CLR_WRITE_PROT_CMD (29 | MCI_RSPTYP_48)
+#define SD_MMC_SEND_WRITE_PROT_CMD (30 | MCI_RSPTYP_48)
+
+
+//*----------------------------------------
+//* Class 5 commands: Erase commands
+//*----------------------------------------
+
+#define SD_MMC_TAG_SECTOR_START_CMD (32 | MCI_SPCMD_NONE | MCI_RSPTYP_48 | MCI_TRCMD_NO | MCI_MAXLAT)
+#define SD_MMC_TAG_SECTOR_END_CMD (33 | MCI_SPCMD_NONE | MCI_RSPTYP_48 | MCI_TRCMD_NO | MCI_MAXLAT)
+#define SD_MMC_MMC_UNTAG_SECTOR_CMD (34 | MCI_RSPTYP_48 )
+#define SD_MMC_MMC_TAG_ERASE_GROUP_START_CMD (35 | MCI_RSPTYP_48 )
+#define SD_MMC_MMC_TAG_ERASE_GROUP_END_CMD (36 | MCI_RSPTYP_48 )
+#define SD_MMC_MMC_UNTAG_ERASE_GROUP_CMD (37 | MCI_RSPTYP_48 )
+#define SD_MMC_ERASE_CMD (38 | MCI_SPCMD_NONE | MCI_RSPTYP_48 | MCI_TRCMD_NO | MCI_MAXLAT )
+
+//*----------------------------------------
+//* Class 7 commands: Lock commands
+//*----------------------------------------
+
+#define SD_MMC_LOCK_UNLOCK (42 | MCI_SPCMD_NONE | MCI_RSPTYP_48 | MCI_TRCMD_NO | MCI_MAXLAT) // no tested
+
+//*-----------------------------------------------
+// Class 8 commands: Application specific commands
+//*-----------------------------------------------
+#define SD_MMC_SD_SEND_IF_COND_CMD (8 | MCI_TRCMD_NO | MCI_SPCMD_NONE | MCI_RSPTYP_48 | MCI_MAXLAT )
+
+#define SD_MMC_APP_CMD (55 | MCI_SPCMD_NONE | MCI_RSPTYP_48 | MCI_TRCMD_NO | MCI_MAXLAT)
+#define SD_MMC_GEN_CMD (56 | MCI_SPCMD_NONE | MCI_RSPTYP_48 | MCI_TRCMD_NO | MCI_MAXLAT) // no tested
+#define MMC_SWITCH_CMD (6 | MCI_SPCMD_NONE | MCI_RSPTYP_48B | MCI_TRCMD_NO | MCI_MAXLAT)
+#define SD_SWITCH_FUNC (6 | MCI_SPCMD_NONE | MCI_RSPTYP_48 | MCI_TRCMD_START | MCI_TRTYP_BLOCK | MCI_TRDIR | MCI_MAXLAT)
+#define SD_MMC_SDCARD_SET_BUS_WIDTH_CMD (6 | MCI_SPCMD_NONE | MCI_RSPTYP_48 | MCI_TRCMD_NO | MCI_MAXLAT)
+#define SD_MMC_SDCARD_STATUS_CMD (13 | MCI_SPCMD_NONE | MCI_RSPTYP_48 | MCI_TRCMD_NO | MCI_MAXLAT)
+#define SD_MMC_SDCARD_SEND_NUM_WR_BLOCKS_CMD (22 | MCI_SPCMD_NONE | MCI_RSPTYP_48 | MCI_TRCMD_NO | MCI_MAXLAT)
+#define SD_MMC_SDCARD_SET_WR_BLK_ERASE_COUNT_CMD (23 | MCI_SPCMD_NONE | MCI_RSPTYP_48 | MCI_TRCMD_NO | MCI_MAXLAT)
+#define SD_MMC_SDCARD_APP_OP_COND_CMD (41 | MCI_SPCMD_NONE | MCI_RSPTYP_48 | MCI_TRCMD_NO )
+#define SD_MMC_SDCARD_SET_CLR_CARD_DETECT_CMD (42 | MCI_SPCMD_NONE | MCI_RSPTYP_48 | MCI_TRCMD_NO | MCI_MAXLAT)
+#define SD_MMC_SDCARD_SEND_SCR_CMD (51 | MCI_SPCMD_NONE | MCI_RSPTYP_48 | MCI_TRCMD_NO | MCI_MAXLAT)
+
+#define SD_MMC_SDCARD_APP_ALL_CMD ( MCI_SDCARD_SET_BUS_WIDTH_CMD +\
+ MCI_SDCARD_STATUS_CMD +\
+ MCI_SDCARD_SEND_NUM_WR_BLOCKS_CMD +\
+ MCI_SDCARD_SET_WR_BLK_ERASE_COUNT_CMD +\
+ MCI_SDCARD_APP_OP_COND_CMD +\
+ MCI_SDCARD_SET_CLR_CARD_DETECT_CMD +\
+ MCI_SDCARD_SEND_SCR_CMD)
+
+//*----------------------------------------
+//* Class 9 commands: IO Mode commands
+//*----------------------------------------
+
+#define SD_MMC_FAST_IO_CMD (39 | MCI_SPCMD_NONE | MCI_RSPTYP_48 | MCI_MAXLAT)
+#define SD_MMC_GO_IRQ_STATE_CMD (40 | MCI_SPCMD_NONE | MCI_RSPTYP_48 | MCI_TRCMD_NO | MCI_MAXLAT)
+
+#endif // _SD_MMC_CMD_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/sdmmc/sdmmc_mci/sd_mmc_mci.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/sdmmc/sdmmc_mci/sd_mmc_mci.c
new file mode 100644
index 0000000..98fb71e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/sdmmc/sdmmc_mci/sd_mmc_mci.c
@@ -0,0 +1,1700 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief SD/MMC card driver using MCI interface.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with an MCI module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+//_____ I N C L U D E S ____________________________________________________
+
+#include "conf_access.h"
+#include <stdio.h>
+
+
+#if SD_MMC_MCI_0_MEM == ENABLE || SD_MMC_MCI_1_MEM == ENABLE
+
+#include "gpio.h"
+#include "mci.h"
+#include "conf_sd_mmc_mci.h"
+#include "sd_mmc_mci.h"
+#include "cycle_counter.h"
+
+//_____ P R I V A T E D E C L A R A T I O N S ____________________________
+
+// Variable to manage the specification of the card
+Bool sd_mmc_mci_init_done[MCI_NR_SLOTS] = {FALSE, FALSE};
+
+U8 g_u8_card_type[ MCI_NR_SLOTS]; // Global Card Type
+U32 g_u32_card_rca[ MCI_NR_SLOTS]; // Global RCA
+U32 g_u32_card_size[ MCI_NR_SLOTS]; // Global Card Size
+U16 g_u16_card_freq[ MCI_NR_SLOTS]; // Global Card Frequency
+U8 g_u8_card_bus_width[ MCI_NR_SLOTS]; // Global Card Bus Width
+
+ // These buffers should be dynamically allocated; may be in the sd_mmc driver initialization.
+COMPILER_WORD_ALIGNED
+uint8_t sector_buf_0[SD_MMC_SECTOR_SIZE];
+
+COMPILER_WORD_ALIGNED
+uint8_t sector_buf_1[SD_MMC_SECTOR_SIZE];
+
+// Global Pbb Speed in case of reinitialization Launch
+U32 g_pbb_hz = 0;
+
+// Global Cpu speed, needed by the cpu_delay() function
+U32 g_cpu_hz = 0;
+
+// Variables to manage a standby/restart access
+volatile U32 gl_ptr_mem[MCI_NR_SLOTS]={0, 0};
+
+// MCI Instance
+volatile avr32_mci_t *mci = &AVR32_MCI;
+
+static Bool sd_mmc_mci_get_csd(U8 slot);
+static Bool sd_mmc_get_ext_csd( U8 slot );
+static Bool sd_mmc_set_block_len(U8 slot, U16 length );
+
+#if ACCESS_USB == ENABLED
+
+static Bool is_dma_ram_2_mci_complete( void );
+static void dma_ram_2_mci(const void *ram, size_t size);
+static Bool is_dma_mci_2_ram_complete( void );
+static void dma_mci_2_ram(void *ram, size_t size);
+
+#include "conf_usb.h"
+#ifndef USB_DEVICE_VENDOR_ID
+// USB Device Stack V1
+static Bool is_dma_usb_2_ram_complete( void );
+static void dma_usb_2_ram(void *ram, size_t size);
+static Bool is_dma_ram_2_usb_complete( void );
+static void dma_ram_2_usb(const void *ram, size_t size);
+#endif
+
+#endif
+
+
+//_____ D E F I N I T I O N S ______________________________________________
+
+Bool is_sd_mmc_mci_card_present(U8 slot)
+{
+ if (slot > MCI_LAST_SLOTS)
+ return FALSE;
+
+ switch(slot)
+ {
+ case MCI_SLOT_B:
+ return (gpio_get_pin_value(SD_SLOT_4BITS_CARD_DETECT)==SD_SLOT_4BITS_CARD_DETECT_VALUE);
+ case MCI_SLOT_A:
+ return (gpio_get_pin_value(SD_SLOT_8BITS_CARD_DETECT)==SD_SLOT_8BITS_CARD_DETECT_VALUE);
+ }
+
+ return FALSE;
+}
+
+Bool is_sd_mmc_mci_card_protected(U8 slot)
+{
+ if (slot > MCI_LAST_SLOTS)
+ return FALSE;
+
+ switch(slot)
+ {
+ case MCI_SLOT_B:
+ return (gpio_get_pin_value(SD_SLOT_4BITS_WRITE_PROTECT)==SD_SLOT_4BITS_WRITE_PROTECT_VALUE);
+ case MCI_SLOT_A:
+ return (gpio_get_pin_value(SD_SLOT_8BITS_WRITE_PROTECT)==SD_SLOT_8BITS_WRITE_PROTECT_VALUE);
+ }
+
+ return FALSE;
+}
+
+static Bool sd_mmc_mci_get_csd(U8 slot)
+{
+ csd_t csd;
+
+ U32 max_Read_DataBlock_Length;
+ U32 mult;
+ U32 blocknr;
+ U8 tmp;
+ const U16 freq_unit[4] = {10, 100, 1000, 10000};
+ const U8 mult_fact[16] = {0, 10, 12, 13, 15, 20, 26, 30, 35, 40, 45, 52, 55, 60, 70, 80}; // MMC tabs...
+
+ if (slot > MCI_LAST_SLOTS)
+ return FALSE;
+ // Select Slot card before any other command.
+ mci_select_card(mci, slot, g_u8_card_bus_width[slot]);
+
+ //-- (CMD9)
+ if (mci_send_cmd(mci, SD_MMC_SEND_CSD_CMD, g_u32_card_rca[slot])!=MCI_SUCCESS)
+ return FALSE;
+
+
+ csd.csd[0] = mci_read_response(mci);
+ csd.csd[1] = mci_read_response(mci);
+ csd.csd[2] = mci_read_response(mci);
+ csd.csd[3] = mci_read_response(mci);
+
+ //-- Read "System specification version", only available on MMC card
+ // field: SPEC_VERS (only on MMC)
+ if (MMC_CARD & g_u8_card_type[slot]) // TO BE ADDED
+ {
+ if (CSD_SPEC_VER_4_0 == (MSB0(csd.csd[0]) & CSD_MSK_SPEC_VER))
+ {
+ g_u8_card_type[slot] |= MMC_CARD_V4;
+ }
+ }
+
+ //-- Compute MMC/SD speed
+ // field: TRAN_SPEED (CSD V1 & V2 are the same)
+ g_u16_card_freq[slot] = mult_fact[csd.csd_v1.tranSpeed >> 3]; // Get Multiplier factor
+ if (SD_CARD & g_u8_card_type[slot])
+ {
+ // SD card don't have same frequency that MMC card
+ if( 26 == g_u16_card_freq[slot] )
+ {
+ g_u16_card_freq[slot] = 25;
+ }
+ else if( 52 == g_u16_card_freq[slot] )
+ {
+ g_u16_card_freq[slot] = 50;
+ }
+ }
+ g_u16_card_freq[slot] *= freq_unit[ csd.csd_v1.tranSpeed&0x07 ]; // Get transfer rate unit
+
+ //-- Compute card size in number of block
+ // field: WRITE_BL_LEN, READ_BL_LEN, C_SIZE (CSD V1 & V2 are not the same)
+ if (SD_CARD_HC & g_u8_card_type[slot])
+ {
+ g_u32_card_size[slot] = (csd.csd_v2.deviceSizeH<<16)+(csd.csd_v2.deviceSizeL&0xFFff);
+
+ // memory capacity = (C_SIZE+1) * 1K sector
+ g_u32_card_size[slot] = (g_u32_card_size[slot] + 1) << 10; // unit 512B
+ }
+ else
+ {
+ // Check block size
+ tmp = csd.csd_v1.writeBlLen; // WRITE_BL_LEN
+ if (tmp < CSD_BLEN_512)
+ return FALSE; // block size < 512B not supported by firmware
+
+ tmp = csd.csd_v1.readBlLen; // READ_BL_LEN
+ if (tmp < CSD_BLEN_512)
+ return FALSE; // block size < 512B not supported by firmware
+
+ //// Compute Memory Capacity
+ // compute MULT
+ mult = 1 << (csd.csd_v1.cSizeMult + 2);
+ max_Read_DataBlock_Length = 1<<csd.csd_v1.readBlLen;
+ // compute MSB of C_SIZE
+ blocknr = csd.csd_v1.deviceSizeH << 2;
+ // compute MULT * (LSB of C-SIZE + MSB already computed + 1) = BLOCKNR
+ blocknr = mult * ( blocknr + csd.csd_v1.deviceSizeL + 1 );
+ g_u32_card_size[slot] = ((max_Read_DataBlock_Length * blocknr)/512);
+ }
+
+ return TRUE;
+}
+
+static Bool sd_mmc_get_ext_csd( U8 slot )
+{
+ U8 i;
+ U32 val;
+
+ if (slot > MCI_LAST_SLOTS)
+ return FALSE;
+ // Select Slot card before any other command.
+ mci_select_card(mci, slot, g_u8_card_bus_width[slot]);
+
+ mci_set_block_size(mci, SD_MMC_SECTOR_SIZE); // Ext CSD = 512B size
+ mci_set_block_count(mci, 1);
+
+ //** (CMD8)
+ // read the extended CSD
+ if(mci_send_cmd(mci, SD_MMC_SEND_EXT_CSD_CMD, 0 )!=MCI_SUCCESS)
+ return FALSE;
+
+ // READ_EXT_CSD // discard bytes not used
+ for (i = (512L/8); i!=0; i--)
+ {
+ while(!(mci_rx_ready(mci)));
+ mci_rd_data(mci);
+ while(!(mci_rx_ready(mci)));
+ if( ((64-26) == i) && (g_u8_card_type[slot]&MMC_CARD_HC) )
+ {
+ // If MMC HC then read Sector Count. Byte 212 is LSB, Byte 215 is MSB.
+ val = mci_rd_data(mci);
+ g_u32_card_size[slot] = swap32(val);
+ }
+ else
+ {
+ val = mci_rd_data(mci);
+ if( (64-24) == i )
+ { // Read byte at offset 196
+ if( MSB0(val) & 0x02 )
+ g_u16_card_freq[slot] = 52*1000;
+ else
+ g_u16_card_freq[slot] = 26*1000;
+ }
+ }
+ }
+
+ return TRUE;
+}
+
+static Bool sd_mmc_set_block_len(U8 slot, U16 length )
+{
+ if (slot > MCI_LAST_SLOTS)
+ return FALSE;
+ // Select Slot card before any other command.
+ mci_select_card(mci, slot, g_u8_card_bus_width[slot]);
+
+ if(mci_send_cmd(mci, SD_MMC_SET_BLOCKLEN_CMD, length)!=MCI_SUCCESS)
+ return FALSE;
+
+ // check response, card must be in TRAN state
+ if ((mci_read_response(mci) & MMC_TRAN_STATE_MSK) != MMC_TRAN_STATE)
+ return FALSE;
+
+ mci_set_block_size(mci, length);
+ mci_set_block_count(mci, 1);
+ return TRUE;
+}
+
+Bool sd_mmc_mci_init(unsigned char card_slot, long pbb_hz, long cpu_hz)
+{
+ union
+ {
+ unsigned long mcfg;
+ avr32_hmatrix_mcfg_t MCFG;
+ } u_avr32_hmatrix_mcfg;
+
+ union
+ {
+ unsigned long scfg;
+ avr32_hmatrix_scfg_t SCFG;
+ } u_avr32_hmatrix_scfg;
+
+ // For the USBB DMA HMATRIX master, use infinite length burst.
+ u_avr32_hmatrix_mcfg.mcfg = AVR32_HMATRIX.mcfg[AVR32_HMATRIX_MASTER_USBB_DMA];
+ u_avr32_hmatrix_mcfg.MCFG.ulbt = AVR32_HMATRIX_ULBT_INFINITE;
+ AVR32_HMATRIX.mcfg[AVR32_HMATRIX_MASTER_USBB_DMA] = u_avr32_hmatrix_mcfg.mcfg;
+
+ // For the USBB DPRAM HMATRIX slave, use the USBB DMA as fixed default master.
+ u_avr32_hmatrix_scfg.scfg = AVR32_HMATRIX.scfg[AVR32_HMATRIX_SLAVE_USBB_DPRAM];
+ u_avr32_hmatrix_scfg.SCFG.fixed_defmstr = AVR32_HMATRIX_MASTER_USBB_DMA;
+ u_avr32_hmatrix_scfg.SCFG.defmstr_type = AVR32_HMATRIX_DEFMSTR_TYPE_FIXED_DEFAULT;
+ AVR32_HMATRIX.scfg[AVR32_HMATRIX_SLAVE_USBB_DPRAM] = u_avr32_hmatrix_scfg.scfg;
+
+ g_pbb_hz = pbb_hz;
+ g_cpu_hz = cpu_hz;
+
+ // Init MCI controler
+ if (mci_init(mci, card_slot, pbb_hz)!=MCI_SUCCESS)
+ return FALSE;
+
+ // Default card initialization. This can be removed since the card init will
+ // automatically be done when needed.
+ sd_mmc_mci_card_init(card_slot);
+ return TRUE;
+}
+
+Bool sd_mmc_mci_card_init(unsigned char slot)
+{
+ U32 u32_response;
+
+ if (TRUE == sd_mmc_mci_init_done[slot])
+ return TRUE;
+
+ // Default card is not known.
+ g_u8_card_type[slot] = UNKNOWN_CARD;
+
+ // Default bus size is 1 bit.
+ g_u8_card_bus_width[slot] = MCI_BUS_SIZE_1_BIT;
+
+ // Default card speed and disable High Speed mode.
+ mci_init(mci, slot, g_pbb_hz);
+
+ // Wait for 1ms, then wait for 74 more clock cycles (see MMC norms)
+ if (mci_send_cmd(mci, SD_MMC_INIT_STATE_CMD, 0xFFFFFFFF)!=MCI_SUCCESS)
+ return FALSE;
+
+ //-- (CMD0)
+ // Set card in idle state
+ if (mci_send_cmd(mci, SD_MMC_GO_IDLE_STATE_CMD, 0xFFFFFFFF)!=MCI_SUCCESS)
+ return FALSE;
+
+sd_mmc_init_step1:
+ // (CMD1)
+ // To send its Operating Conditions Register contents command only supported by MMC card
+ if(mci_send_cmd(mci, SD_MMC_MMC_SEND_OP_COND_CMD, OCR_MSK_BUSY|OCR_MSK_VOLTAGE_ALL|OCR_MSK_HC)==MCI_SUCCESS)
+ {
+ // MMC cards always respond to MMC_SEND_OP_COND
+ g_u8_card_type[slot] = MMC_CARD;
+ u32_response = mci_read_response(mci);
+ if( !(u32_response & OCR_MSK_BUSY) )
+ {
+ // here card busy, it did not completed its initialization process
+ // resend command MMC_SEND_OP_COND
+ goto sd_mmc_init_step1; // loop until it is ready
+ }
+ if( 0!=(u32_response & OCR_MSK_HC) )
+ {
+ g_u8_card_type[slot] |= MMC_CARD_HC;
+ }
+ }
+ else
+ {
+ // SD cards do not respond to MMC_SEND_OP_COND
+ g_u8_card_type[slot] = SD_CARD;
+
+ //-- (CMD8)
+ // enables to expand new functionality to some existing commands supported only by SD HC card
+ if (mci_send_cmd(mci, SD_MMC_SD_SEND_IF_COND_CMD, 0x000001AA)==MCI_SUCCESS)
+ {
+ // It is a SD HC
+ if( 0x000001AA == mci_read_response(mci))
+ {
+ g_u8_card_type[slot] |= SD_CARD_V2;
+ }
+ }
+
+sd_mmc_init_step2:
+ //-- (CMD55)
+ // Indicates to the card that the next command is an application specific command rather than a standard command
+ // CMD55 shall always precede ACMD41
+ if (mci_send_cmd(mci, SD_MMC_APP_CMD, 0)!=MCI_SUCCESS)
+ return FALSE;
+
+ //-- (ACMD41)
+ // Sends host OCR register
+ if( SD_CARD_V2 & g_u8_card_type[slot] )
+ {
+ // Sends host capacity support information (HCS)
+ if (mci_send_cmd(mci, SD_MMC_SDCARD_APP_OP_COND_CMD, OCR_MSK_BUSY|OCR_MSK_VOLTAGE_3_2V_3_3V|OCR_MSK_HC)!=MCI_SUCCESS)
+ return FALSE;
+ }
+ else
+ {
+ if (mci_send_cmd(mci, SD_MMC_SDCARD_APP_OP_COND_CMD, OCR_MSK_BUSY|OCR_MSK_VOLTAGE_3_2V_3_3V)!=MCI_SUCCESS)
+ return FALSE;
+ }
+ u32_response = mci_read_response(mci);
+
+ if( !(u32_response & OCR_MSK_BUSY) )
+ {
+ // Card Busy, resend ACMD41 precede of CMD55
+ goto sd_mmc_init_step2;
+ }
+ // Card read then check HC type
+ if (u32_response & OCR_MSK_HC)
+ {
+ g_u8_card_type[slot] |= SD_CARD_HC; // Card SD High Capacity
+ }
+ }
+
+
+ // Here card ready and type (MMC <V4, MMC V4, MMC HC, SD V1, SD V2 HC) detected
+
+ //-- (CMD2)
+ // Send CID
+ if (mci_send_cmd(mci, SD_MMC_ALL_SEND_CID_CMD, 0)!=MCI_SUCCESS)
+ return FALSE;
+
+ //-- (CMD3)
+ // Set relative address
+ if(MMC_CARD & g_u8_card_type[slot])
+ {
+ // For MMC card, you send an address to card
+ g_u32_card_rca[slot] = RCA_DEFAULT_ADR;
+ if(mci_send_cmd(mci, SD_MMC_SET_RELATIVE_ADDR_CMD, RCA_DEFAULT_ADR)!=MCI_SUCCESS)
+ return FALSE;
+ }
+ else
+ {
+ // For SD card, you ask an address to card
+ if(mci_send_cmd(mci, SD_MMC_SET_RELATIVE_ADDR_CMD, RCA_RESERVE_ADR)!=MCI_SUCCESS)
+ return FALSE;
+ }
+ if (SD_CARD & g_u8_card_type[slot])
+ {
+ // For SD card, you receiv address of card
+ g_u32_card_rca[slot] = mci_read_response(mci) & RCA_MSK_ADR ;
+ }
+
+
+ //-- (CMD9)
+ // Read & analyse CSD register
+ if (sd_mmc_mci_get_csd(slot)!=TRUE)
+ return FALSE;
+
+
+ //-- (CMD7)-R1b
+ // select card
+ if (mci_send_cmd(mci, SD_MMC_SEL_DESEL_CARD_CMD, g_u32_card_rca[slot])!=MCI_SUCCESS)
+ return FALSE;
+
+ // Wait end of busy
+ mci_wait_busy_signal(mci);// read busy state on DAT0
+
+ // Get clock by checking the extended CSD register
+ if (MMC_CARD_V4 & g_u8_card_type[slot])
+ {
+ // Get clock (MMC V4) and size (MMC V4 HC) by checking the extended CSD register
+ //-- (CMD8)
+ if (sd_mmc_get_ext_csd(slot)!=TRUE)
+ return FALSE;
+ }
+
+
+#if (SD_4_BIT == ENABLE)
+ // set bus size
+ if (SD_CARD & g_u8_card_type[slot])
+ {
+ // set 4-bit bus for SD Card
+ //-- (CMD55)
+ if(mci_send_cmd(mci, SD_MMC_APP_CMD, g_u32_card_rca[slot])!=MCI_SUCCESS)
+ return FALSE;
+
+ //-- (CMD6)
+ if(mci_send_cmd(mci, SD_MMC_SDCARD_SET_BUS_WIDTH_CMD, SD_BUS_4_BIT )!=MCI_SUCCESS)
+ return FALSE;
+
+ g_u8_card_bus_width[slot] = MCI_BUS_SIZE_4_BIT;
+ if (mci_set_bus_size(mci, g_u8_card_bus_width[slot])!=MCI_SUCCESS)
+ return FALSE;
+ }
+ else // MMC bus width management
+ {
+ // set 8-bit bus for MMC Card
+ if (MMC_CARD_V4 & g_u8_card_type[slot])
+ {
+ //-- (CMD6)-R1b
+ // set 8-bit bus width (appeared from V4.0 specification)
+ if (mci_send_cmd( mci,
+ MMC_SWITCH_CMD,
+ ( (U32)MMC_SWITCH_WRITE <<24)|
+ ((U32)MMC_SWITCH_BUS_WIDTH<<16)|
+ ((U32)MMC_SWITCH_VAL_8BIT << 8)|
+ ((U32)MMC_SWITCH_CMD_SET))!=MCI_SUCCESS)
+ {
+ return FALSE;
+ }
+ // Wait end of busy
+ mci_wait_busy_signal(mci);// read busy state on DAT0
+ g_u8_card_bus_width[slot] = MCI_BUS_SIZE_8_BIT;
+ if (mci_set_bus_size(mci, g_u8_card_bus_width[slot])!=MCI_SUCCESS)
+ return FALSE;
+ }
+ }
+#endif
+
+ if (MMC_CARD_V4 & g_u8_card_type[slot])
+ {
+ //-- (CMD6)-R1b
+ // set high speed interface timing
+ if (mci_send_cmd( mci,
+ MMC_SWITCH_CMD,
+ ((U32)MMC_SWITCH_WRITE <<24)|
+ ((U32)MMC_SWITCH_HIGH_SPEED<<16)|
+ ((U32)MMC_SWITCH_VAL_HS << 8)|
+ ((U32)MMC_SWITCH_CMD_SET))!=MCI_SUCCESS)
+ {
+ return FALSE;
+ }
+ // Wait end of busy
+ mci_wait_busy_signal(mci);
+ }
+
+
+ if( SD_CARD_V2 & g_u8_card_type[slot] )
+ {
+/** \brief Switch func argument definitions */
+#define SDMMC_SWITCH_FUNC_MODE_CHECK (0 << 31) /**< Check function */
+#define SDMMC_SWITCH_FUNC_MODE_SWITCH (1 << 31) /**< Switch function */
+#define SDMMC_SWITCH_FUNC_HIGH_SPEED (1 << 0) /**< High Speed */
+#define SDMMC_SWITCH_FUNC_G1_KEEP (0xf << 0) /**< Group 1 No influence */
+#define SDMMC_SWITCH_FUNC_G2_KEEP (0xf << 4) /**< Group 2 No influence */
+#define SDMMC_SWITCH_FUNC_G3_KEEP (0xf << 8) /**< Group 3 No influence */
+#define SDMMC_SWITCH_FUNC_G4_KEEP (0xf << 12) /**< Group 4 No influence */
+#define SDMMC_SWITCH_FUNC_G5_KEEP (0xf << 16) /**< Group 5 No influence */
+#define SDMMC_SWITCH_FUNC_G6_KEEP (0xf << 20) /**< Group 6 No influence */
+
+ mci_set_block_size(mci, 512/8); // CMD6 512 bits status
+ mci_set_block_count(mci, 1);
+
+ //-- (CMD6)
+ // Check if we can enter into the High Speed mode.
+ if (mci_send_cmd( mci
+ , SD_SWITCH_FUNC
+ , SDMMC_SWITCH_FUNC_MODE_CHECK | SDMMC_SWITCH_FUNC_HIGH_SPEED
+ )!=MCI_SUCCESS)
+ {
+ return FALSE;
+ }
+ // Wait end of busy
+ mci_wait_busy_signal(mci);// read busy state on DAT0
+
+ Bool b_hs_supported=FALSE;
+ {
+ U8 i;
+ for ( i = 0; i<(512L/8); i+=4)
+ {
+ volatile U32 data;
+ while(!(mci_rx_ready(mci)));
+ data = mci_rd_data(mci);
+ if(i==16)
+ {
+ if(((data>>24)&0xf)==1)
+ b_hs_supported=TRUE;
+ break;
+ }
+ }
+ }
+
+ if (b_hs_supported==FALSE )
+ goto sd_mmc_init_step3;
+
+ if (mci_send_cmd( mci
+ , SD_SWITCH_FUNC
+ , SDMMC_SWITCH_FUNC_MODE_SWITCH
+ | SDMMC_SWITCH_FUNC_G6_KEEP
+ | SDMMC_SWITCH_FUNC_G5_KEEP
+ | SDMMC_SWITCH_FUNC_G4_KEEP
+ | SDMMC_SWITCH_FUNC_G3_KEEP
+ | SDMMC_SWITCH_FUNC_G2_KEEP
+ | SDMMC_SWITCH_FUNC_HIGH_SPEED
+ )!=MCI_SUCCESS)
+ {
+ return FALSE;
+ }
+ {
+ U8 i;
+ for ( i = 0; i<(512L/8); i+=4)
+ {
+ volatile U32 data;
+ while(!(mci_rx_ready(mci)));
+ data = mci_rd_data(mci);
+ }
+ }
+
+ /* A 8 cycle delay is required after switch command
+ * @ 200KHz clock this should be 40 uS, but we use
+ * 80 to handle unprecise clock setting.
+ */
+ cpu_delay_us(80, g_cpu_hz);
+
+ union u_cfg{
+ unsigned long cfg;
+ avr32_mci_cfg_t CFG;
+ };
+ union u_cfg val;
+ val.cfg = mci->cfg;
+ val.CFG.hsmode = 1;
+ mci->cfg = val.cfg;
+
+ // deselect card
+ if (mci_send_cmd(mci, SD_MMC_SEL_DESEL_CARD_CMD, 0)!=MCI_SUCCESS)
+ return FALSE;
+
+ // Wait end of busy
+ mci_wait_busy_signal(mci);// read busy state on DAT0
+
+ //-- (CMD9)
+ // Read & analyse CSD register
+ if (sd_mmc_mci_get_csd(slot)!=TRUE)
+ return FALSE;
+
+ // select card
+ if (mci_send_cmd(mci, SD_MMC_SEL_DESEL_CARD_CMD, g_u32_card_rca[slot])!=MCI_SUCCESS)
+ return FALSE;
+
+ // Wait end of busy
+ mci_wait_busy_signal(mci);// read busy state on DAT0
+ }
+
+sd_mmc_init_step3:
+ // Set clock
+ mci_set_speed(mci, g_pbb_hz, g_u16_card_freq[slot]*1000);
+
+ //-- (CMD13)
+ // Check if card is ready, the card must be in TRAN state
+ if(sd_mmc_mci_cmd_send_status(slot)!=TRUE)
+ return FALSE;
+
+ if ((mci_read_response(mci) & MMC_TRAN_STATE_MSK) != MMC_TRAN_STATE)
+ return FALSE;
+
+ //-- (CMD16)
+ // Set the card block length to 512B
+ if (sd_mmc_set_block_len (slot, SD_MMC_SECTOR_SIZE)!=TRUE)
+ return FALSE;
+
+ // USB Test Unit Attention requires a state "busy" between "not present" and "ready" state
+ // otherwise never report card change
+ sd_mmc_mci_init_done[slot] = TRUE;
+
+ return TRUE;
+}
+
+Bool sd_mmc_mci_read_sector_2_ram(U8 slot, void *ram)
+{
+ U32 wordsToRead;
+ int *pRam = ram;
+
+ // Read data
+ wordsToRead = (SD_MMC_SECTOR_SIZE/sizeof(*pRam));
+ while(wordsToRead>0)
+ {
+ while(!(mci_rx_ready(mci)));
+ *pRam++ = mci_rd_data(mci);
+ while(!(mci_rx_ready(mci)));
+ *pRam++ = mci_rd_data(mci);
+ while(!(mci_rx_ready(mci)));
+ *pRam++ = mci_rd_data(mci);
+ while(!(mci_rx_ready(mci)));
+ *pRam++ = mci_rd_data(mci);
+ while(!(mci_rx_ready(mci)));
+ *pRam++ = mci_rd_data(mci);
+ while(!(mci_rx_ready(mci)));
+ *pRam++ = mci_rd_data(mci);
+ while(!(mci_rx_ready(mci)));
+ *pRam++ = mci_rd_data(mci);
+ while(!(mci_rx_ready(mci)));
+ *pRam++ = mci_rd_data(mci);
+ wordsToRead-=8;
+ }
+
+ return TRUE;
+}
+
+Bool sd_mmc_mci_dma_read_sector_2_ram(U8 slot, void *ram)
+{
+ int *pRam = ram;
+
+ // Src Address: the MCI registers.
+ AVR32_DMACA.sar1 = (U32)&AVR32_MCI.fifo;
+
+ // Dst Address: the OutputData[] array.
+ AVR32_DMACA.dar1 = (unsigned long)pRam;
+
+ // Channel 1 Ctrl register high
+ AVR32_DMACA.ctl1h =
+ ( (SD_MMC_SECTOR_SIZE/4) << AVR32_DMACA_CTL1H_BLOCK_TS_OFFSET) // Block transfer size
+ ;
+
+ // Enable Channel 1 : start the process.
+ AVR32_DMACA.chenreg = ((2<<AVR32_DMACA_CHENREG_CH_EN_OFFSET) | (2<<AVR32_DMACA_CHENREG_CH_EN_WE_OFFSET));
+
+ // Wait for the end of the AES->RAM transfer (channel 1).
+ while(AVR32_DMACA.chenreg & (2<<AVR32_DMACA_CHENREG_CH_EN_OFFSET));
+
+ return TRUE;
+}
+
+Bool sd_mmc_mci_read_multiple_sector_2_ram(U8 slot, void *ram, U32 nb_sector)
+{
+ U32 wordsToRead;
+ int *pRam = ram;
+
+ // Read data
+ while( nb_sector>0 )
+ {
+ wordsToRead = (SD_MMC_SECTOR_SIZE/sizeof(*pRam));
+ while(wordsToRead>0)
+ {
+ while(!(mci_rx_ready(mci)));
+ *pRam++ = mci_rd_data(mci);
+ while(!(mci_rx_ready(mci)));
+ *pRam++ = mci_rd_data(mci);
+ while(!(mci_rx_ready(mci)));
+ *pRam++ = mci_rd_data(mci);
+ while(!(mci_rx_ready(mci)));
+ *pRam++ = mci_rd_data(mci);
+ while(!(mci_rx_ready(mci)));
+ *pRam++ = mci_rd_data(mci);
+ while(!(mci_rx_ready(mci)));
+ *pRam++ = mci_rd_data(mci);
+ while(!(mci_rx_ready(mci)));
+ *pRam++ = mci_rd_data(mci);
+ while(!(mci_rx_ready(mci)));
+ *pRam++ = mci_rd_data(mci);
+ wordsToRead-=8;
+ }
+ nb_sector--;
+ }
+
+ return TRUE;
+}
+
+#if ACCESS_USB == ENABLED
+
+#ifndef USB_DEVICE_VENDOR_ID
+// USB Device Stack V1
+#include "usb_drv.h"
+#include "scsi_decoder.h"
+static void dma_ram_2_usb(const void *ram, size_t size)
+{
+ AVR32_USBB_UDDMAX_nextdesc(g_scsi_ep_ms_in) = (U32)NULL;
+ AVR32_USBB_UDDMAX_addr(g_scsi_ep_ms_in) = (U32)ram;
+ AVR32_USBB_UDDMAX_control(g_scsi_ep_ms_in) = ((size << AVR32_USBB_UXDMAX_CONTROL_CH_BYTE_LENGTH_OFFSET)
+ & AVR32_USBB_UXDMAX_CONTROL_CH_BYTE_LENGTH_MASK)
+ //| AVR32_USBB_UXDMAX_CONTROL_BURST_LOCK_EN_MASK
+ //| AVR32_USBB_UXDMAX_CONTROL_DMAEND_EN_MASK
+ //| AVR32_USBB_UXDMAX_CONTROL_BUFF_CLOSE_IN_EN_MASK
+ | AVR32_USBB_UXDMAX_CONTROL_CH_EN_MASK;
+
+ // Workaround for bug 3501.
+ (void)AVR32_USBB_UDDMAX_control(g_scsi_ep_ms_in);
+}
+
+static Bool is_dma_ram_2_usb_complete( void )
+{
+ if(AVR32_USBB_UDDMAX_status(g_scsi_ep_ms_in) & AVR32_USBB_UXDMAX_STATUS_CH_EN_MASK)
+ return FALSE;
+ else
+ return TRUE;
+}
+#endif
+
+static void dma_mci_2_ram(void *ram, size_t size)
+{
+ int *pRam = ram;
+
+ // Src Address: the MCI registers.
+ AVR32_DMACA.sar1 = (U32)&AVR32_MCI.fifo;
+
+ // Dst Address: the OutputData[] array.
+ AVR32_DMACA.dar1 = (unsigned long)pRam;
+
+ // Channel 1 Ctrl register high
+ AVR32_DMACA.ctl1h =
+ ( (size/4) << AVR32_DMACA_CTL1H_BLOCK_TS_OFFSET) // Block transfer size
+ ;
+
+ // Enable Channel 1 : start the process.
+ AVR32_DMACA.chenreg = ((2<<AVR32_DMACA_CHENREG_CH_EN_OFFSET) | (2<<AVR32_DMACA_CHENREG_CH_EN_WE_OFFSET));
+}
+
+static Bool is_dma_mci_2_ram_complete( void )
+{
+ // Wait for the end of the AES->RAM transfer (channel 1).
+ if (AVR32_DMACA.chenreg & (2<<AVR32_DMACA_CHENREG_CH_EN_OFFSET))
+ return FALSE;
+
+ return TRUE;
+}
+#endif
+
+Bool sd_mmc_mci_dma_read_multiple_sector_2_ram(U8 slot, void *ram, U32 nb_sector)
+{
+ int *pRam = ram;
+
+ // Src Address: the MCI registers.
+ AVR32_DMACA.sar1 = (U32)&AVR32_MCI.fifo;
+
+ // Dst Address: the OutputData[] array.
+ AVR32_DMACA.dar1 = (unsigned long)pRam;
+
+ // Channel 1 Ctrl register high
+ AVR32_DMACA.ctl1h =
+ ( (nb_sector*(SD_MMC_SECTOR_SIZE/4)) << AVR32_DMACA_CTL1H_BLOCK_TS_OFFSET) // Block transfer size
+ ;
+
+ // Enable Channel 1 : start the process.
+ AVR32_DMACA.chenreg = ((2<<AVR32_DMACA_CHENREG_CH_EN_OFFSET) | (2<<AVR32_DMACA_CHENREG_CH_EN_WE_OFFSET));
+
+ // Wait for the end of the AES->RAM transfer (channel 1).
+ while(AVR32_DMACA.chenreg & (2<<AVR32_DMACA_CHENREG_CH_EN_OFFSET));
+
+ return TRUE;
+}
+
+Bool sd_mmc_mci_write_sector_from_ram(U8 slot, const void *ram)
+{
+ U32 wordsToWrite;
+ const unsigned int *pRam = ram;
+
+ // Write Data
+ wordsToWrite = (SD_MMC_SECTOR_SIZE/sizeof(*pRam));
+ while(wordsToWrite>0)
+ {
+ while(!mci_tx_ready(mci));
+ mci_wr_data(mci,*pRam++);
+ while(!mci_tx_ready(mci));
+ mci_wr_data(mci,*pRam++);
+ while(!mci_tx_ready(mci));
+ mci_wr_data(mci,*pRam++);
+ while(!mci_tx_ready(mci));
+ mci_wr_data(mci,*pRam++);
+ while(!mci_tx_ready(mci));
+ mci_wr_data(mci,*pRam++);
+ while(!mci_tx_ready(mci));
+ mci_wr_data(mci,*pRam++);
+ while(!mci_tx_ready(mci));
+ mci_wr_data(mci,*pRam++);
+ while(!mci_tx_ready(mci));
+ mci_wr_data(mci,*pRam++);
+ wordsToWrite-=8;
+ }
+
+ return TRUE;
+}
+
+Bool sd_mmc_mci_dma_write_sector_from_ram(U8 slot, const void *ram)
+{
+ const unsigned int *pRam = ram;
+
+ // Dst Address: the OutputData[] array.
+ AVR32_DMACA.sar1 = (unsigned long)pRam;
+
+ // Src Address: the MCI registers.
+ AVR32_DMACA.dar1 = (U32)&AVR32_MCI.fifo;
+
+ // Channel 1 Ctrl register high
+ AVR32_DMACA.ctl1h =
+ ( (SD_MMC_SECTOR_SIZE/4) << AVR32_DMACA_CTL1H_BLOCK_TS_OFFSET) // Block transfer size
+ ;
+
+ // Enable Channel 1 : start the process.
+ AVR32_DMACA.chenreg = ((2<<AVR32_DMACA_CHENREG_CH_EN_OFFSET) | (2<<AVR32_DMACA_CHENREG_CH_EN_WE_OFFSET));
+
+ // Wait for the end of the AES->RAM transfer (channel 1).
+ while(AVR32_DMACA.chenreg & (2<<AVR32_DMACA_CHENREG_CH_EN_OFFSET));
+
+ return TRUE;
+}
+
+Bool sd_mmc_mci_write_multiple_sector_from_ram(U8 slot, const void *ram, U32 nb_sector)
+{
+ U32 wordsToWrite;
+ const unsigned int *pRam = ram;
+
+ // Write Data
+ while( nb_sector>0 )
+ {
+ wordsToWrite = (SD_MMC_SECTOR_SIZE/sizeof(*pRam));
+ while(wordsToWrite>0)
+ {
+ while(!mci_tx_ready(mci));
+ mci_wr_data(mci,*pRam++);
+ while(!mci_tx_ready(mci));
+ mci_wr_data(mci,*pRam++);
+ while(!mci_tx_ready(mci));
+ mci_wr_data(mci,*pRam++);
+ while(!mci_tx_ready(mci));
+ mci_wr_data(mci,*pRam++);
+ while(!mci_tx_ready(mci));
+ mci_wr_data(mci,*pRam++);
+ while(!mci_tx_ready(mci));
+ mci_wr_data(mci,*pRam++);
+ while(!mci_tx_ready(mci));
+ mci_wr_data(mci,*pRam++);
+ while(!mci_tx_ready(mci));
+ mci_wr_data(mci,*pRam++);
+ wordsToWrite-=8;
+ }
+ nb_sector--;
+ }
+
+ return TRUE;
+}
+
+#if ACCESS_USB == ENABLED
+
+#ifndef USB_DEVICE_VENDOR_ID
+// USB Device Stack V1
+#include "usb_drv.h"
+#include "scsi_decoder.h"
+static void dma_usb_2_ram(void *ram, size_t size)
+{
+ AVR32_USBB_UDDMAX_nextdesc(g_scsi_ep_ms_out) = (U32)NULL;
+ AVR32_USBB_UDDMAX_addr(g_scsi_ep_ms_out) = (U32)ram;
+ AVR32_USBB_UDDMAX_control(g_scsi_ep_ms_out) = ((size << AVR32_USBB_UXDMAX_CONTROL_CH_BYTE_LENGTH_OFFSET)
+ & AVR32_USBB_UXDMAX_CONTROL_CH_BYTE_LENGTH_MASK)
+ //| AVR32_USBB_UXDMAX_CONTROL_BURST_LOCK_EN_MASK
+ //| AVR32_USBB_UXDMAX_CONTROL_DMAEND_EN_MASK
+ //| AVR32_USBB_UXDMAX_CONTROL_BUFF_CLOSE_IN_EN_MASK
+ | AVR32_USBB_UXDMAX_CONTROL_CH_EN_MASK;
+
+ // Workaround for bug 3501.
+ (void)AVR32_USBB_UDDMAX_control(g_scsi_ep_ms_out);
+}
+
+static Bool is_dma_usb_2_ram_complete( void )
+{
+ if(AVR32_USBB_UDDMAX_status(g_scsi_ep_ms_out) & AVR32_USBB_UXDMAX_STATUS_CH_EN_MASK)
+ return FALSE;
+ else
+ return TRUE;
+}
+#endif
+
+static void dma_ram_2_mci(const void *ram, size_t size)
+{
+ const unsigned int *pRam = ram;
+
+ // Dst Address: the OutputData[] array.
+ AVR32_DMACA.sar1 = (unsigned long)pRam;
+
+ // Src Address: the MCI registers.
+ AVR32_DMACA.dar1 = (U32)&AVR32_MCI.fifo;
+
+ // Channel 1 Ctrl register high
+ AVR32_DMACA.ctl1h =
+ ( (size/4) << AVR32_DMACA_CTL1H_BLOCK_TS_OFFSET) // Block transfer size
+ ;
+
+ // Enable Channel 1 : start the process.
+ AVR32_DMACA.chenreg = ((2<<AVR32_DMACA_CHENREG_CH_EN_OFFSET) | (2<<AVR32_DMACA_CHENREG_CH_EN_WE_OFFSET));
+}
+
+static Bool is_dma_ram_2_mci_complete( void )
+{
+ // Wait for the end of the AES->RAM transfer (channel 1).
+ if (AVR32_DMACA.chenreg & (2<<AVR32_DMACA_CHENREG_CH_EN_OFFSET))
+ return FALSE;
+
+ return TRUE;
+}
+#endif
+
+Bool sd_mmc_mci_dma_write_multiple_sector_from_ram(U8 slot, const void *ram, U32 nb_sector)
+{
+ const unsigned int *pRam = ram;
+
+ // Dst Address: the OutputData[] array.
+ AVR32_DMACA.sar1 = (unsigned long)pRam;
+
+ // Src Address: the MCI registers.
+ AVR32_DMACA.dar1 = (U32)&AVR32_MCI.fifo;
+
+ // Channel 1 Ctrl register high
+ AVR32_DMACA.ctl1h =
+ ( (nb_sector*(SD_MMC_SECTOR_SIZE/4)) << AVR32_DMACA_CTL1H_BLOCK_TS_OFFSET) // Block transfer size
+ ;
+
+ // Enable Channel 1 : start the process.
+ AVR32_DMACA.chenreg = ((2<<AVR32_DMACA_CHENREG_CH_EN_OFFSET) | (2<<AVR32_DMACA_CHENREG_CH_EN_WE_OFFSET));
+
+ // Wait for the end of the AES->RAM transfer (channel 1).
+ while(AVR32_DMACA.chenreg & (2<<AVR32_DMACA_CHENREG_CH_EN_OFFSET));
+
+ return TRUE;
+}
+
+Bool sd_mmc_mci_mem_check(U8 slot)
+{
+ U8 timeout_init = 0;
+
+ if (slot > MCI_LAST_SLOTS)
+ return FALSE;
+
+ // Select Slot card before any other command.
+ mci_select_card(mci, slot, g_u8_card_bus_width[slot]);
+
+ // Check card presence
+ if (is_sd_mmc_mci_card_present(slot) == FALSE)
+ {
+ sd_mmc_mci_init_done[slot] = FALSE;
+ return FALSE;
+ }
+
+ if (sd_mmc_mci_init_done[slot] == FALSE)
+ {
+ while (sd_mmc_mci_card_init(slot)!=TRUE)
+ {
+ timeout_init++;
+ if (timeout_init>10) return FALSE;
+ }
+ }
+ if (sd_mmc_mci_init_done[slot] == TRUE)
+ return TRUE;
+ else
+ return FALSE;
+}
+
+Bool sd_mmc_mci_read_open (U8 slot, U32 pos, U16 nb_sector)
+{
+ U32 addr;
+
+ if (slot > MCI_LAST_SLOTS)
+ return FALSE;
+
+ // Select Slot card before any other command.
+ mci_select_card(mci, slot, g_u8_card_bus_width[slot]);
+
+ // Set the global memory ptr at a Byte address.
+ gl_ptr_mem[slot] = pos ;
+
+ // wait for MMC not busy
+ mci_wait_busy_signal(mci);
+
+ addr = gl_ptr_mem[slot];
+ // send command
+ if((!(SD_CARD_HC & g_u8_card_type[slot]))
+ && (!(MMC_CARD_HC & g_u8_card_type[slot])) )
+ {
+ addr <<= 9; // For NO HC card the address must be translate in byte address
+ }
+
+ //** (CMD13)
+ // Necessary to clear flag error "ADDRESS_OUT_OF_RANGE" (ID LABO = MMC15)
+ if(mci_send_cmd(mci, SD_MMC_SEND_STATUS_CMD, g_u32_card_rca[slot])!=MCI_SUCCESS)
+ {
+ return FALSE;
+ }
+
+ // Request Block Length
+ mci_set_block_size(mci, SD_MMC_SECTOR_SIZE);
+
+ // Set Block Count
+ mci_set_block_count(mci, nb_sector);
+
+ //** (CMD17)
+ if(mci_send_cmd(mci, SD_MMC_READ_MULTIPLE_BLOCK_CMD, addr)!=MCI_SUCCESS)
+ {
+ return FALSE;
+ }
+
+ // check response
+ if ((mci_read_response(mci) & CS_FLAGERROR_RD_WR) != 0)
+ {
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+Bool sd_mmc_mci_dma_read_open(U8 slot, U32 pos, void* ram, U16 nb_sector)
+{
+ U32 addr;
+
+ if (slot > MCI_LAST_SLOTS)
+ return FALSE;
+
+ // Select Slot card before any other command.
+ mci_select_card(mci, slot, g_u8_card_bus_width[slot]);
+
+ // Set the global memory ptr at a Byte address.
+ gl_ptr_mem[slot] = pos ;
+
+ // wait for MMC not busy
+ mci_wait_busy_signal(mci);
+
+ addr = gl_ptr_mem[slot];
+ // send command
+ if((!(SD_CARD_HC & g_u8_card_type[slot]))
+ && (!(MMC_CARD_HC & g_u8_card_type[slot])) )
+ {
+ addr <<= 9; // For NO HC card the address must be translate in byte address
+ }
+
+ //** (CMD13)
+ // Necessary to clear flag error "ADDRESS_OUT_OF_RANGE" (ID LABO = MMC15)
+ if(mci_send_cmd(mci, SD_MMC_SEND_STATUS_CMD, g_u32_card_rca[slot])!=MCI_SUCCESS)
+ {
+ return FALSE;
+ }
+
+ // Request Block Length
+ mci_set_block_size(mci, SD_MMC_SECTOR_SIZE);
+
+ // Set Block Count
+ mci_set_block_count(mci, nb_sector);
+
+ // Enable the DMACA
+ AVR32_DMACA.dmacfgreg = 1 << AVR32_DMACA_DMACFGREG_DMA_EN_OFFSET;
+
+ AVR32_MCI.dma = 0;
+
+ // Linked list ptrs: not used.
+ AVR32_DMACA.llp1 = 0x00000000;
+
+ // Channel 1 Ctrl register low
+ AVR32_DMACA.ctl1l =
+ (0 << AVR32_DMACA_CTL1L_INT_EN_OFFSET) | // Do not enable interrupts
+ (2 << AVR32_DMACA_CTL1L_DST_TR_WIDTH_OFFSET) | // Dst transfer width: 32 bits
+ (2 << AVR32_DMACA_CTL1L_SRC_TR_WIDTH_OFFSET) | // Src transfer width: 32 bits
+ (0 << AVR32_DMACA_CTL1L_DINC_OFFSET) | // Dst address increment: increment
+ (0 << AVR32_DMACA_CTL1L_SINC_OFFSET) | // Src address increment: increment
+ (3 << AVR32_DMACA_CTL1L_DST_MSIZE_OFFSET) | // Dst burst transaction len: 16 data items
+ (3 << AVR32_DMACA_CTL1L_SRC_MSIZE_OFFSET) | // Src burst transaction len: 16 data items
+ (0 << AVR32_DMACA_CTL1L_S_GATH_EN_OFFSET) | // Source gather: disabled
+ (0 << AVR32_DMACA_CTL1L_D_SCAT_EN_OFFSET) | // Destination scatter: disabled
+ (2 << AVR32_DMACA_CTL1L_TT_FC_OFFSET) | // transfer type:P2M, flow controller: DMACA
+ (1 << AVR32_DMACA_CTL1L_DMS_OFFSET) | // Dest master: HSB master 2
+ (0 << AVR32_DMACA_CTL1L_SMS_OFFSET) | // Source master: HSB master 1
+ (0 << AVR32_DMACA_CTL1L_LLP_D_EN_OFFSET) | // Not used
+ (0 << AVR32_DMACA_CTL1L_LLP_S_EN_OFFSET) // Not used
+ ;
+
+ // Channel 1 Config register low
+ AVR32_DMACA.cfg1l =
+ (0 << AVR32_DMACA_CFG1L_HS_SEL_DST_OFFSET) | // Destination handshaking: ignored because the dst is memory.
+ (0 << AVR32_DMACA_CFG1L_HS_SEL_SRC_OFFSET) // Source handshaking: hw handshaking
+ ; // All other bits set to 0.
+
+ // Channel 1 Config register high
+ AVR32_DMACA.cfg1h =
+ (0 << AVR32_DMACA_CFG1H_DEST_PER_OFFSET) | // Dest hw handshaking itf: ignored because the dst is memory.
+ (AVR32_DMACA_CH_MMCI_RX << AVR32_DMACA_CFG1H_SRC_PER_OFFSET) // Source hw handshaking itf:
+ ; // All other bits set to 0.
+
+ // Setup MCI DMA register
+ AVR32_MCI.dma = AVR32_MCI_DMA_DMAEN_MASK | (AVR32_MCI_DMA_CHKSIZE_16_BYTES << AVR32_MCI_DMA_CHKSIZE_OFFSET);
+
+ //** (CMD17)
+ if(mci_send_cmd(mci, SD_MMC_READ_MULTIPLE_BLOCK_CMD, addr)!=MCI_SUCCESS)
+ {
+ return FALSE;
+ }
+
+ // check response
+ if ((mci_read_response(mci) & CS_FLAGERROR_RD_WR) != 0)
+ {
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+Bool sd_mmc_mci_read_close (U8 slot)
+{
+ if( (mci_crc_error(mci)) )
+ {
+ return FALSE; // An CRC error has been seen
+ }
+
+ mci_wait_busy_signal(mci);
+
+ if( mci_send_cmd( mci, SD_MMC_STOP_READ_TRANSMISSION_CMD, 0xffffffff ) != MCI_SUCCESS)
+ return FALSE;
+
+ /*
+ if( (mci_overrun_error(mci)) )
+ {
+ return FALSE;
+ }
+
+ if( (mci_underrun_error(mci)) )
+ {
+ return FALSE;
+ }*/
+
+ return TRUE;
+}
+
+Bool sd_mmc_mci_write_open (U8 slot, U32 pos, U16 nb_sector)
+{
+ U32 addr;
+
+ if (slot > MCI_LAST_SLOTS)
+ return FALSE;
+
+ // Select Slot card before any other command.
+ mci_select_card(mci,slot,g_u8_card_bus_width[slot]);
+
+ // Set the global memory ptr at a Byte address.
+ gl_ptr_mem[slot] = pos ;
+
+ // wait for MMC not busy
+ mci_wait_busy_signal(mci);
+
+ /*
+ // (CMD13)
+ // Necessary to clear flag error "ADDRESS_OUT_OF_RANGE" (ID LABO = MMC15)
+ if( !mmc_drv_send_cmd( MMC_SEND_STATUS, g_u32_card_rca, MMC_RESP_R1 ) )
+ {
+ return FALSE;
+ }
+ mmc_drv_read_response();
+ */
+
+ addr = gl_ptr_mem[slot];
+ // send command
+ if((!(SD_CARD_HC & g_u8_card_type[slot]))
+ && (!(MMC_CARD_HC & g_u8_card_type[slot])) )
+ {
+ addr <<= 9; // For NO HC card the address must be translate in byte address
+ }
+
+ // Set Block Length
+ mci_set_block_size(mci, SD_MMC_SECTOR_SIZE);
+
+ // Set Block Count
+ mci_set_block_count(mci, nb_sector);
+
+ //** (CMD24)
+ if(mci_send_cmd(mci, SD_MMC_WRITE_MULTIPLE_BLOCK_CMD, addr )!=MCI_SUCCESS)
+ {
+ return FALSE;
+ }
+
+ // check response
+ if ((mci_read_response(mci) & CS_FLAGERROR_RD_WR) != 0)
+ {
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+Bool sd_mmc_mci_dma_write_open (U8 slot, U32 pos, const void* ram, U16 nb_sector)
+{
+ U32 addr;
+
+ if (slot > MCI_LAST_SLOTS)
+ return FALSE;
+
+ // Select Slot card before any other command.
+ mci_select_card(mci, slot, g_u8_card_bus_width[slot]);
+
+ // Set the global memory ptr at a Byte address.
+ gl_ptr_mem[slot] = pos ;
+
+ // wait for MMC not busy
+ mci_wait_busy_signal(mci);
+
+ /*
+ // (CMD13)
+ // Necessary to clear flag error "ADDRESS_OUT_OF_RANGE" (ID LABO = MMC15)
+ if( !mmc_drv_send_cmd( MMC_SEND_STATUS, g_u32_card_rca, MMC_RESP_R1 ) )
+ {
+ return FALSE;
+ }
+ mmc_drv_read_response();
+ */
+
+ addr = gl_ptr_mem[slot];
+ // send command
+ if((!(SD_CARD_HC & g_u8_card_type[slot]))
+ && (!(MMC_CARD_HC & g_u8_card_type[slot])) )
+ {
+ addr <<= 9; // For NO HC card the address must be translate in byte address
+ }
+
+ // Set Block Length
+ mci_set_block_size(mci, SD_MMC_SECTOR_SIZE);
+
+ // Set Block Count
+ mci_set_block_count(mci, nb_sector);
+
+ // Enable the DMACA
+ AVR32_DMACA.dmacfgreg = 1 << AVR32_DMACA_DMACFGREG_DMA_EN_OFFSET;
+
+ AVR32_MCI.dma = 0;
+
+ // Linked list ptrs: not used.
+ AVR32_DMACA.llp1 = 0x00000000;
+
+ // Channel 1 Ctrl register low
+ AVR32_DMACA.ctl1l =
+ (0 << AVR32_DMACA_CTL1L_INT_EN_OFFSET) | // Do not enable interrupts
+ (2 << AVR32_DMACA_CTL1L_DST_TR_WIDTH_OFFSET) | // Dst transfer width: 32 bits
+ (2 << AVR32_DMACA_CTL1L_SRC_TR_WIDTH_OFFSET) | // Src transfer width: 32 bits
+ (0 << AVR32_DMACA_CTL1L_DINC_OFFSET) | // Dst address increment: increment
+ (0 << AVR32_DMACA_CTL1L_SINC_OFFSET) | // Src address increment: increment
+ (3 << AVR32_DMACA_CTL1L_DST_MSIZE_OFFSET) | // Dst burst transaction len: 16 data items
+ (3 << AVR32_DMACA_CTL1L_SRC_MSIZE_OFFSET) | // Src burst transaction len: 16 data items
+ (0 << AVR32_DMACA_CTL1L_S_GATH_EN_OFFSET) | // Source gather: disabled
+ (0 << AVR32_DMACA_CTL1L_D_SCAT_EN_OFFSET) | // Destination scatter: disabled
+ (1 << AVR32_DMACA_CTL1L_TT_FC_OFFSET) | // transfer type:M2P, flow controller: DMACA
+ (0 << AVR32_DMACA_CTL1L_DMS_OFFSET) | // Dest master: HSB master 1
+ (1 << AVR32_DMACA_CTL1L_SMS_OFFSET) | // Source master: HSB master 2
+ (0 << AVR32_DMACA_CTL1L_LLP_D_EN_OFFSET) | // Not used
+ (0 << AVR32_DMACA_CTL1L_LLP_S_EN_OFFSET) // Not used
+ ;
+
+ // Channel 1 Config register low
+ AVR32_DMACA.cfg1l =
+ (0 << AVR32_DMACA_CFG1L_HS_SEL_DST_OFFSET) | // Destination handshaking: hw handshaking
+ (0 << AVR32_DMACA_CFG1L_HS_SEL_SRC_OFFSET) // Source handshaking: ignored because the dst is memory.
+ ; // All other bits set to 0.
+
+ // Channel 1 Config register high
+ AVR32_DMACA.cfg1h =
+ (AVR32_DMACA_CH_MMCI_TX << AVR32_DMACA_CFG1H_DEST_PER_OFFSET) | // Dest hw handshaking itf:
+ (0 << AVR32_DMACA_CFG1H_SRC_PER_OFFSET) // Source hw handshaking itf: ignored because the dst is memory.
+ ; // All other bits set to 0.
+
+ // Setup MCI DMA register
+ AVR32_MCI.dma = AVR32_MCI_DMA_DMAEN_MASK | (AVR32_MCI_DMA_CHKSIZE_16_BYTES << AVR32_MCI_DMA_CHKSIZE_OFFSET);
+
+ //** (CMD24)
+ if(mci_send_cmd(mci, SD_MMC_WRITE_MULTIPLE_BLOCK_CMD, addr )!=MCI_SUCCESS)
+ {
+ return FALSE;
+ }
+
+ // check response
+ if ((mci_read_response(mci) & CS_FLAGERROR_RD_WR) != 0)
+ {
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+Bool sd_mmc_mci_write_close (U8 slot)
+{
+ if( (mci_crc_error(mci)) )
+ {
+ return FALSE; // An CRC error has been seen
+ }
+
+ while(!(mci_data_block_ended(mci)));
+
+ if( mci_send_cmd( mci, SD_MMC_STOP_WRITE_TRANSMISSION_CMD, 0xffffffff ) != MCI_SUCCESS)
+ {
+ return FALSE;
+ }
+
+ /*
+ if( (mci_overrun_error(mci)) )
+ {
+ return FALSE;
+ }
+
+ if( (mci_underrun_error(mci)) )
+ {
+ return FALSE;
+ }*/
+
+ if( slot==SD_SLOT_4BITS )
+ {
+ while(!(gpio_get_pin_value(SD_SLOT_4BITS_DATA0_PIN))); // Wait until the card is ready.
+ }
+ else
+ {
+ while(!(gpio_get_pin_value(SD_SLOT_8BITS_DATA0_PIN))); // Wait until the card is ready.
+ }
+ return TRUE;
+}
+
+#if ACCESS_USB == ENABLED
+
+#ifdef USB_DEVICE_VENDOR_ID
+// USB Device Stack V2
+#include "udi_msc.h"
+
+Bool sd_mmc_mci_read_multiple_sector(U8 slot, U16 nb_sector)
+{
+ Bool b_first_step=TRUE;
+ U8 buffer_id=0;
+
+ // Pipeline the 2 DMA transfer in order to speed-up the performances:
+ // DMA MCI -> RAM
+ // DMA RAM -> USB
+ //
+ while (nb_sector--) {
+ // (re)load first stage.
+ dma_mci_2_ram((0==(buffer_id++%2))?&sector_buf_0:&sector_buf_1, SD_MMC_SECTOR_SIZE);
+
+ // (re)load second stage.
+ if( !b_first_step ) {
+ if (!udi_msc_trans_block(true, (0==(buffer_id%2))?sector_buf_0:sector_buf_1, SD_MMC_SECTOR_SIZE, NULL)) {
+ return FALSE;
+ }
+
+ }
+ b_first_step = FALSE;
+ // Wait completion of DMACA stage.
+ while( !is_dma_mci_2_ram_complete() );
+ }
+
+ // Complete execution of the last transfer (which is in the pipe).
+ if (!udi_msc_trans_block(true, (0!=(buffer_id%2))?sector_buf_0:sector_buf_1, SD_MMC_SECTOR_SIZE, NULL))
+ return FALSE;
+
+ return TRUE;
+}
+
+Bool sd_mmc_mci_write_multiple_sector(U8 slot, U16 nb_sector)
+{
+ Bool b_first_step=TRUE;
+ uint8_t buffer_id=0;
+
+ // Pipeline the 2 DMA transfer in order to speed-up the performances:
+ // DMA USB -> RAM
+ // DMA RAM -> MCI
+ //
+ while (nb_sector--) {
+
+ // (re)load second stage.
+ if( !b_first_step ) {
+ dma_ram_2_mci((0!=(buffer_id%2))?&sector_buf_0:&sector_buf_1, SD_MMC_SECTOR_SIZE);
+ }
+ udi_msc_trans_block(false, (0==(buffer_id++%2))?sector_buf_0:sector_buf_1, SD_MMC_SECTOR_SIZE, NULL);
+ if( !b_first_step ) {
+ // Wait completion of DMACA stage.
+ while( !is_dma_ram_2_mci_complete() );
+ }
+ b_first_step=FALSE;
+ }
+
+ // Complete execution of the last transfer (which is in the pipe).
+ dma_ram_2_mci((0!=(buffer_id%2))?&sector_buf_0:&sector_buf_1, SD_MMC_SECTOR_SIZE);
+ while( !is_dma_ram_2_mci_complete() );
+ return TRUE;
+}
+
+#else
+// USB Device Stack V1
+
+#include "usb_drv.h"
+#include "scsi_decoder.h"
+
+Bool sd_mmc_mci_read_multiple_sector(U8 slot, U16 nb_sector)
+{
+ Bool b_last_state_full=FALSE;
+ U8 buffer_id=0;
+
+ // Turn on features used by the DMA-USB.
+ Usb_enable_endpoint_bank_autoswitch(g_scsi_ep_ms_in);
+
+ // Pipeline the 2 DMA transfer in order to speed-up the performances:
+ // DMA MCI -> RAM
+ // DMA RAM -> USB
+ //
+ while (nb_sector--) {
+ // (re)load first stage.
+ if( buffer_id==0 ) {
+ dma_mci_2_ram(&sector_buf_0, SD_MMC_SECTOR_SIZE);
+ buffer_id=1;
+
+ } else {
+ dma_mci_2_ram(&sector_buf_1, SD_MMC_SECTOR_SIZE);
+ buffer_id=0;
+ }
+
+ // (re)load second stage.
+ if( b_last_state_full ) {
+ if( buffer_id==0 ) {
+ dma_ram_2_usb(&sector_buf_0, SD_MMC_SECTOR_SIZE);
+ } else {
+ dma_ram_2_usb(&sector_buf_1, SD_MMC_SECTOR_SIZE);
+ }
+ // Wait completion of both stages.
+ while( !is_dma_mci_2_ram_complete() );
+ while( !is_dma_ram_2_usb_complete() );
+
+ } else {
+ b_last_state_full=TRUE;
+ // Wait completion of first stage only.
+ while( !is_dma_mci_2_ram_complete() );
+ }
+ }
+
+ // Complete execution of the last transfer (which is in the pipe).
+ if( buffer_id==0 ) {
+ dma_ram_2_usb(&sector_buf_1, SD_MMC_SECTOR_SIZE);
+ } else {
+ dma_ram_2_usb(&sector_buf_0, SD_MMC_SECTOR_SIZE);
+ }
+ while( !is_dma_ram_2_usb_complete() );
+
+ // Wait until the USB RAM is empty before disabling the autoswitch feature.
+ while( Usb_nb_busy_bank(g_scsi_ep_ms_in)!=0 );
+
+ // Turn off exotic USB features that may not work for other devices (at45dbx...)
+ Usb_disable_endpoint_bank_autoswitch(g_scsi_ep_ms_in);
+ return TRUE;
+}
+
+Bool sd_mmc_mci_write_multiple_sector(U8 slot, U16 nb_sector)
+{
+ Bool b_last_state_full=FALSE;
+ U8 buffer_id=0;
+
+ // Turn on features used by the DMA-USB.
+ Usb_enable_endpoint_bank_autoswitch(g_scsi_ep_ms_out);
+
+ // Pipeline the 2 DMA transfer in order to speed-up the performances:
+ // DMA USB -> RAM
+ // DMA RAM -> MCI
+ //
+ while (nb_sector--) {
+ // (re)load first stage.
+ if( buffer_id==0 ) {
+ dma_usb_2_ram(&sector_buf_0, SD_MMC_SECTOR_SIZE);
+ buffer_id=1;
+
+ } else {
+ dma_usb_2_ram(&sector_buf_1, SD_MMC_SECTOR_SIZE);
+ buffer_id=0;
+ }
+
+ // (re)load second stage.
+ if( b_last_state_full ) {
+ if( buffer_id==0 ) {
+ dma_ram_2_mci(&sector_buf_0, SD_MMC_SECTOR_SIZE);
+ } else {
+ dma_ram_2_mci(&sector_buf_1, SD_MMC_SECTOR_SIZE);
+ }
+ // Wait completion of both stages.
+ while( !is_dma_usb_2_ram_complete() );
+ while( !is_dma_ram_2_mci_complete() );
+
+ } else {
+ b_last_state_full=TRUE;
+ // Wait completion of the first stage only.
+ while( !is_dma_usb_2_ram_complete() );
+ }
+ }
+
+ // Complete execution of the last transfer (which is in the pipe).
+ if( buffer_id==0 ) {
+ dma_ram_2_mci(&sector_buf_1, SD_MMC_SECTOR_SIZE);
+ } else {
+ dma_ram_2_mci(&sector_buf_0, SD_MMC_SECTOR_SIZE);
+ }
+ while( !is_dma_ram_2_mci_complete() );
+
+ // Wait until the USB RAM is empty before disabling the autoswitch feature.
+ while( Usb_nb_busy_bank(g_scsi_ep_ms_out)!=0 );
+
+ // Turn off exotic USB features that may not work for other devices (at45dbx...)
+ Usb_disable_endpoint_bank_autoswitch(g_scsi_ep_ms_out);
+ return TRUE;
+}
+#endif
+
+#endif
+
+#if (defined MMC_CARD_SECU_FUNC) && (MMC_CARD_SECU_FUNC == ENABLE)
+
+Bool sd_mmc_mci_lock_unlock (U8 slot, U8 cmd, U8 pwd_len, U8 * password) // password length in Bytes (possible values : 2,6,14)
+{
+ U8 block_count;
+
+ if (slot > MCI_LAST_SLOTS)
+ return FALSE;
+
+ // Select Slot card before any other command.
+ mci_select_card(mci, slot, g_u8_card_bus_width[slot]);
+
+ // Wait Busy Signal
+ mci_wait_busy_signal(mci);
+
+ if (FALSE == sd_mmc_set_block_len (slot, (U8) pwd_len+2))
+ {
+ return FALSE;
+ }
+
+ // Send Lock/Unlock Command
+ mci_send_cmd(mci, SD_MMC_LOCK_UNLOCK, 0);
+
+ // check response
+ if ((mci_read_response(mci) & MMC_TRAN_STATE_MSK) != MMC_TRAN_STATE)
+ {
+ return FALSE;
+ }
+
+ // Sends the command
+ mci_wr_data(mci, cmd);
+ // Sends the data
+ if (cmd != CMD_FULL_ERASE)
+ {
+ mci_wr_data(mci, pwd_len); // PWD_LENGTH
+ }
+ for ( block_count = 0 ; block_count < pwd_len ; block_count++) //PWD
+ {
+ mci_wr_data(mci, *(password+block_count));
+ }
+
+ sd_mmc_set_block_len(slot,SD_MMC_SECTOR_SIZE);
+
+ return TRUE;
+}
+
+Bool is_sd_mmc_mci_locked(U8 slot)
+{
+ U32 response;
+
+ if (slot > MCI_LAST_SLOTS)
+ return FALSE;
+ // Select Slot card before any other command.
+ mci_select_card(mci, slot, g_u8_card_bus_width[slot]);
+
+ // ask status
+ if (sd_mmc_mci_cmd_send_status(slot)==FALSE)
+ return TRUE;
+ response = mci_read_response(mci);
+ if ((((U8)(response>>24))&0x02)!=0x00)
+ { // Then it is locked
+ return TRUE;
+ }
+ return FALSE;
+}
+
+Bool sd_mmc_mci_lock_unlock_failed(U8 slot)
+{
+ U32 response;
+
+ if (slot > MCI_LAST_SLOTS)
+ return FALSE;
+ // Select Slot card before any other command.
+ mci_select_card(mci, slot, g_u8_card_bus_width[slot]);
+
+ // ask status
+ if (sd_mmc_mci_cmd_send_status(slot)==FALSE)
+ return TRUE;
+ response = mci_read_response(mci);
+ if ((((Byte)(response>>24))&0x01)!=0x00)
+ { // Then it failed
+ return FALSE;
+ }
+ return TRUE;
+}
+#endif // end FUNC_MMC_CARD_SECU
+
+Bool sd_mmc_mci_cmd_send_status(U8 slot)
+{
+ if (slot > MCI_LAST_SLOTS)
+ return FALSE;
+ // Select Slot card before any other command.
+ mci_select_card(mci, slot, g_u8_card_bus_width[slot]);
+
+ if (mci_send_cmd(mci, SD_MMC_SEND_STATUS_CMD, g_u32_card_rca[slot])!=MCI_SUCCESS)
+ return FALSE;
+
+ return TRUE;
+}
+
+#endif // SD_MMC_MCI_0_MEM == ENABLE || SD_MMC_MCI_1_MEM == ENABLE
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/sdmmc/sdmmc_mci/sd_mmc_mci.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/sdmmc/sdmmc_mci/sd_mmc_mci.h
new file mode 100644
index 0000000..081843c
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/sdmmc/sdmmc_mci/sd_mmc_mci.h
@@ -0,0 +1,809 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief SD/MMC card driver using an MCI interface.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with an MCI module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _SD_MMC_MCI_H_
+#define _SD_MMC_MCI_H_
+
+
+/*_____ I N C L U D E S ____________________________________________________*/
+
+#include "conf_access.h"
+
+#if SD_MMC_MCI_0_MEM == DISABLE && SD_MMC_MCI_1_MEM == DISABLE
+ #error sd_mmc_mci.h is #included although SD_MMC_MCI_x_MEM are all disabled
+#endif
+
+
+#include "compiler.h"
+#include "mci.h"
+#include "sd_mmc_cmd.h"
+
+
+/*_____ M A C R O S ________________________________________________________*/
+
+//! Number of bits for addresses within sectors.
+#define SD_MMC_SECTOR_BITS 9
+
+//! Sector size in bytes.
+#define SD_MMC_SECTOR_SIZE (1 << SD_MMC_SECTOR_BITS)
+
+/*_____ D E F I N I T I O N ________________________________________________*/
+
+//! Card identification
+#define UNKNOWN_CARD 0x00
+#define MMC_CARD 0x01
+#define SD_CARD 0x02
+#define MMC_CARD_V4 0x04
+#define SD_CARD_V2 0x08
+#define SD_CARD_HC 0x10
+#define MMC_CARD_HC 0x20
+
+//! Card state
+#define CARD_UNINSTALLED 0
+#define CARD_INSTALLED 1
+
+//! OCR register
+#define OCR_MSK_BUSY 0x80000000 // Busy flag
+#define OCR_MSK_HC 0x40000000 // High Capacity flag
+#define OCR_MSK_VOLTAGE_3_2V_3_3V 0x00100000 // Voltage 3.2V to 3.3V flag
+#define OCR_MSK_VOLTAGE_ALL 0x00FF8000 // All Voltage flag
+
+//! RCA register
+#define RCA_RESERVE_ADR 0x00000000
+#define RCA_MSK_ADR 0xFFFF0000
+#define RCA_DEFAULT_ADR 0x0001FFFF // It can be changed
+
+//! CSD register
+#define CSD_REG_SIZE 0x10
+#define CSD_STRUCT_1_0 0x00
+#define CSD_STRUCT_1_1 0x40
+#define CSD_STRUCT_1_2 0x80
+#define CSD_STRUCT_SUP 0xC0
+#define CSD_MSK_STRUCT 0xC0
+#define CSD_SPEC_VER_1_0 0x00
+#define CSD_SPEC_VER_1_4 0x04
+#define CSD_SPEC_VER_2_0 0x08
+#define CSD_SPEC_VER_3_1 0x0C
+#define CSD_SPEC_VER_4_0 0x10
+#define CSD_MSK_SPEC_VER 0x3C
+#define CSD_MSK_RBP 0x80
+#define CSD_MSK_WBM 0x40
+#define CSD_MSK_RBM 0x20
+#define CSD_MSK_RBL 0x0F
+#define CSD_MSK_CSH 0x03
+#define CSD_MSK_CSL 0xC0
+#define CSD_MSK_CSM 0x07
+#define CSD_MSK_CSMH 0x03
+#define CSD_MSK_CSML 0x80
+#define CSD_MSK_WBL 0x03
+#define CSD_MSK_WBH 0xC0
+#define CSD_MSK_WBP 0x20
+#define CSD_BLEN_2048 11
+#define CSD_BLEN_512 9
+
+//! MMC Status Mask
+#define MMC_STBY_STATE_MSK ((U32)0x01D81E00)
+#define MMC_STBY_STATE ((U32)0x00000600) // stby state
+#define MMC_DATA_STATE_MSK ((U32)0xE0040E00)
+#define MMC_DATA_STATE ((U32)0x00000A00) // data state
+#define MMC_RCV_STATE_MSK ((U32)0xE0020E00)
+#define MMC_RCV_STATE ((U32)0x00000A00) // rcv state
+#define MMC_TRAN_STATE_MSK ((U32)0xE0020E00)
+#define MMC_TRAN_STATE ((U32)0x00000800) // tran state
+
+//! Flag error of "Card Status" in R1
+#define CS_FLAGERROR_RD_WR (CS_ADR_OUT_OF_RANGE|CS_ADR_MISALIGN|CS_BLOCK_LEN_ERROR|CS_ERASE_SEQ_ERROR|CS_ILLEGAL_COMMAND|CS_CARD_ERROR)
+#define CS_ADR_OUT_OF_RANGE (1<<31)
+#define CS_ADR_MISALIGN (1<<30)
+#define CS_BLOCK_LEN_ERROR (1<<29)
+#define CS_ERASE_SEQ_ERROR (1<<28)
+#define CS_ERASE_PARAM (1<<27)
+#define CS_WP_VIOLATION (1<<26)
+#define CS_CARD_IS_LOCKED (1<<25)
+#define CS_LOCK_UNLOCK_ (1<<24)
+#define CS_COM_CRC_ERROR (1<<23)
+#define CS_ILLEGAL_COMMAND (1<<22)
+#define CS_CARD_ECC_FAILED (1<<21)
+#define CS_CARD_ERROR (1<<20)
+#define CS_EXEC_ERROR (1<<19)
+#define CS_UNDERRUN (1<<18)
+#define CS_OVERRUN (1<<17)
+#define CS_CIDCSD_OVERWRITE (1<<16)
+#define CS_WP_ERASE_SKIP (1<<15)
+#define CS_ERASE_RESET (1<<13)
+#define CS_READY_FOR_DATA (1<<8)
+#define CS_SWITCH_ERROR (1<<7)
+#define CS_APP_CMD (1<<5)
+
+//! SD bus width
+#define SD_BUS_1_BIT MCI_BUS_SIZE_1_BIT
+#define SD_BUS_4_BIT MCI_BUS_SIZE_4_BIT
+#define SD_BUS_8_BIT MCI_BUS_SIZE_8_BIT
+
+// MMC commands (taken from MMC reference)
+#define MMC_GO_IDLE_STATE 0 ///< initialize card to SPI-type access
+#define MMC_SEND_OP_COND 1 ///< set card operational mode
+#define MMC_CMD2 2 ///< illegal in SPI mode !
+#define MMC_SEND_CSD 9 ///< get card's CSD
+#define MMC_SEND_CID 10 ///< get card's CID
+#define MMC_SEND_STATUS 13
+#define MMC_SET_BLOCKLEN 16 ///< Set number of bytes to transfer per block
+#define MMC_READ_SINGLE_BLOCK 17 ///< read a block
+#define MMC_WRITE_BLOCK 24 ///< write a block
+#define MMC_PROGRAM_CSD 27
+#define MMC_SET_WRITE_PROT 28
+#define MMC_CLR_WRITE_PROT 29
+#define MMC_SEND_WRITE_PROT 30
+#define SD_TAG_WR_ERASE_GROUP_START 32
+#define SD_TAG_WR_ERASE_GROUP_END 33
+#define MMC_TAG_SECTOR_START 32
+#define MMC_TAG_SECTOR_END 33
+#define MMC_UNTAG_SECTOR 34
+#define MMC_TAG_ERASE_GROUP_START 35 ///< Sets beginning of erase group (mass erase)
+#define MMC_TAG_ERASE_GROUP_END 36 ///< Sets end of erase group (mass erase)
+#define MMC_UNTAG_ERASE_GROUP 37 ///< Untag (unset) erase group (mass erase)
+#define MMC_ERASE 38 ///< Perform block/mass erase
+#define SD_SEND_OP_COND_ACMD 41 ///< Same as MMC_SEND_OP_COND but specific to SD (must be preceeded by CMD55)
+#define MMC_LOCK_UNLOCK 42 ///< To start a lock/unlock/pwd operation
+#define SD_APP_CMD55 55 ///< Use before any specific command (type ACMD)
+#define MMC_CRC_ON_OFF 59 ///< Turns CRC check on/off
+// R1 Response bit-defines
+#define MMC_R1_BUSY 0x80 ///< R1 response: bit indicates card is busy
+#define MMC_R1_PARAMETER 0x40
+#define MMC_R1_ADDRESS 0x20
+#define MMC_R1_ERASE_SEQ 0x10
+#define MMC_R1_COM_CRC 0x08
+#define MMC_R1_ILLEGAL_COM 0x04
+#define MMC_R1_ERASE_RESET 0x02
+#define MMC_R1_IDLE_STATE 0x01
+// Data Start tokens
+#define MMC_STARTBLOCK_READ 0xFE ///< when received from card, indicates that a block of data will follow
+#define MMC_STARTBLOCK_WRITE 0xFE ///< when sent to card, indicates that a block of data will follow
+#define MMC_STARTBLOCK_MWRITE 0xFC
+// Data Stop tokens
+#define MMC_STOPTRAN_WRITE 0xFD
+// Data Error Token values
+#define MMC_DE_MASK 0x1F
+#define MMC_DE_ERROR 0x01
+#define MMC_DE_CC_ERROR 0x02
+#define MMC_DE_ECC_FAIL 0x04
+#define MMC_DE_OUT_OF_RANGE 0x04
+#define MMC_DE_CARD_LOCKED 0x04
+// Data Response Token values
+#define MMC_DR_MASK 0x1F
+#define MMC_DR_ACCEPT 0x05
+#define MMC_DR_REJECT_CRC 0x0B
+#define MMC_DR_REJECT_WRITE_ERROR 0x0D
+// Arguments of MMC_SWITCH command
+#define MMC_SWITCH_WRITE ((U8)03)
+#define MMC_SWITCH_BUS_WIDTH ((U8)183)
+#define MMC_SWITCH_HIGH_SPEED ((U8)185)
+#define MMC_SWITCH_CMD_SET ((U8)03)
+#define MMC_SWITCH_VAL_LS ((U8)00)
+#define MMC_SWITCH_VAL_HS ((U8)01)
+#define MMC_SWITCH_VAL_1BIT ((U8)00)
+#define MMC_SWITCH_VAL_4BIT ((U8)01)
+#define MMC_SWITCH_VAL_8BIT ((U8)02)
+// Arguments of MMC_LOCK_UNLOCK command
+#define CMD_FULL_ERASE 0x08
+#define CMD_UNLOCK 0x00
+#define CMD_CLEAR 0x02
+#define CMD_LOCK 0x01
+
+
+/*_____ D E C L A R A T I O N ______________________________________________*/
+
+typedef struct
+{
+ union
+ {
+ unsigned int cardStatus;
+ struct
+ {
+ unsigned int outOfRange :1;
+ unsigned int addressserror :1;
+ unsigned int blockLenError :1;
+ unsigned int eraseSeqErro :1;
+ unsigned int eraseParam :1;
+ unsigned int wpViolation :1;
+ unsigned int cardIsLocked :1;
+ unsigned int lockUnlockFailed :1;
+ unsigned int comCrcError :1;
+ unsigned int illegalCommand :1;
+ unsigned int cardEccFailed :1;
+ unsigned int ccError :1;
+ unsigned int error :1;
+ unsigned int :2;
+ unsigned int csdOverwrite :1;
+ unsigned int wpEraseSkip :1;
+ unsigned int cardEccDisabled :1;
+ unsigned int eraseReset :1;
+ unsigned int currentState :4;
+ unsigned int readyForData :1;
+ unsigned int :2;
+ unsigned int appCmd :1;
+ unsigned int :1;
+ unsigned int akeSeqError :1;
+ unsigned int :3;
+ };
+ };
+}card_status_t;
+
+
+typedef struct
+{
+ union
+ {
+ unsigned int ocr;
+ struct
+ {
+ unsigned int busy :1;
+ unsigned int ccs :1;
+ unsigned int :6;
+ unsigned int vRange :9;
+ unsigned int :15;
+ };
+ };
+}ocr_t;
+
+typedef struct
+{
+ //CDS[0]
+ unsigned int csdStructure :2;
+ unsigned int :6;
+ unsigned int taac :8;
+ unsigned int nsac :8;
+ unsigned int tranSpeed :8;
+ //CSD[1]
+ unsigned int ccc :12;
+ unsigned int readBlLen :4;
+ unsigned int readBlePartial :1;
+ unsigned int writeBlkMisalign :1;
+ unsigned int readBlkMisalign :1;
+ unsigned int dsrImp :1;
+ unsigned int :2;
+ unsigned int deviceSizeH :10;
+ //CSD[2]
+ unsigned int deviceSizeL :2;
+ unsigned int vddRCurrMin :3;
+ unsigned int vddRCurrMax :3;
+ unsigned int vddWCurrMin :3;
+ unsigned int vddWCurrMax :3;
+ unsigned int cSizeMult :3;
+ unsigned int eraseBlkEn :1;
+ unsigned int sectorSize :7;
+ unsigned int wpGrpSize :7;
+ //CSD[3]
+ unsigned int wpGrpEnable :1;
+ unsigned int :2;
+ unsigned int r2wFactor :3;
+ unsigned int writeBlLen :4;
+ unsigned int writeBlPartial :1;
+ unsigned int :5;
+ unsigned int fileFormatGrp :1;
+ unsigned int copy :1;
+ unsigned int permWriteProtect :1;
+ unsigned int tmpWriteProtect :1;
+ unsigned int fileFormat :2;
+ unsigned int :2;
+ unsigned int crc :7;
+ unsigned int :1;
+}csd_v1_t;
+
+
+typedef struct
+{
+ //CDS[0]
+ unsigned int csdStructure :2;
+ unsigned int :6;
+ unsigned int taac :8;
+ unsigned int nsac :8;
+ unsigned int tranSpeed :8;
+ //CSD[1]
+ unsigned int ccc :12;
+ unsigned int readBlLen :4;
+ unsigned int readBlePartial :1;
+ unsigned int writeBlkMisalign :1;
+ unsigned int readBlkMisalign :1;
+ unsigned int dsrImp :1;
+ unsigned int :6;
+ unsigned int deviceSizeH :6;
+ //CSD[2]
+ unsigned int deviceSizeL :16;
+ unsigned int :1;
+ unsigned int eraseBlkEn :1;
+ unsigned int sectorSize :7;
+ unsigned int wpGrpSize :7;
+ //CSD[3]
+ unsigned int wpGrpEnable :1;
+ unsigned int :2;
+ unsigned int r2wFactor :3;
+ unsigned int writeBlLen :4;
+ unsigned int writeBlPartial :1;
+ unsigned int :5;
+ unsigned int fileFormatGrp :1;
+ unsigned int copy :1;
+ unsigned int permWriteProtect :1;
+ unsigned int tmpWriteProtect :1;
+ unsigned int fileFormat :2;
+ unsigned int :2;
+ unsigned int crc :7;
+ unsigned int :1;
+}csd_v2_t;
+
+
+typedef struct
+{
+ union
+ {
+ unsigned int csd[4];
+ union
+ {
+ csd_v1_t csd_v1;
+ csd_v2_t csd_v2;
+ };
+ };
+}csd_t;
+
+typedef struct
+{
+ union
+ {
+ unsigned int cid[4];
+ struct
+ {
+ unsigned int mid :8; // Manufacturer ID
+ unsigned int oid :16; // OEM/Application ID
+ unsigned int pnmh :32; // Product name high bits
+ unsigned int pnml :8; // Product name low bits
+ unsigned int prv :8; // Product revision
+ unsigned int psn :32; // Product serial number
+ unsigned int :4;
+ unsigned int mdt :12; // Manufacturing date
+ unsigned int crc :7; // CRC7 Checksum
+ unsigned int :1;
+ };
+ };
+}cid_t;
+
+
+typedef struct
+{
+ union
+ {
+ unsigned int rep1[2];
+ struct
+ {
+ unsigned int startBit :1;
+ unsigned int transBit :1;
+ unsigned int cmdIndex :6;
+ card_status_t cardStatus;
+ unsigned int crc7 :6;
+ unsigned int endBit :1;
+ unsigned int pad :16;
+ };
+ };
+}rep1_t;
+
+
+typedef struct
+{
+ union
+ {
+ unsigned int rep2[5];
+ struct
+ {
+ union
+ {
+ cid_t cid;
+ csd_t csd;
+ };
+ unsigned int endBit :1;
+ unsigned int pad :32;
+ };
+ };
+}rep2_t;
+
+
+typedef struct
+{
+ union
+ {
+ unsigned int rep3[2];
+ struct
+ {
+ unsigned int startBit :1;
+ unsigned int transBit :1;
+ unsigned int :6;
+ ocr_t ocr;
+ unsigned int :7;
+ unsigned int endBit :1;
+ unsigned int pad :16;
+ };
+ };
+}rep3_t;
+
+
+//_____ D E C L A R A T I O N S ____________________________________________
+
+/*! \name Control Functions
+ */
+//! @{
+
+/*! \brief Initializes the MCI driver.
+ *
+ * \param card_slot Card slot number.
+ * \param pbb_hz MCI module input clock frequency (PBA clock, Hz).
+ * \param cpu_hz CPU clock, Hz.
+ *
+ * \retval OK Success.
+ * \retval KO Failure.
+ */
+extern Bool sd_mmc_mci_init(unsigned char card_slot, long pbb_hz, long cpu_hz);
+
+/*! \brief Initializes the SD/MMC card.
+ *
+ * \param card_slot Card slot number.
+ *
+ * \retval OK Success.
+ * \retval KO Failure.
+ */
+extern Bool sd_mmc_mci_card_init(unsigned char card_slot);
+
+/*! \brief Performs a card check presence.
+ *
+ * \param slot SD/MMC Slot Card Selected.
+ * \retval TRUE Card Present
+ * \retval FALSE Card Unpresent.
+ */
+extern Bool is_sd_mmc_mci_card_present(U8 slot);
+
+/*! \brief Performs a card check protection.
+ *
+ * \param slot SD/MMC Slot Card Selected.
+ * \retval TRUE Card Protected
+ * \retval FALSE Card Unprotected.
+ */
+extern Bool is_sd_mmc_mci_card_protected(U8 slot);
+
+/*! \brief Performs a memory check.
+ *
+ * \param slot SD/MMC Slot Card Selected.
+ * \retval OK Success.
+ * \retval KO Failure.
+ */
+extern Bool sd_mmc_mci_mem_check(U8 slot);
+
+/*! \brief Opens a DF memory in read mode at a given sector.
+ *
+ * \param slot SD/MMC Slot Card Selected.
+ * \param sector Start sector.
+ * \param nb_sector Number of sector.
+ *
+ * \retval OK Success.
+ * \retval KO Failure.
+ *
+ * \note Sector may be page-unaligned (depending on the DF page size).
+ */
+extern Bool sd_mmc_mci_read_open(U8 slot, U32 sector, U16 nb_sector);
+
+/*! \brief Opens a DF memory in read mode at a given sector. DMA will be used.
+ *
+ * \param slot SD/MMC Slot Card Selected.
+ * \param sector Start sector.
+ * \param ram pointer on ram buffer.
+ * \param nb_sector Number of sector.
+ *
+ * \retval OK Success.
+ * \retval KO Failure.
+ *
+ * \note Sector may be page-unaligned (depending on the DF page size).
+ */
+extern Bool sd_mmc_mci_dma_read_open(U8 slot, U32 sector, void* ram, U16 nb_sector );
+
+/*! \brief Unselects the current DF memory.
+ * \param slot SD/MMC Slot Card Selected.
+ *
+ * \retval OK Success.
+ * \retval KO Failure.
+ */
+extern Bool sd_mmc_mci_read_close(U8 slot);
+
+/*! \brief This function opens a DF memory in write mode at a given sector.
+ *
+ * \param slot SD/MMC Slot Card Selected.
+ * \param sector Start sector.
+ * \param nb_sector Number of sector.
+ *
+ * \retval OK Success.
+ * \retval KO Failure.
+ *
+ * \note Sector may be page-unaligned (depending on the SD/MMC page size).
+ *
+ */
+extern Bool sd_mmc_mci_write_open(U8 slot, U32 sector, U16 nb_sector);
+
+/*! \brief This function opens a DF memory in write mode at a given sector. DMA will be used.
+ *
+ * \param slot SD/MMC Slot Card Selected.
+ * \param sector Start sector.
+ * \param nb_sector Number of sector.
+ * \param ram pointer on ram buffer.
+ *
+ * \retval OK Success.
+ * \retval KO Failure.
+ *
+ * \note Sector may be page-unaligned (depending on the SD/MMC page size).
+ *
+ */
+extern Bool sd_mmc_mci_dma_write_open(U8 slot, U32 sector, const void* ram, U16 nb_sector);
+
+/*! \brief Fills the end of the current logical sector and launches page programming.
+ * \param slot SD/MMC Slot Card Selected.
+ *
+ * \retval OK Success.
+ * \retval KO Failure.
+ */
+extern Bool sd_mmc_mci_write_close(U8 slot);
+
+//! @}
+
+
+/*! \name Multiple-Sector Access Functions
+ */
+//! @{
+
+/*! \brief Reads \a nb_sector sectors from DF memory.
+ *
+ * Data flow is: SD/MMC -> callback.
+ *
+ * \param slot SD/MMC Slot Card Selected.
+ * \param nb_sector Number of contiguous sectors to read.
+ *
+ * \retval OK Success.
+ * \retval KO Failure.
+ *
+ * \note First call must be preceded by a call to the \ref sd_mmc_mci_read_open
+ * function.
+ *
+ */
+extern Bool sd_mmc_mci_read_multiple_sector(U8 slot, U16 nb_sector);
+
+/*! \brief Callback function invoked after each sector read during
+ * \ref sd_mmc_mci_read_multiple_sector.
+ *
+ * \param psector Pointer to read sector.
+ */
+extern void sd_mmc_mci_read_multiple_sector_callback(const void *psector);
+
+/*! \brief Writes \a nb_sector sectors to SD/MMC memory.
+ *
+ * Data flow is: callback -> SD/MMC.
+ *
+ * \param slot SD/MMC Slot Card Selected.
+ * \param nb_sector Number of contiguous sectors to write.
+ *
+ * \retval OK Success.
+ * \retval KO Failure.
+ *
+ * \note First call must be preceded by a call to the \ref sd_mmc_mci_write_open
+ * function.
+ *
+ */
+extern Bool sd_mmc_mci_write_multiple_sector(U8 slot, U16 nb_sector);
+
+/*! \brief Callback function invoked before each sector write during
+ * \ref sd_mmc_mci_write_multiple_sector.
+ *
+ * \param psector Pointer to sector to write.
+ */
+extern void sd_mmc_mci_write_multiple_sector_callback(void *psector);
+
+/*! \brief Reads nb_sector SD/MMC sector to a RAM buffer.
+ *
+ * Data flow is: SD/MMC -> RAM.
+ *
+ * \param slot SD/MMC Slot Card Selected.
+ * \param ram Pointer to RAM buffer.
+ * \param nb_sector Number of sector to read.
+ *
+ * \retval OK Success.
+ * \retval KO Failure.
+ *
+ */
+extern Bool sd_mmc_mci_read_multiple_sector_2_ram(U8 slot, void *ram, U32 nb_sector);
+
+/*! \brief Reads nb_sector SD/MMC sector to a RAM buffer, using the DMA.
+ *
+ * Data flow is: SD/MMC -> RAM.
+ *
+ * \param slot SD/MMC Slot Card Selected.
+ * \param ram Pointer to RAM buffer.
+ * \param nb_sector Number of sector to read.
+ *
+ * \retval OK Success.
+ * \retval KO Failure.
+ *
+ */
+extern Bool sd_mmc_mci_dma_read_multiple_sector_2_ram(U8 slot, void *ram, U32 nb_sector);
+
+/*! \brief Writes nb_sector SD/MMC sector from a RAM buffer.
+ *
+ * Data flow is: RAM -> SD/MMC.
+ *
+ * \param slot SD/MMC Slot Card Selected.
+ * \param ram Pointer to RAM buffer.
+ * \param nb_sector Number of sector to write.
+ *
+ * \retval OK Success.
+ * \retval KO Failure.
+ *
+ */
+extern Bool sd_mmc_mci_write_multiple_sector_from_ram(U8 slot, const void *ram, U32 nb_sector);
+
+/*! \brief Writes nb_sector SD/MMC sector from a RAM buffer, using the DMA.
+ *
+ * Data flow is: RAM -> SD/MMC.
+ *
+ * \param slot SD/MMC Slot Card Selected.
+ * \param ram Pointer to RAM buffer.
+ * \param nb_sector Number of sector to write.
+ *
+ * \retval OK Success.
+ * \retval KO Failure.
+ *
+ */
+extern Bool sd_mmc_mci_dma_write_multiple_sector_from_ram(U8 slot, const void *ram, U32 nb_sector);
+
+//! @}
+
+
+/*! \name Single-Sector Access Functions
+ */
+//! @{
+
+/*! \brief Reads 1 SD/MMC sector to a RAM buffer.
+ *
+ * Data flow is: SD/MMC -> RAM.
+ *
+ * \param slot SD/MMC Slot Card Selected.
+ * \param ram Pointer to RAM buffer.
+ *
+ * \retval OK Success.
+ * \retval KO Failure.
+ *
+ */
+extern Bool sd_mmc_mci_read_sector_2_ram(U8 slot, void *ram);
+
+/*! \brief Reads 1 SD/MMC sector to a RAM buffer, using the DMA.
+ *
+ * Data flow is: SD/MMC -> RAM.
+ *
+ * \param slot SD/MMC Slot Card Selected.
+ * \param ram Pointer to RAM buffer.
+ *
+ * \retval OK Success.
+ * \retval KO Failure.
+ *
+ */
+extern Bool sd_mmc_mci_dma_read_sector_2_ram(U8 slot, void *ram);
+
+/*! \brief Writes 1 SD/MMC sector from a RAM buffer.
+ *
+ * Data flow is: RAM -> SD/MMC.
+ *
+ * \param slot SD/MMC Slot Card Selected.
+ * \param ram Pointer to RAM buffer.
+ *
+ * \retval OK Success.
+ * \retval KO Failure.
+ *
+ */
+extern Bool sd_mmc_mci_write_sector_from_ram(U8 slot, const void *ram);
+
+/*! \brief Writes 1 SD/MMC sector from a RAM buffer, using the DMA.
+ *
+ * Data flow is: RAM -> SD/MMC.
+ *
+ * \param slot SD/MMC Slot Card Selected.
+ * \param ram Pointer to RAM buffer.
+ *
+ * \retval OK Success.
+ * \retval KO Failure.
+ *
+ */
+extern Bool sd_mmc_mci_dma_write_sector_from_ram(U8 slot, const void *ram);
+//! @}
+
+/*! \name Protection Access Functions
+ */
+//! @{
+
+/*! \brief This function sends lock/unlock commands for sd or mmc.
+ *
+ * \param slot SD/MMC Slot Card Selected.
+ * \param cmd CMD_FULL_ERASE ; CMD_LOCK ; CMD_UNLOCK..
+ * \param pwd_len password length in bytes (limited to 253).
+ * \param password the password content.
+ *
+ *
+ * \retval TRUE Command successfull.
+ * \retval FALSE Command failed.
+ *
+ */
+extern Bool sd_mmc_mci_lock_unlock (U8 slot, U8 cmd, U8 pwd_len, U8 * password);
+
+/*! \brief Get sd status register and look if card is locked by a password.
+ *
+ * \param slot SD/MMC Slot Card Selected.
+ *
+ * \retval TRUE Card is locked.
+ * \retval FALSE Card is unlocked.
+ *
+ */
+extern Bool is_sd_mmc_mci_locked(U8 slot);
+
+/*! \brief Get sd status register and look if the lock/unlock command was ok.
+ *
+ * \param slot SD/MMC Slot Card Selected.
+ *
+ * \retval TRUE Lock/Unlock failed.
+ * \retval FALSE Lock/Unlock was successfull.
+ *
+ */
+extern Bool sd_mmc_mci_lock_unlock_failed(U8 slot);
+
+/*! \brief ask mmc status register.
+ *
+ * \param slot SD/MMC Slot Card Selected.
+ *
+ * \retval TRUE Success.
+ * \retval FALSE Failure.
+ *
+ */
+extern Bool sd_mmc_mci_cmd_send_status(U8 slot);
+//! @}
+
+#endif // _SD_MMC_MCI_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/sdmmc/sdmmc_mci/sd_mmc_mci_mem.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/sdmmc/sdmmc_mci/sd_mmc_mci_mem.c
new file mode 100644
index 0000000..62cb984
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/sdmmc/sdmmc_mci/sd_mmc_mci_mem.c
@@ -0,0 +1,593 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief CTRL_ACCESS interface for SD/MMC card.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with an MCI module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+//_____ I N C L U D E S ___________________________________________________
+
+#include "board.h"
+#include "conf_access.h"
+
+
+#if (SD_MMC_MCI_0_MEM == ENABLE) || (SD_MMC_MCI_1_MEM == ENABLE)
+
+#include "conf_sd_mmc_mci.h"
+//#include "sd_mmc_mci.h"
+#include "sd_mmc_mci_mem.h"
+
+#define MCI_NR_SLOTS 2
+#define MCI_LAST_SLOTS 0
+#define SD_MMC_SECTOR_SIZE 512
+
+//_____ D E F I N I T I O N S ______________________________________________
+
+#define sd_mmc_mci_mem_check(slot) false
+#define is_sd_mmc_mci_card_protected(slot) false
+#define sd_mmc_mci_dma_read_open(slot, addr, NULL, nb_sector) true
+#define sd_mmc_mci_read_multiple_sector(slot, nb_sector) true
+#define sd_mmc_mci_read_close(slot) true
+#define sd_mmc_mci_dma_write_open(slot, addr, NULL, nb_sector) true
+#define sd_mmc_mci_write_multiple_sector(slot, nb_sector) true
+#define sd_mmc_mci_write_close(slot) true
+
+#define Sd_mmc_mci_access_signal_on()
+#define Sd_mmc_mci_access_signal_off()
+
+//! Initialization sequence status per Slot.
+/*extern*/ Bool sd_mmc_mci_init_done[MCI_NR_SLOTS];
+//! SD/MMC Card Size per Slot.
+/*extern*/ U32 g_u32_card_size[MCI_NR_SLOTS];
+//! SD/MMC Card Presence status per Slot.
+static U8 sd_mmc_mci_presence_status[MCI_NR_SLOTS] = {SD_MMC_INSERTED, SD_MMC_INSERTED};
+
+/*! \name Control Interface
+ */
+//! @{
+
+
+Ctrl_status sd_mmc_mci_test_unit_ready(U8 slot)
+{
+ if (slot > MCI_LAST_SLOTS) return CTRL_FAIL;
+
+ Sd_mmc_mci_access_signal_on();
+ switch (sd_mmc_mci_presence_status[slot])
+ {
+ case SD_MMC_REMOVED:
+ sd_mmc_mci_init_done[slot] = FALSE;
+ if (OK == sd_mmc_mci_mem_check(slot))
+ {
+ sd_mmc_mci_presence_status[slot] = SD_MMC_INSERTED;
+ Sd_mmc_mci_access_signal_off();
+ return CTRL_BUSY;
+ }
+ Sd_mmc_mci_access_signal_off();
+ return CTRL_NO_PRESENT;
+
+ case SD_MMC_INSERTED:
+ if (OK != sd_mmc_mci_mem_check(slot))
+ {
+ sd_mmc_mci_presence_status[slot] = SD_MMC_REMOVING;
+ sd_mmc_mci_init_done[slot] = FALSE;
+ Sd_mmc_mci_access_signal_off();
+ return CTRL_BUSY;
+ }
+ Sd_mmc_mci_access_signal_off();
+ return CTRL_GOOD;
+
+ case SD_MMC_REMOVING:
+ sd_mmc_mci_presence_status[slot] = SD_MMC_REMOVED;
+ Sd_mmc_mci_access_signal_off();
+ return CTRL_NO_PRESENT;
+
+ default:
+ sd_mmc_mci_presence_status[slot] = SD_MMC_REMOVED;
+ Sd_mmc_mci_access_signal_off();
+ return CTRL_BUSY;
+ }
+}
+
+
+Ctrl_status sd_mmc_mci_test_unit_ready_0(void)
+{
+ return sd_mmc_mci_test_unit_ready(0);
+}
+
+
+Ctrl_status sd_mmc_mci_test_unit_ready_1(void)
+{
+ return sd_mmc_mci_test_unit_ready(1);
+}
+
+
+Ctrl_status sd_mmc_mci_read_capacity(U8 slot, U32 *u32_nb_sector)
+{
+ Sd_mmc_mci_access_signal_on();
+
+ if( !sd_mmc_mci_mem_check(slot) )
+ {
+ Sd_mmc_mci_access_signal_off();
+ return CTRL_NO_PRESENT;
+ }
+ *u32_nb_sector = g_u32_card_size[slot]-1;
+ Sd_mmc_mci_access_signal_off();
+ return CTRL_GOOD;
+}
+
+
+Ctrl_status sd_mmc_mci_read_capacity_0(U32 *u32_nb_sector)
+{
+ return sd_mmc_mci_read_capacity(0, u32_nb_sector);
+}
+
+
+Ctrl_status sd_mmc_mci_read_capacity_1(U32 *u32_nb_sector)
+{
+ return sd_mmc_mci_read_capacity(1, u32_nb_sector);
+}
+
+
+Bool sd_mmc_mci_wr_protect(U8 slot)
+{
+ return is_sd_mmc_mci_card_protected(slot);
+}
+
+
+Bool sd_mmc_mci_wr_protect_0(void)
+{
+ return sd_mmc_mci_wr_protect(0);
+}
+
+
+Bool sd_mmc_mci_wr_protect_1(void)
+{
+ return sd_mmc_mci_wr_protect(1);
+}
+
+
+Bool sd_mmc_mci_removal(U8 slot)
+{
+ return FALSE;
+}
+
+
+Bool sd_mmc_mci_removal_0(void)
+{
+ return sd_mmc_mci_removal(0);
+}
+
+
+Bool sd_mmc_mci_removal_1(void)
+{
+ return sd_mmc_mci_removal(1);
+}
+
+//! @}
+
+#if ACCESS_USB == ENABLED
+
+#include "conf_usb.h"
+#ifdef USB_DEVICE_VENDOR_ID
+ // USB Device Stack V2
+#include "udi_msc.h"
+#else
+ // USB Device Stack V1
+#include "usb_drv.h"
+#include "scsi_decoder.h"
+#endif
+
+/*! \name MEM <-> USB Interface
+ */
+//! @{
+
+
+Ctrl_status sd_mmc_mci_usb_read_10(U8 slot, U32 addr, U16 nb_sector)
+{
+ Sd_mmc_mci_access_signal_on();
+
+ if( !sd_mmc_mci_mem_check(slot) )
+ {
+ Sd_mmc_mci_access_signal_off();
+ return CTRL_NO_PRESENT;
+ }
+
+ if( !sd_mmc_mci_dma_read_open(slot, addr, NULL, nb_sector) )
+ return CTRL_FAIL;
+
+ if( !sd_mmc_mci_read_multiple_sector(slot, nb_sector) )
+ return CTRL_FAIL;
+
+ if( !sd_mmc_mci_read_close(slot) )
+ return CTRL_FAIL;
+
+ Sd_mmc_mci_access_signal_off();
+ return CTRL_GOOD;
+}
+
+
+Ctrl_status sd_mmc_mci_usb_read_10_0(U32 addr, U16 nb_sector)
+{
+ return sd_mmc_mci_usb_read_10(0, addr, nb_sector);
+}
+
+
+Ctrl_status sd_mmc_mci_usb_read_10_1(U32 addr, U16 nb_sector)
+{
+ return sd_mmc_mci_usb_read_10(1, addr, nb_sector);
+}
+
+#if 0
+void sd_mmc_mci_read_multiple_sector_callback(const void *psector)
+{
+#ifdef USB_DEVICE_VENDOR_ID
+ // USB Device Stack V2
+ udi_msc_trans_block( true, (uint8_t*)psector, SD_MMC_SECTOR_SIZE, NULL);
+#else
+ // USB Device Stack V1
+ U16 data_to_transfer = SD_MMC_SECTOR_SIZE;
+
+ // Transfer read sector to the USB interface.
+ while (data_to_transfer)
+ {
+ while (!Is_usb_in_ready(g_scsi_ep_ms_in))
+ {
+ if(!Is_usb_endpoint_enabled(g_scsi_ep_ms_in))
+ return; // USB Reset
+ }
+
+ Usb_reset_endpoint_fifo_access(g_scsi_ep_ms_in);
+ data_to_transfer = usb_write_ep_txpacket(g_scsi_ep_ms_in, psector,
+ data_to_transfer, &psector);
+ Usb_ack_in_ready_send(g_scsi_ep_ms_in);
+ }
+#endif
+}
+#endif
+
+Ctrl_status sd_mmc_mci_usb_write_10(U8 slot,U32 addr, U16 nb_sector)
+{
+ Sd_mmc_mci_access_signal_on();
+
+ if( !sd_mmc_mci_mem_check(slot) )
+ {
+ Sd_mmc_mci_access_signal_off();
+ return CTRL_NO_PRESENT;
+ }
+
+ if( !sd_mmc_mci_dma_write_open(slot, addr, NULL, nb_sector) )
+ return CTRL_FAIL;
+
+ if( !sd_mmc_mci_write_multiple_sector(slot, nb_sector) )
+ return CTRL_FAIL;
+
+ if( !sd_mmc_mci_write_close(slot) )
+ return CTRL_FAIL;
+
+ Sd_mmc_mci_access_signal_off();
+ return CTRL_GOOD;
+
+}
+
+
+Ctrl_status sd_mmc_mci_usb_write_10_0(U32 addr, U16 nb_sector)
+{
+ return sd_mmc_mci_usb_write_10(0, addr, nb_sector);
+}
+
+
+Ctrl_status sd_mmc_mci_usb_write_10_1(U32 addr, U16 nb_sector)
+{
+ return sd_mmc_mci_usb_write_10(1, addr, nb_sector);
+}
+
+#if 0
+void sd_mmc_mci_write_multiple_sector_callback(void *psector)
+{
+#ifdef USB_DEVICE_VENDOR_ID
+ // USB Device Stack V2
+ udi_msc_trans_block( false, (uint8_t*)psector, SD_MMC_SECTOR_SIZE, NULL);
+#else
+ // USB Device Stack V1
+ U16 data_to_transfer = SD_MMC_SECTOR_SIZE;
+
+ // Transfer sector to write from the USB interface.
+ while (data_to_transfer)
+ {
+ while (!Is_usb_out_received(g_scsi_ep_ms_out))
+ {
+ if(!Is_usb_endpoint_enabled(g_scsi_ep_ms_out))
+ return; // USB Reset
+ }
+
+ Usb_reset_endpoint_fifo_access(g_scsi_ep_ms_out);
+ data_to_transfer = usb_read_ep_rxpacket(g_scsi_ep_ms_out, psector,
+ data_to_transfer, &psector);
+ Usb_ack_out_received_free(g_scsi_ep_ms_out);
+ }
+#endif
+}
+#endif
+
+//! @}
+
+#endif // ACCESS_USB == ENABLED
+
+
+#if ACCESS_MEM_TO_RAM == ENABLED
+
+/*! \name MEM <-> RAM Interface
+ */
+//! @{
+
+
+Ctrl_status sd_mmc_mci_mem_2_ram(U8 slot, U32 addr, void *ram)
+{
+ if( !sd_mmc_mci_mem_check(slot) )
+ {
+ Sd_mmc_mci_access_signal_off();
+ return CTRL_NO_PRESENT;
+ }
+
+ if( !sd_mmc_mci_read_open(slot, addr, 1) )
+ return CTRL_FAIL;
+
+ if( !sd_mmc_mci_read_sector_2_ram(slot, ram) )
+ return CTRL_FAIL;
+
+ if( !sd_mmc_mci_read_close(slot) )
+ return CTRL_FAIL;
+
+ Sd_mmc_mci_access_signal_off();
+ return CTRL_GOOD;
+
+}
+
+
+Ctrl_status sd_mmc_mci_dma_mem_2_ram(U8 slot, U32 addr, void *ram)
+{
+ if( !sd_mmc_mci_mem_check(slot) )
+ {
+ Sd_mmc_mci_access_signal_off();
+ return CTRL_NO_PRESENT;
+ }
+
+ if( !sd_mmc_mci_dma_read_open(slot, addr, ram, 1) )
+ return CTRL_FAIL;
+
+ if( !sd_mmc_mci_dma_read_sector_2_ram(slot,ram) )
+ return CTRL_FAIL;
+
+ if(! sd_mmc_mci_read_close(slot) )
+ return CTRL_FAIL;
+
+ Sd_mmc_mci_access_signal_off();
+ return CTRL_GOOD;
+
+}
+
+
+Ctrl_status sd_mmc_mci_mem_2_ram_0(U32 addr, void *ram)
+{
+ return sd_mmc_mci_mem_2_ram(0, addr, ram);
+}
+
+
+Ctrl_status sd_mmc_mci_mem_2_ram_1(U32 addr, void *ram)
+{
+ return sd_mmc_mci_mem_2_ram(1, addr, ram);
+}
+
+
+Ctrl_status sd_mmc_mci_multiple_mem_2_ram(U8 slot, U32 addr, void *ram, U32 nb_sectors)
+{
+ if( !sd_mmc_mci_mem_check(slot) )
+ {
+ Sd_mmc_mci_access_signal_off();
+ return CTRL_NO_PRESENT;
+ }
+
+ if( !sd_mmc_mci_read_open(slot, addr, nb_sectors) )
+ return CTRL_FAIL;
+
+ if( !sd_mmc_mci_read_multiple_sector_2_ram(slot, ram, nb_sectors) )
+ return CTRL_FAIL;
+
+ if( !sd_mmc_mci_read_close(slot) )
+ return CTRL_FAIL;
+
+ Sd_mmc_mci_access_signal_off();
+ return CTRL_GOOD;
+}
+
+
+Ctrl_status sd_mmc_mci_dma_multiple_mem_2_ram(U8 slot, U32 addr, void *ram, U32 nb_sectors)
+{
+ if( !sd_mmc_mci_mem_check(slot) )
+ {
+ Sd_mmc_mci_access_signal_off();
+ return CTRL_NO_PRESENT;
+ }
+
+ if( !sd_mmc_mci_dma_read_open(slot, addr, ram, nb_sectors ) )
+ return CTRL_FAIL;
+
+ if( !sd_mmc_mci_dma_read_multiple_sector_2_ram(slot, ram, nb_sectors) )
+ return CTRL_FAIL;
+
+ if( !sd_mmc_mci_read_close(slot) )
+ return CTRL_FAIL;
+
+ Sd_mmc_mci_access_signal_off();
+ return CTRL_GOOD;
+}
+
+
+Ctrl_status sd_mmc_mci_multiple_mem_2_ram_0(U32 addr, void *ram, U32 nb_sectors)
+{
+ return sd_mmc_mci_multiple_mem_2_ram(0, addr, ram, nb_sectors);
+}
+
+
+Ctrl_status sd_mmc_mci_multiple_mem_2_ram_1(U32 addr, void *ram, U32 nb_sectors)
+{
+ return sd_mmc_mci_multiple_mem_2_ram(1, addr, ram, nb_sectors);
+}
+
+
+Ctrl_status sd_mmc_mci_ram_2_mem(U8 slot, U32 addr, const void *ram)
+{
+ if( !sd_mmc_mci_mem_check(slot) )
+ {
+ Sd_mmc_mci_access_signal_off();
+ return CTRL_NO_PRESENT;
+ }
+
+ if( !sd_mmc_mci_write_open(slot, addr, 1) )
+ return CTRL_FAIL;
+
+ if( !sd_mmc_mci_write_sector_from_ram(slot,ram) )
+ return CTRL_FAIL;
+
+ if( !sd_mmc_mci_write_close(slot) )
+ return CTRL_FAIL;
+
+ Sd_mmc_mci_access_signal_off();
+ return CTRL_GOOD;
+}
+
+
+Ctrl_status sd_mmc_mci_dma_ram_2_mem(U8 slot, U32 addr, const void *ram)
+{
+ if( !sd_mmc_mci_mem_check(slot) )
+ {
+ Sd_mmc_mci_access_signal_off();
+ return CTRL_NO_PRESENT;
+ }
+
+ if( !sd_mmc_mci_dma_write_open(slot, addr, ram, 1) )
+ return CTRL_FAIL;
+
+ if( !sd_mmc_mci_dma_write_sector_from_ram(slot, ram) )
+ return CTRL_FAIL;
+
+ if( !sd_mmc_mci_write_close(slot) )
+ return CTRL_FAIL;
+
+ Sd_mmc_mci_access_signal_off();
+ return CTRL_GOOD;
+}
+
+
+Ctrl_status sd_mmc_mci_ram_2_mem_0(U32 addr, const void *ram)
+{
+ return sd_mmc_mci_ram_2_mem(0, addr, ram);
+}
+
+
+Ctrl_status sd_mmc_mci_ram_2_mem_1(U32 addr, const void *ram)
+{
+ return sd_mmc_mci_ram_2_mem(1, addr, ram);
+}
+
+
+Ctrl_status sd_mmc_mci_multiple_ram_2_mem(U8 slot, U32 addr, const void *ram, U32 nb_sectors)
+{
+ if( !sd_mmc_mci_mem_check(slot) )
+ {
+ Sd_mmc_mci_access_signal_off();
+ return CTRL_NO_PRESENT;
+ }
+
+ if( !sd_mmc_mci_write_open(slot, addr, nb_sectors) )
+ return CTRL_FAIL;
+
+ if( !sd_mmc_mci_write_multiple_sector_from_ram(slot, ram, nb_sectors) )
+ return CTRL_FAIL;
+
+ if( !sd_mmc_mci_write_close(slot) )
+ return CTRL_FAIL;
+
+ Sd_mmc_mci_access_signal_off();
+ return CTRL_GOOD;
+}
+
+
+Ctrl_status sd_mmc_mci_dma_multiple_ram_2_mem(U8 slot, U32 addr, const void *ram, U32 nb_sectors)
+{
+ if( !sd_mmc_mci_mem_check(slot) )
+ {
+ Sd_mmc_mci_access_signal_off();
+ return CTRL_NO_PRESENT;
+ }
+
+ if( !sd_mmc_mci_dma_write_open(slot, addr, ram, nb_sectors) )
+ return CTRL_FAIL;
+
+ if( !sd_mmc_mci_dma_write_multiple_sector_from_ram(slot, ram, nb_sectors) )
+ return CTRL_FAIL;
+
+ if( !sd_mmc_mci_write_close(slot) )
+ return CTRL_FAIL;
+
+ Sd_mmc_mci_access_signal_off();
+ return CTRL_GOOD;
+}
+
+
+Ctrl_status sd_mmc_mci_multiple_ram_2_mem_0(U32 addr, const void *ram, U32 nb_sectors)
+{
+ return sd_mmc_mci_multiple_ram_2_mem(0, addr, ram, nb_sectors);
+}
+
+
+Ctrl_status sd_mmc_mci_multiple_ram_2_mem_1(U32 addr, const void *ram, U32 nb_sectors)
+{
+ return sd_mmc_mci_multiple_ram_2_mem(1, addr, ram, nb_sectors);
+}
+
+
+//! @}
+
+#endif // ACCESS_MEM_TO_RAM == ENABLED
+
+
+#endif // SD_MMC_MCI_0_MEM == ENABLE || SD_MMC_MCI_1_MEM == ENABLE
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/sdmmc/sdmmc_mci/sd_mmc_mci_mem.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/sdmmc/sdmmc_mci/sd_mmc_mci_mem.h
new file mode 100644
index 0000000..62d92fe
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/sdmmc/sdmmc_mci/sd_mmc_mci_mem.h
@@ -0,0 +1,252 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief CTRL_ACCESS interface for SD/MMC card.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with an MCI module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _SD_MMC_MCI_MEM_H_
+#define _SD_MMC_MCI_MEM_H_
+
+
+#include "conf_access.h"
+
+#if SD_MMC_MCI_0_MEM == DISABLE && SD_MMC_MCI_1_MEM == DISABLE
+ #error sd_mmc_mem_mci.h is #included although SD_MMC_MCI_x_MEM are all disabled
+#endif
+
+
+#include "ctrl_access.h"
+
+
+//_____ D E F I N I T I O N S ______________________________________________
+
+/*! \name SD/MMC Status
+ *
+ * Status List for the SD/MMC
+ *
+ */
+//! @{
+#define SD_MMC_REMOVED 0
+#define SD_MMC_INSERTED 1
+#define SD_MMC_REMOVING 2
+//! @}
+
+
+//_____ D E C L A R A T I O N S ____________________________________________
+
+/*! \name Control Interface
+ */
+//! @{
+
+/*! \brief Tests the memory state and initializes the memory if required.
+ *
+ * The TEST UNIT READY SCSI primary command allows an application client to poll
+ * a LUN until it is ready without having to allocate memory for returned data.
+ *
+ * This command may be used to check the media status of LUNs with removable
+ * media.
+ *
+ * \param slot SD/MMC Slot Card Selected.
+ *
+ * \return Status.
+ */
+extern Ctrl_status sd_mmc_mci_test_unit_ready(U8 slot);
+//! Instance Declaration for sd_mmc_mci_test_unit_ready Slot O
+extern Ctrl_status sd_mmc_mci_test_unit_ready_0(void);
+//! Instance Declaration for sd_mmc_mci_test_unit_ready Slot 1
+extern Ctrl_status sd_mmc_mci_test_unit_ready_1(void);
+
+/*! \brief Returns the address of the last valid sector in the memory.
+ *
+ * \param slot SD/MMC Slot Card Selected.
+ * \param u32_nb_sector Pointer to the address of the last valid sector.
+ *
+ * \return Status.
+ */
+extern Ctrl_status sd_mmc_mci_read_capacity(U8 slot,U32 *u32_nb_sector);
+//! Instance Declaration for sd_mmc_mci_read_capacity Slot O
+extern Ctrl_status sd_mmc_mci_read_capacity_0(U32 *u32_nb_sector);
+//! Instance Declaration for sd_mmc_mci_read_capacity Slot 1
+extern Ctrl_status sd_mmc_mci_read_capacity_1(U32 *u32_nb_sector);
+
+/*! \brief Returns the write-protection state of the memory.
+ *
+* \param slot SD/MMC Slot Card Selected.
+ * \return \c TRUE if the memory is write-protected, else \c FALSE.
+ *
+ * \note Only used by removable memories with hardware-specific write
+ * protection.
+ */
+extern Bool sd_mmc_mci_wr_protect(U8 slot);
+//! Instance Declaration for sd_mmc_mci_wr_protect Slot O
+extern Bool sd_mmc_mci_wr_protect_0(void);
+//! Instance Declaration for sd_mmc_mci_wr_protect Slot 1
+extern Bool sd_mmc_mci_wr_protect_1(void);
+
+/*! \brief Tells whether the memory is removable.
+ *
+ * \param slot SD/MMC Slot Card Selected.
+ * \return \c TRUE if the memory is removable, else \c FALSE.
+ */
+extern Bool sd_mmc_mci_removal(U8 slot);
+//! Instance Declaration for sd_mmc_mci_removal Slot O
+extern Bool sd_mmc_mci_removal_0(void);
+//! Instance Declaration for sd_mmc_mci_removal Slot 1
+extern Bool sd_mmc_mci_removal_1(void);
+
+//! @}
+
+
+#if ACCESS_USB == ENABLED
+
+/*! \name MEM <-> USB Interface
+ */
+//! @{
+
+/*! \brief Tranfers data from the memory to USB.
+ *
+ * \param slot SD/MMC Slot Card Selected.
+ * \param addr Address of first memory sector to read.
+ * \param nb_sector Number of sectors to transfer.
+ *
+ * \return Status.
+ */
+extern Ctrl_status sd_mmc_mci_usb_read_10(U8 slot,U32 addr, U16 nb_sector);
+//! Instance Declaration for sd_mmc_mci_usb_read_10 Slot O
+extern Ctrl_status sd_mmc_mci_usb_read_10_0(U32 addr, U16 nb_sector);
+//! Instance Declaration for sd_mmc_mci_usb_read_10 Slot 1
+extern Ctrl_status sd_mmc_mci_usb_read_10_1(U32 addr, U16 nb_sector);
+
+/*! \brief Tranfers data from USB to the memory.
+ *
+ * \param slot SD/MMC Slot Card Selected.
+ * \param addr Address of first memory sector to write.
+ * \param nb_sector Number of sectors to transfer.
+ *
+ * \return Status.
+ */
+extern Ctrl_status sd_mmc_mci_usb_write_10(U8 slot,U32 addr, U16 nb_sector);
+//! Instance Declaration for sd_mmc_mci_usb_write_10 Slot O
+extern Ctrl_status sd_mmc_mci_usb_write_10_0(U32 addr, U16 nb_sector);
+//! Instance Declaration for sd_mmc_mci_usb_write_10 Slot 1
+extern Ctrl_status sd_mmc_mci_usb_write_10_1(U32 addr, U16 nb_sector);
+
+//! @}
+
+#endif
+
+
+#if ACCESS_MEM_TO_RAM == ENABLED
+
+/*! \name MEM <-> RAM Interface
+ */
+//! @{
+
+/*! \brief Copies 1 data sector from the memory to RAM.
+ *
+ * \param slot SD/MMC Slot Card Selected.
+ * \param addr Address of first memory sector to read.
+ * \param ram Pointer to RAM buffer to write.
+ *
+ * \return Status.
+ */
+extern Ctrl_status sd_mmc_mci_mem_2_ram(U8 slot, U32 addr, void *ram);
+extern Ctrl_status sd_mmc_mci_dma_mem_2_ram(U8 slot, U32 addr, void *ram);
+//! Instance Declaration for sd_mmc_mci_mem_2_ram Slot O
+extern Ctrl_status sd_mmc_mci_mem_2_ram_0(U32 addr, void *ram);
+//! Instance Declaration for sd_mmc_mci_mem_2_ram Slot 1
+extern Ctrl_status sd_mmc_mci_mem_2_ram_1(U32 addr, void *ram);
+
+/*! \brief Copies 1 data sector from RAM to the memory.
+ *
+ * \param slot SD/MMC Slot Card Selected.
+ * \param addr Address of first memory sector to write.
+ * \param ram Pointer to RAM buffer to read.
+ *
+ * \return Status.
+ */
+extern Ctrl_status sd_mmc_mci_ram_2_mem(U8 slot, U32 addr, const void *ram);
+extern Ctrl_status sd_mmc_mci_dma_ram_2_mem(U8 slot, U32 addr, const void *ram);
+//! Instance Declaration for sd_mmc_mci_mem_2_ram Slot O
+extern Ctrl_status sd_mmc_mci_ram_2_mem_0(U32 addr, const void *ram);
+//! Instance Declaration for sd_mmc_mci_mem_2_ram Slot 1
+extern Ctrl_status sd_mmc_mci_ram_2_mem_1(U32 addr, const void *ram);
+
+/*! \brief Copies nb_sectors data sector from the memory to RAM.
+ *
+ * \param slot SD/MMC Slot Card Selected.
+ * \param addr Address of first memory sector to read.
+ * \param ram Pointer to RAM buffer to write.
+ * \param nb_sectors Number of sectors to read.
+ *
+ * \return Status.
+ */
+extern Ctrl_status sd_mmc_mci_multiple_mem_2_ram(U8 slot,U32 addr, void *ram, U32 nb_sectors);
+extern Ctrl_status sd_mmc_mci_dma_multiple_mem_2_ram(U8 slot,U32 addr, void *ram, U32 nb_sectors);
+//! Instance Declaration for sd_mmc_mci_mem_2_ram Slot O
+extern Ctrl_status sd_mmc_mci_multiple_mem_2_ram_0(U32 addr, void *ram, U32 nb_sectors);
+//! Instance Declaration for sd_mmc_mci_mem_2_ram Slot 1
+extern Ctrl_status sd_mmc_mci_multiple_mem_2_ram_1(U32 addr, void *ram, U32 nb_sectors);
+
+/*! \brief Copies nb_sectors data sector from RAM to the memory.
+ *
+ * \param slot SD/MMC Slot Card Selected.
+ * \param addr Address of first memory sector to write.
+ * \param ram Pointer to RAM buffer to read.
+ * \param nb_sectors Number of sectors to write.
+ *
+ * \return Status.
+ */
+extern Ctrl_status sd_mmc_mci_multiple_ram_2_mem(U8 slot, U32 addr, const void *ram, U32 nb_sectors);
+extern Ctrl_status sd_mmc_mci_dma_multiple_ram_2_mem(U8 slot, U32 addr, const void *ram, U32 nb_sectors);
+//! Instance Declaration for sd_mmc_mci_mem_2_ram Slot O
+extern Ctrl_status sd_mmc_mci_multiple_ram_2_mem_0(U32 addr, const void *ram, U32 nb_sectors);
+//! Instance Declaration for sd_mmc_mci_mem_2_ram Slot 1
+extern Ctrl_status sd_mmc_mci_multiple_ram_2_mem_1(U32 addr, const void *ram, U32 nb_sectors);
+
+//! @}
+
+#endif
+
+
+
+#endif // _SD_MMC_MCI_MEM_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/virtual_mem/virtual_mem.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/virtual_mem/virtual_mem.c
new file mode 100644
index 0000000..c650e66
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/virtual_mem/virtual_mem.c
@@ -0,0 +1,259 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief Management of the virtual memory.
+ *
+ * This file manages the virtual memory.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+//_____ I N C L U D E S ___________________________________________________
+
+#include "board.h"
+#include "conf_access.h"
+#include "conf_virtual_mem.h"
+
+
+#if VIRTUAL_MEM == ENABLE
+
+#include "virtual_mem.h"
+#include <string.h>
+
+
+#ifndef VMEM_NB_SECTOR
+# error Define VMEM_NB_SECTOR in conf_virtual_mem.h file
+#endif
+
+//_____ M A C R O S ________________________________________________________
+
+#define VIRTUAL_MEM_TEST_CHANGE_STATE DISABLED//ENABLED
+
+
+//_____ P R I V A T E D E C L A R A T I O N S ____________________________
+
+
+//_____ D E F I N I T I O N S ______________________________________________
+
+#if (defined __GNUC__) && (defined __AVR32__)
+ __attribute__((__aligned__(4)))
+#elif (defined __ICCAVR32__)
+ #pragma data_alignment = 4
+#endif
+static uint8_t vmem_data[VMEM_NB_SECTOR * VMEM_SECTOR_SIZE];
+
+//static Bool cram_init = FALSE;
+#if (ACCESS_USB == ENABLED || ACCESS_MEM_TO_RAM == ENABLED) && VIRTUAL_MEM_TEST_CHANGE_STATE == ENABLED
+static volatile Bool s_b_data_modify = FALSE;
+#endif
+
+
+//_____ D E C L A R A T I O N S ____________________________________________
+
+//! This function tests memory state, and starts memory initialization
+//! @return Ctrl_status
+//! It is ready -> CTRL_GOOD
+//! Memory unplug -> CTRL_NO_PRESENT
+//! Not initialized or changed -> CTRL_BUSY
+//! An error occurred -> CTRL_FAIL
+Ctrl_status virtual_test_unit_ready(void)
+{
+ return CTRL_GOOD;
+}
+
+
+//! This function returns the address of the last valid sector
+//! @param u32_nb_sector Pointer to number of sectors (sector = 512 bytes)
+//! @return Ctrl_status
+//! It is ready -> CTRL_GOOD
+//! Memory unplug -> CTRL_NO_PRESENT
+//! Not initialized or changed -> CTRL_BUSY
+//! An error occurred -> CTRL_FAIL
+Ctrl_status virtual_read_capacity(U32 *u32_nb_sector)
+{
+ if (VMEM_NB_SECTOR<8)
+ *u32_nb_sector = 8-1;
+ else
+ *u32_nb_sector = VMEM_NB_SECTOR- 1;
+ return CTRL_GOOD;
+}
+
+
+//! This function returns the write-protected mode
+//! Only used by memory removal with a HARDWARE-SPECIFIC write-protected detection
+//! @warning The customer must unplug the memory to change this write-protected mode.
+//! @return TRUE if the memory is protected
+Bool virtual_wr_protect(void)
+{
+ return FALSE;
+}
+
+
+//! This function informs about the memory type
+//! @return TRUE if the memory is removable
+Bool virtual_removal(void)
+{
+ return FALSE;
+}
+
+
+//------------ SPECIFIC FUNCTIONS FOR TRANSFER BY USB --------------------------
+
+#if ACCESS_USB == ENABLED
+
+#include "udi_msc.h"
+
+//! This function transfers the memory data (programmed in sbc_read_10) directly to the USB interface
+//! sector = 512 bytes
+//! @param addr Sector address to start read
+//! @param nb_sector Number of sectors to transfer
+//! @return Ctrl_status
+//! It is ready -> CTRL_GOOD
+//! Memory unplug -> CTRL_NO_PRESENT
+//! Not initialized or changed -> CTRL_BUSY
+//! An error occurred -> CTRL_FAIL
+Ctrl_status virtual_usb_read_10(U32 addr, U16 nb_sector)
+{
+ U8 *ptr_cram;
+
+ if ((addr > VMEM_NB_SECTOR)
+ || (addr + nb_sector > VMEM_NB_SECTOR))
+ return CTRL_FAIL;
+
+ while (nb_sector--)
+ {
+ // If overflow (possible with size virtual mem < 8 sectors) then read the last sector
+ addr = min(addr, VMEM_NB_SECTOR - 1);
+ ptr_cram = &vmem_data[addr++ * VMEM_SECTOR_SIZE];
+ if (!udi_msc_trans_block( true, ptr_cram, VMEM_SECTOR_SIZE, NULL))
+ return CTRL_FAIL; // transfert aborted
+ }
+
+ return CTRL_GOOD;
+}
+
+
+//! This function transfers the USB data (programmed in sbc_write_10) directly to the memory interface
+//! sector = 512 bytes
+//! @param addr Sector address to start write
+//! @param nb_sector Number of sectors to transfer
+//! @return Ctrl_status
+//! It is ready -> CTRL_GOOD
+//! Memory unplug -> CTRL_NO_PRESENT
+//! Not initialized or changed -> CTRL_BUSY
+//! An error occurred -> CTRL_FAIL
+Ctrl_status virtual_usb_write_10(U32 addr, U16 nb_sector)
+{
+ U8 *ptr_cram;
+
+ if ((addr > VMEM_NB_SECTOR)
+ || (addr + nb_sector > VMEM_NB_SECTOR))
+ return CTRL_FAIL;
+
+ while (nb_sector--)
+ {
+ // If overflow (possible with size virtual mem < 8 sectors) then read the last sector
+ addr = min(addr, VMEM_NB_SECTOR - 1);
+ ptr_cram = &vmem_data[addr++ * VMEM_SECTOR_SIZE];
+ if (!udi_msc_trans_block( false, ptr_cram, VMEM_SECTOR_SIZE, NULL))
+ return CTRL_FAIL; // transfert aborted
+ }
+
+ return CTRL_GOOD;
+}
+
+#endif // ACCESS_USB == ENABLED
+
+
+//------------ SPECIFIC FUNCTIONS FOR TRANSFER BY RAM --------------------------
+
+#if ACCESS_MEM_TO_RAM == ENABLED
+
+#include <string.h>
+
+//! This function tranfers 1 data sector from memory to RAM
+//! sector = 512 bytes
+//! @param addr Sector address to start read
+//! @param ram Address of RAM buffer
+//! @return Ctrl_status
+//! It is ready -> CTRL_GOOD
+//! Memory unplug -> CTRL_NO_PRESENT
+//! Not initialized or changed -> CTRL_BUSY
+//! An error occurred -> CTRL_FAIL
+Ctrl_status virtual_mem_2_ram(U32 addr, void *ram)
+{
+ if (addr + 1 > Max(VMEM_NB_SECTOR, 8)) return CTRL_FAIL;
+
+ // If overflow (possible with size virtual mem < 8 sectors) then read the last sector
+ addr = min(addr, VMEM_NB_SECTOR - 1);
+
+ memcpy(ram, &vmem_data[addr * VMEM_SECTOR_SIZE], VMEM_SECTOR_SIZE);
+
+ return CTRL_GOOD;
+}
+
+
+//! This function tranfers 1 data sector from memory to RAM
+//! sector = 512 bytes
+//! @param addr Sector address to start write
+//! @param ram Address of RAM buffer
+//! @return Ctrl_status
+//! It is ready -> CTRL_GOOD
+//! Memory unplug -> CTRL_NO_PRESENT
+//! Not initialized or changed -> CTRL_BUSY
+//! An error occurred -> CTRL_FAIL
+Ctrl_status virtual_ram_2_mem(U32 addr, const void *ram)
+{
+ if (addr + 1 > VMEM_NB_SECTOR) return CTRL_FAIL;
+
+#if VIRTUAL_MEM_TEST_CHANGE_STATE == ENABLED
+ if (addr + 1 > FILE_SECTOR && addr <= FILE_SECTOR)
+ s_b_data_modify = TRUE;
+#endif
+
+ memcpy(&vmem_data[addr * VMEM_SECTOR_SIZE], ram, VMEM_SECTOR_SIZE);
+
+ return CTRL_GOOD;
+}
+
+#endif // ACCESS_MEM_TO_RAM == ENABLED
+
+
+#endif // VIRTUAL_MEM == ENABLE
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/virtual_mem/virtual_mem.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/virtual_mem/virtual_mem.h
new file mode 100644
index 0000000..fa06ca8
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/memory/virtual_mem/virtual_mem.h
@@ -0,0 +1,95 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief Management of the virtual memory.
+ *
+ * This file manages the virtual memory.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _VIRTUAL_MEM_H_
+#define _VIRTUAL_MEM_H_
+
+
+#include "conf_access.h"
+
+#if VIRTUAL_MEM == ENABLE
+
+#include "ctrl_access.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+//_____ D E F I N I T I O N S ______________________________________________
+
+#define VMEM_SECTOR_SIZE 512
+
+
+//---- CONTROL FUNCTIONS ----
+
+extern Ctrl_status virtual_test_unit_ready(void);
+extern Ctrl_status virtual_read_capacity(U32 *u32_nb_sector);
+extern Bool virtual_wr_protect(void);
+extern Bool virtual_removal(void);
+
+
+//---- ACCESS DATA FUNCTIONS ----
+
+// USB interface
+#if ACCESS_USB == ENABLED
+extern Ctrl_status virtual_usb_read_10 (U32 addr, U16 nb_sector);
+extern Ctrl_status virtual_usb_write_10(U32 addr, U16 nb_sector);
+#endif
+
+// RAM interface
+#if ACCESS_MEM_TO_RAM == ENABLED
+extern Ctrl_status virtual_mem_2_ram(U32 addr, void *ram);
+extern Ctrl_status virtual_ram_2_mem(U32 addr, const void *ram);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+#endif // _VIRTUAL_MEM_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/udc/udc.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/udc/udc.c
new file mode 100644
index 0000000..e6b3f72
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/udc/udc.c
@@ -0,0 +1,1012 @@
+/**
+ * \file
+ *
+ * \brief USB Device Controller (UDC)
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#include "conf_usb.h"
+#include "usb_protocol.h"
+#include "udd.h"
+#include "udc_desc.h"
+#include "udi.h"
+#include "udc.h"
+
+/**
+ * \addtogroup udc_group
+ * @{
+ */
+
+//! \name Internal variables to manage the USB device
+//! @{
+
+//! Device status state (see enum usb_device_status in usb_protocol.h)
+static le16_t udc_device_status;
+//! Device Configuration number selected by the USB host
+static uint8_t udc_num_configuration = 0;
+//! Pointer on the selected speed device configuration
+static udc_config_speed_t UDC_DESC_STORAGE *udc_ptr_conf;
+//! Pointer on interface descriptor used by SETUP request.
+static usb_iface_desc_t UDC_DESC_STORAGE *udc_ptr_iface;
+
+//! @}
+
+
+//! \name Internal structure to store the USB device main strings
+//! @{
+
+/**
+ * \brief Language ID of USB device (US ID by default)
+ */
+COMPILER_WORD_ALIGNED
+static UDC_DESC_STORAGE usb_str_lgid_desc_t udc_string_desc_languageid = {
+ .desc.bLength = sizeof(usb_str_lgid_desc_t),
+ .desc.bDescriptorType = USB_DT_STRING,
+ .string = {LE16(USB_LANGID_EN_US)}
+};
+
+/**
+ * \brief USB device manufacture name storage
+ * String is allocated only if USB_DEVICE_MANUFACTURE_NAME is declared
+ * by usb application configuration
+ */
+#ifdef USB_DEVICE_MANUFACTURE_NAME
+static uint8_t udc_string_manufacturer_name[] = USB_DEVICE_MANUFACTURE_NAME;
+#define USB_DEVICE_MANUFACTURE_NAME_SIZE (sizeof(udc_string_manufacturer_name)-1)
+#else
+#define USB_DEVICE_MANUFACTURE_NAME_SIZE 0
+#endif
+
+
+/**
+ * \brief USB device product name storage
+ * String is allocated only if USB_DEVICE_PRODUCT_NAME is declared
+ * by usb application configuration
+ */
+#ifdef USB_DEVICE_PRODUCT_NAME
+static uint8_t udc_string_product_name[] = USB_DEVICE_PRODUCT_NAME;
+#define USB_DEVICE_PRODUCT_NAME_SIZE (sizeof(udc_string_product_name)-1)
+#else
+#define USB_DEVICE_PRODUCT_NAME_SIZE 0
+#endif
+
+/**
+ * \brief USB device serial number storage
+ * String is allocated only if USB_DEVICE_SERIAL_NAME is declared
+ * by usb application configuration
+ */
+#ifdef USB_DEVICE_SERIAL_NAME
+static uint8_t udc_string_serial_name[] = USB_DEVICE_SERIAL_NAME;
+#define USB_DEVICE_SERIAL_NAME_SIZE (sizeof(udc_string_serial_name)-1)
+#else
+#define USB_DEVICE_SERIAL_NAME_SIZE 0
+#endif
+
+
+/**
+ * \brief USB device string descriptor
+ * Structure used to transfer ASCII strings to USB String descriptor structure.
+ */
+struct udc_string_desc_t {
+ usb_str_desc_t header;
+ le16_t string[Max(Max(USB_DEVICE_MANUFACTURE_NAME_SIZE, \
+ USB_DEVICE_PRODUCT_NAME_SIZE), USB_DEVICE_SERIAL_NAME_SIZE)];
+};
+COMPILER_WORD_ALIGNED
+static UDC_DESC_STORAGE struct udc_string_desc_t udc_string_desc = {
+ .header.bDescriptorType = USB_DT_STRING
+};
+//! @}
+
+
+
+usb_iface_desc_t UDC_DESC_STORAGE *udc_get_interface_desc(void)
+{
+ return udc_ptr_iface;
+}
+
+/**
+ * \brief Returns a value to check the end of USB Configuration descriptor
+ *
+ * \return address after the last byte of USB Configuration descriptor
+ */
+static usb_conf_desc_t UDC_DESC_STORAGE *udc_get_eof_conf(void)
+{
+ return (UDC_DESC_STORAGE usb_conf_desc_t *) ((uint8_t *)
+ udc_ptr_conf->desc +
+ le16_to_cpu(udc_ptr_conf->desc->wTotalLength));
+}
+
+
+#if (0!=USB_DEVICE_MAX_EP)
+/**
+ * \brief Search specific descriptor in global interface descriptor
+ *
+ * \param desc Address of interface descriptor
+ * or previous specific descriptor found
+ * \param desc_id Descriptor ID to search
+ *
+ * \return address of specific descriptor found
+ * \return NULL if it is the end of global interface descriptor
+ */
+static usb_conf_desc_t UDC_DESC_STORAGE *udc_next_desc_in_iface(usb_conf_desc_t
+ UDC_DESC_STORAGE * desc, uint8_t desc_id)
+{
+ usb_conf_desc_t UDC_DESC_STORAGE *ptr_eof_desc;
+
+ ptr_eof_desc = udc_get_eof_conf();
+ // Go to next descriptor
+ desc = (UDC_DESC_STORAGE usb_conf_desc_t *) ((uint8_t *) desc +
+ desc->bLength);
+ // Check the end of configuration descriptor
+ while (ptr_eof_desc > desc) {
+ // If new interface descriptor is found,
+ // then it is the end of the current global interface descriptor
+ if (USB_DT_INTERFACE == desc->bDescriptorType)
+ break; // End of global interface descriptor
+ if (desc_id == desc->bDescriptorType)
+ return desc; // Specific descriptor found
+ // Go to next descriptor
+ desc = (UDC_DESC_STORAGE usb_conf_desc_t *) ((uint8_t *) desc +
+ desc->bLength);
+ }
+ return NULL; // No specific descriptor found
+}
+#endif
+
+
+/**
+ * \brief Search an interface descriptor
+ * This routine updates the internal pointer udc_ptr_iface.
+ *
+ * \param iface_num Interface number to find in Configuration Descriptor
+ * \param setting_num Setting number of interface to find
+ *
+ * \return 1 if found or 0 if not found
+ */
+static bool udc_update_iface_desc(uint8_t iface_num, uint8_t setting_num)
+{
+ usb_conf_desc_t UDC_DESC_STORAGE *ptr_end_desc;
+
+ if (0 == udc_num_configuration)
+ return false;
+
+ if (iface_num >= udc_ptr_conf->desc->bNumInterfaces)
+ return false;
+
+ // Start at the beginning of configuration descriptor
+ udc_ptr_iface = (UDC_DESC_STORAGE usb_iface_desc_t *)
+ udc_ptr_conf->desc;
+
+ // Check the end of configuration descriptor
+ ptr_end_desc = udc_get_eof_conf();
+ while (ptr_end_desc >
+ (UDC_DESC_STORAGE usb_conf_desc_t *) udc_ptr_iface) {
+ if (USB_DT_INTERFACE == udc_ptr_iface->bDescriptorType) {
+ // A interface descriptor is found
+ // Check interface and alternate setting number
+ if ((iface_num == udc_ptr_iface->bInterfaceNumber)
+ && (setting_num ==
+ udc_ptr_iface->
+ bAlternateSetting))
+ return true; // Interface found
+ }
+ // Go to next descriptor
+ udc_ptr_iface = (UDC_DESC_STORAGE usb_iface_desc_t *) ((uint8_t
+ *) udc_ptr_iface +
+ udc_ptr_iface->bLength);
+ }
+ return false; // Interface not found
+}
+
+
+/**
+ * \brief Disables an usb device interface (UDI)
+ * This routine call the UDI corresponding to interface number
+ *
+ * \param iface_num Interface number to disable
+ *
+ * \return 1 if it is done or 0 if interface is not found
+ */
+static bool udc_iface_disable(uint8_t iface_num)
+{
+ udi_api_t UDC_DESC_STORAGE *udi_api;
+
+ // Select first alternate setting of the interface to update udc_ptr_iface
+ // before call iface->getsetting()
+ if (!udc_update_iface_desc(iface_num, 0))
+ return false;
+
+ // Select the interface with the current alternate setting
+ udi_api = udc_ptr_conf->udi_apis[iface_num];
+
+#if (0!=USB_DEVICE_MAX_EP)
+ if (!udc_update_iface_desc(iface_num, udi_api->getsetting()))
+ return false;
+
+ // Start at the beginning of interface descriptor
+ {
+ usb_ep_desc_t UDC_DESC_STORAGE *ep_desc;
+ ep_desc = (UDC_DESC_STORAGE usb_ep_desc_t *) udc_ptr_iface;
+ while (1) {
+ // Search Endpoint descriptor included in global interface descriptor
+ ep_desc = (UDC_DESC_STORAGE usb_ep_desc_t *)
+ udc_next_desc_in_iface((UDC_DESC_STORAGE
+ usb_conf_desc_t *)
+ ep_desc, USB_DT_ENDPOINT);
+ if (NULL == ep_desc)
+ break;
+ // Free the endpoint used by the interface
+ udd_ep_free(ep_desc->bEndpointAddress);
+ }
+ }
+#endif
+
+ // Disable interface
+ udi_api->disable();
+ return true;
+}
+
+
+/**
+ * \brief Enables an usb device interface (UDI)
+ * This routine calls the UDI corresponding
+ * to the interface and setting number.
+ *
+ * \param iface_num Interface number to enable
+ * \param setting_num Setting number to enable
+ *
+ * \return 1 if it is done or 0 if interface is not found
+ */
+static bool udc_iface_enable(uint8_t iface_num, uint8_t setting_num)
+{
+ // Select the interface descriptor
+ if (!udc_update_iface_desc(iface_num, setting_num))
+ return false;
+
+#if (0!=USB_DEVICE_MAX_EP)
+ usb_ep_desc_t UDC_DESC_STORAGE *ep_desc;
+
+ // Start at the beginning of the global interface descriptor
+ ep_desc = (UDC_DESC_STORAGE usb_ep_desc_t *) udc_ptr_iface;
+ while (1) {
+ // Search Endpoint descriptor included in the global interface descriptor
+ ep_desc = (UDC_DESC_STORAGE usb_ep_desc_t *)
+ udc_next_desc_in_iface((UDC_DESC_STORAGE
+ usb_conf_desc_t *) ep_desc,
+ USB_DT_ENDPOINT);
+ if (NULL == ep_desc)
+ break;
+ // Alloc the endpoint used by the interface
+ if (!udd_ep_alloc(ep_desc->bEndpointAddress,
+ ep_desc->bmAttributes,
+ le16_to_cpu
+ (ep_desc->wMaxPacketSize)))
+ return false;
+ }
+#endif
+ // Enable the interface
+ return udc_ptr_conf->udi_apis[iface_num]->enable();
+}
+
+
+/**
+ * \brief Reset the current configuration of the USB device,
+ * This routines can be called by UDD when a RESET on the USB line occurs.
+ */
+void udc_reset(void)
+{
+ uint8_t iface_num;
+
+ if (udc_num_configuration) {
+ for (iface_num = 0;
+ iface_num < udc_ptr_conf->desc->bNumInterfaces;
+ iface_num++) {
+ udc_iface_disable(iface_num);
+ }
+ }
+ udc_num_configuration = 0;
+#if (USB_CONFIG_ATTR_REMOTE_WAKEUP \
+ == (USB_DEVICE_ATTR & USB_CONFIG_ATTR_REMOTE_WAKEUP))
+ if (0 != (CPU_TO_LE16(USB_DEV_STATUS_REMOTEWAKEUP) & udc_device_status)) {
+ // Remote wakeup is enabled then disable it
+ UDC_REMOTEWAKEUP_DISABLE();
+ }
+#endif
+ udc_device_status =
+#if (USB_DEVICE_ATTR & USB_CONFIG_ATTR_SELF_POWERED)
+ CPU_TO_LE16(USB_DEV_STATUS_SELF_POWERED);
+#else
+ CPU_TO_LE16(USB_DEV_STATUS_BUS_POWERED);
+#endif
+}
+
+
+/**
+ * \brief Standard device request to get device status
+ *
+ * \return true if success
+ */
+static bool udc_req_std_dev_get_status(void)
+{
+ if (udd_g_ctrlreq.req.wLength != sizeof(udc_device_status))
+ return false;
+
+ udd_set_setup_payload(
+ (uint8_t *) & udc_device_status,
+ sizeof(udc_device_status));
+ return true;
+}
+
+
+#if (0!=USB_DEVICE_MAX_EP)
+/**
+ * \brief Standard endpoint request to get endpoint status
+ *
+ * \return true if success
+ */
+static bool udc_req_std_ep_get_status(void)
+{
+ static le16_t udc_ep_status;
+
+ if (udd_g_ctrlreq.req.wLength != sizeof(udc_ep_status))
+ return false;
+
+ udc_ep_status = udd_ep_is_halted(udd_g_ctrlreq.req.
+ wIndex & 0xFF) ? CPU_TO_LE16(USB_EP_STATUS_HALTED) : 0;
+
+ udd_set_setup_payload(
+ (uint8_t *) & udc_ep_status,
+ sizeof(udc_ep_status));
+ return true;
+}
+#endif
+
+/**
+ * \brief Standard device request to change device status
+ *
+ * \return true if success
+ */
+static bool udc_req_std_dev_clear_feature(void)
+{
+ if (udd_g_ctrlreq.req.wLength != 0)
+ return false;
+
+ if (udd_g_ctrlreq.req.wValue == USB_DEV_FEATURE_REMOTE_WAKEUP) {
+ udc_device_status &= CPU_TO_LE16(~USB_DEV_STATUS_REMOTEWAKEUP);
+#if (USB_CONFIG_ATTR_REMOTE_WAKEUP \
+ == (USB_DEVICE_ATTR & USB_CONFIG_ATTR_REMOTE_WAKEUP))
+ UDC_REMOTEWAKEUP_DISABLE();
+#endif
+ return true;
+ }
+ return false;
+}
+
+
+#if (0!=USB_DEVICE_MAX_EP)
+/**
+ * \brief Standard endpoint request to clear endpoint feature
+ *
+ * \return true if success
+ */
+static bool udc_req_std_ep_clear_feature(void)
+{
+ if (udd_g_ctrlreq.req.wLength != 0)
+ return false;
+
+ if (udd_g_ctrlreq.req.wValue == USB_EP_FEATURE_HALT) {
+ return udd_ep_clear_halt(udd_g_ctrlreq.req.wIndex & 0xFF);
+ }
+ return false;
+}
+#endif
+
+
+/**
+ * \brief Standard device request to set a feature
+ *
+ * \return true if success
+ */
+static bool udc_req_std_dev_set_feature(void)
+{
+ if (udd_g_ctrlreq.req.wLength != 0)
+ return false;
+
+ switch (udd_g_ctrlreq.req.wValue) {
+
+ case USB_DEV_FEATURE_REMOTE_WAKEUP:
+#if (USB_CONFIG_ATTR_REMOTE_WAKEUP \
+ == (USB_DEVICE_ATTR & USB_CONFIG_ATTR_REMOTE_WAKEUP))
+ udc_device_status |= CPU_TO_LE16(USB_DEV_STATUS_REMOTEWAKEUP);
+ UDC_REMOTEWAKEUP_ENABLE();
+ return true;
+#else
+ return false;
+#endif
+
+#ifdef USB_DEVICE_HS_SUPPORT
+ case USB_DEV_FEATURE_TEST_MODE:
+ if (!udd_is_high_speed())
+ break;
+ if (udd_g_ctrlreq.req.wIndex & 0xff)
+ break;
+ // Unconfigure the device, terminating all ongoing requests
+ udc_reset();
+ switch ((udd_g_ctrlreq.req.wIndex >> 8) & 0xFF) {
+ case USB_DEV_TEST_MODE_J:
+ udd_g_ctrlreq.callback = udd_test_mode_j;
+ return true;
+
+ case USB_DEV_TEST_MODE_K:
+ udd_g_ctrlreq.callback = udd_test_mode_k;
+ return true;
+
+ case USB_DEV_TEST_MODE_SE0_NAK:
+ udd_g_ctrlreq.callback = udd_test_mode_se0_nak;
+ return true;
+
+ case USB_DEV_TEST_MODE_PACKET:
+ udd_g_ctrlreq.callback = udd_test_mode_packet;
+ return true;
+
+ case USB_DEV_TEST_MODE_FORCE_ENABLE: // Only for downstream facing hub ports
+ default:
+ break;
+ }
+ break;
+#endif
+
+#ifdef USB_OTG
+ // TODO
+ case USB_DEV_FEATURE_OTG_B_HNP_ENABLE:
+ break;
+ case USB_DEV_FEATURE_OTG_A_HNP_SUPPORT:
+ break;
+ case USB_DEV_FEATURE_OTG_A_ALT_HNP_SUPPORT:
+ break;
+#endif
+ }
+ return false;
+}
+
+
+/**
+ * \brief Standard endpoint request to halt an endpoint
+ *
+ * \return true if success
+ */
+#if (0!=USB_DEVICE_MAX_EP)
+static bool udc_req_std_epset_feature(void)
+{
+ if (udd_g_ctrlreq.req.wLength != 0)
+ return false;
+ if (udd_g_ctrlreq.req.wValue == USB_EP_FEATURE_HALT) {
+ return udd_ep_set_halt(udd_g_ctrlreq.req.wIndex & 0xFF);
+ }
+ return false;
+}
+#endif
+
+/**
+ * \brief Change the address of device
+ * Callback called at the end of request set address
+ */
+static void udc_valid_address(void)
+{
+ udd_set_address(udd_g_ctrlreq.req.wValue & 0x7F);
+}
+
+
+/**
+ * \brief Standard device request to set device address
+ *
+ * \return true if success
+ */
+static bool udc_req_std_dev_set_address(void)
+{
+ if (udd_g_ctrlreq.req.wLength != 0)
+ return false;
+
+ // The address must be changed at the end of setup request after the handshake
+ // then we use a callback to change address
+ udd_g_ctrlreq.callback = udc_valid_address;
+ return true;
+}
+
+
+/**
+ * \brief Standard device request to get device string descriptor
+ *
+ * \return true if success
+ */
+static bool udc_req_std_dev_get_str_desc(void)
+{
+ uint8_t i;
+ uint8_t *str;
+ uint8_t str_lgt=0;
+
+ // Link payload pointer to the string corresponding at request
+ switch (udd_g_ctrlreq.req.wValue & 0xff) {
+ case 0:
+ udd_set_setup_payload(
+ (uint8_t *) & udc_string_desc_languageid,
+ sizeof(udc_string_desc_languageid));
+ break;
+
+#ifdef USB_DEVICE_MANUFACTURE_NAME
+ case 1:
+ str_lgt = USB_DEVICE_MANUFACTURE_NAME_SIZE;
+ str = udc_string_manufacturer_name;
+ break;
+#endif
+#ifdef USB_DEVICE_PRODUCT_NAME
+ case 2:
+ str_lgt = USB_DEVICE_PRODUCT_NAME_SIZE;
+ str = udc_string_product_name;
+ break;
+#endif
+#ifdef USB_DEVICE_SERIAL_NAME
+ case 3:
+ str_lgt = USB_DEVICE_SERIAL_NAME_SIZE;
+ str = udc_string_serial_name;
+ break;
+#endif
+ default:
+#ifdef UDC_GET_EXTRA_STRING
+ if (UDC_GET_EXTRA_STRING())
+ break;
+#endif
+ return false;
+ }
+
+ if (str_lgt != 0) {
+ for(i = 0; i < str_lgt; i++) {
+ udc_string_desc.string[i] = cpu_to_le16((le16_t)str[i]);
+ }
+
+ udc_string_desc.header.bLength = 2 + (str_lgt) * 2;
+ udd_set_setup_payload(
+ (uint8_t *) &udc_string_desc,
+ udc_string_desc.header.bLength);
+ }
+
+ return true;
+}
+
+
+/**
+ * \brief Standard device request to get descriptors about USB device
+ *
+ * \return true if success
+ */
+static bool udc_req_std_dev_get_descriptor(void)
+{
+ uint8_t conf_num;
+
+ conf_num = udd_g_ctrlreq.req.wValue & 0xff;
+
+ // Check descriptor ID
+ switch ((uint8_t) (udd_g_ctrlreq.req.wValue >> 8)) {
+ case USB_DT_DEVICE:
+ // Device descriptor requested
+#ifdef USB_DEVICE_HS_SUPPORT
+ if (!udd_is_high_speed()) {
+ udd_set_setup_payload(
+ (uint8_t *) udc_config.confdev_hs,
+ udc_config.confdev_hs->bLength);
+ } else
+#endif
+ {
+ udd_set_setup_payload(
+ (uint8_t *) udc_config.confdev_lsfs,
+ udc_config.confdev_lsfs->bLength);
+ }
+ break;
+
+ case USB_DT_CONFIGURATION:
+ // Configuration descriptor requested
+#ifdef USB_DEVICE_HS_SUPPORT
+ if (udd_is_high_speed()) {
+ // HS descriptor
+ if (conf_num >= udc_config.confdev_hs->
+ bNumConfigurations)
+ return false;
+ udd_set_setup_payload(
+ (uint8_t *)udc_config.conf_hs[conf_num].desc,
+ le16_to_cpu(udc_config.conf_hs[conf_num].desc->wTotalLength));
+ } else
+#endif
+ {
+ // FS descriptor
+ if (conf_num >= udc_config.confdev_lsfs->
+ bNumConfigurations)
+ return false;
+ udd_set_setup_payload(
+ (uint8_t *)udc_config.conf_lsfs[conf_num].desc,
+ le16_to_cpu(udc_config.conf_lsfs[conf_num].desc->wTotalLength));
+ }
+ ((usb_conf_desc_t *) udd_g_ctrlreq.payload)->bDescriptorType =
+ USB_DT_CONFIGURATION;
+ break;
+
+#ifdef USB_DEVICE_HS_SUPPORT
+ case USB_DT_DEVICE_QUALIFIER:
+ // Device qualifier descriptor requested
+ udd_set_setup_payload(
+ (uint8_t *) udc_config.qualifier,
+ udc_config.qualifier->bLength);
+ break;
+
+ case USB_DT_OTHER_SPEED_CONFIGURATION:
+ // Other configuration descriptor requested
+ if (!udd_is_high_speed()) {
+ // HS descriptor
+ if (conf_num >= udc_config.confdev_hs->
+ bNumConfigurations)
+ return false;
+ udd_set_setup_payload(
+ (uint8_t *)udc_config.conf_hs[conf_num].desc,
+ le16_to_cpu(udc_config.conf_hs[conf_num].desc->wTotalLength));
+ } else {
+ // FS descriptor
+ if (conf_num >= udc_config.confdev_lsfs->
+ bNumConfigurations)
+ return false;
+ udd_set_setup_payload(
+ (uint8_t *)udc_config.conf_lsfs[conf_num].desc,
+ le16_to_cpu(udc_config.conf_lsfs[conf_num].desc->wTotalLength));
+ }
+ ((usb_conf_desc_t *) udd_g_ctrlreq.payload)->bDescriptorType =
+ USB_DT_OTHER_SPEED_CONFIGURATION;
+ break;
+#endif
+
+ case USB_DT_STRING:
+ // String descriptor requested
+ if (!udc_req_std_dev_get_str_desc()) {
+ return false;
+ }
+ break;
+
+ default:
+ // Unknown descriptor requested
+ return false;
+ }
+ // if the descriptor is larger than length requested, then reduce it
+ if (udd_g_ctrlreq.req.wLength < udd_g_ctrlreq.payload_size)
+ udd_g_ctrlreq.payload_size = udd_g_ctrlreq.req.wLength;
+ return true;
+}
+
+
+/**
+ * \brief Standard device request to get configuration number
+ *
+ * \return true if success
+ */
+static bool udc_req_std_dev_get_configuration(void)
+{
+ if (udd_g_ctrlreq.req.wLength != 1)
+ return false;
+
+ udd_set_setup_payload(&udc_num_configuration,1);
+ return true;
+}
+
+
+/**
+ * \brief Standard device request to enable a configuration
+ *
+ * \return true if success
+ */
+static bool udc_req_std_dev_set_configuration(void)
+{
+ uint8_t iface_num;
+
+ // Check request length
+ if (udd_g_ctrlreq.req.wLength != 0)
+ return false;
+ // Authorize configuration only if the address is valid
+ if (!udd_getaddress())
+ return false;
+ // Check the configuration number requested
+#ifdef USB_DEVICE_HS_SUPPORT
+ if (udd_is_high_speed()) {
+ // HS descriptor
+ if ((udd_g_ctrlreq.req.wValue & 0xFF) >
+ udc_config.confdev_hs->bNumConfigurations)
+ return false;
+ } else
+#endif
+ {
+ // FS descriptor
+ if ((udd_g_ctrlreq.req.wValue & 0xFF) >
+ udc_config.confdev_lsfs->bNumConfigurations)
+ return false;
+ }
+
+ // Reset current configuration
+ udc_reset();
+
+ // Enable new configuration
+ udc_num_configuration = udd_g_ctrlreq.req.wValue & 0xFF;
+ if (udc_num_configuration == 0) {
+ return true; // Default empty configuration requested
+ }
+ // Update pointer of the configuration descriptor
+#ifdef USB_DEVICE_HS_SUPPORT
+ if (udd_is_high_speed()) {
+ // HS descriptor
+ udc_ptr_conf = &udc_config.conf_hs[udc_num_configuration - 1];
+ } else
+#endif
+ {
+ // FS descriptor
+ udc_ptr_conf = &udc_config.conf_lsfs[udc_num_configuration - 1];
+ }
+ // Enable all interfaces of the selected configuration
+ for (iface_num = 0; iface_num < udc_ptr_conf->desc->bNumInterfaces;
+ iface_num++) {
+ if (!udc_iface_enable(iface_num, 0))
+ return false;
+ }
+ return true;
+}
+
+
+/**
+ * \brief Standard interface request
+ * to get the alternate setting number of an interface
+ *
+ * \return true if success
+ */
+static bool udc_req_std_iface_get_setting(void)
+{
+ static uint8_t udc_iface_setting;
+ uint8_t iface_num;
+ udi_api_t UDC_DESC_STORAGE *udi_api;
+
+ if (udd_g_ctrlreq.req.wLength != 1)
+ return false; // Error in request
+ if (!udc_num_configuration)
+ return false; // The device is not is configured state yet
+
+ // Check the interface number included in the request
+ iface_num = udd_g_ctrlreq.req.wIndex & 0xFF;
+ if (iface_num >= udc_ptr_conf->desc->bNumInterfaces)
+ return false;
+
+ // Select first alternate setting of the interface to update udc_ptr_iface
+ // before call iface->getsetting()
+ if (!udc_update_iface_desc(iface_num, 0))
+ return false;
+ // Get alternate setting from UDI
+ udi_api = udc_ptr_conf->udi_apis[iface_num];
+ udc_iface_setting = udi_api->getsetting();
+ // Link value to payload pointer of request
+ udd_set_setup_payload(&udc_iface_setting,1);
+ return true;
+}
+
+
+/**
+ * \brief Standard interface request
+ * to set an alternate setting of an interface
+ *
+ * \return true if success
+ */
+static bool udc_req_std_iface_set_setting(void)
+{
+ uint8_t iface_num, setting_num;
+
+ if (udd_g_ctrlreq.req.wLength != 0)
+ return false; // Error in request
+ if (!udc_num_configuration)
+ return false; // The device is not is configured state yet
+
+
+ iface_num = udd_g_ctrlreq.req.wIndex & 0xFF;
+ setting_num = udd_g_ctrlreq.req.wValue & 0xFF;
+
+ // Disable current setting
+ if (!udc_iface_disable(iface_num))
+ return false;
+
+ // Enable new setting
+ return udc_iface_enable(iface_num, setting_num);
+}
+
+
+/**
+ * \brief Main routine to manage the standard USB SETUP request
+ *
+ * \return true if the request is supported
+ */
+static bool udc_reqstd(void)
+{
+ if (Udd_setup_is_in()) {
+ // GET Standard Requests
+ if (udd_g_ctrlreq.req.wLength == 0)
+ return false; // Error for USB host
+
+ if (USB_REQ_RECIP_DEVICE == Udd_setup_recipient()) {
+ // Standard Get Device request
+ switch (udd_g_ctrlreq.req.bRequest) {
+ case USB_REQ_GET_STATUS:
+ return udc_req_std_dev_get_status();
+ case USB_REQ_GET_DESCRIPTOR:
+ return udc_req_std_dev_get_descriptor();
+ case USB_REQ_GET_CONFIGURATION:
+ return udc_req_std_dev_get_configuration();
+ }
+ }
+
+ if (USB_REQ_RECIP_INTERFACE == Udd_setup_recipient()) {
+ // Standard Get Interface request
+ switch (udd_g_ctrlreq.req.bRequest) {
+ case USB_REQ_GET_INTERFACE:
+ return udc_req_std_iface_get_setting();
+ }
+ }
+#if (0!=USB_DEVICE_MAX_EP)
+ if (USB_REQ_RECIP_ENDPOINT == Udd_setup_recipient()) {
+ // Standard Get Endpoint request
+ switch (udd_g_ctrlreq.req.bRequest) {
+ case USB_REQ_GET_STATUS:
+ return udc_req_std_ep_get_status();
+ }
+ }
+#endif
+ } else {
+ // SET Standard Requests
+ if (USB_REQ_RECIP_DEVICE == Udd_setup_recipient()) {
+ // Standard Set Device request
+ switch (udd_g_ctrlreq.req.bRequest) {
+ case USB_REQ_SET_ADDRESS:
+ return udc_req_std_dev_set_address();
+ case USB_REQ_CLEAR_FEATURE:
+ return udc_req_std_dev_clear_feature();
+ case USB_REQ_SET_FEATURE:
+ return udc_req_std_dev_set_feature();
+ case USB_REQ_SET_CONFIGURATION:
+ return udc_req_std_dev_set_configuration();
+ case USB_REQ_SET_DESCRIPTOR:
+ /* Not supported (defined as optional by the USB 2.0 spec) */
+ break;
+ }
+ }
+
+ if (USB_REQ_RECIP_INTERFACE == Udd_setup_recipient()) {
+ // Standard Set Interface request
+ switch (udd_g_ctrlreq.req.bRequest) {
+ case USB_REQ_SET_INTERFACE:
+ return udc_req_std_iface_set_setting();
+ }
+ }
+#if (0!=USB_DEVICE_MAX_EP)
+ if (USB_REQ_RECIP_ENDPOINT == Udd_setup_recipient()) {
+ // Standard Set Endpoint request
+ switch (udd_g_ctrlreq.req.bRequest) {
+ case USB_REQ_CLEAR_FEATURE:
+ return udc_req_std_ep_clear_feature();
+ case USB_REQ_SET_FEATURE:
+ return udc_req_std_epset_feature();
+ }
+ }
+#endif
+ }
+ return false;
+}
+
+
+/**
+ * \brief Send the SETUP interface request to UDI
+ *
+ * \return true if the request is supported
+ */
+static bool udc_req_iface(void)
+{
+ uint8_t iface_num;
+ udi_api_t UDC_DESC_STORAGE *udi_api;
+
+ if (0 == udc_num_configuration)
+ return false; // The device is not is configured state yet
+ // Check interface number
+ iface_num = udd_g_ctrlreq.req.wIndex & 0xFF;
+ if (iface_num >= udc_ptr_conf->desc->bNumInterfaces)
+ return false;
+
+ //* To update udc_ptr_iface with the selected interface in request
+ // Select first alternate setting of interface to update udc_ptr_iface
+ // before calling udi_api->getsetting()
+ if (!udc_update_iface_desc(iface_num, 0))
+ return false;
+ // Select the interface with the current alternate setting
+ udi_api = udc_ptr_conf->udi_apis[iface_num];
+ if (!udc_update_iface_desc(iface_num, udi_api->getsetting()))
+ return false;
+
+ // Send the SETUP request to the UDI corresponding to the interface number
+ return udi_api->setup();
+}
+
+
+/**
+ * \brief Main routine to manage the USB SETUP request.
+ *
+ * This function parses a USB SETUP request and submits an appropriate
+ * response back to the host or, in the case of SETUP OUT requests
+ * with data, sets up a buffer for receiving the data payload.
+ *
+ * The main standard requests defined by the USB 2.0 standard are handled
+ * internally. The interface requests are sent to UDI, and the specific request
+ * sent to a specific application callback.
+ *
+ * \return true if the request is supported, else the request is stalled by UDD
+ */
+bool udc_process_setup(void)
+{
+ // By default no data (receive/send) and no callbacks registered
+ udd_g_ctrlreq.payload_size = 0;
+ udd_g_ctrlreq.callback = NULL;
+ udd_g_ctrlreq.over_under_run = NULL;
+
+ if (Udd_setup_is_in()) {
+ if (udd_g_ctrlreq.req.wLength == 0)
+ return false; // Error from USB host
+ }
+
+ // If standard request then try to decode it in UDC
+ if (Udd_setup_type() == USB_REQ_TYPE_STANDARD) {
+ if (udc_reqstd())
+ return true;
+ }
+
+ // If interface request then try to decode it in UDI
+ if (Udd_setup_recipient() == USB_REQ_RECIP_INTERFACE) {
+ if (udc_req_iface())
+ return true;
+ }
+
+ // Here SETUP request unknown by UDC and UDIs
+#ifdef USB_DEVICE_SPECIFIC_REQUEST
+ // Try to decode it in specific callback
+ return USB_DEVICE_SPECIFIC_REQUEST(); // Ex: Vendor request,...
+#else
+ return false;
+#endif
+}
+
+//! @}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/udc/udc.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/udc/udc.h
new file mode 100644
index 0000000..e202692
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/udc/udc.h
@@ -0,0 +1,248 @@
+/**
+ * \file
+ *
+ * \brief Interface of the USB Device Controller (UDC)
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _UDC_H_
+#define _UDC_H_
+
+#include "conf_usb.h"
+#include "usb_protocol.h"
+#include "udc_desc.h"
+#include "udd.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * \ingroup usb_device_group
+ * \defgroup udc_group USB Device Controller (UDC)
+ *
+ * The UDC provides a high-level abstraction of the usb device.
+ * You can use these functions to control the main device state
+ * (start/attach/wakeup).
+ *
+ * \section USB_DEVICE_CONF USB Device Custom configuration
+ * The following USB Device configuration must be included in the conf_usb.h
+ * file of the application.
+ *
+ * USB_DEVICE_VENDOR_ID (Word)<br>
+ * Vendor ID provided by USB org (ATMEL 0x03EB).
+ *
+ * USB_DEVICE_PRODUCT_ID (Word)<br>
+ * Product ID (Referenced in usb_atmel.h).
+ *
+ * USB_DEVICE_MAJOR_VERSION (Byte)<br>
+ * Major version of the device
+ *
+ * USB_DEVICE_MINOR_VERSION (Byte)<br>
+ * Minor version of the device
+ *
+ * USB_DEVICE_MANUFACTURE_NAME (string)<br>
+ * ASCII name for the manufacture
+ *
+ * USB_DEVICE_PRODUCT_NAME (string)<br>
+ * ASCII name for the product
+ *
+ * USB_DEVICE_SERIAL_NAME (string)<br>
+ * ASCII name to enable and set a serial number
+ *
+ * USB_DEVICE_POWER (Numeric)<br>
+ * (unit mA) Maximum device power
+ *
+ * USB_DEVICE_ATTR (Byte)<br>
+ * USB attributes available:
+ * - USB_CONFIG_ATTR_SELF_POWERED
+ * - USB_CONFIG_ATTR_REMOTE_WAKEUP
+ * Note: if remote wake enabled then defines remotewakeup callbacks,
+ * see Table 5-2. External API from UDC - Callback
+ *
+ * USB_DEVICE_LOW_SPEED (Only defined)<br>
+ * Force the USB Device to run in low speed
+ *
+ * USB_DEVICE_HS_SUPPORT (Only defined)<br>
+ * Authorize the USB Device to run in high speed
+ *
+ * USB_DEVICE_MAX_EP (Byte)<br>
+ * Define the maximum endpoint number used by the USB Device.<br>
+ * This one is already defined in UDI default configuration.
+ * Ex:
+ * - When endpoint control 0x00, endpoint 0x01 and
+ * endpoint 0x82 is used then USB_DEVICE_MAX_EP=2
+ * - When only endpoint control 0x00 is used then USB_DEVICE_MAX_EP=0
+ * - When endpoint 0x01 and endpoint 0x81 is used then USB_DEVICE_MAX_EP=1<br>
+ * (configuration not possible on USBB interface)
+ * @{
+ */
+
+/**
+ * \brief Authorizes the VBUS event
+ *
+ * \return true, if the VBUS monitoring is possible.
+ *
+ * \section udc_vbus_monitoring VBus monitoring used cases
+ *
+ * The VBus monitoring is used only for USB SELF Power application.
+ *
+ * - No custom implementation \n
+ * // Authorize VBUS monitoring \n
+ * if (!udc_include_vbus_monitoring()) { \n
+ * // VBUS monitoring is not available on this product \n
+ * // thereby VBUS has to be considered as present \n
+ * // Attach USB Device \n
+ * udc_attach(); \n
+ * } \n
+ *
+ * - Add custom VBUS monitoring \n
+ * // Authorize VBUS monitoring \n
+ * if (!udc_include_vbus_monitoring()) { \n
+ * // Implement custom VBUS monitoring via GPIO or other \n
+ * } \n
+ * Event_VBUS_present() // VBUS interrupt or GPIO interrupt or other \n
+ * { \n
+ * // Attach USB Device \n
+ * udc_attach(); \n
+ * } \n
+ *
+ * - Case of battery charging \n
+ * Event VBUS present() // VBUS interrupt or GPIO interrupt or .. \n
+ * { \n
+ * // Authorize battery charging, but wait key press to start USB. \n
+ * } \n
+ * Event Key press() \n
+ * { \n
+ * // Stop batteries charging \n
+ * // Start USB \n
+ * udc_attach(); \n
+ * } \n
+ */
+static inline bool udc_include_vbus_monitoring(void)
+{
+ return udd_include_vbus_monitoring();
+}
+
+
+/*! \brief Start the USB Device stack
+ */
+static inline void udc_start(void)
+{
+ udd_enable();
+}
+
+
+/*! \brief Stop the USB Device stack
+ */
+static inline void udc_stop(void)
+{
+ udd_disable();
+}
+
+
+/**
+ * \brief Attach device to the bus when possible
+ *
+ * \warning If a VBus control is included in driver,
+ * then it will attach device when an acceptable Vbus
+ * level from the host is detected.
+ */
+static inline void udc_attach(void)
+{
+ udd_attach();
+}
+
+
+/**
+ * \brief Detaches the device from the bus
+ *
+ * The driver must remove pull-up on USB line D- or D+.
+ */
+static inline void udc_detach(void)
+{
+ udd_detach();
+}
+
+
+/*! \brief The USB driver sends a resume signal called \e "Upstream Resume"
+ */
+static inline void udc_wakeup(void)
+{
+ udd_send_wake_up();
+}
+
+
+/**
+ * \brief Returns a pointer on the current interface descriptor
+ *
+ * \return pointer on the current interface descriptor.
+ */
+usb_iface_desc_t UDC_DESC_STORAGE *udc_get_interface_desc(void);
+
+//@}
+
+/**
+ * \ingroup usb_group
+ * \defgroup usb_device_group USB Stack Devices
+ *
+ * This module includes USB Stack Device implementation.
+ * The stack is divided in three parts:
+ * - USB Device Controller (UDC) provides USB chapter 9 compliance
+ * - USB Device Interface (UDI) provides USB Class compliance
+ * - USB Device Driver (UDD) provides USB Driver for each AVR product
+
+ * Many USB Device applications can be implemented on AVR products.
+ * Atmel provides many application notes for different applications:
+ * - AVR4900, provides general information about Device Stack
+ * - AVR4901, explains how to create a new class
+ * - AVR4902, explains how to create a composite device
+ * - AVR49xx, all device classes provided in ASF have an application note
+ *
+ * A basic USB knowledge is required to understand the USB Device
+ * Class application notes (HID,MS,CDC,PHDC,...).
+ * Then, to create an USB device with
+ * only one class provided by ASF, refer directly to the application note
+ * corresponding to this USB class. The USB Device application note for
+ * New Class and Composite is dedicated to advanced USB users.
+ *
+ * @{
+ */
+
+//! @}
+
+#ifdef __cplusplus
+}
+#endif
+#endif // _UDC_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/udc/udc_desc.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/udc/udc_desc.h
new file mode 100644
index 0000000..ea854a6
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/udc/udc_desc.h
@@ -0,0 +1,126 @@
+/**
+ * \file
+ *
+ * \brief Common API for USB Device Interface
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _UDC_DESC_H_
+#define _UDC_DESC_H_
+
+#include "conf_usb.h"
+#include "usb_protocol.h"
+#include "udi.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * \ingroup udc_group
+ * \defgroup udc_desc_group USB Device Descriptor
+ *
+ * @{
+ */
+
+/**
+ * \brief Defines the memory's location of USB descriptors
+ *
+ * By default the Descriptor is stored in RAM
+ * (UDC_DESC_STORAGE is defined empty).
+ *
+ * If you have need to free RAM space,
+ * it is possible to put descriptor in flash in following case:
+ * - USB driver authorize flash transfer (USBB on UC3 and USB on Mega)
+ * - USB Device is not high speed (UDC no need to change USB descriptors)
+ *
+ * For UC3 application used "const".
+ *
+ * For Mega application used "code".
+ */
+#define UDC_DESC_STORAGE
+ // Descriptor storage in internal RAM
+#if (defined UDC_DATA_USE_HRAM_SUPPORT)
+# if defined(__GNUC__)
+# define UDC_DATA(x) COMPILER_WORD_ALIGNED __attribute__((__section__(".data_hram0")))
+# define UDC_BSS(x) COMPILER_ALIGNED(x) __attribute__((__section__(".bss_hram0")))
+# elif defined(__ICCAVR32__)
+# define UDC_DATA(x) COMPILER_ALIGNED(x) __data32
+# define UDC_BSS(x) COMPILER_ALIGNED(x) __data32
+# endif
+#else
+# define UDC_DATA(x) COMPILER_ALIGNED(x)
+# define UDC_BSS(x) COMPILER_ALIGNED(x)
+#endif
+
+
+
+/**
+ * \brief Configuration descriptor and UDI link for one USB speed
+ */
+typedef struct {
+ //! USB configuration descriptor
+ usb_conf_desc_t UDC_DESC_STORAGE *desc;
+ //! Array of UDI API pointer
+ udi_api_t UDC_DESC_STORAGE *UDC_DESC_STORAGE * udi_apis;
+} udc_config_speed_t;
+
+
+/**
+ * \brief All information about the USB Device
+ */
+typedef struct {
+ //! USB device descriptor for low or full speed
+ usb_dev_desc_t UDC_DESC_STORAGE *confdev_lsfs;
+ //! USB configuration descriptor and UDI API pointers for low or full speed
+ udc_config_speed_t UDC_DESC_STORAGE *conf_lsfs;
+#ifdef USB_DEVICE_HS_SUPPORT
+ //! USB device descriptor for high speed
+ usb_dev_desc_t UDC_DESC_STORAGE *confdev_hs;
+ //! USB device qualifier, only use in high speed mode
+ usb_dev_qual_desc_t UDC_DESC_STORAGE *qualifier;
+ //! USB configuration descriptor and UDI API pointers for high speed
+ udc_config_speed_t UDC_DESC_STORAGE *conf_hs;
+#endif
+} udc_config_t;
+
+//! Global variables of USB Device Descriptor and UDI links
+extern UDC_DESC_STORAGE udc_config_t udc_config;
+
+//@}
+
+#ifdef __cplusplus
+}
+#endif
+#endif // _UDC_DESC_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/udc/udd.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/udc/udd.h
new file mode 100644
index 0000000..5ecf32b
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/udc/udd.h
@@ -0,0 +1,377 @@
+/**
+ * \file
+ *
+ * \brief Common API for USB Device Drivers (UDD)
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _UDD_H_
+#define _UDD_H_
+
+#include "usb_protocol.h"
+#include "udc_desc.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * \ingroup usb_device_group
+ * \defgroup udd_group USB Device Driver (UDD)
+ *
+ * The UDD driver provides a low-level abstraction of the device
+ * controller hardware. Most events coming from the hardware such as
+ * interrupts, which may cause the UDD to call into the UDC and UDI.
+ *
+ * @{
+ */
+
+//! \brief Endpoint identifier
+typedef uint8_t udd_ep_id_t;
+
+//! \brief Endpoint transfer status
+//! Returned in parameters of callback register via udd_ep_run routine.
+typedef enum {
+ UDD_EP_TRANSFER_OK = 0,
+ UDD_EP_TRANSFER_ABORT = 1
+} udd_ep_status_t;
+
+/**
+ * \brief A USB Device SETUP request
+ *
+ * SETUP packet contains following information.
+ */
+COMPILER_PACK_SET(1);
+typedef struct {
+ uint8_t bmRequestType;
+ uint8_t bRequest;
+ uint16_t wValue;
+ uint16_t wIndex;
+ uint16_t wLength;
+} udd_setup_req_t;
+COMPILER_PACK_RESET();
+
+/**
+ * \brief Global variable to give and record information of the setup request management
+ *
+ * This global variable allows to decode and response a setup request.
+ * It can be updated by udc_process_setup() from UDC or *setup() from UDIs.
+ */
+typedef struct {
+ udd_setup_req_t req; //!< Data received in USB SETUP packet
+ uint8_t *payload; //!< Point to buffer to send or fill with data following SETUP packet
+ uint16_t payload_size; //!< Size of buffer to send or fill, and content the number of byte transfered
+ //! when the calbbacks "callback/over_under_run" are called.
+ void (*callback) (void); //!< Callback called after reception of ZLP from setup request
+ bool(*over_under_run) (void); //!< Callback called when the buffer given (.payload) is full or empty.
+ //! This one return false to abort data transfer, or true with a new buffer in .payload.
+} udd_ctrl_request_t;
+extern udd_ctrl_request_t udd_g_ctrlreq;
+
+//! Return true if the setup request \a udd_g_ctrlreq indicates IN data transfer
+#define Udd_setup_is_in() \
+ (USB_REQ_DIR_IN == (udd_g_ctrlreq.req.bmRequestType & USB_REQ_DIR_MASK))
+//! Return true if the setup request \a udd_g_ctrlreq indicates OUT data transfer
+#define Udd_setup_is_out() \
+ (USB_REQ_DIR_OUT == (udd_g_ctrlreq.req.bmRequestType & USB_REQ_DIR_MASK))
+//! Return the type of the SETUP request \a udd_g_ctrlreq. \see usb_reqtype.
+#define Udd_setup_type() \
+ (udd_g_ctrlreq.req.bmRequestType & USB_REQ_TYPE_MASK)
+//! Return the recipient of the SETUP request \a udd_g_ctrlreq. \see usb_recipient
+#define Udd_setup_recipient() \
+ (udd_g_ctrlreq.req.bmRequestType & USB_REQ_RECIP_MASK)
+
+/**
+ * \brief End of halt callback function type.
+ * Registered by routine udd_ep_wait_stall_clear()
+ * Callback called when endpoint stall is cleared.
+ */
+typedef void (*udd_callback_halt_cleared_t) (void);
+
+/**
+ * \brief End of transfer callback function type.
+ * Registered by routine udd_ep_run()
+ * Callback called by USB interrupt after data transfer or abort (reset,...).
+ *
+ * \param status UDD_EP_TRANSFER_OK, if transfer is complete
+ * \param status UDD_EP_TRANSFER_ABORT, if transfer is aborted
+ * \param n number of data transfered
+ */
+typedef void (*udd_callback_trans_t) (udd_ep_status_t status,
+ iram_size_t nb_transfered);
+
+/**
+ * \brief Authorizes the VBUS event
+ *
+ * \return true, if the VBUS monitoring is possible.
+ */
+bool udd_include_vbus_monitoring(void);
+
+/**
+ * \brief Enables the USB Device mode
+ */
+void udd_enable(void);
+
+/**
+ * \brief Disables the USB Device mode
+ */
+void udd_disable(void);
+
+/**
+ * \brief Attach device to the bus when possible
+ *
+ * \warning If a VBus control is included in driver,
+ * then it will attach device when an acceptable Vbus
+ * level from the host is detected.
+ */
+void udd_attach(void);
+
+/**
+ * \brief Detaches the device from the bus
+ *
+ * The driver must remove pull-up on USB line D- or D+.
+ */
+void udd_detach(void);
+
+/**
+ * \brief Test whether the USB Device Controller is running at high
+ * speed or not.
+ *
+ * \return \c true if the Device is running at high speed mode, otherwise \c false.
+ */
+bool udd_is_high_speed(void);
+
+/**
+ * \brief Changes the USB address of device
+ *
+ * \param address New USB address
+ */
+void udd_set_address(uint8_t address);
+
+/**
+ * \brief Returns the USB address of device
+ *
+ * \return USB address
+ */
+uint8_t udd_getaddress(void);
+
+/**
+ * \brief Returns the current start of frame number
+ *
+ * \return current start of frame number.
+ */
+uint16_t udd_get_frame_number(void);
+
+/*! \brief The USB driver sends a resume signal called Upstream Resume
+ */
+void udd_send_wake_up(void);
+
+/**
+ * \brief Load setup payload
+ *
+ * \param payload Pointer on payload
+ * \param payload_size Size of payload
+ */
+void udd_set_setup_payload( uint8_t *payload, uint16_t payload_size );
+
+
+/**
+ * \name Endpoint Management
+ *
+ * The following functions allow drivers to create and remove
+ * endpoints, as well as set, clear and query their "halted" and
+ * "wedged" states.
+ */
+//@{
+
+#if (0!=USB_DEVICE_MAX_EP)
+
+/**
+ * \brief Configures and enables an endpoint
+ *
+ * \param ep Endpoint number including direction (USB_EP_DIR_IN/USB_EP_DIR_OUT).
+ * \param bmAttributes Attributes of endpoint declared in the descriptor.
+ * \param MaxEndpointSize Endpoint maximum size
+ *
+ * \return \c 1 if the endpoint is enabled, otherwise \c 0.
+ */
+bool udd_ep_alloc(udd_ep_id_t ep, uint8_t bmAttributes,
+ uint16_t MaxEndpointSize);
+
+/**
+ * \brief Disables an endpoint
+ *
+ * \param ep Endpoint number including direction (USB_EP_DIR_IN/USB_EP_DIR_OUT).
+ */
+void udd_ep_free(udd_ep_id_t ep);
+
+/**
+ * \brief Check if the endpoint \a ep is halted.
+ *
+ * \param ep The ID of the endpoint to check.
+ *
+ * \return \c 1 if \a ep is halted, otherwise \c 0.
+ */
+bool udd_ep_is_halted(udd_ep_id_t ep);
+
+/**
+ * \brief Set the halted state of the endpoint \a ep
+ *
+ * After calling this function, any transaction on \a ep will result
+ * in a STALL handshake being sent. Any pending transactions will be
+ * performed first, however.
+ *
+ * \param ep The ID of the endpoint to be halted
+ *
+ * \return \c 1 if \a ep is halted, otherwise \c 0.
+ */
+bool udd_ep_set_halt(udd_ep_id_t ep);
+
+/**
+ * \brief Clear the halted state of the endpoint \a ep
+ *
+ * After calling this function, any transaction on \a ep will
+ * be handled normally, i.e. a STALL handshake will not be sent, and
+ * the data toggle sequence will start at DATA0.
+ *
+ * \param ep The ID of the endpoint to be un-halted
+ *
+ * \return \c 1 if function was successfully done, otherwise \c 0.
+ */
+bool udd_ep_clear_halt(udd_ep_id_t ep);
+
+/**
+ * \brief Registers a callback to call when endpoint halt is cleared
+ *
+ * \param ep The ID of the endpoint to use
+ * \param callback NULL or function to call when endpoint halt is cleared
+ *
+ * \warning if the endpoint is not halted then the \a callback is called immediately.
+ *
+ * \return \c 1 if the register is accepted, otherwise \c 0.
+ */
+bool udd_ep_wait_stall_clear(udd_ep_id_t ep,
+ udd_callback_halt_cleared_t callback);
+
+/**
+ * \brief Allows to receive or send data on an endpoint
+ *
+ * The driver uses a specific DMA USB to transfer data
+ * from internal RAM to endpoint, if this one is available.
+ * When the transfer is finished or aborted (stall, reset, ...), the \a callback is called.
+ * The \a callback returns the transfer status and eventually the number of byte transfered.
+ *
+ * \param ep The ID of the endpoint to use
+ * \param b_shortpacket Enabled automatic short packet
+ * \param buf Buffer on Internal RAM to send or fill.
+ * It must be align, then use COMPILER_WORD_ALIGNED.
+ * \param buf_size Buffer size to send or fill
+ * \param callback NULL or function to call at the end of transfer
+ *
+ * \warning About \a b_shortpacket, for IN endpoint it means that a short packet
+ * (or a Zero Length Packet) will be sent to the USB line to properly close the usb
+ * transfer at the end of the data transfer.
+ * For Bulk and Interrupt OUT endpoint, it will automatically stop the transfer
+ * at the end of the data transfer (received short packet).
+ *
+ * \return \c 1 if function was successfully done, otherwise \c 0.
+ */
+bool udd_ep_run(udd_ep_id_t ep, bool b_shortpacket,
+ uint8_t * buf, iram_size_t buf_size,
+ udd_callback_trans_t callback);
+/**
+ * \brief Aborts transfer on going on endpoint
+ *
+ * If a transfer is on going, then it is stopped and the callback registered is called to signal the end of transfer.
+ *
+ * \param ep The ID of the endpoint to use
+ * \param b_shortpacket Enabled automatic short packet
+ * \param buf Buffer on Internal RAM to send or fill
+ * \param buf_size Buffer size to send or fill
+ * \param callback NULL or function to call at the end of transfer
+ */
+void udd_ep_abort(udd_ep_id_t ep);
+
+#endif
+
+//@}
+
+
+/**
+ * \name High speed test mode management
+ *
+ * The following functions allow the device to jump to a specific test mode required in high speed mode.
+ */
+//@{
+void udd_test_mode_j(void);
+void udd_test_mode_k(void);
+void udd_test_mode_se0_nak(void);
+void udd_test_mode_packet(void);
+//@}
+
+
+/**
+ * \name UDC callbacks to provide for UDD
+ *
+ * The following callbacks are used by UDD.
+ */
+//@{
+
+/**
+ * \brief Decodes and manages a setup request
+ *
+ * The driver call it when a SETUP packet is received.
+ * The \c udd_g_ctrlreq contains the data of SETUP packet.
+ * If this callback accepts the setup request then it must
+ * return \c 1 and eventually update \c udd_g_ctrlreq to send or receive data.
+ *
+ * \return \c 1 if the request is accepted, otherwise \c 0.
+ */
+extern bool udc_process_setup(void);
+
+/**
+ * \brief Reset the UDC
+ *
+ * The UDC must reset all configuration.
+ */
+extern void udc_reset(void);
+
+//@}
+
+//@}
+
+#ifdef __cplusplus
+}
+#endif
+#endif // _UDD_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/udc/udi.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/udc/udi.h
new file mode 100644
index 0000000..4401c25
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/udc/udi.h
@@ -0,0 +1,117 @@
+/**
+ * \file
+ *
+ * \brief Common API for USB Device Interface
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _UDI_H_
+#define _UDI_H_
+
+#include "conf_usb.h"
+#include "usb_protocol.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * \ingroup usb_device_group
+ * \defgroup udi_group USB Device Interface (UDI)
+ * The UDI provides a common API for all classes,
+ * and this is used by UDC for the main control of USB Device interface.
+ * @{
+ */
+
+/**
+ * \brief UDI API.
+ *
+ * The callbacks within this structure are called only by
+ * USB Device Controller (UDC)
+ *
+ * The udc_get_interface_desc() can be use by UDI to know the interface descriptor
+ * selected by UDC.
+ */
+typedef struct {
+ /**
+ * \brief Enable the interface.
+ *
+ * This function is called when the host selects a configuration
+ * to which this interface belongs through a Set Configuration
+ * request, and when the host selects an alternate setting of
+ * this interface through a Set Interface request.
+ *
+ * \return \c 1 if function was successfully done, otherwise \c 0.
+ */
+ bool(*enable) (void);
+ /**
+ * \brief Disable the interface.
+ *
+ * This function is called when this interface is currently
+ * active, and
+ * - the host selects any configuration through a Set
+ * Configuration request, or
+ * - the host issues a USB reset, or
+ * - the device is detached from the host (i.e. Vbus is no
+ * longer present)
+ */
+ void (*disable) (void);
+ /**
+ * \brief Handle a control request directed at an interface.
+ *
+ * This function is called when this interface is currently
+ * active and the host sends a SETUP request
+ * with this interface as the recipient.
+ *
+ * Use udd_g_ctrlreq to decode and response to SETUP request.
+ *
+ * \return \c 1 if this interface supports the SETUP request, otherwise \c 0.
+ */
+ bool(*setup) (void);
+ /**
+ * \brief Returns the current setting of the selected interface.
+ *
+ * This function is called when UDC when know alternate setting of selected interface.
+ *
+ * \return alternate setting of selected interface
+ */
+ uint8_t(*getsetting) (void);
+} udi_api_t;
+
+//@}
+
+#ifdef __cplusplus
+}
+#endif
+#endif // _UDI_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/usb_atmel.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/usb_atmel.h
new file mode 100644
index 0000000..35c9388
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/usb_atmel.h
@@ -0,0 +1,150 @@
+/**
+ * \file
+ *
+ * \brief All USB VIDs and PIDs from Atmel AVR applications
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _USB_ATMEL_H_
+#define _USB_ATMEL_H_
+
+/**
+ * \defgroup usb_group USB Stack
+ *
+ * This stack includes the USB Device Stack, USB Host Stack and common
+ * definitions.
+ * @{
+ */
+
+//! @}
+
+/**
+ * \ingroup usb_group
+ * \defgroup usb_atmel_ids_group Atmel USB Identifiers
+ *
+ * This module defines Atmel PID and VIDs constants.
+ *
+ * @{
+ */
+
+//! \name Vendor Identifier assigned by USB org to ATMEL
+#define USB_VID_ATMEL 0x03EB
+
+
+//! \name Product Identifier assigned by ATMEL to AVR applications
+//! @{
+
+//! \name The range from 2000h to 20FFh is reserved to the old PID for C51, MEGA, and others.
+//! @{
+#define USB_PID_ATMEL_MEGA_HIDGENERIC 0x2013
+#define USB_PID_ATMEL_MEGA_HIDKEYBOARD 0x2017
+#define USB_PID_ATMEL_MEGA_CDC 0x2018
+#define USB_PID_ATMEL_MEGA_AUDIO_IN 0x2019
+#define USB_PID_ATMEL_MEGA_MS 0x201A
+#define USB_PID_ATMEL_MEGA_AUDIO_IN_OUT 0x201B
+#define USB_PID_ATMEL_MEGA_HIDMOUSE 0x201C
+#define USB_PID_ATMEL_MEGA_HIDMOUSE_CERTIF_U4 0x201D
+#define USB_PID_ATMEL_MEGA_CDC_MULTI 0x201E
+#define USB_PID_ATMEL_MEGA_MS_HIDMS_HID_USBKEY 0x2022
+#define USB_PID_ATMEL_MEGA_MS_HIDMS_HID_STK525 0x2023
+#define USB_PID_ATMEL_MEGA_MS_2 0x2029
+#define USB_PID_ATMEL_MEGA_MS_HIDMS 0x202A
+#define USB_PID_ATMEL_MEGA_MS_3 0x2032
+#define USB_PID_ATMEL_MEGA_LIBUSB 0x2050
+//! @}
+
+//! \name The range 2300h to 23FFh is reserved to PIDs for demo from ASF1.7=>
+//! @{
+#define USB_PID_ATMEL_UC3_ENUM 0x2300
+#define USB_PID_ATMEL_UC3_MS 0x2301
+#define USB_PID_ATMEL_UC3_MS_SDRAM_LOADER 0x2302
+#define USB_PID_ATMEL_UC3_EVK1100_CTRLPANEL 0x2303
+#define USB_PID_ATMEL_UC3_HID 0x2304
+#define USB_PID_ATMEL_UC3_EVK1101_CTRLPANEL_HID 0x2305
+#define USB_PID_ATMEL_UC3_EVK1101_CTRLPANEL_HID_MS 0x2306
+#define USB_PID_ATMEL_UC3_CDC 0x2307
+#define USB_PID_ATMEL_UC3_AUDIO_MICRO 0x2308
+#define USB_PID_ATMEL_UC3_CDC_DEBUG 0x2310 // Virtual Com (debug interface) on EVK11xx
+#define USB_PID_ATMEL_UC3_AUDIO_SPEAKER_MICRO 0x2311
+#define USB_PID_ATMEL_UC3_CDC_MSC 0x2312
+//! @}
+
+//! \name The range 2400h to 24FFh is reserved to PIDs for common AVR demos from ASF2.0<=
+//! @{
+#define USB_PID_ATMEL_AVR_HIDMOUSE 0x2400
+#define USB_PID_ATMEL_AVR_HIDKEYBOARD 0x2401
+#define USB_PID_ATMEL_AVR_HIDGENERIC 0x2402
+#define USB_PID_ATMEL_AVR_MSC 0x2403
+#define USB_PID_ATMEL_AVR_CDC 0x2404
+#define USB_PID_ATMEL_AVR_PHDC 0x2405
+#define USB_PID_ATMEL_AVR_MSC_HIDMOUSE 0x2420
+#define USB_PID_ATMEL_AVR_MSC_HIDS_CDC 0x2421
+#define USB_PID_ATMEL_AVR_XPLAIN_BC_POWERONLY 0x2430
+#define USB_PID_ATMEL_AVR_XPLAIN_BC_TERMINAL 0x2431
+#define USB_PID_ATMEL_AVR_XPLAIN_BC_TOUCH 0x2432
+#define USB_PID_ATMEL_AVR_AUDIO_SPEAKER 0x2433
+//! @}
+
+//! \name The range 2F00h to 2FFFh is reserved to official PIDs for AVR bootloaders
+//! Note, !!!! don't use this range for demos or examples !!!!
+//! @{
+#define USB_PID_ATMEL_DFU_ATXMEGA64A1U 0x2FE8
+#define USB_PID_ATMEL_DFU_ATUC3D 0x2FE9
+#define USB_PID_ATMEL_DFU_ATXMEGA128B1 0x2FEA
+#define USB_PID_ATMEL_DFU_AT32UC3C 0x2FEB
+#define USB_PID_ATMEL_DFU_ATXMEGA256A3_U_BU 0x2FEC
+#define USB_PID_ATMEL_DFU_ATXMEGA128A1U 0x2FED
+#define USB_PID_ATMEL_DFU_ATMEGA8U2 0x2FEE
+#define USB_PID_ATMEL_DFU_ATMEGA16U2 0x2FEF
+#define USB_PID_ATMEL_DFU_ATMEGA32U2 0x2FF0
+#define USB_PID_ATMEL_DFU_AT32UC3A3 0x2FF1
+#define USB_PID_ATMEL_DFU_ATMEGA32U6 0x2FF2
+#define USB_PID_ATMEL_DFU_ATMEGA16U4 0x2FF3
+#define USB_PID_ATMEL_DFU_ATMEGA32U4 0x2FF4
+#define USB_PID_ATMEL_DFU_AT32AP7200 0x2FF5
+#define USB_PID_ATMEL_DFU_AT32UC3B 0x2FF6
+#define USB_PID_ATMEL_DFU_AT90USB82 0x2FF7
+#define USB_PID_ATMEL_DFU_AT32UC3A 0x2FF8
+#define USB_PID_ATMEL_DFU_AT90USB64 0x2FF9
+#define USB_PID_ATMEL_DFU_AT90USB162 0x2FFA
+#define USB_PID_ATMEL_DFU_AT90USB128 0x2FFB
+// 2FFCh to 2FFFh used by C51 family products
+//! @}
+
+//! @}
+
+//! @}
+
+
+#endif // _USB_ATMEL_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/usb_protocol.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/usb_protocol.h
new file mode 100644
index 0000000..b1ac2f4
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/usb_protocol.h
@@ -0,0 +1,403 @@
+/**
+ * \file
+ *
+ * \brief USB protocol definitions.
+ *
+ * This file contains the USB definitions and data structures provided by the
+ * USB 2.0 specification.
+ *
+ * Copyright (C) 2009 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef _USB_PROTOCOL_H_
+#define _USB_PROTOCOL_H_
+
+#include "usb_atmel.h"
+
+/**
+ * \ingroup usb_group
+ * \defgroup usb_protocol_group USB Protocol Definitions
+ *
+ * This module defines constants and data structures provided by the USB
+ * 2.0 specification.
+ *
+ * @{
+ */
+
+//! Value for field bcdUSB
+#define USB_V2_0 0x0200 //!< USB Specification version 2.00
+
+/*! \name Generic definitions (Class, subclass and protocol)
+ */
+//! @{
+#define NO_CLASS 0x00
+#define NO_SUBCLASS 0x00
+#define NO_PROTOCOL 0x00
+//! @}
+
+//! \name IAD (Interface Association Descriptor) constants
+//! @{
+#define CLASS_IAD 0xEF
+#define SUB_CLASS_IAD 0x02
+#define PROTOCOL_IAD 0x01
+//! @}
+
+//! \name Apple VID & PID for host application
+//! @{
+#define USB_VID_APPLE 0x05AC
+#define USB_PID_IPOD 0x1200
+#define USB_PID_IPOD_SHUFFLE 0x1300
+//! @}
+
+/**
+ * \brief USB request data transfer direction (bmRequestType)
+ */
+#define USB_REQ_DIR_OUT (0<<7) //!< Host to device
+#define USB_REQ_DIR_IN (1<<7) //!< Device to host
+#define USB_REQ_DIR_MASK (1<<7) //!< Mask
+
+/**
+ * \brief USB request types (bmRequestType)
+ */
+#define USB_REQ_TYPE_STANDARD (0<<5) //!< Standard request
+#define USB_REQ_TYPE_CLASS (1<<5) //!< Class-specific request
+#define USB_REQ_TYPE_VENDOR (2<<5) //!< Vendor-specific request
+#define USB_REQ_TYPE_MASK (3<<5) //!< Mask
+
+/**
+ * \brief USB recipient codes (bmRequestType)
+ */
+#define USB_REQ_RECIP_DEVICE (0<<0) //!< Recipient device
+#define USB_REQ_RECIP_INTERFACE (1<<0) //!< Recipient interface
+#define USB_REQ_RECIP_ENDPOINT (2<<0) //!< Recipient endpoint
+#define USB_REQ_RECIP_OTHER (3<<0) //!< Recipient other
+#define USB_REQ_RECIP_MASK (0x1F) //!< Mask
+
+/**
+ * \brief Standard USB requests (bRequest)
+ */
+enum usb_reqid {
+ USB_REQ_GET_STATUS = 0,
+ USB_REQ_CLEAR_FEATURE = 1,
+ USB_REQ_SET_FEATURE = 3,
+ USB_REQ_SET_ADDRESS = 5,
+ USB_REQ_GET_DESCRIPTOR = 6,
+ USB_REQ_SET_DESCRIPTOR = 7,
+ USB_REQ_GET_CONFIGURATION = 8,
+ USB_REQ_SET_CONFIGURATION = 9,
+ USB_REQ_GET_INTERFACE = 10,
+ USB_REQ_SET_INTERFACE = 11,
+ USB_REQ_SYNCH_FRAME = 12
+};
+
+/**
+ * \brief Standard USB device status flags
+ *
+ */
+enum usb_device_status {
+ USB_DEV_STATUS_BUS_POWERED = 0,
+ USB_DEV_STATUS_SELF_POWERED = 1,
+ USB_DEV_STATUS_REMOTEWAKEUP = 2
+};
+
+/**
+ * \brief Standard USB Interface status flags
+ *
+ */
+enum usb_interface_status {
+ USB_IFACE_STATUS_RESERVED = 0
+};
+
+/**
+ * \brief Standard USB endpoint status flags
+ *
+ */
+enum usb_endpoint_status {
+ USB_EP_STATUS_HALTED = 1
+};
+
+/**
+ * \brief Standard USB device feature flags
+ *
+ * \note valid for SetFeature request.
+ */
+enum usb_device_feature {
+ USB_DEV_FEATURE_REMOTE_WAKEUP = 1, //!< Remote wakeup enabled
+ USB_DEV_FEATURE_TEST_MODE = 2, //!< USB test mode
+ USB_DEV_FEATURE_OTG_B_HNP_ENABLE = 3,
+ USB_DEV_FEATURE_OTG_A_HNP_SUPPORT = 4,
+ USB_DEV_FEATURE_OTG_A_ALT_HNP_SUPPORT = 5
+};
+
+/**
+ * \brief Test Mode possible on HS USB device
+ *
+ * \note valid for USB_DEV_FEATURE_TEST_MODE request.
+ */
+enum usb_device_hs_test_mode {
+ USB_DEV_TEST_MODE_J = 1,
+ USB_DEV_TEST_MODE_K = 2,
+ USB_DEV_TEST_MODE_SE0_NAK = 3,
+ USB_DEV_TEST_MODE_PACKET = 4,
+ USB_DEV_TEST_MODE_FORCE_ENABLE = 5
+};
+
+/**
+ * \brief Standard USB endpoint feature/status flags
+ */
+enum usb_endpoint_feature {
+ USB_EP_FEATURE_HALT = 0
+};
+
+/**
+ * \brief Standard USB Test Mode Selectors
+ */
+enum usb_test_mode_selector {
+ USB_TEST_J = 0x01,
+ USB_TEST_K = 0x02,
+ USB_TEST_SE0_NAK = 0x03,
+ USB_TEST_PACKET = 0x04,
+ USB_TEST_FORCE_ENABLE = 0x05
+};
+
+/**
+ * \brief Standard USB descriptor types
+ */
+enum usb_descriptor_type {
+ USB_DT_DEVICE = 1,
+ USB_DT_CONFIGURATION = 2,
+ USB_DT_STRING = 3,
+ USB_DT_INTERFACE = 4,
+ USB_DT_ENDPOINT = 5,
+ USB_DT_DEVICE_QUALIFIER = 6,
+ USB_DT_OTHER_SPEED_CONFIGURATION = 7,
+ USB_DT_INTERFACE_POWER = 8,
+ USB_DT_OTG = 9,
+ USB_DT_IAD = 0x0B
+};
+
+/**
+ * \brief Standard USB endpoint transfer types
+ */
+enum usb_ep_type {
+ USB_EP_TYPE_CONTROL = 0x00,
+ USB_EP_TYPE_ISOCHRONOUS = 0x01,
+ USB_EP_TYPE_BULK = 0x02,
+ USB_EP_TYPE_INTERRUPT = 0x03,
+ USB_EP_TYPE_MASK = 0x03
+};
+
+/**
+ * \brief Standard USB language IDs for string descriptors
+ */
+enum usb_langid {
+ USB_LANGID_EN_US = 0x0409 //!< English (United States)
+};
+
+/**
+ * \brief Mask selecting the index part of an endpoint address
+ */
+#define USB_EP_ADDR_MASK 0x0f
+/**
+ * \brief Endpoint transfer direction is IN
+ */
+#define USB_EP_DIR_IN 0x80
+/**
+ * \brief Endpoint transfer direction is OUT
+ */
+#define USB_EP_DIR_OUT 0x00
+
+/**
+ * \brief Maximum length in bytes of a USB descriptor
+ *
+ * The maximum length of a USB descriptor is limited by the 8-bit
+ * bLength field.
+ */
+#define USB_MAX_DESC_LEN 255
+
+/*
+ * 2-byte alignment requested for all USB structures.
+ */
+COMPILER_PACK_SET(1);
+
+/**
+ * \brief A USB Device SETUP request
+ *
+ * The data payload of SETUP packets always follows this structure.
+ */
+typedef struct {
+ uint8_t bmRequestType;
+ uint8_t bRequest;
+ le16_t wValue;
+ le16_t wIndex;
+ le16_t wLength;
+} usb_setup_req_t;
+
+/**
+ * \brief Standard USB device descriptor stucture
+ */
+typedef struct {
+ uint8_t bLength;
+ uint8_t bDescriptorType;
+ le16_t bcdUSB;
+ uint8_t bDeviceClass;
+ uint8_t bDeviceSubClass;
+ uint8_t bDeviceProtocol;
+ uint8_t bMaxPacketSize0;
+ le16_t idVendor;
+ le16_t idProduct;
+ le16_t bcdDevice;
+ uint8_t iManufacturer;
+ uint8_t iProduct;
+ uint8_t iSerialNumber;
+ uint8_t bNumConfigurations;
+} usb_dev_desc_t;
+
+/**
+ * \brief Standard USB device qualifier descriptor structure
+ *
+ * This descriptor contains information about the device when running at
+ * the "other" speed (i.e. if the device is currently operating at high
+ * speed, this descriptor can be used to determine what would change if
+ * the device was operating at full speed.)
+ */
+typedef struct {
+ uint8_t bLength;
+ uint8_t bDescriptorType;
+ le16_t bcdUSB;
+ uint8_t bDeviceClass;
+ uint8_t bDeviceSubClass;
+ uint8_t bDeviceProtocol;
+ uint8_t bMaxPacketSize0;
+ uint8_t bNumConfigurations;
+ uint8_t bReserved;
+} usb_dev_qual_desc_t;
+
+
+/**
+ * \brief Standard USB Interface Association Descriptor structure
+ */
+typedef struct {
+ uint8_t bLength; //!< size of this descriptor in bytes
+ uint8_t bDescriptorType; //!< INTERFACE descriptor type
+ uint8_t bFirstInterface; //!< Number of interface
+ uint8_t bInterfaceCount; //!< value to select alternate setting
+ uint8_t bFunctionClass; //!< Class code assigned by the USB
+ uint8_t bFunctionSubClass; //!< Sub-class code assigned by the USB
+ uint8_t bFunctionProtocol; //!< Protocol code assigned by the USB
+ uint8_t iFunction; //!< Index of string descriptor
+} usb_association_desc_t;
+
+
+/**
+ * \brief Standard USB configuration descriptor structure
+ */
+typedef struct {
+ uint8_t bLength;
+ uint8_t bDescriptorType;
+ le16_t wTotalLength;
+ uint8_t bNumInterfaces;
+ uint8_t bConfigurationValue;
+ uint8_t iConfiguration;
+ uint8_t bmAttributes;
+ uint8_t bMaxPower;
+} usb_conf_desc_t;
+
+
+#define USB_CONFIG_ATTR_MUST_SET (1 << 7) //!< Must always be set
+#define USB_CONFIG_ATTR_BUS_POWERED (0 << 6) //!< Bus-powered
+#define USB_CONFIG_ATTR_SELF_POWERED (1 << 6) //!< Self-powered
+#define USB_CONFIG_ATTR_REMOTE_WAKEUP (1 << 5) //!< remote wakeup supported
+
+#define USB_CONFIG_MAX_POWER(ma) (((ma) + 1) / 2) //!< Max power in mA
+
+/**
+ * \brief Standard USB association descriptor structure
+ */
+typedef struct {
+ uint8_t bLength; //!< Size of this descriptor in bytes
+ uint8_t bDescriptorType; //!< Interface descriptor type
+ uint8_t bFirstInterface; //!< Number of interface
+ uint8_t bInterfaceCount; //!< value to select alternate setting
+ uint8_t bFunctionClass; //!< Class code assigned by the USB
+ uint8_t bFunctionSubClass; //!< Sub-class code assigned by the USB
+ uint8_t bFunctionProtocol; //!< Protocol code assigned by the USB
+ uint8_t iFunction; //!< Index of string descriptor
+} usb_iad_desc_t;
+
+/**
+ * \brief Standard USB interface descriptor structure
+ */
+typedef struct {
+ uint8_t bLength;
+ uint8_t bDescriptorType;
+ uint8_t bInterfaceNumber;
+ uint8_t bAlternateSetting;
+ uint8_t bNumEndpoints;
+ uint8_t bInterfaceClass;
+ uint8_t bInterfaceSubClass;
+ uint8_t bInterfaceProtocol;
+ uint8_t iInterface;
+} usb_iface_desc_t;
+
+/**
+ * \brief Standard USB endpoint descriptor stcuture
+ */
+typedef struct {
+ uint8_t bLength;
+ uint8_t bDescriptorType;
+ uint8_t bEndpointAddress;
+ uint8_t bmAttributes;
+ le16_t wMaxPacketSize;
+ uint8_t bInterval;
+} usb_ep_desc_t;
+
+
+/**
+ * \brief A standard USB string descriptor sructure
+ */
+typedef struct {
+ uint8_t bLength;
+ uint8_t bDescriptorType;
+} usb_str_desc_t;
+
+typedef struct {
+ usb_str_desc_t desc;
+ le16_t string[1];
+} usb_str_lgid_desc_t;
+
+COMPILER_PACK_RESET();
+
+//! @}
+
+#endif /* _USB_PROTOCOL_H_ */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/utils/compiler.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/utils/compiler.h
new file mode 100644
index 0000000..3a5ece9
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/utils/compiler.h
@@ -0,0 +1,1418 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Compiler file for AVR32.
+ *
+ * This file defines commonly used types and macros.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _COMPILER_H_
+#define _COMPILER_H_
+
+//#if (defined __ICCAVR32__)
+//# include <intrinsics.h>
+//#endif
+//#include "preprocessor.h"
+
+//#include "parts.h"
+
+
+//_____ D E C L A R A T I O N S ____________________________________________
+
+//#ifdef __AVR32_ABI_COMPILER__ // Automatically defined when compiling for AVR32, not when assembling.
+#ifndef __ASSEMBLY__
+
+#include <stddef.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <stdint.h>
+
+# define ISR(func, int_grp, int_lvl) \
+ void func (void)
+
+#define irq_register_handler(func,int_num,int_lvl)
+
+typedef uint32_t irqflags_t;
+#define cpu_irq_save() 0
+#define cpu_irq_restore(v) (v=v)
+
+#define sysclk_disable_usb()
+#define sysclk_enable_usb()
+
+/* Define attribute */
+#if defined ( __CC_ARM ) /* Keil µVision 4 */
+ #define WEAK __attribute__ ((weak))
+#elif defined ( __ICCARM__ ) /* IAR Ewarm 5.41+ */
+ #define WEAK __weak
+#elif defined ( __GNUC__ ) /* GCC CS3 2009q3-68 */
+ #define WEAK __attribute__ ((weak))
+#endif
+
+/*! \name Token Paste
+ *
+ * Paste N preprocessing tokens together, these tokens being allowed to be \#defined.
+ *
+ * May be used only within macros with the tokens passed as arguments if the tokens are \#defined.
+ *
+ * For example, writing TPASTE2(U, WIDTH) within a macro \#defined by
+ * UTYPE(WIDTH) and invoked as UTYPE(UL_WIDTH) with UL_WIDTH \#defined as 32 is
+ * equivalent to writing U32.
+ */
+//! @{
+#define TPASTE2( a, b) a##b
+#define TPASTE3( a, b, c) a##b##c
+//! @}
+
+/*! \name Absolute Token Paste
+ *
+ * Paste N preprocessing tokens together, these tokens being allowed to be \#defined.
+ *
+ * No restriction of use if the tokens are \#defined.
+ *
+ * For example, writing ATPASTE2(U, UL_WIDTH) anywhere with UL_WIDTH \#defined
+ * as 32 is equivalent to writing U32.
+ */
+//! @{
+#define ATPASTE2( a, b) TPASTE2( a, b)
+#define ATPASTE3( a, b, c) TPASTE3( a, b, c)
+//! @}
+
+#if (defined __ICCAVR32__) || (defined __ICCARM__)
+
+/*! \name Compiler Keywords
+ *
+ * Port of some keywords from GNU GCC for AVR32 to IAR Embedded Workbench for Atmel AVR32.
+ */
+//! @{
+#define __asm__ asm
+#define __inline__ inline
+#define __volatile__
+//! @}
+
+#endif
+
+/**
+ * \def barrier
+ * \brief Memory barrier
+ */
+#if defined(__CC_ARM)
+# define barrier()
+#elif defined(__GNUC__)
+# define barrier() asm volatile("" ::: "memory")
+#elif defined(__ICCAVR32__)
+# define barrier() __asm__ __volatile__ ("")
+#elif defined(__ICCARM__)
+# define barrier() __asm__ __volatile__ ("")
+#endif
+
+/**
+ * \brief Emit the compiler pragma \a arg.
+ *
+ * \param arg The pragma directive as it would appear after \e \#pragma
+ * (i.e. not stringified).
+ */
+#define COMPILER_PRAGMA(arg) _Pragma(#arg)
+
+/**
+ * \def COMPILER_PACK_SET(alignment)
+ * \brief Set maximum alignment for subsequent struct and union
+ * definitions to \a alignment.
+ */
+#define COMPILER_PACK_SET(alignment) COMPILER_PRAGMA(pack(alignment))
+
+/**
+ * \def COMPILER_PACK_RESET()
+ * \brief Set default alignment for subsequent struct and union
+ * definitions.
+ */
+#define COMPILER_PACK_RESET() COMPILER_PRAGMA(pack())
+
+
+/**
+ * \brief Set aligned boundary.
+ */
+#if (defined __GNUC__)
+#define COMPILER_ALIGNED(a) __attribute__((__aligned__(a)))
+#elif (defined __ICCAVR32__) || (defined __ICCARM__)
+#define COMPILER_ALIGNED(a) COMPILER_PRAGMA(data_alignment = a)
+#endif
+
+/**
+ * \brief Set word-aligned boundary.
+ */
+#if (defined __GNUC__)
+#define COMPILER_WORD_ALIGNED __attribute__((__aligned__(4)))
+#elif (defined __ICCAVR32__) || (defined __ICCARM__)
+#define COMPILER_WORD_ALIGNED COMPILER_PRAGMA(data_alignment = 4)
+#endif
+
+/**
+ * \name System Register Access
+ * @{
+ */
+#if defined(__GNUC__) || defined(__DOXYGEN__)
+/**
+ * \brief Get value of system register
+ *
+ * \param reg Address of the system register of which to get the value.
+ *
+ * \return Value of system register \a reg.
+ */
+# define sysreg_read(reg) __builtin_mfsr(reg)
+
+/**
+ * \brief Set value of system register
+ *
+ * \param reg Address of the system register of which to set the value.
+ * \param val Value to set the system register \a reg to.
+ */
+# define sysreg_write(reg, val) __builtin_mtsr(reg, val)
+
+#elif defined(__ICCAVR32__)
+# define sysreg_read(reg) __get_system_register(reg)
+# define sysreg_write(reg, val) __set_system_register(reg, val)
+#endif
+
+// Deprecated definitions
+#define Get_system_register(reg) sysreg_read(reg)
+#define Set_system_register(reg, val) sysreg_write(reg, val)
+//! @}
+
+//#include "interrupt.h"
+
+/*! \name Usual Types
+ */
+//! @{
+typedef unsigned char Bool; //!< Boolean.
+#ifndef __cplusplus
+#if !defined(__bool_true_false_are_defined)
+typedef unsigned char bool; //!< Boolean.
+#endif
+#endif
+typedef int8_t S8 ; //!< 8-bit signed integer.
+typedef uint8_t U8 ; //!< 8-bit unsigned integer.
+typedef int16_t S16; //!< 16-bit signed integer.
+typedef uint16_t U16; //!< 16-bit unsigned integer.
+typedef uint16_t le16_t;
+typedef uint16_t be16_t;
+typedef int32_t S32; //!< 32-bit signed integer.
+typedef uint32_t U32; //!< 32-bit unsigned integer.
+typedef uint32_t le32_t;
+typedef uint32_t be32_t;
+typedef signed long long int S64; //!< 64-bit signed integer.
+typedef unsigned long long int U64; //!< 64-bit unsigned integer.
+typedef float F32; //!< 32-bit floating-point number.
+typedef double F64; //!< 64-bit floating-point number.
+typedef uint32_t iram_size_t;
+//! @}
+
+
+/*! \name Status Types
+ */
+//! @{
+typedef Bool Status_bool_t; //!< Boolean status.
+typedef U8 Status_t; //!< 8-bit-coded status.
+//! @}
+
+
+/*! \name Aliasing Aggregate Types
+ */
+//! @{
+
+//! 16-bit union.
+typedef union
+{
+ S16 s16 ;
+ U16 u16 ;
+ S8 s8 [2];
+ U8 u8 [2];
+} Union16;
+
+//! 32-bit union.
+typedef union
+{
+ S32 s32 ;
+ U32 u32 ;
+ S16 s16[2];
+ U16 u16[2];
+ S8 s8 [4];
+ U8 u8 [4];
+} Union32;
+
+//! 64-bit union.
+typedef union
+{
+ S64 s64 ;
+ U64 u64 ;
+ S32 s32[2];
+ U32 u32[2];
+ S16 s16[4];
+ U16 u16[4];
+ S8 s8 [8];
+ U8 u8 [8];
+} Union64;
+
+//! Union of pointers to 64-, 32-, 16- and 8-bit unsigned integers.
+typedef union
+{
+ S64 *s64ptr;
+ U64 *u64ptr;
+ S32 *s32ptr;
+ U32 *u32ptr;
+ S16 *s16ptr;
+ U16 *u16ptr;
+ S8 *s8ptr ;
+ U8 *u8ptr ;
+} UnionPtr;
+
+//! Union of pointers to volatile 64-, 32-, 16- and 8-bit unsigned integers.
+typedef union
+{
+ volatile S64 *s64ptr;
+ volatile U64 *u64ptr;
+ volatile S32 *s32ptr;
+ volatile U32 *u32ptr;
+ volatile S16 *s16ptr;
+ volatile U16 *u16ptr;
+ volatile S8 *s8ptr ;
+ volatile U8 *u8ptr ;
+} UnionVPtr;
+
+//! Union of pointers to constant 64-, 32-, 16- and 8-bit unsigned integers.
+typedef union
+{
+ const S64 *s64ptr;
+ const U64 *u64ptr;
+ const S32 *s32ptr;
+ const U32 *u32ptr;
+ const S16 *s16ptr;
+ const U16 *u16ptr;
+ const S8 *s8ptr ;
+ const U8 *u8ptr ;
+} UnionCPtr;
+
+//! Union of pointers to constant volatile 64-, 32-, 16- and 8-bit unsigned integers.
+typedef union
+{
+ const volatile S64 *s64ptr;
+ const volatile U64 *u64ptr;
+ const volatile S32 *s32ptr;
+ const volatile U32 *u32ptr;
+ const volatile S16 *s16ptr;
+ const volatile U16 *u16ptr;
+ const volatile S8 *s8ptr ;
+ const volatile U8 *u8ptr ;
+} UnionCVPtr;
+
+//! Structure of pointers to 64-, 32-, 16- and 8-bit unsigned integers.
+typedef struct
+{
+ S64 *s64ptr;
+ U64 *u64ptr;
+ S32 *s32ptr;
+ U32 *u32ptr;
+ S16 *s16ptr;
+ U16 *u16ptr;
+ S8 *s8ptr ;
+ U8 *u8ptr ;
+} StructPtr;
+
+//! Structure of pointers to volatile 64-, 32-, 16- and 8-bit unsigned integers.
+typedef struct
+{
+ volatile S64 *s64ptr;
+ volatile U64 *u64ptr;
+ volatile S32 *s32ptr;
+ volatile U32 *u32ptr;
+ volatile S16 *s16ptr;
+ volatile U16 *u16ptr;
+ volatile S8 *s8ptr ;
+ volatile U8 *u8ptr ;
+} StructVPtr;
+
+//! Structure of pointers to constant 64-, 32-, 16- and 8-bit unsigned integers.
+typedef struct
+{
+ const S64 *s64ptr;
+ const U64 *u64ptr;
+ const S32 *s32ptr;
+ const U32 *u32ptr;
+ const S16 *s16ptr;
+ const U16 *u16ptr;
+ const S8 *s8ptr ;
+ const U8 *u8ptr ;
+} StructCPtr;
+
+//! Structure of pointers to constant volatile 64-, 32-, 16- and 8-bit unsigned integers.
+typedef struct
+{
+ const volatile S64 *s64ptr;
+ const volatile U64 *u64ptr;
+ const volatile S32 *s32ptr;
+ const volatile U32 *u32ptr;
+ const volatile S16 *s16ptr;
+ const volatile U16 *u16ptr;
+ const volatile S8 *s8ptr ;
+ const volatile U8 *u8ptr ;
+} StructCVPtr;
+
+//! @}
+
+//#endif // __AVR32_ABI_COMPILER__
+
+
+//_____ M A C R O S ________________________________________________________
+
+/*! \name Usual Constants
+ */
+//! @{
+#define DISABLE 0
+#define ENABLE 1
+#define DISABLED 0
+#define ENABLED 1
+#define OFF 0
+#define ON 1
+#define FALSE 0
+#define TRUE 1
+#ifndef __cplusplus
+#if !defined(__bool_true_false_are_defined)
+#define false FALSE
+#define true TRUE
+#endif
+#endif
+#define KO 0
+#define OK 1
+#define PASS 0
+#define FAIL 1
+#define LOW 0
+#define HIGH 1
+#define CLR 0
+#define SET 1
+//! @}
+
+
+//#ifdef __AVR32_ABI_COMPILER__ // Automatically defined when compiling for AVR32, not when assembling.
+
+//! \name Optimization Control
+//@{
+
+/**
+ * \def likely(exp)
+ * \brief The expression \a exp is likely to be true
+ */
+#ifndef likely
+# define likely(exp) (exp)
+#endif
+
+/**
+ * \def unlikely(exp)
+ * \brief The expression \a exp is unlikely to be true
+ */
+#ifndef unlikely
+# define unlikely(exp) (exp)
+#endif
+
+/**
+ * \def is_constant(exp)
+ * \brief Determine if an expression evaluates to a constant value.
+ *
+ * \param exp Any expression
+ *
+ * \return true if \a exp is constant, false otherwise.
+ */
+#ifdef __GNUC__
+# define is_constant(exp) __builtin_constant_p(exp)
+#else
+# define is_constant(exp) (0)
+#endif
+
+//! @}
+
+/*! \name Bit-Field Handling
+ */
+//! @{
+
+/*! \brief Reads the bits of a value specified by a given bit-mask.
+ *
+ * \param value Value to read bits from.
+ * \param mask Bit-mask indicating bits to read.
+ *
+ * \return Read bits.
+ */
+#define Rd_bits( value, mask) ((value) & (mask))
+
+/*! \brief Writes the bits of a C lvalue specified by a given bit-mask.
+ *
+ * \param lvalue C lvalue to write bits to.
+ * \param mask Bit-mask indicating bits to write.
+ * \param bits Bits to write.
+ *
+ * \return Resulting value with written bits.
+ */
+#define Wr_bits(lvalue, mask, bits) ((lvalue) = ((lvalue) & ~(mask)) |\
+ ((bits ) & (mask)))
+
+/*! \brief Tests the bits of a value specified by a given bit-mask.
+ *
+ * \param value Value of which to test bits.
+ * \param mask Bit-mask indicating bits to test.
+ *
+ * \return \c 1 if at least one of the tested bits is set, else \c 0.
+ */
+#define Tst_bits( value, mask) (Rd_bits(value, mask) != 0)
+
+/*! \brief Clears the bits of a C lvalue specified by a given bit-mask.
+ *
+ * \param lvalue C lvalue of which to clear bits.
+ * \param mask Bit-mask indicating bits to clear.
+ *
+ * \return Resulting value with cleared bits.
+ */
+#define Clr_bits(lvalue, mask) ((lvalue) &= ~(mask))
+
+/*! \brief Sets the bits of a C lvalue specified by a given bit-mask.
+ *
+ * \param lvalue C lvalue of which to set bits.
+ * \param mask Bit-mask indicating bits to set.
+ *
+ * \return Resulting value with set bits.
+ */
+#define Set_bits(lvalue, mask) ((lvalue) |= (mask))
+
+/*! \brief Toggles the bits of a C lvalue specified by a given bit-mask.
+ *
+ * \param lvalue C lvalue of which to toggle bits.
+ * \param mask Bit-mask indicating bits to toggle.
+ *
+ * \return Resulting value with toggled bits.
+ */
+#define Tgl_bits(lvalue, mask) ((lvalue) ^= (mask))
+
+/*! \brief Reads the bit-field of a value specified by a given bit-mask.
+ *
+ * \param value Value to read a bit-field from.
+ * \param mask Bit-mask indicating the bit-field to read.
+ *
+ * \return Read bit-field.
+ */
+#define Rd_bitfield( value, mask) (Rd_bits( value, mask) >> ctz(mask))
+
+/*! \brief Writes the bit-field of a C lvalue specified by a given bit-mask.
+ *
+ * \param lvalue C lvalue to write a bit-field to.
+ * \param mask Bit-mask indicating the bit-field to write.
+ * \param bitfield Bit-field to write.
+ *
+ * \return Resulting value with written bit-field.
+ */
+#define Wr_bitfield(lvalue, mask, bitfield) (Wr_bits(lvalue, mask, (U32)(bitfield) << ctz(mask)))
+
+//! @}
+
+
+/*! \brief This macro makes the CPU take a small break for a few cycles. This should
+ * be used when waiting for an event. It will reduce the internal bus load.
+ *
+ * "sub pc, pc, -4" (or "sub pc, -2") forces the IF stage to wait until the result
+ * of the calculation before it can fetch the next instruction. This makes sure
+ * there are nothing stuck in the LS pipe when you start a new iteration and guarante
+ * to flush the pipeline without having any other effect.
+ * (A nop doesn't have any effect on the IF stage.)
+ */
+#if (defined __GNUC__)
+# define cpu_relax() __asm__ __volatile__("sub pc, pc, -4" ::: "memory", "cc")
+#elif (defined __ICCAVR32__)
+# define cpu_relax() __asm__ __volatile__("sub pc, pc, -4")
+#endif
+
+
+/*! \brief This macro is used to test fatal errors.
+ *
+ * The macro tests if the expression is FALSE. If it is, a fatal error is
+ * detected and the application hangs up.
+ *
+ * \param expr Expression to evaluate and supposed to be nonzero.
+ */
+#ifdef _ASSERT_ENABLE_
+ #define Assert(expr) \
+ {\
+ if (!(expr)) while (TRUE);\
+ }
+#else
+ #define Assert(expr)
+#endif
+
+
+/*! \name Zero-Bit Counting
+ *
+ * Under AVR32-GCC, __builtin_clz and __builtin_ctz behave like macros when
+ * applied to constant expressions (values known at compile time), so they are
+ * more optimized than the use of the corresponding assembly instructions and
+ * they can be used as constant expressions e.g. to initialize objects having
+ * static storage duration, and like the corresponding assembly instructions
+ * when applied to non-constant expressions (values unknown at compile time), so
+ * they are more optimized than an assembly periphrasis. Hence, clz and ctz
+ * ensure a possible and optimized behavior for both constant and non-constant
+ * expressions.
+ */
+//! @{
+
+/*! \brief Counts the leading zero bits of the given value considered as a 32-bit integer.
+ *
+ * \param u Value of which to count the leading zero bits.
+ *
+ * \return The count of leading zero bits in \a u.
+ */
+#if (defined __GNUC__)
+ #define clz(u) __builtin_clz(u)
+#elif (defined __ICCAVR32__)
+ #if (__VER__ == 330) && (__SUBVERSION__ <= 1)
+ // __count_leading_zeros is broken and returns a value which is offset by
+ // -32 when called with a constant parameter.
+ #define clz(v) (0 == v ? 32 : (31 & __count_leading_zeros(v)))
+ #else
+ #define clz(v) __count_leading_zeros(v)
+ #endif
+#else
+ #define clz(u) (((u) == 0) ? 32 : \
+ ((u) & (1ul << 31)) ? 0 : \
+ ((u) & (1ul << 30)) ? 1 : \
+ ((u) & (1ul << 29)) ? 2 : \
+ ((u) & (1ul << 28)) ? 3 : \
+ ((u) & (1ul << 27)) ? 4 : \
+ ((u) & (1ul << 26)) ? 5 : \
+ ((u) & (1ul << 25)) ? 6 : \
+ ((u) & (1ul << 24)) ? 7 : \
+ ((u) & (1ul << 23)) ? 8 : \
+ ((u) & (1ul << 22)) ? 9 : \
+ ((u) & (1ul << 21)) ? 10 : \
+ ((u) & (1ul << 20)) ? 11 : \
+ ((u) & (1ul << 19)) ? 12 : \
+ ((u) & (1ul << 18)) ? 13 : \
+ ((u) & (1ul << 17)) ? 14 : \
+ ((u) & (1ul << 16)) ? 15 : \
+ ((u) & (1ul << 15)) ? 16 : \
+ ((u) & (1ul << 14)) ? 17 : \
+ ((u) & (1ul << 13)) ? 18 : \
+ ((u) & (1ul << 12)) ? 19 : \
+ ((u) & (1ul << 11)) ? 20 : \
+ ((u) & (1ul << 10)) ? 21 : \
+ ((u) & (1ul << 9)) ? 22 : \
+ ((u) & (1ul << 8)) ? 23 : \
+ ((u) & (1ul << 7)) ? 24 : \
+ ((u) & (1ul << 6)) ? 25 : \
+ ((u) & (1ul << 5)) ? 26 : \
+ ((u) & (1ul << 4)) ? 27 : \
+ ((u) & (1ul << 3)) ? 28 : \
+ ((u) & (1ul << 2)) ? 29 : \
+ ((u) & (1ul << 1)) ? 30 : \
+ 31)
+#endif
+
+/*! \brief Counts the trailing zero bits of the given value considered as a 32-bit integer.
+ *
+ * \param u Value of which to count the trailing zero bits.
+ *
+ * \return The count of trailing zero bits in \a u.
+ */
+#if (defined __GNUC__)
+ #define ctz(u) __builtin_ctz(u)
+#elif (defined __ICCAVR32__)
+ #define ctz(u) __count_trailing_zeros(u)
+#else
+ #define ctz(u) ((u) & (1ul << 0) ? 0 : \
+ (u) & (1ul << 1) ? 1 : \
+ (u) & (1ul << 2) ? 2 : \
+ (u) & (1ul << 3) ? 3 : \
+ (u) & (1ul << 4) ? 4 : \
+ (u) & (1ul << 5) ? 5 : \
+ (u) & (1ul << 6) ? 6 : \
+ (u) & (1ul << 7) ? 7 : \
+ (u) & (1ul << 8) ? 8 : \
+ (u) & (1ul << 9) ? 9 : \
+ (u) & (1ul << 10) ? 10 : \
+ (u) & (1ul << 11) ? 11 : \
+ (u) & (1ul << 12) ? 12 : \
+ (u) & (1ul << 13) ? 13 : \
+ (u) & (1ul << 14) ? 14 : \
+ (u) & (1ul << 15) ? 15 : \
+ (u) & (1ul << 16) ? 16 : \
+ (u) & (1ul << 17) ? 17 : \
+ (u) & (1ul << 18) ? 18 : \
+ (u) & (1ul << 19) ? 19 : \
+ (u) & (1ul << 20) ? 20 : \
+ (u) & (1ul << 21) ? 21 : \
+ (u) & (1ul << 22) ? 22 : \
+ (u) & (1ul << 23) ? 23 : \
+ (u) & (1ul << 24) ? 24 : \
+ (u) & (1ul << 25) ? 25 : \
+ (u) & (1ul << 26) ? 26 : \
+ (u) & (1ul << 27) ? 27 : \
+ (u) & (1ul << 28) ? 28 : \
+ (u) & (1ul << 29) ? 29 : \
+ (u) & (1ul << 30) ? 30 : \
+ (u) & (1ul << 31) ? 31 : \
+ 32)
+#endif
+
+//! @}
+
+//! \name Logarithmic functions
+//! @{
+
+/**
+ * \internal
+ * Undefined function. Will cause a link failure if ilog2() is called
+ * with an invalid constant value.
+ */
+//int_fast8_t ilog2_undefined(void);
+
+/**
+ * \brief Calculate the base-2 logarithm of a number rounded down to
+ * the nearest integer.
+ *
+ * \param x A 32-bit value
+ * \return The base-2 logarithm of \a x, or -1 if \a x is 0.
+ */
+//static inline int_fast8_t ilog2(uint32_t x)
+//{
+// if (is_constant(x))
+// return ((x) & (1ULL << 31) ? 31 :
+// (x) & (1ULL << 30) ? 30 :
+// (x) & (1ULL << 29) ? 29 :
+// (x) & (1ULL << 28) ? 28 :
+// (x) & (1ULL << 27) ? 27 :
+// (x) & (1ULL << 26) ? 26 :
+// (x) & (1ULL << 25) ? 25 :
+// (x) & (1ULL << 24) ? 24 :
+// (x) & (1ULL << 23) ? 23 :
+// (x) & (1ULL << 22) ? 22 :
+// (x) & (1ULL << 21) ? 21 :
+// (x) & (1ULL << 20) ? 20 :
+// (x) & (1ULL << 19) ? 19 :
+// (x) & (1ULL << 18) ? 18 :
+// (x) & (1ULL << 17) ? 17 :
+// (x) & (1ULL << 16) ? 16 :
+// (x) & (1ULL << 15) ? 15 :
+// (x) & (1ULL << 14) ? 14 :
+// (x) & (1ULL << 13) ? 13 :
+// (x) & (1ULL << 12) ? 12 :
+// (x) & (1ULL << 11) ? 11 :
+// (x) & (1ULL << 10) ? 10 :
+// (x) & (1ULL << 9) ? 9 :
+// (x) & (1ULL << 8) ? 8 :
+// (x) & (1ULL << 7) ? 7 :
+// (x) & (1ULL << 6) ? 6 :
+// (x) & (1ULL << 5) ? 5 :
+// (x) & (1ULL << 4) ? 4 :
+// (x) & (1ULL << 3) ? 3 :
+// (x) & (1ULL << 2) ? 2 :
+// (x) & (1ULL << 1) ? 1 :
+// (x) & (1ULL << 0) ? 0 :
+// ilog2_undefined());
+//
+// return 31 - clz(x);
+//}
+
+//! @}
+
+/*! \name Bit Reversing
+ */
+//! @{
+
+/*! \brief Reverses the bits of \a u8.
+ *
+ * \param u8 U8 of which to reverse the bits.
+ *
+ * \return Value resulting from \a u8 with reversed bits.
+ */
+#define bit_reverse8(u8) ((U8)(bit_reverse32((U8)(u8)) >> 24))
+
+/*! \brief Reverses the bits of \a u16.
+ *
+ * \param u16 U16 of which to reverse the bits.
+ *
+ * \return Value resulting from \a u16 with reversed bits.
+ */
+#define bit_reverse16(u16) ((U16)(bit_reverse32((U16)(u16)) >> 16))
+
+/*! \brief Reverses the bits of \a u32.
+ *
+ * \param u32 U32 of which to reverse the bits.
+ *
+ * \return Value resulting from \a u32 with reversed bits.
+ */
+#if (defined __GNUC__)
+ #define bit_reverse32(u32) \
+ (\
+ {\
+ unsigned int __value = (U32)(u32);\
+ __asm__ ("brev\t%0" : "+r" (__value) : : "cc");\
+ (U32)__value;\
+ }\
+ )
+#elif (defined __ICCAVR32__)
+ #define bit_reverse32(u32) ((U32)__bit_reverse((U32)(u32)))
+#endif
+
+/*! \brief Reverses the bits of \a u64.
+ *
+ * \param u64 U64 of which to reverse the bits.
+ *
+ * \return Value resulting from \a u64 with reversed bits.
+ */
+#define bit_reverse64(u64) ((U64)(((U64)bit_reverse32((U64)(u64) >> 32)) |\
+ ((U64)bit_reverse32((U64)(u64)) << 32)))
+
+//! @}
+
+
+/*! \name Alignment
+ */
+//! @{
+
+/*! \brief Tests alignment of the number \a val with the \a n boundary.
+ *
+ * \param val Input value.
+ * \param n Boundary.
+ *
+ * \return \c 1 if the number \a val is aligned with the \a n boundary, else \c 0.
+ */
+#define Test_align(val, n ) (!Tst_bits( val, (n) - 1 ) )
+
+/*! \brief Gets alignment of the number \a val with respect to the \a n boundary.
+ *
+ * \param val Input value.
+ * \param n Boundary.
+ *
+ * \return Alignment of the number \a val with respect to the \a n boundary.
+ */
+#define Get_align( val, n ) ( Rd_bits( val, (n) - 1 ) )
+
+/*! \brief Sets alignment of the lvalue number \a lval to \a alg with respect to the \a n boundary.
+ *
+ * \param lval Input/output lvalue.
+ * \param n Boundary.
+ * \param alg Alignment.
+ *
+ * \return New value of \a lval resulting from its alignment set to \a alg with respect to the \a n boundary.
+ */
+#define Set_align(lval, n, alg) ( Wr_bits(lval, (n) - 1, alg) )
+
+/*! \brief Aligns the number \a val with the upper \a n boundary.
+ *
+ * \param val Input value.
+ * \param n Boundary.
+ *
+ * \return Value resulting from the number \a val aligned with the upper \a n boundary.
+ */
+#define Align_up( val, n ) (((val) + ((n) - 1)) & ~((n) - 1))
+
+/*! \brief Aligns the number \a val with the lower \a n boundary.
+ *
+ * \param val Input value.
+ * \param n Boundary.
+ *
+ * \return Value resulting from the number \a val aligned with the lower \a n boundary.
+ */
+#define Align_down(val, n ) ( (val) & ~((n) - 1))
+
+//! @}
+
+
+/*! \name Mathematics
+ *
+ * The same considerations as for clz and ctz apply here but AVR32-GCC does not
+ * provide built-in functions to access the assembly instructions abs, min and
+ * max and it does not produce them by itself in most cases, so two sets of
+ * macros are defined here:
+ * - Abs, Min and Max to apply to constant expressions (values known at
+ * compile time);
+ * - abs, min and max to apply to non-constant expressions (values unknown at
+ * compile time).
+ */
+//! @{
+
+/*! \brief Takes the absolute value of \a a.
+ *
+ * \param a Input value.
+ *
+ * \return Absolute value of \a a.
+ *
+ * \note More optimized if only used with values known at compile time.
+ */
+#define Abs(a) (((a) < 0 ) ? -(a) : (a))
+
+/*! \brief Takes the minimal value of \a a and \a b.
+ *
+ * \param a Input value.
+ * \param b Input value.
+ *
+ * \return Minimal value of \a a and \a b.
+ *
+ * \note More optimized if only used with values known at compile time.
+ */
+#define Min(a, b) (((a) < (b)) ? (a) : (b))
+
+/*! \brief Takes the maximal value of \a a and \a b.
+ *
+ * \param a Input value.
+ * \param b Input value.
+ *
+ * \return Maximal value of \a a and \a b.
+ *
+ * \note More optimized if only used with values known at compile time.
+ */
+#define Max(a, b) (((a) > (b)) ? (a) : (b))
+
+/*! \brief Takes the absolute value of \a a.
+ *
+ * \param a Input value.
+ *
+ * \return Absolute value of \a a.
+ *
+ * \note More optimized if only used with values unknown at compile time.
+ */
+#if (defined __GNUC__)
+ #define abs(a) \
+ (\
+ {\
+ int __value = (a);\
+ __asm__ ("abs\t%0" : "+r" (__value) : : "cc");\
+ __value;\
+ }\
+ )
+#elif (defined __ICCAVR32__)
+ #define abs(a) Abs(a)
+#else
+ #define abs(a) Abs(a)
+#endif
+
+/*! \brief Takes the minimal value of \a a and \a b.
+ *
+ * \param a Input value.
+ * \param b Input value.
+ *
+ * \return Minimal value of \a a and \a b.
+ *
+ * \note More optimized if only used with values unknown at compile time.
+ */
+#if (defined __GNUC__) && (defined __AVR32_ABI_COMPILER__)
+ #define min(a, b) \
+ (\
+ {\
+ int __value, __arg_a = (a), __arg_b = (b);\
+ __asm__ ("min\t%0, %1, %2" : "=r" (__value) : "r" (__arg_a), "r" (__arg_b));\
+ __value;\
+ }\
+ )
+#elif (defined __ICCAVR32__)
+ #define min(a, b) __min(a, b)
+#else
+ #define min(a, b) Min(a, b)
+#endif
+
+/*! \brief Takes the maximal value of \a a and \a b.
+ *
+ * \param a Input value.
+ * \param b Input value.
+ *
+ * \return Maximal value of \a a and \a b.
+ *
+ * \note More optimized if only used with values unknown at compile time.
+ */
+#if (defined __GNUC__) && (defined __AVR32_ABI_COMPILER__)
+ #define max(a, b) \
+ (\
+ {\
+ int __value, __arg_a = (a), __arg_b = (b);\
+ __asm__ ("max\t%0, %1, %2" : "=r" (__value) : "r" (__arg_a), "r" (__arg_b));\
+ __value;\
+ }\
+ )
+#elif (defined __ICCAVR32__)
+ #define max(a, b) __max(a, b)
+#else
+ #define max(a, b) Max(a, b)
+#endif
+
+//! @}
+
+
+/*! \brief Calls the routine at address \a addr.
+ *
+ * It generates a long call opcode.
+ *
+ * For example, `Long_call(0x80000000)' generates a software reset on a UC3 if
+ * it is invoked from the CPU supervisor mode.
+ *
+ * \param addr Address of the routine to call.
+ *
+ * \note It may be used as a long jump opcode in some special cases.
+ */
+#define Long_call(addr) ((*(void (*)(void))(addr))())
+
+/*! \brief Resets the CPU by software.
+ *
+ * \warning It shall not be called from the CPU application mode.
+ */
+#if (defined __GNUC__)
+ #define Reset_CPU() \
+ (\
+ {\
+ __asm__ __volatile__ (\
+ "lddpc r9, 3f\n\t"\
+ "mfsr r8, %[SR]\n\t"\
+ "bfextu r8, r8, %[SR_M_OFFSET], %[SR_M_SIZE]\n\t"\
+ "cp.w r8, 0b001\n\t"\
+ "breq 0f\n\t"\
+ "sub r8, pc, $ - 1f\n\t"\
+ "pushm r8-r9\n\t"\
+ "rete\n"\
+ "0:\n\t"\
+ "mtsr %[SR], r9\n"\
+ "1:\n\t"\
+ "mov r0, 0\n\t"\
+ "mov r1, 0\n\t"\
+ "mov r2, 0\n\t"\
+ "mov r3, 0\n\t"\
+ "mov r4, 0\n\t"\
+ "mov r5, 0\n\t"\
+ "mov r6, 0\n\t"\
+ "mov r7, 0\n\t"\
+ "mov r8, 0\n\t"\
+ "mov r9, 0\n\t"\
+ "mov r10, 0\n\t"\
+ "mov r11, 0\n\t"\
+ "mov r12, 0\n\t"\
+ "mov sp, 0\n\t"\
+ "stdsp sp[0], sp\n\t"\
+ "ldmts sp, sp\n\t"\
+ "mov lr, 0\n\t"\
+ "lddpc pc, 2f\n\t"\
+ ".balign 4\n"\
+ "2:\n\t"\
+ ".word _start\n"\
+ "3:\n\t"\
+ ".word %[RESET_SR]"\
+ :\
+ : [SR] "i" (AVR32_SR),\
+ [SR_M_OFFSET] "i" (AVR32_SR_M_OFFSET),\
+ [SR_M_SIZE] "i" (AVR32_SR_M_SIZE),\
+ [RESET_SR] "i" (AVR32_SR_GM_MASK | AVR32_SR_EM_MASK | (AVR32_SR_M_SUP << AVR32_SR_M_OFFSET))\
+ );\
+ }\
+ )
+#elif (defined __ICCAVR32__)
+ #define Reset_CPU() \
+ {\
+ extern void *volatile __program_start;\
+ __asm__ __volatile__ (\
+ "mov r7, LWRD(__program_start)\n\t"\
+ "orh r7, HWRD(__program_start)\n\t"\
+ "mov r9, LWRD("ASTRINGZ(AVR32_SR_GM_MASK | AVR32_SR_EM_MASK | (AVR32_SR_M_SUP << AVR32_SR_M_OFFSET))")\n\t"\
+ "orh r9, HWRD("ASTRINGZ(AVR32_SR_GM_MASK | AVR32_SR_EM_MASK | (AVR32_SR_M_SUP << AVR32_SR_M_OFFSET))")\n\t"\
+ "mfsr r8, "ASTRINGZ(AVR32_SR)"\n\t"\
+ "bfextu r8, r8, "ASTRINGZ(AVR32_SR_M_OFFSET)", "ASTRINGZ(AVR32_SR_M_SIZE)"\n\t"\
+ "cp.w r8, 001b\n\t"\
+ "breq $ + 10\n\t"\
+ "sub r8, pc, -12\n\t"\
+ "pushm r8-r9\n\t"\
+ "rete\n\t"\
+ "mtsr "ASTRINGZ(AVR32_SR)", r9\n\t"\
+ "mov r0, 0\n\t"\
+ "mov r1, 0\n\t"\
+ "mov r2, 0\n\t"\
+ "mov r3, 0\n\t"\
+ "mov r4, 0\n\t"\
+ "mov r5, 0\n\t"\
+ "mov r6, 0\n\t"\
+ "st.w r0[4], r7\n\t"\
+ "mov r7, 0\n\t"\
+ "mov r8, 0\n\t"\
+ "mov r9, 0\n\t"\
+ "mov r10, 0\n\t"\
+ "mov r11, 0\n\t"\
+ "mov r12, 0\n\t"\
+ "mov sp, 0\n\t"\
+ "stdsp sp[0], sp\n\t"\
+ "ldmts sp, sp\n\t"\
+ "mov lr, 0\n\t"\
+ "ld.w pc, lr[4]"\
+ );\
+ __program_start;\
+ }
+#endif
+
+
+
+/*! \name CPU Status Register Access
+ */
+//! @{
+
+/*! \brief Tells whether exceptions are globally enabled.
+ *
+ * \return \c 1 if exceptions are globally enabled, else \c 0.
+ */
+#define Is_global_exception_enabled() (!Tst_bits(Get_system_register(AVR32_SR), AVR32_SR_EM_MASK))
+
+/*! \brief Disables exceptions globally.
+ */
+#if (defined __GNUC__)
+ #define Disable_global_exception() ({__asm__ __volatile__ ("ssrf\t%0" : : "i" (AVR32_SR_EM_OFFSET));})
+#elif (defined __ICCAVR32__)
+ #define Disable_global_exception() (__set_status_flag(AVR32_SR_EM_OFFSET))
+#endif
+
+/*! \brief Enables exceptions globally.
+ */
+#if (defined __GNUC__)
+ #define Enable_global_exception() ({__asm__ __volatile__ ("csrf\t%0" : : "i" (AVR32_SR_EM_OFFSET));})
+#elif (defined __ICCAVR32__)
+ #define Enable_global_exception() (__clear_status_flag(AVR32_SR_EM_OFFSET))
+#endif
+
+//! @}
+
+
+/*! \name Debug Register Access
+ */
+//! @{
+
+/*! \brief Gets the value of the \a dbgreg debug register.
+ *
+ * \param dbgreg Address of the debug register of which to get the value.
+ *
+ * \return Value of the \a dbgreg debug register.
+ */
+#if (defined __GNUC__)
+ #define Get_debug_register(dbgreg) __builtin_mfdr(dbgreg)
+#elif (defined __ICCAVR32__)
+ #define Get_debug_register(dbgreg) __get_debug_register(dbgreg)
+#endif
+
+/*! \brief Sets the value of the \a dbgreg debug register to \a value.
+ *
+ * \param dbgreg Address of the debug register of which to set the value.
+ * \param value Value to set the \a dbgreg debug register to.
+ */
+#if (defined __GNUC__)
+ #define Set_debug_register(dbgreg, value) __builtin_mtdr(dbgreg, value)
+#elif (defined __ICCAVR32__)
+ #define Set_debug_register(dbgreg, value) __set_debug_register(dbgreg, value)
+#endif
+
+//! @}
+
+
+/*! \name Force Assembly Inline Code Section
+ */
+//! @{
+#if (defined __GNUC__)
+#define __always_inline __attribute__((__always_inline__))
+#elif (defined __ICCAVR32__)
+#define __always_inline _Pragma("inline=forced")
+#endif
+//! @}
+#if 0
+/*! \name MCU Endianism Handling
+ * AVR32 is MCU big endianism.
+ */
+//! @{
+#define MSB(u16) (((U8 *)&(u16))[0]) //!< Most significant byte of \a u16.
+#define LSB(u16) (((U8 *)&(u16))[1]) //!< Least significant byte of \a u16.
+
+#define MSH(u32) (((U16 *)&(u32))[0]) //!< Most significant half-word of \a u32.
+#define LSH(u32) (((U16 *)&(u32))[1]) //!< Least significant half-word of \a u32.
+#define MSB0W(u32) (((U8 *)&(u32))[0]) //!< Most significant byte of 1st rank of \a u32.
+#define MSB1W(u32) (((U8 *)&(u32))[1]) //!< Most significant byte of 2nd rank of \a u32.
+#define MSB2W(u32) (((U8 *)&(u32))[2]) //!< Most significant byte of 3rd rank of \a u32.
+#define MSB3W(u32) (((U8 *)&(u32))[3]) //!< Most significant byte of 4th rank of \a u32.
+#define LSB3W(u32) MSB0W(u32) //!< Least significant byte of 4th rank of \a u32.
+#define LSB2W(u32) MSB1W(u32) //!< Least significant byte of 3rd rank of \a u32.
+#define LSB1W(u32) MSB2W(u32) //!< Least significant byte of 2nd rank of \a u32.
+#define LSB0W(u32) MSB3W(u32) //!< Least significant byte of 1st rank of \a u32.
+
+#define MSW(u64) (((U32 *)&(u64))[0]) //!< Most significant word of \a u64.
+#define LSW(u64) (((U32 *)&(u64))[1]) //!< Least significant word of \a u64.
+#define MSH0(u64) (((U16 *)&(u64))[0]) //!< Most significant half-word of 1st rank of \a u64.
+#define MSH1(u64) (((U16 *)&(u64))[1]) //!< Most significant half-word of 2nd rank of \a u64.
+#define MSH2(u64) (((U16 *)&(u64))[2]) //!< Most significant half-word of 3rd rank of \a u64.
+#define MSH3(u64) (((U16 *)&(u64))[3]) //!< Most significant half-word of 4th rank of \a u64.
+#define LSH3(u64) MSH0(u64) //!< Least significant half-word of 4th rank of \a u64.
+#define LSH2(u64) MSH1(u64) //!< Least significant half-word of 3rd rank of \a u64.
+#define LSH1(u64) MSH2(u64) //!< Least significant half-word of 2nd rank of \a u64.
+#define LSH0(u64) MSH3(u64) //!< Least significant half-word of 1st rank of \a u64.
+#define MSB0D(u64) (((U8 *)&(u64))[0]) //!< Most significant byte of 1st rank of \a u64.
+#define MSB1D(u64) (((U8 *)&(u64))[1]) //!< Most significant byte of 2nd rank of \a u64.
+#define MSB2D(u64) (((U8 *)&(u64))[2]) //!< Most significant byte of 3rd rank of \a u64.
+#define MSB3D(u64) (((U8 *)&(u64))[3]) //!< Most significant byte of 4th rank of \a u64.
+#define MSB4D(u64) (((U8 *)&(u64))[4]) //!< Most significant byte of 5th rank of \a u64.
+#define MSB5D(u64) (((U8 *)&(u64))[5]) //!< Most significant byte of 6th rank of \a u64.
+#define MSB6D(u64) (((U8 *)&(u64))[6]) //!< Most significant byte of 7th rank of \a u64.
+#define MSB7D(u64) (((U8 *)&(u64))[7]) //!< Most significant byte of 8th rank of \a u64.
+#define LSB7D(u64) MSB0D(u64) //!< Least significant byte of 8th rank of \a u64.
+#define LSB6D(u64) MSB1D(u64) //!< Least significant byte of 7th rank of \a u64.
+#define LSB5D(u64) MSB2D(u64) //!< Least significant byte of 6th rank of \a u64.
+#define LSB4D(u64) MSB3D(u64) //!< Least significant byte of 5th rank of \a u64.
+#define LSB3D(u64) MSB4D(u64) //!< Least significant byte of 4th rank of \a u64.
+#define LSB2D(u64) MSB5D(u64) //!< Least significant byte of 3rd rank of \a u64.
+#define LSB1D(u64) MSB6D(u64) //!< Least significant byte of 2nd rank of \a u64.
+#define LSB0D(u64) MSB7D(u64) //!< Least significant byte of 1st rank of \a u64.
+
+#define LE16(x) Swap16(x)
+#define le16_to_cpu(x) swap16(x)
+#define cpu_to_le16(x) swap16(x)
+#define LE16_TO_CPU(x) Swap16(x)
+#define CPU_TO_LE16(x) Swap16(x)
+
+#define be16_to_cpu(x) (x)
+#define cpu_to_be16(x) (x)
+#define BE16_TO_CPU(x) (x)
+#define CPU_TO_BE16(x) (x)
+
+#define le32_to_cpu(x) swap32(x)
+#define cpu_to_le32(x) swap32(x)
+#define LE32_TO_CPU(x) Swap32(x)
+#define CPU_TO_LE32(x) Swap32(x)
+
+#define be32_to_cpu(x) (x)
+#define cpu_to_be32(x) (x)
+#define BE32_TO_CPU(x) (x)
+#define CPU_TO_BE32(x) (x)
+//! @}
+#else
+/*! \name MCU Endianism Handling
+ * ARM is MCU little endianism.
+ */
+//! @{
+#define MSB(u16) (((U8 *)&(u16))[1]) //!< Most significant byte of \a u16.
+#define LSB(u16) (((U8 *)&(u16))[0]) //!< Least significant byte of \a u16.
+
+#define MSH(u32) (((U16 *)&(u32))[1]) //!< Most significant half-word of \a u32.
+#define LSH(u32) (((U16 *)&(u32))[0]) //!< Least significant half-word of \a u32.
+#define MSB0W(u32) (((U8 *)&(u32))[3]) //!< Most significant byte of 1st rank of \a u32.
+#define MSB1W(u32) (((U8 *)&(u32))[2]) //!< Most significant byte of 2nd rank of \a u32.
+#define MSB2W(u32) (((U8 *)&(u32))[1]) //!< Most significant byte of 3rd rank of \a u32.
+#define MSB3W(u32) (((U8 *)&(u32))[0]) //!< Most significant byte of 4th rank of \a u32.
+#define LSB3W(u32) MSB0W(u32) //!< Least significant byte of 4th rank of \a u32.
+#define LSB2W(u32) MSB1W(u32) //!< Least significant byte of 3rd rank of \a u32.
+#define LSB1W(u32) MSB2W(u32) //!< Least significant byte of 2nd rank of \a u32.
+#define LSB0W(u32) MSB3W(u32) //!< Least significant byte of 1st rank of \a u32.
+
+#define MSW(u64) (((U32 *)&(u64))[1]) //!< Most significant word of \a u64.
+#define LSW(u64) (((U32 *)&(u64))[0]) //!< Least significant word of \a u64.
+#define MSH0(u64) (((U16 *)&(u64))[3]) //!< Most significant half-word of 1st rank of \a u64.
+#define MSH1(u64) (((U16 *)&(u64))[2]) //!< Most significant half-word of 2nd rank of \a u64.
+#define MSH2(u64) (((U16 *)&(u64))[1]) //!< Most significant half-word of 3rd rank of \a u64.
+#define MSH3(u64) (((U16 *)&(u64))[0]) //!< Most significant half-word of 4th rank of \a u64.
+#define LSH3(u64) MSH0(u64) //!< Least significant half-word of 4th rank of \a u64.
+#define LSH2(u64) MSH1(u64) //!< Least significant half-word of 3rd rank of \a u64.
+#define LSH1(u64) MSH2(u64) //!< Least significant half-word of 2nd rank of \a u64.
+#define LSH0(u64) MSH3(u64) //!< Least significant half-word of 1st rank of \a u64.
+#define MSB0D(u64) (((U8 *)&(u64))[7]) //!< Most significant byte of 1st rank of \a u64.
+#define MSB1D(u64) (((U8 *)&(u64))[6]) //!< Most significant byte of 2nd rank of \a u64.
+#define MSB2D(u64) (((U8 *)&(u64))[5]) //!< Most significant byte of 3rd rank of \a u64.
+#define MSB3D(u64) (((U8 *)&(u64))[4]) //!< Most significant byte of 4th rank of \a u64.
+#define MSB4D(u64) (((U8 *)&(u64))[3]) //!< Most significant byte of 5th rank of \a u64.
+#define MSB5D(u64) (((U8 *)&(u64))[2]) //!< Most significant byte of 6th rank of \a u64.
+#define MSB6D(u64) (((U8 *)&(u64))[1]) //!< Most significant byte of 7th rank of \a u64.
+#define MSB7D(u64) (((U8 *)&(u64))[0]) //!< Most significant byte of 8th rank of \a u64.
+#define LSB7D(u64) MSB0D(u64) //!< Least significant byte of 8th rank of \a u64.
+#define LSB6D(u64) MSB1D(u64) //!< Least significant byte of 7th rank of \a u64.
+#define LSB5D(u64) MSB2D(u64) //!< Least significant byte of 6th rank of \a u64.
+#define LSB4D(u64) MSB3D(u64) //!< Least significant byte of 5th rank of \a u64.
+#define LSB3D(u64) MSB4D(u64) //!< Least significant byte of 4th rank of \a u64.
+#define LSB2D(u64) MSB5D(u64) //!< Least significant byte of 3rd rank of \a u64.
+#define LSB1D(u64) MSB6D(u64) //!< Least significant byte of 2nd rank of \a u64.
+#define LSB0D(u64) MSB7D(u64) //!< Least significant byte of 1st rank of \a u64.
+
+#define LE16(x) (x)
+#define le16_to_cpu(x) (x)
+#define cpu_to_le16(x) (x)
+#define LE16_TO_CPU(x) (x)
+#define CPU_TO_LE16(x) (x)
+
+#define be16_to_cpu(x) Swap16(x)
+#define cpu_to_be16(x) Swap16(x)
+#define BE16_TO_CPU(x) Swap16(x)
+#define CPU_TO_BE16(x) Swap16(x)
+
+#define le32_to_cpu(x) (x)
+#define cpu_to_le32(x) (x)
+#define LE32_TO_CPU(x) (x)
+#define CPU_TO_LE32(x) (x)
+
+#define be32_to_cpu(x) swap32(x)
+#define cpu_to_be32(x) swap32(x)
+#define BE32_TO_CPU(x) swap32(x)
+#define CPU_TO_BE32(x) swap32(x)
+//! @}
+#endif
+/*! \name Endianism Conversion
+ *
+ * The same considerations as for clz and ctz apply here but AVR32-GCC's
+ * __builtin_bswap_16 and __builtin_bswap_32 do not behave like macros when
+ * applied to constant expressions, so two sets of macros are defined here:
+ * - Swap16, Swap32 and Swap64 to apply to constant expressions (values known
+ * at compile time);
+ * - swap16, swap32 and swap64 to apply to non-constant expressions (values
+ * unknown at compile time).
+ */
+//! @{
+
+/*! \brief Toggles the endianism of \a u16 (by swapping its bytes).
+ *
+ * \param u16 U16 of which to toggle the endianism.
+ *
+ * \return Value resulting from \a u16 with toggled endianism.
+ *
+ * \note More optimized if only used with values known at compile time.
+ */
+#define Swap16(u16) ((U16)(((U16)(u16) >> 8) |\
+ ((U16)(u16) << 8)))
+
+/*! \brief Toggles the endianism of \a u32 (by swapping its bytes).
+ *
+ * \param u32 U32 of which to toggle the endianism.
+ *
+ * \return Value resulting from \a u32 with toggled endianism.
+ *
+ * \note More optimized if only used with values known at compile time.
+ */
+#define Swap32(u32) ((U32)(((U32)Swap16((U32)(u32) >> 16)) |\
+ ((U32)Swap16((U32)(u32)) << 16)))
+
+/*! \brief Toggles the endianism of \a u64 (by swapping its bytes).
+ *
+ * \param u64 U64 of which to toggle the endianism.
+ *
+ * \return Value resulting from \a u64 with toggled endianism.
+ *
+ * \note More optimized if only used with values known at compile time.
+ */
+#define Swap64(u64) ((U64)(((U64)Swap32((U64)(u64) >> 32)) |\
+ ((U64)Swap32((U64)(u64)) << 32)))
+
+/*! \brief Toggles the endianism of \a u16 (by swapping its bytes).
+ *
+ * \param u16 U16 of which to toggle the endianism.
+ *
+ * \return Value resulting from \a u16 with toggled endianism.
+ *
+ * \note More optimized if only used with values unknown at compile time.
+ */
+#if (defined __GNUC__)
+# if (!defined __OPTIMIZE_SIZE__) || !__OPTIMIZE_SIZE__
+ #define swap16(u16) ((U16)__builtin_bswap_16((U16)(u16)))
+# else
+ // swap_16 must be not used when GCC's -Os command option is used
+ #define swap16(u16) Swap16(u16)
+# endif
+#elif (defined __ICCAVR32__)
+ #define swap16(u16) ((U16)__swap_bytes_in_halfwords((U16)(u16)))
+#else
+ #define swap16(u16) Swap16(u16)
+#endif
+
+/*! \brief Toggles the endianism of \a u32 (by swapping its bytes).
+ *
+ * \param u32 U32 of which to toggle the endianism.
+ *
+ * \return Value resulting from \a u32 with toggled endianism.
+ *
+ * \note More optimized if only used with values unknown at compile time.
+ */
+#if (defined __GNUC__) && (defined __AVR32_ABI_COMPILER__)
+ #define swap32(u32) ((U32)__builtin_bswap_32((U32)(u32)))
+#elif (defined __ICCAVR32__)
+ #define swap32(u32) ((U32)__swap_bytes((U32)(u32)))
+#else
+ #define swap32(u32) Swap32(u32)
+#endif
+
+/*! \brief Toggles the endianism of \a u64 (by swapping its bytes).
+ *
+ * \param u64 U64 of which to toggle the endianism.
+ *
+ * \return Value resulting from \a u64 with toggled endianism.
+ *
+ * \note More optimized if only used with values unknown at compile time.
+ */
+#define swap64(u64) ((U64)(((U64)swap32((U64)(u64) >> 32)) |\
+ ((U64)swap32((U64)(u64)) << 32)))
+
+//! @}
+
+
+/*! \name Target Abstraction
+ */
+//! @{
+
+#define _GLOBEXT_ extern //!< extern storage-class specifier.
+#define _CONST_TYPE_ const //!< const type qualifier.
+#define _MEM_TYPE_SLOW_ //!< Slow memory type.
+#define _MEM_TYPE_MEDFAST_ //!< Fairly fast memory type.
+#define _MEM_TYPE_FAST_ //!< Fast memory type.
+
+typedef U8 Byte; //!< 8-bit unsigned integer.
+
+#define memcmp_ram2ram memcmp //!< Target-specific memcmp of RAM to RAM.
+#define memcmp_code2ram memcmp //!< Target-specific memcmp of RAM to NVRAM.
+#define memcpy_ram2ram memcpy //!< Target-specific memcpy from RAM to RAM.
+#define memcpy_code2ram memcpy //!< Target-specific memcpy from NVRAM to RAM.
+
+#define LSB0(u32) LSB0W(u32) //!< Least significant byte of 1st rank of \a u32.
+#define LSB1(u32) LSB1W(u32) //!< Least significant byte of 2nd rank of \a u32.
+#define LSB2(u32) LSB2W(u32) //!< Least significant byte of 3rd rank of \a u32.
+#define LSB3(u32) LSB3W(u32) //!< Least significant byte of 4th rank of \a u32.
+#define MSB3(u32) MSB3W(u32) //!< Most significant byte of 4th rank of \a u32.
+#define MSB2(u32) MSB2W(u32) //!< Most significant byte of 3rd rank of \a u32.
+#define MSB1(u32) MSB1W(u32) //!< Most significant byte of 2nd rank of \a u32.
+#define MSB0(u32) MSB0W(u32) //!< Most significant byte of 1st rank of \a u32.
+
+//! @}
+
+//#endif // __AVR32_ABI_COMPILER__
+#endif // __ASSEMBLY__
+
+#endif // _COMPILER_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/utils/fifo/enhc_fifo/fifo.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/utils/fifo/enhc_fifo/fifo.c
new file mode 100644
index 0000000..aee1b15
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/utils/fifo/enhc_fifo/fifo.c
@@ -0,0 +1,76 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief This file controls the software FIFO management.
+ *
+ * These functions manages FIFOs thanks to simple a API. The FIFO can
+ * be 100% full thanks to a double-index range implementation. For example,
+ * a FIFO of 4 elements can be implemented: the FIFO can really hold up to 4
+ * elements.
+ * This is particurly well suited for any kind of application needing a lot of
+ * small FIFO.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2010 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#include "compiler.h"
+#include "fifo.h"
+
+int fifo_init(fifo_desc_t *fifo_desc, void *buffer, uint16_t size)
+{
+ uint16_t tmp;
+
+ // Check the size parameter. It must be a 2-power.
+ tmp = size >> ctz(size);
+ if (tmp != 1) {
+ return FIFO_ERROR;
+ }
+
+ // Fifo starts empty.
+ fifo_desc->rd_id = fifo_desc->wr_id = 0;
+
+ // Save the size parameter.
+ fifo_desc->size = size;
+
+ // Save the buffer pointer
+ fifo_desc->buffer.u8ptr = buffer;
+
+ return FIFO_OK;
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/utils/fifo/enhc_fifo/fifo.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/utils/fifo/enhc_fifo/fifo.h
new file mode 100644
index 0000000..ae0c8e6
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/utils/fifo/enhc_fifo/fifo.h
@@ -0,0 +1,289 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief This file controls the software FIFO management.
+ *
+ * These functions manages FIFOs thanks to simple a API. The FIFO can
+ * be 100% full thanks to a double-index range implementation. For example,
+ * a FIFO of 4 elements can be implemented: the FIFO can really hold up to 4
+ * elements.
+ * This is particurly well suited for any kind of application needing a lot of
+ * small FIFO.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2010 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _FIFO_H_
+#define _FIFO_H_
+
+//! Error codes used by FIFO driver.
+enum {
+ FIFO_OK = 0, //!< Normal operation.
+ FIFO_ERROR_OVERFLOW, //!< Attempt to push something in a FIFO that is full.
+ FIFO_ERROR_UNDERFLOW, //!< Attempt to pull something from a FIFO that is empty
+ FIFO_ERROR
+//!< Error (malloc failed, ...)
+};
+
+//! FIFO descriptor used by FIFO driver.
+typedef struct {
+ volatile UnionVPtr buffer;
+ volatile uint16_t rd_id;
+ volatile uint16_t wr_id;
+ uint16_t size;
+} fifo_desc_t;
+
+/**
+ * @brief This function initializes a new software FIFO for a certain 'size'.
+ * Both fifo descriptor and buffer must be allocated by the caller before calling
+ * this function.
+ *
+ * @param fifo_desc Pointer on the FIFO descriptor.
+ * @param buffer Pointer on the FIFO buffer.
+ * @param size Size of the buffer (unit is in number of 'element').
+ * It must be a 2-power.
+ *
+ * @return Status
+ * @retval FIFO_OK when no error occured.
+ * @retval FIFO_ERROR when the size is not a 2-power.
+ */
+int fifo_init(fifo_desc_t *fifo_desc, void *buffer, uint16_t size);
+
+/**
+ * @brief This function returns the number of elements in the FIFO.
+ *
+ * @param fifo_desc The FIFO descriptor.
+ *
+ * @return The number of used elements.
+ */
+static inline uint16_t fifo_get_used_size(fifo_desc_t *fifo_desc)
+{
+ uint16_t val;
+ val = fifo_desc->wr_id + 2 * fifo_desc->size;
+ val -= fifo_desc->rd_id;
+ return val & ((2 * fifo_desc->size) - 1);
+}
+
+/**
+ * @brief This function returns the remaining free spaces of the FIFO (in number of elements).
+ *
+ * @param fifo_desc The FIFO descriptor.
+ *
+ * @return The number of free elements.
+ */
+static inline uint16_t fifo_get_free_size(fifo_desc_t *fifo_desc)
+{
+ return fifo_desc->size - fifo_get_used_size(fifo_desc);
+}
+
+/**
+ * @brief This function tests if a FIFO is empty or not.
+ *
+ * @param fifo_desc The FIFO descriptor.
+ *
+ * @return Status
+ * @retval true when the FIFO is empty.
+ * @retval false when the FIFO is not empty.
+ */
+static inline bool fifo_is_empty(fifo_desc_t *fifo_desc)
+{
+ uint16_t wr_id = fifo_desc->wr_id;
+ return (wr_id == fifo_desc->rd_id);
+}
+
+/**
+ * \brief This function gets a new 8-bits element from the FIFO.
+ *
+ * @param fifo_desc The FIFO descriptor.
+ * @param item extracted element.
+ *
+ * @return Status
+ * @retval FIFO_OK when no error occured.
+ * @retval FIFO_ERROR_UNDERFLOW when the FIFO was empty.
+ */
+static inline int fifo_push_byte(fifo_desc_t *fifo_desc, uint32_t item){
+ uint8_t wr_id;
+ if (fifo_get_free_size(fifo_desc) == 0)
+ return FIFO_ERROR_OVERFLOW;
+
+ wr_id = fifo_desc->wr_id;
+ fifo_desc->buffer.u8ptr[wr_id & (fifo_desc->size - 1)] = item;
+
+ // Must be the last thing to do.
+ barrier();
+ fifo_desc->wr_id = (wr_id + 1) & ((2 * fifo_desc->size) - 1);
+ return FIFO_OK;
+}
+
+/**
+ * \brief This function gets a new 16-bits element from the FIFO.
+ *
+ * @param fifo_desc The FIFO descriptor.
+ * @param item extracted element.
+ *
+ * @return Status
+ * @retval FIFO_OK when no error occured.
+ * @retval FIFO_ERROR_UNDERFLOW when the FIFO was empty.
+ */
+static inline int fifo_push_halfword(fifo_desc_t *fifo_desc, uint32_t item){
+ uint8_t wr_id;
+ if (fifo_get_free_size(fifo_desc) == 0)
+ return FIFO_ERROR_OVERFLOW;
+
+ wr_id = fifo_desc->wr_id;
+ fifo_desc->buffer.u16ptr[wr_id & (fifo_desc->size - 1)] = item;
+
+ // Must be the last thing to do.
+ barrier();
+ fifo_desc->wr_id = (wr_id + 1) & ((2 * fifo_desc->size) - 1);
+ return FIFO_OK;
+}
+
+/**
+ * \brief This function gets a new 32-bits element from the FIFO.
+ *
+ * @param fifo_desc The FIFO descriptor.
+ * @param item extracted element.
+ *
+ * @return Status
+ * @retval FIFO_OK when no error occured.
+ * @retval FIFO_ERROR_UNDERFLOW when the FIFO was empty.
+ */
+static inline int fifo_push_word(fifo_desc_t *fifo_desc, uint32_t item){
+ uint8_t wr_id;
+ if (fifo_get_free_size(fifo_desc) == 0)
+ return FIFO_ERROR_OVERFLOW;
+
+ wr_id = fifo_desc->wr_id;
+ fifo_desc->buffer.u32ptr[wr_id & (fifo_desc->size - 1)] = item;
+
+ // Must be the last thing to do.
+ barrier();
+ fifo_desc->wr_id = (wr_id + 1) & ((2 * fifo_desc->size) - 1);
+ return FIFO_OK;
+}
+
+/**
+ * \brief This function gets a new 8-bits element from the FIFO.
+ *
+ * @param fifo_desc The FIFO descriptor.
+ * @param item extracted element.
+ *
+ * @return Status
+ * @retval FIFO_OK when no error occured.
+ * @retval FIFO_ERROR_UNDERFLOW when the FIFO was empty.
+ */
+static inline int fifo_pull_byte(fifo_desc_t *fifo_desc, uint8_t *item)
+{
+ uint8_t rd_id;
+ if (fifo_is_empty(fifo_desc))
+ return FIFO_ERROR_UNDERFLOW;
+
+ rd_id = fifo_desc->rd_id;
+ *item = fifo_desc->buffer.u8ptr[rd_id & (fifo_desc->size - 1)];
+
+ // Must be the last thing to do.
+ barrier();
+ fifo_desc->rd_id = (rd_id + 1) & ((2 * fifo_desc->size) - 1);
+ return FIFO_OK;
+}
+
+/**
+ * \brief This function gets a new 16-bits element from the FIFO.
+ *
+ * @param fifo_desc The FIFO descriptor.
+ * @param item extracted element.
+ *
+ * @return Status
+ * @retval FIFO_OK when no error occured.
+ * @retval FIFO_ERROR_UNDERFLOW when the FIFO was empty.
+ */
+static inline int fifo_pull_halfword(fifo_desc_t *fifo_desc, uint16_t *item)
+{
+ uint8_t rd_id;
+ if (fifo_is_empty(fifo_desc))
+ return FIFO_ERROR_UNDERFLOW;
+
+ rd_id = fifo_desc->rd_id;
+ *item = fifo_desc->buffer.u16ptr[rd_id & (fifo_desc->size - 1)];
+
+ // Must be the last thing to do.
+ barrier();
+ fifo_desc->rd_id = (rd_id + 1) & ((2 * fifo_desc->size) - 1);
+ return FIFO_OK;
+}
+
+/**
+ * \brief This function gets a new 32-bits element from the FIFO.
+ *
+ * @param fifo_desc The FIFO descriptor.
+ * @param item extracted element.
+ *
+ * @return Status
+ * @retval FIFO_OK when no error occured.
+ * @retval FIFO_ERROR_UNDERFLOW when the FIFO was empty.
+ */
+static inline int fifo_pull_word(fifo_desc_t *fifo_desc, uint32_t *item)
+{
+ uint8_t rd_id;
+ if (fifo_is_empty(fifo_desc))
+ return FIFO_ERROR_UNDERFLOW;
+
+ rd_id = fifo_desc->rd_id;
+ *item = fifo_desc->buffer.u32ptr[rd_id & (fifo_desc->size - 1)];
+
+ // Must be the last thing to do.
+ barrier();
+ fifo_desc->rd_id = (rd_id + 1) & ((2 * fifo_desc->size) - 1);
+ return FIFO_OK;
+}
+
+/**
+ * \brief This function resets a software FIFO.
+ *
+ * @param fifo_desc The FIFO descriptor.
+ */
+static inline void fifo_reset(fifo_desc_t *fifo_desc)
+{
+ // Fifo starts empty.
+ fifo_desc->rd_id = fifo_desc->wr_id = 0;
+}
+
+#endif // _FIFO_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/utils/interrupt.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/utils/interrupt.h
new file mode 100644
index 0000000..03d1c8e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/utils/interrupt.h
@@ -0,0 +1,120 @@
+/**
+ * \file
+ *
+ * \brief Global interrupt management for 8- and 32-bit AVR
+ *
+ * Copyright (C) 2010 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+#ifndef UTILS_INTERRUPT_H
+#define UTILS_INTERRUPT_H
+
+#include <parts.h>
+
+#if XMEGA
+# include "interrupt/interrupt_avr8.h"
+#elif UC3
+# include "interrupt/interrupt_avr32.h"
+#else
+# error Unsupported device.
+#endif
+
+/**
+ * \defgroup interrupt_group Global interrupt management
+ *
+ * This is a driver for global enabling and disabling of interrupts.
+ *
+ * @{
+ */
+
+//! \name Global interrupt flags
+//@{
+/**
+ * \typedef irqflags_t
+ * \brief Type used for holding state of interrupt flag
+ */
+
+/**
+ * \def cpu_irq_enable
+ * \brief Enable interrupts globally
+ */
+
+/**
+ * \def cpu_irq_disable
+ * \brief Disable interrupts globally
+ */
+
+/**
+ * \fn irqflags_t cpu_irq_save(void)
+ * \brief Get and clear the global interrupt flags
+ *
+ * Use in conjunction with \ref cpu_irq_restore.
+ *
+ * \return Current state of interrupt flags.
+ *
+ * \note This function leaves interrupts disabled.
+ */
+
+/**
+ * \fn void cpu_irq_restore(irqflags_t flags)
+ * \brief Restore global interrupt flags
+ *
+ * Use in conjunction with \ref cpu_irq_save.
+ *
+ * \param flags State to set interrupt flag to.
+ */
+
+/**
+ * \fn bool cpu_irq_is_enabled_flags(irqflags_t flags)
+ * \brief Check if interrupts are globally enabled in supplied flags
+ *
+ * \param flags Currents state of interrupt flags.
+ *
+ * \return True if interrupts are enabled.
+ */
+
+/**
+ * \def cpu_irq_is_enabled
+ * \brief Check if interrupts are globally enabled
+ *
+ * \return True if interrupts are enabled.
+ */
+//@}
+
+//! @}
+
+/**
+ * \ingroup interrupt_group
+ * \defgroup interrupt_deprecated_group Deprecated interrupt definitions
+ */
+
+#endif /* UTILS_INTERRUPT_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/utils/storage/ctrl_access/ctrl_access.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/utils/storage/ctrl_access/ctrl_access.c
new file mode 100644
index 0000000..54620f8
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/utils/storage/ctrl_access/ctrl_access.c
@@ -0,0 +1,570 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Abstraction layer for memory interfaces.
+ *
+ * This module contains the interfaces:
+ * - MEM <-> USB;
+ * - MEM <-> RAM;
+ * - MEM <-> MEM.
+ *
+ * This module may be configured and expanded to support the following features:
+ * - write-protected globals;
+ * - password-protected data;
+ * - specific features;
+ * - etc.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+//_____ I N C L U D E S ____________________________________________________
+
+#include "board.h"
+#include "compiler.h"
+//#include "preprocessor.h"
+#ifdef FREERTOS_USED
+#include "FreeRTOS.h"
+#include "semphr.h"
+#endif
+#include "ctrl_access.h"
+
+
+//_____ D E F I N I T I O N S ______________________________________________
+
+#ifdef FREERTOS_USED
+
+/*! \name LUN Access Protection Macros
+ */
+//! @{
+
+/*! \brief Locks accesses to LUNs.
+ *
+ * \return \c TRUE if the access was successfully locked, else \c FALSE.
+ */
+#define Ctrl_access_lock() ctrl_access_lock()
+
+/*! \brief Unlocks accesses to LUNs.
+ */
+#define Ctrl_access_unlock() xSemaphoreGive(ctrl_access_semphr)
+
+//! @}
+
+//! Handle to the semaphore protecting accesses to LUNs.
+static xSemaphoreHandle ctrl_access_semphr = NULL;
+
+#else
+
+/*! \name LUN Access Protection Macros
+ */
+//! @{
+
+/*! \brief Locks accesses to LUNs.
+ *
+ * \return \c TRUE if the access was successfully locked, else \c FALSE.
+ */
+#define Ctrl_access_lock() TRUE
+
+/*! \brief Unlocks accesses to LUNs.
+ */
+#define Ctrl_access_unlock()
+
+//! @}
+
+#endif // FREERTOS_USED
+
+
+#if MAX_LUN
+
+/*! \brief Initializes an entry of the LUN descriptor table.
+ *
+ * \param lun Logical Unit Number.
+ *
+ * \return LUN descriptor table entry initializer.
+ */
+#if ACCESS_USB == ENABLED && ACCESS_MEM_TO_RAM == ENABLED
+#define Lun_desc_entry(lun) \
+ {\
+ TPASTE3(Lun_, lun, _test_unit_ready),\
+ TPASTE3(Lun_, lun, _read_capacity),\
+ TPASTE3(Lun_, lun, _wr_protect),\
+ TPASTE3(Lun_, lun, _removal),\
+ TPASTE3(Lun_, lun, _usb_read_10),\
+ TPASTE3(Lun_, lun, _usb_write_10),\
+ TPASTE3(Lun_, lun, _mem_2_ram),\
+ TPASTE3(Lun_, lun, _ram_2_mem),\
+ TPASTE3(LUN_, lun, _NAME)\
+ }
+#elif ACCESS_USB == ENABLED
+#define Lun_desc_entry(lun) \
+ {\
+ TPASTE3(Lun_, lun, _test_unit_ready),\
+ TPASTE3(Lun_, lun, _read_capacity),\
+ TPASTE3(Lun_, lun, _wr_protect),\
+ TPASTE3(Lun_, lun, _removal),\
+ TPASTE3(Lun_, lun, _usb_read_10),\
+ TPASTE3(Lun_, lun, _usb_write_10),\
+ TPASTE3(LUN_, lun, _NAME)\
+ }
+#elif ACCESS_MEM_TO_RAM == ENABLED
+#define Lun_desc_entry(lun) \
+ {\
+ TPASTE3(Lun_, lun, _test_unit_ready),\
+ TPASTE3(Lun_, lun, _read_capacity),\
+ TPASTE3(Lun_, lun, _wr_protect),\
+ TPASTE3(Lun_, lun, _removal),\
+ TPASTE3(Lun_, lun, _mem_2_ram),\
+ TPASTE3(Lun_, lun, _ram_2_mem),\
+ TPASTE3(LUN_, lun, _NAME)\
+ }
+#else
+#define Lun_desc_entry(lun) \
+ {\
+ TPASTE3(Lun_, lun, _test_unit_ready),\
+ TPASTE3(Lun_, lun, _read_capacity),\
+ TPASTE3(Lun_, lun, _wr_protect),\
+ TPASTE3(Lun_, lun, _removal),\
+ TPASTE3(LUN_, lun, _NAME)\
+ }
+#endif
+
+//! LUN descriptor table.
+static const struct
+{
+ Ctrl_status (*test_unit_ready)(void);
+ Ctrl_status (*read_capacity)(U32 *);
+ Bool (*wr_protect)(void);
+ Bool (*removal)(void);
+#if ACCESS_USB == ENABLED
+ Ctrl_status (*usb_read_10)(U32, U16);
+ Ctrl_status (*usb_write_10)(U32, U16);
+#endif
+#if ACCESS_MEM_TO_RAM == ENABLED
+ Ctrl_status (*mem_2_ram)(U32, void *);
+ Ctrl_status (*ram_2_mem)(U32, const void *);
+#endif
+ const char *name;
+} lun_desc[MAX_LUN] =
+{
+#if LUN_0 == ENABLE
+ Lun_desc_entry(0),
+#endif
+#if LUN_1 == ENABLE
+ Lun_desc_entry(1),
+#endif
+#if LUN_2 == ENABLE
+ Lun_desc_entry(2),
+#endif
+#if LUN_3 == ENABLE
+ Lun_desc_entry(3),
+#endif
+#if LUN_4 == ENABLE
+ Lun_desc_entry(4),
+#endif
+#if LUN_5 == ENABLE
+ Lun_desc_entry(5),
+#endif
+#if LUN_6 == ENABLE
+ Lun_desc_entry(6),
+#endif
+#if LUN_7 == ENABLE
+ Lun_desc_entry(7)
+#endif
+};
+
+#endif
+
+
+#if GLOBAL_WR_PROTECT == ENABLED
+Bool g_wr_protect;
+#endif
+
+
+/*! \name Control Interface
+ */
+//! @{
+
+
+#ifdef FREERTOS_USED
+
+Bool ctrl_access_init(void)
+{
+ // If the handle to the protecting semaphore is not valid,
+ if (!ctrl_access_semphr)
+ {
+ // try to create the semaphore.
+ vSemaphoreCreateBinary(ctrl_access_semphr);
+
+ // If the semaphore could not be created, there is no backup solution.
+ if (!ctrl_access_semphr) return FALSE;
+ }
+
+ return TRUE;
+}
+
+
+/*! \brief Locks accesses to LUNs.
+ *
+ * \return \c TRUE if the access was successfully locked, else \c FALSE.
+ */
+static Bool ctrl_access_lock(void)
+{
+ // If the semaphore could not be created, there is no backup solution.
+ if (!ctrl_access_semphr) return FALSE;
+
+ // Wait for the semaphore.
+ while (!xSemaphoreTake(ctrl_access_semphr, portMAX_DELAY));
+
+ return TRUE;
+}
+
+#endif // FREERTOS_USED
+
+
+U8 get_nb_lun(void)
+{
+#if MEM_USB == ENABLE
+ U8 nb_lun;
+
+ if (!Ctrl_access_lock()) return MAX_LUN;
+
+ nb_lun = MAX_LUN + host_get_lun();
+
+ Ctrl_access_unlock();
+
+ return nb_lun;
+#else
+ return MAX_LUN;
+#endif
+}
+
+
+U8 get_cur_lun(void)
+{
+ return LUN_ID_0;
+}
+
+
+Ctrl_status mem_test_unit_ready(U8 lun)
+{
+ Ctrl_status status;
+
+ if (!Ctrl_access_lock()) return CTRL_FAIL;
+
+ status =
+#if MAX_LUN
+ (lun < MAX_LUN) ? lun_desc[lun].test_unit_ready() :
+#endif
+#if LUN_USB == ENABLE
+ Lun_usb_test_unit_ready(lun - LUN_ID_USB);
+#else
+ CTRL_FAIL;
+#endif
+
+ Ctrl_access_unlock();
+
+ return status;
+}
+
+
+Ctrl_status mem_read_capacity(U8 lun, U32 *u32_nb_sector)
+{
+ Ctrl_status status;
+
+ if (!Ctrl_access_lock()) return CTRL_FAIL;
+
+ status =
+#if MAX_LUN
+ (lun < MAX_LUN) ? lun_desc[lun].read_capacity(u32_nb_sector) :
+#endif
+#if LUN_USB == ENABLE
+ Lun_usb_read_capacity(lun - LUN_ID_USB, u32_nb_sector);
+#else
+ CTRL_FAIL;
+#endif
+
+ Ctrl_access_unlock();
+
+ return status;
+}
+
+
+U8 mem_sector_size(U8 lun)
+{
+ U8 sector_size;
+
+ if (!Ctrl_access_lock()) return 0;
+
+ sector_size =
+#if MAX_LUN
+ (lun < MAX_LUN) ? 1 :
+#endif
+#if LUN_USB == ENABLE
+ Lun_usb_read_sector_size(lun - LUN_ID_USB);
+#else
+ 0;
+#endif
+
+ Ctrl_access_unlock();
+
+ return sector_size;
+}
+
+
+Bool mem_wr_protect(U8 lun)
+{
+ Bool wr_protect;
+
+ if (!Ctrl_access_lock()) return TRUE;
+
+ wr_protect =
+#if MAX_LUN
+ (lun < MAX_LUN) ? lun_desc[lun].wr_protect() :
+#endif
+#if LUN_USB == ENABLE
+ Lun_usb_wr_protect(lun - LUN_ID_USB);
+#else
+ TRUE;
+#endif
+
+ Ctrl_access_unlock();
+
+ return wr_protect;
+}
+
+
+Bool mem_removal(U8 lun)
+{
+ Bool removal;
+
+ if (!Ctrl_access_lock()) return TRUE;
+
+ removal =
+#if MAX_LUN
+ (lun < MAX_LUN) ? lun_desc[lun].removal() :
+#endif
+#if LUN_USB == ENABLE
+ Lun_usb_removal();
+#else
+ TRUE;
+#endif
+
+ Ctrl_access_unlock();
+
+ return removal;
+}
+
+
+const char *mem_name(U8 lun)
+{
+ return
+#if MAX_LUN
+ (lun < MAX_LUN) ? lun_desc[lun].name :
+#endif
+#if LUN_USB == ENABLE
+ LUN_USB_NAME;
+#else
+ NULL;
+#endif
+}
+
+
+//! @}
+
+
+#if ACCESS_USB == ENABLED
+
+/*! \name MEM <-> USB Interface
+ */
+//! @{
+
+
+Ctrl_status memory_2_usb(U8 lun, U32 addr, U16 nb_sector)
+{
+ Ctrl_status status;
+
+ if (!Ctrl_access_lock()) return CTRL_FAIL;
+
+ memory_start_read_action(nb_sector);
+ status =
+#if MAX_LUN
+ (lun < MAX_LUN) ? lun_desc[lun].usb_read_10(addr, nb_sector) :
+#endif
+ CTRL_FAIL;
+ memory_stop_read_action();
+
+ Ctrl_access_unlock();
+
+ return status;
+}
+
+
+Ctrl_status usb_2_memory(U8 lun, U32 addr, U16 nb_sector)
+{
+ Ctrl_status status;
+
+ if (!Ctrl_access_lock()) return CTRL_FAIL;
+
+ memory_start_write_action(nb_sector);
+ status =
+#if MAX_LUN
+ (lun < MAX_LUN) ? lun_desc[lun].usb_write_10(addr, nb_sector) :
+#endif
+ CTRL_FAIL;
+ memory_stop_write_action();
+
+ Ctrl_access_unlock();
+
+ return status;
+}
+
+
+//! @}
+
+#endif // ACCESS_USB == ENABLED
+
+
+#if ACCESS_MEM_TO_RAM == ENABLED
+
+/*! \name MEM <-> RAM Interface
+ */
+//! @{
+
+
+Ctrl_status memory_2_ram(U8 lun, U32 addr, void *ram)
+{
+ Ctrl_status status;
+
+ if (!Ctrl_access_lock()) return CTRL_FAIL;
+
+ memory_start_read_action(1);
+ status =
+#if MAX_LUN
+ (lun < MAX_LUN) ? lun_desc[lun].mem_2_ram(addr, ram) :
+#endif
+#if LUN_USB == ENABLE
+ Lun_usb_mem_2_ram(addr, ram);
+#else
+ CTRL_FAIL;
+#endif
+ memory_stop_read_action();
+
+ Ctrl_access_unlock();
+
+ return status;
+}
+
+
+Ctrl_status ram_2_memory(U8 lun, U32 addr, const void *ram)
+{
+ Ctrl_status status;
+
+ if (!Ctrl_access_lock()) return CTRL_FAIL;
+
+ memory_start_write_action(1);
+ status =
+#if MAX_LUN
+ (lun < MAX_LUN) ? lun_desc[lun].ram_2_mem(addr, ram) :
+#endif
+#if LUN_USB == ENABLE
+ Lun_usb_ram_2_mem(addr, ram);
+#else
+ CTRL_FAIL;
+#endif
+ memory_stop_write_action();
+
+ Ctrl_access_unlock();
+
+ return status;
+}
+
+
+//! @}
+
+#endif // ACCESS_MEM_TO_RAM == ENABLED
+
+
+#if ACCESS_STREAM == ENABLED
+
+/*! \name Streaming MEM <-> MEM Interface
+ */
+//! @{
+
+
+ #if ACCESS_MEM_TO_MEM == ENABLED
+
+#include "fat.h"
+
+Ctrl_status stream_mem_to_mem(U8 src_lun, U32 src_addr, U8 dest_lun, U32 dest_addr, U16 nb_sector)
+{
+#if (defined __GNUC__) && (defined __AVR32__)
+ __attribute__((__aligned__(4)))
+#elif (defined __ICCAVR32__)
+ #pragma data_alignment = 4
+#endif
+ static U8 sector_buf[FS_512B];
+ Ctrl_status status = CTRL_GOOD;
+
+ while (nb_sector--)
+ {
+ if ((status = memory_2_ram(src_lun, src_addr++, sector_buf)) != CTRL_GOOD) break;
+ if ((status = ram_2_memory(dest_lun, dest_addr++, sector_buf)) != CTRL_GOOD) break;
+ }
+
+ return status;
+}
+
+ #endif // ACCESS_MEM_TO_MEM == ENABLED
+
+
+Ctrl_status stream_state(U8 id)
+{
+ return CTRL_GOOD;
+}
+
+
+U16 stream_stop(U8 id)
+{
+ return 0;
+}
+
+
+//! @}
+
+#endif // ACCESS_STREAM == ENABLED
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/utils/storage/ctrl_access/ctrl_access.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/utils/storage/ctrl_access/ctrl_access.h
new file mode 100644
index 0000000..b6a464c
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_device/utils/storage/ctrl_access/ctrl_access.h
@@ -0,0 +1,367 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Abstraction layer for memory interfaces.
+ *
+ * This module contains the interfaces:
+ * - MEM <-> USB;
+ * - MEM <-> RAM;
+ * - MEM <-> MEM.
+ *
+ * This module may be configured and expanded to support the following features:
+ * - write-protected globals;
+ * - password-protected data;
+ * - specific features;
+ * - etc.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CTRL_ACCESS_H_
+#define _CTRL_ACCESS_H_
+
+#include "compiler.h"
+#include "conf_access.h"
+
+
+//! Status returned by CTRL_ACCESS interfaces.
+typedef enum
+{
+ CTRL_GOOD = PASS, //!< Success, memory ready.
+ CTRL_FAIL = FAIL, //!< An error occurred.
+ CTRL_NO_PRESENT = FAIL + 1, //!< Memory unplugged.
+ CTRL_BUSY = FAIL + 2 //!< Memory not initialized or changed.
+} Ctrl_status;
+
+
+// FYI: Each Logical Unit Number (LUN) corresponds to a memory.
+
+// Check LUN defines.
+#ifndef LUN_0
+ #error LUN_0 must be defined as ENABLE or DISABLE in conf_access.h
+#endif
+#ifndef LUN_1
+ #error LUN_1 must be defined as ENABLE or DISABLE in conf_access.h
+#endif
+#ifndef LUN_2
+ #error LUN_2 must be defined as ENABLE or DISABLE in conf_access.h
+#endif
+#ifndef LUN_3
+ #error LUN_3 must be defined as ENABLE or DISABLE in conf_access.h
+#endif
+#ifndef LUN_4
+ #error LUN_4 must be defined as ENABLE or DISABLE in conf_access.h
+#endif
+#ifndef LUN_5
+ #error LUN_5 must be defined as ENABLE or DISABLE in conf_access.h
+#endif
+#ifndef LUN_6
+ #error LUN_6 must be defined as ENABLE or DISABLE in conf_access.h
+#endif
+#ifndef LUN_7
+ #error LUN_7 must be defined as ENABLE or DISABLE in conf_access.h
+#endif
+#ifndef LUN_USB
+ #error LUN_USB must be defined as ENABLE or DISABLE in conf_access.h
+#endif
+
+/*! \name LUN IDs
+ */
+//! @{
+#define LUN_ID_0 (0) //!< First static LUN.
+#define LUN_ID_1 (LUN_ID_0 + LUN_0)
+#define LUN_ID_2 (LUN_ID_1 + LUN_1)
+#define LUN_ID_3 (LUN_ID_2 + LUN_2)
+#define LUN_ID_4 (LUN_ID_3 + LUN_3)
+#define LUN_ID_5 (LUN_ID_4 + LUN_4)
+#define LUN_ID_6 (LUN_ID_5 + LUN_5)
+#define LUN_ID_7 (LUN_ID_6 + LUN_6)
+#define MAX_LUN (LUN_ID_7 + LUN_7) //!< Number of static LUNs.
+#define LUN_ID_USB (MAX_LUN) //!< First dynamic LUN (USB host mass storage).
+//! @}
+
+
+// Include LUN header files.
+#if LUN_0 == ENABLE
+ #include LUN_0_INCLUDE
+#endif
+#if LUN_1 == ENABLE
+ #include LUN_1_INCLUDE
+#endif
+#if LUN_2 == ENABLE
+ #include LUN_2_INCLUDE
+#endif
+#if LUN_3 == ENABLE
+ #include LUN_3_INCLUDE
+#endif
+#if LUN_4 == ENABLE
+ #include LUN_4_INCLUDE
+#endif
+#if LUN_5 == ENABLE
+ #include LUN_5_INCLUDE
+#endif
+#if LUN_6 == ENABLE
+ #include LUN_6_INCLUDE
+#endif
+#if LUN_7 == ENABLE
+ #include LUN_7_INCLUDE
+#endif
+#if LUN_USB == ENABLE
+ #include LUN_USB_INCLUDE
+#endif
+
+
+// Check the configuration of write protection in conf_access.h.
+#ifndef GLOBAL_WR_PROTECT
+ #error GLOBAL_WR_PROTECT must be defined as ENABLED or DISABLED in conf_access.h
+#endif
+
+
+#if GLOBAL_WR_PROTECT == ENABLED
+
+//! Write protect.
+extern Bool g_wr_protect;
+
+#endif
+
+
+/*! \name Control Interface
+ */
+//! @{
+
+#ifdef FREERTOS_USED
+
+/*! \brief Initializes the LUN access locker.
+ *
+ * \return \c TRUE if the locker was successfully initialized, else \c FALSE.
+ */
+extern Bool ctrl_access_init(void);
+
+#endif // FREERTOS_USED
+
+/*! \brief Returns the number of LUNs.
+ *
+ * \return Number of LUNs in the system.
+ */
+extern U8 get_nb_lun(void);
+
+/*! \brief Returns the current LUN.
+ *
+ * \return Current LUN.
+ *
+ * \todo Implement.
+ */
+extern U8 get_cur_lun(void);
+
+/*! \brief Tests the memory state and initializes the memory if required.
+ *
+ * The TEST UNIT READY SCSI primary command allows an application client to poll
+ * a LUN until it is ready without having to allocate memory for returned data.
+ *
+ * This command may be used to check the media status of LUNs with removable
+ * media.
+ *
+ * \param lun Logical Unit Number.
+ *
+ * \return Status.
+ */
+extern Ctrl_status mem_test_unit_ready(U8 lun);
+
+/*! \brief Returns the address of the last valid sector (512 bytes) in the
+ * memory.
+ *
+ * \param lun Logical Unit Number.
+ * \param u32_nb_sector Pointer to the address of the last valid sector.
+ *
+ * \return Status.
+ */
+extern Ctrl_status mem_read_capacity(U8 lun, U32 *u32_nb_sector);
+
+/*! \brief Returns the size of the physical sector.
+ *
+ * \param lun Logical Unit Number.
+ *
+ * \return Sector size (unit: 512 bytes).
+ */
+extern U8 mem_sector_size(U8 lun);
+
+/*! \brief Returns the write-protection state of the memory.
+ *
+ * \param lun Logical Unit Number.
+ *
+ * \return \c TRUE if the memory is write-protected, else \c FALSE.
+ *
+ * \note Only used by removable memories with hardware-specific write
+ * protection.
+ */
+extern Bool mem_wr_protect(U8 lun);
+
+/*! \brief Tells whether the memory is removable.
+ *
+ * \param lun Logical Unit Number.
+ *
+ * \return \c TRUE if the memory is removable, else \c FALSE.
+ */
+extern Bool mem_removal(U8 lun);
+
+/*! \brief Returns a pointer to the LUN name.
+ *
+ * \param lun Logical Unit Number.
+ *
+ * \return Pointer to the LUN name string.
+ */
+extern const char *mem_name(U8 lun);
+
+//! @}
+
+
+#if ACCESS_USB == ENABLED
+
+/*! \name MEM <-> USB Interface
+ */
+//! @{
+
+/*! \brief Transfers data from the memory to USB.
+ *
+ * \param lun Logical Unit Number.
+ * \param addr Address of first memory sector to read.
+ * \param nb_sector Number of sectors to transfer.
+ *
+ * \return Status.
+ */
+extern Ctrl_status memory_2_usb(U8 lun, U32 addr, U16 nb_sector);
+
+/*! \brief Transfers data from USB to the memory.
+ *
+ * \param lun Logical Unit Number.
+ * \param addr Address of first memory sector to write.
+ * \param nb_sector Number of sectors to transfer.
+ *
+ * \return Status.
+ */
+extern Ctrl_status usb_2_memory(U8 lun, U32 addr, U16 nb_sector);
+
+//! @}
+
+#endif // ACCESS_USB == ENABLED
+
+
+#if ACCESS_MEM_TO_RAM == ENABLED
+
+/*! \name MEM <-> RAM Interface
+ */
+//! @{
+
+/*! \brief Copies 1 data sector from the memory to RAM.
+ *
+ * \param lun Logical Unit Number.
+ * \param addr Address of first memory sector to read.
+ * \param ram Pointer to RAM buffer to write.
+ *
+ * \return Status.
+ */
+extern Ctrl_status memory_2_ram(U8 lun, U32 addr, void *ram);
+
+/*! \brief Copies 1 data sector from RAM to the memory.
+ *
+ * \param lun Logical Unit Number.
+ * \param addr Address of first memory sector to write.
+ * \param ram Pointer to RAM buffer to read.
+ *
+ * \return Status.
+ */
+extern Ctrl_status ram_2_memory(U8 lun, U32 addr, const void *ram);
+
+//! @}
+
+#endif // ACCESS_MEM_TO_RAM == ENABLED
+
+
+#if ACCESS_STREAM == ENABLED
+
+/*! \name Streaming MEM <-> MEM Interface
+ */
+//! @{
+
+//! Erroneous streaming data transfer ID.
+#define ID_STREAM_ERR 0xFF
+
+ #if ACCESS_MEM_TO_MEM == ENABLED
+
+/*! \brief Copies data from one memory to another.
+ *
+ * \param src_lun Source Logical Unit Number.
+ * \param src_addr Source address of first memory sector to read.
+ * \param dest_lun Destination Logical Unit Number.
+ * \param dest_addr Destination address of first memory sector to write.
+ * \param nb_sector Number of sectors to copy.
+ *
+ * \return Status.
+ */
+extern Ctrl_status stream_mem_to_mem(U8 src_lun, U32 src_addr, U8 dest_lun, U32 dest_addr, U16 nb_sector);
+
+ #endif // ACCESS_MEM_TO_MEM == ENABLED
+
+/*! \brief Returns the state of a streaming data transfer.
+ *
+ * \param id Transfer ID.
+ *
+ * \return Status.
+ *
+ * \todo Implement.
+ */
+extern Ctrl_status stream_state(U8 id);
+
+/*! \brief Stops a streaming data transfer.
+ *
+ * \param id Transfer ID.
+ *
+ * \return Number of remaining sectors.
+ *
+ * \todo Implement.
+ */
+extern U16 stream_stop(U8 id);
+
+//! @}
+
+#endif // ACCESS_STREAM == ENABLED
+
+
+#endif // _CTRL_ACCESS_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/FreeRTOSTask.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/FreeRTOSTask.h
new file mode 100644
index 0000000..800b2dd
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/FreeRTOSTask.h
@@ -0,0 +1,80 @@
+/* This header file is part of the AVR Software Framework 2.0.0 release */
+
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief FreeRTOS configuration file.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef FREERTOS_TASK_H
+#define FREERTOS_TASK_H
+
+/* USB task definitions. */
+#define configTSK_USB_NAME ((const signed portCHAR *)"USB")
+#define configTSK_USB_STACK_SIZE 256
+#define configTSK_USB_PRIORITY (tskIDLE_PRIORITY + 3)
+
+/* USB device task definitions. */
+#define configTSK_USB_DEV_NAME ((const signed portCHAR *)"USB Device")
+#define configTSK_USB_DEV_STACK_SIZE 256
+#define configTSK_USB_DEV_PRIORITY (tskIDLE_PRIORITY + 2)
+#define configTSK_USB_DEV_PERIOD 20
+
+/* USB host task definitions. */
+#define configTSK_USB_HST_NAME ((const signed portCHAR *)"USB Host")
+#define configTSK_USB_HST_STACK_SIZE 256
+#define configTSK_USB_HST_PRIORITY (tskIDLE_PRIORITY + 2)
+#define configTSK_USB_HST_PERIOD 20
+
+/* USB device template task definitions. */
+#define configTSK_USB_DTP_NAME ((const signed portCHAR *)"USB Device Template")
+#define configTSK_USB_DTP_STACK_SIZE 256
+#define configTSK_USB_DTP_PRIORITY (tskIDLE_PRIORITY + 1)
+#define configTSK_USB_DTP_PERIOD 20
+
+/* USB host template task definitions. */
+#define configTSK_USB_HTP_NAME ((const signed portCHAR *)"USB Host Template")
+#define configTSK_USB_HTP_STACK_SIZE 256
+#define configTSK_USB_HTP_PRIORITY (tskIDLE_PRIORITY + 1)
+#define configTSK_USB_HTP_PERIOD 20
+
+#endif /* FREERTOS_TASK_H */
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/class/hid/hid.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/class/hid/hid.h
new file mode 100644
index 0000000..fb0e23b
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/class/hid/hid.h
@@ -0,0 +1,551 @@
+/* This header file is part of the AVR Software Framework 2.0.0 release */
+
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Management of the generic HID features.
+ *
+ * This file manages the generic HID features.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _HID_H_
+#define _HID_H_
+
+
+//_____ I N C L U D E S ________________________________________________________
+
+
+//_____ M A C R O S ____________________________________________________________
+
+/*! \name HID Descriptor Types
+ */
+//! @{
+#define HID_DESCRIPTOR 0x21
+#define HID_REPORT_DESCRIPTOR 0x22
+#define HID_PHYSICAL_DESCRIPTOR 0x23
+//! @}
+
+/*! \name Constants of field DESCRIPTOR_HID
+ */
+//! @{
+#define HID_BDC 0x0111 //!< Numeric expression identifying the HID Class Specification release (here V1.11)
+#define HID_CLASS_DESC_NB_DEFAULT 0x01 //!< Numeric expression specifying the number of class descriptors (always at least one i.e. Report descriptor.)
+//! @}
+
+/*! \name HID Country Codes
+ */
+//! @{
+#define HID_COUNTRY_CODE_NOT_SUPPORTED 0
+#define HID_COUNTRY_CODE_ARABIC 1
+#define HID_COUNTRY_CODE_BELGIAN 2
+#define HID_COUNTRY_CODE_CANADIAN_BILINGUAL 3
+#define HID_COUNTRY_CODE_CANADIAN_FRENCH 4
+#define HID_COUNTRY_CODE_CZECH_REPUBLIC 5
+#define HID_COUNTRY_CODE_DANISH 6
+#define HID_COUNTRY_CODE_FINNISH 7
+#define HID_COUNTRY_CODE_FRENCH 8
+#define HID_COUNTRY_CODE_GERMAN 9
+#define HID_COUNTRY_CODE_GREEK 10
+#define HID_COUNTRY_CODE_HEBREW 11
+#define HID_COUNTRY_CODE_HUNGARY 12
+#define HID_COUNTRY_CODE_INTERNATIONAL_ISO 13
+#define HID_COUNTRY_CODE_ITALIAN 14
+#define HID_COUNTRY_CODE_JAPAN_KATAKANA 15
+#define HID_COUNTRY_CODE_KOREAN 16
+#define HID_COUNTRY_CODE_LATIN_AMERICAN 17
+#define HID_COUNTRY_CODE_NETHERLANDS_DUTCH 18
+#define HID_COUNTRY_CODE_NORWEGIAN 19
+#define HID_COUNTRY_CODE_PERSIAN_FARSI 20
+#define HID_COUNTRY_CODE_POLAND 21
+#define HID_COUNTRY_CODE_PORTUGUESE 22
+#define HID_COUNTRY_CODE_RUSSIA 23
+#define HID_COUNTRY_CODE_SLOVAKIA 24
+#define HID_COUNTRY_CODE_SPANISH 25
+#define HID_COUNTRY_CODE_SWEDISH 26
+#define HID_COUNTRY_CODE_SWISS_FRENCH 27
+#define HID_COUNTRY_CODE_SWISS_GERMAN 28
+#define HID_COUNTRY_CODE_SWITZERLAND 29
+#define HID_COUNTRY_CODE_TAIWAN 30
+#define HID_COUNTRY_CODE_TURKISH_Q 31
+#define HID_COUNTRY_CODE_UK 32
+#define HID_COUNTRY_CODE_US 33
+#define HID_COUNTRY_CODE_YUGOSLAVIA 34
+#define HID_COUNTRY_CODE_TURKISH_F 35
+//! @}
+
+//! \name HID KEYS values
+//! @{
+#define HID_A 4
+#define HID_B 5
+#define HID_C 6
+#define HID_D 7
+#define HID_E 8
+#define HID_F 9
+#define HID_G 10
+#define HID_H 11
+#define HID_I 12
+#define HID_J 13
+#define HID_K 14
+#define HID_L 15
+#define HID_M 16
+#define HID_N 17
+#define HID_O 18
+#define HID_P 19
+#define HID_Q 20
+#define HID_R 21
+#define HID_S 22
+#define HID_T 23
+#define HID_U 24
+#define HID_V 25
+#define HID_W 26
+#define HID_X 27
+#define HID_Y 28
+#define HID_Z 29
+#define HID_1 30
+#define HID_2 31
+#define HID_3 32
+#define HID_4 33
+#define HID_5 34
+#define HID_6 35
+#define HID_7 36
+#define HID_8 37
+#define HID_9 38
+#define HID_0 39
+#define HID_ENTER 40
+#define HID_ESCAPE 41
+#define HID_BACKSPACE 42
+#define HID_TAB 43
+#define HID_SPACEBAR 44
+#define HID_UNDERSCORE 45
+#define HID_PLUS 46
+/*
+#define HID_[ { 47
+#define HID_] } 48
+*/
+#define HID_BACKSLASH 49
+/*
+#define HID_# ~ 50
+#define HID_; : 51
+#define HID_‘ " 52
+*/
+#define HID_TILDE 53
+#define HID_COMMA 54
+#define HID_DOT 55
+#define HID_SLASH 56
+#define HID_CAPS LOCK 57
+#define HID_F1 58
+#define HID_F2 59
+#define HID_F3 60
+#define HID_F4 61
+#define HID_F5 62
+#define HID_F6 63
+#define HID_F7 64
+#define HID_F8 65
+#define HID_F9 66
+#define HID_F10 67
+#define HID_F11 68
+#define HID_F12 69
+#define HID_PRINTSCREEN 70
+#define HID_SCROLL LOCK 71
+#define HID_PAUSE 72
+#define HID_INSERT 73
+#define HID_HOME 74
+#define HID_PAGEUP 75
+#define HID_DELETE 76
+#define HID_END 77
+#define HID_PAGEDOWN 78
+#define HID_RIGHT 79
+#define HID_LEFT 80
+#define HID_DOWN 81
+#define HID_UP 82
+#define HID_KEYPAD_NUM_LOCK 83
+#define HID_KEYPAD_DIVIDE 84
+#define HID_KEYPAD_AT 85
+#define HID_KEYPAD_MULTIPLY 85
+#define HID_KEYPAD_MINUS 86
+#define HID_KEYPAD_PLUS 87
+#define HID_KEYPAD_ENTER 88
+#define HID_KEYPAD_1 89
+#define HID_KEYPAD_2 90
+#define HID_KEYPAD_3 91
+#define HID_KEYPAD_4 92
+#define HID_KEYPAD_5 93
+#define HID_KEYPAD_6 94
+#define HID_KEYPAD_7 95
+#define HID_KEYPAD_8 96
+#define HID_KEYPAD_9 97
+#define HID_KEYPAD_0 98
+
+ //! \name HID modifier values
+ //! @{
+#define HID_MODIFIER_NONE 0x00
+#define HID_MODIFIER_LEFT_CTRL 0x01
+#define HID_MODIFIER_LEFT_SHIFT 0x02
+#define HID_MODIFIER_LEFT_ALT 0x04
+#define HID_MODIFIER_LEFT_GUI 0x08
+#define HID_MODIFIER_RIGHT_CTRL 0x10
+#define HID_MODIFIER_RIGHT_SHIFT 0x20
+#define HID_MODIFIER_RIGHT_ALT 0x40
+#define HID_MODIFIER_RIGHT_GUI 0x80
+ //! @}
+//! @}
+
+/*! \name HID Requests
+ */
+//! @{
+#define HID_GET_REPORT 0x01
+#define HID_GET_IDLE 0x02
+#define HID_GET_PROTOCOL 0x03
+#define HID_SET_REPORT 0x09
+#define HID_SET_IDLE 0x0A
+#define HID_SET_PROTOCOL 0x0B
+//! @}
+
+/*! \name HID Report Types
+ */
+//! @{
+#define HID_REPORT_INPUT 0x01
+#define HID_REPORT_OUTPUT 0x02
+#define HID_REPORT_FEATURE 0x03
+//! @}
+
+/*! \name Special HID Report IDs
+ */
+//! @{
+#define HID_REPORT_ID_ALL 0x00
+//! @}
+
+/*! \name Special HID Idle Durations
+ */
+//! @{
+#define HID_IDLE_DURATION_INDEFINITE 0x00
+//! @}
+
+/*! \name HID Protocols
+ */
+//! @{
+#define HID_BOOT_PROTOCOL 0x00
+#define HID_REPORT_PROTOCOL 0x01
+//! @}
+
+/*! \name HID Report Descriptor Item Types
+ */
+//! @{
+#define HID_ITEM_TYPE_MAIN 0x00
+#define HID_ITEM_TYPE_GLOBAL 0x01
+#define HID_ITEM_TYPE_LOCAL 0x02
+#define HID_ITEM_TYPE_RESERVED 0x03
+//! @}
+
+/*! \name Special HID Report Descriptor Item Tags
+ */
+//! @{
+#define HID_ITEM_TAG_LONG_ITEM 0x0F
+//! @}
+
+/*! \name HID Report Descriptor Main Item Tags
+ */
+//! @{
+#define HID_MAIN_ITEM_TAG_INPUT 0x08
+#define HID_MAIN_ITEM_TAG_OUTPUT 0x09
+#define HID_MAIN_ITEM_TAG_FEATURE 0x0B
+#define HID_MAIN_ITEM_TAG_COLLECTION 0x0A
+#define HID_MAIN_ITEM_TAG_END_COLLECTION 0x0C
+//! @}
+
+/*! \name HID Report Descriptor Global Item Tags
+ */
+//! @{
+#define HID_GLOBAL_ITEM_TAG_USAGE_PAGE 0x00
+#define HID_GLOBAL_ITEM_TAG_LOGICAL_MINIMUM 0x01
+#define HID_GLOBAL_ITEM_TAG_LOGICAL_MAXIMUM 0x02
+#define HID_GLOBAL_ITEM_TAG_PHYSICAL_MINIMUM 0x03
+#define HID_GLOBAL_ITEM_TAG_PHYSICAL_MAXIMUM 0x04
+#define HID_GLOBAL_ITEM_TAG_UNIT_EXPONENT 0x05
+#define HID_GLOBAL_ITEM_TAG_UNIT 0x06
+#define HID_GLOBAL_ITEM_TAG_REPORT_SIZE 0x07
+#define HID_GLOBAL_ITEM_TAG_REPORT_ID 0x08
+#define HID_GLOBAL_ITEM_TAG_REPORT_COUNT 0x09
+#define HID_GLOBAL_ITEM_TAG_PUSH 0x0A
+#define HID_GLOBAL_ITEM_TAG_POP 0x0B
+//! @}
+
+/*! \name HID Report Descriptor Local Item Tags
+ */
+//! @{
+#define HID_LOCAL_ITEM_TAG_USAGE 0x00
+#define HID_LOCAL_ITEM_TAG_USAGE_MINIMUM 0x01
+#define HID_LOCAL_ITEM_TAG_USAGE_MAXIMUM 0x02
+#define HID_LOCAL_ITEM_TAG_DESIGNATOR_INDEX 0x03
+#define HID_LOCAL_ITEM_TAG_DESIGNATOR_MINIMUM 0x04
+#define HID_LOCAL_ITEM_TAG_DESIGNATOR_MAXIMUM 0x05
+#define HID_LOCAL_ITEM_TAG_STRING_INDEX 0x07
+#define HID_LOCAL_ITEM_TAG_STRING_MINIMUM 0x08
+#define HID_LOCAL_ITEM_TAG_STRING_MAXIMUM 0x09
+#define HID_LOCAL_ITEM_TAG_DELIMITER 0x0A
+//! @}
+
+
+//_____ D E F I N I T I O N S __________________________________________________
+
+//! HID descriptor.
+typedef
+#if (defined __ICCAVR32__)
+#pragma pack(1)
+#endif
+struct
+#if (defined __GNUC__)
+__attribute__((__packed__))
+#endif
+{
+ unsigned char bLength;
+ unsigned char bDescriptorType;
+ unsigned short bcdHID;
+ unsigned char bCountryCode;
+ unsigned char bNumDescriptors;
+ struct
+#if (defined __GNUC__)
+ __attribute__((__packed__))
+#endif
+ {
+ unsigned char bType;
+ unsigned short wLength;
+ } Descriptor[];
+}
+#if (defined __ICCAVR32__)
+#pragma pack()
+#endif
+hid_descriptor_t;
+
+//! HID report ID.
+typedef unsigned char hid_report_id_t;
+
+//! HID report descriptor item.
+typedef
+#if (defined __ICCAVR32__)
+#pragma pack(1)
+#endif
+union
+#if (defined __GNUC__)
+__attribute__((__packed__))
+#endif
+{
+ struct
+#if (defined __GNUC__)
+ __attribute__((__packed__))
+#endif
+ {
+ unsigned char bTag : 4;
+ unsigned char bType : 2;
+ unsigned char bSize : 2;
+ } header;
+ struct
+#if (defined __GNUC__)
+ __attribute__((__packed__))
+#endif
+ {
+ unsigned char bTag : 4;
+ unsigned char bType : 2;
+ unsigned char bSize : 2;
+ unsigned char data[];
+ } short_format;
+ struct
+#if (defined __GNUC__)
+ __attribute__((__packed__))
+#endif
+ {
+ unsigned char bTag : 4;
+ unsigned char bType : 2;
+ unsigned char bSize : 2;
+ unsigned char bDataSize;
+ unsigned char bLongItemTag;
+ unsigned char data[];
+ } long_format;
+}
+#if (defined __ICCAVR32__)
+#pragma pack()
+#endif
+hid_item_t;
+
+//! HID report descriptor short item data.
+typedef union
+{
+ unsigned long value;
+ union
+ {
+ struct
+ {
+ unsigned int : 23;
+ unsigned int buffered_bytes : 1;
+ unsigned int : 1;
+ unsigned int null_state : 1;
+ unsigned int no_preferred : 1;
+ unsigned int non_linear : 1;
+ unsigned int wrap : 1;
+ unsigned int relative : 1;
+ unsigned int variable : 1;
+ unsigned int constant : 1;
+ } input;
+ struct
+ {
+ unsigned int : 23;
+ unsigned int buffered_bytes : 1;
+ unsigned int volatile_ : 1;
+ unsigned int null_state : 1;
+ unsigned int no_preferred : 1;
+ unsigned int non_linear : 1;
+ unsigned int wrap : 1;
+ unsigned int relative : 1;
+ unsigned int variable : 1;
+ unsigned int constant : 1;
+ } output;
+ struct
+ {
+ unsigned int : 23;
+ unsigned int buffered_bytes : 1;
+ unsigned int volatile_ : 1;
+ unsigned int null_state : 1;
+ unsigned int no_preferred : 1;
+ unsigned int non_linear : 1;
+ unsigned int wrap : 1;
+ unsigned int relative : 1;
+ unsigned int variable : 1;
+ unsigned int constant : 1;
+ } feature;
+ enum
+ {
+ HID_COLLECTION_PHYSICAL = 0x00,
+ HID_COLLECTION_APPLICATION = 0x01,
+ HID_COLLECTION_LOGICAL = 0x02,
+ HID_COLLECTION_REPORT = 0x03,
+ HID_COLLECTION_NAMED_ARRAY = 0x04,
+ HID_COLLECTION_USAGE_SWITCH = 0x05,
+ HID_COLLECTION_USAGE_MODIFIER = 0x06
+ } collection;
+ } main;
+ union
+ {
+ unsigned int usage_page;
+ int logical_minimum;
+ int logical_maximum;
+ int physical_minimum;
+ int physical_maximum;
+ struct
+ {
+ unsigned int : 28;
+ int unit_exponent : 4;
+ };
+ struct
+ {
+ unsigned int : 4;
+ enum
+ {
+ HID_UNIT_LUMINOUS_INTENSITY_NONE = 0x0,
+ HID_UNIT_LUMINOUS_INTENSITY_CANDELA = 0x1
+ } luminous_intensity : 4;
+ enum
+ {
+ HID_UNIT_CURRENT_NONE = 0x0,
+ HID_UNIT_CURRENT_AMPERE = 0x1
+ } current : 4;
+ enum
+ {
+ HID_UNIT_TEMPERATURE_NONE = 0x0,
+ HID_UNIT_TEMPERATURE_KELVIN = 0x1,
+ HID_UNIT_TEMPERATURE_FAHRENHEIT = 0x3
+ } temperature : 4;
+ enum
+ {
+ HID_UNIT_TIME_NONE = 0x0,
+ HID_UNIT_TIME_SECONDS = 0x1
+ } time : 4;
+ enum
+ {
+ HID_UNIT_MASS_NONE = 0x0,
+ HID_UNIT_MASS_GRAM = 0x1,
+ HID_UNIT_MASS_SLUG = 0x3
+ } mass : 4;
+ enum
+ {
+ HID_UNIT_LENGTH_NONE = 0x0,
+ HID_UNIT_LENGTH_CENTIMETER = 0x1,
+ HID_UNIT_LENGTH_RADIANS = 0x2,
+ HID_UNIT_LENGTH_INCH = 0x3,
+ HID_UNIT_LENGTH_DEGREES = 0x4
+ } length : 4;
+ enum
+ {
+ HID_UNIT_SYSTEM_NONE = 0x0,
+ HID_UNIT_SYSTEM_SI_LINEAR = 0x1,
+ HID_UNIT_SYSTEM_SI_ROTATION = 0x2,
+ HID_UNIT_SYSTEM_ENGLISH_LINEAR = 0x3,
+ HID_UNIT_SYSTEM_ENGLISH_ROTATION = 0x4
+ } system : 4;
+ } unit;
+ unsigned int report_size;
+ unsigned int report_id;
+ unsigned int report_count;
+ } global;
+ union
+ {
+ unsigned int usage;
+ unsigned int usage_minimum;
+ unsigned int usage_maximum;
+ unsigned int designator_index;
+ unsigned int designator_minimum;
+ unsigned int designator_maximum;
+ unsigned int string_index;
+ unsigned int string_minimum;
+ unsigned int string_maximum;
+ enum
+ {
+ HID_DELIMITER_OPEN_SET = 0x01,
+ HID_DELIMITER_CLOSE_SET = 0x00
+ } delimiter;
+ } local;
+} hid_short_item_data_t;
+
+
+//_____ D E C L A R A T I O N S ________________________________________________
+
+
+#endif // _HID_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/class/hid/host_hid/host_hid.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/class/hid/host_hid/host_hid.c
new file mode 100644
index 0000000..d0c1799
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/class/hid/host_hid/host_hid.c
@@ -0,0 +1,314 @@
+/* This source file is part of the AVR Software Framework 2.0.0 release */
+
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Management of the generic host HID features.
+ *
+ * This file manages the generic host HID features.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+//_____ I N C L U D E S _______________________________________________________
+
+#include <stddef.h>
+#include "compiler.h"
+#include "conf_usb.h"
+#include "usb_task.h"
+#include "usb_host_task.h"
+#include "usb_host_enum.h"
+#include "hid.h"
+#include "host_hid.h"
+
+
+//_____ M A C R O S ____________________________________________________________
+
+
+//_____ D E F I N I T I O N S __________________________________________________
+
+//! HID report descriptor parser control structure.
+static struct
+{
+ size_t length;
+ const hid_item_t *item;
+} host_hid_report_descriptor_parser =
+{
+ 0,
+ NULL
+};
+
+
+//_____ D E C L A R A T I O N S ________________________________________________
+
+/*! \name Standard Requests Applied to HID
+ */
+//! @{
+
+
+Status_t host_hid_get_descriptor(U8 descriptor_type, U8 descriptor_index, U8 s_interface)
+{
+ Status_t status;
+ const hid_descriptor_t *hid_descriptor = (hid_descriptor_t *)&data_stage;
+ U8 i;
+
+ usb_request.bmRequestType = 0x81;
+ usb_request.bRequest = GET_DESCRIPTOR;
+ usb_request.wValue = descriptor_type << 8 | descriptor_index;
+ usb_request.wIndex = Get_interface_number(s_interface);
+ usb_request.wLength = SIZEOF_DATA_STAGE;
+ usb_request.incomplete_read = FALSE;
+
+ status = host_transfer_control(data_stage);
+
+ switch (descriptor_type)
+ {
+ case HID_DESCRIPTOR:
+ for (i = 0; i < hid_descriptor->bNumDescriptors; i++)
+ {
+ if (hid_descriptor->Descriptor[i].bType == HID_REPORT_DESCRIPTOR)
+ {
+ host_hid_report_descriptor_parser.length =
+ usb_format_usb_to_mcu_data(16, hid_descriptor->Descriptor[i].wLength);
+ break;
+ }
+ }
+ break;
+
+ case HID_REPORT_DESCRIPTOR:
+ host_hid_report_descriptor_parser.item = (hid_item_t *)&data_stage;
+ break;
+ }
+
+ return status;
+}
+
+
+Status_t host_hid_set_descriptor(U8 descriptor_type, U8 descriptor_index, U8 s_interface, U16 length)
+{
+ usb_request.bmRequestType = 0x01;
+ usb_request.bRequest = SET_DESCRIPTOR;
+ usb_request.wValue = descriptor_type << 8 | descriptor_index;
+ usb_request.wIndex = Get_interface_number(s_interface);
+ usb_request.wLength = length;
+ usb_request.incomplete_read = FALSE;
+
+ return host_transfer_control(data_stage);
+}
+
+
+//! @}
+
+
+/*! \name HID-Specific Requests
+ */
+//! @{
+
+
+Status_t host_hid_get_report(U8 report_type, U8 report_id, U8 s_interface)
+{
+ usb_request.bmRequestType = 0xA1;
+ usb_request.bRequest = HID_GET_REPORT;
+ usb_request.wValue = report_type << 8 | report_id;
+ usb_request.wIndex = Get_interface_number(s_interface);
+ usb_request.wLength = SIZEOF_DATA_STAGE;
+ usb_request.incomplete_read = FALSE;
+
+ return host_transfer_control(data_stage);
+}
+
+
+Status_t host_hid_set_report(U8 report_type, U8 report_id, U8 s_interface, U16 length)
+{
+ usb_request.bmRequestType = 0x21;
+ usb_request.bRequest = HID_SET_REPORT;
+ usb_request.wValue = report_type << 8 | report_id;
+ usb_request.wIndex = Get_interface_number(s_interface);
+ usb_request.wLength = length;
+ usb_request.incomplete_read = FALSE;
+
+ return host_transfer_control(data_stage);
+}
+
+
+U8 host_hid_get_idle(U8 report_id, U8 s_interface)
+{
+ usb_request.bmRequestType = 0xA1;
+ usb_request.bRequest = HID_GET_IDLE;
+ usb_request.wValue = 0x00 << 8 | report_id;
+ usb_request.wIndex = Get_interface_number(s_interface);
+ usb_request.wLength = 0x0001;
+ usb_request.incomplete_read = FALSE;
+
+ host_transfer_control(data_stage);
+
+ return data_stage[0x00];
+}
+
+
+Status_t host_hid_set_idle(U8 duration_4_ms, U8 report_id, U8 s_interface)
+{
+ usb_request.bmRequestType = 0x21;
+ usb_request.bRequest = HID_SET_IDLE;
+ usb_request.wValue = duration_4_ms << 8 | report_id;
+ usb_request.wIndex = Get_interface_number(s_interface);
+ usb_request.wLength = 0x0000;
+ usb_request.incomplete_read = FALSE;
+
+ return host_transfer_control(data_stage);
+}
+
+
+U8 host_hid_get_protocol(U8 s_interface)
+{
+ usb_request.bmRequestType = 0xA1;
+ usb_request.bRequest = HID_GET_PROTOCOL;
+ usb_request.wValue = 0x0000;
+ usb_request.wIndex = Get_interface_number(s_interface);
+ usb_request.wLength = 0x0001;
+ usb_request.incomplete_read = FALSE;
+
+ host_transfer_control(data_stage);
+
+ return data_stage[0x00];
+}
+
+
+Status_t host_hid_set_protocol(U8 protocol, U8 s_interface)
+{
+ usb_request.bmRequestType = 0x21;
+ usb_request.bRequest = HID_SET_PROTOCOL;
+ usb_request.wValue = protocol;
+ usb_request.wIndex = Get_interface_number(s_interface);
+ usb_request.wLength = 0x0000;
+ usb_request.incomplete_read = FALSE;
+
+ return host_transfer_control(data_stage);
+}
+
+
+//! @}
+
+
+/*! \name HID Report Descriptor Parsing Functions
+ */
+//! @{
+
+
+Status_bool_t host_hid_get_item(host_hid_item_t *item)
+{
+ const hid_item_t *hid_item = host_hid_report_descriptor_parser.item;
+ U8 size;
+
+ if (host_hid_report_descriptor_parser.length <
+ (U8 *)&hid_item->header - (U8 *)hid_item +
+ sizeof(hid_item->header))
+ return FALSE;
+
+ item->type = hid_item->header.bType;
+
+ if (hid_item->header.bTag == HID_ITEM_TAG_LONG_ITEM)
+ {
+ if (host_hid_report_descriptor_parser.length <
+ (U8 *)&hid_item->long_format.bDataSize - (U8 *)hid_item +
+ sizeof(hid_item->long_format.bDataSize))
+ return FALSE;
+
+ size = hid_item->long_format.bDataSize;
+
+ if (host_hid_report_descriptor_parser.length <
+ (U8 *)&hid_item->long_format.data - (U8 *)hid_item +
+ size)
+ return FALSE;
+
+ item->tag = hid_item->long_format.bLongItemTag;
+
+ item->long_format = TRUE;
+
+ item->long_data.size = size;
+ item->long_data.data = &hid_item->long_format.data;
+
+ host_hid_report_descriptor_parser.length -=
+ (U8 *)&hid_item->long_format.data - (U8 *)hid_item +
+ size;
+
+ host_hid_report_descriptor_parser.item =
+ (hid_item_t *)&hid_item->long_format.data[size];
+ }
+ else
+ {
+ U8 i;
+
+ size = (hid_item->short_format.bSize) ?
+ 1 << (hid_item->short_format.bSize - 1) :
+ 0;
+
+ if (host_hid_report_descriptor_parser.length <
+ (U8 *)&hid_item->short_format.data - (U8 *)hid_item +
+ size)
+ return FALSE;
+
+ item->tag = hid_item->short_format.bTag;
+
+ item->long_format = FALSE;
+
+ item->short_data.value = 0x00000000;
+ for (i = 0; i < size; i++)
+ {
+ item->short_data.value = item->short_data.value << 8 |
+ hid_item->short_format.data[i];
+ }
+ item->short_data.value =
+ usb_format_usb_to_mcu_data(32, item->short_data.value <<
+ ((sizeof(U32) - size) << 3));
+
+ host_hid_report_descriptor_parser.length -=
+ (U8 *)&hid_item->short_format.data - (U8 *)hid_item +
+ size;
+
+ host_hid_report_descriptor_parser.item =
+ (hid_item_t *)&hid_item->short_format.data[size];
+ }
+
+ return TRUE;
+}
+
+
+//! @}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/class/hid/host_hid/host_hid.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/class/hid/host_hid/host_hid.h
new file mode 100644
index 0000000..68e66c3
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/class/hid/host_hid/host_hid.h
@@ -0,0 +1,213 @@
+/* This header file is part of the AVR Software Framework 2.0.0 release */
+
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Management of the generic host HID features.
+ *
+ * This file manages the generic host HID features.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _HOST_HID_H_
+#define _HOST_HID_H_
+
+
+//_____ I N C L U D E S ________________________________________________________
+
+#include "compiler.h"
+#include "hid.h"
+
+
+//_____ M A C R O S ____________________________________________________________
+
+
+//_____ D E F I N I T I O N S __________________________________________________
+
+//! HID report descriptor item.
+typedef struct
+{
+ U8 type;
+ U8 tag;
+ Bool long_format;
+ union
+ {
+ hid_short_item_data_t short_data;
+ struct
+ {
+ U8 size;
+ const void *data;
+ } long_data;
+ };
+} host_hid_item_t;
+
+
+//_____ D E C L A R A T I O N S ________________________________________________
+
+/*! \name Standard Requests Applied to HID
+ */
+//! @{
+
+/*! \brief Gets a HID class descriptor.
+ *
+ * \param descriptor_type Type of the descriptor to get.
+ * \param descriptor_index Index of the descriptor to get.
+ * \param s_interface The supported interface number of which to get the
+ * descriptor.
+ *
+ * \return Status.
+ */
+extern Status_t host_hid_get_descriptor(U8 descriptor_type, U8 descriptor_index, U8 s_interface);
+
+/*! \brief Sets a HID class descriptor.
+ *
+ * \param descriptor_type Type of the descriptor to set.
+ * \param descriptor_index Index of the descriptor to set.
+ * \param s_interface The supported interface number of which to set the
+ * descriptor.
+ * \param length Length of the descriptor to set.
+ *
+ * \return Status.
+ */
+extern Status_t host_hid_set_descriptor(U8 descriptor_type, U8 descriptor_index, U8 s_interface, U16 length);
+
+//! @}
+
+/*! \name HID-Specific Requests
+ */
+//! @{
+
+/*! \brief Gets a HID report.
+ *
+ * \param report_type Type of the report to get.
+ * \param report_id ID of the report to get.
+ * \param s_interface The supported interface number of which to get the report.
+ *
+ * \return Status.
+ */
+extern Status_t host_hid_get_report(U8 report_type, U8 report_id, U8 s_interface);
+
+/*! \brief Sets a HID report.
+ *
+ * \param report_type Type of the report to set.
+ * \param report_id ID of the report to set.
+ * \param s_interface The supported interface number of which to set the report.
+ * \param length Length of the report to set.
+ *
+ * \return Status.
+ */
+extern Status_t host_hid_set_report(U8 report_type, U8 report_id, U8 s_interface, U16 length);
+
+/*! \brief Reads the current idle rate for a particular Input report.
+ *
+ * \param report_id ID of the report of which to get the idle rate.
+ * \param s_interface The supported interface number of which to get the idle
+ * rate.
+ *
+ * \return Idle duration with a 4-ms resolution, or
+ * \c HID_IDLE_DURATION_INDEFINITE.
+ */
+extern U8 host_hid_get_idle(U8 report_id, U8 s_interface);
+
+/*! \brief Silences a particular report on the Interrupt In pipe until a new
+ * event occurs or the specified amount of time passes.
+ *
+ * \param duration_4_ms Idle duration with a 4-ms resolution, or
+ * \c HID_IDLE_DURATION_INDEFINITE.
+ * \param report_id ID of the report of which to set the idle rate (can be
+ * \c HID_REPORT_ID_ALL).
+ * \param s_interface The supported interface number of which to set the idle
+ * rate.
+ *
+ * \return Status.
+*/
+extern Status_t host_hid_set_idle(U8 duration_4_ms, U8 report_id, U8 s_interface);
+
+/*! \brief Reads which protocol is currently active (either the boot protocol or
+ * the report protocol).
+ *
+ * \param s_interface The supported interface number of which to get the
+ * protocol.
+ *
+ * \return Protocol: \c HID_BOOT_PROTOCOL or \c HID_REPORT_PROTOCOL.
+ *
+ * \note This request is supported by devices in the Boot subclass.
+ */
+extern U8 host_hid_get_protocol(U8 s_interface);
+
+/*! \brief Switches between the boot protocol and the report protocol (or vice
+ * versa).
+ *
+ * \param protocol Protocol: \c HID_BOOT_PROTOCOL or \c HID_REPORT_PROTOCOL.
+ * \param s_interface The supported interface number of which to set the
+ * protocol.
+ *
+ * \return Status.
+ *
+ * \note This request is supported by devices in the Boot subclass.
+ *
+ * \note When initialized, all devices default to the report protocol. However,
+ * the host should not make any assumptions about the device's state and
+ * should set the desired protocol whenever initializing a device.
+ */
+extern Status_t host_hid_set_protocol(U8 protocol, U8 s_interface);
+
+//! @}
+
+/*! \name HID Report Descriptor Parsing Functions
+ */
+//! @{
+
+/*! \brief Gets the next HID report descriptor item.
+ *
+ * \param item Pointer to the item structure to fill.
+ *
+ * \return Status.
+ *
+ * \note \ref host_hid_get_descriptor must have been called before this function
+ * for \c HID_DESCRIPTOR and \c HID_REPORT_DESCRIPTOR.
+ */
+extern Status_bool_t host_hid_get_item(host_hid_item_t *item);
+
+//! @}
+
+
+#endif // _HOST_HID_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/class/mass_storage/scsi_decoder/scsi_decoder.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/class/mass_storage/scsi_decoder/scsi_decoder.c
new file mode 100644
index 0000000..1c92aa6
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/class/mass_storage/scsi_decoder/scsi_decoder.c
@@ -0,0 +1,713 @@
+/* This source file is part of the AVR Software Framework 2.0.0 release */
+
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Management of the SCSI decoding.
+ *
+ * This file manages the SCSI decoding.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+//_____ I N C L U D E S ___________________________________________________
+
+#include "conf_usb.h"
+
+
+#if USB_DEVICE_FEATURE == ENABLED
+
+#include "scsi_decoder.h"
+#include "usb_drv.h"
+#include "ctrl_access.h"
+
+
+//_____ D E C L A R A T I O N S ____________________________________________
+
+extern U8 usb_LUN;
+extern U8 ms_endpoint;
+
+
+/*! \brief Writes the header of the MODE SENSE (6) and (10) commands.
+ *
+ * \param b_sense_10 Boolean indicating whether the (10) version of the
+ * command is requested:
+ * \arg \c TRUE to specify a MODE SENSE (10) command;
+ * \arg \c FALSE to specify a MODE SENSE (6) command.
+ * \param u8_data_length Data length in bytes.
+ */
+static void sbc_header_mode_sense(Bool b_sense_10, U8 u8_data_length);
+
+/*! \brief Writes the Error Recovery mode page.
+ *
+ * \param length Allocated data length in bytes.
+ */
+static void send_read_write_error_recovery_page(U8 length);
+
+/*! \brief Writes the Informational Exceptions Control mode page.
+ */
+static void send_informational_exceptions_page(void);
+
+
+//_____ D E F I N I T I O N S ______________________________________________
+
+U8 g_scsi_command[16];
+U8 g_scsi_status;
+U32 g_scsi_data_remaining;
+
+s_scsi_sense g_scsi_sense;
+
+U8 g_scsi_ep_ms_in;
+U8 g_scsi_ep_ms_out;
+
+//! INQUIRY data.
+static const sbc_st_std_inquiry_data sbc_std_inquiry_data =
+{
+ // Byte 0: 0x00.
+ 0, // PeripheralQualifier: Currently connected.
+ 0, // DeviceType: Direct-access device.
+
+ // Byte 1: 0x80.
+ 1, // RMB: Medium is removable (this bit must be at 1, else the medium isn't seen by Windows).
+ 0, // Reserved1.
+
+ // Byte 2: 0x00.
+ 0, // Version: Device not compliant to any standard.
+
+ // Byte 3: 0x02.
+ 0, // AERC.
+ 0, // Obsolete0.
+ 0, // NormACA.
+ 2, // Response data format.
+
+ // Byte 4: 0x1F.
+ // Byte 5: 0x00.
+ // Byte 6: 0x00.
+ // Reserved4[3].
+ {
+ 0x1F, // Additional Length (n - 4).
+ 0, // SCCS: SCC supported.
+ 0
+ },
+
+ // Byte 7: 0x00.
+ 0, // RelativeAddressing.
+ 0, // Wide32Bit.
+ 0, // Wide16Bit.
+ 0, // Synchronous.
+ 0, // LinkedCommands.
+ 0, // Reserved5.
+ 0, // CommandQueue.
+ 0, // SoftReset.
+
+ SBC_VENDOR_ID,
+
+ SBC_PRODUCT_ID,
+
+ SBC_REVISION_ID
+};
+
+
+Bool scsi_decode_command(void)
+{
+ Bool status = FALSE;
+
+ switch (g_scsi_command[0]) // Check received command.
+ {
+ case SBC_CMD_TEST_UNIT_READY: // 0x00 - Mandatory.
+ status = sbc_test_unit_ready();
+ break;
+
+ case SBC_CMD_REQUEST_SENSE: // 0x03 - Mandatory.
+ status = sbc_request_sense();
+ break;
+
+ case SBC_CMD_INQUIRY: // 0x12 - Mandatory.
+ status = sbc_inquiry();
+ break;
+
+ case SBC_CMD_MODE_SENSE_6: // 0x1A - Optional.
+ status = sbc_mode_sense(FALSE);
+ break;
+
+ case SBC_CMD_PREVENT_ALLOW_MEDIUM_REMOVAL: // 0x1E - Optional.
+ status = sbc_prevent_allow_medium_removal();
+ break;
+
+ case SBC_CMD_READ_CAPACITY_10: // 0x25 - Mandatory.
+ status = sbc_read_capacity();
+ break;
+
+ case SBC_CMD_READ_10: // 0x28 - Mandatory.
+ Scsi_start_read_action();
+ status = sbc_read_10();
+ Scsi_stop_read_action();
+ break;
+
+ case SBC_CMD_WRITE_10: // 0x2A - Optional.
+ Scsi_start_write_action();
+ status = sbc_write_10();
+ Scsi_stop_write_action();
+ break;
+
+ case SBC_CMD_VERIFY_10: // 0x2F - Optional.
+ status = TRUE;
+ sbc_lun_status_is_good();
+ break;
+
+ case SBC_CMD_MODE_SENSE_10: // 0x5A - Optional.
+ status = sbc_mode_sense(TRUE);
+ break;
+
+ case SBC_CMD_START_STOP_UNIT: // 0x1B - Ignored. This command is used by the Linux 2.4 kernel,
+ break; // for which we can not reply INVALID COMMAND, otherwise the disk will not mount.
+
+ case SBC_CMD_FORMAT_UNIT: // 0x04 - Mandatory.
+ case SBC_CMD_REASSIGN_BLOCKS: // 0x07 - Optional.
+ case SBC_CMD_READ_6: // 0x08 - Mandatory.
+ case SBC_CMD_WRITE_6: // 0x0A - Optional.
+ case SBC_CMD_MODE_SELECT_6: // 0x15 - Optional.
+ case SBC_CMD_RECEIVE_DIAGNOSTIC_RESULTS: // 0x1C - Optional.
+ case SBC_CMD_SEND_DIAGNOSTIC: // 0x1D - Mandatory.
+ case SBC_CMD_WRITE_AND_VERIFY_10: // 0x2E - Optional.
+ case SBC_CMD_PREFETCH_10: // 0x34 - Optional.
+ case SBC_CMD_SYNCHRONIZE_CACHE_10: // 0x35 - Optional.
+ case SBC_CMD_READ_DEFECT_DATA_10: // 0x37 - Optional.
+ case SBC_CMD_WRITE_BUFFER: // 0x3B - Optional.
+ case SBC_CMD_READ_BUFFER: // 0x3C - Optional.
+ case SBC_CMD_READ_LONG_10: // 0x3E - Optional.
+ case SBC_CMD_WRITE_LONG_10: // 0x3F - Optional.
+ case SBC_CMD_WRITE_SAME_10: // 0x41 - Optional.
+ case SBC_CMD_LOG_SELECT: // 0x4C - Optional.
+ case SBC_CMD_LOG_SENSE: // 0x4D - Optional.
+ case SBC_CMD_XDWRITE_10: // 0x50 - Optional.
+ case SBC_CMD_XPWRITE_10: // 0x51 - Optional.
+ case SBC_CMD_XDREAD_10: // 0x52 - Optional.
+ case SBC_CMD_XDWRITEREAD_10: // 0x53 - Optional.
+ case SBC_CMD_MODE_SELECT_10: // 0x55 - Optional.
+ case SBC_CMD_PERSISTENT_RESERVE_IN: // 0x5E - Optional.
+ case SBC_CMD_PERSISTENT_RESERVE_OUT: // 0x5F - Optional.
+ case SBC_CMD_EXTENDED_COPY: // 0x83 - Optional.
+ case SBC_CMD_RECEIVE_COPY_RESULTS: // 0x84 - Optional.
+ case SBC_CMD_ACCESS_CONTROL_IN: // 0x86 - Optional.
+ case SBC_CMD_ACCESS_CONTROL_OUT: // 0x87 - Optional.
+ case SBC_CMD_READ_16: // 0x88 - Optional.
+ case SBC_CMD_WRITE_16: // 0x8A - Optional.
+ case SBC_CMD_READ_ATTRIBUTE: // 0x8C - Optional.
+ case SBC_CMD_WRITE_ATTRIBUTE: // 0x8D - Optional.
+ case SBC_CMD_WRITE_AND_VERIFY_16: // 0x8E - Optional.
+ case SBC_CMD_VERIFY_16: // 0x8F - Optional.
+ case SBC_CMD_PREFETCH_16: // 0x90 - Optional.
+ case SBC_CMD_SYNCHRONIZE_CACHE_16: // 0x91 - Optional.
+ case SBC_CMD_WRITE_SAME_16: // 0x93 - Optional.
+ case SBC_CMD_REPORT_LUNS: // 0xA0 - Mandator.
+ case SBC_CMD_READ_12: // 0xA8 - Optional.
+ case SBC_CMD_WRITE_12: // 0xAA - Optional.
+ case SBC_CMD_WRITE_AND_VERIFY_12: // 0xAE - Optional.
+ case SBC_CMD_VERIFY_12: // 0xAF - Optional.
+ case SBC_CMD_READ_DEFECT_DATA_12: // 0xB7 - Optional.
+ default:
+ // Command not supported.
+ Sbc_send_failed();
+ Sbc_build_sense(SBC_SENSE_KEY_ILLEGAL_REQUEST, SBC_ASC_INVALID_COMMAND_OPERATION_CODE, 0x00);
+ break;
+ }
+
+ return status;
+}
+
+
+Bool sbc_test_unit_ready(void)
+{
+ switch (mem_test_unit_ready(usb_LUN))
+ {
+ case CTRL_GOOD:
+ sbc_lun_status_is_good();
+ break;
+
+ case CTRL_NO_PRESENT:
+ sbc_lun_status_is_not_present();
+ break;
+
+ case CTRL_BUSY:
+ sbc_lun_status_is_busy_or_change();
+ break;
+
+ case CTRL_FAIL:
+ default:
+ sbc_lun_status_is_fail();
+ break;
+ }
+
+ return TRUE;
+}
+
+
+Bool sbc_request_sense(void)
+{
+ U8 allocation_length;
+ U8 request_sense_output[18]; // The maximal size of request is 17.
+
+ allocation_length = min(g_scsi_command[4], sizeof(request_sense_output));
+
+ if( allocation_length != 0 )
+ {
+ // Initialize the request sense data.
+ request_sense_output[ 0] = SBC_RESPONSE_CODE_SENSE; // 0x70.
+ request_sense_output[ 1] = 0x00; // Obsolete.
+ request_sense_output[ 2] = g_scsi_sense.key;
+
+ request_sense_output[ 3] = 0x00; // For direct access media, Information field.
+ request_sense_output[ 4] = 0x00; // Give the unsigned logical block.
+ request_sense_output[ 5] = 0x00; // Address associated with the sense key.
+ request_sense_output[ 6] = 0x00;
+
+ request_sense_output[ 7] = SBC_ADDITIONAL_SENSE_LENGTH; // Device shall not adjust the additional sense length to reflect truncation.
+ request_sense_output[ 8] = SBC_COMMAND_SPECIFIC_INFORMATION_3;
+ request_sense_output[ 9] = SBC_COMMAND_SPECIFIC_INFORMATION_2;
+ request_sense_output[10] = SBC_COMMAND_SPECIFIC_INFORMATION_1;
+ request_sense_output[11] = SBC_COMMAND_SPECIFIC_INFORMATION_0;
+
+ request_sense_output[12] = g_scsi_sense.asc;
+ request_sense_output[13] = g_scsi_sense.ascq;
+
+ request_sense_output[14] = SBC_FIELD_REPLACEABLE_UNIT_CODE;
+ request_sense_output[15] = SBC_SENSE_KEY_SPECIFIC_2;
+ request_sense_output[16] = SBC_SENSE_KEY_SPECIFIC_1;
+ request_sense_output[17] = SBC_SENSE_KEY_SPECIFIC_0;
+
+ // Send the request data.
+ Usb_reset_endpoint_fifo_access(g_scsi_ep_ms_in);
+ usb_write_ep_txpacket(g_scsi_ep_ms_in, request_sense_output, allocation_length, NULL);
+ Sbc_valid_write_usb(allocation_length);
+ // MSC Compliance - Wait end of all transmitions on USB line, because a stall may be send after data
+ while( 0 != Usb_nb_busy_bank(EP_MS_IN) );
+ }
+ sbc_lun_status_is_good();
+ return (allocation_length == g_scsi_command[4]);
+}
+
+
+Bool sbc_inquiry(void)
+{
+ U8 allocation_length;
+
+ // CMDT or EPVD bit is not 0 or PAGE or OPERATION CODE fields != 0x00.
+ if ((g_scsi_command[1] & 0x03) || g_scsi_command[2])
+ {
+ sbc_lun_status_is_cdb_field();
+ return FALSE;
+ }
+
+ // Send standard INQUIRY data (bytes 0 to (allocation_length - 1)).
+ allocation_length = min(g_scsi_command[4], sizeof(sbc_st_std_inquiry_data));
+ if( allocation_length != 0 )
+ {
+ while (!Is_usb_in_ready(g_scsi_ep_ms_in))
+ {
+ if(!Is_usb_endpoint_enabled(g_scsi_ep_ms_in))
+ return FALSE; // USB Reset
+ }
+ Usb_reset_endpoint_fifo_access(g_scsi_ep_ms_in);
+ usb_write_ep_txpacket(g_scsi_ep_ms_in, &sbc_std_inquiry_data,
+ allocation_length, NULL);
+ Sbc_valid_write_usb(allocation_length);
+ // MSC Compliance - Wait end of all transmitions on USB line, because a stall may be send after data
+ while( 0 != Usb_nb_busy_bank(EP_MS_IN) );
+ }
+ sbc_lun_status_is_good();
+ return (allocation_length == g_scsi_command[4]);
+}
+
+
+Bool sbc_mode_sense(Bool b_sense_10)
+{
+ U8 allocation_length = (b_sense_10) ? g_scsi_command[8] : g_scsi_command[4];
+
+ // Switch for page code.
+ switch (g_scsi_command[2] & SBC_MSK_PAGE_CODE)
+ {
+ case SBC_PAGE_CODE_READ_WRITE_ERROR_RECOVERY:
+ sbc_header_mode_sense(b_sense_10, SBC_MODE_DATA_LENGTH_READ_WRITE_ERROR_RECOVERY);
+ send_read_write_error_recovery_page(allocation_length);
+ Sbc_valid_write_usb(SBC_MODE_DATA_LENGTH_READ_WRITE_ERROR_RECOVERY + 1);
+ break;
+
+ // Page Code: Informational Exceptions Control mode page.
+ case SBC_PAGE_CODE_INFORMATIONAL_EXCEPTIONS:
+ sbc_header_mode_sense(b_sense_10, SBC_MODE_DATA_LENGTH_INFORMATIONAL_EXCEPTIONS);
+ send_informational_exceptions_page();
+ Sbc_valid_write_usb(SBC_MODE_DATA_LENGTH_INFORMATIONAL_EXCEPTIONS + 1);
+ break;
+
+ case SBC_PAGE_CODE_ALL:
+ if( b_sense_10 ) {
+ sbc_header_mode_sense( b_sense_10 , (allocation_length < (SBC_MODE_DATA_LENGTH_CODE_ALL+2))? (allocation_length-2) : SBC_MODE_DATA_LENGTH_CODE_ALL );
+ }else{
+ sbc_header_mode_sense( b_sense_10 , (allocation_length < (SBC_MODE_DATA_LENGTH_CODE_ALL+1))? (allocation_length-1) : SBC_MODE_DATA_LENGTH_CODE_ALL );
+ }
+ if (allocation_length == ((b_sense_10) ? 8 : 4))
+ {
+ Sbc_valid_write_usb(allocation_length);
+ break;
+ }
+ // Send page by ascending order code.
+ send_read_write_error_recovery_page(allocation_length); // 12 bytes.
+ if (allocation_length > 12)
+ {
+ send_informational_exceptions_page(); // 12 bytes.
+ Sbc_valid_write_usb(SBC_MODE_DATA_LENGTH_CODE_ALL + 1);
+ }
+ else
+ {
+ Sbc_valid_write_usb(allocation_length);
+ }
+ break;
+
+ default:
+ sbc_lun_status_is_cdb_field();
+ return FALSE;
+ }
+
+ sbc_lun_status_is_good();
+
+ return TRUE;
+}
+
+
+Bool sbc_prevent_allow_medium_removal(void)
+{
+ sbc_lun_status_is_good();
+ return TRUE;
+}
+
+
+Bool sbc_read_capacity(void)
+{
+ U32 mem_size_nb_sector;
+
+ switch (mem_read_capacity(usb_LUN, &mem_size_nb_sector))
+ {
+ case CTRL_GOOD:
+ Usb_reset_endpoint_fifo_access(g_scsi_ep_ms_in);
+
+ // Return nb block.
+ Usb_write_endpoint_data(g_scsi_ep_ms_in, 32,
+ sbc_format_mcu_to_scsi_data(32, mem_size_nb_sector));
+
+ // Return block size (= 512 bytes).
+ Usb_write_endpoint_data(g_scsi_ep_ms_in, 32,
+ Sbc_format_mcu_to_scsi_data(32, 512));
+
+ Sbc_valid_write_usb(SBC_READ_CAPACITY_LENGTH);
+ sbc_lun_status_is_good();
+ return TRUE;
+
+ case CTRL_NO_PRESENT:
+ sbc_lun_status_is_not_present();
+ break;
+
+ case CTRL_BUSY:
+ sbc_lun_status_is_busy_or_change();
+ break;
+
+ case CTRL_FAIL:
+ default:
+ sbc_lun_status_is_fail();
+ break;
+ }
+ return FALSE;
+}
+
+
+Bool sbc_read_10(void)
+{
+ U32 mass_addr; // Read/write block address.
+ U16 mass_size; // Read/write number of blocks.
+
+ // Read address.
+ MSB0W(mass_addr) = g_scsi_command[2];
+ MSB1W(mass_addr) = g_scsi_command[3];
+ MSB2W(mass_addr) = g_scsi_command[4];
+ MSB3W(mass_addr) = g_scsi_command[5];
+
+ // Read size.
+ MSB(mass_size) = g_scsi_command[7];
+ LSB(mass_size) = g_scsi_command[8];
+
+ if( ms_endpoint == EP_MS_OUT )
+ {
+ // Error in command field
+ sbc_lun_status_is_cdb_field();
+ return FALSE;
+ }
+
+ // No data to transfer.
+ if( 0 == g_scsi_data_remaining )
+ {
+ if( mass_size == (g_scsi_data_remaining/512) )
+ {
+ sbc_lun_status_is_good();
+ }else{
+ sbc_lun_status_is_cdb_field();
+ }
+ return TRUE;
+ }
+
+ switch (memory_2_usb(usb_LUN, mass_addr, g_scsi_data_remaining/512))
+ {
+ case CTRL_GOOD:
+ if( mass_size == (g_scsi_data_remaining/512) )
+ {
+ sbc_lun_status_is_good();
+ }else{
+ sbc_lun_status_is_cdb_field();
+ }
+ g_scsi_data_remaining = 0;
+ return TRUE;
+
+ case CTRL_NO_PRESENT:
+ sbc_lun_status_is_not_present();
+ break;
+
+ case CTRL_BUSY:
+ sbc_lun_status_is_busy_or_change();
+ break;
+
+ case CTRL_FAIL:
+ default:
+ sbc_lun_status_is_fail();
+ break;
+ }
+
+ return FALSE;
+}
+
+
+Bool sbc_write_10(void)
+{
+ U32 mass_addr; // Read/write block address.
+ U16 mass_size; // Read/write number of blocks.
+
+ // Read address.
+ MSB0W(mass_addr) = g_scsi_command[2];
+ MSB1W(mass_addr) = g_scsi_command[3];
+ MSB2W(mass_addr) = g_scsi_command[4];
+ MSB3W(mass_addr) = g_scsi_command[5];
+
+ // Read size.
+ MSB(mass_size) = g_scsi_command[7];
+ LSB(mass_size) = g_scsi_command[8];
+
+ if( ms_endpoint == EP_MS_IN )
+ {
+ // Error in command field
+ sbc_lun_status_is_cdb_field();
+ return FALSE;
+ }
+
+ // No data to transfer.
+ if( 0 == g_scsi_data_remaining )
+ {
+ if( mass_size == (g_scsi_data_remaining/512) )
+ {
+ sbc_lun_status_is_good();
+ }else{
+ sbc_lun_status_is_cdb_field();
+ }
+ return TRUE;
+ }
+
+ if (mem_wr_protect(usb_LUN))
+ {
+ sbc_lun_status_is_protected();
+ return FALSE;
+ }
+
+ switch (usb_2_memory(usb_LUN, mass_addr, g_scsi_data_remaining/512 ))
+ {
+ case CTRL_GOOD:
+ if( mass_size == (g_scsi_data_remaining/512) )
+ {
+ sbc_lun_status_is_good();
+ }else{
+ sbc_lun_status_is_cdb_field();
+ }
+ g_scsi_data_remaining = 0;
+ return TRUE;
+
+ case CTRL_NO_PRESENT:
+ sbc_lun_status_is_not_present();
+ break;
+
+ case CTRL_BUSY:
+ sbc_lun_status_is_busy_or_change();
+ break;
+
+ case CTRL_FAIL:
+ default:
+ sbc_lun_status_is_fail();
+ break;
+ }
+ return FALSE;
+}
+
+
+static void sbc_header_mode_sense(Bool b_sense_10, U8 u8_data_length)
+{
+ Usb_reset_endpoint_fifo_access(g_scsi_ep_ms_in);
+
+ // Send data length.
+ if (b_sense_10)
+ {
+ Usb_write_endpoint_data(g_scsi_ep_ms_in, 8, 0);
+ }
+ Usb_write_endpoint_data(g_scsi_ep_ms_in, 8, u8_data_length);
+
+ // Send device type.
+ Usb_write_endpoint_data(g_scsi_ep_ms_in, 8, SBC_MEDIUM_TYPE);
+
+ // Write protect status.
+ Usb_write_endpoint_data(g_scsi_ep_ms_in, 8,
+ (mem_wr_protect(usb_LUN)) ? SBC_DEV_SPEC_PARAM_WR_PROTECT :
+ SBC_DEV_SPEC_PARAM_WR_ENABLE);
+
+ if (b_sense_10)
+ {
+ // Reserved.
+ Usb_write_endpoint_data(g_scsi_ep_ms_in, 16, 0);
+ }
+
+ // Send block descriptor length.
+ if (b_sense_10)
+ {
+ Usb_write_endpoint_data(g_scsi_ep_ms_in, 8, 0);
+ }
+ Usb_write_endpoint_data(g_scsi_ep_ms_in, 8, SBC_BLOCK_DESCRIPTOR_LENGTH);
+}
+
+
+static void send_read_write_error_recovery_page(U8 length)
+{
+ Usb_write_endpoint_data(g_scsi_ep_ms_in, 8, SBC_PAGE_CODE_READ_WRITE_ERROR_RECOVERY);
+
+ // Page Length.
+ Usb_write_endpoint_data(g_scsi_ep_ms_in, 8, SBC_PAGE_LENGTH_READ_WRITE_ERROR_RECOVERY);
+ Usb_write_endpoint_data(g_scsi_ep_ms_in, 8, 0x80);
+ Usb_write_endpoint_data(g_scsi_ep_ms_in, 8, SBC_READ_RETRY_COUNT);
+ Usb_write_endpoint_data(g_scsi_ep_ms_in, 8, 0x00);
+ Usb_write_endpoint_data(g_scsi_ep_ms_in, 8, 0x00);
+ Usb_write_endpoint_data(g_scsi_ep_ms_in, 8, 0x00);
+ // Reserved.
+ Usb_write_endpoint_data(g_scsi_ep_ms_in, 8, 0x00);
+
+ if (length > 12)
+ {
+ Usb_write_endpoint_data(g_scsi_ep_ms_in, 8, SBC_WRITE_RETRY_COUNT);
+ Usb_write_endpoint_data(g_scsi_ep_ms_in, 8, 0x00);
+ Usb_write_endpoint_data(g_scsi_ep_ms_in, 16,
+ Sbc_format_mcu_to_scsi_data(16, SBC_RECOVERY_TIME_LIMIT));
+ }
+}
+
+
+static void send_informational_exceptions_page(void)
+{
+ // Page Code: Informational Exceptions Control mode page.
+ Usb_write_endpoint_data(g_scsi_ep_ms_in, 8, SBC_PAGE_CODE_INFORMATIONAL_EXCEPTIONS);
+
+ // Page Length.
+ Usb_write_endpoint_data(g_scsi_ep_ms_in, 8, SBC_PAGE_LENGTH_INFORMATIONAL_EXCEPTIONS);
+ // ..., test bit = 0, ...
+ Usb_write_endpoint_data(g_scsi_ep_ms_in, 8, 0x00);
+ // MRIE = 0x05.
+ Usb_write_endpoint_data(g_scsi_ep_ms_in, 8, SBC_MRIE_GENERATE_NO_SENSE);
+ // Interval Timer.
+ Usb_write_endpoint_data(g_scsi_ep_ms_in, 32,
+ Sbc_format_mcu_to_scsi_data(32, 0x00000000));
+ // Report Count.
+ Usb_write_endpoint_data(g_scsi_ep_ms_in, 32,
+ Sbc_format_mcu_to_scsi_data(32, 0x00000001));
+}
+
+
+void sbc_lun_status_is_good(void)
+{
+ Sbc_send_good();
+ Sbc_build_sense(SBC_SENSE_KEY_NO_SENSE, SBC_ASC_NO_ADDITIONAL_SENSE_INFORMATION, 0x00);
+}
+
+
+void sbc_lun_status_is_not_present(void)
+{
+ Sbc_send_failed();
+ Sbc_build_sense(SBC_SENSE_KEY_NOT_READY, SBC_ASC_MEDIUM_NOT_PRESENT, 0x00);
+}
+
+
+void sbc_lun_status_is_busy_or_change(void)
+{
+ Sbc_send_failed();
+ Sbc_build_sense(SBC_SENSE_KEY_UNIT_ATTENTION, SBC_ASC_NOT_READY_TO_READY_CHANGE, 0x00);
+}
+
+
+void sbc_lun_status_is_fail(void)
+{
+ Sbc_send_failed();
+ Sbc_build_sense(SBC_SENSE_KEY_HARDWARE_ERROR, SBC_ASC_NO_ADDITIONAL_SENSE_INFORMATION, 0x00);
+}
+
+
+void sbc_lun_status_is_protected(void)
+{
+ Sbc_send_failed();
+ Sbc_build_sense(SBC_SENSE_KEY_DATA_PROTECT, SBC_ASC_WRITE_PROTECTED, 0x00);
+}
+
+
+void sbc_lun_status_is_cdb_field(void)
+{
+ Sbc_send_failed();
+ Sbc_build_sense(SBC_SENSE_KEY_ILLEGAL_REQUEST, SBC_ASC_INVALID_FIELD_IN_CDB, 0x00);
+}
+
+
+#endif // USB_DEVICE_FEATURE == ENABLED
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/class/mass_storage/scsi_decoder/scsi_decoder.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/class/mass_storage/scsi_decoder/scsi_decoder.h
new file mode 100644
index 0000000..23fc7f5
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/class/mass_storage/scsi_decoder/scsi_decoder.h
@@ -0,0 +1,619 @@
+/* This header file is part of the AVR Software Framework 2.0.0 release */
+
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Management of the SCSI decoding.
+ *
+ * This file manages the SCSI decoding.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _SCSI_DECODER_H_
+#define _SCSI_DECODER_H_
+
+
+//_____ I N C L U D E S ____________________________________________________
+
+#include "conf_usb.h"
+#include "compiler.h"
+#include "preprocessor.h"
+
+
+//_____ D E F I N I T I O N S ______________________________________________
+
+/*! \name bmCBWFlags
+ */
+//! @{
+#define SBC_CMD_DIR_IN 0x80
+#define SBC_CMD_DIR_OUT 0x00
+//! @}
+
+/*! \name SCSI Commands
+ */
+//! @{
+#define SBC_CMD_TEST_UNIT_READY 0x00
+#define SBC_CMD_REQUEST_SENSE 0x03
+#define SBC_CMD_FORMAT_UNIT 0x04
+#define SBC_CMD_REASSIGN_BLOCKS 0x07
+#define SBC_CMD_READ_6 0x08
+#define SBC_CMD_WRITE_6 0x0A
+#define SBC_CMD_INQUIRY 0x12
+#define SBC_CMD_MODE_SELECT_6 0x15
+#define SBC_CMD_MODE_SENSE_6 0x1A
+#define SBC_CMD_START_STOP_UNIT 0x1B
+#define SBC_CMD_RECEIVE_DIAGNOSTIC_RESULTS 0x1C
+#define SBC_CMD_SEND_DIAGNOSTIC 0x1D
+#define SBC_CMD_PREVENT_ALLOW_MEDIUM_REMOVAL 0x1E
+#define SBC_CMD_READ_CAPACITY_10 0x25
+#define SBC_CMD_READ_10 0x28
+#define SBC_CMD_WRITE_10 0x2A
+#define SBC_CMD_WRITE_AND_VERIFY_10 0x2E
+#define SBC_CMD_VERIFY_10 0x2F
+#define SBC_CMD_PREFETCH_10 0x34
+#define SBC_CMD_SYNCHRONIZE_CACHE_10 0x35
+#define SBC_CMD_READ_DEFECT_DATA_10 0x37
+#define SBC_CMD_WRITE_BUFFER 0x3B
+#define SBC_CMD_READ_BUFFER 0x3C
+#define SBC_CMD_READ_LONG_10 0x3E
+#define SBC_CMD_WRITE_LONG_10 0x3F
+#define SBC_CMD_WRITE_SAME_10 0x41
+#define SBC_CMD_LOG_SELECT 0x4C
+#define SBC_CMD_LOG_SENSE 0x4D
+#define SBC_CMD_XDWRITE_10 0x50
+#define SBC_CMD_XPWRITE_10 0x51
+#define SBC_CMD_XDREAD_10 0x52
+#define SBC_CMD_XDWRITEREAD_10 0x53
+#define SBC_CMD_MODE_SELECT_10 0x55
+#define SBC_CMD_MODE_SENSE_10 0x5A
+#define SBC_CMD_PERSISTENT_RESERVE_IN 0x5E
+#define SBC_CMD_PERSISTENT_RESERVE_OUT 0x5F
+#define SBC_CMD_EXTENDED_COPY 0x83
+#define SBC_CMD_RECEIVE_COPY_RESULTS 0x84
+#define SBC_CMD_ACCESS_CONTROL_IN 0x86
+#define SBC_CMD_ACCESS_CONTROL_OUT 0x87
+#define SBC_CMD_READ_16 0x88
+#define SBC_CMD_WRITE_16 0x8A
+#define SBC_CMD_READ_ATTRIBUTE 0x8C
+#define SBC_CMD_WRITE_ATTRIBUTE 0x8D
+#define SBC_CMD_WRITE_AND_VERIFY_16 0x8E
+#define SBC_CMD_VERIFY_16 0x8F
+#define SBC_CMD_PREFETCH_16 0x90
+#define SBC_CMD_SYNCHRONIZE_CACHE_16 0x91
+#define SBC_CMD_WRITE_SAME_16 0x93
+#define SBC_CMD_REPORT_LUNS 0xA0
+#define SBC_CMD_READ_12 0xA8
+#define SBC_CMD_WRITE_12 0xAA
+#define SBC_CMD_WRITE_AND_VERIFY_12 0xAE
+#define SBC_CMD_VERIFY_12 0xAF
+#define SBC_CMD_READ_DEFECT_DATA_12 0xB7
+//! @}
+
+/*! \name Status Codes
+ */
+//! @{
+#define COMMAND_PASSED 0x00
+#define COMMAND_FAILED 0x01
+#define CHECK_CONDITION 0x02
+//! @}
+
+/*! \name Sense Key Definitions
+ */
+//! @{
+#define SBC_SENSE_KEY_NO_SENSE 0x00
+#define SBC_SENSE_KEY_RECOVERED_ERROR 0x01
+#define SBC_SENSE_KEY_NOT_READY 0x02
+#define SBC_SENSE_KEY_MEDIUM_ERROR 0x03
+#define SBC_SENSE_KEY_HARDWARE_ERROR 0x04
+#define SBC_SENSE_KEY_ILLEGAL_REQUEST 0x05
+#define SBC_SENSE_KEY_UNIT_ATTENTION 0x06
+#define SBC_SENSE_KEY_DATA_PROTECT 0x07
+#define SBC_SENSE_KEY_BLANK_CHECK 0x08
+#define SBC_SENSE_KEY_VENDOR_SPECIFIC 0x09
+#define SBC_SENSE_KEY_COPY_ABORTED 0x0A
+#define SBC_SENSE_KEY_ABORTED_COMMAND 0x0B
+#define SBC_SENSE_KEY_VOLUME_OVERFLOW 0x0D
+#define SBC_SENSE_KEY_MISCOMPARE 0x0E
+//! @}
+
+/*! \name Additional Sense Code Definitions
+ */
+//! @{
+#define SBC_ASC_NO_ADDITIONAL_SENSE_INFORMATION 0x00
+#define SBC_ASC_LOGICAL_UNIT_NOT_READY 0x04
+#define SBC_ASC_INVALID_FIELD_IN_CDB 0x24
+#define SBC_ASC_WRITE_PROTECTED 0x27
+#define SBC_ASC_FORMAT_ERROR 0x31
+#define SBC_ASC_INVALID_COMMAND_OPERATION_CODE 0x20
+#define SBC_ASC_NOT_READY_TO_READY_CHANGE 0x28
+#define SBC_ASC_MEDIUM_NOT_PRESENT 0x3A
+//! @}
+
+/*! \name Additional Sense Code Qualifier Definitions
+ */
+//! @{
+#define SBC_ASCQ_FORMAT_COMMAND_FAILED 0x01
+#define SBC_ASCQ_INITIALIZING_COMMAND_REQUIRED 0x02
+#define SBC_ASCQ_OPERATION_IN_PROGRESS 0x07
+//! @}
+
+/*! \name Fixed Format Sense Data
+ */
+//! @{
+#define SBC_RESPONSE_CODE_SENSE 0x70
+#define SBC_ADDITIONAL_SENSE_LENGTH 0x0A
+#define SBC_COMMAND_SPECIFIC_INFORMATION_3 0x00
+#define SBC_COMMAND_SPECIFIC_INFORMATION_2 0x00
+#define SBC_COMMAND_SPECIFIC_INFORMATION_1 0x00
+#define SBC_COMMAND_SPECIFIC_INFORMATION_0 0x00
+#define SBC_FIELD_REPLACEABLE_UNIT_CODE 0x00
+#define SBC_SENSE_KEY_SPECIFIC_2 0x00
+#define SBC_SENSE_KEY_SPECIFIC_1 0x00
+#define SBC_SENSE_KEY_SPECIFIC_0 0x00
+//! @}
+
+/*! \name MODE SENSE Bit-Masks
+ */
+//! @{
+#define SBC_MSK_DBD 0x08
+#define SBC_MSK_PAGE_CONTROL 0xC0
+#define SBC_MSK_PAGE_CODE 0x3F
+//! @}
+
+/*! \name Mode Page Codes for Direct-Access Block Devices
+ */
+//! @{
+#define SBC_PAGE_CODE_READ_WRITE_ERROR_RECOVERY 0x01
+#define SBC_PAGE_CODE_INFORMATIONAL_EXCEPTIONS 0x1C
+#define SBC_PAGE_CODE_ALL 0x3F
+//! @}
+
+/*! \name Mode Data Lengths for Direct-Access Block Devices
+ */
+//! @{
+#define SBC_MODE_DATA_LENGTH_READ_WRITE_ERROR_RECOVERY (SBC_PAGE_LENGTH_READ_WRITE_ERROR_RECOVERY + 2 + 3)
+#define SBC_MODE_DATA_LENGTH_INFORMATIONAL_EXCEPTIONS (SBC_PAGE_LENGTH_INFORMATIONAL_EXCEPTIONS + 2 + 3)
+#define SBC_MODE_DATA_LENGTH_CODE_ALL (SBC_PAGE_LENGTH_READ_WRITE_ERROR_RECOVERY + 2 +\
+ SBC_PAGE_LENGTH_INFORMATIONAL_EXCEPTIONS + 2 +\
+ SBC_BLOCK_DESCRIPTOR_LENGTH + 3)
+//! @}
+
+//! <tt>MEDIUM TYPE</tt> for direct-access block devices.
+#define SBC_MEDIUM_TYPE 0x00
+
+/*! \name <tt>DEVICE-SPECIFIC PARAMETER</tt> Write Protect (\c WP) Bit-Masks.
+ */
+//! @{
+#define SBC_DEV_SPEC_PARAM_WR_ENABLE 0x00
+#define SBC_DEV_SPEC_PARAM_WR_PROTECT 0x80
+//! @}
+
+//! MODE SENSE <tt>BLOCK DESCRIPTOR LENGTH</tt>.
+#define SBC_BLOCK_DESCRIPTOR_LENGTH 0x00
+
+/*! \name Mode Page Lengths for Direct-Access Block Devices
+ */
+//! @{
+#define SBC_PAGE_LENGTH_READ_WRITE_ERROR_RECOVERY 0x0A
+#define SBC_PAGE_LENGTH_INFORMATIONAL_EXCEPTIONS 0x0A
+//! @}
+
+/*! \name Read-Write Error Recovery Mode Page Bit-Fields
+ */
+//! @{
+#define SBC_READ_RETRY_COUNT 0x03
+#define SBC_WRITE_RETRY_COUNT 0x80
+#define SBC_RECOVERY_TIME_LIMIT 0x0000
+//! @}
+
+//! Method of reporting informational exceptions (\c MRIE).
+#define SBC_MRIE_GENERATE_NO_SENSE 0x05
+
+//! READ CAPACITY (10) parameter data length.
+#define SBC_READ_CAPACITY_LENGTH 0x08
+
+
+/*! \name MCU <-> SCSI Endianism Conversion Macros
+ */
+//! @{
+
+#if LITTLE_ENDIAN_MCU
+
+ /*! \brief Converts 16-, 32- or 64-bit data from MCU to SCSI endianism.
+ *
+ * Depending on MCU endianism, swaps or not data bytes.
+ *
+ * \param width Data width in bits: 16, 32 or 64.
+ * \param data 16-, 32- or 64-bit data to format.
+ *
+ * \return Formatted 16-, 32- or 64-bit data.
+ *
+ * \note More optimized if only used with values known at compile time.
+ */
+ #define Sbc_format_mcu_to_scsi_data(width, data) (TPASTE2(Swap, width)(data))
+
+ /*! \brief Converts 16-, 32- or 64-bit data from SCSI to MCU endianism.
+ *
+ * Depending on MCU endianism, swaps or not data bytes.
+ *
+ * \param width Data width in bits: 16, 32 or 64.
+ * \param data 16-, 32- or 64-bit data to format.
+ *
+ * \return Formatted 16-, 32- or 64-bit data.
+ *
+ * \note More optimized if only used with values known at compile time.
+ */
+ #define Sbc_format_scsi_to_mcu_data(width, data) (TPASTE2(Swap, width)(data))
+
+ /*! \brief Converts 16-, 32- or 64-bit data from MCU to SCSI endianism.
+ *
+ * Depending on MCU endianism, swaps or not data bytes.
+ *
+ * \param width Data width in bits: 16, 32 or 64.
+ * \param data 16-, 32- or 64-bit data to format.
+ *
+ * \return Formatted 16-, 32- or 64-bit data.
+ *
+ * \note More optimized if only used with values unknown at compile time.
+ */
+ #define sbc_format_mcu_to_scsi_data(width, data) (TPASTE2(swap, width)(data))
+
+ /*! \brief Converts 16-, 32- or 64-bit data from SCSI to MCU endianism.
+ *
+ * Depending on MCU endianism, swaps or not data bytes.
+ *
+ * \param width Data width in bits: 16, 32 or 64.
+ * \param data 16-, 32- or 64-bit data to format.
+ *
+ * \return Formatted 16-, 32- or 64-bit data.
+ *
+ * \note More optimized if only used with values unknown at compile time.
+ */
+ #define sbc_format_scsi_to_mcu_data(width, data) (TPASTE2(swap, width)(data))
+
+#else // BIG_ENDIAN_MCU
+
+ /*! \brief Converts 16-, 32- or 64-bit data from MCU to SCSI endianism.
+ *
+ * Depending on MCU endianism, swaps or not data bytes.
+ *
+ * \param width Data width in bits: 16, 32 or 64.
+ * \param data 16-, 32- or 64-bit data to format.
+ *
+ * \return Formatted 16-, 32- or 64-bit data.
+ *
+ * \note More optimized if only used with values known at compile time.
+ */
+ #define Sbc_format_mcu_to_scsi_data(width, data) ((TPASTE2(U, width))(data))
+
+ /*! \brief Converts 16-, 32- or 64-bit data from SCSI to MCU endianism.
+ *
+ * Depending on MCU endianism, swaps or not data bytes.
+ *
+ * \param width Data width in bits: 16, 32 or 64.
+ * \param data 16-, 32- or 64-bit data to format.
+ *
+ * \return Formatted 16-, 32- or 64-bit data.
+ *
+ * \note More optimized if only used with values known at compile time.
+ */
+ #define Sbc_format_scsi_to_mcu_data(width, data) ((TPASTE2(U, width))(data))
+
+ /*! \brief Converts 16-, 32- or 64-bit data from MCU to SCSI endianism.
+ *
+ * Depending on MCU endianism, swaps or not data bytes.
+ *
+ * \param width Data width in bits: 16, 32 or 64.
+ * \param data 16-, 32- or 64-bit data to format.
+ *
+ * \return Formatted 16-, 32- or 64-bit data.
+ *
+ * \note More optimized if only used with values unknown at compile time.
+ */
+ #define sbc_format_mcu_to_scsi_data(width, data) ((TPASTE2(U, width))(data))
+
+ /*! \brief Converts 16-, 32- or 64-bit data from SCSI to MCU endianism.
+ *
+ * Depending on MCU endianism, swaps or not data bytes.
+ *
+ * \param width Data width in bits: 16, 32 or 64.
+ * \param data 16-, 32- or 64-bit data to format.
+ *
+ * \return Formatted 16-, 32- or 64-bit data.
+ *
+ * \note More optimized if only used with values unknown at compile time.
+ */
+ #define sbc_format_scsi_to_mcu_data(width, data) ((TPASTE2(U, width))(data))
+
+#endif
+
+//! @}
+
+/*! \brief Sends the USB mass-storage endpoint FIFO and updates
+ * \ref g_scsi_data_remaining accordingly.
+ *
+ * \param length Number of bytes sent.
+ */
+#define Sbc_valid_write_usb(length) (Usb_ack_in_ready_send(g_scsi_ep_ms_in),\
+ g_scsi_data_remaining -= (length))
+
+/*! \name Status Macros
+ */
+//! @{
+
+/*! \brief Sets status to FAILED.
+ */
+#define Sbc_send_failed() (g_scsi_status = COMMAND_FAILED )
+
+/*! \brief Sets status to CHECK CONDITION.
+ */
+#define Sbc_send_check_condition() (g_scsi_status = CHECK_CONDITION)
+
+/*! \brief Sets status to GOOD.
+ */
+#define Sbc_send_good() (g_scsi_status = COMMAND_PASSED )
+
+//! @}
+
+/*! \brief Builds sense data.
+ *
+ * \param skey <tt>SENSE KEY</tt>.
+ * \param sasc <tt>ADDITIONAL SENSE CODE</tt>.
+ * \param sascq <tt>ADDITIONAL SENSE CODE QUALIFIER</tt>.
+ */
+#define Sbc_build_sense(skey, sasc, sascq) (g_scsi_sense.key = (skey),\
+ g_scsi_sense.asc = (sasc),\
+ g_scsi_sense.ascq = (sascq))
+
+
+//! Sense data.
+typedef struct
+{
+ U8 key; //!< <tt>SENSE KEY</tt>.
+ U8 asc; //!< <tt>ADDITIONAL SENSE CODE</tt>.
+ U8 ascq; //!< <tt>ADDITIONAL SENSE CODE QUALIFIER</tt>.
+} s_scsi_sense;
+
+//! INQUIRY data.
+typedef
+#if (defined __ICCAVR32__)
+#pragma pack(1)
+#endif
+struct
+#if (defined __GNUC__)
+__attribute__((__packed__))
+#endif
+{
+ unsigned int PeripheralQualifier : 3;
+ unsigned int DeviceType : 5;
+
+ unsigned int RemovableMedia : 1;
+ unsigned int Reserved1 : 7;
+
+ U8 Version ;
+
+ unsigned int AERC : 1;
+ unsigned int Obsolete0 : 1;
+ unsigned int NormACA : 1;
+ unsigned int Reserved3 : 5;
+
+ U8 Reserved4 [3];
+
+ unsigned int RelativeAddressing : 1;
+ unsigned int Wide32Bit : 1;
+ unsigned int Wide16Bit : 1;
+ unsigned int Synchronous : 1;
+ unsigned int LinkedCommands : 1;
+ unsigned int Reserved5 : 1;
+ unsigned int CommandQueue : 1;
+ unsigned int SoftReset : 1;
+
+ char g_sbc_vendor_id [8];
+
+ char g_sbc_product_id [16];
+
+ char g_sbc_revision_id [4];
+}
+#if __ICCAVR32__
+#pragma pack()
+#endif
+sbc_st_std_inquiry_data;
+
+
+//_____ D E C L A R A T I O N S ____________________________________________
+
+#if USB_DEVICE_FEATURE == ENABLED
+
+//! SCSI command buffer.
+extern U8 g_scsi_command[16];
+
+//! SCSI status.
+extern U8 g_scsi_status;
+
+//! Remaining data transfer length.
+extern U32 g_scsi_data_remaining;
+
+//! Sense data.
+extern s_scsi_sense g_scsi_sense;
+
+//! USB mass-storage IN endpoint.
+extern U8 g_scsi_ep_ms_in;
+
+//! USB mass-storage OUT endpoint.
+extern U8 g_scsi_ep_ms_out;
+
+/*! \brief Decodes and launches the execution of SCSI commands.
+ *
+ * \return Boolean indicating success.
+ */
+extern Bool scsi_decode_command(void);
+
+/*! \brief Manages the TEST UNIT READY command.
+ *
+ * The TEST UNIT READY command provides a means to check if the logical unit is
+ * ready. This is not a request for a self-test. If the logical unit is able to
+ * accept an appropriate medium-access command without returning CHECK CONDITION
+ * status, this command shall return a GOOD status. If the logical unit is
+ * unable to become operational or is in a state such that an application client
+ * action (e.g., START UNIT command) is required to make the logical unit ready,
+ * the command shall be terminated with CHECK CONDITION status, with the sense
+ * key set to NOT READY.
+ *
+ * \return Boolean indicating success.
+ */
+extern Bool sbc_test_unit_ready(void);
+
+/*! \brief Manages the REQUEST SENSE command.
+ *
+ * The REQUEST SENSE command requests that the device server transfer sense data
+ * to the application client.
+ *
+ * See \ref s_scsi_sense.
+ *
+ * \return Boolean indicating success.
+ */
+extern Bool sbc_request_sense(void);
+
+/*! \brief Manages the INQUIRY command.
+ *
+ * The INQUIRY command requests that information regarding the logical unit and
+ * SCSI target device be sent to the application client.
+ *
+ * See \ref sbc_st_std_inquiry_data.
+ *
+ * \return Boolean indicating success.
+ */
+extern Bool sbc_inquiry(void);
+
+/*! \brief Manages the MODE SENSE (6) and (10) commands.
+ *
+ * The MODE SENSE (6/10) commands provide a means for a device server to report
+ * parameters to an application client. They are complementary commands to the
+ * MODE SELECT (6/10) commands. Device servers that implement the MODE SENSE
+ * (6/10) commands shall also implement the MODE SELECT (6/10) commands.
+ *
+ * \param b_sense_10 Boolean indicating whether the (10) version of the command
+ * is requested:
+ * \arg \c TRUE to specify a MODE SENSE (10) command;
+ * \arg \c FALSE to specify a MODE SENSE (6) command.
+ *
+ * \return Boolean indicating success.
+ */
+extern Bool sbc_mode_sense(Bool b_sense_10);
+
+/*! \brief Manages the PREVENT ALLOW MEDIUM REMOVAL command.
+ *
+ * The PREVENT ALLOW MEDIUM REMOVAL command requests that the logical unit
+ * enable or disable the removal of the medium. The logical unit shall not allow
+ * medium removal if any initiator port currently has medium removal prevented.
+ *
+ * \return Boolean indicating success.
+ */
+extern Bool sbc_prevent_allow_medium_removal(void);
+
+/*! \brief Manages the READ CAPACITY (10) command.
+ *
+ * The READ CAPACITY (10) command requests that the device server transfer 8
+ * bytes of parameter data describing the capacity and medium format of the
+ * direct-access block device to the data-in buffer. This command may be
+ * processed as if it has a HEAD OF QUEUE task attribute. If the logical unit
+ * supports protection information, the application client should use the READ
+ * CAPACITY (16) command instead of the READ CAPACITY (10) command.
+ *
+ * \return Boolean indicating success.
+ */
+extern Bool sbc_read_capacity(void);
+
+/*! \brief Manages the READ (10) command.
+ *
+ * The READ (10) command requests that the device server read the specified
+ * logical block(s) and transfer them to the data-in buffer. Each logical block
+ * read includes user data and, if the medium is formatted with protection
+ * information enabled, protection information. Each logical block transferred
+ * includes user data and may include protection information, based on the
+ * \c RDPROTECT field and the medium format. The most recent data value written
+ * in the addressed logical block shall be returned.
+ *
+ * \return Boolean indicating success.
+ */
+extern Bool sbc_read_10(void);
+
+/*! \brief Manages the WRITE (10) command.
+ *
+ * The WRITE (10) command requests that the device server transfer the specified
+ * logical block(s) from the data-out buffer and write them. Each logical block
+ * transferred includes user data and may include protection information, based
+ * on the \c WRPROTECT field and the medium format. Each logical block written
+ * includes user data and, if the medium is formatted with protection
+ * information enabled, protection information.
+ *
+ * \return Boolean indicating success.
+ */
+extern Bool sbc_write_10(void);
+
+/*! \brief Sends the status "GOOD".
+ */
+extern void sbc_lun_status_is_good(void);
+
+/*! \brief Sends the status "LUN not present".
+ */
+extern void sbc_lun_status_is_not_present(void);
+
+/*! \brief Sends the status "busy or changed".
+ */
+extern void sbc_lun_status_is_busy_or_change(void);
+
+/*! \brief Sends the status "FAILED".
+ */
+extern void sbc_lun_status_is_fail(void);
+
+/*! \brief Sends the status "FAILED because of write protection".
+ */
+extern void sbc_lun_status_is_protected(void);
+
+/*! \brief Sends the status "FAIL because CDB field is invalid".
+ */
+extern void sbc_lun_status_is_cdb_field(void);
+
+#endif // USB_DEVICE_FEATURE == ENABLED
+
+
+#endif // _SCSI_DECODER_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/compiler.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/compiler.h
new file mode 100644
index 0000000..bb27156
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/compiler.h
@@ -0,0 +1,1263 @@
+/* This header file is part of the AVR Software Framework 2.0.0 release */
+
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Compiler file for AVR32.
+ *
+ * This file defines commonly used types and macros.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _COMPILER_H_
+#define _COMPILER_H_
+
+
+/*_____ D E C L A R A T I O N S ____________________________________________*/
+
+
+#include <stddef.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <stdint.h>
+
+
+
+#define LITTLE_ENDIAN_MCU 1==1
+/*#undef __ICCAVR32__*/
+
+#define max(a,b) ((a) > (b) ? (a) : (b))
+
+extern uint32_t q_get_PRIMASK(void);
+extern void q_set_PRIMASK(uint32_t priMask);
+
+/* Enable interrupts */
+#define Enable_global_interrupt() __set_PRIMASK(0)
+#define sei() __set_PRIMASK(0)
+/* Disable interrupts */
+#define Disable_global_interrupt() __set_PRIMASK(1)
+#define cli() __set_PRIMASK(1)
+/* Disable IRQ interrupt and save status */
+#define sai() __get_PRIMASK()
+/* Restore interrupt status */
+#define rei(X) __set_PRIMASK(X)
+
+#define Is_global_interrupt_enabled() ((__get_PRIMASK()) ? 1 : 0)
+
+///*
+// * @brief Return the Priority Mask value
+// *
+// * @param none
+// * @return uint32_t PriMask
+// *
+// * Return the state of the priority mask bit from the priority mask
+// * register
+// */
+//#if defined(__GNUC__)
+//uint32_t q_get_PRIMASK(void)
+//{
+// uint32_t result=0;
+//
+// asm volatile ("MRS %0, primask" : "=r" (result) );
+// return(result);
+//}
+//#elif defined(__ICCARM__)
+//uint32_t q_get_PRIMASK(void)
+//{
+// __asm("mrs r0, primask");
+// __asm("bx lr");
+//}
+//#elif defined(__CC_ARM)
+///*__asm*/ uint32_t __get_PRIMASK(void)
+//{
+// uint32_t primask=0;
+//
+//// mrs r0, primask
+// return(primask);
+//}
+//#endif
+//
+///*
+// * @brief Set the Priority Mask value
+// *
+// * @param uint32_t PriMask
+// * @return none
+// *
+// * Set the priority mask bit in the priority mask register
+// */
+//#if defined(__GNUC__)
+//void q_set_PRIMASK(uint32_t priMask)
+//{
+// asm volatile ("MSR primask, %0" : : "r" (priMask) );
+//}
+//#elif defined(__ICCARM__)
+//void q_set_PRIMASK(uint32_t priMask)
+//{
+// __asm("msr primask, r0");
+// __asm("bx lr");
+//}
+//#elif defined(__CC_ARM)
+//__asm void __set_PRIMASK(uint32_t priMask)
+//{
+//// msr primask, r0
+//// bx lr
+//}
+//#endif
+
+
+
+#if (defined __ICCAVR32__)
+
+/*! \name Compiler Keywords
+ *
+ * Port of some keywords from GNU GCC for AVR32 to IAR Embedded Workbench for Atmel AVR32.
+ */
+//! @{
+#define __asm__ asm
+#define __inline__ inline
+#define __volatile__
+//! @}
+
+#endif
+
+/**
+ * \def barrier
+ * \brief Memory barrier
+ */
+#if defined(__GNUC__)
+# define barrier() asm volatile("" ::: "memory")
+#elif defined(__ICCAVR32__)
+# define barrier() asm ("")
+#endif
+
+/**
+ * \brief Emit the compiler pragma \a arg.
+ *
+ * \param arg The pragma directive as it would appear after \e \#pragma
+ * (i.e. not stringified).
+ */
+#define COMPILER_PRAGMA(arg) _Pragma(#arg)
+
+/**
+ * \def COMPILER_PACK_SET(alignment)
+ * \brief Set maximum alignment for subsequent struct and union
+ * definitions to \a alignment.
+ */
+#define COMPILER_PACK_SET(alignment) COMPILER_PRAGMA(pack(alignment))
+
+/**
+ * \def COMPILER_PACK_RESET()
+ * \brief Set default alignment for subsequent struct and union
+ * definitions.
+ */
+#define COMPILER_PACK_RESET() COMPILER_PRAGMA(pack())
+
+
+/**
+ * \brief Set word-aligned boundary.
+ */
+#if (defined __GNUC__)
+#define COMPILER_WORD_ALIGNED __attribute__((__aligned__(4)))
+#elif (defined __ICCAVR32__)
+#define COMPILER_WORD_ALIGNED COMPILER_PRAGMA(data_alignment = 4)
+#endif
+
+/**
+ * \name System Register Access
+ * @{
+ */
+#if defined(__GNUC__) || defined(__DOXYGEN__)
+/**
+ * \brief Get value of system register
+ *
+ * \param reg Address of the system register of which to get the value.
+ *
+ * \return Value of system register \a reg.
+ */
+# define sysreg_read(reg) __builtin_mfsr(reg)
+
+/**
+ * \brief Set value of system register
+ *
+ * \param reg Address of the system register of which to set the value.
+ * \param val Value to set the system register \a reg to.
+ */
+# define sysreg_write(reg, val) __builtin_mtsr(reg, val)
+
+#elif defined(__ICCAVR32__)
+# define sysreg_read(reg) __get_system_register(reg)
+# define sysreg_write(reg, val) __set_system_register(reg, val)
+#endif
+
+/* Deprecated definitions */
+#define Get_system_register(reg) sysreg_read(reg)
+#define Set_system_register(reg, val) sysreg_write((reg), (val))
+
+/*! \name Usual Types
+ */
+typedef unsigned char Bool; //!< Boolean.
+#ifndef __cplusplus
+#if !defined(__bool_true_false_are_defined)
+typedef unsigned char bool; //!< Boolean.
+#endif
+#endif
+typedef signed char S8 ; //!< 8-bit signed integer.
+typedef unsigned char U8 ; //!< 8-bit unsigned integer.
+typedef signed short int S16; //!< 16-bit signed integer.
+typedef unsigned short int U16; //!< 16-bit unsigned integer.
+typedef uint16_t le16_t;
+typedef uint16_t be16_t;
+typedef signed long int S32; //!< 32-bit signed integer.
+typedef unsigned long int U32; //!< 32-bit unsigned integer.
+typedef uint32_t le32_t;
+typedef uint32_t be32_t;
+typedef signed long long int S64; //!< 64-bit signed integer.
+typedef unsigned long long int U64; //!< 64-bit unsigned integer.
+typedef float F32; //!< 32-bit floating-point number.
+typedef double F64; //!< 64-bit floating-point number.
+typedef uint32_t iram_size_t;
+
+
+/* \name Status Types
+ */
+typedef Bool Status_bool_t; //!< Boolean status.
+typedef U8 Status_t; //!< 8-bit-coded status.
+
+
+/* \name Aliasing Aggregate Types
+ */
+
+/* 16-bit union. */
+typedef union
+{
+ S16 s16 ;
+ U16 u16 ;
+ S8 s8 [2];
+ U8 u8 [2];
+} Union16;
+
+/* 32-bit union.*/
+typedef union
+{
+ S32 s32 ;
+ U32 u32 ;
+ S16 s16[2];
+ U16 u16[2];
+ S8 s8 [4];
+ U8 u8 [4];
+} Union32;
+
+/* 64-bit union. */
+typedef union
+{
+ S64 s64 ;
+ U64 u64 ;
+ S32 s32[2];
+ U32 u32[2];
+ S16 s16[4];
+ U16 u16[4];
+ S8 s8 [8];
+ U8 u8 [8];
+} Union64;
+
+/* Union of pointers to 64-, 32-, 16- and 8-bit unsigned integers. */
+typedef union
+{
+ S64 *s64ptr;
+ U64 *u64ptr;
+ S32 *s32ptr;
+ U32 *u32ptr;
+ S16 *s16ptr;
+ U16 *u16ptr;
+ S8 *s8ptr ;
+ U8 *u8ptr ;
+} UnionPtr;
+
+//! Union of pointers to volatile 64-, 32-, 16- and 8-bit unsigned integers.
+typedef union
+{
+ volatile S64 *s64ptr;
+ volatile U64 *u64ptr;
+ volatile S32 *s32ptr;
+ volatile U32 *u32ptr;
+ volatile S16 *s16ptr;
+ volatile U16 *u16ptr;
+ volatile S8 *s8ptr ;
+ volatile U8 *u8ptr ;
+} UnionVPtr;
+
+//! Union of pointers to constant 64-, 32-, 16- and 8-bit unsigned integers.
+typedef union
+{
+ const S64 *s64ptr;
+ const U64 *u64ptr;
+ const S32 *s32ptr;
+ const U32 *u32ptr;
+ const S16 *s16ptr;
+ const U16 *u16ptr;
+ const S8 *s8ptr ;
+ const U8 *u8ptr ;
+} UnionCPtr;
+
+//! Union of pointers to constant volatile 64-, 32-, 16- and 8-bit unsigned integers.
+typedef union
+{
+ const volatile S64 *s64ptr;
+ const volatile U64 *u64ptr;
+ const volatile S32 *s32ptr;
+ const volatile U32 *u32ptr;
+ const volatile S16 *s16ptr;
+ const volatile U16 *u16ptr;
+ const volatile S8 *s8ptr ;
+ const volatile U8 *u8ptr ;
+} UnionCVPtr;
+
+//! Structure of pointers to 64-, 32-, 16- and 8-bit unsigned integers.
+typedef struct
+{
+ S64 *s64ptr;
+ U64 *u64ptr;
+ S32 *s32ptr;
+ U32 *u32ptr;
+ S16 *s16ptr;
+ U16 *u16ptr;
+ S8 *s8ptr ;
+ U8 *u8ptr ;
+} StructPtr;
+
+//! Structure of pointers to volatile 64-, 32-, 16- and 8-bit unsigned integers.
+typedef struct
+{
+ volatile S64 *s64ptr;
+ volatile U64 *u64ptr;
+ volatile S32 *s32ptr;
+ volatile U32 *u32ptr;
+ volatile S16 *s16ptr;
+ volatile U16 *u16ptr;
+ volatile S8 *s8ptr ;
+ volatile U8 *u8ptr ;
+} StructVPtr;
+
+//! Structure of pointers to constant 64-, 32-, 16- and 8-bit unsigned integers.
+typedef struct
+{
+ const S64 *s64ptr;
+ const U64 *u64ptr;
+ const S32 *s32ptr;
+ const U32 *u32ptr;
+ const S16 *s16ptr;
+ const U16 *u16ptr;
+ const S8 *s8ptr ;
+ const U8 *u8ptr ;
+} StructCPtr;
+
+//! Structure of pointers to constant volatile 64-, 32-, 16- and 8-bit unsigned integers.
+typedef struct
+{
+ const volatile S64 *s64ptr;
+ const volatile U64 *u64ptr;
+ const volatile S32 *s32ptr;
+ const volatile U32 *u32ptr;
+ const volatile S16 *s16ptr;
+ const volatile U16 *u16ptr;
+ const volatile S8 *s8ptr ;
+ const volatile U8 *u8ptr ;
+} StructCVPtr;
+
+//! @}
+
+//#endif // __AVR32_ABI_COMPILER__
+
+
+//_____ M A C R O S ________________________________________________________
+
+/*! \name Usual Constants
+ */
+//! @{
+#define DISABLE 0
+#define ENABLE 1
+#define DISABLED 0
+#define ENABLED 1
+#define OFF 0
+#define ON 1
+#define FALSE 0
+#define TRUE 1
+#ifndef __cplusplus
+#if !defined(__bool_true_false_are_defined)
+#define false FALSE
+#define true TRUE
+#endif
+#endif
+#define KO 0
+#define OK 1
+#define PASS 0
+#define FAIL 1
+#define LOW 0
+#define HIGH 1
+#define CLR 0
+#define SET 1
+//! @}
+
+
+//#ifdef __AVR32_ABI_COMPILER__ // Automatically defined when compiling for AVR32, not when assembling.
+
+//! \name Optimization Control
+//@{
+
+/**
+ * \def likely(exp)
+ * \brief The expression \a exp is likely to be true
+ */
+#ifndef likely
+# define likely(exp) (exp)
+#endif
+
+/**
+ * \def unlikely(exp)
+ * \brief The expression \a exp is unlikely to be true
+ */
+#ifndef unlikely
+# define unlikely(exp) (exp)
+#endif
+
+/**
+ * \def is_constant(exp)
+ * \brief Determine if an expression evaluates to a constant value.
+ *
+ * \param exp Any expression
+ *
+ * \return true if \a exp is constant, false otherwise.
+ */
+#ifdef __GNUC__
+# define is_constant(exp) __builtin_constant_p(exp)
+#else
+# define is_constant(exp) (0)
+#endif
+
+//! @}
+
+/*! \name Bit-Field Handling
+ */
+//! @{
+
+/*! \brief Reads the bits of a value specified by a given bit-mask.
+ *
+ * \param value Value to read bits from.
+ * \param mask Bit-mask indicating bits to read.
+ *
+ * \return Read bits.
+ */
+#define Rd_bits( value, mask) ((value) & (mask))
+
+/*! \brief Writes the bits of a C lvalue specified by a given bit-mask.
+ *
+ * \param lvalue C lvalue to write bits to.
+ * \param mask Bit-mask indicating bits to write.
+ * \param bits Bits to write.
+ *
+ * \return Resulting value with written bits.
+ */
+#define Wr_bits(lvalue, mask, bits) ((lvalue) = ((lvalue) & ~(mask)) |\
+ ((bits ) & (mask)))
+
+/*! \brief Tests the bits of a value specified by a given bit-mask.
+ *
+ * \param value Value of which to test bits.
+ * \param mask Bit-mask indicating bits to test.
+ *
+ * \return \c 1 if at least one of the tested bits is set, else \c 0.
+ */
+#define Tst_bits( value, mask) (Rd_bits((value), (mask)) != 0)
+
+/*! \brief Clears the bits of a C lvalue specified by a given bit-mask.
+ *
+ * \param lvalue C lvalue of which to clear bits.
+ * \param mask Bit-mask indicating bits to clear.
+ *
+ * \return Resulting value with cleared bits.
+ */
+#define Clr_bits(lvalue, mask) ((lvalue) &= ~(mask))
+
+/*! \brief Sets the bits of a C lvalue specified by a given bit-mask.
+ *
+ * \param lvalue C lvalue of which to set bits.
+ * \param mask Bit-mask indicating bits to set.
+ *
+ * \return Resulting value with set bits.
+ */
+#define Set_bits(lvalue, mask) ((lvalue) |= (mask))
+
+/*! \brief Toggles the bits of a C lvalue specified by a given bit-mask.
+ *
+ * \param lvalue C lvalue of which to toggle bits.
+ * \param mask Bit-mask indicating bits to toggle.
+ *
+ * \return Resulting value with toggled bits.
+ */
+#define Tgl_bits(lvalue, mask) ((lvalue) ^= (mask))
+
+/*! \brief Reads the bit-field of a value specified by a given bit-mask.
+ *
+ * \param value Value to read a bit-field from.
+ * \param mask Bit-mask indicating the bit-field to read.
+ *
+ * \return Read bit-field.
+ */
+#define Rd_bitfield( value, mask, offset) (Rd_bits( (value), (mask)) >> (offset))
+
+/*! \brief Writes the bit-field of a C lvalue specified by a given bit-mask.
+ *
+ * \param lvalue C lvalue to write a bit-field to.
+ * \param mask Bit-mask indicating the bit-field to write.
+ * \param bitfield Bit-field to write.
+ *
+ * \return Resulting value with written bit-field.
+ */
+#define Wr_bitfield(lvalue, mask, bitfield, offset) (Wr_bits((lvalue), (mask), (U32)(bitfield) << (offset)))
+//#define Wr_bitfield(lvalue, mask, bitfield) (Wr_bits(lvalue, mask, (U32)(bitfield) << ctz(mask)))
+
+//! @}
+
+
+/*! \brief This macro is used to test fatal errors.
+ *
+ * The macro tests if the expression is FALSE. If it is, a fatal error is
+ * detected and the application hangs up.
+ *
+ * \param expr Expression to evaluate and supposed to be nonzero.
+ */
+#ifdef _ASSERT_ENABLE_
+ #define Assert(expr) \
+ {\
+ if (!(expr)) while (TRUE);\
+ }
+#else
+ #define Assert(expr)
+#endif
+
+
+///*! \name Zero-Bit Counting
+// *
+// * Under AVR32-GCC, __builtin_clz and __builtin_ctz behave like macros when
+// * applied to constant expressions (values known at compile time), so they are
+// * more optimized than the use of the corresponding assembly instructions and
+// * they can be used as constant expressions e.g. to initialize objects having
+// * static storage duration, and like the corresponding assembly instructions
+// * when applied to non-constant expressions (values unknown at compile time), so
+// * they are more optimized than an assembly periphrasis. Hence, clz and ctz
+// * ensure a possible and optimized behavior for both constant and non-constant
+// * expressions.
+// */
+////! @{
+///*! \brief Counts the leading zero bits of the given value considered as a 32-bit integer.
+// *
+// * \param u Value of which to count the leading zero bits.
+// *
+// * \return The count of leading zero bits in \a u.
+// */
+//#if (defined __GNUC__)
+// #define clz(u) __builtin_clz(u)
+//#elif (defined __ICCAVR32__)
+// #if (__VER__ == 330) && (__SUBVERSION__ <= 1)
+// // __count_leading_zeros is broken and returns a value which is offset by
+// // -32 when called with a constant parameter.
+// #define clz(v) (0 == v ? 32 : (31 & __count_leading_zeros(v)))
+// #else
+// #define clz(v) __count_leading_zeros(v)
+// #endif
+//#elif (defined __ICCARM__)
+// #define clz(v) __count_leading_zeros(v)
+//#endif
+//
+///*! \brief Counts the trailing zero bits of the given value considered as a 32-bit integer.
+// *
+// * \param u Value of which to count the trailing zero bits.
+// *
+// * \return The count of trailing zero bits in \a u.
+// */
+//#if (defined __GNUC__)
+// #define ctz(u) __builtin_ctz(u)
+//#elif (defined __ICCAVR32__)
+// #define ctz(u) __count_trailing_zeros(u)
+//#endif
+//
+////! @}
+//
+////! \name Logarithmic functions
+////! @{
+//
+///**
+// * \internal
+// * Undefined function. Will cause a link failure if ilog2() is called
+// * with an invalid constant value.
+// */
+//int_fast8_t ilog2_undefined(void);
+//
+///**
+// * \brief Calculate the base-2 logarithm of a number rounded down to
+// * the nearest integer.
+// *
+// * \param x A 32-bit value
+// * \return The base-2 logarithm of \a x, or -1 if \a x is 0.
+// */
+//static inline int_fast8_t ilog2(uint32_t x)
+//{
+// if (is_constant(x))
+// return ((x) & (1ULL << 31) ? 31 :
+// (x) & (1ULL << 30) ? 30 :
+// (x) & (1ULL << 29) ? 29 :
+// (x) & (1ULL << 28) ? 28 :
+// (x) & (1ULL << 27) ? 27 :
+// (x) & (1ULL << 26) ? 26 :
+// (x) & (1ULL << 25) ? 25 :
+// (x) & (1ULL << 24) ? 24 :
+// (x) & (1ULL << 23) ? 23 :
+// (x) & (1ULL << 22) ? 22 :
+// (x) & (1ULL << 21) ? 21 :
+// (x) & (1ULL << 20) ? 20 :
+// (x) & (1ULL << 19) ? 19 :
+// (x) & (1ULL << 18) ? 18 :
+// (x) & (1ULL << 17) ? 17 :
+// (x) & (1ULL << 16) ? 16 :
+// (x) & (1ULL << 15) ? 15 :
+// (x) & (1ULL << 14) ? 14 :
+// (x) & (1ULL << 13) ? 13 :
+// (x) & (1ULL << 12) ? 12 :
+// (x) & (1ULL << 11) ? 11 :
+// (x) & (1ULL << 10) ? 10 :
+// (x) & (1ULL << 9) ? 9 :
+// (x) & (1ULL << 8) ? 8 :
+// (x) & (1ULL << 7) ? 7 :
+// (x) & (1ULL << 6) ? 6 :
+// (x) & (1ULL << 5) ? 5 :
+// (x) & (1ULL << 4) ? 4 :
+// (x) & (1ULL << 3) ? 3 :
+// (x) & (1ULL << 2) ? 2 :
+// (x) & (1ULL << 1) ? 1 :
+// (x) & (1ULL << 0) ? 0 :
+// ilog2_undefined());
+//
+// return 31 - clz(x);
+//}
+
+//! @}
+
+/*! \name Bit Reversing
+ */
+//! @{
+
+/*! \brief Reverses the bits of \a u8.
+ *
+ * \param u8 U8 of which to reverse the bits.
+ *
+ * \return Value resulting from \a u8 with reversed bits.
+ */
+#define bit_reverse8(u8) ((U8)(bit_reverse32((U8)(u8)) >> 24))
+
+/*! \brief Reverses the bits of \a u16.
+ *
+ * \param u16 U16 of which to reverse the bits.
+ *
+ * \return Value resulting from \a u16 with reversed bits.
+ */
+#define bit_reverse16(u16) ((U16)(bit_reverse32((U16)(u16)) >> 16))
+
+/*! \brief Reverses the bits of \a u32.
+ *
+ * \param u32 U32 of which to reverse the bits.
+ *
+ * \return Value resulting from \a u32 with reversed bits.
+ */
+#if (defined __GNUC__)
+ #define bit_reverse32(u32) \
+ (\
+ {\
+ unsigned int __value = (U32)(u32);\
+ __asm__ ("brev\t%0" : "+r" (__value) : : "cc");\
+ (U32)__value;\
+ }\
+ )
+#elif (defined __ICCAVR32__)
+ #define bit_reverse32(u32) ((U32)__bit_reverse((U32)(u32)))
+#endif
+
+/*! \brief Reverses the bits of \a u64.
+ *
+ * \param u64 U64 of which to reverse the bits.
+ *
+ * \return Value resulting from \a u64 with reversed bits.
+ */
+#define bit_reverse64(u64) ((U64)(((U64)bit_reverse32((U64)(u64) >> 32)) |\
+ ((U64)bit_reverse32((U64)(u64)) << 32)))
+
+//! @}
+
+
+/*! \name Alignment
+ */
+//! @{
+
+/*! \brief Tests alignment of the number \a val with the \a n boundary.
+ *
+ * \param val Input value.
+ * \param n Boundary.
+ *
+ * \return \c 1 if the number \a val is aligned with the \a n boundary, else \c 0.
+ */
+#define Test_align(val, n ) (!Tst_bits( (val), (n) - 1 ) )
+
+/*! \brief Gets alignment of the number \a val with respect to the \a n boundary.
+ *
+ * \param val Input value.
+ * \param n Boundary.
+ *
+ * \return Alignment of the number \a val with respect to the \a n boundary.
+ */
+#define Get_align( val, n ) ( Rd_bits( (val), (n) - 1 ) )
+
+/*! \brief Sets alignment of the lvalue number \a lval to \a alg with respect to the \a n boundary.
+ *
+ * \param lval Input/output lvalue.
+ * \param n Boundary.
+ * \param alg Alignment.
+ *
+ * \return New value of \a lval resulting from its alignment set to \a alg with respect to the \a n boundary.
+ */
+#define Set_align(lval, n, alg) ( Wr_bits((lval), (n) - 1, (alg)) )
+
+/*! \brief Aligns the number \a val with the upper \a n boundary.
+ *
+ * \param val Input value.
+ * \param n Boundary.
+ *
+ * \return Value resulting from the number \a val aligned with the upper \a n boundary.
+ */
+#define Align_up( val, n ) (((val) + ((n) - 1)) & ~((n) - 1))
+
+/*! \brief Aligns the number \a val with the lower \a n boundary.
+ *
+ * \param val Input value.
+ * \param n Boundary.
+ *
+ * \return Value resulting from the number \a val aligned with the lower \a n boundary.
+ */
+#define Align_down(val, n ) ( (val) & ~((n) - 1))
+
+//! @}
+
+
+/*! \name Mathematics
+ *
+ * The same considerations as for clz and ctz apply here but AVR32-GCC does not
+ * provide built-in functions to access the assembly instructions abs, min and
+ * max and it does not produce them by itself in most cases, so two sets of
+ * macros are defined here:
+ * - Abs, Min and Max to apply to constant expressions (values known at
+ * compile time);
+ * - abs, min and max to apply to non-constant expressions (values unknown at
+ * compile time).
+ */
+//! @{
+
+/*! \brief Takes the absolute value of \a a.
+ *
+ * \param a Input value.
+ *
+ * \return Absolute value of \a a.
+ *
+ * \note More optimized if only used with values known at compile time.
+ */
+#define Abs(a) (((a) < 0 ) ? -(a) : (a))
+
+/*! \brief Takes the minimal value of \a a and \a b.
+ *
+ * \param a Input value.
+ * \param b Input value.
+ *
+ * \return Minimal value of \a a and \a b.
+ *
+ * \note More optimized if only used with values known at compile time.
+ */
+#define Min(a, b) (((a) < (b)) ? (a) : (b))
+
+/*! \brief Takes the maximal value of \a a and \a b.
+ *
+ * \param a Input value.
+ * \param b Input value.
+ *
+ * \return Maximal value of \a a and \a b.
+ *
+ * \note More optimized if only used with values known at compile time.
+ */
+#define Max(a, b) (((a) > (b)) ? (a) : (b))
+
+/*! \brief Takes the absolute value of \a a.
+ *
+ * \param a Input value.
+ *
+ * \return Absolute value of \a a.
+ *
+ * \note More optimized if only used with values unknown at compile time.
+ */
+#if (defined __GNUC__)
+ #define abs(a) \
+ (\
+ {\
+ int __value = (a);\
+ __asm__ ("abs\t%0" : "+r" (__value) : : "cc");\
+ __value;\
+ }\
+ )
+#elif (defined __ICCAVR32__)
+ #define abs(a) Abs(a)
+#endif
+
+/*! \brief Takes the minimal value of \a a and \a b.
+ *
+ * \param a Input value.
+ * \param b Input value.
+ *
+ * \return Minimal value of \a a and \a b.
+ *
+ * \note More optimized if only used with values unknown at compile time.
+ */
+#if (defined __GNUC__)
+ #define min(a, b) \
+ (\
+ {\
+ int __value, __arg_a = (a), __arg_b = (b);\
+ __asm__ ("min\t%0, %1, %2" : "=r" (__value) : "r" (__arg_a), "r" (__arg_b));\
+ __value;\
+ }\
+ )
+#elif (defined __ICCAVR32__)
+ #define min(a, b) __min(a, b)
+#endif
+
+/*! \brief Takes the maximal value of \a a and \a b.
+ *
+ * \param a Input value.
+ * \param b Input value.
+ *
+ * \return Maximal value of \a a and \a b.
+ *
+ * \note More optimized if only used with values unknown at compile time.
+ */
+#if (defined __GNUC__)
+ #define max(a, b) \
+ (\
+ {\
+ int __value, __arg_a = (a), __arg_b = (b);\
+ __asm__ ("max\t%0, %1, %2" : "=r" (__value) : "r" (__arg_a), "r" (__arg_b));\
+ __value;\
+ }\
+ )
+#elif (defined __ICCAVR32__)
+ #define max(a, b) __max(a, b)
+#endif
+
+//! @}
+
+
+/*! \brief Calls the routine at address \a addr.
+ *
+ * It generates a long call opcode.
+ *
+ * For example, `Long_call(0x80000000)' generates a software reset on a UC3 if
+ * it is invoked from the CPU supervisor mode.
+ *
+ * \param addr Address of the routine to call.
+ *
+ * \note It may be used as a long jump opcode in some special cases.
+ */
+#define Long_call(addr) ((*(void (*)(void))(addr))())
+
+/*! \brief Resets the CPU by software.
+ *
+ * \warning It shall not be called from the CPU application mode.
+ */
+#if (defined __GNUC__)
+ #define Reset_CPU() \
+ (\
+ {\
+ __asm__ __volatile__ (\
+ "lddpc r9, 3f\n\t"\
+ "mfsr r8, %[SR]\n\t"\
+ "bfextu r8, r8, %[SR_M_OFFSET], %[SR_M_SIZE]\n\t"\
+ "cp.w r8, 0b001\n\t"\
+ "breq 0f\n\t"\
+ "sub r8, pc, $ - 1f\n\t"\
+ "pushm r8-r9\n\t"\
+ "rete\n"\
+ "0:\n\t"\
+ "mtsr %[SR], r9\n"\
+ "1:\n\t"\
+ "mov r0, 0\n\t"\
+ "mov r1, 0\n\t"\
+ "mov r2, 0\n\t"\
+ "mov r3, 0\n\t"\
+ "mov r4, 0\n\t"\
+ "mov r5, 0\n\t"\
+ "mov r6, 0\n\t"\
+ "mov r7, 0\n\t"\
+ "mov r8, 0\n\t"\
+ "mov r9, 0\n\t"\
+ "mov r10, 0\n\t"\
+ "mov r11, 0\n\t"\
+ "mov r12, 0\n\t"\
+ "mov sp, 0\n\t"\
+ "stdsp sp[0], sp\n\t"\
+ "ldmts sp, sp\n\t"\
+ "mov lr, 0\n\t"\
+ "lddpc pc, 2f\n\t"\
+ ".balign 4\n"\
+ "2:\n\t"\
+ ".word _start\n"\
+ "3:\n\t"\
+ ".word %[RESET_SR]"\
+ :\
+ : [SR] "i" (AVR32_SR),\
+ [SR_M_OFFSET] "i" (AVR32_SR_M_OFFSET),\
+ [SR_M_SIZE] "i" (AVR32_SR_M_SIZE),\
+ [RESET_SR] "i" (AVR32_SR_GM_MASK | AVR32_SR_EM_MASK | (AVR32_SR_M_SUP << AVR32_SR_M_OFFSET))\
+ );\
+ }\
+ )
+#elif (defined __ICCAVR32__)
+ #define Reset_CPU() \
+ {\
+ extern void *volatile __program_start;\
+ __asm__ __volatile__ (\
+ "mov r7, LWRD(__program_start)\n\t"\
+ "orh r7, HWRD(__program_start)\n\t"\
+ "mov r9, LWRD("ASTRINGZ(AVR32_SR_GM_MASK | AVR32_SR_EM_MASK | (AVR32_SR_M_SUP << AVR32_SR_M_OFFSET))")\n\t"\
+ "orh r9, HWRD("ASTRINGZ(AVR32_SR_GM_MASK | AVR32_SR_EM_MASK | (AVR32_SR_M_SUP << AVR32_SR_M_OFFSET))")\n\t"\
+ "mfsr r8, "ASTRINGZ(AVR32_SR)"\n\t"\
+ "bfextu r8, r8, "ASTRINGZ(AVR32_SR_M_OFFSET)", "ASTRINGZ(AVR32_SR_M_SIZE)"\n\t"\
+ "cp.w r8, 001b\n\t"\
+ "breq $ + 10\n\t"\
+ "sub r8, pc, -12\n\t"\
+ "pushm r8-r9\n\t"\
+ "rete\n\t"\
+ "mtsr "ASTRINGZ(AVR32_SR)", r9\n\t"\
+ "mov r0, 0\n\t"\
+ "mov r1, 0\n\t"\
+ "mov r2, 0\n\t"\
+ "mov r3, 0\n\t"\
+ "mov r4, 0\n\t"\
+ "mov r5, 0\n\t"\
+ "mov r6, 0\n\t"\
+ "st.w r0[4], r7\n\t"\
+ "mov r7, 0\n\t"\
+ "mov r8, 0\n\t"\
+ "mov r9, 0\n\t"\
+ "mov r10, 0\n\t"\
+ "mov r11, 0\n\t"\
+ "mov r12, 0\n\t"\
+ "mov sp, 0\n\t"\
+ "stdsp sp[0], sp\n\t"\
+ "ldmts sp, sp\n\t"\
+ "mov lr, 0\n\t"\
+ "ld.w pc, lr[4]"\
+ );\
+ __program_start;\
+ }
+#endif
+
+
+
+
+/*! \name CPU Status Register Access
+ */
+//! @{
+
+/*! \brief Tells whether exceptions are globally enabled.
+ *
+ * \return \c 1 if exceptions are globally enabled, else \c 0.
+ */
+#define Is_global_exception_enabled() (!Tst_bits(Get_system_register(AVR32_SR), AVR32_SR_EM_MASK))
+
+/*! \brief Disables exceptions globally.
+ */
+#if (defined __GNUC__)
+ #define Disable_global_exception() ({__asm__ __volatile__ ("ssrf\t%0" : : "i" (AVR32_SR_EM_OFFSET));})
+#elif (defined __ICCAVR32__)
+ #define Disable_global_exception() (__set_status_flag(AVR32_SR_EM_OFFSET))
+#endif
+
+/*! \brief Enables exceptions globally.
+ */
+#if (defined __GNUC__)
+ #define Enable_global_exception() ({__asm__ __volatile__ ("csrf\t%0" : : "i" (AVR32_SR_EM_OFFSET));})
+#elif (defined __ICCAVR32__)
+ #define Enable_global_exception() (__clear_status_flag(AVR32_SR_EM_OFFSET))
+#endif
+
+//! @}
+
+
+/*! \name Debug Register Access
+ */
+//! @{
+
+/*! \brief Gets the value of the \a dbgreg debug register.
+ *
+ * \param dbgreg Address of the debug register of which to get the value.
+ *
+ * \return Value of the \a dbgreg debug register.
+ */
+#if (defined __GNUC__)
+ #define Get_debug_register(dbgreg) __builtin_mfdr(dbgreg)
+#elif (defined __ICCAVR32__)
+ #define Get_debug_register(dbgreg) __get_debug_register(dbgreg)
+#endif
+
+/*! \brief Sets the value of the \a dbgreg debug register to \a value.
+ *
+ * \param dbgreg Address of the debug register of which to set the value.
+ * \param value Value to set the \a dbgreg debug register to.
+ */
+#if (defined __GNUC__)
+ #define Set_debug_register(dbgreg, value) __builtin_mtdr(dbgreg, value)
+#elif (defined __ICCAVR32__)
+ #define Set_debug_register(dbgreg, value) __set_debug_register(dbgreg, value)
+#endif
+
+//! @}
+
+
+/*! \name Force Assembly Inline Code Section
+ */
+//! @{
+#if (defined __GNUC__)
+#define __always_inline __attribute__((__always_inline__))
+#elif (defined __ICCAVR32__)
+#define __always_inline _Pragma("inline=forced")
+#endif
+//! @}
+
+/*! \name MCU Endianism Handling
+ * AVR32 is MCU big endianism.
+ */
+//! @{
+#define MSB(u16) (((U8 *)&(u16))[0]) //!< Most significant byte of \a u16.
+#define LSB(u16) (((U8 *)&(u16))[1]) //!< Least significant byte of \a u16.
+
+#define MSH(u32) (((U16 *)&(u32))[0]) //!< Most significant half-word of \a u32.
+#define LSH(u32) (((U16 *)&(u32))[1]) //!< Least significant half-word of \a u32.
+#define MSB0W(u32) (((U8 *)&(u32))[0]) //!< Most significant byte of 1st rank of \a u32.
+#define MSB1W(u32) (((U8 *)&(u32))[1]) //!< Most significant byte of 2nd rank of \a u32.
+#define MSB2W(u32) (((U8 *)&(u32))[2]) //!< Most significant byte of 3rd rank of \a u32.
+#define MSB3W(u32) (((U8 *)&(u32))[3]) //!< Most significant byte of 4th rank of \a u32.
+#define LSB3W(u32) MSB0W(u32) //!< Least significant byte of 4th rank of \a u32.
+#define LSB2W(u32) MSB1W(u32) //!< Least significant byte of 3rd rank of \a u32.
+#define LSB1W(u32) MSB2W(u32) //!< Least significant byte of 2nd rank of \a u32.
+#define LSB0W(u32) MSB3W(u32) //!< Least significant byte of 1st rank of \a u32.
+
+#define MSW(u64) (((U32 *)&(u64))[0]) //!< Most significant word of \a u64.
+#define LSW(u64) (((U32 *)&(u64))[1]) //!< Least significant word of \a u64.
+#define MSH0(u64) (((U16 *)&(u64))[0]) //!< Most significant half-word of 1st rank of \a u64.
+#define MSH1(u64) (((U16 *)&(u64))[1]) //!< Most significant half-word of 2nd rank of \a u64.
+#define MSH2(u64) (((U16 *)&(u64))[2]) //!< Most significant half-word of 3rd rank of \a u64.
+#define MSH3(u64) (((U16 *)&(u64))[3]) //!< Most significant half-word of 4th rank of \a u64.
+#define LSH3(u64) MSH0(u64) //!< Least significant half-word of 4th rank of \a u64.
+#define LSH2(u64) MSH1(u64) //!< Least significant half-word of 3rd rank of \a u64.
+#define LSH1(u64) MSH2(u64) //!< Least significant half-word of 2nd rank of \a u64.
+#define LSH0(u64) MSH3(u64) //!< Least significant half-word of 1st rank of \a u64.
+#define MSB0D(u64) (((U8 *)&(u64))[0]) //!< Most significant byte of 1st rank of \a u64.
+#define MSB1D(u64) (((U8 *)&(u64))[1]) //!< Most significant byte of 2nd rank of \a u64.
+#define MSB2D(u64) (((U8 *)&(u64))[2]) //!< Most significant byte of 3rd rank of \a u64.
+#define MSB3D(u64) (((U8 *)&(u64))[3]) //!< Most significant byte of 4th rank of \a u64.
+#define MSB4D(u64) (((U8 *)&(u64))[4]) //!< Most significant byte of 5th rank of \a u64.
+#define MSB5D(u64) (((U8 *)&(u64))[5]) //!< Most significant byte of 6th rank of \a u64.
+#define MSB6D(u64) (((U8 *)&(u64))[6]) //!< Most significant byte of 7th rank of \a u64.
+#define MSB7D(u64) (((U8 *)&(u64))[7]) //!< Most significant byte of 8th rank of \a u64.
+#define LSB7D(u64) MSB0D(u64) //!< Least significant byte of 8th rank of \a u64.
+#define LSB6D(u64) MSB1D(u64) //!< Least significant byte of 7th rank of \a u64.
+#define LSB5D(u64) MSB2D(u64) //!< Least significant byte of 6th rank of \a u64.
+#define LSB4D(u64) MSB3D(u64) //!< Least significant byte of 5th rank of \a u64.
+#define LSB3D(u64) MSB4D(u64) //!< Least significant byte of 4th rank of \a u64.
+#define LSB2D(u64) MSB5D(u64) //!< Least significant byte of 3rd rank of \a u64.
+#define LSB1D(u64) MSB6D(u64) //!< Least significant byte of 2nd rank of \a u64.
+#define LSB0D(u64) MSB7D(u64) //!< Least significant byte of 1st rank of \a u64.
+
+#define LE16(x) Swap16(x)
+#define le16_to_cpu(x) swap16(x)
+#define cpu_to_le16(x) swap16(x)
+#define LE16_TO_CPU(x) Swap16(x)
+#define CPU_TO_LE16(x) Swap16(x)
+
+#define be16_to_cpu(x) (x)
+#define cpu_to_be16(x) (x)
+#define BE16_TO_CPU(x) (x)
+#define CPU_TO_BE16(x) (x)
+
+#define le32_to_cpu(x) swap32(x)
+#define cpu_to_le32(x) swap32(x)
+#define LE32_TO_CPU(x) Swap32(x)
+#define CPU_TO_LE32(x) Swap32(x)
+
+#define be32_to_cpu(x) (x)
+#define cpu_to_be32(x) (x)
+#define BE32_TO_CPU(x) (x)
+#define CPU_TO_BE32(x) (x)
+//! @}
+
+
+/*! \name Endianism Conversion
+ *
+ * The same considerations as for clz and ctz apply here but AVR32-GCC's
+ * __builtin_bswap_16 and __builtin_bswap_32 do not behave like macros when
+ * applied to constant expressions, so two sets of macros are defined here:
+ * - Swap16, Swap32 and Swap64 to apply to constant expressions (values known
+ * at compile time);
+ * - swap16, swap32 and swap64 to apply to non-constant expressions (values
+ * unknown at compile time).
+ */
+//! @{
+
+/*! \brief Toggles the endianism of \a u16 (by swapping its bytes).
+ *
+ * \param u16 U16 of which to toggle the endianism.
+ *
+ * \return Value resulting from \a u16 with toggled endianism.
+ *
+ * \note More optimized if only used with values known at compile time.
+ */
+#define Swap16(u16) ((U16)(((U16)(u16) >> 8) |\
+ ((U16)(u16) << 8)))
+
+/*! \brief Toggles the endianism of \a u32 (by swapping its bytes).
+ *
+ * \param u32 U32 of which to toggle the endianism.
+ *
+ * \return Value resulting from \a u32 with toggled endianism.
+ *
+ * \note More optimized if only used with values known at compile time.
+ */
+#define Swap32(u32) ((U32)(((U32)Swap16((U32)(u32) >> 16)) |\
+ ((U32)Swap16((U32)(u32)) << 16)))
+
+/*! \brief Toggles the endianism of \a u64 (by swapping its bytes).
+ *
+ * \param u64 U64 of which to toggle the endianism.
+ *
+ * \return Value resulting from \a u64 with toggled endianism.
+ *
+ * \note More optimized if only used with values known at compile time.
+ */
+#define Swap64(u64) ((U64)(((U64)Swap32((U64)(u64) >> 32)) |\
+ ((U64)Swap32((U64)(u64)) << 32)))
+
+/*! \brief Toggles the endianism of \a u16 (by swapping its bytes).
+ *
+ * \param u16 U16 of which to toggle the endianism.
+ *
+ * \return Value resulting from \a u16 with toggled endianism.
+ *
+ * \note More optimized if only used with values unknown at compile time.
+ */
+#if (defined __GNUC__)
+ #define swap16(u16) ((U16)__builtin_bswap_16((U16)(u16)))
+#elif (defined __ICCAVR32__)
+ #define swap16(u16) ((U16)__swap_bytes_in_halfwords((U16)(u16)))
+#endif
+
+/*! \brief Toggles the endianism of \a u32 (by swapping its bytes).
+ *
+ * \param u32 U32 of which to toggle the endianism.
+ *
+ * \return Value resulting from \a u32 with toggled endianism.
+ *
+ * \note More optimized if only used with values unknown at compile time.
+ */
+#if (defined __GNUC__)
+ #define swap32(u32) ((U32)__builtin_bswap_32((U32)(u32)))
+#elif (defined __ICCAVR32__)
+ #define swap32(u32) ((U32)__swap_bytes((U32)(u32)))
+#endif
+
+/*! \brief Toggles the endianism of \a u64 (by swapping its bytes).
+ *
+ * \param u64 U64 of which to toggle the endianism.
+ *
+ * \return Value resulting from \a u64 with toggled endianism.
+ *
+ * \note More optimized if only used with values unknown at compile time.
+ */
+#define swap64(u64) ((U64)(((U64)swap32((U64)(u64) >> 32)) |\
+ ((U64)swap32((U64)(u64)) << 32)))
+
+//! @}
+
+
+/*! \name Target Abstraction
+ */
+//! @{
+
+#define _GLOBEXT_ extern //!< extern storage-class specifier.
+#define _CONST_TYPE_ const //!< const type qualifier.
+#define _MEM_TYPE_SLOW_ //!< Slow memory type.
+#define _MEM_TYPE_MEDFAST_ //!< Fairly fast memory type.
+#define _MEM_TYPE_FAST_ //!< Fast memory type.
+
+typedef U8 Byte; //!< 8-bit unsigned integer.
+
+#define memcmp_ram2ram memcmp //!< Target-specific memcmp of RAM to RAM.
+#define memcmp_code2ram memcmp //!< Target-specific memcmp of RAM to NVRAM.
+#define memcpy_ram2ram memcpy //!< Target-specific memcpy from RAM to RAM.
+#define memcpy_code2ram memcpy //!< Target-specific memcpy from NVRAM to RAM.
+
+#define LSB0(u32) LSB0W(u32) //!< Least significant byte of 1st rank of \a u32.
+#define LSB1(u32) LSB1W(u32) //!< Least significant byte of 2nd rank of \a u32.
+#define LSB2(u32) LSB2W(u32) //!< Least significant byte of 3rd rank of \a u32.
+#define LSB3(u32) LSB3W(u32) //!< Least significant byte of 4th rank of \a u32.
+#define MSB3(u32) MSB3W(u32) //!< Most significant byte of 4th rank of \a u32.
+#define MSB2(u32) MSB2W(u32) //!< Most significant byte of 3rd rank of \a u32.
+#define MSB1(u32) MSB1W(u32) //!< Most significant byte of 2nd rank of \a u32.
+#define MSB0(u32) MSB0W(u32) //!< Most significant byte of 1st rank of \a u32.
+
+//! @}
+
+//#endif // __AVR32_ABI_COMPILER__
+
+
+#endif // _COMPILER_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/enum/device/usb_device_task.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/enum/device/usb_device_task.c
new file mode 100644
index 0000000..930bd9d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/enum/device/usb_device_task.c
@@ -0,0 +1,202 @@
+/* This source file is part of the AVR Software Framework 2.0.0 release */
+
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief Management of the USB device controller.
+ *
+ * The USB task checks the income of new requests from the USB host.
+ * When a setup request occurs, this task launches the processing of this
+ * setup contained in the usb_standard_request.c file.
+ * Other class-specific requests are also processed in this file.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+/*_____ I N C L U D E S ___________________________________________________*/
+
+#include "conf_usb.h"
+
+
+#if USB_DEVICE_FEATURE == ENABLED
+
+#include "compiler.h"
+#ifdef FREERTOS_USED
+#include "FreeRTOS.h"
+#include "task.h"
+#endif
+#include "usb_drv.h"
+#include "usb_task.h"
+#include "usb_descriptors.h"
+#include "usb_standard_request.h"
+#include "usb_device_task.h"
+
+
+//_____ M A C R O S ________________________________________________________
+
+
+//_____ D E F I N I T I O N S ______________________________________________
+
+//!
+//! Public : (Bool) usb_connected
+//! usb_connected is set to TRUE when VBus has been detected
+//! usb_connected is set to FALSE otherwise
+//!
+volatile Bool usb_connected;
+
+#ifdef FREERTOS_USED
+//! Handle to the USB Device task
+xTaskHandle usb_device_tsk = NULL;
+#endif
+
+
+//_____ D E C L A R A T I O N S ____________________________________________
+
+//!
+//! @brief This function initializes the USB device controller.
+//!
+//! This function enables the USB controller and inits the USB interrupts.
+//! The aim is to allow the USB connection detection in order to send
+//! the appropriate USB event to the operating mode manager.
+//!
+void usb_device_task_init(void)
+{
+ usb_connected = FALSE;
+ usb_configuration_nb = 0;
+ //! @todo Implement this on the silicon version
+ //Pll_start_auto();
+ //Wait_pll_ready();
+ Disable_global_interrupt();
+ Usb_disable();
+ (void)Is_usb_enabled();
+ Enable_global_interrupt();
+ Usb_disable_otg_pad();
+ Usb_enable_otg_pad();
+ Usb_enable();
+ Usb_unfreeze_clock();
+ (void)Is_usb_clock_frozen();
+ Usb_ack_suspend(); // A suspend condition may be detected right after enabling the USB macro
+ Usb_enable_vbus_interrupt();
+ Enable_global_interrupt();
+
+#ifdef FREERTOS_USED
+ if ( xTaskCreate( usb_device_task, configTSK_USB_DEV_NAME, configTSK_USB_DEV_STACK_SIZE, NULL, configTSK_USB_DEV_PRIORITY, &usb_device_tsk ) != pdPASS )
+ {
+ printf( "Failed to create usb_device_task\r\n" ) ;
+ }
+#endif // FREERTOS_USED
+}
+
+
+//!
+//! @brief This function starts the USB device controller.
+//!
+//! This function enables the USB controller and inits the USB interrupts.
+//! The aim is to allow the USB connection detection in order to send
+//! the appropriate USB event to the operating mode manager.
+//! Start device function is executed once VBus connection has been detected
+//! either by the VBus change interrupt or by the VBus high level.
+//!
+void usb_start_device(void)
+{
+ Usb_enable_suspend_interrupt();
+ Usb_enable_reset_interrupt();
+
+#if (USB_HIGH_SPEED_SUPPORT==DISABLED)
+ Usb_force_full_speed_mode();
+#else
+ Usb_use_dual_speed_mode();
+#endif
+
+ usb_init_device(); // Configure the USB controller EP0
+ Usb_attach();
+ usb_connected = TRUE;
+}
+
+
+//!
+//! @brief Entry point of the USB device mamagement
+//!
+//! This function is the entry point of the USB management. Each USB
+//! event is checked here in order to launch the appropriate action.
+//! If a Setup request occurs on the Default Control Endpoint,
+//! the usb_process_request() function is call in the usb_standard_request.c file
+//!
+#ifdef FREERTOS_USED
+void usb_device_task(void *pvParameters)
+#else
+void usb_device_task(void)
+#endif
+{
+#ifdef FREERTOS_USED
+ portTickType xLastWakeTime;
+
+ xLastWakeTime = xTaskGetTickCount();
+ while (TRUE)
+ {
+ vTaskDelayUntil(&xLastWakeTime, configTSK_USB_DEV_PERIOD);
+
+#endif // FREERTOS_USED
+ if (!usb_connected && Is_usb_vbus_high())
+ {
+ usb_start_device();
+ Usb_send_event(EVT_USB_POWERED);
+ Usb_vbus_on_action();
+ }
+
+ if (Is_usb_event(EVT_USB_RESET))
+ {
+ Usb_ack_event(EVT_USB_RESET);
+ Usb_reset_endpoint(EP_CONTROL);
+ usb_configuration_nb = 0;
+ }
+
+ // Connection to the device enumeration process
+ if (Is_usb_setup_received())
+ {
+ usb_process_request();
+ }
+#ifdef FREERTOS_USED
+ }
+#endif
+}
+
+
+#endif // USB_DEVICE_FEATURE == ENABLED
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/enum/device/usb_device_task.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/enum/device/usb_device_task.h
new file mode 100644
index 0000000..0b2d33d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/enum/device/usb_device_task.h
@@ -0,0 +1,112 @@
+/* This header file is part of the AVR Software Framework 2.0.0 release */
+
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief Management of the USB device controller.
+ *
+ * The USB task checks the income of new requests from the USB host.
+ * When a setup request occurs, this task launches the processing of this
+ * setup contained in the usb_standard_request.c file.
+ * Other class-specific requests are also processed in this file.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _USB_DEVICE_TASK_H_
+#define _USB_DEVICE_TASK_H_
+
+
+#include "conf_usb.h"
+
+#if USB_DEVICE_FEATURE == DISABLED
+ #error usb_device_task.h is #included although USB_DEVICE_FEATURE is disabled
+#endif
+
+
+//! @defgroup usb_device_task USB device task module
+//! @{
+
+//_____ I N C L U D E S ____________________________________________________
+
+
+//_____ M A C R O S ________________________________________________________
+
+
+//_____ D E C L A R A T I O N S ____________________________________________
+
+//!
+//! @brief This function initializes the USB device controller.
+//!
+//! This function enables the USB controller and inits the USB interrupts.
+//! The aim is to allow the USB connection detection in order to send
+//! the appropriate USB event to the operating mode manager.
+//!
+extern void usb_device_task_init(void);
+
+//!
+//! @brief This function starts the USB device controller.
+//!
+//! This function enables the USB controller and inits the USB interrupts.
+//! The aim is to allow the USB connection detection in order to send
+//! the appropriate USB event to the operating mode manager.
+//! Start device function is executed once VBus connection has been detected
+//! either by the VBus change interrupt or by the VBus high level.
+//!
+extern void usb_start_device(void);
+
+//!
+//! @brief Entry point of the USB device mamagement
+//!
+//! This function is the entry point of the USB management. Each USB
+//! event is checked here in order to launch the appropriate action.
+//! If a Setup request occurs on the Default Control Endpoint,
+//! the usb_process_request() function is call in the usb_standard_request.c file
+//!
+#ifdef FREERTOS_USED
+extern void usb_device_task(void *pvParameters);
+#else
+extern void usb_device_task(void);
+#endif
+
+//! @}
+
+
+#endif // _USB_DEVICE_TASK_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/enum/device/usb_standard_request.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/enum/device/usb_standard_request.c
new file mode 100644
index 0000000..4703314
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/enum/device/usb_standard_request.c
@@ -0,0 +1,755 @@
+/* This source file is part of the AVR Software Framework 2.0.0 release */
+
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief Processing of USB device enumeration requests.
+ *
+ * This file contains the USB control endpoint management
+ * routines corresponding to the standard enumeration process (refer to
+ * chapter 9 of the USB specification).
+ * This file calls routines of the usb_specific_request.c file for
+ * non-standard request management.
+ * The enumeration parameters (descriptor tables) are contained in the
+ * usb_descriptors.c file.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+//_____ I N C L U D E S ____________________________________________________
+
+#include "conf_usb.h"
+
+
+#if USB_DEVICE_FEATURE == ENABLED
+
+#include "usb_drv.h"
+#include "usb_descriptors.h"
+#include "usb_standard_request.h"
+#include "usb_specific_request.h"
+#include "usb_task.h"
+
+
+//_____ M A C R O S ________________________________________________________
+
+
+//_____ D E F I N I T I O N S ______________________________________________
+#if(!defined USB_REMOTE_WAKEUP_FEATURE)
+#define USB_REMOTE_WAKEUP_FEATURE DISABLED
+#endif
+
+//_____ P R I V A T E D E C L A R A T I O N S ____________________________
+
+static void usb_get_descriptor (void);
+static void usb_set_address (void);
+static void usb_set_configuration(void);
+static void usb_clear_feature (void);
+static void usb_set_feature (void);
+static void usb_get_status (void);
+static void usb_get_configuration(void);
+static Bool usb_get_interface (void);
+static void usb_set_interface (void);
+
+
+//_____ D E C L A R A T I O N S ____________________________________________
+
+ const void *pbuffer;
+ U16 data_to_transfer;
+static U8 bmRequestType;
+ volatile U8 usb_configuration_nb;
+extern volatile Bool usb_connected;
+extern const S_usb_device_descriptor usb_user_device_descriptor;
+extern const S_usb_user_configuration_descriptor usb_user_configuration_descriptor;
+static U8 usb_interface_status[NB_INTERFACE]; // All interface with default setting
+static U8 device_status = DEVICE_STATUS;
+ U8 remote_wakeup_feature;
+
+//! This function reads the SETUP request sent to the default control endpoint
+//! and calls the appropriate function. When exiting of the usb_read_request
+//! function, the device is ready to manage the next request.
+//!
+//! If the received request is not supported or a non-standard USB request, the function
+//! will call the custom decoding function in usb_specific_request module.
+//!
+//! @note List of supported requests:
+//! GET_DESCRIPTOR
+//! GET_CONFIGURATION
+//! SET_ADDRESS
+//! SET_CONFIGURATION
+//! CLEAR_FEATURE
+//! SET_FEATURE
+//! GET_STATUS
+//!
+void usb_process_request(void)
+{
+ U8 bRequest;
+
+ Usb_reset_endpoint_fifo_access(EP_CONTROL);
+ bmRequestType = Usb_read_endpoint_data(EP_CONTROL, 8);
+ bRequest = Usb_read_endpoint_data(EP_CONTROL, 8);
+
+ switch (bRequest)
+ {
+ case GET_DESCRIPTOR:
+ if (bmRequestType == 0x80) usb_get_descriptor();
+ else goto unsupported_request;
+ break;
+
+ case GET_CONFIGURATION:
+ if (bmRequestType == 0x80) usb_get_configuration();
+ else goto unsupported_request;
+ break;
+
+ case SET_ADDRESS:
+ if (bmRequestType == 0x00) usb_set_address();
+ else goto unsupported_request;
+ break;
+
+ case SET_CONFIGURATION:
+ if (bmRequestType == 0x00) usb_set_configuration();
+ else goto unsupported_request;
+ break;
+
+ case CLEAR_FEATURE:
+ if (bmRequestType <= 0x02) usb_clear_feature();
+ else goto unsupported_request;
+ break;
+
+ case SET_FEATURE:
+ if (bmRequestType <= 0x02) usb_set_feature();
+ else goto unsupported_request;
+ break;
+
+ case GET_STATUS:
+ if (0x7F < bmRequestType && bmRequestType <= 0x82) usb_get_status();
+ else goto unsupported_request;
+ break;
+
+ case GET_INTERFACE:
+ if (bmRequestType == 0x81)
+ {
+ if(!usb_get_interface())
+ {
+ Usb_enable_stall_handshake(EP_CONTROL);
+ Usb_ack_setup_received_free();
+ }
+ }
+ else goto unsupported_request;
+ break;
+
+ case SET_INTERFACE:
+ if (bmRequestType == 0x01) usb_set_interface();
+ else goto unsupported_request;
+ break;
+
+ case SET_DESCRIPTOR:
+ case SYNCH_FRAME:
+ default: //!< unsupported request => call to user read request
+unsupported_request:
+ if (!usb_user_read_request(bmRequestType, bRequest))
+ {
+ Usb_enable_stall_handshake(EP_CONTROL);
+ Usb_ack_setup_received_free();
+ }
+ break;
+ }
+}
+
+
+//! This function manages the SET ADDRESS request. When complete, the device
+//! will filter the requests using the new address.
+//!
+void usb_set_address(void)
+{
+ U8 addr = Usb_read_endpoint_data(EP_CONTROL, 8);
+ Usb_configure_address(addr);
+
+ Usb_ack_setup_received_free();
+
+ Usb_ack_control_in_ready_send(); //!< send a ZLP for STATUS phase
+ while (!Is_usb_control_in_ready()); //!< waits for status phase done
+ //!< before using the new address
+ Usb_enable_address();
+}
+
+
+//! This function manages the SET CONFIGURATION request. If the selected
+//! configuration is valid, this function call the usb_user_endpoint_init()
+//! function that will configure the endpoints following the configuration
+//! number.
+//!
+void usb_set_configuration(void)
+{
+ U8 configuration_number = Usb_read_endpoint_data(EP_CONTROL, 8);
+ U8 u8_i;
+
+ if (configuration_number <= NB_CONFIGURATION)
+ {
+ Usb_ack_setup_received_free();
+ usb_configuration_nb = configuration_number;
+ for( u8_i=0; u8_i<NB_INTERFACE; u8_i++) usb_interface_status[u8_i]=0;
+
+ usb_user_endpoint_init(usb_configuration_nb); //!< endpoint configuration
+ Usb_set_configuration_action();
+
+ Usb_ack_control_in_ready_send(); //!< send a ZLP for STATUS phase
+ }
+ else
+ {
+ //!< keep that order (set StallRq/clear RxSetup) or a
+ //!< OUT request following the SETUP may be acknowledged
+ Usb_enable_stall_handshake(EP_CONTROL);
+ Usb_ack_setup_received_free();
+ }
+}
+
+
+//! This function manages the GET DESCRIPTOR request. The device descriptor,
+//! the configuration descriptor and the device qualifier are supported. All
+//! other descriptors must be supported by the usb_user_get_descriptor
+//! function.
+//! Only 1 configuration is supported.
+//!
+void usb_get_descriptor(void)
+{
+ Bool zlp;
+ U16 wLength;
+ U8 descriptor_type;
+ U8 string_type;
+ Union32 temp;
+#if (USB_HIGH_SPEED_SUPPORT==ENABLED)
+ Bool b_first_data = TRUE;
+#endif
+
+ zlp = FALSE; /* no zero length packet */
+ string_type = Usb_read_endpoint_data(EP_CONTROL, 8); /* read LSB of wValue */
+ descriptor_type = Usb_read_endpoint_data(EP_CONTROL, 8); /* read MSB of wValue */
+
+ switch (descriptor_type)
+ {
+ case DEVICE_DESCRIPTOR:
+ data_to_transfer = Usb_get_dev_desc_length(); //!< sizeof(usb_dev_desc);
+ pbuffer = Usb_get_dev_desc_pointer();
+ break;
+
+#if (USB_HIGH_SPEED_SUPPORT==DISABLED)
+ case CONFIGURATION_DESCRIPTOR:
+ data_to_transfer = Usb_get_conf_desc_length(); //!< sizeof(usb_conf_desc);
+ pbuffer = Usb_get_conf_desc_pointer();
+ break;
+
+#else
+ case CONFIGURATION_DESCRIPTOR:
+ if( Is_usb_full_speed_mode() )
+ {
+ data_to_transfer = Usb_get_conf_desc_fs_length(); //!< sizeof(usb_conf_desc_fs);
+ pbuffer = Usb_get_conf_desc_fs_pointer();
+ }else{
+ data_to_transfer = Usb_get_conf_desc_hs_length(); //!< sizeof(usb_conf_desc_hs);
+ pbuffer = Usb_get_conf_desc_hs_pointer();
+ }
+ break;
+
+ case OTHER_SPEED_CONFIGURATION_DESCRIPTOR:
+ if( !Is_usb_full_speed_mode() )
+ {
+ data_to_transfer = Usb_get_conf_desc_fs_length(); //!< sizeof(usb_conf_desc_fs);
+ pbuffer = Usb_get_conf_desc_fs_pointer();
+ }else{
+ data_to_transfer = Usb_get_conf_desc_hs_length(); //!< sizeof(usb_conf_desc_hs);
+ pbuffer = Usb_get_conf_desc_hs_pointer();
+ }
+ break;
+
+ case DEVICE_QUALIFIER_DESCRIPTOR:
+ data_to_transfer = Usb_get_qualifier_desc_length(); //!< sizeof(usb_qualifier_desc);
+ pbuffer = Usb_get_qualifier_desc_pointer();
+ break;
+
+#endif
+
+ default:
+ if (!usb_user_get_descriptor(descriptor_type, string_type))
+ {
+ Usb_enable_stall_handshake(EP_CONTROL);
+ Usb_ack_setup_received_free();
+ return;
+ }
+ break;
+ }
+
+ temp.u32 = Usb_read_endpoint_data(EP_CONTROL, 32); //!< read wIndex and wLength with a 32-bit access
+ //!< since this access is aligned with a 32-bit
+ //!< boundary from the beginning of the endpoint
+ wLength = usb_format_usb_to_mcu_data(16, temp.u16[1]); //!< ignore wIndex, keep and format wLength
+ Usb_ack_setup_received_free(); //!< clear the setup received flag
+
+ if (wLength > data_to_transfer)
+ {
+ zlp = !(data_to_transfer % EP_CONTROL_LENGTH); //!< zero length packet condition
+ }
+ else
+ {
+ // No need to test ZLP sending since we send the exact number of bytes as
+ // expected by the host.
+ data_to_transfer = wLength; //!< send only requested number of data bytes
+ }
+
+ Usb_ack_nak_out(EP_CONTROL);
+
+ while (data_to_transfer && !Is_usb_nak_out(EP_CONTROL))
+ {
+ while (!Is_usb_control_in_ready() && !Is_usb_nak_out(EP_CONTROL));
+
+ if (Is_usb_nak_out(EP_CONTROL))
+ break; // don't clear the flag now, it will be cleared after
+
+ Usb_reset_endpoint_fifo_access(EP_CONTROL);
+
+#if (USB_HIGH_SPEED_SUPPORT==ENABLED) // To support other descriptors like OTHER_SPEED_CONFIGURATION_DESCRIPTOR
+ if( b_first_data ) {
+ b_first_data = FALSE;
+ if( 0!= data_to_transfer ) {
+ usb_write_ep_txpacket(EP_CONTROL, pbuffer, 1, &pbuffer);
+ data_to_transfer--;
+ }
+ if( 0!= data_to_transfer ) {
+ usb_write_ep_txpacket(EP_CONTROL, &descriptor_type, 1, NULL);
+ pbuffer = ((const U8*)pbuffer)+1;
+ data_to_transfer--;
+ }
+ }
+#endif
+ if( 0!= data_to_transfer ) {
+ data_to_transfer = usb_write_ep_txpacket(EP_CONTROL, pbuffer,
+ data_to_transfer, &pbuffer);
+ }
+ if (Is_usb_nak_out(EP_CONTROL))
+ break;
+
+ Usb_ack_control_in_ready_send(); //!< Send data until necessary
+ }
+
+ if (zlp && !Is_usb_nak_out(EP_CONTROL))
+ {
+ while (!Is_usb_control_in_ready());
+ Usb_ack_control_in_ready_send();
+ }
+
+ while (!Is_usb_nak_out(EP_CONTROL));
+ Usb_ack_nak_out(EP_CONTROL);
+ while (!Is_usb_control_out_received());
+ Usb_ack_control_out_received_free();
+}
+
+
+//! This function manages the GET CONFIGURATION request. The current
+//! configuration number is returned.
+//!
+void usb_get_configuration(void)
+{
+ Usb_ack_setup_received_free();
+
+ Usb_reset_endpoint_fifo_access(EP_CONTROL);
+ Usb_write_endpoint_data(EP_CONTROL, 8, usb_configuration_nb);
+ Usb_ack_control_in_ready_send();
+
+ while (!Is_usb_control_out_received());
+ Usb_ack_control_out_received_free();
+}
+
+
+//! This function manages the GET STATUS request. The device, interface or
+//! endpoint status is returned.
+//!
+void usb_get_status(void)
+{
+ U8 wIndex;
+
+ switch (bmRequestType)
+ {
+ case REQUEST_DEVICE_STATUS:
+ Usb_ack_setup_received_free();
+ Usb_reset_endpoint_fifo_access(EP_CONTROL);
+ Usb_write_endpoint_data(EP_CONTROL, 8, device_status);
+ break;
+
+ case REQUEST_INTERFACE_STATUS:
+ Usb_ack_setup_received_free();
+ Usb_reset_endpoint_fifo_access(EP_CONTROL);
+ Usb_write_endpoint_data(EP_CONTROL, 8, INTERFACE_STATUS);
+ break;
+
+ case REQUEST_ENDPOINT_STATUS:
+ Usb_read_endpoint_data(EP_CONTROL, 16); //!< dummy read (wValue)
+ wIndex = Usb_read_endpoint_data(EP_CONTROL, 8);
+ wIndex = Get_desc_ep_nbr(wIndex);
+ Usb_ack_setup_received_free();
+ Usb_reset_endpoint_fifo_access(EP_CONTROL);
+ Usb_write_endpoint_data(EP_CONTROL, 8, Is_usb_endpoint_stall_requested(wIndex) );
+ break;
+
+ default:
+ Usb_enable_stall_handshake(EP_CONTROL);
+ Usb_ack_setup_received_free();
+ return;
+ }
+
+ Usb_write_endpoint_data(EP_CONTROL, 8, 0x00);
+ Usb_ack_control_in_ready_send();
+
+ while (!Is_usb_control_out_received());
+ Usb_ack_control_out_received_free();
+}
+
+
+//! This function manages the SET FEATURE request. The USB test modes are
+//! supported by this function.
+//!
+void usb_set_feature(void)
+{
+ U16 wValue = usb_format_usb_to_mcu_data(16, Usb_read_endpoint_data(EP_CONTROL, 16));
+ U16 wIndex = usb_format_usb_to_mcu_data(16, Usb_read_endpoint_data(EP_CONTROL, 16));
+ U16 wLength = usb_format_usb_to_mcu_data(16, Usb_read_endpoint_data(EP_CONTROL, 16));
+
+ if (wLength)
+ goto unsupported_request;
+
+ if (bmRequestType==USB_SETUP_SET_STAND_DEVICE) {
+#if (USB_REMOTE_WAKEUP_FEATURE == ENABLED)
+ if (FEATURE_DEVICE_REMOTE_WAKEUP == wValue)
+ {
+ device_status |= USB_DEV_STATUS_REMOTEWAKEUP;
+ remote_wakeup_feature = ENABLED;
+ Usb_ack_setup_received_free();
+ Usb_ack_control_in_ready_send();
+ return;
+ }
+#endif
+ goto unsupported_request;
+ }
+
+ switch (wValue)
+ {
+ case FEATURE_ENDPOINT_HALT:
+ wIndex = Get_desc_ep_nbr(wIndex); // clear direction flag
+ if (bmRequestType != ENDPOINT_TYPE ||
+ wIndex == EP_CONTROL ||
+ !Is_usb_endpoint_enabled(wIndex))
+ goto unsupported_request;
+
+ Usb_enable_stall_handshake(wIndex);
+ Usb_ack_setup_received_free();
+ Usb_ack_control_in_ready_send();
+ break;
+
+#if (USB_HIGH_SPEED_SUPPORT==ENABLED)
+ case FEATURE_TEST_MODE:
+ if (bmRequestType != DEVICE_TYPE ||
+ wIndex & 0x00FF)
+ goto unsupported_request;
+
+ switch (wIndex >> 8)
+ {
+ case TEST_J:
+ Usb_ack_setup_received_free();
+ Usb_ack_control_in_ready_send();
+ while (!Is_usb_control_in_ready());
+ Usb_dev_forceHighSpeed();
+ Set_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_TSTJ);
+ break;
+
+ case TEST_K:
+ Usb_ack_setup_received_free();
+ Usb_ack_control_in_ready_send();
+ while (!Is_usb_control_in_ready());
+ Usb_dev_forceHighSpeed();
+ Set_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_TSTK);
+ break;
+
+ case TEST_SE0_NAK:
+ Usb_ack_setup_received_free();
+ Usb_ack_control_in_ready_send();
+ while (!Is_usb_control_in_ready());
+ Usb_dev_forceHighSpeed();
+ break;
+
+ case TEST_PACKET:
+ {
+ static const U8 test_packet[] =
+ {
+ // 00000000 * 9
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ // 01010101 * 8
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ // 01110111 * 8
+ 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE,
+ // 0, {111111S * 15}, 111111
+ 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ // S, 111111S, {0111111S * 7}
+ 0x7F, 0xBF, 0xDF, 0xEF, 0xF7, 0xFB, 0xFD,
+ // 00111111, {S0111111 * 9}, S0
+ 0xFC, 0x7E, 0xBF, 0xDF, 0xEF, 0xF7, 0xFB, 0xFD, 0x7E
+ };
+
+ Usb_ack_setup_received_free();
+ Usb_ack_control_in_ready_send();
+ while (!Is_usb_control_in_ready());
+ Usb_dev_forceHighSpeed();
+ Usb_disable_endpoint(EP_CONTROL);
+ Usb_unallocate_memory(EP_CONTROL);
+ (void)Usb_configure_endpoint(EP_CONTROL,
+ TYPE_BULK,
+ DIRECTION_IN,
+ 64,
+ SINGLE_BANK);
+ Usb_reset_endpoint(EP_CONTROL);
+ Set_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_TSTPCKT);
+ usb_write_ep_txpacket(EP_CONTROL, &test_packet, sizeof(test_packet), NULL);
+ Usb_send_in(EP_CONTROL);
+ }
+ break;
+
+ case TEST_FORCE_ENABLE: // Only for downstream facing hub ports
+ default:
+ goto unsupported_request;
+ }
+ break;
+#endif
+
+ case FEATURE_DEVICE_REMOTE_WAKEUP:
+ default:
+ goto unsupported_request;
+ }
+
+ return;
+
+unsupported_request:
+ Usb_enable_stall_handshake(EP_CONTROL);
+ Usb_ack_setup_received_free();
+}
+
+
+//! This function manages the CLEAR FEATURE request.
+//!
+void usb_clear_feature(void)
+{
+ U8 wValue;
+ U8 wIndex;
+
+ switch (bmRequestType)
+ {
+#if (USB_REMOTE_WAKEUP_FEATURE == ENABLED)
+ case USB_SETUP_SET_STAND_DEVICE:
+ wValue = Usb_read_endpoint_data(EP_CONTROL, 8);
+ if (wValue != FEATURE_DEVICE_REMOTE_WAKEUP)
+ break; // Invalid request
+ device_status &= ~USB_DEV_STATUS_REMOTEWAKEUP;
+ remote_wakeup_feature = DISABLED;
+ Usb_ack_setup_received_free();
+ Usb_ack_control_in_ready_send();
+ return;
+#endif
+
+ case USB_SETUP_SET_STAND_INTERFACE:
+ break;
+
+ case USB_SETUP_SET_STAND_ENDPOINT:
+ wValue = Usb_read_endpoint_data(EP_CONTROL, 8);
+ if (wValue != FEATURE_ENDPOINT_HALT)
+ break;
+ Usb_read_endpoint_data(EP_CONTROL, 8); //!< dummy read (MSB of wValue)
+ wIndex = Usb_read_endpoint_data(EP_CONTROL, 8);
+ wIndex = Get_desc_ep_nbr(wIndex);
+
+ if (!Is_usb_endpoint_enabled(wIndex))
+ break;
+ if (wIndex != EP_CONTROL)
+ {
+ Usb_disable_stall_handshake(wIndex);
+ Usb_reset_endpoint(wIndex);
+ Usb_reset_data_toggle(wIndex);
+ }
+ Usb_ack_setup_received_free();
+ Usb_ack_control_in_ready_send();
+ return;
+
+ default:
+ break;
+ }
+ Usb_enable_stall_handshake(EP_CONTROL);
+ Usb_ack_setup_received_free();
+}
+
+//! This function manages the SETUP_GET_INTERFACE request.
+//!
+Bool usb_get_interface (void)
+{
+ U16 wInterface;
+ U16 wValue;
+
+ // Read wValue
+ wValue = usb_format_usb_to_mcu_data(16, Usb_read_endpoint_data(EP_CONTROL, 16));
+ // wValue = Alternate Setting
+ // wIndex = Interface
+ wInterface=usb_format_usb_to_mcu_data(16, Usb_read_endpoint_data(EP_CONTROL, 16));
+ if(0!=wValue)
+ return FALSE;
+ Usb_ack_setup_received_free();
+
+ Usb_reset_endpoint_fifo_access(EP_CONTROL);
+ Usb_write_endpoint_data(EP_CONTROL, 8, usb_interface_status[wInterface] );
+ Usb_ack_control_in_ready_send();
+
+ while( !Is_usb_control_out_received() );
+ Usb_ack_control_out_received_free();
+ return TRUE;
+}
+
+
+//! This function manages the SET INTERFACE request.
+//!
+void usb_set_interface(void)
+{
+ U8 u8_i;
+
+ // wValue = Alternate Setting
+ // wIndex = Interface
+ U16 wValue = usb_format_usb_to_mcu_data(16, Usb_read_endpoint_data(EP_CONTROL, 16));
+ U16 wIndex = usb_format_usb_to_mcu_data(16, Usb_read_endpoint_data(EP_CONTROL, 16));
+ Usb_ack_setup_received_free();
+
+ // Get descriptor
+#if (USB_HIGH_SPEED_SUPPORT==ENABLED)
+ if( Is_usb_full_speed_mode() )
+ {
+ data_to_transfer = Usb_get_conf_desc_fs_length(); //!< sizeof(usb_conf_desc_fs);
+ pbuffer = Usb_get_conf_desc_fs_pointer();
+ }else{
+ data_to_transfer = Usb_get_conf_desc_hs_length(); //!< sizeof(usb_conf_desc_hs);
+ pbuffer = Usb_get_conf_desc_hs_pointer();
+ }
+#else
+ data_to_transfer = Usb_get_conf_desc_length(); //!< sizeof(usb_conf_desc);
+ pbuffer = Usb_get_conf_desc_pointer();
+#endif
+
+ //** Scan descriptor
+
+ //* Find configuration selected
+ if( usb_configuration_nb == 0 )
+ {
+ // No configuration selected then no interface enable
+ Usb_enable_stall_handshake(EP_CONTROL);
+ Usb_ack_setup_received_free();
+ return;
+ }
+ u8_i = usb_configuration_nb;
+ while( u8_i != 0 )
+ {
+ if( CONFIGURATION_DESCRIPTOR != ((S_usb_configuration_descriptor*)pbuffer)->bDescriptorType )
+ {
+ data_to_transfer -= ((S_usb_configuration_descriptor*)pbuffer)->bLength;
+ pbuffer = (U8*)pbuffer + ((S_usb_configuration_descriptor*)pbuffer)->bLength;
+ continue;
+ }
+ u8_i--;
+ if( u8_i != 0 )
+ {
+ data_to_transfer -= ((S_usb_configuration_descriptor*)pbuffer)->wTotalLength;
+ pbuffer = (U8*)pbuffer + ((S_usb_configuration_descriptor*)pbuffer)->wTotalLength;
+ }
+ }
+
+ // Find interface selected
+ if( wIndex >= ((S_usb_configuration_descriptor*)pbuffer)->bNumInterfaces )
+ {
+ // Interface number unknow
+ Usb_enable_stall_handshake(EP_CONTROL);
+ Usb_ack_setup_received_free();
+ return;
+ }
+ while( 1 )
+ {
+ if( data_to_transfer <= ((S_usb_interface_descriptor*)pbuffer)->bLength )
+ {
+ // Interface unknow
+ Usb_enable_stall_handshake(EP_CONTROL);
+ Usb_ack_setup_received_free();
+ return;
+ }
+ data_to_transfer -= ((S_usb_interface_descriptor*)pbuffer)->bLength;
+ pbuffer = (U8*)pbuffer + ((S_usb_interface_descriptor*)pbuffer)->bLength;
+ if( INTERFACE_DESCRIPTOR != ((S_usb_interface_descriptor*)pbuffer)->bDescriptorType )
+ continue;
+ if( wIndex != ((S_usb_interface_descriptor*)pbuffer)->bInterfaceNumber )
+ continue;
+ if( wValue != ((S_usb_interface_descriptor*)pbuffer)->bAlternateSetting )
+ continue;
+ usb_interface_status[wIndex] = wValue;
+ break;
+ }
+
+ //* Find endpoints of interface and reset it
+ while( 1 )
+ {
+ if( data_to_transfer <= ((S_usb_endpoint_descriptor*)pbuffer)->bLength )
+ break; // End of interface
+ data_to_transfer -= ((S_usb_endpoint_descriptor*)pbuffer)->bLength;
+ pbuffer = (U8*)pbuffer + ((S_usb_endpoint_descriptor*)pbuffer)->bLength;
+ if( INTERFACE_DESCRIPTOR == ((S_usb_endpoint_descriptor*)pbuffer)->bDescriptorType )
+ break; // End of interface
+ if( ENDPOINT_DESCRIPTOR == ((S_usb_endpoint_descriptor*)pbuffer)->bDescriptorType )
+ {
+ // Reset endpoint
+ u8_i = ((S_usb_endpoint_descriptor*)pbuffer)->bEndpointAddress & (~MSK_EP_DIR);
+ Usb_disable_stall_handshake(u8_i);
+ Usb_reset_endpoint(u8_i);
+ Usb_reset_data_toggle(u8_i);
+ }
+ }
+
+ // send a ZLP for STATUS phase
+ Usb_ack_control_in_ready_send();
+ while (!Is_usb_control_in_ready());
+}
+
+
+#endif // USB_DEVICE_FEATURE == ENABLED
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/enum/device/usb_standard_request.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/enum/device/usb_standard_request.h
new file mode 100644
index 0000000..039e098
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/enum/device/usb_standard_request.h
@@ -0,0 +1,126 @@
+/* This header file is part of the AVR Software Framework 2.0.0 release */
+
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief Processing of USB device enumeration requests.
+ *
+ * This file contains the USB control endpoint management
+ * routines corresponding to the standard enumeration process (refer to
+ * chapter 9 of the USB specification).
+ * This file calls routines of the usb_specific_request.c file for
+ * non-standard request management.
+ * The enumeration parameters (descriptor tables) are contained in the
+ * usb_descriptors.c file.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _USB_STANDARD_REQUEST_H_
+#define _USB_STANDARD_REQUEST_H_
+
+
+//_____ I N C L U D E S ____________________________________________________
+
+#include "conf_usb.h"
+
+#if USB_DEVICE_FEATURE == DISABLED
+ #error usb_standard_request.h is #included although USB_DEVICE_FEATURE is disabled
+#endif
+
+
+#include "usb_task.h"
+#include "usb_descriptors.h"
+
+
+//! @defgroup std_request USB device standard requests decoding module
+//! @{
+
+
+//_____ M A C R O S ________________________________________________________
+
+
+//_____ S T A N D A R D D E F I N I T I O N S ___________________________
+
+ // Device State
+#define ATTACHED 0
+#define POWERED 1
+#define DEFAULT 2
+#define ADDRESSED 3
+#define CONFIGURED 4
+#define SUSPENDED 5
+
+#define USB_CONFIG_ATTRIBUTES_RESERVED 0x80
+#define USB_CONFIG_BUSPOWERED (USB_CONFIG_ATTRIBUTES_RESERVED | 0x00)
+#define USB_CONFIG_SELFPOWERED (USB_CONFIG_ATTRIBUTES_RESERVED | 0x40)
+#define USB_CONFIG_REMOTEWAKEUP (USB_CONFIG_ATTRIBUTES_RESERVED | 0x20)
+
+
+//_____ D E C L A R A T I O N S ____________________________________________
+
+ //! @brief Returns TRUE when device connected and correctly enumerated with a host.
+ //! The device high-level application should test this before performing any applicative request.
+#define Is_device_enumerated() (usb_configuration_nb != 0)
+
+ //! This function reads the SETUP request sent to the default control endpoint
+ //! and calls the appropriate function. When exiting of the usb_read_request
+ //! function, the device is ready to manage the next request.
+ //!
+ //! If the received request is not supported or a non-standard USB request, the function
+ //! will call the custom decoding function in usb_specific_request module.
+ //!
+ //! @note List of supported requests:
+ //! GET_DESCRIPTOR
+ //! GET_CONFIGURATION
+ //! SET_ADDRESS
+ //! SET_CONFIGURATION
+ //! CLEAR_FEATURE
+ //! SET_FEATURE
+ //! GET_STATUS
+ //!
+extern void usb_process_request(void);
+
+extern volatile U8 usb_configuration_nb;
+
+
+//! @}
+
+
+#endif // _USB_STANDARD_REQUEST_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/enum/host/usb_host_enum.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/enum/host/usb_host_enum.c
new file mode 100644
index 0000000..5616ad4
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/enum/host/usb_host_enum.c
@@ -0,0 +1,616 @@
+/* This source file is part of the AVR Software Framework 2.0.0 release */
+
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief Processing of USB host enumeration requests.
+ *
+ * This file contains the USB control pipe management routines
+ * corresponding to the standard enumeration process (refer to chapter 9 of
+ * the USB specification).
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+//_____ I N C L U D E S ____________________________________________________
+
+#include "conf_usb.h"
+
+
+#if USB_HOST_FEATURE == ENABLED
+
+#include "compiler.h"
+#include "usb_drv.h"
+#include "usb_host_enum.h"
+#include "usb_host_task.h"
+#include "usb_task.h"
+
+
+//_____ M A C R O S ________________________________________________________
+
+
+//_____ D E F I N I T I O N S ______________________________________________
+
+
+//_____ P R I V A T E D E C L A R A T I O N S ____________________________
+
+//! Table of registered devices (see conf_usb.h for table contents)
+static const U16 registered_VID_PID[] = VID_PID_TABLE;
+#define REG_VID_PID_CNT (sizeof(registered_VID_PID) / sizeof(registered_VID_PID[0]))
+
+//! Table of registered classes (see conf_usb.h for table contents)
+static const U8 registered_class[] = CLASS_SUBCLASS_PROTOCOL;
+#define REG_CLASS_CNT (sizeof(registered_class) / sizeof(registered_class[0]))
+
+
+//_____ D E C L A R A T I O N S ____________________________________________
+
+//! VID of connected device
+volatile U16 device_VID;
+
+//! PID of connected device
+volatile U16 device_PID;
+
+//! bmAttributes byte of connected device
+volatile U8 bmattributes;
+
+//! maxpower byte of connected device (unit is 2 mA)
+volatile U8 maxpower;
+
+//! Number of interfaces the host is able to support in the connected device
+volatile U8 nb_interface_supported = 0;
+
+//! Supported interfaces
+volatile S_interface interface_supported[MAX_INTERFACE_SUPPORTED];
+
+extern U32 host_get_timeout( void );
+
+//! This function checks if the VID and the PID are supported
+//! (if the VID & PID belong to the VID_PID table).
+//!
+//! @return Bool: Status
+//!
+Bool host_check_VID_PID(void)
+{
+ U8 c, d;
+
+ // Rebuild VID & PID from data stage
+ device_VID = usb_format_usb_to_mcu_data(16, *(U16 *)(data_stage + OFFSET_FIELD_VID));
+ device_PID = usb_format_usb_to_mcu_data(16, *(U16 *)(data_stage + OFFSET_FIELD_PID));
+ TRACE_DEBUG("registered_VID_PID[%d]: 0x%X\n\r", c, registered_VID_PID[c]);
+ TRACE_DEBUG("device_VID: 0x%X\n\r", device_VID);
+
+ // Look for received VID & PID in supported table
+ for (c = 0; c < REG_VID_PID_CNT; )
+ {
+ if (registered_VID_PID[c] == device_VID) // VID is correct
+ {
+ TRACE_DEBUG("Good VID\n\r");
+ for (c += 2, d = c + registered_VID_PID[c - 1]; c < d; c++)
+ {
+ if (registered_VID_PID[c] == device_PID)
+ {
+ TRACE_DEBUG("Good PID\n\r");
+ return TRUE; // PID is correct
+ }
+ }
+ }
+ else c += 2 + registered_VID_PID[c + 1];
+ }
+
+ return FALSE;
+}
+
+
+//! This function checks if the device class is supported.
+//! The function looks in all interfaces declared in the received descriptors if
+//! one of them matches an entry of the CLASS/SUB_CLASS/PROTOCOL table.
+//! If HOST_AUTO_CFG_ENDPOINT is enabled, a pipe is configured for each endpoint
+//! of supported interfaces.
+//!
+//! @return Bool: Status
+//!
+Bool host_check_class(void)
+{
+ U8 *descriptor, *conf_end;
+ U8 device_class, device_subclass, device_protocol;
+ U8 c;
+#if HOST_AUTO_CFG_ENDPOINT == ENABLE
+ U8 nb_endpoint_to_configure = 0;
+ U8 ep_index = 0;
+ U8 physical_pipe = P_1; // P_1 because physical pipe 0 is reserved for control
+
+ // By default, the host is configured when returning
+ Host_set_configured();
+#endif
+
+ // First, assume no interface is supported
+ nb_interface_supported = 0;
+
+ // Check if configuration descriptor
+ if (data_stage[OFFSET_FIELD_DESCRIPTOR_TYPE] != CONFIGURATION_DESCRIPTOR) return FALSE;
+
+ bmattributes = data_stage[OFFSET_FIELD_BMATTRIBUTES];
+ maxpower = data_stage[OFFSET_FIELD_MAXPOWER];
+
+ conf_end = data_stage +
+ min(usb_format_usb_to_mcu_data(16, *(U16 *)(data_stage + OFFSET_FIELD_TOTAL_LENGTH)),
+ SIZEOF_DATA_STAGE - OFFSET_FIELD_PROTOCOL);
+
+ // Look in all interfaces declared in the configuration
+ for (descriptor = data_stage + data_stage[OFFSET_DESCRIPTOR_LENGTH]; descriptor < conf_end;
+ descriptor += descriptor[OFFSET_DESCRIPTOR_LENGTH])
+ {
+ // Find next interface descriptor
+ switch (descriptor[OFFSET_FIELD_DESCRIPTOR_TYPE])
+ {
+ case INTERFACE_DESCRIPTOR:
+ // Check the number of supported interfaces does not exceed the maximum
+ if (nb_interface_supported >= MAX_INTERFACE_SUPPORTED) return TRUE;
+
+#if HOST_AUTO_CFG_ENDPOINT == ENABLE
+ // If there are still endpoints to configure although a new interface descriptor has been found
+ if (nb_endpoint_to_configure)
+ {
+ // Mark the host as not configured
+ Host_clear_configured();
+
+ // Reset the number of endpoints to configure
+ nb_endpoint_to_configure = 0;
+ }
+#endif
+
+ // Found an interface descriptor
+ // Get charateristics of this interface
+ device_class = descriptor[OFFSET_FIELD_CLASS];
+ device_subclass = descriptor[OFFSET_FIELD_SUB_CLASS];
+ device_protocol = descriptor[OFFSET_FIELD_PROTOCOL];
+
+ // Look in registered class table for match
+ for (c = 0; c < REG_CLASS_CNT; c += 3)
+ {
+ if (registered_class[c] == device_class && // Class is correct
+ registered_class[c + 1] == device_subclass && // Subclass is correct
+ registered_class[c + 2] == device_protocol) // Protocol is correct
+ {
+ // Store this interface as supported interface
+ // Memorize its interface nb
+ interface_supported[nb_interface_supported].interface_nb = descriptor[OFFSET_FIELD_INTERFACE_NB];
+ // its alternate setting
+ interface_supported[nb_interface_supported].altset_nb = descriptor[OFFSET_FIELD_ALT];
+ // its USB class
+ interface_supported[nb_interface_supported].uclass = device_class;
+ // its USB subclass
+ interface_supported[nb_interface_supported].subclass = device_subclass;
+ // its USB protocol
+ interface_supported[nb_interface_supported].protocol = device_protocol;
+ // the number of endpoints associated with this interface
+#if HOST_AUTO_CFG_ENDPOINT == ENABLE
+ ep_index = 0;
+ nb_endpoint_to_configure =
+#endif
+ interface_supported[nb_interface_supported].nb_ep = min(descriptor[OFFSET_FIELD_NB_OF_EP], MAX_EP_PER_INTERFACE);
+
+ // Update the number of supported interfaces
+ nb_interface_supported++;
+
+ // Class/subclass/protocol is registered, so look for next interface descriptor
+ break;
+ }
+ }
+ break;
+
+#if HOST_AUTO_CFG_ENDPOINT == ENABLE
+ case ENDPOINT_DESCRIPTOR:
+ // If there are still endpoints to configure while there are free pipes
+ if (physical_pipe < MAX_PEP_NB && nb_endpoint_to_configure)
+ {
+ nb_endpoint_to_configure--;
+
+ // Reconfigure the new physical pipe to get rid of any previous configuration
+ #if USB_HOST_PIPE_INTERRUPT_TRANSFER == ENABLE
+ Disable_global_interrupt();
+ #endif
+ Host_disable_pipe(physical_pipe);
+ #if USB_HOST_PIPE_INTERRUPT_TRANSFER == ENABLE
+ (void)Is_host_pipe_enabled(physical_pipe);
+ Enable_global_interrupt();
+ #endif
+ Host_unallocate_memory(physical_pipe);
+ Host_enable_pipe(physical_pipe);
+
+ // Fix HW, set freq at 0 in case of no interrupt endpoint
+ if( TYPE_INTERRUPT != descriptor[OFFSET_FIELD_EP_TYPE] ) descriptor[OFFSET_FIELD_EP_INTERVAL] = 0;
+
+ // Build the pipe configuration according to the endpoint descriptor fields received
+ if( Host_configure_pipe(
+ physical_pipe, // Pipe nb in USB interface
+ descriptor[OFFSET_FIELD_EP_INTERVAL], // Interrupt period (for interrupt pipe)
+ Get_desc_ep_nbr(descriptor[OFFSET_FIELD_EP_ADDR]), // Pipe endpoint number
+ descriptor[OFFSET_FIELD_EP_TYPE], // Pipe type (isochronous/bulk/interrupt)
+ Get_pipe_token(descriptor[OFFSET_FIELD_EP_ADDR]), // Pipe token (IN/OUT)
+ descriptor[OFFSET_FIELD_EP_SIZE] |
+ descriptor[OFFSET_FIELD_EP_SIZE + 1] << 8, // Pipe size
+ ((TYPE_ISOCHRONOUS == (descriptor[OFFSET_FIELD_EP_TYPE] & TRANSFER_TYPE_MASK))
+ || (TYPE_BULK == (descriptor[OFFSET_FIELD_EP_TYPE] & TRANSFER_TYPE_MASK))
+ ? DOUBLE_BANK : SINGLE_BANK) // Number of banks to allocate for pipe
+ ) == 0 )
+ {
+ TRACE_OTG("Error in pipe configure\n\r");
+ }
+
+
+#if (USB_HIGH_SPEED_SUPPORT==ENABLED)
+ if( (TYPE_BULK == Host_get_pipe_type(physical_pipe))
+ && (TOKEN_OUT == Host_get_pipe_token(physical_pipe)) )
+ {
+ if( !Is_usb_full_speed_mode() )
+ {
+ // Enable PING management for bulk OUT endpoint each micro frame
+ Host_configure_pipe_int_req_freq(physical_pipe,0);
+ Host_enable_ping(physical_pipe);
+ }
+ }
+#endif
+
+ // Update endpoint pipe table in supported interface structure
+ interface_supported[nb_interface_supported - 1].ep_pipe[ep_index++] = physical_pipe++;
+ }
+ break;
+#endif
+ }
+
+ // Call user callback to look more deeply into the configuration descriptor
+ Host_user_check_class_action(descriptor);
+ }
+
+#if HOST_AUTO_CFG_ENDPOINT == ENABLE
+ // If there are still endpoints to configure although all descriptors have been parsed
+ if (nb_endpoint_to_configure)
+ {
+ // Mark the host as not configured
+ Host_clear_configured();
+ }
+#endif
+
+ return (nb_interface_supported > 0);
+}
+
+#define delayJCB //k=0; for( i=0; i<200; i++ ){k++;}
+
+//! This function is the generic control pipe management function.
+//! This function is used to send and receive control requests over control pipe.
+//!
+//! @todo Fix all time-out errors and disconnections in active wait loop.
+//!
+//! @param data_pointer void *: Pointer to data to transfer
+//!
+//! @return Status_t: Status
+//!
+//! @note This function uses the usb_request global structure. Hence, this
+//! structure should be filled before calling this function.
+//!
+Status_t host_transfer_control(void *data_pointer)
+{
+ int status = CONTROL_GOOD;
+ Bool sav_int_sof_enable;
+ Bool sav_glob_int_en;
+ U16 data_length;
+ U8 c;
+ U8* data_p;
+ volatile uint32_t k;
+ uint32_t i;
+
+ Usb_ack_event(EVT_HOST_SOF);
+ sav_int_sof_enable = Is_host_sof_interrupt_enabled();
+ Host_enable_sof_interrupt(); // SOF software detection is in interrupt subroutine
+ while (!Is_usb_event(EVT_HOST_SOF)) // Wait 1 SOF
+ {
+ if (Is_host_emergency_exit())
+ {
+ Host_freeze_pipe(P_CONTROL);
+ Host_reset_pipe(P_CONTROL);
+ status = CONTROL_TIMEOUT;
+ goto host_transfer_control_end;
+ }
+ }
+
+ delayJCB;
+
+ Host_configure_pipe_token(P_CONTROL, TOKEN_SETUP);
+ Host_ack_setup_ready();
+ Host_unfreeze_pipe(P_CONTROL);
+
+ // Build and send the setup request fields
+ Host_reset_pipe_fifo_access(P_CONTROL);
+
+ if( Is_usb_read_enabled(P_CONTROL ) )
+ {
+ printf("Error PIPE cannot be written\n\r");
+ while(1);
+ }
+
+ Host_write_pipe_data(P_CONTROL, 8, usb_request.bmRequestType);
+ Host_write_pipe_data(P_CONTROL, 8, usb_request.bRequest);
+ Host_write_pipe_data(P_CONTROL, 16, usb_format_mcu_to_usb_data(16, usb_request.wValue));
+ Host_write_pipe_data(P_CONTROL, 16, usb_format_mcu_to_usb_data(16, usb_request.wIndex));
+ Host_write_pipe_data(P_CONTROL, 16, usb_format_mcu_to_usb_data(16, usb_request.wLength));
+ Host_send_setup();
+
+ while (!Is_host_setup_ready()) // Wait for SETUP ack
+ {
+//jcb clear errors
+ UOTGHS->UOTGHS_HSTPIPERR[0] = 0;
+ if (Is_host_emergency_exit())
+ {
+ Host_freeze_pipe(P_CONTROL);
+ Host_reset_pipe(P_CONTROL);
+ status = CONTROL_TIMEOUT;
+ goto host_transfer_control_end;
+ }
+ if (Is_host_pipe_error(P_CONTROL)) // Any error?
+ {
+ TRACE_OTG("HSTPIPERR[0]= 0x%X\n\r", UOTGHS->UOTGHS_HSTPIPERR[P_CONTROL]);
+ c = Host_error_status(P_CONTROL);
+ Host_ack_all_errors(P_CONTROL);
+ status = c; // Send error status
+ goto host_transfer_control_end;
+ }
+ }
+
+ // Setup token sent; now send IN or OUT token
+ // Before just wait 1 SOF
+ Usb_ack_event(EVT_HOST_SOF);
+// Host_freeze_pipe(P_CONTROL);
+// data_length = usb_request.wLength;
+ while (!Is_usb_event(EVT_HOST_SOF)) // Wait 1 SOF
+ {
+ if (Is_host_emergency_exit())
+ {
+ Host_freeze_pipe(P_CONTROL);
+ Host_reset_pipe(P_CONTROL);
+ status = CONTROL_TIMEOUT;
+ goto host_transfer_control_end;
+ }
+ }
+ delayJCB;
+ Host_freeze_pipe(P_CONTROL);
+ data_length = usb_request.wLength;
+
+ // IN request management ---------------------------------------------
+ if (usb_request.bmRequestType & 0x80) // Data stage IN (bmRequestType.D7 == 1)
+ {
+ Host_disable_continuous_in_mode(P_CONTROL);
+ Host_configure_pipe_token(P_CONTROL, TOKEN_IN);
+ Host_ack_control_in_received_free();
+
+ while (data_length)
+ {
+ Host_unfreeze_pipe(P_CONTROL);
+ private_sof_counter = 0; // Reset the counter in SOF detection subroutine
+ while (!Is_host_control_in_received())
+ {
+ if (Is_host_emergency_exit())
+ {
+ Host_freeze_pipe(P_CONTROL);
+ Host_reset_pipe(P_CONTROL);
+ status = CONTROL_TIMEOUT;
+ goto host_transfer_control_end;
+ }
+ if (Is_host_pipe_error(P_CONTROL)) // Any error?
+ {
+ TRACE_OTG("HSTPIPERR[0]= 0x%X\n\r", UOTGHS->UOTGHS_HSTPIPERR[P_CONTROL]);
+ c = Host_error_status(P_CONTROL);
+ Host_ack_all_errors(P_CONTROL);
+ status = c; // Send error status
+ goto host_transfer_control_end;
+ }
+ if (Is_host_stall(P_CONTROL))
+ {
+ printf("STALL");
+ Host_ack_stall(P_CONTROL);
+ status = CONTROL_STALL;
+ goto host_transfer_control_end;
+ }
+#if TIMEOUT_DELAY_ENABLE == ENABLE
+ if (1000 < host_get_timeout()) // Count 1s
+ {
+ Host_freeze_pipe(P_CONTROL);
+ Host_reset_pipe(P_CONTROL);
+ status = CONTROL_TIMEOUT;
+ goto host_transfer_control_end;
+ }
+#endif
+ }
+ Host_reset_pipe_fifo_access(P_CONTROL);
+ printf("pipe size: 0x%X\n\r", Host_get_pipe_size(P_CONTROL));
+ printf("byte count: 0x%X\n\r", Host_byte_count(P_CONTROL));
+ printf("HSTPIPCFG: 0x%X\n\r", UOTGHS->UOTGHS_HSTPIPCFG[P_CONTROL]);
+
+
+ c = Host_get_pipe_size(P_CONTROL) - Host_byte_count(P_CONTROL);
+
+ data_length = host_read_p_rxpacket(P_CONTROL, data_pointer, data_length, &data_pointer);
+
+ if (usb_request.incomplete_read || c) data_length = 0;
+ Host_freeze_pipe(P_CONTROL);
+ Host_ack_control_in_received_free();
+
+ // In low-speed mode, the USB IP may have not yet sent the ACK at this
+ // point. The USB IP does not support a new start of transaction request
+ // from the firmware if the ACK has not been sent. The only means of
+ // making sure the ACK has been sent is to wait for the next Keep-Alive
+ // before starting a new transaction.
+ if (Is_usb_low_speed_mode())
+ {
+ Usb_ack_event(EVT_HOST_SOF);
+ if ((sav_glob_int_en = Is_global_interrupt_enabled())) Disable_global_interrupt();
+ Host_ack_sof();
+ (void)Is_host_sof_interrupt_enabled();
+ if (sav_glob_int_en) Enable_global_interrupt();
+ Host_enable_sof_interrupt();
+ while (!Is_usb_event(EVT_HOST_SOF)) // Wait for next Keep-Alive
+ {
+ if (Is_host_emergency_exit())
+ {
+ Host_freeze_pipe(P_CONTROL);
+ Host_reset_pipe(P_CONTROL);
+ status = CONTROL_TIMEOUT;
+ goto host_transfer_control_end;
+ }
+ }
+ }
+ } // End of IN data stage
+
+ Host_configure_pipe_token(P_CONTROL, TOKEN_OUT);
+ Host_ack_control_out_ready_send();
+ Host_unfreeze_pipe(P_CONTROL);
+ while (!Is_host_control_out_ready())
+ {
+ if (Is_host_emergency_exit())
+ {
+ Host_freeze_pipe(P_CONTROL);
+ Host_reset_pipe(P_CONTROL);
+ status = CONTROL_TIMEOUT;
+ goto host_transfer_control_end;
+ }
+ if (Is_host_pipe_error(P_CONTROL)) // Any error?
+ {
+ TRACE_OTG("HSTPIPERR[0]= 0x%X\n\r", UOTGHS->UOTGHS_HSTPIPERR[P_CONTROL]);
+ c = Host_error_status(P_CONTROL);
+ Host_ack_all_errors(P_CONTROL);
+ status = c; // Send error status
+ goto host_transfer_control_end;
+ }
+ if (Is_host_stall(P_CONTROL))
+ {
+ Host_ack_stall(P_CONTROL);
+ status = CONTROL_STALL;
+ goto host_transfer_control_end;
+ }
+ }
+ Host_ack_control_out_ready();
+ }
+
+ // OUT request management --------------------------------------------
+ else // Data stage OUT (bmRequestType.D7 == 0)
+ {
+ Host_configure_pipe_token(P_CONTROL, TOKEN_OUT);
+ Host_ack_control_out_ready();
+ while (data_length)
+ {
+ Host_unfreeze_pipe(P_CONTROL);
+ Host_reset_pipe_fifo_access(P_CONTROL);
+ data_length = host_write_p_txpacket(P_CONTROL, data_pointer, data_length, (const void **)&data_pointer);
+ Host_send_control_out();
+ while (!Is_host_control_out_ready())
+ {
+ if (Is_host_emergency_exit())
+ {
+ Host_freeze_pipe(P_CONTROL);
+ Host_reset_pipe(P_CONTROL);
+ status = CONTROL_TIMEOUT;
+ goto host_transfer_control_end;
+ }
+ if (Is_host_pipe_error(P_CONTROL)) // Any error?
+ {
+ TRACE_OTG("HSTPIPERR[0]= 0x%X\n\r", UOTGHS->UOTGHS_HSTPIPERR[P_CONTROL]);
+ c = Host_error_status(P_CONTROL);
+ Host_ack_all_errors(P_CONTROL);
+ status = c; // Send error status
+ goto host_transfer_control_end;
+ }
+ if (Is_host_stall(P_CONTROL))
+ {
+ Host_ack_stall(P_CONTROL);
+ status = CONTROL_STALL;
+ goto host_transfer_control_end;
+ }
+ }
+ Host_ack_control_out_ready();
+ } // End of OUT data stage
+
+ Host_freeze_pipe(P_CONTROL);
+ Host_configure_pipe_token(P_CONTROL, TOKEN_IN);
+ Host_ack_control_in_received_free();
+ Host_unfreeze_pipe(P_CONTROL);
+ while (!Is_host_control_in_received())
+ {
+ if (Is_host_emergency_exit())
+ {
+ Host_freeze_pipe(P_CONTROL);
+ Host_reset_pipe(P_CONTROL);
+ status = CONTROL_TIMEOUT;
+ goto host_transfer_control_end;
+ }
+ if (Is_host_pipe_error(P_CONTROL)) // Any error?
+ {
+ TRACE_OTG("HSTPIPERR[0]= 0x%X\n\r", UOTGHS->UOTGHS_HSTPIPERR[P_CONTROL]);
+ c = Host_error_status(P_CONTROL);
+ Host_ack_all_errors(P_CONTROL);
+ status = c; // Send error status
+ goto host_transfer_control_end;
+ }
+ if (Is_host_stall(P_CONTROL))
+ {
+ Host_ack_stall(P_CONTROL);
+ status = CONTROL_STALL;
+ goto host_transfer_control_end;
+ }
+ }
+ Host_ack_control_in_received();
+ Host_freeze_pipe(P_CONTROL);
+ Host_free_control_in();
+ }
+
+host_transfer_control_end:
+ if (!sav_int_sof_enable) // Restore SOF interrupt enable
+ {
+ if ((sav_glob_int_en = Is_global_interrupt_enabled())) Disable_global_interrupt();
+ Host_disable_sof_interrupt();
+ (void)Is_host_sof_interrupt_enabled();
+ if (sav_glob_int_en) Enable_global_interrupt();
+ }
+
+ return status;
+}
+
+
+#endif // USB_HOST_FEATURE == ENABLED
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/enum/host/usb_host_enum.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/enum/host/usb_host_enum.h
new file mode 100644
index 0000000..5fe38a1
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/enum/host/usb_host_enum.h
@@ -0,0 +1,384 @@
+/* This header file is part of the AVR Software Framework 2.0.0 release */
+
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief Processing of USB host enumeration requests.
+ *
+ * This file contains the USB control pipe management routines
+ * corresponding to the standard enumeration process (refer to chapter 9 of
+ * the USB specification).
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _USB_HOST_ENUM_H_
+#define _USB_HOST_ENUM_H_
+
+
+//_____ I N C L U D E S ____________________________________________________
+
+#include "conf_usb.h"
+
+#if USB_HOST_FEATURE == DISABLED
+ #error usb_host_enum.h is #included although USB_HOST_FEATURE is disabled
+#endif
+
+
+#include "compiler.h"
+#include "usb_drv.h"
+#include "usb_task.h"
+
+
+//! @defgroup host_enum USB host enumeration functions module
+//! @{
+
+
+//_____ M A C R O S ________________________________________________________
+
+
+//_____ S T A N D A R D D E F I N I T I O N S ___________________________
+
+//! USB Setup Data
+typedef struct
+{
+ U8 bmRequestType; //!< Characteristics of the request
+ U8 bRequest; //!< Specific request
+ U16 wValue; //!< Field that varies according to request
+ U16 wIndex; //!< Field that varies according to request
+ U16 wLength; //!< Number of bytes to transfer if Data
+ Bool incomplete_read; //!< TRUE: only one read
+} S_usb_setup_data;
+
+//! Interface
+typedef struct
+{
+ U8 interface_nb;
+ U8 altset_nb;
+ U8 nb_ep;
+ U8 uclass;
+ U8 subclass;
+ U8 protocol;
+ U8 ep_pipe[MAX_EP_PER_INTERFACE];
+} S_interface;
+
+#define CONTROL_GOOD 0x00
+#define CONTROL_DATA_TOGGLE 0x01
+#define CONTROL_DATA_PID 0x02
+#define CONTROL_PID 0x04
+#define CONTROL_TIMEOUT 0x08
+#define CONTROL_CRC16 0x10
+#define CONTROL_STALL 0x20
+#define CONTROL_NO_DEVICE 0x40
+
+//! Offsets common to all descriptor types
+#define OFFSET_DESCRIPTOR_LENGTH 0
+#define OFFSET_FIELD_DESCRIPTOR_TYPE 1
+
+//! Offsets in device descriptors
+#define OFFSET_FIELD_MAXPACKETSIZE 7
+#define OFFSET_FIELD_VID 8
+#define OFFSET_FIELD_PID 10
+#define OFFSET_FIELD_NB_CONFIGURATION 17
+
+//! Offsets in configuration descriptors
+#define OFFSET_FIELD_TOTAL_LENGTH 2
+#define OFFSET_FIELD_NB_INTERFACE 4
+#define OFFSET_FIELD_CONFIGURATION_NB 5
+#define OFFSET_FIELD_BMATTRIBUTES 7
+#define REMOTE_WAKEUP_BIT 5
+#define REMOTE_WAKEUP_MASK (1 << REMOTE_WAKEUP_BIT)
+#define SELF_POWERED_BIT 6
+#define SELF_POWERED_MASK (1 << SELF_POWERED_BIT)
+#define OFFSET_FIELD_MAXPOWER 8
+
+//! Offsets in interface descriptors
+#define OFFSET_FIELD_INTERFACE_NB 2
+#define OFFSET_FIELD_ALT 3
+#define OFFSET_FIELD_NB_OF_EP 4
+#define OFFSET_FIELD_CLASS 5
+#define OFFSET_FIELD_SUB_CLASS 6
+#define OFFSET_FIELD_PROTOCOL 7
+
+//! Offsets in endpoint descriptors
+#define OFFSET_FIELD_EP_ADDR 2
+#define OFFSET_FIELD_EP_TYPE 3
+#define OFFSET_FIELD_EP_SIZE 4
+#define OFFSET_FIELD_EP_INTERVAL 6
+
+//! @brief Send a "clear endpoint feature" request
+//! @param ep U8: Target endpoint
+//! @return Status
+#define host_clear_endpoint_feature(ep) \
+(\
+ usb_request.bmRequestType = 0x02,\
+ usb_request.bRequest = CLEAR_FEATURE,\
+ usb_request.wValue = FEATURE_ENDPOINT_HALT << 8,\
+ usb_request.wIndex = (ep),\
+ usb_request.wLength = 0,\
+ usb_request.incomplete_read = FALSE,\
+ host_transfer_control(data_stage)\
+)
+
+//! @brief Send a "get configuration" request
+//! @return Status
+#define host_get_configuration() \
+(\
+ usb_request.bmRequestType = 0x80,\
+ usb_request.bRequest = GET_CONFIGURATION,\
+ usb_request.wValue = 0,\
+ usb_request.wIndex = 0,\
+ usb_request.wLength = 1,\
+ usb_request.incomplete_read = FALSE,\
+ host_transfer_control(data_stage)\
+)
+
+//! @brief Send a "set configuration" request
+//! @param cfg_nb U8: Configuration to activate
+//! @return Status
+#define host_set_configuration(cfg_nb) \
+(\
+ usb_request.bmRequestType = 0x00,\
+ usb_request.bRequest = SET_CONFIGURATION,\
+ usb_request.wValue = (cfg_nb),\
+ usb_request.wIndex = 0,\
+ usb_request.wLength = 0,\
+ usb_request.incomplete_read = FALSE,\
+ host_transfer_control(data_stage)\
+)
+
+//! @brief Send a "set interface" request to specify an alternate setting for an interface
+//! @param interface_nb U8: Interface
+//! @param alt_setting U8: Alternate setting
+//! @return Status
+#define host_set_interface(interface_nb, alt_setting) \
+(\
+ usb_request.bmRequestType = 0x01,\
+ usb_request.bRequest = SET_INTERFACE,\
+ usb_request.wValue = (alt_setting),\
+ usb_request.wIndex = (interface_nb),\
+ usb_request.wLength = 0,\
+ usb_request.incomplete_read = FALSE,\
+ host_transfer_control(data_stage)\
+)
+
+//! @brief Send an incomplete "get device desriptor" request
+//! The descriptor received is stored in the data_stage array.
+//! The received descriptors are limited to the length of the control pipe.
+//! @return Status
+#define host_get_device_descriptor_incomplete() \
+(\
+ usb_request.bmRequestType = 0x80,\
+ usb_request.bRequest = GET_DESCRIPTOR,\
+ usb_request.wValue = DEVICE_DESCRIPTOR << 8,\
+ usb_request.wIndex = 0,\
+ usb_request.wLength = 64,\
+ usb_request.incomplete_read = TRUE,\
+ host_transfer_control(data_stage)\
+)
+
+//! @brief Send a "get device desriptor" request
+//! The descriptor received is stored in the data_stage array.
+//! @return Status
+#define host_get_device_descriptor() \
+(\
+ usb_request.bmRequestType = 0x80,\
+ usb_request.bRequest = GET_DESCRIPTOR,\
+ usb_request.wValue = DEVICE_DESCRIPTOR << 8,\
+ usb_request.wIndex = 0,\
+ usb_request.wLength = 18,\
+ usb_request.incomplete_read = FALSE,\
+ host_transfer_control(data_stage)\
+)
+
+//! @brief Send a "get device configuration descriptor" request
+//! The configuration descriptor received is stored in the data_stage array.
+//! @param cfg_ix U8: Index of the configuration descriptor to get
+//! @return Status
+#define host_get_configuration_descriptor(cfg_ix) \
+(\
+ usb_request.bmRequestType = 0x80,\
+ usb_request.bRequest = GET_DESCRIPTOR,\
+ usb_request.wValue = CONFIGURATION_DESCRIPTOR << 8 | (cfg_ix),\
+ usb_request.wIndex = 0,\
+ usb_request.wLength = SIZEOF_DATA_STAGE,\
+ usb_request.incomplete_read = FALSE,\
+ host_transfer_control(data_stage)\
+)
+
+//! @brief Send a "set address" request
+//! @param addr U8: Address assigned to the device
+//! @return Status
+#define host_set_address(addr) \
+(\
+ usb_request.bmRequestType = 0x00,\
+ usb_request.bRequest = SET_ADDRESS,\
+ usb_request.wValue = (addr),\
+ usb_request.wIndex = 0,\
+ usb_request.wLength = 0,\
+ usb_request.incomplete_read = FALSE,\
+ host_transfer_control(data_stage)\
+)
+
+//! @brief Send a "set feature" "device remote wake-up"
+//! @return Status
+#define host_set_feature_remote_wakeup() \
+(\
+ usb_request.bmRequestType = 0x00,\
+ usb_request.bRequest = SET_FEATURE,\
+ usb_request.wValue = 1,\
+ usb_request.wIndex = 1,\
+ usb_request.wLength = 0,\
+ usb_request.incomplete_read = FALSE,\
+ host_transfer_control(data_stage)\
+)
+
+//! @brief Send the mass-storage specific request "get max LUN"
+//! @return Status
+#define host_ms_get_max_lun() \
+(\
+ usb_request.bmRequestType = 0xA1,\
+ usb_request.bRequest = MS_GET_MAX_LUN,\
+ usb_request.wValue = 0,\
+ usb_request.wIndex = 0,\
+ usb_request.wLength = 1,\
+ usb_request.incomplete_read = FALSE,\
+ host_transfer_control(data_stage)\
+)
+
+//! @brief VID of the connected device
+//! @return U16: VID
+#define Get_VID() (device_VID)
+
+//! @brief PID of the connected device
+//! @return U16: PID
+#define Get_PID() (device_PID)
+
+//! @brief TRUE if the connected device supports remote wake-up
+//! @return Bool: Remote wake-up supported?
+#define Is_device_supports_remote_wakeup() (Tst_bits(bmattributes, REMOTE_WAKEUP_MASK))
+
+//! @brief TRUE if the connected device is self-powered
+//! @return Bool: Self-powered?
+#define Is_device_self_powered() (Tst_bits(bmattributes, SELF_POWERED_MASK))
+
+//! @brief Maximal power consumption ot the connected device (unit is 2 mA)
+//! @return U8: Maximal power
+#define Get_maxpower() (maxpower)
+
+//! @brief Number of supported interfaces in the connected device
+//! @return U8: Number of supported interfaces
+#define Get_nb_supported_interface() (nb_interface_supported)
+
+//! @brief Number of interfaces associated with a supported interface
+//! @param s_interface U8: The supported interface number
+//! @return U8: Number of interfaces
+#define Get_interface_number(s_interface) (interface_supported[(s_interface)].interface_nb)
+
+//! @brief Number of alternate settings associated with a supported interface
+//! @param s_interface U8: The supported interface number
+//! @return U8: Number of alternate settings
+#define Get_altset_nb(s_interface) (interface_supported[(s_interface)].altset_nb)
+
+//! @brief USB class associated with the supported interface
+//! @param s_interface U8: The supported interface number
+//! @return U8: Class
+#define Get_class(s_interface) (interface_supported[(s_interface)].uclass)
+
+//! @brief USB subclass associated with the supported interface
+//! @param s_interface U8: The supported interface number
+//! @return U8: Subclass
+#define Get_subclass(s_interface) (interface_supported[(s_interface)].subclass)
+
+//! @brief USB protocol associated with the supported interface
+//! @param s_interface U8: The supported interface number
+//! @return U8: protocol
+#define Get_protocol(s_interface) (interface_supported[(s_interface)].protocol)
+
+//! @brief Number of endpoints associated with a supported interface
+//! @param s_interface U8: The supported interface number
+//! @return U8: Number of endpoints
+#define Get_nb_ep(s_interface) (interface_supported[(s_interface)].nb_ep)
+
+//! @brief Endpoint pipe associated with the supported interface
+//! @param s_interface U8: The supported interface number
+//! @param n_ep U8: The endpoint number in this interface
+//! @return U8: Endpoint pipe
+#define Get_ep_pipe(s_interface, n_ep) (interface_supported[(s_interface)].ep_pipe[(n_ep)])
+
+//! @brief Endpoint number associated with the supported interface
+//! @param s_interface U8: The supported interface number
+//! @param n_ep U8: The endpoint number in this interface
+//! @return U8: Endpoint number
+#define Get_ep_nbr(s_interface, n_ep) (Host_get_pipe_endpoint_number(Get_ep_pipe(s_interface, n_ep)))
+
+//! @brief Endpoint type associated with the supported interface
+//! @param s_interface U8: The supported interface number
+//! @param n_ep U8: The endpoint number in this interface
+//! @return U8: Endpoint type
+#define Get_ep_type(s_interface, n_ep) (Host_get_pipe_type(Get_ep_pipe(s_interface, n_ep)))
+
+//! @brief TRUE if the endpoint direction associated with the supported interface is IN
+//! @param s_interface U8: The supported interface number
+//! @param n_ep U8: The endpoint number in this interface
+//! @return Bool: Endpoint direction IN?
+#define Is_ep_in(s_interface, n_ep) (Host_get_pipe_token(Get_ep_pipe(s_interface, n_ep)) == TOKEN_IN)
+
+//! @brief Extract token information from endpoint address
+//! @param ep_addr U8: Endpoint address
+//! @return TOKEN_IN/TOKEN_OUT: Pipe token
+#define Get_pipe_token(ep_addr) ((Get_desc_ep_dir(ep_addr)) ? TOKEN_IN : TOKEN_OUT)
+
+extern Bool host_check_VID_PID(void);
+extern Bool host_check_class(void);
+extern Status_t host_transfer_control(void *data_pointer);
+
+extern volatile U16 device_VID;
+extern volatile U16 device_PID;
+extern volatile U8 bmattributes;
+extern volatile U8 maxpower;
+extern volatile U8 nb_interface_supported;
+extern volatile S_interface interface_supported[MAX_INTERFACE_SUPPORTED];
+
+
+//! @}
+
+
+#endif // _USB_HOST_ENUM_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/enum/host/usb_host_task.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/enum/host/usb_host_task.c
new file mode 100644
index 0000000..71b17c7
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/enum/host/usb_host_task.c
@@ -0,0 +1,1171 @@
+/* This source file is part of the AVR Software Framework 2.0.0 release */
+
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief Management of the USB host controller.
+ *
+ * This file manages the host controller, the host enumeration process and
+ * the suspend/resume host requests.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+//_____ I N C L U D E S ___________________________________________________
+
+#include "conf_usb.h"
+
+
+#if USB_HOST_FEATURE == ENABLED
+
+#ifdef FREERTOS_USED
+#include "libfreertos.h"
+#include "FreeRTOSConfig.h"
+#include "FreeRTOSTask.h"
+#endif
+#include "usb_drv.h"
+#include "usb_task.h"
+#include "usb_host_enum.h"
+#include "usb_host_task.h"
+#include "chip.h"
+
+//_____ M A C R O S ________________________________________________________
+
+
+//_____ D E F I N I T I O N S ______________________________________________
+
+static const char log_device_connected[] = "Device connected\n";
+static const char log_unsupported_device[] = "Unsupported device\n";
+static const char log_device_enumerated[] = "Device enumerated\n";
+static const char log_usb_suspended[] = "USB suspended\n";
+static const char log_usb_resumed[] = "USB resumed\n";
+
+#if USB_HOST_PIPE_INTERRUPT_TRANSFER == ENABLE
+volatile Bool g_sav_int_sof_enable;
+volatile S_pipe_int it_pipe_str[MAX_PEP_NB];
+#endif
+
+//!
+//! Public: U8 device_state
+//! Its value represents the current state of the
+//! device connected to the USB host controller
+//! Value can be:
+//! - DEVICE_ATTACHED
+//! - DEVICE_POWERED
+//! - DEVICE_SUSPENDED
+//! - DEVICE_DEFAULT
+//! - DEVICE_ADDRESSED
+//! - DEVICE_CONFIGURED
+//! - DEVICE_ERROR
+//! - DEVICE_UNATTACHED
+//! - DEVICE_READY
+//! - DEVICE_WAIT_RESUME
+//!
+volatile U8 device_state;
+
+
+volatile U8 usb_device_connected;
+
+
+//! For control requests management over control pipe
+volatile S_usb_setup_data usb_request;
+
+//!
+//! Public: U8 data_stage[SIZEOF_DATA_STAGE]
+//! Internal RAM buffer for USB data stage content
+//! This buffer is required to setup host enumeration process
+//! It contains the device descriptors received.
+//! Depending on the device descriptors length, its size can be optimized
+//! with the SIZEOF_DATA_STAGE define of conf_usb.h file
+//!
+U8 data_stage[SIZEOF_DATA_STAGE];
+
+volatile U8 device_status;
+
+volatile Bool request_resume;
+
+//! As internal host Start-of-Frame counter
+static U16 sof_cnt;
+
+#ifdef FREERTOS_USED
+//! Handle to the USB Host task
+xTaskHandle usb_host_tsk = NULL;
+#endif
+
+
+//_____ D E C L A R A T I O N S ____________________________________________
+
+//!
+//! @brief This function initializes the USB host controller.
+//!
+//! This function enables the USB controller for host-mode operation.
+//!
+void usb_host_task_init(void)
+{
+ //! @todo Implement this on the silicon version
+ //Pll_start_auto();
+ //Wait_pll_ready();
+ Disable_global_interrupt();
+ Usb_disable();
+ (void)Is_usb_enabled();
+ Enable_global_interrupt();
+ Usb_disable_otg_pad();
+ Usb_enable_otg_pad();
+ Usb_enable();
+ Usb_unfreeze_clock();
+ (void)Is_usb_clock_frozen();
+#if USB_VBOF_ACTIVE_LEVEL == HIGH
+ Usb_set_vbof_active_high();
+#else // USB_VBOF_ACTIVE_LEVEL == LOW
+ Usb_set_vbof_active_low();
+#endif
+ Usb_output_vbof_pin();
+// Usb_disable_vbus_hw_control(); // Force VBus generation without time-out
+ Usb_enable_vbus_hw_control();
+ Host_enable_device_disconnection_interrupt();
+#if USB_HOST_PIPE_INTERRUPT_TRANSFER == ENABLE
+ reset_it_pipe_str();
+#endif
+ device_state = DEVICE_UNATTACHED;
+ Host_clear_device_status();
+ Host_ack_request_resume();
+ sof_cnt = 0;
+
+#ifdef FREERTOS_USED
+ if ( xTaskCreate( usb_host_task, configTSK_USB_HST_NAME, configTSK_USB_HST_STACK_SIZE, NULL, configTSK_USB_HST_PRIORITY, &usb_host_tsk ) != pdPASS )
+ {
+ printf( "Failed to create usb_host_task\r\n" ) ;
+ }
+#endif // FREERTOS_USED
+}
+
+
+//!
+//! @brief Entry point of the USB host management
+//!
+//! The aim is to manage the target device connection and enumeration.
+//! Depending on device_state, the function performs the required operations
+//! to get the device enumerated and configured.
+//! Once the device is operational, device_state is DEVICE_READY.
+//! This state should be tested by the host task before sending any
+//! applicative request to the device.
+//! This function is called from the usb_task function depending on the USB
+//! operating mode (device or host) currently engaged.
+//!
+//! \image html usb_host_task.jpg "USB Host Task Overview"
+//!
+#ifdef FREERTOS_USED
+void usb_host_task(void *pvParameters)
+#else
+void usb_host_task(void)
+#endif
+{
+ static Bool sav_int_sof_enable;
+ U8 pipe;
+
+#ifdef FREERTOS_USED
+ portTickType xLastWakeTime;
+
+ xLastWakeTime = xTaskGetTickCount();
+ while (TRUE)
+ {
+ vTaskDelayUntil(&xLastWakeTime, configTSK_USB_HST_PERIOD);
+
+#endif // FREERTOS_USED
+ switch (device_state)
+ {
+ //------------------------------------------------------
+ // DEVICE_UNATTACHED state
+ //
+ // - Default init state
+ // - Try to give device power supply
+ //
+ case DEVICE_UNATTACHED:
+ nb_interface_supported = 0;
+ Host_clear_device_status(); // Reset device status
+ Usb_clear_all_event(); // Clear all software events
+ Host_disable_sof();
+ host_disable_all_pipes();
+
+ Usb_enable_vbus(); // Give at least device power supply!
+ // If VBus OK, wait for device connection
+ if (Is_usb_vbus_high()) device_state = DEVICE_ATTACHED;
+ break;
+
+ //------------------------------------------------------
+ // DEVICE_ATTACHED state
+ //
+ // - VBus is on
+ // - Try to detect device connection
+ //
+ case DEVICE_ATTACHED:
+// if (Is_host_device_connection()) // Device pull-up detected
+ if( usb_device_connected == 1 )
+ {
+ printf("Device Attached\n\r");
+ Usb_ack_bconnection_error_interrupt();
+ Usb_ack_vbus_error_interrupt();
+ Host_ack_device_connection();
+
+ // Now device is connected, enable disconnection interrupt
+ Host_enable_device_disconnection_interrupt();
+ Enable_global_interrupt();
+ Host_clear_device_status(); // Reset device status
+ Host_enable_sof(); // Start SOF generation
+ Host_enable_sof_interrupt(); // SOF will be detected under interrupt
+ sof_cnt = 0;
+ while (sof_cnt < 100) // Wait 100 ms before USB reset
+ {
+ if (Is_usb_event(EVT_HOST_SOF)) Usb_ack_event(EVT_HOST_SOF), sof_cnt++; // Count SOFs
+ if (Is_host_emergency_exit() || Is_usb_bconnection_error_interrupt()) goto device_attached_error;
+ }
+ Disable_global_interrupt();
+ Host_disable_device_disconnection_interrupt();
+ Host_send_reset(); // First USB reset
+ (void)Is_host_sending_reset();
+ Enable_global_interrupt();
+ Usb_ack_event(EVT_HOST_SOF);
+ // Active wait for end of reset send
+ while (Is_host_sending_reset())
+ {
+ // The USB macro does not signal the end of reset when a disconnection occurs
+ if (Is_host_device_disconnection())
+ {
+ // Stop sending USB reset
+ Host_stop_sending_reset();
+ }
+ }
+ Host_ack_reset_sent();
+ if (!Is_host_device_disconnection())
+ {
+ // Workaround for some buggy devices with powerless pull-up
+ // usually low-speed where data line rises slowly and can be interpreted as disconnection
+ for (sof_cnt = 0; sof_cnt < 0xFFFF; sof_cnt++) // Basic time-out counter
+ {
+ // If we detect SOF, device is still alive and connected, just clear false disconnect flag
+ if (Is_usb_event(EVT_HOST_SOF) && Is_host_device_disconnection())
+ {
+ Host_ack_device_connection();
+ Host_ack_device_disconnection();
+ break;
+ }
+ }
+ }
+ Host_enable_device_disconnection_interrupt();
+ sof_cnt = 0;
+ while (sof_cnt < 100) // Wait 100 ms after USB reset
+ {
+ if (Is_usb_event(EVT_HOST_SOF)) Usb_ack_event(EVT_HOST_SOF), sof_cnt++; // Count SOFs
+ if (Is_host_emergency_exit() || Is_usb_bconnection_error_interrupt()) goto device_attached_error;
+ }
+ device_state = DEVICE_POWERED;
+ LOG_STR(log_device_connected);
+ Host_device_connection_action();
+ sof_cnt = 0;
+ }
+device_attached_error:
+ // Device connection error, or VBus pb -> Retry the connection process from the beginning
+ if (Is_usb_bconnection_error_interrupt() || Is_usb_vbus_error_interrupt() || Is_usb_vbus_low())
+ {
+ device_state = DEVICE_UNATTACHED;
+ Usb_ack_bconnection_error_interrupt();
+ Usb_ack_vbus_error_interrupt();
+ Host_disable_sof();
+ }
+ break;
+
+ //------------------------------------------------------
+ // DEVICE_POWERED state
+ //
+ // - Device connection (attach) has been detected,
+ // - Wait 100 ms and configure default control pipe
+ //
+ case DEVICE_POWERED:
+ if (Is_usb_event(EVT_HOST_SOF))
+ {
+ Usb_ack_event(EVT_HOST_SOF);
+ if (sof_cnt++ >= 100) // Wait 100 ms
+ {
+ Host_enable_pipe(P_CONTROL);
+ if( Host_configure_pipe(P_CONTROL,
+ 0,
+ EP_CONTROL,
+ TYPE_CONTROL,
+ TOKEN_SETUP,
+ 64,
+ SINGLE_BANK) == 0 )
+ {
+ TRACE_OTG("Error in pipe configure\n\r");
+ }
+ device_state = DEVICE_DEFAULT;
+ }
+ }
+ break;
+
+ //------------------------------------------------------
+ // DEVICE_DEFAULT state
+ //
+ // - Get device descriptor
+ // - Reconfigure control pipe according to device control endpoint
+ // - Assign device address
+ //
+ case DEVICE_DEFAULT:
+ // Get first device descriptor
+ if (host_get_device_descriptor_incomplete() == CONTROL_GOOD)
+ {
+ printf("Device default\n\r");
+ sof_cnt = 0;
+ while (sof_cnt < 20) // Wait 20 ms before USB reset (special buggy devices...)
+ {
+ if (Is_usb_event(EVT_HOST_SOF)) Usb_ack_event(EVT_HOST_SOF), sof_cnt++;
+ if (Is_host_emergency_exit() || Is_usb_bconnection_error_interrupt()) break;
+ }
+ Disable_global_interrupt();
+ Host_disable_device_disconnection_interrupt();
+ Host_send_reset(); // First USB reset
+ (void)Is_host_sending_reset();
+ Enable_global_interrupt();
+ Usb_ack_event(EVT_HOST_SOF);
+ // Active wait for end of reset send
+ while (Is_host_sending_reset())
+ {
+ // The USB macro does not signal the end of reset when a disconnection occurs
+ if (Is_host_device_disconnection())
+ {
+ // Stop sending USB reset
+ Host_stop_sending_reset();
+ }
+ }
+ Host_ack_reset_sent();
+ if (!Is_host_device_disconnection())
+ {
+ // Workaround for some buggy devices with powerless pull-up
+ // usually low-speed where data line rises slowly and can be interpreted as disconnection
+ for (sof_cnt = 0; sof_cnt < 0xFFFF; sof_cnt++) // Basic time-out counter
+ {
+ // If we detect SOF, device is still alive and connected, just clear false disconnect flag
+ if (Is_usb_event(EVT_HOST_SOF) && Is_host_device_disconnection())
+ {
+ Host_ack_device_connection();
+ Host_ack_device_disconnection();
+ break;
+ }
+ }
+ }
+ Host_enable_device_disconnection_interrupt();
+ sof_cnt = 0;
+ while (sof_cnt < 200) // Wait 200 ms after USB reset
+ {
+ if (Is_usb_event(EVT_HOST_SOF)) Usb_ack_event(EVT_HOST_SOF), sof_cnt++;
+ if (Is_host_emergency_exit() || Is_usb_bconnection_error_interrupt()) break;
+ }
+ Host_disable_pipe(P_CONTROL);
+ Host_unallocate_memory(P_CONTROL);
+ Host_enable_pipe(P_CONTROL);
+ // Reconfigure the control pipe according to the device control endpoint
+ if( Host_configure_pipe(P_CONTROL,
+ 0,
+ EP_CONTROL,
+ TYPE_CONTROL,
+ TOKEN_SETUP,
+ data_stage[OFFSET_FIELD_MAXPACKETSIZE],
+ SINGLE_BANK) == 0 )
+ {
+ TRACE_OTG("Error in pipe configure\n\r");
+ }
+ TRACE_OTG("HSTPIPCFG[0]: 0x%X\n\r", UOTGHS->UOTGHS_HSTPIPCFG[0]);
+ TRACE_OTG("HSTPIPCFG[1]: 0x%X\n\r", UOTGHS->UOTGHS_HSTPIPCFG[1]);
+ TRACE_OTG("HSTPIPCFG[2]: 0x%X\n\r", UOTGHS->UOTGHS_HSTPIPCFG[2]);
+
+ // Give an absolute device address
+ if (host_set_address(DEVICE_ADDRESS) == CONTROL_GOOD)
+ {
+ for (pipe = 0; pipe < MAX_PEP_NB; pipe++)
+ Host_configure_address(pipe, DEVICE_ADDRESS);
+ device_state = DEVICE_ADDRESSED;
+ }
+ else device_state = DEVICE_ERROR, TRACE_OTG("1");
+ }
+ else device_state = DEVICE_ERROR;
+ break;
+
+ //------------------------------------------------------
+ // DEVICE_ADDRESSED state
+ //
+ // - Check if VID PID is in supported list
+ //
+ case DEVICE_ADDRESSED:
+ if (host_get_device_descriptor() == CONTROL_GOOD)
+ {
+ printf("Device addressed\n\r");
+ // Detect if the device connected belongs to the supported devices table
+ if (host_check_VID_PID())
+ {
+ Host_set_device_supported();
+ Host_device_supported_action();
+ device_state = DEVICE_CONFIGURED;
+ }
+ else
+ {
+#if HOST_STRICT_VID_PID_TABLE == ENABLE
+ device_state = DEVICE_ERROR;
+ LOG_STR(log_unsupported_device);
+#else
+ device_state = DEVICE_CONFIGURED;
+#endif
+ Host_device_not_supported_action();
+ }
+ }
+ else device_state = DEVICE_ERROR; // Can not get device descriptor
+ break;
+
+ //------------------------------------------------------
+ // DEVICE_CONFIGURED state
+ //
+ // - Configure pipes for the supported interface
+ // - Send Set_configuration() request
+ // - Go to full operating mode (device ready)
+ //
+ case DEVICE_CONFIGURED:
+ if (host_get_configuration_descriptor(0) == CONTROL_GOOD)
+ {
+ printf("Device Configured\n\r");
+ if (host_check_class()) // Class support OK?
+ {
+#if HOST_AUTO_CFG_ENDPOINT == DISABLE
+ User_configure_endpoint(); // User call here instead of autoconfig
+ Host_set_configured(); // Assumes config is OK with user config
+#endif
+ if (Is_host_configured())
+ {
+ if (host_set_configuration(1) == CONTROL_GOOD) // Send Set_configuration
+ {
+ // Device and host are now fully configured
+ // go to DEVICE_READY normal operation
+ device_state = DEVICE_READY;
+ // Monitor device disconnection under interrupt
+ Host_enable_device_disconnection_interrupt();
+ // If user host application requires SOF interrupt event
+ // Keep SOF interrupt enabled, otherwise disable this interrupt
+#if HOST_CONTINUOUS_SOF_INTERRUPT == DISABLE
+ Disable_global_interrupt();
+ Host_disable_sof_interrupt();
+ (void)Is_host_sof_interrupt_enabled();
+ Enable_global_interrupt();
+#endif
+ Host_new_device_connection_action();
+ Enable_global_interrupt();
+ LOG_STR(log_device_enumerated);
+ }
+ else device_state = DEVICE_ERROR; // Problem during Set_configuration request...
+ }
+ }
+ else // Device class not supported...
+ {
+ device_state = DEVICE_ERROR;
+ LOG_STR(log_unsupported_device);
+ Host_device_class_not_supported_action();
+ }
+ }
+ else
+ {
+ printf("Cannot get configuration descriptors\r\n");
+ device_state = DEVICE_ERROR; // Can not get configuration descriptors...
+ }
+ break;
+
+ //------------------------------------------------------
+ // DEVICE_READY state
+ //
+ // - Full standard operating mode
+ // - Nothing to do...
+ //
+ case DEVICE_READY: // Host full standard operating mode!
+ break;
+
+ //------------------------------------------------------
+ // DEVICE_ERROR state
+ //
+ // - Error state
+ // - Do custom action call (probably go to default mode...)
+ //
+ case DEVICE_ERROR: //! @todo
+#if HOST_ERROR_RESTART == ENABLE
+ device_state = DEVICE_UNATTACHED;
+#endif
+ printf("Device Error\n\r");
+ Host_device_error_action();
+ break;
+
+ //------------------------------------------------------
+ // DEVICE_SUSPENDED state
+ //
+ // - Host application request to suspend the device activity
+ // - State machine comes here thanks to Host_request_suspend()
+ //
+ case DEVICE_SUSPENDED:
+ printf("Device Suspended\n\r");
+ if (Is_device_supports_remote_wakeup()) // If the connected device supports remote wake-up
+ {
+ host_set_feature_remote_wakeup(); // Enable this feature...
+ }
+ LOG_STR(log_usb_suspended);
+ sav_int_sof_enable = Is_host_sof_interrupt_enabled(); //Save current SOF interrupt enable state
+ Disable_global_interrupt();
+ Host_disable_sof_interrupt();
+ (void)Is_host_sof_interrupt_enabled();
+ Enable_global_interrupt();
+ Host_ack_sof();
+ Host_disable_sof(); // Stop SOF generation, this generates the suspend state
+ Host_ack_hwup();
+ Host_enable_hwup_interrupt(); // Enable host wake-up interrupt
+ // (this is the unique USB interrupt able to wake up the CPU core from power-down mode)
+ (void)Is_host_hwup_interrupt_enabled(); // Make sure host wake-up interrupt is enabled
+ Usb_freeze_clock();
+ //! @todo Implement this on the silicon version
+ //Stop_pll();
+ Host_suspend_action(); // Custom action here! (e.g. go to power-save mode...)
+ device_state = DEVICE_WAIT_RESUME; // Wait for device resume event
+ break;
+
+ //------------------------------------------------------
+ // DEVICE_WAIT_RESUME state
+ //
+ // Wait in this state till:
+ // - the host receives an upstream resume from the device
+ // - or the host software request the device to resume
+ //
+ case DEVICE_WAIT_RESUME:
+ if (Is_usb_event(EVT_HOST_HWUP) || Is_host_request_resume()) // Remote wake-up has been detected
+ // or local resume request has been received
+ {
+ printf("Device Wait Resume\n\r");
+ if (Is_host_request_resume()) // Not a remote wake-up, but a host application request
+ {
+ // CAUTION: HWUP can be cleared only when USB clock is active
+ //! @todo Implement this on the silicon version
+ //Pll_start_auto(); // First Restart the PLL for USB operation
+ //Wait_pll_ready(); // Make sure PLL is locked
+ Usb_unfreeze_clock(); // Enable clock on USB interface
+ (void)Is_usb_clock_frozen(); // Make sure USB interface clock is enabled
+ Disable_global_interrupt();
+ Host_disable_hwup_interrupt(); // Wake-up interrupt should be disabled as host is now awoken!
+ (void)Is_host_hwup_interrupt_enabled();
+ Enable_global_interrupt();
+ Host_ack_hwup(); // Clear HWUP interrupt flag
+ }
+ Host_enable_sof();
+ Host_send_resume(); // Send downstream resume
+ while (!Is_host_down_stream_resume()); // Wait for downstream resume sent
+ Host_ack_remote_wakeup(); // Ack remote wake-up reception
+ Host_ack_request_resume(); // Ack software request
+ Host_ack_down_stream_resume(); // Ack downstream resume sent
+ Usb_ack_event(EVT_HOST_HWUP); // Ack software event
+ if (sav_int_sof_enable) Host_enable_sof_interrupt(); // Restore SOF interrupt enable state before suspend
+ device_state = DEVICE_READY; // Come back to full operating mode
+ LOG_STR(log_usb_resumed);
+ }
+ break;
+
+ //------------------------------------------------------
+ // default state
+ //
+ // - Default case: ERROR
+ // - Go to DEVICE_UNATTACHED state
+ //
+ default:
+ device_state = DEVICE_UNATTACHED;
+ break;
+ }
+#ifdef FREERTOS_USED
+ }
+#endif
+}
+
+
+//___ F U N C T I O N S F O R P O L L I N G M A N A G E D D A T A F L O W S ___
+
+//!
+//! @brief This function sends nb_data bytes pointed to by ptr_buf on the specified pipe.
+//!
+//! @note This function activates the host SOF interrupt to detect time-outs.
+//! The initial enable state of this interrupt will be restored.
+//!
+//! @param pipe
+//! @param nb_data
+//! @param ptr_buf
+//!
+//! @return Status_t: Pipe status
+//!
+Status_t host_send_data(U8 pipe, U16 nb_data, const void *ptr_buf)
+{
+ Status_t status = PIPE_GOOD; // Frame correctly sent by default
+ Bool sav_int_sof_enable;
+ Bool sav_glob_int_en;
+ U8 nak_timeout;
+#if NAK_TIMEOUT_ENABLE == ENABLE
+ U16 cpt_nak;
+#endif
+
+ sav_int_sof_enable = Is_host_sof_interrupt_enabled(); // Save state of enable SOF interrupt
+ Host_enable_sof_interrupt();
+ Host_configure_pipe_token(pipe, TOKEN_OUT);
+ Host_ack_out_ready(pipe);
+ Host_unfreeze_pipe(pipe);
+ while (nb_data) // While there is something to send...
+ {
+ // Prepare data to be sent
+ Host_reset_pipe_fifo_access(pipe);
+ nb_data = host_write_p_txpacket(pipe, ptr_buf, nb_data, &ptr_buf);
+ private_sof_counter = 0; // Reset the counter in SOF detection subroutine
+#if NAK_TIMEOUT_ENABLE == ENABLE
+ cpt_nak = 0;
+#endif
+ nak_timeout = 0;
+ Host_ack_out_ready_send(pipe);
+ while (!Is_host_out_ready(pipe))
+ {
+ if (Is_host_emergency_exit()) // Async disconnection or role change detected under interrupt
+ {
+ status = PIPE_DELAY_TIMEOUT;
+ Host_reset_pipe(pipe);
+ goto host_send_data_end;
+ }
+#if TIMEOUT_DELAY_ENABLE == ENABLE
+ if (private_sof_counter >= 250) // Count 250 ms (250 SOF)
+ {
+ private_sof_counter = 0;
+ if (nak_timeout++ >= TIMEOUT_DELAY) // Increment time-out and check for overflow
+ {
+ status = PIPE_DELAY_TIMEOUT;
+ Host_reset_pipe(pipe);
+ goto host_send_data_end;
+ }
+ }
+#endif
+ if (Is_host_pipe_error(pipe)) // Error management
+ {
+ status = Host_error_status(pipe);
+ Host_ack_all_errors(pipe);
+ goto host_send_data_end;
+ }
+ if (Is_host_stall(pipe)) // STALL management
+ {
+ status = PIPE_STALL;
+ Host_ack_stall(pipe);
+ goto host_send_data_end;
+ }
+#if NAK_TIMEOUT_ENABLE == ENABLE
+ if (Is_host_nak_received(pipe)) // NAK received
+ {
+ Host_ack_nak_received(pipe);
+ if (cpt_nak++ > NAK_SEND_TIMEOUT)
+ {
+ status = PIPE_NAK_TIMEOUT;
+ Host_reset_pipe(pipe);
+ goto host_send_data_end;
+ }
+ }
+#endif
+ }
+ // Here OUT sent
+ Host_ack_out_ready(pipe);
+ }
+ while (Host_nb_busy_bank(pipe));
+host_send_data_end:
+ Host_freeze_pipe(pipe);
+ // Restore SOF interrupt enable state
+ if (!sav_int_sof_enable)
+ {
+ if ((sav_glob_int_en = Is_global_interrupt_enabled())) Disable_global_interrupt();
+ Host_disable_sof_interrupt();
+ (void)Is_host_sof_interrupt_enabled();
+ if (sav_glob_int_en) Enable_global_interrupt();
+ }
+
+ // And return...
+ return status;
+}
+
+
+//!
+//! @brief This function receives nb_data bytes pointed to by ptr_buf on the specified pipe.
+//!
+//! *nb_data is updated with the final number of data bytes received.
+//!
+//! @note This function activates the host SOF interrupt to detect time-outs.
+//! The initial enable state of this interrupt will be restored.
+//!
+//! @param pipe
+//! @param nb_data
+//! @param ptr_buf
+//!
+//! @return Status_t: Pipe status
+//!
+Status_t host_get_data(U8 pipe, U16 *nb_data, void *ptr_buf)
+{
+ Status_t status = PIPE_GOOD; // Frame correctly received by default
+ Bool sav_int_sof_enable;
+ Bool sav_glob_int_en;
+ U8 nak_timeout;
+ U16 n, i;
+#if NAK_TIMEOUT_ENABLE == ENABLE
+ U16 cpt_nak;
+#endif
+
+ n = *nb_data;
+ sav_int_sof_enable = Is_host_sof_interrupt_enabled();
+ Host_enable_sof_interrupt();
+ Host_enable_continuous_in_mode(pipe);
+ Host_configure_pipe_token(pipe, TOKEN_IN);
+ Host_ack_in_received(pipe);
+ while (n) // While missing data...
+ {
+ Host_free_in(pipe);
+ Host_unfreeze_pipe(pipe);
+ private_sof_counter = 0; // Reset the counter in SOF detection subroutine
+ nak_timeout = 0;
+#if NAK_TIMEOUT_ENABLE == ENABLE
+ cpt_nak = 0;
+#endif
+ while (!Is_host_in_received(pipe))
+ {
+ if (Is_host_emergency_exit()) // Asynchronous disconnection or role exchange detected under interrupt
+ {
+ status = PIPE_DELAY_TIMEOUT;
+ Host_reset_pipe(pipe);
+ goto host_get_data_end;
+ }
+#if TIMEOUT_DELAY_ENABLE == ENABLE
+ if (private_sof_counter >= 250) // Time-out management
+ {
+ private_sof_counter = 0; // Done in host SOF interrupt
+ if (nak_timeout++ >= TIMEOUT_DELAY) // Check for local time-out
+ {
+ status = PIPE_DELAY_TIMEOUT;
+ Host_reset_pipe(pipe);
+ goto host_get_data_end;
+ }
+ }
+#endif
+ if (Is_host_pipe_error(pipe)) // Error management
+ {
+ status = Host_error_status(pipe);
+ Host_ack_all_errors(pipe);
+ goto host_get_data_end;
+ }
+ if (Is_host_stall(pipe)) // STALL management
+ {
+ status = PIPE_STALL;
+ Host_reset_pipe(pipe);
+ Host_ack_stall(pipe);
+ goto host_get_data_end;
+ }
+#if NAK_TIMEOUT_ENABLE == ENABLE
+ if (Is_host_nak_received(pipe)) // NAK received
+ {
+ Host_ack_nak_received(pipe);
+ if (cpt_nak++ > NAK_RECEIVE_TIMEOUT)
+ {
+ status = PIPE_NAK_TIMEOUT;
+ Host_reset_pipe(pipe);
+ goto host_get_data_end;
+ }
+ }
+#endif
+ }
+ Host_freeze_pipe(pipe);
+ Host_reset_pipe_fifo_access(pipe);
+ i = Host_get_pipe_size(pipe) - Host_byte_count(pipe);
+ if (!ptr_buf)
+ {
+ if (Host_byte_count(pipe) > n) // More bytes received than expected
+ {
+ n = 0;
+ //! @todo Error code management
+ }
+ else // Nb bytes received <= expected
+ {
+ n -= Host_byte_count(pipe);
+ if (i) // Short packet
+ {
+ *nb_data -= n;
+ n = 0;
+ }
+ }
+ }
+ else
+ {
+ n = host_read_p_rxpacket(pipe, ptr_buf, n, &ptr_buf);
+ if (Host_byte_count(pipe)) // More bytes received than expected
+ {
+ //! @todo Error code management
+ }
+ else if (i) // Short packet with nb bytes received <= expected
+ {
+ *nb_data -= n;
+ n = 0;
+ }
+ }
+ Host_ack_in_received(pipe);
+
+ // In low-speed mode, the USB IP may have not yet sent the ACK at this
+ // point. The USB IP does not support a new start of transaction request
+ // from the firmware if the ACK has not been sent. The only means of making
+ // sure the ACK has been sent is to wait for the next Keep-Alive before
+ // starting a new transaction.
+ if (Is_usb_low_speed_mode())
+ {
+ Usb_ack_event(EVT_HOST_SOF);
+ sav_int_sof_enable = Is_host_sof_interrupt_enabled();
+ if ((sav_glob_int_en = Is_global_interrupt_enabled())) Disable_global_interrupt();
+ Host_ack_sof();
+ (void)Is_host_sof_interrupt_enabled();
+ if (sav_glob_int_en) Enable_global_interrupt();
+ Host_enable_sof_interrupt();
+ while (!Is_usb_event(EVT_HOST_SOF)) // Wait for next Keep-Alive
+ {
+ if (Is_host_emergency_exit())
+ {
+ status = PIPE_DELAY_TIMEOUT;
+ Host_reset_pipe(pipe);
+ goto host_get_data_end;
+ }
+ }
+ if (!sav_int_sof_enable) // Restore SOF interrupt enable
+ {
+ if ((sav_glob_int_en = Is_global_interrupt_enabled())) Disable_global_interrupt();
+ Host_disable_sof_interrupt();
+ (void)Is_host_sof_interrupt_enabled();
+ if (sav_glob_int_en) Enable_global_interrupt();
+ }
+ }
+ }
+host_get_data_end:
+ Host_freeze_pipe(pipe);
+ // Restore SOF interrupt enable state
+ if (!sav_int_sof_enable)
+ {
+ if ((sav_glob_int_en = Is_global_interrupt_enabled())) Disable_global_interrupt();
+ Host_disable_sof_interrupt();
+ (void)Is_host_sof_interrupt_enabled();
+ if (sav_glob_int_en) Enable_global_interrupt();
+ }
+
+ // And return...
+ return status;
+}
+
+
+//___ F U N C T I O N S F O R I N T E R R U P T M A N A G E D D A T A F L O W S ___
+
+#if USB_HOST_PIPE_INTERRUPT_TRANSFER == ENABLE
+
+void reset_it_pipe_str(void)
+{
+ U8 i;
+
+ for (i = 0; i < MAX_PEP_NB; i++)
+ {
+ it_pipe_str[i].enable = FALSE;
+ it_pipe_str[i].timeout = 0;
+ }
+}
+
+
+Bool is_any_interrupt_pipe_active(void)
+{
+ U8 i;
+
+ for (i = 0; i < MAX_PEP_NB; i++)
+ {
+ if (it_pipe_str[i].enable) return TRUE;
+ }
+
+ return FALSE;
+}
+
+
+//!
+//! @brief This function sends nb_data bytes pointed to by ptr_buf on the specified pipe.
+//!
+//! @param pipe
+//! @param nb_data
+//! @param ptr_buf
+//! @param handler Call-back function pointer
+//!
+//! @return Bool: Status
+//!
+Bool host_send_data_interrupt(U8 pipe, U16 nb_data, const void *ptr_buf, Pipe_handler *handler)
+{
+ Bool sav_glob_int_en;
+
+ if (it_pipe_str[pipe].enable) return FALSE;
+
+ if (!is_any_interrupt_pipe_active())
+ {
+ g_sav_int_sof_enable = Is_host_sof_interrupt_enabled();
+ Host_enable_sof_interrupt();
+ }
+ it_pipe_str[pipe].enable = TRUE;
+ it_pipe_str[pipe].nb_byte_to_process = nb_data;
+ it_pipe_str[pipe].nb_byte_processed = 0;
+ it_pipe_str[pipe].ptr_buf = (void *)ptr_buf;
+ it_pipe_str[pipe].handler = handler;
+ it_pipe_str[pipe].timeout = 0;
+ it_pipe_str[pipe].nak_timeout = NAK_SEND_TIMEOUT;
+
+ if ((sav_glob_int_en = Is_global_interrupt_enabled())) Disable_global_interrupt();
+ Host_reset_pipe(pipe);
+ (void)Is_host_resetting_pipe(pipe);
+ if (sav_glob_int_en) Enable_global_interrupt();
+ Host_configure_pipe_token(pipe, TOKEN_OUT);
+ Host_ack_out_ready(pipe);
+ Host_unfreeze_pipe(pipe);
+ // Prepare data to be sent
+ Host_reset_pipe_fifo_access(pipe);
+ it_pipe_str[pipe].nb_byte_on_going = nb_data - host_write_p_txpacket(pipe, ptr_buf, nb_data, NULL);
+ private_sof_counter = 0; // Reset the counter in SOF detection subroutine
+ it_pipe_str[pipe].timeout = 0; // Refresh time-out counter
+ if ((sav_glob_int_en = Is_global_interrupt_enabled())) Disable_global_interrupt();
+ Host_ack_out_ready(pipe);
+ Host_ack_stall(pipe);
+ Host_ack_nak_received(pipe);
+ (void)Is_host_nak_received(pipe);
+ if (sav_glob_int_en) Enable_global_interrupt();
+
+ Host_enable_stall_interrupt(pipe);
+ Host_enable_pipe_error_interrupt(pipe);
+ #if NAK_TIMEOUT_ENABLE == ENABLE
+ Host_enable_nak_received_interrupt(pipe);
+ #endif
+ Host_enable_out_ready_interrupt(pipe);
+ Host_enable_pipe_interrupt(pipe);
+
+ Host_send_out(pipe); // Send the USB frame
+
+ return TRUE;
+}
+
+
+//!
+//! @brief This function receives nb_data bytes pointed to by ptr_buf on the specified pipe.
+//!
+//! *nb_data is updated with the final number of data bytes received.
+//!
+//! @param pipe
+//! @param nb_data
+//! @param ptr_buf
+//! @param handler Call-back function pointer
+//!
+//! @return Bool: Status
+//!
+Bool host_get_data_interrupt(U8 pipe, U16 nb_data, void *ptr_buf, Pipe_handler *handler)
+{
+ Bool sav_glob_int_en;
+
+ if (it_pipe_str[pipe].enable) return FALSE;
+
+ if (!is_any_interrupt_pipe_active())
+ {
+ g_sav_int_sof_enable = Is_host_sof_interrupt_enabled();
+ Host_enable_sof_interrupt();
+ }
+ it_pipe_str[pipe].enable = TRUE;
+ it_pipe_str[pipe].nb_byte_to_process = nb_data;
+ it_pipe_str[pipe].nb_byte_processed = 0;
+ it_pipe_str[pipe].ptr_buf = ptr_buf;
+ it_pipe_str[pipe].handler = handler;
+ it_pipe_str[pipe].timeout = 0;
+ it_pipe_str[pipe].nak_timeout = NAK_RECEIVE_TIMEOUT;
+
+ private_sof_counter = 0; // Reset the counter in SOF detection subroutine
+ if ((sav_glob_int_en = Is_global_interrupt_enabled())) Disable_global_interrupt();
+ Host_reset_pipe(pipe);
+ Host_ack_stall(pipe);
+ Host_ack_nak_received(pipe);
+ (void)Is_host_nak_received(pipe);
+ if (sav_glob_int_en) Enable_global_interrupt();
+
+ Host_enable_stall_interrupt(pipe);
+ #if NAK_TIMEOUT_ENABLE == ENABLE
+ Host_enable_nak_received_interrupt(pipe);
+ #endif
+ Host_enable_pipe_error_interrupt(pipe);
+ Host_enable_in_received_interrupt(pipe);
+ Host_enable_pipe_interrupt(pipe);
+
+ Host_enable_continuous_in_mode(pipe);
+ Host_configure_pipe_token(pipe, TOKEN_IN);
+ Host_ack_in_received(pipe);
+ Host_unfreeze_pipe(pipe);
+
+ return TRUE;
+}
+
+
+//!
+//! @brief USB pipe interrupt subroutine
+//!
+void usb_pipe_interrupt(U8 pipe)
+{
+ void *ptr_buf;
+ U16 n, i;
+ Bool callback = FALSE;
+
+ // Detect which events generate an interrupt...
+ TRACE_OTG("pipe= %d\n\r", pipe);
+ if (Is_host_pipe_error(pipe)) // Error management
+ {
+ TRACE_OTG("pipe_error\n\r");
+ it_pipe_str[pipe].status = Host_error_status(pipe);
+ it_pipe_str[pipe].enable = FALSE;
+ Host_reset_pipe(pipe);
+ Host_ack_all_errors(pipe);
+ callback = TRUE;
+ goto usb_pipe_interrupt_end;
+ }
+
+ if (Is_host_stall(pipe)) // STALL management
+ {
+ TRACE_OTG("pipe_stall\n\r");
+ it_pipe_str[pipe].status = PIPE_STALL;
+ it_pipe_str[pipe].enable = FALSE;
+ Host_reset_pipe(pipe);
+ callback = TRUE;
+ goto usb_pipe_interrupt_end;
+ }
+
+ #if NAK_TIMEOUT_ENABLE == ENABLE
+ if (Is_host_nak_received(pipe)) // NAK received
+ {
+ TRACE_OTG("pipe_NAK\n\r");
+ Host_ack_nak_received(pipe);
+ // Check if NAK time-out error occurs (not for interrupt pipes)
+ if (!--it_pipe_str[pipe].nak_timeout && Host_get_pipe_type(pipe) != TYPE_INTERRUPT)
+ {
+ it_pipe_str[pipe].status = PIPE_NAK_TIMEOUT;
+ it_pipe_str[pipe].enable = FALSE;
+ Host_reset_pipe(pipe);
+ callback = TRUE;
+ goto usb_pipe_interrupt_end;
+ }
+ }
+ #endif
+
+ if (Is_host_in_received(pipe)) // Pipe IN reception?
+ {
+ TRACE_OTG("pipe_IN\n\r");
+ ptr_buf = (U8 *)it_pipe_str[pipe].ptr_buf + it_pipe_str[pipe].nb_byte_processed; // Build pointer to data buffer
+ n = it_pipe_str[pipe].nb_byte_to_process - it_pipe_str[pipe].nb_byte_processed; // Remaining data bytes
+ Host_freeze_pipe(pipe);
+ Host_reset_pipe_fifo_access(pipe);
+ i = Host_get_pipe_size(pipe) - Host_byte_count(pipe);
+ n = host_read_p_rxpacket(pipe, ptr_buf, n, NULL);
+ it_pipe_str[pipe].nb_byte_processed = it_pipe_str[pipe].nb_byte_to_process - n;
+ if (Host_byte_count(pipe)) // More bytes received than expected
+ {
+ //! @todo Error code management
+ }
+ else if (i) // Short packet with nb bytes received <= expected
+ {
+ n = 0;
+ }
+ Host_ack_in_received(pipe);
+ if (n) // Still data to process
+ {
+ Host_free_in(pipe);
+ Host_unfreeze_pipe(pipe); // Request another IN transfer
+ private_sof_counter = 0; // Reset the counter in SOF detection subroutine
+ it_pipe_str[pipe].timeout = 0; // Reset time-out
+ it_pipe_str[pipe].nak_timeout = NAK_RECEIVE_TIMEOUT;
+ }
+ else // End of transfer
+ {
+ it_pipe_str[pipe].enable = FALSE;
+ it_pipe_str[pipe].status = PIPE_GOOD;
+ Host_reset_pipe(pipe);
+ callback = TRUE;
+ }
+ }
+
+ if (Is_host_out_ready(pipe)) // Pipe OUT sent?
+ {
+ TRACE_OTG("pipe_OUT\n\r");
+ Host_ack_out_ready(pipe);
+ it_pipe_str[pipe].nb_byte_processed += it_pipe_str[pipe].nb_byte_on_going;
+ it_pipe_str[pipe].nb_byte_on_going = 0;
+ ptr_buf = (U8 *)it_pipe_str[pipe].ptr_buf + it_pipe_str[pipe].nb_byte_processed; // Build pointer to data buffer
+ n = it_pipe_str[pipe].nb_byte_to_process - it_pipe_str[pipe].nb_byte_processed; // Remaining data bytes
+ if (n) // Still data to process
+ {
+ Host_unfreeze_pipe(pipe);
+ // Prepare data to be sent
+ Host_reset_pipe_fifo_access(pipe);
+ it_pipe_str[pipe].nb_byte_on_going = n - host_write_p_txpacket(pipe, ptr_buf, n, NULL);
+ private_sof_counter = 0; // Reset the counter in SOF detection subroutine
+ it_pipe_str[pipe].timeout = 0; // Refresh time-out counter
+ it_pipe_str[pipe].nak_timeout = NAK_SEND_TIMEOUT;
+ Host_send_out(pipe); // Send the USB frame
+ }
+ else // End of transfer
+ {
+ it_pipe_str[pipe].enable = FALSE; // Tranfer end
+ it_pipe_str[pipe].status = PIPE_GOOD; // Status OK
+ Host_reset_pipe(pipe);
+ callback = TRUE;
+ }
+ }
+
+usb_pipe_interrupt_end:
+ if (!is_any_interrupt_pipe_active() && !g_sav_int_sof_enable) // If no more transfer is armed
+ {
+ Host_disable_sof_interrupt();
+ }
+ if (callback) // Any call-back function to perform?
+ {
+ it_pipe_str[pipe].handler(it_pipe_str[pipe].status, it_pipe_str[pipe].nb_byte_processed);
+ }
+}
+
+#endif // USB_HOST_PIPE_INTERRUPT_TRANSFER == ENABLE
+
+
+#endif // USB_HOST_FEATURE == ENABLED
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/enum/host/usb_host_task.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/enum/host/usb_host_task.h
new file mode 100644
index 0000000..c720499
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/enum/host/usb_host_task.h
@@ -0,0 +1,273 @@
+/* This header file is part of the AVR Software Framework 2.0.0 release */
+
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief Management of the USB host controller.
+ *
+ * This file manages the host controller, the host enumeration process and
+ * the suspend/resume host requests.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _USB_HOST_TASK_H_
+#define _USB_HOST_TASK_H_
+
+
+#include "conf_usb.h"
+
+#if USB_HOST_FEATURE == DISABLED
+ #error usb_host_task.h is #included although USB_HOST_FEATURE is disabled
+#endif
+
+
+//! @defgroup usb_host_task USB host task module
+//! @{
+
+//_____ I N C L U D E S ____________________________________________________
+
+#include "compiler.h"
+#include "usb_host_enum.h"
+
+
+//_____ T Y P E S _________________________________________________________
+
+typedef void Pipe_handler(Status_t status, U16 nb_byte);
+
+typedef struct
+{
+ Bool enable;
+ U16 nb_byte_to_process;
+ U16 nb_byte_processed;
+ U16 nb_byte_on_going;
+ void *ptr_buf;
+ Pipe_handler *handler;
+ Status_t status;
+ U8 timeout;
+ U16 nak_timeout;
+} S_pipe_int;
+
+
+//_____ M A C R O S ________________________________________________________
+
+#define PIPE_GOOD 0x00
+#define PIPE_DATA_TOGGLE 0x01
+#define PIPE_DATA_PID 0x02
+#define PIPE_PID 0x04
+#define PIPE_TIMEOUT 0x08
+#define PIPE_CRC16 0x10
+#define PIPE_STALL 0x20
+#define PIPE_NAK_TIMEOUT 0x40
+#define PIPE_DELAY_TIMEOUT 0x80
+
+//! @brief Returns TRUE when device connected and correctly enumerated.
+//! The host high-level application should test this before performing any applicative request.
+#define Is_host_ready() (device_state == DEVICE_READY)
+
+//! Check if host controller is in suspend mode
+#define Is_host_suspended() (device_state == DEVICE_WAIT_RESUME ||\
+ device_state == DEVICE_SUSPENDED)
+
+//! Check if there is an error
+#define Is_host_error() (device_state == DEVICE_ERROR)
+
+//! Check if there is a device addressed by the host
+#define Is_host_addressed() (device_state >= DEVICE_ADDRESSED)
+
+//! Check if there is a device powered by the host
+#define Is_host_powered() (device_state >= DEVICE_POWERED)
+
+//! Check if there is a device attached to the host
+#define Is_host_attached() (device_state >= DEVICE_ATTACHED)
+
+//! Should be called to make the host controller enter USB suspend mode
+#define Host_request_suspend() (device_state = DEVICE_SUSPENDED)
+
+//! Should be called to request the host controller to resume the USB bus
+#define Host_request_resume() (request_resume = TRUE)
+
+//! Private ack for resume software event
+#define Host_ack_request_resume() (request_resume = FALSE)
+
+//! Private check for resume sequence
+#define Is_host_request_resume() (request_resume == TRUE)
+
+//! @defgroup device_state_value Host controller states
+//! Defines for device state coding
+//! \image html usb_host_task.jpg "USB Host Task Overview"
+//! @{
+#define DEVICE_UNATTACHED 0
+#define DEVICE_ATTACHED 1
+#define DEVICE_POWERED 2
+#define DEVICE_DEFAULT 3
+#define DEVICE_ADDRESSED 4
+#define DEVICE_CONFIGURED 5
+#define DEVICE_READY 6
+
+#define DEVICE_ERROR 7
+
+#define DEVICE_SUSPENDED 8
+#define DEVICE_WAIT_RESUME 9
+
+#define Host_set_device_supported() (Set_bits(device_status, 0x01))
+#define Host_clear_device_supported() (Clr_bits(device_status, 0x01))
+#define Is_host_device_supported() (Tst_bits(device_status, 0x01))
+
+#define Host_set_device_ready() (Set_bits(device_status, 0x02))
+#define Host_clear_device_ready() (Clr_bits(device_status, 0x02))
+#define Is_host_device_ready() (Tst_bits(device_status, 0x02))
+
+#define Host_set_configured() (Set_bits(device_status, 0x04))
+#define Host_clear_configured() (Clr_bits(device_status, 0x04))
+#define Is_host_configured() (Tst_bits(device_status, 0x04))
+
+#define Host_clear_device_status() (device_status = 0x00)
+//! @}
+
+
+//_____ D E C L A R A T I O N S ____________________________________________
+
+//!
+//! @brief This function initializes the USB host controller.
+//!
+//! This function enables the USB controller for host-mode operation.
+//!
+extern void usb_host_task_init(void);
+
+//!
+//! @brief Entry point of the USB host management
+//!
+//! The aim is to manage the target device connection and enumeration.
+//! Depending on device_state, the function performs the required operations
+//! to get the device enumerated and configured.
+//! Once the device is operational, device_state is DEVICE_READY.
+//! This state should be tested by the host task before sending any
+//! applicative request to the device.
+//! This function is called from the usb_task function depending on the USB
+//! operating mode (device or host) currently engaged.
+//!
+#ifdef FREERTOS_USED
+extern void usb_host_task(void *pvParameters);
+#else
+extern void usb_host_task(void);
+#endif
+
+//!
+//! @brief This function sends nb_data bytes pointed to by ptr_buf on the specified pipe.
+//!
+//! @note This function activates the host SOF interrupt to detect time-outs.
+//! The initial enable state of this interrupt will be restored.
+//!
+//! @param pipe
+//! @param nb_data
+//! @param ptr_buf
+//!
+//! @return Status_t: Pipe status
+//!
+extern Status_t host_send_data(U8 pipe, U16 nb_data, const void *ptr_buf);
+
+//!
+//! @brief This function receives nb_data bytes pointed to by ptr_buf on the specified pipe.
+//!
+//! *nb_data is updated with the final number of data bytes received.
+//!
+//! @note This function activates the host SOF interrupt to detect time-outs.
+//! The initial enable state of this interrupt will be restored.
+//!
+//! @param pipe
+//! @param nb_data
+//! @param ptr_buf
+//!
+//! @return Status_t: Pipe status
+//!
+extern Status_t host_get_data(U8 pipe, U16 *nb_data, void *ptr_buf);
+
+#if USB_HOST_PIPE_INTERRUPT_TRANSFER == ENABLE
+
+extern void reset_it_pipe_str(void);
+
+extern Bool is_any_interrupt_pipe_active(void);
+
+//!
+//! @brief This function sends nb_data bytes pointed to by ptr_buf on the specified pipe.
+//!
+//! @param pipe
+//! @param nb_data
+//! @param ptr_buf
+//! @param handler Call-back function pointer
+//!
+//! @return Bool: Status
+//!
+extern Bool host_send_data_interrupt(U8 pipe, U16 nb_data, const void *ptr_buf, Pipe_handler *handler);
+
+//!
+//! @brief This function receives nb_data bytes pointed to by ptr_buf on the specified pipe.
+//!
+//! *nb_data is updated with the final number of data bytes received.
+//!
+//! @param pipe
+//! @param nb_data
+//! @param ptr_buf
+//! @param handler Call-back function pointer
+//!
+//! @return Bool: Status
+//!
+extern Bool host_get_data_interrupt(U8 pipe, U16 nb_data, void *ptr_buf, Pipe_handler *handler);
+
+//!
+//! @brief USB pipe interrupt subroutine
+//!
+//! @param pipe
+//!
+extern void usb_pipe_interrupt(U8 pipe);
+
+#endif // USB_HOST_PIPE_INTERRUPT_TRANSFER == ENABLE
+
+extern volatile U8 device_state;
+extern volatile S_usb_setup_data usb_request;
+extern U8 data_stage[SIZEOF_DATA_STAGE];
+extern volatile U8 device_status;
+extern volatile Bool request_resume;
+
+//! @}
+
+
+#endif // _USB_HOST_TASK_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/enum/usb_task.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/enum/usb_task.c
new file mode 100644
index 0000000..11613e5
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/enum/usb_task.c
@@ -0,0 +1,723 @@
+/* This source file is part of the AVR Software Framework 2.0.0 release */
+
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief Management of the USB task either device/host or both.
+ *
+ * The USB task selects the correct USB task (USB device task or USB host
+ * task) to be executed depending on the current mode available.
+ *
+ * According to the values of USB_DEVICE_FEATURE and USB_HOST_FEATURE
+ * (located in the conf_usb.h file), the USB task can be configured to
+ * support USB device mode or USB host mode or both for a dual-role device
+ * application.
+ *
+ * This module also contains the general USB interrupt subroutine. This
+ * subroutine is used to detect asynchronous USB events.
+ *
+ * Note:
+ * - The USB task belongs to main; the USB device and host tasks do not.
+ * They are called from the general USB task.
+ * - See the conf_usb.h file for more details about the configuration of
+ * this module.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+//_____ I N C L U D E S ___________________________________________________
+#include "conf_usb.h"
+
+#include "compiler.h"
+//#include "intc.h"
+#ifdef FREERTOS_USED
+#include "libfreertos.h"
+#include "FreeRTOSConfig.h"
+#include "FreeRTOSTask.h"
+//#include "semphr.h"
+#endif
+
+#include "usb_drv.h"
+#include "usb_task.h"
+
+#if USB_DEVICE_FEATURE == ENABLED
+#include "usb_descriptors.h"
+#include "usb_device_task.h"
+#endif
+
+#if USB_HOST_FEATURE == ENABLED
+#include "usb_host_task.h"
+#endif
+
+//#if UC3C
+//#include "pm_uc3c.h"
+//#else
+//#include "pm.h"
+//#endif
+
+
+//_____ M A C R O S ________________________________________________________
+
+
+//_____ D E F I N I T I O N S ______________________________________________
+#if USB_HOST_FEATURE == DISABLED
+volatile Bool usb_device_connected;
+#else
+extern volatile Bool usb_device_connected;
+#endif
+
+//!
+//! Public: U16 g_usb_event
+//! usb_connected is used to store USB events detected upon
+//! USB general interrupt subroutine
+//! Its value is managed by the following macros (See \ref usb_task.h file)
+//! Usb_send_event(x)
+//! Usb_ack_event(x)
+//! Is_usb_event(x)
+//! Usb_clear_all_event()
+volatile U16 g_usb_event = 0;
+#if (USB_HOST_FEATURE == ENABLED) /*&& (USB_DEVICE_FEATURE == ENABLED)*/ && (USB_HIGH_SPEED_SUPPORT==ENABLED)
+static U8 private_sof_counter_HS = 0; // Full speed SOF = 1ms , High speed µSOF = 125µs
+#endif
+
+
+#if USB_DEVICE_FEATURE == ENABLED
+
+//!
+//! Public: Bool usb_connected
+//! usb_connected is set to TRUE when VBus has been detected
+//! usb_connected is set to FALSE otherwise
+//! Used with USB_DEVICE_FEATURE == ENABLED only
+extern volatile Bool usb_connected;
+
+ #ifdef FREERTOS_USED
+//! Handle to the USB Device task
+extern xTaskHandle usb_device_tsk;
+ #endif
+
+#endif
+
+
+#if USB_HOST_FEATURE == ENABLED
+
+static const char log_device_disconnected[] = "Device disconnected\n";
+
+//!
+//! Private: U8 private_sof_counter
+//! Incremented by host SOF interrupt subroutime
+//! This counter is used to detect time-out in host requests.
+//! It must not be modified by the user applicative tasks.
+volatile U32 private_sof_counter;
+
+ #if USB_HOST_PIPE_INTERRUPT_TRANSFER == ENABLE
+extern volatile Bool g_sav_int_sof_enable;
+extern volatile S_pipe_int it_pipe_str[MAX_PEP_NB];
+ #endif
+
+ #ifdef FREERTOS_USED
+//! Handle to the USB Host task
+extern xTaskHandle usb_host_tsk;
+ #endif
+
+#endif
+
+
+#if USB_DEVICE_FEATURE == ENABLED && USB_HOST_FEATURE == ENABLED
+
+static const char log_pin_id_changed[] = "Pin Id changed\n";
+
+//!
+//! Public: U8 g_usb_mode
+//! Used in dual-role application (both device/host) to store
+//! the current mode the USB controller is operating
+volatile U8 g_usb_mode = USB_MODE_UNDEFINED;
+static volatile U8 g_old_usb_mode;
+
+#endif
+
+
+#ifdef FREERTOS_USED
+//! Handle to the USB task semaphore
+static xSemaphoreHandle usb_tsk_semphr = NULL;
+#endif
+
+
+//_____ D E C L A R A T I O N S ____________________________________________
+
+#ifdef FREERTOS_USED
+
+#if (defined __GNUC__)
+__attribute__((__noinline__))
+#endif
+static portBASE_TYPE usb_general_interrupt_non_naked(void);
+
+
+//! @brief USB interrupt routine
+//!
+//! When FreeRTOS is used, the USB interrupt routine may trigger task switches,
+//! so it must use special OS prologue and epilogue. This function must be naked
+//! in order to have no stack frame. usb_general_interrupt_non_naked is
+//! therefore used for the required stack frame of the interrupt routine.
+#if (defined __GNUC__)
+__attribute__((__naked__))
+#elif (defined __ICCAVR32__)
+#pragma shadow_registers = full
+#endif
+static void usb_general_interrupt(void)
+{
+ portENTER_SWITCHING_ISR();
+ usb_general_interrupt_non_naked();
+ portEXIT_SWITCHING_ISR();
+}
+
+#else
+
+#if (defined __GNUC__)
+__attribute__((__interrupt__))
+static void usb_general_interrupt(void);
+#elif (defined __ICCAVR32__)
+__interrupt
+static void usb_general_interrupt(void);
+#endif
+
+#endif // FREERTOS_USED
+
+
+//! @brief This function initializes the USB process.
+//!
+//! Depending on the mode supported (HOST/DEVICE/DUAL_ROLE) the function
+//! calls the coresponding USB mode initialization function
+void usb_task_init(void)
+{
+ usb_device_connected=0;
+ /* Disable unwanted interrupt */
+ // Host
+ Host_disable_device_connection_interrupt();
+ Host_disable_device_disconnection_interrupt();
+ Host_disable_reset_sent_interrupt();
+ Host_disable_down_stream_resume_interrupt();
+ Host_disable_remote_wakeup_interrupt();
+ Host_disable_sof_interrupt();
+ Host_disable_hwup_interrupt();
+ // Device
+ Usb_disable_suspend_interrupt();
+ Usb_disable_msof_interrupt();
+ Usb_disable_sof_interrupt();
+ Usb_disable_reset_interrupt();
+ Usb_disable_wake_up_interrupt();
+ Usb_disable_resume_interrupt();
+ Usb_disable_remote_wake_up_interrupt();
+ // Arbitrer
+
+
+
+
+#ifdef FREERTOS_USED
+ // Create the semaphore
+ vSemaphoreCreateBinary(usb_tsk_semphr);
+
+ if ( xTaskCreate( usb_task, configTSK_USB_NAME, configTSK_USB_STACK_SIZE, NULL, configTSK_USB_PRIORITY, NULL ) != pdPASS )
+ {
+ printf( "Failed to create usb_task\r\n" ) ;
+ }
+}
+
+
+void usb_task(void *pvParameters)
+{
+#endif // FREERTOS_USED
+ // Register the USB interrupt handler to the interrupt controller and enable
+ // the USB interrupt.
+// Disable_global_interrupt();
+// INTC_register_interrupt((__int_handler)&usb_general_interrupt, AVR32_USBB_IRQ, USB_INT_LEVEL);
+// Enable_global_interrupt();
+//
+#ifdef FREERTOS_USED
+ while (TRUE)
+ {
+ // Wait for the semaphore
+ while (!xSemaphoreTake(usb_tsk_semphr, portMAX_DELAY));
+
+#endif // FREERTOS_USED
+// ---- DUAL-ROLE DEVICE/HOST USB MODE -----------------------------------------
+#if USB_DEVICE_FEATURE == ENABLED && USB_HOST_FEATURE == ENABLED
+ #ifdef FREERTOS_USED
+ if (usb_device_tsk) vTaskDelete(usb_device_tsk), usb_device_tsk = NULL;
+ if (usb_host_tsk) vTaskDelete(usb_host_tsk), usb_host_tsk = NULL;
+ #endif
+ Usb_input_id_pin();
+ Usb_enable_id_pin();
+ if (Is_usb_id_device())
+ {
+ g_usb_mode = USB_MODE_DEVICE;
+ usb_device_task_init();
+ }
+ else
+ {
+ private_sof_counter = 0;
+ g_usb_mode = USB_MODE_HOST;
+ usb_host_task_init();
+ }
+ g_old_usb_mode = g_usb_mode; // Store current USB mode, for mode change detection
+ Usb_raise_id_transition(); // Check no ID transition has been missed during initialization
+ Usb_enable_id_interrupt();
+ Enable_global_interrupt();
+// -----------------------------------------------------------------------------
+
+// ---- DEVICE-ONLY USB MODE ---------------------------------------------------
+#elif USB_DEVICE_FEATURE == ENABLED
+ #ifdef FREERTOS_USED
+ if (usb_device_tsk) vTaskDelete(usb_device_tsk), usb_device_tsk = NULL;
+ #endif
+ Usb_force_device_mode();
+ usb_device_task_init();
+// -----------------------------------------------------------------------------
+
+// ---- REDUCED-HOST-ONLY USB MODE ---------------------------------------------
+#elif USB_HOST_FEATURE == ENABLED
+ #ifdef FREERTOS_USED
+ if (usb_host_tsk) vTaskDelete(usb_host_tsk), usb_host_tsk = NULL;
+ #endif
+ private_sof_counter = 0;
+ Usb_force_host_mode();
+ usb_host_task_init();
+// -----------------------------------------------------------------------------
+
+// ---- ERROR, NO MODE ENABLED -------------------------------------------------
+#else
+ #error At least one of USB_DEVICE_FEATURE and USB_HOST_FEATURE must be enabled
+#endif
+// -----------------------------------------------------------------------------
+#ifdef FREERTOS_USED
+ }
+#endif
+}
+
+
+//! @brief Entry point of the USB mamnagement
+//!
+//! Depending on the USB mode supported (HOST/DEVICE/DUAL_ROLE) the function
+//! calls the coresponding USB management function.
+#ifndef FREERTOS_USED
+void usb_task(void)
+{
+// ---- DUAL-ROLE DEVICE/HOST USB MODE -----------------------------------------
+ #if USB_DEVICE_FEATURE == ENABLED && USB_HOST_FEATURE == ENABLED
+ if (g_old_usb_mode != g_usb_mode)
+ {
+ if (Is_usb_id_device())
+ {
+ usb_device_task_init();
+ }else{
+ private_sof_counter = 0;
+ usb_host_task_init();
+ }
+ g_old_usb_mode = g_usb_mode; // Store current USB mode, for mode change detection
+ Usb_enable_id_interrupt();
+ Enable_global_interrupt();
+ }
+
+ // Depending on current USB mode, launch the correct USB task (device or host)
+ switch (g_old_usb_mode)
+ {
+ case USB_MODE_DEVICE:
+ usb_device_task();
+ break;
+ case USB_MODE_HOST:
+ usb_host_task();
+ break;
+ case USB_MODE_UNDEFINED:
+ default:
+ break;
+ }
+// -----------------------------------------------------------------------------
+
+// ---- DEVICE-ONLY USB MODE ---------------------------------------------------
+ #elif USB_DEVICE_FEATURE == ENABLED
+ usb_device_task();
+// -----------------------------------------------------------------------------
+
+// ---- REDUCED-HOST-ONLY USB MODE ---------------------------------------------
+ #elif USB_HOST_FEATURE == ENABLED
+ usb_host_task();
+// -----------------------------------------------------------------------------
+
+// ---- ERROR, NO MODE ENABLED -------------------------------------------------
+ #else
+ #error At least one of USB_DEVICE_FEATURE and USB_HOST_FEATURE must be enabled
+ #endif
+// -----------------------------------------------------------------------------
+}
+#endif
+
+
+//! @brief USB interrupt routine
+//!
+//! This function is called each time a USB interrupt occurs.
+//! The following USB DEVICE events are taken in charge:
+//! - VBus On / Off
+//! - Start-of-Frame
+//! - Suspend
+//! - Wake-Up
+//! - Resume
+//! - Reset
+//!
+//! The following USB HOST events are taken in charge:
+//! - Device connection
+//! - Device Disconnection
+//! - Start-of-Frame
+//! - ID pin change
+//! - SOF (or Keep alive in low-speed) sent
+//! - Wake-up on USB line detected
+//! - Pipe events
+//!
+//! For each event, the user can launch an action by completing the associated
+//! \#define (see the conf_usb.h file to add actions on events).
+//!
+//! Note: Only interrupt events that are enabled are processed.
+//!
+//! Warning: If device and host tasks are not tasks in an RTOS, rough events
+//! like ID transition, VBus transition, device disconnection, etc. that need to
+//! kill then restart these tasks may lead to an undefined state if they occur
+//! just before something is activated in the USB macro (e.g. pipe/endpoint
+//! transfer...).
+//!
+//! @return Nothing in the standalone configuration; a boolean indicating
+//! whether a task switch is required in the FreeRTOS configuration
+#ifdef FREERTOS_USED
+
+#if (defined __GNUC__)
+__attribute__((__noinline__))
+#elif (defined __ICCAVR32__)
+#pragma optimize = no_inline
+#endif
+static portBASE_TYPE usb_general_interrupt_non_naked(void)
+
+#else
+
+#if (defined __GNUC__)
+__attribute__((__interrupt__))
+#elif (defined __ICCAVR32__)
+__interrupt
+#endif
+//static void usb_general_interrupt(void)
+void UOTGHS_IrqHandler(void)
+#endif
+{
+#ifdef FREERTOS_USED
+ portBASE_TYPE task_woken = pdFALSE;
+#endif
+#if USB_HOST_FEATURE == ENABLED && USB_HOST_PIPE_INTERRUPT_TRANSFER == ENABLE
+ U8 i;
+#endif
+
+//TRACE_OTG("UOTGHS_SR: 0x%X\n\r", UOTGHS->UOTGHS_SR);
+//TRACE_OTG("HOST: 0x%X\n\r", (UOTGHS->UOTGHS_HSTISR & UOTGHS->UOTGHS_HSTIMR));
+//TRACE_OTG("DEV : 0x%X\n\r", (UOTGHS->UOTGHS_DEVISR & UOTGHS->UOTGHS_DEVIMR));
+
+// ---------- DEVICE/HOST events management ------------------------------------
+#if USB_DEVICE_FEATURE == ENABLED && USB_HOST_FEATURE == ENABLED
+ // ID pin change detection
+ if (Is_usb_id_transition() && Is_usb_id_interrupt_enabled())
+ {
+ g_usb_mode = (Is_usb_id_device()) ? USB_MODE_DEVICE : USB_MODE_HOST;
+ Usb_ack_id_transition();
+ if (g_usb_mode != g_old_usb_mode) // Basic debounce
+ {
+ // Previously in device mode, check if disconnection was detected
+ if (g_old_usb_mode == USB_MODE_DEVICE)
+ {
+ if (usb_connected)
+ {
+ // Device mode diconnection actions
+ usb_connected = FALSE;
+ usb_configuration_nb = 0;
+ Usb_vbus_off_action();
+ }
+ }
+ // Previously in host mode, check if disconnection was detected
+ else if (Is_host_attached())
+ {
+ // Host mode diconnection actions
+ device_state = DEVICE_UNATTACHED;
+ Host_device_disconnection_action();
+ }
+ LOG_STR(log_pin_id_changed);
+ Usb_send_event((Is_usb_device()) ? EVT_USB_DEVICE_FUNCTION :
+ EVT_USB_HOST_FUNCTION);
+ Usb_id_transition_action();
+ //! @todo ID pin hot state change!!!
+ // Preliminary management: HARDWARE RESET!!!
+ #if ID_PIN_CHANGE_GENERATE_RESET == ENABLE
+ // Hot ID transition generates CPU reset
+ Usb_disable();
+ Usb_disable_otg_pad();
+ #ifdef FREERTOS_USED
+ // Release the semaphore in order to start a new device/host task
+ taskENTER_CRITICAL();
+ xSemaphoreGiveFromISR(usb_tsk_semphr, &task_woken);
+ taskEXIT_CRITICAL();
+ #else
+// Reset_CPU();
+ #endif
+ #endif
+ }
+ }
+#endif // End DEVICE/HOST FEATURE MODE
+
+// ---------- DEVICE events management -----------------------------------------
+#if USB_DEVICE_FEATURE == ENABLED
+ #if USB_HOST_FEATURE == ENABLED
+ // If both device and host features are enabled, check if device mode is engaged
+ // (accessing the USB registers of a non-engaged mode, even with load operations,
+ // may corrupt USB FIFO data).
+ if (Is_usb_device())
+ #endif
+ {
+ // VBus state detection
+ if (Is_usb_vbus_transition() && Is_usb_vbus_interrupt_enabled())
+ {
+ Usb_ack_vbus_transition();
+ if (Is_usb_vbus_high())
+ {
+ usb_start_device();
+ Usb_send_event(EVT_USB_POWERED);
+ Usb_vbus_on_action();
+ }
+ else
+ {
+ Usb_unfreeze_clock();
+ Usb_detach();
+ usb_connected = FALSE;
+ usb_configuration_nb = 0;
+ Usb_send_event(EVT_USB_UNPOWERED);
+ Usb_vbus_off_action();
+ #ifdef FREERTOS_USED
+ // Release the semaphore in order to start a new device/host task
+ taskENTER_CRITICAL();
+ xSemaphoreGiveFromISR(usb_tsk_semphr, &task_woken);
+ taskEXIT_CRITICAL();
+ #endif
+ }
+ }
+ // Device Start-of-Frame received
+ if (Is_usb_sof() && Is_usb_sof_interrupt_enabled())
+ {
+ Usb_ack_sof();
+ Usb_sof_action();
+ }
+ // Device Suspend event (no more USB activity detected)
+ if (Is_usb_suspend() && Is_usb_suspend_interrupt_enabled())
+ {
+ Usb_ack_suspend();
+ Usb_enable_wake_up_interrupt();
+ (void)Is_usb_wake_up_interrupt_enabled();
+ Usb_freeze_clock();
+ Usb_send_event(EVT_USB_SUSPEND);
+ Usb_suspend_action();
+ }
+ // Wake-up event (USB activity detected): Used to resume
+ if (Is_usb_wake_up() && Is_usb_wake_up_interrupt_enabled())
+ {
+ Usb_unfreeze_clock();
+ (void)Is_usb_clock_frozen();
+ Usb_ack_wake_up();
+ Usb_disable_wake_up_interrupt();
+ Usb_wake_up_action();
+ Usb_send_event(EVT_USB_WAKE_UP);
+ }
+ // Resume state bus detection
+ if (Is_usb_resume() && Is_usb_resume_interrupt_enabled())
+ {
+ Usb_disable_wake_up_interrupt();
+ Usb_ack_resume();
+ Usb_disable_resume_interrupt();
+ Usb_resume_action();
+ Usb_send_event(EVT_USB_RESUME);
+ }
+ // USB bus reset detection
+ if (Is_usb_reset() && Is_usb_reset_interrupt_enabled())
+ {
+ Usb_ack_reset();
+ usb_init_device();
+ Usb_reset_action();
+ Usb_send_event(EVT_USB_RESET);
+ }
+ }
+#endif // End DEVICE FEATURE MODE
+
+// ---------- HOST events management -------------------------------------------
+#if USB_HOST_FEATURE == ENABLED
+ #if USB_DEVICE_FEATURE == ENABLED
+ // If both device and host features are enabled, check if host mode is engaged
+ // (accessing the USB registers of a non-engaged mode, even with load operations,
+ // may corrupt USB FIFO data).
+ else
+ #endif
+ {
+ // The device has been disconnected
+ if (Is_host_device_disconnection() && Is_host_device_disconnection_interrupt_enabled())
+ {
+ usb_device_connected = 0;
+ host_disable_all_pipes();
+ Host_ack_device_disconnection();
+ #if USB_HOST_PIPE_INTERRUPT_TRANSFER == ENABLE
+ reset_it_pipe_str();
+ #endif
+ device_state = DEVICE_UNATTACHED;
+ LOG_STR(log_device_disconnected);
+ Usb_send_event(EVT_HOST_DISCONNECTION);
+ Host_device_disconnection_action();
+ #ifdef FREERTOS_USED
+ // Release the semaphore in order to start a new device/host task
+ taskENTER_CRITICAL();
+ xSemaphoreGiveFromISR(usb_tsk_semphr, &task_woken);
+ taskEXIT_CRITICAL();
+ #endif
+ }
+ // Device connection
+ if (Is_host_device_connection() && Is_host_device_connection_interrupt_enabled())
+ {
+ usb_device_connected = 1;
+ Host_ack_device_connection();
+ host_disable_all_pipes();
+ Host_device_connection_action();
+ }
+ // Host Start-of-Frame has been sent
+ if (Is_host_sof() && Is_host_sof_interrupt_enabled())
+ {
+ Host_ack_sof();
+ Usb_send_event(EVT_HOST_SOF);
+#if (USB_HIGH_SPEED_SUPPORT==ENABLED)
+ if( Is_usb_full_speed_mode() )
+ {
+ private_sof_counter++;
+ }else{
+ private_sof_counter_HS++;
+ if( 0 == (private_sof_counter_HS%8) )
+ {
+ private_sof_counter++;
+ }
+ }
+#else
+ private_sof_counter++;
+#endif
+ // Delay time-out management for interrupt tranfer mode in host mode
+ #if USB_HOST_PIPE_INTERRUPT_TRANSFER == ENABLE && TIMEOUT_DELAY_ENABLE == ENABLE
+ if (private_sof_counter >= 250) // Count 250 ms (SOF @ 1 ms)
+ {
+ private_sof_counter = 0;
+ for (i = 0; i < MAX_PEP_NB; i++)
+ {
+ if (it_pipe_str[i].enable &&
+ ++it_pipe_str[i].timeout > TIMEOUT_DELAY && Host_get_pipe_type(i) != TYPE_INTERRUPT)
+ {
+ it_pipe_str[i].enable = FALSE;
+ it_pipe_str[i].status = PIPE_DELAY_TIMEOUT;
+ Host_reset_pipe(i);
+ if (!is_any_interrupt_pipe_active() && !g_sav_int_sof_enable) // If no more transfer is armed
+ {
+ Host_disable_sof_interrupt();
+ }
+ it_pipe_str[i].handler(PIPE_DELAY_TIMEOUT, it_pipe_str[i].nb_byte_processed);
+ }
+ }
+ }
+ #endif
+ Host_sof_action();
+ }
+ // Host Wake-up has been received
+ if (Is_host_hwup() && Is_host_hwup_interrupt_enabled())
+ {
+ // CAUTION: HWUP can be cleared only when USB clock is active (not frozen)!
+ //! @todo Implement this on the silicon version
+ //Pll_start_auto(); // First Restart the PLL for USB operation
+ //Wait_pll_ready(); // Make sure PLL is locked
+ Usb_unfreeze_clock(); // Enable clock on USB interface
+ (void)Is_usb_clock_frozen(); // Make sure USB interface clock is enabled
+ Host_disable_hwup_interrupt(); // Wake-up interrupt should be disabled as host is now awoken!
+ Host_ack_hwup(); // Clear HWUP interrupt flag
+ Usb_send_event(EVT_HOST_HWUP); // Send software event
+ Host_hwup_action(); // Map custom action
+ }
+ #if USB_HOST_PIPE_INTERRUPT_TRANSFER == ENABLE
+ // Host pipe interrupts
+ for(i=0; i<MAX_PEP_NB; i++)
+ {
+ if( Host_get_interrupt_pipe_number(i) != 0 )
+ {
+ usb_pipe_interrupt(i);
+ }
+ }
+ #endif
+ }
+#endif // End HOST FEATURE MODE
+
+#ifdef FREERTOS_USED
+ return task_woken;
+#endif
+}
+
+
+#if USB_DEVICE_FEATURE == ENABLED
+void usb_suspend_action(void)
+{
+// volatile avr32_pm_t *pm = &AVR32_PM;
+// pm->AWEN.usb_waken = 1;
+// SLEEP(AVR32_PM_SMODE_STOP);
+// pm->AWEN.usb_waken = 0;
+}
+#endif
+
+
+#if USB_HOST_FEATURE == ENABLED
+void host_suspend_action(void)
+{
+ Enable_global_interrupt();
+ //! @todo Implement this on the silicon version
+ //Enter_power_down_mode(); // For example...
+}
+
+U32 host_get_timeout( void )
+{
+ return private_sof_counter;
+}
+
+#endif
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/enum/usb_task.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/enum/usb_task.h
new file mode 100644
index 0000000..2fe96f9
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/enum/usb_task.h
@@ -0,0 +1,243 @@
+/* This header file is part of the AVR Software Framework 2.0.0 release */
+
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief Management of the USB task either device/host or both.
+ *
+ * The USB task selects the correct USB task (USB device task or USB host
+ * task) to be executed depending on the current mode available.
+ *
+ * According to the values of USB_DEVICE_FEATURE and USB_HOST_FEATURE
+ * (located in the conf_usb.h file), the USB task can be configured to
+ * support USB device mode or USB host mode or both for a dual-role device
+ * application.
+ *
+ * This module also contains the general USB interrupt subroutine. This
+ * subroutine is used to detect asynchronous USB events.
+ *
+ * Note:
+ * - The USB task belongs to main; the USB device and host tasks do not.
+ * They are called from the general USB task.
+ * - See the conf_usb.h file for more details about the configuration of
+ * this module.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _USB_TASK_H_
+#define _USB_TASK_H_
+
+
+//! @defgroup usb_task USB task entry point module
+//! @{
+
+//_____ I N C L U D E S ____________________________________________________
+
+#include "compiler.h"
+//#include "preprocessor.h"
+#include "conf_usb.h"
+
+
+//_____ M A C R O S ________________________________________________________
+
+ //! @defgroup usb_software_evts USB software Events Management
+ //! Macros to manage USB events detected under interrupt
+ //! @{
+#define Usb_send_event(x) (Set_bits(g_usb_event, 1 << (x)))
+#define Usb_ack_event(x) (Clr_bits(g_usb_event, 1 << (x)))
+#define Is_usb_event(x) (Tst_bits(g_usb_event, 1 << (x)))
+#define Usb_clear_all_event() (g_usb_event = 0x0000)
+#define Is_host_emergency_exit() (Is_usb_device() || Is_usb_event(EVT_HOST_DISCONNECTION) || Is_usb_event(EVT_USB_DEVICE_FUNCTION))
+#define Is_usb_device() (g_usb_mode == USB_MODE_DEVICE)
+#define Is_usb_host() (g_usb_mode == USB_MODE_HOST)
+
+#define EVT_USB_POWERED 1 // USB plugged
+#define EVT_USB_UNPOWERED 2 // USB unplugged
+#define EVT_USB_DEVICE_FUNCTION 3 // USB in device
+#define EVT_USB_HOST_FUNCTION 4 // USB in host
+#define EVT_USB_SUSPEND 5 // USB suspend
+#define EVT_USB_WAKE_UP 6 // USB wake-up
+#define EVT_USB_RESUME 7 // USB resume
+#define EVT_USB_RESET 8 // USB reset
+#define EVT_HOST_SOF 9 // Host start-of-frame sent
+#define EVT_HOST_HWUP 10 // Host wake-up detected
+#define EVT_HOST_DISCONNECTION 11 // The target device is disconnected
+ //! @}
+
+ //! @defgroup std_req_values Standard requests defines
+ //! @{
+#define GET_STATUS 0x00
+#define GET_DEVICE 0x01
+#define CLEAR_FEATURE 0x01
+#define GET_STRING 0x03
+#define SET_FEATURE 0x03
+#define SET_ADDRESS 0x05
+#define GET_DESCRIPTOR 0x06
+#define SET_DESCRIPTOR 0x07
+#define GET_CONFIGURATION 0x08
+#define SET_CONFIGURATION 0x09
+#define GET_INTERFACE 0x0A
+#define SET_INTERFACE 0x0B
+#define SYNCH_FRAME 0x0C
+
+#define GET_DEVICE_DESCRIPTOR 1
+#define GET_CONFIGURATION_DESCRIPTOR 4
+
+#define REQUEST_DEVICE_STATUS 0x80
+#define REQUEST_INTERFACE_STATUS 0x81
+#define REQUEST_ENDPOINT_STATUS 0x82
+#define DEVICE_TYPE 0x00
+#define INTERFACE_TYPE 0x01
+#define ENDPOINT_TYPE 0x02
+
+ // Descriptor Types
+#define DEVICE_DESCRIPTOR 0x01
+#define CONFIGURATION_DESCRIPTOR 0x02
+#define STRING_DESCRIPTOR 0x03
+#define INTERFACE_DESCRIPTOR 0x04
+#define ENDPOINT_DESCRIPTOR 0x05
+#define DEVICE_QUALIFIER_DESCRIPTOR 0x06
+#define OTHER_SPEED_CONFIGURATION_DESCRIPTOR 0x07
+
+ // Standard Features
+#define FEATURE_DEVICE_REMOTE_WAKEUP 0x01
+#define FEATURE_ENDPOINT_HALT 0x00
+#define FEATURE_TEST_MODE 0x02
+
+ // Test Mode Selectors
+#define TEST_J 0x01
+#define TEST_K 0x02
+#define TEST_SE0_NAK 0x03
+#define TEST_PACKET 0x04
+#define TEST_FORCE_ENABLE 0x05
+
+ // Device Status
+#define BUS_POWERED 0
+#define SELF_POWERED 1
+#define USB_DEV_STATUS_REMOTEWAKEUP 2
+
+
+ // Bit-masks for the endpoint number and direction bit-fields of endpoint addresses
+#define MSK_EP_NBR 0x0F
+#define MSK_EP_DIR 0x80
+
+ //! @brief Extract endpoint number from endpoint address in endpoint descriptor
+ //! @param ep_addr U8: Endpoint address
+ //! @return U8: Endpoint number
+//#define Get_desc_ep_nbr(ep_addr) (Rd_bitfield(ep_addr, MSK_EP_NBR))
+#define Get_desc_ep_nbr(ep_addr) (ep_addr & MSK_EP_NBR)
+
+ //! @brief Extract endpoint direction from endpoint address in endpoint descriptor
+ //! @param ep_addr U8: Endpoint address
+ //! @return U8: Endpoint direction
+#define Get_desc_ep_dir(ep_addr) (Rd_bitfield(ep_addr, MSK_EP_DIR, 7))
+
+ //! Convert 16-, 32- or 64-bit data between MCU and USB endianisms.
+ //! Depending on MCU endianism, swap or not data bytes.
+ //! @param width Data width in bits: 16, 32 or 64
+ //! @param data 16-, 32- or 64-bit data to format
+ //! @return Formatted 16-, 32- or 64-bit data
+ //! @{
+#if LITTLE_ENDIAN_MCU
+ #define Usb_format_mcu_to_usb_data(width, data) ((TPASTE2(U, width))(data))
+ #define Usb_format_usb_to_mcu_data(width, data) ((TPASTE2(U, width))(data))
+ #define usb_format_mcu_to_usb_data(width, data) ((TPASTE2(U, width))(data))
+ #define usb_format_usb_to_mcu_data(width, data) ((TPASTE2(U, width))(data))
+#else // BIG_ENDIAN_MCU
+ #define Usb_format_mcu_to_usb_data(width, data) (TPASTE2(Swap, width)(data))
+ #define Usb_format_usb_to_mcu_data(width, data) (TPASTE2(Swap, width)(data))
+ #define usb_format_mcu_to_usb_data(width, data) (TPASTE2(swap, width)(data))
+ #define usb_format_usb_to_mcu_data(width, data) (TPASTE2(swap, width)(data))
+#endif
+ //! @}
+ //! @}
+
+#define USB_MODE_UNDEFINED 0x00
+#define USB_MODE_DEVICE 0x01
+#define USB_MODE_HOST 0x02
+
+
+//_____ D E C L A R A T I O N S ____________________________________________
+
+extern volatile U16 g_usb_event;
+
+#if USB_HOST_FEATURE == ENABLED
+extern volatile U32 private_sof_counter;
+#endif
+
+#if USB_DEVICE_FEATURE == ENABLED && USB_HOST_FEATURE == ENABLED
+extern volatile U8 g_usb_mode;
+#elif USB_DEVICE_FEATURE == ENABLED
+ #define g_usb_mode USB_MODE_DEVICE
+#elif USB_HOST_FEATURE == ENABLED
+ #define g_usb_mode USB_MODE_HOST
+#else
+ #error At least one of USB_DEVICE_FEATURE and USB_HOST_FEATURE must be enabled
+#endif
+
+#if (!defined USB_HIGH_SPEED_SUPPORT)
+ #define USB_HIGH_SPEED_SUPPORT DISABLED
+#endif
+
+//! @brief This function initializes the USB process.
+//!
+//! This function enables the USB controller and init the USB interrupts.
+//! The aim is to allow the USB connection detection in order to send
+//! the appropriate USB event to the operating mode manager.
+//! Depending on the mode supported (HOST/DEVICE/DUAL_ROLE) the function
+//! calls the corespong USB mode initialization function
+extern void usb_task_init(void);
+
+//! @brief Entry point of the USB mamnagement
+//!
+//! Depending on the mode supported (HOST/DEVICE/DUAL_ROLE) the function
+//! calls the corespong USB management function
+#ifdef FREERTOS_USED
+extern void usb_task(void *pvParameters);
+#else
+extern void usb_task(void);
+#endif
+extern U32 host_get_timeout( void );
+
+//! @}
+
+
+#endif // _USB_TASK_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/device_template_task.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/device_template_task.c
new file mode 100644
index 0000000..fc0505e
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/device_template_task.c
@@ -0,0 +1,232 @@
+/* This source file is part of the AVR Software Framework 2.0.0 release */
+
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief Management of the USB high-level applicative device task.
+ *
+ * This file manages the USB high-level applicative device task.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+//_____ I N C L U D E S ___________________________________________________
+
+#include "conf_usb.h"
+
+
+#if USB_DEVICE_FEATURE == ENABLED
+
+#include "board.h"
+#ifdef FREERTOS_USED
+#include "FreeRTOS.h"
+#include "task.h"
+#endif
+#include "usb_drv.h"
+#include "usb_descriptors.h"
+#include "usb_standard_request.h"
+#include "device_template_task.h"
+
+
+//_____ M A C R O S ________________________________________________________
+#define BOARD 99
+
+#define EVK1100 1 //!< AT32UC3A EVK1100 board.
+#define EVK1101 2 //!< AT32UC3B EVK1101 board.
+#define UC3C_EK 3 //!< AT32UC3C UC3C_EK board.
+#define EVK1104 4 //!< AT32UC3A3 EVK1104 board.
+#define EVK1105 5 //!< AT32UC3A EVK1105 board.
+#define STK600_RCUC3L0 6 //!< STK600 RCUC3L0 board.
+#define UC3L_EK 7 //!< AT32UC3L-EK board.
+#define XPLAIN 8 //!< ATxmega128A1 Xplain board
+#define XPLAIN_A1 9 //!< ATxmega128A1U Xplain-A1 board
+#define STK600_RC064X 10 //!< ATxmega256A3 STK600 board
+#define STK600_RC100X 11 //!< ATxmega128A1 STK600 board
+
+#define USER_BOARD 99 //!< User-reserved board (if any).
+
+
+
+//_____ D E F I N I T I O N S ______________________________________________
+
+#if BOARD == EVK1100
+# define LED_APPLI_0 LED_BI0_GREEN
+# define LED_APPLI_1 LED_BI0_RED
+#elif BOARD == EVK1101 || BOARD == EVK1104 || BOARD == UC3C_EK || BOARD == EVK1105
+# define LED_APPLI_0 LED2
+# define LED_APPLI_1 LED3
+#endif
+
+#if !defined(LED_APPLI_0) || \
+ !defined(LED_APPLI_1)
+#warning The LED configuration to use in this example is missing.
+#endif
+
+
+//_____ D E C L A R A T I O N S ____________________________________________
+
+static U16 sof_cnt;
+static U8 data_length;
+
+
+//!
+//! @brief This function initializes the hardware/software resources required for device applicative task.
+//!
+void device_template_task_init(void)
+{
+ sof_cnt = 0;
+ data_length = 0;
+#ifndef FREERTOS_USED
+ #if USB_HOST_FEATURE == ENABLED
+ // If both device and host features are enabled, check if device mode is engaged
+ // (accessing the USB registers of a non-engaged mode, even with load operations,
+ // may corrupt USB FIFO data).
+ if (Is_usb_device())
+ #endif // USB_HOST_FEATURE == ENABLED
+ Usb_enable_sof_interrupt();
+#endif // FREERTOS_USED
+
+#ifdef FREERTOS_USED
+ if ( xTaskCreate( device_template_task, configTSK_USB_DTP_NAME, configTSK_USB_DTP_STACK_SIZE, NULL, configTSK_USB_DTP_PRIORITY, NULL ) != pdPASS )
+ {
+ printf( "Failed to create device_template_task\r\n" ) ;
+ }
+#endif // FREERTOS_USED
+}
+
+
+//!
+//! @brief Entry point of the device applicative task management
+//!
+//! This function links the device application to the USB bus.
+//!
+#ifdef FREERTOS_USED
+void device_template_task(void *pvParameters)
+#else
+void device_template_task(void)
+#endif
+{
+ static U8 buf[EP_SIZE_TEMP2];
+
+#ifdef FREERTOS_USED
+ portTickType xLastWakeTime;
+
+ xLastWakeTime = xTaskGetTickCount();
+ while (TRUE)
+ {
+ vTaskDelayUntil(&xLastWakeTime, configTSK_USB_DTP_PERIOD);
+
+ // First, check the device enumeration state
+ if (!Is_device_enumerated()) continue;
+#else
+ // First, check the device enumeration state
+ if (!Is_device_enumerated()) return;
+#endif // FREERTOS_USED
+
+ // HERE STARTS THE USB DEVICE APPLICATIVE CODE
+ // The example below just performs a loopback transmission/reception.
+ // All data received with the OUT endpoint is stored in a RAM buffer and
+ // sent back to the IN endpoint.
+
+#if BOARD == EVK1100
+ // For example, display Start-of-Frame counter on LEDs
+ LED_Display_Field(LED_MONO0_GREEN |
+ LED_MONO1_GREEN |
+ LED_MONO2_GREEN |
+ LED_MONO3_GREEN,
+ sof_cnt >> 5);
+#elif BOARD == EVK1101 || BOARD == UC3C_EK || BOARD == EVK1104 || BOARD == EVK1105
+ // For example, display Start-of-Frame counter on LEDs
+ LED_Display_Field(LED0 |
+ LED1,
+ sof_cnt >> 5);
+#else
+ #warning The display of the SOFs must be defined here.
+#endif
+
+ // If we receive something in the OUT endpoint, just store it in the RAM buffer
+ if (Is_usb_out_received(EP_TEMP_OUT))
+ {
+#if BOARD != 99
+ LED_On(LED_APPLI_1);
+#endif
+ Usb_reset_endpoint_fifo_access(EP_TEMP_OUT);
+ data_length = Usb_byte_count(EP_TEMP_OUT);
+ usb_read_ep_rxpacket(EP_TEMP_OUT, buf, data_length, NULL);
+ Usb_ack_out_received_free(EP_TEMP_OUT);
+#if BOARD != 99
+ LED_Off(LED_APPLI_1);
+#endif
+ }
+
+ // Load the IN endpoint with the contents of the RAM buffer
+ if (data_length && Is_usb_in_ready(EP_TEMP_IN))
+ {
+#if BOARD != 99
+ LED_On(LED_APPLI_0);
+#endif
+ Usb_reset_endpoint_fifo_access(EP_TEMP_IN);
+ usb_write_ep_txpacket(EP_TEMP_IN, buf, data_length, NULL);
+ data_length = 0;
+ Usb_ack_in_ready_send(EP_TEMP_IN);
+#if BOARD != 99
+ LED_Off(LED_APPLI_0);
+#endif
+ }
+#ifdef FREERTOS_USED
+ }
+#endif
+}
+
+
+//!
+//! @brief usb_sof_action
+//!
+//! This function increments the sof_cnt counter each time
+//! the USB Start-of-Frame interrupt subroutine is executed (1 ms).
+//! Useful to manage time delays
+//!
+void usb_sof_action(void)
+{
+ sof_cnt++;
+}
+
+
+#endif // USB_DEVICE_FEATURE == ENABLED
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/device_template_task.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/device_template_task.h
new file mode 100644
index 0000000..d028894
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/device_template_task.h
@@ -0,0 +1,77 @@
+/* This header file is part of the AVR Software Framework 2.0.0 release */
+
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief Management of the USB high-level applicative device task.
+ *
+ * This file manages the USB high-level applicative device task.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _DEVICE_TEMPLATE_TASK_H_
+#define _DEVICE_TEMPLATE_TASK_H_
+
+
+//_____ I N C L U D E S ____________________________________________________
+
+#include "conf_usb.h"
+
+#if USB_DEVICE_FEATURE == DISABLED
+ #error device_template_task.h is #included although USB_DEVICE_FEATURE is disabled
+#endif
+
+
+//_____ M A C R O S ________________________________________________________
+
+
+//_____ D E C L A R A T I O N S ____________________________________________
+
+extern void device_template_task_init(void);
+#ifdef FREERTOS_USED
+extern void device_template_task(void *pvParameters);
+#else
+extern void device_template_task(void);
+#endif
+extern void usb_sof_action(void);
+
+
+#endif // _DEVICE_TEMPLATE_TASK_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/enum/conf_usb.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/enum/conf_usb.h
new file mode 100644
index 0000000..8c6fb6d
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/enum/conf_usb.h
@@ -0,0 +1,258 @@
+/* This header file is part of the AVR Software Framework 2.0.0 release */
+
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief USB configuration file.
+ *
+ * This file contains the possible external configuration of the USB.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _CONF_USB_H_
+#define _CONF_USB_H_
+
+#include "compiler.h"
+#include "board.h"
+//#include "print_funcs.h"
+#include "usb_ids.h"
+
+
+#define BOARD SAM3XEK
+
+#define USB_VBOF_ACTIVE_LEVEL HIGH
+
+//#define FREERTOS_USED
+
+ //! Possible values ENABLED or DISABLED
+#define USB_HIGH_SPEED_SUPPORT ENABLED
+
+//! @defgroup usb_general_conf USB application configuration
+//!
+//! @{
+
+ // _________________ USB MODE CONFIGURATION ____________________________
+ //
+ //! @defgroup USB_op_mode USB operating modes configuration
+ //! Defines to enable device or host USB operating modes
+ //! supported by the application
+ //! @{
+
+ //! @brief ENABLE to activate the host software framework support
+ //!
+ //! Possible values ENABLED or DISABLED
+#define USB_HOST_FEATURE ENABLED
+
+ //! @brief ENABLE to activate the device software framework support
+ //!
+ //! Possible values ENABLED or DISABLED
+#define USB_DEVICE_FEATURE DISABLED
+
+ //! @}
+
+
+ // _________________ HOST MODE CONFIGURATION ____________________________
+ //
+ //! @defgroup USB_host_mode_cfg USB host operating mode configuration
+ //!
+ //! @{
+
+#if USB_HOST_FEATURE == ENABLED
+
+ //! @brief VID/PID supported table list
+ //!
+ //! This table contains the VID/PID that are supported by the reduced-host application.
+ //!
+ //! VID_PID_TABLE format definition:\n
+ //! \#define VID_PID_TABLE {VID1, number_of_PIDs_for_VID1, PID11_value, ..., PID1X_Value,\n
+ //! ...\n
+ //! VIDn, number_of_PIDs_for_VIDn, PIDn1_value, ..., PIDnY_Value}
+#define VID_PID_TABLE {ATMEL_VID, 1, ENUM_EXAMPLE_PID}
+
+ //! @brief CLASS/SUBCLASS/PROTOCOL supported table list
+ //!
+ //! This table contains the CLASS/SUBCLASS/PROTOCOL that are supported by the reduced-host application.
+ //! This table definition allows to extend the reduced application device support to an entire CLASS/
+ //! SUBCLASS/PROTOCOL instead of a simple VID/PID table list.
+ //!
+ //! CLASS_SUBCLASS_PROTOCOL format definition:\n
+ //! \#define CLASS_SUBCLASS_PROTOCOL {CLASS1, SUB_CLASS1, PROTOCOL1,\n
+ //! ...\n
+ //! CLASSn, SUB_CLASSn, PROTOCOLn}
+#define CLASS_SUBCLASS_PROTOCOL {VENDOR_CLASS, NO_SUBCLASS, NO_PROTOCOL}
+
+ //! The size of RAM buffer reserved for descriptor handling
+#define SIZEOF_DATA_STAGE 250
+
+ //! The address that will be assigned to the connected device
+#define DEVICE_ADDRESS 0x05
+
+ //! The maximal number of interfaces that can be supported (composite device)
+#define MAX_INTERFACE_SUPPORTED 0x02
+
+ //! The maximal number of endpoints per interface supported
+#define MAX_EP_PER_INTERFACE 3
+
+ //! The host controller will be limited to the strict VID/PID list.
+ //! When enabled, if the device VID/PID does not belong to the supported list,
+ //! the host controller software will not go to deeper configuration, but to error state.
+#define HOST_STRICT_VID_PID_TABLE DISABLE
+
+ //! Try to configure the host pipe according to the device descriptors received
+#define HOST_AUTO_CFG_ENDPOINT ENABLE
+
+ //! Host Start-of-Frame interrupt always enabled
+#define HOST_CONTINUOUS_SOF_INTERRUPT DISABLE
+
+ //! When host error state detected, go to detached state
+#define HOST_ERROR_RESTART ENABLE
+
+ //! USB host pipes transfers use USB communication interrupt (allows to use non-blocking functions)
+ //! When set to ENABLE, take care of the NAK_RECEIVE_TIMEOUT value: NAK OUT will be counted
+ //! faster and a timeout will occur if using FreeRTOS, since host and device tasks are sleeping
+ //! several milliseconds.
+#define USB_HOST_PIPE_INTERRUPT_TRANSFER DISABLE
+
+ //! Force CPU reset upon ID pin change
+#define ID_PIN_CHANGE_GENERATE_RESET DISABLE
+
+ //! Enable time-out delay for host transfer
+#define TIMEOUT_DELAY_ENABLE ENABLE
+
+ //! Delay 1/4 s (250 ms) before time-out value
+#define TIMEOUT_DELAY 1
+
+ //! Enable cpt NAK time-out for host transfer
+#define NAK_TIMEOUT_ENABLE ENABLE
+
+ //! Number of NAK handshakes before time-out for transmit functions (up to 0xFFFF)
+#define NAK_SEND_TIMEOUT 0x0010
+
+ //! Number of NAK handshakes before time-out for receive functions (up to 0xFFFF)
+#define NAK_RECEIVE_TIMEOUT 0x0010
+
+#if HOST_AUTO_CFG_ENDPOINT == DISABLE
+ //! If no auto configuration of EP, map here user function
+#define User_configure_endpoint()
+#endif
+
+ //! @defgroup host_cst_actions USB host custom actions
+ //!
+ //! @{
+ // Write here the action to associate with each USB host event.
+ // Be careful not to waste time in order not to disturb the functions.
+#define Usb_id_transition_action()
+#define Host_device_disconnection_action() (tpl_new_device_connected = FALSE)
+#define Host_device_connection_action()
+#define Host_sof_action() host_sof_action()
+#define Host_suspend_action()
+#define Host_hwup_action()
+#define Host_device_supported_action()
+#define Host_device_not_supported_action()
+#define Host_new_device_connection_action() (tpl_new_device_connected = TRUE)
+#define Host_device_class_not_supported_action()
+#define Host_device_error_action()
+
+ //! During the verification of the device class by the host (after device
+ //! enumeration), this call-back function allows to look more deeply into
+ //! the configuration descriptor. Thus, application-dependent specific
+ //! descriptors can be detected and analyzed.
+#define Host_user_check_class_action(x)
+ //! @}
+
+extern volatile Bool tpl_new_device_connected;
+extern void host_sof_action(void);
+extern void host_suspend_action(void);
+
+#endif // USB_HOST_FEATURE == ENABLED
+
+ //! @}
+
+
+ // _________________ DEVICE MODE CONFIGURATION __________________________
+ //
+ //! @defgroup USB_device_mode_cfg USB device operating mode configuration
+ //!
+ //! @{
+
+#if USB_DEVICE_FEATURE == ENABLED
+
+#define NB_ENDPOINTS 3 // Number of endpoints in the application including control endpoint
+#define EP_TEMP_IN 1
+#define EP_TEMP_OUT 2
+
+ //! @defgroup device_cst_actions USB device custom actions
+ //!
+ //! @{
+ // Write here the action to associate with each USB event.
+ // Be careful not to waste time in order not to disturb the functions.
+#define Usb_sof_action() usb_sof_action()
+#define Usb_wake_up_action()
+#define Usb_resume_action()
+#define Usb_suspend_action()
+#define Usb_reset_action()
+#define Usb_vbus_on_action()
+#define Usb_vbus_off_action()
+#define Usb_set_configuration_action()
+ //! @}
+
+extern void usb_sof_action(void);
+extern void usb_suspend_action(void);
+
+#endif // USB_DEVICE_FEATURE == ENABLED
+
+ //! @}
+
+
+ //! USB interrupt priority level
+//#define USB_INT_LEVEL AVR32_INTC_INT0
+#define portENTER_SWITCHING_ISR() {}
+#define portEXIT_SWITCHING_ISR() {}
+
+ //! Debug trace macro
+#define LOG_STR(...) (printf(__VA_ARGS__),printf("\n\r"))
+#define TRACE_OTG(...) printf(__VA_ARGS__)
+
+
+//! @}
+
+
+#endif // _CONF_USB_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/enum/device/usb_descriptors.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/enum/device/usb_descriptors.c
new file mode 100644
index 0000000..a265c05
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/enum/device/usb_descriptors.c
@@ -0,0 +1,234 @@
+/* This source file is part of the AVR Software Framework 2.0.0 release */
+
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief USB identifiers.
+ *
+ * This file contains the USB parameters that uniquely identify the USB
+ * application through descriptor tables.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+//_____ I N C L U D E S ____________________________________________________
+
+#include "conf_usb.h"
+
+
+#if USB_DEVICE_FEATURE == ENABLED
+
+#include "usb_drv.h"
+#include "usb_descriptors.h"
+#include "usb_standard_request.h"
+#include "usb_specific_request.h"
+
+
+//_____ M A C R O S ________________________________________________________
+
+
+//_____ D E F I N I T I O N S ______________________________________________
+
+// usb_user_device_descriptor
+const S_usb_device_descriptor usb_dev_desc =
+{
+ sizeof(S_usb_device_descriptor),
+ DEVICE_DESCRIPTOR,
+ Usb_format_mcu_to_usb_data(16, USB_SPECIFICATION),
+ DEVICE_CLASS,
+ DEVICE_SUB_CLASS,
+ DEVICE_PROTOCOL,
+ EP_CONTROL_LENGTH,
+ Usb_format_mcu_to_usb_data(16, VENDOR_ID),
+ Usb_format_mcu_to_usb_data(16, PRODUCT_ID),
+ Usb_format_mcu_to_usb_data(16, RELEASE_NUMBER),
+ MAN_INDEX,
+ PROD_INDEX,
+ SN_INDEX,
+ NB_CONFIGURATION
+};
+
+
+// usb_user_configuration_descriptor FS
+const S_usb_user_configuration_descriptor usb_conf_desc_fs =
+{
+ {
+ sizeof(S_usb_configuration_descriptor),
+ CONFIGURATION_DESCRIPTOR,
+ Usb_format_mcu_to_usb_data(16, sizeof(S_usb_user_configuration_descriptor)),
+ NB_INTERFACE,
+ CONF_NB,
+ CONF_INDEX,
+ CONF_ATTRIBUTES,
+ MAX_POWER
+ },
+
+ {
+ sizeof(S_usb_interface_descriptor),
+ INTERFACE_DESCRIPTOR,
+ INTERFACE_NB_TEMP,
+ ALTERNATE_TEMP,
+ NB_ENDPOINT_TEMP,
+ INTERFACE_CLASS,
+ INTERFACE_SUB_CLASS,
+ INTERFACE_PROTOCOL,
+ INTERFACE_INDEX_TEMP
+ },
+
+ {
+ sizeof(S_usb_endpoint_descriptor),
+ ENDPOINT_DESCRIPTOR,
+ ENDPOINT_NB_TEMP1,
+ EP_ATTRIBUTES_TEMP1,
+ Usb_format_mcu_to_usb_data(16, EP_SIZE_TEMP1),
+ EP_INTERVAL_TEMP1
+ },
+
+ {
+ sizeof(S_usb_endpoint_descriptor),
+ ENDPOINT_DESCRIPTOR,
+ ENDPOINT_NB_TEMP2,
+ EP_ATTRIBUTES_TEMP2,
+ Usb_format_mcu_to_usb_data(16, EP_SIZE_TEMP2),
+ EP_INTERVAL_TEMP2
+ }
+};
+
+#if (USB_HIGH_SPEED_SUPPORT==ENABLED)
+
+// usb_user_configuration_descriptor HS
+const S_usb_user_configuration_descriptor usb_conf_desc_hs =
+{
+ {
+ sizeof(S_usb_configuration_descriptor),
+ CONFIGURATION_DESCRIPTOR,
+ Usb_format_mcu_to_usb_data(16, sizeof(S_usb_user_configuration_descriptor)),
+ NB_INTERFACE,
+ CONF_NB,
+ CONF_INDEX,
+ CONF_ATTRIBUTES,
+ MAX_POWER
+ },
+
+ {
+ sizeof(S_usb_interface_descriptor),
+ INTERFACE_DESCRIPTOR,
+ INTERFACE_NB_TEMP,
+ ALTERNATE_TEMP,
+ NB_ENDPOINT_TEMP,
+ INTERFACE_CLASS,
+ INTERFACE_SUB_CLASS,
+ INTERFACE_PROTOCOL,
+ INTERFACE_INDEX_TEMP
+ },
+
+ {
+ sizeof(S_usb_endpoint_descriptor),
+ ENDPOINT_DESCRIPTOR,
+ ENDPOINT_NB_TEMP1,
+ EP_ATTRIBUTES_TEMP1,
+ Usb_format_mcu_to_usb_data(16, EP_SIZE_TEMP1_HS),
+ EP_INTERVAL_TEMP1
+ },
+
+ {
+ sizeof(S_usb_endpoint_descriptor),
+ ENDPOINT_DESCRIPTOR,
+ ENDPOINT_NB_TEMP2,
+ EP_ATTRIBUTES_TEMP2,
+ Usb_format_mcu_to_usb_data(16, EP_SIZE_TEMP2_HS),
+ EP_INTERVAL_TEMP2
+ }
+};
+
+
+// usb_qualifier_desc FS
+const S_usb_device_qualifier_descriptor usb_qualifier_desc =
+{
+ sizeof(S_usb_device_qualifier_descriptor),
+ DEVICE_QUALIFIER_DESCRIPTOR,
+ Usb_format_mcu_to_usb_data(16, USB_SPECIFICATION),
+ DEVICE_CLASS,
+ DEVICE_SUB_CLASS,
+ DEVICE_PROTOCOL,
+ EP_CONTROL_LENGTH,
+ NB_CONFIGURATION,
+ 0
+};
+#endif
+
+
+// usb_user_language_id
+const S_usb_language_id usb_user_language_id =
+{
+ sizeof(S_usb_language_id),
+ STRING_DESCRIPTOR,
+ Usb_format_mcu_to_usb_data(16, LANGUAGE_ID)
+};
+
+
+// usb_user_manufacturer_string_descriptor
+const S_usb_manufacturer_string_descriptor usb_user_manufacturer_string_descriptor =
+{
+ sizeof(S_usb_manufacturer_string_descriptor),
+ STRING_DESCRIPTOR,
+ USB_MANUFACTURER_NAME
+};
+
+
+// usb_user_product_string_descriptor
+const S_usb_product_string_descriptor usb_user_product_string_descriptor =
+{
+ sizeof(S_usb_product_string_descriptor),
+ STRING_DESCRIPTOR,
+ USB_PRODUCT_NAME
+};
+
+
+// usb_user_serial_number
+const S_usb_serial_number usb_user_serial_number =
+{
+ sizeof(S_usb_serial_number),
+ STRING_DESCRIPTOR,
+ USB_SERIAL_NUMBER
+};
+
+
+#endif // USB_DEVICE_FEATURE == ENABLED
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/enum/device/usb_descriptors.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/enum/device/usb_descriptors.h
new file mode 100644
index 0000000..d370c05
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/enum/device/usb_descriptors.h
@@ -0,0 +1,458 @@
+/* This header file is part of the AVR Software Framework 2.0.0 release */
+
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief USB identifiers.
+ *
+ * This file contains the USB parameters that uniquely identify the USB
+ * application through descriptor tables.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _USB_DESCRIPTORS_H_
+#define _USB_DESCRIPTORS_H_
+
+
+//_____ I N C L U D E S ____________________________________________________
+
+#include "conf_usb.h"
+
+#if USB_DEVICE_FEATURE == DISABLED
+ #error usb_descriptors.h is #included although USB_DEVICE_FEATURE is disabled
+#endif
+
+
+#include "usb_standard_request.h"
+#include "usb_task.h"
+
+
+//_____ M A C R O S ________________________________________________________
+
+#define Usb_unicode(c) (Usb_format_mcu_to_usb_data(16, (U16)(c)))
+#define Usb_get_dev_desc_pointer() (&(usb_dev_desc.bLength))
+#define Usb_get_dev_desc_length() (sizeof(usb_dev_desc))
+#define Usb_get_conf_desc_pointer() Usb_get_conf_desc_fs_pointer()
+#define Usb_get_conf_desc_length() Usb_get_conf_desc_fs_length()
+#define Usb_get_conf_desc_hs_pointer() (&(usb_conf_desc_hs.cfg.bLength))
+#define Usb_get_conf_desc_hs_length() (sizeof(usb_conf_desc_hs))
+#define Usb_get_conf_desc_fs_pointer() (&(usb_conf_desc_fs.cfg.bLength))
+#define Usb_get_conf_desc_fs_length() (sizeof(usb_conf_desc_fs))
+#define Usb_get_qualifier_desc_pointer() (&(usb_qualifier_desc.bLength))
+#define Usb_get_qualifier_desc_length() (sizeof(usb_qualifier_desc))
+
+
+//_____ U S B D E F I N E S _____________________________________________
+
+ // USB Device descriptor
+#define USB_SPECIFICATION 0x0200
+#define DEVICE_CLASS 0 //! Each configuration has its own class
+#define DEVICE_SUB_CLASS 0 //! Each configuration has its own subclass
+#define DEVICE_PROTOCOL 0 //! Each configuration has its own protocol
+#define EP_CONTROL_LENGTH 64
+#define VENDOR_ID ATMEL_VID //! Atmel vendor ID
+#define PRODUCT_ID ENUM_EXAMPLE_PID
+#define RELEASE_NUMBER 0x1000
+#define MAN_INDEX 0x01
+#define PROD_INDEX 0x02
+#define SN_INDEX 0x03
+#define NB_CONFIGURATION 1
+
+ // CONFIGURATION
+#define NB_INTERFACE 1 //! The number of interfaces for this configuration
+#define CONF_NB 1 //! Number of this configuration
+#define CONF_INDEX 0
+#define CONF_ATTRIBUTES USB_CONFIG_SELFPOWERED
+#define MAX_POWER 50 // 100 mA
+
+ // USB Interface descriptor
+#define INTERFACE_NB_TEMP 0 //! The number of this interface
+#define ALTERNATE_TEMP 0 //! The alt setting nb of this interface
+#define NB_ENDPOINT_TEMP 2 //! The number of endpoints this interface has
+#define INTERFACE_CLASS MS_CLASS //! Mass-Storage Class
+#define INTERFACE_SUB_CLASS SCSI_SUBCLASS //! SCSI Transparent Command Set Subclass
+#define INTERFACE_PROTOCOL BULK_PROTOCOL //! Bulk-Only Transport Protocol
+#define INTERFACE_CLASS_TEMP VENDOR_CLASS //! Vendor-Specific Class
+#define INTERFACE_SUB_CLASS_TEMP NO_SUBCLASS //! No Subclass
+#define INTERFACE_PROTOCOL_TEMP NO_PROTOCOL //! No Protocol
+#define INTERFACE_INDEX_TEMP 0
+
+ // USB Endpoint 1 descriptor
+#define ENDPOINT_NB_TEMP1 (EP_TEMP_IN | MSK_EP_DIR)
+#define EP_ATTRIBUTES_TEMP1 TYPE_BULK
+#define EP_IN_LENGTH_TEMP1 64
+#define EP_SIZE_TEMP1 EP_IN_LENGTH_TEMP1
+#define EP_IN_LENGTH_TEMP1_HS 512
+#define EP_SIZE_TEMP1_HS EP_IN_LENGTH_TEMP1_HS
+#define EP_INTERVAL_TEMP1 0x00 //! Interrupt polling interval from host
+
+ // USB Endpoint 2 descriptor
+#define ENDPOINT_NB_TEMP2 EP_TEMP_OUT
+#define EP_ATTRIBUTES_TEMP2 TYPE_BULK
+#define EP_OUT_LENGTH_TEMP2 64
+#define EP_SIZE_TEMP2 EP_OUT_LENGTH_TEMP2
+#define EP_OUT_LENGTH_TEMP2_HS 64
+#define EP_SIZE_TEMP2_HS EP_OUT_LENGTH_TEMP2_HS
+#define EP_INTERVAL_TEMP2 0x00 //! Interrupt polling interval from host
+
+#define DEVICE_STATUS SELF_POWERED
+#define INTERFACE_STATUS 0x00 // TBD
+
+#define LANG_ID 0x00
+
+#define USB_MN_LENGTH 5
+#define USB_MANUFACTURER_NAME \
+{\
+ Usb_unicode('A'),\
+ Usb_unicode('T'),\
+ Usb_unicode('M'),\
+ Usb_unicode('E'),\
+ Usb_unicode('L') \
+}
+
+#define USB_PN_LENGTH 20
+#define USB_PRODUCT_NAME \
+{\
+ Usb_unicode('A'),\
+ Usb_unicode('T'),\
+ Usb_unicode('S'),\
+ Usb_unicode('A'),\
+ Usb_unicode('M'),\
+ Usb_unicode('3'),\
+ Usb_unicode('X'),\
+ Usb_unicode(' '),\
+ Usb_unicode('E'),\
+ Usb_unicode('N'),\
+ Usb_unicode('U'),\
+ Usb_unicode('M'),\
+ Usb_unicode(' '),\
+ Usb_unicode(' '),\
+ Usb_unicode(' '),\
+ Usb_unicode(' '),\
+ Usb_unicode(' '),\
+ Usb_unicode(' '),\
+ Usb_unicode(' '),\
+ Usb_unicode(' ') \
+}
+
+#define USB_SN_LENGTH 13
+#define USB_SERIAL_NUMBER \
+{\
+ Usb_unicode('1'),\
+ Usb_unicode('.'),\
+ Usb_unicode('0'),\
+ Usb_unicode('.'),\
+ Usb_unicode('0'),\
+ Usb_unicode('.'),\
+ Usb_unicode('0'),\
+ Usb_unicode('.'),\
+ Usb_unicode('0'),\
+ Usb_unicode('.'),\
+ Usb_unicode('0'),\
+ Usb_unicode('.'),\
+ Usb_unicode('0') \
+}
+
+#define LANGUAGE_ID 0x0409
+
+
+//! USB Request
+typedef
+#if defined (__ICCAVR32__) || defined (__ICCARM__)
+#pragma pack(1)
+#endif
+struct
+#if (defined __GNUC__)
+__attribute__((__packed__))
+#endif
+{
+ U8 bmRequestType; //!< Characteristics of the request
+ U8 bRequest; //!< Specific request
+ U16 wValue; //!< Field that varies according to request
+ U16 wIndex; //!< Field that varies according to request
+ U16 wLength; //!< Number of bytes to transfer if Data
+}
+#if defined (__ICCAVR32__) || defined (__ICCARM__)
+#pragma pack()
+#endif
+S_UsbRequest;
+
+
+//! USB Device Descriptor
+typedef
+#if defined (__ICCAVR32__) || defined (__ICCARM__)
+#pragma pack(1)
+#endif
+struct
+#if (defined __GNUC__)
+__attribute__((__packed__))
+#endif
+{
+ U8 bLength; //!< Size of this descriptor in bytes
+ U8 bDescriptorType; //!< DEVICE descriptor type
+ U16 bscUSB; //!< Binay Coded Decimal Spec. release
+ U8 bDeviceClass; //!< Class code assigned by the USB
+ U8 bDeviceSubClass; //!< Subclass code assigned by the USB
+ U8 bDeviceProtocol; //!< Protocol code assigned by the USB
+ U8 bMaxPacketSize0; //!< Max packet size for EP0
+ U16 idVendor; //!< Vendor ID. ATMEL = 0x03EB
+ U16 idProduct; //!< Product ID assigned by the manufacturer
+ U16 bcdDevice; //!< Device release number
+ U8 iManufacturer; //!< Index of manu. string descriptor
+ U8 iProduct; //!< Index of prod. string descriptor
+ U8 iSerialNumber; //!< Index of S.N. string descriptor
+ U8 bNumConfigurations; //!< Number of possible configurations
+}
+#if defined (__ICCAVR32__) || defined (__ICCARM__)
+#pragma pack()
+#endif
+S_usb_device_descriptor;
+
+
+//! USB Configuration Descriptor
+typedef
+#if defined (__ICCAVR32__) || defined (__ICCARM__)
+#pragma pack(1)
+#endif
+struct
+#if (defined __GNUC__)
+__attribute__((__packed__))
+#endif
+{
+ U8 bLength; //!< Size of this descriptor in bytes
+ U8 bDescriptorType; //!< CONFIGURATION descriptor type
+ U16 wTotalLength; //!< Total length of data returned
+ U8 bNumInterfaces; //!< Number of interfaces for this conf.
+ U8 bConfigurationValue; //!< Value for SetConfiguration resquest
+ U8 iConfiguration; //!< Index of string descriptor
+ U8 bmAttributes; //!< Configuration characteristics
+ U8 MaxPower; //!< Maximum power consumption
+}
+#if defined (__ICCAVR32__) || defined (__ICCARM__)
+#pragma pack()
+#endif
+S_usb_configuration_descriptor;
+
+
+//! USB Interface Descriptor
+typedef
+#if defined (__ICCAVR32__) || defined (__ICCARM__)
+#pragma pack(1)
+#endif
+struct
+#if (defined __GNUC__)
+__attribute__((__packed__))
+#endif
+{
+ U8 bLength; //!< Size of this descriptor in bytes
+ U8 bDescriptorType; //!< INTERFACE descriptor type
+ U8 bInterfaceNumber; //!< Number of interface
+ U8 bAlternateSetting; //!< Value to select alternate setting
+ U8 bNumEndpoints; //!< Number of EP except EP 0
+ U8 bInterfaceClass; //!< Class code assigned by the USB
+ U8 bInterfaceSubClass; //!< Subclass code assigned by the USB
+ U8 bInterfaceProtocol; //!< Protocol code assigned by the USB
+ U8 iInterface; //!< Index of string descriptor
+}
+#if defined (__ICCAVR32__) || defined (__ICCARM__)
+#pragma pack()
+#endif
+S_usb_interface_descriptor;
+
+
+//! USB Endpoint Descriptor
+typedef
+#if defined (__ICCAVR32__) || defined (__ICCARM__)
+#pragma pack(1)
+#endif
+struct
+#if (defined __GNUC__)
+__attribute__((__packed__))
+#endif
+{
+ U8 bLength; //!< Size of this descriptor in bytes
+ U8 bDescriptorType; //!< ENDPOINT descriptor type
+ U8 bEndpointAddress; //!< Address of the endpoint
+ U8 bmAttributes; //!< Endpoint's attributes
+ U16 wMaxPacketSize; //!< Maximum packet size for this EP
+ U8 bInterval; //!< Interval for polling EP in ms
+}
+#if defined (__ICCAVR32__) || defined (__ICCARM__)
+#pragma pack()
+#endif
+S_usb_endpoint_descriptor;
+
+
+//! USB Device Qualifier Descriptor
+typedef
+#if defined (__ICCAVR32__) || defined (__ICCARM__)
+#pragma pack(1)
+#endif
+struct
+#if (defined __GNUC__)
+__attribute__((__packed__))
+#endif
+{
+ U8 bLength; //!< Size of this descriptor in bytes
+ U8 bDescriptorType; //!< Device Qualifier descriptor type
+ U16 bscUSB; //!< Binay Coded Decimal Spec. release
+ U8 bDeviceClass; //!< Class code assigned by the USB
+ U8 bDeviceSubClass; //!< Subclass code assigned by the USB
+ U8 bDeviceProtocol; //!< Protocol code assigned by the USB
+ U8 bMaxPacketSize0; //!< Max packet size for EP0
+ U8 bNumConfigurations; //!< Number of possible configurations
+ U8 bReserved; //!< Reserved for future use, must be zero
+}
+#if defined (__ICCAVR32__) || defined (__ICCARM__)
+#pragma pack()
+#endif
+S_usb_device_qualifier_descriptor;
+
+
+//! USB Language Descriptor
+typedef
+#if defined (__ICCAVR32__) || defined (__ICCARM__)
+#pragma pack(1)
+#endif
+struct
+#if (defined __GNUC__)
+__attribute__((__packed__))
+#endif
+{
+ U8 bLength; //!< Size of this descriptor in bytes
+ U8 bDescriptorType; //!< STRING descriptor type
+ U16 wlangid; //!< Language id
+}
+#if defined (__ICCAVR32__) || defined (__ICCARM__)
+#pragma pack()
+#endif
+S_usb_language_id;
+
+
+//_____ U S B M A N U F A C T U R E R D E S C R I P T O R _______________
+
+//! struct usb_st_manufacturer
+typedef
+#if defined (__ICCAVR32__) || defined (__ICCARM__)
+#pragma pack(1)
+#endif
+struct
+#if (defined __GNUC__)
+__attribute__((__packed__))
+#endif
+{
+ U8 bLength; //!< Size of this descriptor in bytes
+ U8 bDescriptorType; //!< STRING descriptor type
+ U16 wstring[USB_MN_LENGTH]; //!< Unicode characters
+}
+#if defined (__ICCAVR32__) || defined (__ICCARM__)
+#pragma pack()
+#endif
+S_usb_manufacturer_string_descriptor;
+
+
+//_____ U S B P R O D U C T D E S C R I P T O R _________________________
+
+//! struct usb_st_product
+typedef
+#if defined (__ICCAVR32__) || defined (__ICCARM__)
+#pragma pack(1)
+#endif
+struct
+#if (defined __GNUC__)
+__attribute__((__packed__))
+#endif
+{
+ U8 bLength; //!< Size of this descriptor in bytes
+ U8 bDescriptorType; //!< STRING descriptor type
+ U16 wstring[USB_PN_LENGTH]; //!< Unicode characters
+}
+#if defined (__ICCAVR32__) || defined (__ICCARM__)
+#pragma pack()
+#endif
+S_usb_product_string_descriptor;
+
+
+//_____ U S B S E R I A L N U M B E R D E S C R I P T O R _____________
+
+//! struct usb_st_serial_number
+typedef
+#if defined (__ICCAVR32__) || defined (__ICCARM__)
+#pragma pack(1)
+#endif
+struct
+#if (defined __GNUC__)
+__attribute__((__packed__))
+#endif
+{
+ U8 bLength; //!< Size of this descriptor in bytes
+ U8 bDescriptorType; //!< STRING descriptor type
+ U16 wstring[USB_SN_LENGTH]; //!< Unicode characters
+}
+#if defined (__ICCAVR32__) || defined (__ICCARM__)
+#pragma pack()
+#endif
+S_usb_serial_number;
+
+
+//_____ U S B D E V I C E T E M P L A T E D E S C R I P T O R _________
+
+typedef
+#if defined (__ICCAVR32__) || defined (__ICCARM__)
+#pragma pack(1)
+#endif
+struct
+#if (defined __GNUC__)
+__attribute__((__packed__))
+#endif
+{
+ S_usb_configuration_descriptor cfg;
+ S_usb_interface_descriptor ifc;
+ S_usb_endpoint_descriptor ep1;
+ S_usb_endpoint_descriptor ep2;
+}
+#if defined (__ICCAVR32__) || defined (__ICCARM__)
+#pragma pack()
+#endif
+S_usb_user_configuration_descriptor;
+
+
+#endif // _USB_DESCRIPTORS_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/enum/device/usb_specific_request.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/enum/device/usb_specific_request.c
new file mode 100644
index 0000000..1002b25
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/enum/device/usb_specific_request.c
@@ -0,0 +1,199 @@
+/* This source file is part of the AVR Software Framework 2.0.0 release */
+
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief Processing of USB device specific enumeration requests.
+ *
+ * This file contains the specific request decoding for enumeration process.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+//_____ I N C L U D E S ____________________________________________________
+
+#include "conf_usb.h"
+
+
+#if USB_DEVICE_FEATURE == ENABLED
+
+#include "usb_drv.h"
+#include "usb_descriptors.h"
+#include "usb_standard_request.h"
+#include "usb_specific_request.h"
+
+
+//_____ M A C R O S ________________________________________________________
+
+
+//_____ D E F I N I T I O N S ______________________________________________
+
+
+//_____ P R I V A T E D E C L A R A T I O N S ____________________________
+
+extern const void *pbuffer;
+extern U16 data_to_transfer;
+
+
+//_____ D E C L A R A T I O N S ____________________________________________
+
+//! @brief This function configures the endpoints of the device application.
+//! This function is called when the set configuration request has been received.
+//!
+void usb_user_endpoint_init(U8 conf_nb)
+{
+
+#if (USB_HIGH_SPEED_SUPPORT==ENABLED)
+ if( !Is_usb_full_speed_mode() )
+ {
+ (void)Usb_configure_endpoint(EP_TEMP_IN,
+ EP_ATTRIBUTES_TEMP1,
+ DIRECTION_IN,
+ EP_SIZE_TEMP1_HS,
+ DOUBLE_BANK);
+
+ (void)Usb_configure_endpoint(EP_TEMP_OUT,
+ EP_ATTRIBUTES_TEMP2,
+ DIRECTION_OUT,
+ EP_SIZE_TEMP2_HS,
+ DOUBLE_BANK);
+ return;
+ }
+#endif
+ (void)Usb_configure_endpoint(EP_TEMP_IN,
+ EP_ATTRIBUTES_TEMP1,
+ DIRECTION_IN,
+ EP_SIZE_TEMP1,
+ DOUBLE_BANK);
+
+ (void)Usb_configure_endpoint(EP_TEMP_OUT,
+ EP_ATTRIBUTES_TEMP2,
+ DIRECTION_OUT,
+ EP_SIZE_TEMP2,
+ DOUBLE_BANK);
+}
+
+
+//! This function is called by the standard USB read request function when
+//! the USB request is not supported. This function returns TRUE when the
+//! request is processed. This function returns FALSE if the request is not
+//! supported. In this case, a STALL handshake will be automatically
+//! sent by the standard USB read request function.
+//!
+Bool usb_user_read_request(U8 type, U8 request)
+{
+ U8 descriptor_type;
+ U8 string_type;
+
+ string_type = Usb_read_endpoint_data(EP_CONTROL, 8);
+ descriptor_type = Usb_read_endpoint_data(EP_CONTROL, 8);
+
+ switch (request)
+ {
+ case GET_DESCRIPTOR:
+ switch (descriptor_type)
+ {
+ default:
+ break;
+ }
+ break;
+
+ case SET_CONFIGURATION:
+ switch (descriptor_type)
+ {
+ default:
+ break;
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ return FALSE;
+}
+
+
+//! This function returns the size and the pointer on a user information
+//! structure
+//!
+Bool usb_user_get_descriptor(U8 type, U8 string)
+{
+ pbuffer = NULL;
+
+ switch (type)
+ {
+ case STRING_DESCRIPTOR:
+ switch (string)
+ {
+ case LANG_ID:
+ data_to_transfer = sizeof(usb_user_language_id);
+ pbuffer = &usb_user_language_id;
+ break;
+
+ case MAN_INDEX:
+ data_to_transfer = sizeof(usb_user_manufacturer_string_descriptor);
+ pbuffer = &usb_user_manufacturer_string_descriptor;
+ break;
+
+ case PROD_INDEX:
+ data_to_transfer = sizeof(usb_user_product_string_descriptor);
+ pbuffer = &usb_user_product_string_descriptor;
+ break;
+
+ case SN_INDEX:
+ data_to_transfer = sizeof(usb_user_serial_number);
+ pbuffer = &usb_user_serial_number;
+ break;
+
+ default:
+ break;
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ return pbuffer != NULL;
+}
+
+
+#endif // USB_DEVICE_FEATURE == ENABLED
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/enum/device/usb_specific_request.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/enum/device/usb_specific_request.h
new file mode 100644
index 0000000..08dd1e3
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/enum/device/usb_specific_request.h
@@ -0,0 +1,101 @@
+/* This header file is part of the AVR Software Framework 2.0.0 release */
+
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief Processing of USB device specific enumeration requests.
+ *
+ * This file contains the specific request decoding for enumeration process.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _USB_SPECIFIC_REQUEST_H_
+#define _USB_SPECIFIC_REQUEST_H_
+
+
+//_____ I N C L U D E S ____________________________________________________
+
+#include "conf_usb.h"
+
+#if USB_DEVICE_FEATURE == DISABLED
+ #error usb_specific_request.h is #included although USB_DEVICE_FEATURE is disabled
+#endif
+
+
+//_____ M A C R O S ________________________________________________________
+
+
+//_____ D E F I N I T I O N S ______________________________________________
+
+extern const S_usb_device_descriptor usb_dev_desc;
+extern const S_usb_device_qualifier_descriptor usb_qualifier_desc;
+extern const S_usb_user_configuration_descriptor usb_conf_desc_fs;
+extern const S_usb_user_configuration_descriptor usb_conf_desc_hs;
+extern const S_usb_manufacturer_string_descriptor usb_user_manufacturer_string_descriptor;
+extern const S_usb_product_string_descriptor usb_user_product_string_descriptor;
+extern const S_usb_serial_number usb_user_serial_number;
+extern const S_usb_language_id usb_user_language_id;
+
+//! @defgroup specific_request USB device specific requests
+//! @{
+
+//! @brief This function configures the endpoints of the device application.
+//! This function is called when the set configuration request has been received.
+//!
+//! The core of this function should be correctly rewritten depending on the USB device
+//! application characteristics (the USB device application has specific endpoints
+//! configuration).
+//!
+extern void usb_user_endpoint_init(U8);
+
+//! This function is called by the standard USB read request function when
+//! the USB request is not supported. This function returns TRUE when the
+//! request is processed. This function returns FALSE if the request is not
+//! supported. In this case, a STALL handshake will be automatically
+//! sent by the standard USB read request function.
+//!
+extern Bool usb_user_read_request(U8, U8);
+extern Bool usb_user_get_descriptor(U8, U8);
+
+//! @}
+
+
+#endif // _USB_SPECIFIC_REQUEST_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/host_template_task.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/host_template_task.c
new file mode 100644
index 0000000..51b1fcd
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/host_template_task.c
@@ -0,0 +1,307 @@
+/* This source file is part of the AVR Software Framework 2.0.0 release */
+
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief Management of the USB high-level applicative host task.
+ *
+ * This file manages the USB high-level applicative host task.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+//_____ I N C L U D E S ___________________________________________________
+
+#include "conf_usb.h"
+
+
+#if USB_HOST_FEATURE == ENABLED
+
+#include "board.h"
+#ifdef FREERTOS_USED
+#include "libfreertos.h"
+#include "FreeRTOSConfig.h"
+#include "FreeRTOSTask.h"
+#endif
+#include "usb_drv.h"
+#include "usb_host_enum.h"
+#include "usb_host_task.h"
+#include "host_template_task.h"
+
+
+//_____ M A C R O S ________________________________________________________
+#define BOARD 99
+
+#define EVK1100 1 //!< AT32UC3A EVK1100 board.
+#define EVK1101 2 //!< AT32UC3B EVK1101 board.
+#define UC3C_EK 3 //!< AT32UC3C UC3C_EK board.
+#define EVK1104 4 //!< AT32UC3A3 EVK1104 board.
+#define EVK1105 5 //!< AT32UC3A EVK1105 board.
+#define STK600_RCUC3L0 6 //!< STK600 RCUC3L0 board.
+#define UC3L_EK 7 //!< AT32UC3L-EK board.
+#define XPLAIN 8 //!< ATxmega128A1 Xplain board
+#define XPLAIN_A1 9 //!< ATxmega128A1U Xplain-A1 board
+#define STK600_RC064X 10 //!< ATxmega256A3 STK600 board
+#define STK600_RC100X 11 //!< ATxmega128A1 STK600 board
+
+#define USER_BOARD 99 //!< User-reserved board (if any).
+
+
+//_____ D E F I N I T I O N S ______________________________________________
+
+#if BOARD == EVK1100
+# define LED_APPLI_0 LED_BI0_GREEN
+# define LED_APPLI_1 LED_BI0_RED
+#elif BOARD == EVK1101 || BOARD == UC3C_EK || BOARD == EVK1104 || BOARD == EVK1105
+# define LED_APPLI_0 LED2
+# define LED_APPLI_1 LED3
+#endif
+
+#if !defined(LED_APPLI_0) || \
+ !defined(LED_APPLI_1)
+#warning The LED configuration to use in this example is missing.
+#endif
+
+
+//_____ D E C L A R A T I O N S ____________________________________________
+
+static U16 sof_cnt;
+static U8 pipe_in;
+static U8 pipe_out;
+static U8 buf[64];
+#if USB_HOST_PIPE_INTERRUPT_TRANSFER == ENABLE
+static volatile U8 busy;
+#endif
+
+volatile Bool tpl_new_device_connected;
+
+
+//!
+//! @brief This function initializes the high-level host application.
+//! Here initialize specific hardware resources requirements.
+//!
+void host_template_task_init(void)
+{
+ U8 i;
+
+ sof_cnt = 0;
+ for (i = 0; i < sizeof(buf); i++) buf[i] = i;
+#if USB_HOST_PIPE_INTERRUPT_TRANSFER == ENABLE
+ busy = FALSE;
+#endif
+ tpl_new_device_connected = FALSE;
+
+#ifdef FREERTOS_USED
+ if ( xTaskCreate( host_template_task, configTSK_USB_HTP_NAME, configTSK_USB_HTP_STACK_SIZE, NULL, configTSK_USB_HTP_PRIORITY, NULL ) != pdPASS )
+ {
+ printf( "Failed to create host_template_task\r\n" ) ;
+ }
+#endif // FREERTOS_USED
+}
+
+
+//!
+//! @brief High-level host applicative task entry point
+//! Put here the code of your host application.
+//! The sample code just sends and receives 64 bytes from
+//! IN and OUT pipes.
+//!
+#ifdef FREERTOS_USED
+void host_template_task(void *pvParameters)
+#else
+void host_template_task(void)
+#endif
+{
+#if USB_HOST_PIPE_INTERRUPT_TRANSFER == DISABLE
+ Status_t sta;
+ U16 nb;
+#endif
+ U8 i;
+
+#ifdef FREERTOS_USED
+ portTickType xLastWakeTime;
+
+ xLastWakeTime = xTaskGetTickCount();
+ while (TRUE)
+ {
+ vTaskDelayUntil(&xLastWakeTime, configTSK_USB_HTP_PERIOD);
+
+#endif // FREERTOS_USED
+ // First, check the host controller is in full operating mode with the
+ // B-device attached and enumerated
+ if (Is_host_ready())
+ {
+ // Put here the code to execute in host mode
+
+#if BOARD == EVK1100
+ // For example, display Start-of-Frame counter on LEDs
+ LED_Display_Field(LED_MONO0_GREEN |
+ LED_MONO1_GREEN |
+ LED_MONO2_GREEN |
+ LED_MONO3_GREEN,
+ sof_cnt >> 5);
+#elif BOARD == EVK1101 || BOARD == UC3C_EK || BOARD == EVK1104 || BOARD == EVK1105
+ // For example, display Start-of-Frame counter on LEDs
+ LED_Display_Field(LED0 |
+ LED1,
+ sof_cnt >> 5);
+#else
+ #warning The display of the SOFs must be defined here.
+#endif
+
+ // New device connection (executed only once after device connection)
+ if (tpl_new_device_connected)
+ {
+ tpl_new_device_connected = FALSE;
+
+#if USB_HOST_PIPE_INTERRUPT_TRANSFER == ENABLE
+ // No more pipe interrupt transfer pending
+ busy = FALSE;
+#endif
+
+ // For all supported interfaces
+ for (i = 0; i < Get_nb_supported_interface(); i++)
+ {
+ // If vendor-specific class
+ if (Get_class(i) == VENDOR_CLASS)
+ {
+ // Get correct physical pipes associated with IN/OUT endpoints
+ if (Is_ep_in(i, 0))
+ { // Yes, associate it with the IN pipe
+ pipe_in = Get_ep_pipe(i, 0);
+ pipe_out = Get_ep_pipe(i, 1);
+ }
+ else
+ { // No, invert...
+ pipe_in = Get_ep_pipe(i, 1);
+ pipe_out = Get_ep_pipe(i, 0);
+ }
+ break;
+ }
+ }
+ }
+
+#if USB_HOST_PIPE_INTERRUPT_TRANSFER == DISABLE
+ // The sample task sends 64 bytes through OUT pipe
+#if BOARD != 99
+ LED_On(LED_APPLI_0);
+#endif
+ sta = host_send_data(pipe_out, sizeof(buf), buf);
+#if BOARD != 99
+ LED_Off(LED_APPLI_0);
+#endif
+
+ // And receives 64 bytes from IN pipe
+ nb = sizeof(buf);
+#if BOARD != 99
+ LED_On(LED_APPLI_1);
+#endif
+ sta = host_get_data(pipe_in, &nb, buf);
+#if BOARD != 99
+ LED_Off(LED_APPLI_1);
+#endif
+#else
+ // Similar applicative task under interrupt mode...
+ if (!busy)
+ {
+ busy = TRUE;
+ LED_On(LED_APPLI_0);
+ host_send_data_interrupt(pipe_out, sizeof(buf), buf, host_send_data_callback);
+ LED_Off(LED_APPLI_0);
+ }
+#endif
+
+ // Here is an example of an applicative request to go to USB suspend ...
+ if (FALSE/* applicative conditions */)
+ {
+ host_set_feature_remote_wakeup();
+ Host_request_suspend();
+ }
+ }
+
+ // Here an applicative example of resume request...
+ if (Is_host_suspended()/* && applicative conditions */)
+ {
+ Host_request_resume();
+ }
+#ifdef FREERTOS_USED
+ }
+#endif
+}
+
+
+#if USB_HOST_PIPE_INTERRUPT_TRANSFER == ENABLE
+
+void host_send_data_callback(Status_t status, U16 nb_byte)
+{
+ if (status == PIPE_GOOD)
+ {
+ LED_On(LED_APPLI_1);
+ host_get_data_interrupt(pipe_in, sizeof(buf), buf, host_get_data_callback);
+ LED_Off(LED_APPLI_1);
+ }
+}
+
+
+void host_get_data_callback(Status_t status, U16 nb_byte)
+{
+ if (status == PIPE_GOOD)
+ {
+ busy = FALSE;
+ }
+}
+
+#endif // USB_HOST_PIPE_INTERRUPT_TRANSFER == ENABLE
+
+
+//!
+//! @brief host_sof_action
+//!
+//! This function increments the sof_cnt counter each time
+//! the USB Start-of-Frame interrupt subroutine is executed (1 ms).
+//! Useful to manage time delays
+//!
+void host_sof_action(void)
+{
+ sof_cnt++;
+}
+
+
+#endif // USB_HOST_FEATURE == ENABLED
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/host_template_task.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/host_template_task.h
new file mode 100644
index 0000000..a6626e3
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/host_template_task.h
@@ -0,0 +1,84 @@
+/* This header file is part of the AVR Software Framework 2.0.0 release */
+
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief Management of the USB high-level application host task.
+ *
+ * This file manages the USB high-level application host task.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _HOST_TEMPLATE_TASK_H_
+#define _HOST_TEMPLATE_TASK_H_
+
+
+//_____ I N C L U D E S ____________________________________________________
+
+#include "conf_usb.h"
+
+#if USB_HOST_FEATURE == DISABLED
+ #error host_template_task.h is #included although USB_HOST_FEATURE is disabled
+#endif
+
+
+#include "usb_host_task.h"
+
+
+//_____ M A C R O S ________________________________________________________
+
+
+//_____ D E C L A R A T I O N S ____________________________________________
+
+extern void host_template_task_init(void);
+#ifdef FREERTOS_USED
+extern void host_template_task(void *pvParameters);
+#else
+extern void host_template_task(void);
+#endif
+#if USB_HOST_PIPE_INTERRUPT_TRANSFER == ENABLE
+extern Pipe_handler host_send_data_callback;
+extern Pipe_handler host_get_data_callback;
+#endif
+extern void host_sof_action(void);
+
+
+#endif // _HOST_TEMPLATE_TASK_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/main.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/main.c
new file mode 100644
index 0000000..2b0cf28
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/main.c
@@ -0,0 +1,289 @@
+/* This source file is part of the AVR Software Framework 2.0.0 release */
+
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Main file of the USB enumeration example.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/*! \mainpage AVR32 USB Software Framework for Dual-Role Devices
+ *
+ * \section intro License
+ * Use of this program is subject to Atmel's End User License Agreement.
+ *
+ * Please read the \ref license at the bottom of this page.
+ *
+ * \section install Description
+ * This embedded application source code illustrates how to implement a USB interfaced application
+ * on the AVR32 microcontroller.
+ *
+ * As the AVR32 implements a device/host USB controller, the embedded application can operate
+ * in one of the following USB operating modes:
+ * - USB device;
+ * - USB reduced-host controller;
+ * - USB dual-role device (depending on the ID pin).
+ *
+ * To optimize embedded code/RAM size and reduce the number of source modules, the application can be
+ * configured to use one and only one of these operating modes.
+ *
+ * \section sample About the Sample Application
+ * By default the sample code is delivered with a simple preconfigured dual-role USB application.
+ * It means that the code generated allows to operate as a device or a host depending on the USB ID pin:
+ * - attached to a mini-B plug (ID pin unconnected) the application will be used in the device operating mode;
+ * - attached to a mini-A plug (ID pin tied to ground) the application will operate in reduced-host mode.
+ *
+ * \image html appli.jpg "Application Overview"
+ *
+ * Thus two instances of this application can be connected together with a mini-A - mini-B cable.
+ * - The host operating mode of the application (that we call A-device) can manage the connection
+ * and the enumeration of a device application connected in device operating mode (that we call B-device).
+ * Once the device has been enumerated, the host high-level application can operate USB applicative exchanges
+ * with the B-device. Here the sample host application writes 64 bytes through a USB OUT pipe and reads back
+ * this data with an IN pipe.
+ * - The device operating mode of the application (B-device) answers to the enumeration requests (setup requests)
+ * of the host controller. Once it has been properly enumerated the high-level device application receives 64 bytes
+ * through its OUT enpoint and when the host controller request for an IN exchange on its IN endpoints,
+ * sends it back (loopback application).
+ *
+ * \note
+ * - When an EVK1101/UC3C-EK/EVK1104/EVK1105 is the host device, LED2 and LED3 will quickly blink. LED0 & LED1 will slowly blink with
+ * the following pattern: LED0 on/LED1 off, then LED0 off/LED1 on, then LED0 on/LED1 on.
+ * - When an EVK1100 is the host device, LED4(red light of the led tagged as LED5 on the PCB) will quickly blink.
+ * LED0, LED1, LED2 and LED3 will slowly blink in a complex pattern.
+ * - The host device may display the following messages on USART1(EVK1100/EVK1101)/USART0-CDC(EVK1105)/USART1-CDC(EVK1104)/USART2-CDC(UC3C-EK) depending
+ * on the current USB events: "Device connected", "Unsupported device",
+ * "Device enumerated", "USB suspended", "USB resumed". While the slave device
+ * never displays any message on USART.
+ *
+ * \section arch Architecture
+ * As illustrated in the figure below, the application entry point is located in the enum_example.c file.
+ * The main function first performs the initialization of services and tasks and then runs them in an infinite loop.
+ *
+ * The sample dual-role application is based on three different tasks:
+ * - The USB task (usb_task.c associated source file) is the task performing the USB low-level
+ * enumeration process in device or host mode. Once this task has detected that the USB connection is fully
+ * operational, it updates various status flags that can be checked within the high-level applicative tasks.
+ * - The device template task (device_template_task.c associated source file) performs the high-level device
+ * application operation. Once the device is fully enumerated (device SET_CONFIGURATION request received), the task
+ * checks for received data on its OUT endpoint and transmits this data on its IN endpoint.
+ * - The host template task (host_template_task.c associated file) performs the high-level host application operation.
+ * If the B-device is correctly connected and enumerated, the task sends and receives data over the USB bus.
+ *
+ * \image html arch_full.jpg "Architecture Overview"
+ *
+ * \section config Configuration
+ * The sample application is configured to implement both host and device functionalities.
+ * Of course it can also be configured to be used only in device or reduced-host mode (see the conf_usb.h file).
+ * Depending on the USB operating mode selected, the USB task will call either the USB host task (usb_host_task.c),
+ * or the USB device task (usb_device_task.c) to manage USB specification chapter 9 requests.
+ *
+ * \note The B-device descriptors used for this sample application are not directly usable for enumeration
+ * with a standard PC host system. Please see \ref contactinfo for real device application examples
+ * (mass storage, HID mouse, HID keyboard, CDC, etc.).
+ *
+ * \section contactinfo Contact Information
+ * For further information, visit
+ * <A href="http://www.atmel.com/products/AVR32/">Atmel AVR32</A>.\n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ * \section license Copyright Notice
+ * Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+//_____ I N C L U D E S ___________________________________________________
+#include "conf_usb.h"
+
+#ifdef FREERTOS_USED
+#include <stdio.h>
+#endif
+#include "compiler.h"
+#include "board.h"
+//#include "print_funcs.h"
+//#include "intc.h"
+//#include "power_clocks_lib.h"
+#ifdef FREERTOS_USED
+#include "libfreertos.h"
+#include "FreeRTOSConfig.h"
+#include "FreeRTOSTask.h"
+#endif
+
+#include "usb_task.h"
+
+#if USB_DEVICE_FEATURE == ENABLED
+#include "device_template_task.h"
+#endif
+
+#if USB_HOST_FEATURE == ENABLED
+#include "host_template_task.h"
+#endif
+
+#ifdef FREERTOS_USED
+extern void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName );
+extern void vApplicationIdleHook( void );
+extern void vApplicationTickHook( void );
+
+extern void xPortSysTickHandler(void );
+extern void xPortPendSVHandler(void);
+extern void vPortSVCHandler(void);
+#endif
+
+//_____ D E F I N I T I O N S ______________________________________________
+/** PIOs for USB OTGHS */
+static const Pin pUOTGHSPins[] = {PIN_UOTGHS_VBOF, PIN_UOTGHS_ID, PIN_UOTGHS_FAULT};
+static const Pin pUOTGHS_Fault = PIN_UOTGHS_FAULT;
+
+
+#ifdef FREERTOS_USED
+void SysTick_Handler(void)
+{
+ xPortSysTickHandler();
+ TimeTick_Increment() ;
+}
+
+void PendSV_Handler(void)
+{
+ xPortPendSVHandler();
+}
+void SVC_Handler(void)
+{
+ vPortSVCHandler();
+}
+
+
+/**
+ * Called if stack overflow during execution
+ */
+extern void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName )
+{
+ printf( "stack overflow %x %s\r\n", pxTask, pcTaskName ) ;
+ /* If the parameters have been corrupted then inspect pxCurrentTCB to
+ identify which task has overflowed its stack. */
+ for( ;; ) ;
+}
+
+extern void vApplicationIdleHook( void )
+{
+}
+
+/**
+ * This function is called by FreeRTOS each tick
+ */
+extern void vApplicationTickHook( void )
+{
+}
+#endif
+
+
+
+
+/**
+ * \brief UOTGHS Library Example Application entry point.
+ *
+ * \return 42 Fatal error.
+ */
+extern int main( void )
+{
+ /* Disable watchdog */
+ WDT_Disable( WDT ) ;
+
+ /* UTMI parallel mode, High/Full/Low Speed */
+ /* UOTGCK not used in this configuration (High Speed) */
+ PMC->PMC_SCDR = PMC_SCDR_UOTGCK;
+ /* USB clock register: USB Clock Input is UTMI PLL */
+ PMC->PMC_USB = PMC_USB_USBS;
+ /* USBS: USB Input Clock Selection: USB Clock Input is PLLA */
+ /* Enable peripheral clock for UOTGHS */
+ PMC_EnablePeripheral(UOTGHS_IRQn);
+ UOTGHS->UOTGHS_CTRL = 0x0;
+ /* Enable PLL 480 MHz */
+ PMC->CKGR_UCKR = CKGR_UCKR_UPLLEN | CKGR_UCKR_UPLLCOUNT(0xF);
+ /* Wait that PLL is considered locked by the PMC */
+ while( !(PMC->PMC_SR & PMC_SR_LOCKU) );
+ /* Enable peripheral clock for UOTGHS */
+ PMC_EnablePeripheral(UOTGHS_IRQn);
+
+ /* Output example information */
+ printf( "-- UOTGHS Library Example %s --\n\r", SOFTPACK_VERSION ) ;
+ printf( "-- %s\n\r", BOARD_NAME ) ;
+ printf( "-- Compiled: %s %s --\n\r", __DATE__, __TIME__ ) ;
+
+ /* UOTGHS pins */
+ PIO_PinConfigure( pUOTGHSPins, PIO_LISTSIZE( pUOTGHSPins ) );
+ if ( PIO_PinGet(&pUOTGHS_Fault) == 0 )
+ {
+ TRACE_OTG("UOTGHS_Fault = 0 (active low ERROR FLAG !\r\n");
+ TRACE_OTG("Undervoltage, Soft Start, Overcurrent, or Overtemperature\r\n");
+ while(1);
+ }
+
+ /* Enable interrupt */
+ NVIC_EnableIRQ(UOTGHS_IRQn);
+
+ /* Initialize USB task */
+ usb_task_init();
+
+#if USB_DEVICE_FEATURE == ENABLED
+ device_template_task_init();
+#endif
+
+#if USB_HOST_FEATURE == ENABLED
+ host_template_task_init();
+#endif
+
+#ifdef FREERTOS_USED
+ /* Start OS scheduler */
+ vTaskStartScheduler();
+ TRACE_OTG("FreeRTOS returned\n\r");
+ return 42;
+#else
+ /* No OS here. Need to call each task in round-robin mode. */
+ while (TRUE)
+ {
+ usb_task();
+
+ #if USB_DEVICE_FEATURE == ENABLED
+ device_template_task();
+ #endif
+
+ #if USB_HOST_FEATURE == ENABLED
+ host_template_task();
+ #endif
+ }
+#endif /* FREERTOS_USED */
+}
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/readme.html b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/readme.html
new file mode 100644
index 0000000..b3c04de
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/example_enum/readme.html
@@ -0,0 +1,36 @@
+<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">
+<html>
+ <head>
+ <link rel="stylesheet" type="text/css" href="../../../../docsrc/AVR32_ns.css">
+ </head>
+ <body>
+ <div id="wrapper">
+ <p align="left" class="whs2">
+ <a href="../../../drivers_readme.html">
+ <font color="red">
+ </font>
+ Back to drivers page</a>
+ </p>
+ <h1 align="center" class="whs1"> AVR Software Framework: UC3 USBB Driver and Examples Documentation
+ <br></h1>
+ <p align="center" class="whs2"> Copyright &copy; 2007 Atmel Corporation
+ </p>
+ <p> &nbsp;
+ </p>
+ <p> &nbsp;
+ </p>
+ <h2>USB Enumeration Example</h2>
+ <p> &nbsp;
+ </p>
+ Read the documentation according to your environment of choice:
+<!--
+ <li><a href="./enum_example_standalone/doc/html/index.html">Documentation for this application in stand-alone mode(i.e. no OS)</a></li>
+-->
+ <li><a href="./enum_example_freertos/doc/html/index.html">Documentation for this application running on FreeRTOS</a></li>
+ <p>&nbsp;</p>
+ <hr align="center" width="50%" class="whs4">
+ <p class=legalfooter> AVR is a registered trademark of Atmel Corporation.
+ </p>
+ </div>
+ </body>
+</html>
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/usb_drv.c b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/usb_drv.c
new file mode 100644
index 0000000..075b94c
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/usb_drv.c
@@ -0,0 +1,983 @@
+/* This source file is part of the AVR Software Framework 2.0.0 release */
+
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief Low-level driver for AVR32 USBB.
+ *
+ * This file contains the USBB low-level driver routines.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USBB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+//_____ I N C L U D E S ____________________________________________________
+
+#include "usb_drv.h"
+
+
+//_____ M A C R O S ________________________________________________________
+
+
+//_____ D E C L A R A T I O N S ____________________________________________
+
+#if USB_DEVICE_FEATURE == DISABLED && USB_HOST_FEATURE == DISABLED
+ #error At least one of USB_DEVICE_FEATURE and USB_HOST_FEATURE must be enabled
+#endif
+
+//! Pointers to the FIFO data registers of pipes/endpoints
+//! Use aggregated pointers to have several alignments available for a same address
+UnionVPtr pep_fifo[MAX_PEP_NB];
+
+
+
+void Uotghs_trace(void)
+{
+ TRACE_OTG("CTRL: 0x%X\n\r",UOTGHS->UOTGHS_CTRL);
+ TRACE_OTG("SR: 0x%X\n\r",UOTGHS->UOTGHS_SR);
+ TRACE_OTG("FSM: 0x%X\n\r",UOTGHS->UOTGHS_FSM);
+ TRACE_OTG("DEVCTRL: 0x%X\n\r",UOTGHS->UOTGHS_DEVCTRL);
+ TRACE_OTG("DEVISR: 0x%X\n\r",UOTGHS->UOTGHS_DEVISR);
+ TRACE_OTG("DEVIMR: 0x%X\n\r",UOTGHS->UOTGHS_DEVIMR);
+ TRACE_OTG("DEVEPTCFG0: 0x%X\n\r",UOTGHS->UOTGHS_DEVEPTCFG[0]);
+ TRACE_OTG("DEVEPTCFG1: 0x%X\n\r",UOTGHS->UOTGHS_DEVEPTCFG[1]);
+ TRACE_OTG("DEVEPTCFG2: 0x%X\n\r",UOTGHS->UOTGHS_DEVEPTCFG[2]);
+ TRACE_OTG("DEVEPTISR: 0x%X\n\r",UOTGHS->UOTGHS_DEVEPTISR[0]);
+ TRACE_OTG("HSTCTRL: 0x%X\n\r",UOTGHS->UOTGHS_HSTCTRL);
+ TRACE_OTG("HSTISR: 0x%X\n\r",UOTGHS->UOTGHS_HSTISR);
+ TRACE_OTG("HSTIMR: 0x%X\n\r",UOTGHS->UOTGHS_HSTIMR);
+ TRACE_OTG("HSTPIP: 0x%X\n\r",UOTGHS->UOTGHS_HSTPIP);
+ TRACE_OTG("HSTADDR1: 0x%X\n\r",UOTGHS->UOTGHS_HSTADDR1);
+ TRACE_OTG("HSTADDR2: 0x%X\n\r",UOTGHS->UOTGHS_HSTADDR2);
+ TRACE_OTG("HSTADDR3: 0x%X\n\r",UOTGHS->UOTGHS_HSTADDR3);
+ TRACE_OTG("HSTPIPCFG: 0x%X\n\r",UOTGHS->UOTGHS_HSTPIPCFG[0]);
+ TRACE_OTG("HSTPIPCFG1: 0x%X\n\r",UOTGHS->UOTGHS_HSTPIPCFG[1]);
+ TRACE_OTG("HSTPIPCFG2: 0x%X\n\r",UOTGHS->UOTGHS_HSTPIPCFG[2]);
+ TRACE_OTG("HSTPIPINRQ: 0x%X\n\r",UOTGHS->UOTGHS_HSTPIPINRQ[0]);
+ TRACE_OTG("HSTPIPERR: 0x%X\n\r",UOTGHS->UOTGHS_HSTPIPERR[0]);
+ TRACE_OTG("HSTPIPISR: 0x%X\n\r",UOTGHS->UOTGHS_HSTPIPISR[0]);
+ TRACE_OTG("HSTPIPIMR: 0x%X\n\r",UOTGHS->UOTGHS_HSTPIPIMR[0]);
+
+ /* Test ID */
+ if( UOTGHS->UOTGHS_SR & UOTGHS_SR_ID)
+ {
+ TRACE_OTG("ID=1: PERIPHERAL\n\r");
+ }
+ else
+ {
+ TRACE_OTG("ID=0: HOST\n\r");
+ }
+
+ /* Test VBUS */
+ if( 0 != (UOTGHS->UOTGHS_SR & UOTGHS_SR_VBUS) ) {
+ TRACE_OTG("VBUS = 1\n\r");
+ }
+ else {
+ TRACE_OTG("VBUS = 0\n\r");
+ }
+
+ /* Test SPEED */
+ TRACE_OTG("Speed = 0x%X\n\r", UOTGHS->UOTGHS_SR & UOTGHS_SR_SPEED_Msk);
+
+ /* FSM State:
+ * 0 A_IDLESTATE This is the start state for A-devices (when the ID pin is 0)
+ * 1 A_WAIT_VRISE In this state, the A-device waits for the voltage on VBus to rise above the A-device VBus
+ * Valid threshold (4.4 V).
+ * 2 A_WAIT_BCON In this state, the A-device waits for the B-device to signal a connection.
+ * 3 A_HOST In this state, the A-device that operates in Host mode is operational.
+ * 4 A_SUSPEND The A-device operating as a host is in the suspend mode.
+ * 5 A_PERIPHERAL The A-device operates as a peripheral.
+ * 6 A_WAIT_VFALL In this state, the A-device waits for the voltage on VBus to drop below the A-device
+ * Session Valid threshold (1.4 V).
+ * 7 A_VBUS_ERR In this state, the A-device waits for recovery of the over-current condition that caused it
+ * to enter this state.
+ * 8 A_WAIT_DISCHARGE In this state, the A-device waits for the data USB line to discharge (100 us).
+ * 9 B_IDLE This is the start state for B-device (when the ID pin is 1).
+ * 10 B_PERIPHERAL In this state, the B-device acts as the peripheral.
+ * 11 B_WAIT_BEGIN_HNP In this state, the B-device is in suspend mode and waits until 3 ms before initiating the
+ * HNP protocol if requested.
+ * 12 B_WAIT_DISCHARGE In this state, the B-device waits for the data USB line to discharge (100 us) before
+ * becoming Host.
+ * 13 B_WAIT_ACON In this state, the B-device waits for the A-device to signal a connect before becoming B-
+ * Host.
+ * 14 B_HOST In this state, the B-device acts as the Host.
+ * 15 B_SRP_INIT In this state, the B-device attempts to start a session using the SRP protocol. */
+ TRACE_OTG("FSM = 0x%X\n\r", UOTGHS->UOTGHS_FSM);
+}
+
+
+//! ---------------------------------------------------------
+//! ------------------ DEVICE -------------------------------
+//! ---------------------------------------------------------
+
+#if USB_DEVICE_FEATURE == ENABLED
+
+#include "usb_descriptors.h"
+
+//! usb_init_device
+//!
+//! This function initializes the USB device controller and
+//! configures the Default Control Endpoint.
+//!
+//! @return Status
+//!
+Status_bool_t usb_init_device(void)
+{
+ return Is_usb_id_device() && !Is_usb_endpoint_enabled(EP_CONTROL) &&
+ Usb_configure_endpoint(EP_CONTROL,
+ TYPE_CONTROL,
+ DIRECTION_OUT,
+ EP_CONTROL_LENGTH,
+ SINGLE_BANK);
+}
+
+//! usb_set_ep_txpacket
+//!
+//! This function fills the selected endpoint FIFO with a constant byte, using
+//! as few accesses as possible.
+//!
+//! @param ep Number of the addressed endpoint
+//! @param txbyte Byte to fill the endpoint with
+//! @param data_length Number of bytes to write
+//!
+//! @return Number of non-written bytes
+//!
+//! @note The selected endpoint FIFO may be filled in several steps by calling
+//! usb_set_ep_txpacket several times.
+//!
+//! @warning Invoke Usb_reset_endpoint_fifo_access before this function when at
+//! FIFO beginning whether or not the FIFO is to be filled in several steps.
+//!
+//! @warning Do not mix calls to this function with calls to indexed macros.
+//!
+U32 usb_set_ep_txpacket(U8 ep, U8 txbyte, U32 data_length)
+{
+ // Use aggregated pointers to have several alignments available for a same address
+ UnionVPtr ep_fifo_cur;
+#if (!defined __OPTIMIZE_SIZE__) || !__OPTIMIZE_SIZE__ // Auto-generated when GCC's -Os command option is used
+ StructCVPtr ep_fifo_end;
+ Union64 txval;
+#else
+ UnionCVPtr ep_fifo_end;
+ union
+ {
+ U8 u8[1];
+ } txval;
+#endif // !__OPTIMIZE_SIZE__
+
+ // Initialize pointers for write loops and limit the number of bytes to write
+ ep_fifo_cur.u8ptr = pep_fifo[ep].u8ptr;
+ ep_fifo_end.u8ptr = ep_fifo_cur.u8ptr +
+ min(data_length, Usb_get_endpoint_size(ep) - Usb_byte_count(ep));
+#if (!defined __OPTIMIZE_SIZE__) || !__OPTIMIZE_SIZE__ // Auto-generated when GCC's -Os command option is used
+ ep_fifo_end.u16ptr = (U16 *)Align_down((U32)ep_fifo_end.u8ptr, sizeof(U16));
+ ep_fifo_end.u32ptr = (U32 *)Align_down((U32)ep_fifo_end.u16ptr, sizeof(U32));
+ ep_fifo_end.u64ptr = (U64 *)Align_down((U32)ep_fifo_end.u32ptr, sizeof(U64));
+#endif // !__OPTIMIZE_SIZE__
+ txval.u8[0] = txbyte;
+#if (!defined __OPTIMIZE_SIZE__) || !__OPTIMIZE_SIZE__ // Auto-generated when GCC's -Os command option is used
+ txval.u8[1] = txval.u8[0];
+ txval.u16[1] = txval.u16[0];
+ txval.u32[1] = txval.u32[0];
+
+ // If pointer to FIFO data register is not 16-bit aligned
+ if (!Test_align((U32)ep_fifo_cur.u8ptr, sizeof(U16)))
+ {
+ // Write 8-bit data to reach 16-bit alignment
+ if (ep_fifo_cur.u8ptr < ep_fifo_end.u8ptr)
+ {
+ *ep_fifo_cur.u8ptr++ = txval.u8[0];
+ }
+ }
+
+ // If pointer to FIFO data register is not 32-bit aligned
+ if (!Test_align((U32)ep_fifo_cur.u16ptr, sizeof(U32)))
+ {
+ // Write 16-bit data to reach 32-bit alignment
+ if (ep_fifo_cur.u16ptr < ep_fifo_end.u16ptr)
+ {
+ *ep_fifo_cur.u16ptr++ = txval.u16[0];
+ }
+ }
+
+ // If pointer to FIFO data register is not 64-bit aligned
+ if (!Test_align((U32)ep_fifo_cur.u32ptr, sizeof(U64)))
+ {
+ // Write 32-bit data to reach 64-bit alignment
+ if (ep_fifo_cur.u32ptr < ep_fifo_end.u32ptr)
+ {
+ *ep_fifo_cur.u32ptr++ = txval.u32[0];
+ }
+ }
+
+ // Write 64-bit-aligned data
+ while (ep_fifo_cur.u64ptr < ep_fifo_end.u64ptr)
+ {
+ *ep_fifo_cur.u64ptr++ = txval.u64;
+ }
+
+ // Write remaining 32-bit data if some
+ if (ep_fifo_cur.u32ptr < ep_fifo_end.u32ptr)
+ {
+ *ep_fifo_cur.u32ptr++ = txval.u32[0];
+ }
+
+ // Write remaining 16-bit data if some
+ if (ep_fifo_cur.u16ptr < ep_fifo_end.u16ptr)
+ {
+ *ep_fifo_cur.u16ptr++ = txval.u16[0];
+ }
+
+ // Write remaining 8-bit data if some
+ if (ep_fifo_cur.u8ptr < ep_fifo_end.u8ptr)
+ {
+ *ep_fifo_cur.u8ptr++ = txval.u8[0];
+ }
+
+#else
+
+ // Write remaining 8-bit data if some
+ while (ep_fifo_cur.u8ptr < ep_fifo_end.u8ptr)
+ {
+ *ep_fifo_cur.u8ptr++ = txval.u8[0];
+ }
+
+#endif // !__OPTIMIZE_SIZE__
+
+ // Compute the number of non-written bytes
+ data_length -= ep_fifo_cur.u8ptr - pep_fifo[ep].u8ptr;
+
+ // Save current position in FIFO data register
+ pep_fifo[ep].u8ptr = ep_fifo_cur.u8ptr;
+
+ // Return the number of non-written bytes
+ return data_length;
+}
+
+//! usb_write_ep_txpacket
+//!
+//! This function writes the buffer pointed to by txbuf to the selected
+//! endpoint FIFO, using as few accesses as possible.
+//!
+//! @param ep Number of the addressed endpoint
+//! @param txbuf Address of buffer to read
+//! @param data_length Number of bytes to write
+//! @param ptxbuf NULL or pointer to the buffer address to update
+//!
+//! @return Number of non-written bytes
+//!
+//! @note The selected endpoint FIFO may be written in several steps by calling
+//! usb_write_ep_txpacket several times.
+//!
+//! @warning Invoke Usb_reset_endpoint_fifo_access before this function when at
+//! FIFO beginning whether or not the FIFO is to be written in several steps.
+//!
+//! @warning Do not mix calls to this function with calls to indexed macros.
+//!
+U32 usb_write_ep_txpacket(U8 ep, const void *txbuf, U32 data_length, const void **ptxbuf)
+{
+ // Use aggregated pointers to have several alignments available for a same address
+ UnionVPtr ep_fifo;
+ UnionCPtr txbuf_cur;
+#if (!defined __OPTIMIZE_SIZE__) || !__OPTIMIZE_SIZE__ // Auto-generated when GCC's -Os command option is used
+ StructCPtr txbuf_end;
+#else
+ UnionCPtr txbuf_end;
+#endif // !__OPTIMIZE_SIZE__
+
+ // Initialize pointers for copy loops and limit the number of bytes to copy
+ ep_fifo.u8ptr = pep_fifo[ep].u8ptr;
+ txbuf_cur.u8ptr = txbuf;
+ txbuf_end.u8ptr = txbuf_cur.u8ptr +
+ min(data_length, Usb_get_endpoint_size(ep) - Usb_byte_count(ep));
+#if (!defined __OPTIMIZE_SIZE__) || !__OPTIMIZE_SIZE__ // Auto-generated when GCC's -Os command option is used
+ txbuf_end.u16ptr = (U16 *)Align_down((U32)txbuf_end.u8ptr, sizeof(U16));
+ txbuf_end.u32ptr = (U32 *)Align_down((U32)txbuf_end.u16ptr, sizeof(U32));
+ txbuf_end.u64ptr = (U64 *)Align_down((U32)txbuf_end.u32ptr, sizeof(U64));
+
+ // If all addresses are aligned the same way with respect to 16-bit boundaries
+ if (Get_align((U32)txbuf_cur.u8ptr, sizeof(U16)) == Get_align((U32)ep_fifo.u8ptr, sizeof(U16)))
+ {
+ // If pointer to transmission buffer is not 16-bit aligned
+ if (!Test_align((U32)txbuf_cur.u8ptr, sizeof(U16)))
+ {
+ // Copy 8-bit data to reach 16-bit alignment
+ if (txbuf_cur.u8ptr < txbuf_end.u8ptr)
+ {
+ // 8-bit accesses to FIFO data registers do require pointer post-increment
+ *ep_fifo.u8ptr++ = *txbuf_cur.u8ptr++;
+ }
+ }
+
+ // If all addresses are aligned the same way with respect to 32-bit boundaries
+ if (Get_align((U32)txbuf_cur.u16ptr, sizeof(U32)) == Get_align((U32)ep_fifo.u16ptr, sizeof(U32)))
+ {
+ // If pointer to transmission buffer is not 32-bit aligned
+ if (!Test_align((U32)txbuf_cur.u16ptr, sizeof(U32)))
+ {
+ // Copy 16-bit data to reach 32-bit alignment
+ if (txbuf_cur.u16ptr < txbuf_end.u16ptr)
+ {
+ // 16-bit accesses to FIFO data registers do require pointer post-increment
+ *ep_fifo.u16ptr++ = *txbuf_cur.u16ptr++;
+ }
+ }
+
+ // If pointer to transmission buffer is not 64-bit aligned
+ if (!Test_align((U32)txbuf_cur.u32ptr, sizeof(U64)))
+ {
+ // Copy 32-bit data to reach 64-bit alignment
+ if (txbuf_cur.u32ptr < txbuf_end.u32ptr)
+ {
+ // 32-bit accesses to FIFO data registers do not require pointer post-increment
+ *ep_fifo.u32ptr = *txbuf_cur.u32ptr++;
+ }
+ }
+
+ // Copy 64-bit-aligned data
+ while (txbuf_cur.u64ptr < txbuf_end.u64ptr)
+ {
+ // 64-bit accesses to FIFO data registers do not require pointer post-increment
+ *ep_fifo.u64ptr = *txbuf_cur.u64ptr++;
+ }
+
+ // Copy 32-bit-aligned data
+ if (txbuf_cur.u32ptr < txbuf_end.u32ptr)
+ {
+ // 32-bit accesses to FIFO data registers do not require pointer post-increment
+ *ep_fifo.u32ptr = *txbuf_cur.u32ptr++;
+ }
+ }
+
+ // Copy remaining 16-bit data if some
+ while (txbuf_cur.u16ptr < txbuf_end.u16ptr)
+ {
+ // 16-bit accesses to FIFO data registers do require pointer post-increment
+ *ep_fifo.u16ptr++ = *txbuf_cur.u16ptr++;
+ }
+ }
+
+#endif // !__OPTIMIZE_SIZE__
+
+ // Copy remaining 8-bit data if some
+ while (txbuf_cur.u8ptr < txbuf_end.u8ptr)
+ {
+ // 8-bit accesses to FIFO data registers do require pointer post-increment
+ *ep_fifo.u8ptr++ = *txbuf_cur.u8ptr++;
+ }
+
+ // Save current position in FIFO data register
+ pep_fifo[ep].u8ptr = ep_fifo.u8ptr;
+
+ // Return the updated buffer address and the number of non-copied bytes
+ if (ptxbuf) *ptxbuf = txbuf_cur.u8ptr;
+ return data_length - (txbuf_cur.u8ptr - (U8 *)txbuf);
+}
+
+//! usb_read_ep_rxpacket
+//!
+//! This function reads the selected endpoint FIFO to the buffer pointed to by
+//! rxbuf, using as few accesses as possible.
+//!
+//! @param ep Number of the addressed endpoint
+//! @param rxbuf Address of buffer to write
+//! @param data_length Number of bytes to read
+//! @param prxbuf NULL or pointer to the buffer address to update
+//!
+//! @return Number of non-read bytes
+//!
+//! @note The selected endpoint FIFO may be read in several steps by calling
+//! usb_read_ep_rxpacket several times.
+//!
+//! @warning Invoke Usb_reset_endpoint_fifo_access before this function when at
+//! FIFO beginning whether or not the FIFO is to be read in several steps.
+//!
+//! @warning Do not mix calls to this function with calls to indexed macros.
+//!
+U32 usb_read_ep_rxpacket(U8 ep, void *rxbuf, U32 data_length, void **prxbuf)
+{
+ // Use aggregated pointers to have several alignments available for a same address
+ UnionCVPtr ep_fifo;
+ UnionPtr rxbuf_cur;
+#if (!defined __OPTIMIZE_SIZE__) || !__OPTIMIZE_SIZE__ // Auto-generated when GCC's -Os command option is used
+ StructCPtr rxbuf_end;
+#else
+ StructCPtr rxbuf_end;
+#endif // !__OPTIMIZE_SIZE__
+
+ // Initialize pointers for copy loops and limit the number of bytes to copy
+ ep_fifo.u8ptr = pep_fifo[ep].u8ptr;
+ rxbuf_cur.u8ptr = rxbuf;
+ rxbuf_end.u8ptr = rxbuf_cur.u8ptr + min(data_length, Usb_byte_count(ep));
+#if (!defined __OPTIMIZE_SIZE__) || !__OPTIMIZE_SIZE__ // Auto-generated when GCC's -Os command option is used
+ rxbuf_end.u16ptr = (U16 *)Align_down((U32)rxbuf_end.u8ptr, sizeof(U16));
+ rxbuf_end.u32ptr = (U32 *)Align_down((U32)rxbuf_end.u16ptr, sizeof(U32));
+ rxbuf_end.u64ptr = (U64 *)Align_down((U32)rxbuf_end.u32ptr, sizeof(U64));
+
+ // If all addresses are aligned the same way with respect to 16-bit boundaries
+ if (Get_align((U32)rxbuf_cur.u8ptr, sizeof(U16)) == Get_align((U32)ep_fifo.u8ptr, sizeof(U16)))
+ {
+ // If pointer to reception buffer is not 16-bit aligned
+ if (!Test_align((U32)rxbuf_cur.u8ptr, sizeof(U16)))
+ {
+ // Copy 8-bit data to reach 16-bit alignment
+ if (rxbuf_cur.u8ptr < rxbuf_end.u8ptr)
+ {
+ // 8-bit accesses to FIFO data registers do require pointer post-increment
+ *rxbuf_cur.u8ptr++ = *ep_fifo.u8ptr++;
+ }
+ }
+
+ // If all addresses are aligned the same way with respect to 32-bit boundaries
+ if (Get_align((U32)rxbuf_cur.u16ptr, sizeof(U32)) == Get_align((U32)ep_fifo.u16ptr, sizeof(U32)))
+ {
+ // If pointer to reception buffer is not 32-bit aligned
+ if (!Test_align((U32)rxbuf_cur.u16ptr, sizeof(U32)))
+ {
+ // Copy 16-bit data to reach 32-bit alignment
+ if (rxbuf_cur.u16ptr < rxbuf_end.u16ptr)
+ {
+ // 16-bit accesses to FIFO data registers do require pointer post-increment
+ *rxbuf_cur.u16ptr++ = *ep_fifo.u16ptr++;
+ }
+ }
+
+ // If pointer to reception buffer is not 64-bit aligned
+ if (!Test_align((U32)rxbuf_cur.u32ptr, sizeof(U64)))
+ {
+ // Copy 32-bit data to reach 64-bit alignment
+ if (rxbuf_cur.u32ptr < rxbuf_end.u32ptr)
+ {
+ // 32-bit accesses to FIFO data registers do not require pointer post-increment
+ *rxbuf_cur.u32ptr++ = *ep_fifo.u32ptr;
+ }
+ }
+
+ // Copy 64-bit-aligned data
+ while (rxbuf_cur.u64ptr < rxbuf_end.u64ptr)
+ {
+ // 64-bit accesses to FIFO data registers do not require pointer post-increment
+ *rxbuf_cur.u64ptr++ = *ep_fifo.u64ptr;
+ }
+
+ // Copy 32-bit-aligned data
+ if (rxbuf_cur.u32ptr < rxbuf_end.u32ptr)
+ {
+ // 32-bit accesses to FIFO data registers do not require pointer post-increment
+ *rxbuf_cur.u32ptr++ = *ep_fifo.u32ptr;
+ }
+ }
+
+ // Copy remaining 16-bit data if some
+ while (rxbuf_cur.u16ptr < rxbuf_end.u16ptr)
+ {
+ // 16-bit accesses to FIFO data registers do require pointer post-increment
+ *rxbuf_cur.u16ptr++ = *ep_fifo.u16ptr++;
+ }
+ }
+
+#endif // !__OPTIMIZE_SIZE__
+
+ // Copy remaining 8-bit data if some
+ while (rxbuf_cur.u8ptr < rxbuf_end.u8ptr)
+ {
+ // 8-bit accesses to FIFO data registers do require pointer post-increment
+ *rxbuf_cur.u8ptr++ = *ep_fifo.u8ptr++;
+ }
+
+ // Save current position in FIFO data register
+ pep_fifo[ep].u8ptr = (volatile U8 *)ep_fifo.u8ptr;
+
+ // Return the updated buffer address and the number of non-copied bytes
+ if (prxbuf) *prxbuf = rxbuf_cur.u8ptr;
+ return data_length - (rxbuf_cur.u8ptr - (U8 *)rxbuf);
+}
+
+#endif // USB_DEVICE_FEATURE == ENABLED
+
+//! ---------------------------------------------------------
+//! ------------------ HOST ---------------------------------
+//! ---------------------------------------------------------
+
+#if USB_HOST_FEATURE == ENABLED
+
+void Host_configure_address( uint8_t pipe, uint8_t addr)
+{
+ if( pipe == 0 ) {
+ UOTGHS->UOTGHS_HSTADDR1 &= ~UOTGHS_HSTADDR1_HSTADDRP0_Msk;
+ UOTGHS->UOTGHS_HSTADDR1 |= UOTGHS_HSTADDR1_HSTADDRP0(addr);
+ }
+ else if( pipe == 1 ) {
+ UOTGHS->UOTGHS_HSTADDR1 &= ~UOTGHS_HSTADDR1_HSTADDRP1_Msk;
+ UOTGHS->UOTGHS_HSTADDR1 |= UOTGHS_HSTADDR1_HSTADDRP1(addr);
+ }
+ else if( pipe == 2 ) {
+ UOTGHS->UOTGHS_HSTADDR1 &= ~UOTGHS_HSTADDR1_HSTADDRP2_Msk;
+ UOTGHS->UOTGHS_HSTADDR1 |= UOTGHS_HSTADDR1_HSTADDRP2(addr);
+ }
+ else if( pipe == 3 ) {
+ UOTGHS->UOTGHS_HSTADDR1 &= ~UOTGHS_HSTADDR1_HSTADDRP3_Msk;
+ UOTGHS->UOTGHS_HSTADDR1 |= UOTGHS_HSTADDR1_HSTADDRP3(addr);
+ }
+ else if( pipe == 4 ) {
+ UOTGHS->UOTGHS_HSTADDR2 &= ~(0x7F<<0);
+ UOTGHS->UOTGHS_HSTADDR2 |= addr;
+ }
+ else if( pipe == 5 ) {
+ UOTGHS->UOTGHS_HSTADDR2 &= ~(0x7F<<8);
+ UOTGHS->UOTGHS_HSTADDR2 |= (addr<<8);
+ }
+ else if( pipe == 6 ) {
+ UOTGHS->UOTGHS_HSTADDR2 &= ~(0x7F<<16);
+ UOTGHS->UOTGHS_HSTADDR2 |= (addr<<16);
+ }
+ else if( pipe == 7 ) {
+ UOTGHS->UOTGHS_HSTADDR2 &= ~(0x7F<<24);
+ UOTGHS->UOTGHS_HSTADDR2 |= (addr<<24);
+ }
+ else if( pipe == 8 ) {
+ UOTGHS->UOTGHS_HSTADDR3 &= ~UOTGHS_HSTADDR3_HSTADDRP8_Msk;
+ UOTGHS->UOTGHS_HSTADDR3 |= UOTGHS_HSTADDR3_HSTADDRP8(addr);
+ }
+ else if( pipe == 9 ) {
+ UOTGHS->UOTGHS_HSTADDR3 &= ~(0x7F<<8);
+ UOTGHS->UOTGHS_HSTADDR3 |= (addr<<8);
+ }
+ else {
+ printf("pipe not defined\n\r");
+ }
+}
+
+
+
+//! host_disable_all_pipes
+//!
+//! This function disables all pipes for the host controller.
+//! Useful to execute upon disconnection.
+//!
+//! @return Void
+//!
+void host_disable_all_pipes(void)
+{
+#if USB_HOST_PIPE_INTERRUPT_TRANSFER == ENABLE
+ Bool sav_glob_int_en;
+#endif
+ U8 p;
+
+#if USB_HOST_PIPE_INTERRUPT_TRANSFER == ENABLE
+ // Disable global interrupts
+ if ((sav_glob_int_en = Is_global_interrupt_enabled())) Disable_global_interrupt();
+#endif
+ for (p = 0; p < MAX_PEP_NB; p++)
+ { // Disable the pipe <p> (disable interrupt, free memory, reset pipe, ...)
+ Host_disable_pipe_interrupt(p);
+ Host_reset_pipe(p);
+ Host_unallocate_memory(p);
+ Host_disable_pipe(p);
+ }
+#if USB_HOST_PIPE_INTERRUPT_TRANSFER == ENABLE
+ (void)Is_host_pipe_enabled(MAX_PEP_NB - 1);
+ // Restore the global interrupts to the initial state
+ if (sav_glob_int_en) Enable_global_interrupt();
+#endif
+}
+
+//! host_set_p_txpacket
+//!
+//! This function fills the selected pipe FIFO with a constant byte, using
+//! as few accesses as possible.
+//!
+//! @param p Number of the addressed pipe
+//! @param txbyte Byte to fill the pipe with
+//! @param data_length Number of bytes to write
+//!
+//! @return Number of non-written bytes
+//!
+//! @note The selected pipe FIFO may be filled in several steps by calling
+//! host_set_p_txpacket several times.
+//!
+//! @warning Invoke Host_reset_pipe_fifo_access before this function when at
+//! FIFO beginning whether or not the FIFO is to be filled in several steps.
+//!
+//! @warning Do not mix calls to this function with calls to indexed macros.
+//!
+U32 host_set_p_txpacket(U8 p, U8 txbyte, U32 data_length)
+{
+ // Use aggregated pointers to have several alignments available for a same address
+ UnionVPtr p_fifo_cur;
+#if (!defined __OPTIMIZE_SIZE__) || !__OPTIMIZE_SIZE__ // Auto-generated when GCC's -Os command option is used
+ StructCVPtr p_fifo_end;
+ Union64 txval;
+#else
+ UnionCVPtr p_fifo_end;
+ union
+ {
+ U8 u8[1];
+ } txval;
+#endif // !__OPTIMIZE_SIZE__
+
+ // Initialize pointers for write loops and limit the number of bytes to write
+ p_fifo_cur.u8ptr = pep_fifo[p].u8ptr;
+ p_fifo_end.u8ptr = p_fifo_cur.u8ptr +
+ min(data_length, Host_get_pipe_size(p) - Host_byte_count(p));
+#if (!defined __OPTIMIZE_SIZE__) || !__OPTIMIZE_SIZE__ // Auto-generated when GCC's -Os command option is used
+ p_fifo_end.u16ptr = (U16 *)Align_down((U32)p_fifo_end.u8ptr, sizeof(U16));
+ p_fifo_end.u32ptr = (U32 *)Align_down((U32)p_fifo_end.u16ptr, sizeof(U32));
+ p_fifo_end.u64ptr = (U64 *)Align_down((U32)p_fifo_end.u32ptr, sizeof(U64));
+#endif // !__OPTIMIZE_SIZE__
+ txval.u8[0] = txbyte;
+#if (!defined __OPTIMIZE_SIZE__) || !__OPTIMIZE_SIZE__ // Auto-generated when GCC's -Os command option is used
+ txval.u8[1] = txval.u8[0];
+ txval.u16[1] = txval.u16[0];
+ txval.u32[1] = txval.u32[0];
+
+ // If pointer to FIFO data register is not 16-bit aligned
+ if (!Test_align((U32)p_fifo_cur.u8ptr, sizeof(U16)))
+ {
+ // Write 8-bit data to reach 16-bit alignment
+ if (p_fifo_cur.u8ptr < p_fifo_end.u8ptr)
+ {
+ *p_fifo_cur.u8ptr++ = txval.u8[0];
+ }
+ }
+
+ // If pointer to FIFO data register is not 32-bit aligned
+ if (!Test_align((U32)p_fifo_cur.u16ptr, sizeof(U32)))
+ {
+ // Write 16-bit data to reach 32-bit alignment
+ if (p_fifo_cur.u16ptr < p_fifo_end.u16ptr)
+ {
+ *p_fifo_cur.u16ptr++ = txval.u16[0];
+ }
+ }
+
+ // If pointer to FIFO data register is not 64-bit aligned
+ if (!Test_align((U32)p_fifo_cur.u32ptr, sizeof(U64)))
+ {
+ // Write 32-bit data to reach 64-bit alignment
+ if (p_fifo_cur.u32ptr < p_fifo_end.u32ptr)
+ {
+ *p_fifo_cur.u32ptr++ = txval.u32[0];
+ }
+ }
+
+ // Write 64-bit-aligned data
+ while (p_fifo_cur.u64ptr < p_fifo_end.u64ptr)
+ {
+ *p_fifo_cur.u64ptr++ = txval.u64;
+ }
+
+ // Write remaining 32-bit data if some
+ if (p_fifo_cur.u32ptr < p_fifo_end.u32ptr)
+ {
+ *p_fifo_cur.u32ptr++ = txval.u32[0];
+ }
+
+ // Write remaining 16-bit data if some
+ if (p_fifo_cur.u16ptr < p_fifo_end.u16ptr)
+ {
+ *p_fifo_cur.u16ptr++ = txval.u16[0];
+ }
+
+ // Write remaining 8-bit data if some
+ if (p_fifo_cur.u8ptr < p_fifo_end.u8ptr)
+ {
+ *p_fifo_cur.u8ptr++ = txval.u8[0];
+ }
+
+#else
+
+ // Write remaining 8-bit data if some
+ while (p_fifo_cur.u8ptr < p_fifo_end.u8ptr)
+ {
+ *p_fifo_cur.u8ptr++ = txval.u8[0];
+ }
+
+#endif // !__OPTIMIZE_SIZE__
+
+ // Compute the number of non-written bytes
+ data_length -= p_fifo_cur.u8ptr - pep_fifo[p].u8ptr;
+
+ // Save current position in FIFO data register
+ pep_fifo[p].u8ptr = p_fifo_cur.u8ptr;
+
+ // Return the number of non-written bytes
+ return data_length;
+}
+
+//! host_write_p_txpacket
+//!
+//! This function writes the buffer pointed to by txbuf to the selected
+//! pipe FIFO, using as few accesses as possible.
+//!
+//! @param p Number of the addressed pipe
+//! @param txbuf Address of buffer to read
+//! @param data_length Number of bytes to write
+//! @param ptxbuf NULL or pointer to the buffer address to update
+//!
+//! @return Number of non-written bytes
+//!
+//! @note The selected pipe FIFO may be written in several steps by calling
+//! host_write_p_txpacket several times.
+//!
+//! @warning Invoke Host_reset_pipe_fifo_access before this function when at
+//! FIFO beginning whether or not the FIFO is to be written in several steps.
+//!
+//! @warning Do not mix calls to this function with calls to indexed macros.
+//!
+U32 host_write_p_txpacket(U8 p, const void *txbuf, U32 data_length, const void **ptxbuf)
+{
+ // Use aggregated pointers to have several alignments available for a same address
+ UnionVPtr p_fifo;
+ UnionCPtr txbuf_cur;
+#if (!defined __OPTIMIZE_SIZE__) || !__OPTIMIZE_SIZE__ // Auto-generated when GCC's -Os command option is used
+ StructCPtr txbuf_end;
+#else
+ UnionCPtr txbuf_end;
+#endif // !__OPTIMIZE_SIZE__
+
+ // Initialize pointers for copy loops and limit the number of bytes to copy
+ p_fifo.u8ptr = pep_fifo[p].u8ptr;
+ txbuf_cur.u8ptr = txbuf;
+ txbuf_end.u8ptr = txbuf_cur.u8ptr +
+ min(data_length, Host_get_pipe_size(p) - Host_byte_count(p));
+#if (!defined __OPTIMIZE_SIZE__) || !__OPTIMIZE_SIZE__ // Auto-generated when GCC's -Os command option is used
+ txbuf_end.u16ptr = (U16 *)Align_down((U32)txbuf_end.u8ptr, sizeof(U16));
+ txbuf_end.u32ptr = (U32 *)Align_down((U32)txbuf_end.u16ptr, sizeof(U32));
+ txbuf_end.u64ptr = (U64 *)Align_down((U32)txbuf_end.u32ptr, sizeof(U64));
+
+ // If all addresses are aligned the same way with respect to 16-bit boundaries
+ if (Get_align((U32)txbuf_cur.u8ptr, sizeof(U16)) == Get_align((U32)p_fifo.u8ptr, sizeof(U16)))
+ {
+ // If pointer to transmission buffer is not 16-bit aligned
+ if (!Test_align((U32)txbuf_cur.u8ptr, sizeof(U16)))
+ {
+ // Copy 8-bit data to reach 16-bit alignment
+ if (txbuf_cur.u8ptr < txbuf_end.u8ptr)
+ {
+ // 8-bit accesses to FIFO data registers do require pointer post-increment
+ *p_fifo.u8ptr++ = *txbuf_cur.u8ptr++;
+ }
+ }
+
+ // If all addresses are aligned the same way with respect to 32-bit boundaries
+ if (Get_align((U32)txbuf_cur.u16ptr, sizeof(U32)) == Get_align((U32)p_fifo.u16ptr, sizeof(U32)))
+ {
+ // If pointer to transmission buffer is not 32-bit aligned
+ if (!Test_align((U32)txbuf_cur.u16ptr, sizeof(U32)))
+ {
+ // Copy 16-bit data to reach 32-bit alignment
+ if (txbuf_cur.u16ptr < txbuf_end.u16ptr)
+ {
+ // 16-bit accesses to FIFO data registers do require pointer post-increment
+ *p_fifo.u16ptr++ = *txbuf_cur.u16ptr++;
+ }
+ }
+
+ // If pointer to transmission buffer is not 64-bit aligned
+ if (!Test_align((U32)txbuf_cur.u32ptr, sizeof(U64)))
+ {
+ // Copy 32-bit data to reach 64-bit alignment
+ if (txbuf_cur.u32ptr < txbuf_end.u32ptr)
+ {
+ // 32-bit accesses to FIFO data registers do not require pointer post-increment
+ *p_fifo.u32ptr = *txbuf_cur.u32ptr++;
+ }
+ }
+
+ // Copy 64-bit-aligned data
+ while (txbuf_cur.u64ptr < txbuf_end.u64ptr)
+ {
+ // 64-bit accesses to FIFO data registers do not require pointer post-increment
+ *p_fifo.u64ptr = *txbuf_cur.u64ptr++;
+ }
+
+ // Copy 32-bit-aligned data
+ if (txbuf_cur.u32ptr < txbuf_end.u32ptr)
+ {
+ // 32-bit accesses to FIFO data registers do not require pointer post-increment
+ *p_fifo.u32ptr = *txbuf_cur.u32ptr++;
+ }
+ }
+
+ // Copy remaining 16-bit data if some
+ while (txbuf_cur.u16ptr < txbuf_end.u16ptr)
+ {
+ // 16-bit accesses to FIFO data registers do require pointer post-increment
+ *p_fifo.u16ptr++ = *txbuf_cur.u16ptr++;
+ }
+ }
+
+#endif // !__OPTIMIZE_SIZE__
+
+ // Copy remaining 8-bit data if some
+ while (txbuf_cur.u8ptr < txbuf_end.u8ptr)
+ {
+ // 8-bit accesses to FIFO data registers do require pointer post-increment
+ *p_fifo.u8ptr++ = *txbuf_cur.u8ptr++;
+ }
+
+ // Save current position in FIFO data register
+ pep_fifo[p].u8ptr = p_fifo.u8ptr;
+
+ // Return the updated buffer address and the number of non-copied bytes
+ if (ptxbuf) *ptxbuf = txbuf_cur.u8ptr;
+ return data_length - (txbuf_cur.u8ptr - (U8 *)txbuf);
+}
+
+//! host_read_p_rxpacket
+//!
+//! This function reads the selected pipe FIFO to the buffer pointed to by
+//! rxbuf, using as few accesses as possible.
+//!
+//! @param p Number of the addressed pipe
+//! @param rxbuf Address of buffer to write
+//! @param data_length Number of bytes to read
+//! @param prxbuf NULL or pointer to the buffer address to update
+//!
+//! @return Number of non-read bytes
+//!
+//! @note The selected pipe FIFO may be read in several steps by calling
+//! host_read_p_rxpacket several times.
+//!
+//! @warning Invoke Host_reset_pipe_fifo_access before this function when at
+//! FIFO beginning whether or not the FIFO is to be read in several steps.
+//!
+//! @warning Do not mix calls to this function with calls to indexed macros.
+//!
+U32 host_read_p_rxpacket(U8 p, void *rxbuf, U32 data_length, void **prxbuf)
+{
+ // Use aggregated pointers to have several alignments available for a same address
+ UnionCVPtr p_fifo;
+ UnionPtr rxbuf_cur;
+#if (!defined __OPTIMIZE_SIZE__) || !__OPTIMIZE_SIZE__ // Auto-generated when GCC's -Os command option is used
+ StructCPtr rxbuf_end;
+#else
+ UnionCPtr rxbuf_end;
+#endif // !__OPTIMIZE_SIZE__
+
+ // Initialize pointers for copy loops and limit the number of bytes to copy
+ p_fifo.u8ptr = pep_fifo[p].u8ptr;
+ rxbuf_cur.u8ptr = rxbuf;
+ rxbuf_end.u8ptr = rxbuf_cur.u8ptr + min(data_length, Host_byte_count(p));
+#if (!defined __OPTIMIZE_SIZE__) || !__OPTIMIZE_SIZE__ // Auto-generated when GCC's -Os command option is used
+ rxbuf_end.u16ptr = (U16 *)Align_down((U32)rxbuf_end.u8ptr, sizeof(U16));
+ rxbuf_end.u32ptr = (U32 *)Align_down((U32)rxbuf_end.u16ptr, sizeof(U32));
+ rxbuf_end.u64ptr = (U64 *)Align_down((U32)rxbuf_end.u32ptr, sizeof(U64));
+
+ // If all addresses are aligned the same way with respect to 16-bit boundaries
+ if (Get_align((U32)rxbuf_cur.u8ptr, sizeof(U16)) == Get_align((U32)p_fifo.u8ptr, sizeof(U16)))
+ {
+ // If pointer to reception buffer is not 16-bit aligned
+ if (!Test_align((U32)rxbuf_cur.u8ptr, sizeof(U16)))
+ {
+ // Copy 8-bit data to reach 16-bit alignment
+ if (rxbuf_cur.u8ptr < rxbuf_end.u8ptr)
+ {
+ // 8-bit accesses to FIFO data registers do require pointer post-increment
+ *rxbuf_cur.u8ptr++ = *p_fifo.u8ptr++;
+ }
+ }
+
+ // If all addresses are aligned the same way with respect to 32-bit boundaries
+ if (Get_align((U32)rxbuf_cur.u16ptr, sizeof(U32)) == Get_align((U32)p_fifo.u16ptr, sizeof(U32)))
+ {
+ // If pointer to reception buffer is not 32-bit aligned
+ if (!Test_align((U32)rxbuf_cur.u16ptr, sizeof(U32)))
+ {
+ // Copy 16-bit data to reach 32-bit alignment
+ if (rxbuf_cur.u16ptr < rxbuf_end.u16ptr)
+ {
+ // 16-bit accesses to FIFO data registers do require pointer post-increment
+ *rxbuf_cur.u16ptr++ = *p_fifo.u16ptr++;
+ }
+ }
+
+ // If pointer to reception buffer is not 64-bit aligned
+ if (!Test_align((U32)rxbuf_cur.u32ptr, sizeof(U64)))
+ {
+ // Copy 32-bit data to reach 64-bit alignment
+ if (rxbuf_cur.u32ptr < rxbuf_end.u32ptr)
+ {
+ // 32-bit accesses to FIFO data registers do not require pointer post-increment
+ *rxbuf_cur.u32ptr++ = *p_fifo.u32ptr;
+ }
+ }
+
+ // Copy 64-bit-aligned data
+ while (rxbuf_cur.u64ptr < rxbuf_end.u64ptr)
+ {
+ // 64-bit accesses to FIFO data registers do not require pointer post-increment
+ *rxbuf_cur.u64ptr++ = *p_fifo.u64ptr;
+ }
+
+ // Copy 32-bit-aligned data
+ if (rxbuf_cur.u32ptr < rxbuf_end.u32ptr)
+ {
+ // 32-bit accesses to FIFO data registers do not require pointer post-increment
+ *rxbuf_cur.u32ptr++ = *p_fifo.u32ptr;
+ }
+ }
+
+ // Copy remaining 16-bit data if some
+ while (rxbuf_cur.u16ptr < rxbuf_end.u16ptr)
+ {
+ // 16-bit accesses to FIFO data registers do require pointer post-increment
+ *rxbuf_cur.u16ptr++ = *p_fifo.u16ptr++;
+ }
+ }
+
+#endif // !__OPTIMIZE_SIZE__
+
+ // Copy remaining 8-bit data if some
+ while (rxbuf_cur.u8ptr < rxbuf_end.u8ptr)
+ {
+ // 8-bit accesses to FIFO data registers do require pointer post-increment
+ *rxbuf_cur.u8ptr++ = *p_fifo.u8ptr++;
+ }
+
+ // Save current position in FIFO data register
+ pep_fifo[p].u8ptr = (volatile U8 *)p_fifo.u8ptr;
+
+ // Return the updated buffer address and the number of non-copied bytes
+ if (prxbuf) *prxbuf = rxbuf_cur.u8ptr;
+ return data_length - (rxbuf_cur.u8ptr - (U8 *)rxbuf);
+}
+
+#endif // USB_HOST_FEATURE == ENABLED
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/usb_drv.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/usb_drv.h
new file mode 100644
index 0000000..bf29032
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/usb_drv.h
@@ -0,0 +1,1682 @@
+/* This header file is part of the AVR Software Framework 2.0.0 release */
+
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief Low-level driver for AVR32 USBB.
+ *
+ * This file contains the USBB low-level driver definitions.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USBB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _USB_DRV_H_
+#define _USB_DRV_H_
+
+
+//_____ I N C L U D E S ____________________________________________________
+
+#include "compiler.h"
+//#include "preprocessor.h"
+//#include "usbb.h"
+#include "conf_usb.h"
+#include "chip.h"
+
+//! @defgroup USBB_low_level_driver USBB low-level driver module
+//! USBB low-level driver module
+//! @warning Bit-masks are used instead of bit-fields because PB registers
+//! require 32-bit write accesses while AVR32-GCC 4.0.2 builds 8-bit
+//! accesses even when volatile unsigned int bit-fields are specified.
+//! @{
+
+//_____ M A C R O S ________________________________________________________
+//#ifndef UOTGHS_RAM_ADDR
+//#define UOTGHS_RAM_ADDR (0x20180000u) /**< USB On-The-Go Interface RAM base address */
+//#endif
+
+//! Maximal number of USBB pipes/endpoints.
+//! This is the same value as the one produced by Usb_get_pipe_endpoint_max_nbr().
+//! As it is constant and known for a given target, there is no need to decrease
+//! performance and to complexify program structure by using a value in memory.
+//! The use of MAX_PEP_NB is hence preferred here to the use of a variable
+//! initialized from Usb_get_pipe_endpoint_max_nbr().
+#define MAX_PEP_NB CHIP_USB_NUMENDPOINTS
+
+//! @defgroup USBB_endpoints USBB endpoints
+//! Identifiers of USBB endpoints (USBB device operating mode).
+//! @{
+#define EP_CONTROL 0
+#define EP_0 0
+#define EP_1 1
+#define EP_2 2
+#define EP_3 3
+#define EP_4 4
+#define EP_5 5
+#define EP_6 6
+//! @}
+
+//! @defgroup USBB_pipes USBB pipes
+//! Identifiers of USBB pipes (USBB host operating mode).
+//! @{
+#define P_CONTROL 0
+#define P_0 0
+#define P_1 1
+#define P_2 2
+#define P_3 3
+#define P_4 4
+#define P_5 5
+#define P_6 6
+//! @}
+
+//! @defgroup USBB_types USBB standard types
+//! List of the standard types used in USBB.
+//! @{
+#define IP_NAME_PART_1 1
+#define IP_NAME_PART_2 2
+
+#define DMA_BUFFER_SIZE_16_BITS AVR32_USBB_UFEATURES_DMA_BUFFER_SIZE_16_BITS
+#define DMA_BUFFER_SIZE_24_BITS AVR32_USBB_UFEATURES_DMA_BUFFER_SIZE_24_BITS
+
+#define AWAITVRISE_TIMER AVR32_USBB_USBCON_TIMPAGE_A_WAIT_VRISE
+ #define AWAITVRISE_TMOUT_20_MS AVR32_USBB_USBCON_TIMVALUE_A_WAIT_VRISE_20_MS
+ #define AWAITVRISE_TMOUT_50_MS AVR32_USBB_USBCON_TIMVALUE_A_WAIT_VRISE_50_MS
+ #define AWAITVRISE_TMOUT_70_MS AVR32_USBB_USBCON_TIMVALUE_A_WAIT_VRISE_70_MS
+ #define AWAITVRISE_TMOUT_100_MS AVR32_USBB_USBCON_TIMVALUE_A_WAIT_VRISE_100_MS
+#define VBBUSPULSING_TIMER AVR32_USBB_USBCON_TIMPAGE_VB_BUS_PULSING
+ #define VBBUSPULSING_TMOUT_15_MS AVR32_USBB_USBCON_TIMVALUE_VB_BUS_PULSING_15_MS
+ #define VBBUSPULSING_TMOUT_23_MS AVR32_USBB_USBCON_TIMVALUE_VB_BUS_PULSING_23_MS
+ #define VBBUSPULSING_TMOUT_31_MS AVR32_USBB_USBCON_TIMVALUE_VB_BUS_PULSING_31_MS
+ #define VBBUSPULSING_TMOUT_40_MS AVR32_USBB_USBCON_TIMVALUE_VB_BUS_PULSING_40_MS
+#define PDTMOUTCNT_TIMER AVR32_USBB_USBCON_TIMPAGE_PD_TMOUT_CNT
+ #define PDTMOUTCNT_TMOUT_93_MS AVR32_USBB_USBCON_TIMVALUE_PD_TMOUT_CNT_93_MS
+ #define PDTMOUTCNT_TMOUT_105_MS AVR32_USBB_USBCON_TIMVALUE_PD_TMOUT_CNT_105_MS
+ #define PDTMOUTCNT_TMOUT_118_MS AVR32_USBB_USBCON_TIMVALUE_PD_TMOUT_CNT_118_MS
+ #define PDTMOUTCNT_TMOUT_131_MS AVR32_USBB_USBCON_TIMVALUE_PD_TMOUT_CNT_131_MS
+#define SRPDETTMOUT_TIMER AVR32_USBB_USBCON_TIMPAGE_SRP_DET_TMOUT
+ #define SRPDETTMOUT_TMOUT_10_US AVR32_USBB_USBCON_TIMVALUE_SRP_DET_TMOUT_10_US
+ #define SRPDETTMOUT_TMOUT_100_US AVR32_USBB_USBCON_TIMVALUE_SRP_DET_TMOUT_100_US
+ #define SRPDETTMOUT_TMOUT_1_MS AVR32_USBB_USBCON_TIMVALUE_SRP_DET_TMOUT_1_MS
+ #define SRPDETTMOUT_TMOUT_11_MS AVR32_USBB_USBCON_TIMVALUE_SRP_DET_TMOUT_11_MS
+
+#define TYPE_CONTROL (UOTGHS_DEVEPTCFG_EPTYPE_CTRL >> UOTGHS_HSTPIPCFG_PTYPE_Pos)
+#define TYPE_ISOCHRONOUS (UOTGHS_DEVEPTCFG_EPTYPE_ISO >> UOTGHS_HSTPIPCFG_PTYPE_Pos)
+#define TYPE_BULK (UOTGHS_DEVEPTCFG_EPTYPE_BLK >> UOTGHS_HSTPIPCFG_PTYPE_Pos)
+#define TYPE_INTERRUPT (UOTGHS_DEVEPTCFG_EPTYPE_INTRPT >> UOTGHS_HSTPIPCFG_PTYPE_Pos)
+
+#define TRANSFER_TYPE_MASK 0x03
+#define SYNCHRONIZATION_TYPE_MASK 0x0c
+#define USAGE_TYPE_MASK 0x30
+
+#define DIRECTION_OUT 0 // OUT
+#define DIRECTION_IN UOTGHS_DEVEPTCFG_EPDIR // IN
+
+#define TOKEN_SETUP (UOTGHS_HSTPIPCFG_PTOKEN_SETUP >> UOTGHS_HSTPIPCFG_PTOKEN_Pos)
+#define TOKEN_IN (UOTGHS_HSTPIPCFG_PTOKEN_IN >> UOTGHS_HSTPIPCFG_PTOKEN_Pos)
+#define TOKEN_OUT (UOTGHS_HSTPIPCFG_PTOKEN_OUT >> UOTGHS_HSTPIPCFG_PTOKEN_Pos)
+
+#define SINGLE_BANK (UOTGHS_HSTPIPCFG_PBK_1_BANK >> UOTGHS_HSTPIPCFG_PBK_Pos)
+#define DOUBLE_BANK (UOTGHS_HSTPIPCFG_PBK_2_BANK >> UOTGHS_HSTPIPCFG_PBK_Pos)
+#define TRIPLE_BANK (UOTGHS_HSTPIPCFG_PBK_3_BANK >> UOTGHS_HSTPIPCFG_PBK_Pos)
+
+#define BANK_PID_DATA0 0
+#define BANK_PID_DATA1 1
+//! @}
+
+
+//! Post-increment operations associated with 64-, 32-, 16- and 8-bit accesses to
+//! the FIFO data registers of pipes/endpoints
+//! @note 64- and 32-bit accesses to FIFO data registers do not require pointer
+//! post-increment while 16- and 8-bit ones do.
+//! @note Only for internal use.
+//! @{
+#define Pep_fifo_access_64_post_inc()
+#define Pep_fifo_access_32_post_inc()
+#define Pep_fifo_access_16_post_inc() ++
+#define Pep_fifo_access_8_post_inc() ++
+//! @}
+
+
+//! @defgroup USBB_properties USBB IP properties
+//! These macros give access to IP properties
+//! @{
+ //! Get IP name part 1 or 2
+#define Usb_get_ip_name(part) (AVR32_USBB_unamex(part))
+ //! Get IP version
+#define Usb_get_ip_version() (Rd_bitfield(AVR32_USBB_uvers, AVR32_USBB_UVERS_VERSION_NUM_MASK))
+ //! Get number of metal fixes
+#define Usb_get_metal_fix_nbr() (Rd_bitfield(AVR32_USBB_uvers, AVR32_USBB_UVERS_METAL_FIX_NUM_MASK))
+ //! Get maximal number of pipes/endpoints (number of hardware-implemented pipes/endpoints)
+#define Usb_get_pipe_endpoint_max_nbr() (((Rd_bitfield(AVR32_USBB_ufeatures, AVR32_USBB_UFEATURES_EPT_NBR_MAX_MASK) - 1) & ((1 << AVR32_USBB_UFEATURES_EPT_NBR_MAX_SIZE) - 1)) + 1)
+ //! Get number of hardware-implemented DMA channels
+#define Usb_get_dma_channel_nbr() (Rd_bitfield(AVR32_USBB_ufeatures, AVR32_USBB_UFEATURES_DMA_CHANNEL_NBR_MASK))
+ //! Get DMA buffer size
+#define Usb_get_dma_buffer_size() (Rd_bitfield(AVR32_USBB_ufeatures, AVR32_USBB_UFEATURES_DMA_BUFFER_SIZE_MASK))
+ //! Get DMA FIFO depth in words
+#define Usb_get_dma_fifo_word_depth() (((Rd_bitfield(AVR32_USBB_ufeatures, AVR32_USBB_UFEATURES_DMA_FIFO_WORD_DEPTH_MASK) - 1) & ((1 << AVR32_USBB_UFEATURES_DMA_FIFO_WORD_DEPTH_SIZE) - 1)) + 1)
+ //! Get DPRAM size (FIFO maximal size) in bytes
+#define Usb_get_dpram_size() (128 << Rd_bitfield(AVR32_USBB_ufeatures, AVR32_USBB_UFEATURES_FIFO_MAX_SIZE_MASK))
+ //! Test if DPRAM is natively byte write capable
+#define Is_usb_dpram_byte_write_capable() (Tst_bits(AVR32_USBB_ufeatures, AVR32_USBB_UFEATURES_BYTE_WRITE_DPRAM_MASK))
+ //! Get size of USBB PB address space
+#define Usb_get_ip_paddress_size() (AVR32_USBB_uaddrsize)
+//! @}
+
+
+//! @defgroup USBB_general USBB common management drivers
+//! These macros manage the USBB controller
+//! @{
+ //! Configure time-out of specified OTG timer
+#define Usb_configure_timeout(timer, timeout) (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_UNLOCK),\
+ Wr_bitfield(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_TIMPAGE_Msk, timer, UOTGHS_CTRL_TIMPAGE_Pos),\
+ Wr_bitfield(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_TIMVALUE_Msk, timeout, UOTGHS_CTRL_TIMVALUE_Pos),\
+ Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_UNLOCK))
+ //! Get configured time-out of specified OTG timer
+#define Usb_get_timeout(timer) (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_UNLOCK),\
+ Wr_bitfield(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_TIMPAGE_Msk, timer, UOTGHS_CTRL_TIMPAGE_Pos),\
+ Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_UNLOCK),\
+ Rd_bitfield(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_TIMVALUE_Msk, UOTGHS_CTRL_TIMVALUE_Pos))
+
+#if USB_DEVICE_FEATURE == ENABLED && USB_HOST_FEATURE == ENABLED
+ //! Check that multiplexed pin used for USB_ID is defined
+#define USB_ID AVR32_USBC_ID
+ #ifndef USB_ID
+// #error YOU MUST define in your board header file the multiplexed pin used for USB_ID as AVR32_USBB_USB_ID_x_x
+ #endif
+ //! Pin and function for USB_ID according to configuration from USB_ID
+#define USB_ID_PIN ATPASTE2(USB_ID, _PIN)
+#define USB_ID_FUNCTION ATPASTE2(USB_ID, _FUNCTION)
+ //! Input USB_ID from its pin
+#define Usb_input_id_pin() {const Pin pUOTGHSPinID[] = {PIN_UOTGHS_ID};\
+ PIO_PinConfigure( pUOTGHSPinID, PIO_LISTSIZE(pUOTGHSPinID));}
+//#define Usb_input_id_pin()
+//{
+// (Tst_bits(USB_ID_FUNCTION, 0x01)) ?
+// (AVR32_GPIO.port[USB_ID_PIN >> 5].pmr0s = 1 << (USB_ID_PIN & 0x1F)) :
+// (AVR32_GPIO.port[USB_ID_PIN >> 5].pmr0c = 1 << (USB_ID_PIN & 0x1F));
+// (Tst_bits(USB_ID_FUNCTION, 0x02)) ?
+// (AVR32_GPIO.port[USB_ID_PIN >> 5].pmr1s = 1 << (USB_ID_PIN & 0x1F)) :
+// (AVR32_GPIO.port[USB_ID_PIN >> 5].pmr1c = 1 << (USB_ID_PIN & 0x1F));
+// AVR32_GPIO.port[USB_ID_PIN >> 5].gperc = 1 << (USB_ID_PIN & 0x1F);
+// AVR32_GPIO.port[USB_ID_PIN >> 5].puers = 1 << (USB_ID_PIN & 0x1F);
+//}
+ //! Test if USB_ID is input from its pin
+//#define Is_usb_id_pin_input() \
+// (!Tst_bits(AVR32_GPIO.port[USB_ID_PIN >> 5].gper, 1 << (USB_ID_PIN & 0x1F)) &&\
+// Tst_bits(AVR32_GPIO.port[USB_ID_PIN >> 5].pmr0, 1 << (USB_ID_PIN & 0x1F)) == Tst_bits(USB_ID_PIN, 0x01) &&\
+// Tst_bits(AVR32_GPIO.port[USB_ID_PIN >> 5].pmr1, 1 << (USB_ID_PIN & 0x1F)) == Tst_bits(USB_ID_PIN, 0x02))
+#endif // USB_DEVICE_FEATURE == ENABLED && USB_HOST_FEATURE == ENABLED
+ //! Enable external USB_ID pin (listened to by USB)
+#define Usb_enable_id_pin() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_UIDE))
+ //! Disable external USB_ID pin (ignored by USB)
+#define Usb_disable_id_pin() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_UIDE))
+ //! Test if external USB_ID pin enabled (listened to by USB)
+#define Is_usb_id_pin_enabled() (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_UIDE))
+ //! Disable external USB_ID pin and force device mode
+#define Usb_force_device_mode() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_UIMOD), Usb_disable_id_pin())
+ //! Test if device mode is forced
+#define Is_usb_device_mode_forced() (!Is_usb_id_pin_enabled() && Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_UIMOD))
+ //! Disable external USB_ID pin and force host mode
+#define Usb_force_host_mode() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_UIMOD), Usb_disable_id_pin())
+ //! Test if host mode is forced
+#define Is_usb_host_mode_forced() (!Is_usb_id_pin_enabled() && !Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_UIMOD))
+
+#if USB_HOST_FEATURE == ENABLED
+ //! Multiplexed pin used for USB_VBOF: AVR32_USBB_USB_VBOF_x_x.
+ //! To be selected according to the AVR32_USBB_USB_VBOF_x_x_PIN and
+ //! AVR32_USBB_USB_VBOF_x_x_FUNCTION definitions from <avr32/uc3cxxxx.h>.
+// #if (defined AVR32_USBB)
+// # define USB_VBOF AVR32_USBB_VBOF_0_0
+// #else
+ #define USB_VBOF AVR32_USBC_VBOF
+// #endif
+
+ //! Check that multiplexed pin used for USB_VBOF is defined
+ #ifndef USB_VBOF
+ #error YOU MUST define in your board header file the multiplexed pin used for USB_VBOF as AVR32_USBB_USB_VBOF_x_x
+ #endif
+ //! Pin and function for USB_VBOF according to configuration from USB_VBOF
+#define USB_VBOF_PIN ATPASTE2(USB_VBOF, _PIN)
+#define USB_VBOF_FUNCTION ATPASTE2(USB_VBOF, _FUNCTION)
+ //! Output USB_VBOF onto its pin
+#define Usb_output_vbof_pin() {const Pin pUOTGHSPinVBOF[] = {PIN_UOTGHS_VBOF};\
+ PIO_PinConfigure( pUOTGHSPinVBOF, PIO_LISTSIZE( pUOTGHSPinVBOF ));}
+
+
+
+
+ //! Test if USB_VBOF is output onto its pin
+//#define Is_usb_vbof_pin_output() \
+// (!Tst_bits(AVR32_GPIO.port[USB_VBOF_PIN >> 5].gper, 1 << (USB_VBOF_PIN & 0x1F)) &&\
+// Tst_bits(AVR32_GPIO.port[USB_VBOF_PIN >> 5].pmr0, 1 << (USB_VBOF_PIN & 0x1F)) == Tst_bits(USB_VBOF_FUNCTION, 0x01) &&\
+// Tst_bits(AVR32_GPIO.port[USB_VBOF_PIN >> 5].pmr1, 1 << (USB_VBOF_PIN & 0x1F)) == Tst_bits(USB_VBOF_FUNCTION, 0x02))
+#endif // USB_HOST_FEATURE == ENABLED
+ //! Set USB_VBOF output pin polarity
+#define Usb_set_vbof_active_high() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_VBUSPO))
+#define Usb_set_vbof_active_low() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_VBUSPO))
+ //! Get USB_VBOF output pin polarity
+#define Is_usb_vbof_active_high() (!Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_VBUSPO))
+#define Is_usb_vbof_active_low() (!Is_usb_vbof_active_high())
+
+ //! Use device full speed mode (default)
+#define Usb_use_full_speed_mode() (Clr_bits(UOTGHS->UOTGHS_DEVCTRL, (1<<16) /*AVR32_USBB_UDCON_LS_MASK*/))
+ //! Test if device full speed mode is used
+#define Is_usb_full_speed_mode_used() (!Is_usb_low_speed_mode_forced())
+#ifdef AVR32_USBB_UDCON_SPDCONF
+ //! Force device full speed mode (i.e. disable high speed)
+//#define Usb_force_full_speed_mode() (Wr_bitfield(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_SPDCONF_Msk, 3))
+#define Usb_force_full_speed_mode() (Clr_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_SPDCONF_Msk)),\
+ (Set_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_SPDCONF_FULL_SPEED))
+//! Enable dual speed mode (full speed and high speed; default)
+#define Usb_use_dual_speed_mode() (Wr_bitfield(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_SPDCONF_Msk, 0, UOTGHS_DEVCTRL_SPDCONF_Pos))
+#else
+#define Usb_force_full_speed_mode() do { } while (0)
+#define Usb_use_dual_speed_mode() do { } while (0)
+#endif
+ //! Force device low-speed mode
+#define Usb_force_low_speed_mode() (Set_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_LS))
+ //! Test if device low-speed mode is forced
+#define Is_usb_low_speed_mode_forced() (Tst_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_LS))
+ //! Test if controller is in full speed mode
+#define Is_usb_full_speed_mode() (Rd_bitfield(UOTGHS->UOTGHS_SR, UOTGHS_SR_SPEED_Msk, UOTGHS_SR_SPEED_Pos) == 0x00)
+ //! Test if controller is in low-speed mode
+//#define Is_usb_low_speed_mode() (Rd_bitfield(UOTGHS->UOTGHS_SR, UOTGHS_SR_SPEED_Msk) == AVR32_USBB_USBSTA_SPEED_LOW)
+#define Is_usb_low_speed_mode() (Rd_bitfield(UOTGHS->UOTGHS_SR, UOTGHS_SR_SPEED_Msk, UOTGHS_SR_SPEED_Pos) == 0x02)
+
+ //! Enable USB macro
+#define Usb_enable() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_USBE))
+ //! Disable USB macro
+#define Usb_disable() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_USBE))
+#define Is_usb_enabled() (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_USBE))
+
+ //! Enable OTG pad
+#define Usb_enable_otg_pad() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_OTGPADE))
+ //! Disable OTG pad
+#define Usb_disable_otg_pad() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_OTGPADE))
+#define Is_usb_otg_pad_enabled() (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_OTGPADE))
+
+ //! Stop (freeze) internal USB clock
+#define Usb_freeze_clock() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_FRZCLK))
+#define Usb_unfreeze_clock() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_FRZCLK))
+#define Is_usb_clock_frozen() (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_FRZCLK))
+
+ //! Get the dual-role device state of the internal USB finite state machine of the USBB controller
+#define Usb_get_fsm_drd_state() (Rd_bitfield(UOTGHS->UOTGHS_FSM, UOTGHS_FSM_DRDSTATE_Msk))
+
+#define Usb_enable_id_interrupt() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_IDTE))
+#define Usb_disable_id_interrupt() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_IDTE))
+#define Is_usb_id_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_IDTE))
+#define Is_usb_id_device() (Tst_bits(UOTGHS->UOTGHS_SR, UOTGHS_SR_IDTI))
+#define Usb_ack_id_transition() (UOTGHS->UOTGHS_SCR = UOTGHS_SCR_IDTIC)
+#define Usb_raise_id_transition() (UOTGHS->UOTGHS_SFR = UOTGHS_SFR_IDTIS)
+#define Is_usb_id_transition() (Tst_bits(UOTGHS->UOTGHS_SR, UOTGHS_SR_IDTI))
+
+#define Usb_enable_vbus_interrupt() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_VBUSTE))
+#define Usb_disable_vbus_interrupt() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_VBUSTE))
+#define Is_usb_vbus_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_VBUSTE))
+#define Is_usb_vbus_high() (Tst_bits(UOTGHS->UOTGHS_SR, UOTGHS_SR_VBUS))
+#define Is_usb_vbus_low() (!Is_usb_vbus_high())
+#define Usb_ack_vbus_transition() (UOTGHS->UOTGHS_SCR = UOTGHS_SCR_VBUSTIC)
+#define Usb_raise_vbus_transition() (UOTGHS->UOTGHS_SFR = UOTGHS_SFR_VBUSTIS)
+#define Is_usb_vbus_transition() (Tst_bits(UOTGHS->UOTGHS_SR, UOTGHS_SR_VBUSTI))
+
+ //! enables hardware control over the USB_VBOF output pin
+#define Usb_enable_vbus_hw_control() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_VBUSHWC))
+ //! disables hardware control over the USB_VBOF output pin
+#define Usb_disable_vbus_hw_control() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_VBUSHWC))
+#define Is_usb_vbus_hw_control_enabled() (!Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_VBUSHWC))
+ //! requests VBus activation
+#define Usb_enable_vbus() (UOTGHS->UOTGHS_SFR = UOTGHS_SFR_VBUSRQS)
+ //! requests VBus deactivation
+#define Usb_disable_vbus() (UOTGHS->UOTGHS_SCR = UOTGHS_SCR_VBUSRQC)
+ //! tests if VBus activation has been requested
+#define Is_usb_vbus_enabled() (Tst_bits(UOTGHS->UOTGHS_SR, UOTGHS_SR_VBUSRQ))
+
+ //! initiates a Host Negociation Protocol
+#define Usb_device_initiate_hnp() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_HNPREQ))
+ //! accepts a Host Negociation Protocol
+#define Usb_host_accept_hnp() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_HNPREQ))
+ //! rejects a Host Negociation Protocol
+#define Usb_host_reject_hnp() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_HNPREQ))
+ //! initiates a Session Request Protocol
+#define Usb_device_initiate_srp() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_SRPREQ))
+ //! selects VBus as SRP method
+#define Usb_select_vbus_srp_method() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_SRPSEL))
+#define Is_usb_vbus_srp_method_selected() (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_SRPSEL))
+ //! selects data line as SRP method
+#define Usb_select_data_srp_method() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_SRPSEL))
+#define Is_usb_data_srp_method_selected() (!Is_usb_vbus_srp_method_selected())
+ //! tests if a HNP occurs
+#define Is_usb_hnp() (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_HNPREQ))
+ //! tests if a SRP from device occurs
+#define Is_usb_device_srp() (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_SRPREQ))
+
+ //! enables suspend time out interrupt
+#define Usb_enable_suspend_time_out_interrupt() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_STOE))
+ //! disables suspend time out interrupt
+#define Usb_disable_suspend_time_out_interrupt() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_STOE))
+#define Is_usb_suspend_time_out_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_STOE))
+ //! acks suspend time out interrupt
+#define Usb_ack_suspend_time_out_interrupt() (UOTGHS->UOTGHS_SCR = UOTGHS_SCR_STOIC)
+ //! raises suspend time out interrupt
+#define Usb_raise_suspend_time_out_interrupt() (UOTGHS->UOTGHS_SFR = UOTGHS_SFR_STOIS)
+ //! tests if a suspend time out occurs
+#define Is_usb_suspend_time_out_interrupt() (Tst_bits(UOTGHS->UOTGHS_SR, UOTGHS_SR_STOI))
+
+ //! enables HNP error interrupt
+#define Usb_enable_hnp_error_interrupt() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_HNPERRE))
+ //! disables HNP error interrupt
+#define Usb_disable_hnp_error_interrupt() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_HNPERRE))
+#define Is_usb_hnp_error_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_HNPERRE))
+ //! acks HNP error interrupt
+#define Usb_ack_hnp_error_interrupt() (UOTGHS->UOTGHS_SCR = UOTGHS_SCR_HNPERRIC)
+ //! raises HNP error interrupt
+#define Usb_raise_hnp_error_interrupt() (UOTGHS->UOTGHS_SFR = UOTGHS_SFR_HNPERRIS)
+ //! tests if a HNP error occurs
+#define Is_usb_hnp_error_interrupt() (Tst_bits(UOTGHS->UOTGHS_SR, UOTGHS_SR_HNPERRI))
+
+ //! enables role exchange interrupt
+#define Usb_enable_role_exchange_interrupt() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_ROLEEXE))
+ //! disables role exchange interrupt
+#define Usb_disable_role_exchange_interrupt() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_ROLEEXE))
+#define Is_usb_role_exchange_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_ROLEEXE))
+ //! acks role exchange interrupt
+#define Usb_ack_role_exchange_interrupt() (UOTGHS->UOTGHS_SCR = UOTGHS_SCR_ROLEEXIC)
+ //! raises role exchange interrupt
+#define Usb_raise_role_exchange_interrupt() (UOTGHS->UOTGHS_SFR = UOTGHS_SFR_ROLEEXIS)
+ //! tests if a role exchange occurs
+#define Is_usb_role_exchange_interrupt() (Tst_bits(UOTGHS->UOTGHS_SR, UOTGHS_SR_ROLEEXI))
+
+ //! enables B-device connection error interrupt
+#define Usb_enable_bconnection_error_interrupt() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_BCERRE))
+ //! disables B-device connection error interrupt
+#define Usb_disable_bconnection_error_interrupt() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_BCERRE))
+#define Is_usb_bconnection_error_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_BCERRE))
+ //! acks B-device connection error interrupt
+#define Usb_ack_bconnection_error_interrupt() (UOTGHS->UOTGHS_SCR = UOTGHS_SCR_BCERRIC)
+ //! raises B-device connection error interrupt
+#define Usb_raise_bconnection_error_interrupt() (UOTGHS->UOTGHS_SFR = UOTGHS_SFR_BCERRIS)
+ //! tests if a B-device connection error occurs
+#define Is_usb_bconnection_error_interrupt() (Tst_bits(UOTGHS->UOTGHS_SR, UOTGHS_SR_BCERRI))
+
+ //! enables VBus error interrupt
+#define Usb_enable_vbus_error_interrupt() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_VBERRE))
+ //! disables VBus error interrupt
+#define Usb_disable_vbus_error_interrupt() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_VBERRE))
+#define Is_usb_vbus_error_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_VBERRE))
+ //! acks VBus error interrupt
+#define Usb_ack_vbus_error_interrupt() (UOTGHS->UOTGHS_SCR = UOTGHS_SCR_VBERRIC)
+ //! raises VBus error interrupt
+#define Usb_raise_vbus_error_interrupt() (UOTGHS->UOTGHS_SFR = UOTGHS_SFR_VBERRIS)
+ //! tests if a VBus error occurs
+#define Is_usb_vbus_error_interrupt() (Tst_bits(UOTGHS->UOTGHS_SR, UOTGHS_SR_VBERRI))
+
+ //! enables SRP interrupt
+#define Usb_enable_srp_interrupt() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_SRPE))
+ //! disables SRP interrupt
+#define Usb_disable_srp_interrupt() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_SRPE))
+#define Is_usb_srp_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_SRPE))
+ //! acks SRP interrupt
+#define Usb_ack_srp_interrupt() (UOTGHS->UOTGHS_SCR = UOTGHS_SCR_SRPIC)
+ //! raises SRP interrupt
+#define Usb_raise_srp_interrupt() (UOTGHS->UOTGHS_SFR = UOTGHS_SFR_SRPIS)
+ //! tests if a SRP occurs
+#define Is_usb_srp_interrupt() (Tst_bits(UOTGHS->UOTGHS_SR, UOTGHS_SR_SRPI))
+//! @}
+
+
+//! @defgroup USBB_device_driver USBB device controller drivers
+//! These macros manage the USBB Device controller.
+//! @{
+ //! initiates a remote wake-up
+#define Usb_initiate_remote_wake_up() (Set_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_RMWKUP))
+ //! detaches from USB bus
+#define Usb_detach() (Set_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_DETACH))
+ //! attaches to USB bus
+#define Usb_attach() (Clr_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_DETACH))
+ //! test if remote wake-up still running
+#define Is_usb_pending_remote_wake_up() (Tst_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_RMWKUP))
+ //! test if the device is detached
+#define Is_usb_detached() (Tst_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_DETACH))
+
+ //! Test device compliance
+#define Usb_dev_forceHighSpeed() Wr_bitfield(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_SPDCONF_Msk, 2, UOTGHS_DEVCTRL_SPDCONF_Pos)
+
+ //! enables remote wake-up interrupt
+#define Usb_enable_remote_wake_up_interrupt() (UOTGHS->UOTGHS_DEVIER = UOTGHS_DEVIER_UPRSMES)
+ //! disables remote wake-up interrupt
+#define Usb_disable_remote_wake_up_interrupt() (UOTGHS->UOTGHS_DEVIDR = UOTGHS_DEVIDR_UPRSMEC)
+
+#define Is_usb_remote_wake_up_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_DEVIMR, UOTGHS_DEVIMR_UPRSME))
+ //! acks remote wake-up
+#define Usb_ack_remote_wake_up_start() (UOTGHS->UOTGHS_DEVICR = UOTGHS_DEVICR_UPRSMC)
+ //! raises remote wake-up
+#define Usb_raise_remote_wake_up_start() (UOTGHS->UOTGHS_DEVIFR = UOTGHS_DEVIFR_UPRSMS)
+ //! tests if remote wake-up still running
+#define Is_usb_remote_wake_up_start() (Tst_bits(UOTGHS->UOTGHS_DEVISR, UOTGHS_DEVISR_UPRSM))
+
+ //! enables resume interrupt
+#define Usb_enable_resume_interrupt() (UOTGHS->UOTGHS_DEVIER = UOTGHS_DEVIER_EORSMES)
+ //! disables resume interrupt
+#define Usb_disable_resume_interrupt() (UOTGHS->UOTGHS_DEVIDR = UOTGHS_DEVIDR_EORSMEC)
+#define Is_usb_resume_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_DEVIMR, UOTGHS_DEVIMR_EORSME))
+ //! acks resume
+#define Usb_ack_resume() (UOTGHS->UOTGHS_DEVICR = UOTGHS_DEVICR_EORSMC)
+ //! raises resume
+#define Usb_raise_resume() (UOTGHS->UOTGHS_DEVIFR = UOTGHS_DEVIFR_EORSMS)
+ //! tests if resume occurs
+#define Is_usb_resume() (Tst_bits(UOTGHS->UOTGHS_DEVISR, UOTGHS_DEVISR_EORSM))
+
+ //! enables wake-up interrupt
+#define Usb_enable_wake_up_interrupt() (UOTGHS->UOTGHS_DEVIER = UOTGHS_DEVIER_WAKEUPES)
+ //! disables wake-up interrupt
+#define Usb_disable_wake_up_interrupt() (UOTGHS->UOTGHS_DEVIDR = UOTGHS_DEVIDR_WAKEUPEC)
+#define Is_usb_wake_up_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_DEVIMR, UOTGHS_DEVIMR_WAKEUPE))
+ //! acks wake-up
+#define Usb_ack_wake_up() (UOTGHS->UOTGHS_DEVICR = UOTGHS_DEVICR_WAKEUPC)
+ //! raises wake-up
+#define Usb_raise_wake_up() (UOTGHS->UOTGHS_DEVIFR = UOTGHS_DEVIFR_WAKEUPS)
+ //! tests if wake-up occurs
+#define Is_usb_wake_up() (Tst_bits(UOTGHS->UOTGHS_DEVISR, UOTGHS_DEVISR_WAKEUP))
+
+ //! enables USB reset interrupt
+#define Usb_enable_reset_interrupt() (UOTGHS->UOTGHS_DEVIER = UOTGHS_DEVIER_EORSTES)
+ //! disables USB reset interrupt
+#define Usb_disable_reset_interrupt() (UOTGHS->UOTGHS_DEVIDR = UOTGHS_DEVIDR_EORSTEC)
+#define Is_usb_reset_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_DEVIMR, UOTGHS_DEVIMR_EORSTE))
+ //! acks USB reset
+#define Usb_ack_reset() (UOTGHS->UOTGHS_DEVICR = UOTGHS_DEVICR_EORSTC)
+ //! raises USB reset
+#define Usb_raise_reset() (UOTGHS->UOTGHS_DEVIFR = UOTGHS_DEVIFR_EORSTS)
+ //! tests if USB reset occurs
+#define Is_usb_reset() (Tst_bits(UOTGHS->UOTGHS_DEVISR, UOTGHS_DEVISR_EORST))
+
+//! disables Micro Start of Frame Interrupt
+#define Usb_disable_msof_interrupt() (UOTGHS->UOTGHS_DEVIDR = UOTGHS_DEVIDR_MSOFEC)
+//! enables Start-of-Frame Interrupt
+#define Usb_enable_sof_interrupt() (UOTGHS->UOTGHS_DEVIER = UOTGHS_DEVIER_SOFES)
+ //! disables Start-of-Frame Interrupt
+#define Usb_disable_sof_interrupt() (UOTGHS->UOTGHS_DEVIDR = UOTGHS_DEVIDR_SOFEC)
+#define Is_usb_sof_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_DEVIMR, UOTGHS_DEVICR_SOFC))
+ //! acks Start-of-Frame
+#define Usb_ack_sof() (UOTGHS->UOTGHS_DEVICR = UOTGHS_DEVICR_SOFC)
+ //! raises Start-of-Frame
+#define Usb_raise_sof() (UOTGHS->UOTGHS_DEVIFR = UOTGHS_DEVIFR_SOFS)
+ //! tests if Start-of-Frame occurs
+#define Is_usb_sof() (Tst_bits(UOTGHS->UOTGHS_DEVISR, UOTGHS_DEVISR_SOF))
+
+ //! enables suspend state interrupt
+#define Usb_enable_suspend_interrupt() (UOTGHS->UOTGHS_DEVIER = UOTGHS_DEVIER_SUSPES)
+ //! disables suspend state interrupt
+#define Usb_disable_suspend_interrupt() (UOTGHS->UOTGHS_DEVIDR = UOTGHS_DEVIDR_SUSPEC)
+#define Is_usb_suspend_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_DEVIMR, UOTGHS_DEVIMR_SUSPE))
+ //! acks Suspend
+#define Usb_ack_suspend() (UOTGHS->UOTGHS_DEVICR = UOTGHS_DEVICR_SUSPC)
+
+ //! raises Suspend
+#define Usb_raise_suspend() (UOTGHS->UOTGHS_DEVIFR = UOTGHS_DEVIFR_SUSPS)
+ //! tests if Suspend state detected
+#define Is_usb_suspend() (Tst_bits(UOTGHS->UOTGHS_DEVISR, UOTGHS_DEVISR_SUSP))
+
+ //! enables USB device address
+#define Usb_enable_address() (Set_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_ADDEN))
+ //! disables USB device address
+#define Usb_disable_address() (Clr_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_ADDEN))
+#define Is_usb_address_enabled() (Tst_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_ADDEN))
+ //! configures the USB device address
+//#define Usb_configure_address(addr) (Wr_bitfield(UOTGHS->UOTGHS_DEVCTRL, AVR32_USBB_UDCON_UADD_MASK, addr))
+#define Usb_configure_address(addr) UOTGHS->UOTGHS_DEVCTRL &= ~UOTGHS_DEVCTRL_UADD_Msk;\
+ UOTGHS->UOTGHS_DEVCTRL |= UOTGHS_DEVCTRL_UADD(addr)
+ //! gets the currently configured USB device address
+#define Usb_get_configured_address() (Rd_bitfield(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_UADD_Msk))
+
+ //! returns the current frame number
+#define Usb_frame_number() (Rd_bitfield(UOTGHS->UOTGHS_DEVFNUM, UOTGHS_DEVFNUM_MFNUM_Msk))
+ //! tests if a crc error occurs in frame number
+#define Is_usb_frame_number_crc_error() (Tst_bits(UOTGHS->UOTGHS_DEVFNUM, UOTGHS_DEVFNUM_FNCERR))
+//! @}
+
+
+//! @defgroup USBB_general_endpoint USBB endpoint drivers
+//! These macros manage the common features of the endpoints.
+//! @{
+ //! resets the selected endpoint
+#define Usb_reset_endpoint(ep) (Set_bits(UOTGHS->UOTGHS_DEVEPT, UOTGHS_DEVEPT_EPRST0 << (ep)),\
+ Clr_bits(UOTGHS->UOTGHS_DEVEPT, UOTGHS_DEVEPT_EPRST0 << (ep)))
+ //! tests if the selected endpoint is being reset
+#define Is_usb_resetting_endpoint(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPT, UOTGHS_DEVEPT_EPRST0 << (ep)))
+
+ //! enables the selected endpoint
+#define Usb_enable_endpoint(ep) (Set_bits(UOTGHS->UOTGHS_DEVEPT, 1 << (ep)))
+ //! enables the STALL handshake
+#define Usb_enable_stall_handshake(ep) (UOTGHS->UOTGHS_DEVEPTIER[ep] = UOTGHS_DEVEPTIER_STALLRQS)
+ //! Sends a STALL handshake for the next host request. A STALL handshake will
+ //! be sent for each following request until a SETUP or a Clear Halt Feature
+ //! occurs for this endpoint.
+#define Usb_halt_endpoint(ep) (Usb_enable_stall_handshake(ep))
+ //! resets the data toggle sequence
+#define Usb_reset_data_toggle(ep) (UOTGHS->UOTGHS_DEVEPTIER[ep] = UOTGHS_DEVEPTIER_RSTDTS)
+ //! disables the selected endpoint
+#define Usb_disable_endpoint(ep) (Clr_bits(UOTGHS->UOTGHS_DEVEPT, 1 << (ep)))
+ //! disables the STALL handshake
+#define Usb_disable_stall_handshake(ep) (UOTGHS->UOTGHS_DEVEPTIDR[ep] = UOTGHS_DEVEPTIDR_STALLRQC)
+ //! tests if the selected endpoint is enabled
+#define Is_usb_endpoint_enabled(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPT, 1 << (ep)))
+ //! tests if STALL handshake request is running
+#define Is_usb_endpoint_stall_requested(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTIMR[ep], UOTGHS_DEVEPTIMR_STALLRQ))
+ //! tests if the data toggle sequence is being reset
+#define Is_usb_data_toggle_reset(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTIMR[ep], UOTGHS_DEVEPTIMR_RSTDT))
+
+ //! tests if an interrupt is triggered by the selected endpoint
+#define Is_usb_endpoint_interrupt(ep) (Tst_bits(UOTGHS->UOTGHS_DEVISR, UOTGHS_DEVISR_PEP_0 << (ep)))
+ //! enables the selected endpoint interrupt
+#define Usb_enable_endpoint_interrupt(ep) (UOTGHS->UOTGHS_DEVIER = UOTGHS_DEVIER_PEP_0 << (ep))
+ //! disables the selected endpoint interrupt
+#define Usb_disable_endpoint_interrupt(ep) (UOTGHS->UOTGHS_DEVIDR = UOTGHS_DEVIDR_PEP_0 << (ep))
+ //! tests if the selected endpoint interrupt is enabled
+#define Is_usb_endpoint_interrupt_enabled(ep) (Tst_bits(UOTGHS->UOTGHS_DEVIMR, UOTGHS_DEVIMR_PEP_0 << (ep)))
+ //! returns the lowest endpoint number generating an endpoint interrupt or MAX_PEP_NB if none
+#define Usb_get_interrupt_endpoint_number() (ctz(((UOTGHS->UOTGHS_DEVISR >> 12 /*AVR32_USBB_UDINT_EP0INT_OFFSET*/) &\
+ (UOTGHS->UOTGHS_DEVIMR >> 12 /*AVR32_USBB_UDINTE_EP0INTE_OFFSET*/)) |\
+ (1 << MAX_PEP_NB)))
+
+ //! configures the selected endpoint type
+#define Usb_configure_endpoint_type(ep, type) (Wr_bitfield(UOTGHS->UOTGHS_DEVEPTCFG[ep], UOTGHS_DEVEPTCFG_EPTYPE_Msk, type, UOTGHS_DEVEPTCFG_EPTYPE_Pos))
+ //! gets the configured selected endpoint type
+#define Usb_get_endpoint_type(ep) (Rd_bitfield(UOTGHS->UOTGHS_DEVEPTCFG[ep], UOTGHS_DEVEPTCFG_EPTYPE_Msk))
+ //! enables the bank autoswitch for the selected endpoint
+#define Usb_enable_endpoint_bank_autoswitch(ep) (Set_bits(UOTGHS->UOTGHS_DEVEPTCFG[ep], UOTGHS_DEVEPTCFG_AUTOSW))
+ //! disables the bank autoswitch for the selected endpoint
+#define Usb_disable_endpoint_bank_autoswitch(ep) (Clr_bits(UOTGHS->UOTGHS_DEVEPTCFG[ep], UOTGHS_DEVEPTCFG_AUTOSW))
+#define Is_usb_endpoint_bank_autoswitch_enabled(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTCFG[ep], UOTGHS_DEVEPTCFG_AUTOSW))
+ //! configures the selected endpoint direction
+#define Usb_configure_endpoint_direction(ep, dir) (Wr_bitfield(UOTGHS->UOTGHS_DEVEPTCFG[ep], UOTGHS_DEVEPTCFG_EPDIR, dir, 8))
+ //! gets the configured selected endpoint direction
+#define Usb_get_endpoint_direction(ep) (Rd_bitfield(UOTGHS->UOTGHS_DEVEPTCFG[ep], UOTGHS_DEVEPTCFG_EPDIR, 8))
+ //! Bounds given integer size to allowed range and rounds it up to the nearest
+ //! available greater size, then applies register format of USBB controller
+ //! for endpoint size bit-field.
+//#define Usb_format_endpoint_size(size) (32 - clz(((U32)min(max(size, 8), 1024) << 1) - 1) - 1 - 3)
+#define Usb_format_endpoint_size(size) ((size <= 8 ) ? 0:\
+ (size <= 16 ) ? 1:\
+ (size <= 32 ) ? 2:\
+ (size <= 64 ) ? 3:\
+ (size <= 128) ? 4:\
+ (size <= 256) ? 5:\
+ (size <= 512) ? 6:7)
+
+ //! configures the selected endpoint size
+#define Usb_configure_endpoint_size(ep, size) (Wr_bitfield(UOTGHS->UOTGHS_DEVEPTCFG[ep], UOTGHS_DEVEPTCFG_EPSIZE_Msk, Usb_format_endpoint_size(size), UOTGHS_DEVEPTCFG_EPSIZE_Pos))
+ //! gets the configured selected endpoint size
+#define Usb_get_endpoint_size(ep) (8 << Rd_bitfield(UOTGHS->UOTGHS_DEVEPTCFG[ep], UOTGHS_DEVEPTCFG_EPSIZE_Msk, UOTGHS_DEVEPTCFG_EPSIZE_Pos))
+ //! configures the selected endpoint number of banks
+#define Usb_configure_endpoint_bank(ep, bank) (Wr_bitfield(UOTGHS->UOTGHS_DEVEPTCFG[ep], UOTGHS_DEVEPTCFG_EPBK_Msk, bank, UOTGHS_DEVEPTCFG_EPBK_Pos))
+ //! gets the configured selected endpoint number of banks
+#define Usb_get_endpoint_bank(ep) (Rd_bitfield(UOTGHS->UOTGHS_DEVEPTCFG[ep], UOTGHS_DEVEPTCFG_EPBK_Msk, UOTGHS_DEVEPTCFG_EPBK_Pos))
+ //! allocates the configuration x in DPRAM memory
+#define Usb_allocate_memory(ep) (Set_bits(UOTGHS->UOTGHS_DEVEPTCFG[ep], UOTGHS_DEVEPTCFG_ALLOC))
+ //! un-allocates the configuration x in DPRAM memory
+#define Usb_unallocate_memory(ep) (Clr_bits(UOTGHS->UOTGHS_DEVEPTCFG[ep], UOTGHS_DEVEPTCFG_ALLOC))
+#define Is_usb_memory_allocated(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTCFG[ep], UOTGHS_DEVEPTCFG_ALLOC))
+
+ //! configures selected endpoint in one step
+#define Usb_configure_endpoint(ep, type, dir, size, bank) \
+(\
+ Usb_enable_endpoint(ep),\
+ Clr_bits(UOTGHS->UOTGHS_DEVEPTCFG[ep], 0xFFFF),\
+ Wr_bits(UOTGHS->UOTGHS_DEVEPTCFG[ep], UOTGHS_DEVEPTCFG_EPTYPE_Msk |\
+ UOTGHS_DEVEPTCFG_EPDIR |\
+ UOTGHS_DEVEPTCFG_EPSIZE_Msk |\
+ UOTGHS_DEVEPTCFG_EPBK_Msk, \
+ ( (U32)(type) << UOTGHS_DEVEPTCFG_EPTYPE_Pos ) |\
+ ( (U32)((dir) << 8 ) & UOTGHS_DEVEPTCFG_EPDIR ) |\
+ ( (U32)(Usb_format_endpoint_size(size)) << UOTGHS_DEVEPTCFG_EPSIZE_Pos ) |\
+ ( (U32)((bank) << UOTGHS_DEVEPTCFG_EPBK_Pos ) )),\
+ Usb_allocate_memory(ep),\
+\
+ Is_usb_endpoint_configured(ep)\
+)
+
+ //! acks endpoint overflow interrupt
+#define Usb_ack_overflow_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTICR[ep] = UOTGHS_DEVEPTICR_OVERFIC)
+ //! raises endpoint overflow interrupt
+#define Usb_raise_overflow_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIFR[ep] = UOTGHS_DEVEPTIFR_OVERFIS)
+ //! acks endpoint underflow interrupt
+#define Usb_ack_underflow_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTICR[ep] = UOTGHS_DEVEPTICR_RXSTPIC)
+ //! raises endpoint underflow interrupt
+#define Usb_raise_underflow_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIFR[ep] = UOTGHS_DEVEPTIFR_RXSTPIS)
+ //! returns data toggle
+#define Usb_data_toggle(ep) (Rd_bitfield(UOTGHS->UOTGHS_DEVEPTISR[ep], UOTGHS_DEVEPTISR_DTSEQ_Msk))
+ //! returns the number of busy banks
+#define Usb_nb_busy_bank(ep) (Rd_bitfield(UOTGHS->UOTGHS_DEVEPTISR[ep], UOTGHS_DEVEPTISR_NBUSYBK_Msk))
+ //! tests if current endpoint is configured
+#define Is_usb_endpoint_configured(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTISR[ep], UOTGHS_DEVEPTISR_CFGOK))
+ //! tests if an overflow occurs
+#define Is_usb_overflow(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTISR[ep], UOTGHS_DEVEPTISR_OVERFI))
+ //! tests if an underflow occurs
+#define Is_usb_underflow(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTISR[ep], UOTGHS_DEVEPTISR_RXSTPI))
+
+ //! returns the byte count
+#define Usb_byte_count(ep) (Rd_bitfield(UOTGHS->UOTGHS_DEVEPTISR[ep], UOTGHS_DEVEPTISR_BYCT_Msk, UOTGHS_DEVEPTISR_BYCT_Pos))
+ //! returns the control direction
+#define Usb_control_direction() (Rd_bitfield(UOTGHS->UOTGHS_DEVEPTISR(EP_CONTROL), UOTGHS_DEVEPTISR_CTRLDIR, 17))
+ //! returns the number of the current bank
+#define Usb_current_bank(ep) (Rd_bitfield(UOTGHS->UOTGHS_DEVEPTISR[ep], UOTGHS_DEVEPTISR_CURRBK_Msk, UOTGHS_DEVEPTISR_CURRBK_Pos))
+
+ //! kills last bank
+#define Usb_kill_last_in_bank(ep) (UOTGHS->UOTGHS_DEVEPTIER[ep] = UOTGHS_DEVEPTIER_KILLBKS)
+ //! acks SHORT PACKET received
+#define Usb_ack_short_packet(ep) (UOTGHS->UOTGHS_DEVEPTICR[ep] = UOTGHS_DEVEPTICR_SHORTPACKETC)
+ //! raises SHORT PACKET received
+#define Usb_raise_short_packet(ep) (UOTGHS->UOTGHS_DEVEPTIFR[ep] = UOTGHS_DEVEPTIFR_SHORTPACKETS)
+ //! acks STALL sent
+#define Usb_ack_stall(ep) (UOTGHS->UOTGHS_DEVEPTICR[ep] = UOTGHS_DEVEPTICR_STALLEDIC)
+ //! raises STALL sent
+#define Usb_raise_stall(ep) (UOTGHS->UOTGHS_DEVEPTIFR[ep] = UOTGHS_DEVEPTIFR_SHORTPACKETS)
+ //! acks CRC ERROR ISO OUT detected
+#define Usb_ack_crc_error(ep) (UOTGHS->UOTGHS_DEVEPTICR[ep] = UOTGHS_DEVEPTICR_STALLEDIC)
+ //! raises CRC ERROR ISO OUT detected
+#define Usb_raise_crc_error(ep) (UOTGHS->UOTGHS_DEVEPTIFR[ep] = UOTGHS_DEVEPTIFR_STALLEDIS)
+ //! acks NAK IN received
+#define Usb_ack_nak_in(ep) (UOTGHS->UOTGHS_DEVEPTICR[ep] = UOTGHS_DEVEPTICR_NAKINIC)
+ //! raises NAK IN received
+#define Usb_raise_nak_in(ep) (UOTGHS->UOTGHS_DEVEPTIFR[ep] = UOTGHS_DEVEPTIFR_NAKINIS)
+ //! acks NAK OUT received
+#define Usb_ack_nak_out(ep) (UOTGHS->UOTGHS_DEVEPTICR[ep] = UOTGHS_DEVEPTICR_NAKOUTIC)
+ //! raises NAK OUT received
+#define Usb_raise_nak_out(ep) (UOTGHS->UOTGHS_DEVEPTIFR[ep] = UOTGHS_DEVEPTIFR_NAKOUTIS)
+
+ //! tests if last bank killed
+#define Is_usb_last_in_bank_killed(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTIMR[ep], UOTGHS_DEVEPTIMR_KILLBK))
+ //! tests if endpoint read allowed
+#define Is_usb_read_enabled(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTISR[ep], UOTGHS_DEVEPTISR_RWALL))
+ //! tests if endpoint write allowed
+#define Is_usb_write_enabled(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTISR[ep], UOTGHS_DEVEPTISR_RWALL))
+ //! tests if SHORT PACKET received
+#define Is_usb_short_packet(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTISR[ep], UOTGHS_DEVEPTISR_SHORTPACKET))
+ //! tests if STALL sent
+#define Is_usb_stall(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTISR[ep], UOTGHS_DEVEPTISR_STALLEDI))
+ //! tests if CRC ERROR ISO OUT detected
+#define Is_usb_crc_error(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTISR[ep], UOTGHS_DEVEPTISR_STALLEDI))
+ //! tests if NAK IN received
+#define Is_usb_nak_in(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTISR[ep], UOTGHS_DEVEPTISR_NAKINI))
+ //! tests if NAK OUT received
+#define Is_usb_nak_out(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTISR[ep], UOTGHS_DEVEPTISR_NAKOUTI))
+
+ //! clears FIFOCON bit
+#define Usb_ack_fifocon(ep) (UOTGHS->UOTGHS_DEVEPTIDR[ep] = UOTGHS_DEVEPTIDR_FIFOCONC)
+
+ //! acks SETUP received
+#define Usb_ack_setup_received_free() (UOTGHS->UOTGHS_DEVEPTICR[EP_CONTROL] = UOTGHS_DEVEPTICR_RXSTPIC)
+ //! raises SETUP received
+#define Usb_raise_setup_received() (UOTGHS->UOTGHS_DEVEPTIFR[EP_CONTROL] = UOTGHS_DEVEPTIFR_RXSTPIS)
+ //! acks OUT received
+#define Usb_ack_out_received(ep) (UOTGHS->UOTGHS_DEVEPTICR[ep] = UOTGHS_DEVEPTICR_RXOUTIC)
+ //! raises OUT received
+#define Usb_raise_out_received(ep) (UOTGHS->UOTGHS_DEVEPTIFR[ep] = UOTGHS_DEVEPTIFR_RXOUTIS)
+ //! frees current bank for OUT endpoint
+#define Usb_free_out(ep) (Usb_ack_fifocon(ep))
+ //! acks OUT received and frees current bank
+#define Usb_ack_out_received_free(ep) (Usb_ack_out_received(ep), Usb_free_out(ep))
+ //! acks OUT received on control endpoint and frees current bank
+#define Usb_ack_control_out_received_free() (UOTGHS->UOTGHS_DEVEPTICR[EP_CONTROL] = UOTGHS_DEVEPTICR_RXOUTIC)
+ //! raises OUT received on control endpoint
+#define Usb_raise_control_out_received() (UOTGHS->UOTGHS_DEVEPTIFR[EP_CONTROL] = UOTGHS_DEVEPTIFR_RXOUTIS)
+
+ //! acks IN ready
+#define Usb_ack_in_ready(ep) (UOTGHS->UOTGHS_DEVEPTICR[ep] = UOTGHS_DEVEPTICR_TXINIC)
+ //! raises IN ready
+#define Usb_raise_in_ready(ep) (UOTGHS->UOTGHS_DEVEPTIFR[ep] = UOTGHS_DEVEPTIFR_TXINIS)
+ //! sends current bank for IN endpoint
+#define Usb_send_in(ep) (Usb_ack_fifocon(ep))
+ //! acks IN ready and sends current bank
+#define Usb_ack_in_ready_send(ep) (Usb_ack_in_ready(ep), Usb_send_in(ep))
+ //! acks IN ready on control endpoint and sends current bank
+#define Usb_ack_control_in_ready_send() (UOTGHS->UOTGHS_DEVEPTICR[EP_CONTROL] = UOTGHS_DEVEPTICR_TXINIC)
+ //! raises IN ready on control endpoint
+#define Usb_raise_control_in_ready() (UOTGHS->UOTGHS_DEVEPTIFR[EP_CONTROL] = UOTGHS_DEVEPTIFR_TXINIS)
+
+ //! tests if FIFOCON bit set
+#define Is_usb_fifocon(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTIMR[ep], UOTGHS_DEVEPTIMR_FIFOCON))
+
+ //! tests if SETUP received
+#define Is_usb_setup_received() (Tst_bits(UOTGHS->UOTGHS_DEVEPTISR[EP_CONTROL], UOTGHS_DEVEPTISR_RXSTPI))
+ //! tests if OUT received
+#define Is_usb_out_received(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTISR[ep], UOTGHS_DEVEPTISR_RXOUTI))
+ //! tests if current bank filled for OUT endpoint
+#define Is_usb_out_filled(ep) (Is_usb_fifocon(ep))
+ //! tests if OUT received on control endpoint
+#define Is_usb_control_out_received() (Tst_bits(UOTGHS->UOTGHS_DEVEPTISR[EP_CONTROL], UOTGHS_DEVEPTISR_RXOUTI))
+
+ //! tests if IN ready
+#define Is_usb_in_ready(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTISR[ep], UOTGHS_DEVEPTISR_TXINI))
+ //! tests if current bank sent for IN endpoint
+#define Is_usb_in_sent(ep) (Is_usb_fifocon(ep))
+ //! tests if IN ready on control endpoint
+#define Is_usb_control_in_ready() (Tst_bits(UOTGHS->UOTGHS_DEVEPTISR[EP_CONTROL], UOTGHS_DEVEPTISR_TXINI))
+
+ //! forces all banks full (OUT) or free (IN) interrupt
+#define Usb_force_bank_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIFR[ep] = UOTGHS_DEVEPTIFR_NBUSYBKS)
+ //! unforces all banks full (OUT) or free (IN) interrupt
+#define Usb_unforce_bank_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIFR[ep] = UOTGHS_DEVEPTIFR_NBUSYBKS)
+ //! enables all banks full (OUT) or free (IN) interrupt
+#define Usb_enable_bank_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIER[ep] = UOTGHS_DEVEPTIER_NBUSYBKES)
+ //! enables SHORT PACKET received interrupt
+#define Usb_enable_short_packet_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIER[ep] = UOTGHS_DEVEPTIER_SHORTPACKETES)
+ //! enables STALL sent interrupt
+#define Usb_enable_stall_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIER[ep] = UOTGHS_DEVEPTIER_STALLRQS)
+ //! enables CRC ERROR ISO OUT detected interrupt
+#define Usb_enable_crc_error_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIER[ep] = UOTGHS_DEVEPTIER_STALLRQS)
+ //! enables overflow interrupt
+#define Usb_enable_overflow_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIER[ep] = UOTGHS_DEVEPTIER_OVERFES)
+ //! enables NAK IN interrupt
+#define Usb_enable_nak_in_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIER[ep] = UOTGHS_DEVEPTIER_NAKINES)
+ //! enables NAK OUT interrupt
+#define Usb_enable_nak_out_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIER[ep] = UOTGHS_DEVEPTIER_NAKOUTES)
+ //! enables SETUP received interrupt
+#define Usb_enable_setup_received_interrupt() (UOTGHS->UOTGHS_DEVEPTIER(EP_CONTROL) = UOTGHS_DEVEPTIER_RXSTPES)
+ //! enables underflow interrupt
+#define Usb_enable_underflow_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIER[ep] = UOTGHS_DEVEPTIER_UNDERFES)
+ //! enables OUT received interrupt
+#define Usb_enable_out_received_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIER[ep] = UOTGHS_DEVEPTIER_RXOUTES)
+ //! enables OUT received on control endpoint interrupt
+#define Usb_enable_control_out_received_interrupt() (UOTGHS->UOTGHS_DEVEPTIER(EP_CONTROL) = UOTGHS_DEVEPTIER_RXOUTES)
+ //! enables IN ready interrupt
+#define Usb_enable_in_ready_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIER[ep] = UOTGHS_DEVEPTIER_TXINES)
+ //! enables IN ready on control endpoint interrupt
+#define Usb_enable_control_in_ready_interrupt() (UOTGHS->UOTGHS_DEVEPTIER(EP_CONTROL) = UOTGHS_DEVEPTIER_TXINES)
+ //! disables all banks full (OUT) or free (IN) interrupt
+#define Usb_disable_bank_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIDR[ep] = UOTGHS_DEVEPTIDR_NBUSYBKEC)
+ //! disables SHORT PACKET received interrupt
+#define Usb_disable_short_packet_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIDR[ep] = UOTGHS_DEVEPTIDR_SHORTPACKETEC)
+ //! disables STALL sent interrupt
+#define Usb_disable_stall_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIDR[ep] = UOTGHS_DEVEPTIDR_STALLEDEC)
+ //! disables CRC ERROR ISO OUT detected interrupt
+#define Usb_disable_crc_error_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIDR[ep] = UOTGHS_DEVEPTIDR_STALLEDEC)
+ //! disables overflow interrupt
+#define Usb_disable_overflow_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIDR[ep] = UOTGHS_DEVEPTIDR_OVERFEC)
+ //! disables NAK IN interrupt
+#define Usb_disable_nak_in_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIDR[ep] = UOTGHS_DEVEPTIDR_NAKINEC)
+ //! disables NAK OUT interrupt
+#define Usb_disable_nak_out_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIDR[ep] = UOTGHS_DEVEPTIDR_NAKOUTEC)
+ //! disables SETUP received interrupt
+#define Usb_disable_setup_received_interrupt() (UOTGHS->UOTGHS_DEVEPTIDR[EP_CONTROL] = UOTGHS_DEVEPTIDR_RXSTPEC)
+ //! disables underflow interrupt
+#define Usb_disable_underflow_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIDR[ep] = UOTGHS_DEVEPTIDR_RXSTPEC)
+ //! disables OUT received interrupt
+#define Usb_disable_out_received_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIDR[ep] = UOTGHS_DEVEPTIDR_RXOUTEC)
+ //! disables OUT received on control endpoint interrupt
+#define Usb_disable_control_out_received_interrupt() (UOTGHS->UOTGHS_DEVEPTIDR[EP_CONTROL] = UOTGHS_DEVEPTIDR_RXOUTEC)
+ //! disables IN ready interrupt
+#define Usb_disable_in_ready_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIDR[ep] = UOTGHS_DEVEPTIDR_TXINEC)
+ //! disables IN ready on control endpoint interrupt
+#define Usb_disable_control_in_ready_interrupt() (UOTGHS->UOTGHS_DEVEPTIDR[EP_CONTROL] = UOTGHS_DEVEPTIDR_TXINEC)
+ //! tests if all banks full (OUT) or free (IN) interrupt enabled
+#define Is_usb_bank_interrupt_enabled(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTIMR[ep], UOTGHS_DEVEPTIMR_NBUSYBKE))
+ //! tests if SHORT PACKET received interrupt is enabled
+#define Is_usb_short_packet_interrupt_enabled(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTIMR[ep], UOTGHS_DEVEPTIMR_SHORTPACKETE))
+ //! tests if STALL sent interrupt is enabled
+#define Is_usb_stall_interrupt_enabled(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTIMR[ep], UOTGHS_DEVEPTIMR_STALLEDE))
+ //! tests if CRC ERROR ISO OUT detected interrupt is enabled
+#define Is_usb_crc_error_interrupt_enabled(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTIMR[ep], UOTGHS_DEVEPTIMR_STALLEDE))
+ //! tests if overflow interrupt is enabled
+#define Is_usb_overflow_interrupt_enabled(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTIMR[ep], UOTGHS_DEVEPTIMR_OVERFE))
+ //! tests if NAK IN interrupt is enabled
+#define Is_usb_nak_in_interrupt_enabled(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTIMR[ep], UOTGHS_DEVEPTIMR_NAKINE))
+ //! tests if NAK OUT interrupt is enabled
+#define Is_usb_nak_out_interrupt_enabled(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTIMR[ep], UOTGHS_DEVEPTIMR_NAKOUTE))
+ //! tests if SETUP received interrupt is enabled
+#define Is_usb_setup_received_interrupt_enabled() (Tst_bits(Tst_bits(UOTGHS->UOTGHS_DEVEPTIMR[EP_CONTROL], UOTGHS_DEVEPTIMR_RXSTPE))
+ //! tests if underflow interrupt is enabled
+#define Is_usb_underflow_interrupt_enabled(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTIMR[ep], UOTGHS_DEVEPTIMR_RXSTPE))
+ //! tests if OUT received interrupt is enabled
+#define Is_usb_out_received_interrupt_enabled(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTIMR[ep], UOTGHS_DEVEPTIMR_RXOUTE))
+ //! tests if OUT received on control endpoint interrupt is enabled
+#define Is_usb_control_out_received_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_DEVEPTIMR[EP_CONTROL], UOTGHS_DEVEPTIMR_RXOUTE))
+ //! tests if IN ready interrupt is enabled
+#define Is_usb_in_ready_interrupt_enabled(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTIMR[ep], UOTGHS_DEVEPTIMR_TXINE))
+ //! tests if IN ready on control endpoint interrupt is enabled
+#define Is_usb_control_in_ready_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_DEVEPTIMR[EP_CONTROL], UOTGHS_DEVEPTIMR_TXINE))
+
+
+#define AVR32_USBB_SLAVE_ADDRESS UOTGHS_RAM_ADDR
+#define AVR32_USBB_SLAVE_SIZE 0x00800000
+#define AVR32_USBB_SLAVE ((unsigned char *)AVR32_USBB_SLAVE_ADDRESS)
+//#define USB_FIFO (((volatile uint32_t *)UOTGHS_RAM_ADDR))
+//#define USB_FIFO_CHAR (((volatile uint8_t *)UOTGHS_RAM_ADDR))
+#define TPASTE2( a, b) a##b
+#define TPASTE3( a, b, c) a##b##c
+
+//! Access point to the FIFO data registers of pipes/endpoints
+ //! @param x Pipe/endpoint of which to access FIFO data register
+ //! @param scale Data index scale in bits: 64, 32, 16 or 8
+ //! @return Volatile 64-, 32-, 16- or 8-bit data pointer to FIFO data register
+#define AVR32_USBB_FIFOX_DATA(x, scale) \
+ (((volatile TPASTE2(U, scale) (*)[0x8000 / ((scale) / 8)])AVR32_USBB_SLAVE)[(x)])
+
+
+//! Get 64-, 32-, 16- or 8-bit access to FIFO data register of selected endpoint.
+ //! @param ep Endpoint of which to access FIFO data register
+ //! @param scale Data scale in bits: 64, 32, 16 or 8
+ //! @return Volatile 64-, 32-, 16- or 8-bit data pointer to FIFO data register
+ //! @warning It is up to the user of this macro to make sure that all accesses
+ //! are aligned with their natural boundaries except 64-bit accesses which
+ //! require only 32-bit alignment.
+ //! @warning It is up to the user of this macro to make sure that used HSB
+ //! addresses are identical to the DPRAM internal pointer modulo 32 bits.
+#define Usb_get_endpoint_fifo_access(ep, scale) \
+ (AVR32_USBB_FIFOX_DATA(ep, scale))
+
+ //! Reset known position inside FIFO data register of selected endpoint.
+ //! @param ep Endpoint of which to reset known position
+ //! @warning Always call this macro before any read/write macro/function
+ //! when at FIFO beginning.
+#define Usb_reset_endpoint_fifo_access(ep) \
+ (pep_fifo[(ep)].u64ptr = Usb_get_endpoint_fifo_access(ep, 64))
+
+ //! Read 64-, 32-, 16- or 8-bit data from FIFO data register of selected endpoint.
+ //! @param ep Endpoint of which to access FIFO data register
+ //! @param scale Data scale in bits: 64, 32, 16 or 8
+ //! @return 64-, 32-, 16- or 8-bit data read
+ //! @warning It is up to the user of this macro to make sure that all accesses
+ //! are aligned with their natural boundaries except 64-bit accesses which
+ //! require only 32-bit alignment.
+ //! @note This macro assures that used HSB addresses are identical to the
+ //! DPRAM internal pointer modulo 32 bits.
+ //! @warning Always call Usb_reset_endpoint_fifo_access before this macro when
+ //! at FIFO beginning.
+ //! @warning Do not mix calls to this macro with calls to indexed macros below.
+#define Usb_read_endpoint_data(ep, scale) \
+ (*pep_fifo[(ep)].TPASTE3(u, scale, ptr)\
+ TPASTE3(Pep_fifo_access_, scale, _post_inc)())
+
+ //! Write 64-, 32-, 16- or 8-bit data to FIFO data register of selected endpoint.
+ //! @param ep Endpoint of which to access FIFO data register
+ //! @param scale Data scale in bits: 64, 32, 16 or 8
+ //! @param data 64-, 32-, 16- or 8-bit data to write
+ //! @return 64-, 32-, 16- or 8-bit data written
+ //! @warning It is up to the user of this macro to make sure that all accesses
+ //! are aligned with their natural boundaries except 64-bit accesses which
+ //! require only 32-bit alignment.
+ //! @note This macro assures that used HSB addresses are identical to the
+ //! DPRAM internal pointer modulo 32 bits.
+ //! @warning Always call Usb_reset_endpoint_fifo_access before this macro when
+ //! at FIFO beginning.
+ //! @warning Do not mix calls to this macro with calls to indexed macros below.
+#define Usb_write_endpoint_data(ep, scale, data) \
+ (*pep_fifo[(ep)].TPASTE3(u, scale, ptr)\
+ TPASTE3(Pep_fifo_access_, scale, _post_inc)() = (data))
+
+ //! Read 64-, 32-, 16- or 8-bit indexed data from FIFO data register of selected endpoint.
+ //! @param ep Endpoint of which to access FIFO data register
+ //! @param scale Data scale in bits: 64, 32, 16 or 8
+ //! @param index Index of scaled data array to access
+ //! @return 64-, 32-, 16- or 8-bit data read
+ //! @warning It is up to the user of this macro to make sure that all accesses
+ //! are aligned with their natural boundaries except 64-bit accesses which
+ //! require only 32-bit alignment.
+ //! @warning It is up to the user of this macro to make sure that used HSB
+ //! addresses are identical to the DPRAM internal pointer modulo 32 bits.
+ //! @warning Do not mix calls to this macro with calls to non-indexed macros above.
+#define Usb_read_endpoint_indexed_data(ep, scale, index) \
+ (AVR32_USBB_FIFOX_DATA(ep, scale)[(index)])
+
+ //! Write 64-, 32-, 16- or 8-bit indexed data to FIFO data register of selected endpoint.
+ //! @param ep Endpoint of which to access FIFO data register
+ //! @param scale Data scale in bits: 64, 32, 16 or 8
+ //! @param index Index of scaled data array to access
+ //! @param data 64-, 32-, 16- or 8-bit data to write
+ //! @return 64-, 32-, 16- or 8-bit data written
+ //! @warning It is up to the user of this macro to make sure that all accesses
+ //! are aligned with their natural boundaries except 64-bit accesses which
+ //! require only 32-bit alignment.
+ //! @warning It is up to the user of this macro to make sure that used HSB
+ //! addresses are identical to the DPRAM internal pointer modulo 32 bits.
+ //! @warning Do not mix calls to this macro with calls to non-indexed macros above.
+#define Usb_write_endpoint_indexed_data(ep, scale, index, data) \
+ (AVR32_USBB_FIFOX_DATA(ep, scale)[(index)] = (data))
+//! @}
+
+
+//! @defgroup USBB_general_endpoint_dma USBB endpoint DMA drivers
+//! These macros manage the common features of the endpoint DMA channels.
+//! @{
+ //! enables the disabling of HDMA requests by endpoint interrupts
+#define Usb_enable_endpoint_int_dis_hdma_req(ep) (UOTGHS->UOTGHS_DEVEPTIER[ep] = UOTGHS_DEVEPTIER_EPDISHDMAS)
+ //! disables the disabling of HDMA requests by endpoint interrupts
+#define Usb_disable_endpoint_int_dis_hdma_req(ep) (UOTGHS->UOTGHS_DEVEPTIDR[ep] = UOTGHS_DEVEPTIDR_EPDISHDMAC)
+ //! tests if the disabling of HDMA requests by endpoint interrupts is enabled
+#define Is_usb_endpoint_int_dis_hdma_req_enabled(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTIMR[ep], UOTGHS_DEVEPTIMR_EPDISHDMA))
+
+ //! raises the selected endpoint DMA channel interrupt
+#define Usb_raise_endpoint_dma_interrupt(epdma) (UOTGHS->UOTGHS_DEVIFR = UOTGHS_DEVIFR_DMA_1 << ((epdma) - 1))
+ //! tests if an interrupt is triggered by the selected endpoint DMA channel
+#define Is_usb_endpoint_dma_interrupt(epdma) (Tst_bits(UOTGHS->UOTGHS_DEVISR, UOTGHS_DEVISR_DMA_1 << ((epdma) - 1)))
+ //! enables the selected endpoint DMA channel interrupt
+#define Usb_enable_endpoint_dma_interrupt(epdma) (UOTGHS->UOTGHS_DEVIER = UOTGHS_DEVIER_DMA_1 << ((epdma) - 1))
+ //! disables the selected endpoint DMA channel interrupt
+#define Usb_disable_endpoint_dma_interrupt(epdma) (UOTGHS->UOTGHS_DEVIDR = UOTGHS_DEVIDR_DMA_1 << ((epdma) - 1))
+ //! tests if the selected endpoint DMA channel interrupt is enabled
+#define Is_usb_endpoint_dma_interrupt_enabled(epdma) (Tst_bits(UOTGHS->UOTGHS_DEVIMR, UOTGHS_DEVIMR_DMA_1 << ((epdma) - 1)))
+//! @todo Implement macros for endpoint DMA registers and descriptors
+#if 0
+#define Usb_set_endpoint_dma_nxt_desc_addr(epdma, nxt_desc_addr) (AVR32_USBB_UDDMAX_NEXTDESC(epdma).nxt_desc_addr = (U32)(nxt_desc_addr))
+#define Usb_get_endpoint_dma_nxt_desc_addr(epdma) ((avr32_usbb_uxdmax_t *)AVR32_USBB_UDDMAX_NEXTDESC(epdma).nxt_desc_addr)
+#define (epdma) (AVR32_USBB_UDDMAX_addr(epdma))
+#define (epdma) (AVR32_USBB_UDDMAX_CONTROL(epdma).ch_byte_length)
+#define (epdma) (AVR32_USBB_UDDMAX_CONTROL(epdma).burst_lock_en)
+#define (epdma) (AVR32_USBB_UDDMAX_CONTROL(epdma).desc_ld_irq_en)
+#define (epdma) (AVR32_USBB_UDDMAX_CONTROL(epdma).eobuff_irq_en)
+#define (epdma) (AVR32_USBB_UDDMAX_CONTROL(epdma).eot_irq_en)
+#define (epdma) (AVR32_USBB_UDDMAX_CONTROL(epdma).dmaend_en)
+#define (epdma) (AVR32_USBB_UDDMAX_CONTROL(epdma).buff_close_in_en)
+#define (epdma) (AVR32_USBB_UDDMAX_CONTROL(epdma).ld_nxt_ch_desc_en)
+#define (epdma) (AVR32_USBB_UDDMAX_CONTROL(epdma).ch_en)
+#define (epdma) (AVR32_USBB_UDDMAX_STATUS(epdma).ch_byte_cnt)
+#define (epdma) (AVR32_USBB_UDDMAX_STATUS(epdma).desc_ld_sta)
+#define (epdma) (AVR32_USBB_UDDMAX_STATUS(epdma).eoch_buff_sta)
+#define (epdma) (AVR32_USBB_UDDMAX_STATUS(epdma).eot_sta)
+#define (epdma) (AVR32_USBB_UDDMAX_STATUS(epdma).ch_active)
+#define (epdma) (AVR32_USBB_UDDMAX_STATUS(epdma).ch_en)
+#endif
+//! @}
+
+
+//! @defgroup USBB_host_driver USBB host controller drivers
+//! These macros manage the USBB Host controller.
+//! @{
+ //! enables SOF generation
+#define Host_enable_sof() (Set_bits(UOTGHS->UOTGHS_HSTCTRL, UOTGHS_HSTCTRL_SOFE))
+ //! disables SOF generation
+#define Host_disable_sof() (Clr_bits(UOTGHS->UOTGHS_HSTCTRL, UOTGHS_HSTCTRL_SOFE))
+ //! tests if SOF generation enabled
+#define Is_host_sof_enabled() (Tst_bits(UOTGHS->UOTGHS_HSTCTRL, UOTGHS_HSTCTRL_SOFE))
+ //! sends a USB Reset to the device
+#define Host_send_reset() (Set_bits(UOTGHS->UOTGHS_HSTCTRL, UOTGHS_HSTCTRL_RESET))
+ //! stops sending a USB Reset to the device
+#define Host_stop_sending_reset() (Clr_bits(UOTGHS->UOTGHS_HSTCTRL, UOTGHS_HSTCTRL_RESET))
+ //! tests if USB Reset running
+#define Is_host_sending_reset() (Tst_bits(UOTGHS->UOTGHS_HSTCTRL, UOTGHS_HSTCTRL_RESET))
+ //! sends a USB Resume to the device
+#define Host_send_resume() (Set_bits(UOTGHS->UOTGHS_HSTCTRL, UOTGHS_HSTCTRL_RESUME))
+ //! tests if USB Resume running
+#define Is_host_sending_resume() (Tst_bits(UOTGHS->UOTGHS_HSTCTRL, UOTGHS_HSTCTRL_RESUME))
+
+#ifdef AVR32_USBB_UHCON_SPDCONF
+ //! Force device full speed mode (i.e. disable high speed)
+#define Host_force_full_speed_mode() (Wr_bitfield(UOTGHS->UOTGHS_HSTCTRL, UOTGHS_HSTCTRL_SPDCONF_Msk, 3, UOTGHS_HSTCTRL_SPDCONF_Pos))
+ //! Enable hihgh speed mode
+#define Host_enable_high_speed_mode() (Wr_bitfield(UOTGHS->UOTGHS_HSTCTRL, UOTGHS_HSTCTRL_SPDCONF_Msk, 0, UOTGHS_HSTCTRL_SPDCONF_Pos))
+#endif
+
+ //! enables host Start-of-Frame interrupt
+#define Host_enable_sof_interrupt() (UOTGHS->UOTGHS_HSTIER = UOTGHS_HSTIER_HSOFIES)
+ //! enables host Start-of-Frame interrupt
+#define Host_disable_sof_interrupt() (UOTGHS->UOTGHS_HSTIDR = UOTGHS_HSTIDR_HSOFIEC)
+#define Is_host_sof_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_HSTIMR, UOTGHS_HSTIMR_HSOFIE))
+ //! acks SOF detection
+#define Host_ack_sof() (UOTGHS->UOTGHS_HSTICR = UOTGHS_HSTICR_HSOFIC)
+ //! raises SOF detection
+#define Host_raise_sof() (UOTGHS->UOTGHS_HSTIFR = UOTGHS_HSTIFR_HSOFIS)
+ //! tests if SOF detected
+#define Is_host_sof() (Tst_bits(UOTGHS->UOTGHS_HSTISR, UOTGHS_HSTISR_HSOFI))
+
+ //! enables host wake-up interrupt detection
+#define Host_enable_hwup_interrupt() (UOTGHS->UOTGHS_HSTIER = UOTGHS_HSTIER_HWUPIES)
+ //! disables host wake-up interrupt detection
+#define Host_disable_hwup_interrupt() (UOTGHS->UOTGHS_HSTIDR = UOTGHS_HSTIDR_HWUPIEC)
+#define Is_host_hwup_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_HSTIMR, UOTGHS_HSTIMR_HWUPIE))
+ //! acks host wake-up detection
+#define Host_ack_hwup() (UOTGHS->UOTGHS_HSTICR = UOTGHS_HSTICR_HWUPIC)
+ //! raises host wake-up detection
+#define Host_raise_hwup() (UOTGHS->UOTGHS_HSTIFR = UOTGHS_HSTIFR_HWUPIS)
+ //! tests if host wake-up detected
+#define Is_host_hwup() (Tst_bits(UOTGHS->UOTGHS_HSTISR, UOTGHS_HSTISR_HWUPI))
+
+ //! enables host down stream rsm sent interrupt detection
+#define Host_enable_down_stream_resume_interrupt() (UOTGHS->UOTGHS_HSTIER = UOTGHS_HSTIER_RSMEDIES)
+ //! disables host down stream rsm sent interrupt detection
+#define Host_disable_down_stream_resume_interrupt() (UOTGHS->UOTGHS_HSTIDR = UOTGHS_HSTIDR_RSMEDIEC)
+#define Is_host_down_stream_resume_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_HSTIMR, UOTGHS_HSTIMR_RSMEDIE))
+ //! acks host down stream resume sent
+#define Host_ack_down_stream_resume() (UOTGHS->UOTGHS_HSTICR = UOTGHS_HSTICR_RSMEDIC)
+ //! raises host down stream resume sent
+#define Host_raise_down_stream_resume() (UOTGHS->UOTGHS_HSTIFR = UOTGHS_HSTIFR_RSMEDIS)
+#define Is_host_down_stream_resume() (Tst_bits(UOTGHS->UOTGHS_HSTISR, UOTGHS_HSTISR_RSMEDI))
+
+ //! enables host remote wake-up interrupt detection
+#define Host_enable_remote_wakeup_interrupt() (UOTGHS->UOTGHS_HSTIER = UOTGHS_HSTIER_RXRSMIES)
+ //! disables host remote wake-up interrupt detection
+#define Host_disable_remote_wakeup_interrupt() (UOTGHS->UOTGHS_HSTIDR = UOTGHS_HSTIDR_RXRSMIEC)
+#define Is_host_remote_wakeup_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_HSTIMR, UOTGHS_HSTIMR_RXRSMIE))
+ //! acks host remote wake-up detection
+#define Host_ack_remote_wakeup() (UOTGHS->UOTGHS_HSTICR = UOTGHS_HSTICR_RXRSMIC)
+ //! raises host remote wake-up detection
+#define Host_raise_remote_wakeup() (UOTGHS->UOTGHS_HSTIFR = UOTGHS_HSTIFR_RXRSMIS)
+ //! tests if host remote wake-up detected
+#define Is_host_remote_wakeup() (Tst_bits(UOTGHS->UOTGHS_HSTISR, UOTGHS_HSTISR_RXRSMI))
+
+ //! enables host device connection interrupt
+#define Host_enable_device_connection_interrupt() (UOTGHS->UOTGHS_HSTIER = UOTGHS_HSTIER_DCONNIES)
+ //! disables USB device connection interrupt
+#define Host_disable_device_connection_interrupt() (UOTGHS->UOTGHS_HSTIDR = UOTGHS_HSTIDR_DCONNIEC)
+#define Is_host_device_connection_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_HSTIMR, UOTGHS_HSTIMR_DCONNIE))
+ //! acks device connection
+#define Host_ack_device_connection() (UOTGHS->UOTGHS_HSTICR = UOTGHS_HSTICR_DCONNIC)
+ //! raises device connection
+#define Host_raise_device_connection() (UOTGHS->UOTGHS_HSTIFR = UOTGHS_HSTIFR_DCONNIS)
+ //! tests if a USB device has been detected
+#define Is_host_device_connection() (Tst_bits(UOTGHS->UOTGHS_HSTISR, UOTGHS_HSTISR_DCONNI))
+
+ //! enables host device disconnection interrupt
+#define Host_enable_device_disconnection_interrupt() (UOTGHS->UOTGHS_HSTIER = UOTGHS_HSTIER_DCONNIES)
+ //! disables USB device connection interrupt
+#define Host_disable_device_disconnection_interrupt() (UOTGHS->UOTGHS_HSTIDR = UOTGHS_HSTIDR_DDISCIEC)
+#define Is_host_device_disconnection_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_HSTIMR, UOTGHS_HSTIMR_DDISCIE))
+ //! acks device disconnection
+#define Host_ack_device_disconnection() (UOTGHS->UOTGHS_HSTICR = UOTGHS_HSTICR_DDISCIC)
+ //! raises device disconnection
+#define Host_raise_device_disconnection() (UOTGHS->UOTGHS_HSTIFR = UOTGHS_HSTIFR_DDISCIS)
+ //! tests if a USB device has been removed
+#define Is_host_device_disconnection() (Tst_bits(UOTGHS->UOTGHS_HSTISR, UOTGHS_HSTISR_DDISCI))
+
+ //! enables host USB reset sent interrupt
+#define Host_enable_reset_sent_interrupt() (UOTGHS->UOTGHS_HSTIER = UOTGHS_HSTIER_RSTIES)
+ //! disables host USB reset sent interrupt
+#define Host_disable_reset_sent_interrupt() (UOTGHS->UOTGHS_HSTIDR = UOTGHS_HSTIDR_RSTIEC)
+#define Is_host_reset_sent_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_HSTIMR, UOTGHS_HSTIMR_RSTIE))
+ //! acks host USB reset sent
+#define Host_ack_reset_sent() (UOTGHS->UOTGHS_HSTICR = UOTGHS_HSTICR_RSTIC)
+ //! raises host USB reset sent
+#define Host_raise_reset_sent() (UOTGHS->UOTGHS_HSTIFR = UOTGHS_HSTIFR_RSTIS)
+ //! tests if host USB reset sent
+#define Is_host_reset_sent() (Tst_bits(UOTGHS->UOTGHS_HSTISR, UOTGHS_HSTISR_RSTI))
+
+ //! sets the current frame number
+#define Host_set_frame_number(fnum) (Wr_bitfield(UOTGHS->UOTGHS_HSTFNUM, UOTGHS_HSTFNUM_MFNUM_Msk, fnum, UOTGHS_HSTFNUM_MFNUM_Pos))
+ //! returns the current frame number
+#define Host_frame_number() (Rd_bitfield(UOTGHS->UOTGHS_HSTFNUM, UOTGHS_HSTFNUM_MFNUM_Msk, UOTGHS_HSTFNUM_MFNUM_Pos))
+ //! returns the current frame length
+#define Host_frame_length() (Rd_bitfield(UOTGHS->UOTGHS_HSTFNUM, UOTGHS_HSTFNUM_FLENHIGH_Msk, UOTGHS_HSTFNUM_FLENHIGH_Pos))
+
+ //! configures the USB device address associated with the selected pipe
+//#define Host_configure_address(p, addr) (Wr_bitfield(AVR32_USBB_uhaddrx(1 + ((p) >> 2)), AVR32_USBB_UHADDR1_UHADDR_P0_MASK << (((p) & 0x03) << 3), addr))
+//#define Host_configure_address(p, addr) (Wr_bitfield(UOTGHS->UOTGHS_HSTADDR1[1 + ((p) >> 2)], UOTGHS_HSTADDR1_HSTADDRP0_Msk << (((p) & 0x03) << 3), addr, UOTGHS_HSTADDR1_HSTADDRP0_Pos))
+ //! gets the currently configured USB device address associated with the selected pipe
+//#define Host_get_configured_address(p) (Rd_bitfield(AVR32_USBB_uhaddrx(1 + ((p) >> 2)), AVR32_USBB_UHADDR1_UHADDR_P0_MASK << (((p) & 0x03) << 3)))
+#define Host_get_configured_address(p) (Rd_bitfield(UOTGHS->UOTGHS_HSTADDR1[1 + ((p) >> 2)], UOTGHS_HSTADDR1_HSTADDRP0_Msk << (((p) & 0x03) << 3), UOTGHS_HSTADDR1_HSTADDRP0_Pos))
+//! @}
+
+
+//! @defgroup USBB_general_pipe USBB pipe drivers
+//! These macros manage the common features of the pipes.
+//! @{
+ //! enables the selected pipe
+#define Host_enable_pipe(p) (Set_bits(UOTGHS->UOTGHS_HSTPIP, UOTGHS_HSTPIP_PEN0 << (p)))
+ //! disables the selected pipe
+#define Host_disable_pipe(p) (Clr_bits(UOTGHS->UOTGHS_HSTPIP, UOTGHS_HSTPIP_PEN0 << (p)))
+ //! tests if the selected pipe is enabled
+#define Is_host_pipe_enabled(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIP, UOTGHS_HSTPIP_PEN0 << (p)))
+
+ //! tests if an interrupt is triggered by the selected pipe
+#define Is_host_pipe_interrupt(p) (Tst_bits(UOTGHS->UOTGHS_HSTISR, UOTGHS_HSTISR_PEP_0 << (p)))
+ //! enables the selected pipe interrupt
+#define Host_enable_pipe_interrupt(p) (UOTGHS->UOTGHS_HSTIER = UOTGHS_HSTIER_PEP_0 << (p))
+ //! disables the selected pipe interrupt
+#define Host_disable_pipe_interrupt(p) (UOTGHS->UOTGHS_HSTIDR = UOTGHS_HSTIDR_PEP_0 << (p))
+ //! tests if the selected pipe interrupt is enabled
+#define Is_host_pipe_interrupt_enabled(p) (Tst_bits(UOTGHS->UOTGHS_HSTIMR, UOTGHS_HSTIMR_PEP_0 << (p)))
+ //! returns the lowest pipe number generating a pipe interrupt or MAX_PEP_NB if none
+//#define Host_get_interrupt_pipe_number() (ctz(((UOTGHS->UOTGHS_HSTISR >> 8/*AVR32_USBB_UHINT_P0INT_OFFSET*/) &\
+// (UOTGHS->UOTGHS_HSTIMR >> 8/*AVR32_USBB_UHINTE_P0INTE_OFFSET*/)) |\
+// (1 << MAX_PEP_NB)))
+#define Host_get_interrupt_pipe_number(p) ((UOTGHS->UOTGHS_HSTISR >> 8 >> p) &\
+ (UOTGHS->UOTGHS_HSTIMR >> 8 >> p))
+
+ //! configures the interrupt pipe request frequency (period in ms) for the selected pipe
+#define Host_configure_pipe_int_req_freq(p, freq) (Wr_bitfield(UOTGHS->UOTGHS_HSTPIPCFG[p], UOTGHS_HSTPIPCFG_INTFRQ_Msk, freq, UOTGHS_HSTPIPCFG_INTFRQ_Pos))
+ //! gets the configured interrupt pipe request frequency (period in ms) for the selected pipe
+#define Host_get_pipe_int_req_freq(p) (Rd_bitfield(UOTGHS->UOTGHS_HSTPIPCFG[p], UOTGHS_HSTPIPCFG_INTFRQ_Msk, UOTGHS_HSTPIPCFG_INTFRQ_Pos))
+ //! configures the selected pipe endpoint number
+#define Host_configure_pipe_endpoint_number(p, ep_num) (Wr_bitfield(UOTGHS->UOTGHS_HSTPIPCFG[p], UOTGHS_HSTPIPCFG_PEPNUM_Msk, ep_num, UOTGHS_HSTPIPCFG_PEPNUM_Pos))
+ //! gets the configured selected pipe endpoint number
+#define Host_get_pipe_endpoint_number(p) (Rd_bitfield(UOTGHS->UOTGHS_HSTPIPCFG[p], UOTGHS_HSTPIPCFG_PEPNUM_Msk, UOTGHS_HSTPIPCFG_PEPNUM_Pos))
+ //! configures the selected pipe type
+#define Host_configure_pipe_type(p, type) (Wr_bitfield(UOTGHS->UOTGHS_HSTPIPCFG[p], UOTGHS_HSTPIPCFG_PTYPE_Msk, type, UOTGHS_HSTPIPCFG_PTYPE_Pos))
+ //! gets the configured selected pipe type
+#define Host_get_pipe_type(p) (Rd_bitfield(UOTGHS->UOTGHS_HSTPIPCFG[p], UOTGHS_HSTPIPCFG_PTYPE_Msk, UOTGHS_HSTPIPCFG_PTYPE_Pos))
+ //! enables the bank autoswitch for the selected pipe
+#define Host_enable_pipe_bank_autoswitch(p) (Set_bits(UOTGHS->UOTGHS_HSTPIPCFG[p], UOTGHS_HSTPIPCFG_AUTOSW))
+ //! disables the bank autoswitch for the selected pipe
+#define Host_disable_pipe_bank_autoswitch(p) (Clr_bits(UOTGHS->UOTGHS_HSTPIPCFG[p], UOTGHS_HSTPIPCFG_AUTOSW))
+#define Is_host_pipe_bank_autoswitch_enabled(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPCFG[p], UOTGHS_HSTPIPCFG_AUTOSW))
+ //! configures the selected pipe token
+#define Host_configure_pipe_token(p, token) (Wr_bitfield(UOTGHS->UOTGHS_HSTPIPCFG[p], UOTGHS_HSTPIPCFG_PTOKEN_Msk, token, UOTGHS_HSTPIPCFG_PTOKEN_Pos))
+ //! gets the configured selected pipe token
+#define Host_get_pipe_token(p) (Rd_bitfield(UOTGHS->UOTGHS_HSTPIPCFG[p], UOTGHS_HSTPIPCFG_PTOKEN_Msk, UOTGHS_HSTPIPCFG_PTOKEN_Pos))
+ //! Bounds given integer size to allowed range and rounds it up to the nearest
+ //! available greater size, then applies register format of USBB controller
+ //! for pipe size bit-field.
+//#define Host_format_pipe_size(size) (32 - clz(((U32)min(max(size, 8), 1024) << 1) - 1) - 1 - 3)
+#define Host_format_pipe_size(size) (size <= 8 ) ? ( 8):\
+ (size <= 16 ) ? ( 16):\
+ (size <= 32 ) ? ( 32):\
+ (size <= 64 ) ? ( 64):\
+ (size <= 128) ? (128):\
+ (size <= 256) ? (256):\
+ (size <= 512) ? (512):(1024)
+ //! configures the selected pipe size
+#define Host_configure_pipe_size(p, size) (Wr_bitfield(UOTGHS->UOTGHS_HSTPIPCFG[p], UOTGHS_HSTPIPCFG_PSIZE_Msk, Host_format_pipe_size(size), UOTGHS_HSTPIPCFG_PSIZE_Pos))
+ //! gets the configured selected pipe size
+#define Host_get_pipe_size(p) (8 << Rd_bitfield(UOTGHS->UOTGHS_HSTPIPCFG[p], UOTGHS_HSTPIPCFG_PSIZE_Msk, UOTGHS_HSTPIPCFG_PSIZE_Pos))
+ //! configures the selected pipe number of banks
+#define Host_configure_pipe_bank(p, bank) (Wr_bitfield(UOTGHS->UOTGHS_HSTPIPCFG[p], UOTGHS_HSTPIPCFG_PBK_Msk, bank, UOTGHS_HSTPIPCFG_PBK_Pos))
+ //! gets the configured selected pipe number of banks
+#define Host_get_pipe_bank(p) (Rd_bitfield(UOTGHS->UOTGHS_HSTPIPCFG[p], UOTGHS_HSTPIPCFG_PBK_Msk, UOTGHS_HSTPIPCFG_PBK_Pos))
+ //! allocates the configuration x in DPRAM memory
+#define Host_allocate_memory(p) (Set_bits(UOTGHS->UOTGHS_HSTPIPCFG[p], UOTGHS_HSTPIPCFG_ALLOC))
+ //! un-allocates the configuration x in DPRAM memory
+#define Host_unallocate_memory(p) (Clr_bits(UOTGHS->UOTGHS_HSTPIPCFG[p], UOTGHS_HSTPIPCFG_ALLOC))
+#define Is_host_memory_allocated(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPCFG[p], UOTGHS_HSTPIPCFG_ALLOC))
+ //! Enable PING management for the endpoint p
+#define Host_enable_ping(p) (Set_bits(UOTGHS->UOTGHS_HSTPIPCFG[p], UOTGHS_HSTPIPCFG_PINGEN))
+
+ //! configures selected pipe in one step
+#define Host_configure_pipe(p, freq, ep_num, type, token, size, bank) \
+(\
+ Host_enable_pipe(p),\
+ Clr_bits(UOTGHS->UOTGHS_HSTPIPCFG[p], 0xFFFFFFFF),\
+ Wr_bits(UOTGHS->UOTGHS_HSTPIPCFG[p], UOTGHS_HSTPIPCFG_INTFRQ_Msk |\
+ UOTGHS_HSTPIPCFG_PEPNUM_Msk |\
+ UOTGHS_HSTPIPCFG_PTYPE_Msk |\
+ UOTGHS_HSTPIPCFG_PTOKEN_Msk |\
+ UOTGHS_HSTPIPCFG_PSIZE_Msk |\
+ UOTGHS_HSTPIPCFG_PBK_Msk, \
+ (UOTGHS_HSTPIPCFG_INTFRQ((U32)(freq ))) |\
+ (UOTGHS_HSTPIPCFG_PEPNUM((U32)(ep_num))) |\
+ ( (U32)(type ) << UOTGHS_HSTPIPCFG_PTYPE_Pos ) |\
+ ( (U32)(token ) << UOTGHS_HSTPIPCFG_PTOKEN_Pos) |\
+ ( (U32)Usb_format_endpoint_size(size) << UOTGHS_HSTPIPCFG_PSIZE_Pos ) |\
+ ( (U32)(bank ) << UOTGHS_HSTPIPCFG_PBK_Pos ) ),\
+ Host_allocate_memory(p),\
+\
+ Is_host_pipe_configured(p)\
+)
+
+
+//static void Host_configure_pipe(uint8_t p, uint32_t freq, uint32_t ep_num, uint32_t type, uint32_t token, uint32_t size, uint32_t bank)
+//{
+//// Host_enable_pipe(p);
+//// Wr_bits(UOTGHS->UOTGHS_HSTPIPCFG[p], UOTGHS_HSTPIPCFG_INTFRQ_Msk |
+//// UOTGHS_HSTPIPCFG_PEPNUM_Msk |
+//// UOTGHS_HSTPIPCFG_PTYPE_Msk |
+//// UOTGHS_HSTPIPCFG_PTOKEN_Msk |
+//// UOTGHS_HSTPIPCFG_PSIZE_Msk |
+//// UOTGHS_HSTPIPCFG_PBK_Msk,
+//// (UOTGHS_HSTPIPCFG_INTFRQ((U32)(freq ))) |
+//// (UOTGHS_HSTPIPCFG_PEPNUM((U32)(ep_num))) |
+//// (((U32)(type ) << UOTGHS_HSTPIPCFG_PTYPE_Pos ) & UOTGHS_HSTPIPCFG_PTYPE_Msk ) |
+//// (((U32)(token ) << UOTGHS_HSTPIPCFG_PTOKEN_Pos) & UOTGHS_HSTPIPCFG_PTOKEN_Msk) |
+//// ( (U32)Host_format_pipe_size(size) << UOTGHS_HSTPIPCFG_PSIZE_Pos ) |
+//// (((U32)(bank ) << UOTGHS_HSTPIPCFG_PBK_Pos ) & UOTGHS_HSTPIPCFG_PBK_Msk ));
+//// Host_allocate_memory(p);
+//// Is_host_pipe_configured(p);
+//}
+
+ //! resets the selected pipe
+#define Host_reset_pipe(p) (Set_bits(UOTGHS->UOTGHS_HSTPIP, UOTGHS_HSTPIP_PRST0 << (p)),\
+ Clr_bits(UOTGHS->UOTGHS_HSTPIP, UOTGHS_HSTPIP_PRST0 << (p)))
+ //! tests if the selected pipe is being reset
+#define Is_host_resetting_pipe(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIP, UOTGHS_HSTPIP_PRST0 << (p)))
+
+ //! freezes the pipe
+#define Host_freeze_pipe(p) (UOTGHS->UOTGHS_HSTPIPIER[p] = UOTGHS_HSTPIPIER_PFREEZES)
+ //! unfreezees the pipe
+#define Host_unfreeze_pipe(p) (UOTGHS->UOTGHS_HSTPIPIDR[p] = UOTGHS_HSTPIPIDR_PFREEZEC)
+ //! tests if the current pipe is frozen
+#define Is_host_pipe_frozen(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPIMR[p], UOTGHS_HSTPIPIMR_PFREEZE))
+
+ //! resets the data toggle sequence
+#define Host_reset_data_toggle(p) (UOTGHS->UOTGHS_HSTPIPIER[p] = UOTGHS_HSTPIPIER_RSTDTS)
+ //! tests if the data toggle sequence is being reset
+#define Is_host_data_toggle_reset(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPIMR[p], UOTGHS_HSTPIPIMR_RSTDT))
+
+ //! acks pipe overflow interrupt
+#define Host_ack_overflow_interrupt(p) (UOTGHS->UOTGHS_HSTPIPICR[p] = UOTGHS_HSTPIPICR_OVERFIC)
+ //! raises pipe overflow interrupt
+#define Host_raise_overflow_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIFR[p] = UOTGHS_HSTPIPIFR_OVERFIS)
+ //! acks pipe underflow interrupt
+#define Host_ack_underflow_interrupt(p) (UOTGHS->UOTGHS_HSTPIPICR[p] = UOTGHS_HSTPIPICR_TXSTPIC)
+ //! raises pipe underflow interrupt
+#define Host_raise_underflow_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIFR[p] = UOTGHS_HSTPIPIFR_TXSTPIS)
+ //! tests if an overflow occurs
+#define Is_host_overflow(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPISR[p], UOTGHS_HSTPIPISR_OVERFI))
+ //! tests if an underflow occurs
+#define Is_host_underflow(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPISR[p], UOTGHS_HSTPIPISR_TXSTPI))
+
+ //! returns data toggle
+#define Host_data_toggle(p) (Rd_bitfield(UOTGHS->UOTGHS_HSTPIPISR[p], UOTGHS_HSTPIPISR_DTSEQ_Msk, UOTGHS_HSTPIPISR_DTSEQ_Pos))
+ //! returns the number of busy banks
+#define Host_nb_busy_bank(p) (Rd_bitfield(UOTGHS->UOTGHS_HSTPIPISR[p], UOTGHS_HSTPIPISR_NBUSYBK_Msk, UOTGHS_HSTPIPISR_NBUSYBK_Pos))
+ //! returns the number of the current bank
+#define Host_current_bank(p) (Rd_bitfield(UOTGHS->UOTGHS_HSTPIPISR[p], UOTGHS_HSTPIPISR_CURRBK_Msk, UOTGHS_HSTPIPISR_CURRBK_Pos))
+ //! tests if current pipe is configured
+#define Is_host_pipe_configured(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPISR[p], UOTGHS_HSTPIPISR_CFGOK))
+ //! returns the byte count
+#define Host_byte_count(p) (Rd_bitfield(UOTGHS->UOTGHS_HSTPIPISR[p], UOTGHS_HSTPIPISR_PBYCT_Msk, UOTGHS_HSTPIPISR_PBYCT_Pos))
+
+ //! tests if a STALL has been received
+#define Is_host_stall(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPISR[p], UOTGHS_HSTPIPISR_RXSTALLDI))
+ //! tests if CRC ERROR ISO IN detected
+#define Is_host_crc_error(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPISR[p], UOTGHS_HSTPIPISR_RXSTALLDI))
+ //! tests if an error occurs on current pipe
+#define Is_host_pipe_error(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPISR[p], UOTGHS_HSTPIPISR_PERRI))
+ //! tests if SHORT PACKET received
+#define Is_host_short_packet(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPISR[p], UOTGHS_HSTPIPISR_SHORTPACKETI))
+
+ //! clears FIFOCON bit
+#define Host_ack_fifocon(p) (UOTGHS->UOTGHS_HSTPIPIDR[p] = UOTGHS_HSTPIPIDR_FIFOCONC)
+
+ //! acks setup
+#define Host_ack_setup_ready() (UOTGHS->UOTGHS_HSTPIPICR[P_CONTROL] = UOTGHS_HSTPIPICR_TXSTPIC)
+ //! raises setup
+#define Host_raise_setup_ready() (UOTGHS->UOTGHS_HSTPIPIFR[P_CONTROL] = UOTGHS_HSTPIPIFR_TXSTPIS)
+ //! sends current bank for SETUP pipe
+#define Host_send_setup() (Host_ack_fifocon(P_CONTROL))
+ //! acks setup and sends current bank
+#define Host_ack_setup_ready_send() (Host_ack_setup_ready(), Host_send_setup())
+ //! acks OUT sent
+#define Host_ack_out_ready(p) (UOTGHS->UOTGHS_HSTPIPICR[p] = UOTGHS_HSTPIPICR_TXOUTIC)
+ //! raises OUT sent
+#define Host_raise_out_ready(p) (UOTGHS->UOTGHS_HSTPIPIFR[p] = UOTGHS_HSTPIPIFR_TXOUTIS)
+ //! sends current bank for OUT pipe
+#define Host_send_out(p) (Host_ack_fifocon(p))
+ //! acks OUT sent and sends current bank
+#define Host_ack_out_ready_send(p) (Host_ack_out_ready(p), Host_send_out(p))
+ //! acks control OUT
+#define Host_ack_control_out_ready() (UOTGHS->UOTGHS_HSTPIPICR[P_CONTROL] = UOTGHS_HSTPIPICR_TXOUTIC)
+ //! raises control OUT
+#define Host_raise_control_out_ready() (UOTGHS->UOTGHS_HSTPIPIFR[P_CONTROL] = UOTGHS_HSTPIPIFR_TXOUTIS)
+ //! sends current bank for OUT control pipe
+#define Host_send_control_out() (Host_ack_fifocon(P_CONTROL))
+ //! acks control OUT and sends current bank
+#define Host_ack_control_out_ready_send() (Host_ack_control_out_ready(), Host_send_control_out())
+
+ //! acks IN reception
+#define Host_ack_in_received(p) (UOTGHS->UOTGHS_HSTPIPICR[p] = UOTGHS_HSTPIPICR_RXINIC)
+ //! raises IN reception
+#define Host_raise_in_received(p) (UOTGHS->UOTGHS_HSTPIPIFR[p] = UOTGHS_HSTPIPIFR_RXINIS)
+ //! frees current bank for IN pipe
+#define Host_free_in(p) (Host_ack_fifocon(p))
+ //! acks IN reception and frees current bank
+#define Host_ack_in_received_free(p) (Host_ack_in_received(p), Host_free_in(p))
+ //! acks control IN
+#define Host_ack_control_in_received() (UOTGHS->UOTGHS_HSTPIPICR[P_CONTROL] = UOTGHS_HSTPIPICR_RXINIC)
+ //! raises control IN
+#define Host_raise_control_in_received() (UOTGHS->UOTGHS_HSTPIPIFR[P_CONTROL] = UOTGHS_HSTPIPIFR_RXINIS)
+ //! frees current bank for IN control pipe
+#define Host_free_control_in() (Host_ack_fifocon(P_CONTROL))
+ //! acks control IN and frees current bank
+#define Host_ack_control_in_received_free() (Host_ack_control_in_received(), Host_free_control_in())
+
+ //! tests if FIFOCON bit set
+#define Is_host_fifocon(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPIMR[p], UOTGHS_HSTPIPIMR_FIFOCON))
+
+ //! tests if SETUP has been sent
+#define Is_host_setup_ready() (Tst_bits(UOTGHS->UOTGHS_HSTPIPISR[P_CONTROL], UOTGHS_HSTPIPISR_TXSTPI))
+ //! tests if current bank sent for SETUP pipe
+#define Is_host_setup_sent() (Is_host_fifocon(P_CONTROL))
+ //! tests if OUT has been sent
+#define Is_host_out_ready(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPISR[p], UOTGHS_HSTPIPISR_TXOUTI))
+ //! tests if current bank sent for OUT pipe
+#define Is_host_out_sent(p) (Is_host_fifocon(p))
+ //! tests if control OUT has been sent
+#define Is_host_control_out_ready() (Tst_bits(UOTGHS->UOTGHS_HSTPIPISR[P_CONTROL], UOTGHS_HSTPIPISR_TXOUTI))
+ //! tests if current bank sent for OUT control pipe
+#define Is_host_control_out_sent() (Is_host_fifocon(P_CONTROL))
+
+ //! tests if IN received
+#define Is_host_in_received(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPISR[p], UOTGHS_HSTPIPISR_RXINI))
+ //! tests if IN received in current bank
+#define Is_host_in_filled(p) (Is_host_fifocon(p))
+ //! tests if control IN has been received
+#define Is_host_control_in_received() (Tst_bits(UOTGHS->UOTGHS_HSTPIPISR[P_CONTROL], UOTGHS_HSTPIPISR_RXINI))
+ //! tests if IN received in current bank for control pipe
+#define Is_host_control_in_filled() (Is_host_fifocon(P_CONTROL))
+
+ //! acks STALL reception
+#define Host_ack_stall(p) (UOTGHS->UOTGHS_HSTPIPICR[p] = UOTGHS_HSTPIPICR_RXSTALLDIC)
+ //! raises STALL reception
+#define Host_raise_stall(p) (UOTGHS->UOTGHS_HSTPIPIFR[p] = UOTGHS_HSTPIPIFR_RXSTALLDIS)
+ //! acks CRC ERROR ISO IN detected
+#define Host_ack_crc_error(p) (UOTGHS->UOTGHS_HSTPIPICR[p] = UOTGHS_HSTPIPICR_RXSTALLDIC)
+ //! raises CRC ERROR ISO IN detected
+#define Host_raise_crc_error(p) (UOTGHS->UOTGHS_HSTPIPIFR[p] = UOTGHS_HSTPIPIFR_RXSTALLDIS)
+ //! acks pipe error
+#define Host_ack_pipe_error(p) (UOTGHS->UOTGHS_HSTPIPIFR[p] = (Is_host_pipe_error(p)) ? UOTGHS_HSTPIPIFR_PERRIS : 0)
+ //! raises pipe error
+#define Host_raise_pipe_error(p) (UOTGHS->UOTGHS_HSTPIPIFR[p] = (Is_host_pipe_error(p)) ? 0 : UOTGHS_HSTPIPIFR_PERRIS)
+ //! acks SHORT PACKET received
+#define Host_ack_short_packet(p) (UOTGHS->UOTGHS_HSTPIPICR[p] = UOTGHS_HSTPIPICR_SHORTPACKETIC)
+ //! raises SHORT PACKET received
+#define Host_raise_short_packet(p) (UOTGHS->UOTGHS_HSTPIPIFR[p] = UOTGHS_HSTPIPIFR_SHORTPACKETIS)
+
+ //! tests if NAK handshake has been received
+#define Is_host_nak_received(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPISR[p], UOTGHS_HSTPIPISR_NAKEDI))
+ //! acks NAK received
+#define Host_ack_nak_received(p) (UOTGHS->UOTGHS_HSTPIPICR[p] = UOTGHS_HSTPIPICR_NAKEDIC)
+ //! raises NAK received
+#define Host_raise_nak_received(p) (UOTGHS->UOTGHS_HSTPIPIFR[p] = UOTGHS_HSTPIPIFR_NAKEDIS)
+
+ //! tests if pipe read allowed
+#define Is_host_read_enabled(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPISR[p], UOTGHS_HSTPIPISR_RWALL))
+ //! tests if pipe write allowed
+#define Is_host_write_enabled(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPISR[p], UOTGHS_HSTPIPISR_RWALL))
+
+ //! enables continuous IN mode
+#define Host_enable_continuous_in_mode(p) (Set_bits(UOTGHS->UOTGHS_HSTPIPINRQ[p], UOTGHS_HSTPIPINRQ_INMODE))
+ //! disables continuous IN mode
+#define Host_disable_continuous_in_mode(p) (Clr_bits(UOTGHS->UOTGHS_HSTPIPINRQ[p], UOTGHS_HSTPIPINRQ_INMODE))
+ //! tests if continuous IN mode is enabled
+#define Is_host_continuous_in_mode_enabled(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPINRQ[p], UOTGHS_HSTPIPINRQ_INMODE))
+
+ //! sets number of IN requests to perform before freeze
+#define Host_in_request_number(p, in_num) (Wr_bitfield(UOTGHS->UOTGHS_HSTPIPINRQ[p], UOTGHS_HSTPIPINRQ_INRQ_Msk, (in_num) - 1), UOTGHS_HSTPIPINRQ_INRQ_Pos)
+ //! returns number of remaining IN requests
+#define Host_get_in_request_number(p) (Rd_bitfield(UOTGHS->UOTGHS_HSTPIPINRQ[p], UOTGHS_HSTPIPINRQ_INRQ_Msk) + 1, UOTGHS_HSTPIPINRQ_INRQ_Pos)
+
+ //! acks all pipe error
+#define Host_ack_all_errors(p) (Clr_bits(UOTGHS->UOTGHS_HSTPIPERR[p], UOTGHS_HSTPIPERR_DATATGL |\
+ UOTGHS_HSTPIPERR_DATAPID |\
+ UOTGHS_HSTPIPERR_PID |\
+ UOTGHS_HSTPIPERR_TIMEOUT |\
+ UOTGHS_HSTPIPERR_CRC16 |\
+ UOTGHS_HSTPIPERR_COUNTER_Msk))
+ //! tests if error occurs on pipe
+#define Host_error_status(p) (Rd_bits(UOTGHS->UOTGHS_HSTPIPERR[p], UOTGHS_HSTPIPERR_DATATGL |\
+ UOTGHS_HSTPIPERR_DATAPID |\
+ UOTGHS_HSTPIPERR_PID |\
+ UOTGHS_HSTPIPERR_TIMEOUT |\
+ UOTGHS_HSTPIPERR_CRC16))
+
+ //! acks bad data toggle
+#define Host_ack_bad_data_toggle(p) (Clr_bits(UOTGHS->UOTGHS_HSTPIPERR[p], UOTGHS_HSTPIPERR_DATATGL))
+#define Is_host_bad_data_toggle(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPERR[p], UOTGHS_HSTPIPERR_DATATGL))
+ //! acks data PID error
+#define Host_ack_data_pid_error(p) (Clr_bits(UOTGHS->UOTGHS_HSTPIPERR[p], UOTGHS_HSTPIPERR_DATAPID))
+#define Is_host_data_pid_error(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPERR[p], UOTGHS_HSTPIPERR_DATAPID))
+ //! acks PID error
+#define Host_ack_pid_error(p) (Clr_bits(UOTGHS->UOTGHS_HSTPIPERR[p], UOTGHS_HSTPIPERR_PID))
+#define Is_host_pid_error(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPERR[p], UOTGHS_HSTPIPERR_PID))
+ //! acks time-out error
+#define Host_ack_timeout_error(p) (Clr_bits(UOTGHS->UOTGHS_HSTPIPERR[p], UOTGHS_HSTPIPERR_TIMEOUT))
+#define Is_host_timeout_error(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPERR[p], UOTGHS_HSTPIPERR_TIMEOUT))
+ //! acks CRC16 error
+#define Host_ack_crc16_error(p) (Clr_bits(UOTGHS->UOTGHS_HSTPIPERR[p], UOTGHS_HSTPIPERR_CRC16))
+#define Is_host_crc16_error(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPERR[p], UOTGHS_HSTPIPERR_CRC16))
+ //! clears the error counter
+#define Host_clear_error_counter(p) (Clr_bits(UOTGHS->UOTGHS_HSTPIPERR[p], UOTGHS_HSTPIPERR_COUNTER_Msk))
+#define Host_get_error_counter(p) (Rd_bitfield(UOTGHS->UOTGHS_HSTPIPERR[p], UOTGHS_HSTPIPERR_COUNTER_Msk, UOTGHS_HSTPIPERR_COUNTER_Pos))
+
+ //! enables overflow interrupt
+#define Host_enable_overflow_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIER[p] = UOTGHS_HSTPIPIER_OVERFIES)
+ //! disables overflow interrupt
+#define Host_disable_overflow_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIDR[p] = UOTGHS_HSTPIPIDR_OVERFIEC)
+ //! tests if overflow interrupt is enabled
+#define Is_host_overflow_interrupt_enabled(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPIMR[p], UOTGHS_HSTPIPIMR_OVERFIE))
+
+ //! enables underflow interrupt
+#define Host_enable_underflow_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIER[p] = UOTGHS_HSTPIPIER_TXSTPES)
+ //! disables underflow interrupt
+#define Host_disable_underflow_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIDR[p] = UOTGHS_HSTPIPIDR_TXSTPEC)
+ //! tests if underflow interrupt is enabled
+#define Is_host_underflow_interrupt_enabled(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPIMR[p], UOTGHS_HSTPIPIMR_TXSTPE))
+
+ //! forces all banks full (OUT) or free (IN) interrupt
+#define Host_force_bank_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIFR[p] = UOTGHS_HSTPIPIFR_NBUSYBKS)
+ //! unforces all banks full (OUT) or free (IN) interrupt
+#define Host_unforce_bank_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIFR[p] = UOTGHS_HSTPIPIFR_NBUSYBKS)
+ //! enables all banks full (IN) or free (OUT) interrupt
+#define Host_enable_bank_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIER[p] = UOTGHS_HSTPIPIER_NBUSYBKES)
+ //! disables all banks full (IN) or free (OUT) interrupt
+#define Host_disable_bank_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIDR[p] = UOTGHS_HSTPIPIDR_NBUSYBKEC)
+ //! tests if all banks full (IN) or free (OUT) interrupt is enabled
+#define Is_host_bank_interrupt_enabled(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPIMR[p], UOTGHS_HSTPIPIMR_NBUSYBKE))
+
+ //! enables SHORT PACKET received interrupt
+#define Host_enable_short_packet_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIER[p] = UOTGHS_HSTPIPIER_SHORTPACKETIES)
+ //! disables SHORT PACKET received interrupt
+#define Host_disable_short_packet_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIDR[p] = UOTGHS_HSTPIPIDR_SHORTPACKETIEC)
+ //! tests if SHORT PACKET received interrupt is enabled
+#define Is_host_short_packet_interrupt_enabled(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPIMR[p], UOTGHS_HSTPIPIMR_SHORTPACKETIE))
+
+ //! enables STALL received interrupt
+#define Host_enable_stall_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIER[p] = UOTGHS_HSTPIPIER_RXSTALLDES)
+ //! disables STALL received interrupt
+#define Host_disable_stall_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIDR[p] = UOTGHS_HSTPIPIDR_RXSTALLDEC)
+ //! tests if STALL received interrupt is enabled
+#define Is_host_stall_interrupt_enabled(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPIMR[p], UOTGHS_HSTPIPIMR_RXSTALLDE))
+
+ //! enables CRC ERROR ISO IN detected interrupt
+#define Host_enable_crc_error_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIER[p] = UOTGHS_HSTPIPIER_RXSTALLDES)
+ //! disables CRC ERROR ISO IN detected interrupt
+#define Host_disable_crc_error_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIDR[p] = UOTGHS_HSTPIPIDR_RXSTALLDEC)
+ //! tests if CRC ERROR ISO IN detected interrupt is enabled
+#define Is_host_crc_error_interrupt_enabled(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPIMR[p], UOTGHS_HSTPIPIMR_RXSTALLDE))
+
+ //! enables NAK received interrupt
+#define Host_enable_nak_received_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIER[p] = UOTGHS_HSTPIPIER_NAKEDES)
+ //! disables NAK received interrupt
+#define Host_disable_nak_received_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIDR[p] = UOTGHS_HSTPIPIDR_NAKEDEC)
+ //! tests if NAK received interrupt is enabled
+#define Is_host_nak_received_interrupt_enabled(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPIMR[p], UOTGHS_HSTPIPIMR_NAKEDE))
+
+ //! enables pipe error interrupt
+#define Host_enable_pipe_error_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIER[p] = UOTGHS_HSTPIPIER_PERRES)
+ //! disables pipe error interrupt
+#define Host_disable_pipe_error_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIDR[p] = UOTGHS_HSTPIPIDR_PERREC)
+ //! tests if pipe error interrupt is enabled
+#define Is_host_pipe_error_interrupt_enabled(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPIMR[p], UOTGHS_HSTPIPIMR_PERRE))
+
+ //! enables SETUP pipe ready interrupt
+#define Host_enable_setup_ready_interrupt() (UOTGHS->UOTGHS_HSTPIPIER[P_CONTROL] = UOTGHS_HSTPIPIER_TXSTPES)
+ //! disables SETUP pipe ready interrupt
+#define Host_disable_setup_ready_interrupt() (UOTGHS->UOTGHS_HSTPIPIDR[P_CONTROL] = UOTGHS_HSTPIPIDR_TXSTPEC)
+ //! tests if SETUP pipe ready interrupt is enabled
+#define Is_host_setup_ready_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_HSTPIPIMR[P_CONTROL], UOTGHS_HSTPIPIMR_TXSTPE))
+
+ //! enables OUT pipe ready interrupt
+#define Host_enable_out_ready_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIER[p] = UOTGHS_HSTPIPIER_TXOUTES)
+ //! disables OUT pipe ready interrupt
+#define Host_disable_out_ready_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIDR[p] = UOTGHS_HSTPIPIDR_TXOUTEC)
+ //! tests if OUT pipe ready interrupt is enabled
+#define Is_host_out_ready_interrupt_enabled(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPIMR[p], UOTGHS_HSTPIPIMR_TXOUTE))
+
+ //! enables OUT control pipe ready interrupt
+#define Host_enable_control_out_ready_interrupt() (UOTGHS->UOTGHS_HSTPIPIER[P_CONTROL] = UOTGHS_HSTPIPIER_TXOUTES)
+ //! disables OUT control pipe ready interrupt
+#define Host_disable_control_out_ready_interrupt() (UOTGHS->UOTGHS_HSTPIPIDR[P_CONTROL] = UOTGHS_HSTPIPIDR_TXOUTEC)
+ //! tests if OUT control pipe ready interrupt is enabled
+#define Is_host_control_out_ready_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_HSTPIPIMR[P_CONTROL], UOTGHS_HSTPIPIMR_TXOUTE))
+
+ //! enables IN pipe reception interrupt
+#define Host_enable_in_received_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIER[p] = UOTGHS_HSTPIPIER_RXINES)
+ //! disables IN pipe reception interrupt
+#define Host_disable_in_received_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIDR[p] = UOTGHS_HSTPIPIDR_RXINEC)
+ //! tests if IN pipe reception interrupt is enabled
+#define Is_host_in_received_interrupt_enabled(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPIMR[p], UOTGHS_HSTPIPIMR_RXINE))
+
+ //! enables IN control pipe reception interrupt
+#define Host_enable_control_in_received_interrupt() (UOTGHS->UOTGHS_HSTPIPIER[P_CONTROL] = UOTGHS_HSTPIPIER_RXINES)
+ //! disables IN control pipe reception interrupt
+#define Host_disable_control_in_received_interrupt() (UOTGHS->UOTGHS_HSTPIPIDR[P_CONTROL] = UOTGHS_HSTPIPIDR_RXINEC)
+ //! tests if IN control pipe reception interrupt is enabled
+#define Is_host_control_in_received_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_HSTPIPIMR[P_CONTROL], UOTGHS_HSTPIPIMR_RXINE))
+
+ //! Get 64-, 32-, 16- or 8-bit access to FIFO data register of selected pipe.
+ //! @param p Pipe of which to access FIFO data register
+ //! @param scale Data scale in bits: 64, 32, 16 or 8
+ //! @return Volatile 64-, 32-, 16- or 8-bit data pointer to FIFO data register
+ //! @warning It is up to the user of this macro to make sure that all accesses
+ //! are aligned with their natural boundaries except 64-bit accesses which
+ //! require only 32-bit alignment.
+ //! @warning It is up to the user of this macro to make sure that used HSB
+ //! addresses are identical to the DPRAM internal pointer modulo 32 bits.
+#define Host_get_pipe_fifo_access(p, scale) \
+ (AVR32_USBB_FIFOX_DATA(p, scale))
+
+ //! Reset known position inside FIFO data register of selected pipe.
+ //! @param p Pipe of which to reset known position
+ //! @warning Always call this macro before any read/write macro/function
+ //! when at FIFO beginning.
+#define Host_reset_pipe_fifo_access(p) \
+ (pep_fifo[(p)].u64ptr = Host_get_pipe_fifo_access(p, 64))
+
+ //! Read 64-, 32-, 16- or 8-bit data from FIFO data register of selected pipe.
+ //! @param p Pipe of which to access FIFO data register
+ //! @param scale Data scale in bits: 64, 32, 16 or 8
+ //! @return 64-, 32-, 16- or 8-bit data read
+ //! @warning It is up to the user of this macro to make sure that all accesses
+ //! are aligned with their natural boundaries except 64-bit accesses which
+ //! require only 32-bit alignment.
+ //! @note This macro assures that used HSB addresses are identical to the
+ //! DPRAM internal pointer modulo 32 bits.
+ //! @warning Always call Host_reset_pipe_fifo_access before this macro when
+ //! at FIFO beginning.
+ //! @warning Do not mix calls to this macro with calls to indexed macros below.
+#define Host_read_pipe_data(p, scale) \
+ (*pep_fifo[(p)].TPASTE3(u, scale, ptr)\
+ TPASTE3(Pep_fifo_access_, scale, _post_inc)())
+
+ //! Write 64-, 32-, 16- or 8-bit data to FIFO data register of selected pipe.
+ //! @param p Pipe of which to access FIFO data register
+ //! @param scale Data scale in bits: 64, 32, 16 or 8
+ //! @param data 64-, 32-, 16- or 8-bit data to write
+ //! @return 64-, 32-, 16- or 8-bit data written
+ //! @warning It is up to the user of this macro to make sure that all accesses
+ //! are aligned with their natural boundaries except 64-bit accesses which
+ //! require only 32-bit alignment.
+ //! @note This macro assures that used HSB addresses are identical to the
+ //! DPRAM internal pointer modulo 32 bits.
+ //! @warning Always call Host_reset_pipe_fifo_access before this macro when
+ //! at FIFO beginning.
+ //! @warning Do not mix calls to this macro with calls to indexed macros below.
+#define Host_write_pipe_data(p, scale, data) \
+ (*pep_fifo[(p)].TPASTE3(u, scale, ptr)\
+ TPASTE3(Pep_fifo_access_, scale, _post_inc)() = (data))
+
+ //! Read 64-, 32-, 16- or 8-bit indexed data from FIFO data register of selected pipe.
+ //! @param p Pipe of which to access FIFO data register
+ //! @param scale Data scale in bits: 64, 32, 16 or 8
+ //! @param index Index of scaled data array to access
+ //! @return 64-, 32-, 16- or 8-bit data read
+ //! @warning It is up to the user of this macro to make sure that all accesses
+ //! are aligned with their natural boundaries except 64-bit accesses which
+ //! require only 32-bit alignment.
+ //! @warning It is up to the user of this macro to make sure that used HSB
+ //! addresses are identical to the DPRAM internal pointer modulo 32 bits.
+ //! @warning Do not mix calls to this macro with calls to non-indexed macros above.
+#define Host_read_pipe_indexed_data(p, scale, index) \
+ (AVR32_USBB_FIFOX_DATA(p, scale)[(index)])
+
+ //! Write 64-, 32-, 16- or 8-bit indexed data to FIFO data register of selected pipe.
+ //! @param p Pipe of which to access FIFO data register
+ //! @param scale Data scale in bits: 64, 32, 16 or 8
+ //! @param index Index of scaled data array to access
+ //! @param data 64-, 32-, 16- or 8-bit data to write
+ //! @return 64-, 32-, 16- or 8-bit data written
+ //! @warning It is up to the user of this macro to make sure that all accesses
+ //! are aligned with their natural boundaries except 64-bit accesses which
+ //! require only 32-bit alignment.
+ //! @warning It is up to the user of this macro to make sure that used HSB
+ //! addresses are identical to the DPRAM internal pointer modulo 32 bits.
+ //! @warning Do not mix calls to this macro with calls to non-indexed macros above.
+#define Host_write_pipe_indexed_data(p, scale, index, data) \
+ (AVR32_USBB_FIFOX_DATA(p, scale)[(index)] = (data))
+//! @}
+
+
+//! @defgroup USBB_general_pipe_dma USBB pipe DMA drivers
+//! These macros manage the common features of the pipe DMA channels.
+//! @{
+ //! enables the disabling of HDMA requests by pipe interrupts
+#define Host_enable_pipe_int_dis_hdma_req(p) (UOTGHS->UOTGHS_HSTPIPIER[p] = UOTGHS_HSTPIPIER_PDISHDMAS)
+ //! disables the disabling of HDMA requests by pipe interrupts
+#define Host_disable_pipe_int_dis_hdma_req(p) (UOTGHS->UOTGHS_HSTPIPIDR[p] = UOTGHS_HSTPIPIDR_PDISHDMAC)
+ //! tests if the disabling of HDMA requests by pipe interrupts si enabled
+#define Is_host_pipe_int_dis_hdma_req_enabled(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPIMR[p], UOTGHS_HSTPIPIMR_PDISHDMA))
+
+ //! raises the selected pipe DMA channel interrupt
+#define Host_raise_pipe_dma_interrupt(pdma) (UOTGHS->UOTGHS_HSTIFR = UOTGHS_HSTIFR_DMA_1 << ((pdma) - 1))
+ //! tests if an interrupt is triggered by the selected pipe DMA channel
+#define Is_host_pipe_dma_interrupt(pdma) (Tst_bits(UOTGHS->UOTGHS_HSTISR, UOTGHS_HSTISR_DMA_1 << ((pdma) - 1)))
+ //! enables the selected pipe DMA channel interrupt
+#define Host_enable_pipe_dma_interrupt(pdma) (UOTGHS->UOTGHS_HSTIER = UOTGHS_HSTIER_DMA_1 << ((pdma) - 1))
+ //! disables the selected pipe DMA channel interrupt
+#define Host_disable_pipe_dma_interrupt(pdma) (UOTGHS->UOTGHS_HSTIDR = UOTGHS_HSTIDR_DMA_1 << ((pdma) - 1))
+ //! tests if the selected pipe DMA channel interrupt is enabled
+#define Is_host_pipe_dma_interrupt_enabled(pdma) (Tst_bits(UOTGHS->UOTGHS_HSTIMR, UOTGHS_HSTIMR_DMA_1 << ((pdma) - 1)))
+//! @todo Implement macros for pipe DMA registers and descriptors
+//! @}
+
+//! @}
+
+
+//_____ D E C L A R A T I O N S ____________________________________________
+
+extern UnionVPtr pep_fifo[MAX_PEP_NB];
+
+#if USB_DEVICE_FEATURE == ENABLED
+extern Status_bool_t usb_init_device ( void );
+extern U32 usb_set_ep_txpacket (U8, U8 , U32 );
+extern U32 usb_write_ep_txpacket (U8, const void *, U32, const void **);
+extern U32 usb_read_ep_rxpacket (U8, void *, U32, void **);
+#endif
+
+#if USB_HOST_FEATURE == ENABLED
+extern void host_disable_all_pipes ( void );
+extern U32 host_set_p_txpacket (U8, U8 , U32 );
+extern U32 host_write_p_txpacket (U8, const void *, U32, const void **);
+extern U32 host_read_p_rxpacket (U8, void *, U32, void **);
+#endif
+
+extern void Host_configure_address( uint8_t pipe, uint8_t addr);
+extern void Uotghs_trace(void);
+
+#endif // _USB_DRV_H_
diff --git a/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/usb_ids.h b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/usb_ids.h
new file mode 100644
index 0000000..9fd2b04
--- /dev/null
+++ b/MakefileBasedBuild/Atmel/sam3x/sam3x-ek/libraries/usb_host/usb_ids.h
@@ -0,0 +1,277 @@
+/* This header file is part of the AVR Software Framework 2.0.0 release */
+
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief Contains some IDs (VID, PID, Class numbers) used in the various
+ * demos.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _USB_IDS_H_
+#define _USB_IDS_H_
+
+
+//_____ I N C L U D E S ____________________________________________________
+
+//_____ M A C R O S ________________________________________________________
+
+//_____ D E C L A R A T I O N S ____________________________________________
+
+/*! \name Vendor ID (VID)
+ */
+//! @{
+#define ATMEL_VID 0x03EB
+#define APPLE_VID 0x05AC
+//! @}
+
+/*! \name USB Product ID (PID)
+ */
+//! @{
+#define IPOD_PID 0x1200
+#define IPOD_SHUFFLE_PID 0x1300
+#define HID_GENERIC_EXAMPLE_PID 0x2013
+#define HID_QTOUCH_DEBUG_PID 0x211F
+#define ENUM_EXAMPLE_PID 0x2300
+#define MS_EXAMPLE_PID 0x2301
+#define MS_SDRAM_LOADER_PID 0x2302
+#define EVK1100_CTRL_PANEL_DEMO_PID 0x2303
+#define HID_EXAMPLE_PID 0x2304
+#define EVK1101_CTRL_PANEL_DEMO_HID_PID 0x2305
+#define EVK1101_CTRL_PANEL_DEMO_HID_MS_PID 0x2306
+#define CDC_EXAMPLE_PID 0x2307
+#define AUDIO_MIC_EXAMPLE_PID 0x2308
+#define EVK11xx_VIRTUAL_COM_PORT_PID 0x2310
+#define AUDIO_SPEAKER_MICRO_EXAMPLE_PID 0x2311
+#define ISP_UC3A_PID 0x2FF8
+#define ISP_UC3A3_PID 0x2FF1
+#define ISP_UC3B_PID 0x2FF6
+
+//! @}
+
+#define USB_ENDPOINT_OUT 0x00
+#define USB_ENDPOINT_IN 0x80
+
+/*! \name Generic definitions (Class, subclass and protocol)
+ */
+//! @{
+#define NO_CLASS 0x00
+#define NO_SUBCLASS 0x00
+#define NO_PROTOCOL 0x00
+//! @}
+
+/*! \name Audio specific definitions (Class, subclass and protocol)
+ */
+//! @{
+#define AUDIO_CLASS 0x01
+#define AUDIOCONTROL_SUBCLASS 0x01
+#define AUDIOSTREAMING_SUBCLASS 0x02
+#define MIDISTREAMING_SUBCLASS 0x03
+//! @}
+
+/*! \name CDC specific definitions (Class, subclass and protocol)
+ */
+//! @{
+#define CDC_COMM_DEVICE_CLASS 0x02
+#define CDC_COMM_CLASS 0x02
+#define CDC_COMM_DIRECT_LINE_CM_SUBCLASS 0x01
+#define CDC_COMM_ABSTRACT_CM_SUBCLASS 0x02
+#define CDC_COMM_TELEPHONE_CM_SUBCLASS 0x03
+#define CDC_COMM_MULTICHANNEL_CM_SUBCLASS 0x04
+#define CDC_COMM_CAPI_CM_SUBCLASS 0x05
+#define CDC_COMM_ETHERNET_NETWORKING_CM_SUBCLASS 0x06
+#define CDC_COMM_ATM_NETWORKING_CM_SUBCLASS 0x07
+#define CDC_COMM_V25ter_PROTOCOL 0x01
+#define CDC_DATA_CLASS 0x0A
+#define CDC_DATA_SUBCLASS 0x00
+#define CDC_DATA_PHYS_ISDN_BRI_PROTOCOL 0x30
+#define CDC_DATA_HDLC_PROTOCOL 0x31
+#define CDC_DATA_TRANSPARENT_PROTOCOL 0x32
+//! @}
+
+/*! \name HID specific definitions (Class, subclass and protocol)
+ */
+//! @{
+#define HID_CLASS 0x03
+#define BOOT_SUBCLASS 0x01
+#define KEYBOARD_PROTOCOL 0x01
+#define MOUSE_PROTOCOL 0x02
+//! @}
+
+/*! \name MS specific definitions (Class, subclass and protocol)
+ */
+//! @{
+#define MS_CLASS 0x08
+#define SFF8020I_MMC2_SUBCLASS 0x02
+#define SFF8070I_SUBCLASS 0x05
+#define SCSI_SUBCLASS 0x06
+#define BULK_PROTOCOL 0x50
+//! @}
+
+/*! \name DFU specific definitions (Class, subclass and protocol)
+ */
+//! @{
+#define APPLICATION_CLASS 0xFE
+#define DFU_SUBCLASS 0x01
+#define RUNTIME_PROTOCOL 0x01
+#define DFU_MODE_PROTOCOL 0x02
+//! @}
+
+/*! \name Others specific definitions (Class, subclass and protocol)
+ */
+//! @{
+#define VENDOR_CLASS 0xFF
+//! @}
+
+ //! \name Requests type (bmRequestTypes)
+ //! @{
+
+ //! \name Data transfer direction
+ //! bit 7,
+ //! 0 = Host to device
+ //! 1 = Device to host
+ //! @{
+#define USB_SETUP_DIR_HOST_TO_DEVICE (0<<7)
+#define USB_SETUP_DIR_DEVICE_TO_HOST (1<<7)
+ //! @}
+
+ //! \name Type
+ //! bit 6 to 5,
+ //! 0 = Standard
+ //! 1 = Class
+ //! 2 = Vendor
+ //! 3 = Reserved
+ //! @{
+#define USB_SETUP_TYPE_STANDARD (0<<5)
+#define USB_SETUP_TYPE_CLASS (1<<5)
+#define USB_SETUP_TYPE_VENDOR (2<<5)
+ //! @}
+
+ //! \name Recipient
+ //! bit 4 to 0,
+ //! 0 = device
+ //! 1 = Interface
+ //! 2 = Endpoint
+ //! 3 = Other
+ //! 4...31 = Reserved
+ //! @{
+#define USB_SETUP_RECIPIENT_DEVICE (0)
+#define USB_SETUP_RECIPIENT_INTERFACE (1)
+#define USB_SETUP_RECIPIENT_ENDPOINT (2)
+#define USB_SETUP_RECIPIENT_OTHER (3)
+ //! @}
+
+ //! \name Request type used by standard setup request
+ //! @{
+#define USB_SETUP_SET_STAND_DEVICE (USB_SETUP_DIR_HOST_TO_DEVICE |USB_SETUP_TYPE_STANDARD |USB_SETUP_RECIPIENT_DEVICE) // 0x00
+#define USB_SETUP_GET_STAND_DEVICE (USB_SETUP_DIR_DEVICE_TO_HOST |USB_SETUP_TYPE_STANDARD |USB_SETUP_RECIPIENT_DEVICE) // 0x80
+#define USB_SETUP_SET_STAND_INTERFACE (USB_SETUP_DIR_HOST_TO_DEVICE |USB_SETUP_TYPE_STANDARD |USB_SETUP_RECIPIENT_INTERFACE) // 0x01
+#define USB_SETUP_GET_STAND_INTERFACE (USB_SETUP_DIR_DEVICE_TO_HOST |USB_SETUP_TYPE_STANDARD |USB_SETUP_RECIPIENT_INTERFACE) // 0x81
+#define USB_SETUP_SET_STAND_ENDPOINT (USB_SETUP_DIR_HOST_TO_DEVICE |USB_SETUP_TYPE_STANDARD |USB_SETUP_RECIPIENT_ENDPOINT) // 0x02
+#define USB_SETUP_GET_STAND_ENDPOINT (USB_SETUP_DIR_DEVICE_TO_HOST |USB_SETUP_TYPE_STANDARD |USB_SETUP_RECIPIENT_ENDPOINT) // 0x82
+ //! @}
+
+ //! \name Request type used by specific setup request from class driver
+ //! @{
+#define USB_SETUP_SET_CLASS_DEVICE (USB_SETUP_DIR_HOST_TO_DEVICE |USB_SETUP_TYPE_CLASS |USB_SETUP_RECIPIENT_DEVICE) // 0x20
+#define USB_SETUP_GET_CLASS_DEVICE (USB_SETUP_DIR_DEVICE_TO_HOST |USB_SETUP_TYPE_CLASS |USB_SETUP_RECIPIENT_DEVICE) // 0xA0
+#define USB_SETUP_SET_CLASS_INTER (USB_SETUP_DIR_HOST_TO_DEVICE |USB_SETUP_TYPE_CLASS |USB_SETUP_RECIPIENT_INTERFACE) // 0x21
+#define USB_SETUP_GET_CLASS_INTER (USB_SETUP_DIR_DEVICE_TO_HOST |USB_SETUP_TYPE_CLASS |USB_SETUP_RECIPIENT_INTERFACE) // 0xA1
+#define USB_SETUP_SET_CLASS_ENDPOINT (USB_SETUP_DIR_HOST_TO_DEVICE |USB_SETUP_TYPE_CLASS |USB_SETUP_RECIPIENT_ENDPOINT) // 0x22
+#define USB_SETUP_GET_CLASS_ENDPOINT (USB_SETUP_DIR_DEVICE_TO_HOST |USB_SETUP_TYPE_CLASS |USB_SETUP_RECIPIENT_ENDPOINT) // 0xA2
+#define USB_SETUP_SET_CLASS_OTHER (USB_SETUP_DIR_HOST_TO_DEVICE |USB_SETUP_TYPE_CLASS |USB_SETUP_RECIPIENT_OTHER) // 0x23
+#define USB_SETUP_GET_CLASS_OTHER (USB_SETUP_DIR_DEVICE_TO_HOST |USB_SETUP_TYPE_CLASS |USB_SETUP_RECIPIENT_OTHER) // 0xA3
+#define USB_SETUP_SET_VENDOR_DEVICE (USB_SETUP_DIR_HOST_TO_DEVICE |USB_SETUP_TYPE_VENDOR |USB_SETUP_RECIPIENT_DEVICE) // 0x40
+#define USB_SETUP_GET_VENDOR_DEVICE (USB_SETUP_DIR_DEVICE_TO_HOST |USB_SETUP_TYPE_VENDOR |USB_SETUP_RECIPIENT_DEVICE) // 0xC0
+ //! @}
+ //! @}
+
+ //! \name Standard Requests (bRequest)
+ //! @{
+#define SETUP_GET_STATUS 0x00
+#define SETUP_GET_DEVICE 0x01
+#define SETUP_CLEAR_FEATURE 0x01
+#define SETUP_GET_STRING 0x03
+#define SETUP_SET_FEATURE 0x03
+#define SETUP_SET_ADDRESS 0x05
+#define SETUP_GET_DESCRIPTOR 0x06
+#define SETUP_SET_DESCRIPTOR 0x07
+#define SETUP_GET_CONFIGURATION 0x08
+#define SETUP_SET_CONFIGURATION 0x09
+#define SETUP_GET_INTERFACE 0x0A
+#define SETUP_SET_INTERFACE 0x0B
+#define SETUP_SYNCH_FRAME 0x0C
+ //! @}
+
+ //! \name Descriptor types used in several setup requests
+ //! @{
+#define DESCRIPTOR_DEVICE 0x01
+#define DESCRIPTOR_CONFIGURATION 0x02
+#define DESCRIPTOR_STRING 0x03
+#define DESCRIPTOR_INTERFACE 0x04
+#define DESCRIPTOR_ENDPOINT 0x05
+#define DESCRIPTOR_DEVICE_QUALIFIER 0x06
+#define DESCRIPTOR_CONF_OTHER_SPEED 0x07
+#define DESCRIPTOR_OTG 0x09
+#define DESCRIPTOR_IAD 0x0B
+ //! @}
+
+ //! \name Feature types for SETUP_X_FEATURE standard request
+ //! @{
+#define FEATURE_DEVICE_REMOTE_WAKEUP 0x01
+#define FEATURE_DEVICE_TEST 0x02
+#define FEATURE_DEVICE_OTG_B_HNP_ENABLE 0x03
+#define FEATURE_DEVICE_OTG_A_HNP_SUPPORT 0x04
+#define FEATURE_DEVICE_OTG_A_ALT_HNP_SUPPORT 0x05
+#define FEATURE_ENDPOINT_HALT 0x00
+ //! @}
+
+ //! \name Feature types for SETUP_X_FEATURE standard test request
+ //! @{
+#define FEATURE_DEVICE_TEST_J 0x01
+#define FEATURE_DEVICE_TEST_K 0x02
+#define FEATURE_DEVICE_TEST_SEO_NAK 0x03
+#define FEATURE_DEVICE_TEST_PACKET 0x04
+#define FEATURE_DEVICE_TEST_FORCE_ENABLE 0x05
+ //! @}
+//! @}
+
+#endif // _USB_IDS_H_
diff --git a/MakefileBasedBuild/app/.gitignore b/MakefileBasedBuild/app/.gitignore
new file mode 100644
index 0000000..76df538
--- /dev/null
+++ b/MakefileBasedBuild/app/.gitignore
@@ -0,0 +1,10 @@
+bin
+obj
+*.a
+*.o
+*.bin
+*.swp
+tags
+TAGS
+cscope.out
+*~
diff --git a/MakefileBasedBuild/app/ADK.c b/MakefileBasedBuild/app/ADK.c
new file mode 100644
index 0000000..cab6fcb
--- /dev/null
+++ b/MakefileBasedBuild/app/ADK.c
@@ -0,0 +1,662 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#define ADK_INTERNAL
+
+#include "fwk.h"
+#include "LEDs.h"
+#include "Audio.h"
+#include "dbg.h"
+#include "coop.h"
+#include "BT.h"
+#include "HCI.h"
+#include "btL2CAP.h"
+#include "btRFCOMM.h"
+#include "btSDP.h"
+#include "btA2DP.h"
+#include "I2C.h"
+#include "hygro.h"
+#include "baro.h"
+#include "capsense.h"
+#include "als.h"
+#include "accel.h"
+#include "hygro.h"
+#include "capsense.h"
+#include "als.h"
+#include "accel.h"
+#include "mag.h"
+#include "f_ff.h"
+#include "simpleOgg.h"
+#include "RTC.h"
+#include "sgBuf.h"
+void eliza(void);
+
+#include "usbh.h"
+#include "ADK.h"
+
+static adkBtConnectionRequestF bt_crF = 0;
+static adkBtLinkKeyRequestF bt_krF = 0;
+static adkBtLinkKeyCreatedF bt_kcF = 0;
+static adkBtPinRequestF bt_prF = 0;
+static adkBtDiscoveryResultF bt_drF = 0;
+static adkBtSspDisplayF bt_pdF = 0;
+static FATFS fs;
+
+static char btLinkKeyRequest(void* userData, const uint8_t* mac, uint8_t* buf){
+
+ if(bt_krF) return bt_krF(mac, buf);
+
+ dbgPrintf("BT Link key request from %02x:%02x:%02x:%02x:%02x:%02x -> denied due to lack of handler", mac[5], mac[4], mac[3], mac[2], mac[1], mac[0]);
+ return 0;
+}
+static uint8_t btPinRequestF(void* userData, const uint8_t* mac, uint8_t* buf){ //fill buff with PIN code, return num bytes used (16 max) return 0 to decline
+
+ if(bt_prF) return bt_prF(mac, buf);
+
+ dbgPrintf("BT PIN request from %02x:%02x:%02x:%02x:%02x:%02x -> '0000' due to lack of handler", mac[5], mac[4], mac[3], mac[2], mac[1], mac[0]);
+
+ buf[0] = buf[1] = buf[2] = buf[3] = '0';
+ return 4;
+}
+
+static void btLinkKeyCreated(void* userData, const uint8_t* mac, const uint8_t* buf){
+
+ if(bt_kcF) bt_kcF(mac, buf);
+}
+
+static char btConnReqF(void* userData, const uint8_t* mac, uint32_t devClass, uint8_t linkType){ //return 1 to accept
+
+ if(bt_crF) return bt_crF(mac, devClass, linkType);
+
+ dbgPrintf("BT connection request: %s connection from %02x:%02x:%02x:%02x:%02x:%02x (class %06X) -> accepted due to lack of handler\n", linkType ? "ACL" : "SCO", mac[5], mac[4], mac[3], mac[2], mac[1], mac[0], devClass);
+ return 1;
+}
+
+static void btConnStartF(void* userData, uint16_t conn, const uint8_t* mac, uint8_t linkType, uint8_t encrMode){
+
+ dbgPrintf("BT %s connection up with handle %d to %02x:%02x:%02x:%02x:%02x:%02x encryption type %d\n",
+ linkType ? "ACL" : "SCO", conn, mac[5], mac[4], mac[3], mac[2], mac[1], mac[0], encrMode);
+ l2capAclLinkUp(conn);
+}
+
+static void btConnEndF(void* userData, uint16_t conn, uint8_t reason){
+
+ dbgPrintf("BT connection with handle %d down for reason %d\n", conn, reason);
+ l2capAclLinkDown(conn);
+}
+
+static void btAclDataRxF(void* userData, uint16_t conn, char first, uint8_t bcastType, const uint8_t* data, uint16_t sz){
+
+ l2capAclLinkDataRx(conn, first, data, sz);
+}
+
+static void btSspShowF(void* userData, const uint8_t* mac, uint32_t val){
+
+ if(val == BT_SSP_DONE_VAL) val = ADK_BT_SSP_DONE_VAL;
+
+ if(bt_pdF) bt_pdF(mac, val);
+}
+
+static char btVerboseScanCbkF(void* userData, BtDiscoveryResult* dr){
+
+ if(bt_drF) return bt_drF(dr->mac, dr->PSRM, dr->PSPM, dr->PSM, dr->co, dr->dc);
+
+ dbgPrintf("BT: no callback for scan makes the scan useless, no?");
+ return 0;
+}
+
+void ADK_adkInit(void){
+
+ //board init
+ fwkInit();
+ coopInit();
+ ledsInit();
+ i2cInit(1, 400000);
+ rtcInit();
+ rtcSet(2012, 3, 28, 19, 8, 50);
+ audioInit();
+ usbh_init();
+
+ //bt init
+ static const BtFuncs myBtFuncs = {NULL, btVerboseScanCbkF, btConnReqF, btConnStartF, btConnEndF, btPinRequestF, btLinkKeyRequest, btLinkKeyCreated, btAclDataRxF, btSspShowF};
+ btInit(&myBtFuncs); //BT UART & HCI driver
+ btSdpRegisterL2capService(); //SDP daemon
+ btRfcommRegisterL2capService(); //RFCOMM framework
+ eliza(); //easter egg
+ btA2dpRegister(); //A2DP profile
+
+
+ uint8_t mac[BT_MAC_SIZE];
+
+ if(btLocalMac(mac)) dbgPrintf("BT MAC: %02X:%02X:%02X:%02X:%02X:%02X\n", mac[5], mac[4], mac[3], mac[2], mac[1], mac[0]);
+
+ //i2c devices init
+ if(!hygroInit()) dbgPrintf("ADK i2c init failure: hygrometer\n");
+ if(!baroInit()) dbgPrintf("ADK i2c init failure: barometer\n");
+ if(!capSenseInit()) dbgPrintf("ADK i2c init failure: capsense\n");
+ if(!alsInit()) dbgPrintf("ADK i2c init failure: ALS\n");
+ if(!accelInit()) dbgPrintf("ADK i2c init failure: accelerometer\n");
+ if(!magInit()) dbgPrintf("ADK i2c init failure: magnetometer\n");
+}
+
+void ADK_adkEventProcess(void){
+ coopYield();
+}
+
+void ADK_getUniqueId(uint32_t* ID){
+
+ cpuGetUniqId(ID);
+}
+
+uint64_t ADK_getUptime(void){ //in ms
+
+ return fwkGetUptime();
+}
+
+void ADK_adkSetPutchar(adkPutcharF f){
+
+ dbgSetPutchar(f);
+}
+
+void ADK_ledWrite(uint8_t led_id, uint8_t r, uint8_t g, uint8_t b){
+
+ ledWrite(led_id, r, g, b);
+}
+
+void ADK_ledDrawIcon(uint8_t offset, uint8_t r, uint8_t g, uint8_t b){
+
+ ledDrawIcon(offset, r, g, b);
+}
+
+void ADK_ledDrawLetter(char letter, uint8_t val, uint8_t r, uint8_t g, uint8_t b){
+
+ ledDrawLetter(letter, val, r, g, b);
+}
+
+void ADK_ledUpdate(void){
+
+ ledUpdate();
+}
+
+void ADK_ledDbgState(char on){
+
+ ledDbgState(on);
+}
+
+void ADK_audioOn(int source, uint32_t samplerate){
+
+ audioOn(source, samplerate);
+}
+
+void ADK_audioOff(int source){
+
+ audioOff(source);
+}
+
+void ADK_audioAddBuffer(int source, const uint16_t* samples, uint32_t numSamples){
+
+ audioAddBuffer(source, samples, numSamples);
+}
+
+int ADK_audioTryAddBuffer(int source, const uint16_t* samples, uint32_t numSamples){
+
+ return audioTryAddBuffer(source, samples, numSamples);
+}
+
+void ADK_btEnable(adkBtConnectionRequestF crF, adkBtLinkKeyRequestF krF, adkBtLinkKeyCreatedF kcF, adkBtPinRequestF prF, adkBtDiscoveryResultF drF){
+
+ bt_crF = crF;
+ bt_krF = krF;
+ bt_kcF = kcF;
+ bt_prF = prF;
+ bt_drF = drF;
+}
+
+void ADK_btSetSspCallback(adkBtSspDisplayF pdF){
+
+ bt_pdF = pdF;
+}
+
+char ADK_btSetLocalName(const char* name){
+
+ return btSetLocalName(name);
+}
+
+char ADK_btGetRemoteName(const uint8_t* mac, uint8_t PSRM, uint8_t PSM, uint16_t co, char* nameBuf){
+
+ return btGetRemoteName(mac, PSRM, PSM, co, nameBuf);
+}
+
+void ADK_btScan(void){
+
+ btScan();
+}
+
+char ADK_btDiscoverable(char on){
+
+ return btDiscoverable(on);
+}
+
+char ADK_btConnectable(char on){
+
+ return btConnectable(on);
+}
+
+char ADK_btSetDeviceClass(uint32_t cls){
+
+ return btSetDeviceClass(cls);
+}
+
+char ADK_hygroRead(int32_t *temp, int32_t *humidity){
+
+ return hygroRead(temp, humidity);
+}
+
+void ADK_baroRead(uint8_t oss, long *kPa, long* decicelcius){
+
+ return baroRead(oss, kPa, decicelcius);
+}
+
+uint8_t ADK_capSenseSlider(void){
+
+ return capSenseSlider();
+}
+
+uint16_t ADK_capSenseButtons(void){
+
+ return capSenseButtons();
+}
+
+uint16_t ADK_capSenseIcons(void){
+
+ return capSenseIcons();
+}
+
+void ADK_capSenseDump(void){
+
+ return capSenseDump();
+}
+
+void ADK_alsRead(uint16_t* prox, uint16_t* clear, uint16_t* R, uint16_t* G, uint16_t* B, uint16_t* IR, uint16_t* temp){
+
+ return alsRead(prox, clear, R, G, B, IR, temp);
+}
+
+void ADK_accelRead(int16_t* x, int16_t* y, int16_t* z){
+
+ accelRead(x, y, z);
+}
+
+void ADK_magRead(int16_t* x, int16_t* y, int16_t* z){
+
+ magRead(x, y, z);
+}
+
+void ADK_playOgg(const char* path){
+
+ playOgg(path);
+}
+
+void ADK_playOggBackground(const char* path, char *complete, char *doAbort) {
+
+ playOggBackground(path, complete, doAbort);
+}
+
+void ADK_setVolume(uint8_t vol){
+
+ setVolume(vol);
+}
+
+uint8_t ADK_getVolume(void){
+
+ return getVolume();
+}
+
+void ADK_rtcGet(uint16_t* yearP, uint8_t* monthP, uint8_t* dayP, uint8_t* hourP, uint8_t* minuteP, uint8_t* secondP){
+
+ rtcGet(yearP, monthP, dayP, hourP, minuteP, secondP);
+}
+
+void ADK_rtcSet(uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second){
+
+ rtcSet(year, month, day, hour, minute, second);
+}
+
+
+char ADK_fatfsMount(void){ // Mount/Unmount a logical drive
+
+ return f_mount (0, &fs);
+}
+
+char ADK_fatfsOpen(struct FatFile** fPP, const char* path, uint8_t mode){ // Open or create a file
+
+ FIL f;
+ FIL* fP;
+ char ret;
+ uint8_t flg = 0;
+
+ if(mode & FATFS_READ) flg |= FA_READ;
+ if(mode & FATFS_WRITE) flg |= FA_WRITE;
+ if(mode & FATFS_CREATE) flg |= FA_CREATE_NEW | FA_OPEN_ALWAYS;
+ if(mode & FATFS_TRUNCATE) flg |= FA_CREATE_ALWAYS | FA_OPEN_ALWAYS;
+
+ ret = f_open(&f, path, flg);
+ if(ret != FR_OK) return ret;
+
+ fP = (FIL*)malloc(sizeof(FIL));
+ if(!fP){
+ f_close(&f);
+ return -1;
+ }
+ *fP = f;
+ *fPP = (struct FatFile*)fP;
+ return FR_OK;
+}
+
+char ADK_fatfsRead(struct FatFile* f, void* buf, uint32_t num, uint32_t* numDone){ // Read data from a file
+
+ return f_read((FIL*)f, buf, num, numDone);
+}
+
+char ADK_fatfsWrite(struct FatFile* f, void* buf, uint32_t num, uint32_t* numDone){ // Write data to a file
+
+ return f_write((FIL*)f, buf, num, numDone);
+}
+
+char ADK_fatfsSeek(struct FatFile* f_, uint8_t whence, int32_t ofst){ // Move file pointer of a file object
+
+ FIL* f = (FIL*)f_;
+ uint32_t pos;
+
+ pos = f->fptr;
+ switch(pos){
+ case FATFS_START: pos = ofst; break;
+ case FATFS_CUR: pos += ofst; break;
+ case FATFS_END: pos = f->fsize + ofst; break;
+ default: return -1;
+ }
+
+ return f_lseek(f, pos);
+}
+
+char ADK_fatfsClose(struct FatFile* f){ // Close an open file object
+
+ char ret;
+
+ ret = f_close((FIL*)f);
+ free(f);
+ return ret;
+}
+
+char ADK_fatfsTruncate(struct FatFile* f){ // Truncate file
+
+ return f_truncate((FIL*)f);
+}
+
+char ADK_fatfsSync(struct FatFile* f){ // Flush cached data of a writing file
+
+ return f_sync((FIL*)f);
+}
+
+char ADK_fatfsOpenDir(struct FatDir** dPP, const char* path){ // Open an existing directory
+
+ DIR d;
+ DIR* dP;
+ char ret;
+
+ ret = f_opendir(&d, path);
+ if(ret != FR_OK) return ret;
+
+ dP = (DIR*)malloc(sizeof(DIR));
+ if(!dP) return -1;
+
+ *dP = d;
+ *dPP = (struct FatDir*)dP;
+ return FR_OK;
+}
+
+static void fatfsfileInfoToFileInfo(FILINFO* fat, FatFileInfo* fatfs, char before){
+
+ if(before){
+ fat->lfname = fatfs->longName;
+ fat->lfsize = fatfs->nameSz;
+ }
+ else{
+ int i;
+
+ fatfs->longName = fat->lfname;
+ fatfs->nameSz = fat->lfsize;
+ fatfs->fsize = fat->fsize;
+ fatfs->attrib = fat->fattrib;
+ for(i = 0 ;i < 13; i++) fatfs->name[i] = fat->fname[i];
+ }
+}
+
+char ADK_fatfsReadDir(struct FatDir* d, FatFileInfo* i){ // Read a directory item
+
+ FILINFO fi;
+ char ret;
+
+ fatfsfileInfoToFileInfo(&fi, i, 1);
+ ret = f_readdir((DIR*)d, &fi);
+ if(ret == FR_OK) fatfsfileInfoToFileInfo(&fi, i, 0);
+ return ret;
+}
+
+char ADK_fatfsCloseDir(struct FatDir* d){ // Close a directory
+
+ free(d);
+}
+
+char ADK_fatfsStat(const char* path, FatFileInfo* i){ // Get file status
+
+ FILINFO fi;
+ char ret;
+
+ fatfsfileInfoToFileInfo(&fi, i, 1);
+ ret = f_stat(path, &fi);
+ fatfsfileInfoToFileInfo(&fi, i, 0);
+ return ret;
+}
+
+char ADK_fatfsGetFree(const char* path, uint64_t* freeSize){ // Get number of free space on the drive
+
+ char ret;
+ DWORD clus;
+ FATFS* fsP = &fs;
+
+ ret = f_getfree("/", &clus, &fsP);
+ if(freeSize) *freeSize = ((uint64_t)clus * (uint64_t)fs.csize) << 9;
+ return ret;
+}
+
+char ADK_fatfsUnlink(const char* path){ // Delete an existing file or directory
+
+ return f_unlink(path);
+}
+
+char ADK_fatfsMkdir(const char* path){ // Create a new directory
+
+ return f_mkdir(path);
+}
+
+char ADK_fatfsChmod(const char* path, uint8_t val, uint8_t mask){ // Change attributes of the file/dir
+
+ return f_chmod(path, val, mask);
+}
+
+char ADK_fatfsRename(const char* path, const char* newPath){ // Rename/Move a file or directory
+
+ return f_rename(path, newPath);
+}
+
+char ADK_fatfsMkfs(void){ // Create a file system on the drive
+
+ return f_mkfs(0, 0, 0);
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+void ADK_l2capServiceTx(uint16_t conn, uint16_t remChan, const uint8_t* data, uint32_t size){ //send data over L2CAP
+
+ sg_buf* buf = sg_alloc();
+
+ if(!buf) return;
+ if(sg_add_back(buf, data, size, SG_FLAG_MAKE_A_COPY)) l2capServiceTx(conn, remChan, buf);
+ else sg_free(buf);
+}
+
+void ADK_l2capServiceCloseConn(uint16_t conn, uint16_t chan){
+
+ l2capServiceCloseConn(conn, chan);
+}
+
+char ADK_l2capServiceRegister(uint16_t PSM, const L2capService* svcData){
+
+ return l2capServiceRegister(PSM, svcData);
+}
+
+char ADK_l2capServiceUnregister(uint16_t PSM){
+
+ return l2capServiceUnregister(PSM);
+}
+
+void ADK_btSdpServiceDescriptorAdd(const uint8_t* descriptor, uint16_t descrLen){
+
+ btSdpServiceDescriptorAdd(descriptor, descrLen);
+}
+
+void ADK_btSdpServiceDescriptorDel(const uint8_t* descriptor){
+
+ btSdpServiceDescriptorDel(descriptor);
+}
+
+void ADK_btRfcommRegisterPort(uint8_t dlci, BtRfcommPortOpenF oF, BtRfcommPortCloseF cF, BtRfcommPortRxF rF){
+
+ btRfcommRegisterPort(dlci, oF, cF, rF);
+}
+
+void ADK_btRfcommPortTx(void* port, uint8_t dlci, const uint8_t* data, uint16_t size){
+
+ btRfcommPortTx(port, dlci, data, size);
+}
+
+uint8_t ADK_btRfcommReserveDlci(uint8_t preference){
+
+ return btRfcommReserveDlci(preference);
+}
+
+void ADK_btRfcommReleaseDlci(uint8_t dlci){
+
+ btRfcommReleaseDlci(dlci);
+}
+
+// USB
+void ADK_usbStart()
+{
+ usbh_start();
+}
+
+void ADK_usbSetAccessoryStringVendor(const char *str)
+{
+ usbh_set_accessory_string_vendor(str);
+}
+
+void ADK_usbSetAccessoryStringName(const char *str)
+{
+ usbh_set_accessory_string_name(str);
+}
+
+void ADK_usbSetAccessoryStringLongname(const char *str)
+{
+ usbh_set_accessory_string_longname(str);
+}
+
+void ADK_usbSetAccessoryStringVersion(const char *str)
+{
+ usbh_set_accessory_string_version(str);
+}
+
+void ADK_usbSetAccessoryStringUrl(const char *str)
+{
+ usbh_set_accessory_string_url(str);
+}
+
+void ADK_usbSetAccessoryStringSerial(const char *str)
+{
+ usbh_set_accessory_string_serial(str);
+}
+
+int ADK_accessoryConnected()
+{
+ return usbh_accessory_connected();
+}
+
+int ADK_accessorySend(const void *buf, unsigned int len)
+{
+ return accessory_send(buf, len);
+}
+
+int ADK_accessoryReceive(void *buf, unsigned int len)
+{
+ return accessory_receive(buf, len);
+}
+
+void logHardFault(unsigned long* auto_pushed, unsigned long* self_pushed); //must be global....
+void logHardFault(unsigned long* auto_pushed, unsigned long* self_pushed)
+{
+ unsigned long r[16], sr;
+ int i;
+
+ for(i = 0; i < 4; i++) r[i] = auto_pushed[i];
+ r[12] = auto_pushed[4];
+ r[13] = ((unsigned long)auto_pushed) - 32;
+ r[14] = auto_pushed[5];
+ r[15] = auto_pushed[6];
+ sr = auto_pushed[7];
+
+ for(i = 4; i < 11; i++) r[i] = self_pushed[i - 4];
+
+ dbgPrintf ("\n\n[Cortex-M3 HARD FAULT]\n");
+ for(i = 0 ;i < 16; i++) dbgPrintf ("R%2d = 0x%08X\n", i, r[i]);
+ dbgPrintf ("SR = 0x%08X\n", sr);
+ while (1);
+}
+
+void __attribute__((naked)) HardFault_Handler(){
+ asm(
+ "tst lr, #4 \n\t"
+ "ite eq \n\t"
+ "mrseq r0, msp \n\t"
+ "mrsne r0, psp \n\t"
+ "push {r4-r11} \n\t"
+ "mov r1, sp \n\t"
+ "B logHardFault \n\t"
+ );
+}
+
+
diff --git a/MakefileBasedBuild/app/ADK.h b/MakefileBasedBuild/app/ADK.h
new file mode 100644
index 0000000..b643f76
--- /dev/null
+++ b/MakefileBasedBuild/app/ADK.h
@@ -0,0 +1,217 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef _ADK_H_
+#define _ADK_H_
+
+#include <stdint.h>
+#include "btL2CAP.h"
+#include "btSDP.h"
+#include "btRFCOMM.h"
+
+#define NUM_LEDS 64
+#define NUM_DIGITS 6
+#define NUM_ICONS 8
+
+#define DMA_CHANNEL_LEDS 0 //we use channel 0. you want it? sucks to be you! get an IDE that supports a reasonable build system!
+
+typedef void (*adkPutcharF)(char c);
+
+typedef char (*adkBtConnectionRequestF)(const uint8_t* mac, uint32_t devClass, uint8_t linkType); //return 1 to accept
+typedef char (*adkBtLinkKeyRequestF)(const uint8_t* mac, uint8_t* buf); //retrieve link key, fill buffer with it, return 1. if no key -> return 0
+typedef void (*adkBtLinkKeyCreatedF)(const uint8_t* mac, const uint8_t* buf); //link key was just created, save it if you want it later
+typedef char (*adkBtPinRequestF)(const uint8_t* mac, uint8_t* buf); //fill buff with PIN code, return num bytes used (16 max) return 0 to decline
+typedef char (*adkBtDiscoveryResultF)(const uint8_t* mac, uint8_t PSRM, uint8_t PSPM, uint8_t PSM, uint16_t CO, uint32_t devClass); //return 0 to stop scan immediately
+typedef void (*adkBtSspDisplayF)(const uint8_t* mac, uint32_t val);
+
+#define ADK_BT_SSP_DONE_VAL 0x0FF00000
+
+#define BLUETOOTH_MAC_SIZE 6 //bytes
+#define BLUETOOTH_LINK_KEY_SIZE 16 //bytes
+#define BLUETOOTH_MAX_PIN_SIZE 16 //bytes
+#define BLUETOOTH_MAX_NAME_LEN 248 //bytes
+#define ADK_UNIQUE_ID_LEN 4 //4 32-bit values
+
+/* keep in sync with Audio.h */
+#define AUDIO_NULL 0
+#define AUDIO_USB 1
+#define AUDIO_BT 2
+#define AUDIO_ALARM 3
+
+#define AUDIO_MAX_SOURCE 3
+
+/* --- structure(s) and types reference ---
+
+typedef struct{
+
+ uint8_t flags;
+
+ void* (*serviceInstanceAllocate)(uint16_t conn, uint16_t chan, uint16_t remChan);
+ void (*serviceInstanceFree)(void* service);
+
+ void (*serviceRx)(void* service, const uint8_t* data, uint16_t size);
+
+}L2capService;
+
+
+typedef void (*BtRfcommPortOpenF)(void* port, uint8_t dlci);
+typedef void (*BtRfcommPortCloseF)(void* port, uint8_t dlci);
+typedef void (*BtRfcommPortRxF)(void* port, uint8_t dlci, const uint8_t* buf, uint16_t sz);
+
+
+*/
+
+struct FatFile;
+struct FatDir;
+typedef struct FatFile* FatFileP;
+typedef struct FatDir* FatDirP;
+#define FATFS_READ 1
+#define FATFS_WRITE 2
+#define FATFS_CREATE 4
+#define FATFS_TRUNCATE 8
+
+#define FATFS_START 0
+#define FATFS_CUR 1
+#define FATFS_END 2
+
+typedef struct{
+
+ uint32_t fsize;
+ uint8_t attrib;
+ char name[13]; //short name
+ char* longName; //you make this point somewhere
+ uint32_t nameSz;
+
+}FatFileInfo;
+
+
+
+ //generic
+ void ADK_adkInit(void);
+ void ADK_adkSetPutchar(adkPutcharF f);
+ void ADK_adkEventProcess(void); //call this often
+ void ADK_getUniqueId(uint32_t* id);
+ uint64_t ADK_getUptime(void); //in ms
+
+ //LEDS
+ //raw LED write
+ void ADK_ledWrite(uint8_t led_id, uint8_t r, uint8_t g, uint8_t b);
+ //draw an icon
+ void ADK_ledDrawIcon(uint8_t icon, uint8_t r, uint8_t g, uint8_t b);
+ //draw a letter
+ void ADK_ledDrawLetter(char letter, uint8_t val, uint8_t r, uint8_t g, uint8_t b);
+ //flush the backbuffer to the display (call often)
+ void ADK_ledUpdate(void);
+ //on-board debug led
+ void ADK_ledDbgState(char on);
+
+ //RAW Audio
+ void ADK_audioOn(int source, uint32_t samplerate);
+ void ADK_audioOff(int source);
+ void ADK_audioAddBuffer(int source, const uint16_t* samples, uint32_t numSamples); //if buffers full, will block until they arent...
+ int ADK_audioTryAddBuffer(int source, const uint16_t* samples, uint32_t numSamples); //0 if failed
+
+ //OGG Audio
+ void ADK_playOgg(const char* path);
+ void ADK_playOggBackground(const char* path, char *complete, char *abort);
+ void ADK_setVolume(uint8_t vol);
+ uint8_t ADK_getVolume(void);
+
+ //BT
+ void ADK_btEnable(adkBtConnectionRequestF crF, adkBtLinkKeyRequestF krF, adkBtLinkKeyCreatedF kcF, adkBtPinRequestF prF, adkBtDiscoveryResultF drF);
+ char ADK_btSetLocalName(const char* name);
+ char ADK_btGetRemoteName(const uint8_t* mac, uint8_t PSRM, uint8_t PSM, uint16_t co, char* nameBuf);
+ void ADK_btScan(void);
+ char ADK_btDiscoverable(char on);
+ char ADK_btConnectable(char on);
+ char ADK_btSetDeviceClass(uint32_t cls);
+
+ //advanced BT
+ //ACL
+ void ADK_l2capServiceTx(uint16_t conn, uint16_t remChan, const uint8_t* data, uint32_t size); //send data over L2CAP
+ void ADK_l2capServiceCloseConn(uint16_t conn, uint16_t chan);
+ char ADK_l2capServiceRegister(uint16_t PSM, const L2capService* svcData);
+ char ADK_l2capServiceUnregister(uint16_t PSM);
+
+ //SDP
+ void ADK_btSdpServiceDescriptorAdd(const uint8_t* descriptor, uint16_t descrLen); //a copy will NOT be made do not include handle
+ void ADK_btSdpServiceDescriptorDel(const uint8_t* descriptor);
+
+ //RFCOMM
+ void ADK_btRfcommRegisterPort(uint8_t dlci, BtRfcommPortOpenF oF, BtRfcommPortCloseF cF, BtRfcommPortRxF rF);
+ void ADK_btRfcommPortTx(void* port, uint8_t dlci, const uint8_t* data, uint16_t size); //makes a copy of your buffer
+ uint8_t ADK_btRfcommReserveDlci(uint8_t preference); //return dlci if success, zero if fail
+ void ADK_btRfcommReleaseDlci(uint8_t dlci);
+
+ //SSP
+ void ADK_btSetSspCallback(adkBtSspDisplayF pdF);
+
+
+ //Sensors
+ char ADK_hygroRead(int32_t *temp, int32_t *humidity); //return 0 on failure
+ void ADK_baroRead(uint8_t oss, long* kPa, long* decicelcius);
+ uint8_t ADK_capSenseSlider(void);
+ uint16_t ADK_capSenseButtons(void);
+ uint16_t ADK_capSenseIcons(void);
+ void ADK_capSenseDump(void);
+ void ADK_alsRead(uint16_t* prox, uint16_t* clear, uint16_t* R, uint16_t* G, uint16_t* B, uint16_t* IR, uint16_t* temp);
+ void ADK_accelRead(int16_t* x, int16_t* y, int16_t* z);
+ void ADK_magRead(int16_t* x, int16_t* y, int16_t* z);
+
+ //RTC
+ void ADK_rtcGet(uint16_t* yearP, uint8_t* monthP, uint8_t* dayP, uint8_t* hourP, uint8_t* minuteP, uint8_t* secondP);
+ void ADK_rtcSet(uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second);
+
+ //FATFS (retrn 0 on success)
+ char ADK_fatfsMount(void); // Mount/Unmount a logical drive
+ char ADK_fatfsOpen(struct FatFile**, const char* path, uint8_t mode); // Open or create a file
+ char ADK_fatfsRead(struct FatFile*, void* buf, uint32_t num, uint32_t* numDone); // Read data from a file
+ char ADK_fatfsWrite(struct FatFile*, void* buf, uint32_t num, uint32_t* numDone); // Write data to a file
+ char ADK_fatfsSeek(struct FatFile*, uint8_t whence, int32_t pos); // Move file pointer of a file object
+ char ADK_fatfsClose(struct FatFile*); // Close an open file object
+ char ADK_fatfsTruncate(struct FatFile*); // Truncate file
+ char ADK_fatfsSync(struct FatFile*); // Flush cached data of a writing file
+
+ char ADK_fatfsOpenDir(struct FatDir**, const char* path); // Open an existing directory
+ char ADK_fatfsReadDir(struct FatDir*, FatFileInfo*); // Read a directory item
+ char ADK_fatfsCloseDir(struct FatDir*); // Close a directory
+
+ char ADK_fatfsStat(const char* path, FatFileInfo*); // Get file status
+ char ADK_fatfsGetFree(const char* path, uint64_t* freeSize); // Get number of free space on the drive
+ char ADK_fatfsUnlink(const char* path); // Delete an existing file or directory
+ char ADK_fatfsMkdir(const char* path); // Create a new directory
+ char ADK_fatfsChmod(const char* path, uint8_t val, uint8_t mask); // Change attributes of the file/dir
+ char ADK_fatfsRename(const char* path, const char* newPath); // Rename/Move a file or directory
+ char ADK_fatfsMkfs(void); // Create a file system on the drive
+
+ //USB
+ void ADK_usbStart(void);
+ void ADK_usbSetAccessoryStringVendor(const char *str);
+ void ADK_usbSetAccessoryStringName(const char *str);
+ void ADK_usbSetAccessoryStringLongname(const char *str);
+ void ADK_usbSetAccessoryStringVersion(const char *str);
+ void ADK_usbSetAccessoryStringUrl(const char *str);
+ void ADK_usbSetAccessoryStringSerial(const char *str);
+
+ //USB accessory
+ int ADK_accessoryConnected(void);
+ int ADK_accessorySend(const void *buf, unsigned int len);
+ int ADK_accessoryReceive(void *buf, unsigned int len);
+
+
+
+#endif
+
+
diff --git a/MakefileBasedBuild/app/Audio.c b/MakefileBasedBuild/app/Audio.c
new file mode 100644
index 0000000..062efac
--- /dev/null
+++ b/MakefileBasedBuild/app/Audio.c
@@ -0,0 +1,114 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#define ADK_INTERNAL
+#include "fwk.h"
+#include "Audio.h"
+#include "coop.h"
+
+#define DEFAULT_AUDIO_SAMPLERATE 44100
+
+static uint32_t sampleRates[AUDIO_MAX_SOURCE];
+static uint32_t audioActive; // bitmap of active audio sources
+
+static int highestPriAudio(void)
+{
+ int i;
+
+ if (audioActive == 0)
+ return -1;
+
+ return (31 - __builtin_clz(audioActive));
+}
+
+void audioInit(void)
+{
+ PMC_EnablePeripheral(ID_PWM);
+ PWMC_ConfigureClocks(0, 0, BOARD_MCK);
+ PWMC_ConfigureChannel(PWM, 0, PWM_CMR_CPRE_MCK, 0, 0);
+ PWMC_ConfigureEventLineMode(PWM, 0, 1);
+
+ audioSetSample(AUDIO_NULL, DEFAULT_AUDIO_SAMPLERATE);
+
+ PWMC_EnableChannel(PWM, 0);
+ PMC_EnablePeripheral(ID_DACC);
+ DACC_Initialize(DACC, ID_DACC, 1, 4, 0, 0, BOARD_MCK, 8, DACC_CHANNEL_0, 0, 16 );
+ DACC_EnableChannel(DACC, DACC_CHANNEL_0);
+}
+
+void audioOn(int source, uint32_t samplerate)
+{
+ audioActive |= (1 << source);
+
+ audioSetSample(source, samplerate);
+}
+
+void audioOff(int source)
+{
+ int resetsample = 0;
+ if (source == highestPriAudio())
+ resetsample = 1;
+
+ audioActive &= ~(1 << source);
+
+ // switch to the new highest priority audio's sample rate
+ int highest = highestPriAudio();
+ if (resetsample && highest >= 0) {
+ audioSetSample(highest, sampleRates[highest]);
+ }
+}
+
+void audioSetSample(int source, uint32_t samplerate)
+{
+ sampleRates[source] = samplerate;
+
+ // if we're not the highest priority audio source, dont set it
+ if (source != highestPriAudio())
+ return;
+
+ samplerate = (BOARD_MCK + samplerate - 1) / samplerate; //err on the side of slower audio
+
+ PWMC_SetPeriod(PWM, 0, samplerate);
+ PWMC_ConfigureComparisonUnit(PWM, 0, (samplerate + 1) >> 1, 1);
+}
+
+void audioAddBuffer(int source, const uint16_t* samples, uint32_t numSamples)
+{
+ // see if we're the highest priority audio, drop on the floor if we're not
+ if (source != highestPriAudio())
+ return;
+
+ while(!DACC_WriteBuffer(DACC, samples, numSamples)) coopYield();
+}
+
+int audioTryAddBuffer(int source, const uint16_t* samples, uint32_t numSamples)
+{
+ // see if we're the highest priority audio, drop on the floor if we're not
+ if (source != highestPriAudio())
+ return 1; // pretend we queued
+
+ int first_free = (DACC->DACC_TCR == 0) && (DACC->DACC_TNCR == 0);
+
+ uint32_t res = DACC_WriteBuffer(DACC, samples, numSamples);
+
+ if (!res)
+ return 0;
+
+ if (first_free)
+ return 1;
+ else
+ return DACC->DACC_TCR;
+}
+
diff --git a/MakefileBasedBuild/app/Audio.h b/MakefileBasedBuild/app/Audio.h
new file mode 100644
index 0000000..6fe6c51
--- /dev/null
+++ b/MakefileBasedBuild/app/Audio.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifdef ADK_INTERNAL
+#ifndef _AUDIO_H_
+#define _AUDIO_H_
+
+#define AUDIO_NULL 0
+#define AUDIO_USB 1
+#define AUDIO_BT 2
+#define AUDIO_ALARM 3
+
+#define AUDIO_MAX_SOURCE 4
+
+void audioInit(void);
+void audioOn(int source, uint32_t samplerate);
+void audioOff(int source);
+void audioSetSample(int source, uint32_t samplerate);
+
+void audioAddBuffer(int source, const uint16_t* samples, uint32_t numSamples); //if buffers full, will block until they arent...
+int audioTryAddBuffer(int source, const uint16_t* samples, uint32_t numSamples); //0 if failed, positive number of existing queued samples
+
+#define AUDIO_BITS 12
+
+
+
+#endif
+#endif
+
diff --git a/MakefileBasedBuild/app/BT.c b/MakefileBasedBuild/app/BT.c
new file mode 100644
index 0000000..bddbfcc
--- /dev/null
+++ b/MakefileBasedBuild/app/BT.c
@@ -0,0 +1,1742 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#define ADK_INTERNAL
+#include "fwk.h"
+#include "BT.h"
+#include "HCI.h"
+#include "dbg.h"
+#include "coop.h"
+#include "sgBuf.h"
+
+#define BT_VERBOSE 0
+
+#define PACKET_RX_BACKLOG_SZ 4
+
+extern const uint8_t cc256x_init_script[];
+
+static uint8_t* backlog[PACKET_RX_BACKLOG_SZ] = {0, };
+static uint8_t btThreadDie;
+static BtFuncs cbks;
+
+#define RESET PORTA(0)
+#define TX PORTA(10)
+#define RX PORTA(11)
+#define RTS PORTB(25)
+#define CTS PORTB(26)
+
+
+static uint32_t packetStore[(BT_RX_BUF_SZ + 3) >> 2];
+static uint8_t* packet = (uint8_t*)packetStore;
+static uint8_t pageState;
+static uint16_t gAclPacketsCanSend = 0;
+
+typedef struct BtEnqueuedNode{
+
+ struct BtEnqueuedNode* next;
+
+ sg_buf* buf;
+ uint16_t conn;
+ char first;
+ uint8_t bcastType
+
+}BtEnqueuedNode;
+
+BtEnqueuedNode* enqueuedPackets = NULL;
+
+static char btDiscoverableConnectable(void);
+
+static void initBtUart(char initial){
+
+ uint32_t speed = initial ? 115200 : BT_BAUDRATE;
+ if(initial){
+
+ PMC_EnablePeripheral(ID_USART0);
+
+ gpioSetFun(RESET, GPIO_FUNC_GPIO);
+ gpioSetDir(RESET, 0);
+ gpioSetVal(RESET, 0);
+
+ gpioSetFun(RX, GPIO_FUNC_A);
+ gpioSetFun(TX, GPIO_FUNC_A);
+ gpioSetFun(RTS, GPIO_FUNC_A);
+ gpioSetFun(CTS, GPIO_FUNC_A);
+ }
+ USART0->US_CR = US_CR_RSTRX | US_CR_RSTTX | US_CR_RXDIS | US_CR_TXDIS;
+ USART0->US_MR = US_MR_USART_MODE_HW_HANDSHAKING | US_MR_USCLKS_MCK | US_MR_CHRL_8_BIT | US_MR_PAR_NO | US_MR_NBSTOP_1_BIT | US_MR_CHMODE_NORMAL;
+ USART0->US_BRGR = (BOARD_MCK >> 4) / speed;
+ USART0->US_CR = US_CR_RSTRX | US_CR_RSTTX | US_CR_TXDIS | US_CR_RXDIS | US_CR_RSTSTA | US_CR_RTSEN;
+ USART0->US_CR = US_CR_TXEN;
+ USART0->US_CR = US_CR_RXEN;
+}
+
+static void btUartSend(const uint8_t* buf, uint32_t sz){
+
+ while (sz--){
+ while (!(USART0->US_CSR & US_CSR_TXRDY));
+ USART0->US_THR = *buf++;
+ }
+}
+
+static void btUartRecv(uint8_t* buf, uint32_t num){ //recv..hang until we have what we wanted
+
+ USART0->US_RPR = (uint32_t)buf;
+ USART0->US_RCR = num;
+ USART0->US_PTCR = US_PTCR_RXTEN;
+ while(USART0->US_RCR) coopYield();
+}
+
+static uint8_t* hciCmdPacketStart(uint16_t ogf, uint16_t ocf){ //start a packet in "packet", return "state" pointer
+
+ HCI_Cmd* cmd = (HCI_Cmd*)packetStore;
+
+ cmd->opcode = HCI_OPCODE(ogf, ocf);
+ return packet + 3;
+}
+
+static uint8_t* hciCmdPacketAddU32(uint8_t* state, uint32_t val){ //add a uint32 to packet, update state
+
+ *state++ = val;
+ *state++ = val >> 8;
+ *state++ = val >> 16;
+ *state++ = val >> 24;
+
+ return state;
+}
+
+static uint8_t* hciCmdPacketAddU24(uint8_t* state, uint32_t val){ //add a uint24 to packet, update state
+
+ *state++ = val;
+ *state++ = val >> 8;
+ *state++ = val >> 16;
+
+ return state;
+}
+
+static uint8_t* hciCmdPacketAddU16(uint8_t* state, uint16_t val){ //add a uint32 to packet, update state
+
+ *state++ = val;
+ *state++ = val >> 8;
+
+ return state;
+}
+
+static uint8_t* hciCmdPacketAddU8(uint8_t* state, uint8_t val){ //add a uint32 to packet, update state
+
+ *state++ = val;
+
+ return state;
+}
+
+static uint32_t hciCmdPacketFinish(uint8_t* state){ //finish, return size to send
+
+ HCI_Cmd* cmd = (HCI_Cmd*)packetStore;
+ uint32_t paramLen = state - packet - 3;
+
+ cmd->totalParamLen = paramLen;
+ return paramLen + 3;
+}
+
+static void btTxCmdPacketEx(const HCI_Cmd* cmd){
+
+ uint8_t typ = UART_PKT_TYP_CMD;
+
+ btUartSend(&typ, 1);
+ btUartSend((uint8_t*)cmd, 3 + cmd->totalParamLen); //cannot use sizeof thanks to gcc
+}
+
+static void btTxCmdPacket(void){
+
+ btTxCmdPacketEx((HCI_Cmd*)packetStore);
+}
+
+static void btAclDataTxBuf(uint16_t conn, char first, uint8_t bcastType, const uint8_t* data, uint16_t sz){
+
+ uint8_t typ = UART_PKT_TYP_ACL;
+ HCI_ACL_Data* acl = (HCI_ACL_Data*)packetStore;
+ acl->info = conn | (first ? 0x2000 : 0x1000) | ((uint32_t)bcastType) << 14;
+ acl->totalDataLen = sz;
+
+ btUartSend(&typ, 1);
+ btUartSend((uint8_t*)acl, 4);
+ btUartSend(data, sz);
+}
+
+static void btAclDoDataTx(uint16_t conn, char first, uint8_t bcastType, sg_buf* buf){
+
+ sg_iter iter;
+ uint8_t typ = UART_PKT_TYP_ACL;
+ HCI_ACL_Data* acl = (HCI_ACL_Data*)packetStore;
+ const uint8_t* data;
+ uint32_t len;
+
+ gAclPacketsCanSend --;
+ acl->info = conn | (first ? 0x2000 : 0x1000) | ((uint32_t)bcastType) << 14;
+ acl->totalDataLen = sg_length(buf);
+
+ btUartSend(&typ, 1);
+ btUartSend((uint8_t*)acl, 4);
+ iter = sg_iter_start(buf);
+ while(sg_iter_next(&iter, &data, &len)) btUartSend(data, len);
+
+ sg_free(buf);
+ free(buf);
+}
+
+void btAclDataTx(uint16_t conn, char first, uint8_t bcastType, sg_buf* buf){
+
+ if(gAclPacketsCanSend){
+
+ btAclDoDataTx(conn, first, bcastType, buf);
+ }
+ else{
+
+ BtEnqueuedNode *q = enqueuedPackets, *n = malloc(sizeof(BtEnqueuedNode));
+ if(!n){
+
+ //packet dropped due to lack of memory...sorry
+ sg_free(buf);
+ free(buf);
+ return;
+ }
+ n->buf = buf;
+ n->conn = conn;
+ n->first = first;
+ n->bcastType = bcastType;
+ n->next = NULL;
+
+ while(q && q->next) q = q->next;
+ if(q) q->next = n;
+ else enqueuedPackets = n;
+ }
+}
+
+static void btEnqueuePacket(uint8_t typ){ //we got a packet but it's not for us - enqueue it for someone else to use
+
+ uint8_t* copy;
+ unsigned sz, i;
+
+ switch(typ){
+ case UART_PKT_TYP_ACL:
+ sz = ((HCI_ACL_Data*)packetStore)->totalDataLen + 4L;
+ break;
+
+ case UART_PKT_TYP_SCO:
+ sz = ((HCI_SCO_Data*)packetStore)->totalDataLen + 3L;
+ break;
+
+ case UART_PKT_TYP_EVT:
+ sz = ((HCI_Event*)packetStore)->totalParamLen + 2L;
+ break;
+
+ default:
+ //no idea what it is...drop it on the floor
+ return;
+ }
+
+ copy = malloc(sz + 1);
+ if(!copy) return; //cannot alloc -> fail
+
+ copy[0] = typ;
+ for(i = 0; i < sz; i++) copy[i + 1] = packet[i];
+ for(i = 0; i < PACKET_RX_BACKLOG_SZ; i++) if(!backlog[i]) break;
+ if(i == PACKET_RX_BACKLOG_SZ){ //we have to drop something
+
+ #if BT_VERBOSE
+
+ dbgPrintf("BT: dropping backlog item: %d, 0x%x\n", backlog[0][0], backlog[0][1]);
+
+ #endif
+ free(backlog[0]);
+ for(i = 0; i < PACKET_RX_BACKLOG_SZ - 1; i++) backlog[i] = backlog[i + 1];
+ }
+ backlog[i] = copy;
+}
+
+static uint8_t btRxPacket(void){ //return type
+
+ uint8_t typ;
+ uint8_t* dst;
+ unsigned sz;
+
+ btUartRecv(&typ, 1); //get H4 packet type
+ switch(typ){
+ case UART_PKT_TYP_ACL:
+ sz = 4L;
+ break;
+
+ case UART_PKT_TYP_SCO:
+ sz = 3L;
+ break;
+
+ case UART_PKT_TYP_EVT:
+ sz = 2L;
+ break;
+
+ default:
+ //no idea what it is...drop it on the floor
+ return 0;
+ }
+
+ dst = packet + sz;
+ btUartRecv(packet, sz);
+
+ switch(typ){
+ case UART_PKT_TYP_ACL:
+ sz = ((HCI_ACL_Data*)packetStore)->totalDataLen;
+ break;
+
+ case UART_PKT_TYP_SCO:
+ sz = ((HCI_SCO_Data*)packetStore)->totalDataLen;
+ break;
+
+ case UART_PKT_TYP_EVT:
+ sz = ((HCI_Event*)packetStore)->totalParamLen;
+ break;
+
+ default:
+ //no idea what it is...drop it on the floor
+ return 0;
+ }
+
+ if(dst + sz > packet + BT_RX_BUF_SZ){
+
+ dbgPrintf("BT: Incoming packet too big. Dropping\n");
+ while(sz--) btUartRecv(dst, 1);
+ return 0;
+ }
+ else btUartRecv(dst, sz);
+
+ #if BT_VERBOSE
+ {
+ uint8_t *start = packet, *end = dst + sz;
+
+ dbgPrintf("RX: %02X", typ);
+ while(start < end) dbgPrintf(" %02X", *start++);
+ dbgPrintf("\n");
+ }
+ #endif
+
+ return typ;
+}
+
+static void btTaskF(void* ptr){
+
+ HCI_Event* e = (HCI_Event*)packetStore;
+ HCI_ACL_Data* acl = (HCI_ACL_Data*)packetStore;
+ uint8_t* packetState;
+ uint16_t conn;
+ uint8_t mac[6];
+ uint8_t buf[16];
+ unsigned i, j;
+
+
+ while(!btThreadDie){
+
+ uint8_t typ;
+
+ if((typ = btRxPacket())){
+
+ if(typ == UART_PKT_TYP_ACL){
+
+ cbks.BtAclDataRxF(cbks.userData, acl->info & 0x0FFF, ((acl->info >> 12) & 3) == 2, acl->info >> 14, acl->data, acl->totalDataLen);
+ }
+ else if(typ == UART_PKT_TYP_EVT && e->eventCode == HCI_EVT_Connection_Request_Event){
+
+ uint32_t dc = e->params[6] + (((uint32_t)e->params[7]) << 8) + (((uint32_t)e->params[8]) << 16);
+
+ for(i = 0; i < sizeof(mac); i++) mac[i] = e->params[i];
+
+ if(cbks.BtConnReqF(cbks.userData, mac, dc, e->params[9])){ //accept it
+
+ packetState = hciCmdPacketStart(HCI_OGF_Link_Control, HCI_CMD_Accept_Connection_Request);
+ i = 1;
+ }
+ else{ //reject it
+
+ packetState = hciCmdPacketStart(HCI_OGF_Link_Control, HCI_CMD_Reject_Connection_Request);
+ i = 0x0F; //rejected...
+ }
+ packetState = hciCmdPacketAddU8(packetState, mac[0]);
+ packetState = hciCmdPacketAddU8(packetState, mac[1]);
+ packetState = hciCmdPacketAddU8(packetState, mac[2]);
+ packetState = hciCmdPacketAddU8(packetState, mac[3]);
+ packetState = hciCmdPacketAddU8(packetState, mac[4]);
+ packetState = hciCmdPacketAddU8(packetState, mac[5]);
+ packetState = hciCmdPacketAddU8(packetState, i); //we'll be the slave on the connection...for now
+ hciCmdPacketFinish(packetState);
+ btTxCmdPacket();
+ }
+ else if(typ == UART_PKT_TYP_EVT && e->eventCode == HCI_EVT_Connection_Complete_Event && !e->params[0]){
+
+ conn = e->params[1] + (((uint32_t)e->params[2]) << 8);
+
+ cbks.BtConnStartF(cbks.userData, conn, e->params + 3, e->params[9], e->params[10]);
+ }
+ else if(typ == UART_PKT_TYP_EVT && e->eventCode == HCI_EVT_Disconnection_Complete_Event){
+
+ BtEnqueuedNode *t, *n = enqueuedPackets, *p = NULL;
+ conn = e->params[1] + (((uint32_t)e->params[2]) << 8);
+
+ cbks.BtConnEndF(cbks.userData, conn, e->params[3]);
+
+ while(n){
+
+ if(n->conn == conn){
+
+ if(p) p->next = n->next;
+ else enqueuedPackets = n->next;
+ t = n;
+ n = n->next;
+ sg_free(t->buf);
+ free(t->buf);
+ free(t);
+ }
+ else{
+
+ p = n;
+ n = n->next;
+ }
+ }
+ }
+ else if(typ == UART_PKT_TYP_EVT && e->eventCode == HCI_EVT_PIN_Code_Request_Event){
+
+ for(i = 0; i < sizeof(mac); i++) mac[i] = e->params[i];
+ i = cbks.BtPinRequestF(cbks.userData, mac, buf);
+ packetState = hciCmdPacketStart(HCI_OGF_Link_Control, i ? HCI_CMD_PIN_Code_Request_Reply : HCI_CMD_PIN_Code_Request_Negative_Reply);
+ packetState = hciCmdPacketAddU8(packetState, mac[0]);
+ packetState = hciCmdPacketAddU8(packetState, mac[1]);
+ packetState = hciCmdPacketAddU8(packetState, mac[2]);
+ packetState = hciCmdPacketAddU8(packetState, mac[3]);
+ packetState = hciCmdPacketAddU8(packetState, mac[4]);
+ packetState = hciCmdPacketAddU8(packetState, mac[5]);
+
+ if(i){ //accept
+
+ packetState = hciCmdPacketAddU8(packetState, i);
+ for(j = 0; j < 16; j++) packetState = hciCmdPacketAddU8(packetState, buf[j]);
+ }
+ hciCmdPacketFinish(packetState);
+ btTxCmdPacket();
+ }
+ else if(typ == UART_PKT_TYP_EVT && e->eventCode == HCI_EVT_Number_Of_Completed_Packets_Event){
+
+ uint8_t numHandles = e->params[0];
+
+ for(i = 0; i < numHandles; i++) gAclPacketsCanSend += (((uint16_t)e->params[1 + i * 4 + 3]) << 8) | e->params[1 + i * 4 + 2];
+
+ while(gAclPacketsCanSend && enqueuedPackets){
+
+ BtEnqueuedNode* n = enqueuedPackets;
+
+ enqueuedPackets = n->next;
+ btAclDoDataTx(n->conn, n->first, n->bcastType, n->buf);
+ free(n);
+ }
+ }
+ else if(typ == UART_PKT_TYP_EVT && e->eventCode == HCI_EVT_Link_Key_Request_Event){
+
+ for(i = 0; i < sizeof(mac); i++) mac[i] = e->params[i];
+ i = cbks.BtLinkKeyRequestF(cbks.userData, mac, buf);
+ packetState = hciCmdPacketStart(HCI_OGF_Link_Control, i ? HCI_CMD_Link_Key_Request_Reply : HCI_CMD_Link_Key_Request_Negative_Reply);
+ packetState = hciCmdPacketAddU8(packetState, mac[0]);
+ packetState = hciCmdPacketAddU8(packetState, mac[1]);
+ packetState = hciCmdPacketAddU8(packetState, mac[2]);
+ packetState = hciCmdPacketAddU8(packetState, mac[3]);
+ packetState = hciCmdPacketAddU8(packetState, mac[4]);
+ packetState = hciCmdPacketAddU8(packetState, mac[5]);
+
+ if(i){ //link key given to us
+
+ for(j = 0; j < 16; j++) packetState = hciCmdPacketAddU8(packetState, buf[j]);
+ }
+ hciCmdPacketFinish(packetState);
+ btTxCmdPacket();
+ }
+ else if(typ == UART_PKT_TYP_EVT && e->eventCode == HCI_EVT_Link_Key_Notification_Event){
+
+ for(i = 0; i < sizeof(mac); i++) mac[i] = e->params[i];
+ for(i = 0; i < 16; i++) buf[i] = e->params[i + sizeof(mac)];
+
+ cbks.BtLinkKeyCreatedF(cbks.userData, mac, buf);
+ }
+ #if SUPORT_SSP //this was done last minute, but should work :) -DG
+
+ else if(typ == UART_PKT_TYP_EVT && e->eventCode == HCI_EVT_IO_Capability_Request_Event){
+
+ for(i = 0; i < sizeof(mac); i++) mac[i] = e->params[i];
+
+ packetState = hciCmdPacketStart(HCI_OGF_Link_Control, HCI_CMD_IO_Capability_Request_Reply);
+ packetState = hciCmdPacketAddU8(packetState, mac[0]);
+ packetState = hciCmdPacketAddU8(packetState, mac[1]);
+ packetState = hciCmdPacketAddU8(packetState, mac[2]);
+ packetState = hciCmdPacketAddU8(packetState, mac[3]);
+ packetState = hciCmdPacketAddU8(packetState, mac[4]);
+ packetState = hciCmdPacketAddU8(packetState, mac[5]);
+
+ packetState = hciCmdPacketAddU8(packetState, 0); //we claim to be display-only - it works for us
+ packetState = hciCmdPacketAddU8(packetState, 0); //we do not support OOB
+ packetState = hciCmdPacketAddU8(packetState, 2); //we don't care about MITM and like Dedicated Bonding
+ hciCmdPacketFinish(packetState);
+ btTxCmdPacket();
+ }
+ else if(typ == UART_PKT_TYP_EVT && e->eventCode == HCI_EVT_User_Confirmation_Request_Event){
+
+ for(i = 0; i < sizeof(mac); i++) mac[i] = e->params[i];
+ uint32_t val = 0;
+
+ for(i = 0; i < 4; i++) val = (val << 8) | e->params[sizeof(mac) + 3 - i];
+
+ //we are disaply-only so accept it unconditionally
+ packetState = hciCmdPacketStart(HCI_OGF_Link_Control, HCI_CMD_User_Confirmation_Request_Reply);
+ packetState = hciCmdPacketAddU8(packetState, mac[0]);
+ packetState = hciCmdPacketAddU8(packetState, mac[1]);
+ packetState = hciCmdPacketAddU8(packetState, mac[2]);
+ packetState = hciCmdPacketAddU8(packetState, mac[3]);
+ packetState = hciCmdPacketAddU8(packetState, mac[4]);
+ packetState = hciCmdPacketAddU8(packetState, mac[5]);
+ hciCmdPacketFinish(packetState);
+ btTxCmdPacket();
+
+ cbks.BtSspShow(cbks.userData, mac, val);
+ }
+ else if(typ == UART_PKT_TYP_EVT && e->eventCode == HCI_EVT_Simple_Pairing_Complete_Event){
+
+ for(i = 0; i < sizeof(mac); i++) mac[i] = e->params[i];
+ uint32_t val = 0;
+
+ for(i = 0; i < 4; i++) val = (val << 8) | e->params[sizeof(mac) + 3 - i];
+
+ cbks.BtSspShow(cbks.userData, mac, BT_SSP_DONE_VAL);
+ }
+
+ #endif
+ else{
+
+ btEnqueuePacket(typ);
+ }
+ }
+ }
+ btThreadDie = 0;
+}
+
+static char btTryRxEventPacket(uint8_t wantedType){
+
+ uint8_t i, j;
+
+ for(i = 0; i < PACKET_RX_BACKLOG_SZ; i++){
+
+ if(backlog[i] && backlog[i][0] == UART_PKT_TYP_EVT && (!wantedType || backlog[i][1] == wantedType)){
+
+ for(j = 0; j < 2; j++) packet[j] = backlog[i][j + 1]; //copy packet header
+ for(j = 0; j < ((HCI_Event*)packetStore)->totalParamLen; j++) packet[j + 2] = backlog[i][j + 3];
+ free(backlog[i]);
+ for(; i < PACKET_RX_BACKLOG_SZ - 1; i++) backlog[i] = backlog[i + 1];
+ backlog[i] = NULL;
+ return 1;
+ }
+ }
+ return 0;
+}
+
+static void btRxEventPacket(uint8_t wantedType){
+
+ while(!btTryRxEventPacket(wantedType)) coopYield();
+}
+
+char btInit(const BtFuncs* btf){
+
+ HCI_Cmd* cmd;
+ HCI_Event* evt = (HCI_Event*)packetStore;
+ int num = 0;
+ const uint8_t* script = cc256x_init_script;
+ uint8_t* packetState;
+ int i;
+
+dbgPrintf("inBtInit\n");
+
+ NVIC_DisableIRQ(USART0_IRQn);
+
+ initBtUart(1);
+ gpioSetVal(RESET, 0);
+ delay_ms(15);
+ gpioSetVal(RESET, 1);
+ delay_ms(70);
+ //set speed
+ packetState = hciCmdPacketStart(0x3f, 0x336);
+ packetState = hciCmdPacketAddU32(packetState, BT_BAUDRATE);
+ hciCmdPacketFinish(packetState);
+ btTxCmdPacket();
+ btRxPacket(); //it responds at old speed
+ delay_ms(100);
+ initBtUart(0);
+ btThreadDie = 0;
+ if(!coopSpawn(btTaskF, NULL, 2048)){
+ dbgPrintf("Failed to start BT task\n");
+ return 0;
+ }
+ dbgPrintf("Bt initing...\n");
+
+ //init script
+ while(*script++){
+
+ dbgPrintf("\r%d", num++);
+ cmd = (HCI_Cmd*)script;
+ btTxCmdPacketEx(cmd);
+ script += 3 + cmd->totalParamLen;
+ btRxEventPacket(0);
+ #if BT_VERBOSE
+ dbgPrintf(" -> %d, %d:", evt->eventCode ,evt->totalParamLen);
+ for(i = 0; i < evt->totalParamLen; i++) dbgPrintf(" %02X", evt->params[i]);
+ dbgPrintf("\n");
+ #endif
+ }
+
+ //get buffer size
+ packetState = hciCmdPacketStart(HCI_OGF_Informational, HCI_CMD_Read_Buffer_Size);
+ hciCmdPacketFinish(packetState);
+ btTxCmdPacket();
+ do{
+ btRxEventPacket(HCI_EVT_Command_Complete_Event);
+ }while(evt->params[1] != (HCI_OPCODE(HCI_OGF_Informational, HCI_CMD_Read_Buffer_Size) & 0xFF) ||
+ evt->params[2] != (HCI_OPCODE(HCI_OGF_Informational, HCI_CMD_Read_Buffer_Size) >> 8));
+
+ uint16_t aclLen, aclNum, scoNum;
+ uint8_t scoLen;
+
+ aclLen = (((uint16_t)evt->params[5]) << 8) | evt->params[4];
+ scoLen = evt->params[6];
+ aclNum = (((uint16_t)evt->params[8]) << 8) | evt->params[7];
+ scoNum = (((uint16_t)evt->params[10]) << 8) | evt->params[9];
+
+ #if BT_VERBOSE
+ dbgPrintf("BT chip buffers: %ux%ub ACL, %ux%ub SCO\n", aclNum, aclLen, scoNum, scoLen);
+ #endif
+
+ gAclPacketsCanSend = aclNum;
+
+ //set connectibility/discoverability
+ pageState = 0;
+ btDiscoverableConnectable();
+
+ //enable simple passcodes
+ if(SUPORT_SSP){
+ packetState = hciCmdPacketStart(HCI_OGF_Controller_and_Baseband, HCI_CMD_Write_Simple_Pairing_Mode);
+ packetState = hciCmdPacketAddU8(packetState, 1); //enable it
+ hciCmdPacketFinish(packetState);
+ btTxCmdPacket();
+ do{
+ btRxEventPacket(HCI_EVT_Command_Complete_Event);
+ }while(evt->params[1] != (HCI_OPCODE(HCI_OGF_Controller_and_Baseband, HCI_CMD_Write_Simple_Pairing_Mode) & 0xFF) ||
+ evt->params[2] != (HCI_OPCODE(HCI_OGF_Controller_and_Baseband, HCI_CMD_Write_Simple_Pairing_Mode) >> 8));
+ }
+
+ cbks = *btf;
+
+ dbgPrintf("\nBT up\n");
+
+ return 1;
+}
+
+void btDeinit(void){
+
+ int i;
+
+ btThreadDie = 1;
+ while(btThreadDie) coopYield();
+
+ for(i = 0; i < PACKET_RX_BACKLOG_SZ; i++) if(backlog[i]) free(backlog[i]);
+}
+
+char btLocalMac(uint8_t* buf){
+
+ int i;
+ HCI_Event* evt = (HCI_Event*)packetStore;
+ uint8_t* packetState;
+
+ packetState = hciCmdPacketStart(HCI_OGF_Informational, HCI_CMD_Read_BD_ADDR);
+ hciCmdPacketFinish(packetState);
+ btTxCmdPacket();
+ btRxEventPacket(HCI_EVT_Command_Complete_Event);
+ if(evt->totalParamLen != 10 ||
+ evt->params[1] != (HCI_OPCODE(HCI_OGF_Informational, HCI_CMD_Read_BD_ADDR) & 0xFF) ||
+ evt->params[2] != (HCI_OPCODE(HCI_OGF_Informational, HCI_CMD_Read_BD_ADDR) >> 8) || evt->params[3] != 0){
+ return 0;
+ }
+
+ for(i = 0; i < 6; i++) buf[i] = evt->params[4 + i];
+ return 1;
+}
+
+char btSetLocalName(const char* name){
+
+ HCI_Cmd* cmd = (HCI_Cmd*)packetStore;
+ HCI_Event* evt = (HCI_Event*)packetStore;
+ uint8_t* packetState;
+
+ packetState = hciCmdPacketStart(HCI_OGF_Controller_and_Baseband, HCI_CMD_Change_Local_Name);
+ while(name && *name) packetState = hciCmdPacketAddU8(packetState, *name++);
+ packetState = hciCmdPacketAddU8(packetState, 0);
+ hciCmdPacketFinish(packetState);
+ if(cmd->totalParamLen > 248) return 0; //too long
+ cmd->totalParamLen = 248;
+ btTxCmdPacket();
+ btRxEventPacket(HCI_EVT_Command_Complete_Event);
+
+ if(evt->totalParamLen != 4 ||
+ evt->params[1] != (HCI_OPCODE(HCI_OGF_Controller_and_Baseband, HCI_CMD_Change_Local_Name) & 0xFF) ||
+ evt->params[2] != (HCI_OPCODE(HCI_OGF_Controller_and_Baseband, HCI_CMD_Change_Local_Name) >> 8) || evt->params[3] != 0){
+ return 0;
+ }
+ return 1;
+}
+
+void btScan(void){
+
+ //HCI_Cmd* cmd = (HCI_Cmd*)packet;
+ HCI_Event* evt = (HCI_Event*)packet;
+ uint8_t* packetState;
+ int i, done = 0;
+
+ packetState = hciCmdPacketStart(HCI_OGF_Link_Control, HCI_CMD_Inquiry);
+ packetState = hciCmdPacketAddU24(packetState, HCI_LAP_Unlimited_Inquiry);
+ packetState = hciCmdPacketAddU8(packetState, 0x30);
+ packetState = hciCmdPacketAddU8(packetState, 0);
+ hciCmdPacketFinish(packetState);
+ btTxCmdPacket();
+
+ while(1){
+ coopYield();
+ if(!done && btTryRxEventPacket(HCI_EVT_Inquiry_Result_Event)){
+
+ uint8_t* MACs = evt->params + evt->params[0]*0 + 1;
+ uint8_t* PSRMs = evt->params + evt->params[0]*6 + 1;
+ uint8_t* PSPMs = evt->params + evt->params[0]*7 + 1;
+ uint8_t* PSMs = evt->params + evt->params[0]*8 + 1;
+ uint8_t* DCs = evt->params + evt->params[0]*9 + 1;
+ uint8_t* COs = evt->params + evt->params[0]*12 + 1;
+
+ for(i = 0; i < evt->params[0]; i++){
+
+ BtDiscoveryResult dr;
+
+ dr.dc = DCs[0] + (((uint32_t)DCs[1]) << 8) + (((uint32_t)DCs[2]) << 16) ;
+ dr.mac[0] = *MACs++;
+ dr.mac[1] = *MACs++;
+ dr.mac[2] = *MACs++;
+ dr.mac[3] = *MACs++;
+ dr.mac[4] = *MACs++;
+ dr.mac[5] = *MACs++;
+ dr.PSRM = *PSRMs++;
+ dr.PSPM = *PSPMs++;
+ dr.PSM = *PSMs++;
+ dr.co = (((uint16_t)COs[1]) << 8) + COs[0];
+
+ if(!cbks.BtDiscoveryF(cbks.userData, &dr)){
+
+ packetState = hciCmdPacketStart(HCI_OGF_Link_Control, HCI_CMD_Inquiry_Cancel);
+ hciCmdPacketFinish(packetState);
+ btTxCmdPacket();
+ done = 1;
+ break;
+ }
+ COs += 2;
+ DCs += 3;
+ }
+ }
+ if(btTryRxEventPacket(HCI_EVT_Inquiry_Complete_Event)) break;
+ if(btTryRxEventPacket(HCI_EVT_Command_Complete_Event)) break;
+ }
+}
+
+char btGetRemoteName(const uint8_t* mac, uint8_t PSRM, uint8_t PSM, uint16_t co, char* nameBuf){
+
+ HCI_Event* evt = (HCI_Event*)packet;
+ uint8_t* packetState;
+ int i = 0;
+
+ packetState = hciCmdPacketStart(HCI_OGF_Link_Control, HCI_CMD_Remote_Name_Request);
+ packetState = hciCmdPacketAddU8(packetState, mac[0]);
+ packetState = hciCmdPacketAddU8(packetState, mac[1]);
+ packetState = hciCmdPacketAddU8(packetState, mac[2]);
+ packetState = hciCmdPacketAddU8(packetState, mac[3]);
+ packetState = hciCmdPacketAddU8(packetState, mac[4]);
+ packetState = hciCmdPacketAddU8(packetState, mac[5]);
+ packetState = hciCmdPacketAddU8(packetState, PSRM);
+ packetState = hciCmdPacketAddU8(packetState, PSM);
+ packetState = hciCmdPacketAddU16(packetState, co);
+ hciCmdPacketFinish(packetState);
+ btTxCmdPacket();
+
+ btRxEventPacket(HCI_EVT_Remote_Name_Request_Complete_Event);
+
+ if(evt->params[0] == 0){
+
+ while(i < 248 && evt->params[7 + i]){
+ nameBuf[i] = evt->params[7 + i];
+ i++;
+ }
+ nameBuf[i] = 0;
+ return 1;
+ }
+ else return 0;
+}
+
+static char btDiscoverableConnectable(void){
+
+ HCI_Event* evt = (HCI_Event*)packet;
+ uint8_t* packetState;
+
+ packetState = hciCmdPacketStart(HCI_OGF_Controller_and_Baseband, HCI_CMD_Write_Scan_Enable);
+ packetState = hciCmdPacketAddU8(packetState, pageState);
+ hciCmdPacketFinish(packetState);
+ btTxCmdPacket();
+ btRxEventPacket(HCI_EVT_Command_Complete_Event);
+ if(evt->totalParamLen != 4 ||
+ evt->params[1] != (HCI_OPCODE(HCI_OGF_Controller_and_Baseband, HCI_CMD_Write_Scan_Enable) & 0xFF) ||
+ evt->params[2] != (HCI_OPCODE(HCI_OGF_Controller_and_Baseband, HCI_CMD_Write_Scan_Enable) >> 8) || evt->params[3] != 0){
+ return 0;
+ }
+
+ return 1;
+}
+
+char btDiscoverable(char on){
+
+ uint8_t nv = (pageState &~ PAGE_STATE_INQUIRY) | (on ? PAGE_STATE_INQUIRY : 0);
+ if(nv == pageState) return 1;
+ pageState = nv;
+
+ return btDiscoverableConnectable();
+}
+
+char btConnectable(char on){
+
+ uint8_t nv = (pageState &~ PAGE_STATE_PAGE) | (on ? PAGE_STATE_PAGE : 0);
+ if(nv == pageState) return 1;
+ pageState = nv;
+
+ return btDiscoverableConnectable();
+}
+
+char btSetDeviceClass(uint32_t cls){
+
+ HCI_Event* evt = (HCI_Event*)packet;
+ uint8_t* packetState;
+
+ packetState = hciCmdPacketStart(HCI_OGF_Controller_and_Baseband, HCI_CMD_Write_Class_Of_Device);
+ packetState = hciCmdPacketAddU24(packetState, cls);
+ hciCmdPacketFinish(packetState);
+ btTxCmdPacket();
+ btRxEventPacket(HCI_EVT_Command_Complete_Event);
+ if(evt->totalParamLen != 4 ||
+ evt->params[1] != (HCI_OPCODE(HCI_OGF_Controller_and_Baseband, HCI_CMD_Write_Class_Of_Device) & 0xFF) ||
+ evt->params[2] != (HCI_OPCODE(HCI_OGF_Controller_and_Baseband, HCI_CMD_Write_Class_Of_Device) >> 8) || evt->params[3] != 0){
+ return 0;
+ }
+
+ return 1;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+const uint8_t cc256x_init_script[] = {
+ // #--------------------------------------------------------------------------------
+ // # Description : Trio Orca 5500 L ROM Initialization Script
+ // #
+ // # Compatibility: Trio/Orca/5500, 6.0.15 ROM
+ // #
+ // # Last Updated: 09-Aug-2011 10:06:07.86
+ // #
+ // # Version : TI_P6_15.41
+ // #
+ // #
+ // #
+ // # Trio LMP Subversion: 1f29
+ // # Orca LMP Subversion: 1b29
+ // #
+ // # Notes : Use this script on Trio, Orca or 5500, 6.0.15 ROM device only (FW v6.0.15)
+ // #--------------------------------------------------------------------------------
+ //
+ // #################################################################
+ // ## START of Panasonic Adds-On
+ // #################################################################
+ //
+ // ## Change UART baudrate
+ //
+ //
+ // #################################################################
+ // ## END of Panasonic Adds-On
+ // #################################################################
+ //
+ 0x01, 0x37, 0xfe, 0x02, 0x06, 0x0f,
+
+ //
+ //
+ 0x01, 0x05, 0xff, 0xff, 0xa0, 0x62, 0x08, 0x00, 0xfa, 0x06, 0x0f, 0x3d, 0x29, 0x05, 0xc0,
+ 0x03, 0xc0, 0x1e, 0x08, 0x05, 0x00, 0x04, 0xc0, 0x03, 0xc0, 0x1e, 0x08, 0x3d, 0x01, 0x04,
+ 0xc0, 0x03, 0xc0, 0x1e, 0x08, 0x76, 0x02, 0x04, 0xc0, 0x03, 0xc0, 0x1e, 0x08, 0xae, 0x03,
+ 0x04, 0xc0, 0x03, 0xc0, 0x1e, 0x08, 0xae, 0x0b, 0x01, 0x00, 0x34, 0x30, 0x41, 0x02, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xb9, 0x58, 0x00, 0x00, 0x1b, 0x59, 0x00, 0x00, 0x40, 0x59,
+ 0x00, 0x00, 0x41, 0x59, 0x00, 0x00, 0x65, 0x59, 0x00, 0x00, 0xdc, 0x74, 0x00, 0x00, 0xdd,
+ 0x74, 0x00, 0x00, 0x4b, 0xf4, 0x00, 0x00, 0x5c, 0xf4, 0x00, 0x00, 0x5d, 0xf4, 0x00, 0x00,
+ 0xcb, 0xf4, 0x00, 0x00, 0xdc, 0xf4, 0x00, 0x00, 0xdd, 0xf4, 0x00, 0x00, 0x40, 0x19, 0x02,
+ 0x00, 0x48, 0x19, 0x02, 0x00, 0xdb, 0x48, 0x02, 0x00, 0x1c, 0x49, 0x02, 0x00, 0x40, 0x49,
+ 0x02, 0x00, 0x41, 0x49, 0x02, 0x00, 0x45, 0x49, 0x02, 0x00, 0xb9, 0x50, 0x02, 0x00, 0x45,
+ 0x51, 0x02, 0x00, 0x1b, 0x58, 0x02, 0x00, 0x1c, 0x58, 0x02, 0x00, 0x38, 0x58, 0x02, 0x00,
+ 0x41, 0x58, 0x02, 0x00, 0x98, 0x58, 0x02, 0x00, 0xb8, 0x58, 0x02, 0x00, 0xb9, 0x58, 0x02,
+ 0x00, 0xdb, 0x58, 0x02, 0x00, 0xdc, 0x58, 0x02, 0x00, 0x01, 0x59, 0x02, 0x00, 0x05, 0x59,
+ 0x02, 0x00, 0x18, 0x59, 0x02, 0x00, 0x19, 0x59, 0x02, 0x00, 0x1b, 0x59, 0x02, 0x00, 0x1c,
+ 0x59, 0x02, 0x00, 0x40, 0x59, 0x02, 0x00, 0x41, 0x59, 0x02, 0x00, 0x42, 0x59, 0x02, 0x00,
+ 0x45, 0x59, 0x02, 0x00, 0x47, 0x59, 0x02, 0x00, 0x48, 0x59, 0x02, 0x00, 0x56, 0x59, 0x02,
+ 0x00, 0x57, 0x59, 0x02, 0x00, 0x60, 0x59, 0x02, 0x00, 0x62, 0x59, 0x02, 0x00, 0x63, 0x59,
+ 0x02, 0x00, 0x64, 0x59,
+
+ 0x01, 0x05, 0xff, 0xff, 0x9a, 0x63, 0x08, 0x00, 0xfa, 0x02, 0x00, 0x65, 0x59, 0x02, 0x00,
+ 0x84, 0x59, 0x02, 0x00, 0x8c, 0x59, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xb5, 0x43, 0x4d, 0xae, 0x7f, 0x01, 0x24, 0xa6,
+ 0x46, 0x3f, 0x48, 0xfe, 0x44, 0x00, 0x47, 0xb0, 0x42, 0xf8, 0xd1, 0x03, 0x20, 0x17, 0x21,
+ 0x89, 0x01, 0xa6, 0x46, 0x3b, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0xad, 0x7f, 0xa6, 0x46, 0x38,
+ 0x48, 0xfe, 0x44, 0x00, 0x47, 0xa8, 0x42, 0xf9, 0xd1, 0xfe, 0xe7, 0xf0, 0xb5, 0x37, 0x49,
+ 0x4f, 0x68, 0x33, 0x20, 0xc0, 0x5d, 0xc0, 0x06, 0xc0, 0x0f, 0x84, 0x46, 0x08, 0x78, 0x02,
+ 0x28, 0x3e, 0xd1, 0x33, 0x48, 0x06, 0x78, 0x00, 0x24, 0x25, 0x1c, 0x22, 0x1c, 0x1b, 0xe0,
+ 0x11, 0x20, 0x40, 0x01, 0x50, 0x43, 0x30, 0x49, 0x0b, 0x18, 0x38, 0x20, 0xc0, 0x5c, 0x00,
+ 0x28, 0x0f, 0xd0, 0x18, 0x78, 0xa8, 0x21, 0x41, 0x43, 0x2d, 0x48, 0x41, 0x30, 0x40, 0x5c,
+ 0x01, 0x28, 0x07, 0xd0, 0xff, 0x20, 0x1e, 0x30, 0xc0, 0x5c, 0x01, 0x28, 0x01, 0xd1, 0x01,
+ 0x25, 0x00, 0xe0, 0x01, 0x24, 0x50, 0x1c, 0x02, 0x06, 0x12, 0x0e, 0xb2, 0x42, 0xe1, 0xdb,
+ 0x00, 0x20, 0x00, 0x2d,
+
+ 0x01, 0x05, 0xff, 0xff, 0x94, 0x64, 0x08, 0x00, 0xfa, 0x02, 0xd0, 0x00, 0x2c, 0x00, 0xd1,
+ 0x01, 0x20, 0x22, 0x49, 0x0a, 0x78, 0x60, 0x45, 0x10, 0xd0, 0x33, 0x21, 0xcb, 0x19, 0x10,
+ 0x24, 0x19, 0x78, 0xa1, 0x43, 0x04, 0x01, 0x10, 0x20, 0x20, 0x40, 0x08, 0x43, 0x18, 0x70,
+ 0x19, 0x48, 0x01, 0x2a, 0x00, 0xd1, 0x2c, 0x38, 0x01, 0x21, 0x49, 0x02, 0x01, 0x80, 0xf0,
+ 0xbd, 0x70, 0xb5, 0x07, 0x26, 0x15, 0x4d, 0x40, 0x20, 0x40, 0x5d, 0x02, 0x28, 0x0c, 0xd1,
+ 0x45, 0x20, 0x40, 0x5d, 0x14, 0x49, 0x08, 0x18, 0x40, 0x00, 0x02, 0x21, 0x01, 0x24, 0xa6,
+ 0x46, 0x12, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x00, 0x28, 0x03, 0xd1, 0xa8, 0x35, 0x01, 0x3e,
+ 0xeb, 0xd1, 0x70, 0xbd, 0x0e, 0x48, 0x09, 0x21, 0xa6, 0x46, 0x0e, 0x4a, 0xfe, 0x44, 0x10,
+ 0x47, 0x70, 0xbd, 0xc0, 0x46, 0x8b, 0x05, 0x05, 0x00, 0xf5, 0xd3, 0x04, 0x00, 0x8c, 0x4f,
+ 0x08, 0x00, 0xe4, 0x21, 0x08, 0x00, 0x83, 0x50, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x70,
+ 0x7c, 0x1a, 0x00, 0x60, 0x19, 0x08, 0x00, 0xe8, 0x57, 0x08, 0x00, 0x11, 0x01, 0x0d, 0x00,
+ 0x57, 0x4a, 0x05, 0x00, 0x46, 0x7f, 0x1a, 0x00, 0x61, 0x48, 0x05, 0x00, 0x70, 0xb5, 0x9f,
+ 0x48, 0x00, 0x78, 0x01, 0x28, 0x27, 0xd0, 0x00, 0x28, 0x12, 0xd1, 0x9d, 0x4d, 0x28, 0x1c,
+ 0x04, 0x21, 0x01, 0x24, 0xa6, 0x46, 0x9b, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x00, 0x28, 0x2d,
+ 0xd1, 0x03, 0x21, 0xc9, 0x01, 0x28, 0x1c, 0x0a, 0x1c, 0xa6, 0x46, 0x97, 0x4b, 0xfe, 0x44,
+ 0x18, 0x47, 0x70, 0xbd, 0x02, 0x28, 0x22, 0xd1, 0x95, 0x48, 0x41, 0x88, 0x09, 0x09, 0x1e,
+ 0xd2, 0x41, 0x88, 0x49, 0x08, 0x1b, 0xd2, 0x42, 0x88, 0x10, 0x21, 0x11, 0x43, 0x41, 0x80,
+ 0x02, 0x88, 0x01, 0x21,
+
+ 0x01, 0x05, 0xff, 0xff, 0x8e, 0x65, 0x08, 0x00, 0xfa, 0x89, 0x03, 0x11, 0x43, 0x01, 0x80,
+ 0x70, 0xbd, 0xe4, 0x4e, 0x30, 0x1c, 0x00, 0x25, 0x29, 0x1c, 0x01, 0x24, 0xa6, 0x46, 0xe3,
+ 0x4a, 0xfe, 0x44, 0x10, 0x47, 0xe0, 0x49, 0x08, 0x80, 0x30, 0x1c, 0x1c, 0x21, 0x2a, 0x1c,
+ 0xa6, 0x46, 0xdf, 0x4b, 0xfe, 0x44, 0x18, 0x47, 0x70, 0xbd, 0x30, 0xb5, 0xdb, 0x4d, 0x28,
+ 0x1c, 0x01, 0x88, 0x7d, 0x48, 0x00, 0x78, 0x01, 0x28, 0x26, 0xd0, 0x00, 0x28, 0x12, 0xd1,
+ 0x7b, 0x4d, 0x28, 0x1c, 0x04, 0x21, 0x01, 0x24, 0xa6, 0x46, 0x7a, 0x4a, 0xfe, 0x44, 0x10,
+ 0x47, 0x00, 0x28, 0x26, 0xd1, 0x28, 0x1c, 0x00, 0x21, 0x03, 0x22, 0xd2, 0x01, 0xa6, 0x46,
+ 0x76, 0x4b, 0xfe, 0x44, 0x18, 0x47, 0x30, 0xbd, 0x02, 0x28, 0x1b, 0xd1, 0x74, 0x48, 0x41,
+ 0x88, 0x09, 0x09, 0x17, 0xd2, 0x41, 0x88, 0x49, 0x08, 0x14, 0xd2, 0x10, 0x22, 0x41, 0x88,
+ 0x91, 0x43, 0x41, 0x80, 0x01, 0x21, 0x89, 0x03, 0x04, 0x88, 0x8c, 0x43, 0x0a, 0xe0, 0xd7,
+ 0x4c, 0xa1, 0x42, 0x08, 0xd0, 0xc1, 0x48, 0x00, 0x22, 0x01, 0x23, 0x9e, 0x46, 0xc2, 0x4b,
+ 0xfe, 0x44, 0x18, 0x47, 0x28, 0x1c, 0x04, 0x80, 0x30, 0xbd, 0x00, 0xb5, 0x61, 0x49, 0x09,
+ 0x78, 0x01, 0x29, 0x08, 0xd1, 0x40, 0x69, 0x00, 0x7a, 0x15, 0x28, 0x04, 0xd1, 0x01, 0x20,
+ 0x86, 0x46, 0xe0, 0x48, 0xfe, 0x44, 0x00, 0x47, 0x00, 0xbd, 0xf0, 0xb5, 0x04, 0x69, 0xc7,
+ 0x26, 0x30, 0x5d, 0x04, 0x28, 0x24, 0xd1, 0xc8, 0x25, 0x28, 0x5d, 0x18, 0x28, 0x03, 0xd1,
+ 0x6a, 0x20, 0x00, 0x5d, 0x04, 0x28, 0x16, 0xd0, 0x28, 0x5d, 0x19, 0x28, 0x19, 0xd1, 0xce,
+ 0x20, 0x00, 0x5d, 0x16, 0x28, 0x15, 0xd1, 0xb5, 0x27, 0x38, 0x5d, 0x01, 0x21, 0x8e, 0x46,
+ 0xea, 0x4a, 0xfe, 0x44,
+
+ 0x01, 0x05, 0xff, 0xff, 0x88, 0x66, 0x08, 0x00, 0xfa, 0x10, 0x47, 0x00, 0x22, 0x38, 0x5d,
+ 0x60, 0x21, 0x41, 0x43, 0xe8, 0x48, 0x42, 0x54, 0x32, 0x55, 0x2a, 0x55, 0xf0, 0xbd, 0x20,
+ 0x1c, 0x01, 0x21, 0x8e, 0x46, 0xe5, 0x49, 0xfe, 0x44, 0x08, 0x47, 0xf0, 0xbd, 0xf0, 0xb5,
+ 0x06, 0x1c, 0xb5, 0x69, 0xb4, 0x8a, 0x42, 0x48, 0x02, 0x78, 0x00, 0x27, 0xe0, 0x49, 0xe1,
+ 0x48, 0x8c, 0x42, 0x0e, 0xdc, 0xe0, 0x4a, 0x8c, 0x42, 0x51, 0xd0, 0x71, 0x39, 0x61, 0x1a,
+ 0x57, 0xd0, 0x01, 0x39, 0x4c, 0xd0, 0x43, 0x39, 0x34, 0xd0, 0x29, 0x39, 0x51, 0xd0, 0x01,
+ 0x39, 0x57, 0xd0, 0xf0, 0xbd, 0x48, 0x31, 0x61, 0x1a, 0x23, 0xd0, 0x0b, 0x39, 0x34, 0xd0,
+ 0x01, 0x39, 0x14, 0xd0, 0x01, 0x39, 0x64, 0xd1, 0xe1, 0x48, 0x00, 0x78, 0x02, 0x28, 0x2a,
+ 0xd1, 0xe8, 0x7a, 0x00, 0x07, 0x00, 0x0f, 0xdf, 0x49, 0x0a, 0x1c, 0xb6, 0x3a, 0x10, 0x70,
+ 0x02, 0x01, 0x02, 0x43, 0x12, 0x01, 0x02, 0x43, 0x12, 0x01, 0x02, 0x43, 0x0a, 0x80, 0x20,
+ 0xe0, 0x01, 0x2a, 0x01, 0xd0, 0x04, 0x2a, 0x1c, 0xd1, 0x28, 0x1c, 0x01, 0x21, 0x8e, 0x46,
+ 0xe8, 0x49, 0xfe, 0x44, 0x08, 0x47, 0x15, 0xe0, 0x0e, 0x21, 0x01, 0x22, 0x96, 0x46, 0xe6,
+ 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x01, 0x28, 0x08, 0xd0, 0xf0, 0xbd, 0x0d, 0x21, 0x01, 0x22,
+ 0x96, 0x46, 0xe1, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x01, 0x28, 0x35, 0xd1, 0x0c, 0x27, 0x02,
+ 0xe0, 0xe8, 0x7a, 0xde, 0x49, 0x08, 0x70, 0x28, 0x1c, 0x21, 0x1c, 0x3a, 0x1c, 0x01, 0x23,
+ 0x9e, 0x46, 0xdc, 0x4b, 0xfe, 0x44, 0x18, 0x47, 0x24, 0xe0, 0x10, 0x1c, 0x39, 0x1c, 0x06,
+ 0x22, 0x01, 0x23, 0x9e, 0x46, 0xf0, 0x4b, 0xfe, 0x44, 0x18, 0x47, 0xf0, 0xbd, 0x10, 0x1c,
+ 0x03, 0x21, 0x06, 0x22,
+
+ 0x01, 0x05, 0xff, 0xff, 0x82, 0x67, 0x08, 0x00, 0xfa, 0x01, 0x23, 0x9e, 0x46, 0xec, 0x4b,
+ 0xfe, 0x44, 0x18, 0x47, 0xeb, 0x48, 0x00, 0x68, 0x00, 0x28, 0x12, 0xd0, 0x04, 0x20, 0x01,
+ 0x24, 0xa6, 0x46, 0xe9, 0x49, 0xfe, 0x44, 0x08, 0x47, 0x47, 0x21, 0x09, 0x02, 0x01, 0x80,
+ 0x85, 0x80, 0x29, 0x0c, 0xc1, 0x80, 0xa6, 0x46, 0xe5, 0x49, 0xfe, 0x44, 0x08, 0x47, 0xdf,
+ 0x48, 0x9e, 0x30, 0x30, 0x62, 0xf0, 0xbd, 0xe8, 0x57, 0x08, 0x00, 0x7e, 0x7c, 0x1a, 0x00,
+ 0x43, 0x4a, 0x05, 0x00, 0xdb, 0x4a, 0x05, 0x00, 0x60, 0x7a, 0x1a, 0x00, 0xf8, 0xb5, 0x06,
+ 0x1c, 0xb5, 0x69, 0xb0, 0x8a, 0xdb, 0x49, 0x40, 0x1a, 0x00, 0xd1, 0x99, 0xe0, 0x65, 0x49,
+ 0x89, 0x09, 0x40, 0x1a, 0x69, 0xd0, 0xd8, 0x49, 0x40, 0x1a, 0xa2, 0x49, 0x25, 0xd0, 0x07,
+ 0x38, 0x00, 0xd0, 0x96, 0xe0, 0x0e, 0x20, 0x40, 0x19, 0x06, 0x22, 0xaa, 0x80, 0x08, 0x22,
+ 0x6a, 0x80, 0x09, 0x78, 0x02, 0x29, 0x0c, 0xd1, 0xd1, 0x49, 0x01, 0x24, 0xa6, 0x46, 0xd1,
+ 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x00, 0x21, 0xa6, 0x46, 0xce, 0x4a, 0xfe, 0x44, 0x10, 0x47,
+ 0x00, 0x22, 0x00, 0xe0, 0x0c, 0x22, 0x28, 0x1c, 0x87, 0x21, 0x89, 0x00, 0x01, 0x23, 0x9e,
+ 0x46, 0xca, 0x4b, 0xfe, 0x44, 0x18, 0x47, 0xc9, 0x48, 0xfa, 0x30, 0x30, 0x62, 0xf8, 0xbd,
+ 0x08, 0x78, 0x02, 0x28, 0x33, 0xd1, 0x0b, 0x20, 0x40, 0x19, 0x01, 0x24, 0xa6, 0x46, 0xef,
+ 0x49, 0xfe, 0x44, 0x08, 0x47, 0x00, 0x90, 0xa6, 0x46, 0xc2, 0x49, 0xfe, 0x44, 0x08, 0x47,
+ 0x00, 0x06, 0x00, 0x0e, 0xa6, 0x46, 0xc0, 0x49, 0xfe, 0x44, 0x08, 0x47, 0x07, 0x1c, 0x0e,
+ 0x20, 0x40, 0x19, 0x00, 0x99, 0xa6, 0x46, 0xed, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x06, 0x21,
+ 0xa9, 0x80, 0x07, 0x21,
+
+ 0x01, 0x05, 0xff, 0xff, 0x7c, 0x68, 0x08, 0x00, 0xfa, 0x69, 0x80, 0x00, 0x2f, 0x0b, 0xd0,
+ 0x00, 0x99, 0xc9, 0x0a, 0x08, 0xd3, 0x3a, 0x21, 0xc9, 0x19, 0x05, 0x22, 0xa6, 0x46, 0xe6,
+ 0x4b, 0xfe, 0x44, 0x18, 0x47, 0x00, 0x22, 0x08, 0xe0, 0x00, 0x21, 0x05, 0x22, 0xa6, 0x46,
+ 0xe3, 0x4b, 0xfe, 0x44, 0x18, 0x47, 0x02, 0x22, 0x00, 0xe0, 0x0c, 0x22, 0x28, 0x1c, 0xe1,
+ 0x49, 0x01, 0x23, 0x9e, 0x46, 0xe0, 0x4b, 0xfe, 0x44, 0x18, 0x47, 0xbb, 0xe7, 0x2f, 0x1c,
+ 0x06, 0x20, 0xa8, 0x80, 0x0e, 0x20, 0x40, 0x19, 0x40, 0x21, 0x01, 0x24, 0xa6, 0x46, 0xea,
+ 0x4a, 0xfe, 0x44, 0x10, 0x47, 0xea, 0x48, 0x01, 0x1c, 0xcf, 0x22, 0x0a, 0x72, 0x08, 0x31,
+ 0x61, 0x22, 0x0a, 0x74, 0x19, 0x21, 0x02, 0x78, 0xba, 0x73, 0x01, 0x37, 0x01, 0x30, 0x01,
+ 0x39, 0xf9, 0xd1, 0x04, 0x20, 0xe3, 0x49, 0x0a, 0x78, 0xba, 0x73, 0x01, 0x37, 0x01, 0x31,
+ 0x01, 0x38, 0xf9, 0xd1, 0x40, 0x20, 0x68, 0x80, 0x28, 0x1c, 0x81, 0x21, 0x49, 0x00, 0x00,
+ 0x22, 0xa6, 0x46, 0x92, 0x4b, 0xfe, 0x44, 0x18, 0x47, 0x8f, 0xe7, 0x4b, 0x48, 0x00, 0x21,
+ 0x06, 0x22, 0x01, 0x23, 0x9e, 0x46, 0x86, 0x4b, 0xfe, 0x44, 0x18, 0x47, 0xf8, 0xbd, 0xc0,
+ 0x46, 0x58, 0x74, 0x1a, 0x00, 0xb0, 0x63, 0x08, 0x00, 0x6b, 0x4a, 0x05, 0x00, 0x15, 0x49,
+ 0x05, 0x00, 0x30, 0xb5, 0x05, 0x1c, 0xeb, 0x48, 0x00, 0x78, 0x00, 0x28, 0x17, 0xd1, 0x01,
+ 0x24, 0xa6, 0x46, 0xe9, 0x48, 0xfe, 0x44, 0x00, 0x47, 0x00, 0x28, 0x0b, 0xd1, 0xa6, 0x46,
+ 0xe7, 0x48, 0xfe, 0x44, 0x00, 0x47, 0x01, 0x28, 0x05, 0xd0, 0xa6, 0x46, 0xe5, 0x48, 0xfe,
+ 0x44, 0x00, 0x47, 0x01, 0x28, 0x04, 0xd1, 0x00, 0x20, 0x28, 0x60, 0xe3, 0x48, 0x52, 0x30,
+ 0x28, 0x62, 0x30, 0xbd,
+
+ 0x01, 0x05, 0xff, 0xff, 0x76, 0x69, 0x08, 0x00, 0xfa, 0xc0, 0x46, 0xff, 0xff, 0x00, 0x00,
+ 0x70, 0xb5, 0xe9, 0x49, 0x80, 0x8a, 0x88, 0x42, 0x20, 0xd1, 0xe8, 0x4b, 0xe8, 0x4a, 0x00,
+ 0x21, 0x40, 0x20, 0x80, 0x5c, 0x00, 0x28, 0x0e, 0xd0, 0x18, 0x78, 0xe6, 0x4e, 0x8c, 0x00,
+ 0xe6, 0x4d, 0x2c, 0x19, 0x25, 0x6a, 0xb5, 0x42, 0x0b, 0xd8, 0x64, 0x68, 0xb4, 0x42, 0x08,
+ 0xd8, 0x01, 0x24, 0x8c, 0x40, 0xa0, 0x43, 0x18, 0x70, 0xa8, 0x32, 0x01, 0x31, 0x07, 0x29,
+ 0xe8, 0xdb, 0x70, 0xbd, 0x0a, 0x06, 0x12, 0x0e, 0x01, 0x21, 0x91, 0x40, 0x01, 0x43, 0x19,
+ 0x70, 0x70, 0xbd, 0xc0, 0x46, 0xe7, 0x46, 0x04, 0x00, 0x70, 0xb5, 0x05, 0x1c, 0xae, 0x69,
+ 0x47, 0x20, 0x00, 0x02, 0x31, 0x88, 0x09, 0x12, 0x09, 0x02, 0x81, 0x42, 0x23, 0xd1, 0x55,
+ 0x48, 0x00, 0x68, 0x00, 0x28, 0x0e, 0xd1, 0xf0, 0x88, 0x00, 0x04, 0xb1, 0x88, 0x08, 0x43,
+ 0x01, 0x24, 0xa6, 0x46, 0x4e, 0x49, 0xfe, 0x44, 0x08, 0x47, 0x30, 0x1c, 0xa6, 0x46, 0xcd,
+ 0x49, 0xfe, 0x44, 0x08, 0x47, 0x0b, 0xe0, 0x7d, 0x20, 0xc0, 0x00, 0x01, 0x24, 0xa6, 0x46,
+ 0xcb, 0x49, 0xfe, 0x44, 0x08, 0x47, 0x30, 0x1c, 0xa6, 0x46, 0x49, 0x49, 0xfe, 0x44, 0x08,
+ 0x47, 0xc6, 0x49, 0x05, 0x20, 0x00, 0x02, 0x40, 0x18, 0x28, 0x62, 0x70, 0xbd, 0xc0, 0x46,
+ 0xc9, 0xa2, 0x00, 0x00, 0x76, 0xa0, 0x1b, 0x00, 0x6d, 0x97, 0x00, 0x00, 0x88, 0xfd, 0x00,
+ 0x00, 0xc0, 0x61, 0x1a, 0x00, 0x6a, 0x0a, 0x1a, 0x00, 0x70, 0xb5, 0x05, 0x1c, 0x6e, 0x69,
+ 0x20, 0x48, 0x00, 0x78, 0x01, 0x28, 0x0f, 0xd1, 0x03, 0x20, 0xbb, 0x49, 0x03, 0x39, 0x01,
+ 0x24, 0xa6, 0x46, 0xba, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x30, 0x1c, 0xa6, 0x46, 0xb3, 0x49,
+ 0xfe, 0x44, 0x08, 0x47,
+
+ 0x01, 0x05, 0xff, 0xff, 0x70, 0x6a, 0x08, 0x00, 0xfa, 0xb4, 0x48, 0x1a, 0x30, 0x28, 0x62,
+ 0x70, 0xbd, 0x41, 0x10, 0x08, 0x00, 0x4c, 0xa6, 0x1b, 0x00, 0x30, 0xb5, 0x04, 0x1c, 0xa1,
+ 0x69, 0x00, 0x29, 0x1c, 0xd0, 0x20, 0x69, 0x02, 0x78, 0xff, 0x2a, 0x18, 0xd0, 0x8a, 0x88,
+ 0x89, 0x18, 0x08, 0x22, 0xca, 0x42, 0x13, 0xd0, 0x39, 0x22, 0x12, 0x5c, 0x0a, 0x2a, 0x0f,
+ 0xd1, 0x09, 0x7a, 0x4a, 0x08, 0x0f, 0x2a, 0x0b, 0xd1, 0xc9, 0x07, 0xc9, 0x0f, 0x0f, 0x22,
+ 0x2a, 0x23, 0x01, 0x25, 0xae, 0x46, 0xa5, 0x4d, 0xfe, 0x44, 0x28, 0x47, 0xa5, 0x48, 0xf0,
+ 0x30, 0x20, 0x62, 0x30, 0xbd, 0xc0, 0x46, 0x81, 0x08, 0x18, 0x00, 0x2f, 0x4a, 0x05, 0x00,
+ 0xfb, 0x63, 0x08, 0x00, 0x99, 0x77, 0x05, 0x00, 0x70, 0xb5, 0x85, 0xb0, 0x05, 0x1c, 0x68,
+ 0x69, 0x9d, 0x4e, 0x01, 0x24, 0x34, 0x70, 0x01, 0x7a, 0x89, 0x06, 0x09, 0x0e, 0x9b, 0x4a,
+ 0x52, 0x58, 0x69, 0x46, 0xa6, 0x46, 0xfe, 0x44, 0x10, 0x47, 0x00, 0x20, 0x30, 0x70, 0x68,
+ 0x46, 0x01, 0x7c, 0x6e, 0x46, 0x72, 0x7c, 0x14, 0x20, 0xa6, 0x46, 0x95, 0x4b, 0xfe, 0x44,
+ 0x18, 0x47, 0x68, 0x46, 0x01, 0x7c, 0x06, 0x29, 0x04, 0xd0, 0xa6, 0x46, 0x92, 0x49, 0xfe,
+ 0x44, 0x08, 0x47, 0x04, 0xe0, 0x91, 0x4a, 0x34, 0x21, 0x88, 0x5c, 0x01, 0x30, 0x88, 0x54,
+ 0x90, 0x48, 0x4e, 0x30, 0x28, 0x62, 0x05, 0xb0, 0x70, 0xbd, 0x81, 0x60, 0x00, 0x00, 0x91,
+ 0x48, 0x05, 0x00, 0x2c, 0x51, 0x08, 0x00, 0x9b, 0x60, 0x04, 0x00, 0xe9, 0x3f, 0x05, 0x00,
+ 0x03, 0x0c, 0x00, 0x00, 0x13, 0x10, 0x00, 0x00, 0xff, 0xff, 0xff, 0x1f, 0x53, 0x2c, 0x00,
+ 0x00, 0xc1, 0x50, 0x02, 0x00, 0x25, 0x00, 0x00, 0x00, 0x71, 0x8b, 0x04, 0x00, 0x9b, 0x8b,
+ 0x04, 0x00, 0xf0, 0xb5,
+
+ 0x01, 0x05, 0xff, 0xff, 0x6a, 0x6b, 0x08, 0x00, 0xfa, 0x05, 0x1c, 0x6c, 0x69, 0x2e, 0x69,
+ 0x28, 0x7f, 0x17, 0x21, 0x40, 0x1a, 0x0f, 0xd0, 0x0d, 0x38, 0x53, 0xd1, 0x01, 0x24, 0xa6,
+ 0x46, 0x7b, 0x48, 0xfe, 0x44, 0x00, 0x47, 0xa6, 0x46, 0x7a, 0x49, 0xfe, 0x44, 0x08, 0x47,
+ 0x00, 0x28, 0x48, 0xd0, 0x7a, 0x48, 0xb2, 0x38, 0x42, 0xe0, 0xff, 0x20, 0x7d, 0x30, 0x07,
+ 0x19, 0x30, 0x78, 0x38, 0x70, 0x39, 0x78, 0x02, 0x20, 0x08, 0x40, 0x38, 0x70, 0x01, 0x36,
+ 0x30, 0x1c, 0x01, 0x21, 0x8e, 0x46, 0x15, 0x49, 0xfe, 0x44, 0x08, 0x47, 0x78, 0x80, 0x02,
+ 0x36, 0x30, 0x1c, 0x01, 0x21, 0x8e, 0x46, 0x11, 0x49, 0xfe, 0x44, 0x08, 0x47, 0xb8, 0x80,
+ 0xff, 0x20, 0x83, 0x30, 0x04, 0x19, 0x02, 0x36, 0x30, 0x1c, 0x01, 0x21, 0x8e, 0x46, 0x0b,
+ 0x49, 0xfe, 0x44, 0x08, 0x47, 0x20, 0x80, 0x02, 0x36, 0x30, 0x1c, 0x01, 0x21, 0x8e, 0x46,
+ 0x07, 0x49, 0xfe, 0x44, 0x08, 0x47, 0x60, 0x80, 0xb8, 0x88, 0x79, 0x88, 0x01, 0x43, 0x49,
+ 0x08, 0x10, 0xd2, 0x21, 0x88, 0x00, 0x29, 0x0d, 0xd0, 0x42, 0x08, 0x91, 0x42, 0x0a, 0xdc,
+ 0x01, 0xe0, 0x73, 0x2c, 0x00, 0x00, 0x08, 0x28, 0x02, 0xda, 0xff, 0xe7, 0x5a, 0x48, 0x03,
+ 0xe0, 0x59, 0x48, 0x12, 0x30, 0x00, 0xe0, 0x58, 0x48, 0x56, 0x49, 0x40, 0x18, 0x28, 0x62,
+ 0xf0, 0xbd, 0xc0, 0x46, 0x69, 0x2c, 0x00, 0x00, 0x21, 0xa7, 0x05, 0x00, 0xc1, 0xad, 0x05,
+ 0x00, 0x15, 0x20, 0x00, 0x00, 0xa7, 0x50, 0x02, 0x00, 0x10, 0xb5, 0x56, 0x48, 0x00, 0x78,
+ 0x01, 0x28, 0x01, 0xd0, 0x04, 0x28, 0x08, 0xd1, 0x01, 0x24, 0xa6, 0x46, 0x4d, 0x48, 0xfe,
+ 0x44, 0x00, 0x47, 0xa6, 0x46, 0x4c, 0x48, 0xfe, 0x44, 0x00, 0x47, 0x01, 0x24, 0xa6, 0x46,
+ 0x4a, 0x48, 0xfe, 0x44,
+
+ 0x01, 0x05, 0xff, 0xff, 0x64, 0x6c, 0x08, 0x00, 0xfa, 0x00, 0x47, 0xa6, 0x46, 0x49, 0x48,
+ 0xfe, 0x44, 0x00, 0x47, 0xa6, 0x46, 0x48, 0x48, 0xfe, 0x44, 0x00, 0x47, 0x10, 0xbd, 0x91,
+ 0x1c, 0x04, 0x00, 0xb3, 0x11, 0x08, 0x00, 0xf0, 0x63, 0x08, 0x00, 0x10, 0xb5, 0x45, 0x4c,
+ 0x45, 0x48, 0x00, 0x78, 0x21, 0x78, 0x81, 0x42, 0x0d, 0xdd, 0x07, 0x21, 0x43, 0x48, 0x00,
+ 0x22, 0x40, 0x23, 0x1b, 0x5c, 0x00, 0x2b, 0x02, 0xd0, 0x52, 0x1c, 0x12, 0x06, 0x12, 0x0e,
+ 0xa8, 0x30, 0x01, 0x39, 0xf5, 0xd1, 0x22, 0x70, 0x10, 0xbd, 0xf0, 0xb5, 0x01, 0x24, 0xa6,
+ 0x46, 0x2e, 0x48, 0xfe, 0x44, 0x00, 0x47, 0xa6, 0x46, 0x2d, 0x49, 0xfe, 0x44, 0x08, 0x47,
+ 0x00, 0x28, 0x10, 0xd0, 0x11, 0x27, 0x09, 0x26, 0x36, 0x4d, 0x3e, 0x20, 0x40, 0x5d, 0xff,
+ 0x28, 0x06, 0xd0, 0x3b, 0x20, 0x47, 0x55, 0x28, 0x1c, 0xa6, 0x46, 0x33, 0x49, 0xfe, 0x44,
+ 0x08, 0x47, 0x50, 0x35, 0x01, 0x3e, 0xf1, 0xd1, 0xf0, 0xbd, 0xef, 0x22, 0x08, 0x00, 0x5d,
+ 0x8b, 0x04, 0x00, 0x7b, 0x5f, 0x03, 0x00, 0xab, 0xb9, 0x03, 0x00, 0xbf, 0x70, 0x05, 0x00,
+ 0x00, 0xb5, 0x2b, 0x48, 0x00, 0x88, 0x02, 0x28, 0x01, 0xda, 0x01, 0x21, 0x02, 0xe0, 0x40,
+ 0x1e, 0x01, 0x04, 0x09, 0x0c, 0x27, 0x48, 0x00, 0x22, 0x01, 0x23, 0x9e, 0x46, 0x26, 0x4b,
+ 0xfe, 0x44, 0x18, 0x47, 0x00, 0xbd, 0x76, 0x81, 0x00, 0x00, 0xb5, 0x63, 0x08, 0x00, 0x60,
+ 0x19, 0x08, 0x00, 0x10, 0x27, 0x00, 0x00, 0xcc, 0x24, 0x08, 0x00, 0x2d, 0x61, 0x04, 0x00,
+ 0xd5, 0xb4, 0x02, 0x00, 0xbb, 0x16, 0x04, 0x00, 0x5d, 0xf0, 0x03, 0x00, 0xae, 0x05, 0x00,
+ 0x00, 0xf5, 0xd3, 0x04, 0x00, 0x55, 0xf6, 0x00, 0x00, 0x5b, 0xf5, 0x00, 0x00, 0xfc, 0x63,
+ 0x08, 0x00, 0xb4, 0x8a,
+
+ 0x01, 0x05, 0xff, 0xff, 0x5e, 0x6d, 0x08, 0x00, 0xfa, 0x06, 0x00, 0xa9, 0xd3, 0x04, 0x00,
+ 0x61, 0x97, 0x04, 0x00, 0x28, 0x19, 0x08, 0x00, 0x57, 0x98, 0x04, 0x00, 0x37, 0x98, 0x01,
+ 0x00, 0x37, 0x9b, 0x01, 0x00, 0x0d, 0xe2, 0x00, 0x00, 0xca, 0x0c, 0x00, 0x00, 0x3a, 0x0e,
+ 0x00, 0x00, 0x33, 0x64, 0x08, 0x00, 0xc9, 0x64, 0x08, 0x00, 0xb1, 0x6c, 0x08, 0x00, 0x01,
+ 0x6d, 0x08, 0x00, 0x85, 0x6c, 0x08, 0x00, 0xe8, 0x57, 0x08, 0x00, 0xbf, 0x0f, 0x08, 0x00,
+ 0x83, 0x50, 0x08, 0x00, 0x60, 0x19, 0x08, 0x00, 0xf4, 0x46, 0x08, 0x00, 0xa5, 0x1e, 0x02,
+ 0x00, 0x8c, 0x18, 0x08, 0x00, 0x36, 0x02, 0x1a, 0x00, 0x15, 0x49, 0x05, 0x00, 0xf0, 0xb5,
+ 0x87, 0xb0, 0x06, 0x1c, 0xf0, 0x4d, 0x28, 0x78, 0x01, 0x28, 0x02, 0xd1, 0x01, 0x27, 0xff,
+ 0x03, 0x01, 0xe0, 0x7d, 0x27, 0x3f, 0x02, 0xed, 0x48, 0x00, 0x21, 0x01, 0x24, 0xa6, 0x46,
+ 0xd5, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0xe9, 0x49, 0x48, 0x43, 0x39, 0x1c, 0xa6, 0x46, 0xe9,
+ 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x01, 0x91, 0x28, 0x78, 0x01, 0x28, 0x02, 0xd1, 0x01, 0x21,
+ 0xc9, 0x03, 0x01, 0xe0, 0x7d, 0x21, 0x09, 0x02, 0xee, 0x48, 0xa6, 0x46, 0xe2, 0x4a, 0xfe,
+ 0x44, 0x10, 0x47, 0x02, 0x91, 0x76, 0x69, 0xf0, 0x7a, 0x03, 0x90, 0x30, 0x1c, 0x21, 0x1c,
+ 0xa6, 0x46, 0xf2, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x04, 0x90, 0x30, 0x1c, 0x05, 0x21, 0xa6,
+ 0x46, 0xee, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x05, 0x90, 0x30, 0x7f, 0x06, 0x90, 0xf7, 0x7e,
+ 0x00, 0x97, 0x06, 0x9b, 0x03, 0x20, 0xf1, 0x49, 0xde, 0x31, 0x04, 0x9a, 0xa6, 0x46, 0xe8,
+ 0x4e, 0xfe, 0x44, 0x30, 0x47, 0x03, 0x98, 0xff, 0x28, 0x04, 0xd0, 0x03, 0x98, 0xa6, 0x46,
+ 0xe5, 0x49, 0xfe, 0x44,
+
+ 0x01, 0x05, 0xff, 0xff, 0x58, 0x6e, 0x08, 0x00, 0xfa, 0x08, 0x47, 0x04, 0x98, 0x40, 0x1c,
+ 0x07, 0xd0, 0x04, 0x98, 0x03, 0x99, 0x06, 0x9a, 0x3b, 0x1c, 0xa6, 0x46, 0xe1, 0x4e, 0xfe,
+ 0x44, 0x30, 0x47, 0xe5, 0x48, 0x00, 0x78, 0x02, 0x28, 0x00, 0xd0, 0xb2, 0xe0, 0x28, 0x78,
+ 0xdd, 0x4e, 0x01, 0x2f, 0x52, 0xd0, 0xb1, 0x89, 0x01, 0x28, 0x02, 0xd1, 0x01, 0x20, 0xc0,
+ 0x03, 0x01, 0xe0, 0x7d, 0x20, 0x00, 0x02, 0x04, 0x99, 0x48, 0x43, 0xd8, 0x49, 0x08, 0x18,
+ 0xbb, 0x49, 0xa6, 0x46, 0xd7, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0xb1, 0x81, 0x28, 0x78, 0x01,
+ 0x28, 0x02, 0xd1, 0x01, 0x20, 0xc0, 0x03, 0x01, 0xe0, 0x7d, 0x20, 0x00, 0x02, 0xd2, 0x4d,
+ 0x0f, 0x27, 0x29, 0x88, 0x39, 0x40, 0x2a, 0x88, 0x12, 0x09, 0x3a, 0x40, 0x8a, 0x42, 0x04,
+ 0xdd, 0x29, 0x88, 0x09, 0x11, 0x09, 0x07, 0x0f, 0x0f, 0x01, 0xe0, 0x29, 0x88, 0x0f, 0x40,
+ 0x04, 0x99, 0x41, 0x43, 0xc7, 0x48, 0x40, 0x18, 0xaa, 0x49, 0xa6, 0x46, 0xc6, 0x4a, 0xfe,
+ 0x44, 0x10, 0x47, 0x30, 0x1c, 0x9c, 0x30, 0x00, 0x88, 0x1f, 0x22, 0x10, 0x40, 0x40, 0x18,
+ 0xa9, 0x89, 0x11, 0x40, 0x08, 0x18, 0x31, 0x8a, 0x08, 0x18, 0xe4, 0x49, 0x09, 0x88, 0x09,
+ 0x0a, 0x08, 0x18, 0xe2, 0x49, 0x09, 0x89, 0x09, 0x0a, 0x08, 0x18, 0x39, 0x18, 0x06, 0x98,
+ 0x40, 0x18, 0x05, 0x30, 0x01, 0x04, 0x09, 0x0c, 0x9c, 0x48, 0x00, 0x22, 0xa6, 0x46, 0xed,
+ 0x4b, 0xfe, 0x44, 0x18, 0x47, 0x50, 0xe0, 0x31, 0x88, 0x01, 0x28, 0x02, 0xd1, 0x01, 0x20,
+ 0xc0, 0x03, 0x01, 0xe0, 0x7d, 0x20, 0x00, 0x02, 0x04, 0x99, 0x48, 0x43, 0xae, 0x49, 0x08,
+ 0x18, 0x91, 0x49, 0xa6, 0x46, 0xad, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x31, 0x80, 0x28, 0x78,
+ 0x01, 0x28, 0x02, 0xd1,
+
+ 0x01, 0x05, 0xff, 0xff, 0x52, 0x6f, 0x08, 0x00, 0xfa, 0x01, 0x20, 0xc0, 0x03, 0x01, 0xe0,
+ 0x7d, 0x20, 0x00, 0x02, 0xa8, 0x4d, 0x0f, 0x27, 0xa9, 0x88, 0x09, 0x09, 0x39, 0x40, 0xaa,
+ 0x88, 0x3a, 0x40, 0x8a, 0x42, 0x03, 0xdd, 0xa9, 0x88, 0x09, 0x07, 0x0f, 0x0f, 0x02, 0xe0,
+ 0xa9, 0x88, 0x09, 0x09, 0x0f, 0x40, 0x04, 0x99, 0x41, 0x43, 0x9d, 0x48, 0x40, 0x18, 0x80,
+ 0x49, 0xa6, 0x46, 0x9c, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x30, 0x89, 0x1f, 0x22, 0x10, 0x40,
+ 0x40, 0x18, 0xb1, 0x88, 0x11, 0x40, 0x08, 0x18, 0x29, 0x89, 0x11, 0x40, 0x08, 0x18, 0xbb,
+ 0x49, 0x09, 0x88, 0x09, 0x0a, 0x08, 0x18, 0xb9, 0x49, 0x09, 0x89, 0x09, 0x0a, 0x08, 0x18,
+ 0x39, 0x18, 0x06, 0x98, 0x40, 0x18, 0x05, 0x30, 0x01, 0x04, 0x09, 0x0c, 0x73, 0x48, 0x00,
+ 0x22, 0xa6, 0x46, 0xc4, 0x4b, 0xfe, 0x44, 0x18, 0x47, 0x01, 0x98, 0x02, 0x99, 0x41, 0x18,
+ 0x8c, 0x48, 0x40, 0x18, 0xde, 0x49, 0xa6, 0x46, 0x88, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x07,
+ 0xe0, 0x88, 0x48, 0x01, 0x99, 0x40, 0x18, 0xda, 0x49, 0xa6, 0x46, 0x84, 0x4a, 0xfe, 0x44,
+ 0x10, 0x47, 0xc8, 0x1c, 0xd6, 0x49, 0x08, 0x80, 0xd7, 0x48, 0x05, 0x99, 0x49, 0x1c, 0x01,
+ 0xd0, 0x59, 0x30, 0x00, 0xe0, 0x61, 0x30, 0x07, 0xb0, 0xf0, 0xbd, 0x70, 0xb5, 0x06, 0x1c,
+ 0x01, 0x25, 0xae, 0x46, 0xeb, 0x48, 0xfe, 0x44, 0x00, 0x47, 0xeb, 0x48, 0xae, 0x46, 0xeb,
+ 0x49, 0xfe, 0x44, 0x08, 0x47, 0xea, 0x48, 0x00, 0x78, 0xea, 0x4c, 0x00, 0x28, 0x04, 0xd1,
+ 0xae, 0x46, 0xe9, 0x48, 0xfe, 0x44, 0x00, 0x47, 0x03, 0xe0, 0xae, 0x46, 0xe8, 0x49, 0xfe,
+ 0x44, 0x08, 0x47, 0x60, 0x62, 0x74, 0x61, 0x60, 0x6a, 0x70, 0x60, 0xe5, 0x48, 0x4f, 0x30,
+ 0x70, 0xbd, 0xc0, 0x1e,
+
+ 0x01, 0x05, 0xff, 0xff, 0x4c, 0x70, 0x08, 0x00, 0xfa, 0x02, 0xd0, 0x02, 0x38, 0x02, 0xd0,
+ 0x03, 0xe0, 0xe2, 0x48, 0xf7, 0x46, 0xe2, 0x48, 0xf7, 0x46, 0x00, 0x20, 0xc0, 0x43, 0xf7,
+ 0x46, 0xf0, 0xb5, 0xc2, 0x69, 0x11, 0x06, 0x09, 0x0e, 0xd9, 0x4c, 0x27, 0x68, 0x66, 0x4b,
+ 0x1b, 0x78, 0xdd, 0x4e, 0x02, 0x2b, 0x03, 0xd0, 0x42, 0x60, 0x30, 0x1c, 0x51, 0x30, 0xf0,
+ 0xbd, 0x08, 0x1c, 0x01, 0x25, 0xae, 0x46, 0xea, 0x49, 0xfe, 0x44, 0x08, 0x47, 0xe1, 0x69,
+ 0xd4, 0x48, 0x02, 0x1c, 0x52, 0x00, 0x91, 0x42, 0x01, 0xd0, 0x81, 0x42, 0x1e, 0xd1, 0xa0,
+ 0x6a, 0xeb, 0x49, 0x88, 0x42, 0x04, 0xd0, 0xea, 0x49, 0x88, 0x42, 0x03, 0xd1, 0xea, 0x48,
+ 0x00, 0xe0, 0xea, 0x48, 0x20, 0x60, 0x36, 0x48, 0x1a, 0x30, 0x0c, 0x21, 0xae, 0x46, 0xe9,
+ 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x41, 0x1c, 0x20, 0x68, 0xae, 0x46, 0x4d, 0x4a, 0xfe, 0x44,
+ 0x10, 0x47, 0x21, 0x61, 0xae, 0x46, 0xe2, 0x48, 0xfe, 0x44, 0x00, 0x47, 0x27, 0x60, 0x03,
+ 0xe0, 0xae, 0x46, 0xdf, 0x48, 0xfe, 0x44, 0x00, 0x47, 0x30, 0x1c, 0x59, 0x30, 0xf0, 0xbd,
+ 0x40, 0x1e, 0x80, 0x00, 0xde, 0x4b, 0x19, 0x50, 0xdc, 0x49, 0x0a, 0x50, 0xf7, 0x46, 0x80,
+ 0x69, 0xb8, 0x21, 0x09, 0x5c, 0x01, 0x29, 0x06, 0xd0, 0xb5, 0x21, 0x08, 0x5c, 0x60, 0x21,
+ 0x41, 0x43, 0xd8, 0x4a, 0x00, 0x20, 0x50, 0x54, 0xd8, 0x48, 0x1b, 0x30, 0xf7, 0x46, 0x10,
+ 0xb5, 0x04, 0x1c, 0xd6, 0x48, 0x00, 0x68, 0x01, 0x21, 0x8e, 0x46, 0xd5, 0x49, 0xfe, 0x44,
+ 0x08, 0x47, 0xe0, 0x68, 0x0c, 0x30, 0xe0, 0x60, 0xd3, 0x48, 0xff, 0x30, 0x02, 0x30, 0x10,
+ 0xbd, 0xa7, 0x4a, 0x05, 0x00, 0x30, 0xb5, 0x42, 0x69, 0x11, 0x88, 0x09, 0x06, 0x0b, 0x0e,
+ 0xcf, 0x49, 0x02, 0x2b,
+
+ 0x01, 0x05, 0xff, 0xff, 0x46, 0x71, 0x08, 0x00, 0xfa, 0x1a, 0xd1, 0xca, 0x4b, 0x1b, 0x6b,
+ 0x9b, 0x68, 0xdb, 0x88, 0x01, 0x24, 0xa4, 0x02, 0x1d, 0x05, 0xad, 0x0f, 0xad, 0x02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, 0x28, 0x02, 0xd0, 0x28, 0x1c, 0xcf, 0x30, 0x70, 0xbd, 0x00, 0x20, 0x20, 0x60, 0x70,
+ 0x60, 0x28, 0x1c, 0xff, 0x30, 0x20, 0x30, 0x70, 0xbd, 0xc0, 0x46, 0xc9, 0x49, 0x05, 0x00,
+ 0x10, 0xb5, 0x9c, 0x49, 0x11, 0x31, 0x06, 0x22, 0x00, 0x23, 0x0c, 0x78, 0xff, 0x2c, 0x02,
+ 0xd1, 0x5b, 0x1c, 0x1b, 0x06, 0x1b, 0x0e, 0xdc, 0x31, 0x01, 0x3a, 0xf6, 0xd1, 0x43, 0x60,
+ 0xa7, 0x48, 0x19, 0x30, 0x10, 0xbd, 0x01, 0x1c, 0xa7, 0x4b, 0x1a, 0x78, 0xa5, 0x48, 0x05,
+ 0x2a, 0x04, 0xd1, 0xa5, 0x4a, 0x12, 0x68, 0x12, 0x78, 0x01, 0x2a, 0x02, 0xd0, 0x4b, 0x60,
+ 0x5b, 0x30, 0xf7, 0x46, 0x7d, 0x30, 0xf7, 0x46, 0x10, 0xb5, 0x01, 0x1c, 0xa0, 0x48, 0x00,
+ 0x68, 0xa1, 0x4c, 0x00, 0x28, 0x0b, 0xd0, 0x88, 0x69, 0x09, 0x7a, 0x01, 0x22, 0x96, 0x46,
+ 0x9d, 0x4a, 0xfe, 0x44,
+
+ 0x01, 0x05, 0xff, 0xff, 0x3a, 0x73, 0x08, 0x00, 0xfa, 0x10, 0x47, 0x00, 0x28, 0x02, 0xd0,
+ 0x20, 0x1c, 0x21, 0x30, 0x10, 0xbd, 0x20, 0x1c, 0x33, 0x30, 0x10, 0xbd, 0x48, 0x53, 0x08,
+ 0x00, 0xe2, 0x04, 0x00, 0x00, 0x71, 0x55, 0x00, 0x00, 0xf8, 0xb5, 0x81, 0x69, 0x00, 0x91,
+ 0x92, 0x4c, 0x25, 0x1c, 0x0c, 0x3d, 0xe9, 0x68, 0x08, 0x22, 0x57, 0x18, 0x40, 0x69, 0x90,
+ 0x4a, 0x00, 0x28, 0x02, 0xd0, 0x10, 0x1c, 0xd3, 0x30, 0xf8, 0xbd, 0x00, 0x26, 0x04, 0xe0,
+ 0x70, 0x1c, 0x06, 0x06, 0x36, 0x0e, 0x06, 0x37, 0x21, 0x68, 0x48, 0x88, 0x86, 0x42, 0x14,
+ 0xda, 0x38, 0x1c, 0x00, 0x99, 0x01, 0x22, 0x96, 0x46, 0x87, 0x4a, 0xfe, 0x44, 0x10, 0x47,
+ 0x00, 0x28, 0xee, 0xd1, 0x0c, 0x34, 0xe8, 0x68, 0x41, 0x88, 0x01, 0x20, 0x88, 0x40, 0xe1,
+ 0x6f, 0x81, 0x43, 0xe1, 0x67, 0xe9, 0x68, 0x48, 0x88, 0x01, 0x38, 0x48, 0x80, 0x7e, 0x48,
+ 0xff, 0x30, 0x14, 0x30, 0xf8, 0xbd, 0xc0, 0x46, 0xc1, 0x0b, 0x04, 0x00, 0x98, 0x3a, 0x00,
+ 0x00, 0xbb, 0x16, 0x04, 0x00, 0xc2, 0x4f, 0x08, 0x00, 0x24, 0x56, 0x08, 0x00, 0x6d, 0x0b,
+ 0x04, 0x00, 0x4b, 0x70, 0x08, 0x00, 0xc9, 0x4c, 0x02, 0x00, 0x00, 0x59, 0x00, 0x01, 0x40,
+ 0x31, 0xf7, 0x00, 0xdd, 0xd6, 0x02, 0x00, 0x70, 0xb5, 0x72, 0x48, 0x05, 0x78, 0x00, 0x24,
+ 0x71, 0x48, 0x00, 0x88, 0x80, 0x09, 0x10, 0xd3, 0x01, 0x20, 0x06, 0x1c, 0x86, 0x46, 0x6f,
+ 0x49, 0xfe, 0x44, 0x08, 0x47, 0x00, 0x28, 0x08, 0xd0, 0x3f, 0x22, 0x6d, 0x49, 0x08, 0x78,
+ 0x02, 0x28, 0x03, 0xd1, 0x50, 0x5c, 0x00, 0x28, 0x00, 0xd0, 0x34, 0x1c, 0x6a, 0x48, 0xff,
+ 0x2d, 0x01, 0xd0, 0x00, 0x2c, 0x01, 0xd0, 0x41, 0x30, 0x70, 0xbd, 0x0d, 0x30, 0x70, 0xbd,
+ 0xd1, 0xcd, 0x02, 0x00,
+
+ 0x01, 0x05, 0xff, 0xff, 0x34, 0x74, 0x08, 0x00, 0xfa, 0x01, 0x1c, 0x66, 0x48, 0x02, 0x78,
+ 0x64, 0x48, 0x00, 0x2a, 0x01, 0xd0, 0xed, 0x30, 0xf7, 0x46, 0x41, 0x22, 0x4a, 0x60, 0x39,
+ 0x30, 0xf7, 0x46, 0x00, 0x5a, 0x62, 0x02, 0x00, 0x6c, 0xdc, 0x02, 0x38, 0x58, 0xdb, 0x02,
+ 0xcc, 0xb5, 0x62, 0x02, 0x99, 0x29, 0x03, 0x00, 0x57, 0x4a, 0x05, 0x00, 0x04, 0xf3, 0x1a,
+ 0x00, 0x80, 0x7b, 0x08, 0x00, 0x76, 0xa0, 0x1b, 0x00, 0x6d, 0x97, 0x00, 0x00, 0x6c, 0x55,
+ 0x08, 0x00, 0x4f, 0x61, 0x04, 0x00, 0x39, 0xc1, 0x02, 0x00, 0x7d, 0xc4, 0x02, 0x00, 0xf8,
+ 0xb5, 0x06, 0x1c, 0x75, 0x69, 0xb7, 0x69, 0x31, 0x6a, 0x30, 0x7f, 0x00, 0x28, 0x2d, 0xd1,
+ 0x01, 0x21, 0xa8, 0x8d, 0x18, 0x28, 0x27, 0xdc, 0x50, 0x48, 0x00, 0x78, 0x00, 0x90, 0x00,
+ 0x24, 0x01, 0x22, 0xa2, 0x40, 0x00, 0x98, 0x10, 0x42, 0x1b, 0xd0, 0x49, 0x48, 0x20, 0x5c,
+ 0x11, 0x21, 0x49, 0x01, 0x41, 0x43, 0x47, 0x48, 0x41, 0x18, 0xff, 0x20, 0x1e, 0x30, 0x40,
+ 0x5c, 0x01, 0x28, 0x01, 0xd1, 0x02, 0x20, 0x00, 0xe0, 0x00, 0x20, 0xc9, 0x78, 0x08, 0x18,
+ 0x44, 0x49, 0x08, 0x5c, 0xa9, 0x8d, 0x01, 0x22, 0x96, 0x46, 0x43, 0x4a, 0xfe, 0x44, 0x10,
+ 0x47, 0x48, 0x1c, 0x01, 0x06, 0x09, 0x0e, 0x01, 0x34, 0x07, 0x2c, 0xdb, 0xdb, 0xa8, 0x8d,
+ 0x01, 0xe0, 0x48, 0x7d, 0xa9, 0x8d, 0x48, 0x43, 0x39, 0x68, 0x40, 0x18, 0x80, 0x01, 0x80,
+ 0x09, 0x38, 0x60, 0x70, 0x60, 0x36, 0x48, 0x5d, 0x30, 0xf8, 0xbd, 0x01, 0x1c, 0x4a, 0x68,
+ 0x13, 0x06, 0x1b, 0x0e, 0x36, 0x48, 0x03, 0xd1, 0x22, 0x4b, 0x1b, 0x78, 0x03, 0x2b, 0x05,
+ 0xd0, 0x00, 0x2a, 0x01, 0xd0, 0x1d, 0x30, 0xf7, 0x46, 0xff, 0x30, 0xf7, 0x46, 0x13, 0x4a,
+ 0x30, 0x23, 0x9b, 0x5c,
+
+ 0x01, 0x05, 0xff, 0xff, 0x2e, 0x75, 0x08, 0x00, 0xfa, 0x00, 0x2b, 0x07, 0xd1, 0x30, 0x4b,
+ 0x92, 0x88, 0x9a, 0x42, 0x03, 0xd1, 0x2d, 0x4a, 0x12, 0x78, 0x00, 0x2a, 0x01, 0xd0, 0x00,
+ 0x22, 0x00, 0xe0, 0x07, 0x22, 0x4a, 0x60, 0xff, 0x30, 0xa2, 0x30, 0xf7, 0x46, 0x5c, 0x27,
+ 0x08, 0x00, 0x4b, 0x1e, 0x04, 0x00, 0x05, 0x5e, 0x02, 0x00, 0x40, 0x69, 0x78, 0x21, 0x09,
+ 0x5a, 0x25, 0x48, 0xac, 0x29, 0x01, 0xda, 0x3b, 0x30, 0xf7, 0x46, 0x89, 0x30, 0xf7, 0x46,
+ 0xc9, 0x98, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x00, 0x48, 0x25, 0x08, 0x00, 0x6a, 0x0a, 0x00,
+ 0x00, 0x47, 0x93, 0x02, 0x00, 0xb2, 0x2f, 0x08, 0x00, 0x49, 0xa0, 0x02, 0x00, 0x25, 0x6e,
+ 0x03, 0x00, 0x3c, 0x91, 0x06, 0x00, 0x17, 0x62, 0x04, 0x00, 0xef, 0x8a, 0x04, 0x00, 0xd9,
+ 0xae, 0x02, 0x00, 0x41, 0x10, 0x08, 0x00, 0xa8, 0x63, 0x08, 0x00, 0xec, 0x0e, 0x08, 0x00,
+ 0x5d, 0x86, 0x01, 0x00, 0xdd, 0xf8, 0x03, 0x00, 0x79, 0x1c, 0x04, 0x00, 0xc2, 0x22, 0x08,
+ 0x00, 0x7a, 0x7f, 0x1a, 0x00, 0x93, 0x68, 0x04, 0x00, 0xe4, 0x21, 0x08, 0x00, 0xe9, 0xcb,
+ 0x01, 0x00, 0xdd, 0x84, 0x01, 0x00, 0xfc, 0x63, 0x08, 0x00, 0x00, 0x16, 0x08, 0x00, 0x00,
+ 0x00, 0x08, 0x00, 0x09, 0x82, 0x01, 0x00, 0xb5, 0x63, 0x08, 0x00, 0xac, 0x63, 0x08, 0x00,
+ 0x6d, 0x94, 0x05, 0x00, 0xbd, 0x7b, 0x03, 0x00, 0xf5, 0x50, 0x08, 0x00, 0xff, 0xff, 0x00,
+ 0x00, 0xe5, 0x85, 0x00, 0x00, 0xff, 0xb5, 0x68, 0x46, 0xff, 0xf7, 0x3e, 0xfa, 0xff, 0xbd,
+ 0xff, 0xb5, 0x68, 0x46, 0xff, 0xf7, 0x1d, 0xfa, 0xff, 0xbd, 0xff, 0xb5, 0x68, 0x46, 0xff,
+ 0xf7, 0xb2, 0xf9, 0xff, 0xbd, 0xff, 0xb5, 0x68, 0x46, 0xff, 0xf7, 0x0d, 0xfb, 0xff, 0xbd,
+ 0xff, 0xb5, 0x68, 0x46,
+
+ 0x01, 0x05, 0xff, 0x65, 0x28, 0x76, 0x08, 0x00, 0x60, 0xff, 0xf7, 0x9e, 0xfa, 0xff, 0xbd,
+ 0xff, 0xb5, 0x68, 0x46, 0xff, 0xf7, 0x51, 0xfa, 0xff, 0xbd, 0xff, 0xb5, 0x68, 0x46, 0xfe,
+ 0xf7, 0xfa, 0xff, 0xff, 0xbd, 0xff, 0xb5, 0x68, 0x46, 0xff, 0xf7, 0x04, 0xf8, 0xff, 0xbd,
+ 0xff, 0xb5, 0x68, 0x46, 0xfe, 0xf7, 0x74, 0xff, 0xff, 0xbd, 0xff, 0xb5, 0x68, 0x46, 0xfe,
+ 0xf7, 0xaf, 0xff, 0xff, 0xbd, 0xff, 0xb5, 0x68, 0x46, 0xff, 0xf7, 0x68, 0xf9, 0xff, 0xbd,
+ 0xff, 0xb5, 0x68, 0x46, 0xff, 0xf7, 0xaf, 0xf9, 0xff, 0xbd, 0xff, 0xb5, 0x68, 0x46, 0xff,
+ 0xf7, 0x17, 0xf8, 0xff, 0xbd, 0xff, 0xb5, 0x68, 0x46, 0xff, 0xf7, 0xa5, 0xf8, 0xff, 0xbd,
+
+
+ 0x01, 0x05, 0xff, 0x8d, 0x78, 0x7b, 0x08, 0x00, 0x88, 0x00, 0xb5, 0xf8, 0xf0, 0x31, 0xfd,
+ 0x00, 0xbd, 0x95, 0x71, 0x08, 0x00, 0x15, 0x71, 0x08, 0x00, 0x39, 0x71, 0x08, 0x00, 0xc1,
+ 0x71, 0x08, 0x00, 0xc1, 0x71, 0x08, 0x00, 0xf5, 0x06, 0x18, 0x00, 0xf7, 0x70, 0x08, 0x00,
+ 0x0d, 0x72, 0x08, 0x00, 0x95, 0x72, 0x08, 0x00, 0xdd, 0x72, 0x08, 0x00, 0x01, 0x73, 0x08,
+ 0x00, 0x21, 0x73, 0x08, 0x00, 0xed, 0x73, 0x08, 0x00, 0xbd, 0x6d, 0x08, 0x00, 0x59, 0x07,
+ 0x18, 0x00, 0x35, 0x74, 0x08, 0x00, 0x85, 0x74, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59,
+ 0x73, 0x08, 0x00, 0x09, 0x75, 0x08, 0x00, 0x63, 0x70, 0x08, 0x00, 0x5d, 0x75, 0x08, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+
+ 0x01, 0x05, 0xff, 0x85, 0x04, 0xf3, 0x1a, 0x00, 0x80, 0x36, 0x5e, 0x02, 0x00, 0x38, 0xc2,
+ 0x02, 0x00, 0x00, 0xc5, 0x02, 0x00, 0x9c, 0x9c, 0x00, 0x00, 0x08, 0x9c, 0x00, 0x00, 0x02,
+ 0x69, 0x00, 0x00, 0x84, 0x97, 0x00, 0x00, 0x6a, 0xa0, 0x02, 0x00, 0xf0, 0x6e, 0x03, 0x00,
+ 0xf0, 0x8a, 0x04, 0x00, 0x32, 0xaf, 0x02, 0x00, 0xf4, 0xf8, 0x03, 0x00, 0xf4, 0xcb, 0x01,
+ 0x00, 0xa8, 0x55, 0x00, 0x00, 0x00, 0x16, 0x04, 0x00, 0x14, 0x85, 0x01, 0x00, 0x54, 0x82,
+ 0x01, 0x00, 0xff, 0xff, 0xff, 0xff, 0xac, 0xf9, 0x03, 0x00, 0xd6, 0x7b, 0x03, 0x00, 0x2c,
+ 0xd7, 0x02, 0x00, 0x1c, 0x86, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff,
+
+ 0x01, 0x05, 0xff, 0xff, 0x00, 0x00, 0x18, 0x00, 0xfa, 0xf0, 0xb5, 0x8c, 0xb0, 0xad, 0x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 0x00, 0x99, 0x01, 0x60, 0x01, 0x99, 0x41, 0x60, 0x02, 0x99, 0x01, 0x62, 0x03,
+ 0x99, 0x41, 0x62, 0x04, 0x99, 0x01, 0x63, 0x05, 0x99, 0x41, 0x63, 0x06, 0x99, 0x81, 0x64,
+ 0x07, 0x99, 0xc1, 0x64, 0x08, 0x99, 0x01, 0x66, 0x09, 0x99, 0x41, 0x66, 0x9c, 0x30, 0x21,
+ 0x1c, 0x8e, 0x46, 0xca, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0xd0, 0x48, 0x00, 0x78, 0x01, 0x28,
+ 0x00, 0xd1, 0xa3, 0xe0,
+
+ 0x01, 0x05, 0xff, 0xff, 0xfa, 0x00, 0x18, 0x00, 0xfa, 0x00, 0x28, 0x00, 0xd1, 0xda, 0xe0,
+ 0x02, 0x28, 0x00, 0xd0, 0xd7, 0xe0, 0x30, 0x1c, 0x05, 0x21, 0xbe, 0x46, 0xf9, 0x4a, 0xfe,
+ 0x44, 0x10, 0x47, 0x01, 0x1c, 0xc8, 0x48, 0x00, 0x22, 0xbe, 0x46, 0xc2, 0x4b, 0xfe, 0x44,
+ 0x18, 0x47, 0xa8, 0x78, 0x00, 0x28, 0x16, 0xd1, 0x13, 0x20, 0xc5, 0x49, 0x08, 0x80, 0x03,
+ 0x25, 0x29, 0x1c, 0x20, 0x1c, 0xa6, 0x46, 0xc3, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0xb8, 0x48,
+ 0x29, 0x1c, 0xbe, 0x46, 0xb4, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0xb6, 0x48, 0x00, 0x21, 0x0c,
+ 0x22, 0xbe, 0x46, 0xb5, 0x4b, 0xfe, 0x44, 0x18, 0x47, 0xaa, 0x4e, 0x06, 0x3e, 0x30, 0x1c,
+ 0x02, 0x21, 0x00, 0x22, 0xbe, 0x46, 0xb9, 0x4b, 0xfe, 0x44, 0x18, 0x47, 0xa6, 0x4d, 0x04,
+ 0x3d, 0xb8, 0x4f, 0x38, 0x1c, 0xc8, 0x38, 0x28, 0x60, 0x30, 0x1c, 0x03, 0x21, 0x00, 0x22,
+ 0xa6, 0x46, 0xb3, 0x4b, 0xfe, 0x44, 0x18, 0x47, 0x2f, 0x60, 0x30, 0x1c, 0x04, 0x21, 0x00,
+ 0x22, 0xa6, 0x46, 0xaf, 0x4b, 0xfe, 0x44, 0x18, 0x47, 0xaf, 0x4f, 0x38, 0x1c, 0xd1, 0x38,
+ 0x28, 0x60, 0x30, 0x1c, 0x05, 0x21, 0x00, 0x22, 0xa6, 0x46, 0xa9, 0x4b, 0xfe, 0x44, 0x18,
+ 0x47, 0x2f, 0x60, 0x30, 0x1c, 0x06, 0x21, 0x00, 0x22, 0xa6, 0x46, 0xa5, 0x4b, 0xfe, 0x44,
+ 0x18, 0x47, 0x38, 0x1c, 0x32, 0x30, 0x28, 0x60, 0x30, 0x1c, 0x07, 0x21, 0x00, 0x22, 0xa6,
+ 0x46, 0xa0, 0x4b, 0xfe, 0x44, 0x18, 0x47, 0x38, 0x1c, 0x62, 0x30, 0x28, 0x60, 0x30, 0x1c,
+ 0x08, 0x21, 0x00, 0x22, 0xa6, 0x46, 0x9b, 0x4b, 0xfe, 0x44, 0x18, 0x47, 0xc2, 0x37, 0x2f,
+ 0x60, 0x30, 0x1c, 0x09, 0x21, 0x00, 0x22, 0xa6, 0x46, 0x97, 0x4b, 0xfe, 0x44, 0x18, 0x47,
+ 0xea, 0x48, 0x28, 0x60,
+
+ 0x01, 0x05, 0xff, 0xff, 0xf4, 0x01, 0x18, 0x00, 0xfa, 0x30, 0x1c, 0x0a, 0x21, 0x00, 0x22,
+ 0xa6, 0x46, 0x92, 0x4b, 0xfe, 0x44, 0x18, 0x47, 0xe7, 0x48, 0x28, 0x60, 0x30, 0x1c, 0x0b,
+ 0x21, 0x00, 0x22, 0xa6, 0x46, 0x8e, 0x4b, 0xfe, 0x44, 0x18, 0x47, 0xe3, 0x48, 0x28, 0x60,
+ 0xe3, 0x48, 0x00, 0x88, 0x80, 0x0b, 0x4a, 0xd3, 0x00, 0x22, 0x10, 0x1c, 0xc3, 0x00, 0x82,
+ 0x49, 0x06, 0x39, 0xc9, 0x18, 0x0c, 0x88, 0x24, 0x06, 0x24, 0x0e, 0x0c, 0x80, 0x7e, 0x49,
+ 0x04, 0x39, 0xca, 0x52, 0x01, 0x30, 0x14, 0x28, 0xf1, 0xdb, 0x39, 0xe0, 0xbe, 0x46, 0xd9,
+ 0x48, 0xfe, 0x44, 0x00, 0x47, 0xbe, 0x46, 0xda, 0x48, 0xfe, 0x44, 0x00, 0x47, 0xc0, 0x06,
+ 0xc0, 0x0e, 0x81, 0x02, 0xd6, 0x48, 0x00, 0x78, 0x40, 0x06, 0x40, 0x0e, 0x08, 0x43, 0x03,
+ 0x21, 0x09, 0x02, 0x01, 0x43, 0xd1, 0x48, 0x00, 0x68, 0x81, 0x86, 0xd3, 0x48, 0x04, 0x70,
+ 0xd4, 0x48, 0xd2, 0x49, 0x08, 0x80, 0xd3, 0x4d, 0x28, 0x1c, 0x08, 0x38, 0x02, 0x21, 0xbe,
+ 0x46, 0x64, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x28, 0x1c, 0x07, 0x21, 0x0c, 0x22, 0xbe, 0x46,
+ 0xce, 0x4b, 0xfe, 0x44, 0x18, 0x47, 0x00, 0x26, 0x32, 0x1c, 0xce, 0x4d, 0x28, 0x1c, 0x04,
+ 0x38, 0x37, 0x21, 0xbe, 0x46, 0xca, 0x4b, 0xfe, 0x44, 0x18, 0x47, 0x28, 0x1c, 0x31, 0x1c,
+ 0xbe, 0x46, 0x58, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x0c, 0xb0, 0xf0, 0xbd, 0xc0, 0x46, 0xa4,
+ 0x62, 0x08, 0x00, 0xac, 0x62, 0x08, 0x00, 0x60, 0x56, 0x08, 0x00, 0xf0, 0xb5, 0x5a, 0x48,
+ 0x00, 0x78, 0x01, 0x28, 0x44, 0xd0, 0x00, 0x28, 0x34, 0xd0, 0x02, 0x28, 0x00, 0xd0, 0x90,
+ 0xe0, 0xbe, 0x49, 0x48, 0x20, 0x40, 0x18, 0x03, 0x88, 0x01, 0x22, 0x1a, 0x43, 0x02, 0x80,
+ 0xaf, 0x4a, 0x70, 0x3a,
+
+ 0x01, 0x05, 0xff, 0xff, 0xee, 0x02, 0x18, 0x00, 0xfa, 0x13, 0x88, 0x9b, 0x10, 0x9b, 0x00,
+ 0x13, 0x80, 0x7c, 0x23, 0x82, 0x8e, 0x9a, 0x43, 0x32, 0x23, 0x13, 0x43, 0x83, 0x86, 0xb6,
+ 0x48, 0x7a, 0x30, 0x02, 0x88, 0x52, 0x09, 0x53, 0x01, 0x08, 0x22, 0x1a, 0x43, 0x02, 0x80,
+ 0x08, 0x88, 0x40, 0x10, 0x40, 0x00, 0x08, 0x80, 0xf3, 0x4b, 0xff, 0x24, 0x18, 0x88, 0x20,
+ 0x40, 0x03, 0x22, 0x12, 0x02, 0x02, 0x43, 0x1a, 0x80, 0x18, 0x89, 0x20, 0x40, 0xff, 0x22,
+ 0x01, 0x32, 0x02, 0x43, 0x1a, 0x81, 0x02, 0x22, 0x08, 0x88, 0x90, 0x43, 0x08, 0x80, 0xf0,
+ 0xbd, 0x07, 0x21, 0x09, 0x02, 0xea, 0x48, 0xc2, 0x38, 0x0a, 0x1c, 0x01, 0x24, 0xa6, 0x46,
+ 0xe7, 0x4b, 0xfe, 0x44, 0x18, 0x47, 0x99, 0x48, 0x01, 0x38, 0x04, 0x70, 0xf0, 0xbd, 0x00,
+ 0x26, 0xe4, 0x48, 0x31, 0x1c, 0x02, 0x22, 0x01, 0x24, 0xa6, 0x46, 0xe0, 0x4b, 0xfe, 0x44,
+ 0x18, 0x47, 0x96, 0x4d, 0x28, 0x1c, 0x08, 0x38, 0x02, 0x21, 0xa6, 0x46, 0x26, 0x4a, 0xfe,
+ 0x44, 0x10, 0x47, 0x02, 0x35, 0x28, 0x1c, 0x07, 0x27, 0x31, 0x1c, 0x0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xe8, 0x57, 0x08, 0x00, 0x6a,
+ 0x31, 0x19, 0x00, 0xc4, 0x61, 0x1a, 0x00, 0x9e, 0x13, 0x08, 0x00, 0x21, 0x99, 0x05, 0x00,
+ 0xff, 0x48, 0x05, 0x00, 0xdc, 0x09, 0x04, 0x00, 0x25, 0x0d, 0x04, 0x00, 0xf0, 0xb5, 0xba,
+ 0xb0, 0xa5, 0x4d, 0x2e, 0x1c, 0x56, 0x36, 0x30, 0x1c, 0x08, 0x21, 0x01, 0x24, 0xa6, 0x46,
+ 0xc0, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x00, 0x06, 0x00, 0x0e, 0x37, 0x90, 0x30, 0x1c, 0x00,
+ 0x21, 0xa6, 0x46, 0xbc, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x06, 0x04, 0x28, 0x1c, 0x54, 0x30,
+ 0x00, 0x88, 0x06, 0x43, 0x2f, 0x1c, 0x52, 0x37, 0x38, 0x1c, 0x08, 0x21, 0xa6, 0x46, 0xb7,
+ 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x00, 0x06, 0x00, 0x0e, 0x38, 0x90, 0x50, 0x35, 0x28, 0x1c,
+ 0x00, 0x21, 0xa6, 0x46, 0xb3, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x39, 0x90, 0x28, 0x1c, 0x0c,
+ 0x21, 0xa6, 0x46, 0x0f, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x05, 0x1c, 0x38, 0x1c, 0x00, 0x21,
+ 0xa6, 0x46, 0xaa, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x00, 0x01, 0x28, 0x43, 0x05, 0x04, 0x2d,
+ 0x0c, 0x02, 0xa8, 0xa9, 0x49, 0xd4, 0x22, 0xa6, 0x46, 0xa8, 0x4b, 0xfe, 0x44, 0x18, 0x47,
+ 0x37, 0x98, 0x08, 0x28,
+
+ 0x01, 0x05, 0xff, 0xff, 0xe2, 0x04, 0x18, 0x00, 0xfa, 0x58, 0xd1, 0xa6, 0x48, 0xa7, 0x49,
+ 0x42, 0x79, 0x0b, 0x78, 0x93, 0x42, 0x52, 0xd1, 0x02, 0xe0, 0xc0, 0x46, 0x57, 0x4a, 0x05,
+ 0x00, 0x02, 0x79, 0x4b, 0x78, 0x93, 0x42, 0x4a, 0xd1, 0xc2, 0x78, 0x8b, 0x78, 0x93, 0x42,
+ 0x46, 0xd1, 0xff, 0xe7, 0x82, 0x78, 0xcb, 0x78, 0x93, 0x42, 0x41, 0xd1, 0x42, 0x78, 0x0b,
+ 0x79, 0x93, 0x42, 0x3d, 0xd1, 0x00, 0x78, 0x49, 0x79, 0x81, 0x42, 0x39, 0xd1, 0x00, 0x21,
+ 0x08, 0x1c, 0x0b, 0xe0, 0x35, 0x28, 0x34, 0xda, 0x82, 0x00, 0x02, 0xab, 0x9a, 0x58, 0x96,
+ 0x42, 0x03, 0xd0, 0x40, 0x1c, 0x00, 0x06, 0x00, 0x0e, 0x00, 0xe0, 0x21, 0x1c, 0x00, 0x29,
+ 0xf1, 0xd0, 0x78, 0x22, 0x69, 0x46, 0x0a, 0x70, 0xde, 0x22, 0x4a, 0x70, 0xe4, 0x22, 0x8a,
+ 0x70, 0x42, 0x01, 0x38, 0x98, 0x02, 0x43, 0x90, 0x01, 0x28, 0x43, 0x80, 0x01, 0x39, 0x9a,
+ 0x10, 0x43, 0x02, 0x0c, 0xca, 0x70, 0x02, 0x0a, 0x0a, 0x71, 0x48, 0x71, 0x86, 0x48, 0x05,
+ 0x1c, 0xa6, 0x46, 0x86, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x1f, 0x20, 0xa6, 0x46, 0x84, 0x49,
+ 0xfe, 0x44, 0x08, 0x47, 0x84, 0x48, 0x00, 0x78, 0x02, 0x28, 0x05, 0xd1, 0x28, 0x1c, 0x00,
+ 0x21, 0xa6, 0x46, 0x81, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x3a, 0xb0, 0xf0, 0xbd, 0xc0, 0x46,
+ 0x2f, 0x0e, 0x04, 0x00, 0x6a, 0x12, 0x40, 0x00, 0x85, 0x12, 0x00, 0x00, 0x5c, 0x7b, 0x1a,
+ 0x00, 0x55, 0x04, 0x18, 0x00, 0xe8, 0x21, 0x08, 0x00, 0x0f, 0x51, 0x08, 0x00, 0x4f, 0x76,
+ 0x04, 0x00, 0x09, 0x51, 0x08, 0x00, 0xb0, 0x63, 0x08, 0x00, 0xff, 0xff, 0x00, 0x00, 0x0a,
+ 0x30, 0x1a, 0x00, 0xa7, 0x48, 0x05, 0x00, 0x15, 0x49, 0x05, 0x00, 0x08, 0x0f, 0x1a, 0x00,
+ 0x24, 0x79, 0x1a, 0x00,
+
+ 0x01, 0x05, 0xff, 0xff, 0xdc, 0x05, 0x18, 0x00, 0xfa, 0xda, 0x7c, 0x1a, 0x00, 0xf0, 0xb5,
+ 0x6e, 0x4e, 0x06, 0x25, 0x35, 0x70, 0x0f, 0x23, 0x73, 0x70, 0x3d, 0x20, 0xb0, 0x70, 0x29,
+ 0x20, 0xf0, 0x70, 0x03, 0x20, 0x2a, 0x1c, 0x7d, 0x49, 0xe4, 0x31, 0x01, 0x24, 0xa6, 0x46,
+ 0x67, 0x4f, 0xfe, 0x44, 0x38, 0x47, 0xb2, 0x78, 0xf3, 0x78, 0x03, 0x20, 0x78, 0x49, 0xe5,
+ 0x31, 0xa6, 0x46, 0x63, 0x4e, 0xfe, 0x44, 0x30, 0x47, 0x03, 0x20, 0x75, 0x49, 0xe6, 0x31,
+ 0xa6, 0x46, 0x60, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0xa6, 0x46, 0x5f, 0x48, 0xfe, 0x44, 0x00,
+ 0x47, 0x5f, 0x4a, 0x00, 0x21, 0x08, 0x1c, 0x13, 0x68, 0x00, 0x2b, 0x04, 0xd0, 0x03, 0x07,
+ 0x1e, 0x0f, 0x23, 0x1c, 0xb3, 0x40, 0x19, 0x43, 0x03, 0x07, 0x1b, 0x0f, 0x0f, 0x2b, 0x05,
+ 0xd1, 0xc6, 0x08, 0x2b, 0x1c, 0x33, 0x40, 0x57, 0x4e, 0xf1, 0x52, 0x00, 0x21, 0x04, 0x32,
+ 0x01, 0x30, 0x20, 0x28, 0xe9, 0xd3, 0x00, 0x27, 0x54, 0x48, 0x07, 0x70, 0x19, 0x20, 0x40,
+ 0x01, 0x53, 0x49, 0x08, 0x80, 0xff, 0x20, 0x52, 0x49, 0x08, 0x70, 0x52, 0x49, 0x08, 0x70,
+ 0x52, 0x48, 0x07, 0x70, 0x53, 0x48, 0x52, 0x49, 0x08, 0x60, 0x53, 0x48, 0x24, 0x21, 0x01,
+ 0x70, 0x18, 0x21, 0x41, 0x70, 0x20, 0x21, 0x81, 0x70, 0x10, 0x21, 0xc1, 0x70, 0x57, 0x48,
+ 0x4f, 0x49, 0x08, 0x80, 0xa6, 0x46, 0x4e, 0x48, 0xfe, 0x44, 0x00, 0x47, 0x4e, 0x4e, 0x4e,
+ 0x4d, 0xa6, 0x46, 0x4e, 0x48, 0xfe, 0x44, 0x00, 0x47, 0x31, 0x88, 0x01, 0x40, 0x48, 0x08,
+ 0x04, 0xd0, 0x00, 0x20, 0xc0, 0x43, 0x45, 0x19, 0x85, 0x42, 0xf2, 0xd1, 0xa6, 0x46, 0x48,
+ 0x48, 0xfe, 0x44, 0x00, 0x47, 0x31, 0x88, 0x01, 0x40, 0x48, 0x08, 0x04, 0xd0, 0x5c, 0x20,
+ 0xa6, 0x46, 0x44, 0x49,
+
+ 0x01, 0x05, 0xff, 0xff, 0xd6, 0x06, 0x18, 0x00, 0xfa, 0xfe, 0x44, 0x08, 0x47, 0xa6, 0x46,
+ 0x43, 0x48, 0xfe, 0x44, 0x00, 0x47, 0x37, 0x80, 0xf0, 0xbd, 0xc0, 0x46, 0x2c, 0x7a, 0x1a,
+ 0x00, 0xdb, 0x4a, 0x05, 0x00, 0xc2, 0x74, 0x1a, 0x00, 0x10, 0xb5, 0x43, 0x69, 0x31, 0x49,
+ 0x09, 0x78, 0x3e, 0x4a, 0x12, 0x78, 0x01, 0x2a, 0x04, 0xd1, 0x1c, 0x78, 0x00, 0x2c, 0x01,
+ 0xd1, 0x2c, 0x49, 0x09, 0x78, 0x3e, 0x4c, 0x24, 0x78, 0x00, 0x2c, 0x1b, 0xd0, 0xff, 0x29,
+ 0x19, 0xd0, 0x01, 0x2a, 0x08, 0xd0, 0x37, 0x4a, 0x12, 0x78, 0x01, 0x2a, 0x13, 0xd0, 0x1a,
+ 0x78, 0x01, 0x2a, 0x01, 0xd0, 0x02, 0x2a, 0x0e, 0xd1, 0x10, 0x22, 0xd4, 0x56, 0x8c, 0x42,
+ 0x0a, 0xdd, 0x61, 0x1a, 0x09, 0x06, 0x09, 0x0e, 0x5b, 0x1c, 0x00, 0x24, 0x1c, 0x57, 0x64,
+ 0x1a, 0x1c, 0x70, 0x01, 0x33, 0x01, 0x3a, 0xf8, 0xd1, 0x2c, 0x49, 0x81, 0x60, 0x2c, 0x48,
+ 0x15, 0x30, 0x10, 0xbd, 0x2c, 0x48, 0x15, 0x30, 0xf7, 0x46, 0xc0, 0x46, 0x2b, 0x49, 0x05,
+ 0x00, 0x41, 0x49, 0x05, 0x00, 0x61, 0x4a, 0x05, 0x00, 0x7f, 0x4a, 0x05, 0x00, 0x6b, 0x4a,
+ 0x05, 0x00, 0xa7, 0x4a, 0x05, 0x00, 0xd4, 0x62, 0x08, 0x00, 0x21, 0xa7, 0x05, 0x00, 0x22,
+ 0x17, 0x08, 0x00, 0x12, 0x56, 0x08, 0x00, 0x79, 0x10, 0x08, 0x00, 0x87, 0x1c, 0x04, 0x00,
+ 0x9d, 0x31, 0x05, 0x00, 0x41, 0x10, 0x08, 0x00, 0xc3, 0x7a, 0x03, 0x00, 0x0c, 0x51, 0x08,
+ 0x00, 0x0b, 0xd4, 0x04, 0x00, 0xf5, 0xd3, 0x04, 0x00, 0x8d, 0x0a, 0x18, 0x00, 0x80, 0x7b,
+ 0x08, 0x00, 0x84, 0xf3, 0x1a, 0x00, 0xb5, 0x63, 0x08, 0x00, 0xcc, 0x24, 0x08, 0x00, 0xf4,
+ 0x63, 0x08, 0x00, 0xf5, 0x63, 0x08, 0x00, 0xfc, 0x63, 0x08, 0x00, 0xa8, 0x63, 0x08, 0x00,
+ 0x36, 0xa0, 0x1b, 0x00,
+
+ 0x01, 0x05, 0xff, 0xff, 0xd0, 0x07, 0x18, 0x00, 0xfa, 0xac, 0x63, 0x08, 0x00, 0x4c, 0x25,
+ 0x08, 0x00, 0x01, 0x00, 0x18, 0x00, 0x00, 0x7c, 0x1a, 0x00, 0xf0, 0xff, 0xff, 0x00, 0x07,
+ 0xff, 0x03, 0x00, 0xd7, 0xd3, 0x04, 0x00, 0xc9, 0x02, 0x18, 0x00, 0xe1, 0x04, 0x00, 0x00,
+ 0xff, 0xff, 0x00, 0x00, 0xfa, 0x63, 0x08, 0x00, 0xf7, 0x63, 0x08, 0x00, 0x10, 0x30, 0x19,
+ 0x00, 0xef, 0x68, 0x00, 0x00, 0xe8, 0x57, 0x08, 0x00, 0xff, 0x15, 0x04, 0x00, 0xf0, 0xb5,
+ 0xc3, 0x49, 0x0c, 0x78, 0x0e, 0x2c, 0x2c, 0xda, 0xc2, 0x4e, 0x3f, 0x20, 0x85, 0x19, 0x60,
+ 0x1c, 0x00, 0x06, 0x00, 0x0e, 0x28, 0x70, 0xbf, 0x4b, 0xa2, 0x00, 0xbf, 0x4f, 0x9f, 0x50,
+ 0x0e, 0x28, 0x18, 0xda, 0xa2, 0x1c, 0x12, 0x06, 0x12, 0x0e, 0x6a, 0x70, 0x80, 0x00, 0xbc,
+ 0x4d, 0x1d, 0x50, 0x0e, 0x2a, 0x08, 0xda, 0xe0, 0x1c, 0x70, 0x72, 0x90, 0x00, 0xb9, 0x4a,
+ 0x1a, 0x50, 0x08, 0x78, 0x03, 0x30, 0x08, 0x70, 0xf0, 0xbd, 0x0a, 0x70, 0x01, 0x20, 0x86,
+ 0x46, 0xb6, 0x48, 0xfe, 0x44, 0x00, 0x47, 0xfe, 0xe7, 0x08, 0x70, 0x01, 0x20, 0x86, 0x46,
+ 0xb2, 0x48, 0xfe, 0x44, 0x00, 0x47, 0xfe, 0xe7, 0x01, 0x20, 0x86, 0x46, 0xaf, 0x48, 0xfe,
+ 0x44, 0x00, 0x47, 0xfe, 0xe7, 0xf8, 0xb5, 0x07, 0x1c, 0xfb, 0x7a, 0xad, 0x48, 0x03, 0x70,
+ 0x3a, 0x7b, 0xac, 0x48, 0x02, 0x70, 0xac, 0x49, 0x7c, 0x7b, 0x0c, 0x70, 0xac, 0x48, 0xbd,
+ 0x7b, 0x05, 0x70, 0xb3, 0x4e, 0x00, 0x2b, 0x00, 0xd0, 0xbe, 0xe0, 0xad, 0x4a, 0x15, 0x1c,
+ 0x8c, 0x3d, 0xb6, 0x4e, 0xb6, 0x0b, 0x01, 0x24, 0xa6, 0x46, 0xa6, 0x48, 0xfe, 0x44, 0x00,
+ 0x47, 0x29, 0x88, 0x01, 0x40, 0x48, 0x08, 0x05, 0xd0, 0x30, 0x1c, 0x41, 0x1e, 0x0e, 0x04,
+ 0x36, 0x0c, 0x00, 0x28,
+
+ 0x01, 0x05, 0xff, 0xff, 0xca, 0x08, 0x18, 0x00, 0xfa, 0xf0, 0xd1, 0xa6, 0x46, 0x9f, 0x48,
+ 0xfe, 0x44, 0x00, 0x47, 0x29, 0x88, 0x01, 0x40, 0x48, 0x08, 0x04, 0xd0, 0x58, 0x20, 0xa6,
+ 0x46, 0x9b, 0x49, 0xfe, 0x44, 0x08, 0x47, 0x98, 0x48, 0x00, 0x78, 0x9a, 0x4e, 0x01, 0x28,
+ 0x34, 0xd0, 0x00, 0x20, 0x01, 0x1c, 0x0c, 0x20, 0x02, 0x1c, 0x30, 0x1c, 0xa6, 0x46, 0x96,
+ 0x4b, 0xfe, 0x44, 0x18, 0x47, 0x96, 0x48, 0x00, 0x21, 0x08, 0x22, 0xa6, 0x46, 0x95, 0x4b,
+ 0xfe, 0x44, 0x18, 0x47, 0x92, 0x4e, 0x24, 0x36, 0x30, 0x1c, 0x21, 0x1c, 0x0c, 0x22, 0xa6,
+ 0x46, 0x9a, 0x4b, 0xfe, 0x44, 0x18, 0x47, 0x07, 0x20, 0x01, 0x1c, 0x20, 0x1c, 0xa6, 0x46,
+ 0x8e, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x14, 0x20, 0xa6, 0x46, 0x8c, 0x49, 0xfe, 0x44, 0x08,
+ 0x47, 0x07, 0x20, 0xa6, 0x46, 0x8c, 0x49, 0xfe, 0x44, 0x08, 0x47, 0x89, 0x49, 0x08, 0x70,
+ 0x30, 0x1c, 0x00, 0x21, 0x0c, 0x22, 0xa6, 0x46, 0x8d, 0x4b, 0xfe, 0x44, 0x18, 0x47, 0x85,
+ 0x4e, 0x5b, 0xe0, 0x30, 0x1c, 0x00, 0x21, 0x08, 0x22, 0xa6, 0x46, 0x7d, 0x4b, 0xfe, 0x44,
+ 0x18, 0x47, 0x30, 0x1c, 0x00, 0x21, 0x0c, 0x22, 0xa6, 0x46, 0x79, 0x4b, 0xfe, 0x44, 0x18,
+ 0x47, 0x79, 0x48, 0x00, 0x21, 0x0a, 0x1c, 0xa6, 0x46, 0x78, 0x4b, 0xfe, 0x44, 0x18, 0x47,
+ 0x75, 0x48, 0x00, 0x21, 0x08, 0x22, 0xa6, 0x46, 0x74, 0x4b, 0xfe, 0x44, 0x18, 0x47, 0x03,
+ 0x20, 0x02, 0x1c, 0x71, 0x48, 0x02, 0x21, 0xa6, 0x46, 0x7a, 0x4b, 0xfe, 0x44, 0x18, 0x47,
+ 0x0b, 0x20, 0x02, 0x1c, 0x6d, 0x48, 0x21, 0x1c, 0x8e, 0x46, 0x76, 0x4b, 0xfe, 0x44, 0x18,
+ 0x47, 0x20, 0x1c, 0x06, 0x21, 0xa6, 0x46, 0x6a, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x07, 0x20,
+ 0x01, 0x1c, 0x20, 0x1c,
+
+ 0x01, 0x05, 0xff, 0xff, 0xc4, 0x09, 0x18, 0x00, 0xfa, 0xa6, 0x46, 0x67, 0x4a, 0xfe, 0x44,
+ 0x10, 0x47, 0x14, 0x20, 0xa6, 0x46, 0x65, 0x49, 0xfe, 0x44, 0x08, 0x47, 0x65, 0x4e, 0x07,
+ 0x20, 0xa6, 0x46, 0x64, 0x49, 0xfe, 0x44, 0x08, 0x47, 0x00, 0x90, 0x06, 0x20, 0xa6, 0x46,
+ 0x61, 0x49, 0xfe, 0x44, 0x08, 0x47, 0x41, 0x00, 0x00, 0x98, 0x01, 0x43, 0x31, 0x70, 0x59,
+ 0x48, 0x00, 0x21, 0x03, 0x22, 0xa6, 0x46, 0x62, 0x4b, 0xfe, 0x44, 0x18, 0x47, 0x55, 0x48,
+ 0x00, 0x21, 0x0b, 0x22, 0xa6, 0x46, 0x5e, 0x4b, 0xfe, 0x44, 0x18, 0x47, 0x00, 0x20, 0x28,
+ 0x80, 0x4b, 0x48, 0x04, 0x78, 0x4b, 0x48, 0x05, 0x78, 0x32, 0x78, 0x01, 0xe0, 0x30, 0x1c,
+ 0x02, 0x70, 0xfb, 0x7b, 0x01, 0x2d, 0x25, 0xd1, 0x00, 0x2c, 0x0d, 0xd1, 0x10, 0x1c, 0x09,
+ 0xd0, 0x01, 0x38, 0x05, 0xd0, 0x01, 0x38, 0x01, 0xd0, 0x06, 0x20, 0x16, 0xe0, 0x04, 0x20,
+ 0x14, 0xe0, 0x02, 0x20, 0x12, 0xe0, 0x00, 0x20, 0x10, 0xe0, 0x10, 0x1c, 0x0d, 0xd0, 0x01,
+ 0x38, 0x09, 0xd0, 0x01, 0x38, 0x05, 0xd0, 0x01, 0x38, 0x01, 0xd0, 0x10, 0x20, 0x06, 0xe0,
+ 0x0e, 0x20, 0x04, 0xe0, 0x0c, 0x20, 0x02, 0xe0, 0x0a, 0x20, 0x00, 0xe0, 0x08, 0x20, 0xc0,
+ 0x19, 0xc1, 0x7b, 0x40, 0x4b, 0x19, 0x70, 0x03, 0x7c, 0x3f, 0x48, 0x03, 0x70, 0x03, 0x20,
+ 0x3f, 0x49, 0x01, 0x24, 0xa6, 0x46, 0x3e, 0x4c, 0xfe, 0x44, 0x20, 0x47, 0xf8, 0xbd, 0x30,
+ 0xb5, 0x00, 0x20, 0x4c, 0x49, 0x08, 0x70, 0x4c, 0x48, 0xf7, 0x21, 0x01, 0x70, 0xff, 0x21,
+ 0x41, 0x70, 0x81, 0x70, 0x7f, 0x21, 0xc1, 0x70, 0x20, 0x4a, 0x10, 0x1f, 0x38, 0x49, 0x08,
+ 0x60, 0x1d, 0x4b, 0x01, 0x21, 0x19, 0x70, 0x37, 0x48, 0x10, 0x60, 0x02, 0x25, 0x38, 0x48,
+ 0x04, 0x1c, 0x33, 0x34,
+
+ 0x01, 0x05, 0xff, 0xff, 0xbe, 0x0a, 0x18, 0x00, 0xfa, 0x25, 0x70, 0x34, 0x4c, 0x54, 0x60,
+ 0x03, 0x24, 0x1c, 0x71, 0x33, 0x4c, 0x94, 0x60, 0x04, 0x24, 0x04, 0x70, 0x33, 0x4c, 0xd4,
+ 0x60, 0x05, 0x24, 0xc4, 0x73, 0x32, 0x4c, 0x14, 0x61, 0x06, 0x24, 0x9c, 0x71, 0x31, 0x4c,
+ 0x54, 0x61, 0x07, 0x24, 0xdc, 0x71, 0xdc, 0x1d, 0x30, 0x4d, 0x95, 0x61, 0x08, 0x25, 0x15,
+ 0x38, 0x05, 0x70, 0x2e, 0x48, 0xd0, 0x61, 0x09, 0x20, 0x60, 0x77, 0x2d, 0x48, 0x10, 0x62,
+ 0x0a, 0x20, 0xc3, 0x18, 0x18, 0x70, 0x2c, 0x48, 0x50, 0x62, 0x0b, 0x20, 0xd8, 0x75, 0x2b,
+ 0x4b, 0x93, 0x62, 0x03, 0x4a, 0x10, 0x70, 0x8e, 0x46, 0x29, 0x48, 0xfe, 0x44, 0x00, 0x47,
+ 0x30, 0xbd, 0xb4, 0x63, 0x08, 0x00, 0x8c, 0x53, 0x08, 0x00, 0xb8, 0x63, 0x08, 0x00, 0x4d,
+ 0x76, 0x08, 0x00, 0x57, 0x76, 0x08, 0x00, 0x39, 0x76, 0x08, 0x00, 0x01, 0x64, 0x08, 0x00,
+ 0xf6, 0x63, 0x08, 0x00, 0xf9, 0x63, 0x08, 0x00, 0xf8, 0x63, 0x08, 0x00, 0xfa, 0x63, 0x08,
+ 0x00, 0x07, 0xff, 0x03, 0x00, 0xd7, 0xd3, 0x04, 0x00, 0x16, 0xf6, 0x1a, 0x00, 0xd3, 0x48,
+ 0x05, 0x00, 0x8c, 0x7c, 0x1a, 0x00, 0xa7, 0x48, 0x05, 0x00, 0x21, 0x99, 0x05, 0x00, 0xbb,
+ 0x16, 0x04, 0x00, 0xf7, 0x63, 0x08, 0x00, 0x67, 0x99, 0x05, 0x00, 0xf4, 0x63, 0x08, 0x00,
+ 0xf5, 0x63, 0x08, 0x00, 0xae, 0x05, 0x00, 0x00, 0x0b, 0xd4, 0x04, 0x00, 0xff, 0xff, 0xff,
+ 0x1f, 0x91, 0x48, 0x05, 0x00, 0x88, 0x53, 0x08, 0x00, 0x1b, 0x76, 0x08, 0x00, 0x43, 0x76,
+ 0x08, 0x00, 0x75, 0x76, 0x08, 0x00, 0xca, 0x53, 0x08, 0x00, 0x7f, 0x76, 0x08, 0x00, 0x61,
+ 0x76, 0x08, 0x00, 0x6b, 0x76, 0x08, 0x00, 0x11, 0x76, 0x08, 0x00, 0x07, 0x76, 0x08, 0x00,
+ 0xfd, 0x75, 0x08, 0x00,
+
+ 0x01, 0x05, 0xff, 0x19, 0xb8, 0x0b, 0x18, 0x00, 0x14, 0x2f, 0x76, 0x08, 0x00, 0x25, 0x76,
+ 0x08, 0x00, 0x11, 0x08, 0x18, 0x00, 0xfb, 0x63, 0x08, 0x00, 0xf0, 0x63, 0x08, 0x00,
+
+ 0x01, 0x83, 0xff, 0x14, 0x79, 0x7b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+
+ //
+ //
+ 0x01, 0xdc, 0xfd, 0x05, 0x00, 0x00, 0x00, 0x00, 0x12,
+
+ 0x01, 0x0f, 0xfd, 0x01, 0x01,
+
+ //
+ //
+ // ##--------------------------------------------------------------------------------
+ // ## Description: QRCA_L_TRIOL PHY FW Initialization Script
+ // ## Version: 3.17_3 (based on ROM version)
+ // ##--------------------------------------------------------------------------------
+ 0x01, 0x01, 0xff, 0x06, 0xc6, 0x32, 0x19, 0x00, 0x10, 0x10,
+
+ 0x01, 0x01, 0xff, 0x06, 0x60, 0x32, 0x19, 0x00, 0x32, 0x10,
+
+ 0x01, 0x82, 0xfd, 0x14, 0x00, 0x9c, 0x18, 0xd2, 0xd2, 0xd2, 0xd2, 0xd2, 0xd2, 0xd2, 0xdc,
+ 0xe6, 0xf0, 0xfa, 0x04, 0x0e, 0x18, 0xff, 0x00, 0x00,
+
+ 0x01, 0x82, 0xfd, 0x14, 0x01, 0x9c, 0xce, 0xce, 0xce, 0xce, 0xce, 0xce, 0xce, 0xce, 0xd8,
+ 0xe2, 0xec, 0xf6, 0x00, 0x0a, 0x14, 0xff, 0x00, 0x00,
+
+ 0x01, 0x82, 0xfd, 0x14, 0x02, 0x9c, 0xce, 0xce, 0xce, 0xce, 0xce, 0xce, 0xce, 0xce, 0xd8,
+ 0xe2, 0xec, 0xf6, 0x00, 0x0a, 0x14, 0xff, 0x00, 0x00,
+
+ 0x01, 0x87, 0xfd, 0x03, 0x0d, 0x0d, 0x0d,
+
+ 0x01, 0x76, 0xfd, 0x31, 0x01, 0x21, 0x54, 0x00, 0x00, 0x61, 0x57, 0x00, 0x00, 0x14, 0x05,
+ 0x0a, 0x05, 0x00, 0x07, 0x06, 0x0a, 0x04, 0x05, 0x08, 0x09, 0x0b, 0x0c, 0x0d, 0x0e, 0x10,
+ 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10,
+ 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00,
+
+ 0x01, 0x80, 0xfd, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
+
+ 0x01, 0x80, 0xfd, 0x06, 0x3c, 0xf0, 0x5f, 0x00, 0x00, 0x00,
+
+ //
+ //
+ //
+ 0x01, 0x38, 0xfe, 0x00,
+
+ //
+ // # BLE
+ // #--------------------------------------------------------------------------------
+ // # Description: BRF6450 WB FW Initialization Script
+ // #
+ // # Compatibility: BRF6450 PG1 ROM
+ // #
+ // # Last Updated: 07-Oct-2010 15:19:44.57
+ // #
+ // # Version: 1.0
+ // #
+ // #--------------------------------------------------------------------------------
+ //
+ //
+ // #BLE Enable
+ 0x01, 0x5b, 0xfd, 0x02, 0x01, 0x01,
+
+ //
+ // # Disable Cortex Sleep
+ 0x01, 0xa8, 0xfd, 0x01, 0x01,
+
+ //
+ //
+ // # Cortex Reset (hold in reset while loading IMEM)
+ 0x01, 0x09, 0xfd, 0x08, 0x00, 0xc0, 0x1b, 0x00, 0x01, 0x00, 0x01, 0x00,
+
+ // ########################
+ // # Patch Start
+ // ########################
+ //
+ 0x01, 0x05, 0xff, 0x41, 0x60, 0x5c, 0x1b, 0x00, 0x3c, 0x01, 0x68, 0xb1, 0xf1, 0xff, 0x3f,
+ 0x1c, 0xbf, 0x49, 0x1c, 0x01, 0x60, 0x13, 0xd1, 0x41, 0x68, 0x00, 0x23, 0x03, 0x60, 0x01,
+ 0xf0, 0x7f, 0x02, 0x7f, 0x2a, 0x04, 0xbf, 0x21, 0xf0, 0x7f, 0x01, 0x41, 0x60, 0x4f, 0xea,
+ 0x41, 0x62, 0x06, 0xd0, 0x02, 0xf1, 0x00, 0x72, 0x21, 0xf0, 0x7f, 0x01, 0x41, 0xea, 0x52,
+ 0x61, 0x41, 0x60, 0x70, 0x47, 0x00, 0x00, 0xf0, 0xb5,
+
+ 0x01, 0x05, 0xff, 0xcd, 0x8c, 0x6e, 0x1b, 0x00, 0xc8, 0x40, 0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, 0xfb, 0x40, 0xf6, 0x6a, 0x20, 0x07, 0x21, 0xc2, 0xf2, 0x32,
+ 0x00, 0xff, 0xf7, 0xbc, 0xfa, 0x00, 0x21, 0x22, 0x7a, 0x31, 0x20, 0xff, 0xf7, 0x0d, 0xfa,
+ 0x43, 0xf2, 0x5c, 0x10, 0x00, 0x21, 0xc2, 0xf2, 0x31, 0x00, 0xff, 0xf7, 0xb0, 0xfa, 0x20,
+ 0x7a, 0x10, 0xb9, 0x00, 0xf0, 0x79, 0xff, 0x30, 0xbd, 0x00, 0xf0, 0xdf, 0xfe, 0x30, 0xbd,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+
+ 0x01, 0x05, 0xff, 0xcd, 0xe4, 0x70, 0x1b, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+
+ 0x01, 0x05, 0xff, 0x11, 0xac, 0x71, 0x1b, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+
+ 0x01, 0x05, 0xff, 0x15, 0x0c, 0x7f, 0x1b, 0x00, 0x10, 0x10, 0xbd, 0x00, 0xb5, 0x41, 0xf6,
+ 0x50, 0x40, 0xc2, 0xf2, 0x00, 0x00, 0x00, 0x21, 0x02, 0x78,
+
+ 0x01, 0x05, 0xff, 0x15, 0x30, 0x7f, 0x1b, 0x00, 0x10, 0xff, 0xf7, 0xa0, 0xf8, 0x00, 0xbd,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+
+ //
+ // ########################
+ // # Patch End
+ // ########################
+ //
+ // #release Cortex Reset
+ 0x01, 0x09, 0xfd, 0x08, 0x00, 0xc0, 0x1b, 0x00, 0x00, 0x00, 0x01, 0x00,
+
+ //
+ // # Enable Cortex Sleep
+ 0x01, 0xa8, 0xfd, 0x01, 0x00,
+
+ //
+ // #RESET BLE
+ 0x01, 0x5b, 0xfd, 0x02, 0x01, 0x00,
+
+ //
+ 0x01, 0xdd, 0xfd, 0x01, 0x01,
+
+ //
+ // #################################################################
+ // ## START of Panasonic Adds-On
+ // #################################################################
+ //
+ // ## Enable fast clock XTAL support
+ 0x01, 0x1c, 0xfd, 0x14, 0x01, 0x88, 0x13, 0x00, 0x00, 0xd0, 0x07, 0x00, 0x00, 0xff, 0xff,
+ 0x04, 0xff, 0xff, 0xff, 0xfa, 0x00, 0x00, 0x00, 0x00,
+
+ //
+ // ## Enable LPS
+ 0x01, 0x2e, 0xfd, 0x0d, 0x01, 0x58, 0x02, 0x06, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+
+ //
+ // ## Enable eHCILL
+// 0x01, 0x2b, 0xfd, 0x05, 0x10, 0x00, 0x50, 0x00, 0x96,
+
+//DGV: disable eHCILL
+ 0x01, 0x0c, 0xfd, 0x09 , 0x01, 0, 0, 0xff, 0xff, 0xff, 0xff, 100, 0,
+
+ //
+ // 0x01, 0x0c, 0xfd, 0x09, 0x01, 0x01, 0x00, 0xff, 0xff, 0xff, 0xff, 0x64, 0x00,
+
+ //
+ // #################################################################
+ // ## END of Panasonic Adds-On
+ // #################################################################
+
+
+ //terminate
+ 0x00
+};
+
diff --git a/MakefileBasedBuild/app/BT.h b/MakefileBasedBuild/app/BT.h
new file mode 100644
index 0000000..52b24cf
--- /dev/null
+++ b/MakefileBasedBuild/app/BT.h
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifdef ADK_INTERNAL
+#ifndef _BT_H_
+#define _BT_H_
+
+#include "sgBuf.h"
+
+typedef struct{
+
+ uint8_t mac[6];
+ uint8_t PSRM, PSPM, PSM;
+ uint16_t co; //clock offset
+ uint32_t dc; //class
+
+}BtDiscoveryResult;
+
+#define SUPORT_SSP 1
+
+#define BT_CONN_LINK_TYPE_SCO 0
+#define BT_CONN_LINK_TYPE_ACL 1
+
+#define BT_BCAST_NONE 0 //point to point
+#define BT_BCAST_ACTIVE 1 //to all active slaves
+#define BT_BCAST_PICONET 2 //to all slaves (even parked)
+
+#define BT_RX_BUF_SZ 1024
+#define BT_BAUDRATE 1750000
+
+
+#define BT_LINK_KEY_SIZE 16
+#define BT_MAC_SIZE 6
+
+
+#define BT_SSP_DONE_VAL 0x0FF00000
+
+typedef struct{
+
+ void* userData;
+
+ char (*BtDiscoveryF)(void* userData, BtDiscoveryResult* r);
+ char (*BtConnReqF)(void* userData, const uint8_t* mac, uint32_t devClass, uint8_t linkType); //return 1 to accept
+ void (*BtConnStartF)(void* userData, uint16_t conn, const uint8_t* mac, uint8_t linkType, uint8_t encrMode);
+ void (*BtConnEndF)(void* userData, uint16_t conn, uint8_t reason);
+ uint8_t (*BtPinRequestF)(void* userData, const uint8_t* mac, uint8_t* buf); //fill buff with PIN code, return num bytes used (16 max) return 0 to decline
+
+ char (*BtLinkKeyRequestF)(void* userData, const uint8_t* mac, uint8_t* buf); //fill buff with the 16-byte link key if known. return 1 if yes, 0 if no
+ void (*BtLinkKeyCreatedF)(void* userData, const uint8_t* mac, const uint8_t* key); //save the key, if you want to...
+
+ void (*BtAclDataRxF)(void* userData, uint16_t conn, char first, uint8_t bcastType, const uint8_t* data, uint16_t sz);
+
+ void (*BtSspShow)(void* userData, const uint8_t* mac, uint32_t sspVal);
+
+}BtFuncs;
+
+char btInit(const BtFuncs* btf);
+
+char btLocalMac(uint8_t* buf);
+char btSetLocalName(const char* name);
+char btGetRemoteName(const uint8_t* mac, uint8_t PSRM, uint8_t PSM, uint16_t co, char* nameBuf);
+void btScan(void);
+char btDiscoverable(char on);
+char btConnectable(char on);
+char btSetDeviceClass(uint32_t cls);
+void btDeinit(void);
+
+void btAclDataTx(uint16_t conn, char first, uint8_t bcastType, sg_buf* buf);
+
+#endif
+#endif
+
diff --git a/MakefileBasedBuild/app/HCI.h b/MakefileBasedBuild/app/HCI.h
new file mode 100644
index 0000000..cfb2cd7
--- /dev/null
+++ b/MakefileBasedBuild/app/HCI.h
@@ -0,0 +1,359 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef _HCI_H_
+#define _HCI_H_
+
+
+//http://webee.technion.ac.il/labs/comnet/projects/winter02/cn08w02/HCI_spec.pdf
+
+
+#define HCI_OPCODE(ogf, ocf) ((((unsigned short)(ogf)) << 10) | (ocf))
+
+typedef struct{
+
+ unsigned short opcode;
+ unsigned char totalParamLen;
+ unsigned char params[];
+
+}HCI_Cmd;
+
+typedef struct{
+
+ unsigned char eventCode;
+ unsigned char totalParamLen;
+ unsigned char params[];
+
+}HCI_Event;
+
+#define HCI_DATA_INFO(conn, pbf, bcf) (((conn & 0xEFF) | (((unsigned short)(pbf)) << 12) | (((unsigned short)(bcf)) << 14))
+#define HCI_CONN(info) ((info) & 0xEFF)
+#define HCI_PBF(info) (((info) >> 12) & 3)
+#define HCI_BCF(info) (((info) >> 14) & 3)
+
+#define HCI_PBF_First_Message 2
+#define HCI_PBF_Continuing_Message 1
+
+//BCF Common
+#define HCI_BCF_Point_To_Point 0
+
+//BCF from host to controller
+#define HCI_BCF_Active_Broadcast 1
+#define HCI_BCF_Piconet_Broadcast 2
+
+//BCF from controller
+#define HCI_BCF_RXed_In_Active_State 1
+#define HCI_BCF_RXed_In_Parked_State 2
+
+typedef struct{
+
+ unsigned short info; //connection handle & flags
+ unsigned short totalDataLen;
+ unsigned char data[];
+
+}HCI_ACL_Data;
+
+
+typedef struct{
+
+ unsigned short info; //connection handle & flags [reserved]
+ unsigned char totalDataLen;
+ unsigned char data[];
+
+}HCI_SCO_Data;
+
+
+#define HCI_LAP_Unlimited_Inquiry 0x9E8B33
+#define HCI_LAP_Limited_Inquiry 0x9E8B00
+
+#define UART_PKT_TYP_CMD 1
+#define UART_PKT_TYP_ACL 2
+#define UART_PKT_TYP_SCO 3
+#define UART_PKT_TYP_EVT 4
+
+#define PAGE_STATE_INQUIRY 1
+#define PAGE_STATE_PAGE 2
+
+#define DEVICE_CLASS_SERVICE_POSITIONING 0x010000 //GPS
+#define DEVICE_CLASS_SERVICE_NETWORKING 0x020000 //LAN
+#define DEVICE_CLASS_SERVICE_RENDERING 0x040000 //PRINTER, SPEAKER
+#define DEVICE_CLASS_SERVICE_CAPTURING 0x080000 //SCANNER, MICROPHONE
+#define DEVICE_CLASS_SERVICE_OBEX 0x100000 //v-Inbox, v-Folder, v-$WORD
+#define DEVICE_CLASS_SERVICE_AUDIO 0x200000 //SPEAKER, MIC, HEADSET
+#define DEVICE_CLASS_SERVICE_TELEPHONY 0x400000 //MODEM, HEADSET
+#define DEVICE_CLASS_SERVICE_INFORMATION 0x800000 //WEB-server, WAP-server
+
+#define DEVICE_CLASS_MAJOR_SHIFT 8
+#define DEVICE_CLASS_MAJOR_MASK 0x001F00
+
+#define DEVICE_CLASS_MAJOR_MISC 0
+#define DEVICE_CLASS_MAJOR_COMPUTER 1
+#define DEVICE_CLASS_MAJOR_PHONE 2
+#define DEVICE_CLASS_MAJOR_LAN 3
+#define DEVICE_CLASS_MAJOR_AV 4
+#define DEVICE_CLASS_MAJOR_PERIPH 5
+#define DEVICE_CLASS_MAJOR_IMAGING 6
+#define DEVICE_CLASS_MAJOR_WEARABLE 7
+#define DEVICE_CLASS_MAJOR_TOY 8
+#define DEVICE_CLASS_MAJOR_HEALTH 9
+#define DEVICE_CLASS_MAJOR_UNCATEGORIZED 31
+
+#define DEVICE_CLASS_MINOR_COMPUTER_SHIFT 2
+#define DEVICE_CLASS_MINOR_COMPUTER_MASK 0xFC
+#define DEVICE_CLASS_MINOR_COMPUTER_UNCATEG 0
+#define DEVICE_CLASS_MINOR_COMPUTER_DESKTOP 1
+#define DEVICE_CLASS_MINOR_COMPUTER_SERVER 2
+#define DEVICE_CLASS_MINOR_COMPUTER_LAPTOP 3
+#define DEVICE_CLASS_MINOR_COMPUTER_CLAM_PDA 4
+#define DEVICE_CLASS_MINOR_COMPUTER_PALM_PDA 5
+#define DEVICE_CLASS_MINOR_COMPUTER_WEARABLE 6
+
+#define DEVICE_CLASS_MINOR_PHONE_SHIFT 2
+#define DEVICE_CLASS_MINOR_PHONE_MASK 0xFC
+#define DEVICE_CLASS_MINOR_PHONE_UNCATEG 0
+#define DEVICE_CLASS_MINOR_PHONE_CELL 1
+#define DEVICE_CLASS_MINOR_PHONE_CORDLESS 2
+#define DEVICE_CLASS_MINOR_PHONE_SMART 3
+#define DEVICE_CLASS_MINOR_PHONE_MODEM 4
+#define DEVICE_CLASS_MINOR_PHONE_ISDN 5
+
+#define DEVICE_CLASS_MINOR_AV_SHIFT 2
+#define DEVICE_CLASS_MINOR_AV_MASK 0xFC
+#define DEVICE_CLASS_MINOR_AV_UNCATEG 0
+#define DEVICE_CLASS_MINOR_AV_HEADSET 1
+#define DEVICE_CLASS_MINOR_AV_HANDSFREE 2
+#define DEVICE_CLASS_MINOR_AV_MIC 4
+#define DEVICE_CLASS_MINOR_AV_LOUDSPEAKER 5
+#define DEVICE_CLASS_MINOR_AV_HEADPHONES 6
+#define DEVICE_CLASS_MINOR_AV_PORTBL_AUDIO 7
+#define DEVICE_CLASS_MINOR_AV_CAR_AUDIO 8
+#define DEVICE_CLASS_MINOR_AV_SET_TOP_BOX 9
+#define DEVICE_CLASS_MINOR_AV_HIFI 10
+#define DEVICE_CLASS_MINOR_AV_VCR 11
+#define DEVICE_CLASS_MINOR_AV_VID_CAM 12
+#define DEVICE_CLASS_MINOR_AV_CAMCORDER 13
+#define DEVICE_CLASS_MINOR_AV_VID_MONITOR 14
+#define DEVICE_CLASS_MINOR_AV_DISPLAY_AND_SPKR 15
+#define DEVICE_CLASS_MINOR_AV_VC 16
+#define DEVICE_CLASS_MINOR_AV_TOY 18
+
+
+//COMMANDS
+
+#define HCI_OGF_Link_Control 1
+
+#define HCI_CMD_Inquiry 0x0001 //enter Inquiry mode where it discovers other Bluetooth devices.
+#define HCI_CMD_Inquiry_Cancel 0x0002 //cancel the Inquiry mode in which the Bluetooth device is in.
+#define HCI_CMD_Periodic_Inquiry_Mode 0x0003 //set the device to enter Inquiry modes periodically according to the time interval set.
+#define HCI_CMD_Exit_Periodic_Inquiry_Mode 0x0004 //exit the periodic Inquiry mode
+#define HCI_CMD_Create_Connection 0x0005 //create an ACL connection to the device specified by the BD_ADDR in the parameters.
+#define HCI_CMD_Disconnect 0x0006 //terminate the existing connection to a device
+#define HCI_CMD_Add_SCO_Connection 0x0007 //Create an SCO connection defined by the connection handle parameters.
+#define HCI_CMD_Accept_Connection_Request 0x0009 //accept a new connection request
+#define HCI_CMD_Reject_Connection_Request 0x000A //reject a new connection request
+#define HCI_CMD_Link_Key_Request_Reply 0x000B //Reply to a link key request event sent from controller to the host
+#define HCI_CMD_Link_Key_Request_Negative_Reply 0x000C //Reply to a link key request event from the controller to the host if there is no link key associated with the connection.
+#define HCI_CMD_PIN_Code_Request_Reply 0x000D //Reply to a PIN code request event sent from a controller to the host.
+#define HCI_CMD_PIN_Code_Request_Negative_Reply 0x000E //Reply to a PIN code request event sent from the controller to the host if there is no PIN associated with the connection.
+#define HCI_CMD_Change_Connection_Packet_Type 0x000F //change the type of packets to be sent for an existing connection.
+#define HCI_CMD_Authentication_Requested 0x0011 //establish authentication between two devices specified by the connection handle.
+#define HCI_CMD_Set_Connection_Encryption 0x0013 //enable or disable the link level encryption.
+#define HCI_CMD_Change_Connection_Link_Key 0x0015 //force the change of a link key to a new one between two connected devices.
+#define HCI_CMD_Master_Link_Key 0x0017 //force two devices to use the master's link key temporarily.
+#define HCI_CMD_Remote_Name_Request 0x0019 //determine the user friendly name of the connected device.
+#define HCI_CMD_Read_Remote_Supported_Features 0x001B //determine the features supported by the connected device.
+#define HCI_CMD_Read_Remote_Version_Information 0x001D //determine the version information of the connected device.
+#define HCI_CMD_Read_Clock_Offset 0x001F //read the clock offset of the remote device.
+//BT2.1 SSP
+#define HCI_CMD_IO_Capability_Request_Reply 0x002B
+#define HCI_CMD_User_Confirmation_Request_Reply 0x002C
+#define HCI_CMD_User_Confirmation_Request_Negative_Reply 0x002D
+#define HCI_CMD_User_Passkey_Request_Reply 0x002E
+#define HCI_CMD_User_Passkey_Request_Negative_Reply 0x002F
+#define HCI_CMD_Remote_OOB_Data_Request_Reply 0x0030
+#define HCI_CMD_Remote_OOB_Data_Request_Negative_Reply 0x0033
+#define HCI_CMD_IO_Capability_Request_Negative_Reply 0x0034
+
+#define HCI_OGF_Policy 2
+
+#define HCI_CMD_Hold_Mode 0x0001 //place the current or remote device into the Hold mode state.
+#define HCI_CMD_Sniff_Mode 0x0003 //place the current or remote device into the Sniff mode state.
+#define HCI_CMD_Exit_Sniff_Mode 0x0004 //exit the current or remote device from the Sniff mode state.
+#define HCI_CMD_Park_Mode 0x0005 //place the current or remote device into the Park mode state.
+#define HCI_CMD_Exit_Park_Mode 0x0006 //exit the current or remote device from the Park mode state.
+#define HCI_CMD_QoS_Setup 0x0007 //setup the Quality of Service parameters of the device.
+#define HCI_CMD_Role_Discovery 0x0009 //determine the role of the device for a particular connection.
+#define HCI_CMD_Switch_Role 0x000B //allow the device to switch roles for a particular connection.
+#define HCI_CMD_Read_Link_Policy_Settings 0x000C //determine the link policy that the LM can use to establish connections.
+#define HCI_CMD_Write_Link_Policy_Settings 0x000D //set the link policy that the LM can use for a particular connection.
+
+
+#define HCI_OGF_Controller_and_Baseband 3
+
+#define HCI_CMD_Set_Event_Mask 0x0001 //set which events are generated by the HCI for the host.
+#define HCI_CMD_Reset 0x0003 //reset the host controller, link manager and the radio module.
+#define HCI_CMD_Set_Event_Filter 0x0005 //used by host to set the different types of event filters that the host needs to receive.
+#define HCI_CMD_Flush 0x0008 //flush all pending data packets for transmission for a particular connection handle.
+#define HCI_CMD_Read_PIN_Type 0x0009 //used by host to determine if the link manager assumes that the host requires a variable PIN type or fixed PIN code. PIN is used during pairing.
+#define HCI_CMD_Write_PIN_Type 0x000A //used by host to write to the host controller on the PIN type supported by the host.
+#define HCI_CMD_Create_New_Unit_Key 0x000B //create a new unit key.
+#define HCI_CMD_Read_Stored_Link_Key 0x000D //read the link key stored in the host controller.
+#define HCI_CMD_Write_Stored_Link_Key 0x0011 //write the link key to the host controller.
+#define HCI_CMD_Delete_Stored_Link_Key 0x0012 //delete a stored link key in the host controller.
+#define HCI_CMD_Change_Local_Name 0x0013 //modify the user friendly name of the device.
+#define HCI_CMD_Read_Local_Name 0x0014 //read the user friendly name of the device.
+#define HCI_CMD_Read_Connection_Accept_Timeout 0x0015 //determine the timeout session before the host denies and rejects a new connection request.
+#define HCI_CMD_Write_Connection_Accept_Timeout 0x0016 //set the timeout session before a device can deny or reject a connection request.
+#define HCI_CMD_Read_Page_Timeout 0x0017 //read the timeout value where a device will wait for a connection acceptance before sending a connection failure is returned.
+#define HCI_CMD_Write_Page_Timeout 0x0018 //write the timeout value where a device will wait for a connection acceptance before sending a connection failure is returned.
+#define HCI_CMD_Read_Scan_Enable 0x0019 //read the status of the Scan_Enable configuration.
+#define HCI_CMD_Write_Scan_Enable 0x001A //set the status of the Scan_Enable configuration.
+#define HCI_CMD_Read_Page_Scan_Activity 0x001B //read the value of the Page_Scan_Interval and Page_Scan_Window configurations.
+#define HCI_CMD_Write_Page_Scan_Activity 0x001C //write the value of the Page_Scan_Interval and Page_Scan_Window configurations.
+#define HCI_CMD_Read_Inquiry_Scan_Activity 0x001D //read the value of the Inquiry_Scan_Interval and Inquiry_Scan_Window configurations.
+#define HCI_CMD_Write_Inquiry_Scan_Activity 0x001E //set the value of the Inquiry_Scan_Interval and Inquiry_Scan_Window configurations.
+#define HCI_CMD_Authentication_Enable 0x001F //read the Authentication_Enable parameter.
+#define HCI_CMD_Write_Authentication_Enable 0x0020 //set the Authentication_Enable parameter.
+#define HCI_CMD_Read_Encryption_Mode 0x0021 //read the Encryption_Mode parameter.
+#define HCI_CMD_Write_Encryption_Mode 0x0022 //write the Encryption_Mode parameter.
+#define HCI_CMD_Read_Class_Of_Device 0x0023 //read the Class_Of_Device parameter.
+#define HCI_CMD_Write_Class_Of_Device 0x0024 //set the Class_Of_Device parameter.
+#define HCI_CMD_Read_Voice_Setting 0x0025 //read the Voice_Setting parameter. Used for voice connections.
+#define HCI_CMD_Voice_Setting 0x0026 //set the Voice_Setting parameter. Used for voice connections.
+#define HCI_CMD_Read_Automatic_Flush_Timeout 0x0027 //read the Flush_Timeout parameter. Used for ACL connections only.
+#define HCI_CMD_Write_Automatic_Flush_Timeout 0x0028 //set the Flush_Timeout parameter. Used for ACL connections only.
+#define HCI_CMD_Read_Num_Broadcast_Retransmissions 0x0029 //read the number of time a broadcast message is retransmitted.
+#define HCI_CMD_Write_Num_Broadcast_Retransmissions 0x002A //set the number of time a broadcast message is retransmitted.
+#define HCI_CMD_Read_Hold_Mode_Activity 0x002B //set the Hold_Mode activity to instruct the device to perform an activity during hold mode.
+#define HCI_CMD_Write_Hold_Mode_Activity 0x002C //set the Hold_Mode_Activity parameter.
+#define HCI_CMD_Transmit_Power_Level 0x002D //read the power level required for transmission for a connection handle.
+#define HCI_CMD_Read_SCO_Flow_Control_Enable 0x002E //check the current status of the flow control for the SCO connection.
+#define HCI_CMD_SCO_Flow_Control_Enable 0x002F //set the status of the flow control for a connection handle.
+#define HCI_CMD_Set_Host_Controller_To_Host_Flow_Control 0x0031 //set the flow control from the host controller to host in on or off state.
+#define HCI_CMD_Host_Buffer_Size 0x0033 //set by host to inform the host controller of the buffer size of the host for ACL and SCO connections.
+#define HCI_CMD_Host_Number_Of_Completed_Packets 0x0035 //set from host to host controller when it is ready to receive more data packets.
+#define HCI_CMD_Read_Link_Supervision_Timeout 0x0036 //read the timeout for monitoring link losses.
+#define HCI_CMD_Write_Link_Supervision_Timeout 0x0037 //set the timeout for monitoring link losses.
+#define HCI_CMD_Read_Number_Of_Supported_IAC 0x0038 //read the number of IACs that the device can listen on during Inquiry access.
+#define HCI_CMD_Read_Current_IAC_LAP 0x0039 //read the LAP for the current IAC.
+#define HCI_CMD_Write_Current_IAC_LAP 0x003A //set the LAP for the current IAC.
+#define HCI_CMD_Read_Page_Scan_Period_Mode 0x003B //read the timeout session of a page scan.
+#define HCI_CMD_Write_Page_Scan_Period_Mode 0x003C //set the timeout session of a page scan.
+#define HCI_CMD_Read_Page_Scan_Mode 0x003D //read the default Page scan mode.
+#define HCI_CMD_Write_Page_Scan_Mode 0x003E //set the default page scan mode.
+//BT2.1 SSP
+#define HCI_CMD_Write_Simple_Pairing_Mode 0x0056
+
+
+#define HCI_OGF_Informational 4
+
+#define HCI_CMD_Read_Local_Version_Information 0x0001
+#define HCI_CMD_Read_Local_Supported_Features 0x0003
+#define HCI_CMD_Read_Buffer_Size 0x0005
+#define HCI_CMD_Read_Country_Code 0x0007
+#define HCI_CMD_Read_BD_ADDR 0x0009
+
+
+//EVENTS
+
+#define HCI_EVT_Inquiry_Complete_Event 0x01 //Indicates the Inquiry has finished.
+#define HCI_EVT_Inquiry_Result_Event 0x02 //Indicates that Bluetooth device(s) have responded for the inquiry.
+#define HCI_EVT_Connection_Complete_Event 0x03 //Indicates to both hosts that the new connection has been formed.
+#define HCI_EVT_Connection_Request_Event 0x04 //Indicates that a new connection is trying to be established.
+#define HCI_EVT_Disconnection_Complete_Event 0x05 //Occurs when a connection has been disconnected.
+#define HCI_EVT_Authentication_Complete_Event 0x06 //Occurs when an authentication has been completed.
+#define HCI_EVT_Remote_Name_Request_Complete_Event 0x07 //Indicates that the request for the remote name has been completed.
+#define HCI_EVT_Encryption_Change_Event 0x08 //Indicates that a change in the encryption has been completed.
+#define HCI_EVT_Change_Connection_Link_Key_Complete_Event 0x09 //Indicates that the change in the link key has been completed.
+#define HCI_EVT_Master_Link_Key_Complete_Event 0x0A //Indicates that the change in the temporary link key or semi permanent link key on the master device is complete.
+#define HCI_EVT_Read_Remote_Supported_Features_Complete_Event 0x0B //Indicates that the reading of the supported features on the remote device is complete.
+#define HCI_EVT_Read_Remote_Version_Complete_Event 0x0C //Indicates that the version number on the remote device has been read and completed.
+#define HCI_EVT_QOS_Setup_Complete_Event 0x0D //Indicates that the Quality of Service setup has been complete.
+#define HCI_EVT_Command_Complete_Event 0x0E //Used by controller to send status and event parameters to the host for the particular command.
+#define HCI_EVT_Command_Status_Event 0x0F //Indicates that the command has been received and is being processed in the host controller.
+#define HCI_EVT_Hardware_Error_Event 0x10 //Indicates a hardware failure of the Bluetooth device.
+#define HCI_EVT_Flush_Occured_event 0x11 //Indicates that the data has been flushed for a particular connection.
+#define HCI_EVT_Role_Change_Event 0x12 //Indicates that the current bluetooth role for a connection has been changed.
+#define HCI_EVT_Number_Of_Completed_Packets_Event 0x13 //Indicates to the host the number of data packets sent compared to the last time the same event was sent.
+#define HCI_EVT_Mode_Change_Event 0x14 //Indicates the change in mode from hold, sniff, park or active to another mode.
+#define HCI_EVT_Return_Link_Keys_Event 0x15 //Used to return stored link keys after a Read_Stored_Link_Key command was issued.
+#define HCI_EVT_PIN_Code_Request_Event 0x16 //Indicates the a PIN code is required for a new connection.
+#define HCI_EVT_Link_Key_Request_Event 0x17 //Indicates that a link key is required for the connection.
+#define HCI_EVT_Link_Key_Notification_Event 0x18 //Indicates to the host that a new link key has been created.
+#define HCI_EVT_Loopback_Command_Event 0x19 //Indicates that command sent from the host will be looped back.
+#define HCI_EVT_Data_Buffer_Overflow_Event 0x1A //Indicates that the data buffers on the host has overflowed.
+#define HCI_EVT_Max_Slots_Change_Event 0x1B //Informs the host when the LMP_Max_Slots parameter changes.
+#define HCI_EVT_Read_Clock_Offset_Complete_Event 0x1C //Indicates the completion of reading the clock offset information.
+#define HCI_EVT_Connection_Packet_Type_Changed_Event 0x1D //Indicate the completion of the packet type change for a connection.
+#define HCI_EVT_QoS_Violation_Event 0x1E //Indicates that the link manager is unable to provide the required Quality of Service.
+#define HCI_EVT_Page_Scan_Mode_Change_Event 0x1F //Indicates that the remote device has successfully changed the Page Scan mode.
+#define HCI_EVT_Page_Scan_Repetition_Mode_Change_Event 0x20 //Indicates that the remote device has successfully changed the Page Scan Repetition mode.
+//BT2.1 SSP
+#define HCI_EVT_IO_Capability_Request_Event 0x31
+#define HCI_EVT_IO_Capability_Response_Event 0x32
+#define HCI_EVT_User_Confirmation_Request_Event 0x33
+#define HCI_EVT_User_Passkey_Request_Event 0x34
+#define HCI_EVT_Remote_OOB Data_Request_Event 0x35
+#define HCI_EVT_Simple_Pairing_Complete_Event 0x36
+#define HCI_EVT_User_Passkey_Notification_Event 0x3B
+
+
+
+
+//ERRORS
+
+#define HCI_ERR_Unknown_HCI_Command 0x01
+#define HCI_ERR_No_Connection 0x02
+#define HCI_ERR_Hardware_Failure 0x03
+#define HCI_ERR_Page_Timeout 0x04
+#define HCI_ERR_Authentication_Failure 0x05
+#define HCI_ERR_Key_Missing 0x06
+#define HCI_ERR_Memory_Full 0x07
+#define HCI_ERR_Connection_Timeout 0x08
+#define HCI_ERR_Max_Number_Of_Connections 0x09
+#define HCI_ERR_Max_Number_Of_SCO_Connections_To_A_Device 0x0A
+#define HCI_ERR_ACL_Connection_Already_Exists 0x0B
+#define HCI_ERR_Command_Disallowed 0x0C
+#define HCI_ERR_Host_Rejected_Due_To_Limited_Resources 0x0D
+#define HCI_ERR_Host_Rejected_Due_To_Security_Reasons 0x0E
+#define HCI_ERR_Host_Rejected_Due_To_A_Remote_Device_Only_A_Personal_Device 0x0F
+#define HCI_ERR_Host_Timeout 0x10
+#define HCI_ERR_Unsupported_Feature_Or_Parameter_Value 0x11
+#define HCI_ERR_Invalid_HCI_Command_Parameters 0x12
+#define HCI_ERR_Other_End_Terminated_Connection_User_Ended_Connection 0x13
+#define HCI_ERR_Other_End_Terminated_Connection_Low_Resources 0x14
+#define HCI_ERR_Other_End_Terminated_Connection_About_To_Power_Off 0x15
+#define HCI_ERR_Connection_Terminated_By_Local_Host 0x16
+#define HCI_ERR_Repeated_Attempts 0x17
+#define HCI_ERR_Pairing_Not_Allowed 0x18
+#define HCI_ERR_Unknown_LMP_PDU 0x19
+#define HCI_ERR_Unsupported_Remote_Feature 0x1A
+#define HCI_ERR_SCO_Offset_Rejected 0x1B
+#define HCI_ERR_SCO_Interval_Rejected 0x1C
+#define HCI_ERR_SCO_Air_Mode_Rejected 0x1D
+#define HCI_ERR_Invalid_LMP_Parameters 0x1E
+#define HCI_ERR_Unspecified_Error 0x1F
+#define HCI_ERR_Unsupported_LMP_Parameter 0x20
+#define HCI_ERR_Role_Change_Not_Allowed 0x21
+#define HCI_ERR_LMP_Response_Timeout 0x22
+#define HCI_ERR_LMP_Error_Transaction_Collision 0x23
+#define HCI_ERR_LMP_PDU_Not_Allowed 0x24
+#define HCI_ERR_Encryption_Mode_Not_Acceptable 0x25
+#define HCI_ERR_Unit_Key_Used 0x26
+#define HCI_ERR_QoS_Not_Supported 0x27
+#define HCI_ERR_Instant_Passed 0x28
+#define HCI_ERR_Pairing_With_Unit_Key_Not_Supported 0x29
+
+#endif
diff --git a/MakefileBasedBuild/app/I2C.c b/MakefileBasedBuild/app/I2C.c
new file mode 100644
index 0000000..9f67a63
--- /dev/null
+++ b/MakefileBasedBuild/app/I2C.c
@@ -0,0 +1,602 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#define ADK_INTERNAL
+#include "fwk.h"
+#include "I2C.h"
+#include "coop.h"
+#include "dbg.h"
+
+// the hardware interface in this chip is as pleasant to use as cuddling a pirahna, hence the bit-bang solution.
+// to use the hardware, set I2C_BITBANG to 0.
+// to use the peripheral DMA with the I2C hardware, set I2C_PDC to 1.
+#define I2C_BITBANG 0
+#define I2C_PDC 1
+#define I2C_INT_PDC 1
+
+#define I2C_STAT_DONE 0
+#define I2C_STAT_LASTREAD 2
+#define I2C_STAT_BUSY 1
+#define I2C_STAT_NACK 3
+
+typedef struct _i2cInst
+{
+ Twi *pTwi;
+ volatile uint8_t status;
+ uint8_t *lastByte;
+} i2c_i;
+
+static i2c_i i2cInst[I2C_NUM_INSTANCES] = { { TWI0, 0, 0 }, { TWI1, 0, 0 } };
+
+static char sdaRd(uint8_t instance);
+static void sdaLo(uint8_t instance);
+static void sdaHi(uint8_t instance);
+static void sclLo(uint8_t instance);
+static void sclHi(uint8_t instance);
+static void i2cBitTx(uint8_t instance, char bit);
+static void i2cStop(uint8_t instance);
+static void i2cPdcDisable(Twi *pTwi);
+
+ //sda first please
+static const uint8_t pins[I2C_NUM_INSTANCES][2] = { { PORTA(17), PORTA(18) }, { PORTB(12), PORTB(13) } };
+static uint32_t delayTicks[I2C_NUM_INSTANCES];
+
+
+static void i2cDelay(uint8_t instance){
+
+ fwkDelay(delayTicks[instance]);
+}
+
+void i2cClock(uint8_t instance, uint32_t clock){
+#if I2C_BITBANG
+ delayTicks[instance] = (TICKS_PER_MS * 1000) / (8 * clock * 2);
+#else
+ Twi *pTwi;
+ uint32_t dwCkDiv = 0;
+ uint32_t dwClDiv;
+ uint32_t dwOk = 0;
+ if (instance == 0)
+ pTwi = TWI0;
+ else
+ pTwi = TWI1;
+
+ while (!dwOk) {
+ dwClDiv = ((BOARD_MCK / (2 * clock)) - 4) / (1 << dwCkDiv);
+ if (dwClDiv <= 255)
+ dwOk = 1;
+ else
+ dwCkDiv++;
+ }
+ pTwi->TWI_CWGR = 0;
+ pTwi->TWI_CWGR = (dwCkDiv << 16) | (dwClDiv << 8) | dwClDiv;
+#endif
+}
+
+// i2c interrupt handler used only for PDC mode
+// to prevent runaway operations caused by not responding
+// fast enough and setting the stop bit.
+static void i2c_handler( i2c_i *pInst )
+{
+ uint32_t status;
+ Twi *pTwi = pInst->pTwi;
+
+ status = pTwi->TWI_SR & pTwi->TWI_IMR; // Masked status
+
+ if (TWI_SR_TXBUFE & status) { // Transmit has completed.
+ i2cPdcDisable(pTwi);
+ pTwi->TWI_CR = TWI_CR_STOP;
+ pTwi->TWI_IDR = TWI_IDR_TXBUFE;
+ pTwi->TWI_IER = TWI_IER_TXCOMP;
+ } else if (TWI_SR_RXBUFF & status) { // Receive has completed
+ if (pInst->status == I2C_STAT_LASTREAD) {
+ i2cPdcDisable(pTwi);
+ pTwi->TWI_IDR = TWI_IDR_RXBUFF;
+ pTwi->TWI_IER = TWI_IER_TXCOMP;
+ } else {
+ pInst->status = I2C_STAT_LASTREAD;
+ i2cPdcDisable(pTwi);
+ pTwi->TWI_CR = TWI_CR_STOP;
+ pTwi->TWI_RPR = pInst->lastByte;
+ pTwi->TWI_RCR = 1;
+ pTwi->TWI_PTCR = TWI_PTCR_RXTEN;
+ }
+ } else if (TWI_SR_TXCOMP & status) {
+ pInst->status = I2C_STAT_DONE;
+ pTwi->TWI_IDR = TWI_IDR_TXCOMP;
+ } else if (TWI_SR_NACK & status) {
+ pInst->status = I2C_STAT_NACK;
+ i2cPdcDisable(pTwi);
+ }
+}
+
+void TWI0_IrqHandler(void)
+{
+ i2c_handler(&i2cInst[0]);
+}
+
+void TWI1_IrqHandler(void)
+{
+ i2c_handler(&i2cInst[1]);
+}
+
+uint8_t i2cInit(uint8_t instance, uint32_t clock){
+ uint8_t i;
+
+ if(instance >= I2C_NUM_INSTANCES) return I2C_ERR_INVAL;
+
+ gpioSetFun(pins[instance][0], GPIO_FUNC_GPIO);
+ gpioSetFun(pins[instance][1], GPIO_FUNC_GPIO);
+ gpioSetPullup(pins[instance][0], 1);
+ gpioSetPullup(pins[instance][1], 1);
+ gpioSetDir(pins[instance][0], 0);
+ gpioSetDir(pins[instance][1], 0);
+ gpioSetVal(pins[instance][0], 0);
+ gpioSetVal(pins[instance][1], 0);
+ sdaHi(instance);
+ sclHi(instance);
+ delayTicks[instance] = (TICKS_PER_MS * 1000) / (8 * clock * 2);
+ i2cDelay(instance);
+ i2cDelay(instance);
+ for (i = 0; i < 100; i++) // Try to reset the bus
+ i2cBitTx(instance, 1);
+ i2cStop(instance);
+
+#if !I2C_BITBANG
+ PMC_EnablePeripheral(instance ? ID_TWI1 : ID_TWI0);
+ gpioSetFun(pins[instance][0], GPIO_FUNC_A);
+ gpioSetFun(pins[instance][1], GPIO_FUNC_A);
+ TWI_ConfigureMaster(instance ? TWI1 : TWI0, clock, BOARD_MCK);
+
+#if I2C_INT_PDC
+ NVIC_EnableIRQ(instance ? TWI1_IRQn : TWI0_IRQn);
+ if (instance)
+ TWI1->TWI_IDR = 0x00F77;
+ else
+ TWI0->TWI_IDR = 0x00F77;
+#endif
+
+#endif
+
+
+ return I2C_ALL_OK;
+}
+
+static void i2cStart(uint8_t instance){
+
+ sdaHi(instance);
+ sclHi(instance);
+ i2cDelay(instance);
+ sdaLo(instance);
+ i2cDelay(instance);
+ sclLo(instance);
+ i2cDelay(instance);
+}
+
+static void i2cStop(uint8_t instance){
+
+ i2cDelay(instance);
+ sdaLo(instance);
+ i2cDelay(instance);
+ sclHi(instance);
+ i2cDelay(instance);
+ sdaHi(instance);
+}
+
+static char i2cBitRx(uint8_t instance){
+
+ char ret;
+
+ sdaHi(instance);
+ i2cDelay(instance);
+ sclHi(instance);
+ i2cDelay(instance);
+ ret = sdaRd(instance);
+ sclLo(instance);
+
+ return ret;
+}
+
+static void i2cBitTx(uint8_t instance, char bit){
+
+ if(bit) sdaHi(instance);
+ else sdaLo(instance);
+ i2cDelay(instance);
+ sclHi(instance);
+ i2cDelay(instance);
+ sclLo(instance);
+}
+
+static char i2cSend(uint8_t instance, uint8_t val){ //return 1 -> ack, 0->nak
+
+ uint8_t i;
+
+ for(i = 0; i < 8; i++){
+ i2cBitTx(instance, !!(val & 0x80));
+ val <<= 1;
+ }
+ return !i2cBitRx(instance);
+}
+
+static uint8_t i2cRecv(uint8_t instance, char ack){
+
+ uint8_t i, v = 0;
+
+ for(i = 0; i < 8; i++){
+
+ v <<= 1;
+ if(i2cBitRx(instance)) v |= 1;
+ }
+ i2cBitTx(instance, !ack);
+ return v;
+}
+
+
+static void i2cWaitComplete(Twi *pTwi)
+{
+ while(!(pTwi->TWI_SR & TWI_SR_TXCOMP)) coopYield();
+}
+
+static uint32_t i2cWaitRx(Twi *pTwi)
+{
+ uint32_t stat;
+ do {
+ coopYield();
+ stat = pTwi->TWI_SR;
+ if (stat & TWI_SR_NACK) {
+ return stat;
+ }
+ } while (!(stat & TWI_SR_RXRDY));
+}
+
+static uint32_t i2cWaitTx(Twi *pTwi)
+{
+ uint32_t stat;
+ do {
+ coopYield();
+ stat = pTwi->TWI_SR;
+ if (stat & TWI_SR_NACK) {
+ return stat;
+ }
+ } while (!(stat & TWI_SR_TXRDY));
+ return 0;
+}
+
+static void i2cPdcDisable(Twi *pTwi)
+{
+ pTwi->TWI_PTCR = TWI_PTCR_RXTDIS;
+ pTwi->TWI_PTCR = TWI_PTCR_TXTDIS;
+ pTwi->TWI_RPR = 0;
+ pTwi->TWI_RCR = 0;
+ pTwi->TWI_TPR = 0;
+ pTwi->TWI_TCR = 0;
+}
+
+static uint32_t i2cWaitPdcTx(Twi *pTwi)
+{
+ uint32_t stat;
+ do {
+ coopYield();
+ stat = pTwi->TWI_SR;
+ if (stat & TWI_SR_NACK) {
+ return stat;
+ }
+ } while (!(stat & TWI_SR_TXBUFE));
+ return stat;
+}
+
+static uint32_t i2cWaitPdcRx(Twi *pTwi)
+{
+ uint32_t stat;
+ do {
+ coopYield();
+ stat = pTwi->TWI_SR;
+ if ((stat & TWI_SR_NACK) || ((stat & TWI_SR_TXCOMP) && !(stat & TWI_SR_RXBUFF))) {
+ return stat;
+ }
+ } while(!(stat & TWI_SR_RXBUFF));
+ return stat;
+}
+
+uint8_t i2cOp(uint8_t instance, uint8_t addr, const uint8_t* sendData, uint8_t sendSz, uint8_t* recvData, uint8_t recvSz){
+
+ uint8_t ret = I2C_ERR_NAK;
+ uint32_t stat;
+
+#if I2C_PDC
+ uint8_t dat[256];
+ uint8_t i;
+ uint32_t tmp;
+ if (sendData != NULL && (uint32_t)sendData < 0x20000000) { /* Undocumented feature: PDC can't read from flash */
+ if (sendSz > 256)
+ return I2C_ERR_INVAL;
+ for (i = 0; i < sendSz; i++)
+ dat[i] = *sendData++;
+ sendData = dat;
+ }
+#endif
+
+#if !I2C_BITBANG
+ Twi *pTwi;
+#endif
+
+ if(instance >= I2C_NUM_INSTANCES) return I2C_ERR_INVAL;
+
+#if !I2C_BITBANG
+ pTwi = (instance == 0) ? TWI0 : TWI1;
+#endif
+
+#if I2C_BITBANG
+ addr <<= 1;
+
+ if(sendSz || !recvSz){ //if neither send nor recv requested, do a single send -> this is for a scan
+
+ i2cStart(instance);
+
+ if(!i2cSend(instance, addr)) goto out;
+ while(sendSz--) if(!i2cSend(instance, *sendData++)) goto out;
+ }
+ if(recvSz){
+
+ i2cStart(instance); //if we already sent something, restart
+
+ if(!i2cSend(instance, addr | 1)) goto out;
+ while(recvSz){
+ recvSz--;
+ *recvData++ = i2cRecv(instance, !!recvSz);
+ }
+ }
+
+ ret = I2C_ALL_OK;
+#else
+
+ if (sendSz == 0 && recvSz == 0) { // Quick (for a scan)
+ pTwi->TWI_MMR = 0;
+ pTwi->TWI_MMR = (addr << 16);
+ pTwi->TWI_CR = TWI_CR_QUICK;
+ if (TWI_SR_NACK & i2cWaitTx(pTwi)) {
+ i2cWaitComplete(pTwi);
+ ret = I2C_ERR_NAK;
+ goto out;
+ }
+ i2cWaitComplete(pTwi);
+ }
+
+#if I2C_PDC
+ if (sendSz != 0) {
+ pTwi->TWI_TPR = (uint32_t)sendData;
+ pTwi->TWI_TCR = sendSz;
+ pTwi->TWI_MMR = 0;
+ pTwi->TWI_MMR = (addr << 16);
+ pTwi->TWI_IADR = 0;
+ pTwi->TWI_IADR = 0;
+ pTwi->TWI_PTCR = TWI_PTCR_TXTEN;
+#if I2C_INT_PDC
+ i2cInst[instance].status = I2C_STAT_BUSY;
+ pTwi->TWI_IER = TWI_IER_TXBUFE | TWI_IER_NACK;
+ while((i2cInst[instance].status != I2C_STAT_DONE) &&
+ (i2cInst[instance].status != I2C_STAT_NACK))
+ coopYield();
+ if (i2cInst[instance].status == I2C_STAT_NACK) {
+ ret = I2C_ERR_NAK;
+ goto out;
+ }
+#else
+
+ if (TWI_SR_NACK & i2cWaitPdcTx(pTwi)) {
+ i2cPdcDisable(pTwi);
+ i2cWaitComplete(pTwi);
+ ret = I2C_ERR_NAK;
+ goto out;
+ }
+ i2cPdcDisable(pTwi);
+ pTwi->TWI_CR = TWI_CR_STOP;
+ i2cWaitComplete(pTwi);
+#endif
+ }
+
+ if (recvSz == 1) { // We are forced to do the one byte reads manually.
+ pTwi->TWI_RPR = (uint32_t)recvData;
+ pTwi->TWI_RCR = 1;
+ pTwi->TWI_MMR = 0;
+ pTwi->TWI_MMR = TWI_MMR_MREAD | (addr << 16);
+ pTwi->TWI_CR = TWI_CR_START | TWI_CR_STOP;
+ pTwi->TWI_PTCR = TWI_PTCR_RXTEN;
+#if I2C_INT_PDC
+ i2cInst[instance].status = I2C_STAT_LASTREAD;
+ pTwi->TWI_IER = TWI_IER_RXBUFF | TWI_IER_NACK;
+ while((i2cInst[instance].status != I2C_STAT_DONE) &&
+ (i2cInst[instance].status != I2C_STAT_NACK))
+ coopYield();
+ if (i2cInst[instance].status == I2C_STAT_NACK) {
+ ret = I2C_ERR_NAK;
+ goto out;
+ }
+#else
+
+ if (TWI_SR_NACK & i2cWaitPdcRx(pTwi)) {
+ i2cPdcDisable(pTwi);
+ i2cWaitComplete(pTwi);
+ ret = I2C_ERR_NAK;
+ goto out;
+ }
+ i2cPdcDisable(pTwi);
+ i2cWaitComplete(pTwi);
+#endif
+ }
+
+ if (recvSz > 1) {
+ pTwi->TWI_RPR = (uint32_t)recvData;
+ pTwi->TWI_RCR = recvSz - 1; // Last byte read is handled manually
+ pTwi->TWI_MMR = 0;
+ pTwi->TWI_MMR = TWI_MMR_MREAD | (addr << 16);
+ pTwi->TWI_CR = TWI_CR_START;
+ pTwi->TWI_PTCR = TWI_PTCR_RXTEN;
+
+#if I2C_INT_PDC
+ i2cInst[instance].lastByte = recvData + recvSz - 1;
+ i2cInst[instance].status = I2C_STAT_BUSY;
+ pTwi->TWI_IER = TWI_IER_RXBUFF | TWI_IER_NACK;
+ while((i2cInst[instance].status != I2C_STAT_DONE) &&
+ (i2cInst[instance].status != I2C_STAT_NACK))
+ coopYield();
+ if (i2cInst[instance].status == I2C_STAT_NACK) {
+ ret = I2C_ERR_NAK;
+ goto out;
+ }
+#else
+ if (TWI_SR_NACK & i2cWaitPdcRx(pTwi)) {
+ i2cPdcDisable(pTwi);
+ i2cWaitComplete(pTwi);
+ ret = I2C_ERR_NAK;
+ goto out;
+ }
+ i2cPdcDisable(pTwi);
+ pTwi->TWI_CR = TWI_CR_STOP;
+ pTwi->TWI_RPR = (uint32_t)(recvData + recvSz - 1);
+ pTwi->TWI_RCR = 1;
+ pTwi->TWI_PTCR = TWI_PTCR_RXTEN;
+ if (TWI_SR_NACK & i2cWaitPdcRx(pTwi)) {
+ i2cPdcDisable(pTwi);
+ i2cWaitComplete(pTwi);
+ ret = I2C_ERR_NAK;
+ goto out;
+ }
+ i2cPdcDisable(pTwi);
+ i2cWaitComplete(pTwi);
+#endif
+ }
+ ret = I2C_ALL_OK;
+#else
+ if (sendSz != 0) {
+ pTwi->TWI_MMR = 0;
+ pTwi->TWI_MMR = (addr << 16);
+ pTwi->TWI_IADR = 0;
+ pTwi->TWI_IADR = 0;
+ while (sendSz--) {
+ pTwi->TWI_THR = *sendData++;
+ stat = i2cWaitTx(pTwi);
+ if (stat & TWI_SR_NACK) {
+ ret = I2C_ERR_NAK;
+ goto out;
+ }
+ }
+ pTwi->TWI_CR = TWI_CR_STOP;
+ i2cWaitComplete(pTwi);
+ }
+
+ if (recvSz == 1) {
+ pTwi->TWI_MMR = 0;
+ pTwi->TWI_MMR = TWI_MMR_MREAD | (addr << 16);
+ pTwi->TWI_IADR = 0;
+ pTwi->TWI_IADR = 0;
+ pTwi->TWI_CR = TWI_CR_START | TWI_CR_STOP;
+ if (TWI_SR_NACK & i2cWaitRx(pTwi)) {
+ ret = I2C_ERR_NAK;
+ goto out;
+ }
+ *recvData = pTwi->TWI_RHR;
+ i2cWaitComplete(pTwi);
+ } else if (recvSz >= 1) {
+ pTwi->TWI_MMR = 0;
+ pTwi->TWI_MMR = TWI_MMR_MREAD | (addr << 16);
+ pTwi->TWI_IADR = 0;
+ pTwi->TWI_IADR = 0;
+ pTwi->TWI_CR = TWI_CR_START;
+ while (recvSz--) {
+ if (TWI_SR_NACK & i2cWaitRx(pTwi)) {
+ ret = I2C_ERR_NAK;
+ goto out;
+ }
+ dbgPrintf("\0");
+ *recvData++ = pTwi->TWI_RHR;
+ if (recvSz == 1) pTwi->TWI_CR = TWI_CR_STOP;
+ }
+ i2cWaitComplete(pTwi);
+ }
+
+ ret = I2C_ALL_OK;
+#endif
+#endif
+
+out:
+
+#if I2C_BITBANG
+ i2cStop(instance);
+#else
+ if (ret != I2C_ALL_OK) {
+ pTwi->TWI_CR = TWI_CR_STOP;
+ i2cWaitComplete(pTwi);
+ }
+#endif
+
+ return ret;
+}
+
+uint8_t i2cSingleWrite(uint8_t instance, uint8_t addr, uint8_t reg, uint8_t val){
+
+ unsigned char data[2] = {reg, val};
+
+ return i2cOp(instance, addr, data, 2, NULL, 0);
+}
+
+uint8_t i2cSingleRead(uint8_t instance, uint8_t addr, uint8_t reg){
+
+ uint8_t ret, val;
+
+ ret = i2cOp(instance, addr, &reg, 1, &val, 1);
+
+ if(ret != I2C_ALL_OK) val = 0xFF;
+
+ return val;
+}
+
+uint8_t i2cQuick(uint8_t instance, uint8_t addr, uint8_t byte){
+
+ return i2cOp(instance, addr, &byte, 1, NULL, 0);
+}
+
+uint8_t i2cScan(uint8_t instance, uint8_t addr){
+
+ return i2cOp(instance, addr, NULL, 0, NULL, 0);
+}
+
+static char sdaRd(uint8_t instance){
+
+ return gpioGetVal(pins[instance][0]);
+}
+
+static void sdaLo(uint8_t instance){
+
+ gpioSetDir(pins[instance][0], 0);
+}
+
+static void sdaHi(uint8_t instance){
+
+ gpioSetDir(pins[instance][0], 1);
+}
+
+static void sclLo(uint8_t instance){
+
+ gpioSetDir(pins[instance][1], 0);
+}
+
+static void sclHi(uint8_t instance){
+
+ gpioSetDir(pins[instance][1], 1);
+ while(!gpioGetVal(pins[instance][1]));
+}
+
+
+
diff --git a/MakefileBasedBuild/app/I2C.h b/MakefileBasedBuild/app/I2C.h
new file mode 100644
index 0000000..bf1a917
--- /dev/null
+++ b/MakefileBasedBuild/app/I2C.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifdef ADK_INTERNAL
+#ifndef _I2C_H_
+#define _I2C_H_
+
+
+#define I2C_ALL_OK 0 //all OK
+#define I2C_ERR_NAK 1 //got a NAK
+#define I2C_ERR_INVAL 2 //invalid command given
+
+#define I2C_NUM_INSTANCES 2
+
+//basic interface
+uint8_t i2cInit(uint8_t instance, uint32_t clock);
+void i2cClock(uint8_t instance, uint32_t clock);
+uint8_t i2cOp(uint8_t instance, uint8_t addr, const uint8_t* sendData, uint8_t sendSz, uint8_t* recvData, uint8_t recvSz);
+
+//convenience
+uint8_t i2cSingleWrite(uint8_t instance, uint8_t addr, uint8_t reg, uint8_t val);
+uint8_t i2cSingleRead(uint8_t instance, uint8_t addr, uint8_t reg);
+uint8_t i2cQuick(uint8_t instance, uint8_t addr, uint8_t byte);
+uint8_t i2cScan(uint8_t instance, uint8_t addr);
+
+#endif
+#endif
+
diff --git a/MakefileBasedBuild/app/LEDgamma.h b/MakefileBasedBuild/app/LEDgamma.h
new file mode 100644
index 0000000..9cbbf25
--- /dev/null
+++ b/MakefileBasedBuild/app/LEDgamma.h
@@ -0,0 +1,262 @@
+#ifndef LEDGamma_h
+#define LEDGamma_h
+const uint16_t led_gamma[256] =
+{
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 2,
+ 2,
+ 3,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 11,
+ 12,
+ 14,
+ 15,
+ 17,
+ 19,
+ 21,
+ 23,
+ 25,
+ 27,
+ 29,
+ 32,
+ 34,
+ 37,
+ 40,
+ 43,
+ 46,
+ 49,
+ 52,
+ 55,
+ 59,
+ 62,
+ 66,
+ 70,
+ 73,
+ 77,
+ 82,
+ 86,
+ 90,
+ 95,
+ 99,
+ 104,
+ 109,
+ 114,
+ 119,
+ 124,
+ 129,
+ 135,
+ 140,
+ 146,
+ 152,
+ 158,
+ 164,
+ 170,
+ 176,
+ 182,
+ 189,
+ 196,
+ 202,
+ 209,
+ 216,
+ 224,
+ 231,
+ 238,
+ 246,
+ 254,
+ 261,
+ 269,
+ 277,
+ 286,
+ 294,
+ 302,
+ 311,
+ 320,
+ 328,
+ 337,
+ 347,
+ 356,
+ 365,
+ 375,
+ 384,
+ 394,
+ 404,
+ 414,
+ 424,
+ 435,
+ 445,
+ 456,
+ 467,
+ 477,
+ 488,
+ 500,
+ 511,
+ 522,
+ 534,
+ 545,
+ 557,
+ 569,
+ 581,
+ 594,
+ 606,
+ 619,
+ 631,
+ 644,
+ 657,
+ 670,
+ 683,
+ 697,
+ 710,
+ 724,
+ 738,
+ 752,
+ 766,
+ 780,
+ 794,
+ 809,
+ 823,
+ 838,
+ 853,
+ 868,
+ 884,
+ 899,
+ 914,
+ 930,
+ 946,
+ 962,
+ 978,
+ 994,
+ 1011,
+ 1027,
+ 1044,
+ 1061,
+ 1078,
+ 1095,
+ 1112,
+ 1130,
+ 1147,
+ 1165,
+ 1183,
+ 1201,
+ 1219,
+ 1237,
+ 1256,
+ 1274,
+ 1293,
+ 1312,
+ 1331,
+ 1350,
+ 1370,
+ 1389,
+ 1409,
+ 1429,
+ 1449,
+ 1469,
+ 1489,
+ 1509,
+ 1530,
+ 1551,
+ 1572,
+ 1593,
+ 1614,
+ 1635,
+ 1657,
+ 1678,
+ 1700,
+ 1722,
+ 1744,
+ 1766,
+ 1789,
+ 1811,
+ 1834,
+ 1857,
+ 1880,
+ 1903,
+ 1926,
+ 1950,
+ 1974,
+ 1997,
+ 2021,
+ 2045,
+ 2070,
+ 2094,
+ 2119,
+ 2143,
+ 2168,
+ 2193,
+ 2219,
+ 2244,
+ 2270,
+ 2295,
+ 2321,
+ 2347,
+ 2373,
+ 2400,
+ 2426,
+ 2453,
+ 2479,
+ 2506,
+ 2534,
+ 2561,
+ 2588,
+ 2616,
+ 2644,
+ 2671,
+ 2700,
+ 2728,
+ 2756,
+ 2785,
+ 2813,
+ 2842,
+ 2871,
+ 2900,
+ 2930,
+ 2959,
+ 2989,
+ 3019,
+ 3049,
+ 3079,
+ 3109,
+ 3140,
+ 3170,
+ 3201,
+ 3232,
+ 3263,
+ 3295,
+ 3326,
+ 3358,
+ 3390,
+ 3421,
+ 3454,
+ 3486,
+ 3518,
+ 3551,
+ 3584,
+ 3617,
+ 3650,
+ 3683,
+ 3716,
+ 3750,
+ 3784,
+ 3818,
+ 3852,
+ 3886,
+ 3920,
+ 3955,
+ 3990,
+ 4025,
+ 4060,
+ 4095,
+};
+#endif
diff --git a/MakefileBasedBuild/app/LEDs.c b/MakefileBasedBuild/app/LEDs.c
new file mode 100644
index 0000000..f4191d0
--- /dev/null
+++ b/MakefileBasedBuild/app/LEDs.c
@@ -0,0 +1,176 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#define ADK_INTERNAL
+#include "LEDs.h"
+#include "fwk.h"
+
+
+static const uint8_t blanks[] = {PORTB(8), PORTC(25), PORTC(26), PORTC(27)};
+#define MISO PORTA(25)
+#define MOSI PORTA(26)
+#define SCLK PORTA(27)
+#define XLAT PORTA(28)
+#define DBGLED PORTC(9)
+
+static const uint16_t led_gamma[256] =
+{
+ 0, 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 5, 6, 7, 8, 9, 11, 12, 14, 15, 17, 19,
+ 21, 23, 25, 27, 29, 32, 34, 37, 40, 43, 46, 49, 52, 55, 59, 62, 66, 70, 73,
+ 77, 82, 86, 90, 95, 99, 104, 109, 114, 119, 124, 129, 135, 140, 146, 152,
+ 158, 164, 170, 176, 182, 189, 196, 202, 209, 216, 224, 231, 238, 246, 254,
+ 261, 269, 277, 286, 294, 302, 311, 320, 328, 337, 347, 356, 365, 375, 384,
+ 394, 404, 414, 424, 435, 445, 456, 467, 477, 488, 500, 511, 522, 534, 545,
+ 557, 569, 581, 594, 606, 619, 631, 644, 657, 670, 683, 697, 710, 724, 738,
+ 752, 766, 780, 794, 809, 823, 838, 853, 868, 884, 899, 914, 930, 946, 962,
+ 978, 994, 1011, 1027, 1044, 1061, 1078, 1095, 1112, 1130, 1147, 1165, 1183,
+ 1201, 1219, 1237, 1256, 1274, 1293, 1312, 1331, 1350, 1370, 1389, 1409,
+ 1429, 1449, 1469, 1489, 1509, 1530, 1551, 1572, 1593, 1614, 1635, 1657,
+ 1678, 1700, 1722, 1744, 1766, 1789, 1811, 1834, 1857, 1880, 1903, 1926,
+ 1950, 1974, 1997, 2021, 2045, 2070, 2094, 2119, 2143, 2168, 2193, 2219,
+ 2244, 2270, 2295, 2321, 2347, 2373, 2400, 2426, 2453, 2479, 2506, 2534,
+ 2561, 2588, 2616, 2644, 2671, 2700, 2728, 2756, 2785, 2813, 2842, 2871,
+ 2900, 2930, 2959, 2989, 3019, 3049, 3079, 3109, 3140, 3170, 3201, 3232,
+ 3263, 3295, 3326, 3358, 3390, 3421, 3454, 3486, 3518, 3551, 3584, 3617,
+ 3650, 3683, 3716, 3750, 3784, 3818, 3852, 3886, 3920, 3955, 3990, 4025,
+ 4060, 4095
+};
+
+
+#define NUM_ROWS 4
+#define XFERS_PER_LED 3
+#define XFERS_PER_ROW ((NUM_LEDS) * (XFERS_PER_LED) / (NUM_ROWS))
+
+
+
+const uint8_t digit_table[6] = {57, 41, 25, 50, 34, 18};
+const uint8_t icon_table[8] = {49, 33, 17, 1, 48, 32, 16, 0};
+const uint8_t seg_table[128] =
+ {
+ /* 0x00 - 0x0F */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0x10 - 0x1F */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0x20 - 0x2F */ 0x00, 0x6B, 0x22, 0x56, 0x64, 0x2D, 0x64, 0x02, 0x31, 0x07, 0x40, 0x40, 0x08, 0x40, 0x08, 0x52,
+ /* 0x30 - 0x3F */ 0x3F, 0x06, 0x5B, 0x4F, 0x66, 0x6D, 0x7D, 0x07, 0x7F, 0x6F, 0x08, 0x08, 0x58, 0x48, 0x4C, 0x0B,
+ /* 0x40 - 0x4F */ 0x63, 0x77, 0x7C, 0x58, 0x5E, 0x79, 0x71, 0x6F, 0x74, 0x10, 0x0E, 0x70, 0x38, 0x55, 0x54, 0x5C,
+ /* 0x50 - 0x5F */ 0x73, 0x67, 0x50, 0x6D, 0x78, 0x3E, 0x1C, 0x1D, 0x76, 0x6E, 0x5B, 0x59, 0x0F, 0x64, 0x23, 0x08,
+ /* 0x60 - 0x6F */ 0x20, 0x77, 0x7C, 0x58, 0x5E, 0x79, 0x71, 0x6F, 0x74, 0x10, 0x0E, 0x70, 0x38, 0x55, 0x54, 0x5C,
+ /* 0x70 - 0x7F */ 0x73, 0x67, 0x50, 0x6D, 0x78, 0x3E, 0x1C, 0x1D, 0x76, 0x6E, 0x5B, 0x46, 0x30, 0x70, 0x40, 0x00
+ };
+
+
+static uint8_t row = 0;
+static uint16_t led_buffer[192]={0,};
+
+
+
+void SPI0_IrqHandler(void){
+
+ //disable the interrupt
+ gpioSetVal(XLAT, 1);
+ SPI0->SPI_IDR = SPI_IER_TXEMPTY;
+ gpioSetVal(XLAT, 0);
+ gpioSetVal(blanks[row], 0);
+}
+
+void ledsInit(void){
+
+ uint8_t i;
+
+ //init SPI
+ SPI_Configure(SPI0, ID_SPI0, SPI_MR_MSTR | SPI_MR_MODFDIS | SPI_MR_PCS(0));
+ SPI_ConfigureNPCS(SPI0, 0 , SPI_CSR_NCPHA | SPI_CSR_BITS_12_BIT | SPI_CSR_SCBR(3) | SPI_CSR_DLYBS(2) | SPI_CSR_DLYBCT(0)); //30MHz spi speed
+ SPI_Enable(SPI0);
+ SPI0->SPI_IDR = 0xFFFFFFFF;
+ NVIC_EnableIRQ(SPI0_IRQn);
+
+ //init pins: SPI
+ gpioSetFun(MISO, GPIO_FUNC_A);
+ gpioSetFun(MOSI, GPIO_FUNC_A);
+ gpioSetFun(SCLK, GPIO_FUNC_A);
+
+ //init pins: debug LED
+ gpioSetFun(DBGLED, GPIO_FUNC_GPIO);
+ gpioSetDir(DBGLED, 0);
+ gpioSetVal(DBGLED, 0);
+
+ //init pins: latch
+ gpioSetFun(XLAT, GPIO_FUNC_GPIO);
+ gpioSetDir(XLAT, 0);
+ gpioSetVal(XLAT, 0);
+
+ //init pins: blanking
+ for(i = 0; i < sizeof(blanks); i++){
+ gpioSetFun(blanks[i], GPIO_FUNC_GPIO);
+ gpioSetDir(blanks[i], 0);
+ gpioSetVal(blanks[i], 1);
+ }
+
+ periodicAdd(ledUpdate, 0, 4);
+}
+
+void ledWrite(uint8_t led_id, uint8_t r, uint8_t g, uint8_t b){
+
+ if(led_id >= NUM_LEDS) return;
+
+ led_id += led_id << 1;
+
+ led_buffer[led_id++] = led_gamma[b];
+ led_buffer[led_id++] = led_gamma[g];
+ led_buffer[led_id++] = led_gamma[r];
+}
+
+void ledDrawIcon(uint8_t offset, uint8_t r, uint8_t g, uint8_t b){
+
+ ledWrite(icon_table[offset], r, g, b);
+}
+
+void ledDrawLetter(char letter, uint8_t val, uint8_t r, uint8_t g, uint8_t b){
+
+ uint8_t i;
+ uint8_t seg = seg_table[val];
+ uint8_t offset = digit_table[letter];
+
+ for (i = 0; i < 7; i++, seg <<= 1) ledWrite(i + offset, (seg & 64) ? r : 0, (seg & 64) ? g : 0, (seg & 64) ? b : 0);
+}
+
+void ledUpdate(void){
+
+ volatile uint16_t* row_data;
+ unsigned i;
+
+ gpioSetVal(blanks[row], 1);
+
+ if(++row == NUM_ROWS) row = 0;
+ row_data = led_buffer + XFERS_PER_ROW * row;
+
+ DMAC->DMAC_CH_NUM[DMA_CHANNEL_LEDS].DMAC_SADDR = (uint32_t)row_data;
+ DMAC->DMAC_CH_NUM[DMA_CHANNEL_LEDS].DMAC_DADDR = (uint32_t)&SPI0->SPI_TDR;
+ DMAC->DMAC_CH_NUM[DMA_CHANNEL_LEDS].DMAC_DSCR = 0;
+ DMAC->DMAC_CH_NUM[DMA_CHANNEL_LEDS].DMAC_CTRLA = DMAC_CTRLA_BTSIZE(XFERS_PER_ROW) | DMAC_CTRLA_SCSIZE_CHK_16 | DMAC_CTRLA_DCSIZE_CHK_1 | DMAC_CTRLA_SRC_WIDTH_HALF_WORD | DMAC_CTRLA_DST_WIDTH_HALF_WORD;
+ DMAC->DMAC_CH_NUM[DMA_CHANNEL_LEDS].DMAC_CTRLB = DMAC_CTRLB_FC_MEM2PER_DMA_FC | DMAC_CTRLB_SRC_INCR_INCREMENTING | DMAC_CTRLB_DST_INCR_FIXED;
+ DMAC->DMAC_CH_NUM[DMA_CHANNEL_LEDS].DMAC_CFG = DMAC_CFG_DST_PER(1) | DMAC_CFG_SRC_PER(1) | DMAC_CFG_DST_H2SEL_HW | DMAC_CFG_SOD | DMAC_CFG_FIFOCFG_ALAP_CFG;
+ DMAC->DMAC_CHER = (1 << DMA_CHANNEL_LEDS);
+
+ //wait for transfer to start
+ while(SPI0->SPI_SR & SPI_SR_TXEMPTY);
+ SPI0->SPI_IER = SPI_IER_TXEMPTY;
+}
+
+void ledDbgState(char on){
+
+ gpioSetVal(DBGLED, on);
+}
+
+
diff --git a/MakefileBasedBuild/app/LEDs.h b/MakefileBasedBuild/app/LEDs.h
new file mode 100644
index 0000000..0e45f06
--- /dev/null
+++ b/MakefileBasedBuild/app/LEDs.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifdef ADK_INTERNAL
+#ifndef _LEDS_H_
+#define _LEDS_H_
+
+#include <stdint.h>
+
+
+
+
+#define NUM_LEDS 64
+
+#define NUM_DIGITS 6
+#define NUM_ICONS 8
+
+extern const uint8_t seg_table[]; //7-segment difits: 0-9a-z_-.()
+extern const uint8_t digit_table[NUM_DIGITS]; //"offset" values to each of the 6 digits
+extern const uint8_t icon_table[NUM_ICONS]; //"offset" values to each of the 8 icons
+
+void ledsInit(void);
+
+//front LED display
+
+ //draw to the backbuffer
+ void ledWrite(uint8_t led_id, uint8_t r, uint8_t g, uint8_t b);
+ void ledDrawIcon(uint8_t icon, uint8_t r, uint8_t g, uint8_t b);
+ void ledDrawLetter(char letter, uint8_t val, uint8_t r, uint8_t g, uint8_t b);
+
+ //flush the backbuffer to the display
+ void ledUpdate(void);
+
+//onboard debug LED
+
+ void ledDbgState(char on);
+
+#endif
+#endif
+
diff --git a/MakefileBasedBuild/app/Makefile b/MakefileBasedBuild/app/Makefile
new file mode 100644
index 0000000..bd2bbbe
--- /dev/null
+++ b/MakefileBasedBuild/app/Makefile
@@ -0,0 +1,198 @@
+# ----------------------------------------------------------------------------
+# ATMEL Microcontroller Software Support
+# ----------------------------------------------------------------------------
+# Copyright (c) 2010, Atmel Corporation
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+
+# modification, are permitted provided that the following conditions are met:
+#
+# - Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the disclaimer below.
+#
+# Atmel's name may not be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+# DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# ----------------------------------------------------------------------------
+
+# Makefile for compiling the ADC12 Example project
+
+#-------------------------------------------------------------------------------
+# User-modifiable options
+#-------------------------------------------------------------------------------
+
+# Chip & board used for compilation
+# (can be overriden by adding CHIP=chip and BOARD=board to the command-line)
+CHIP = sam3x8
+BOARD = sam3x_ek
+
+# Defines which are the available memory targets for the SAM3S-EK board.
+MEMORIES = flash #sram
+
+# Trace level used for compilation
+# (can be overriden by adding TRACE_LEVEL=#number to the command-line)
+# TRACE_LEVEL_DEBUG 5
+# TRACE_LEVEL_INFO 4
+# TRACE_LEVEL_WARNING 3
+# TRACE_LEVEL_ERROR 2
+# TRACE_LEVEL_FATAL 1
+# TRACE_LEVEL_NO_TRACE 0
+TRACE_LEVEL = 4
+
+# Optimization level, put in comment for debugging
+OPTIMIZATION = -O2
+
+# Output file basename
+OUTPUT = test_$(BOARD)_$(CHIP)
+
+# Output directories
+BIN = bin
+OBJ = obj
+
+#-------------------------------------------------------------------------------
+# Tools
+#-------------------------------------------------------------------------------
+
+# Tool suffix when cross-compiling
+CROSS_COMPILE = arm-none-eabi-
+
+# Libraries
+LIBRARIES = ../Atmel/sam3x/sam3x-ek/libraries
+# Chip library directory
+CHIP_LIB = $(LIBRARIES)/libchip_sam3x
+# Board library directory
+BOARD_LIB = $(LIBRARIES)/libboard_sam3x-ek
+# USB library directory
+USB_LIB = $(LIBRARIES)/usb
+
+LIBS = -Wl,--start-group -lgcc -lc -lchip_$(CHIP)_gcc_rel -lboard_$(BOARD)_gcc_rel -Wl,--end-group
+
+LIB_PATH = -L$(CHIP_LIB)/lib
+LIB_PATH += -L$(BOARD_LIB)/lib
+LIB_PATH+=-L=/lib/thumb2
+LIB_PATH+=-L=/../lib/gcc/arm-none-eabi/4.4.1/thumb2
+
+# Compilation tools
+CC = $(CROSS_COMPILE)gcc
+LD = $(CROSS_COMPILE)ld
+SIZE = $(CROSS_COMPILE)size
+STRIP = $(CROSS_COMPILE)strip
+OBJCOPY = $(CROSS_COMPILE)objcopy
+OBJDUMP = $(CROSS_COMPILE)objdump
+GDB = $(CROSS_COMPILE)gdb
+NM = $(CROSS_COMPILE)nm
+
+# Flags
+INCLUDES = -I$(CHIP_LIB)
+INCLUDES += -I$(BOARD_LIB)
+INCLUDES += -I$(LIBRARIES)
+INCLUDES += -I.
+
+CFLAGS += -fno-strict-aliasing
+CFLAGS += -Wall -Wchar-subscripts -Wcomment -Wformat=2 -Wimplicit-int
+CFLAGS += -Werror-implicit-function-declaration -Wmain -Wparentheses
+CFLAGS += -Wsequence-point -Wreturn-type -Wswitch -Wtrigraphs
+CFLAGS += -Wuninitialized -Wunknown-pragmas -Wfloat-equal -Wundef
+CFLAGS += -Wshadow -Wpointer-arith -Wbad-function-cast -Wwrite-strings
+CFLAGS += -Wsign-compare -Waggregate-return -Wstrict-prototypes
+CFLAGS += -Wmissing-prototypes -Wmissing-declarations
+CFLAGS += -Wformat -Wmissing-format-attribute -Wno-deprecated-declarations
+CFLAGS += -Wredundant-decls -Wnested-externs -Winline -Wlong-long
+CFLAGS += -Wno-unused
+#CFLAGS += -Wunreachable-code
+CFLAGS += -Wcast-align
+#CFLAGS += -Wmissing-noreturn
+#CFLAGS += -Wconversion
+
+# To reduce application size use only integer printf function.
+CFLAGS += -Dprintf=iprintf
+
+# -mlong-calls -Wall
+CFLAGS += --param max-inline-insns-single=500 -mcpu=cortex-m3 -mthumb -ffunction-sections
+CFLAGS += -g $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -DTRACE_LEVEL=$(TRACE_LEVEL)
+ASFLAGS = -mcpu=cortex-m3 -mthumb -Wall -g $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -D__ASSEMBLY__
+LDFLAGS= -mcpu=cortex-m3 -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=ResetException -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols
+#LD_OPTIONAL=-Wl,--print-gc-sections -Wl,--stats
+
+#-------------------------------------------------------------------------------
+# Files
+#-------------------------------------------------------------------------------
+
+# Directories where source files can be found
+
+VPATH += ./
+
+# Objects built from C source files
+C_OBJECTS += main.o BT.o I2C.o baro.o fwk.o als.o mag.o accel.o hygro.o LEDs.o printf.o dbg.o Audio.o coop.o
+C_OBJECTS += SD.o simpleOgg.o RTC.o btSDP.o btRFCOMM.o sgBuf.o btL2CAP.o eliza.o capsense.o btA2DP.o ADK.o
+C_OBJECTS += usb_drv.o f_ff.o f_sdDisk.o v_bitwise.o v_codebook.o v_dsp.o v_floor0.o accessory.o usbh.o
+C_OBJECTS += v_floor1.o v_floor_lookup.o v_framing.o v_info.o v_mapping0.o v_mdct.o v_misc.o v_res012.o
+C_OBJECTS += v_vorbisfile.o
+
+# Append OBJ and BIN directories to output filename
+OUTPUT := $(BIN)/$(OUTPUT)
+LIBS += $(A_OBJECTS)
+DEPS :=
+
+#-------------------------------------------------------------------------------
+# Rules
+#-------------------------------------------------------------------------------
+
+all: libchip_$(CHIP)_gcc_rel.a libboard_$(BOARD)_gcc_rel.a $(BIN) $(OBJ) $(MEMORIES)
+
+libchip_$(CHIP)_gcc_rel.a:
+ $(MAKE) -C $(CHIP_LIB)/build/gcc $(CHIP)
+
+libboard_$(BOARD)_gcc_rel.a:
+ $(MAKE) -C $(BOARD_LIB)/build/gcc $(BOARD)
+
+$(BIN) $(OBJ): $(A_OBJECTS)
+ mkdir $@ || true
+
+%.d:
+
+define RULES
+C_OBJECTS_$(1) = $(addprefix $(OBJ)/$(1)_, $(C_OBJECTS))
+ASM_OBJECTS_$(1) = $(addprefix $(OBJ)/$(1)_, $(ASM_OBJECTS))
+DEPS += $(addprefix $(OBJ)/$(1)_, $(C_OBJECTS:.o=.d))
+
+$(1): $$(ASM_OBJECTS_$(1)) $$(C_OBJECTS_$(1))
+ @echo mkdir -p $$(dir $$@)
+ @$(CC) $(LIB_PATH) $(LDFLAGS) $(LD_OPTIONAL) -T"$(BOARD_LIB)/resources/gcc/$(CHIP)/$$@.ld" -Wl,-Map,$(OUTPUT)-$$@.map -o $(OUTPUT)-$$@.elf $$^ $(LIBS)
+ $(NM) $(OUTPUT)-$$@.elf >$(OUTPUT)-$$@.elf.txt
+ $(OBJCOPY) -O binary $(OUTPUT)-$$@.elf $(OUTPUT)-$$@.bin
+ $(OBJDUMP) -d $(OUTPUT)-$$@.elf > $(OUTPUT)-$$@.lst
+ $(SIZE) $$^ $(OUTPUT)-$$@.elf
+
+$$(C_OBJECTS_$(1)): $(OBJ)/$(1)_%.o: %.c
+ @mkdir -p $$(dir $$@)
+ @$(CC) $(CFLAGS) -D$(1) -c -MD -MT $$@ -MF $$(@:%o=%d) -o $$@ $$<
+
+$$(ASM_OBJECTS_$(1)): $(OBJ)/$(1)_%.o: %.S
+ @mkdir -p $$(dir $$@)
+ @$(CC) $(ASFLAGS) -D$(1) -c -MD -MT $$@ -MF $$(@:%o=%d) -o $$@ $$<
+
+debug_$(1): $(1)
+ $(GDB) -x "$(BOARD_LIB)/resources/gcc/$(BOARD)_$(1).gdb" -ex "reset" -readnow -se $(OUTPUT)-$(1).elf
+endef
+
+$(foreach MEMORY, $(MEMORIES), $(eval $(call RULES,$(MEMORY))))
+
+clean:
+ rm -fR $(OBJ) $(BIN)
+
+ifeq ($(filter $(MAKECMDGOALS), clean), )
+-include $(DEPS)
+endif
diff --git a/MakefileBasedBuild/app/RTC.c b/MakefileBasedBuild/app/RTC.c
new file mode 100644
index 0000000..28a31e7
--- /dev/null
+++ b/MakefileBasedBuild/app/RTC.c
@@ -0,0 +1,99 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#define ADK_INTERNAL
+#include "fwk.h"
+#include "coop.h"
+#include "RTC.h"
+
+
+
+static volatile uint16_t gYear = 2012;
+static volatile uint8_t gMonth = 2, gDay = 27, gHour = 19, gMinute = 8, gSecond = 8;
+
+
+void rtcInit(void){
+
+ SUPC->SUPC_CR = SUPC_CR_KEY(0xA5) | SUPC_CR_XTALSEL_CRYSTAL_SEL; //enable oscillator
+ RTC->RTC_IDR = 0x1f;
+ RTC->RTC_IER = RTC_IER_SECEN; //enable interrupt
+ NVIC_EnableIRQ(RTC_IRQn);
+}
+
+void RTC_IrqHandler(void){
+
+ static const uint8_t days_per_month[2][12] = {
+ {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
+ {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
+ };
+
+ RTC->RTC_SCCR = RTC_SCCR_SECCLR;
+ if(++gSecond < 60) return;
+ gSecond = 0;
+ if(++gMinute < 60) return;
+ gMinute = 0;
+ if(++gHour < 24) return;
+ gHour = 0;
+ if(++gDay < days_per_month[!(gYear & 3)][gMonth]) return;
+ gDay = 0;
+ if(gMonth++ < 12) return;
+ gMonth = 0;
+ gYear++;
+}
+
+void rtcGet(uint16_t* yearP, uint8_t* monthP, uint8_t* dayP, uint8_t* hourP, uint8_t* minuteP, uint8_t* secondP){
+
+ uint16_t mYear;
+ uint8_t mMonth, mDay, mHour, mMinute, mSecond;
+
+ //read
+ do{
+
+ mSecond = gSecond;
+ mMinute = gMinute;
+ mHour = gHour;
+ mDay = gDay;
+ mMonth = gMonth;
+ mYear = gYear;
+
+ }while(mSecond != gSecond);
+
+ if(yearP) *yearP = mYear;
+ if(monthP) *monthP = mMonth + 1;
+ if(dayP) *dayP = mDay + 1;
+ if(hourP) *hourP = mHour;
+ if(minuteP) *minuteP = mMinute;
+ if(secondP) *secondP = mSecond;
+}
+
+void rtcSet(uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second){
+
+ //disable hardware update
+ RTC->RTC_IDR = RTC_IDR_SECDIS;
+
+ //write
+ gYear = year;
+ gMonth = month - 1;
+ gDay = day - 1;
+ gHour = hour;
+ gMinute = minute;
+ gSecond = second;
+
+ //re-enable hardware RTC counting
+ RTC->RTC_IER = RTC_IER_SECEN;
+}
+
+
+
diff --git a/MakefileBasedBuild/app/RTC.h b/MakefileBasedBuild/app/RTC.h
new file mode 100644
index 0000000..6635fac
--- /dev/null
+++ b/MakefileBasedBuild/app/RTC.h
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifdef ADK_INTERNAL
+#ifndef _RTC_H_
+#define _RTH_H_
+
+void rtcInit(void);
+void rtcGet(uint16_t* yearP, uint8_t* monthP, uint8_t* dayP, uint8_t* hourP, uint8_t* minuteP, uint8_t* secondP);
+void rtcSet(uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second);
+
+
+#endif
+#endif
+
diff --git a/MakefileBasedBuild/app/SD.c b/MakefileBasedBuild/app/SD.c
new file mode 100644
index 0000000..c432b0e
--- /dev/null
+++ b/MakefileBasedBuild/app/SD.c
@@ -0,0 +1,598 @@
+/*
+Copyright (c) 2011, Dmitry Grinberg (as published on http://dmitrygr.com)
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following condition is met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+
+#define ADK_INTERNAL
+#include "fwk.h"
+#include "SD.h"
+#include "dbg.h"
+
+
+
+
+
+static const uint8_t pinCD = PORTA(5);
+static const uint8_t pinsSD[] = {PORTA(7), PORTA(19), PORTA(20), PORTA(21)};
+#define CS 0
+#define SCLK 1
+#define MOSI 2
+#define MISO 3
+
+
+
+#define FLAG_TIMEOUT 0x80
+#define FLAG_PARAM_ERR 0x40
+#define FLAG_ADDR_ERR 0x20
+#define FLAG_ERZ_SEQ_ERR 0x10
+#define FLAG_CMD_CRC_ERR 0x08
+#define FLAG_ILLEGAL_CMD 0x04
+#define FLAG_ERZ_RST 0x02
+#define FLAG_IN_IDLE_MODE 0x01
+
+
+
+char gSdSpiFast = 1;
+
+static void sdClockSpeed(char fast){
+
+ gSdSpiFast = fast;
+}
+
+static uint8_t sdSpiByte(uint32_t v){
+
+ uint32_t r = 0;
+
+ #define BIT(m, d) \
+ do{ \
+ gpioSetVal(pinsSD[MOSI], !!(v & (m))); \
+ gpioSetVal(pinsSD[SCLK], 1); \
+ d; \
+ if(gpioGetVal(pinsSD[MISO])) \
+ r |= (m); \
+ gpioSetVal(pinsSD[SCLK], 0); \
+ }while(0)
+
+ #define ASMBIT \
+ "lsls %1, #1 \n\t" \
+ "ite cs \n\t" \
+ "strcs r4, [r2, #0x30] \n\t" \
+ "strcc r4, [r2, #0x34] \n\t" \
+ "str r1, [r2, #0x30] \n\t" \
+ "ldr r3, [r2, #0x3C] \n\t" \
+ "str r1, [r2, #0x34] \n\t" \
+ "lsrs r3, #22 \n\t" \
+ "adcs %0, %0 \n\t"
+
+ if(gSdSpiFast){
+
+
+ asm(
+ "mov r4, #0x100000 \n\t" //mosi
+ "mov r1, #0x080000 \n\t" //sclk
+ "ldr r2, =0x400E0E00 \n\t" //PIOA
+ "lsl %1, #24 \n\t" //cleverness
+ ASMBIT
+ ASMBIT
+ ASMBIT
+ ASMBIT
+ ASMBIT
+ ASMBIT
+ ASMBIT
+ ASMBIT
+ :"=l"(r)
+ :"l"(v)
+ :"cc", "r4", "r1", "r2", "r3"
+ );
+
+ }
+ else{
+
+ volatile uint32_t x;
+ uint8_t t;
+
+ for(t = 0; t < 8; t++){
+
+ BIT(1 << (7 - t), for(x = 0; x < 0x10; x += 2) x--);
+ for(x = 0; x < 0x10; x += 2) x--;
+ }
+ }
+
+ return r;
+}
+
+uint8_t* __attribute__((naked)) sdStreamSec(uint8_t* buf){
+
+#define RDBIT \
+ "str r1, [r2, #0x30] \n\t" \
+ "ldr r3, [r2, #0x3C] \n\t" \
+ "str r1, [r2, #0x34] \n\t" \
+ "lsrs r3, #22 \n\t" \
+ "adcs r4, r4 \n\t"
+
+ asm(
+ " push {r4,r5,lr} \n\t"
+ " ldr r2, =0x400E0E00 \n\t"
+ " mov r1, #0x100000 \n\t" //mosi
+ " str r1, [r2, #0x30] \n\t"
+ " mov r1, #0x080000 \n\t"
+ " mov r5, #128 \n\t"
+ "loop: \n\t"
+ RDBIT
+ RDBIT
+ RDBIT
+ RDBIT
+ RDBIT
+ RDBIT
+ RDBIT
+ RDBIT
+ RDBIT
+ RDBIT
+ RDBIT
+ RDBIT
+ RDBIT
+ RDBIT
+ RDBIT
+ RDBIT
+ RDBIT
+ RDBIT
+ RDBIT
+ RDBIT
+ RDBIT
+ RDBIT
+ RDBIT
+ RDBIT
+ RDBIT
+ RDBIT
+ RDBIT
+ RDBIT
+ RDBIT
+ RDBIT
+ RDBIT
+ RDBIT
+ " rev r4, r4 \n\t"
+ " str r4, [r0], #4 \n\t"
+ " subs r5, #1 \n\t"
+ " bne loop \n\t"
+ " pop {r4,r5,pc} \n\t"
+ );
+}
+
+static void sdChipSelect(char on){
+
+ gpioSetVal(pinsSD[CS], !on);
+}
+
+static uint8_t sdCrc7(uint8_t* chr,uint8_t cnt,uint8_t crc){
+
+ uint8_t i, a;
+ uint8_t Data;
+
+ for(a = 0; a < cnt; a++){
+
+ Data = chr[a];
+
+ for(i = 0; i < 8; i++){
+
+ crc <<= 1;
+
+ if( (Data & 0x80) ^ (crc & 0x80) ) crc ^= 0x09;
+
+ Data <<= 1;
+ }
+ }
+
+ return crc & 0x7F;
+}
+
+static inline void sdPrvSendCmd(uint8_t cmd, uint32_t param, char crc){
+
+ uint8_t send[6];
+ uint8_t L = crc ? 6 : 5;
+
+ send[0] = cmd | 0x40;
+ send[1] = param >> 24;
+ send[2] = param >> 16;
+ send[3] = param >> 8;
+ send[4] = param;
+ send[5] = crc ? (sdCrc7(send, 5, 0) << 1) | 1 : 0;
+
+ for(cmd = 0; cmd < L; cmd++) sdSpiByte(send[cmd]);
+}
+
+static uint8_t sdPrvSimpleCommand(uint8_t cmd, uint32_t param, char crc, char cmdDone){ //do a command, return R1 reply
+
+ uint8_t ret;
+ uint8_t i = 0;
+
+ sdChipSelect(1);
+ sdPrvSendCmd(cmd, param, crc);
+
+ do{ //our max wait time is 128 byte clocks (1024 clock ticks)
+
+ ret = sdSpiByte(0xFF);
+
+ }while(i++ < 128 && (ret == 0xFF));
+ if(cmdDone){
+ sdChipSelect(0);
+ sdSpiByte(0xFF);
+ }
+
+ return ret;
+}
+
+static uint8_t sdPrvReadData(uint8_t* data, uint32_t sz, char cmdDone){
+
+ uint8_t ret;
+ uint16_t tries = 20000;
+
+ do{
+ ret = sdSpiByte(0xFF);
+ if((ret & 0xF0) == 0x00) return ret; //fail
+ if(ret == 0xFE) break;
+ tries--;
+ }while(tries);
+
+ if(!tries) return 0xFF;
+
+ *data = ret;
+
+ ret = 0;
+
+ while(sz--) *data++ = sdSpiByte(0xFF);
+
+ if(cmdDone){
+ sdChipSelect(0);
+ sdSpiByte(0xFF);
+ }
+
+ return ret;
+}
+
+static uint8_t sdPrvACMD(uint8_t cmd, uint32_t param, char crc){
+
+ uint8_t ret;
+
+ ret = sdPrvSimpleCommand(55, 0, crc, 1);
+ if(ret & FLAG_TIMEOUT) return ret;
+ if(ret & FLAG_ILLEGAL_CMD) return ret;
+
+ return sdPrvSimpleCommand(cmd, param, crc, 1);
+}
+
+static char sdPrvCardInit(char sd, char hc){
+
+ uint32_t time = 0;
+ uint32_t resp;
+ uint32_t param;
+
+ param = hc ? (1UL<< 30) : 0;
+
+ while(time++ < 10000UL){ //retry 10..0 times
+
+ resp = sd ? sdPrvACMD(41, param, 1) : sdPrvSimpleCommand(1, param, 1, 1);
+ if(resp & FLAG_TIMEOUT) break;
+ if(!(resp & FLAG_IN_IDLE_MODE)) return 1;
+ }
+
+ return 0;
+}
+
+static uint32_t sdPrvGetBits(uint8_t* data,uint32_t numBytesInArray,uint32_t startBit,uint32_t len){//for CID and CSD data..
+
+ uint32_t bitWrite = 0;
+ uint32_t numBitsInArray = numBytesInArray * 8;
+ uint32_t ret = 0;
+
+ do{
+
+ uint32_t bit,byte;
+
+ bit = numBitsInArray - startBit - 1;
+ byte = bit / 8;
+ bit = 7 - (bit % 8);
+
+ ret |= ((data[byte] >> bit) & 1) << (bitWrite++);
+
+ startBit++;
+ }while(--len);
+
+ return ret;
+}
+
+static uint32_t sdPrvGetCardNumBlocks(char mmc,uint8_t* csd){
+
+ uint32_t ver = sdPrvGetBits(csd,16,126,2);
+ uint32_t cardSz = 0;
+
+
+ if(ver == 0 || (mmc && ver <= 2)){
+
+ uint32_t cSize = sdPrvGetBits(csd,16,62,12);
+ uint32_t cSizeMult = sdPrvGetBits(csd,16,47,3);
+ uint32_t readBlLen = sdPrvGetBits(csd,16,80,4);
+ uint32_t blockLen,blockNr;
+ uint32_t divTimes = 9; //from bytes to blocks division
+
+ blockLen = 1UL << readBlLen;
+ blockNr = (cSize + 1) * (1UL << (cSizeMult + 2));
+
+ /*
+ multiplying those two produces result in bytes, we need it in blocks
+ so we shift right 9 times. doing it after multiplication might fuck up
+ the 4GB card, so we do it before, but to avoid killing significant bits
+ we only cut the zero-valued bits, if at the end we end up with non-zero
+ "divTimes", divide after multiplication, and thus underuse the card a bit.
+ This will never happen in reality since 512 is 2^9, and we are
+ multiplying two numbers whose product is a multiple of 2^9, so they
+ togethr should have at least 9 lower zero bits.
+ */
+
+ while(divTimes && !(blockLen & 1)){
+
+ blockLen = blockLen >> 1;
+ divTimes--;
+ }
+ while(divTimes && !(blockNr & 1)){
+
+ blockNr = blockNr >> 1;
+ divTimes--;
+ }
+
+ cardSz = (blockNr * blockLen) >> divTimes;
+ }
+ else if(ver == 1){
+
+ cardSz = sdPrvGetBits(csd,16,48,22)/*num 512K blocks*/ << 10;
+ }
+
+
+ return cardSz;
+}
+
+char sdInit(SD* sd){
+
+ uint8_t v, t;
+ uint16_t retries = 1050;
+ uint8_t respBuf[16];
+
+ dbgPrintf("SD: initing\n");
+
+ gpioSetFun(pinCD, GPIO_FUNC_GPIO);
+ gpioSetDir(pinCD, 1);
+
+ for(v = 0; v < sizeof(pinsSD); v++){
+
+ gpioSetFun(pinsSD[v], GPIO_FUNC_GPIO);
+ gpioSetDir(pinsSD[v], 0);
+ gpioSetVal(pinsSD[v], 0);
+ }
+ gpioSetDir(pinsSD[MISO], 1);
+ gpioSetVal(pinsSD[CS], 1);
+
+ sd->inited = 0;
+ sd->SD = 0;
+ sd->HC = 0;
+
+ sdClockSpeed(0);
+ sdChipSelect(0);
+ for(v = 0; v < 10; v++) sdSpiByte(0xFF); //80 clocks with CS not asserted to give card time to init
+
+ while(0x01 != sdPrvSimpleCommand(0, 0, 1, 1)) if(!--retries) return 0; //always a good idea
+
+ v = sdPrvSimpleCommand(8, 0x000001AAUL, 1, 0); //try CMD8 to init SDHC cards
+ if(v & FLAG_TIMEOUT) return 0;
+ sdSpiByte(0xFF); //ignore the reply
+ sdSpiByte(0xFF);
+ sdSpiByte(0xFF);
+ sdSpiByte(0xFF);
+ sdChipSelect(0);
+ sdSpiByte(0xFF);
+
+ v = sdPrvSimpleCommand(55, 0, 1, 1); //see if this is SD or MMC
+ if(v & FLAG_TIMEOUT) return 0;
+ sd->SD = !(v & FLAG_ILLEGAL_CMD);
+
+ dbgPrintf("SD: card is likely %s\n", sd->SD ? "SD" : "MMC");
+
+ if(sd->SD){
+
+ if(!sdPrvCardInit(1, 1) && !sdPrvCardInit(1, 0)){
+
+ return 0;
+ }
+
+ v = sdPrvSimpleCommand(58,0, 1, 0); //see if it is HC
+ t = sdSpiByte(0xFF); //get the reply
+ sdSpiByte(0xFF);
+ sdSpiByte(0xFF);
+ sdSpiByte(0xFF);
+ sdChipSelect(0);
+ sdSpiByte(0xFF);
+ if(v) t = 0;
+ if(t & 0x40) sd->HC = 1;
+ }
+ else{
+
+ if(!sdPrvCardInit(0, 1) && !sdPrvCardInit(0, 0)){
+
+ return 0;
+ }
+ }
+
+ v = sdPrvSimpleCommand(59, 0, 1, 1); //crc off
+ if(v & FLAG_TIMEOUT) return 0;
+
+ v = sdPrvSimpleCommand(9, 0, 0, 0); //read CSD
+ if(v & FLAG_TIMEOUT) return 0;
+
+ v = sdPrvReadData(respBuf, 16, 1);
+ if(v) return 0;
+
+ sd->numSec = sdPrvGetCardNumBlocks(!sd->SD, respBuf);
+ sd->inited = 1;
+
+ sdClockSpeed(1);
+
+ return 1;
+}
+
+uint32_t sdGetNumSec(SD* sd){
+
+ return sd->inited ? sd->numSec : 0;
+}
+
+char sdSecRead(SD* sd, uint32_t sec, void* buf){ //CMD17
+
+ uint8_t v, retry = 0;
+ char ret = 0;
+
+ if(!sd->inited) return 0;
+
+ do{
+
+ v = sdPrvSimpleCommand(17, sd->HC ? sec : sec << 9, 0, 0);
+ if(v & FLAG_TIMEOUT) return 0;
+
+ v = sdPrvReadData(buf, 0, 0);
+ sdStreamSec(buf);
+ sdSpiByte(0xFF); //skip crc
+ sdSpiByte(0xFF);
+ sdChipSelect(0);
+ if(!v){
+ ret = 1;
+ break;
+ }
+
+
+ }while(++retry < 5); //retry up to 5 times
+
+ return ret;
+}
+
+
+char sdSecWrite(SD* sd, uint32_t sec, const void* buf){ //CMD24
+
+ uint32_t v16;
+ uint8_t v, retry = 0;
+ uint8_t* buf_ = buf;
+ char ret = 0;
+
+
+ if(!sd->inited) return 0;
+
+ do{
+
+ v = sdPrvSimpleCommand(24, sd->HC ? sec : sec << 9, 0, 0);
+ if(v & FLAG_TIMEOUT) return 0;
+
+ sdSpiByte(0xFF); //as per SD-spi spec, we give it 8 clocks to consider the ramifications of the command we just sent
+
+ sdSpiByte(0xFE); //start of data block
+ for(v16 = 0; v16 < SD_BLOCK_SIZE; v16++) sdSpiByte(*buf_++); //data
+
+
+ while((v = sdSpiByte(0xFF)) == 0xFF); //wait while card isnt answering
+ while(sdSpiByte(0xFF) != 0xFF); //wait while card is busy
+
+ if((v & 0x1F) == 5){
+ ret = 1;
+ break;
+ }
+
+ }while(++retry < 5); //retry up to 5 times
+
+ return ret;
+}
+
+
+
+
+
+//stream mode
+char sdReadStart(SD* sd, uint32_t sec){
+
+ uint8_t v;
+
+ v = sdPrvSimpleCommand(18, sd->HC ? sec : sec << 9, 0, 0);
+ if(v & FLAG_TIMEOUT) return 0;
+
+ do{
+ v = sdSpiByte(0xFF);
+ }while(v == 0xFF);
+ if(v != 0xFE){
+ sdChipSelect(0);
+ return 0;
+ }
+ return 1;
+}
+
+void sdNextSec(SD* sd){
+
+ uint8_t v;
+
+ sdSpiByte(0xFF); //skip crc
+ sdSpiByte(0xFF);
+
+ do{
+ v = sdSpiByte(0xFF);
+ }while(v == 0xFF);
+}
+
+void sdSecReadStop(SD* sd){
+
+ sdChipSelect(0);
+ sdSpiByte(0xFF); //skip crc
+ sdSpiByte(0xFF);
+
+ //cancel read
+ sdPrvSimpleCommand(12, 0, 0, 1);
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/MakefileBasedBuild/app/SD.h b/MakefileBasedBuild/app/SD.h
new file mode 100644
index 0000000..341ce39
--- /dev/null
+++ b/MakefileBasedBuild/app/SD.h
@@ -0,0 +1,29 @@
+#ifdef ADK_INTERNAL
+#ifndef _SD_H_
+#define _SD_H_
+
+
+#define SD_BLOCK_SIZE 512
+
+typedef struct{
+
+ uint32_t numSec;
+ uint8_t HC : 1;
+ uint8_t inited : 1;
+ uint8_t SD : 1;
+
+}SD;
+
+char sdInit(SD* sd);
+uint32_t sdGetNumSec(SD* sd);
+char sdSecRead(SD* sd, uint32_t sec, void* buf);
+char sdSecWrite(SD* sd, uint32_t sec, const void* buf);
+
+//stream mode
+char sdReadStart(SD* sd, uint32_t sec);
+void sdNextSec(SD* sd);
+void sdSecReadStop(SD* sd);
+uint8_t* sdStreamSec(uint8_t* buf); //returns ptr to end of buffer...
+
+#endif
+#endif
diff --git a/MakefileBasedBuild/app/accel.c b/MakefileBasedBuild/app/accel.c
new file mode 100644
index 0000000..e4fc23d
--- /dev/null
+++ b/MakefileBasedBuild/app/accel.c
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#define ADK_INTERNAL
+#include "fwk.h"
+#include "accel.h"
+#include "I2C.h"
+
+
+
+char accelInit(void){ //0 on failure
+
+ if(i2cScan(1, 0x19) == I2C_ERR_NAK) return 0; //not found
+
+ i2cSingleWrite(1, 0x19, 0x24, 0x80);
+ i2cSingleWrite(1, 0x19, 0x24, 0x00);
+
+ i2cSingleWrite(1, 0x19, 0x20, 0x97); // 1.344khz sample rate, no low power, all axes enabled
+ i2cSingleWrite(1, 0x19, 0x23, 0x80);
+ i2cSingleWrite(1, 0x19, 0x24, 0x00);
+
+ return 1;
+}
+
+
+void accelRead(int16_t* x, int16_t* y, int16_t* z){
+
+ while(!(i2cSingleRead(1, 0x19, 0x27) & 8));
+
+ if(x) *x = (int16_t)((uint16_t)i2cSingleRead(1, 0x19, 0x28) | ((uint16_t)i2cSingleRead(1, 0x19, 0x29) << 8));
+ if(y) *y = (int16_t)((uint16_t)i2cSingleRead(1, 0x19, 0x2A) | ((uint16_t)i2cSingleRead(1, 0x19, 0x2B) << 8));
+ if(z) *z = (int16_t)((uint16_t)i2cSingleRead(1, 0x19, 0x2C) | ((uint16_t)i2cSingleRead(1, 0x19, 0x2D) << 8));
+}
diff --git a/MakefileBasedBuild/app/accel.h b/MakefileBasedBuild/app/accel.h
new file mode 100644
index 0000000..c3ad879
--- /dev/null
+++ b/MakefileBasedBuild/app/accel.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifdef ADK_INTERNAL
+#ifndef _ACCEL_H_
+#define _ACCEL_H_
+
+
+
+char accelInit(void);
+void accelRead(int16_t* x, int16_t* y, int16_t* z);
+
+
+#endif
+#endif
+
diff --git a/MakefileBasedBuild/app/accessory.c b/MakefileBasedBuild/app/accessory.c
new file mode 100644
index 0000000..4af113d
--- /dev/null
+++ b/MakefileBasedBuild/app/accessory.c
@@ -0,0 +1,397 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "string.h"
+#include "conf_usb.h"
+#include "usb_drv.h"
+#include "usb_ids.h"
+
+#define ADK_INTERNAL
+#include "Audio.h"
+#include "usbh.h"
+#include "dbg.h"
+#include "fwk.h"
+#include "coop.h"
+
+#define ACCESSORY_TIMEOUT 1000
+
+static int inpipe = -1;
+static int outpipe = -1;
+static int audiopipe = -1;
+static int audiopacketsize = -1;
+
+/* audio state */
+#define AUDBUFSIZE 682
+#define AUDBUFCOUNT 3
+static uint16_t *audbuf = 0x20100000; // flash memory controller's unused 4K buffer
+static size_t audbufpos;
+static int curraudbuf = 0;
+#define MAX_SAMPLE_SKEW 50
+static int audsamplerate;
+static int audsampleratebase;
+static uint8_t audrecvbuf[256]; // receive buffer for the iso endpoint
+
+static void audio_iso_callback(void *arg, int result, void *buf, size_t pos);
+size_t process_audio(uint16_t *outbuf, uint16_t *inbuf, size_t len);
+
+static int total_samp = 0;
+
+#define READ8(ptr, pos) (*(((uint8_t *)ptr) + pos))
+#define READ16(ptr, pos) (*(uint16_t *)(((uint8_t *)ptr) + pos))
+
+int accessory_init(usbh_device_t *dev)
+{
+ TRACE_OTG("vid 0x%x, pid 0x%x, devaddr %d\n", dev->vid, dev->pid, dev->address);
+
+ // main accessory endpoints
+ uint8_t inendp = 0;
+ size_t inpacketsize = 0;
+ uint8_t outendp = 0;
+ size_t outpacketsize = 0;
+
+ // audio interfaces
+ bool audio = false;
+ uint8_t audioendp = 0;
+ uint8_t audiointerface = 0;
+ uint8_t audio_alternate_setting = 0;
+
+ // find the correct endpoint
+ int pos = 0;
+ int total_len = READ16(dev->devconfig, OFFSET_FIELD_TOTAL_LENGTH);
+ bool found_acc_interface = false;
+ bool found_audio_interface = false;
+ while (pos < total_len) {
+ uint8_t length = READ8(dev->devconfig, pos);
+ uint8_t type = READ8(dev->devconfig, pos + 1);
+
+ TRACE_OTG("DESCRIPTOR: type %d, length %d\n", type, length);
+
+ switch (type) {
+ case DESCRIPTOR_INTERFACE: {
+ uint8_t num_ep = READ8(dev->devconfig, pos + OFFSET_FIELD_NB_OF_EP);
+ uint8_t class = READ8(dev->devconfig, pos + OFFSET_FIELD_CLASS);
+ uint8_t sub_class = READ8(dev->devconfig, pos + OFFSET_FIELD_SUB_CLASS);
+ uint8_t protocol = READ8(dev->devconfig, pos + OFFSET_FIELD_PROTOCOL);
+
+ TRACE_OTG("\tINTERFACE: ep %d class 0x%x sub 0x%x prot 0x%x\n", num_ep, class, sub_class, protocol);
+
+ // make sure we've cleared our corresponding endpoint search
+ found_acc_interface = false;
+ found_audio_interface = false;
+
+ // look for the accessory interface
+ if (num_ep == 2 &&
+ class == 0xff &&
+ sub_class == 0xff &&
+ (inendp <= 0 || outendp <= 0)) {
+
+ // this is probably our accessory interface
+ found_acc_interface = true;
+ } else if (class == 0x1 && // audio
+ sub_class == 0x2 && // streaming
+ num_ep > 0) { // alternate setting with actual endpoints
+
+ audiointerface = READ8(dev->devconfig, pos + OFFSET_FIELD_INTERFACE_NB);
+ audio_alternate_setting = READ8(dev->devconfig, pos + OFFSET_FIELD_ALT);
+
+ found_audio_interface = true;
+ }
+ break;
+ }
+ case DESCRIPTOR_ENDPOINT: {
+ uint8_t ep_type = READ8(dev->devconfig, pos + OFFSET_FIELD_EP_TYPE);
+ uint8_t endp = READ8(dev->devconfig, pos + OFFSET_FIELD_EP_ADDR);
+ size_t packetsize = READ16(dev->devconfig, pos + OFFSET_FIELD_EP_SIZE);
+
+ TRACE_OTG("\tENDPOINT: type 0x%x addr 0x%x\n", ep_type, endp);
+
+ if (found_acc_interface) {
+ if (ep_type != 2) // bulk
+ break;
+ if (endp & 0x80) {
+ // in
+ if (inendp <= 0) {
+ inendp = endp;
+ inpacketsize = packetsize;
+ }
+ } else {
+ // out
+ if (outendp <= 0) {
+ outendp = endp;
+ outpacketsize = packetsize;
+ }
+ }
+ }
+ if (found_audio_interface) {
+ if (ep_type != ((3 << 2) | (1 << 0))) // synchronous iso
+ break;
+
+ audiopacketsize = packetsize;
+ audioendp = endp;
+ }
+ break;
+ }
+ }
+
+ pos += length;
+ }
+
+ TRACE_OTG("inendp 0x%x (%d), outendp 0x%x (%d)\n", inendp, inpacketsize, outendp, outpacketsize);
+ outpipe = usbh_setup_endpoint(dev->address, outendp, ENDP_TYPE_BULK, outpacketsize);
+ TRACE_OTG("outpipe %d\n", outpipe);
+ inpipe = usbh_setup_endpoint(dev->address, inendp, ENDP_TYPE_BULK, inpacketsize);
+ TRACE_OTG("inpipe %d\n", inpipe);
+
+ if (audioendp > 0) {
+ TRACE_OTG("audio: interface %d alt setting %d endp 0x%x packet size %d\n",
+ audiointerface, audio_alternate_setting, audioendp, audiopacketsize);
+
+ audiopipe = usbh_setup_endpoint(dev->address, audioendp, ENDP_TYPE_ISO, audiopacketsize);
+ TRACE_OTG("audiopipe %d\n", audiopipe);
+
+ // enable audio
+ // set configuration 1
+ struct usb_setup_packet setup = (struct usb_setup_packet){
+ USB_SETUP_DIR_HOST_TO_DEVICE | USB_SETUP_RECIPIENT_INTERFACE,
+ SETUP_SET_INTERFACE,
+ audio_alternate_setting,
+ audiointerface,
+ 0
+ };
+
+ int len = usbh_send_setup(&setup, NULL, false);
+ TRACE_OTG("send_setup returns %d\n", len);
+
+ audsamplerate = 44100;
+ audsampleratebase = 44100;
+ audioOn(AUDIO_USB, audsamplerate);
+
+ // enable SMC so we can use its 4K memory buffer
+ PMC_EnablePeripheral(ID_SMC);
+
+ usbh_queue_iso_transfer(audiopipe, audrecvbuf, sizeof(audrecvbuf), &audio_iso_callback, NULL);
+ }
+
+ return 0;
+}
+
+void accessory_deinit(void)
+{
+ inpipe = -1;
+ outpipe = -1;
+ audiopipe = -1;
+}
+
+void accessory_work(void)
+{
+#if 0
+ static int last_samp = -1;
+
+ if (total_samp - last_samp >= 44100) {
+ last_samp = total_samp;
+ TRACE_OTG("samp %d\n", total_samp);
+ }
+#endif
+}
+
+/* bulk in/out */
+int accessory_send(const void *buf, size_t len)
+{
+ int res;
+
+ if (outpipe < 0)
+ return -1;
+ if (!usbh_accessory_connected())
+ return -1;
+
+// TRACE_OTG("buf %p, len %d... ", buf, len);
+
+ res = usbh_check_transfer(outpipe);
+ if (res != PIPE_RESULT_NOT_QUEUED) {
+// TRACE_OTG_NONL("pipe with bad result before transfer %d\n", res);
+ return -1;
+ }
+ usbh_queue_transfer(outpipe, buf, len);
+
+ res = -1;
+ int now = fwkGetUptime();
+ for (;;) {
+ coopYield();
+
+ res = usbh_check_transfer(outpipe);
+ if (res >= 0)
+ break;
+
+ if (res < 0 && res != PIPE_RESULT_NOT_READY) {
+// TRACE_OTG_NONL("error %d in transfer\n", res);
+ break;
+ }
+ if (fwkGetUptime() - now >= ACCESSORY_TIMEOUT) {
+// TRACE_OTG_NONL("timeout\n");
+ // XXX cancel transfer
+ break;
+ }
+ }
+
+// TRACE_OTG_NONL("res %d\n", res);
+ return res;
+}
+
+int accessory_receive(void *buf, size_t len)
+{
+ int res;
+
+ if (inpipe < 0)
+ return -1;
+
+ if (!usbh_accessory_connected())
+ return -1;
+
+// TRACE_OTG("buf %p, len %d... ", buf, len);
+
+ res = usbh_check_transfer(inpipe);
+ if (res != PIPE_RESULT_NOT_QUEUED) {
+// TRACE_OTG_NONL("pipe with bad result before transfer %d\n", res);
+ return -1;
+ }
+ usbh_queue_transfer(inpipe, buf, len);
+
+ res = -1;
+ int now = fwkGetUptime();
+ for (;;) {
+ coopYield();
+
+ res = usbh_check_transfer(inpipe);
+ if (res >= 0)
+ break;
+
+ if (res < 0 && res != PIPE_RESULT_NOT_READY) {
+// TRACE_OTG_NONL("error %d in transfer\n", res);
+ break;
+ }
+ if (fwkGetUptime() - now >= ACCESSORY_TIMEOUT) {
+// TRACE_OTG_NONL("timeout\n");
+ // XXX cancel transfer
+ break;
+ }
+ }
+
+// TRACE_OTG_NONL("res %d\n", res);
+ return res;
+}
+
+/* audio */
+static void skew_sample_rate(int skew)
+{
+ audsamplerate += skew;
+ if (audsamplerate - audsampleratebase > MAX_SAMPLE_SKEW)
+ audsamplerate = audsampleratebase + MAX_SAMPLE_SKEW;
+ if (audsampleratebase - audsamplerate > MAX_SAMPLE_SKEW)
+ audsamplerate = audsampleratebase - MAX_SAMPLE_SKEW;
+
+ audioSetSample(AUDIO_USB, audsamplerate);
+}
+
+static void audio_iso_callback(void *arg, int result, void *buf, size_t pos)
+{
+ if (pos == 0)
+ return;
+
+// TRACE_OTG("arg %p result %d buf %p pos %u\n", arg, result, buf, pos);
+
+ // set the next audio buffer
+ usbh_set_iso_buffer(audiopipe, audrecvbuf, sizeof(audrecvbuf));
+
+ // see if we can fit the processed one into the last buffer
+ if (AUDBUFSIZE - audbufpos < pos / 4) {
+ // we can't, kick this buffer and move onto the next
+ int res = audioTryAddBuffer(AUDIO_USB, audbuf + curraudbuf * AUDBUFSIZE, audbufpos);
+ if (!res) {
+ //dbgPrintf("%d\n", a);
+ //dbgPrintf("USB audio: Failed to queue audio buffer\n");
+ //dbgPrintf("over\n");
+ return;
+ }
+
+ static int lastres[2];
+ if (res > (AUDBUFSIZE / 2)) {
+ // we're overrunning the dac, increase its sample rate
+ static int a = 0;
+ if (lastres[1] < lastres[0] && lastres[0] < res) {
+ a++;
+ if (a > 5) {
+ int adj = (res / (AUDBUFSIZE / 20));
+ skew_sample_rate(adj);
+ //dbgPrintf("o%d +%d %d\n", res, adj, audsamplerate);
+ a = 0;
+ }
+ }
+ } else {
+ // we're underunning the dac, decrease its sample rate
+ static int a = 0;
+
+ if (res == 1 || lastres[1] > lastres[0] && lastres[0] > res) {
+ a++;
+ if (a > 5) {
+ int adj = ((AUDBUFSIZE - res) / (AUDBUFSIZE / 20));
+ skew_sample_rate(-adj);
+ //dbgPrintf("u%d -%d %d\n", res, adj, audsamplerate);
+ a = 0;
+ }
+ }
+ }
+ lastres[1] = lastres[0];
+ lastres[0] = res;
+
+ curraudbuf++;
+ if (curraudbuf >= AUDBUFCOUNT)
+ curraudbuf = 0;
+ audbufpos = 0;
+ }
+
+ // process the one we just got
+ size_t processed_samples = process_audio(audbuf + curraudbuf * AUDBUFSIZE + audbufpos, buf, pos);
+ audbufpos += processed_samples;
+
+ total_samp += processed_samples;
+}
+
+/* take 16 bit stereo signed samples and downconvert in place to mono 12 bit unsigned */
+size_t process_audio(uint16_t *outbuf, uint16_t *inbuf, size_t len)
+{
+ len /= 2; // number of words
+
+ // loop through the samples, combining left and right and decimating to 12 bits
+ size_t i;
+ for (i = 0; i < len/2; i++) {
+ int32_t temp = (int16_t)inbuf[i*2];
+ int32_t temp2 = (int16_t)inbuf[i*2 + 1];
+
+ temp = temp + temp2;
+
+ int32_t vol = getVolume();
+ temp *= vol;
+
+ temp = temp >> (5 + 8);
+ temp += 2048;
+ temp &= 0xfff; // XXX dither the sample
+ outbuf[i] = temp;
+ }
+
+ return i;
+}
+
+
diff --git a/MakefileBasedBuild/app/als.c b/MakefileBasedBuild/app/als.c
new file mode 100644
index 0000000..0fa6555
--- /dev/null
+++ b/MakefileBasedBuild/app/als.c
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#define ADK_INTERNAL
+#include "fwk.h"
+#include "als.h"
+#include "I2C.h"
+
+
+
+char alsInit(void){ //1->success, 0->fail
+
+ if(i2cScan(1, 0x44) == I2C_ERR_NAK) return 0; //not found
+
+ i2cSingleWrite(1, 0x44, 0x00, 0x00); // Probably unnecessary
+ i2cSingleWrite(1, 0x44, 0x01, (0x4) << 4); // Turn on all the features, but no interrupts
+ i2cSingleWrite(1, 0x44, 0x02, 0x40); // Turn on IR comp, max gain settings
+
+ i2cSingleWrite(1, 0x44, 0x03, (0x0B) << 4); // Set it to 110mA LED current.
+
+ return 1;
+}
+
+void alsRead(uint16_t* prox, uint16_t* clear, uint16_t* R, uint16_t* G, uint16_t* B, uint16_t* IR, uint16_t* temp){
+
+ if(prox) *prox = ((uint16_t)i2cSingleRead(1, 0x44, 0x10) << 8) | (uint16_t)i2cSingleRead(1, 0x44, 0x11);
+ if(clear) *clear = ((uint16_t)i2cSingleRead(1, 0x44, 0x4) << 8) | (uint16_t)i2cSingleRead(1, 0x44, 0x5);
+ if(R) *R = ((uint16_t)i2cSingleRead(1, 0x44, 0x6) << 8) | (uint16_t)i2cSingleRead(1, 0x44, 0x7);
+ if(G) *G = ((uint16_t)i2cSingleRead(1, 0x44, 0x8) << 8) | (uint16_t)i2cSingleRead(1, 0x44, 0x9);
+ if(B) *B = ((uint16_t)i2cSingleRead(1, 0x44, 0xA) << 8) | (uint16_t)i2cSingleRead(1, 0x44, 0xB);
+ if(IR) *IR = ((uint16_t)i2cSingleRead(1, 0x44, 0xC) << 8) | (uint16_t)i2cSingleRead(1, 0x44, 0xD);
+ if(temp) *temp = ((uint16_t)i2cSingleRead(1, 0x44, 0x12) << 8) | (uint16_t)i2cSingleRead(1, 0x44, 0x13);
+}
diff --git a/MakefileBasedBuild/app/als.h b/MakefileBasedBuild/app/als.h
new file mode 100644
index 0000000..f7daeb3
--- /dev/null
+++ b/MakefileBasedBuild/app/als.h
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifdef ADK_INTERNAL
+#ifndef _ALS_H_
+#define _ALS_H_
+
+
+char alsInit(void); //1->success, 0->fail
+void alsRead(uint16_t* prox, uint16_t* clear, uint16_t* R, uint16_t* G, uint16_t* B, uint16_t* IR, uint16_t* temp);
+
+
+#endif
+#endif
+
diff --git a/MakefileBasedBuild/app/baro.c b/MakefileBasedBuild/app/baro.c
new file mode 100644
index 0000000..b61cbb6
--- /dev/null
+++ b/MakefileBasedBuild/app/baro.c
@@ -0,0 +1,113 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#define ADK_INTERNAL
+#include "fwk.h"
+#include "baro.h"
+#include "I2C.h"
+
+static struct {
+ int16_t AC1;
+ int16_t AC2;
+ int16_t AC3;
+ uint16_t AC4;
+ uint16_t AC5;
+ uint16_t AC6;
+ int16_t B1;
+ int16_t B2;
+ int16_t MB;
+ int16_t MC;
+ int16_t MD;
+} baro;
+
+
+
+#define BARO_REG_CTRL 0xF4
+#define BARO_REG_OUT_MSB 0xF6
+#define BARO_REG_OUT_LSB 0xF7
+#define BARO_REG_OUT_XLSB 0xF8
+#define BARO_SCO 0x20
+
+
+
+char baroInit(void){ //0 on failure
+
+ if(i2cSingleRead(1, 0x77, 0xD0) != 0x55) return 0; //not found
+
+ baro.AC1 = (i2cSingleRead(1, 0x77, 0xAA) << 8) | i2cSingleRead(1, 0x77, 0xAB);
+ baro.AC2 = (i2cSingleRead(1, 0x77, 0xAC) << 8) | i2cSingleRead(1, 0x77, 0xAD);
+ baro.AC3 = (i2cSingleRead(1, 0x77, 0xAE) << 8) | i2cSingleRead(1, 0x77, 0xAF);
+ baro.AC4 = (i2cSingleRead(1, 0x77, 0xB0) << 8) | i2cSingleRead(1, 0x77, 0xA1);
+ baro.AC5 = (i2cSingleRead(1, 0x77, 0xB2) << 8) | i2cSingleRead(1, 0x77, 0xA3);
+ baro.AC6 = (i2cSingleRead(1, 0x77, 0xB4) << 8) | i2cSingleRead(1, 0x77, 0xA5);
+ baro.B1 = (i2cSingleRead(1, 0x77, 0xB6) << 8) | i2cSingleRead(1, 0x77, 0xA7);
+ baro.B2 = (i2cSingleRead(1, 0x77, 0xB8) << 8) | i2cSingleRead(1, 0x77, 0xA9);
+ baro.MB = (i2cSingleRead(1, 0x77, 0xBA) << 8) | i2cSingleRead(1, 0x77, 0xBB);
+ baro.MC = (i2cSingleRead(1, 0x77, 0xBC) << 8) | i2cSingleRead(1, 0x77, 0xBD);
+ baro.MD = (i2cSingleRead(1, 0x77, 0xBE) << 8) | i2cSingleRead(1, 0x77, 0xBF);
+
+ return 1;
+}
+
+void baroRead(uint8_t oss, long* kPa, long* decicelsius){
+
+ long ut, up, x1, x2, x3, b3, b4, b5, b6, p, t;
+ unsigned long b7;
+
+ // Read uncompensated temp
+ oss = oss & 0x03; // Mask off to protect bits
+ i2cSingleWrite(1, 0x77, BARO_REG_CTRL, 0x2E);
+ while(i2cSingleRead(1, 0x77, BARO_REG_CTRL) & BARO_SCO) {}
+ ut = (i2cSingleRead(1, 0x77, BARO_REG_OUT_MSB) << 8) | i2cSingleRead(1, 0x77, BARO_REG_OUT_LSB);
+
+ // Read uncompensated pressure
+ i2cSingleWrite(1, 0x77, BARO_REG_CTRL, 0x34 | (oss << 6));
+ while(i2cSingleRead(1, 0x77, BARO_REG_CTRL) & BARO_SCO) {}
+ up = ((i2cSingleRead(1, 0x77, BARO_REG_OUT_MSB) << 16) | (i2cSingleRead(1, 0x77, BARO_REG_OUT_LSB) << 8)
+ | i2cSingleRead(1, 0x77, BARO_REG_OUT_XLSB)) >> (8 - oss);
+
+ // Calculate true temperature (in 0.1 degrees C)
+ x1 = ((ut - baro.AC6) * baro.AC5) >> 15;
+ x2 = (baro.MC << 11) / (x1 + baro.MD);
+ b5 = x1 + x2;
+ t = (b5 + 8) >> 4;
+ if(decicelsius) *decicelsius = t;
+
+ // Calculate true pressure
+ b6 = b5 - 4000;
+ x1 = (baro.B2 * ((b6 * b6) >> 12)) >> 11;
+ x2 = (baro.AC2 * b6) >> 11;
+ x3 = x1 + x2;
+ b3 = (((baro.AC1 * 4 + x3) << oss) + 2) / 4;
+
+
+ x1 = (baro.AC3 * b6) >> 13;
+ x2 = (baro.B1 * ((b6 * b6) >> 12)) >> 16;
+ x3 = ((x1 + x2) + 2) >> 2;
+ b4 = (baro.AC4 * (unsigned long)(x3 + 32768)) >> 15;
+ b7 = ((unsigned long)up - b3) * (50000 >> oss);
+ if (b7 < 0x80000000) {
+ p = (b7 * 2) / b4;
+ } else {
+ p = (b7 / b4) * 2;
+ }
+ x1 = ((p >> 3) * (p >> 3)) >> 10; // Split because they seem to be using floating point in the datasheet example
+ x1 = (x1 * 3038) >> 16;
+ x2 = (-7357 * p) >> 16;
+ p = p + ((x1 + x2 + 3791) >> 4);
+
+ if(kPa) *kPa = p;
+}
+
diff --git a/MakefileBasedBuild/app/baro.h b/MakefileBasedBuild/app/baro.h
new file mode 100644
index 0000000..bbfb5e0
--- /dev/null
+++ b/MakefileBasedBuild/app/baro.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifdef ADK_INTERNAL
+#ifndef _BARO_H_
+#define _BARO_H_
+
+
+//oversample coefficients (higher for more accuracy, lower for more speed)
+#define BARO_OSS_1X 0x00
+#define BARO_OSS_2X 0x01
+#define BARO_OSS_4X 0x02
+#define BARO_OSS_8X 0x03
+
+char baroInit(void); //0 on failure
+void baroRead(uint8_t oss, long* kPa, long* decicelsius);
+
+
+#endif
+#endif
+
diff --git a/MakefileBasedBuild/app/btA2DP.c b/MakefileBasedBuild/app/btA2DP.c
new file mode 100644
index 0000000..3fd9b79
--- /dev/null
+++ b/MakefileBasedBuild/app/btA2DP.c
@@ -0,0 +1,1502 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#define ADK_INTERNAL
+#include "fwk.h"
+#include "btRFCOMM.h"
+#include "btA2DP.h"
+#include "btSDP.h"
+#include "btL2CAP.h"
+#include "dbg.h"
+#include "Audio.h"
+#include <string.h>
+#include "coop.h"
+
+
+#define UGLY_SCARY_DEBUGGING_CODE 0
+
+//endpoint media types
+ #define AVDTP_MEDIA_TYP_AUDIO 0
+ #define AVDTP_MEDIA_TYP_VIDEO 1
+ #define AVDTP_MEDIA_TYP_MULTIMEDIA 2
+
+//andpoint directions
+ #define AVDTP_DIR_SOURCE 0
+ #define AVDTP_DIR_SINK 1
+
+
+//A2DP packet header (2bytes)
+ //byte 0
+ #define AVDTP_HDR_MASK_TRANS 0xF0
+ #define AVDTP_HDR_SHIFT_TRANS 4
+ #define AVDTP_HDR_MASK_PKT_TYP 0x0C
+ #define AVDTP_HDR_SHIFT_PKT_TYP 2
+ #define AVDTP_HDR_MASK_MSG_TYP 0x03
+ #define AVDTP_HDR_SHIFT_MSG_TYP 0
+ //byte 1
+ #define AVDTP_HDR_MASK_SIG_ID 0x3F
+ #define AVDTP_HDR_SHIFT_SIG_ID 0
+
+//sigId
+ #define AVDTP_SIG_DISCOVER 0x01
+ #define AVDTP_SIG_GET_CAPABILITIES 0x02
+ #define AVDTP_SIG_SET_CONFIGURATION 0x03
+ #define AVDTP_SIG_GET_CONFIGURATION 0x04
+ #define AVDTP_SIG_RECONFIGURE 0x05
+ #define AVDTP_SIG_OPEN 0x06
+ #define AVDTP_SIG_START 0x07
+ #define AVDTP_SIG_CLOSE 0x08
+ #define AVDTP_SIG_SUSPEND 0x09
+ #define AVDTP_SIG_ABORT 0x0A
+ #define AVDTP_SIG_SECURITY_CONTROL 0x0B
+
+//pktTyp
+ #define AVDTP_PKT_TYP_SINGLE 0x00
+ #define AVDTP_PKT_TYP_START 0x01
+ #define AVDTP_PKT_TYP_CONTINUE 0x02
+ #define AVDTP_PKT_TYP_END 0x03
+
+//msgTyp
+ #define AVDTP_MSG_TYP_CMD 0x00
+ #define AVDTP_MSG_TYP_ACCEPT 0x02
+ #define AVDTP_MSG_TYP_REJ 0x03
+
+//seid info (2 bytes)
+ //byte0
+ #define AVDTP_SEID_NFO_MASK_SEID 0xFC
+ #define AVDTP_SEID_NFO_SHIFT_SEID 2
+ #define AVDTP_SEID_NFO_MASK_INUSE 0x02
+ #define AVDTP_SEID_NFO_SHIFT_INUSE 1
+ //byte1
+ #define AVDTP_SEID_NFO_MASK_MEDIA_TYP 0xF0
+ #define AVDTP_SEID_NFO_SHIFT_MEDIA_TYP 4
+ #define AVDTP_SEID_NFO_MASK_TYP 0x08
+ #define AVDTP_SEID_NFO_SHIFT_TYP 3
+
+
+//service capability categoris
+ #define AVDTP_SVC_CAT_MEDIA_TRANSPORT 1
+ #define AVDTP_SVC_CAT_REPORTING 2
+ #define AVDTP_SVC_CAT_RECOVERY 3
+ #define AVDTP_SVC_CAT_CONTENT_PROTECTION 4
+ #define AVDTP_SVC_CAT_HEADER_COMPRESSION 5
+ #define AVDTP_SVC_CAT_MULTIPLEXING 6
+ #define AVDTP_SVC_CAT_MEDIA_CODEC 7
+
+//codec types
+ #define A2DP_CODEC_TYP_SBC 0
+ //others exist...done don't implement them
+
+#define MY_ENDPT_ID 1 //we support just one, and this is it's ID
+
+#define A2DP_CHAN_MODE_MONO 0
+#define A2DP_CHAN_MODE_DUAL_CHANNEL 1
+#define A2DP_CHAN_MODE_STEREO 2
+#define A2DP_CHAN_MODE_JOINT_STEREO 3
+
+
+#define DATA_STATE_ENCODE(state) ((void*)(((uint32_t)(state)) ^ 0x80000000))
+#define IS_DATA_STATE(state) (!!(((uint32_t)(state)) & 0x80000000))
+
+typedef struct A2DPstate{
+
+ //L2CAP data
+ uint16_t aclConn;
+ uint16_t remChan; //remote channel num for control channel
+ uint16_t datChan; //remote channel num for data channel
+
+ //codec data
+ uint16_t samplingRate;
+
+ //our state
+ char needAudioConn;
+
+ //link
+ struct A2DPstate* next;
+
+}A2DPstate;
+
+static A2DPstate* conns = NULL;
+
+//copyright notice for SBC decoder
+/*
+Copyright (c) 2011, Dmitry Grinberg (as published on http://dmitrygr.com)
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following condition is met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+
+
+#define QUALITY_LOWEST 1 //you may notice the quality reduction
+#define QUALITY_MEDIUM 2 //pretty good
+#define QUALITY_GREAT 3 //as good as it will get without an FPU
+
+
+///config options begin
+
+/*
+ This is a rather clever little SBC decoder that I've put together
+
+*/
+
+#define QUALITY QUALITY_MEDIUM
+#define SPEED_OVER_ACCURACY //set to cheat a bit with shifts (saves a divide per sample)
+#define ITER uint32_t //iterator up to 180 use fastest type for your platform
+
+///config options end
+
+
+#if QUALITY == QUALITY_LOWEST
+
+ #define CONST(x) (x >> 24)
+ #define SAMPLE_CVT(x) (x >> 8)
+ #define INSAMPLE int8_t
+ #define OUTSAMPLE uint8_t //no point producing 16-bit samples using the 8-bit decoder
+ #define FIXED int8_t
+ #define FIXED_S int16_t
+ #define OUT_CLIP_MAX 0x7F
+ #define OUT_CLIP_MIN -0x80
+
+ #define NUM_FRAC_BITS_PROTO 8
+ #define NUM_FRAC_BITS_COS 6
+
+#elif QUALITY == QUALITY_MEDIUM
+
+ #define CONST(x) (x >> 16)
+ #define SAMPLE_CVT(x) (x)
+ #define INSAMPLE int16_t
+ #define OUTSAMPLE uint16_t
+ #define FIXED int16_t
+ #define FIXED_S int32_t
+ #define OUT_CLIP_MAX 0x7FFF
+ #define OUT_CLIP_MIN -0x8000
+
+ #define NUM_FRAC_BITS_PROTO 16
+ #define NUM_FRAC_BITS_COS 14
+
+#elif QUALITY == QUALITY_GREAT
+
+ #define CONST(x) (x)
+ #define SAMPLE_CVT(x) (x)
+ #define INSAMPLE int16_t
+ #define OUTSAMPLE uint16_t
+ #define FIXED int32_t
+ #define FIXED_S int64_t
+ #define OUT_CLIP_MAX 0x7FFF
+ #define OUT_CLIP_MIN -0x8000
+
+ #define NUM_FRAC_BITS_PROTO 32
+ #define NUM_FRAC_BITS_COS 30
+
+#else
+
+ #error "You did not define SBC decoder synthesizer quality to use"
+
+#endif
+
+
+
+static const FIXED proto_4_40[] =
+{
+ CONST(0x00000000), CONST(0x00FB7991), CONST(0x02CB3E8B), CONST(0x069FDC59),
+ CONST(0x22B63DA5), CONST(0x4B583FE6), CONST(0xDD49C25B), CONST(0x069FDC59),
+ CONST(0xFD34C175), CONST(0x00FB7991), CONST(0x002329CC), CONST(0x00FF11CA),
+ CONST(0x053B7546), CONST(0x0191E578), CONST(0x31EAB920), CONST(0x4825E4A3),
+ CONST(0xEC1F5E6D), CONST(0x083DDC80), CONST(0xFF3773A8), CONST(0x00B32807),
+ CONST(0x0061C5A7), CONST(0x007A4737), CONST(0x07646684), CONST(0xF89F23A7),
+ CONST(0x3F23948D), CONST(0x3F23948D), CONST(0xF89F23A7), CONST(0x07646684),
+ CONST(0x007A4737), CONST(0x0061C5A7), CONST(0x00B32807), CONST(0xFF3773A8),
+ CONST(0x083DDC80), CONST(0xEC1F5E6D), CONST(0x4825E4A3), CONST(0x31EAB920),
+ CONST(0x0191E578), CONST(0x053B7546), CONST(0x00FF11CA), CONST(0x002329CC)
+};
+
+static const FIXED proto_8_80[] =
+{
+ CONST(0x00000000), CONST(0x0083D8D4), CONST(0x0172E691), CONST(0x034FD9E0),
+ CONST(0x116860F5), CONST(0x259ED8EB), CONST(0xEE979F0B), CONST(0x034FD9E0),
+ CONST(0xFE8D196F), CONST(0x0083D8D4), CONST(0x000A42E6), CONST(0x0089DE90),
+ CONST(0x020E372C), CONST(0x02447D75), CONST(0x153E7D35), CONST(0x253844DE),
+ CONST(0xF2625120), CONST(0x03EBE849), CONST(0xFF1ACF26), CONST(0x0074E5CF),
+ CONST(0x00167EE3), CONST(0x0082B6EC), CONST(0x02AD6794), CONST(0x00BFA1FF),
+ CONST(0x18FAB36D), CONST(0x24086BF5), CONST(0xF5FF2BF8), CONST(0x04270CA8),
+ CONST(0xFF93E21B), CONST(0x0060C1E9), CONST(0x002458FC), CONST(0x0069F16C),
+ CONST(0x03436717), CONST(0xFEBDD6E5), CONST(0x1C7762DF), CONST(0x221D9DE0),
+ CONST(0xF950DCFC), CONST(0x0412523E), CONST(0xFFF44825), CONST(0x004AB4C5),
+ CONST(0x0035FF13), CONST(0x003B1FA4), CONST(0x03C04499), CONST(0xFC4086B8),
+ CONST(0x1F8E43F2), CONST(0x1F8E43F2), CONST(0xFC4086B8), CONST(0x03C04499),
+ CONST(0x003B1FA4), CONST(0x0035FF13), CONST(0x004AB4C5), CONST(0xFFF44825),
+ CONST(0x0412523E), CONST(0xF950DCFC), CONST(0x221D9DE0), CONST(0x1C7762DF),
+ CONST(0xFEBDD6E5), CONST(0x03436717), CONST(0x0069F16C), CONST(0x002458FC),
+ CONST(0x0060C1E9), CONST(0xFF93E21B), CONST(0x04270CA8), CONST(0xF5FF2BF8),
+ CONST(0x24086BF5), CONST(0x18FAB36D), CONST(0x00BFA1FF), CONST(0x02AD6794),
+ CONST(0x0082B6EC), CONST(0x00167EE3), CONST(0x0074E5CF), CONST(0xFF1ACF26),
+ CONST(0x03EBE849), CONST(0xF2625120), CONST(0x253844DE), CONST(0x153E7D35),
+ CONST(0x02447D75), CONST(0x020E372C), CONST(0x0089DE90), CONST(0x000A42E6)
+};
+
+static const FIXED costab_4[] =
+{
+ CONST(0x2D413CCD), CONST(0xD2BEC333), CONST(0xD2BEC333), CONST(0x2D413CCD),
+ CONST(0x187DE2A7), CONST(0xC4DF2862), CONST(0x3B20D79E), CONST(0xE7821D59),
+ CONST(0x00000000), CONST(0x00000000), CONST(0x00000000), CONST(0x00000000),
+ CONST(0xE7821D59), CONST(0x3B20D79E), CONST(0xC4DF2862), CONST(0x187DE2A7),
+ CONST(0xD2BEC333), CONST(0x2D413CCD), CONST(0x2D413CCD), CONST(0xD2BEC333),
+ CONST(0xC4DF2862), CONST(0xE7821D59), CONST(0x187DE2A7), CONST(0x3B20D79E),
+ CONST(0xC0000000), CONST(0xC0000000), CONST(0xC0000000), CONST(0xC0000000),
+ CONST(0xC4DF2862), CONST(0xE7821D59), CONST(0x187DE2A7), CONST(0x3B20D79E)
+};
+
+static const FIXED costab_8[] =
+{
+ CONST(0x2D413CCD), CONST(0xD2BEC333), CONST(0xD2BEC333), CONST(0x2D413CCD),
+ CONST(0x2D413CCD), CONST(0xD2BEC333), CONST(0xD2BEC333), CONST(0x2D413CCD),
+ CONST(0x238E7673), CONST(0xC13AD060), CONST(0x0C7C5C1E), CONST(0x3536CC52),
+ CONST(0xCAC933AE), CONST(0xF383A3E2), CONST(0x3EC52FA0), CONST(0xDC71898D),
+ CONST(0x187DE2A7), CONST(0xC4DF2862), CONST(0x3B20D79E), CONST(0xE7821D59),
+ CONST(0xE7821D59), CONST(0x3B20D79E), CONST(0xC4DF2862), CONST(0x187DE2A7),
+ CONST(0x0C7C5C1E), CONST(0xDC71898D), CONST(0x3536CC52), CONST(0xC13AD060),
+ CONST(0x3EC52FA0), CONST(0xCAC933AE), CONST(0x238E7673), CONST(0xF383A3E2),
+ CONST(0x00000000), CONST(0x00000000), CONST(0x00000000), CONST(0x00000000),
+ CONST(0x00000000), CONST(0x00000000), CONST(0x00000000), CONST(0x00000000),
+ CONST(0xF383A3E2), CONST(0x238E7673), CONST(0xCAC933AE), CONST(0x3EC52FA0),
+ CONST(0xC13AD060), CONST(0x3536CC52), CONST(0xDC71898D), CONST(0x0C7C5C1E),
+ CONST(0xE7821D59), CONST(0x3B20D79E), CONST(0xC4DF2862), CONST(0x187DE2A7),
+ CONST(0x187DE2A7), CONST(0xC4DF2862), CONST(0x3B20D79E), CONST(0xE7821D59),
+ CONST(0xDC71898D), CONST(0x3EC52FA0), CONST(0xF383A3E2), CONST(0xCAC933AE),
+ CONST(0x3536CC52), CONST(0x0C7C5C1E), CONST(0xC13AD060), CONST(0x238E7673),
+ CONST(0xD2BEC333), CONST(0x2D413CCD), CONST(0x2D413CCD), CONST(0xD2BEC333),
+ CONST(0xD2BEC333), CONST(0x2D413CCD), CONST(0x2D413CCD), CONST(0xD2BEC333),
+ CONST(0xCAC933AE), CONST(0x0C7C5C1E), CONST(0x3EC52FA0), CONST(0x238E7673),
+ CONST(0xDC71898D), CONST(0xC13AD060), CONST(0xF383A3E2), CONST(0x3536CC52),
+ CONST(0xC4DF2862), CONST(0xE7821D59), CONST(0x187DE2A7), CONST(0x3B20D79E),
+ CONST(0x3B20D79E), CONST(0x187DE2A7), CONST(0xE7821D59), CONST(0xC4DF2862),
+ CONST(0xC13AD060), CONST(0xCAC933AE), CONST(0xDC71898D), CONST(0xF383A3E2),
+ CONST(0x0C7C5C1E), CONST(0x238E7673), CONST(0x3536CC52), CONST(0x3EC52FA0),
+ CONST(0xC0000000), CONST(0xC0000000), CONST(0xC0000000), CONST(0xC0000000),
+ CONST(0xC0000000), CONST(0xC0000000), CONST(0xC0000000), CONST(0xC0000000),
+ CONST(0xC13AD060), CONST(0xCAC933AE), CONST(0xDC71898D), CONST(0xF383A3E2),
+ CONST(0x0C7C5C1E), CONST(0x238E7673), CONST(0x3536CC52), CONST(0x3EC52FA0),
+ CONST(0xC4DF2862), CONST(0xE7821D59), CONST(0x187DE2A7), CONST(0x3B20D79E),
+ CONST(0x3B20D79E), CONST(0x187DE2A7), CONST(0xE7821D59), CONST(0xC4DF2862),
+ CONST(0xCAC933AE), CONST(0x0C7C5C1E), CONST(0x3EC52FA0), CONST(0x238E7673),
+ CONST(0xDC71898D), CONST(0xC13AD060), CONST(0xF383A3E2), CONST(0x3536CC52)
+};
+
+static const int8_t loudness_4[4][4] =
+{
+ { -1, 0, 0, 0 }, { -2, 0, 0, 1 },
+ { -2, 0, 0, 1 }, { -2, 0, 0, 1 }
+};
+
+static const int8_t loudness_8[4][8] =
+{
+ { -2, 0, 0, 0, 0, 0, 0, 1 }, { -3, 0, 0, 0, 0, 0, 1, 2 },
+ { -4, 0, 0, 0, 0, 0, 1, 2 }, { -4, 0, 0, 0, 0, 0, 1, 2 }
+};
+
+
+#if QUALITY != QUALITY_MEDIUM //for medium we provide nice assembly routines
+
+ static void synth_4(OUTSAMPLE* dst, const INSAMPLE* src, FIXED* V){ //A2DP figure 12.3
+
+ ITER i, j;
+ const FIXED* tabl = proto_4_40;
+ const FIXED* costab = costab_4;
+
+ //shift
+ for(i = 79; i >= 8; i--) V[i] = V[i - 8];
+
+ //matrix
+ for(i = 0; i < 8; i++){
+
+ FIXED_S t = (FIXED_S)costab[0] * (FIXED_S)src[0] +
+ (FIXED_S)costab[1] * (FIXED_S)src[1] +
+ (FIXED_S)costab[2] * (FIXED_S)src[2] +
+ (FIXED_S)costab[3] * (FIXED_S)src[3];
+ costab += 4;
+ V[i] = t >> NUM_FRAC_BITS_COS;
+ }
+
+ //calculate audio samples
+ for(j = 0; j < 4; j++){
+
+ OUTSAMPLE s;
+ FIXED_S sample = (FIXED_S)V[j + 0] * (FIXED_S)tabl[0] +
+ (FIXED_S)V[j + 12] * (FIXED_S)tabl[1] +
+ (FIXED_S)V[j + 16] * (FIXED_S)tabl[2] +
+ (FIXED_S)V[j + 28] * (FIXED_S)tabl[3] +
+ (FIXED_S)V[j + 32] * (FIXED_S)tabl[4] +
+ (FIXED_S)V[j + 44] * (FIXED_S)tabl[5] +
+ (FIXED_S)V[j + 48] * (FIXED_S)tabl[6] +
+ (FIXED_S)V[j + 60] * (FIXED_S)tabl[7] +
+ (FIXED_S)V[j + 64] * (FIXED_S)tabl[8] +
+ (FIXED_S)V[j + 76] * (FIXED_S)tabl[9];
+ tabl += 10;
+
+ sample >>= (NUM_FRAC_BITS_PROTO - 1 - 2); //-2 is for the -4 we need to multiply by :)
+ sample = -sample;
+
+ if(sample > OUT_CLIP_MAX) sample = OUT_CLIP_MAX;
+ else if(sample < OUT_CLIP_MIN) sample = OUT_CLIP_MIN;
+ s = sample;
+
+ #ifndef DESKTOP
+ s += 0x8000;
+ s += 8;
+ s >>= 4;
+ #endif
+
+ dst[j] = s;
+ }
+ }
+
+ static void synth_8(OUTSAMPLE* dst, const INSAMPLE* src, FIXED* V){ //A2DP figure 12.3
+
+ ITER i, j;
+ const FIXED* tabl = proto_8_80;
+ const FIXED* costab = costab_8;
+
+ //shift
+ for(i = 159; i >= 16; i--) V[i] = V[i - 16];
+
+ //matrix
+ for(i = 0; i < 16; i++){
+
+ FIXED_S t = (FIXED_S)costab[0] * (FIXED_S)src[0] +
+ (FIXED_S)costab[1] * (FIXED_S)src[1] +
+ (FIXED_S)costab[2] * (FIXED_S)src[2] +
+ (FIXED_S)costab[3] * (FIXED_S)src[3] +
+ (FIXED_S)costab[4] * (FIXED_S)src[4] +
+ (FIXED_S)costab[5] * (FIXED_S)src[5] +
+ (FIXED_S)costab[6] * (FIXED_S)src[6] +
+ (FIXED_S)costab[7] * (FIXED_S)src[7];
+ costab += 8;
+ V[i] = t >> NUM_FRAC_BITS_COS;
+ }
+
+ //calculate audio samples
+ for(j = 0; j < 8; j++){
+
+ OUTSAMPLE s;
+ FIXED_S sample = (FIXED_S)V[j + 0] * (FIXED_S)tabl[0] +
+ (FIXED_S)V[j + 24] * (FIXED_S)tabl[1] +
+ (FIXED_S)V[j + 32] * (FIXED_S)tabl[2] +
+ (FIXED_S)V[j + 56] * (FIXED_S)tabl[3] +
+ (FIXED_S)V[j + 64] * (FIXED_S)tabl[4] +
+ (FIXED_S)V[j + 88] * (FIXED_S)tabl[5] +
+ (FIXED_S)V[j + 96] * (FIXED_S)tabl[6] +
+ (FIXED_S)V[j +120] * (FIXED_S)tabl[7] +
+ (FIXED_S)V[j +128] * (FIXED_S)tabl[8] +
+ (FIXED_S)V[j +152] * (FIXED_S)tabl[9];
+ tabl += 10;
+
+ sample >>= (NUM_FRAC_BITS_PROTO - 1 - 3); //-3 is for the -8 we need to multiply by :)
+ sample = -sample;
+
+ if(sample > OUT_CLIP_MAX) sample = OUT_CLIP_MAX;
+ else if(sample < OUT_CLIP_MIN) sample = OUT_CLIP_MIN;
+ s = sample;
+
+ #ifndef DESKTOP
+ s += 0x8000;
+ s += 8;
+ s >>= 4;
+ #endif
+
+ dst[j] = s;
+ }
+ }
+
+ static void synth(OUTSAMPLE* dst, const INSAMPLE* src, uint8_t nBands, FIXED* V){ //A2DP sigure 12.3
+
+ //efficient SBC synth by Dmitry Grinberg (as published May 26, 2012)
+ if(nBands == 4) synth_4(dst, src, V);
+ else synth_8(dst, src, V);
+ }
+
+#else
+
+ static void __attribute__((naked)) synth_4_med(OUTSAMPLE* dst, const INSAMPLE* src, FIXED* V, const FIXED* costabl, const FIXED* prot_Tabl){
+
+ asm(
+
+ //prologue {8 cycles}
+ "push {r4-r7} \n\t"
+
+ //shifting { 9x(9+9 + 1) + 1 = 171 cycles }
+ "add r2, #128 \n\t"
+ "ldmia r2!, {r4-r7} \n\t"
+ "stmia r2, {r4-r7} \n\t"
+ "subs r2, #32 \n\t"
+ "ldmia r2!, {r4-r7} \n\t"
+ "stmia r2, {r4-r7} \n\t"
+ "subs r2, #32 \n\t"
+ "ldmia r2!, {r4-r7} \n\t"
+ "stmia r2, {r4-r7} \n\t"
+ "subs r2, #32 \n\t"
+ "ldmia r2!, {r4-r7} \n\t"
+ "stmia r2, {r4-r7} \n\t"
+ "subs r2, #32 \n\t"
+ "ldmia r2!, {r4-r7} \n\t"
+ "stmia r2, {r4-r7} \n\t"
+ "subs r2, #32 \n\t"
+ "ldmia r2!, {r4-r7} \n\t"
+ "stmia r2, {r4-r7} \n\t"
+ "subs r2, #32 \n\t"
+ "ldmia r2!, {r4-r7} \n\t"
+ "stmia r2, {r4-r7} \n\t"
+ "subs r2, #32 \n\t"
+ "ldmia r2!, {r4-r7} \n\t"
+ "stmia r2, {r4-r7} \n\t"
+ "subs r2, #32 \n\t"
+ "ldmia r2!, {r4-r7} \n\t"
+ "stmia r2, {r4-r7} \n\t"
+ "subs r2, #16 \n\t" //r2 is right back where it started
+
+ //matrixing
+ "movs r7, #8 \n\t" //r7 is loop index
+ "matrix_loop_4: \n\t"
+ "ldrsh r4, [r3, #0] \n\t"
+ "ldrsh r5, [r1, #0] \n\t"
+ "mul r6, r4, r5 \n\t"
+ "ldrsh r4, [r3, #2] \n\t"
+ "ldrsh r5, [r1, #2] \n\t"
+ "mla r6, r4, r5, r6 \n\t"
+ "ldrsh r4, [r3, #4] \n\t"
+ "ldrsh r5, [r1, #4] \n\t"
+ "mla r6, r4, r5, r6 \n\t"
+ "ldrsh r4, [r3, #6] \n\t"
+ "ldrsh r5, [r1, #6] \n\t"
+ "mla r6, r4, r5, r6 \n\t"
+ "adds r3, #8 \n\t"
+ "asrs r6, #14 \n\t"
+ "strh r6, [r2], #2 \n\t"
+ "subs r7, #1 \n\t"
+ "bne matrix_loop_4 \n\t"
+ //return r2 to point where it should
+ "subs r2, #16 \n\t"
+
+ //sample production
+ "movs r7, #4 \n\t" //r7 is loop index
+ "ldr r3, [sp, #16] \n\t" //r3 is now proto table
+ "sample_loop_4: \n\t"
+ "ldrsh r4, [r3, #0] \n\t"
+ "ldrsh r5, [r2, #0] \n\t"
+ "mul r6, r4, r5 \n\t"
+ "ldrsh r4, [r3, #2] \n\t"
+ "ldrsh r5, [r2, #24] \n\t"
+ "mla r6, r4, r5, r6 \n\t"
+ "ldrsh r4, [r3, #4] \n\t"
+ "ldrsh r5, [r2, #32] \n\t"
+ "mla r6, r4, r5, r6 \n\t"
+ "ldrsh r4, [r3, #6] \n\t"
+ "ldrsh r5, [r2, #56] \n\t"
+ "mla r6, r4, r5, r6 \n\t"
+ "ldrsh r4, [r3, #8] \n\t"
+ "ldrsh r5, [r2, #64] \n\t"
+ "mla r6, r4, r5, r6 \n\t"
+ "ldrsh r4, [r3, #10] \n\t"
+ "ldrsh r5, [r2, #88] \n\t"
+ "mla r6, r4, r5, r6 \n\t"
+ "ldrsh r4, [r3, #12] \n\t"
+ "ldrsh r5, [r2, #96] \n\t"
+ "mla r6, r4, r5, r6 \n\t"
+ "ldrsh r4, [r3, #14] \n\t"
+ "ldrsh r5, [r2, #120] \n\t"
+ "mla r6, r4, r5, r6 \n\t"
+ "ldrsh r4, [r3, #16] \n\t"
+ "ldrsh r5, [r2, #128] \n\t"
+ "mla r6, r4, r5, r6 \n\t"
+ "ldrsh r4, [r3, #18] \n\t"
+ "ldrsh r5, [r2, #152] \n\t"
+ "mla r6, r4, r5, r6 \n\t"
+ "adds r3, #20 \n\t"
+ "adds r2, #2 \n\t"
+ "negs r6, r6 \n\t"
+ "ssat r6, #12, r6, asr #16 \n\t"
+ "add r6, #0x0800 \n\t"
+ "strh r6, [r0], #2 \n\t"
+ "subs r7, #1 \n\t"
+ "bne sample_loop_4 \n\t"
+
+ //cleanup
+ "pop {r4-r7} \n\t"
+ "bx lr \n\t"
+ );
+ }
+
+ static void __attribute__((naked)) synth_8_med(OUTSAMPLE* dst, const INSAMPLE* src, FIXED* V, const FIXED* costabl, const FIXED* prot_Tabl){
+
+ asm(
+
+ //prologue {8 cycles}
+ "push {r4-r10} \n\t"
+
+ //shifting { 9x(9+9 + 1) + 1 = 171 cycles }
+ "add r2, #256 \n\t"
+ "ldmia r2!, {r4-r10, r12} \n\t"
+ "stmia r2, {r4-r10, r12} \n\t"
+ "subs r2, #64 \n\t"
+ "ldmia r2!, {r4-r10, r12} \n\t"
+ "stmia r2, {r4-r10, r12} \n\t"
+ "subs r2, #64 \n\t"
+ "ldmia r2!, {r4-r10, r12} \n\t"
+ "stmia r2, {r4-r10, r12} \n\t"
+ "subs r2, #64 \n\t"
+ "ldmia r2!, {r4-r10, r12} \n\t"
+ "stmia r2, {r4-r10, r12} \n\t"
+ "subs r2, #64 \n\t"
+ "ldmia r2!, {r4-r10, r12} \n\t"
+ "stmia r2, {r4-r10, r12} \n\t"
+ "subs r2, #64 \n\t"
+ "ldmia r2!, {r4-r10, r12} \n\t"
+ "stmia r2, {r4-r10, r12} \n\t"
+ "subs r2, #64 \n\t"
+ "ldmia r2!, {r4-r10, r12} \n\t"
+ "stmia r2, {r4-r10, r12} \n\t"
+ "subs r2, #64 \n\t"
+ "ldmia r2!, {r4-r10, r12} \n\t"
+ "stmia r2, {r4-r10, r12} \n\t"
+ "subs r2, #64 \n\t"
+ "ldmia r2!, {r4-r10, r12} \n\t"
+ "stmia r2, {r4-r10, r12} \n\t"
+ "subs r2, #32 \n\t" //r2 is right back where it started
+
+ //matrixing
+ "movs r7, #16 \n\t" //r7 is loop index
+ "matrix_loop: \n\t"
+ "ldrsh r4, [r3, #0] \n\t"
+ "ldrsh r5, [r1, #0] \n\t"
+ "mul r6, r4, r5 \n\t"
+ "ldrsh r4, [r3, #2] \n\t"
+ "ldrsh r5, [r1, #2] \n\t"
+ "mla r6, r4, r5, r6 \n\t"
+ "ldrsh r4, [r3, #4] \n\t"
+ "ldrsh r5, [r1, #4] \n\t"
+ "mla r6, r4, r5, r6 \n\t"
+ "ldrsh r4, [r3, #6] \n\t"
+ "ldrsh r5, [r1, #6] \n\t"
+ "mla r6, r4, r5, r6 \n\t"
+ "ldrsh r4, [r3, #8] \n\t"
+ "ldrsh r5, [r1, #8] \n\t"
+ "mla r6, r4, r5, r6 \n\t"
+ "ldrsh r4, [r3, #10] \n\t"
+ "ldrsh r5, [r1, #10] \n\t"
+ "mla r6, r4, r5, r6 \n\t"
+ "ldrsh r4, [r3, #12] \n\t"
+ "ldrsh r5, [r1, #12] \n\t"
+ "mla r6, r4, r5, r6 \n\t"
+ "ldrsh r4, [r3, #14] \n\t"
+ "ldrsh r5, [r1, #14] \n\t"
+ "mla r6, r4, r5, r6 \n\t"
+ "adds r3, #16 \n\t"
+ "asrs r6, #14 \n\t"
+ "strh r6, [r2], #2 \n\t"
+ "subs r7, #1 \n\t"
+ "bne matrix_loop \n\t"
+ //return r2 to point where it should
+ "subs r2, #32 \n\t"
+
+ //sample production
+ "movs r7, #8 \n\t" //r7 is loop index
+ "ldr r3, [sp, #28] \n\t" //r3 is now proto table
+ "sample_loop: \n\t"
+ "ldrsh r4, [r3, #0] \n\t"
+ "ldrsh r5, [r2, #0] \n\t"
+ "mul r6, r4, r5 \n\t"
+ "ldrsh r4, [r3, #2] \n\t"
+ "ldrsh r5, [r2, #48] \n\t"
+ "mla r6, r4, r5, r6 \n\t"
+ "ldrsh r4, [r3, #4] \n\t"
+ "ldrsh r5, [r2, #64] \n\t"
+ "mla r6, r4, r5, r6 \n\t"
+ "ldrsh r4, [r3, #6] \n\t"
+ "ldrsh r5, [r2, #112] \n\t"
+ "mla r6, r4, r5, r6 \n\t"
+ "ldrsh r4, [r3, #8] \n\t"
+ "ldrsh r5, [r2, #128] \n\t"
+ "mla r6, r4, r5, r6 \n\t"
+ "ldrsh r4, [r3, #10] \n\t"
+ "ldrsh r5, [r2, #176] \n\t"
+ "mla r6, r4, r5, r6 \n\t"
+ "ldrsh r4, [r3, #12] \n\t"
+ "ldrsh r5, [r2, #192] \n\t"
+ "mla r6, r4, r5, r6 \n\t"
+ "ldrsh r4, [r3, #14] \n\t"
+ "ldrsh r5, [r2, #240] \n\t"
+ "mla r6, r4, r5, r6 \n\t"
+ "ldrsh r4, [r3, #16] \n\t"
+ "ldrsh r5, [r2, #256] \n\t"
+ "mla r6, r4, r5, r6 \n\t"
+ "ldrsh r4, [r3, #18] \n\t"
+ "ldrsh r5, [r2, #304] \n\t"
+ "mla r6, r4, r5, r6 \n\t"
+ "adds r3, #20 \n\t"
+ "adds r2, #2 \n\t"
+ "negs r6, r6 \n\t"
+ "ssat r6, #12, r6, asr #16 \n\t"
+ "add r6, #0x0800 \n\t"
+ "strh r6, [r0], #2 \n\t"
+ "subs r7, #1 \n\t"
+ "bne sample_loop \n\t"
+
+ //cleanup
+ "pop {r4-r10} \n\t"
+ "bx lr \n\t"
+ );
+ }
+
+ static void synth(OUTSAMPLE* dst, const INSAMPLE* src, uint8_t nBands, FIXED* V){ //A2DP sigure 12.3
+
+ //efficient SBC synth by Dmitry Grinberg (as published May 26, 2012)
+ if(nBands == 4) synth_4_med(dst, src, V, costab_4, proto_4_40);
+ else synth_8_med(dst, src, V, costab_8, proto_8_80);
+ }
+
+#endif
+
+static void a2dpSbcPlay(const uint8_t* buf, uint16_t len){ //only supports mono (for simplicity)
+
+ //volume
+ int32_t vol = (uint32_t)getVolume();
+
+ //convenience
+ const uint8_t* end = buf + len;
+ #define left (end - buf)
+
+ //workspace
+ ITER i, j, k, ch, numChan;
+ uint8_t scaleFactors[2][8];
+ int8_t bitneed[2][8];
+ uint8_t bits[2][8], join = 0;
+ INSAMPLE samples[16][2][8];
+
+ //audio data
+ #define bufNumBuffers 3 //if less than 3, we're being suboptimal in speed.
+ #define bufNumSamples 256 //FYI: 128 samples is the maximum number of samples a single packet may have. MUST be a multiple of 8!
+ static OUTSAMPLE audio[bufNumBuffers][bufNumSamples];
+ static uint8_t whichBuf = 0;
+ static uint16_t bufSamples = 0;
+
+ //process the packet header
+ if(left < 12) return; //too short of a packet header
+ uint8_t ver = (*buf) >> 6;
+ char pad = ((*buf) >> 5) & 1;
+ char ext = ((*buf) >> 4) & 1;
+ uint8_t cc = (*buf++) & 0x0F;
+ char mark = (*buf) >> 7;
+ uint8_t pt = (*buf++) & 0x7F;
+ uint16_t seq = (((uint16_t)buf[0]) << 8) | buf[1];
+ uint32_t time = (((uint32_t)buf[2]) << 24) | (((uint32_t)buf[3]) << 16) | (((uint32_t)buf[4]) << 8) | buf[5];
+ uint32_t src = (((uint32_t)buf[6]) << 24) | (((uint32_t)buf[7]) << 16) | (((uint32_t)buf[8]) << 8) | buf[9];
+ buf += 10;
+
+ //process the count
+ if(left < 1) return; //too short of a count
+ uint8_t numFrames = *buf++;
+
+ //process packets
+ while(numFrames--){
+
+ //process frame header
+ if(left < 4) break; //too short a frame header
+ uint8_t sync = *buf++;
+ uint8_t samplingRate = (*buf) >> 6; //see A2DP table 12.16
+ uint8_t blocks = ((*buf) >> 4) & 3; //see A2DP table 12.17
+ uint8_t chanMode = ((*buf) >> 2) & 3; //see A2DP table 12.18
+ uint8_t snr = ((*buf) >> 1) & 1; //see A2DP table 12.19
+ uint8_t numSubbands = (*buf++) & 1; //see A2DP table 12.20
+ uint8_t bitpoolSz = *buf++;
+ uint8_t hdrCRC = *buf++;
+ uint8_t bitpos = 0x80;
+
+ numChan = (chanMode == A2DP_CHAN_MODE_MONO) ? 1 : 2;
+
+ //process some numbers based on the tables
+ numSubbands = numSubbands ? 8 : 4;
+ blocks = (blocks + 1) << 2;
+
+ //read "join" table if expected
+ if(chanMode == A2DP_CHAN_MODE_JOINT_STEREO){
+ join = *buf; //we use it as a bitfield starting at top bit.
+ join >>= (8 - (numSubbands - 1));
+ join <<= (8 - (numSubbands - 1));
+ if(numSubbands == 8) buf++;
+ else bitpos = 0x08;
+ }
+
+ //read scale factors
+ for(ch = 0; ch < numChan; ch++) for(i = 0; i < numSubbands; i++){
+
+ if(bitpos == 0x80){
+
+ scaleFactors[ch][i] = (*buf) >> 4;
+ bitpos = 0x08;
+ }
+ else{
+
+ scaleFactors[ch][i] = (*buf++) & 0x0F;
+ bitpos = 0x80;
+ }
+ }
+
+ //calculate bitneed table and max_bitneed value (A2DP 12.6.3.1)
+ int8_t max_bitneed[2] = {0, 0};
+ for(ch = 0; ch < numChan; ch++){
+ if(snr){
+
+ for(i = 0; i < numSubbands; i++){
+
+ bitneed[ch][i] = scaleFactors[ch][i];
+ if(bitneed[ch][i] > max_bitneed[ch]) max_bitneed[ch] = bitneed[ch][i];
+ }
+ }
+ else{
+
+ const signed char* tbl;
+
+ if(numSubbands == 4) tbl = loudness_4[samplingRate];
+ else tbl = loudness_8[samplingRate];
+
+ for(i = 0; i < numSubbands; i++){
+
+ if(scaleFactors[ch][i]){
+
+ int loudness = scaleFactors[ch][i] - tbl[i];
+
+ if(loudness > 0) loudness /= 2;
+ bitneed[ch][i] = loudness;
+ }
+ else bitneed[ch][i] = -5;
+ if(bitneed[ch][i] > max_bitneed[ch]) max_bitneed[ch] = bitneed[ch][i];
+ }
+ }
+ }
+
+ if(chanMode == A2DP_CHAN_MODE_MONO || chanMode == A2DP_CHAN_MODE_DUAL_CHANNEL){
+ for(ch = 0; ch < numChan; ch++){
+ //fit bitslices into the bitpool
+ int32_t bitcount = 0, slicecount = 0, bitslice = max_bitneed[ch] + 1;
+ do{
+ bitslice--;
+ bitcount += slicecount;
+ slicecount = 0;
+ for(i = 0; i < numSubbands; i++){
+
+ if(bitneed[ch][i] > bitslice + 1 && bitneed[ch][i] < bitslice + 16) slicecount++;
+ else if(bitneed[ch][i] == bitslice + 1) slicecount += 2;
+ }
+
+ }while(bitcount + slicecount < bitpoolSz);
+
+ //distribute bits
+ for(i = 0; i < numSubbands; i++){
+
+ if(bitneed[ch][i] < bitslice + 2) bits[ch][i] = 0;
+ else{
+
+ int8_t v = bitneed[ch][i] - bitslice;
+ if(v > 16) v = 16;
+ bits[ch][i] = v;
+ }
+ }
+
+ //allocate remaining bits
+ for(i = 0; i < numSubbands && bitcount < bitpoolSz; i++){
+
+ if(bits[ch][i] >= 2 && bits[ch][i] < 16){
+
+ bits[ch][i]++;
+ bitcount++;
+ }
+ else if(bitneed[ch][i] == bitslice + 1 && bitpoolSz > bitcount + 1){
+
+ bits[ch][i] = 2;
+ bitcount += 2;
+ }
+ }
+ for(i = 0; i < numSubbands && bitcount < bitpoolSz; i++){
+
+ if(bits[ch][i] < 16){
+
+ bits[ch][i]++;
+ bitcount++;
+ }
+ }
+ }
+ }
+ else{
+ //calculate max_bitneed value (A2DP 12.6.3.2)
+ uint8_t max_bitneed_val = max_bitneed[0] > max_bitneed[1] ? max_bitneed[0] : max_bitneed[1];
+
+ //fit bitslices into the bitpool
+ int32_t bitcount = 0, slicecount = 0, bitslice = max_bitneed_val + 1;
+ do{
+ bitslice--;
+ bitcount += slicecount;
+ slicecount = 0;
+ for(ch = 0; ch < 2; ch++) for(i = 0; i < numSubbands; i++){
+
+ if(bitneed[ch][i] > bitslice + 1 && bitneed[ch][i] < bitslice + 16) slicecount++;
+ else if(bitneed[ch][i] == bitslice + 1) slicecount += 2;
+ }
+
+ }while(bitcount + slicecount < bitpoolSz);
+
+ //distribute bits
+ for(ch = 0; ch < 2; ch++) for(i = 0; i < numSubbands; i++){
+
+ if(bitneed[ch][i] < bitslice + 2) bits[ch][i] = 0;
+ else{
+
+ int8_t v = bitneed[ch][i] - bitslice;
+ if(v > 16) v = 16;
+ bits[ch][i] = v;
+ }
+ }
+
+ //allocate remaining bits
+ i = 0;
+ ch = 0;
+ while(i < numSubbands && bitcount < bitpoolSz){
+
+ if(bits[ch][i] >= 2 && bits[ch][i] < 16){
+
+ bits[ch][i]++;
+ bitcount++;
+ }
+ else if(bitneed[ch][i] == bitslice + 1 && bitpoolSz > bitcount + 1){
+
+ bits[ch][i] = 2;
+ bitcount += 2;
+ }
+ if(++ch == 2){
+ ch = 0;
+ i++;
+ }
+ }
+ i = 0;
+ ch = 0;
+ while(i < numSubbands && bitcount < bitpoolSz){
+
+ if(bits[ch][i] < 16){
+
+ bits[ch][i]++;
+ bitcount++;
+ }
+ if(++ch == 2){
+ ch = 0;
+ i++;
+ }
+ }
+ }
+
+ //reconstruct subband samples (A2DP 12.6.4)
+ #ifndef SPEED_OVER_ACCURACY
+ int32_t levels[2][8];
+ for(ch = 0; ch < numChan; ch++) for(i = 0; i < numSubbands; i++) levels[ch][i] = (1 << bits[ch][i]) - 1;
+ #endif
+ for(j = 0; j < blocks; j++){
+
+ for(ch = 0; ch < numChan; ch++) for(i = 0; i < numSubbands; i++){
+
+ if(bits[ch][i]){
+
+ uint32_t val = 0;
+ k = bits[ch][i];
+ do{
+
+ val <<= 1;
+ if(*buf & bitpos) val++;
+ if(!(bitpos >>= 1)){
+ bitpos = 0x80;
+ buf++;
+ }
+ }while(--k);
+
+ val = (val << 1) | 1;
+ val <<= scaleFactors[ch][i];
+
+ #ifdef SPEED_OVER_ACCURACY
+ val >>= bits[ch][i];
+ #else
+ val /= levels[ch][i];
+ #endif
+
+ val -= (1 << scaleFactors[ch][i]);
+
+ samples[j][ch][i] = SAMPLE_CVT(val);
+
+ }
+ else samples[j][ch][i] = SAMPLE_CVT(0);
+ }
+
+ //joint processing (if needed - if not needed join will be 0)
+ ITER bf = join;
+ for(i = 0; i < numSubbands; i++, bf <<= 1) if(bf & 0x80){
+
+ INSAMPLE t = samples[j][0][i];
+
+ samples[j][0][i] += samples[j][1][i];
+ samples[j][1][i] = t - samples[j][1][i];
+ }
+ }
+
+ //synthesis
+ static FIXED V[160] = {0, };
+ for(j = 0; j < blocks; j++){
+
+ //do the actual synthesis
+ synth(audio[whichBuf] + bufSamples, samples[j][0], numSubbands, V);
+ for(k = 0; k < numSubbands; k++, bufSamples++) audio[whichBuf][bufSamples] = (((int32_t)audio[whichBuf][bufSamples]) * vol) >> 8;
+
+ //if buffer is full, enqueue it
+ if(bufSamples == bufNumSamples){
+
+ audioAddBuffer(AUDIO_BT, audio[whichBuf++], bufSamples);
+
+ if(whichBuf == bufNumBuffers) whichBuf = 0;
+ bufSamples = 0;
+ }
+ }
+ //if we used a byte partially, skip the rest of it, it is "padding"
+ if(bitpos != 0x80) buf++;
+ if(left < 0) dbgPrintf("A2DP: buffer over-read: %d\n", left);
+ }
+}
+
+static void a2dpServiceDataRx(void* service, const uint8_t* req, uint16_t reqSz){
+
+ A2DPstate* state = service;
+ uint8_t trans, pktTyp, msgTyp, sigId, eid;
+ uint8_t buf[16];
+ uint16_t replSz = 0;
+
+ if(IS_DATA_STATE(service)){
+
+ if(DATA_STATE_ENCODE(service) == conns) a2dpSbcPlay(req, reqSz); //only latest plays data
+ return;
+ }
+
+ if(reqSz < 2){
+
+ dbgPrintf("A2DP: packet too small\n");
+ return;
+ }
+
+ trans = (req[0] & AVDTP_HDR_MASK_TRANS) >> AVDTP_HDR_SHIFT_TRANS;
+ pktTyp = (req[0] & AVDTP_HDR_MASK_PKT_TYP) >> AVDTP_HDR_SHIFT_PKT_TYP;
+ msgTyp = (req[0] & AVDTP_HDR_MASK_MSG_TYP) >> AVDTP_HDR_SHIFT_MSG_TYP;
+ sigId = (req[1] & AVDTP_HDR_MASK_SIG_ID) >> AVDTP_HDR_SHIFT_SIG_ID;
+ reqSz -= 2;
+ req += 2;
+
+ #if UGLY_SCARY_DEBUGGING_CODE
+ dbgPrintf("A2DP (%x) data(trans %d, pktTyp %d msgTyp %d sigId %d %ub)\n", state->remChan, trans, pktTyp, msgTyp, sigId, reqSz);
+ #endif
+
+ switch(sigId){
+
+ case AVDTP_SIG_DISCOVER:
+
+ if(reqSz) dbgPrintf("A2DP: unexpected further data in AVDTP_SIG_DISCOVER\n");
+ //packet header
+ buf[0] = (trans << AVDTP_HDR_SHIFT_TRANS) | (AVDTP_PKT_TYP_SINGLE << AVDTP_HDR_SHIFT_PKT_TYP) | (AVDTP_MSG_TYP_ACCEPT << AVDTP_HDR_SHIFT_MSG_TYP);
+ buf[1] = (sigId << AVDTP_HDR_SHIFT_SIG_ID);
+ //return a single SEID info structure
+ buf[2] = (MY_ENDPT_ID << AVDTP_SEID_NFO_SHIFT_SEID) | (0 << AVDTP_SEID_NFO_MASK_INUSE);
+ buf[3] = (AVDTP_MEDIA_TYP_AUDIO << AVDTP_SEID_NFO_SHIFT_MEDIA_TYP) | (AVDTP_DIR_SINK << AVDTP_SEID_NFO_SHIFT_TYP);
+ replSz = 4;
+ break;
+
+ case AVDTP_SIG_GET_CAPABILITIES:
+
+ if(reqSz > 1) dbgPrintf("A2DP: unexpected further data in AVDTP_SIG_GET_CAPABILITIES\n");
+ if(reqSz < 1){
+ dbgPrintf("A2DP: not enough data in AVDTP_SIG_GET_CAPABILITIES\n");
+ break;
+ }
+ eid = (*req++) >> 2;
+ if(eid != MY_ENDPT_ID){
+ dbgPrintf("A2DP: bad EID (%d) AVDTP_SIG_GET_CAPABILITIES\n", eid);
+ break;
+ }
+ //packet header
+ buf[0] = (trans << AVDTP_HDR_SHIFT_TRANS) | (AVDTP_PKT_TYP_SINGLE << AVDTP_HDR_SHIFT_PKT_TYP) | (AVDTP_MSG_TYP_ACCEPT << AVDTP_HDR_SHIFT_MSG_TYP);
+ buf[1] = (sigId << AVDTP_HDR_SHIFT_SIG_ID);
+ //capability 0 - media transport
+ buf[2] = AVDTP_SVC_CAT_MEDIA_TRANSPORT;
+ buf[3] = 0;
+ //capability 1 - SDB codec (and its info)
+ buf[4] = AVDTP_SVC_CAT_MEDIA_CODEC;
+ buf[5] = 6; //generic data is 2 bytes, SBC data is 4 bytes (see A2DP spec section 4.3.2)
+ buf[6] = (AVDTP_MEDIA_TYP_AUDIO << 4);
+ buf[7] = A2DP_CODEC_TYP_SBC;
+ buf[8] = 0xFF; //spec forces us to support all of these (even though ANDROID and LINUX both do not properly support mono [try it :) ])
+ buf[9] = 0xFF; //spec forces us to support all of these
+ buf[10] = 0x02; //min allowed by spec
+ buf[11] = 0x50; //nice high value
+ replSz = 12;
+ break;
+
+ case AVDTP_SIG_SET_CONFIGURATION:
+
+ if(reqSz < 8){ //no valid command is shorter
+ dbgPrintf("A2DP: not enough data in AVDTP_SIG_SET_CONFIGURATION\n");
+ break;
+ }
+ eid = (*req++) >> 2;
+ if(eid != MY_ENDPT_ID){
+ dbgPrintf("A2DP: bad EID (%d) AVDTP_SIG_GET_CAPABILITIES\n", eid);
+ break;
+ }
+ req++; //skip INT EID - we don't care
+ reqSz -= 2;
+ while(reqSz >= 2){
+
+ uint8_t cap = *req++;
+ uint8_t len = *req++;
+ reqSz -= 2;
+
+ if(len > reqSz) break;
+ reqSz -= len;
+
+ if(cap == AVDTP_SVC_CAT_MEDIA_CODEC){
+
+ if(*req++ != (AVDTP_MEDIA_TYP_AUDIO << 4)){
+ dbgPrintf("A2DP: requested data is not audio\n");
+ break;
+ }
+ else if(*req++ != A2DP_CODEC_TYP_SBC){
+ dbgPrintf("A2DP: requested codec is not SBC\n");
+ break;
+ }
+ else{
+
+ uint8_t samplingRate = (*req) >> 4;
+ uint8_t channelMode = (*req++) & 0x0F;
+ uint8_t blockLen = (*req) >> 4;
+ uint8_t subbands = (*req >> 2) & 3;
+ uint8_t allocMethod = (*req++) & 3;
+ uint8_t minBitpool = *req++;
+ uint8_t maxBitpool = *req++;
+
+ switch(samplingRate){
+ case 1: state->samplingRate = 48000; break;
+ case 2: state->samplingRate = 44100; break;
+ case 4: state->samplingRate = 32000; break;
+ case 8: state->samplingRate = 16000; break;
+ default:
+ dbgPrintf("A2DP: invalid sampling rate: %d\n", samplingRate);
+ goto out;
+ }
+ switch(blockLen){
+ case 1: blockLen = 16; break;
+ case 2: blockLen = 12; break;
+ case 4: blockLen = 8; break;
+ case 8: blockLen = 4; break;
+ default:
+ dbgPrintf("A2DP: invalid block len: %d\n", blockLen);
+ goto out;
+ }
+ switch(subbands){
+ case 1: subbands = 8; break;
+ case 2: subbands = 4; break;
+ default:
+ dbgPrintf("A2DP: invalid num subbands: %d\n", subbands);
+ goto out;
+ }
+ switch(allocMethod){
+ case 1: allocMethod = 0; break;
+ case 2: allocMethod = 1; break;
+ default:
+ dbgPrintf("A2DP: invalid allocMethod: %d\n", allocMethod);
+ goto out;
+ }
+ static const char* strMode[] = {NULL, "Joint Stereo", "Stereo", NULL, "Dual Channel", NULL, NULL, NULL, "Mono"};
+ dbgPrintf("A2DP:\n\t* %u %s-framed frames / block\n\t* %u subbands/frame\n\t* %u KHz sampling rate\n\t* '%s' channel mode\n\t* %u-%u bits per piece per channel\n",
+ blockLen, allocMethod ? "SNR" : "Loudness", subbands,
+ state->samplingRate, strMode[channelMode], minBitpool, maxBitpool);
+ }
+ }
+ else req += len;
+ }
+ if(reqSz){ //no valid command is shorter
+ dbgPrintf("A2DP: malformed config info in AVDTP_SIG_SET_CONFIGURATION\n");
+ }
+ else{
+ //prepare reply
+ buf[0] = (trans << AVDTP_HDR_SHIFT_TRANS) | (AVDTP_PKT_TYP_SINGLE << AVDTP_HDR_SHIFT_PKT_TYP) | (AVDTP_MSG_TYP_ACCEPT << AVDTP_HDR_SHIFT_MSG_TYP);
+ buf[1] = (sigId << AVDTP_HDR_SHIFT_SIG_ID);
+ replSz = 2;
+ #if UGLY_SCARY_DEBUGGING_CODE
+ dbgPrintf("A2DP: %u samp/sec, %db block w/%d subbands in %s mode with pool sizes %d-%d\n",
+ state->samplingRate, state->blockLen, state->subbands, state->allocTypeSNR ? "SNR" : "Loudness",
+ state->minBitpool, state->maxBitpool);
+ #endif
+ }
+ break;
+
+ case AVDTP_SIG_OPEN:
+
+ if(reqSz > 1) dbgPrintf("A2DP: unexpected further data in AVDTP_SIG_OPEN\n");
+ if(reqSz < 1){
+ dbgPrintf("A2DP: not enough data in AVDTP_SIG_OPEN\n");
+ break;
+ }
+ eid = (*req++) >> 2;
+ if(eid != MY_ENDPT_ID){
+ dbgPrintf("A2DP: bad EID (%d) AVDTP_SIG_OPEN\n", eid);
+ break;
+ }
+ state->needAudioConn = 1;
+ //packet header
+ buf[0] = (trans << AVDTP_HDR_SHIFT_TRANS) | (AVDTP_PKT_TYP_SINGLE << AVDTP_HDR_SHIFT_PKT_TYP) | (AVDTP_MSG_TYP_ACCEPT << AVDTP_HDR_SHIFT_MSG_TYP);
+ buf[1] = (sigId << AVDTP_HDR_SHIFT_SIG_ID);
+ replSz = 2;
+ break;
+
+ case AVDTP_SIG_START:
+
+ if(reqSz > 1) dbgPrintf("A2DP: unexpected further data in AVDTP_SIG_OPEN\n");
+ if(reqSz < 1){
+ dbgPrintf("A2DP: not enough data in AVDTP_SIG_OPEN\n");
+ break;
+ }
+ eid = (*req++) >> 2;
+ if(eid != MY_ENDPT_ID){
+ dbgPrintf("A2DP: bad EID (%d) AVDTP_SIG_OPEN\n", eid);
+ break;
+ }
+ audioOn(AUDIO_BT, state->samplingRate);
+ //packet header
+ buf[0] = (trans << AVDTP_HDR_SHIFT_TRANS) | (AVDTP_PKT_TYP_SINGLE << AVDTP_HDR_SHIFT_PKT_TYP) | (AVDTP_MSG_TYP_ACCEPT << AVDTP_HDR_SHIFT_MSG_TYP);
+ buf[1] = (sigId << AVDTP_HDR_SHIFT_SIG_ID);
+ replSz = 2;
+ break;
+
+ case AVDTP_SIG_CLOSE:
+ case AVDTP_SIG_SUSPEND:
+ case AVDTP_SIG_ABORT:
+
+ if(reqSz > 1) dbgPrintf("A2DP: unexpected further data in AVDTP_SIG_CLOSE/ABORT/SUSPEND\n");
+ if(reqSz < 1){
+ dbgPrintf("A2DP: not enough data in AVDTP_SIG_CLOSE/ABORT/SUSPEND\n");
+ break;
+ }
+ eid = (*req++) >> 2;
+ if(eid != MY_ENDPT_ID){
+ dbgPrintf("A2DP: bad EID (%d) AVDTP_SIG_CLOSE/ABORT/SUSPEND\n", eid);
+ break;
+ }
+ audioOff(AUDIO_BT);
+ //packet header
+ buf[0] = (trans << AVDTP_HDR_SHIFT_TRANS) | (AVDTP_PKT_TYP_SINGLE << AVDTP_HDR_SHIFT_PKT_TYP) | (AVDTP_MSG_TYP_ACCEPT << AVDTP_HDR_SHIFT_MSG_TYP);
+ buf[1] = (sigId << AVDTP_HDR_SHIFT_SIG_ID);
+ replSz = 2;
+ break;
+
+ default:
+
+ dbgPrintf("A2DP (%x) data(trans %d, pktTyp %d msgTyp %d sigId %d %ub)\n", state->remChan, trans, pktTyp, msgTyp, sigId, reqSz);
+ dbgPrintf("DATA: ");
+ while(reqSz--) dbgPrintf(" %02X", *req++);
+ dbgPrintf("\n");
+ break;
+ }
+
+out:
+ if(replSz){
+ sg_buf* sgbuf = sg_alloc();
+ if(!sgbuf) return;
+ if(sg_add_front(sgbuf, buf, replSz, SG_FLAG_MAKE_A_COPY)){
+
+ l2capServiceTx(state->aclConn, state->remChan, sgbuf);
+ }
+ else{
+
+ sg_free(sgbuf);
+ free(sgbuf);
+ }
+ }
+}
+
+static void* a2dpServiceAlloc(uint16_t conn, uint16_t chan, uint16_t remChan){
+
+ A2DPstate* state = conns;
+
+ while(state){
+
+ if(state->needAudioConn && state->aclConn == conn){
+
+ state->needAudioConn = 0;
+ return DATA_STATE_ENCODE(state);
+ }
+ state = state->next;
+ }
+
+ state = malloc(sizeof(A2DPstate));
+
+ if(state){
+
+ state->aclConn = conn;
+ state->remChan = remChan;
+ state->needAudioConn = 0;
+
+ state->next = conns;
+ conns = state;
+ }
+
+ return state;
+}
+
+static void a2dpServiceFree(void* service){
+
+ if(IS_DATA_STATE(service)) return;
+
+ A2DPstate *state = conns, *prev = NULL;
+
+ while(state){
+
+ if(state == service){
+
+ if(prev) prev->next = state->next;
+ else conns = state->next;
+
+ dbgPrintf("A2DP: connection %d.%d closed\n", state->aclConn, state->remChan);
+ if(conns) audioOn(AUDIO_BT, conns->samplingRate);
+
+ free(state);
+ return;
+ }
+
+ prev = state;
+ state = state->next;
+ }
+}
+
+static uint8_t sdpDescrA2DP[] =
+{
+ //service class ID list
+ SDP_ITEM_DESC(SDP_TYPE_UINT, SDP_SZ_2), 0x00, 0x01, SDP_ITEM_DESC(SDP_TYPE_ARRAY, SDP_SZ_u8), 3,
+ SDP_ITEM_DESC(SDP_TYPE_UUID, SDP_SZ_2), 0x11, 0x0B, //Audio Sink
+ //ServiceId
+ SDP_ITEM_DESC(SDP_TYPE_UINT, SDP_SZ_2), 0x00, 0x03, SDP_ITEM_DESC(SDP_TYPE_UUID, SDP_SZ_2), 0x11, 0x0B, //Audio Sink
+ //ProtocolDescriptorList
+ SDP_ITEM_DESC(SDP_TYPE_UINT, SDP_SZ_2), 0x00, 0x04, SDP_ITEM_DESC(SDP_TYPE_ARRAY, SDP_SZ_u8), 16,
+ SDP_ITEM_DESC(SDP_TYPE_ARRAY, SDP_SZ_u8), 6,
+ SDP_ITEM_DESC(SDP_TYPE_UUID, SDP_SZ_2), 0x01, 0x00, // L2CAP
+ SDP_ITEM_DESC(SDP_TYPE_UINT, SDP_SZ_2), L2CAP_PSM_AVDTP >> 8, L2CAP_PSM_AVDTP & 0xFF, // AVDTP PSM
+ SDP_ITEM_DESC(SDP_TYPE_ARRAY, SDP_SZ_u8), 6,
+ SDP_ITEM_DESC(SDP_TYPE_UUID, SDP_SZ_2), L2CAP_PSM_AVDTP >> 8, L2CAP_PSM_AVDTP & 0xFF, // AVDTP
+ SDP_ITEM_DESC(SDP_TYPE_UINT, SDP_SZ_2), 0x01, 0x00, //AVDTP version (as per spec)
+ //browse group list
+ SDP_ITEM_DESC(SDP_TYPE_UINT, SDP_SZ_2), 0x00, 0x05, SDP_ITEM_DESC(SDP_TYPE_ARRAY, SDP_SZ_u8), 3,
+ SDP_ITEM_DESC(SDP_TYPE_UUID, SDP_SZ_2), 0x10, 0x02, // Public Browse Group
+ //profile descriptor list
+ SDP_ITEM_DESC(SDP_TYPE_UINT, SDP_SZ_2), 0x00, 0x09, SDP_ITEM_DESC(SDP_TYPE_ARRAY, SDP_SZ_u8), 8,
+ SDP_ITEM_DESC(SDP_TYPE_ARRAY, SDP_SZ_u8), 6,
+ SDP_ITEM_DESC(SDP_TYPE_UUID, SDP_SZ_2), 0x11, 0x0d, // Advanced Audio
+ SDP_ITEM_DESC(SDP_TYPE_UINT, SDP_SZ_2), 0x01, 0x00, // Version 1.0
+ //name
+ SDP_ITEM_DESC(SDP_TYPE_UINT, SDP_SZ_2), 0x01, 0x00, SDP_ITEM_DESC(SDP_TYPE_TEXT, SDP_SZ_u8), 8, 'A', 'D', 'K', ' ', 'A', '2', 'D', 'P'
+};
+
+
+char btA2dpRegister(void){
+
+ const L2capService a2dp = {L2CAP_FLAG_SUPPORT_CONNECTIONS, a2dpServiceAlloc, a2dpServiceFree, a2dpServiceDataRx};
+
+ if(!l2capServiceRegister(L2CAP_PSM_AVDTP, &a2dp)) return 0;
+ btSdpServiceDescriptorAdd(sdpDescrA2DP, sizeof(sdpDescrA2DP));
+
+ return 1;
+}
+
+
+
+
+/* original tables
+
+
+proto_4_40:
+ 0.00000000E+00,5.36548976E-04,1.49188357E-03,2.73370904E-03,
+ 3.83720193E-03,3.89205149E-03,1.86581691E-03,-3.06012286E-03,
+ 1.09137620E-02,2.04385087E-02,2.88757392E-02,3.21939290E-02,
+ 2.58767811E-02,6.13245186E-03,-2.88217274E-02,-7.76463494E-02,
+ 1.35593274E-01,1.94987841E-01,2.46636662E-01,2.81828203E-01,
+ 2.94315332E-01,2.81828203E-01,2.46636662E-01,1.94987841E-01,
+ -1.35593274E-01,-7.76463494E-02,-2.88217274E-02,6.13245186E-03,
+ 2.58767811E-02,3.21939290E-02,2.88757392E-02,2.04385087E-02,
+ -1.09137620E-02,-3.06012286E-03,1.86581691E-03,3.89205149E-03,
+ 3.83720193E-03,2.73370904E-03,1.49188357E-03,5.36548976E-04
+
+proto_8_80:
+
+ 0.00000000E+00,1.56575398E-04,3.43256425E-04,5.54620202E-04,
+ 8.23919506E-04,1.13992507E-03,1.47640169E-03,1.78371725E-03,
+ 2.01182542E-03,2.10371989E-03,1.99454554E-03,1.61656283E-03,
+ 9.02154502E-04,-1.78805361E-04,-1.64973098E-03,-3.49717454E-03,
+ 5.65949473E-03,8.02941163E-03,1.04584443E-02,1.27472335E-02,
+ 1.46525263E-02,1.59045603E-02,1.62208471E-02,1.53184106E-02,
+ 1.29371806E-02,8.85757540E-03,2.92408442E-03,-4.91578024E-03,
+ -1.46404076E-02,-2.61098752E-02,-3.90751381E-02,-5.31873032E-02,
+ 6.79989431E-02,8.29847578E-02,9.75753918E-02,1.11196689E-01,
+ 1.23264548E-01,1.33264415E-01,1.40753505E-01,1.45389847E-01,
+ 1.46955068E-01,1.45389847E-01,1.40753505E-01,1.33264415E-01,
+ 1.23264548E-01,1.11196689E-01,9.75753918E-02,8.29847578E-02,
+ -6.79989431E-02,-5.31873032E-02,-3.90751381E-02,-2.61098752E-02,
+ -1.46404076E-02,-4.91578024E-03,2.92408442E-03,8.85757540E-03,
+ 1.29371806E-02,1.53184106E-02,1.62208471E-02,1.59045603E-02,
+ 1.46525263E-02,1.27472335E-02,1.04584443E-02,8.02941163E-03,
+ -5.65949473E-03,-3.49717454E-03,-1.64973098E-03,-1.78805361E-04,
+ 9.02154502E-04,1.61656283E-03,1.99454554E-03,2.10371989E-03,
+ 2.01182542E-03,1.78371725E-03,1.47640169E-03,1.13992507E-03,
+ 8.23919506E-04,5.54620202E-04,3.43256425E-04,1.56575398E-04
+
+
+js code to convert to fixpoint:
+
+ var xa = new Array(values here...);
+
+ var num = 0;
+ var perRow = 4;
+ var L = parseInt(xa.length);
+
+ for(i = 0; i < L; i++){
+ x = xa[i];
+
+ var neg = 0;
+
+
+ if(x < 0){
+ neg = 1;
+ x = -x;
+ }
+ x *= (1 << 26); //this 26 should be the number of fraction bits
+ x = parseInt(x + 0.5);
+ s = x >> 28
+ x &= 0x0FFFFFFF;
+ if(neg){
+
+ x = x ^ 0x0FFFFFFF;
+ x++;
+ s ^= 0x0F;
+ if(x & 0x10000000) s++;
+ x &= 0x0FFFFFFF;
+ s &= 0x0F;
+ }
+
+ x = x.toString(16);
+ while(x.length < 7) x = "0" + x;
+ x = s.toString(16) + x;
+ x = x.toUpperCase();
+
+
+ document.write("0x" + x);
+ if(i != L - 1) document.write(",");
+ if(++num == perRow){
+ num = 0;
+ document.write("<BR>");
+ }
+ else document.write(" ");
+ }
+
+
+
+js code to produce costab (adjust loop variables as needed for both table vairants)
+
+ for(k = 0; k <= 7; k++) for(i = 0 ;i <= 3; i++){
+
+ document.write(Math.cos((i + 0.5) * (k + 2) * Math.PI / 4) + ", ")
+ }
+
+
+
+js code to generate order tables (they are used for those strange offsets into the V array in synth_* when generating samples):
+
+ var L = 200;
+ var V = new Array(L);
+ var U = new Array(80);
+ var i, j;
+ var nBands = 4;
+
+ for(i = 0; i <L; i++) V[i] = i + 1;
+
+
+ for(i = 0; i <= 4; i++) for(j = 0; j < nBands; j++){
+
+ if(nBands == 4){
+
+ U[i * 8 + j] = V[i * 16 + j];
+ U[i * 8 + 4 + j] = V[i * 16 + 12 + j];
+ }
+ else{
+
+ U[i * 16 + j] = V[i * 32 + j];
+ U[i * 16 + 8 + j] = V[i * 32 + 24 + j];
+ }
+ }
+
+
+ for(j = 0; j < nBands; j++) for(i = 0; i < 10; i++) document.write((U[j + nBands * i] - 1) + ",\t");
+
+
+
+
+
+
+
+C code for reordering the proto_* tables to access order. insert table values and modify nBands as needed
+
+ #include <stdio.h>
+ #include <stdint.h>
+
+
+
+ int32_t tabl[] =
+ {
+ table data here
+ };
+
+
+ int main(int argc, char** argv){
+
+ int i, j;
+ int nBands = 8;
+
+ for(j = 0; j < nBands; j++) for(i = 0; i < 10; i++) printf("0x%08X, ",tabl[j + nBands * i]);
+ }
+
+
+
+*/
+
diff --git a/MakefileBasedBuild/app/btA2DP.h b/MakefileBasedBuild/app/btA2DP.h
new file mode 100644
index 0000000..4711153
--- /dev/null
+++ b/MakefileBasedBuild/app/btA2DP.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifdef ADK_INTERNAL
+#ifndef _BT_A2DP_H_
+#define _BT_A2DP_H_
+
+
+
+
+char btA2dpRegister(void);
+
+
+
+#endif
+#endif
diff --git a/MakefileBasedBuild/app/btL2CAP.c b/MakefileBasedBuild/app/btL2CAP.c
new file mode 100644
index 0000000..42ca963
--- /dev/null
+++ b/MakefileBasedBuild/app/btL2CAP.c
@@ -0,0 +1,692 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#define ADK_INTERNAL
+#include "fwk.h"
+#include "sgBuf.h"
+#include "btL2CAP.h"
+#include "BT.h"
+#include "dbg.h"
+#include <string.h>
+
+#define UGLY_SCARY_DEBUGGING_CODE 0
+
+#define L2CAP_CMD_REJECT 0x01
+#define L2CAP_CMD_CONN_REQ 0x02
+#define L2CAP_CMD_CONN_RESP 0x03
+#define L2CAP_CMD_CONFIG_REQ 0x04
+#define L2CAP_CMD_CONFIG_RESP 0x05
+#define L2CAP_CMD_DISC_REQ 0x06
+#define L2CAP_CMD_DISC_RESP 0x07
+#define L2CAP_CMD_ECHO_REQ 0x08
+#define L2CAP_CMD_ECHO_RESP 0x09
+#define L2CAP_CMD_INFO_REQ 0x0A
+#define L2CAP_CMD_INFO_RESP 0x0B
+
+#define L2CAP_CONN_SUCCESS 0x0000
+#define L2CAP_CONN_FAIL_NO_SUCH_PSM 0x0002
+#define L2CAP_CONN_FAIL_RESOURCES 0x0004
+
+#define L2CAP_REJECT_REASON_WTF 0x0000 //command not understood
+#define L2CAP_REJECT_REASON_INVALID_CID 0x0002
+
+#define L2CAP_FIRST_USABLE_CHANNEL 0x0040
+
+#define L2CAP_OPTION_MTU 1
+#define L2CAP_DEFAULT_MTU 672 //as per spec
+
+typedef struct Service{
+
+ struct Service* next;
+ uint16_t PSM;
+ L2capService descr;
+
+}Service;
+
+typedef struct Connection{
+
+ struct Connection* next;
+ Service* service;
+ void* serviceInstance;
+ uint16_t conn, chan, remChan;
+
+}Connection;
+
+Service* services = NULL;
+Connection* connections = NULL;
+
+static uint8_t gL2capID = 1;
+
+struct{
+
+ uint16_t conn;
+ uint16_t chan;
+ uint8_t* buf;
+ uint16_t lenGot;
+ uint16_t lenNeed;
+}gIncomingPieces[L2CAP_MAX_PIECED_MESSAGES] = {{0,},};
+
+
+
+static inline uint16_t getLE16(const uint8_t* ptr){
+
+ return (((uint16_t)ptr[1]) << 8) + ptr[0];
+}
+
+static inline void putLE16(uint8_t* ptr, uint16_t val){
+
+ ptr[0] = val & 0xFF;
+ ptr[1] = val >> 8;
+}
+
+void l2capServiceTx(uint16_t conn, uint16_t remChan, sg_buf* data){
+
+ uint8_t hdr[4];
+ uint16_t len = sg_length(data);
+
+ putLE16(hdr + 0, len);
+ putLE16(hdr + 2, remChan);
+
+ if(sg_add_front(data, hdr, 4, SG_FLAG_MAKE_A_COPY)){
+
+ #if UGLY_SCARY_DEBUGGING_CODE
+ uint32_t i;
+ uint8_t buf[256];
+ sg_copyto(data, buf);
+ dbgPrintf("L2CAP TX: ");
+ for(i = 0; i < sg_length(data); i++) dbgPrintf(" %02X", buf[i]);
+ dbgPrintf("\n");
+ #endif
+
+ btAclDataTx(conn, 1, BT_BCAST_NONE, data);
+ }
+ else{
+
+ sg_free(data);
+ free(data);
+ }
+}
+
+static void l2capSendControlRawBuf(uint16_t conn, const uint8_t* data, uint16_t len){
+
+ sg_buf* buf;
+
+ buf = sg_alloc();
+ if(buf){
+
+ if(sg_add_back(buf, data, len, SG_FLAG_MAKE_A_COPY)){
+
+ l2capServiceTx(conn, 1, buf);
+ }
+ else{
+
+ sg_free(buf);
+ free(buf);
+ }
+ }
+}
+
+static void l2capConnectionCloseEx(Connection* c, Connection* prev, char sendDiscPacket){
+
+ uint8_t discCmd[6];
+
+ if(c->service->descr.serviceInstanceFree) c->service->descr.serviceInstanceFree(c->serviceInstance);
+
+ if(sendDiscPacket){
+
+ discCmd[0] = L2CAP_CMD_DISC_REQ;
+ discCmd[1] = gL2capID++;
+ putLE16(discCmd + 2, c->remChan);
+ putLE16(discCmd + 4, c->chan);
+
+ l2capSendControlRawBuf(c->conn, discCmd, 6);
+ }
+
+ if(prev) prev->next = c->next;
+ else connections = c->next;
+ free(c);
+}
+
+static Connection* l2capFindConnection(uint16_t conn, uint16_t chan, Connection** prev){
+
+ Connection *c = connections, *p = NULL;
+
+ while(c && (c->conn != conn || c->chan != chan)){
+
+ p = c;
+ c = c->next;
+ }
+
+ if(prev) *prev = p;
+ return c;
+}
+
+static uint16_t l2capFindFreeLocalChannel(uint16_t conn){
+
+ Connection *c = connections;
+ uint32_t chan = L2CAP_FIRST_USABLE_CHANNEL;
+
+ //first try something fast
+ while(c){
+ if(c->chan >= chan && c->conn == conn) chan = c->chan + 1;
+ c = c->next;
+ }
+ if(chan <= 0xFFFF) return chan;
+
+ //else do something slower
+ for(chan = L2CAP_FIRST_USABLE_CHANNEL; chan <= 0xFFFF; chan++){
+
+ c = connections;
+ while(c && (c->chan != chan || c->conn != conn)) c = c->next;
+ if(!c) break;
+ }
+
+ if(chan <= 0xFFFF) return chan;
+
+ //now we failed
+ return 0;
+}
+
+void l2capServiceCloseConn(uint16_t conn, uint16_t chan){
+
+ Connection *c, *p;
+
+ if((c = l2capFindConnection(conn, chan, &p))) l2capConnectionCloseEx(c, p, 1);
+}
+
+static void l2capHandleControlChannel(uint16_t conn, const uint8_t* data, uint16_t size){
+
+ char rejectCommand = 0;
+ uint16_t rejectReason = L2CAP_REJECT_REASON_WTF;
+ Service* s = services;
+ Connection* c;
+ uint8_t cmd, id;
+ uint8_t buf[16];
+ uint16_t chan, remChan, len;
+
+ if(!gL2capID) gL2capID++;
+
+ if(size < 2){
+
+ rejectCommand = 1;
+ dbgPrintf("L2CAP: control packet too small\n");
+ }
+ else{
+
+ cmd = *data++;
+ id = *data++;
+ len = getLE16(data);
+ data += 2;
+ size -= 4;
+
+ if(len != size){
+
+ dbgPrintf("L2CAP (control packet internal sizes mismatch (%u != %u)\n", len, size);
+ rejectCommand = 1;
+ }
+ else switch(cmd){
+
+ case L2CAP_CMD_CONN_REQ:{
+
+ uint16_t PSM;
+
+ //get some request data
+ if(size != 4){
+
+ dbgPrintf("L2CAP: ConnectionRequest packet size is wrong(%u)\n", size);
+ rejectCommand = 1;
+ break;
+ }
+
+ PSM = getLE16(data + 0);
+ remChan = getLE16(data + 2);
+
+ //init the reply
+ buf[0] = L2CAP_CMD_CONN_RESP;
+ buf[1] = id;
+ putLE16(buf + 2, 8); //length
+ putLE16(buf + 4, 0); //DCID
+ putLE16(buf + 6, remChan); //SCID
+ putLE16(buf + 10, 0); //no further information
+
+ //find the service
+ while(s && s->PSM != PSM) s = s->next;
+ if(!s || !(s->descr.flags & L2CAP_FLAG_SUPPORT_CONNECTIONS)){
+
+ dbgPrintf("L2CAP: rejecting conection to unknown PSM 0x%04X\n", PSM);
+ putLE16(buf + 8, L2CAP_CONN_FAIL_NO_SUCH_PSM);
+ }
+ else{
+
+ void* instance = NULL;
+
+ chan = 0;
+ c = malloc(sizeof(Connection));
+ if(c) chan = l2capFindFreeLocalChannel(conn);
+ if(chan) instance = s->descr.serviceInstanceAllocate(conn, chan, remChan);
+
+ if(instance){
+
+ putLE16(buf + 4, chan);
+ putLE16(buf + 8, L2CAP_CONN_SUCCESS);
+
+ c->service = s;
+ c->serviceInstance = instance;
+ c->conn = conn;
+ c->chan = chan;
+ c->remChan = remChan;
+ c->next = connections;
+ connections = c;
+ }
+ else{
+
+ putLE16(buf + 8, L2CAP_CONN_FAIL_RESOURCES);
+
+ if(c) free(c);
+ }
+ }
+ size = 12;
+ break;
+ }
+
+ case L2CAP_CMD_CONFIG_REQ:{
+
+ uint16_t flags;
+
+ //get some request data
+ if(size < 4){
+ dbgPrintf("L2CAP: ConfigurationRequest packet size is wrong(%u)\n", size);
+ rejectCommand = 1;
+ break;
+ }
+
+ chan = getLE16(data + 0);
+ flags = getLE16(data + 2);
+ if(flags & 1){ //flags continue - we do not support that
+
+ size = 0;
+ break;
+ }
+ size -= 4;
+ data += 4;
+
+ //locate the connection at hand
+ c = l2capFindConnection(conn, chan, NULL);
+ if(!c){
+ dbgPrintf("L2CAP: ConfigurationRequest for an unknown channel %u.%u\n", conn, chan);
+ rejectCommand = 1;
+ break;
+ }
+ chan = c->remChan;
+
+ //reply with just our rx-MTU
+ buf[0] = L2CAP_CMD_CONFIG_RESP;
+ buf[1] = id;
+ putLE16(buf + 2, 10); //length
+ putLE16(buf + 4, c->remChan); //SCID
+ putLE16(buf + 6, 0); //flags
+ putLE16(buf + 8, 0); //success
+ buf[10] = L2CAP_OPTION_MTU; //mtu_property.type
+ buf[11] = 2; //mtu_property.len
+ putLE16(buf + 12, BT_RX_BUF_SZ - 8); //mtu value
+ l2capSendControlRawBuf(conn, buf, 14); //send it
+
+ //we need to send such a packet there too
+ buf[0] = L2CAP_CMD_CONFIG_REQ; //configuration request
+ buf[1] = gL2capID++;
+ putLE16(buf + 2, 4); //length
+ putLE16(buf + 4, c->remChan); //SCID
+ putLE16(buf + 6, 0); //flags
+ size = 8;
+ break;
+ }
+
+ case L2CAP_CMD_CONFIG_RESP:{
+
+ //we do nothing here - perhaps we should?
+ size = 0;
+ break;
+ }
+
+ case L2CAP_CMD_DISC_REQ:{
+
+ Connection* p;
+
+ //get some request data
+ if(size != 4){
+
+ dbgPrintf("L2CAP: DisconnectionRequest packet size is wrong(%u)\n", size);
+ rejectCommand = 1;
+ break;
+ }
+ chan = getLE16(data + 0);
+ remChan = getLE16(data + 2);
+ c = l2capFindConnection(conn, chan, &p);
+
+ //handle some likely error cases
+ if(!c){
+ dbgPrintf("L2CAP: DisconnectionRequest for an unknown channel %u.%u\n", conn, chan);
+ rejectReason = L2CAP_REJECT_REASON_INVALID_CID;
+ rejectCommand = 1; //reject as per spec
+ break;
+ }
+ if(c->remChan != remChan){
+ dbgPrintf("L2CAP: DisconnectionRequest for an unmatched channel on %u.%u (%u != %u)\n", conn, chan, c->remChan, remChan);
+ size = 0; //drop as per spec
+ break;
+ }
+
+ //perform needed cleanup
+ l2capConnectionCloseEx(c, p, 0);
+
+ //send the reply
+ buf[0] = L2CAP_CMD_DISC_RESP; //disconnection response
+ buf[1] = id; //copied as required
+ putLE16(buf + 2, 4); //length
+ putLE16(buf + 4, chan); //DCID
+ putLE16(buf + 6, remChan); //SCID
+ size = 8;
+ break;
+ }
+
+ case L2CAP_CMD_DISC_RESP:{
+
+ //nothing to do - we did cleanup when we requested the connection closure...
+ size = 0;
+ break;
+ }
+
+ case L2CAP_CMD_ECHO_REQ:{
+
+ buf[0] = L2CAP_CMD_ECHO_RESP; //ping response
+ buf[1] = id; //copied as required
+ putLE16(buf + 2, 0); //0-length replies are ok
+ size = 4;
+ break;
+ }
+
+ case L2CAP_CMD_INFO_REQ:{
+
+ uint16_t info;
+
+ //get some request data
+ if(size != 2){
+
+ dbgPrintf("L2CAP: InformationRequest packet size is wrong(%u)\n", size);
+ rejectCommand = 1;
+ break;
+ }
+ info = getLE16(data + 0);
+
+ buf[0] = L2CAP_CMD_INFO_RESP; //information response
+ buf[1] = id; //copied as required
+ putLE16(buf + 4, info); //info type
+ if(info == 1){ //connectionless mtu
+
+ putLE16(buf + 6, 0); //success
+ putLE16(buf + 8, BT_RX_BUF_SZ - 8);
+ putLE16(buf + 2, 6); //length
+ size = 10;
+ }
+ else if(info == 2){ //extended features
+
+ putLE16(buf + 6, 0); //success
+ putLE16(buf + 8, 0);
+ putLE16(buf + 10, 0);
+ putLE16(buf + 2, 8); //length
+ size = 12;
+ }
+ else{ //whatever this request is, we do not support it
+
+ putLE16(buf + 6, 1); //info type not supported
+ putLE16(buf + 2, 4); //length
+ size = 8;
+ }
+ break;
+ }
+
+ default:{
+
+ dbgPrintf("L2CAP: unexpected command 0x%02X recieved\n", cmd);
+ size = 0;
+ }
+ }
+ }
+
+ if(rejectCommand){
+
+ buf[0] = L2CAP_CMD_REJECT; //disconnection response
+ buf[1] = id; //copied as required
+ putLE16(buf + 2, 4); //length
+ putLE16(buf + 4, rejectReason); //rejection reason
+ size = 6;
+ }
+
+ if(size) l2capSendControlRawBuf(conn, buf, size);
+}
+
+
+char l2capServiceRegister(uint16_t PSM, const L2capService* svcData){
+
+ Service* s;
+
+ //first, see if this PSM is taken
+ s = services;
+ while(s){
+
+ if(s->PSM == PSM) return 0;
+ s = s->next;
+ }
+
+ //next, try to allocate the memory
+ s = malloc(sizeof(Service));
+ if(!s) return 0;
+
+ //then, init it and link it in
+ s->PSM = PSM;
+ s->descr = *svcData;
+ s->next = services;
+ services = s;
+
+ return 1;
+}
+
+char l2capServiceUnregister(uint16_t PSM){
+
+ Service *s = services, *ps = NULL;
+ Connection *c, *pc = NULL;
+
+ //first, find it in the list
+ while(s && s->PSM != PSM){
+
+ ps = s;
+ s = s->next;
+ }
+ if(!s) return 0;
+
+ //then, see if any connections are using it, and if so, kill them
+ do{
+ c = connections;
+ while(c){
+
+ if(c->service == s){
+
+ l2capConnectionCloseEx(c, pc, 1);
+ break;
+ }
+
+ pc = c;
+ c = c->next;
+ }
+ }while(c);
+
+ //now delete the service record
+ if(ps) ps->next = s->next;
+ else services = s->next;
+ free(s);
+ return 1;
+}
+
+void l2capAclLinkDataRx(uint16_t conn, char first, const uint8_t* data, uint16_t size){
+
+ uint16_t chan, len;
+ unsigned i;
+ char freeIt = 0;
+
+ #if UGLY_SCARY_DEBUGGING_CODE
+ dbgPrintf("L2CAP data:");
+ for(chan = 0; chan < size; chan++) dbgPrintf(" %02X", data[chan]);
+ dbgPrintf("\n\n");
+ #endif
+
+ if(first){
+
+ len = getLE16(data + 0);
+ chan = getLE16(data + 2);
+ data += 4;
+ size -= 4;
+
+ if(size >= len){
+ if(size > len) dbgPrintf("L2CAP: ACL provided likely invalid L2CAP packet (ACL.len=%u L2CAP.len=%u)\n", size, len);
+ }
+ else{
+ for(i = 0; i < L2CAP_MAX_PIECED_MESSAGES; i++){
+
+ if(gIncomingPieces[i].conn == conn){
+
+ dbgPrintf("L2CAP: conn %d: 'first' frame while another incomplete already buffered. Dropping the old one.\n", conn);
+ free(gIncomingPieces[i].buf);
+ gIncomingPieces[i].conn = 0;
+ break;
+ }
+ }
+ if(i == L2CAP_MAX_PIECED_MESSAGES) for(i = 0; i < L2CAP_MAX_PIECED_MESSAGES && gIncomingPieces[i].conn; i++);
+ if(i == L2CAP_MAX_PIECED_MESSAGES){
+
+ dbgPrintf("L2CAP: not enough buffer slots to buffer incomplete frame. Dropping\n");
+ }
+ else{
+
+ uint8_t* ptr = malloc(size);
+ if(!ptr){
+
+ dbgPrintf("L2CAP: cannot allocate partial frame buffer. Dropping\n");
+ return;
+ }
+ memcpy(ptr, data, size);
+ gIncomingPieces[i].buf = ptr;
+ gIncomingPieces[i].lenGot = size;
+ gIncomingPieces[i].lenNeed = len - size;
+ gIncomingPieces[i].chan = chan;
+ gIncomingPieces[i].conn = conn;
+ }
+ return;
+ }
+ }
+ else{
+
+ uint8_t* ptr;
+
+ for(i = 0; i < L2CAP_MAX_PIECED_MESSAGES && gIncomingPieces[i].conn != conn; i++);
+ if(i == L2CAP_MAX_PIECED_MESSAGES){
+ dbgPrintf("L2CAP: unexpected 'non-first' frame for conn %u. Dropping.\n", conn);
+ return;
+ }
+
+ if(size > gIncomingPieces[i].lenNeed){
+
+ dbgPrintf("L2CAP: 'non-first' frame too large. Need %u bytes, got %u. Dropping.\n", gIncomingPieces[i].lenNeed, size);
+ return;
+ }
+
+ ptr = realloc(gIncomingPieces[i].buf, gIncomingPieces[i].lenGot + size);
+ if(!ptr){
+
+ dbgPrintf("L2CAP: failed to resize buffer for partial frame receive. Droping\n");
+ free(gIncomingPieces[i].buf);
+ gIncomingPieces[i].conn = 0;
+ return;
+ }
+
+ memcpy(ptr + gIncomingPieces[i].lenGot, data, size);
+ gIncomingPieces[i].buf = ptr;
+ gIncomingPieces[i].lenGot += size;
+ gIncomingPieces[i].lenNeed -= size;
+
+ if(gIncomingPieces[i].lenNeed) return; //data still not complete
+
+ gIncomingPieces[i].conn = 0;
+ chan = gIncomingPieces[i].chan;
+ len = gIncomingPieces[i].lenGot;
+ data = ptr;
+ freeIt = 1;
+ }
+
+ if(chan == 0) dbgPrintf("L2CAP: data on connection %u.0\n", conn);
+ else if(chan == 1) l2capHandleControlChannel(conn, data, len);
+ else if(chan == 2){ //connectionless
+
+ uint16_t PSM = getLE16(data + 0);
+ data += 2;
+ len -= 2;
+
+ Service* s = services;
+
+ while(s && s->PSM != PSM) s = s->next;
+ if(!s || !(s->descr.flags & L2CAP_FLAG_SUPPORT_CONNECTIONLESS)) dbgPrintf("L2CAP: connectionless data on %u.2 for unknown PSM 0x%04X\n", conn, PSM);
+ else s->descr.serviceRx(NULL, data, len);
+ }
+ else{ //conection-oriented
+
+ Connection* c = l2capFindConnection(conn, chan, NULL);
+ if(!c) dbgPrintf("L2CAP: data for nonexistent connection %u.%u\n", conn, chan);
+ else c->service->descr.serviceRx(c->serviceInstance, data, len);
+ }
+
+ if(freeIt) free(data);
+}
+
+void l2capAclLinkUp(uint16_t conn){
+
+ //nothing here [yet?]
+}
+
+void l2capAclLinkDown(uint16_t conn){
+
+ Connection *p, *c;
+ unsigned i;
+
+ do{
+
+ p = NULL;
+ c = connections;
+
+ while(c && c->conn != conn){
+
+ p = c;
+ c = c->next;
+ }
+
+ if(c) l2capConnectionCloseEx(c, p, 0);
+
+ }while(c);
+
+ for(i = 0; i < L2CAP_MAX_PIECED_MESSAGES; i++) if(gIncomingPieces[i].conn == conn){
+
+ free(gIncomingPieces[i].buf);
+ gIncomingPieces[i].conn = 0;
+ }
+}
+
diff --git a/MakefileBasedBuild/app/btL2CAP.h b/MakefileBasedBuild/app/btL2CAP.h
new file mode 100644
index 0000000..de426b0
--- /dev/null
+++ b/MakefileBasedBuild/app/btL2CAP.h
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef _BT_L2CAP_H_
+#define _BT_L2CAP_H_
+
+#include <stdint.h>
+
+#define L2CAP_FLAG_SUPPORT_CONNECTIONS 1
+#define L2CAP_FLAG_SUPPORT_CONNECTIONLESS 2
+
+#define L2CAP_CHAN_CONNECTIONLESS 2 //pass to capServiceTx as needed
+
+
+#define L2CAP_PSM_SDP 0x0001
+#define L2CAP_PSM_RFCOMM 0x0003
+#define L2CAP_PSM_AVDTP 0x0019
+
+
+#define L2CAP_MAX_PIECED_MESSAGES 4 //most broken messages we support *at once*
+
+typedef struct{
+
+ uint8_t flags;
+
+ void* (*serviceInstanceAllocate)(uint16_t conn, uint16_t chan, uint16_t remChan);
+ void (*serviceInstanceFree)(void* service);
+
+ void (*serviceRx)(void* service, const uint8_t* data, uint16_t size);
+
+}L2capService;
+
+#ifdef ADK_INTERNAL
+
+#include "sgBuf.h"
+
+//API for services
+void l2capServiceTx(uint16_t conn, uint16_t remChan, sg_buf* data);
+void l2capServiceCloseConn(uint16_t conn, uint16_t chan);
+
+//API for service management
+char l2capServiceRegister(uint16_t PSM, const L2capService* svcData);
+char l2capServiceUnregister(uint16_t PSM);
+
+
+//API for ACL
+void l2capAclLinkUp(uint16_t conn);
+void l2capAclLinkDataRx(uint16_t conn, char first, const uint8_t* data, uint16_t size);
+void l2capAclLinkDown(uint16_t conn);
+
+
+#endif
+#endif
diff --git a/MakefileBasedBuild/app/btRFCOMM.c b/MakefileBasedBuild/app/btRFCOMM.c
new file mode 100644
index 0000000..de152db
--- /dev/null
+++ b/MakefileBasedBuild/app/btRFCOMM.c
@@ -0,0 +1,507 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#define ADK_INTERNAL
+#include "fwk.h"
+#include "btRFCOMM.h"
+#include "BT.h"
+#include "dbg.h"
+#include "btL2CAP.h"
+#include "coop.h"
+
+//NOTE: to be good citizens, we really should verify incoming CRC. We have better things to do...sorry...
+//Plus, they do not provide safety for the data since data is not checksummed.
+//We are, however, forced to produce good CRCs.
+
+#define UGLY_SCARY_DEBUGGING_CODE 0
+
+#define BT_RFCOMM_DLCI_MSK_EA 0x01
+#define BT_RFCOMM_DLCI_MSK_CR 0x02
+#define BT_RFCOMM_DLCI_MSK_D 0x04
+#define BT_RFCOMM_DLCI_SHIFT 2
+
+#define BT_SZ_MASK_OVER 0x01
+
+#define BT_RFCOMM_CMD_DM 0x0F
+#define BT_RFCOMM_CMD_SABM 0x3F
+#define BT_RFCOMM_CMD_DISC 0x53
+#define BT_RFCOMM_CMD_UA 0x73
+#define BT_RFCOMM_CMD_UIH 0xEF
+#define BT_RFCOMM_CMD_UIH_CRED 0xFF
+
+//_C = command _R = resp
+#define BT_RFCOMM_NSC_R 0x11
+#define BT_RFCOMM_TEST_R 0x21
+#define BT_RFCOMM_TEST_C 0x23
+#define BT_RFCOMM_RLS_R 0x51
+#define BT_RFCOMM_RLS_C 0x53
+#define BT_RFCOMM_FCOFF_R 0x61
+#define BT_RFCOMM_FCOFF_C 0x63
+#define BT_RFCOMM_PN_R 0x81
+#define BT_RFCOMM_PN_C 0x83
+#define BT_RFCOMM_RPN_R 0x91
+#define BT_RFCOMM_RPN_C 0x93
+#define BT_RFCOMM_FCON_R 0xA1
+#define BT_RFCOMM_FCON_C 0xA3
+#define BT_RFCOMM_CLD_C 0xC3
+#define BT_RFCOMM_MSC_R 0xE1
+#define BT_RFCOMM_MSC_C 0xE3
+
+
+#define BT_RFCOMM_REMOTE_CREDS 4
+#define BT_RFCOMM_MAX_CRED_DEBT (BT_RFCOMM_REMOTE_CREDS - 1)
+
+typedef struct{
+
+ uint8_t addr;
+ uint8_t control;
+ uint8_t length; //we do not support 2-byte length
+ uint8_t data[]; //and one byte CRC (FCS)
+}RfcommPacket;
+
+typedef struct{
+
+ BtRfcommPortOpenF oF;
+ BtRfcommPortCloseF cF;
+ BtRfcommPortRxF rF;
+
+}RfcommPort;
+
+static RfcommPort gPortHandlers[NUM_DLCIs] = {{0,}, };
+
+static uint64_t reserved = 0xC000000000000003; //these are always reserved
+
+typedef struct{
+
+ uint16_t aclConn;
+ uint16_t remChan;
+ struct{
+
+ sg_buf* queued;
+ uint16_t MTU;
+ uint8_t credits;
+ uint8_t creditsOwed;
+ char on;
+
+ }ports[NUM_DLCIs];
+
+}RfcommInstanceState;
+
+extern uint8_t btRfcommFcs(uint8_t *data, uint32_t len);
+
+static void btRfcommSend(uint16_t conn, uint16_t remChan, const uint8_t* data, uint16_t sz){
+
+ int i;
+
+ #if UGLY_SCARY_DEBUGGING_CODE
+ dbgPrintf("Sending RFCOMM packet:");
+ for(i = 0; i < sz; i++) dbgPrintf(" %02X", data[i]);
+ dbgPrintf("\n\n");
+ #endif
+
+ sg_buf* buf = sg_alloc();
+ if(!buf) return;
+ if(sg_add_front(buf, data, sz, SG_FLAG_MAKE_A_COPY)){
+
+ l2capServiceTx(conn, remChan, buf);
+ return;
+ }
+ sg_free(buf);
+ free(buf);
+}
+
+static void btRfcommTxData(RfcommInstanceState* state, uint8_t dlci, sg_buf* buf){
+
+ uint8_t data[5] = {(dlci << BT_RFCOMM_DLCI_SHIFT) | BT_RFCOMM_DLCI_MSK_EA, BT_RFCOMM_CMD_UIH};
+ uint32_t dataLen = sg_length(buf);
+ uint8_t hdrLen = 3;
+
+ if(dataLen >= 128){ //need 2 length bytes
+
+ data[2] = dataLen << 1;
+ data[3] = dataLen >> 7;
+ hdrLen++;
+ } else data[2] = (dataLen << 1) | 1;
+
+ if(state->ports[dlci].creditsOwed){ //use the oportunity to send the credits
+
+ data[1] = BT_RFCOMM_CMD_UIH_CRED;
+ data[hdrLen++] = state->ports[dlci].creditsOwed;
+ state->ports[dlci].creditsOwed = 0;
+ }
+
+ if(sg_add_front(buf, data, hdrLen, SG_FLAG_MAKE_A_COPY)){
+
+ data[0] = btRfcommFcs(data, 2);
+
+ if(sg_add_back(buf, data, 1, SG_FLAG_MAKE_A_COPY)){
+
+ l2capServiceTx(state->aclConn, state->remChan, buf);
+ return;
+ }
+ }
+ sg_free(buf);
+ free(buf);
+}
+
+static void rfcommServiceDataRx(void* service, const uint8_t* req, uint16_t reqSz){
+
+ RfcommInstanceState* state = service;
+ const uint16_t conn = state->aclConn;
+ const uint16_t remChan = state->remChan;
+ const RfcommPacket* p = (RfcommPacket*)req; //note that we can do this only because packet has no non-8-bit-members
+ const uint8_t* data = p->data;
+ int i;
+ uint8_t DLCI = p->addr >> BT_RFCOMM_DLCI_SHIFT;
+ uint8_t ctrl = p->control;
+ uint16_t len;
+ uint8_t buf[32];
+
+
+ if(p->length & 1){
+
+ len = p->length >> 1;
+ }
+ else{
+
+ len = *data++;
+ len <<= 7;
+ len |= p->length >> 1;
+ }
+
+ if(ctrl == BT_RFCOMM_CMD_SABM || ctrl == BT_RFCOMM_CMD_DISC){
+
+ buf[ 0] = p->addr;
+ buf[ 1] = BT_RFCOMM_CMD_UA;
+ buf[ 2] = BT_SZ_MASK_OVER;
+ buf[ 3] = btRfcommFcs(buf, 3);
+ btRfcommSend(conn, remChan, buf, 4);
+
+ if(state->ports[DLCI].queued){
+
+ sg_free(state->ports[DLCI].queued);
+ free(state->ports[DLCI].queued);
+ }
+
+ state->ports[DLCI].creditsOwed = 0;
+ state->ports[DLCI].credits = 0;
+ state->ports[DLCI].queued = NULL;
+
+ if(ctrl == BT_RFCOMM_CMD_SABM){
+
+ if(gPortHandlers[DLCI].oF) gPortHandlers[DLCI].oF(state, DLCI);
+ else if(UGLY_SCARY_DEBUGGING_CODE) dbgPrintf("DLCI %2d opened\n", DLCI);
+ state->ports[DLCI].on = 0;
+ }
+ else{
+
+ if(gPortHandlers[DLCI].cF) gPortHandlers[DLCI].cF(state, DLCI);
+ else if(UGLY_SCARY_DEBUGGING_CODE) dbgPrintf("DLCI %2d closed\n", DLCI);
+ state->ports[DLCI].on = 1;
+ }
+ return;
+ }
+
+ if(ctrl == BT_RFCOMM_CMD_UIH && DLCI){ //we got a msg - send back credits if we already owe the limit, else buffer it
+
+ if(++state->ports[DLCI].creditsOwed == BT_RFCOMM_MAX_CRED_DEBT){
+
+ buf[ 0] = p->addr;
+ buf[ 1] = BT_RFCOMM_CMD_UIH_CRED;
+ buf[ 2] = BT_SZ_MASK_OVER;
+ buf[ 3] = state->ports[DLCI].creditsOwed + 1;
+ buf[ 4] = btRfcommFcs(buf, 2);
+ btRfcommSend(conn, remChan, buf, 5);
+ state->ports[DLCI].creditsOwed = 0;
+ }
+ }
+ if(ctrl == BT_RFCOMM_CMD_UIH_CRED){
+
+ state->ports[DLCI].credits += *data++;
+ ctrl = BT_RFCOMM_CMD_UIH;
+
+ if(state->ports[DLCI].queued && state->ports[DLCI].credits){
+
+ state->ports[DLCI].credits--;
+ btRfcommTxData(state, DLCI, state->ports[DLCI].queued);
+ state->ports[DLCI].queued = NULL;
+ }
+ }
+
+ if(DLCI == 0){ //control channel transaction
+ if(ctrl == BT_RFCOMM_CMD_UIH){ //data recieved
+
+ switch(data[0]){
+
+ case BT_RFCOMM_PN_C:{ //negotiations are for wusses!
+
+ uint8_t targetDLCI = data[2] & 0x3F;
+
+ state->ports[targetDLCI].credits = data[9];
+ state->ports[targetDLCI].MTU = (((uint16_t)data[7]) << 8) | data[6];
+
+ buf[ 0] = BT_RFCOMM_DLCI_MSK_EA;
+ buf[ 1] = BT_RFCOMM_CMD_UIH;
+ buf[ 2] = BT_SZ_MASK_OVER + (10 << 1);
+ buf[ 3] = BT_RFCOMM_PN_R;
+ buf[ 4] = BT_SZ_MASK_OVER + (8 << 1);
+ buf[ 5] = targetDLCI;
+ buf[ 6] = (data[3] == 0xF0) ? 0xE0 : 0x00; //as per spec
+ buf[ 7] = data[4]; //copy as per spec
+ buf[ 8] = 0; //0 as per spec
+ buf[ 9] = RFCOMM_MTU & 0xFF; //max_packet_size.lo
+ buf[ 10] = RFCOMM_MTU >> 8; //max_packet_size.hi
+ buf[ 11] = 0; //0 retransmissions
+ buf[ 12] = BT_RFCOMM_REMOTE_CREDS; //initial credits
+ buf[ 13] = btRfcommFcs(buf, 2);
+ btRfcommSend(conn, remChan, buf, 14);
+ break;
+ }
+
+ case BT_RFCOMM_RPN_C: //we need to echo back the negotiation
+ case BT_RFCOMM_MSC_C:{ //we need to echo back the control signals
+
+ if(len > 127) dbgPrintf("Control packet way too big\n");
+ else{
+
+ buf[ 0] = BT_RFCOMM_DLCI_MSK_EA;
+ buf[ 1] = BT_RFCOMM_CMD_UIH;
+ buf[ 2] = p->length;
+ buf[ 3] = (data[0] == BT_RFCOMM_MSC_C) ? BT_RFCOMM_MSC_R : BT_RFCOMM_RPN_C;
+ buf[ 4] = data[1];
+ for(i = 0; i < data[1] >> 1; i++) buf[ 5 + i] = data[2 + i];
+ buf[ 5 + i] = btRfcommFcs(buf, 2);
+ btRfcommSend(conn, remChan, buf, 6 + i);
+
+ if(data[0] == BT_RFCOMM_MSC_C){
+ //now we send our own signals (coincidentally they are identical ;-)
+ buf[ 3] = BT_RFCOMM_MSC_C;
+ btRfcommSend(conn, remChan, buf, 6 + i);
+ }
+ }
+ break;
+ }
+
+ case BT_RFCOMM_RPN_R:
+ case BT_RFCOMM_MSC_R:{
+
+ //nothing to do about this :)
+ break;
+ }
+
+ default:
+
+ dbgPrintf("Recieved unhandled RFCOMM packet:");
+ for(i = 0; i < reqSz; i++) dbgPrintf(" %02X", req[i]);
+ dbgPrintf("\n\n");
+ break;
+ }
+ }
+ }
+ else if(ctrl == BT_RFCOMM_CMD_UIH){
+
+ if(len){
+
+ if(gPortHandlers[DLCI].rF) gPortHandlers[DLCI].rF(state, DLCI, data, len);
+ else if(UGLY_SCARY_DEBUGGING_CODE){
+
+ dbgPrintf("RFCOMM DLCI %d data:", p->addr >> 2);
+ for(i = 0; i < len; i++) dbgPrintf(" %02X", data[i]);
+ dbgPrintf("\n\n\n");
+ }
+ }
+ }
+ else{
+
+ dbgPrintf("Recieved unhandled RFCOMM cmd (dlci=%d):", DLCI);
+ for(i = 0; i < reqSz; i++) dbgPrintf(" %02X", req[i]);
+ dbgPrintf("\n\n");
+ }
+}
+
+static void* rfcommServiceAlloc(uint16_t conn, uint16_t chan, uint16_t remChan){
+
+ RfcommInstanceState* state = malloc(sizeof(RfcommInstanceState));
+ int i;
+
+ if(!state) return NULL;
+
+ state->aclConn = conn;
+ state->remChan = remChan;
+
+ for(i = 0; i < NUM_DLCIs; i++){
+
+ state->ports[i].creditsOwed = 0;
+ state->ports[i].credits = 0;
+ state->ports[i].on = 0;
+ state->ports[i].queued = 0;
+ }
+
+ return state;
+}
+
+static void rfcommServiceFree(void* service){
+
+ free(service);
+}
+
+void btRfcommRegisterL2capService(){
+
+ const L2capService rfcom = {L2CAP_FLAG_SUPPORT_CONNECTIONS, rfcommServiceAlloc, rfcommServiceFree, rfcommServiceDataRx};
+ if(!l2capServiceRegister(L2CAP_PSM_RFCOMM, &rfcom)) dbgPrintf("SDP L2CAP registration failed\n");
+}
+
+void btRfcommRegisterPort(uint8_t dlci, BtRfcommPortOpenF oF, BtRfcommPortCloseF cF, BtRfcommPortRxF rF){
+
+ if(dlci >= NUM_DLCIs) return; //no such DLCI;
+
+ gPortHandlers[dlci].oF = oF;
+ gPortHandlers[dlci].cF = cF;
+ gPortHandlers[dlci].rF = rF;
+}
+
+void btRfcommPortTx(void* port, uint8_t dlci, const uint8_t* data, uint16_t size){
+
+ RfcommInstanceState* state = port;
+
+ if(dlci >= NUM_DLCIs || dlci == 0) return; //cannot send there, buddy...
+
+ sg_buf* buf = sg_alloc();
+ if(!buf) return;
+
+ if(!sg_add_front(buf, data, size, SG_FLAG_MAKE_A_COPY)){
+
+ sg_free(buf);
+ free(buf);
+ }
+ else{
+
+ if(state->ports[dlci].credits){ //send immediately
+
+ state->ports[dlci].credits--;
+ btRfcommTxData(state, dlci, buf);
+ }
+ else{ //enqueue it
+
+ if(state->ports[dlci].queued){
+
+ while(state->ports[dlci].queued && state->ports[dlci].on) coopYield();
+ if(!state->ports[dlci].on) return; //port closed - packet dropped
+ }
+ state->ports[dlci].queued = buf;
+ }
+ }
+}
+
+#define RFCOMM_DLCI_PREFERENCE_NONE 0x80 //use this param to the below
+#define RFCOMM_DLCI_NEED_EVEN 0x81
+#define RFCOMM_DLCI_NEED_ODD 0x82
+
+uint8_t btRfcommReserveDlci(uint8_t preference){
+
+ uint8_t start = 0, end = 64, step = 2;
+
+ if(preference == RFCOMM_DLCI_PREFERENCE_NONE) step = 1;
+ else if(preference == RFCOMM_DLCI_NEED_EVEN);
+ else if(preference == RFCOMM_DLCI_NEED_ODD) start++;
+ else{
+
+ start = preference;
+ end = preference + 1;
+ step = 1;
+ }
+
+ while(start < end && (reserved & (1ULL << ((uint64_t)start)))) start += step;
+
+ if(start >= end) return 0; //we failed
+
+ reserved |= (1ULL << ((uint64_t)start));
+
+ return start;
+}
+
+void btRfcommReleaseDlci(uint8_t dlci){
+
+ reserved &=~ (1ULL << ((uint64_t)dlci));
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+static const uint8_t crctab[256] = {
+ 0x00, 0x91, 0xE3, 0x72, 0x07, 0x96, 0xE4, 0x75,
+ 0x0E, 0x9F, 0xED, 0x7C, 0x09, 0x98, 0xEA, 0x7B,
+ 0x1C, 0x8D, 0xFF, 0x6E, 0x1B, 0x8A, 0xF8, 0x69,
+ 0x12, 0x83, 0xF1, 0x60, 0x15, 0x84, 0xF6, 0x67,
+ 0x38, 0xA9, 0xDB, 0x4A, 0x3F, 0xAE, 0xDC, 0x4D,
+ 0x36, 0xA7, 0xD5, 0x44, 0x31, 0xA0, 0xD2, 0x43,
+ 0x24, 0xB5, 0xC7, 0x56, 0x23, 0xB2, 0xC0, 0x51,
+ 0x2A, 0xBB, 0xC9, 0x58, 0x2D, 0xBC, 0xCE, 0x5F,
+ 0x70, 0xE1, 0x93, 0x02, 0x77, 0xE6, 0x94, 0x05,
+ 0x7E, 0xEF, 0x9D, 0x0C, 0x79, 0xE8, 0x9A, 0x0B,
+ 0x6C, 0xFD, 0x8F, 0x1E, 0x6B, 0xFA, 0x88, 0x19,
+ 0x62, 0xF3, 0x81, 0x10, 0x65, 0xF4, 0x86, 0x17,
+ 0x48, 0xD9, 0xAB, 0x3A, 0x4F, 0xDE, 0xAC, 0x3D,
+ 0x46, 0xD7, 0xA5, 0x34, 0x41, 0xD0, 0xA2, 0x33,
+ 0x54, 0xC5, 0xB7, 0x26, 0x53, 0xC2, 0xB0, 0x21,
+ 0x5A, 0xCB, 0xB9, 0x28, 0x5D, 0xCC, 0xBE, 0x2F,
+ 0xE0, 0x71, 0x03, 0x92, 0xE7, 0x76, 0x04, 0x95,
+ 0xEE, 0x7F, 0x0D, 0x9C, 0xE9, 0x78, 0x0A, 0x9B,
+ 0xFC, 0x6D, 0x1F, 0x8E, 0xFB, 0x6A, 0x18, 0x89,
+ 0xF2, 0x63, 0x11, 0x80, 0xF5, 0x64, 0x16, 0x87,
+ 0xD8, 0x49, 0x3B, 0xAA, 0xDF, 0x4E, 0x3C, 0xAD,
+ 0xD6, 0x47, 0x35, 0xA4, 0xD1, 0x40, 0x32, 0xA3,
+ 0xC4, 0x55, 0x27, 0xB6, 0xC3, 0x52, 0x20, 0xB1,
+ 0xCA, 0x5B, 0x29, 0xB8, 0xCD, 0x5C, 0x2E, 0xBF,
+ 0x90, 0x01, 0x73, 0xE2, 0x97, 0x06, 0x74, 0xE5,
+ 0x9E, 0x0F, 0x7D, 0xEC, 0x99, 0x08, 0x7A, 0xEB,
+ 0x8C, 0x1D, 0x6F, 0xFE, 0x8B, 0x1A, 0x68, 0xF9,
+ 0x82, 0x13, 0x61, 0xF0, 0x85, 0x14, 0x66, 0xF7,
+ 0xA8, 0x39, 0x4B, 0xDA, 0xAF, 0x3E, 0x4C, 0xDD,
+ 0xA6, 0x37, 0x45, 0xD4, 0xA1, 0x30, 0x42, 0xD3,
+ 0xB4, 0x25, 0x57, 0xC6, 0xB3, 0x22, 0x50, 0xC1,
+ 0xBA, 0x2B, 0x59, 0xC8, 0xBD, 0x2C, 0x5E, 0xCF
+};
+
+uint8_t btRfcommFcs(uint8_t *data, uint32_t len){ //calculate fcs value for RFCOMM
+
+ uint32_t i;
+ uint8_t crcval = 0xFF;
+
+ for (i = 0; i < len; i++) crcval = crctab[crcval ^ (*data++)];
+
+ return 0xFF - crcval;
+}
diff --git a/MakefileBasedBuild/app/btRFCOMM.h b/MakefileBasedBuild/app/btRFCOMM.h
new file mode 100644
index 0000000..fe9abeb
--- /dev/null
+++ b/MakefileBasedBuild/app/btRFCOMM.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef _BT_RFCOMM_H_
+#define _BT_RFCOMM_H_
+
+#include <stdint.h>
+
+#define NUM_DLCIs 62
+#define RFCOMM_MTU 511
+#define RFCOMM_DLCI_PREFERENCE_NONE 0x80 //use this param to the below
+#define RFCOMM_DLCI_NEED_EVEN 0x81
+#define RFCOMM_DLCI_NEED_ODD 0x82
+
+typedef void (*BtRfcommPortOpenF)(void* port, uint8_t dlci);
+typedef void (*BtRfcommPortCloseF)(void* port, uint8_t dlci);
+typedef void (*BtRfcommPortRxF)(void* port, uint8_t dlci, const uint8_t* buf, uint16_t sz);
+
+
+#ifdef ADK_INTERNAL
+
+#include "BT.h"
+
+
+void btRfcommRegisterPort(uint8_t dlci, BtRfcommPortOpenF oF, BtRfcommPortCloseF cF, BtRfcommPortRxF rF);
+void btRfcommPortTx(void* port, uint8_t dlci, const uint8_t* data, uint16_t size); //makes a copy of your buffer
+
+
+uint8_t btRfcommReserveDlci(uint8_t preference); //return dlci if success, zero if fail
+void btRfcommReleaseDlci(uint8_t dlci);
+
+
+void btRfcommRegisterL2capService(void);
+
+
+#endif
+#endif
+
diff --git a/MakefileBasedBuild/app/btSDP.c b/MakefileBasedBuild/app/btSDP.c
new file mode 100644
index 0000000..1362439
--- /dev/null
+++ b/MakefileBasedBuild/app/btSDP.c
@@ -0,0 +1,747 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#define ADK_INTERNAL
+#include "fwk.h"
+#include "btSDP.h"
+#include <string.h>
+#include "sgBuf.h"
+#include "btL2CAP.h"
+#include "dbg.h"
+
+
+#define SDP_PDU_Error_Response 1
+#define SDP_PDU_Service_Search_Request 2
+#define SDP_PDU_Service_Search_Response 3
+#define SDP_PDU_Service_Attribute_Request 4
+#define SDP_PDU_Service_Attribute_Response 5
+#define SDP_PDU_Service_Search_Attribute_Request 6
+#define SDP_PDU_Service_Search_Attribute_Response 7
+
+#define SDP_ERR_Invalid_SDP_Version 0x0001
+#define SDP_ERR_Invalid_Service_Record_Handle 0x0002
+#define SDP_ERR_Invalid_Request_Syntax 0x0003
+#define SDP_ERR_Invalid_PDU_Size 0x0004
+#define SDP_ERR_Invalid_Continuation_State 0x0005
+#define SDP_ERR_Insufficient_Resources 0x0006
+
+
+typedef struct{
+
+ uint64_t hi, lo;
+
+}uuid;
+
+#define MAX_UUIDS_IN_SEARCH 12 //as per spec
+#define MAX_ATTRS_IN_SEARCH_STRING 8 //as per my opinion
+#define MAX_SEARCH_RESULTS 16 //no more than this will ever be returned
+
+typedef struct SdpService{
+
+ struct SdpService* next;
+
+ uint32_t handle;
+ const uint8_t* descriptor;
+ uint16_t descrLen;
+
+}SdpService;
+
+typedef struct{
+
+ uint16_t aclConn;
+ uint16_t remChan;
+
+ uint32_t contDescr; //which continuation descriptor we expect
+ uint8_t* result;
+ uint32_t resultSz;
+ uint16_t numMatches; //for servicesearch
+
+}SdpInstance;
+
+
+static SdpService* knownServices = NULL;
+static uint32_t sdpContVal = 0x12345678;
+static uint32_t sdpNextHandle = 0;
+
+static const uint8_t sdpDescrSdp[] =
+{
+ //define the SDP service itself
+ //service class ID list
+ SDP_ITEM_DESC(SDP_TYPE_UINT, SDP_SZ_2), 0x00, 0x01, SDP_ITEM_DESC(SDP_TYPE_ARRAY, SDP_SZ_u8), 3,
+ SDP_ITEM_DESC(SDP_TYPE_UUID, SDP_SZ_2), 0x10, 0x00, // ServiceDiscoveryServerServiceClassID
+ //ProtocolDescriptorList
+ SDP_ITEM_DESC(SDP_TYPE_UINT, SDP_SZ_2), 0x00, 0x04, SDP_ITEM_DESC(SDP_TYPE_ARRAY, SDP_SZ_u8), 8,
+ SDP_ITEM_DESC(SDP_TYPE_ARRAY, SDP_SZ_u8), 6,
+ SDP_ITEM_DESC(SDP_TYPE_UUID, SDP_SZ_2), 0x01, 0x00, // L2CAP
+ SDP_ITEM_DESC(SDP_TYPE_UINT, SDP_SZ_2), L2CAP_PSM_SDP >> 8, L2CAP_PSM_SDP & 0xFF, // L2CAP PSM
+
+ //browse group list
+ SDP_ITEM_DESC(SDP_TYPE_UINT, SDP_SZ_2), 0x00, 0x05, SDP_ITEM_DESC(SDP_TYPE_ARRAY, SDP_SZ_u8), 3,
+ SDP_ITEM_DESC(SDP_TYPE_UUID, SDP_SZ_2), 0x10, 0x02, // Public Browse Group
+
+ //magic data #1
+ SDP_ITEM_DESC(SDP_TYPE_UINT, SDP_SZ_2), 0xDD, 0xDD, SDP_ITEM_DESC(SDP_TYPE_TEXT, SDP_SZ_u8), 19, 0x53, 0x57, 0x3A, 0x20, 0x44, 0x6D, 0x69, 0x74, 0x72, 0x79, 0x20, 0x47, 0x72, 0x69, 0x6e, 0x62, 0x65, 0x72, 0x67,
+ //magic data #2
+ SDP_ITEM_DESC(SDP_TYPE_UINT, SDP_SZ_2), 0xDD, 0xDE, SDP_ITEM_DESC(SDP_TYPE_TEXT, SDP_SZ_u8), 19, 0x48, 0x57, 0x3A, 0x20, 0x45, 0x72, 0x69, 0x63, 0x20, 0x53, 0x63, 0x68, 0x6c, 0x61, 0x65, 0x70, 0x66, 0x65, 0x72
+};
+
+static const uuid bt_base_uuid = {0x0000000000001000ULL, 0x800000805F9B34FBULL};
+
+static void sdpIntToUUID(uuid* dst, uint32_t val){
+
+ *dst = bt_base_uuid;
+ dst->hi += ((uint64_t)val) << 32;
+}
+
+static char sdpUuidEqual(const uuid* a, const uuid* b){
+
+ return a->lo == b->lo && a->hi == b->hi;
+}
+
+static uint32_t btSdpGetElemSz(const uint8_t** descr){
+
+ const uint8_t* ptr = *descr;
+ uint8_t item = *ptr++;
+ uint32_t sz = 0;
+
+ if((item >> 3) != SDP_TYPE_NIL){
+
+ switch(item & 7){
+
+ case SDP_SZ_1:
+ case SDP_SZ_2:
+ case SDP_SZ_4:
+ case SDP_SZ_8:
+ case SDP_SZ_16:
+
+ sz = 1 << (item & 7);
+ break;
+
+ case SDP_SZ_u8:
+
+ sz = *ptr++;
+ break;
+
+ case SDP_SZ_u16:
+
+ sz = ptr[0];
+ sz = (sz << 8) | ptr[1];
+ ptr += 2;
+ break;
+
+ case SDP_SZ_u32:
+
+ sz = ptr[0];
+ sz = (sz << 8) | ptr[1];
+ sz = (sz << 8) | ptr[2];
+ sz = (sz << 8) | ptr[3];
+ ptr += 4;
+ break;
+ }
+ }
+ *descr = ptr;
+ return sz;
+}
+
+static uint8_t btSdpGetUUID(const uint8_t** descr, uuid* dst){ //return num bytes consumed
+
+ uint32_t sz, i;
+ const uint8_t* orig = *descr;
+
+ if(((**descr) >> 3) != SDP_TYPE_UUID) return 0; //not valid UUID type
+ sz = btSdpGetElemSz(descr);
+
+ switch(sz){
+
+ case 2:
+
+ sdpIntToUUID(dst, (((uint32_t)((*descr)[0])) << 8) | ((*descr)[1]));
+ break;
+
+ case 4:
+
+ sdpIntToUUID(dst, (((uint32_t)((*descr)[0])) << 24) | (((uint32_t)((*descr)[1])) << 16) | (((uint32_t)((*descr)[2])) << 8) | ((*descr)[3]));
+ break;
+
+ case 16:
+
+ dst->lo = 0;
+ dst->hi = 0;
+
+ for(i = 0; i < 8; i++){
+
+ dst->lo = (dst->lo << 8) | (*descr)[i];
+ dst->hi = (dst->lo << 8) | (*descr)[i + 8];
+ }
+ break;
+
+ default:
+
+ return 0;
+ }
+ *descr += sz;
+
+ return (*descr) - orig;
+}
+
+static void btStdRecursiveWalk(void* itemList, uint8_t* listSzP, sg_buf** walkResultP, const uint8_t** ptr, uint32_t len){
+
+ uint32_t sz;
+ uint8_t typ, numWantedIDs;
+ const uint8_t* end = (*ptr) + len;
+ uuid id;
+ sg_buf* result = NULL;
+ char isID = 1, skipNext = 0;
+ uuid* wantedIDs;
+ uint8_t* numWantedIDsP;
+ uint32_t* wantedRanges;
+ uint8_t wantedRangesListSz;
+
+
+ if(walkResultP){ //copy-traversal
+
+ result = sg_alloc();
+ if(!result) return;
+
+ wantedIDs = NULL;
+ numWantedIDsP = NULL;
+ wantedRanges = itemList;
+ wantedRangesListSz = *listSzP;
+ }
+ else{ //search for UUIDs
+
+ wantedIDs = itemList;
+ numWantedIDsP = listSzP;
+ numWantedIDs = *numWantedIDsP;
+ wantedRanges = NULL;
+ wantedRangesListSz = 0;
+ }
+
+ while((*ptr) < end){
+
+ typ = (**ptr) >> 3;
+
+ if(wantedIDs && typ == SDP_TYPE_UUID){
+
+ sz = btSdpGetUUID(ptr, &id);
+ if(end < (*ptr)){
+
+ dbgPrintf("SDP: UUID size > allowed size (%d, %d)\n", sz, end - (*ptr));
+ goto out;
+ }
+
+ for(sz = 0; sz < numWantedIDs; sz++){
+
+ if(sdpUuidEqual(wantedIDs + sz, &id)){
+
+ wantedIDs[sz] = wantedIDs[numWantedIDs - 1];
+ numWantedIDs--;
+ sz--;
+ }
+ }
+ }
+ else{
+
+ const uint8_t* itemStart = *ptr;
+
+ sz = btSdpGetElemSz(ptr);
+
+ if(sz > (unsigned)(end - (*ptr))){
+
+ dbgPrintf("SDP: element size > allowed size (%d, %d)\n", sz, end - (*ptr));
+ goto out;
+ }
+
+ if(typ == SDP_TYPE_ARRAY || typ == SDP_TYPE_OR_LIST){
+
+ btStdRecursiveWalk(wantedIDs, &numWantedIDs, NULL, ptr, sz);
+ }
+ else{
+
+ (*ptr) += sz;
+ }
+ if(walkResultP){
+
+ if(isID){
+
+ uint16_t attrID;
+ uint8_t i;
+
+ if(sz != 2) dbgPrintf("SDP: attrib ID not 16 bits!\n");
+
+ attrID = (*ptr)[-2];
+ attrID = (attrID << 8) | (*ptr)[-1];
+
+ skipNext = 2;
+ for(i = 0; i < wantedRangesListSz && skipNext; i++){
+
+ if(attrID >= (wantedRanges[i] >> 16) && attrID <= (wantedRanges[i] & 0xFFFF)) skipNext = 0; //in range
+ }
+ }
+ isID ^= 1;
+
+ if(skipNext){
+
+ skipNext--;
+ }
+ else{
+
+ if(!sg_add_back(result, itemStart, (*ptr) - itemStart, SG_FLAG_MAKE_A_COPY)){
+
+ sg_free(result);
+ return;
+ }
+ }
+ }
+ }
+ }
+
+out:
+ if(walkResultP) *walkResultP = result;
+ if(numWantedIDsP) *numWantedIDsP = numWantedIDs;
+}
+
+static char btSdpPutIntoGroup(sg_buf* buf){
+
+ uint8_t i, sizeFieldSz, sizeFieldName;
+ uint32_t sz = sg_length(buf);
+ uint8_t res[5];
+
+ //figure out needed header size field
+ if(sz < 0x100){
+
+ sizeFieldSz = 1;
+ sizeFieldName = SDP_SZ_u8;
+ sz <<= 24;
+ }
+ else if(sz < 0x10000){
+
+ sizeFieldSz = 2;
+ sizeFieldName = SDP_SZ_u16;
+ sz <<= 16;
+ }
+ else{
+
+ sizeFieldSz = 4;
+ sizeFieldName = SDP_SZ_u32;
+ }
+
+ //add the header
+ res[0] = SDP_ITEM_DESC(SDP_TYPE_ARRAY, sizeFieldName);
+ for(i = 0; i < sizeFieldSz; i++, sz <<= 8) res[1 + i] = sz >> 24;
+ return sg_add_front(buf, res, 1 + sizeFieldSz, SG_FLAG_MAKE_A_COPY);
+}
+
+static sg_buf* btSdpError(const uint8_t* trans, uint16_t errNum){
+
+ sg_buf* buf;
+ uint8_t data[] = {SDP_PDU_Error_Response, trans[0], trans[1], errNum >> 8, errNum, 0, 0};
+
+ buf = sg_alloc();
+ if(buf){
+
+ if(!sg_add_front(buf, data, sizeof(data), SG_FLAG_MAKE_A_COPY)){
+
+ sg_free(buf);
+ buf = NULL;
+ }
+ }
+ return NULL;
+}
+
+static sg_buf* btSdpProcessRequest(SdpInstance* inst, const uint8_t* req, uint16_t reqSz){
+ uint8_t trans[2] ,cmd, contStateSz, numIDs = 0, numAttrs = 0;
+ uint32_t maxReplSz = 0, wantedHandle = 0, sz;
+ uint32_t attrs[MAX_ATTRS_IN_SEARCH_STRING];
+ SdpService* results[MAX_SEARCH_RESULTS];
+ uuid ids[MAX_UUIDS_IN_SEARCH];
+ const uint8_t* end;
+ sg_buf* result;
+ unsigned i, j;
+
+ cmd = *req++;
+ trans[0] = *req++;
+ trans[1] = *req++;
+
+ reqSz -= 5;
+ if(reqSz != (((uint16_t)req[0]) << 8) + req[1]) return btSdpError(trans, SDP_ERR_Invalid_PDU_Size);
+ req += 2;
+
+ //dbgPrintf("SDP request cmd %d (session %02X%02X) with %d bytes of data\n", cmd, trans[0], trans[1], reqSz);
+
+ if(cmd == SDP_PDU_Service_Search_Request || cmd == SDP_PDU_Service_Search_Attribute_Request){
+
+ if((*req) >> 3 != SDP_TYPE_ARRAY) return btSdpError(trans, SDP_ERR_Invalid_Request_Syntax);
+ sz = btSdpGetElemSz(&req);
+ end = req + sz;
+
+ while(req < end){
+
+ if(numIDs == MAX_UUIDS_IN_SEARCH) return btSdpError(trans, SDP_ERR_Invalid_Request_Syntax); //too many requests
+ if(!btSdpGetUUID(&req, &ids[numIDs++])) return btSdpError(trans, SDP_ERR_Invalid_Request_Syntax); //malformed UUID
+ }
+ }
+ else if(cmd == SDP_PDU_Service_Attribute_Request){
+
+ for(i = 0; i < 4; i++) wantedHandle = (wantedHandle << 8) | *req++;
+ }
+ else{
+
+ dbgPrintf("SDP: invalid request: %d\n", cmd);
+ return btSdpError(trans, SDP_ERR_Invalid_Request_Syntax);
+ }
+
+ for(i = 0; i < 2; i++) maxReplSz = (maxReplSz << 8) | *req++;
+
+ if(cmd == SDP_PDU_Service_Attribute_Request || cmd == SDP_PDU_Service_Search_Attribute_Request){
+
+ if((*req) >> 3 != SDP_TYPE_ARRAY) return btSdpError(trans, SDP_ERR_Invalid_Request_Syntax);
+ sz = btSdpGetElemSz(&req);
+ end = req + sz;
+
+ while(req < end){
+
+ if(numAttrs == MAX_UUIDS_IN_SEARCH) return btSdpError(trans, SDP_ERR_Insufficient_Resources); //too many -> unsupported request -> fail
+ sz = btSdpGetElemSz(&req);
+ if(sz == 2){
+
+ sz = 0;
+ for(i =0; i < 2; i++) sz = (sz << 8) | *req++;
+ sz |= sz << 16;
+ }
+ else if(sz == 4){
+
+ sz = 0;
+ for(i =0; i < 4; i++) sz = (sz << 8) | *req++;
+ }
+ else return btSdpError(trans, SDP_ERR_Invalid_Request_Syntax); //fail -> invalid number format
+ attrs[numAttrs++] = sz;
+ }
+ }
+
+ contStateSz = *req++;
+
+ if(contStateSz){ // verify continuation is valid or fail
+ uint32_t contState = 0;
+
+ if(contStateSz != sizeof(uint32_t)) return btSdpError(trans, SDP_ERR_Invalid_Continuation_State);
+ for(i = 0; i < 4; i++) contState = (contState << 8) | *req++;
+
+ if(contState != inst->contDescr || !inst->result){
+
+ dbgPrintf("SDP: invalid continuation state. Wanted %08X, got %08X\n", inst->contDescr, contState);
+ if(inst->result){
+
+ free(inst->result);
+ inst->result = NULL;
+ }
+ return btSdpError(trans, SDP_ERR_Invalid_Continuation_State);
+ }
+ }
+ else{ //perform the actual search
+
+ SdpService* curSvc = knownServices;
+ uint8_t numFound = 0;
+
+ //cleanup first
+ if(inst->result){
+
+ free(inst->result);
+ inst->result = NULL;
+ }
+
+ //perform the search
+ if(cmd == SDP_PDU_Service_Search_Request || cmd == SDP_PDU_Service_Search_Attribute_Request){
+
+ for(curSvc = knownServices; curSvc && numFound < MAX_SEARCH_RESULTS; curSvc = curSvc->next){
+
+ const uint8_t* ptr = curSvc->descriptor;
+ uuid uuids_copy[MAX_UUIDS_IN_SEARCH];
+ uint8_t num;
+
+ for(num = 0; num < numIDs; num++) uuids_copy[num] = ids[num];
+
+ btStdRecursiveWalk(uuids_copy, &num, NULL, &ptr, curSvc->descrLen);
+ if(!num) results[numFound++] = curSvc;
+ }
+ }
+ else if(cmd == SDP_PDU_Service_Attribute_Request){
+
+ for(curSvc = knownServices; curSvc && !numFound; curSvc = curSvc->next){
+
+ if(curSvc->handle == wantedHandle) results[numFound++] = curSvc;
+ }
+ if(!numFound) return btSdpError(trans, SDP_ERR_Invalid_Service_Record_Handle);
+ }
+
+ //gather & prepare results
+ if(cmd == SDP_PDU_Service_Attribute_Request || cmd == SDP_PDU_Service_Search_Attribute_Request){
+
+ //we'll assemble the whole result in this buffer
+ sg_buf* resultSoFar = sg_alloc();
+ if(!resultSoFar) return btSdpError(trans, SDP_ERR_Insufficient_Resources);
+
+ //process each match
+ for(i = 0; i < numFound; i++){
+
+ const uint8_t* ptr = results[i]->descriptor;
+ sg_buf* res;
+
+ //collect wanted attributes
+ btStdRecursiveWalk(attrs, &numAttrs, &res, &ptr, results[i]->descrLen);
+ if(!res) continue;
+
+ //if requested, add the handle attribute
+ for(j = 0; j < numAttrs; j++) if(SDP_ATTR_HANDLE >= (attrs[j] >> 16) && SDP_ATTR_HANDLE <= (attrs[j] & 0xFFFF)) break;
+ if(j != numAttrs){
+ uint8_t buf[8] = {SDP_ITEM_DESC(SDP_TYPE_UINT, SDP_SZ_2), 0x00, 0x00, SDP_ITEM_DESC(SDP_TYPE_UINT, SDP_SZ_4)};
+
+ buf[4] = results[i]->handle >> 24;
+ buf[5] = results[i]->handle >> 16;
+ buf[6] = results[i]->handle >> 8;
+ buf[7] = results[i]->handle;
+
+ if(!sg_add_back(res, buf, sizeof(buf), SG_FLAG_MAKE_A_COPY)){
+
+ sg_free(res);
+ free(res);
+ continue;
+ }
+ }
+
+ //wrap and append to the full results list
+ if(btSdpPutIntoGroup(res)) sg_concat_back(resultSoFar, res);
+ sg_free(res);
+ free(res);
+ }
+
+ //wrap the whole thing if required
+ if((cmd == SDP_PDU_Service_Search_Attribute_Request) && !btSdpPutIntoGroup(resultSoFar)){
+ dbgPrintf("SDP: Failed to put results into a group\n");
+ sg_free(resultSoFar);
+ free(resultSoFar);
+ return btSdpError(trans, SDP_ERR_Insufficient_Resources);
+ }
+
+ //flatten to a buffer
+ uint8_t* buf = malloc(sg_length(resultSoFar));
+ if(!buf){
+
+ dbgPrintf("SDP: Failed to allocate flattened result array (%ub)\n", sg_length(resultSoFar));
+ sg_free(resultSoFar);
+ free(resultSoFar);
+ return btSdpError(trans, SDP_ERR_Insufficient_Resources);
+ }
+ inst->resultSz = sg_length(resultSoFar);
+ inst->result = buf;
+ inst->contDescr = sdpContVal;
+ sg_copyto(resultSoFar, buf);
+ sg_free(resultSoFar);
+ free(resultSoFar);
+ }
+ else if(cmd == SDP_PDU_Service_Search_Request){
+
+ //allocate the array
+ inst->resultSz = sizeof(uint32_t[numFound]);
+ uint8_t* buf = malloc(inst->resultSz);
+
+ if(!buf){
+
+ dbgPrintf("SDP: Failed to allocate flattened result array (%ub)\n", sizeof(uint32_t[numFound]));
+ return btSdpError(trans, SDP_ERR_Insufficient_Resources);
+ }
+
+ //process each match
+ for(i = 0; i < numFound; i++){
+
+ buf[i * 4 + 0] = results[i]->handle >> 24;
+ buf[i * 4 + 1] = results[i]->handle >> 16;
+ buf[i * 4 + 2] = results[i]->handle >> 8;
+ buf[i * 4 + 3] = results[i]->handle;
+ }
+
+ //put everything in the right place
+ inst->result = buf;
+ inst->contDescr = sdpContVal;
+ inst->numMatches = numFound;
+ }
+ }
+ if(++sdpContVal == 0) sdpContVal = 0x01234567; //update continuation state to the next value
+
+ //produce the packet to send
+ uint8_t bufPrepend[9], bufPostpend[5] = {0, }, preSz = 5, postSz = 1;
+ uint32_t sendSz = 0;
+ result = sg_alloc();
+ if(!result) return btSdpError(trans, SDP_ERR_Insufficient_Resources);
+
+ if(cmd == SDP_PDU_Service_Attribute_Request || cmd == SDP_PDU_Service_Search_Attribute_Request){
+
+ if(maxReplSz > 256) maxReplSz = 256; //no harm in fragmenting - keep the packets small
+
+ sendSz = inst->resultSz;
+ if(sendSz > maxReplSz) sendSz = maxReplSz;
+
+ bufPrepend[preSz++] = sendSz >> 8;
+ bufPrepend[preSz++] = sendSz & 0xFF;
+ }
+ else if(cmd == SDP_PDU_Service_Search_Request){
+
+ if(maxReplSz > 64) maxReplSz = 64; //no harm in fragmenting - keep the packets small
+
+ sendSz = inst->resultSz;
+ if(sendSz > maxReplSz * sizeof(uint32_t)) sendSz = maxReplSz * sizeof(uint32_t);
+
+ bufPrepend[preSz++] = inst->numMatches >> 8;
+ bufPrepend[preSz++] = inst->numMatches & 0xFF;
+ bufPrepend[preSz++] = (sendSz / sizeof(uint32_t)) >> 8;
+ bufPrepend[preSz++] = (sendSz / sizeof(uint32_t)) & 0xFF;
+ }
+
+ if(!sg_add_back(result, inst->result, sendSz, SG_FLAG_MAKE_A_COPY)){
+
+ dbgPrintf("SDP: Failed to attach reply. Droping");
+ free(inst->result);
+ inst->result = NULL;
+ sg_free(result);
+ free(result);
+ return btSdpError(trans, SDP_ERR_Insufficient_Resources);
+ }
+ else{
+
+ inst->resultSz -= sendSz;
+ if(inst->resultSz){
+
+ memcpy(inst->result, inst->result + sendSz, inst->resultSz);
+ inst->result = realloc(inst->result, inst->resultSz);
+ }
+ else{
+ free(inst->result);
+ inst->result = NULL;
+ }
+ }
+
+ if(inst->result){ //have more
+
+ bufPostpend[0] = 4;
+ for(i = 0; i < 4; i++) bufPostpend[i + 1] = inst->contDescr >> ((3 - i) << 3);
+ postSz = 5;
+ }
+
+ bufPrepend[0] = cmd + 1; //response to this request
+ bufPrepend[1] = trans[0];
+ bufPrepend[2] = trans[1];
+ bufPrepend[3] = (sendSz + preSz + postSz - 5) >> 8;
+ bufPrepend[4] = (sendSz + preSz + postSz - 5) & 0xFF;
+
+ if(sg_add_front(result, bufPrepend, preSz, SG_FLAG_MAKE_A_COPY) && sg_add_back(result, bufPostpend, postSz, SG_FLAG_MAKE_A_COPY)){
+
+ return result;
+ }
+ sg_free(result);
+ free(result);
+ return btSdpError(trans, SDP_ERR_Insufficient_Resources);
+}
+
+static void* sdpServiceAlloc(uint16_t conn, uint16_t chan, uint16_t remChan){
+
+ SdpInstance* inst = malloc(sizeof(SdpInstance));
+ if(inst){
+
+ inst->result = NULL;
+ inst->aclConn = conn;
+ inst->remChan = remChan;
+ }
+ return inst;
+}
+
+static void sdpServiceFree(void* service){
+
+ SdpInstance* inst = (SdpInstance*)service;
+
+ if(inst->result) free(inst->result);
+ free(inst);
+}
+
+static void sdpServiceDataRx(void* service, const uint8_t* data, uint16_t size){
+
+ SdpInstance* inst = (SdpInstance*)service;
+ uint16_t conn = inst->aclConn;
+ uint16_t remChan = inst->remChan;
+
+ sg_buf* reply = btSdpProcessRequest(inst, data, size);
+ if(reply){
+
+/*// -- ugly debugging code --
+ unsigned i;
+ uint8_t buf[256];
+ sg_copyto(reply, buf);
+
+ dbgPrintf("SDP req got (0x%x): ", size);
+ for(i = 0; i < size; i++) dbgPrintf(" %02X", data[i]);
+ dbgPrintf("\n");
+
+ dbgPrintf("SDP reply sent (0x%x): ", sg_length(reply));
+ for(i = 0; i < sg_length(reply); i++) dbgPrintf(" %02X", buf[i]);
+ dbgPrintf("\n");
+*/
+ l2capServiceTx(conn, remChan, reply);
+ }
+}
+
+void btSdpRegisterL2capService(){
+
+ const L2capService sdp = {L2CAP_FLAG_SUPPORT_CONNECTIONS, sdpServiceAlloc, sdpServiceFree, sdpServiceDataRx};
+ if(!l2capServiceRegister(L2CAP_PSM_SDP, &sdp)) dbgPrintf("SDP L2CAP registration failed\n");
+
+ btSdpServiceDescriptorAdd(sdpDescrSdp, sizeof(sdpDescrSdp));
+}
+
+void btSdpServiceDescriptorAdd(const uint8_t* descriptor, uint16_t descrLen){
+
+ SdpService *t, *s = malloc(sizeof(SdpService));
+ if(s){
+
+ s->handle = sdpNextHandle;
+
+ if(sdpNextHandle) sdpNextHandle++;
+ else sdpNextHandle = SDP_FIRST_USER_HANDLE; //first add is special - it adds the SDP service itself
+
+ s->descriptor = descriptor;
+ s->descrLen = descrLen;
+ s->next = NULL;
+
+ t = knownServices; //add at end
+ while(t && t->next) t = t->next;
+ if(t) t->next = s;
+ else knownServices = s;
+ }
+}
+
+void btSdpServiceDescriptorDel(const uint8_t* descriptor){
+
+ SdpService *s = knownServices, *p = NULL;
+
+ while(s && s->descriptor != descriptor){
+
+ p = s;
+ s = s->next;
+ }
+ if(p) p->next = s->next;
+ else knownServices = s->next;
+
+ free(s);
+}
+
+
diff --git a/MakefileBasedBuild/app/btSDP.h b/MakefileBasedBuild/app/btSDP.h
new file mode 100644
index 0000000..15f7dc7
--- /dev/null
+++ b/MakefileBasedBuild/app/btSDP.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef _BT_SDP_H_
+#define _BT_SDP_H_
+
+#include <stdint.h>
+
+//advised reading: https://www.bluetooth.org/Technical/AssignedNumbers/service_discovery.htm
+
+#define SDP_TYPE_NIL 0
+#define SDP_TYPE_UINT 1
+#define SDP_TYPE_SINT 2
+#define SDP_TYPE_UUID 3
+#define SDP_TYPE_TEXT 4
+#define SDP_TYPE_BOOL 5
+#define SDP_TYPE_ARRAY 6 //"data element sequence"
+#define SDP_TYPE_OR_LIST 7 //"data element alternative" - pick one of these
+#define SDP_TYPE_URL 8
+
+#define SDP_SZ_NIL 0
+#define SDP_SZ_1 0
+#define SDP_SZ_2 1
+#define SDP_SZ_4 2
+#define SDP_SZ_8 3
+#define SDP_SZ_16 4
+#define SDP_SZ_u8 5
+#define SDP_SZ_u16 6
+#define SDP_SZ_u32 7
+
+#define SDP_ITEM_DESC(type, sz) (((type << 3) & 0xF8) | (sz & 7))
+
+
+#define SDP_ATTR_HANDLE 0x0000
+#define SDP_ATTR_SVC_CLS_ID_LIST 0x0001
+#define SDP_ATTR_SVC_ID 0x0003
+#define SDP_ATTR_PROTOCOL_DESCR_LIST 0x0004
+#define SDP_ATTR_BROWSE_GRP_LIST 0x0005
+
+#define SDP_FIRST_USER_HANDLE 0x00010000
+
+
+#ifdef ADK_INTERNAL
+
+#include "sgBuf.h"
+
+void btSdpServiceDescriptorAdd(const uint8_t* descriptor, uint16_t descrLen); //a copy will NOT be made
+void btSdpServiceDescriptorDel(const uint8_t* descriptor);
+
+
+void btSdpRegisterL2capService(void);
+
+
+#endif
+#endif
+
+
diff --git a/MakefileBasedBuild/app/capsense.c b/MakefileBasedBuild/app/capsense.c
new file mode 100644
index 0000000..d93f040
--- /dev/null
+++ b/MakefileBasedBuild/app/capsense.c
@@ -0,0 +1,231 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#define ADK_INTERNAL
+#include "fwk.h"
+#include "capsense.h"
+#include "I2C.h"
+#include "dbg.h"
+
+#define I2C_MUX_ADDR 0x70
+#define QT_ADDR 0x1C
+
+#define QT_ID 0x3E
+#define QT_REG_ID 0
+#define QT_REG_SLIDER 5
+#define QT_REG_KEY0 3
+#define QT_REG_KEY1 4
+#define QT_REG_CAL 6
+#define QT_REG_SIG 52
+#define QT_REG_REF 76
+
+#define SLIDER_SENSE_TH 30
+#define ICON_SENSE_TH 18
+#define ICON_SENSE_TH2 19
+#define BUTTON_SENSE_TH 22
+#define BUTTON_SENSE_TH2 15
+#define SLIDER_PS 0x41
+#define ICON_PS 0x42
+#define ICON_PS_NOISY 0x64 /* For extra noisy icon buttons */
+#define BUTTON_PS 0x42
+#define BUTTON_PS_NOISY 0x64
+
+#define AKS_G1 1 << 2 /* Adjacent key suppression groups */
+#define AKS_G2 2 << 2
+#define AKS_G3 3 << 2
+
+const uint8_t capsense1_init_table[45] = { 8, /* Start address = 8 */
+ 1, /* 08 - LP mode = 1 (16ms) */
+ 20, /* 09 - TTD = 20 (3.2s/ref level) */
+ 5, /* 10 - ATD = 5 (0.8s/ref level) */
+ 5, /* 11 - DI = 5 (5 values integrated) */
+ 63, /* 12 - Touch recal = 63 (10s) */
+ 25, /* 13 - Drift hold = 25 (4 seconds) */
+ 0x80, /* 14 - Slider = Enabled, no wheel */
+ 0, /* 15 - Charge time = 0 */
+ SLIDER_SENSE_TH, /* 16 - Detect threshold CH0 */
+ SLIDER_SENSE_TH, /* 17 - Detect threshold CH1 */
+ SLIDER_SENSE_TH, /* 18 - Detect threshold CH2 */
+ ICON_SENSE_TH, /* 19 - Detect threshold CH3 */
+ ICON_SENSE_TH, /* 20 - Detect threshold CH4 */
+ ICON_SENSE_TH, /* 21 - Detect threshold CH5 */
+ ICON_SENSE_TH, /* 22 - Detect threshold CH6 */
+ ICON_SENSE_TH2, /* 23 - Detect threshold CH7 */
+ ICON_SENSE_TH, /* 24 - Detect threshold CH8 */
+ ICON_SENSE_TH, /* 25 - Detect threshold CH9 */
+ ICON_SENSE_TH, /* 26 - Detect threshold CH10 */
+ ICON_SENSE_TH, /* 27 - Detect threshold CH11 */
+ 0, /* 28 - Key control CH0 */
+ 0, /* 29 - Key control CH1 */
+ 0, /* 30 - Key control CH2 */
+ AKS_G1, /* 31 - Key control CH3 */
+ AKS_G1, /* 32 - Key control CH4 */
+ AKS_G1, /* 33 - Key control CH5 */
+ AKS_G1, /* 34 - Key control CH6 */
+ AKS_G1, /* 35 - Key control CH7 */
+ AKS_G1, /* 36 - Key control CH8 */
+ AKS_G1, /* 37 - Key control CH9 */
+ AKS_G1, /* 38 - Key control CH10 */
+ AKS_G1, /* 39 - Key control CH11 */
+ SLIDER_PS, /* 40 - Pulse/Scale CH0 */
+ SLIDER_PS, /* 41 - Pulse/Scale CH1 */
+ SLIDER_PS, /* 42 - Pulse/Scale CH2 */
+ ICON_PS, /* 43 - Pulse/Scale CH3 */
+ ICON_PS_NOISY, /* 44 - Pulse/Scale CH4 */
+ ICON_PS, /* 45 - Pulse/Scale CH5 */
+ ICON_PS, /* 46 - Pulse/Scale CH6 */
+ ICON_PS_NOISY, /* 47 - Pulse/Scale CH7 */
+ ICON_PS_NOISY, /* 48 - Pulse/Scale CH8 */
+ ICON_PS, /* 49 - Pulse/Scale CH9 */
+ ICON_PS, /* 50 - Pulse/Scale CH10 */
+ ICON_PS /* 51 - Pulse/Scale CH11 */ };
+
+const uint8_t capsense2_init_table[45] = { 8, /* Start address = 8 */
+ 1, /* 08 - LP mode = 1 (16ms) */
+ 20, /* 09 - TTD = 20 (3.2s/ref level) */
+ 5, /* 10 - ATD = 5 (0.8s/ref level) */
+ 5, /* 11 - DI = 5 (5 values integrated) */
+ 63, /* 12 - Touch recal = 63 (10s) */
+ 25, /* 13 - Drift hold = 25 (4 seconds) */
+ 0x00, /* 14 - Slider = Disabled, no wheel */
+ 0, /* 15 - Charge time = 0 */
+ BUTTON_SENSE_TH, /* 16 - Detect threshold CH0 */
+ BUTTON_SENSE_TH, /* 17 - Detect threshold CH1 */
+ BUTTON_SENSE_TH, /* 18 - Detect threshold CH2 */
+ BUTTON_SENSE_TH, /* 19 - Detect threshold CH3 */
+ BUTTON_SENSE_TH, /* 20 - Detect threshold CH4 */
+ BUTTON_SENSE_TH, /* 21 - Detect threshold CH5 */
+ BUTTON_SENSE_TH, /* 22 - Detect threshold CH6 */
+ BUTTON_SENSE_TH, /* 23 - Detect threshold CH7 */
+ BUTTON_SENSE_TH, /* 24 - Detect threshold CH8 */
+ BUTTON_SENSE_TH, /* 25 - Detect threshold CH9 */
+ BUTTON_SENSE_TH2,/* 26 - Detect threshold CH10 */
+ BUTTON_SENSE_TH2,/* 27 - Detect threshold CH11 */
+ AKS_G1, /* 28 - Key control CH0 */
+ AKS_G1, /* 29 - Key control CH1 */
+ AKS_G1, /* 30 - Key control CH2 */
+ AKS_G1, /* 31 - Key control CH3 */
+ AKS_G2, /* 32 - Key control CH4 */
+ AKS_G2, /* 33 - Key control CH5 */
+ AKS_G2, /* 34 - Key control CH6 */
+ AKS_G2, /* 35 - Key control CH7 */
+ AKS_G3, /* 36 - Key control CH8 */
+ AKS_G3, /* 37 - Key control CH9 */
+ AKS_G3, /* 38 - Key control CH10 */
+ AKS_G3, /* 39 - Key control CH11 */
+ BUTTON_PS_NOISY, /* 40 - Pulse/Scale CH0 */
+ BUTTON_PS_NOISY, /* 41 - Pulse/Scale CH1 */
+ BUTTON_PS, /* 42 - Pulse/Scale CH2 */
+ BUTTON_PS, /* 43 - Pulse/Scale CH3 */
+ BUTTON_PS, /* 44 - Pulse/Scale CH4 */
+ BUTTON_PS, /* 45 - Pulse/Scale CH5 */
+ BUTTON_PS, /* 46 - Pulse/Scale CH6 */
+ BUTTON_PS, /* 47 - Pulse/Scale CH7 */
+ BUTTON_PS, /* 48 - Pulse/Scale CH8 */
+ BUTTON_PS, /* 49 - Pulse/Scale CH9 */
+ BUTTON_PS, /* 50 - Pulse/Scale CH10 */
+ BUTTON_PS_NOISY /* 51 - Pulse/Scale CH11 */ };
+
+
+void I2C_Mux(uint8_t position)
+{
+ uint8_t reg;
+ switch(position){
+ case 1:
+ reg = 4;
+ break;
+ case 2:
+ reg = 5;
+ break;
+ default:
+ reg = 0;
+ break;
+ }
+ i2cQuick(1, I2C_MUX_ADDR, reg);
+}
+
+char capSenseInit(void)
+{
+ I2C_Mux(1);
+
+ if (QT_ID != i2cSingleRead(1, QT_ADDR, QT_REG_ID))
+ return 0;
+
+ if (I2C_ALL_OK != i2cOp(1, QT_ADDR, capsense1_init_table, sizeof(capsense1_init_table), NULL, 0))
+ return 0;
+
+ i2cSingleWrite(1, QT_ADDR, QT_REG_CAL, 1);
+
+ I2C_Mux(2);
+
+ if (QT_ID != i2cSingleRead(1, QT_ADDR, QT_REG_ID))
+ return 0;
+
+ if (I2C_ALL_OK != i2cOp(1, QT_ADDR, capsense2_init_table, sizeof(capsense2_init_table), NULL, 0))
+ return 0;
+
+ i2cSingleWrite(1, QT_ADDR, QT_REG_CAL, 1);
+
+ return 1;
+}
+
+uint8_t capSenseSlider(void)
+{
+ uint8_t cmd = QT_REG_SLIDER;
+ uint8_t dat;
+ I2C_Mux(1);
+ i2cOp(1, QT_ADDR, &cmd, 1, &dat, 1);
+ //return i2cSingleRead(1, QT_ADDR, QT_REG_SLIDER);
+ return dat;
+}
+
+uint16_t capSenseButtons(void)
+{
+ uint8_t cmd = QT_REG_KEY0;
+ uint8_t dat[2];
+ I2C_Mux(2);
+ i2cOp(1, QT_ADDR, &cmd, 1, dat, sizeof(dat));
+ return dat[0] + ((uint16_t)dat[1] << 8);
+}
+
+uint16_t capSenseIcons(void)
+{
+ uint8_t cmd = QT_REG_KEY0;
+ uint8_t dat[2];
+ I2C_Mux(1);
+ i2cOp(1, QT_ADDR, &cmd, 1, dat, sizeof(dat));
+ return dat[0] + ((uint16_t)dat[1] << 8);
+}
+
+void capSenseDump(void)
+{
+ int i;
+ uint8_t cmd;
+ uint16_t dat[48];
+ I2C_Mux(1);
+ cmd = QT_REG_SIG;
+ i2cOp(1, QT_ADDR, &cmd, 1, (uint8_t *)dat, 48);
+ I2C_Mux(2);
+ i2cOp(1, QT_ADDR, &cmd, 1, (uint8_t *)(&dat[24]), 48);
+
+ for (i = 0; i < 12; i++) {
+ dbgPrintf("%04x %04x ", dat[i], dat[i+12]);
+ }
+ for (i = 0; i < 12; i++) {
+ dbgPrintf("%04x %04x ", dat[i+24], dat[i+24+12]);
+ }
+ dbgPrintf("\n");
+
+}
diff --git a/MakefileBasedBuild/app/capsense.h b/MakefileBasedBuild/app/capsense.h
new file mode 100644
index 0000000..ebc264c
--- /dev/null
+++ b/MakefileBasedBuild/app/capsense.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifdef ADK_INTERNAL
+#ifndef _CAPSENSE_H_
+#define _CAPSENSE_H_
+
+char capSenseInit(void);
+uint8_t capSenseSlider(void);
+uint16_t capSenseButtons(void);
+uint16_t capSenseIcons(void);
+void capSenseDump(void);
+
+#endif
+#endif
+
diff --git a/MakefileBasedBuild/app/compiler.h b/MakefileBasedBuild/app/compiler.h
new file mode 100644
index 0000000..60dfcb1
--- /dev/null
+++ b/MakefileBasedBuild/app/compiler.h
@@ -0,0 +1,1250 @@
+/* This header file is part of the AVR Software Framework 2.0.0 release */
+
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief Compiler file for AVR32.
+ *
+ * This file defines commonly used types and macros.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _COMPILER_H_
+#define _COMPILER_H_
+
+
+/*_____ D E C L A R A T I O N S ____________________________________________*/
+
+#define S64 signed long long
+#define U64 unsigned long long
+#define S32 signed long
+#define U32 unsigned long
+#define S16 signed short
+#define U16 unsigned short
+#define S8 signed char
+#define U8 unsigned char
+#define Bool unsigned char
+
+#include <stddef.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <stdint.h>
+
+
+
+#define LITTLE_ENDIAN_MCU 1==1
+/*#undef __ICCAVR32__*/
+
+#define max(a,b) ((a) > (b) ? (a) : (b))
+
+extern uint32_t q_get_PRIMASK(void);
+extern void q_set_PRIMASK(uint32_t priMask);
+
+/* Enable interrupts */
+#define Enable_global_interrupt() __set_PRIMASK(0)
+#define sei() __set_PRIMASK(0)
+/* Disable interrupts */
+#define Disable_global_interrupt() __set_PRIMASK(1)
+#define cli() __set_PRIMASK(1)
+/* Disable IRQ interrupt and save status */
+#define sai() __get_PRIMASK()
+/* Restore interrupt status */
+#define rei(X) __set_PRIMASK(X)
+
+#define Is_global_interrupt_enabled() ((__get_PRIMASK()) ? 1 : 0)
+
+///*
+// * @brief Return the Priority Mask value
+// *
+// * @param none
+// * @return uint32_t PriMask
+// *
+// * Return the state of the priority mask bit from the priority mask
+// * register
+// */
+//#if defined(__GNUC__)
+//uint32_t q_get_PRIMASK(void)
+//{
+// uint32_t result=0;
+//
+// asm volatile ("MRS %0, primask" : "=r" (result) );
+// return(result);
+//}
+//#elif defined(__ICCARM__)
+//uint32_t q_get_PRIMASK(void)
+//{
+// __asm("mrs r0, primask");
+// __asm("bx lr");
+//}
+//#elif defined(__CC_ARM)
+///*__asm*/ uint32_t __get_PRIMASK(void)
+//{
+// uint32_t primask=0;
+//
+//// mrs r0, primask
+// return(primask);
+//}
+//#endif
+//
+///*
+// * @brief Set the Priority Mask value
+// *
+// * @param uint32_t PriMask
+// * @return none
+// *
+// * Set the priority mask bit in the priority mask register
+// */
+//#if defined(__GNUC__)
+//void q_set_PRIMASK(uint32_t priMask)
+//{
+// asm volatile ("MSR primask, %0" : : "r" (priMask) );
+//}
+//#elif defined(__ICCARM__)
+//void q_set_PRIMASK(uint32_t priMask)
+//{
+// __asm("msr primask, r0");
+// __asm("bx lr");
+//}
+//#elif defined(__CC_ARM)
+//__asm void __set_PRIMASK(uint32_t priMask)
+//{
+//// msr primask, r0
+//// bx lr
+//}
+//#endif
+
+
+
+#if (defined __ICCAVR32__)
+
+/*! \name Compiler Keywords
+ *
+ * Port of some keywords from GNU GCC for AVR32 to IAR Embedded Workbench for Atmel AVR32.
+ */
+//! @{
+#define __asm__ asm
+#define __inline__ inline
+#define __volatile__
+//! @}
+
+#endif
+
+/**
+ * \def barrier
+ * \brief Memory barrier
+ */
+#if defined(__GNUC__)
+# define barrier() asm volatile("" ::: "memory")
+#elif defined(__ICCAVR32__)
+# define barrier() asm ("")
+#endif
+
+/**
+ * \brief Emit the compiler pragma \a arg.
+ *
+ * \param arg The pragma directive as it would appear after \e \#pragma
+ * (i.e. not stringified).
+ */
+#define COMPILER_PRAGMA(arg) _Pragma(#arg)
+
+/**
+ * \def COMPILER_PACK_SET(alignment)
+ * \brief Set maximum alignment for subsequent struct and union
+ * definitions to \a alignment.
+ */
+#define COMPILER_PACK_SET(alignment) COMPILER_PRAGMA(pack(alignment))
+
+/**
+ * \def COMPILER_PACK_RESET()
+ * \brief Set default alignment for subsequent struct and union
+ * definitions.
+ */
+#define COMPILER_PACK_RESET() COMPILER_PRAGMA(pack())
+
+
+/**
+ * \brief Set word-aligned boundary.
+ */
+#if (defined __GNUC__)
+#define COMPILER_WORD_ALIGNED __attribute__((__aligned__(4)))
+#elif (defined __ICCAVR32__)
+#define COMPILER_WORD_ALIGNED COMPILER_PRAGMA(data_alignment = 4)
+#endif
+
+/**
+ * \name System Register Access
+ * @{
+ */
+#if defined(__GNUC__) || defined(__DOXYGEN__)
+/**
+ * \brief Get value of system register
+ *
+ * \param reg Address of the system register of which to get the value.
+ *
+ * \return Value of system register \a reg.
+ */
+# define sysreg_read(reg) __builtin_mfsr(reg)
+
+/**
+ * \brief Set value of system register
+ *
+ * \param reg Address of the system register of which to set the value.
+ * \param val Value to set the system register \a reg to.
+ */
+# define sysreg_write(reg, val) __builtin_mtsr(reg, val)
+
+#elif defined(__ICCAVR32__)
+# define sysreg_read(reg) __get_system_register(reg)
+# define sysreg_write(reg, val) __set_system_register(reg, val)
+#endif
+
+/* Deprecated definitions */
+#define Get_system_register(reg) sysreg_read(reg)
+#define Set_system_register(reg, val) sysreg_write((reg), (val))
+
+
+/* \name Status Types
+ */
+typedef Bool Status_bool_t; //!< Boolean status.
+typedef U8 Status_t; //!< 8-bit-coded status.
+
+
+/* \name Aliasing Aggregate Types
+ */
+
+/* 16-bit union. */
+typedef union
+{
+ S16 s16 ;
+ U16 u16 ;
+ S8 s8 [2];
+ U8 u8 [2];
+} Union16;
+
+/* 32-bit union.*/
+typedef union
+{
+ S32 s32 ;
+ U32 u32 ;
+ S16 s16[2];
+ U16 u16[2];
+ S8 s8 [4];
+ U8 u8 [4];
+} Union32;
+
+/* 64-bit union. */
+typedef union
+{
+ S64 s64 ;
+ U64 u64 ;
+ S32 s32[2];
+ U32 u32[2];
+ S16 s16[4];
+ U16 u16[4];
+ S8 s8 [8];
+ U8 u8 [8];
+} Union64;
+
+/* Union of pointers to 64-, 32-, 16- and 8-bit unsigned integers. */
+typedef union
+{
+ S64 *s64ptr;
+ U64 *u64ptr;
+ S32 *s32ptr;
+ U32 *u32ptr;
+ S16 *s16ptr;
+ U16 *u16ptr;
+ S8 *s8ptr ;
+ U8 *u8ptr ;
+} UnionPtr;
+
+//! Union of pointers to volatile 64-, 32-, 16- and 8-bit unsigned integers.
+typedef union
+{
+ volatile S64 *s64ptr;
+ volatile U64 *u64ptr;
+ volatile S32 *s32ptr;
+ volatile U32 *u32ptr;
+ volatile S16 *s16ptr;
+ volatile U16 *u16ptr;
+ volatile S8 *s8ptr ;
+ volatile U8 *u8ptr ;
+} UnionVPtr;
+
+//! Union of pointers to constant 64-, 32-, 16- and 8-bit unsigned integers.
+typedef union
+{
+ const S64 *s64ptr;
+ const U64 *u64ptr;
+ const S32 *s32ptr;
+ const U32 *u32ptr;
+ const S16 *s16ptr;
+ const U16 *u16ptr;
+ const S8 *s8ptr ;
+ const U8 *u8ptr ;
+} UnionCPtr;
+
+//! Union of pointers to constant volatile 64-, 32-, 16- and 8-bit unsigned integers.
+typedef union
+{
+ const volatile S64 *s64ptr;
+ const volatile U64 *u64ptr;
+ const volatile S32 *s32ptr;
+ const volatile U32 *u32ptr;
+ const volatile S16 *s16ptr;
+ const volatile U16 *u16ptr;
+ const volatile S8 *s8ptr ;
+ const volatile U8 *u8ptr ;
+} UnionCVPtr;
+
+//! Structure of pointers to 64-, 32-, 16- and 8-bit unsigned integers.
+typedef struct
+{
+ S64 *s64ptr;
+ U64 *u64ptr;
+ S32 *s32ptr;
+ U32 *u32ptr;
+ S16 *s16ptr;
+ U16 *u16ptr;
+ S8 *s8ptr ;
+ U8 *u8ptr ;
+} StructPtr;
+
+//! Structure of pointers to volatile 64-, 32-, 16- and 8-bit unsigned integers.
+typedef struct
+{
+ volatile S64 *s64ptr;
+ volatile U64 *u64ptr;
+ volatile S32 *s32ptr;
+ volatile U32 *u32ptr;
+ volatile S16 *s16ptr;
+ volatile U16 *u16ptr;
+ volatile S8 *s8ptr ;
+ volatile U8 *u8ptr ;
+} StructVPtr;
+
+//! Structure of pointers to constant 64-, 32-, 16- and 8-bit unsigned integers.
+typedef struct
+{
+ const S64 *s64ptr;
+ const U64 *u64ptr;
+ const S32 *s32ptr;
+ const U32 *u32ptr;
+ const S16 *s16ptr;
+ const U16 *u16ptr;
+ const S8 *s8ptr ;
+ const U8 *u8ptr ;
+} StructCPtr;
+
+//! Structure of pointers to constant volatile 64-, 32-, 16- and 8-bit unsigned integers.
+typedef struct
+{
+ const volatile S64 *s64ptr;
+ const volatile U64 *u64ptr;
+ const volatile S32 *s32ptr;
+ const volatile U32 *u32ptr;
+ const volatile S16 *s16ptr;
+ const volatile U16 *u16ptr;
+ const volatile S8 *s8ptr ;
+ const volatile U8 *u8ptr ;
+} StructCVPtr;
+
+//! @}
+
+//#endif // __AVR32_ABI_COMPILER__
+
+
+//_____ M A C R O S ________________________________________________________
+
+/*! \name Usual Constants
+ */
+//! @{
+#define DISABLE 0
+#define ENABLE 1
+#define DISABLED 0
+#define ENABLED 1
+#define OFF 0
+#define ON 1
+#define FALSE 0
+#define TRUE 1
+#ifndef __cplusplus
+#if !defined(__bool_true_false_are_defined)
+#define false FALSE
+#define true TRUE
+#endif
+#endif
+#define KO 0
+#define OK 1
+#define PASS 0
+#define FAIL 1
+#define LOW 0
+#define HIGH 1
+#define CLR 0
+#define SET 1
+//! @}
+
+
+//#ifdef __AVR32_ABI_COMPILER__ // Automatically defined when compiling for AVR32, not when assembling.
+
+//! \name Optimization Control
+//@{
+
+/**
+ * \def likely(exp)
+ * \brief The expression \a exp is likely to be true
+ */
+#ifndef likely
+# define likely(exp) (exp)
+#endif
+
+/**
+ * \def unlikely(exp)
+ * \brief The expression \a exp is unlikely to be true
+ */
+#ifndef unlikely
+# define unlikely(exp) (exp)
+#endif
+
+/**
+ * \def is_constant(exp)
+ * \brief Determine if an expression evaluates to a constant value.
+ *
+ * \param exp Any expression
+ *
+ * \return true if \a exp is constant, false otherwise.
+ */
+#ifdef __GNUC__
+# define is_constant(exp) __builtin_constant_p(exp)
+#else
+# define is_constant(exp) (0)
+#endif
+
+//! @}
+
+/*! \name Bit-Field Handling
+ */
+//! @{
+
+/*! \brief Reads the bits of a value specified by a given bit-mask.
+ *
+ * \param value Value to read bits from.
+ * \param mask Bit-mask indicating bits to read.
+ *
+ * \return Read bits.
+ */
+#define Rd_bits( value, mask) ((value) & (mask))
+
+/*! \brief Writes the bits of a C lvalue specified by a given bit-mask.
+ *
+ * \param lvalue C lvalue to write bits to.
+ * \param mask Bit-mask indicating bits to write.
+ * \param bits Bits to write.
+ *
+ * \return Resulting value with written bits.
+ */
+#define Wr_bits(lvalue, mask, bits) ((lvalue) = ((lvalue) & ~(mask)) |\
+ ((bits ) & (mask)))
+
+/*! \brief Tests the bits of a value specified by a given bit-mask.
+ *
+ * \param value Value of which to test bits.
+ * \param mask Bit-mask indicating bits to test.
+ *
+ * \return \c 1 if at least one of the tested bits is set, else \c 0.
+ */
+#define Tst_bits( value, mask) (Rd_bits((value), (mask)) != 0)
+
+/*! \brief Clears the bits of a C lvalue specified by a given bit-mask.
+ *
+ * \param lvalue C lvalue of which to clear bits.
+ * \param mask Bit-mask indicating bits to clear.
+ *
+ * \return Resulting value with cleared bits.
+ */
+#define Clr_bits(lvalue, mask) ((lvalue) &= ~(mask))
+
+/*! \brief Sets the bits of a C lvalue specified by a given bit-mask.
+ *
+ * \param lvalue C lvalue of which to set bits.
+ * \param mask Bit-mask indicating bits to set.
+ *
+ * \return Resulting value with set bits.
+ */
+#define Set_bits(lvalue, mask) ((lvalue) |= (mask))
+
+/*! \brief Toggles the bits of a C lvalue specified by a given bit-mask.
+ *
+ * \param lvalue C lvalue of which to toggle bits.
+ * \param mask Bit-mask indicating bits to toggle.
+ *
+ * \return Resulting value with toggled bits.
+ */
+#define Tgl_bits(lvalue, mask) ((lvalue) ^= (mask))
+
+/*! \brief Reads the bit-field of a value specified by a given bit-mask.
+ *
+ * \param value Value to read a bit-field from.
+ * \param mask Bit-mask indicating the bit-field to read.
+ *
+ * \return Read bit-field.
+ */
+#define Rd_bitfield( value, mask, offset) (Rd_bits( (value), (mask)) >> (offset))
+
+/*! \brief Writes the bit-field of a C lvalue specified by a given bit-mask.
+ *
+ * \param lvalue C lvalue to write a bit-field to.
+ * \param mask Bit-mask indicating the bit-field to write.
+ * \param bitfield Bit-field to write.
+ *
+ * \return Resulting value with written bit-field.
+ */
+#define Wr_bitfield(lvalue, mask, bitfield, offset) (Wr_bits((lvalue), (mask), (U32)(bitfield) << (offset)))
+//#define Wr_bitfield(lvalue, mask, bitfield) (Wr_bits(lvalue, mask, (U32)(bitfield) << ctz(mask)))
+
+//! @}
+
+
+/*! \brief This macro is used to test fatal errors.
+ *
+ * The macro tests if the expression is FALSE. If it is, a fatal error is
+ * detected and the application hangs up.
+ *
+ * \param expr Expression to evaluate and supposed to be nonzero.
+ */
+#ifdef _ASSERT_ENABLE_
+ #define Assert(expr) \
+ {\
+ if (!(expr)) while (TRUE);\
+ }
+#else
+ #define Assert(expr)
+#endif
+
+
+///*! \name Zero-Bit Counting
+// *
+// * Under AVR32-GCC, __builtin_clz and __builtin_ctz behave like macros when
+// * applied to constant expressions (values known at compile time), so they are
+// * more optimized than the use of the corresponding assembly instructions and
+// * they can be used as constant expressions e.g. to initialize objects having
+// * static storage duration, and like the corresponding assembly instructions
+// * when applied to non-constant expressions (values unknown at compile time), so
+// * they are more optimized than an assembly periphrasis. Hence, clz and ctz
+// * ensure a possible and optimized behavior for both constant and non-constant
+// * expressions.
+// */
+////! @{
+///*! \brief Counts the leading zero bits of the given value considered as a 32-bit integer.
+// *
+// * \param u Value of which to count the leading zero bits.
+// *
+// * \return The count of leading zero bits in \a u.
+// */
+//#if (defined __GNUC__)
+// #define clz(u) __builtin_clz(u)
+//#elif (defined __ICCAVR32__)
+// #if (__VER__ == 330) && (__SUBVERSION__ <= 1)
+// // __count_leading_zeros is broken and returns a value which is offset by
+// // -32 when called with a constant parameter.
+// #define clz(v) (0 == v ? 32 : (31 & __count_leading_zeros(v)))
+// #else
+// #define clz(v) __count_leading_zeros(v)
+// #endif
+//#elif (defined __ICCARM__)
+// #define clz(v) __count_leading_zeros(v)
+//#endif
+//
+///*! \brief Counts the trailing zero bits of the given value considered as a 32-bit integer.
+// *
+// * \param u Value of which to count the trailing zero bits.
+// *
+// * \return The count of trailing zero bits in \a u.
+// */
+//#if (defined __GNUC__)
+// #define ctz(u) __builtin_ctz(u)
+//#elif (defined __ICCAVR32__)
+// #define ctz(u) __count_trailing_zeros(u)
+//#endif
+//
+////! @}
+//
+////! \name Logarithmic functions
+////! @{
+//
+///**
+// * \internal
+// * Undefined function. Will cause a link failure if ilog2() is called
+// * with an invalid constant value.
+// */
+//int_fast8_t ilog2_undefined(void);
+//
+///**
+// * \brief Calculate the base-2 logarithm of a number rounded down to
+// * the nearest integer.
+// *
+// * \param x A 32-bit value
+// * \return The base-2 logarithm of \a x, or -1 if \a x is 0.
+// */
+//static inline int_fast8_t ilog2(uint32_t x)
+//{
+// if (is_constant(x))
+// return ((x) & (1ULL << 31) ? 31 :
+// (x) & (1ULL << 30) ? 30 :
+// (x) & (1ULL << 29) ? 29 :
+// (x) & (1ULL << 28) ? 28 :
+// (x) & (1ULL << 27) ? 27 :
+// (x) & (1ULL << 26) ? 26 :
+// (x) & (1ULL << 25) ? 25 :
+// (x) & (1ULL << 24) ? 24 :
+// (x) & (1ULL << 23) ? 23 :
+// (x) & (1ULL << 22) ? 22 :
+// (x) & (1ULL << 21) ? 21 :
+// (x) & (1ULL << 20) ? 20 :
+// (x) & (1ULL << 19) ? 19 :
+// (x) & (1ULL << 18) ? 18 :
+// (x) & (1ULL << 17) ? 17 :
+// (x) & (1ULL << 16) ? 16 :
+// (x) & (1ULL << 15) ? 15 :
+// (x) & (1ULL << 14) ? 14 :
+// (x) & (1ULL << 13) ? 13 :
+// (x) & (1ULL << 12) ? 12 :
+// (x) & (1ULL << 11) ? 11 :
+// (x) & (1ULL << 10) ? 10 :
+// (x) & (1ULL << 9) ? 9 :
+// (x) & (1ULL << 8) ? 8 :
+// (x) & (1ULL << 7) ? 7 :
+// (x) & (1ULL << 6) ? 6 :
+// (x) & (1ULL << 5) ? 5 :
+// (x) & (1ULL << 4) ? 4 :
+// (x) & (1ULL << 3) ? 3 :
+// (x) & (1ULL << 2) ? 2 :
+// (x) & (1ULL << 1) ? 1 :
+// (x) & (1ULL << 0) ? 0 :
+// ilog2_undefined());
+//
+// return 31 - clz(x);
+//}
+
+//! @}
+
+/*! \name Bit Reversing
+ */
+//! @{
+
+/*! \brief Reverses the bits of \a u8.
+ *
+ * \param u8 U8 of which to reverse the bits.
+ *
+ * \return Value resulting from \a u8 with reversed bits.
+ */
+#define bit_reverse8(u8) ((U8)(bit_reverse32((U8)(u8)) >> 24))
+
+/*! \brief Reverses the bits of \a u16.
+ *
+ * \param u16 U16 of which to reverse the bits.
+ *
+ * \return Value resulting from \a u16 with reversed bits.
+ */
+#define bit_reverse16(u16) ((U16)(bit_reverse32((U16)(u16)) >> 16))
+
+/*! \brief Reverses the bits of \a u32.
+ *
+ * \param u32 U32 of which to reverse the bits.
+ *
+ * \return Value resulting from \a u32 with reversed bits.
+ */
+#if (defined __GNUC__)
+ #define bit_reverse32(u32) \
+ (\
+ {\
+ unsigned int __value = (U32)(u32);\
+ __asm__ ("brev\t%0" : "+r" (__value) : : "cc");\
+ (U32)__value;\
+ }\
+ )
+#elif (defined __ICCAVR32__)
+ #define bit_reverse32(u32) ((U32)__bit_reverse((U32)(u32)))
+#endif
+
+/*! \brief Reverses the bits of \a u64.
+ *
+ * \param u64 U64 of which to reverse the bits.
+ *
+ * \return Value resulting from \a u64 with reversed bits.
+ */
+#define bit_reverse64(u64) ((U64)(((U64)bit_reverse32((U64)(u64) >> 32)) |\
+ ((U64)bit_reverse32((U64)(u64)) << 32)))
+
+//! @}
+
+
+/*! \name Alignment
+ */
+//! @{
+
+/*! \brief Tests alignment of the number \a val with the \a n boundary.
+ *
+ * \param val Input value.
+ * \param n Boundary.
+ *
+ * \return \c 1 if the number \a val is aligned with the \a n boundary, else \c 0.
+ */
+#define Test_align(val, n ) (!Tst_bits( (val), (n) - 1 ) )
+
+/*! \brief Gets alignment of the number \a val with respect to the \a n boundary.
+ *
+ * \param val Input value.
+ * \param n Boundary.
+ *
+ * \return Alignment of the number \a val with respect to the \a n boundary.
+ */
+#define Get_align( val, n ) ( Rd_bits( (val), (n) - 1 ) )
+
+/*! \brief Sets alignment of the lvalue number \a lval to \a alg with respect to the \a n boundary.
+ *
+ * \param lval Input/output lvalue.
+ * \param n Boundary.
+ * \param alg Alignment.
+ *
+ * \return New value of \a lval resulting from its alignment set to \a alg with respect to the \a n boundary.
+ */
+#define Set_align(lval, n, alg) ( Wr_bits((lval), (n) - 1, (alg)) )
+
+/*! \brief Aligns the number \a val with the upper \a n boundary.
+ *
+ * \param val Input value.
+ * \param n Boundary.
+ *
+ * \return Value resulting from the number \a val aligned with the upper \a n boundary.
+ */
+#define Align_up( val, n ) (((val) + ((n) - 1)) & ~((n) - 1))
+
+/*! \brief Aligns the number \a val with the lower \a n boundary.
+ *
+ * \param val Input value.
+ * \param n Boundary.
+ *
+ * \return Value resulting from the number \a val aligned with the lower \a n boundary.
+ */
+#define Align_down(val, n ) ( (val) & ~((n) - 1))
+
+//! @}
+
+#if 0
+
+/*! \name Mathematics
+ *
+ * The same considerations as for clz and ctz apply here but AVR32-GCC does not
+ * provide built-in functions to access the assembly instructions abs, min and
+ * max and it does not produce them by itself in most cases, so two sets of
+ * macros are defined here:
+ * - Abs, Min and Max to apply to constant expressions (values known at
+ * compile time);
+ * - abs, min and max to apply to non-constant expressions (values unknown at
+ * compile time).
+ */
+//! @{
+
+/*! \brief Takes the absolute value of \a a.
+ *
+ * \param a Input value.
+ *
+ * \return Absolute value of \a a.
+ *
+ * \note More optimized if only used with values known at compile time.
+ */
+#define Abs(a) (((a) < 0 ) ? -(a) : (a))
+
+/*! \brief Takes the minimal value of \a a and \a b.
+ *
+ * \param a Input value.
+ * \param b Input value.
+ *
+ * \return Minimal value of \a a and \a b.
+ *
+ * \note More optimized if only used with values known at compile time.
+ */
+#define Min(a, b) (((a) < (b)) ? (a) : (b))
+
+/*! \brief Takes the maximal value of \a a and \a b.
+ *
+ * \param a Input value.
+ * \param b Input value.
+ *
+ * \return Maximal value of \a a and \a b.
+ *
+ * \note More optimized if only used with values known at compile time.
+ */
+#define Max(a, b) (((a) > (b)) ? (a) : (b))
+
+/*! \brief Takes the absolute value of \a a.
+ *
+ * \param a Input value.
+ *
+ * \return Absolute value of \a a.
+ *
+ * \note More optimized if only used with values unknown at compile time.
+ */
+#if (defined __GNUC__)
+ #define abs(a) \
+ (\
+ {\
+ int __value = (a);\
+ __asm__ ("abs\t%0" : "+r" (__value) : : "cc");\
+ __value;\
+ }\
+ )
+#elif (defined __ICCAVR32__)
+ #define abs(a) Abs(a)
+#endif
+
+/*! \brief Takes the minimal value of \a a and \a b.
+ *
+ * \param a Input value.
+ * \param b Input value.
+ *
+ * \return Minimal value of \a a and \a b.
+ *
+ * \note More optimized if only used with values unknown at compile time.
+ */
+#if (defined __GNUC__)
+ #define min(a, b) \
+ (\
+ {\
+ int __value, __arg_a = (a), __arg_b = (b);\
+ __asm__ ("min\t%0, %1, %2" : "=r" (__value) : "r" (__arg_a), "r" (__arg_b));\
+ __value;\
+ }\
+ )
+#elif (defined __ICCAVR32__)
+ #define min(a, b) __min(a, b)
+#endif
+
+/*! \brief Takes the maximal value of \a a and \a b.
+ *
+ * \param a Input value.
+ * \param b Input value.
+ *
+ * \return Maximal value of \a a and \a b.
+ *
+ * \note More optimized if only used with values unknown at compile time.
+ */
+#if (defined __GNUC__)
+ #define max(a, b) \
+ (\
+ {\
+ int __value, __arg_a = (a), __arg_b = (b);\
+ __asm__ ("max\t%0, %1, %2" : "=r" (__value) : "r" (__arg_a), "r" (__arg_b));\
+ __value;\
+ }\
+ )
+#elif (defined __ICCAVR32__)
+ #define max(a, b) __max(a, b)
+#endif
+
+//! @}
+
+
+/*! \brief Calls the routine at address \a addr.
+ *
+ * It generates a long call opcode.
+ *
+ * For example, `Long_call(0x80000000)' generates a software reset on a UC3 if
+ * it is invoked from the CPU supervisor mode.
+ *
+ * \param addr Address of the routine to call.
+ *
+ * \note It may be used as a long jump opcode in some special cases.
+ */
+#define Long_call(addr) ((*(void (*)(void))(addr))())
+
+/*! \brief Resets the CPU by software.
+ *
+ * \warning It shall not be called from the CPU application mode.
+ */
+#if (defined __GNUC__)
+ #define Reset_CPU() \
+ (\
+ {\
+ __asm__ __volatile__ (\
+ "lddpc r9, 3f\n\t"\
+ "mfsr r8, %[SR]\n\t"\
+ "bfextu r8, r8, %[SR_M_OFFSET], %[SR_M_SIZE]\n\t"\
+ "cp.w r8, 0b001\n\t"\
+ "breq 0f\n\t"\
+ "sub r8, pc, $ - 1f\n\t"\
+ "pushm r8-r9\n\t"\
+ "rete\n"\
+ "0:\n\t"\
+ "mtsr %[SR], r9\n"\
+ "1:\n\t"\
+ "mov r0, 0\n\t"\
+ "mov r1, 0\n\t"\
+ "mov r2, 0\n\t"\
+ "mov r3, 0\n\t"\
+ "mov r4, 0\n\t"\
+ "mov r5, 0\n\t"\
+ "mov r6, 0\n\t"\
+ "mov r7, 0\n\t"\
+ "mov r8, 0\n\t"\
+ "mov r9, 0\n\t"\
+ "mov r10, 0\n\t"\
+ "mov r11, 0\n\t"\
+ "mov r12, 0\n\t"\
+ "mov sp, 0\n\t"\
+ "stdsp sp[0], sp\n\t"\
+ "ldmts sp, sp\n\t"\
+ "mov lr, 0\n\t"\
+ "lddpc pc, 2f\n\t"\
+ ".balign 4\n"\
+ "2:\n\t"\
+ ".word _start\n"\
+ "3:\n\t"\
+ ".word %[RESET_SR]"\
+ :\
+ : [SR] "i" (AVR32_SR),\
+ [SR_M_OFFSET] "i" (AVR32_SR_M_OFFSET),\
+ [SR_M_SIZE] "i" (AVR32_SR_M_SIZE),\
+ [RESET_SR] "i" (AVR32_SR_GM_MASK | AVR32_SR_EM_MASK | (AVR32_SR_M_SUP << AVR32_SR_M_OFFSET))\
+ );\
+ }\
+ )
+#elif (defined __ICCAVR32__)
+ #define Reset_CPU() \
+ {\
+ extern void *volatile __program_start;\
+ __asm__ __volatile__ (\
+ "mov r7, LWRD(__program_start)\n\t"\
+ "orh r7, HWRD(__program_start)\n\t"\
+ "mov r9, LWRD("ASTRINGZ(AVR32_SR_GM_MASK | AVR32_SR_EM_MASK | (AVR32_SR_M_SUP << AVR32_SR_M_OFFSET))")\n\t"\
+ "orh r9, HWRD("ASTRINGZ(AVR32_SR_GM_MASK | AVR32_SR_EM_MASK | (AVR32_SR_M_SUP << AVR32_SR_M_OFFSET))")\n\t"\
+ "mfsr r8, "ASTRINGZ(AVR32_SR)"\n\t"\
+ "bfextu r8, r8, "ASTRINGZ(AVR32_SR_M_OFFSET)", "ASTRINGZ(AVR32_SR_M_SIZE)"\n\t"\
+ "cp.w r8, 001b\n\t"\
+ "breq $ + 10\n\t"\
+ "sub r8, pc, -12\n\t"\
+ "pushm r8-r9\n\t"\
+ "rete\n\t"\
+ "mtsr "ASTRINGZ(AVR32_SR)", r9\n\t"\
+ "mov r0, 0\n\t"\
+ "mov r1, 0\n\t"\
+ "mov r2, 0\n\t"\
+ "mov r3, 0\n\t"\
+ "mov r4, 0\n\t"\
+ "mov r5, 0\n\t"\
+ "mov r6, 0\n\t"\
+ "st.w r0[4], r7\n\t"\
+ "mov r7, 0\n\t"\
+ "mov r8, 0\n\t"\
+ "mov r9, 0\n\t"\
+ "mov r10, 0\n\t"\
+ "mov r11, 0\n\t"\
+ "mov r12, 0\n\t"\
+ "mov sp, 0\n\t"\
+ "stdsp sp[0], sp\n\t"\
+ "ldmts sp, sp\n\t"\
+ "mov lr, 0\n\t"\
+ "ld.w pc, lr[4]"\
+ );\
+ __program_start;\
+ }
+#endif
+
+
+
+
+/*! \name CPU Status Register Access
+ */
+//! @{
+
+/*! \brief Tells whether exceptions are globally enabled.
+ *
+ * \return \c 1 if exceptions are globally enabled, else \c 0.
+ */
+#define Is_global_exception_enabled() (!Tst_bits(Get_system_register(AVR32_SR), AVR32_SR_EM_MASK))
+
+/*! \brief Disables exceptions globally.
+ */
+#if (defined __GNUC__)
+ #define Disable_global_exception() ({__asm__ __volatile__ ("ssrf\t%0" : : "i" (AVR32_SR_EM_OFFSET));})
+#elif (defined __ICCAVR32__)
+ #define Disable_global_exception() (__set_status_flag(AVR32_SR_EM_OFFSET))
+#endif
+
+/*! \brief Enables exceptions globally.
+ */
+#if (defined __GNUC__)
+ #define Enable_global_exception() ({__asm__ __volatile__ ("csrf\t%0" : : "i" (AVR32_SR_EM_OFFSET));})
+#elif (defined __ICCAVR32__)
+ #define Enable_global_exception() (__clear_status_flag(AVR32_SR_EM_OFFSET))
+#endif
+
+//! @}
+
+
+/*! \name Debug Register Access
+ */
+//! @{
+
+/*! \brief Gets the value of the \a dbgreg debug register.
+ *
+ * \param dbgreg Address of the debug register of which to get the value.
+ *
+ * \return Value of the \a dbgreg debug register.
+ */
+#if (defined __GNUC__)
+ #define Get_debug_register(dbgreg) __builtin_mfdr(dbgreg)
+#elif (defined __ICCAVR32__)
+ #define Get_debug_register(dbgreg) __get_debug_register(dbgreg)
+#endif
+
+/*! \brief Sets the value of the \a dbgreg debug register to \a value.
+ *
+ * \param dbgreg Address of the debug register of which to set the value.
+ * \param value Value to set the \a dbgreg debug register to.
+ */
+#if (defined __GNUC__)
+ #define Set_debug_register(dbgreg, value) __builtin_mtdr(dbgreg, value)
+#elif (defined __ICCAVR32__)
+ #define Set_debug_register(dbgreg, value) __set_debug_register(dbgreg, value)
+#endif
+
+//! @}
+#endif
+
+
+/*! \name Force Assembly Inline Code Section
+ */
+//! @{
+#if (defined __GNUC__)
+#define __always_inline __attribute__((__always_inline__))
+#elif (defined __ICCAVR32__)
+#define __always_inline _Pragma("inline=forced")
+#endif
+//! @}
+
+/*! \name MCU Endianism Handling
+ * AVR32 is MCU big endianism.
+ */
+//! @{
+#define MSB(u16) (((U8 *)&(u16))[0]) //!< Most significant byte of \a u16.
+#define LSB(u16) (((U8 *)&(u16))[1]) //!< Least significant byte of \a u16.
+
+#define MSH(u32) (((U16 *)&(u32))[0]) //!< Most significant half-word of \a u32.
+#define LSH(u32) (((U16 *)&(u32))[1]) //!< Least significant half-word of \a u32.
+#define MSB0W(u32) (((U8 *)&(u32))[0]) //!< Most significant byte of 1st rank of \a u32.
+#define MSB1W(u32) (((U8 *)&(u32))[1]) //!< Most significant byte of 2nd rank of \a u32.
+#define MSB2W(u32) (((U8 *)&(u32))[2]) //!< Most significant byte of 3rd rank of \a u32.
+#define MSB3W(u32) (((U8 *)&(u32))[3]) //!< Most significant byte of 4th rank of \a u32.
+#define LSB3W(u32) MSB0W(u32) //!< Least significant byte of 4th rank of \a u32.
+#define LSB2W(u32) MSB1W(u32) //!< Least significant byte of 3rd rank of \a u32.
+#define LSB1W(u32) MSB2W(u32) //!< Least significant byte of 2nd rank of \a u32.
+#define LSB0W(u32) MSB3W(u32) //!< Least significant byte of 1st rank of \a u32.
+
+#define MSW(u64) (((U32 *)&(u64))[0]) //!< Most significant word of \a u64.
+#define LSW(u64) (((U32 *)&(u64))[1]) //!< Least significant word of \a u64.
+#define MSH0(u64) (((U16 *)&(u64))[0]) //!< Most significant half-word of 1st rank of \a u64.
+#define MSH1(u64) (((U16 *)&(u64))[1]) //!< Most significant half-word of 2nd rank of \a u64.
+#define MSH2(u64) (((U16 *)&(u64))[2]) //!< Most significant half-word of 3rd rank of \a u64.
+#define MSH3(u64) (((U16 *)&(u64))[3]) //!< Most significant half-word of 4th rank of \a u64.
+#define LSH3(u64) MSH0(u64) //!< Least significant half-word of 4th rank of \a u64.
+#define LSH2(u64) MSH1(u64) //!< Least significant half-word of 3rd rank of \a u64.
+#define LSH1(u64) MSH2(u64) //!< Least significant half-word of 2nd rank of \a u64.
+#define LSH0(u64) MSH3(u64) //!< Least significant half-word of 1st rank of \a u64.
+#define MSB0D(u64) (((U8 *)&(u64))[0]) //!< Most significant byte of 1st rank of \a u64.
+#define MSB1D(u64) (((U8 *)&(u64))[1]) //!< Most significant byte of 2nd rank of \a u64.
+#define MSB2D(u64) (((U8 *)&(u64))[2]) //!< Most significant byte of 3rd rank of \a u64.
+#define MSB3D(u64) (((U8 *)&(u64))[3]) //!< Most significant byte of 4th rank of \a u64.
+#define MSB4D(u64) (((U8 *)&(u64))[4]) //!< Most significant byte of 5th rank of \a u64.
+#define MSB5D(u64) (((U8 *)&(u64))[5]) //!< Most significant byte of 6th rank of \a u64.
+#define MSB6D(u64) (((U8 *)&(u64))[6]) //!< Most significant byte of 7th rank of \a u64.
+#define MSB7D(u64) (((U8 *)&(u64))[7]) //!< Most significant byte of 8th rank of \a u64.
+#define LSB7D(u64) MSB0D(u64) //!< Least significant byte of 8th rank of \a u64.
+#define LSB6D(u64) MSB1D(u64) //!< Least significant byte of 7th rank of \a u64.
+#define LSB5D(u64) MSB2D(u64) //!< Least significant byte of 6th rank of \a u64.
+#define LSB4D(u64) MSB3D(u64) //!< Least significant byte of 5th rank of \a u64.
+#define LSB3D(u64) MSB4D(u64) //!< Least significant byte of 4th rank of \a u64.
+#define LSB2D(u64) MSB5D(u64) //!< Least significant byte of 3rd rank of \a u64.
+#define LSB1D(u64) MSB6D(u64) //!< Least significant byte of 2nd rank of \a u64.
+#define LSB0D(u64) MSB7D(u64) //!< Least significant byte of 1st rank of \a u64.
+
+#define LE16(x) Swap16(x)
+#define le16_to_cpu(x) swap16(x)
+#define cpu_to_le16(x) swap16(x)
+#define LE16_TO_CPU(x) Swap16(x)
+#define CPU_TO_LE16(x) Swap16(x)
+
+#define be16_to_cpu(x) (x)
+#define cpu_to_be16(x) (x)
+#define BE16_TO_CPU(x) (x)
+#define CPU_TO_BE16(x) (x)
+
+#define le32_to_cpu(x) swap32(x)
+#define cpu_to_le32(x) swap32(x)
+#define LE32_TO_CPU(x) Swap32(x)
+#define CPU_TO_LE32(x) Swap32(x)
+
+#define be32_to_cpu(x) (x)
+#define cpu_to_be32(x) (x)
+#define BE32_TO_CPU(x) (x)
+#define CPU_TO_BE32(x) (x)
+//! @}
+
+
+/*! \name Endianism Conversion
+ *
+ * The same considerations as for clz and ctz apply here but AVR32-GCC's
+ * __builtin_bswap_16 and __builtin_bswap_32 do not behave like macros when
+ * applied to constant expressions, so two sets of macros are defined here:
+ * - Swap16, Swap32 and Swap64 to apply to constant expressions (values known
+ * at compile time);
+ * - swap16, swap32 and swap64 to apply to non-constant expressions (values
+ * unknown at compile time).
+ */
+//! @{
+
+/*! \brief Toggles the endianism of \a u16 (by swapping its bytes).
+ *
+ * \param u16 U16 of which to toggle the endianism.
+ *
+ * \return Value resulting from \a u16 with toggled endianism.
+ *
+ * \note More optimized if only used with values known at compile time.
+ */
+#define Swap16(u16) ((U16)(((U16)(u16) >> 8) |\
+ ((U16)(u16) << 8)))
+
+/*! \brief Toggles the endianism of \a u32 (by swapping its bytes).
+ *
+ * \param u32 U32 of which to toggle the endianism.
+ *
+ * \return Value resulting from \a u32 with toggled endianism.
+ *
+ * \note More optimized if only used with values known at compile time.
+ */
+#define Swap32(u32) ((U32)(((U32)Swap16((U32)(u32) >> 16)) |\
+ ((U32)Swap16((U32)(u32)) << 16)))
+
+/*! \brief Toggles the endianism of \a u64 (by swapping its bytes).
+ *
+ * \param u64 U64 of which to toggle the endianism.
+ *
+ * \return Value resulting from \a u64 with toggled endianism.
+ *
+ * \note More optimized if only used with values known at compile time.
+ */
+#define Swap64(u64) ((U64)(((U64)Swap32((U64)(u64) >> 32)) |\
+ ((U64)Swap32((U64)(u64)) << 32)))
+
+/*! \brief Toggles the endianism of \a u16 (by swapping its bytes).
+ *
+ * \param u16 U16 of which to toggle the endianism.
+ *
+ * \return Value resulting from \a u16 with toggled endianism.
+ *
+ * \note More optimized if only used with values unknown at compile time.
+ */
+#if (defined __GNUC__)
+ #define swap16(u16) ((U16)__builtin_bswap_16((U16)(u16)))
+#elif (defined __ICCAVR32__)
+ #define swap16(u16) ((U16)__swap_bytes_in_halfwords((U16)(u16)))
+#endif
+
+/*! \brief Toggles the endianism of \a u32 (by swapping its bytes).
+ *
+ * \param u32 U32 of which to toggle the endianism.
+ *
+ * \return Value resulting from \a u32 with toggled endianism.
+ *
+ * \note More optimized if only used with values unknown at compile time.
+ */
+#if (defined __GNUC__)
+ #define swap32(u32) ((U32)__builtin_bswap_32((U32)(u32)))
+#elif (defined __ICCAVR32__)
+ #define swap32(u32) ((U32)__swap_bytes((U32)(u32)))
+#endif
+
+/*! \brief Toggles the endianism of \a u64 (by swapping its bytes).
+ *
+ * \param u64 U64 of which to toggle the endianism.
+ *
+ * \return Value resulting from \a u64 with toggled endianism.
+ *
+ * \note More optimized if only used with values unknown at compile time.
+ */
+#define swap64(u64) ((U64)(((U64)swap32((U64)(u64) >> 32)) |\
+ ((U64)swap32((U64)(u64)) << 32)))
+
+//! @}
+
+
+/*! \name Target Abstraction
+ */
+//! @{
+
+#define _GLOBEXT_ extern //!< extern storage-class specifier.
+#define _CONST_TYPE_ const //!< const type qualifier.
+#define _MEM_TYPE_SLOW_ //!< Slow memory type.
+#define _MEM_TYPE_MEDFAST_ //!< Fairly fast memory type.
+#define _MEM_TYPE_FAST_ //!< Fast memory type.
+
+typedef U8 Byte; //!< 8-bit unsigned integer.
+
+#define memcmp_ram2ram memcmp //!< Target-specific memcmp of RAM to RAM.
+#define memcmp_code2ram memcmp //!< Target-specific memcmp of RAM to NVRAM.
+#define memcpy_ram2ram memcpy //!< Target-specific memcpy from RAM to RAM.
+#define memcpy_code2ram memcpy //!< Target-specific memcpy from NVRAM to RAM.
+
+#define LSB0(u32) LSB0W(u32) //!< Least significant byte of 1st rank of \a u32.
+#define LSB1(u32) LSB1W(u32) //!< Least significant byte of 2nd rank of \a u32.
+#define LSB2(u32) LSB2W(u32) //!< Least significant byte of 3rd rank of \a u32.
+#define LSB3(u32) LSB3W(u32) //!< Least significant byte of 4th rank of \a u32.
+#define MSB3(u32) MSB3W(u32) //!< Most significant byte of 4th rank of \a u32.
+#define MSB2(u32) MSB2W(u32) //!< Most significant byte of 3rd rank of \a u32.
+#define MSB1(u32) MSB1W(u32) //!< Most significant byte of 2nd rank of \a u32.
+#define MSB0(u32) MSB0W(u32) //!< Most significant byte of 1st rank of \a u32.
+
+//! @}
+
+//#endif // __AVR32_ABI_COMPILER__
+
+
+#endif // _COMPILER_H_
diff --git a/MakefileBasedBuild/app/conf_usb.h b/MakefileBasedBuild/app/conf_usb.h
new file mode 100644
index 0000000..e11f5e1
--- /dev/null
+++ b/MakefileBasedBuild/app/conf_usb.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef __CONF_USB_H
+#define __CONF_USB_H
+
+#define DISABLED 0
+#define ENABLED 1
+
+#define TRACE_USB 1
+
+#if TRACE_USB
+#define LOG_STR(...) (dbgPrintf(__VA_ARGS__),dbgPrintf("\n\r"))
+#define TRACE_OTG(fmt, ...) do{ dbgPrintf("%s %ld: " fmt, __func__, fwkGetUptime(), ##__VA_ARGS__); } while (0)
+#define TRACE_OTG_NONL(fmt, ...) do{ dbgPrintf(fmt, ##__VA_ARGS__); } while (0)
+#else
+#define LOG_STR(...) ()
+#define TRACE_OTG(fmt, ...) do{ } while (0)
+#define TRACE_OTG_NONL(fmt, ...) do{ } while (0)
+#endif
+
+#define USB_HOST_FEATURE ENABLED
+#define USB_DEVICE_FEATURE DISABLED
+
+#define USB_HOST_PIPE_INTERRUPT_TRANSFER ENABLE
+
+#define CHIP_USB_NUMENDPOINTS 10
+
+#define halt() do { for(;;); } while (0)
+#define ASSERT(x) do { if (!(x)) { dbgPrintf("%s:%d ASSERT failed: %s\n", __FILE__, __LINE__, #x); halt(); } } while (0)
+#define panic(fmt, ...) do{ dbgPrintf("panic at %s: " fmt, __func__, ##__VA_ARGS__); halt(); } while (0)
+
+#undef printf
+#define printf(x...) ERROR_DONT_USE_PRINTF
+
+#endif
+
diff --git a/MakefileBasedBuild/app/coop.c b/MakefileBasedBuild/app/coop.c
new file mode 100644
index 0000000..85cac19
--- /dev/null
+++ b/MakefileBasedBuild/app/coop.c
@@ -0,0 +1,137 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#define ADK_INTERNAL
+#include "fwk.h"
+#include "coop.h"
+#include "dbg.h"
+
+#define NUM_REGS 10 //r4-r11,sp,pc
+
+typedef struct CoopTask{
+
+ uint32_t regs[NUM_REGS];
+ void* stackPtr;
+ struct CoopTask* next;
+ struct CoopTask* prev;
+}CoopTask;
+
+CoopTask* cur = 0;
+
+static CoopTask* __attribute__((noinline)) coopSchedule(char taskDied){
+
+ CoopTask* next = cur->next;
+
+ if(taskDied){ //delete task
+
+ if(next == cur){
+ dbgPrintf("Last task died. Halting.\n");
+ while(1);
+ }
+
+ if(cur->stackPtr) free(cur->stackPtr);
+ cur->next->prev = cur->prev;
+ cur->prev->next = cur->next;
+ free(cur);
+ }
+ cur = next;
+ return next;
+}
+
+
+static void __attribute__((naked)) __attribute__((noinline)) coopTaskStart(void){
+
+ asm(
+ "mov r0, r5;"
+ "blx r4;"
+ "mov r0, #1;"
+ "bl coopSchedule;"
+ "ldmia r0, {r4-r12,lr};"
+ "mov sp, r12;"
+ "bx lr;"
+ );
+}
+
+static void __attribute__((naked)) __attribute__((noinline)) coopDoYield(CoopTask* curTask){
+
+ asm(
+ "mov r12, sp;"
+ "stmia r0, {r4-r12,lr};"
+ "mov r0, #0;"
+ "bl coopSchedule;"
+ "ldmia r0, {r4-r12,lr};"
+ "mov sp, r12;"
+ "bx lr;"
+ );
+}
+
+int coopInit(void){
+
+ CoopTask* task;
+
+ task = malloc(sizeof(CoopTask));
+ if(!task) return 0;
+
+ task->next = task;
+ task->prev = task;
+ task->stackPtr = 0;
+ cur = task;
+
+ return 1;
+}
+
+int coopSpawn(CoopTaskF taskF, void* taskData, uint32_t stackSz){
+
+ uint8_t* stack;
+ CoopTask* task;
+
+ stack = malloc(stackSz);
+ if(!stack) return 0;
+
+ task = malloc(sizeof(CoopTask));
+ if(!task){
+ free(stack);
+ return 0;
+ }
+
+ task->stackPtr = stack;
+ task->regs[0] = (uint32_t)taskF;
+ task->regs[1] = (uint32_t)taskData;
+ task->regs[8] = ((uint32_t)(stack + stackSz)) &~ 7;
+ task->regs[9] = (uint32_t)&coopTaskStart;
+
+ task->prev = cur;
+ task->next = cur->next;
+ cur->next->prev = task;
+ cur->next = task;
+
+ //these are here so compiler is sure that function is referenced in both variants (cancels a warning)
+ if(stackSz == 0xFFFFFFFF) coopSchedule(0);
+ if(stackSz == 0xFFFFFFFE) coopSchedule(1);
+
+ return 1;
+}
+
+void coopYield(void){
+ coopDoYield(cur);
+}
+
+void sleep(uint32_t ms)
+{
+ uint64_t a = fwkGetUptime();
+ while (fwkGetUptime() - a < ms)
+ coopYield();
+}
+
diff --git a/MakefileBasedBuild/app/coop.h b/MakefileBasedBuild/app/coop.h
new file mode 100644
index 0000000..bda73a9
--- /dev/null
+++ b/MakefileBasedBuild/app/coop.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifdef ADK_INTERNAL
+#ifndef _COOP_H_
+#define _COOP_H_
+
+
+typedef void (*CoopTaskF)(void* ptr);
+
+int coopInit(void); //0 on fail
+int coopSpawn(CoopTaskF task, void* taskData, uint32_t stackSz); //0 on fail
+void coopYield(void);
+
+void sleep(uint32_t ms);
+
+#endif
+#endif
+
diff --git a/MakefileBasedBuild/app/dbg.c b/MakefileBasedBuild/app/dbg.c
new file mode 100644
index 0000000..70eee46
--- /dev/null
+++ b/MakefileBasedBuild/app/dbg.c
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#define ADK_INTERNAL
+#include "fwk.h"
+#include "dbg.h"
+#include "printf.h"
+#include <stdarg.h>
+
+#define USE_UART 0
+
+
+void (*putcharF)(char) = NULL;
+
+static char writeF(void* unused, char c){
+
+
+ if(c == '\n') if(putcharF) putcharF('\r'); //serial consoles need this
+ if(putcharF) putcharF(c);
+ return 1;
+}
+
+void dbgPrintf(const char* fmt, ...){
+
+ va_list vl;
+
+ va_start(vl, fmt);
+ _cvsprintf(writeF, NULL, fmt, vl);
+ va_end(vl);
+}
+
+void dbgSetPutchar(void (*fn)(char)){
+
+ putcharF = fn;
+}
diff --git a/MakefileBasedBuild/app/dbg.h b/MakefileBasedBuild/app/dbg.h
new file mode 100644
index 0000000..f90b133
--- /dev/null
+++ b/MakefileBasedBuild/app/dbg.h
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifdef ADK_INTERNAL
+#ifndef _DBG_H_
+#define _DBG_H_
+
+void dbgPrintf(const char* fmt, ...);
+
+void dbgSetPutchar(void (*fn)(char));
+
+
+#endif
+#endif
+
diff --git a/MakefileBasedBuild/app/eliza.c b/MakefileBasedBuild/app/eliza.c
new file mode 100644
index 0000000..8ed8726
--- /dev/null
+++ b/MakefileBasedBuild/app/eliza.c
@@ -0,0 +1,412 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#define ADK_INTERNAL
+#include "fwk.h"
+#include "btRFCOMM.h"
+#include "btSDP.h"
+#include "btL2CAP.h"
+#include "dbg.h"
+#include <string.h>
+
+
+
+static void elzSetup(void);
+static char* elzTalk(char* Is);
+
+#define MAGIX 0xFA
+
+static uint8_t sdpDescrEliza[] = //we are connectible to on unsecured channel of ADK chat app
+{
+ //service class ID list
+ SDP_ITEM_DESC(SDP_TYPE_UINT, SDP_SZ_2), 0x00, 0x01, SDP_ITEM_DESC(SDP_TYPE_ARRAY, SDP_SZ_u8), 17,
+ SDP_ITEM_DESC(SDP_TYPE_UUID, SDP_SZ_16), 0x8c, 0xe2, 0x55, 0xc0, 0x20, 0x0a, 0x11, 0xe0, 0xac, 0x64, 0x08, 0x00, 0x20, 0x0c, 0x9a, 0x66,
+ //ServiceId
+ SDP_ITEM_DESC(SDP_TYPE_UINT, SDP_SZ_2), 0x00, 0x03, SDP_ITEM_DESC(SDP_TYPE_UUID, SDP_SZ_2), 0x11, 0x01,
+ //ProtocolDescriptorList
+ SDP_ITEM_DESC(SDP_TYPE_UINT, SDP_SZ_2), 0x00, 0x04, SDP_ITEM_DESC(SDP_TYPE_ARRAY, SDP_SZ_u8), 15,
+ SDP_ITEM_DESC(SDP_TYPE_ARRAY, SDP_SZ_u8), 6,
+ SDP_ITEM_DESC(SDP_TYPE_UUID, SDP_SZ_2), 0x01, 0x00, // L2CAP
+ SDP_ITEM_DESC(SDP_TYPE_UINT, SDP_SZ_2), L2CAP_PSM_RFCOMM >> 8, L2CAP_PSM_RFCOMM & 0xFF, // L2CAP PSM
+ SDP_ITEM_DESC(SDP_TYPE_ARRAY, SDP_SZ_u8), 5,
+ SDP_ITEM_DESC(SDP_TYPE_UUID, SDP_SZ_2), 0x00, 0x03, // RFCOMM
+ SDP_ITEM_DESC(SDP_TYPE_UINT, SDP_SZ_1), MAGIX, // port ###
+ //browse group list
+ SDP_ITEM_DESC(SDP_TYPE_UINT, SDP_SZ_2), 0x00, 0x05, SDP_ITEM_DESC(SDP_TYPE_ARRAY, SDP_SZ_u8), 3,
+ SDP_ITEM_DESC(SDP_TYPE_UUID, SDP_SZ_2), 0x10, 0x02, // Public Browse Group
+ //name
+ SDP_ITEM_DESC(SDP_TYPE_UINT, SDP_SZ_2), 0x01, 0x00, SDP_ITEM_DESC(SDP_TYPE_TEXT, SDP_SZ_u8), 5, 'E', 'L', 'I', 'Z', 'A'
+};
+
+
+static void elzPortOpen(void* port, uint8_t dlci){
+
+ dbgPrintf("Remote client joined...\n");
+ elzSetup();
+}
+
+static void elzPortClose(void* port, uint8_t dlci){
+
+ dbgPrintf("Remote client left...\n");
+}
+
+static void elzPortRx(void* port, uint8_t dlci, const uint8_t* data, uint16_t sz){
+
+ char *c, *r;
+
+ while(data[sz - 1] == '\n') sz--;
+
+ c = malloc(sz + 1);
+ if(c){
+
+ memcpy(c, data, sz);
+ c[sz] = 0;
+ r = elzTalk(c);
+ if(r){
+ btRfcommPortTx(port, dlci, r, strlen(r));
+ free(r);
+ return;
+ }
+ }
+ btRfcommPortTx(port, dlci, "OUT OF MEMORY", 13);
+}
+
+void eliza(void){
+
+ uint8_t i, dlci = btRfcommReserveDlci(RFCOMM_DLCI_NEED_EVEN);
+ int f;
+
+ if(!dlci) dbgPrintf("ELIZA: failed to allocate DLCI\n");
+ else{
+
+ //change descriptor to be valid...
+ for(i = 0, f = -1; i < sizeof(sdpDescrEliza); i++){
+
+ if(sdpDescrEliza[i] == MAGIX){
+ if(f == -1) f = i;
+ else break;
+ }
+ }
+
+ if(i != sizeof(sdpDescrEliza) || f == -1){
+
+ dbgPrintf("ELIZA: failed to find a single marker in descriptor\n");
+ btRfcommReleaseDlci(dlci);
+ return;
+ }
+
+ sdpDescrEliza[f] = dlci >> 1;
+
+ btRfcommRegisterPort(dlci, elzPortOpen, elzPortClose, elzPortRx);
+ btSdpServiceDescriptorAdd(sdpDescrEliza, sizeof(sdpDescrEliza));
+ }
+}
+
+
+
+/////////////////utils
+
+char* cat(char* a, char *b){
+
+ char* r = malloc(strlen(a) + strlen(b) + 1);
+
+ strcpy(r, a);
+ strcat(r, b);
+ free(a);
+ free(b);
+ return r;
+}
+
+#define conststr(s) strdup(s)
+#define dup(s) strdup(s)
+
+char streq(char* a, char* b){
+
+ char ret = !strcmp(a,b);
+
+ free(a);
+ free(b);
+
+ return ret;
+}
+
+char* mid(char* str, long start, long len){
+
+ char* r = malloc(len + 1);
+ memcpy(r, str + start, len);
+ r[len] = 0;
+
+ return r;
+}
+
+char* right(char* str, long len){
+
+ if(strlen(str) < len) len = strlen(str);
+
+ return mid(str, strlen(str) - len, len);
+}
+
+
+
+
+
+
+
+
+
+///////////////////////////////////////////////////////////////////////////
+// ORIGINAL: http://www.vintagecomputer.net/commodore/64/TOK64/ELIZA.txt //
+// BASIC TO C PORT: Dmitry Grinberg (dmitrygr@gmail.com) //
+///////////////////////////////////////////////////////////////////////////
+
+
+
+static const char* data0[] =
+{
+ "CAN YOU","CAN I","YOU ARE","YOURE","I DONT","I FEEL",
+ "WHY DONT YOU","WHY CANT I","ARE YOU","I CANT","I AM"," IM ",
+ "YOU","I WANT","WHAT","HOW","WHO","WHERE","WHEN","WHY",
+ "NAME","CAUSE","SORRY","DREAM","HELLO","HI","MAYBE",
+ "NO","YOUR","ALWAYS","THINK","ALIKE","YES","FRIEND",
+ "COMPUTER","NOKEYFOUND"
+};
+
+static const char* data1[] =
+{
+ " ARE "," AM ","WERE ","WAS "," YOU "," I ","YOUR ","MY ",
+ " IVE "," YOUVE "," IM "," YOURE ", " YOU ", " ME "
+};
+
+static const char* data2[] =
+{
+ "DON'T YOU BELIEVE THAT I CAN.","PERHAPS YOU WOULD LIKE TO BE ABLE TO.",
+ "YOU WANT ME TO BE ABLE TO*","PERHAPS YOU DON'T WANT TO*",
+ "DO YOU WANT TO BE ABLE TO*","WHAT MAKES YOU THINK I AM*",
+ "DOES IT PLEASE YOU TO BELIEVE I AM*","PERHAPS YOU WOULD LIKE TO BE*",
+ "DO YOU SOMETIMES WISH YOU WERE*","DON'T YOU REALLY*","WHY DON'T YOU*",
+ "DO YOU WISH TO BE ABLE TO*","DOES THAT TROUBLE YOU?",
+ "TELL ME MORE ABOUT SUCH FEELINGS*","DO YOU OFTEN FEEL*",
+ "DO YOU ENJOY FEELING*","DO YOU REALLY BELIEVE I DON'T*",
+ "PERHAPS IN GD TIME I WILL*","DO YOU WANT ME TO*",
+ "DO YOU THINK YOU SHOULD BE ABLE TO*","WHY CAN'T YOU*",
+ "WHY ARE YOU INTERESTED IN WHETHER OR NOT I AM*",
+ "WOULD YOU PREFER IF I WERE NOT*","PERHAPS IN YOUR FANTASIES I AM*",
+ "HOW DO YOU KNOW YOU CAN'T*","HAVE YOU TRIED?","PERHAPS YOU CAN NOW*",
+ "DID YOU COME TO ME BECAUSE YOU ARE*","HOW LONG HAVE YOU BEEN*",
+ "DO YOU BELIEVE IT IS NORMAL TO BE*","DO YOU ENJOY BEING*",
+ "WE WERE DISCUSSING YOU-- NOT ME.","OH, I*",
+ "YOU'RE NOT REALLY TALKING ABOUT ME. ARE YOU?",
+ "WHAT WOULD IT MEAN TO YOU IF YOU GOT*","WHY DO YOU WANT*",
+ "SUPPOSE YOU SOON GOT*","WHAT IF YOU NEVER GOT*","I SOMETIMES ALSO WANT*",
+ "WHY DO YOU ASK?","DOES THAT QUESTION INTEREST YOU?",
+ "WHAT ANSWER WOULD PLEASE YOU THE MOST?","WHAT DO YOU THINK?",
+ "ARE SUCH QUESTIONS ON YOUR MIND OFTEN?",
+ "WHAT IS IT THAT YOU REALLY WANT TO KNOW?","HAVE YOU ASKED ANYONE ELSE?",
+ "HAVE YOU ASKED SUCH QUESTIONS BEFORE?",
+ "WHAT ELSE COMES TO MIND WHEN YOU ASK THAT?","NAMES DON'T INTEREST ME.",
+ "I DON'T CARE ABOUT NAMES-- PLEASE GO ON.","IS THAT THE REAL REASON?",
+ "DON'T ANY OTHER REASONS COME TO MIND?",
+ "DOES THAT REASON EXPLAIN ANYTHING ELSE?","WHAT OTHER REASONS MIGHT THERE BE?",
+ "PLEASE DON'T APOLOGIZE.","APOLOGIES ARE NOT NECESSARY.",
+ "WHAT FEELINGS DO YOU HAVE WHEN YOU APOLOGIZE.","DON'T BE SO DEFENSIVE!",
+ "WHAT DOES THAT DREAM SUGGEST TO YOU?","DO YOU DREAM OFTEN?",
+ "WHAT PERSONS APPEAR IN YOUR DREAMS?","ARE YOU DISTURBED BY YOUR DREAMS?",
+ "HOW DO YOU DO .,. PLEASE STATE YOUR PROBLEM.","YOU DON'T SEEM QUITE CERTAIN.",
+ "WHY THE UNCERTAIN TONE?","CAN'T YOU BE MORE POSITIVE?","YOU AREN'T SURE?",
+ "DON'T YOU KNOW?","ARE YOU SAYING NO JUST TO BE NEGATIVE?",
+ "YOU ARE BEING A BIT NEGATIVE.","WHY NOT?","ARE YOU SURE?","WHY NO?",
+ "WHY ARE YOU CONCERNED ABOUT MY*","WHAT ABOUT YOUR OWN*",
+ "CAN'T YOU THINK OF A SPECIFIC EXAMPLE?","WHEN?","WHAT ARE YOU THINKING OF?",
+ "REALLY. ALWAYS?","DO YOU REALLY THINK SO?","BUT YOU ARE NOT SURE YOU.",
+ "DO YOU DOUBT YOU.","IN WHAT WAY?","WHAT RESEMBLANCE DO YOU SEE?",
+ "WHAT DOES THE SIMILARITY SUGGEST TO YOU?",
+ "WHAT OTHER CONNECTIONS DO YOU SEE?","COULD THERE REALLY BE SOME CONNECTION?",
+ "HOW?","YOU SEEM QUITE POSITIVE.","ARE YOU SURE?","I SEE.","I UNDERSTAND.",
+ "WHY DO YOU BRING UP THE TOPIC OF FRIENDS?","DO YOUR FRIENDS WORRY YOU?",
+ "DO YOUR FRIENDS PICK ON YOU?","ARE YOU SURE YOU HAVE ANY FRIENDS?",
+ "DO YOU IMPOSE ON YOUR FRIENDS?","PERHAPS YOUR LOVE FOR FRIENDS WORRIES YOU.",
+ "DO COMPUTERS WORRY YOU?","ARE YOU TALKING ABOUT ME IN PARTICULAR?",
+ "ARE YOU FRIGHTENED BY MACHINES?","WHY DO YOU MENTION COMPUTERS?",
+ "WHAT DO YOU THINK MACHINES HAVE TO DO WITH YOUR PROBLEM?",
+ "DON'T YOU THINK COMPUTERS CAN HELP PEOPLE?",
+ "WHAT IS IT ABOUT MACHINES THAT WORRIES YOU?",
+ "SAY, DO YOU HAVE ANY PSYCHOLOGICAL PROBLEMS?",
+ "WHAT DOES THAT SUGGEST TO YOU?","I SEE.",
+ "I'M NOT SURE I UNDERSTAND YOU FULLY.","COME COME ELUCIDATE YOUR THOUGHTS.",
+ "CAN YOU ELABORATE ON THAT?","THAT IS QUITE INTERESTING."
+};
+
+static const char data3[] =
+{
+ 1,3,4,2,6,4,6,4,10,4,14,3,17,3,20,2,22,3,25,3,
+ 28,4,28,4,32,3,35,5,40,9,40,9,40,9,40,9,40,9,40,9,
+ 49,2,51,4,55,4,59,4,63,1,63,1,64,5,69,5,74,2,76,4,
+ 80,3,83,7,90,3,93,6,99,7,106,6
+};
+
+
+char S[36], R[36], N[36];
+const char N1 = 36, N2 = 14, N3 = 112;
+char* Ps = NULL;
+
+static void elzSetup(void){
+
+ char X;
+ const char* ptr = data3;
+
+ for(X = 0; X < N1; X++){
+
+ R[X] = S[X] = *ptr++;
+ N[X] = S[X] - 1 + *ptr++;
+ }
+}
+
+static char* elzTalk(char* Is){
+
+ const char *Fs;
+ char *Cs = NULL;
+ char result[128] = {0};
+ int X, Si, K, L, T;
+
+ //-----USER INPUT SECTION-----
+ // * UPCASE
+ // * GET RID OF APOSTROPHES
+ // * ADD SPACES IN FRONT AND BACK
+ {
+ char _c, *_s, *_t;
+
+ _s = malloc(strlen(Is) + 3);
+ _t = Is;
+ X = 0;
+ _s[X++] = ' ';
+
+ while((_c = *_t++)){
+
+ if(_c >= 'a' && _c <= 'z') _c += 'A' - 'a';
+ if(_c == '\'') continue;
+ _s[X++] = _c;
+ }
+ _s[X++] = ' ';
+ _s[X] = 0;
+ free(Is);
+ Is = _s;
+
+ if(strstr(Is, "SHUT")) strcat(result, "SHUT UP...\n");
+
+ if(Ps && !strcmp(Is, Ps)){
+
+ strcat(result, "PLEASE DON'T REPEAT YOURSELF!\n");
+ goto out;
+ }
+ }
+
+ //-----FIND KEYWORD IN I$-----
+ {
+
+ const char* Ks;
+ const char* _s;
+
+ Si = -1;
+ for(K = 0; K < N1; K++){
+ if(Si >= 0) continue;
+ for(L = 0; L <= (signed)strlen(Is) - (signed)strlen(data0[K]); L++){
+
+ if(!memcmp(Is + L, data0[K], strlen(data0[K]))){
+
+ Si = K;
+ T = L;
+ Fs = data0[K];
+ }
+ }
+ }
+
+ if(Si < 0) K = 35;//WE DIDN'T FIND ANY KEYWORDS
+ else{
+
+ const char *Rs, *Ss;
+
+ K = Si;
+ L = T;
+
+ //TAKE RIGHT PART OF STRING AND CONJUGATE IT
+ //USING THE LIST OF STRINGS TO BE SWAPPED
+
+ Cs = malloc(strlen(Is) - strlen(Fs) - L + 3);
+ Cs[0] = ' ';
+ strcpy(Cs + 1, Is + L + strlen(Fs));
+ if(Ps) free(Ps);
+ Ps = Is;
+ Is = NULL;
+
+ for(X = 0; X < N2 / 2; X++){
+
+ Ss = data1[X * 2 + 0];
+ Rs = data1[X * 2 + 1];
+
+ for(L = 0; L < strlen(Cs); L++){
+
+ char _i;
+ const char* _f = Ss;
+ const char* _r = Rs;
+
+ for(_i = 0; _i < 2; _i++){
+
+ if(!memcmp(Cs + L, _f, strlen(_f))){
+ Is = malloc(strlen(Cs) - strlen(_f) + strlen(_r) + 1);
+
+ memmove(Is, Cs, L);
+ strcpy(Is + L, _r);
+ strcat(Is, Cs + L + strlen(_f));
+ free(Cs);
+ Cs = Is;
+ Is = NULL;
+
+ L += strlen(_r);
+ break;
+ }
+ _f = Rs;
+ _r = Ss;
+ }
+ }
+ }
+
+ if(Cs[0] == ' ' && Cs[1] == ' ') memmove(Cs, Cs + 1, strlen(Cs)); //ONLY 1 SPACE
+ }
+ }
+
+ //NOW USING THE KEYWORD NUMBER (K) GET REPLY
+ {
+
+ //READ RIGHT REPLY
+ Fs = data2[R[K] - 1];
+ R[K]++;
+ if(R[K] > N[K]) R[K] = S[K];
+
+ strcat(result, Fs);
+ if(result[strlen(result) - 1] == '*'){
+
+ result[strlen(result) - 1] = 0;
+ strcat(result, Cs);
+ }
+ }
+ if(Cs) free(Cs);
+
+out:
+ if(Is) free(Is);
+ return strdup(result);
+}
+
+
+
diff --git a/MakefileBasedBuild/app/f_diskio.h b/MakefileBasedBuild/app/f_diskio.h
new file mode 100644
index 0000000..008cbde
--- /dev/null
+++ b/MakefileBasedBuild/app/f_diskio.h
@@ -0,0 +1,80 @@
+#ifdef ADK_INTERNAL
+/*-----------------------------------------------------------------------
+/ Low level disk interface modlue include file
+/-----------------------------------------------------------------------*/
+
+#ifndef _DISKIO
+
+#define _READONLY 0 /* 1: Remove write functions */
+#define _USE_IOCTL 1 /* 1: Use disk_ioctl fucntion */
+
+#include "f_integer.h"
+
+
+/* Status of Disk Functions */
+typedef BYTE DSTATUS;
+
+/* Results of Disk Functions */
+typedef enum {
+ RES_OK = 0, /* 0: Successful */
+ RES_ERROR, /* 1: R/W Error */
+ RES_WRPRT, /* 2: Write Protected */
+ RES_NOTRDY, /* 3: Not Ready */
+ RES_PARERR /* 4: Invalid Parameter */
+} DRESULT;
+
+
+/*---------------------------------------*/
+/* Prototypes for disk control functions */
+
+DSTATUS disk_initialize (BYTE);
+DSTATUS disk_status (BYTE);
+DRESULT disk_read (BYTE, BYTE*, DWORD, BYTE);
+#if _READONLY == 0
+DRESULT disk_write (BYTE, const BYTE*, DWORD, BYTE);
+#endif
+DRESULT disk_ioctl (BYTE, BYTE, void*);
+
+
+
+/* Disk Status Bits (DSTATUS) */
+
+#define STA_NOINIT 0x01 /* Drive not initialized */
+#define STA_NODISK 0x02 /* No medium in the drive */
+#define STA_PROTECT 0x04 /* Write protected */
+
+
+/* Command code for disk_ioctrl fucntion */
+
+/* Generic command (defined for FatFs) */
+#define CTRL_SYNC 0 /* Flush disk cache (for write functions) */
+#define GET_SECTOR_COUNT 1 /* Get media size (for only f_mkfs()) */
+#define GET_SECTOR_SIZE 2 /* Get sector size (for multiple sector size (_MAX_SS >= 1024)) */
+#define GET_BLOCK_SIZE 3 /* Get erase block size (for only f_mkfs()) */
+#define CTRL_ERASE_SECTOR 4 /* Force erased a block of sectors (for only _USE_ERASE) */
+
+/* Generic command */
+#define CTRL_POWER 5 /* Get/Set power status */
+#define CTRL_LOCK 6 /* Lock/Unlock media removal */
+#define CTRL_EJECT 7 /* Eject media */
+
+/* MMC/SDC specific ioctl command */
+#define MMC_GET_TYPE 10 /* Get card type */
+#define MMC_GET_CSD 11 /* Get CSD */
+#define MMC_GET_CID 12 /* Get CID */
+#define MMC_GET_OCR 13 /* Get OCR */
+#define MMC_GET_SDSTAT 14 /* Get SD status */
+
+/* ATA/CF specific ioctl command */
+#define ATA_GET_REV 20 /* Get F/W revision */
+#define ATA_GET_MODEL 21 /* Get model name */
+#define ATA_GET_SN 22 /* Get serial number */
+
+/* NAND specific ioctl command */
+#define NAND_FORMAT 30 /* Create physical format */
+
+
+#define _DISKIO
+#endif
+#endif
+
diff --git a/MakefileBasedBuild/app/f_ff.c b/MakefileBasedBuild/app/f_ff.c
new file mode 100644
index 0000000..dd89e66
--- /dev/null
+++ b/MakefileBasedBuild/app/f_ff.c
@@ -0,0 +1,3988 @@
+#define ADK_INTERNAL
+/*----------------------------------------------------------------------------/
+/ FatFs - FAT file system module R0.08b (C)ChaN, 2011
+/-----------------------------------------------------------------------------/
+/ FatFs module is a generic FAT file system module for small embedded systems.
+/ This is a free software that opened for education, research and commercial
+/ developments under license policy of following terms.
+/
+/ Copyright (C) 2011, ChaN, all right reserved.
+/
+/ * The FatFs module is a free software and there is NO WARRANTY.
+/ * No restriction on use. You can use, modify and redistribute it for
+/ personal, non-profit or commercial products UNDER YOUR RESPONSIBILITY.
+/ * Redistributions of source code must retain the above copyright notice.
+/
+/-----------------------------------------------------------------------------/
+/ Feb 26,'06 R0.00 Prototype.
+/
+/ Apr 29,'06 R0.01 First stable version.
+/
+/ Jun 01,'06 R0.02 Added FAT12 support.
+/ Removed unbuffered mode.
+/ Fixed a problem on small (<32M) partition.
+/ Jun 10,'06 R0.02a Added a configuration option (_FS_MINIMUM).
+/
+/ Sep 22,'06 R0.03 Added f_rename().
+/ Changed option _FS_MINIMUM to _FS_MINIMIZE.
+/ Dec 11,'06 R0.03a Improved cluster scan algorithm to write files fast.
+/ Fixed f_mkdir() creates incorrect directory on FAT32.
+/
+/ Feb 04,'07 R0.04 Supported multiple drive system.
+/ Changed some interfaces for multiple drive system.
+/ Changed f_mountdrv() to f_mount().
+/ Added f_mkfs().
+/ Apr 01,'07 R0.04a Supported multiple partitions on a physical drive.
+/ Added a capability of extending file size to f_lseek().
+/ Added minimization level 3.
+/ Fixed an endian sensitive code in f_mkfs().
+/ May 05,'07 R0.04b Added a configuration option _USE_NTFLAG.
+/ Added FSInfo support.
+/ Fixed DBCS name can result FR_INVALID_NAME.
+/ Fixed short seek (<= csize) collapses the file object.
+/
+/ Aug 25,'07 R0.05 Changed arguments of f_read(), f_write() and f_mkfs().
+/ Fixed f_mkfs() on FAT32 creates incorrect FSInfo.
+/ Fixed f_mkdir() on FAT32 creates incorrect directory.
+/ Feb 03,'08 R0.05a Added f_truncate() and f_utime().
+/ Fixed off by one error at FAT sub-type determination.
+/ Fixed btr in f_read() can be mistruncated.
+/ Fixed cached sector is not flushed when create and close without write.
+/
+/ Apr 01,'08 R0.06 Added fputc(), fputs(), fprintf() and fgets().
+/ Improved performance of f_lseek() on moving to the same or following cluster.
+/
+/ Apr 01,'09 R0.07 Merged Tiny-FatFs as a configuration option. (_FS_TINY)
+/ Added long file name feature.
+/ Added multiple code page feature.
+/ Added re-entrancy for multitask operation.
+/ Added auto cluster size selection to f_mkfs().
+/ Added rewind option to f_readdir().
+/ Changed result code of critical errors.
+/ Renamed string functions to avoid name collision.
+/ Apr 14,'09 R0.07a Separated out OS dependent code on reentrant cfg.
+/ Added multiple sector size feature.
+/ Jun 21,'09 R0.07c Fixed f_unlink() can return FR_OK on error.
+/ Fixed wrong cache control in f_lseek().
+/ Added relative path feature.
+/ Added f_chdir() and f_chdrive().
+/ Added proper case conversion to extended char.
+/ Nov 03,'09 R0.07e Separated out configuration options from ff.h to ffconf.h.
+/ Fixed f_unlink() fails to remove a sub-dir on _FS_RPATH.
+/ Fixed name matching error on the 13 char boundary.
+/ Added a configuration option, _LFN_UNICODE.
+/ Changed f_readdir() to return the SFN with always upper case on non-LFN cfg.
+/
+/ May 15,'10 R0.08 Added a memory configuration option. (_USE_LFN = 3)
+/ Added file lock feature. (_FS_SHARE)
+/ Added fast seek feature. (_USE_FASTSEEK)
+/ Changed some types on the API, XCHAR->TCHAR.
+/ Changed fname member in the FILINFO structure on Unicode cfg.
+/ String functions support UTF-8 encoding files on Unicode cfg.
+/ Aug 16,'10 R0.08a Added f_getcwd(). (_FS_RPATH = 2)
+/ Added sector erase feature. (_USE_ERASE)
+/ Moved file lock semaphore table from fs object to the bss.
+/ Fixed a wrong directory entry is created on non-LFN cfg when the given name contains ';'.
+/ Fixed f_mkfs() creates wrong FAT32 volume.
+/ Jan 15,'11 R0.08b Fast seek feature is also applied to f_read() and f_write().
+/ f_lseek() reports required table size on creating CLMP.
+/ Extended format syntax of f_printf function.
+/ Ignores duplicated directory separators in given path names.
+/---------------------------------------------------------------------------*/
+
+#include "f_ff.h" /* FatFs configurations and declarations */
+#include "f_diskio.h" /* Declarations of low level disk I/O functions */
+
+
+/*--------------------------------------------------------------------------
+
+ Module Private Definitions
+
+---------------------------------------------------------------------------*/
+
+#if _FATFS != 8237
+#error Wrong include file (ff.h).
+#endif
+
+
+/* Definitions on sector size */
+#if _MAX_SS != 512 && _MAX_SS != 1024 && _MAX_SS != 2048 && _MAX_SS != 4096
+#error Wrong sector size.
+#endif
+#if _MAX_SS != 512
+#define SS(fs) ((fs)->ssize) /* Multiple sector size */
+#else
+#define SS(fs) 512U /* Fixed sector size */
+#endif
+
+
+/* Reentrancy related */
+#if _FS_REENTRANT
+#if _USE_LFN == 1
+#error Static LFN work area must not be used in re-entrant configuration.
+#endif
+#define ENTER_FF(fs) { if (!lock_fs(fs)) return FR_TIMEOUT; }
+#define LEAVE_FF(fs, res) { unlock_fs(fs, res); return res; }
+#else
+#define ENTER_FF(fs)
+#define LEAVE_FF(fs, res) return res
+#endif
+
+#define ABORT(fs, res) { fp->flag |= FA__ERROR; LEAVE_FF(fs, res); }
+
+
+/* File shareing feature */
+#if _FS_SHARE
+#if _FS_READONLY
+#error _FS_SHARE must be 0 on read-only cfg.
+#endif
+typedef struct {
+ FATFS *fs; /* File ID 1, volume (NULL:blank entry) */
+ DWORD clu; /* File ID 2, directory */
+ WORD idx; /* File ID 3, directory index */
+ WORD ctr; /* File open counter, 0:none, 0x01..0xFF:read open count, 0x100:write mode */
+} FILESEM;
+#endif
+
+
+/* Misc definitions */
+#define LD_CLUST(dir) (((DWORD)LD_WORD(dir+DIR_FstClusHI)<<16) | LD_WORD(dir+DIR_FstClusLO))
+#define ST_CLUST(dir,cl) {ST_WORD(dir+DIR_FstClusLO, cl); ST_WORD(dir+DIR_FstClusHI, (DWORD)cl>>16);}
+
+
+#if 0 /* Removed to ff.h for application usage, by ATMEL */
+/* DBCS code ranges and SBCS extend char conversion table */
+
+#if _CODE_PAGE == 932 /* Japanese Shift-JIS */
+#define _DF1S 0x81 /* DBC 1st byte range 1 start */
+#define _DF1E 0x9F /* DBC 1st byte range 1 end */
+#define _DF2S 0xE0 /* DBC 1st byte range 2 start */
+#define _DF2E 0xFC /* DBC 1st byte range 2 end */
+#define _DS1S 0x40 /* DBC 2nd byte range 1 start */
+#define _DS1E 0x7E /* DBC 2nd byte range 1 end */
+#define _DS2S 0x80 /* DBC 2nd byte range 2 start */
+#define _DS2E 0xFC /* DBC 2nd byte range 2 end */
+
+#elif _CODE_PAGE == 936 /* Simplified Chinese GBK */
+#define _DF1S 0x81
+#define _DF1E 0xFE
+#define _DS1S 0x40
+#define _DS1E 0x7E
+#define _DS2S 0x80
+#define _DS2E 0xFE
+
+#elif _CODE_PAGE == 949 /* Korean */
+#define _DF1S 0x81
+#define _DF1E 0xFE
+#define _DS1S 0x41
+#define _DS1E 0x5A
+#define _DS2S 0x61
+#define _DS2E 0x7A
+#define _DS3S 0x81
+#define _DS3E 0xFE
+
+#elif _CODE_PAGE == 950 /* Traditional Chinese Big5 */
+#define _DF1S 0x81
+#define _DF1E 0xFE
+#define _DS1S 0x40
+#define _DS1E 0x7E
+#define _DS2S 0xA1
+#define _DS2E 0xFE
+
+#elif _CODE_PAGE == 437 /* U.S. (OEM) */
+#define _DF1S 0
+#define _EXCVT {0x80,0x9A,0x90,0x41,0x8E,0x41,0x8F,0x80,0x45,0x45,0x45,0x49,0x49,0x49,0x8E,0x8F,0x90,0x92,0x92,0x4F,0x99,0x4F,0x55,0x55,0x59,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \
+ 0x41,0x49,0x4F,0x55,0xA5,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0x21,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xD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xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \
+ 0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF}
+
+#elif _CODE_PAGE == 866 /* Russian (OEM) */
+#define _DF1S 0
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \
+ 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \
+ 0x90,0x91,0x92,0x93,0x9d,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,0xF0,0xF0,0xF2,0xF2,0xF4,0xF4,0xF6,0xF6,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF}
+
+#elif _CODE_PAGE == 874 /* Thai (OEM, Windows) */
+#define _DF1S 0
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x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, Windows) */
+#define _DF1S 0
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0xAC,0x9D,0x9E,0x9F, \
+ 0xA0,0x21,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xEC,0xCD,0xCE,0xCF,0xD0,0xD1,0xF2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xFE,0x9F}
+
+#elif _CODE_PAGE == 1 /* ASCII (for only non-LFN cfg) */
+#if _USE_LFN
+#error Cannot use LFN feature without valid code page.
+#endif
+#define _DF1S 0
+
+#else
+#error Unknown code page
+
+#endif
+#endif
+
+/* Character code support macros */
+#define IsUpper(c) (((c)>='A')&&((c)<='Z'))
+#define IsLower(c) (((c)>='a')&&((c)<='z'))
+#define IsDigit(c) (((c)>='0')&&((c)<='9'))
+
+#if _DF1S /* Code page is DBCS */
+
+#ifdef _DF2S /* Two 1st byte areas */
+#define IsDBCS1(c) (((BYTE)(c) >= _DF1S && (BYTE)(c) <= _DF1E) || ((BYTE)(c) >= _DF2S && (BYTE)(c) <= _DF2E))
+#else /* One 1st byte area */
+#define IsDBCS1(c) ((BYTE)(c) >= _DF1S && (BYTE)(c) <= _DF1E)
+#endif
+
+#ifdef _DS3S /* Three 2nd byte areas */
+#define IsDBCS2(c) (((BYTE)(c) >= _DS1S && (BYTE)(c) <= _DS1E) || ((BYTE)(c) >= _DS2S && (BYTE)(c) <= _DS2E) || ((BYTE)(c) >= _DS3S && (BYTE)(c) <= _DS3E))
+#else /* Two 2nd byte areas */
+#define IsDBCS2(c) (((BYTE)(c) >= _DS1S && (BYTE)(c) <= _DS1E) || ((BYTE)(c) >= _DS2S && (BYTE)(c) <= _DS2E))
+#endif
+
+#else /* Code page is SBCS */
+
+#define IsDBCS1(c) 0
+#define IsDBCS2(c) 0
+
+#endif /* _DF1S */
+
+
+/* Name status flags */
+#define NS 11 /* Index of name status byte in fn[] */
+#define NS_LOSS 0x01 /* Out of 8.3 format */
+#define NS_LFN 0x02 /* Force to create LFN entry */
+#define NS_LAST 0x04 /* Last segment */
+#define NS_BODY 0x08 /* Lower case flag (body) */
+#define NS_EXT 0x10 /* Lower case flag (ext) */
+#define NS_DOT 0x20 /* Dot entry */
+
+
+/* FAT sub-type boundaries */
+/* Note that the FAT spec by Microsoft says 4085 but Windows works with 4087! */
+#define MIN_FAT16 4086 /* Minimum number of clusters for FAT16 */
+#define MIN_FAT32 65526 /* Minimum number of clusters for FAT32 */
+
+
+/* FatFs refers the members in the FAT structures as byte array instead of
+/ structure member because the structure is not binary compatible between
+/ different platforms */
+
+#define BS_jmpBoot 0 /* Jump instruction (3) */
+#define BS_OEMName 3 /* OEM name (8) */
+#define BPB_BytsPerSec 11 /* Sector size [byte] (2) */
+#define BPB_SecPerClus 13 /* Cluster size [sector] (1) */
+#define BPB_RsvdSecCnt 14 /* Size of reserved area [sector] (2) */
+#define BPB_NumFATs 16 /* Number of FAT copies (1) */
+#define BPB_RootEntCnt 17 /* Number of root dir entries for FAT12/16 (2) */
+#define BPB_TotSec16 19 /* Volume size [sector] (2) */
+#define BPB_Media 21 /* Media descriptor (1) */
+#define BPB_FATSz16 22 /* FAT size [sector] (2) */
+#define BPB_SecPerTrk 24 /* Track size [sector] (2) */
+#define BPB_NumHeads 26 /* Number of heads (2) */
+#define BPB_HiddSec 28 /* Number of special hidden sectors (4) */
+#define BPB_TotSec32 32 /* Volume size [sector] (4) */
+#define BS_DrvNum 36 /* Physical drive number (2) */
+#define BS_BootSig 38 /* Extended boot signature (1) */
+#define BS_VolID 39 /* Volume serial number (4) */
+#define BS_VolLab 43 /* Volume label (8) */
+#define BS_FilSysType 54 /* File system type (1) */
+#define BPB_FATSz32 36 /* FAT size [sector] (4) */
+#define BPB_ExtFlags 40 /* Extended flags (2) */
+#define BPB_FSVer 42 /* File system version (2) */
+#define BPB_RootClus 44 /* Root dir first cluster (4) */
+#define BPB_FSInfo 48 /* Offset of FSInfo sector (2) */
+#define BPB_BkBootSec 50 /* Offset of backup boot sectot (2) */
+#define BS_DrvNum32 64 /* Physical drive number (2) */
+#define BS_BootSig32 66 /* Extended boot signature (1) */
+#define BS_VolID32 67 /* Volume serial number (4) */
+#define BS_VolLab32 71 /* Volume label (8) */
+#define BS_FilSysType32 82 /* File system type (1) */
+#define FSI_LeadSig 0 /* FSI: Leading signature (4) */
+#define FSI_StrucSig 484 /* FSI: Structure signature (4) */
+#define FSI_Free_Count 488 /* FSI: Number of free clusters (4) */
+#define FSI_Nxt_Free 492 /* FSI: Last allocated cluster (4) */
+#define MBR_Table 446 /* MBR: Partition table offset (2) */
+#define SZ_PTE 16 /* MBR: Size of a partition table entry */
+#define BS_55AA 510 /* Boot sector signature (2) */
+
+#define DIR_Name 0 /* Short file name (11) */
+#define DIR_Attr 11 /* Attribute (1) */
+#define DIR_NTres 12 /* NT flag (1) */
+#define DIR_CrtTime 14 /* Created time (2) */
+#define DIR_CrtDate 16 /* Created date (2) */
+#define DIR_FstClusHI 20 /* Higher 16-bit of first cluster (2) */
+#define DIR_WrtTime 22 /* Modified time (2) */
+#define DIR_WrtDate 24 /* Modified date (2) */
+#define DIR_FstClusLO 26 /* Lower 16-bit of first cluster (2) */
+#define DIR_FileSize 28 /* File size (4) */
+#define LDIR_Ord 0 /* LFN entry order and LLE flag (1) */
+#define LDIR_Attr 11 /* LFN attribute (1) */
+#define LDIR_Type 12 /* LFN type (1) */
+#define LDIR_Chksum 13 /* Sum of corresponding SFN entry */
+#define LDIR_FstClusLO 26 /* Filled by zero (0) */
+#define SZ_DIR 32 /* Size of a directory entry */
+#define LLE 0x40 /* Last long entry flag in LDIR_Ord */
+#define DDE 0xE5 /* Deleted directory enrty mark in DIR_Name[0] */
+#define NDDE 0x05 /* Replacement of a character collides with DDE */
+
+
+/*------------------------------------------------------------*/
+/* Work area */
+
+#if _VOLUMES
+static
+FATFS *FatFs[_VOLUMES]; /* Pointer to the file system objects (logical drives) */
+#else
+#error Number of drives must not be 0.
+#endif
+
+static
+WORD Fsid; /* File system mount ID */
+
+#if _FS_RPATH
+static
+BYTE CurrVol; /* Current drive */
+#endif
+
+#if _FS_SHARE
+static
+FILESEM Files[_FS_SHARE]; /* File lock semaphores */
+#endif
+
+#if _USE_LFN == 0 /* No LFN */
+#define DEF_NAMEBUF BYTE sfn[12]
+#define INIT_BUF(dobj) (dobj).fn = sfn
+#define FREE_BUF()
+
+#elif _USE_LFN == 1 /* LFN with static LFN working buffer */
+static WCHAR LfnBuf[_MAX_LFN+1];
+#define DEF_NAMEBUF BYTE sfn[12]
+#define INIT_BUF(dobj) { (dobj).fn = sfn; (dobj).lfn = LfnBuf; }
+#define FREE_BUF()
+
+#elif _USE_LFN == 2 /* LFN with dynamic LFN working buffer on the stack */
+#define DEF_NAMEBUF BYTE sfn[12]; WCHAR lbuf[_MAX_LFN+1]
+#define INIT_BUF(dobj) { (dobj).fn = sfn; (dobj).lfn = lbuf; }
+#define FREE_BUF()
+
+#elif _USE_LFN == 3 /* LFN with dynamic LFN working buffer on the heap */
+#define DEF_NAMEBUF BYTE sfn[12]; WCHAR *lfn
+#define INIT_BUF(dobj) { lfn = ff_memalloc((_MAX_LFN + 1) * 2); \
+ if (!lfn) LEAVE_FF((dobj).fs, FR_NOT_ENOUGH_CORE); \
+ (dobj).lfn = lfn; (dobj).fn = sfn; }
+#define FREE_BUF() ff_memfree(lfn)
+
+#else
+#error Wrong LFN configuration.
+#endif
+
+
+
+
+/*--------------------------------------------------------------------------
+
+ Module Private Functions
+
+---------------------------------------------------------------------------*/
+
+
+/*-----------------------------------------------------------------------*/
+/* String functions */
+/*-----------------------------------------------------------------------*/
+
+/* Copy memory to memory */
+static
+void mem_cpy (void* dst, const void* src, UINT cnt) {
+ BYTE *d = (BYTE*)dst;
+ const BYTE *s = (const BYTE*)src;
+
+#if _WORD_ACCESS == 1
+ while (cnt >= sizeof(int)) {
+ *(int*)d = *(int*)s;
+ d += sizeof(int); s += sizeof(int);
+ cnt -= sizeof(int);
+ }
+#endif
+ while (cnt--)
+ *d++ = *s++;
+}
+
+/* Fill memory */
+static
+void mem_set (void* dst, int val, UINT cnt) {
+ BYTE *d = (BYTE*)dst;
+
+ while (cnt--)
+ *d++ = (BYTE)val;
+}
+
+/* Compare memory to memory */
+static
+int mem_cmp (const void* dst, const void* src, UINT cnt) {
+ const BYTE *d = (const BYTE *)dst, *s = (const BYTE *)src;
+ int r = 0;
+
+ while (cnt-- && (r = *d++ - *s++) == 0) ;
+ return r;
+}
+
+/* Check if chr is contained in the string */
+static
+int chk_chr (const char* str, int chr) {
+ while (*str && *str != chr) str++;
+ return *str;
+}
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Request/Release grant to access the volume */
+/*-----------------------------------------------------------------------*/
+#if _FS_REENTRANT
+
+static
+int lock_fs (
+ FATFS *fs /* File system object */
+)
+{
+ return ff_req_grant(fs->sobj);
+}
+
+
+static
+void unlock_fs (
+ FATFS *fs, /* File system object */
+ FRESULT res /* Result code to be returned */
+)
+{
+ if (res != FR_NOT_ENABLED &&
+ res != FR_INVALID_DRIVE &&
+ res != FR_INVALID_OBJECT &&
+ res != FR_TIMEOUT) {
+ ff_rel_grant(fs->sobj);
+ }
+}
+#endif
+
+
+
+/*-----------------------------------------------------------------------*/
+/* File shareing control functions */
+/*-----------------------------------------------------------------------*/
+#if _FS_SHARE
+
+static
+FRESULT chk_lock ( /* Check if the file can be accessed */
+ DIR* dj, /* Directory object pointing the file to be checked */
+ int acc /* Desired access (0:Read, 1:Write, 2:Delete/Rename) */
+)
+{
+ UINT i, be;
+
+ /* Search file semaphore table */
+ for (i = be = 0; i < _FS_SHARE; i++) {
+ if (Files[i].fs) { /* Existing entry */
+ if (Files[i].fs == dj->fs && /* Check if the file matched with an open file */
+ Files[i].clu == dj->sclust &&
+ Files[i].idx == dj->index) break;
+ } else { /* Blank entry */
+ be++;
+ }
+ }
+ if (i == _FS_SHARE) /* The file is not opened */
+ return (be || acc == 2) ? FR_OK : FR_TOO_MANY_OPEN_FILES; /* Is there a blank entry for new file? */
+
+ /* The file has been opened. Reject any open against writing file and all write mode open */
+ return (acc || Files[i].ctr == 0x100) ? FR_LOCKED : FR_OK;
+}
+
+
+static
+int enq_lock ( /* Check if an entry is available for a new file */
+ FATFS* fs /* File system object */
+)
+{
+ UINT i;
+
+ for (i = 0; i < _FS_SHARE && Files[i].fs; i++) ;
+ return (i == _FS_SHARE) ? 0 : 1;
+}
+
+
+static
+UINT inc_lock ( /* Increment file open counter and returns its index (0:int error) */
+ DIR* dj, /* Directory object pointing the file to register or increment */
+ int acc /* Desired access mode (0:Read, !0:Write) */
+)
+{
+ UINT i;
+
+
+ for (i = 0; i < _FS_SHARE; i++) { /* Find the file */
+ if (Files[i].fs == dj->fs &&
+ Files[i].clu == dj->sclust &&
+ Files[i].idx == dj->index) break;
+ }
+
+ if (i == _FS_SHARE) { /* Not opened. Register it as new. */
+ for (i = 0; i < _FS_SHARE && Files[i].fs; i++) ;
+ if (i == _FS_SHARE) return 0; /* No space to register (int err) */
+ Files[i].fs = dj->fs;
+ Files[i].clu = dj->sclust;
+ Files[i].idx = dj->index;
+ Files[i].ctr = 0;
+ }
+
+ if (acc && Files[i].ctr) return 0; /* Access violation (int err) */
+
+ Files[i].ctr = acc ? 0x100 : Files[i].ctr + 1; /* Set semaphore value */
+
+ return i + 1;
+}
+
+
+static
+FRESULT dec_lock ( /* Decrement file open counter */
+ UINT i /* Semaphore index */
+)
+{
+ WORD n;
+ FRESULT res;
+
+
+ if (--i < _FS_SHARE) {
+ n = Files[i].ctr;
+ if (n == 0x100) n = 0;
+ if (n) n--;
+ Files[i].ctr = n;
+ if (!n) Files[i].fs = 0;
+ res = FR_OK;
+ } else {
+ res = FR_INT_ERR;
+ }
+ return res;
+}
+
+
+static
+void clear_lock ( /* Clear lock entries of the volume */
+ FATFS *fs
+)
+{
+ UINT i;
+
+ for (i = 0; i < _FS_SHARE; i++) {
+ if (Files[i].fs == fs) Files[i].fs = 0;
+ }
+}
+#endif
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Change window offset */
+/*-----------------------------------------------------------------------*/
+
+static
+FRESULT move_window (
+ FATFS *fs, /* File system object */
+ DWORD sector /* Sector number to make appearance in the fs->win[] */
+) /* Move to zero only writes back dirty window */
+{
+ DWORD wsect;
+
+
+ wsect = fs->winsect;
+ if (wsect != sector) { /* Changed current window */
+#if !_FS_READONLY
+ if (fs->wflag) { /* Write back dirty window if needed */
+ if (disk_write(fs->drv, fs->win, wsect, 1) != RES_OK)
+ return FR_DISK_ERR;
+ fs->wflag = 0;
+ if (wsect < (fs->fatbase + fs->fsize)) { /* In FAT area */
+ BYTE nf;
+ for (nf = fs->n_fats; nf > 1; nf--) { /* Reflect the change to all FAT copies */
+ wsect += fs->fsize;
+ disk_write(fs->drv, fs->win, wsect, 1);
+ }
+ }
+ }
+#endif
+ if (sector) {
+ if (disk_read(fs->drv, fs->win, sector, 1) != RES_OK)
+ return FR_DISK_ERR;
+ fs->winsect = sector;
+ }
+ }
+
+ return FR_OK;
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Clean-up cached data */
+/*-----------------------------------------------------------------------*/
+#if !_FS_READONLY
+static
+FRESULT sync ( /* FR_OK: successful, FR_DISK_ERR: failed */
+ FATFS *fs /* File system object */
+)
+{
+ FRESULT res;
+
+
+ res = move_window(fs, 0);
+ if (res == FR_OK) {
+ /* Update FSInfo sector if needed */
+ if (fs->fs_type == FS_FAT32 && fs->fsi_flag) {
+ fs->winsect = 0;
+ /* Create FSInfo structure */
+ mem_set(fs->win, 0, 512);
+ ST_WORD(fs->win+BS_55AA, 0xAA55);
+ ST_DWORD(fs->win+FSI_LeadSig, 0x41615252);
+ ST_DWORD(fs->win+FSI_StrucSig, 0x61417272);
+ ST_DWORD(fs->win+FSI_Free_Count, fs->free_clust);
+ ST_DWORD(fs->win+FSI_Nxt_Free, fs->last_clust);
+ /* Write it into the FSInfo sector */
+ disk_write(fs->drv, fs->win, fs->fsi_sector, 1);
+ fs->fsi_flag = 0;
+ }
+ /* Make sure that no pending write process in the physical drive */
+ if (disk_ioctl(fs->drv, CTRL_SYNC, (void*)0) != RES_OK)
+ res = FR_DISK_ERR;
+ }
+
+ return res;
+}
+#endif
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Get sector# from cluster# */
+/*-----------------------------------------------------------------------*/
+
+
+DWORD clust2sect ( /* !=0: Sector number, 0: Failed - invalid cluster# */
+ FATFS *fs, /* File system object */
+ DWORD clst /* Cluster# to be converted */
+)
+{
+ clst -= 2;
+ if (clst >= (fs->n_fatent - 2)) return 0; /* Invalid cluster# */
+ return clst * fs->csize + fs->database;
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* FAT access - Read value of a FAT entry */
+/*-----------------------------------------------------------------------*/
+
+
+DWORD get_fat ( /* 0xFFFFFFFF:Disk error, 1:Internal error, Else:Cluster status */
+ FATFS *fs, /* File system object */
+ DWORD clst /* Cluster# to get the link information */
+)
+{
+ UINT wc, bc;
+ BYTE *p;
+
+
+ if (clst < 2 || clst >= fs->n_fatent) /* Chack range */
+ return 1;
+
+ switch (fs->fs_type) {
+ case FS_FAT12 :
+ bc = (UINT)clst; bc += bc / 2;
+ if (move_window(fs, fs->fatbase + (bc / SS(fs)))) break;
+ wc = fs->win[bc % SS(fs)]; bc++;
+ if (move_window(fs, fs->fatbase + (bc / SS(fs)))) break;
+ wc |= fs->win[bc % SS(fs)] << 8;
+ return (clst & 1) ? (wc >> 4) : (wc & 0xFFF);
+
+ case FS_FAT16 :
+ if (move_window(fs, fs->fatbase + (clst / (SS(fs) / 2)))) break;
+ p = &fs->win[clst * 2 % SS(fs)];
+ return LD_WORD(p);
+
+ case FS_FAT32 :
+ if (move_window(fs, fs->fatbase + (clst / (SS(fs) / 4)))) break;
+ p = &fs->win[clst * 4 % SS(fs)];
+ return LD_DWORD(p) & 0x0FFFFFFF;
+ }
+
+ return 0xFFFFFFFF; /* An error occurred at the disk I/O layer */
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* FAT access - Change value of a FAT entry */
+/*-----------------------------------------------------------------------*/
+#if !_FS_READONLY
+
+FRESULT put_fat (
+ FATFS *fs, /* File system object */
+ DWORD clst, /* Cluster# to be changed in range of 2 to fs->n_fatent - 1 */
+ DWORD val /* New value to mark the cluster */
+)
+{
+ UINT bc;
+ BYTE *p;
+ FRESULT res;
+
+
+ if (clst < 2 || clst >= fs->n_fatent) { /* Check range */
+ res = FR_INT_ERR;
+
+ } else {
+ switch (fs->fs_type) {
+ case FS_FAT12 :
+ bc = clst; bc += bc / 2;
+ res = move_window(fs, fs->fatbase + (bc / SS(fs)));
+ if (res != FR_OK) break;
+ p = &fs->win[bc % SS(fs)];
+ *p = (clst & 1) ? ((*p & 0x0F) | ((BYTE)val << 4)) : (BYTE)val;
+ bc++;
+ fs->wflag = 1;
+ res = move_window(fs, fs->fatbase + (bc / SS(fs)));
+ if (res != FR_OK) break;
+ p = &fs->win[bc % SS(fs)];
+ *p = (clst & 1) ? (BYTE)(val >> 4) : ((*p & 0xF0) | ((BYTE)(val >> 8) & 0x0F));
+ break;
+
+ case FS_FAT16 :
+ res = move_window(fs, fs->fatbase + (clst / (SS(fs) / 2)));
+ if (res != FR_OK) break;
+ p = &fs->win[clst * 2 % SS(fs)];
+ ST_WORD(p, (WORD)val);
+ break;
+
+ case FS_FAT32 :
+ res = move_window(fs, fs->fatbase + (clst / (SS(fs) / 4)));
+ if (res != FR_OK) break;
+ p = &fs->win[clst * 4 % SS(fs)];
+ val |= LD_DWORD(p) & 0xF0000000;
+ ST_DWORD(p, val);
+ break;
+
+ default :
+ res = FR_INT_ERR;
+ }
+ fs->wflag = 1;
+ }
+
+ return res;
+}
+#endif /* !_FS_READONLY */
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* FAT handling - Remove a cluster chain */
+/*-----------------------------------------------------------------------*/
+#if !_FS_READONLY
+static
+FRESULT remove_chain (
+ FATFS *fs, /* File system object */
+ DWORD clst /* Cluster# to remove a chain from */
+)
+{
+ FRESULT res;
+ DWORD nxt;
+#if _USE_ERASE
+ DWORD scl = clst, ecl = clst, resion[2];
+#endif
+
+ if (clst < 2 || clst >= fs->n_fatent) { /* Check range */
+ res = FR_INT_ERR;
+
+ } else {
+ res = FR_OK;
+ while (clst < fs->n_fatent) { /* Not a last link? */
+ nxt = get_fat(fs, clst); /* Get cluster status */
+ if (nxt == 0) break; /* Empty cluster? */
+ if (nxt == 1) { res = FR_INT_ERR; break; } /* Internal error? */
+ if (nxt == 0xFFFFFFFF) { res = FR_DISK_ERR; break; } /* Disk error? */
+ res = put_fat(fs, clst, 0); /* Mark the cluster "empty" */
+ if (res != FR_OK) break;
+ if (fs->free_clust != 0xFFFFFFFF) { /* Update FSInfo */
+ fs->free_clust++;
+ fs->fsi_flag = 1;
+ }
+#if _USE_ERASE
+ if (ecl + 1 == nxt) { /* Next cluster is contiguous */
+ ecl = nxt;
+ } else { /* End of contiguous clusters */
+ resion[0] = clust2sect(fs, scl); /* Start sector */
+ resion[1] = clust2sect(fs, ecl) + fs->csize - 1; /* End sector */
+ disk_ioctl(fs->drv, CTRL_ERASE_SECTOR, resion); /* Erase the block */
+ scl = ecl = nxt;
+ }
+#endif
+ clst = nxt; /* Next cluster */
+ }
+ }
+
+ return res;
+}
+#endif
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* FAT handling - Stretch or Create a cluster chain */
+/*-----------------------------------------------------------------------*/
+#if !_FS_READONLY
+static
+DWORD create_chain ( /* 0:No free cluster, 1:Internal error, 0xFFFFFFFF:Disk error, >=2:New cluster# */
+ FATFS *fs, /* File system object */
+ DWORD clst /* Cluster# to stretch. 0 means create a new chain. */
+)
+{
+ DWORD cs, ncl, scl;
+ FRESULT res;
+
+
+ if (clst == 0) { /* Create a new chain */
+ scl = fs->last_clust; /* Get suggested start point */
+ if (!scl || scl >= fs->n_fatent) scl = 1;
+ }
+ else { /* Stretch the current chain */
+ cs = get_fat(fs, clst); /* Check the cluster status */
+ if (cs < 2) return 1; /* It is an invalid cluster */
+ if (cs < fs->n_fatent) return cs; /* It is already followed by next cluster */
+ scl = clst;
+ }
+
+ ncl = scl; /* Start cluster */
+ for (;;) {
+ ncl++; /* Next cluster */
+ if (ncl >= fs->n_fatent) { /* Wrap around */
+ ncl = 2;
+ if (ncl > scl) return 0; /* No free cluster */
+ }
+ cs = get_fat(fs, ncl); /* Get the cluster status */
+ if (cs == 0) break; /* Found a free cluster */
+ if (cs == 0xFFFFFFFF || cs == 1)/* An error occurred */
+ return cs;
+ if (ncl == scl) return 0; /* No free cluster */
+ }
+
+ res = put_fat(fs, ncl, 0x0FFFFFFF); /* Mark the new cluster "last link" */
+ if (res == FR_OK && clst != 0) {
+ res = put_fat(fs, clst, ncl); /* Link it to the previous one if needed */
+ }
+ if (res == FR_OK) {
+ fs->last_clust = ncl; /* Update FSINFO */
+ if (fs->free_clust != 0xFFFFFFFF) {
+ fs->free_clust--;
+ fs->fsi_flag = 1;
+ }
+ } else {
+ ncl = (res == FR_DISK_ERR) ? 0xFFFFFFFF : 1;
+ }
+
+ return ncl; /* Return new cluster number or error code */
+}
+#endif /* !_FS_READONLY */
+
+
+
+/*-----------------------------------------------------------------------*/
+/* FAT handling - Convert offset into cluster with link map table */
+/*-----------------------------------------------------------------------*/
+
+#if _USE_FASTSEEK
+static
+DWORD clmt_clust ( /* <2:Error, >=2:Cluster number */
+ FIL* fp, /* Pointer to the file object */
+ DWORD ofs /* File offset to be converted to cluster# */
+)
+{
+ DWORD cl, ncl, *tbl;
+
+
+ tbl = fp->cltbl + 1; /* Top of CLMT */
+ cl = ofs / SS(fp->fs) / fp->fs->csize; /* Cluster order from top of the file */
+ for (;;) {
+ ncl = *tbl++; /* Number of cluters in the fragment */
+ if (!ncl) return 0; /* End of table? (error) */
+ if (cl < ncl) break; /* In this fragment? */
+ cl -= ncl; tbl++; /* Next fragment */
+ }
+ return cl + *tbl; /* Return the cluster number */
+}
+#endif /* _USE_FASTSEEK */
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Directory handling - Set directory index */
+/*-----------------------------------------------------------------------*/
+
+static
+FRESULT dir_sdi (
+ DIR *dj, /* Pointer to directory object */
+ WORD idx /* Directory index number */
+)
+{
+ DWORD clst;
+ WORD ic;
+
+
+ dj->index = idx;
+ clst = dj->sclust;
+ if (clst == 1 || clst >= dj->fs->n_fatent) /* Check start cluster range */
+ return FR_INT_ERR;
+ if (!clst && dj->fs->fs_type == FS_FAT32) /* Replace cluster# 0 with root cluster# if in FAT32 */
+ clst = dj->fs->dirbase;
+
+ if (clst == 0) { /* Static table (root-dir in FAT12/16) */
+ dj->clust = clst;
+ if (idx >= dj->fs->n_rootdir) /* Index is out of range */
+ return FR_INT_ERR;
+ dj->sect = dj->fs->dirbase + idx / (SS(dj->fs) / SZ_DIR); /* Sector# */
+ }
+ else { /* Dynamic table (sub-dirs or root-dir in FAT32) */
+ ic = SS(dj->fs) / SZ_DIR * dj->fs->csize; /* Entries per cluster */
+ while (idx >= ic) { /* Follow cluster chain */
+ clst = get_fat(dj->fs, clst); /* Get next cluster */
+ if (clst == 0xFFFFFFFF) return FR_DISK_ERR; /* Disk error */
+ if (clst < 2 || clst >= dj->fs->n_fatent) /* Reached to end of table or int error */
+ return FR_INT_ERR;
+ idx -= ic;
+ }
+ dj->clust = clst;
+ dj->sect = clust2sect(dj->fs, clst) + idx / (SS(dj->fs) / SZ_DIR); /* Sector# */
+ }
+
+ dj->dir = dj->fs->win + (idx % (SS(dj->fs) / SZ_DIR)) * SZ_DIR; /* Ptr to the entry in the sector */
+
+ return FR_OK; /* Seek succeeded */
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Directory handling - Move directory index next */
+/*-----------------------------------------------------------------------*/
+
+static
+FRESULT dir_next ( /* FR_OK:Succeeded, FR_NO_FILE:End of table, FR_DENIED:EOT and could not stretch */
+ DIR *dj, /* Pointer to directory object */
+ int stretch /* 0: Do not stretch table, 1: Stretch table if needed */
+)
+{
+ DWORD clst;
+ WORD i;
+
+
+ i = dj->index + 1;
+ if (!i || !dj->sect) /* Report EOT when index has reached 65535 */
+ return FR_NO_FILE;
+
+ if (!(i % (SS(dj->fs) / SZ_DIR))) { /* Sector changed? */
+ dj->sect++; /* Next sector */
+
+ if (dj->clust == 0) { /* Static table */
+ if (i >= dj->fs->n_rootdir) /* Report EOT when end of table */
+ return FR_NO_FILE;
+ }
+ else { /* Dynamic table */
+ if (((i / (SS(dj->fs) / SZ_DIR)) & (dj->fs->csize - 1)) == 0) { /* Cluster changed? */
+ clst = get_fat(dj->fs, dj->clust); /* Get next cluster */
+ if (clst <= 1) return FR_INT_ERR;
+ if (clst == 0xFFFFFFFF) return FR_DISK_ERR;
+ if (clst >= dj->fs->n_fatent) { /* When it reached end of dynamic table */
+#if !_FS_READONLY
+ BYTE c;
+ if (!stretch) return FR_NO_FILE; /* When do not stretch, report EOT */
+ clst = create_chain(dj->fs, dj->clust); /* Stretch cluster chain */
+ if (clst == 0) return FR_DENIED; /* No free cluster */
+ if (clst == 1) return FR_INT_ERR;
+ if (clst == 0xFFFFFFFF) return FR_DISK_ERR;
+ /* Clean-up stretched table */
+ if (move_window(dj->fs, 0)) return FR_DISK_ERR; /* Flush active window */
+ mem_set(dj->fs->win, 0, SS(dj->fs)); /* Clear window buffer */
+ dj->fs->winsect = clust2sect(dj->fs, clst); /* Cluster start sector */
+ for (c = 0; c < dj->fs->csize; c++) { /* Fill the new cluster with 0 */
+ dj->fs->wflag = 1;
+ if (move_window(dj->fs, 0)) return FR_DISK_ERR;
+ dj->fs->winsect++;
+ }
+ dj->fs->winsect -= c; /* Rewind window address */
+#else
+ return FR_NO_FILE; /* Report EOT */
+#endif
+ }
+ dj->clust = clst; /* Initialize data for new cluster */
+ dj->sect = clust2sect(dj->fs, clst);
+ }
+ }
+ }
+
+ dj->index = i;
+ dj->dir = dj->fs->win + (i % (SS(dj->fs) / SZ_DIR)) * SZ_DIR;
+
+ return FR_OK;
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* LFN handling - Test/Pick/Fit an LFN segment from/to directory entry */
+/*-----------------------------------------------------------------------*/
+#if _USE_LFN
+static
+const BYTE LfnOfs[] = {1,3,5,7,9,14,16,18,20,22,24,28,30}; /* Offset of LFN chars in the directory entry */
+
+
+static
+int cmp_lfn ( /* 1:Matched, 0:Not matched */
+ WCHAR *lfnbuf, /* Pointer to the LFN to be compared */
+ BYTE *dir /* Pointer to the directory entry containing a part of LFN */
+)
+{
+ UINT i, s;
+ WCHAR wc, uc;
+
+
+ i = ((dir[LDIR_Ord] & ~LLE) - 1) * 13; /* Get offset in the LFN buffer */
+ s = 0; wc = 1;
+ do {
+ uc = LD_WORD(dir+LfnOfs[s]); /* Pick an LFN character from the entry */
+ if (wc) { /* Last char has not been processed */
+ wc = ff_wtoupper(uc); /* Convert it to upper case */
+ if (i >= _MAX_LFN || wc != ff_wtoupper(lfnbuf[i++])) /* Compare it */
+ return 0; /* Not matched */
+ } else {
+ if (uc != 0xFFFF) return 0; /* Check filler */
+ }
+ } while (++s < 13); /* Repeat until all chars in the entry are checked */
+
+ if ((dir[LDIR_Ord] & LLE) && wc && lfnbuf[i]) /* Last segment matched but different length */
+ return 0;
+
+ return 1; /* The part of LFN matched */
+}
+
+
+
+static
+int pick_lfn ( /* 1:Succeeded, 0:Buffer overflow */
+ WCHAR *lfnbuf, /* Pointer to the Unicode-LFN buffer */
+ BYTE *dir /* Pointer to the directory entry */
+)
+{
+ UINT i, s;
+ WCHAR wc, uc;
+
+
+ i = ((dir[LDIR_Ord] & 0x3F) - 1) * 13; /* Offset in the LFN buffer */
+
+ s = 0; wc = 1;
+ do {
+ uc = LD_WORD(dir+LfnOfs[s]); /* Pick an LFN character from the entry */
+ if (wc) { /* Last char has not been processed */
+ if (i >= _MAX_LFN) return 0; /* Buffer overflow? */
+ lfnbuf[i++] = wc = uc; /* Store it */
+ } else {
+ if (uc != 0xFFFF) return 0; /* Check filler */
+ }
+ } while (++s < 13); /* Read all character in the entry */
+
+ if (dir[LDIR_Ord] & LLE) { /* Put terminator if it is the last LFN part */
+ if (i >= _MAX_LFN) return 0; /* Buffer overflow? */
+ lfnbuf[i] = 0;
+ }
+
+ return 1;
+}
+
+
+#if !_FS_READONLY
+static
+void fit_lfn (
+ const WCHAR *lfnbuf, /* Pointer to the LFN buffer */
+ BYTE *dir, /* Pointer to the directory entry */
+ BYTE ord, /* LFN order (1-20) */
+ BYTE sum /* SFN sum */
+)
+{
+ UINT i, s;
+
+
+ WCHAR wc;
+
+
+ dir[LDIR_Chksum] = sum; /* Set check sum */
+ dir[LDIR_Attr] = AM_LFN; /* Set attribute. LFN entry */
+ dir[LDIR_Type] = 0;
+ ST_WORD(dir+LDIR_FstClusLO, 0);
+
+ i = (ord - 1) * 13; /* Get offset in the LFN buffer */
+ s = wc = 0;
+ do {
+ if (wc != 0xFFFF) wc = lfnbuf[i++]; /* Get an effective char */
+ ST_WORD(dir+LfnOfs[s], wc); /* Put it */
+ if (!wc) wc = 0xFFFF; /* Padding chars following last char */
+ } while (++s < 13);
+ if (wc == 0xFFFF || !lfnbuf[i]) ord |= LLE; /* Bottom LFN part is the start of LFN sequence */
+ dir[LDIR_Ord] = ord; /* Set the LFN order */
+}
+
+#endif
+#endif
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Create numbered name */
+/*-----------------------------------------------------------------------*/
+#if _USE_LFN
+void gen_numname (
+ BYTE *dst, /* Pointer to generated SFN */
+ const BYTE *src, /* Pointer to source SFN to be modified */
+ const WCHAR *lfn, /* Pointer to LFN */
+ WORD seq /* Sequence number */
+)
+{
+ BYTE ns[8], c;
+ UINT i, j;
+
+
+ mem_cpy(dst, src, 11);
+
+ if (seq > 5) { /* On many collisions, generate a hash number instead of sequential number */
+ do seq = (seq >> 1) + (seq << 15) + (WORD)*lfn++; while (*lfn);
+ }
+
+ /* itoa (hexdecimal) */
+ i = 7;
+ do {
+ c = (seq % 16) + '0';
+ if (c > '9') c += 7;
+ ns[i--] = c;
+ seq /= 16;
+ } while (seq);
+ ns[i] = '~';
+
+ /* Append the number */
+ for (j = 0; j < i && dst[j] != ' '; j++) {
+ if (IsDBCS1(dst[j])) {
+ if (j == i - 1) break;
+ j++;
+ }
+ }
+ do {
+ dst[j++] = (i < 8) ? ns[i++] : ' ';
+ } while (j < 8);
+}
+#endif
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Calculate sum of an SFN */
+/*-----------------------------------------------------------------------*/
+#if _USE_LFN
+static
+BYTE sum_sfn (
+ const BYTE *dir /* Ptr to directory entry */
+)
+{
+ BYTE sum = 0;
+ UINT n = 11;
+
+ do sum = (sum >> 1) + (sum << 7) + *dir++; while (--n);
+ return sum;
+}
+#endif
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Directory handling - Find an object in the directory */
+/*-----------------------------------------------------------------------*/
+
+static
+FRESULT dir_find (
+ DIR *dj /* Pointer to the directory object linked to the file name */
+)
+{
+ FRESULT res;
+ BYTE c, *dir;
+#if _USE_LFN
+ BYTE a, ord, sum;
+#endif
+
+ res = dir_sdi(dj, 0); /* Rewind directory object */
+ if (res != FR_OK) return res;
+
+#if _USE_LFN
+ ord = sum = 0xFF;
+#endif
+ do {
+ res = move_window(dj->fs, dj->sect);
+ if (res != FR_OK) break;
+ dir = dj->dir; /* Ptr to the directory entry of current index */
+ c = dir[DIR_Name];
+ if (c == 0) { res = FR_NO_FILE; break; } /* Reached to end of table */
+#if _USE_LFN /* LFN configuration */
+ a = dir[DIR_Attr] & AM_MASK;
+ if (c == DDE || ((a & AM_VOL) && a != AM_LFN)) { /* An entry without valid data */
+ ord = 0xFF;
+ } else {
+ if (a == AM_LFN) { /* An LFN entry is found */
+ if (dj->lfn) {
+ if (c & LLE) { /* Is it start of LFN sequence? */
+ sum = dir[LDIR_Chksum];
+ c &= ~LLE; ord = c; /* LFN start order */
+ dj->lfn_idx = dj->index;
+ }
+ /* Check validity of the LFN entry and compare it with given name */
+ ord = (c == ord && sum == dir[LDIR_Chksum] && cmp_lfn(dj->lfn, dir)) ? ord - 1 : 0xFF;
+ }
+ } else { /* An SFN entry is found */
+ if (!ord && sum == sum_sfn(dir)) break; /* LFN matched? */
+ ord = 0xFF; dj->lfn_idx = 0xFFFF; /* Reset LFN sequence */
+ if (!(dj->fn[NS] & NS_LOSS) && !mem_cmp(dir, dj->fn, 11)) break; /* SFN matched? */
+ }
+ }
+#else /* Non LFN configuration */
+ if (!(dir[DIR_Attr] & AM_VOL) && !mem_cmp(dir, dj->fn, 11)) /* Is it a valid entry? */
+ break;
+#endif
+ res = dir_next(dj, 0); /* Next entry */
+ } while (res == FR_OK);
+
+ return res;
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Read an object from the directory */
+/*-----------------------------------------------------------------------*/
+#if _FS_MINIMIZE <= 1
+static
+FRESULT dir_read (
+ DIR *dj /* Pointer to the directory object that pointing the entry to be read */
+)
+{
+ FRESULT res;
+ BYTE c, *dir;
+#if _USE_LFN
+ BYTE a, ord = 0xFF, sum = 0xFF;
+#endif
+
+ res = FR_NO_FILE;
+ while (dj->sect) {
+ res = move_window(dj->fs, dj->sect);
+ if (res != FR_OK) break;
+ dir = dj->dir; /* Ptr to the directory entry of current index */
+ c = dir[DIR_Name];
+ if (c == 0) { res = FR_NO_FILE; break; } /* Reached to end of table */
+#if _USE_LFN /* LFN configuration */
+ a = dir[DIR_Attr] & AM_MASK;
+ if (c == DDE || (!_FS_RPATH && c == '.') || ((a & AM_VOL) && a != AM_LFN)) { /* An entry without valid data */
+ ord = 0xFF;
+ } else {
+ if (a == AM_LFN) { /* An LFN entry is found */
+ if (c & LLE) { /* Is it start of LFN sequence? */
+ sum = dir[LDIR_Chksum];
+ c &= ~LLE; ord = c;
+ dj->lfn_idx = dj->index;
+ }
+ /* Check LFN validity and capture it */
+ ord = (c == ord && sum == dir[LDIR_Chksum] && pick_lfn(dj->lfn, dir)) ? ord - 1 : 0xFF;
+ } else { /* An SFN entry is found */
+ if (ord || sum != sum_sfn(dir)) /* Is there a valid LFN? */
+ dj->lfn_idx = 0xFFFF; /* It has no LFN. */
+ break;
+ }
+ }
+#else /* Non LFN configuration */
+ if (c != DDE && (_FS_RPATH || c != '.') && !(dir[DIR_Attr] & AM_VOL)) /* Is it a valid entry? */
+ break;
+#endif
+ res = dir_next(dj, 0); /* Next entry */
+ if (res != FR_OK) break;
+ }
+
+ if (res != FR_OK) dj->sect = 0;
+
+ return res;
+}
+#endif
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Register an object to the directory */
+/*-----------------------------------------------------------------------*/
+#if !_FS_READONLY
+static
+FRESULT dir_register ( /* FR_OK:Successful, FR_DENIED:No free entry or too many SFN collision, FR_DISK_ERR:Disk error */
+ DIR *dj /* Target directory with object name to be created */
+)
+{
+ FRESULT res;
+ BYTE c, *dir;
+#if _USE_LFN /* LFN configuration */
+ WORD n, ne, is;
+ BYTE sn[12], *fn, sum;
+ WCHAR *lfn;
+
+
+ fn = dj->fn; lfn = dj->lfn;
+ mem_cpy(sn, fn, 12);
+
+ if (_FS_RPATH && (sn[NS] & NS_DOT)) /* Cannot create dot entry */
+ return FR_INVALID_NAME;
+
+ if (sn[NS] & NS_LOSS) { /* When LFN is out of 8.3 format, generate a numbered name */
+ fn[NS] = 0; dj->lfn = 0; /* Find only SFN */
+ for (n = 1; n < 100; n++) {
+ gen_numname(fn, sn, lfn, n); /* Generate a numbered name */
+ res = dir_find(dj); /* Check if the name collides with existing SFN */
+ if (res != FR_OK) break;
+ }
+ if (n == 100) return FR_DENIED; /* Abort if too many collisions */
+ if (res != FR_NO_FILE) return res; /* Abort if the result is other than 'not collided' */
+ fn[NS] = sn[NS]; dj->lfn = lfn;
+ }
+
+ if (sn[NS] & NS_LFN) { /* When LFN is to be created, reserve an SFN + LFN entries. */
+ for (ne = 0; lfn[ne]; ne++) ;
+ ne = (ne + 25) / 13;
+ } else { /* Otherwise reserve only an SFN entry. */
+ ne = 1;
+ }
+
+ /* Reserve contiguous entries */
+ res = dir_sdi(dj, 0);
+ if (res != FR_OK) return res;
+ n = is = 0;
+ do {
+ res = move_window(dj->fs, dj->sect);
+ if (res != FR_OK) break;
+ c = *dj->dir; /* Check the entry status */
+ if (c == DDE || c == 0) { /* Is it a blank entry? */
+ if (n == 0) is = dj->index; /* First index of the contiguous entry */
+ if (++n == ne) break; /* A contiguous entry that required count is found */
+ } else {
+ n = 0; /* Not a blank entry. Restart to search */
+ }
+ res = dir_next(dj, 1); /* Next entry with table stretch */
+ } while (res == FR_OK);
+
+ if (res == FR_OK && ne > 1) { /* Initialize LFN entry if needed */
+ res = dir_sdi(dj, is);
+ if (res == FR_OK) {
+ sum = sum_sfn(dj->fn); /* Sum of the SFN tied to the LFN */
+ ne--;
+ do { /* Store LFN entries in bottom first */
+ res = move_window(dj->fs, dj->sect);
+ if (res != FR_OK) break;
+ fit_lfn(dj->lfn, dj->dir, (BYTE)ne, sum);
+ dj->fs->wflag = 1;
+ res = dir_next(dj, 0); /* Next entry */
+ } while (res == FR_OK && --ne);
+ }
+ }
+
+#else /* Non LFN configuration */
+ res = dir_sdi(dj, 0);
+ if (res == FR_OK) {
+ do { /* Find a blank entry for the SFN */
+ res = move_window(dj->fs, dj->sect);
+ if (res != FR_OK) break;
+ c = *dj->dir;
+ if (c == DDE || c == 0) break; /* Is it a blank entry? */
+ res = dir_next(dj, 1); /* Next entry with table stretch */
+ } while (res == FR_OK);
+ }
+#endif
+
+ if (res == FR_OK) { /* Initialize the SFN entry */
+ res = move_window(dj->fs, dj->sect);
+ if (res == FR_OK) {
+ dir = dj->dir;
+ mem_set(dir, 0, SZ_DIR); /* Clean the entry */
+ mem_cpy(dir, dj->fn, 11); /* Put SFN */
+#if _USE_LFN
+ dir[DIR_NTres] = *(dj->fn+NS) & (NS_BODY | NS_EXT); /* Put NT flag */
+#endif
+ dj->fs->wflag = 1;
+ }
+ }
+
+ return res;
+}
+#endif /* !_FS_READONLY */
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Remove an object from the directory */
+/*-----------------------------------------------------------------------*/
+#if !_FS_READONLY && !_FS_MINIMIZE
+static
+FRESULT dir_remove ( /* FR_OK: Successful, FR_DISK_ERR: A disk error */
+ DIR *dj /* Directory object pointing the entry to be removed */
+)
+{
+ FRESULT res;
+#if _USE_LFN /* LFN configuration */
+ WORD i;
+
+ i = dj->index; /* SFN index */
+ res = dir_sdi(dj, (WORD)((dj->lfn_idx == 0xFFFF) ? i : dj->lfn_idx)); /* Goto the SFN or top of the LFN entries */
+ if (res == FR_OK) {
+ do {
+ res = move_window(dj->fs, dj->sect);
+ if (res != FR_OK) break;
+ *dj->dir = DDE; /* Mark the entry "deleted" */
+ dj->fs->wflag = 1;
+ if (dj->index >= i) break; /* When reached SFN, all entries of the object has been deleted. */
+ res = dir_next(dj, 0); /* Next entry */
+ } while (res == FR_OK);
+ if (res == FR_NO_FILE) res = FR_INT_ERR;
+ }
+
+#else /* Non LFN configuration */
+ res = dir_sdi(dj, dj->index);
+ if (res == FR_OK) {
+ res = move_window(dj->fs, dj->sect);
+ if (res == FR_OK) {
+ *dj->dir = DDE; /* Mark the entry "deleted" */
+ dj->fs->wflag = 1;
+ }
+ }
+#endif
+
+ return res;
+}
+#endif /* !_FS_READONLY */
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Pick a segment and create the object name in directory form */
+/*-----------------------------------------------------------------------*/
+
+static
+FRESULT create_name (
+ DIR *dj, /* Pointer to the directory object */
+ const TCHAR **path /* Pointer to pointer to the segment in the path string */
+)
+{
+#ifdef _EXCVT
+ static const BYTE excvt[] = _EXCVT; /* Upper conversion table for extended chars */
+#endif
+
+#if _USE_LFN /* LFN configuration */
+ BYTE b, cf;
+ WCHAR w, *lfn;
+ UINT i, ni, si, di;
+ const TCHAR *p;
+
+ /* Create LFN in Unicode */
+ for (p = *path; *p == '/' || *p == '\\'; p++) ; /* Strip duplicated separator */
+ lfn = dj->lfn;
+ si = di = 0;
+ for (;;) {
+ w = p[si++]; /* Get a character */
+ if (w < ' ' || w == '/' || w == '\\') break; /* Break on end of segment */
+ if (di >= _MAX_LFN) /* Reject too long name */
+ return FR_INVALID_NAME;
+#if !_LFN_UNICODE
+ w &= 0xFF;
+ if (IsDBCS1(w)) { /* Check if it is a DBC 1st byte (always false on SBCS cfg) */
+ b = (BYTE)p[si++]; /* Get 2nd byte */
+ if (!IsDBCS2(b))
+ return FR_INVALID_NAME; /* Reject invalid sequence */
+ else /* Added by ATMEL, remove warnings */
+ w = (w << 8) + b; /* Create a DBC */
+ }
+ w = ff_convert(w, 1); /* Convert ANSI/OEM to Unicode */
+ if (!w) return FR_INVALID_NAME; /* Reject invalid code */
+#endif
+ if (w < 0x80 && chk_chr("\"*:<>\?|\x7F", w)) /* Reject illegal chars for LFN */
+ return FR_INVALID_NAME;
+ lfn[di++] = w; /* Store the Unicode char */
+ }
+ *path = &p[si]; /* Return pointer to the next segment */
+ cf = (w < ' ') ? NS_LAST : 0; /* Set last segment flag if end of path */
+#if _FS_RPATH
+ if ((di == 1 && lfn[di-1] == '.') || /* Is this a dot entry? */
+ (di == 2 && lfn[di-1] == '.' && lfn[di-2] == '.')) {
+ lfn[di] = 0;
+ for (i = 0; i < 11; i++)
+ dj->fn[i] = (i < di) ? '.' : ' ';
+ dj->fn[i] = cf | NS_DOT; /* This is a dot entry */
+ return FR_OK;
+ }
+#endif
+ while (di) { /* Strip trailing spaces and dots */
+ w = lfn[di-1];
+ if (w != ' ' && w != '.') break;
+ di--;
+ }
+ if (!di) return FR_INVALID_NAME; /* Reject nul string */
+
+ lfn[di] = 0; /* LFN is created */
+
+ /* Create SFN in directory form */
+ mem_set(dj->fn, ' ', 11);
+ for (si = 0; lfn[si] == ' ' || lfn[si] == '.'; si++) ; /* Strip leading spaces and dots */
+ if (si) cf |= NS_LOSS | NS_LFN;
+ while (di && lfn[di - 1] != '.') di--; /* Find extension (di<=si: no extension) */
+
+ b = i = 0; ni = 8;
+ for (;;) {
+ w = lfn[si++]; /* Get an LFN char */
+ if (!w) break; /* Break on end of the LFN */
+ if (w == ' ' || (w == '.' && si != di)) { /* Remove spaces and dots */
+ cf |= NS_LOSS | NS_LFN; continue;
+ }
+
+ if (i >= ni || si == di) { /* Extension or end of SFN */
+ if (ni == 11) { /* Long extension */
+ cf |= NS_LOSS | NS_LFN; break;
+ }
+ if (si != di) cf |= NS_LOSS | NS_LFN; /* Out of 8.3 format */
+ if (si > di) break; /* No extension */
+ si = di; i = 8; ni = 11; /* Enter extension section */
+ b <<= 2; continue;
+ }
+
+ if (w >= 0x80) { /* Non ASCII char */
+
+#ifdef _EXCVT
+ w = ff_convert(w, 0); /* Unicode -> OEM code */
+ if (w) w = excvt[w - 0x80]; /* Convert extended char to upper (SBCS) */
+#else
+ w = ff_convert(ff_wtoupper(w), 0); /* Upper converted Unicode -> OEM code */
+#endif
+ cf |= NS_LFN; /* Force create LFN entry */
+ }
+
+ if (_DF1S && w >= 0x100) { /* Double byte char (always false on SBCS cfg) */
+ if (i >= ni - 1) {
+ cf |= NS_LOSS | NS_LFN; i = ni; continue;
+ }
+ dj->fn[i++] = (BYTE)(w >> 8);
+ } else { /* Single byte char */
+ if (!w || chk_chr("+,;=[]", w)) { /* Replace illegal chars for SFN */
+ w = '_'; cf |= NS_LOSS | NS_LFN;/* Lossy conversion */
+ } else {
+ if (IsUpper(w)) { /* ASCII large capital */
+ b |= 2;
+ } else {
+ if (IsLower(w)) { /* ASCII small capital */
+ b |= 1; w -= 0x20;
+ }
+ }
+ }
+ }
+ dj->fn[i++] = (BYTE)w;
+ }
+
+ if (dj->fn[0] == DDE) dj->fn[0] = NDDE; /* If the first char collides with deleted mark, replace it with 0x05 */
+
+ if (ni == 8) b <<= 2;
+ if ((b & 0x0C) == 0x0C || (b & 0x03) == 0x03) /* Create LFN entry when there are composite capitals */
+ cf |= NS_LFN;
+ if (!(cf & NS_LFN)) { /* When LFN is in 8.3 format without extended char, NT flags are created */
+ if ((b & 0x03) == 0x01) cf |= NS_EXT; /* NT flag (Extension has only small capital) */
+ if ((b & 0x0C) == 0x04) cf |= NS_BODY; /* NT flag (Filename has only small capital) */
+ }
+
+ dj->fn[NS] = cf; /* SFN is created */
+
+ return FR_OK;
+
+
+#else /* Non-LFN configuration */
+ BYTE b, c, d, *sfn;
+ UINT ni, si, i;
+ const char *p;
+
+ /* Create file name in directory form */
+ for (p = *path; *p == '/' || *p == '\\'; p++) ; /* Strip duplicated separator */
+ sfn = dj->fn;
+ mem_set(sfn, ' ', 11);
+ si = i = b = 0; ni = 8;
+#if _FS_RPATH
+ if (p[si] == '.') { /* Is this a dot entry? */
+ for (;;) {
+ c = (BYTE)p[si++];
+ if (c != '.' || si >= 3) break;
+ sfn[i++] = c;
+ }
+ if (c != '/' && c != '\\' && c > ' ') return FR_INVALID_NAME;
+ *path = &p[si]; /* Return pointer to the next segment */
+ sfn[NS] = (c <= ' ') ? NS_LAST | NS_DOT : NS_DOT; /* Set last segment flag if end of path */
+ return FR_OK;
+ }
+#endif
+ for (;;) {
+ c = (BYTE)p[si++];
+ if (c <= ' ' || c == '/' || c == '\\') break; /* Break on end of segment */
+ if (c == '.' || i >= ni) {
+ if (ni != 8 || c != '.') return FR_INVALID_NAME;
+ i = 8; ni = 11;
+ b <<= 2; continue;
+ }
+ if (c >= 0x80) { /* Extended char? */
+ b |= 3; /* Eliminate NT flag */
+#ifdef _EXCVT
+ c = excvt[c-0x80]; /* Upper conversion (SBCS) */
+#else
+#if !_DF1S /* ASCII only cfg */
+ return FR_INVALID_NAME;
+#endif
+#endif
+ }
+ if (IsDBCS1(c)) { /* Check if it is a DBC 1st byte (always false on SBCS cfg) */
+ d = (BYTE)p[si++]; /* Get 2nd byte */
+ if (!IsDBCS2(d) || i >= ni - 1) /* Reject invalid DBC */
+ return FR_INVALID_NAME;
+ sfn[i++] = c;
+ sfn[i++] = d;
+ } else { /* Single byte code */
+ if (chk_chr("\"*+,:;<=>\?[]|\x7F", c)) /* Reject illegal chrs for SFN */
+ return FR_INVALID_NAME;
+ if (IsUpper(c)) { /* ASCII large capital? */
+ b |= 2;
+ } else {
+ if (IsLower(c)) { /* ASCII small capital? */
+ b |= 1; c -= 0x20;
+ }
+ }
+ sfn[i++] = c;
+ }
+ }
+ *path = &p[si]; /* Return pointer to the next segment */
+ c = (c <= ' ') ? NS_LAST : 0; /* Set last segment flag if end of path */
+
+ if (!i) return FR_INVALID_NAME; /* Reject nul string */
+ if (sfn[0] == DDE) sfn[0] = NDDE; /* When first char collides with DDE, replace it with 0x05 */
+
+ if (ni == 8) b <<= 2;
+ if ((b & 0x03) == 0x01) c |= NS_EXT; /* NT flag (Name extension has only small capital) */
+ if ((b & 0x0C) == 0x04) c |= NS_BODY; /* NT flag (Name body has only small capital) */
+
+ sfn[NS] = c; /* Store NT flag, File name is created */
+
+ return FR_OK;
+#endif
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Get file information from directory entry */
+/*-----------------------------------------------------------------------*/
+#if _FS_MINIMIZE <= 1
+static
+void get_fileinfo ( /* No return code */
+ DIR *dj, /* Pointer to the directory object */
+ FILINFO *fno /* Pointer to the file information to be filled */
+)
+{
+ UINT i;
+ BYTE nt, *dir;
+ TCHAR *p, c;
+
+
+ p = fno->fname;
+ if (dj->sect) {
+ dir = dj->dir;
+ nt = dir[DIR_NTres]; /* NT flag */
+ for (i = 0; i < 8; i++) { /* Copy name body */
+ c = dir[i];
+ if (c == ' ') break;
+ if (c == NDDE) c = (TCHAR)DDE;
+ if (_USE_LFN && (nt & NS_BODY) && IsUpper(c)) c += 0x20;
+#if _LFN_UNICODE
+ if (IsDBCS1(c) && i < 7 && IsDBCS2(dir[i+1]))
+ c = (c << 8) | dir[++i];
+ c = ff_convert(c, 1);
+ if (!c) c = '?';
+#endif
+ *p++ = c;
+ }
+ if (dir[8] != ' ') { /* Copy name extension */
+ *p++ = '.';
+ for (i = 8; i < 11; i++) {
+ c = dir[i];
+ if (c == ' ') break;
+ if (_USE_LFN && (nt & NS_EXT) && IsUpper(c)) c += 0x20;
+#if _LFN_UNICODE
+ if (IsDBCS1(c) && i < 10 && IsDBCS2(dir[i+1]))
+ c = (c << 8) | dir[++i];
+ c = ff_convert(c, 1);
+ if (!c) c = '?';
+#endif
+ *p++ = c;
+ }
+ }
+ fno->fattrib = dir[DIR_Attr]; /* Attribute */
+ fno->fsize = LD_DWORD(dir+DIR_FileSize); /* Size */
+ fno->fdate = LD_WORD(dir+DIR_WrtDate); /* Date */
+ fno->ftime = LD_WORD(dir+DIR_WrtTime); /* Time */
+ }
+ *p = 0; /* Terminate SFN str by a \0 */
+
+#if _USE_LFN
+ if (fno->lfname && fno->lfsize) {
+ TCHAR *tp = fno->lfname;
+ WCHAR w, *lfn;
+
+ i = 0;
+ if (dj->sect && dj->lfn_idx != 0xFFFF) {/* Get LFN if available */
+ lfn = dj->lfn;
+ while ((w = *lfn++) != 0) { /* Get an LFN char */
+#if !_LFN_UNICODE
+ w = ff_convert(w, 0); /* Unicode -> OEM conversion */
+ if (!w) { i = 0; break; } /* Could not convert, no LFN */
+ if (_DF1S && w >= 0x100) /* Put 1st byte if it is a DBC (always false on SBCS cfg) */
+ tp[i++] = (TCHAR)(w >> 8);
+#endif
+ if (i >= fno->lfsize - 1) { i = 0; break; } /* Buffer overflow, no LFN */
+ tp[i++] = (TCHAR)w;
+ }
+ }
+ tp[i] = 0; /* Terminate the LFN str by a \0 */
+ }
+#endif
+}
+#endif /* _FS_MINIMIZE <= 1 */
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Follow a file path */
+/*-----------------------------------------------------------------------*/
+
+static
+FRESULT follow_path ( /* FR_OK(0): successful, !=0: error code */
+ DIR *dj, /* Directory object to return last directory and found object */
+ const TCHAR *path /* Full-path string to find a file or directory */
+)
+{
+ FRESULT res;
+ BYTE *dir, ns;
+
+
+#if _FS_RPATH
+ if (*path == '/' || *path == '\\') { /* There is a heading separator */
+ path++; dj->sclust = 0; /* Strip it and start from the root dir */
+ } else { /* No heading separator */
+ dj->sclust = dj->fs->cdir; /* Start from the current dir */
+ }
+#else
+ if (*path == '/' || *path == '\\') /* Strip heading separator if exist */
+ path++;
+ dj->sclust = 0; /* Start from the root dir */
+#endif
+
+ if ((UINT)*path < ' ') { /* Nul path means the start directory itself */
+ res = dir_sdi(dj, 0);
+ dj->dir = 0;
+
+ } else { /* Follow path */
+ for (;;) {
+ res = create_name(dj, &path); /* Get a segment */
+ if (res != FR_OK) break;
+ res = dir_find(dj); /* Find it */
+ ns = *(dj->fn+NS);
+ if (res != FR_OK) { /* Failed to find the object */
+ if (res != FR_NO_FILE) break; /* Abort if any hard error occured */
+ /* Object not found */
+ if (_FS_RPATH && (ns & NS_DOT)) { /* If dot entry is not exit */
+ dj->sclust = 0; dj->dir = 0; /* It is the root dir */
+ res = FR_OK;
+ if (!(ns & NS_LAST)) continue;
+ } else { /* Could not find the object */
+ if (!(ns & NS_LAST)) res = FR_NO_PATH;
+ }
+ break;
+ }
+ if (ns & NS_LAST) break; /* Last segment match. Function completed. */
+ dir = dj->dir; /* There is next segment. Follow the sub directory */
+ if (!(dir[DIR_Attr] & AM_DIR)) { /* Cannot follow because it is a file */
+ res = FR_NO_PATH; break;
+ }
+ dj->sclust = LD_CLUST(dir);
+ }
+ }
+
+ return res;
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Load boot record and check if it is an FAT boot record */
+/*-----------------------------------------------------------------------*/
+
+static
+BYTE check_fs ( /* 0:The FAT BR, 1:Valid BR but not an FAT, 2:Not a BR, 3:Disk error */
+ FATFS *fs, /* File system object */
+ DWORD sect /* Sector# (lba) to check if it is an FAT boot record or not */
+)
+{
+ if (disk_read(fs->drv, fs->win, sect, 1) != RES_OK) /* Load boot record */
+ return 3;
+ if (LD_WORD(&fs->win[BS_55AA]) != 0xAA55) /* Check record signature (always placed at offset 510 even if the sector size is >512) */
+ return 2;
+
+ if ((LD_DWORD(&fs->win[BS_FilSysType]) & 0xFFFFFF) == 0x544146) /* Check "FAT" string */
+ return 0;
+ if ((LD_DWORD(&fs->win[BS_FilSysType32]) & 0xFFFFFF) == 0x544146)
+ return 0;
+
+ return 1;
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Check if the file system object is valid or not */
+/*-----------------------------------------------------------------------*/
+
+static
+FRESULT chk_mounted ( /* FR_OK(0): successful, !=0: any error occurred */
+ const TCHAR **path, /* Pointer to pointer to the path name (drive number) */
+ FATFS **rfs, /* Pointer to pointer to the found file system object */
+ BYTE chk_wp /* !=0: Check media write protection for write access */
+)
+{
+ BYTE fmt, b, *tbl;
+ UINT vol;
+ DSTATUS stat;
+ DWORD bsect, fasize, tsect, sysect, nclst, szbfat;
+ WORD nrsv;
+ const TCHAR *p = *path;
+ FATFS *fs;
+
+ /* Get logical drive number from the path name */
+ vol = p[0] - '0'; /* Is there a drive number? */
+ if (vol <= 9 && p[1] == ':') { /* Found a drive number, get and strip it */
+ p += 2; *path = p; /* Return pointer to the path name */
+ } else { /* No drive number is given */
+#if _FS_RPATH
+ vol = CurrVol; /* Use current drive */
+#else
+ vol = 0; /* Use drive 0 */
+#endif
+ }
+
+ /* Check if the logical drive is valid or not */
+ if (vol >= _VOLUMES) /* Is the drive number valid? */
+ return FR_INVALID_DRIVE;
+ *rfs = fs = FatFs[vol]; /* Return pointer to the corresponding file system object */
+ if (!fs) return FR_NOT_ENABLED; /* Is the file system object available? */
+
+ ENTER_FF(fs); /* Lock file system */
+
+ if (fs->fs_type) { /* If the logical drive has been mounted */
+ stat = disk_status(fs->drv);
+ if (!(stat & STA_NOINIT)) { /* and the physical drive is kept initialized (has not been changed), */
+#if !_FS_READONLY
+ if (chk_wp && (stat & STA_PROTECT)) /* Check write protection if needed */
+ return FR_WRITE_PROTECTED;
+#endif
+ return FR_OK; /* The file system object is valid */
+ }
+ }
+
+ /* The logical drive must be mounted. */
+ /* Following code attempts to mount a volume. (analyze BPB and initialize the fs object) */
+
+ fs->fs_type = 0; /* Clear the file system object */
+ fs->drv = (BYTE)LD2PD(vol); /* Bind the logical drive and a physical drive */
+ stat = disk_initialize(fs->drv); /* Initialize low level disk I/O layer */
+ if (stat & STA_NOINIT) /* Check if the initialization succeeded */
+ return FR_NOT_READY; /* Failed to initialize due to no media or hard error */
+#if _MAX_SS != 512 /* Get disk sector size (variable sector size cfg only) */
+ if (disk_ioctl(fs->drv, GET_SECTOR_SIZE, &fs->ssize) != RES_OK)
+ return FR_DISK_ERR;
+#endif
+#if !_FS_READONLY
+ if (chk_wp && (stat & STA_PROTECT)) /* Check disk write protection if needed */
+ return FR_WRITE_PROTECTED;
+#endif
+ /* Search FAT partition on the drive. Supports only generic partitionings, FDISK and SFD. */
+ fmt = check_fs(fs, bsect = 0); /* Check sector 0 if it is a VBR */
+ if (fmt == 1) { /* Not an FAT-VBR, the disk may be partitioned */
+ /* Check the partition listed in top of the partition table */
+ tbl = &fs->win[MBR_Table + LD2PT(vol) * SZ_PTE];/* Partition table */
+ if (tbl[4]) { /* Is the partition existing? */
+ bsect = LD_DWORD(&tbl[8]); /* Partition offset in LBA */
+ fmt = check_fs(fs, bsect); /* Check the partition */
+ }
+ }
+ if (fmt == 3) return FR_DISK_ERR;
+ if (fmt) return FR_NO_FILESYSTEM; /* No FAT volume is found */
+
+ /* Following code initializes the file system object */
+
+ if (LD_WORD(fs->win+BPB_BytsPerSec) != SS(fs)) /* (BPB_BytsPerSec must be equal to the physical sector size) */
+ return FR_NO_FILESYSTEM;
+
+ fasize = LD_WORD(fs->win+BPB_FATSz16); /* Number of sectors per FAT */
+ if (!fasize) fasize = LD_DWORD(fs->win+BPB_FATSz32);
+ fs->fsize = fasize;
+
+ fs->n_fats = b = fs->win[BPB_NumFATs]; /* Number of FAT copies */
+ if (b != 1 && b != 2) return FR_NO_FILESYSTEM; /* (Must be 1 or 2) */
+ fasize *= b; /* Number of sectors for FAT area */
+
+ fs->csize = b = fs->win[BPB_SecPerClus]; /* Number of sectors per cluster */
+ if (!b || (b & (b - 1))) return FR_NO_FILESYSTEM; /* (Must be power of 2) */
+
+ fs->n_rootdir = LD_WORD(fs->win+BPB_RootEntCnt); /* Number of root directory entries */
+ if (fs->n_rootdir % (SS(fs) / SZ_DIR)) return FR_NO_FILESYSTEM; /* (BPB_RootEntCnt must be sector aligned) */
+
+ tsect = LD_WORD(fs->win+BPB_TotSec16); /* Number of sectors on the volume */
+ if (!tsect) tsect = LD_DWORD(fs->win+BPB_TotSec32);
+
+ nrsv = LD_WORD(fs->win+BPB_RsvdSecCnt); /* Number of reserved sectors */
+ if (!nrsv) return FR_NO_FILESYSTEM; /* (BPB_RsvdSecCnt must not be 0) */
+
+ /* Determine the FAT sub type */
+ sysect = nrsv + fasize + fs->n_rootdir / (SS(fs) / SZ_DIR); /* RSV+FAT+DIR */
+ if (tsect < sysect) return FR_NO_FILESYSTEM; /* (Invalid volume size) */
+ nclst = (tsect - sysect) / fs->csize; /* Number of clusters */
+ if (!nclst) return FR_NO_FILESYSTEM; /* (Invalid volume size) */
+ fmt = FS_FAT12;
+ if (nclst >= MIN_FAT16) fmt = FS_FAT16;
+ if (nclst >= MIN_FAT32) fmt = FS_FAT32;
+
+ /* Boundaries and Limits */
+ fs->n_fatent = nclst + 2; /* Number of FAT entries */
+ fs->database = bsect + sysect; /* Data start sector */
+ fs->fatbase = bsect + nrsv; /* FAT start sector */
+ if (fmt == FS_FAT32) {
+ if (fs->n_rootdir) return FR_NO_FILESYSTEM; /* (BPB_RootEntCnt must be 0) */
+ fs->dirbase = LD_DWORD(fs->win+BPB_RootClus); /* Root directory start cluster */
+ szbfat = fs->n_fatent * 4; /* (Required FAT size) */
+ } else {
+ if (!fs->n_rootdir) return FR_NO_FILESYSTEM; /* (BPB_RootEntCnt must not be 0) */
+ fs->dirbase = fs->fatbase + fasize; /* Root directory start sector */
+ szbfat = (fmt == FS_FAT16) ? /* (Required FAT size) */
+ fs->n_fatent * 2 : fs->n_fatent * 3 / 2 + (fs->n_fatent & 1);
+ }
+ if (fs->fsize < (szbfat + (SS(fs) - 1)) / SS(fs)) /* (BPB_FATSz must not be less than required) */
+ return FR_NO_FILESYSTEM;
+
+#if !_FS_READONLY
+ /* Initialize cluster allocation information */
+ fs->free_clust = 0xFFFFFFFF;
+ fs->last_clust = 0;
+
+ /* Get fsinfo if available */
+ if (fmt == FS_FAT32) {
+ fs->fsi_flag = 0;
+ fs->fsi_sector = bsect + LD_WORD(fs->win+BPB_FSInfo);
+ if (disk_read(fs->drv, fs->win, fs->fsi_sector, 1) == RES_OK &&
+ LD_WORD(fs->win+BS_55AA) == 0xAA55 &&
+ LD_DWORD(fs->win+FSI_LeadSig) == 0x41615252 &&
+ LD_DWORD(fs->win+FSI_StrucSig) == 0x61417272) {
+ fs->last_clust = LD_DWORD(fs->win+FSI_Nxt_Free);
+ fs->free_clust = LD_DWORD(fs->win+FSI_Free_Count);
+ }
+ }
+#endif
+ fs->fs_type = fmt; /* FAT sub-type */
+ fs->id = ++Fsid; /* File system mount ID */
+ fs->winsect = 0; /* Invalidate sector cache */
+ fs->wflag = 0;
+#if _FS_RPATH
+ fs->cdir = 0; /* Current directory (root dir) */
+#endif
+#if _FS_SHARE /* Clear file lock semaphores */
+ clear_lock(fs);
+#endif
+
+ return FR_OK;
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Check if the file/dir object is valid or not */
+/*-----------------------------------------------------------------------*/
+
+static
+FRESULT validate ( /* FR_OK(0): The object is valid, !=0: Invalid */
+ FATFS *fs, /* Pointer to the file system object */
+ WORD id /* Member id of the target object to be checked */
+)
+{
+ if (!fs || !fs->fs_type || fs->id != id)
+ return FR_INVALID_OBJECT;
+
+ ENTER_FF(fs); /* Lock file system */
+
+ if (disk_status(fs->drv) & STA_NOINIT)
+ return FR_NOT_READY;
+
+ return FR_OK;
+}
+
+
+
+
+/*--------------------------------------------------------------------------
+
+ Public Functions
+
+--------------------------------------------------------------------------*/
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Mount/Unmount a Logical Drive */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_mount (
+ BYTE vol, /* Logical drive number to be mounted/unmounted */
+ FATFS *fs /* Pointer to new file system object (NULL for unmount)*/
+)
+{
+ FATFS *rfs;
+
+
+ if (vol >= _VOLUMES) /* Check if the drive number is valid */
+ return FR_INVALID_DRIVE;
+ rfs = FatFs[vol]; /* Get current fs object */
+
+ if (rfs) {
+#if _FS_SHARE
+ clear_lock(rfs);
+#endif
+#if _FS_REENTRANT /* Discard sync object of the current volume */
+ if (!ff_del_syncobj(rfs->sobj)) return FR_INT_ERR;
+#endif
+ rfs->fs_type = 0; /* Clear old fs object */
+ }
+
+ if (fs) {
+ fs->fs_type = 0; /* Clear new fs object */
+#if _FS_REENTRANT /* Create sync object for the new volume */
+ if (!ff_cre_syncobj(vol, &fs->sobj)) return FR_INT_ERR;
+#endif
+ }
+ FatFs[vol] = fs; /* Register new fs object */
+
+ return FR_OK;
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Open or Create a File */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_open (
+ FIL *fp, /* Pointer to the blank file object */
+ const TCHAR *path, /* Pointer to the file name */
+ BYTE mode /* Access mode and file open mode flags */
+)
+{
+ FRESULT res;
+ DIR dj;
+ BYTE *dir;
+ DEF_NAMEBUF;
+
+
+ fp->fs = 0; /* Clear file object */
+
+#if !_FS_READONLY
+ mode &= FA_READ | FA_WRITE | FA_CREATE_ALWAYS | FA_OPEN_ALWAYS | FA_CREATE_NEW;
+ res = chk_mounted(&path, &dj.fs, (BYTE)(mode & ~FA_READ));
+#else
+ mode &= FA_READ;
+ res = chk_mounted(&path, &dj.fs, 0);
+#endif
+ INIT_BUF(dj);
+ if (res == FR_OK)
+ res = follow_path(&dj, path); /* Follow the file path */
+ dir = dj.dir;
+
+#if !_FS_READONLY /* R/W configuration */
+ if (res == FR_OK) {
+ if (!dir) /* Current dir itself */
+ res = FR_INVALID_NAME;
+#if _FS_SHARE
+ else
+ res = chk_lock(&dj, (mode & ~FA_READ) ? 1 : 0);
+#endif
+ }
+ /* Create or Open a file */
+ if (mode & (FA_CREATE_ALWAYS | FA_OPEN_ALWAYS | FA_CREATE_NEW)) {
+ DWORD dw, cl;
+
+ if (res != FR_OK) { /* No file, create new */
+ if (res == FR_NO_FILE) /* There is no file to open, create a new entry */
+#if _FS_SHARE
+ res = enq_lock(dj.fs) ? dir_register(&dj) : FR_TOO_MANY_OPEN_FILES;
+#else
+ res = dir_register(&dj);
+#endif
+ mode |= FA_CREATE_ALWAYS; /* File is created */
+ dir = dj.dir; /* New entry */
+ }
+ else { /* Any object is already existing */
+ if (dir[DIR_Attr] & (AM_RDO | AM_DIR)) { /* Cannot overwrite it (R/O or DIR) */
+ res = FR_DENIED;
+ } else {
+ if (mode & FA_CREATE_NEW) /* Cannot create as new file */
+ res = FR_EXIST;
+ }
+ }
+ if (res == FR_OK && (mode & FA_CREATE_ALWAYS)) { /* Truncate it if overwrite mode */
+ dw = get_fattime(); /* Created time */
+ ST_DWORD(dir+DIR_CrtTime, dw);
+ dir[DIR_Attr] = 0; /* Reset attribute */
+ ST_DWORD(dir+DIR_FileSize, 0); /* size = 0 */
+ cl = LD_CLUST(dir); /* Get start cluster */
+ ST_CLUST(dir, 0); /* cluster = 0 */
+ dj.fs->wflag = 1;
+ if (cl) { /* Remove the cluster chain if exist */
+ dw = dj.fs->winsect;
+ res = remove_chain(dj.fs, cl);
+ if (res == FR_OK) {
+ dj.fs->last_clust = cl - 1; /* Reuse the cluster hole */
+ res = move_window(dj.fs, dw);
+ }
+ }
+ }
+ }
+ else { /* Open an existing file */
+ if (res == FR_OK) { /* Follow succeeded */
+ if (dir[DIR_Attr] & AM_DIR) { /* It is a directory */
+ res = FR_NO_FILE;
+ } else {
+ if ((mode & FA_WRITE) && (dir[DIR_Attr] & AM_RDO)) /* R/O violation */
+ res = FR_DENIED;
+ }
+ }
+ }
+ if (res == FR_OK) {
+ if (mode & FA_CREATE_ALWAYS) /* Set file change flag if created or overwritten */
+ mode |= FA__WRITTEN;
+ fp->dir_sect = dj.fs->winsect; /* Pointer to the directory entry */
+ fp->dir_ptr = dir;
+#if _FS_SHARE
+ fp->lockid = inc_lock(&dj, (mode & ~FA_READ) ? 1 : 0);
+ if (!fp->lockid) res = FR_INT_ERR;
+#endif
+ }
+
+#else /* R/O configuration */
+ if (res == FR_OK) { /* Follow succeeded */
+ if (!dir) { /* Current dir itself */
+ res = FR_INVALID_NAME;
+ } else {
+ if (dir[DIR_Attr] & AM_DIR) /* It is a directory */
+ res = FR_NO_FILE;
+ }
+ }
+#endif
+ FREE_BUF();
+
+ if (res == FR_OK) {
+ fp->flag = mode; /* File access mode */
+ fp->sclust = LD_CLUST(dir); /* File start cluster */
+ fp->fsize = LD_DWORD(dir+DIR_FileSize); /* File size */
+ fp->fptr = 0; /* File pointer */
+ fp->dsect = 0;
+#if _USE_FASTSEEK
+ fp->cltbl = 0; /* Normal seek mode */
+#endif
+ fp->fs = dj.fs; fp->id = dj.fs->id; /* Validate file object */
+ }
+
+ LEAVE_FF(dj.fs, res);
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Read File */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_read (
+ FIL *fp, /* Pointer to the file object */
+ void *buff, /* Pointer to data buffer */
+ UINT btr, /* Number of bytes to read */
+ UINT *br /* Pointer to number of bytes read */
+)
+{
+ FRESULT res;
+ DWORD clst, sect, remain;
+ UINT rcnt, cc;
+ BYTE csect, *rbuff = buff;
+
+
+ *br = 0; /* Initialize byte counter */
+
+ res = validate(fp->fs, fp->id); /* Check validity */
+ if (res != FR_OK) LEAVE_FF(fp->fs, res);
+ if (fp->flag & FA__ERROR) /* Aborted file? */
+ LEAVE_FF(fp->fs, FR_INT_ERR);
+ if (!(fp->flag & FA_READ)) /* Check access mode */
+ LEAVE_FF(fp->fs, FR_DENIED);
+ remain = fp->fsize - fp->fptr;
+ if (btr > remain) btr = (UINT)remain; /* Truncate btr by remaining bytes */
+
+ for ( ; btr; /* Repeat until all data read */
+ rbuff += rcnt, fp->fptr += rcnt, *br += rcnt, btr -= rcnt) {
+ if ((fp->fptr % SS(fp->fs)) == 0) { /* On the sector boundary? */
+ csect = (BYTE)(fp->fptr / SS(fp->fs) & (fp->fs->csize - 1)); /* Sector offset in the cluster */
+ if (!csect) { /* On the cluster boundary? */
+ if (fp->fptr == 0) { /* On the top of the file? */
+ clst = fp->sclust; /* Follow from the origin */
+ } else { /* Middle or end of the file */
+#if _USE_FASTSEEK
+ if (fp->cltbl)
+ clst = clmt_clust(fp, fp->fptr); /* Get cluster# from the CLMT */
+ else
+#endif
+ clst = get_fat(fp->fs, fp->clust); /* Follow cluster chain on the FAT */
+ }
+ if (clst < 2) ABORT(fp->fs, FR_INT_ERR);
+ if (clst == 0xFFFFFFFF) ABORT(fp->fs, FR_DISK_ERR);
+ fp->clust = clst; /* Update current cluster */
+ }
+ sect = clust2sect(fp->fs, fp->clust); /* Get current sector */
+ if (!sect) ABORT(fp->fs, FR_INT_ERR);
+ sect += csect;
+ cc = btr / SS(fp->fs); /* When remaining bytes >= sector size, */
+ if (cc) { /* Read maximum contiguous sectors directly */
+ if (csect + cc > fp->fs->csize) /* Clip at cluster boundary */
+ cc = fp->fs->csize - csect;
+ if (disk_read(fp->fs->drv, rbuff, sect, (BYTE)cc) != RES_OK)
+ ABORT(fp->fs, FR_DISK_ERR);
+#if !_FS_READONLY && _FS_MINIMIZE <= 2 /* Replace one of the read sectors with cached data if it contains a dirty sector */
+#if _FS_TINY
+ if (fp->fs->wflag && fp->fs->winsect - sect < cc)
+ mem_cpy(rbuff + ((fp->fs->winsect - sect) * SS(fp->fs)), fp->fs->win, SS(fp->fs));
+#else
+ if ((fp->flag & FA__DIRTY) && fp->dsect - sect < cc)
+ mem_cpy(rbuff + ((fp->dsect - sect) * SS(fp->fs)), fp->buf, SS(fp->fs));
+#endif
+#endif
+ rcnt = SS(fp->fs) * cc; /* Number of bytes transferred */
+ continue;
+ }
+#if !_FS_TINY
+ if (fp->dsect != sect) { /* Load data sector if not in cache */
+#if !_FS_READONLY
+ if (fp->flag & FA__DIRTY) { /* Write-back dirty sector cache */
+ if (disk_write(fp->fs->drv, fp->buf, fp->dsect, 1) != RES_OK)
+ ABORT(fp->fs, FR_DISK_ERR);
+ fp->flag &= ~FA__DIRTY;
+ }
+#endif
+ if (disk_read(fp->fs->drv, fp->buf, sect, 1) != RES_OK) /* Fill sector cache */
+ ABORT(fp->fs, FR_DISK_ERR);
+ }
+#endif
+ fp->dsect = sect;
+ }
+ rcnt = SS(fp->fs) - (fp->fptr % SS(fp->fs)); /* Get partial sector data from sector buffer */
+ if (rcnt > btr) rcnt = btr;
+#if _FS_TINY
+ if (move_window(fp->fs, fp->dsect)) /* Move sector window */
+ ABORT(fp->fs, FR_DISK_ERR);
+ mem_cpy(rbuff, &fp->fs->win[fp->fptr % SS(fp->fs)], rcnt); /* Pick partial sector */
+#else
+ mem_cpy(rbuff, &fp->buf[fp->fptr % SS(fp->fs)], rcnt); /* Pick partial sector */
+#endif
+ }
+
+ LEAVE_FF(fp->fs, FR_OK);
+}
+
+
+
+
+#if !_FS_READONLY
+/*-----------------------------------------------------------------------*/
+/* Write File */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_write (
+ FIL *fp, /* Pointer to the file object */
+ const void *buff, /* Pointer to the data to be written */
+ UINT btw, /* Number of bytes to write */
+ UINT *bw /* Pointer to number of bytes written */
+)
+{
+ FRESULT res;
+ DWORD clst, sect;
+ UINT wcnt, cc;
+ const BYTE *wbuff = buff;
+ BYTE csect;
+
+
+ *bw = 0; /* Initialize byte counter */
+
+ res = validate(fp->fs, fp->id); /* Check validity */
+ if (res != FR_OK) LEAVE_FF(fp->fs, res);
+ if (fp->flag & FA__ERROR) /* Aborted file? */
+ LEAVE_FF(fp->fs, FR_INT_ERR);
+ if (!(fp->flag & FA_WRITE)) /* Check access mode */
+ LEAVE_FF(fp->fs, FR_DENIED);
+ if ((DWORD)(fp->fsize + btw) < fp->fsize) btw = 0; /* File size cannot reach 4GB */
+
+ for ( ; btw; /* Repeat until all data written */
+ wbuff += wcnt, fp->fptr += wcnt, *bw += wcnt, btw -= wcnt) {
+ if ((fp->fptr % SS(fp->fs)) == 0) { /* On the sector boundary? */
+ csect = (BYTE)(fp->fptr / SS(fp->fs) & (fp->fs->csize - 1)); /* Sector offset in the cluster */
+ if (!csect) { /* On the cluster boundary? */
+ if (fp->fptr == 0) { /* On the top of the file? */
+ clst = fp->sclust; /* Follow from the origin */
+ if (clst == 0) /* When no cluster is allocated, */
+ fp->sclust = clst = create_chain(fp->fs, 0); /* Create a new cluster chain */
+ } else { /* Middle or end of the file */
+#if _USE_FASTSEEK
+ if (fp->cltbl)
+ clst = clmt_clust(fp, fp->fptr); /* Get cluster# from the CLMT */
+ else
+#endif
+ clst = create_chain(fp->fs, fp->clust); /* Follow or stretch cluster chain on the FAT */
+ }
+ if (clst == 0) break; /* Could not allocate a new cluster (disk full) */
+ if (clst == 1) ABORT(fp->fs, FR_INT_ERR);
+ if (clst == 0xFFFFFFFF) ABORT(fp->fs, FR_DISK_ERR);
+ fp->clust = clst; /* Update current cluster */
+ }
+#if _FS_TINY
+ if (fp->fs->winsect == fp->dsect && move_window(fp->fs, 0)) /* Write-back sector cache */
+ ABORT(fp->fs, FR_DISK_ERR);
+#else
+ if (fp->flag & FA__DIRTY) { /* Write-back sector cache */
+ if (disk_write(fp->fs->drv, fp->buf, fp->dsect, 1) != RES_OK)
+ ABORT(fp->fs, FR_DISK_ERR);
+ fp->flag &= ~FA__DIRTY;
+ }
+#endif
+ sect = clust2sect(fp->fs, fp->clust); /* Get current sector */
+ if (!sect) ABORT(fp->fs, FR_INT_ERR);
+ sect += csect;
+ cc = btw / SS(fp->fs); /* When remaining bytes >= sector size, */
+ if (cc) { /* Write maximum contiguous sectors directly */
+ if (csect + cc > fp->fs->csize) /* Clip at cluster boundary */
+ cc = fp->fs->csize - csect;
+ if (disk_write(fp->fs->drv, wbuff, sect, (BYTE)cc) != RES_OK)
+ ABORT(fp->fs, FR_DISK_ERR);
+#if _FS_TINY
+ if (fp->fs->winsect - sect < cc) { /* Refill sector cache if it gets invalidated by the direct write */
+ mem_cpy(fp->fs->win, wbuff + ((fp->fs->winsect - sect) * SS(fp->fs)), SS(fp->fs));
+ fp->fs->wflag = 0;
+ }
+#else
+ if (fp->dsect - sect < cc) { /* Refill sector cache if it gets invalidated by the direct write */
+ mem_cpy(fp->buf, wbuff + ((fp->dsect - sect) * SS(fp->fs)), SS(fp->fs));
+ fp->flag &= ~FA__DIRTY;
+ }
+#endif
+ wcnt = SS(fp->fs) * cc; /* Number of bytes transferred */
+ continue;
+ }
+#if _FS_TINY
+ if (fp->fptr >= fp->fsize) { /* Avoid silly cache filling at growing edge */
+ if (move_window(fp->fs, 0)) ABORT(fp->fs, FR_DISK_ERR);
+ fp->fs->winsect = sect;
+ }
+#else
+ if (fp->dsect != sect) { /* Fill sector cache with file data */
+ if (fp->fptr < fp->fsize &&
+ disk_read(fp->fs->drv, fp->buf, sect, 1) != RES_OK)
+ ABORT(fp->fs, FR_DISK_ERR);
+ }
+#endif
+ fp->dsect = sect;
+ }
+ wcnt = SS(fp->fs) - (fp->fptr % SS(fp->fs));/* Put partial sector into file I/O buffer */
+ if (wcnt > btw) wcnt = btw;
+#if _FS_TINY
+ if (move_window(fp->fs, fp->dsect)) /* Move sector window */
+ ABORT(fp->fs, FR_DISK_ERR);
+ mem_cpy(&fp->fs->win[fp->fptr % SS(fp->fs)], wbuff, wcnt); /* Fit partial sector */
+ fp->fs->wflag = 1;
+#else
+ mem_cpy(&fp->buf[fp->fptr % SS(fp->fs)], wbuff, wcnt); /* Fit partial sector */
+ fp->flag |= FA__DIRTY;
+#endif
+ }
+
+ if (fp->fptr > fp->fsize) fp->fsize = fp->fptr; /* Update file size if needed */
+ fp->flag |= FA__WRITTEN; /* Set file change flag */
+
+ LEAVE_FF(fp->fs, FR_OK);
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Synchronize the File Object */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_sync (
+ FIL *fp /* Pointer to the file object */
+)
+{
+ FRESULT res;
+ DWORD tim;
+ BYTE *dir;
+
+
+ res = validate(fp->fs, fp->id); /* Check validity of the object */
+ if (res == FR_OK) {
+ if (fp->flag & FA__WRITTEN) { /* Has the file been written? */
+#if !_FS_TINY /* Write-back dirty buffer */
+ if (fp->flag & FA__DIRTY) {
+ if (disk_write(fp->fs->drv, fp->buf, fp->dsect, 1) != RES_OK)
+ LEAVE_FF(fp->fs, FR_DISK_ERR);
+ fp->flag &= ~FA__DIRTY;
+ }
+#endif
+ /* Update the directory entry */
+ res = move_window(fp->fs, fp->dir_sect);
+ if (res == FR_OK) {
+ dir = fp->dir_ptr;
+ dir[DIR_Attr] |= AM_ARC; /* Set archive bit */
+ ST_DWORD(dir+DIR_FileSize, fp->fsize); /* Update file size */
+ ST_CLUST(dir, fp->sclust); /* Update start cluster */
+ tim = get_fattime(); /* Update updated time */
+ ST_DWORD(dir+DIR_WrtTime, tim);
+ fp->flag &= ~FA__WRITTEN;
+ fp->fs->wflag = 1;
+ res = sync(fp->fs);
+ }
+ }
+ }
+
+ LEAVE_FF(fp->fs, res);
+}
+
+#endif /* !_FS_READONLY */
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Close File */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_close (
+ FIL *fp /* Pointer to the file object to be closed */
+)
+{
+ FRESULT res;
+
+#if _FS_READONLY
+ FATFS *fs = fp->fs;
+ res = validate(fs, fp->id);
+ if (res == FR_OK) fp->fs = 0; /* Discard file object */
+ LEAVE_FF(fs, res);
+
+#else
+ res = f_sync(fp); /* Flush cached data */
+#if _FS_SHARE
+ if (res == FR_OK) { /* Decrement open counter */
+#if _FS_REENTRANT
+ res = validate(fp->fs, fp->id);
+ if (res == FR_OK) {
+ res = dec_lock(fp->lockid);
+ unlock_fs(fp->fs, FR_OK);
+ }
+#else
+ res = dec_lock(fp->lockid);
+#endif
+ }
+#endif
+ if (res == FR_OK) fp->fs = 0; /* Discard file object */
+ return res;
+#endif
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Current Drive/Directory Handlings */
+/*-----------------------------------------------------------------------*/
+
+#if _FS_RPATH >= 1
+
+FRESULT f_chdrive (
+ BYTE drv /* Drive number */
+)
+{
+ if (drv >= _VOLUMES) return FR_INVALID_DRIVE;
+
+ CurrVol = drv;
+
+ return FR_OK;
+}
+
+
+
+FRESULT f_chdir (
+ const TCHAR *path /* Pointer to the directory path */
+)
+{
+ FRESULT res;
+ DIR dj;
+ DEF_NAMEBUF;
+
+
+ res = chk_mounted(&path, &dj.fs, 0);
+ if (res == FR_OK) {
+ INIT_BUF(dj);
+ res = follow_path(&dj, path); /* Follow the path */
+ FREE_BUF();
+ if (res == FR_OK) { /* Follow completed */
+ if (!dj.dir) {
+ dj.fs->cdir = dj.sclust; /* Start directory itself */
+ } else {
+ if (dj.dir[DIR_Attr] & AM_DIR) /* Reached to the directory */
+ dj.fs->cdir = LD_CLUST(dj.dir);
+ else
+ res = FR_NO_PATH; /* Reached but a file */
+ }
+ }
+ if (res == FR_NO_FILE) res = FR_NO_PATH;
+ }
+
+ LEAVE_FF(dj.fs, res);
+}
+
+
+#if _FS_RPATH >= 2
+FRESULT f_getcwd (
+ TCHAR *path, /* Pointer to the directory path */
+ UINT sz_path /* Size of path */
+)
+{
+ FRESULT res;
+ DIR dj;
+ UINT i, n;
+ DWORD ccl;
+ TCHAR *tp;
+ FILINFO fno;
+ DEF_NAMEBUF;
+
+
+ *path = 0;
+ res = chk_mounted((const TCHAR**)&path, &dj.fs, 0); /* Get current volume */
+ if (res == FR_OK) {
+ INIT_BUF(dj);
+ i = sz_path; /* Bottom of buffer (dir stack base) */
+ dj.sclust = dj.fs->cdir; /* Start to follow upper dir from current dir */
+ while ((ccl = dj.sclust) != 0) { /* Repeat while current dir is a sub-dir */
+ res = dir_sdi(&dj, 1); /* Get parent dir */
+ if (res != FR_OK) break;
+ res = dir_read(&dj);
+ if (res != FR_OK) break;
+ dj.sclust = LD_CLUST(dj.dir); /* Goto parent dir */
+ res = dir_sdi(&dj, 0);
+ if (res != FR_OK) break;
+ do { /* Find the entry links to the child dir */
+ res = dir_read(&dj);
+ if (res != FR_OK) break;
+ if (ccl == LD_CLUST(dj.dir)) break; /* Found the entry */
+ res = dir_next(&dj, 0);
+ } while (res == FR_OK);
+ if (res == FR_NO_FILE) res = FR_INT_ERR;/* It cannot be 'not found'. */
+ if (res != FR_OK) break;
+#if _USE_LFN
+ fno.lfname = path;
+ fno.lfsize = i;
+#endif
+ get_fileinfo(&dj, &fno); /* Get the dir name and push it to the buffer */
+ tp = fno.fname;
+ if (_USE_LFN && *path) tp = path;
+ for (n = 0; tp[n]; n++) ;
+ if (i < n + 3) {
+ res = FR_NOT_ENOUGH_CORE; break;
+ }
+ while (n) path[--i] = tp[--n];
+ path[--i] = '/';
+ }
+ tp = path;
+ if (res == FR_OK) {
+ *tp++ = '0' + CurrVol; /* Put drive number */
+ *tp++ = ':';
+ if (i == sz_path) { /* Root-dir */
+ *tp++ = '/';
+ } else { /* Sub-dir */
+ do /* Add stacked path str */
+ *tp++ = path[i++];
+ while (i < sz_path);
+ }
+ }
+ *tp = 0;
+ FREE_BUF();
+ }
+
+ LEAVE_FF(dj.fs, res);
+}
+#endif /* _FS_RPATH >= 2 */
+#endif /* _FS_RPATH >= 1 */
+
+
+
+#if _FS_MINIMIZE <= 2
+/*-----------------------------------------------------------------------*/
+/* Seek File R/W Pointer */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_lseek (
+ FIL *fp, /* Pointer to the file object */
+ DWORD ofs /* File pointer from top of file */
+)
+{
+ FRESULT res;
+
+
+ res = validate(fp->fs, fp->id); /* Check validity of the object */
+ if (res != FR_OK) LEAVE_FF(fp->fs, res);
+ if (fp->flag & FA__ERROR) /* Check abort flag */
+ LEAVE_FF(fp->fs, FR_INT_ERR);
+
+#if _USE_FASTSEEK
+ if (fp->cltbl) { /* Fast seek */
+ DWORD cl, pcl, ncl, tcl, dsc, tlen, ulen, *tbl;
+
+ if (ofs == CREATE_LINKMAP) { /* Create CLMT */
+ tbl = fp->cltbl;
+ tlen = *tbl++; ulen = 2; /* Given table size and required table size */
+ cl = fp->sclust; /* Top of the chain */
+ if (cl) {
+ do {
+ /* Get a fragment */
+ tcl = cl; ncl = 0; ulen += 2; /* Top, length and used items */
+ do {
+ pcl = cl; ncl++;
+ cl = get_fat(fp->fs, cl);
+ if (cl <= 1) ABORT(fp->fs, FR_INT_ERR);
+ if (cl == 0xFFFFFFFF) ABORT(fp->fs, FR_DISK_ERR);
+ } while (cl == pcl + 1);
+ if (ulen <= tlen) { /* Store the length and top of the fragment */
+ *tbl++ = ncl; *tbl++ = tcl;
+ }
+ } while (cl < fp->fs->n_fatent); /* Repeat until end of chain */
+ }
+ *fp->cltbl = ulen; /* Number of items used */
+ if (ulen <= tlen)
+ *tbl = 0; /* Terminate table */
+ else
+ res = FR_NOT_ENOUGH_CORE; /* Given table size is smaller than required */
+
+ } else { /* Fast seek */
+ if (ofs > fp->fsize) /* Clip offset at the file size */
+ ofs = fp->fsize;
+ fp->fptr = ofs; /* Set file pointer */
+ if (ofs) {
+ fp->clust = clmt_clust(fp, ofs - 1);
+ dsc = clust2sect(fp->fs, fp->clust);
+ if (!dsc) ABORT(fp->fs, FR_INT_ERR);
+ dsc += (ofs - 1) / SS(fp->fs) & (fp->fs->csize - 1);
+ if (fp->fptr % SS(fp->fs) && dsc != fp->dsect) { /* Refill sector cache if needed */
+#if !_FS_TINY
+#if !_FS_READONLY
+ if (fp->flag & FA__DIRTY) { /* Write-back dirty sector cache */
+ if (disk_write(fp->fs->drv, fp->buf, fp->dsect, 1) != RES_OK)
+ ABORT(fp->fs, FR_DISK_ERR);
+ fp->flag &= ~FA__DIRTY;
+ }
+#endif
+ if (disk_read(fp->fs->drv, fp->buf, dsc, 1) != RES_OK) /* Load current sector */
+ ABORT(fp->fs, FR_DISK_ERR);
+#endif
+ fp->dsect = dsc;
+ }
+ }
+ }
+ } else
+#endif
+
+ /* Normal Seek */
+ {
+ DWORD clst, bcs, nsect, ifptr;
+
+ if (ofs > fp->fsize /* In read-only mode, clip offset with the file size */
+#if !_FS_READONLY
+ && !(fp->flag & FA_WRITE)
+#endif
+ ) ofs = fp->fsize;
+
+ ifptr = fp->fptr;
+ fp->fptr = nsect = 0;
+ if (ofs) {
+ bcs = (DWORD)fp->fs->csize * SS(fp->fs); /* Cluster size (byte) */
+ if (ifptr > 0 &&
+ (ofs - 1) / bcs >= (ifptr - 1) / bcs) { /* When seek to same or following cluster, */
+ fp->fptr = (ifptr - 1) & ~(bcs - 1); /* start from the current cluster */
+ ofs -= fp->fptr;
+ clst = fp->clust;
+ } else { /* When seek to back cluster, */
+ clst = fp->sclust; /* start from the first cluster */
+#if !_FS_READONLY
+ if (clst == 0) { /* If no cluster chain, create a new chain */
+ clst = create_chain(fp->fs, 0);
+ if (clst == 1) ABORT(fp->fs, FR_INT_ERR);
+ if (clst == 0xFFFFFFFF) ABORT(fp->fs, FR_DISK_ERR);
+ fp->sclust = clst;
+ }
+#endif
+ fp->clust = clst;
+ }
+ if (clst != 0) {
+ while (ofs > bcs) { /* Cluster following loop */
+#if !_FS_READONLY
+ if (fp->flag & FA_WRITE) { /* Check if in write mode or not */
+ clst = create_chain(fp->fs, clst); /* Force stretch if in write mode */
+ if (clst == 0) { /* When disk gets full, clip file size */
+ ofs = bcs; break;
+ }
+ } else
+#endif
+ clst = get_fat(fp->fs, clst); /* Follow cluster chain if not in write mode */
+ if (clst == 0xFFFFFFFF) ABORT(fp->fs, FR_DISK_ERR);
+ if (clst <= 1 || clst >= fp->fs->n_fatent) ABORT(fp->fs, FR_INT_ERR);
+ fp->clust = clst;
+ fp->fptr += bcs;
+ ofs -= bcs;
+ }
+ fp->fptr += ofs;
+ if (ofs % SS(fp->fs)) {
+ nsect = clust2sect(fp->fs, clst); /* Current sector */
+ if (!nsect) ABORT(fp->fs, FR_INT_ERR);
+ nsect += ofs / SS(fp->fs);
+ }
+ }
+ }
+ if (fp->fptr % SS(fp->fs) && nsect != fp->dsect) { /* Fill sector cache if needed */
+#if !_FS_TINY
+#if !_FS_READONLY
+ if (fp->flag & FA__DIRTY) { /* Write-back dirty sector cache */
+ if (disk_write(fp->fs->drv, fp->buf, fp->dsect, 1) != RES_OK)
+ ABORT(fp->fs, FR_DISK_ERR);
+ fp->flag &= ~FA__DIRTY;
+ }
+#endif
+ if (disk_read(fp->fs->drv, fp->buf, nsect, 1) != RES_OK) /* Fill sector cache */
+ ABORT(fp->fs, FR_DISK_ERR);
+#endif
+ fp->dsect = nsect;
+ }
+#if !_FS_READONLY
+ if (fp->fptr > fp->fsize) { /* Set file change flag if the file size is extended */
+ fp->fsize = fp->fptr;
+ fp->flag |= FA__WRITTEN;
+ }
+#endif
+ }
+
+ LEAVE_FF(fp->fs, res);
+}
+
+
+
+#if _FS_MINIMIZE <= 1
+/*-----------------------------------------------------------------------*/
+/* Create a Directroy Object */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_opendir (
+ DIR *dj, /* Pointer to directory object to create */
+ const TCHAR *path /* Pointer to the directory path */
+)
+{
+ FRESULT res;
+ DEF_NAMEBUF;
+
+
+ res = chk_mounted(&path, &dj->fs, 0);
+ if (res == FR_OK) {
+ INIT_BUF(*dj);
+ res = follow_path(dj, path); /* Follow the path to the directory */
+ FREE_BUF();
+ if (res == FR_OK) { /* Follow completed */
+ if (dj->dir) { /* It is not the root dir */
+ if (dj->dir[DIR_Attr] & AM_DIR) { /* The object is a directory */
+ dj->sclust = LD_CLUST(dj->dir);
+ } else { /* The object is not a directory */
+ res = FR_NO_PATH;
+ }
+ }
+ if (res == FR_OK) {
+ dj->id = dj->fs->id;
+ res = dir_sdi(dj, 0); /* Rewind dir */
+ }
+ }
+ if (res == FR_NO_FILE) res = FR_NO_PATH;
+ }
+
+ LEAVE_FF(dj->fs, res);
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Read Directory Entry in Sequense */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_readdir (
+ DIR *dj, /* Pointer to the open directory object */
+ FILINFO *fno /* Pointer to file information to return */
+)
+{
+ FRESULT res;
+ DEF_NAMEBUF;
+
+
+ res = validate(dj->fs, dj->id); /* Check validity of the object */
+ if (res == FR_OK) {
+ if( dj->sect == 0) res = FR_NO_FILE;
+ else if (!fno) {
+ res = dir_sdi(dj, 0); /* Rewind the directory object */
+ } else {
+ INIT_BUF(*dj);
+ res = dir_read(dj); /* Read an directory item */
+ if (res == FR_NO_FILE) { /* Reached end of dir */
+ dj->sect = 0;
+ res = FR_NO_FILE;
+ }
+ if (res == FR_OK) { /* A valid entry is found */
+ get_fileinfo(dj, fno); /* Get the object information */
+ res = dir_next(dj, 0); /* Increment index for next */
+ if (res == FR_NO_FILE) {
+ dj->sect = 0;
+ res = FR_OK;
+ }
+ }
+ FREE_BUF();
+ }
+ }
+
+ LEAVE_FF(dj->fs, res);
+}
+
+
+
+#if _FS_MINIMIZE == 0
+/*-----------------------------------------------------------------------*/
+/* Get File Status */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_stat (
+ const TCHAR *path, /* Pointer to the file path */
+ FILINFO *fno /* Pointer to file information to return */
+)
+{
+ FRESULT res;
+ DIR dj;
+ DEF_NAMEBUF;
+
+
+ res = chk_mounted(&path, &dj.fs, 0);
+ if (res == FR_OK) {
+ INIT_BUF(dj);
+ res = follow_path(&dj, path); /* Follow the file path */
+ if (res == FR_OK) { /* Follow completed */
+ if (dj.dir) /* Found an object */
+ get_fileinfo(&dj, fno);
+ else /* It is root dir */
+ res = FR_INVALID_NAME;
+ }
+ FREE_BUF();
+ }
+
+ LEAVE_FF(dj.fs, res);
+}
+
+
+
+#if !_FS_READONLY
+/*-----------------------------------------------------------------------*/
+/* Get Number of Free Clusters */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_getfree (
+ const TCHAR *path, /* Pointer to the logical drive number (root dir) */
+ DWORD *nclst, /* Pointer to the variable to return number of free clusters */
+ FATFS **fatfs /* Pointer to pointer to corresponding file system object to return */
+)
+{
+ FRESULT res;
+ DWORD n, clst, sect, stat;
+ UINT i;
+ BYTE fat, *p;
+
+
+ /* Get drive number */
+ res = chk_mounted(&path, fatfs, 0);
+ if (res == FR_OK) {
+ /* If free_clust is valid, return it without full cluster scan */
+ if ((*fatfs)->free_clust <= (*fatfs)->n_fatent - 2) {
+ *nclst = (*fatfs)->free_clust;
+ } else {
+ /* Get number of free clusters */
+ fat = (*fatfs)->fs_type;
+ n = 0;
+ if (fat == FS_FAT12) {
+ clst = 2;
+ do {
+ stat = get_fat(*fatfs, clst);
+ if (stat == 0xFFFFFFFF) { res = FR_DISK_ERR; break; }
+ if (stat == 1) { res = FR_INT_ERR; break; }
+ if (stat == 0) n++;
+ } while (++clst < (*fatfs)->n_fatent);
+ } else {
+ clst = (*fatfs)->n_fatent;
+ sect = (*fatfs)->fatbase;
+ i = 0; p = 0;
+ do {
+ if (!i) {
+ res = move_window(*fatfs, sect++);
+ if (res != FR_OK) break;
+ p = (*fatfs)->win;
+ i = SS(*fatfs);
+ }
+ if (fat == FS_FAT16) {
+ if (LD_WORD(p) == 0) n++;
+ p += 2; i -= 2;
+ } else {
+ if ((LD_DWORD(p) & 0x0FFFFFFF) == 0) n++;
+ p += 4; i -= 4;
+ }
+ } while (--clst);
+ }
+ (*fatfs)->free_clust = n;
+ if (fat == FS_FAT32) (*fatfs)->fsi_flag = 1;
+ *nclst = n;
+ }
+ }
+ LEAVE_FF(*fatfs, res);
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Truncate File */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_truncate (
+ FIL *fp /* Pointer to the file object */
+)
+{
+ FRESULT res;
+ DWORD ncl;
+
+
+ res = validate(fp->fs, fp->id); /* Check validity of the object */
+ if (res == FR_OK) {
+ if (fp->flag & FA__ERROR) { /* Check abort flag */
+ res = FR_INT_ERR;
+ } else {
+ if (!(fp->flag & FA_WRITE)) /* Check access mode */
+ res = FR_DENIED;
+ }
+ }
+ if (res == FR_OK) {
+ if (fp->fsize > fp->fptr) {
+ fp->fsize = fp->fptr; /* Set file size to current R/W point */
+ fp->flag |= FA__WRITTEN;
+ if (fp->fptr == 0) { /* When set file size to zero, remove entire cluster chain */
+ res = remove_chain(fp->fs, fp->sclust);
+ fp->sclust = 0;
+ } else { /* When truncate a part of the file, remove remaining clusters */
+ ncl = get_fat(fp->fs, fp->clust);
+ res = FR_OK;
+ if (ncl == 0xFFFFFFFF) res = FR_DISK_ERR;
+ if (ncl == 1) res = FR_INT_ERR;
+ if (res == FR_OK && ncl < fp->fs->n_fatent) {
+ res = put_fat(fp->fs, fp->clust, 0x0FFFFFFF);
+ if (res == FR_OK) res = remove_chain(fp->fs, ncl);
+ }
+ }
+ }
+ if (res != FR_OK) fp->flag |= FA__ERROR;
+ }
+
+ LEAVE_FF(fp->fs, res);
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Delete a File or Directory */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_unlink (
+ const TCHAR *path /* Pointer to the file or directory path */
+)
+{
+ FRESULT res;
+ DIR dj, sdj;
+ BYTE *dir;
+ DWORD dclst;
+ DEF_NAMEBUF;
+
+
+ res = chk_mounted(&path, &dj.fs, 1);
+ if (res == FR_OK) {
+ INIT_BUF(dj);
+ res = follow_path(&dj, path); /* Follow the file path */
+ if (_FS_RPATH && res == FR_OK && (dj.fn[NS] & NS_DOT))
+ res = FR_INVALID_NAME; /* Cannot remove dot entry */
+#if _FS_SHARE
+ if (res == FR_OK) res = chk_lock(&dj, 2); /* Cannot remove open file */
+#endif
+ if (res == FR_OK) { /* The object is accessible */
+ dir = dj.dir;
+ if (!dir) {
+ res = FR_INVALID_NAME; /* Cannot remove the start directory */
+ } else {
+ if (dir[DIR_Attr] & AM_RDO)
+ res = FR_DENIED; /* Cannot remove R/O object */
+ }
+ dclst = LD_CLUST(dir);
+ if (res == FR_OK && (dir[DIR_Attr] & AM_DIR)) { /* Is it a sub-dir? */
+ if (dclst < 2) {
+ res = FR_INT_ERR;
+ } else {
+ mem_cpy(&sdj, &dj, sizeof(DIR)); /* Check if the sub-dir is empty or not */
+ sdj.sclust = dclst;
+ res = dir_sdi(&sdj, 2); /* Exclude dot entries */
+ if (res == FR_OK) {
+ res = dir_read(&sdj);
+ if (res == FR_OK /* Not empty dir */
+#if _FS_RPATH
+ || dclst == sdj.fs->cdir /* Current dir */
+#endif
+ ) res = FR_DENIED;
+ if (res == FR_NO_FILE) res = FR_OK; /* Empty */
+ }
+ }
+ }
+ if (res == FR_OK) {
+ res = dir_remove(&dj); /* Remove the directory entry */
+ if (res == FR_OK) {
+ if (dclst) /* Remove the cluster chain if exist */
+ res = remove_chain(dj.fs, dclst);
+ if (res == FR_OK) res = sync(dj.fs);
+ }
+ }
+ }
+ FREE_BUF();
+ }
+ LEAVE_FF(dj.fs, res);
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Create a Directory */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_mkdir (
+ const TCHAR *path /* Pointer to the directory path */
+)
+{
+ FRESULT res;
+ DIR dj;
+ BYTE *dir, n;
+ DWORD dsc, dcl, pcl, tim = get_fattime();
+ DEF_NAMEBUF;
+
+
+ res = chk_mounted(&path, &dj.fs, 1);
+ if (res == FR_OK) {
+ INIT_BUF(dj);
+ res = follow_path(&dj, path); /* Follow the file path */
+ if (res == FR_OK) res = FR_EXIST; /* Any object with same name is already existing */
+ if (_FS_RPATH && res == FR_NO_FILE && (dj.fn[NS] & NS_DOT))
+ res = FR_INVALID_NAME;
+ if (res == FR_NO_FILE) { /* Can create a new directory */
+ dcl = create_chain(dj.fs, 0); /* Allocate a cluster for the new directory table */
+ res = FR_OK;
+ if (dcl == 0) res = FR_DENIED; /* No space to allocate a new cluster */
+ if (dcl == 1) res = FR_INT_ERR;
+ if (dcl == 0xFFFFFFFF) res = FR_DISK_ERR;
+ if (res == FR_OK) /* Flush FAT */
+ res = move_window(dj.fs, 0);
+ if (res == FR_OK) { /* Initialize the new directory table */
+ dsc = clust2sect(dj.fs, dcl);
+ dir = dj.fs->win;
+ mem_set(dir, 0, SS(dj.fs));
+ mem_set(dir+DIR_Name, ' ', 8+3); /* Create "." entry */
+ dir[DIR_Name] = '.';
+ dir[DIR_Attr] = AM_DIR;
+ ST_DWORD(dir+DIR_WrtTime, tim);
+ ST_CLUST(dir, dcl);
+ mem_cpy(dir+SZ_DIR, dir, SZ_DIR); /* Create ".." entry */
+ dir[33] = '.'; pcl = dj.sclust;
+ if (dj.fs->fs_type == FS_FAT32 && pcl == dj.fs->dirbase)
+ pcl = 0;
+ ST_CLUST(dir+SZ_DIR, pcl);
+ for (n = dj.fs->csize; n; n--) { /* Write dot entries and clear following sectors */
+ dj.fs->winsect = dsc++;
+ dj.fs->wflag = 1;
+ res = move_window(dj.fs, 0);
+ if (res != FR_OK) break;
+ mem_set(dir, 0, SS(dj.fs));
+ }
+ }
+ if (res == FR_OK) res = dir_register(&dj); /* Register the object to the directoy */
+ if (res != FR_OK) {
+ remove_chain(dj.fs, dcl); /* Could not register, remove cluster chain */
+ } else {
+ dir = dj.dir;
+ dir[DIR_Attr] = AM_DIR; /* Attribute */
+ ST_DWORD(dir+DIR_WrtTime, tim); /* Created time */
+ ST_CLUST(dir, dcl); /* Table start cluster */
+ dj.fs->wflag = 1;
+ res = sync(dj.fs);
+ }
+ }
+ FREE_BUF();
+ }
+
+ LEAVE_FF(dj.fs, res);
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Change Attribute */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_chmod (
+ const TCHAR *path, /* Pointer to the file path */
+ BYTE value, /* Attribute bits */
+ BYTE mask /* Attribute mask to change */
+)
+{
+ FRESULT res;
+ DIR dj;
+ BYTE *dir;
+ DEF_NAMEBUF;
+
+
+ res = chk_mounted(&path, &dj.fs, 1);
+ if (res == FR_OK) {
+ INIT_BUF(dj);
+ res = follow_path(&dj, path); /* Follow the file path */
+ FREE_BUF();
+ if (_FS_RPATH && res == FR_OK && (dj.fn[NS] & NS_DOT))
+ res = FR_INVALID_NAME;
+ if (res == FR_OK) {
+ dir = dj.dir;
+ if (!dir) { /* Is it a root directory? */
+ res = FR_INVALID_NAME;
+ } else { /* File or sub directory */
+ mask &= AM_RDO|AM_HID|AM_SYS|AM_ARC; /* Valid attribute mask */
+ dir[DIR_Attr] = (value & mask) | (dir[DIR_Attr] & (BYTE)~mask); /* Apply attribute change */
+ dj.fs->wflag = 1;
+ res = sync(dj.fs);
+ }
+ }
+ }
+
+ LEAVE_FF(dj.fs, res);
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Change Timestamp */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_utime (
+ const TCHAR *path, /* Pointer to the file/directory name */
+ const FILINFO *fno /* Pointer to the time stamp to be set */
+)
+{
+ FRESULT res;
+ DIR dj;
+ BYTE *dir;
+ DEF_NAMEBUF;
+
+
+ res = chk_mounted(&path, &dj.fs, 1);
+ if (res == FR_OK) {
+ INIT_BUF(dj);
+ res = follow_path(&dj, path); /* Follow the file path */
+ FREE_BUF();
+ if (_FS_RPATH && res == FR_OK && (dj.fn[NS] & NS_DOT))
+ res = FR_INVALID_NAME;
+ if (res == FR_OK) {
+ dir = dj.dir;
+ if (!dir) { /* Root directory */
+ res = FR_INVALID_NAME;
+ } else { /* File or sub-directory */
+ ST_WORD(dir+DIR_WrtTime, fno->ftime);
+ ST_WORD(dir+DIR_WrtDate, fno->fdate);
+ dj.fs->wflag = 1;
+ res = sync(dj.fs);
+ }
+ }
+ }
+
+ LEAVE_FF(dj.fs, res);
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Rename File/Directory */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_rename (
+ const TCHAR *path_old, /* Pointer to the old name */
+ const TCHAR *path_new /* Pointer to the new name */
+)
+{
+ FRESULT res;
+ DIR djo, djn;
+ BYTE buf[21], *dir;
+ DWORD dw;
+ DEF_NAMEBUF;
+
+
+ res = chk_mounted(&path_old, &djo.fs, 1);
+ if (res == FR_OK) {
+ djn.fs = djo.fs;
+ INIT_BUF(djo);
+ res = follow_path(&djo, path_old); /* Check old object */
+ if (_FS_RPATH && res == FR_OK && (djo.fn[NS] & NS_DOT))
+ res = FR_INVALID_NAME;
+#if _FS_SHARE
+ if (res == FR_OK) res = chk_lock(&djo, 2);
+#endif
+ if (res == FR_OK) { /* Old object is found */
+ if (!djo.dir) { /* Is root dir? */
+ res = FR_NO_FILE;
+ } else {
+ mem_cpy(buf, djo.dir+DIR_Attr, 21); /* Save the object information except for name */
+ mem_cpy(&djn, &djo, sizeof(DIR)); /* Check new object */
+ res = follow_path(&djn, path_new);
+ if (res == FR_OK) res = FR_EXIST; /* The new object name is already existing */
+ if (res == FR_NO_FILE) { /* Is it a valid path and no name collision? */
+/* Start critical section that any interruption or error can cause cross-link */
+ res = dir_register(&djn); /* Register the new entry */
+ if (res == FR_OK) {
+ dir = djn.dir; /* Copy object information except for name */
+ mem_cpy(dir+13, buf+2, 19);
+ dir[DIR_Attr] = buf[0] | AM_ARC;
+ djo.fs->wflag = 1;
+ if (djo.sclust != djn.sclust && (dir[DIR_Attr] & AM_DIR)) { /* Update .. entry in the directory if needed */
+ dw = clust2sect(djn.fs, LD_CLUST(dir));
+ if (!dw) {
+ res = FR_INT_ERR;
+ } else {
+ res = move_window(djn.fs, dw);
+ dir = djn.fs->win+SZ_DIR; /* .. entry */
+ if (res == FR_OK && dir[1] == '.') {
+ dw = (djn.fs->fs_type == FS_FAT32 && djn.sclust == djn.fs->dirbase) ? 0 : djn.sclust;
+ ST_CLUST(dir, dw);
+ djn.fs->wflag = 1;
+ }
+ }
+ }
+ if (res == FR_OK) {
+ res = dir_remove(&djo); /* Remove old entry */
+ if (res == FR_OK)
+ res = sync(djo.fs);
+ }
+ }
+/* End critical section */
+ }
+ }
+ }
+ FREE_BUF();
+ }
+ LEAVE_FF(djo.fs, res);
+}
+
+#endif /* !_FS_READONLY */
+#endif /* _FS_MINIMIZE == 0 */
+#endif /* _FS_MINIMIZE <= 1 */
+#endif /* _FS_MINIMIZE <= 2 */
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Forward data to the stream directly (available on only tiny cfg) */
+/*-----------------------------------------------------------------------*/
+#if _USE_FORWARD && _FS_TINY
+
+FRESULT f_forward (
+ FIL *fp, /* Pointer to the file object */
+ UINT (*func)(const BYTE*,UINT), /* Pointer to the streaming function */
+ UINT btr, /* Number of bytes to forward */
+ UINT *bf /* Pointer to number of bytes forwarded */
+)
+{
+ FRESULT res;
+ DWORD remain, clst, sect;
+ UINT rcnt;
+ BYTE csect;
+
+
+ *bf = 0; /* Initialize byte counter */
+
+ res = validate(fp->fs, fp->id); /* Check validity of the object */
+ if (res != FR_OK) LEAVE_FF(fp->fs, res);
+ if (fp->flag & FA__ERROR) /* Check error flag */
+ LEAVE_FF(fp->fs, FR_INT_ERR);
+ if (!(fp->flag & FA_READ)) /* Check access mode */
+ LEAVE_FF(fp->fs, FR_DENIED);
+
+ remain = fp->fsize - fp->fptr;
+ if (btr > remain) btr = (UINT)remain; /* Truncate btr by remaining bytes */
+
+ for ( ; btr && (*func)(0, 0); /* Repeat until all data transferred or stream becomes busy */
+ fp->fptr += rcnt, *bf += rcnt, btr -= rcnt) {
+ csect = (BYTE)(fp->fptr / SS(fp->fs) & (fp->fs->csize - 1)); /* Sector offset in the cluster */
+ if ((fp->fptr % SS(fp->fs)) == 0) { /* On the sector boundary? */
+ if (!csect) { /* On the cluster boundary? */
+ clst = (fp->fptr == 0) ? /* On the top of the file? */
+ fp->sclust : get_fat(fp->fs, fp->clust);
+ if (clst <= 1) ABORT(fp->fs, FR_INT_ERR);
+ if (clst == 0xFFFFFFFF) ABORT(fp->fs, FR_DISK_ERR);
+ fp->clust = clst; /* Update current cluster */
+ }
+ }
+ sect = clust2sect(fp->fs, fp->clust); /* Get current data sector */
+ if (!sect) ABORT(fp->fs, FR_INT_ERR);
+ sect += csect;
+ if (move_window(fp->fs, sect)) /* Move sector window */
+ ABORT(fp->fs, FR_DISK_ERR);
+ fp->dsect = sect;
+ rcnt = SS(fp->fs) - (WORD)(fp->fptr % SS(fp->fs)); /* Forward data from sector window */
+ if (rcnt > btr) rcnt = btr;
+ rcnt = (*func)(&fp->fs->win[(WORD)fp->fptr % SS(fp->fs)], rcnt);
+ if (!rcnt) ABORT(fp->fs, FR_INT_ERR);
+ }
+
+ LEAVE_FF(fp->fs, FR_OK);
+}
+#endif /* _USE_FORWARD */
+
+
+
+#if _USE_MKFS && !_FS_READONLY
+/*-----------------------------------------------------------------------*/
+/* Create File System on the Drive */
+/*-----------------------------------------------------------------------*/
+#define N_ROOTDIR 512 /* Number of root dir entries for FAT12/16 */
+#define N_FATS 1 /* Number of FAT copies (1 or 2) */
+
+
+FRESULT f_mkfs (
+ BYTE drv, /* Logical drive number */
+ BYTE sfd, /* Partitioning rule 0:FDISK, 1:SFD */
+ UINT au /* Allocation unit size [bytes] */
+)
+{
+ static const WORD vst[] = { 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 0};
+ static const WORD cst[] = {32768, 16384, 8192, 4096, 2048, 16384, 8192, 4096, 2048, 1024, 512};
+ BYTE fmt, md, *tbl;
+ DWORD n_clst, vs, n, wsect;
+ UINT i;
+ DWORD b_vol, b_fat, b_dir, b_data; /* Offset (LBA) */
+ DWORD n_vol, n_rsv, n_fat, n_dir; /* Size */
+ FATFS *fs;
+ DSTATUS stat;
+
+
+ /* Check mounted drive and clear work area */
+ if (drv >= _VOLUMES) return FR_INVALID_DRIVE;
+ fs = FatFs[drv];
+ if (!fs) return FR_NOT_ENABLED;
+ fs->fs_type = 0;
+ drv = LD2PD(drv);
+
+ /* Get disk statics */
+ stat = disk_initialize(drv);
+ if (stat & STA_NOINIT) return FR_NOT_READY;
+ if (stat & STA_PROTECT) return FR_WRITE_PROTECTED;
+#if _MAX_SS != 512 /* Get disk sector size */
+ if (disk_ioctl(drv, GET_SECTOR_SIZE, &SS(fs)) != RES_OK)
+ return FR_DISK_ERR;
+#endif
+ if (disk_ioctl(drv, GET_SECTOR_COUNT, &n_vol) != RES_OK || n_vol < 128)
+ return FR_DISK_ERR;
+ b_vol = (sfd) ? 0 : 63; /* Volume start sector */
+ n_vol -= b_vol;
+ if (au & (au - 1)) au = 0; /* Check validity of the AU size */
+
+ if (!au) { /* AU auto selection */
+ vs = n_vol / (2000 / (SS(fs) / 512));
+ for (i = 0; vs < vst[i]; i++) ;
+ au = cst[i];
+ }
+ au /= SS(fs); /* Number of sectors per cluster */
+ if (au == 0) au = 1;
+ if (au > 128) au = 128;
+
+ /* Pre-compute number of clusters and FAT syb-type */
+ n_clst = n_vol / au;
+ fmt = FS_FAT12;
+ if (n_clst >= MIN_FAT16) fmt = FS_FAT16;
+ if (n_clst >= MIN_FAT32) fmt = FS_FAT32;
+
+ /* Determine offset and size of FAT structure */
+ if (fmt == FS_FAT32) {
+ n_fat = ((n_clst * 4) + 8 + SS(fs) - 1) / SS(fs);
+ n_rsv = 32;
+ n_dir = 0;
+ } else {
+ n_fat = (fmt == FS_FAT12) ? (n_clst * 3 + 1) / 2 + 3 : (n_clst * 2) + 4;
+ n_fat = (n_fat + SS(fs) - 1) / SS(fs);
+ n_rsv = 1;
+ n_dir = (DWORD)N_ROOTDIR * SZ_DIR / SS(fs);
+ }
+ b_fat = b_vol + n_rsv; /* FAT area start sector */
+ b_dir = b_fat + n_fat * N_FATS; /* Directory area start sector */
+ b_data = b_dir + n_dir; /* Data area start sector */
+ if (n_vol < b_data + au) return FR_MKFS_ABORTED; /* Too small volume */
+
+ /* Align data start sector to erase block boundary (for flash memory media) */
+ if (disk_ioctl(drv, GET_BLOCK_SIZE, &n) != RES_OK || !n || n > 32768) n = 1;
+ n = (b_data + n - 1) & ~(n - 1); /* Next nearest erase block from current data start */
+ n = (n - b_data) / N_FATS;
+ if (fmt == FS_FAT32) { /* FAT32: Move FAT offset */
+ n_rsv += n;
+ b_fat += n;
+ } else { /* FAT12/16: Expand FAT size */
+ n_fat += n;
+ }
+
+ /* Determine number of clusters and final check of validity of the FAT sub-type */
+ n_clst = (n_vol - n_rsv - n_fat * N_FATS - n_dir) / au;
+ if ( (fmt == FS_FAT16 && n_clst < MIN_FAT16)
+ || (fmt == FS_FAT32 && n_clst < MIN_FAT32))
+ return FR_MKFS_ABORTED;
+
+ /* Create partition table if required */
+ if (sfd) { /* No patition table (SFD) */
+ md = 0xF0;
+ } else { /* With patition table (FDISK) */
+ DWORD n_disk = b_vol + n_vol;
+
+ mem_set(fs->win, 0, SS(fs));
+ tbl = fs->win+MBR_Table;
+ ST_DWORD(tbl, 0x00010180); /* Partition start in CHS */
+ if (n_disk < 63UL * 255 * 1024) { /* Partition end in CHS */
+ n_disk = n_disk / 63 / 255;
+ tbl[7] = (BYTE)n_disk;
+ tbl[6] = (BYTE)((n_disk >> 2) | 63);
+ } else {
+ ST_WORD(&tbl[6], 0xFFFF); /* CHS saturated */
+ }
+ tbl[5] = 254;
+ if (fmt != FS_FAT32) /* System ID */
+ tbl[4] = (n_vol < 0x10000) ? 0x04 : 0x06;
+ else
+ tbl[4] = 0x0c;
+ ST_DWORD(tbl+8, 63); /* Partition start in LBA */
+ ST_DWORD(tbl+12, n_vol); /* Partition size in LBA */
+ ST_WORD(fs->win+BS_55AA, 0xAA55); /* MBR signature */
+ if (disk_write(drv, fs->win, 0, 1) != RES_OK) /* Put the MBR into first physical sector */
+ return FR_DISK_ERR;
+ md = 0xF8;
+ }
+
+ /* Create volume boot record */
+ tbl = fs->win; /* Clear sector */
+ mem_set(tbl, 0, SS(fs));
+ mem_cpy(tbl, "\xEB\xFE\x90" "MSDOS5.0", 11);/* Boot jump code, OEM name */
+ i = SS(fs); /* Sector size */
+ ST_WORD(tbl+BPB_BytsPerSec, i);
+ tbl[BPB_SecPerClus] = (BYTE)au; /* Sectors per cluster */
+ ST_WORD(tbl+BPB_RsvdSecCnt, n_rsv); /* Reserved sectors */
+ tbl[BPB_NumFATs] = N_FATS; /* Number of FATs */
+ i = (fmt == FS_FAT32) ? 0 : N_ROOTDIR; /* Number of rootdir entries */
+ ST_WORD(tbl+BPB_RootEntCnt, i);
+ if (n_vol < 0x10000) { /* Number of total sectors */
+ ST_WORD(tbl+BPB_TotSec16, n_vol);
+ } else {
+ ST_DWORD(tbl+BPB_TotSec32, n_vol);
+ }
+ tbl[BPB_Media] = md; /* Media descriptor */
+ ST_WORD(tbl+BPB_SecPerTrk, 63); /* Number of sectors per track */
+ ST_WORD(tbl+BPB_NumHeads, 255); /* Number of heads */
+ ST_DWORD(tbl+BPB_HiddSec, b_vol); /* Hidden sectors */
+ n = get_fattime(); /* Use current time as VSN */
+ if (fmt == FS_FAT32) {
+ ST_DWORD(tbl+BS_VolID32, n); /* VSN */
+ ST_DWORD(tbl+BPB_FATSz32, n_fat); /* Number of sectors per FAT */
+ ST_DWORD(tbl+BPB_RootClus, 2); /* Root directory start cluster (2) */
+ ST_WORD(tbl+BPB_FSInfo, 1); /* FSInfo record offset (VBR+1) */
+ ST_WORD(tbl+BPB_BkBootSec, 6); /* Backup boot record offset (VBR+6) */
+ tbl[BS_DrvNum32] = 0x80; /* Drive number */
+ tbl[BS_BootSig32] = 0x29; /* Extended boot signature */
+ mem_cpy(tbl+BS_VolLab32, "NO NAME " "FAT32 ", 19); /* Volume label, FAT signature */
+ } else {
+ ST_DWORD(tbl+BS_VolID, n); /* VSN */
+ ST_WORD(tbl+BPB_FATSz16, n_fat); /* Number of sectors per FAT */
+ tbl[BS_DrvNum] = 0x80; /* Drive number */
+ tbl[BS_BootSig] = 0x29; /* Extended boot signature */
+ mem_cpy(tbl+BS_VolLab, "NO NAME " "FAT ", 19); /* Volume label, FAT signature */
+ }
+ ST_WORD(tbl+BS_55AA, 0xAA55); /* Signature (Offset is fixed here regardless of sector size) */
+ if (disk_write(drv, tbl, b_vol, 1) != RES_OK) /* Write VBR */
+ return FR_DISK_ERR;
+ if (fmt == FS_FAT32) /* Write backup VBR if needed (VBR+6) */
+ disk_write(drv, tbl, b_vol + 6, 1);
+
+ /* Initialize FAT area */
+ wsect = b_fat;
+ for (i = 0; i < N_FATS; i++) { /* Initialize each FAT copy */
+ mem_set(tbl, 0, SS(fs)); /* 1st sector of the FAT */
+ n = md; /* Media descriptor byte */
+ if (fmt != FS_FAT32) {
+ n |= (fmt == FS_FAT12) ? 0x00FFFF00 : 0xFFFFFF00;
+ ST_DWORD(tbl+0, n); /* Reserve cluster #0-1 (FAT12/16) */
+ } else {
+ n |= 0xFFFFFF00;
+ ST_DWORD(tbl+0, n); /* Reserve cluster #0-1 (FAT32) */
+ ST_DWORD(tbl+4, 0xFFFFFFFF);
+ ST_DWORD(tbl+8, 0x0FFFFFFF); /* Reserve cluster #2 for root dir */
+ }
+ if (disk_write(drv, tbl, wsect++, 1) != RES_OK)
+ return FR_DISK_ERR;
+ mem_set(tbl, 0, SS(fs)); /* Fill following FAT entries with zero */
+ for (n = 1; n < n_fat; n++) { /* This loop may take a time on FAT32 volume due to many single sector writes */
+ if (disk_write(drv, tbl, wsect++, 1) != RES_OK)
+ return FR_DISK_ERR;
+ }
+ }
+
+ /* Initialize root directory */
+ i = (fmt == FS_FAT32) ? au : n_dir;
+ do {
+ if (disk_write(drv, tbl, wsect++, 1) != RES_OK)
+ return FR_DISK_ERR;
+ } while (--i);
+
+#if _USE_ERASE /* Erase data area if needed */
+ {
+ DWORD eb[2];
+
+ eb[0] = wsect; eb[1] = wsect + (n_clst - ((fmt == FS_FAT32) ? 1 : 0)) * au - 1;
+ disk_ioctl(drv, CTRL_ERASE_SECTOR, eb);
+ }
+#endif
+
+ /* Create FSInfo if needed */
+ if (fmt == FS_FAT32) {
+ ST_DWORD(tbl+FSI_LeadSig, 0x41615252);
+ ST_DWORD(tbl+FSI_StrucSig, 0x61417272);
+ ST_DWORD(tbl+FSI_Free_Count, n_clst - 1); /* Number of free clusters */
+ ST_DWORD(tbl+FSI_Nxt_Free, 2); /* Last allocated cluster# */
+ ST_WORD(tbl+BS_55AA, 0xAA55);
+ disk_write(drv, tbl, b_vol + 1, 1); /* Write original (VBR+1) */
+ disk_write(drv, tbl, b_vol + 7, 1); /* Write backup (VBR+7) */
+ }
+
+ return (disk_ioctl(drv, CTRL_SYNC, (void*)0) == RES_OK) ? FR_OK : FR_DISK_ERR;
+}
+
+#endif /* _USE_MKFS && !_FS_READONLY */
+
+
+
+
+#if _USE_STRFUNC
+/*-----------------------------------------------------------------------*/
+/* Get a string from the file */
+/*-----------------------------------------------------------------------*/
+TCHAR* f_gets (
+ TCHAR* buff, /* Pointer to the string buffer to read */
+ int len, /* Size of string buffer (characters) */
+ FIL* fil /* Pointer to the file object */
+)
+{
+ int n = 0;
+ TCHAR c, *p = buff;
+ BYTE s[2];
+ UINT rc;
+
+
+ while (n < len - 1) { /* Read bytes until buffer gets filled */
+ f_read(fil, s, 1, &rc);
+ if (rc != 1) break; /* Break on EOF or error */
+ c = s[0];
+#if _LFN_UNICODE /* Read a character in UTF-8 encoding */
+ if (c >= 0x80) {
+ if (c < 0xC0) continue; /* Skip stray trailer */
+ if (c < 0xE0) { /* Two-byte sequense */
+ f_read(fil, s, 1, &rc);
+ if (rc != 1) break;
+ c = ((c & 0x1F) << 6) | (s[0] & 0x3F);
+ if (c < 0x80) c = '?';
+ } else {
+ if (c < 0xF0) { /* Three-byte sequense */
+ f_read(fil, s, 2, &rc);
+ if (rc != 2) break;
+ c = (c << 12) | ((s[0] & 0x3F) << 6) | (s[1] & 0x3F);
+ if (c < 0x800) c = '?';
+ } else { /* Reject four-byte sequense */
+ c = '?';
+ }
+ }
+ }
+#endif
+#if _USE_STRFUNC >= 2
+ if (c == '\r') continue; /* Strip '\r' */
+#endif
+ *p++ = c;
+ n++;
+ if (c == '\n') break; /* Break on EOL */
+ }
+ *p = 0;
+ return n ? buff : 0; /* When no data read (eof or error), return with error. */
+}
+
+
+
+#if !_FS_READONLY
+#include <stdarg.h>
+/*-----------------------------------------------------------------------*/
+/* Put a character to the file */
+/*-----------------------------------------------------------------------*/
+int f_putc (
+ TCHAR c, /* A character to be output */
+ FIL* fil /* Pointer to the file object */
+)
+{
+ UINT bw, btw;
+ BYTE s[3];
+
+
+#if _USE_STRFUNC >= 2
+ if (c == '\n') f_putc ('\r', fil); /* LF -> CRLF conversion */
+#endif
+
+#if _LFN_UNICODE /* Write the character in UTF-8 encoding */
+ if (c < 0x80) { /* 7-bit */
+ s[0] = (BYTE)c;
+ btw = 1;
+ } else {
+ if (c < 0x800) { /* 11-bit */
+ s[0] = (BYTE)(0xC0 | (c >> 6));
+ s[1] = (BYTE)(0x80 | (c & 0x3F));
+ btw = 2;
+ } else { /* 16-bit */
+ s[0] = (BYTE)(0xE0 | (c >> 12));
+ s[1] = (BYTE)(0x80 | ((c >> 6) & 0x3F));
+ s[2] = (BYTE)(0x80 | (c & 0x3F));
+ btw = 3;
+ }
+ }
+#else /* Write the character without conversion */
+ s[0] = (BYTE)c;
+ btw = 1;
+#endif
+ f_write(fil, s, btw, &bw); /* Write the char to the file */
+ return (bw == btw) ? 1 : EOF; /* Return the result */
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Put a string to the file */
+/*-----------------------------------------------------------------------*/
+int f_puts (
+ const TCHAR* str, /* Pointer to the string to be output */
+ FIL* fil /* Pointer to the file object */
+)
+{
+ int n;
+
+
+ for (n = 0; *str; str++, n++) {
+ if (f_putc(*str, fil) == EOF) return EOF;
+ }
+ return n;
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Put a formatted string to the file */
+/*-----------------------------------------------------------------------*/
+int f_printf (
+ FIL* fil, /* Pointer to the file object */
+ const TCHAR* str, /* Pointer to the format string */
+ ... /* Optional arguments... */
+)
+{
+ va_list arp;
+ BYTE f, r;
+ UINT i, j, w;
+ ULONG v;
+ TCHAR c, d, s[16], *p;
+ int res, cc;
+
+
+ va_start(arp, str);
+
+ for (cc = res = 0; cc != EOF; res += cc) {
+ c = *str++;
+ if (c == 0) break; /* End of string */
+ if (c != '%') { /* Non escape character */
+ cc = f_putc(c, fil);
+ if (cc != EOF) cc = 1;
+ continue;
+ }
+ w = f = 0;
+ c = *str++;
+ if (c == '0') { /* Flag: '0' padding */
+ f = 1; c = *str++;
+ } else {
+ if (c == '-') { /* Flag: left justified */
+ f = 2; c = *str++;
+ }
+ }
+ while (IsDigit(c)) { /* Precision */
+ w = w * 10 + c - '0';
+ c = *str++;
+ }
+ if (c == 'l' || c == 'L') { /* Prefix: Size is long int */
+ f |= 4; c = *str++;
+ }
+ if (!c) break;
+ d = c;
+ if (IsLower(d)) d -= 0x20;
+ switch (d) { /* Type is... */
+ case 'S' : /* String */
+ p = va_arg(arp, TCHAR*);
+ for (j = 0; p[j]; j++) ;
+ res = 0;
+ while (!(f & 2) && j++ < w) res += (cc = f_putc(' ', fil));
+ res += (cc = f_puts(p, fil));
+ while (j++ < w) res += (cc = f_putc(' ', fil));
+ if (cc != EOF) cc = res;
+ continue;
+ case 'C' : /* Character */
+ cc = f_putc((TCHAR)va_arg(arp, int), fil); continue;
+ case 'B' : /* Binary */
+ r = 2; break;
+ case 'O' : /* Octal */
+ r = 8; break;
+ case 'D' : /* Signed decimal */
+ case 'U' : /* Unsigned decimal */
+ r = 10; break;
+ case 'X' : /* Hexdecimal */
+ r = 16; break;
+ default: /* Unknown type (passthrough) */
+ cc = f_putc(c, fil); continue;
+ }
+
+ /* Get an argument and put it in numeral */
+ v = (f & 4) ? va_arg(arp, long) : ((d == 'D') ? (long)va_arg(arp, int) : va_arg(arp, unsigned int));
+ if (d == 'D' && (v & 0x80000000)) {
+ v = 0 - v;
+ f |= 8;
+ }
+ i = 0;
+ do {
+ d = (TCHAR)(v % r); v /= r;
+ if (d > 9) d += (c == 'x') ? 0x27 : 0x07;
+ s[i++] = d + '0';
+ } while (v && i < sizeof(s) / sizeof(s[0]));
+ if (f & 8) s[i++] = '-';
+ j = i; d = (f & 1) ? '0' : ' ';
+ res = 0;
+ while (!(f & 2) && j++ < w) res += (cc = f_putc(d, fil));
+ do res += (cc = f_putc(s[--i], fil)); while(i);
+ while (j++ < w) res += (cc = f_putc(' ', fil));
+ if (cc != EOF) cc = res;
+ }
+
+ va_end(arp);
+ return (cc == EOF) ? cc : res;
+}
+
+#endif /* !_FS_READONLY */
+#endif /* _USE_STRFUNC */
diff --git a/MakefileBasedBuild/app/f_ff.h b/MakefileBasedBuild/app/f_ff.h
new file mode 100644
index 0000000..9578b3a
--- /dev/null
+++ b/MakefileBasedBuild/app/f_ff.h
@@ -0,0 +1,532 @@
+#ifdef ADK_INTERNAL
+/*---------------------------------------------------------------------------/
+/ FatFs - FAT file system module include file R0.08b (C)ChaN, 2011
+/----------------------------------------------------------------------------/
+/ FatFs module is a generic FAT file system module for small embedded systems.
+/ This is a free software that opened for education, research and commercial
+/ developments under license policy of following trems.
+/
+/ Copyright (C) 2011, ChaN, all right reserved.
+/
+/ * The FatFs module is a free software and there is NO WARRANTY.
+/ * No restriction on use. You can use, modify and redistribute it for
+/ personal, non-profit or commercial product UNDER YOUR RESPONSIBILITY.
+/ * Redistributions of source code must retain the above copyright notice.
+/
+/----------------------------------------------------------------------------*/
+
+#ifndef _FATFS
+#define _FATFS 8237 /* Revision ID */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "f_integer.h" /* Basic integer types */
+#include "f_ffconf.h" /* FatFs configuration options */
+
+#if _FATFS != _FFCONF
+#error Wrong configuration file (ffconf.h).
+#endif
+
+/* Moved DBCS code from ff.c, by ATMEL */
+/* DBCS code ranges and SBCS extend char conversion table */
+
+#if _CODE_PAGE == 932 /* Japanese Shift-JIS */
+#define _DF1S 0x81 /* DBC 1st byte range 1 start */
+#define _DF1E 0x9F /* DBC 1st byte range 1 end */
+#define _DF2S 0xE0 /* DBC 1st byte range 2 start */
+#define _DF2E 0xFC /* DBC 1st byte range 2 end */
+#define _DS1S 0x40 /* DBC 2nd byte range 1 start */
+#define _DS1E 0x7E /* DBC 2nd byte range 1 end */
+#define _DS2S 0x80 /* DBC 2nd byte range 2 start */
+#define _DS2E 0xFC /* DBC 2nd byte range 2 end */
+
+#elif _CODE_PAGE == 936 /* Simplified Chinese GBK */
+#define _DF1S 0x81
+#define _DF1E 0xFE
+#define _DS1S 0x40
+#define _DS1E 0x7E
+#define _DS2S 0x80
+#define _DS2E 0xFE
+
+#elif _CODE_PAGE == 949 /* Korean */
+#define _DF1S 0x81
+#define _DF1E 0xFE
+#define _DS1S 0x41
+#define _DS1E 0x5A
+#define _DS2S 0x61
+#define _DS2E 0x7A
+#define _DS3S 0x81
+#define _DS3E 0xFE
+
+#elif _CODE_PAGE == 950 /* Traditional Chinese Big5 */
+#define _DF1S 0x81
+#define _DF1E 0xFE
+#define _DS1S 0x40
+#define _DS1E 0x7E
+#define _DS2S 0xA1
+#define _DS2E 0xFE
+
+#elif _CODE_PAGE == 437 /* U.S. (OEM) */
+#define _DF1S 0
+#define _EXCVT {0x80,0x9A,0x90,0x41,0x8E,0x41,0x8F,0x80,0x45,0x45,0x45,0x49,0x49,0x49,0x8E,0x8F,0x90,0x92,0x92,0x4F,0x99,0x4F,0x55,0x55,0x59,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \
+ 0x41,0x49,0x4F,0x55,0xA5,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0x21,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB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B,0xFC,0xFD,0xFE,0xFF}
+
+#elif _CODE_PAGE == 737 /* Greek (OEM) */
+#define _DF1S 0
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x92,0x92,0x93,0x94,0x95,0x96,0x97,0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87, \
+ 0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0xAA,0x92,0x93,0x94,0x95,0x96,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \
+ 0x97,0xEA,0xEB,0xEC,0xE4,0xED,0xEE,0xE7,0xE8,0xF1,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF}
+
+#elif _CODE_PAGE == 775 /* Baltic (OEM) */
+#define _DF1S 0
+#define _EXCVT {0x80,0x9A,0x91,0xA0,0x8E,0x95,0x8F,0x80,0xAD,0xED,0x8A,0x8A,0xA1,0x8D,0x8E,0x8F,0x90,0x92,0x92,0xE2,0x99,0x95,0x96,0x97,0x97,0x99,0x9A,0x9D,0x9C,0x9D,0x9E,0x9F, \
+ 0xA0,0xA1,0xE0,0xA3,0xA3,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0x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9D,0x9E,0x9F,0xF0,0xF0,0xF2,0xF2,0xF4,0xF4,0xF6,0xF6,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF}
+
+#elif _CODE_PAGE == 874 /* Thai (OEM, Windows) */
+#define _DF1S 0
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \
+ 0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \
+ 0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF}
+
+#elif _CODE_PAGE == 1250 /* Central Europe (Windows) */
+#define _DF1S 0
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x8A,0x9B,0x8C,0x8D,0x8E,0x8F, \
+ 0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7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0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0x9F}
+
+#elif _CODE_PAGE == 1255 /* Hebrew (Windows) */
+#define _DF1S 0
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \
+ 0xA0,0x21,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \
+ 0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF}
+
+#elif _CODE_PAGE == 1256 /* Arabic (Windows) */
+#define _DF1S 0
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x8C,0x9D,0x9E,0x9F,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C2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF}
+
+#elif _CODE_PAGE == 1258 /* Vietnam (OEM, Windows) */
+#define _DF1S 0
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0xAC,0x9D,0x9E,0x9F, \
+ 0xA0,0x21,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xEC,0xCD,0xCE,0xCF,0xD0,0xD1,0xF2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xFE,0x9F}
+
+#elif _CODE_PAGE == 1 /* ASCII (for only non-LFN cfg) */
+#define _DF1S 0
+
+#else
+#error Unknown code page
+
+#endif
+
+
+
+/* Definitions of volume management */
+
+#if _MULTI_PARTITION /* Multiple partition configuration */
+#define LD2PD(vol) (VolToPart[vol].pd) /* Get physical drive# */
+#define LD2PT(vol) (VolToPart[vol].pt) /* Get partition# */
+typedef struct {
+ BYTE pd; /* Physical drive# */
+ BYTE pt; /* Partition # (0-3) */
+} PARTITION;
+extern const PARTITION VolToPart[]; /* Volume - Physical location resolution table */
+
+#else /* Single partition configuration */
+#define LD2PD(vol) (vol) /* Logical drive# is bound to the same physical drive# */
+#define LD2PT(vol) 0 /* Always mounts the 1st partition */
+
+#endif
+
+
+
+/* Type of path name strings on FatFs API */
+
+#if _LFN_UNICODE /* Unicode string */
+#if !_USE_LFN
+#error _LFN_UNICODE must be 0 in non-LFN cfg.
+#endif
+#ifndef _INC_TCHAR
+typedef WCHAR TCHAR;
+#define _T(x) L ## x
+#define _TEXT(x) L ## x
+#endif
+
+#else /* ANSI/OEM string */
+#ifndef _INC_TCHAR
+typedef char TCHAR;
+#define _T(x) x
+#define _TEXT(x) x
+#endif
+
+#endif
+
+
+
+/* File system object structure (FATFS) */
+
+typedef struct {
+ BYTE fs_type; /* FAT sub-type (0:Not mounted) */
+ BYTE drv; /* Physical drive number */
+ BYTE csize; /* Sectors per cluster (1,2,4...128) */
+ BYTE n_fats; /* Number of FAT copies (1,2) */
+ BYTE wflag; /* win[] dirty flag (1:must be written back) */
+ BYTE fsi_flag; /* fsinfo dirty flag (1:must be written back) */
+ WORD id; /* File system mount ID */
+ WORD n_rootdir; /* Number of root directory entries (FAT12/16) */
+#if _MAX_SS != 512
+ WORD ssize; /* Bytes per sector (512,1024,2048,4096) */
+#endif
+#if _FS_REENTRANT
+ _SYNC_t sobj; /* Identifier of sync object */
+#endif
+#if !_FS_READONLY
+ DWORD last_clust; /* Last allocated cluster */
+ DWORD free_clust; /* Number of free clusters */
+ DWORD fsi_sector; /* fsinfo sector (FAT32) */
+#endif
+#if _FS_RPATH
+ DWORD cdir; /* Current directory start cluster (0:root) */
+#endif
+ DWORD n_fatent; /* Number of FAT entries (= number of clusters + 2) */
+ DWORD fsize; /* Sectors per FAT */
+ DWORD fatbase; /* FAT start sector */
+ DWORD dirbase; /* Root directory start sector (FAT32:Cluster#) */
+ DWORD database; /* Data start sector */
+ DWORD winsect; /* Current sector appearing in the win[] */
+ BYTE win[_MAX_SS]; /* Disk access window for Directory, FAT (and Data on tiny cfg) */
+} FATFS;
+
+
+
+/* File object structure (FIL) */
+
+typedef struct {
+ FATFS* fs; /* Pointer to the owner file system object */
+ WORD id; /* Owner file system mount ID */
+ BYTE flag; /* File status flags */
+ BYTE pad1;
+ DWORD fptr; /* File read/write pointer (0 on file open) */
+ DWORD fsize; /* File size */
+ DWORD sclust; /* File start cluster (0 when fsize==0) */
+ DWORD clust; /* Current cluster */
+ DWORD dsect; /* Current data sector */
+#if !_FS_READONLY
+ DWORD dir_sect; /* Sector containing the directory entry */
+ BYTE* dir_ptr; /* Ponter to the directory entry in the window */
+#endif
+#if _USE_FASTSEEK
+ DWORD* cltbl; /* Pointer to the cluster link map table (null on file open) */
+#endif
+#if _FS_SHARE
+ UINT lockid; /* File lock ID (index of file semaphore table) */
+#endif
+#if !_FS_TINY
+ BYTE buf[_MAX_SS]; /* File data read/write buffer */
+#endif
+} FIL;
+
+
+
+/* Directory object structure (DIR) */
+
+typedef struct {
+ FATFS* fs; /* Pointer to the owner file system object */
+ WORD id; /* Owner file system mount ID */
+ WORD index; /* Current read/write index number */
+ DWORD sclust; /* Table start cluster (0:Root dir) */
+ DWORD clust; /* Current cluster */
+ DWORD sect; /* Current sector */
+ BYTE* dir; /* Pointer to the current SFN entry in the win[] */
+ BYTE* fn; /* Pointer to the SFN (in/out) {file[8],ext[3],status[1]} */
+#if _USE_LFN
+ WCHAR* lfn; /* Pointer to the LFN working buffer */
+ WORD lfn_idx; /* Last matched LFN index number (0xFFFF:No LFN) */
+#endif
+} DIR;
+
+
+
+/* File status structure (FILINFO) */
+
+typedef struct {
+ DWORD fsize; /* File size */
+ WORD fdate; /* Last modified date */
+ WORD ftime; /* Last modified time */
+ BYTE fattrib; /* Attribute */
+ TCHAR fname[13]; /* Short file name (8.3 format) */
+#if _USE_LFN
+ TCHAR* lfname; /* Pointer to the LFN buffer */
+ UINT lfsize; /* Size of LFN buffer in TCHAR */
+#endif
+} FILINFO;
+
+
+
+/* File function return code (FRESULT) */
+
+typedef enum {
+ FR_OK = 0, /* (0) Succeeded */
+ FR_DISK_ERR, /* (1) A hard error occured in the low level disk I/O layer */
+ FR_INT_ERR, /* (2) Assertion failed */
+ FR_NOT_READY, /* (3) The physical drive cannot work */
+ FR_NO_FILE, /* (4) Could not find the file */ //or dir listing is over
+ FR_NO_PATH, /* (5) Could not find the path */
+ FR_INVALID_NAME, /* (6) The path name format is invalid */
+ FR_DENIED, /* (7) Acces denied due to prohibited access or directory full */
+ FR_EXIST, /* (8) Acces denied due to prohibited access */
+ FR_INVALID_OBJECT, /* (9) The file/directory object is invalid */
+ FR_WRITE_PROTECTED, /* (10) The physical drive is write protected */
+ FR_INVALID_DRIVE, /* (11) The logical drive number is invalid */
+ FR_NOT_ENABLED, /* (12) The volume has no work area */
+ FR_NO_FILESYSTEM, /* (13) There is no valid FAT volume on the physical drive */
+ FR_MKFS_ABORTED, /* (14) The f_mkfs() aborted due to any parameter error */
+ FR_TIMEOUT, /* (15) Could not get a grant to access the volume within defined period */
+ FR_LOCKED, /* (16) The operation is rejected according to the file shareing policy */
+ FR_NOT_ENOUGH_CORE, /* (17) LFN working buffer could not be allocated */
+ FR_TOO_MANY_OPEN_FILES /* (18) Number of open files > _FS_SHARE */
+} FRESULT;
+
+
+
+/*--------------------------------------------------------------*/
+/* FatFs module application interface */
+
+FRESULT f_mount (BYTE, FATFS*); /* Mount/Unmount a logical drive */
+FRESULT f_open (FIL*, const TCHAR*, BYTE); /* Open or create a file */
+FRESULT f_read (FIL*, void*, UINT, UINT*); /* Read data from a file */
+FRESULT f_lseek (FIL*, DWORD); /* Move file pointer of a file object */
+FRESULT f_close (FIL*); /* Close an open file object */
+FRESULT f_opendir (DIR*, const TCHAR*); /* Open an existing directory */
+FRESULT f_readdir (DIR*, FILINFO*); /* Read a directory item */
+FRESULT f_stat (const TCHAR*, FILINFO*); /* Get file status */
+FRESULT f_write (FIL*, const void*, UINT, UINT*); /* Write data to a file */
+FRESULT f_getfree (const TCHAR*, DWORD*, FATFS**); /* Get number of free clusters on the drive */
+FRESULT f_truncate (FIL*); /* Truncate file */
+FRESULT f_sync (FIL*); /* Flush cached data of a writing file */
+FRESULT f_unlink (const TCHAR*); /* Delete an existing file or directory */
+FRESULT f_mkdir (const TCHAR*); /* Create a new directory */
+FRESULT f_chmod (const TCHAR*, BYTE, BYTE); /* Change attriburte of the file/dir */
+FRESULT f_utime (const TCHAR*, const FILINFO*); /* Change timestamp of the file/dir */
+FRESULT f_rename (const TCHAR*, const TCHAR*); /* Rename/Move a file or directory */
+FRESULT f_forward (FIL*, UINT(*)(const BYTE*,UINT), UINT, UINT*); /* Forward data to the stream */
+FRESULT f_mkfs (BYTE, BYTE, UINT); /* Create a file system on the drive */
+FRESULT f_chdrive (BYTE); /* Change current drive */
+FRESULT f_chdir (const TCHAR*); /* Change current directory */
+FRESULT f_getcwd (TCHAR*, UINT); /* Get current directory */
+int f_putc (TCHAR, FIL*); /* Put a character to the file */
+int f_puts (const TCHAR*, FIL*); /* Put a string to the file */
+int f_printf (FIL*, const TCHAR*, ...); /* Put a formatted string to the file */
+TCHAR* f_gets (TCHAR*, int, FIL*); /* Get a string from the file */
+
+#ifndef EOF
+#define EOF (-1)
+#endif
+
+#define f_eof(fp) (((fp)->fptr == (fp)->fsize) ? 1 : 0)
+#define f_error(fp) (((fp)->flag & FA__ERROR) ? 1 : 0)
+#define f_tell(fp) ((fp)->fptr)
+#define f_size(fp) ((fp)->fsize)
+
+
+
+
+/*--------------------------------------------------------------*/
+/* Additional user defined functions */
+
+/* RTC function */
+#if !_FS_READONLY
+DWORD get_fattime (void);
+#endif
+
+/* Unicode support functions */
+#if _USE_LFN /* Unicode - OEM code conversion */
+WCHAR ff_convert (WCHAR, UINT); /* OEM-Unicode bidirectional conversion */
+WCHAR ff_wtoupper (WCHAR); /* Unicode upper-case conversion */
+#if _USE_LFN == 3 /* Memory functions */
+void* ff_memalloc (UINT); /* Allocate memory block */
+void ff_memfree (void*); /* Free memory block */
+#endif
+#endif
+
+/* Sync functions */
+#if _FS_REENTRANT
+int ff_cre_syncobj (BYTE, _SYNC_t*);/* Create a sync object */
+int ff_req_grant (_SYNC_t); /* Lock sync object */
+void ff_rel_grant (_SYNC_t); /* Unlock sync object */
+int ff_del_syncobj (_SYNC_t); /* Delete a sync object */
+#endif
+
+
+
+
+/*--------------------------------------------------------------*/
+/* Flags and offset address */
+
+
+/* File access control and file status flags (FIL.flag) */
+
+#define FA_READ 0x01
+#define FA_OPEN_EXISTING 0x00
+#define FA__ERROR 0x80
+
+#if !_FS_READONLY
+#define FA_WRITE 0x02
+#define FA_CREATE_NEW 0x04
+#define FA_CREATE_ALWAYS 0x08
+#define FA_OPEN_ALWAYS 0x10
+#define FA__WRITTEN 0x20
+#define FA__DIRTY 0x40
+#endif
+
+
+/* FAT sub type (FATFS.fs_type) */
+
+#define FS_FAT12 1
+#define FS_FAT16 2
+#define FS_FAT32 3
+
+
+/* File attribute bits for directory entry */
+
+#define AM_RDO 0x01 /* Read only */
+#define AM_HID 0x02 /* Hidden */
+#define AM_SYS 0x04 /* System */
+#define AM_VOL 0x08 /* Volume label */
+#define AM_LFN 0x0F /* LFN entry */
+#define AM_DIR 0x10 /* Directory */
+#define AM_ARC 0x20 /* Archive */
+#define AM_MASK 0x3F /* Mask of defined bits */
+
+
+/* Fast seek function */
+#define CREATE_LINKMAP 0xFFFFFFFF
+
+
+
+/*--------------------------------*/
+/* Multi-byte word access macros */
+
+#if _WORD_ACCESS == 1 /* Enable word access to the FAT structure */
+#define LD_WORD(ptr) (WORD)(*(WORD*)(BYTE*)(ptr))
+#define LD_DWORD(ptr) (DWORD)(*(DWORD*)(BYTE*)(ptr))
+#define ST_WORD(ptr,val) *(WORD*)(BYTE*)(ptr)=(WORD)(val)
+#define ST_DWORD(ptr,val) *(DWORD*)(BYTE*)(ptr)=(DWORD)(val)
+#else /* Use byte-by-byte access to the FAT structure */
+#define LD_WORD(ptr) (WORD)(((WORD)*((BYTE*)(ptr)+1)<<8)|(WORD)*(BYTE*)(ptr))
+#define LD_DWORD(ptr) (DWORD)(((DWORD)*((BYTE*)(ptr)+3)<<24)|((DWORD)*((BYTE*)(ptr)+2)<<16)|((WORD)*((BYTE*)(ptr)+1)<<8)|*(BYTE*)(ptr))
+#define ST_WORD(ptr,val) *(BYTE*)(ptr)=(BYTE)(val); *((BYTE*)(ptr)+1)=(BYTE)((WORD)(val)>>8)
+#define ST_DWORD(ptr,val) *(BYTE*)(ptr)=(BYTE)(val); *((BYTE*)(ptr)+1)=(BYTE)((WORD)(val)>>8); *((BYTE*)(ptr)+2)=(BYTE)((DWORD)(val)>>16); *((BYTE*)(ptr)+3)=(BYTE)((DWORD)(val)>>24)
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _FATFS */
+#endif
+
diff --git a/MakefileBasedBuild/app/f_ffconf.h b/MakefileBasedBuild/app/f_ffconf.h
new file mode 100644
index 0000000..77f0024
--- /dev/null
+++ b/MakefileBasedBuild/app/f_ffconf.h
@@ -0,0 +1,193 @@
+#ifdef ADK_INTERNAL
+/*---------------------------------------------------------------------------/
+/ FatFs - FAT file system module configuration file R0.08b (C)ChaN, 2011
+/----------------------------------------------------------------------------/
+/
+/ CAUTION! Do not forget to make clean the project after any changes to
+/ the configuration options.
+/
+/----------------------------------------------------------------------------*/
+
+#ifndef _FFCONF
+#define _FFCONF 8237 /* Revision ID */
+
+
+/*---------------------------------------------------------------------------/
+/ Function and Buffer Configurations
+/----------------------------------------------------------------------------*/
+
+#define _FS_TINY 1 /* 0:Normal or 1:Tiny */
+/* When _FS_TINY is set to 1, FatFs uses the sector buffer in the file system
+/ object instead of the sector buffer in the individual file object for file
+/ data transfer. This reduces memory consumption 512 bytes each file object. */
+
+
+#define _FS_READONLY 0 /* 0:Read/Write or 1:Read only */
+/* Setting _FS_READONLY to 1 defines read only configuration. This removes
+/ writing functions, f_write, f_sync, f_unlink, f_mkdir, f_chmod, f_rename,
+/ f_truncate and useless f_getfree. */
+
+
+#define _FS_MINIMIZE 0 /* 0 to 3 */
+/* The _FS_MINIMIZE option defines minimization level to remove some functions.
+/
+/ 0: Full function.
+/ 1: f_stat, f_getfree, f_unlink, f_mkdir, f_chmod, f_truncate and f_rename
+/ are removed.
+/ 2: f_opendir and f_readdir are removed in addition to 1.
+/ 3: f_lseek is removed in addition to 2. */
+
+
+#define _USE_STRFUNC 0 /* 0:Disable or 1/2:Enable */
+/* To enable string functions, set _USE_STRFUNC to 1 or 2. */
+
+
+#define _USE_MKFS 0 /* 0:Disable or 1:Enable */
+/* To enable f_mkfs function, set _USE_MKFS to 1 and set _FS_READONLY to 0 */
+
+
+#define _USE_FORWARD 0 /* 0:Disable or 1:Enable */
+/* To enable f_forward function, set _USE_FORWARD to 1 and set _FS_TINY to 1. */
+
+
+#define _USE_FASTSEEK 0 /* 0:Disable or 1:Enable */
+/* To enable fast seek feature, set _USE_FASTSEEK to 1. */
+
+
+
+/*---------------------------------------------------------------------------/
+/ Locale and Namespace Configurations
+/----------------------------------------------------------------------------*/
+
+#define _CODE_PAGE 1
+/* The _CODE_PAGE specifies the OEM code page to be used on the target system.
+/ Incorrect setting of the code page can cause a file open failure.
+/
+/ 932 - Japanese Shift-JIS (DBCS, OEM, Windows)
+/ 936 - Simplified Chinese GBK (DBCS, OEM, Windows)
+/ 949 - Korean (DBCS, OEM, Windows)
+/ 950 - Traditional Chinese Big5 (DBCS, OEM, Windows)
+/ 1250 - Central Europe (Windows)
+/ 1251 - Cyrillic (Windows)
+/ 1252 - Latin 1 (Windows)
+/ 1253 - Greek (Windows)
+/ 1254 - Turkish (Windows)
+/ 1255 - Hebrew (Windows)
+/ 1256 - Arabic (Windows)
+/ 1257 - Baltic (Windows)
+/ 1258 - Vietnam (OEM, Windows)
+/ 437 - U.S. (OEM)
+/ 720 - Arabic (OEM)
+/ 737 - Greek (OEM)
+/ 775 - Baltic (OEM)
+/ 850 - Multilingual Latin 1 (OEM)
+/ 858 - Multilingual Latin 1 + Euro (OEM)
+/ 852 - Latin 2 (OEM)
+/ 855 - Cyrillic (OEM)
+/ 866 - Russian (OEM)
+/ 857 - Turkish (OEM)
+/ 862 - Hebrew (OEM)
+/ 874 - Thai (OEM, Windows)
+/ 1 - ASCII only (Valid for non LFN cfg.)
+*/
+
+
+#define _USE_LFN 1 /* 0 to 3 */
+#define _MAX_LFN 255 /* Maximum LFN length to handle (12 to 255) */
+/* The _USE_LFN option switches the LFN support.
+/
+/ 0: Disable LFN feature. _MAX_LFN and _LFN_UNICODE have no effect.
+/ 1: Enable LFN with static working buffer on the BSS. Always NOT reentrant.
+/ 2: Enable LFN with dynamic working buffer on the STACK.
+/ 3: Enable LFN with dynamic working buffer on the HEAP.
+/
+/ The LFN working buffer occupies (_MAX_LFN + 1) * 2 bytes. To enable LFN,
+/ Unicode handling functions ff_convert() and ff_wtoupper() must be added
+/ to the project. When enable to use heap, memory control functions
+/ ff_memalloc() and ff_memfree() must be added to the project. */
+
+
+#define _LFN_UNICODE 0 /* 0:ANSI/OEM or 1:Unicode */
+/* To switch the character code set on FatFs API to Unicode,
+/ enable LFN feature and set _LFN_UNICODE to 1. */
+
+
+#define _FS_RPATH 0 /* 0 to 2 */
+/* The _FS_RPATH option configures relative path feature.
+/
+/ 0: Disable relative path feature and remove related functions.
+/ 1: Enable relative path. f_chdrive() and f_chdir() are available.
+/ 2: f_getcwd() is available in addition to 1.
+/
+/ Note that output of the f_readdir fnction is affected by this option. */
+
+
+
+/*---------------------------------------------------------------------------/
+/ Physical Drive Configurations
+/----------------------------------------------------------------------------*/
+
+#define _VOLUMES 1
+/* Number of volumes (logical drives) to be used. */
+
+
+#define _MAX_SS 512 /* 512, 1024, 2048 or 4096 */
+/* Maximum sector size to be handled.
+/ Always set 512 for memory card and hard disk but a larger value may be
+/ required for on-board flash memory, floppy disk and optical disk.
+/ When _MAX_SS is larger than 512, it configures FatFs to variable sector size
+/ and GET_SECTOR_SIZE command must be implememted to the disk_ioctl function. */
+
+
+#define _MULTI_PARTITION 0 /* 0:Single partition or 1:Multiple partition */
+/* When set to 0, each volume is bound to the same physical drive number and
+/ it can mount only first primaly partition. When it is set to 1, each volume
+/ is tied to the partitions listed in VolToPart[]. */
+
+
+#define _USE_ERASE 0 /* 0:Disable or 1:Enable */
+/* To enable sector erase feature, set _USE_ERASE to 1. CTRL_ERASE_SECTOR command
+/ should be added to the disk_ioctl functio. */
+
+
+
+/*---------------------------------------------------------------------------/
+/ System Configurations
+/----------------------------------------------------------------------------*/
+
+#define _WORD_ACCESS 0 /* 0 or 1 */
+/* Set 0 first and it is always compatible with all platforms. The _WORD_ACCESS
+/ option defines which access method is used to the word data on the FAT volume.
+/
+/ 0: Byte-by-byte access.
+/ 1: Word access. Do not choose this unless following condition is met.
+/
+/ When the byte order on the memory is big-endian or address miss-aligned word
+/ access results incorrect behavior, the _WORD_ACCESS must be set to 0.
+/ If it is not the case, the value can also be set to 1 to improve the
+/ performance and code size. */
+
+
+/* A header file that defines sync object types on the O/S, such as
+/ windows.h, ucos_ii.h and semphr.h, must be included prior to ff.h. */
+
+#define _FS_REENTRANT 0 /* 0:Disable or 1:Enable */
+#define _FS_TIMEOUT 1000 /* Timeout period in unit of time ticks */
+#define _SYNC_t HANDLE /* O/S dependent type of sync object. e.g. HANDLE, OS_EVENT*, ID and etc.. */
+
+/* The _FS_REENTRANT option switches the reentrancy (thread safe) of the FatFs module.
+/
+/ 0: Disable reentrancy. _SYNC_t and _FS_TIMEOUT have no effect.
+/ 1: Enable reentrancy. Also user provided synchronization handlers,
+/ ff_req_grant, ff_rel_grant, ff_del_syncobj and ff_cre_syncobj
+/ function must be added to the project. */
+
+
+#define _FS_SHARE 0 /* 0:Disable or >=1:Enable */
+/* To enable file shareing feature, set _FS_SHARE to 1 or greater. The value
+ defines how many files can be opened simultaneously. */
+
+
+#endif /* _FFCONFIG */
+#endif
+
diff --git a/MakefileBasedBuild/app/f_integer.h b/MakefileBasedBuild/app/f_integer.h
new file mode 100644
index 0000000..3291ea1
--- /dev/null
+++ b/MakefileBasedBuild/app/f_integer.h
@@ -0,0 +1,40 @@
+#ifdef ADK_INTERNAL
+/*-------------------------------------------*/
+/* Integer type definitions for FatFs module */
+/*-------------------------------------------*/
+
+#ifndef _INTEGER
+#define _INTEGER
+
+#ifdef _WIN32 /* FatFs development platform */
+
+#include <windows.h>
+#include <tchar.h>
+
+#else /* Embedded platform */
+
+/* These types must be 16-bit, 32-bit or larger integer */
+typedef long INT;
+typedef unsigned long UINT;
+
+/* These types must be 8-bit integer */
+typedef char CHAR;
+typedef unsigned char UCHAR;
+typedef unsigned char BYTE;
+
+/* These types must be 16-bit integer */
+typedef short SHORT;
+typedef unsigned short USHORT;
+typedef unsigned short WORD;
+typedef unsigned short WCHAR;
+
+/* These types must be 32-bit integer */
+typedef long LONG;
+typedef unsigned long ULONG;
+typedef unsigned long DWORD;
+
+#endif
+
+#endif
+#endif
+
diff --git a/MakefileBasedBuild/app/f_sdDisk.c b/MakefileBasedBuild/app/f_sdDisk.c
new file mode 100644
index 0000000..e554131
--- /dev/null
+++ b/MakefileBasedBuild/app/f_sdDisk.c
@@ -0,0 +1,125 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#define ADK_INTERNAL
+#include "fwk.h"
+#include "dbg.h"
+#include "SD.h"
+#include "f_ff.h"
+#include "f_diskio.h"
+
+
+static SD sd;
+
+DWORD get_fattime (void){
+ return 0; //hehehehehehehe
+}
+
+WCHAR ff_convert (WCHAR c, UINT dir){
+
+ return c;
+}
+
+WCHAR ff_wtoupper (WCHAR c){
+
+ if(c >= 'a' && c<='z') c -= 'a' - 'A';
+ return c;
+}
+
+DSTATUS disk_initialize (BYTE drv){
+
+ if(drv) return STA_NODISK;
+
+ if(!sdInit(&sd)){
+
+ dbgPrintf("ADK: SD init failed\n");
+ return STA_NODISK;
+ }
+
+ dbgPrintf("disk size: %lu sectors\n", sdGetNumSec(&sd));
+
+ return 0;
+}
+
+DSTATUS disk_status (BYTE drv){
+
+ if(drv) return STA_NODISK;
+
+ return 0;
+}
+
+DRESULT disk_read (BYTE drv, BYTE *buff, DWORD sector, BYTE numSec){
+
+ if(drv) return STA_NODISK;
+
+
+ while(numSec--){
+ if(!sdSecRead(&sd, sector++, buff)) return RES_ERROR;
+ buff+=512;
+ }
+ return RES_OK;
+//this is more clever, but does not yet work
+
+ if(!sdReadStart(&sd, sector)) return RES_ERROR;
+ while(numSec){
+ buff = sdStreamSec(buff);
+ if(--numSec) sdNextSec(&sd);
+ }
+ sdSecReadStop(&sd);
+ return RES_OK;
+}
+
+DRESULT disk_write (BYTE drv, const BYTE *buff, DWORD sector, BYTE numSec){
+
+ if(drv) return STA_NODISK;
+
+ while(numSec--){
+ if(!sdSecWrite(&sd, sector++, buff)) return RES_ERROR;
+ buff+=512;
+ }
+ return RES_OK;
+}
+
+DRESULT disk_ioctl (BYTE drv, BYTE ctrl, void *buff){
+
+ DRESULT res;
+
+ if(drv) return STA_NODISK;
+
+ switch (ctrl){
+ case GET_BLOCK_SIZE:
+ *(DWORD*)buff = 1;
+ res = RES_OK;
+ break;
+
+ case GET_SECTOR_COUNT : /* Get number of sectors on the disk (DWORD) */
+ *(DWORD*)buff = sdGetNumSec(&sd);
+ res = RES_OK;
+ break;
+
+ case GET_SECTOR_SIZE : /* Get sectors on the disk (WORD) */
+ *(DWORD*)buff = 512;
+ res = RES_OK;
+ break;
+
+ case CTRL_SYNC : /* Make sure that data has been written */
+ res = RES_OK;
+ break;
+
+ default:
+ res = RES_PARERR;
+ }
+ return res;
+}
diff --git a/MakefileBasedBuild/app/fwk.c b/MakefileBasedBuild/app/fwk.c
new file mode 100644
index 0000000..299d392
--- /dev/null
+++ b/MakefileBasedBuild/app/fwk.c
@@ -0,0 +1,289 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#define ADK_INTERNAL
+#include "fwk.h"
+#include "dbg.h"
+
+
+
+
+
+
+typedef struct PeriodicNode{
+ struct PeriodicNode* next;
+ PeriodicFunc pF;
+ void* pD;
+ uint32_t count;
+ uint32_t reload;
+}PeriodicNode;
+
+
+
+volatile static uint64_t msec = 0;
+volatile static PeriodicNode* periodics = 0;
+
+static uint8_t volume = 255;
+
+#define JOINER(x,y,z) x ## y ## z
+#define CALLER(x,y,z) JOINER(x,y,z)
+#define TIMER_NAME CALLER(TC, TIMER_FOR_ADK, _IrqHandler)
+#define IRQ_NAME CALLER(TC, TIMER_FOR_ADK, _IRQn)
+
+void TIMER_NAME(){
+
+ uint32_t unused = TC0->TC_CHANNEL[TIMER_FOR_ADK].TC_SR;
+ PeriodicNode* n = periodics;
+
+ msec++;
+
+ while(n){
+
+ if(!--n->count){
+
+ n->pF(n->pD);
+ n->count = n->reload;
+ }
+ n = n->next;
+ }
+}
+
+uint64_t fwkGetUptime(void){
+
+ uint64_t t;
+
+ do{
+ t = msec;
+ }while(t != msec);
+
+ return t;
+}
+
+uint64_t fwkGetTicks(void){
+
+ uint64_t hi;
+ uint32_t lo;
+
+ do{
+ lo = TC0->TC_CHANNEL[TIMER_FOR_ADK].TC_CV;
+ hi = msec;
+ }while(lo > TC0->TC_CHANNEL[TIMER_FOR_ADK].TC_CV);
+
+ return (hi * TICKS_PER_MS) + lo;
+}
+
+void fwkDelay(uint64_t ticks){
+
+ uint64_t start = fwkGetTicks();
+
+ while(fwkGetTicks() - start < ticks);
+}
+
+void periodicAdd(PeriodicFunc f, void* data, uint32_t periodMs){
+
+ PeriodicNode* n = malloc(sizeof(PeriodicNode));
+ uint32_t failed = 0;
+
+ n->reload = n->count = periodMs;
+ n->pF = f;
+ n->pD = data;
+
+ do{
+ asm(
+ "ldrex r0, [%1] \n\t" //atomic linked list addition..booyah!
+ "str r0, [%2] \n\t"
+ "strex %0, %3, [%1] \n\t"
+ :"=r"(failed)
+ :"r"(&periodics), "r"(&n->next), "r"(n)
+ :"r0"
+ );
+ }while(failed);
+}
+
+void periodicDel(PeriodicFunc f){
+
+ uint32_t failed;
+
+ PeriodicNode* p = 0;
+ PeriodicNode* n = periodics;
+
+ while(n && n != f){
+
+ p = n;
+ n = n->next;
+ }
+ if(!n) return; //nothing to delete
+
+ if(p) p->next = n->next;
+ else periodics = n->next;
+ free(n);
+}
+
+static void __attribute__((naked)) cpuGetUniqIdFunc(uint32_t interfaceAddr, uint32_t cmd1, uint32_t cmd2, uint32_t* buf){
+
+ asm(
+ " cpsid i \n\t" // There is some pretty scary stuff that can happen
+ " mov r12, r2 \n\t" // if you reset the device while this code is in
+ " str r1, [r0, #4] \n\t" // the middle of doing its thing. Sometimes the
+ "lbl_wait_1: \n\t" // flash controller does not get reset to "code"
+ " ldr r1, [r0, #8] \n\t" // mode and stays in "read unique ID" mode, even
+ " lsrs r1, #1 \n\t" // when the chip itself is externally reset. This
+ " bcs lbl_wait_1 \n\t" // will cause the unique ID to be treated like the
+ " mov r2, #0x00080000 \n\t" // vector table. Needless to say: the chip unique
+ " ldr r1, [r2, #0] \n\t" // ID is not a suitable vector table. After reset,
+ " str r1, [r3, #0] \n\t" // this will likely cause the chip to take a hard
+ " ldr r1, [r2, #4] \n\t" // fault immediately. Worse yet, the hard fault
+ " str r1, [r3, #4] \n\t" // handler vector will also be invalid, causing
+ " ldr r1, [r2, #8] \n\t" // the chip to take yet another hard fault. This
+ " str r1, [r3, #8] \n\t" // will continue forever. The debug bridge, as it
+ " ldr r1, [r2, #12] \n\t" // currently is, cannot handle this chip state.
+ " str r1, [r3, #12] \n\t" // It will be unable to flash or debug the chip,
+ " str r12, [r0, #4] \n\t" // and you - the user - will be sad. The practical
+ "lbl_wait_2: \n\t" // upshot of all this: use this code rarely, and
+ " ldr r1, [r0, #8] \n\t" // if you interrupt it, power-cycle the system if
+ " lsrs r1, #1 \n\t" // you suspect that you somehow got into this
+ " bcc lbl_wait_2 \n\t" // weird state. It is possible that future revs
+ " cpsie i \n\t" // of SAM3X will fix this issue by properly
+ " bx lr \n\t" // resetting the flash controller at reset time.
+ );
+}
+
+void cpuGetUniqId(uint32_t* dst){ //produce the 128-bit unique ID
+
+ const unsigned numInstr = 23; //it better match the above function...
+ uint16_t buffer[numInstr];
+ uint16_t* src = (uint16_t*)(((uint32_t)&cpuGetUniqIdFunc) &~ 1);
+ unsigned i;
+
+ for(i = 0; i < numInstr; i++) buffer[i] = *src++;
+
+ ((void (*)(uint32_t,uint32_t,uint32_t,uint32_t*))(((uint32_t)buffer) + 1))(0x400E0A00, 0x5A00000E, 0x5A00000F, dst);
+}
+
+void fwkInit(void){
+
+ //disable WDT
+ WDT_Disable( WDT ) ;
+
+ //clock & periodic setup (MCLK/2, interrupt every ms)
+ PMC_EnablePeripheral(ID_TC0);
+ TC0->TC_CHANNEL[TIMER_FOR_ADK].TC_CMR = TC_CMR_TCCLKS_TIMER_CLOCK1 | TC_CMR_WAVSEL_UP_RC | TC_CMR_WAVE;
+ TC0->TC_CHANNEL[TIMER_FOR_ADK].TC_CV = 0;
+ TC0->TC_CHANNEL[TIMER_FOR_ADK].TC_RC = TICKS_PER_MS;
+ TC0->TC_CHANNEL[TIMER_FOR_ADK].TC_IER = TC_IER_CPCS;
+ TC0->TC_CHANNEL[TIMER_FOR_ADK].TC_CCR = TC_CCR_CLKEN | TC_CCR_SWTRG;
+ NVIC_EnableIRQ(IRQ_NAME);
+
+ //IO on
+ PMC_EnablePeripheral(ID_PIOC);
+ PMC_EnablePeripheral(ID_PIOB);
+ PMC_EnablePeripheral(ID_PIOA);
+
+ //dma setup
+ PMC_EnablePeripheral(ID_DMAC);
+ DMAC->DMAC_EBCIDR = 0x003F3F3F; //disable all interrupts
+ DMAC->DMAC_CHDR = 0x0000003F; //disable all channels
+ DMAC->DMAC_EN = 1;
+}
+
+#define PER 0
+#define PDR 1
+#define OER 4
+#define ODR 5
+#define SODR 12
+#define CODR 13
+#define PDSR 15
+#define PUDR 24
+#define PUER 25
+#define ABSR 28
+
+static inline volatile uint32_t* gpioGetPort(uint8_t pin){
+
+ uint32_t addr = pin >> 5;
+ addr <<= 9;
+ addr += 0x400E0E00;
+
+ return (volatile uint32_t*)addr;
+}
+
+static inline uint32_t gpioGetBit(uint8_t pin){
+
+ return 1UL << (pin & 31);
+}
+
+void gpioSetFun(uint8_t pin, uint8_t func){
+
+ volatile uint32_t* port = gpioGetPort(pin);
+ uint32_t bit = gpioGetBit(pin);
+
+ if(func == GPIO_FUNC_GPIO){
+
+ port[PER] = bit;
+ }
+ else{
+
+ port[PDR] = bit;
+ if(func == GPIO_FUNC_A) port[ABSR] &=~ bit;
+ else port[ABSR] |= bit;
+ }
+}
+
+void gpioSetDir(uint8_t pin, char in){
+
+ volatile uint32_t* port = gpioGetPort(pin);
+ uint32_t bit = gpioGetBit(pin);
+
+ if(in) port[ODR] = bit;
+ else port[OER] = bit;
+}
+
+void gpioSetVal(uint8_t pin, char on){
+
+ volatile uint32_t* port = gpioGetPort(pin);
+ uint32_t bit = gpioGetBit(pin);
+
+ if(on) port[SODR] = bit;
+ else port[CODR] = bit;
+}
+
+char gpioGetVal(uint8_t pin){
+
+ volatile uint32_t* port = gpioGetPort(pin);
+ uint32_t bit = gpioGetBit(pin);
+
+ return (port[PDSR] & bit) != 0;
+}
+
+void gpioSetPullup(uint8_t pin, char on){
+
+ volatile uint32_t* port = gpioGetPort(pin);
+ uint32_t bit = gpioGetBit(pin);
+
+ if(on) port[PUER] = bit;
+ else port[PUDR] = bit;
+}
+
+uint8_t getVolume(void){
+
+ return volume;
+}
+
+void setVolume(uint8_t vol){
+
+ volume = vol;
+}
+
+
+
diff --git a/MakefileBasedBuild/app/fwk.h b/MakefileBasedBuild/app/fwk.h
new file mode 100644
index 0000000..a421e72
--- /dev/null
+++ b/MakefileBasedBuild/app/fwk.h
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef BOARD_MCK
+# define BOARD_MCK 84000000ULL
+#endif
+
+
+#ifdef ADK_INTERNAL
+#ifndef _ADK_FWK_H_
+#define _ADK_FWK_H_
+
+#include <stdint.h>
+#include <stdlib.h>
+#include "chip.h"
+#include <stdio.h>
+#include <math.h>
+
+
+
+//common
+
+
+ #define TICKS_PER_MS ((BOARD_MCK) / 2000)
+ #define ADK_HEAP_SZ 65536
+
+ void fwkInit(void);
+ uint64_t fwkGetUptime(void);
+ uint64_t fwkGetTicks(void);
+ void fwkDelay(uint64_t ticks);
+
+ #define delay_s(s) fwkDelay(TICKS_PER_MS * 1000ULL * (unsigned long long)(ms))
+ #define delay_ms(ms) fwkDelay(TICKS_PER_MS * (unsigned long long)(ms))
+ #define delay_us(us) fwkDelay((TICKS_PER_MS * (unsigned long long)(ms)) / 1000ULL)
+
+ typedef void (*PeriodicFunc)(void* data);
+ void periodicAdd(PeriodicFunc f, void* data, uint32_t periodMs);
+ void periodicDel(PeriodicFunc f);
+
+ void cpuGetUniqId(uint32_t* dst); //produce the 128-bit unique ID
+
+ #define DMA_CHANNEL_LEDS 0 // Want a cleaner way of doing this? Get a better development environment!
+ #define TIMER_FOR_ADK 0 // only in timer unit 0, // Want a cleaner way of doing this? Get a better development environment!
+
+ uint8_t getVolume(void);
+ void setVolume(uint8_t);
+
+
+//GPIO stuffs
+
+ #define PORTA(x) (x)
+ #define PORTB(x) ((x) + 32)
+ #define PORTC(x) ((x) + 64)
+ #define PORTD(x) ((x) + 96)
+ #define PORTE(x) ((x) + 128)
+ #define PORTF(x) ((x) + 160)
+
+ #define GPIO_FUNC_GPIO 0
+ #define GPIO_FUNC_A 1
+ #define GPIO_FUNC_B 2
+
+ void gpioSetFun(uint8_t pin, uint8_t func);
+ void gpioSetDir(uint8_t pin, char in);
+ void gpioSetVal(uint8_t pin, char on);
+ char gpioGetVal(uint8_t pin);
+ void gpioSetPullup(uint8_t pin, char on);
+
+
+#endif
+#endif
+
+
diff --git a/MakefileBasedBuild/app/gamma.py b/MakefileBasedBuild/app/gamma.py
new file mode 100644
index 0000000..1b44fa3
--- /dev/null
+++ b/MakefileBasedBuild/app/gamma.py
@@ -0,0 +1,15 @@
+# Generates the precomputed gamma correction table
+
+import math
+
+gamma = 2.2
+scale = 4095
+
+print('#ifndef LEDGamma_h')
+print('#define LEDGamma_h')
+print('const uint16_t led_gamma[256] =')
+print('{')
+for i in range(256):
+ print( '\t' + str(int(round(scale * math.pow((float(i) / 255), gamma)))) + ',')
+print('};')
+print('#endif')
diff --git a/MakefileBasedBuild/app/hygro.c b/MakefileBasedBuild/app/hygro.c
new file mode 100644
index 0000000..5ceb014
--- /dev/null
+++ b/MakefileBasedBuild/app/hygro.c
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#define ADK_INTERNAL
+#include "fwk.h"
+#include "I2C.h"
+#include "hygro.h"
+#include "dbg.h"
+
+#define HYGRO_HOLD 1
+
+#define HYGRO_I2C_ADDR 0x40
+#define HYGRO_TRIG_TEMP_HOLD 0xE3
+#define HYGRO_TRIG_HUM_HOLD 0xE5
+#define HYGRO_TRIG_TEMP 0xF3
+#define HYGRO_TRIG_HUM 0xF5
+#define HYGRO_WRITE_USER 0xE6
+#define HYGRO_READ_USER 0xE7
+#define HYGRO_RESET 0xFE
+
+#define TEMP_SLOPE (175.72)
+#define TEMP_OFFSET (-46.85)
+#define HUM_SLOPE (125)
+#define HUM_OFFSET (-6)
+char hygroInit( void )
+{
+ if (I2C_ALL_OK != i2cSingleWrite(1, HYGRO_I2C_ADDR, HYGRO_WRITE_USER, 0x02)) // Write defaults to user register
+ return 0;
+ return 1;
+}
+
+char hygroRead( int32_t *temp, int32_t *humidity )
+{
+ uint8_t cmd, vals[2], ret;
+ uint16_t val;
+ int32_t stat, oldstat, tmp;
+#if HYGRO_HOLD
+ cmd = HYGRO_TRIG_TEMP_HOLD;
+ if (I2C_ALL_OK != i2cOp(1, HYGRO_I2C_ADDR, &cmd, 1, vals, 2))
+ return 0;
+#else
+ cmd = HYGRO_TRIG_TEMP;
+ if (I2C_ALL_OK != i2cOp(1, HYGRO_I2C_ADDR, &cmd, 1, NULL, 0))
+ return 0;
+ do {
+ stat = i2cOp(1, HYGRO_I2C_ADDR, NULL, 0, vals, 2);
+ } while (stat != I2C_ALL_OK);
+#endif
+
+ val = (vals[1] & 0xFC) | (((uint16_t)vals[0]) << 8);
+
+ *temp = (int)(TEMP_OFFSET * 8) + ((int)(TEMP_SLOPE * 8) * (int)val / 65536); // 8 fixed point
+
+#if HYGRO_HOLD
+ cmd = HYGRO_TRIG_HUM_HOLD;
+ if (I2C_ALL_OK != i2cOp(1, HYGRO_I2C_ADDR, &cmd, 1, vals, 2))
+ return 0;
+#else
+ cmd = HYGRO_TRIG_HUM;
+ if (I2C_ALL_OK != i2cOp(1, HYGRO_I2C_ADDR, &cmd, 1, NULL, 0))
+ return 0;
+ do {
+ stat = i2cOp(1, HYGRO_I2C_ADDR, NULL, 0, vals, 2);
+ } while (stat != I2C_ALL_OK);
+#endif
+
+ val = (vals[1] & 0xFC) | (((uint16_t)vals[0]) << 8);
+ *humidity = (int32_t)(HUM_OFFSET * 8) + ((int32_t)(HUM_SLOPE * 8) * (int32_t)val / 65536);
+ return 1;
+}
diff --git a/MakefileBasedBuild/app/hygro.h b/MakefileBasedBuild/app/hygro.h
new file mode 100644
index 0000000..cf1d01b
--- /dev/null
+++ b/MakefileBasedBuild/app/hygro.h
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifdef ADK_INTERNAL
+#ifndef _HYGRO_H_
+#define _HYGRO_H_
+
+
+char hygroInit( void );
+char hygroRead( int32_t *temp, int32_t *humidity );
+
+
+#endif
+#endif
+
diff --git a/MakefileBasedBuild/app/mag.c b/MakefileBasedBuild/app/mag.c
new file mode 100644
index 0000000..0f218e8
--- /dev/null
+++ b/MakefileBasedBuild/app/mag.c
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#define ADK_INTERNAL
+#include "fwk.h"
+#include "mag.h"
+#include "I2C.h"
+
+
+
+
+char magInit(void){ //1->success, 0->fail
+
+ if(i2cSingleRead(1, 0x1E, 0x0A) != 0x48) return 0; //not found
+ if(i2cSingleRead(1, 0x1E, 0x0B) != 0x34) return 0; //not found
+ if(i2cSingleRead(1, 0x1E, 0x0C) != 0x33) return 0; //not found
+
+ i2cSingleWrite(1, 0x1E, 0x00, 0x14); // No temp sensor
+ i2cSingleWrite(1, 0x1E, 0x01, 0x20); // Gain setting of 1.3 gauss
+ i2cSingleWrite(1, 0x1E, 0x02, 0x00); // Continuous conversion mode
+
+ return 1;
+}
+
+void magRead(int16_t* x, int16_t* y, int16_t* z) {
+
+ while(!(i2cSingleRead(1, 0x1E, 0x09) & 1)); //wait
+
+ if(x) *x = (int16_t)(((uint16_t)i2cSingleRead(1, 0x1E, 0x03) << 8) | (uint16_t)i2cSingleRead(1, 0x1E, 0x04));
+ if(y) *y = (int16_t)(((uint16_t)i2cSingleRead(1, 0x1E, 0x05) << 8) | (uint16_t)i2cSingleRead(1, 0x1E, 0x06));
+ if(z) *z = (int16_t)(((uint16_t)i2cSingleRead(1, 0x1E, 0x07) << 8) | (uint16_t)i2cSingleRead(1, 0x1E, 0x08));
+}
diff --git a/MakefileBasedBuild/app/mag.h b/MakefileBasedBuild/app/mag.h
new file mode 100644
index 0000000..12f0d87
--- /dev/null
+++ b/MakefileBasedBuild/app/mag.h
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifdef ADK_INTERNAL
+#ifndef _MAG_H_
+#define _MAG_H_
+
+char magInit(void);
+void magRead(int16_t* x, int16_t* y, int16_t* z);
+
+#endif
+#endif
+
diff --git a/MakefileBasedBuild/app/main.c b/MakefileBasedBuild/app/main.c
new file mode 100644
index 0000000..e4ca851
--- /dev/null
+++ b/MakefileBasedBuild/app/main.c
@@ -0,0 +1,1614 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "ADK.h"
+#include "HCI.h"
+#include "fwk.h"
+#include <string.h>
+#include <include/uart_console.h>
+void dbgPrintf(const char*, ...); //useful
+
+
+//android app needs to match this
+#define BT_ADK_UUID 0x1d, 0xd3, 0x50, 0x50, 0xa4, 0x37, 0x11, 0xe1, 0xb3, 0xdd, 0x08, 0x00, 0x20, 0x0c, 0x9a, 0x66
+
+
+
+enum AdkStates{
+ AdkClock,
+ AdkAlarm,
+ AdkBrightness,
+ AdkColor,
+ AdkVolume,
+ AdkDisplay,
+ AdkPresets,
+
+ //always last
+ AdkInvalid
+};
+
+enum AdkDisplayMode{
+
+ AdkShowAnimation,
+ AdkShowAccel,
+ AdkShowMag,
+ AdkShowTemp,
+ AdkShowHygro,
+ AdkShowBaro,
+ AdkShowProx,
+ AdkShowColor,
+
+ AdkShowLast //always last
+};
+
+enum AdkAlarmStates {
+ AdkAlarmIdle,
+ AdkAlarmIdleWait,
+ AdkAlarmAlarm,
+ AdkAlarmSnooze
+};
+/*
+
+ button numbering (all in hex)
+
+ __ __ __ __ __ __
+ |1A| |18| |16| |14| |12| |11| 03 04 05 06
+ -- -- -- -- -- -- 0A 09 08 07
+ |1B| |19| |17| |15| |13| |10|
+ -- -- -- -- -- --
+
+*/
+
+#define BTN_SLIDER_0 0x00
+#define BTN_SLIDER_1 0x01
+#define BTN_SLIDER_2 0x02
+#define BTN_0_UP 0x1A
+#define BTN_1_UP 0x18
+#define BTN_2_UP 0x16
+#define BTN_3_UP 0x14
+#define BTN_4_UP 0x12
+#define BTN_5_UP 0x11
+#define BTN_0_DN 0x1B
+#define BTN_1_DN 0x19
+#define BTN_2_DN 0x17
+#define BTN_3_DN 0x15
+#define BTN_4_DN 0x13
+#define BTN_5_DN 0x10
+#define BTN_CLOCK 0x03
+#define BTN_ALARM 0x04
+#define BTN_BRIGHTNESS 0x05
+#define BTN_COLOR 0x06
+#define BTN_LOCK 0x07
+#define BTN_PRESETS 0x08
+#define BTN_DISPLAY 0x09
+#define BTN_VOLUME 0x0A
+
+
+
+#define BTN_MASK_PRESS 0x8000
+#define BTN_MASK_HOLD 0x4000
+#define BTN_MASK_RELEASE 0x2000
+#define BTN_MASK_ID 0x003F
+
+#define BTN_INITIAL_DELAY 10 //10ms before a click registers
+#define BTN_HOLD_DELAY 400 //400mas before a click becomes a hold
+#define BTN_AUTOREPEAT 100 //auto-repeat every 100ms
+
+
+
+#define SETTINGS_NAME "/AdkSettings.bin"
+#define SETTINGS_MAGIX 0xAF
+typedef struct AdkSettings{
+
+ uint8_t magix;
+ uint8_t ver;
+
+//v1 settings:
+
+ uint8_t R, G, B, bri, vol, almH, almM, almOn;
+ char btName[249]; //null terminated
+ char btPIN[17]; //null terminated
+
+ uint16_t almSnooze;
+ char almTune[256]; // null terminated
+
+ uint8_t speed, displayMode;
+
+//later settings
+
+}AdkSettings;
+
+
+
+AdkSettings settings;
+const char* btPIN = 0;
+
+
+volatile static int32_t hTemp, hHum, bPress, bTemp;
+volatile static uint16_t prox[7]; //prox, clear, IR ,R, G, B, temp pProx, pClear, pR, pG, pB, pIR, pTemp;
+volatile static uint16_t proxNormalized[3];
+volatile static int16_t accel[3], mag[3];
+volatile static uint32_t btSSP = ADK_BT_SSP_DONE_VAL;
+volatile static char locked = 0;
+
+
+static void btStart(void);
+static void processUSBAccessory(void);
+
+static uint16_t btnProcess(void){
+
+ static uint64_t lastActionTime[32] = {0, };
+ static uint32_t clickSent = 0;
+ static uint32_t holdSent = 0;
+ static uint32_t lastStates = 0;
+ uint32_t curState, t, i, mask;
+
+ curState = (((uint32_t)ADK_capSenseButtons()) << 16) | ADK_capSenseIcons();
+ t = lastStates ^ curState;
+ lastStates = curState;
+
+ //update states for all buttons
+ for(mask = 1, i = 0; i < 32; i++, mask <<= 1) if(t & mask){
+
+ lastActionTime[i] = ADK_getUptime();
+ }
+
+ //generate events
+ for(mask = 1, i = 0; i < 32; i++, mask <<= 1){
+ if(curState & mask){
+
+ uint64_t time = ADK_getUptime();
+ uint64_t lapsed = time - lastActionTime[i];
+
+ if(holdSent & mask){ //maybe resend hold
+
+ if(lapsed > BTN_AUTOREPEAT){
+
+ lastActionTime[i] = time;
+ return i | BTN_MASK_HOLD;
+ }
+ }
+ else if(clickSent & mask){ //maybe time for first hold
+
+ if(lapsed > BTN_HOLD_DELAY){
+
+ holdSent |= mask;
+ lastActionTime[i] = time;
+ return i | BTN_MASK_HOLD;
+ }
+ }
+ else{ //maybe time to click
+
+ if(lapsed > BTN_INITIAL_DELAY){
+
+ clickSent |= mask;
+ lastActionTime[i] = time;
+ return i | BTN_MASK_PRESS;
+ }
+ }
+ }
+ else if(clickSent & mask){ //release
+
+ clickSent &=~ mask;
+ holdSent &=~ mask;
+ return i | BTN_MASK_RELEASE;
+ }
+ }
+ return 0;
+}
+
+static void readSettings(void){
+
+ uint32_t read;
+ FatFileP f;
+ char r;
+ AdkSettings ts;
+
+ //apply defaults
+ strcpy(settings.btName, "ADK 2012");
+ strcpy(settings.btPIN, "1337");
+ settings.magix = SETTINGS_MAGIX;
+ settings.ver = 1;
+ settings.R = 0;
+ settings.G = 0;
+ settings.B = 255;
+ settings.bri = 255;
+ settings.vol = 255;
+ settings.almH = 6;
+ settings.almM = 0;
+ settings.almOn = 0;
+ settings.speed = 1;
+ settings.displayMode = AdkShowAnimation;
+ settings.almSnooze = 10 * 60; //10-minute alarm
+ strcpy(settings.almTune, "/Tunes/Alarm_Rooster_02.ogg");
+
+ r = ADK_fatfsOpen(&f, SETTINGS_NAME, FATFS_READ);
+ if(!r){
+
+ r = ADK_fatfsRead(f, &ts, sizeof(AdkSettings), &read);
+
+ if(r || read != sizeof(AdkSettings) || settings.magix != SETTINGS_MAGIX || settings.ver != 1){
+
+ //in future, check for other versions and read as needed here...
+ dbgPrintf("ADK: settings: file read failed: %d, %u/%u, 0x%x\n", r, read, sizeof(AdkSettings), settings.magix);
+ }
+ else settings = ts;
+ ADK_fatfsClose(f);
+ }
+ else dbgPrintf("ADK: settings: file open failed: %d\n", r);
+}
+
+static void writeSettings(void){
+
+ FatFileP f;
+ char r;
+
+ ADK_fatfsUnlink(SETTINGS_NAME);
+ r = ADK_fatfsOpen(&f, SETTINGS_NAME, FATFS_WRITE | FATFS_CREATE | FATFS_TRUNCATE);
+ if(!r){
+ uint32_t written = 0;
+
+ r = ADK_fatfsWrite(f, &settings, sizeof(AdkSettings), &written);
+
+ if(r || written != sizeof(AdkSettings)) dbgPrintf("ADK: settings: file write failed: %d, %u/%u\n", r, written, sizeof(AdkSettings));
+ ADK_fatfsClose(f);
+ }
+ else dbgPrintf("ADK: settings: file open failed: %d\n", r);
+}
+
+static void setup(void)
+{
+
+ UART_Configure(115200, BOARD_MCK);
+
+ ADK_adkSetPutchar((adkPutcharF)UART_PutChar);
+ ADK_adkInit();
+ btStart();
+
+ if(ADK_fatfsMount()) dbgPrintf("ADK: failed to mount SD card\n");
+ ADK_usbStart();
+}
+
+static uint8_t rnd(void){
+
+ static uint64_t seed = 7454131806685196871ULL;
+
+ seed *= 2340027325706224672ULL;
+ seed += 7310016643071172983ULL;
+ seed %= 9876543210987654321ULL;
+ seed ^= seed << 3;
+ seed += ADK_getUptime();
+
+ return seed >> 53;
+}
+
+static void gethue(uint8_t h, uint8_t* Rp, uint8_t* Gp, uint8_t* Bp){
+ uint8_t R, G, B, seg, prog;
+
+ if(h == 255) h = 254;
+ seg = (unsigned)h / 85;
+ prog = (((uint32_t)((unsigned)h % 85)) << 8) / 85;
+
+ switch(seg){
+ case 0: R = prog; G = 0; B = 255 - prog; break;
+ case 1: R = 255 - prog; G = prog; B = 0; break;
+ case 2: R = 0; G = 255 - prog; B = prog; break;
+ }
+
+ *Rp = R;
+ *Gp = G;
+ *Bp = B;
+}
+
+static void screenClear(void){
+ uint32_t i;
+
+ for(i = 0; i < NUM_LEDS; i++) ADK_ledWrite(i, 0, 0, 0); //clear screen if leaving display mode
+}
+
+static void adkBtSspF(const uint8_t* mac, uint32_t val){
+
+ btSSP = val;
+ dbgPrintf("ssp with val %u\n", val);
+}
+
+static void loop(void)
+{
+ uint8_t r, g, b, dimR, dimG, dimB;
+ uint8_t colorSlider, volSlider, briSlider, speedSlider;
+ static const uint8_t dimIconFactor = 6;
+ uint8_t state = AdkInvalid;
+ uint8_t newState = AdkClock;
+ uint8_t alarmState = AdkAlarmIdle;
+ uint32_t i, j, k;
+ uint8_t loopCounter = 0;
+ uint64_t nextTime = 0; //for animation
+ unsigned int snoozeStart;
+ char alarmEnded = 1;
+ char alarmStop, alarmFake = 0;
+ int32_t alarmDirPos = -1;
+ FatDirP dir = 0;
+ char wasBt = 0;
+ static const uint8_t btSeq[] = {6,5,8,12,11};
+
+ readSettings();
+
+ if(0){ //very helpful to some of us - set alarm song to the first song we find :)
+ FatDirP dirT;
+ if(!ADK_fatfsOpenDir(&dirT, "/Tunes")){
+
+ FatFileInfo fi;
+ fi.longName = settings.almTune + 7;
+ fi.nameSz = 100;
+
+ strcpy(settings.almTune, "/Tunes/");
+
+ if(!ADK_fatfsReadDir(dirT, &fi)){
+
+ dbgPrintf("tune: '%s'\n", settings.almTune);
+ } else dbgPrintf("file find fail\n");
+ } else dbgPrintf("dir open fail\n");
+ }
+
+
+ btPIN = settings.btPIN;
+ ADK_setVolume(settings.vol);
+ dbgPrintf("ADK: setting BT name '%s' and pin '%s'\n", settings.btName, settings.btPIN);
+ if(!ADK_btSetDeviceClass(DEVICE_CLASS_SERVICE_AUDIO | DEVICE_CLASS_SERVICE_RENDERING |
+ DEVICE_CLASS_SERVICE_INFORMATION | (DEVICE_CLASS_MAJOR_AV << DEVICE_CLASS_MAJOR_SHIFT) |
+ (DEVICE_CLASS_MINOR_AV_PORTBL_AUDIO << DEVICE_CLASS_MINOR_AV_SHIFT))) dbgPrintf("ADK: Failed to set device class\n");
+ if(!ADK_btSetLocalName(settings.btName)) dbgPrintf("ADK: failed to set BT name\n");
+ if(!ADK_btDiscoverable(1)) dbgPrintf("ADK: Failed to set discoverable\n");
+ if(!ADK_btConnectable(1)) dbgPrintf("ADK: Failed to set connectable\n");
+ ADK_btSetSspCallback(adkBtSspF);
+
+ while(1){
+
+ loopCounter++;
+
+ uint16_t button = btnProcess();
+
+ if(locked == 2){
+ if(button == (BTN_MASK_HOLD | BTN_LOCK)) locked = 0;
+ else button = 0;
+ }
+ else if(button == (BTN_MASK_PRESS | BTN_LOCK) && locked == 0) locked = 1;
+ else if(button == (BTN_MASK_RELEASE | BTN_LOCK) && locked == 1) locked = 2;
+
+ ADK_adkEventProcess(); //let the adk framework do its thing
+
+ r = (((uint32_t)settings.R) * (settings.bri + 1)) >> 8;
+ g = (((uint32_t)settings.G) * (settings.bri + 1)) >> 8;
+ b = (((uint32_t)settings.B) * (settings.bri + 1)) >> 8;
+
+ dimR = (r + dimIconFactor - 1) / dimIconFactor;
+ dimG = (g + dimIconFactor - 1) / dimIconFactor;
+ dimB = (b + dimIconFactor - 1) / dimIconFactor;
+
+ if(newState != AdkInvalid){
+ state = newState;
+ newState = AdkInvalid;
+ for(i = 0; i < 8; i++) ADK_ledDrawIcon(i, dimR, dimG, dimB);
+ ADK_ledDrawIcon(state, r, g, b);
+ }
+ ADK_ledDrawIcon(7, locked ? r : dimR, locked ? g : dimG, locked ? b : dimB);
+
+ if(!(loopCounter & 127)) if(!ADK_hygroRead((int32_t *)&hTemp, (int32_t *)&hHum)) hTemp = hHum = 0;
+ if(!(loopCounter & 7)){
+ uint16_t proxMax;
+
+ ADK_baroRead(3, (long *)&bPress, (long *)&bTemp);
+ ADK_alsRead((uint16_t *)prox + 0, (uint16_t *)prox + 1, (uint16_t *)prox + 3, (uint16_t *)prox + 4, (uint16_t *)prox + 5, (uint16_t *)prox + 2, (uint16_t *)prox + 6);
+ ADK_accelRead((int16_t *)accel + 0, (int16_t *)accel + 1, (int16_t *)accel + 2);
+ ADK_magRead((int16_t *)mag + 0, (int16_t *)mag + 1, (int16_t *)mag + 2);
+ for(i = 0; i < 3; i++) mag[i] <<= 4; //convert to 16-bit value
+
+ //copy
+ for(i = 0; i < 3; i++) proxNormalized[i] = prox[i + 3];
+ proxNormalized[2] *= 3; //blue needs more sensitivity
+
+ //find max
+ proxMax = 0;
+ for(i = 0; i < 3; i++) if(proxMax < proxNormalized[i]) proxMax = proxNormalized[i];
+ proxMax++;
+
+ //normalize to 8-bits
+ for(i = 0; i < 3; i++) proxNormalized[i] = (proxNormalized[i] << 8) / proxMax;
+
+ //exponentize (as per human eyes)
+ static const uint16_t exp[] =
+ {
+ 0,19,39,59,79,100,121,143,165,187,209,232,255,279,303,327,352,377,402,428,454,481,508,536,564,592,621,650,680,710,741,772,804, 836,869,902,
+ 936,970,1005,1040,1076,1113,1150,1187,1226,1264,1304,1344,1385,1426,1468,1511,1554,1598,1643,1688,1734,1781,1829,1877,1926,1976,2026,2078,
+ 2130,2183,2237,2292,2348,2404,2461,2520,2579,2639,2700,2762,2825,2889,2954,3020,3088,3156,3225,3295,3367,3439,3513,3588,3664,3741,3819,3899,
+ 3980,4062,4146,4231,4317,4404,4493,4583,4675,4768,4863,4959,5057,5156,5257,5359,5463,5568,5676,5785,5895,6008,6122,6238,6355,6475,6597,
+ 6720,6845,6973,7102,7233,7367,7502,7640,7780,7922,8066,8213,8362,8513,8666,8822,8981,9142,9305,9471,9640,9811,9986,10162,10342,10524,10710,
+ 10898,11089,11283,11480,11681,11884,12091,12301,12514,12731,12951,13174,13401,13632,13866,14104,14345,14591,14840,15093,15351,15612,15877,16147,
+ 16421,16699,16981,17268,17560,17856,18156,18462,18772,19087,19407,19733,20063,20398,20739,21085,21437,21794,22157,22525,22899,23279,23666,
+ 24058,24456,24861,25272,25689,26113,26544,26982,27426,27878,28336,28802,29275,29756,30244,30740,31243,31755,32274,32802,33338,33883,34436,
+ 34998,35568,36148,36737,37335,37942,38559,39186,39823,40469,41126,41793,42471,43159,43859,44569,45290,46023,46767,47523,48291,49071,49863,
+ 50668,51486,52316,53159,54016,54886,55770,56668,57580,58506,59447,60403,61373,62359,63361,64378,65412
+ };
+
+ for(i = 0; i < 3; i++) proxNormalized[i] = exp[proxNormalized[i]];
+ }
+
+ if(wasBt && btSSP == ADK_BT_SSP_DONE_VAL){ //clear leftover segments
+
+ ADK_ledWrite(btSeq[wasBt - 1], 0, 0, 0);
+ wasBt = 0;
+ }
+ else if(btSSP != ADK_BT_SSP_DONE_VAL){
+
+ k = btSSP;
+ for(i = 0, j = 100000; i < 6; i++, j /= 10){
+
+ ADK_ledDrawLetter(i, k / j + '0', 0, 0, settings.bri);
+ k %= j;
+ }
+
+ ADK_ledWrite(9, 0, 0, 0);
+ ADK_ledWrite(2, 0, 0, 0);
+
+ if(wasBt) ADK_ledWrite(btSeq[wasBt - 1], 0, 0, 0);
+ k = (ADK_getUptime() >> 7) % sizeof(btSeq);
+ wasBt = k + 1;
+ ADK_ledWrite(btSeq[k], 0, 0, settings.bri);
+
+ button = 0;
+ }
+ else switch(state){
+
+ case AdkClock:{
+
+ uint16_t year;
+ uint8_t month, day, h, m, s, timechange = 1;
+
+ //get and draw time
+ ADK_rtcGet(&year, &month, &day, &h, &m, &s);
+ ADK_ledDrawLetter(0, h / 10 + '0', r, g, b);
+ ADK_ledDrawLetter(1, h % 10 + '0', r, g, b);
+ ADK_ledDrawLetter(2, m / 10 + '0', r, g, b);
+ ADK_ledDrawLetter(3, m % 10 + '0', r, g, b);
+ ADK_ledDrawLetter(4, s / 10 + '0', r, g, b);
+ ADK_ledDrawLetter(5, s % 10 + '0', r, g, b);
+ ADK_ledWrite(9, r, g, b);
+ ADK_ledWrite(2, r, g, b);
+
+ //handle buttons
+ if(button & (BTN_MASK_PRESS | BTN_MASK_HOLD)) switch(button & BTN_MASK_ID){
+
+ case BTN_5_DN:
+ if(s) s--;
+ break;
+ case BTN_5_UP:
+ if(s < 59) s++;
+ break;
+ case BTN_4_UP:
+ if(s < 50) s += 10;
+ break;
+ case BTN_4_DN:
+ if(s > 9) s -= 10;
+ break;
+ case BTN_3_UP:
+ if(m < 59) m++;
+ break;
+ case BTN_3_DN:
+ if(m) m--;
+ break;
+ case BTN_2_UP:
+ if(m < 50) m += 10;
+ break;
+ case BTN_2_DN:
+ if(m > 9) m -= 10;
+ break;
+ case BTN_1_UP:
+ if(h < 23) h++;
+ break;
+ case BTN_1_DN:
+ if(h) h--;
+ break;
+ case BTN_0_UP:
+ if(h < 14) h += 10;
+ break;
+ case BTN_0_DN :
+ if(h > 9) h -=10;
+ break;
+ default: timechange = 0;
+ } else timechange = 0;
+
+ if(timechange){
+ ADK_rtcSet(year, month, day, h, m, s);
+ }
+ break;
+ }
+ case AdkAlarm:{
+
+ if(!alarmFake || alarmEnded){
+ ADK_ledDrawLetter(0, settings.almH / 10 + '0', r, g, b);
+ ADK_ledDrawLetter(1, settings.almH % 10 + '0', r, g, b);
+ ADK_ledDrawLetter(2, settings.almM / 10 + '0', r, g, b);
+ ADK_ledDrawLetter(3, settings.almM % 10 + '0', r, g, b);
+ ADK_ledDrawLetter(4, 'O', r, g, b);
+ ADK_ledDrawLetter(5, (settings.almOn ? 'N' : 'F'), r, g, b);
+ ADK_ledWrite(9, r, g, b);
+ ADK_ledWrite(2, 0, 0, 0);
+
+ if(button & (BTN_MASK_PRESS | BTN_MASK_HOLD)) switch(button & BTN_MASK_ID){
+
+ case BTN_5_DN:
+ case BTN_5_UP:
+ case BTN_4_UP:
+ case BTN_4_DN:
+ settings.almOn ^= 1;
+ break;
+ case BTN_3_UP:
+ if(settings.almM < 59) settings.almM++;
+ break;
+ case BTN_3_DN:
+ if(settings.almM) settings.almM--;
+ break;
+ case BTN_2_UP:
+ if(settings.almM < 50) settings.almM += 10;
+ break;
+ case BTN_2_DN:
+ if(settings.almM > 9) settings.almM -= 10;
+ break;
+ case BTN_1_UP:
+ if(settings.almH < 23) settings.almH++;
+ break;
+ case BTN_1_DN:
+ if(settings.almH) settings.almH--;
+ break;
+ case BTN_0_UP:
+ if(settings.almH < 14) settings.almH += 10;
+ break;
+ case BTN_0_DN :
+ if(settings.almH > 9) settings.almH -=10;
+ break;
+ }
+ }
+ else{
+ ADK_ledWrite(9, 0, 0, 0);
+ ADK_ledWrite(2, 0, 0, 0);
+ }
+ if(button == (BTN_MASK_HOLD | BTN_ALARM) && alarmEnded && (alarmState == AdkAlarmIdle || alarmState == AdkAlarmIdleWait)){ //handle sound file selection
+
+ char* name = settings.almTune;
+ alarmFake = 1;
+ alarmEnded = 0;
+ alarmStop = 0;
+ dbgPrintf("Playing song '%s'\n", settings.almTune);
+ if(name[0] == '/' && (name[1] == 'T' || name[1] == 't') &&
+ (name[2] == 'u' || name[2] == 'U') && (name[3] == 'n' || name[3] == 'N') &&
+ (name[4] == 'e' || name[4] == 'E') && (name[5] == 's' || name[5] == 'S') &&
+ name[6] == '/') name += 7;
+ for(i = 0; i < 6; i++) ADK_ledDrawLetter(i, name[i], r, g, b);
+ ADK_playOggBackground(settings.almTune, &alarmEnded, &alarmStop);
+ }
+ if(button == (BTN_MASK_PRESS | BTN_SLIDER_0) || button == (BTN_MASK_PRESS | BTN_SLIDER_1) || button == (BTN_MASK_PRESS | BTN_SLIDER_2)){
+
+ char name[256] = "/Tunes/", found = 0;
+
+ dbgPrintf("next file\n");
+
+ for(j = 0; j < 2 && !found; j++) if(!ADK_fatfsOpenDir(&dir, "/Tunes")){
+
+ alarmDirPos++;
+ for(i = 0; i <= alarmDirPos; i++){
+
+ FatFileInfo fi;
+ fi.longName = name + 7;
+ fi.nameSz = sizeof(name) - 7;
+
+ if(!ADK_fatfsReadDir(dir, &fi)){
+
+ if(i == alarmDirPos){
+ dbgPrintf("file: '%s'\n", name);
+ found = 1;
+ }
+ }
+ else{
+
+ alarmDirPos = -1;
+ dbgPrintf("no more files\n");
+ break;
+ }
+ }
+ ADK_fatfsCloseDir(dir);
+ }
+ if(found) strcpy(settings.almTune, name);
+ }
+ break;
+ }
+ case AdkVolume:{
+
+ uint8_t dispVol = ((uint32_t)ADK_getVolume() * 100) >> 8;
+
+ ADK_ledDrawLetter(0, 'V', r, g, b);
+ ADK_ledDrawLetter(1, 'O', r, g, b);
+ ADK_ledDrawLetter(2, 'L', r, g, b);
+ ADK_ledDrawLetter(3, ' ', r, g, b);
+ ADK_ledDrawLetter(4, dispVol / 10 + '0', r, g, b);
+ ADK_ledDrawLetter(5, dispVol % 10 + '0', r, g, b);
+
+ dispVol = ADK_capSenseSlider();
+ if(dispVol != volSlider){
+ ADK_setVolume(settings.vol = dispVol);
+ volSlider = dispVol;
+ }
+
+ break;
+ }
+ case AdkColor:{
+
+ uint8_t slider, seg, prog;
+ static const char hexch[] = "0123456789ABCDEF";
+
+ ADK_ledDrawLetter(0, hexch[settings.R >> 4], r, g, b);
+ ADK_ledDrawLetter(1, hexch[settings.R & 15], r, g, b);
+ ADK_ledDrawLetter(2, hexch[settings.G >> 4], r, g, b);
+ ADK_ledDrawLetter(3, hexch[settings.G & 15], r, g, b);
+ ADK_ledDrawLetter(4, hexch[settings.B >> 4], r, g, b);
+ ADK_ledDrawLetter(5, hexch[settings.B & 15], r, g, b);
+ ADK_ledWrite(9, 0, 0, 0);
+ ADK_ledWrite(2, 0, 0, 0);
+
+ if(button & (BTN_MASK_PRESS | BTN_MASK_HOLD)) switch(button & BTN_MASK_ID){
+
+ case BTN_5_DN:
+ if(settings.B) settings.B--;
+ break;
+ case BTN_5_UP:
+ if(settings.B < 0xFF) settings.B++;
+ break;
+ case BTN_4_UP:
+ if(settings.B < 0xF0) settings.B += 0x10;
+ break;
+ case BTN_4_DN:
+ if(settings.B > 0x0F) settings.B -= 0x10;
+ break;
+ case BTN_3_UP:
+ if(settings.G < 0xFF) settings.G++;
+ break;
+ case BTN_3_DN:
+ if(settings.G) settings.G--;
+ break;
+ case BTN_2_UP:
+ if(settings.G < 0xF0) settings.G += 0x10;
+ break;
+ case BTN_2_DN:
+ if(settings.G > 0x0F) settings.G -= 0x10;
+ break;
+ case BTN_1_UP:
+ if(settings.R < 0xFF) settings.R++;
+ break;
+ case BTN_1_DN:
+ if(settings.R) settings.R--;
+ break;
+ case BTN_0_UP:
+ if(settings.R < 0xF0) settings.R += 0x10;
+ break;
+ case BTN_0_DN :
+ if(settings.R > 0x0F) settings.R -= 0x10;
+ break;
+ }
+
+ slider = ADK_capSenseSlider();
+ if(slider != colorSlider){
+ colorSlider = slider;
+
+ gethue(slider, &settings.R, &settings.G, &settings.B);
+ }
+ break;
+ }
+ case AdkBrightness:{
+
+ uint8_t slider;
+ uint8_t dispBri = ((uint32_t)settings.bri * 100) >> 8;
+
+ ADK_ledDrawLetter(0, 'B', r, g, b);
+ ADK_ledDrawLetter(1, 'R', r, g, b);
+ ADK_ledDrawLetter(2, 'I', r, g, b);
+ ADK_ledDrawLetter(3, ' ', r, g, b);
+ ADK_ledDrawLetter(4, dispBri / 10 + '0', r, g, b);
+ ADK_ledDrawLetter(5, dispBri % 10 + '0', r, g, b);
+ ADK_ledWrite(9, 0, 0, 0);
+ ADK_ledWrite(2, 0, 0, 0);
+
+ slider = ADK_capSenseSlider();
+ if(slider != briSlider){
+ slider = ((((uint32_t)slider) * 191) >> 8) + 64;
+ briSlider = slider;
+ settings.bri = slider;
+ }
+ break;
+ }
+ case AdkDisplay:{
+
+ static uint8_t vals[NUM_LEDS][3] = {{0,},};
+ static const uint8_t doNotTouch[] = {49, 33, 17, 1, 48, 32, 16, 0};
+ uint8_t slider = ADK_capSenseSlider();
+
+ if(slider != speedSlider){
+ speedSlider = slider;
+ settings.speed = (255 - slider) >> 3;
+ }
+
+ if(ADK_getUptime() > nextTime){
+
+ if(!nextTime){
+
+ const char* name = NULL;
+
+ switch(settings.displayMode){
+
+ default: settings.displayMode = AdkShowAnimation; //fallthrough
+ case AdkShowAnimation: name = "PRETTY"; break;
+ case AdkShowAccel: name = " ACCEL"; break;
+ case AdkShowMag: name = "MAGNET"; break;
+ case AdkShowTemp: name = " TEMP "; break;
+ case AdkShowHygro: name = " HYGRO"; break;
+ case AdkShowBaro: name = " BARO "; break;
+ case AdkShowProx: name = " PROX "; break;
+ case AdkShowColor: name = " COLOR"; break;
+ }
+ for(i = 0; i < 6; i++) ADK_ledDrawLetter(i, name[i], r, g, b);
+ ADK_ledWrite(9, 0, 0, 0);
+ ADK_ledWrite(2, 0, 0, 0);
+ nextTime = ADK_getUptime() + 1000;
+ }
+ else{
+ nextTime = ADK_getUptime() + settings.speed;
+ volatile int16_t* arrPtr = NULL;
+ static const long valUnused = 0x7FFFFFFF;
+ int val = valUnused;
+ char isSigned = 1, cR = r, cG = g, cB = b;
+
+ switch(settings.displayMode){
+
+ case AdkShowAnimation:
+
+ if(rnd() < 30){ //spawn
+
+ i = rnd() % NUM_LEDS;
+ gethue(rnd(), vals[i] + 0, vals[i] + 1, vals[i] + 2);
+ }
+ for(i = 0; i < NUM_LEDS; i++){
+ for(j = 0; j < 3; j++) vals[i][j] = ((uint32_t)vals[i][j] * 127) >> 7;
+ for(j = 0; j < sizeof(doNotTouch) && i != doNotTouch[j]; j++);
+ if(j == sizeof(doNotTouch)) ADK_ledWrite(i, vals[i][0], vals[i][1], vals[i][2]);
+ }
+ break;
+
+ case AdkShowAccel:
+
+ arrPtr = accel;
+ //fallthrough
+
+ case AdkShowMag:
+
+ if(!arrPtr) arrPtr = mag;
+ //fallthrough
+
+ case AdkShowProx:
+
+ if(!arrPtr){
+
+ arrPtr = (int16_t*)prox;
+ isSigned = 0;
+ }
+ //fallthrough
+
+ case AdkShowColor:
+
+ if(!arrPtr){
+
+ arrPtr = (int16_t*)proxNormalized;
+ isSigned = 0;
+ cR = proxNormalized[0] >> 8;
+ cG = proxNormalized[1] >> 8;
+ cB = proxNormalized[2] >> 8;
+ }
+
+ for(i = 0; i < 6; i += 2){
+
+ val = arrPtr[i >> 1];
+ if(isSigned){
+ if(val < 0){
+ val = -val;
+ j = 0;
+ }
+ else j = 1;
+ }
+ else val = (uint16_t)val;
+
+ val *= 100;
+ val >>= isSigned ? 15 : 16;
+ ADK_ledDrawLetter(i + 0, + val / 10 + '0', isSigned ? (j ? settings.bri : 0) : cR, isSigned ? 0 : cG, isSigned ? (j ? 0 : settings.bri) : cB);
+ ADK_ledDrawLetter(i + 1, + val % 10 + '0', isSigned ? (j ? settings.bri : 0) : cR, isSigned ? 0 : cG, isSigned ? (j ? 0 : settings.bri) : cB);
+ }
+ break;
+
+ case AdkShowTemp:
+
+ val = bTemp;
+ //fall through
+
+ case AdkShowHygro:
+
+ if(val == valUnused) val = hHum;
+ //fall through
+
+ case AdkShowBaro:
+
+ if(val == valUnused) val = (bPress + 50) / 100;
+ if(val < 0){
+ ADK_ledDrawLetter(0, '-', r, g, b);
+ val = -val;
+ }
+ for(j = 1000, i = 1, k = 0; i < 6; i++){
+
+ if(i == 4) ADK_ledDrawLetter(i, '.', r, g, b);
+ else{
+
+ if(val >= j || i >= 4 || k){
+ k = 1;
+ ADK_ledDrawLetter(i, val / j + '0', r, g, b);
+ }
+ else ADK_ledDrawLetter(i, ' ', r, g, b);
+ val %= j;
+ j /= 10;
+ }
+ }
+ break;
+ }
+ }
+ }
+ break;
+ }
+ case AdkPresets:{
+
+ ADK_ledWrite(9, 0, 0, 0);
+ ADK_ledWrite(2, 0, 0, 0);
+
+ ADK_ledDrawLetter(0, ' ', r, g, b);
+ ADK_ledDrawLetter(1, 'n', r, g, b);
+ ADK_ledDrawLetter(2, 'o', r, g, b);
+ ADK_ledDrawLetter(3, 'n', r, g, b);
+ ADK_ledDrawLetter(4, 'e', r, g, b);
+ ADK_ledDrawLetter(5, ' ', r, g, b);
+
+ break;
+ }
+ }
+
+ if(button == (BTN_MASK_RELEASE | BTN_ALARM) && alarmFake && !alarmEnded){
+
+ dbgPrintf("Stopping song\n");
+ alarmStop = 1;
+ alarmFake = 0;
+ }
+
+ if(button & BTN_MASK_PRESS) switch(button & BTN_MASK_ID){
+
+ case BTN_CLOCK: newState = AdkClock; break;
+ case BTN_ALARM:
+ // eat the transition to alarm edit mode if we're in an alarm
+ if (alarmState == AdkAlarmIdle || alarmState == AdkAlarmIdleWait)
+ newState = AdkAlarm;
+ break;
+ case BTN_BRIGHTNESS: newState = AdkBrightness; briSlider = ADK_capSenseSlider(); break;
+ case BTN_COLOR: newState = AdkColor; colorSlider = ADK_capSenseSlider(); break;
+ case BTN_PRESETS: newState = AdkPresets; break;
+ case BTN_DISPLAY: newState = AdkDisplay; nextTime = 0; speedSlider = ADK_capSenseSlider(); break;
+ case BTN_VOLUME: newState = AdkVolume; volSlider = ADK_capSenseSlider(); break;
+ }
+ if(newState != AdkInvalid){
+ writeSettings();
+ if(state == AdkDisplay){
+ screenClear();
+
+ //switch to next display mode
+ if(newState == AdkDisplay && ++settings.displayMode == AdkShowLast) settings.displayMode = 0;
+ }
+ }
+
+ // alarm
+ if (settings.almOn) {
+ uint8_t month, day, h, m, sec;
+
+ ADK_rtcGet(0, 0, 0, &h, &m, 0);
+
+ switch (alarmState) {
+ case AdkAlarmIdle: // see if we need to trigger an alarm
+ if (settings.almH == h && settings.almM == m) {
+ // start alarm
+ dbgPrintf("ALARM\n");
+ alarmState = AdkAlarmAlarm;
+ }
+ break;
+ case AdkAlarmIdleWait: // we had triggered, need to wait at least a minute before waiting for next alarm
+ if (settings.almH != h || settings.almM != m) {
+ alarmState = AdkAlarmIdle;
+ }
+ break;
+ case AdkAlarmAlarm: {
+ // check for alarm button to cancel playing alarm
+ if (((button & BTN_MASK_ID) == BTN_ALARM) &&
+ (button & (BTN_MASK_PRESS | BTN_MASK_HOLD))) {
+ alarmState = AdkAlarmIdleWait;
+ alarmStop = 1;
+ ADK_ledDrawIcon(1, (settings.R + dimIconFactor - 1) / dimIconFactor, (settings.G + dimIconFactor - 1) / dimIconFactor, (settings.B + dimIconFactor - 1) / dimIconFactor);
+ break;
+ }
+ // check for snooze button
+ if (((button & BTN_MASK_ID) <= 2) &&
+ (button & (BTN_MASK_PRESS | BTN_MASK_HOLD))) {
+ dbgPrintf("ALARM SNOOZE\n");
+ alarmState = AdkAlarmSnooze;
+ snoozeStart = ADK_getUptime() / 1000;
+ alarmStop = 1;
+ break;
+ }
+
+ // make sure ogg is playing
+ if (alarmEnded) {
+ alarmEnded = 0;
+ alarmStop = 0;
+ alarmFake = 0;
+ ADK_playOggBackground(settings.almTune, &alarmEnded, &alarmStop);
+ }
+
+ // blink the alarm button red
+ if ((ADK_getUptime() / 500) & 1)
+ ADK_ledDrawIcon(1, 0xff, 0, 0);
+ else
+ ADK_ledDrawIcon(1, (settings.R + dimIconFactor - 1) / dimIconFactor, (settings.G + dimIconFactor - 1) / dimIconFactor, (settings.B + dimIconFactor - 1) / dimIconFactor);
+ break;
+ }
+ case AdkAlarmSnooze:
+ // check for alarm button to cancel playing alarm
+ if (alarmState != AdkAlarmIdle &&
+ ((button & BTN_MASK_ID) == 4) &&
+ (button & (BTN_MASK_PRESS | BTN_MASK_HOLD))) {
+ alarmState = AdkAlarmIdleWait;
+ alarmStop = 1;
+ ADK_ledDrawIcon(1, (settings.R + dimIconFactor - 1) / dimIconFactor, (settings.G + dimIconFactor - 1) / dimIconFactor, (settings.B + dimIconFactor - 1) / dimIconFactor);
+ break;
+ }
+ // see if we need to transition back to alarm state
+ if ((ADK_getUptime() / 1000) - snoozeStart > settings.almSnooze) {
+ dbgPrintf("ALARM FROM SNOOZE\n");
+ alarmState = AdkAlarmAlarm;
+ break;
+ }
+
+ // blink the alarm button blue
+ if ((ADK_getUptime() / 500) & 1)
+ ADK_ledDrawIcon(1, 0, 0, 0xff);
+ else
+ ADK_ledDrawIcon(1, (settings.R + dimIconFactor - 1) / dimIconFactor, (settings.G + dimIconFactor - 1) / dimIconFactor, (settings.B + dimIconFactor - 1) / dimIconFactor);
+ break;
+ }
+ } else {
+ // make sure there are no dangling alarms
+ if(!alarmFake) alarmStop = 1;
+ }
+
+ // usb accessory processing
+ processUSBAccessory();
+ }
+}
+
+
+int main(void){
+
+ setup();
+ while(1) loop();
+}
+
+
+
+//////////// bt interface (fun)
+
+//commands
+#define MAX_PACKET_SZ 260 //256b payload + header
+
+// command header
+// u8 cmd opcode
+// u8 sequence
+// u16 size
+
+// data formats:
+// timespec = (year,month,day,hour,min,sec) (u16,u8,u8,u8,u8,u8)
+
+#define CMD_MASK_REPLY 0x80
+#define BT_CMD_GET_PROTO_VERSION 1 // () -> (u8 protocolVersion)
+#define BT_CMD_GET_SENSORS 2 // () -> (sensors: i32,i32,i32,i32,u16,u16,u16,u16,u16,u16,u16,i16,i16,i16,i16,i16,i16)
+#define BT_CMD_FILE_LIST 3 // FIRST: (char name[]) -> (fileinfo or single zero byte) OR NONLATER: () -> (fileinfo or empty or single zero byte)
+#define BT_CMD_FILE_DELETE 4 // (char name[0-255)) -> (char success)
+#define BT_CMD_FILE_OPEN 5 // (char name[0-255]) -> (char success)
+#define BT_CMD_FILE_WRITE 6 // (u8 data[]) -> (char success)
+#define BT_CMD_FILE_CLOSE 7 // () -> (char success)
+#define BT_CMD_GET_UNIQ_ID 8 // () -> (u8 uniq[16])
+#define BT_CMD_BT_NAME 9 // (char name[]) -> () OR () -> (char name[])
+#define BT_CMD_BT_PIN 10 // (char PIN[]) -> () OR () -> (char PIN[])
+#define BT_CMD_TIME 11 // (timespec) -> (char success)) OR () > (timespec)
+#define BT_CMD_SETTINGS 12 // () -> (alarm:u8,u8,u8,brightness:u8,color:u8,u8,u8:volume:u8) or (alarm:u8,u8,u8,brightness:u8,color:u8,u8,u8:volume:u8) > (char success)
+#define BT_CMD_ALARM_FILE 13 // () -> (char file[0-255]) OR (char file[0-255]) > (char success)
+#define BT_CMD_GET_LICENSE 14 // () -> (u8 licensechunk[]) OR () if last sent
+#define BT_CMD_DISPLAY_MODE 15 // () -> (u8) OR (u8) -> ()
+#define BT_CMD_LOCK 16 // () -> (u8) OR (u8) -> ()
+
+#define BT_PROTO_VERSION_1 1 //this line marks the end of v1.0 API, all things after this are the next version
+
+
+//constants
+#define BT_PROTO_VERSION_CURRENT BT_PROTO_VERSION_1
+
+static const uint8_t gzippedLicences[] = {
+ 0x1F, 0x8B, 0x08, 0x00, 0x36, 0xB6, 0xDF, 0x4F, 0x02, 0x03, 0xCD, 0x58, 0x5D, 0x73, 0xDA, 0x38, 0x14, 0x7D, 0xD7, 0xAF, 0xB8, 0x93, 0x97, 0x26, 0x19, 0x07, 0xB2, 0x79, 0xDA, 0x49, 0x9F, 0x0C,
+ 0x18, 0xD0, 0x2C, 0xB1, 0x59, 0xDB, 0x24, 0xE5, 0xAD, 0xC2, 0x16, 0xE0, 0x1D, 0x63, 0x79, 0x2D, 0x93, 0x34, 0xFF, 0x7E, 0xEF, 0x95, 0x6D, 0x3E, 0x12, 0x92, 0xA6, 0x09, 0xDD, 0x96, 0xE9, 0x34,
+ 0x06, 0x49, 0x57, 0xE7, 0x9E, 0xFB, 0x71, 0x2C, 0x31, 0x38, 0xC6, 0x87, 0xFD, 0x02, 0x2B, 0x2C, 0x5C, 0x26, 0x1A, 0xF2, 0x42, 0xC5, 0xEB, 0xA8, 0x84, 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F, 0x53, 0x19, 0x98, 0xD2, 0xA1, 0xE4, 0xFB, 0x0B, 0xEB, 0xDA, 0x82, 0xBA, 0xB5, 0xCB, 0x6F, 0x79, 0x41, 0x1E,
+ 0x20, 0xCC, 0x84, 0xE8, 0xA4, 0xDB, 0x3F, 0xB4, 0x15, 0x48, 0xB9, 0x07, 0x61, 0x5E, 0x77, 0xF7, 0x4D, 0xD7, 0x4D, 0x45, 0xB6, 0x58, 0x8B, 0x85, 0x84, 0x05, 0xCA, 0x57, 0x91, 0x91, 0x0E, 0x6D,
+ 0x5B, 0xAF, 0x51, 0x29, 0x32, 0x93, 0x26, 0x28, 0xE5, 0xA2, 0x12, 0xAE, 0x67, 0x7E, 0xD1, 0x46, 0xF8, 0xCA, 0xF2, 0x1F, 0xF8, 0xB9, 0x5A, 0xB2, 0x5A, 0x19, 0x00, 0x00
+};
+
+
+static void putLE32(uint8_t* buf, uint16_t* idx, uint32_t val){
+
+ buf[(*idx)++] = val;
+ buf[(*idx)++] = val >> 8;
+ buf[(*idx)++] = val >> 16;
+ buf[(*idx)++] = val >> 24;
+}
+
+static void putLE16(uint8_t* buf, uint16_t* idx, uint32_t val){
+
+ buf[(*idx)++] = val;
+ buf[(*idx)++] = val >> 8;
+}
+
+static uint16_t adkProcessCommand(uint8_t cmd, const uint8_t* dataIn, uint16_t sz, char fromBT, uint8_t* reply, uint16_t maxReplySz){ //returns num bytes to reply with (or 0 for no reply)
+
+ uint16_t sendSz = 0;
+ static FatFileP btFile = 0, usbFile = 0;
+ static FatDirP btDir = 0, usbDir = 0;
+ static uint16_t btLicPos = 0, usbLicPos = 0;
+ FatFileP* filP = fromBT ? &btFile : &usbFile;
+ FatDirP* dirP = fromBT ? &btDir : &usbDir;
+ uint16_t* licPos = fromBT ? &btLicPos : &usbLicPos;
+
+ dbgPrintf("ADK: BT: have cmd 0x%x with %db of data\n", cmd, sz);
+
+ //NOTE: this code was written in a hurry and features little error checking. yes, I know it's bad. -DG
+
+ //process packet
+ switch(cmd){
+
+ case BT_CMD_GET_PROTO_VERSION:
+ {
+ reply[sendSz++] = BT_PROTO_VERSION_CURRENT;
+ }
+ break;
+
+ case BT_CMD_GET_SENSORS:
+ {
+ putLE32(reply, &sendSz, hTemp);
+ putLE32(reply, &sendSz, hHum);
+ putLE32(reply, &sendSz, bPress);
+ putLE32(reply, &sendSz, bTemp);
+ putLE16(reply, &sendSz, prox[0]);
+ putLE16(reply, &sendSz, prox[1]);
+ putLE16(reply, &sendSz, prox[3]);
+ putLE16(reply, &sendSz, prox[4]);
+ putLE16(reply, &sendSz, prox[5]);
+ putLE16(reply, &sendSz, prox[2]);
+ putLE16(reply, &sendSz, prox[6]);
+ putLE16(reply, &sendSz, accel[0]);
+ putLE16(reply, &sendSz, accel[1]);
+ putLE16(reply, &sendSz, accel[2]);
+ putLE16(reply, &sendSz, mag[0]);
+ putLE16(reply, &sendSz, mag[1]);
+ putLE16(reply, &sendSz, mag[2]);
+ }
+ break;
+
+ case BT_CMD_FILE_LIST:
+ {
+
+ if(sz){ //reset
+
+ if(*dirP) ADK_fatfsCloseDir(*dirP);
+ if(ADK_fatfsOpenDir(dirP, (char*)dataIn)) *dirP = 0;
+ }
+ if(*dirP){
+
+ FatFileInfo fi;
+ fi.longName = (char*)reply + 5;
+ fi.nameSz = maxReplySz - 5;
+
+ if(!ADK_fatfsReadDir(*dirP, &fi)){
+
+ fi.longName[fi.nameSz - 1] = 0;
+ reply[sendSz++] = fi.fsize;
+ reply[sendSz++] = fi.fsize >> 8;
+ reply[sendSz++] = fi.fsize >> 16;
+ reply[sendSz++] = fi.fsize >> 24;
+ reply[sendSz++] = fi.attrib;
+ sendSz += strlen(fi.longName) + 1;
+ }
+ else reply[sendSz++] = 0;
+ }
+ else reply[sendSz++] = 0;
+ }
+ break;
+
+ case BT_CMD_FILE_DELETE:
+ {
+ reply[sendSz++] = !ADK_fatfsUnlink((const char*)dataIn);
+ }
+ break;
+
+ case BT_CMD_FILE_OPEN:
+ {
+ if(*filP) ADK_fatfsClose(*filP);
+ reply[sendSz++] = !ADK_fatfsOpen(filP, (const char*)dataIn, FATFS_WRITE | FATFS_CREATE | FATFS_TRUNCATE);
+ if(!reply[sendSz - 1]) *filP = 0;
+ }
+ break;
+
+ case BT_CMD_FILE_WRITE:
+ {
+ uint32_t written;
+
+ reply[sendSz++] = !ADK_fatfsWrite(*filP, (void*)dataIn, sz, &written) && written == sz;
+ }
+ break;
+
+ case BT_CMD_FILE_CLOSE:
+ {
+ if(*filP){
+ reply[sendSz++] = 1;
+ ADK_fatfsClose(*filP);
+ *filP = 0;
+ }
+ else reply[sendSz++] = 0;
+ }
+ break;
+
+ case BT_CMD_GET_UNIQ_ID:
+ {
+
+ uint32_t id[4];
+
+ ADK_getUniqueId(id);
+ putLE32(reply, &sendSz, id[0]);
+ putLE32(reply, &sendSz, id[1]);
+ putLE32(reply, &sendSz, id[2]);
+ putLE32(reply, &sendSz, id[3]);
+ }
+ break;
+
+ case BT_CMD_BT_NAME:
+ {
+ if(sz){ //set
+ strcpy(settings.btName, (char*)dataIn);
+ reply[sendSz++] = 1;
+ writeSettings();
+ }
+ else{
+ strcpy((char*)reply, settings.btName);
+ sendSz = strlen((char*)reply) + 1;
+ }
+ }
+ break;
+
+ case BT_CMD_BT_PIN:
+ {
+ if(sz){ //set
+ strcpy(settings.btPIN, (char*)dataIn);
+ reply[sendSz++] = 1;
+ writeSettings();
+ }
+ else{
+ strcpy((char*)reply, settings.btPIN);
+ sendSz = strlen((char*)reply) + 1;
+ }
+ }
+ break;
+ case BT_CMD_TIME:
+ {
+ if (sz >= 7) { //set
+ ADK_rtcSet(dataIn[1] << 8 | dataIn[0], dataIn[2], dataIn[3], dataIn[4], dataIn[5], dataIn[6]);
+ reply[sendSz++] = 1;
+ } else if (sz == 0) {
+ ADK_rtcGet((uint16_t *)&reply[0], &reply[2], &reply[3], &reply[4], &reply[5], &reply[6]);
+ sendSz += 7;
+ }
+ }
+ break;
+ case BT_CMD_SETTINGS:
+ {
+ if (sz >= 8) { //set
+ settings.almH = dataIn[0];
+ settings.almM = dataIn[1];
+ settings.almOn = dataIn[2];
+ settings.bri = dataIn[3];
+ settings.R = dataIn[4];
+ settings.G = dataIn[5];
+ settings.B = dataIn[6];
+ settings.vol = dataIn[7];
+ ADK_setVolume(settings.vol);
+ writeSettings();
+ reply[sendSz++] = 1;
+ } else {
+ reply[sendSz++] = settings.almH;
+ reply[sendSz++] = settings.almM;
+ reply[sendSz++] = settings.almOn;
+ reply[sendSz++] = settings.bri;
+ reply[sendSz++] = settings.R;
+ reply[sendSz++] = settings.G;
+ reply[sendSz++] = settings.B;
+ reply[sendSz++] = settings.vol;
+ }
+ }
+ break;
+ case BT_CMD_ALARM_FILE:
+ {
+ if(sz){ //set
+ strcpy(settings.almTune, (char*)dataIn);
+ reply[sendSz++] = 1;
+ writeSettings();
+ } else{
+ strcpy((char*)reply, settings.almTune);
+ sendSz = strlen((char*)reply) + 1;
+ }
+ }
+ break;
+ case BT_CMD_GET_LICENSE:
+ {
+ static const uint32_t maxPacket = MAX_PACKET_SZ - 10; //seems reasonable
+
+ if(*licPos >= sizeof(gzippedLicences)){ //send terminator
+ reply[sendSz++] = 0;
+ *licPos = 0;
+ }
+ else{
+
+ uint32_t left = sizeof(gzippedLicences) - *licPos;
+ if(left > maxPacket) left = maxPacket;
+ reply[sendSz++] = 1;
+ while(left--) reply[sendSz++] = gzippedLicences[(*licPos)++];
+ }
+ }
+ break;
+ case BT_CMD_DISPLAY_MODE:
+ {
+ if (sz) { //set
+ settings.displayMode = dataIn[0];
+ reply[sendSz++] = 1;
+ } else if (sz == 0) {
+ reply[sendSz++] = settings.displayMode;
+ }
+ }
+ break;
+ case BT_CMD_LOCK:
+ {
+ if (sz) { //set
+ locked = dataIn[0] ? 2 : 0;
+ reply[sendSz++] = 1;
+ } else if (sz == 0) {
+ reply[sendSz++] = locked;
+ }
+ }
+ break;
+ }
+ return sendSz;
+}
+
+static uint8_t cmdBuf[MAX_PACKET_SZ];
+static uint32_t bufPos = 0;
+
+
+static void btAdkPortOpen(void* port, uint8_t dlci){
+
+ bufPos = 0;
+}
+
+static void btAdkPortClose(void* port, uint8_t dlci){
+
+ //nothing here [yet?]
+}
+
+
+static void btAdkPortRx(void* port, uint8_t dlci, const uint8_t* data, uint16_t sz){
+
+ uint8_t reply[MAX_PACKET_SZ];
+ uint32_t i;
+ uint8_t seq, cmd;
+ uint16_t cmdSz;
+ uint8_t* ptr;
+
+ while(sz || bufPos){
+
+ uint16_t sendSz = 0;
+
+ //copy to buffer as much as we can
+ while(bufPos < MAX_PACKET_SZ && sz){
+ cmdBuf[bufPos++] = *data++;
+ sz--;
+ }
+
+ //see if a packet exists
+ if(bufPos < 4) return; // too small to be a packet -> discard
+ cmd = cmdBuf[0];
+ seq = cmdBuf[1];
+ cmdSz = cmdBuf[3];
+ cmdSz <<= 8;
+ cmdSz += cmdBuf[2];
+
+ if(bufPos - 4 < cmdSz) return; //not entire command received yet
+
+ sendSz = adkProcessCommand(cmd, cmdBuf + 4, cmdSz, 1, reply + 4, MAX_PACKET_SZ - 4);
+ if(sendSz){
+
+ reply[0] = cmd | CMD_MASK_REPLY;
+ reply[1] = seq;
+ reply[2] = sendSz;
+ reply[3] = sendSz >> 8;
+ sendSz += 4;
+
+ ADK_btRfcommPortTx(port, dlci, reply, sendSz);
+ }
+
+ //adjust buffer as needed
+ for(i = 0; i < bufPos - cmdSz - 4; i++){
+ cmdBuf[i] = cmdBuf[i + cmdSz + 4];
+ }
+ bufPos = i;
+ }
+}
+
+
+
+
+
+
+//////////// bt support (boring)
+
+
+#define maxPairedDevices 4
+static uint8_t numPairedDevices = 0;
+static uint8_t savedMac[maxPairedDevices][BLUETOOTH_MAC_SIZE];
+static uint8_t savedKey[maxPairedDevices][BLUETOOTH_LINK_KEY_SIZE];
+
+static char adkBtConnectionRequest(const uint8_t* mac, uint32_t devClass, uint8_t linkType){ //return 1 to accept
+
+ dbgPrintf("Accepting connection from %02X:%02X:%02X:%02X:%02X:%02X\n", mac[5], mac[4], mac[3], mac[2], mac[1], mac[0]);
+ return 1;
+}
+
+static char adkBtLinkKeyRequest(const uint8_t* mac, uint8_t* buf){ //link key create
+
+ uint8_t i, j;
+
+ dbgPrintf("Key request from %02X:%02X:%02X:%02X:%02X:%02X\n -> ", mac[5], mac[4], mac[3], mac[2], mac[1], mac[0]);
+
+ for(i = 0; i < numPairedDevices; i++){
+
+ for(j = 0; j < BLUETOOTH_MAC_SIZE && savedMac[i][j] == mac[j]; j++);
+ if(j == BLUETOOTH_MAC_SIZE){ //match
+
+ dbgPrintf("{");
+ for(j = 0; j < BLUETOOTH_LINK_KEY_SIZE; j++){
+
+ dbgPrintf(" %02X", savedKey[i][j]);
+ buf[j] = savedKey[i][j];
+ }
+ dbgPrintf(" }");
+ return 1;
+ }
+ }
+ dbgPrintf("FAIL\n");
+ return 0;
+}
+
+static void adkBtLinkKeyCreated(const uint8_t* mac, const uint8_t* buf){ //link key was just created, save it if you want it later
+
+ uint8_t j;
+
+ dbgPrintf("Key created for %02X:%02X:%02X:%02X:%02X:%02X <- {", mac[5], mac[4], mac[3], mac[2], mac[1], mac[0]);
+
+ for(j = 0; j < BLUETOOTH_LINK_KEY_SIZE; j++){
+
+ dbgPrintf(" %02X", buf[j]);
+ }
+ dbgPrintf(" }\n");
+
+ if(numPairedDevices < maxPairedDevices){
+
+ for(j = 0; j < BLUETOOTH_LINK_KEY_SIZE; j++) savedKey[numPairedDevices][j] = buf[j];
+ for(j = 0; j < BLUETOOTH_MAC_SIZE; j++) savedMac[numPairedDevices][j] = mac[j];
+ numPairedDevices++;
+ dbgPrintf("saved to slot %d/%d\n", numPairedDevices, maxPairedDevices);
+ }
+ else{
+ dbgPrintf("out of slots...discaring\n");
+ }
+}
+
+static char adkBtPinRequest(const uint8_t* mac, uint8_t* buf){ //fill buff with PIN code, return num bytes used (16 max) return 0 to decline
+
+ uint8_t v, i = 0;
+
+ dbgPrintf("PIN request from %02X:%02X:%02X:%02X:%02X:%02X\n -> ", mac[5], mac[4], mac[3], mac[2], mac[1], mac[0]);
+
+ if(btPIN){
+ dbgPrintf(" -> using pin '%s'\n", btPIN);
+ for(i = 0; btPIN[i]; i++) buf[i] = btPIN[i];
+ return i;
+ }
+ else dbgPrintf(" no PIN set. rejecting\n");
+ return 0;
+}
+
+#define MAGIX 0xFA
+
+static uint8_t sdpDescrADK[] =
+{
+ //service class ID list
+ SDP_ITEM_DESC(SDP_TYPE_UINT, SDP_SZ_2), 0x00, 0x01, SDP_ITEM_DESC(SDP_TYPE_ARRAY, SDP_SZ_u8), 17,
+ SDP_ITEM_DESC(SDP_TYPE_UUID, SDP_SZ_16), BT_ADK_UUID,
+ //ServiceId
+ SDP_ITEM_DESC(SDP_TYPE_UINT, SDP_SZ_2), 0x00, 0x03, SDP_ITEM_DESC(SDP_TYPE_UUID, SDP_SZ_2), 0x11, 0x01,
+ //ProtocolDescriptorList
+ SDP_ITEM_DESC(SDP_TYPE_UINT, SDP_SZ_2), 0x00, 0x04, SDP_ITEM_DESC(SDP_TYPE_ARRAY, SDP_SZ_u8), 15,
+ SDP_ITEM_DESC(SDP_TYPE_ARRAY, SDP_SZ_u8), 6,
+ SDP_ITEM_DESC(SDP_TYPE_UUID, SDP_SZ_2), 0x01, 0x00, // L2CAP
+ SDP_ITEM_DESC(SDP_TYPE_UINT, SDP_SZ_2), L2CAP_PSM_RFCOMM >> 8, L2CAP_PSM_RFCOMM & 0xFF, // L2CAP PSM
+ SDP_ITEM_DESC(SDP_TYPE_ARRAY, SDP_SZ_u8), 5,
+ SDP_ITEM_DESC(SDP_TYPE_UUID, SDP_SZ_2), 0x00, 0x03, // RFCOMM
+ SDP_ITEM_DESC(SDP_TYPE_UINT, SDP_SZ_1), MAGIX, // port ###
+ //browse group list
+ SDP_ITEM_DESC(SDP_TYPE_UINT, SDP_SZ_2), 0x00, 0x05, SDP_ITEM_DESC(SDP_TYPE_ARRAY, SDP_SZ_u8), 3,
+ SDP_ITEM_DESC(SDP_TYPE_UUID, SDP_SZ_2), 0x10, 0x02, // Public Browse Group
+ //name
+ SDP_ITEM_DESC(SDP_TYPE_UINT, SDP_SZ_2), 0x01, 0x00, SDP_ITEM_DESC(SDP_TYPE_TEXT, SDP_SZ_u8), 12, 'A', 'D', 'K', ' ', 'B', 'T', ' ', 'C', 'O', 'M', 'M', 'S'
+};
+
+static void btStart(){
+ uint8_t i, dlci;
+ int f;
+
+ ADK_btEnable(adkBtConnectionRequest, adkBtLinkKeyRequest, adkBtLinkKeyCreated, adkBtPinRequest, NULL);
+
+ dlci = ADK_btRfcommReserveDlci(RFCOMM_DLCI_NEED_EVEN);
+
+ if(!dlci) dbgPrintf("BTADK: failed to allocate DLCI\n");
+ else{
+
+ //change descriptor to be valid...
+ for(i = 0, f = -1; i < sizeof(sdpDescrADK); i++){
+
+ if(sdpDescrADK[i] == MAGIX){
+ if(f == -1) f = i;
+ else break;
+ }
+ }
+
+ if(i != sizeof(sdpDescrADK) || f == -1){
+
+ dbgPrintf("BTADK: failed to find a single marker in descriptor\n");
+ ADK_btRfcommReleaseDlci(dlci);
+ return;
+ }
+
+ sdpDescrADK[f] = dlci >> 1;
+
+ dbgPrintf("BTADK has DLCI %u\n", dlci);
+
+ ADK_btRfcommRegisterPort(dlci, btAdkPortOpen, btAdkPortClose, btAdkPortRx);
+ ADK_btSdpServiceDescriptorAdd(sdpDescrADK, sizeof(sdpDescrADK));
+ }
+}
+
+// USB accessory
+static void processUSBAccessory()
+{
+ if (!ADK_accessoryConnected())
+ return;
+
+ uint8_t receiveBuf[MAX_PACKET_SZ];
+ uint8_t reply[MAX_PACKET_SZ];
+
+ int res = ADK_accessoryReceive(receiveBuf, sizeof(receiveBuf));
+ if (res >= 4) {
+ uint8_t cmd = receiveBuf[0];
+ uint8_t seq = receiveBuf[1];
+ uint16_t size = receiveBuf[2] | receiveBuf[3] << 8;
+
+ if (size + 4 > res) {
+ // short packet
+ return;
+ }
+
+ uint16_t replylen = adkProcessCommand(cmd, receiveBuf + 4, size, 0, reply + 4, MAX_PACKET_SZ - 4);
+ if (replylen > 0) {
+ reply[0] = cmd | CMD_MASK_REPLY;
+ reply[1] = seq;
+ reply[2] = replylen;
+ reply[3] = replylen >> 8;
+ replylen += 4;
+
+ dbgPrintf("ADK: USB: sending %d bytes\n", replylen);
+ ADK_accessorySend(reply, replylen);
+ }
+ }
+}
+
diff --git a/MakefileBasedBuild/app/printf.c b/MakefileBasedBuild/app/printf.c
new file mode 100644
index 0000000..c8ae62a
--- /dev/null
+++ b/MakefileBasedBuild/app/printf.c
@@ -0,0 +1,465 @@
+/*
+Copyright (c) 2011, Dmitry Grinberg (as published for DGOS on http://dgosblog.blogspot.com)
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following condition is met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#define ADK_INTERNAL
+#include "fwk.h"
+#include "printf.h"
+#include <stdarg.h>
+
+typedef struct {
+
+ void* dest;
+ uint32_t maxChars;
+
+ void* furtherCallback;
+ void* furtherUserData;
+
+} PrintData;
+
+typedef char (*StrPrintfExCbk)(void* userData, char chr); //return 0 to stop printing
+
+static uint32_t StrPrvPrintfEx_number(StrPrintfExCbk putc_,void* userData,unsigned long long number,uint32_t base,char zeroExtend,char isSigned,char capitals,uint32_t padToLength, char* bail){
+
+ char buf[64];
+ uint32_t idx = sizeof(buf) - 1;
+ uint32_t chr, i;
+ char neg = 0;
+ uint32_t numPrinted = 0;
+
+ *bail = 0;
+
+ if(padToLength > 63) padToLength = 63;
+
+ buf[idx--] = 0; //terminate
+
+ if(isSigned){
+
+ if(number & 0x8000000000000000ULL){
+
+ neg = 1;
+ number = -number;
+ }
+ }
+
+ do{
+ chr = number % base;
+ number = number / base;
+
+ buf[idx--] = (chr >= 10)?(chr + (capitals ? 'A' : 'a') - 10):(chr + '0');
+
+ numPrinted++;
+
+ }while(number);
+
+ if(neg){
+
+ buf[idx--] = '-';
+ numPrinted++;
+ }
+
+ if(padToLength > numPrinted){
+
+ padToLength -= numPrinted;
+ }
+ else{
+
+ padToLength = 0;
+ }
+
+ while(padToLength--){
+
+ buf[idx--] = zeroExtend?'0':' ';
+ numPrinted++;
+ }
+
+ idx++;
+
+
+ for(i = 0; i < numPrinted; i++){
+
+ if(!putc_(userData,(buf + idx)[i])){
+
+ *bail = 1;
+ break;
+ }
+ }
+
+
+ return numPrinted;
+}
+
+static uint32_t StrVPrintf_StrLen_withMax(const char* s,uint32_t max){
+
+ uint32_t len = 0;
+
+ while((*s++) && (len < max)) len++;
+
+ return len;
+}
+
+static uint32_t StrVPrintf_StrLen(const char* s){
+
+ uint32_t len = 0;
+
+ while(*s++) len++;
+
+ return len;
+}
+
+static inline char prvGetChar(const char** fmtP){
+
+ char ret;
+ const char* fmt;
+
+ fmt = *fmtP;
+ ret = *fmt++;
+ *fmtP = fmt;
+
+ return ret;
+}
+
+static unsigned long long SignExt32to64(uint32_t v_){
+
+ unsigned long long v = v_;
+
+ if(v & 0x80000000) v |= 0xFFFFFFFF00000000ULL;
+
+ return v;
+}
+
+static uint32_t StrVPrintfEx(StrPrintfExCbk putc_f,void* userData, const char* fmtStr,va_list vl){
+
+ char c;
+ uint32_t i, numPrinted = 0;
+ unsigned long long val64;
+
+#define putc_(_ud,_c) if(!putc_f(_ud,_c)) goto out;
+
+ while((c = prvGetChar(&fmtStr)) != 0){
+
+ if(c == '\n'){
+
+ putc_(userData,c);
+ numPrinted++;
+ }
+ else if(c == '%'){
+
+ char zeroExtend = 0, useLong = 0, bail = 0, useVeryLong = 0;
+ uint32_t padToLength = 0,len;
+ const char* str;
+ int capitals = 0;
+
+more_fmt:
+
+ c = prvGetChar(&fmtStr);
+
+ switch(c){
+
+ case '%':
+
+ putc_(userData,c);
+ numPrinted++;
+ break;
+
+ case 'c':
+
+ putc_(userData,va_arg(vl,unsigned int));
+ numPrinted++;
+ break;
+
+ case 's':
+
+ str = va_arg(vl,char*);
+ if(!str) str = "(null)";
+ if(padToLength){
+
+ len = StrVPrintf_StrLen_withMax(str,padToLength);
+ }
+ else{
+
+ padToLength = len = StrVPrintf_StrLen(str);
+ }
+ if(len > padToLength) len = padToLength;
+ else{
+
+ for(i=len;i<padToLength;i++) putc_(userData,L' ');
+ }
+ numPrinted += padToLength;
+ for(i = 0; i < len; i++){
+
+ putc_(userData,*str++);
+ }
+ numPrinted += len;
+ break;
+
+ case '0':
+
+ if(!zeroExtend && !padToLength){
+
+ zeroExtend = 1;
+ goto more_fmt;
+ }
+
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+
+ padToLength = (padToLength * 10) + c - '0';
+ goto more_fmt;
+
+ case 'u':
+
+ val64 = useVeryLong ? va_arg(vl,unsigned long long) : va_arg(vl,uint32_t);
+ numPrinted += StrPrvPrintfEx_number(putc_f, userData,val64,10,zeroExtend,0,0,padToLength, &bail);
+ if(bail) goto out;
+ break;
+
+ case 'd':
+
+ val64 = useVeryLong ? va_arg(vl,unsigned long long) : SignExt32to64(va_arg(vl,uint32_t));
+ numPrinted += StrPrvPrintfEx_number(putc_f, userData,val64,10,zeroExtend,1,0,padToLength, &bail);
+ if(bail) goto out;
+ break;
+
+ case 'X':
+
+ capitals = 1;
+
+ case 'x':
+
+ val64 = useVeryLong ? va_arg(vl,unsigned long long) : va_arg(vl,uint32_t);
+ numPrinted += StrPrvPrintfEx_number(putc_f, userData,val64,16,zeroExtend,0,capitals,padToLength, &bail);
+ if(bail) goto out;
+ break;
+
+ case 'p':
+
+ putc_(userData,'0');
+ numPrinted++;
+ putc_(userData,'x');
+ numPrinted++;
+
+ val64 = va_arg(vl,unsigned long);
+ numPrinted += StrPrvPrintfEx_number(putc_f, userData,val64,16,0,0,0,0, &bail);
+ if(bail) goto out;
+ break;
+
+ case 'b':
+
+ val64 = useVeryLong ? va_arg(vl,unsigned long long) : va_arg(vl,uint32_t);
+ numPrinted += StrPrvPrintfEx_number(putc_f, userData,val64,2,zeroExtend,0,0,padToLength, &bail);
+ if(bail) goto out;
+ break;
+
+ case 'l':
+ if(useLong) useVeryLong = 1;
+ useLong = 1;
+ goto more_fmt;
+
+ default:
+
+ putc_(userData,c);
+ numPrinted++;
+ break;
+ }
+ }
+ else{
+
+ putc_(userData,c);
+ numPrinted++;
+ }
+ }
+
+ putc_(userData,0); //terminate it
+ numPrinted++;
+
+out:
+
+ return numPrinted;
+}
+
+
+static char StrPrintF_putc(void* ud, char c){
+
+ PrintData* pd = ud;
+ char** dst = pd->dest;
+ char ret = 1;
+
+ if(pd->maxChars-- == 1){
+
+ c = 0;
+ ret = 0;
+ }
+
+ if(pd->furtherCallback){
+
+ ret = ((printf_write_c)pd->furtherCallback)(pd->furtherUserData, c);
+ }
+ else{
+ *(*dst)++ = c;
+ }
+
+
+ return ret;
+}
+
+uint32_t _sprintf(char* dst, const char* fmtStr, ...){
+
+ uint32_t ret;
+ va_list vl;
+ PrintData pd;
+
+ pd.dest = &dst;
+ pd.maxChars = 0xFFFFFFFF;
+ pd.furtherCallback = NULL;
+
+ va_start(vl,fmtStr);
+
+ ret = StrVPrintfEx(&StrPrintF_putc, &pd, fmtStr,vl);
+
+ va_end(vl);
+
+ return ret;
+}
+
+uint32_t _snprintf(char* dst, uint32_t maxChars, const char* fmtStr, ...){
+
+ uint32_t ret;
+ va_list vl;
+ PrintData pd;
+
+ pd.dest = &dst;
+ pd.maxChars = maxChars;
+ pd.furtherCallback = NULL;
+
+ va_start(vl,fmtStr);
+
+ ret = StrVPrintfEx(&StrPrintF_putc, &pd, fmtStr,vl);
+
+ va_end(vl);
+
+ return ret;
+}
+
+uint32_t _csprintf(printf_write_c writeF, void* writeD, const char* fmtStr, ...){
+
+ uint32_t ret;
+ va_list vl;
+ PrintData pd;
+
+ pd.dest = NULL;
+ pd.maxChars = 0xFFFFFFFF;
+ pd.furtherCallback = writeF;
+ pd.furtherUserData = writeD;
+
+ va_start(vl,fmtStr);
+
+ ret = StrVPrintfEx(&StrPrintF_putc, &pd, fmtStr,vl);
+
+ va_end(vl);
+
+ return ret;
+}
+
+uint32_t _csnprintf(printf_write_c writeF, void* writeD, uint32_t maxChars, const char* fmtStr, ...){
+
+ uint32_t ret;
+ va_list vl;
+ PrintData pd;
+
+ pd.dest = NULL;
+ pd.maxChars = maxChars;
+ pd.furtherCallback = writeF;
+ pd.furtherUserData = writeD;
+
+ va_start(vl,fmtStr);
+
+ ret = StrVPrintfEx(&StrPrintF_putc, &pd, fmtStr,vl);
+
+ va_end(vl);
+
+ return ret;
+}
+
+uint32_t _vsprintf(char* dst, const char* fmtStr, va_list vl){
+
+ uint32_t ret;
+ PrintData pd;
+
+ pd.dest = &dst;
+ pd.maxChars = 0xFFFFFFFF;
+ pd.furtherCallback = NULL;
+
+ ret = StrVPrintfEx(&StrPrintF_putc, &pd, fmtStr,vl);
+
+ return ret;
+}
+
+uint32_t _vsnprintf(char* dst, uint32_t maxChars, const char* fmtStr, va_list vl){
+
+ uint32_t ret;
+ PrintData pd;
+
+ pd.dest = &dst;
+ pd.maxChars = maxChars;
+ pd.furtherCallback = NULL;
+
+ ret = StrVPrintfEx(&StrPrintF_putc, &pd, fmtStr,vl);
+
+ return ret;
+}
+
+uint32_t _cvsprintf(printf_write_c writeF, void* writeD, const char* fmtStr, va_list vl){
+
+ uint32_t ret;
+ PrintData pd;
+
+ pd.dest = NULL;
+ pd.maxChars = 0xFFFFFFFF;
+ pd.furtherCallback = writeF;
+ pd.furtherUserData = writeD;
+
+ ret = StrVPrintfEx(&StrPrintF_putc, &pd, fmtStr,vl);
+
+ return ret;
+}
+
+uint32_t _cvsnprintf(printf_write_c writeF, void* writeD, uint32_t maxChars, const char* fmtStr, va_list vl){
+
+ uint32_t ret;
+ PrintData pd;
+
+ pd.dest = NULL;
+ pd.maxChars = maxChars;
+ pd.furtherCallback = writeF;
+ pd.furtherUserData = writeD;
+
+ ret = StrVPrintfEx(&StrPrintF_putc, &pd, fmtStr,vl);
+
+ return ret;
+}
diff --git a/MakefileBasedBuild/app/printf.h b/MakefileBasedBuild/app/printf.h
new file mode 100644
index 0000000..eeb532d
--- /dev/null
+++ b/MakefileBasedBuild/app/printf.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifdef ADK_INTERNAL
+#ifndef _PRINTF_H_
+#define _PRINTF_H_
+
+#include <stdarg.h>
+
+typedef char (*printf_write_c)(void* userData, char c); //return 0 to stop printing, else 1
+
+
+uint32_t _sprintf(char* dst, const char* fmtStr, ...);
+uint32_t _snprintf(char* dst, uint32_t maxChars, const char* fmtStr, ...);
+uint32_t _csprintf(printf_write_c writeF, void* writeD, const char* fmtStr, ...);
+uint32_t _csnprintf(printf_write_c writeF, void* writeD, uint32_t maxChars, const char* fmtStr, ...);
+uint32_t _vsprintf(char* dst, const char* fmtStr, va_list vl);
+uint32_t _vsnprintf(char* dst, uint32_t maxChars, const char* fmtStr, va_list vl);
+uint32_t _cvsprintf(printf_write_c writeF, void* writeD, const char* fmtStr, va_list vl);
+uint32_t _cvsnprintf(printf_write_c writeF, void* writeD, uint32_t maxChars, const char* fmtStr, va_list vl);
+
+#endif
+#endif
+
diff --git a/MakefileBasedBuild/app/sgBuf.c b/MakefileBasedBuild/app/sgBuf.c
new file mode 100644
index 0000000..c030ba8
--- /dev/null
+++ b/MakefileBasedBuild/app/sgBuf.c
@@ -0,0 +1,183 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#define ADK_INTERNAL
+#include "fwk.h"
+#include "sgBuf.h"
+#include <string.h>
+
+
+#define INFO_MASK_NEEDS_FREE 0x80000000
+#define INFO_MASK_SIZE 0x00FFFFFF
+
+
+void sg_init(sg_buf* buf){
+
+ buf->first = NULL;
+ buf->last = NULL;
+ buf->totalLen = 0;
+}
+
+sg_buf* sg_alloc(void){
+
+ sg_buf* b = malloc(sizeof(sg_buf));
+ if(b) sg_init(b);
+
+ return b;
+}
+
+void sg_free(sg_buf* buf){
+
+ sg_buf_node* n = buf->first;
+ sg_buf_node* t;
+
+ while(n){
+
+ if(n->info & INFO_MASK_NEEDS_FREE) free(n->data);
+
+ t = n->next;
+ free(n);
+ n = t;
+ }
+}
+
+uint32_t sg_length(const sg_buf* buf){
+
+ return buf->totalLen;
+}
+
+static sg_buf_node* sg_alloc_node(const uint8_t* data, uint32_t len, uint8_t flags){
+
+ sg_buf_node* n;
+ uint32_t sz;
+
+ if(len &~ INFO_MASK_SIZE) return NULL; //too big
+
+ sz = sizeof(sg_buf_node);
+ if(flags & SG_FLAG_MAKE_A_COPY) sz += len;
+
+ n = malloc(sz);
+
+ if(n){
+
+ if(flags & SG_FLAG_MAKE_A_COPY){
+
+ uint8_t* ptr = (uint8_t*)(n + 1);
+ memcpy(ptr, data, len);
+ data = ptr;
+ flags &=~ SG_FLAG_NEEDS_FREEING; //definitely not
+ }
+
+ n->info = len | ((flags & SG_FLAG_NEEDS_FREEING) ? INFO_MASK_NEEDS_FREE : 0);
+ n->data = data;
+ }
+ return n;
+}
+
+char sg_add_front(sg_buf* buf, const uint8_t* data, uint32_t len, uint8_t flags){
+
+ sg_buf_node* n = sg_alloc_node(data, len, flags);
+
+ if(!n) return 0;
+
+ n->next = buf->first;
+ buf->first = n;
+ if(!buf->last) buf->last = n;
+
+ buf->totalLen += len;
+
+ return 1;
+}
+
+char sg_add_back(sg_buf* buf, const uint8_t* data, uint32_t len, uint8_t flags){
+
+ sg_buf_node* n = sg_alloc_node(data, len, flags);
+
+ if(!n) return 0;
+
+ n->next = NULL;
+ if(buf->last) buf->last->next = n;
+ else buf->first = n;
+ buf->last = n;
+
+ buf->totalLen += len;
+
+ return 1;
+}
+
+void sg_concat_back(sg_buf* buf, sg_buf* second){
+
+ buf->totalLen += second->totalLen;
+
+ if(buf->last) buf->last->next = second->first;
+ else buf->first = second->first;
+ buf->last = second->last;
+
+ sg_init(second);
+}
+
+void sg_concat_front(sg_buf* buf, sg_buf* second){
+
+ sg_concat_back(second, buf);
+ *buf = *second;
+
+ sg_init(buf);
+}
+
+sg_iter sg_iter_start(const sg_buf* buf){
+
+ return (sg_iter)(buf->first);
+}
+
+char sg_iter_next(sg_iter* iterP, const uint8_t** buf, uint32_t* sz){
+
+ sg_buf_node* n = (sg_buf_node*)*iterP;
+
+ if(!n) return 0; //end of line
+
+ if(buf) *buf = n->data;
+ if(sz) *sz = n->info & INFO_MASK_SIZE;
+
+ *iterP = n->next;
+ return 1;
+}
+
+void sg_copyto(const sg_buf* buf, uint8_t* dst){
+
+ sg_buf_node* n = buf->first;
+ uint32_t len;
+
+ while(n){
+
+ len = n->info & INFO_MASK_SIZE;
+
+ memcpy(dst, n->data, len);
+ dst += len;
+
+ n = n->next;
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/MakefileBasedBuild/app/sgBuf.h b/MakefileBasedBuild/app/sgBuf.h
new file mode 100644
index 0000000..4ebb45d
--- /dev/null
+++ b/MakefileBasedBuild/app/sgBuf.h
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifdef ADK_INTERNAL
+#ifndef _SG_BUF_H_
+#define _SG_BUF_H_
+
+
+/*
+ sg_buf is a linked-list based buffer which makes it easy to encapsulate
+ data in places like bluetooth, where each layer needs to add some data
+ to the packet on its way out. This is batter than normal buffers since
+ no data has to be moved and header sizes need nto be known ahead of time.
+*/
+
+typedef struct sg_buf_node{
+
+ struct sg_buf_node* next;
+ uint32_t info;
+ const uint8_t* data;
+
+}sg_buf_node;
+
+typedef struct{
+
+ sg_buf_node* first;
+ sg_buf_node* last;
+ uint32_t totalLen;
+
+}sg_buf;
+
+typedef void* sg_iter;
+
+#define SG_BUF_STATIC_INITIALIZER {NULL, NULL, 0}
+
+#define SG_FLAG_NEEDS_FREEING 1
+#define SG_FLAG_MAKE_A_COPY 2
+
+void sg_init(sg_buf* buf);
+sg_buf* sg_alloc(void);
+void sg_free(sg_buf* buf);
+uint32_t sg_length(const sg_buf* buf);
+char sg_add_front(sg_buf* buf, const uint8_t* data, uint32_t len, uint8_t flags); //0 on fail
+char sg_add_back(sg_buf* buf, const uint8_t* data, uint32_t len, uint8_t flags); //0 on fail
+
+void sg_concat_front(sg_buf* buf, sg_buf* second); //prepend second to buf
+void sg_concat_back(sg_buf* buf, sg_buf* second); //append second to buf
+
+sg_iter sg_iter_start(const sg_buf* buf);
+char sg_iter_next(sg_iter* iterP, const uint8_t** buf, uint32_t* sz);
+
+void sg_copyto(const sg_buf* buf, uint8_t* dst);
+
+#endif
+#endif
diff --git a/MakefileBasedBuild/app/simpleOgg.c b/MakefileBasedBuild/app/simpleOgg.c
new file mode 100644
index 0000000..0bfce3f
--- /dev/null
+++ b/MakefileBasedBuild/app/simpleOgg.c
@@ -0,0 +1,171 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#define ADK_INTERNAL
+#include "fwk.h"
+#include "simpleOgg.h"
+#include "Audio.h"
+#include "coop.h"
+#include "f_ff.h"
+#include "v_ivorbiscodec.h"
+#include "v_ivorbisfile.h"
+
+static size_t oggRead2(void *ptr, size_t size, size_t nmemb, void *data){
+
+ FIL *f = data;
+ FRESULT r;
+ UINT read = 0;
+
+ read = size * nmemb;
+ if(read + f->fptr > f->fsize) read = f->fsize - f->fptr;
+ if(!read) return 0;
+
+ r = f_read(f, ptr, size * nmemb, &read);
+
+ if(r) return 0;
+ return read / size;
+}
+
+static int oggSeek2(void *data, ogg_int64_t offset, int whence){
+
+ return -1;
+}
+
+static int oggClose2(void *data){
+
+ FIL *f = data;
+
+ f_close(f);
+ return 0;
+}
+
+static long oggTell2(void *data){
+
+ FIL *f = data;
+
+ return f->fptr;
+}
+
+static char _playOgg(const char *name, char *doAbort){
+
+ const static ov_callbacks cbks ={ oggRead2, oggSeek2, oggClose2, oggTell2 };
+ const uint32_t bufSz = 2048;
+ const uint32_t numBufs = 3;
+ uint16_t** bufs;
+ uint32_t bufIdx = 0;
+ int vorbis_state = 0;
+ OggVorbis_File F;
+ long i, t;
+ char ret = SIMPLE_OGG_MEM_ERR;
+
+ FRESULT r;
+ FIL f;
+
+ ret = SIMPLE_OGG_OK;
+
+ r = f_open(&f, name, FA_READ);
+ if(r) return SIMPLE_OGG_OPEN_ERR;
+
+ i = ov_open_callbacks(&f, &F, NULL, 0, cbks);
+ if(i != 0) return SIMPLE_OFF_OGG_OPEN_ERR;
+
+ bufs = malloc(sizeof(uint16_t*[numBufs]));
+ if(!bufs) goto errout;
+
+ for(i = 0; i < numBufs; i++) bufs[i] = NULL;
+ for(i = 0; i < numBufs; i++) if(!(bufs[i] = malloc(sizeof(uint16_t[bufSz])))) break;
+ if(i != numBufs) goto errout;
+
+ vorbis_info *info = ov_info(&F, 0);
+ //dbgPrintf("vorbis info: version %d channels %d rate %d\n", info->version, info->channels, info->rate);
+
+ audioOn(AUDIO_ALARM, ov_info(&F, 0)->rate);
+ while(!(*doAbort)){
+ uint8_t volume = getVolume();
+
+ i = ov_read(&F, bufs[bufIdx], bufSz * 2, &vorbis_state);
+ if(i == 0){
+ break;
+ } else if(i == OV_HOLE || i == OV_EBADLINK){
+ ret = SIMPLE_OGG_FILE_ERR;
+ break;
+ } else {
+ i >>= 1;
+ if (info->channels == 1) {
+ for (t = 0; t < i; t++){
+ bufs[bufIdx][t] =
+ ((signed long)(((((int16_t) bufs[bufIdx][t]) >> 4) * (signed long)((unsigned long)volume) + 1)) >> 8) + 2048;
+ }
+ } else {
+ // 2 channels, pick the left channel
+ i >>= 1;
+ for (t = 0; t < i; t++){
+ bufs[bufIdx][t] =
+ ((signed long)(((((int16_t) bufs[bufIdx][t*2]) >> 4) * (signed long)((unsigned long)volume) + 1)) >> 8) + 2048;
+ }
+ }
+ }
+ audioAddBuffer(AUDIO_ALARM, bufs[bufIdx], i);
+ if(++bufIdx == numBufs) bufIdx = 0;
+ }
+ bufs[bufIdx][0] = 2048;
+ audioAddBuffer(AUDIO_ALARM, bufs[bufIdx], 1);
+ ov_clear(&F);
+ f_close(&f);
+ audioOff(AUDIO_ALARM);
+
+errout:
+ for(i = 0; i < numBufs; i++) if(bufs[i]) free(bufs[i]);
+ free(bufs);
+ return ret;
+}
+
+char playOgg(const char *name){
+ char doAbort = 0;
+ return _playOgg(name, &doAbort);
+}
+
+struct oggWorkerArgs {
+ const char *name;
+ char *complete;
+ char *doAbort;
+};
+
+static void oggBackgroundWorker(void *_arg)
+{
+ struct oggWorkerArgs *args = _arg;
+
+ char ret = _playOgg(args->name, args->doAbort);
+
+ *args->complete = 1;
+
+ free(args);
+}
+
+char playOggBackground(const char *name, char *complete, char *doAbort){
+
+ struct oggWorkerArgs *args = malloc(sizeof(struct oggWorkerArgs));
+ if (!args)
+ return -1;
+
+ args->name = name;
+ args->complete = complete;
+ args->doAbort = doAbort;
+ coopSpawn(&oggBackgroundWorker, args, 12*1024);
+
+ return 0;
+
+}
+
diff --git a/MakefileBasedBuild/app/simpleOgg.h b/MakefileBasedBuild/app/simpleOgg.h
new file mode 100644
index 0000000..ebd5975
--- /dev/null
+++ b/MakefileBasedBuild/app/simpleOgg.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifdef ADK_INTERNAL
+#ifndef _SIMPLE_OGG_H_
+#define _SIMPLE_OGG_H_
+
+
+#define SIMPLE_OGG_OK 0
+#define SIMPLE_OGG_OPEN_ERR 1
+#define SIMPLE_OFF_OGG_OPEN_ERR 2
+#define SIMPLE_OGG_FILE_ERR 3
+#define SIMPLE_OGG_MEM_ERR 4
+
+char playOgg(const char* name);
+char playOggBackground(const char* name, char *complete, char *abort);
+
+#endif
+#endif
+
diff --git a/MakefileBasedBuild/app/usb_drv.c b/MakefileBasedBuild/app/usb_drv.c
new file mode 100644
index 0000000..2ca0399
--- /dev/null
+++ b/MakefileBasedBuild/app/usb_drv.c
@@ -0,0 +1,593 @@
+/* This source file is part of the AVR Software Framework 2.0.0 release */
+
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief Low-level driver for AVR32 USBB.
+ *
+ * This file contains the USBB low-level driver routines.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USBB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+//_____ I N C L U D E S ____________________________________________________
+
+#define ADK_INTERNAL
+#include "usb_drv.h"
+#include "dbg.h"
+#include "fwk.h"
+
+
+//_____ M A C R O S ________________________________________________________
+#define min(x,y) ((x)>(y)?(y):(x))
+
+
+//_____ D E C L A R A T I O N S ____________________________________________
+
+#if USB_DEVICE_FEATURE == DISABLED && USB_HOST_FEATURE == DISABLED
+ #error At least one of USB_DEVICE_FEATURE and USB_HOST_FEATURE must be enabled
+#endif
+
+void Uotghs_trace(void)
+{
+ TRACE_OTG("CTRL: 0x%X\n\r",UOTGHS->UOTGHS_CTRL);
+ TRACE_OTG("SR: 0x%X\n\r",UOTGHS->UOTGHS_SR);
+ TRACE_OTG("FSM: 0x%X\n\r",UOTGHS->UOTGHS_FSM);
+ TRACE_OTG("DEVCTRL: 0x%X\n\r",UOTGHS->UOTGHS_DEVCTRL);
+ TRACE_OTG("DEVISR: 0x%X\n\r",UOTGHS->UOTGHS_DEVISR);
+ TRACE_OTG("DEVIMR: 0x%X\n\r",UOTGHS->UOTGHS_DEVIMR);
+ TRACE_OTG("DEVEPTCFG0: 0x%X\n\r",UOTGHS->UOTGHS_DEVEPTCFG[0]);
+ TRACE_OTG("DEVEPTCFG1: 0x%X\n\r",UOTGHS->UOTGHS_DEVEPTCFG[1]);
+ TRACE_OTG("DEVEPTCFG2: 0x%X\n\r",UOTGHS->UOTGHS_DEVEPTCFG[2]);
+ TRACE_OTG("DEVEPTISR: 0x%X\n\r",UOTGHS->UOTGHS_DEVEPTISR[0]);
+ TRACE_OTG("HSTCTRL: 0x%X\n\r",UOTGHS->UOTGHS_HSTCTRL);
+ TRACE_OTG("HSTISR: 0x%X\n\r",UOTGHS->UOTGHS_HSTISR);
+ TRACE_OTG("HSTIMR: 0x%X\n\r",UOTGHS->UOTGHS_HSTIMR);
+ TRACE_OTG("HSTPIP: 0x%X\n\r",UOTGHS->UOTGHS_HSTPIP);
+ TRACE_OTG("HSTFNUM: 0x%X\n\r",UOTGHS->UOTGHS_HSTFNUM);
+ TRACE_OTG("HSTADDR1: 0x%X\n\r",UOTGHS->UOTGHS_HSTADDR1);
+ TRACE_OTG("HSTADDR2: 0x%X\n\r",UOTGHS->UOTGHS_HSTADDR2);
+ TRACE_OTG("HSTADDR3: 0x%X\n\r",UOTGHS->UOTGHS_HSTADDR3);
+ TRACE_OTG("HSTPIPCFG: 0x%X\n\r",UOTGHS->UOTGHS_HSTPIPCFG[0]);
+ TRACE_OTG("HSTPIPCFG1: 0x%X\n\r",UOTGHS->UOTGHS_HSTPIPCFG[1]);
+ TRACE_OTG("HSTPIPCFG2: 0x%X\n\r",UOTGHS->UOTGHS_HSTPIPCFG[2]);
+ TRACE_OTG("HSTPIPINRQ: 0x%X\n\r",UOTGHS->UOTGHS_HSTPIPINRQ[0]);
+ TRACE_OTG("HSTPIPERR0: 0x%X\n\r",UOTGHS->UOTGHS_HSTPIPERR[0]);
+ TRACE_OTG("HSTPIPISR0: 0x%X\n\r",UOTGHS->UOTGHS_HSTPIPISR[0]);
+ TRACE_OTG("HSTPIPIMR0: 0x%X\n\r",UOTGHS->UOTGHS_HSTPIPIMR[0]);
+
+ /* Test ID */
+ if( UOTGHS->UOTGHS_SR & UOTGHS_SR_ID)
+ {
+ TRACE_OTG("ID=1: PERIPHERAL\n\r");
+ }
+ else
+ {
+ TRACE_OTG("ID=0: HOST\n\r");
+ }
+
+ /* Test VBUS */
+ if( 0 != (UOTGHS->UOTGHS_SR & UOTGHS_SR_VBUS) ) {
+ TRACE_OTG("VBUS = 1\n\r");
+ }
+ else {
+ TRACE_OTG("VBUS = 0\n\r");
+ }
+
+ /* Test SPEED */
+ TRACE_OTG("Speed = 0x%X\n\r", UOTGHS->UOTGHS_SR & UOTGHS_SR_SPEED_Msk);
+
+ /* FSM State:
+ * 0 A_IDLESTATE This is the start state for A-devices (when the ID pin is 0)
+ * 1 A_WAIT_VRISE In this state, the A-device waits for the voltage on VBus to rise above the A-device VBus
+ * Valid threshold (4.4 V).
+ * 2 A_WAIT_BCON In this state, the A-device waits for the B-device to signal a connection.
+ * 3 A_HOST In this state, the A-device that operates in Host mode is operational.
+ * 4 A_SUSPEND The A-device operating as a host is in the suspend mode.
+ * 5 A_PERIPHERAL The A-device operates as a peripheral.
+ * 6 A_WAIT_VFALL In this state, the A-device waits for the voltage on VBus to drop below the A-device
+ * Session Valid threshold (1.4 V).
+ * 7 A_VBUS_ERR In this state, the A-device waits for recovery of the over-current condition that caused it
+ * to enter this state.
+ * 8 A_WAIT_DISCHARGE In this state, the A-device waits for the data USB line to discharge (100 us).
+ * 9 B_IDLE This is the start state for B-device (when the ID pin is 1).
+ * 10 B_PERIPHERAL In this state, the B-device acts as the peripheral.
+ * 11 B_WAIT_BEGIN_HNP In this state, the B-device is in suspend mode and waits until 3 ms before initiating the
+ * HNP protocol if requested.
+ * 12 B_WAIT_DISCHARGE In this state, the B-device waits for the data USB line to discharge (100 us) before
+ * becoming Host.
+ * 13 B_WAIT_ACON In this state, the B-device waits for the A-device to signal a connect before becoming B-
+ * Host.
+ * 14 B_HOST In this state, the B-device acts as the Host.
+ * 15 B_SRP_INIT In this state, the B-device attempts to start a session using the SRP protocol. */
+ TRACE_OTG("FSM = 0x%X\n\r", UOTGHS->UOTGHS_FSM);
+}
+
+//! Pointers to the FIFO data registers of pipes/endpoints
+//! Use aggregated pointers to have several alignments available for a same address
+UnionVPtr pep_fifo[MAX_PEP_NB];
+
+//! ---------------------------------------------------------
+//! ------------------ HOST ---------------------------------
+//! ---------------------------------------------------------
+
+#if USB_HOST_FEATURE == ENABLED
+
+void Host_configure_address( uint8_t pipe, uint8_t addr)
+{
+ if( pipe == 0 ) {
+ UOTGHS->UOTGHS_HSTADDR1 &= ~UOTGHS_HSTADDR1_HSTADDRP0_Msk;
+ UOTGHS->UOTGHS_HSTADDR1 |= UOTGHS_HSTADDR1_HSTADDRP0(addr);
+ }
+ else if( pipe == 1 ) {
+ UOTGHS->UOTGHS_HSTADDR1 &= ~UOTGHS_HSTADDR1_HSTADDRP1_Msk;
+ UOTGHS->UOTGHS_HSTADDR1 |= UOTGHS_HSTADDR1_HSTADDRP1(addr);
+ }
+ else if( pipe == 2 ) {
+ UOTGHS->UOTGHS_HSTADDR1 &= ~UOTGHS_HSTADDR1_HSTADDRP2_Msk;
+ UOTGHS->UOTGHS_HSTADDR1 |= UOTGHS_HSTADDR1_HSTADDRP2(addr);
+ }
+ else if( pipe == 3 ) {
+ UOTGHS->UOTGHS_HSTADDR1 &= ~UOTGHS_HSTADDR1_HSTADDRP3_Msk;
+ UOTGHS->UOTGHS_HSTADDR1 |= UOTGHS_HSTADDR1_HSTADDRP3(addr);
+ }
+ else if( pipe == 4 ) {
+ UOTGHS->UOTGHS_HSTADDR2 &= ~(0x7F<<0);
+ UOTGHS->UOTGHS_HSTADDR2 |= addr;
+ }
+ else if( pipe == 5 ) {
+ UOTGHS->UOTGHS_HSTADDR2 &= ~(0x7F<<8);
+ UOTGHS->UOTGHS_HSTADDR2 |= (addr<<8);
+ }
+ else if( pipe == 6 ) {
+ UOTGHS->UOTGHS_HSTADDR2 &= ~(0x7F<<16);
+ UOTGHS->UOTGHS_HSTADDR2 |= (addr<<16);
+ }
+ else if( pipe == 7 ) {
+ UOTGHS->UOTGHS_HSTADDR2 &= ~(0x7F<<24);
+ UOTGHS->UOTGHS_HSTADDR2 |= (addr<<24);
+ }
+ else if( pipe == 8 ) {
+ UOTGHS->UOTGHS_HSTADDR3 &= ~UOTGHS_HSTADDR3_HSTADDRP8_Msk;
+ UOTGHS->UOTGHS_HSTADDR3 |= UOTGHS_HSTADDR3_HSTADDRP8(addr);
+ }
+ else if( pipe == 9 ) {
+ UOTGHS->UOTGHS_HSTADDR3 &= ~(0x7F<<8);
+ UOTGHS->UOTGHS_HSTADDR3 |= (addr<<8);
+ }
+}
+
+
+
+//! host_disable_all_pipes
+//!
+//! This function disables all pipes for the host controller.
+//! Useful to execute upon disconnection.
+//!
+//! @return Void
+//!
+void host_disable_all_pipes(void)
+{
+#if USB_HOST_PIPE_INTERRUPT_TRANSFER == ENABLE
+ Bool sav_glob_int_en;
+#endif
+ U8 p;
+
+#if USB_HOST_PIPE_INTERRUPT_TRANSFER == ENABLE
+ // Disable global interrupts
+ if ((sav_glob_int_en = Is_global_interrupt_enabled())) Disable_global_interrupt();
+#endif
+ for (p = 0; p < MAX_PEP_NB; p++)
+ { // Disable the pipe <p> (disable interrupt, free memory, reset pipe, ...)
+ Host_disable_pipe_interrupt(p);
+ Host_reset_pipe(p);
+ Host_unallocate_memory(p);
+ Host_disable_pipe(p);
+ }
+#if USB_HOST_PIPE_INTERRUPT_TRANSFER == ENABLE
+ (void)Is_host_pipe_enabled(MAX_PEP_NB - 1);
+ // Restore the global interrupts to the initial state
+ if (sav_glob_int_en) Enable_global_interrupt();
+#endif
+}
+
+//! host_set_p_txpacket
+//!
+//! This function fills the selected pipe FIFO with a constant byte, using
+//! as few accesses as possible.
+//!
+//! @param p Number of the addressed pipe
+//! @param txbyte Byte to fill the pipe with
+//! @param data_length Number of bytes to write
+//!
+//! @return Number of non-written bytes
+//!
+//! @note The selected pipe FIFO may be filled in several steps by calling
+//! host_set_p_txpacket several times.
+//!
+//! @warning Invoke Host_reset_pipe_fifo_access before this function when at
+//! FIFO beginning whether or not the FIFO is to be filled in several steps.
+//!
+//! @warning Do not mix calls to this function with calls to indexed macros.
+//!
+U32 host_set_p_txpacket(U8 p, U8 txbyte, U32 data_length)
+{
+ // Use aggregated pointers to have several alignments available for a same address
+ UnionVPtr p_fifo_cur;
+#if (!defined __OPTIMIZE_SIZE__) || !__OPTIMIZE_SIZE__ // Auto-generated when GCC's -Os command option is used
+ StructCVPtr p_fifo_end;
+ Union64 txval;
+#else
+ UnionCVPtr p_fifo_end;
+ union
+ {
+ U8 u8[1];
+ } txval;
+#endif // !__OPTIMIZE_SIZE__
+
+ // Initialize pointers for write loops and limit the number of bytes to write
+ p_fifo_cur.u8ptr = pep_fifo[p].u8ptr;
+ p_fifo_end.u8ptr = p_fifo_cur.u8ptr +
+ min(data_length, Host_get_pipe_size(p) - Host_byte_count(p));
+#if (!defined __OPTIMIZE_SIZE__) || !__OPTIMIZE_SIZE__ // Auto-generated when GCC's -Os command option is used
+ p_fifo_end.u16ptr = (U16 *)Align_down((U32)p_fifo_end.u8ptr, sizeof(U16));
+ p_fifo_end.u32ptr = (U32 *)Align_down((U32)p_fifo_end.u16ptr, sizeof(U32));
+ p_fifo_end.u64ptr = (U64 *)Align_down((U32)p_fifo_end.u32ptr, sizeof(U64));
+#endif // !__OPTIMIZE_SIZE__
+ txval.u8[0] = txbyte;
+#if (!defined __OPTIMIZE_SIZE__) || !__OPTIMIZE_SIZE__ // Auto-generated when GCC's -Os command option is used
+ txval.u8[1] = txval.u8[0];
+ txval.u16[1] = txval.u16[0];
+ txval.u32[1] = txval.u32[0];
+
+ // If pointer to FIFO data register is not 16-bit aligned
+ if (!Test_align((U32)p_fifo_cur.u8ptr, sizeof(U16)))
+ {
+ // Write 8-bit data to reach 16-bit alignment
+ if (p_fifo_cur.u8ptr < p_fifo_end.u8ptr)
+ {
+ *p_fifo_cur.u8ptr++ = txval.u8[0];
+ }
+ }
+
+ // If pointer to FIFO data register is not 32-bit aligned
+ if (!Test_align((U32)p_fifo_cur.u16ptr, sizeof(U32)))
+ {
+ // Write 16-bit data to reach 32-bit alignment
+ if (p_fifo_cur.u16ptr < p_fifo_end.u16ptr)
+ {
+ *p_fifo_cur.u16ptr++ = txval.u16[0];
+ }
+ }
+
+ // If pointer to FIFO data register is not 64-bit aligned
+ if (!Test_align((U32)p_fifo_cur.u32ptr, sizeof(U64)))
+ {
+ // Write 32-bit data to reach 64-bit alignment
+ if (p_fifo_cur.u32ptr < p_fifo_end.u32ptr)
+ {
+ *p_fifo_cur.u32ptr++ = txval.u32[0];
+ }
+ }
+
+ // Write 64-bit-aligned data
+ while (p_fifo_cur.u64ptr < p_fifo_end.u64ptr)
+ {
+ *p_fifo_cur.u64ptr++ = txval.u64;
+ }
+
+ // Write remaining 32-bit data if some
+ if (p_fifo_cur.u32ptr < p_fifo_end.u32ptr)
+ {
+ *p_fifo_cur.u32ptr++ = txval.u32[0];
+ }
+
+ // Write remaining 16-bit data if some
+ if (p_fifo_cur.u16ptr < p_fifo_end.u16ptr)
+ {
+ *p_fifo_cur.u16ptr++ = txval.u16[0];
+ }
+
+ // Write remaining 8-bit data if some
+ if (p_fifo_cur.u8ptr < p_fifo_end.u8ptr)
+ {
+ *p_fifo_cur.u8ptr++ = txval.u8[0];
+ }
+
+#else
+
+ // Write remaining 8-bit data if some
+ while (p_fifo_cur.u8ptr < p_fifo_end.u8ptr)
+ {
+ *p_fifo_cur.u8ptr++ = txval.u8[0];
+ }
+
+#endif // !__OPTIMIZE_SIZE__
+
+ // Compute the number of non-written bytes
+ data_length -= p_fifo_cur.u8ptr - pep_fifo[p].u8ptr;
+
+ // Save current position in FIFO data register
+ pep_fifo[p].u8ptr = p_fifo_cur.u8ptr;
+
+ // Return the number of non-written bytes
+ return data_length;
+}
+
+//! host_write_p_txpacket
+//!
+//! This function writes the buffer pointed to by txbuf to the selected
+//! pipe FIFO, using as few accesses as possible.
+//!
+//! @param p Number of the addressed pipe
+//! @param txbuf Address of buffer to read
+//! @param data_length Number of bytes to write
+//! @param ptxbuf NULL or pointer to the buffer address to update
+//!
+//! @return Number of written bytes
+//!
+//! @note The selected pipe FIFO may be written in several steps by calling
+//! host_write_p_txpacket several times.
+//!
+//! @warning Invoke Host_reset_pipe_fifo_access before this function when at
+//! FIFO beginning whether or not the FIFO is to be written in several steps.
+//!
+//! @warning Do not mix calls to this function with calls to indexed macros.
+//!
+U32 host_write_p_txpacket(U8 p, const void *txbuf, U32 data_length, const void **ptxbuf)
+{
+ // Use aggregated pointers to have several alignments available for a same address
+ UnionVPtr p_fifo;
+ UnionCPtr txbuf_cur;
+#if (!defined __OPTIMIZE_SIZE__) || !__OPTIMIZE_SIZE__ // Auto-generated when GCC's -Os command option is used
+ StructCPtr txbuf_end;
+#else
+ UnionCPtr txbuf_end;
+#endif // !__OPTIMIZE_SIZE__
+
+ // Initialize pointers for copy loops and limit the number of bytes to copy
+ p_fifo.u8ptr = pep_fifo[p].u8ptr;
+ txbuf_cur.u8ptr = txbuf;
+ txbuf_end.u8ptr = txbuf_cur.u8ptr +
+ min(data_length, Host_get_pipe_size(p) - Host_byte_count(p));
+#if (!defined __OPTIMIZE_SIZE__) || !__OPTIMIZE_SIZE__ // Auto-generated when GCC's -Os command option is used
+ txbuf_end.u16ptr = (U16 *)Align_down((U32)txbuf_end.u8ptr, sizeof(U16));
+ txbuf_end.u32ptr = (U32 *)Align_down((U32)txbuf_end.u16ptr, sizeof(U32));
+ txbuf_end.u64ptr = (U64 *)Align_down((U32)txbuf_end.u32ptr, sizeof(U64));
+
+ // If all addresses are aligned the same way with respect to 16-bit boundaries
+ if (Get_align((U32)txbuf_cur.u8ptr, sizeof(U16)) == Get_align((U32)p_fifo.u8ptr, sizeof(U16)))
+ {
+ // If pointer to transmission buffer is not 16-bit aligned
+ if (!Test_align((U32)txbuf_cur.u8ptr, sizeof(U16)))
+ {
+ // Copy 8-bit data to reach 16-bit alignment
+ if (txbuf_cur.u8ptr < txbuf_end.u8ptr)
+ {
+ // 8-bit accesses to FIFO data registers do require pointer post-increment
+ *p_fifo.u8ptr++ = *txbuf_cur.u8ptr++;
+ }
+ }
+
+ // If all addresses are aligned the same way with respect to 32-bit boundaries
+ if (Get_align((U32)txbuf_cur.u16ptr, sizeof(U32)) == Get_align((U32)p_fifo.u16ptr, sizeof(U32)))
+ {
+ // If pointer to transmission buffer is not 32-bit aligned
+ if (!Test_align((U32)txbuf_cur.u16ptr, sizeof(U32)))
+ {
+ // Copy 16-bit data to reach 32-bit alignment
+ if (txbuf_cur.u16ptr < txbuf_end.u16ptr)
+ {
+ // 16-bit accesses to FIFO data registers do require pointer post-increment
+ *p_fifo.u16ptr++ = *txbuf_cur.u16ptr++;
+ }
+ }
+
+ // If pointer to transmission buffer is not 64-bit aligned
+ if (!Test_align((U32)txbuf_cur.u32ptr, sizeof(U64)))
+ {
+ // Copy 32-bit data to reach 64-bit alignment
+ if (txbuf_cur.u32ptr < txbuf_end.u32ptr)
+ {
+ // 32-bit accesses to FIFO data registers do not require pointer post-increment
+ *p_fifo.u32ptr = *txbuf_cur.u32ptr++;
+ }
+ }
+
+ // Copy 64-bit-aligned data
+ while (txbuf_cur.u64ptr < txbuf_end.u64ptr)
+ {
+ // 64-bit accesses to FIFO data registers do not require pointer post-increment
+ *p_fifo.u64ptr = *txbuf_cur.u64ptr++;
+ }
+
+ // Copy 32-bit-aligned data
+ if (txbuf_cur.u32ptr < txbuf_end.u32ptr)
+ {
+ // 32-bit accesses to FIFO data registers do not require pointer post-increment
+ *p_fifo.u32ptr = *txbuf_cur.u32ptr++;
+ }
+ }
+
+ // Copy remaining 16-bit data if some
+ while (txbuf_cur.u16ptr < txbuf_end.u16ptr)
+ {
+ // 16-bit accesses to FIFO data registers do require pointer post-increment
+ *p_fifo.u16ptr++ = *txbuf_cur.u16ptr++;
+ }
+ }
+
+#endif // !__OPTIMIZE_SIZE__
+
+ // Copy remaining 8-bit data if some
+ while (txbuf_cur.u8ptr < txbuf_end.u8ptr)
+ {
+ // 8-bit accesses to FIFO data registers do require pointer post-increment
+ *p_fifo.u8ptr++ = *txbuf_cur.u8ptr++;
+ }
+
+ // Save current position in FIFO data register
+ pep_fifo[p].u8ptr = p_fifo.u8ptr;
+
+ // Return the updated buffer address and the number of non-copied bytes
+ if (ptxbuf) *ptxbuf = txbuf_cur.u8ptr;
+ return txbuf_cur.u8ptr - (U8 *)txbuf;
+}
+
+//! host_read_p_rxpacket
+//!
+//! This function reads the selected pipe FIFO to the buffer pointed to by
+//! rxbuf, using as few accesses as possible.
+//!
+//! @param p Number of the addressed pipe
+//! @param rxbuf Address of buffer to write
+//! @param data_length Number of bytes to read
+//! @param prxbuf NULL or pointer to the buffer address to update
+//!
+//! @return Number of read bytes
+//!
+//! @note The selected pipe FIFO may be read in several steps by calling
+//! host_read_p_rxpacket several times.
+//!
+//! @warning Invoke Host_reset_pipe_fifo_access before this function when at
+//! FIFO beginning whether or not the FIFO is to be read in several steps.
+//!
+//! @warning Do not mix calls to this function with calls to indexed macros.
+//!
+U32 host_read_p_rxpacket(U8 p, void *rxbuf, U32 data_length, void **prxbuf)
+{
+ // Use aggregated pointers to have several alignments available for a same address
+ UnionCVPtr p_fifo;
+ UnionPtr rxbuf_cur;
+#if (!defined __OPTIMIZE_SIZE__) || !__OPTIMIZE_SIZE__ // Auto-generated when GCC's -Os command option is used
+ StructCPtr rxbuf_end;
+#else
+ UnionCPtr rxbuf_end;
+#endif // !__OPTIMIZE_SIZE__
+
+ // Initialize pointers for copy loops and limit the number of bytes to copy
+ p_fifo.u8ptr = pep_fifo[p].u8ptr;
+ rxbuf_cur.u8ptr = rxbuf;
+ rxbuf_end.u8ptr = rxbuf_cur.u8ptr + min(data_length, Host_byte_count(p));
+#if (!defined __OPTIMIZE_SIZE__) || !__OPTIMIZE_SIZE__ // Auto-generated when GCC's -Os command option is used
+ rxbuf_end.u16ptr = (U16 *)Align_down((U32)rxbuf_end.u8ptr, sizeof(U16));
+ rxbuf_end.u32ptr = (U32 *)Align_down((U32)rxbuf_end.u16ptr, sizeof(U32));
+ rxbuf_end.u64ptr = (U64 *)Align_down((U32)rxbuf_end.u32ptr, sizeof(U64));
+
+ // If all addresses are aligned the same way with respect to 16-bit boundaries
+ if (Get_align((U32)rxbuf_cur.u8ptr, sizeof(U16)) == Get_align((U32)p_fifo.u8ptr, sizeof(U16)))
+ {
+ // If pointer to reception buffer is not 16-bit aligned
+ if (!Test_align((U32)rxbuf_cur.u8ptr, sizeof(U16)))
+ {
+ // Copy 8-bit data to reach 16-bit alignment
+ if (rxbuf_cur.u8ptr < rxbuf_end.u8ptr)
+ {
+ // 8-bit accesses to FIFO data registers do require pointer post-increment
+ *rxbuf_cur.u8ptr++ = *p_fifo.u8ptr++;
+ }
+ }
+
+ // If all addresses are aligned the same way with respect to 32-bit boundaries
+ if (Get_align((U32)rxbuf_cur.u16ptr, sizeof(U32)) == Get_align((U32)p_fifo.u16ptr, sizeof(U32)))
+ {
+ // If pointer to reception buffer is not 32-bit aligned
+ if (!Test_align((U32)rxbuf_cur.u16ptr, sizeof(U32)))
+ {
+ // Copy 16-bit data to reach 32-bit alignment
+ if (rxbuf_cur.u16ptr < rxbuf_end.u16ptr)
+ {
+ // 16-bit accesses to FIFO data registers do require pointer post-increment
+ *rxbuf_cur.u16ptr++ = *p_fifo.u16ptr++;
+ }
+ }
+
+ // If pointer to reception buffer is not 64-bit aligned
+ if (!Test_align((U32)rxbuf_cur.u32ptr, sizeof(U64)))
+ {
+ // Copy 32-bit data to reach 64-bit alignment
+ if (rxbuf_cur.u32ptr < rxbuf_end.u32ptr)
+ {
+ // 32-bit accesses to FIFO data registers do not require pointer post-increment
+ *rxbuf_cur.u32ptr++ = *p_fifo.u32ptr;
+ }
+ }
+
+ // Copy 64-bit-aligned data
+ while (rxbuf_cur.u64ptr < rxbuf_end.u64ptr)
+ {
+ // 64-bit accesses to FIFO data registers do not require pointer post-increment
+ *rxbuf_cur.u64ptr++ = *p_fifo.u64ptr;
+ }
+
+ // Copy 32-bit-aligned data
+ if (rxbuf_cur.u32ptr < rxbuf_end.u32ptr)
+ {
+ // 32-bit accesses to FIFO data registers do not require pointer post-increment
+ *rxbuf_cur.u32ptr++ = *p_fifo.u32ptr;
+ }
+ }
+
+ // Copy remaining 16-bit data if some
+ while (rxbuf_cur.u16ptr < rxbuf_end.u16ptr)
+ {
+ // 16-bit accesses to FIFO data registers do require pointer post-increment
+ *rxbuf_cur.u16ptr++ = *p_fifo.u16ptr++;
+ }
+ }
+
+#endif // !__OPTIMIZE_SIZE__
+
+ // Copy remaining 8-bit data if some
+ while (rxbuf_cur.u8ptr < rxbuf_end.u8ptr)
+ {
+ // 8-bit accesses to FIFO data registers do require pointer post-increment
+ *rxbuf_cur.u8ptr++ = *p_fifo.u8ptr++;
+ }
+
+ // Save current position in FIFO data register
+ pep_fifo[p].u8ptr = (volatile U8 *)p_fifo.u8ptr;
+
+ // Return the updated buffer address and the number of copied bytes
+ if (prxbuf) *prxbuf = rxbuf_cur.u8ptr;
+ return (rxbuf_cur.u8ptr - (U8 *)rxbuf);
+}
+
+#endif // USB_HOST_FEATURE == ENABLED
diff --git a/MakefileBasedBuild/app/usb_drv.h b/MakefileBasedBuild/app/usb_drv.h
new file mode 100644
index 0000000..e2513fd
--- /dev/null
+++ b/MakefileBasedBuild/app/usb_drv.h
@@ -0,0 +1,1600 @@
+/* This header file is part of the AVR Software Framework 2.0.0 release */
+
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief Low-level driver for AVR32 USBB.
+ *
+ * This file contains the USBB low-level driver definitions.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USBB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _USB_DRV_H_
+#define _USB_DRV_H_
+
+
+//_____ I N C L U D E S ____________________________________________________
+
+#include "compiler.h"
+//#include "preprocessor.h"
+//#include "usbb.h"
+#include "conf_usb.h"
+#include "chip.h"
+
+//! @defgroup USBB_low_level_driver USBB low-level driver module
+//! USBB low-level driver module
+//! @warning Bit-masks are used instead of bit-fields because PB registers
+//! require 32-bit write accesses while AVR32-GCC 4.0.2 builds 8-bit
+//! accesses even when volatile unsigned int bit-fields are specified.
+//! @{
+
+//_____ M A C R O S ________________________________________________________
+//#ifndef UOTGHS_RAM_ADDR
+//#define UOTGHS_RAM_ADDR (0x20180000u) /**< USB On-The-Go Interface RAM base address */
+//#endif
+
+//! Maximal number of USBB pipes/endpoints.
+//! This is the same value as the one produced by Usb_get_pipe_endpoint_max_nbr().
+//! As it is constant and known for a given target, there is no need to decrease
+//! performance and to complexify program structure by using a value in memory.
+//! The use of MAX_PEP_NB is hence preferred here to the use of a variable
+//! initialized from Usb_get_pipe_endpoint_max_nbr().
+#define MAX_PEP_NB CHIP_USB_NUMENDPOINTS
+
+//! @defgroup USBB_endpoints USBB endpoints
+//! Identifiers of USBB endpoints (USBB device operating mode).
+//! @{
+#define EP_CONTROL 0
+#define EP_0 0
+#define EP_1 1
+#define EP_2 2
+#define EP_3 3
+#define EP_4 4
+#define EP_5 5
+#define EP_6 6
+//! @}
+
+//! @defgroup USBB_pipes USBB pipes
+//! Identifiers of USBB pipes (USBB host operating mode).
+//! @{
+#define P_CONTROL 0
+#define P_0 0
+#define P_1 1
+#define P_2 2
+#define P_3 3
+#define P_4 4
+#define P_5 5
+#define P_6 6
+//! @}
+
+//! @defgroup USBB_types USBB standard types
+//! List of the standard types used in USBB.
+//! @{
+#define IP_NAME_PART_1 1
+#define IP_NAME_PART_2 2
+
+#define DMA_BUFFER_SIZE_16_BITS AVR32_USBB_UFEATURES_DMA_BUFFER_SIZE_16_BITS
+#define DMA_BUFFER_SIZE_24_BITS AVR32_USBB_UFEATURES_DMA_BUFFER_SIZE_24_BITS
+
+#define AWAITVRISE_TIMER AVR32_USBB_USBCON_TIMPAGE_A_WAIT_VRISE
+ #define AWAITVRISE_TMOUT_20_MS AVR32_USBB_USBCON_TIMVALUE_A_WAIT_VRISE_20_MS
+ #define AWAITVRISE_TMOUT_50_MS AVR32_USBB_USBCON_TIMVALUE_A_WAIT_VRISE_50_MS
+ #define AWAITVRISE_TMOUT_70_MS AVR32_USBB_USBCON_TIMVALUE_A_WAIT_VRISE_70_MS
+ #define AWAITVRISE_TMOUT_100_MS AVR32_USBB_USBCON_TIMVALUE_A_WAIT_VRISE_100_MS
+#define VBBUSPULSING_TIMER AVR32_USBB_USBCON_TIMPAGE_VB_BUS_PULSING
+ #define VBBUSPULSING_TMOUT_15_MS AVR32_USBB_USBCON_TIMVALUE_VB_BUS_PULSING_15_MS
+ #define VBBUSPULSING_TMOUT_23_MS AVR32_USBB_USBCON_TIMVALUE_VB_BUS_PULSING_23_MS
+ #define VBBUSPULSING_TMOUT_31_MS AVR32_USBB_USBCON_TIMVALUE_VB_BUS_PULSING_31_MS
+ #define VBBUSPULSING_TMOUT_40_MS AVR32_USBB_USBCON_TIMVALUE_VB_BUS_PULSING_40_MS
+#define PDTMOUTCNT_TIMER AVR32_USBB_USBCON_TIMPAGE_PD_TMOUT_CNT
+ #define PDTMOUTCNT_TMOUT_93_MS AVR32_USBB_USBCON_TIMVALUE_PD_TMOUT_CNT_93_MS
+ #define PDTMOUTCNT_TMOUT_105_MS AVR32_USBB_USBCON_TIMVALUE_PD_TMOUT_CNT_105_MS
+ #define PDTMOUTCNT_TMOUT_118_MS AVR32_USBB_USBCON_TIMVALUE_PD_TMOUT_CNT_118_MS
+ #define PDTMOUTCNT_TMOUT_131_MS AVR32_USBB_USBCON_TIMVALUE_PD_TMOUT_CNT_131_MS
+#define SRPDETTMOUT_TIMER AVR32_USBB_USBCON_TIMPAGE_SRP_DET_TMOUT
+ #define SRPDETTMOUT_TMOUT_10_US AVR32_USBB_USBCON_TIMVALUE_SRP_DET_TMOUT_10_US
+ #define SRPDETTMOUT_TMOUT_100_US AVR32_USBB_USBCON_TIMVALUE_SRP_DET_TMOUT_100_US
+ #define SRPDETTMOUT_TMOUT_1_MS AVR32_USBB_USBCON_TIMVALUE_SRP_DET_TMOUT_1_MS
+ #define SRPDETTMOUT_TMOUT_11_MS AVR32_USBB_USBCON_TIMVALUE_SRP_DET_TMOUT_11_MS
+
+#define TYPE_CONTROL (UOTGHS_HSTPIPCFG_PTYPE_CTRL >> UOTGHS_HSTPIPCFG_PTYPE_Pos)
+#define TYPE_ISOCHRONOUS (UOTGHS_HSTPIPCFG_PTYPE_ISO >> UOTGHS_HSTPIPCFG_PTYPE_Pos)
+#define TYPE_BULK (UOTGHS_HSTPIPCFG_PTYPE_BLK >> UOTGHS_HSTPIPCFG_PTYPE_Pos)
+#define TYPE_INTERRUPT (UOTGHS_HSTPIPCFG_PTYPE_INTRPT >> UOTGHS_HSTPIPCFG_PTYPE_Pos)
+
+#define TRANSFER_TYPE_MASK 0x03
+#define SYNCHRONIZATION_TYPE_MASK 0x0c
+#define USAGE_TYPE_MASK 0x30
+
+#define DIRECTION_OUT 0 // OUT
+#define DIRECTION_IN UOTGHS_DEVEPTCFG_EPDIR // IN
+
+#define TOKEN_SETUP (UOTGHS_HSTPIPCFG_PTOKEN_SETUP >> UOTGHS_HSTPIPCFG_PTOKEN_Pos)
+#define TOKEN_IN (UOTGHS_HSTPIPCFG_PTOKEN_IN >> UOTGHS_HSTPIPCFG_PTOKEN_Pos)
+#define TOKEN_OUT (UOTGHS_HSTPIPCFG_PTOKEN_OUT >> UOTGHS_HSTPIPCFG_PTOKEN_Pos)
+
+#define SINGLE_BANK (UOTGHS_HSTPIPCFG_PBK_1_BANK >> UOTGHS_HSTPIPCFG_PBK_Pos)
+#define DOUBLE_BANK (UOTGHS_HSTPIPCFG_PBK_2_BANK >> UOTGHS_HSTPIPCFG_PBK_Pos)
+#define TRIPLE_BANK (UOTGHS_HSTPIPCFG_PBK_3_BANK >> UOTGHS_HSTPIPCFG_PBK_Pos)
+
+#define BANK_PID_DATA0 0
+#define BANK_PID_DATA1 1
+//! @}
+
+
+//! Post-increment operations associated with 64-, 32-, 16- and 8-bit accesses to
+//! the FIFO data registers of pipes/endpoints
+//! @note 64- and 32-bit accesses to FIFO data registers do not require pointer
+//! post-increment while 16- and 8-bit ones do.
+//! @note Only for internal use.
+//! @{
+#define Pep_fifo_access_64_post_inc()
+#define Pep_fifo_access_32_post_inc()
+#define Pep_fifo_access_16_post_inc() ++
+#define Pep_fifo_access_8_post_inc() ++
+//! @}
+
+
+//! @defgroup USBB_properties USBB IP properties
+//! These macros give access to IP properties
+//! @{
+ //! Get IP name part 1 or 2
+#define Usb_get_ip_name(part) (AVR32_USBB_unamex(part))
+ //! Get IP version
+#define Usb_get_ip_version() (Rd_bitfield(AVR32_USBB_uvers, AVR32_USBB_UVERS_VERSION_NUM_MASK))
+ //! Get number of metal fixes
+#define Usb_get_metal_fix_nbr() (Rd_bitfield(AVR32_USBB_uvers, AVR32_USBB_UVERS_METAL_FIX_NUM_MASK))
+ //! Get maximal number of pipes/endpoints (number of hardware-implemented pipes/endpoints)
+#define Usb_get_pipe_endpoint_max_nbr() (((Rd_bitfield(AVR32_USBB_ufeatures, AVR32_USBB_UFEATURES_EPT_NBR_MAX_MASK) - 1) & ((1 << AVR32_USBB_UFEATURES_EPT_NBR_MAX_SIZE) - 1)) + 1)
+ //! Get number of hardware-implemented DMA channels
+#define Usb_get_dma_channel_nbr() (Rd_bitfield(AVR32_USBB_ufeatures, AVR32_USBB_UFEATURES_DMA_CHANNEL_NBR_MASK))
+ //! Get DMA buffer size
+#define Usb_get_dma_buffer_size() (Rd_bitfield(AVR32_USBB_ufeatures, AVR32_USBB_UFEATURES_DMA_BUFFER_SIZE_MASK))
+ //! Get DMA FIFO depth in words
+#define Usb_get_dma_fifo_word_depth() (((Rd_bitfield(AVR32_USBB_ufeatures, AVR32_USBB_UFEATURES_DMA_FIFO_WORD_DEPTH_MASK) - 1) & ((1 << AVR32_USBB_UFEATURES_DMA_FIFO_WORD_DEPTH_SIZE) - 1)) + 1)
+ //! Get DPRAM size (FIFO maximal size) in bytes
+#define Usb_get_dpram_size() (128 << Rd_bitfield(AVR32_USBB_ufeatures, AVR32_USBB_UFEATURES_FIFO_MAX_SIZE_MASK))
+ //! Test if DPRAM is natively byte write capable
+#define Is_usb_dpram_byte_write_capable() (Tst_bits(AVR32_USBB_ufeatures, AVR32_USBB_UFEATURES_BYTE_WRITE_DPRAM_MASK))
+ //! Get size of USBB PB address space
+#define Usb_get_ip_paddress_size() (AVR32_USBB_uaddrsize)
+//! @}
+
+
+//! @defgroup USBB_general USBB common management drivers
+//! These macros manage the USBB controller
+//! @{
+ //! Configure time-out of specified OTG timer
+#define Usb_configure_timeout(timer, timeout) (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_UNLOCK),\
+ Wr_bitfield(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_TIMPAGE_Msk, timer, UOTGHS_CTRL_TIMPAGE_Pos),\
+ Wr_bitfield(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_TIMVALUE_Msk, timeout, UOTGHS_CTRL_TIMVALUE_Pos),\
+ Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_UNLOCK))
+ //! Get configured time-out of specified OTG timer
+#define Usb_get_timeout(timer) (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_UNLOCK),\
+ Wr_bitfield(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_TIMPAGE_Msk, timer, UOTGHS_CTRL_TIMPAGE_Pos),\
+ Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_UNLOCK),\
+ Rd_bitfield(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_TIMVALUE_Msk, UOTGHS_CTRL_TIMVALUE_Pos))
+
+ //! Enable external USB_ID pin (listened to by USB)
+#define Usb_enable_id_pin() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_UIDE))
+ //! Disable external USB_ID pin (ignored by USB)
+#define Usb_disable_id_pin() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_UIDE))
+ //! Test if external USB_ID pin enabled (listened to by USB)
+#define Is_usb_id_pin_enabled() (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_UIDE))
+ //! Disable external USB_ID pin and force device mode
+#define Usb_force_device_mode() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_UIMOD), Usb_disable_id_pin())
+ //! Test if device mode is forced
+#define Is_usb_device_mode_forced() (!Is_usb_id_pin_enabled() && Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_UIMOD))
+ //! Disable external USB_ID pin and force host mode
+#define Usb_force_host_mode() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_UIMOD), Usb_disable_id_pin())
+ //! Test if host mode is forced
+#define Is_usb_host_mode_forced() (!Is_usb_id_pin_enabled() && !Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_UIMOD))
+
+#if USB_HOST_FEATURE == ENABLED
+ //! Multiplexed pin used for USB_VBOF: AVR32_USBB_USB_VBOF_x_x.
+ //! To be selected according to the AVR32_USBB_USB_VBOF_x_x_PIN and
+ //! AVR32_USBB_USB_VBOF_x_x_FUNCTION definitions from <avr32/uc3cxxxx.h>.
+// #if (defined AVR32_USBB)
+// # define USB_VBOF AVR32_USBB_VBOF_0_0
+// #else
+ #define USB_VBOF AVR32_USBC_VBOF
+// #endif
+
+ //! Check that multiplexed pin used for USB_VBOF is defined
+ #ifndef USB_VBOF
+ #error YOU MUST define in your board header file the multiplexed pin used for USB_VBOF as AVR32_USBB_USB_VBOF_x_x
+ #endif
+ //! Pin and function for USB_VBOF according to configuration from USB_VBOF
+#define USB_VBOF_PIN ATPASTE2(USB_VBOF, _PIN)
+#define USB_VBOF_FUNCTION ATPASTE2(USB_VBOF, _FUNCTION)
+ //! Output USB_VBOF onto its pin
+#define Usb_output_vbof_pin() {const Pin pUOTGHSPinVBOF[] = {PIN_UOTGHS_VBOF};\
+ PIO_PinConfigure( pUOTGHSPinVBOF, PIO_LISTSIZE( pUOTGHSPinVBOF ));}
+
+
+
+
+#endif // USB_HOST_FEATURE == ENABLED
+ //! Set USB_VBOF output pin polarity
+#define Usb_set_vbof_active_high() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_VBUSPO))
+#define Usb_set_vbof_active_low() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_VBUSPO))
+ //! Get USB_VBOF output pin polarity
+#define Is_usb_vbof_active_high() (!Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_VBUSPO))
+#define Is_usb_vbof_active_low() (!Is_usb_vbof_active_high())
+
+ //! Use device full speed mode (default)
+#define Usb_use_full_speed_mode() (Clr_bits(UOTGHS->UOTGHS_DEVCTRL, (1<<16) /*AVR32_USBB_UDCON_LS_MASK*/))
+ //! Test if device full speed mode is used
+#define Is_usb_full_speed_mode_used() (!Is_usb_low_speed_mode_forced())
+#ifdef AVR32_USBB_UDCON_SPDCONF
+ //! Force device full speed mode (i.e. disable high speed)
+//#define Usb_force_full_speed_mode() (Wr_bitfield(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_SPDCONF_Msk, 3))
+#define Usb_force_full_speed_mode() (Clr_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_SPDCONF_Msk)),\
+ (Set_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_SPDCONF_FULL_SPEED))
+//! Enable dual speed mode (full speed and high speed; default)
+#define Usb_use_dual_speed_mode() (Wr_bitfield(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_SPDCONF_Msk, 0, UOTGHS_DEVCTRL_SPDCONF_Pos))
+#else
+#define Usb_force_full_speed_mode() do { } while (0)
+#define Usb_use_dual_speed_mode() do { } while (0)
+#endif
+ //! Force device low-speed mode
+#define Usb_force_low_speed_mode() (Set_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_LS))
+ //! Test if device low-speed mode is forced
+#define Is_usb_low_speed_mode_forced() (Tst_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_LS))
+ //! Test if controller is in full speed mode
+#define Is_usb_full_speed_mode() (Rd_bitfield(UOTGHS->UOTGHS_SR, UOTGHS_SR_SPEED_Msk, UOTGHS_SR_SPEED_Pos) == 0x00)
+ //! Test if controller is in low-speed mode
+//#define Is_usb_low_speed_mode() (Rd_bitfield(UOTGHS->UOTGHS_SR, UOTGHS_SR_SPEED_Msk) == AVR32_USBB_USBSTA_SPEED_LOW)
+#define Is_usb_low_speed_mode() (Rd_bitfield(UOTGHS->UOTGHS_SR, UOTGHS_SR_SPEED_Msk, UOTGHS_SR_SPEED_Pos) == 0x02)
+
+ //! Enable USB macro
+#define Usb_enable() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_USBE))
+ //! Disable USB macro
+#define Usb_disable() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_USBE))
+#define Is_usb_enabled() (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_USBE))
+
+ //! Enable OTG pad
+#define Usb_enable_otg_pad() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_OTGPADE))
+ //! Disable OTG pad
+#define Usb_disable_otg_pad() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_OTGPADE))
+#define Is_usb_otg_pad_enabled() (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_OTGPADE))
+
+ //! Stop (freeze) internal USB clock
+#define Usb_freeze_clock() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_FRZCLK))
+#define Usb_unfreeze_clock() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_FRZCLK))
+#define Is_usb_clock_frozen() (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_FRZCLK))
+
+ //! Get the dual-role device state of the internal USB finite state machine of the USBB controller
+#define Usb_get_fsm_drd_state() (Rd_bitfield(UOTGHS->UOTGHS_FSM, UOTGHS_FSM_DRDSTATE_Msk))
+
+#define Usb_enable_id_interrupt() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_IDTE))
+#define Usb_disable_id_interrupt() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_IDTE))
+#define Is_usb_id_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_IDTE))
+#define Is_usb_id_device() (Tst_bits(UOTGHS->UOTGHS_SR, UOTGHS_SR_IDTI))
+#define Usb_ack_id_transition() (UOTGHS->UOTGHS_SCR = UOTGHS_SCR_IDTIC)
+#define Usb_raise_id_transition() (UOTGHS->UOTGHS_SFR = UOTGHS_SFR_IDTIS)
+#define Is_usb_id_transition() (Tst_bits(UOTGHS->UOTGHS_SR, UOTGHS_SR_IDTI))
+
+#define Usb_enable_vbus_interrupt() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_VBUSTE))
+#define Usb_disable_vbus_interrupt() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_VBUSTE))
+#define Is_usb_vbus_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_VBUSTE))
+#define Is_usb_vbus_high() (Tst_bits(UOTGHS->UOTGHS_SR, UOTGHS_SR_VBUS))
+#define Is_usb_vbus_low() (!Is_usb_vbus_high())
+#define Usb_ack_vbus_transition() (UOTGHS->UOTGHS_SCR = UOTGHS_SCR_VBUSTIC)
+#define Usb_raise_vbus_transition() (UOTGHS->UOTGHS_SFR = UOTGHS_SFR_VBUSTIS)
+#define Is_usb_vbus_transition() (Tst_bits(UOTGHS->UOTGHS_SR, UOTGHS_SR_VBUSTI))
+
+ //! enables hardware control over the USB_VBOF output pin
+#define Usb_enable_vbus_hw_control() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_VBUSHWC))
+ //! disables hardware control over the USB_VBOF output pin
+#define Usb_disable_vbus_hw_control() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_VBUSHWC))
+#define Is_usb_vbus_hw_control_enabled() (!Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_VBUSHWC))
+ //! requests VBus activation
+#define Usb_enable_vbus() (UOTGHS->UOTGHS_SFR = UOTGHS_SFR_VBUSRQS)
+ //! requests VBus deactivation
+#define Usb_disable_vbus() (UOTGHS->UOTGHS_SCR = UOTGHS_SCR_VBUSRQC)
+ //! tests if VBus activation has been requested
+#define Is_usb_vbus_enabled() (Tst_bits(UOTGHS->UOTGHS_SR, UOTGHS_SR_VBUSRQ))
+
+ //! initiates a Host Negociation Protocol
+#define Usb_device_initiate_hnp() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_HNPREQ))
+ //! accepts a Host Negociation Protocol
+#define Usb_host_accept_hnp() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_HNPREQ))
+ //! rejects a Host Negociation Protocol
+#define Usb_host_reject_hnp() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_HNPREQ))
+ //! initiates a Session Request Protocol
+#define Usb_device_initiate_srp() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_SRPREQ))
+ //! selects VBus as SRP method
+#define Usb_select_vbus_srp_method() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_SRPSEL))
+#define Is_usb_vbus_srp_method_selected() (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_SRPSEL))
+ //! selects data line as SRP method
+#define Usb_select_data_srp_method() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_SRPSEL))
+#define Is_usb_data_srp_method_selected() (!Is_usb_vbus_srp_method_selected())
+ //! tests if a HNP occurs
+#define Is_usb_hnp() (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_HNPREQ))
+ //! tests if a SRP from device occurs
+#define Is_usb_device_srp() (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_SRPREQ))
+
+ //! enables suspend time out interrupt
+#define Usb_enable_suspend_time_out_interrupt() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_STOE))
+ //! disables suspend time out interrupt
+#define Usb_disable_suspend_time_out_interrupt() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_STOE))
+#define Is_usb_suspend_time_out_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_STOE))
+ //! acks suspend time out interrupt
+#define Usb_ack_suspend_time_out_interrupt() (UOTGHS->UOTGHS_SCR = UOTGHS_SCR_STOIC)
+ //! raises suspend time out interrupt
+#define Usb_raise_suspend_time_out_interrupt() (UOTGHS->UOTGHS_SFR = UOTGHS_SFR_STOIS)
+ //! tests if a suspend time out occurs
+#define Is_usb_suspend_time_out_interrupt() (Tst_bits(UOTGHS->UOTGHS_SR, UOTGHS_SR_STOI))
+
+ //! enables HNP error interrupt
+#define Usb_enable_hnp_error_interrupt() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_HNPERRE))
+ //! disables HNP error interrupt
+#define Usb_disable_hnp_error_interrupt() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_HNPERRE))
+#define Is_usb_hnp_error_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_HNPERRE))
+ //! acks HNP error interrupt
+#define Usb_ack_hnp_error_interrupt() (UOTGHS->UOTGHS_SCR = UOTGHS_SCR_HNPERRIC)
+ //! raises HNP error interrupt
+#define Usb_raise_hnp_error_interrupt() (UOTGHS->UOTGHS_SFR = UOTGHS_SFR_HNPERRIS)
+ //! tests if a HNP error occurs
+#define Is_usb_hnp_error_interrupt() (Tst_bits(UOTGHS->UOTGHS_SR, UOTGHS_SR_HNPERRI))
+
+ //! enables role exchange interrupt
+#define Usb_enable_role_exchange_interrupt() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_ROLEEXE))
+ //! disables role exchange interrupt
+#define Usb_disable_role_exchange_interrupt() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_ROLEEXE))
+#define Is_usb_role_exchange_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_ROLEEXE))
+ //! acks role exchange interrupt
+#define Usb_ack_role_exchange_interrupt() (UOTGHS->UOTGHS_SCR = UOTGHS_SCR_ROLEEXIC)
+ //! raises role exchange interrupt
+#define Usb_raise_role_exchange_interrupt() (UOTGHS->UOTGHS_SFR = UOTGHS_SFR_ROLEEXIS)
+ //! tests if a role exchange occurs
+#define Is_usb_role_exchange_interrupt() (Tst_bits(UOTGHS->UOTGHS_SR, UOTGHS_SR_ROLEEXI))
+
+ //! enables B-device connection error interrupt
+#define Usb_enable_bconnection_error_interrupt() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_BCERRE))
+ //! disables B-device connection error interrupt
+#define Usb_disable_bconnection_error_interrupt() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_BCERRE))
+#define Is_usb_bconnection_error_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_BCERRE))
+ //! acks B-device connection error interrupt
+#define Usb_ack_bconnection_error_interrupt() (UOTGHS->UOTGHS_SCR = UOTGHS_SCR_BCERRIC)
+ //! raises B-device connection error interrupt
+#define Usb_raise_bconnection_error_interrupt() (UOTGHS->UOTGHS_SFR = UOTGHS_SFR_BCERRIS)
+ //! tests if a B-device connection error occurs
+#define Is_usb_bconnection_error_interrupt() (Tst_bits(UOTGHS->UOTGHS_SR, UOTGHS_SR_BCERRI))
+
+ //! enables VBus error interrupt
+#define Usb_enable_vbus_error_interrupt() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_VBERRE))
+ //! disables VBus error interrupt
+#define Usb_disable_vbus_error_interrupt() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_VBERRE))
+#define Is_usb_vbus_error_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_VBERRE))
+ //! acks VBus error interrupt
+#define Usb_ack_vbus_error_interrupt() (UOTGHS->UOTGHS_SCR = UOTGHS_SCR_VBERRIC)
+ //! raises VBus error interrupt
+#define Usb_raise_vbus_error_interrupt() (UOTGHS->UOTGHS_SFR = UOTGHS_SFR_VBERRIS)
+ //! tests if a VBus error occurs
+#define Is_usb_vbus_error_interrupt() (Tst_bits(UOTGHS->UOTGHS_SR, UOTGHS_SR_VBERRI))
+
+ //! enables SRP interrupt
+#define Usb_enable_srp_interrupt() (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_SRPE))
+ //! disables SRP interrupt
+#define Usb_disable_srp_interrupt() (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_SRPE))
+#define Is_usb_srp_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_SRPE))
+ //! acks SRP interrupt
+#define Usb_ack_srp_interrupt() (UOTGHS->UOTGHS_SCR = UOTGHS_SCR_SRPIC)
+ //! raises SRP interrupt
+#define Usb_raise_srp_interrupt() (UOTGHS->UOTGHS_SFR = UOTGHS_SFR_SRPIS)
+ //! tests if a SRP occurs
+#define Is_usb_srp_interrupt() (Tst_bits(UOTGHS->UOTGHS_SR, UOTGHS_SR_SRPI))
+//! @}
+
+
+//! @defgroup USBB_device_driver USBB device controller drivers
+//! These macros manage the USBB Device controller.
+//! @{
+ //! initiates a remote wake-up
+#define Usb_initiate_remote_wake_up() (Set_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_RMWKUP))
+ //! detaches from USB bus
+#define Usb_detach() (Set_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_DETACH))
+ //! attaches to USB bus
+#define Usb_attach() (Clr_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_DETACH))
+ //! test if remote wake-up still running
+#define Is_usb_pending_remote_wake_up() (Tst_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_RMWKUP))
+ //! test if the device is detached
+#define Is_usb_detached() (Tst_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_DETACH))
+
+ //! Test device compliance
+#define Usb_dev_forceHighSpeed() Wr_bitfield(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_SPDCONF_Msk, 2, UOTGHS_DEVCTRL_SPDCONF_Pos)
+
+ //! enables remote wake-up interrupt
+#define Usb_enable_remote_wake_up_interrupt() (UOTGHS->UOTGHS_DEVIER = UOTGHS_DEVIER_UPRSMES)
+ //! disables remote wake-up interrupt
+#define Usb_disable_remote_wake_up_interrupt() (UOTGHS->UOTGHS_DEVIDR = UOTGHS_DEVIDR_UPRSMEC)
+
+#define Is_usb_remote_wake_up_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_DEVIMR, UOTGHS_DEVIMR_UPRSME))
+ //! acks remote wake-up
+#define Usb_ack_remote_wake_up_start() (UOTGHS->UOTGHS_DEVICR = UOTGHS_DEVICR_UPRSMC)
+ //! raises remote wake-up
+#define Usb_raise_remote_wake_up_start() (UOTGHS->UOTGHS_DEVIFR = UOTGHS_DEVIFR_UPRSMS)
+ //! tests if remote wake-up still running
+#define Is_usb_remote_wake_up_start() (Tst_bits(UOTGHS->UOTGHS_DEVISR, UOTGHS_DEVISR_UPRSM))
+
+ //! enables resume interrupt
+#define Usb_enable_resume_interrupt() (UOTGHS->UOTGHS_DEVIER = UOTGHS_DEVIER_EORSMES)
+ //! disables resume interrupt
+#define Usb_disable_resume_interrupt() (UOTGHS->UOTGHS_DEVIDR = UOTGHS_DEVIDR_EORSMEC)
+#define Is_usb_resume_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_DEVIMR, UOTGHS_DEVIMR_EORSME))
+ //! acks resume
+#define Usb_ack_resume() (UOTGHS->UOTGHS_DEVICR = UOTGHS_DEVICR_EORSMC)
+ //! raises resume
+#define Usb_raise_resume() (UOTGHS->UOTGHS_DEVIFR = UOTGHS_DEVIFR_EORSMS)
+ //! tests if resume occurs
+#define Is_usb_resume() (Tst_bits(UOTGHS->UOTGHS_DEVISR, UOTGHS_DEVISR_EORSM))
+
+ //! enables wake-up interrupt
+#define Usb_enable_wake_up_interrupt() (UOTGHS->UOTGHS_DEVIER = UOTGHS_DEVIER_WAKEUPES)
+ //! disables wake-up interrupt
+#define Usb_disable_wake_up_interrupt() (UOTGHS->UOTGHS_DEVIDR = UOTGHS_DEVIDR_WAKEUPEC)
+#define Is_usb_wake_up_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_DEVIMR, UOTGHS_DEVIMR_WAKEUPE))
+ //! acks wake-up
+#define Usb_ack_wake_up() (UOTGHS->UOTGHS_DEVICR = UOTGHS_DEVICR_WAKEUPC)
+ //! raises wake-up
+#define Usb_raise_wake_up() (UOTGHS->UOTGHS_DEVIFR = UOTGHS_DEVIFR_WAKEUPS)
+ //! tests if wake-up occurs
+#define Is_usb_wake_up() (Tst_bits(UOTGHS->UOTGHS_DEVISR, UOTGHS_DEVISR_WAKEUP))
+
+ //! enables USB reset interrupt
+#define Usb_enable_reset_interrupt() (UOTGHS->UOTGHS_DEVIER = UOTGHS_DEVIER_EORSTES)
+ //! disables USB reset interrupt
+#define Usb_disable_reset_interrupt() (UOTGHS->UOTGHS_DEVIDR = UOTGHS_DEVIDR_EORSTEC)
+#define Is_usb_reset_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_DEVIMR, UOTGHS_DEVIMR_EORSTE))
+ //! acks USB reset
+#define Usb_ack_reset() (UOTGHS->UOTGHS_DEVICR = UOTGHS_DEVICR_EORSTC)
+ //! raises USB reset
+#define Usb_raise_reset() (UOTGHS->UOTGHS_DEVIFR = UOTGHS_DEVIFR_EORSTS)
+ //! tests if USB reset occurs
+#define Is_usb_reset() (Tst_bits(UOTGHS->UOTGHS_DEVISR, UOTGHS_DEVISR_EORST))
+
+//! disables Micro Start of Frame Interrupt
+#define Usb_disable_msof_interrupt() (UOTGHS->UOTGHS_DEVIDR = UOTGHS_DEVIDR_MSOFEC)
+//! enables Start-of-Frame Interrupt
+#define Usb_enable_sof_interrupt() (UOTGHS->UOTGHS_DEVIER = UOTGHS_DEVIER_SOFES)
+ //! disables Start-of-Frame Interrupt
+#define Usb_disable_sof_interrupt() (UOTGHS->UOTGHS_DEVIDR = UOTGHS_DEVIDR_SOFEC)
+#define Is_usb_sof_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_DEVIMR, UOTGHS_DEVICR_SOFC))
+ //! acks Start-of-Frame
+#define Usb_ack_sof() (UOTGHS->UOTGHS_DEVICR = UOTGHS_DEVICR_SOFC)
+ //! raises Start-of-Frame
+#define Usb_raise_sof() (UOTGHS->UOTGHS_DEVIFR = UOTGHS_DEVIFR_SOFS)
+ //! tests if Start-of-Frame occurs
+#define Is_usb_sof() (Tst_bits(UOTGHS->UOTGHS_DEVISR, UOTGHS_DEVISR_SOF))
+
+ //! enables suspend state interrupt
+#define Usb_enable_suspend_interrupt() (UOTGHS->UOTGHS_DEVIER = UOTGHS_DEVIER_SUSPES)
+ //! disables suspend state interrupt
+#define Usb_disable_suspend_interrupt() (UOTGHS->UOTGHS_DEVIDR = UOTGHS_DEVIDR_SUSPEC)
+#define Is_usb_suspend_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_DEVIMR, UOTGHS_DEVIMR_SUSPE))
+ //! acks Suspend
+#define Usb_ack_suspend() (UOTGHS->UOTGHS_DEVICR = UOTGHS_DEVICR_SUSPC)
+
+ //! raises Suspend
+#define Usb_raise_suspend() (UOTGHS->UOTGHS_DEVIFR = UOTGHS_DEVIFR_SUSPS)
+ //! tests if Suspend state detected
+#define Is_usb_suspend() (Tst_bits(UOTGHS->UOTGHS_DEVISR, UOTGHS_DEVISR_SUSP))
+
+ //! enables USB device address
+#define Usb_enable_address() (Set_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_ADDEN))
+ //! disables USB device address
+#define Usb_disable_address() (Clr_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_ADDEN))
+#define Is_usb_address_enabled() (Tst_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_ADDEN))
+ //! configures the USB device address
+//#define Usb_configure_address(addr) (Wr_bitfield(UOTGHS->UOTGHS_DEVCTRL, AVR32_USBB_UDCON_UADD_MASK, addr))
+#define Usb_configure_address(addr) UOTGHS->UOTGHS_DEVCTRL &= ~UOTGHS_DEVCTRL_UADD_Msk;\
+ UOTGHS->UOTGHS_DEVCTRL |= UOTGHS_DEVCTRL_UADD(addr)
+ //! gets the currently configured USB device address
+#define Usb_get_configured_address() (Rd_bitfield(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_UADD_Msk))
+
+ //! returns the current frame number
+#define Usb_frame_number() (Rd_bitfield(UOTGHS->UOTGHS_DEVFNUM, UOTGHS_DEVFNUM_MFNUM_Msk))
+ //! tests if a crc error occurs in frame number
+#define Is_usb_frame_number_crc_error() (Tst_bits(UOTGHS->UOTGHS_DEVFNUM, UOTGHS_DEVFNUM_FNCERR))
+//! @}
+
+
+//! @defgroup USBB_general_endpoint USBB endpoint drivers
+//! These macros manage the common features of the endpoints.
+//! @{
+ //! resets the selected endpoint
+#define Usb_reset_endpoint(ep) (Set_bits(UOTGHS->UOTGHS_DEVEPT, UOTGHS_DEVEPT_EPRST0 << (ep)),\
+ Clr_bits(UOTGHS->UOTGHS_DEVEPT, UOTGHS_DEVEPT_EPRST0 << (ep)))
+ //! tests if the selected endpoint is being reset
+#define Is_usb_resetting_endpoint(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPT, UOTGHS_DEVEPT_EPRST0 << (ep)))
+
+ //! enables the selected endpoint
+#define Usb_enable_endpoint(ep) (Set_bits(UOTGHS->UOTGHS_DEVEPT, 1 << (ep)))
+ //! enables the STALL handshake
+#define Usb_enable_stall_handshake(ep) (UOTGHS->UOTGHS_DEVEPTIER[ep] = UOTGHS_DEVEPTIER_STALLRQS)
+ //! Sends a STALL handshake for the next host request. A STALL handshake will
+ //! be sent for each following request until a SETUP or a Clear Halt Feature
+ //! occurs for this endpoint.
+#define Usb_halt_endpoint(ep) (Usb_enable_stall_handshake(ep))
+ //! resets the data toggle sequence
+#define Usb_reset_data_toggle(ep) (UOTGHS->UOTGHS_DEVEPTIER[ep] = UOTGHS_DEVEPTIER_RSTDTS)
+ //! disables the selected endpoint
+#define Usb_disable_endpoint(ep) (Clr_bits(UOTGHS->UOTGHS_DEVEPT, 1 << (ep)))
+ //! disables the STALL handshake
+#define Usb_disable_stall_handshake(ep) (UOTGHS->UOTGHS_DEVEPTIDR[ep] = UOTGHS_DEVEPTIDR_STALLRQC)
+ //! tests if the selected endpoint is enabled
+#define Is_usb_endpoint_enabled(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPT, 1 << (ep)))
+ //! tests if STALL handshake request is running
+#define Is_usb_endpoint_stall_requested(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTIMR[ep], UOTGHS_DEVEPTIMR_STALLRQ))
+ //! tests if the data toggle sequence is being reset
+#define Is_usb_data_toggle_reset(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTIMR[ep], UOTGHS_DEVEPTIMR_RSTDT))
+
+ //! tests if an interrupt is triggered by the selected endpoint
+#define Is_usb_endpoint_interrupt(ep) (Tst_bits(UOTGHS->UOTGHS_DEVISR, UOTGHS_DEVISR_PEP_0 << (ep)))
+ //! enables the selected endpoint interrupt
+#define Usb_enable_endpoint_interrupt(ep) (UOTGHS->UOTGHS_DEVIER = UOTGHS_DEVIER_PEP_0 << (ep))
+ //! disables the selected endpoint interrupt
+#define Usb_disable_endpoint_interrupt(ep) (UOTGHS->UOTGHS_DEVIDR = UOTGHS_DEVIDR_PEP_0 << (ep))
+ //! tests if the selected endpoint interrupt is enabled
+#define Is_usb_endpoint_interrupt_enabled(ep) (Tst_bits(UOTGHS->UOTGHS_DEVIMR, UOTGHS_DEVIMR_PEP_0 << (ep)))
+ //! returns the lowest endpoint number generating an endpoint interrupt or MAX_PEP_NB if none
+#define Usb_get_interrupt_endpoint_number() (ctz(((UOTGHS->UOTGHS_DEVISR >> 12 /*AVR32_USBB_UDINT_EP0INT_OFFSET*/) &\
+ (UOTGHS->UOTGHS_DEVIMR >> 12 /*AVR32_USBB_UDINTE_EP0INTE_OFFSET*/)) |\
+ (1 << MAX_PEP_NB)))
+
+ //! configures the selected endpoint type
+#define Usb_configure_endpoint_type(ep, type) (Wr_bitfield(UOTGHS->UOTGHS_DEVEPTCFG[ep], UOTGHS_DEVEPTCFG_EPTYPE_Msk, type, UOTGHS_DEVEPTCFG_EPTYPE_Pos))
+ //! gets the configured selected endpoint type
+#define Usb_get_endpoint_type(ep) (Rd_bitfield(UOTGHS->UOTGHS_DEVEPTCFG[ep], UOTGHS_DEVEPTCFG_EPTYPE_Msk))
+ //! enables the bank autoswitch for the selected endpoint
+#define Usb_enable_endpoint_bank_autoswitch(ep) (Set_bits(UOTGHS->UOTGHS_DEVEPTCFG[ep], UOTGHS_DEVEPTCFG_AUTOSW))
+ //! disables the bank autoswitch for the selected endpoint
+#define Usb_disable_endpoint_bank_autoswitch(ep) (Clr_bits(UOTGHS->UOTGHS_DEVEPTCFG[ep], UOTGHS_DEVEPTCFG_AUTOSW))
+#define Is_usb_endpoint_bank_autoswitch_enabled(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTCFG[ep], UOTGHS_DEVEPTCFG_AUTOSW))
+ //! configures the selected endpoint direction
+#define Usb_configure_endpoint_direction(ep, dir) (Wr_bitfield(UOTGHS->UOTGHS_DEVEPTCFG[ep], UOTGHS_DEVEPTCFG_EPDIR, dir, 8))
+ //! gets the configured selected endpoint direction
+#define Usb_get_endpoint_direction(ep) (Rd_bitfield(UOTGHS->UOTGHS_DEVEPTCFG[ep], UOTGHS_DEVEPTCFG_EPDIR, 8))
+ //! Bounds given integer size to allowed range and rounds it up to the nearest
+ //! available greater size, then applies register format of USBB controller
+ //! for endpoint size bit-field.
+//#define Usb_format_endpoint_size(size) (32 - clz(((U32)min(max(size, 8), 1024) << 1) - 1) - 1 - 3)
+#define Usb_format_endpoint_size(size) ((size <= 8 ) ? 0:\
+ (size <= 16 ) ? 1:\
+ (size <= 32 ) ? 2:\
+ (size <= 64 ) ? 3:\
+ (size <= 128) ? 4:\
+ (size <= 256) ? 5:\
+ (size <= 512) ? 6:7)
+
+ //! configures the selected endpoint size
+#define Usb_configure_endpoint_size(ep, size) (Wr_bitfield(UOTGHS->UOTGHS_DEVEPTCFG[ep], UOTGHS_DEVEPTCFG_EPSIZE_Msk, Usb_format_endpoint_size(size), UOTGHS_DEVEPTCFG_EPSIZE_Pos))
+ //! gets the configured selected endpoint size
+#define Usb_get_endpoint_size(ep) (8 << Rd_bitfield(UOTGHS->UOTGHS_DEVEPTCFG[ep], UOTGHS_DEVEPTCFG_EPSIZE_Msk, UOTGHS_DEVEPTCFG_EPSIZE_Pos))
+ //! configures the selected endpoint number of banks
+#define Usb_configure_endpoint_bank(ep, bank) (Wr_bitfield(UOTGHS->UOTGHS_DEVEPTCFG[ep], UOTGHS_DEVEPTCFG_EPBK_Msk, bank, UOTGHS_DEVEPTCFG_EPBK_Pos))
+ //! gets the configured selected endpoint number of banks
+#define Usb_get_endpoint_bank(ep) (Rd_bitfield(UOTGHS->UOTGHS_DEVEPTCFG[ep], UOTGHS_DEVEPTCFG_EPBK_Msk, UOTGHS_DEVEPTCFG_EPBK_Pos))
+ //! allocates the configuration x in DPRAM memory
+#define Usb_allocate_memory(ep) (Set_bits(UOTGHS->UOTGHS_DEVEPTCFG[ep], UOTGHS_DEVEPTCFG_ALLOC))
+ //! un-allocates the configuration x in DPRAM memory
+#define Usb_unallocate_memory(ep) (Clr_bits(UOTGHS->UOTGHS_DEVEPTCFG[ep], UOTGHS_DEVEPTCFG_ALLOC))
+#define Is_usb_memory_allocated(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTCFG[ep], UOTGHS_DEVEPTCFG_ALLOC))
+
+ //! configures selected endpoint in one step
+#define Usb_configure_endpoint(ep, type, dir, size, bank) \
+(\
+ Usb_enable_endpoint(ep),\
+ Clr_bits(UOTGHS->UOTGHS_DEVEPTCFG[ep], 0xFFFF),\
+ Wr_bits(UOTGHS->UOTGHS_DEVEPTCFG[ep], UOTGHS_DEVEPTCFG_EPTYPE_Msk |\
+ UOTGHS_DEVEPTCFG_EPDIR |\
+ UOTGHS_DEVEPTCFG_EPSIZE_Msk |\
+ UOTGHS_DEVEPTCFG_EPBK_Msk, \
+ ( (U32)(type) << UOTGHS_DEVEPTCFG_EPTYPE_Pos ) |\
+ ( (U32)((dir) << 8 ) & UOTGHS_DEVEPTCFG_EPDIR ) |\
+ ( (U32)(Usb_format_endpoint_size(size)) << UOTGHS_DEVEPTCFG_EPSIZE_Pos ) |\
+ ( (U32)((bank) << UOTGHS_DEVEPTCFG_EPBK_Pos ) )),\
+ Usb_allocate_memory(ep),\
+\
+ Is_usb_endpoint_configured(ep)\
+)
+
+ //! acks endpoint overflow interrupt
+#define Usb_ack_overflow_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTICR[ep] = UOTGHS_DEVEPTICR_OVERFIC)
+ //! raises endpoint overflow interrupt
+#define Usb_raise_overflow_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIFR[ep] = UOTGHS_DEVEPTIFR_OVERFIS)
+ //! acks endpoint underflow interrupt
+#define Usb_ack_underflow_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTICR[ep] = UOTGHS_DEVEPTICR_RXSTPIC)
+ //! raises endpoint underflow interrupt
+#define Usb_raise_underflow_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIFR[ep] = UOTGHS_DEVEPTIFR_RXSTPIS)
+ //! returns data toggle
+#define Usb_data_toggle(ep) (Rd_bitfield(UOTGHS->UOTGHS_DEVEPTISR[ep], UOTGHS_DEVEPTISR_DTSEQ_Msk))
+ //! returns the number of busy banks
+#define Usb_nb_busy_bank(ep) (Rd_bitfield(UOTGHS->UOTGHS_DEVEPTISR[ep], UOTGHS_DEVEPTISR_NBUSYBK_Msk))
+ //! tests if current endpoint is configured
+#define Is_usb_endpoint_configured(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTISR[ep], UOTGHS_DEVEPTISR_CFGOK))
+ //! tests if an overflow occurs
+#define Is_usb_overflow(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTISR[ep], UOTGHS_DEVEPTISR_OVERFI))
+ //! tests if an underflow occurs
+#define Is_usb_underflow(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTISR[ep], UOTGHS_DEVEPTISR_RXSTPI))
+
+ //! returns the byte count
+#define Usb_byte_count(ep) (Rd_bitfield(UOTGHS->UOTGHS_DEVEPTISR[ep], UOTGHS_DEVEPTISR_BYCT_Msk, UOTGHS_DEVEPTISR_BYCT_Pos))
+ //! returns the control direction
+#define Usb_control_direction() (Rd_bitfield(UOTGHS->UOTGHS_DEVEPTISR(EP_CONTROL), UOTGHS_DEVEPTISR_CTRLDIR, 17))
+ //! returns the number of the current bank
+#define Usb_current_bank(ep) (Rd_bitfield(UOTGHS->UOTGHS_DEVEPTISR[ep], UOTGHS_DEVEPTISR_CURRBK_Msk, UOTGHS_DEVEPTISR_CURRBK_Pos))
+
+ //! kills last bank
+#define Usb_kill_last_in_bank(ep) (UOTGHS->UOTGHS_DEVEPTIER[ep] = UOTGHS_DEVEPTIER_KILLBKS)
+ //! acks SHORT PACKET received
+#define Usb_ack_short_packet(ep) (UOTGHS->UOTGHS_DEVEPTICR[ep] = UOTGHS_DEVEPTICR_SHORTPACKETC)
+ //! raises SHORT PACKET received
+#define Usb_raise_short_packet(ep) (UOTGHS->UOTGHS_DEVEPTIFR[ep] = UOTGHS_DEVEPTIFR_SHORTPACKETS)
+ //! acks STALL sent
+#define Usb_ack_stall(ep) (UOTGHS->UOTGHS_DEVEPTICR[ep] = UOTGHS_DEVEPTICR_STALLEDIC)
+ //! raises STALL sent
+#define Usb_raise_stall(ep) (UOTGHS->UOTGHS_DEVEPTIFR[ep] = UOTGHS_DEVEPTIFR_SHORTPACKETS)
+ //! acks CRC ERROR ISO OUT detected
+#define Usb_ack_crc_error(ep) (UOTGHS->UOTGHS_DEVEPTICR[ep] = UOTGHS_DEVEPTICR_STALLEDIC)
+ //! raises CRC ERROR ISO OUT detected
+#define Usb_raise_crc_error(ep) (UOTGHS->UOTGHS_DEVEPTIFR[ep] = UOTGHS_DEVEPTIFR_STALLEDIS)
+ //! acks NAK IN received
+#define Usb_ack_nak_in(ep) (UOTGHS->UOTGHS_DEVEPTICR[ep] = UOTGHS_DEVEPTICR_NAKINIC)
+ //! raises NAK IN received
+#define Usb_raise_nak_in(ep) (UOTGHS->UOTGHS_DEVEPTIFR[ep] = UOTGHS_DEVEPTIFR_NAKINIS)
+ //! acks NAK OUT received
+#define Usb_ack_nak_out(ep) (UOTGHS->UOTGHS_DEVEPTICR[ep] = UOTGHS_DEVEPTICR_NAKOUTIC)
+ //! raises NAK OUT received
+#define Usb_raise_nak_out(ep) (UOTGHS->UOTGHS_DEVEPTIFR[ep] = UOTGHS_DEVEPTIFR_NAKOUTIS)
+
+ //! tests if last bank killed
+#define Is_usb_last_in_bank_killed(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTIMR[ep], UOTGHS_DEVEPTIMR_KILLBK))
+ //! tests if endpoint read allowed
+#define Is_usb_read_enabled(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTISR[ep], UOTGHS_DEVEPTISR_RWALL))
+ //! tests if endpoint write allowed
+#define Is_usb_write_enabled(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTISR[ep], UOTGHS_DEVEPTISR_RWALL))
+ //! tests if SHORT PACKET received
+#define Is_usb_short_packet(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTISR[ep], UOTGHS_DEVEPTISR_SHORTPACKET))
+ //! tests if STALL sent
+#define Is_usb_stall(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTISR[ep], UOTGHS_DEVEPTISR_STALLEDI))
+ //! tests if CRC ERROR ISO OUT detected
+#define Is_usb_crc_error(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTISR[ep], UOTGHS_DEVEPTISR_STALLEDI))
+ //! tests if NAK IN received
+#define Is_usb_nak_in(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTISR[ep], UOTGHS_DEVEPTISR_NAKINI))
+ //! tests if NAK OUT received
+#define Is_usb_nak_out(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTISR[ep], UOTGHS_DEVEPTISR_NAKOUTI))
+
+ //! clears FIFOCON bit
+#define Usb_ack_fifocon(ep) (UOTGHS->UOTGHS_DEVEPTIDR[ep] = UOTGHS_DEVEPTIDR_FIFOCONC)
+
+ //! acks SETUP received
+#define Usb_ack_setup_received_free() (UOTGHS->UOTGHS_DEVEPTICR[EP_CONTROL] = UOTGHS_DEVEPTICR_RXSTPIC)
+ //! raises SETUP received
+#define Usb_raise_setup_received() (UOTGHS->UOTGHS_DEVEPTIFR[EP_CONTROL] = UOTGHS_DEVEPTIFR_RXSTPIS)
+ //! acks OUT received
+#define Usb_ack_out_received(ep) (UOTGHS->UOTGHS_DEVEPTICR[ep] = UOTGHS_DEVEPTICR_RXOUTIC)
+ //! raises OUT received
+#define Usb_raise_out_received(ep) (UOTGHS->UOTGHS_DEVEPTIFR[ep] = UOTGHS_DEVEPTIFR_RXOUTIS)
+ //! frees current bank for OUT endpoint
+#define Usb_free_out(ep) (Usb_ack_fifocon(ep))
+ //! acks OUT received and frees current bank
+#define Usb_ack_out_received_free(ep) (Usb_ack_out_received(ep), Usb_free_out(ep))
+ //! acks OUT received on control endpoint and frees current bank
+#define Usb_ack_control_out_received_free() (UOTGHS->UOTGHS_DEVEPTICR[EP_CONTROL] = UOTGHS_DEVEPTICR_RXOUTIC)
+ //! raises OUT received on control endpoint
+#define Usb_raise_control_out_received() (UOTGHS->UOTGHS_DEVEPTIFR[EP_CONTROL] = UOTGHS_DEVEPTIFR_RXOUTIS)
+
+ //! acks IN ready
+#define Usb_ack_in_ready(ep) (UOTGHS->UOTGHS_DEVEPTICR[ep] = UOTGHS_DEVEPTICR_TXINIC)
+ //! raises IN ready
+#define Usb_raise_in_ready(ep) (UOTGHS->UOTGHS_DEVEPTIFR[ep] = UOTGHS_DEVEPTIFR_TXINIS)
+ //! sends current bank for IN endpoint
+#define Usb_send_in(ep) (Usb_ack_fifocon(ep))
+ //! acks IN ready and sends current bank
+#define Usb_ack_in_ready_send(ep) (Usb_ack_in_ready(ep), Usb_send_in(ep))
+ //! acks IN ready on control endpoint and sends current bank
+#define Usb_ack_control_in_ready_send() (UOTGHS->UOTGHS_DEVEPTICR[EP_CONTROL] = UOTGHS_DEVEPTICR_TXINIC)
+ //! raises IN ready on control endpoint
+#define Usb_raise_control_in_ready() (UOTGHS->UOTGHS_DEVEPTIFR[EP_CONTROL] = UOTGHS_DEVEPTIFR_TXINIS)
+
+ //! tests if FIFOCON bit set
+#define Is_usb_fifocon(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTIMR[ep], UOTGHS_DEVEPTIMR_FIFOCON))
+
+ //! tests if SETUP received
+#define Is_usb_setup_received() (Tst_bits(UOTGHS->UOTGHS_DEVEPTISR[EP_CONTROL], UOTGHS_DEVEPTISR_RXSTPI))
+ //! tests if OUT received
+#define Is_usb_out_received(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTISR[ep], UOTGHS_DEVEPTISR_RXOUTI))
+ //! tests if current bank filled for OUT endpoint
+#define Is_usb_out_filled(ep) (Is_usb_fifocon(ep))
+ //! tests if OUT received on control endpoint
+#define Is_usb_control_out_received() (Tst_bits(UOTGHS->UOTGHS_DEVEPTISR[EP_CONTROL], UOTGHS_DEVEPTISR_RXOUTI))
+
+ //! tests if IN ready
+#define Is_usb_in_ready(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTISR[ep], UOTGHS_DEVEPTISR_TXINI))
+ //! tests if current bank sent for IN endpoint
+#define Is_usb_in_sent(ep) (Is_usb_fifocon(ep))
+ //! tests if IN ready on control endpoint
+#define Is_usb_control_in_ready() (Tst_bits(UOTGHS->UOTGHS_DEVEPTISR[EP_CONTROL], UOTGHS_DEVEPTISR_TXINI))
+
+ //! forces all banks full (OUT) or free (IN) interrupt
+#define Usb_force_bank_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIFR[ep] = UOTGHS_DEVEPTIFR_NBUSYBKS)
+ //! unforces all banks full (OUT) or free (IN) interrupt
+#define Usb_unforce_bank_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIFR[ep] = UOTGHS_DEVEPTIFR_NBUSYBKS)
+ //! enables all banks full (OUT) or free (IN) interrupt
+#define Usb_enable_bank_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIER[ep] = UOTGHS_DEVEPTIER_NBUSYBKES)
+ //! enables SHORT PACKET received interrupt
+#define Usb_enable_short_packet_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIER[ep] = UOTGHS_DEVEPTIER_SHORTPACKETES)
+ //! enables STALL sent interrupt
+#define Usb_enable_stall_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIER[ep] = UOTGHS_DEVEPTIER_STALLRQS)
+ //! enables CRC ERROR ISO OUT detected interrupt
+#define Usb_enable_crc_error_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIER[ep] = UOTGHS_DEVEPTIER_STALLRQS)
+ //! enables overflow interrupt
+#define Usb_enable_overflow_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIER[ep] = UOTGHS_DEVEPTIER_OVERFES)
+ //! enables NAK IN interrupt
+#define Usb_enable_nak_in_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIER[ep] = UOTGHS_DEVEPTIER_NAKINES)
+ //! enables NAK OUT interrupt
+#define Usb_enable_nak_out_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIER[ep] = UOTGHS_DEVEPTIER_NAKOUTES)
+ //! enables SETUP received interrupt
+#define Usb_enable_setup_received_interrupt() (UOTGHS->UOTGHS_DEVEPTIER(EP_CONTROL) = UOTGHS_DEVEPTIER_RXSTPES)
+ //! enables underflow interrupt
+#define Usb_enable_underflow_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIER[ep] = UOTGHS_DEVEPTIER_UNDERFES)
+ //! enables OUT received interrupt
+#define Usb_enable_out_received_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIER[ep] = UOTGHS_DEVEPTIER_RXOUTES)
+ //! enables OUT received on control endpoint interrupt
+#define Usb_enable_control_out_received_interrupt() (UOTGHS->UOTGHS_DEVEPTIER(EP_CONTROL) = UOTGHS_DEVEPTIER_RXOUTES)
+ //! enables IN ready interrupt
+#define Usb_enable_in_ready_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIER[ep] = UOTGHS_DEVEPTIER_TXINES)
+ //! enables IN ready on control endpoint interrupt
+#define Usb_enable_control_in_ready_interrupt() (UOTGHS->UOTGHS_DEVEPTIER(EP_CONTROL) = UOTGHS_DEVEPTIER_TXINES)
+ //! disables all banks full (OUT) or free (IN) interrupt
+#define Usb_disable_bank_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIDR[ep] = UOTGHS_DEVEPTIDR_NBUSYBKEC)
+ //! disables SHORT PACKET received interrupt
+#define Usb_disable_short_packet_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIDR[ep] = UOTGHS_DEVEPTIDR_SHORTPACKETEC)
+ //! disables STALL sent interrupt
+#define Usb_disable_stall_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIDR[ep] = UOTGHS_DEVEPTIDR_STALLEDEC)
+ //! disables CRC ERROR ISO OUT detected interrupt
+#define Usb_disable_crc_error_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIDR[ep] = UOTGHS_DEVEPTIDR_STALLEDEC)
+ //! disables overflow interrupt
+#define Usb_disable_overflow_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIDR[ep] = UOTGHS_DEVEPTIDR_OVERFEC)
+ //! disables NAK IN interrupt
+#define Usb_disable_nak_in_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIDR[ep] = UOTGHS_DEVEPTIDR_NAKINEC)
+ //! disables NAK OUT interrupt
+#define Usb_disable_nak_out_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIDR[ep] = UOTGHS_DEVEPTIDR_NAKOUTEC)
+ //! disables SETUP received interrupt
+#define Usb_disable_setup_received_interrupt() (UOTGHS->UOTGHS_DEVEPTIDR[EP_CONTROL] = UOTGHS_DEVEPTIDR_RXSTPEC)
+ //! disables underflow interrupt
+#define Usb_disable_underflow_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIDR[ep] = UOTGHS_DEVEPTIDR_RXSTPEC)
+ //! disables OUT received interrupt
+#define Usb_disable_out_received_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIDR[ep] = UOTGHS_DEVEPTIDR_RXOUTEC)
+ //! disables OUT received on control endpoint interrupt
+#define Usb_disable_control_out_received_interrupt() (UOTGHS->UOTGHS_DEVEPTIDR[EP_CONTROL] = UOTGHS_DEVEPTIDR_RXOUTEC)
+ //! disables IN ready interrupt
+#define Usb_disable_in_ready_interrupt(ep) (UOTGHS->UOTGHS_DEVEPTIDR[ep] = UOTGHS_DEVEPTIDR_TXINEC)
+ //! disables IN ready on control endpoint interrupt
+#define Usb_disable_control_in_ready_interrupt() (UOTGHS->UOTGHS_DEVEPTIDR[EP_CONTROL] = UOTGHS_DEVEPTIDR_TXINEC)
+ //! tests if all banks full (OUT) or free (IN) interrupt enabled
+#define Is_usb_bank_interrupt_enabled(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTIMR[ep], UOTGHS_DEVEPTIMR_NBUSYBKE))
+ //! tests if SHORT PACKET received interrupt is enabled
+#define Is_usb_short_packet_interrupt_enabled(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTIMR[ep], UOTGHS_DEVEPTIMR_SHORTPACKETE))
+ //! tests if STALL sent interrupt is enabled
+#define Is_usb_stall_interrupt_enabled(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTIMR[ep], UOTGHS_DEVEPTIMR_STALLEDE))
+ //! tests if CRC ERROR ISO OUT detected interrupt is enabled
+#define Is_usb_crc_error_interrupt_enabled(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTIMR[ep], UOTGHS_DEVEPTIMR_STALLEDE))
+ //! tests if overflow interrupt is enabled
+#define Is_usb_overflow_interrupt_enabled(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTIMR[ep], UOTGHS_DEVEPTIMR_OVERFE))
+ //! tests if NAK IN interrupt is enabled
+#define Is_usb_nak_in_interrupt_enabled(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTIMR[ep], UOTGHS_DEVEPTIMR_NAKINE))
+ //! tests if NAK OUT interrupt is enabled
+#define Is_usb_nak_out_interrupt_enabled(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTIMR[ep], UOTGHS_DEVEPTIMR_NAKOUTE))
+ //! tests if SETUP received interrupt is enabled
+#define Is_usb_setup_received_interrupt_enabled() (Tst_bits(Tst_bits(UOTGHS->UOTGHS_DEVEPTIMR[EP_CONTROL], UOTGHS_DEVEPTIMR_RXSTPE))
+ //! tests if underflow interrupt is enabled
+#define Is_usb_underflow_interrupt_enabled(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTIMR[ep], UOTGHS_DEVEPTIMR_RXSTPE))
+ //! tests if OUT received interrupt is enabled
+#define Is_usb_out_received_interrupt_enabled(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTIMR[ep], UOTGHS_DEVEPTIMR_RXOUTE))
+ //! tests if OUT received on control endpoint interrupt is enabled
+#define Is_usb_control_out_received_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_DEVEPTIMR[EP_CONTROL], UOTGHS_DEVEPTIMR_RXOUTE))
+ //! tests if IN ready interrupt is enabled
+#define Is_usb_in_ready_interrupt_enabled(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTIMR[ep], UOTGHS_DEVEPTIMR_TXINE))
+ //! tests if IN ready on control endpoint interrupt is enabled
+#define Is_usb_control_in_ready_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_DEVEPTIMR[EP_CONTROL], UOTGHS_DEVEPTIMR_TXINE))
+
+
+#define AVR32_USBB_SLAVE_ADDRESS UOTGHS_RAM_ADDR
+#define AVR32_USBB_SLAVE_SIZE 0x00800000
+#define AVR32_USBB_SLAVE ((unsigned char *)AVR32_USBB_SLAVE_ADDRESS)
+//#define USB_FIFO (((volatile uint32_t *)UOTGHS_RAM_ADDR))
+//#define USB_FIFO_CHAR (((volatile uint8_t *)UOTGHS_RAM_ADDR))
+#define TPASTE2( a, b) a##b
+#define TPASTE3( a, b, c) a##b##c
+
+//! Access point to the FIFO data registers of pipes/endpoints
+ //! @param x Pipe/endpoint of which to access FIFO data register
+ //! @param scale Data index scale in bits: 64, 32, 16 or 8
+ //! @return Volatile 64-, 32-, 16- or 8-bit data pointer to FIFO data register
+#define AVR32_USBB_FIFOX_DATA(x, scale) \
+ (((volatile TPASTE2(U, scale) (*)[0x8000 / ((scale) / 8)])AVR32_USBB_SLAVE)[(x)])
+
+
+//! Get 64-, 32-, 16- or 8-bit access to FIFO data register of selected endpoint.
+ //! @param ep Endpoint of which to access FIFO data register
+ //! @param scale Data scale in bits: 64, 32, 16 or 8
+ //! @return Volatile 64-, 32-, 16- or 8-bit data pointer to FIFO data register
+ //! @warning It is up to the user of this macro to make sure that all accesses
+ //! are aligned with their natural boundaries except 64-bit accesses which
+ //! require only 32-bit alignment.
+ //! @warning It is up to the user of this macro to make sure that used HSB
+ //! addresses are identical to the DPRAM internal pointer modulo 32 bits.
+#define Usb_get_endpoint_fifo_access(ep, scale) \
+ (AVR32_USBB_FIFOX_DATA(ep, scale))
+
+ //! Reset known position inside FIFO data register of selected endpoint.
+ //! @param ep Endpoint of which to reset known position
+ //! @warning Always call this macro before any read/write macro/function
+ //! when at FIFO beginning.
+#define Usb_reset_endpoint_fifo_access(ep) \
+ (pep_fifo[(ep)].u64ptr = Usb_get_endpoint_fifo_access(ep, 64))
+
+ //! Read 64-, 32-, 16- or 8-bit data from FIFO data register of selected endpoint.
+ //! @param ep Endpoint of which to access FIFO data register
+ //! @param scale Data scale in bits: 64, 32, 16 or 8
+ //! @return 64-, 32-, 16- or 8-bit data read
+ //! @warning It is up to the user of this macro to make sure that all accesses
+ //! are aligned with their natural boundaries except 64-bit accesses which
+ //! require only 32-bit alignment.
+ //! @note This macro assures that used HSB addresses are identical to the
+ //! DPRAM internal pointer modulo 32 bits.
+ //! @warning Always call Usb_reset_endpoint_fifo_access before this macro when
+ //! at FIFO beginning.
+ //! @warning Do not mix calls to this macro with calls to indexed macros below.
+#define Usb_read_endpoint_data(ep, scale) \
+ (*pep_fifo[(ep)].TPASTE3(u, scale, ptr)\
+ TPASTE3(Pep_fifo_access_, scale, _post_inc)())
+
+ //! Write 64-, 32-, 16- or 8-bit data to FIFO data register of selected endpoint.
+ //! @param ep Endpoint of which to access FIFO data register
+ //! @param scale Data scale in bits: 64, 32, 16 or 8
+ //! @param data 64-, 32-, 16- or 8-bit data to write
+ //! @return 64-, 32-, 16- or 8-bit data written
+ //! @warning It is up to the user of this macro to make sure that all accesses
+ //! are aligned with their natural boundaries except 64-bit accesses which
+ //! require only 32-bit alignment.
+ //! @note This macro assures that used HSB addresses are identical to the
+ //! DPRAM internal pointer modulo 32 bits.
+ //! @warning Always call Usb_reset_endpoint_fifo_access before this macro when
+ //! at FIFO beginning.
+ //! @warning Do not mix calls to this macro with calls to indexed macros below.
+#define Usb_write_endpoint_data(ep, scale, data) \
+ (*pep_fifo[(ep)].TPASTE3(u, scale, ptr)\
+ TPASTE3(Pep_fifo_access_, scale, _post_inc)() = (data))
+
+ //! Read 64-, 32-, 16- or 8-bit indexed data from FIFO data register of selected endpoint.
+ //! @param ep Endpoint of which to access FIFO data register
+ //! @param scale Data scale in bits: 64, 32, 16 or 8
+ //! @param index Index of scaled data array to access
+ //! @return 64-, 32-, 16- or 8-bit data read
+ //! @warning It is up to the user of this macro to make sure that all accesses
+ //! are aligned with their natural boundaries except 64-bit accesses which
+ //! require only 32-bit alignment.
+ //! @warning It is up to the user of this macro to make sure that used HSB
+ //! addresses are identical to the DPRAM internal pointer modulo 32 bits.
+ //! @warning Do not mix calls to this macro with calls to non-indexed macros above.
+#define Usb_read_endpoint_indexed_data(ep, scale, index) \
+ (AVR32_USBB_FIFOX_DATA(ep, scale)[(index)])
+
+ //! Write 64-, 32-, 16- or 8-bit indexed data to FIFO data register of selected endpoint.
+ //! @param ep Endpoint of which to access FIFO data register
+ //! @param scale Data scale in bits: 64, 32, 16 or 8
+ //! @param index Index of scaled data array to access
+ //! @param data 64-, 32-, 16- or 8-bit data to write
+ //! @return 64-, 32-, 16- or 8-bit data written
+ //! @warning It is up to the user of this macro to make sure that all accesses
+ //! are aligned with their natural boundaries except 64-bit accesses which
+ //! require only 32-bit alignment.
+ //! @warning It is up to the user of this macro to make sure that used HSB
+ //! addresses are identical to the DPRAM internal pointer modulo 32 bits.
+ //! @warning Do not mix calls to this macro with calls to non-indexed macros above.
+#define Usb_write_endpoint_indexed_data(ep, scale, index, data) \
+ (AVR32_USBB_FIFOX_DATA(ep, scale)[(index)] = (data))
+//! @}
+
+
+//! @defgroup USBB_general_endpoint_dma USBB endpoint DMA drivers
+//! These macros manage the common features of the endpoint DMA channels.
+//! @{
+ //! enables the disabling of HDMA requests by endpoint interrupts
+#define Usb_enable_endpoint_int_dis_hdma_req(ep) (UOTGHS->UOTGHS_DEVEPTIER[ep] = UOTGHS_DEVEPTIER_EPDISHDMAS)
+ //! disables the disabling of HDMA requests by endpoint interrupts
+#define Usb_disable_endpoint_int_dis_hdma_req(ep) (UOTGHS->UOTGHS_DEVEPTIDR[ep] = UOTGHS_DEVEPTIDR_EPDISHDMAC)
+ //! tests if the disabling of HDMA requests by endpoint interrupts is enabled
+#define Is_usb_endpoint_int_dis_hdma_req_enabled(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPTIMR[ep], UOTGHS_DEVEPTIMR_EPDISHDMA))
+
+ //! raises the selected endpoint DMA channel interrupt
+#define Usb_raise_endpoint_dma_interrupt(epdma) (UOTGHS->UOTGHS_DEVIFR = UOTGHS_DEVIFR_DMA_1 << ((epdma) - 1))
+ //! tests if an interrupt is triggered by the selected endpoint DMA channel
+#define Is_usb_endpoint_dma_interrupt(epdma) (Tst_bits(UOTGHS->UOTGHS_DEVISR, UOTGHS_DEVISR_DMA_1 << ((epdma) - 1)))
+ //! enables the selected endpoint DMA channel interrupt
+#define Usb_enable_endpoint_dma_interrupt(epdma) (UOTGHS->UOTGHS_DEVIER = UOTGHS_DEVIER_DMA_1 << ((epdma) - 1))
+ //! disables the selected endpoint DMA channel interrupt
+#define Usb_disable_endpoint_dma_interrupt(epdma) (UOTGHS->UOTGHS_DEVIDR = UOTGHS_DEVIDR_DMA_1 << ((epdma) - 1))
+ //! tests if the selected endpoint DMA channel interrupt is enabled
+#define Is_usb_endpoint_dma_interrupt_enabled(epdma) (Tst_bits(UOTGHS->UOTGHS_DEVIMR, UOTGHS_DEVIMR_DMA_1 << ((epdma) - 1)))
+//! @todo Implement macros for endpoint DMA registers and descriptors
+#if 0
+#define Usb_set_endpoint_dma_nxt_desc_addr(epdma, nxt_desc_addr) (AVR32_USBB_UDDMAX_NEXTDESC(epdma).nxt_desc_addr = (U32)(nxt_desc_addr))
+#define Usb_get_endpoint_dma_nxt_desc_addr(epdma) ((avr32_usbb_uxdmax_t *)AVR32_USBB_UDDMAX_NEXTDESC(epdma).nxt_desc_addr)
+#define (epdma) (AVR32_USBB_UDDMAX_addr(epdma))
+#define (epdma) (AVR32_USBB_UDDMAX_CONTROL(epdma).ch_byte_length)
+#define (epdma) (AVR32_USBB_UDDMAX_CONTROL(epdma).burst_lock_en)
+#define (epdma) (AVR32_USBB_UDDMAX_CONTROL(epdma).desc_ld_irq_en)
+#define (epdma) (AVR32_USBB_UDDMAX_CONTROL(epdma).eobuff_irq_en)
+#define (epdma) (AVR32_USBB_UDDMAX_CONTROL(epdma).eot_irq_en)
+#define (epdma) (AVR32_USBB_UDDMAX_CONTROL(epdma).dmaend_en)
+#define (epdma) (AVR32_USBB_UDDMAX_CONTROL(epdma).buff_close_in_en)
+#define (epdma) (AVR32_USBB_UDDMAX_CONTROL(epdma).ld_nxt_ch_desc_en)
+#define (epdma) (AVR32_USBB_UDDMAX_CONTROL(epdma).ch_en)
+#define (epdma) (AVR32_USBB_UDDMAX_STATUS(epdma).ch_byte_cnt)
+#define (epdma) (AVR32_USBB_UDDMAX_STATUS(epdma).desc_ld_sta)
+#define (epdma) (AVR32_USBB_UDDMAX_STATUS(epdma).eoch_buff_sta)
+#define (epdma) (AVR32_USBB_UDDMAX_STATUS(epdma).eot_sta)
+#define (epdma) (AVR32_USBB_UDDMAX_STATUS(epdma).ch_active)
+#define (epdma) (AVR32_USBB_UDDMAX_STATUS(epdma).ch_en)
+#endif
+//! @}
+
+
+//! @defgroup USBB_host_driver USBB host controller drivers
+//! These macros manage the USBB Host controller.
+//! @{
+ //! enables SOF generation
+#define Host_enable_sof() (Set_bits(UOTGHS->UOTGHS_HSTCTRL, UOTGHS_HSTCTRL_SOFE))
+ //! disables SOF generation
+#define Host_disable_sof() (Clr_bits(UOTGHS->UOTGHS_HSTCTRL, UOTGHS_HSTCTRL_SOFE))
+ //! tests if SOF generation enabled
+#define Is_host_sof_enabled() (Tst_bits(UOTGHS->UOTGHS_HSTCTRL, UOTGHS_HSTCTRL_SOFE))
+ //! sends a USB Reset to the device
+#define Host_send_reset() (Set_bits(UOTGHS->UOTGHS_HSTCTRL, UOTGHS_HSTCTRL_RESET))
+ //! stops sending a USB Reset to the device
+#define Host_stop_sending_reset() (Clr_bits(UOTGHS->UOTGHS_HSTCTRL, UOTGHS_HSTCTRL_RESET))
+ //! tests if USB Reset running
+#define Is_host_sending_reset() (Tst_bits(UOTGHS->UOTGHS_HSTCTRL, UOTGHS_HSTCTRL_RESET))
+ //! sends a USB Resume to the device
+#define Host_send_resume() (Set_bits(UOTGHS->UOTGHS_HSTCTRL, UOTGHS_HSTCTRL_RESUME))
+ //! tests if USB Resume running
+#define Is_host_sending_resume() (Tst_bits(UOTGHS->UOTGHS_HSTCTRL, UOTGHS_HSTCTRL_RESUME))
+
+#ifdef AVR32_USBB_UHCON_SPDCONF
+ //! Force device full speed mode (i.e. disable high speed)
+#define Host_force_full_speed_mode() (Wr_bitfield(UOTGHS->UOTGHS_HSTCTRL, UOTGHS_HSTCTRL_SPDCONF_Msk, 3, UOTGHS_HSTCTRL_SPDCONF_Pos))
+ //! Enable hihgh speed mode
+#define Host_enable_high_speed_mode() (Wr_bitfield(UOTGHS->UOTGHS_HSTCTRL, UOTGHS_HSTCTRL_SPDCONF_Msk, 0, UOTGHS_HSTCTRL_SPDCONF_Pos))
+#endif
+
+ //! enables host Start-of-Frame interrupt
+#define Host_enable_sof_interrupt() (UOTGHS->UOTGHS_HSTIER = UOTGHS_HSTIER_HSOFIES)
+ //! enables host Start-of-Frame interrupt
+#define Host_disable_sof_interrupt() (UOTGHS->UOTGHS_HSTIDR = UOTGHS_HSTIDR_HSOFIEC)
+#define Is_host_sof_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_HSTIMR, UOTGHS_HSTIMR_HSOFIE))
+ //! acks SOF detection
+#define Host_ack_sof() (UOTGHS->UOTGHS_HSTICR = UOTGHS_HSTICR_HSOFIC)
+ //! raises SOF detection
+#define Host_raise_sof() (UOTGHS->UOTGHS_HSTIFR = UOTGHS_HSTIFR_HSOFIS)
+ //! tests if SOF detected
+#define Is_host_sof() (Tst_bits(UOTGHS->UOTGHS_HSTISR, UOTGHS_HSTISR_HSOFI))
+
+ //! enables host wake-up interrupt detection
+#define Host_enable_hwup_interrupt() (UOTGHS->UOTGHS_HSTIER = UOTGHS_HSTIER_HWUPIES)
+ //! disables host wake-up interrupt detection
+#define Host_disable_hwup_interrupt() (UOTGHS->UOTGHS_HSTIDR = UOTGHS_HSTIDR_HWUPIEC)
+#define Is_host_hwup_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_HSTIMR, UOTGHS_HSTIMR_HWUPIE))
+ //! acks host wake-up detection
+#define Host_ack_hwup() (UOTGHS->UOTGHS_HSTICR = UOTGHS_HSTICR_HWUPIC)
+ //! raises host wake-up detection
+#define Host_raise_hwup() (UOTGHS->UOTGHS_HSTIFR = UOTGHS_HSTIFR_HWUPIS)
+ //! tests if host wake-up detected
+#define Is_host_hwup() (Tst_bits(UOTGHS->UOTGHS_HSTISR, UOTGHS_HSTISR_HWUPI))
+
+ //! enables host down stream rsm sent interrupt detection
+#define Host_enable_down_stream_resume_interrupt() (UOTGHS->UOTGHS_HSTIER = UOTGHS_HSTIER_RSMEDIES)
+ //! disables host down stream rsm sent interrupt detection
+#define Host_disable_down_stream_resume_interrupt() (UOTGHS->UOTGHS_HSTIDR = UOTGHS_HSTIDR_RSMEDIEC)
+#define Is_host_down_stream_resume_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_HSTIMR, UOTGHS_HSTIMR_RSMEDIE))
+ //! acks host down stream resume sent
+#define Host_ack_down_stream_resume() (UOTGHS->UOTGHS_HSTICR = UOTGHS_HSTICR_RSMEDIC)
+ //! raises host down stream resume sent
+#define Host_raise_down_stream_resume() (UOTGHS->UOTGHS_HSTIFR = UOTGHS_HSTIFR_RSMEDIS)
+#define Is_host_down_stream_resume() (Tst_bits(UOTGHS->UOTGHS_HSTISR, UOTGHS_HSTISR_RSMEDI))
+
+ //! enables host remote wake-up interrupt detection
+#define Host_enable_remote_wakeup_interrupt() (UOTGHS->UOTGHS_HSTIER = UOTGHS_HSTIER_RXRSMIES)
+ //! disables host remote wake-up interrupt detection
+#define Host_disable_remote_wakeup_interrupt() (UOTGHS->UOTGHS_HSTIDR = UOTGHS_HSTIDR_RXRSMIEC)
+#define Is_host_remote_wakeup_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_HSTIMR, UOTGHS_HSTIMR_RXRSMIE))
+ //! acks host remote wake-up detection
+#define Host_ack_remote_wakeup() (UOTGHS->UOTGHS_HSTICR = UOTGHS_HSTICR_RXRSMIC)
+ //! raises host remote wake-up detection
+#define Host_raise_remote_wakeup() (UOTGHS->UOTGHS_HSTIFR = UOTGHS_HSTIFR_RXRSMIS)
+ //! tests if host remote wake-up detected
+#define Is_host_remote_wakeup() (Tst_bits(UOTGHS->UOTGHS_HSTISR, UOTGHS_HSTISR_RXRSMI))
+
+ //! enables host device connection interrupt
+#define Host_enable_device_connection_interrupt() (UOTGHS->UOTGHS_HSTIER = UOTGHS_HSTIER_DCONNIES)
+ //! disables USB device connection interrupt
+#define Host_disable_device_connection_interrupt() (UOTGHS->UOTGHS_HSTIDR = UOTGHS_HSTIDR_DCONNIEC)
+#define Is_host_device_connection_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_HSTIMR, UOTGHS_HSTIMR_DCONNIE))
+ //! acks device connection
+#define Host_ack_device_connection() (UOTGHS->UOTGHS_HSTICR = UOTGHS_HSTICR_DCONNIC)
+ //! raises device connection
+#define Host_raise_device_connection() (UOTGHS->UOTGHS_HSTIFR = UOTGHS_HSTIFR_DCONNIS)
+ //! tests if a USB device has been detected
+#define Is_host_device_connection() (Tst_bits(UOTGHS->UOTGHS_HSTISR, UOTGHS_HSTISR_DCONNI))
+
+ //! enables host device disconnection interrupt
+#define Host_enable_device_disconnection_interrupt() (UOTGHS->UOTGHS_HSTIER = UOTGHS_HSTIER_DDISCIES)
+ //! disables USB device connection interrupt
+#define Host_disable_device_disconnection_interrupt() (UOTGHS->UOTGHS_HSTIDR = UOTGHS_HSTIDR_DDISCIEC)
+#define Is_host_device_disconnection_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_HSTIMR, UOTGHS_HSTIMR_DDISCIE))
+ //! acks device disconnection
+#define Host_ack_device_disconnection() (UOTGHS->UOTGHS_HSTICR = UOTGHS_HSTICR_DDISCIC)
+ //! raises device disconnection
+#define Host_raise_device_disconnection() (UOTGHS->UOTGHS_HSTIFR = UOTGHS_HSTIFR_DDISCIS)
+ //! tests if a USB device has been removed
+#define Is_host_device_disconnection() (Tst_bits(UOTGHS->UOTGHS_HSTISR, UOTGHS_HSTISR_DDISCI))
+
+ //! enables host USB reset sent interrupt
+#define Host_enable_reset_sent_interrupt() (UOTGHS->UOTGHS_HSTIER = UOTGHS_HSTIER_RSTIES)
+ //! disables host USB reset sent interrupt
+#define Host_disable_reset_sent_interrupt() (UOTGHS->UOTGHS_HSTIDR = UOTGHS_HSTIDR_RSTIEC)
+#define Is_host_reset_sent_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_HSTIMR, UOTGHS_HSTIMR_RSTIE))
+ //! acks host USB reset sent
+#define Host_ack_reset_sent() (UOTGHS->UOTGHS_HSTICR = UOTGHS_HSTICR_RSTIC)
+ //! raises host USB reset sent
+#define Host_raise_reset_sent() (UOTGHS->UOTGHS_HSTIFR = UOTGHS_HSTIFR_RSTIS)
+ //! tests if host USB reset sent
+#define Is_host_reset_sent() (Tst_bits(UOTGHS->UOTGHS_HSTISR, UOTGHS_HSTISR_RSTI))
+
+ //! sets the current frame number
+#define Host_set_frame_number(fnum) (Wr_bitfield(UOTGHS->UOTGHS_HSTFNUM, UOTGHS_HSTFNUM_MFNUM_Msk, fnum, UOTGHS_HSTFNUM_MFNUM_Pos))
+ //! returns the current frame number
+#define Host_frame_number() (Rd_bitfield(UOTGHS->UOTGHS_HSTFNUM, UOTGHS_HSTFNUM_MFNUM_Msk, UOTGHS_HSTFNUM_MFNUM_Pos))
+ //! returns the current frame length
+#define Host_frame_length() (Rd_bitfield(UOTGHS->UOTGHS_HSTFNUM, UOTGHS_HSTFNUM_FLENHIGH_Msk, UOTGHS_HSTFNUM_FLENHIGH_Pos))
+
+ //! configures the USB device address associated with the selected pipe
+//#define Host_configure_address(p, addr) (Wr_bitfield(AVR32_USBB_uhaddrx(1 + ((p) >> 2)), AVR32_USBB_UHADDR1_UHADDR_P0_MASK << (((p) & 0x03) << 3), addr))
+//#define Host_configure_address(p, addr) (Wr_bitfield(UOTGHS->UOTGHS_HSTADDR1[1 + ((p) >> 2)], UOTGHS_HSTADDR1_HSTADDRP0_Msk << (((p) & 0x03) << 3), addr, UOTGHS_HSTADDR1_HSTADDRP0_Pos))
+ //! gets the currently configured USB device address associated with the selected pipe
+//#define Host_get_configured_address(p) (Rd_bitfield(AVR32_USBB_uhaddrx(1 + ((p) >> 2)), AVR32_USBB_UHADDR1_UHADDR_P0_MASK << (((p) & 0x03) << 3)))
+#define Host_get_configured_address(p) (Rd_bitfield(UOTGHS->UOTGHS_HSTADDR1[1 + ((p) >> 2)], UOTGHS_HSTADDR1_HSTADDRP0_Msk << (((p) & 0x03) << 3), UOTGHS_HSTADDR1_HSTADDRP0_Pos))
+//! @}
+
+
+//! @defgroup USBB_general_pipe USBB pipe drivers
+//! These macros manage the common features of the pipes.
+//! @{
+ //! enables the selected pipe
+#define Host_enable_pipe(p) (Set_bits(UOTGHS->UOTGHS_HSTPIP, UOTGHS_HSTPIP_PEN0 << (p)))
+ //! disables the selected pipe
+#define Host_disable_pipe(p) (Clr_bits(UOTGHS->UOTGHS_HSTPIP, UOTGHS_HSTPIP_PEN0 << (p)))
+ //! tests if the selected pipe is enabled
+#define Is_host_pipe_enabled(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIP, UOTGHS_HSTPIP_PEN0 << (p)))
+
+ //! tests if an interrupt is triggered by the selected pipe
+#define Is_host_pipe_interrupt(p) (Tst_bits(UOTGHS->UOTGHS_HSTISR, UOTGHS_HSTISR_PEP_0 << (p)))
+ //! enables the selected pipe interrupt
+#define Host_enable_pipe_interrupt(p) (UOTGHS->UOTGHS_HSTIER = UOTGHS_HSTIER_PEP_0 << (p))
+ //! disables the selected pipe interrupt
+#define Host_disable_pipe_interrupt(p) (UOTGHS->UOTGHS_HSTIDR = UOTGHS_HSTIDR_PEP_0 << (p))
+ //! tests if the selected pipe interrupt is enabled
+#define Is_host_pipe_interrupt_enabled(p) (Tst_bits(UOTGHS->UOTGHS_HSTIMR, UOTGHS_HSTIMR_PEP_0 << (p)))
+ //! returns the lowest pipe number generating a pipe interrupt or MAX_PEP_NB if none
+#define Host_get_interrupt_pipe_number(p) ((UOTGHS->UOTGHS_HSTISR >> 8 >> p) &\
+ (UOTGHS->UOTGHS_HSTIMR >> 8 >> p))
+
+ //! configures the interrupt pipe request frequency (period in ms) for the selected pipe
+#define Host_configure_pipe_int_req_freq(p, freq) (Wr_bitfield(UOTGHS->UOTGHS_HSTPIPCFG[p], UOTGHS_HSTPIPCFG_INTFRQ_Msk, freq, UOTGHS_HSTPIPCFG_INTFRQ_Pos))
+ //! gets the configured interrupt pipe request frequency (period in ms) for the selected pipe
+#define Host_get_pipe_int_req_freq(p) (Rd_bitfield(UOTGHS->UOTGHS_HSTPIPCFG[p], UOTGHS_HSTPIPCFG_INTFRQ_Msk, UOTGHS_HSTPIPCFG_INTFRQ_Pos))
+ //! configures the selected pipe endpoint number
+#define Host_configure_pipe_endpoint_number(p, ep_num) (Wr_bitfield(UOTGHS->UOTGHS_HSTPIPCFG[p], UOTGHS_HSTPIPCFG_PEPNUM_Msk, ep_num, UOTGHS_HSTPIPCFG_PEPNUM_Pos))
+ //! gets the configured selected pipe endpoint number
+#define Host_get_pipe_endpoint_number(p) (Rd_bitfield(UOTGHS->UOTGHS_HSTPIPCFG[p], UOTGHS_HSTPIPCFG_PEPNUM_Msk, UOTGHS_HSTPIPCFG_PEPNUM_Pos))
+ //! configures the selected pipe type
+#define Host_configure_pipe_type(p, type) (Wr_bitfield(UOTGHS->UOTGHS_HSTPIPCFG[p], UOTGHS_HSTPIPCFG_PTYPE_Msk, type, UOTGHS_HSTPIPCFG_PTYPE_Pos))
+ //! gets the configured selected pipe type
+#define Host_get_pipe_type(p) (Rd_bitfield(UOTGHS->UOTGHS_HSTPIPCFG[p], UOTGHS_HSTPIPCFG_PTYPE_Msk, UOTGHS_HSTPIPCFG_PTYPE_Pos))
+ //! enables the bank autoswitch for the selected pipe
+#define Host_enable_pipe_bank_autoswitch(p) (Set_bits(UOTGHS->UOTGHS_HSTPIPCFG[p], UOTGHS_HSTPIPCFG_AUTOSW))
+ //! disables the bank autoswitch for the selected pipe
+#define Host_disable_pipe_bank_autoswitch(p) (Clr_bits(UOTGHS->UOTGHS_HSTPIPCFG[p], UOTGHS_HSTPIPCFG_AUTOSW))
+#define Is_host_pipe_bank_autoswitch_enabled(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPCFG[p], UOTGHS_HSTPIPCFG_AUTOSW))
+ //! configures the selected pipe token
+#define Host_configure_pipe_token(p, token) (Wr_bitfield(UOTGHS->UOTGHS_HSTPIPCFG[p], UOTGHS_HSTPIPCFG_PTOKEN_Msk, token, UOTGHS_HSTPIPCFG_PTOKEN_Pos))
+ //! gets the configured selected pipe token
+#define Host_get_pipe_token(p) (Rd_bitfield(UOTGHS->UOTGHS_HSTPIPCFG[p], UOTGHS_HSTPIPCFG_PTOKEN_Msk, UOTGHS_HSTPIPCFG_PTOKEN_Pos))
+ //! Bounds given integer size to allowed range and rounds it up to the nearest
+ //! available greater size, then applies register format of USBB controller
+ //! for pipe size bit-field.
+//#define Host_format_pipe_size(size) (32 - clz(((U32)min(max(size, 8), 1024) << 1) - 1) - 1 - 3)
+#define Host_format_pipe_size(size) (size <= 8 ) ? ( 8):\
+ (size <= 16 ) ? ( 16):\
+ (size <= 32 ) ? ( 32):\
+ (size <= 64 ) ? ( 64):\
+ (size <= 128) ? (128):\
+ (size <= 256) ? (256):\
+ (size <= 512) ? (512):(1024)
+ //! configures the selected pipe size
+#define Host_configure_pipe_size(p, size) (Wr_bitfield(UOTGHS->UOTGHS_HSTPIPCFG[p], UOTGHS_HSTPIPCFG_PSIZE_Msk, Host_format_pipe_size(size), UOTGHS_HSTPIPCFG_PSIZE_Pos))
+ //! gets the configured selected pipe size
+#define Host_get_pipe_size(p) (8U << Rd_bitfield(UOTGHS->UOTGHS_HSTPIPCFG[p], UOTGHS_HSTPIPCFG_PSIZE_Msk, UOTGHS_HSTPIPCFG_PSIZE_Pos))
+ //! configures the selected pipe number of banks
+#define Host_configure_pipe_bank(p, bank) (Wr_bitfield(UOTGHS->UOTGHS_HSTPIPCFG[p], UOTGHS_HSTPIPCFG_PBK_Msk, bank, UOTGHS_HSTPIPCFG_PBK_Pos))
+ //! gets the configured selected pipe number of banks
+#define Host_get_pipe_bank(p) (Rd_bitfield(UOTGHS->UOTGHS_HSTPIPCFG[p], UOTGHS_HSTPIPCFG_PBK_Msk, UOTGHS_HSTPIPCFG_PBK_Pos))
+ //! allocates the configuration x in DPRAM memory
+#define Host_allocate_memory(p) (Set_bits(UOTGHS->UOTGHS_HSTPIPCFG[p], UOTGHS_HSTPIPCFG_ALLOC))
+ //! un-allocates the configuration x in DPRAM memory
+#define Host_unallocate_memory(p) (Clr_bits(UOTGHS->UOTGHS_HSTPIPCFG[p], UOTGHS_HSTPIPCFG_ALLOC))
+#define Is_host_memory_allocated(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPCFG[p], UOTGHS_HSTPIPCFG_ALLOC))
+ //! Enable PING management for the endpoint p
+#define Host_enable_ping(p) (Set_bits(UOTGHS->UOTGHS_HSTPIPCFG[p], UOTGHS_HSTPIPCFG_PINGEN))
+
+ //! configures selected pipe in one step
+#define Host_configure_pipe(p, freq, ep_num, type, token, size, bank) \
+(\
+ Host_enable_pipe(p),\
+ Clr_bits(UOTGHS->UOTGHS_HSTPIPCFG[p], 0xFFFFFFFF),\
+ Wr_bits(UOTGHS->UOTGHS_HSTPIPCFG[p], UOTGHS_HSTPIPCFG_INTFRQ_Msk |\
+ UOTGHS_HSTPIPCFG_PEPNUM_Msk |\
+ UOTGHS_HSTPIPCFG_PTYPE_Msk |\
+ UOTGHS_HSTPIPCFG_PTOKEN_Msk |\
+ UOTGHS_HSTPIPCFG_PSIZE_Msk |\
+ UOTGHS_HSTPIPCFG_PBK_Msk, \
+ (UOTGHS_HSTPIPCFG_INTFRQ((U32)(freq ))) |\
+ (UOTGHS_HSTPIPCFG_PEPNUM((U32)(ep_num))) |\
+ ( (U32)(type ) << UOTGHS_HSTPIPCFG_PTYPE_Pos ) |\
+ ( (U32)(token ) << UOTGHS_HSTPIPCFG_PTOKEN_Pos) |\
+ ( (U32)Usb_format_endpoint_size(size) << UOTGHS_HSTPIPCFG_PSIZE_Pos ) |\
+ ( (U32)(bank ) << UOTGHS_HSTPIPCFG_PBK_Pos ) ),\
+ Host_allocate_memory(p),\
+\
+ Is_host_pipe_configured(p)\
+)
+
+
+//static void Host_configure_pipe(uint8_t p, uint32_t freq, uint32_t ep_num, uint32_t type, uint32_t token, uint32_t size, uint32_t bank)
+//{
+//// Host_enable_pipe(p);
+//// Wr_bits(UOTGHS->UOTGHS_HSTPIPCFG[p], UOTGHS_HSTPIPCFG_INTFRQ_Msk |
+//// UOTGHS_HSTPIPCFG_PEPNUM_Msk |
+//// UOTGHS_HSTPIPCFG_PTYPE_Msk |
+//// UOTGHS_HSTPIPCFG_PTOKEN_Msk |
+//// UOTGHS_HSTPIPCFG_PSIZE_Msk |
+//// UOTGHS_HSTPIPCFG_PBK_Msk,
+//// (UOTGHS_HSTPIPCFG_INTFRQ((U32)(freq ))) |
+//// (UOTGHS_HSTPIPCFG_PEPNUM((U32)(ep_num))) |
+//// (((U32)(type ) << UOTGHS_HSTPIPCFG_PTYPE_Pos ) & UOTGHS_HSTPIPCFG_PTYPE_Msk ) |
+//// (((U32)(token ) << UOTGHS_HSTPIPCFG_PTOKEN_Pos) & UOTGHS_HSTPIPCFG_PTOKEN_Msk) |
+//// ( (U32)Host_format_pipe_size(size) << UOTGHS_HSTPIPCFG_PSIZE_Pos ) |
+//// (((U32)(bank ) << UOTGHS_HSTPIPCFG_PBK_Pos ) & UOTGHS_HSTPIPCFG_PBK_Msk ));
+//// Host_allocate_memory(p);
+//// Is_host_pipe_configured(p);
+//}
+
+ //! resets the selected pipe
+#define Host_reset_pipe(p) (Set_bits(UOTGHS->UOTGHS_HSTPIP, UOTGHS_HSTPIP_PRST0 << (p)),\
+ Clr_bits(UOTGHS->UOTGHS_HSTPIP, UOTGHS_HSTPIP_PRST0 << (p)))
+ //! tests if the selected pipe is being reset
+#define Is_host_resetting_pipe(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIP, UOTGHS_HSTPIP_PRST0 << (p)))
+
+ //! freezes the pipe
+#define Host_freeze_pipe(p) (UOTGHS->UOTGHS_HSTPIPIER[p] = UOTGHS_HSTPIPIER_PFREEZES)
+ //! unfreezees the pipe
+#define Host_unfreeze_pipe(p) (UOTGHS->UOTGHS_HSTPIPIDR[p] = UOTGHS_HSTPIPIDR_PFREEZEC)
+ //! tests if the current pipe is frozen
+#define Is_host_pipe_frozen(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPIMR[p], UOTGHS_HSTPIPIMR_PFREEZE))
+
+ //! resets the data toggle sequence
+#define Host_reset_data_toggle(p) (UOTGHS->UOTGHS_HSTPIPIER[p] = UOTGHS_HSTPIPIER_RSTDTS)
+ //! tests if the data toggle sequence is being reset
+#define Is_host_data_toggle_reset(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPIMR[p], UOTGHS_HSTPIPIMR_RSTDT))
+
+ //! acks pipe overflow interrupt
+#define Host_ack_overflow_interrupt(p) (UOTGHS->UOTGHS_HSTPIPICR[p] = UOTGHS_HSTPIPICR_OVERFIC)
+ //! raises pipe overflow interrupt
+#define Host_raise_overflow_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIFR[p] = UOTGHS_HSTPIPIFR_OVERFIS)
+ //! acks pipe underflow interrupt
+#define Host_ack_underflow_interrupt(p) (UOTGHS->UOTGHS_HSTPIPICR[p] = UOTGHS_HSTPIPICR_TXSTPIC)
+ //! raises pipe underflow interrupt
+#define Host_raise_underflow_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIFR[p] = UOTGHS_HSTPIPIFR_TXSTPIS)
+ //! tests if an overflow occurs
+#define Is_host_overflow(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPISR[p], UOTGHS_HSTPIPISR_OVERFI))
+ //! tests if an underflow occurs
+#define Is_host_underflow(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPISR[p], UOTGHS_HSTPIPISR_TXSTPI))
+
+ //! returns data toggle
+#define Host_data_toggle(p) (Rd_bitfield(UOTGHS->UOTGHS_HSTPIPISR[p], UOTGHS_HSTPIPISR_DTSEQ_Msk, UOTGHS_HSTPIPISR_DTSEQ_Pos))
+ //! returns the number of busy banks
+#define Host_nb_busy_bank(p) (Rd_bitfield(UOTGHS->UOTGHS_HSTPIPISR[p], UOTGHS_HSTPIPISR_NBUSYBK_Msk, UOTGHS_HSTPIPISR_NBUSYBK_Pos))
+ //! returns the number of the current bank
+#define Host_current_bank(p) (Rd_bitfield(UOTGHS->UOTGHS_HSTPIPISR[p], UOTGHS_HSTPIPISR_CURRBK_Msk, UOTGHS_HSTPIPISR_CURRBK_Pos))
+ //! tests if current pipe is configured
+#define Is_host_pipe_configured(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPISR[p], UOTGHS_HSTPIPISR_CFGOK))
+ //! returns the byte count
+#define Host_byte_count(p) (Rd_bitfield(UOTGHS->UOTGHS_HSTPIPISR[p], UOTGHS_HSTPIPISR_PBYCT_Msk, UOTGHS_HSTPIPISR_PBYCT_Pos))
+
+ //! tests if a STALL has been received
+#define Is_host_stall(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPISR[p], UOTGHS_HSTPIPISR_RXSTALLDI))
+ //! tests if CRC ERROR ISO IN detected
+#define Is_host_crc_error(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPISR[p], UOTGHS_HSTPIPISR_RXSTALLDI))
+ //! tests if an error occurs on current pipe
+#define Is_host_pipe_error(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPISR[p], UOTGHS_HSTPIPISR_PERRI))
+ //! tests if SHORT PACKET received
+#define Is_host_short_packet(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPISR[p], UOTGHS_HSTPIPISR_SHORTPACKETI))
+
+ //! clears FIFOCON bit
+#define Host_ack_fifocon(p) (UOTGHS->UOTGHS_HSTPIPIDR[p] = UOTGHS_HSTPIPIDR_FIFOCONC)
+
+ //! acks setup
+#define Host_ack_setup_ready() (UOTGHS->UOTGHS_HSTPIPICR[P_CONTROL] = UOTGHS_HSTPIPICR_TXSTPIC)
+ //! raises setup
+#define Host_raise_setup_ready() (UOTGHS->UOTGHS_HSTPIPIFR[P_CONTROL] = UOTGHS_HSTPIPIFR_TXSTPIS)
+ //! sends current bank for SETUP pipe
+#define Host_send_setup() (Host_ack_fifocon(P_CONTROL))
+ //! acks setup and sends current bank
+#define Host_ack_setup_ready_send() (Host_ack_setup_ready(), Host_send_setup())
+ //! acks OUT sent
+#define Host_ack_out_ready(p) (UOTGHS->UOTGHS_HSTPIPICR[p] = UOTGHS_HSTPIPICR_TXOUTIC)
+ //! raises OUT sent
+#define Host_raise_out_ready(p) (UOTGHS->UOTGHS_HSTPIPIFR[p] = UOTGHS_HSTPIPIFR_TXOUTIS)
+ //! sends current bank for OUT pipe
+#define Host_send_out(p) (Host_ack_fifocon(p))
+ //! acks OUT sent and sends current bank
+#define Host_ack_out_ready_send(p) (Host_ack_out_ready(p), Host_send_out(p))
+
+ //! acks IN reception
+#define Host_ack_in_received(p) (UOTGHS->UOTGHS_HSTPIPICR[p] = UOTGHS_HSTPIPICR_RXINIC)
+ //! raises IN reception
+#define Host_raise_in_received(p) (UOTGHS->UOTGHS_HSTPIPIFR[p] = UOTGHS_HSTPIPIFR_RXINIS)
+ //! frees current bank for IN pipe
+#define Host_free_in(p) (Host_ack_fifocon(p))
+ //! acks IN reception and frees current bank
+#define Host_ack_in_received_free(p) (Host_ack_in_received(p), Host_free_in(p))
+
+ //! tests if FIFOCON bit set
+#define Is_host_fifocon(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPIMR[p], UOTGHS_HSTPIPIMR_FIFOCON))
+
+ //! tests if SETUP has been sent
+#define Is_host_setup_ready() (Tst_bits(UOTGHS->UOTGHS_HSTPIPISR[P_CONTROL], UOTGHS_HSTPIPISR_TXSTPI))
+ //! tests if current bank sent for SETUP pipe
+#define Is_host_setup_sent() (Is_host_fifocon(P_CONTROL))
+ //! tests if OUT has been sent
+#define Is_host_out_ready(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPISR[p], UOTGHS_HSTPIPISR_TXOUTI))
+ //! tests if current bank sent for OUT pipe
+#define Is_host_out_sent(p) (Is_host_fifocon(p))
+
+ //! tests if IN received
+#define Is_host_in_received(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPISR[p], UOTGHS_HSTPIPISR_RXINI))
+ //! tests if IN received in current bank
+#define Is_host_in_filled(p) (Is_host_fifocon(p))
+
+ //! acks STALL reception
+#define Host_ack_stall(p) (UOTGHS->UOTGHS_HSTPIPICR[p] = UOTGHS_HSTPIPICR_RXSTALLDIC)
+ //! raises STALL reception
+#define Host_raise_stall(p) (UOTGHS->UOTGHS_HSTPIPIFR[p] = UOTGHS_HSTPIPIFR_RXSTALLDIS)
+ //! acks CRC ERROR ISO IN detected
+#define Host_ack_crc_error(p) (UOTGHS->UOTGHS_HSTPIPICR[p] = UOTGHS_HSTPIPICR_RXSTALLDIC)
+ //! raises CRC ERROR ISO IN detected
+#define Host_raise_crc_error(p) (UOTGHS->UOTGHS_HSTPIPIFR[p] = UOTGHS_HSTPIPIFR_RXSTALLDIS)
+ //! acks pipe error
+#define Host_ack_pipe_error(p) (UOTGHS->UOTGHS_HSTPIPIFR[p] = (Is_host_pipe_error(p)) ? UOTGHS_HSTPIPIFR_PERRIS : 0)
+ //! raises pipe error
+#define Host_raise_pipe_error(p) (UOTGHS->UOTGHS_HSTPIPIFR[p] = (Is_host_pipe_error(p)) ? 0 : UOTGHS_HSTPIPIFR_PERRIS)
+ //! acks SHORT PACKET received
+#define Host_ack_short_packet(p) (UOTGHS->UOTGHS_HSTPIPICR[p] = UOTGHS_HSTPIPICR_SHORTPACKETIC)
+ //! raises SHORT PACKET received
+#define Host_raise_short_packet(p) (UOTGHS->UOTGHS_HSTPIPIFR[p] = UOTGHS_HSTPIPIFR_SHORTPACKETIS)
+
+ //! tests if NAK handshake has been received
+#define Is_host_nak_received(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPISR[p], UOTGHS_HSTPIPISR_NAKEDI))
+ //! acks NAK received
+#define Host_ack_nak_received(p) (UOTGHS->UOTGHS_HSTPIPICR[p] = UOTGHS_HSTPIPICR_NAKEDIC)
+ //! raises NAK received
+#define Host_raise_nak_received(p) (UOTGHS->UOTGHS_HSTPIPIFR[p] = UOTGHS_HSTPIPIFR_NAKEDIS)
+
+ //! tests if pipe read allowed
+#define Is_host_read_enabled(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPISR[p], UOTGHS_HSTPIPISR_RWALL))
+ //! tests if pipe write allowed
+#define Is_host_write_enabled(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPISR[p], UOTGHS_HSTPIPISR_RWALL))
+
+ //! enables continuous IN mode
+#define Host_enable_continuous_in_mode(p) (Set_bits(UOTGHS->UOTGHS_HSTPIPINRQ[p], UOTGHS_HSTPIPINRQ_INMODE))
+ //! disables continuous IN mode
+#define Host_disable_continuous_in_mode(p) (Clr_bits(UOTGHS->UOTGHS_HSTPIPINRQ[p], UOTGHS_HSTPIPINRQ_INMODE))
+ //! tests if continuous IN mode is enabled
+#define Is_host_continuous_in_mode_enabled(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPINRQ[p], UOTGHS_HSTPIPINRQ_INMODE))
+
+ //! sets number of IN requests to perform before freeze
+#define Host_in_request_number(p, in_num) (Wr_bitfield(UOTGHS->UOTGHS_HSTPIPINRQ[p], UOTGHS_HSTPIPINRQ_INRQ_Msk, (in_num) - 1, UOTGHS_HSTPIPINRQ_INRQ_Pos))
+ //! returns number of remaining IN requests
+#define Host_get_in_request_number(p) (Rd_bitfield(UOTGHS->UOTGHS_HSTPIPINRQ[p], UOTGHS_HSTPIPINRQ_INRQ_Msk) + 1, UOTGHS_HSTPIPINRQ_INRQ_Pos)
+
+ //! acks all pipe error
+#define Host_ack_all_errors(p) (Clr_bits(UOTGHS->UOTGHS_HSTPIPERR[p], UOTGHS_HSTPIPERR_DATATGL |\
+ UOTGHS_HSTPIPERR_DATAPID |\
+ UOTGHS_HSTPIPERR_PID |\
+ UOTGHS_HSTPIPERR_TIMEOUT |\
+ UOTGHS_HSTPIPERR_CRC16 |\
+ UOTGHS_HSTPIPERR_COUNTER_Msk))
+ //! tests if error occurs on pipe
+#define Host_error_status(p) (Rd_bits(UOTGHS->UOTGHS_HSTPIPERR[p], UOTGHS_HSTPIPERR_DATATGL |\
+ UOTGHS_HSTPIPERR_DATAPID |\
+ UOTGHS_HSTPIPERR_PID |\
+ UOTGHS_HSTPIPERR_TIMEOUT |\
+ UOTGHS_HSTPIPERR_CRC16))
+
+ //! acks bad data toggle
+#define Host_ack_bad_data_toggle(p) (Clr_bits(UOTGHS->UOTGHS_HSTPIPERR[p], UOTGHS_HSTPIPERR_DATATGL))
+#define Is_host_bad_data_toggle(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPERR[p], UOTGHS_HSTPIPERR_DATATGL))
+ //! acks data PID error
+#define Host_ack_data_pid_error(p) (Clr_bits(UOTGHS->UOTGHS_HSTPIPERR[p], UOTGHS_HSTPIPERR_DATAPID))
+#define Is_host_data_pid_error(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPERR[p], UOTGHS_HSTPIPERR_DATAPID))
+ //! acks PID error
+#define Host_ack_pid_error(p) (Clr_bits(UOTGHS->UOTGHS_HSTPIPERR[p], UOTGHS_HSTPIPERR_PID))
+#define Is_host_pid_error(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPERR[p], UOTGHS_HSTPIPERR_PID))
+ //! acks time-out error
+#define Host_ack_timeout_error(p) (Clr_bits(UOTGHS->UOTGHS_HSTPIPERR[p], UOTGHS_HSTPIPERR_TIMEOUT))
+#define Is_host_timeout_error(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPERR[p], UOTGHS_HSTPIPERR_TIMEOUT))
+ //! acks CRC16 error
+#define Host_ack_crc16_error(p) (Clr_bits(UOTGHS->UOTGHS_HSTPIPERR[p], UOTGHS_HSTPIPERR_CRC16))
+#define Is_host_crc16_error(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPERR[p], UOTGHS_HSTPIPERR_CRC16))
+ //! clears the error counter
+#define Host_clear_error_counter(p) (Clr_bits(UOTGHS->UOTGHS_HSTPIPERR[p], UOTGHS_HSTPIPERR_COUNTER_Msk))
+#define Host_get_error_counter(p) (Rd_bitfield(UOTGHS->UOTGHS_HSTPIPERR[p], UOTGHS_HSTPIPERR_COUNTER_Msk, UOTGHS_HSTPIPERR_COUNTER_Pos))
+
+ //! enables overflow interrupt
+#define Host_enable_overflow_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIER[p] = UOTGHS_HSTPIPIER_OVERFIES)
+ //! disables overflow interrupt
+#define Host_disable_overflow_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIDR[p] = UOTGHS_HSTPIPIDR_OVERFIEC)
+ //! tests if overflow interrupt is enabled
+#define Is_host_overflow_interrupt_enabled(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPIMR[p], UOTGHS_HSTPIPIMR_OVERFIE))
+
+ //! enables underflow interrupt
+#define Host_enable_underflow_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIER[p] = UOTGHS_HSTPIPIER_TXSTPES)
+ //! disables underflow interrupt
+#define Host_disable_underflow_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIDR[p] = UOTGHS_HSTPIPIDR_TXSTPEC)
+ //! tests if underflow interrupt is enabled
+#define Is_host_underflow_interrupt_enabled(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPIMR[p], UOTGHS_HSTPIPIMR_TXSTPE))
+
+ //! forces all banks full (OUT) or free (IN) interrupt
+#define Host_force_bank_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIFR[p] = UOTGHS_HSTPIPIFR_NBUSYBKS)
+ //! unforces all banks full (OUT) or free (IN) interrupt
+#define Host_unforce_bank_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIFR[p] = UOTGHS_HSTPIPIFR_NBUSYBKS)
+ //! enables all banks full (IN) or free (OUT) interrupt
+#define Host_enable_bank_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIER[p] = UOTGHS_HSTPIPIER_NBUSYBKES)
+ //! disables all banks full (IN) or free (OUT) interrupt
+#define Host_disable_bank_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIDR[p] = UOTGHS_HSTPIPIDR_NBUSYBKEC)
+ //! tests if all banks full (IN) or free (OUT) interrupt is enabled
+#define Is_host_bank_interrupt_enabled(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPIMR[p], UOTGHS_HSTPIPIMR_NBUSYBKE))
+
+ //! enables SHORT PACKET received interrupt
+#define Host_enable_short_packet_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIER[p] = UOTGHS_HSTPIPIER_SHORTPACKETIES)
+ //! disables SHORT PACKET received interrupt
+#define Host_disable_short_packet_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIDR[p] = UOTGHS_HSTPIPIDR_SHORTPACKETIEC)
+ //! tests if SHORT PACKET received interrupt is enabled
+#define Is_host_short_packet_interrupt_enabled(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPIMR[p], UOTGHS_HSTPIPIMR_SHORTPACKETIE))
+
+ //! enables STALL received interrupt
+#define Host_enable_stall_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIER[p] = UOTGHS_HSTPIPIER_RXSTALLDES)
+ //! disables STALL received interrupt
+#define Host_disable_stall_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIDR[p] = UOTGHS_HSTPIPIDR_RXSTALLDEC)
+ //! tests if STALL received interrupt is enabled
+#define Is_host_stall_interrupt_enabled(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPIMR[p], UOTGHS_HSTPIPIMR_RXSTALLDE))
+
+ //! enables CRC ERROR ISO IN detected interrupt
+#define Host_enable_crc_error_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIER[p] = UOTGHS_HSTPIPIER_RXSTALLDES)
+ //! disables CRC ERROR ISO IN detected interrupt
+#define Host_disable_crc_error_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIDR[p] = UOTGHS_HSTPIPIDR_RXSTALLDEC)
+ //! tests if CRC ERROR ISO IN detected interrupt is enabled
+#define Is_host_crc_error_interrupt_enabled(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPIMR[p], UOTGHS_HSTPIPIMR_RXSTALLDE))
+
+ //! enables NAK received interrupt
+#define Host_enable_nak_received_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIER[p] = UOTGHS_HSTPIPIER_NAKEDES)
+ //! disables NAK received interrupt
+#define Host_disable_nak_received_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIDR[p] = UOTGHS_HSTPIPIDR_NAKEDEC)
+ //! tests if NAK received interrupt is enabled
+#define Is_host_nak_received_interrupt_enabled(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPIMR[p], UOTGHS_HSTPIPIMR_NAKEDE))
+
+ //! enables pipe error interrupt
+#define Host_enable_pipe_error_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIER[p] = UOTGHS_HSTPIPIER_PERRES)
+ //! disables pipe error interrupt
+#define Host_disable_pipe_error_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIDR[p] = UOTGHS_HSTPIPIDR_PERREC)
+ //! tests if pipe error interrupt is enabled
+#define Is_host_pipe_error_interrupt_enabled(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPIMR[p], UOTGHS_HSTPIPIMR_PERRE))
+
+ //! enables SETUP pipe ready interrupt
+#define Host_enable_setup_ready_interrupt() (UOTGHS->UOTGHS_HSTPIPIER[P_CONTROL] = UOTGHS_HSTPIPIER_TXSTPES)
+ //! disables SETUP pipe ready interrupt
+#define Host_disable_setup_ready_interrupt() (UOTGHS->UOTGHS_HSTPIPIDR[P_CONTROL] = UOTGHS_HSTPIPIDR_TXSTPEC)
+ //! tests if SETUP pipe ready interrupt is enabled
+#define Is_host_setup_ready_interrupt_enabled() (Tst_bits(UOTGHS->UOTGHS_HSTPIPIMR[P_CONTROL], UOTGHS_HSTPIPIMR_TXSTPE))
+
+ //! enables OUT pipe ready interrupt
+#define Host_enable_out_ready_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIER[p] = UOTGHS_HSTPIPIER_TXOUTES)
+ //! disables OUT pipe ready interrupt
+#define Host_disable_out_ready_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIDR[p] = UOTGHS_HSTPIPIDR_TXOUTEC)
+ //! tests if OUT pipe ready interrupt is enabled
+#define Is_host_out_ready_interrupt_enabled(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPIMR[p], UOTGHS_HSTPIPIMR_TXOUTE))
+
+ //! enables IN pipe reception interrupt
+#define Host_enable_in_received_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIER[p] = UOTGHS_HSTPIPIER_RXINES)
+ //! disables IN pipe reception interrupt
+#define Host_disable_in_received_interrupt(p) (UOTGHS->UOTGHS_HSTPIPIDR[p] = UOTGHS_HSTPIPIDR_RXINEC)
+ //! tests if IN pipe reception interrupt is enabled
+#define Is_host_in_received_interrupt_enabled(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPIMR[p], UOTGHS_HSTPIPIMR_RXINE))
+
+ //! Get 64-, 32-, 16- or 8-bit access to FIFO data register of selected pipe.
+ //! @param p Pipe of which to access FIFO data register
+ //! @param scale Data scale in bits: 64, 32, 16 or 8
+ //! @return Volatile 64-, 32-, 16- or 8-bit data pointer to FIFO data register
+ //! @warning It is up to the user of this macro to make sure that all accesses
+ //! are aligned with their natural boundaries except 64-bit accesses which
+ //! require only 32-bit alignment.
+ //! @warning It is up to the user of this macro to make sure that used HSB
+ //! addresses are identical to the DPRAM internal pointer modulo 32 bits.
+#define Host_get_pipe_fifo_access(p, scale) \
+ (AVR32_USBB_FIFOX_DATA(p, scale))
+
+ //! Reset known position inside FIFO data register of selected pipe.
+ //! @param p Pipe of which to reset known position
+ //! @warning Always call this macro before any read/write macro/function
+ //! when at FIFO beginning.
+#define Host_reset_pipe_fifo_access(p) \
+ (pep_fifo[(p)].u64ptr = Host_get_pipe_fifo_access(p, 64))
+
+ //! Read 64-, 32-, 16- or 8-bit data from FIFO data register of selected pipe.
+ //! @param p Pipe of which to access FIFO data register
+ //! @param scale Data scale in bits: 64, 32, 16 or 8
+ //! @return 64-, 32-, 16- or 8-bit data read
+ //! @warning It is up to the user of this macro to make sure that all accesses
+ //! are aligned with their natural boundaries except 64-bit accesses which
+ //! require only 32-bit alignment.
+ //! @note This macro assures that used HSB addresses are identical to the
+ //! DPRAM internal pointer modulo 32 bits.
+ //! @warning Always call Host_reset_pipe_fifo_access before this macro when
+ //! at FIFO beginning.
+ //! @warning Do not mix calls to this macro with calls to indexed macros below.
+#define Host_read_pipe_data(p, scale) \
+ (*pep_fifo[(p)].TPASTE3(u, scale, ptr)\
+ TPASTE3(Pep_fifo_access_, scale, _post_inc)())
+
+ //! Write 64-, 32-, 16- or 8-bit data to FIFO data register of selected pipe.
+ //! @param p Pipe of which to access FIFO data register
+ //! @param scale Data scale in bits: 64, 32, 16 or 8
+ //! @param data 64-, 32-, 16- or 8-bit data to write
+ //! @return 64-, 32-, 16- or 8-bit data written
+ //! @warning It is up to the user of this macro to make sure that all accesses
+ //! are aligned with their natural boundaries except 64-bit accesses which
+ //! require only 32-bit alignment.
+ //! @note This macro assures that used HSB addresses are identical to the
+ //! DPRAM internal pointer modulo 32 bits.
+ //! @warning Always call Host_reset_pipe_fifo_access before this macro when
+ //! at FIFO beginning.
+ //! @warning Do not mix calls to this macro with calls to indexed macros below.
+#define Host_write_pipe_data(p, scale, data) \
+ (*pep_fifo[(p)].TPASTE3(u, scale, ptr)\
+ TPASTE3(Pep_fifo_access_, scale, _post_inc)() = (data))
+
+ //! Read 64-, 32-, 16- or 8-bit indexed data from FIFO data register of selected pipe.
+ //! @param p Pipe of which to access FIFO data register
+ //! @param scale Data scale in bits: 64, 32, 16 or 8
+ //! @param index Index of scaled data array to access
+ //! @return 64-, 32-, 16- or 8-bit data read
+ //! @warning It is up to the user of this macro to make sure that all accesses
+ //! are aligned with their natural boundaries except 64-bit accesses which
+ //! require only 32-bit alignment.
+ //! @warning It is up to the user of this macro to make sure that used HSB
+ //! addresses are identical to the DPRAM internal pointer modulo 32 bits.
+ //! @warning Do not mix calls to this macro with calls to non-indexed macros above.
+#define Host_read_pipe_indexed_data(p, scale, index) \
+ (AVR32_USBB_FIFOX_DATA(p, scale)[(index)])
+
+ //! Write 64-, 32-, 16- or 8-bit indexed data to FIFO data register of selected pipe.
+ //! @param p Pipe of which to access FIFO data register
+ //! @param scale Data scale in bits: 64, 32, 16 or 8
+ //! @param index Index of scaled data array to access
+ //! @param data 64-, 32-, 16- or 8-bit data to write
+ //! @return 64-, 32-, 16- or 8-bit data written
+ //! @warning It is up to the user of this macro to make sure that all accesses
+ //! are aligned with their natural boundaries except 64-bit accesses which
+ //! require only 32-bit alignment.
+ //! @warning It is up to the user of this macro to make sure that used HSB
+ //! addresses are identical to the DPRAM internal pointer modulo 32 bits.
+ //! @warning Do not mix calls to this macro with calls to non-indexed macros above.
+#define Host_write_pipe_indexed_data(p, scale, index, data) \
+ (AVR32_USBB_FIFOX_DATA(p, scale)[(index)] = (data))
+//! @}
+
+
+//! @defgroup USBB_general_pipe_dma USBB pipe DMA drivers
+//! These macros manage the common features of the pipe DMA channels.
+//! @{
+ //! enables the disabling of HDMA requests by pipe interrupts
+#define Host_enable_pipe_int_dis_hdma_req(p) (UOTGHS->UOTGHS_HSTPIPIER[p] = UOTGHS_HSTPIPIER_PDISHDMAS)
+ //! disables the disabling of HDMA requests by pipe interrupts
+#define Host_disable_pipe_int_dis_hdma_req(p) (UOTGHS->UOTGHS_HSTPIPIDR[p] = UOTGHS_HSTPIPIDR_PDISHDMAC)
+ //! tests if the disabling of HDMA requests by pipe interrupts si enabled
+#define Is_host_pipe_int_dis_hdma_req_enabled(p) (Tst_bits(UOTGHS->UOTGHS_HSTPIPIMR[p], UOTGHS_HSTPIPIMR_PDISHDMA))
+
+ //! raises the selected pipe DMA channel interrupt
+#define Host_raise_pipe_dma_interrupt(pdma) (UOTGHS->UOTGHS_HSTIFR = UOTGHS_HSTIFR_DMA_1 << ((pdma) - 1))
+ //! tests if an interrupt is triggered by the selected pipe DMA channel
+#define Is_host_pipe_dma_interrupt(pdma) (Tst_bits(UOTGHS->UOTGHS_HSTISR, UOTGHS_HSTISR_DMA_1 << ((pdma) - 1)))
+ //! enables the selected pipe DMA channel interrupt
+#define Host_enable_pipe_dma_interrupt(pdma) (UOTGHS->UOTGHS_HSTIER = UOTGHS_HSTIER_DMA_1 << ((pdma) - 1))
+ //! disables the selected pipe DMA channel interrupt
+#define Host_disable_pipe_dma_interrupt(pdma) (UOTGHS->UOTGHS_HSTIDR = UOTGHS_HSTIDR_DMA_1 << ((pdma) - 1))
+ //! tests if the selected pipe DMA channel interrupt is enabled
+#define Is_host_pipe_dma_interrupt_enabled(pdma) (Tst_bits(UOTGHS->UOTGHS_HSTIMR, UOTGHS_HSTIMR_DMA_1 << ((pdma) - 1)))
+//! @todo Implement macros for pipe DMA registers and descriptors
+//! @}
+
+//! @}
+
+
+//_____ D E C L A R A T I O N S ____________________________________________
+
+extern UnionVPtr pep_fifo[MAX_PEP_NB];
+
+#if USB_HOST_FEATURE == ENABLED
+extern void host_disable_all_pipes ( void );
+extern U32 host_set_p_txpacket (U8, U8 , U32 );
+extern U32 host_write_p_txpacket (U8, const void *, U32, const void **);
+extern U32 host_read_p_rxpacket (U8, void *, U32, void **);
+#endif
+
+extern void Host_configure_address( uint8_t pipe, uint8_t addr);
+extern void Uotghs_trace(void);
+
+#endif // _USB_DRV_H_
diff --git a/MakefileBasedBuild/app/usb_ids.h b/MakefileBasedBuild/app/usb_ids.h
new file mode 100644
index 0000000..19f47d4
--- /dev/null
+++ b/MakefileBasedBuild/app/usb_ids.h
@@ -0,0 +1,457 @@
+/* This header file is part of the AVR Software Framework 2.0.0 release */
+
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file ******************************************************************
+ *
+ * \brief Contains some IDs (VID, PID, Class numbers) used in the various
+ * demos.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with a USB module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ***************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _USB_IDS_H_
+#define _USB_IDS_H_
+
+
+//_____ I N C L U D E S ____________________________________________________
+
+//_____ M A C R O S ________________________________________________________
+
+//_____ D E C L A R A T I O N S ____________________________________________
+
+/*! \name Vendor ID (VID)
+ */
+//! @{
+#define ATMEL_VID 0x03EB
+#define APPLE_VID 0x05AC
+//! @}
+
+/*! \name USB Product ID (PID)
+ */
+//! @{
+#define IPOD_PID 0x1200
+#define IPOD_SHUFFLE_PID 0x1300
+#define HID_GENERIC_EXAMPLE_PID 0x2013
+#define HID_QTOUCH_DEBUG_PID 0x211F
+#define ENUM_EXAMPLE_PID 0x2300
+#define MS_EXAMPLE_PID 0x2301
+#define MS_SDRAM_LOADER_PID 0x2302
+#define EVK1100_CTRL_PANEL_DEMO_PID 0x2303
+#define HID_EXAMPLE_PID 0x2304
+#define EVK1101_CTRL_PANEL_DEMO_HID_PID 0x2305
+#define EVK1101_CTRL_PANEL_DEMO_HID_MS_PID 0x2306
+#define CDC_EXAMPLE_PID 0x2307
+#define AUDIO_MIC_EXAMPLE_PID 0x2308
+#define EVK11xx_VIRTUAL_COM_PORT_PID 0x2310
+#define AUDIO_SPEAKER_MICRO_EXAMPLE_PID 0x2311
+#define ISP_UC3A_PID 0x2FF8
+#define ISP_UC3A3_PID 0x2FF1
+#define ISP_UC3B_PID 0x2FF6
+
+//! @}
+
+#define USB_ENDPOINT_OUT 0x00
+#define USB_ENDPOINT_IN 0x80
+
+/*! \name Generic definitions (Class, subclass and protocol)
+ */
+//! @{
+#define NO_CLASS 0x00
+#define NO_SUBCLASS 0x00
+#define NO_PROTOCOL 0x00
+//! @}
+
+/*! \name Audio specific definitions (Class, subclass and protocol)
+ */
+//! @{
+#define AUDIO_CLASS 0x01
+#define AUDIOCONTROL_SUBCLASS 0x01
+#define AUDIOSTREAMING_SUBCLASS 0x02
+#define MIDISTREAMING_SUBCLASS 0x03
+//! @}
+
+/*! \name CDC specific definitions (Class, subclass and protocol)
+ */
+//! @{
+#define CDC_COMM_DEVICE_CLASS 0x02
+#define CDC_COMM_CLASS 0x02
+#define CDC_COMM_DIRECT_LINE_CM_SUBCLASS 0x01
+#define CDC_COMM_ABSTRACT_CM_SUBCLASS 0x02
+#define CDC_COMM_TELEPHONE_CM_SUBCLASS 0x03
+#define CDC_COMM_MULTICHANNEL_CM_SUBCLASS 0x04
+#define CDC_COMM_CAPI_CM_SUBCLASS 0x05
+#define CDC_COMM_ETHERNET_NETWORKING_CM_SUBCLASS 0x06
+#define CDC_COMM_ATM_NETWORKING_CM_SUBCLASS 0x07
+#define CDC_COMM_V25ter_PROTOCOL 0x01
+#define CDC_DATA_CLASS 0x0A
+#define CDC_DATA_SUBCLASS 0x00
+#define CDC_DATA_PHYS_ISDN_BRI_PROTOCOL 0x30
+#define CDC_DATA_HDLC_PROTOCOL 0x31
+#define CDC_DATA_TRANSPARENT_PROTOCOL 0x32
+//! @}
+
+/*! \name HID specific definitions (Class, subclass and protocol)
+ */
+//! @{
+#define HID_CLASS 0x03
+#define BOOT_SUBCLASS 0x01
+#define KEYBOARD_PROTOCOL 0x01
+#define MOUSE_PROTOCOL 0x02
+//! @}
+
+/*! \name MS specific definitions (Class, subclass and protocol)
+ */
+//! @{
+#define MS_CLASS 0x08
+#define SFF8020I_MMC2_SUBCLASS 0x02
+#define SFF8070I_SUBCLASS 0x05
+#define SCSI_SUBCLASS 0x06
+#define BULK_PROTOCOL 0x50
+//! @}
+
+/*! \name DFU specific definitions (Class, subclass and protocol)
+ */
+//! @{
+#define APPLICATION_CLASS 0xFE
+#define DFU_SUBCLASS 0x01
+#define RUNTIME_PROTOCOL 0x01
+#define DFU_MODE_PROTOCOL 0x02
+//! @}
+
+/*! \name Others specific definitions (Class, subclass and protocol)
+ */
+//! @{
+#define VENDOR_CLASS 0xFF
+//! @}
+
+ //! \name Requests type (bmRequestTypes)
+ //! @{
+
+ //! \name Data transfer direction
+ //! bit 7,
+ //! 0 = Host to device
+ //! 1 = Device to host
+ //! @{
+#define USB_SETUP_DIR_HOST_TO_DEVICE (0<<7)
+#define USB_SETUP_DIR_DEVICE_TO_HOST (1<<7)
+ //! @}
+
+ //! \name Type
+ //! bit 6 to 5,
+ //! 0 = Standard
+ //! 1 = Class
+ //! 2 = Vendor
+ //! 3 = Reserved
+ //! @{
+#define USB_SETUP_TYPE_STANDARD (0<<5)
+#define USB_SETUP_TYPE_CLASS (1<<5)
+#define USB_SETUP_TYPE_VENDOR (2<<5)
+ //! @}
+
+ //! \name Recipient
+ //! bit 4 to 0,
+ //! 0 = device
+ //! 1 = Interface
+ //! 2 = Endpoint
+ //! 3 = Other
+ //! 4...31 = Reserved
+ //! @{
+#define USB_SETUP_RECIPIENT_DEVICE (0)
+#define USB_SETUP_RECIPIENT_INTERFACE (1)
+#define USB_SETUP_RECIPIENT_ENDPOINT (2)
+#define USB_SETUP_RECIPIENT_OTHER (3)
+ //! @}
+
+ //! \name Request type used by standard setup request
+ //! @{
+#define USB_SETUP_SET_STAND_DEVICE (USB_SETUP_DIR_HOST_TO_DEVICE |USB_SETUP_TYPE_STANDARD |USB_SETUP_RECIPIENT_DEVICE) // 0x00
+#define USB_SETUP_GET_STAND_DEVICE (USB_SETUP_DIR_DEVICE_TO_HOST |USB_SETUP_TYPE_STANDARD |USB_SETUP_RECIPIENT_DEVICE) // 0x80
+#define USB_SETUP_SET_STAND_INTERFACE (USB_SETUP_DIR_HOST_TO_DEVICE |USB_SETUP_TYPE_STANDARD |USB_SETUP_RECIPIENT_INTERFACE) // 0x01
+#define USB_SETUP_GET_STAND_INTERFACE (USB_SETUP_DIR_DEVICE_TO_HOST |USB_SETUP_TYPE_STANDARD |USB_SETUP_RECIPIENT_INTERFACE) // 0x81
+#define USB_SETUP_SET_STAND_ENDPOINT (USB_SETUP_DIR_HOST_TO_DEVICE |USB_SETUP_TYPE_STANDARD |USB_SETUP_RECIPIENT_ENDPOINT) // 0x02
+#define USB_SETUP_GET_STAND_ENDPOINT (USB_SETUP_DIR_DEVICE_TO_HOST |USB_SETUP_TYPE_STANDARD |USB_SETUP_RECIPIENT_ENDPOINT) // 0x82
+ //! @}
+
+ //! \name Request type used by specific setup request from class driver
+ //! @{
+#define USB_SETUP_SET_CLASS_DEVICE (USB_SETUP_DIR_HOST_TO_DEVICE |USB_SETUP_TYPE_CLASS |USB_SETUP_RECIPIENT_DEVICE) // 0x20
+#define USB_SETUP_GET_CLASS_DEVICE (USB_SETUP_DIR_DEVICE_TO_HOST |USB_SETUP_TYPE_CLASS |USB_SETUP_RECIPIENT_DEVICE) // 0xA0
+#define USB_SETUP_SET_CLASS_INTER (USB_SETUP_DIR_HOST_TO_DEVICE |USB_SETUP_TYPE_CLASS |USB_SETUP_RECIPIENT_INTERFACE) // 0x21
+#define USB_SETUP_GET_CLASS_INTER (USB_SETUP_DIR_DEVICE_TO_HOST |USB_SETUP_TYPE_CLASS |USB_SETUP_RECIPIENT_INTERFACE) // 0xA1
+#define USB_SETUP_SET_CLASS_ENDPOINT (USB_SETUP_DIR_HOST_TO_DEVICE |USB_SETUP_TYPE_CLASS |USB_SETUP_RECIPIENT_ENDPOINT) // 0x22
+#define USB_SETUP_GET_CLASS_ENDPOINT (USB_SETUP_DIR_DEVICE_TO_HOST |USB_SETUP_TYPE_CLASS |USB_SETUP_RECIPIENT_ENDPOINT) // 0xA2
+#define USB_SETUP_SET_CLASS_OTHER (USB_SETUP_DIR_HOST_TO_DEVICE |USB_SETUP_TYPE_CLASS |USB_SETUP_RECIPIENT_OTHER) // 0x23
+#define USB_SETUP_GET_CLASS_OTHER (USB_SETUP_DIR_DEVICE_TO_HOST |USB_SETUP_TYPE_CLASS |USB_SETUP_RECIPIENT_OTHER) // 0xA3
+#define USB_SETUP_SET_VENDOR_DEVICE (USB_SETUP_DIR_HOST_TO_DEVICE |USB_SETUP_TYPE_VENDOR |USB_SETUP_RECIPIENT_DEVICE) // 0x40
+#define USB_SETUP_GET_VENDOR_DEVICE (USB_SETUP_DIR_DEVICE_TO_HOST |USB_SETUP_TYPE_VENDOR |USB_SETUP_RECIPIENT_DEVICE) // 0xC0
+ //! @}
+ //! @}
+
+ //! \name Standard Requests (bRequest)
+ //! @{
+#define SETUP_GET_STATUS 0x00
+#define SETUP_GET_DEVICE 0x01
+#define SETUP_CLEAR_FEATURE 0x01
+#define SETUP_GET_STRING 0x03
+#define SETUP_SET_FEATURE 0x03
+#define SETUP_SET_ADDRESS 0x05
+#define SETUP_GET_DESCRIPTOR 0x06
+#define SETUP_SET_DESCRIPTOR 0x07
+#define SETUP_GET_CONFIGURATION 0x08
+#define SETUP_SET_CONFIGURATION 0x09
+#define SETUP_GET_INTERFACE 0x0A
+#define SETUP_SET_INTERFACE 0x0B
+#define SETUP_SYNCH_FRAME 0x0C
+ //! @}
+
+ //! \name Descriptor types used in several setup requests
+ //! @{
+#define DESCRIPTOR_DEVICE 0x01
+#define DESCRIPTOR_CONFIGURATION 0x02
+#define DESCRIPTOR_STRING 0x03
+#define DESCRIPTOR_INTERFACE 0x04
+#define DESCRIPTOR_ENDPOINT 0x05
+#define DESCRIPTOR_DEVICE_QUALIFIER 0x06
+#define DESCRIPTOR_CONF_OTHER_SPEED 0x07
+#define DESCRIPTOR_OTG 0x09
+#define DESCRIPTOR_IAD 0x0B
+ //! @}
+
+ //! \name Feature types for SETUP_X_FEATURE standard request
+ //! @{
+#define FEATURE_DEVICE_REMOTE_WAKEUP 0x01
+#define FEATURE_DEVICE_TEST 0x02
+#define FEATURE_DEVICE_OTG_B_HNP_ENABLE 0x03
+#define FEATURE_DEVICE_OTG_A_HNP_SUPPORT 0x04
+#define FEATURE_DEVICE_OTG_A_ALT_HNP_SUPPORT 0x05
+#define FEATURE_ENDPOINT_HALT 0x00
+ //! @}
+
+ //! \name Feature types for SETUP_X_FEATURE standard test request
+ //! @{
+#define FEATURE_DEVICE_TEST_J 0x01
+#define FEATURE_DEVICE_TEST_K 0x02
+#define FEATURE_DEVICE_TEST_SEO_NAK 0x03
+#define FEATURE_DEVICE_TEST_PACKET 0x04
+#define FEATURE_DEVICE_TEST_FORCE_ENABLE 0x05
+ //! @}
+//! @}
+
+#define MAX_EP_PER_INTERFACE 3
+
+//! USB Setup Data
+struct usb_setup_packet
+{
+ U8 bmRequestType; //!< Characteristics of the request
+ U8 bRequest; //!< Specific request
+ U16 wValue; //!< Field that varies according to request
+ U16 wIndex; //!< Field that varies according to request
+ U16 wLength; //!< Number of bytes to transfer if Data
+};
+
+#define CONTROL_GOOD 0x00
+#define CONTROL_DATA_TOGGLE 0x01
+#define CONTROL_DATA_PID 0x02
+#define CONTROL_PID 0x04
+#define CONTROL_TIMEOUT 0x08
+#define CONTROL_CRC16 0x10
+#define CONTROL_STALL 0x20
+#define CONTROL_NO_DEVICE 0x40
+
+//! Offsets common to all descriptor types
+#define OFFSET_DESCRIPTOR_LENGTH 0
+#define OFFSET_FIELD_DESCRIPTOR_TYPE 1
+
+//! Offsets in device descriptors
+#define OFFSET_FIELD_MAXPACKETSIZE 7
+#define OFFSET_FIELD_VID 8
+#define OFFSET_FIELD_PID 10
+#define OFFSET_FIELD_NB_CONFIGURATION 17
+
+//! Offsets in configuration descriptors
+#define OFFSET_FIELD_TOTAL_LENGTH 2
+#define OFFSET_FIELD_NB_INTERFACE 4
+#define OFFSET_FIELD_CONFIGURATION_NB 5
+#define OFFSET_FIELD_BMATTRIBUTES 7
+#define REMOTE_WAKEUP_BIT 5
+#define REMOTE_WAKEUP_MASK (1 << REMOTE_WAKEUP_BIT)
+#define SELF_POWERED_BIT 6
+#define SELF_POWERED_MASK (1 << SELF_POWERED_BIT)
+#define OFFSET_FIELD_MAXPOWER 8
+
+//! Offsets in interface descriptors
+#define OFFSET_FIELD_INTERFACE_NB 2
+#define OFFSET_FIELD_ALT 3
+#define OFFSET_FIELD_NB_OF_EP 4
+#define OFFSET_FIELD_CLASS 5
+#define OFFSET_FIELD_SUB_CLASS 6
+#define OFFSET_FIELD_PROTOCOL 7
+
+//! Offsets in endpoint descriptors
+#define OFFSET_FIELD_EP_ADDR 2
+#define OFFSET_FIELD_EP_TYPE 3
+#define OFFSET_FIELD_EP_SIZE 4
+#define OFFSET_FIELD_EP_INTERVAL 6
+
+#define host_clear_endpoint_feature(ep) \
+(\
+ usb_request.bmRequestType = 0x02,\
+ usb_request.bRequest = CLEAR_FEATURE,\
+ usb_request.wValue = FEATURE_ENDPOINT_HALT << 8,\
+ usb_request.wIndex = (ep),\
+ usb_request.wLength = 0,\
+ usb_request.incomplete_read = FALSE,\
+ host_transfer_control(data_stage)\
+)
+
+//! @brief Send a "set configuration" request
+//! @param cfg_nb U8: Configuration to activate
+//! @return Status
+#define host_set_configuration(cfg_nb) \
+(\
+ usb_request.bmRequestType = 0x00,\
+ usb_request.bRequest = SET_CONFIGURATION,\
+ usb_request.wValue = (cfg_nb),\
+ usb_request.wIndex = 0,\
+ usb_request.wLength = 0,\
+ usb_request.incomplete_read = FALSE,\
+ host_transfer_control(data_stage)\
+)
+
+//! @brief Send a "set interface" request to specify an alternate setting for an interface
+//! @param interface_nb U8: Interface
+//! @param alt_setting U8: Alternate setting
+//! @return Status
+#define host_set_interface(interface_nb, alt_setting) \
+(\
+ usb_request.bmRequestType = 0x01,\
+ usb_request.bRequest = SET_INTERFACE,\
+ usb_request.wValue = (alt_setting),\
+ usb_request.wIndex = (interface_nb),\
+ usb_request.wLength = 0,\
+ usb_request.incomplete_read = FALSE,\
+ host_transfer_control(data_stage)\
+)
+
+//! @brief Send an incomplete "get device desriptor" request
+//! The descriptor received is stored in the data_stage array.
+//! The received descriptors are limited to the length of the control pipe.
+//! @return Status
+#define host_get_device_descriptor_incomplete() \
+(\
+ usb_request.bmRequestType = 0x80,\
+ usb_request.bRequest = GET_DESCRIPTOR,\
+ usb_request.wValue = DEVICE_DESCRIPTOR << 8,\
+ usb_request.wIndex = 0,\
+ usb_request.wLength = 64,\
+ usb_request.incomplete_read = TRUE,\
+ host_transfer_control(data_stage)\
+)
+
+//! @brief Send a "get device desriptor" request
+//! The descriptor received is stored in the data_stage array.
+//! @return Status
+#define host_get_device_descriptor() \
+(\
+ usb_request.bmRequestType = 0x80,\
+ usb_request.bRequest = GET_DESCRIPTOR,\
+ usb_request.wValue = DEVICE_DESCRIPTOR << 8,\
+ usb_request.wIndex = 0,\
+ usb_request.wLength = 18,\
+ usb_request.incomplete_read = FALSE,\
+ host_transfer_control(data_stage)\
+)
+
+//! @brief Send a "get device configuration descriptor" request
+//! The configuration descriptor received is stored in the data_stage array.
+//! @param cfg_ix U8: Index of the configuration descriptor to get
+//! @return Status
+#define host_get_configuration_descriptor(cfg_ix) \
+(\
+ usb_request.bmRequestType = 0x80,\
+ usb_request.bRequest = GET_DESCRIPTOR,\
+ usb_request.wValue = CONFIGURATION_DESCRIPTOR << 8 | (cfg_ix),\
+ usb_request.wIndex = 0,\
+ usb_request.wLength = SIZEOF_DATA_STAGE,\
+ usb_request.incomplete_read = FALSE,\
+ host_transfer_control(data_stage)\
+)
+
+//! @brief Send a "set address" request
+//! @param addr U8: Address assigned to the device
+//! @return Status
+#define host_set_address(addr) \
+(\
+ usb_request.bmRequestType = 0x00,\
+ usb_request.bRequest = SET_ADDRESS,\
+ usb_request.wValue = (addr),\
+ usb_request.wIndex = 0,\
+ usb_request.wLength = 0,\
+ usb_request.incomplete_read = FALSE,\
+ host_transfer_control(data_stage)\
+)
+
+//! @brief Send a "set feature" "device remote wake-up"
+//! @return Status
+#define host_set_feature_remote_wakeup() \
+(\
+ usb_request.bmRequestType = 0x00,\
+ usb_request.bRequest = SET_FEATURE,\
+ usb_request.wValue = 1,\
+ usb_request.wIndex = 1,\
+ usb_request.wLength = 0,\
+ usb_request.incomplete_read = FALSE,\
+ host_transfer_control(data_stage)\
+)
+
+//! @brief Send the mass-storage specific request "get max LUN"
+//! @return Status
+#define host_ms_get_max_lun() \
+(\
+ usb_request.bmRequestType = 0xA1,\
+ usb_request.bRequest = MS_GET_MAX_LUN,\
+ usb_request.wValue = 0,\
+ usb_request.wIndex = 0,\
+ usb_request.wLength = 1,\
+ usb_request.incomplete_read = FALSE,\
+ host_transfer_control(data_stage)\
+)
+
+#endif // _USB_IDS_H_
diff --git a/MakefileBasedBuild/app/usbh.c b/MakefileBasedBuild/app/usbh.c
new file mode 100644
index 0000000..60c4714
--- /dev/null
+++ b/MakefileBasedBuild/app/usbh.c
@@ -0,0 +1,1217 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#define ADK_INTERNAL
+#include "usbh.h"
+#include "coop.h"
+#include "conf_usb.h"
+#include "usb_drv.h"
+#include "usb_ids.h"
+#include "dbg.h"
+#include "fwk.h"
+
+#include <string.h>
+
+#define USE_HIGH_SPEED 0
+#define AUDIO_ACCESSORY 1
+
+#define PIPE_FLAG_INCOMPLETE_SETUP 0x1
+
+#define MIN(a, b) (((a) < (b)) ? (a) : (b))
+
+#ifndef PMC_SCER_UOTGCLK
+# define PMC_SCER_UOTGCLK (0x1u << 5)
+#endif
+
+/** USB OTG VBus On/Off: Bus Power Control Port. */
+#define PIN_UOTGHS_VBOF { PIO_PB10, PIOB, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT }
+/** USB OTG Identification: Mini Connector Identification Port. */
+#define PIN_UOTGHS_ID { PIO_PB11, PIOB, ID_PIOB, PIO_PERIPH_A, PIO_PULLUP }
+/** USB Fault monitoring pin definition. */
+#define PIN_UOTGHS_FAULT { PIO_PC1, PIOC, ID_PIOC, PIO_INPUT, PIO_PULLUP }
+
+static const Pin pUOTGHSPins[] = {PIN_UOTGHS_VBOF, PIN_UOTGHS_ID, PIN_UOTGHS_FAULT};
+static const Pin pUOTGHS_Fault = PIN_UOTGHS_FAULT;
+static const Pin pUOTGHS_VBOF = PIN_UOTGHS_VBOF;
+
+typedef struct usbh_pipe {
+ volatile enum pipe_state {
+ PIPE_NO_CONFIG,
+ PIPE_IDLE,
+ PIPE_SETUP_DTOH,
+ PIPE_SETUP_DTOH_IN,
+ PIPE_SETUP_DTOH_OUT,
+ PIPE_SETUP_HTOD,
+ PIPE_SETUP_HTOD_OUT,
+ PIPE_SETUP_HTOD_IN,
+ PIPE_SETUP_COMPLETE,
+ PIPE_IN,
+ PIPE_IN_COMPLETE,
+ PIPE_OUT,
+ PIPE_OUT_COMPLETE,
+ PIPE_ISO_IN,
+ PIPE_ISO_IN_WAIT,
+ } state;
+ uint32_t flags;
+ uint8_t endp;
+ enum usbh_endp_type type;
+
+ /* current transfer stats */
+ void *ptr;
+ size_t pos;
+ size_t total_len;
+ int result;
+
+ /* isochronous transfers */
+ usbh_iso_callback_t iso_cb;
+ void *iso_cb_arg;
+} usbh_pipe_t;
+
+typedef struct usbh_state {
+ enum {
+ USBH_DISABLED,
+ USBH_INIT,
+ USBH_DEVICE_UNATTACHED,
+ USBH_WAIT_FOR_DEVICE,
+ USBH_DEVICE_ATTACHED,
+ USBH_DEVICE_ATTACHED_SOF_WAIT,
+ USBH_DEVICE_ATTACHED_RESET,
+ USBH_DEVICE_ATTACHED_RESET_WAIT,
+ USBH_DEVICE_ATTACHED_POST_RESET_WAIT,
+ USBH_DEVICE_ATTACHED_QUERY,
+ USBH_DEVICE_TRY_ACCESSORY,
+ USBH_DEVICE_ACCESSORY_INIT,
+ USBH_DEVICE_ACCESSORY,
+ USBH_DEVICE_IDLE,
+ } state;
+ uint8_t next_address;
+ uint32_t last_sof;
+ uint32_t irq_count;
+
+ usbh_device_t dev;
+
+ usbh_pipe_t pipe[CHIP_USB_NUMENDPOINTS];
+
+ uint64_t sleep_ts;
+
+
+ // accessory strings
+ const char *accessory_string_vendor;
+ const char *accessory_string_name;
+ const char *accessory_string_longname;
+ const char *accessory_string_version;
+ const char *accessory_string_url;
+ const char *accessory_string_serial;
+} usbh_state_t;
+
+/* master state for the stack */
+static usbh_state_t usbh;
+
+static const char *pipe_state_to_str(enum pipe_state state)
+{
+#define STATE2STR(x) case x: return #x;
+
+ switch (state) {
+ STATE2STR(PIPE_NO_CONFIG)
+ STATE2STR(PIPE_IDLE)
+ STATE2STR(PIPE_SETUP_DTOH)
+ STATE2STR(PIPE_SETUP_DTOH_IN)
+ STATE2STR(PIPE_SETUP_DTOH_OUT)
+ STATE2STR(PIPE_SETUP_HTOD)
+ STATE2STR(PIPE_SETUP_HTOD_OUT)
+ STATE2STR(PIPE_SETUP_HTOD_IN)
+ STATE2STR(PIPE_SETUP_COMPLETE)
+ STATE2STR(PIPE_IN)
+ STATE2STR(PIPE_IN_COMPLETE)
+ STATE2STR(PIPE_OUT)
+ STATE2STR(PIPE_OUT_COMPLETE)
+ default: return "unknown";
+ }
+
+#undef STATE2STR
+}
+
+static void dump_pipe(int pipe)
+{
+ const usbh_pipe_t *p = &usbh.pipe[pipe];
+
+ TRACE_OTG("pipe %d: state %d (%s) flags 0x%x ptr 0x%x pos %u total_len %u\n",
+ pipe, p->state, pipe_state_to_str(p->state), p->flags, p->ptr, p->pos, p->total_len);
+}
+
+static void usbh_start_sleep(void)
+{
+ usbh.sleep_ts = fwkGetUptime();
+}
+
+static bool usbh_sleep_expired(uint32_t ms)
+{
+ uint64_t now = fwkGetUptime();
+
+ if (now - usbh.sleep_ts >= ms)
+ return true;
+ else
+ return false;
+}
+
+int usbh_setup_endpoint(uint8_t addr, uint8_t endp, enum usbh_endp_type type, size_t packet_size)
+{
+ // find a free pipe
+ int pipe;
+ for (pipe = 0; pipe < CHIP_USB_NUMENDPOINTS; pipe++) {
+ if (usbh.pipe[pipe].state == PIPE_NO_CONFIG)
+ break;
+ }
+ if (pipe >= CHIP_USB_NUMENDPOINTS)
+ return -1;
+
+ usbh_pipe_t *p = &usbh.pipe[pipe];
+
+ p->state = PIPE_IDLE;
+ p->endp = endp;
+ p->type = type;
+
+ // set up hardware
+ uint32_t token = (endp & USB_ENDPOINT_IN) ? TOKEN_IN : TOKEN_OUT;
+ switch (type) {
+ default:
+ case ENDP_TYPE_CONTROL:
+ Host_configure_pipe(pipe, 0, endp, TYPE_CONTROL, TOKEN_SETUP, packet_size, SINGLE_BANK);
+ break;
+ case ENDP_TYPE_BULK:
+ Host_configure_pipe(pipe, 0, endp, TYPE_BULK, token, packet_size, SINGLE_BANK);
+ break;
+ case ENDP_TYPE_INT:
+ Host_configure_pipe(pipe, 0, endp, TYPE_INTERRUPT, token, packet_size, SINGLE_BANK);
+ break;
+ case ENDP_TYPE_ISO:
+ Host_configure_pipe(pipe, 0, endp, TYPE_ISOCHRONOUS, token, packet_size, SINGLE_BANK);
+ break;
+ }
+ Host_configure_address(pipe, addr);
+ Host_enable_pipe_interrupt(pipe);
+
+ return pipe;
+}
+
+int usbh_free_endpoint(int pipe)
+{
+ usbh_pipe_t *p = &usbh.pipe[pipe];
+
+ Host_disable_pipe_interrupt(pipe);
+ Host_reset_pipe(pipe);
+ Host_unallocate_memory(pipe);
+ Host_disable_pipe(pipe);
+
+ memset(p, 0, sizeof(usbh_pipe_t));
+
+ return 0;
+}
+
+static void usbh_start_iso_transfer(int pipe)
+{
+ usbh_pipe_t *p = &usbh.pipe[pipe];
+
+ ASSERT(p->type == ENDP_TYPE_ISO);
+
+ if (p->endp & USB_ENDPOINT_IN) {
+ p->state = PIPE_ISO_IN;
+ Disable_global_interrupt();
+ Host_reset_pipe(pipe);
+ UOTGHS->UOTGHS_HSTPIPERR[pipe] = 0;
+ Host_ack_in_received(pipe); Host_enable_in_received_interrupt(pipe);
+ Host_ack_pipe_error(pipe); Host_enable_pipe_error_interrupt(pipe);
+ Enable_global_interrupt();
+ Host_disable_continuous_in_mode(pipe);
+ Host_configure_pipe_token(pipe, TOKEN_IN);
+ Host_ack_in_received(pipe);
+ Host_unfreeze_pipe(pipe);
+ } else {
+ panic("unsupported iso out\n");
+ }
+}
+
+int usbh_queue_iso_transfer(int pipe, void *buf, size_t buflen, usbh_iso_callback_t cb, void *arg)
+{
+ usbh_pipe_t *p = &usbh.pipe[pipe];
+
+// TRACE_OTG("pipe %d buf %p buflen %d cb %p arg %p\n", pipe, buf, buflen, cb, arg);
+
+ ASSERT(p->type == ENDP_TYPE_ISO);
+ ASSERT(p->state == PIPE_IDLE);
+
+ p->ptr = buf;
+ p->total_len = buflen;
+ p->pos = 0;
+
+ /* iso specific bits */
+ p->iso_cb = cb;
+ p->iso_cb_arg = arg;
+
+ ASSERT(p->endp & USB_ENDPOINT_IN);
+
+ usbh_start_iso_transfer(pipe);
+
+ return 0;
+}
+
+int usbh_set_iso_buffer(int pipe, void *buf, size_t buflen)
+{
+ usbh_pipe_t *p = &usbh.pipe[pipe];
+
+ ASSERT(p->type == ENDP_TYPE_ISO);
+
+ p->ptr = buf;
+ p->total_len = buflen;
+ p->pos = 0;
+
+ return 0;
+}
+
+int usbh_queue_transfer(int pipe, void *buf, size_t len)
+{
+ usbh_pipe_t *p = &usbh.pipe[pipe];
+
+ //TRACE_OTG("pipe %d, endp 0x%x, buf %p, len 0x%x\n", pipe, p->endp, buf, len);
+
+ ASSERT(p->state == PIPE_IDLE);
+
+ p->ptr = buf;
+ p->total_len = len;
+ p->pos = 0;
+
+ if (p->type == ENDP_TYPE_BULK || p->type == ENDP_TYPE_ISO) {
+ if (p->endp & USB_ENDPOINT_IN) {
+ p->state = PIPE_IN;
+ Disable_global_interrupt();
+ Host_reset_pipe(pipe);
+ UOTGHS->UOTGHS_HSTPIPERR[pipe] = 0;
+ Host_ack_in_received(pipe); Host_enable_in_received_interrupt(pipe);
+ Host_ack_nak_received(pipe); Host_enable_nak_received_interrupt(pipe);
+ //Host_ack_short_packet(pipe); Host_enable_short_packet_interrupt(pipe);
+ Host_ack_pipe_error(pipe); Host_enable_pipe_error_interrupt(pipe);
+ Enable_global_interrupt();
+ Host_disable_continuous_in_mode(pipe);
+ Host_configure_pipe_token(pipe, TOKEN_IN);
+ Host_ack_in_received(pipe);
+ Host_unfreeze_pipe(pipe);
+ } else {
+ p->state = PIPE_OUT;
+ Disable_global_interrupt();
+ Host_reset_pipe(pipe);
+ Host_configure_pipe_token(pipe, TOKEN_OUT);
+ Host_ack_out_ready(pipe); Host_enable_out_ready_interrupt(pipe);
+ Host_ack_pipe_error(pipe); Host_enable_pipe_error_interrupt(pipe);
+ //Host_enable_ping(pipe); // XXX ONLY for usb 2.0
+
+ Host_unfreeze_pipe(pipe);
+ Enable_global_interrupt();
+
+ Host_reset_pipe_fifo_access(pipe);
+
+ size_t towrite = MIN(p->total_len, Host_get_pipe_size(pipe));
+ uint32_t written = host_write_p_txpacket(pipe, p->ptr, towrite, NULL);
+ p->pos += written;
+
+ Host_ack_out_ready(pipe);
+ Host_send_out(pipe);
+ }
+ } else {
+ panic("unimplemented\n");
+ }
+#if 0
+ dbgPrintf("INRQ 0x%x\n", UOTGHS->UOTGHS_HSTPIPINRQ[pipe]);
+ dbgPrintf("PIPCFG 0x%x\n", UOTGHS->UOTGHS_HSTPIPCFG[pipe]);
+ dbgPrintf("PIPIMR 0x%x\n", UOTGHS->UOTGHS_HSTPIPIMR[pipe]);
+ dbgPrintf("PIPERR 0x%x\n", UOTGHS->UOTGHS_HSTPIPERR[pipe]);
+ dbgPrintf("PIP 0x%x\n", UOTGHS->UOTGHS_HSTPIP);
+#endif
+
+ return 0;
+}
+
+int usbh_check_transfer(int pipe)
+{
+ usbh_pipe_t *p = &usbh.pipe[pipe];
+
+ // poll the pipe to wait for it to get to complete
+ int result;
+ switch (p->state) {
+ case PIPE_IN_COMPLETE:
+ case PIPE_OUT_COMPLETE:
+ p->state = PIPE_IDLE;
+ if (p->result < 0) {
+ result = p->result;
+ } else {
+ result = p->pos;
+ }
+ p->result = PIPE_RESULT_OK;
+ break;
+ case PIPE_IN:
+ case PIPE_OUT:
+ result = PIPE_RESULT_NOT_READY;
+ break;
+ default:
+ case PIPE_NO_CONFIG:
+ case PIPE_IDLE:
+ result = PIPE_RESULT_NOT_QUEUED;
+ break;
+ }
+
+ return result;
+}
+
+uint32_t usbh_get_frame_num(void)
+{
+ return (UOTGHS->UOTGHS_HSTFNUM >> 3) & 0x7ff;
+}
+
+static void usbh_host_reset_pipe(int pipe)
+{
+ usbh_pipe_t *p = &usbh.pipe[pipe];
+
+ switch (p->state) {
+ case PIPE_SETUP_DTOH:
+ case PIPE_SETUP_DTOH_IN:
+ case PIPE_SETUP_DTOH_OUT:
+ case PIPE_SETUP_HTOD:
+ case PIPE_SETUP_HTOD_OUT:
+ case PIPE_SETUP_HTOD_IN:
+ case PIPE_SETUP_COMPLETE:
+ p->state = PIPE_SETUP_COMPLETE;
+ p->result = PIPE_RESULT_RESET;
+ break;
+ default:
+ p->state = PIPE_IDLE;
+ ;
+ }
+}
+
+static void usbh_reset_all_pipes(void)
+{
+ int i;
+ for (i = 0; i < CHIP_USB_NUMENDPOINTS; i++) {
+ usbh_host_reset_pipe(i);
+ }
+}
+
+static void usbh_clear_all_pipes(void)
+{
+ int i;
+ for (i = 0; i < CHIP_USB_NUMENDPOINTS; i++) {
+ usbh_free_endpoint(i);
+ }
+}
+
+static void usbh_host_pipe_irq(int pipe)
+{
+ usbh_pipe_t *p = &usbh.pipe[pipe];
+
+ uint32_t pipe_isr = UOTGHS->UOTGHS_HSTPIPISR[pipe];
+// TRACE_OTG("pipe isr 0x%x\n", pipe_isr);
+ pipe_isr &= UOTGHS->UOTGHS_HSTPIPIMR[pipe];
+// TRACE_OTG("pipe %d isr 0x%x (post mask)\n", pipe, pipe_isr);
+// dump_pipe(pipe);
+
+ if (pipe_isr & UOTGHS_HSTPIPISR_TXSTPI) { // transmitted setup
+ Host_ack_setup_ready();
+ Host_disable_setup_ready_interrupt();
+ if (p->state == PIPE_SETUP_DTOH) {
+ if (p->total_len > 0) {
+ // deal with the IN token
+ Host_disable_continuous_in_mode(pipe);
+ Host_configure_pipe_token(pipe, TOKEN_IN);
+ Host_ack_in_received_free(pipe); Host_enable_in_received_interrupt(pipe);
+ Host_ack_stall(pipe); Host_enable_stall_interrupt(pipe);
+ Host_unfreeze_pipe(pipe);
+
+ p->state = PIPE_SETUP_DTOH_IN;
+ } else {
+ panic("unhandled situation\n");
+ p->state = PIPE_SETUP_DTOH_OUT;
+ }
+ } else if (p->state == PIPE_SETUP_HTOD) {
+ if (p->total_len > 0) {
+ // out token phase
+ Host_configure_pipe_token(pipe, TOKEN_OUT);
+ Host_ack_out_ready(pipe); Host_enable_out_ready_interrupt(pipe);
+ Host_ack_stall(pipe); Host_enable_stall_interrupt(pipe);
+
+ Host_unfreeze_pipe(pipe);
+
+ Host_reset_pipe_fifo_access(pipe);
+ uint32_t written = host_write_p_txpacket(pipe, p->ptr, p->total_len, NULL);
+ //TRACE_OTG("%d bytes written to packet\n", written);
+ p->pos += written;
+
+ Host_send_out(pipe);
+
+// panic("unhandled situation: out phase with bytes\n");
+ p->state = PIPE_SETUP_HTOD_OUT;
+ } else {
+ // deal with the IN token
+ Host_disable_continuous_in_mode(pipe);
+ Host_configure_pipe_token(pipe, TOKEN_IN);
+ Host_ack_in_received_free(pipe); Host_enable_in_received_interrupt(pipe);
+ Host_ack_stall(pipe); Host_enable_stall_interrupt(pipe);
+ Host_unfreeze_pipe(pipe);
+
+ p->state = PIPE_SETUP_HTOD_IN;
+ }
+ } else {
+ panic("bad state %d (%s) with TXSTPI\n", p->state, pipe_state_to_str(p->state));
+ }
+ }
+ if (pipe_isr & UOTGHS_HSTPIPISR_RXINI) { // in packet
+ if (p->state == PIPE_SETUP_DTOH_IN) {
+ //TRACE_OTG("got in, ");
+
+ Host_reset_pipe_fifo_access(pipe);
+
+ uint32_t read = host_read_p_rxpacket(pipe, (uint8_t *)p->ptr + p->pos, p->total_len - p->pos, NULL);
+ p->pos += read;
+
+ //TRACE_OTG_NONL("read %d\n", read);
+
+ Host_freeze_pipe(pipe);
+
+ if ((p->flags & PIPE_FLAG_INCOMPLETE_SETUP) || read < Host_get_pipe_size(pipe) || p->pos == p->total_len) {
+ // deal with OUT token
+ //TRACE_OTG("done, moving to OUT phase\n");
+ Host_ack_in_received(pipe);
+ Host_disable_in_received_interrupt(pipe);
+ Host_configure_pipe_token(pipe, TOKEN_OUT);
+ Host_ack_out_ready_send(pipe); Host_enable_out_ready_interrupt(pipe);
+ Host_ack_stall(pipe); Host_enable_stall_interrupt(pipe);
+ Host_unfreeze_pipe(pipe);
+ p->state = PIPE_SETUP_DTOH_OUT;
+ } else {
+ Host_ack_in_received_free(pipe);
+ Host_unfreeze_pipe(pipe);
+ }
+ } else if (p->state == PIPE_SETUP_HTOD_IN) {
+ Host_free_in(pipe);
+ Host_disable_in_received_interrupt(pipe);
+ p->state = PIPE_SETUP_COMPLETE;
+ //TRACE_OTG("end of in, done\n");
+ } else if (p->state == PIPE_IN) {
+ // regular pipe in in mode
+ Host_ack_in_received(pipe);
+
+ //TRACE_OTG("got in, ");
+
+ Host_reset_pipe_fifo_access(pipe);
+ uint32_t read = host_read_p_rxpacket(pipe, (uint8_t *)p->ptr + p->pos, p->total_len - p->pos, NULL);
+ p->pos += read;
+
+ //TRACE_OTG_NONL("read %d\n", read);
+
+ Host_freeze_pipe(pipe);
+
+ if (read < Host_get_pipe_size(pipe) || p->pos == p->total_len) {
+ Host_reset_pipe(pipe);
+ p->state = PIPE_IN_COMPLETE;
+ p->result = PIPE_RESULT_OK;
+ } else {
+ // multi in transfer
+ //Host_configure_pipe_token(pipe, TOKEN_IN);
+ Host_ack_in_received_free(pipe);
+ Host_unfreeze_pipe(pipe);
+ }
+ } else if (p->state == PIPE_ISO_IN) {
+ // isochronous pipe in in mode
+ Host_ack_in_received(pipe);
+
+ //TRACE_OTG("ISO got in, ");
+
+ Host_reset_pipe_fifo_access(pipe);
+ uint32_t read = host_read_p_rxpacket(pipe, (uint8_t *)p->ptr + p->pos, p->total_len - p->pos, NULL);
+ p->pos += read;
+
+ //TRACE_OTG_NONL("read %d\n", read);
+
+ Host_freeze_pipe(pipe);
+
+ p->state = PIPE_ISO_IN_WAIT;
+ p->result = PIPE_RESULT_OK;
+
+ Host_ack_in_received(pipe);
+
+ // schedule for a new sof interrupt
+ Host_enable_sof_interrupt();
+ usbh.last_sof = (UOTGHS->UOTGHS_HSTFNUM >> 3) & 0x7ff;
+
+ // do callback
+ p->iso_cb(p->iso_cb_arg, p->result, p->ptr, p->pos);
+ } else {
+ panic("bad state %d (%s) with RXINIT\n", p->state, pipe_state_to_str(p->state));
+ }
+ }
+ if (pipe_isr & UOTGHS_HSTPIPISR_TXOUTI) { // out packet complete
+ if (p->state == PIPE_SETUP_DTOH_OUT) {
+ Host_disable_out_ready_interrupt(pipe);
+ Host_ack_out_ready(pipe);
+ p->state = PIPE_SETUP_COMPLETE;
+ p->result = PIPE_RESULT_OK;
+ //TRACE_OTG("end of out, done\n");
+ } else if (p->state == PIPE_SETUP_HTOD_OUT) {
+ if (p->pos == p->total_len) {
+ // deal with the IN token
+ Host_disable_out_ready_interrupt(pipe);
+ Host_ack_out_ready(pipe);
+ Host_disable_continuous_in_mode(pipe);
+ Host_configure_pipe_token(pipe, TOKEN_IN);
+ Host_ack_in_received_free(pipe); Host_enable_in_received_interrupt(pipe);
+ Host_ack_stall(pipe); Host_enable_stall_interrupt(pipe);
+ Host_unfreeze_pipe(pipe);
+ p->state = PIPE_SETUP_HTOD_IN;
+ } else {
+ panic("unhandled situation, multi out control transfer\n");
+ Host_ack_out_ready(pipe);
+ Host_unfreeze_pipe(pipe);
+ }
+ } else if (p->state == PIPE_OUT) {
+ // regular pipe in out mode
+ Host_ack_out_ready(pipe);
+ if (p->pos == p->total_len) {
+ //TRACE_OTG("OUT complete\n");
+ Host_reset_pipe(pipe);
+ p->state = PIPE_OUT_COMPLETE;
+ p->result = PIPE_RESULT_OK;
+ } else {
+ //Host_reset_pipe(pipe);
+ Host_configure_pipe_token(pipe, TOKEN_OUT);
+ Host_ack_out_ready(pipe); Host_enable_out_ready_interrupt(pipe);
+ Host_ack_pipe_error(pipe); Host_enable_pipe_error_interrupt(pipe);
+
+ Host_unfreeze_pipe(pipe);
+
+ Host_reset_pipe_fifo_access(pipe);
+ size_t towrite = MIN(p->total_len - p->pos, Host_get_pipe_size(pipe));
+ //TRACE_OTG("second part of out: towrite %d pos %d\n", towrite, p->pos);
+ uint32_t written = host_write_p_txpacket(pipe, p->ptr + p->pos, towrite, NULL);
+ p->pos += written;
+
+ Host_ack_out_ready(pipe);
+ Host_send_out(pipe);
+ }
+ } else {
+ panic("bad state %d (%s) with TXOUTI\n", p->state, pipe_state_to_str(p->state));
+ }
+ }
+ if (pipe_isr & UOTGHS_HSTPIPISR_NAKEDI) { // nak received
+ //TRACE_OTG("pipe %d got nak\n", pipe);
+ Host_ack_nak_received(pipe);
+ Host_disable_nak_received_interrupt(pipe);
+ if (p->state == PIPE_IN) {
+ Host_reset_pipe(pipe);
+ p->state = PIPE_IN_COMPLETE;
+ p->result = PIPE_RESULT_NAK;
+ } if (p->state == PIPE_IN_COMPLETE) {
+ ; // do nothing
+ } else {
+ panic("bad state %d (%s) with NAKEDI\n", p->state, pipe_state_to_str(p->state));
+ }
+ }
+ if (pipe_isr & UOTGHS_HSTPIPISR_RXSTALLDI) { // stall received
+ Host_disable_stall_interrupt(pipe);
+ Host_ack_stall(pipe);
+ if (p->state == PIPE_SETUP_DTOH_IN) {
+ Host_disable_in_received_interrupt(pipe);
+ p->state = PIPE_SETUP_COMPLETE;
+ p->result = PIPE_RESULT_STALL;
+ } else if (p->state == PIPE_SETUP_HTOD_IN) {
+ Host_disable_in_received_interrupt(pipe);
+ p->state = PIPE_SETUP_COMPLETE;
+ p->result = PIPE_RESULT_STALL;
+ } else {
+ panic("bad state %d (%s) with RXSTALLDI\n", p->state, pipe_state_to_str(p->state));
+ }
+ }
+ if (pipe_isr & UOTGHS_HSTPIPISR_PERRI) { // pipe error
+ uint32_t perr = UOTGHS->UOTGHS_HSTPIPERR[pipe];
+ TRACE_OTG("pipe %d got perr 0x%x\n", pipe, perr);
+
+ Host_ack_pipe_error(pipe);
+
+ if (p->state == PIPE_IN && perr & UOTGHS_HSTPIPERR_PID) {
+ UOTGHS->UOTGHS_HSTPIPERR[pipe] = ~0x64;
+
+ panic("got PID error\n");
+
+ // XXX why do we get pid error?
+ Host_unfreeze_pipe(pipe);
+ }
+ }
+}
+
+static void usbh_host_irq(uint32_t isr)
+{
+ int i;
+
+ if (isr & UOTGHS_HSTISR_DCONNI) { // device connected
+ dbgPrintf("USB: connect\n");
+ }
+ if (isr & UOTGHS_HSTISR_DDISCI) { // device disconnected
+ dbgPrintf("USB: disconnect\n");
+ usbh.state = USBH_DEVICE_UNATTACHED;
+ host_disable_all_pipes();
+ usbh_reset_all_pipes();
+ goto done;
+ }
+ if (isr & UOTGHS_HSTISR_HSOFI) { // start of frame
+ Host_ack_sof();
+
+ //uint32_t f = (UOTGHS->UOTGHS_HSTFNUM >> 3) & 0x7ff;
+ //if (usbh.last_sof != f) {
+ for (i = 0; i < CHIP_USB_NUMENDPOINTS; i++) {
+ if (usbh.pipe[i].state == PIPE_ISO_IN_WAIT) {
+ //dbgPrintf("SOF: iso in wait pipe %d\n", i);
+ //dbgPrintf("last 0x%x f 0x%x\n", last_sof, f);
+ Host_disable_sof_interrupt();
+
+ usbh_start_iso_transfer(i);
+ }
+ }
+ //}
+ }
+
+ for (i = 0; i < CHIP_USB_NUMENDPOINTS; i++) {
+ if (isr & (1 << (8 + i)))
+ usbh_host_pipe_irq(i);
+ }
+
+done:
+ UOTGHS->UOTGHS_HSTICR = isr;
+}
+
+void UOTGHS_IrqHandler(void)
+{
+ usbh.irq_count++;
+
+#if 0
+ if ((usbh.irq_count % 1024) == 0)
+ TRACE_OTG("%d usb irqs\n", usbh.irq_count);
+#endif
+
+ uint32_t gen_sr = UOTGHS->UOTGHS_SR;
+ uint32_t host_isr = UOTGHS->UOTGHS_HSTISR;
+ host_isr &= UOTGHS->UOTGHS_HSTIMR;
+
+ if (host_isr) {
+ usbh_host_irq(host_isr);
+ }
+}
+
+int usbh_send_setup(const void *_setup, void *buf, int incomplete)
+{
+ const struct usb_setup_packet *setup = _setup;
+
+// TRACE_OTG("setup %p, buf %p, incomplete %d\n", setup, buf, incomplete);
+ ASSERT(usbh.pipe[P_CONTROL].state == PIPE_IDLE);
+
+ Disable_global_interrupt();
+ Host_configure_pipe_token(P_CONTROL, TOKEN_SETUP);
+ Host_ack_setup_ready();
+ Host_unfreeze_pipe(P_CONTROL);
+ Host_enable_setup_ready_interrupt();
+
+ Host_reset_pipe_fifo_access(P_CONTROL);
+ host_write_p_txpacket(P_CONTROL, setup, sizeof(*setup), NULL);
+ Host_send_setup();
+
+ /* set up pipe state */
+ usbh_pipe_t *p = &usbh.pipe[P_CONTROL];
+ p->state = (setup->bmRequestType & USB_SETUP_DIR_DEVICE_TO_HOST) ? PIPE_SETUP_DTOH : PIPE_SETUP_HTOD;
+ p->flags = incomplete ? PIPE_FLAG_INCOMPLETE_SETUP : 0;
+ p->ptr = buf;
+ p->pos = 0;
+ p->total_len = setup->wLength;
+
+ Enable_global_interrupt();
+
+ // XXX timeout
+ int result = 0;
+ for (;;) {
+ coopYield();
+
+ ASSERT(p->state != PIPE_NO_CONFIG);
+ ASSERT(p->state != PIPE_IDLE);
+
+ // poll the pipe to wait for it to get to complete
+ if (p->state == PIPE_SETUP_COMPLETE) {
+ p->state = PIPE_IDLE;
+ if (p->result < 0) {
+ result = p->result;
+ } else {
+ result = p->pos;
+ }
+ p->result = PIPE_RESULT_OK;
+ break;
+ }
+ }
+ //TRACE_OTG("transfer complete, took %lld usecs\n", micros());
+
+// TRACE_OTG("transfer complete, result %d\n", result);
+ return result;
+}
+
+
+void usbh_work(void)
+{
+ switch (usbh.state) {
+ case USBH_DISABLED:
+ break;
+ case USBH_INIT:
+ Usb_unfreeze_clock();
+
+ Usb_force_host_mode();
+ //Wr_bitfield(UOTGHS->UOTGHS_HSTCTRL, UOTGHS_HSTCTRL_SPDCONF_Msk, 1, UOTGHS_HSTCTRL_SPDCONF_Pos); // force full/low speed
+ Usb_disable_id_pin();
+
+ Disable_global_interrupt();
+ Usb_disable();
+ (void)Is_usb_enabled();
+ Enable_global_interrupt();
+ Usb_enable_otg_pad();
+ Usb_set_vbof_active_high();
+ Usb_enable_vbus_hw_control();
+ Usb_enable();
+ Host_enable_device_disconnection_interrupt();
+#if !USE_HIGH_SPEED
+ Wr_bitfield(UOTGHS->UOTGHS_HSTCTRL, UOTGHS_HSTCTRL_SPDCONF_Msk, 3, UOTGHS_HSTCTRL_SPDCONF_Pos); // force full speed mode
+#endif
+ usbh.state = USBH_DEVICE_UNATTACHED;
+
+ // clear all ints
+ UOTGHS->UOTGHS_SCR = 0xf;
+ UOTGHS->UOTGHS_HSTICR = 0xf;
+ break;
+
+ case USBH_DEVICE_UNATTACHED:
+ TRACE_OTG("DEVICE_UNATTACHED\n");
+ // clear all ints
+ UOTGHS->UOTGHS_SCR = 0xf;
+ UOTGHS->UOTGHS_HSTICR = 0xf;
+ Host_disable_sof();
+ Host_ack_sof();
+ Usb_enable_vbus();
+
+ // clear all the pipes
+ host_disable_all_pipes();
+ usbh_clear_all_pipes();
+
+ // wipe any accessory state
+ accessory_deinit();
+
+ usbh.state = USBH_WAIT_FOR_DEVICE;
+ TRACE_OTG("USBH_WAIT_FOR_DEVICE\n");
+ break;
+ case USBH_WAIT_FOR_DEVICE:
+ Usb_enable_vbus();
+ if (Is_usb_vbus_high()) {
+ if (Is_host_device_connection()) {
+ TRACE_OTG("vbus high and saw device connection, moving to USBH_DEVICE_ATTACHED\n");
+ Usb_ack_bconnection_error_interrupt();
+ Usb_ack_vbus_error_interrupt();
+ Host_ack_device_connection();
+ Host_ack_hwup();
+ usbh.state = USBH_DEVICE_ATTACHED;
+ }
+ }
+ break;
+ case USBH_DEVICE_ATTACHED:
+ TRACE_OTG("USBH_DEVICE_ATTACHED\n");
+ TRACE_OTG("starting SOF\n");
+ Host_enable_sof();
+
+ // wait 100ms
+ usbh.state = USBH_DEVICE_ATTACHED_SOF_WAIT;
+ usbh_start_sleep();
+ break;
+ case USBH_DEVICE_ATTACHED_SOF_WAIT:
+ if (usbh_sleep_expired(100))
+ usbh.state = USBH_DEVICE_ATTACHED_RESET;
+ break;
+ case USBH_DEVICE_ATTACHED_RESET:
+ // reset the bus
+ TRACE_OTG("USBH_DEVICE_RESET\n");
+ TRACE_OTG("resetting bus\n");
+ Host_send_reset();
+ usbh.state = USBH_DEVICE_ATTACHED_RESET_WAIT;
+ break;
+ case USBH_DEVICE_ATTACHED_RESET_WAIT:
+ if (Is_host_reset_sent()) {
+ Host_ack_reset_sent();
+
+ TRACE_OTG("done with reset\n");
+
+ // wait 100ms
+ usbh.state = USBH_DEVICE_ATTACHED_POST_RESET_WAIT;
+ usbh_start_sleep();
+ }
+ break;
+ case USBH_DEVICE_ATTACHED_POST_RESET_WAIT:
+ if (usbh_sleep_expired(100))
+ usbh.state = USBH_DEVICE_ATTACHED_QUERY;
+ break;
+ case USBH_DEVICE_ATTACHED_QUERY: {
+ TRACE_OTG("USBH_DEVICE_ATTACHED_QUERY\n");
+ TRACE_OTG("configuring ep0 pipe\n");
+ int pip = usbh_setup_endpoint(0, 0, ENDP_TYPE_CONTROL, 8);
+ ASSERT(pip == P_CONTROL);
+
+ // build get device descriptor setup packet, send short version first (to find maxpacketsize)
+ struct usb_setup_packet setup = {
+ USB_SETUP_DIR_DEVICE_TO_HOST,
+ SETUP_GET_DESCRIPTOR,
+ DESCRIPTOR_DEVICE << 8,
+ 0,
+ 8
+ };
+
+ uint8_t buf[64];
+ int len = usbh_send_setup(&setup, buf, true);
+ TRACE_OTG("usbh_send_setup returns %d\n", len);
+ if (len == PIPE_RESULT_RESET)
+ break;
+
+ // configure the pipe for the maxpacket size the device requests
+ uint32_t maxpacketsize = buf[OFFSET_FIELD_MAXPACKETSIZE];
+ TRACE_OTG("got initial descriptor: len %d, maxpacketsize %d\n", buf[OFFSET_DESCRIPTOR_LENGTH], buf[OFFSET_FIELD_MAXPACKETSIZE]);
+
+ Host_configure_pipe(P_CONTROL, 0, EP_CONTROL, TYPE_CONTROL, TOKEN_SETUP, maxpacketsize, SINGLE_BANK);
+
+ // assign the device an address
+ usbh.dev.address = usbh.next_address++;
+ setup = (struct usb_setup_packet){
+ USB_SETUP_DIR_HOST_TO_DEVICE,
+ SETUP_SET_ADDRESS,
+ usbh.dev.address,
+ 0,
+ 0
+ };
+
+ len = usbh_send_setup(&setup, buf, false);
+ TRACE_OTG("usbh_send_setup returns %d\n", len);
+ if (len == PIPE_RESULT_RESET)
+ break;
+
+ Host_configure_address(P_CONTROL, usbh.dev.address);
+
+ TRACE_OTG("USBH_DEVICE_ADDRESSED, address %d\n", usbh.dev.address);
+
+ // read the final copy of the device descriptor
+ setup = (struct usb_setup_packet){
+ USB_SETUP_DIR_DEVICE_TO_HOST,
+ SETUP_GET_DESCRIPTOR,
+ DESCRIPTOR_DEVICE << 8,
+ 0,
+ 0x40
+ };
+
+ usbh.dev.devdesc;
+ len = usbh_send_setup(&setup, usbh.dev.devdesc, false);
+ TRACE_OTG("usbh_send_setup returns %d\n", len);
+ if (len == PIPE_RESULT_RESET)
+ break;
+
+ // pick out the vid/pid
+ usbh.dev.vid = *(uint16_t *)(usbh.dev.devdesc + OFFSET_FIELD_VID);
+ usbh.dev.pid = *(uint16_t *)(usbh.dev.devdesc + OFFSET_FIELD_PID);
+
+ dbgPrintf("USB: found device vid/pid 0x%x/0x%x\n", usbh.dev.vid, usbh.dev.pid);
+
+ // read a copy of the config descriptor
+ setup = (struct usb_setup_packet){
+ USB_SETUP_DIR_DEVICE_TO_HOST,
+ SETUP_GET_DESCRIPTOR,
+ DESCRIPTOR_CONFIGURATION << 8,
+ 0,
+ 9
+ };
+ len = usbh_send_setup(&setup, buf, false);
+ TRACE_OTG("usbh_send_setup returns %d\n", len);
+ if (len == PIPE_RESULT_RESET)
+ break;
+
+ uint16_t total_config_length = *(uint16_t *)(buf + OFFSET_FIELD_TOTAL_LENGTH);
+
+ TRACE_OTG("config descriptor length %d\n", total_config_length);
+
+ ASSERT(total_config_length < usbh.dev.devconfig);
+
+ // get the final copy of the config descriptor
+ setup = (struct usb_setup_packet){
+ USB_SETUP_DIR_DEVICE_TO_HOST,
+ SETUP_GET_DESCRIPTOR,
+ DESCRIPTOR_CONFIGURATION << 8,
+ 0,
+ total_config_length
+ };
+
+ len = usbh_send_setup(&setup, usbh.dev.devconfig, false);
+ TRACE_OTG("usbh_send_setup returns %d\n", len);
+ if (len == PIPE_RESULT_RESET)
+ break;
+
+ // see if we're connected to an accessory
+ switch ((usbh.dev.vid << 16) | usbh.dev.pid) {
+ case 0x18d12d00: // accessory
+ case 0x18d12d01: // accessory + adb
+ case 0x18d12d02: // audio
+ case 0x18d12d03: // audio + adb
+ case 0x18d12d04: // accessory + audio
+ case 0x18d12d05: // accessory + audio + adb
+ dbgPrintf("USB: found accessory 0x%x:0x%x\n", usbh.dev.vid, usbh.dev.pid);
+ usbh.state = USBH_DEVICE_ACCESSORY_INIT;
+ break;
+ default:
+ dbgPrintf("USB: didn't find accessory, trying to change its mode\n");
+ usbh.state = USBH_DEVICE_TRY_ACCESSORY;
+ break;
+ }
+
+ break;
+ }
+ case USBH_DEVICE_TRY_ACCESSORY: {
+ // read protocol version
+ struct usb_setup_packet setup = (struct usb_setup_packet){
+ USB_SETUP_DIR_DEVICE_TO_HOST | USB_SETUP_TYPE_VENDOR,
+ 0x33,
+ 0,
+ 0,
+ 2
+ };
+
+ uint16_t version;
+ int len = usbh_send_setup(&setup, &version, false);
+ TRACE_OTG("version len %d\n", len);
+ if (len == PIPE_RESULT_RESET)
+ break;
+
+ if (len <= 0) {
+ dbgPrintf("USB: no version returned, not accessory\n");
+ usbh.state = USBH_DEVICE_IDLE;
+ break;
+ }
+ TRACE_OTG("accessory returned version %d\n", version);
+ if (version < 1 || version > 2) {
+ dbgPrintf("USB: bad protocol version %d, not accessory\n", version);
+ usbh.state = USBH_DEVICE_IDLE;
+ break;
+ }
+
+ // send google strings
+ setup = (struct usb_setup_packet){
+ USB_SETUP_DIR_HOST_TO_DEVICE | USB_SETUP_TYPE_VENDOR,
+ 0x34,
+ 0,
+ 0,
+ 0
+ };
+
+ setup.wIndex = 0;
+ setup.wLength = strlen(usbh.accessory_string_vendor) + 1;
+ len = usbh_send_setup(&setup, (void *)usbh.accessory_string_vendor, false);
+ if (len == PIPE_RESULT_RESET)
+ break;
+
+ setup.wIndex = 1;
+ setup.wLength = strlen(usbh.accessory_string_name) + 1;
+ len = usbh_send_setup(&setup, (void *)usbh.accessory_string_name, false);
+ if (len == PIPE_RESULT_RESET)
+ break;
+
+ setup.wIndex = 2;
+ setup.wLength = strlen(usbh.accessory_string_longname) + 1;
+ len = usbh_send_setup(&setup, (void *)usbh.accessory_string_longname, false);
+ if (len == PIPE_RESULT_RESET)
+ break;
+
+ setup.wIndex = 3;
+ setup.wLength = strlen(usbh.accessory_string_version) + 1;
+ len = usbh_send_setup(&setup, (void *)usbh.accessory_string_version, false);
+ if (len == PIPE_RESULT_RESET)
+ break;
+
+ setup.wIndex = 4;
+ setup.wLength = strlen(usbh.accessory_string_url) + 1;
+ len = usbh_send_setup(&setup, (void *)usbh.accessory_string_url, false);
+ if (len == PIPE_RESULT_RESET)
+ break;
+
+ setup.wIndex = 5;
+ setup.wLength = strlen(usbh.accessory_string_serial) + 1;
+ len = usbh_send_setup(&setup, (void *)usbh.accessory_string_serial, false);
+ if (len == PIPE_RESULT_RESET)
+ break;
+
+#if AUDIO_ACCESSORY
+ // we want audio
+ setup = (struct usb_setup_packet){
+ USB_SETUP_DIR_HOST_TO_DEVICE | USB_SETUP_TYPE_VENDOR,
+ 0x3a,
+ 1,
+ 0,
+ 0
+ };
+ len = usbh_send_setup(&setup, NULL, false);
+ if (len == PIPE_RESULT_RESET)
+ break;
+#endif
+
+ // send accessory start
+ setup = (struct usb_setup_packet){
+ USB_SETUP_DIR_HOST_TO_DEVICE | USB_SETUP_TYPE_VENDOR,
+ 0x35,
+ 0,
+ 0,
+ 0
+ };
+ len = usbh_send_setup(&setup, NULL, false);
+ if (len == PIPE_RESULT_RESET)
+ break;
+
+ // go to idle mode, wait for the device to reset out from underneath us
+ usbh.state = USBH_DEVICE_IDLE;
+ break;
+ }
+ case USBH_DEVICE_ACCESSORY_INIT: {
+ // set configuration 1
+ struct usb_setup_packet setup = (struct usb_setup_packet){
+ USB_SETUP_DIR_HOST_TO_DEVICE,
+ SETUP_SET_CONFIGURATION,
+ 1,
+ 0,
+ 0
+ };
+
+ int len = usbh_send_setup(&setup, NULL, false);
+ if (len == PIPE_RESULT_RESET)
+ break;
+
+ int ret = accessory_init(&usbh.dev);
+ if (ret < 0) {
+ usbh.state = USBH_DEVICE_IDLE;
+ break;
+ }
+
+ usbh.state = USBH_DEVICE_ACCESSORY;
+ break;
+ }
+ case USBH_DEVICE_ACCESSORY:
+ case USBH_DEVICE_IDLE:
+ //TRACE_OTG("USBH_DEVICE_WAIT\n");
+ break;
+ }
+}
+
+/* for the coop threading system */
+static void usbhTask(void* ptr)
+{
+ for (;;) {
+ coopYield();
+ usbh_work();
+ // let the accessory state machine run
+ accessory_work();
+ }
+}
+
+void usbh_init(void)
+{
+ usbh.next_address = 1;
+ usbh.state = USBH_DISABLED;
+
+ /* default accessory strings */
+ usbh.accessory_string_vendor = DEFAULT_ACCESSORY_STRING_VENDOR;
+ usbh.accessory_string_name = DEFAULT_ACCESSORY_STRING_NAME;
+ usbh.accessory_string_longname = DEFAULT_ACCESSORY_STRING_LONGNAME;
+ usbh.accessory_string_version = DEFAULT_ACCESSORY_STRING_VERSION;
+ usbh.accessory_string_url = DEFAULT_ACCESSORY_STRING_URL;
+ usbh.accessory_string_serial = DEFAULT_ACCESSORY_STRING_SERIAL;
+
+ /* Enable peripheral clock for UOTGHS */
+ PMC_EnablePeripheral(ID_UOTGHS);
+
+#if 1
+ /* Enable UPLL 480 MHz */
+ PMC->CKGR_UCKR = CKGR_UCKR_UPLLEN | CKGR_UCKR_UPLLCOUNT(7);
+ /* Wait that UPLL is considered locked by the PMC */
+ while( !(PMC->PMC_SR & PMC_SR_LOCKU) )
+ ;
+
+ /* USB clock register: USB Clock Input is UTMI PLL */
+ PMC->PMC_USB = PMC_USB_USBS | PMC_USB_USBDIV(0);
+
+ PMC->PMC_SCER = PMC_SCER_UOTGCLK;
+#else
+ PMC->CKGR_UCKR = 0;
+ PMC->PMC_USB = PMC_USB_USBDIV(0);
+ PMC->PMC_SCER = PMC_SCER_UOTGCK;
+#endif
+
+ /* UOTGHS pins */
+ PIO_PinConfigure( pUOTGHSPins, PIO_LISTSIZE( pUOTGHSPins ) );
+
+ NVIC_SetPriority(UOTGHS_IRQn, (1<<__NVIC_PRIO_BITS) - 1);
+ NVIC_EnableIRQ(UOTGHS_IRQn);
+
+ coopSpawn(&usbhTask, NULL, 2048);
+
+ Usb_freeze_clock();
+}
+
+void usbh_set_accessory_string_vendor(const char *str)
+{
+ usbh.accessory_string_vendor = str;
+}
+
+void usbh_set_accessory_string_name(const char *str)
+{
+ usbh.accessory_string_name = str;
+}
+
+void usbh_set_accessory_string_longname(const char *str)
+{
+ usbh.accessory_string_longname = str;
+}
+
+void usbh_set_accessory_string_version(const char *str)
+{
+ usbh.accessory_string_version = str;
+}
+
+void usbh_set_accessory_string_url(const char *str)
+{
+ usbh.accessory_string_url = str;
+}
+
+void usbh_set_accessory_string_serial(const char *str)
+{
+ usbh.accessory_string_serial = str;
+}
+
+void usbh_start(void)
+{
+ if (usbh.state == USBH_DISABLED)
+ usbh.state = USBH_INIT;
+}
+
+int usbh_accessory_connected(void)
+{
+ return usbh.state == USBH_DEVICE_ACCESSORY;
+}
+
diff --git a/MakefileBasedBuild/app/usbh.h b/MakefileBasedBuild/app/usbh.h
new file mode 100644
index 0000000..38b041f
--- /dev/null
+++ b/MakefileBasedBuild/app/usbh.h
@@ -0,0 +1,98 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifdef ADK_INTERNAL
+#ifndef __USB_USBH_H
+#define __USB_USBH_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdlib.h>
+#include <stdint.h>
+
+typedef struct usbh_device {
+ uint8_t address;
+ uint8_t devdesc[64];
+ uint8_t devconfig[512]; // XXX max
+
+ uint16_t vid;
+ uint16_t pid;
+} usbh_device_t;
+
+#define PIPE_RESULT_OK (0)
+#define PIPE_RESULT_NOT_READY (-1)
+#define PIPE_RESULT_NOT_QUEUED (-2)
+#define PIPE_RESULT_ERR (-3)
+#define PIPE_RESULT_RESET (-4)
+#define PIPE_RESULT_NAK (-5)
+#define PIPE_RESULT_STALL (-6)
+
+#define DEFAULT_ACCESSORY_STRING_VENDOR "Google, Inc."
+#define DEFAULT_ACCESSORY_STRING_NAME "DemoKit"
+#define DEFAULT_ACCESSORY_STRING_LONGNAME "DemoKit Arduino Board"
+#define DEFAULT_ACCESSORY_STRING_VERSION "2.0"
+#define DEFAULT_ACCESSORY_STRING_URL "http://www.android.com"
+#define DEFAULT_ACCESSORY_STRING_SERIAL "0000000012345678"
+
+void usbh_init(void);
+void usbh_start(void);
+void usbh_work(void);
+
+void usbh_set_accessory_string_vendor(const char *str);
+void usbh_set_accessory_string_name(const char *str);
+void usbh_set_accessory_string_longname(const char *str);
+void usbh_set_accessory_string_version(const char *str);
+void usbh_set_accessory_string_url(const char *str);
+void usbh_set_accessory_string_serial(const char *str);
+
+enum usbh_endp_type {
+ ENDP_TYPE_CONTROL,
+ ENDP_TYPE_BULK,
+ ENDP_TYPE_INT,
+ ENDP_TYPE_ISO
+};
+
+int usbh_accessory_connected(void);
+
+int usbh_setup_endpoint(uint8_t addr, uint8_t endp, enum usbh_endp_type type, size_t packet_size);
+int usbh_free_endpoint(int pipe);
+
+int usbh_queue_transfer(int pipe, void *buf, size_t len);
+int usbh_check_transfer(int pipe);
+int usbh_send_setup(const void *setup, void *buf, int incomplete);
+
+/* isochronous transfers */
+typedef void (*usbh_iso_callback_t)(void *arg, int result, void *buf, size_t pos);
+int usbh_queue_iso_transfer(int pipe, void *buf, size_t buflen, usbh_iso_callback_t cb, void *arg);
+int usbh_set_iso_buffer(int pipe, void *buf, size_t buflen);
+
+uint32_t usbh_get_frame_num(void);
+
+int accessory_init(usbh_device_t *dev);
+void accessory_deinit(void);
+
+int accessory_send(const void *buf, size_t len);
+int accessory_receive(void *buf, size_t len);
+
+void accessory_work(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+#endif
diff --git a/MakefileBasedBuild/app/v_asm_arm.h b/MakefileBasedBuild/app/v_asm_arm.h
new file mode 100644
index 0000000..8ecbed3
--- /dev/null
+++ b/MakefileBasedBuild/app/v_asm_arm.h
@@ -0,0 +1,260 @@
+#ifdef ADK_INTERNAL
+/********************************************************************
+ * *
+ * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
+ * *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
+ * *
+ * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
+ * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
+ * *
+ ********************************************************************
+
+ function: arm7 and later wide math functions
+
+ ********************************************************************/
+
+#ifdef _ARM_ASSEM_
+
+#if !defined(_V_WIDE_MATH) && !defined(_LOW_ACCURACY_)
+#define _V_WIDE_MATH
+
+static inline ogg_int32_t MULT32(ogg_int32_t x, ogg_int32_t y) {
+ int lo,hi;
+ asm volatile("smull\t%0, %1, %2, %3"
+ : "=&r"(lo),"=&r"(hi)
+ : "%r"(x),"r"(y)
+ : "cc");
+ return(hi);
+}
+
+static inline ogg_int32_t MULT31(ogg_int32_t x, ogg_int32_t y) {
+ return MULT32(x,y)<<1;
+}
+
+static inline ogg_int32_t MULT31_SHIFT15(ogg_int32_t x, ogg_int32_t y) {
+ int lo,hi;
+ asm volatile("smull %0, %1, %2, %3\n\t"
+ "movs %0, %0, lsr #15\n\t"
+ "adc %1, %0, %1, lsl #17\n\t"
+ : "=&r"(lo),"=&r"(hi)
+ : "%r"(x),"r"(y)
+ : "cc");
+ return(hi);
+}
+
+#define MB() asm volatile ("" : : : "memory")
+
+static inline void XPROD32(ogg_int32_t a, ogg_int32_t b,
+ ogg_int32_t t, ogg_int32_t v,
+ ogg_int32_t *x, ogg_int32_t *y)
+{
+ int x1, y1, l;
+ asm( "smull %0, %1, %4, %6\n\t"
+ "smlal %0, %1, %5, %7\n\t"
+ "rsb %3, %4, #0\n\t"
+ "smull %0, %2, %5, %6\n\t"
+ "smlal %0, %2, %3, %7"
+ : "=&r" (l), "=&r" (x1), "=&r" (y1), "=r" (a)
+ : "3" (a), "r" (b), "r" (t), "r" (v)
+ : "cc" );
+ *x = x1;
+ MB();
+ *y = y1;
+}
+
+static inline void XPROD31(ogg_int32_t a, ogg_int32_t b,
+ ogg_int32_t t, ogg_int32_t v,
+ ogg_int32_t *x, ogg_int32_t *y)
+{
+ int x1, y1, l;
+ asm( "smull %0, %1, %4, %6\n\t"
+ "smlal %0, %1, %5, %7\n\t"
+ "rsb %3, %4, #0\n\t"
+ "smull %0, %2, %5, %6\n\t"
+ "smlal %0, %2, %3, %7"
+ : "=&r" (l), "=&r" (x1), "=&r" (y1), "=r" (a)
+ : "3" (a), "r" (b), "r" (t), "r" (v)
+ : "cc" );
+ *x = x1 << 1;
+ MB();
+ *y = y1 << 1;
+}
+
+static inline void XNPROD31(ogg_int32_t a, ogg_int32_t b,
+ ogg_int32_t t, ogg_int32_t v,
+ ogg_int32_t *x, ogg_int32_t *y)
+{
+ int x1, y1, l;
+ asm( "rsb %2, %4, #0\n\t"
+ "smull %0, %1, %3, %5\n\t"
+ "smlal %0, %1, %2, %6\n\t"
+ "smull %0, %2, %4, %5\n\t"
+ "smlal %0, %2, %3, %6"
+ : "=&r" (l), "=&r" (x1), "=&r" (y1)
+ : "r" (a), "r" (b), "r" (t), "r" (v)
+ : "cc" );
+ *x = x1 << 1;
+ MB();
+ *y = y1 << 1;
+}
+
+#endif
+
+#ifndef _V_CLIP_MATH
+#define _V_CLIP_MATH
+
+static inline ogg_int32_t CLIP_TO_15(ogg_int32_t x) {
+ int tmp;
+ asm volatile("subs %1, %0, #32768\n\t"
+ "itt pl\n\t"
+ "movpl %0, #0x7f00\n\t"
+ "orrpl %0, %0, #0xff\n"
+ "adds %1, %0, #32768\n\t"
+ "it mi\n\t"
+ "movmi %0, #0x8000"
+ : "+r"(x),"=r"(tmp)
+ :
+ : "cc");
+ return(x);
+}
+
+#endif
+
+#ifndef _V_LSP_MATH_ASM
+#define _V_LSP_MATH_ASM
+
+static inline void lsp_loop_asm(ogg_uint32_t *qip,ogg_uint32_t *pip,
+ ogg_int32_t *qexpp,
+ ogg_int32_t *ilsp,ogg_int32_t wi,
+ ogg_int32_t m){
+
+ ogg_uint32_t qi=*qip,pi=*pip;
+ ogg_int32_t qexp=*qexpp;
+
+ asm("mov r0,%3;"
+ "mov r1,%5,asr#1;"
+ "add r0,r0,r1,lsl#3;"
+ "1:"
+
+ "ldmdb r0!,{r1,r3};"
+ "subs r1,r1,%4;" //ilsp[j]-wi
+ "it mi;"
+ "rsbmi r1,r1,#0;" //labs(ilsp[j]-wi)
+ "umull %0,r2,r1,%0;" //qi*=labs(ilsp[j]-wi)
+
+ "subs r1,r3,%4;" //ilsp[j+1]-wi
+ "it mi;"
+ "rsbmi r1,r1,#0;" //labs(ilsp[j+1]-wi)
+ "umull %1,r3,r1,%1;" //pi*=labs(ilsp[j+1]-wi)
+
+ "cmn r2,r3;" // shift down 16?
+ "beq 0f;"
+ "add %2,%2,#16;"
+ "mov %0,%0,lsr #16;"
+ "orr %0,%0,r2,lsl #16;"
+ "mov %1,%1,lsr #16;"
+ "orr %1,%1,r3,lsl #16;"
+ "0:"
+ "cmp r0,%3;\n"
+ "bhi 1b;\n"
+
+ // odd filter assymetry
+ "ands r0,%5,#1;\n"
+ "beq 2f;\n"
+ "add r0,%3,%5,lsl#2;\n"
+
+ "ldr r1,[r0,#-4];\n"
+ "mov r0,#0x4000;\n"
+
+ "subs r1,r1,%4;\n" //ilsp[j]-wi
+ "it mi;"
+ "rsbmi r1,r1,#0;\n" //labs(ilsp[j]-wi)
+ "umull %0,r2,r1,%0;\n" //qi*=labs(ilsp[j]-wi)
+ "umull %1,r3,r0,%1;\n" //pi*=labs(ilsp[j+1]-wi)
+
+ "cmn r2,r3;\n" // shift down 16?
+ "beq 2f;\n"
+ "add %2,%2,#16;\n"
+ "mov %0,%0,lsr #16;\n"
+ "orr %0,%0,r2,lsl #16;\n"
+ "mov %1,%1,lsr #16;\n"
+ "orr %1,%1,r3,lsl #16;\n"
+
+ //qi=(pi>>shift)*labs(ilsp[j]-wi);
+ //pi=(qi>>shift)*labs(ilsp[j+1]-wi);
+ //qexp+=shift;
+
+ //}
+
+ /* normalize to max 16 sig figs */
+ "2:"
+ "mov r2,#0;"
+ "orr r1,%0,%1;"
+ "tst r1,#0xff000000;"
+ "itt ne;"
+ "addne r2,r2,#8;"
+ "movne r1,r1,lsr #8;"
+ "tst r1,#0x00f00000;"
+ "itt ne;"
+ "addne r2,r2,#4;"
+ "movne r1,r1,lsr #4;"
+ "tst r1,#0x000c0000;"
+ "itt ne;"
+ "addne r2,r2,#2;"
+ "movne r1,r1,lsr #2;"
+ "tst r1,#0x00020000;"
+ "itt ne;"
+ "addne r2,r2,#1;"
+ "movne r1,r1,lsr #1;"
+ "tst r1,#0x00010000;"
+ "it ne;"
+ "addne r2,r2,#1;"
+ "mov %0,%0,lsr r2;"
+ "mov %1,%1,lsr r2;"
+ "add %2,%2,r2;"
+
+ : "+r"(qi),"+r"(pi),"+r"(qexp)
+ : "r"(ilsp),"r"(wi),"r"(m)
+ : "r0","r1","r2","r3","cc");
+
+ *qip=qi;
+ *pip=pi;
+ *qexpp=qexp;
+}
+
+static inline void lsp_norm_asm(ogg_uint32_t *qip,ogg_int32_t *qexpp){
+
+ ogg_uint32_t qi=*qip;
+ ogg_int32_t qexp=*qexpp;
+
+ asm("tst %0,#0x0000ff00;"
+ "itt eq;"
+ "moveq %0,%0,lsl #8;"
+ "subeq %1,%1,#8;"
+ "tst %0,#0x0000f000;"
+ "itt eq;"
+ "moveq %0,%0,lsl #4;"
+ "subeq %1,%1,#4;"
+ "tst %0,#0x0000c000;"
+ "itt eq;"
+ "moveq %0,%0,lsl #2;"
+ "subeq %1,%1,#2;"
+ "tst %0,#0x00008000;"
+ "itt eq;"
+ "moveq %0,%0,lsl #1;"
+ "subeq %1,%1,#1;"
+ : "+r"(qi),"+r"(qexp)
+ :
+ : "cc");
+ *qip=qi;
+ *qexpp=qexp;
+}
+
+#endif
+#endif
+
+#endif
+
diff --git a/MakefileBasedBuild/app/v_bitwise.c b/MakefileBasedBuild/app/v_bitwise.c
new file mode 100644
index 0000000..328eebe
--- /dev/null
+++ b/MakefileBasedBuild/app/v_bitwise.c
@@ -0,0 +1,676 @@
+#define ADK_INTERNAL
+/********************************************************************
+ * *
+ * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
+ * *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
+ * *
+ * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 *
+ * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
+ * *
+ ********************************************************************
+
+ function: packing variable sized words into an octet stream
+
+ ********************************************************************/
+
+/* We're 'LSb' endian; if we write a word but read individual bits,
+ then we'll read the lsb first */
+
+#include <string.h>
+#include <stdlib.h>
+#include "v_misc.h"
+#include "v_ogg.h"
+
+static unsigned long mask[]=
+{0x00000000,0x00000001,0x00000003,0x00000007,0x0000000f,
+ 0x0000001f,0x0000003f,0x0000007f,0x000000ff,0x000001ff,
+ 0x000003ff,0x000007ff,0x00000fff,0x00001fff,0x00003fff,
+ 0x00007fff,0x0000ffff,0x0001ffff,0x0003ffff,0x0007ffff,
+ 0x000fffff,0x001fffff,0x003fffff,0x007fffff,0x00ffffff,
+ 0x01ffffff,0x03ffffff,0x07ffffff,0x0fffffff,0x1fffffff,
+ 0x3fffffff,0x7fffffff,0xffffffff };
+
+/* spans forward, skipping as many bytes as headend is negative; if
+ headend is zero, simply finds next byte. If we're up to the end
+ of the buffer, leaves headend at zero. If we've read past the end,
+ halt the decode process. */
+
+static void _span(oggpack_buffer *b){
+ while(b->headend-(b->headbit>>3)<1){
+ b->headend-=b->headbit>>3;
+ b->headbit&=0x7;
+
+ if(b->head->next){
+ b->count+=b->head->length;
+ b->head=b->head->next;
+
+ if(b->headend+b->head->length>0)
+ b->headptr=b->head->buffer->data+b->head->begin-b->headend;
+
+ b->headend+=b->head->length;
+ }else{
+ /* we've either met the end of decode, or gone past it. halt
+ only if we're past */
+ if(b->headend*8<b->headbit)
+ /* read has fallen off the end */
+ b->headend=-1;
+ break;
+ }
+ }
+}
+
+void oggpack_readinit(oggpack_buffer *b,ogg_reference *r){
+ memset(b,0,sizeof(*b));
+
+ b->tail=b->head=r;
+ b->count=0;
+ b->headptr=b->head->buffer->data+b->head->begin;
+ b->headend=b->head->length;
+ _span(b);
+}
+
+#define _lookspan() while(!end){\
+ head=head->next;\
+ if(!head) return -1;\
+ ptr=head->buffer->data + head->begin;\
+ end=head->length;\
+ }
+
+/* Read in bits without advancing the bitptr; bits <= 32 */
+long oggpack_look(oggpack_buffer *b,int bits){
+ unsigned long m=mask[bits];
+ unsigned long ret;
+
+ bits+=b->headbit;
+
+ if(bits >= b->headend<<3){
+ int end=b->headend;
+ unsigned char *ptr=b->headptr;
+ ogg_reference *head=b->head;
+
+ if(end<0)return -1;
+
+ if(bits){
+ _lookspan();
+ ret=*ptr++>>b->headbit;
+ if(bits>8){
+ --end;
+ _lookspan();
+ ret|=*ptr++<<(8-b->headbit);
+ if(bits>16){
+ --end;
+ _lookspan();
+ ret|=*ptr++<<(16-b->headbit);
+ if(bits>24){
+ --end;
+ _lookspan();
+ ret|=*ptr++<<(24-b->headbit);
+ if(bits>32 && b->headbit){
+ --end;
+ _lookspan();
+ ret|=*ptr<<(32-b->headbit);
+ }
+ }
+ }
+ }
+ }
+
+ }else{
+
+ /* make this a switch jump-table */
+ ret=b->headptr[0]>>b->headbit;
+ if(bits>8){
+ ret|=b->headptr[1]<<(8-b->headbit);
+ if(bits>16){
+ ret|=b->headptr[2]<<(16-b->headbit);
+ if(bits>24){
+ ret|=b->headptr[3]<<(24-b->headbit);
+ if(bits>32 && b->headbit)
+ ret|=b->headptr[4]<<(32-b->headbit);
+ }
+ }
+ }
+ }
+
+ ret&=m;
+ return ret;
+}
+
+/* limited to 32 at a time */
+void oggpack_adv(oggpack_buffer *b,int bits){
+ bits+=b->headbit;
+ b->headbit=bits&7;
+ b->headend-=(bits>>3);
+ b->headptr+=(bits>>3);
+ if(b->headend<1)_span(b);
+}
+
+int oggpack_eop(oggpack_buffer *b){
+ if(b->headend<0)return -1;
+ return 0;
+}
+
+/* bits <= 32 */
+long oggpack_read(oggpack_buffer *b,int bits){
+ long ret=oggpack_look(b,bits);
+ oggpack_adv(b,bits);
+ return(ret);
+}
+
+long oggpack_bytes(oggpack_buffer *b){
+ if(b->headend<0)return b->count+b->head->length;
+ return b->count + b->head->length-b->headend +
+ (b->headbit+7)/8;
+}
+
+long oggpack_bits(oggpack_buffer *b){
+ if(b->headend<0)return (b->count+b->head->length)*8;
+ return (b->count + b->head->length-b->headend)*8 +
+ b->headbit;
+}
+
+/* Self test of the bitwise routines; everything else is based on
+ them, so they damned well better be solid. */
+
+#ifdef _V_BIT_TEST
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include "vobis_framing.c"
+
+static int ilog(unsigned long v){
+ int ret=0;
+ while(v){
+ ret++;
+ v>>=1;
+ }
+ return(ret);
+}
+
+oggpack_buffer r;
+oggpack_buffer o;
+ogg_buffer_state *bs;
+ogg_reference *or;
+#define TESTWORDS 256
+
+void report(char *in){
+ fprintf(stderr,"%s",in);
+ exit(1);
+}
+
+int getbyte(ogg_reference *or,int position){
+ while(or && position>=or->length){
+ position-=or->length;
+ or=or->next;
+ if(or==NULL){
+ fprintf(stderr,"\n\tERROR: getbyte ran off end of buffer.\n");
+ exit(1);
+ }
+ }
+
+ if((position+or->begin)&1)
+ return (or->buffer->data[(position+or->begin)>>1])&0xff;
+ else
+ return (or->buffer->data[(position+or->begin)>>1]>>8)&0xff;
+}
+
+void cliptest(unsigned long *b,int vals,int bits,int *comp,int compsize){
+ long i,bitcount=0;
+ ogg_reference *or=ogg_buffer_alloc(bs,64);
+ for(i=0;i<compsize;i++)
+ or->buffer->data[i]= comp[i];
+ or->length=i;
+
+ oggpack_readinit(&r,or);
+ for(i=0;i<vals;i++){
+ unsigned long test;
+ int tbit=bits?bits:ilog(b[i]);
+ if((test=oggpack_look(&r,tbit))==0xffffffff)
+ report("out of data!\n");
+ if(test!=(b[i]&mask[tbit])){
+ fprintf(stderr,"%ld) %lx %lx\n",i,(b[i]&mask[tbit]),test);
+ report("looked at incorrect value!\n");
+ }
+ if((test=oggpack_read(&r,tbit))==0xffffffff){
+ report("premature end of data when reading!\n");
+ }
+ if(test!=(b[i]&mask[tbit])){
+ fprintf(stderr,"%ld) %lx %lx\n",i,(b[i]&mask[tbit]),test);
+ report("read incorrect value!\n");
+ }
+ bitcount+=tbit;
+
+ if(bitcount!=oggpack_bits(&r))
+ report("wrong number of bits while reading!\n");
+ if((bitcount+7)/8!=oggpack_bytes(&r))
+ report("wrong number of bytes while reading!\n");
+
+ }
+ if(oggpack_bytes(&r)!=(bitcount+7)/8)report("leftover bytes after read!\n");
+ ogg_buffer_release(or);
+}
+
+void _end_verify(int count){
+ int i;
+
+ /* are the proper number of bits left over? */
+ int leftover=count*8-oggpack_bits(&o);
+ if(leftover>7)
+ report("\nERROR: too many bits reported left over.\n");
+
+ /* does reading to exactly byte alignment *not* trip EOF? */
+ if(oggpack_read(&o,leftover)==-1)
+ report("\nERROR: read to but not past exact end tripped EOF.\n");
+ if(oggpack_bits(&o)!=count*8)
+ report("\nERROR: read to but not past exact end reported bad bitcount.\n");
+
+ /* does EOF trip properly after a single additional bit? */
+ if(oggpack_read(&o,1)!=-1)
+ report("\nERROR: read past exact end did not trip EOF.\n");
+ if(oggpack_bits(&o)!=count*8)
+ report("\nERROR: read past exact end reported bad bitcount.\n");
+
+ /* does EOF stay set over additional bit reads? */
+ for(i=0;i<=32;i++){
+ if(oggpack_read(&o,i)!=-1)
+ report("\nERROR: EOF did not stay set on stream.\n");
+ if(oggpack_bits(&o)!=count*8)
+ report("\nERROR: read past exact end reported bad bitcount.\n");
+ }
+}
+
+void _end_verify2(int count){
+ int i;
+
+ /* are the proper number of bits left over? */
+ int leftover=count*8-oggpack_bits(&o);
+ if(leftover>7)
+ report("\nERROR: too many bits reported left over.\n");
+
+ /* does reading to exactly byte alignment *not* trip EOF? */
+ oggpack_adv(&o,leftover);
+ if(o.headend!=0)
+ report("\nERROR: read to but not past exact end tripped EOF.\n");
+ if(oggpack_bits(&o)!=count*8)
+ report("\nERROR: read to but not past exact end reported bad bitcount.\n");
+
+ /* does EOF trip properly after a single additional bit? */
+ oggpack_adv(&o,1);
+ if(o.headend>=0)
+ report("\nERROR: read past exact end did not trip EOF.\n");
+ if(oggpack_bits(&o)!=count*8)
+ report("\nERROR: read past exact end reported bad bitcount.\n");
+
+ /* does EOF stay set over additional bit reads? */
+ for(i=0;i<=32;i++){
+ oggpack_adv(&o,i);
+ if(o.headend>=0)
+ report("\nERROR: EOF did not stay set on stream.\n");
+ if(oggpack_bits(&o)!=count*8)
+ report("\nERROR: read past exact end reported bad bitcount.\n");
+ }
+}
+
+long ogg_buffer_length(ogg_reference *or){
+ int count=0;
+ while(or){
+ count+=or->length;
+ or=or->next;
+ }
+ return count;
+}
+
+ogg_reference *ogg_buffer_extend(ogg_reference *or,long bytes){
+ if(or){
+ while(or->next){
+ or=or->next;
+ }
+ or->next=ogg_buffer_alloc(or->buffer->ptr.owner,bytes);
+ return(or->next);
+ }
+ return 0;
+}
+
+void ogg_buffer_posttruncate(ogg_reference *or,long pos){
+ /* walk to the point where we want to begin truncate */
+ while(or && pos>or->length){
+ pos-=or->length;
+ or=or->next;
+ }
+ if(or){
+ ogg_buffer_release(or->next);
+ or->next=0;
+ or->length=pos;
+ }
+}
+
+int main(void){
+ long i;
+ static unsigned long testbuffer1[]=
+ {18,12,103948,4325,543,76,432,52,3,65,4,56,32,42,34,21,1,23,32,546,456,7,
+ 567,56,8,8,55,3,52,342,341,4,265,7,67,86,2199,21,7,1,5,1,4};
+ int test1size=43;
+
+ static unsigned long testbuffer2[]=
+ {216531625L,1237861823,56732452,131,3212421,12325343,34547562,12313212,
+ 1233432,534,5,346435231,14436467,7869299,76326614,167548585,
+ 85525151,0,12321,1,349528352};
+ int test2size=21;
+
+ static unsigned long testbuffer3[]=
+ {1,0,14,0,1,0,12,0,1,0,0,0,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,1,1,1,1,1,0,0,1,
+ 0,1,30,1,1,1,0,0,1,0,0,0,12,0,11,0,1,0,0,1};
+ int test3size=56;
+
+ static unsigned long large[]=
+ {2136531625L,2137861823,56732452,131,3212421,12325343,34547562,12313212,
+ 1233432,534,5,2146435231,14436467,7869299,76326614,167548585,
+ 85525151,0,12321,1,2146528352};
+
+ int onesize=33;
+ static int one[33]={146,25,44,151,195,15,153,176,233,131,196,65,85,172,47,40,
+ 34,242,223,136,35,222,211,86,171,50,225,135,214,75,172,
+ 223,4};
+
+ int twosize=6;
+ static int two[6]={61,255,255,251,231,29};
+
+ int threesize=54;
+ static int three[54]={169,2,232,252,91,132,156,36,89,13,123,176,144,32,254,
+ 142,224,85,59,121,144,79,124,23,67,90,90,216,79,23,83,
+ 58,135,196,61,55,129,183,54,101,100,170,37,127,126,10,
+ 100,52,4,14,18,86,77,1};
+
+ int foursize=38;
+ static int four[38]={18,6,163,252,97,194,104,131,32,1,7,82,137,42,129,11,72,
+ 132,60,220,112,8,196,109,64,179,86,9,137,195,208,122,169,
+ 28,2,133,0,1};
+
+ int fivesize=45;
+ static int five[45]={169,2,126,139,144,172,30,4,80,72,240,59,130,218,73,62,
+ 241,24,210,44,4,20,0,248,116,49,135,100,110,130,181,169,
+ 84,75,159,2,1,0,132,192,8,0,0,18,22};
+
+ int sixsize=7;
+ static int six[7]={17,177,170,242,169,19,148};
+
+ /* Test read/write together */
+ /* Later we test against pregenerated bitstreams */
+ bs=ogg_buffer_create();
+
+ fprintf(stderr,"\nSmall preclipped packing (LSb): ");
+ cliptest(testbuffer1,test1size,0,one,onesize);
+ fprintf(stderr,"ok.");
+
+ fprintf(stderr,"\nNull bit call (LSb): ");
+ cliptest(testbuffer3,test3size,0,two,twosize);
+ fprintf(stderr,"ok.");
+
+ fprintf(stderr,"\nLarge preclipped packing (LSb): ");
+ cliptest(testbuffer2,test2size,0,three,threesize);
+ fprintf(stderr,"ok.");
+
+ fprintf(stderr,"\n32 bit preclipped packing (LSb): ");
+
+ or=ogg_buffer_alloc(bs,128);
+ for(i=0;i<test2size;i++){
+ or->buffer->data[i*4] = large[i]&0xff;
+ or->buffer->data[i*4+1] = (large[i]>>8)&0xff;
+ or->buffer->data[i*4+2] = (large[i]>>16)&0xff;
+ or->buffer->data[i*4+3] = (large[i]>>24)&0xff;
+ }
+ or->length=test2size*4;
+ oggpack_readinit(&r,or);
+ for(i=0;i<test2size;i++){
+ unsigned long test;
+ if((test=oggpack_look(&r,32))==0xffffffffUL)report("out of data. failed!");
+ if(test!=large[i]){
+ fprintf(stderr,"%ld != %ld (%lx!=%lx):",test,large[i],
+ test,large[i]);
+ report("read incorrect value!\n");
+ }
+ oggpack_adv(&r,32);
+ }
+ ogg_buffer_release(or);
+ if(oggpack_bytes(&r)!=test2size*4)report("leftover bytes after read!\n");
+ fprintf(stderr,"ok.");
+
+ fprintf(stderr,"\nSmall unclipped packing (LSb): ");
+ cliptest(testbuffer1,test1size,7,four,foursize);
+ fprintf(stderr,"ok.");
+
+ fprintf(stderr,"\nLarge unclipped packing (LSb): ");
+ cliptest(testbuffer2,test2size,17,five,fivesize);
+ fprintf(stderr,"ok.");
+
+ fprintf(stderr,"\nSingle bit unclipped packing (LSb): ");
+ cliptest(testbuffer3,test3size,1,six,sixsize);
+ fprintf(stderr,"ok.");
+
+ fprintf(stderr,"\nTesting read past end (LSb): ");
+ {
+ unsigned char dda[]={0,0,0,0};
+ ogg_buffer lob={dda,8,0,{0}};
+ ogg_reference lor={&lob,0,8,0};
+
+ oggpack_readinit(&r,&lor);
+ for(i=0;i<64;i++){
+ if(oggpack_read(&r,1)<0){
+ fprintf(stderr,"failed; got -1 prematurely.\n");
+ exit(1);
+ }
+ }
+ if(oggpack_look(&r,1)!=-1 ||
+ oggpack_read(&r,1)!=-1){
+ fprintf(stderr,"failed; read past end without -1.\n");
+ exit(1);
+ }
+ }
+ {
+ unsigned char dda[]={0,0,0,0};
+ ogg_buffer lob={dda,8,0,{0}};
+ ogg_reference lor={&lob,0,8,0};
+ unsigned long test;
+
+ oggpack_readinit(&r,&lor);
+ if((test=oggpack_read(&r,30))==0xffffffffUL ||
+ (test=oggpack_read(&r,16))==0xffffffffUL){
+ fprintf(stderr,"failed 2; got -1 prematurely.\n");
+ exit(1);
+ }
+
+ if((test=oggpack_look(&r,18))==0xffffffffUL){
+ fprintf(stderr,"failed 3; got -1 prematurely.\n");
+ exit(1);
+ }
+ if((test=oggpack_look(&r,19))!=0xffffffffUL){
+ fprintf(stderr,"failed; read past end without -1.\n");
+ exit(1);
+ }
+ if((test=oggpack_look(&r,32))!=0xffffffffUL){
+ fprintf(stderr,"failed; read past end without -1.\n");
+ exit(1);
+ }
+ }
+ fprintf(stderr,"ok.\n");
+
+ /* now the scary shit: randomized testing */
+
+ for(i=0;i<10000;i++){
+ long j,count=0,count2=0,bitcount=0;
+ unsigned long values[TESTWORDS];
+ int len[TESTWORDS];
+ unsigned char flat[4*TESTWORDS]; /* max possible needed size */
+
+ memset(flat,0,sizeof(flat));
+ fprintf(stderr,"\rRandomized testing (LSb)... (%ld) ",10000-i);
+
+ /* generate a list of words and lengths */
+ /* write the required number of bits out to packbuffer */
+ {
+ long word=0;
+ long bit=0;
+ int k;
+
+ for(j=0;j<TESTWORDS;j++){
+ values[j]=rand();
+ len[j]=(rand()%33);
+
+ for(k=0;k<len[j];k++){
+ flat[word] |= ((values[j]>>k)&0x1)<<bit;
+ bit++;
+ bitcount++;
+ if(bit>7){
+ bit=0;
+ word++;
+ }
+ }
+ }
+ }
+ count2=(bitcount+7)>>3;
+
+ /* construct random-length buffer chain from flat vector; random
+ byte starting offset within the length of the vector */
+ {
+ ogg_reference *or=NULL,*orl=NULL;
+ long pos=0;
+
+ /* build buffer chain */
+ while(count2){
+ int ilen=(rand()%32),k;
+ int ibegin=(rand()%32);
+
+
+ if(ilen>count2)ilen=count2;
+
+ if(or)
+ orl=ogg_buffer_extend(orl,64);
+ else
+ or=orl=ogg_buffer_alloc(bs,64);
+
+ orl->length=ilen;
+ orl->begin=ibegin;
+
+ for(k=0;k<ilen;k++)
+ orl->buffer->data[ibegin++]= flat[pos++];
+
+ count2-=ilen;
+ }
+
+ if(ogg_buffer_length(or)!=(bitcount+7)/8){
+ fprintf(stderr,"\nERROR: buffer length incorrect after build.\n");
+ exit(1);
+ }
+
+
+ {
+ int begin=0; //=(rand()%TESTWORDS);
+ int ilen=(rand()%(TESTWORDS-begin));
+ int bitoffset,bitcount=0;
+ unsigned long temp;
+
+ for(j=0;j<begin;j++)
+ bitcount+=len[j];
+ or=ogg_buffer_pretruncate(or,bitcount/8);
+ bitoffset=bitcount%=8;
+ for(;j<begin+ilen;j++)
+ bitcount+=len[j];
+ ogg_buffer_posttruncate(or,((bitcount+7)/8));
+
+ if((count=ogg_buffer_length(or))!=(bitcount+7)/8){
+ fprintf(stderr,"\nERROR: buffer length incorrect after truncate.\n");
+ exit(1);
+ }
+
+ oggpack_readinit(&o,or);
+
+ /* verify bit count */
+ if(oggpack_bits(&o)!=0){
+ fprintf(stderr,"\nERROR: Read bitcounter not zero!\n");
+ exit(1);
+ }
+ if(oggpack_bytes(&o)!=0){
+ fprintf(stderr,"\nERROR: Read bytecounter not zero!\n");
+ exit(1);
+ }
+
+ bitcount=bitoffset;
+ oggpack_read(&o,bitoffset);
+
+ /* read and compare to original list */
+ for(j=begin;j<begin+ilen;j++){
+ temp=oggpack_read(&o,len[j]);
+ if(temp==0xffffffffUL){
+ fprintf(stderr,"\nERROR: End of stream too soon! word: %ld,%d\n",
+ j-begin,ilen);
+ exit(1);
+ }
+ if(temp!=(values[j]&mask[len[j]])){
+ fprintf(stderr,"\nERROR: Incorrect read %lx != %lx, word %ld, len %d\n"
+,
+ values[j]&mask[len[j]],temp,j-begin,len[j]);
+ exit(1);
+ }
+ bitcount+=len[j];
+ if(oggpack_bits(&o)!=bitcount){
+ fprintf(stderr,"\nERROR: Read bitcounter %d != %ld!\n",
+ bitcount,oggpack_bits(&o));
+ exit(1);
+ }
+ if(oggpack_bytes(&o)!=(bitcount+7)/8){
+ fprintf(stderr,"\nERROR: Read bytecounter %d != %ld!\n",
+ (bitcount+7)/8,oggpack_bytes(&o));
+ exit(1);
+ }
+
+ }
+ _end_verify(count);
+
+ /* look/adv version */
+ oggpack_readinit(&o,or);
+ bitcount=bitoffset;
+ oggpack_adv(&o,bitoffset);
+
+ /* read and compare to original list */
+ for(j=begin;j<begin+ilen;j++){
+ temp=oggpack_look(&o,len[j]);
+
+ if(temp==0xffffffffUL){
+ fprintf(stderr,"\nERROR: End of stream too soon! word: %ld\n",
+ j-begin);
+ exit(1);
+ }
+ if(temp!=(values[j]&mask[len[j]])){
+ fprintf(stderr,"\nERROR: Incorrect look %lx != %lx, word %ld, len %d\n"
+,
+ values[j]&mask[len[j]],temp,j-begin,len[j]);
+ exit(1);
+ }
+ oggpack_adv(&o,len[j]);
+ bitcount+=len[j];
+ if(oggpack_bits(&o)!=bitcount){
+ fprintf(stderr,"\nERROR: Look/Adv bitcounter %d != %ld!\n",
+ bitcount,oggpack_bits(&o));
+ exit(1);
+ }
+ if(oggpack_bytes(&o)!=(bitcount+7)/8){
+ fprintf(stderr,"\nERROR: Look/Adv bytecounter %d != %ld!\n",
+ (bitcount+7)/8,oggpack_bytes(&o));
+ exit(1);
+ }
+
+ }
+ _end_verify2(count);
+
+ }
+ ogg_buffer_release(or);
+ }
+ }
+ fprintf(stderr,"\rRandomized testing (LSb)... ok. \n");
+
+ return(0);
+}
+#endif
diff --git a/MakefileBasedBuild/app/v_codebook.c b/MakefileBasedBuild/app/v_codebook.c
new file mode 100644
index 0000000..176efab
--- /dev/null
+++ b/MakefileBasedBuild/app/v_codebook.c
@@ -0,0 +1,792 @@
+#define ADK_INTERNAL
+/********************************************************************
+ * *
+ * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
+ * *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
+ * *
+ * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
+ * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
+ * *
+ ********************************************************************
+
+ function: basic codebook pack/unpack/code/decode operations
+
+ ********************************************************************/
+
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include "v_ogg.h"
+#include "v_ivorbiscodec.h"
+#include "v_codebook.h"
+#include "v_misc.h"
+#include "v_os.h"
+
+
+/**** pack/unpack helpers ******************************************/
+int _ilog(unsigned int v){
+ int ret=0;
+ while(v){
+ ret++;
+ v>>=1;
+ }
+ return(ret);
+}
+
+static ogg_uint32_t decpack(long entry,long used_entry,long quantvals,
+ codebook *b,oggpack_buffer *opb,int maptype){
+ ogg_uint32_t ret=0;
+ int j;
+
+ switch(b->dec_type){
+
+ case 0:
+ return (ogg_uint32_t)entry;
+
+ case 1:
+ if(maptype==1){
+ /* vals are already read into temporary column vector here */
+ for(j=0;j<b->dim;j++){
+ ogg_uint32_t off=entry%quantvals;
+ entry/=quantvals;
+ ret|=((ogg_uint16_t *)(b->q_val))[off]<<(b->q_bits*j);
+ }
+ }else{
+ for(j=0;j<b->dim;j++)
+ ret|=oggpack_read(opb,b->q_bits)<<(b->q_bits*j);
+ }
+ return ret;
+
+ case 2:
+ for(j=0;j<b->dim;j++){
+ ogg_uint32_t off=entry%quantvals;
+ entry/=quantvals;
+ ret|=off<<(b->q_pack*j);
+ }
+ return ret;
+
+ case 3:
+ return (ogg_uint32_t)used_entry;
+
+ }
+ return 0; /* silence compiler */
+}
+
+/* 32 bit float (not IEEE; nonnormalized mantissa +
+ biased exponent) : neeeeeee eeemmmmm mmmmmmmm mmmmmmmm
+ Why not IEEE? It's just not that important here. */
+
+static ogg_int32_t _float32_unpack(long val,int *point){
+ long mant=val&0x1fffff;
+ int sign=val&0x80000000;
+
+ *point=((val&0x7fe00000L)>>21)-788;
+
+ if(mant){
+ while(!(mant&0x40000000)){
+ mant<<=1;
+ *point-=1;
+ }
+ if(sign)mant= -mant;
+ }else{
+ *point=-9999;
+ }
+ return mant;
+}
+
+/* choose the smallest supported node size that fits our decode table.
+ Legal bytewidths are 1/1 1/2 2/2 2/4 4/4 */
+static int _determine_node_bytes(long used, int leafwidth){
+
+ /* special case small books to size 4 to avoid multiple special
+ cases in repack */
+ if(used<2)
+ return 4;
+
+ if(leafwidth==3)leafwidth=4;
+ if(_ilog(3*used-6)+1 <= leafwidth*4)
+ return leafwidth/2?leafwidth/2:1;
+ return leafwidth;
+}
+
+/* convenience/clarity; leaves are specified as multiple of node word
+ size (1 or 2) */
+static int _determine_leaf_words(int nodeb, int leafwidth){
+ if(leafwidth>nodeb)return 2;
+ return 1;
+}
+
+/* given a list of word lengths, number of used entries, and byte
+ width of a leaf, generate the decode table */
+static int _make_words(char *l,long n,ogg_uint32_t *r,long quantvals,
+ codebook *b, oggpack_buffer *opb,int maptype){
+ long i,j,count=0;
+ long top=0;
+ ogg_uint32_t marker[33];
+
+ if(n<2){
+ r[0]=0x80000000;
+ }else{
+ memset(marker,0,sizeof(marker));
+
+ for(i=0;i<n;i++){
+ long length=l[i];
+ if(length){
+ ogg_uint32_t entry=marker[length];
+ long chase=0;
+ if(count && !entry)return -1; /* overpopulated tree! */
+
+ /* chase the tree as far as it's already populated, fill in past */
+ for(j=0;j<length-1;j++){
+ int bit=(entry>>(length-j-1))&1;
+ if(chase>=top){
+ top++;
+ r[chase*2]=top;
+ r[chase*2+1]=0;
+ }else
+ if(!r[chase*2+bit])
+ r[chase*2+bit]=top;
+ chase=r[chase*2+bit];
+ }
+ {
+ int bit=(entry>>(length-j-1))&1;
+ if(chase>=top){
+ top++;
+ r[chase*2+1]=0;
+ }
+ r[chase*2+bit]= decpack(i,count++,quantvals,b,opb,maptype) |
+ 0x80000000;
+ }
+
+ /* Look to see if the next shorter marker points to the node
+ above. if so, update it and repeat. */
+ for(j=length;j>0;j--){
+ if(marker[j]&1){
+ marker[j]=marker[j-1]<<1;
+ break;
+ }
+ marker[j]++;
+ }
+
+ /* prune the tree; the implicit invariant says all the longer
+ markers were dangling from our just-taken node. Dangle them
+ from our *new* node. */
+ for(j=length+1;j<33;j++)
+ if((marker[j]>>1) == entry){
+ entry=marker[j];
+ marker[j]=marker[j-1]<<1;
+ }else
+ break;
+ }
+ }
+ }
+
+ return 0;
+}
+
+static int _make_decode_table(codebook *s,char *lengthlist,long quantvals,
+ oggpack_buffer *opb,int maptype){
+ int i;
+ ogg_uint32_t *work;
+
+ if(s->dec_nodeb==4){
+ s->dec_table=_ogg_malloc((s->used_entries*2+1)*sizeof(*work));
+ /* +1 (rather than -2) is to accommodate 0 and 1 sized books,
+ which are specialcased to nodeb==4 */
+ if(_make_words(lengthlist,s->entries,
+ s->dec_table,quantvals,s,opb,maptype))return 1;
+
+ return 0;
+ }
+
+ work=alloca((s->used_entries*2-2)*sizeof(*work));
+ if(_make_words(lengthlist,s->entries,work,quantvals,s,opb,maptype))return 1;
+ s->dec_table=_ogg_malloc((s->used_entries*(s->dec_leafw+1)-2)*
+ s->dec_nodeb);
+
+ if(s->dec_leafw==1){
+ switch(s->dec_nodeb){
+ case 1:
+ for(i=0;i<s->used_entries*2-2;i++)
+ ((unsigned char *)s->dec_table)[i]=
+ ((work[i] & 0x80000000UL) >> 24) | work[i];
+ break;
+ case 2:
+ for(i=0;i<s->used_entries*2-2;i++)
+ ((ogg_uint16_t *)s->dec_table)[i]=
+ ((work[i] & 0x80000000UL) >> 16) | work[i];
+ break;
+ }
+
+ }else{
+ /* more complex; we have to do a two-pass repack that updates the
+ node indexing. */
+ long top=s->used_entries*3-2;
+ if(s->dec_nodeb==1){
+ unsigned char *out=(unsigned char *)s->dec_table;
+
+ for(i=s->used_entries*2-4;i>=0;i-=2){
+ if(work[i]&0x80000000UL){
+ if(work[i+1]&0x80000000UL){
+ top-=4;
+ out[top]=(work[i]>>8 & 0x7f)|0x80;
+ out[top+1]=(work[i+1]>>8 & 0x7f)|0x80;
+ out[top+2]=work[i] & 0xff;
+ out[top+3]=work[i+1] & 0xff;
+ }else{
+ top-=3;
+ out[top]=(work[i]>>8 & 0x7f)|0x80;
+ out[top+1]=work[work[i+1]*2];
+ out[top+2]=work[i] & 0xff;
+ }
+ }else{
+ if(work[i+1]&0x80000000UL){
+ top-=3;
+ out[top]=work[work[i]*2];
+ out[top+1]=(work[i+1]>>8 & 0x7f)|0x80;
+ out[top+2]=work[i+1] & 0xff;
+ }else{
+ top-=2;
+ out[top]=work[work[i]*2];
+ out[top+1]=work[work[i+1]*2];
+ }
+ }
+ work[i]=top;
+ }
+ }else{
+ ogg_uint16_t *out=(ogg_uint16_t *)s->dec_table;
+ for(i=s->used_entries*2-4;i>=0;i-=2){
+ if(work[i]&0x80000000UL){
+ if(work[i+1]&0x80000000UL){
+ top-=4;
+ out[top]=(work[i]>>16 & 0x7fff)|0x8000;
+ out[top+1]=(work[i+1]>>16 & 0x7fff)|0x8000;
+ out[top+2]=work[i] & 0xffff;
+ out[top+3]=work[i+1] & 0xffff;
+ }else{
+ top-=3;
+ out[top]=(work[i]>>16 & 0x7fff)|0x8000;
+ out[top+1]=work[work[i+1]*2];
+ out[top+2]=work[i] & 0xffff;
+ }
+ }else{
+ if(work[i+1]&0x80000000UL){
+ top-=3;
+ out[top]=work[work[i]*2];
+ out[top+1]=(work[i+1]>>16 & 0x7fff)|0x8000;
+ out[top+2]=work[i+1] & 0xffff;
+ }else{
+ top-=2;
+ out[top]=work[work[i]*2];
+ out[top+1]=work[work[i+1]*2];
+ }
+ }
+ work[i]=top;
+ }
+ }
+ }
+
+ return 0;
+}
+
+/* most of the time, entries%dimensions == 0, but we need to be
+ well defined. We define that the possible vales at each
+ scalar is values == entries/dim. If entries%dim != 0, we'll
+ have 'too few' values (values*dim<entries), which means that
+ we'll have 'left over' entries; left over entries use zeroed
+ values (and are wasted). So don't generate codebooks like
+ that */
+/* there might be a straightforward one-line way to do the below
+ that's portable and totally safe against roundoff, but I haven't
+ thought of it. Therefore, we opt on the side of caution */
+long _book_maptype1_quantvals(codebook *b){
+ /* get us a starting hint, we'll polish it below */
+ int bits=_ilog(b->entries);
+ int vals=b->entries>>((bits-1)*(b->dim-1)/b->dim);
+
+ while(1){
+ long acc=1;
+ long acc1=1;
+ int i;
+ for(i=0;i<b->dim;i++){
+ acc*=vals;
+ acc1*=vals+1;
+ }
+ if(acc<=b->entries && acc1>b->entries){
+ return(vals);
+ }else{
+ if(acc>b->entries){
+ vals--;
+ }else{
+ vals++;
+ }
+ }
+ }
+}
+
+void vorbis_book_clear(codebook *b){
+ /* static book is not cleared; we're likely called on the lookup and
+ the static codebook belongs to the info struct */
+ if(b->q_val)_ogg_free(b->q_val);
+ if(b->dec_table)_ogg_free(b->dec_table);
+
+ memset(b,0,sizeof(*b));
+}
+
+int vorbis_book_unpack(oggpack_buffer *opb,codebook *s){
+ char *lengthlist=NULL;
+ int quantvals=0;
+ long i,j;
+ int maptype;
+
+ memset(s,0,sizeof(*s));
+
+ /* make sure alignment is correct */
+ if(oggpack_read(opb,24)!=0x564342)goto _eofout;
+
+ /* first the basic parameters */
+ s->dim=oggpack_read(opb,16);
+ s->entries=oggpack_read(opb,24);
+ if(s->entries==-1)goto _eofout;
+
+ /* codeword ordering.... length ordered or unordered? */
+ switch((int)oggpack_read(opb,1)){
+ case 0:
+ /* unordered */
+ lengthlist=(char *)alloca(sizeof(*lengthlist)*s->entries);
+
+ /* allocated but unused entries? */
+ if(oggpack_read(opb,1)){
+ /* yes, unused entries */
+
+ for(i=0;i<s->entries;i++){
+ if(oggpack_read(opb,1)){
+ long num=oggpack_read(opb,5);
+ if(num==-1)goto _eofout;
+ lengthlist[i]=num+1;
+ s->used_entries++;
+ if(num+1>s->dec_maxlength)s->dec_maxlength=num+1;
+ }else
+ lengthlist[i]=0;
+ }
+ }else{
+ /* all entries used; no tagging */
+ s->used_entries=s->entries;
+ for(i=0;i<s->entries;i++){
+ long num=oggpack_read(opb,5);
+ if(num==-1)goto _eofout;
+ lengthlist[i]=num+1;
+ if(num+1>s->dec_maxlength)s->dec_maxlength=num+1;
+ }
+ }
+
+ break;
+ case 1:
+ /* ordered */
+ {
+ long length=oggpack_read(opb,5)+1;
+
+ s->used_entries=s->entries;
+ lengthlist=(char *)alloca(sizeof(*lengthlist)*s->entries);
+
+ for(i=0;i<s->entries;){
+ long num=oggpack_read(opb,_ilog(s->entries-i));
+ if(num==-1)goto _eofout;
+ for(j=0;j<num && i<s->entries;j++,i++)
+ lengthlist[i]=length;
+ s->dec_maxlength=length;
+ length++;
+ }
+ }
+ break;
+ default:
+ /* EOF */
+ goto _eofout;
+ }
+
+
+ /* Do we have a mapping to unpack? */
+
+ if((maptype=oggpack_read(opb,4))>0){
+ s->q_min=_float32_unpack(oggpack_read(opb,32),&s->q_minp);
+ s->q_del=_float32_unpack(oggpack_read(opb,32),&s->q_delp);
+ s->q_bits=oggpack_read(opb,4)+1;
+ s->q_seq=oggpack_read(opb,1);
+
+ s->q_del>>=s->q_bits;
+ s->q_delp+=s->q_bits;
+ }
+
+ switch(maptype){
+ case 0:
+
+ /* no mapping; decode type 0 */
+
+ /* how many bytes for the indexing? */
+ /* this is the correct boundary here; we lose one bit to
+ node/leaf mark */
+ s->dec_nodeb=_determine_node_bytes(s->used_entries,_ilog(s->entries)/8+1);
+ s->dec_leafw=_determine_leaf_words(s->dec_nodeb,_ilog(s->entries)/8+1);
+ s->dec_type=0;
+
+ if(_make_decode_table(s,lengthlist,quantvals,opb,maptype)) goto _errout;
+ break;
+
+ case 1:
+
+ /* mapping type 1; implicit values by lattice position */
+ quantvals=_book_maptype1_quantvals(s);
+
+ /* dec_type choices here are 1,2; 3 doesn't make sense */
+ {
+ /* packed values */
+ long total1=(s->q_bits*s->dim+8)/8; /* remember flag bit */
+ /* vector of column offsets; remember flag bit */
+ long total2=(_ilog(quantvals-1)*s->dim+8)/8+(s->q_bits+7)/8;
+
+
+ if(total1<=4 && total1<=total2){
+ /* use dec_type 1: vector of packed values */
+
+ /* need quantized values before */
+ s->q_val=alloca(sizeof(ogg_uint16_t)*quantvals);
+ for(i=0;i<quantvals;i++)
+ ((ogg_uint16_t *)s->q_val)[i]=oggpack_read(opb,s->q_bits);
+
+ if(oggpack_eop(opb)){
+ s->q_val=0; /* cleanup must not free alloca memory */
+ goto _eofout;
+ }
+
+ s->dec_type=1;
+ s->dec_nodeb=_determine_node_bytes(s->used_entries,
+ (s->q_bits*s->dim+8)/8);
+ s->dec_leafw=_determine_leaf_words(s->dec_nodeb,
+ (s->q_bits*s->dim+8)/8);
+ if(_make_decode_table(s,lengthlist,quantvals,opb,maptype)){
+ s->q_val=0; /* cleanup must not free alloca memory */
+ goto _errout;
+ }
+
+ s->q_val=0; /* about to go out of scope; _make_decode_table
+ was using it */
+
+ }else{
+ /* use dec_type 2: packed vector of column offsets */
+
+ /* need quantized values before */
+ if(s->q_bits<=8){
+ s->q_val=_ogg_malloc(quantvals);
+ for(i=0;i<quantvals;i++)
+ ((unsigned char *)s->q_val)[i]=oggpack_read(opb,s->q_bits);
+ }else{
+ s->q_val=_ogg_malloc(quantvals*2);
+ for(i=0;i<quantvals;i++)
+ ((ogg_uint16_t *)s->q_val)[i]=oggpack_read(opb,s->q_bits);
+ }
+
+ if(oggpack_eop(opb))goto _eofout;
+
+ s->q_pack=_ilog(quantvals-1);
+ s->dec_type=2;
+ s->dec_nodeb=_determine_node_bytes(s->used_entries,
+ (_ilog(quantvals-1)*s->dim+8)/8);
+ s->dec_leafw=_determine_leaf_words(s->dec_nodeb,
+ (_ilog(quantvals-1)*s->dim+8)/8);
+ if(_make_decode_table(s,lengthlist,quantvals,opb,maptype))goto _errout;
+
+ }
+ }
+ break;
+ case 2:
+
+ /* mapping type 2; explicit array of values */
+ quantvals=s->entries*s->dim;
+ /* dec_type choices here are 1,3; 2 is not possible */
+
+ if( (s->q_bits*s->dim+8)/8 <=4){ /* remember flag bit */
+ /* use dec_type 1: vector of packed values */
+
+ s->dec_type=1;
+ s->dec_nodeb=_determine_node_bytes(s->used_entries,(s->q_bits*s->dim+8)/8);
+ s->dec_leafw=_determine_leaf_words(s->dec_nodeb,(s->q_bits*s->dim+8)/8);
+ if(_make_decode_table(s,lengthlist,quantvals,opb,maptype))goto _errout;
+
+ }else{
+ /* use dec_type 3: scalar offset into packed value array */
+
+ s->dec_type=3;
+ s->dec_nodeb=_determine_node_bytes(s->used_entries,_ilog(s->used_entries-1)/8+1);
+ s->dec_leafw=_determine_leaf_words(s->dec_nodeb,_ilog(s->used_entries-1)/8+1);
+ if(_make_decode_table(s,lengthlist,quantvals,opb,maptype))goto _errout;
+
+ /* get the vals & pack them */
+ s->q_pack=(s->q_bits+7)/8*s->dim;
+ s->q_val=_ogg_malloc(s->q_pack*s->used_entries);
+
+ if(s->q_bits<=8){
+ for(i=0;i<s->used_entries*s->dim;i++)
+ ((unsigned char *)(s->q_val))[i]=oggpack_read(opb,s->q_bits);
+ }else{
+ for(i=0;i<s->used_entries*s->dim;i++)
+ ((ogg_uint16_t *)(s->q_val))[i]=oggpack_read(opb,s->q_bits);
+ }
+ }
+ break;
+ default:
+ goto _errout;
+ }
+
+ if(oggpack_eop(opb))goto _eofout;
+
+ return 0;
+ _errout:
+ _eofout:
+ vorbis_book_clear(s);
+ return -1;
+}
+
+static inline ogg_uint32_t decode_packed_entry_number(codebook *book,
+ oggpack_buffer *b){
+ ogg_uint32_t chase=0;
+ int read=book->dec_maxlength;
+ long lok = oggpack_look(b,read),i;
+
+ while(lok<0 && read>1)
+ lok = oggpack_look(b, --read);
+
+ if(lok<0){
+ oggpack_adv(b,1); /* force eop */
+ return -1;
+ }
+
+ /* chase the tree with the bits we got */
+ if(book->dec_nodeb==1){
+ if(book->dec_leafw==1){
+
+ /* 8/8 */
+ unsigned char *t=(unsigned char *)book->dec_table;
+ for(i=0;i<read;i++){
+ chase=t[chase*2+((lok>>i)&1)];
+ if(chase&0x80UL)break;
+ }
+ chase&=0x7fUL;
+
+ }else{
+
+ /* 8/16 */
+ unsigned char *t=(unsigned char *)book->dec_table;
+ for(i=0;i<read;i++){
+ int bit=(lok>>i)&1;
+ int next=t[chase+bit];
+ if(next&0x80){
+ chase= (next<<8) | t[chase+bit+1+(!bit || t[chase]&0x80)];
+ break;
+ }
+ chase=next;
+ }
+ chase&=0x7fffUL;
+ }
+
+ }else{
+ if(book->dec_nodeb==2){
+ if(book->dec_leafw==1){
+
+ /* 16/16 */
+ for(i=0;i<read;i++){
+ chase=((ogg_uint16_t *)(book->dec_table))[chase*2+((lok>>i)&1)];
+ if(chase&0x8000UL)break;
+ }
+ chase&=0x7fffUL;
+
+ }else{
+
+ /* 16/32 */
+ ogg_uint16_t *t=(ogg_uint16_t *)book->dec_table;
+ for(i=0;i<read;i++){
+ int bit=(lok>>i)&1;
+ int next=t[chase+bit];
+ if(next&0x8000){
+ chase= (next<<16) | t[chase+bit+1+(!bit || t[chase]&0x8000)];
+ break;
+ }
+ chase=next;
+ }
+ chase&=0x7fffffffUL;
+ }
+
+ }else{
+
+ for(i=0;i<read;i++){
+ chase=((ogg_uint32_t *)(book->dec_table))[chase*2+((lok>>i)&1)];
+ if(chase&0x80000000UL)break;
+ }
+ chase&=0x7fffffffUL;
+
+ }
+ }
+
+ if(i<read){
+ oggpack_adv(b,i+1);
+ return chase;
+ }
+ oggpack_adv(b,read+1);
+ return(-1);
+}
+
+/* returns the [original, not compacted] entry number or -1 on eof *********/
+long vorbis_book_decode(codebook *book, oggpack_buffer *b){
+ if(book->dec_type)return -1;
+ return decode_packed_entry_number(book,b);
+}
+
+int decode_map(codebook *s, oggpack_buffer *b, ogg_int32_t *v, int point){
+ ogg_uint32_t entry = decode_packed_entry_number(s,b);
+ int i;
+ if(oggpack_eop(b))return(-1);
+
+ /* according to decode type */
+ switch(s->dec_type){
+ case 1:{
+ /* packed vector of values */
+ int mask=(1<<s->q_bits)-1;
+ for(i=0;i<s->dim;i++){
+ v[i]=entry&mask;
+ entry>>=s->q_bits;
+ }
+ break;
+ }
+ case 2:{
+ /* packed vector of column offsets */
+ int mask=(1<<s->q_pack)-1;
+ for(i=0;i<s->dim;i++){
+ if(s->q_bits<=8)
+ v[i]=((unsigned char *)(s->q_val))[entry&mask];
+ else
+ v[i]=((ogg_uint16_t *)(s->q_val))[entry&mask];
+ entry>>=s->q_pack;
+ }
+ break;
+ }
+ case 3:{
+ /* offset into array */
+ void *ptr=s->q_val+entry*s->q_pack;
+
+ if(s->q_bits<=8){
+ for(i=0;i<s->dim;i++)
+ v[i]=((unsigned char *)ptr)[i];
+ }else{
+ for(i=0;i<s->dim;i++)
+ v[i]=((ogg_uint16_t *)ptr)[i];
+ }
+ break;
+ }
+ default:
+ return -1;
+ }
+
+ /* we have the unpacked multiplicands; compute final vals */
+ {
+ int shiftM=point-s->q_delp;
+ ogg_int32_t add=point-s->q_minp;
+ if(add>0)
+ add= s->q_min >> add;
+ else
+ add= s->q_min << -add;
+
+ if(shiftM>0)
+ for(i=0;i<s->dim;i++)
+ v[i]= add + ((v[i] * s->q_del) >> shiftM);
+ else
+ for(i=0;i<s->dim;i++)
+ v[i]= add + ((v[i] * s->q_del) << -shiftM);
+
+ if(s->q_seq)
+ for(i=1;i<s->dim;i++)
+ v[i]+=v[i-1];
+ }
+
+ return 0;
+}
+
+/* returns 0 on OK or -1 on eof *************************************/
+long vorbis_book_decodevs_add(codebook *book,ogg_int32_t *a,
+ oggpack_buffer *b,int n,int point){
+ if(book->used_entries>0){
+ int step=n/book->dim;
+ ogg_int32_t *v = (ogg_int32_t *)alloca(sizeof(*v)*book->dim);
+ int i,j,o;
+
+ for (j=0;j<step;j++){
+ if(decode_map(book,b,v,point))return -1;
+ for(i=0,o=j;i<book->dim;i++,o+=step)
+ a[o]+=v[i];
+ }
+ }
+ return 0;
+}
+
+long vorbis_book_decodev_add(codebook *book,ogg_int32_t *a,
+ oggpack_buffer *b,int n,int point){
+ if(book->used_entries>0){
+ ogg_int32_t *v = (ogg_int32_t *)alloca(sizeof(*v)*book->dim);
+ int i,j;
+
+ for(i=0;i<n;){
+ if(decode_map(book,b,v,point))return -1;
+ for (j=0;j<book->dim;j++)
+ a[i++]+=v[j];
+ }
+ }
+ return 0;
+}
+
+long vorbis_book_decodev_set(codebook *book,ogg_int32_t *a,
+ oggpack_buffer *b,int n,int point){
+ if(book->used_entries>0){
+ ogg_int32_t *v = (ogg_int32_t *)alloca(sizeof(*v)*book->dim);
+ int i,j;
+
+ for(i=0;i<n;){
+ if(decode_map(book,b,v,point))return -1;
+ for (j=0;j<book->dim;j++)
+ a[i++]=v[j];
+ }
+ }else{
+ int i,j;
+
+ for(i=0;i<n;){
+ for (j=0;j<book->dim;j++)
+ a[i++]=0;
+ }
+ }
+
+ return 0;
+}
+
+long vorbis_book_decodevv_add(codebook *book,ogg_int32_t **a,
+ long offset,int ch,
+ oggpack_buffer *b,int n,int point){
+ if(book->used_entries>0){
+
+ ogg_int32_t *v = (ogg_int32_t *)alloca(sizeof(*v)*book->dim);
+ long i,j;
+ int chptr=0;
+
+ for(i=offset;i<offset+n;){
+ if(decode_map(book,b,v,point))return -1;
+ for (j=0;j<book->dim;j++){
+ a[chptr++][i]+=v[j];
+ if(chptr==ch){
+ chptr=0;
+ i++;
+ }
+ }
+ }
+ }
+
+ return 0;
+}
diff --git a/MakefileBasedBuild/app/v_codebook.h b/MakefileBasedBuild/app/v_codebook.h
new file mode 100644
index 0000000..57c37ad
--- /dev/null
+++ b/MakefileBasedBuild/app/v_codebook.h
@@ -0,0 +1,68 @@
+#ifdef ADK_INTERNAL
+/********************************************************************
+ * *
+ * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
+ * *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
+ * *
+ * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
+ * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
+ * *
+ ********************************************************************
+
+ function: basic shared codebook operations
+
+ ********************************************************************/
+
+#ifndef _V_CODEBOOK_H_
+#define _V_CODEBOOK_H_
+
+#include "v_ogg.h"
+
+typedef struct codebook{
+ long dim; /* codebook dimensions (elements per vector) */
+ long entries; /* codebook entries */
+ long used_entries; /* populated codebook entries */
+
+ int dec_maxlength;
+ void *dec_table;
+ int dec_nodeb;
+ int dec_leafw;
+ int dec_type; /* 0 = entry number
+ 1 = packed vector of values
+ 2 = packed vector of column offsets, maptype 1
+ 3 = scalar offset into value array, maptype 2 */
+
+ ogg_int32_t q_min;
+ int q_minp;
+ ogg_int32_t q_del;
+ int q_delp;
+ int q_seq;
+ int q_bits;
+ int q_pack;
+ void *q_val;
+
+} codebook;
+
+extern void vorbis_book_clear(codebook *b);
+extern int vorbis_book_unpack(oggpack_buffer *b,codebook *c);
+
+extern long vorbis_book_decode(codebook *book, oggpack_buffer *b);
+extern long vorbis_book_decodevs_add(codebook *book, ogg_int32_t *a,
+ oggpack_buffer *b,int n,int point);
+extern long vorbis_book_decodev_set(codebook *book, ogg_int32_t *a,
+ oggpack_buffer *b,int n,int point);
+extern long vorbis_book_decodev_add(codebook *book, ogg_int32_t *a,
+ oggpack_buffer *b,int n,int point);
+extern long vorbis_book_decodevv_add(codebook *book, ogg_int32_t **a,
+ long off,int ch,
+ oggpack_buffer *b,int n,int point);
+
+extern int _ilog(unsigned int v);
+
+
+#endif
+#endif
+
diff --git a/MakefileBasedBuild/app/v_codec_internal.h b/MakefileBasedBuild/app/v_codec_internal.h
new file mode 100644
index 0000000..91f92ff
--- /dev/null
+++ b/MakefileBasedBuild/app/v_codec_internal.h
@@ -0,0 +1,216 @@
+#ifdef ADK_INTERNAL
+/********************************************************************
+ * *
+ * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
+ * *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
+ * *
+ * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 *
+ * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
+ * *
+ ********************************************************************
+
+ function: libvorbis codec headers
+
+ ********************************************************************/
+
+#ifndef _V_CODECI_H_
+#define _V_CODECI_H_
+
+#define CHUNKSIZE 1024
+
+#include "v_codebook.h"
+#include "v_ivorbiscodec.h"
+
+#define VI_TRANSFORMB 1
+#define VI_WINDOWB 1
+#define VI_TIMEB 1
+#define VI_FLOORB 2
+#define VI_RESB 3
+#define VI_MAPB 1
+
+typedef void vorbis_info_floor;
+
+/* vorbis_dsp_state buffers the current vorbis audio
+ analysis/synthesis state. The DSP state belongs to a specific
+ logical bitstream ****************************************************/
+struct vorbis_dsp_state{
+ vorbis_info *vi;
+ oggpack_buffer opb;
+
+ ogg_int32_t **work;
+ ogg_int32_t **mdctright;
+ int out_begin;
+ int out_end;
+
+ long lW;
+ long W;
+
+ ogg_int64_t granulepos;
+ ogg_int64_t sequence;
+ ogg_int64_t sample_count;
+
+};
+
+
+/* Floor backend generic *****************************************/
+
+extern vorbis_info_floor *floor0_info_unpack(vorbis_info *,oggpack_buffer *);
+extern void floor0_free_info(vorbis_info_floor *);
+extern int floor0_memosize(vorbis_info_floor *);
+extern ogg_int32_t *floor0_inverse1(struct vorbis_dsp_state *,
+ vorbis_info_floor *,ogg_int32_t *);
+extern int floor0_inverse2 (struct vorbis_dsp_state *,vorbis_info_floor *,
+ ogg_int32_t *buffer,ogg_int32_t *);
+
+extern vorbis_info_floor *floor1_info_unpack(vorbis_info *,oggpack_buffer *);
+extern void floor1_free_info(vorbis_info_floor *);
+extern int floor1_memosize(vorbis_info_floor *);
+extern ogg_int32_t *floor1_inverse1(struct vorbis_dsp_state *,
+ vorbis_info_floor *,ogg_int32_t *);
+extern int floor1_inverse2 (struct vorbis_dsp_state *,vorbis_info_floor *,
+ ogg_int32_t *buffer,ogg_int32_t *);
+
+typedef struct{
+ int order;
+ long rate;
+ long barkmap;
+
+ int ampbits;
+ int ampdB;
+
+ int numbooks; /* <= 16 */
+ char books[16];
+
+} vorbis_info_floor0;
+
+typedef struct{
+ char class_dim; /* 1 to 8 */
+ char class_subs; /* 0,1,2,3 (bits: 1<<n poss) */
+ unsigned char class_book; /* subs ^ dim entries */
+ unsigned char class_subbook[8]; /* [VIF_CLASS][subs] */
+} floor1class;
+
+typedef struct{
+ floor1class *class; /* [VIF_CLASS] */
+ char *partitionclass; /* [VIF_PARTS]; 0 to 15 */
+ ogg_uint16_t *postlist; /* [VIF_POSIT+2]; first two implicit */
+ char *forward_index; /* [VIF_POSIT+2]; */
+ char *hineighbor; /* [VIF_POSIT]; */
+ char *loneighbor; /* [VIF_POSIT]; */
+
+ int partitions; /* 0 to 31 */
+ int posts;
+ int mult; /* 1 2 3 or 4 */
+
+} vorbis_info_floor1;
+
+/* Residue backend generic *****************************************/
+
+typedef struct vorbis_info_residue{
+ int type;
+ unsigned char *stagemasks;
+ unsigned char *stagebooks;
+
+/* block-partitioned VQ coded straight residue */
+ long begin;
+ long end;
+
+ /* first stage (lossless partitioning) */
+ int grouping; /* group n vectors per partition */
+ char partitions; /* possible codebooks for a partition */
+ unsigned char groupbook; /* huffbook for partitioning */
+ char stages;
+} vorbis_info_residue;
+
+extern void res_clear_info(vorbis_info_residue *info);
+extern int res_unpack(vorbis_info_residue *info,
+ vorbis_info *vi,oggpack_buffer *opb);
+extern int res_inverse(vorbis_dsp_state *,vorbis_info_residue *info,
+ ogg_int32_t **in,int *nonzero,int ch);
+
+/* mode ************************************************************/
+typedef struct {
+ unsigned char blockflag;
+ unsigned char mapping;
+} vorbis_info_mode;
+
+/* Mapping backend generic *****************************************/
+typedef struct coupling_step{
+ unsigned char mag;
+ unsigned char ang;
+} coupling_step;
+
+typedef struct submap{
+ char floor;
+ char residue;
+} submap;
+
+typedef struct vorbis_info_mapping{
+ int submaps;
+
+ unsigned char *chmuxlist;
+ submap *submaplist;
+
+ int coupling_steps;
+ coupling_step *coupling;
+} vorbis_info_mapping;
+
+extern int mapping_info_unpack(vorbis_info_mapping *,vorbis_info *,
+ oggpack_buffer *);
+extern void mapping_clear_info(vorbis_info_mapping *);
+extern int mapping_inverse(struct vorbis_dsp_state *,vorbis_info_mapping *);
+
+/* codec_setup_info contains all the setup information specific to the
+ specific compression/decompression mode in progress (eg,
+ psychoacoustic settings, channel setup, options, codebook
+ etc).
+*********************************************************************/
+
+typedef struct codec_setup_info {
+
+ /* Vorbis supports only short and long blocks, but allows the
+ encoder to choose the sizes */
+
+ long blocksizes[2];
+
+ /* modes are the primary means of supporting on-the-fly different
+ blocksizes, different channel mappings (LR or M/A),
+ different residue backends, etc. Each mode consists of a
+ blocksize flag and a mapping (along with the mapping setup */
+
+ int modes;
+ int maps;
+ int floors;
+ int residues;
+ int books;
+
+ vorbis_info_mode *mode_param;
+ vorbis_info_mapping *map_param;
+ char *floor_type;
+ vorbis_info_floor **floor_param;
+ vorbis_info_residue *residue_param;
+ codebook *book_param;
+
+} codec_setup_info;
+
+extern vorbis_dsp_state *vorbis_dsp_create(vorbis_info *vi);
+extern void vorbis_dsp_destroy(vorbis_dsp_state *v);
+extern int vorbis_dsp_headerin(vorbis_info *vi,vorbis_comment *vc,
+ ogg_packet *op);
+
+extern int vorbis_dsp_restart(vorbis_dsp_state *v);
+extern int vorbis_dsp_synthesis(vorbis_dsp_state *vd,
+ ogg_packet *op,int decodep);
+extern int vorbis_dsp_pcmout(vorbis_dsp_state *v,
+ ogg_int16_t *pcm,int samples);
+extern int vorbis_dsp_read(vorbis_dsp_state *v,int samples);
+extern long vorbis_packet_blocksize(vorbis_info *vi,ogg_packet *op);
+
+
+
+#endif
+#endif
+
diff --git a/MakefileBasedBuild/app/v_config.h b/MakefileBasedBuild/app/v_config.h
new file mode 100644
index 0000000..60985c3
--- /dev/null
+++ b/MakefileBasedBuild/app/v_config.h
@@ -0,0 +1,89 @@
+#ifdef ADK_INTERNAL
+/* config.h. Generated from config.h.in by configure. */
+/* config.h.in. Generated from configure.in by autoheader. */
+
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+ systems. This function is required for `alloca.c' support on those systems.
+ */
+/* #undef CRAY_STACKSEG_END */
+
+/* Define to 1 if using `alloca.c'. */
+#define C_ALLOCA 1
+
+/* Define to 1 if you have `alloca', as a function or macro. */
+/* #undef HAVE_ALLOCA */
+
+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
+ */
+/* #undef HAVE_ALLOCA_H */
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#define LT_OBJDIR ".libs/"
+
+/* Name of package */
+#define PACKAGE "libvorbisidec"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME ""
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING ""
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME ""
+
+/* Define to the home page for this package. */
+#define PACKAGE_URL ""
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION ""
+
+/* If using the C implementation of alloca, define if you know the
+ direction of stack growth for your system; otherwise it will be
+ automatically deduced at runtime.
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown */
+#define STACK_DIRECTION -1
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Version number of package */
+#define VERSION "1.2.1"
+#endif
+
diff --git a/MakefileBasedBuild/app/v_config_types.h b/MakefileBasedBuild/app/v_config_types.h
new file mode 100644
index 0000000..e00f0d4
--- /dev/null
+++ b/MakefileBasedBuild/app/v_config_types.h
@@ -0,0 +1,29 @@
+#ifdef ADK_INTERNAL
+/********************************************************************
+ * *
+ * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
+ * *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
+ * *
+ * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
+ * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
+ * *
+ ********************************************************************
+
+ function: #ifdef jail to whip a few platforms into the UNIX ideal.
+
+ ********************************************************************/
+#ifndef _OS_CVTYPES_H
+#define _OS_CVTYPES_H
+
+typedef long long ogg_int64_t;
+typedef int ogg_int32_t;
+typedef unsigned int ogg_uint32_t;
+typedef short ogg_int16_t;
+typedef unsigned short ogg_uint16_t;
+
+#endif
+#endif
+
diff --git a/MakefileBasedBuild/app/v_dsp.c b/MakefileBasedBuild/app/v_dsp.c
new file mode 100644
index 0000000..71bc672
--- /dev/null
+++ b/MakefileBasedBuild/app/v_dsp.c
@@ -0,0 +1,299 @@
+#define ADK_INTERNAL
+/********************************************************************
+ * *
+ * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
+ * *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
+ * *
+ * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 *
+ * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
+ * *
+ ********************************************************************
+
+ function: PCM data vector blocking, windowing and dis/reassembly
+
+ ********************************************************************/
+
+#include <stdlib.h>
+#include "v_ogg.h"
+#include "v_mdct.h"
+#include "v_ivorbiscodec.h"
+#include "v_codec_internal.h"
+#include "v_misc.h"
+#include "v_window_lookup.h"
+
+int vorbis_dsp_restart(vorbis_dsp_state *v){
+ if(!v)return -1;
+ {
+ vorbis_info *vi=v->vi;
+ codec_setup_info *ci;
+
+ if(!vi)return -1;
+ ci=vi->codec_setup;
+ if(!ci)return -1;
+
+ v->out_end=-1;
+ v->out_begin=-1;
+
+ v->granulepos=-1;
+ v->sequence=-1;
+ v->sample_count=-1;
+ }
+ return 0;
+}
+
+vorbis_dsp_state *vorbis_dsp_create(vorbis_info *vi){
+ int i;
+
+ vorbis_dsp_state *v=_ogg_calloc(1,sizeof(*v));
+ codec_setup_info *ci=(codec_setup_info *)vi->codec_setup;
+
+ v->vi=vi;
+
+ v->work=(ogg_int32_t **)_ogg_malloc(vi->channels*sizeof(*v->work));
+ v->mdctright=(ogg_int32_t **)_ogg_malloc(vi->channels*sizeof(*v->mdctright));
+ for(i=0;i<vi->channels;i++){
+ v->work[i]=(ogg_int32_t *)_ogg_calloc(1,(ci->blocksizes[1]>>1)*
+ sizeof(*v->work[i]));
+ v->mdctright[i]=(ogg_int32_t *)_ogg_calloc(1,(ci->blocksizes[1]>>2)*
+ sizeof(*v->mdctright[i]));
+ }
+
+ v->lW=0; /* previous window size */
+ v->W=0; /* current window size */
+
+ vorbis_dsp_restart(v);
+ return v;
+}
+
+void vorbis_dsp_destroy(vorbis_dsp_state *v){
+ int i;
+ if(v){
+ vorbis_info *vi=v->vi;
+
+ if(v->work){
+ for(i=0;i<vi->channels;i++)
+ if(v->work[i])_ogg_free(v->work[i]);
+ _ogg_free(v->work);
+ }
+ if(v->mdctright){
+ for(i=0;i<vi->channels;i++)
+ if(v->mdctright[i])_ogg_free(v->mdctright[i]);
+ _ogg_free(v->mdctright);
+ }
+
+ _ogg_free(v);
+ }
+}
+
+static LOOKUP_T *_vorbis_window(int left){
+ switch(left){
+ case 32:
+ return vwin64;
+ case 64:
+ return vwin128;
+ case 128:
+ return vwin256;
+ case 256:
+ return vwin512;
+ case 512:
+ return vwin1024;
+ case 1024:
+ return vwin2048;
+ case 2048:
+ return vwin4096;
+#ifndef LIMIT_TO_64kHz
+ case 4096:
+ return vwin8192;
+#endif
+ default:
+ return(0);
+ }
+}
+
+/* pcm==0 indicates we just want the pending samples, no more */
+int vorbis_dsp_pcmout(vorbis_dsp_state *v,ogg_int16_t *pcm,int samples){
+ vorbis_info *vi=v->vi;
+ codec_setup_info *ci=(codec_setup_info *)vi->codec_setup;
+ if(v->out_begin>-1 && v->out_begin<v->out_end){
+ int n=v->out_end-v->out_begin;
+ if(pcm){
+ int i;
+ if(n>samples)n=samples;
+ for(i=0;i<vi->channels;i++)
+ mdct_unroll_lap(ci->blocksizes[0],ci->blocksizes[1],
+ v->lW,v->W,v->work[i],v->mdctright[i],
+ _vorbis_window(ci->blocksizes[0]>>1),
+ _vorbis_window(ci->blocksizes[1]>>1),
+ pcm+i,vi->channels,
+ v->out_begin,v->out_begin+n);
+ }
+ return(n);
+ }
+ return(0);
+}
+
+int vorbis_dsp_read(vorbis_dsp_state *v,int s){
+ if(s && v->out_begin+s>v->out_end)return(OV_EINVAL);
+ v->out_begin+=s;
+ return(0);
+}
+
+long vorbis_packet_blocksize(vorbis_info *vi,ogg_packet *op){
+ codec_setup_info *ci=(codec_setup_info *)vi->codec_setup;
+ oggpack_buffer opb;
+ int mode;
+ int modebits=0;
+ int v=ci->modes;
+
+ oggpack_readinit(&opb,op->packet);
+
+ /* Check the packet type */
+ if(oggpack_read(&opb,1)!=0){
+ /* Oops. This is not an audio data packet */
+ return(OV_ENOTAUDIO);
+ }
+
+ while(v>1){
+ modebits++;
+ v>>=1;
+ }
+
+ /* read our mode and pre/post windowsize */
+ mode=oggpack_read(&opb,modebits);
+ if(mode==-1)return(OV_EBADPACKET);
+ return(ci->blocksizes[ci->mode_param[mode].blockflag]);
+}
+
+
+static int ilog(ogg_uint32_t v){
+ int ret=0;
+ if(v)--v;
+ while(v){
+ ret++;
+ v>>=1;
+ }
+ return(ret);
+}
+
+int vorbis_dsp_synthesis(vorbis_dsp_state *vd,ogg_packet *op,int decodep){
+ vorbis_info *vi=vd->vi;
+ codec_setup_info *ci=(codec_setup_info *)vi->codec_setup;
+ int mode,i;
+
+ oggpack_readinit(&vd->opb,op->packet);
+
+ /* Check the packet type */
+ if(oggpack_read(&vd->opb,1)!=0){
+ /* Oops. This is not an audio data packet */
+ return OV_ENOTAUDIO ;
+ }
+
+ /* read our mode and pre/post windowsize */
+ mode=oggpack_read(&vd->opb,ilog(ci->modes));
+ if(mode==-1 || mode>=ci->modes) return OV_EBADPACKET;
+
+ /* shift information we still need from last window */
+ vd->lW=vd->W;
+ vd->W=ci->mode_param[mode].blockflag;
+ for(i=0;i<vi->channels;i++)
+ mdct_shift_right(ci->blocksizes[vd->lW],vd->work[i],vd->mdctright[i]);
+
+ if(vd->W){
+ int temp;
+ oggpack_read(&vd->opb,1);
+ temp=oggpack_read(&vd->opb,1);
+ if(temp==-1) return OV_EBADPACKET;
+ }
+
+ /* packet decode and portions of synthesis that rely on only this block */
+ if(decodep){
+ mapping_inverse(vd,ci->map_param+ci->mode_param[mode].mapping);
+
+ if(vd->out_begin==-1){
+ vd->out_begin=0;
+ vd->out_end=0;
+ }else{
+ vd->out_begin=0;
+ vd->out_end=ci->blocksizes[vd->lW]/4+ci->blocksizes[vd->W]/4;
+ }
+ }
+
+ /* track the frame number... This is for convenience, but also
+ making sure our last packet doesn't end with added padding.
+
+ This is not foolproof! It will be confused if we begin
+ decoding at the last page after a seek or hole. In that case,
+ we don't have a starting point to judge where the last frame
+ is. For this reason, vorbisfile will always try to make sure
+ it reads the last two marked pages in proper sequence */
+
+ /* if we're out of sequence, dump granpos tracking until we sync back up */
+ if(vd->sequence==-1 || vd->sequence+1 != op->packetno-3){
+ /* out of sequence; lose count */
+ vd->granulepos=-1;
+ vd->sample_count=-1;
+ }
+
+ vd->sequence=op->packetno;
+ vd->sequence=vd->sequence-3;
+
+ if(vd->sample_count==-1){
+ vd->sample_count=0;
+ }else{
+ vd->sample_count+=
+ ci->blocksizes[vd->lW]/4+ci->blocksizes[vd->W]/4;
+ }
+
+ if(vd->granulepos==-1){
+ if(op->granulepos!=-1){ /* only set if we have a
+ position to set to */
+
+ vd->granulepos=op->granulepos;
+
+ /* is this a short page? */
+ if(vd->sample_count>vd->granulepos){
+ /* corner case; if this is both the first and last audio page,
+ then spec says the end is cut, not beginning */
+ if(op->e_o_s){
+ /* trim the end */
+ /* no preceeding granulepos; assume we started at zero (we'd
+ have to in a short single-page stream) */
+ /* granulepos could be -1 due to a seek, but that would result
+ in a long coun t, not short count */
+
+ vd->out_end-=vd->sample_count-vd->granulepos;
+ }else{
+ /* trim the beginning */
+ vd->out_begin+=vd->sample_count-vd->granulepos;
+ if(vd->out_begin>vd->out_end)
+ vd->out_begin=vd->out_end;
+ }
+
+ }
+
+ }
+ }else{
+ vd->granulepos+=
+ ci->blocksizes[vd->lW]/4+ci->blocksizes[vd->W]/4;
+ if(op->granulepos!=-1 && vd->granulepos!=op->granulepos){
+
+ if(vd->granulepos>op->granulepos){
+ long extra=vd->granulepos-op->granulepos;
+
+ if(extra)
+ if(op->e_o_s){
+ /* partial last frame. Strip the extra samples off */
+ vd->out_end-=extra;
+ } /* else {Shouldn't happen *unless* the bitstream is out of
+ spec. Either way, believe the bitstream } */
+ } /* else {Shouldn't happen *unless* the bitstream is out of
+ spec. Either way, believe the bitstream } */
+ vd->granulepos=op->granulepos;
+ }
+ }
+
+ return(0);
+}
diff --git a/MakefileBasedBuild/app/v_floor0.c b/MakefileBasedBuild/app/v_floor0.c
new file mode 100644
index 0000000..ebb1e42
--- /dev/null
+++ b/MakefileBasedBuild/app/v_floor0.c
@@ -0,0 +1,429 @@
+#define ADK_INTERNAL
+/********************************************************************
+ * *
+ * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
+ * *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
+ * *
+ * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 *
+ * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
+ * *
+ ********************************************************************
+
+ function: floor backend 0 implementation
+
+ ********************************************************************/
+
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include "v_ogg.h"
+#include "v_ivorbiscodec.h"
+#include "v_codec_internal.h"
+#include "v_codebook.h"
+#include "v_misc.h"
+#include "v_os.h"
+
+#define LSP_FRACBITS 14
+extern const ogg_int32_t FLOOR_fromdB_LOOKUP[];
+
+/*************** LSP decode ********************/
+
+#include "v_lsp_lookup.h"
+
+/* interpolated 1./sqrt(p) where .5 <= a < 1. (.100000... to .111111...) in
+ 16.16 format
+ returns in m.8 format */
+
+static long ADJUST_SQRT2[2]={8192,5792};
+static inline ogg_int32_t vorbis_invsqlook_i(long a,long e){
+ long i=(a&0x7fff)>>(INVSQ_LOOKUP_I_SHIFT-1);
+ long d=a&INVSQ_LOOKUP_I_MASK; /* 0.10 */
+ long val=INVSQ_LOOKUP_I[i]- /* 1.16 */
+ ((INVSQ_LOOKUP_IDel[i]*d)>>INVSQ_LOOKUP_I_SHIFT); /* result 1.16 */
+ val*=ADJUST_SQRT2[e&1];
+ e=(e>>1)+21;
+ return(val>>e);
+}
+
+/* interpolated lookup based fromdB function, domain -140dB to 0dB only */
+/* a is in n.12 format */
+#ifdef _LOW_ACCURACY_
+static inline ogg_int32_t vorbis_fromdBlook_i(long a){
+ if(a>0) return 0x7fffffff;
+ if(a<(-140<<12)) return 0;
+ return FLOOR_fromdB_LOOKUP[((a+140)*467)>>20]<<9;
+}
+#else
+static inline ogg_int32_t vorbis_fromdBlook_i(long a){
+ if(a>0) return 0x7fffffff;
+ if(a<(-140<<12)) return 0;
+ return FLOOR_fromdB_LOOKUP[((a+(140<<12))*467)>>20];
+}
+#endif
+
+/* interpolated lookup based cos function, domain 0 to PI only */
+/* a is in 0.16 format, where 0==0, 2^^16-1==PI, return 0.14 */
+static inline ogg_int32_t vorbis_coslook_i(long a){
+ int i=a>>COS_LOOKUP_I_SHIFT;
+ int d=a&COS_LOOKUP_I_MASK;
+ return COS_LOOKUP_I[i]- ((d*(COS_LOOKUP_I[i]-COS_LOOKUP_I[i+1]))>>
+ COS_LOOKUP_I_SHIFT);
+}
+
+/* interpolated half-wave lookup based cos function */
+/* a is in 0.16 format, where 0==0, 2^^16==PI, return .LSP_FRACBITS */
+static inline ogg_int32_t vorbis_coslook2_i(long a){
+ int i=a>>COS_LOOKUP_I_SHIFT;
+ int d=a&COS_LOOKUP_I_MASK;
+ return ((COS_LOOKUP_I[i]<<COS_LOOKUP_I_SHIFT)-
+ d*(COS_LOOKUP_I[i]-COS_LOOKUP_I[i+1]))>>
+ (COS_LOOKUP_I_SHIFT-LSP_FRACBITS+14);
+}
+
+static const ogg_uint16_t barklook[54]={
+ 0,51,102,154, 206,258,311,365,
+ 420,477,535,594, 656,719,785,854,
+ 926,1002,1082,1166, 1256,1352,1454,1564,
+ 1683,1812,1953,2107, 2276,2463,2670,2900,
+ 3155,3440,3756,4106, 4493,4919,5387,5901,
+ 6466,7094,7798,8599, 9528,10623,11935,13524,
+ 15453,17775,20517,23667, 27183,31004
+};
+
+/* used in init only; interpolate the long way */
+static inline ogg_int32_t toBARK(int n){
+ int i;
+ for(i=0;i<54;i++)
+ if(n>=barklook[i] && n<barklook[i+1])break;
+
+ if(i==54){
+ return 54<<14;
+ }else{
+ return (i<<14)+(((n-barklook[i])*
+ ((1UL<<31)/(barklook[i+1]-barklook[i])))>>17);
+ }
+}
+
+static const unsigned char MLOOP_1[64]={
+ 0,10,11,11, 12,12,12,12, 13,13,13,13, 13,13,13,13,
+ 14,14,14,14, 14,14,14,14, 14,14,14,14, 14,14,14,14,
+ 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15,
+ 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15,
+};
+
+static const unsigned char MLOOP_2[64]={
+ 0,4,5,5, 6,6,6,6, 7,7,7,7, 7,7,7,7,
+ 8,8,8,8, 8,8,8,8, 8,8,8,8, 8,8,8,8,
+ 9,9,9,9, 9,9,9,9, 9,9,9,9, 9,9,9,9,
+ 9,9,9,9, 9,9,9,9, 9,9,9,9, 9,9,9,9,
+};
+
+static const unsigned char MLOOP_3[8]={0,1,2,2,3,3,3,3};
+
+void vorbis_lsp_to_curve(ogg_int32_t *curve,int n,int ln,
+ ogg_int32_t *lsp,int m,
+ ogg_int32_t amp,
+ ogg_int32_t ampoffset,
+ ogg_int32_t nyq){
+
+ /* 0 <= m < 256 */
+
+ /* set up for using all int later */
+ int i;
+ int ampoffseti=ampoffset*4096;
+ int ampi=amp;
+ ogg_int32_t *ilsp=(ogg_int32_t *)alloca(m*sizeof(*ilsp));
+
+ ogg_uint32_t inyq= (1UL<<31) / toBARK(nyq);
+ ogg_uint32_t imap= (1UL<<31) / ln;
+ ogg_uint32_t tBnyq1 = toBARK(nyq)<<1;
+
+ /* Besenham for frequency scale to avoid a division */
+ int f=0;
+ int fdx=n;
+ int fbase=nyq/fdx;
+ int ferr=0;
+ int fdy=nyq-fbase*fdx;
+ int map=0;
+
+#ifdef _LOW_ACCURACY_
+ ogg_uint32_t nextbark=((tBnyq1<<11)/ln)>>12;
+#else
+ ogg_uint32_t nextbark=MULT31(imap>>1,tBnyq1);
+#endif
+ int nextf=barklook[nextbark>>14]+(((nextbark&0x3fff)*
+ (barklook[(nextbark>>14)+1]-barklook[nextbark>>14]))>>14);
+
+ /* lsp is in 8.24, range 0 to PI; coslook wants it in .16 0 to 1*/
+ for(i=0;i<m;i++){
+#ifndef _LOW_ACCURACY_
+ ogg_int32_t val=MULT32(lsp[i],0x517cc2);
+#else
+ ogg_int32_t val=((lsp[i]>>10)*0x517d)>>14;
+#endif
+
+ /* safeguard against a malicious stream */
+ if(val<0 || (val>>COS_LOOKUP_I_SHIFT)>=COS_LOOKUP_I_SZ){
+ memset(curve,0,sizeof(*curve)*n);
+ return;
+ }
+
+ ilsp[i]=vorbis_coslook_i(val);
+ }
+
+ i=0;
+ while(i<n){
+ int j;
+ ogg_uint32_t pi=46341; /* 2**-.5 in 0.16 */
+ ogg_uint32_t qi=46341;
+ ogg_int32_t qexp=0,shift;
+ ogg_int32_t wi;
+
+ wi=vorbis_coslook2_i((map*imap)>>15);
+
+
+#ifdef _V_LSP_MATH_ASM
+ lsp_loop_asm(&qi,&pi,&qexp,ilsp,wi,m);
+
+ pi=((pi*pi)>>16);
+ qi=((qi*qi)>>16);
+
+ if(m&1){
+ qexp= qexp*2-28*((m+1)>>1)+m;
+ pi*=(1<<14)-((wi*wi)>>14);
+ qi+=pi>>14;
+ }else{
+ qexp= qexp*2-13*m;
+
+ pi*=(1<<14)-wi;
+ qi*=(1<<14)+wi;
+
+ qi=(qi+pi)>>14;
+ }
+
+ if(qi&0xffff0000){ /* checks for 1.xxxxxxxxxxxxxxxx */
+ qi>>=1; qexp++;
+ }else
+ lsp_norm_asm(&qi,&qexp);
+
+#else
+
+ qi*=labs(ilsp[0]-wi);
+ pi*=labs(ilsp[1]-wi);
+
+ for(j=3;j<m;j+=2){
+ if(!(shift=MLOOP_1[(pi|qi)>>25]))
+ if(!(shift=MLOOP_2[(pi|qi)>>19]))
+ shift=MLOOP_3[(pi|qi)>>16];
+
+ qi=(qi>>shift)*labs(ilsp[j-1]-wi);
+ pi=(pi>>shift)*labs(ilsp[j]-wi);
+ qexp+=shift;
+ }
+ if(!(shift=MLOOP_1[(pi|qi)>>25]))
+ if(!(shift=MLOOP_2[(pi|qi)>>19]))
+ shift=MLOOP_3[(pi|qi)>>16];
+
+ /* pi,qi normalized collectively, both tracked using qexp */
+
+ if(m&1){
+ /* odd order filter; slightly assymetric */
+ /* the last coefficient */
+ qi=(qi>>shift)*labs(ilsp[j-1]-wi);
+ pi=(pi>>shift)<<14;
+ qexp+=shift;
+
+ if(!(shift=MLOOP_1[(pi|qi)>>25]))
+ if(!(shift=MLOOP_2[(pi|qi)>>19]))
+ shift=MLOOP_3[(pi|qi)>>16];
+
+ pi>>=shift;
+ qi>>=shift;
+ qexp+=shift-14*((m+1)>>1);
+
+ pi=((pi*pi)>>16);
+ qi=((qi*qi)>>16);
+ qexp=qexp*2+m;
+
+ pi*=(1<<14)-((wi*wi)>>14);
+ qi+=pi>>14;
+
+ }else{
+ /* even order filter; still symmetric */
+
+ /* p*=p(1-w), q*=q(1+w), let normalization drift because it isn't
+ worth tracking step by step */
+
+ pi>>=shift;
+ qi>>=shift;
+ qexp+=shift-7*m;
+
+ pi=((pi*pi)>>16);
+ qi=((qi*qi)>>16);
+ qexp=qexp*2+m;
+
+ pi*=(1<<14)-wi;
+ qi*=(1<<14)+wi;
+ qi=(qi+pi)>>14;
+
+ }
+
+
+ /* we've let the normalization drift because it wasn't important;
+ however, for the lookup, things must be normalized again. We
+ need at most one right shift or a number of left shifts */
+
+ if(qi&0xffff0000){ /* checks for 1.xxxxxxxxxxxxxxxx */
+ qi>>=1; qexp++;
+ }else
+ while(qi && !(qi&0x8000)){ /* checks for 0.0xxxxxxxxxxxxxxx or less*/
+ qi<<=1; qexp--;
+ }
+
+#endif
+
+ amp=vorbis_fromdBlook_i(ampi* /* n.4 */
+ vorbis_invsqlook_i(qi,qexp)-
+ /* m.8, m+n<=8 */
+ ampoffseti); /* 8.12[0] */
+
+#ifdef _LOW_ACCURACY_
+ amp>>=9;
+#endif
+ curve[i]= MULT31_SHIFT15(curve[i],amp);
+
+ while(++i<n){
+
+ /* line plot to get new f */
+ ferr+=fdy;
+ if(ferr>=fdx){
+ ferr-=fdx;
+ f++;
+ }
+ f+=fbase;
+
+ if(f>=nextf)break;
+
+ curve[i]= MULT31_SHIFT15(curve[i],amp);
+ }
+
+ while(1){
+ map++;
+
+ if(map+1<ln){
+
+#ifdef _LOW_ACCURACY_
+ nextbark=((tBnyq1<<11)/ln*(map+1))>>12;
+#else
+ nextbark=MULT31((map+1)*(imap>>1),tBnyq1);
+#endif
+ nextf=barklook[nextbark>>14]+
+ (((nextbark&0x3fff)*
+ (barklook[(nextbark>>14)+1]-barklook[nextbark>>14]))>>14);
+ if(f<=nextf)break;
+
+ }else{
+ nextf=9999999;
+ break;
+ }
+ }
+ if(map>=ln){
+ map=ln-1; /* guard against the approximation */
+ nextf=9999999;
+ }
+ }
+}
+
+/*************** vorbis decode glue ************/
+
+void floor0_free_info(vorbis_info_floor *i){
+ vorbis_info_floor0 *info=(vorbis_info_floor0 *)i;
+ if(info)_ogg_free(info);
+}
+
+vorbis_info_floor *floor0_info_unpack (vorbis_info *vi,oggpack_buffer *opb){
+ codec_setup_info *ci=(codec_setup_info *)vi->codec_setup;
+ int j;
+
+ vorbis_info_floor0 *info=(vorbis_info_floor0 *)_ogg_malloc(sizeof(*info));
+ info->order=oggpack_read(opb,8);
+ info->rate=oggpack_read(opb,16);
+ info->barkmap=oggpack_read(opb,16);
+ info->ampbits=oggpack_read(opb,6);
+ info->ampdB=oggpack_read(opb,8);
+ info->numbooks=oggpack_read(opb,4)+1;
+
+ if(info->order<1)goto err_out;
+ if(info->rate<1)goto err_out;
+ if(info->barkmap<1)goto err_out;
+
+ for(j=0;j<info->numbooks;j++){
+ info->books[j]=oggpack_read(opb,8);
+ if(info->books[j]>=ci->books)goto err_out;
+ }
+
+ if(oggpack_eop(opb))goto err_out;
+ return(info);
+
+ err_out:
+ floor0_free_info(info);
+ return(NULL);
+}
+
+int floor0_memosize(vorbis_info_floor *i){
+ vorbis_info_floor0 *info=(vorbis_info_floor0 *)i;
+ return info->order+1;
+}
+
+ogg_int32_t *floor0_inverse1(vorbis_dsp_state *vd,vorbis_info_floor *i,
+ ogg_int32_t *lsp){
+ vorbis_info_floor0 *info=(vorbis_info_floor0 *)i;
+ int j,k;
+
+ int ampraw=oggpack_read(&vd->opb,info->ampbits);
+ if(ampraw>0){ /* also handles the -1 out of data case */
+ long maxval=(1<<info->ampbits)-1;
+ int amp=((ampraw*info->ampdB)<<4)/maxval;
+ int booknum=oggpack_read(&vd->opb,_ilog(info->numbooks));
+
+ if(booknum!=-1 && booknum<info->numbooks){ /* be paranoid */
+ codec_setup_info *ci=(codec_setup_info *)vd->vi->codec_setup;
+ codebook *b=ci->book_param+info->books[booknum];
+ ogg_int32_t last=0;
+
+ for(j=0;j<info->order;j+=b->dim)
+ if(vorbis_book_decodev_set(b,lsp+j,&vd->opb,b->dim,-24)==-1)goto eop;
+ for(j=0;j<info->order;){
+ for(k=0;k<b->dim;k++,j++)lsp[j]+=last;
+ last=lsp[j-1];
+ }
+
+ lsp[info->order]=amp;
+ return(lsp);
+ }
+ }
+ eop:
+ return(NULL);
+}
+
+int floor0_inverse2(vorbis_dsp_state *vd,vorbis_info_floor *i,
+ ogg_int32_t *lsp,ogg_int32_t *out){
+ vorbis_info_floor0 *info=(vorbis_info_floor0 *)i;
+ codec_setup_info *ci=(codec_setup_info *)vd->vi->codec_setup;
+
+ if(lsp){
+ ogg_int32_t amp=lsp[info->order];
+
+ /* take the coefficients back to a spectral envelope curve */
+ vorbis_lsp_to_curve(out,ci->blocksizes[vd->W]/2,info->barkmap,
+ lsp,info->order,amp,info->ampdB,
+ info->rate>>1);
+ return(1);
+ }
+ memset(out,0,sizeof(*out)*ci->blocksizes[vd->W]/2);
+ return(0);
+}
+
diff --git a/MakefileBasedBuild/app/v_floor1.c b/MakefileBasedBuild/app/v_floor1.c
new file mode 100644
index 0000000..ecd340b
--- /dev/null
+++ b/MakefileBasedBuild/app/v_floor1.c
@@ -0,0 +1,353 @@
+#define ADK_INTERNAL
+/********************************************************************
+ * *
+ * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
+ * *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
+ * *
+ * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 *
+ * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
+ * *
+ ********************************************************************
+
+ function: floor backend 1 implementation
+
+ ********************************************************************/
+
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include "v_ogg.h"
+#include "v_ivorbiscodec.h"
+#include "v_codec_internal.h"
+#include "v_codebook.h"
+#include "v_misc.h"
+
+extern const ogg_int32_t FLOOR_fromdB_LOOKUP[];
+#define floor1_rangedB 140 /* floor 1 fixed at -140dB to 0dB range */
+#define VIF_POSIT 63
+
+/***********************************************/
+
+void floor1_free_info(vorbis_info_floor *i){
+ vorbis_info_floor1 *info=(vorbis_info_floor1 *)i;
+ if(info){
+ if(info->class)_ogg_free(info->class);
+ if(info->partitionclass)_ogg_free(info->partitionclass);
+ if(info->postlist)_ogg_free(info->postlist);
+ if(info->forward_index)_ogg_free(info->forward_index);
+ if(info->hineighbor)_ogg_free(info->hineighbor);
+ if(info->loneighbor)_ogg_free(info->loneighbor);
+ memset(info,0,sizeof(*info));
+ _ogg_free(info);
+ }
+}
+
+static int ilog(unsigned int v){
+ int ret=0;
+ while(v){
+ ret++;
+ v>>=1;
+ }
+ return(ret);
+}
+
+static void vorbis_mergesort(char *index,ogg_uint16_t *vals,ogg_uint16_t n){
+ ogg_uint16_t i,j;
+ char *temp,*A=index,*B=_ogg_malloc(n*sizeof(*B));
+
+ for(i=1;i<n;i<<=1){
+ for(j=0;j+i<n;){
+ int k1=j;
+ int mid=j+i;
+ int k2=mid;
+ int end=(j+i*2<n?j+i*2:n);
+ while(k1<mid && k2<end){
+ if(vals[A[k1]]<vals[A[k2]])
+ B[j++]=A[k1++];
+ else
+ B[j++]=A[k2++];
+ }
+ while(k1<mid) B[j++]=A[k1++];
+ while(k2<end) B[j++]=A[k2++];
+ }
+ for(;j<n;j++)B[j]=A[j];
+ temp=A;A=B;B=temp;
+ }
+
+ if(B==index){
+ for(j=0;j<n;j++)B[j]=A[j];
+ _ogg_free(A);
+ }else
+ _ogg_free(B);
+}
+
+
+vorbis_info_floor *floor1_info_unpack (vorbis_info *vi,oggpack_buffer *opb){
+ codec_setup_info *ci=(codec_setup_info *)vi->codec_setup;
+ int j,k,count=0,maxclass=-1,rangebits;
+
+ vorbis_info_floor1 *info=(vorbis_info_floor1 *)_ogg_calloc(1,sizeof(*info));
+ /* read partitions */
+ info->partitions=oggpack_read(opb,5); /* only 0 to 31 legal */
+ info->partitionclass=
+ (char *)_ogg_malloc(info->partitions*sizeof(*info->partitionclass));
+ for(j=0;j<info->partitions;j++){
+ info->partitionclass[j]=oggpack_read(opb,4); /* only 0 to 15 legal */
+ if(maxclass<info->partitionclass[j])maxclass=info->partitionclass[j];
+ }
+
+ /* read partition classes */
+ info->class=
+ (floor1class *)_ogg_malloc((maxclass+1)*sizeof(*info->class));
+ for(j=0;j<maxclass+1;j++){
+ info->class[j].class_dim=oggpack_read(opb,3)+1; /* 1 to 8 */
+ info->class[j].class_subs=oggpack_read(opb,2); /* 0,1,2,3 bits */
+ if(oggpack_eop(opb)<0) goto err_out;
+ if(info->class[j].class_subs)
+ info->class[j].class_book=oggpack_read(opb,8);
+ else
+ info->class[j].class_book=0;
+ if(info->class[j].class_book>=ci->books)goto err_out;
+ for(k=0;k<(1<<info->class[j].class_subs);k++){
+ info->class[j].class_subbook[k]=oggpack_read(opb,8)-1;
+ if(info->class[j].class_subbook[k]>=ci->books &&
+ info->class[j].class_subbook[k]!=0xff)goto err_out;
+ }
+ }
+
+ /* read the post list */
+ info->mult=oggpack_read(opb,2)+1; /* only 1,2,3,4 legal now */
+ rangebits=oggpack_read(opb,4);
+
+ for(j=0,k=0;j<info->partitions;j++)
+ count+=info->class[info->partitionclass[j]].class_dim;
+ info->postlist=
+ (ogg_uint16_t *)_ogg_malloc((count+2)*sizeof(*info->postlist));
+ info->forward_index=
+ (char *)_ogg_malloc((count+2)*sizeof(*info->forward_index));
+ info->loneighbor=
+ (char *)_ogg_malloc(count*sizeof(*info->loneighbor));
+ info->hineighbor=
+ (char *)_ogg_malloc(count*sizeof(*info->hineighbor));
+
+ count=0;
+ for(j=0,k=0;j<info->partitions;j++){
+ count+=info->class[info->partitionclass[j]].class_dim;
+ if(count>VIF_POSIT)goto err_out;
+ for(;k<count;k++){
+ int t=info->postlist[k+2]=oggpack_read(opb,rangebits);
+ if(t>=(1<<rangebits))goto err_out;
+ }
+ }
+ if(oggpack_eop(opb))goto err_out;
+ info->postlist[0]=0;
+ info->postlist[1]=1<<rangebits;
+ info->posts=count+2;
+
+ /* also store a sorted position index */
+ for(j=0;j<info->posts;j++)info->forward_index[j]=j;
+ vorbis_mergesort(info->forward_index,info->postlist,info->posts);
+
+ /* discover our neighbors for decode where we don't use fit flags
+ (that would push the neighbors outward) */
+ for(j=0;j<info->posts-2;j++){
+ int lo=0;
+ int hi=1;
+ int lx=0;
+ int hx=info->postlist[1];
+ int currentx=info->postlist[j+2];
+ for(k=0;k<j+2;k++){
+ int x=info->postlist[k];
+ if(x>lx && x<currentx){
+ lo=k;
+ lx=x;
+ }
+ if(x<hx && x>currentx){
+ hi=k;
+ hx=x;
+ }
+ }
+ info->loneighbor[j]=lo;
+ info->hineighbor[j]=hi;
+ }
+
+ return(info);
+
+ err_out:
+ floor1_free_info(info);
+ return(NULL);
+}
+
+static int render_point(int x0,int x1,int y0,int y1,int x){
+ y0&=0x7fff; /* mask off flag */
+ y1&=0x7fff;
+
+ {
+ int dy=y1-y0;
+ int adx=x1-x0;
+ int ady=abs(dy);
+ int err=ady*(x-x0);
+
+ int off=err/adx;
+ if(dy<0)return(y0-off);
+ return(y0+off);
+ }
+}
+
+static void render_line(int n,int x0,int x1,int y0,int y1,ogg_int32_t *d){
+ int dy=y1-y0;
+ int adx=x1-x0;
+ int ady=abs(dy);
+ int base=dy/adx;
+ int sy=(dy<0?base-1:base+1);
+ int x=x0;
+ int y=y0;
+ int err=0;
+
+ if(n>x1)n=x1;
+ ady-=abs(base*adx);
+
+ if(x<n)
+ d[x]= MULT31_SHIFT15(d[x],FLOOR_fromdB_LOOKUP[y]);
+
+ while(++x<n){
+ err=err+ady;
+ if(err>=adx){
+ err-=adx;
+ y+=sy;
+ }else{
+ y+=base;
+ }
+ d[x]= MULT31_SHIFT15(d[x],FLOOR_fromdB_LOOKUP[y]);
+ }
+}
+
+int floor1_memosize(vorbis_info_floor *i){
+ vorbis_info_floor1 *info=(vorbis_info_floor1 *)i;
+ return info->posts;
+}
+
+static int quant_look[4]={256,128,86,64};
+
+ogg_int32_t *floor1_inverse1(vorbis_dsp_state *vd,vorbis_info_floor *in,
+ ogg_int32_t *fit_value){
+ vorbis_info_floor1 *info=(vorbis_info_floor1 *)in;
+ codec_setup_info *ci=(codec_setup_info *)vd->vi->codec_setup;
+
+ int i,j,k;
+ codebook *books=ci->book_param;
+ int quant_q=quant_look[info->mult-1];
+
+ /* unpack wrapped/predicted values from stream */
+ if(oggpack_read(&vd->opb,1)==1){
+ fit_value[0]=oggpack_read(&vd->opb,ilog(quant_q-1));
+ fit_value[1]=oggpack_read(&vd->opb,ilog(quant_q-1));
+
+ /* partition by partition */
+ /* partition by partition */
+ for(i=0,j=2;i<info->partitions;i++){
+ int classv=info->partitionclass[i];
+ int cdim=info->class[classv].class_dim;
+ int csubbits=info->class[classv].class_subs;
+ int csub=1<<csubbits;
+ int cval=0;
+
+ /* decode the partition's first stage cascade value */
+ if(csubbits){
+ cval=vorbis_book_decode(books+info->class[classv].class_book,&vd->opb);
+
+ if(cval==-1)goto eop;
+ }
+
+ for(k=0;k<cdim;k++){
+ int book=info->class[classv].class_subbook[cval&(csub-1)];
+ cval>>=csubbits;
+ if(book!=0xff){
+ if((fit_value[j+k]=vorbis_book_decode(books+book,&vd->opb))==-1)
+ goto eop;
+ }else{
+ fit_value[j+k]=0;
+ }
+ }
+ j+=cdim;
+ }
+
+ /* unwrap positive values and reconsitute via linear interpolation */
+ for(i=2;i<info->posts;i++){
+ int predicted=render_point(info->postlist[info->loneighbor[i-2]],
+ info->postlist[info->hineighbor[i-2]],
+ fit_value[info->loneighbor[i-2]],
+ fit_value[info->hineighbor[i-2]],
+ info->postlist[i]);
+ int hiroom=quant_q-predicted;
+ int loroom=predicted;
+ int room=(hiroom<loroom?hiroom:loroom)<<1;
+ int val=fit_value[i];
+
+ if(val){
+ if(val>=room){
+ if(hiroom>loroom){
+ val = val-loroom;
+ }else{
+ val = -1-(val-hiroom);
+ }
+ }else{
+ if(val&1){
+ val= -((val+1)>>1);
+ }else{
+ val>>=1;
+ }
+ }
+
+ fit_value[i]=val+predicted;
+ fit_value[info->loneighbor[i-2]]&=0x7fff;
+ fit_value[info->hineighbor[i-2]]&=0x7fff;
+
+ }else{
+ fit_value[i]=predicted|0x8000;
+ }
+
+ }
+
+ return(fit_value);
+ }
+ eop:
+ return(NULL);
+}
+
+int floor1_inverse2(vorbis_dsp_state *vd,vorbis_info_floor *in,
+ ogg_int32_t *fit_value,ogg_int32_t *out){
+ vorbis_info_floor1 *info=(vorbis_info_floor1 *)in;
+
+ codec_setup_info *ci=(codec_setup_info *)vd->vi->codec_setup;
+ int n=ci->blocksizes[vd->W]/2;
+ int j;
+
+ if(fit_value){
+ /* render the lines */
+ int hx=0;
+ int lx=0;
+ int ly=fit_value[0]*info->mult;
+ for(j=1;j<info->posts;j++){
+ int current=info->forward_index[j];
+ int hy=fit_value[current]&0x7fff;
+ if(hy==fit_value[current]){
+
+ hy*=info->mult;
+ hx=info->postlist[current];
+
+ render_line(n,lx,hx,ly,hy,out);
+
+ lx=hx;
+ ly=hy;
+ }
+ }
+ for(j=hx;j<n;j++)out[j]*=ly; /* be certain */
+ return(1);
+ }
+ memset(out,0,sizeof(*out)*n);
+ return(0);
+}
diff --git a/MakefileBasedBuild/app/v_floor_lookup.c b/MakefileBasedBuild/app/v_floor_lookup.c
new file mode 100644
index 0000000..f88d096
--- /dev/null
+++ b/MakefileBasedBuild/app/v_floor_lookup.c
@@ -0,0 +1,93 @@
+#define ADK_INTERNAL
+/********************************************************************
+ * *
+ * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
+ * *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
+ * *
+ * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 *
+ * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
+ * *
+ ********************************************************************
+
+ function: floor dB lookup
+
+ ********************************************************************/
+
+#include "v_os.h"
+
+#ifdef _LOW_ACCURACY_
+# define XdB(n) ((((n)>>8)+1)>>1)
+#else
+# define XdB(n) (n)
+#endif
+
+const ogg_int32_t FLOOR_fromdB_LOOKUP[256]={
+ XdB(0x000000e5), XdB(0x000000f4), XdB(0x00000103), XdB(0x00000114),
+ XdB(0x00000126), XdB(0x00000139), XdB(0x0000014e), XdB(0x00000163),
+ XdB(0x0000017a), XdB(0x00000193), XdB(0x000001ad), XdB(0x000001c9),
+ XdB(0x000001e7), XdB(0x00000206), XdB(0x00000228), XdB(0x0000024c),
+ XdB(0x00000272), XdB(0x0000029b), XdB(0x000002c6), XdB(0x000002f4),
+ XdB(0x00000326), XdB(0x0000035a), XdB(0x00000392), XdB(0x000003cd),
+ XdB(0x0000040c), XdB(0x00000450), XdB(0x00000497), XdB(0x000004e4),
+ XdB(0x00000535), XdB(0x0000058c), XdB(0x000005e8), XdB(0x0000064a),
+ XdB(0x000006b3), XdB(0x00000722), XdB(0x00000799), XdB(0x00000818),
+ XdB(0x0000089e), XdB(0x0000092e), XdB(0x000009c6), XdB(0x00000a69),
+ XdB(0x00000b16), XdB(0x00000bcf), XdB(0x00000c93), XdB(0x00000d64),
+ XdB(0x00000e43), XdB(0x00000f30), XdB(0x0000102d), XdB(0x0000113a),
+ XdB(0x00001258), XdB(0x0000138a), XdB(0x000014cf), XdB(0x00001629),
+ XdB(0x0000179a), XdB(0x00001922), XdB(0x00001ac4), XdB(0x00001c82),
+ XdB(0x00001e5c), XdB(0x00002055), XdB(0x0000226f), XdB(0x000024ac),
+ XdB(0x0000270e), XdB(0x00002997), XdB(0x00002c4b), XdB(0x00002f2c),
+ XdB(0x0000323d), XdB(0x00003581), XdB(0x000038fb), XdB(0x00003caf),
+ XdB(0x000040a0), XdB(0x000044d3), XdB(0x0000494c), XdB(0x00004e10),
+ XdB(0x00005323), XdB(0x0000588a), XdB(0x00005e4b), XdB(0x0000646b),
+ XdB(0x00006af2), XdB(0x000071e5), XdB(0x0000794c), XdB(0x0000812e),
+ XdB(0x00008993), XdB(0x00009283), XdB(0x00009c09), XdB(0x0000a62d),
+ XdB(0x0000b0f9), XdB(0x0000bc79), XdB(0x0000c8b9), XdB(0x0000d5c4),
+ XdB(0x0000e3a9), XdB(0x0000f274), XdB(0x00010235), XdB(0x000112fd),
+ XdB(0x000124dc), XdB(0x000137e4), XdB(0x00014c29), XdB(0x000161bf),
+ XdB(0x000178bc), XdB(0x00019137), XdB(0x0001ab4a), XdB(0x0001c70e),
+ XdB(0x0001e4a1), XdB(0x0002041f), XdB(0x000225aa), XdB(0x00024962),
+ XdB(0x00026f6d), XdB(0x000297f0), XdB(0x0002c316), XdB(0x0002f109),
+ XdB(0x000321f9), XdB(0x00035616), XdB(0x00038d97), XdB(0x0003c8b4),
+ XdB(0x000407a7), XdB(0x00044ab2), XdB(0x00049218), XdB(0x0004de23),
+ XdB(0x00052f1e), XdB(0x0005855c), XdB(0x0005e135), XdB(0x00064306),
+ XdB(0x0006ab33), XdB(0x00071a24), XdB(0x0007904b), XdB(0x00080e20),
+ XdB(0x00089422), XdB(0x000922da), XdB(0x0009bad8), XdB(0x000a5cb6),
+ XdB(0x000b091a), XdB(0x000bc0b1), XdB(0x000c8436), XdB(0x000d5471),
+ XdB(0x000e3233), XdB(0x000f1e5f), XdB(0x001019e4), XdB(0x001125c1),
+ XdB(0x00124306), XdB(0x001372d5), XdB(0x0014b663), XdB(0x00160ef7),
+ XdB(0x00177df0), XdB(0x001904c1), XdB(0x001aa4f9), XdB(0x001c603d),
+ XdB(0x001e384f), XdB(0x00202f0f), XdB(0x0022467a), XdB(0x002480b1),
+ XdB(0x0026dff7), XdB(0x002966b3), XdB(0x002c1776), XdB(0x002ef4fc),
+ XdB(0x0032022d), XdB(0x00354222), XdB(0x0038b828), XdB(0x003c67c2),
+ XdB(0x004054ae), XdB(0x004482e8), XdB(0x0048f6af), XdB(0x004db488),
+ XdB(0x0052c142), XdB(0x005821ff), XdB(0x005ddc33), XdB(0x0063f5b0),
+ XdB(0x006a74a7), XdB(0x00715faf), XdB(0x0078bdce), XdB(0x0080967f),
+ XdB(0x0088f1ba), XdB(0x0091d7f9), XdB(0x009b5247), XdB(0x00a56a41),
+ XdB(0x00b02a27), XdB(0x00bb9ce2), XdB(0x00c7ce12), XdB(0x00d4ca17),
+ XdB(0x00e29e20), XdB(0x00f15835), XdB(0x0101074b), XdB(0x0111bb4e),
+ XdB(0x01238531), XdB(0x01367704), XdB(0x014aa402), XdB(0x016020a7),
+ XdB(0x017702c3), XdB(0x018f6190), XdB(0x01a955cb), XdB(0x01c4f9cf),
+ XdB(0x01e269a8), XdB(0x0201c33b), XdB(0x0223265a), XdB(0x0246b4ea),
+ XdB(0x026c9302), XdB(0x0294e716), XdB(0x02bfda13), XdB(0x02ed9793),
+ XdB(0x031e4e09), XdB(0x03522ee4), XdB(0x03896ed0), XdB(0x03c445e2),
+ XdB(0x0402efd6), XdB(0x0445ac4b), XdB(0x048cbefc), XdB(0x04d87013),
+ XdB(0x05290c67), XdB(0x057ee5ca), XdB(0x05da5364), XdB(0x063bb204),
+ XdB(0x06a36485), XdB(0x0711d42b), XdB(0x0787710e), XdB(0x0804b299),
+ XdB(0x088a17ef), XdB(0x0918287e), XdB(0x09af747c), XdB(0x0a50957e),
+ XdB(0x0afc2f19), XdB(0x0bb2ef7f), XdB(0x0c759034), XdB(0x0d44d6ca),
+ XdB(0x0e2195bc), XdB(0x0f0cad0d), XdB(0x10070b62), XdB(0x1111aeea),
+ XdB(0x122da66c), XdB(0x135c120f), XdB(0x149e24d9), XdB(0x15f525b1),
+ XdB(0x176270e3), XdB(0x18e7794b), XdB(0x1a85c9ae), XdB(0x1c3f06d1),
+ XdB(0x1e14f07d), XdB(0x200963d7), XdB(0x221e5ccd), XdB(0x2455f870),
+ XdB(0x26b2770b), XdB(0x29363e2b), XdB(0x2be3db5c), XdB(0x2ebe06b6),
+ XdB(0x31c7a55b), XdB(0x3503ccd4), XdB(0x3875c5aa), XdB(0x3c210f44),
+ XdB(0x4009632b), XdB(0x4432b8cf), XdB(0x48a149bc), XdB(0x4d59959e),
+ XdB(0x52606733), XdB(0x57bad899), XdB(0x5d6e593a), XdB(0x6380b298),
+ XdB(0x69f80e9a), XdB(0x70dafda8), XdB(0x78307d76), XdB(0x7fffffff),
+};
+
diff --git a/MakefileBasedBuild/app/v_framing.c b/MakefileBasedBuild/app/v_framing.c
new file mode 100644
index 0000000..58fdbf7
--- /dev/null
+++ b/MakefileBasedBuild/app/v_framing.c
@@ -0,0 +1,1118 @@
+#define ADK_INTERNAL
+/********************************************************************
+ * *
+ * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
+ * *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
+ * *
+ * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 *
+ * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
+ * *
+ ********************************************************************
+
+ function: decode Ogg streams back into raw packets
+
+ note: The CRC code is directly derived from public domain code by
+ Ross Williams (ross@guest.adelaide.edu.au). See docs/framing.html
+ for details.
+
+ ********************************************************************/
+
+#include <stdlib.h>
+#include <string.h>
+#include "v_ogg.h"
+#include "v_misc.h"
+
+
+/* A complete description of Ogg framing exists in docs/framing.html */
+
+/* basic, centralized Ogg memory management based on linked lists of
+ references to refcounted memory buffers. References and buffers
+ are both recycled. Buffers are passed around and consumed in
+ reference form. */
+
+static ogg_buffer_state *ogg_buffer_create(void){
+ ogg_buffer_state *bs=_ogg_calloc(1,sizeof(*bs));
+ return bs;
+}
+
+/* destruction is 'lazy'; there may be memory references outstanding,
+ and yanking the buffer state out from underneath would be
+ antisocial. Dealloc what is currently unused and have
+ _release_one watch for the stragglers to come in. When they do,
+ finish destruction. */
+
+/* call the helper while holding lock */
+static void _ogg_buffer_destroy(ogg_buffer_state *bs){
+ ogg_buffer *bt;
+ ogg_reference *rt;
+
+ if(bs->shutdown){
+
+ bt=bs->unused_buffers;
+ rt=bs->unused_references;
+
+ while(bt){
+ ogg_buffer *b=bt;
+ bt=b->ptr.next;
+ if(b->data)_ogg_free(b->data);
+ _ogg_free(b);
+ }
+ bs->unused_buffers=0;
+ while(rt){
+ ogg_reference *r=rt;
+ rt=r->next;
+ _ogg_free(r);
+ }
+ bs->unused_references=0;
+
+ if(!bs->outstanding)
+ _ogg_free(bs);
+
+ }
+}
+
+static void ogg_buffer_destroy(ogg_buffer_state *bs){
+ bs->shutdown=1;
+ _ogg_buffer_destroy(bs);
+}
+
+static ogg_buffer *_fetch_buffer(ogg_buffer_state *bs,long bytes){
+ ogg_buffer *ob;
+ bs->outstanding++;
+
+ /* do we have an unused buffer sitting in the pool? */
+ if(bs->unused_buffers){
+ ob=bs->unused_buffers;
+ bs->unused_buffers=ob->ptr.next;
+
+ /* if the unused buffer is too small, grow it */
+ if(ob->size<bytes){
+ ob->data=_ogg_realloc(ob->data,bytes);
+ ob->size=bytes;
+ }
+ }else{
+ /* allocate a new buffer */
+ ob=_ogg_malloc(sizeof(*ob));
+ ob->data=_ogg_malloc(bytes<16?16:bytes);
+ ob->size=bytes;
+ }
+
+ ob->refcount=1;
+ ob->ptr.owner=bs;
+ return ob;
+}
+
+static ogg_reference *_fetch_ref(ogg_buffer_state *bs){
+ ogg_reference *or;
+ bs->outstanding++;
+
+ /* do we have an unused reference sitting in the pool? */
+ if(bs->unused_references){
+ or=bs->unused_references;
+ bs->unused_references=or->next;
+ }else{
+ /* allocate a new reference */
+ or=_ogg_malloc(sizeof(*or));
+ }
+
+ or->begin=0;
+ or->length=0;
+ or->next=0;
+ return or;
+}
+
+/* fetch a reference pointing to a fresh, initially continguous buffer
+ of at least [bytes] length */
+static ogg_reference *ogg_buffer_alloc(ogg_buffer_state *bs,long bytes){
+ ogg_buffer *ob=_fetch_buffer(bs,bytes);
+ ogg_reference *or=_fetch_ref(bs);
+ or->buffer=ob;
+ return or;
+}
+
+/* enlarge the data buffer in the current link */
+static void ogg_buffer_realloc(ogg_reference *or,long bytes){
+ ogg_buffer *ob=or->buffer;
+
+ /* if the unused buffer is too small, grow it */
+ if(ob->size<bytes){
+ ob->data=_ogg_realloc(ob->data,bytes);
+ ob->size=bytes;
+ }
+}
+
+static void _ogg_buffer_mark_one(ogg_reference *or){
+ or->buffer->refcount++;
+}
+
+/* increase the refcount of the buffers to which the reference points */
+static void ogg_buffer_mark(ogg_reference *or){
+ while(or){
+ _ogg_buffer_mark_one(or);
+ or=or->next;
+ }
+}
+
+/* duplicate a reference (pointing to the same actual buffer memory)
+ and increment buffer refcount. If the desired segment is zero
+ length, a zero length ref is returned. */
+static ogg_reference *ogg_buffer_sub(ogg_reference *or,long length){
+ ogg_reference *ret=0,*head=0;
+
+ /* duplicate the reference chain; increment refcounts */
+ while(or && length){
+ ogg_reference *temp=_fetch_ref(or->buffer->ptr.owner);
+ if(head)
+ head->next=temp;
+ else
+ ret=temp;
+ head=temp;
+ head->buffer=or->buffer;
+ head->begin=or->begin;
+ head->length=length;
+ if(head->length>or->length)
+ head->length=or->length;
+
+ length-=head->length;
+ or=or->next;
+ }
+
+ ogg_buffer_mark(ret);
+ return ret;
+}
+
+ogg_reference *ogg_buffer_dup(ogg_reference *or){
+ ogg_reference *ret=0,*head=0;
+ /* duplicate the reference chain; increment refcounts */
+ while(or){
+ ogg_reference *temp=_fetch_ref(or->buffer->ptr.owner);
+ if(head)
+ head->next=temp;
+ else
+ ret=temp;
+ head=temp;
+ head->buffer=or->buffer;
+ head->begin=or->begin;
+ head->length=or->length;
+ or=or->next;
+ }
+
+ ogg_buffer_mark(ret);
+ return ret;
+}
+
+/* split a reference into two references; 'return' is a reference to
+ the buffer preceeding pos and 'head'/'tail' are the buffer past the
+ split. If pos is at or past the end of the passed in segment,
+ 'head/tail' are NULL */
+static ogg_reference *ogg_buffer_split(ogg_reference **tail,
+ ogg_reference **head,long pos){
+
+ /* walk past any preceeding fragments to one of:
+ a) the exact boundary that seps two fragments
+ b) the fragment that needs split somewhere in the middle */
+ ogg_reference *ret=*tail;
+ ogg_reference *or=*tail;
+
+ while(or && pos>or->length){
+ pos-=or->length;
+ or=or->next;
+ }
+
+ if(!or || pos==0){
+
+ return 0;
+
+ }else{
+
+ if(pos>=or->length){
+ /* exact split, or off the end? */
+ if(or->next){
+
+ /* a split */
+ *tail=or->next;
+ or->next=0;
+
+ }else{
+
+ /* off or at the end */
+ *tail=*head=0;
+
+ }
+ }else{
+
+ /* split within a fragment */
+ long lengthA=pos;
+ long beginB=or->begin+pos;
+ long lengthB=or->length-pos;
+
+ /* make a new reference to tail the second piece */
+ *tail=_fetch_ref(or->buffer->ptr.owner);
+
+ (*tail)->buffer=or->buffer;
+ (*tail)->begin=beginB;
+ (*tail)->length=lengthB;
+ (*tail)->next=or->next;
+ _ogg_buffer_mark_one(*tail);
+ if(head && or==*head)*head=*tail;
+
+ /* update the first piece */
+ or->next=0;
+ or->length=lengthA;
+
+ }
+ }
+ return ret;
+}
+
+static void ogg_buffer_release_one(ogg_reference *or){
+ ogg_buffer *ob=or->buffer;
+ ogg_buffer_state *bs=ob->ptr.owner;
+
+ ob->refcount--;
+ if(ob->refcount==0){
+ bs->outstanding--; /* for the returned buffer */
+ ob->ptr.next=bs->unused_buffers;
+ bs->unused_buffers=ob;
+ }
+
+ bs->outstanding--; /* for the returned reference */
+ or->next=bs->unused_references;
+ bs->unused_references=or;
+
+ _ogg_buffer_destroy(bs); /* lazy cleanup (if needed) */
+
+}
+
+/* release the references, decrease the refcounts of buffers to which
+ they point, release any buffers with a refcount that drops to zero */
+static void ogg_buffer_release(ogg_reference *or){
+ while(or){
+ ogg_reference *next=or->next;
+ ogg_buffer_release_one(or);
+ or=next;
+ }
+}
+
+static ogg_reference *ogg_buffer_pretruncate(ogg_reference *or,long pos){
+ /* release preceeding fragments we don't want */
+ while(or && pos>=or->length){
+ ogg_reference *next=or->next;
+ pos-=or->length;
+ ogg_buffer_release_one(or);
+ or=next;
+ }
+ if (or) {
+ or->begin+=pos;
+ or->length-=pos;
+ }
+ return or;
+}
+
+static ogg_reference *ogg_buffer_walk(ogg_reference *or){
+ if(!or)return NULL;
+ while(or->next){
+ or=or->next;
+ }
+ return(or);
+}
+
+/* *head is appended to the front end (head) of *tail; both continue to
+ be valid pointers, with *tail at the tail and *head at the head */
+static ogg_reference *ogg_buffer_cat(ogg_reference *tail, ogg_reference *head){
+ if(!tail)return head;
+
+ while(tail->next){
+ tail=tail->next;
+ }
+ tail->next=head;
+ return ogg_buffer_walk(head);
+}
+
+static void _positionB(oggbyte_buffer *b,int pos){
+ if(pos<b->pos){
+ /* start at beginning, scan forward */
+ b->ref=b->baseref;
+ b->pos=0;
+ b->end=b->pos+b->ref->length;
+ b->ptr=b->ref->buffer->data+b->ref->begin;
+ }
+}
+
+static void _positionF(oggbyte_buffer *b,int pos){
+ /* scan forward for position */
+ while(pos>=b->end){
+ /* just seek forward */
+ b->pos+=b->ref->length;
+ b->ref=b->ref->next;
+ b->end=b->ref->length+b->pos;
+ b->ptr=b->ref->buffer->data+b->ref->begin;
+ }
+}
+
+static int oggbyte_init(oggbyte_buffer *b,ogg_reference *or){
+ memset(b,0,sizeof(*b));
+ if(or){
+ b->ref=b->baseref=or;
+ b->pos=0;
+ b->end=b->ref->length;
+ b->ptr=b->ref->buffer->data+b->ref->begin;
+ return 0;
+ }else
+ return -1;
+}
+
+static void oggbyte_set4(oggbyte_buffer *b,ogg_uint32_t val,int pos){
+ int i;
+ _positionB(b,pos);
+ for(i=0;i<4;i++){
+ _positionF(b,pos);
+ b->ptr[pos-b->pos]=val;
+ val>>=8;
+ ++pos;
+ }
+}
+
+static unsigned char oggbyte_read1(oggbyte_buffer *b,int pos){
+ _positionB(b,pos);
+ _positionF(b,pos);
+ return b->ptr[pos-b->pos];
+}
+
+static ogg_uint32_t oggbyte_read4(oggbyte_buffer *b,int pos){
+ ogg_uint32_t ret;
+ _positionB(b,pos);
+ _positionF(b,pos);
+ ret=b->ptr[pos-b->pos];
+ _positionF(b,++pos);
+ ret|=b->ptr[pos-b->pos]<<8;
+ _positionF(b,++pos);
+ ret|=b->ptr[pos-b->pos]<<16;
+ _positionF(b,++pos);
+ ret|=b->ptr[pos-b->pos]<<24;
+ return ret;
+}
+
+static ogg_int64_t oggbyte_read8(oggbyte_buffer *b,int pos){
+ ogg_int64_t ret;
+ unsigned char t[7];
+ int i;
+ _positionB(b,pos);
+ for(i=0;i<7;i++){
+ _positionF(b,pos);
+ t[i]=b->ptr[pos++ -b->pos];
+ }
+
+ _positionF(b,pos);
+ ret=b->ptr[pos-b->pos];
+
+ for(i=6;i>=0;--i)
+ ret= ret<<8 | t[i];
+
+ return ret;
+}
+
+/* Now we get to the actual framing code */
+
+int ogg_page_version(ogg_page *og){
+ oggbyte_buffer ob;
+ if(oggbyte_init(&ob,og->header))return -1;
+ return oggbyte_read1(&ob,4);
+}
+
+int ogg_page_continued(ogg_page *og){
+ oggbyte_buffer ob;
+ if(oggbyte_init(&ob,og->header))return -1;
+ return oggbyte_read1(&ob,5)&0x01;
+}
+
+int ogg_page_bos(ogg_page *og){
+ oggbyte_buffer ob;
+ if(oggbyte_init(&ob,og->header))return -1;
+ return oggbyte_read1(&ob,5)&0x02;
+}
+
+int ogg_page_eos(ogg_page *og){
+ oggbyte_buffer ob;
+ if(oggbyte_init(&ob,og->header))return -1;
+ return oggbyte_read1(&ob,5)&0x04;
+}
+
+ogg_int64_t ogg_page_granulepos(ogg_page *og){
+ oggbyte_buffer ob;
+ if(oggbyte_init(&ob,og->header))return -1;
+ return oggbyte_read8(&ob,6);
+}
+
+ogg_uint32_t ogg_page_serialno(ogg_page *og){
+ oggbyte_buffer ob;
+ if(oggbyte_init(&ob,og->header)) return 0xffffffffUL;
+ return oggbyte_read4(&ob,14);
+}
+
+ogg_uint32_t ogg_page_pageno(ogg_page *og){
+ oggbyte_buffer ob;
+ if(oggbyte_init(&ob,og->header))return 0xffffffffUL;
+ return oggbyte_read4(&ob,18);
+}
+
+/* returns the number of packets that are completed on this page (if
+ the leading packet is begun on a previous page, but ends on this
+ page, it's counted */
+
+/* NOTE:
+If a page consists of a packet begun on a previous page, and a new
+packet begun (but not completed) on this page, the return will be:
+ ogg_page_packets(page) ==1,
+ ogg_page_continued(page) !=0
+
+If a page happens to be a single packet that was begun on a
+previous page, and spans to the next page (in the case of a three or
+more page packet), the return will be:
+ ogg_page_packets(page) ==0,
+ ogg_page_continued(page) !=0
+*/
+
+int ogg_page_packets(ogg_page *og){
+ int i;
+ int n;
+ int count=0;
+ oggbyte_buffer ob;
+ oggbyte_init(&ob,og->header);
+
+ n=oggbyte_read1(&ob,26);
+ for(i=0;i<n;i++)
+ if(oggbyte_read1(&ob,27+i)<255)count++;
+ return(count);
+}
+
+/* Static CRC calculation table. See older code in CVS for dead
+ run-time initialization code. */
+
+static ogg_uint32_t crc_lookup[256]={
+ 0x00000000,0x04c11db7,0x09823b6e,0x0d4326d9,
+ 0x130476dc,0x17c56b6b,0x1a864db2,0x1e475005,
+ 0x2608edb8,0x22c9f00f,0x2f8ad6d6,0x2b4bcb61,
+ 0x350c9b64,0x31cd86d3,0x3c8ea00a,0x384fbdbd,
+ 0x4c11db70,0x48d0c6c7,0x4593e01e,0x4152fda9,
+ 0x5f15adac,0x5bd4b01b,0x569796c2,0x52568b75,
+ 0x6a1936c8,0x6ed82b7f,0x639b0da6,0x675a1011,
+ 0x791d4014,0x7ddc5da3,0x709f7b7a,0x745e66cd,
+ 0x9823b6e0,0x9ce2ab57,0x91a18d8e,0x95609039,
+ 0x8b27c03c,0x8fe6dd8b,0x82a5fb52,0x8664e6e5,
+ 0xbe2b5b58,0xbaea46ef,0xb7a96036,0xb3687d81,
+ 0xad2f2d84,0xa9ee3033,0xa4ad16ea,0xa06c0b5d,
+ 0xd4326d90,0xd0f37027,0xddb056fe,0xd9714b49,
+ 0xc7361b4c,0xc3f706fb,0xceb42022,0xca753d95,
+ 0xf23a8028,0xf6fb9d9f,0xfbb8bb46,0xff79a6f1,
+ 0xe13ef6f4,0xe5ffeb43,0xe8bccd9a,0xec7dd02d,
+ 0x34867077,0x30476dc0,0x3d044b19,0x39c556ae,
+ 0x278206ab,0x23431b1c,0x2e003dc5,0x2ac12072,
+ 0x128e9dcf,0x164f8078,0x1b0ca6a1,0x1fcdbb16,
+ 0x018aeb13,0x054bf6a4,0x0808d07d,0x0cc9cdca,
+ 0x7897ab07,0x7c56b6b0,0x71159069,0x75d48dde,
+ 0x6b93dddb,0x6f52c06c,0x6211e6b5,0x66d0fb02,
+ 0x5e9f46bf,0x5a5e5b08,0x571d7dd1,0x53dc6066,
+ 0x4d9b3063,0x495a2dd4,0x44190b0d,0x40d816ba,
+ 0xaca5c697,0xa864db20,0xa527fdf9,0xa1e6e04e,
+ 0xbfa1b04b,0xbb60adfc,0xb6238b25,0xb2e29692,
+ 0x8aad2b2f,0x8e6c3698,0x832f1041,0x87ee0df6,
+ 0x99a95df3,0x9d684044,0x902b669d,0x94ea7b2a,
+ 0xe0b41de7,0xe4750050,0xe9362689,0xedf73b3e,
+ 0xf3b06b3b,0xf771768c,0xfa325055,0xfef34de2,
+ 0xc6bcf05f,0xc27dede8,0xcf3ecb31,0xcbffd686,
+ 0xd5b88683,0xd1799b34,0xdc3abded,0xd8fba05a,
+ 0x690ce0ee,0x6dcdfd59,0x608edb80,0x644fc637,
+ 0x7a089632,0x7ec98b85,0x738aad5c,0x774bb0eb,
+ 0x4f040d56,0x4bc510e1,0x46863638,0x42472b8f,
+ 0x5c007b8a,0x58c1663d,0x558240e4,0x51435d53,
+ 0x251d3b9e,0x21dc2629,0x2c9f00f0,0x285e1d47,
+ 0x36194d42,0x32d850f5,0x3f9b762c,0x3b5a6b9b,
+ 0x0315d626,0x07d4cb91,0x0a97ed48,0x0e56f0ff,
+ 0x1011a0fa,0x14d0bd4d,0x19939b94,0x1d528623,
+ 0xf12f560e,0xf5ee4bb9,0xf8ad6d60,0xfc6c70d7,
+ 0xe22b20d2,0xe6ea3d65,0xeba91bbc,0xef68060b,
+ 0xd727bbb6,0xd3e6a601,0xdea580d8,0xda649d6f,
+ 0xc423cd6a,0xc0e2d0dd,0xcda1f604,0xc960ebb3,
+ 0xbd3e8d7e,0xb9ff90c9,0xb4bcb610,0xb07daba7,
+ 0xae3afba2,0xaafbe615,0xa7b8c0cc,0xa379dd7b,
+ 0x9b3660c6,0x9ff77d71,0x92b45ba8,0x9675461f,
+ 0x8832161a,0x8cf30bad,0x81b02d74,0x857130c3,
+ 0x5d8a9099,0x594b8d2e,0x5408abf7,0x50c9b640,
+ 0x4e8ee645,0x4a4ffbf2,0x470cdd2b,0x43cdc09c,
+ 0x7b827d21,0x7f436096,0x7200464f,0x76c15bf8,
+ 0x68860bfd,0x6c47164a,0x61043093,0x65c52d24,
+ 0x119b4be9,0x155a565e,0x18197087,0x1cd86d30,
+ 0x029f3d35,0x065e2082,0x0b1d065b,0x0fdc1bec,
+ 0x3793a651,0x3352bbe6,0x3e119d3f,0x3ad08088,
+ 0x2497d08d,0x2056cd3a,0x2d15ebe3,0x29d4f654,
+ 0xc5a92679,0xc1683bce,0xcc2b1d17,0xc8ea00a0,
+ 0xd6ad50a5,0xd26c4d12,0xdf2f6bcb,0xdbee767c,
+ 0xe3a1cbc1,0xe760d676,0xea23f0af,0xeee2ed18,
+ 0xf0a5bd1d,0xf464a0aa,0xf9278673,0xfde69bc4,
+ 0x89b8fd09,0x8d79e0be,0x803ac667,0x84fbdbd0,
+ 0x9abc8bd5,0x9e7d9662,0x933eb0bb,0x97ffad0c,
+ 0xafb010b1,0xab710d06,0xa6322bdf,0xa2f33668,
+ 0xbcb4666d,0xb8757bda,0xb5365d03,0xb1f740b4};
+
+ogg_sync_state *ogg_sync_create(void){
+ ogg_sync_state *oy=_ogg_calloc(1,sizeof(*oy));
+ memset(oy,0,sizeof(*oy));
+ oy->bufferpool=ogg_buffer_create();
+ return oy;
+}
+
+int ogg_sync_destroy(ogg_sync_state *oy){
+ if(oy){
+ ogg_sync_reset(oy);
+ ogg_buffer_destroy(oy->bufferpool);
+ memset(oy,0,sizeof(*oy));
+ _ogg_free(oy);
+ }
+ return OGG_SUCCESS;
+}
+
+unsigned char *ogg_sync_bufferin(ogg_sync_state *oy, long bytes){
+
+ /* [allocate and] expose a buffer for data submission.
+
+ If there is no head fragment
+ allocate one and expose it
+ else
+ if the current head fragment has sufficient unused space
+ expose it
+ else
+ if the current head fragment is unused
+ resize and expose it
+ else
+ allocate new fragment and expose it
+ */
+
+ /* base case; fifo uninitialized */
+ if(!oy->fifo_head){
+ oy->fifo_head=oy->fifo_tail=ogg_buffer_alloc(oy->bufferpool,bytes);
+ return oy->fifo_head->buffer->data;
+ }
+
+ /* space left in current fragment case */
+ if(oy->fifo_head->buffer->size-
+ oy->fifo_head->length-
+ oy->fifo_head->begin >= bytes)
+ return oy->fifo_head->buffer->data+
+ oy->fifo_head->length+oy->fifo_head->begin;
+
+ /* current fragment is unused, but too small */
+ if(!oy->fifo_head->length){
+ ogg_buffer_realloc(oy->fifo_head,bytes);
+ return oy->fifo_head->buffer->data+oy->fifo_head->begin;
+ }
+
+ /* current fragment used/full; get new fragment */
+ {
+ ogg_reference *new=ogg_buffer_alloc(oy->bufferpool,bytes);
+ oy->fifo_head->next=new;
+ oy->fifo_head=new;
+ }
+ return oy->fifo_head->buffer->data;
+}
+
+int ogg_sync_wrote(ogg_sync_state *oy, long bytes){
+ if(!oy->fifo_head)return OGG_EINVAL;
+ if(oy->fifo_head->buffer->size-oy->fifo_head->length-oy->fifo_head->begin <
+ bytes)return OGG_EINVAL;
+ oy->fifo_head->length+=bytes;
+ oy->fifo_fill+=bytes;
+ return OGG_SUCCESS;
+}
+
+static ogg_uint32_t _checksum(ogg_reference *or, int bytes){
+ ogg_uint32_t crc_reg=0;
+ int j,post;
+
+ while(or){
+ unsigned char *data=or->buffer->data+or->begin;
+ post=(bytes<or->length?bytes:or->length);
+ for(j=0;j<post;++j)
+ crc_reg=(crc_reg<<8)^crc_lookup[((crc_reg >> 24)&0xff)^data[j]];
+ bytes-=j;
+ or=or->next;
+ }
+
+ return crc_reg;
+}
+
+
+/* sync the stream. This is meant to be useful for finding page
+ boundaries.
+
+ return values for this:
+ -n) skipped n bytes
+ 0) page not ready; more data (no bytes skipped)
+ n) page synced at current location; page length n bytes
+
+*/
+
+long ogg_sync_pageseek(ogg_sync_state *oy,ogg_page *og){
+ oggbyte_buffer page;
+ long bytes,ret=0;
+
+ ogg_page_release(og);
+
+ bytes=oy->fifo_fill;
+ oggbyte_init(&page,oy->fifo_tail);
+
+ if(oy->headerbytes==0){
+ if(bytes<27)goto sync_out; /* not enough for even a minimal header */
+
+ /* verify capture pattern */
+ if(oggbyte_read1(&page,0)!=(int)'O' ||
+ oggbyte_read1(&page,1)!=(int)'g' ||
+ oggbyte_read1(&page,2)!=(int)'g' ||
+ oggbyte_read1(&page,3)!=(int)'S' ) goto sync_fail;
+
+ oy->headerbytes=oggbyte_read1(&page,26)+27;
+ }
+ if(bytes<oy->headerbytes)goto sync_out; /* not enough for header +
+ seg table */
+ if(oy->bodybytes==0){
+ int i;
+ /* count up body length in the segment table */
+ for(i=0;i<oy->headerbytes-27;i++)
+ oy->bodybytes+=oggbyte_read1(&page,27+i);
+ }
+
+ if(oy->bodybytes+oy->headerbytes>bytes)goto sync_out;
+
+ /* we have what appears to be a complete page; last test: verify
+ checksum */
+ {
+ ogg_uint32_t chksum=oggbyte_read4(&page,22);
+ oggbyte_set4(&page,0,22);
+
+ /* Compare checksums; memory continues to be common access */
+ if(chksum!=_checksum(oy->fifo_tail,oy->bodybytes+oy->headerbytes)){
+
+ /* D'oh. Mismatch! Corrupt page (or miscapture and not a page
+ at all). replace the computed checksum with the one actually
+ read in; remember all the memory is common access */
+
+ oggbyte_set4(&page,chksum,22);
+ goto sync_fail;
+ }
+ oggbyte_set4(&page,chksum,22);
+ }
+
+ /* We have a page. Set up page return. */
+ if(og){
+ /* set up page output */
+ og->header=ogg_buffer_split(&oy->fifo_tail,&oy->fifo_head,oy->headerbytes);
+ og->header_len=oy->headerbytes;
+ og->body=ogg_buffer_split(&oy->fifo_tail,&oy->fifo_head,oy->bodybytes);
+ og->body_len=oy->bodybytes;
+ }else{
+ /* simply advance */
+ oy->fifo_tail=
+ ogg_buffer_pretruncate(oy->fifo_tail,oy->headerbytes+oy->bodybytes);
+ if(!oy->fifo_tail)oy->fifo_head=0;
+ }
+
+ ret=oy->headerbytes+oy->bodybytes;
+ oy->unsynced=0;
+ oy->headerbytes=0;
+ oy->bodybytes=0;
+ oy->fifo_fill-=ret;
+
+ return ret;
+
+ sync_fail:
+
+ oy->headerbytes=0;
+ oy->bodybytes=0;
+ oy->fifo_tail=ogg_buffer_pretruncate(oy->fifo_tail,1);
+ ret--;
+
+ /* search forward through fragments for possible capture */
+ while(oy->fifo_tail){
+ /* invariant: fifo_cursor points to a position in fifo_tail */
+ unsigned char *now=oy->fifo_tail->buffer->data+oy->fifo_tail->begin;
+ unsigned char *next=memchr(now, 'O', oy->fifo_tail->length);
+
+ if(next){
+ /* possible capture in this segment */
+ long bytes=next-now;
+ oy->fifo_tail=ogg_buffer_pretruncate(oy->fifo_tail,bytes);
+ ret-=bytes;
+ break;
+ }else{
+ /* no capture. advance to next segment */
+ long bytes=oy->fifo_tail->length;
+ ret-=bytes;
+ oy->fifo_tail=ogg_buffer_pretruncate(oy->fifo_tail,bytes);
+ }
+ }
+ if(!oy->fifo_tail)oy->fifo_head=0;
+ oy->fifo_fill+=ret;
+
+ sync_out:
+ return ret;
+}
+
+/* sync the stream and get a page. Keep trying until we find a page.
+ Supress 'sync errors' after reporting the first.
+
+ return values:
+ OGG_HOLE) recapture (hole in data)
+ 0) need more data
+ 1) page returned
+
+ Returns pointers into buffered data; invalidated by next call to
+ _stream, _clear, _init, or _buffer */
+
+int ogg_sync_pageout(ogg_sync_state *oy, ogg_page *og){
+
+ /* all we need to do is verify a page at the head of the stream
+ buffer. If it doesn't verify, we look for the next potential
+ frame */
+
+ while(1){
+ long ret=ogg_sync_pageseek(oy,og);
+ if(ret>0){
+ /* have a page */
+ return 1;
+ }
+ if(ret==0){
+ /* need more data */
+ return 0;
+ }
+
+ /* head did not start a synced page... skipped some bytes */
+ if(!oy->unsynced){
+ oy->unsynced=1;
+ return OGG_HOLE;
+ }
+
+ /* loop. keep looking */
+
+ }
+}
+
+/* clear things to an initial state. Good to call, eg, before seeking */
+int ogg_sync_reset(ogg_sync_state *oy){
+
+ ogg_buffer_release(oy->fifo_tail);
+ oy->fifo_tail=0;
+ oy->fifo_head=0;
+ oy->fifo_fill=0;
+
+ oy->unsynced=0;
+ oy->headerbytes=0;
+ oy->bodybytes=0;
+ return OGG_SUCCESS;
+}
+
+ogg_stream_state *ogg_stream_create(int serialno){
+ ogg_stream_state *os=_ogg_calloc(1,sizeof(*os));
+ os->serialno=serialno;
+ os->pageno=-1;
+ return os;
+}
+
+int ogg_stream_destroy(ogg_stream_state *os){
+ if(os){
+ ogg_buffer_release(os->header_tail);
+ ogg_buffer_release(os->body_tail);
+ memset(os,0,sizeof(*os));
+ _ogg_free(os);
+ }
+ return OGG_SUCCESS;
+}
+
+
+#define FINFLAG 0x80000000UL
+#define FINMASK 0x7fffffffUL
+
+static void _next_lace(oggbyte_buffer *ob,ogg_stream_state *os){
+ /* search ahead one lace */
+ os->body_fill_next=0;
+ while(os->laceptr<os->lacing_fill){
+ int val=oggbyte_read1(ob,27+os->laceptr++);
+ os->body_fill_next+=val;
+ if(val<255){
+ os->body_fill_next|=FINFLAG;
+ os->clearflag=1;
+ break;
+ }
+ }
+}
+
+static void _span_queued_page(ogg_stream_state *os){
+ while( !(os->body_fill&FINFLAG) ){
+
+ if(!os->header_tail)break;
+
+ /* first flush out preceeding page header (if any). Body is
+ flushed as it's consumed, so that's not done here. */
+
+ if(os->lacing_fill>=0)
+ os->header_tail=ogg_buffer_pretruncate(os->header_tail,
+ os->lacing_fill+27);
+ os->lacing_fill=0;
+ os->laceptr=0;
+ os->clearflag=0;
+
+ if(!os->header_tail){
+ os->header_head=0;
+ break;
+ }else{
+
+ /* process/prepare next page, if any */
+
+ long pageno;
+ oggbyte_buffer ob;
+ ogg_page og; /* only for parsing header values */
+ og.header=os->header_tail; /* only for parsing header values */
+ pageno=ogg_page_pageno(&og);
+
+ oggbyte_init(&ob,os->header_tail);
+ os->lacing_fill=oggbyte_read1(&ob,26);
+
+ /* are we in sequence? */
+ if(pageno!=os->pageno){
+ if(os->pageno==-1) /* indicates seek or reset */
+ os->holeflag=1; /* set for internal use */
+ else
+ os->holeflag=2; /* set for external reporting */
+
+ os->body_tail=ogg_buffer_pretruncate(os->body_tail,
+ os->body_fill);
+ if(os->body_tail==0)os->body_head=0;
+ os->body_fill=0;
+
+ }
+
+ if(ogg_page_continued(&og)){
+ if(os->body_fill==0){
+ /* continued packet, but no preceeding data to continue */
+ /* dump the first partial packet on the page */
+ _next_lace(&ob,os);
+ os->body_tail=
+ ogg_buffer_pretruncate(os->body_tail,os->body_fill_next&FINMASK);
+ if(os->body_tail==0)os->body_head=0;
+ /* set span flag */
+ if(!os->spanflag && !os->holeflag)os->spanflag=2;
+ }
+ }else{
+ if(os->body_fill>0){
+ /* preceeding data to continue, but not a continued page */
+ /* dump body_fill */
+ os->body_tail=ogg_buffer_pretruncate(os->body_tail,
+ os->body_fill);
+ if(os->body_tail==0)os->body_head=0;
+ os->body_fill=0;
+
+ /* set espan flag */
+ if(!os->spanflag && !os->holeflag)os->spanflag=2;
+ }
+ }
+
+ if(os->laceptr<os->lacing_fill){
+ os->granulepos=ogg_page_granulepos(&og);
+
+ /* get current packet size & flag */
+ _next_lace(&ob,os);
+ os->body_fill+=os->body_fill_next; /* addition handles the flag fine;
+ unsigned on purpose */
+ /* ...and next packet size & flag */
+ _next_lace(&ob,os);
+
+ }
+
+ os->pageno=pageno+1;
+ os->e_o_s=ogg_page_eos(&og);
+ os->b_o_s=ogg_page_bos(&og);
+
+ }
+ }
+}
+
+/* add the incoming page to the stream state; we decompose the page
+ into packet segments here as well. */
+
+int ogg_stream_pagein(ogg_stream_state *os, ogg_page *og){
+
+ int serialno=ogg_page_serialno(og);
+ int version=ogg_page_version(og);
+
+ /* check the serial number */
+ if(serialno!=os->serialno){
+ ogg_page_release(og);
+ return OGG_ESERIAL;
+ }
+ if(version>0){
+ ogg_page_release(og);
+ return OGG_EVERSION;
+ }
+
+ /* add to fifos */
+ if(!os->body_tail){
+ os->body_tail=og->body;
+ os->body_head=ogg_buffer_walk(og->body);
+ }else{
+ os->body_head=ogg_buffer_cat(os->body_head,og->body);
+ }
+ if(!os->header_tail){
+ os->header_tail=og->header;
+ os->header_head=ogg_buffer_walk(og->header);
+ os->lacing_fill=-27;
+ }else{
+ os->header_head=ogg_buffer_cat(os->header_head,og->header);
+ }
+
+ memset(og,0,sizeof(*og));
+ return OGG_SUCCESS;
+}
+
+int ogg_stream_reset(ogg_stream_state *os){
+
+ ogg_buffer_release(os->header_tail);
+ ogg_buffer_release(os->body_tail);
+ os->header_tail=os->header_head=0;
+ os->body_tail=os->body_head=0;
+
+ os->e_o_s=0;
+ os->b_o_s=0;
+ os->pageno=-1;
+ os->packetno=0;
+ os->granulepos=0;
+
+ os->body_fill=0;
+ os->lacing_fill=0;
+
+ os->holeflag=0;
+ os->spanflag=0;
+ os->clearflag=0;
+ os->laceptr=0;
+ os->body_fill_next=0;
+
+ return OGG_SUCCESS;
+}
+
+int ogg_stream_reset_serialno(ogg_stream_state *os,int serialno){
+ ogg_stream_reset(os);
+ os->serialno=serialno;
+ return OGG_SUCCESS;
+}
+
+static int _packetout(ogg_stream_state *os,ogg_packet *op,int adv){
+
+ ogg_packet_release(op);
+ _span_queued_page(os);
+
+ if(os->holeflag){
+ int temp=os->holeflag;
+ if(os->clearflag)
+ os->holeflag=0;
+ else
+ os->holeflag=1;
+ if(temp==2){
+ os->packetno++;
+ return OGG_HOLE;
+ }
+ }
+ if(os->spanflag){
+ int temp=os->spanflag;
+ if(os->clearflag)
+ os->spanflag=0;
+ else
+ os->spanflag=1;
+ if(temp==2){
+ os->packetno++;
+ return OGG_SPAN;
+ }
+ }
+
+ if(!(os->body_fill&FINFLAG)) return 0;
+ if(!op && !adv)return 1; /* just using peek as an inexpensive way
+ to ask if there's a whole packet
+ waiting */
+ if(op){
+ op->b_o_s=os->b_o_s;
+ if(os->e_o_s && os->body_fill_next==0)
+ op->e_o_s=os->e_o_s;
+ else
+ op->e_o_s=0;
+ if( (os->body_fill&FINFLAG) && !(os->body_fill_next&FINFLAG) )
+ op->granulepos=os->granulepos;
+ else
+ op->granulepos=-1;
+ op->packetno=os->packetno;
+ }
+
+ if(adv){
+ oggbyte_buffer ob;
+ oggbyte_init(&ob,os->header_tail);
+
+ /* split the body contents off */
+ if(op){
+ op->packet=ogg_buffer_split(&os->body_tail,&os->body_head,
+ os->body_fill&FINMASK);
+ op->bytes=os->body_fill&FINMASK;
+ }else{
+ os->body_tail=ogg_buffer_pretruncate(os->body_tail,
+ os->body_fill&FINMASK);
+ if(os->body_tail==0)os->body_head=0;
+ }
+
+ /* update lacing pointers */
+ os->body_fill=os->body_fill_next;
+ _next_lace(&ob,os);
+ }else{
+ if(op){
+ op->packet=ogg_buffer_sub(os->body_tail,os->body_fill&FINMASK);
+ op->bytes=os->body_fill&FINMASK;
+ }
+ }
+
+ if(adv){
+ os->packetno++;
+ os->b_o_s=0;
+ }
+
+ return 1;
+}
+
+int ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op){
+ return _packetout(os,op,1);
+}
+
+int ogg_stream_packetpeek(ogg_stream_state *os,ogg_packet *op){
+ return _packetout(os,op,0);
+}
+
+int ogg_packet_release(ogg_packet *op) {
+ if(op){
+ ogg_buffer_release(op->packet);
+ memset(op, 0, sizeof(*op));
+ }
+ return OGG_SUCCESS;
+}
+
+int ogg_page_release(ogg_page *og) {
+ if(og){
+ ogg_buffer_release(og->header);
+ ogg_buffer_release(og->body);
+ memset(og, 0, sizeof(*og));
+ }
+ return OGG_SUCCESS;
+}
+
+void ogg_page_dup(ogg_page *dup,ogg_page *orig){
+ dup->header_len=orig->header_len;
+ dup->body_len=orig->body_len;
+ dup->header=ogg_buffer_dup(orig->header);
+ dup->body=ogg_buffer_dup(orig->body);
+}
+
diff --git a/MakefileBasedBuild/app/v_info.c b/MakefileBasedBuild/app/v_info.c
new file mode 100644
index 0000000..ec2a91d
--- /dev/null
+++ b/MakefileBasedBuild/app/v_info.c
@@ -0,0 +1,349 @@
+#define ADK_INTERNAL
+/********************************************************************
+ * *
+ * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
+ * *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
+ * *
+ * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 *
+ * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
+ * *
+ ********************************************************************
+
+ function: maintain the info structure, info <-> header packets
+
+ ********************************************************************/
+
+/* general handling of the header and the vorbis_info structure (and
+ substructures) */
+
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include "v_ogg.h"
+#include "v_ivorbiscodec.h"
+#include "v_codec_internal.h"
+#include "v_codebook.h"
+#include "v_misc.h"
+#include "v_os.h"
+
+/* helpers */
+static void _v_readstring(oggpack_buffer *o,char *buf,int bytes){
+ while(bytes--){
+ *buf++=oggpack_read(o,8);
+ }
+}
+
+void vorbis_comment_init(vorbis_comment *vc){
+ memset(vc,0,sizeof(*vc));
+}
+
+/* This is more or less the same as strncasecmp - but that doesn't exist
+ * everywhere, and this is a fairly trivial function, so we include it */
+static int tagcompare(const char *s1, const char *s2, int n){
+ int c=0;
+ while(c < n){
+ if(toupper(s1[c]) != toupper(s2[c]))
+ return !0;
+ c++;
+ }
+ return 0;
+}
+
+char *vorbis_comment_query(vorbis_comment *vc, char *tag, int count){
+ long i;
+ int found = 0;
+ int taglen = strlen(tag)+1; /* +1 for the = we append */
+ char *fulltag = (char *)alloca(taglen+ 1);
+
+ strcpy(fulltag, tag);
+ strcat(fulltag, "=");
+
+ for(i=0;i<vc->comments;i++){
+ if(!tagcompare(vc->user_comments[i], fulltag, taglen)){
+ if(count == found)
+ /* We return a pointer to the data, not a copy */
+ return vc->user_comments[i] + taglen;
+ else
+ found++;
+ }
+ }
+ return NULL; /* didn't find anything */
+}
+
+int vorbis_comment_query_count(vorbis_comment *vc, char *tag){
+ int i,count=0;
+ int taglen = strlen(tag)+1; /* +1 for the = we append */
+ char *fulltag = (char *)alloca(taglen+1);
+ strcpy(fulltag,tag);
+ strcat(fulltag, "=");
+
+ for(i=0;i<vc->comments;i++){
+ if(!tagcompare(vc->user_comments[i], fulltag, taglen))
+ count++;
+ }
+
+ return count;
+}
+
+void vorbis_comment_clear(vorbis_comment *vc){
+ if(vc){
+ long i;
+ for(i=0;i<vc->comments;i++)
+ if(vc->user_comments[i])_ogg_free(vc->user_comments[i]);
+ if(vc->user_comments)_ogg_free(vc->user_comments);
+ if(vc->comment_lengths)_ogg_free(vc->comment_lengths);
+ if(vc->vendor)_ogg_free(vc->vendor);
+ }
+ memset(vc,0,sizeof(*vc));
+}
+
+/* blocksize 0 is guaranteed to be short, 1 is guarantted to be long.
+ They may be equal, but short will never ge greater than long */
+int vorbis_info_blocksize(vorbis_info *vi,int zo){
+ codec_setup_info *ci = (codec_setup_info *)vi->codec_setup;
+ return ci ? ci->blocksizes[zo] : -1;
+}
+
+/* used by synthesis, which has a full, alloced vi */
+void vorbis_info_init(vorbis_info *vi){
+ memset(vi,0,sizeof(*vi));
+ vi->codec_setup=(codec_setup_info *)_ogg_calloc(1,sizeof(codec_setup_info));
+}
+
+void vorbis_info_clear(vorbis_info *vi){
+ codec_setup_info *ci=(codec_setup_info *)vi->codec_setup;
+ int i;
+
+ if(ci){
+
+ if(ci->mode_param)_ogg_free(ci->mode_param);
+
+ if(ci->map_param){
+ for(i=0;i<ci->maps;i++) /* unpack does the range checking */
+ mapping_clear_info(ci->map_param+i);
+ _ogg_free(ci->map_param);
+ }
+
+ if(ci->floor_param){
+ for(i=0;i<ci->floors;i++) /* unpack does the range checking */
+ if(ci->floor_type[i])
+ floor1_free_info(ci->floor_param[i]);
+ else
+ floor0_free_info(ci->floor_param[i]);
+ _ogg_free(ci->floor_param);
+ _ogg_free(ci->floor_type);
+ }
+
+ if(ci->residue_param){
+ for(i=0;i<ci->residues;i++) /* unpack does the range checking */
+ res_clear_info(ci->residue_param+i);
+ _ogg_free(ci->residue_param);
+ }
+
+ if(ci->book_param){
+ for(i=0;i<ci->books;i++)
+ vorbis_book_clear(ci->book_param+i);
+ _ogg_free(ci->book_param);
+ }
+
+ _ogg_free(ci);
+ }
+
+ memset(vi,0,sizeof(*vi));
+}
+
+/* Header packing/unpacking ********************************************/
+
+static int _vorbis_unpack_info(vorbis_info *vi,oggpack_buffer *opb){
+ codec_setup_info *ci=(codec_setup_info *)vi->codec_setup;
+ if(!ci)return(OV_EFAULT);
+
+ vi->version=oggpack_read(opb,32);
+ if(vi->version!=0)return(OV_EVERSION);
+
+ vi->channels=oggpack_read(opb,8);
+ vi->rate=oggpack_read(opb,32);
+
+ vi->bitrate_upper=oggpack_read(opb,32);
+ vi->bitrate_nominal=oggpack_read(opb,32);
+ vi->bitrate_lower=oggpack_read(opb,32);
+
+ ci->blocksizes[0]=1<<oggpack_read(opb,4);
+ ci->blocksizes[1]=1<<oggpack_read(opb,4);
+
+#ifdef LIMIT_TO_64kHz
+ if(vi->rate>=64000 || ci->blocksizes[1]>4096)goto err_out;
+#else
+ if(vi->rate<64000 && ci->blocksizes[1]>4096)goto err_out;
+#endif
+
+ if(vi->rate<1)goto err_out;
+ if(vi->channels<1)goto err_out;
+ if(ci->blocksizes[0]<64)goto err_out;
+ if(ci->blocksizes[1]<ci->blocksizes[0])goto err_out;
+ if(ci->blocksizes[1]>8192)goto err_out;
+
+ if(oggpack_read(opb,1)!=1)goto err_out; /* EOP check */
+
+ return(0);
+ err_out:
+ vorbis_info_clear(vi);
+ return(OV_EBADHEADER);
+}
+
+static int _vorbis_unpack_comment(vorbis_comment *vc,oggpack_buffer *opb){
+ int i;
+ int vendorlen=oggpack_read(opb,32);
+ if(vendorlen<0)goto err_out;
+ vc->vendor=(char *)_ogg_calloc(vendorlen+1,1);
+ _v_readstring(opb,vc->vendor,vendorlen);
+ vc->comments=oggpack_read(opb,32);
+ if(vc->comments<0)goto err_out;
+ vc->user_comments=(char **)_ogg_calloc(vc->comments+1,sizeof(*vc->user_comments));
+ vc->comment_lengths=(int *)_ogg_calloc(vc->comments+1, sizeof(*vc->comment_lengths));
+
+ for(i=0;i<vc->comments;i++){
+ int len=oggpack_read(opb,32);
+ if(len<0)goto err_out;
+ vc->comment_lengths[i]=len;
+ vc->user_comments[i]=(char *)_ogg_calloc(len+1,1);
+ _v_readstring(opb,vc->user_comments[i],len);
+ }
+ if(oggpack_read(opb,1)!=1)goto err_out; /* EOP check */
+
+ return(0);
+ err_out:
+ vorbis_comment_clear(vc);
+ return(OV_EBADHEADER);
+}
+
+/* all of the real encoding details are here. The modes, books,
+ everything */
+static int _vorbis_unpack_books(vorbis_info *vi,oggpack_buffer *opb){
+ codec_setup_info *ci=(codec_setup_info *)vi->codec_setup;
+ int i;
+ if(!ci)return(OV_EFAULT);
+
+ /* codebooks */
+ ci->books=oggpack_read(opb,8)+1;
+ ci->book_param=(codebook *)_ogg_calloc(ci->books,sizeof(*ci->book_param));
+ for(i=0;i<ci->books;i++)
+ if(vorbis_book_unpack(opb,ci->book_param+i))goto err_out;
+
+ /* time backend settings, not actually used */
+ i=oggpack_read(opb,6);
+ for(;i>=0;i--)
+ if(oggpack_read(opb,16)!=0)goto err_out;
+
+ /* floor backend settings */
+ ci->floors=oggpack_read(opb,6)+1;
+ ci->floor_param=_ogg_malloc(sizeof(*ci->floor_param)*ci->floors);
+ ci->floor_type=_ogg_malloc(sizeof(*ci->floor_type)*ci->floors);
+ for(i=0;i<ci->floors;i++){
+ ci->floor_type[i]=oggpack_read(opb,16);
+ if(ci->floor_type[i]<0 || ci->floor_type[i]>=VI_FLOORB)goto err_out;
+ if(ci->floor_type[i])
+ ci->floor_param[i]=floor1_info_unpack(vi,opb);
+ else
+ ci->floor_param[i]=floor0_info_unpack(vi,opb);
+ if(!ci->floor_param[i])goto err_out;
+ }
+
+ /* residue backend settings */
+ ci->residues=oggpack_read(opb,6)+1;
+ ci->residue_param=_ogg_malloc(sizeof(*ci->residue_param)*ci->residues);
+ for(i=0;i<ci->residues;i++)
+ if(res_unpack(ci->residue_param+i,vi,opb))goto err_out;
+
+ /* map backend settings */
+ ci->maps=oggpack_read(opb,6)+1;
+ ci->map_param=_ogg_malloc(sizeof(*ci->map_param)*ci->maps);
+ for(i=0;i<ci->maps;i++){
+ if(oggpack_read(opb,16)!=0)goto err_out;
+ if(mapping_info_unpack(ci->map_param+i,vi,opb))goto err_out;
+ }
+
+ /* mode settings */
+ ci->modes=oggpack_read(opb,6)+1;
+ ci->mode_param=
+ (vorbis_info_mode *)_ogg_malloc(ci->modes*sizeof(*ci->mode_param));
+ for(i=0;i<ci->modes;i++){
+ ci->mode_param[i].blockflag=oggpack_read(opb,1);
+ if(oggpack_read(opb,16))goto err_out;
+ if(oggpack_read(opb,16))goto err_out;
+ ci->mode_param[i].mapping=oggpack_read(opb,8);
+ if(ci->mode_param[i].mapping>=ci->maps)goto err_out;
+ }
+
+ if(oggpack_read(opb,1)!=1)goto err_out; /* top level EOP check */
+
+ return(0);
+ err_out:
+ vorbis_info_clear(vi);
+ return(OV_EBADHEADER);
+}
+
+/* The Vorbis header is in three packets; the initial small packet in
+ the first page that identifies basic parameters, a second packet
+ with bitstream comments and a third packet that holds the
+ codebook. */
+
+int vorbis_dsp_headerin(vorbis_info *vi,vorbis_comment *vc,ogg_packet *op){
+ oggpack_buffer opb;
+
+ if(op){
+ oggpack_readinit(&opb,op->packet);
+
+ /* Which of the three types of header is this? */
+ /* Also verify header-ness, vorbis */
+ {
+ char buffer[6];
+ int packtype=oggpack_read(&opb,8);
+ memset(buffer,0,6);
+ _v_readstring(&opb,buffer,6);
+ if(memcmp(buffer,"vorbis",6)){
+ /* not a vorbis header */
+ return(OV_ENOTVORBIS);
+ }
+ switch(packtype){
+ case 0x01: /* least significant *bit* is read first */
+ if(!op->b_o_s){
+ /* Not the initial packet */
+ return(OV_EBADHEADER);
+ }
+ if(vi->rate!=0){
+ /* previously initialized info header */
+ return(OV_EBADHEADER);
+ }
+
+ return(_vorbis_unpack_info(vi,&opb));
+
+ case 0x03: /* least significant *bit* is read first */
+ if(vi->rate==0){
+ /* um... we didn't get the initial header */
+ return(OV_EBADHEADER);
+ }
+
+ return(_vorbis_unpack_comment(vc,&opb));
+
+ case 0x05: /* least significant *bit* is read first */
+ if(vi->rate==0 || vc->vendor==NULL){
+ /* um... we didn;t get the initial header or comments yet */
+ return(OV_EBADHEADER);
+ }
+
+ return(_vorbis_unpack_books(vi,&opb));
+
+ default:
+ /* Not a valid vorbis header type */
+ return(OV_EBADHEADER);
+ break;
+ }
+ }
+ }
+ return(OV_EBADHEADER);
+}
+
diff --git a/MakefileBasedBuild/app/v_ivorbiscodec.h b/MakefileBasedBuild/app/v_ivorbiscodec.h
new file mode 100644
index 0000000..94df8f7
--- /dev/null
+++ b/MakefileBasedBuild/app/v_ivorbiscodec.h
@@ -0,0 +1,107 @@
+#ifdef ADK_INTERNAL
+/********************************************************************
+ * *
+ * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
+ * *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
+ * *
+ * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
+ * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
+ * *
+ ********************************************************************
+
+ function: libvorbis codec headers
+
+ ********************************************************************/
+
+#ifndef _vorbis_codec_h_
+#define _vorbis_codec_h_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#include "v_ogg.h"
+
+struct vorbis_dsp_state;
+typedef struct vorbis_dsp_state vorbis_dsp_state;
+
+typedef struct vorbis_info{
+ int version;
+ int channels;
+ long rate;
+
+ /* The below bitrate declarations are *hints*.
+ Combinations of the three values carry the following implications:
+
+ all three set to the same value:
+ implies a fixed rate bitstream
+ only nominal set:
+ implies a VBR stream that averages the nominal bitrate. No hard
+ upper/lower limit
+ upper and or lower set:
+ implies a VBR bitstream that obeys the bitrate limits. nominal
+ may also be set to give a nominal rate.
+ none set:
+ the coder does not care to speculate.
+ */
+
+ long bitrate_upper;
+ long bitrate_nominal;
+ long bitrate_lower;
+ long bitrate_window;
+
+ void *codec_setup;
+} vorbis_info;
+
+typedef struct vorbis_comment{
+ char **user_comments;
+ int *comment_lengths;
+ int comments;
+ char *vendor;
+
+} vorbis_comment;
+
+
+/* Vorbis PRIMITIVES: general ***************************************/
+
+extern void vorbis_info_init(vorbis_info *vi);
+extern void vorbis_info_clear(vorbis_info *vi);
+extern int vorbis_info_blocksize(vorbis_info *vi,int zo);
+extern void vorbis_comment_init(vorbis_comment *vc);
+extern void vorbis_comment_add(vorbis_comment *vc, char *comment);
+extern void vorbis_comment_add_tag(vorbis_comment *vc,
+ char *tag, char *contents);
+extern char *vorbis_comment_query(vorbis_comment *vc, char *tag, int count);
+extern int vorbis_comment_query_count(vorbis_comment *vc, char *tag);
+extern void vorbis_comment_clear(vorbis_comment *vc);
+
+/* Vorbis ERRORS and return codes ***********************************/
+
+#define OV_FALSE -1
+#define OV_EOF -2
+#define OV_HOLE -3
+
+#define OV_EREAD -128
+#define OV_EFAULT -129
+#define OV_EIMPL -130
+#define OV_EINVAL -131
+#define OV_ENOTVORBIS -132
+#define OV_EBADHEADER -133
+#define OV_EVERSION -134
+#define OV_ENOTAUDIO -135
+#define OV_EBADPACKET -136
+#define OV_EBADLINK -137
+#define OV_ENOSEEK -138
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
+
+#endif
+
diff --git a/MakefileBasedBuild/app/v_ivorbisfile.h b/MakefileBasedBuild/app/v_ivorbisfile.h
new file mode 100644
index 0000000..8b3350a
--- /dev/null
+++ b/MakefileBasedBuild/app/v_ivorbisfile.h
@@ -0,0 +1,125 @@
+#ifdef ADK_INTERNAL
+/********************************************************************
+ * *
+ * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
+ * *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
+ * *
+ * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 *
+ * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
+ * *
+ ********************************************************************
+
+ function: stdio-based convenience library for opening/seeking/decoding
+
+ ********************************************************************/
+
+#ifndef _OV_FILE_H_
+#define _OV_FILE_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#include <stdio.h>
+#include "v_ivorbiscodec.h"
+
+/* The function prototypes for the callbacks are basically the same as for
+ * the stdio functions fread, fseek, fclose, ftell.
+ * The one difference is that the FILE * arguments have been replaced with
+ * a void * - this is to be used as a pointer to whatever internal data these
+ * functions might need. In the stdio case, it's just a FILE * cast to a void *
+ *
+ * If you use other functions, check the docs for these functions and return
+ * the right values. For seek_func(), you *MUST* return -1 if the stream is
+ * unseekable
+ */
+typedef struct {
+ size_t (*read_func) (void *ptr, size_t size, size_t nmemb, void *datasource);
+ int (*seek_func) (void *datasource, ogg_int64_t offset, int whence);
+ int (*close_func) (void *datasource);
+ long (*tell_func) (void *datasource);
+} ov_callbacks;
+
+typedef struct OggVorbis_File {
+ void *datasource; /* Pointer to a FILE *, etc. */
+ int seekable;
+ ogg_int64_t offset;
+ ogg_int64_t end;
+ ogg_sync_state *oy;
+
+ /* If the FILE handle isn't seekable (eg, a pipe), only the current
+ stream appears */
+ int links;
+ ogg_int64_t *offsets;
+ ogg_int64_t *dataoffsets;
+ ogg_uint32_t *serialnos;
+ ogg_int64_t *pcmlengths;
+ vorbis_info vi;
+ vorbis_comment vc;
+
+ /* Decoding working state local storage */
+ ogg_int64_t pcm_offset;
+ int ready_state;
+ ogg_uint32_t current_serialno;
+ int current_link;
+
+ ogg_int64_t bittrack;
+ ogg_int64_t samptrack;
+
+ ogg_stream_state *os; /* take physical pages, weld into a logical
+ stream of packets */
+ vorbis_dsp_state *vd; /* central working state for the packet->PCM decoder */
+
+ ov_callbacks callbacks;
+
+} OggVorbis_File;
+
+extern int ov_clear(OggVorbis_File *vf);
+extern int ov_open(FILE *f,OggVorbis_File *vf,char *initial,long ibytes);
+extern int ov_open_callbacks(void *datasource, OggVorbis_File *vf,
+ char *initial, long ibytes, ov_callbacks callbacks);
+
+extern int ov_test(FILE *f,OggVorbis_File *vf,char *initial,long ibytes);
+extern int ov_test_callbacks(void *datasource, OggVorbis_File *vf,
+ char *initial, long ibytes, ov_callbacks callbacks);
+extern int ov_test_open(OggVorbis_File *vf);
+
+extern long ov_bitrate(OggVorbis_File *vf,int i);
+extern long ov_bitrate_instant(OggVorbis_File *vf);
+extern long ov_streams(OggVorbis_File *vf);
+extern long ov_seekable(OggVorbis_File *vf);
+extern long ov_serialnumber(OggVorbis_File *vf,int i);
+
+extern ogg_int64_t ov_raw_total(OggVorbis_File *vf,int i);
+extern ogg_int64_t ov_pcm_total(OggVorbis_File *vf,int i);
+extern ogg_int64_t ov_time_total(OggVorbis_File *vf,int i);
+
+extern int ov_raw_seek(OggVorbis_File *vf,ogg_int64_t pos);
+extern int ov_pcm_seek(OggVorbis_File *vf,ogg_int64_t pos);
+extern int ov_pcm_seek_page(OggVorbis_File *vf,ogg_int64_t pos);
+extern int ov_time_seek(OggVorbis_File *vf,ogg_int64_t pos);
+extern int ov_time_seek_page(OggVorbis_File *vf,ogg_int64_t pos);
+
+extern ogg_int64_t ov_raw_tell(OggVorbis_File *vf);
+extern ogg_int64_t ov_pcm_tell(OggVorbis_File *vf);
+extern ogg_int64_t ov_time_tell(OggVorbis_File *vf);
+
+extern vorbis_info *ov_info(OggVorbis_File *vf,int link);
+extern vorbis_comment *ov_comment(OggVorbis_File *vf,int link);
+
+extern long ov_read(OggVorbis_File *vf,void *buffer,int length,
+ int *bitstream);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
+
+
+#endif
+
diff --git a/MakefileBasedBuild/app/v_lsp_lookup.h b/MakefileBasedBuild/app/v_lsp_lookup.h
new file mode 100644
index 0000000..c8d16fa
--- /dev/null
+++ b/MakefileBasedBuild/app/v_lsp_lookup.h
@@ -0,0 +1,111 @@
+#ifdef ADK_INTERNAL
+/********************************************************************
+ * *
+ * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
+ * *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
+ * *
+ * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
+ * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
+ * *
+ ********************************************************************
+
+ function: lookup data
+
+ ********************************************************************/
+
+#ifndef _V_LOOKUP_DATA_H_
+#define _V_LOOKUP_DATA_H_
+
+#include "v_os_types.h"
+
+#define INVSQ_LOOKUP_I_SHIFT 10
+#define INVSQ_LOOKUP_I_MASK 1023
+static const long INVSQ_LOOKUP_I[64+1]={
+ 92682, 91966, 91267, 90583,
+ 89915, 89261, 88621, 87995,
+ 87381, 86781, 86192, 85616,
+ 85051, 84497, 83953, 83420,
+ 82897, 82384, 81880, 81385,
+ 80899, 80422, 79953, 79492,
+ 79039, 78594, 78156, 77726,
+ 77302, 76885, 76475, 76072,
+ 75674, 75283, 74898, 74519,
+ 74146, 73778, 73415, 73058,
+ 72706, 72359, 72016, 71679,
+ 71347, 71019, 70695, 70376,
+ 70061, 69750, 69444, 69141,
+ 68842, 68548, 68256, 67969,
+ 67685, 67405, 67128, 66855,
+ 66585, 66318, 66054, 65794,
+ 65536,
+};
+
+static const long INVSQ_LOOKUP_IDel[64]={
+ 716, 699, 684, 668,
+ 654, 640, 626, 614,
+ 600, 589, 576, 565,
+ 554, 544, 533, 523,
+ 513, 504, 495, 486,
+ 477, 469, 461, 453,
+ 445, 438, 430, 424,
+ 417, 410, 403, 398,
+ 391, 385, 379, 373,
+ 368, 363, 357, 352,
+ 347, 343, 337, 332,
+ 328, 324, 319, 315,
+ 311, 306, 303, 299,
+ 294, 292, 287, 284,
+ 280, 277, 273, 270,
+ 267, 264, 260, 258,
+};
+
+#define COS_LOOKUP_I_SHIFT 9
+#define COS_LOOKUP_I_MASK 511
+#define COS_LOOKUP_I_SZ 128
+static const ogg_int32_t COS_LOOKUP_I[COS_LOOKUP_I_SZ+1]={
+ 16384, 16379, 16364, 16340,
+ 16305, 16261, 16207, 16143,
+ 16069, 15986, 15893, 15791,
+ 15679, 15557, 15426, 15286,
+ 15137, 14978, 14811, 14635,
+ 14449, 14256, 14053, 13842,
+ 13623, 13395, 13160, 12916,
+ 12665, 12406, 12140, 11866,
+ 11585, 11297, 11003, 10702,
+ 10394, 10080, 9760, 9434,
+ 9102, 8765, 8423, 8076,
+ 7723, 7366, 7005, 6639,
+ 6270, 5897, 5520, 5139,
+ 4756, 4370, 3981, 3590,
+ 3196, 2801, 2404, 2006,
+ 1606, 1205, 804, 402,
+ 0, -401, -803, -1204,
+ -1605, -2005, -2403, -2800,
+ -3195, -3589, -3980, -4369,
+ -4755, -5138, -5519, -5896,
+ -6269, -6638, -7004, -7365,
+ -7722, -8075, -8422, -8764,
+ -9101, -9433, -9759, -10079,
+ -10393, -10701, -11002, -11296,
+ -11584, -11865, -12139, -12405,
+ -12664, -12915, -13159, -13394,
+ -13622, -13841, -14052, -14255,
+ -14448, -14634, -14810, -14977,
+ -15136, -15285, -15425, -15556,
+ -15678, -15790, -15892, -15985,
+ -16068, -16142, -16206, -16260,
+ -16304, -16339, -16363, -16378,
+ -16383,
+};
+
+#endif
+
+
+
+
+
+#endif
+
diff --git a/MakefileBasedBuild/app/v_mapping0.c b/MakefileBasedBuild/app/v_mapping0.c
new file mode 100644
index 0000000..870fba3
--- /dev/null
+++ b/MakefileBasedBuild/app/v_mapping0.c
@@ -0,0 +1,242 @@
+#define ADK_INTERNAL
+/********************************************************************
+ * *
+ * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
+ * *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
+ * *
+ * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 *
+ * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
+ * *
+ ********************************************************************
+
+ function: channel mapping 0 implementation
+
+ ********************************************************************/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <math.h>
+#include "v_ogg.h"
+#include "v_os.h"
+#include "v_ivorbiscodec.h"
+#include "v_mdct.h"
+#include "v_codec_internal.h"
+#include "v_codebook.h"
+#include "v_misc.h"
+
+void mapping_clear_info(vorbis_info_mapping *info){
+ if(info){
+ if(info->chmuxlist)_ogg_free(info->chmuxlist);
+ if(info->submaplist)_ogg_free(info->submaplist);
+ if(info->coupling)_ogg_free(info->coupling);
+ memset(info,0,sizeof(*info));
+ }
+}
+
+static int ilog(unsigned int v){
+ int ret=0;
+ if(v)--v;
+ while(v){
+ ret++;
+ v>>=1;
+ }
+ return(ret);
+}
+
+/* also responsible for range checking */
+int mapping_info_unpack(vorbis_info_mapping *info,vorbis_info *vi,
+ oggpack_buffer *opb){
+ int i;
+ codec_setup_info *ci=(codec_setup_info *)vi->codec_setup;
+ memset(info,0,sizeof(*info));
+
+ if(oggpack_read(opb,1))
+ info->submaps=oggpack_read(opb,4)+1;
+ else
+ info->submaps=1;
+
+ if(oggpack_read(opb,1)){
+ info->coupling_steps=oggpack_read(opb,8)+1;
+ info->coupling=
+ _ogg_malloc(info->coupling_steps*sizeof(*info->coupling));
+
+ for(i=0;i<info->coupling_steps;i++){
+ int testM=info->coupling[i].mag=oggpack_read(opb,ilog(vi->channels));
+ int testA=info->coupling[i].ang=oggpack_read(opb,ilog(vi->channels));
+
+ if(testM<0 ||
+ testA<0 ||
+ testM==testA ||
+ testM>=vi->channels ||
+ testA>=vi->channels) goto err_out;
+ }
+
+ }
+
+ if(oggpack_read(opb,2)>0)goto err_out; /* 2,3:reserved */
+
+ if(info->submaps>1){
+ info->chmuxlist=_ogg_malloc(sizeof(*info->chmuxlist)*vi->channels);
+ for(i=0;i<vi->channels;i++){
+ info->chmuxlist[i]=oggpack_read(opb,4);
+ if(info->chmuxlist[i]>=info->submaps)goto err_out;
+ }
+ }
+
+ info->submaplist=_ogg_malloc(sizeof(*info->submaplist)*info->submaps);
+ for(i=0;i<info->submaps;i++){
+ int temp=oggpack_read(opb,8);
+ info->submaplist[i].floor=oggpack_read(opb,8);
+ if(info->submaplist[i].floor>=ci->floors)goto err_out;
+ info->submaplist[i].residue=oggpack_read(opb,8);
+ if(info->submaplist[i].residue>=ci->residues)goto err_out;
+ }
+
+ return 0;
+
+ err_out:
+ mapping_clear_info(info);
+ return -1;
+}
+
+int mapping_inverse(vorbis_dsp_state *vd,vorbis_info_mapping *info){
+ vorbis_info *vi=vd->vi;
+ codec_setup_info *ci=(codec_setup_info *)vi->codec_setup;
+
+ int i,j;
+ long n=ci->blocksizes[vd->W];
+
+ ogg_int32_t **pcmbundle=
+ alloca(sizeof(*pcmbundle)*vi->channels);
+ int *zerobundle=
+ alloca(sizeof(*zerobundle)*vi->channels);
+ int *nonzero=
+ alloca(sizeof(*nonzero)*vi->channels);
+ ogg_int32_t **floormemo=
+ alloca(sizeof(*floormemo)*vi->channels);
+
+ /* recover the spectral envelope; store it in the PCM vector for now */
+ for(i=0;i<vi->channels;i++){
+ int submap=0;
+ int floorno;
+
+ if(info->submaps>1)
+ submap=info->chmuxlist[i];
+ floorno=info->submaplist[submap].floor;
+
+ if(ci->floor_type[floorno]){
+ /* floor 1 */
+ floormemo[i]=alloca(sizeof(*floormemo[i])*
+ floor1_memosize(ci->floor_param[floorno]));
+ floormemo[i]=floor1_inverse1(vd,ci->floor_param[floorno],floormemo[i]);
+ }else{
+ /* floor 0 */
+ floormemo[i]=alloca(sizeof(*floormemo[i])*
+ floor0_memosize(ci->floor_param[floorno]));
+ floormemo[i]=floor0_inverse1(vd,ci->floor_param[floorno],floormemo[i]);
+ }
+
+ if(floormemo[i])
+ nonzero[i]=1;
+ else
+ nonzero[i]=0;
+ memset(vd->work[i],0,sizeof(*vd->work[i])*n/2);
+ }
+
+ /* channel coupling can 'dirty' the nonzero listing */
+ for(i=0;i<info->coupling_steps;i++){
+ if(nonzero[info->coupling[i].mag] ||
+ nonzero[info->coupling[i].ang]){
+ nonzero[info->coupling[i].mag]=1;
+ nonzero[info->coupling[i].ang]=1;
+ }
+ }
+
+ /* recover the residue into our working vectors */
+ for(i=0;i<info->submaps;i++){
+ int ch_in_bundle=0;
+ for(j=0;j<vi->channels;j++){
+ if(!info->chmuxlist || info->chmuxlist[j]==i){
+ if(nonzero[j])
+ zerobundle[ch_in_bundle]=1;
+ else
+ zerobundle[ch_in_bundle]=0;
+ pcmbundle[ch_in_bundle++]=vd->work[j];
+ }
+ }
+
+ res_inverse(vd,ci->residue_param+info->submaplist[i].residue,
+ pcmbundle,zerobundle,ch_in_bundle);
+ }
+
+ //for(j=0;j<vi->channels;j++)
+ //_analysis_output("coupled",seq+j,vb->pcm[j],-8,n/2,0,0);
+
+ /* channel coupling */
+ for(i=info->coupling_steps-1;i>=0;i--){
+ ogg_int32_t *pcmM=vd->work[info->coupling[i].mag];
+ ogg_int32_t *pcmA=vd->work[info->coupling[i].ang];
+
+ for(j=0;j<n/2;j++){
+ ogg_int32_t mag=pcmM[j];
+ ogg_int32_t ang=pcmA[j];
+
+ if(mag>0)
+ if(ang>0){
+ pcmM[j]=mag;
+ pcmA[j]=mag-ang;
+ }else{
+ pcmA[j]=mag;
+ pcmM[j]=mag+ang;
+ }
+ else
+ if(ang>0){
+ pcmM[j]=mag;
+ pcmA[j]=mag+ang;
+ }else{
+ pcmA[j]=mag;
+ pcmM[j]=mag-ang;
+ }
+ }
+ }
+
+ //for(j=0;j<vi->channels;j++)
+ //_analysis_output("residue",seq+j,vb->pcm[j],-8,n/2,0,0);
+
+ /* compute and apply spectral envelope */
+ for(i=0;i<vi->channels;i++){
+ ogg_int32_t *pcm=vd->work[i];
+ int submap=0;
+ int floorno;
+
+ if(info->submaps>1)
+ submap=info->chmuxlist[i];
+ floorno=info->submaplist[submap].floor;
+
+ if(ci->floor_type[floorno]){
+ /* floor 1 */
+ floor1_inverse2(vd,ci->floor_param[floorno],floormemo[i],pcm);
+ }else{
+ /* floor 0 */
+ floor0_inverse2(vd,ci->floor_param[floorno],floormemo[i],pcm);
+ }
+ }
+
+ //for(j=0;j<vi->channels;j++)
+ //_analysis_output("mdct",seq+j,vb->pcm[j],-24,n/2,0,1);
+
+ /* transform the PCM data; takes PCM vector, vb; modifies PCM vector */
+ /* only MDCT right now.... */
+ for(i=0;i<vi->channels;i++)
+ mdct_backward(n,vd->work[i]);
+
+ //for(j=0;j<vi->channels;j++)
+ //_analysis_output("imdct",seq+j,vb->pcm[j],-24,n,0,0);
+
+ /* all done! */
+ return(0);
+}
diff --git a/MakefileBasedBuild/app/v_mdct.c b/MakefileBasedBuild/app/v_mdct.c
new file mode 100644
index 0000000..cd393be
--- /dev/null
+++ b/MakefileBasedBuild/app/v_mdct.c
@@ -0,0 +1,487 @@
+#define ADK_INTERNAL
+/********************************************************************
+ * *
+ * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
+ * *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
+ * *
+ * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 *
+ * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
+ * *
+ ********************************************************************
+
+ function: normalized modified discrete cosine transform
+ power of two length transform only [64 <= n ]
+ last mod: $Id: mdct.c,v 1.9.6.5 2003/04/29 04:03:27 xiphmont Exp $
+
+ Original algorithm adapted long ago from _The use of multirate filter
+ banks for coding of high quality digital audio_, by T. Sporer,
+ K. Brandenburg and B. Edler, collection of the European Signal
+ Processing Conference (EUSIPCO), Amsterdam, June 1992, Vol.1, pp
+ 211-214
+
+ The below code implements an algorithm that no longer looks much like
+ that presented in the paper, but the basic structure remains if you
+ dig deep enough to see it.
+
+ This module DOES NOT INCLUDE code to generate/apply the window
+ function. Everybody has their own weird favorite including me... I
+ happen to like the properties of y=sin(.5PI*sin^2(x)), but others may
+ vehemently disagree.
+
+ ********************************************************************/
+
+#include "v_ivorbiscodec.h"
+#include "v_os.h"
+#include "v_misc.h"
+#include "v_mdct.h"
+#include "v_mdct_lookup.h"
+
+STIN void presymmetry(DATA_TYPE *in,int n2,int step){
+ DATA_TYPE *aX;
+ DATA_TYPE *bX;
+ LOOKUP_T *T;
+ int n4=n2>>1;
+
+ aX = in+n2-3;
+ T = sincos_lookup0;
+
+ do{
+ REG_TYPE r0= aX[0];
+ REG_TYPE r2= aX[2];
+ XPROD31( r0, r2, T[0], T[1], &aX[0], &aX[2] ); T+=step;
+ aX-=4;
+ }while(aX>=in+n4);
+ do{
+ REG_TYPE r0= aX[0];
+ REG_TYPE r2= aX[2];
+ XPROD31( r0, r2, T[1], T[0], &aX[0], &aX[2] ); T-=step;
+ aX-=4;
+ }while(aX>=in);
+
+ aX = in+n2-4;
+ bX = in;
+ T = sincos_lookup0;
+ do{
+ REG_TYPE ri0= aX[0];
+ REG_TYPE ri2= aX[2];
+ REG_TYPE ro0= bX[0];
+ REG_TYPE ro2= bX[2];
+
+ XNPROD31( ro2, ro0, T[1], T[0], &aX[0], &aX[2] ); T+=step;
+ XNPROD31( ri2, ri0, T[0], T[1], &bX[0], &bX[2] );
+
+ aX-=4;
+ bX+=4;
+ }while(aX>=in+n4);
+
+}
+
+/* 8 point butterfly (in place) */
+STIN void mdct_butterfly_8(DATA_TYPE *x){
+
+ REG_TYPE r0 = x[0] + x[1];
+ REG_TYPE r1 = x[0] - x[1];
+ REG_TYPE r2 = x[2] + x[3];
+ REG_TYPE r3 = x[2] - x[3];
+ REG_TYPE r4 = x[4] + x[5];
+ REG_TYPE r5 = x[4] - x[5];
+ REG_TYPE r6 = x[6] + x[7];
+ REG_TYPE r7 = x[6] - x[7];
+
+ x[0] = r5 + r3;
+ x[1] = r7 - r1;
+ x[2] = r5 - r3;
+ x[3] = r7 + r1;
+ x[4] = r4 - r0;
+ x[5] = r6 - r2;
+ x[6] = r4 + r0;
+ x[7] = r6 + r2;
+ MB();
+}
+
+/* 16 point butterfly (in place, 4 register) */
+STIN void mdct_butterfly_16(DATA_TYPE *x){
+
+ REG_TYPE r0, r1, r2, r3;
+
+ r0 = x[ 8] - x[ 9]; x[ 8] += x[ 9];
+ r1 = x[10] - x[11]; x[10] += x[11];
+ r2 = x[ 1] - x[ 0]; x[ 9] = x[ 1] + x[0];
+ r3 = x[ 3] - x[ 2]; x[11] = x[ 3] + x[2];
+ x[ 0] = MULT31((r0 - r1) , cPI2_8);
+ x[ 1] = MULT31((r2 + r3) , cPI2_8);
+ x[ 2] = MULT31((r0 + r1) , cPI2_8);
+ x[ 3] = MULT31((r3 - r2) , cPI2_8);
+ MB();
+
+ r2 = x[12] - x[13]; x[12] += x[13];
+ r3 = x[14] - x[15]; x[14] += x[15];
+ r0 = x[ 4] - x[ 5]; x[13] = x[ 5] + x[ 4];
+ r1 = x[ 7] - x[ 6]; x[15] = x[ 7] + x[ 6];
+ x[ 4] = r2; x[ 5] = r1;
+ x[ 6] = r3; x[ 7] = r0;
+ MB();
+
+ mdct_butterfly_8(x);
+ mdct_butterfly_8(x+8);
+}
+
+/* 32 point butterfly (in place, 4 register) */
+STIN void mdct_butterfly_32(DATA_TYPE *x){
+
+ REG_TYPE r0, r1, r2, r3;
+
+ r0 = x[16] - x[17]; x[16] += x[17];
+ r1 = x[18] - x[19]; x[18] += x[19];
+ r2 = x[ 1] - x[ 0]; x[17] = x[ 1] + x[ 0];
+ r3 = x[ 3] - x[ 2]; x[19] = x[ 3] + x[ 2];
+ XNPROD31( r0, r1, cPI3_8, cPI1_8, &x[ 0], &x[ 2] );
+ XPROD31 ( r2, r3, cPI1_8, cPI3_8, &x[ 1], &x[ 3] );
+ MB();
+
+ r0 = x[20] - x[21]; x[20] += x[21];
+ r1 = x[22] - x[23]; x[22] += x[23];
+ r2 = x[ 5] - x[ 4]; x[21] = x[ 5] + x[ 4];
+ r3 = x[ 7] - x[ 6]; x[23] = x[ 7] + x[ 6];
+ x[ 4] = MULT31((r0 - r1) , cPI2_8);
+ x[ 5] = MULT31((r3 + r2) , cPI2_8);
+ x[ 6] = MULT31((r0 + r1) , cPI2_8);
+ x[ 7] = MULT31((r3 - r2) , cPI2_8);
+ MB();
+
+ r0 = x[24] - x[25]; x[24] += x[25];
+ r1 = x[26] - x[27]; x[26] += x[27];
+ r2 = x[ 9] - x[ 8]; x[25] = x[ 9] + x[ 8];
+ r3 = x[11] - x[10]; x[27] = x[11] + x[10];
+ XNPROD31( r0, r1, cPI1_8, cPI3_8, &x[ 8], &x[10] );
+ XPROD31 ( r2, r3, cPI3_8, cPI1_8, &x[ 9], &x[11] );
+ MB();
+
+ r0 = x[28] - x[29]; x[28] += x[29];
+ r1 = x[30] - x[31]; x[30] += x[31];
+ r2 = x[12] - x[13]; x[29] = x[13] + x[12];
+ r3 = x[15] - x[14]; x[31] = x[15] + x[14];
+ x[12] = r0; x[13] = r3;
+ x[14] = r1; x[15] = r2;
+ MB();
+
+ mdct_butterfly_16(x);
+ mdct_butterfly_16(x+16);
+}
+
+/* N/stage point generic N stage butterfly (in place, 2 register) */
+STIN void mdct_butterfly_generic(DATA_TYPE *x,int points,int step){
+
+ LOOKUP_T *T = sincos_lookup0;
+ DATA_TYPE *x1 = x + points - 4;
+ DATA_TYPE *x2 = x + (points>>1) - 4;
+ REG_TYPE r0, r1, r2, r3;
+
+ do{
+ r0 = x1[0] - x1[1]; x1[0] += x1[1];
+ r1 = x1[3] - x1[2]; x1[2] += x1[3];
+ r2 = x2[1] - x2[0]; x1[1] = x2[1] + x2[0];
+ r3 = x2[3] - x2[2]; x1[3] = x2[3] + x2[2];
+ XPROD31( r1, r0, T[0], T[1], &x2[0], &x2[2] );
+ XPROD31( r2, r3, T[0], T[1], &x2[1], &x2[3] ); T+=step;
+ x1-=4;
+ x2-=4;
+ }while(T<sincos_lookup0+1024);
+ do{
+ r0 = x1[0] - x1[1]; x1[0] += x1[1];
+ r1 = x1[2] - x1[3]; x1[2] += x1[3];
+ r2 = x2[0] - x2[1]; x1[1] = x2[1] + x2[0];
+ r3 = x2[3] - x2[2]; x1[3] = x2[3] + x2[2];
+ XNPROD31( r0, r1, T[0], T[1], &x2[0], &x2[2] );
+ XNPROD31( r3, r2, T[0], T[1], &x2[1], &x2[3] ); T-=step;
+ x1-=4;
+ x2-=4;
+ }while(T>sincos_lookup0);
+}
+
+STIN void mdct_butterflies(DATA_TYPE *x,int points,int shift){
+
+ int stages=8-shift;
+ int i,j;
+
+ for(i=0;--stages>0;i++){
+ for(j=0;j<(1<<i);j++)
+ mdct_butterfly_generic(x+(points>>i)*j,points>>i,4<<(i+shift));
+ }
+
+ for(j=0;j<points;j+=32)
+ mdct_butterfly_32(x+j);
+}
+
+static unsigned char bitrev[16]={0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15};
+
+STIN int bitrev12(int x){
+ return bitrev[x>>8]|(bitrev[(x&0x0f0)>>4]<<4)|(((int)bitrev[x&0x00f])<<8);
+}
+
+STIN void mdct_bitreverse(DATA_TYPE *x,int n,int shift){
+ int bit = 0;
+ DATA_TYPE *w = x+(n>>1);
+
+ do{
+ DATA_TYPE b = bitrev12(bit++);
+ DATA_TYPE *xx = x + (b>>shift);
+ REG_TYPE r;
+
+ w -= 2;
+
+ if(w>xx){
+
+ r = xx[0];
+ xx[0] = w[0];
+ w[0] = r;
+
+ r = xx[1];
+ xx[1] = w[1];
+ w[1] = r;
+ }
+ }while(w>x);
+}
+
+STIN void mdct_step7(DATA_TYPE *x,int n,int step){
+ DATA_TYPE *w0 = x;
+ DATA_TYPE *w1 = x+(n>>1);
+ LOOKUP_T *T = (step>=4)?(sincos_lookup0+(step>>1)):sincos_lookup1;
+ LOOKUP_T *Ttop = T+1024;
+ REG_TYPE r0, r1, r2, r3;
+
+ do{
+ w1 -= 2;
+
+ r0 = w0[0] + w1[0];
+ r1 = w1[1] - w0[1];
+ r2 = MULT32(r0, T[1]) + MULT32(r1, T[0]);
+ r3 = MULT32(r1, T[1]) - MULT32(r0, T[0]);
+ T+=step;
+
+ r0 = (w0[1] + w1[1])>>1;
+ r1 = (w0[0] - w1[0])>>1;
+ w0[0] = r0 + r2;
+ w0[1] = r1 + r3;
+ w1[0] = r0 - r2;
+ w1[1] = r3 - r1;
+
+ w0 += 2;
+ }while(T<Ttop);
+ do{
+ w1 -= 2;
+
+ r0 = w0[0] + w1[0];
+ r1 = w1[1] - w0[1];
+ T-=step;
+ r2 = MULT32(r0, T[0]) + MULT32(r1, T[1]);
+ r3 = MULT32(r1, T[0]) - MULT32(r0, T[1]);
+
+ r0 = (w0[1] + w1[1])>>1;
+ r1 = (w0[0] - w1[0])>>1;
+ w0[0] = r0 + r2;
+ w0[1] = r1 + r3;
+ w1[0] = r0 - r2;
+ w1[1] = r3 - r1;
+
+ w0 += 2;
+ }while(w0<w1);
+}
+
+STIN void mdct_step8(DATA_TYPE *x, int n, int step){
+ LOOKUP_T *T;
+ LOOKUP_T *V;
+ DATA_TYPE *iX =x+(n>>1);
+ step>>=2;
+
+ switch(step) {
+ default:
+ T=(step>=4)?(sincos_lookup0+(step>>1)):sincos_lookup1;
+ do{
+ REG_TYPE r0 = x[0];
+ REG_TYPE r1 = -x[1];
+ XPROD31( r0, r1, T[0], T[1], x, x+1); T+=step;
+ x +=2;
+ }while(x<iX);
+ break;
+
+ case 1:
+ {
+ /* linear interpolation between table values: offset=0.5, step=1 */
+ REG_TYPE t0,t1,v0,v1,r0,r1;
+ T = sincos_lookup0;
+ V = sincos_lookup1;
+ t0 = (*T++)>>1;
+ t1 = (*T++)>>1;
+ do{
+ r0 = x[0];
+ r1 = -x[1];
+ t0 += (v0 = (*V++)>>1);
+ t1 += (v1 = (*V++)>>1);
+ XPROD31( r0, r1, t0, t1, x, x+1 );
+
+ r0 = x[2];
+ r1 = -x[3];
+ v0 += (t0 = (*T++)>>1);
+ v1 += (t1 = (*T++)>>1);
+ XPROD31( r0, r1, v0, v1, x+2, x+3 );
+
+ x += 4;
+ }while(x<iX);
+ break;
+ }
+
+ case 0:
+ {
+ /* linear interpolation between table values: offset=0.25, step=0.5 */
+ REG_TYPE t0,t1,v0,v1,q0,q1,r0,r1;
+ T = sincos_lookup0;
+ V = sincos_lookup1;
+ t0 = *T++;
+ t1 = *T++;
+ do{
+
+
+ v0 = *V++;
+ v1 = *V++;
+ t0 += (q0 = (v0-t0)>>2);
+ t1 += (q1 = (v1-t1)>>2);
+ r0 = x[0];
+ r1 = -x[1];
+ XPROD31( r0, r1, t0, t1, x, x+1 );
+ t0 = v0-q0;
+ t1 = v1-q1;
+ r0 = x[2];
+ r1 = -x[3];
+ XPROD31( r0, r1, t0, t1, x+2, x+3 );
+
+ t0 = *T++;
+ t1 = *T++;
+ v0 += (q0 = (t0-v0)>>2);
+ v1 += (q1 = (t1-v1)>>2);
+ r0 = x[4];
+ r1 = -x[5];
+ XPROD31( r0, r1, v0, v1, x+4, x+5 );
+ v0 = t0-q0;
+ v1 = t1-q1;
+ r0 = x[6];
+ r1 = -x[7];
+ XPROD31( r0, r1, v0, v1, x+5, x+6 );
+
+ x+=8;
+ }while(x<iX);
+ break;
+ }
+ }
+}
+
+/* partial; doesn't perform last-step deinterleave/unrolling. That
+ can be done more efficiently during pcm output */
+void mdct_backward(int n, DATA_TYPE *in){
+ int shift;
+ int step;
+
+ for (shift=4;!(n&(1<<shift));shift++);
+ shift=13-shift;
+ step=2<<shift;
+
+ presymmetry(in,n>>1,step);
+ mdct_butterflies(in,n>>1,shift);
+ mdct_bitreverse(in,n,shift);
+ mdct_step7(in,n,step);
+ mdct_step8(in,n,step);
+}
+
+void mdct_shift_right(int n, DATA_TYPE *in, DATA_TYPE *right){
+ int i;
+ n>>=2;
+ in+=1;
+
+ for(i=0;i<n;i++)
+ right[i]=in[i<<1];
+}
+
+void mdct_unroll_lap(int n0,int n1,
+ int lW,int W,
+ DATA_TYPE *in,
+ DATA_TYPE *right,
+ LOOKUP_T *w0,
+ LOOKUP_T *w1,
+ ogg_int16_t *out,
+ int step,
+ int start, /* samples, this frame */
+ int end /* samples, this frame */){
+
+ DATA_TYPE *l=in+(W&&lW ? n1>>1 : n0>>1);
+ DATA_TYPE *r=right+(lW ? n1>>2 : n0>>2);
+ DATA_TYPE *post;
+ LOOKUP_T *wR=(W && lW ? w1+(n1>>1) : w0+(n0>>1));
+ LOOKUP_T *wL=(W && lW ? w1 : w0 );
+
+ int preLap=(lW && !W ? (n1>>2)-(n0>>2) : 0 );
+ int halfLap=(lW && W ? (n1>>2) : (n0>>2) );
+ int postLap=(!lW && W ? (n1>>2)-(n0>>2) : 0 );
+ int n,off;
+
+ /* preceeding direct-copy lapping from previous frame, if any */
+ if(preLap){
+ n = (end<preLap?end:preLap);
+ off = (start<preLap?start:preLap);
+ post = r-n;
+ r -= off;
+ start -= off;
+ end -= n;
+ while(r>post){
+ *out = CLIP_TO_15((*--r)>>9);
+ out+=step;
+ }
+ }
+
+ /* cross-lap; two halves due to wrap-around */
+ n = (end<halfLap?end:halfLap);
+ off = (start<halfLap?start:halfLap);
+ post = r-n;
+ r -= off;
+ l -= off*2;
+ start -= off;
+ wR -= off;
+ wL += off;
+ end -= n;
+ while(r>post){
+ l-=2;
+ *out = CLIP_TO_15((MULT31(*--r,*--wR) + MULT31(*l,*wL++))>>9);
+ out+=step;
+ }
+
+ n = (end<halfLap?end:halfLap);
+ off = (start<halfLap?start:halfLap);
+ post = r+n;
+ r += off;
+ l += off*2;
+ start -= off;
+ end -= n;
+ wR -= off;
+ wL += off;
+ while(r<post){
+ *out = CLIP_TO_15((MULT31(*r++,*--wR) - MULT31(*l,*wL++))>>9);
+ out+=step;
+ l+=2;
+ }
+
+ /* preceeding direct-copy lapping from previous frame, if any */
+ if(postLap){
+ n = (end<postLap?end:postLap);
+ off = (start<postLap?start:postLap);
+ post = l+n*2;
+ l += off*2;
+ while(l<post){
+ *out = CLIP_TO_15((-*l)>>9);
+ out+=step;
+ l+=2;
+ }
+ }
+}
+
diff --git a/MakefileBasedBuild/app/v_mdct.h b/MakefileBasedBuild/app/v_mdct.h
new file mode 100644
index 0000000..6248179
--- /dev/null
+++ b/MakefileBasedBuild/app/v_mdct.h
@@ -0,0 +1,62 @@
+#ifdef ADK_INTERNAL
+/********************************************************************
+ * *
+ * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
+ * *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
+ * *
+ * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 *
+ * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
+ * *
+ ********************************************************************
+
+ function: modified discrete cosine transform prototypes
+
+ ********************************************************************/
+
+#ifndef _OGG_mdct_H_
+#define _OGG_mdct_H_
+
+#include "v_ivorbiscodec.h"
+#include "v_misc.h"
+
+#define DATA_TYPE ogg_int32_t
+#define REG_TYPE register ogg_int32_t
+
+#ifdef _LOW_ACCURACY_
+#define cPI3_8 (0x0062)
+#define cPI2_8 (0x00b5)
+#define cPI1_8 (0x00ed)
+#else
+#define cPI3_8 (0x30fbc54d)
+#define cPI2_8 (0x5a82799a)
+#define cPI1_8 (0x7641af3d)
+#endif
+
+extern void mdct_backward(int n, DATA_TYPE *in);
+extern void mdct_shift_right(int n, DATA_TYPE *in, DATA_TYPE *right);
+extern void mdct_unroll_lap(int n0,int n1,
+ int lW,int W,
+ DATA_TYPE *in,DATA_TYPE *right,
+ LOOKUP_T *w0,LOOKUP_T *w1,
+ ogg_int16_t *out,
+ int step,
+ int start,int end /* samples, this frame */);
+
+#endif
+
+
+
+
+
+
+
+
+
+
+
+
+#endif
+
diff --git a/MakefileBasedBuild/app/v_mdct_lookup.h b/MakefileBasedBuild/app/v_mdct_lookup.h
new file mode 100644
index 0000000..4e51ced
--- /dev/null
+++ b/MakefileBasedBuild/app/v_mdct_lookup.h
@@ -0,0 +1,543 @@
+#ifdef ADK_INTERNAL
+/********************************************************************
+ * *
+ * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
+ * *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
+ * *
+ * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
+ * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
+ * *
+ ********************************************************************
+
+ function: sin,cos lookup tables
+
+ ********************************************************************/
+
+#include "v_os_types.h"
+
+/* {sin(2*i*PI/4096), cos(2*i*PI/4096)}, with i = 0 to 512 */
+static LOOKUP_T sincos_lookup0[1026] = {
+ X(0x00000000), X(0x7fffffff), X(0x003243f5), X(0x7ffff621),
+ X(0x006487e3), X(0x7fffd886), X(0x0096cbc1), X(0x7fffa72c),
+ X(0x00c90f88), X(0x7fff6216), X(0x00fb5330), X(0x7fff0943),
+ X(0x012d96b1), X(0x7ffe9cb2), X(0x015fda03), X(0x7ffe1c65),
+ X(0x01921d20), X(0x7ffd885a), X(0x01c45ffe), X(0x7ffce093),
+ X(0x01f6a297), X(0x7ffc250f), X(0x0228e4e2), X(0x7ffb55ce),
+ X(0x025b26d7), X(0x7ffa72d1), X(0x028d6870), X(0x7ff97c18),
+ X(0x02bfa9a4), X(0x7ff871a2), X(0x02f1ea6c), X(0x7ff75370),
+ X(0x03242abf), X(0x7ff62182), X(0x03566a96), X(0x7ff4dbd9),
+ X(0x0388a9ea), X(0x7ff38274), X(0x03bae8b2), X(0x7ff21553),
+ X(0x03ed26e6), X(0x7ff09478), X(0x041f6480), X(0x7feeffe1),
+ X(0x0451a177), X(0x7fed5791), X(0x0483ddc3), X(0x7feb9b85),
+ X(0x04b6195d), X(0x7fe9cbc0), X(0x04e8543e), X(0x7fe7e841),
+ X(0x051a8e5c), X(0x7fe5f108), X(0x054cc7b1), X(0x7fe3e616),
+ X(0x057f0035), X(0x7fe1c76b), X(0x05b137df), X(0x7fdf9508),
+ X(0x05e36ea9), X(0x7fdd4eec), X(0x0615a48b), X(0x7fdaf519),
+ X(0x0647d97c), X(0x7fd8878e), X(0x067a0d76), X(0x7fd6064c),
+ X(0x06ac406f), X(0x7fd37153), X(0x06de7262), X(0x7fd0c8a3),
+ X(0x0710a345), X(0x7fce0c3e), X(0x0742d311), X(0x7fcb3c23),
+ X(0x077501be), X(0x7fc85854), X(0x07a72f45), X(0x7fc560cf),
+ X(0x07d95b9e), X(0x7fc25596), X(0x080b86c2), X(0x7fbf36aa),
+ X(0x083db0a7), X(0x7fbc040a), X(0x086fd947), X(0x7fb8bdb8),
+ X(0x08a2009a), X(0x7fb563b3), X(0x08d42699), X(0x7fb1f5fc),
+ X(0x09064b3a), X(0x7fae7495), X(0x09386e78), X(0x7faadf7c),
+ X(0x096a9049), X(0x7fa736b4), X(0x099cb0a7), X(0x7fa37a3c),
+ X(0x09cecf89), X(0x7f9faa15), X(0x0a00ece8), X(0x7f9bc640),
+ X(0x0a3308bd), X(0x7f97cebd), X(0x0a6522fe), X(0x7f93c38c),
+ X(0x0a973ba5), X(0x7f8fa4b0), X(0x0ac952aa), X(0x7f8b7227),
+ X(0x0afb6805), X(0x7f872bf3), X(0x0b2d7baf), X(0x7f82d214),
+ X(0x0b5f8d9f), X(0x7f7e648c), X(0x0b919dcf), X(0x7f79e35a),
+ X(0x0bc3ac35), X(0x7f754e80), X(0x0bf5b8cb), X(0x7f70a5fe),
+ X(0x0c27c389), X(0x7f6be9d4), X(0x0c59cc68), X(0x7f671a05),
+ X(0x0c8bd35e), X(0x7f62368f), X(0x0cbdd865), X(0x7f5d3f75),
+ X(0x0cefdb76), X(0x7f5834b7), X(0x0d21dc87), X(0x7f531655),
+ X(0x0d53db92), X(0x7f4de451), X(0x0d85d88f), X(0x7f489eaa),
+ X(0x0db7d376), X(0x7f434563), X(0x0de9cc40), X(0x7f3dd87c),
+ X(0x0e1bc2e4), X(0x7f3857f6), X(0x0e4db75b), X(0x7f32c3d1),
+ X(0x0e7fa99e), X(0x7f2d1c0e), X(0x0eb199a4), X(0x7f2760af),
+ X(0x0ee38766), X(0x7f2191b4), X(0x0f1572dc), X(0x7f1baf1e),
+ X(0x0f475bff), X(0x7f15b8ee), X(0x0f7942c7), X(0x7f0faf25),
+ X(0x0fab272b), X(0x7f0991c4), X(0x0fdd0926), X(0x7f0360cb),
+ X(0x100ee8ad), X(0x7efd1c3c), X(0x1040c5bb), X(0x7ef6c418),
+ X(0x1072a048), X(0x7ef05860), X(0x10a4784b), X(0x7ee9d914),
+ X(0x10d64dbd), X(0x7ee34636), X(0x11082096), X(0x7edc9fc6),
+ X(0x1139f0cf), X(0x7ed5e5c6), X(0x116bbe60), X(0x7ecf1837),
+ X(0x119d8941), X(0x7ec8371a), X(0x11cf516a), X(0x7ec14270),
+ X(0x120116d5), X(0x7eba3a39), X(0x1232d979), X(0x7eb31e78),
+ X(0x1264994e), X(0x7eabef2c), X(0x1296564d), X(0x7ea4ac58),
+ X(0x12c8106f), X(0x7e9d55fc), X(0x12f9c7aa), X(0x7e95ec1a),
+ X(0x132b7bf9), X(0x7e8e6eb2), X(0x135d2d53), X(0x7e86ddc6),
+ X(0x138edbb1), X(0x7e7f3957), X(0x13c0870a), X(0x7e778166),
+ X(0x13f22f58), X(0x7e6fb5f4), X(0x1423d492), X(0x7e67d703),
+ X(0x145576b1), X(0x7e5fe493), X(0x148715ae), X(0x7e57dea7),
+ X(0x14b8b17f), X(0x7e4fc53e), X(0x14ea4a1f), X(0x7e47985b),
+ X(0x151bdf86), X(0x7e3f57ff), X(0x154d71aa), X(0x7e37042a),
+ X(0x157f0086), X(0x7e2e9cdf), X(0x15b08c12), X(0x7e26221f),
+ X(0x15e21445), X(0x7e1d93ea), X(0x16139918), X(0x7e14f242),
+ X(0x16451a83), X(0x7e0c3d29), X(0x1676987f), X(0x7e0374a0),
+ X(0x16a81305), X(0x7dfa98a8), X(0x16d98a0c), X(0x7df1a942),
+ X(0x170afd8d), X(0x7de8a670), X(0x173c6d80), X(0x7ddf9034),
+ X(0x176dd9de), X(0x7dd6668f), X(0x179f429f), X(0x7dcd2981),
+ X(0x17d0a7bc), X(0x7dc3d90d), X(0x1802092c), X(0x7dba7534),
+ X(0x183366e9), X(0x7db0fdf8), X(0x1864c0ea), X(0x7da77359),
+ X(0x18961728), X(0x7d9dd55a), X(0x18c7699b), X(0x7d9423fc),
+ X(0x18f8b83c), X(0x7d8a5f40), X(0x192a0304), X(0x7d808728),
+ X(0x195b49ea), X(0x7d769bb5), X(0x198c8ce7), X(0x7d6c9ce9),
+ X(0x19bdcbf3), X(0x7d628ac6), X(0x19ef0707), X(0x7d58654d),
+ X(0x1a203e1b), X(0x7d4e2c7f), X(0x1a517128), X(0x7d43e05e),
+ X(0x1a82a026), X(0x7d3980ec), X(0x1ab3cb0d), X(0x7d2f0e2b),
+ X(0x1ae4f1d6), X(0x7d24881b), X(0x1b161479), X(0x7d19eebf),
+ X(0x1b4732ef), X(0x7d0f4218), X(0x1b784d30), X(0x7d048228),
+ X(0x1ba96335), X(0x7cf9aef0), X(0x1bda74f6), X(0x7ceec873),
+ X(0x1c0b826a), X(0x7ce3ceb2), X(0x1c3c8b8c), X(0x7cd8c1ae),
+ X(0x1c6d9053), X(0x7ccda169), X(0x1c9e90b8), X(0x7cc26de5),
+ X(0x1ccf8cb3), X(0x7cb72724), X(0x1d00843d), X(0x7cabcd28),
+ X(0x1d31774d), X(0x7ca05ff1), X(0x1d6265dd), X(0x7c94df83),
+ X(0x1d934fe5), X(0x7c894bde), X(0x1dc4355e), X(0x7c7da505),
+ X(0x1df5163f), X(0x7c71eaf9), X(0x1e25f282), X(0x7c661dbc),
+ X(0x1e56ca1e), X(0x7c5a3d50), X(0x1e879d0d), X(0x7c4e49b7),
+ X(0x1eb86b46), X(0x7c4242f2), X(0x1ee934c3), X(0x7c362904),
+ X(0x1f19f97b), X(0x7c29fbee), X(0x1f4ab968), X(0x7c1dbbb3),
+ X(0x1f7b7481), X(0x7c116853), X(0x1fac2abf), X(0x7c0501d2),
+ X(0x1fdcdc1b), X(0x7bf88830), X(0x200d888d), X(0x7bebfb70),
+ X(0x203e300d), X(0x7bdf5b94), X(0x206ed295), X(0x7bd2a89e),
+ X(0x209f701c), X(0x7bc5e290), X(0x20d0089c), X(0x7bb9096b),
+ X(0x21009c0c), X(0x7bac1d31), X(0x21312a65), X(0x7b9f1de6),
+ X(0x2161b3a0), X(0x7b920b89), X(0x219237b5), X(0x7b84e61f),
+ X(0x21c2b69c), X(0x7b77ada8), X(0x21f3304f), X(0x7b6a6227),
+ X(0x2223a4c5), X(0x7b5d039e), X(0x225413f8), X(0x7b4f920e),
+ X(0x22847de0), X(0x7b420d7a), X(0x22b4e274), X(0x7b3475e5),
+ X(0x22e541af), X(0x7b26cb4f), X(0x23159b88), X(0x7b190dbc),
+ X(0x2345eff8), X(0x7b0b3d2c), X(0x23763ef7), X(0x7afd59a4),
+ X(0x23a6887f), X(0x7aef6323), X(0x23d6cc87), X(0x7ae159ae),
+ X(0x24070b08), X(0x7ad33d45), X(0x243743fa), X(0x7ac50dec),
+ X(0x24677758), X(0x7ab6cba4), X(0x2497a517), X(0x7aa8766f),
+ X(0x24c7cd33), X(0x7a9a0e50), X(0x24f7efa2), X(0x7a8b9348),
+ X(0x25280c5e), X(0x7a7d055b), X(0x2558235f), X(0x7a6e648a),
+ X(0x2588349d), X(0x7a5fb0d8), X(0x25b84012), X(0x7a50ea47),
+ X(0x25e845b6), X(0x7a4210d8), X(0x26184581), X(0x7a332490),
+ X(0x26483f6c), X(0x7a24256f), X(0x26783370), X(0x7a151378),
+ X(0x26a82186), X(0x7a05eead), X(0x26d809a5), X(0x79f6b711),
+ X(0x2707ebc7), X(0x79e76ca7), X(0x2737c7e3), X(0x79d80f6f),
+ X(0x27679df4), X(0x79c89f6e), X(0x27976df1), X(0x79b91ca4),
+ X(0x27c737d3), X(0x79a98715), X(0x27f6fb92), X(0x7999dec4),
+ X(0x2826b928), X(0x798a23b1), X(0x2856708d), X(0x797a55e0),
+ X(0x288621b9), X(0x796a7554), X(0x28b5cca5), X(0x795a820e),
+ X(0x28e5714b), X(0x794a7c12), X(0x29150fa1), X(0x793a6361),
+ X(0x2944a7a2), X(0x792a37fe), X(0x29743946), X(0x7919f9ec),
+ X(0x29a3c485), X(0x7909a92d), X(0x29d34958), X(0x78f945c3),
+ X(0x2a02c7b8), X(0x78e8cfb2), X(0x2a323f9e), X(0x78d846fb),
+ X(0x2a61b101), X(0x78c7aba2), X(0x2a911bdc), X(0x78b6fda8),
+ X(0x2ac08026), X(0x78a63d11), X(0x2aefddd8), X(0x789569df),
+ X(0x2b1f34eb), X(0x78848414), X(0x2b4e8558), X(0x78738bb3),
+ X(0x2b7dcf17), X(0x786280bf), X(0x2bad1221), X(0x7851633b),
+ X(0x2bdc4e6f), X(0x78403329), X(0x2c0b83fa), X(0x782ef08b),
+ X(0x2c3ab2b9), X(0x781d9b65), X(0x2c69daa6), X(0x780c33b8),
+ X(0x2c98fbba), X(0x77fab989), X(0x2cc815ee), X(0x77e92cd9),
+ X(0x2cf72939), X(0x77d78daa), X(0x2d263596), X(0x77c5dc01),
+ X(0x2d553afc), X(0x77b417df), X(0x2d843964), X(0x77a24148),
+ X(0x2db330c7), X(0x7790583e), X(0x2de2211e), X(0x777e5cc3),
+ X(0x2e110a62), X(0x776c4edb), X(0x2e3fec8b), X(0x775a2e89),
+ X(0x2e6ec792), X(0x7747fbce), X(0x2e9d9b70), X(0x7735b6af),
+ X(0x2ecc681e), X(0x77235f2d), X(0x2efb2d95), X(0x7710f54c),
+ X(0x2f29ebcc), X(0x76fe790e), X(0x2f58a2be), X(0x76ebea77),
+ X(0x2f875262), X(0x76d94989), X(0x2fb5fab2), X(0x76c69647),
+ X(0x2fe49ba7), X(0x76b3d0b4), X(0x30133539), X(0x76a0f8d2),
+ X(0x3041c761), X(0x768e0ea6), X(0x30705217), X(0x767b1231),
+ X(0x309ed556), X(0x76680376), X(0x30cd5115), X(0x7654e279),
+ X(0x30fbc54d), X(0x7641af3d), X(0x312a31f8), X(0x762e69c4),
+ X(0x3158970e), X(0x761b1211), X(0x3186f487), X(0x7607a828),
+ X(0x31b54a5e), X(0x75f42c0b), X(0x31e39889), X(0x75e09dbd),
+ X(0x3211df04), X(0x75ccfd42), X(0x32401dc6), X(0x75b94a9c),
+ X(0x326e54c7), X(0x75a585cf), X(0x329c8402), X(0x7591aedd),
+ X(0x32caab6f), X(0x757dc5ca), X(0x32f8cb07), X(0x7569ca99),
+ X(0x3326e2c3), X(0x7555bd4c), X(0x3354f29b), X(0x75419de7),
+ X(0x3382fa88), X(0x752d6c6c), X(0x33b0fa84), X(0x751928e0),
+ X(0x33def287), X(0x7504d345), X(0x340ce28b), X(0x74f06b9e),
+ X(0x343aca87), X(0x74dbf1ef), X(0x3468aa76), X(0x74c7663a),
+ X(0x34968250), X(0x74b2c884), X(0x34c4520d), X(0x749e18cd),
+ X(0x34f219a8), X(0x7489571c), X(0x351fd918), X(0x74748371),
+ X(0x354d9057), X(0x745f9dd1), X(0x357b3f5d), X(0x744aa63f),
+ X(0x35a8e625), X(0x74359cbd), X(0x35d684a6), X(0x74208150),
+ X(0x36041ad9), X(0x740b53fb), X(0x3631a8b8), X(0x73f614c0),
+ X(0x365f2e3b), X(0x73e0c3a3), X(0x368cab5c), X(0x73cb60a8),
+ X(0x36ba2014), X(0x73b5ebd1), X(0x36e78c5b), X(0x73a06522),
+ X(0x3714f02a), X(0x738acc9e), X(0x37424b7b), X(0x73752249),
+ X(0x376f9e46), X(0x735f6626), X(0x379ce885), X(0x73499838),
+ X(0x37ca2a30), X(0x7333b883), X(0x37f76341), X(0x731dc70a),
+ X(0x382493b0), X(0x7307c3d0), X(0x3851bb77), X(0x72f1aed9),
+ X(0x387eda8e), X(0x72db8828), X(0x38abf0ef), X(0x72c54fc1),
+ X(0x38d8fe93), X(0x72af05a7), X(0x39060373), X(0x7298a9dd),
+ X(0x3932ff87), X(0x72823c67), X(0x395ff2c9), X(0x726bbd48),
+ X(0x398cdd32), X(0x72552c85), X(0x39b9bebc), X(0x723e8a20),
+ X(0x39e6975e), X(0x7227d61c), X(0x3a136712), X(0x7211107e),
+ X(0x3a402dd2), X(0x71fa3949), X(0x3a6ceb96), X(0x71e35080),
+ X(0x3a99a057), X(0x71cc5626), X(0x3ac64c0f), X(0x71b54a41),
+ X(0x3af2eeb7), X(0x719e2cd2), X(0x3b1f8848), X(0x7186fdde),
+ X(0x3b4c18ba), X(0x716fbd68), X(0x3b78a007), X(0x71586b74),
+ X(0x3ba51e29), X(0x71410805), X(0x3bd19318), X(0x7129931f),
+ X(0x3bfdfecd), X(0x71120cc5), X(0x3c2a6142), X(0x70fa74fc),
+ X(0x3c56ba70), X(0x70e2cbc6), X(0x3c830a50), X(0x70cb1128),
+ X(0x3caf50da), X(0x70b34525), X(0x3cdb8e09), X(0x709b67c0),
+ X(0x3d07c1d6), X(0x708378ff), X(0x3d33ec39), X(0x706b78e3),
+ X(0x3d600d2c), X(0x70536771), X(0x3d8c24a8), X(0x703b44ad),
+ X(0x3db832a6), X(0x7023109a), X(0x3de4371f), X(0x700acb3c),
+ X(0x3e10320d), X(0x6ff27497), X(0x3e3c2369), X(0x6fda0cae),
+ X(0x3e680b2c), X(0x6fc19385), X(0x3e93e950), X(0x6fa90921),
+ X(0x3ebfbdcd), X(0x6f906d84), X(0x3eeb889c), X(0x6f77c0b3),
+ X(0x3f1749b8), X(0x6f5f02b2), X(0x3f430119), X(0x6f463383),
+ X(0x3f6eaeb8), X(0x6f2d532c), X(0x3f9a5290), X(0x6f1461b0),
+ X(0x3fc5ec98), X(0x6efb5f12), X(0x3ff17cca), X(0x6ee24b57),
+ X(0x401d0321), X(0x6ec92683), X(0x40487f94), X(0x6eaff099),
+ X(0x4073f21d), X(0x6e96a99d), X(0x409f5ab6), X(0x6e7d5193),
+ X(0x40cab958), X(0x6e63e87f), X(0x40f60dfb), X(0x6e4a6e66),
+ X(0x4121589b), X(0x6e30e34a), X(0x414c992f), X(0x6e174730),
+ X(0x4177cfb1), X(0x6dfd9a1c), X(0x41a2fc1a), X(0x6de3dc11),
+ X(0x41ce1e65), X(0x6dca0d14), X(0x41f93689), X(0x6db02d29),
+ X(0x42244481), X(0x6d963c54), X(0x424f4845), X(0x6d7c3a98),
+ X(0x427a41d0), X(0x6d6227fa), X(0x42a5311b), X(0x6d48047e),
+ X(0x42d0161e), X(0x6d2dd027), X(0x42faf0d4), X(0x6d138afb),
+ X(0x4325c135), X(0x6cf934fc), X(0x4350873c), X(0x6cdece2f),
+ X(0x437b42e1), X(0x6cc45698), X(0x43a5f41e), X(0x6ca9ce3b),
+ X(0x43d09aed), X(0x6c8f351c), X(0x43fb3746), X(0x6c748b3f),
+ X(0x4425c923), X(0x6c59d0a9), X(0x4450507e), X(0x6c3f055d),
+ X(0x447acd50), X(0x6c242960), X(0x44a53f93), X(0x6c093cb6),
+ X(0x44cfa740), X(0x6bee3f62), X(0x44fa0450), X(0x6bd3316a),
+ X(0x452456bd), X(0x6bb812d1), X(0x454e9e80), X(0x6b9ce39b),
+ X(0x4578db93), X(0x6b81a3cd), X(0x45a30df0), X(0x6b66536b),
+ X(0x45cd358f), X(0x6b4af279), X(0x45f7526b), X(0x6b2f80fb),
+ X(0x4621647d), X(0x6b13fef5), X(0x464b6bbe), X(0x6af86c6c),
+ X(0x46756828), X(0x6adcc964), X(0x469f59b4), X(0x6ac115e2),
+ X(0x46c9405c), X(0x6aa551e9), X(0x46f31c1a), X(0x6a897d7d),
+ X(0x471cece7), X(0x6a6d98a4), X(0x4746b2bc), X(0x6a51a361),
+ X(0x47706d93), X(0x6a359db9), X(0x479a1d67), X(0x6a1987b0),
+ X(0x47c3c22f), X(0x69fd614a), X(0x47ed5be6), X(0x69e12a8c),
+ X(0x4816ea86), X(0x69c4e37a), X(0x48406e08), X(0x69a88c19),
+ X(0x4869e665), X(0x698c246c), X(0x48935397), X(0x696fac78),
+ X(0x48bcb599), X(0x69532442), X(0x48e60c62), X(0x69368bce),
+ X(0x490f57ee), X(0x6919e320), X(0x49389836), X(0x68fd2a3d),
+ X(0x4961cd33), X(0x68e06129), X(0x498af6df), X(0x68c387e9),
+ X(0x49b41533), X(0x68a69e81), X(0x49dd282a), X(0x6889a4f6),
+ X(0x4a062fbd), X(0x686c9b4b), X(0x4a2f2be6), X(0x684f8186),
+ X(0x4a581c9e), X(0x683257ab), X(0x4a8101de), X(0x68151dbe),
+ X(0x4aa9dba2), X(0x67f7d3c5), X(0x4ad2a9e2), X(0x67da79c3),
+ X(0x4afb6c98), X(0x67bd0fbd), X(0x4b2423be), X(0x679f95b7),
+ X(0x4b4ccf4d), X(0x67820bb7), X(0x4b756f40), X(0x676471c0),
+ X(0x4b9e0390), X(0x6746c7d8), X(0x4bc68c36), X(0x67290e02),
+ X(0x4bef092d), X(0x670b4444), X(0x4c177a6e), X(0x66ed6aa1),
+ X(0x4c3fdff4), X(0x66cf8120), X(0x4c6839b7), X(0x66b187c3),
+ X(0x4c9087b1), X(0x66937e91), X(0x4cb8c9dd), X(0x6675658c),
+ X(0x4ce10034), X(0x66573cbb), X(0x4d092ab0), X(0x66390422),
+ X(0x4d31494b), X(0x661abbc5), X(0x4d595bfe), X(0x65fc63a9),
+ X(0x4d8162c4), X(0x65ddfbd3), X(0x4da95d96), X(0x65bf8447),
+ X(0x4dd14c6e), X(0x65a0fd0b), X(0x4df92f46), X(0x65826622),
+ X(0x4e210617), X(0x6563bf92), X(0x4e48d0dd), X(0x6545095f),
+ X(0x4e708f8f), X(0x6526438f), X(0x4e984229), X(0x65076e25),
+ X(0x4ebfe8a5), X(0x64e88926), X(0x4ee782fb), X(0x64c99498),
+ X(0x4f0f1126), X(0x64aa907f), X(0x4f369320), X(0x648b7ce0),
+ X(0x4f5e08e3), X(0x646c59bf), X(0x4f857269), X(0x644d2722),
+ X(0x4faccfab), X(0x642de50d), X(0x4fd420a4), X(0x640e9386),
+ X(0x4ffb654d), X(0x63ef3290), X(0x50229da1), X(0x63cfc231),
+ X(0x5049c999), X(0x63b0426d), X(0x5070e92f), X(0x6390b34a),
+ X(0x5097fc5e), X(0x637114cc), X(0x50bf031f), X(0x635166f9),
+ X(0x50e5fd6d), X(0x6331a9d4), X(0x510ceb40), X(0x6311dd64),
+ X(0x5133cc94), X(0x62f201ac), X(0x515aa162), X(0x62d216b3),
+ X(0x518169a5), X(0x62b21c7b), X(0x51a82555), X(0x6292130c),
+ X(0x51ced46e), X(0x6271fa69), X(0x51f576ea), X(0x6251d298),
+ X(0x521c0cc2), X(0x62319b9d), X(0x524295f0), X(0x6211557e),
+ X(0x5269126e), X(0x61f1003f), X(0x528f8238), X(0x61d09be5),
+ X(0x52b5e546), X(0x61b02876), X(0x52dc3b92), X(0x618fa5f7),
+ X(0x53028518), X(0x616f146c), X(0x5328c1d0), X(0x614e73da),
+ X(0x534ef1b5), X(0x612dc447), X(0x537514c2), X(0x610d05b7),
+ X(0x539b2af0), X(0x60ec3830), X(0x53c13439), X(0x60cb5bb7),
+ X(0x53e73097), X(0x60aa7050), X(0x540d2005), X(0x60897601),
+ X(0x5433027d), X(0x60686ccf), X(0x5458d7f9), X(0x604754bf),
+ X(0x547ea073), X(0x60262dd6), X(0x54a45be6), X(0x6004f819),
+ X(0x54ca0a4b), X(0x5fe3b38d), X(0x54efab9c), X(0x5fc26038),
+ X(0x55153fd4), X(0x5fa0fe1f), X(0x553ac6ee), X(0x5f7f8d46),
+ X(0x556040e2), X(0x5f5e0db3), X(0x5585adad), X(0x5f3c7f6b),
+ X(0x55ab0d46), X(0x5f1ae274), X(0x55d05faa), X(0x5ef936d1),
+ X(0x55f5a4d2), X(0x5ed77c8a), X(0x561adcb9), X(0x5eb5b3a2),
+ X(0x56400758), X(0x5e93dc1f), X(0x566524aa), X(0x5e71f606),
+ X(0x568a34a9), X(0x5e50015d), X(0x56af3750), X(0x5e2dfe29),
+ X(0x56d42c99), X(0x5e0bec6e), X(0x56f9147e), X(0x5de9cc33),
+ X(0x571deefa), X(0x5dc79d7c), X(0x5742bc06), X(0x5da5604f),
+ X(0x57677b9d), X(0x5d8314b1), X(0x578c2dba), X(0x5d60baa7),
+ X(0x57b0d256), X(0x5d3e5237), X(0x57d5696d), X(0x5d1bdb65),
+ X(0x57f9f2f8), X(0x5cf95638), X(0x581e6ef1), X(0x5cd6c2b5),
+ X(0x5842dd54), X(0x5cb420e0), X(0x58673e1b), X(0x5c9170bf),
+ X(0x588b9140), X(0x5c6eb258), X(0x58afd6bd), X(0x5c4be5b0),
+ X(0x58d40e8c), X(0x5c290acc), X(0x58f838a9), X(0x5c0621b2),
+ X(0x591c550e), X(0x5be32a67), X(0x594063b5), X(0x5bc024f0),
+ X(0x59646498), X(0x5b9d1154), X(0x598857b2), X(0x5b79ef96),
+ X(0x59ac3cfd), X(0x5b56bfbd), X(0x59d01475), X(0x5b3381ce),
+ X(0x59f3de12), X(0x5b1035cf), X(0x5a1799d1), X(0x5aecdbc5),
+ X(0x5a3b47ab), X(0x5ac973b5), X(0x5a5ee79a), X(0x5aa5fda5),
+ X(0x5a82799a), X(0x5a82799a)
+ };
+
+ /* {sin((2*i+1)*PI/4096), cos((2*i+1)*PI/4096)}, with i = 0 to 511 */
+static LOOKUP_T sincos_lookup1[1024] = {
+ X(0x001921fb), X(0x7ffffd88), X(0x004b65ee), X(0x7fffe9cb),
+ X(0x007da9d4), X(0x7fffc251), X(0x00afeda8), X(0x7fff8719),
+ X(0x00e23160), X(0x7fff3824), X(0x011474f6), X(0x7ffed572),
+ X(0x0146b860), X(0x7ffe5f03), X(0x0178fb99), X(0x7ffdd4d7),
+ X(0x01ab3e97), X(0x7ffd36ee), X(0x01dd8154), X(0x7ffc8549),
+ X(0x020fc3c6), X(0x7ffbbfe6), X(0x024205e8), X(0x7ffae6c7),
+ X(0x027447b0), X(0x7ff9f9ec), X(0x02a68917), X(0x7ff8f954),
+ X(0x02d8ca16), X(0x7ff7e500), X(0x030b0aa4), X(0x7ff6bcf0),
+ X(0x033d4abb), X(0x7ff58125), X(0x036f8a51), X(0x7ff4319d),
+ X(0x03a1c960), X(0x7ff2ce5b), X(0x03d407df), X(0x7ff1575d),
+ X(0x040645c7), X(0x7fefcca4), X(0x04388310), X(0x7fee2e30),
+ X(0x046abfb3), X(0x7fec7c02), X(0x049cfba7), X(0x7feab61a),
+ X(0x04cf36e5), X(0x7fe8dc78), X(0x05017165), X(0x7fe6ef1c),
+ X(0x0533ab20), X(0x7fe4ee06), X(0x0565e40d), X(0x7fe2d938),
+ X(0x05981c26), X(0x7fe0b0b1), X(0x05ca5361), X(0x7fde7471),
+ X(0x05fc89b8), X(0x7fdc247a), X(0x062ebf22), X(0x7fd9c0ca),
+ X(0x0660f398), X(0x7fd74964), X(0x06932713), X(0x7fd4be46),
+ X(0x06c5598a), X(0x7fd21f72), X(0x06f78af6), X(0x7fcf6ce8),
+ X(0x0729bb4e), X(0x7fcca6a7), X(0x075bea8c), X(0x7fc9ccb2),
+ X(0x078e18a7), X(0x7fc6df08), X(0x07c04598), X(0x7fc3dda9),
+ X(0x07f27157), X(0x7fc0c896), X(0x08249bdd), X(0x7fbd9fd0),
+ X(0x0856c520), X(0x7fba6357), X(0x0888ed1b), X(0x7fb7132b),
+ X(0x08bb13c5), X(0x7fb3af4e), X(0x08ed3916), X(0x7fb037bf),
+ X(0x091f5d06), X(0x7facac7f), X(0x09517f8f), X(0x7fa90d8e),
+ X(0x0983a0a7), X(0x7fa55aee), X(0x09b5c048), X(0x7fa1949e),
+ X(0x09e7de6a), X(0x7f9dbaa0), X(0x0a19fb04), X(0x7f99ccf4),
+ X(0x0a4c1610), X(0x7f95cb9a), X(0x0a7e2f85), X(0x7f91b694),
+ X(0x0ab0475c), X(0x7f8d8de1), X(0x0ae25d8d), X(0x7f895182),
+ X(0x0b147211), X(0x7f850179), X(0x0b4684df), X(0x7f809dc5),
+ X(0x0b7895f0), X(0x7f7c2668), X(0x0baaa53b), X(0x7f779b62),
+ X(0x0bdcb2bb), X(0x7f72fcb4), X(0x0c0ebe66), X(0x7f6e4a5e),
+ X(0x0c40c835), X(0x7f698461), X(0x0c72d020), X(0x7f64aabf),
+ X(0x0ca4d620), X(0x7f5fbd77), X(0x0cd6da2d), X(0x7f5abc8a),
+ X(0x0d08dc3f), X(0x7f55a7fa), X(0x0d3adc4e), X(0x7f507fc7),
+ X(0x0d6cda53), X(0x7f4b43f2), X(0x0d9ed646), X(0x7f45f47b),
+ X(0x0dd0d01f), X(0x7f409164), X(0x0e02c7d7), X(0x7f3b1aad),
+ X(0x0e34bd66), X(0x7f359057), X(0x0e66b0c3), X(0x7f2ff263),
+ X(0x0e98a1e9), X(0x7f2a40d2), X(0x0eca90ce), X(0x7f247ba5),
+ X(0x0efc7d6b), X(0x7f1ea2dc), X(0x0f2e67b8), X(0x7f18b679),
+ X(0x0f604faf), X(0x7f12b67c), X(0x0f923546), X(0x7f0ca2e7),
+ X(0x0fc41876), X(0x7f067bba), X(0x0ff5f938), X(0x7f0040f6),
+ X(0x1027d784), X(0x7ef9f29d), X(0x1059b352), X(0x7ef390ae),
+ X(0x108b8c9b), X(0x7eed1b2c), X(0x10bd6356), X(0x7ee69217),
+ X(0x10ef377d), X(0x7edff570), X(0x11210907), X(0x7ed94538),
+ X(0x1152d7ed), X(0x7ed28171), X(0x1184a427), X(0x7ecbaa1a),
+ X(0x11b66dad), X(0x7ec4bf36), X(0x11e83478), X(0x7ebdc0c6),
+ X(0x1219f880), X(0x7eb6aeca), X(0x124bb9be), X(0x7eaf8943),
+ X(0x127d7829), X(0x7ea85033), X(0x12af33ba), X(0x7ea1039b),
+ X(0x12e0ec6a), X(0x7e99a37c), X(0x1312a230), X(0x7e922fd6),
+ X(0x13445505), X(0x7e8aa8ac), X(0x137604e2), X(0x7e830dff),
+ X(0x13a7b1bf), X(0x7e7b5fce), X(0x13d95b93), X(0x7e739e1d),
+ X(0x140b0258), X(0x7e6bc8eb), X(0x143ca605), X(0x7e63e03b),
+ X(0x146e4694), X(0x7e5be40c), X(0x149fe3fc), X(0x7e53d462),
+ X(0x14d17e36), X(0x7e4bb13c), X(0x1503153a), X(0x7e437a9c),
+ X(0x1534a901), X(0x7e3b3083), X(0x15663982), X(0x7e32d2f4),
+ X(0x1597c6b7), X(0x7e2a61ed), X(0x15c95097), X(0x7e21dd73),
+ X(0x15fad71b), X(0x7e194584), X(0x162c5a3b), X(0x7e109a24),
+ X(0x165dd9f0), X(0x7e07db52), X(0x168f5632), X(0x7dff0911),
+ X(0x16c0cef9), X(0x7df62362), X(0x16f2443e), X(0x7ded2a47),
+ X(0x1723b5f9), X(0x7de41dc0), X(0x17552422), X(0x7ddafdce),
+ X(0x17868eb3), X(0x7dd1ca75), X(0x17b7f5a3), X(0x7dc883b4),
+ X(0x17e958ea), X(0x7dbf298d), X(0x181ab881), X(0x7db5bc02),
+ X(0x184c1461), X(0x7dac3b15), X(0x187d6c82), X(0x7da2a6c6),
+ X(0x18aec0db), X(0x7d98ff17), X(0x18e01167), X(0x7d8f4409),
+ X(0x19115e1c), X(0x7d85759f), X(0x1942a6f3), X(0x7d7b93da),
+ X(0x1973ebe6), X(0x7d719eba), X(0x19a52ceb), X(0x7d679642),
+ X(0x19d669fc), X(0x7d5d7a74), X(0x1a07a311), X(0x7d534b50),
+ X(0x1a38d823), X(0x7d4908d9), X(0x1a6a0929), X(0x7d3eb30f),
+ X(0x1a9b361d), X(0x7d3449f5), X(0x1acc5ef6), X(0x7d29cd8c),
+ X(0x1afd83ad), X(0x7d1f3dd6), X(0x1b2ea43a), X(0x7d149ad5),
+ X(0x1b5fc097), X(0x7d09e489), X(0x1b90d8bb), X(0x7cff1af5),
+ X(0x1bc1ec9e), X(0x7cf43e1a), X(0x1bf2fc3a), X(0x7ce94dfb),
+ X(0x1c240786), X(0x7cde4a98), X(0x1c550e7c), X(0x7cd333f3),
+ X(0x1c861113), X(0x7cc80a0f), X(0x1cb70f43), X(0x7cbcccec),
+ X(0x1ce80906), X(0x7cb17c8d), X(0x1d18fe54), X(0x7ca618f3),
+ X(0x1d49ef26), X(0x7c9aa221), X(0x1d7adb73), X(0x7c8f1817),
+ X(0x1dabc334), X(0x7c837ad8), X(0x1ddca662), X(0x7c77ca65),
+ X(0x1e0d84f5), X(0x7c6c06c0), X(0x1e3e5ee5), X(0x7c602fec),
+ X(0x1e6f342c), X(0x7c5445e9), X(0x1ea004c1), X(0x7c4848ba),
+ X(0x1ed0d09d), X(0x7c3c3860), X(0x1f0197b8), X(0x7c3014de),
+ X(0x1f325a0b), X(0x7c23de35), X(0x1f63178f), X(0x7c179467),
+ X(0x1f93d03c), X(0x7c0b3777), X(0x1fc4840a), X(0x7bfec765),
+ X(0x1ff532f2), X(0x7bf24434), X(0x2025dcec), X(0x7be5ade6),
+ X(0x205681f1), X(0x7bd9047c), X(0x208721f9), X(0x7bcc47fa),
+ X(0x20b7bcfe), X(0x7bbf7860), X(0x20e852f6), X(0x7bb295b0),
+ X(0x2118e3dc), X(0x7ba59fee), X(0x21496fa7), X(0x7b989719),
+ X(0x2179f64f), X(0x7b8b7b36), X(0x21aa77cf), X(0x7b7e4c45),
+ X(0x21daf41d), X(0x7b710a49), X(0x220b6b32), X(0x7b63b543),
+ X(0x223bdd08), X(0x7b564d36), X(0x226c4996), X(0x7b48d225),
+ X(0x229cb0d5), X(0x7b3b4410), X(0x22cd12bd), X(0x7b2da2fa),
+ X(0x22fd6f48), X(0x7b1feee5), X(0x232dc66d), X(0x7b1227d3),
+ X(0x235e1826), X(0x7b044dc7), X(0x238e646a), X(0x7af660c2),
+ X(0x23beab33), X(0x7ae860c7), X(0x23eeec78), X(0x7ada4dd8),
+ X(0x241f2833), X(0x7acc27f7), X(0x244f5e5c), X(0x7abdef25),
+ X(0x247f8eec), X(0x7aafa367), X(0x24afb9da), X(0x7aa144bc),
+ X(0x24dfdf20), X(0x7a92d329), X(0x250ffeb7), X(0x7a844eae),
+ X(0x25401896), X(0x7a75b74f), X(0x25702cb7), X(0x7a670d0d),
+ X(0x25a03b11), X(0x7a584feb), X(0x25d0439f), X(0x7a497feb),
+ X(0x26004657), X(0x7a3a9d0f), X(0x26304333), X(0x7a2ba75a),
+ X(0x26603a2c), X(0x7a1c9ece), X(0x26902b39), X(0x7a0d836d),
+ X(0x26c01655), X(0x79fe5539), X(0x26effb76), X(0x79ef1436),
+ X(0x271fda96), X(0x79dfc064), X(0x274fb3ae), X(0x79d059c8),
+ X(0x277f86b5), X(0x79c0e062), X(0x27af53a6), X(0x79b15435),
+ X(0x27df1a77), X(0x79a1b545), X(0x280edb23), X(0x79920392),
+ X(0x283e95a1), X(0x79823f20), X(0x286e49ea), X(0x797267f2),
+ X(0x289df7f8), X(0x79627e08), X(0x28cd9fc1), X(0x79528167),
+ X(0x28fd4140), X(0x79427210), X(0x292cdc6d), X(0x79325006),
+ X(0x295c7140), X(0x79221b4b), X(0x298bffb2), X(0x7911d3e2),
+ X(0x29bb87bc), X(0x790179cd), X(0x29eb0957), X(0x78f10d0f),
+ X(0x2a1a847b), X(0x78e08dab), X(0x2a49f920), X(0x78cffba3),
+ X(0x2a796740), X(0x78bf56f9), X(0x2aa8ced3), X(0x78ae9fb0),
+ X(0x2ad82fd2), X(0x789dd5cb), X(0x2b078a36), X(0x788cf94c),
+ X(0x2b36ddf7), X(0x787c0a36), X(0x2b662b0e), X(0x786b088c),
+ X(0x2b957173), X(0x7859f44f), X(0x2bc4b120), X(0x7848cd83),
+ X(0x2bf3ea0d), X(0x7837942b), X(0x2c231c33), X(0x78264849),
+ X(0x2c52478a), X(0x7814e9df), X(0x2c816c0c), X(0x780378f1),
+ X(0x2cb089b1), X(0x77f1f581), X(0x2cdfa071), X(0x77e05f91),
+ X(0x2d0eb046), X(0x77ceb725), X(0x2d3db928), X(0x77bcfc3f),
+ X(0x2d6cbb10), X(0x77ab2ee2), X(0x2d9bb5f6), X(0x77994f11),
+ X(0x2dcaa9d5), X(0x77875cce), X(0x2df996a3), X(0x7775581d),
+ X(0x2e287c5a), X(0x776340ff), X(0x2e575af3), X(0x77511778),
+ X(0x2e863267), X(0x773edb8b), X(0x2eb502ae), X(0x772c8d3a),
+ X(0x2ee3cbc1), X(0x771a2c88), X(0x2f128d99), X(0x7707b979),
+ X(0x2f41482e), X(0x76f5340e), X(0x2f6ffb7a), X(0x76e29c4b),
+ X(0x2f9ea775), X(0x76cff232), X(0x2fcd4c19), X(0x76bd35c7),
+ X(0x2ffbe95d), X(0x76aa670d), X(0x302a7f3a), X(0x76978605),
+ X(0x30590dab), X(0x768492b4), X(0x308794a6), X(0x76718d1c),
+ X(0x30b61426), X(0x765e7540), X(0x30e48c22), X(0x764b4b23),
+ X(0x3112fc95), X(0x76380ec8), X(0x31416576), X(0x7624c031),
+ X(0x316fc6be), X(0x76115f63), X(0x319e2067), X(0x75fdec60),
+ X(0x31cc7269), X(0x75ea672a), X(0x31fabcbd), X(0x75d6cfc5),
+ X(0x3228ff5c), X(0x75c32634), X(0x32573a3f), X(0x75af6a7b),
+ X(0x32856d5e), X(0x759b9c9b), X(0x32b398b3), X(0x7587bc98),
+ X(0x32e1bc36), X(0x7573ca75), X(0x330fd7e1), X(0x755fc635),
+ X(0x333debab), X(0x754bafdc), X(0x336bf78f), X(0x7537876c),
+ X(0x3399fb85), X(0x75234ce8), X(0x33c7f785), X(0x750f0054),
+ X(0x33f5eb89), X(0x74faa1b3), X(0x3423d78a), X(0x74e63108),
+ X(0x3451bb81), X(0x74d1ae55), X(0x347f9766), X(0x74bd199f),
+ X(0x34ad6b32), X(0x74a872e8), X(0x34db36df), X(0x7493ba34),
+ X(0x3508fa66), X(0x747eef85), X(0x3536b5be), X(0x746a12df),
+ X(0x356468e2), X(0x74552446), X(0x359213c9), X(0x744023bc),
+ X(0x35bfb66e), X(0x742b1144), X(0x35ed50c9), X(0x7415ece2),
+ X(0x361ae2d3), X(0x7400b69a), X(0x36486c86), X(0x73eb6e6e),
+ X(0x3675edd9), X(0x73d61461), X(0x36a366c6), X(0x73c0a878),
+ X(0x36d0d746), X(0x73ab2ab4), X(0x36fe3f52), X(0x73959b1b),
+ X(0x372b9ee3), X(0x737ff9ae), X(0x3758f5f2), X(0x736a4671),
+ X(0x37864477), X(0x73548168), X(0x37b38a6d), X(0x733eaa96),
+ X(0x37e0c7cc), X(0x7328c1ff), X(0x380dfc8d), X(0x7312c7a5),
+ X(0x383b28a9), X(0x72fcbb8c), X(0x38684c19), X(0x72e69db7),
+ X(0x389566d6), X(0x72d06e2b), X(0x38c278d9), X(0x72ba2cea),
+ X(0x38ef821c), X(0x72a3d9f7), X(0x391c8297), X(0x728d7557),
+ X(0x39497a43), X(0x7276ff0d), X(0x39766919), X(0x7260771b),
+ X(0x39a34f13), X(0x7249dd86), X(0x39d02c2a), X(0x72333251),
+ X(0x39fd0056), X(0x721c7580), X(0x3a29cb91), X(0x7205a716),
+ X(0x3a568dd4), X(0x71eec716), X(0x3a834717), X(0x71d7d585),
+ X(0x3aaff755), X(0x71c0d265), X(0x3adc9e86), X(0x71a9bdba),
+ X(0x3b093ca3), X(0x71929789), X(0x3b35d1a5), X(0x717b5fd3),
+ X(0x3b625d86), X(0x7164169d), X(0x3b8ee03e), X(0x714cbbeb),
+ X(0x3bbb59c7), X(0x71354fc0), X(0x3be7ca1a), X(0x711dd220),
+ X(0x3c143130), X(0x7106430e), X(0x3c408f03), X(0x70eea28e),
+ X(0x3c6ce38a), X(0x70d6f0a4), X(0x3c992ec0), X(0x70bf2d53),
+ X(0x3cc5709e), X(0x70a7589f), X(0x3cf1a91c), X(0x708f728b),
+ X(0x3d1dd835), X(0x70777b1c), X(0x3d49fde1), X(0x705f7255),
+ X(0x3d761a19), X(0x70475839), X(0x3da22cd7), X(0x702f2ccd),
+ X(0x3dce3614), X(0x7016f014), X(0x3dfa35c8), X(0x6ffea212),
+ X(0x3e262bee), X(0x6fe642ca), X(0x3e52187f), X(0x6fcdd241),
+ X(0x3e7dfb73), X(0x6fb5507a), X(0x3ea9d4c3), X(0x6f9cbd79),
+ X(0x3ed5a46b), X(0x6f841942), X(0x3f016a61), X(0x6f6b63d8),
+ X(0x3f2d26a0), X(0x6f529d40), X(0x3f58d921), X(0x6f39c57d),
+ X(0x3f8481dd), X(0x6f20dc92), X(0x3fb020ce), X(0x6f07e285),
+ X(0x3fdbb5ec), X(0x6eeed758), X(0x40074132), X(0x6ed5bb10),
+ X(0x4032c297), X(0x6ebc8db0), X(0x405e3a16), X(0x6ea34f3d),
+ X(0x4089a7a8), X(0x6e89ffb9), X(0x40b50b46), X(0x6e709f2a),
+ X(0x40e064ea), X(0x6e572d93), X(0x410bb48c), X(0x6e3daaf8),
+ X(0x4136fa27), X(0x6e24175c), X(0x416235b2), X(0x6e0a72c5),
+ X(0x418d6729), X(0x6df0bd35), X(0x41b88e84), X(0x6dd6f6b1),
+ X(0x41e3abbc), X(0x6dbd1f3c), X(0x420ebecb), X(0x6da336dc),
+ X(0x4239c7aa), X(0x6d893d93), X(0x4264c653), X(0x6d6f3365),
+ X(0x428fbabe), X(0x6d551858), X(0x42baa4e6), X(0x6d3aec6e),
+ X(0x42e584c3), X(0x6d20afac), X(0x43105a50), X(0x6d066215),
+ X(0x433b2585), X(0x6cec03af), X(0x4365e65b), X(0x6cd1947c),
+ X(0x43909ccd), X(0x6cb71482), X(0x43bb48d4), X(0x6c9c83c3),
+ X(0x43e5ea68), X(0x6c81e245), X(0x44108184), X(0x6c67300b),
+ X(0x443b0e21), X(0x6c4c6d1a), X(0x44659039), X(0x6c319975),
+ X(0x449007c4), X(0x6c16b521), X(0x44ba74bd), X(0x6bfbc021),
+ X(0x44e4d71c), X(0x6be0ba7b), X(0x450f2edb), X(0x6bc5a431),
+ X(0x45397bf4), X(0x6baa7d49), X(0x4563be60), X(0x6b8f45c7),
+ X(0x458df619), X(0x6b73fdae), X(0x45b82318), X(0x6b58a503),
+ X(0x45e24556), X(0x6b3d3bcb), X(0x460c5cce), X(0x6b21c208),
+ X(0x46366978), X(0x6b0637c1), X(0x46606b4e), X(0x6aea9cf8),
+ X(0x468a624a), X(0x6acef1b2), X(0x46b44e65), X(0x6ab335f4),
+ X(0x46de2f99), X(0x6a9769c1), X(0x470805df), X(0x6a7b8d1e),
+ X(0x4731d131), X(0x6a5fa010), X(0x475b9188), X(0x6a43a29a),
+ X(0x478546de), X(0x6a2794c1), X(0x47aef12c), X(0x6a0b7689),
+ X(0x47d8906d), X(0x69ef47f6), X(0x48022499), X(0x69d3090e),
+ X(0x482badab), X(0x69b6b9d3), X(0x48552b9b), X(0x699a5a4c),
+ X(0x487e9e64), X(0x697dea7b), X(0x48a805ff), X(0x69616a65),
+ X(0x48d16265), X(0x6944da10), X(0x48fab391), X(0x6928397e),
+ X(0x4923f97b), X(0x690b88b5), X(0x494d341e), X(0x68eec7b9),
+ X(0x49766373), X(0x68d1f68f), X(0x499f8774), X(0x68b5153a),
+ X(0x49c8a01b), X(0x689823bf), X(0x49f1ad61), X(0x687b2224),
+ X(0x4a1aaf3f), X(0x685e106c), X(0x4a43a5b0), X(0x6840ee9b),
+ X(0x4a6c90ad), X(0x6823bcb7), X(0x4a957030), X(0x68067ac3),
+ X(0x4abe4433), X(0x67e928c5), X(0x4ae70caf), X(0x67cbc6c0),
+ X(0x4b0fc99d), X(0x67ae54ba), X(0x4b387af9), X(0x6790d2b6),
+ X(0x4b6120bb), X(0x677340ba), X(0x4b89badd), X(0x67559eca),
+ X(0x4bb24958), X(0x6737ecea), X(0x4bdacc28), X(0x671a2b20),
+ X(0x4c034345), X(0x66fc596f), X(0x4c2baea9), X(0x66de77dc),
+ X(0x4c540e4e), X(0x66c0866d), X(0x4c7c622d), X(0x66a28524),
+ X(0x4ca4aa41), X(0x66847408), X(0x4ccce684), X(0x6666531d),
+ X(0x4cf516ee), X(0x66482267), X(0x4d1d3b7a), X(0x6629e1ec),
+ X(0x4d455422), X(0x660b91af), X(0x4d6d60df), X(0x65ed31b5),
+ X(0x4d9561ac), X(0x65cec204), X(0x4dbd5682), X(0x65b0429f),
+ X(0x4de53f5a), X(0x6591b38c), X(0x4e0d1c30), X(0x657314cf),
+ X(0x4e34ecfc), X(0x6554666d), X(0x4e5cb1b9), X(0x6535a86b),
+ X(0x4e846a60), X(0x6516dacd), X(0x4eac16eb), X(0x64f7fd98),
+ X(0x4ed3b755), X(0x64d910d1), X(0x4efb4b96), X(0x64ba147d),
+ X(0x4f22d3aa), X(0x649b08a0), X(0x4f4a4f89), X(0x647bed3f),
+ X(0x4f71bf2e), X(0x645cc260), X(0x4f992293), X(0x643d8806),
+ X(0x4fc079b1), X(0x641e3e38), X(0x4fe7c483), X(0x63fee4f8),
+ X(0x500f0302), X(0x63df7c4d), X(0x50363529), X(0x63c0043b),
+ X(0x505d5af1), X(0x63a07cc7), X(0x50847454), X(0x6380e5f6),
+ X(0x50ab814d), X(0x63613fcd), X(0x50d281d5), X(0x63418a50),
+ X(0x50f975e6), X(0x6321c585), X(0x51205d7b), X(0x6301f171),
+ X(0x5147388c), X(0x62e20e17), X(0x516e0715), X(0x62c21b7e),
+ X(0x5194c910), X(0x62a219aa), X(0x51bb7e75), X(0x628208a1),
+ X(0x51e22740), X(0x6261e866), X(0x5208c36a), X(0x6241b8ff),
+ X(0x522f52ee), X(0x62217a72), X(0x5255d5c5), X(0x62012cc2),
+ X(0x527c4bea), X(0x61e0cff5), X(0x52a2b556), X(0x61c06410),
+ X(0x52c91204), X(0x619fe918), X(0x52ef61ee), X(0x617f5f12),
+ X(0x5315a50e), X(0x615ec603), X(0x533bdb5d), X(0x613e1df0),
+ X(0x536204d7), X(0x611d66de), X(0x53882175), X(0x60fca0d2),
+ X(0x53ae3131), X(0x60dbcbd1), X(0x53d43406), X(0x60bae7e1),
+ X(0x53fa29ed), X(0x6099f505), X(0x542012e1), X(0x6078f344),
+ X(0x5445eedb), X(0x6057e2a2), X(0x546bbdd7), X(0x6036c325),
+ X(0x54917fce), X(0x601594d1), X(0x54b734ba), X(0x5ff457ad),
+ X(0x54dcdc96), X(0x5fd30bbc), X(0x5502775c), X(0x5fb1b104),
+ X(0x55280505), X(0x5f90478a), X(0x554d858d), X(0x5f6ecf53),
+ X(0x5572f8ed), X(0x5f4d4865), X(0x55985f20), X(0x5f2bb2c5),
+ X(0x55bdb81f), X(0x5f0a0e77), X(0x55e303e6), X(0x5ee85b82),
+ X(0x5608426e), X(0x5ec699e9), X(0x562d73b2), X(0x5ea4c9b3),
+ X(0x565297ab), X(0x5e82eae5), X(0x5677ae54), X(0x5e60fd84),
+ X(0x569cb7a8), X(0x5e3f0194), X(0x56c1b3a1), X(0x5e1cf71c),
+ X(0x56e6a239), X(0x5dfade20), X(0x570b8369), X(0x5dd8b6a7),
+ X(0x5730572e), X(0x5db680b4), X(0x57551d80), X(0x5d943c4e),
+ X(0x5779d65b), X(0x5d71e979), X(0x579e81b8), X(0x5d4f883b),
+ X(0x57c31f92), X(0x5d2d189a), X(0x57e7afe4), X(0x5d0a9a9a),
+ X(0x580c32a7), X(0x5ce80e41), X(0x5830a7d6), X(0x5cc57394),
+ X(0x58550f6c), X(0x5ca2ca99), X(0x58796962), X(0x5c801354),
+ X(0x589db5b3), X(0x5c5d4dcc), X(0x58c1f45b), X(0x5c3a7a05),
+ X(0x58e62552), X(0x5c179806), X(0x590a4893), X(0x5bf4a7d2),
+ X(0x592e5e19), X(0x5bd1a971), X(0x595265df), X(0x5bae9ce7),
+ X(0x59765fde), X(0x5b8b8239), X(0x599a4c12), X(0x5b68596d),
+ X(0x59be2a74), X(0x5b452288), X(0x59e1faff), X(0x5b21dd90),
+ X(0x5a05bdae), X(0x5afe8a8b), X(0x5a29727b), X(0x5adb297d),
+ X(0x5a4d1960), X(0x5ab7ba6c), X(0x5a70b258), X(0x5a943d5e),
+};
+
+#endif
+
diff --git a/MakefileBasedBuild/app/v_misc.c b/MakefileBasedBuild/app/v_misc.c
new file mode 100644
index 0000000..020c01b
--- /dev/null
+++ b/MakefileBasedBuild/app/v_misc.c
@@ -0,0 +1,209 @@
+#define ADK_INTERNAL
+/********************************************************************
+ * *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
+ * *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
+ * by the XIPHOPHORUS Company http://www.xiph.org/ *
+ * *
+ ********************************************************************/
+
+#define HEAD_ALIGN 64
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#define MISC_C
+#include "v_misc.h"
+#include <sys/time.h>
+
+static void **pointers=NULL;
+static long *insertlist=NULL; /* We can't embed this in the pointer list;
+ a pointer can have any value... */
+
+static char **files=NULL;
+static long *file_bytes=NULL;
+static int filecount=0;
+
+static int ptop=0;
+static int palloced=0;
+static int pinsert=0;
+
+typedef struct {
+ char *file;
+ long line;
+ long ptr;
+ long bytes;
+} head;
+
+long global_bytes=0;
+long start_time=-1;
+
+static void *_insert(void *ptr,long bytes,char *file,long line){
+ ((head *)ptr)->file=file;
+ ((head *)ptr)->line=line;
+ ((head *)ptr)->ptr=pinsert;
+ ((head *)ptr)->bytes=bytes-HEAD_ALIGN;
+
+ if(pinsert>=palloced){
+ palloced+=64;
+ if(pointers){
+ pointers=(void **)realloc(pointers,sizeof(void **)*palloced);
+ insertlist=(long *)realloc(insertlist,sizeof(long *)*palloced);
+ }else{
+ pointers=(void **)malloc(sizeof(void **)*palloced);
+ insertlist=(long *)malloc(sizeof(long *)*palloced);
+ }
+ }
+
+ pointers[pinsert]=ptr;
+
+ if(pinsert==ptop)
+ pinsert=++ptop;
+ else
+ pinsert=insertlist[pinsert];
+
+#ifdef _VDBG_GRAPHFILE
+ {
+ FILE *out;
+ struct timeval tv;
+ static struct timezone tz;
+ int i;
+ char buffer[80];
+ gettimeofday(&tv,&tz);
+
+ for(i=0;i<filecount;i++)
+ if(!strcmp(file,files[i]))break;
+
+ if(i==filecount){
+ filecount++;
+ if(!files){
+ files=malloc(filecount*sizeof(*files));
+ file_bytes=malloc(filecount*sizeof(*file_bytes));
+ }else{
+ files=realloc(files,filecount*sizeof(*files));
+ file_bytes=realloc(file_bytes,filecount*sizeof(*file_bytes));
+ }
+ files[i]=strdup(file);
+ file_bytes[i]=0;
+ }
+
+ file_bytes[i]+=bytes-HEAD_ALIGN;
+
+ if(start_time==-1)start_time=(tv.tv_sec*1000)+(tv.tv_usec/1000);
+
+ snprintf(buffer,80,"%s",file);
+ if(strchr(buffer,'.'))strchr(buffer,'.')[0]=0;
+ strcat(buffer,_VDBG_GRAPHFILE);
+ out=fopen(buffer,"a");
+ fprintf(out,"%ld, %ld\n",-start_time+(tv.tv_sec*1000)+(tv.tv_usec/1000),
+ file_bytes[i]-(bytes-HEAD_ALIGN));
+ fprintf(out,"%ld, %ld # FILE %s LINE %ld\n",
+ -start_time+(tv.tv_sec*1000)+(tv.tv_usec/1000),
+ file_bytes[i],file,line);
+ fclose(out);
+
+ out=fopen("total"_VDBG_GRAPHFILE,"a");
+ fprintf(out,"%ld, %ld\n",-start_time+(tv.tv_sec*1000)+(tv.tv_usec/1000),
+ global_bytes);
+ fprintf(out,"%ld, %ld\n",-start_time+(tv.tv_sec*1000)+(tv.tv_usec/1000),
+ global_bytes+(bytes-HEAD_ALIGN));
+ fclose(out);
+ }
+#endif
+
+ global_bytes+=(bytes-HEAD_ALIGN);
+
+ return(ptr+HEAD_ALIGN);
+}
+
+static void _ripremove(void *ptr){
+ int insert;
+
+#ifdef _VDBG_GRAPHFILE
+ {
+ FILE *out=fopen("total"_VDBG_GRAPHFILE,"a");
+ struct timeval tv;
+ static struct timezone tz;
+ char buffer[80];
+ char *file =((head *)ptr)->file;
+ long bytes =((head *)ptr)->bytes;
+ int i;
+
+ gettimeofday(&tv,&tz);
+ fprintf(out,"%ld, %ld\n",-start_time+(tv.tv_sec*1000)+(tv.tv_usec/1000),
+ global_bytes);
+ fprintf(out,"%ld, %ld\n",-start_time+(tv.tv_sec*1000)+(tv.tv_usec/1000),
+ global_bytes-((head *)ptr)->bytes);
+ fclose(out);
+
+ for(i=0;i<filecount;i++)
+ if(!strcmp(file,files[i]))break;
+
+ snprintf(buffer,80,"%s",file);
+ if(strchr(buffer,'.'))strchr(buffer,'.')[0]=0;
+ strcat(buffer,_VDBG_GRAPHFILE);
+ out=fopen(buffer,"a");
+ fprintf(out,"%ld, %ld\n",-start_time+(tv.tv_sec*1000)+(tv.tv_usec/1000),
+ file_bytes[i]);
+ fprintf(out,"%ld, %ld\n",-start_time+(tv.tv_sec*1000)+(tv.tv_usec/1000),
+ file_bytes[i]-bytes);
+ fclose(out);
+
+ file_bytes[i]-=bytes;
+
+ }
+#endif
+
+ global_bytes-=((head *)ptr)->bytes;
+
+ insert=((head *)ptr)->ptr;
+ insertlist[insert]=pinsert;
+ pinsert=insert;
+
+ if(pointers[insert]==NULL){
+ fprintf(stderr,"DEBUGGING MALLOC ERROR: freeing previously freed memory\n");
+ fprintf(stderr,"\t%s %ld\n",((head *)ptr)->file,((head *)ptr)->line);
+ }
+
+ if(global_bytes<0){
+ fprintf(stderr,"DEBUGGING MALLOC ERROR: freeing unmalloced memory\n");
+ }
+
+ pointers[insert]=NULL;
+}
+
+void _VDBG_dump(void){
+ int i;
+ for(i=0;i<ptop;i++){
+ head *ptr=pointers[i];
+ if(ptr)
+ fprintf(stderr,"unfreed bytes from %s:%ld\n",
+ ptr->file,ptr->line);
+ }
+
+}
+
+extern void *_VDBG_malloc(void *ptr,long bytes,char *file,long line){
+ bytes+=HEAD_ALIGN;
+ if(ptr){
+ ptr-=HEAD_ALIGN;
+ _ripremove(ptr);
+ ptr=realloc(ptr,bytes);
+ }else{
+ ptr=malloc(bytes);
+ memset(ptr,0,bytes);
+ }
+ return _insert(ptr,bytes,file,line);
+}
+
+extern void _VDBG_free(void *ptr,char *file,long line){
+ if(ptr){
+ ptr-=HEAD_ALIGN;
+ _ripremove(ptr);
+ free(ptr);
+ }
+}
+
diff --git a/MakefileBasedBuild/app/v_misc.h b/MakefileBasedBuild/app/v_misc.h
new file mode 100644
index 0000000..a6f1bc1
--- /dev/null
+++ b/MakefileBasedBuild/app/v_misc.h
@@ -0,0 +1,196 @@
+#ifdef ADK_INTERNAL
+/********************************************************************
+ * *
+ * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
+ * *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
+ * *
+ * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 *
+ * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
+ * *
+ ********************************************************************
+
+ function: miscellaneous math and prototypes
+
+ ********************************************************************/
+
+#ifndef _V_RANDOM_H_
+#define _V_RANDOM_H_
+#include "v_ivorbiscodec.h"
+#include "v_os_types.h"
+
+
+/*#define _VDBG_GRAPHFILE "_0.m"*/
+
+
+#ifdef _VDBG_GRAPHFILE
+extern void *_VDBG_malloc(void *ptr,long bytes,char *file,long line);
+extern void _VDBG_free(void *ptr,char *file,long line);
+
+#undef _ogg_malloc
+#undef _ogg_calloc
+#undef _ogg_realloc
+#undef _ogg_free
+
+#define _ogg_malloc(x) _VDBG_malloc(NULL,(x),__FILE__,__LINE__)
+#define _ogg_calloc(x,y) _VDBG_malloc(NULL,(x)*(y),__FILE__,__LINE__)
+#define _ogg_realloc(x,y) _VDBG_malloc((x),(y),__FILE__,__LINE__)
+#define _ogg_free(x) _VDBG_free((x),__FILE__,__LINE__)
+#endif
+
+#include "v_asm_arm.h"
+
+#ifndef _V_WIDE_MATH
+#define _V_WIDE_MATH
+
+#ifndef _LOW_ACCURACY_
+/* 64 bit multiply */
+
+#include <sys/types.h>
+
+#if BYTE_ORDER==LITTLE_ENDIAN
+union magic {
+ struct {
+ ogg_int32_t lo;
+ ogg_int32_t hi;
+ } halves;
+ ogg_int64_t whole;
+};
+#endif
+
+#if BYTE_ORDER==BIG_ENDIAN
+union magic {
+ struct {
+ ogg_int32_t hi;
+ ogg_int32_t lo;
+ } halves;
+ ogg_int64_t whole;
+};
+#endif
+
+static inline ogg_int32_t MULT32(ogg_int32_t x, ogg_int32_t y) {
+ union magic magic;
+ magic.whole = (ogg_int64_t)x * y;
+ return magic.halves.hi;
+}
+
+static inline ogg_int32_t MULT31(ogg_int32_t x, ogg_int32_t y) {
+ return MULT32(x,y)<<1;
+}
+
+static inline ogg_int32_t MULT31_SHIFT15(ogg_int32_t x, ogg_int32_t y) {
+ union magic magic;
+ magic.whole = (ogg_int64_t)x * y;
+ return ((ogg_uint32_t)(magic.halves.lo)>>15) | ((magic.halves.hi)<<17);
+}
+
+#else
+/* 32 bit multiply, more portable but less accurate */
+
+/*
+ * Note: Precision is biased towards the first argument therefore ordering
+ * is important. Shift values were chosen for the best sound quality after
+ * many listening tests.
+ */
+
+/*
+ * For MULT32 and MULT31: The second argument is always a lookup table
+ * value already preshifted from 31 to 8 bits. We therefore take the
+ * opportunity to save on text space and use unsigned char for those
+ * tables in this case.
+ */
+
+static inline ogg_int32_t MULT32(ogg_int32_t x, ogg_int32_t y) {
+ return (x >> 9) * y; /* y preshifted >>23 */
+}
+
+static inline ogg_int32_t MULT31(ogg_int32_t x, ogg_int32_t y) {
+ return (x >> 8) * y; /* y preshifted >>23 */
+}
+
+static inline ogg_int32_t MULT31_SHIFT15(ogg_int32_t x, ogg_int32_t y) {
+ return (x >> 6) * y; /* y preshifted >>9 */
+}
+
+#endif
+
+/*
+ * This should be used as a memory barrier, forcing all cached values in
+ * registers to wr writen back to memory. Might or might not be beneficial
+ * depending on the architecture and compiler.
+ */
+#define MB()
+
+/*
+ * The XPROD functions are meant to optimize the cross products found all
+ * over the place in mdct.c by forcing memory operation ordering to avoid
+ * unnecessary register reloads as soon as memory is being written to.
+ * However this is only beneficial on CPUs with a sane number of general
+ * purpose registers which exclude the Intel x86. On Intel, better let the
+ * compiler actually reload registers directly from original memory by using
+ * macros.
+ */
+
+#ifdef __i386__
+
+#define XPROD32(_a, _b, _t, _v, _x, _y) \
+ { *(_x)=MULT32(_a,_t)+MULT32(_b,_v); \
+ *(_y)=MULT32(_b,_t)-MULT32(_a,_v); }
+#define XPROD31(_a, _b, _t, _v, _x, _y) \
+ { *(_x)=MULT31(_a,_t)+MULT31(_b,_v); \
+ *(_y)=MULT31(_b,_t)-MULT31(_a,_v); }
+#define XNPROD31(_a, _b, _t, _v, _x, _y) \
+ { *(_x)=MULT31(_a,_t)-MULT31(_b,_v); \
+ *(_y)=MULT31(_b,_t)+MULT31(_a,_v); }
+
+#else
+
+static inline void XPROD32(ogg_int32_t a, ogg_int32_t b,
+ ogg_int32_t t, ogg_int32_t v,
+ ogg_int32_t *x, ogg_int32_t *y)
+{
+ *x = MULT32(a, t) + MULT32(b, v);
+ *y = MULT32(b, t) - MULT32(a, v);
+}
+
+static inline void XPROD31(ogg_int32_t a, ogg_int32_t b,
+ ogg_int32_t t, ogg_int32_t v,
+ ogg_int32_t *x, ogg_int32_t *y)
+{
+ *x = MULT31(a, t) + MULT31(b, v);
+ *y = MULT31(b, t) - MULT31(a, v);
+}
+
+static inline void XNPROD31(ogg_int32_t a, ogg_int32_t b,
+ ogg_int32_t t, ogg_int32_t v,
+ ogg_int32_t *x, ogg_int32_t *y)
+{
+ *x = MULT31(a, t) - MULT31(b, v);
+ *y = MULT31(b, t) + MULT31(a, v);
+}
+
+#endif
+
+#endif
+
+#ifndef _V_CLIP_MATH
+#define _V_CLIP_MATH
+
+static inline ogg_int32_t CLIP_TO_15(ogg_int32_t x) {
+ int ret=x;
+ ret-= ((x<=32767)-1)&(x-32767);
+ ret-= ((x>=-32768)-1)&(x+32768);
+ return(ret);
+}
+
+#endif
+
+#endif
+
+
+
+
+#endif
+
diff --git a/MakefileBasedBuild/app/v_ogg.h b/MakefileBasedBuild/app/v_ogg.h
new file mode 100644
index 0000000..1cbaf2c
--- /dev/null
+++ b/MakefileBasedBuild/app/v_ogg.h
@@ -0,0 +1,209 @@
+#ifdef ADK_INTERNAL
+/********************************************************************
+ * *
+ * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
+ * *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
+ * *
+ * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 *
+ * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
+ * *
+ ********************************************************************
+
+ function: subsumed libogg includes
+
+ ********************************************************************/
+#ifndef _OGG_H
+#define _OGG_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "v_os_types.h"
+
+typedef struct ogg_buffer_state{
+ struct ogg_buffer *unused_buffers;
+ struct ogg_reference *unused_references;
+ int outstanding;
+ int shutdown;
+} ogg_buffer_state;
+
+typedef struct ogg_buffer {
+ unsigned char *data;
+ long size;
+ int refcount;
+
+ union {
+ ogg_buffer_state *owner;
+ struct ogg_buffer *next;
+ } ptr;
+} ogg_buffer;
+
+typedef struct ogg_reference {
+ ogg_buffer *buffer;
+ long begin;
+ long length;
+
+ struct ogg_reference *next;
+} ogg_reference;
+
+typedef struct oggpack_buffer {
+ int headbit;
+ unsigned char *headptr;
+ long headend;
+
+ /* memory management */
+ ogg_reference *head;
+ ogg_reference *tail;
+
+ /* render the byte/bit counter API constant time */
+ long count; /* doesn't count the tail */
+} oggpack_buffer;
+
+typedef struct oggbyte_buffer {
+ ogg_reference *baseref;
+
+ ogg_reference *ref;
+ unsigned char *ptr;
+ long pos;
+ long end;
+} oggbyte_buffer;
+
+typedef struct ogg_sync_state {
+ /* decode memory management pool */
+ ogg_buffer_state *bufferpool;
+
+ /* stream buffers */
+ ogg_reference *fifo_head;
+ ogg_reference *fifo_tail;
+ long fifo_fill;
+
+ /* stream sync management */
+ int unsynced;
+ int headerbytes;
+ int bodybytes;
+
+} ogg_sync_state;
+
+typedef struct ogg_stream_state {
+ ogg_reference *header_head;
+ ogg_reference *header_tail;
+ ogg_reference *body_head;
+ ogg_reference *body_tail;
+
+ int e_o_s; /* set when we have buffered the last
+ packet in the logical bitstream */
+ int b_o_s; /* set after we've written the initial page
+ of a logical bitstream */
+ long serialno;
+ long pageno;
+ ogg_int64_t packetno; /* sequence number for decode; the framing
+ knows where there's a hole in the data,
+ but we need coupling so that the codec
+ (which is in a seperate abstraction
+ layer) also knows about the gap */
+ ogg_int64_t granulepos;
+
+ int lacing_fill;
+ ogg_uint32_t body_fill;
+
+ /* decode-side state data */
+ int holeflag;
+ int spanflag;
+ int clearflag;
+ int laceptr;
+ ogg_uint32_t body_fill_next;
+
+} ogg_stream_state;
+
+typedef struct {
+ ogg_reference *packet;
+ long bytes;
+ long b_o_s;
+ long e_o_s;
+ ogg_int64_t granulepos;
+ ogg_int64_t packetno; /* sequence number for decode; the framing
+ knows where there's a hole in the data,
+ but we need coupling so that the codec
+ (which is in a seperate abstraction
+ layer) also knows about the gap */
+} ogg_packet;
+
+typedef struct {
+ ogg_reference *header;
+ int header_len;
+ ogg_reference *body;
+ long body_len;
+} ogg_page;
+
+/* Ogg BITSTREAM PRIMITIVES: bitstream ************************/
+
+extern void oggpack_readinit(oggpack_buffer *b,ogg_reference *r);
+extern long oggpack_look(oggpack_buffer *b,int bits);
+extern void oggpack_adv(oggpack_buffer *b,int bits);
+extern long oggpack_read(oggpack_buffer *b,int bits);
+extern long oggpack_bytes(oggpack_buffer *b);
+extern long oggpack_bits(oggpack_buffer *b);
+extern int oggpack_eop(oggpack_buffer *b);
+
+/* Ogg BITSTREAM PRIMITIVES: decoding **************************/
+
+extern ogg_sync_state *ogg_sync_create(void);
+extern int ogg_sync_destroy(ogg_sync_state *oy);
+extern int ogg_sync_reset(ogg_sync_state *oy);
+
+extern unsigned char *ogg_sync_bufferin(ogg_sync_state *oy, long size);
+extern int ogg_sync_wrote(ogg_sync_state *oy, long bytes);
+extern long ogg_sync_pageseek(ogg_sync_state *oy,ogg_page *og);
+extern int ogg_sync_pageout(ogg_sync_state *oy, ogg_page *og);
+extern int ogg_stream_pagein(ogg_stream_state *os, ogg_page *og);
+extern int ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op);
+extern int ogg_stream_packetpeek(ogg_stream_state *os,ogg_packet *op);
+
+/* Ogg BITSTREAM PRIMITIVES: general ***************************/
+
+extern ogg_stream_state *ogg_stream_create(int serialno);
+extern int ogg_stream_destroy(ogg_stream_state *os);
+extern int ogg_stream_reset(ogg_stream_state *os);
+extern int ogg_stream_reset_serialno(ogg_stream_state *os,int serialno);
+extern int ogg_stream_eos(ogg_stream_state *os);
+
+extern int ogg_page_checksum_set(ogg_page *og);
+
+extern int ogg_page_version(ogg_page *og);
+extern int ogg_page_continued(ogg_page *og);
+extern int ogg_page_bos(ogg_page *og);
+extern int ogg_page_eos(ogg_page *og);
+extern ogg_int64_t ogg_page_granulepos(ogg_page *og);
+extern ogg_uint32_t ogg_page_serialno(ogg_page *og);
+extern ogg_uint32_t ogg_page_pageno(ogg_page *og);
+extern int ogg_page_packets(ogg_page *og);
+extern int ogg_page_getbuffer(ogg_page *og, unsigned char **buffer);
+
+extern int ogg_packet_release(ogg_packet *op);
+extern int ogg_page_release(ogg_page *og);
+
+extern void ogg_page_dup(ogg_page *d, ogg_page *s);
+
+/* Ogg BITSTREAM PRIMITIVES: return codes ***************************/
+
+#define OGG_SUCCESS 0
+
+#define OGG_HOLE -10
+#define OGG_SPAN -11
+#define OGG_EVERSION -12
+#define OGG_ESERIAL -13
+#define OGG_EINVAL -14
+#define OGG_EEOS -15
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OGG_H */
+#endif
+
diff --git a/MakefileBasedBuild/app/v_os.h b/MakefileBasedBuild/app/v_os.h
new file mode 100644
index 0000000..301b3a3
--- /dev/null
+++ b/MakefileBasedBuild/app/v_os.h
@@ -0,0 +1,65 @@
+#ifdef ADK_INTERNAL
+#ifndef _OS_H
+#define _OS_H
+/********************************************************************
+ * *
+ * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
+ * *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
+ * *
+ * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
+ * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
+ * *
+ ********************************************************************
+
+ function: #ifdef jail to whip a few platforms into the UNIX ideal.
+
+ ********************************************************************/
+
+#include <math.h>
+#include "v_os_types.h"
+
+#ifndef _V_IFDEFJAIL_H_
+# define _V_IFDEFJAIL_H_
+
+# ifdef __GNUC__
+# define STIN static __inline__
+# elif _WIN32
+# define STIN static __inline
+# endif
+#else
+# define STIN static
+#endif
+
+#ifndef M_PI
+# define M_PI (3.1415926536f)
+#endif
+
+#ifdef _WIN32
+# include <malloc.h>
+# define rint(x) (floor((x)+0.5f))
+# define NO_FLOAT_MATH_LIB
+# define FAST_HYPOT(a, b) sqrt((a)*(a) + (b)*(b))
+#endif
+
+#ifdef HAVE_ALLOCA_H
+# include <alloca.h>
+#endif
+
+#ifdef USE_MEMORY_H
+# include <memory.h>
+#endif
+
+#ifndef min
+# define min(x,y) ((x)>(y)?(y):(x))
+#endif
+
+#ifndef max
+# define max(x,y) ((x)<(y)?(y):(x))
+#endif
+
+#endif /* _OS_H */
+#endif
+
diff --git a/MakefileBasedBuild/app/v_os_types.h b/MakefileBasedBuild/app/v_os_types.h
new file mode 100644
index 0000000..97c85d0
--- /dev/null
+++ b/MakefileBasedBuild/app/v_os_types.h
@@ -0,0 +1,140 @@
+#ifdef ADK_INTERNAL
+/********************************************************************
+ * *
+ * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
+ * *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
+ * *
+ * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
+ * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
+ * *
+ ********************************************************************
+
+ function: #ifdef jail to whip a few platforms into the UNIX ideal.
+
+ ********************************************************************/
+#ifndef _OS_TYPES_H
+#define _OS_TYPES_H
+
+//defines since we cannot have a makefile...
+#define BYTE_ORDER 1
+#define LITTLE_ENDIAN 1
+#define BIG_ENDIAN=2
+#define _ARM_ASSEM_
+
+
+#ifdef _LOW_ACCURACY_
+# define X(n) (((((n)>>22)+1)>>1) - ((((n)>>22)+1)>>9))
+# define LOOKUP_T const unsigned char
+#else
+# define X(n) (n)
+# define LOOKUP_T const ogg_int32_t
+#endif
+
+/* make it easy on the folks that want to compile the libs with a
+ different malloc than stdlib */
+#if 1
+#define _ogg_malloc malloc
+#define _ogg_calloc calloc
+#define _ogg_realloc realloc
+#define _ogg_free free
+#else
+#define _ogg_malloc(x) ({ \
+ void *p = malloc(x); \
+ dbgPrintf("M %d = %p\n", (x), p); \
+ p; \
+})
+#define _ogg_calloc(x,y) ({ \
+ void *p = calloc(x,y); \
+ dbgPrintf("C %d %d \ %p\n", (x), (y), p); \
+ p; \
+})
+#define _ogg_realloc(x,y) ({ \
+ void *p = realloc(x,y); \
+ dbgPrintf("R %d %d = %p\n", (x), (y), p); \
+ p; \
+})
+#define _ogg_free(x) ({ \
+ dbgPrintf("F %p\n", (x)); \
+ free(x); \
+})
+
+#undef alloca
+#define alloca(x) ({ \
+ void *p = __builtin_alloca(x); \
+ dbgPrintf("A %d F %p bot %p\n", (x), __builtin_frame_address(0), p); \
+ p; \
+})
+#endif
+
+#if 0
+#define VT do { \
+ dbgPrintf("%s:%d Frame %p\n", __func__, __LINE__, __builtin_frame_address(0)); \
+} while (0)
+#else
+#define VT do { } while (0)
+#endif
+
+#ifdef _WIN32
+
+# ifndef __GNUC__
+ /* MSVC/Borland */
+ typedef __int64 ogg_int64_t;
+ typedef __int32 ogg_int32_t;
+ typedef unsigned __int32 ogg_uint32_t;
+ typedef __int16 ogg_int16_t;
+ typedef unsigned __int16 ogg_uint16_t;
+# else
+ /* Cygwin */
+ #include <_G_config.h>
+ typedef _G_int64_t ogg_int64_t;
+ typedef _G_int32_t ogg_int32_t;
+ typedef _G_uint32_t ogg_uint32_t;
+ typedef _G_int16_t ogg_int16_t;
+ typedef _G_uint16_t ogg_uint16_t;
+# endif
+
+#elif defined(__MACOS__)
+
+# include <sys/types.h>
+ typedef SInt16 ogg_int16_t;
+ typedef UInt16 ogg_uint16_t;
+ typedef SInt32 ogg_int32_t;
+ typedef UInt32 ogg_uint32_t;
+ typedef SInt64 ogg_int64_t;
+
+#elif defined(__MACOSX__) /* MacOS X Framework build */
+
+# include <sys/types.h>
+ typedef int16_t ogg_int16_t;
+ typedef u_int16_t ogg_uint16_t;
+ typedef int32_t ogg_int32_t;
+ typedef u_int32_t ogg_uint32_t;
+ typedef int64_t ogg_int64_t;
+
+#elif defined(__BEOS__)
+
+ /* Be */
+# include <inttypes.h>
+
+#elif defined (__EMX__)
+
+ /* OS/2 GCC */
+ typedef short ogg_int16_t;
+ typedef unsigned short ogg_uint16_t;
+ typedef int ogg_int32_t;
+ typedef unsigned int ogg_uint32_t;
+ typedef long long ogg_int64_t;
+
+#else
+
+# include <sys/types.h>
+# include "v_config_types.h"
+
+#endif
+
+#endif /* _OS_TYPES_H */
+#endif
+
diff --git a/MakefileBasedBuild/app/v_res012.c b/MakefileBasedBuild/app/v_res012.c
new file mode 100644
index 0000000..143f1ba
--- /dev/null
+++ b/MakefileBasedBuild/app/v_res012.c
@@ -0,0 +1,226 @@
+#define ADK_INTERNAL
+/********************************************************************
+ * *
+ * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
+ * *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
+ * *
+ * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 *
+ * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
+ * *
+ ********************************************************************
+
+ function: residue backend 0, 1 and 2 implementation
+
+ ********************************************************************/
+
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include "v_ogg.h"
+#include "v_ivorbiscodec.h"
+#include "v_codec_internal.h"
+#include "v_codebook.h"
+#include "v_misc.h"
+#include "v_os.h"
+
+void res_clear_info(vorbis_info_residue *info){
+ if(info){
+ if(info->stagemasks)_ogg_free(info->stagemasks);
+ if(info->stagebooks)_ogg_free(info->stagebooks);
+ memset(info,0,sizeof(*info));
+ }
+}
+
+
+/* vorbis_info is for range checking */
+int res_unpack(vorbis_info_residue *info,
+ vorbis_info *vi,oggpack_buffer *opb){
+ int j,k;
+ codec_setup_info *ci=(codec_setup_info *)vi->codec_setup;
+ memset(info,0,sizeof(*info));
+
+ info->type=oggpack_read(opb,16);
+ if(info->type>2 || info->type<0)goto errout;
+ info->begin=oggpack_read(opb,24);
+ info->end=oggpack_read(opb,24);
+ info->grouping=oggpack_read(opb,24)+1;
+ info->partitions=oggpack_read(opb,6)+1;
+ info->groupbook=oggpack_read(opb,8);
+ if(info->groupbook>=ci->books)goto errout;
+
+ info->stagemasks=_ogg_malloc(info->partitions*sizeof(*info->stagemasks));
+ info->stagebooks=_ogg_malloc(info->partitions*8*sizeof(*info->stagebooks));
+
+ for(j=0;j<info->partitions;j++){
+ int cascade=oggpack_read(opb,3);
+ if(oggpack_read(opb,1))
+ cascade|=(oggpack_read(opb,5)<<3);
+ info->stagemasks[j]=cascade;
+ }
+
+ for(j=0;j<info->partitions;j++){
+ for(k=0;k<8;k++){
+ if((info->stagemasks[j]>>k)&1){
+ unsigned char book=oggpack_read(opb,8);
+ if(book>=ci->books)goto errout;
+ info->stagebooks[j*8+k]=book;
+ if(k+1>info->stages)info->stages=k+1;
+ }else
+ info->stagebooks[j*8+k]=0xff;
+ }
+ }
+
+ if(oggpack_eop(opb))goto errout;
+
+ return 0;
+ errout:
+ res_clear_info(info);
+ return 1;
+}
+
+int res_inverse(vorbis_dsp_state *vd,vorbis_info_residue *info,
+ ogg_int32_t **in,int *nonzero,int ch){
+
+ int i,j,k,s,used=0;
+ codec_setup_info *ci=(codec_setup_info *)vd->vi->codec_setup;
+ codebook *phrasebook=ci->book_param+info->groupbook;
+ int samples_per_partition=info->grouping;
+ int partitions_per_word=phrasebook->dim;
+ int pcmend=ci->blocksizes[vd->W];
+
+ if(info->type<2){
+ int max=pcmend>>1;
+ int end=(info->end<max?info->end:max);
+ int n=end-info->begin;
+
+ if(n>0){
+ int partvals=n/samples_per_partition;
+ int partwords=(partvals+partitions_per_word-1)/partitions_per_word;
+
+ for(i=0;i<ch;i++)
+ if(nonzero[i])
+ in[used++]=in[i];
+ ch=used;
+
+ if(used){
+
+ char **partword=(char **)alloca(ch*sizeof(*partword));
+ for(j=0;j<ch;j++)
+ partword[j]=(char *)alloca(partwords*partitions_per_word*
+ sizeof(*partword[j]));
+
+ for(s=0;s<info->stages;s++){
+
+ for(i=0;i<partvals;){
+ if(s==0){
+ /* fetch the partition word for each channel */
+
+ partword[0][i+partitions_per_word-1]=1;
+ for(k=partitions_per_word-2;k>=0;k--)
+ partword[0][i+k]=partword[0][i+k+1]*info->partitions;
+
+ for(j=1;j<ch;j++)
+ for(k=partitions_per_word-1;k>=0;k--)
+ partword[j][i+k]=partword[j-1][i+k];
+
+ for(j=0;j<ch;j++){
+ int temp=vorbis_book_decode(phrasebook,&vd->opb);
+ if(temp==-1)goto eopbreak;
+
+ /* this can be done quickly in assembly due to the quotient
+ always being at most six bits */
+ for(k=0;k<partitions_per_word;k++){
+ ogg_uint32_t div=partword[j][i+k];
+ partword[j][i+k]=temp/div;
+ temp-=partword[j][i+k]*div;
+ }
+
+ }
+ }
+
+ /* now we decode residual values for the partitions */
+ for(k=0;k<partitions_per_word && i<partvals;k++,i++)
+ for(j=0;j<ch;j++){
+ long offset=info->begin+i*samples_per_partition;
+ if(info->stagemasks[(int)partword[j][i]]&(1<<s)){
+ codebook *stagebook=ci->book_param+
+ info->stagebooks[(partword[j][i]<<3)+s];
+ if(info->type){
+ if(vorbis_book_decodev_add(stagebook,in[j]+offset,&vd->opb,
+ samples_per_partition,-8)==-1)
+ goto eopbreak;
+ }else{
+ if(vorbis_book_decodevs_add(stagebook,in[j]+offset,&vd->opb,
+ samples_per_partition,-8)==-1)
+ goto eopbreak;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }else{
+ int max=(pcmend*ch)>>1;
+ int end=(info->end<max?info->end:max);
+ int n=end-info->begin;
+
+ if(n>0){
+ int partvals=n/samples_per_partition;
+ int partwords=(partvals+partitions_per_word-1)/partitions_per_word;
+
+ char *partword=
+ (char *)alloca(partwords*partitions_per_word*sizeof(*partword));
+ int beginoff=info->begin/ch;
+
+ for(i=0;i<ch;i++)if(nonzero[i])break;
+ if(i==ch)return(0); /* no nonzero vectors */
+
+ samples_per_partition/=ch;
+
+ for(s=0;s<info->stages;s++){
+ for(i=0;i<partvals;){
+
+ if(s==0){
+ int temp;
+ partword[i+partitions_per_word-1]=1;
+ for(k=partitions_per_word-2;k>=0;k--)
+ partword[i+k]=partword[i+k+1]*info->partitions;
+
+ /* fetch the partition word */
+ temp=vorbis_book_decode(phrasebook,&vd->opb);
+ if(temp==-1)goto eopbreak;
+
+ /* this can be done quickly in assembly due to the quotient
+ always being at most six bits */
+ for(k=0;k<partitions_per_word;k++){
+ ogg_uint32_t div=partword[i+k];
+ partword[i+k]=temp/div;
+ temp-=partword[i+k]*div;
+ }
+ }
+
+ /* now we decode residual values for the partitions */
+ for(k=0;k<partitions_per_word && i<partvals;k++,i++)
+ if(info->stagemasks[(int)partword[i]]&(1<<s)){
+ codebook *stagebook=ci->book_param+
+ info->stagebooks[(partword[i]<<3)+s];
+ if(vorbis_book_decodevv_add(stagebook,in,
+ i*samples_per_partition+beginoff,ch,
+ &vd->opb,
+ samples_per_partition,-8)==-1)
+ goto eopbreak;
+ }
+ }
+ }
+ }
+ }
+ errout:
+ eopbreak:
+
+ return 0;
+}
+
diff --git a/MakefileBasedBuild/app/v_vorbisfile.c b/MakefileBasedBuild/app/v_vorbisfile.c
new file mode 100644
index 0000000..b9e2788
--- /dev/null
+++ b/MakefileBasedBuild/app/v_vorbisfile.c
@@ -0,0 +1,1590 @@
+#define ADK_INTERNAL
+/********************************************************************
+ * *
+ * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
+ * *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
+ * *
+ * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 *
+ * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
+ * *
+ ********************************************************************
+
+ function: stdio-based convenience library for opening/seeking/decoding
+ last mod: $Id: vorbisfile.c,v 1.6.2.5 2003/11/20 06:16:17 xiphmont Exp $
+
+ ********************************************************************/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <math.h>
+
+#include "v_codec_internal.h"
+#include "v_ivorbisfile.h"
+
+#include "v_os.h"
+#include "v_misc.h"
+
+#define NOTOPEN 0
+#define PARTOPEN 1
+#define OPENED 2
+#define STREAMSET 3 /* serialno and link set, but not to current link */
+#define LINKSET 4 /* serialno and link set to current link */
+#define INITSET 5
+
+/* A 'chained bitstream' is a Vorbis bitstream that contains more than
+ one logical bitstream arranged end to end (the only form of Ogg
+ multiplexing allowed in a Vorbis bitstream; grouping [parallel
+ multiplexing] is not allowed in Vorbis) */
+
+/* A Vorbis file can be played beginning to end (streamed) without
+ worrying ahead of time about chaining (see decoder_example.c). If
+ we have the whole file, however, and want random access
+ (seeking/scrubbing) or desire to know the total length/time of a
+ file, we need to account for the possibility of chaining. */
+
+/* We can handle things a number of ways; we can determine the entire
+ bitstream structure right off the bat, or find pieces on demand.
+ This example determines and caches structure for the entire
+ bitstream, but builds a virtual decoder on the fly when moving
+ between links in the chain. */
+
+/* There are also different ways to implement seeking. Enough
+ information exists in an Ogg bitstream to seek to
+ sample-granularity positions in the output. Or, one can seek by
+ picking some portion of the stream roughly in the desired area if
+ we only want coarse navigation through the stream. */
+
+/*************************************************************************
+ * Many, many internal helpers. The intention is not to be confusing;
+ * rampant duplication and monolithic function implementation would be
+ * harder to understand anyway. The high level functions are last. Begin
+ * grokking near the end of the file */
+
+
+/* read a little more data from the file/pipe into the ogg_sync framer */
+static long _get_data(OggVorbis_File *vf){
+ errno=0;
+ if(vf->datasource){
+ unsigned char *buffer=ogg_sync_bufferin(vf->oy,CHUNKSIZE);
+ long bytes=(vf->callbacks.read_func)(buffer,1,CHUNKSIZE,vf->datasource);
+ if(bytes>0)ogg_sync_wrote(vf->oy,bytes);
+ if(bytes==0 && errno)return -1;
+ return bytes;
+ }else
+ return 0;
+}
+
+/* save a tiny smidge of verbosity to make the code more readable */
+static void _seek_helper(OggVorbis_File *vf,ogg_int64_t offset){
+ if(vf->datasource){
+ (vf->callbacks.seek_func)(vf->datasource, offset, SEEK_SET);
+ vf->offset=offset;
+ ogg_sync_reset(vf->oy);
+ }else{
+ /* shouldn't happen unless someone writes a broken callback */
+ return;
+ }
+}
+
+/* The read/seek functions track absolute position within the stream */
+
+/* from the head of the stream, get the next page. boundary specifies
+ if the function is allowed to fetch more data from the stream (and
+ how much) or only use internally buffered data.
+
+ boundary: -1) unbounded search
+ 0) read no additional data; use cached only
+ n) search for a new page beginning for n bytes
+
+ return: <0) did not find a page (OV_FALSE, OV_EOF, OV_EREAD)
+ n) found a page at absolute offset n
+
+ produces a refcounted page */
+
+static ogg_int64_t _get_next_page(OggVorbis_File *vf,ogg_page *og,
+ ogg_int64_t boundary){
+ if(boundary>0)boundary+=vf->offset;
+ while(1){
+ long more;
+
+ if(boundary>0 && vf->offset>=boundary)return OV_FALSE;
+ more=ogg_sync_pageseek(vf->oy,og);
+
+ if(more<0){
+ /* skipped n bytes */
+ vf->offset-=more;
+ }else{
+ if(more==0){
+ /* send more paramedics */
+ if(!boundary)return OV_FALSE;
+ {
+ long ret=_get_data(vf);
+ if(ret==0)return OV_EOF;
+ if(ret<0)return OV_EREAD;
+ }
+ }else{
+ /* got a page. Return the offset at the page beginning,
+ advance the internal offset past the page end */
+ ogg_int64_t ret=vf->offset;
+ vf->offset+=more;
+ return ret;
+
+ }
+ }
+ }
+}
+
+/* find the latest page beginning before the current stream cursor
+ position. Much dirtier than the above as Ogg doesn't have any
+ backward search linkage. no 'readp' as it will certainly have to
+ read. */
+/* returns offset or OV_EREAD, OV_FAULT and produces a refcounted page */
+
+static ogg_int64_t _get_prev_page(OggVorbis_File *vf,ogg_page *og){
+ ogg_int64_t begin=vf->offset;
+ ogg_int64_t end=begin;
+ ogg_int64_t ret;
+ ogg_int64_t offset=-1;
+
+ while(offset==-1){
+ begin-=CHUNKSIZE;
+ if(begin<0)
+ begin=0;
+ _seek_helper(vf,begin);
+ while(vf->offset<end){
+ ret=_get_next_page(vf,og,end-vf->offset);
+ if(ret==OV_EREAD)return OV_EREAD;
+ if(ret<0){
+ break;
+ }else{
+ offset=ret;
+ }
+ }
+ }
+
+ /* we have the offset. Actually snork and hold the page now */
+ _seek_helper(vf,offset);
+ ret=_get_next_page(vf,og,CHUNKSIZE);
+ if(ret<0)
+ /* this shouldn't be possible */
+ return OV_EFAULT;
+
+ return offset;
+}
+
+/* finds each bitstream link one at a time using a bisection search
+ (has to begin by knowing the offset of the lb's initial page).
+ Recurses for each link so it can alloc the link storage after
+ finding them all, then unroll and fill the cache at the same time */
+static int _bisect_forward_serialno(OggVorbis_File *vf,
+ ogg_int64_t begin,
+ ogg_int64_t searched,
+ ogg_int64_t end,
+ ogg_uint32_t currentno,
+ long m){
+ ogg_int64_t endsearched=end;
+ ogg_int64_t next=end;
+ ogg_page og={0,0,0,0};
+ ogg_int64_t ret;
+
+ /* the below guards against garbage seperating the last and
+ first pages of two links. */
+ while(searched<endsearched){
+ ogg_int64_t bisect;
+
+ if(endsearched-searched<CHUNKSIZE){
+ bisect=searched;
+ }else{
+ bisect=(searched+endsearched)/2;
+ }
+
+ _seek_helper(vf,bisect);
+ ret=_get_next_page(vf,&og,-1);
+ if(ret==OV_EREAD)return OV_EREAD;
+ if(ret<0 || ogg_page_serialno(&og)!=currentno){
+ endsearched=bisect;
+ if(ret>=0)next=ret;
+ }else{
+ searched=ret+og.header_len+og.body_len;
+ }
+ ogg_page_release(&og);
+ }
+
+ _seek_helper(vf,next);
+ ret=_get_next_page(vf,&og,-1);
+ if(ret==OV_EREAD)return OV_EREAD;
+
+ if(searched>=end || ret<0){
+ ogg_page_release(&og);
+ vf->links=m+1;
+ vf->offsets=_ogg_malloc((vf->links+1)*sizeof(*vf->offsets));
+ vf->serialnos=_ogg_malloc(vf->links*sizeof(*vf->serialnos));
+ vf->offsets[m+1]=searched;
+ }else{
+ ret=_bisect_forward_serialno(vf,next,vf->offset,
+ end,ogg_page_serialno(&og),m+1);
+ ogg_page_release(&og);
+ if(ret==OV_EREAD)return OV_EREAD;
+ }
+
+ vf->offsets[m]=begin;
+ vf->serialnos[m]=currentno;
+ return 0;
+}
+
+static int _decode_clear(OggVorbis_File *vf){
+ if(vf->ready_state==INITSET){
+ vorbis_dsp_destroy(vf->vd);
+ vf->vd=0;
+ vf->ready_state=STREAMSET;
+ }
+
+ if(vf->ready_state>=STREAMSET){
+ vorbis_info_clear(&vf->vi);
+ vorbis_comment_clear(&vf->vc);
+ vf->ready_state=OPENED;
+ }
+ return 0;
+}
+
+/* uses the local ogg_stream storage in vf; this is important for
+ non-streaming input sources */
+/* consumes the page that's passed in (if any) */
+/* state is LINKSET upon successful return */
+
+static int _fetch_headers(OggVorbis_File *vf,
+ vorbis_info *vi,
+ vorbis_comment *vc,
+ ogg_uint32_t *serialno,
+ ogg_page *og_ptr){
+ ogg_page og={0,0,0,0};
+ ogg_packet op={0,0,0,0,0,0};
+ int i,ret;
+
+ if(vf->ready_state>OPENED)_decode_clear(vf);
+
+ if(!og_ptr){
+ ogg_int64_t llret=_get_next_page(vf,&og,CHUNKSIZE);
+ if(llret==OV_EREAD)return OV_EREAD;
+ if(llret<0)return OV_ENOTVORBIS;
+ og_ptr=&og;
+ }
+
+ ogg_stream_reset_serialno(vf->os,ogg_page_serialno(og_ptr));
+ if(serialno)*serialno=vf->os->serialno;
+
+ /* extract the initial header from the first page and verify that the
+ Ogg bitstream is in fact Vorbis data */
+
+ vorbis_info_init(vi);
+ vorbis_comment_init(vc);
+
+ i=0;
+ while(i<3){
+ ogg_stream_pagein(vf->os,og_ptr);
+ while(i<3){
+ int result=ogg_stream_packetout(vf->os,&op);
+ if(result==0)break;
+ if(result==-1){
+ ret=OV_EBADHEADER;
+ goto bail_header;
+ }
+ if((ret=vorbis_dsp_headerin(vi,vc,&op))){
+ goto bail_header;
+ }
+ i++;
+ }
+ if(i<3)
+ if(_get_next_page(vf,og_ptr,CHUNKSIZE)<0){
+ ret=OV_EBADHEADER;
+ goto bail_header;
+ }
+ }
+
+ ogg_packet_release(&op);
+ ogg_page_release(&og);
+ vf->ready_state=LINKSET;
+ return 0;
+
+ bail_header:
+ ogg_packet_release(&op);
+ ogg_page_release(&og);
+ vorbis_info_clear(vi);
+ vorbis_comment_clear(vc);
+ vf->ready_state=OPENED;
+
+ return ret;
+}
+
+/* we no longer preload all vorbis_info (and the associated
+ codec_setup) structs. Call this to seek and fetch the info from
+ the bitstream, if needed */
+static int _set_link_number(OggVorbis_File *vf,int link){
+ if(link != vf->current_link) _decode_clear(vf);
+ if(vf->ready_state<STREAMSET){
+ _seek_helper(vf,vf->offsets[link]);
+ ogg_stream_reset_serialno(vf->os,vf->serialnos[link]);
+ vf->current_serialno=vf->serialnos[link];
+ vf->current_link=link;
+ return _fetch_headers(vf,&vf->vi,&vf->vc,&vf->current_serialno,NULL);
+ }
+ return 0;
+}
+
+static int _set_link_number_preserve_pos(OggVorbis_File *vf,int link){
+ ogg_int64_t pos=vf->offset;
+ int ret=_set_link_number(vf,link);
+ if(ret)return ret;
+ _seek_helper(vf,pos);
+ if(pos<vf->offsets[link] || pos>=vf->offsets[link+1])
+ vf->ready_state=STREAMSET;
+ return 0;
+}
+
+/* last step of the OggVorbis_File initialization; get all the offset
+ positions. Only called by the seekable initialization (local
+ stream storage is hacked slightly; pay attention to how that's
+ done) */
+
+/* this is void and does not propogate errors up because we want to be
+ able to open and use damaged bitstreams as well as we can. Just
+ watch out for missing information for links in the OggVorbis_File
+ struct */
+static void _prefetch_all_offsets(OggVorbis_File *vf, ogg_int64_t dataoffset){
+ ogg_page og={0,0,0,0};
+ int i;
+ ogg_int64_t ret;
+
+ vf->dataoffsets=_ogg_malloc(vf->links*sizeof(*vf->dataoffsets));
+ vf->pcmlengths=_ogg_malloc(vf->links*2*sizeof(*vf->pcmlengths));
+
+ for(i=0;i<vf->links;i++){
+ if(i==0){
+ /* we already grabbed the initial header earlier. Just set the offset */
+ vf->dataoffsets[i]=dataoffset;
+ _seek_helper(vf,dataoffset);
+
+ }else{
+
+ /* seek to the location of the initial header */
+
+ _seek_helper(vf,vf->offsets[i]);
+ if(_fetch_headers(vf,&vf->vi,&vf->vc,NULL,NULL)<0){
+ vf->dataoffsets[i]=-1;
+ }else{
+ vf->dataoffsets[i]=vf->offset;
+ }
+ }
+
+ /* fetch beginning PCM offset */
+
+ if(vf->dataoffsets[i]!=-1){
+ ogg_int64_t accumulated=0,pos;
+ long lastblock=-1;
+ int result;
+
+ ogg_stream_reset_serialno(vf->os,vf->serialnos[i]);
+
+ while(1){
+ ogg_packet op={0,0,0,0,0,0};
+
+ ret=_get_next_page(vf,&og,-1);
+ if(ret<0)
+ /* this should not be possible unless the file is
+ truncated/mangled */
+ break;
+
+ if(ogg_page_serialno(&og)!=vf->serialnos[i])
+ break;
+
+ pos=ogg_page_granulepos(&og);
+
+ /* count blocksizes of all frames in the page */
+ ogg_stream_pagein(vf->os,&og);
+ while((result=ogg_stream_packetout(vf->os,&op))){
+ if(result>0){ /* ignore holes */
+ long thisblock=vorbis_packet_blocksize(&vf->vi,&op);
+ if(lastblock!=-1)
+ accumulated+=(lastblock+thisblock)>>2;
+ lastblock=thisblock;
+ }
+ }
+ ogg_packet_release(&op);
+
+ if(pos!=-1){
+ /* pcm offset of last packet on the first audio page */
+ accumulated= pos-accumulated;
+ break;
+ }
+ }
+
+ /* less than zero? This is a stream with samples trimmed off
+ the beginning, a normal occurrence; set the offset to zero */
+ if(accumulated<0)accumulated=0;
+
+ vf->pcmlengths[i*2]=accumulated;
+ }
+
+ /* get the PCM length of this link. To do this,
+ get the last page of the stream */
+ {
+ ogg_int64_t end=vf->offsets[i+1];
+ _seek_helper(vf,end);
+
+ while(1){
+ ret=_get_prev_page(vf,&og);
+ if(ret<0){
+ /* this should not be possible */
+ vorbis_info_clear(&vf->vi);
+ vorbis_comment_clear(&vf->vc);
+ break;
+ }
+ if(ogg_page_granulepos(&og)!=-1){
+ vf->pcmlengths[i*2+1]=ogg_page_granulepos(&og)-vf->pcmlengths[i*2];
+ break;
+ }
+ vf->offset=ret;
+ }
+ }
+ }
+ ogg_page_release(&og);
+}
+
+static int _make_decode_ready(OggVorbis_File *vf){
+ int i;
+ switch(vf->ready_state){
+ case OPENED:
+ case STREAMSET:
+ for(i=0;i<vf->links;i++)
+ if(vf->offsets[i+1]>=vf->offset)break;
+ if(i==vf->links)return -1;
+ i=_set_link_number_preserve_pos(vf,i);
+ if(i)return i;
+ /* fall through */
+ case LINKSET:
+ vf->vd=vorbis_dsp_create(&vf->vi);
+ vf->ready_state=INITSET;
+ vf->bittrack=0;
+ vf->samptrack=0;
+ case INITSET:
+ return 0;
+ default:
+ return -1;
+ }
+
+}
+
+static int _open_seekable2(OggVorbis_File *vf){
+ ogg_uint32_t serialno=vf->current_serialno;
+ ogg_uint32_t tempserialno;
+ ogg_int64_t dataoffset=vf->offset, end;
+ ogg_page og={0,0,0,0};
+
+ /* we're partially open and have a first link header state in
+ storage in vf */
+ /* we can seek, so set out learning all about this file */
+ (vf->callbacks.seek_func)(vf->datasource,0,SEEK_END);
+ vf->offset=vf->end=(vf->callbacks.tell_func)(vf->datasource);
+
+ /* We get the offset for the last page of the physical bitstream.
+ Most OggVorbis files will contain a single logical bitstream */
+ end=_get_prev_page(vf,&og);
+ if(end<0)return end;
+
+ /* more than one logical bitstream? */
+ tempserialno=ogg_page_serialno(&og);
+ ogg_page_release(&og);
+
+ if(tempserialno!=serialno){
+
+ /* Chained bitstream. Bisect-search each logical bitstream
+ section. Do so based on serial number only */
+ if(_bisect_forward_serialno(vf,0,0,end+1,serialno,0)<0)return OV_EREAD;
+
+ }else{
+
+ /* Only one logical bitstream */
+ if(_bisect_forward_serialno(vf,0,end,end+1,serialno,0))return OV_EREAD;
+
+ }
+
+ /* the initial header memory is referenced by vf after; don't free it */
+ _prefetch_all_offsets(vf,dataoffset);
+ return ov_raw_seek(vf,0);
+}
+
+/* fetch and process a packet. Handles the case where we're at a
+ bitstream boundary and dumps the decoding machine. If the decoding
+ machine is unloaded, it loads it. It also keeps pcm_offset up to
+ date (seek and read both use this. seek uses a special hack with
+ readp).
+
+ return: <0) error, OV_HOLE (lost packet) or OV_EOF
+ 0) need more data (only if readp==0)
+ 1) got a packet
+*/
+
+static int _fetch_and_process_packet(OggVorbis_File *vf,
+ int readp,
+ int spanp){
+ ogg_page og={0,0,0,0};
+ ogg_packet op={0,0,0,0,0,0};
+ int ret=0;
+
+ /* handle one packet. Try to fetch it from current stream state */
+ /* extract packets from page */
+ while(1){
+
+ /* process a packet if we can. If the machine isn't loaded,
+ neither is a page */
+ if(vf->ready_state==INITSET){
+ while(1) {
+ int result=ogg_stream_packetout(vf->os,&op);
+ ogg_int64_t granulepos;
+
+ if(result<0){
+ ret=OV_HOLE; /* hole in the data. */
+ goto cleanup;
+ }
+ if(result>0){
+ /* got a packet. process it */
+ granulepos=op.granulepos;
+ if(!vorbis_dsp_synthesis(vf->vd,&op,1)){ /* lazy check for lazy
+ header handling. The
+ header packets aren't
+ audio, so if/when we
+ submit them,
+ vorbis_synthesis will
+ reject them */
+
+ vf->samptrack+=vorbis_dsp_pcmout(vf->vd,NULL,0);
+ vf->bittrack+=op.bytes*8;
+
+ /* update the pcm offset. */
+ if(granulepos!=-1 && !op.e_o_s){
+ int link=(vf->seekable?vf->current_link:0);
+ int i,samples;
+
+ /* this packet has a pcm_offset on it (the last packet
+ completed on a page carries the offset) After processing
+ (above), we know the pcm position of the *last* sample
+ ready to be returned. Find the offset of the *first*
+
+ As an aside, this trick is inaccurate if we begin
+ reading anew right at the last page; the end-of-stream
+ granulepos declares the last frame in the stream, and the
+ last packet of the last page may be a partial frame.
+ So, we need a previous granulepos from an in-sequence page
+ to have a reference point. Thus the !op.e_o_s clause
+ above */
+
+ if(vf->seekable && link>0)
+ granulepos-=vf->pcmlengths[link*2];
+ if(granulepos<0)granulepos=0; /* actually, this
+ shouldn't be possible
+ here unless the stream
+ is very broken */
+
+ samples=vorbis_dsp_pcmout(vf->vd,NULL,0);
+
+ granulepos-=samples;
+ for(i=0;i<link;i++)
+ granulepos+=vf->pcmlengths[i*2+1];
+ vf->pcm_offset=granulepos;
+ }
+ ret=1;
+ goto cleanup;
+ }
+ }
+ else
+ break;
+ }
+ }
+
+ if(vf->ready_state>=OPENED){
+ int ret;
+ if(!readp){
+ ret=0;
+ goto cleanup;
+ }
+ if((ret=_get_next_page(vf,&og,-1))<0){
+ ret=OV_EOF; /* eof. leave unitialized */
+ goto cleanup;
+ }
+
+ /* bitrate tracking; add the header's bytes here, the body bytes
+ are done by packet above */
+ vf->bittrack+=og.header_len*8;
+
+ /* has our decoding just traversed a bitstream boundary? */
+ if(vf->ready_state==INITSET){
+ if(vf->current_serialno!=ogg_page_serialno(&og)){
+ if(!spanp){
+ ret=OV_EOF;
+ goto cleanup;
+ }
+
+ _decode_clear(vf);
+ }
+ }
+ }
+
+ /* Do we need to load a new machine before submitting the page? */
+ /* This is different in the seekable and non-seekable cases.
+
+ In the seekable case, we already have all the header
+ information loaded and cached; we just initialize the machine
+ with it and continue on our merry way.
+
+ In the non-seekable (streaming) case, we'll only be at a
+ boundary if we just left the previous logical bitstream and
+ we're now nominally at the header of the next bitstream
+ */
+
+ if(vf->ready_state!=INITSET){
+ int link,ret;
+
+ if(vf->ready_state<STREAMSET){
+ if(vf->seekable){
+ vf->current_serialno=ogg_page_serialno(&og);
+
+ /* match the serialno to bitstream section. We use this rather than
+ offset positions to avoid problems near logical bitstream
+ boundaries */
+ for(link=0;link<vf->links;link++)
+ if(vf->serialnos[link]==vf->current_serialno)break;
+ if(link==vf->links){
+ ret=OV_EBADLINK; /* sign of a bogus stream. error out,
+ leave machine uninitialized */
+ goto cleanup;
+ }
+
+ vf->current_link=link;
+ ret=_fetch_headers(vf,&vf->vi,&vf->vc,&vf->current_serialno,&og);
+ if(ret) goto cleanup;
+
+ }else{
+ /* we're streaming */
+ /* fetch the three header packets, build the info struct */
+
+ int ret=_fetch_headers(vf,&vf->vi,&vf->vc,&vf->current_serialno,&og);
+ if(ret) goto cleanup;
+ vf->current_link++;
+ }
+ }
+
+ if(_make_decode_ready(vf)) return OV_EBADLINK;
+ }
+ ogg_stream_pagein(vf->os,&og);
+ }
+ cleanup:
+ ogg_packet_release(&op);
+ ogg_page_release(&og);
+ return ret;
+}
+
+/* if, eg, 64 bit stdio is configured by default, this will build with
+ fseek64 */
+static int _fseek64_wrap(FILE *f,ogg_int64_t off,int whence){
+ if(f==NULL)return -1;
+ return fseek(f,off,whence);
+}
+
+static int _ov_open1(void *f,OggVorbis_File *vf,char *initial,
+ long ibytes, ov_callbacks callbacks){
+ int offsettest=(f?callbacks.seek_func(f,0,SEEK_CUR):-1);
+ int ret;
+
+ memset(vf,0,sizeof(*vf));
+
+ /* Tremor assumes in multiple places that right shift of a signed
+ integer is an arithmetic shift */
+ if( (-1>>1) != -1) return OV_EIMPL;
+
+ vf->datasource=f;
+ vf->callbacks = callbacks;
+
+ /* init the framing state */
+ vf->oy=ogg_sync_create();
+
+ /* perhaps some data was previously read into a buffer for testing
+ against other stream types. Allow initialization from this
+ previously read data (as we may be reading from a non-seekable
+ stream) */
+ if(initial){
+ unsigned char *buffer=ogg_sync_bufferin(vf->oy,ibytes);
+ memcpy(buffer,initial,ibytes);
+ ogg_sync_wrote(vf->oy,ibytes);
+ }
+
+ /* can we seek? Stevens suggests the seek test was portable */
+ if(offsettest!=-1)vf->seekable=1;
+
+ /* No seeking yet; Set up a 'single' (current) logical bitstream
+ entry for partial open */
+ vf->links=1;
+ vf->os=ogg_stream_create(-1); /* fill in the serialno later */
+
+ /* Try to fetch the headers, maintaining all the storage */
+ if((ret=_fetch_headers(vf,&vf->vi,&vf->vc,&vf->current_serialno,NULL))<0){
+ vf->datasource=NULL;
+ ov_clear(vf);
+ }else if(vf->ready_state < PARTOPEN)
+ vf->ready_state=PARTOPEN;
+ return ret;
+}
+
+static int _ov_open2(OggVorbis_File *vf){
+ if(vf->ready_state < OPENED)
+ vf->ready_state=OPENED;
+ if(vf->seekable){
+ int ret=_open_seekable2(vf);
+ if(ret){
+ vf->datasource=NULL;
+ ov_clear(vf);
+ }
+ return ret;
+ }
+ return 0;
+}
+
+
+/* clear out the OggVorbis_File struct */
+int ov_clear(OggVorbis_File *vf){
+ if(vf){
+ vorbis_dsp_destroy(vf->vd);
+ vf->vd=0;
+ ogg_stream_destroy(vf->os);
+ vorbis_info_clear(&vf->vi);
+ vorbis_comment_clear(&vf->vc);
+ if(vf->dataoffsets)_ogg_free(vf->dataoffsets);
+ if(vf->pcmlengths)_ogg_free(vf->pcmlengths);
+ if(vf->serialnos)_ogg_free(vf->serialnos);
+ if(vf->offsets)_ogg_free(vf->offsets);
+ ogg_sync_destroy(vf->oy);
+
+ if(vf->datasource)(vf->callbacks.close_func)(vf->datasource);
+ memset(vf,0,sizeof(*vf));
+ }
+#ifdef DEBUG_LEAKS
+ _VDBG_dump();
+#endif
+ return 0;
+}
+
+/* inspects the OggVorbis file and finds/documents all the logical
+ bitstreams contained in it. Tries to be tolerant of logical
+ bitstream sections that are truncated/woogie.
+
+ return: -1) error
+ 0) OK
+*/
+
+int ov_open_callbacks(void *f,OggVorbis_File *vf,char *initial,long ibytes,
+ ov_callbacks callbacks){
+ int ret=_ov_open1(f,vf,initial,ibytes,callbacks);
+ if(ret)return ret;
+ return _ov_open2(vf);
+}
+
+int ov_open(FILE *f,OggVorbis_File *vf,char *initial,long ibytes){
+ ov_callbacks callbacks = {
+ (size_t (*)(void *, size_t, size_t, void *)) fread,
+ (int (*)(void *, ogg_int64_t, int)) _fseek64_wrap,
+ (int (*)(void *)) fclose,
+ (long (*)(void *)) ftell
+ };
+
+ return ov_open_callbacks((void *)f, vf, initial, ibytes, callbacks);
+}
+
+/* Only partially open the vorbis file; test for Vorbisness, and load
+ the headers for the first chain. Do not seek (although test for
+ seekability). Use ov_test_open to finish opening the file, else
+ ov_clear to close/free it. Same return codes as open. */
+
+int ov_test_callbacks(void *f,OggVorbis_File *vf,char *initial,long ibytes,
+ ov_callbacks callbacks)
+{
+ return _ov_open1(f,vf,initial,ibytes,callbacks);
+}
+
+int ov_test(FILE *f,OggVorbis_File *vf,char *initial,long ibytes){
+ ov_callbacks callbacks = {
+ (size_t (*)(void *, size_t, size_t, void *)) fread,
+ (int (*)(void *, ogg_int64_t, int)) _fseek64_wrap,
+ (int (*)(void *)) fclose,
+ (long (*)(void *)) ftell
+ };
+
+ return ov_test_callbacks((void *)f, vf, initial, ibytes, callbacks);
+}
+
+int ov_test_open(OggVorbis_File *vf){
+ if(vf->ready_state!=PARTOPEN)return OV_EINVAL;
+ return _ov_open2(vf);
+}
+
+/* How many logical bitstreams in this physical bitstream? */
+long ov_streams(OggVorbis_File *vf){
+ return vf->links;
+}
+
+/* Is the FILE * associated with vf seekable? */
+long ov_seekable(OggVorbis_File *vf){
+ return vf->seekable;
+}
+
+/* returns the bitrate for a given logical bitstream or the entire
+ physical bitstream. If the file is open for random access, it will
+ find the *actual* average bitrate. If the file is streaming, it
+ returns the nominal bitrate (if set) else the average of the
+ upper/lower bounds (if set) else -1 (unset).
+
+ If you want the actual bitrate field settings, get them from the
+ vorbis_info structs */
+
+long ov_bitrate(OggVorbis_File *vf,int i){
+ if(vf->ready_state<OPENED)return OV_EINVAL;
+ if(i>=vf->links)return OV_EINVAL;
+ if(!vf->seekable && i!=0)return ov_bitrate(vf,0);
+ if(i<0){
+ ogg_int64_t bits=0;
+ int i;
+ for(i=0;i<vf->links;i++)
+ bits+=(vf->offsets[i+1]-vf->dataoffsets[i])*8;
+ /* This once read: return(rint(bits/ov_time_total(vf,-1)));
+ * gcc 3.x on x86 miscompiled this at optimisation level 2 and above,
+ * so this is slightly transformed to make it work.
+ */
+ return bits*1000/ov_time_total(vf,-1);
+ }else{
+ if(vf->seekable){
+ /* return the actual bitrate */
+ return (vf->offsets[i+1]-vf->dataoffsets[i])*8000/ov_time_total(vf,i);
+ }else{
+ /* return nominal if set */
+ if(vf->vi.bitrate_nominal>0){
+ return vf->vi.bitrate_nominal;
+ }else{
+ if(vf->vi.bitrate_upper>0){
+ if(vf->vi.bitrate_lower>0){
+ return (vf->vi.bitrate_upper+vf->vi.bitrate_lower)/2;
+ }else{
+ return vf->vi.bitrate_upper;
+ }
+ }
+ return OV_FALSE;
+ }
+ }
+ }
+}
+
+/* returns the actual bitrate since last call. returns -1 if no
+ additional data to offer since last call (or at beginning of stream),
+ EINVAL if stream is only partially open
+*/
+long ov_bitrate_instant(OggVorbis_File *vf){
+ long ret;
+ if(vf->ready_state<OPENED)return OV_EINVAL;
+ if(vf->samptrack==0)return OV_FALSE;
+ ret=vf->bittrack/vf->samptrack*vf->vi.rate;
+ vf->bittrack=0;
+ vf->samptrack=0;
+ return ret;
+}
+
+/* Guess */
+long ov_serialnumber(OggVorbis_File *vf,int i){
+ if(i>=vf->links)return ov_serialnumber(vf,vf->links-1);
+ if(!vf->seekable && i>=0)return ov_serialnumber(vf,-1);
+ if(i<0){
+ return vf->current_serialno;
+ }else{
+ return vf->serialnos[i];
+ }
+}
+
+/* returns: total raw (compressed) length of content if i==-1
+ raw (compressed) length of that logical bitstream for i==0 to n
+ OV_EINVAL if the stream is not seekable (we can't know the length)
+ or if stream is only partially open
+*/
+ogg_int64_t ov_raw_total(OggVorbis_File *vf,int i){
+ if(vf->ready_state<OPENED)return OV_EINVAL;
+ if(!vf->seekable || i>=vf->links)return OV_EINVAL;
+ if(i<0){
+ ogg_int64_t acc=0;
+ int i;
+ for(i=0;i<vf->links;i++)
+ acc+=ov_raw_total(vf,i);
+ return acc;
+ }else{
+ return vf->offsets[i+1]-vf->offsets[i];
+ }
+}
+
+/* returns: total PCM length (samples) of content if i==-1 PCM length
+ (samples) of that logical bitstream for i==0 to n
+ OV_EINVAL if the stream is not seekable (we can't know the
+ length) or only partially open
+*/
+ogg_int64_t ov_pcm_total(OggVorbis_File *vf,int i){
+ if(vf->ready_state<OPENED)return OV_EINVAL;
+ if(!vf->seekable || i>=vf->links)return OV_EINVAL;
+ if(i<0){
+ ogg_int64_t acc=0;
+ int i;
+ for(i=0;i<vf->links;i++)
+ acc+=ov_pcm_total(vf,i);
+ return acc;
+ }else{
+ return vf->pcmlengths[i*2+1];
+ }
+}
+
+/* returns: total milliseconds of content if i==-1
+ milliseconds in that logical bitstream for i==0 to n
+ OV_EINVAL if the stream is not seekable (we can't know the
+ length) or only partially open
+*/
+ogg_int64_t ov_time_total(OggVorbis_File *vf,int i){
+ if(vf->ready_state<OPENED)return OV_EINVAL;
+ if(!vf->seekable || i>=vf->links)return OV_EINVAL;
+ if(i<0){
+ ogg_int64_t acc=0;
+ int i;
+ for(i=0;i<vf->links;i++)
+ acc+=ov_time_total(vf,i);
+ return acc;
+ }else{
+ return ((ogg_int64_t)vf->pcmlengths[i*2+1])*1000/vf->vi.rate;
+ }
+}
+
+/* seek to an offset relative to the *compressed* data. This also
+ scans packets to update the PCM cursor. It will cross a logical
+ bitstream boundary, but only if it can't get any packets out of the
+ tail of the bitstream we seek to (so no surprises).
+
+ returns zero on success, nonzero on failure */
+
+int ov_raw_seek(OggVorbis_File *vf,ogg_int64_t pos){
+ ogg_stream_state *work_os=NULL;
+ ogg_page og={0,0,0,0};
+ ogg_packet op={0,0,0,0,0,0};
+
+ if(vf->ready_state<OPENED)return OV_EINVAL;
+ if(!vf->seekable)
+ return OV_ENOSEEK; /* don't dump machine if we can't seek */
+
+ if(pos<0 || pos>vf->end)return OV_EINVAL;
+
+ /* don't yet clear out decoding machine (if it's initialized), in
+ the case we're in the same link. Restart the decode lapping, and
+ let _fetch_and_process_packet deal with a potential bitstream
+ boundary */
+ vf->pcm_offset=-1;
+ ogg_stream_reset_serialno(vf->os,
+ vf->current_serialno); /* must set serialno */
+ vorbis_dsp_restart(vf->vd);
+
+ _seek_helper(vf,pos);
+
+ /* we need to make sure the pcm_offset is set, but we don't want to
+ advance the raw cursor past good packets just to get to the first
+ with a granulepos. That's not equivalent behavior to beginning
+ decoding as immediately after the seek position as possible.
+
+ So, a hack. We use two stream states; a local scratch state and
+ the shared vf->os stream state. We use the local state to
+ scan, and the shared state as a buffer for later decode.
+
+ Unfortuantely, on the last page we still advance to last packet
+ because the granulepos on the last page is not necessarily on a
+ packet boundary, and we need to make sure the granpos is
+ correct.
+ */
+
+ {
+ int lastblock=0;
+ int accblock=0;
+ int thisblock;
+ int eosflag;
+
+ work_os=ogg_stream_create(vf->current_serialno); /* get the memory ready */
+ while(1){
+ if(vf->ready_state>=STREAMSET){
+ /* snarf/scan a packet if we can */
+ int result=ogg_stream_packetout(work_os,&op);
+
+ if(result>0){
+
+ if(vf->vi.codec_setup){
+ thisblock=vorbis_packet_blocksize(&vf->vi,&op);
+ if(thisblock<0){
+ ogg_stream_packetout(vf->os,NULL);
+ thisblock=0;
+ }else{
+
+ if(eosflag)
+ ogg_stream_packetout(vf->os,NULL);
+ else
+ if(lastblock)accblock+=(lastblock+thisblock)>>2;
+ }
+
+ if(op.granulepos!=-1){
+ int i,link=vf->current_link;
+ ogg_int64_t granulepos=op.granulepos-vf->pcmlengths[link*2];
+ if(granulepos<0)granulepos=0;
+
+ for(i=0;i<link;i++)
+ granulepos+=vf->pcmlengths[i*2+1];
+ vf->pcm_offset=granulepos-accblock;
+ break;
+ }
+ lastblock=thisblock;
+ continue;
+ }else
+ ogg_stream_packetout(vf->os,NULL);
+ }
+ }
+
+ if(!lastblock){
+ if(_get_next_page(vf,&og,-1)<0){
+ vf->pcm_offset=ov_pcm_total(vf,-1);
+ break;
+ }
+ }else{
+ /* huh? Bogus stream with packets but no granulepos */
+ vf->pcm_offset=-1;
+ break;
+ }
+
+ /* did we just grab a page from other than current link? */
+ if(vf->ready_state>=STREAMSET)
+ if(vf->current_serialno!=ogg_page_serialno(&og)){
+ _decode_clear(vf); /* clear out stream state */
+ ogg_stream_destroy(work_os);
+ }
+
+ if(vf->ready_state<STREAMSET){
+ int link;
+
+ vf->current_serialno=ogg_page_serialno(&og);
+ for(link=0;link<vf->links;link++)
+ if(vf->serialnos[link]==vf->current_serialno)break;
+ if(link==vf->links)
+ goto seek_error; /* sign of a bogus stream. error out,
+ leave machine uninitialized */
+
+ /* need to initialize machine to this link */
+ {
+ int ret=_set_link_number_preserve_pos(vf,link);
+ if(ret) goto seek_error;
+ }
+ ogg_stream_reset_serialno(vf->os,vf->current_serialno);
+ ogg_stream_reset_serialno(work_os,vf->current_serialno);
+
+
+ }
+
+ {
+ ogg_page dup;
+ ogg_page_dup(&dup,&og);
+ eosflag=ogg_page_eos(&og);
+ ogg_stream_pagein(vf->os,&og);
+ ogg_stream_pagein(work_os,&dup);
+ }
+ }
+ }
+
+ ogg_packet_release(&op);
+ ogg_page_release(&og);
+ ogg_stream_destroy(work_os);
+ vf->bittrack=0;
+ vf->samptrack=0;
+ return 0;
+
+ seek_error:
+ ogg_packet_release(&op);
+ ogg_page_release(&og);
+
+ /* dump the machine so we're in a known state */
+ vf->pcm_offset=-1;
+ ogg_stream_destroy(work_os);
+ _decode_clear(vf);
+ return OV_EBADLINK;
+}
+
+/* Page granularity seek (faster than sample granularity because we
+ don't do the last bit of decode to find a specific sample).
+
+ Seek to the last [granule marked] page preceeding the specified pos
+ location, such that decoding past the returned point will quickly
+ arrive at the requested position. */
+int ov_pcm_seek_page(OggVorbis_File *vf,ogg_int64_t pos){
+ int link=-1;
+ ogg_int64_t result=0;
+ ogg_int64_t total=ov_pcm_total(vf,-1);
+ ogg_page og={0,0,0,0};
+ ogg_packet op={0,0,0,0,0,0};
+
+ if(vf->ready_state<OPENED)return OV_EINVAL;
+ if(!vf->seekable)return OV_ENOSEEK;
+ if(pos<0 || pos>total)return OV_EINVAL;
+
+ /* which bitstream section does this pcm offset occur in? */
+ for(link=vf->links-1;link>=0;link--){
+ total-=vf->pcmlengths[link*2+1];
+ if(pos>=total)break;
+ }
+
+
+ if(link!=vf->current_link){
+ int ret=_set_link_number(vf,link);
+ if(ret) goto seek_error;
+ }else{
+ vorbis_dsp_restart(vf->vd);
+ }
+
+ ogg_stream_reset_serialno(vf->os,vf->serialnos[link]);
+
+ /* search within the logical bitstream for the page with the highest
+ pcm_pos preceeding (or equal to) pos. There is a danger here;
+ missing pages or incorrect frame number information in the
+ bitstream could make our task impossible. Account for that (it
+ would be an error condition) */
+
+ /* new search algorithm by HB (Nicholas Vinen) */
+ {
+ ogg_int64_t end=vf->offsets[link+1];
+ ogg_int64_t begin=vf->offsets[link];
+ ogg_int64_t begintime = vf->pcmlengths[link*2];
+ ogg_int64_t endtime = vf->pcmlengths[link*2+1]+begintime;
+ ogg_int64_t target=pos-total+begintime;
+ ogg_int64_t best=begin;
+
+ while(begin<end){
+ ogg_int64_t bisect;
+
+ if(end-begin<CHUNKSIZE){
+ bisect=begin;
+ }else{
+ /* take a (pretty decent) guess. */
+ bisect=begin +
+ (target-begintime)*(end-begin)/(endtime-begintime) - CHUNKSIZE;
+ if(bisect<=begin)
+ bisect=begin+1;
+ }
+
+ _seek_helper(vf,bisect);
+
+ while(begin<end){
+ result=_get_next_page(vf,&og,end-vf->offset);
+ if(result==OV_EREAD) goto seek_error;
+ if(result<0){
+ if(bisect<=begin+1)
+ end=begin; /* found it */
+ else{
+ if(bisect==0) goto seek_error;
+ bisect-=CHUNKSIZE;
+ if(bisect<=begin)bisect=begin+1;
+ _seek_helper(vf,bisect);
+ }
+ }else{
+ ogg_int64_t granulepos=ogg_page_granulepos(&og);
+ if(granulepos==-1)continue;
+ if(granulepos<target){
+ best=result; /* raw offset of packet with granulepos */
+ begin=vf->offset; /* raw offset of next page */
+ begintime=granulepos;
+
+ if(target-begintime>44100)break;
+ bisect=begin; /* *not* begin + 1 */
+ }else{
+ if(bisect<=begin+1)
+ end=begin; /* found it */
+ else{
+ if(end==vf->offset){ /* we're pretty close - we'd be stuck in */
+ end=result;
+ bisect-=CHUNKSIZE; /* an endless loop otherwise. */
+ if(bisect<=begin)bisect=begin+1;
+ _seek_helper(vf,bisect);
+ }else{
+ end=result;
+ endtime=granulepos;
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ /* found our page. seek to it, update pcm offset. Easier case than
+ raw_seek, don't keep packets preceeding granulepos. */
+ {
+
+ /* seek */
+ _seek_helper(vf,best);
+ vf->pcm_offset=-1;
+
+ if(_get_next_page(vf,&og,-1)<0){
+ ogg_page_release(&og);
+ return OV_EOF; /* shouldn't happen */
+ }
+
+ ogg_stream_pagein(vf->os,&og);
+
+ /* pull out all but last packet; the one with granulepos */
+ while(1){
+ result=ogg_stream_packetpeek(vf->os,&op);
+ if(result==0){
+ /* !!! the packet finishing this page originated on a
+ preceeding page. Keep fetching previous pages until we
+ get one with a granulepos or without the 'continued' flag
+ set. Then just use raw_seek for simplicity. */
+
+ _seek_helper(vf,best);
+
+ while(1){
+ result=_get_prev_page(vf,&og);
+ if(result<0) goto seek_error;
+ if(ogg_page_granulepos(&og)>-1 ||
+ !ogg_page_continued(&og)){
+ return ov_raw_seek(vf,result);
+ }
+ vf->offset=result;
+ }
+ }
+ if(result<0){
+ result = OV_EBADPACKET;
+ goto seek_error;
+ }
+ if(op.granulepos!=-1){
+ vf->pcm_offset=op.granulepos-vf->pcmlengths[vf->current_link*2];
+ if(vf->pcm_offset<0)vf->pcm_offset=0;
+ vf->pcm_offset+=total;
+ break;
+ }else
+ result=ogg_stream_packetout(vf->os,NULL);
+ }
+ }
+ }
+
+ /* verify result */
+ if(vf->pcm_offset>pos || pos>ov_pcm_total(vf,-1)){
+ result=OV_EFAULT;
+ goto seek_error;
+ }
+ vf->bittrack=0;
+ vf->samptrack=0;
+
+ ogg_page_release(&og);
+ ogg_packet_release(&op);
+ return 0;
+
+ seek_error:
+
+ ogg_page_release(&og);
+ ogg_packet_release(&op);
+
+ /* dump machine so we're in a known state */
+ vf->pcm_offset=-1;
+ _decode_clear(vf);
+ return (int)result;
+}
+
+/* seek to a sample offset relative to the decompressed pcm stream
+ returns zero on success, nonzero on failure */
+
+int ov_pcm_seek(OggVorbis_File *vf,ogg_int64_t pos){
+ ogg_packet op={0,0,0,0,0,0};
+ ogg_page og={0,0,0,0};
+ int thisblock,lastblock=0;
+ int ret=ov_pcm_seek_page(vf,pos);
+ if(ret<0)return ret;
+ if(_make_decode_ready(vf))return OV_EBADLINK;
+
+ /* discard leading packets we don't need for the lapping of the
+ position we want; don't decode them */
+
+ while(1){
+
+ int ret=ogg_stream_packetpeek(vf->os,&op);
+ if(ret>0){
+ thisblock=vorbis_packet_blocksize(&vf->vi,&op);
+ if(thisblock<0){
+ ogg_stream_packetout(vf->os,NULL);
+ continue; /* non audio packet */
+ }
+ if(lastblock)vf->pcm_offset+=(lastblock+thisblock)>>2;
+
+ if(vf->pcm_offset+((thisblock+
+ vorbis_info_blocksize(&vf->vi,1))>>2)>=pos)break;
+
+ /* remove the packet from packet queue and track its granulepos */
+ ogg_stream_packetout(vf->os,NULL);
+ vorbis_dsp_synthesis(vf->vd,&op,0); /* set up a vb with
+ only tracking, no
+ pcm_decode */
+
+ /* end of logical stream case is hard, especially with exact
+ length positioning. */
+
+ if(op.granulepos>-1){
+ int i;
+ /* always believe the stream markers */
+ vf->pcm_offset=op.granulepos-vf->pcmlengths[vf->current_link*2];
+ if(vf->pcm_offset<0)vf->pcm_offset=0;
+ for(i=0;i<vf->current_link;i++)
+ vf->pcm_offset+=vf->pcmlengths[i*2+1];
+ }
+
+ lastblock=thisblock;
+
+ }else{
+ if(ret<0 && ret!=OV_HOLE)break;
+
+ /* suck in a new page */
+ if(_get_next_page(vf,&og,-1)<0)break;
+ if(vf->current_serialno!=ogg_page_serialno(&og))_decode_clear(vf);
+
+ if(vf->ready_state<STREAMSET){
+ int link,ret;
+
+ vf->current_serialno=ogg_page_serialno(&og);
+ for(link=0;link<vf->links;link++)
+ if(vf->serialnos[link]==vf->current_serialno)break;
+ if(link==vf->links){
+ ogg_page_release(&og);
+ ogg_packet_release(&op);
+ return OV_EBADLINK;
+ }
+
+
+ vf->current_link=link;
+ ret=_fetch_headers(vf,&vf->vi,&vf->vc,&vf->current_serialno,&og);
+ if(ret) return ret;
+ if(_make_decode_ready(vf))return OV_EBADLINK;
+ lastblock=0;
+ }
+
+ ogg_stream_pagein(vf->os,&og);
+ }
+ }
+
+ vf->bittrack=0;
+ vf->samptrack=0;
+ /* discard samples until we reach the desired position. Crossing a
+ logical bitstream boundary with abandon is OK. */
+ while(vf->pcm_offset<pos){
+ ogg_int64_t target=pos-vf->pcm_offset;
+ long samples=vorbis_dsp_pcmout(vf->vd,NULL,0);
+
+ if(samples>target)samples=target;
+ vorbis_dsp_read(vf->vd,samples);
+ vf->pcm_offset+=samples;
+
+ if(samples<target)
+ if(_fetch_and_process_packet(vf,1,1)<=0)
+ vf->pcm_offset=ov_pcm_total(vf,-1); /* eof */
+ }
+
+ ogg_page_release(&og);
+ ogg_packet_release(&op);
+ return 0;
+}
+
+/* seek to a playback time relative to the decompressed pcm stream
+ returns zero on success, nonzero on failure */
+int ov_time_seek(OggVorbis_File *vf,ogg_int64_t milliseconds){
+ /* translate time to PCM position and call ov_pcm_seek */
+
+ int link=-1;
+ ogg_int64_t pcm_total=ov_pcm_total(vf,-1);
+ ogg_int64_t time_total=ov_time_total(vf,-1);
+
+ if(vf->ready_state<OPENED)return OV_EINVAL;
+ if(!vf->seekable)return OV_ENOSEEK;
+ if(milliseconds<0 || milliseconds>time_total)return OV_EINVAL;
+
+ /* which bitstream section does this time offset occur in? */
+ for(link=vf->links-1;link>=0;link--){
+ pcm_total-=vf->pcmlengths[link*2+1];
+ time_total-=ov_time_total(vf,link);
+ if(milliseconds>=time_total)break;
+ }
+
+ /* enough information to convert time offset to pcm offset */
+ {
+ int ret=_set_link_number(vf,link);
+ if(ret)return ret;
+ return
+ ov_pcm_seek(vf,pcm_total+(milliseconds-time_total)*
+ vf->vi.rate/1000);
+ }
+}
+
+/* page-granularity version of ov_time_seek
+ returns zero on success, nonzero on failure */
+int ov_time_seek_page(OggVorbis_File *vf,ogg_int64_t milliseconds){
+ /* translate time to PCM position and call ov_pcm_seek */
+
+ int link=-1;
+ ogg_int64_t pcm_total=ov_pcm_total(vf,-1);
+ ogg_int64_t time_total=ov_time_total(vf,-1);
+
+ if(vf->ready_state<OPENED)return OV_EINVAL;
+ if(!vf->seekable)return OV_ENOSEEK;
+ if(milliseconds<0 || milliseconds>time_total)return OV_EINVAL;
+
+ /* which bitstream section does this time offset occur in? */
+ for(link=vf->links-1;link>=0;link--){
+ pcm_total-=vf->pcmlengths[link*2+1];
+ time_total-=ov_time_total(vf,link);
+ if(milliseconds>=time_total)break;
+ }
+
+ /* enough information to convert time offset to pcm offset */
+ {
+ int ret=_set_link_number(vf,link);
+ if(ret)return ret;
+ return
+ ov_pcm_seek_page(vf,pcm_total+(milliseconds-time_total)*
+ vf->vi.rate/1000);
+ }
+}
+
+/* tell the current stream offset cursor. Note that seek followed by
+ tell will likely not give the set offset due to caching */
+ogg_int64_t ov_raw_tell(OggVorbis_File *vf){
+ if(vf->ready_state<OPENED)return OV_EINVAL;
+ return vf->offset;
+}
+
+/* return PCM offset (sample) of next PCM sample to be read */
+ogg_int64_t ov_pcm_tell(OggVorbis_File *vf){
+ if(vf->ready_state<OPENED)return OV_EINVAL;
+ return vf->pcm_offset;
+}
+
+/* return time offset (milliseconds) of next PCM sample to be read */
+ogg_int64_t ov_time_tell(OggVorbis_File *vf){
+ int link=0;
+ ogg_int64_t pcm_total=0;
+ ogg_int64_t time_total=0;
+
+ if(vf->ready_state<OPENED)return OV_EINVAL;
+ if(vf->seekable){
+ pcm_total=ov_pcm_total(vf,-1);
+ time_total=ov_time_total(vf,-1);
+
+ /* which bitstream section does this time offset occur in? */
+ for(link=vf->links-1;link>=0;link--){
+ pcm_total-=vf->pcmlengths[link*2+1];
+ time_total-=ov_time_total(vf,link);
+ if(vf->pcm_offset>=pcm_total)break;
+ }
+ }
+
+ return time_total+(1000*vf->pcm_offset-pcm_total)/vf->vi.rate;
+}
+
+/* link: -1) return the vorbis_info struct for the bitstream section
+ currently being decoded
+ 0-n) to request information for a specific bitstream section
+
+ In the case of a non-seekable bitstream, any call returns the
+ current bitstream. NULL in the case that the machine is not
+ initialized */
+
+vorbis_info *ov_info(OggVorbis_File *vf,int link){
+ if(vf->seekable){
+ if(link>=vf->links)return NULL;
+ if(link>=0){
+ int ret=_set_link_number_preserve_pos(vf,link);
+ if(ret)return NULL;
+ }
+ }
+ return &vf->vi;
+}
+
+/* grr, strong typing, grr, no templates/inheritence, grr */
+vorbis_comment *ov_comment(OggVorbis_File *vf,int link){
+ if(vf->seekable){
+ if(link>=vf->links)return NULL;
+ if(link>=0){
+ int ret=_set_link_number_preserve_pos(vf,link);
+ if(ret)return NULL;
+ }
+ }
+ return &vf->vc;
+}
+
+/* up to this point, everything could more or less hide the multiple
+ logical bitstream nature of chaining from the toplevel application
+ if the toplevel application didn't particularly care. However, at
+ the point that we actually read audio back, the multiple-section
+ nature must surface: Multiple bitstream sections do not necessarily
+ have to have the same number of channels or sampling rate.
+
+ ov_read returns the sequential logical bitstream number currently
+ being decoded along with the PCM data in order that the toplevel
+ application can take action on channel/sample rate changes. This
+ number will be incremented even for streamed (non-seekable) streams
+ (for seekable streams, it represents the actual logical bitstream
+ index within the physical bitstream. Note that the accessor
+ functions above are aware of this dichotomy).
+
+ input values: buffer) a buffer to hold packed PCM data for return
+ length) the byte length requested to be placed into buffer
+
+ return values: <0) error/hole in data (OV_HOLE), partial open (OV_EINVAL)
+ 0) EOF
+ n) number of bytes of PCM actually returned. The
+ below works on a packet-by-packet basis, so the
+ return length is not related to the 'length' passed
+ in, just guaranteed to fit.
+
+ *section) set to the logical bitstream number */
+
+long ov_read(OggVorbis_File *vf,void *buffer,int bytes_req,int *bitstream){
+
+ long samples;
+ long channels;
+
+ if(vf->ready_state<OPENED)return OV_EINVAL;
+
+ while(1){
+ if(vf->ready_state==INITSET){
+ channels=vf->vi.channels;
+ samples=vorbis_dsp_pcmout(vf->vd,buffer,(bytes_req>>1)/channels);
+ if(samples){
+ if(samples>0){
+ vorbis_dsp_read(vf->vd,samples);
+ vf->pcm_offset+=samples;
+ if(bitstream)*bitstream=vf->current_link;
+ return samples*2*channels;
+ }
+ return samples;
+ }
+ }
+
+ /* suck in another packet */
+ {
+ int ret=_fetch_and_process_packet(vf,1,1);
+ if(ret==OV_EOF)
+ return 0;
+ if(ret<=0)
+ return ret;
+ }
+
+ }
+}
diff --git a/MakefileBasedBuild/app/v_window_lookup.h b/MakefileBasedBuild/app/v_window_lookup.h
new file mode 100644
index 0000000..690d677
--- /dev/null
+++ b/MakefileBasedBuild/app/v_window_lookup.h
@@ -0,0 +1,2090 @@
+#ifdef ADK_INTERNAL
+/********************************************************************
+ * *
+ * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
+ * *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
+ * *
+ * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
+ * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
+ * *
+ ********************************************************************
+
+ function: window lookup tables
+
+ ********************************************************************/
+
+
+#include "v_os_types.h"
+
+static LOOKUP_T vwin64[32] = {
+ X(0x001f0003), X(0x01168c98), X(0x030333c8), X(0x05dfe3a4),
+ X(0x09a49562), X(0x0e45df18), X(0x13b47ef2), X(0x19dcf676),
+ X(0x20a74d83), X(0x27f7137c), X(0x2fabb05a), X(0x37a1105a),
+ X(0x3fb0ab28), X(0x47b2dcd1), X(0x4f807bc6), X(0x56f48e70),
+ X(0x5dedfc79), X(0x64511653), X(0x6a08cfff), X(0x6f079328),
+ X(0x734796f4), X(0x76cab7f2), X(0x7999d6e8), X(0x7bc3cf9f),
+ X(0x7d5c20c1), X(0x7e7961df), X(0x7f33a567), X(0x7fa2e1d0),
+ X(0x7fdd78a5), X(0x7ff6ec6d), X(0x7ffed0e9), X(0x7ffffc3f),
+};
+
+static LOOKUP_T vwin128[64] = {
+ X(0x0007c04d), X(0x0045bb89), X(0x00c18b87), X(0x017ae294),
+ X(0x02714a4e), X(0x03a4217a), X(0x05129952), X(0x06bbb24f),
+ X(0x089e38a1), X(0x0ab8c073), X(0x0d09a228), X(0x0f8ef6bd),
+ X(0x12469488), X(0x152e0c7a), X(0x1842a81c), X(0x1b81686d),
+ X(0x1ee705d9), X(0x226ff15d), X(0x26185705), X(0x29dc21cc),
+ X(0x2db700fe), X(0x31a46f08), X(0x359fb9c1), X(0x39a40c0c),
+ X(0x3dac78b6), X(0x41b40674), X(0x45b5bcb0), X(0x49acb109),
+ X(0x4d94152b), X(0x516744bd), X(0x5521d320), X(0x58bf98a5),
+ X(0x5c3cbef4), X(0x5f95cc5d), X(0x62c7add7), X(0x65cfbf64),
+ X(0x68abd2ba), X(0x6b5a3405), X(0x6dd9acab), X(0x7029840d),
+ X(0x72497e38), X(0x7439d8ac), X(0x75fb4532), X(0x778ee30a),
+ X(0x78f6367e), X(0x7a331f1a), X(0x7b47cccd), X(0x7c36b416),
+ X(0x7d028192), X(0x7dae0d18), X(0x7e3c4caa), X(0x7eb04763),
+ X(0x7f0d08a7), X(0x7f5593b7), X(0x7f8cd7d5), X(0x7fb5a513),
+ X(0x7fd2a1fc), X(0x7fe64212), X(0x7ff2bd4c), X(0x7ffa0890),
+ X(0x7ffdcf39), X(0x7fff6dac), X(0x7fffed01), X(0x7fffffc4),
+};
+
+static LOOKUP_T vwin256[128] = {
+ X(0x0001f018), X(0x00117066), X(0x00306e9e), X(0x005ee5f1),
+ X(0x009ccf26), X(0x00ea208b), X(0x0146cdea), X(0x01b2c87f),
+ X(0x022dfedf), X(0x02b85ced), X(0x0351cbbd), X(0x03fa317f),
+ X(0x04b17167), X(0x05776b90), X(0x064bfcdc), X(0x072efedd),
+ X(0x082047b4), X(0x091fa9f1), X(0x0a2cf477), X(0x0b47f25d),
+ X(0x0c706ad2), X(0x0da620ff), X(0x0ee8d3ef), X(0x10383e75),
+ X(0x11941716), X(0x12fc0ff6), X(0x146fd6c8), X(0x15ef14c2),
+ X(0x17796e8e), X(0x190e844f), X(0x1aadf196), X(0x1c574d6e),
+ X(0x1e0a2a62), X(0x1fc61688), X(0x218a9b9c), X(0x23573f12),
+ X(0x252b823d), X(0x2706e269), X(0x28e8d913), X(0x2ad0dc0e),
+ X(0x2cbe5dc1), X(0x2eb0cd60), X(0x30a79733), X(0x32a224d5),
+ X(0x349fdd8b), X(0x36a02690), X(0x38a2636f), X(0x3aa5f65e),
+ X(0x3caa409e), X(0x3eaea2df), X(0x40b27da6), X(0x42b531b8),
+ X(0x44b62086), X(0x46b4ac99), X(0x48b03a05), X(0x4aa82ed5),
+ X(0x4c9bf37d), X(0x4e8af349), X(0x50749ccb), X(0x52586246),
+ X(0x5435ba1c), X(0x560c1f31), X(0x57db1152), X(0x59a21591),
+ X(0x5b60b6a3), X(0x5d168535), X(0x5ec31839), X(0x60660d36),
+ X(0x61ff0886), X(0x638db595), X(0x6511c717), X(0x668af734),
+ X(0x67f907b0), X(0x695bc207), X(0x6ab2f787), X(0x6bfe815a),
+ X(0x6d3e4090), X(0x6e721e16), X(0x6f9a0ab5), X(0x70b5fef8),
+ X(0x71c5fb16), X(0x72ca06cd), X(0x73c2313d), X(0x74ae90b2),
+ X(0x758f4275), X(0x76646a85), X(0x772e335c), X(0x77eccda0),
+ X(0x78a06fd7), X(0x79495613), X(0x79e7c19c), X(0x7a7bf894),
+ X(0x7b064596), X(0x7b86f757), X(0x7bfe6044), X(0x7c6cd615),
+ X(0x7cd2b16e), X(0x7d304d71), X(0x7d860756), X(0x7dd43e06),
+ X(0x7e1b51ad), X(0x7e5ba355), X(0x7e95947e), X(0x7ec986bb),
+ X(0x7ef7db4a), X(0x7f20f2b9), X(0x7f452c7f), X(0x7f64e6a7),
+ X(0x7f807d71), X(0x7f984aff), X(0x7faca700), X(0x7fbde662),
+ X(0x7fcc5b04), X(0x7fd85372), X(0x7fe21a99), X(0x7fe9f791),
+ X(0x7ff02d58), X(0x7ff4fa9e), X(0x7ff89990), X(0x7ffb3faa),
+ X(0x7ffd1d8b), X(0x7ffe5ecc), X(0x7fff29e0), X(0x7fff9ff3),
+ X(0x7fffdcd2), X(0x7ffff6d6), X(0x7ffffed0), X(0x7ffffffc),
+};
+
+static LOOKUP_T vwin512[256] = {
+ X(0x00007c06), X(0x00045c32), X(0x000c1c62), X(0x0017bc4c),
+ X(0x00273b7a), X(0x003a9955), X(0x0051d51c), X(0x006cede7),
+ X(0x008be2a9), X(0x00aeb22a), X(0x00d55b0d), X(0x00ffdbcc),
+ X(0x012e32b6), X(0x01605df5), X(0x01965b85), X(0x01d02939),
+ X(0x020dc4ba), X(0x024f2b83), X(0x02945ae6), X(0x02dd5004),
+ X(0x032a07d3), X(0x037a7f19), X(0x03ceb26e), X(0x04269e37),
+ X(0x04823eab), X(0x04e18fcc), X(0x05448d6d), X(0x05ab3329),
+ X(0x06157c68), X(0x0683645e), X(0x06f4e607), X(0x0769fc25),
+ X(0x07e2a146), X(0x085ecfbc), X(0x08de819f), X(0x0961b0cc),
+ X(0x09e856e3), X(0x0a726d46), X(0x0affed1d), X(0x0b90cf4c),
+ X(0x0c250c79), X(0x0cbc9d0b), X(0x0d577926), X(0x0df598aa),
+ X(0x0e96f337), X(0x0f3b8026), X(0x0fe3368f), X(0x108e0d42),
+ X(0x113bfaca), X(0x11ecf56b), X(0x12a0f324), X(0x1357e9ac),
+ X(0x1411ce70), X(0x14ce9698), X(0x158e3702), X(0x1650a444),
+ X(0x1715d2aa), X(0x17ddb638), X(0x18a842aa), X(0x19756b72),
+ X(0x1a4523b9), X(0x1b175e62), X(0x1bec0e04), X(0x1cc324f0),
+ X(0x1d9c9532), X(0x1e78508a), X(0x1f564876), X(0x20366e2e),
+ X(0x2118b2a2), X(0x21fd0681), X(0x22e35a37), X(0x23cb9dee),
+ X(0x24b5c18e), X(0x25a1b4c0), X(0x268f66f1), X(0x277ec74e),
+ X(0x286fc4cc), X(0x29624e23), X(0x2a5651d7), X(0x2b4bbe34),
+ X(0x2c428150), X(0x2d3a8913), X(0x2e33c332), X(0x2f2e1d35),
+ X(0x30298478), X(0x3125e62d), X(0x32232f61), X(0x33214cfc),
+ X(0x34202bc2), X(0x351fb85a), X(0x361fdf4f), X(0x37208d10),
+ X(0x3821adf7), X(0x39232e49), X(0x3a24fa3c), X(0x3b26fdf6),
+ X(0x3c292593), X(0x3d2b5d29), X(0x3e2d90c8), X(0x3f2fac7f),
+ X(0x40319c5f), X(0x41334c81), X(0x4234a905), X(0x43359e16),
+ X(0x443617f3), X(0x453602eb), X(0x46354b65), X(0x4733dde1),
+ X(0x4831a6ff), X(0x492e937f), X(0x4a2a9045), X(0x4b258a5f),
+ X(0x4c1f6f06), X(0x4d182ba2), X(0x4e0fadce), X(0x4f05e35b),
+ X(0x4ffaba53), X(0x50ee20fd), X(0x51e005e1), X(0x52d057ca),
+ X(0x53bf05ca), X(0x54abff3b), X(0x559733c7), X(0x56809365),
+ X(0x57680e62), X(0x584d955d), X(0x59311952), X(0x5a128b96),
+ X(0x5af1dddd), X(0x5bcf023a), X(0x5ca9eb27), X(0x5d828b81),
+ X(0x5e58d68d), X(0x5f2cbffc), X(0x5ffe3be9), X(0x60cd3edf),
+ X(0x6199bdda), X(0x6263ae45), X(0x632b0602), X(0x63efbb66),
+ X(0x64b1c53f), X(0x65711ad0), X(0x662db3d7), X(0x66e7888d),
+ X(0x679e91a5), X(0x6852c84e), X(0x69042635), X(0x69b2a582),
+ X(0x6a5e40dd), X(0x6b06f36c), X(0x6bacb8d2), X(0x6c4f8d30),
+ X(0x6cef6d26), X(0x6d8c55d4), X(0x6e2644d4), X(0x6ebd3840),
+ X(0x6f512ead), X(0x6fe2272e), X(0x7070214f), X(0x70fb1d17),
+ X(0x71831b06), X(0x72081c16), X(0x728a21b5), X(0x73092dc8),
+ X(0x738542a6), X(0x73fe631b), X(0x74749261), X(0x74e7d421),
+ X(0x75582c72), X(0x75c59fd5), X(0x76303333), X(0x7697ebdd),
+ X(0x76fccf85), X(0x775ee443), X(0x77be308a), X(0x781abb2e),
+ X(0x78748b59), X(0x78cba88e), X(0x79201aa7), X(0x7971e9cd),
+ X(0x79c11e79), X(0x7a0dc170), X(0x7a57dbc2), X(0x7a9f76c1),
+ X(0x7ae49c07), X(0x7b27556b), X(0x7b67ad02), X(0x7ba5ad1b),
+ X(0x7be1603a), X(0x7c1ad118), X(0x7c520a9e), X(0x7c8717e1),
+ X(0x7cba0421), X(0x7ceadac3), X(0x7d19a74f), X(0x7d46756e),
+ X(0x7d7150e5), X(0x7d9a4592), X(0x7dc15f69), X(0x7de6aa71),
+ X(0x7e0a32c0), X(0x7e2c0479), X(0x7e4c2bc7), X(0x7e6ab4db),
+ X(0x7e87abe9), X(0x7ea31d24), X(0x7ebd14be), X(0x7ed59edd),
+ X(0x7eecc7a3), X(0x7f029b21), X(0x7f17255a), X(0x7f2a723f),
+ X(0x7f3c8daa), X(0x7f4d835d), X(0x7f5d5f00), X(0x7f6c2c1b),
+ X(0x7f79f617), X(0x7f86c83a), X(0x7f92ada2), X(0x7f9db146),
+ X(0x7fa7ddf3), X(0x7fb13e46), X(0x7fb9dcb0), X(0x7fc1c36c),
+ X(0x7fc8fc83), X(0x7fcf91c7), X(0x7fd58cd2), X(0x7fdaf702),
+ X(0x7fdfd979), X(0x7fe43d1c), X(0x7fe82a8b), X(0x7febaa29),
+ X(0x7feec412), X(0x7ff1801c), X(0x7ff3e5d6), X(0x7ff5fc86),
+ X(0x7ff7cb29), X(0x7ff9586f), X(0x7ffaaaba), X(0x7ffbc81e),
+ X(0x7ffcb660), X(0x7ffd7af3), X(0x7ffe1afa), X(0x7ffe9b42),
+ X(0x7fff0047), X(0x7fff4e2f), X(0x7fff88c9), X(0x7fffb390),
+ X(0x7fffd1a6), X(0x7fffe5d7), X(0x7ffff296), X(0x7ffff9fd),
+ X(0x7ffffdcd), X(0x7fffff6d), X(0x7fffffed), X(0x7fffffff),
+};
+
+static LOOKUP_T vwin1024[512] = {
+ X(0x00001f02), X(0x0001170e), X(0x00030724), X(0x0005ef40),
+ X(0x0009cf59), X(0x000ea767), X(0x0014775e), X(0x001b3f2e),
+ X(0x0022fec8), X(0x002bb618), X(0x00356508), X(0x00400b81),
+ X(0x004ba968), X(0x00583ea0), X(0x0065cb0a), X(0x00744e84),
+ X(0x0083c8ea), X(0x00943a14), X(0x00a5a1da), X(0x00b80010),
+ X(0x00cb5488), X(0x00df9f10), X(0x00f4df76), X(0x010b1584),
+ X(0x01224101), X(0x013a61b2), X(0x01537759), X(0x016d81b6),
+ X(0x01888087), X(0x01a47385), X(0x01c15a69), X(0x01df34e6),
+ X(0x01fe02b1), X(0x021dc377), X(0x023e76e7), X(0x02601ca9),
+ X(0x0282b466), X(0x02a63dc1), X(0x02cab85d), X(0x02f023d6),
+ X(0x03167fcb), X(0x033dcbd3), X(0x03660783), X(0x038f3270),
+ X(0x03b94c29), X(0x03e4543a), X(0x04104a2e), X(0x043d2d8b),
+ X(0x046afdd5), X(0x0499ba8c), X(0x04c9632d), X(0x04f9f734),
+ X(0x052b7615), X(0x055ddf46), X(0x05913237), X(0x05c56e53),
+ X(0x05fa9306), X(0x06309fb6), X(0x066793c5), X(0x069f6e93),
+ X(0x06d82f7c), X(0x0711d5d9), X(0x074c60fe), X(0x0787d03d),
+ X(0x07c422e4), X(0x0801583e), X(0x083f6f91), X(0x087e681f),
+ X(0x08be4129), X(0x08fef9ea), X(0x0940919a), X(0x0983076d),
+ X(0x09c65a92), X(0x0a0a8a38), X(0x0a4f9585), X(0x0a957b9f),
+ X(0x0adc3ba7), X(0x0b23d4b9), X(0x0b6c45ee), X(0x0bb58e5a),
+ X(0x0bffad0f), X(0x0c4aa11a), X(0x0c966982), X(0x0ce3054d),
+ X(0x0d30737b), X(0x0d7eb308), X(0x0dcdc2eb), X(0x0e1da21a),
+ X(0x0e6e4f83), X(0x0ebfca11), X(0x0f1210ad), X(0x0f652238),
+ X(0x0fb8fd91), X(0x100da192), X(0x10630d11), X(0x10b93ee0),
+ X(0x111035cb), X(0x1167f09a), X(0x11c06e13), X(0x1219acf5),
+ X(0x1273abfb), X(0x12ce69db), X(0x1329e54a), X(0x13861cf3),
+ X(0x13e30f80), X(0x1440bb97), X(0x149f1fd8), X(0x14fe3ade),
+ X(0x155e0b40), X(0x15be8f92), X(0x161fc662), X(0x1681ae38),
+ X(0x16e4459b), X(0x17478b0b), X(0x17ab7d03), X(0x181019fb),
+ X(0x18756067), X(0x18db4eb3), X(0x1941e34a), X(0x19a91c92),
+ X(0x1a10f8ea), X(0x1a7976af), X(0x1ae29439), X(0x1b4c4fda),
+ X(0x1bb6a7e2), X(0x1c219a9a), X(0x1c8d2649), X(0x1cf9492e),
+ X(0x1d660188), X(0x1dd34d8e), X(0x1e412b74), X(0x1eaf996a),
+ X(0x1f1e959b), X(0x1f8e1e2f), X(0x1ffe3146), X(0x206ecd01),
+ X(0x20dfef78), X(0x215196c2), X(0x21c3c0f0), X(0x22366c10),
+ X(0x22a9962a), X(0x231d3d45), X(0x23915f60), X(0x2405fa7a),
+ X(0x247b0c8c), X(0x24f09389), X(0x25668d65), X(0x25dcf80c),
+ X(0x2653d167), X(0x26cb175e), X(0x2742c7d0), X(0x27bae09e),
+ X(0x28335fa2), X(0x28ac42b3), X(0x292587a5), X(0x299f2c48),
+ X(0x2a192e69), X(0x2a938bd1), X(0x2b0e4247), X(0x2b894f8d),
+ X(0x2c04b164), X(0x2c806588), X(0x2cfc69b2), X(0x2d78bb9a),
+ X(0x2df558f4), X(0x2e723f6f), X(0x2eef6cbb), X(0x2f6cde83),
+ X(0x2fea9270), X(0x30688627), X(0x30e6b74e), X(0x31652385),
+ X(0x31e3c86b), X(0x3262a39e), X(0x32e1b2b8), X(0x3360f352),
+ X(0x33e06303), X(0x345fff5e), X(0x34dfc5f8), X(0x355fb462),
+ X(0x35dfc82a), X(0x365ffee0), X(0x36e0560f), X(0x3760cb43),
+ X(0x37e15c05), X(0x386205df), X(0x38e2c657), X(0x39639af5),
+ X(0x39e4813e), X(0x3a6576b6), X(0x3ae678e3), X(0x3b678547),
+ X(0x3be89965), X(0x3c69b2c1), X(0x3ceacedc), X(0x3d6beb37),
+ X(0x3ded0557), X(0x3e6e1abb), X(0x3eef28e6), X(0x3f702d5a),
+ X(0x3ff1259a), X(0x40720f29), X(0x40f2e789), X(0x4173ac3f),
+ X(0x41f45ad0), X(0x4274f0c2), X(0x42f56b9a), X(0x4375c8e0),
+ X(0x43f6061d), X(0x447620db), X(0x44f616a5), X(0x4575e509),
+ X(0x45f58994), X(0x467501d6), X(0x46f44b62), X(0x477363cb),
+ X(0x47f248a6), X(0x4870f78e), X(0x48ef6e1a), X(0x496da9e8),
+ X(0x49eba897), X(0x4a6967c8), X(0x4ae6e521), X(0x4b641e47),
+ X(0x4be110e5), X(0x4c5dbaa7), X(0x4cda193f), X(0x4d562a5f),
+ X(0x4dd1ebbd), X(0x4e4d5b15), X(0x4ec87623), X(0x4f433aa9),
+ X(0x4fbda66c), X(0x5037b734), X(0x50b16acf), X(0x512abf0e),
+ X(0x51a3b1c5), X(0x521c40ce), X(0x52946a06), X(0x530c2b50),
+ X(0x53838292), X(0x53fa6db8), X(0x5470eab3), X(0x54e6f776),
+ X(0x555c91fc), X(0x55d1b844), X(0x56466851), X(0x56baa02f),
+ X(0x572e5deb), X(0x57a19f98), X(0x58146352), X(0x5886a737),
+ X(0x58f8696d), X(0x5969a81c), X(0x59da6177), X(0x5a4a93b4),
+ X(0x5aba3d0f), X(0x5b295bcb), X(0x5b97ee30), X(0x5c05f28d),
+ X(0x5c736738), X(0x5ce04a8d), X(0x5d4c9aed), X(0x5db856c1),
+ X(0x5e237c78), X(0x5e8e0a89), X(0x5ef7ff6f), X(0x5f6159b0),
+ X(0x5fca17d4), X(0x6032386e), X(0x6099ba15), X(0x61009b69),
+ X(0x6166db11), X(0x61cc77b9), X(0x62317017), X(0x6295c2e7),
+ X(0x62f96eec), X(0x635c72f1), X(0x63becdc8), X(0x64207e4b),
+ X(0x6481835a), X(0x64e1dbde), X(0x654186c8), X(0x65a0830e),
+ X(0x65fecfb1), X(0x665c6bb7), X(0x66b95630), X(0x67158e30),
+ X(0x677112d7), X(0x67cbe34b), X(0x6825feb9), X(0x687f6456),
+ X(0x68d81361), X(0x69300b1e), X(0x69874ada), X(0x69ddd1ea),
+ X(0x6a339fab), X(0x6a88b382), X(0x6add0cdb), X(0x6b30ab2a),
+ X(0x6b838dec), X(0x6bd5b4a6), X(0x6c271ee2), X(0x6c77cc36),
+ X(0x6cc7bc3d), X(0x6d16ee9b), X(0x6d6562fb), X(0x6db31911),
+ X(0x6e001099), X(0x6e4c4955), X(0x6e97c311), X(0x6ee27d9f),
+ X(0x6f2c78d9), X(0x6f75b4a2), X(0x6fbe30e4), X(0x7005ed91),
+ X(0x704ceaa1), X(0x70932816), X(0x70d8a5f8), X(0x711d6457),
+ X(0x7161634b), X(0x71a4a2f3), X(0x71e72375), X(0x7228e500),
+ X(0x7269e7c8), X(0x72aa2c0a), X(0x72e9b209), X(0x73287a12),
+ X(0x73668476), X(0x73a3d18f), X(0x73e061bc), X(0x741c3566),
+ X(0x74574cfa), X(0x7491a8ee), X(0x74cb49be), X(0x75042fec),
+ X(0x753c5c03), X(0x7573ce92), X(0x75aa882f), X(0x75e08979),
+ X(0x7615d313), X(0x764a65a7), X(0x767e41e5), X(0x76b16884),
+ X(0x76e3da40), X(0x771597dc), X(0x7746a221), X(0x7776f9dd),
+ X(0x77a69fe6), X(0x77d59514), X(0x7803da49), X(0x7831706a),
+ X(0x785e5861), X(0x788a9320), X(0x78b6219c), X(0x78e104cf),
+ X(0x790b3dbb), X(0x7934cd64), X(0x795db4d5), X(0x7985f51d),
+ X(0x79ad8f50), X(0x79d48486), X(0x79fad5de), X(0x7a208478),
+ X(0x7a45917b), X(0x7a69fe12), X(0x7a8dcb6c), X(0x7ab0fabb),
+ X(0x7ad38d36), X(0x7af5841a), X(0x7b16e0a3), X(0x7b37a416),
+ X(0x7b57cfb8), X(0x7b7764d4), X(0x7b9664b6), X(0x7bb4d0b0),
+ X(0x7bd2aa14), X(0x7beff23b), X(0x7c0caa7f), X(0x7c28d43c),
+ X(0x7c4470d2), X(0x7c5f81a5), X(0x7c7a081a), X(0x7c940598),
+ X(0x7cad7b8b), X(0x7cc66b5e), X(0x7cded680), X(0x7cf6be64),
+ X(0x7d0e247b), X(0x7d250a3c), X(0x7d3b711c), X(0x7d515a95),
+ X(0x7d66c822), X(0x7d7bbb3c), X(0x7d903563), X(0x7da43814),
+ X(0x7db7c4d0), X(0x7dcadd16), X(0x7ddd826a), X(0x7defb64d),
+ X(0x7e017a44), X(0x7e12cfd3), X(0x7e23b87f), X(0x7e3435cc),
+ X(0x7e444943), X(0x7e53f467), X(0x7e6338c0), X(0x7e7217d5),
+ X(0x7e80932b), X(0x7e8eac49), X(0x7e9c64b7), X(0x7ea9bdf8),
+ X(0x7eb6b994), X(0x7ec35910), X(0x7ecf9def), X(0x7edb89b6),
+ X(0x7ee71de9), X(0x7ef25c09), X(0x7efd4598), X(0x7f07dc16),
+ X(0x7f122103), X(0x7f1c15dc), X(0x7f25bc1f), X(0x7f2f1547),
+ X(0x7f3822cd), X(0x7f40e62b), X(0x7f4960d6), X(0x7f519443),
+ X(0x7f5981e7), X(0x7f612b31), X(0x7f689191), X(0x7f6fb674),
+ X(0x7f769b45), X(0x7f7d416c), X(0x7f83aa51), X(0x7f89d757),
+ X(0x7f8fc9df), X(0x7f958348), X(0x7f9b04ef), X(0x7fa0502e),
+ X(0x7fa56659), X(0x7faa48c7), X(0x7faef8c7), X(0x7fb377a7),
+ X(0x7fb7c6b3), X(0x7fbbe732), X(0x7fbfda67), X(0x7fc3a196),
+ X(0x7fc73dfa), X(0x7fcab0ce), X(0x7fcdfb4a), X(0x7fd11ea0),
+ X(0x7fd41c00), X(0x7fd6f496), X(0x7fd9a989), X(0x7fdc3bff),
+ X(0x7fdead17), X(0x7fe0fdee), X(0x7fe32f9d), X(0x7fe54337),
+ X(0x7fe739ce), X(0x7fe9146c), X(0x7fead41b), X(0x7fec79dd),
+ X(0x7fee06b2), X(0x7fef7b94), X(0x7ff0d97b), X(0x7ff22158),
+ X(0x7ff35417), X(0x7ff472a3), X(0x7ff57de0), X(0x7ff676ac),
+ X(0x7ff75de3), X(0x7ff8345a), X(0x7ff8fae4), X(0x7ff9b24b),
+ X(0x7ffa5b58), X(0x7ffaf6cd), X(0x7ffb8568), X(0x7ffc07e2),
+ X(0x7ffc7eed), X(0x7ffceb38), X(0x7ffd4d6d), X(0x7ffda631),
+ X(0x7ffdf621), X(0x7ffe3dd8), X(0x7ffe7dea), X(0x7ffeb6e7),
+ X(0x7ffee959), X(0x7fff15c4), X(0x7fff3ca9), X(0x7fff5e80),
+ X(0x7fff7bc0), X(0x7fff94d6), X(0x7fffaa2d), X(0x7fffbc29),
+ X(0x7fffcb29), X(0x7fffd786), X(0x7fffe195), X(0x7fffe9a3),
+ X(0x7fffeffa), X(0x7ffff4dd), X(0x7ffff889), X(0x7ffffb37),
+ X(0x7ffffd1a), X(0x7ffffe5d), X(0x7fffff29), X(0x7fffffa0),
+ X(0x7fffffdd), X(0x7ffffff7), X(0x7fffffff), X(0x7fffffff),
+};
+
+static LOOKUP_T vwin2048[1024] = {
+ X(0x000007c0), X(0x000045c4), X(0x0000c1ca), X(0x00017bd3),
+ X(0x000273de), X(0x0003a9eb), X(0x00051df9), X(0x0006d007),
+ X(0x0008c014), X(0x000aee1e), X(0x000d5a25), X(0x00100428),
+ X(0x0012ec23), X(0x00161216), X(0x001975fe), X(0x001d17da),
+ X(0x0020f7a8), X(0x00251564), X(0x0029710c), X(0x002e0a9e),
+ X(0x0032e217), X(0x0037f773), X(0x003d4ab0), X(0x0042dbca),
+ X(0x0048aabe), X(0x004eb788), X(0x00550224), X(0x005b8a8f),
+ X(0x006250c5), X(0x006954c1), X(0x0070967e), X(0x007815f9),
+ X(0x007fd32c), X(0x0087ce13), X(0x009006a9), X(0x00987ce9),
+ X(0x00a130cc), X(0x00aa224f), X(0x00b3516b), X(0x00bcbe1a),
+ X(0x00c66856), X(0x00d0501a), X(0x00da755f), X(0x00e4d81f),
+ X(0x00ef7853), X(0x00fa55f4), X(0x010570fc), X(0x0110c963),
+ X(0x011c5f22), X(0x01283232), X(0x0134428c), X(0x01409027),
+ X(0x014d1afb), X(0x0159e302), X(0x0166e831), X(0x01742a82),
+ X(0x0181a9ec), X(0x018f6665), X(0x019d5fe5), X(0x01ab9663),
+ X(0x01ba09d6), X(0x01c8ba34), X(0x01d7a775), X(0x01e6d18d),
+ X(0x01f63873), X(0x0205dc1e), X(0x0215bc82), X(0x0225d997),
+ X(0x02363350), X(0x0246c9a3), X(0x02579c86), X(0x0268abed),
+ X(0x0279f7cc), X(0x028b801a), X(0x029d44c9), X(0x02af45ce),
+ X(0x02c1831d), X(0x02d3fcaa), X(0x02e6b269), X(0x02f9a44c),
+ X(0x030cd248), X(0x03203c4f), X(0x0333e255), X(0x0347c44b),
+ X(0x035be225), X(0x03703bd5), X(0x0384d14d), X(0x0399a280),
+ X(0x03aeaf5e), X(0x03c3f7d9), X(0x03d97be4), X(0x03ef3b6e),
+ X(0x0405366a), X(0x041b6cc8), X(0x0431de78), X(0x04488b6c),
+ X(0x045f7393), X(0x047696dd), X(0x048df53b), X(0x04a58e9b),
+ X(0x04bd62ee), X(0x04d57223), X(0x04edbc28), X(0x050640ed),
+ X(0x051f0060), X(0x0537fa70), X(0x05512f0a), X(0x056a9e1e),
+ X(0x05844798), X(0x059e2b67), X(0x05b84978), X(0x05d2a1b8),
+ X(0x05ed3414), X(0x06080079), X(0x062306d3), X(0x063e470f),
+ X(0x0659c119), X(0x067574dd), X(0x06916247), X(0x06ad8941),
+ X(0x06c9e9b8), X(0x06e68397), X(0x070356c8), X(0x07206336),
+ X(0x073da8cb), X(0x075b2772), X(0x0778df15), X(0x0796cf9c),
+ X(0x07b4f8f3), X(0x07d35b01), X(0x07f1f5b1), X(0x0810c8eb),
+ X(0x082fd497), X(0x084f189e), X(0x086e94e9), X(0x088e495e),
+ X(0x08ae35e6), X(0x08ce5a68), X(0x08eeb6cc), X(0x090f4af8),
+ X(0x093016d3), X(0x09511a44), X(0x09725530), X(0x0993c77f),
+ X(0x09b57115), X(0x09d751d8), X(0x09f969ae), X(0x0a1bb87c),
+ X(0x0a3e3e26), X(0x0a60fa91), X(0x0a83eda2), X(0x0aa7173c),
+ X(0x0aca7743), X(0x0aee0d9b), X(0x0b11da28), X(0x0b35dccc),
+ X(0x0b5a156a), X(0x0b7e83e5), X(0x0ba3281f), X(0x0bc801fa),
+ X(0x0bed1159), X(0x0c12561c), X(0x0c37d025), X(0x0c5d7f55),
+ X(0x0c83638d), X(0x0ca97cae), X(0x0ccfca97), X(0x0cf64d2a),
+ X(0x0d1d0444), X(0x0d43efc7), X(0x0d6b0f92), X(0x0d926383),
+ X(0x0db9eb79), X(0x0de1a752), X(0x0e0996ee), X(0x0e31ba29),
+ X(0x0e5a10e2), X(0x0e829af6), X(0x0eab5841), X(0x0ed448a2),
+ X(0x0efd6bf4), X(0x0f26c214), X(0x0f504ade), X(0x0f7a062e),
+ X(0x0fa3f3df), X(0x0fce13cd), X(0x0ff865d2), X(0x1022e9ca),
+ X(0x104d9f8e), X(0x107886f9), X(0x10a39fe5), X(0x10ceea2c),
+ X(0x10fa65a6), X(0x1126122d), X(0x1151ef9a), X(0x117dfdc5),
+ X(0x11aa3c87), X(0x11d6abb6), X(0x12034b2c), X(0x12301ac0),
+ X(0x125d1a48), X(0x128a499b), X(0x12b7a891), X(0x12e536ff),
+ X(0x1312f4bb), X(0x1340e19c), X(0x136efd75), X(0x139d481e),
+ X(0x13cbc16a), X(0x13fa692f), X(0x14293f40), X(0x14584371),
+ X(0x14877597), X(0x14b6d585), X(0x14e6630d), X(0x15161e04),
+ X(0x1546063b), X(0x15761b85), X(0x15a65db3), X(0x15d6cc99),
+ X(0x16076806), X(0x16382fcd), X(0x166923bf), X(0x169a43ab),
+ X(0x16cb8f62), X(0x16fd06b5), X(0x172ea973), X(0x1760776b),
+ X(0x1792706e), X(0x17c49449), X(0x17f6e2cb), X(0x18295bc3),
+ X(0x185bfeff), X(0x188ecc4c), X(0x18c1c379), X(0x18f4e452),
+ X(0x19282ea4), X(0x195ba23c), X(0x198f3ee6), X(0x19c3046e),
+ X(0x19f6f2a1), X(0x1a2b094a), X(0x1a5f4833), X(0x1a93af28),
+ X(0x1ac83df3), X(0x1afcf460), X(0x1b31d237), X(0x1b66d744),
+ X(0x1b9c034e), X(0x1bd15621), X(0x1c06cf84), X(0x1c3c6f40),
+ X(0x1c72351e), X(0x1ca820e6), X(0x1cde3260), X(0x1d146953),
+ X(0x1d4ac587), X(0x1d8146c3), X(0x1db7eccd), X(0x1deeb76c),
+ X(0x1e25a667), X(0x1e5cb982), X(0x1e93f085), X(0x1ecb4b33),
+ X(0x1f02c953), X(0x1f3a6aaa), X(0x1f722efb), X(0x1faa160b),
+ X(0x1fe21f9e), X(0x201a4b79), X(0x2052995d), X(0x208b0910),
+ X(0x20c39a53), X(0x20fc4cea), X(0x21352097), X(0x216e151c),
+ X(0x21a72a3a), X(0x21e05fb5), X(0x2219b54d), X(0x22532ac3),
+ X(0x228cbfd8), X(0x22c6744d), X(0x230047e2), X(0x233a3a58),
+ X(0x23744b6d), X(0x23ae7ae3), X(0x23e8c878), X(0x242333ec),
+ X(0x245dbcfd), X(0x24986369), X(0x24d326f1), X(0x250e0750),
+ X(0x25490446), X(0x25841d90), X(0x25bf52ec), X(0x25faa417),
+ X(0x263610cd), X(0x267198cc), X(0x26ad3bcf), X(0x26e8f994),
+ X(0x2724d1d6), X(0x2760c451), X(0x279cd0c0), X(0x27d8f6e0),
+ X(0x2815366a), X(0x28518f1b), X(0x288e00ac), X(0x28ca8ad8),
+ X(0x29072d5a), X(0x2943e7eb), X(0x2980ba45), X(0x29bda422),
+ X(0x29faa53c), X(0x2a37bd4a), X(0x2a74ec07), X(0x2ab2312b),
+ X(0x2aef8c6f), X(0x2b2cfd8b), X(0x2b6a8437), X(0x2ba8202c),
+ X(0x2be5d120), X(0x2c2396cc), X(0x2c6170e7), X(0x2c9f5f29),
+ X(0x2cdd6147), X(0x2d1b76fa), X(0x2d599ff7), X(0x2d97dbf5),
+ X(0x2dd62aab), X(0x2e148bcf), X(0x2e52ff16), X(0x2e918436),
+ X(0x2ed01ae5), X(0x2f0ec2d9), X(0x2f4d7bc6), X(0x2f8c4562),
+ X(0x2fcb1f62), X(0x300a097a), X(0x3049035f), X(0x30880cc6),
+ X(0x30c72563), X(0x31064cea), X(0x3145830f), X(0x3184c786),
+ X(0x31c41a03), X(0x32037a39), X(0x3242e7dc), X(0x3282629f),
+ X(0x32c1ea36), X(0x33017e53), X(0x33411ea9), X(0x3380caec),
+ X(0x33c082ce), X(0x34004602), X(0x34401439), X(0x347fed27),
+ X(0x34bfd07e), X(0x34ffbdf0), X(0x353fb52e), X(0x357fb5ec),
+ X(0x35bfbfda), X(0x35ffd2aa), X(0x363fee0f), X(0x368011b9),
+ X(0x36c03d5a), X(0x370070a4), X(0x3740ab48), X(0x3780ecf7),
+ X(0x37c13562), X(0x3801843a), X(0x3841d931), X(0x388233f7),
+ X(0x38c2943d), X(0x3902f9b4), X(0x3943640d), X(0x3983d2f8),
+ X(0x39c44626), X(0x3a04bd48), X(0x3a45380e), X(0x3a85b62a),
+ X(0x3ac6374a), X(0x3b06bb20), X(0x3b47415c), X(0x3b87c9ae),
+ X(0x3bc853c7), X(0x3c08df57), X(0x3c496c0f), X(0x3c89f99f),
+ X(0x3cca87b6), X(0x3d0b1605), X(0x3d4ba43d), X(0x3d8c320e),
+ X(0x3dccbf27), X(0x3e0d4b3a), X(0x3e4dd5f6), X(0x3e8e5f0c),
+ X(0x3ecee62b), X(0x3f0f6b05), X(0x3f4fed49), X(0x3f906ca8),
+ X(0x3fd0e8d2), X(0x40116177), X(0x4051d648), X(0x409246f6),
+ X(0x40d2b330), X(0x41131aa7), X(0x41537d0c), X(0x4193da10),
+ X(0x41d43162), X(0x421482b4), X(0x4254cdb7), X(0x4295121b),
+ X(0x42d54f91), X(0x431585ca), X(0x4355b477), X(0x4395db49),
+ X(0x43d5f9f1), X(0x44161021), X(0x44561d8a), X(0x449621dd),
+ X(0x44d61ccc), X(0x45160e08), X(0x4555f544), X(0x4595d230),
+ X(0x45d5a47f), X(0x46156be3), X(0x4655280e), X(0x4694d8b2),
+ X(0x46d47d82), X(0x4714162f), X(0x4753a26d), X(0x479321ef),
+ X(0x47d29466), X(0x4811f987), X(0x48515104), X(0x48909a91),
+ X(0x48cfd5e1), X(0x490f02a7), X(0x494e2098), X(0x498d2f66),
+ X(0x49cc2ec7), X(0x4a0b1e6f), X(0x4a49fe11), X(0x4a88cd62),
+ X(0x4ac78c18), X(0x4b0639e6), X(0x4b44d683), X(0x4b8361a2),
+ X(0x4bc1dafa), X(0x4c004241), X(0x4c3e972c), X(0x4c7cd970),
+ X(0x4cbb08c5), X(0x4cf924e1), X(0x4d372d7a), X(0x4d752247),
+ X(0x4db30300), X(0x4df0cf5a), X(0x4e2e870f), X(0x4e6c29d6),
+ X(0x4ea9b766), X(0x4ee72f78), X(0x4f2491c4), X(0x4f61de02),
+ X(0x4f9f13ec), X(0x4fdc333b), X(0x50193ba8), X(0x50562ced),
+ X(0x509306c3), X(0x50cfc8e5), X(0x510c730d), X(0x514904f6),
+ X(0x51857e5a), X(0x51c1def5), X(0x51fe2682), X(0x523a54bc),
+ X(0x52766961), X(0x52b2642c), X(0x52ee44d9), X(0x532a0b26),
+ X(0x5365b6d0), X(0x53a14793), X(0x53dcbd2f), X(0x54181760),
+ X(0x545355e5), X(0x548e787d), X(0x54c97ee6), X(0x550468e1),
+ X(0x553f362c), X(0x5579e687), X(0x55b479b3), X(0x55eeef70),
+ X(0x5629477f), X(0x566381a1), X(0x569d9d97), X(0x56d79b24),
+ X(0x57117a0a), X(0x574b3a0a), X(0x5784dae9), X(0x57be5c69),
+ X(0x57f7be4d), X(0x5831005a), X(0x586a2254), X(0x58a32400),
+ X(0x58dc0522), X(0x5914c57f), X(0x594d64de), X(0x5985e305),
+ X(0x59be3fba), X(0x59f67ac3), X(0x5a2e93e9), X(0x5a668af2),
+ X(0x5a9e5fa6), X(0x5ad611ce), X(0x5b0da133), X(0x5b450d9d),
+ X(0x5b7c56d7), X(0x5bb37ca9), X(0x5bea7ede), X(0x5c215d41),
+ X(0x5c58179d), X(0x5c8eadbe), X(0x5cc51f6f), X(0x5cfb6c7c),
+ X(0x5d3194b2), X(0x5d6797de), X(0x5d9d75cf), X(0x5dd32e51),
+ X(0x5e08c132), X(0x5e3e2e43), X(0x5e737551), X(0x5ea8962d),
+ X(0x5edd90a7), X(0x5f12648e), X(0x5f4711b4), X(0x5f7b97ea),
+ X(0x5faff702), X(0x5fe42ece), X(0x60183f20), X(0x604c27cc),
+ X(0x607fe8a6), X(0x60b38180), X(0x60e6f22f), X(0x611a3a89),
+ X(0x614d5a62), X(0x61805190), X(0x61b31fe9), X(0x61e5c545),
+ X(0x62184179), X(0x624a945d), X(0x627cbdca), X(0x62aebd98),
+ X(0x62e0939f), X(0x63123fba), X(0x6343c1c1), X(0x6375198f),
+ X(0x63a646ff), X(0x63d749ec), X(0x64082232), X(0x6438cfad),
+ X(0x64695238), X(0x6499a9b3), X(0x64c9d5f9), X(0x64f9d6ea),
+ X(0x6529ac63), X(0x65595643), X(0x6588d46a), X(0x65b826b8),
+ X(0x65e74d0e), X(0x6616474b), X(0x66451552), X(0x6673b704),
+ X(0x66a22c44), X(0x66d074f4), X(0x66fe90f8), X(0x672c8033),
+ X(0x675a428a), X(0x6787d7e1), X(0x67b5401f), X(0x67e27b27),
+ X(0x680f88e1), X(0x683c6934), X(0x68691c05), X(0x6895a13e),
+ X(0x68c1f8c7), X(0x68ee2287), X(0x691a1e68), X(0x6945ec54),
+ X(0x69718c35), X(0x699cfdf5), X(0x69c8417f), X(0x69f356c0),
+ X(0x6a1e3da3), X(0x6a48f615), X(0x6a738002), X(0x6a9ddb5a),
+ X(0x6ac80808), X(0x6af205fd), X(0x6b1bd526), X(0x6b457575),
+ X(0x6b6ee6d8), X(0x6b982940), X(0x6bc13c9f), X(0x6bea20e5),
+ X(0x6c12d605), X(0x6c3b5bf1), X(0x6c63b29c), X(0x6c8bd9fb),
+ X(0x6cb3d200), X(0x6cdb9aa0), X(0x6d0333d0), X(0x6d2a9d86),
+ X(0x6d51d7b7), X(0x6d78e25a), X(0x6d9fbd67), X(0x6dc668d3),
+ X(0x6dece498), X(0x6e1330ad), X(0x6e394d0c), X(0x6e5f39ae),
+ X(0x6e84f68d), X(0x6eaa83a2), X(0x6ecfe0ea), X(0x6ef50e5e),
+ X(0x6f1a0bfc), X(0x6f3ed9bf), X(0x6f6377a4), X(0x6f87e5a8),
+ X(0x6fac23c9), X(0x6fd03206), X(0x6ff4105c), X(0x7017becc),
+ X(0x703b3d54), X(0x705e8bf5), X(0x7081aaaf), X(0x70a49984),
+ X(0x70c75874), X(0x70e9e783), X(0x710c46b2), X(0x712e7605),
+ X(0x7150757f), X(0x71724523), X(0x7193e4f6), X(0x71b554fd),
+ X(0x71d6953e), X(0x71f7a5bd), X(0x72188681), X(0x72393792),
+ X(0x7259b8f5), X(0x727a0ab2), X(0x729a2cd2), X(0x72ba1f5d),
+ X(0x72d9e25c), X(0x72f975d8), X(0x7318d9db), X(0x73380e6f),
+ X(0x735713a0), X(0x7375e978), X(0x73949003), X(0x73b3074c),
+ X(0x73d14f61), X(0x73ef684f), X(0x740d5222), X(0x742b0ce9),
+ X(0x744898b1), X(0x7465f589), X(0x74832381), X(0x74a022a8),
+ X(0x74bcf30e), X(0x74d994c3), X(0x74f607d8), X(0x75124c5f),
+ X(0x752e6268), X(0x754a4a05), X(0x7566034b), X(0x75818e4a),
+ X(0x759ceb16), X(0x75b819c4), X(0x75d31a66), X(0x75eded12),
+ X(0x760891dc), X(0x762308da), X(0x763d5221), X(0x76576dc8),
+ X(0x76715be4), X(0x768b1c8c), X(0x76a4afd9), X(0x76be15e0),
+ X(0x76d74ebb), X(0x76f05a82), X(0x7709394d), X(0x7721eb35),
+ X(0x773a7054), X(0x7752c8c4), X(0x776af49f), X(0x7782f400),
+ X(0x779ac701), X(0x77b26dbd), X(0x77c9e851), X(0x77e136d8),
+ X(0x77f8596f), X(0x780f5032), X(0x78261b3f), X(0x783cbab2),
+ X(0x78532eaa), X(0x78697745), X(0x787f94a0), X(0x789586db),
+ X(0x78ab4e15), X(0x78c0ea6d), X(0x78d65c03), X(0x78eba2f7),
+ X(0x7900bf68), X(0x7915b179), X(0x792a7949), X(0x793f16fb),
+ X(0x79538aaf), X(0x7967d488), X(0x797bf4a8), X(0x798feb31),
+ X(0x79a3b846), X(0x79b75c0a), X(0x79cad6a1), X(0x79de282e),
+ X(0x79f150d5), X(0x7a0450bb), X(0x7a172803), X(0x7a29d6d3),
+ X(0x7a3c5d50), X(0x7a4ebb9f), X(0x7a60f1e6), X(0x7a73004a),
+ X(0x7a84e6f2), X(0x7a96a604), X(0x7aa83da7), X(0x7ab9ae01),
+ X(0x7acaf73a), X(0x7adc1979), X(0x7aed14e6), X(0x7afde9a8),
+ X(0x7b0e97e8), X(0x7b1f1fcd), X(0x7b2f8182), X(0x7b3fbd2d),
+ X(0x7b4fd2f9), X(0x7b5fc30f), X(0x7b6f8d98), X(0x7b7f32bd),
+ X(0x7b8eb2a9), X(0x7b9e0d85), X(0x7bad437d), X(0x7bbc54b9),
+ X(0x7bcb4166), X(0x7bda09ae), X(0x7be8adbc), X(0x7bf72dbc),
+ X(0x7c0589d8), X(0x7c13c23d), X(0x7c21d716), X(0x7c2fc88f),
+ X(0x7c3d96d5), X(0x7c4b4214), X(0x7c58ca78), X(0x7c66302d),
+ X(0x7c737362), X(0x7c809443), X(0x7c8d92fc), X(0x7c9a6fbc),
+ X(0x7ca72aaf), X(0x7cb3c404), X(0x7cc03be8), X(0x7ccc9288),
+ X(0x7cd8c814), X(0x7ce4dcb9), X(0x7cf0d0a5), X(0x7cfca406),
+ X(0x7d08570c), X(0x7d13e9e5), X(0x7d1f5cbf), X(0x7d2aafca),
+ X(0x7d35e335), X(0x7d40f72e), X(0x7d4bebe4), X(0x7d56c188),
+ X(0x7d617848), X(0x7d6c1054), X(0x7d7689db), X(0x7d80e50e),
+ X(0x7d8b221b), X(0x7d954133), X(0x7d9f4286), X(0x7da92643),
+ X(0x7db2ec9b), X(0x7dbc95bd), X(0x7dc621da), X(0x7dcf9123),
+ X(0x7dd8e3c6), X(0x7de219f6), X(0x7deb33e2), X(0x7df431ba),
+ X(0x7dfd13af), X(0x7e05d9f2), X(0x7e0e84b4), X(0x7e171424),
+ X(0x7e1f8874), X(0x7e27e1d4), X(0x7e302074), X(0x7e384487),
+ X(0x7e404e3c), X(0x7e483dc4), X(0x7e501350), X(0x7e57cf11),
+ X(0x7e5f7138), X(0x7e66f9f4), X(0x7e6e6979), X(0x7e75bff5),
+ X(0x7e7cfd9a), X(0x7e842298), X(0x7e8b2f22), X(0x7e922366),
+ X(0x7e98ff97), X(0x7e9fc3e4), X(0x7ea6707f), X(0x7ead0598),
+ X(0x7eb38360), X(0x7eb9ea07), X(0x7ec039bf), X(0x7ec672b7),
+ X(0x7ecc9521), X(0x7ed2a12c), X(0x7ed8970a), X(0x7ede76ea),
+ X(0x7ee440fd), X(0x7ee9f573), X(0x7eef947d), X(0x7ef51e4b),
+ X(0x7efa930d), X(0x7efff2f2), X(0x7f053e2b), X(0x7f0a74e8),
+ X(0x7f0f9758), X(0x7f14a5ac), X(0x7f19a013), X(0x7f1e86bc),
+ X(0x7f2359d8), X(0x7f281995), X(0x7f2cc623), X(0x7f315fb1),
+ X(0x7f35e66e), X(0x7f3a5a8a), X(0x7f3ebc33), X(0x7f430b98),
+ X(0x7f4748e7), X(0x7f4b7450), X(0x7f4f8e01), X(0x7f539629),
+ X(0x7f578cf5), X(0x7f5b7293), X(0x7f5f4732), X(0x7f630b00),
+ X(0x7f66be2b), X(0x7f6a60df), X(0x7f6df34b), X(0x7f71759b),
+ X(0x7f74e7fe), X(0x7f784aa0), X(0x7f7b9daf), X(0x7f7ee156),
+ X(0x7f8215c3), X(0x7f853b22), X(0x7f88519f), X(0x7f8b5967),
+ X(0x7f8e52a6), X(0x7f913d87), X(0x7f941a36), X(0x7f96e8df),
+ X(0x7f99a9ad), X(0x7f9c5ccb), X(0x7f9f0265), X(0x7fa19aa5),
+ X(0x7fa425b5), X(0x7fa6a3c1), X(0x7fa914f3), X(0x7fab7974),
+ X(0x7fadd16f), X(0x7fb01d0d), X(0x7fb25c78), X(0x7fb48fd9),
+ X(0x7fb6b75a), X(0x7fb8d323), X(0x7fbae35d), X(0x7fbce831),
+ X(0x7fbee1c7), X(0x7fc0d047), X(0x7fc2b3d9), X(0x7fc48ca5),
+ X(0x7fc65ad3), X(0x7fc81e88), X(0x7fc9d7ee), X(0x7fcb872a),
+ X(0x7fcd2c63), X(0x7fcec7bf), X(0x7fd05966), X(0x7fd1e17c),
+ X(0x7fd36027), X(0x7fd4d58d), X(0x7fd641d3), X(0x7fd7a51e),
+ X(0x7fd8ff94), X(0x7fda5157), X(0x7fdb9a8e), X(0x7fdcdb5b),
+ X(0x7fde13e2), X(0x7fdf4448), X(0x7fe06caf), X(0x7fe18d3b),
+ X(0x7fe2a60e), X(0x7fe3b74b), X(0x7fe4c114), X(0x7fe5c38b),
+ X(0x7fe6bed2), X(0x7fe7b30a), X(0x7fe8a055), X(0x7fe986d4),
+ X(0x7fea66a7), X(0x7feb3ff0), X(0x7fec12cd), X(0x7fecdf5f),
+ X(0x7feda5c5), X(0x7fee6620), X(0x7fef208d), X(0x7fefd52c),
+ X(0x7ff0841c), X(0x7ff12d7a), X(0x7ff1d164), X(0x7ff26ff9),
+ X(0x7ff30955), X(0x7ff39d96), X(0x7ff42cd9), X(0x7ff4b739),
+ X(0x7ff53cd4), X(0x7ff5bdc5), X(0x7ff63a28), X(0x7ff6b217),
+ X(0x7ff725af), X(0x7ff7950a), X(0x7ff80043), X(0x7ff86773),
+ X(0x7ff8cab4), X(0x7ff92a21), X(0x7ff985d1), X(0x7ff9dddf),
+ X(0x7ffa3262), X(0x7ffa8374), X(0x7ffad12c), X(0x7ffb1ba1),
+ X(0x7ffb62ec), X(0x7ffba723), X(0x7ffbe85c), X(0x7ffc26b0),
+ X(0x7ffc6233), X(0x7ffc9afb), X(0x7ffcd11e), X(0x7ffd04b1),
+ X(0x7ffd35c9), X(0x7ffd647b), X(0x7ffd90da), X(0x7ffdbafa),
+ X(0x7ffde2f0), X(0x7ffe08ce), X(0x7ffe2ca7), X(0x7ffe4e8e),
+ X(0x7ffe6e95), X(0x7ffe8cce), X(0x7ffea94a), X(0x7ffec41b),
+ X(0x7ffedd52), X(0x7ffef4ff), X(0x7fff0b33), X(0x7fff1ffd),
+ X(0x7fff336e), X(0x7fff4593), X(0x7fff567d), X(0x7fff663a),
+ X(0x7fff74d8), X(0x7fff8265), X(0x7fff8eee), X(0x7fff9a81),
+ X(0x7fffa52b), X(0x7fffaef8), X(0x7fffb7f5), X(0x7fffc02d),
+ X(0x7fffc7ab), X(0x7fffce7c), X(0x7fffd4a9), X(0x7fffda3e),
+ X(0x7fffdf44), X(0x7fffe3c6), X(0x7fffe7cc), X(0x7fffeb60),
+ X(0x7fffee8a), X(0x7ffff153), X(0x7ffff3c4), X(0x7ffff5e3),
+ X(0x7ffff7b8), X(0x7ffff94b), X(0x7ffffaa1), X(0x7ffffbc1),
+ X(0x7ffffcb2), X(0x7ffffd78), X(0x7ffffe19), X(0x7ffffe9a),
+ X(0x7ffffeff), X(0x7fffff4e), X(0x7fffff89), X(0x7fffffb3),
+ X(0x7fffffd2), X(0x7fffffe6), X(0x7ffffff3), X(0x7ffffffa),
+ X(0x7ffffffe), X(0x7fffffff), X(0x7fffffff), X(0x7fffffff),
+};
+
+static LOOKUP_T vwin4096[2048] = {
+ X(0x000001f0), X(0x00001171), X(0x00003072), X(0x00005ef5),
+ X(0x00009cf8), X(0x0000ea7c), X(0x00014780), X(0x0001b405),
+ X(0x0002300b), X(0x0002bb91), X(0x00035698), X(0x0004011e),
+ X(0x0004bb25), X(0x000584ac), X(0x00065db3), X(0x0007463a),
+ X(0x00083e41), X(0x000945c7), X(0x000a5ccc), X(0x000b8350),
+ X(0x000cb954), X(0x000dfed7), X(0x000f53d8), X(0x0010b857),
+ X(0x00122c55), X(0x0013afd1), X(0x001542ca), X(0x0016e541),
+ X(0x00189735), X(0x001a58a7), X(0x001c2995), X(0x001e09ff),
+ X(0x001ff9e6), X(0x0021f948), X(0x00240826), X(0x00262680),
+ X(0x00285454), X(0x002a91a3), X(0x002cde6c), X(0x002f3aaf),
+ X(0x0031a66b), X(0x003421a0), X(0x0036ac4f), X(0x00394675),
+ X(0x003bf014), X(0x003ea92a), X(0x004171b7), X(0x004449bb),
+ X(0x00473135), X(0x004a2824), X(0x004d2e8a), X(0x00504463),
+ X(0x005369b2), X(0x00569e74), X(0x0059e2aa), X(0x005d3652),
+ X(0x0060996d), X(0x00640bf9), X(0x00678df7), X(0x006b1f66),
+ X(0x006ec045), X(0x00727093), X(0x00763051), X(0x0079ff7d),
+ X(0x007dde16), X(0x0081cc1d), X(0x0085c991), X(0x0089d671),
+ X(0x008df2bc), X(0x00921e71), X(0x00965991), X(0x009aa41a),
+ X(0x009efe0c), X(0x00a36766), X(0x00a7e028), X(0x00ac6850),
+ X(0x00b0ffde), X(0x00b5a6d1), X(0x00ba5d28), X(0x00bf22e4),
+ X(0x00c3f802), X(0x00c8dc83), X(0x00cdd065), X(0x00d2d3a8),
+ X(0x00d7e64a), X(0x00dd084c), X(0x00e239ac), X(0x00e77a69),
+ X(0x00ecca83), X(0x00f229f9), X(0x00f798ca), X(0x00fd16f5),
+ X(0x0102a479), X(0x01084155), X(0x010ded89), X(0x0113a913),
+ X(0x011973f3), X(0x011f4e27), X(0x012537af), X(0x012b308a),
+ X(0x013138b7), X(0x01375035), X(0x013d7702), X(0x0143ad1f),
+ X(0x0149f289), X(0x01504741), X(0x0156ab44), X(0x015d1e92),
+ X(0x0163a12a), X(0x016a330b), X(0x0170d433), X(0x017784a3),
+ X(0x017e4458), X(0x01851351), X(0x018bf18e), X(0x0192df0d),
+ X(0x0199dbcd), X(0x01a0e7cd), X(0x01a8030c), X(0x01af2d89),
+ X(0x01b66743), X(0x01bdb038), X(0x01c50867), X(0x01cc6fd0),
+ X(0x01d3e670), X(0x01db6c47), X(0x01e30153), X(0x01eaa593),
+ X(0x01f25907), X(0x01fa1bac), X(0x0201ed81), X(0x0209ce86),
+ X(0x0211beb8), X(0x0219be17), X(0x0221cca2), X(0x0229ea56),
+ X(0x02321733), X(0x023a5337), X(0x02429e60), X(0x024af8af),
+ X(0x02536220), X(0x025bdab3), X(0x02646267), X(0x026cf93a),
+ X(0x02759f2a), X(0x027e5436), X(0x0287185d), X(0x028feb9d),
+ X(0x0298cdf4), X(0x02a1bf62), X(0x02aabfe5), X(0x02b3cf7b),
+ X(0x02bcee23), X(0x02c61bdb), X(0x02cf58a2), X(0x02d8a475),
+ X(0x02e1ff55), X(0x02eb693e), X(0x02f4e230), X(0x02fe6a29),
+ X(0x03080127), X(0x0311a729), X(0x031b5c2d), X(0x03252031),
+ X(0x032ef334), X(0x0338d534), X(0x0342c630), X(0x034cc625),
+ X(0x0356d512), X(0x0360f2f6), X(0x036b1fce), X(0x03755b99),
+ X(0x037fa655), X(0x038a0001), X(0x0394689a), X(0x039ee020),
+ X(0x03a9668f), X(0x03b3fbe6), X(0x03bea024), X(0x03c95347),
+ X(0x03d4154d), X(0x03dee633), X(0x03e9c5f9), X(0x03f4b49b),
+ X(0x03ffb219), X(0x040abe71), X(0x0415d9a0), X(0x042103a5),
+ X(0x042c3c7d), X(0x04378428), X(0x0442daa2), X(0x044e3fea),
+ X(0x0459b3fd), X(0x046536db), X(0x0470c880), X(0x047c68eb),
+ X(0x0488181a), X(0x0493d60b), X(0x049fa2bc), X(0x04ab7e2a),
+ X(0x04b76854), X(0x04c36137), X(0x04cf68d1), X(0x04db7f21),
+ X(0x04e7a424), X(0x04f3d7d8), X(0x05001a3b), X(0x050c6b4a),
+ X(0x0518cb04), X(0x05253966), X(0x0531b66e), X(0x053e421a),
+ X(0x054adc68), X(0x05578555), X(0x05643cdf), X(0x05710304),
+ X(0x057dd7c1), X(0x058abb15), X(0x0597acfd), X(0x05a4ad76),
+ X(0x05b1bc7f), X(0x05beda14), X(0x05cc0635), X(0x05d940dd),
+ X(0x05e68a0b), X(0x05f3e1bd), X(0x060147f0), X(0x060ebca1),
+ X(0x061c3fcf), X(0x0629d176), X(0x06377194), X(0x06452027),
+ X(0x0652dd2c), X(0x0660a8a2), X(0x066e8284), X(0x067c6ad1),
+ X(0x068a6186), X(0x069866a1), X(0x06a67a1e), X(0x06b49bfc),
+ X(0x06c2cc38), X(0x06d10acf), X(0x06df57bf), X(0x06edb304),
+ X(0x06fc1c9d), X(0x070a9487), X(0x07191abe), X(0x0727af40),
+ X(0x0736520b), X(0x0745031c), X(0x0753c270), X(0x07629004),
+ X(0x07716bd6), X(0x078055e2), X(0x078f4e26), X(0x079e549f),
+ X(0x07ad694b), X(0x07bc8c26), X(0x07cbbd2e), X(0x07dafc5f),
+ X(0x07ea49b7), X(0x07f9a533), X(0x08090ed1), X(0x0818868c),
+ X(0x08280c62), X(0x0837a051), X(0x08474255), X(0x0856f26b),
+ X(0x0866b091), X(0x08767cc3), X(0x088656fe), X(0x08963f3f),
+ X(0x08a63584), X(0x08b639c8), X(0x08c64c0a), X(0x08d66c45),
+ X(0x08e69a77), X(0x08f6d69d), X(0x090720b3), X(0x091778b7),
+ X(0x0927dea5), X(0x0938527a), X(0x0948d433), X(0x095963cc),
+ X(0x096a0143), X(0x097aac94), X(0x098b65bb), X(0x099c2cb6),
+ X(0x09ad0182), X(0x09bde41a), X(0x09ced47d), X(0x09dfd2a5),
+ X(0x09f0de90), X(0x0a01f83b), X(0x0a131fa3), X(0x0a2454c3),
+ X(0x0a359798), X(0x0a46e820), X(0x0a584656), X(0x0a69b237),
+ X(0x0a7b2bc0), X(0x0a8cb2ec), X(0x0a9e47ba), X(0x0aafea24),
+ X(0x0ac19a29), X(0x0ad357c3), X(0x0ae522ef), X(0x0af6fbab),
+ X(0x0b08e1f1), X(0x0b1ad5c0), X(0x0b2cd712), X(0x0b3ee5e5),
+ X(0x0b510234), X(0x0b632bfd), X(0x0b75633b), X(0x0b87a7eb),
+ X(0x0b99fa08), X(0x0bac5990), X(0x0bbec67e), X(0x0bd140cf),
+ X(0x0be3c87e), X(0x0bf65d89), X(0x0c08ffeb), X(0x0c1bafa1),
+ X(0x0c2e6ca6), X(0x0c4136f6), X(0x0c540e8f), X(0x0c66f36c),
+ X(0x0c79e588), X(0x0c8ce4e1), X(0x0c9ff172), X(0x0cb30b37),
+ X(0x0cc6322c), X(0x0cd9664d), X(0x0ceca797), X(0x0cfff605),
+ X(0x0d135193), X(0x0d26ba3d), X(0x0d3a2fff), X(0x0d4db2d5),
+ X(0x0d6142ba), X(0x0d74dfac), X(0x0d8889a5), X(0x0d9c40a1),
+ X(0x0db0049d), X(0x0dc3d593), X(0x0dd7b380), X(0x0deb9e60),
+ X(0x0dff962f), X(0x0e139ae7), X(0x0e27ac85), X(0x0e3bcb05),
+ X(0x0e4ff662), X(0x0e642e98), X(0x0e7873a2), X(0x0e8cc57d),
+ X(0x0ea12423), X(0x0eb58f91), X(0x0eca07c2), X(0x0ede8cb1),
+ X(0x0ef31e5b), X(0x0f07bcba), X(0x0f1c67cb), X(0x0f311f88),
+ X(0x0f45e3ee), X(0x0f5ab4f7), X(0x0f6f92a0), X(0x0f847ce3),
+ X(0x0f9973bc), X(0x0fae7726), X(0x0fc3871e), X(0x0fd8a39d),
+ X(0x0fedcca1), X(0x10030223), X(0x1018441f), X(0x102d9291),
+ X(0x1042ed74), X(0x105854c3), X(0x106dc879), X(0x10834892),
+ X(0x1098d508), X(0x10ae6dd8), X(0x10c412fc), X(0x10d9c46f),
+ X(0x10ef822d), X(0x11054c30), X(0x111b2274), X(0x113104f5),
+ X(0x1146f3ac), X(0x115cee95), X(0x1172f5ab), X(0x118908e9),
+ X(0x119f284a), X(0x11b553ca), X(0x11cb8b62), X(0x11e1cf0f),
+ X(0x11f81ecb), X(0x120e7a90), X(0x1224e25a), X(0x123b5624),
+ X(0x1251d5e9), X(0x126861a3), X(0x127ef94e), X(0x12959ce3),
+ X(0x12ac4c5f), X(0x12c307bb), X(0x12d9cef2), X(0x12f0a200),
+ X(0x130780df), X(0x131e6b8a), X(0x133561fa), X(0x134c642c),
+ X(0x1363721a), X(0x137a8bbe), X(0x1391b113), X(0x13a8e214),
+ X(0x13c01eba), X(0x13d76702), X(0x13eebae5), X(0x14061a5e),
+ X(0x141d8567), X(0x1434fbfb), X(0x144c7e14), X(0x14640bae),
+ X(0x147ba4c1), X(0x14934949), X(0x14aaf941), X(0x14c2b4a2),
+ X(0x14da7b67), X(0x14f24d8a), X(0x150a2b06), X(0x152213d5),
+ X(0x153a07f1), X(0x15520755), X(0x156a11fb), X(0x158227dd),
+ X(0x159a48f5), X(0x15b2753d), X(0x15caacb1), X(0x15e2ef49),
+ X(0x15fb3d01), X(0x161395d2), X(0x162bf9b6), X(0x164468a8),
+ X(0x165ce2a1), X(0x1675679c), X(0x168df793), X(0x16a69280),
+ X(0x16bf385c), X(0x16d7e922), X(0x16f0a4cc), X(0x17096b54),
+ X(0x17223cb4), X(0x173b18e5), X(0x1753ffe2), X(0x176cf1a5),
+ X(0x1785ee27), X(0x179ef562), X(0x17b80750), X(0x17d123eb),
+ X(0x17ea4b2d), X(0x18037d10), X(0x181cb98d), X(0x1836009e),
+ X(0x184f523c), X(0x1868ae63), X(0x1882150a), X(0x189b862c),
+ X(0x18b501c4), X(0x18ce87c9), X(0x18e81836), X(0x1901b305),
+ X(0x191b582f), X(0x193507ad), X(0x194ec17a), X(0x1968858f),
+ X(0x198253e5), X(0x199c2c75), X(0x19b60f3a), X(0x19cffc2d),
+ X(0x19e9f347), X(0x1a03f482), X(0x1a1dffd7), X(0x1a381540),
+ X(0x1a5234b5), X(0x1a6c5e31), X(0x1a8691ac), X(0x1aa0cf21),
+ X(0x1abb1687), X(0x1ad567da), X(0x1aefc311), X(0x1b0a2826),
+ X(0x1b249712), X(0x1b3f0fd0), X(0x1b599257), X(0x1b741ea1),
+ X(0x1b8eb4a7), X(0x1ba95462), X(0x1bc3fdcd), X(0x1bdeb0de),
+ X(0x1bf96d91), X(0x1c1433dd), X(0x1c2f03bc), X(0x1c49dd27),
+ X(0x1c64c017), X(0x1c7fac85), X(0x1c9aa269), X(0x1cb5a1be),
+ X(0x1cd0aa7c), X(0x1cebbc9c), X(0x1d06d816), X(0x1d21fce4),
+ X(0x1d3d2aff), X(0x1d586260), X(0x1d73a2fe), X(0x1d8eecd4),
+ X(0x1daa3fda), X(0x1dc59c09), X(0x1de1015a), X(0x1dfc6fc5),
+ X(0x1e17e743), X(0x1e3367cd), X(0x1e4ef15b), X(0x1e6a83e7),
+ X(0x1e861f6a), X(0x1ea1c3da), X(0x1ebd7133), X(0x1ed9276b),
+ X(0x1ef4e67c), X(0x1f10ae5e), X(0x1f2c7f0a), X(0x1f485879),
+ X(0x1f643aa2), X(0x1f80257f), X(0x1f9c1908), X(0x1fb81536),
+ X(0x1fd41a00), X(0x1ff02761), X(0x200c3d4f), X(0x20285bc3),
+ X(0x204482b7), X(0x2060b221), X(0x207ce9fb), X(0x20992a3e),
+ X(0x20b572e0), X(0x20d1c3dc), X(0x20ee1d28), X(0x210a7ebe),
+ X(0x2126e895), X(0x21435aa6), X(0x215fd4ea), X(0x217c5757),
+ X(0x2198e1e8), X(0x21b57493), X(0x21d20f51), X(0x21eeb21b),
+ X(0x220b5ce7), X(0x22280fb0), X(0x2244ca6c), X(0x22618d13),
+ X(0x227e579f), X(0x229b2a06), X(0x22b80442), X(0x22d4e649),
+ X(0x22f1d015), X(0x230ec19d), X(0x232bbad9), X(0x2348bbc1),
+ X(0x2365c44c), X(0x2382d474), X(0x239fec30), X(0x23bd0b78),
+ X(0x23da3244), X(0x23f7608b), X(0x24149646), X(0x2431d36c),
+ X(0x244f17f5), X(0x246c63da), X(0x2489b711), X(0x24a71193),
+ X(0x24c47358), X(0x24e1dc57), X(0x24ff4c88), X(0x251cc3e2),
+ X(0x253a425e), X(0x2557c7f4), X(0x2575549a), X(0x2592e848),
+ X(0x25b082f7), X(0x25ce249e), X(0x25ebcd34), X(0x26097cb2),
+ X(0x2627330e), X(0x2644f040), X(0x2662b441), X(0x26807f07),
+ X(0x269e5089), X(0x26bc28c1), X(0x26da07a4), X(0x26f7ed2b),
+ X(0x2715d94d), X(0x2733cc02), X(0x2751c540), X(0x276fc500),
+ X(0x278dcb39), X(0x27abd7e2), X(0x27c9eaf3), X(0x27e80463),
+ X(0x28062429), X(0x28244a3e), X(0x28427697), X(0x2860a92d),
+ X(0x287ee1f7), X(0x289d20eb), X(0x28bb6603), X(0x28d9b134),
+ X(0x28f80275), X(0x291659c0), X(0x2934b709), X(0x29531a49),
+ X(0x29718378), X(0x298ff28b), X(0x29ae677b), X(0x29cce23e),
+ X(0x29eb62cb), X(0x2a09e91b), X(0x2a287523), X(0x2a4706dc),
+ X(0x2a659e3c), X(0x2a843b39), X(0x2aa2ddcd), X(0x2ac185ec),
+ X(0x2ae0338f), X(0x2afee6ad), X(0x2b1d9f3c), X(0x2b3c5d33),
+ X(0x2b5b208b), X(0x2b79e939), X(0x2b98b734), X(0x2bb78a74),
+ X(0x2bd662ef), X(0x2bf5409d), X(0x2c142374), X(0x2c330b6b),
+ X(0x2c51f87a), X(0x2c70ea97), X(0x2c8fe1b9), X(0x2caeddd6),
+ X(0x2ccddee7), X(0x2cece4e1), X(0x2d0befbb), X(0x2d2aff6d),
+ X(0x2d4a13ec), X(0x2d692d31), X(0x2d884b32), X(0x2da76de4),
+ X(0x2dc69540), X(0x2de5c13d), X(0x2e04f1d0), X(0x2e2426f0),
+ X(0x2e436095), X(0x2e629eb4), X(0x2e81e146), X(0x2ea1283f),
+ X(0x2ec07398), X(0x2edfc347), X(0x2eff1742), X(0x2f1e6f80),
+ X(0x2f3dcbf8), X(0x2f5d2ca0), X(0x2f7c916f), X(0x2f9bfa5c),
+ X(0x2fbb675d), X(0x2fdad869), X(0x2ffa4d76), X(0x3019c67b),
+ X(0x3039436f), X(0x3058c448), X(0x307848fc), X(0x3097d183),
+ X(0x30b75dd3), X(0x30d6ede2), X(0x30f681a6), X(0x31161917),
+ X(0x3135b42b), X(0x315552d8), X(0x3174f514), X(0x31949ad7),
+ X(0x31b44417), X(0x31d3f0ca), X(0x31f3a0e6), X(0x32135462),
+ X(0x32330b35), X(0x3252c555), X(0x327282b7), X(0x32924354),
+ X(0x32b20720), X(0x32d1ce13), X(0x32f19823), X(0x33116546),
+ X(0x33313573), X(0x3351089f), X(0x3370dec2), X(0x3390b7d1),
+ X(0x33b093c3), X(0x33d0728f), X(0x33f05429), X(0x3410388a),
+ X(0x34301fa7), X(0x34500977), X(0x346ff5ef), X(0x348fe506),
+ X(0x34afd6b3), X(0x34cfcaeb), X(0x34efc1a5), X(0x350fbad7),
+ X(0x352fb678), X(0x354fb47d), X(0x356fb4dd), X(0x358fb78e),
+ X(0x35afbc86), X(0x35cfc3bc), X(0x35efcd25), X(0x360fd8b8),
+ X(0x362fe66c), X(0x364ff636), X(0x3670080c), X(0x36901be5),
+ X(0x36b031b7), X(0x36d04978), X(0x36f0631e), X(0x37107ea0),
+ X(0x37309bf3), X(0x3750bb0e), X(0x3770dbe6), X(0x3790fe73),
+ X(0x37b122aa), X(0x37d14881), X(0x37f16fee), X(0x381198e8),
+ X(0x3831c365), X(0x3851ef5a), X(0x38721cbe), X(0x38924b87),
+ X(0x38b27bac), X(0x38d2ad21), X(0x38f2dfde), X(0x391313d8),
+ X(0x39334906), X(0x39537f5d), X(0x3973b6d4), X(0x3993ef60),
+ X(0x39b428f9), X(0x39d46393), X(0x39f49f25), X(0x3a14dba6),
+ X(0x3a35190a), X(0x3a555748), X(0x3a759657), X(0x3a95d62c),
+ X(0x3ab616be), X(0x3ad65801), X(0x3af699ed), X(0x3b16dc78),
+ X(0x3b371f97), X(0x3b576341), X(0x3b77a76c), X(0x3b97ec0d),
+ X(0x3bb8311b), X(0x3bd8768b), X(0x3bf8bc55), X(0x3c19026d),
+ X(0x3c3948ca), X(0x3c598f62), X(0x3c79d62b), X(0x3c9a1d1b),
+ X(0x3cba6428), X(0x3cdaab48), X(0x3cfaf271), X(0x3d1b3999),
+ X(0x3d3b80b6), X(0x3d5bc7be), X(0x3d7c0ea8), X(0x3d9c5569),
+ X(0x3dbc9bf7), X(0x3ddce248), X(0x3dfd2852), X(0x3e1d6e0c),
+ X(0x3e3db36c), X(0x3e5df866), X(0x3e7e3cf2), X(0x3e9e8106),
+ X(0x3ebec497), X(0x3edf079b), X(0x3eff4a09), X(0x3f1f8bd7),
+ X(0x3f3fccfa), X(0x3f600d69), X(0x3f804d1a), X(0x3fa08c02),
+ X(0x3fc0ca19), X(0x3fe10753), X(0x400143a7), X(0x40217f0a),
+ X(0x4041b974), X(0x4061f2da), X(0x40822b32), X(0x40a26272),
+ X(0x40c29891), X(0x40e2cd83), X(0x41030140), X(0x412333bd),
+ X(0x414364f1), X(0x416394d2), X(0x4183c355), X(0x41a3f070),
+ X(0x41c41c1b), X(0x41e4464a), X(0x42046ef4), X(0x42249610),
+ X(0x4244bb92), X(0x4264df72), X(0x428501a5), X(0x42a52222),
+ X(0x42c540de), X(0x42e55dd0), X(0x430578ed), X(0x4325922d),
+ X(0x4345a985), X(0x4365beeb), X(0x4385d255), X(0x43a5e3ba),
+ X(0x43c5f30f), X(0x43e6004b), X(0x44060b65), X(0x44261451),
+ X(0x44461b07), X(0x44661f7c), X(0x448621a7), X(0x44a6217d),
+ X(0x44c61ef6), X(0x44e61a07), X(0x450612a6), X(0x452608ca),
+ X(0x4545fc69), X(0x4565ed79), X(0x4585dbf1), X(0x45a5c7c6),
+ X(0x45c5b0ef), X(0x45e59761), X(0x46057b15), X(0x46255bfe),
+ X(0x46453a15), X(0x4665154f), X(0x4684eda2), X(0x46a4c305),
+ X(0x46c4956e), X(0x46e464d3), X(0x4704312b), X(0x4723fa6c),
+ X(0x4743c08d), X(0x47638382), X(0x47834344), X(0x47a2ffc9),
+ X(0x47c2b906), X(0x47e26ef2), X(0x48022183), X(0x4821d0b1),
+ X(0x48417c71), X(0x486124b9), X(0x4880c981), X(0x48a06abe),
+ X(0x48c00867), X(0x48dfa272), X(0x48ff38d6), X(0x491ecb8a),
+ X(0x493e5a84), X(0x495de5b9), X(0x497d6d22), X(0x499cf0b4),
+ X(0x49bc7066), X(0x49dbec2e), X(0x49fb6402), X(0x4a1ad7db),
+ X(0x4a3a47ad), X(0x4a59b370), X(0x4a791b1a), X(0x4a987ea1),
+ X(0x4ab7ddfd), X(0x4ad73924), X(0x4af6900c), X(0x4b15e2ad),
+ X(0x4b3530fc), X(0x4b547af1), X(0x4b73c082), X(0x4b9301a6),
+ X(0x4bb23e53), X(0x4bd17681), X(0x4bf0aa25), X(0x4c0fd937),
+ X(0x4c2f03ae), X(0x4c4e297f), X(0x4c6d4aa3), X(0x4c8c670f),
+ X(0x4cab7eba), X(0x4cca919c), X(0x4ce99fab), X(0x4d08a8de),
+ X(0x4d27ad2c), X(0x4d46ac8b), X(0x4d65a6f3), X(0x4d849c5a),
+ X(0x4da38cb7), X(0x4dc27802), X(0x4de15e31), X(0x4e003f3a),
+ X(0x4e1f1b16), X(0x4e3df1ba), X(0x4e5cc31e), X(0x4e7b8f3a),
+ X(0x4e9a5603), X(0x4eb91771), X(0x4ed7d37b), X(0x4ef68a18),
+ X(0x4f153b3f), X(0x4f33e6e7), X(0x4f528d08), X(0x4f712d97),
+ X(0x4f8fc88e), X(0x4fae5de1), X(0x4fcced8a), X(0x4feb777f),
+ X(0x5009fbb6), X(0x50287a28), X(0x5046f2cc), X(0x50656598),
+ X(0x5083d284), X(0x50a23988), X(0x50c09a9a), X(0x50def5b1),
+ X(0x50fd4ac7), X(0x511b99d0), X(0x5139e2c5), X(0x5158259e),
+ X(0x51766251), X(0x519498d6), X(0x51b2c925), X(0x51d0f334),
+ X(0x51ef16fb), X(0x520d3473), X(0x522b4b91), X(0x52495c4e),
+ X(0x526766a2), X(0x52856a83), X(0x52a367e9), X(0x52c15ecd),
+ X(0x52df4f24), X(0x52fd38e8), X(0x531b1c10), X(0x5338f892),
+ X(0x5356ce68), X(0x53749d89), X(0x539265eb), X(0x53b02788),
+ X(0x53cde257), X(0x53eb964f), X(0x54094369), X(0x5426e99c),
+ X(0x544488df), X(0x5462212c), X(0x547fb279), X(0x549d3cbe),
+ X(0x54babff4), X(0x54d83c12), X(0x54f5b110), X(0x55131ee7),
+ X(0x5530858d), X(0x554de4fc), X(0x556b3d2a), X(0x55888e11),
+ X(0x55a5d7a8), X(0x55c319e7), X(0x55e054c7), X(0x55fd883f),
+ X(0x561ab447), X(0x5637d8d8), X(0x5654f5ea), X(0x56720b75),
+ X(0x568f1971), X(0x56ac1fd7), X(0x56c91e9e), X(0x56e615c0),
+ X(0x57030534), X(0x571fecf2), X(0x573cccf3), X(0x5759a530),
+ X(0x577675a0), X(0x57933e3c), X(0x57affefd), X(0x57ccb7db),
+ X(0x57e968ce), X(0x580611cf), X(0x5822b2d6), X(0x583f4bdd),
+ X(0x585bdcdb), X(0x587865c9), X(0x5894e69f), X(0x58b15f57),
+ X(0x58cdcfe9), X(0x58ea384e), X(0x5906987d), X(0x5922f071),
+ X(0x593f4022), X(0x595b8788), X(0x5977c69c), X(0x5993fd57),
+ X(0x59b02bb2), X(0x59cc51a6), X(0x59e86f2c), X(0x5a04843c),
+ X(0x5a2090d0), X(0x5a3c94e0), X(0x5a589065), X(0x5a748359),
+ X(0x5a906db4), X(0x5aac4f70), X(0x5ac82884), X(0x5ae3f8ec),
+ X(0x5affc09f), X(0x5b1b7f97), X(0x5b3735cd), X(0x5b52e33a),
+ X(0x5b6e87d8), X(0x5b8a239f), X(0x5ba5b689), X(0x5bc1408f),
+ X(0x5bdcc1aa), X(0x5bf839d5), X(0x5c13a907), X(0x5c2f0f3b),
+ X(0x5c4a6c6a), X(0x5c65c08d), X(0x5c810b9e), X(0x5c9c4d97),
+ X(0x5cb78670), X(0x5cd2b623), X(0x5ceddcaa), X(0x5d08f9ff),
+ X(0x5d240e1b), X(0x5d3f18f8), X(0x5d5a1a8f), X(0x5d7512da),
+ X(0x5d9001d3), X(0x5daae773), X(0x5dc5c3b5), X(0x5de09692),
+ X(0x5dfb6004), X(0x5e162004), X(0x5e30d68d), X(0x5e4b8399),
+ X(0x5e662721), X(0x5e80c11f), X(0x5e9b518e), X(0x5eb5d867),
+ X(0x5ed055a4), X(0x5eeac940), X(0x5f053334), X(0x5f1f937b),
+ X(0x5f39ea0f), X(0x5f5436ea), X(0x5f6e7a06), X(0x5f88b35d),
+ X(0x5fa2e2e9), X(0x5fbd08a6), X(0x5fd7248d), X(0x5ff13698),
+ X(0x600b3ec2), X(0x60253d05), X(0x603f315b), X(0x60591bc0),
+ X(0x6072fc2d), X(0x608cd29e), X(0x60a69f0b), X(0x60c06171),
+ X(0x60da19ca), X(0x60f3c80f), X(0x610d6c3d), X(0x6127064d),
+ X(0x6140963a), X(0x615a1bff), X(0x61739797), X(0x618d08fc),
+ X(0x61a67029), X(0x61bfcd1a), X(0x61d91fc8), X(0x61f2682f),
+ X(0x620ba64a), X(0x6224da13), X(0x623e0386), X(0x6257229d),
+ X(0x62703754), X(0x628941a6), X(0x62a2418e), X(0x62bb3706),
+ X(0x62d4220a), X(0x62ed0296), X(0x6305d8a3), X(0x631ea42f),
+ X(0x63376533), X(0x63501bab), X(0x6368c793), X(0x638168e5),
+ X(0x6399ff9e), X(0x63b28bb8), X(0x63cb0d2f), X(0x63e383ff),
+ X(0x63fbf022), X(0x64145195), X(0x642ca853), X(0x6444f457),
+ X(0x645d359e), X(0x64756c22), X(0x648d97e0), X(0x64a5b8d3),
+ X(0x64bdcef6), X(0x64d5da47), X(0x64eddabf), X(0x6505d05c),
+ X(0x651dbb19), X(0x65359af2), X(0x654d6fe3), X(0x656539e7),
+ X(0x657cf8fb), X(0x6594ad1b), X(0x65ac5643), X(0x65c3f46e),
+ X(0x65db8799), X(0x65f30fc0), X(0x660a8ce0), X(0x6621fef3),
+ X(0x663965f7), X(0x6650c1e7), X(0x666812c1), X(0x667f5880),
+ X(0x66969320), X(0x66adc29e), X(0x66c4e6f7), X(0x66dc0026),
+ X(0x66f30e28), X(0x670a10fa), X(0x67210898), X(0x6737f4ff),
+ X(0x674ed62b), X(0x6765ac19), X(0x677c76c5), X(0x6793362c),
+ X(0x67a9ea4b), X(0x67c0931f), X(0x67d730a3), X(0x67edc2d6),
+ X(0x680449b3), X(0x681ac538), X(0x68313562), X(0x68479a2d),
+ X(0x685df396), X(0x6874419b), X(0x688a8438), X(0x68a0bb6a),
+ X(0x68b6e72e), X(0x68cd0782), X(0x68e31c63), X(0x68f925cd),
+ X(0x690f23be), X(0x69251633), X(0x693afd29), X(0x6950d89e),
+ X(0x6966a88f), X(0x697c6cf8), X(0x699225d9), X(0x69a7d32d),
+ X(0x69bd74f3), X(0x69d30b27), X(0x69e895c8), X(0x69fe14d2),
+ X(0x6a138844), X(0x6a28f01b), X(0x6a3e4c54), X(0x6a539ced),
+ X(0x6a68e1e4), X(0x6a7e1b37), X(0x6a9348e3), X(0x6aa86ae6),
+ X(0x6abd813d), X(0x6ad28be7), X(0x6ae78ae2), X(0x6afc7e2b),
+ X(0x6b1165c0), X(0x6b26419f), X(0x6b3b11c7), X(0x6b4fd634),
+ X(0x6b648ee6), X(0x6b793bda), X(0x6b8ddd0e), X(0x6ba27281),
+ X(0x6bb6fc31), X(0x6bcb7a1b), X(0x6bdfec3e), X(0x6bf45299),
+ X(0x6c08ad29), X(0x6c1cfbed), X(0x6c313ee4), X(0x6c45760a),
+ X(0x6c59a160), X(0x6c6dc0e4), X(0x6c81d493), X(0x6c95dc6d),
+ X(0x6ca9d86f), X(0x6cbdc899), X(0x6cd1acea), X(0x6ce5855f),
+ X(0x6cf951f7), X(0x6d0d12b1), X(0x6d20c78c), X(0x6d347087),
+ X(0x6d480da0), X(0x6d5b9ed6), X(0x6d6f2427), X(0x6d829d94),
+ X(0x6d960b1a), X(0x6da96cb9), X(0x6dbcc270), X(0x6dd00c3c),
+ X(0x6de34a1f), X(0x6df67c16), X(0x6e09a221), X(0x6e1cbc3f),
+ X(0x6e2fca6e), X(0x6e42ccaf), X(0x6e55c300), X(0x6e68ad60),
+ X(0x6e7b8bd0), X(0x6e8e5e4d), X(0x6ea124d8), X(0x6eb3df70),
+ X(0x6ec68e13), X(0x6ed930c3), X(0x6eebc77d), X(0x6efe5242),
+ X(0x6f10d111), X(0x6f2343e9), X(0x6f35aacb), X(0x6f4805b5),
+ X(0x6f5a54a8), X(0x6f6c97a2), X(0x6f7ecea4), X(0x6f90f9ae),
+ X(0x6fa318be), X(0x6fb52bd6), X(0x6fc732f4), X(0x6fd92e19),
+ X(0x6feb1d44), X(0x6ffd0076), X(0x700ed7ad), X(0x7020a2eb),
+ X(0x7032622f), X(0x7044157a), X(0x7055bcca), X(0x70675821),
+ X(0x7078e77e), X(0x708a6ae2), X(0x709be24c), X(0x70ad4dbd),
+ X(0x70bead36), X(0x70d000b5), X(0x70e1483d), X(0x70f283cc),
+ X(0x7103b363), X(0x7114d704), X(0x7125eead), X(0x7136fa60),
+ X(0x7147fa1c), X(0x7158ede4), X(0x7169d5b6), X(0x717ab193),
+ X(0x718b817d), X(0x719c4573), X(0x71acfd76), X(0x71bda988),
+ X(0x71ce49a8), X(0x71deddd7), X(0x71ef6617), X(0x71ffe267),
+ X(0x721052ca), X(0x7220b73e), X(0x72310fc6), X(0x72415c62),
+ X(0x72519d14), X(0x7261d1db), X(0x7271faba), X(0x728217b1),
+ X(0x729228c0), X(0x72a22dea), X(0x72b22730), X(0x72c21491),
+ X(0x72d1f611), X(0x72e1cbaf), X(0x72f1956c), X(0x7301534c),
+ X(0x7311054d), X(0x7320ab72), X(0x733045bc), X(0x733fd42d),
+ X(0x734f56c5), X(0x735ecd86), X(0x736e3872), X(0x737d9789),
+ X(0x738ceacf), X(0x739c3243), X(0x73ab6de7), X(0x73ba9dbe),
+ X(0x73c9c1c8), X(0x73d8da08), X(0x73e7e67f), X(0x73f6e72e),
+ X(0x7405dc17), X(0x7414c53c), X(0x7423a29f), X(0x74327442),
+ X(0x74413a26), X(0x744ff44d), X(0x745ea2b9), X(0x746d456c),
+ X(0x747bdc68), X(0x748a67ae), X(0x7498e741), X(0x74a75b23),
+ X(0x74b5c356), X(0x74c41fdb), X(0x74d270b6), X(0x74e0b5e7),
+ X(0x74eeef71), X(0x74fd1d57), X(0x750b3f9a), X(0x7519563c),
+ X(0x75276140), X(0x753560a8), X(0x75435477), X(0x75513cae),
+ X(0x755f1951), X(0x756cea60), X(0x757aafdf), X(0x758869d1),
+ X(0x75961837), X(0x75a3bb14), X(0x75b1526a), X(0x75bede3c),
+ X(0x75cc5e8d), X(0x75d9d35f), X(0x75e73cb5), X(0x75f49a91),
+ X(0x7601ecf6), X(0x760f33e6), X(0x761c6f65), X(0x76299f74),
+ X(0x7636c417), X(0x7643dd51), X(0x7650eb24), X(0x765ded93),
+ X(0x766ae4a0), X(0x7677d050), X(0x7684b0a4), X(0x7691859f),
+ X(0x769e4f45), X(0x76ab0d98), X(0x76b7c09c), X(0x76c46852),
+ X(0x76d104bf), X(0x76dd95e6), X(0x76ea1bc9), X(0x76f6966b),
+ X(0x770305d0), X(0x770f69fb), X(0x771bc2ef), X(0x772810af),
+ X(0x7734533e), X(0x77408aa0), X(0x774cb6d7), X(0x7758d7e8),
+ X(0x7764edd5), X(0x7770f8a2), X(0x777cf852), X(0x7788ece8),
+ X(0x7794d668), X(0x77a0b4d5), X(0x77ac8833), X(0x77b85085),
+ X(0x77c40dce), X(0x77cfc013), X(0x77db6756), X(0x77e7039b),
+ X(0x77f294e6), X(0x77fe1b3b), X(0x7809969c), X(0x7815070e),
+ X(0x78206c93), X(0x782bc731), X(0x783716ea), X(0x78425bc3),
+ X(0x784d95be), X(0x7858c4e1), X(0x7863e92d), X(0x786f02a8),
+ X(0x787a1156), X(0x78851539), X(0x78900e56), X(0x789afcb1),
+ X(0x78a5e04d), X(0x78b0b92f), X(0x78bb875b), X(0x78c64ad4),
+ X(0x78d1039e), X(0x78dbb1be), X(0x78e65537), X(0x78f0ee0e),
+ X(0x78fb7c46), X(0x7905ffe4), X(0x791078ec), X(0x791ae762),
+ X(0x79254b4a), X(0x792fa4a7), X(0x7939f380), X(0x794437d7),
+ X(0x794e71b0), X(0x7958a111), X(0x7962c5fd), X(0x796ce078),
+ X(0x7976f087), X(0x7980f62f), X(0x798af173), X(0x7994e258),
+ X(0x799ec8e2), X(0x79a8a515), X(0x79b276f7), X(0x79bc3e8b),
+ X(0x79c5fbd6), X(0x79cfaedc), X(0x79d957a2), X(0x79e2f62c),
+ X(0x79ec8a7f), X(0x79f6149f), X(0x79ff9492), X(0x7a090a5a),
+ X(0x7a1275fe), X(0x7a1bd781), X(0x7a252ee9), X(0x7a2e7c39),
+ X(0x7a37bf77), X(0x7a40f8a7), X(0x7a4a27ce), X(0x7a534cf0),
+ X(0x7a5c6813), X(0x7a65793b), X(0x7a6e806d), X(0x7a777dad),
+ X(0x7a807100), X(0x7a895a6b), X(0x7a9239f4), X(0x7a9b0f9e),
+ X(0x7aa3db6f), X(0x7aac9d6b), X(0x7ab55597), X(0x7abe03f9),
+ X(0x7ac6a895), X(0x7acf4370), X(0x7ad7d48f), X(0x7ae05bf6),
+ X(0x7ae8d9ac), X(0x7af14db5), X(0x7af9b815), X(0x7b0218d2),
+ X(0x7b0a6ff2), X(0x7b12bd78), X(0x7b1b016a), X(0x7b233bce),
+ X(0x7b2b6ca7), X(0x7b3393fc), X(0x7b3bb1d1), X(0x7b43c62c),
+ X(0x7b4bd111), X(0x7b53d286), X(0x7b5bca90), X(0x7b63b935),
+ X(0x7b6b9e78), X(0x7b737a61), X(0x7b7b4cf3), X(0x7b831634),
+ X(0x7b8ad629), X(0x7b928cd8), X(0x7b9a3a45), X(0x7ba1de77),
+ X(0x7ba97972), X(0x7bb10b3c), X(0x7bb893d9), X(0x7bc01350),
+ X(0x7bc789a6), X(0x7bcef6e0), X(0x7bd65b03), X(0x7bddb616),
+ X(0x7be5081c), X(0x7bec511c), X(0x7bf3911b), X(0x7bfac81f),
+ X(0x7c01f62c), X(0x7c091b49), X(0x7c10377b), X(0x7c174ac7),
+ X(0x7c1e5532), X(0x7c2556c4), X(0x7c2c4f80), X(0x7c333f6c),
+ X(0x7c3a268e), X(0x7c4104ec), X(0x7c47da8a), X(0x7c4ea76f),
+ X(0x7c556ba1), X(0x7c5c2724), X(0x7c62d9fe), X(0x7c698435),
+ X(0x7c7025cf), X(0x7c76bed0), X(0x7c7d4f40), X(0x7c83d723),
+ X(0x7c8a567f), X(0x7c90cd5a), X(0x7c973bb9), X(0x7c9da1a2),
+ X(0x7ca3ff1b), X(0x7caa542a), X(0x7cb0a0d3), X(0x7cb6e51e),
+ X(0x7cbd210f), X(0x7cc354ac), X(0x7cc97ffc), X(0x7ccfa304),
+ X(0x7cd5bdc9), X(0x7cdbd051), X(0x7ce1daa3), X(0x7ce7dcc3),
+ X(0x7cedd6b8), X(0x7cf3c888), X(0x7cf9b238), X(0x7cff93cf),
+ X(0x7d056d51), X(0x7d0b3ec5), X(0x7d110830), X(0x7d16c99a),
+ X(0x7d1c8306), X(0x7d22347c), X(0x7d27de00), X(0x7d2d7f9a),
+ X(0x7d33194f), X(0x7d38ab24), X(0x7d3e351f), X(0x7d43b748),
+ X(0x7d4931a2), X(0x7d4ea435), X(0x7d540f06), X(0x7d59721b),
+ X(0x7d5ecd7b), X(0x7d64212a), X(0x7d696d2f), X(0x7d6eb190),
+ X(0x7d73ee53), X(0x7d79237e), X(0x7d7e5117), X(0x7d837723),
+ X(0x7d8895a9), X(0x7d8dacae), X(0x7d92bc3a), X(0x7d97c451),
+ X(0x7d9cc4f9), X(0x7da1be39), X(0x7da6b017), X(0x7dab9a99),
+ X(0x7db07dc4), X(0x7db5599e), X(0x7dba2e2f), X(0x7dbefb7b),
+ X(0x7dc3c189), X(0x7dc8805e), X(0x7dcd3802), X(0x7dd1e879),
+ X(0x7dd691ca), X(0x7ddb33fb), X(0x7ddfcf12), X(0x7de46315),
+ X(0x7de8f00a), X(0x7ded75f8), X(0x7df1f4e3), X(0x7df66cd3),
+ X(0x7dfaddcd), X(0x7dff47d7), X(0x7e03aaf8), X(0x7e080735),
+ X(0x7e0c5c95), X(0x7e10ab1e), X(0x7e14f2d5), X(0x7e1933c1),
+ X(0x7e1d6de8), X(0x7e21a150), X(0x7e25cdff), X(0x7e29f3fc),
+ X(0x7e2e134c), X(0x7e322bf5), X(0x7e363dfd), X(0x7e3a496b),
+ X(0x7e3e4e45), X(0x7e424c90), X(0x7e464454), X(0x7e4a3595),
+ X(0x7e4e205a), X(0x7e5204aa), X(0x7e55e289), X(0x7e59b9ff),
+ X(0x7e5d8b12), X(0x7e6155c7), X(0x7e651a24), X(0x7e68d831),
+ X(0x7e6c8ff2), X(0x7e70416e), X(0x7e73ecac), X(0x7e7791b0),
+ X(0x7e7b3082), X(0x7e7ec927), X(0x7e825ba6), X(0x7e85e804),
+ X(0x7e896e48), X(0x7e8cee77), X(0x7e906899), X(0x7e93dcb2),
+ X(0x7e974aca), X(0x7e9ab2e5), X(0x7e9e150b), X(0x7ea17141),
+ X(0x7ea4c78e), X(0x7ea817f7), X(0x7eab6283), X(0x7eaea737),
+ X(0x7eb1e61a), X(0x7eb51f33), X(0x7eb85285), X(0x7ebb8019),
+ X(0x7ebea7f4), X(0x7ec1ca1d), X(0x7ec4e698), X(0x7ec7fd6d),
+ X(0x7ecb0ea1), X(0x7ece1a3a), X(0x7ed1203f), X(0x7ed420b6),
+ X(0x7ed71ba4), X(0x7eda110f), X(0x7edd00ff), X(0x7edfeb78),
+ X(0x7ee2d081), X(0x7ee5b01f), X(0x7ee88a5a), X(0x7eeb5f36),
+ X(0x7eee2eba), X(0x7ef0f8ed), X(0x7ef3bdd3), X(0x7ef67d73),
+ X(0x7ef937d3), X(0x7efbecf9), X(0x7efe9ceb), X(0x7f0147ae),
+ X(0x7f03ed4a), X(0x7f068dc4), X(0x7f092922), X(0x7f0bbf69),
+ X(0x7f0e50a1), X(0x7f10dcce), X(0x7f1363f7), X(0x7f15e622),
+ X(0x7f186355), X(0x7f1adb95), X(0x7f1d4ee9), X(0x7f1fbd57),
+ X(0x7f2226e4), X(0x7f248b96), X(0x7f26eb74), X(0x7f294683),
+ X(0x7f2b9cc9), X(0x7f2dee4d), X(0x7f303b13), X(0x7f328322),
+ X(0x7f34c680), X(0x7f370533), X(0x7f393f40), X(0x7f3b74ad),
+ X(0x7f3da581), X(0x7f3fd1c1), X(0x7f41f972), X(0x7f441c9c),
+ X(0x7f463b43), X(0x7f48556d), X(0x7f4a6b21), X(0x7f4c7c64),
+ X(0x7f4e893c), X(0x7f5091ae), X(0x7f5295c1), X(0x7f54957a),
+ X(0x7f5690e0), X(0x7f5887f7), X(0x7f5a7ac5), X(0x7f5c6951),
+ X(0x7f5e53a0), X(0x7f6039b8), X(0x7f621b9e), X(0x7f63f958),
+ X(0x7f65d2ed), X(0x7f67a861), X(0x7f6979ba), X(0x7f6b46ff),
+ X(0x7f6d1034), X(0x7f6ed560), X(0x7f709687), X(0x7f7253b1),
+ X(0x7f740ce1), X(0x7f75c21f), X(0x7f777370), X(0x7f7920d8),
+ X(0x7f7aca5f), X(0x7f7c7008), X(0x7f7e11db), X(0x7f7fafdd),
+ X(0x7f814a13), X(0x7f82e082), X(0x7f847331), X(0x7f860224),
+ X(0x7f878d62), X(0x7f8914f0), X(0x7f8a98d4), X(0x7f8c1912),
+ X(0x7f8d95b0), X(0x7f8f0eb5), X(0x7f908425), X(0x7f91f605),
+ X(0x7f93645c), X(0x7f94cf2f), X(0x7f963683), X(0x7f979a5d),
+ X(0x7f98fac4), X(0x7f9a57bb), X(0x7f9bb14a), X(0x7f9d0775),
+ X(0x7f9e5a41), X(0x7f9fa9b4), X(0x7fa0f5d3), X(0x7fa23ea4),
+ X(0x7fa3842b), X(0x7fa4c66f), X(0x7fa60575), X(0x7fa74141),
+ X(0x7fa879d9), X(0x7fa9af42), X(0x7faae182), X(0x7fac109e),
+ X(0x7fad3c9a), X(0x7fae657d), X(0x7faf8b4c), X(0x7fb0ae0b),
+ X(0x7fb1cdc0), X(0x7fb2ea70), X(0x7fb40420), X(0x7fb51ad5),
+ X(0x7fb62e95), X(0x7fb73f64), X(0x7fb84d48), X(0x7fb95846),
+ X(0x7fba6062), X(0x7fbb65a2), X(0x7fbc680c), X(0x7fbd67a3),
+ X(0x7fbe646d), X(0x7fbf5e70), X(0x7fc055af), X(0x7fc14a31),
+ X(0x7fc23bf9), X(0x7fc32b0d), X(0x7fc41773), X(0x7fc5012e),
+ X(0x7fc5e844), X(0x7fc6ccba), X(0x7fc7ae94), X(0x7fc88dd8),
+ X(0x7fc96a8a), X(0x7fca44af), X(0x7fcb1c4c), X(0x7fcbf167),
+ X(0x7fccc403), X(0x7fcd9425), X(0x7fce61d3), X(0x7fcf2d11),
+ X(0x7fcff5e3), X(0x7fd0bc4f), X(0x7fd1805a), X(0x7fd24207),
+ X(0x7fd3015c), X(0x7fd3be5d), X(0x7fd47910), X(0x7fd53178),
+ X(0x7fd5e79b), X(0x7fd69b7c), X(0x7fd74d21), X(0x7fd7fc8e),
+ X(0x7fd8a9c8), X(0x7fd954d4), X(0x7fd9fdb5), X(0x7fdaa471),
+ X(0x7fdb490b), X(0x7fdbeb89), X(0x7fdc8bef), X(0x7fdd2a42),
+ X(0x7fddc685), X(0x7fde60be), X(0x7fdef8f0), X(0x7fdf8f20),
+ X(0x7fe02353), X(0x7fe0b58d), X(0x7fe145d3), X(0x7fe1d428),
+ X(0x7fe26091), X(0x7fe2eb12), X(0x7fe373b0), X(0x7fe3fa6f),
+ X(0x7fe47f53), X(0x7fe50260), X(0x7fe5839b), X(0x7fe60308),
+ X(0x7fe680ab), X(0x7fe6fc88), X(0x7fe776a4), X(0x7fe7ef02),
+ X(0x7fe865a7), X(0x7fe8da97), X(0x7fe94dd6), X(0x7fe9bf68),
+ X(0x7fea2f51), X(0x7fea9d95), X(0x7feb0a39), X(0x7feb7540),
+ X(0x7febdeae), X(0x7fec4687), X(0x7fecaccf), X(0x7fed118b),
+ X(0x7fed74be), X(0x7fedd66c), X(0x7fee3698), X(0x7fee9548),
+ X(0x7feef27e), X(0x7fef4e3f), X(0x7fefa88e), X(0x7ff0016f),
+ X(0x7ff058e7), X(0x7ff0aef8), X(0x7ff103a6), X(0x7ff156f6),
+ X(0x7ff1a8eb), X(0x7ff1f988), X(0x7ff248d2), X(0x7ff296cc),
+ X(0x7ff2e37a), X(0x7ff32edf), X(0x7ff378ff), X(0x7ff3c1de),
+ X(0x7ff4097e), X(0x7ff44fe5), X(0x7ff49515), X(0x7ff4d911),
+ X(0x7ff51bde), X(0x7ff55d7f), X(0x7ff59df7), X(0x7ff5dd4a),
+ X(0x7ff61b7b), X(0x7ff6588d), X(0x7ff69485), X(0x7ff6cf65),
+ X(0x7ff70930), X(0x7ff741eb), X(0x7ff77998), X(0x7ff7b03b),
+ X(0x7ff7e5d7), X(0x7ff81a6f), X(0x7ff84e06), X(0x7ff880a1),
+ X(0x7ff8b241), X(0x7ff8e2ea), X(0x7ff912a0), X(0x7ff94165),
+ X(0x7ff96f3d), X(0x7ff99c2b), X(0x7ff9c831), X(0x7ff9f354),
+ X(0x7ffa1d95), X(0x7ffa46f9), X(0x7ffa6f81), X(0x7ffa9731),
+ X(0x7ffabe0d), X(0x7ffae416), X(0x7ffb0951), X(0x7ffb2dbf),
+ X(0x7ffb5164), X(0x7ffb7442), X(0x7ffb965d), X(0x7ffbb7b8),
+ X(0x7ffbd854), X(0x7ffbf836), X(0x7ffc175f), X(0x7ffc35d3),
+ X(0x7ffc5394), X(0x7ffc70a5), X(0x7ffc8d09), X(0x7ffca8c2),
+ X(0x7ffcc3d4), X(0x7ffcde3f), X(0x7ffcf809), X(0x7ffd1132),
+ X(0x7ffd29be), X(0x7ffd41ae), X(0x7ffd5907), X(0x7ffd6fc9),
+ X(0x7ffd85f9), X(0x7ffd9b97), X(0x7ffdb0a7), X(0x7ffdc52b),
+ X(0x7ffdd926), X(0x7ffdec99), X(0x7ffdff88), X(0x7ffe11f4),
+ X(0x7ffe23e0), X(0x7ffe354f), X(0x7ffe4642), X(0x7ffe56bc),
+ X(0x7ffe66bf), X(0x7ffe764e), X(0x7ffe856a), X(0x7ffe9416),
+ X(0x7ffea254), X(0x7ffeb026), X(0x7ffebd8e), X(0x7ffeca8f),
+ X(0x7ffed72a), X(0x7ffee362), X(0x7ffeef38), X(0x7ffefaaf),
+ X(0x7fff05c9), X(0x7fff1087), X(0x7fff1aec), X(0x7fff24f9),
+ X(0x7fff2eb1), X(0x7fff3816), X(0x7fff4128), X(0x7fff49eb),
+ X(0x7fff5260), X(0x7fff5a88), X(0x7fff6266), X(0x7fff69fc),
+ X(0x7fff714b), X(0x7fff7854), X(0x7fff7f1a), X(0x7fff859f),
+ X(0x7fff8be3), X(0x7fff91ea), X(0x7fff97b3), X(0x7fff9d41),
+ X(0x7fffa296), X(0x7fffa7b3), X(0x7fffac99), X(0x7fffb14b),
+ X(0x7fffb5c9), X(0x7fffba15), X(0x7fffbe31), X(0x7fffc21d),
+ X(0x7fffc5dc), X(0x7fffc96f), X(0x7fffccd8), X(0x7fffd016),
+ X(0x7fffd32d), X(0x7fffd61c), X(0x7fffd8e7), X(0x7fffdb8d),
+ X(0x7fffde0f), X(0x7fffe071), X(0x7fffe2b1), X(0x7fffe4d2),
+ X(0x7fffe6d5), X(0x7fffe8bb), X(0x7fffea85), X(0x7fffec34),
+ X(0x7fffedc9), X(0x7fffef45), X(0x7ffff0aa), X(0x7ffff1f7),
+ X(0x7ffff330), X(0x7ffff453), X(0x7ffff562), X(0x7ffff65f),
+ X(0x7ffff749), X(0x7ffff823), X(0x7ffff8ec), X(0x7ffff9a6),
+ X(0x7ffffa51), X(0x7ffffaee), X(0x7ffffb7e), X(0x7ffffc02),
+ X(0x7ffffc7a), X(0x7ffffce7), X(0x7ffffd4a), X(0x7ffffda3),
+ X(0x7ffffdf4), X(0x7ffffe3c), X(0x7ffffe7c), X(0x7ffffeb6),
+ X(0x7ffffee8), X(0x7fffff15), X(0x7fffff3c), X(0x7fffff5e),
+ X(0x7fffff7b), X(0x7fffff95), X(0x7fffffaa), X(0x7fffffbc),
+ X(0x7fffffcb), X(0x7fffffd7), X(0x7fffffe2), X(0x7fffffea),
+ X(0x7ffffff0), X(0x7ffffff5), X(0x7ffffff9), X(0x7ffffffb),
+ X(0x7ffffffd), X(0x7ffffffe), X(0x7fffffff), X(0x7fffffff),
+ X(0x7fffffff), X(0x7fffffff), X(0x7fffffff), X(0x7fffffff),
+};
+
+#ifndef LIMIT_TO_64kHz
+
+static LOOKUP_T vwin8192[4096] = {
+ X(0x0000007c), X(0x0000045c), X(0x00000c1d), X(0x000017bd),
+ X(0x0000273e), X(0x00003a9f), X(0x000051e0), X(0x00006d02),
+ X(0x00008c03), X(0x0000aee5), X(0x0000d5a7), X(0x00010049),
+ X(0x00012ecb), X(0x0001612d), X(0x00019770), X(0x0001d193),
+ X(0x00020f96), X(0x00025178), X(0x0002973c), X(0x0002e0df),
+ X(0x00032e62), X(0x00037fc5), X(0x0003d509), X(0x00042e2c),
+ X(0x00048b30), X(0x0004ec13), X(0x000550d7), X(0x0005b97a),
+ X(0x000625fe), X(0x00069661), X(0x00070aa4), X(0x000782c8),
+ X(0x0007fecb), X(0x00087eae), X(0x00090271), X(0x00098a14),
+ X(0x000a1597), X(0x000aa4f9), X(0x000b383b), X(0x000bcf5d),
+ X(0x000c6a5f), X(0x000d0941), X(0x000dac02), X(0x000e52a3),
+ X(0x000efd23), X(0x000fab84), X(0x00105dc3), X(0x001113e3),
+ X(0x0011cde2), X(0x00128bc0), X(0x00134d7e), X(0x0014131b),
+ X(0x0014dc98), X(0x0015a9f4), X(0x00167b30), X(0x0017504a),
+ X(0x00182945), X(0x0019061e), X(0x0019e6d7), X(0x001acb6f),
+ X(0x001bb3e6), X(0x001ca03c), X(0x001d9071), X(0x001e8485),
+ X(0x001f7c79), X(0x0020784b), X(0x002177fc), X(0x00227b8c),
+ X(0x002382fb), X(0x00248e49), X(0x00259d76), X(0x0026b081),
+ X(0x0027c76b), X(0x0028e234), X(0x002a00dc), X(0x002b2361),
+ X(0x002c49c6), X(0x002d7409), X(0x002ea22a), X(0x002fd42a),
+ X(0x00310a08), X(0x003243c5), X(0x00338160), X(0x0034c2d9),
+ X(0x00360830), X(0x00375165), X(0x00389e78), X(0x0039ef6a),
+ X(0x003b4439), X(0x003c9ce6), X(0x003df971), X(0x003f59da),
+ X(0x0040be20), X(0x00422645), X(0x00439247), X(0x00450226),
+ X(0x004675e3), X(0x0047ed7e), X(0x004968f5), X(0x004ae84b),
+ X(0x004c6b7d), X(0x004df28d), X(0x004f7d7a), X(0x00510c44),
+ X(0x00529eeb), X(0x00543570), X(0x0055cfd1), X(0x00576e0f),
+ X(0x00591029), X(0x005ab621), X(0x005c5ff5), X(0x005e0da6),
+ X(0x005fbf33), X(0x0061749d), X(0x00632de4), X(0x0064eb06),
+ X(0x0066ac05), X(0x006870e0), X(0x006a3998), X(0x006c062b),
+ X(0x006dd69b), X(0x006faae6), X(0x0071830d), X(0x00735f10),
+ X(0x00753eef), X(0x007722a9), X(0x00790a3f), X(0x007af5b1),
+ X(0x007ce4fe), X(0x007ed826), X(0x0080cf29), X(0x0082ca08),
+ X(0x0084c8c2), X(0x0086cb57), X(0x0088d1c7), X(0x008adc11),
+ X(0x008cea37), X(0x008efc37), X(0x00911212), X(0x00932bc7),
+ X(0x00954957), X(0x00976ac2), X(0x00999006), X(0x009bb925),
+ X(0x009de61e), X(0x00a016f1), X(0x00a24b9e), X(0x00a48425),
+ X(0x00a6c086), X(0x00a900c0), X(0x00ab44d4), X(0x00ad8cc2),
+ X(0x00afd889), X(0x00b22829), X(0x00b47ba2), X(0x00b6d2f5),
+ X(0x00b92e21), X(0x00bb8d26), X(0x00bdf004), X(0x00c056ba),
+ X(0x00c2c149), X(0x00c52fb1), X(0x00c7a1f1), X(0x00ca180a),
+ X(0x00cc91fb), X(0x00cf0fc5), X(0x00d19166), X(0x00d416df),
+ X(0x00d6a031), X(0x00d92d5a), X(0x00dbbe5b), X(0x00de5333),
+ X(0x00e0ebe3), X(0x00e3886b), X(0x00e628c9), X(0x00e8ccff),
+ X(0x00eb750c), X(0x00ee20f0), X(0x00f0d0ab), X(0x00f3843d),
+ X(0x00f63ba5), X(0x00f8f6e4), X(0x00fbb5fa), X(0x00fe78e5),
+ X(0x01013fa7), X(0x01040a3f), X(0x0106d8ae), X(0x0109aaf2),
+ X(0x010c810c), X(0x010f5afb), X(0x011238c0), X(0x01151a5b),
+ X(0x0117ffcb), X(0x011ae910), X(0x011dd62a), X(0x0120c719),
+ X(0x0123bbdd), X(0x0126b476), X(0x0129b0e4), X(0x012cb126),
+ X(0x012fb53c), X(0x0132bd27), X(0x0135c8e6), X(0x0138d879),
+ X(0x013bebdf), X(0x013f031a), X(0x01421e28), X(0x01453d0a),
+ X(0x01485fbf), X(0x014b8648), X(0x014eb0a4), X(0x0151ded2),
+ X(0x015510d4), X(0x015846a8), X(0x015b8050), X(0x015ebdc9),
+ X(0x0161ff15), X(0x01654434), X(0x01688d24), X(0x016bd9e6),
+ X(0x016f2a7b), X(0x01727ee1), X(0x0175d718), X(0x01793321),
+ X(0x017c92fc), X(0x017ff6a7), X(0x01835e24), X(0x0186c972),
+ X(0x018a3890), X(0x018dab7f), X(0x0191223f), X(0x01949ccf),
+ X(0x01981b2f), X(0x019b9d5f), X(0x019f235f), X(0x01a2ad2f),
+ X(0x01a63acf), X(0x01a9cc3e), X(0x01ad617c), X(0x01b0fa8a),
+ X(0x01b49767), X(0x01b83813), X(0x01bbdc8d), X(0x01bf84d6),
+ X(0x01c330ee), X(0x01c6e0d4), X(0x01ca9488), X(0x01ce4c0b),
+ X(0x01d2075b), X(0x01d5c679), X(0x01d98964), X(0x01dd501d),
+ X(0x01e11aa3), X(0x01e4e8f6), X(0x01e8bb17), X(0x01ec9104),
+ X(0x01f06abd), X(0x01f44844), X(0x01f82996), X(0x01fc0eb5),
+ X(0x01fff7a0), X(0x0203e456), X(0x0207d4d9), X(0x020bc926),
+ X(0x020fc140), X(0x0213bd24), X(0x0217bcd4), X(0x021bc04e),
+ X(0x021fc793), X(0x0223d2a3), X(0x0227e17d), X(0x022bf421),
+ X(0x02300a90), X(0x023424c8), X(0x023842ca), X(0x023c6495),
+ X(0x02408a2a), X(0x0244b389), X(0x0248e0b0), X(0x024d11a0),
+ X(0x02514659), X(0x02557eda), X(0x0259bb24), X(0x025dfb35),
+ X(0x02623f0f), X(0x026686b1), X(0x026ad21a), X(0x026f214b),
+ X(0x02737443), X(0x0277cb02), X(0x027c2588), X(0x028083d5),
+ X(0x0284e5e9), X(0x02894bc2), X(0x028db562), X(0x029222c8),
+ X(0x029693f4), X(0x029b08e6), X(0x029f819d), X(0x02a3fe19),
+ X(0x02a87e5b), X(0x02ad0261), X(0x02b18a2c), X(0x02b615bb),
+ X(0x02baa50f), X(0x02bf3827), X(0x02c3cf03), X(0x02c869a3),
+ X(0x02cd0807), X(0x02d1aa2d), X(0x02d65017), X(0x02daf9c4),
+ X(0x02dfa734), X(0x02e45866), X(0x02e90d5b), X(0x02edc612),
+ X(0x02f2828b), X(0x02f742c6), X(0x02fc06c3), X(0x0300ce80),
+ X(0x030599ff), X(0x030a6940), X(0x030f3c40), X(0x03141302),
+ X(0x0318ed84), X(0x031dcbc6), X(0x0322adc8), X(0x0327938a),
+ X(0x032c7d0c), X(0x03316a4c), X(0x03365b4d), X(0x033b500c),
+ X(0x03404889), X(0x034544c6), X(0x034a44c0), X(0x034f4879),
+ X(0x03544ff0), X(0x03595b24), X(0x035e6a16), X(0x03637cc5),
+ X(0x03689331), X(0x036dad5a), X(0x0372cb40), X(0x0377ece2),
+ X(0x037d1240), X(0x03823b5a), X(0x03876830), X(0x038c98c1),
+ X(0x0391cd0e), X(0x03970516), X(0x039c40d8), X(0x03a18055),
+ X(0x03a6c38d), X(0x03ac0a7f), X(0x03b1552b), X(0x03b6a390),
+ X(0x03bbf5af), X(0x03c14b88), X(0x03c6a519), X(0x03cc0263),
+ X(0x03d16366), X(0x03d6c821), X(0x03dc3094), X(0x03e19cc0),
+ X(0x03e70ca2), X(0x03ec803d), X(0x03f1f78e), X(0x03f77296),
+ X(0x03fcf155), X(0x040273cb), X(0x0407f9f7), X(0x040d83d9),
+ X(0x04131170), X(0x0418a2bd), X(0x041e37c0), X(0x0423d077),
+ X(0x04296ce4), X(0x042f0d04), X(0x0434b0da), X(0x043a5863),
+ X(0x044003a0), X(0x0445b290), X(0x044b6534), X(0x04511b8b),
+ X(0x0456d595), X(0x045c9352), X(0x046254c1), X(0x046819e1),
+ X(0x046de2b4), X(0x0473af39), X(0x04797f6e), X(0x047f5355),
+ X(0x04852aec), X(0x048b0635), X(0x0490e52d), X(0x0496c7d6),
+ X(0x049cae2e), X(0x04a29836), X(0x04a885ed), X(0x04ae7753),
+ X(0x04b46c68), X(0x04ba652b), X(0x04c0619d), X(0x04c661bc),
+ X(0x04cc658a), X(0x04d26d04), X(0x04d8782c), X(0x04de8701),
+ X(0x04e49983), X(0x04eaafb0), X(0x04f0c98a), X(0x04f6e710),
+ X(0x04fd0842), X(0x05032d1e), X(0x050955a6), X(0x050f81d8),
+ X(0x0515b1b5), X(0x051be53d), X(0x05221c6e), X(0x05285748),
+ X(0x052e95cd), X(0x0534d7fa), X(0x053b1dd0), X(0x0541674e),
+ X(0x0547b475), X(0x054e0544), X(0x055459bb), X(0x055ab1d9),
+ X(0x05610d9e), X(0x05676d0a), X(0x056dd01c), X(0x057436d5),
+ X(0x057aa134), X(0x05810f38), X(0x058780e2), X(0x058df631),
+ X(0x05946f25), X(0x059aebbe), X(0x05a16bfa), X(0x05a7efdb),
+ X(0x05ae775f), X(0x05b50287), X(0x05bb9152), X(0x05c223c0),
+ X(0x05c8b9d0), X(0x05cf5382), X(0x05d5f0d6), X(0x05dc91cc),
+ X(0x05e33663), X(0x05e9de9c), X(0x05f08a75), X(0x05f739ee),
+ X(0x05fded07), X(0x0604a3c0), X(0x060b5e19), X(0x06121c11),
+ X(0x0618dda8), X(0x061fa2dd), X(0x06266bb1), X(0x062d3822),
+ X(0x06340831), X(0x063adbde), X(0x0641b328), X(0x06488e0e),
+ X(0x064f6c91), X(0x06564eaf), X(0x065d346a), X(0x06641dc0),
+ X(0x066b0ab1), X(0x0671fb3d), X(0x0678ef64), X(0x067fe724),
+ X(0x0686e27f), X(0x068de173), X(0x0694e400), X(0x069bea27),
+ X(0x06a2f3e6), X(0x06aa013d), X(0x06b1122c), X(0x06b826b3),
+ X(0x06bf3ed1), X(0x06c65a86), X(0x06cd79d1), X(0x06d49cb3),
+ X(0x06dbc32b), X(0x06e2ed38), X(0x06ea1adb), X(0x06f14c13),
+ X(0x06f880df), X(0x06ffb940), X(0x0706f535), X(0x070e34bd),
+ X(0x071577d9), X(0x071cbe88), X(0x072408c9), X(0x072b569d),
+ X(0x0732a802), X(0x0739fcf9), X(0x07415582), X(0x0748b19b),
+ X(0x07501145), X(0x0757747f), X(0x075edb49), X(0x076645a3),
+ X(0x076db38c), X(0x07752503), X(0x077c9a09), X(0x0784129e),
+ X(0x078b8ec0), X(0x07930e70), X(0x079a91ac), X(0x07a21876),
+ X(0x07a9a2cc), X(0x07b130ad), X(0x07b8c21b), X(0x07c05714),
+ X(0x07c7ef98), X(0x07cf8ba6), X(0x07d72b3f), X(0x07dece62),
+ X(0x07e6750e), X(0x07ee1f43), X(0x07f5cd01), X(0x07fd7e48),
+ X(0x08053316), X(0x080ceb6d), X(0x0814a74a), X(0x081c66af),
+ X(0x0824299a), X(0x082bf00c), X(0x0833ba03), X(0x083b8780),
+ X(0x08435882), X(0x084b2d09), X(0x08530514), X(0x085ae0a3),
+ X(0x0862bfb6), X(0x086aa24c), X(0x08728865), X(0x087a7201),
+ X(0x08825f1e), X(0x088a4fbe), X(0x089243de), X(0x089a3b80),
+ X(0x08a236a2), X(0x08aa3545), X(0x08b23767), X(0x08ba3d09),
+ X(0x08c2462a), X(0x08ca52c9), X(0x08d262e7), X(0x08da7682),
+ X(0x08e28d9c), X(0x08eaa832), X(0x08f2c645), X(0x08fae7d4),
+ X(0x09030cdf), X(0x090b3566), X(0x09136168), X(0x091b90e5),
+ X(0x0923c3dc), X(0x092bfa4d), X(0x09343437), X(0x093c719b),
+ X(0x0944b277), X(0x094cf6cc), X(0x09553e99), X(0x095d89dd),
+ X(0x0965d899), X(0x096e2acb), X(0x09768073), X(0x097ed991),
+ X(0x09873625), X(0x098f962e), X(0x0997f9ac), X(0x09a0609e),
+ X(0x09a8cb04), X(0x09b138dd), X(0x09b9aa29), X(0x09c21ee8),
+ X(0x09ca9719), X(0x09d312bc), X(0x09db91d0), X(0x09e41456),
+ X(0x09ec9a4b), X(0x09f523b1), X(0x09fdb087), X(0x0a0640cc),
+ X(0x0a0ed47f), X(0x0a176ba2), X(0x0a200632), X(0x0a28a42f),
+ X(0x0a31459a), X(0x0a39ea72), X(0x0a4292b5), X(0x0a4b3e65),
+ X(0x0a53ed80), X(0x0a5ca006), X(0x0a6555f7), X(0x0a6e0f51),
+ X(0x0a76cc16), X(0x0a7f8c44), X(0x0a884fda), X(0x0a9116d9),
+ X(0x0a99e140), X(0x0aa2af0e), X(0x0aab8043), X(0x0ab454df),
+ X(0x0abd2ce1), X(0x0ac60849), X(0x0acee716), X(0x0ad7c948),
+ X(0x0ae0aedf), X(0x0ae997d9), X(0x0af28437), X(0x0afb73f7),
+ X(0x0b04671b), X(0x0b0d5da0), X(0x0b165788), X(0x0b1f54d0),
+ X(0x0b285579), X(0x0b315983), X(0x0b3a60ec), X(0x0b436bb5),
+ X(0x0b4c79dd), X(0x0b558b63), X(0x0b5ea048), X(0x0b67b88a),
+ X(0x0b70d429), X(0x0b79f324), X(0x0b83157c), X(0x0b8c3b30),
+ X(0x0b95643f), X(0x0b9e90a8), X(0x0ba7c06c), X(0x0bb0f38a),
+ X(0x0bba2a01), X(0x0bc363d1), X(0x0bcca0f9), X(0x0bd5e17a),
+ X(0x0bdf2552), X(0x0be86c81), X(0x0bf1b706), X(0x0bfb04e2),
+ X(0x0c045613), X(0x0c0daa99), X(0x0c170274), X(0x0c205da3),
+ X(0x0c29bc25), X(0x0c331dfb), X(0x0c3c8323), X(0x0c45eb9e),
+ X(0x0c4f576a), X(0x0c58c688), X(0x0c6238f6), X(0x0c6baeb5),
+ X(0x0c7527c3), X(0x0c7ea421), X(0x0c8823cd), X(0x0c91a6c8),
+ X(0x0c9b2d10), X(0x0ca4b6a6), X(0x0cae4389), X(0x0cb7d3b8),
+ X(0x0cc16732), X(0x0ccafdf8), X(0x0cd49809), X(0x0cde3564),
+ X(0x0ce7d609), X(0x0cf179f7), X(0x0cfb212e), X(0x0d04cbad),
+ X(0x0d0e7974), X(0x0d182a83), X(0x0d21ded8), X(0x0d2b9673),
+ X(0x0d355154), X(0x0d3f0f7b), X(0x0d48d0e6), X(0x0d529595),
+ X(0x0d5c5d88), X(0x0d6628be), X(0x0d6ff737), X(0x0d79c8f2),
+ X(0x0d839dee), X(0x0d8d762c), X(0x0d9751aa), X(0x0da13068),
+ X(0x0dab1266), X(0x0db4f7a3), X(0x0dbee01e), X(0x0dc8cbd8),
+ X(0x0dd2bace), X(0x0ddcad02), X(0x0de6a272), X(0x0df09b1e),
+ X(0x0dfa9705), X(0x0e049627), X(0x0e0e9883), X(0x0e189e19),
+ X(0x0e22a6e8), X(0x0e2cb2f0), X(0x0e36c230), X(0x0e40d4a8),
+ X(0x0e4aea56), X(0x0e55033b), X(0x0e5f1f56), X(0x0e693ea7),
+ X(0x0e73612c), X(0x0e7d86e5), X(0x0e87afd3), X(0x0e91dbf3),
+ X(0x0e9c0b47), X(0x0ea63dcc), X(0x0eb07383), X(0x0ebaac6b),
+ X(0x0ec4e883), X(0x0ecf27cc), X(0x0ed96a44), X(0x0ee3afea),
+ X(0x0eedf8bf), X(0x0ef844c2), X(0x0f0293f2), X(0x0f0ce64e),
+ X(0x0f173bd6), X(0x0f21948a), X(0x0f2bf069), X(0x0f364f72),
+ X(0x0f40b1a5), X(0x0f4b1701), X(0x0f557f86), X(0x0f5feb32),
+ X(0x0f6a5a07), X(0x0f74cc02), X(0x0f7f4124), X(0x0f89b96b),
+ X(0x0f9434d8), X(0x0f9eb369), X(0x0fa9351e), X(0x0fb3b9f7),
+ X(0x0fbe41f3), X(0x0fc8cd11), X(0x0fd35b51), X(0x0fddecb2),
+ X(0x0fe88134), X(0x0ff318d6), X(0x0ffdb397), X(0x10085177),
+ X(0x1012f275), X(0x101d9691), X(0x10283dca), X(0x1032e81f),
+ X(0x103d9591), X(0x1048461e), X(0x1052f9c5), X(0x105db087),
+ X(0x10686a62), X(0x10732756), X(0x107de763), X(0x1088aa87),
+ X(0x109370c2), X(0x109e3a14), X(0x10a9067c), X(0x10b3d5f9),
+ X(0x10bea88b), X(0x10c97e31), X(0x10d456eb), X(0x10df32b8),
+ X(0x10ea1197), X(0x10f4f387), X(0x10ffd889), X(0x110ac09b),
+ X(0x1115abbe), X(0x112099ef), X(0x112b8b2f), X(0x11367f7d),
+ X(0x114176d9), X(0x114c7141), X(0x11576eb6), X(0x11626f36),
+ X(0x116d72c1), X(0x11787957), X(0x118382f6), X(0x118e8f9e),
+ X(0x11999f4f), X(0x11a4b208), X(0x11afc7c7), X(0x11bae08e),
+ X(0x11c5fc5a), X(0x11d11b2c), X(0x11dc3d02), X(0x11e761dd),
+ X(0x11f289ba), X(0x11fdb49b), X(0x1208e27e), X(0x12141362),
+ X(0x121f4748), X(0x122a7e2d), X(0x1235b812), X(0x1240f4f6),
+ X(0x124c34d9), X(0x125777b9), X(0x1262bd96), X(0x126e0670),
+ X(0x12795245), X(0x1284a115), X(0x128ff2e0), X(0x129b47a5),
+ X(0x12a69f63), X(0x12b1fa19), X(0x12bd57c7), X(0x12c8b86c),
+ X(0x12d41c08), X(0x12df829a), X(0x12eaec21), X(0x12f6589d),
+ X(0x1301c80c), X(0x130d3a6f), X(0x1318afc4), X(0x1324280b),
+ X(0x132fa344), X(0x133b216d), X(0x1346a286), X(0x1352268e),
+ X(0x135dad85), X(0x1369376a), X(0x1374c43c), X(0x138053fb),
+ X(0x138be6a5), X(0x13977c3b), X(0x13a314bc), X(0x13aeb026),
+ X(0x13ba4e79), X(0x13c5efb5), X(0x13d193d9), X(0x13dd3ae4),
+ X(0x13e8e4d6), X(0x13f491ad), X(0x1400416a), X(0x140bf40b),
+ X(0x1417a98f), X(0x142361f7), X(0x142f1d41), X(0x143adb6d),
+ X(0x14469c7a), X(0x14526067), X(0x145e2734), X(0x1469f0df),
+ X(0x1475bd69), X(0x14818cd0), X(0x148d5f15), X(0x14993435),
+ X(0x14a50c31), X(0x14b0e708), X(0x14bcc4b8), X(0x14c8a542),
+ X(0x14d488a5), X(0x14e06edf), X(0x14ec57f1), X(0x14f843d9),
+ X(0x15043297), X(0x1510242b), X(0x151c1892), X(0x15280fcd),
+ X(0x153409dc), X(0x154006bc), X(0x154c066e), X(0x155808f1),
+ X(0x15640e44), X(0x15701666), X(0x157c2157), X(0x15882f16),
+ X(0x15943fa2), X(0x15a052fb), X(0x15ac691f), X(0x15b8820f),
+ X(0x15c49dc8), X(0x15d0bc4c), X(0x15dcdd98), X(0x15e901ad),
+ X(0x15f52888), X(0x1601522b), X(0x160d7e93), X(0x1619adc1),
+ X(0x1625dfb3), X(0x16321469), X(0x163e4be2), X(0x164a861d),
+ X(0x1656c31a), X(0x166302d8), X(0x166f4555), X(0x167b8a92),
+ X(0x1687d28e), X(0x16941d47), X(0x16a06abe), X(0x16acbaf0),
+ X(0x16b90ddf), X(0x16c56388), X(0x16d1bbeb), X(0x16de1708),
+ X(0x16ea74dd), X(0x16f6d56a), X(0x170338ae), X(0x170f9ea8),
+ X(0x171c0758), X(0x172872bd), X(0x1734e0d6), X(0x174151a2),
+ X(0x174dc520), X(0x175a3b51), X(0x1766b432), X(0x17732fc4),
+ X(0x177fae05), X(0x178c2ef4), X(0x1798b292), X(0x17a538dd),
+ X(0x17b1c1d4), X(0x17be4d77), X(0x17cadbc5), X(0x17d76cbc),
+ X(0x17e4005e), X(0x17f096a7), X(0x17fd2f98), X(0x1809cb31),
+ X(0x1816696f), X(0x18230a53), X(0x182faddc), X(0x183c5408),
+ X(0x1848fcd8), X(0x1855a849), X(0x1862565d), X(0x186f0711),
+ X(0x187bba64), X(0x18887057), X(0x189528e9), X(0x18a1e418),
+ X(0x18aea1e3), X(0x18bb624b), X(0x18c8254e), X(0x18d4eaeb),
+ X(0x18e1b321), X(0x18ee7df1), X(0x18fb4b58), X(0x19081b57),
+ X(0x1914edec), X(0x1921c317), X(0x192e9ad6), X(0x193b7529),
+ X(0x19485210), X(0x19553189), X(0x19621393), X(0x196ef82e),
+ X(0x197bdf59), X(0x1988c913), X(0x1995b55c), X(0x19a2a432),
+ X(0x19af9595), X(0x19bc8983), X(0x19c97ffd), X(0x19d67900),
+ X(0x19e3748e), X(0x19f072a3), X(0x19fd7341), X(0x1a0a7665),
+ X(0x1a177c10), X(0x1a248440), X(0x1a318ef4), X(0x1a3e9c2c),
+ X(0x1a4babe7), X(0x1a58be24), X(0x1a65d2e2), X(0x1a72ea20),
+ X(0x1a8003de), X(0x1a8d201a), X(0x1a9a3ed5), X(0x1aa7600c),
+ X(0x1ab483bf), X(0x1ac1a9ee), X(0x1aced297), X(0x1adbfdba),
+ X(0x1ae92b56), X(0x1af65b69), X(0x1b038df4), X(0x1b10c2f5),
+ X(0x1b1dfa6b), X(0x1b2b3456), X(0x1b3870b5), X(0x1b45af87),
+ X(0x1b52f0ca), X(0x1b60347f), X(0x1b6d7aa4), X(0x1b7ac339),
+ X(0x1b880e3c), X(0x1b955bad), X(0x1ba2ab8b), X(0x1baffdd5),
+ X(0x1bbd528a), X(0x1bcaa9a9), X(0x1bd80332), X(0x1be55f24),
+ X(0x1bf2bd7d), X(0x1c001e3d), X(0x1c0d8164), X(0x1c1ae6ef),
+ X(0x1c284edf), X(0x1c35b932), X(0x1c4325e7), X(0x1c5094fe),
+ X(0x1c5e0677), X(0x1c6b7a4f), X(0x1c78f086), X(0x1c86691b),
+ X(0x1c93e40d), X(0x1ca1615c), X(0x1caee107), X(0x1cbc630c),
+ X(0x1cc9e76b), X(0x1cd76e23), X(0x1ce4f733), X(0x1cf2829a),
+ X(0x1d001057), X(0x1d0da06a), X(0x1d1b32d1), X(0x1d28c78c),
+ X(0x1d365e9a), X(0x1d43f7f9), X(0x1d5193a9), X(0x1d5f31aa),
+ X(0x1d6cd1f9), X(0x1d7a7497), X(0x1d881982), X(0x1d95c0ba),
+ X(0x1da36a3d), X(0x1db1160a), X(0x1dbec422), X(0x1dcc7482),
+ X(0x1dda272b), X(0x1de7dc1a), X(0x1df59350), X(0x1e034ccb),
+ X(0x1e11088a), X(0x1e1ec68c), X(0x1e2c86d1), X(0x1e3a4958),
+ X(0x1e480e20), X(0x1e55d527), X(0x1e639e6d), X(0x1e7169f1),
+ X(0x1e7f37b2), X(0x1e8d07b0), X(0x1e9ad9e8), X(0x1ea8ae5b),
+ X(0x1eb68507), X(0x1ec45dec), X(0x1ed23908), X(0x1ee0165b),
+ X(0x1eedf5e4), X(0x1efbd7a1), X(0x1f09bb92), X(0x1f17a1b6),
+ X(0x1f258a0d), X(0x1f337494), X(0x1f41614b), X(0x1f4f5032),
+ X(0x1f5d4147), X(0x1f6b3489), X(0x1f7929f7), X(0x1f872192),
+ X(0x1f951b56), X(0x1fa31744), X(0x1fb1155b), X(0x1fbf159a),
+ X(0x1fcd17ff), X(0x1fdb1c8b), X(0x1fe9233b), X(0x1ff72c0f),
+ X(0x20053706), X(0x20134420), X(0x2021535a), X(0x202f64b4),
+ X(0x203d782e), X(0x204b8dc6), X(0x2059a57c), X(0x2067bf4e),
+ X(0x2075db3b), X(0x2083f943), X(0x20921964), X(0x20a03b9e),
+ X(0x20ae5fef), X(0x20bc8657), X(0x20caaed5), X(0x20d8d967),
+ X(0x20e7060e), X(0x20f534c7), X(0x21036592), X(0x2111986e),
+ X(0x211fcd59), X(0x212e0454), X(0x213c3d5d), X(0x214a7873),
+ X(0x2158b594), X(0x2166f4c1), X(0x217535f8), X(0x21837938),
+ X(0x2191be81), X(0x21a005d0), X(0x21ae4f26), X(0x21bc9a81),
+ X(0x21cae7e0), X(0x21d93743), X(0x21e788a8), X(0x21f5dc0e),
+ X(0x22043174), X(0x221288da), X(0x2220e23e), X(0x222f3da0),
+ X(0x223d9afe), X(0x224bfa58), X(0x225a5bac), X(0x2268bef9),
+ X(0x2277243f), X(0x22858b7d), X(0x2293f4b0), X(0x22a25fda),
+ X(0x22b0ccf8), X(0x22bf3c09), X(0x22cdad0d), X(0x22dc2002),
+ X(0x22ea94e8), X(0x22f90bbe), X(0x23078482), X(0x2315ff33),
+ X(0x23247bd1), X(0x2332fa5b), X(0x23417acf), X(0x234ffd2c),
+ X(0x235e8173), X(0x236d07a0), X(0x237b8fb4), X(0x238a19ae),
+ X(0x2398a58c), X(0x23a7334d), X(0x23b5c2f1), X(0x23c45477),
+ X(0x23d2e7dd), X(0x23e17d22), X(0x23f01446), X(0x23fead47),
+ X(0x240d4825), X(0x241be4dd), X(0x242a8371), X(0x243923dd),
+ X(0x2447c622), X(0x24566a3e), X(0x24651031), X(0x2473b7f8),
+ X(0x24826194), X(0x24910d03), X(0x249fba44), X(0x24ae6957),
+ X(0x24bd1a39), X(0x24cbccea), X(0x24da816a), X(0x24e937b7),
+ X(0x24f7efcf), X(0x2506a9b3), X(0x25156560), X(0x252422d6),
+ X(0x2532e215), X(0x2541a31a), X(0x255065e4), X(0x255f2a74),
+ X(0x256df0c7), X(0x257cb8dd), X(0x258b82b4), X(0x259a4e4c),
+ X(0x25a91ba4), X(0x25b7eaba), X(0x25c6bb8e), X(0x25d58e1e),
+ X(0x25e46269), X(0x25f3386e), X(0x2602102d), X(0x2610e9a4),
+ X(0x261fc4d3), X(0x262ea1b7), X(0x263d8050), X(0x264c609e),
+ X(0x265b429e), X(0x266a2650), X(0x26790bb3), X(0x2687f2c6),
+ X(0x2696db88), X(0x26a5c5f7), X(0x26b4b213), X(0x26c39fda),
+ X(0x26d28f4c), X(0x26e18067), X(0x26f0732b), X(0x26ff6796),
+ X(0x270e5da7), X(0x271d555d), X(0x272c4eb7), X(0x273b49b5),
+ X(0x274a4654), X(0x27594495), X(0x27684475), X(0x277745f4),
+ X(0x27864910), X(0x27954dc9), X(0x27a4541e), X(0x27b35c0d),
+ X(0x27c26596), X(0x27d170b7), X(0x27e07d6f), X(0x27ef8bbd),
+ X(0x27fe9ba0), X(0x280dad18), X(0x281cc022), X(0x282bd4be),
+ X(0x283aeaeb), X(0x284a02a7), X(0x28591bf2), X(0x286836cb),
+ X(0x28775330), X(0x28867120), X(0x2895909b), X(0x28a4b19e),
+ X(0x28b3d42a), X(0x28c2f83d), X(0x28d21dd5), X(0x28e144f3),
+ X(0x28f06d94), X(0x28ff97b8), X(0x290ec35d), X(0x291df082),
+ X(0x292d1f27), X(0x293c4f4a), X(0x294b80eb), X(0x295ab407),
+ X(0x2969e89e), X(0x29791eaf), X(0x29885639), X(0x29978f3b),
+ X(0x29a6c9b3), X(0x29b605a0), X(0x29c54302), X(0x29d481d7),
+ X(0x29e3c21e), X(0x29f303d6), X(0x2a0246fd), X(0x2a118b94),
+ X(0x2a20d198), X(0x2a301909), X(0x2a3f61e6), X(0x2a4eac2c),
+ X(0x2a5df7dc), X(0x2a6d44f4), X(0x2a7c9374), X(0x2a8be359),
+ X(0x2a9b34a2), X(0x2aaa8750), X(0x2ab9db60), X(0x2ac930d1),
+ X(0x2ad887a3), X(0x2ae7dfd3), X(0x2af73962), X(0x2b06944e),
+ X(0x2b15f096), X(0x2b254e38), X(0x2b34ad34), X(0x2b440d89),
+ X(0x2b536f34), X(0x2b62d236), X(0x2b72368d), X(0x2b819c38),
+ X(0x2b910336), X(0x2ba06b86), X(0x2bafd526), X(0x2bbf4015),
+ X(0x2bceac53), X(0x2bde19de), X(0x2bed88b5), X(0x2bfcf8d7),
+ X(0x2c0c6a43), X(0x2c1bdcf7), X(0x2c2b50f3), X(0x2c3ac635),
+ X(0x2c4a3cbd), X(0x2c59b488), X(0x2c692d97), X(0x2c78a7e7),
+ X(0x2c882378), X(0x2c97a049), X(0x2ca71e58), X(0x2cb69da4),
+ X(0x2cc61e2c), X(0x2cd59ff0), X(0x2ce522ed), X(0x2cf4a723),
+ X(0x2d042c90), X(0x2d13b334), X(0x2d233b0d), X(0x2d32c41a),
+ X(0x2d424e5a), X(0x2d51d9cc), X(0x2d61666e), X(0x2d70f440),
+ X(0x2d808340), X(0x2d90136e), X(0x2d9fa4c7), X(0x2daf374c),
+ X(0x2dbecafa), X(0x2dce5fd1), X(0x2dddf5cf), X(0x2ded8cf4),
+ X(0x2dfd253d), X(0x2e0cbeab), X(0x2e1c593b), X(0x2e2bf4ed),
+ X(0x2e3b91c0), X(0x2e4b2fb1), X(0x2e5acec1), X(0x2e6a6eee),
+ X(0x2e7a1037), X(0x2e89b29b), X(0x2e995618), X(0x2ea8faad),
+ X(0x2eb8a05a), X(0x2ec8471c), X(0x2ed7eef4), X(0x2ee797df),
+ X(0x2ef741dc), X(0x2f06eceb), X(0x2f16990a), X(0x2f264639),
+ X(0x2f35f475), X(0x2f45a3bd), X(0x2f555412), X(0x2f650570),
+ X(0x2f74b7d8), X(0x2f846b48), X(0x2f941fbe), X(0x2fa3d53a),
+ X(0x2fb38bbb), X(0x2fc3433f), X(0x2fd2fbc5), X(0x2fe2b54c),
+ X(0x2ff26fd3), X(0x30022b58), X(0x3011e7db), X(0x3021a55a),
+ X(0x303163d4), X(0x30412348), X(0x3050e3b5), X(0x3060a519),
+ X(0x30706773), X(0x30802ac3), X(0x308fef06), X(0x309fb43d),
+ X(0x30af7a65), X(0x30bf417d), X(0x30cf0985), X(0x30ded27a),
+ X(0x30ee9c5d), X(0x30fe672b), X(0x310e32e3), X(0x311dff85),
+ X(0x312dcd0f), X(0x313d9b80), X(0x314d6ad7), X(0x315d3b12),
+ X(0x316d0c30), X(0x317cde31), X(0x318cb113), X(0x319c84d4),
+ X(0x31ac5974), X(0x31bc2ef1), X(0x31cc054b), X(0x31dbdc7f),
+ X(0x31ebb48e), X(0x31fb8d74), X(0x320b6733), X(0x321b41c7),
+ X(0x322b1d31), X(0x323af96e), X(0x324ad67e), X(0x325ab45f),
+ X(0x326a9311), X(0x327a7291), X(0x328a52e0), X(0x329a33fb),
+ X(0x32aa15e1), X(0x32b9f892), X(0x32c9dc0c), X(0x32d9c04d),
+ X(0x32e9a555), X(0x32f98b22), X(0x330971b4), X(0x33195909),
+ X(0x3329411f), X(0x333929f6), X(0x3349138c), X(0x3358fde1),
+ X(0x3368e8f2), X(0x3378d4c0), X(0x3388c147), X(0x3398ae89),
+ X(0x33a89c82), X(0x33b88b32), X(0x33c87a98), X(0x33d86ab2),
+ X(0x33e85b80), X(0x33f84d00), X(0x34083f30), X(0x34183210),
+ X(0x3428259f), X(0x343819db), X(0x34480ec3), X(0x34580455),
+ X(0x3467fa92), X(0x3477f176), X(0x3487e902), X(0x3497e134),
+ X(0x34a7da0a), X(0x34b7d384), X(0x34c7cda0), X(0x34d7c85e),
+ X(0x34e7c3bb), X(0x34f7bfb7), X(0x3507bc50), X(0x3517b985),
+ X(0x3527b756), X(0x3537b5c0), X(0x3547b4c3), X(0x3557b45d),
+ X(0x3567b48d), X(0x3577b552), X(0x3587b6aa), X(0x3597b895),
+ X(0x35a7bb12), X(0x35b7be1e), X(0x35c7c1b9), X(0x35d7c5e1),
+ X(0x35e7ca96), X(0x35f7cfd6), X(0x3607d5a0), X(0x3617dbf3),
+ X(0x3627e2cd), X(0x3637ea2d), X(0x3647f212), X(0x3657fa7b),
+ X(0x36680366), X(0x36780cd2), X(0x368816bf), X(0x3698212b),
+ X(0x36a82c14), X(0x36b83779), X(0x36c8435a), X(0x36d84fb4),
+ X(0x36e85c88), X(0x36f869d2), X(0x37087793), X(0x371885c9),
+ X(0x37289473), X(0x3738a38f), X(0x3748b31d), X(0x3758c31a),
+ X(0x3768d387), X(0x3778e461), X(0x3788f5a7), X(0x37990759),
+ X(0x37a91975), X(0x37b92bf9), X(0x37c93ee4), X(0x37d95236),
+ X(0x37e965ed), X(0x37f97a08), X(0x38098e85), X(0x3819a363),
+ X(0x3829b8a2), X(0x3839ce3f), X(0x3849e43a), X(0x3859fa91),
+ X(0x386a1143), X(0x387a284f), X(0x388a3fb4), X(0x389a5770),
+ X(0x38aa6f83), X(0x38ba87ea), X(0x38caa0a5), X(0x38dab9b2),
+ X(0x38ead311), X(0x38faecbf), X(0x390b06bc), X(0x391b2107),
+ X(0x392b3b9e), X(0x393b5680), X(0x394b71ac), X(0x395b8d20),
+ X(0x396ba8dc), X(0x397bc4dd), X(0x398be124), X(0x399bfdae),
+ X(0x39ac1a7a), X(0x39bc3788), X(0x39cc54d5), X(0x39dc7261),
+ X(0x39ec902a), X(0x39fcae2f), X(0x3a0ccc70), X(0x3a1ceaea),
+ X(0x3a2d099c), X(0x3a3d2885), X(0x3a4d47a5), X(0x3a5d66f9),
+ X(0x3a6d8680), X(0x3a7da63a), X(0x3a8dc625), X(0x3a9de63f),
+ X(0x3aae0688), X(0x3abe26fe), X(0x3ace47a0), X(0x3ade686d),
+ X(0x3aee8963), X(0x3afeaa82), X(0x3b0ecbc7), X(0x3b1eed32),
+ X(0x3b2f0ec2), X(0x3b3f3075), X(0x3b4f524a), X(0x3b5f7440),
+ X(0x3b6f9656), X(0x3b7fb889), X(0x3b8fdada), X(0x3b9ffd46),
+ X(0x3bb01fce), X(0x3bc0426e), X(0x3bd06526), X(0x3be087f6),
+ X(0x3bf0aada), X(0x3c00cdd4), X(0x3c10f0e0), X(0x3c2113fe),
+ X(0x3c31372d), X(0x3c415a6b), X(0x3c517db7), X(0x3c61a110),
+ X(0x3c71c475), X(0x3c81e7e4), X(0x3c920b5c), X(0x3ca22edc),
+ X(0x3cb25262), X(0x3cc275ee), X(0x3cd2997e), X(0x3ce2bd11),
+ X(0x3cf2e0a6), X(0x3d03043b), X(0x3d1327cf), X(0x3d234b61),
+ X(0x3d336ef0), X(0x3d43927a), X(0x3d53b5ff), X(0x3d63d97c),
+ X(0x3d73fcf1), X(0x3d84205c), X(0x3d9443bd), X(0x3da46711),
+ X(0x3db48a58), X(0x3dc4ad91), X(0x3dd4d0ba), X(0x3de4f3d1),
+ X(0x3df516d7), X(0x3e0539c9), X(0x3e155ca6), X(0x3e257f6d),
+ X(0x3e35a21d), X(0x3e45c4b4), X(0x3e55e731), X(0x3e660994),
+ X(0x3e762bda), X(0x3e864e03), X(0x3e96700d), X(0x3ea691f7),
+ X(0x3eb6b3bf), X(0x3ec6d565), X(0x3ed6f6e8), X(0x3ee71845),
+ X(0x3ef7397c), X(0x3f075a8c), X(0x3f177b73), X(0x3f279c30),
+ X(0x3f37bcc2), X(0x3f47dd27), X(0x3f57fd5f), X(0x3f681d68),
+ X(0x3f783d40), X(0x3f885ce7), X(0x3f987c5c), X(0x3fa89b9c),
+ X(0x3fb8baa7), X(0x3fc8d97c), X(0x3fd8f819), X(0x3fe9167e),
+ X(0x3ff934a8), X(0x40095296), X(0x40197049), X(0x40298dbd),
+ X(0x4039aaf2), X(0x4049c7e7), X(0x4059e49a), X(0x406a010a),
+ X(0x407a1d36), X(0x408a391d), X(0x409a54bd), X(0x40aa7015),
+ X(0x40ba8b25), X(0x40caa5ea), X(0x40dac063), X(0x40eada90),
+ X(0x40faf46e), X(0x410b0dfe), X(0x411b273d), X(0x412b402a),
+ X(0x413b58c4), X(0x414b710a), X(0x415b88fa), X(0x416ba093),
+ X(0x417bb7d5), X(0x418bcebe), X(0x419be54c), X(0x41abfb7e),
+ X(0x41bc1153), X(0x41cc26ca), X(0x41dc3be2), X(0x41ec5099),
+ X(0x41fc64ef), X(0x420c78e1), X(0x421c8c6f), X(0x422c9f97),
+ X(0x423cb258), X(0x424cc4b2), X(0x425cd6a2), X(0x426ce827),
+ X(0x427cf941), X(0x428d09ee), X(0x429d1a2c), X(0x42ad29fb),
+ X(0x42bd3959), X(0x42cd4846), X(0x42dd56bf), X(0x42ed64c3),
+ X(0x42fd7252), X(0x430d7f6a), X(0x431d8c0a), X(0x432d9831),
+ X(0x433da3dd), X(0x434daf0d), X(0x435db9c0), X(0x436dc3f5),
+ X(0x437dcdab), X(0x438dd6df), X(0x439ddf92), X(0x43ade7c1),
+ X(0x43bdef6c), X(0x43cdf691), X(0x43ddfd2f), X(0x43ee0345),
+ X(0x43fe08d2), X(0x440e0dd4), X(0x441e124b), X(0x442e1634),
+ X(0x443e198f), X(0x444e1c5a), X(0x445e1e95), X(0x446e203e),
+ X(0x447e2153), X(0x448e21d5), X(0x449e21c0), X(0x44ae2115),
+ X(0x44be1fd1), X(0x44ce1df4), X(0x44de1b7d), X(0x44ee186a),
+ X(0x44fe14ba), X(0x450e106b), X(0x451e0b7e), X(0x452e05ef),
+ X(0x453dffbf), X(0x454df8eb), X(0x455df173), X(0x456de956),
+ X(0x457de092), X(0x458dd726), X(0x459dcd10), X(0x45adc251),
+ X(0x45bdb6e5), X(0x45cdaacd), X(0x45dd9e06), X(0x45ed9091),
+ X(0x45fd826a), X(0x460d7392), X(0x461d6407), X(0x462d53c8),
+ X(0x463d42d4), X(0x464d3129), X(0x465d1ec6), X(0x466d0baa),
+ X(0x467cf7d3), X(0x468ce342), X(0x469ccdf3), X(0x46acb7e7),
+ X(0x46bca11c), X(0x46cc8990), X(0x46dc7143), X(0x46ec5833),
+ X(0x46fc3e5f), X(0x470c23c6), X(0x471c0867), X(0x472bec40),
+ X(0x473bcf50), X(0x474bb196), X(0x475b9311), X(0x476b73c0),
+ X(0x477b53a1), X(0x478b32b4), X(0x479b10f6), X(0x47aaee67),
+ X(0x47bacb06), X(0x47caa6d1), X(0x47da81c7), X(0x47ea5be7),
+ X(0x47fa3530), X(0x480a0da1), X(0x4819e537), X(0x4829bbf3),
+ X(0x483991d3), X(0x484966d6), X(0x48593afb), X(0x48690e3f),
+ X(0x4878e0a3), X(0x4888b225), X(0x489882c4), X(0x48a8527e),
+ X(0x48b82153), X(0x48c7ef41), X(0x48d7bc47), X(0x48e78863),
+ X(0x48f75396), X(0x49071ddc), X(0x4916e736), X(0x4926afa2),
+ X(0x4936771f), X(0x49463dac), X(0x49560347), X(0x4965c7ef),
+ X(0x49758ba4), X(0x49854e63), X(0x4995102c), X(0x49a4d0fe),
+ X(0x49b490d7), X(0x49c44fb6), X(0x49d40d9a), X(0x49e3ca82),
+ X(0x49f3866c), X(0x4a034159), X(0x4a12fb45), X(0x4a22b430),
+ X(0x4a326c19), X(0x4a4222ff), X(0x4a51d8e1), X(0x4a618dbd),
+ X(0x4a714192), X(0x4a80f45f), X(0x4a90a623), X(0x4aa056dd),
+ X(0x4ab0068b), X(0x4abfb52c), X(0x4acf62c0), X(0x4adf0f44),
+ X(0x4aeebab9), X(0x4afe651c), X(0x4b0e0e6c), X(0x4b1db6a9),
+ X(0x4b2d5dd1), X(0x4b3d03e2), X(0x4b4ca8dd), X(0x4b5c4cbf),
+ X(0x4b6bef88), X(0x4b7b9136), X(0x4b8b31c8), X(0x4b9ad13d),
+ X(0x4baa6f93), X(0x4bba0ccb), X(0x4bc9a8e2), X(0x4bd943d7),
+ X(0x4be8dda9), X(0x4bf87658), X(0x4c080de1), X(0x4c17a444),
+ X(0x4c27397f), X(0x4c36cd92), X(0x4c46607b), X(0x4c55f239),
+ X(0x4c6582cb), X(0x4c75122f), X(0x4c84a065), X(0x4c942d6c),
+ X(0x4ca3b942), X(0x4cb343e6), X(0x4cc2cd57), X(0x4cd25594),
+ X(0x4ce1dc9c), X(0x4cf1626d), X(0x4d00e707), X(0x4d106a68),
+ X(0x4d1fec8f), X(0x4d2f6d7a), X(0x4d3eed2a), X(0x4d4e6b9d),
+ X(0x4d5de8d1), X(0x4d6d64c5), X(0x4d7cdf79), X(0x4d8c58eb),
+ X(0x4d9bd11a), X(0x4dab4804), X(0x4dbabdaa), X(0x4dca3209),
+ X(0x4dd9a520), X(0x4de916ef), X(0x4df88774), X(0x4e07f6ae),
+ X(0x4e17649c), X(0x4e26d13c), X(0x4e363c8f), X(0x4e45a692),
+ X(0x4e550f44), X(0x4e6476a4), X(0x4e73dcb2), X(0x4e83416c),
+ X(0x4e92a4d1), X(0x4ea206df), X(0x4eb16796), X(0x4ec0c6f5),
+ X(0x4ed024fa), X(0x4edf81a5), X(0x4eeedcf3), X(0x4efe36e5),
+ X(0x4f0d8f79), X(0x4f1ce6ad), X(0x4f2c3c82), X(0x4f3b90f4),
+ X(0x4f4ae405), X(0x4f5a35b1), X(0x4f6985fa), X(0x4f78d4dc),
+ X(0x4f882257), X(0x4f976e6a), X(0x4fa6b914), X(0x4fb60254),
+ X(0x4fc54a28), X(0x4fd49090), X(0x4fe3d58b), X(0x4ff31917),
+ X(0x50025b33), X(0x50119bde), X(0x5020db17), X(0x503018dd),
+ X(0x503f552f), X(0x504e900b), X(0x505dc971), X(0x506d0160),
+ X(0x507c37d7), X(0x508b6cd3), X(0x509aa055), X(0x50a9d25b),
+ X(0x50b902e4), X(0x50c831ef), X(0x50d75f7b), X(0x50e68b87),
+ X(0x50f5b612), X(0x5104df1a), X(0x5114069f), X(0x51232ca0),
+ X(0x5132511a), X(0x5141740f), X(0x5150957b), X(0x515fb55f),
+ X(0x516ed3b8), X(0x517df087), X(0x518d0bca), X(0x519c257f),
+ X(0x51ab3da7), X(0x51ba543f), X(0x51c96947), X(0x51d87cbd),
+ X(0x51e78ea1), X(0x51f69ef1), X(0x5205adad), X(0x5214bad3),
+ X(0x5223c662), X(0x5232d05a), X(0x5241d8b9), X(0x5250df7d),
+ X(0x525fe4a7), X(0x526ee835), X(0x527dea26), X(0x528cea78),
+ X(0x529be92c), X(0x52aae63f), X(0x52b9e1b0), X(0x52c8db80),
+ X(0x52d7d3ac), X(0x52e6ca33), X(0x52f5bf15), X(0x5304b251),
+ X(0x5313a3e5), X(0x532293d0), X(0x53318212), X(0x53406ea8),
+ X(0x534f5993), X(0x535e42d2), X(0x536d2a62), X(0x537c1043),
+ X(0x538af475), X(0x5399d6f6), X(0x53a8b7c4), X(0x53b796e0),
+ X(0x53c67447), X(0x53d54ffa), X(0x53e429f6), X(0x53f3023b),
+ X(0x5401d8c8), X(0x5410ad9c), X(0x541f80b5), X(0x542e5213),
+ X(0x543d21b5), X(0x544bef9a), X(0x545abbc0), X(0x54698627),
+ X(0x54784ece), X(0x548715b3), X(0x5495dad6), X(0x54a49e35),
+ X(0x54b35fd0), X(0x54c21fa6), X(0x54d0ddb5), X(0x54df99fd),
+ X(0x54ee547c), X(0x54fd0d32), X(0x550bc41d), X(0x551a793d),
+ X(0x55292c91), X(0x5537de16), X(0x55468dce), X(0x55553bb6),
+ X(0x5563e7cd), X(0x55729213), X(0x55813a87), X(0x558fe127),
+ X(0x559e85f2), X(0x55ad28e9), X(0x55bbca08), X(0x55ca6950),
+ X(0x55d906c0), X(0x55e7a257), X(0x55f63c13), X(0x5604d3f4),
+ X(0x561369f8), X(0x5621fe1f), X(0x56309067), X(0x563f20d1),
+ X(0x564daf5a), X(0x565c3c02), X(0x566ac6c7), X(0x56794faa),
+ X(0x5687d6a8), X(0x56965bc1), X(0x56a4def4), X(0x56b36040),
+ X(0x56c1dfa4), X(0x56d05d1f), X(0x56ded8af), X(0x56ed5255),
+ X(0x56fbca0f), X(0x570a3fdc), X(0x5718b3bc), X(0x572725ac),
+ X(0x573595ad), X(0x574403bd), X(0x57526fdb), X(0x5760da07),
+ X(0x576f423f), X(0x577da883), X(0x578c0cd1), X(0x579a6f29),
+ X(0x57a8cf8a), X(0x57b72df2), X(0x57c58a61), X(0x57d3e4d6),
+ X(0x57e23d50), X(0x57f093cd), X(0x57fee84e), X(0x580d3ad1),
+ X(0x581b8b54), X(0x5829d9d8), X(0x5838265c), X(0x584670dd),
+ X(0x5854b95c), X(0x5862ffd8), X(0x5871444f), X(0x587f86c1),
+ X(0x588dc72c), X(0x589c0591), X(0x58aa41ed), X(0x58b87c40),
+ X(0x58c6b489), X(0x58d4eac7), X(0x58e31ef9), X(0x58f1511f),
+ X(0x58ff8137), X(0x590daf40), X(0x591bdb3a), X(0x592a0524),
+ X(0x59382cfc), X(0x594652c2), X(0x59547675), X(0x59629815),
+ X(0x5970b79f), X(0x597ed513), X(0x598cf071), X(0x599b09b7),
+ X(0x59a920e5), X(0x59b735f9), X(0x59c548f4), X(0x59d359d2),
+ X(0x59e16895), X(0x59ef753b), X(0x59fd7fc4), X(0x5a0b882d),
+ X(0x5a198e77), X(0x5a2792a0), X(0x5a3594a9), X(0x5a43948e),
+ X(0x5a519251), X(0x5a5f8df0), X(0x5a6d876a), X(0x5a7b7ebe),
+ X(0x5a8973ec), X(0x5a9766f2), X(0x5aa557d0), X(0x5ab34685),
+ X(0x5ac1330f), X(0x5acf1d6f), X(0x5add05a3), X(0x5aeaebaa),
+ X(0x5af8cf84), X(0x5b06b12f), X(0x5b1490ab), X(0x5b226df7),
+ X(0x5b304912), X(0x5b3e21fc), X(0x5b4bf8b2), X(0x5b59cd35),
+ X(0x5b679f84), X(0x5b756f9e), X(0x5b833d82), X(0x5b91092e),
+ X(0x5b9ed2a3), X(0x5bac99e0), X(0x5bba5ee3), X(0x5bc821ac),
+ X(0x5bd5e23a), X(0x5be3a08c), X(0x5bf15ca1), X(0x5bff1679),
+ X(0x5c0cce12), X(0x5c1a836c), X(0x5c283686), X(0x5c35e760),
+ X(0x5c4395f7), X(0x5c51424c), X(0x5c5eec5e), X(0x5c6c942b),
+ X(0x5c7a39b4), X(0x5c87dcf7), X(0x5c957df3), X(0x5ca31ca8),
+ X(0x5cb0b915), X(0x5cbe5338), X(0x5ccbeb12), X(0x5cd980a1),
+ X(0x5ce713e5), X(0x5cf4a4dd), X(0x5d023387), X(0x5d0fbfe4),
+ X(0x5d1d49f2), X(0x5d2ad1b1), X(0x5d38571f), X(0x5d45da3c),
+ X(0x5d535b08), X(0x5d60d981), X(0x5d6e55a7), X(0x5d7bcf78),
+ X(0x5d8946f5), X(0x5d96bc1c), X(0x5da42eec), X(0x5db19f65),
+ X(0x5dbf0d86), X(0x5dcc794e), X(0x5dd9e2bd), X(0x5de749d1),
+ X(0x5df4ae8a), X(0x5e0210e7), X(0x5e0f70e7), X(0x5e1cce8a),
+ X(0x5e2a29ce), X(0x5e3782b4), X(0x5e44d93a), X(0x5e522d5f),
+ X(0x5e5f7f23), X(0x5e6cce85), X(0x5e7a1b85), X(0x5e876620),
+ X(0x5e94ae58), X(0x5ea1f42a), X(0x5eaf3797), X(0x5ebc789d),
+ X(0x5ec9b73c), X(0x5ed6f372), X(0x5ee42d41), X(0x5ef164a5),
+ X(0x5efe999f), X(0x5f0bcc2f), X(0x5f18fc52), X(0x5f262a09),
+ X(0x5f335553), X(0x5f407e2f), X(0x5f4da49d), X(0x5f5ac89b),
+ X(0x5f67ea29), X(0x5f750946), X(0x5f8225f2), X(0x5f8f402b),
+ X(0x5f9c57f2), X(0x5fa96d44), X(0x5fb68023), X(0x5fc3908c),
+ X(0x5fd09e7f), X(0x5fdda9fc), X(0x5feab302), X(0x5ff7b990),
+ X(0x6004bda5), X(0x6011bf40), X(0x601ebe62), X(0x602bbb09),
+ X(0x6038b534), X(0x6045ace4), X(0x6052a216), X(0x605f94cb),
+ X(0x606c8502), X(0x607972b9), X(0x60865df2), X(0x609346aa),
+ X(0x60a02ce1), X(0x60ad1096), X(0x60b9f1c9), X(0x60c6d079),
+ X(0x60d3aca5), X(0x60e0864d), X(0x60ed5d70), X(0x60fa320d),
+ X(0x61070424), X(0x6113d3b4), X(0x6120a0bc), X(0x612d6b3c),
+ X(0x613a3332), X(0x6146f89f), X(0x6153bb82), X(0x61607bd9),
+ X(0x616d39a5), X(0x6179f4e5), X(0x6186ad98), X(0x619363bd),
+ X(0x61a01753), X(0x61acc85b), X(0x61b976d3), X(0x61c622bc),
+ X(0x61d2cc13), X(0x61df72d8), X(0x61ec170c), X(0x61f8b8ad),
+ X(0x620557ba), X(0x6211f434), X(0x621e8e18), X(0x622b2568),
+ X(0x6237ba21), X(0x62444c44), X(0x6250dbd0), X(0x625d68c4),
+ X(0x6269f320), X(0x62767ae2), X(0x6283000b), X(0x628f829a),
+ X(0x629c028e), X(0x62a87fe6), X(0x62b4faa2), X(0x62c172c2),
+ X(0x62cde844), X(0x62da5b29), X(0x62e6cb6e), X(0x62f33915),
+ X(0x62ffa41c), X(0x630c0c83), X(0x63187248), X(0x6324d56d),
+ X(0x633135ef), X(0x633d93ce), X(0x6349ef0b), X(0x635647a3),
+ X(0x63629d97), X(0x636ef0e6), X(0x637b418f), X(0x63878f92),
+ X(0x6393daef), X(0x63a023a4), X(0x63ac69b1), X(0x63b8ad15),
+ X(0x63c4edd1), X(0x63d12be3), X(0x63dd674b), X(0x63e9a008),
+ X(0x63f5d61a), X(0x64020980), X(0x640e3a39), X(0x641a6846),
+ X(0x642693a5), X(0x6432bc56), X(0x643ee258), X(0x644b05ab),
+ X(0x6457264e), X(0x64634441), X(0x646f5f83), X(0x647b7814),
+ X(0x64878df3), X(0x6493a120), X(0x649fb199), X(0x64abbf5f),
+ X(0x64b7ca71), X(0x64c3d2ce), X(0x64cfd877), X(0x64dbdb69),
+ X(0x64e7dba6), X(0x64f3d92b), X(0x64ffd3fa), X(0x650bcc11),
+ X(0x6517c16f), X(0x6523b415), X(0x652fa402), X(0x653b9134),
+ X(0x65477bad), X(0x6553636a), X(0x655f486d), X(0x656b2ab3),
+ X(0x65770a3d), X(0x6582e70a), X(0x658ec11a), X(0x659a986d),
+ X(0x65a66d00), X(0x65b23ed5), X(0x65be0deb), X(0x65c9da41),
+ X(0x65d5a3d7), X(0x65e16aac), X(0x65ed2ebf), X(0x65f8f011),
+ X(0x6604aea1), X(0x66106a6e), X(0x661c2377), X(0x6627d9be),
+ X(0x66338d40), X(0x663f3dfd), X(0x664aebf5), X(0x66569728),
+ X(0x66623f95), X(0x666de53b), X(0x6679881b), X(0x66852833),
+ X(0x6690c583), X(0x669c600b), X(0x66a7f7ca), X(0x66b38cc0),
+ X(0x66bf1eec), X(0x66caae4f), X(0x66d63ae6), X(0x66e1c4b3),
+ X(0x66ed4bb4), X(0x66f8cfea), X(0x67045153), X(0x670fcfef),
+ X(0x671b4bbe), X(0x6726c4bf), X(0x67323af3), X(0x673dae58),
+ X(0x67491eee), X(0x67548cb5), X(0x675ff7ab), X(0x676b5fd2),
+ X(0x6776c528), X(0x678227ad), X(0x678d8761), X(0x6798e443),
+ X(0x67a43e52), X(0x67af958f), X(0x67bae9f9), X(0x67c63b8f),
+ X(0x67d18a52), X(0x67dcd640), X(0x67e81f59), X(0x67f3659d),
+ X(0x67fea90c), X(0x6809e9a5), X(0x68152768), X(0x68206254),
+ X(0x682b9a68), X(0x6836cfa6), X(0x6842020b), X(0x684d3199),
+ X(0x68585e4d), X(0x68638829), X(0x686eaf2b), X(0x6879d354),
+ X(0x6884f4a2), X(0x68901316), X(0x689b2eb0), X(0x68a6476d),
+ X(0x68b15d50), X(0x68bc7056), X(0x68c78080), X(0x68d28dcd),
+ X(0x68dd983e), X(0x68e89fd0), X(0x68f3a486), X(0x68fea65d),
+ X(0x6909a555), X(0x6914a16f), X(0x691f9aa9), X(0x692a9104),
+ X(0x69358480), X(0x6940751b), X(0x694b62d5), X(0x69564daf),
+ X(0x696135a7), X(0x696c1abe), X(0x6976fcf3), X(0x6981dc46),
+ X(0x698cb8b6), X(0x69979243), X(0x69a268ed), X(0x69ad3cb4),
+ X(0x69b80d97), X(0x69c2db96), X(0x69cda6b0), X(0x69d86ee5),
+ X(0x69e33436), X(0x69edf6a1), X(0x69f8b626), X(0x6a0372c5),
+ X(0x6a0e2c7e), X(0x6a18e350), X(0x6a23973c), X(0x6a2e4840),
+ X(0x6a38f65d), X(0x6a43a191), X(0x6a4e49de), X(0x6a58ef42),
+ X(0x6a6391be), X(0x6a6e3151), X(0x6a78cdfa), X(0x6a8367ba),
+ X(0x6a8dfe90), X(0x6a98927c), X(0x6aa3237d), X(0x6aadb194),
+ X(0x6ab83cc0), X(0x6ac2c500), X(0x6acd4a55), X(0x6ad7ccbf),
+ X(0x6ae24c3c), X(0x6aecc8cd), X(0x6af74271), X(0x6b01b929),
+ X(0x6b0c2cf4), X(0x6b169dd1), X(0x6b210bc1), X(0x6b2b76c2),
+ X(0x6b35ded6), X(0x6b4043fc), X(0x6b4aa632), X(0x6b55057a),
+ X(0x6b5f61d3), X(0x6b69bb3d), X(0x6b7411b7), X(0x6b7e6541),
+ X(0x6b88b5db), X(0x6b930385), X(0x6b9d4e3f), X(0x6ba79607),
+ X(0x6bb1dadf), X(0x6bbc1cc6), X(0x6bc65bbb), X(0x6bd097bf),
+ X(0x6bdad0d0), X(0x6be506f0), X(0x6bef3a1d), X(0x6bf96a58),
+ X(0x6c0397a0), X(0x6c0dc1f5), X(0x6c17e957), X(0x6c220dc6),
+ X(0x6c2c2f41), X(0x6c364dc9), X(0x6c40695c), X(0x6c4a81fc),
+ X(0x6c5497a7), X(0x6c5eaa5d), X(0x6c68ba1f), X(0x6c72c6eb),
+ X(0x6c7cd0c3), X(0x6c86d7a6), X(0x6c90db92), X(0x6c9adc8a),
+ X(0x6ca4da8b), X(0x6caed596), X(0x6cb8cdab), X(0x6cc2c2ca),
+ X(0x6cccb4f2), X(0x6cd6a424), X(0x6ce0905e), X(0x6cea79a1),
+ X(0x6cf45fee), X(0x6cfe4342), X(0x6d0823a0), X(0x6d120105),
+ X(0x6d1bdb73), X(0x6d25b2e8), X(0x6d2f8765), X(0x6d3958ea),
+ X(0x6d432777), X(0x6d4cf30a), X(0x6d56bba5), X(0x6d608147),
+ X(0x6d6a43f0), X(0x6d7403a0), X(0x6d7dc056), X(0x6d877a13),
+ X(0x6d9130d6), X(0x6d9ae4a0), X(0x6da4956f), X(0x6dae4345),
+ X(0x6db7ee20), X(0x6dc19601), X(0x6dcb3ae7), X(0x6dd4dcd3),
+ X(0x6dde7bc4), X(0x6de817bb), X(0x6df1b0b6), X(0x6dfb46b7),
+ X(0x6e04d9bc), X(0x6e0e69c7), X(0x6e17f6d5), X(0x6e2180e9),
+ X(0x6e2b0801), X(0x6e348c1d), X(0x6e3e0d3d), X(0x6e478b62),
+ X(0x6e51068a), X(0x6e5a7eb7), X(0x6e63f3e7), X(0x6e6d661b),
+ X(0x6e76d552), X(0x6e80418e), X(0x6e89aacc), X(0x6e93110f),
+ X(0x6e9c7454), X(0x6ea5d49d), X(0x6eaf31e9), X(0x6eb88c37),
+ X(0x6ec1e389), X(0x6ecb37de), X(0x6ed48936), X(0x6eddd790),
+ X(0x6ee722ee), X(0x6ef06b4d), X(0x6ef9b0b0), X(0x6f02f315),
+ X(0x6f0c327c), X(0x6f156ee6), X(0x6f1ea852), X(0x6f27dec1),
+ X(0x6f311232), X(0x6f3a42a5), X(0x6f43701a), X(0x6f4c9a91),
+ X(0x6f55c20a), X(0x6f5ee686), X(0x6f680803), X(0x6f712682),
+ X(0x6f7a4203), X(0x6f835a86), X(0x6f8c700b), X(0x6f958291),
+ X(0x6f9e921a), X(0x6fa79ea4), X(0x6fb0a830), X(0x6fb9aebd),
+ X(0x6fc2b24c), X(0x6fcbb2dd), X(0x6fd4b06f), X(0x6fddab03),
+ X(0x6fe6a299), X(0x6fef9730), X(0x6ff888c9), X(0x70017763),
+ X(0x700a62ff), X(0x70134b9c), X(0x701c313b), X(0x702513dc),
+ X(0x702df37e), X(0x7036d021), X(0x703fa9c6), X(0x7048806d),
+ X(0x70515415), X(0x705a24bf), X(0x7062f26b), X(0x706bbd17),
+ X(0x707484c6), X(0x707d4976), X(0x70860b28), X(0x708ec9dc),
+ X(0x70978591), X(0x70a03e48), X(0x70a8f400), X(0x70b1a6bb),
+ X(0x70ba5677), X(0x70c30335), X(0x70cbacf5), X(0x70d453b6),
+ X(0x70dcf77a), X(0x70e59840), X(0x70ee3607), X(0x70f6d0d1),
+ X(0x70ff689d), X(0x7107fd6b), X(0x71108f3b), X(0x71191e0d),
+ X(0x7121a9e2), X(0x712a32b9), X(0x7132b892), X(0x713b3b6e),
+ X(0x7143bb4c), X(0x714c382d), X(0x7154b211), X(0x715d28f7),
+ X(0x71659ce0), X(0x716e0dcc), X(0x71767bbb), X(0x717ee6ac),
+ X(0x71874ea1), X(0x718fb399), X(0x71981594), X(0x71a07493),
+ X(0x71a8d094), X(0x71b1299a), X(0x71b97fa2), X(0x71c1d2af),
+ X(0x71ca22bf), X(0x71d26fd2), X(0x71dab9ea), X(0x71e30106),
+ X(0x71eb4526), X(0x71f3864a), X(0x71fbc472), X(0x7203ff9e),
+ X(0x720c37cf), X(0x72146d05), X(0x721c9f3f), X(0x7224ce7e),
+ X(0x722cfac2), X(0x7235240b), X(0x723d4a59), X(0x72456dad),
+ X(0x724d8e05), X(0x7255ab63), X(0x725dc5c7), X(0x7265dd31),
+ X(0x726df1a0), X(0x72760315), X(0x727e1191), X(0x72861d12),
+ X(0x728e259a), X(0x72962b28), X(0x729e2dbd), X(0x72a62d59),
+ X(0x72ae29fc), X(0x72b623a5), X(0x72be1a56), X(0x72c60e0e),
+ X(0x72cdfece), X(0x72d5ec95), X(0x72ddd764), X(0x72e5bf3b),
+ X(0x72eda41a), X(0x72f58601), X(0x72fd64f1), X(0x730540e9),
+ X(0x730d19e9), X(0x7314eff3), X(0x731cc305), X(0x73249321),
+ X(0x732c6046), X(0x73342a75), X(0x733bf1ad), X(0x7343b5ef),
+ X(0x734b773b), X(0x73533591), X(0x735af0f2), X(0x7362a95d),
+ X(0x736a5ed3), X(0x73721153), X(0x7379c0df), X(0x73816d76),
+ X(0x73891719), X(0x7390bdc7), X(0x73986181), X(0x73a00247),
+ X(0x73a7a01a), X(0x73af3af8), X(0x73b6d2e4), X(0x73be67dc),
+ X(0x73c5f9e1), X(0x73cd88f3), X(0x73d51513), X(0x73dc9e40),
+ X(0x73e4247c), X(0x73eba7c5), X(0x73f3281c), X(0x73faa582),
+ X(0x74021ff7), X(0x7409977b), X(0x74110c0d), X(0x74187daf),
+ X(0x741fec61), X(0x74275822), X(0x742ec0f3), X(0x743626d5),
+ X(0x743d89c7), X(0x7444e9c9), X(0x744c46dd), X(0x7453a101),
+ X(0x745af837), X(0x74624c7f), X(0x74699dd8), X(0x7470ec44),
+ X(0x747837c2), X(0x747f8052), X(0x7486c5f5), X(0x748e08ac),
+ X(0x74954875), X(0x749c8552), X(0x74a3bf43), X(0x74aaf648),
+ X(0x74b22a62), X(0x74b95b90), X(0x74c089d2), X(0x74c7b52a),
+ X(0x74cedd97), X(0x74d6031a), X(0x74dd25b2), X(0x74e44561),
+ X(0x74eb6226), X(0x74f27c02), X(0x74f992f5), X(0x7500a6ff),
+ X(0x7507b820), X(0x750ec659), X(0x7515d1aa), X(0x751cda14),
+ X(0x7523df96), X(0x752ae231), X(0x7531e1e5), X(0x7538deb2),
+ X(0x753fd89a), X(0x7546cf9b), X(0x754dc3b7), X(0x7554b4ed),
+ X(0x755ba33e), X(0x75628eaa), X(0x75697732), X(0x75705cd5),
+ X(0x75773f95), X(0x757e1f71), X(0x7584fc6a), X(0x758bd67f),
+ X(0x7592adb2), X(0x75998203), X(0x75a05371), X(0x75a721fe),
+ X(0x75adeda9), X(0x75b4b673), X(0x75bb7c5c), X(0x75c23f65),
+ X(0x75c8ff8d), X(0x75cfbcd6), X(0x75d6773f), X(0x75dd2ec8),
+ X(0x75e3e373), X(0x75ea953f), X(0x75f1442d), X(0x75f7f03d),
+ X(0x75fe996f), X(0x76053fc5), X(0x760be33d), X(0x761283d8),
+ X(0x76192197), X(0x761fbc7b), X(0x76265482), X(0x762ce9af),
+ X(0x76337c01), X(0x763a0b78), X(0x76409814), X(0x764721d7),
+ X(0x764da8c1), X(0x76542cd1), X(0x765aae08), X(0x76612c67),
+ X(0x7667a7ee), X(0x766e209d), X(0x76749675), X(0x767b0975),
+ X(0x7681799f), X(0x7687e6f3), X(0x768e5170), X(0x7694b918),
+ X(0x769b1deb), X(0x76a17fe9), X(0x76a7df13), X(0x76ae3b68),
+ X(0x76b494ea), X(0x76baeb98), X(0x76c13f74), X(0x76c7907c),
+ X(0x76cddeb3), X(0x76d42a18), X(0x76da72ab), X(0x76e0b86d),
+ X(0x76e6fb5e), X(0x76ed3b7f), X(0x76f378d0), X(0x76f9b352),
+ X(0x76ffeb05), X(0x77061fe8), X(0x770c51fe), X(0x77128145),
+ X(0x7718adbf), X(0x771ed76c), X(0x7724fe4c), X(0x772b225f),
+ X(0x773143a7), X(0x77376223), X(0x773d7dd3), X(0x774396ba),
+ X(0x7749acd5), X(0x774fc027), X(0x7755d0af), X(0x775bde6f),
+ X(0x7761e965), X(0x7767f193), X(0x776df6fa), X(0x7773f998),
+ X(0x7779f970), X(0x777ff681), X(0x7785f0cd), X(0x778be852),
+ X(0x7791dd12), X(0x7797cf0d), X(0x779dbe43), X(0x77a3aab6),
+ X(0x77a99465), X(0x77af7b50), X(0x77b55f79), X(0x77bb40e0),
+ X(0x77c11f85), X(0x77c6fb68), X(0x77ccd48a), X(0x77d2aaec),
+ X(0x77d87e8d), X(0x77de4f6f), X(0x77e41d92), X(0x77e9e8f5),
+ X(0x77efb19b), X(0x77f57782), X(0x77fb3aad), X(0x7800fb1a),
+ X(0x7806b8ca), X(0x780c73bf), X(0x78122bf7), X(0x7817e175),
+ X(0x781d9438), X(0x78234440), X(0x7828f18f), X(0x782e9c25),
+ X(0x78344401), X(0x7839e925), X(0x783f8b92), X(0x78452b46),
+ X(0x784ac844), X(0x7850628b), X(0x7855fa1c), X(0x785b8ef8),
+ X(0x7861211e), X(0x7866b090), X(0x786c3d4d), X(0x7871c757),
+ X(0x78774ead), X(0x787cd351), X(0x78825543), X(0x7887d483),
+ X(0x788d5111), X(0x7892caef), X(0x7898421c), X(0x789db69a),
+ X(0x78a32868), X(0x78a89787), X(0x78ae03f8), X(0x78b36dbb),
+ X(0x78b8d4d1), X(0x78be393a), X(0x78c39af6), X(0x78c8fa06),
+ X(0x78ce566c), X(0x78d3b026), X(0x78d90736), X(0x78de5b9c),
+ X(0x78e3ad58), X(0x78e8fc6c), X(0x78ee48d7), X(0x78f3929b),
+ X(0x78f8d9b7), X(0x78fe1e2c), X(0x79035ffb), X(0x79089f24),
+ X(0x790ddba8), X(0x79131587), X(0x79184cc2), X(0x791d8159),
+ X(0x7922b34d), X(0x7927e29e), X(0x792d0f4d), X(0x7932395a),
+ X(0x793760c6), X(0x793c8591), X(0x7941a7bd), X(0x7946c749),
+ X(0x794be435), X(0x7950fe84), X(0x79561634), X(0x795b2b47),
+ X(0x79603dbc), X(0x79654d96), X(0x796a5ad4), X(0x796f6576),
+ X(0x79746d7e), X(0x797972eb), X(0x797e75bf), X(0x798375f9),
+ X(0x7988739b), X(0x798d6ea5), X(0x79926717), X(0x79975cf2),
+ X(0x799c5037), X(0x79a140e6), X(0x79a62f00), X(0x79ab1a85),
+ X(0x79b00376), X(0x79b4e9d3), X(0x79b9cd9d), X(0x79beaed4),
+ X(0x79c38d79), X(0x79c8698d), X(0x79cd4310), X(0x79d21a03),
+ X(0x79d6ee66), X(0x79dbc03a), X(0x79e08f7f), X(0x79e55c36),
+ X(0x79ea265f), X(0x79eeedfc), X(0x79f3b30c), X(0x79f87590),
+ X(0x79fd3589), X(0x7a01f2f7), X(0x7a06addc), X(0x7a0b6636),
+ X(0x7a101c08), X(0x7a14cf52), X(0x7a198013), X(0x7a1e2e4d),
+ X(0x7a22da01), X(0x7a27832f), X(0x7a2c29d7), X(0x7a30cdfa),
+ X(0x7a356f99), X(0x7a3a0eb4), X(0x7a3eab4c), X(0x7a434561),
+ X(0x7a47dcf5), X(0x7a4c7207), X(0x7a510498), X(0x7a5594a9),
+ X(0x7a5a223a), X(0x7a5ead4d), X(0x7a6335e0), X(0x7a67bbf6),
+ X(0x7a6c3f8f), X(0x7a70c0ab), X(0x7a753f4b), X(0x7a79bb6f),
+ X(0x7a7e3519), X(0x7a82ac48), X(0x7a8720fe), X(0x7a8b933b),
+ X(0x7a9002ff), X(0x7a94704b), X(0x7a98db20), X(0x7a9d437e),
+ X(0x7aa1a967), X(0x7aa60cd9), X(0x7aaa6dd7), X(0x7aaecc61),
+ X(0x7ab32877), X(0x7ab7821b), X(0x7abbd94b), X(0x7ac02e0a),
+ X(0x7ac48058), X(0x7ac8d035), X(0x7acd1da3), X(0x7ad168a1),
+ X(0x7ad5b130), X(0x7ad9f751), X(0x7ade3b05), X(0x7ae27c4c),
+ X(0x7ae6bb27), X(0x7aeaf796), X(0x7aef319a), X(0x7af36934),
+ X(0x7af79e64), X(0x7afbd12c), X(0x7b00018a), X(0x7b042f81),
+ X(0x7b085b10), X(0x7b0c8439), X(0x7b10aafc), X(0x7b14cf5a),
+ X(0x7b18f153), X(0x7b1d10e8), X(0x7b212e1a), X(0x7b2548e9),
+ X(0x7b296155), X(0x7b2d7761), X(0x7b318b0b), X(0x7b359c55),
+ X(0x7b39ab3f), X(0x7b3db7cb), X(0x7b41c1f8), X(0x7b45c9c8),
+ X(0x7b49cf3b), X(0x7b4dd251), X(0x7b51d30b), X(0x7b55d16b),
+ X(0x7b59cd70), X(0x7b5dc71b), X(0x7b61be6d), X(0x7b65b366),
+ X(0x7b69a608), X(0x7b6d9653), X(0x7b718447), X(0x7b756fe5),
+ X(0x7b79592e), X(0x7b7d4022), X(0x7b8124c3), X(0x7b850710),
+ X(0x7b88e70a), X(0x7b8cc4b3), X(0x7b90a00a), X(0x7b947911),
+ X(0x7b984fc8), X(0x7b9c242f), X(0x7b9ff648), X(0x7ba3c612),
+ X(0x7ba79390), X(0x7bab5ec1), X(0x7baf27a5), X(0x7bb2ee3f),
+ X(0x7bb6b28e), X(0x7bba7493), X(0x7bbe344e), X(0x7bc1f1c1),
+ X(0x7bc5acec), X(0x7bc965cf), X(0x7bcd1c6c), X(0x7bd0d0c3),
+ X(0x7bd482d4), X(0x7bd832a1), X(0x7bdbe02a), X(0x7bdf8b70),
+ X(0x7be33473), X(0x7be6db34), X(0x7bea7fb4), X(0x7bee21f4),
+ X(0x7bf1c1f3), X(0x7bf55fb3), X(0x7bf8fb35), X(0x7bfc9479),
+ X(0x7c002b7f), X(0x7c03c04a), X(0x7c0752d8), X(0x7c0ae32b),
+ X(0x7c0e7144), X(0x7c11fd23), X(0x7c1586c9), X(0x7c190e36),
+ X(0x7c1c936c), X(0x7c20166b), X(0x7c239733), X(0x7c2715c6),
+ X(0x7c2a9224), X(0x7c2e0c4e), X(0x7c318444), X(0x7c34fa07),
+ X(0x7c386d98), X(0x7c3bdef8), X(0x7c3f4e26), X(0x7c42bb25),
+ X(0x7c4625f4), X(0x7c498e95), X(0x7c4cf507), X(0x7c50594c),
+ X(0x7c53bb65), X(0x7c571b51), X(0x7c5a7913), X(0x7c5dd4aa),
+ X(0x7c612e17), X(0x7c64855b), X(0x7c67da76), X(0x7c6b2d6a),
+ X(0x7c6e7e37), X(0x7c71ccdd), X(0x7c75195e), X(0x7c7863ba),
+ X(0x7c7babf1), X(0x7c7ef206), X(0x7c8235f7), X(0x7c8577c6),
+ X(0x7c88b774), X(0x7c8bf502), X(0x7c8f306f), X(0x7c9269bd),
+ X(0x7c95a0ec), X(0x7c98d5fe), X(0x7c9c08f2), X(0x7c9f39cb),
+ X(0x7ca26887), X(0x7ca59528), X(0x7ca8bfb0), X(0x7cabe81d),
+ X(0x7caf0e72), X(0x7cb232af), X(0x7cb554d4), X(0x7cb874e2),
+ X(0x7cbb92db), X(0x7cbeaebe), X(0x7cc1c88d), X(0x7cc4e047),
+ X(0x7cc7f5ef), X(0x7ccb0984), X(0x7cce1b08), X(0x7cd12a7b),
+ X(0x7cd437dd), X(0x7cd74330), X(0x7cda4c74), X(0x7cdd53aa),
+ X(0x7ce058d3), X(0x7ce35bef), X(0x7ce65cff), X(0x7ce95c04),
+ X(0x7cec58ff), X(0x7cef53f0), X(0x7cf24cd7), X(0x7cf543b7),
+ X(0x7cf8388f), X(0x7cfb2b60), X(0x7cfe1c2b), X(0x7d010af1),
+ X(0x7d03f7b2), X(0x7d06e26f), X(0x7d09cb29), X(0x7d0cb1e0),
+ X(0x7d0f9696), X(0x7d12794b), X(0x7d1559ff), X(0x7d1838b4),
+ X(0x7d1b156a), X(0x7d1df022), X(0x7d20c8dd), X(0x7d239f9b),
+ X(0x7d26745e), X(0x7d294725), X(0x7d2c17f1), X(0x7d2ee6c4),
+ X(0x7d31b39f), X(0x7d347e81), X(0x7d37476b), X(0x7d3a0e5f),
+ X(0x7d3cd35d), X(0x7d3f9665), X(0x7d425779), X(0x7d451699),
+ X(0x7d47d3c6), X(0x7d4a8f01), X(0x7d4d484b), X(0x7d4fffa3),
+ X(0x7d52b50c), X(0x7d556885), X(0x7d581a0f), X(0x7d5ac9ac),
+ X(0x7d5d775c), X(0x7d60231f), X(0x7d62ccf6), X(0x7d6574e3),
+ X(0x7d681ae6), X(0x7d6abeff), X(0x7d6d612f), X(0x7d700178),
+ X(0x7d729fd9), X(0x7d753c54), X(0x7d77d6e9), X(0x7d7a6f9a),
+ X(0x7d7d0666), X(0x7d7f9b4f), X(0x7d822e55), X(0x7d84bf79),
+ X(0x7d874ebc), X(0x7d89dc1e), X(0x7d8c67a1), X(0x7d8ef144),
+ X(0x7d91790a), X(0x7d93fef2), X(0x7d9682fd), X(0x7d99052d),
+ X(0x7d9b8581), X(0x7d9e03fb), X(0x7da0809b), X(0x7da2fb62),
+ X(0x7da57451), X(0x7da7eb68), X(0x7daa60a8), X(0x7dacd413),
+ X(0x7daf45a9), X(0x7db1b56a), X(0x7db42357), X(0x7db68f71),
+ X(0x7db8f9b9), X(0x7dbb6230), X(0x7dbdc8d6), X(0x7dc02dac),
+ X(0x7dc290b3), X(0x7dc4f1eb), X(0x7dc75156), X(0x7dc9aef4),
+ X(0x7dcc0ac5), X(0x7dce64cc), X(0x7dd0bd07), X(0x7dd31379),
+ X(0x7dd56821), X(0x7dd7bb01), X(0x7dda0c1a), X(0x7ddc5b6b),
+ X(0x7ddea8f7), X(0x7de0f4bd), X(0x7de33ebe), X(0x7de586fc),
+ X(0x7de7cd76), X(0x7dea122e), X(0x7dec5525), X(0x7dee965a),
+ X(0x7df0d5d0), X(0x7df31386), X(0x7df54f7e), X(0x7df789b8),
+ X(0x7df9c235), X(0x7dfbf8f5), X(0x7dfe2dfa), X(0x7e006145),
+ X(0x7e0292d5), X(0x7e04c2ac), X(0x7e06f0cb), X(0x7e091d32),
+ X(0x7e0b47e1), X(0x7e0d70db), X(0x7e0f981f), X(0x7e11bdaf),
+ X(0x7e13e18a), X(0x7e1603b3), X(0x7e182429), X(0x7e1a42ed),
+ X(0x7e1c6001), X(0x7e1e7b64), X(0x7e209518), X(0x7e22ad1d),
+ X(0x7e24c375), X(0x7e26d81f), X(0x7e28eb1d), X(0x7e2afc70),
+ X(0x7e2d0c17), X(0x7e2f1a15), X(0x7e31266a), X(0x7e333115),
+ X(0x7e353a1a), X(0x7e374177), X(0x7e39472e), X(0x7e3b4b3f),
+ X(0x7e3d4dac), X(0x7e3f4e75), X(0x7e414d9a), X(0x7e434b1e),
+ X(0x7e4546ff), X(0x7e474140), X(0x7e4939e0), X(0x7e4b30e2),
+ X(0x7e4d2644), X(0x7e4f1a09), X(0x7e510c30), X(0x7e52fcbc),
+ X(0x7e54ebab), X(0x7e56d900), X(0x7e58c4bb), X(0x7e5aaedd),
+ X(0x7e5c9766), X(0x7e5e7e57), X(0x7e6063b2), X(0x7e624776),
+ X(0x7e6429a5), X(0x7e660a3f), X(0x7e67e945), X(0x7e69c6b8),
+ X(0x7e6ba299), X(0x7e6d7ce7), X(0x7e6f55a5), X(0x7e712cd3),
+ X(0x7e730272), X(0x7e74d682), X(0x7e76a904), X(0x7e7879f9),
+ X(0x7e7a4962), X(0x7e7c173f), X(0x7e7de392), X(0x7e7fae5a),
+ X(0x7e817799), X(0x7e833f50), X(0x7e85057f), X(0x7e86ca27),
+ X(0x7e888d49), X(0x7e8a4ee5), X(0x7e8c0efd), X(0x7e8dcd91),
+ X(0x7e8f8aa1), X(0x7e914630), X(0x7e93003c), X(0x7e94b8c8),
+ X(0x7e966fd4), X(0x7e982560), X(0x7e99d96e), X(0x7e9b8bfe),
+ X(0x7e9d3d10), X(0x7e9eeca7), X(0x7ea09ac2), X(0x7ea24762),
+ X(0x7ea3f288), X(0x7ea59c35), X(0x7ea7446a), X(0x7ea8eb27),
+ X(0x7eaa906c), X(0x7eac343c), X(0x7eadd696), X(0x7eaf777b),
+ X(0x7eb116ed), X(0x7eb2b4eb), X(0x7eb45177), X(0x7eb5ec91),
+ X(0x7eb7863b), X(0x7eb91e74), X(0x7ebab53e), X(0x7ebc4a99),
+ X(0x7ebdde87), X(0x7ebf7107), X(0x7ec1021b), X(0x7ec291c3),
+ X(0x7ec42001), X(0x7ec5acd5), X(0x7ec7383f), X(0x7ec8c241),
+ X(0x7eca4adb), X(0x7ecbd20d), X(0x7ecd57da), X(0x7ecedc41),
+ X(0x7ed05f44), X(0x7ed1e0e2), X(0x7ed3611d), X(0x7ed4dff6),
+ X(0x7ed65d6d), X(0x7ed7d983), X(0x7ed95438), X(0x7edacd8f),
+ X(0x7edc4586), X(0x7eddbc20), X(0x7edf315c), X(0x7ee0a53c),
+ X(0x7ee217c1), X(0x7ee388ea), X(0x7ee4f8b9), X(0x7ee6672f),
+ X(0x7ee7d44c), X(0x7ee94012), X(0x7eeaaa80), X(0x7eec1397),
+ X(0x7eed7b59), X(0x7eeee1c6), X(0x7ef046df), X(0x7ef1aaa5),
+ X(0x7ef30d18), X(0x7ef46e39), X(0x7ef5ce09), X(0x7ef72c88),
+ X(0x7ef889b8), X(0x7ef9e599), X(0x7efb402c), X(0x7efc9972),
+ X(0x7efdf16b), X(0x7eff4818), X(0x7f009d79), X(0x7f01f191),
+ X(0x7f03445f), X(0x7f0495e4), X(0x7f05e620), X(0x7f073516),
+ X(0x7f0882c5), X(0x7f09cf2d), X(0x7f0b1a51), X(0x7f0c6430),
+ X(0x7f0daccc), X(0x7f0ef425), X(0x7f103a3b), X(0x7f117f11),
+ X(0x7f12c2a5), X(0x7f1404fa), X(0x7f15460f), X(0x7f1685e6),
+ X(0x7f17c47f), X(0x7f1901db), X(0x7f1a3dfb), X(0x7f1b78e0),
+ X(0x7f1cb28a), X(0x7f1deafa), X(0x7f1f2231), X(0x7f20582f),
+ X(0x7f218cf5), X(0x7f22c085), X(0x7f23f2de), X(0x7f252401),
+ X(0x7f2653f0), X(0x7f2782ab), X(0x7f28b032), X(0x7f29dc87),
+ X(0x7f2b07aa), X(0x7f2c319c), X(0x7f2d5a5e), X(0x7f2e81f0),
+ X(0x7f2fa853), X(0x7f30cd88), X(0x7f31f18f), X(0x7f33146a),
+ X(0x7f343619), X(0x7f35569c), X(0x7f3675f6), X(0x7f379425),
+ X(0x7f38b12c), X(0x7f39cd0a), X(0x7f3ae7c0), X(0x7f3c0150),
+ X(0x7f3d19ba), X(0x7f3e30fe), X(0x7f3f471e), X(0x7f405c1a),
+ X(0x7f416ff3), X(0x7f4282a9), X(0x7f43943e), X(0x7f44a4b2),
+ X(0x7f45b405), X(0x7f46c239), X(0x7f47cf4e), X(0x7f48db45),
+ X(0x7f49e61f), X(0x7f4aefdc), X(0x7f4bf87e), X(0x7f4d0004),
+ X(0x7f4e0670), X(0x7f4f0bc2), X(0x7f500ffb), X(0x7f51131c),
+ X(0x7f521525), X(0x7f531618), X(0x7f5415f4), X(0x7f5514bb),
+ X(0x7f56126e), X(0x7f570f0c), X(0x7f580a98), X(0x7f590511),
+ X(0x7f59fe78), X(0x7f5af6ce), X(0x7f5bee14), X(0x7f5ce44a),
+ X(0x7f5dd972), X(0x7f5ecd8b), X(0x7f5fc097), X(0x7f60b296),
+ X(0x7f61a389), X(0x7f629370), X(0x7f63824e), X(0x7f647021),
+ X(0x7f655ceb), X(0x7f6648ad), X(0x7f673367), X(0x7f681d19),
+ X(0x7f6905c6), X(0x7f69ed6d), X(0x7f6ad40f), X(0x7f6bb9ad),
+ X(0x7f6c9e48), X(0x7f6d81e0), X(0x7f6e6475), X(0x7f6f460a),
+ X(0x7f70269d), X(0x7f710631), X(0x7f71e4c6), X(0x7f72c25c),
+ X(0x7f739ef4), X(0x7f747a8f), X(0x7f75552e), X(0x7f762ed1),
+ X(0x7f770779), X(0x7f77df27), X(0x7f78b5db), X(0x7f798b97),
+ X(0x7f7a605a), X(0x7f7b3425), X(0x7f7c06fa), X(0x7f7cd8d9),
+ X(0x7f7da9c2), X(0x7f7e79b7), X(0x7f7f48b8), X(0x7f8016c5),
+ X(0x7f80e3e0), X(0x7f81b009), X(0x7f827b40), X(0x7f834588),
+ X(0x7f840edf), X(0x7f84d747), X(0x7f859ec1), X(0x7f86654d),
+ X(0x7f872aec), X(0x7f87ef9e), X(0x7f88b365), X(0x7f897641),
+ X(0x7f8a3832), X(0x7f8af93a), X(0x7f8bb959), X(0x7f8c7890),
+ X(0x7f8d36df), X(0x7f8df448), X(0x7f8eb0ca), X(0x7f8f6c67),
+ X(0x7f90271e), X(0x7f90e0f2), X(0x7f9199e2), X(0x7f9251f0),
+ X(0x7f93091b), X(0x7f93bf65), X(0x7f9474ce), X(0x7f952958),
+ X(0x7f95dd01), X(0x7f968fcd), X(0x7f9741ba), X(0x7f97f2ca),
+ X(0x7f98a2fd), X(0x7f995254), X(0x7f9a00d0), X(0x7f9aae71),
+ X(0x7f9b5b38), X(0x7f9c0726), X(0x7f9cb23b), X(0x7f9d5c78),
+ X(0x7f9e05de), X(0x7f9eae6e), X(0x7f9f5627), X(0x7f9ffd0b),
+ X(0x7fa0a31b), X(0x7fa14856), X(0x7fa1ecbf), X(0x7fa29054),
+ X(0x7fa33318), X(0x7fa3d50b), X(0x7fa4762c), X(0x7fa5167e),
+ X(0x7fa5b601), X(0x7fa654b5), X(0x7fa6f29b), X(0x7fa78fb3),
+ X(0x7fa82bff), X(0x7fa8c77f), X(0x7fa96234), X(0x7fa9fc1e),
+ X(0x7faa953e), X(0x7fab2d94), X(0x7fabc522), X(0x7fac5be8),
+ X(0x7facf1e6), X(0x7fad871d), X(0x7fae1b8f), X(0x7faeaf3b),
+ X(0x7faf4222), X(0x7fafd445), X(0x7fb065a4), X(0x7fb0f641),
+ X(0x7fb1861b), X(0x7fb21534), X(0x7fb2a38c), X(0x7fb33124),
+ X(0x7fb3bdfb), X(0x7fb44a14), X(0x7fb4d56f), X(0x7fb5600c),
+ X(0x7fb5e9ec), X(0x7fb6730f), X(0x7fb6fb76), X(0x7fb78323),
+ X(0x7fb80a15), X(0x7fb8904d), X(0x7fb915cc), X(0x7fb99a92),
+ X(0x7fba1ea0), X(0x7fbaa1f7), X(0x7fbb2497), X(0x7fbba681),
+ X(0x7fbc27b5), X(0x7fbca835), X(0x7fbd2801), X(0x7fbda719),
+ X(0x7fbe257e), X(0x7fbea331), X(0x7fbf2032), X(0x7fbf9c82),
+ X(0x7fc01821), X(0x7fc09311), X(0x7fc10d52), X(0x7fc186e4),
+ X(0x7fc1ffc8), X(0x7fc277ff), X(0x7fc2ef89), X(0x7fc36667),
+ X(0x7fc3dc9a), X(0x7fc45221), X(0x7fc4c6ff), X(0x7fc53b33),
+ X(0x7fc5aebe), X(0x7fc621a0), X(0x7fc693db), X(0x7fc7056f),
+ X(0x7fc7765c), X(0x7fc7e6a3), X(0x7fc85645), X(0x7fc8c542),
+ X(0x7fc9339b), X(0x7fc9a150), X(0x7fca0e63), X(0x7fca7ad3),
+ X(0x7fcae6a2), X(0x7fcb51cf), X(0x7fcbbc5c), X(0x7fcc2649),
+ X(0x7fcc8f97), X(0x7fccf846), X(0x7fcd6058), X(0x7fcdc7cb),
+ X(0x7fce2ea2), X(0x7fce94dd), X(0x7fcefa7b), X(0x7fcf5f7f),
+ X(0x7fcfc3e8), X(0x7fd027b7), X(0x7fd08aed), X(0x7fd0ed8b),
+ X(0x7fd14f90), X(0x7fd1b0fd), X(0x7fd211d4), X(0x7fd27214),
+ X(0x7fd2d1bf), X(0x7fd330d4), X(0x7fd38f55), X(0x7fd3ed41),
+ X(0x7fd44a9a), X(0x7fd4a761), X(0x7fd50395), X(0x7fd55f37),
+ X(0x7fd5ba48), X(0x7fd614c9), X(0x7fd66eba), X(0x7fd6c81b),
+ X(0x7fd720ed), X(0x7fd77932), X(0x7fd7d0e8), X(0x7fd82812),
+ X(0x7fd87eae), X(0x7fd8d4bf), X(0x7fd92a45), X(0x7fd97f40),
+ X(0x7fd9d3b0), X(0x7fda2797), X(0x7fda7af5), X(0x7fdacdca),
+ X(0x7fdb2018), X(0x7fdb71dd), X(0x7fdbc31c), X(0x7fdc13d5),
+ X(0x7fdc6408), X(0x7fdcb3b6), X(0x7fdd02df), X(0x7fdd5184),
+ X(0x7fdd9fa5), X(0x7fdded44), X(0x7fde3a60), X(0x7fde86fb),
+ X(0x7fded314), X(0x7fdf1eac), X(0x7fdf69c4), X(0x7fdfb45d),
+ X(0x7fdffe76), X(0x7fe04811), X(0x7fe0912e), X(0x7fe0d9ce),
+ X(0x7fe121f0), X(0x7fe16996), X(0x7fe1b0c1), X(0x7fe1f770),
+ X(0x7fe23da4), X(0x7fe2835f), X(0x7fe2c89f), X(0x7fe30d67),
+ X(0x7fe351b5), X(0x7fe3958c), X(0x7fe3d8ec), X(0x7fe41bd4),
+ X(0x7fe45e46), X(0x7fe4a042), X(0x7fe4e1c8), X(0x7fe522da),
+ X(0x7fe56378), X(0x7fe5a3a1), X(0x7fe5e358), X(0x7fe6229b),
+ X(0x7fe6616d), X(0x7fe69fcc), X(0x7fe6ddbb), X(0x7fe71b39),
+ X(0x7fe75847), X(0x7fe794e5), X(0x7fe7d114), X(0x7fe80cd5),
+ X(0x7fe84827), X(0x7fe8830c), X(0x7fe8bd84), X(0x7fe8f78f),
+ X(0x7fe9312f), X(0x7fe96a62), X(0x7fe9a32b), X(0x7fe9db8a),
+ X(0x7fea137e), X(0x7fea4b09), X(0x7fea822b), X(0x7feab8e5),
+ X(0x7feaef37), X(0x7feb2521), X(0x7feb5aa4), X(0x7feb8fc1),
+ X(0x7febc478), X(0x7febf8ca), X(0x7fec2cb6), X(0x7fec603e),
+ X(0x7fec9363), X(0x7fecc623), X(0x7fecf881), X(0x7fed2a7c),
+ X(0x7fed5c16), X(0x7fed8d4e), X(0x7fedbe24), X(0x7fedee9b),
+ X(0x7fee1eb1), X(0x7fee4e68), X(0x7fee7dc0), X(0x7feeacb9),
+ X(0x7feedb54), X(0x7fef0991), X(0x7fef3771), X(0x7fef64f5),
+ X(0x7fef921d), X(0x7fefbee8), X(0x7fefeb59), X(0x7ff0176f),
+ X(0x7ff0432a), X(0x7ff06e8c), X(0x7ff09995), X(0x7ff0c444),
+ X(0x7ff0ee9c), X(0x7ff1189b), X(0x7ff14243), X(0x7ff16b94),
+ X(0x7ff1948e), X(0x7ff1bd32), X(0x7ff1e581), X(0x7ff20d7b),
+ X(0x7ff2351f), X(0x7ff25c70), X(0x7ff2836d), X(0x7ff2aa17),
+ X(0x7ff2d06d), X(0x7ff2f672), X(0x7ff31c24), X(0x7ff34185),
+ X(0x7ff36695), X(0x7ff38b55), X(0x7ff3afc4), X(0x7ff3d3e4),
+ X(0x7ff3f7b4), X(0x7ff41b35), X(0x7ff43e69), X(0x7ff4614e),
+ X(0x7ff483e6), X(0x7ff4a631), X(0x7ff4c82f), X(0x7ff4e9e1),
+ X(0x7ff50b47), X(0x7ff52c62), X(0x7ff54d33), X(0x7ff56db9),
+ X(0x7ff58df5), X(0x7ff5ade7), X(0x7ff5cd90), X(0x7ff5ecf1),
+ X(0x7ff60c09), X(0x7ff62ada), X(0x7ff64963), X(0x7ff667a5),
+ X(0x7ff685a1), X(0x7ff6a357), X(0x7ff6c0c7), X(0x7ff6ddf1),
+ X(0x7ff6fad7), X(0x7ff71778), X(0x7ff733d6), X(0x7ff74fef),
+ X(0x7ff76bc6), X(0x7ff78759), X(0x7ff7a2ab), X(0x7ff7bdba),
+ X(0x7ff7d888), X(0x7ff7f315), X(0x7ff80d61), X(0x7ff8276c),
+ X(0x7ff84138), X(0x7ff85ac4), X(0x7ff87412), X(0x7ff88d20),
+ X(0x7ff8a5f0), X(0x7ff8be82), X(0x7ff8d6d7), X(0x7ff8eeef),
+ X(0x7ff906c9), X(0x7ff91e68), X(0x7ff935cb), X(0x7ff94cf2),
+ X(0x7ff963dd), X(0x7ff97a8f), X(0x7ff99105), X(0x7ff9a742),
+ X(0x7ff9bd45), X(0x7ff9d30f), X(0x7ff9e8a0), X(0x7ff9fdf9),
+ X(0x7ffa131a), X(0x7ffa2803), X(0x7ffa3cb4), X(0x7ffa512f),
+ X(0x7ffa6573), X(0x7ffa7981), X(0x7ffa8d59), X(0x7ffaa0fc),
+ X(0x7ffab46a), X(0x7ffac7a3), X(0x7ffadaa8), X(0x7ffaed78),
+ X(0x7ffb0015), X(0x7ffb127f), X(0x7ffb24b6), X(0x7ffb36bb),
+ X(0x7ffb488d), X(0x7ffb5a2e), X(0x7ffb6b9d), X(0x7ffb7cdb),
+ X(0x7ffb8de9), X(0x7ffb9ec6), X(0x7ffbaf73), X(0x7ffbbff1),
+ X(0x7ffbd03f), X(0x7ffbe05e), X(0x7ffbf04f), X(0x7ffc0012),
+ X(0x7ffc0fa6), X(0x7ffc1f0d), X(0x7ffc2e47), X(0x7ffc3d54),
+ X(0x7ffc4c35), X(0x7ffc5ae9), X(0x7ffc6971), X(0x7ffc77ce),
+ X(0x7ffc8600), X(0x7ffc9407), X(0x7ffca1e4), X(0x7ffcaf96),
+ X(0x7ffcbd1f), X(0x7ffcca7e), X(0x7ffcd7b4), X(0x7ffce4c1),
+ X(0x7ffcf1a5), X(0x7ffcfe62), X(0x7ffd0af6), X(0x7ffd1763),
+ X(0x7ffd23a9), X(0x7ffd2fc8), X(0x7ffd3bc1), X(0x7ffd4793),
+ X(0x7ffd533f), X(0x7ffd5ec5), X(0x7ffd6a27), X(0x7ffd7563),
+ X(0x7ffd807a), X(0x7ffd8b6e), X(0x7ffd963d), X(0x7ffda0e8),
+ X(0x7ffdab70), X(0x7ffdb5d5), X(0x7ffdc017), X(0x7ffdca36),
+ X(0x7ffdd434), X(0x7ffdde0f), X(0x7ffde7c9), X(0x7ffdf161),
+ X(0x7ffdfad8), X(0x7ffe042f), X(0x7ffe0d65), X(0x7ffe167b),
+ X(0x7ffe1f71), X(0x7ffe2848), X(0x7ffe30ff), X(0x7ffe3997),
+ X(0x7ffe4211), X(0x7ffe4a6c), X(0x7ffe52a9), X(0x7ffe5ac8),
+ X(0x7ffe62c9), X(0x7ffe6aae), X(0x7ffe7275), X(0x7ffe7a1f),
+ X(0x7ffe81ad), X(0x7ffe891f), X(0x7ffe9075), X(0x7ffe97b0),
+ X(0x7ffe9ece), X(0x7ffea5d2), X(0x7ffeacbb), X(0x7ffeb38a),
+ X(0x7ffeba3e), X(0x7ffec0d8), X(0x7ffec758), X(0x7ffecdbf),
+ X(0x7ffed40d), X(0x7ffeda41), X(0x7ffee05d), X(0x7ffee660),
+ X(0x7ffeec4b), X(0x7ffef21f), X(0x7ffef7da), X(0x7ffefd7e),
+ X(0x7fff030b), X(0x7fff0881), X(0x7fff0de0), X(0x7fff1328),
+ X(0x7fff185b), X(0x7fff1d77), X(0x7fff227e), X(0x7fff276f),
+ X(0x7fff2c4b), X(0x7fff3112), X(0x7fff35c4), X(0x7fff3a62),
+ X(0x7fff3eeb), X(0x7fff4360), X(0x7fff47c2), X(0x7fff4c0f),
+ X(0x7fff504a), X(0x7fff5471), X(0x7fff5885), X(0x7fff5c87),
+ X(0x7fff6076), X(0x7fff6452), X(0x7fff681d), X(0x7fff6bd6),
+ X(0x7fff6f7d), X(0x7fff7313), X(0x7fff7698), X(0x7fff7a0c),
+ X(0x7fff7d6f), X(0x7fff80c2), X(0x7fff8404), X(0x7fff8736),
+ X(0x7fff8a58), X(0x7fff8d6b), X(0x7fff906e), X(0x7fff9362),
+ X(0x7fff9646), X(0x7fff991c), X(0x7fff9be3), X(0x7fff9e9c),
+ X(0x7fffa146), X(0x7fffa3e2), X(0x7fffa671), X(0x7fffa8f1),
+ X(0x7fffab65), X(0x7fffadca), X(0x7fffb023), X(0x7fffb26f),
+ X(0x7fffb4ae), X(0x7fffb6e0), X(0x7fffb906), X(0x7fffbb20),
+ X(0x7fffbd2e), X(0x7fffbf30), X(0x7fffc126), X(0x7fffc311),
+ X(0x7fffc4f1), X(0x7fffc6c5), X(0x7fffc88f), X(0x7fffca4d),
+ X(0x7fffcc01), X(0x7fffcdab), X(0x7fffcf4a), X(0x7fffd0e0),
+ X(0x7fffd26b), X(0x7fffd3ec), X(0x7fffd564), X(0x7fffd6d2),
+ X(0x7fffd838), X(0x7fffd993), X(0x7fffdae6), X(0x7fffdc31),
+ X(0x7fffdd72), X(0x7fffdeab), X(0x7fffdfdb), X(0x7fffe104),
+ X(0x7fffe224), X(0x7fffe33c), X(0x7fffe44d), X(0x7fffe556),
+ X(0x7fffe657), X(0x7fffe751), X(0x7fffe844), X(0x7fffe930),
+ X(0x7fffea15), X(0x7fffeaf3), X(0x7fffebca), X(0x7fffec9b),
+ X(0x7fffed66), X(0x7fffee2a), X(0x7fffeee8), X(0x7fffefa0),
+ X(0x7ffff053), X(0x7ffff0ff), X(0x7ffff1a6), X(0x7ffff247),
+ X(0x7ffff2e4), X(0x7ffff37a), X(0x7ffff40c), X(0x7ffff499),
+ X(0x7ffff520), X(0x7ffff5a3), X(0x7ffff621), X(0x7ffff69b),
+ X(0x7ffff710), X(0x7ffff781), X(0x7ffff7ee), X(0x7ffff857),
+ X(0x7ffff8bb), X(0x7ffff91c), X(0x7ffff979), X(0x7ffff9d2),
+ X(0x7ffffa27), X(0x7ffffa79), X(0x7ffffac8), X(0x7ffffb13),
+ X(0x7ffffb5b), X(0x7ffffba0), X(0x7ffffbe2), X(0x7ffffc21),
+ X(0x7ffffc5d), X(0x7ffffc96), X(0x7ffffccd), X(0x7ffffd01),
+ X(0x7ffffd32), X(0x7ffffd61), X(0x7ffffd8e), X(0x7ffffdb8),
+ X(0x7ffffde0), X(0x7ffffe07), X(0x7ffffe2b), X(0x7ffffe4d),
+ X(0x7ffffe6d), X(0x7ffffe8b), X(0x7ffffea8), X(0x7ffffec3),
+ X(0x7ffffedc), X(0x7ffffef4), X(0x7fffff0a), X(0x7fffff1f),
+ X(0x7fffff33), X(0x7fffff45), X(0x7fffff56), X(0x7fffff66),
+ X(0x7fffff75), X(0x7fffff82), X(0x7fffff8f), X(0x7fffff9a),
+ X(0x7fffffa5), X(0x7fffffaf), X(0x7fffffb8), X(0x7fffffc0),
+ X(0x7fffffc8), X(0x7fffffce), X(0x7fffffd5), X(0x7fffffda),
+ X(0x7fffffdf), X(0x7fffffe4), X(0x7fffffe8), X(0x7fffffeb),
+ X(0x7fffffef), X(0x7ffffff1), X(0x7ffffff4), X(0x7ffffff6),
+ X(0x7ffffff8), X(0x7ffffff9), X(0x7ffffffb), X(0x7ffffffc),
+ X(0x7ffffffd), X(0x7ffffffd), X(0x7ffffffe), X(0x7fffffff),
+ X(0x7fffffff), X(0x7fffffff), X(0x7fffffff), X(0x7fffffff),
+ X(0x7fffffff), X(0x7fffffff), X(0x7fffffff), X(0x7fffffff),
+ X(0x7fffffff), X(0x7fffffff), X(0x7fffffff), X(0x7fffffff),
+};
+
+#endif
+#endif
+